@nithishdts001/universal-report-module 1.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js ADDED
@@ -0,0 +1,457 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const c=require("react/jsx-runtime"),S=require("react"),za=require("react-dom"),Ha=require("@emotion/react");require("@emotion/styled");const p=require("@mui/material");function Ld(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const r in e)if(r!=="default"){const n=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,n.get?n:{enumerable:!0,get:()=>e[r]})}}return t.default=e,Object.freeze(t)}const Be=Ld(S);function Bd(e){return e==null?"null":Array.isArray(e)?"array":typeof e=="object"?"object":typeof e=="number"?"number":typeof e=="boolean"?"boolean":typeof e=="string"?"string":"mixed"}function Go(e){if(!Array.isArray(e)||e.length===0)return[];const t=new Set;e.forEach(n=>{typeof n=="object"&&n!==null&&Object.keys(n).forEach(i=>t.add(i))});const r=[];return t.forEach(n=>{const i=new Set;let s=0;e.forEach(u=>{typeof u=="object"&&u!==null&&n in u&&(s++,i.add(Bd(u[n])))});const a=s===e.length,o=i.size>1&&!i.has("null");let f="mixed";if(i.size===1)f=Array.from(i)[0];else if(i.size===2&&i.has("null")){const u=Array.from(i).filter(d=>d!=="null");u.length===1&&(f=u[0])}r.push({name:n,type:f,required:a,hasConflict:o})}),r.sort((n,i)=>n.name.localeCompare(i.name))}function $d(e){return e.some(t=>t.hasConflict)}function Yo(e){return e==null}function Ud(e){return(t,r,n)=>{const i=Yo(t),s=Yo(r);if(i&&s)return 0;if(i)return 1;if(s)return-1;let a=0;switch(e){case"number":const o=Number(t),f=Number(r);a=o-f;break;case"boolean":a=(t?1:0)-(r?1:0);break;case"string":a=String(t).localeCompare(String(r));break;case"array":case"object":a=JSON.stringify(t).localeCompare(JSON.stringify(r));break;case"mixed":case"null":default:a=String(t).localeCompare(String(r));break}return n==="asc"?a:-a}}function Wd(e,t,r){if(!r||r.length===0)return e;const n=[...r].sort((i,s)=>i.priority-s.priority);return[...e].sort((i,s)=>{for(const a of n){const o=t.find(d=>d.name===a.column);if(!o)continue;const u=Ud(o.type)(i[a.column],s[a.column],a.direction);if(u!==0)return u}return 0})}function Vd(e){return e===null?"asc":e==="asc"?"desc":null}function zd(e){return e==="string"||e==="boolean"}function Hd(e){return e.filter(t=>zd(t.type))}function Gd(e,t){const r={};return t.forEach(n=>{if(n.type==="number"){const i=e.map(s=>s[n.name]).filter(s=>typeof s=="number");i.length>0&&(r[n.name]=i.reduce((s,a)=>s+a,0))}}),r}function Yd(e,t,r){if(!r.enabled||r.levels.length===0)return e;const n=Qc(e,r.levels,t);return e0(n,r.collapsedGroups||[])}function Qc(e,t,r,n="",i=0){if(i>=t.length)return e;const s=t[i].column,a=new Map;e.forEach(u=>{const d=u[s],h=d==null?"(empty)":String(d);a.has(h)||a.set(h,[]),a.get(h).push(u)});const o=[];return Array.from(a.keys()).sort().forEach(u=>{const d=a.get(u),h=`${s}:${u}`,m=n?`${n}|${h}`:h,l=Gd(d,r),v=i<t.length-1?Qc(d,t,r,m,i+1):d,g={key:m,level:i,column:s,value:u,rowCount:d.length,aggregates:l,children:v};o.push(g)}),o}function e0(e,t,r=[]){for(const n of e)if("key"in n&&"level"in n&&"children"in n){const i=t.includes(n.key);r.push({isGroupHeader:!0,groupKey:n.key,groupLevel:n.level,groupColumn:n.column,groupValue:n.value,rowCount:n.rowCount,aggregates:n.aggregates,isCollapsed:i}),!i&&n.children&&e0(n.children,t,r)}else r.push(n);return r}function Xd(e,t){const r=e.collapsedGroups||[],n=r.includes(t)?r.filter(i=>i!==t):[...r,t];return{...e,collapsedGroups:n}}function Kd(e,t){return e==null?"":typeof e=="number"?`Σ ${e.toLocaleString()}`:String(e)}function qd(e,t,r){return`${t}: ${r}`}function Wn(e,t){if(!t||!t.enabled||!t.levels||t.levels.length===0)return[...e];const r=t.levels.map(i=>i.column),n=e.filter(i=>!r.includes(i));return[...r,...n]}function t0(e,t,r){if(!t||!t.enabled||!t.levels||t.levels.length===0)return[...e];const n=t.levels.map(s=>s.column),i=e.filter(s=>!n.includes(s));if(r){const s=[],a=new Set(n),o=new Set(i);let f=0;for(const u of r)a.has(u)?s.push(u):o.has(u)&&f<i.length?(s.push(i[f]),f++):o.has(u)||s.push(u);for(let u=f;u<i.length;u++)s.includes(i[u])||s.push(i[u]);return s}return[...e]}function Xo(e){const t={},r=[],n={};return e.forEach(i=>{t[i.name]=!0,r.push(i.name),n[i.name]=150}),{id:"default-view",name:"Default View",description:"Unfiltered, unsorted baseline view",isDefault:!0,snapshot:{filters:[],sortStack:[],columnVisibility:t,columnOrder:r,columnWidths:n,grouping:null}}}function Jd(e,t,r,n,i,s,a,o){const f={},u=[],d={};r.forEach(l=>{f[l.name]=!0,u.push(l.name),d[l.name]=150});const m=t0(i||u,a||null,o||u);return{filters:e||[],sortStack:t||[],columnVisibility:n||f,columnOrder:m,columnWidths:s||d,grouping:a||null}}function Zd(e,t){return JSON.stringify(e.filters)!==JSON.stringify(t.filters)||JSON.stringify(e.sortStack)!==JSON.stringify(t.sortStack)||JSON.stringify(e.columnVisibility)!==JSON.stringify(t.columnVisibility)||JSON.stringify(e.columnOrder)!==JSON.stringify(t.columnOrder)||JSON.stringify(e.columnWidths)!==JSON.stringify(t.columnWidths)||JSON.stringify(e.grouping)!==JSON.stringify(t.grouping)}function Qd(e){return!e||e.length===0?"None":e.sort((t,r)=>t.priority-r.priority).map(t=>`${t.column} ${t.direction==="asc"?"↑":"↓"}`).join(", ")}function eh(e,t){var g,x,T;const r=[],n=JSON.stringify(e.filters),i=JSON.stringify(t.filters);if(n!==i){const b=e.filters.length,_=t.filters.length;b>_?r.push({category:"filters",label:"Filters Added",description:`${b-_} new filter${b-_>1?"s":""} added`}):b<_?r.push({category:"filters",label:"Filters Removed",description:`${_-b} filter${_-b>1?"s":""} removed`}):r.push({category:"filters",label:"Filters Modified",description:"Filter conditions have been changed"})}const s=JSON.stringify(e.sortStack),a=JSON.stringify(t.sortStack);if(s!==a){const b=e.sortStack.length,_=t.sortStack.length;b>_?r.push({category:"sorting",label:"Sorting Added",description:`${b-_} new sort rule${b-_>1?"s":""} added`}):b<_?r.push({category:"sorting",label:"Sorting Removed",description:`${_-b} sort rule${_-b>1?"s":""} removed`}):r.push({category:"sorting",label:"Sorting Modified",description:"Sort rules or order have been changed"})}const o=JSON.stringify(e.columnVisibility),f=JSON.stringify(t.columnVisibility);if(o!==f){const b=Object.values(e.columnVisibility).filter(k=>k).length,_=Object.values(t.columnVisibility).filter(k=>k).length;b>_?r.push({category:"visibility",label:"Columns Shown",description:`${b-_} column${b-_>1?"s":""} made visible`}):b<_?r.push({category:"visibility",label:"Columns Hidden",description:`${_-b} column${_-b>1?"s":""} hidden`}):r.push({category:"visibility",label:"Column Visibility Changed",description:"Column visibility settings have been modified"})}const u=JSON.stringify(e.columnOrder),d=JSON.stringify(t.columnOrder);u!==d&&r.push({category:"order",label:"Column Order Changed",description:"Columns have been reordered"});const h=JSON.stringify(e.columnWidths),m=JSON.stringify(t.columnWidths);if(h!==m){const b=Object.keys(e.columnWidths).filter(_=>e.columnWidths[_]!==t.columnWidths[_]).length;r.push({category:"widths",label:"Column Widths Adjusted",description:`${b} column width${b>1?"s":""} modified`})}const l=JSON.stringify(e.grouping),v=JSON.stringify(t.grouping);if(l!==v){const b=(g=e.grouping)==null?void 0:g.enabled,_=(x=t.grouping)==null?void 0:x.enabled;if(b&&!_){const k=((T=e.grouping)==null?void 0:T.levels.length)||0;r.push({category:"grouping",label:"Grouping Applied",description:`${k} grouping level${k>1?"s":""} added`})}else!b&&_?r.push({category:"grouping",label:"Grouping Removed",description:"All grouping has been cleared"}):r.push({category:"grouping",label:"Grouping Modified",description:"Grouping configuration has been changed"})}return r}const r0="urm_report_";function th(e,t){try{const r=`${r0}${e}`;localStorage.setItem(r,JSON.stringify(t))}catch(r){console.error("Failed to save report state:",r)}}function rh(e){try{const t=`${r0}${e}`,r=localStorage.getItem(t);return r?JSON.parse(r):null}catch(t){return console.error("Failed to load report state:",t),null}}/*! xlsx.js (C) 2013-present SheetJS -- http://sheetjs.com */var is={};is.version="0.18.5";var n0=1252,nh=[874,932,936,949,950,1250,1251,1252,1253,1254,1255,1256,1257,1258,1e4],i0=function(e){nh.indexOf(e)!=-1&&(n0=e)};function ih(){i0(1252)}var vi=function(e){i0(e)};function sh(){vi(1200),ih()}var Bi=function(t){return String.fromCharCode(t)},Ko=function(t){return String.fromCharCode(t)},ss,rn="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";function yi(e){for(var t="",r=0,n=0,i=0,s=0,a=0,o=0,f=0,u=0;u<e.length;)r=e.charCodeAt(u++),s=r>>2,n=e.charCodeAt(u++),a=(r&3)<<4|n>>4,i=e.charCodeAt(u++),o=(n&15)<<2|i>>6,f=i&63,isNaN(n)?o=f=64:isNaN(i)&&(f=64),t+=rn.charAt(s)+rn.charAt(a)+rn.charAt(o)+rn.charAt(f);return t}function Kr(e){var t="",r=0,n=0,i=0,s=0,a=0,o=0,f=0;e=e.replace(/[^\w\+\/\=]/g,"");for(var u=0;u<e.length;)s=rn.indexOf(e.charAt(u++)),a=rn.indexOf(e.charAt(u++)),r=s<<2|a>>4,t+=String.fromCharCode(r),o=rn.indexOf(e.charAt(u++)),n=(a&15)<<4|o>>2,o!==64&&(t+=String.fromCharCode(n)),f=rn.indexOf(e.charAt(u++)),i=(o&3)<<6|f,f!==64&&(t+=String.fromCharCode(i));return t}var Ze=(function(){return typeof Buffer<"u"&&typeof process<"u"&&typeof process.versions<"u"&&!!process.versions.node})(),Zr=(function(){if(typeof Buffer<"u"){var e=!Buffer.from;if(!e)try{Buffer.from("foo","utf8")}catch{e=!0}return e?function(t,r){return r?new Buffer(t,r):new Buffer(t)}:Buffer.from.bind(Buffer)}return function(){}})();function yn(e){return Ze?Buffer.alloc?Buffer.alloc(e):new Buffer(e):typeof Uint8Array<"u"?new Uint8Array(e):new Array(e)}function qo(e){return Ze?Buffer.allocUnsafe?Buffer.allocUnsafe(e):new Buffer(e):typeof Uint8Array<"u"?new Uint8Array(e):new Array(e)}var Nr=function(t){return Ze?Zr(t,"binary"):t.split("").map(function(r){return r.charCodeAt(0)&255})};function Es(e){if(typeof ArrayBuffer>"u")return Nr(e);for(var t=new ArrayBuffer(e.length),r=new Uint8Array(t),n=0;n!=e.length;++n)r[n]=e.charCodeAt(n)&255;return t}function Oi(e){if(Array.isArray(e))return e.map(function(n){return String.fromCharCode(n)}).join("");for(var t=[],r=0;r<e.length;++r)t[r]=String.fromCharCode(e[r]);return t.join("")}function ah(e){if(typeof Uint8Array>"u")throw new Error("Unsupported");return new Uint8Array(e)}var Jt=Ze?function(e){return Buffer.concat(e.map(function(t){return Buffer.isBuffer(t)?t:Zr(t)}))}:function(e){if(typeof Uint8Array<"u"){var t=0,r=0;for(t=0;t<e.length;++t)r+=e[t].length;var n=new Uint8Array(r),i=0;for(t=0,r=0;t<e.length;r+=i,++t)if(i=e[t].length,e[t]instanceof Uint8Array)n.set(e[t],r);else{if(typeof e[t]=="string")throw"wtf";n.set(new Uint8Array(e[t]),r)}return n}return[].concat.apply([],e.map(function(s){return Array.isArray(s)?s:[].slice.call(s)}))};function oh(e){for(var t=[],r=0,n=e.length+250,i=yn(e.length+255),s=0;s<e.length;++s){var a=e.charCodeAt(s);if(a<128)i[r++]=a;else if(a<2048)i[r++]=192|a>>6&31,i[r++]=128|a&63;else if(a>=55296&&a<57344){a=(a&1023)+64;var o=e.charCodeAt(++s)&1023;i[r++]=240|a>>8&7,i[r++]=128|a>>2&63,i[r++]=128|o>>6&15|(a&3)<<4,i[r++]=128|o&63}else i[r++]=224|a>>12&15,i[r++]=128|a>>6&63,i[r++]=128|a&63;r>n&&(t.push(i.slice(0,r)),r=0,i=yn(65535),n=65530)}return t.push(i.slice(0,r)),Jt(t)}var ui=/\u0000/g,$i=/[\u0001-\u0006]/g;function Hn(e){for(var t="",r=e.length-1;r>=0;)t+=e.charAt(r--);return t}function Rr(e,t){var r=""+e;return r.length>=t?r:Ot("0",t-r.length)+r}function Ga(e,t){var r=""+e;return r.length>=t?r:Ot(" ",t-r.length)+r}function as(e,t){var r=""+e;return r.length>=t?r:r+Ot(" ",t-r.length)}function lh(e,t){var r=""+Math.round(e);return r.length>=t?r:Ot("0",t-r.length)+r}function ch(e,t){var r=""+e;return r.length>=t?r:Ot("0",t-r.length)+r}var Jo=Math.pow(2,32);function Fn(e,t){if(e>Jo||e<-Jo)return lh(e,t);var r=Math.round(e);return ch(r,t)}function os(e,t){return t=t||0,e.length>=7+t&&(e.charCodeAt(t)|32)===103&&(e.charCodeAt(t+1)|32)===101&&(e.charCodeAt(t+2)|32)===110&&(e.charCodeAt(t+3)|32)===101&&(e.charCodeAt(t+4)|32)===114&&(e.charCodeAt(t+5)|32)===97&&(e.charCodeAt(t+6)|32)===108}var Zo=[["Sun","Sunday"],["Mon","Monday"],["Tue","Tuesday"],["Wed","Wednesday"],["Thu","Thursday"],["Fri","Friday"],["Sat","Saturday"]],ea=[["J","Jan","January"],["F","Feb","February"],["M","Mar","March"],["A","Apr","April"],["M","May","May"],["J","Jun","June"],["J","Jul","July"],["A","Aug","August"],["S","Sep","September"],["O","Oct","October"],["N","Nov","November"],["D","Dec","December"]];function uh(e){return e||(e={}),e[0]="General",e[1]="0",e[2]="0.00",e[3]="#,##0",e[4]="#,##0.00",e[9]="0%",e[10]="0.00%",e[11]="0.00E+00",e[12]="# ?/?",e[13]="# ??/??",e[14]="m/d/yy",e[15]="d-mmm-yy",e[16]="d-mmm",e[17]="mmm-yy",e[18]="h:mm AM/PM",e[19]="h:mm:ss AM/PM",e[20]="h:mm",e[21]="h:mm:ss",e[22]="m/d/yy h:mm",e[37]="#,##0 ;(#,##0)",e[38]="#,##0 ;[Red](#,##0)",e[39]="#,##0.00;(#,##0.00)",e[40]="#,##0.00;[Red](#,##0.00)",e[45]="mm:ss",e[46]="[h]:mm:ss",e[47]="mmss.0",e[48]="##0.0E+0",e[49]="@",e[56]='"上午/下午 "hh"時"mm"分"ss"秒 "',e}var Dt={0:"General",1:"0",2:"0.00",3:"#,##0",4:"#,##0.00",9:"0%",10:"0.00%",11:"0.00E+00",12:"# ?/?",13:"# ??/??",14:"m/d/yy",15:"d-mmm-yy",16:"d-mmm",17:"mmm-yy",18:"h:mm AM/PM",19:"h:mm:ss AM/PM",20:"h:mm",21:"h:mm:ss",22:"m/d/yy h:mm",37:"#,##0 ;(#,##0)",38:"#,##0 ;[Red](#,##0)",39:"#,##0.00;(#,##0.00)",40:"#,##0.00;[Red](#,##0.00)",45:"mm:ss",46:"[h]:mm:ss",47:"mmss.0",48:"##0.0E+0",49:"@",56:'"上午/下午 "hh"時"mm"分"ss"秒 "'},Qo={5:37,6:38,7:39,8:40,23:0,24:0,25:0,26:0,27:14,28:14,29:14,30:14,31:14,50:14,51:14,52:14,53:14,54:14,55:14,56:14,57:14,58:14,59:1,60:2,61:3,62:4,67:9,68:10,69:12,70:13,71:14,72:14,73:15,74:16,75:17,76:20,77:21,78:22,79:45,80:46,81:47,82:0},fh={5:'"$"#,##0_);\\("$"#,##0\\)',63:'"$"#,##0_);\\("$"#,##0\\)',6:'"$"#,##0_);[Red]\\("$"#,##0\\)',64:'"$"#,##0_);[Red]\\("$"#,##0\\)',7:'"$"#,##0.00_);\\("$"#,##0.00\\)',65:'"$"#,##0.00_);\\("$"#,##0.00\\)',8:'"$"#,##0.00_);[Red]\\("$"#,##0.00\\)',66:'"$"#,##0.00_);[Red]\\("$"#,##0.00\\)',41:'_(* #,##0_);_(* \\(#,##0\\);_(* "-"_);_(@_)',42:'_("$"* #,##0_);_("$"* \\(#,##0\\);_("$"* "-"_);_(@_)',43:'_(* #,##0.00_);_(* \\(#,##0.00\\);_(* "-"??_);_(@_)',44:'_("$"* #,##0.00_);_("$"* \\(#,##0.00\\);_("$"* "-"??_);_(@_)'};function ls(e,t,r){for(var n=e<0?-1:1,i=e*n,s=0,a=1,o=0,f=1,u=0,d=0,h=Math.floor(i);u<t&&(h=Math.floor(i),o=h*a+s,d=h*u+f,!(i-h<5e-8));)i=1/(i-h),s=a,a=o,f=u,u=d;if(d>t&&(u>t?(d=f,o=s):(d=u,o=a)),!r)return[0,n*o,d];var m=Math.floor(n*o/d);return[m,n*o-m*d,d]}function Ui(e,t,r){if(e>2958465||e<0)return null;var n=e|0,i=Math.floor(86400*(e-n)),s=0,a=[],o={D:n,T:i,u:86400*(e-n)-i,y:0,m:0,d:0,H:0,M:0,S:0,q:0};if(Math.abs(o.u)<1e-6&&(o.u=0),t&&t.date1904&&(n+=1462),o.u>.9999&&(o.u=0,++i==86400&&(o.T=i=0,++n,++o.D)),n===60)a=r?[1317,10,29]:[1900,2,29],s=3;else if(n===0)a=r?[1317,8,29]:[1900,1,0],s=6;else{n>60&&--n;var f=new Date(1900,0,1);f.setDate(f.getDate()+n-1),a=[f.getFullYear(),f.getMonth()+1,f.getDate()],s=f.getDay(),n<60&&(s=(s+6)%7),r&&(s=vh(f,a))}return o.y=a[0],o.m=a[1],o.d=a[2],o.S=i%60,i=Math.floor(i/60),o.M=i%60,i=Math.floor(i/60),o.H=i,o.q=s,o}var s0=new Date(1899,11,31,0,0,0),dh=s0.getTime(),hh=new Date(1900,2,1,0,0,0);function a0(e,t){var r=e.getTime();return t?r-=1461*24*60*60*1e3:e>=hh&&(r+=1440*60*1e3),(r-(dh+(e.getTimezoneOffset()-s0.getTimezoneOffset())*6e4))/(1440*60*1e3)}function Ya(e){return e.indexOf(".")==-1?e:e.replace(/(?:\.0*|(\.\d*[1-9])0+)$/,"$1")}function ph(e){return e.indexOf("E")==-1?e:e.replace(/(?:\.0*|(\.\d*[1-9])0+)[Ee]/,"$1E").replace(/(E[+-])(\d)$/,"$10$2")}function gh(e){var t=e<0?12:11,r=Ya(e.toFixed(12));return r.length<=t||(r=e.toPrecision(10),r.length<=t)?r:e.toExponential(5)}function mh(e){var t=Ya(e.toFixed(11));return t.length>(e<0?12:11)||t==="0"||t==="-0"?e.toPrecision(6):t}function xh(e){var t=Math.floor(Math.log(Math.abs(e))*Math.LOG10E),r;return t>=-4&&t<=-1?r=e.toPrecision(10+t):Math.abs(t)<=9?r=gh(e):t===10?r=e.toFixed(10).substr(0,12):r=mh(e),Ya(ph(r.toUpperCase()))}function Ca(e,t){switch(typeof e){case"string":return e;case"boolean":return e?"TRUE":"FALSE";case"number":return(e|0)===e?e.toString(10):xh(e);case"undefined":return"";case"object":if(e==null)return"";if(e instanceof Date)return an(14,a0(e,t&&t.date1904),t)}throw new Error("unsupported value in General format: "+e)}function vh(e,t){t[0]-=581;var r=e.getDay();return e<60&&(r=(r+6)%7),r}function yh(e,t,r,n){var i="",s=0,a=0,o=r.y,f,u=0;switch(e){case 98:o=r.y+543;case 121:switch(t.length){case 1:case 2:f=o%100,u=2;break;default:f=o%1e4,u=4;break}break;case 109:switch(t.length){case 1:case 2:f=r.m,u=t.length;break;case 3:return ea[r.m-1][1];case 5:return ea[r.m-1][0];default:return ea[r.m-1][2]}break;case 100:switch(t.length){case 1:case 2:f=r.d,u=t.length;break;case 3:return Zo[r.q][0];default:return Zo[r.q][1]}break;case 104:switch(t.length){case 1:case 2:f=1+(r.H+11)%12,u=t.length;break;default:throw"bad hour format: "+t}break;case 72:switch(t.length){case 1:case 2:f=r.H,u=t.length;break;default:throw"bad hour format: "+t}break;case 77:switch(t.length){case 1:case 2:f=r.M,u=t.length;break;default:throw"bad minute format: "+t}break;case 115:if(t!="s"&&t!="ss"&&t!=".0"&&t!=".00"&&t!=".000")throw"bad second format: "+t;return r.u===0&&(t=="s"||t=="ss")?Rr(r.S,t.length):(n>=2?a=n===3?1e3:100:a=n===1?10:1,s=Math.round(a*(r.S+r.u)),s>=60*a&&(s=0),t==="s"?s===0?"0":""+s/a:(i=Rr(s,2+n),t==="ss"?i.substr(0,2):"."+i.substr(2,t.length-1)));case 90:switch(t){case"[h]":case"[hh]":f=r.D*24+r.H;break;case"[m]":case"[mm]":f=(r.D*24+r.H)*60+r.M;break;case"[s]":case"[ss]":f=((r.D*24+r.H)*60+r.M)*60+Math.round(r.S+r.u);break;default:throw"bad abstime format: "+t}u=t.length===3?1:2;break;case 101:f=o,u=1;break}var d=u>0?Rr(f,u):"";return d}function nn(e){var t=3;if(e.length<=t)return e;for(var r=e.length%t,n=e.substr(0,r);r!=e.length;r+=t)n+=(n.length>0?",":"")+e.substr(r,t);return n}var o0=/%/g;function wh(e,t,r){var n=t.replace(o0,""),i=t.length-n.length;return Gr(e,n,r*Math.pow(10,2*i))+Ot("%",i)}function Th(e,t,r){for(var n=t.length-1;t.charCodeAt(n-1)===44;)--n;return Gr(e,t.substr(0,n),r/Math.pow(10,3*(t.length-n)))}function l0(e,t){var r,n=e.indexOf("E")-e.indexOf(".")-1;if(e.match(/^#+0.0E\+0$/)){if(t==0)return"0.0E+0";if(t<0)return"-"+l0(e,-t);var i=e.indexOf(".");i===-1&&(i=e.indexOf("E"));var s=Math.floor(Math.log(t)*Math.LOG10E)%i;if(s<0&&(s+=i),r=(t/Math.pow(10,s)).toPrecision(n+1+(i+s)%i),r.indexOf("e")===-1){var a=Math.floor(Math.log(t)*Math.LOG10E);for(r.indexOf(".")===-1?r=r.charAt(0)+"."+r.substr(1)+"E+"+(a-r.length+s):r+="E+"+(a-s);r.substr(0,2)==="0.";)r=r.charAt(0)+r.substr(2,i)+"."+r.substr(2+i),r=r.replace(/^0+([1-9])/,"$1").replace(/^0+\./,"0.");r=r.replace(/\+-/,"-")}r=r.replace(/^([+-]?)(\d*)\.(\d*)[Ee]/,function(o,f,u,d){return f+u+d.substr(0,(i+s)%i)+"."+d.substr(s)+"E"})}else r=t.toExponential(n);return e.match(/E\+00$/)&&r.match(/e[+-]\d$/)&&(r=r.substr(0,r.length-1)+"0"+r.charAt(r.length-1)),e.match(/E\-/)&&r.match(/e\+/)&&(r=r.replace(/e\+/,"e")),r.replace("e","E")}var c0=/# (\?+)( ?)\/( ?)(\d+)/;function Sh(e,t,r){var n=parseInt(e[4],10),i=Math.round(t*n),s=Math.floor(i/n),a=i-s*n,o=n;return r+(s===0?"":""+s)+" "+(a===0?Ot(" ",e[1].length+1+e[4].length):Ga(a,e[1].length)+e[2]+"/"+e[3]+Rr(o,e[4].length))}function Eh(e,t,r){return r+(t===0?"":""+t)+Ot(" ",e[1].length+2+e[4].length)}var u0=/^#*0*\.([0#]+)/,f0=/\).*[0#]/,d0=/\(###\) ###\\?-####/;function ar(e){for(var t="",r,n=0;n!=e.length;++n)switch(r=e.charCodeAt(n)){case 35:break;case 63:t+=" ";break;case 48:t+="0";break;default:t+=String.fromCharCode(r)}return t}function el(e,t){var r=Math.pow(10,t);return""+Math.round(e*r)/r}function tl(e,t){var r=e-Math.floor(e),n=Math.pow(10,t);return t<(""+Math.round(r*n)).length?0:Math.round(r*n)}function _h(e,t){return t<(""+Math.round((e-Math.floor(e))*Math.pow(10,t))).length?1:0}function bh(e){return e<2147483647&&e>-2147483648?""+(e>=0?e|0:e-1|0):""+Math.floor(e)}function _r(e,t,r){if(e.charCodeAt(0)===40&&!t.match(f0)){var n=t.replace(/\( */,"").replace(/ \)/,"").replace(/\)/,"");return r>=0?_r("n",n,r):"("+_r("n",n,-r)+")"}if(t.charCodeAt(t.length-1)===44)return Th(e,t,r);if(t.indexOf("%")!==-1)return wh(e,t,r);if(t.indexOf("E")!==-1)return l0(t,r);if(t.charCodeAt(0)===36)return"$"+_r(e,t.substr(t.charAt(1)==" "?2:1),r);var i,s,a,o,f=Math.abs(r),u=r<0?"-":"";if(t.match(/^00+$/))return u+Fn(f,t.length);if(t.match(/^[#?]+$/))return i=Fn(r,0),i==="0"&&(i=""),i.length>t.length?i:ar(t.substr(0,t.length-i.length))+i;if(s=t.match(c0))return Sh(s,f,u);if(t.match(/^#+0+$/))return u+Fn(f,t.length-t.indexOf("0"));if(s=t.match(u0))return i=el(r,s[1].length).replace(/^([^\.]+)$/,"$1."+ar(s[1])).replace(/\.$/,"."+ar(s[1])).replace(/\.(\d*)$/,function(v,g){return"."+g+Ot("0",ar(s[1]).length-g.length)}),t.indexOf("0.")!==-1?i:i.replace(/^0\./,".");if(t=t.replace(/^#+([0.])/,"$1"),s=t.match(/^(0*)\.(#*)$/))return u+el(f,s[2].length).replace(/\.(\d*[1-9])0*$/,".$1").replace(/^(-?\d*)$/,"$1.").replace(/^0\./,s[1].length?"0.":".");if(s=t.match(/^#{1,3},##0(\.?)$/))return u+nn(Fn(f,0));if(s=t.match(/^#,##0\.([#0]*0)$/))return r<0?"-"+_r(e,t,-r):nn(""+(Math.floor(r)+_h(r,s[1].length)))+"."+Rr(tl(r,s[1].length),s[1].length);if(s=t.match(/^#,#*,#0/))return _r(e,t.replace(/^#,#*,/,""),r);if(s=t.match(/^([0#]+)(\\?-([0#]+))+$/))return i=Hn(_r(e,t.replace(/[\\-]/g,""),r)),a=0,Hn(Hn(t.replace(/\\/g,"")).replace(/[0#]/g,function(v){return a<i.length?i.charAt(a++):v==="0"?"0":""}));if(t.match(d0))return i=_r(e,"##########",r),"("+i.substr(0,3)+") "+i.substr(3,3)+"-"+i.substr(6);var d="";if(s=t.match(/^([#0?]+)( ?)\/( ?)([#0?]+)/))return a=Math.min(s[4].length,7),o=ls(f,Math.pow(10,a)-1,!1),i=""+u,d=Gr("n",s[1],o[1]),d.charAt(d.length-1)==" "&&(d=d.substr(0,d.length-1)+"0"),i+=d+s[2]+"/"+s[3],d=as(o[2],a),d.length<s[4].length&&(d=ar(s[4].substr(s[4].length-d.length))+d),i+=d,i;if(s=t.match(/^# ([#0?]+)( ?)\/( ?)([#0?]+)/))return a=Math.min(Math.max(s[1].length,s[4].length),7),o=ls(f,Math.pow(10,a)-1,!0),u+(o[0]||(o[1]?"":"0"))+" "+(o[1]?Ga(o[1],a)+s[2]+"/"+s[3]+as(o[2],a):Ot(" ",2*a+1+s[2].length+s[3].length));if(s=t.match(/^[#0?]+$/))return i=Fn(r,0),t.length<=i.length?i:ar(t.substr(0,t.length-i.length))+i;if(s=t.match(/^([#0?]+)\.([#0]+)$/)){i=""+r.toFixed(Math.min(s[2].length,10)).replace(/([^0])0+$/,"$1"),a=i.indexOf(".");var h=t.indexOf(".")-a,m=t.length-i.length-h;return ar(t.substr(0,h)+i+t.substr(t.length-m))}if(s=t.match(/^00,000\.([#0]*0)$/))return a=tl(r,s[1].length),r<0?"-"+_r(e,t,-r):nn(bh(r)).replace(/^\d,\d{3}$/,"0$&").replace(/^\d*$/,function(v){return"00,"+(v.length<3?Rr(0,3-v.length):"")+v})+"."+Rr(a,s[1].length);switch(t){case"###,##0.00":return _r(e,"#,##0.00",r);case"###,###":case"##,###":case"#,###":var l=nn(Fn(f,0));return l!=="0"?u+l:"";case"###,###.00":return _r(e,"###,##0.00",r).replace(/^0\./,".");case"#,###.00":return _r(e,"#,##0.00",r).replace(/^0\./,".")}throw new Error("unsupported format |"+t+"|")}function Ch(e,t,r){for(var n=t.length-1;t.charCodeAt(n-1)===44;)--n;return Gr(e,t.substr(0,n),r/Math.pow(10,3*(t.length-n)))}function Ah(e,t,r){var n=t.replace(o0,""),i=t.length-n.length;return Gr(e,n,r*Math.pow(10,2*i))+Ot("%",i)}function h0(e,t){var r,n=e.indexOf("E")-e.indexOf(".")-1;if(e.match(/^#+0.0E\+0$/)){if(t==0)return"0.0E+0";if(t<0)return"-"+h0(e,-t);var i=e.indexOf(".");i===-1&&(i=e.indexOf("E"));var s=Math.floor(Math.log(t)*Math.LOG10E)%i;if(s<0&&(s+=i),r=(t/Math.pow(10,s)).toPrecision(n+1+(i+s)%i),!r.match(/[Ee]/)){var a=Math.floor(Math.log(t)*Math.LOG10E);r.indexOf(".")===-1?r=r.charAt(0)+"."+r.substr(1)+"E+"+(a-r.length+s):r+="E+"+(a-s),r=r.replace(/\+-/,"-")}r=r.replace(/^([+-]?)(\d*)\.(\d*)[Ee]/,function(o,f,u,d){return f+u+d.substr(0,(i+s)%i)+"."+d.substr(s)+"E"})}else r=t.toExponential(n);return e.match(/E\+00$/)&&r.match(/e[+-]\d$/)&&(r=r.substr(0,r.length-1)+"0"+r.charAt(r.length-1)),e.match(/E\-/)&&r.match(/e\+/)&&(r=r.replace(/e\+/,"e")),r.replace("e","E")}function $r(e,t,r){if(e.charCodeAt(0)===40&&!t.match(f0)){var n=t.replace(/\( */,"").replace(/ \)/,"").replace(/\)/,"");return r>=0?$r("n",n,r):"("+$r("n",n,-r)+")"}if(t.charCodeAt(t.length-1)===44)return Ch(e,t,r);if(t.indexOf("%")!==-1)return Ah(e,t,r);if(t.indexOf("E")!==-1)return h0(t,r);if(t.charCodeAt(0)===36)return"$"+$r(e,t.substr(t.charAt(1)==" "?2:1),r);var i,s,a,o,f=Math.abs(r),u=r<0?"-":"";if(t.match(/^00+$/))return u+Rr(f,t.length);if(t.match(/^[#?]+$/))return i=""+r,r===0&&(i=""),i.length>t.length?i:ar(t.substr(0,t.length-i.length))+i;if(s=t.match(c0))return Eh(s,f,u);if(t.match(/^#+0+$/))return u+Rr(f,t.length-t.indexOf("0"));if(s=t.match(u0))return i=(""+r).replace(/^([^\.]+)$/,"$1."+ar(s[1])).replace(/\.$/,"."+ar(s[1])),i=i.replace(/\.(\d*)$/,function(v,g){return"."+g+Ot("0",ar(s[1]).length-g.length)}),t.indexOf("0.")!==-1?i:i.replace(/^0\./,".");if(t=t.replace(/^#+([0.])/,"$1"),s=t.match(/^(0*)\.(#*)$/))return u+(""+f).replace(/\.(\d*[1-9])0*$/,".$1").replace(/^(-?\d*)$/,"$1.").replace(/^0\./,s[1].length?"0.":".");if(s=t.match(/^#{1,3},##0(\.?)$/))return u+nn(""+f);if(s=t.match(/^#,##0\.([#0]*0)$/))return r<0?"-"+$r(e,t,-r):nn(""+r)+"."+Ot("0",s[1].length);if(s=t.match(/^#,#*,#0/))return $r(e,t.replace(/^#,#*,/,""),r);if(s=t.match(/^([0#]+)(\\?-([0#]+))+$/))return i=Hn($r(e,t.replace(/[\\-]/g,""),r)),a=0,Hn(Hn(t.replace(/\\/g,"")).replace(/[0#]/g,function(v){return a<i.length?i.charAt(a++):v==="0"?"0":""}));if(t.match(d0))return i=$r(e,"##########",r),"("+i.substr(0,3)+") "+i.substr(3,3)+"-"+i.substr(6);var d="";if(s=t.match(/^([#0?]+)( ?)\/( ?)([#0?]+)/))return a=Math.min(s[4].length,7),o=ls(f,Math.pow(10,a)-1,!1),i=""+u,d=Gr("n",s[1],o[1]),d.charAt(d.length-1)==" "&&(d=d.substr(0,d.length-1)+"0"),i+=d+s[2]+"/"+s[3],d=as(o[2],a),d.length<s[4].length&&(d=ar(s[4].substr(s[4].length-d.length))+d),i+=d,i;if(s=t.match(/^# ([#0?]+)( ?)\/( ?)([#0?]+)/))return a=Math.min(Math.max(s[1].length,s[4].length),7),o=ls(f,Math.pow(10,a)-1,!0),u+(o[0]||(o[1]?"":"0"))+" "+(o[1]?Ga(o[1],a)+s[2]+"/"+s[3]+as(o[2],a):Ot(" ",2*a+1+s[2].length+s[3].length));if(s=t.match(/^[#0?]+$/))return i=""+r,t.length<=i.length?i:ar(t.substr(0,t.length-i.length))+i;if(s=t.match(/^([#0]+)\.([#0]+)$/)){i=""+r.toFixed(Math.min(s[2].length,10)).replace(/([^0])0+$/,"$1"),a=i.indexOf(".");var h=t.indexOf(".")-a,m=t.length-i.length-h;return ar(t.substr(0,h)+i+t.substr(t.length-m))}if(s=t.match(/^00,000\.([#0]*0)$/))return r<0?"-"+$r(e,t,-r):nn(""+r).replace(/^\d,\d{3}$/,"0$&").replace(/^\d*$/,function(v){return"00,"+(v.length<3?Rr(0,3-v.length):"")+v})+"."+Rr(0,s[1].length);switch(t){case"###,###":case"##,###":case"#,###":var l=nn(""+f);return l!=="0"?u+l:"";default:if(t.match(/\.[0#?]*$/))return $r(e,t.slice(0,t.lastIndexOf(".")),r)+ar(t.slice(t.lastIndexOf(".")))}throw new Error("unsupported format |"+t+"|")}function Gr(e,t,r){return(r|0)===r?$r(e,t,r):_r(e,t,r)}function Oh(e){for(var t=[],r=!1,n=0,i=0;n<e.length;++n)switch(e.charCodeAt(n)){case 34:r=!r;break;case 95:case 42:case 92:++n;break;case 59:t[t.length]=e.substr(i,n-i),i=n+1}if(t[t.length]=e.substr(i),r===!0)throw new Error("Format |"+e+"| unterminated string ");return t}var p0=/\[[HhMmSs\u0E0A\u0E19\u0E17]*\]/;function g0(e){for(var t=0,r="",n="";t<e.length;)switch(r=e.charAt(t)){case"G":os(e,t)&&(t+=6),t++;break;case'"':for(;e.charCodeAt(++t)!==34&&t<e.length;);++t;break;case"\\":t+=2;break;case"_":t+=2;break;case"@":++t;break;case"B":case"b":if(e.charAt(t+1)==="1"||e.charAt(t+1)==="2")return!0;case"M":case"D":case"Y":case"H":case"S":case"E":case"m":case"d":case"y":case"h":case"s":case"e":case"g":return!0;case"A":case"a":case"上":if(e.substr(t,3).toUpperCase()==="A/P"||e.substr(t,5).toUpperCase()==="AM/PM"||e.substr(t,5).toUpperCase()==="上午/下午")return!0;++t;break;case"[":for(n=r;e.charAt(t++)!=="]"&&t<e.length;)n+=e.charAt(t);if(n.match(p0))return!0;break;case".":case"0":case"#":for(;t<e.length&&("0#?.,E+-%".indexOf(r=e.charAt(++t))>-1||r=="\\"&&e.charAt(t+1)=="-"&&"0#".indexOf(e.charAt(t+2))>-1););break;case"?":for(;e.charAt(++t)===r;);break;case"*":++t,(e.charAt(t)==" "||e.charAt(t)=="*")&&++t;break;case"(":case")":++t;break;case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":for(;t<e.length&&"0123456789".indexOf(e.charAt(++t))>-1;);break;case" ":++t;break;default:++t;break}return!1}function Dh(e,t,r,n){for(var i=[],s="",a=0,o="",f="t",u,d,h,m="H";a<e.length;)switch(o=e.charAt(a)){case"G":if(!os(e,a))throw new Error("unrecognized character "+o+" in "+e);i[i.length]={t:"G",v:"General"},a+=7;break;case'"':for(s="";(h=e.charCodeAt(++a))!==34&&a<e.length;)s+=String.fromCharCode(h);i[i.length]={t:"t",v:s},++a;break;case"\\":var l=e.charAt(++a),v=l==="("||l===")"?l:"t";i[i.length]={t:v,v:l},++a;break;case"_":i[i.length]={t:"t",v:" "},a+=2;break;case"@":i[i.length]={t:"T",v:t},++a;break;case"B":case"b":if(e.charAt(a+1)==="1"||e.charAt(a+1)==="2"){if(u==null&&(u=Ui(t,r,e.charAt(a+1)==="2"),u==null))return"";i[i.length]={t:"X",v:e.substr(a,2)},f=o,a+=2;break}case"M":case"D":case"Y":case"H":case"S":case"E":o=o.toLowerCase();case"m":case"d":case"y":case"h":case"s":case"e":case"g":if(t<0||u==null&&(u=Ui(t,r),u==null))return"";for(s=o;++a<e.length&&e.charAt(a).toLowerCase()===o;)s+=o;o==="m"&&f.toLowerCase()==="h"&&(o="M"),o==="h"&&(o=m),i[i.length]={t:o,v:s},f=o;break;case"A":case"a":case"上":var g={t:o,v:o};if(u==null&&(u=Ui(t,r)),e.substr(a,3).toUpperCase()==="A/P"?(u!=null&&(g.v=u.H>=12?"P":"A"),g.t="T",m="h",a+=3):e.substr(a,5).toUpperCase()==="AM/PM"?(u!=null&&(g.v=u.H>=12?"PM":"AM"),g.t="T",a+=5,m="h"):e.substr(a,5).toUpperCase()==="上午/下午"?(u!=null&&(g.v=u.H>=12?"下午":"上午"),g.t="T",a+=5,m="h"):(g.t="t",++a),u==null&&g.t==="T")return"";i[i.length]=g,f=o;break;case"[":for(s=o;e.charAt(a++)!=="]"&&a<e.length;)s+=e.charAt(a);if(s.slice(-1)!=="]")throw'unterminated "[" block: |'+s+"|";if(s.match(p0)){if(u==null&&(u=Ui(t,r),u==null))return"";i[i.length]={t:"Z",v:s.toLowerCase()},f=s.charAt(1)}else s.indexOf("$")>-1&&(s=(s.match(/\$([^-\[\]]*)/)||[])[1]||"$",g0(e)||(i[i.length]={t:"t",v:s}));break;case".":if(u!=null){for(s=o;++a<e.length&&(o=e.charAt(a))==="0";)s+=o;i[i.length]={t:"s",v:s};break}case"0":case"#":for(s=o;++a<e.length&&"0#?.,E+-%".indexOf(o=e.charAt(a))>-1;)s+=o;i[i.length]={t:"n",v:s};break;case"?":for(s=o;e.charAt(++a)===o;)s+=o;i[i.length]={t:o,v:s},f=o;break;case"*":++a,(e.charAt(a)==" "||e.charAt(a)=="*")&&++a;break;case"(":case")":i[i.length]={t:n===1?"t":o,v:o},++a;break;case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":for(s=o;a<e.length&&"0123456789".indexOf(e.charAt(++a))>-1;)s+=e.charAt(a);i[i.length]={t:"D",v:s};break;case" ":i[i.length]={t:o,v:o},++a;break;case"$":i[i.length]={t:"t",v:"$"},++a;break;default:if(",$-+/():!^&'~{}<>=€acfijklopqrtuvwxzP".indexOf(o)===-1)throw new Error("unrecognized character "+o+" in "+e);i[i.length]={t:"t",v:o},++a;break}var x=0,T=0,b;for(a=i.length-1,f="t";a>=0;--a)switch(i[a].t){case"h":case"H":i[a].t=m,f="h",x<1&&(x=1);break;case"s":(b=i[a].v.match(/\.0+$/))&&(T=Math.max(T,b[0].length-1)),x<3&&(x=3);case"d":case"y":case"M":case"e":f=i[a].t;break;case"m":f==="s"&&(i[a].t="M",x<2&&(x=2));break;case"X":break;case"Z":x<1&&i[a].v.match(/[Hh]/)&&(x=1),x<2&&i[a].v.match(/[Mm]/)&&(x=2),x<3&&i[a].v.match(/[Ss]/)&&(x=3)}switch(x){case 0:break;case 1:u.u>=.5&&(u.u=0,++u.S),u.S>=60&&(u.S=0,++u.M),u.M>=60&&(u.M=0,++u.H);break;case 2:u.u>=.5&&(u.u=0,++u.S),u.S>=60&&(u.S=0,++u.M);break}var _="",k;for(a=0;a<i.length;++a)switch(i[a].t){case"t":case"T":case" ":case"D":break;case"X":i[a].v="",i[a].t=";";break;case"d":case"m":case"y":case"h":case"H":case"M":case"s":case"e":case"b":case"Z":i[a].v=yh(i[a].t.charCodeAt(0),i[a].v,u,T),i[a].t="t";break;case"n":case"?":for(k=a+1;i[k]!=null&&((o=i[k].t)==="?"||o==="D"||(o===" "||o==="t")&&i[k+1]!=null&&(i[k+1].t==="?"||i[k+1].t==="t"&&i[k+1].v==="/")||i[a].t==="("&&(o===" "||o==="n"||o===")")||o==="t"&&(i[k].v==="/"||i[k].v===" "&&i[k+1]!=null&&i[k+1].t=="?"));)i[a].v+=i[k].v,i[k]={v:"",t:";"},++k;_+=i[a].v,a=k-1;break;case"G":i[a].t="t",i[a].v=Ca(t,r);break}var F="",z,N;if(_.length>0){_.charCodeAt(0)==40?(z=t<0&&_.charCodeAt(0)===45?-t:t,N=Gr("n",_,z)):(z=t<0&&n>1?-t:t,N=Gr("n",_,z),z<0&&i[0]&&i[0].t=="t"&&(N=N.substr(1),i[0].v="-"+i[0].v)),k=N.length-1;var B=i.length;for(a=0;a<i.length;++a)if(i[a]!=null&&i[a].t!="t"&&i[a].v.indexOf(".")>-1){B=a;break}var M=i.length;if(B===i.length&&N.indexOf("E")===-1){for(a=i.length-1;a>=0;--a)i[a]==null||"n?".indexOf(i[a].t)===-1||(k>=i[a].v.length-1?(k-=i[a].v.length,i[a].v=N.substr(k+1,i[a].v.length)):k<0?i[a].v="":(i[a].v=N.substr(0,k+1),k=-1),i[a].t="t",M=a);k>=0&&M<i.length&&(i[M].v=N.substr(0,k+1)+i[M].v)}else if(B!==i.length&&N.indexOf("E")===-1){for(k=N.indexOf(".")-1,a=B;a>=0;--a)if(!(i[a]==null||"n?".indexOf(i[a].t)===-1)){for(d=i[a].v.indexOf(".")>-1&&a===B?i[a].v.indexOf(".")-1:i[a].v.length-1,F=i[a].v.substr(d+1);d>=0;--d)k>=0&&(i[a].v.charAt(d)==="0"||i[a].v.charAt(d)==="#")&&(F=N.charAt(k--)+F);i[a].v=F,i[a].t="t",M=a}for(k>=0&&M<i.length&&(i[M].v=N.substr(0,k+1)+i[M].v),k=N.indexOf(".")+1,a=B;a<i.length;++a)if(!(i[a]==null||"n?(".indexOf(i[a].t)===-1&&a!==B)){for(d=i[a].v.indexOf(".")>-1&&a===B?i[a].v.indexOf(".")+1:0,F=i[a].v.substr(0,d);d<i[a].v.length;++d)k<N.length&&(F+=N.charAt(k++));i[a].v=F,i[a].t="t",M=a}}}for(a=0;a<i.length;++a)i[a]!=null&&"n?".indexOf(i[a].t)>-1&&(z=n>1&&t<0&&a>0&&i[a-1].v==="-"?-t:t,i[a].v=Gr(i[a].t,i[a].v,z),i[a].t="t");var L="";for(a=0;a!==i.length;++a)i[a]!=null&&(L+=i[a].v);return L}var rl=/\[(=|>[=]?|<[>=]?)(-?\d+(?:\.\d*)?)\]/;function nl(e,t){if(t==null)return!1;var r=parseFloat(t[2]);switch(t[1]){case"=":if(e==r)return!0;break;case">":if(e>r)return!0;break;case"<":if(e<r)return!0;break;case"<>":if(e!=r)return!0;break;case">=":if(e>=r)return!0;break;case"<=":if(e<=r)return!0;break}return!1}function kh(e,t){var r=Oh(e),n=r.length,i=r[n-1].indexOf("@");if(n<4&&i>-1&&--n,r.length>4)throw new Error("cannot find right format for |"+r.join("|")+"|");if(typeof t!="number")return[4,r.length===4||i>-1?r[r.length-1]:"@"];switch(r.length){case 1:r=i>-1?["General","General","General",r[0]]:[r[0],r[0],r[0],"@"];break;case 2:r=i>-1?[r[0],r[0],r[0],r[1]]:[r[0],r[1],r[0],"@"];break;case 3:r=i>-1?[r[0],r[1],r[0],r[2]]:[r[0],r[1],r[2],"@"];break}var s=t>0?r[0]:t<0?r[1]:r[2];if(r[0].indexOf("[")===-1&&r[1].indexOf("[")===-1)return[n,s];if(r[0].match(/\[[=<>]/)!=null||r[1].match(/\[[=<>]/)!=null){var a=r[0].match(rl),o=r[1].match(rl);return nl(t,a)?[n,r[0]]:nl(t,o)?[n,r[1]]:[n,r[a!=null&&o!=null?2:1]]}return[n,s]}function an(e,t,r){r==null&&(r={});var n="";switch(typeof e){case"string":e=="m/d/yy"&&r.dateNF?n=r.dateNF:n=e;break;case"number":e==14&&r.dateNF?n=r.dateNF:n=(r.table!=null?r.table:Dt)[e],n==null&&(n=r.table&&r.table[Qo[e]]||Dt[Qo[e]]),n==null&&(n=fh[e]||"General");break}if(os(n,0))return Ca(t,r);t instanceof Date&&(t=a0(t,r.date1904));var i=kh(n,t);if(os(i[1]))return Ca(t,r);if(t===!0)t="TRUE";else if(t===!1)t="FALSE";else if(t===""||t==null)return"";return Dh(i[1],t,r,i[0])}function m0(e,t){if(typeof t!="number"){t=+t||-1;for(var r=0;r<392;++r){if(Dt[r]==null){t<0&&(t=r);continue}if(Dt[r]==e){t=r;break}}t<0&&(t=391)}return Dt[t]=e,t}function _s(e){for(var t=0;t!=392;++t)e[t]!==void 0&&m0(e[t],t)}function bs(){Dt=uh()}var x0=/[dD]+|[mM]+|[yYeE]+|[Hh]+|[Ss]+/g;function Ih(e){var t=typeof e=="number"?Dt[e]:e;return t=t.replace(x0,"(\\d+)"),new RegExp("^"+t+"$")}function Fh(e,t,r){var n=-1,i=-1,s=-1,a=-1,o=-1,f=-1;(t.match(x0)||[]).forEach(function(h,m){var l=parseInt(r[m+1],10);switch(h.toLowerCase().charAt(0)){case"y":n=l;break;case"d":s=l;break;case"h":a=l;break;case"s":f=l;break;case"m":a>=0?o=l:i=l;break}}),f>=0&&o==-1&&i>=0&&(o=i,i=-1);var u=(""+(n>=0?n:new Date().getFullYear())).slice(-4)+"-"+("00"+(i>=1?i:1)).slice(-2)+"-"+("00"+(s>=1?s:1)).slice(-2);u.length==7&&(u="0"+u),u.length==8&&(u="20"+u);var d=("00"+(a>=0?a:0)).slice(-2)+":"+("00"+(o>=0?o:0)).slice(-2)+":"+("00"+(f>=0?f:0)).slice(-2);return a==-1&&o==-1&&f==-1?u:n==-1&&i==-1&&s==-1?d:u+"T"+d}var Nh=(function(){var e={};e.version="1.2.0";function t(){for(var N=0,B=new Array(256),M=0;M!=256;++M)N=M,N=N&1?-306674912^N>>>1:N>>>1,N=N&1?-306674912^N>>>1:N>>>1,N=N&1?-306674912^N>>>1:N>>>1,N=N&1?-306674912^N>>>1:N>>>1,N=N&1?-306674912^N>>>1:N>>>1,N=N&1?-306674912^N>>>1:N>>>1,N=N&1?-306674912^N>>>1:N>>>1,N=N&1?-306674912^N>>>1:N>>>1,B[M]=N;return typeof Int32Array<"u"?new Int32Array(B):B}var r=t();function n(N){var B=0,M=0,L=0,W=typeof Int32Array<"u"?new Int32Array(4096):new Array(4096);for(L=0;L!=256;++L)W[L]=N[L];for(L=0;L!=256;++L)for(M=N[L],B=256+L;B<4096;B+=256)M=W[B]=M>>>8^N[M&255];var y=[];for(L=1;L!=16;++L)y[L-1]=typeof Int32Array<"u"?W.subarray(L*256,L*256+256):W.slice(L*256,L*256+256);return y}var i=n(r),s=i[0],a=i[1],o=i[2],f=i[3],u=i[4],d=i[5],h=i[6],m=i[7],l=i[8],v=i[9],g=i[10],x=i[11],T=i[12],b=i[13],_=i[14];function k(N,B){for(var M=B^-1,L=0,W=N.length;L<W;)M=M>>>8^r[(M^N.charCodeAt(L++))&255];return~M}function F(N,B){for(var M=B^-1,L=N.length-15,W=0;W<L;)M=_[N[W++]^M&255]^b[N[W++]^M>>8&255]^T[N[W++]^M>>16&255]^x[N[W++]^M>>>24]^g[N[W++]]^v[N[W++]]^l[N[W++]]^m[N[W++]]^h[N[W++]]^d[N[W++]]^u[N[W++]]^f[N[W++]]^o[N[W++]]^a[N[W++]]^s[N[W++]]^r[N[W++]];for(L+=15;W<L;)M=M>>>8^r[(M^N[W++])&255];return~M}function z(N,B){for(var M=B^-1,L=0,W=N.length,y=0,H=0;L<W;)y=N.charCodeAt(L++),y<128?M=M>>>8^r[(M^y)&255]:y<2048?(M=M>>>8^r[(M^(192|y>>6&31))&255],M=M>>>8^r[(M^(128|y&63))&255]):y>=55296&&y<57344?(y=(y&1023)+64,H=N.charCodeAt(L++)&1023,M=M>>>8^r[(M^(240|y>>8&7))&255],M=M>>>8^r[(M^(128|y>>2&63))&255],M=M>>>8^r[(M^(128|H>>6&15|(y&3)<<4))&255],M=M>>>8^r[(M^(128|H&63))&255]):(M=M>>>8^r[(M^(224|y>>12&15))&255],M=M>>>8^r[(M^(128|y>>6&63))&255],M=M>>>8^r[(M^(128|y&63))&255]);return~M}return e.table=r,e.bstr=k,e.buf=F,e.str=z,e})(),ht=(function(){var t={};t.version="1.2.1";function r(w,O){for(var E=w.split("/"),A=O.split("/"),D=0,I=0,Y=Math.min(E.length,A.length);D<Y;++D){if(I=E[D].length-A[D].length)return I;if(E[D]!=A[D])return E[D]<A[D]?-1:1}return E.length-A.length}function n(w){if(w.charAt(w.length-1)=="/")return w.slice(0,-1).indexOf("/")===-1?w:n(w.slice(0,-1));var O=w.lastIndexOf("/");return O===-1?w:w.slice(0,O+1)}function i(w){if(w.charAt(w.length-1)=="/")return i(w.slice(0,-1));var O=w.lastIndexOf("/");return O===-1?w:w.slice(O+1)}function s(w,O){typeof O=="string"&&(O=new Date(O));var E=O.getHours();E=E<<6|O.getMinutes(),E=E<<5|O.getSeconds()>>>1,w.write_shift(2,E);var A=O.getFullYear()-1980;A=A<<4|O.getMonth()+1,A=A<<5|O.getDate(),w.write_shift(2,A)}function a(w){var O=w.read_shift(2)&65535,E=w.read_shift(2)&65535,A=new Date,D=E&31;E>>>=5;var I=E&15;E>>>=4,A.setMilliseconds(0),A.setFullYear(E+1980),A.setMonth(I-1),A.setDate(D);var Y=O&31;O>>>=5;var ne=O&63;return O>>>=6,A.setHours(O),A.setMinutes(ne),A.setSeconds(Y<<1),A}function o(w){xr(w,0);for(var O={},E=0;w.l<=w.length-4;){var A=w.read_shift(2),D=w.read_shift(2),I=w.l+D,Y={};switch(A){case 21589:E=w.read_shift(1),E&1&&(Y.mtime=w.read_shift(4)),D>5&&(E&2&&(Y.atime=w.read_shift(4)),E&4&&(Y.ctime=w.read_shift(4))),Y.mtime&&(Y.mt=new Date(Y.mtime*1e3));break}w.l=I,O[A]=Y}return O}var f;function u(){return f||(f={})}function d(w,O){if(w[0]==80&&w[1]==75)return ir(w,O);if((w[0]|32)==109&&(w[1]|32)==105)return yt(w,O);if(w.length<512)throw new Error("CFB file size "+w.length+" < 512");var E=3,A=512,D=0,I=0,Y=0,ne=0,G=0,X=[],K=w.slice(0,512);xr(K,0);var ge=h(K);switch(E=ge[0],E){case 3:A=512;break;case 4:A=4096;break;case 0:if(ge[1]==0)return ir(w,O);default:throw new Error("Major Version: Expected 3 or 4 saw "+E)}A!==512&&(K=w.slice(0,A),xr(K,28));var ye=w.slice(0,A);m(K,E);var Ee=K.read_shift(4,"i");if(E===3&&Ee!==0)throw new Error("# Directory Sectors: Expected 0 saw "+Ee);K.l+=4,Y=K.read_shift(4,"i"),K.l+=4,K.chk("00100000","Mini Stream Cutoff Size: "),ne=K.read_shift(4,"i"),D=K.read_shift(4,"i"),G=K.read_shift(4,"i"),I=K.read_shift(4,"i");for(var me=-1,Se=0;Se<109&&(me=K.read_shift(4,"i"),!(me<0));++Se)X[Se]=me;var Ne=l(w,A);x(G,I,Ne,A,X);var Ve=b(Ne,Y,X,A);Ve[Y].name="!Directory",D>0&&ne!==H&&(Ve[ne].name="!MiniFAT"),Ve[X[0]].name="!FAT",Ve.fat_addrs=X,Ve.ssz=A;var ze={},Ut=[],dn=[],hn=[];_(Y,Ve,Ne,Ut,D,ze,dn,ne),v(dn,hn,Ut),Ut.shift();var pn={FileIndex:dn,FullPaths:hn};return O&&O.raw&&(pn.raw={header:ye,sectors:Ne}),pn}function h(w){if(w[w.l]==80&&w[w.l+1]==75)return[0,0];w.chk(Q,"Header Signature: "),w.l+=16;var O=w.read_shift(2,"u");return[w.read_shift(2,"u"),O]}function m(w,O){var E=9;switch(w.l+=2,E=w.read_shift(2)){case 9:if(O!=3)throw new Error("Sector Shift: Expected 9 saw "+E);break;case 12:if(O!=4)throw new Error("Sector Shift: Expected 12 saw "+E);break;default:throw new Error("Sector Shift: Expected 9 or 12 saw "+E)}w.chk("0600","Mini Sector Shift: "),w.chk("000000000000","Reserved: ")}function l(w,O){for(var E=Math.ceil(w.length/O)-1,A=[],D=1;D<E;++D)A[D-1]=w.slice(D*O,(D+1)*O);return A[E-1]=w.slice(E*O),A}function v(w,O,E){for(var A=0,D=0,I=0,Y=0,ne=0,G=E.length,X=[],K=[];A<G;++A)X[A]=K[A]=A,O[A]=E[A];for(;ne<K.length;++ne)A=K[ne],D=w[A].L,I=w[A].R,Y=w[A].C,X[A]===A&&(D!==-1&&X[D]!==D&&(X[A]=X[D]),I!==-1&&X[I]!==I&&(X[A]=X[I])),Y!==-1&&(X[Y]=A),D!==-1&&A!=X[A]&&(X[D]=X[A],K.lastIndexOf(D)<ne&&K.push(D)),I!==-1&&A!=X[A]&&(X[I]=X[A],K.lastIndexOf(I)<ne&&K.push(I));for(A=1;A<G;++A)X[A]===A&&(I!==-1&&X[I]!==I?X[A]=X[I]:D!==-1&&X[D]!==D&&(X[A]=X[D]));for(A=1;A<G;++A)if(w[A].type!==0){if(ne=A,ne!=X[ne])do ne=X[ne],O[A]=O[ne]+"/"+O[A];while(ne!==0&&X[ne]!==-1&&ne!=X[ne]);X[A]=-1}for(O[0]+="/",A=1;A<G;++A)w[A].type!==2&&(O[A]+="/")}function g(w,O,E){for(var A=w.start,D=w.size,I=[],Y=A;E&&D>0&&Y>=0;)I.push(O.slice(Y*y,Y*y+y)),D-=y,Y=mn(E,Y*4);return I.length===0?re(0):Jt(I).slice(0,w.size)}function x(w,O,E,A,D){var I=H;if(w===H){if(O!==0)throw new Error("DIFAT chain shorter than expected")}else if(w!==-1){var Y=E[w],ne=(A>>>2)-1;if(!Y)return;for(var G=0;G<ne&&(I=mn(Y,G*4))!==H;++G)D.push(I);x(mn(Y,A-4),O-1,E,A,D)}}function T(w,O,E,A,D){var I=[],Y=[];D||(D=[]);var ne=A-1,G=0,X=0;for(G=O;G>=0;){D[G]=!0,I[I.length]=G,Y.push(w[G]);var K=E[Math.floor(G*4/A)];if(X=G*4&ne,A<4+X)throw new Error("FAT boundary crossed: "+G+" 4 "+A);if(!w[K])break;G=mn(w[K],X)}return{nodes:I,data:fl([Y])}}function b(w,O,E,A){var D=w.length,I=[],Y=[],ne=[],G=[],X=A-1,K=0,ge=0,ye=0,Ee=0;for(K=0;K<D;++K)if(ne=[],ye=K+O,ye>=D&&(ye-=D),!Y[ye]){G=[];var me=[];for(ge=ye;ge>=0;){me[ge]=!0,Y[ge]=!0,ne[ne.length]=ge,G.push(w[ge]);var Se=E[Math.floor(ge*4/A)];if(Ee=ge*4&X,A<4+Ee)throw new Error("FAT boundary crossed: "+ge+" 4 "+A);if(!w[Se]||(ge=mn(w[Se],Ee),me[ge]))break}I[ye]={nodes:ne,data:fl([G])}}return I}function _(w,O,E,A,D,I,Y,ne){for(var G=0,X=A.length?2:0,K=O[w].data,ge=0,ye=0,Ee;ge<K.length;ge+=128){var me=K.slice(ge,ge+128);xr(me,64),ye=me.read_shift(2),Ee=Za(me,0,ye-X),A.push(Ee);var Se={name:Ee,type:me.read_shift(1),color:me.read_shift(1),L:me.read_shift(4,"i"),R:me.read_shift(4,"i"),C:me.read_shift(4,"i"),clsid:me.read_shift(16),state:me.read_shift(4,"i"),start:0,size:0},Ne=me.read_shift(2)+me.read_shift(2)+me.read_shift(2)+me.read_shift(2);Ne!==0&&(Se.ct=k(me,me.l-8));var Ve=me.read_shift(2)+me.read_shift(2)+me.read_shift(2)+me.read_shift(2);Ve!==0&&(Se.mt=k(me,me.l-8)),Se.start=me.read_shift(4,"i"),Se.size=me.read_shift(4,"i"),Se.size<0&&Se.start<0&&(Se.size=Se.type=0,Se.start=H,Se.name=""),Se.type===5?(G=Se.start,D>0&&G!==H&&(O[G].name="!StreamData")):Se.size>=4096?(Se.storage="fat",O[Se.start]===void 0&&(O[Se.start]=T(E,Se.start,O.fat_addrs,O.ssz)),O[Se.start].name=Se.name,Se.content=O[Se.start].data.slice(0,Se.size)):(Se.storage="minifat",Se.size<0?Se.size=0:G!==H&&Se.start!==H&&O[G]&&(Se.content=g(Se,O[G].data,(O[ne]||{}).data))),Se.content&&xr(Se.content,0),I[Ee]=Se,Y.push(Se)}}function k(w,O){return new Date((yr(w,O+4)/1e7*Math.pow(2,32)+yr(w,O)/1e7-11644473600)*1e3)}function F(w,O){return u(),d(f.readFileSync(w),O)}function z(w,O){var E=O&&O.type;switch(E||Ze&&Buffer.isBuffer(w)&&(E="buffer"),E||"base64"){case"file":return F(w,O);case"base64":return d(Nr(Kr(w)),O);case"binary":return d(Nr(w),O)}return d(w,O)}function N(w,O){var E=O||{},A=E.root||"Root Entry";if(w.FullPaths||(w.FullPaths=[]),w.FileIndex||(w.FileIndex=[]),w.FullPaths.length!==w.FileIndex.length)throw new Error("inconsistent CFB structure");w.FullPaths.length===0&&(w.FullPaths[0]=A+"/",w.FileIndex[0]={name:A,type:5}),E.CLSID&&(w.FileIndex[0].clsid=E.CLSID),B(w)}function B(w){var O="Sh33tJ5";if(!ht.find(w,"/"+O)){var E=re(4);E[0]=55,E[1]=E[3]=50,E[2]=54,w.FileIndex.push({name:O,type:2,content:E,size:4,L:69,R:69,C:69}),w.FullPaths.push(w.FullPaths[0]+O),M(w)}}function M(w,O){N(w);for(var E=!1,A=!1,D=w.FullPaths.length-1;D>=0;--D){var I=w.FileIndex[D];switch(I.type){case 0:A?E=!0:(w.FileIndex.pop(),w.FullPaths.pop());break;case 1:case 2:case 5:A=!0,isNaN(I.R*I.L*I.C)&&(E=!0),I.R>-1&&I.L>-1&&I.R==I.L&&(E=!0);break;default:E=!0;break}}if(!(!E&&!O)){var Y=new Date(1987,1,19),ne=0,G=Object.create?Object.create(null):{},X=[];for(D=0;D<w.FullPaths.length;++D)G[w.FullPaths[D]]=!0,w.FileIndex[D].type!==0&&X.push([w.FullPaths[D],w.FileIndex[D]]);for(D=0;D<X.length;++D){var K=n(X[D][0]);A=G[K],A||(X.push([K,{name:i(K).replace("/",""),type:1,clsid:ee,ct:Y,mt:Y,content:null}]),G[K]=!0)}for(X.sort(function(Ee,me){return r(Ee[0],me[0])}),w.FullPaths=[],w.FileIndex=[],D=0;D<X.length;++D)w.FullPaths[D]=X[D][0],w.FileIndex[D]=X[D][1];for(D=0;D<X.length;++D){var ge=w.FileIndex[D],ye=w.FullPaths[D];if(ge.name=i(ye).replace("/",""),ge.L=ge.R=ge.C=-(ge.color=1),ge.size=ge.content?ge.content.length:0,ge.start=0,ge.clsid=ge.clsid||ee,D===0)ge.C=X.length>1?1:-1,ge.size=0,ge.type=5;else if(ye.slice(-1)=="/"){for(ne=D+1;ne<X.length&&n(w.FullPaths[ne])!=ye;++ne);for(ge.C=ne>=X.length?-1:ne,ne=D+1;ne<X.length&&n(w.FullPaths[ne])!=n(ye);++ne);ge.R=ne>=X.length?-1:ne,ge.type=1}else n(w.FullPaths[D+1]||"")==n(ye)&&(ge.R=D+1),ge.type=2}}}function L(w,O){var E=O||{};if(E.fileType=="mad")return xt(w,E);switch(M(w),E.fileType){case"zip":return tr(w,E)}var A=(function(Ee){for(var me=0,Se=0,Ne=0;Ne<Ee.FileIndex.length;++Ne){var Ve=Ee.FileIndex[Ne];if(Ve.content){var ze=Ve.content.length;ze>0&&(ze<4096?me+=ze+63>>6:Se+=ze+511>>9)}}for(var Ut=Ee.FullPaths.length+3>>2,dn=me+7>>3,hn=me+127>>7,pn=dn+Se+Ut+hn,Vr=pn+127>>7,ni=Vr<=109?0:Math.ceil((Vr-109)/127);pn+Vr+ni+127>>7>Vr;)ni=++Vr<=109?0:Math.ceil((Vr-109)/127);var kr=[1,ni,Vr,hn,Ut,Se,me,0];return Ee.FileIndex[0].size=me<<6,kr[7]=(Ee.FileIndex[0].start=kr[0]+kr[1]+kr[2]+kr[3]+kr[4]+kr[5])+(kr[6]+7>>3),kr})(w),D=re(A[7]<<9),I=0,Y=0;{for(I=0;I<8;++I)D.write_shift(1,J[I]);for(I=0;I<8;++I)D.write_shift(2,0);for(D.write_shift(2,62),D.write_shift(2,3),D.write_shift(2,65534),D.write_shift(2,9),D.write_shift(2,6),I=0;I<3;++I)D.write_shift(2,0);for(D.write_shift(4,0),D.write_shift(4,A[2]),D.write_shift(4,A[0]+A[1]+A[2]+A[3]-1),D.write_shift(4,0),D.write_shift(4,4096),D.write_shift(4,A[3]?A[0]+A[1]+A[2]-1:H),D.write_shift(4,A[3]),D.write_shift(-4,A[1]?A[0]-1:H),D.write_shift(4,A[1]),I=0;I<109;++I)D.write_shift(-4,I<A[2]?A[1]+I:-1)}if(A[1])for(Y=0;Y<A[1];++Y){for(;I<236+Y*127;++I)D.write_shift(-4,I<A[2]?A[1]+I:-1);D.write_shift(-4,Y===A[1]-1?H:Y+1)}var ne=function(Ee){for(Y+=Ee;I<Y-1;++I)D.write_shift(-4,I+1);Ee&&(++I,D.write_shift(-4,H))};for(Y=I=0,Y+=A[1];I<Y;++I)D.write_shift(-4,_e.DIFSECT);for(Y+=A[2];I<Y;++I)D.write_shift(-4,_e.FATSECT);ne(A[3]),ne(A[4]);for(var G=0,X=0,K=w.FileIndex[0];G<w.FileIndex.length;++G)K=w.FileIndex[G],K.content&&(X=K.content.length,!(X<4096)&&(K.start=Y,ne(X+511>>9)));for(ne(A[6]+7>>3);D.l&511;)D.write_shift(-4,_e.ENDOFCHAIN);for(Y=I=0,G=0;G<w.FileIndex.length;++G)K=w.FileIndex[G],K.content&&(X=K.content.length,!(!X||X>=4096)&&(K.start=Y,ne(X+63>>6)));for(;D.l&511;)D.write_shift(-4,_e.ENDOFCHAIN);for(I=0;I<A[4]<<2;++I){var ge=w.FullPaths[I];if(!ge||ge.length===0){for(G=0;G<17;++G)D.write_shift(4,0);for(G=0;G<3;++G)D.write_shift(4,-1);for(G=0;G<12;++G)D.write_shift(4,0);continue}K=w.FileIndex[I],I===0&&(K.start=K.size?K.start-1:H);var ye=I===0&&E.root||K.name;if(X=2*(ye.length+1),D.write_shift(64,ye,"utf16le"),D.write_shift(2,X),D.write_shift(1,K.type),D.write_shift(1,K.color),D.write_shift(-4,K.L),D.write_shift(-4,K.R),D.write_shift(-4,K.C),K.clsid)D.write_shift(16,K.clsid,"hex");else for(G=0;G<4;++G)D.write_shift(4,0);D.write_shift(4,K.state||0),D.write_shift(4,0),D.write_shift(4,0),D.write_shift(4,0),D.write_shift(4,0),D.write_shift(4,K.start),D.write_shift(4,K.size),D.write_shift(4,0)}for(I=1;I<w.FileIndex.length;++I)if(K=w.FileIndex[I],K.size>=4096)if(D.l=K.start+1<<9,Ze&&Buffer.isBuffer(K.content))K.content.copy(D,D.l,0,K.size),D.l+=K.size+511&-512;else{for(G=0;G<K.size;++G)D.write_shift(1,K.content[G]);for(;G&511;++G)D.write_shift(1,0)}for(I=1;I<w.FileIndex.length;++I)if(K=w.FileIndex[I],K.size>0&&K.size<4096)if(Ze&&Buffer.isBuffer(K.content))K.content.copy(D,D.l,0,K.size),D.l+=K.size+63&-64;else{for(G=0;G<K.size;++G)D.write_shift(1,K.content[G]);for(;G&63;++G)D.write_shift(1,0)}if(Ze)D.l=D.length;else for(;D.l<D.length;)D.write_shift(1,0);return D}function W(w,O){var E=w.FullPaths.map(function(G){return G.toUpperCase()}),A=E.map(function(G){var X=G.split("/");return X[X.length-(G.slice(-1)=="/"?2:1)]}),D=!1;O.charCodeAt(0)===47?(D=!0,O=E[0].slice(0,-1)+O):D=O.indexOf("/")!==-1;var I=O.toUpperCase(),Y=D===!0?E.indexOf(I):A.indexOf(I);if(Y!==-1)return w.FileIndex[Y];var ne=!I.match($i);for(I=I.replace(ui,""),ne&&(I=I.replace($i,"!")),Y=0;Y<E.length;++Y)if((ne?E[Y].replace($i,"!"):E[Y]).replace(ui,"")==I||(ne?A[Y].replace($i,"!"):A[Y]).replace(ui,"")==I)return w.FileIndex[Y];return null}var y=64,H=-2,Q="d0cf11e0a1b11ae1",J=[208,207,17,224,161,177,26,225],ee="00000000000000000000000000000000",_e={MAXREGSECT:-6,DIFSECT:-4,FATSECT:-3,ENDOFCHAIN:H,FREESECT:-1,HEADER_SIGNATURE:Q,HEADER_MINOR_VERSION:"3e00",MAXREGSID:-6,NOSTREAM:-1,HEADER_CLSID:ee,EntryTypes:["unknown","storage","stream","lockbytes","property","root"]};function Ae(w,O,E){u();var A=L(w,E);f.writeFileSync(O,A)}function De(w){for(var O=new Array(w.length),E=0;E<w.length;++E)O[E]=String.fromCharCode(w[E]);return O.join("")}function oe(w,O){var E=L(w,O);switch(O&&O.type||"buffer"){case"file":return u(),f.writeFileSync(O.filename,E),E;case"binary":return typeof E=="string"?E:De(E);case"base64":return yi(typeof E=="string"?E:De(E));case"buffer":if(Ze)return Buffer.isBuffer(E)?E:Zr(E);case"array":return typeof E=="string"?Nr(E):E}return E}var ce;function C(w){try{var O=w.InflateRaw,E=new O;if(E._processChunk(new Uint8Array([3,0]),E._finishFlushFlag),E.bytesRead)ce=w;else throw new Error("zlib does not expose bytesRead")}catch(A){console.error("cannot use native zlib: "+(A.message||A))}}function j(w,O){if(!ce)return pr(w,O);var E=ce.InflateRaw,A=new E,D=A._processChunk(w.slice(w.l),A._finishFlushFlag);return w.l+=A.bytesRead,D}function R(w){return ce?ce.deflateRawSync(w):qe(w)}var P=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],V=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258],le=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577];function fe(w){var O=(w<<1|w<<11)&139536|(w<<5|w<<15)&558144;return(O>>16|O>>8|O)&255}for(var ue=typeof Uint8Array<"u",te=ue?new Uint8Array(256):[],Ie=0;Ie<256;++Ie)te[Ie]=fe(Ie);function ae(w,O){var E=te[w&255];return O<=8?E>>>8-O:(E=E<<8|te[w>>8&255],O<=16?E>>>16-O:(E=E<<8|te[w>>16&255],E>>>24-O))}function Pe(w,O){var E=O&7,A=O>>>3;return(w[A]|(E<=6?0:w[A+1]<<8))>>>E&3}function ke(w,O){var E=O&7,A=O>>>3;return(w[A]|(E<=5?0:w[A+1]<<8))>>>E&7}function pt(w,O){var E=O&7,A=O>>>3;return(w[A]|(E<=4?0:w[A+1]<<8))>>>E&15}function He(w,O){var E=O&7,A=O>>>3;return(w[A]|(E<=3?0:w[A+1]<<8))>>>E&31}function we(w,O){var E=O&7,A=O>>>3;return(w[A]|(E<=1?0:w[A+1]<<8))>>>E&127}function ut(w,O,E){var A=O&7,D=O>>>3,I=(1<<E)-1,Y=w[D]>>>A;return E<8-A||(Y|=w[D+1]<<8-A,E<16-A)||(Y|=w[D+2]<<16-A,E<24-A)||(Y|=w[D+3]<<24-A),Y&I}function je(w,O,E){var A=O&7,D=O>>>3;return A<=5?w[D]|=(E&7)<<A:(w[D]|=E<<A&255,w[D+1]=(E&7)>>8-A),O+3}function Rt(w,O,E){var A=O&7,D=O>>>3;return E=(E&1)<<A,w[D]|=E,O+1}function vt(w,O,E){var A=O&7,D=O>>>3;return E<<=A,w[D]|=E&255,E>>>=8,w[D+1]=E,O+8}function rt(w,O,E){var A=O&7,D=O>>>3;return E<<=A,w[D]|=E&255,E>>>=8,w[D+1]=E&255,w[D+2]=E>>>8,O+16}function kt(w,O){var E=w.length,A=2*E>O?2*E:O+5,D=0;if(E>=O)return w;if(Ze){var I=qo(A);if(w.copy)w.copy(I);else for(;D<w.length;++D)I[D]=w[D];return I}else if(ue){var Y=new Uint8Array(A);if(Y.set)Y.set(w);else for(;D<E;++D)Y[D]=w[D];return Y}return w.length=A,w}function Xe(w){for(var O=new Array(w),E=0;E<w;++E)O[E]=0;return O}function Ht(w,O,E){var A=1,D=0,I=0,Y=0,ne=0,G=w.length,X=ue?new Uint16Array(32):Xe(32);for(I=0;I<32;++I)X[I]=0;for(I=G;I<E;++I)w[I]=0;G=w.length;var K=ue?new Uint16Array(G):Xe(G);for(I=0;I<G;++I)X[D=w[I]]++,A<D&&(A=D),K[I]=0;for(X[0]=0,I=1;I<=A;++I)X[I+16]=ne=ne+X[I-1]<<1;for(I=0;I<G;++I)ne=w[I],ne!=0&&(K[I]=X[ne+16]++);var ge=0;for(I=0;I<G;++I)if(ge=w[I],ge!=0)for(ne=ae(K[I],A)>>A-ge,Y=(1<<A+4-ge)-1;Y>=0;--Y)O[ne|Y<<ge]=ge&15|I<<4;return A}var It=ue?new Uint16Array(512):Xe(512),Gt=ue?new Uint16Array(32):Xe(32);if(!ue){for(var Lt=0;Lt<512;++Lt)It[Lt]=0;for(Lt=0;Lt<32;++Lt)Gt[Lt]=0}(function(){for(var w=[],O=0;O<32;O++)w.push(5);Ht(w,Gt,32);var E=[];for(O=0;O<=143;O++)E.push(8);for(;O<=255;O++)E.push(9);for(;O<=279;O++)E.push(7);for(;O<=287;O++)E.push(8);Ht(E,It,288)})();var Bt=(function(){for(var O=ue?new Uint8Array(32768):[],E=0,A=0;E<le.length-1;++E)for(;A<le[E+1];++A)O[A]=E;for(;A<32768;++A)O[A]=29;var D=ue?new Uint8Array(259):[];for(E=0,A=0;E<V.length-1;++E)for(;A<V[E+1];++A)D[A]=E;function I(ne,G){for(var X=0;X<ne.length;){var K=Math.min(65535,ne.length-X),ge=X+K==ne.length;for(G.write_shift(1,+ge),G.write_shift(2,K),G.write_shift(2,~K&65535);K-- >0;)G[G.l++]=ne[X++]}return G.l}function Y(ne,G){for(var X=0,K=0,ge=ue?new Uint16Array(32768):[];K<ne.length;){var ye=Math.min(65535,ne.length-K);if(ye<10){for(X=je(G,X,+(K+ye==ne.length)),X&7&&(X+=8-(X&7)),G.l=X/8|0,G.write_shift(2,ye),G.write_shift(2,~ye&65535);ye-- >0;)G[G.l++]=ne[K++];X=G.l*8;continue}X=je(G,X,+(K+ye==ne.length)+2);for(var Ee=0;ye-- >0;){var me=ne[K];Ee=(Ee<<5^me)&32767;var Se=-1,Ne=0;if((Se=ge[Ee])&&(Se|=K&-32768,Se>K&&(Se-=32768),Se<K))for(;ne[Se+Ne]==ne[K+Ne]&&Ne<250;)++Ne;if(Ne>2){me=D[Ne],me<=22?X=vt(G,X,te[me+1]>>1)-1:(vt(G,X,3),X+=5,vt(G,X,te[me-23]>>5),X+=3);var Ve=me<8?0:me-4>>2;Ve>0&&(rt(G,X,Ne-V[me]),X+=Ve),me=O[K-Se],X=vt(G,X,te[me]>>3),X-=3;var ze=me<4?0:me-2>>1;ze>0&&(rt(G,X,K-Se-le[me]),X+=ze);for(var Ut=0;Ut<Ne;++Ut)ge[Ee]=K&32767,Ee=(Ee<<5^ne[K])&32767,++K;ye-=Ne-1}else me<=143?me=me+48:X=Rt(G,X,1),X=vt(G,X,te[me]),ge[Ee]=K&32767,++K}X=vt(G,X,0)-1}return G.l=(X+7)/8|0,G.l}return function(G,X){return G.length<8?I(G,X):Y(G,X)}})();function qe(w){var O=re(50+Math.floor(w.length*1.1)),E=Bt(w,O);return O.slice(0,E)}var Je=ue?new Uint16Array(32768):Xe(32768),gt=ue?new Uint16Array(32768):Xe(32768),Ft=ue?new Uint16Array(128):Xe(128),bt=1,cr=1;function Yt(w,O){var E=He(w,O)+257;O+=5;var A=He(w,O)+1;O+=5;var D=pt(w,O)+4;O+=4;for(var I=0,Y=ue?new Uint8Array(19):Xe(19),ne=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],G=1,X=ue?new Uint8Array(8):Xe(8),K=ue?new Uint8Array(8):Xe(8),ge=Y.length,ye=0;ye<D;++ye)Y[P[ye]]=I=ke(w,O),G<I&&(G=I),X[I]++,O+=3;var Ee=0;for(X[0]=0,ye=1;ye<=G;++ye)K[ye]=Ee=Ee+X[ye-1]<<1;for(ye=0;ye<ge;++ye)(Ee=Y[ye])!=0&&(ne[ye]=K[Ee]++);var me=0;for(ye=0;ye<ge;++ye)if(me=Y[ye],me!=0){Ee=te[ne[ye]]>>8-me;for(var Se=(1<<7-me)-1;Se>=0;--Se)Ft[Ee|Se<<me]=me&7|ye<<3}var Ne=[];for(G=1;Ne.length<E+A;)switch(Ee=Ft[we(w,O)],O+=Ee&7,Ee>>>=3){case 16:for(I=3+Pe(w,O),O+=2,Ee=Ne[Ne.length-1];I-- >0;)Ne.push(Ee);break;case 17:for(I=3+ke(w,O),O+=3;I-- >0;)Ne.push(0);break;case 18:for(I=11+we(w,O),O+=7;I-- >0;)Ne.push(0);break;default:Ne.push(Ee),G<Ee&&(G=Ee);break}var Ve=Ne.slice(0,E),ze=Ne.slice(E);for(ye=E;ye<286;++ye)Ve[ye]=0;for(ye=A;ye<30;++ye)ze[ye]=0;return bt=Ht(Ve,Je,286),cr=Ht(ze,gt,30),O}function Qe(w,O){if(w[0]==3&&!(w[1]&3))return[yn(O),2];for(var E=0,A=0,D=qo(O||1<<18),I=0,Y=D.length>>>0,ne=0,G=0;(A&1)==0;){if(A=ke(w,E),E+=3,A>>>1)A>>1==1?(ne=9,G=5):(E=Yt(w,E),ne=bt,G=cr);else{E&7&&(E+=8-(E&7));var X=w[E>>>3]|w[(E>>>3)+1]<<8;if(E+=32,X>0)for(!O&&Y<I+X&&(D=kt(D,I+X),Y=D.length);X-- >0;)D[I++]=w[E>>>3],E+=8;continue}for(;;){!O&&Y<I+32767&&(D=kt(D,I+32767),Y=D.length);var K=ut(w,E,ne),ge=A>>>1==1?It[K]:Je[K];if(E+=ge&15,ge>>>=4,(ge>>>8&255)===0)D[I++]=ge;else{if(ge==256)break;ge-=257;var ye=ge<8?0:ge-4>>2;ye>5&&(ye=0);var Ee=I+V[ge];ye>0&&(Ee+=ut(w,E,ye),E+=ye),K=ut(w,E,G),ge=A>>>1==1?Gt[K]:gt[K],E+=ge&15,ge>>>=4;var me=ge<4?0:ge-2>>1,Se=le[ge];for(me>0&&(Se+=ut(w,E,me),E+=me),!O&&Y<Ee&&(D=kt(D,Ee+100),Y=D.length);I<Ee;)D[I]=D[I-Se],++I}}}return O?[D,E+7>>>3]:[D.slice(0,I),E+7>>>3]}function pr(w,O){var E=w.slice(w.l||0),A=Qe(E,O);return w.l+=A[1],A[0]}function Xt(w,O){if(w)typeof console<"u"&&console.error(O);else throw new Error(O)}function ir(w,O){var E=w;xr(E,0);var A=[],D=[],I={FileIndex:A,FullPaths:D};N(I,{root:O.root});for(var Y=E.length-4;(E[Y]!=80||E[Y+1]!=75||E[Y+2]!=5||E[Y+3]!=6)&&Y>=0;)--Y;E.l=Y+4,E.l+=4;var ne=E.read_shift(2);E.l+=6;var G=E.read_shift(4);for(E.l=G,Y=0;Y<ne;++Y){E.l+=20;var X=E.read_shift(4),K=E.read_shift(4),ge=E.read_shift(2),ye=E.read_shift(2),Ee=E.read_shift(2);E.l+=8;var me=E.read_shift(4),Se=o(E.slice(E.l+ge,E.l+ge+ye));E.l+=ge+ye+Ee;var Ne=E.l;E.l=me+4,pe(E,X,K,I,Se),E.l=Ne}return I}function pe(w,O,E,A,D){w.l+=2;var I=w.read_shift(2),Y=w.read_shift(2),ne=a(w);if(I&8257)throw new Error("Unsupported ZIP encryption");for(var G=w.read_shift(4),X=w.read_shift(4),K=w.read_shift(4),ge=w.read_shift(2),ye=w.read_shift(2),Ee="",me=0;me<ge;++me)Ee+=String.fromCharCode(w[w.l++]);if(ye){var Se=o(w.slice(w.l,w.l+ye));(Se[21589]||{}).mt&&(ne=Se[21589].mt),((D||{})[21589]||{}).mt&&(ne=D[21589].mt)}w.l+=ye;var Ne=w.slice(w.l,w.l+X);switch(Y){case 8:Ne=j(w,K);break;case 0:break;default:throw new Error("Unsupported ZIP Compression method "+Y)}var Ve=!1;I&8&&(G=w.read_shift(4),G==134695760&&(G=w.read_shift(4),Ve=!0),X=w.read_shift(4),K=w.read_shift(4)),X!=O&&Xt(Ve,"Bad compressed size: "+O+" != "+X),K!=E&&Xt(Ve,"Bad uncompressed size: "+E+" != "+K),Te(A,Ee,Ne,{unsafe:!0,mt:ne})}function tr(w,O){var E=O||{},A=[],D=[],I=re(1),Y=E.compression?8:0,ne=0,G=0,X=0,K=0,ge=0,ye=w.FullPaths[0],Ee=ye,me=w.FileIndex[0],Se=[],Ne=0;for(G=1;G<w.FullPaths.length;++G)if(Ee=w.FullPaths[G].slice(ye.length),me=w.FileIndex[G],!(!me.size||!me.content||Ee=="Sh33tJ5")){var Ve=K,ze=re(Ee.length);for(X=0;X<Ee.length;++X)ze.write_shift(1,Ee.charCodeAt(X)&127);ze=ze.slice(0,ze.l),Se[ge]=Nh.buf(me.content,0);var Ut=me.content;Y==8&&(Ut=R(Ut)),I=re(30),I.write_shift(4,67324752),I.write_shift(2,20),I.write_shift(2,ne),I.write_shift(2,Y),me.mt?s(I,me.mt):I.write_shift(4,0),I.write_shift(-4,Se[ge]),I.write_shift(4,Ut.length),I.write_shift(4,me.content.length),I.write_shift(2,ze.length),I.write_shift(2,0),K+=I.length,A.push(I),K+=ze.length,A.push(ze),K+=Ut.length,A.push(Ut),I=re(46),I.write_shift(4,33639248),I.write_shift(2,0),I.write_shift(2,20),I.write_shift(2,ne),I.write_shift(2,Y),I.write_shift(4,0),I.write_shift(-4,Se[ge]),I.write_shift(4,Ut.length),I.write_shift(4,me.content.length),I.write_shift(2,ze.length),I.write_shift(2,0),I.write_shift(2,0),I.write_shift(2,0),I.write_shift(2,0),I.write_shift(4,0),I.write_shift(4,Ve),Ne+=I.l,D.push(I),Ne+=ze.length,D.push(ze),++ge}return I=re(22),I.write_shift(4,101010256),I.write_shift(2,0),I.write_shift(2,0),I.write_shift(2,ge),I.write_shift(2,ge),I.write_shift(4,Ne),I.write_shift(4,K),I.write_shift(2,0),Jt([Jt(A),Jt(D),I])}var Ge={htm:"text/html",xml:"text/xml",gif:"image/gif",jpg:"image/jpeg",png:"image/png",mso:"application/x-mso",thmx:"application/vnd.ms-officetheme",sh33tj5:"application/octet-stream"};function Oe(w,O){if(w.ctype)return w.ctype;var E=w.name||"",A=E.match(/\.([^\.]+)$/);return A&&Ge[A[1]]||O&&(A=(E=O).match(/[\.\\]([^\.\\])+$/),A&&Ge[A[1]])?Ge[A[1]]:"application/octet-stream"}function nt(w){for(var O=yi(w),E=[],A=0;A<O.length;A+=76)E.push(O.slice(A,A+76));return E.join(`\r
2
+ `)+`\r
3
+ `}function Ye(w){var O=w.replace(/[\x00-\x08\x0B\x0C\x0E-\x1F\x7E-\xFF=]/g,function(X){var K=X.charCodeAt(0).toString(16).toUpperCase();return"="+(K.length==1?"0"+K:K)});O=O.replace(/ $/mg,"=20").replace(/\t$/mg,"=09"),O.charAt(0)==`
4
+ `&&(O="=0D"+O.slice(1)),O=O.replace(/\r(?!\n)/mg,"=0D").replace(/\n\n/mg,`
5
+ =0A`).replace(/([^\r\n])\n/mg,"$1=0A");for(var E=[],A=O.split(`\r
6
+ `),D=0;D<A.length;++D){var I=A[D];if(I.length==0){E.push("");continue}for(var Y=0;Y<I.length;){var ne=76,G=I.slice(Y,Y+ne);G.charAt(ne-1)=="="?ne--:G.charAt(ne-2)=="="?ne-=2:G.charAt(ne-3)=="="&&(ne-=3),G=I.slice(Y,Y+ne),Y+=ne,Y<I.length&&(G+="="),E.push(G)}}return E.join(`\r
7
+ `)}function Tt(w){for(var O=[],E=0;E<w.length;++E){for(var A=w[E];E<=w.length&&A.charAt(A.length-1)=="=";)A=A.slice(0,A.length-1)+w[++E];O.push(A)}for(var D=0;D<O.length;++D)O[D]=O[D].replace(/[=][0-9A-Fa-f]{2}/g,function(I){return String.fromCharCode(parseInt(I.slice(1),16))});return Nr(O.join(`\r
8
+ `))}function sr(w,O,E){for(var A="",D="",I="",Y,ne=0;ne<10;++ne){var G=O[ne];if(!G||G.match(/^\s*$/))break;var X=G.match(/^(.*?):\s*([^\s].*)$/);if(X)switch(X[1].toLowerCase()){case"content-location":A=X[2].trim();break;case"content-type":I=X[2].trim();break;case"content-transfer-encoding":D=X[2].trim();break}}switch(++ne,D.toLowerCase()){case"base64":Y=Nr(Kr(O.slice(ne).join("")));break;case"quoted-printable":Y=Tt(O.slice(ne));break;default:throw new Error("Unsupported Content-Transfer-Encoding "+D)}var K=Te(w,A.slice(E.length),Y,{unsafe:!0});I&&(K.ctype=I)}function yt(w,O){if(De(w.slice(0,13)).toLowerCase()!="mime-version:")throw new Error("Unsupported MAD header");var E=O&&O.root||"",A=(Ze&&Buffer.isBuffer(w)?w.toString("binary"):De(w)).split(`\r
9
+ `),D=0,I="";for(D=0;D<A.length;++D)if(I=A[D],!!/^Content-Location:/i.test(I)&&(I=I.slice(I.indexOf("file")),E||(E=I.slice(0,I.lastIndexOf("/")+1)),I.slice(0,E.length)!=E))for(;E.length>0&&(E=E.slice(0,E.length-1),E=E.slice(0,E.lastIndexOf("/")+1),I.slice(0,E.length)!=E););var Y=(A[1]||"").match(/boundary="(.*?)"/);if(!Y)throw new Error("MAD cannot find boundary");var ne="--"+(Y[1]||""),G=[],X=[],K={FileIndex:G,FullPaths:X};N(K);var ge,ye=0;for(D=0;D<A.length;++D){var Ee=A[D];Ee!==ne&&Ee!==ne+"--"||(ye++&&sr(K,A.slice(ge,D),E),ge=D)}return K}function xt(w,O){var E=O||{},A=E.boundary||"SheetJS";A="------="+A;for(var D=["MIME-Version: 1.0",'Content-Type: multipart/related; boundary="'+A.slice(2)+'"',"","",""],I=w.FullPaths[0],Y=I,ne=w.FileIndex[0],G=1;G<w.FullPaths.length;++G)if(Y=w.FullPaths[G].slice(I.length),ne=w.FileIndex[G],!(!ne.size||!ne.content||Y=="Sh33tJ5")){Y=Y.replace(/[\x00-\x08\x0B\x0C\x0E-\x1F\x7E-\xFF]/g,function(Ne){return"_x"+Ne.charCodeAt(0).toString(16)+"_"}).replace(/[\u0080-\uFFFF]/g,function(Ne){return"_u"+Ne.charCodeAt(0).toString(16)+"_"});for(var X=ne.content,K=Ze&&Buffer.isBuffer(X)?X.toString("binary"):De(X),ge=0,ye=Math.min(1024,K.length),Ee=0,me=0;me<=ye;++me)(Ee=K.charCodeAt(me))>=32&&Ee<128&&++ge;var Se=ge>=ye*4/5;D.push(A),D.push("Content-Location: "+(E.root||"file:///C:/SheetJS/")+Y),D.push("Content-Transfer-Encoding: "+(Se?"quoted-printable":"base64")),D.push("Content-Type: "+Oe(ne,Y)),D.push(""),D.push(Se?Ye(K):nt(K))}return D.push(A+`--\r
10
+ `),D.join(`\r
11
+ `)}function mt(w){var O={};return N(O,w),O}function Te(w,O,E,A){var D=A&&A.unsafe;D||N(w);var I=!D&&ht.find(w,O);if(!I){var Y=w.FullPaths[0];O.slice(0,Y.length)==Y?Y=O:(Y.slice(-1)!="/"&&(Y+="/"),Y=(Y+O).replace("//","/")),I={name:i(O),type:2},w.FileIndex.push(I),w.FullPaths.push(Y),D||ht.utils.cfb_gc(w)}return I.content=E,I.size=E?E.length:0,A&&(A.CLSID&&(I.clsid=A.CLSID),A.mt&&(I.mt=A.mt),A.ct&&(I.ct=A.ct)),I}function he(w,O){N(w);var E=ht.find(w,O);if(E){for(var A=0;A<w.FileIndex.length;++A)if(w.FileIndex[A]==E)return w.FileIndex.splice(A,1),w.FullPaths.splice(A,1),!0}return!1}function be(w,O,E){N(w);var A=ht.find(w,O);if(A){for(var D=0;D<w.FileIndex.length;++D)if(w.FileIndex[D]==A)return w.FileIndex[D].name=i(E),w.FullPaths[D]=E,!0}return!1}function We(w){M(w,!0)}return t.find=W,t.read=z,t.parse=d,t.write=oe,t.writeFile=Ae,t.utils={cfb_new:mt,cfb_add:Te,cfb_del:he,cfb_mov:be,cfb_gc:We,ReadShift:di,CheckField:P0,prep_blob:xr,bconcat:Jt,use_zlib:C,_deflateRaw:qe,_inflateRaw:pr,consts:_e},t})();function Rh(e){return typeof e=="string"?Es(e):Array.isArray(e)?ah(e):e}function Di(e,t,r){if(typeof Deno<"u"){if(r&&typeof t=="string")switch(r){case"utf8":t=new TextEncoder(r).encode(t);break;case"binary":t=Es(t);break;default:throw new Error("Unsupported encoding "+r)}return Deno.writeFileSync(e,t)}var n=r=="utf8"?Ti(t):t;if(typeof IE_SaveFile<"u")return IE_SaveFile(n,e);if(typeof Blob<"u"){var i=new Blob([Rh(n)],{type:"application/octet-stream"});if(typeof navigator<"u"&&navigator.msSaveBlob)return navigator.msSaveBlob(i,e);if(typeof saveAs<"u")return saveAs(i,e);if(typeof URL<"u"&&typeof document<"u"&&document.createElement&&URL.createObjectURL){var s=URL.createObjectURL(i);if(typeof chrome=="object"&&typeof(chrome.downloads||{}).download=="function")return URL.revokeObjectURL&&typeof setTimeout<"u"&&setTimeout(function(){URL.revokeObjectURL(s)},6e4),chrome.downloads.download({url:s,filename:e,saveAs:!0});var a=document.createElement("a");if(a.download!=null)return a.download=e,a.href=s,document.body.appendChild(a),a.click(),document.body.removeChild(a),URL.revokeObjectURL&&typeof setTimeout<"u"&&setTimeout(function(){URL.revokeObjectURL(s)},6e4),s}}if(typeof $<"u"&&typeof File<"u"&&typeof Folder<"u")try{var o=File(e);return o.open("w"),o.encoding="binary",Array.isArray(t)&&(t=Oi(t)),o.write(t),o.close(),t}catch(f){if(!f.message||!f.message.match(/onstruct/))throw f}throw new Error("cannot save file "+e)}function er(e){for(var t=Object.keys(e),r=[],n=0;n<t.length;++n)Object.prototype.hasOwnProperty.call(e,t[n])&&r.push(t[n]);return r}function il(e,t){for(var r=[],n=er(e),i=0;i!==n.length;++i)r[e[n[i]][t]]==null&&(r[e[n[i]][t]]=n[i]);return r}function Xa(e){for(var t=[],r=er(e),n=0;n!==r.length;++n)t[e[r[n]]]=r[n];return t}function Cs(e){for(var t=[],r=er(e),n=0;n!==r.length;++n)t[e[r[n]]]=parseInt(r[n],10);return t}function Ph(e){for(var t=[],r=er(e),n=0;n!==r.length;++n)t[e[r[n]]]==null&&(t[e[r[n]]]=[]),t[e[r[n]]].push(r[n]);return t}var cs=new Date(1899,11,30,0,0,0);function dr(e,t){var r=e.getTime(),n=cs.getTime()+(e.getTimezoneOffset()-cs.getTimezoneOffset())*6e4;return(r-n)/(1440*60*1e3)}var v0=new Date,jh=cs.getTime()+(v0.getTimezoneOffset()-cs.getTimezoneOffset())*6e4,sl=v0.getTimezoneOffset();function y0(e){var t=new Date;return t.setTime(e*24*60*60*1e3+jh),t.getTimezoneOffset()!==sl&&t.setTime(t.getTime()+(t.getTimezoneOffset()-sl)*6e4),t}var al=new Date("2017-02-19T19:06:09.000Z"),w0=isNaN(al.getFullYear())?new Date("2/19/17"):al,Mh=w0.getFullYear()==2017;function lr(e,t){var r=new Date(e);if(Mh)return t>0?r.setTime(r.getTime()+r.getTimezoneOffset()*60*1e3):t<0&&r.setTime(r.getTime()-r.getTimezoneOffset()*60*1e3),r;if(e instanceof Date)return e;if(w0.getFullYear()==1917&&!isNaN(r.getFullYear())){var n=r.getFullYear();return e.indexOf(""+n)>-1||r.setFullYear(r.getFullYear()+100),r}var i=e.match(/\d+/g)||["2017","2","19","0","0","0"],s=new Date(+i[0],+i[1]-1,+i[2],+i[3]||0,+i[4]||0,+i[5]||0);return e.indexOf("Z")>-1&&(s=new Date(s.getTime()-s.getTimezoneOffset()*60*1e3)),s}function As(e,t){if(Ze&&Buffer.isBuffer(e))return e.toString("binary");if(typeof TextDecoder<"u")try{var r={"€":"€","‚":"‚",ƒ:"ƒ","„":"„","…":"…","†":"†","‡":"‡","ˆ":"ˆ","‰":"‰",Š:"Š","‹":"‹",Œ:"Œ",Ž:"Ž","‘":"‘","’":"’","“":"“","”":"”","•":"•","–":"–","—":"—","˜":"˜","™":"™",š:"š","›":"›",œ:"œ",ž:"ž",Ÿ:"Ÿ"};return Array.isArray(e)&&(e=new Uint8Array(e)),new TextDecoder("latin1").decode(e).replace(/[€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ]/g,function(s){return r[s]||s})}catch{}for(var n=[],i=0;i!=e.length;++i)n.push(String.fromCharCode(e[i]));return n.join("")}function hr(e){if(typeof JSON<"u"&&!Array.isArray(e))return JSON.parse(JSON.stringify(e));if(typeof e!="object"||e==null)return e;if(e instanceof Date)return new Date(e.getTime());var t={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=hr(e[r]));return t}function Ot(e,t){for(var r="";r.length<t;)r+=e;return r}function Yr(e){var t=Number(e);if(!isNaN(t))return isFinite(t)?t:NaN;if(!/\d/.test(e))return t;var r=1,n=e.replace(/([\d]),([\d])/g,"$1$2").replace(/[$]/g,"").replace(/[%]/g,function(){return r*=100,""});return!isNaN(t=Number(n))||(n=n.replace(/[(](.*)[)]/,function(i,s){return r=-r,s}),!isNaN(t=Number(n)))?t/r:t}var Lh=["january","february","march","april","may","june","july","august","september","october","november","december"];function wi(e){var t=new Date(e),r=new Date(NaN),n=t.getYear(),i=t.getMonth(),s=t.getDate();if(isNaN(s))return r;var a=e.toLowerCase();if(a.match(/jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec/)){if(a=a.replace(/[^a-z]/g,"").replace(/([^a-z]|^)[ap]m?([^a-z]|$)/,""),a.length>3&&Lh.indexOf(a)==-1)return r}else if(a.match(/[a-z]/))return r;return n<0||n>8099?r:(i>0||s>1)&&n!=101?t:e.match(/[^-0-9:,\/\\]/)?r:t}function Ue(e,t,r){if(e.FullPaths){if(typeof r=="string"){var n;return Ze?n=Zr(r):n=oh(r),ht.utils.cfb_add(e,t,n)}ht.utils.cfb_add(e,t,r)}else e.file(t,r)}function Ka(){return ht.utils.cfb_new()}var Mt=`<?xml version="1.0" encoding="UTF-8" standalone="yes"?>\r
12
+ `,Bh={"&quot;":'"',"&apos;":"'","&gt;":">","&lt;":"<","&amp;":"&"},qa=Xa(Bh),Ja=/[&<>'"]/g,$h=/[\u0000-\u0008\u000b-\u001f]/g;function lt(e){var t=e+"";return t.replace(Ja,function(r){return qa[r]}).replace($h,function(r){return"_x"+("000"+r.charCodeAt(0).toString(16)).slice(-4)+"_"})}function ol(e){return lt(e).replace(/ /g,"_x0020_")}var T0=/[\u0000-\u001f]/g;function Uh(e){var t=e+"";return t.replace(Ja,function(r){return qa[r]}).replace(/\n/g,"<br/>").replace(T0,function(r){return"&#x"+("000"+r.charCodeAt(0).toString(16)).slice(-4)+";"})}function Wh(e){var t=e+"";return t.replace(Ja,function(r){return qa[r]}).replace(T0,function(r){return"&#x"+r.charCodeAt(0).toString(16).toUpperCase()+";"})}function Vh(e){return e.replace(/(\r\n|[\r\n])/g,"&#10;")}function zh(e){switch(e){case 1:case!0:case"1":case"true":case"TRUE":return!0;default:return!1}}function ta(e){for(var t="",r=0,n=0,i=0,s=0,a=0,o=0;r<e.length;){if(n=e.charCodeAt(r++),n<128){t+=String.fromCharCode(n);continue}if(i=e.charCodeAt(r++),n>191&&n<224){a=(n&31)<<6,a|=i&63,t+=String.fromCharCode(a);continue}if(s=e.charCodeAt(r++),n<240){t+=String.fromCharCode((n&15)<<12|(i&63)<<6|s&63);continue}a=e.charCodeAt(r++),o=((n&7)<<18|(i&63)<<12|(s&63)<<6|a&63)-65536,t+=String.fromCharCode(55296+(o>>>10&1023)),t+=String.fromCharCode(56320+(o&1023))}return t}function ll(e){var t=yn(2*e.length),r,n,i=1,s=0,a=0,o;for(n=0;n<e.length;n+=i)i=1,(o=e.charCodeAt(n))<128?r=o:o<224?(r=(o&31)*64+(e.charCodeAt(n+1)&63),i=2):o<240?(r=(o&15)*4096+(e.charCodeAt(n+1)&63)*64+(e.charCodeAt(n+2)&63),i=3):(i=4,r=(o&7)*262144+(e.charCodeAt(n+1)&63)*4096+(e.charCodeAt(n+2)&63)*64+(e.charCodeAt(n+3)&63),r-=65536,a=55296+(r>>>10&1023),r=56320+(r&1023)),a!==0&&(t[s++]=a&255,t[s++]=a>>>8,a=0),t[s++]=r%256,t[s++]=r>>>8;return t.slice(0,s).toString("ucs2")}function cl(e){return Zr(e,"binary").toString("utf8")}var Wi="foo bar baz☃🍣",fi=Ze&&(cl(Wi)==ta(Wi)&&cl||ll(Wi)==ta(Wi)&&ll)||ta,Ti=Ze?function(e){return Zr(e,"utf8").toString("binary")}:function(e){for(var t=[],r=0,n=0,i=0;r<e.length;)switch(n=e.charCodeAt(r++),!0){case n<128:t.push(String.fromCharCode(n));break;case n<2048:t.push(String.fromCharCode(192+(n>>6))),t.push(String.fromCharCode(128+(n&63)));break;case(n>=55296&&n<57344):n-=55296,i=e.charCodeAt(r++)-56320+(n<<10),t.push(String.fromCharCode(240+(i>>18&7))),t.push(String.fromCharCode(144+(i>>12&63))),t.push(String.fromCharCode(128+(i>>6&63))),t.push(String.fromCharCode(128+(i&63)));break;default:t.push(String.fromCharCode(224+(n>>12))),t.push(String.fromCharCode(128+(n>>6&63))),t.push(String.fromCharCode(128+(n&63)))}return t.join("")},Hh=(function(){var e=[["nbsp"," "],["middot","·"],["quot",'"'],["apos","'"],["gt",">"],["lt","<"],["amp","&"]].map(function(t){return[new RegExp("&"+t[0]+";","ig"),t[1]]});return function(r){for(var n=r.replace(/^[\t\n\r ]+/,"").replace(/[\t\n\r ]+$/,"").replace(/>\s+/g,">").replace(/\s+</g,"<").replace(/[\t\n\r ]+/g," ").replace(/<\s*[bB][rR]\s*\/?>/g,`
13
+ `).replace(/<[^>]*>/g,""),i=0;i<e.length;++i)n=n.replace(e[i][0],e[i][1]);return n}})(),S0=/(^\s|\s$|\n)/;function Zt(e,t){return"<"+e+(t.match(S0)?' xml:space="preserve"':"")+">"+t+"</"+e+">"}function Si(e){return er(e).map(function(t){return" "+t+'="'+e[t]+'"'}).join("")}function xe(e,t,r){return"<"+e+(r!=null?Si(r):"")+(t!=null?(t.match(S0)?' xml:space="preserve"':"")+">"+t+"</"+e:"/")+">"}function Aa(e,t){try{return e.toISOString().replace(/\.\d*/,"")}catch(r){if(t)throw r}return""}function Gh(e,t){switch(typeof e){case"string":var r=xe("vt:lpwstr",lt(e));return r=r.replace(/&quot;/g,"_x0022_"),r;case"number":return xe((e|0)==e?"vt:i4":"vt:r8",lt(String(e)));case"boolean":return xe("vt:bool",e?"true":"false")}if(e instanceof Date)return xe("vt:filetime",Aa(e));throw new Error("Unable to serialize "+e)}var Wt={CORE_PROPS:"http://schemas.openxmlformats.org/package/2006/metadata/core-properties",CUST_PROPS:"http://schemas.openxmlformats.org/officeDocument/2006/custom-properties",EXT_PROPS:"http://schemas.openxmlformats.org/officeDocument/2006/extended-properties",CT:"http://schemas.openxmlformats.org/package/2006/content-types",RELS:"http://schemas.openxmlformats.org/package/2006/relationships",TCMNT:"http://schemas.microsoft.com/office/spreadsheetml/2018/threadedcomments",dc:"http://purl.org/dc/elements/1.1/",dcterms:"http://purl.org/dc/terms/",dcmitype:"http://purl.org/dc/dcmitype/",r:"http://schemas.openxmlformats.org/officeDocument/2006/relationships",vt:"http://schemas.openxmlformats.org/officeDocument/2006/docPropsVTypes",xsi:"http://www.w3.org/2001/XMLSchema-instance",xsd:"http://www.w3.org/2001/XMLSchema"},Jn=["http://schemas.openxmlformats.org/spreadsheetml/2006/main","http://purl.oclc.org/ooxml/spreadsheetml/main","http://schemas.microsoft.com/office/excel/2006/main","http://schemas.microsoft.com/office/excel/2006/2"],vr={o:"urn:schemas-microsoft-com:office:office",x:"urn:schemas-microsoft-com:office:excel",ss:"urn:schemas-microsoft-com:office:spreadsheet",dt:"uuid:C2F41010-65B3-11d1-A29F-00AA00C14882",mv:"http://macVmlSchemaUri",v:"urn:schemas-microsoft-com:vml",html:"http://www.w3.org/TR/REC-html40"};function Yh(e,t){for(var r=1-2*(e[t+7]>>>7),n=((e[t+7]&127)<<4)+(e[t+6]>>>4&15),i=e[t+6]&15,s=5;s>=0;--s)i=i*256+e[t+s];return n==2047?i==0?r*(1/0):NaN:(n==0?n=-1022:(n-=1023,i+=Math.pow(2,52)),r*Math.pow(2,n-52)*i)}function Xh(e,t,r){var n=(t<0||1/t==-1/0?1:0)<<7,i=0,s=0,a=n?-t:t;isFinite(a)?a==0?i=s=0:(i=Math.floor(Math.log(a)/Math.LN2),s=a*Math.pow(2,52-i),i<=-1023&&(!isFinite(s)||s<Math.pow(2,52))?i=-1022:(s-=Math.pow(2,52),i+=1023)):(i=2047,s=isNaN(t)?26985:0);for(var o=0;o<=5;++o,s/=256)e[r+o]=s&255;e[r+6]=(i&15)<<4|s&15,e[r+7]=i>>4|n}var ul=function(e){for(var t=[],r=10240,n=0;n<e[0].length;++n)if(e[0][n])for(var i=0,s=e[0][n].length;i<s;i+=r)t.push.apply(t,e[0][n].slice(i,i+r));return t},fl=Ze?function(e){return e[0].length>0&&Buffer.isBuffer(e[0][0])?Buffer.concat(e[0].map(function(t){return Buffer.isBuffer(t)?t:Zr(t)})):ul(e)}:ul,dl=function(e,t,r){for(var n=[],i=t;i<r;i+=2)n.push(String.fromCharCode(oi(e,i)));return n.join("").replace(ui,"")},Za=Ze?function(e,t,r){return Buffer.isBuffer(e)?e.toString("utf16le",t,r).replace(ui,""):dl(e,t,r)}:dl,hl=function(e,t,r){for(var n=[],i=t;i<t+r;++i)n.push(("0"+e[i].toString(16)).slice(-2));return n.join("")},E0=Ze?function(e,t,r){return Buffer.isBuffer(e)?e.toString("hex",t,t+r):hl(e,t,r)}:hl,pl=function(e,t,r){for(var n=[],i=t;i<r;i++)n.push(String.fromCharCode(Vn(e,i)));return n.join("")},ki=Ze?function(t,r,n){return Buffer.isBuffer(t)?t.toString("utf8",r,n):pl(t,r,n)}:pl,_0=function(e,t){var r=yr(e,t);return r>0?ki(e,t+4,t+4+r-1):""},b0=_0,C0=function(e,t){var r=yr(e,t);return r>0?ki(e,t+4,t+4+r-1):""},A0=C0,O0=function(e,t){var r=2*yr(e,t);return r>0?ki(e,t+4,t+4+r-1):""},D0=O0,k0=function(t,r){var n=yr(t,r);return n>0?Za(t,r+4,r+4+n):""},I0=k0,F0=function(e,t){var r=yr(e,t);return r>0?ki(e,t+4,t+4+r):""},N0=F0,R0=function(e,t){return Yh(e,t)},us=R0,Qa=function(t){return Array.isArray(t)||typeof Uint8Array<"u"&&t instanceof Uint8Array};Ze&&(b0=function(t,r){if(!Buffer.isBuffer(t))return _0(t,r);var n=t.readUInt32LE(r);return n>0?t.toString("utf8",r+4,r+4+n-1):""},A0=function(t,r){if(!Buffer.isBuffer(t))return C0(t,r);var n=t.readUInt32LE(r);return n>0?t.toString("utf8",r+4,r+4+n-1):""},D0=function(t,r){if(!Buffer.isBuffer(t))return O0(t,r);var n=2*t.readUInt32LE(r);return t.toString("utf16le",r+4,r+4+n-1)},I0=function(t,r){if(!Buffer.isBuffer(t))return k0(t,r);var n=t.readUInt32LE(r);return t.toString("utf16le",r+4,r+4+n)},N0=function(t,r){if(!Buffer.isBuffer(t))return F0(t,r);var n=t.readUInt32LE(r);return t.toString("utf8",r+4,r+4+n)},us=function(t,r){return Buffer.isBuffer(t)?t.readDoubleLE(r):R0(t,r)},Qa=function(t){return Buffer.isBuffer(t)||Array.isArray(t)||typeof Uint8Array<"u"&&t instanceof Uint8Array});var Vn=function(e,t){return e[t]},oi=function(e,t){return e[t+1]*256+e[t]},Kh=function(e,t){var r=e[t+1]*256+e[t];return r<32768?r:(65535-r+1)*-1},yr=function(e,t){return e[t+3]*(1<<24)+(e[t+2]<<16)+(e[t+1]<<8)+e[t]},mn=function(e,t){return e[t+3]<<24|e[t+2]<<16|e[t+1]<<8|e[t]},qh=function(e,t){return e[t]<<24|e[t+1]<<16|e[t+2]<<8|e[t+3]};function di(e,t){var r="",n,i,s=[],a,o,f,u;switch(t){case"dbcs":if(u=this.l,Ze&&Buffer.isBuffer(this))r=this.slice(this.l,this.l+2*e).toString("utf16le");else for(f=0;f<e;++f)r+=String.fromCharCode(oi(this,u)),u+=2;e*=2;break;case"utf8":r=ki(this,this.l,this.l+e);break;case"utf16le":e*=2,r=Za(this,this.l,this.l+e);break;case"wstr":return di.call(this,e,"dbcs");case"lpstr-ansi":r=b0(this,this.l),e=4+yr(this,this.l);break;case"lpstr-cp":r=A0(this,this.l),e=4+yr(this,this.l);break;case"lpwstr":r=D0(this,this.l),e=4+2*yr(this,this.l);break;case"lpp4":e=4+yr(this,this.l),r=I0(this,this.l),e&2&&(e+=2);break;case"8lpp4":e=4+yr(this,this.l),r=N0(this,this.l),e&3&&(e+=4-(e&3));break;case"cstr":for(e=0,r="";(a=Vn(this,this.l+e++))!==0;)s.push(Bi(a));r=s.join("");break;case"_wstr":for(e=0,r="";(a=oi(this,this.l+e))!==0;)s.push(Bi(a)),e+=2;e+=2,r=s.join("");break;case"dbcs-cont":for(r="",u=this.l,f=0;f<e;++f){if(this.lens&&this.lens.indexOf(u)!==-1)return a=Vn(this,u),this.l=u+1,o=di.call(this,e-f,a?"dbcs-cont":"sbcs-cont"),s.join("")+o;s.push(Bi(oi(this,u))),u+=2}r=s.join(""),e*=2;break;case"cpstr":case"sbcs-cont":for(r="",u=this.l,f=0;f!=e;++f){if(this.lens&&this.lens.indexOf(u)!==-1)return a=Vn(this,u),this.l=u+1,o=di.call(this,e-f,a?"dbcs-cont":"sbcs-cont"),s.join("")+o;s.push(Bi(Vn(this,u))),u+=1}r=s.join("");break;default:switch(e){case 1:return n=Vn(this,this.l),this.l++,n;case 2:return n=(t==="i"?Kh:oi)(this,this.l),this.l+=2,n;case 4:case-4:return t==="i"||(this[this.l+3]&128)===0?(n=(e>0?mn:qh)(this,this.l),this.l+=4,n):(i=yr(this,this.l),this.l+=4,i);case 8:case-8:if(t==="f")return e==8?i=us(this,this.l):i=us([this[this.l+7],this[this.l+6],this[this.l+5],this[this.l+4],this[this.l+3],this[this.l+2],this[this.l+1],this[this.l+0]],0),this.l+=8,i;e=8;case 16:r=E0(this,this.l,e);break}}return this.l+=e,r}var Jh=function(e,t,r){e[r]=t&255,e[r+1]=t>>>8&255,e[r+2]=t>>>16&255,e[r+3]=t>>>24&255},Zh=function(e,t,r){e[r]=t&255,e[r+1]=t>>8&255,e[r+2]=t>>16&255,e[r+3]=t>>24&255},Qh=function(e,t,r){e[r]=t&255,e[r+1]=t>>>8&255};function ep(e,t,r){var n=0,i=0;if(r==="dbcs"){for(i=0;i!=t.length;++i)Qh(this,t.charCodeAt(i),this.l+2*i);n=2*t.length}else if(r==="sbcs"){for(t=t.replace(/[^\x00-\x7F]/g,"_"),i=0;i!=t.length;++i)this[this.l+i]=t.charCodeAt(i)&255;n=t.length}else if(r==="hex"){for(;i<e;++i)this[this.l++]=parseInt(t.slice(2*i,2*i+2),16)||0;return this}else if(r==="utf16le"){var s=Math.min(this.l+e,this.length);for(i=0;i<Math.min(t.length,e);++i){var a=t.charCodeAt(i);this[this.l++]=a&255,this[this.l++]=a>>8}for(;this.l<s;)this[this.l++]=0;return this}else switch(e){case 1:n=1,this[this.l]=t&255;break;case 2:n=2,this[this.l]=t&255,t>>>=8,this[this.l+1]=t&255;break;case 3:n=3,this[this.l]=t&255,t>>>=8,this[this.l+1]=t&255,t>>>=8,this[this.l+2]=t&255;break;case 4:n=4,Jh(this,t,this.l);break;case 8:if(n=8,r==="f"){Xh(this,t,this.l);break}case 16:break;case-4:n=4,Zh(this,t,this.l);break}return this.l+=n,this}function P0(e,t){var r=E0(this,this.l,e.length>>1);if(r!==e)throw new Error(t+"Expected "+e+" saw "+r);this.l+=e.length>>1}function xr(e,t){e.l=t,e.read_shift=di,e.chk=P0,e.write_shift=ep}function Wr(e,t){e.l+=t}function re(e){var t=yn(e);return xr(t,0),t}function fr(){var e=[],t=Ze?256:2048,r=function(u){var d=re(u);return xr(d,0),d},n=r(t),i=function(){n&&(n.length>n.l&&(n=n.slice(0,n.l),n.l=n.length),n.length>0&&e.push(n),n=null)},s=function(u){return n&&u<n.length-n.l?n:(i(),n=r(Math.max(u+1,t)))},a=function(){return i(),Jt(e)},o=function(u){i(),n=u,n.l==null&&(n.l=n.length),s(t)};return{next:s,push:o,end:a,_bufs:e}}function de(e,t,r,n){var i=+t,s;if(!isNaN(i)){n||(n=Yv[i].p||(r||[]).length||0),s=1+(i>=128?1:0)+1,n>=128&&++s,n>=16384&&++s,n>=2097152&&++s;var a=e.next(s);i<=127?a.write_shift(1,i):(a.write_shift(1,(i&127)+128),a.write_shift(1,i>>7));for(var o=0;o!=4;++o)if(n>=128)a.write_shift(1,(n&127)+128),n>>=7;else{a.write_shift(1,n);break}n>0&&Qa(r)&&e.push(r)}}function hi(e,t,r){var n=hr(e);if(t.s?(n.cRel&&(n.c+=t.s.c),n.rRel&&(n.r+=t.s.r)):(n.cRel&&(n.c+=t.c),n.rRel&&(n.r+=t.r)),!r||r.biff<12){for(;n.c>=256;)n.c-=256;for(;n.r>=65536;)n.r-=65536}return n}function gl(e,t,r){var n=hr(e);return n.s=hi(n.s,t.s,r),n.e=hi(n.e,t.s,r),n}function pi(e,t){if(e.cRel&&e.c<0)for(e=hr(e);e.c<0;)e.c+=t>8?16384:256;if(e.rRel&&e.r<0)for(e=hr(e);e.r<0;)e.r+=t>8?1048576:t>5?65536:16384;var r=ct(e);return!e.cRel&&e.cRel!=null&&(r=np(r)),!e.rRel&&e.rRel!=null&&(r=tp(r)),r}function ra(e,t){return e.s.r==0&&!e.s.rRel&&e.e.r==(t.biff>=12?1048575:t.biff>=8?65536:16384)&&!e.e.rRel?(e.s.cRel?"":"$")+rr(e.s.c)+":"+(e.e.cRel?"":"$")+rr(e.e.c):e.s.c==0&&!e.s.cRel&&e.e.c==(t.biff>=12?16383:255)&&!e.e.cRel?(e.s.rRel?"":"$")+Qt(e.s.r)+":"+(e.e.rRel?"":"$")+Qt(e.e.r):pi(e.s,t.biff)+":"+pi(e.e,t.biff)}function eo(e){return parseInt(rp(e),10)-1}function Qt(e){return""+(e+1)}function tp(e){return e.replace(/([A-Z]|^)(\d+)$/,"$1$$$2")}function rp(e){return e.replace(/\$(\d+)$/,"$1")}function to(e){for(var t=ip(e),r=0,n=0;n!==t.length;++n)r=26*r+t.charCodeAt(n)-64;return r-1}function rr(e){if(e<0)throw new Error("invalid column "+e);var t="";for(++e;e;e=Math.floor((e-1)/26))t=String.fromCharCode((e-1)%26+65)+t;return t}function np(e){return e.replace(/^([A-Z])/,"$$$1")}function ip(e){return e.replace(/^\$([A-Z])/,"$1")}function sp(e){return e.replace(/(\$?[A-Z]*)(\$?\d*)/,"$1,$2").split(",")}function Vt(e){for(var t=0,r=0,n=0;n<e.length;++n){var i=e.charCodeAt(n);i>=48&&i<=57?t=10*t+(i-48):i>=65&&i<=90&&(r=26*r+(i-64))}return{c:r-1,r:t-1}}function ct(e){for(var t=e.c+1,r="";t;t=(t-1)/26|0)r=String.fromCharCode((t-1)%26+65)+r;return r+(e.r+1)}function Sr(e){var t=e.indexOf(":");return t==-1?{s:Vt(e),e:Vt(e)}:{s:Vt(e.slice(0,t)),e:Vt(e.slice(t+1))}}function jt(e,t){return typeof t>"u"||typeof t=="number"?jt(e.s,e.e):(typeof e!="string"&&(e=ct(e)),typeof t!="string"&&(t=ct(t)),e==t?e:e+":"+t)}function wt(e){var t={s:{c:0,r:0},e:{c:0,r:0}},r=0,n=0,i=0,s=e.length;for(r=0;n<s&&!((i=e.charCodeAt(n)-64)<1||i>26);++n)r=26*r+i;for(t.s.c=--r,r=0;n<s&&!((i=e.charCodeAt(n)-48)<0||i>9);++n)r=10*r+i;if(t.s.r=--r,n===s||i!=10)return t.e.c=t.s.c,t.e.r=t.s.r,t;for(++n,r=0;n!=s&&!((i=e.charCodeAt(n)-64)<1||i>26);++n)r=26*r+i;for(t.e.c=--r,r=0;n!=s&&!((i=e.charCodeAt(n)-48)<0||i>9);++n)r=10*r+i;return t.e.r=--r,t}function ml(e,t){var r=e.t=="d"&&t instanceof Date;if(e.z!=null)try{return e.w=an(e.z,r?dr(t):t)}catch{}try{return e.w=an((e.XF||{}).numFmtId||(r?14:0),r?dr(t):t)}catch{return""+t}}function qr(e,t,r){return e==null||e.t==null||e.t=="z"?"":e.w!==void 0?e.w:(e.t=="d"&&!e.z&&r&&r.dateNF&&(e.z=r.dateNF),e.t=="e"?Ii[e.v]||e.v:t==null?ml(e,e.v):ml(e,t))}function bn(e,t){var r=t&&t.sheet?t.sheet:"Sheet1",n={};return n[r]=e,{SheetNames:[r],Sheets:n}}function j0(e,t,r){var n=r||{},i=e?Array.isArray(e):n.dense,s=e||(i?[]:{}),a=0,o=0;if(s&&n.origin!=null){if(typeof n.origin=="number")a=n.origin;else{var f=typeof n.origin=="string"?Vt(n.origin):n.origin;a=f.r,o=f.c}s["!ref"]||(s["!ref"]="A1:A1")}var u={s:{c:1e7,r:1e7},e:{c:0,r:0}};if(s["!ref"]){var d=wt(s["!ref"]);u.s.c=d.s.c,u.s.r=d.s.r,u.e.c=Math.max(u.e.c,d.e.c),u.e.r=Math.max(u.e.r,d.e.r),a==-1&&(u.e.r=a=d.e.r+1)}for(var h=0;h!=t.length;++h)if(t[h]){if(!Array.isArray(t[h]))throw new Error("aoa_to_sheet expects an array of arrays");for(var m=0;m!=t[h].length;++m)if(!(typeof t[h][m]>"u")){var l={v:t[h][m]},v=a+h,g=o+m;if(u.s.r>v&&(u.s.r=v),u.s.c>g&&(u.s.c=g),u.e.r<v&&(u.e.r=v),u.e.c<g&&(u.e.c=g),t[h][m]&&typeof t[h][m]=="object"&&!Array.isArray(t[h][m])&&!(t[h][m]instanceof Date))l=t[h][m];else if(Array.isArray(l.v)&&(l.f=t[h][m][1],l.v=l.v[0]),l.v===null)if(l.f)l.t="n";else if(n.nullError)l.t="e",l.v=0;else if(n.sheetStubs)l.t="z";else continue;else typeof l.v=="number"?l.t="n":typeof l.v=="boolean"?l.t="b":l.v instanceof Date?(l.z=n.dateNF||Dt[14],n.cellDates?(l.t="d",l.w=an(l.z,dr(l.v))):(l.t="n",l.v=dr(l.v),l.w=an(l.z,l.v))):l.t="s";if(i)s[v]||(s[v]=[]),s[v][g]&&s[v][g].z&&(l.z=s[v][g].z),s[v][g]=l;else{var x=ct({c:g,r:v});s[x]&&s[x].z&&(l.z=s[x].z),s[x]=l}}}return u.s.c<1e7&&(s["!ref"]=jt(u)),s}function Zn(e,t){return j0(null,e,t)}function ap(e){return e.read_shift(4,"i")}function Pr(e,t){return t||(t=re(4)),t.write_shift(4,e),t}function nr(e){var t=e.read_shift(4);return t===0?"":e.read_shift(t,"dbcs")}function zt(e,t){var r=!1;return t==null&&(r=!0,t=re(4+2*e.length)),t.write_shift(4,e.length),e.length>0&&t.write_shift(0,e,"dbcs"),r?t.slice(0,t.l):t}function op(e){return{ich:e.read_shift(2),ifnt:e.read_shift(2)}}function lp(e,t){return t||(t=re(4)),t.write_shift(2,0),t.write_shift(2,0),t}function ro(e,t){var r=e.l,n=e.read_shift(1),i=nr(e),s=[],a={t:i,h:i};if((n&1)!==0){for(var o=e.read_shift(4),f=0;f!=o;++f)s.push(op(e));a.r=s}else a.r=[{ich:0,ifnt:0}];return e.l=r+t,a}function cp(e,t){var r=!1;return t==null&&(r=!0,t=re(15+4*e.t.length)),t.write_shift(1,0),zt(e.t,t),r?t.slice(0,t.l):t}var up=ro;function fp(e,t){var r=!1;return t==null&&(r=!0,t=re(23+4*e.t.length)),t.write_shift(1,1),zt(e.t,t),t.write_shift(4,1),lp({},t),r?t.slice(0,t.l):t}function Or(e){var t=e.read_shift(4),r=e.read_shift(2);return r+=e.read_shift(1)<<16,e.l++,{c:t,iStyleRef:r}}function Cn(e,t){return t==null&&(t=re(8)),t.write_shift(-4,e.c),t.write_shift(3,e.iStyleRef||e.s),t.write_shift(1,0),t}function An(e){var t=e.read_shift(2);return t+=e.read_shift(1)<<16,e.l++,{c:-1,iStyleRef:t}}function On(e,t){return t==null&&(t=re(4)),t.write_shift(3,e.iStyleRef||e.s),t.write_shift(1,0),t}var dp=nr,M0=zt;function no(e){var t=e.read_shift(4);return t===0||t===4294967295?"":e.read_shift(t,"dbcs")}function fs(e,t){var r=!1;return t==null&&(r=!0,t=re(127)),t.write_shift(4,e.length>0?e.length:4294967295),e.length>0&&t.write_shift(0,e,"dbcs"),r?t.slice(0,t.l):t}var hp=nr,Oa=no,io=fs;function L0(e){var t=e.slice(e.l,e.l+4),r=t[0]&1,n=t[0]&2;e.l+=4;var i=n===0?us([0,0,0,0,t[0]&252,t[1],t[2],t[3]],0):mn(t,0)>>2;return r?i/100:i}function B0(e,t){t==null&&(t=re(4));var r=0,n=0,i=e*100;if(e==(e|0)&&e>=-536870912&&e<1<<29?n=1:i==(i|0)&&i>=-536870912&&i<1<<29&&(n=1,r=1),n)t.write_shift(-4,((r?i:e)<<2)+(r+2));else throw new Error("unsupported RkNumber "+e)}function $0(e){var t={s:{},e:{}};return t.s.r=e.read_shift(4),t.e.r=e.read_shift(4),t.s.c=e.read_shift(4),t.e.c=e.read_shift(4),t}function pp(e,t){return t||(t=re(16)),t.write_shift(4,e.s.r),t.write_shift(4,e.e.r),t.write_shift(4,e.s.c),t.write_shift(4,e.e.c),t}var Dn=$0,Qn=pp;function ei(e){if(e.length-e.l<8)throw"XLS Xnum Buffer underflow";return e.read_shift(8,"f")}function wn(e,t){return(t||re(8)).write_shift(8,e,"f")}function gp(e){var t={},r=e.read_shift(1),n=r>>>1,i=e.read_shift(1),s=e.read_shift(2,"i"),a=e.read_shift(1),o=e.read_shift(1),f=e.read_shift(1);switch(e.l++,n){case 0:t.auto=1;break;case 1:t.index=i;var u=_p[i];u&&(t.rgb=Al(u));break;case 2:t.rgb=Al([a,o,f]);break;case 3:t.theme=i;break}return s!=0&&(t.tint=s>0?s/32767:s/32768),t}function ds(e,t){if(t||(t=re(8)),!e||e.auto)return t.write_shift(4,0),t.write_shift(4,0),t;e.index!=null?(t.write_shift(1,2),t.write_shift(1,e.index)):e.theme!=null?(t.write_shift(1,6),t.write_shift(1,e.theme)):(t.write_shift(1,5),t.write_shift(1,0));var r=e.tint||0;if(r>0?r*=32767:r<0&&(r*=32768),t.write_shift(2,r),!e.rgb||e.theme!=null)t.write_shift(2,0),t.write_shift(1,0),t.write_shift(1,0);else{var n=e.rgb||"FFFFFF";typeof n=="number"&&(n=("000000"+n.toString(16)).slice(-6)),t.write_shift(1,parseInt(n.slice(0,2),16)),t.write_shift(1,parseInt(n.slice(2,4),16)),t.write_shift(1,parseInt(n.slice(4,6),16)),t.write_shift(1,255)}return t}function mp(e){var t=e.read_shift(1);e.l++;var r={fBold:t&1,fItalic:t&2,fUnderline:t&4,fStrikeout:t&8,fOutline:t&16,fShadow:t&32,fCondense:t&64,fExtend:t&128};return r}function xp(e,t){t||(t=re(2));var r=(e.italic?2:0)|(e.strike?8:0)|(e.outline?16:0)|(e.shadow?32:0)|(e.condense?64:0)|(e.extend?128:0);return t.write_shift(1,r),t.write_shift(1,0),t}var U0=2,mr=3,Vi=11,hs=19,zi=64,vp=65,yp=71,wp=4108,Tp=4126,qt=80,xl={1:{n:"CodePage",t:U0},2:{n:"Category",t:qt},3:{n:"PresentationFormat",t:qt},4:{n:"ByteCount",t:mr},5:{n:"LineCount",t:mr},6:{n:"ParagraphCount",t:mr},7:{n:"SlideCount",t:mr},8:{n:"NoteCount",t:mr},9:{n:"HiddenCount",t:mr},10:{n:"MultimediaClipCount",t:mr},11:{n:"ScaleCrop",t:Vi},12:{n:"HeadingPairs",t:wp},13:{n:"TitlesOfParts",t:Tp},14:{n:"Manager",t:qt},15:{n:"Company",t:qt},16:{n:"LinksUpToDate",t:Vi},17:{n:"CharacterCount",t:mr},19:{n:"SharedDoc",t:Vi},22:{n:"HyperlinksChanged",t:Vi},23:{n:"AppVersion",t:mr,p:"version"},24:{n:"DigSig",t:vp},26:{n:"ContentType",t:qt},27:{n:"ContentStatus",t:qt},28:{n:"Language",t:qt},29:{n:"Version",t:qt},255:{},2147483648:{n:"Locale",t:hs},2147483651:{n:"Behavior",t:hs},1919054434:{}},vl={1:{n:"CodePage",t:U0},2:{n:"Title",t:qt},3:{n:"Subject",t:qt},4:{n:"Author",t:qt},5:{n:"Keywords",t:qt},6:{n:"Comments",t:qt},7:{n:"Template",t:qt},8:{n:"LastAuthor",t:qt},9:{n:"RevNumber",t:qt},10:{n:"EditTime",t:zi},11:{n:"LastPrinted",t:zi},12:{n:"CreatedDate",t:zi},13:{n:"ModifiedDate",t:zi},14:{n:"PageCount",t:mr},15:{n:"WordCount",t:mr},16:{n:"CharCount",t:mr},17:{n:"Thumbnail",t:yp},18:{n:"Application",t:qt},19:{n:"DocSecurity",t:mr},255:{},2147483648:{n:"Locale",t:hs},2147483651:{n:"Behavior",t:hs},1919054434:{}};function Sp(e){return e.map(function(t){return[t>>16&255,t>>8&255,t&255]})}var Ep=Sp([0,16777215,16711680,65280,255,16776960,16711935,65535,0,16777215,16711680,65280,255,16776960,16711935,65535,8388608,32768,128,8421376,8388736,32896,12632256,8421504,10066431,10040166,16777164,13434879,6684774,16744576,26316,13421823,128,16711935,16776960,65535,8388736,8388608,32896,255,52479,13434879,13434828,16777113,10079487,16751052,13408767,16764057,3368703,3394764,10079232,16763904,16750848,16737792,6710937,9868950,13158,3381606,13056,3355392,10040064,10040166,3355545,3355443,16777215,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]),_p=hr(Ep),Ii={0:"#NULL!",7:"#DIV/0!",15:"#VALUE!",23:"#REF!",29:"#NAME?",36:"#NUM!",42:"#N/A",43:"#GETTING_DATA",255:"#WTF?"},bp={"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet.main+xml":"workbooks","application/vnd.ms-excel.sheet.macroEnabled.main+xml":"workbooks","application/vnd.ms-excel.sheet.binary.macroEnabled.main":"workbooks","application/vnd.ms-excel.addin.macroEnabled.main+xml":"workbooks","application/vnd.openxmlformats-officedocument.spreadsheetml.template.main+xml":"workbooks","application/vnd.openxmlformats-officedocument.spreadsheetml.worksheet+xml":"sheets","application/vnd.ms-excel.worksheet":"sheets","application/vnd.ms-excel.binIndexWs":"TODO","application/vnd.openxmlformats-officedocument.spreadsheetml.chartsheet+xml":"charts","application/vnd.ms-excel.chartsheet":"charts","application/vnd.ms-excel.macrosheet+xml":"macros","application/vnd.ms-excel.macrosheet":"macros","application/vnd.ms-excel.intlmacrosheet":"TODO","application/vnd.ms-excel.binIndexMs":"TODO","application/vnd.openxmlformats-officedocument.spreadsheetml.dialogsheet+xml":"dialogs","application/vnd.ms-excel.dialogsheet":"dialogs","application/vnd.openxmlformats-officedocument.spreadsheetml.sharedStrings+xml":"strs","application/vnd.ms-excel.sharedStrings":"strs","application/vnd.openxmlformats-officedocument.spreadsheetml.styles+xml":"styles","application/vnd.ms-excel.styles":"styles","application/vnd.openxmlformats-package.core-properties+xml":"coreprops","application/vnd.openxmlformats-officedocument.custom-properties+xml":"custprops","application/vnd.openxmlformats-officedocument.extended-properties+xml":"extprops","application/vnd.openxmlformats-officedocument.customXmlProperties+xml":"TODO","application/vnd.openxmlformats-officedocument.spreadsheetml.customProperty":"TODO","application/vnd.openxmlformats-officedocument.spreadsheetml.comments+xml":"comments","application/vnd.ms-excel.comments":"comments","application/vnd.ms-excel.threadedcomments+xml":"threadedcomments","application/vnd.ms-excel.person+xml":"people","application/vnd.openxmlformats-officedocument.spreadsheetml.sheetMetadata+xml":"metadata","application/vnd.ms-excel.sheetMetadata":"metadata","application/vnd.ms-excel.pivotTable":"TODO","application/vnd.openxmlformats-officedocument.spreadsheetml.pivotTable+xml":"TODO","application/vnd.openxmlformats-officedocument.drawingml.chart+xml":"TODO","application/vnd.ms-office.chartcolorstyle+xml":"TODO","application/vnd.ms-office.chartstyle+xml":"TODO","application/vnd.ms-office.chartex+xml":"TODO","application/vnd.ms-excel.calcChain":"calcchains","application/vnd.openxmlformats-officedocument.spreadsheetml.calcChain+xml":"calcchains","application/vnd.openxmlformats-officedocument.spreadsheetml.printerSettings":"TODO","application/vnd.ms-office.activeX":"TODO","application/vnd.ms-office.activeX+xml":"TODO","application/vnd.ms-excel.attachedToolbars":"TODO","application/vnd.ms-excel.connections":"TODO","application/vnd.openxmlformats-officedocument.spreadsheetml.connections+xml":"TODO","application/vnd.ms-excel.externalLink":"links","application/vnd.openxmlformats-officedocument.spreadsheetml.externalLink+xml":"links","application/vnd.ms-excel.pivotCacheDefinition":"TODO","application/vnd.ms-excel.pivotCacheRecords":"TODO","application/vnd.openxmlformats-officedocument.spreadsheetml.pivotCacheDefinition+xml":"TODO","application/vnd.openxmlformats-officedocument.spreadsheetml.pivotCacheRecords+xml":"TODO","application/vnd.ms-excel.queryTable":"TODO","application/vnd.openxmlformats-officedocument.spreadsheetml.queryTable+xml":"TODO","application/vnd.ms-excel.userNames":"TODO","application/vnd.ms-excel.revisionHeaders":"TODO","application/vnd.ms-excel.revisionLog":"TODO","application/vnd.openxmlformats-officedocument.spreadsheetml.revisionHeaders+xml":"TODO","application/vnd.openxmlformats-officedocument.spreadsheetml.revisionLog+xml":"TODO","application/vnd.openxmlformats-officedocument.spreadsheetml.userNames+xml":"TODO","application/vnd.ms-excel.tableSingleCells":"TODO","application/vnd.openxmlformats-officedocument.spreadsheetml.tableSingleCells+xml":"TODO","application/vnd.ms-excel.slicer":"TODO","application/vnd.ms-excel.slicerCache":"TODO","application/vnd.ms-excel.slicer+xml":"TODO","application/vnd.ms-excel.slicerCache+xml":"TODO","application/vnd.ms-excel.wsSortMap":"TODO","application/vnd.ms-excel.table":"TODO","application/vnd.openxmlformats-officedocument.spreadsheetml.table+xml":"TODO","application/vnd.openxmlformats-officedocument.theme+xml":"themes","application/vnd.openxmlformats-officedocument.themeOverride+xml":"TODO","application/vnd.ms-excel.Timeline+xml":"TODO","application/vnd.ms-excel.TimelineCache+xml":"TODO","application/vnd.ms-office.vbaProject":"vba","application/vnd.ms-office.vbaProjectSignature":"TODO","application/vnd.ms-office.volatileDependencies":"TODO","application/vnd.openxmlformats-officedocument.spreadsheetml.volatileDependencies+xml":"TODO","application/vnd.ms-excel.controlproperties+xml":"TODO","application/vnd.openxmlformats-officedocument.model+data":"TODO","application/vnd.ms-excel.Survey+xml":"TODO","application/vnd.openxmlformats-officedocument.drawing+xml":"drawings","application/vnd.openxmlformats-officedocument.drawingml.chartshapes+xml":"TODO","application/vnd.openxmlformats-officedocument.drawingml.diagramColors+xml":"TODO","application/vnd.openxmlformats-officedocument.drawingml.diagramData+xml":"TODO","application/vnd.openxmlformats-officedocument.drawingml.diagramLayout+xml":"TODO","application/vnd.openxmlformats-officedocument.drawingml.diagramStyle+xml":"TODO","application/vnd.openxmlformats-officedocument.vmlDrawing":"TODO","application/vnd.openxmlformats-package.relationships+xml":"rels","application/vnd.openxmlformats-officedocument.oleObject":"TODO","image/png":"TODO",sheet:"js"},Hi={workbooks:{xlsx:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet.main+xml",xlsm:"application/vnd.ms-excel.sheet.macroEnabled.main+xml",xlsb:"application/vnd.ms-excel.sheet.binary.macroEnabled.main",xlam:"application/vnd.ms-excel.addin.macroEnabled.main+xml",xltx:"application/vnd.openxmlformats-officedocument.spreadsheetml.template.main+xml"},strs:{xlsx:"application/vnd.openxmlformats-officedocument.spreadsheetml.sharedStrings+xml",xlsb:"application/vnd.ms-excel.sharedStrings"},comments:{xlsx:"application/vnd.openxmlformats-officedocument.spreadsheetml.comments+xml",xlsb:"application/vnd.ms-excel.comments"},sheets:{xlsx:"application/vnd.openxmlformats-officedocument.spreadsheetml.worksheet+xml",xlsb:"application/vnd.ms-excel.worksheet"},charts:{xlsx:"application/vnd.openxmlformats-officedocument.spreadsheetml.chartsheet+xml",xlsb:"application/vnd.ms-excel.chartsheet"},dialogs:{xlsx:"application/vnd.openxmlformats-officedocument.spreadsheetml.dialogsheet+xml",xlsb:"application/vnd.ms-excel.dialogsheet"},macros:{xlsx:"application/vnd.ms-excel.macrosheet+xml",xlsb:"application/vnd.ms-excel.macrosheet"},metadata:{xlsx:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheetMetadata+xml",xlsb:"application/vnd.ms-excel.sheetMetadata"},styles:{xlsx:"application/vnd.openxmlformats-officedocument.spreadsheetml.styles+xml",xlsb:"application/vnd.ms-excel.styles"}};function W0(){return{workbooks:[],sheets:[],charts:[],dialogs:[],macros:[],rels:[],strs:[],comments:[],threadedcomments:[],links:[],coreprops:[],extprops:[],custprops:[],themes:[],styles:[],calcchains:[],vba:[],drawings:[],metadata:[],people:[],TODO:[],xmlns:""}}function V0(e,t){var r=Ph(bp),n=[],i;n[n.length]=Mt,n[n.length]=xe("Types",null,{xmlns:Wt.CT,"xmlns:xsd":Wt.xsd,"xmlns:xsi":Wt.xsi}),n=n.concat([["xml","application/xml"],["bin","application/vnd.ms-excel.sheet.binary.macroEnabled.main"],["vml","application/vnd.openxmlformats-officedocument.vmlDrawing"],["data","application/vnd.openxmlformats-officedocument.model+data"],["bmp","image/bmp"],["png","image/png"],["gif","image/gif"],["emf","image/x-emf"],["wmf","image/x-wmf"],["jpg","image/jpeg"],["jpeg","image/jpeg"],["tif","image/tiff"],["tiff","image/tiff"],["pdf","application/pdf"],["rels","application/vnd.openxmlformats-package.relationships+xml"]].map(function(f){return xe("Default",null,{Extension:f[0],ContentType:f[1]})}));var s=function(f){e[f]&&e[f].length>0&&(i=e[f][0],n[n.length]=xe("Override",null,{PartName:(i[0]=="/"?"":"/")+i,ContentType:Hi[f][t.bookType]||Hi[f].xlsx}))},a=function(f){(e[f]||[]).forEach(function(u){n[n.length]=xe("Override",null,{PartName:(u[0]=="/"?"":"/")+u,ContentType:Hi[f][t.bookType]||Hi[f].xlsx})})},o=function(f){(e[f]||[]).forEach(function(u){n[n.length]=xe("Override",null,{PartName:(u[0]=="/"?"":"/")+u,ContentType:r[f][0]})})};return s("workbooks"),a("sheets"),a("charts"),o("themes"),["strs","styles"].forEach(s),["coreprops","extprops","custprops"].forEach(o),o("vba"),o("comments"),o("threadedcomments"),o("drawings"),a("metadata"),o("people"),n.length>2&&(n[n.length]="</Types>",n[1]=n[1].replace("/>",">")),n.join("")}var Ke={WB:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/officeDocument",HLINK:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/hyperlink",VML:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/vmlDrawing",XPATH:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/externalLinkPath",XMISS:"http://schemas.microsoft.com/office/2006/relationships/xlExternalLinkPath/xlPathMissing",CMNT:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/comments",CORE_PROPS:"http://schemas.openxmlformats.org/package/2006/relationships/metadata/core-properties",EXT_PROPS:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/extended-properties",CUST_PROPS:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/custom-properties",SST:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/sharedStrings",STY:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/styles",THEME:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/theme",WS:["http://schemas.openxmlformats.org/officeDocument/2006/relationships/worksheet","http://purl.oclc.org/ooxml/officeDocument/relationships/worksheet"],DRAW:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/drawing",XLMETA:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/sheetMetadata",TCMNT:"http://schemas.microsoft.com/office/2017/10/relationships/threadedComment",PEOPLE:"http://schemas.microsoft.com/office/2017/10/relationships/person",VBA:"http://schemas.microsoft.com/office/2006/relationships/vbaProject"};function z0(e){var t=e.lastIndexOf("/");return e.slice(0,t+1)+"_rels/"+e.slice(t+1)+".rels"}function Gn(e){var t=[Mt,xe("Relationships",null,{xmlns:Wt.RELS})];return er(e["!id"]).forEach(function(r){t[t.length]=xe("Relationship",null,e["!id"][r])}),t.length>2&&(t[t.length]="</Relationships>",t[1]=t[1].replace("/>",">")),t.join("")}function ot(e,t,r,n,i,s){if(i||(i={}),e["!id"]||(e["!id"]={}),e["!idx"]||(e["!idx"]=1),t<0)for(t=e["!idx"];e["!id"]["rId"+t];++t);if(e["!idx"]=t+1,i.Id="rId"+t,i.Type=n,i.Target=r,[Ke.HLINK,Ke.XPATH,Ke.XMISS].indexOf(i.Type)>-1&&(i.TargetMode="External"),e["!id"][i.Id])throw new Error("Cannot rewrite rId "+t);return e["!id"][i.Id]=i,e[("/"+i.Target).replace("//","/")]=i,t}function Cp(e){var t=[Mt];t.push(`<manifest:manifest xmlns:manifest="urn:oasis:names:tc:opendocument:xmlns:manifest:1.0" manifest:version="1.2">
14
+ `),t.push(` <manifest:file-entry manifest:full-path="/" manifest:version="1.2" manifest:media-type="application/vnd.oasis.opendocument.spreadsheet"/>
15
+ `);for(var r=0;r<e.length;++r)t.push(' <manifest:file-entry manifest:full-path="'+e[r][0]+'" manifest:media-type="'+e[r][1]+`"/>
16
+ `);return t.push("</manifest:manifest>"),t.join("")}function yl(e,t,r){return[' <rdf:Description rdf:about="'+e+`">
17
+ `,' <rdf:type rdf:resource="http://docs.oasis-open.org/ns/office/1.2/meta/'+(r||"odf")+"#"+t+`"/>
18
+ `,` </rdf:Description>
19
+ `].join("")}function Ap(e,t){return[' <rdf:Description rdf:about="'+e+`">
20
+ `,' <ns0:hasPart xmlns:ns0="http://docs.oasis-open.org/ns/office/1.2/meta/pkg#" rdf:resource="'+t+`"/>
21
+ `,` </rdf:Description>
22
+ `].join("")}function Op(e){var t=[Mt];t.push(`<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
23
+ `);for(var r=0;r!=e.length;++r)t.push(yl(e[r][0],e[r][1])),t.push(Ap("",e[r][0]));return t.push(yl("","Document","pkg")),t.push("</rdf:RDF>"),t.join("")}function H0(){return'<office:document-meta xmlns:office="urn:oasis:names:tc:opendocument:xmlns:office:1.0" xmlns:meta="urn:oasis:names:tc:opendocument:xmlns:meta:1.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:xlink="http://www.w3.org/1999/xlink" office:version="1.2"><office:meta><meta:generator>SheetJS '+is.version+"</meta:generator></office:meta></office:document-meta>"}var xn=[["cp:category","Category"],["cp:contentStatus","ContentStatus"],["cp:keywords","Keywords"],["cp:lastModifiedBy","LastAuthor"],["cp:lastPrinted","LastPrinted"],["cp:revision","RevNumber"],["cp:version","Version"],["dc:creator","Author"],["dc:description","Comments"],["dc:identifier","Identifier"],["dc:language","Language"],["dc:subject","Subject"],["dc:title","Title"],["dcterms:created","CreatedDate","date"],["dcterms:modified","ModifiedDate","date"]];function na(e,t,r,n,i){i[e]!=null||t==null||t===""||(i[e]=t,t=lt(t),n[n.length]=r?xe(e,t,r):Zt(e,t))}function G0(e,t){var r=t||{},n=[Mt,xe("cp:coreProperties",null,{"xmlns:cp":Wt.CORE_PROPS,"xmlns:dc":Wt.dc,"xmlns:dcterms":Wt.dcterms,"xmlns:dcmitype":Wt.dcmitype,"xmlns:xsi":Wt.xsi})],i={};if(!e&&!r.Props)return n.join("");e&&(e.CreatedDate!=null&&na("dcterms:created",typeof e.CreatedDate=="string"?e.CreatedDate:Aa(e.CreatedDate,r.WTF),{"xsi:type":"dcterms:W3CDTF"},n,i),e.ModifiedDate!=null&&na("dcterms:modified",typeof e.ModifiedDate=="string"?e.ModifiedDate:Aa(e.ModifiedDate,r.WTF),{"xsi:type":"dcterms:W3CDTF"},n,i));for(var s=0;s!=xn.length;++s){var a=xn[s],o=r.Props&&r.Props[a[1]]!=null?r.Props[a[1]]:e?e[a[1]]:null;o===!0?o="1":o===!1?o="0":typeof o=="number"&&(o=String(o)),o!=null&&na(a[0],o,null,n,i)}return n.length>2&&(n[n.length]="</cp:coreProperties>",n[1]=n[1].replace("/>",">")),n.join("")}var Yn=[["Application","Application","string"],["AppVersion","AppVersion","string"],["Company","Company","string"],["DocSecurity","DocSecurity","string"],["Manager","Manager","string"],["HyperlinksChanged","HyperlinksChanged","bool"],["SharedDoc","SharedDoc","bool"],["LinksUpToDate","LinksUpToDate","bool"],["ScaleCrop","ScaleCrop","bool"],["HeadingPairs","HeadingPairs","raw"],["TitlesOfParts","TitlesOfParts","raw"]],Y0=["Worksheets","SheetNames","NamedRanges","DefinedNames","Chartsheets","ChartNames"];function X0(e){var t=[],r=xe;return e||(e={}),e.Application="SheetJS",t[t.length]=Mt,t[t.length]=xe("Properties",null,{xmlns:Wt.EXT_PROPS,"xmlns:vt":Wt.vt}),Yn.forEach(function(n){if(e[n[1]]!==void 0){var i;switch(n[2]){case"string":i=lt(String(e[n[1]]));break;case"bool":i=e[n[1]]?"true":"false";break}i!==void 0&&(t[t.length]=r(n[0],i))}}),t[t.length]=r("HeadingPairs",r("vt:vector",r("vt:variant","<vt:lpstr>Worksheets</vt:lpstr>")+r("vt:variant",r("vt:i4",String(e.Worksheets))),{size:2,baseType:"variant"})),t[t.length]=r("TitlesOfParts",r("vt:vector",e.SheetNames.map(function(n){return"<vt:lpstr>"+lt(n)+"</vt:lpstr>"}).join(""),{size:e.Worksheets,baseType:"lpstr"})),t.length>2&&(t[t.length]="</Properties>",t[1]=t[1].replace("/>",">")),t.join("")}function K0(e){var t=[Mt,xe("Properties",null,{xmlns:Wt.CUST_PROPS,"xmlns:vt":Wt.vt})];if(!e)return t.join("");var r=1;return er(e).forEach(function(i){++r,t[t.length]=xe("property",Gh(e[i]),{fmtid:"{D5CDD505-2E9C-101B-9397-08002B2CF9AE}",pid:r,name:lt(i)})}),t.length>2&&(t[t.length]="</Properties>",t[1]=t[1].replace("/>",">")),t.join("")}var wl={Title:"Title",Subject:"Subject",Author:"Author",Keywords:"Keywords",Comments:"Description",LastAuthor:"LastAuthor",RevNumber:"Revision",Application:"AppName",LastPrinted:"LastPrinted",CreatedDate:"Created",ModifiedDate:"LastSaved",Category:"Category",Manager:"Manager",Company:"Company",AppVersion:"Version",ContentStatus:"ContentStatus",Identifier:"Identifier",Language:"Language"};function Dp(e,t){var r=[];return er(wl).map(function(n){for(var i=0;i<xn.length;++i)if(xn[i][1]==n)return xn[i];for(i=0;i<Yn.length;++i)if(Yn[i][1]==n)return Yn[i];throw n}).forEach(function(n){if(e[n[1]]!=null){var i=t&&t.Props&&t.Props[n[1]]!=null?t.Props[n[1]]:e[n[1]];switch(n[2]){case"date":i=new Date(i).toISOString().replace(/\.\d*Z/,"Z");break}typeof i=="number"?i=String(i):i===!0||i===!1?i=i?"1":"0":i instanceof Date&&(i=new Date(i).toISOString().replace(/\.\d*Z/,"")),r.push(Zt(wl[n[1]]||n[1],i))}}),xe("DocumentProperties",r.join(""),{xmlns:vr.o})}function kp(e,t){var r=["Worksheets","SheetNames"],n="CustomDocumentProperties",i=[];return e&&er(e).forEach(function(s){if(Object.prototype.hasOwnProperty.call(e,s)){for(var a=0;a<xn.length;++a)if(s==xn[a][1])return;for(a=0;a<Yn.length;++a)if(s==Yn[a][1])return;for(a=0;a<r.length;++a)if(s==r[a])return;var o=e[s],f="string";typeof o=="number"?(f="float",o=String(o)):o===!0||o===!1?(f="boolean",o=o?"1":"0"):o=String(o),i.push(xe(ol(s),o,{"dt:dt":f}))}}),t&&er(t).forEach(function(s){if(Object.prototype.hasOwnProperty.call(t,s)&&!(e&&Object.prototype.hasOwnProperty.call(e,s))){var a=t[s],o="string";typeof a=="number"?(o="float",a=String(a)):a===!0||a===!1?(o="boolean",a=a?"1":"0"):a instanceof Date?(o="dateTime.tz",a=a.toISOString()):a=String(a),i.push(xe(ol(s),a,{"dt:dt":o}))}}),"<"+n+' xmlns="'+vr.o+'">'+i.join("")+"</"+n+">"}function Ip(e){var t=typeof e=="string"?new Date(Date.parse(e)):e,r=t.getTime()/1e3+11644473600,n=r%Math.pow(2,32),i=(r-n)/Math.pow(2,32);n*=1e7,i*=1e7;var s=n/Math.pow(2,32)|0;s>0&&(n=n%Math.pow(2,32),i+=s);var a=re(8);return a.write_shift(4,n),a.write_shift(4,i),a}function Tl(e,t){var r=re(4),n=re(4);switch(r.write_shift(4,e==80?31:e),e){case 3:n.write_shift(-4,t);break;case 5:n=re(8),n.write_shift(8,t,"f");break;case 11:n.write_shift(4,t?1:0);break;case 64:n=Ip(t);break;case 31:case 80:for(n=re(4+2*(t.length+1)+(t.length%2?0:2)),n.write_shift(4,t.length+1),n.write_shift(0,t,"dbcs");n.l!=n.length;)n.write_shift(1,0);break;default:throw new Error("TypedPropertyValue unrecognized type "+e+" "+t)}return Jt([r,n])}var q0=["CodePage","Thumbnail","_PID_LINKBASE","_PID_HLINKS","SystemIdentifier","FMTID"];function Fp(e){switch(typeof e){case"boolean":return 11;case"number":return(e|0)==e?3:5;case"string":return 31;case"object":if(e instanceof Date)return 64;break}return-1}function Sl(e,t,r){var n=re(8),i=[],s=[],a=8,o=0,f=re(8),u=re(8);if(f.write_shift(4,2),f.write_shift(4,1200),u.write_shift(4,1),s.push(f),i.push(u),a+=8+f.length,!t){u=re(8),u.write_shift(4,0),i.unshift(u);var d=[re(4)];for(d[0].write_shift(4,e.length),o=0;o<e.length;++o){var h=e[o][0];for(f=re(8+2*(h.length+1)+(h.length%2?0:2)),f.write_shift(4,o+2),f.write_shift(4,h.length+1),f.write_shift(0,h,"dbcs");f.l!=f.length;)f.write_shift(1,0);d.push(f)}f=Jt(d),s.unshift(f),a+=8+f.length}for(o=0;o<e.length;++o)if(!(t&&!t[e[o][0]])&&!(q0.indexOf(e[o][0])>-1||Y0.indexOf(e[o][0])>-1)&&e[o][1]!=null){var m=e[o][1],l=0;if(t){l=+t[e[o][0]];var v=r[l];if(v.p=="version"&&typeof m=="string"){var g=m.split(".");m=(+g[0]<<16)+(+g[1]||0)}f=Tl(v.t,m)}else{var x=Fp(m);x==-1&&(x=31,m=String(m)),f=Tl(x,m)}s.push(f),u=re(8),u.write_shift(4,t?l:2+o),i.push(u),a+=8+f.length}var T=8*(s.length+1);for(o=0;o<s.length;++o)i[o].write_shift(4,T),T+=s[o].length;return n.write_shift(4,a),n.write_shift(4,s.length),Jt([n].concat(i).concat(s))}function El(e,t,r,n,i,s){var a=re(i?68:48),o=[a];a.write_shift(2,65534),a.write_shift(2,0),a.write_shift(4,842412599),a.write_shift(16,ht.utils.consts.HEADER_CLSID,"hex"),a.write_shift(4,i?2:1),a.write_shift(16,t,"hex"),a.write_shift(4,i?68:48);var f=Sl(e,r,n);if(o.push(f),i){var u=Sl(i,null,null);a.write_shift(16,s,"hex"),a.write_shift(4,68+f.length),o.push(u)}return Jt(o)}function Np(e,t){t||(t=re(e));for(var r=0;r<e;++r)t.write_shift(1,0);return t}function Rp(e,t){return e.read_shift(t)===1}function or(e,t){return t||(t=re(2)),t.write_shift(2,+!!e),t}function J0(e){return e.read_shift(2,"u")}function br(e,t){return t||(t=re(2)),t.write_shift(2,e),t}function Z0(e,t,r){return r||(r=re(2)),r.write_shift(1,t=="e"?+e:+!!e),r.write_shift(1,t=="e"?1:0),r}function Q0(e,t,r){var n=e.read_shift(r&&r.biff>=12?2:1),i="sbcs-cont";if(r&&r.biff>=8,!r||r.biff==8){var s=e.read_shift(1);s&&(i="dbcs-cont")}else r.biff==12&&(i="wstr");r.biff>=2&&r.biff<=5&&(i="cpstr");var a=n?e.read_shift(n,i):"";return a}function Pp(e){var t=e.t||"",r=re(3);r.write_shift(2,t.length),r.write_shift(1,1);var n=re(2*t.length);n.write_shift(2*t.length,t,"utf16le");var i=[r,n];return Jt(i)}function jp(e,t,r){var n;if(r){if(r.biff>=2&&r.biff<=5)return e.read_shift(t,"cpstr");if(r.biff>=12)return e.read_shift(t,"dbcs-cont")}var i=e.read_shift(1);return i===0?n=e.read_shift(t,"sbcs-cont"):n=e.read_shift(t,"dbcs-cont"),n}function Mp(e,t,r){var n=e.read_shift(r&&r.biff==2?1:2);return n===0?(e.l++,""):jp(e,n,r)}function Lp(e,t,r){if(r.biff>5)return Mp(e,t,r);var n=e.read_shift(1);return n===0?(e.l++,""):e.read_shift(n,r.biff<=4||!e.lens?"cpstr":"sbcs-cont")}function eu(e,t,r){return r||(r=re(3+2*e.length)),r.write_shift(2,e.length),r.write_shift(1,1),r.write_shift(31,e,"utf16le"),r}function _l(e,t){t||(t=re(6+e.length*2)),t.write_shift(4,1+e.length);for(var r=0;r<e.length;++r)t.write_shift(2,e.charCodeAt(r));return t.write_shift(2,0),t}function Bp(e){var t=re(512),r=0,n=e.Target;n.slice(0,7)=="file://"&&(n=n.slice(7));var i=n.indexOf("#"),s=i>-1?31:23;switch(n.charAt(0)){case"#":s=28;break;case".":s&=-3;break}t.write_shift(4,2),t.write_shift(4,s);var a=[8,6815827,6619237,4849780,83];for(r=0;r<a.length;++r)t.write_shift(4,a[r]);if(s==28)n=n.slice(1),_l(n,t);else if(s&2){for(a="e0 c9 ea 79 f9 ba ce 11 8c 82 00 aa 00 4b a9 0b".split(" "),r=0;r<a.length;++r)t.write_shift(1,parseInt(a[r],16));var o=i>-1?n.slice(0,i):n;for(t.write_shift(4,2*(o.length+1)),r=0;r<o.length;++r)t.write_shift(2,o.charCodeAt(r));t.write_shift(2,0),s&8&&_l(i>-1?n.slice(i+1):"",t)}else{for(a="03 03 00 00 00 00 00 00 c0 00 00 00 00 00 00 46".split(" "),r=0;r<a.length;++r)t.write_shift(1,parseInt(a[r],16));for(var f=0;n.slice(f*3,f*3+3)=="../"||n.slice(f*3,f*3+3)=="..\\";)++f;for(t.write_shift(2,f),t.write_shift(4,n.length-3*f+1),r=0;r<n.length-3*f;++r)t.write_shift(1,n.charCodeAt(r+3*f)&255);for(t.write_shift(1,0),t.write_shift(2,65535),t.write_shift(2,57005),r=0;r<6;++r)t.write_shift(4,0)}return t.slice(0,t.l)}function Tn(e,t,r,n){return n||(n=re(6)),n.write_shift(2,e),n.write_shift(2,t),n.write_shift(2,r||0),n}function $p(e,t,r){var n=r.biff>8?4:2,i=e.read_shift(n),s=e.read_shift(n,"i"),a=e.read_shift(n,"i");return[i,s,a]}function Up(e){var t=e.read_shift(2),r=e.read_shift(2),n=e.read_shift(2),i=e.read_shift(2);return{s:{c:n,r:t},e:{c:i,r}}}function tu(e,t){return t||(t=re(8)),t.write_shift(2,e.s.r),t.write_shift(2,e.e.r),t.write_shift(2,e.s.c),t.write_shift(2,e.e.c),t}function so(e,t,r){var n=1536,i=16;switch(r.bookType){case"biff8":break;case"biff5":n=1280,i=8;break;case"biff4":n=4,i=6;break;case"biff3":n=3,i=6;break;case"biff2":n=2,i=4;break;case"xla":break;default:throw new Error("unsupported BIFF version")}var s=re(i);return s.write_shift(2,n),s.write_shift(2,t),i>4&&s.write_shift(2,29282),i>6&&s.write_shift(2,1997),i>8&&(s.write_shift(2,49161),s.write_shift(2,1),s.write_shift(2,1798),s.write_shift(2,0)),s}function Wp(e,t){var r=!t||t.biff==8,n=re(r?112:54);for(n.write_shift(t.biff==8?2:1,7),r&&n.write_shift(1,0),n.write_shift(4,859007059),n.write_shift(4,5458548|(r?0:536870912));n.l<n.length;)n.write_shift(1,r?0:32);return n}function Vp(e,t){var r=!t||t.biff>=8?2:1,n=re(8+r*e.name.length);n.write_shift(4,e.pos),n.write_shift(1,e.hs||0),n.write_shift(1,e.dt),n.write_shift(1,e.name.length),t.biff>=8&&n.write_shift(1,1),n.write_shift(r*e.name.length,e.name,t.biff<8?"sbcs":"utf16le");var i=n.slice(0,n.l);return i.l=n.l,i}function zp(e,t){var r=re(8);r.write_shift(4,e.Count),r.write_shift(4,e.Unique);for(var n=[],i=0;i<e.length;++i)n[i]=Pp(e[i]);var s=Jt([r].concat(n));return s.parts=[r.length].concat(n.map(function(a){return a.length})),s}function Hp(){var e=re(18);return e.write_shift(2,0),e.write_shift(2,0),e.write_shift(2,29280),e.write_shift(2,17600),e.write_shift(2,56),e.write_shift(2,0),e.write_shift(2,0),e.write_shift(2,1),e.write_shift(2,500),e}function Gp(e){var t=re(18),r=1718;return e&&e.RTL&&(r|=64),t.write_shift(2,r),t.write_shift(4,0),t.write_shift(4,64),t.write_shift(4,0),t.write_shift(4,0),t}function Yp(e,t){var r=e.name||"Arial",n=t&&t.biff==5,i=n?15+r.length:16+2*r.length,s=re(i);return s.write_shift(2,e.sz*20),s.write_shift(4,0),s.write_shift(2,400),s.write_shift(4,0),s.write_shift(2,0),s.write_shift(1,r.length),n||s.write_shift(1,1),s.write_shift((n?1:2)*r.length,r,n?"sbcs":"utf16le"),s}function Xp(e,t,r,n){var i=re(10);return Tn(e,t,n,i),i.write_shift(4,r),i}function Kp(e,t,r,n,i){var s=!i||i.biff==8,a=re(8+ +s+(1+s)*r.length);return Tn(e,t,n,a),a.write_shift(2,r.length),s&&a.write_shift(1,1),a.write_shift((1+s)*r.length,r,s?"utf16le":"sbcs"),a}function qp(e,t,r,n){var i=r&&r.biff==5;n||(n=re(i?3+t.length:5+2*t.length)),n.write_shift(2,e),n.write_shift(i?1:2,t.length),i||n.write_shift(1,1),n.write_shift((i?1:2)*t.length,t,i?"sbcs":"utf16le");var s=n.length>n.l?n.slice(0,n.l):n;return s.l==null&&(s.l=s.length),s}function Jp(e,t){var r=t.biff==8||!t.biff?4:2,n=re(2*r+6);return n.write_shift(r,e.s.r),n.write_shift(r,e.e.r+1),n.write_shift(2,e.s.c),n.write_shift(2,e.e.c+1),n.write_shift(2,0),n}function bl(e,t,r,n){var i=r&&r.biff==5;n||(n=re(i?16:20)),n.write_shift(2,0),e.style?(n.write_shift(2,e.numFmtId||0),n.write_shift(2,65524)):(n.write_shift(2,e.numFmtId||0),n.write_shift(2,t<<4));var s=0;return e.numFmtId>0&&i&&(s|=1024),n.write_shift(4,s),n.write_shift(4,0),i||n.write_shift(4,0),n.write_shift(2,0),n}function Zp(e){var t=re(8);return t.write_shift(4,0),t.write_shift(2,0),t.write_shift(2,0),t}function Qp(e,t,r,n,i,s){var a=re(8);return Tn(e,t,n,a),Z0(r,s,a),a}function eg(e,t,r,n){var i=re(14);return Tn(e,t,n,i),wn(r,i),i}function tg(e,t,r){if(r.biff<8)return rg(e,t,r);for(var n=[],i=e.l+t,s=e.read_shift(r.biff>8?4:2);s--!==0;)n.push($p(e,r.biff>8?12:6,r));if(e.l!=i)throw new Error("Bad ExternSheet: "+e.l+" != "+i);return n}function rg(e,t,r){e[e.l+1]==3&&e[e.l]++;var n=Q0(e,t,r);return n.charCodeAt(0)==3?n.slice(1):n}function ng(e){var t=re(2+e.length*8);t.write_shift(2,e.length);for(var r=0;r<e.length;++r)tu(e[r],t);return t}function ig(e){var t=re(24),r=Vt(e[0]);t.write_shift(2,r.r),t.write_shift(2,r.r),t.write_shift(2,r.c),t.write_shift(2,r.c);for(var n="d0 c9 ea 79 f9 ba ce 11 8c 82 00 aa 00 4b a9 0b".split(" "),i=0;i<16;++i)t.write_shift(1,parseInt(n[i],16));return Jt([t,Bp(e[1])])}function sg(e){var t=e[1].Tooltip,r=re(10+2*(t.length+1));r.write_shift(2,2048);var n=Vt(e[0]);r.write_shift(2,n.r),r.write_shift(2,n.r),r.write_shift(2,n.c),r.write_shift(2,n.c);for(var i=0;i<t.length;++i)r.write_shift(2,t.charCodeAt(i));return r.write_shift(2,0),r}function ag(e){return e||(e=re(4)),e.write_shift(2,1),e.write_shift(2,1),e}function og(e,t,r){if(!r.cellStyles)return Wr(e,t);var n=r&&r.biff>=12?4:2,i=e.read_shift(n),s=e.read_shift(n),a=e.read_shift(n),o=e.read_shift(n),f=e.read_shift(2);n==2&&(e.l+=2);var u={s:i,e:s,w:a,ixfe:o,flags:f};return(r.biff>=5||!r.biff)&&(u.level=f>>8&7),u}function lg(e,t){var r=re(12);r.write_shift(2,t),r.write_shift(2,t),r.write_shift(2,e.width*256),r.write_shift(2,0);var n=0;return e.hidden&&(n|=1),r.write_shift(1,n),n=e.level||0,r.write_shift(1,n),r.write_shift(2,0),r}function cg(e){for(var t=re(2*e),r=0;r<e;++r)t.write_shift(2,r+1);return t}function ug(e,t,r){var n=re(15);return Ni(n,e,t),n.write_shift(8,r,"f"),n}function fg(e,t,r){var n=re(9);return Ni(n,e,t),n.write_shift(2,r),n}var dg=(function(){var e={1:437,2:850,3:1252,4:1e4,100:852,101:866,102:865,103:861,104:895,105:620,106:737,107:857,120:950,121:949,122:936,123:932,124:874,125:1255,126:1256,150:10007,151:10029,152:10006,200:1250,201:1251,202:1254,203:1253,0:20127,8:865,9:437,10:850,11:437,13:437,14:850,15:437,16:850,17:437,18:850,19:932,20:850,21:437,22:850,23:865,24:437,25:437,26:850,27:437,28:863,29:850,31:852,34:852,35:852,36:860,37:850,38:866,55:850,64:852,77:936,78:949,79:950,80:874,87:1252,88:1252,89:1252,108:863,134:737,135:852,136:857,204:1257,255:16969},t=Xa({1:437,2:850,3:1252,4:1e4,100:852,101:866,102:865,103:861,104:895,105:620,106:737,107:857,120:950,121:949,122:936,123:932,124:874,125:1255,126:1256,150:10007,151:10029,152:10006,200:1250,201:1251,202:1254,203:1253,0:20127});function r(o,f){var u=[],d=yn(1);switch(f.type){case"base64":d=Nr(Kr(o));break;case"binary":d=Nr(o);break;case"buffer":case"array":d=o;break}xr(d,0);var h=d.read_shift(1),m=!!(h&136),l=!1,v=!1;switch(h){case 2:break;case 3:break;case 48:l=!0,m=!0;break;case 49:l=!0,m=!0;break;case 131:break;case 139:break;case 140:v=!0;break;case 245:break;default:throw new Error("DBF Unsupported Version: "+h.toString(16))}var g=0,x=521;h==2&&(g=d.read_shift(2)),d.l+=3,h!=2&&(g=d.read_shift(4)),g>1048576&&(g=1e6),h!=2&&(x=d.read_shift(2));var T=d.read_shift(2),b=f.codepage||1252;h!=2&&(d.l+=16,d.read_shift(1),d[d.l]!==0&&(b=e[d[d.l]]),d.l+=1,d.l+=2),v&&(d.l+=36);for(var _=[],k={},F=Math.min(d.length,h==2?521:x-10-(l?264:0)),z=v?32:11;d.l<F&&d[d.l]!=13;)switch(k={},k.name=ss.utils.decode(b,d.slice(d.l,d.l+z)).replace(/[\u0000\r\n].*$/g,""),d.l+=z,k.type=String.fromCharCode(d.read_shift(1)),h!=2&&!v&&(k.offset=d.read_shift(4)),k.len=d.read_shift(1),h==2&&(k.offset=d.read_shift(2)),k.dec=d.read_shift(1),k.name.length&&_.push(k),h!=2&&(d.l+=v?13:14),k.type){case"B":(!l||k.len!=8)&&f.WTF&&console.log("Skipping "+k.name+":"+k.type);break;case"G":case"P":f.WTF&&console.log("Skipping "+k.name+":"+k.type);break;case"+":case"0":case"@":case"C":case"D":case"F":case"I":case"L":case"M":case"N":case"O":case"T":case"Y":break;default:throw new Error("Unknown Field Type: "+k.type)}if(d[d.l]!==13&&(d.l=x-1),d.read_shift(1)!==13)throw new Error("DBF Terminator not found "+d.l+" "+d[d.l]);d.l=x;var N=0,B=0;for(u[0]=[],B=0;B!=_.length;++B)u[0][B]=_[B].name;for(;g-- >0;){if(d[d.l]===42){d.l+=T;continue}for(++d.l,u[++N]=[],B=0,B=0;B!=_.length;++B){var M=d.slice(d.l,d.l+_[B].len);d.l+=_[B].len,xr(M,0);var L=ss.utils.decode(b,M);switch(_[B].type){case"C":L.trim().length&&(u[N][B]=L.replace(/\s+$/,""));break;case"D":L.length===8?u[N][B]=new Date(+L.slice(0,4),+L.slice(4,6)-1,+L.slice(6,8)):u[N][B]=L;break;case"F":u[N][B]=parseFloat(L.trim());break;case"+":case"I":u[N][B]=v?M.read_shift(-4,"i")^2147483648:M.read_shift(4,"i");break;case"L":switch(L.trim().toUpperCase()){case"Y":case"T":u[N][B]=!0;break;case"N":case"F":u[N][B]=!1;break;case"":case"?":break;default:throw new Error("DBF Unrecognized L:|"+L+"|")}break;case"M":if(!m)throw new Error("DBF Unexpected MEMO for type "+h.toString(16));u[N][B]="##MEMO##"+(v?parseInt(L.trim(),10):M.read_shift(4));break;case"N":L=L.replace(/\u0000/g,"").trim(),L&&L!="."&&(u[N][B]=+L||0);break;case"@":u[N][B]=new Date(M.read_shift(-8,"f")-621356832e5);break;case"T":u[N][B]=new Date((M.read_shift(4)-2440588)*864e5+M.read_shift(4));break;case"Y":u[N][B]=M.read_shift(4,"i")/1e4+M.read_shift(4,"i")/1e4*Math.pow(2,32);break;case"O":u[N][B]=-M.read_shift(-8,"f");break;case"B":if(l&&_[B].len==8){u[N][B]=M.read_shift(8,"f");break}case"G":case"P":M.l+=_[B].len;break;case"0":if(_[B].name==="_NullFlags")break;default:throw new Error("DBF Unsupported data type "+_[B].type)}}}if(h!=2&&d.l<d.length&&d[d.l++]!=26)throw new Error("DBF EOF Marker missing "+(d.l-1)+" of "+d.length+" "+d[d.l-1].toString(16));return f&&f.sheetRows&&(u=u.slice(0,f.sheetRows)),f.DBF=_,u}function n(o,f){var u=f||{};u.dateNF||(u.dateNF="yyyymmdd");var d=Zn(r(o,u),u);return d["!cols"]=u.DBF.map(function(h){return{wch:h.len,DBF:h}}),delete u.DBF,d}function i(o,f){try{return bn(n(o,f),f)}catch(u){if(f&&f.WTF)throw u}return{SheetNames:[],Sheets:{}}}var s={B:8,C:250,L:1,D:8,"?":0,"":0};function a(o,f){var u=f||{};if(+u.codepage>=0&&vi(+u.codepage),u.type=="string")throw new Error("Cannot write DBF to JS string");var d=fr(),h=vs(o,{header:1,raw:!0,cellDates:!0}),m=h[0],l=h.slice(1),v=o["!cols"]||[],g=0,x=0,T=0,b=1;for(g=0;g<m.length;++g){if(((v[g]||{}).DBF||{}).name){m[g]=v[g].DBF.name,++T;continue}if(m[g]!=null){if(++T,typeof m[g]=="number"&&(m[g]=m[g].toString(10)),typeof m[g]!="string")throw new Error("DBF Invalid column name "+m[g]+" |"+typeof m[g]+"|");if(m.indexOf(m[g])!==g){for(x=0;x<1024;++x)if(m.indexOf(m[g]+"_"+x)==-1){m[g]+="_"+x;break}}}}var _=wt(o["!ref"]),k=[],F=[],z=[];for(g=0;g<=_.e.c-_.s.c;++g){var N="",B="",M=0,L=[];for(x=0;x<l.length;++x)l[x][g]!=null&&L.push(l[x][g]);if(L.length==0||m[g]==null){k[g]="?";continue}for(x=0;x<L.length;++x){switch(typeof L[x]){case"number":B="B";break;case"string":B="C";break;case"boolean":B="L";break;case"object":B=L[x]instanceof Date?"D":"C";break;default:B="C"}M=Math.max(M,String(L[x]).length),N=N&&N!=B?"C":B}M>250&&(M=250),B=((v[g]||{}).DBF||{}).type,B=="C"&&v[g].DBF.len>M&&(M=v[g].DBF.len),N=="B"&&B=="N"&&(N="N",z[g]=v[g].DBF.dec,M=v[g].DBF.len),F[g]=N=="C"||B=="N"?M:s[N]||0,b+=F[g],k[g]=N}var W=d.next(32);for(W.write_shift(4,318902576),W.write_shift(4,l.length),W.write_shift(2,296+32*T),W.write_shift(2,b),g=0;g<4;++g)W.write_shift(4,0);for(W.write_shift(4,0|(+t[n0]||3)<<8),g=0,x=0;g<m.length;++g)if(m[g]!=null){var y=d.next(32),H=(m[g].slice(-10)+"\0\0\0\0\0\0\0\0\0\0\0").slice(0,11);y.write_shift(1,H,"sbcs"),y.write_shift(1,k[g]=="?"?"C":k[g],"sbcs"),y.write_shift(4,x),y.write_shift(1,F[g]||s[k[g]]||0),y.write_shift(1,z[g]||0),y.write_shift(1,2),y.write_shift(4,0),y.write_shift(1,0),y.write_shift(4,0),y.write_shift(4,0),x+=F[g]||s[k[g]]||0}var Q=d.next(264);for(Q.write_shift(4,13),g=0;g<65;++g)Q.write_shift(4,0);for(g=0;g<l.length;++g){var J=d.next(b);for(J.write_shift(1,0),x=0;x<m.length;++x)if(m[x]!=null)switch(k[x]){case"L":J.write_shift(1,l[g][x]==null?63:l[g][x]?84:70);break;case"B":J.write_shift(8,l[g][x]||0,"f");break;case"N":var ee="0";for(typeof l[g][x]=="number"&&(ee=l[g][x].toFixed(z[x]||0)),T=0;T<F[x]-ee.length;++T)J.write_shift(1,32);J.write_shift(1,ee,"sbcs");break;case"D":l[g][x]?(J.write_shift(4,("0000"+l[g][x].getFullYear()).slice(-4),"sbcs"),J.write_shift(2,("00"+(l[g][x].getMonth()+1)).slice(-2),"sbcs"),J.write_shift(2,("00"+l[g][x].getDate()).slice(-2),"sbcs")):J.write_shift(8,"00000000","sbcs");break;case"C":var _e=String(l[g][x]!=null?l[g][x]:"").slice(0,F[x]);for(J.write_shift(1,_e,"sbcs"),T=0;T<F[x]-_e.length;++T)J.write_shift(1,32);break}}return d.next(1).write_shift(1,26),d.end()}return{to_workbook:i,to_sheet:n,from_sheet:a}})(),hg=(function(){var e={AA:"À",BA:"Á",CA:"Â",DA:195,HA:"Ä",JA:197,AE:"È",BE:"É",CE:"Ê",HE:"Ë",AI:"Ì",BI:"Í",CI:"Î",HI:"Ï",AO:"Ò",BO:"Ó",CO:"Ô",DO:213,HO:"Ö",AU:"Ù",BU:"Ú",CU:"Û",HU:"Ü",Aa:"à",Ba:"á",Ca:"â",Da:227,Ha:"ä",Ja:229,Ae:"è",Be:"é",Ce:"ê",He:"ë",Ai:"ì",Bi:"í",Ci:"î",Hi:"ï",Ao:"ò",Bo:"ó",Co:"ô",Do:245,Ho:"ö",Au:"ù",Bu:"ú",Cu:"û",Hu:"ü",KC:"Ç",Kc:"ç",q:"æ",z:"œ",a:"Æ",j:"Œ",DN:209,Dn:241,Hy:255,S:169,c:170,R:174,"B ":180,0:176,1:177,2:178,3:179,5:181,6:182,7:183,Q:185,k:186,b:208,i:216,l:222,s:240,y:248,"!":161,'"':162,"#":163,"(":164,"%":165,"'":167,"H ":168,"+":171,";":187,"<":188,"=":189,">":190,"?":191,"{":223},t=new RegExp("\x1BN("+er(e).join("|").replace(/\|\|\|/,"|\\||").replace(/([?()+])/g,"\\$1")+"|\\|)","gm"),r=function(m,l){var v=e[l];return typeof v=="number"?Ko(v):v},n=function(m,l,v){var g=l.charCodeAt(0)-32<<4|v.charCodeAt(0)-48;return g==59?m:Ko(g)};e["|"]=254;function i(m,l){switch(l.type){case"base64":return s(Kr(m),l);case"binary":return s(m,l);case"buffer":return s(Ze&&Buffer.isBuffer(m)?m.toString("binary"):Oi(m),l);case"array":return s(As(m),l)}throw new Error("Unrecognized type "+l.type)}function s(m,l){var v=m.split(/[\n\r]+/),g=-1,x=-1,T=0,b=0,_=[],k=[],F=null,z={},N=[],B=[],M=[],L=0,W;for(+l.codepage>=0&&vi(+l.codepage);T!==v.length;++T){L=0;var y=v[T].trim().replace(/\x1B([\x20-\x2F])([\x30-\x3F])/g,n).replace(t,r),H=y.replace(/;;/g,"\0").split(";").map(function(P){return P.replace(/\u0000/g,";")}),Q=H[0],J;if(y.length>0)switch(Q){case"ID":break;case"E":break;case"B":break;case"O":break;case"W":break;case"P":H[1].charAt(0)=="P"&&k.push(y.slice(3).replace(/;;/g,";"));break;case"C":var ee=!1,_e=!1,Ae=!1,De=!1,oe=-1,ce=-1;for(b=1;b<H.length;++b)switch(H[b].charAt(0)){case"A":break;case"X":x=parseInt(H[b].slice(1))-1,_e=!0;break;case"Y":for(g=parseInt(H[b].slice(1))-1,_e||(x=0),W=_.length;W<=g;++W)_[W]=[];break;case"K":J=H[b].slice(1),J.charAt(0)==='"'?J=J.slice(1,J.length-1):J==="TRUE"?J=!0:J==="FALSE"?J=!1:isNaN(Yr(J))?isNaN(wi(J).getDate())||(J=lr(J)):(J=Yr(J),F!==null&&g0(F)&&(J=y0(J))),ee=!0;break;case"E":De=!0;var C=f1(H[b].slice(1),{r:g,c:x});_[g][x]=[_[g][x],C];break;case"S":Ae=!0,_[g][x]=[_[g][x],"S5S"];break;case"G":break;case"R":oe=parseInt(H[b].slice(1))-1;break;case"C":ce=parseInt(H[b].slice(1))-1;break;default:if(l&&l.WTF)throw new Error("SYLK bad record "+y)}if(ee&&(_[g][x]&&_[g][x].length==2?_[g][x][0]=J:_[g][x]=J,F=null),Ae){if(De)throw new Error("SYLK shared formula cannot have own formula");var j=oe>-1&&_[oe][ce];if(!j||!j[1])throw new Error("SYLK shared formula cannot find base");_[g][x][1]=d1(j[1],{r:g-oe,c:x-ce})}break;case"F":var R=0;for(b=1;b<H.length;++b)switch(H[b].charAt(0)){case"X":x=parseInt(H[b].slice(1))-1,++R;break;case"Y":for(g=parseInt(H[b].slice(1))-1,W=_.length;W<=g;++W)_[W]=[];break;case"M":L=parseInt(H[b].slice(1))/20;break;case"F":break;case"G":break;case"P":F=k[parseInt(H[b].slice(1))];break;case"S":break;case"D":break;case"N":break;case"W":for(M=H[b].slice(1).split(" "),W=parseInt(M[0],10);W<=parseInt(M[1],10);++W)L=parseInt(M[2],10),B[W-1]=L===0?{hidden:!0}:{wch:L},ao(B[W-1]);break;case"C":x=parseInt(H[b].slice(1))-1,B[x]||(B[x]={});break;case"R":g=parseInt(H[b].slice(1))-1,N[g]||(N[g]={}),L>0?(N[g].hpt=L,N[g].hpx=au(L)):L===0&&(N[g].hidden=!0);break;default:if(l&&l.WTF)throw new Error("SYLK bad record "+y)}R<1&&(F=null);break;default:if(l&&l.WTF)throw new Error("SYLK bad record "+y)}}return N.length>0&&(z["!rows"]=N),B.length>0&&(z["!cols"]=B),l&&l.sheetRows&&(_=_.slice(0,l.sheetRows)),[_,z]}function a(m,l){var v=i(m,l),g=v[0],x=v[1],T=Zn(g,l);return er(x).forEach(function(b){T[b]=x[b]}),T}function o(m,l){return bn(a(m,l),l)}function f(m,l,v,g){var x="C;Y"+(v+1)+";X"+(g+1)+";K";switch(m.t){case"n":x+=m.v||0,m.f&&!m.F&&(x+=";E"+lo(m.f,{r:v,c:g}));break;case"b":x+=m.v?"TRUE":"FALSE";break;case"e":x+=m.w||m.v;break;case"d":x+='"'+(m.w||m.v)+'"';break;case"s":x+='"'+m.v.replace(/"/g,"").replace(/;/g,";;")+'"';break}return x}function u(m,l){l.forEach(function(v,g){var x="F;W"+(g+1)+" "+(g+1)+" ";v.hidden?x+="0":(typeof v.width=="number"&&!v.wpx&&(v.wpx=ps(v.width)),typeof v.wpx=="number"&&!v.wch&&(v.wch=gs(v.wpx)),typeof v.wch=="number"&&(x+=Math.round(v.wch))),x.charAt(x.length-1)!=" "&&m.push(x)})}function d(m,l){l.forEach(function(v,g){var x="F;";v.hidden?x+="M0;":v.hpt?x+="M"+20*v.hpt+";":v.hpx&&(x+="M"+20*ms(v.hpx)+";"),x.length>2&&m.push(x+"R"+(g+1))})}function h(m,l){var v=["ID;PWXL;N;E"],g=[],x=wt(m["!ref"]),T,b=Array.isArray(m),_=`\r
24
+ `;v.push("P;PGeneral"),v.push("F;P0;DG0G8;M255"),m["!cols"]&&u(v,m["!cols"]),m["!rows"]&&d(v,m["!rows"]),v.push("B;Y"+(x.e.r-x.s.r+1)+";X"+(x.e.c-x.s.c+1)+";D"+[x.s.c,x.s.r,x.e.c,x.e.r].join(" "));for(var k=x.s.r;k<=x.e.r;++k)for(var F=x.s.c;F<=x.e.c;++F){var z=ct({r:k,c:F});T=b?(m[k]||[])[F]:m[z],!(!T||T.v==null&&(!T.f||T.F))&&g.push(f(T,m,k,F))}return v.join(_)+_+g.join(_)+_+"E"+_}return{to_workbook:o,to_sheet:a,from_sheet:h}})(),pg=(function(){function e(s,a){switch(a.type){case"base64":return t(Kr(s),a);case"binary":return t(s,a);case"buffer":return t(Ze&&Buffer.isBuffer(s)?s.toString("binary"):Oi(s),a);case"array":return t(As(s),a)}throw new Error("Unrecognized type "+a.type)}function t(s,a){for(var o=s.split(`
25
+ `),f=-1,u=-1,d=0,h=[];d!==o.length;++d){if(o[d].trim()==="BOT"){h[++f]=[],u=0;continue}if(!(f<0)){var m=o[d].trim().split(","),l=m[0],v=m[1];++d;for(var g=o[d]||"";(g.match(/["]/g)||[]).length&1&&d<o.length-1;)g+=`
26
+ `+o[++d];switch(g=g.trim(),+l){case-1:if(g==="BOT"){h[++f]=[],u=0;continue}else if(g!=="EOD")throw new Error("Unrecognized DIF special command "+g);break;case 0:g==="TRUE"?h[f][u]=!0:g==="FALSE"?h[f][u]=!1:isNaN(Yr(v))?isNaN(wi(v).getDate())?h[f][u]=v:h[f][u]=lr(v):h[f][u]=Yr(v),++u;break;case 1:g=g.slice(1,g.length-1),g=g.replace(/""/g,'"'),g&&g.match(/^=".*"$/)&&(g=g.slice(2,-1)),h[f][u++]=g!==""?g:null;break}if(g==="EOD")break}}return a&&a.sheetRows&&(h=h.slice(0,a.sheetRows)),h}function r(s,a){return Zn(e(s,a),a)}function n(s,a){return bn(r(s,a),a)}var i=(function(){var s=function(f,u,d,h,m){f.push(u),f.push(d+","+h),f.push('"'+m.replace(/"/g,'""')+'"')},a=function(f,u,d,h){f.push(u+","+d),f.push(u==1?'"'+h.replace(/"/g,'""')+'"':h)};return function(f){var u=[],d=wt(f["!ref"]),h,m=Array.isArray(f);s(u,"TABLE",0,1,"sheetjs"),s(u,"VECTORS",0,d.e.r-d.s.r+1,""),s(u,"TUPLES",0,d.e.c-d.s.c+1,""),s(u,"DATA",0,0,"");for(var l=d.s.r;l<=d.e.r;++l){a(u,-1,0,"BOT");for(var v=d.s.c;v<=d.e.c;++v){var g=ct({r:l,c:v});if(h=m?(f[l]||[])[v]:f[g],!h){a(u,1,0,"");continue}switch(h.t){case"n":var x=h.w;!x&&h.v!=null&&(x=h.v),x==null?h.f&&!h.F?a(u,1,0,"="+h.f):a(u,1,0,""):a(u,0,x,"V");break;case"b":a(u,0,h.v?1:0,h.v?"TRUE":"FALSE");break;case"s":a(u,1,0,isNaN(h.v)?h.v:'="'+h.v+'"');break;case"d":h.w||(h.w=an(h.z||Dt[14],dr(lr(h.v)))),a(u,0,h.w,"V");break;default:a(u,1,0,"")}}}a(u,-1,0,"EOD");var T=`\r
27
+ `,b=u.join(T);return b}})();return{to_workbook:n,to_sheet:r,from_sheet:i}})(),ru=(function(){function e(h){return h.replace(/\\b/g,"\\").replace(/\\c/g,":").replace(/\\n/g,`
28
+ `)}function t(h){return h.replace(/\\/g,"\\b").replace(/:/g,"\\c").replace(/\n/g,"\\n")}function r(h,m){for(var l=h.split(`
29
+ `),v=-1,g=-1,x=0,T=[];x!==l.length;++x){var b=l[x].trim().split(":");if(b[0]==="cell"){var _=Vt(b[1]);if(T.length<=_.r)for(v=T.length;v<=_.r;++v)T[v]||(T[v]=[]);switch(v=_.r,g=_.c,b[2]){case"t":T[v][g]=e(b[3]);break;case"v":T[v][g]=+b[3];break;case"vtf":var k=b[b.length-1];case"vtc":switch(b[3]){case"nl":T[v][g]=!!+b[4];break;default:T[v][g]=+b[4];break}b[2]=="vtf"&&(T[v][g]=[T[v][g],k])}}}return m&&m.sheetRows&&(T=T.slice(0,m.sheetRows)),T}function n(h,m){return Zn(r(h,m),m)}function i(h,m){return bn(n(h,m),m)}var s=["socialcalc:version:1.5","MIME-Version: 1.0","Content-Type: multipart/mixed; boundary=SocialCalcSpreadsheetControlSave"].join(`
30
+ `),a=["--SocialCalcSpreadsheetControlSave","Content-type: text/plain; charset=UTF-8"].join(`
31
+ `)+`
32
+ `,o=["# SocialCalc Spreadsheet Control Save","part:sheet"].join(`
33
+ `),f="--SocialCalcSpreadsheetControlSave--";function u(h){if(!h||!h["!ref"])return"";for(var m=[],l=[],v,g="",x=Sr(h["!ref"]),T=Array.isArray(h),b=x.s.r;b<=x.e.r;++b)for(var _=x.s.c;_<=x.e.c;++_)if(g=ct({r:b,c:_}),v=T?(h[b]||[])[_]:h[g],!(!v||v.v==null||v.t==="z")){switch(l=["cell",g,"t"],v.t){case"s":case"str":l.push(t(v.v));break;case"n":v.f?(l[2]="vtf",l[3]="n",l[4]=v.v,l[5]=t(v.f)):(l[2]="v",l[3]=v.v);break;case"b":l[2]="vt"+(v.f?"f":"c"),l[3]="nl",l[4]=v.v?"1":"0",l[5]=t(v.f||(v.v?"TRUE":"FALSE"));break;case"d":var k=dr(lr(v.v));l[2]="vtc",l[3]="nd",l[4]=""+k,l[5]=v.w||an(v.z||Dt[14],k);break;case"e":continue}m.push(l.join(":"))}return m.push("sheet:c:"+(x.e.c-x.s.c+1)+":r:"+(x.e.r-x.s.r+1)+":tvf:1"),m.push("valueformat:1:text-wiki"),m.join(`
34
+ `)}function d(h){return[s,a,o,a,u(h),f].join(`
35
+ `)}return{to_workbook:i,to_sheet:n,from_sheet:d}})(),gg=(function(){function e(d,h,m,l,v){v.raw?h[m][l]=d:d===""||(d==="TRUE"?h[m][l]=!0:d==="FALSE"?h[m][l]=!1:isNaN(Yr(d))?isNaN(wi(d).getDate())?h[m][l]=d:h[m][l]=lr(d):h[m][l]=Yr(d))}function t(d,h){var m=h||{},l=[];if(!d||d.length===0)return l;for(var v=d.split(/[\r\n]/),g=v.length-1;g>=0&&v[g].length===0;)--g;for(var x=10,T=0,b=0;b<=g;++b)T=v[b].indexOf(" "),T==-1?T=v[b].length:T++,x=Math.max(x,T);for(b=0;b<=g;++b){l[b]=[];var _=0;for(e(v[b].slice(0,x).trim(),l,b,_,m),_=1;_<=(v[b].length-x)/10+1;++_)e(v[b].slice(x+(_-1)*10,x+_*10).trim(),l,b,_,m)}return m.sheetRows&&(l=l.slice(0,m.sheetRows)),l}var r={44:",",9:" ",59:";",124:"|"},n={44:3,9:2,59:1,124:0};function i(d){for(var h={},m=!1,l=0,v=0;l<d.length;++l)(v=d.charCodeAt(l))==34?m=!m:!m&&v in r&&(h[v]=(h[v]||0)+1);v=[];for(l in h)Object.prototype.hasOwnProperty.call(h,l)&&v.push([h[l],l]);if(!v.length){h=n;for(l in h)Object.prototype.hasOwnProperty.call(h,l)&&v.push([h[l],l])}return v.sort(function(g,x){return g[0]-x[0]||n[g[1]]-n[x[1]]}),r[v.pop()[1]]||44}function s(d,h){var m=h||{},l="",v=m.dense?[]:{},g={s:{c:0,r:0},e:{c:0,r:0}};d.slice(0,4)=="sep="?d.charCodeAt(5)==13&&d.charCodeAt(6)==10?(l=d.charAt(4),d=d.slice(7)):d.charCodeAt(5)==13||d.charCodeAt(5)==10?(l=d.charAt(4),d=d.slice(6)):l=i(d.slice(0,1024)):m&&m.FS?l=m.FS:l=i(d.slice(0,1024));var x=0,T=0,b=0,_=0,k=0,F=l.charCodeAt(0),z=!1,N=0,B=d.charCodeAt(0);d=d.replace(/\r\n/mg,`
36
+ `);var M=m.dateNF!=null?Ih(m.dateNF):null;function L(){var W=d.slice(_,k),y={};if(W.charAt(0)=='"'&&W.charAt(W.length-1)=='"'&&(W=W.slice(1,-1).replace(/""/g,'"')),W.length===0)y.t="z";else if(m.raw)y.t="s",y.v=W;else if(W.trim().length===0)y.t="s",y.v=W;else if(W.charCodeAt(0)==61)W.charCodeAt(1)==34&&W.charCodeAt(W.length-1)==34?(y.t="s",y.v=W.slice(2,-1).replace(/""/g,'"')):h1(W)?(y.t="n",y.f=W.slice(1)):(y.t="s",y.v=W);else if(W=="TRUE")y.t="b",y.v=!0;else if(W=="FALSE")y.t="b",y.v=!1;else if(!isNaN(b=Yr(W)))y.t="n",m.cellText!==!1&&(y.w=W),y.v=b;else if(!isNaN(wi(W).getDate())||M&&W.match(M)){y.z=m.dateNF||Dt[14];var H=0;M&&W.match(M)&&(W=Fh(W,m.dateNF,W.match(M)||[]),H=1),m.cellDates?(y.t="d",y.v=lr(W,H)):(y.t="n",y.v=dr(lr(W,H))),m.cellText!==!1&&(y.w=an(y.z,y.v instanceof Date?dr(y.v):y.v)),m.cellNF||delete y.z}else y.t="s",y.v=W;if(y.t=="z"||(m.dense?(v[x]||(v[x]=[]),v[x][T]=y):v[ct({c:T,r:x})]=y),_=k+1,B=d.charCodeAt(_),g.e.c<T&&(g.e.c=T),g.e.r<x&&(g.e.r=x),N==F)++T;else if(T=0,++x,m.sheetRows&&m.sheetRows<=x)return!0}e:for(;k<d.length;++k)switch(N=d.charCodeAt(k)){case 34:B===34&&(z=!z);break;case F:case 10:case 13:if(!z&&L())break e;break}return k-_>0&&L(),v["!ref"]=jt(g),v}function a(d,h){return!(h&&h.PRN)||h.FS||d.slice(0,4)=="sep="||d.indexOf(" ")>=0||d.indexOf(",")>=0||d.indexOf(";")>=0?s(d,h):Zn(t(d,h),h)}function o(d,h){var m="",l=h.type=="string"?[0,0,0,0]:Ay(d,h);switch(h.type){case"base64":m=Kr(d);break;case"binary":m=d;break;case"buffer":h.codepage==65001?m=d.toString("utf8"):h.codepage&&typeof ss<"u"||(m=Ze&&Buffer.isBuffer(d)?d.toString("binary"):Oi(d));break;case"array":m=As(d);break;case"string":m=d;break;default:throw new Error("Unrecognized type "+h.type)}return l[0]==239&&l[1]==187&&l[2]==191?m=fi(m.slice(3)):h.type!="string"&&h.type!="buffer"&&h.codepage==65001?m=fi(m):h.type=="binary"&&typeof ss<"u",m.slice(0,19)=="socialcalc:version:"?ru.to_sheet(h.type=="string"?m:fi(m),h):a(m,h)}function f(d,h){return bn(o(d,h),h)}function u(d){for(var h=[],m=wt(d["!ref"]),l,v=Array.isArray(d),g=m.s.r;g<=m.e.r;++g){for(var x=[],T=m.s.c;T<=m.e.c;++T){var b=ct({r:g,c:T});if(l=v?(d[g]||[])[T]:d[b],!l||l.v==null){x.push(" ");continue}for(var _=(l.w||(qr(l),l.w)||"").slice(0,10);_.length<10;)_+=" ";x.push(_+(T===0?" ":""))}h.push(x.join(""))}return h.join(`
37
+ `)}return{to_workbook:f,to_sheet:o,from_sheet:u}})(),Cl=(function(){function e(C,j,R){if(C){xr(C,C.l||0);for(var P=R.Enum||oe;C.l<C.length;){var V=C.read_shift(2),le=P[V]||P[65535],fe=C.read_shift(2),ue=C.l+fe,te=le.f&&le.f(C,fe,R);if(C.l=ue,j(te,le,V))return}}}function t(C,j){switch(j.type){case"base64":return r(Nr(Kr(C)),j);case"binary":return r(Nr(C),j);case"buffer":case"array":return r(C,j)}throw"Unsupported type "+j.type}function r(C,j){if(!C)return C;var R=j||{},P=R.dense?[]:{},V="Sheet1",le="",fe=0,ue={},te=[],Ie=[],ae={s:{r:0,c:0},e:{r:0,c:0}},Pe=R.sheetRows||0;if(C[2]==0&&(C[3]==8||C[3]==9)&&C.length>=16&&C[14]==5&&C[15]===108)throw new Error("Unsupported Works 3 for Mac file");if(C[2]==2)R.Enum=oe,e(C,function(we,ut,je){switch(je){case 0:R.vers=we,we>=4096&&(R.qpro=!0);break;case 6:ae=we;break;case 204:we&&(le=we);break;case 222:le=we;break;case 15:case 51:R.qpro||(we[1].v=we[1].v.slice(1));case 13:case 14:case 16:je==14&&(we[2]&112)==112&&(we[2]&15)>1&&(we[2]&15)<15&&(we[1].z=R.dateNF||Dt[14],R.cellDates&&(we[1].t="d",we[1].v=y0(we[1].v))),R.qpro&&we[3]>fe&&(P["!ref"]=jt(ae),ue[V]=P,te.push(V),P=R.dense?[]:{},ae={s:{r:0,c:0},e:{r:0,c:0}},fe=we[3],V=le||"Sheet"+(fe+1),le="");var Rt=R.dense?(P[we[0].r]||[])[we[0].c]:P[ct(we[0])];if(Rt){Rt.t=we[1].t,Rt.v=we[1].v,we[1].z!=null&&(Rt.z=we[1].z),we[1].f!=null&&(Rt.f=we[1].f);break}R.dense?(P[we[0].r]||(P[we[0].r]=[]),P[we[0].r][we[0].c]=we[1]):P[ct(we[0])]=we[1];break}},R);else if(C[2]==26||C[2]==14)R.Enum=ce,C[2]==14&&(R.qpro=!0,C.l=0),e(C,function(we,ut,je){switch(je){case 204:V=we;break;case 22:we[1].v=we[1].v.slice(1);case 23:case 24:case 25:case 37:case 39:case 40:if(we[3]>fe&&(P["!ref"]=jt(ae),ue[V]=P,te.push(V),P=R.dense?[]:{},ae={s:{r:0,c:0},e:{r:0,c:0}},fe=we[3],V="Sheet"+(fe+1)),Pe>0&&we[0].r>=Pe)break;R.dense?(P[we[0].r]||(P[we[0].r]=[]),P[we[0].r][we[0].c]=we[1]):P[ct(we[0])]=we[1],ae.e.c<we[0].c&&(ae.e.c=we[0].c),ae.e.r<we[0].r&&(ae.e.r=we[0].r);break;case 27:we[14e3]&&(Ie[we[14e3][0]]=we[14e3][1]);break;case 1537:Ie[we[0]]=we[1],we[0]==fe&&(V=we[1]);break}},R);else throw new Error("Unrecognized LOTUS BOF "+C[2]);if(P["!ref"]=jt(ae),ue[le||V]=P,te.push(le||V),!Ie.length)return{SheetNames:te,Sheets:ue};for(var ke={},pt=[],He=0;He<Ie.length;++He)ue[te[He]]?(pt.push(Ie[He]||te[He]),ke[Ie[He]]=ue[Ie[He]]||ue[te[He]]):(pt.push(Ie[He]),ke[Ie[He]]={"!ref":"A1"});return{SheetNames:pt,Sheets:ke}}function n(C,j){var R=j||{};if(+R.codepage>=0&&vi(+R.codepage),R.type=="string")throw new Error("Cannot write WK1 to JS string");var P=fr(),V=wt(C["!ref"]),le=Array.isArray(C),fe=[];ve(P,0,s(1030)),ve(P,6,f(V));for(var ue=Math.min(V.e.r,8191),te=V.s.r;te<=ue;++te)for(var Ie=Qt(te),ae=V.s.c;ae<=V.e.c;++ae){te===V.s.r&&(fe[ae]=rr(ae));var Pe=fe[ae]+Ie,ke=le?(C[te]||[])[ae]:C[Pe];if(!(!ke||ke.t=="z"))if(ke.t=="n")(ke.v|0)==ke.v&&ke.v>=-32768&&ke.v<=32767?ve(P,13,l(te,ae,ke.v)):ve(P,14,g(te,ae,ke.v));else{var pt=qr(ke);ve(P,15,h(te,ae,pt.slice(0,239)))}}return ve(P,1),P.end()}function i(C,j){var R=j||{};if(+R.codepage>=0&&vi(+R.codepage),R.type=="string")throw new Error("Cannot write WK3 to JS string");var P=fr();ve(P,0,a(C));for(var V=0,le=0;V<C.SheetNames.length;++V)(C.Sheets[C.SheetNames[V]]||{})["!ref"]&&ve(P,27,De(C.SheetNames[V],le++));var fe=0;for(V=0;V<C.SheetNames.length;++V){var ue=C.Sheets[C.SheetNames[V]];if(!(!ue||!ue["!ref"])){for(var te=wt(ue["!ref"]),Ie=Array.isArray(ue),ae=[],Pe=Math.min(te.e.r,8191),ke=te.s.r;ke<=Pe;++ke)for(var pt=Qt(ke),He=te.s.c;He<=te.e.c;++He){ke===te.s.r&&(ae[He]=rr(He));var we=ae[He]+pt,ut=Ie?(ue[ke]||[])[He]:ue[we];if(!(!ut||ut.t=="z"))if(ut.t=="n")ve(P,23,L(ke,He,fe,ut.v));else{var je=qr(ut);ve(P,22,N(ke,He,fe,je.slice(0,239)))}}++fe}}return ve(P,1),P.end()}function s(C){var j=re(2);return j.write_shift(2,C),j}function a(C){var j=re(26);j.write_shift(2,4096),j.write_shift(2,4),j.write_shift(4,0);for(var R=0,P=0,V=0,le=0;le<C.SheetNames.length;++le){var fe=C.SheetNames[le],ue=C.Sheets[fe];if(!(!ue||!ue["!ref"])){++V;var te=Sr(ue["!ref"]);R<te.e.r&&(R=te.e.r),P<te.e.c&&(P=te.e.c)}}return R>8191&&(R=8191),j.write_shift(2,R),j.write_shift(1,V),j.write_shift(1,P),j.write_shift(2,0),j.write_shift(2,0),j.write_shift(1,1),j.write_shift(1,2),j.write_shift(4,0),j.write_shift(4,0),j}function o(C,j,R){var P={s:{c:0,r:0},e:{c:0,r:0}};return j==8&&R.qpro?(P.s.c=C.read_shift(1),C.l++,P.s.r=C.read_shift(2),P.e.c=C.read_shift(1),C.l++,P.e.r=C.read_shift(2),P):(P.s.c=C.read_shift(2),P.s.r=C.read_shift(2),j==12&&R.qpro&&(C.l+=2),P.e.c=C.read_shift(2),P.e.r=C.read_shift(2),j==12&&R.qpro&&(C.l+=2),P.s.c==65535&&(P.s.c=P.e.c=P.s.r=P.e.r=0),P)}function f(C){var j=re(8);return j.write_shift(2,C.s.c),j.write_shift(2,C.s.r),j.write_shift(2,C.e.c),j.write_shift(2,C.e.r),j}function u(C,j,R){var P=[{c:0,r:0},{t:"n",v:0},0,0];return R.qpro&&R.vers!=20768?(P[0].c=C.read_shift(1),P[3]=C.read_shift(1),P[0].r=C.read_shift(2),C.l+=2):(P[2]=C.read_shift(1),P[0].c=C.read_shift(2),P[0].r=C.read_shift(2)),P}function d(C,j,R){var P=C.l+j,V=u(C,j,R);if(V[1].t="s",R.vers==20768){C.l++;var le=C.read_shift(1);return V[1].v=C.read_shift(le,"utf8"),V}return R.qpro&&C.l++,V[1].v=C.read_shift(P-C.l,"cstr"),V}function h(C,j,R){var P=re(7+R.length);P.write_shift(1,255),P.write_shift(2,j),P.write_shift(2,C),P.write_shift(1,39);for(var V=0;V<P.length;++V){var le=R.charCodeAt(V);P.write_shift(1,le>=128?95:le)}return P.write_shift(1,0),P}function m(C,j,R){var P=u(C,j,R);return P[1].v=C.read_shift(2,"i"),P}function l(C,j,R){var P=re(7);return P.write_shift(1,255),P.write_shift(2,j),P.write_shift(2,C),P.write_shift(2,R,"i"),P}function v(C,j,R){var P=u(C,j,R);return P[1].v=C.read_shift(8,"f"),P}function g(C,j,R){var P=re(13);return P.write_shift(1,255),P.write_shift(2,j),P.write_shift(2,C),P.write_shift(8,R,"f"),P}function x(C,j,R){var P=C.l+j,V=u(C,j,R);if(V[1].v=C.read_shift(8,"f"),R.qpro)C.l=P;else{var le=C.read_shift(2);k(C.slice(C.l,C.l+le),V),C.l+=le}return V}function T(C,j,R){var P=j&32768;return j&=-32769,j=(P?C:0)+(j>=8192?j-16384:j),(P?"":"$")+(R?rr(j):Qt(j))}var b={51:["FALSE",0],52:["TRUE",0],70:["LEN",1],80:["SUM",69],81:["AVERAGEA",69],82:["COUNTA",69],83:["MINA",69],84:["MAXA",69],111:["T",1]},_=["","","","","","","","","","+","-","*","/","^","=","<>","<=",">=","<",">","","","","","&","","","","","","",""];function k(C,j){xr(C,0);for(var R=[],P=0,V="",le="",fe="",ue="";C.l<C.length;){var te=C[C.l++];switch(te){case 0:R.push(C.read_shift(8,"f"));break;case 1:le=T(j[0].c,C.read_shift(2),!0),V=T(j[0].r,C.read_shift(2),!1),R.push(le+V);break;case 2:{var Ie=T(j[0].c,C.read_shift(2),!0),ae=T(j[0].r,C.read_shift(2),!1);le=T(j[0].c,C.read_shift(2),!0),V=T(j[0].r,C.read_shift(2),!1),R.push(Ie+ae+":"+le+V)}break;case 3:if(C.l<C.length){console.error("WK1 premature formula end");return}break;case 4:R.push("("+R.pop()+")");break;case 5:R.push(C.read_shift(2));break;case 6:{for(var Pe="";te=C[C.l++];)Pe+=String.fromCharCode(te);R.push('"'+Pe.replace(/"/g,'""')+'"')}break;case 8:R.push("-"+R.pop());break;case 23:R.push("+"+R.pop());break;case 22:R.push("NOT("+R.pop()+")");break;case 20:case 21:ue=R.pop(),fe=R.pop(),R.push(["AND","OR"][te-20]+"("+fe+","+ue+")");break;default:if(te<32&&_[te])ue=R.pop(),fe=R.pop(),R.push(fe+_[te]+ue);else if(b[te]){if(P=b[te][1],P==69&&(P=C[C.l++]),P>R.length){console.error("WK1 bad formula parse 0x"+te.toString(16)+":|"+R.join("|")+"|");return}var ke=R.slice(-P);R.length-=P,R.push(b[te][0]+"("+ke.join(",")+")")}else return te<=7?console.error("WK1 invalid opcode "+te.toString(16)):te<=24?console.error("WK1 unsupported op "+te.toString(16)):te<=30?console.error("WK1 invalid opcode "+te.toString(16)):te<=115?console.error("WK1 unsupported function opcode "+te.toString(16)):console.error("WK1 unrecognized opcode "+te.toString(16))}}R.length==1?j[1].f=""+R[0]:console.error("WK1 bad formula parse |"+R.join("|")+"|")}function F(C){var j=[{c:0,r:0},{t:"n",v:0},0];return j[0].r=C.read_shift(2),j[3]=C[C.l++],j[0].c=C[C.l++],j}function z(C,j){var R=F(C);return R[1].t="s",R[1].v=C.read_shift(j-4,"cstr"),R}function N(C,j,R,P){var V=re(6+P.length);V.write_shift(2,C),V.write_shift(1,R),V.write_shift(1,j),V.write_shift(1,39);for(var le=0;le<P.length;++le){var fe=P.charCodeAt(le);V.write_shift(1,fe>=128?95:fe)}return V.write_shift(1,0),V}function B(C,j){var R=F(C);R[1].v=C.read_shift(2);var P=R[1].v>>1;if(R[1].v&1)switch(P&7){case 0:P=(P>>3)*5e3;break;case 1:P=(P>>3)*500;break;case 2:P=(P>>3)/20;break;case 3:P=(P>>3)/200;break;case 4:P=(P>>3)/2e3;break;case 5:P=(P>>3)/2e4;break;case 6:P=(P>>3)/16;break;case 7:P=(P>>3)/64;break}return R[1].v=P,R}function M(C,j){var R=F(C),P=C.read_shift(4),V=C.read_shift(4),le=C.read_shift(2);if(le==65535)return P===0&&V===3221225472?(R[1].t="e",R[1].v=15):P===0&&V===3489660928?(R[1].t="e",R[1].v=42):R[1].v=0,R;var fe=le&32768;return le=(le&32767)-16446,R[1].v=(1-fe*2)*(V*Math.pow(2,le+32)+P*Math.pow(2,le)),R}function L(C,j,R,P){var V=re(14);if(V.write_shift(2,C),V.write_shift(1,R),V.write_shift(1,j),P==0)return V.write_shift(4,0),V.write_shift(4,0),V.write_shift(2,65535),V;var le=0,fe=0,ue=0,te=0;return P<0&&(le=1,P=-P),fe=Math.log2(P)|0,P/=Math.pow(2,fe-31),te=P>>>0,(te&2147483648)==0&&(P/=2,++fe,te=P>>>0),P-=te,te|=2147483648,te>>>=0,P*=Math.pow(2,32),ue=P>>>0,V.write_shift(4,ue),V.write_shift(4,te),fe+=16383+(le?32768:0),V.write_shift(2,fe),V}function W(C,j){var R=M(C);return C.l+=j-14,R}function y(C,j){var R=F(C),P=C.read_shift(4);return R[1].v=P>>6,R}function H(C,j){var R=F(C),P=C.read_shift(8,"f");return R[1].v=P,R}function Q(C,j){var R=H(C);return C.l+=j-10,R}function J(C,j){return C[C.l+j-1]==0?C.read_shift(j,"cstr"):""}function ee(C,j){var R=C[C.l++];R>j-1&&(R=j-1);for(var P="";P.length<R;)P+=String.fromCharCode(C[C.l++]);return P}function _e(C,j,R){if(!(!R.qpro||j<21)){var P=C.read_shift(1);C.l+=17,C.l+=1,C.l+=2;var V=C.read_shift(j-21,"cstr");return[P,V]}}function Ae(C,j){for(var R={},P=C.l+j;C.l<P;){var V=C.read_shift(2);if(V==14e3){for(R[V]=[0,""],R[V][0]=C.read_shift(2);C[C.l];)R[V][1]+=String.fromCharCode(C[C.l]),C.l++;C.l++}}return R}function De(C,j){var R=re(5+C.length);R.write_shift(2,14e3),R.write_shift(2,j);for(var P=0;P<C.length;++P){var V=C.charCodeAt(P);R[R.l++]=V>127?95:V}return R[R.l++]=0,R}var oe={0:{n:"BOF",f:J0},1:{n:"EOF"},2:{n:"CALCMODE"},3:{n:"CALCORDER"},4:{n:"SPLIT"},5:{n:"SYNC"},6:{n:"RANGE",f:o},7:{n:"WINDOW1"},8:{n:"COLW1"},9:{n:"WINTWO"},10:{n:"COLW2"},11:{n:"NAME"},12:{n:"BLANK"},13:{n:"INTEGER",f:m},14:{n:"NUMBER",f:v},15:{n:"LABEL",f:d},16:{n:"FORMULA",f:x},24:{n:"TABLE"},25:{n:"ORANGE"},26:{n:"PRANGE"},27:{n:"SRANGE"},28:{n:"FRANGE"},29:{n:"KRANGE1"},32:{n:"HRANGE"},35:{n:"KRANGE2"},36:{n:"PROTEC"},37:{n:"FOOTER"},38:{n:"HEADER"},39:{n:"SETUP"},40:{n:"MARGINS"},41:{n:"LABELFMT"},42:{n:"TITLES"},43:{n:"SHEETJS"},45:{n:"GRAPH"},46:{n:"NGRAPH"},47:{n:"CALCCOUNT"},48:{n:"UNFORMATTED"},49:{n:"CURSORW12"},50:{n:"WINDOW"},51:{n:"STRING",f:d},55:{n:"PASSWORD"},56:{n:"LOCKED"},60:{n:"QUERY"},61:{n:"QUERYNAME"},62:{n:"PRINT"},63:{n:"PRINTNAME"},64:{n:"GRAPH2"},65:{n:"GRAPHNAME"},66:{n:"ZOOM"},67:{n:"SYMSPLIT"},68:{n:"NSROWS"},69:{n:"NSCOLS"},70:{n:"RULER"},71:{n:"NNAME"},72:{n:"ACOMM"},73:{n:"AMACRO"},74:{n:"PARSE"},102:{n:"PRANGES??"},103:{n:"RRANGES??"},104:{n:"FNAME??"},105:{n:"MRANGES??"},204:{n:"SHEETNAMECS",f:J},222:{n:"SHEETNAMELP",f:ee},65535:{n:""}},ce={0:{n:"BOF"},1:{n:"EOF"},2:{n:"PASSWORD"},3:{n:"CALCSET"},4:{n:"WINDOWSET"},5:{n:"SHEETCELLPTR"},6:{n:"SHEETLAYOUT"},7:{n:"COLUMNWIDTH"},8:{n:"HIDDENCOLUMN"},9:{n:"USERRANGE"},10:{n:"SYSTEMRANGE"},11:{n:"ZEROFORCE"},12:{n:"SORTKEYDIR"},13:{n:"FILESEAL"},14:{n:"DATAFILLNUMS"},15:{n:"PRINTMAIN"},16:{n:"PRINTSTRING"},17:{n:"GRAPHMAIN"},18:{n:"GRAPHSTRING"},19:{n:"??"},20:{n:"ERRCELL"},21:{n:"NACELL"},22:{n:"LABEL16",f:z},23:{n:"NUMBER17",f:M},24:{n:"NUMBER18",f:B},25:{n:"FORMULA19",f:W},26:{n:"FORMULA1A"},27:{n:"XFORMAT",f:Ae},28:{n:"DTLABELMISC"},29:{n:"DTLABELCELL"},30:{n:"GRAPHWINDOW"},31:{n:"CPA"},32:{n:"LPLAUTO"},33:{n:"QUERY"},34:{n:"HIDDENSHEET"},35:{n:"??"},37:{n:"NUMBER25",f:y},38:{n:"??"},39:{n:"NUMBER27",f:H},40:{n:"FORMULA28",f:Q},142:{n:"??"},147:{n:"??"},150:{n:"??"},151:{n:"??"},152:{n:"??"},153:{n:"??"},154:{n:"??"},155:{n:"??"},156:{n:"??"},163:{n:"??"},174:{n:"??"},175:{n:"??"},176:{n:"??"},177:{n:"??"},184:{n:"??"},185:{n:"??"},186:{n:"??"},187:{n:"??"},188:{n:"??"},195:{n:"??"},201:{n:"??"},204:{n:"SHEETNAMECS",f:J},205:{n:"??"},206:{n:"??"},207:{n:"??"},208:{n:"??"},256:{n:"??"},259:{n:"??"},260:{n:"??"},261:{n:"??"},262:{n:"??"},263:{n:"??"},265:{n:"??"},266:{n:"??"},267:{n:"??"},268:{n:"??"},270:{n:"??"},271:{n:"??"},384:{n:"??"},389:{n:"??"},390:{n:"??"},393:{n:"??"},396:{n:"??"},512:{n:"??"},514:{n:"??"},513:{n:"??"},516:{n:"??"},517:{n:"??"},640:{n:"??"},641:{n:"??"},642:{n:"??"},643:{n:"??"},644:{n:"??"},645:{n:"??"},646:{n:"??"},647:{n:"??"},648:{n:"??"},658:{n:"??"},659:{n:"??"},660:{n:"??"},661:{n:"??"},662:{n:"??"},665:{n:"??"},666:{n:"??"},768:{n:"??"},772:{n:"??"},1537:{n:"SHEETINFOQP",f:_e},1600:{n:"??"},1602:{n:"??"},1793:{n:"??"},1794:{n:"??"},1795:{n:"??"},1796:{n:"??"},1920:{n:"??"},2048:{n:"??"},2049:{n:"??"},2052:{n:"??"},2688:{n:"??"},10998:{n:"??"},12849:{n:"??"},28233:{n:"??"},28484:{n:"??"},65535:{n:""}};return{sheet_to_wk1:n,book_to_wk3:i,to_workbook:t}})(),mg=/^\s|\s$|[\t\n\r]/;function nu(e,t){if(!t.bookSST)return"";var r=[Mt];r[r.length]=xe("sst",null,{xmlns:Jn[0],count:e.Count,uniqueCount:e.Unique});for(var n=0;n!=e.length;++n)if(e[n]!=null){var i=e[n],s="<si>";i.r?s+=i.r:(s+="<t",i.t||(i.t=""),i.t.match(mg)&&(s+=' xml:space="preserve"'),s+=">"+lt(i.t)+"</t>"),s+="</si>",r[r.length]=s}return r.length>2&&(r[r.length]="</sst>",r[1]=r[1].replace("/>",">")),r.join("")}function xg(e){return[e.read_shift(4),e.read_shift(4)]}function vg(e,t){return t||(t=re(8)),t.write_shift(4,e.Count),t.write_shift(4,e.Unique),t}var yg=cp;function wg(e){var t=fr();de(t,159,vg(e));for(var r=0;r<e.length;++r)de(t,19,yg(e[r]));return de(t,160),t.end()}function Tg(e){for(var t=[],r=e.split(""),n=0;n<r.length;++n)t[n]=r[n].charCodeAt(0);return t}function iu(e){var t=0,r,n=Tg(e),i=n.length+1,s,a,o,f,u;for(r=yn(i),r[0]=n.length,s=1;s!=i;++s)r[s]=n[s-1];for(s=i-1;s>=0;--s)a=r[s],o=(t&16384)===0?0:1,f=t<<1&32767,u=o|f,t=u^a;return t^52811}var Sg=(function(){function e(i,s){switch(s.type){case"base64":return t(Kr(i),s);case"binary":return t(i,s);case"buffer":return t(Ze&&Buffer.isBuffer(i)?i.toString("binary"):Oi(i),s);case"array":return t(As(i),s)}throw new Error("Unrecognized type "+s.type)}function t(i,s){var a=s||{},o=a.dense?[]:{},f=i.match(/\\trowd.*?\\row\b/g);if(!f.length)throw new Error("RTF missing table");var u={s:{c:0,r:0},e:{c:0,r:f.length-1}};return f.forEach(function(d,h){Array.isArray(o)&&(o[h]=[]);for(var m=/\\\w+\b/g,l=0,v,g=-1;v=m.exec(d);){switch(v[0]){case"\\cell":var x=d.slice(l,m.lastIndex-v[0].length);if(x[0]==" "&&(x=x.slice(1)),++g,x.length){var T={v:x,t:"s"};Array.isArray(o)?o[h][g]=T:o[ct({r:h,c:g})]=T}break}l=m.lastIndex}g>u.e.c&&(u.e.c=g)}),o["!ref"]=jt(u),o}function r(i,s){return bn(e(i,s),s)}function n(i){for(var s=["{\\rtf1\\ansi"],a=wt(i["!ref"]),o,f=Array.isArray(i),u=a.s.r;u<=a.e.r;++u){s.push("\\trowd\\trautofit1");for(var d=a.s.c;d<=a.e.c;++d)s.push("\\cellx"+(d+1));for(s.push("\\pard\\intbl"),d=a.s.c;d<=a.e.c;++d){var h=ct({r:u,c:d});o=f?(i[u]||[])[d]:i[h],!(!o||o.v==null&&(!o.f||o.F))&&(s.push(" "+(o.w||(qr(o),o.w))),s.push("\\cell"))}s.push("\\pard\\intbl\\row")}return s.join("")+"}"}return{to_workbook:r,to_sheet:e,from_sheet:n}})();function Al(e){for(var t=0,r=1;t!=3;++t)r=r*256+(e[t]>255?255:e[t]<0?0:e[t]);return r.toString(16).toUpperCase().slice(1)}var Eg=6,Xr=Eg;function ps(e){return Math.floor((e+Math.round(128/Xr)/256)*Xr)}function gs(e){return Math.floor((e-5)/Xr*100+.5)/100}function Da(e){return Math.round((e*Xr+5)/Xr*256)/256}function ao(e){e.width?(e.wpx=ps(e.width),e.wch=gs(e.wpx),e.MDW=Xr):e.wpx?(e.wch=gs(e.wpx),e.width=Da(e.wch),e.MDW=Xr):typeof e.wch=="number"&&(e.width=Da(e.wch),e.wpx=ps(e.width),e.MDW=Xr),e.customWidth&&delete e.customWidth}var _g=96,su=_g;function ms(e){return e*96/su}function au(e){return e*su/96}function bg(e){var t=["<numFmts>"];return[[5,8],[23,26],[41,44],[50,392]].forEach(function(r){for(var n=r[0];n<=r[1];++n)e[n]!=null&&(t[t.length]=xe("numFmt",null,{numFmtId:n,formatCode:lt(e[n])}))}),t.length===1?"":(t[t.length]="</numFmts>",t[0]=xe("numFmts",null,{count:t.length-2}).replace("/>",">"),t.join(""))}function Cg(e){var t=[];return t[t.length]=xe("cellXfs",null),e.forEach(function(r){t[t.length]=xe("xf",null,r)}),t[t.length]="</cellXfs>",t.length===2?"":(t[0]=xe("cellXfs",null,{count:t.length-2}).replace("/>",">"),t.join(""))}function ou(e,t){var r=[Mt,xe("styleSheet",null,{xmlns:Jn[0],"xmlns:vt":Wt.vt})],n;return e.SSF&&(n=bg(e.SSF))!=null&&(r[r.length]=n),r[r.length]='<fonts count="1"><font><sz val="12"/><color theme="1"/><name val="Calibri"/><family val="2"/><scheme val="minor"/></font></fonts>',r[r.length]='<fills count="2"><fill><patternFill patternType="none"/></fill><fill><patternFill patternType="gray125"/></fill></fills>',r[r.length]='<borders count="1"><border><left/><right/><top/><bottom/><diagonal/></border></borders>',r[r.length]='<cellStyleXfs count="1"><xf numFmtId="0" fontId="0" fillId="0" borderId="0"/></cellStyleXfs>',(n=Cg(t.cellXfs))&&(r[r.length]=n),r[r.length]='<cellStyles count="1"><cellStyle name="Normal" xfId="0" builtinId="0"/></cellStyles>',r[r.length]='<dxfs count="0"/>',r[r.length]='<tableStyles count="0" defaultTableStyle="TableStyleMedium9" defaultPivotStyle="PivotStyleMedium4"/>',r.length>2&&(r[r.length]="</styleSheet>",r[1]=r[1].replace("/>",">")),r.join("")}function Ag(e,t){var r=e.read_shift(2),n=nr(e);return[r,n]}function Og(e,t,r){r||(r=re(6+4*t.length)),r.write_shift(2,e),zt(t,r);var n=r.length>r.l?r.slice(0,r.l):r;return r.l==null&&(r.l=r.length),n}function Dg(e,t,r){var n={};n.sz=e.read_shift(2)/20;var i=mp(e);i.fItalic&&(n.italic=1),i.fCondense&&(n.condense=1),i.fExtend&&(n.extend=1),i.fShadow&&(n.shadow=1),i.fOutline&&(n.outline=1),i.fStrikeout&&(n.strike=1);var s=e.read_shift(2);switch(s===700&&(n.bold=1),e.read_shift(2)){case 1:n.vertAlign="superscript";break;case 2:n.vertAlign="subscript";break}var a=e.read_shift(1);a!=0&&(n.underline=a);var o=e.read_shift(1);o>0&&(n.family=o);var f=e.read_shift(1);switch(f>0&&(n.charset=f),e.l++,n.color=gp(e),e.read_shift(1)){case 1:n.scheme="major";break;case 2:n.scheme="minor";break}return n.name=nr(e),n}function kg(e,t){t||(t=re(153)),t.write_shift(2,e.sz*20),xp(e,t),t.write_shift(2,e.bold?700:400);var r=0;e.vertAlign=="superscript"?r=1:e.vertAlign=="subscript"&&(r=2),t.write_shift(2,r),t.write_shift(1,e.underline||0),t.write_shift(1,e.family||0),t.write_shift(1,e.charset||0),t.write_shift(1,0),ds(e.color,t);var n=0;return n=2,t.write_shift(1,n),zt(e.name,t),t.length>t.l?t.slice(0,t.l):t}var Ig=["none","solid","mediumGray","darkGray","lightGray","darkHorizontal","darkVertical","darkDown","darkUp","darkGrid","darkTrellis","lightHorizontal","lightVertical","lightDown","lightUp","lightGrid","lightTrellis","gray125","gray0625"],ia,Fg=Wr;function Ol(e,t){t||(t=re(84)),ia||(ia=Xa(Ig));var r=ia[e.patternType];r==null&&(r=40),t.write_shift(4,r);var n=0;if(r!=40)for(ds({auto:1},t),ds({auto:1},t);n<12;++n)t.write_shift(4,0);else{for(;n<4;++n)t.write_shift(4,0);for(;n<12;++n)t.write_shift(4,0)}return t.length>t.l?t.slice(0,t.l):t}function Ng(e,t){var r=e.l+t,n=e.read_shift(2),i=e.read_shift(2);return e.l=r,{ixfe:n,numFmtId:i}}function lu(e,t,r){r||(r=re(16)),r.write_shift(2,t||0),r.write_shift(2,e.numFmtId||0),r.write_shift(2,0),r.write_shift(2,0),r.write_shift(2,0),r.write_shift(1,0),r.write_shift(1,0);var n=0;return r.write_shift(1,n),r.write_shift(1,0),r.write_shift(1,0),r.write_shift(1,0),r}function ii(e,t){return t||(t=re(10)),t.write_shift(1,0),t.write_shift(1,0),t.write_shift(4,0),t.write_shift(4,0),t}var Rg=Wr;function Pg(e,t){return t||(t=re(51)),t.write_shift(1,0),ii(null,t),ii(null,t),ii(null,t),ii(null,t),ii(null,t),t.length>t.l?t.slice(0,t.l):t}function jg(e,t){return t||(t=re(52)),t.write_shift(4,e.xfId),t.write_shift(2,1),t.write_shift(1,0),t.write_shift(1,0),fs(e.name||"",t),t.length>t.l?t.slice(0,t.l):t}function Mg(e,t,r){var n=re(2052);return n.write_shift(4,e),fs(t,n),fs(r,n),n.length>n.l?n.slice(0,n.l):n}function Lg(e,t){if(t){var r=0;[[5,8],[23,26],[41,44],[50,392]].forEach(function(n){for(var i=n[0];i<=n[1];++i)t[i]!=null&&++r}),r!=0&&(de(e,615,Pr(r)),[[5,8],[23,26],[41,44],[50,392]].forEach(function(n){for(var i=n[0];i<=n[1];++i)t[i]!=null&&de(e,44,Og(i,t[i]))}),de(e,616))}}function Bg(e){var t=1;de(e,611,Pr(t)),de(e,43,kg({sz:12,color:{theme:1},name:"Calibri",family:2})),de(e,612)}function $g(e){var t=2;de(e,603,Pr(t)),de(e,45,Ol({patternType:"none"})),de(e,45,Ol({patternType:"gray125"})),de(e,604)}function Ug(e){var t=1;de(e,613,Pr(t)),de(e,46,Pg()),de(e,614)}function Wg(e){var t=1;de(e,626,Pr(t)),de(e,47,lu({numFmtId:0},65535)),de(e,627)}function Vg(e,t){de(e,617,Pr(t.length)),t.forEach(function(r){de(e,47,lu(r,0))}),de(e,618)}function zg(e){var t=1;de(e,619,Pr(t)),de(e,48,jg({xfId:0,name:"Normal"})),de(e,620)}function Hg(e){var t=0;de(e,505,Pr(t)),de(e,506)}function Gg(e){var t=0;de(e,508,Mg(t,"TableStyleMedium9","PivotStyleMedium4")),de(e,509)}function Yg(e,t){var r=fr();return de(r,278),Lg(r,e.SSF),Bg(r),$g(r),Ug(r),Wg(r),Vg(r,t.cellXfs),zg(r),Hg(r),Gg(r),de(r,279),r.end()}function cu(e,t){if(t&&t.themeXLSX)return t.themeXLSX;if(e&&typeof e.raw=="string")return e.raw;var r=[Mt];return r[r.length]='<a:theme xmlns:a="http://schemas.openxmlformats.org/drawingml/2006/main" name="Office Theme">',r[r.length]="<a:themeElements>",r[r.length]='<a:clrScheme name="Office">',r[r.length]='<a:dk1><a:sysClr val="windowText" lastClr="000000"/></a:dk1>',r[r.length]='<a:lt1><a:sysClr val="window" lastClr="FFFFFF"/></a:lt1>',r[r.length]='<a:dk2><a:srgbClr val="1F497D"/></a:dk2>',r[r.length]='<a:lt2><a:srgbClr val="EEECE1"/></a:lt2>',r[r.length]='<a:accent1><a:srgbClr val="4F81BD"/></a:accent1>',r[r.length]='<a:accent2><a:srgbClr val="C0504D"/></a:accent2>',r[r.length]='<a:accent3><a:srgbClr val="9BBB59"/></a:accent3>',r[r.length]='<a:accent4><a:srgbClr val="8064A2"/></a:accent4>',r[r.length]='<a:accent5><a:srgbClr val="4BACC6"/></a:accent5>',r[r.length]='<a:accent6><a:srgbClr val="F79646"/></a:accent6>',r[r.length]='<a:hlink><a:srgbClr val="0000FF"/></a:hlink>',r[r.length]='<a:folHlink><a:srgbClr val="800080"/></a:folHlink>',r[r.length]="</a:clrScheme>",r[r.length]='<a:fontScheme name="Office">',r[r.length]="<a:majorFont>",r[r.length]='<a:latin typeface="Cambria"/>',r[r.length]='<a:ea typeface=""/>',r[r.length]='<a:cs typeface=""/>',r[r.length]='<a:font script="Jpan" typeface="MS Pゴシック"/>',r[r.length]='<a:font script="Hang" typeface="맑은 고딕"/>',r[r.length]='<a:font script="Hans" typeface="宋体"/>',r[r.length]='<a:font script="Hant" typeface="新細明體"/>',r[r.length]='<a:font script="Arab" typeface="Times New Roman"/>',r[r.length]='<a:font script="Hebr" typeface="Times New Roman"/>',r[r.length]='<a:font script="Thai" typeface="Tahoma"/>',r[r.length]='<a:font script="Ethi" typeface="Nyala"/>',r[r.length]='<a:font script="Beng" typeface="Vrinda"/>',r[r.length]='<a:font script="Gujr" typeface="Shruti"/>',r[r.length]='<a:font script="Khmr" typeface="MoolBoran"/>',r[r.length]='<a:font script="Knda" typeface="Tunga"/>',r[r.length]='<a:font script="Guru" typeface="Raavi"/>',r[r.length]='<a:font script="Cans" typeface="Euphemia"/>',r[r.length]='<a:font script="Cher" typeface="Plantagenet Cherokee"/>',r[r.length]='<a:font script="Yiii" typeface="Microsoft Yi Baiti"/>',r[r.length]='<a:font script="Tibt" typeface="Microsoft Himalaya"/>',r[r.length]='<a:font script="Thaa" typeface="MV Boli"/>',r[r.length]='<a:font script="Deva" typeface="Mangal"/>',r[r.length]='<a:font script="Telu" typeface="Gautami"/>',r[r.length]='<a:font script="Taml" typeface="Latha"/>',r[r.length]='<a:font script="Syrc" typeface="Estrangelo Edessa"/>',r[r.length]='<a:font script="Orya" typeface="Kalinga"/>',r[r.length]='<a:font script="Mlym" typeface="Kartika"/>',r[r.length]='<a:font script="Laoo" typeface="DokChampa"/>',r[r.length]='<a:font script="Sinh" typeface="Iskoola Pota"/>',r[r.length]='<a:font script="Mong" typeface="Mongolian Baiti"/>',r[r.length]='<a:font script="Viet" typeface="Times New Roman"/>',r[r.length]='<a:font script="Uigh" typeface="Microsoft Uighur"/>',r[r.length]='<a:font script="Geor" typeface="Sylfaen"/>',r[r.length]="</a:majorFont>",r[r.length]="<a:minorFont>",r[r.length]='<a:latin typeface="Calibri"/>',r[r.length]='<a:ea typeface=""/>',r[r.length]='<a:cs typeface=""/>',r[r.length]='<a:font script="Jpan" typeface="MS Pゴシック"/>',r[r.length]='<a:font script="Hang" typeface="맑은 고딕"/>',r[r.length]='<a:font script="Hans" typeface="宋体"/>',r[r.length]='<a:font script="Hant" typeface="新細明體"/>',r[r.length]='<a:font script="Arab" typeface="Arial"/>',r[r.length]='<a:font script="Hebr" typeface="Arial"/>',r[r.length]='<a:font script="Thai" typeface="Tahoma"/>',r[r.length]='<a:font script="Ethi" typeface="Nyala"/>',r[r.length]='<a:font script="Beng" typeface="Vrinda"/>',r[r.length]='<a:font script="Gujr" typeface="Shruti"/>',r[r.length]='<a:font script="Khmr" typeface="DaunPenh"/>',r[r.length]='<a:font script="Knda" typeface="Tunga"/>',r[r.length]='<a:font script="Guru" typeface="Raavi"/>',r[r.length]='<a:font script="Cans" typeface="Euphemia"/>',r[r.length]='<a:font script="Cher" typeface="Plantagenet Cherokee"/>',r[r.length]='<a:font script="Yiii" typeface="Microsoft Yi Baiti"/>',r[r.length]='<a:font script="Tibt" typeface="Microsoft Himalaya"/>',r[r.length]='<a:font script="Thaa" typeface="MV Boli"/>',r[r.length]='<a:font script="Deva" typeface="Mangal"/>',r[r.length]='<a:font script="Telu" typeface="Gautami"/>',r[r.length]='<a:font script="Taml" typeface="Latha"/>',r[r.length]='<a:font script="Syrc" typeface="Estrangelo Edessa"/>',r[r.length]='<a:font script="Orya" typeface="Kalinga"/>',r[r.length]='<a:font script="Mlym" typeface="Kartika"/>',r[r.length]='<a:font script="Laoo" typeface="DokChampa"/>',r[r.length]='<a:font script="Sinh" typeface="Iskoola Pota"/>',r[r.length]='<a:font script="Mong" typeface="Mongolian Baiti"/>',r[r.length]='<a:font script="Viet" typeface="Arial"/>',r[r.length]='<a:font script="Uigh" typeface="Microsoft Uighur"/>',r[r.length]='<a:font script="Geor" typeface="Sylfaen"/>',r[r.length]="</a:minorFont>",r[r.length]="</a:fontScheme>",r[r.length]='<a:fmtScheme name="Office">',r[r.length]="<a:fillStyleLst>",r[r.length]='<a:solidFill><a:schemeClr val="phClr"/></a:solidFill>',r[r.length]='<a:gradFill rotWithShape="1">',r[r.length]="<a:gsLst>",r[r.length]='<a:gs pos="0"><a:schemeClr val="phClr"><a:tint val="50000"/><a:satMod val="300000"/></a:schemeClr></a:gs>',r[r.length]='<a:gs pos="35000"><a:schemeClr val="phClr"><a:tint val="37000"/><a:satMod val="300000"/></a:schemeClr></a:gs>',r[r.length]='<a:gs pos="100000"><a:schemeClr val="phClr"><a:tint val="15000"/><a:satMod val="350000"/></a:schemeClr></a:gs>',r[r.length]="</a:gsLst>",r[r.length]='<a:lin ang="16200000" scaled="1"/>',r[r.length]="</a:gradFill>",r[r.length]='<a:gradFill rotWithShape="1">',r[r.length]="<a:gsLst>",r[r.length]='<a:gs pos="0"><a:schemeClr val="phClr"><a:tint val="100000"/><a:shade val="100000"/><a:satMod val="130000"/></a:schemeClr></a:gs>',r[r.length]='<a:gs pos="100000"><a:schemeClr val="phClr"><a:tint val="50000"/><a:shade val="100000"/><a:satMod val="350000"/></a:schemeClr></a:gs>',r[r.length]="</a:gsLst>",r[r.length]='<a:lin ang="16200000" scaled="0"/>',r[r.length]="</a:gradFill>",r[r.length]="</a:fillStyleLst>",r[r.length]="<a:lnStyleLst>",r[r.length]='<a:ln w="9525" cap="flat" cmpd="sng" algn="ctr"><a:solidFill><a:schemeClr val="phClr"><a:shade val="95000"/><a:satMod val="105000"/></a:schemeClr></a:solidFill><a:prstDash val="solid"/></a:ln>',r[r.length]='<a:ln w="25400" cap="flat" cmpd="sng" algn="ctr"><a:solidFill><a:schemeClr val="phClr"/></a:solidFill><a:prstDash val="solid"/></a:ln>',r[r.length]='<a:ln w="38100" cap="flat" cmpd="sng" algn="ctr"><a:solidFill><a:schemeClr val="phClr"/></a:solidFill><a:prstDash val="solid"/></a:ln>',r[r.length]="</a:lnStyleLst>",r[r.length]="<a:effectStyleLst>",r[r.length]="<a:effectStyle>",r[r.length]="<a:effectLst>",r[r.length]='<a:outerShdw blurRad="40000" dist="20000" dir="5400000" rotWithShape="0"><a:srgbClr val="000000"><a:alpha val="38000"/></a:srgbClr></a:outerShdw>',r[r.length]="</a:effectLst>",r[r.length]="</a:effectStyle>",r[r.length]="<a:effectStyle>",r[r.length]="<a:effectLst>",r[r.length]='<a:outerShdw blurRad="40000" dist="23000" dir="5400000" rotWithShape="0"><a:srgbClr val="000000"><a:alpha val="35000"/></a:srgbClr></a:outerShdw>',r[r.length]="</a:effectLst>",r[r.length]="</a:effectStyle>",r[r.length]="<a:effectStyle>",r[r.length]="<a:effectLst>",r[r.length]='<a:outerShdw blurRad="40000" dist="23000" dir="5400000" rotWithShape="0"><a:srgbClr val="000000"><a:alpha val="35000"/></a:srgbClr></a:outerShdw>',r[r.length]="</a:effectLst>",r[r.length]='<a:scene3d><a:camera prst="orthographicFront"><a:rot lat="0" lon="0" rev="0"/></a:camera><a:lightRig rig="threePt" dir="t"><a:rot lat="0" lon="0" rev="1200000"/></a:lightRig></a:scene3d>',r[r.length]='<a:sp3d><a:bevelT w="63500" h="25400"/></a:sp3d>',r[r.length]="</a:effectStyle>",r[r.length]="</a:effectStyleLst>",r[r.length]="<a:bgFillStyleLst>",r[r.length]='<a:solidFill><a:schemeClr val="phClr"/></a:solidFill>',r[r.length]='<a:gradFill rotWithShape="1">',r[r.length]="<a:gsLst>",r[r.length]='<a:gs pos="0"><a:schemeClr val="phClr"><a:tint val="40000"/><a:satMod val="350000"/></a:schemeClr></a:gs>',r[r.length]='<a:gs pos="40000"><a:schemeClr val="phClr"><a:tint val="45000"/><a:shade val="99000"/><a:satMod val="350000"/></a:schemeClr></a:gs>',r[r.length]='<a:gs pos="100000"><a:schemeClr val="phClr"><a:shade val="20000"/><a:satMod val="255000"/></a:schemeClr></a:gs>',r[r.length]="</a:gsLst>",r[r.length]='<a:path path="circle"><a:fillToRect l="50000" t="-80000" r="50000" b="180000"/></a:path>',r[r.length]="</a:gradFill>",r[r.length]='<a:gradFill rotWithShape="1">',r[r.length]="<a:gsLst>",r[r.length]='<a:gs pos="0"><a:schemeClr val="phClr"><a:tint val="80000"/><a:satMod val="300000"/></a:schemeClr></a:gs>',r[r.length]='<a:gs pos="100000"><a:schemeClr val="phClr"><a:shade val="30000"/><a:satMod val="200000"/></a:schemeClr></a:gs>',r[r.length]="</a:gsLst>",r[r.length]='<a:path path="circle"><a:fillToRect l="50000" t="50000" r="50000" b="50000"/></a:path>',r[r.length]="</a:gradFill>",r[r.length]="</a:bgFillStyleLst>",r[r.length]="</a:fmtScheme>",r[r.length]="</a:themeElements>",r[r.length]="<a:objectDefaults>",r[r.length]="<a:spDef>",r[r.length]='<a:spPr/><a:bodyPr/><a:lstStyle/><a:style><a:lnRef idx="1"><a:schemeClr val="accent1"/></a:lnRef><a:fillRef idx="3"><a:schemeClr val="accent1"/></a:fillRef><a:effectRef idx="2"><a:schemeClr val="accent1"/></a:effectRef><a:fontRef idx="minor"><a:schemeClr val="lt1"/></a:fontRef></a:style>',r[r.length]="</a:spDef>",r[r.length]="<a:lnDef>",r[r.length]='<a:spPr/><a:bodyPr/><a:lstStyle/><a:style><a:lnRef idx="2"><a:schemeClr val="accent1"/></a:lnRef><a:fillRef idx="0"><a:schemeClr val="accent1"/></a:fillRef><a:effectRef idx="1"><a:schemeClr val="accent1"/></a:effectRef><a:fontRef idx="minor"><a:schemeClr val="tx1"/></a:fontRef></a:style>',r[r.length]="</a:lnDef>",r[r.length]="</a:objectDefaults>",r[r.length]="<a:extraClrSchemeLst/>",r[r.length]="</a:theme>",r.join("")}function Xg(e,t){return{flags:e.read_shift(4),version:e.read_shift(4),name:nr(e)}}function Kg(e){var t=re(12+2*e.name.length);return t.write_shift(4,e.flags),t.write_shift(4,e.version),zt(e.name,t),t.slice(0,t.l)}function qg(e){for(var t=[],r=e.read_shift(4);r-- >0;)t.push([e.read_shift(4),e.read_shift(4)]);return t}function Jg(e){var t=re(4+8*e.length);t.write_shift(4,e.length);for(var r=0;r<e.length;++r)t.write_shift(4,e[r][0]),t.write_shift(4,e[r][1]);return t}function Zg(e,t){var r=re(8+2*t.length);return r.write_shift(4,e),zt(t,r),r.slice(0,r.l)}function Qg(e){return e.l+=4,e.read_shift(4)!=0}function e1(e,t){var r=re(8);return r.write_shift(4,e),r.write_shift(4,1),r}function t1(){var e=fr();return de(e,332),de(e,334,Pr(1)),de(e,335,Kg({name:"XLDAPR",version:12e4,flags:3496657072})),de(e,336),de(e,339,Zg(1,"XLDAPR")),de(e,52),de(e,35,Pr(514)),de(e,4096,Pr(0)),de(e,4097,br(1)),de(e,36),de(e,53),de(e,340),de(e,337,e1(1)),de(e,51,Jg([[1,0]])),de(e,338),de(e,333),e.end()}function uu(){var e=[Mt];return e.push(`<metadata xmlns="http://schemas.openxmlformats.org/spreadsheetml/2006/main" xmlns:xlrd="http://schemas.microsoft.com/office/spreadsheetml/2017/richdata" xmlns:xda="http://schemas.microsoft.com/office/spreadsheetml/2017/dynamicarray">
38
+ <metadataTypes count="1">
39
+ <metadataType name="XLDAPR" minSupportedVersion="120000" copy="1" pasteAll="1" pasteValues="1" merge="1" splitFirst="1" rowColShift="1" clearFormats="1" clearComments="1" assign="1" coerce="1" cellMeta="1"/>
40
+ </metadataTypes>
41
+ <futureMetadata name="XLDAPR" count="1">
42
+ <bk>
43
+ <extLst>
44
+ <ext uri="{bdbb8cdc-fa1e-496e-a857-3c3f30c029c3}">
45
+ <xda:dynamicArrayProperties fDynamic="1" fCollapsed="0"/>
46
+ </ext>
47
+ </extLst>
48
+ </bk>
49
+ </futureMetadata>
50
+ <cellMetadata count="1">
51
+ <bk>
52
+ <rc t="1" v="0"/>
53
+ </bk>
54
+ </cellMetadata>
55
+ </metadata>`),e.join("")}function r1(e){var t={};t.i=e.read_shift(4);var r={};r.r=e.read_shift(4),r.c=e.read_shift(4),t.r=ct(r);var n=e.read_shift(1);return n&2&&(t.l="1"),n&8&&(t.a="1"),t}var zn=1024;function fu(e,t){for(var r=[21600,21600],n=["m0,0l0",r[1],r[0],r[1],r[0],"0xe"].join(","),i=[xe("xml",null,{"xmlns:v":vr.v,"xmlns:o":vr.o,"xmlns:x":vr.x,"xmlns:mv":vr.mv}).replace(/\/>/,">"),xe("o:shapelayout",xe("o:idmap",null,{"v:ext":"edit",data:e}),{"v:ext":"edit"}),xe("v:shapetype",[xe("v:stroke",null,{joinstyle:"miter"}),xe("v:path",null,{gradientshapeok:"t","o:connecttype":"rect"})].join(""),{id:"_x0000_t202","o:spt":202,coordsize:r.join(","),path:n})];zn<e*1e3;)zn+=1e3;return t.forEach(function(s){var a=Vt(s[0]),o={color2:"#BEFF82",type:"gradient"};o.type=="gradient"&&(o.angle="-180");var f=o.type=="gradient"?xe("o:fill",null,{type:"gradientUnscaled","v:ext":"view"}):null,u=xe("v:fill",f,o),d={on:"t",obscured:"t"};++zn,i=i.concat(["<v:shape"+Si({id:"_x0000_s"+zn,type:"#_x0000_t202",style:"position:absolute; margin-left:80pt;margin-top:5pt;width:104pt;height:64pt;z-index:10"+(s[1].hidden?";visibility:hidden":""),fillcolor:"#ECFAD4",strokecolor:"#edeaa1"})+">",u,xe("v:shadow",null,d),xe("v:path",null,{"o:connecttype":"none"}),'<v:textbox><div style="text-align:left"></div></v:textbox>','<x:ClientData ObjectType="Note">',"<x:MoveWithCells/>","<x:SizeWithCells/>",Zt("x:Anchor",[a.c+1,0,a.r+1,0,a.c+3,20,a.r+5,20].join(",")),Zt("x:AutoFill","False"),Zt("x:Row",String(a.r)),Zt("x:Column",String(a.c)),s[1].hidden?"":"<x:Visible/>","</x:ClientData>","</v:shape>"])}),i.push("</xml>"),i.join("")}function du(e){var t=[Mt,xe("comments",null,{xmlns:Jn[0]})],r=[];return t.push("<authors>"),e.forEach(function(n){n[1].forEach(function(i){var s=lt(i.a);r.indexOf(s)==-1&&(r.push(s),t.push("<author>"+s+"</author>")),i.T&&i.ID&&r.indexOf("tc="+i.ID)==-1&&(r.push("tc="+i.ID),t.push("<author>tc="+i.ID+"</author>"))})}),r.length==0&&(r.push("SheetJ5"),t.push("<author>SheetJ5</author>")),t.push("</authors>"),t.push("<commentList>"),e.forEach(function(n){var i=0,s=[];if(n[1][0]&&n[1][0].T&&n[1][0].ID?i=r.indexOf("tc="+n[1][0].ID):n[1].forEach(function(f){f.a&&(i=r.indexOf(lt(f.a))),s.push(f.t||"")}),t.push('<comment ref="'+n[0]+'" authorId="'+i+'"><text>'),s.length<=1)t.push(Zt("t",lt(s[0]||"")));else{for(var a=`Comment:
56
+ `+s[0]+`
57
+ `,o=1;o<s.length;++o)a+=`Reply:
58
+ `+s[o]+`
59
+ `;t.push(Zt("t",lt(a)))}t.push("</text></comment>")}),t.push("</commentList>"),t.length>2&&(t[t.length]="</comments>",t[1]=t[1].replace("/>",">")),t.join("")}function n1(e,t,r){var n=[Mt,xe("ThreadedComments",null,{xmlns:Wt.TCMNT}).replace(/[\/]>/,">")];return e.forEach(function(i){var s="";(i[1]||[]).forEach(function(a,o){if(!a.T){delete a.ID;return}a.a&&t.indexOf(a.a)==-1&&t.push(a.a);var f={ref:i[0],id:"{54EE7951-7262-4200-6969-"+("000000000000"+r.tcid++).slice(-12)+"}"};o==0?s=f.id:f.parentId=s,a.ID=f.id,a.a&&(f.personId="{54EE7950-7262-4200-6969-"+("000000000000"+t.indexOf(a.a)).slice(-12)+"}"),n.push(xe("threadedComment",Zt("text",a.t||""),f))})}),n.push("</ThreadedComments>"),n.join("")}function i1(e){var t=[Mt,xe("personList",null,{xmlns:Wt.TCMNT,"xmlns:x":Jn[0]}).replace(/[\/]>/,">")];return e.forEach(function(r,n){t.push(xe("person",null,{displayName:r,id:"{54EE7950-7262-4200-6969-"+("000000000000"+n).slice(-12)+"}",userId:r,providerId:"None"}))}),t.push("</personList>"),t.join("")}function s1(e){var t={};t.iauthor=e.read_shift(4);var r=Dn(e);return t.rfx=r.s,t.ref=ct(r.s),e.l+=16,t}function a1(e,t){return t==null&&(t=re(36)),t.write_shift(4,e[1].iauthor),Qn(e[0],t),t.write_shift(4,0),t.write_shift(4,0),t.write_shift(4,0),t.write_shift(4,0),t}var o1=nr;function l1(e){return zt(e.slice(0,54))}function c1(e){var t=fr(),r=[];return de(t,628),de(t,630),e.forEach(function(n){n[1].forEach(function(i){r.indexOf(i.a)>-1||(r.push(i.a.slice(0,54)),de(t,632,l1(i.a)))})}),de(t,631),de(t,633),e.forEach(function(n){n[1].forEach(function(i){i.iauthor=r.indexOf(i.a);var s={s:Vt(n[0]),e:Vt(n[0])};de(t,635,a1([s,i])),i.t&&i.t.length>0&&de(t,637,fp(i)),de(t,636),delete i.iauthor})}),de(t,634),de(t,629),t.end()}function u1(e,t){t.FullPaths.forEach(function(r,n){if(n!=0){var i=r.replace(/[^\/]*[\/]/,"/_VBA_PROJECT_CUR/");i.slice(-1)!=="/"&&ht.utils.cfb_add(e,i,t.FileIndex[n].content)}})}var hu=["xlsb","xlsm","xlam","biff8","xla"],f1=(function(){var e=/(^|[^A-Za-z_])R(\[?-?\d+\]|[1-9]\d*|)C(\[?-?\d+\]|[1-9]\d*|)(?![A-Za-z0-9_])/g,t={r:0,c:0};function r(n,i,s,a){var o=!1,f=!1;s.length==0?f=!0:s.charAt(0)=="["&&(f=!0,s=s.slice(1,-1)),a.length==0?o=!0:a.charAt(0)=="["&&(o=!0,a=a.slice(1,-1));var u=s.length>0?parseInt(s,10)|0:0,d=a.length>0?parseInt(a,10)|0:0;return o?d+=t.c:--d,f?u+=t.r:--u,i+(o?"":"$")+rr(d)+(f?"":"$")+Qt(u)}return function(i,s){return t=s,i.replace(e,r)}})(),oo=/(^|[^._A-Z0-9])([$]?)([A-Z]{1,2}|[A-W][A-Z]{2}|X[A-E][A-Z]|XF[A-D])([$]?)(10[0-3]\d{4}|104[0-7]\d{3}|1048[0-4]\d{2}|10485[0-6]\d|104857[0-6]|[1-9]\d{0,5})(?![_.\(A-Za-z0-9])/g,lo=(function(){return function(t,r){return t.replace(oo,function(n,i,s,a,o,f){var u=to(a)-(s?0:r.c),d=eo(f)-(o?0:r.r),h=d==0?"":o?d+1:"["+d+"]",m=u==0?"":s?u+1:"["+u+"]";return i+"R"+h+"C"+m})}})();function d1(e,t){return e.replace(oo,function(r,n,i,s,a,o){return n+(i=="$"?i+s:rr(to(s)+t.c))+(a=="$"?a+o:Qt(eo(o)+t.r))})}function h1(e){return e.length!=1}function Pt(e){e.l+=1}function on(e,t){var r=e.read_shift(2);return[r&16383,r>>14&1,r>>15&1]}function pu(e,t,r){var n=2;if(r){if(r.biff>=2&&r.biff<=5)return gu(e);r.biff==12&&(n=4)}var i=e.read_shift(n),s=e.read_shift(n),a=on(e),o=on(e);return{s:{r:i,c:a[0],cRel:a[1],rRel:a[2]},e:{r:s,c:o[0],cRel:o[1],rRel:o[2]}}}function gu(e){var t=on(e),r=on(e),n=e.read_shift(1),i=e.read_shift(1);return{s:{r:t[0],c:n,cRel:t[1],rRel:t[2]},e:{r:r[0],c:i,cRel:r[1],rRel:r[2]}}}function p1(e,t,r){if(r.biff<8)return gu(e);var n=e.read_shift(r.biff==12?4:2),i=e.read_shift(r.biff==12?4:2),s=on(e),a=on(e);return{s:{r:n,c:s[0],cRel:s[1],rRel:s[2]},e:{r:i,c:a[0],cRel:a[1],rRel:a[2]}}}function mu(e,t,r){if(r&&r.biff>=2&&r.biff<=5)return g1(e);var n=e.read_shift(r&&r.biff==12?4:2),i=on(e);return{r:n,c:i[0],cRel:i[1],rRel:i[2]}}function g1(e){var t=on(e),r=e.read_shift(1);return{r:t[0],c:r,cRel:t[1],rRel:t[2]}}function m1(e){var t=e.read_shift(2),r=e.read_shift(2);return{r:t,c:r&255,fQuoted:!!(r&16384),cRel:r>>15,rRel:r>>15}}function x1(e,t,r){var n=r&&r.biff?r.biff:8;if(n>=2&&n<=5)return v1(e);var i=e.read_shift(n>=12?4:2),s=e.read_shift(2),a=(s&16384)>>14,o=(s&32768)>>15;if(s&=16383,o==1)for(;i>524287;)i-=1048576;if(a==1)for(;s>8191;)s=s-16384;return{r:i,c:s,cRel:a,rRel:o}}function v1(e){var t=e.read_shift(2),r=e.read_shift(1),n=(t&32768)>>15,i=(t&16384)>>14;return t&=16383,n==1&&t>=8192&&(t=t-16384),i==1&&r>=128&&(r=r-256),{r:t,c:r,cRel:i,rRel:n}}function y1(e,t,r){var n=(e[e.l++]&96)>>5,i=pu(e,r.biff>=2&&r.biff<=5?6:8,r);return[n,i]}function w1(e,t,r){var n=(e[e.l++]&96)>>5,i=e.read_shift(2,"i"),s=8;if(r)switch(r.biff){case 5:e.l+=12,s=6;break;case 12:s=12;break}var a=pu(e,s,r);return[n,i,a]}function T1(e,t,r){var n=(e[e.l++]&96)>>5;return e.l+=r&&r.biff>8?12:r.biff<8?6:8,[n]}function S1(e,t,r){var n=(e[e.l++]&96)>>5,i=e.read_shift(2),s=8;if(r)switch(r.biff){case 5:e.l+=12,s=6;break;case 12:s=12;break}return e.l+=s,[n,i]}function E1(e,t,r){var n=(e[e.l++]&96)>>5,i=p1(e,t-1,r);return[n,i]}function _1(e,t,r){var n=(e[e.l++]&96)>>5;return e.l+=r.biff==2?6:r.biff==12?14:7,[n]}function Dl(e){var t=e[e.l+1]&1,r=1;return e.l+=4,[t,r]}function b1(e,t,r){e.l+=2;for(var n=e.read_shift(r&&r.biff==2?1:2),i=[],s=0;s<=n;++s)i.push(e.read_shift(r&&r.biff==2?1:2));return i}function C1(e,t,r){var n=e[e.l+1]&255?1:0;return e.l+=2,[n,e.read_shift(r&&r.biff==2?1:2)]}function A1(e,t,r){var n=e[e.l+1]&255?1:0;return e.l+=2,[n,e.read_shift(r&&r.biff==2?1:2)]}function O1(e){var t=e[e.l+1]&255?1:0;return e.l+=2,[t,e.read_shift(2)]}function D1(e,t,r){var n=e[e.l+1]&255?1:0;return e.l+=r&&r.biff==2?3:4,[n]}function xu(e){var t=e.read_shift(1),r=e.read_shift(1);return[t,r]}function k1(e){return e.read_shift(2),xu(e)}function I1(e){return e.read_shift(2),xu(e)}function F1(e,t,r){var n=(e[e.l]&96)>>5;e.l+=1;var i=mu(e,0,r);return[n,i]}function N1(e,t,r){var n=(e[e.l]&96)>>5;e.l+=1;var i=x1(e,0,r);return[n,i]}function R1(e,t,r){var n=(e[e.l]&96)>>5;e.l+=1;var i=e.read_shift(2);r&&r.biff==5&&(e.l+=12);var s=mu(e,0,r);return[n,i,s]}function P1(e,t,r){var n=(e[e.l]&96)>>5;e.l+=1;var i=e.read_shift(r&&r.biff<=3?1:2);return[Pm[i],wu[i],n]}function j1(e,t,r){var n=e[e.l++],i=e.read_shift(1),s=r&&r.biff<=3?[n==88?-1:0,e.read_shift(1)]:M1(e);return[i,(s[0]===0?wu:Rm)[s[1]]]}function M1(e){return[e[e.l+1]>>7,e.read_shift(2)&32767]}function L1(e,t,r){e.l+=r&&r.biff==2?3:4}function B1(e,t,r){if(e.l++,r&&r.biff==12)return[e.read_shift(4,"i"),0];var n=e.read_shift(2),i=e.read_shift(r&&r.biff==2?1:2);return[n,i]}function $1(e){return e.l++,Ii[e.read_shift(1)]}function U1(e){return e.l++,e.read_shift(2)}function W1(e){return e.l++,e.read_shift(1)!==0}function V1(e){return e.l++,ei(e)}function z1(e,t,r){return e.l++,Q0(e,t-1,r)}function H1(e,t){var r=[e.read_shift(1)];if(t==12)switch(r[0]){case 2:r[0]=4;break;case 4:r[0]=16;break;case 0:r[0]=1;break;case 1:r[0]=2;break}switch(r[0]){case 4:r[1]=Rp(e,1)?"TRUE":"FALSE",t!=12&&(e.l+=7);break;case 37:case 16:r[1]=Ii[e[e.l]],e.l+=t==12?4:8;break;case 0:e.l+=8;break;case 1:r[1]=ei(e);break;case 2:r[1]=Lp(e,0,{biff:t>0&&t<8?2:t});break;default:throw new Error("Bad SerAr: "+r[0])}return r}function G1(e,t,r){for(var n=e.read_shift(r.biff==12?4:2),i=[],s=0;s!=n;++s)i.push((r.biff==12?Dn:Up)(e));return i}function Y1(e,t,r){var n=0,i=0;r.biff==12?(n=e.read_shift(4),i=e.read_shift(4)):(i=1+e.read_shift(1),n=1+e.read_shift(2)),r.biff>=2&&r.biff<8&&(--n,--i==0&&(i=256));for(var s=0,a=[];s!=n&&(a[s]=[]);++s)for(var o=0;o!=i;++o)a[s][o]=H1(e,r.biff);return a}function X1(e,t,r){var n=e.read_shift(1)>>>5&3,i=!r||r.biff>=8?4:2,s=e.read_shift(i);switch(r.biff){case 2:e.l+=5;break;case 3:case 4:e.l+=8;break;case 5:e.l+=12;break}return[n,0,s]}function K1(e,t,r){if(r.biff==5)return q1(e);var n=e.read_shift(1)>>>5&3,i=e.read_shift(2),s=e.read_shift(4);return[n,i,s]}function q1(e){var t=e.read_shift(1)>>>5&3,r=e.read_shift(2,"i");e.l+=8;var n=e.read_shift(2);return e.l+=12,[t,r,n]}function J1(e,t,r){var n=e.read_shift(1)>>>5&3;e.l+=r&&r.biff==2?3:4;var i=e.read_shift(r&&r.biff==2?1:2);return[n,i]}function Z1(e,t,r){var n=e.read_shift(1)>>>5&3,i=e.read_shift(r&&r.biff==2?1:2);return[n,i]}function Q1(e,t,r){var n=e.read_shift(1)>>>5&3;return e.l+=4,r.biff<8&&e.l--,r.biff==12&&(e.l+=2),[n]}function em(e,t,r){var n=(e[e.l++]&96)>>5,i=e.read_shift(2),s=4;if(r)switch(r.biff){case 5:s=15;break;case 12:s=6;break}return e.l+=s,[n,i]}var tm=Wr,rm=Wr,nm=Wr;function Fi(e,t,r){return e.l+=2,[m1(e)]}function co(e){return e.l+=6,[]}var im=Fi,sm=co,am=co,om=Fi;function vu(e){return e.l+=2,[J0(e),e.read_shift(2)&1]}var lm=Fi,cm=vu,um=co,fm=Fi,dm=Fi,hm=["Data","All","Headers","??","?Data2","??","?DataHeaders","??","Totals","??","??","??","?DataTotals","??","??","??","?Current"];function pm(e){e.l+=2;var t=e.read_shift(2),r=e.read_shift(2),n=e.read_shift(4),i=e.read_shift(2),s=e.read_shift(2),a=hm[r>>2&31];return{ixti:t,coltype:r&3,rt:a,idx:n,c:i,C:s}}function gm(e){return e.l+=2,[e.read_shift(4)]}function mm(e,t,r){return e.l+=5,e.l+=2,e.l+=r.biff==2?1:4,["PTGSHEET"]}function xm(e,t,r){return e.l+=r.biff==2?4:5,["PTGENDSHEET"]}function vm(e){var t=e.read_shift(1)>>>5&3,r=e.read_shift(2);return[t,r]}function ym(e){var t=e.read_shift(1)>>>5&3,r=e.read_shift(2);return[t,r]}function wm(e){return e.l+=4,[0,0]}var kl={1:{n:"PtgExp",f:B1},2:{n:"PtgTbl",f:nm},3:{n:"PtgAdd",f:Pt},4:{n:"PtgSub",f:Pt},5:{n:"PtgMul",f:Pt},6:{n:"PtgDiv",f:Pt},7:{n:"PtgPower",f:Pt},8:{n:"PtgConcat",f:Pt},9:{n:"PtgLt",f:Pt},10:{n:"PtgLe",f:Pt},11:{n:"PtgEq",f:Pt},12:{n:"PtgGe",f:Pt},13:{n:"PtgGt",f:Pt},14:{n:"PtgNe",f:Pt},15:{n:"PtgIsect",f:Pt},16:{n:"PtgUnion",f:Pt},17:{n:"PtgRange",f:Pt},18:{n:"PtgUplus",f:Pt},19:{n:"PtgUminus",f:Pt},20:{n:"PtgPercent",f:Pt},21:{n:"PtgParen",f:Pt},22:{n:"PtgMissArg",f:Pt},23:{n:"PtgStr",f:z1},26:{n:"PtgSheet",f:mm},27:{n:"PtgEndSheet",f:xm},28:{n:"PtgErr",f:$1},29:{n:"PtgBool",f:W1},30:{n:"PtgInt",f:U1},31:{n:"PtgNum",f:V1},32:{n:"PtgArray",f:_1},33:{n:"PtgFunc",f:P1},34:{n:"PtgFuncVar",f:j1},35:{n:"PtgName",f:X1},36:{n:"PtgRef",f:F1},37:{n:"PtgArea",f:y1},38:{n:"PtgMemArea",f:J1},39:{n:"PtgMemErr",f:tm},40:{n:"PtgMemNoMem",f:rm},41:{n:"PtgMemFunc",f:Z1},42:{n:"PtgRefErr",f:Q1},43:{n:"PtgAreaErr",f:T1},44:{n:"PtgRefN",f:N1},45:{n:"PtgAreaN",f:E1},46:{n:"PtgMemAreaN",f:vm},47:{n:"PtgMemNoMemN",f:ym},57:{n:"PtgNameX",f:K1},58:{n:"PtgRef3d",f:R1},59:{n:"PtgArea3d",f:w1},60:{n:"PtgRefErr3d",f:em},61:{n:"PtgAreaErr3d",f:S1},255:{}},Tm={64:32,96:32,65:33,97:33,66:34,98:34,67:35,99:35,68:36,100:36,69:37,101:37,70:38,102:38,71:39,103:39,72:40,104:40,73:41,105:41,74:42,106:42,75:43,107:43,76:44,108:44,77:45,109:45,78:46,110:46,79:47,111:47,88:34,120:34,89:57,121:57,90:58,122:58,91:59,123:59,92:60,124:60,93:61,125:61},Sm={1:{n:"PtgElfLel",f:vu},2:{n:"PtgElfRw",f:fm},3:{n:"PtgElfCol",f:im},6:{n:"PtgElfRwV",f:dm},7:{n:"PtgElfColV",f:om},10:{n:"PtgElfRadical",f:lm},11:{n:"PtgElfRadicalS",f:um},13:{n:"PtgElfColS",f:sm},15:{n:"PtgElfColSV",f:am},16:{n:"PtgElfRadicalLel",f:cm},25:{n:"PtgList",f:pm},29:{n:"PtgSxName",f:gm},255:{}},Em={0:{n:"PtgAttrNoop",f:wm},1:{n:"PtgAttrSemi",f:D1},2:{n:"PtgAttrIf",f:A1},4:{n:"PtgAttrChoose",f:b1},8:{n:"PtgAttrGoto",f:C1},16:{n:"PtgAttrSum",f:L1},32:{n:"PtgAttrBaxcel",f:Dl},33:{n:"PtgAttrBaxcel",f:Dl},64:{n:"PtgAttrSpace",f:k1},65:{n:"PtgAttrSpaceSemi",f:I1},128:{n:"PtgAttrIfError",f:O1},255:{}};function _m(e,t,r,n){if(n.biff<8)return Wr(e,t);for(var i=e.l+t,s=[],a=0;a!==r.length;++a)switch(r[a][0]){case"PtgArray":r[a][1]=Y1(e,0,n),s.push(r[a][1]);break;case"PtgMemArea":r[a][2]=G1(e,r[a][1],n),s.push(r[a][2]);break;case"PtgExp":n&&n.biff==12&&(r[a][1][1]=e.read_shift(4),s.push(r[a][1]));break;case"PtgList":case"PtgElfRadicalS":case"PtgElfColS":case"PtgElfColSV":throw"Unsupported "+r[a][0]}return t=i-e.l,t!==0&&s.push(Wr(e,t)),s}function bm(e,t,r){for(var n=e.l+t,i,s,a=[];n!=e.l;)t=n-e.l,s=e[e.l],i=kl[s]||kl[Tm[s]],(s===24||s===25)&&(i=(s===24?Sm:Em)[e[e.l+1]]),!i||!i.f?Wr(e,t):a.push([i.n,i.f(e,t,r)]);return a}function Cm(e){for(var t=[],r=0;r<e.length;++r){for(var n=e[r],i=[],s=0;s<n.length;++s){var a=n[s];if(a)switch(a[0]){case 2:i.push('"'+a[1].replace(/"/g,'""')+'"');break;default:i.push(a[1])}else i.push("")}t.push(i.join(","))}return t.join(";")}var Am={PtgAdd:"+",PtgConcat:"&",PtgDiv:"/",PtgEq:"=",PtgGe:">=",PtgGt:">",PtgLe:"<=",PtgLt:"<",PtgMul:"*",PtgNe:"<>",PtgPower:"^",PtgSub:"-"};function Om(e,t){if(!e&&!(t&&t.biff<=5&&t.biff>=2))throw new Error("empty sheet name");return/[^\w\u4E00-\u9FFF\u3040-\u30FF]/.test(e)?"'"+e+"'":e}function yu(e,t,r){if(!e)return"SH33TJSERR0";if(r.biff>8&&(!e.XTI||!e.XTI[t]))return e.SheetNames[t];if(!e.XTI)return"SH33TJSERR6";var n=e.XTI[t];if(r.biff<8)return t>1e4&&(t-=65536),t<0&&(t=-t),t==0?"":e.XTI[t-1];if(!n)return"SH33TJSERR1";var i="";if(r.biff>8)switch(e[n[0]][0]){case 357:return i=n[1]==-1?"#REF":e.SheetNames[n[1]],n[1]==n[2]?i:i+":"+e.SheetNames[n[2]];case 358:return r.SID!=null?e.SheetNames[r.SID]:"SH33TJSSAME"+e[n[0]][0];case 355:default:return"SH33TJSSRC"+e[n[0]][0]}switch(e[n[0]][0][0]){case 1025:return i=n[1]==-1?"#REF":e.SheetNames[n[1]]||"SH33TJSERR3",n[1]==n[2]?i:i+":"+e.SheetNames[n[2]];case 14849:return e[n[0]].slice(1).map(function(s){return s.Name}).join(";;");default:return e[n[0]][0][3]?(i=n[1]==-1?"#REF":e[n[0]][0][3][n[1]]||"SH33TJSERR4",n[1]==n[2]?i:i+":"+e[n[0]][0][3][n[2]]):"SH33TJSERR2"}}function Il(e,t,r){var n=yu(e,t,r);return n=="#REF"?n:Om(n,r)}function qn(e,t,r,n,i){var s=i&&i.biff||8,a={s:{c:0,r:0}},o=[],f,u,d,h=0,m=0,l,v="";if(!e[0]||!e[0][0])return"";for(var g=-1,x="",T=0,b=e[0].length;T<b;++T){var _=e[0][T];switch(_[0]){case"PtgUminus":o.push("-"+o.pop());break;case"PtgUplus":o.push("+"+o.pop());break;case"PtgPercent":o.push(o.pop()+"%");break;case"PtgAdd":case"PtgConcat":case"PtgDiv":case"PtgEq":case"PtgGe":case"PtgGt":case"PtgLe":case"PtgLt":case"PtgMul":case"PtgNe":case"PtgPower":case"PtgSub":if(f=o.pop(),u=o.pop(),g>=0){switch(e[0][g][1][0]){case 0:x=Ot(" ",e[0][g][1][1]);break;case 1:x=Ot("\r",e[0][g][1][1]);break;default:if(x="",i.WTF)throw new Error("Unexpected PtgAttrSpaceType "+e[0][g][1][0])}u=u+x,g=-1}o.push(u+Am[_[0]]+f);break;case"PtgIsect":f=o.pop(),u=o.pop(),o.push(u+" "+f);break;case"PtgUnion":f=o.pop(),u=o.pop(),o.push(u+","+f);break;case"PtgRange":f=o.pop(),u=o.pop(),o.push(u+":"+f);break;case"PtgAttrChoose":break;case"PtgAttrGoto":break;case"PtgAttrIf":break;case"PtgAttrIfError":break;case"PtgRef":d=hi(_[1][1],a,i),o.push(pi(d,s));break;case"PtgRefN":d=r?hi(_[1][1],r,i):_[1][1],o.push(pi(d,s));break;case"PtgRef3d":h=_[1][1],d=hi(_[1][2],a,i),v=Il(n,h,i),o.push(v+"!"+pi(d,s));break;case"PtgFunc":case"PtgFuncVar":var k=_[1][0],F=_[1][1];k||(k=0),k&=127;var z=k==0?[]:o.slice(-k);o.length-=k,F==="User"&&(F=z.shift()),o.push(F+"("+z.join(",")+")");break;case"PtgBool":o.push(_[1]?"TRUE":"FALSE");break;case"PtgInt":o.push(_[1]);break;case"PtgNum":o.push(String(_[1]));break;case"PtgStr":o.push('"'+_[1].replace(/"/g,'""')+'"');break;case"PtgErr":o.push(_[1]);break;case"PtgAreaN":l=gl(_[1][1],r?{s:r}:a,i),o.push(ra(l,i));break;case"PtgArea":l=gl(_[1][1],a,i),o.push(ra(l,i));break;case"PtgArea3d":h=_[1][1],l=_[1][2],v=Il(n,h,i),o.push(v+"!"+ra(l,i));break;case"PtgAttrSum":o.push("SUM("+o.pop()+")");break;case"PtgAttrBaxcel":case"PtgAttrSemi":break;case"PtgName":m=_[1][2];var N=(n.names||[])[m-1]||(n[0]||[])[m],B=N?N.Name:"SH33TJSNAME"+String(m);B&&B.slice(0,6)=="_xlfn."&&!i.xlfn&&(B=B.slice(6)),o.push(B);break;case"PtgNameX":var M=_[1][1];m=_[1][2];var L;if(i.biff<=5)M<0&&(M=-M),n[M]&&(L=n[M][m]);else{var W="";if(((n[M]||[])[0]||[])[0]==14849||(((n[M]||[])[0]||[])[0]==1025?n[M][m]&&n[M][m].itab>0&&(W=n.SheetNames[n[M][m].itab-1]+"!"):W=n.SheetNames[m-1]+"!"),n[M]&&n[M][m])W+=n[M][m].Name;else if(n[0]&&n[0][m])W+=n[0][m].Name;else{var y=(yu(n,M,i)||"").split(";;");y[m-1]?W=y[m-1]:W+="SH33TJSERRX"}o.push(W);break}L||(L={Name:"SH33TJSERRY"}),o.push(L.Name);break;case"PtgParen":var H="(",Q=")";if(g>=0){switch(x="",e[0][g][1][0]){case 2:H=Ot(" ",e[0][g][1][1])+H;break;case 3:H=Ot("\r",e[0][g][1][1])+H;break;case 4:Q=Ot(" ",e[0][g][1][1])+Q;break;case 5:Q=Ot("\r",e[0][g][1][1])+Q;break;default:if(i.WTF)throw new Error("Unexpected PtgAttrSpaceType "+e[0][g][1][0])}g=-1}o.push(H+o.pop()+Q);break;case"PtgRefErr":o.push("#REF!");break;case"PtgRefErr3d":o.push("#REF!");break;case"PtgExp":d={c:_[1][1],r:_[1][0]};var J={c:r.c,r:r.r};if(n.sharedf[ct(d)]){var ee=n.sharedf[ct(d)];o.push(qn(ee,a,J,n,i))}else{var _e=!1;for(f=0;f!=n.arrayf.length;++f)if(u=n.arrayf[f],!(d.c<u[0].s.c||d.c>u[0].e.c)&&!(d.r<u[0].s.r||d.r>u[0].e.r)){o.push(qn(u[1],a,J,n,i)),_e=!0;break}_e||o.push(_[1])}break;case"PtgArray":o.push("{"+Cm(_[1])+"}");break;case"PtgMemArea":break;case"PtgAttrSpace":case"PtgAttrSpaceSemi":g=T;break;case"PtgTbl":break;case"PtgMemErr":break;case"PtgMissArg":o.push("");break;case"PtgAreaErr":o.push("#REF!");break;case"PtgAreaErr3d":o.push("#REF!");break;case"PtgList":o.push("Table"+_[1].idx+"[#"+_[1].rt+"]");break;case"PtgMemAreaN":case"PtgMemNoMemN":case"PtgAttrNoop":case"PtgSheet":case"PtgEndSheet":break;case"PtgMemFunc":break;case"PtgMemNoMem":break;case"PtgElfCol":case"PtgElfColS":case"PtgElfColSV":case"PtgElfColV":case"PtgElfLel":case"PtgElfRadical":case"PtgElfRadicalLel":case"PtgElfRadicalS":case"PtgElfRw":case"PtgElfRwV":throw new Error("Unsupported ELFs");case"PtgSxName":throw new Error("Unrecognized Formula Token: "+String(_));default:throw new Error("Unrecognized Formula Token: "+String(_))}var Ae=["PtgAttrSpace","PtgAttrSpaceSemi","PtgAttrGoto"];if(i.biff!=3&&g>=0&&Ae.indexOf(e[0][T][0])==-1){_=e[0][g];var De=!0;switch(_[1][0]){case 4:De=!1;case 0:x=Ot(" ",_[1][1]);break;case 5:De=!1;case 1:x=Ot("\r",_[1][1]);break;default:if(x="",i.WTF)throw new Error("Unexpected PtgAttrSpaceType "+_[1][0])}o.push((De?x:"")+o.pop()+(De?"":x)),g=-1}}if(o.length>1&&i.WTF)throw new Error("bad formula stack");return o[0]}function Dm(e){if(e==null){var t=re(8);return t.write_shift(1,3),t.write_shift(1,0),t.write_shift(2,0),t.write_shift(2,0),t.write_shift(2,65535),t}else if(typeof e=="number")return wn(e);return wn(0)}function km(e,t,r,n,i){var s=Tn(t,r,i),a=Dm(e.v),o=re(6),f=33;o.write_shift(2,f),o.write_shift(4,0);for(var u=re(e.bf.length),d=0;d<e.bf.length;++d)u[d]=e.bf[d];var h=Jt([s,a,o,u]);return h}function Os(e,t,r){var n=e.read_shift(4),i=bm(e,n,r),s=e.read_shift(4),a=s>0?_m(e,s,i,r):null;return[i,a]}var Im=Os,Ds=Os,Fm=Os,Nm=Os,Rm={0:"BEEP",1:"OPEN",2:"OPEN.LINKS",3:"CLOSE.ALL",4:"SAVE",5:"SAVE.AS",6:"FILE.DELETE",7:"PAGE.SETUP",8:"PRINT",9:"PRINTER.SETUP",10:"QUIT",11:"NEW.WINDOW",12:"ARRANGE.ALL",13:"WINDOW.SIZE",14:"WINDOW.MOVE",15:"FULL",16:"CLOSE",17:"RUN",22:"SET.PRINT.AREA",23:"SET.PRINT.TITLES",24:"SET.PAGE.BREAK",25:"REMOVE.PAGE.BREAK",26:"FONT",27:"DISPLAY",28:"PROTECT.DOCUMENT",29:"PRECISION",30:"A1.R1C1",31:"CALCULATE.NOW",32:"CALCULATION",34:"DATA.FIND",35:"EXTRACT",36:"DATA.DELETE",37:"SET.DATABASE",38:"SET.CRITERIA",39:"SORT",40:"DATA.SERIES",41:"TABLE",42:"FORMAT.NUMBER",43:"ALIGNMENT",44:"STYLE",45:"BORDER",46:"CELL.PROTECTION",47:"COLUMN.WIDTH",48:"UNDO",49:"CUT",50:"COPY",51:"PASTE",52:"CLEAR",53:"PASTE.SPECIAL",54:"EDIT.DELETE",55:"INSERT",56:"FILL.RIGHT",57:"FILL.DOWN",61:"DEFINE.NAME",62:"CREATE.NAMES",63:"FORMULA.GOTO",64:"FORMULA.FIND",65:"SELECT.LAST.CELL",66:"SHOW.ACTIVE.CELL",67:"GALLERY.AREA",68:"GALLERY.BAR",69:"GALLERY.COLUMN",70:"GALLERY.LINE",71:"GALLERY.PIE",72:"GALLERY.SCATTER",73:"COMBINATION",74:"PREFERRED",75:"ADD.OVERLAY",76:"GRIDLINES",77:"SET.PREFERRED",78:"AXES",79:"LEGEND",80:"ATTACH.TEXT",81:"ADD.ARROW",82:"SELECT.CHART",83:"SELECT.PLOT.AREA",84:"PATTERNS",85:"MAIN.CHART",86:"OVERLAY",87:"SCALE",88:"FORMAT.LEGEND",89:"FORMAT.TEXT",90:"EDIT.REPEAT",91:"PARSE",92:"JUSTIFY",93:"HIDE",94:"UNHIDE",95:"WORKSPACE",96:"FORMULA",97:"FORMULA.FILL",98:"FORMULA.ARRAY",99:"DATA.FIND.NEXT",100:"DATA.FIND.PREV",101:"FORMULA.FIND.NEXT",102:"FORMULA.FIND.PREV",103:"ACTIVATE",104:"ACTIVATE.NEXT",105:"ACTIVATE.PREV",106:"UNLOCKED.NEXT",107:"UNLOCKED.PREV",108:"COPY.PICTURE",109:"SELECT",110:"DELETE.NAME",111:"DELETE.FORMAT",112:"VLINE",113:"HLINE",114:"VPAGE",115:"HPAGE",116:"VSCROLL",117:"HSCROLL",118:"ALERT",119:"NEW",120:"CANCEL.COPY",121:"SHOW.CLIPBOARD",122:"MESSAGE",124:"PASTE.LINK",125:"APP.ACTIVATE",126:"DELETE.ARROW",127:"ROW.HEIGHT",128:"FORMAT.MOVE",129:"FORMAT.SIZE",130:"FORMULA.REPLACE",131:"SEND.KEYS",132:"SELECT.SPECIAL",133:"APPLY.NAMES",134:"REPLACE.FONT",135:"FREEZE.PANES",136:"SHOW.INFO",137:"SPLIT",138:"ON.WINDOW",139:"ON.DATA",140:"DISABLE.INPUT",142:"OUTLINE",143:"LIST.NAMES",144:"FILE.CLOSE",145:"SAVE.WORKBOOK",146:"DATA.FORM",147:"COPY.CHART",148:"ON.TIME",149:"WAIT",150:"FORMAT.FONT",151:"FILL.UP",152:"FILL.LEFT",153:"DELETE.OVERLAY",155:"SHORT.MENUS",159:"SET.UPDATE.STATUS",161:"COLOR.PALETTE",162:"DELETE.STYLE",163:"WINDOW.RESTORE",164:"WINDOW.MAXIMIZE",166:"CHANGE.LINK",167:"CALCULATE.DOCUMENT",168:"ON.KEY",169:"APP.RESTORE",170:"APP.MOVE",171:"APP.SIZE",172:"APP.MINIMIZE",173:"APP.MAXIMIZE",174:"BRING.TO.FRONT",175:"SEND.TO.BACK",185:"MAIN.CHART.TYPE",186:"OVERLAY.CHART.TYPE",187:"SELECT.END",188:"OPEN.MAIL",189:"SEND.MAIL",190:"STANDARD.FONT",191:"CONSOLIDATE",192:"SORT.SPECIAL",193:"GALLERY.3D.AREA",194:"GALLERY.3D.COLUMN",195:"GALLERY.3D.LINE",196:"GALLERY.3D.PIE",197:"VIEW.3D",198:"GOAL.SEEK",199:"WORKGROUP",200:"FILL.GROUP",201:"UPDATE.LINK",202:"PROMOTE",203:"DEMOTE",204:"SHOW.DETAIL",206:"UNGROUP",207:"OBJECT.PROPERTIES",208:"SAVE.NEW.OBJECT",209:"SHARE",210:"SHARE.NAME",211:"DUPLICATE",212:"APPLY.STYLE",213:"ASSIGN.TO.OBJECT",214:"OBJECT.PROTECTION",215:"HIDE.OBJECT",216:"SET.EXTRACT",217:"CREATE.PUBLISHER",218:"SUBSCRIBE.TO",219:"ATTRIBUTES",220:"SHOW.TOOLBAR",222:"PRINT.PREVIEW",223:"EDIT.COLOR",224:"SHOW.LEVELS",225:"FORMAT.MAIN",226:"FORMAT.OVERLAY",227:"ON.RECALC",228:"EDIT.SERIES",229:"DEFINE.STYLE",240:"LINE.PRINT",243:"ENTER.DATA",249:"GALLERY.RADAR",250:"MERGE.STYLES",251:"EDITION.OPTIONS",252:"PASTE.PICTURE",253:"PASTE.PICTURE.LINK",254:"SPELLING",256:"ZOOM",259:"INSERT.OBJECT",260:"WINDOW.MINIMIZE",265:"SOUND.NOTE",266:"SOUND.PLAY",267:"FORMAT.SHAPE",268:"EXTEND.POLYGON",269:"FORMAT.AUTO",272:"GALLERY.3D.BAR",273:"GALLERY.3D.SURFACE",274:"FILL.AUTO",276:"CUSTOMIZE.TOOLBAR",277:"ADD.TOOL",278:"EDIT.OBJECT",279:"ON.DOUBLECLICK",280:"ON.ENTRY",281:"WORKBOOK.ADD",282:"WORKBOOK.MOVE",283:"WORKBOOK.COPY",284:"WORKBOOK.OPTIONS",285:"SAVE.WORKSPACE",288:"CHART.WIZARD",289:"DELETE.TOOL",290:"MOVE.TOOL",291:"WORKBOOK.SELECT",292:"WORKBOOK.ACTIVATE",293:"ASSIGN.TO.TOOL",295:"COPY.TOOL",296:"RESET.TOOL",297:"CONSTRAIN.NUMERIC",298:"PASTE.TOOL",302:"WORKBOOK.NEW",305:"SCENARIO.CELLS",306:"SCENARIO.DELETE",307:"SCENARIO.ADD",308:"SCENARIO.EDIT",309:"SCENARIO.SHOW",310:"SCENARIO.SHOW.NEXT",311:"SCENARIO.SUMMARY",312:"PIVOT.TABLE.WIZARD",313:"PIVOT.FIELD.PROPERTIES",314:"PIVOT.FIELD",315:"PIVOT.ITEM",316:"PIVOT.ADD.FIELDS",318:"OPTIONS.CALCULATION",319:"OPTIONS.EDIT",320:"OPTIONS.VIEW",321:"ADDIN.MANAGER",322:"MENU.EDITOR",323:"ATTACH.TOOLBARS",324:"VBAActivate",325:"OPTIONS.CHART",328:"VBA.INSERT.FILE",330:"VBA.PROCEDURE.DEFINITION",336:"ROUTING.SLIP",338:"ROUTE.DOCUMENT",339:"MAIL.LOGON",342:"INSERT.PICTURE",343:"EDIT.TOOL",344:"GALLERY.DOUGHNUT",350:"CHART.TREND",352:"PIVOT.ITEM.PROPERTIES",354:"WORKBOOK.INSERT",355:"OPTIONS.TRANSITION",356:"OPTIONS.GENERAL",370:"FILTER.ADVANCED",373:"MAIL.ADD.MAILER",374:"MAIL.DELETE.MAILER",375:"MAIL.REPLY",376:"MAIL.REPLY.ALL",377:"MAIL.FORWARD",378:"MAIL.NEXT.LETTER",379:"DATA.LABEL",380:"INSERT.TITLE",381:"FONT.PROPERTIES",382:"MACRO.OPTIONS",383:"WORKBOOK.HIDE",384:"WORKBOOK.UNHIDE",385:"WORKBOOK.DELETE",386:"WORKBOOK.NAME",388:"GALLERY.CUSTOM",390:"ADD.CHART.AUTOFORMAT",391:"DELETE.CHART.AUTOFORMAT",392:"CHART.ADD.DATA",393:"AUTO.OUTLINE",394:"TAB.ORDER",395:"SHOW.DIALOG",396:"SELECT.ALL",397:"UNGROUP.SHEETS",398:"SUBTOTAL.CREATE",399:"SUBTOTAL.REMOVE",400:"RENAME.OBJECT",412:"WORKBOOK.SCROLL",413:"WORKBOOK.NEXT",414:"WORKBOOK.PREV",415:"WORKBOOK.TAB.SPLIT",416:"FULL.SCREEN",417:"WORKBOOK.PROTECT",420:"SCROLLBAR.PROPERTIES",421:"PIVOT.SHOW.PAGES",422:"TEXT.TO.COLUMNS",423:"FORMAT.CHARTTYPE",424:"LINK.FORMAT",425:"TRACER.DISPLAY",430:"TRACER.NAVIGATE",431:"TRACER.CLEAR",432:"TRACER.ERROR",433:"PIVOT.FIELD.GROUP",434:"PIVOT.FIELD.UNGROUP",435:"CHECKBOX.PROPERTIES",436:"LABEL.PROPERTIES",437:"LISTBOX.PROPERTIES",438:"EDITBOX.PROPERTIES",439:"PIVOT.REFRESH",440:"LINK.COMBO",441:"OPEN.TEXT",442:"HIDE.DIALOG",443:"SET.DIALOG.FOCUS",444:"ENABLE.OBJECT",445:"PUSHBUTTON.PROPERTIES",446:"SET.DIALOG.DEFAULT",447:"FILTER",448:"FILTER.SHOW.ALL",449:"CLEAR.OUTLINE",450:"FUNCTION.WIZARD",451:"ADD.LIST.ITEM",452:"SET.LIST.ITEM",453:"REMOVE.LIST.ITEM",454:"SELECT.LIST.ITEM",455:"SET.CONTROL.VALUE",456:"SAVE.COPY.AS",458:"OPTIONS.LISTS.ADD",459:"OPTIONS.LISTS.DELETE",460:"SERIES.AXES",461:"SERIES.X",462:"SERIES.Y",463:"ERRORBAR.X",464:"ERRORBAR.Y",465:"FORMAT.CHART",466:"SERIES.ORDER",467:"MAIL.LOGOFF",468:"CLEAR.ROUTING.SLIP",469:"APP.ACTIVATE.MICROSOFT",470:"MAIL.EDIT.MAILER",471:"ON.SHEET",472:"STANDARD.WIDTH",473:"SCENARIO.MERGE",474:"SUMMARY.INFO",475:"FIND.FILE",476:"ACTIVE.CELL.FONT",477:"ENABLE.TIPWIZARD",478:"VBA.MAKE.ADDIN",480:"INSERTDATATABLE",481:"WORKGROUP.OPTIONS",482:"MAIL.SEND.MAILER",485:"AUTOCORRECT",489:"POST.DOCUMENT",491:"PICKLIST",493:"VIEW.SHOW",494:"VIEW.DEFINE",495:"VIEW.DELETE",509:"SHEET.BACKGROUND",510:"INSERT.MAP.OBJECT",511:"OPTIONS.MENONO",517:"MSOCHECKS",518:"NORMAL",519:"LAYOUT",520:"RM.PRINT.AREA",521:"CLEAR.PRINT.AREA",522:"ADD.PRINT.AREA",523:"MOVE.BRK",545:"HIDECURR.NOTE",546:"HIDEALL.NOTES",547:"DELETE.NOTE",548:"TRAVERSE.NOTES",549:"ACTIVATE.NOTES",620:"PROTECT.REVISIONS",621:"UNPROTECT.REVISIONS",647:"OPTIONS.ME",653:"WEB.PUBLISH",667:"NEWWEBQUERY",673:"PIVOT.TABLE.CHART",753:"OPTIONS.SAVE",755:"OPTIONS.SPELL",808:"HIDEALL.INKANNOTS"},wu={0:"COUNT",1:"IF",2:"ISNA",3:"ISERROR",4:"SUM",5:"AVERAGE",6:"MIN",7:"MAX",8:"ROW",9:"COLUMN",10:"NA",11:"NPV",12:"STDEV",13:"DOLLAR",14:"FIXED",15:"SIN",16:"COS",17:"TAN",18:"ATAN",19:"PI",20:"SQRT",21:"EXP",22:"LN",23:"LOG10",24:"ABS",25:"INT",26:"SIGN",27:"ROUND",28:"LOOKUP",29:"INDEX",30:"REPT",31:"MID",32:"LEN",33:"VALUE",34:"TRUE",35:"FALSE",36:"AND",37:"OR",38:"NOT",39:"MOD",40:"DCOUNT",41:"DSUM",42:"DAVERAGE",43:"DMIN",44:"DMAX",45:"DSTDEV",46:"VAR",47:"DVAR",48:"TEXT",49:"LINEST",50:"TREND",51:"LOGEST",52:"GROWTH",53:"GOTO",54:"HALT",55:"RETURN",56:"PV",57:"FV",58:"NPER",59:"PMT",60:"RATE",61:"MIRR",62:"IRR",63:"RAND",64:"MATCH",65:"DATE",66:"TIME",67:"DAY",68:"MONTH",69:"YEAR",70:"WEEKDAY",71:"HOUR",72:"MINUTE",73:"SECOND",74:"NOW",75:"AREAS",76:"ROWS",77:"COLUMNS",78:"OFFSET",79:"ABSREF",80:"RELREF",81:"ARGUMENT",82:"SEARCH",83:"TRANSPOSE",84:"ERROR",85:"STEP",86:"TYPE",87:"ECHO",88:"SET.NAME",89:"CALLER",90:"DEREF",91:"WINDOWS",92:"SERIES",93:"DOCUMENTS",94:"ACTIVE.CELL",95:"SELECTION",96:"RESULT",97:"ATAN2",98:"ASIN",99:"ACOS",100:"CHOOSE",101:"HLOOKUP",102:"VLOOKUP",103:"LINKS",104:"INPUT",105:"ISREF",106:"GET.FORMULA",107:"GET.NAME",108:"SET.VALUE",109:"LOG",110:"EXEC",111:"CHAR",112:"LOWER",113:"UPPER",114:"PROPER",115:"LEFT",116:"RIGHT",117:"EXACT",118:"TRIM",119:"REPLACE",120:"SUBSTITUTE",121:"CODE",122:"NAMES",123:"DIRECTORY",124:"FIND",125:"CELL",126:"ISERR",127:"ISTEXT",128:"ISNUMBER",129:"ISBLANK",130:"T",131:"N",132:"FOPEN",133:"FCLOSE",134:"FSIZE",135:"FREADLN",136:"FREAD",137:"FWRITELN",138:"FWRITE",139:"FPOS",140:"DATEVALUE",141:"TIMEVALUE",142:"SLN",143:"SYD",144:"DDB",145:"GET.DEF",146:"REFTEXT",147:"TEXTREF",148:"INDIRECT",149:"REGISTER",150:"CALL",151:"ADD.BAR",152:"ADD.MENU",153:"ADD.COMMAND",154:"ENABLE.COMMAND",155:"CHECK.COMMAND",156:"RENAME.COMMAND",157:"SHOW.BAR",158:"DELETE.MENU",159:"DELETE.COMMAND",160:"GET.CHART.ITEM",161:"DIALOG.BOX",162:"CLEAN",163:"MDETERM",164:"MINVERSE",165:"MMULT",166:"FILES",167:"IPMT",168:"PPMT",169:"COUNTA",170:"CANCEL.KEY",171:"FOR",172:"WHILE",173:"BREAK",174:"NEXT",175:"INITIATE",176:"REQUEST",177:"POKE",178:"EXECUTE",179:"TERMINATE",180:"RESTART",181:"HELP",182:"GET.BAR",183:"PRODUCT",184:"FACT",185:"GET.CELL",186:"GET.WORKSPACE",187:"GET.WINDOW",188:"GET.DOCUMENT",189:"DPRODUCT",190:"ISNONTEXT",191:"GET.NOTE",192:"NOTE",193:"STDEVP",194:"VARP",195:"DSTDEVP",196:"DVARP",197:"TRUNC",198:"ISLOGICAL",199:"DCOUNTA",200:"DELETE.BAR",201:"UNREGISTER",204:"USDOLLAR",205:"FINDB",206:"SEARCHB",207:"REPLACEB",208:"LEFTB",209:"RIGHTB",210:"MIDB",211:"LENB",212:"ROUNDUP",213:"ROUNDDOWN",214:"ASC",215:"DBCS",216:"RANK",219:"ADDRESS",220:"DAYS360",221:"TODAY",222:"VDB",223:"ELSE",224:"ELSE.IF",225:"END.IF",226:"FOR.CELL",227:"MEDIAN",228:"SUMPRODUCT",229:"SINH",230:"COSH",231:"TANH",232:"ASINH",233:"ACOSH",234:"ATANH",235:"DGET",236:"CREATE.OBJECT",237:"VOLATILE",238:"LAST.ERROR",239:"CUSTOM.UNDO",240:"CUSTOM.REPEAT",241:"FORMULA.CONVERT",242:"GET.LINK.INFO",243:"TEXT.BOX",244:"INFO",245:"GROUP",246:"GET.OBJECT",247:"DB",248:"PAUSE",251:"RESUME",252:"FREQUENCY",253:"ADD.TOOLBAR",254:"DELETE.TOOLBAR",255:"User",256:"RESET.TOOLBAR",257:"EVALUATE",258:"GET.TOOLBAR",259:"GET.TOOL",260:"SPELLING.CHECK",261:"ERROR.TYPE",262:"APP.TITLE",263:"WINDOW.TITLE",264:"SAVE.TOOLBAR",265:"ENABLE.TOOL",266:"PRESS.TOOL",267:"REGISTER.ID",268:"GET.WORKBOOK",269:"AVEDEV",270:"BETADIST",271:"GAMMALN",272:"BETAINV",273:"BINOMDIST",274:"CHIDIST",275:"CHIINV",276:"COMBIN",277:"CONFIDENCE",278:"CRITBINOM",279:"EVEN",280:"EXPONDIST",281:"FDIST",282:"FINV",283:"FISHER",284:"FISHERINV",285:"FLOOR",286:"GAMMADIST",287:"GAMMAINV",288:"CEILING",289:"HYPGEOMDIST",290:"LOGNORMDIST",291:"LOGINV",292:"NEGBINOMDIST",293:"NORMDIST",294:"NORMSDIST",295:"NORMINV",296:"NORMSINV",297:"STANDARDIZE",298:"ODD",299:"PERMUT",300:"POISSON",301:"TDIST",302:"WEIBULL",303:"SUMXMY2",304:"SUMX2MY2",305:"SUMX2PY2",306:"CHITEST",307:"CORREL",308:"COVAR",309:"FORECAST",310:"FTEST",311:"INTERCEPT",312:"PEARSON",313:"RSQ",314:"STEYX",315:"SLOPE",316:"TTEST",317:"PROB",318:"DEVSQ",319:"GEOMEAN",320:"HARMEAN",321:"SUMSQ",322:"KURT",323:"SKEW",324:"ZTEST",325:"LARGE",326:"SMALL",327:"QUARTILE",328:"PERCENTILE",329:"PERCENTRANK",330:"MODE",331:"TRIMMEAN",332:"TINV",334:"MOVIE.COMMAND",335:"GET.MOVIE",336:"CONCATENATE",337:"POWER",338:"PIVOT.ADD.DATA",339:"GET.PIVOT.TABLE",340:"GET.PIVOT.FIELD",341:"GET.PIVOT.ITEM",342:"RADIANS",343:"DEGREES",344:"SUBTOTAL",345:"SUMIF",346:"COUNTIF",347:"COUNTBLANK",348:"SCENARIO.GET",349:"OPTIONS.LISTS.GET",350:"ISPMT",351:"DATEDIF",352:"DATESTRING",353:"NUMBERSTRING",354:"ROMAN",355:"OPEN.DIALOG",356:"SAVE.DIALOG",357:"VIEW.GET",358:"GETPIVOTDATA",359:"HYPERLINK",360:"PHONETIC",361:"AVERAGEA",362:"MAXA",363:"MINA",364:"STDEVPA",365:"VARPA",366:"STDEVA",367:"VARA",368:"BAHTTEXT",369:"THAIDAYOFWEEK",370:"THAIDIGIT",371:"THAIMONTHOFYEAR",372:"THAINUMSOUND",373:"THAINUMSTRING",374:"THAISTRINGLENGTH",375:"ISTHAIDIGIT",376:"ROUNDBAHTDOWN",377:"ROUNDBAHTUP",378:"THAIYEAR",379:"RTD",380:"CUBEVALUE",381:"CUBEMEMBER",382:"CUBEMEMBERPROPERTY",383:"CUBERANKEDMEMBER",384:"HEX2BIN",385:"HEX2DEC",386:"HEX2OCT",387:"DEC2BIN",388:"DEC2HEX",389:"DEC2OCT",390:"OCT2BIN",391:"OCT2HEX",392:"OCT2DEC",393:"BIN2DEC",394:"BIN2OCT",395:"BIN2HEX",396:"IMSUB",397:"IMDIV",398:"IMPOWER",399:"IMABS",400:"IMSQRT",401:"IMLN",402:"IMLOG2",403:"IMLOG10",404:"IMSIN",405:"IMCOS",406:"IMEXP",407:"IMARGUMENT",408:"IMCONJUGATE",409:"IMAGINARY",410:"IMREAL",411:"COMPLEX",412:"IMSUM",413:"IMPRODUCT",414:"SERIESSUM",415:"FACTDOUBLE",416:"SQRTPI",417:"QUOTIENT",418:"DELTA",419:"GESTEP",420:"ISEVEN",421:"ISODD",422:"MROUND",423:"ERF",424:"ERFC",425:"BESSELJ",426:"BESSELK",427:"BESSELY",428:"BESSELI",429:"XIRR",430:"XNPV",431:"PRICEMAT",432:"YIELDMAT",433:"INTRATE",434:"RECEIVED",435:"DISC",436:"PRICEDISC",437:"YIELDDISC",438:"TBILLEQ",439:"TBILLPRICE",440:"TBILLYIELD",441:"PRICE",442:"YIELD",443:"DOLLARDE",444:"DOLLARFR",445:"NOMINAL",446:"EFFECT",447:"CUMPRINC",448:"CUMIPMT",449:"EDATE",450:"EOMONTH",451:"YEARFRAC",452:"COUPDAYBS",453:"COUPDAYS",454:"COUPDAYSNC",455:"COUPNCD",456:"COUPNUM",457:"COUPPCD",458:"DURATION",459:"MDURATION",460:"ODDLPRICE",461:"ODDLYIELD",462:"ODDFPRICE",463:"ODDFYIELD",464:"RANDBETWEEN",465:"WEEKNUM",466:"AMORDEGRC",467:"AMORLINC",468:"CONVERT",724:"SHEETJS",469:"ACCRINT",470:"ACCRINTM",471:"WORKDAY",472:"NETWORKDAYS",473:"GCD",474:"MULTINOMIAL",475:"LCM",476:"FVSCHEDULE",477:"CUBEKPIMEMBER",478:"CUBESET",479:"CUBESETCOUNT",480:"IFERROR",481:"COUNTIFS",482:"SUMIFS",483:"AVERAGEIF",484:"AVERAGEIFS"},Pm={2:1,3:1,10:0,15:1,16:1,17:1,18:1,19:0,20:1,21:1,22:1,23:1,24:1,25:1,26:1,27:2,30:2,31:3,32:1,33:1,34:0,35:0,38:1,39:2,40:3,41:3,42:3,43:3,44:3,45:3,47:3,48:2,53:1,61:3,63:0,65:3,66:3,67:1,68:1,69:1,70:1,71:1,72:1,73:1,74:0,75:1,76:1,77:1,79:2,80:2,83:1,85:0,86:1,89:0,90:1,94:0,95:0,97:2,98:1,99:1,101:3,102:3,105:1,106:1,108:2,111:1,112:1,113:1,114:1,117:2,118:1,119:4,121:1,126:1,127:1,128:1,129:1,130:1,131:1,133:1,134:1,135:1,136:2,137:2,138:2,140:1,141:1,142:3,143:4,144:4,161:1,162:1,163:1,164:1,165:2,172:1,175:2,176:2,177:3,178:2,179:1,184:1,186:1,189:3,190:1,195:3,196:3,197:1,198:1,199:3,201:1,207:4,210:3,211:1,212:2,213:2,214:1,215:1,225:0,229:1,230:1,231:1,232:1,233:1,234:1,235:3,244:1,247:4,252:2,257:1,261:1,271:1,273:4,274:2,275:2,276:2,277:3,278:3,279:1,280:3,281:3,282:3,283:1,284:1,285:2,286:4,287:3,288:2,289:4,290:3,291:3,292:3,293:4,294:1,295:3,296:1,297:3,298:1,299:2,300:3,301:3,302:4,303:2,304:2,305:2,306:2,307:2,308:2,309:3,310:2,311:2,312:2,313:2,314:2,315:2,316:4,325:2,326:2,327:2,328:2,331:2,332:2,337:2,342:1,343:1,346:2,347:1,350:4,351:3,352:1,353:2,360:1,368:1,369:1,370:1,371:1,372:1,373:1,374:1,375:1,376:1,377:1,378:1,382:3,385:1,392:1,393:1,396:2,397:2,398:2,399:1,400:1,401:1,402:1,403:1,404:1,405:1,406:1,407:1,408:1,409:1,410:1,414:4,415:1,416:1,417:2,420:1,421:1,422:2,424:1,425:2,426:2,427:2,428:2,430:3,438:3,439:3,440:3,443:2,444:2,445:2,446:2,447:6,448:6,449:2,450:2,464:2,468:3,476:2,479:1,480:2,65535:0};function jm(e){var t="of:="+e.replace(oo,"$1[.$2$3$4$5]").replace(/\]:\[/g,":");return t.replace(/;/g,"|").replace(/,/g,";")}function Mm(e){return e.replace(/\./,"!")}var gi=typeof Map<"u";function uo(e,t,r){var n=0,i=e.length;if(r){if(gi?r.has(t):Object.prototype.hasOwnProperty.call(r,t)){for(var s=gi?r.get(t):r[t];n<s.length;++n)if(e[s[n]].t===t)return e.Count++,s[n]}}else for(;n<i;++n)if(e[n].t===t)return e.Count++,n;return e[i]={t},e.Count++,e.Unique++,r&&(gi?(r.has(t)||r.set(t,[]),r.get(t).push(i)):(Object.prototype.hasOwnProperty.call(r,t)||(r[t]=[]),r[t].push(i))),i}function ks(e,t){var r={min:e+1,max:e+1},n=-1;return t.MDW&&(Xr=t.MDW),t.width!=null?r.customWidth=1:t.wpx!=null?n=gs(t.wpx):t.wch!=null&&(n=t.wch),n>-1?(r.width=Da(n),r.customWidth=1):t.width!=null&&(r.width=t.width),t.hidden&&(r.hidden=!0),t.level!=null&&(r.outlineLevel=r.level=t.level),r}function Tu(e,t){if(e){var r=[.7,.7,.75,.75,.3,.3];e.left==null&&(e.left=r[0]),e.right==null&&(e.right=r[1]),e.top==null&&(e.top=r[2]),e.bottom==null&&(e.bottom=r[3]),e.header==null&&(e.header=r[4]),e.footer==null&&(e.footer=r[5])}}function un(e,t,r){var n=r.revssf[t.z!=null?t.z:"General"],i=60,s=e.length;if(n==null&&r.ssf){for(;i<392;++i)if(r.ssf[i]==null){m0(t.z,i),r.ssf[i]=t.z,r.revssf[t.z]=n=i;break}}for(i=0;i!=s;++i)if(e[i].numFmtId===n)return i;return e[s]={numFmtId:n,fontId:0,fillId:0,borderId:0,xfId:0,applyNumberFormat:1},s}function Lm(e,t,r){if(e&&e["!ref"]){var n=wt(e["!ref"]);if(n.e.c<n.s.c||n.e.r<n.s.r)throw new Error("Bad range ("+r+"): "+e["!ref"])}}function Bm(e){if(e.length===0)return"";for(var t='<mergeCells count="'+e.length+'">',r=0;r!=e.length;++r)t+='<mergeCell ref="'+jt(e[r])+'"/>';return t+"</mergeCells>"}function $m(e,t,r,n,i){var s=!1,a={},o=null;if(n.bookType!=="xlsx"&&t.vbaraw){var f=t.SheetNames[r];try{t.Workbook&&(f=t.Workbook.Sheets[r].CodeName||f)}catch{}s=!0,a.codeName=Ti(lt(f))}if(e&&e["!outline"]){var u={summaryBelow:1,summaryRight:1};e["!outline"].above&&(u.summaryBelow=0),e["!outline"].left&&(u.summaryRight=0),o=(o||"")+xe("outlinePr",null,u)}!s&&!o||(i[i.length]=xe("sheetPr",o,a))}var Um=["objects","scenarios","selectLockedCells","selectUnlockedCells"],Wm=["formatColumns","formatRows","formatCells","insertColumns","insertRows","insertHyperlinks","deleteColumns","deleteRows","sort","autoFilter","pivotTables"];function Vm(e){var t={sheet:1};return Um.forEach(function(r){e[r]!=null&&e[r]&&(t[r]="1")}),Wm.forEach(function(r){e[r]!=null&&!e[r]&&(t[r]="0")}),e.password&&(t.password=iu(e.password).toString(16).toUpperCase()),xe("sheetProtection",null,t)}function zm(e){return Tu(e),xe("pageMargins",null,e)}function Hm(e,t){for(var r=["<cols>"],n,i=0;i!=t.length;++i)(n=t[i])&&(r[r.length]=xe("col",null,ks(i,n)));return r[r.length]="</cols>",r.join("")}function Gm(e,t,r,n){var i=typeof e.ref=="string"?e.ref:jt(e.ref);r.Workbook||(r.Workbook={Sheets:[]}),r.Workbook.Names||(r.Workbook.Names=[]);var s=r.Workbook.Names,a=Sr(i);a.s.r==a.e.r&&(a.e.r=Sr(t["!ref"]).e.r,i=jt(a));for(var o=0;o<s.length;++o){var f=s[o];if(f.Name=="_xlnm._FilterDatabase"&&f.Sheet==n){f.Ref="'"+r.SheetNames[n]+"'!"+i;break}}return o==s.length&&s.push({Name:"_xlnm._FilterDatabase",Sheet:n,Ref:"'"+r.SheetNames[n]+"'!"+i}),xe("autoFilter",null,{ref:i})}function Ym(e,t,r,n){var i={workbookViewId:"0"};return(((n||{}).Workbook||{}).Views||[])[0]&&(i.rightToLeft=n.Workbook.Views[0].RTL?"1":"0"),xe("sheetViews",xe("sheetView",null,i),{})}function Xm(e,t,r,n){if(e.c&&r["!comments"].push([t,e.c]),e.v===void 0&&typeof e.f!="string"||e.t==="z"&&!e.f)return"";var i="",s=e.t,a=e.v;if(e.t!=="z")switch(e.t){case"b":i=e.v?"1":"0";break;case"n":i=""+e.v;break;case"e":i=Ii[e.v];break;case"d":n&&n.cellDates?i=lr(e.v,-1).toISOString():(e=hr(e),e.t="n",i=""+(e.v=dr(lr(e.v)))),typeof e.z>"u"&&(e.z=Dt[14]);break;default:i=e.v;break}var o=Zt("v",lt(i)),f={r:t},u=un(n.cellXfs,e,n);switch(u!==0&&(f.s=u),e.t){case"n":break;case"d":f.t="d";break;case"b":f.t="b";break;case"e":f.t="e";break;case"z":break;default:if(e.v==null){delete e.t;break}if(e.v.length>32767)throw new Error("Text length must not exceed 32767 characters");if(n&&n.bookSST){o=Zt("v",""+uo(n.Strings,e.v,n.revStrings)),f.t="s";break}f.t="str";break}if(e.t!=s&&(e.t=s,e.v=a),typeof e.f=="string"&&e.f){var d=e.F&&e.F.slice(0,t.length)==t?{t:"array",ref:e.F}:null;o=xe("f",lt(e.f),d)+(e.v!=null?o:"")}return e.l&&r["!links"].push([t,e.l]),e.D&&(f.cm=1),xe("c",o,f)}function Km(e,t,r,n){var i=[],s=[],a=wt(e["!ref"]),o="",f,u="",d=[],h=0,m=0,l=e["!rows"],v=Array.isArray(e),g={r:u},x,T=-1;for(m=a.s.c;m<=a.e.c;++m)d[m]=rr(m);for(h=a.s.r;h<=a.e.r;++h){for(s=[],u=Qt(h),m=a.s.c;m<=a.e.c;++m){f=d[m]+u;var b=v?(e[h]||[])[m]:e[f];b!==void 0&&(o=Xm(b,f,e,t))!=null&&s.push(o)}(s.length>0||l&&l[h])&&(g={r:u},l&&l[h]&&(x=l[h],x.hidden&&(g.hidden=1),T=-1,x.hpx?T=ms(x.hpx):x.hpt&&(T=x.hpt),T>-1&&(g.ht=T,g.customHeight=1),x.level&&(g.outlineLevel=x.level)),i[i.length]=xe("row",s.join(""),g))}if(l)for(;h<l.length;++h)l&&l[h]&&(g={r:h+1},x=l[h],x.hidden&&(g.hidden=1),T=-1,x.hpx?T=ms(x.hpx):x.hpt&&(T=x.hpt),T>-1&&(g.ht=T,g.customHeight=1),x.level&&(g.outlineLevel=x.level),i[i.length]=xe("row","",g));return i.join("")}function Su(e,t,r,n){var i=[Mt,xe("worksheet",null,{xmlns:Jn[0],"xmlns:r":Wt.r})],s=r.SheetNames[e],a=0,o="",f=r.Sheets[s];f==null&&(f={});var u=f["!ref"]||"A1",d=wt(u);if(d.e.c>16383||d.e.r>1048575){if(t.WTF)throw new Error("Range "+u+" exceeds format limit A1:XFD1048576");d.e.c=Math.min(d.e.c,16383),d.e.r=Math.min(d.e.c,1048575),u=jt(d)}n||(n={}),f["!comments"]=[];var h=[];$m(f,r,e,t,i),i[i.length]=xe("dimension",null,{ref:u}),i[i.length]=Ym(f,t,e,r),t.sheetFormat&&(i[i.length]=xe("sheetFormatPr",null,{defaultRowHeight:t.sheetFormat.defaultRowHeight||"16",baseColWidth:t.sheetFormat.baseColWidth||"10",outlineLevelRow:t.sheetFormat.outlineLevelRow||"7"})),f["!cols"]!=null&&f["!cols"].length>0&&(i[i.length]=Hm(f,f["!cols"])),i[a=i.length]="<sheetData/>",f["!links"]=[],f["!ref"]!=null&&(o=Km(f,t),o.length>0&&(i[i.length]=o)),i.length>a+1&&(i[i.length]="</sheetData>",i[a]=i[a].replace("/>",">")),f["!protect"]&&(i[i.length]=Vm(f["!protect"])),f["!autofilter"]!=null&&(i[i.length]=Gm(f["!autofilter"],f,r,e)),f["!merges"]!=null&&f["!merges"].length>0&&(i[i.length]=Bm(f["!merges"]));var m=-1,l,v=-1;return f["!links"].length>0&&(i[i.length]="<hyperlinks>",f["!links"].forEach(function(g){g[1].Target&&(l={ref:g[0]},g[1].Target.charAt(0)!="#"&&(v=ot(n,-1,lt(g[1].Target).replace(/#.*$/,""),Ke.HLINK),l["r:id"]="rId"+v),(m=g[1].Target.indexOf("#"))>-1&&(l.location=lt(g[1].Target.slice(m+1))),g[1].Tooltip&&(l.tooltip=lt(g[1].Tooltip)),i[i.length]=xe("hyperlink",null,l))}),i[i.length]="</hyperlinks>"),delete f["!links"],f["!margins"]!=null&&(i[i.length]=zm(f["!margins"])),(!t||t.ignoreEC||t.ignoreEC==null)&&(i[i.length]=Zt("ignoredErrors",xe("ignoredError",null,{numberStoredAsText:1,sqref:u}))),h.length>0&&(v=ot(n,-1,"../drawings/drawing"+(e+1)+".xml",Ke.DRAW),i[i.length]=xe("drawing",null,{"r:id":"rId"+v}),f["!drawing"]=h),f["!comments"].length>0&&(v=ot(n,-1,"../drawings/vmlDrawing"+(e+1)+".vml",Ke.VML),i[i.length]=xe("legacyDrawing",null,{"r:id":"rId"+v}),f["!legacy"]=v),i.length>1&&(i[i.length]="</worksheet>",i[1]=i[1].replace("/>",">")),i.join("")}function qm(e,t){var r={},n=e.l+t;r.r=e.read_shift(4),e.l+=4;var i=e.read_shift(2);e.l+=1;var s=e.read_shift(1);return e.l=n,s&7&&(r.level=s&7),s&16&&(r.hidden=!0),s&32&&(r.hpt=i/20),r}function Jm(e,t,r){var n=re(145),i=(r["!rows"]||[])[e]||{};n.write_shift(4,e),n.write_shift(4,0);var s=320;i.hpx?s=ms(i.hpx)*20:i.hpt&&(s=i.hpt*20),n.write_shift(2,s),n.write_shift(1,0);var a=0;i.level&&(a|=i.level),i.hidden&&(a|=16),(i.hpx||i.hpt)&&(a|=32),n.write_shift(1,a),n.write_shift(1,0);var o=0,f=n.l;n.l+=4;for(var u={r:e,c:0},d=0;d<16;++d)if(!(t.s.c>d+1<<10||t.e.c<d<<10)){for(var h=-1,m=-1,l=d<<10;l<d+1<<10;++l){u.c=l;var v=Array.isArray(r)?(r[u.r]||[])[u.c]:r[ct(u)];v&&(h<0&&(h=l),m=l)}h<0||(++o,n.write_shift(4,h),n.write_shift(4,m))}var g=n.l;return n.l=f,n.write_shift(4,o),n.l=g,n.length>n.l?n.slice(0,n.l):n}function Zm(e,t,r,n){var i=Jm(n,r,t);(i.length>17||(t["!rows"]||[])[n])&&de(e,0,i)}var Qm=Dn,ex=Qn;function tx(){}function rx(e,t){var r={},n=e[e.l];return++e.l,r.above=!(n&64),r.left=!(n&128),e.l+=18,r.name=dp(e),r}function nx(e,t,r){r==null&&(r=re(84+4*e.length));var n=192;t&&(t.above&&(n&=-65),t.left&&(n&=-129)),r.write_shift(1,n);for(var i=1;i<3;++i)r.write_shift(1,0);return ds({auto:1},r),r.write_shift(-4,-1),r.write_shift(-4,-1),M0(e,r),r.slice(0,r.l)}function ix(e){var t=Or(e);return[t]}function sx(e,t,r){return r==null&&(r=re(8)),Cn(t,r)}function ax(e){var t=An(e);return[t]}function ox(e,t,r){return r==null&&(r=re(4)),On(t,r)}function lx(e){var t=Or(e),r=e.read_shift(1);return[t,r,"b"]}function cx(e,t,r){return r==null&&(r=re(9)),Cn(t,r),r.write_shift(1,e.v?1:0),r}function ux(e){var t=An(e),r=e.read_shift(1);return[t,r,"b"]}function fx(e,t,r){return r==null&&(r=re(5)),On(t,r),r.write_shift(1,e.v?1:0),r}function dx(e){var t=Or(e),r=e.read_shift(1);return[t,r,"e"]}function hx(e,t,r){return r==null&&(r=re(9)),Cn(t,r),r.write_shift(1,e.v),r}function px(e){var t=An(e),r=e.read_shift(1);return[t,r,"e"]}function gx(e,t,r){return r==null&&(r=re(8)),On(t,r),r.write_shift(1,e.v),r.write_shift(2,0),r.write_shift(1,0),r}function mx(e){var t=Or(e),r=e.read_shift(4);return[t,r,"s"]}function xx(e,t,r){return r==null&&(r=re(12)),Cn(t,r),r.write_shift(4,t.v),r}function vx(e){var t=An(e),r=e.read_shift(4);return[t,r,"s"]}function yx(e,t,r){return r==null&&(r=re(8)),On(t,r),r.write_shift(4,t.v),r}function wx(e){var t=Or(e),r=ei(e);return[t,r,"n"]}function Tx(e,t,r){return r==null&&(r=re(16)),Cn(t,r),wn(e.v,r),r}function Sx(e){var t=An(e),r=ei(e);return[t,r,"n"]}function Ex(e,t,r){return r==null&&(r=re(12)),On(t,r),wn(e.v,r),r}function _x(e){var t=Or(e),r=L0(e);return[t,r,"n"]}function bx(e,t,r){return r==null&&(r=re(12)),Cn(t,r),B0(e.v,r),r}function Cx(e){var t=An(e),r=L0(e);return[t,r,"n"]}function Ax(e,t,r){return r==null&&(r=re(8)),On(t,r),B0(e.v,r),r}function Ox(e){var t=Or(e),r=ro(e);return[t,r,"is"]}function Dx(e){var t=Or(e),r=nr(e);return[t,r,"str"]}function kx(e,t,r){return r==null&&(r=re(12+4*e.v.length)),Cn(t,r),zt(e.v,r),r.length>r.l?r.slice(0,r.l):r}function Ix(e){var t=An(e),r=nr(e);return[t,r,"str"]}function Fx(e,t,r){return r==null&&(r=re(8+4*e.v.length)),On(t,r),zt(e.v,r),r.length>r.l?r.slice(0,r.l):r}function Nx(e,t,r){var n=e.l+t,i=Or(e);i.r=r["!row"];var s=e.read_shift(1),a=[i,s,"b"];if(r.cellFormula){e.l+=2;var o=Ds(e,n-e.l,r);a[3]=qn(o,null,i,r.supbooks,r)}else e.l=n;return a}function Rx(e,t,r){var n=e.l+t,i=Or(e);i.r=r["!row"];var s=e.read_shift(1),a=[i,s,"e"];if(r.cellFormula){e.l+=2;var o=Ds(e,n-e.l,r);a[3]=qn(o,null,i,r.supbooks,r)}else e.l=n;return a}function Px(e,t,r){var n=e.l+t,i=Or(e);i.r=r["!row"];var s=ei(e),a=[i,s,"n"];if(r.cellFormula){e.l+=2;var o=Ds(e,n-e.l,r);a[3]=qn(o,null,i,r.supbooks,r)}else e.l=n;return a}function jx(e,t,r){var n=e.l+t,i=Or(e);i.r=r["!row"];var s=nr(e),a=[i,s,"str"];if(r.cellFormula){e.l+=2;var o=Ds(e,n-e.l,r);a[3]=qn(o,null,i,r.supbooks,r)}else e.l=n;return a}var Mx=Dn,Lx=Qn;function Bx(e,t){return t==null&&(t=re(4)),t.write_shift(4,e),t}function $x(e,t){var r=e.l+t,n=Dn(e),i=no(e),s=nr(e),a=nr(e),o=nr(e);e.l=r;var f={rfx:n,relId:i,loc:s,display:o};return a&&(f.Tooltip=a),f}function Ux(e,t){var r=re(50+4*(e[1].Target.length+(e[1].Tooltip||"").length));Qn({s:Vt(e[0]),e:Vt(e[0])},r),io("rId"+t,r);var n=e[1].Target.indexOf("#"),i=n==-1?"":e[1].Target.slice(n+1);return zt(i||"",r),zt(e[1].Tooltip||"",r),zt("",r),r.slice(0,r.l)}function Wx(){}function Vx(e,t,r){var n=e.l+t,i=$0(e),s=e.read_shift(1),a=[i];if(a[2]=s,r.cellFormula){var o=Im(e,n-e.l,r);a[1]=o}else e.l=n;return a}function zx(e,t,r){var n=e.l+t,i=Dn(e),s=[i];if(r.cellFormula){var a=Nm(e,n-e.l,r);s[1]=a,e.l=n}else e.l=n;return s}function Hx(e,t,r){r==null&&(r=re(18));var n=ks(e,t);r.write_shift(-4,e),r.write_shift(-4,e),r.write_shift(4,(n.width||10)*256),r.write_shift(4,0);var i=0;return t.hidden&&(i|=1),typeof n.width=="number"&&(i|=2),t.level&&(i|=t.level<<8),r.write_shift(2,i),r}var Eu=["left","right","top","bottom","header","footer"];function Gx(e){var t={};return Eu.forEach(function(r){t[r]=ei(e)}),t}function Yx(e,t){return t==null&&(t=re(48)),Tu(e),Eu.forEach(function(r){wn(e[r],t)}),t}function Xx(e){var t=e.read_shift(2);return e.l+=28,{RTL:t&32}}function Kx(e,t,r){r==null&&(r=re(30));var n=924;return(((t||{}).Views||[])[0]||{}).RTL&&(n|=32),r.write_shift(2,n),r.write_shift(4,0),r.write_shift(4,0),r.write_shift(4,0),r.write_shift(1,0),r.write_shift(1,0),r.write_shift(2,0),r.write_shift(2,100),r.write_shift(2,0),r.write_shift(2,0),r.write_shift(2,0),r.write_shift(4,0),r}function qx(e){var t=re(24);return t.write_shift(4,4),t.write_shift(4,1),Qn(e,t),t}function Jx(e,t){return t==null&&(t=re(66)),t.write_shift(2,e.password?iu(e.password):0),t.write_shift(4,1),[["objects",!1],["scenarios",!1],["formatCells",!0],["formatColumns",!0],["formatRows",!0],["insertColumns",!0],["insertRows",!0],["insertHyperlinks",!0],["deleteColumns",!0],["deleteRows",!0],["selectLockedCells",!1],["sort",!0],["autoFilter",!0],["pivotTables",!0],["selectUnlockedCells",!1]].forEach(function(r){r[1]?t.write_shift(4,e[r[0]]!=null&&!e[r[0]]?1:0):t.write_shift(4,e[r[0]]!=null&&e[r[0]]?0:1)}),t}function Zx(){}function Qx(){}function ev(e,t,r,n,i,s,a){if(t.v===void 0)return!1;var o="";switch(t.t){case"b":o=t.v?"1":"0";break;case"d":t=hr(t),t.z=t.z||Dt[14],t.v=dr(lr(t.v)),t.t="n";break;case"n":case"e":o=""+t.v;break;default:o=t.v;break}var f={r,c:n};switch(f.s=un(i.cellXfs,t,i),t.l&&s["!links"].push([ct(f),t.l]),t.c&&s["!comments"].push([ct(f),t.c]),t.t){case"s":case"str":return i.bookSST?(o=uo(i.Strings,t.v,i.revStrings),f.t="s",f.v=o,a?de(e,18,yx(t,f)):de(e,7,xx(t,f))):(f.t="str",a?de(e,17,Fx(t,f)):de(e,6,kx(t,f))),!0;case"n":return t.v==(t.v|0)&&t.v>-1e3&&t.v<1e3?a?de(e,13,Ax(t,f)):de(e,2,bx(t,f)):a?de(e,16,Ex(t,f)):de(e,5,Tx(t,f)),!0;case"b":return f.t="b",a?de(e,15,fx(t,f)):de(e,4,cx(t,f)),!0;case"e":return f.t="e",a?de(e,14,gx(t,f)):de(e,3,hx(t,f)),!0}return a?de(e,12,ox(t,f)):de(e,1,sx(t,f)),!0}function tv(e,t,r,n){var i=wt(t["!ref"]||"A1"),s,a="",o=[];de(e,145);var f=Array.isArray(t),u=i.e.r;t["!rows"]&&(u=Math.max(i.e.r,t["!rows"].length-1));for(var d=i.s.r;d<=u;++d){a=Qt(d),Zm(e,t,i,d);var h=!1;if(d<=i.e.r)for(var m=i.s.c;m<=i.e.c;++m){d===i.s.r&&(o[m]=rr(m)),s=o[m]+a;var l=f?(t[d]||[])[m]:t[s];if(!l){h=!1;continue}h=ev(e,l,d,m,n,t,h)}}de(e,146)}function rv(e,t){!t||!t["!merges"]||(de(e,177,Bx(t["!merges"].length)),t["!merges"].forEach(function(r){de(e,176,Lx(r))}),de(e,178))}function nv(e,t){!t||!t["!cols"]||(de(e,390),t["!cols"].forEach(function(r,n){r&&de(e,60,Hx(n,r))}),de(e,391))}function iv(e,t){!t||!t["!ref"]||(de(e,648),de(e,649,qx(wt(t["!ref"]))),de(e,650))}function sv(e,t,r){t["!links"].forEach(function(n){if(n[1].Target){var i=ot(r,-1,n[1].Target.replace(/#.*$/,""),Ke.HLINK);de(e,494,Ux(n,i))}}),delete t["!links"]}function av(e,t,r,n){if(t["!comments"].length>0){var i=ot(n,-1,"../drawings/vmlDrawing"+(r+1)+".vml",Ke.VML);de(e,551,io("rId"+i)),t["!legacy"]=i}}function ov(e,t,r,n){if(t["!autofilter"]){var i=t["!autofilter"],s=typeof i.ref=="string"?i.ref:jt(i.ref);r.Workbook||(r.Workbook={Sheets:[]}),r.Workbook.Names||(r.Workbook.Names=[]);var a=r.Workbook.Names,o=Sr(s);o.s.r==o.e.r&&(o.e.r=Sr(t["!ref"]).e.r,s=jt(o));for(var f=0;f<a.length;++f){var u=a[f];if(u.Name=="_xlnm._FilterDatabase"&&u.Sheet==n){u.Ref="'"+r.SheetNames[n]+"'!"+s;break}}f==a.length&&a.push({Name:"_xlnm._FilterDatabase",Sheet:n,Ref:"'"+r.SheetNames[n]+"'!"+s}),de(e,161,Qn(wt(s))),de(e,162)}}function lv(e,t,r){de(e,133),de(e,137,Kx(t,r)),de(e,138),de(e,134)}function cv(e,t){t["!protect"]&&de(e,535,Jx(t["!protect"]))}function uv(e,t,r,n){var i=fr(),s=r.SheetNames[e],a=r.Sheets[s]||{},o=s;try{r&&r.Workbook&&(o=r.Workbook.Sheets[e].CodeName||o)}catch{}var f=wt(a["!ref"]||"A1");if(f.e.c>16383||f.e.r>1048575){if(t.WTF)throw new Error("Range "+(a["!ref"]||"A1")+" exceeds format limit A1:XFD1048576");f.e.c=Math.min(f.e.c,16383),f.e.r=Math.min(f.e.c,1048575)}return a["!links"]=[],a["!comments"]=[],de(i,129),(r.vbaraw||a["!outline"])&&de(i,147,nx(o,a["!outline"])),de(i,148,ex(f)),lv(i,a,r.Workbook),nv(i,a),tv(i,a,e,t),cv(i,a),ov(i,a,r,e),rv(i,a),sv(i,a,n),a["!margins"]&&de(i,476,Yx(a["!margins"])),(!t||t.ignoreEC||t.ignoreEC==null)&&iv(i,a),av(i,a,e,n),de(i,130),i.end()}function fv(e,t){e.l+=10;var r=nr(e);return{name:r}}var dv=[["allowRefreshQuery",!1,"bool"],["autoCompressPictures",!0,"bool"],["backupFile",!1,"bool"],["checkCompatibility",!1,"bool"],["CodeName",""],["date1904",!1,"bool"],["defaultThemeVersion",0,"int"],["filterPrivacy",!1,"bool"],["hidePivotFieldList",!1,"bool"],["promptedSolutions",!1,"bool"],["publishItems",!1,"bool"],["refreshAllConnections",!1,"bool"],["saveExternalLinkValues",!0,"bool"],["showBorderUnselectedTables",!0,"bool"],["showInkAnnotation",!0,"bool"],["showObjects","all"],["showPivotChartFilter",!1,"bool"],["updateLinks","userSet"]];function hv(e){return!e.Workbook||!e.Workbook.WBProps?"false":zh(e.Workbook.WBProps.date1904)?"true":"false"}var pv="][*?/\\".split("");function _u(e,t){if(e.length>31)throw new Error("Sheet names cannot exceed 31 chars");var r=!0;return pv.forEach(function(n){if(e.indexOf(n)!=-1)throw new Error("Sheet name cannot contain : \\ / ? * [ ]")}),r}function gv(e,t,r){e.forEach(function(n,i){_u(n);for(var s=0;s<i;++s)if(n==e[s])throw new Error("Duplicate Sheet Name: "+n);if(r){var a=t&&t[i]&&t[i].CodeName||n;if(a.charCodeAt(0)==95&&a.length>22)throw new Error("Bad Code Name: Worksheet"+a)}})}function mv(e){if(!e||!e.SheetNames||!e.Sheets)throw new Error("Invalid Workbook");if(!e.SheetNames.length)throw new Error("Workbook is empty");var t=e.Workbook&&e.Workbook.Sheets||[];gv(e.SheetNames,t,!!e.vbaraw);for(var r=0;r<e.SheetNames.length;++r)Lm(e.Sheets[e.SheetNames[r]],e.SheetNames[r],r)}function bu(e){var t=[Mt];t[t.length]=xe("workbook",null,{xmlns:Jn[0],"xmlns:r":Wt.r});var r=e.Workbook&&(e.Workbook.Names||[]).length>0,n={codeName:"ThisWorkbook"};e.Workbook&&e.Workbook.WBProps&&(dv.forEach(function(o){e.Workbook.WBProps[o[0]]!=null&&e.Workbook.WBProps[o[0]]!=o[1]&&(n[o[0]]=e.Workbook.WBProps[o[0]])}),e.Workbook.WBProps.CodeName&&(n.codeName=e.Workbook.WBProps.CodeName,delete n.CodeName)),t[t.length]=xe("workbookPr",null,n);var i=e.Workbook&&e.Workbook.Sheets||[],s=0;if(i&&i[0]&&i[0].Hidden){for(t[t.length]="<bookViews>",s=0;s!=e.SheetNames.length&&!(!i[s]||!i[s].Hidden);++s);s==e.SheetNames.length&&(s=0),t[t.length]='<workbookView firstSheet="'+s+'" activeTab="'+s+'"/>',t[t.length]="</bookViews>"}for(t[t.length]="<sheets>",s=0;s!=e.SheetNames.length;++s){var a={name:lt(e.SheetNames[s].slice(0,31))};if(a.sheetId=""+(s+1),a["r:id"]="rId"+(s+1),i[s])switch(i[s].Hidden){case 1:a.state="hidden";break;case 2:a.state="veryHidden";break}t[t.length]=xe("sheet",null,a)}return t[t.length]="</sheets>",r&&(t[t.length]="<definedNames>",e.Workbook&&e.Workbook.Names&&e.Workbook.Names.forEach(function(o){var f={name:o.Name};o.Comment&&(f.comment=o.Comment),o.Sheet!=null&&(f.localSheetId=""+o.Sheet),o.Hidden&&(f.hidden="1"),o.Ref&&(t[t.length]=xe("definedName",lt(o.Ref),f))}),t[t.length]="</definedNames>"),t.length>2&&(t[t.length]="</workbook>",t[1]=t[1].replace("/>",">")),t.join("")}function xv(e,t){var r={};return r.Hidden=e.read_shift(4),r.iTabID=e.read_shift(4),r.strRelID=Oa(e),r.name=nr(e),r}function vv(e,t){return t||(t=re(127)),t.write_shift(4,e.Hidden),t.write_shift(4,e.iTabID),io(e.strRelID,t),zt(e.name.slice(0,31),t),t.length>t.l?t.slice(0,t.l):t}function yv(e,t){var r={},n=e.read_shift(4);r.defaultThemeVersion=e.read_shift(4);var i=t>8?nr(e):"";return i.length>0&&(r.CodeName=i),r.autoCompressPictures=!!(n&65536),r.backupFile=!!(n&64),r.checkCompatibility=!!(n&4096),r.date1904=!!(n&1),r.filterPrivacy=!!(n&8),r.hidePivotFieldList=!!(n&1024),r.promptedSolutions=!!(n&16),r.publishItems=!!(n&2048),r.refreshAllConnections=!!(n&262144),r.saveExternalLinkValues=!!(n&128),r.showBorderUnselectedTables=!!(n&4),r.showInkAnnotation=!!(n&32),r.showObjects=["all","placeholders","none"][n>>13&3],r.showPivotChartFilter=!!(n&32768),r.updateLinks=["userSet","never","always"][n>>8&3],r}function wv(e,t){t||(t=re(72));var r=0;return e&&e.filterPrivacy&&(r|=8),t.write_shift(4,r),t.write_shift(4,0),M0(e&&e.CodeName||"ThisWorkbook",t),t.slice(0,t.l)}function Tv(e,t,r){var n=e.l+t;e.l+=4,e.l+=1;var i=e.read_shift(4),s=hp(e),a=Fm(e,0,r),o=no(e);e.l=n;var f={Name:s,Ptg:a};return i<268435455&&(f.Sheet=i),o&&(f.Comment=o),f}function Sv(e,t){de(e,143);for(var r=0;r!=t.SheetNames.length;++r){var n=t.Workbook&&t.Workbook.Sheets&&t.Workbook.Sheets[r]&&t.Workbook.Sheets[r].Hidden||0,i={Hidden:n,iTabID:r+1,strRelID:"rId"+(r+1),name:t.SheetNames[r]};de(e,156,vv(i))}de(e,144)}function Ev(e,t){t||(t=re(127));for(var r=0;r!=4;++r)t.write_shift(4,0);return zt("SheetJS",t),zt(is.version,t),zt(is.version,t),zt("7262",t),t.length>t.l?t.slice(0,t.l):t}function _v(e,t){t||(t=re(29)),t.write_shift(-4,0),t.write_shift(-4,460),t.write_shift(4,28800),t.write_shift(4,17600),t.write_shift(4,500),t.write_shift(4,e),t.write_shift(4,e);var r=120;return t.write_shift(1,r),t.length>t.l?t.slice(0,t.l):t}function bv(e,t){if(!(!t.Workbook||!t.Workbook.Sheets)){for(var r=t.Workbook.Sheets,n=0,i=-1,s=-1;n<r.length;++n)!r[n]||!r[n].Hidden&&i==-1?i=n:r[n].Hidden==1&&s==-1&&(s=n);s>i||(de(e,135),de(e,158,_v(i)),de(e,136))}}function Cv(e,t){var r=fr();return de(r,131),de(r,128,Ev()),de(r,153,wv(e.Workbook&&e.Workbook.WBProps||null)),bv(r,e),Sv(r,e),de(r,132),r.end()}function Av(e,t,r){return(t.slice(-4)===".bin"?Cv:bu)(e)}function Ov(e,t,r,n,i){return(t.slice(-4)===".bin"?uv:Su)(e,r,n,i)}function Dv(e,t,r){return(t.slice(-4)===".bin"?Yg:ou)(e,r)}function kv(e,t,r){return(t.slice(-4)===".bin"?wg:nu)(e,r)}function Iv(e,t,r){return(t.slice(-4)===".bin"?c1:du)(e)}function Fv(e){return(e.slice(-4)===".bin"?t1:uu)()}function Nv(e,t){var r=[];return e.Props&&r.push(Dp(e.Props,t)),e.Custprops&&r.push(kp(e.Props,e.Custprops)),r.join("")}function Rv(){return""}function Pv(e,t){var r=['<Style ss:ID="Default" ss:Name="Normal"><NumberFormat/></Style>'];return t.cellXfs.forEach(function(n,i){var s=[];s.push(xe("NumberFormat",null,{"ss:Format":lt(Dt[n.numFmtId])}));var a={"ss:ID":"s"+(21+i)};r.push(xe("Style",s.join(""),a))}),xe("Styles",r.join(""))}function Cu(e){return xe("NamedRange",null,{"ss:Name":e.Name,"ss:RefersTo":"="+lo(e.Ref,{r:0,c:0})})}function jv(e){if(!((e||{}).Workbook||{}).Names)return"";for(var t=e.Workbook.Names,r=[],n=0;n<t.length;++n){var i=t[n];i.Sheet==null&&(i.Name.match(/^_xlfn\./)||r.push(Cu(i)))}return xe("Names",r.join(""))}function Mv(e,t,r,n){if(!e||!((n||{}).Workbook||{}).Names)return"";for(var i=n.Workbook.Names,s=[],a=0;a<i.length;++a){var o=i[a];o.Sheet==r&&(o.Name.match(/^_xlfn\./)||s.push(Cu(o)))}return s.join("")}function Lv(e,t,r,n){if(!e)return"";var i=[];if(e["!margins"]&&(i.push("<PageSetup>"),e["!margins"].header&&i.push(xe("Header",null,{"x:Margin":e["!margins"].header})),e["!margins"].footer&&i.push(xe("Footer",null,{"x:Margin":e["!margins"].footer})),i.push(xe("PageMargins",null,{"x:Bottom":e["!margins"].bottom||"0.75","x:Left":e["!margins"].left||"0.7","x:Right":e["!margins"].right||"0.7","x:Top":e["!margins"].top||"0.75"})),i.push("</PageSetup>")),n&&n.Workbook&&n.Workbook.Sheets&&n.Workbook.Sheets[r])if(n.Workbook.Sheets[r].Hidden)i.push(xe("Visible",n.Workbook.Sheets[r].Hidden==1?"SheetHidden":"SheetVeryHidden",{}));else{for(var s=0;s<r&&!(n.Workbook.Sheets[s]&&!n.Workbook.Sheets[s].Hidden);++s);s==r&&i.push("<Selected/>")}return((((n||{}).Workbook||{}).Views||[])[0]||{}).RTL&&i.push("<DisplayRightToLeft/>"),e["!protect"]&&(i.push(Zt("ProtectContents","True")),e["!protect"].objects&&i.push(Zt("ProtectObjects","True")),e["!protect"].scenarios&&i.push(Zt("ProtectScenarios","True")),e["!protect"].selectLockedCells!=null&&!e["!protect"].selectLockedCells?i.push(Zt("EnableSelection","NoSelection")):e["!protect"].selectUnlockedCells!=null&&!e["!protect"].selectUnlockedCells&&i.push(Zt("EnableSelection","UnlockedCells")),[["formatCells","AllowFormatCells"],["formatColumns","AllowSizeCols"],["formatRows","AllowSizeRows"],["insertColumns","AllowInsertCols"],["insertRows","AllowInsertRows"],["insertHyperlinks","AllowInsertHyperlinks"],["deleteColumns","AllowDeleteCols"],["deleteRows","AllowDeleteRows"],["sort","AllowSort"],["autoFilter","AllowFilter"],["pivotTables","AllowUsePivotTables"]].forEach(function(a){e["!protect"][a[0]]&&i.push("<"+a[1]+"/>")})),i.length==0?"":xe("WorksheetOptions",i.join(""),{xmlns:vr.x})}function Bv(e){return e.map(function(t){var r=Vh(t.t||""),n=xe("ss:Data",r,{xmlns:"http://www.w3.org/TR/REC-html40"});return xe("Comment",n,{"ss:Author":t.a})}).join("")}function $v(e,t,r,n,i,s,a){if(!e||e.v==null&&e.f==null)return"";var o={};if(e.f&&(o["ss:Formula"]="="+lt(lo(e.f,a))),e.F&&e.F.slice(0,t.length)==t){var f=Vt(e.F.slice(t.length+1));o["ss:ArrayRange"]="RC:R"+(f.r==a.r?"":"["+(f.r-a.r)+"]")+"C"+(f.c==a.c?"":"["+(f.c-a.c)+"]")}if(e.l&&e.l.Target&&(o["ss:HRef"]=lt(e.l.Target),e.l.Tooltip&&(o["x:HRefScreenTip"]=lt(e.l.Tooltip))),r["!merges"])for(var u=r["!merges"],d=0;d!=u.length;++d)u[d].s.c!=a.c||u[d].s.r!=a.r||(u[d].e.c>u[d].s.c&&(o["ss:MergeAcross"]=u[d].e.c-u[d].s.c),u[d].e.r>u[d].s.r&&(o["ss:MergeDown"]=u[d].e.r-u[d].s.r));var h="",m="";switch(e.t){case"z":if(!n.sheetStubs)return"";break;case"n":h="Number",m=String(e.v);break;case"b":h="Boolean",m=e.v?"1":"0";break;case"e":h="Error",m=Ii[e.v];break;case"d":h="DateTime",m=new Date(e.v).toISOString(),e.z==null&&(e.z=e.z||Dt[14]);break;case"s":h="String",m=Wh(e.v||"");break}var l=un(n.cellXfs,e,n);o["ss:StyleID"]="s"+(21+l),o["ss:Index"]=a.c+1;var v=e.v!=null?m:"",g=e.t=="z"?"":'<Data ss:Type="'+h+'">'+v+"</Data>";return(e.c||[]).length>0&&(g+=Bv(e.c)),xe("Cell",g,o)}function Uv(e,t){var r='<Row ss:Index="'+(e+1)+'"';return t&&(t.hpt&&!t.hpx&&(t.hpx=au(t.hpt)),t.hpx&&(r+=' ss:AutoFitHeight="0" ss:Height="'+t.hpx+'"'),t.hidden&&(r+=' ss:Hidden="1"')),r+">"}function Wv(e,t,r,n){if(!e["!ref"])return"";var i=wt(e["!ref"]),s=e["!merges"]||[],a=0,o=[];e["!cols"]&&e["!cols"].forEach(function(x,T){ao(x);var b=!!x.width,_=ks(T,x),k={"ss:Index":T+1};b&&(k["ss:Width"]=ps(_.width)),x.hidden&&(k["ss:Hidden"]="1"),o.push(xe("Column",null,k))});for(var f=Array.isArray(e),u=i.s.r;u<=i.e.r;++u){for(var d=[Uv(u,(e["!rows"]||[])[u])],h=i.s.c;h<=i.e.c;++h){var m=!1;for(a=0;a!=s.length;++a)if(!(s[a].s.c>h)&&!(s[a].s.r>u)&&!(s[a].e.c<h)&&!(s[a].e.r<u)){(s[a].s.c!=h||s[a].s.r!=u)&&(m=!0);break}if(!m){var l={r:u,c:h},v=ct(l),g=f?(e[u]||[])[h]:e[v];d.push($v(g,v,e,t,r,n,l))}}d.push("</Row>"),d.length>2&&o.push(d.join(""))}return o.join("")}function Vv(e,t,r){var n=[],i=r.SheetNames[e],s=r.Sheets[i],a=s?Mv(s,t,e,r):"";return a.length>0&&n.push("<Names>"+a+"</Names>"),a=s?Wv(s,t,e,r):"",a.length>0&&n.push("<Table>"+a+"</Table>"),n.push(Lv(s,t,e,r)),n.join("")}function zv(e,t){t||(t={}),e.SSF||(e.SSF=hr(Dt)),e.SSF&&(bs(),_s(e.SSF),t.revssf=Cs(e.SSF),t.revssf[e.SSF[65535]]=0,t.ssf=e.SSF,t.cellXfs=[],un(t.cellXfs,{},{revssf:{General:0}}));var r=[];r.push(Nv(e,t)),r.push(Rv()),r.push(""),r.push("");for(var n=0;n<e.SheetNames.length;++n)r.push(xe("Worksheet",Vv(n,t,e),{"ss:Name":lt(e.SheetNames[n])}));return r[2]=Pv(e,t),r[3]=jv(e),Mt+xe("Workbook",r.join(""),{xmlns:vr.ss,"xmlns:o":vr.o,"xmlns:x":vr.x,"xmlns:ss":vr.ss,"xmlns:dt":vr.dt,"xmlns:html":vr.html})}var sa={SI:"e0859ff2f94f6810ab9108002b27b3d9",DSI:"02d5cdd59c2e1b10939708002b2cf9ae",UDI:"05d5cdd59c2e1b10939708002b2cf9ae"};function Hv(e,t){var r=[],n=[],i=[],s=0,a,o=il(xl,"n"),f=il(vl,"n");if(e.Props)for(a=er(e.Props),s=0;s<a.length;++s)(Object.prototype.hasOwnProperty.call(o,a[s])?r:Object.prototype.hasOwnProperty.call(f,a[s])?n:i).push([a[s],e.Props[a[s]]]);if(e.Custprops)for(a=er(e.Custprops),s=0;s<a.length;++s)Object.prototype.hasOwnProperty.call(e.Props||{},a[s])||(Object.prototype.hasOwnProperty.call(o,a[s])?r:Object.prototype.hasOwnProperty.call(f,a[s])?n:i).push([a[s],e.Custprops[a[s]]]);var u=[];for(s=0;s<i.length;++s)q0.indexOf(i[s][0])>-1||Y0.indexOf(i[s][0])>-1||i[s][1]!=null&&u.push(i[s]);n.length&&ht.utils.cfb_add(t,"/SummaryInformation",El(n,sa.SI,f,vl)),(r.length||u.length)&&ht.utils.cfb_add(t,"/DocumentSummaryInformation",El(r,sa.DSI,o,xl,u.length?u:null,sa.UDI))}function Gv(e,t){var r=t||{},n=ht.utils.cfb_new({root:"R"}),i="/Workbook";switch(r.bookType||"xls"){case"xls":r.bookType="biff8";case"xla":r.bookType||(r.bookType="xla");case"biff8":i="/Workbook",r.biff=8;break;case"biff5":i="/Book",r.biff=5;break;default:throw new Error("invalid type "+r.bookType+" for XLS CFB")}return ht.utils.cfb_add(n,i,Au(e,r)),r.biff==8&&(e.Props||e.Custprops)&&Hv(e,n),r.biff==8&&e.vbaraw&&u1(n,ht.read(e.vbaraw,{type:typeof e.vbaraw=="string"?"binary":"buffer"})),n}var Yv={0:{f:qm},1:{f:ix},2:{f:_x},3:{f:dx},4:{f:lx},5:{f:wx},6:{f:Dx},7:{f:mx},8:{f:jx},9:{f:Px},10:{f:Nx},11:{f:Rx},12:{f:ax},13:{f:Cx},14:{f:px},15:{f:ux},16:{f:Sx},17:{f:Ix},18:{f:vx},19:{f:ro},20:{},21:{},22:{},23:{},24:{},25:{},26:{},27:{},28:{},29:{},30:{},31:{},32:{},33:{},34:{},35:{T:1},36:{T:-1},37:{T:1},38:{T:-1},39:{f:Tv},40:{},42:{},43:{f:Dg},44:{f:Ag},45:{f:Fg},46:{f:Rg},47:{f:Ng},48:{},49:{f:ap},50:{},51:{f:qg},52:{T:1},53:{T:-1},54:{T:1},55:{T:-1},56:{T:1},57:{T:-1},58:{},59:{},60:{f:og},62:{f:Ox},63:{f:r1},64:{f:Zx},65:{},66:{},67:{},68:{},69:{},70:{},128:{},129:{T:1},130:{T:-1},131:{T:1,f:Wr,p:0},132:{T:-1},133:{T:1},134:{T:-1},135:{T:1},136:{T:-1},137:{T:1,f:Xx},138:{T:-1},139:{T:1},140:{T:-1},141:{T:1},142:{T:-1},143:{T:1},144:{T:-1},145:{T:1},146:{T:-1},147:{f:rx},148:{f:Qm,p:16},151:{f:Wx},152:{},153:{f:yv},154:{},155:{},156:{f:xv},157:{},158:{},159:{T:1,f:xg},160:{T:-1},161:{T:1,f:Dn},162:{T:-1},163:{T:1},164:{T:-1},165:{T:1},166:{T:-1},167:{},168:{},169:{},170:{},171:{},172:{T:1},173:{T:-1},174:{},175:{},176:{f:Mx},177:{T:1},178:{T:-1},179:{T:1},180:{T:-1},181:{T:1},182:{T:-1},183:{T:1},184:{T:-1},185:{T:1},186:{T:-1},187:{T:1},188:{T:-1},189:{T:1},190:{T:-1},191:{T:1},192:{T:-1},193:{T:1},194:{T:-1},195:{T:1},196:{T:-1},197:{T:1},198:{T:-1},199:{T:1},200:{T:-1},201:{T:1},202:{T:-1},203:{T:1},204:{T:-1},205:{T:1},206:{T:-1},207:{T:1},208:{T:-1},209:{T:1},210:{T:-1},211:{T:1},212:{T:-1},213:{T:1},214:{T:-1},215:{T:1},216:{T:-1},217:{T:1},218:{T:-1},219:{T:1},220:{T:-1},221:{T:1},222:{T:-1},223:{T:1},224:{T:-1},225:{T:1},226:{T:-1},227:{T:1},228:{T:-1},229:{T:1},230:{T:-1},231:{T:1},232:{T:-1},233:{T:1},234:{T:-1},235:{T:1},236:{T:-1},237:{T:1},238:{T:-1},239:{T:1},240:{T:-1},241:{T:1},242:{T:-1},243:{T:1},244:{T:-1},245:{T:1},246:{T:-1},247:{T:1},248:{T:-1},249:{T:1},250:{T:-1},251:{T:1},252:{T:-1},253:{T:1},254:{T:-1},255:{T:1},256:{T:-1},257:{T:1},258:{T:-1},259:{T:1},260:{T:-1},261:{T:1},262:{T:-1},263:{T:1},264:{T:-1},265:{T:1},266:{T:-1},267:{T:1},268:{T:-1},269:{T:1},270:{T:-1},271:{T:1},272:{T:-1},273:{T:1},274:{T:-1},275:{T:1},276:{T:-1},277:{},278:{T:1},279:{T:-1},280:{T:1},281:{T:-1},282:{T:1},283:{T:1},284:{T:-1},285:{T:1},286:{T:-1},287:{T:1},288:{T:-1},289:{T:1},290:{T:-1},291:{T:1},292:{T:-1},293:{T:1},294:{T:-1},295:{T:1},296:{T:-1},297:{T:1},298:{T:-1},299:{T:1},300:{T:-1},301:{T:1},302:{T:-1},303:{T:1},304:{T:-1},305:{T:1},306:{T:-1},307:{T:1},308:{T:-1},309:{T:1},310:{T:-1},311:{T:1},312:{T:-1},313:{T:-1},314:{T:1},315:{T:-1},316:{T:1},317:{T:-1},318:{T:1},319:{T:-1},320:{T:1},321:{T:-1},322:{T:1},323:{T:-1},324:{T:1},325:{T:-1},326:{T:1},327:{T:-1},328:{T:1},329:{T:-1},330:{T:1},331:{T:-1},332:{T:1},333:{T:-1},334:{T:1},335:{f:Xg},336:{T:-1},337:{f:Qg,T:1},338:{T:-1},339:{T:1},340:{T:-1},341:{T:1},342:{T:-1},343:{T:1},344:{T:-1},345:{T:1},346:{T:-1},347:{T:1},348:{T:-1},349:{T:1},350:{T:-1},351:{},352:{},353:{T:1},354:{T:-1},355:{f:Oa},357:{},358:{},359:{},360:{T:1},361:{},362:{f:tg},363:{},364:{},366:{},367:{},368:{},369:{},370:{},371:{},372:{T:1},373:{T:-1},374:{T:1},375:{T:-1},376:{T:1},377:{T:-1},378:{T:1},379:{T:-1},380:{T:1},381:{T:-1},382:{T:1},383:{T:-1},384:{T:1},385:{T:-1},386:{T:1},387:{T:-1},388:{T:1},389:{T:-1},390:{T:1},391:{T:-1},392:{T:1},393:{T:-1},394:{T:1},395:{T:-1},396:{},397:{},398:{},399:{},400:{},401:{T:1},403:{},404:{},405:{},406:{},407:{},408:{},409:{},410:{},411:{},412:{},413:{},414:{},415:{},416:{},417:{},418:{},419:{},420:{},421:{},422:{T:1},423:{T:1},424:{T:-1},425:{T:-1},426:{f:Vx},427:{f:zx},428:{},429:{T:1},430:{T:-1},431:{T:1},432:{T:-1},433:{T:1},434:{T:-1},435:{T:1},436:{T:-1},437:{T:1},438:{T:-1},439:{T:1},440:{T:-1},441:{T:1},442:{T:-1},443:{T:1},444:{T:-1},445:{T:1},446:{T:-1},447:{T:1},448:{T:-1},449:{T:1},450:{T:-1},451:{T:1},452:{T:-1},453:{T:1},454:{T:-1},455:{T:1},456:{T:-1},457:{T:1},458:{T:-1},459:{T:1},460:{T:-1},461:{T:1},462:{T:-1},463:{T:1},464:{T:-1},465:{T:1},466:{T:-1},467:{T:1},468:{T:-1},469:{T:1},470:{T:-1},471:{},472:{},473:{T:1},474:{T:-1},475:{},476:{f:Gx},477:{},478:{},479:{T:1},480:{T:-1},481:{T:1},482:{T:-1},483:{T:1},484:{T:-1},485:{f:tx},486:{T:1},487:{T:-1},488:{T:1},489:{T:-1},490:{T:1},491:{T:-1},492:{T:1},493:{T:-1},494:{f:$x},495:{T:1},496:{T:-1},497:{T:1},498:{T:-1},499:{},500:{T:1},501:{T:-1},502:{T:1},503:{T:-1},504:{},505:{T:1},506:{T:-1},507:{},508:{T:1},509:{T:-1},510:{T:1},511:{T:-1},512:{},513:{},514:{T:1},515:{T:-1},516:{T:1},517:{T:-1},518:{T:1},519:{T:-1},520:{T:1},521:{T:-1},522:{},523:{},524:{},525:{},526:{},527:{},528:{T:1},529:{T:-1},530:{T:1},531:{T:-1},532:{T:1},533:{T:-1},534:{},535:{},536:{},537:{},538:{T:1},539:{T:-1},540:{T:1},541:{T:-1},542:{T:1},548:{},549:{},550:{f:Oa},551:{},552:{},553:{},554:{T:1},555:{T:-1},556:{T:1},557:{T:-1},558:{T:1},559:{T:-1},560:{T:1},561:{T:-1},562:{},564:{},565:{T:1},566:{T:-1},569:{T:1},570:{T:-1},572:{},573:{T:1},574:{T:-1},577:{},578:{},579:{},580:{},581:{},582:{},583:{},584:{},585:{},586:{},587:{},588:{T:-1},589:{},590:{T:1},591:{T:-1},592:{T:1},593:{T:-1},594:{T:1},595:{T:-1},596:{},597:{T:1},598:{T:-1},599:{T:1},600:{T:-1},601:{T:1},602:{T:-1},603:{T:1},604:{T:-1},605:{T:1},606:{T:-1},607:{},608:{T:1},609:{T:-1},610:{},611:{T:1},612:{T:-1},613:{T:1},614:{T:-1},615:{T:1},616:{T:-1},617:{T:1},618:{T:-1},619:{T:1},620:{T:-1},625:{},626:{T:1},627:{T:-1},628:{T:1},629:{T:-1},630:{T:1},631:{T:-1},632:{f:o1},633:{T:1},634:{T:-1},635:{T:1,f:s1},636:{T:-1},637:{f:up},638:{T:1},639:{},640:{T:-1},641:{T:1},642:{T:-1},643:{T:1},644:{},645:{T:-1},646:{T:1},648:{T:1},649:{},650:{T:-1},651:{f:fv},652:{},653:{T:1},654:{T:-1},655:{T:1},656:{T:-1},657:{T:1},658:{T:-1},659:{},660:{T:1},661:{},662:{T:-1},663:{},664:{T:1},665:{},666:{T:-1},667:{},668:{},669:{},671:{T:1},672:{T:-1},673:{T:1},674:{T:-1},675:{},676:{},677:{},678:{},679:{},680:{},681:{},1024:{},1025:{},1026:{T:1},1027:{T:-1},1028:{T:1},1029:{T:-1},1030:{},1031:{T:1},1032:{T:-1},1033:{T:1},1034:{T:-1},1035:{},1036:{},1037:{},1038:{T:1},1039:{T:-1},1040:{},1041:{T:1},1042:{T:-1},1043:{},1044:{},1045:{},1046:{T:1},1047:{T:-1},1048:{T:1},1049:{T:-1},1050:{},1051:{T:1},1052:{T:1},1053:{f:Qx},1054:{T:1},1055:{},1056:{T:1},1057:{T:-1},1058:{T:1},1059:{T:-1},1061:{},1062:{T:1},1063:{T:-1},1064:{T:1},1065:{T:-1},1066:{T:1},1067:{T:-1},1068:{T:1},1069:{T:-1},1070:{T:1},1071:{T:-1},1072:{T:1},1073:{T:-1},1075:{T:1},1076:{T:-1},1077:{T:1},1078:{T:-1},1079:{T:1},1080:{T:-1},1081:{T:1},1082:{T:-1},1083:{T:1},1084:{T:-1},1085:{},1086:{T:1},1087:{T:-1},1088:{T:1},1089:{T:-1},1090:{T:1},1091:{T:-1},1092:{T:1},1093:{T:-1},1094:{T:1},1095:{T:-1},1096:{},1097:{T:1},1098:{},1099:{T:-1},1100:{T:1},1101:{T:-1},1102:{},1103:{},1104:{},1105:{},1111:{},1112:{},1113:{T:1},1114:{T:-1},1115:{T:1},1116:{T:-1},1117:{},1118:{T:1},1119:{T:-1},1120:{T:1},1121:{T:-1},1122:{T:1},1123:{T:-1},1124:{T:1},1125:{T:-1},1126:{},1128:{T:1},1129:{T:-1},1130:{},1131:{T:1},1132:{T:-1},1133:{T:1},1134:{T:-1},1135:{T:1},1136:{T:-1},1137:{T:1},1138:{T:-1},1139:{T:1},1140:{T:-1},1141:{},1142:{T:1},1143:{T:-1},1144:{T:1},1145:{T:-1},1146:{},1147:{T:1},1148:{T:-1},1149:{T:1},1150:{T:-1},1152:{T:1},1153:{T:-1},1154:{T:-1},1155:{T:-1},1156:{T:-1},1157:{T:1},1158:{T:-1},1159:{T:1},1160:{T:-1},1161:{T:1},1162:{T:-1},1163:{T:1},1164:{T:-1},1165:{T:1},1166:{T:-1},1167:{T:1},1168:{T:-1},1169:{T:1},1170:{T:-1},1171:{},1172:{T:1},1173:{T:-1},1177:{},1178:{T:1},1180:{},1181:{},1182:{},2048:{T:1},2049:{T:-1},2050:{},2051:{T:1},2052:{T:-1},2053:{},2054:{},2055:{T:1},2056:{T:-1},2057:{T:1},2058:{T:-1},2060:{},2067:{},2068:{T:1},2069:{T:-1},2070:{},2071:{},2072:{T:1},2073:{T:-1},2075:{},2076:{},2077:{T:1},2078:{T:-1},2079:{},2080:{T:1},2081:{T:-1},2082:{},2083:{T:1},2084:{T:-1},2085:{T:1},2086:{T:-1},2087:{T:1},2088:{T:-1},2089:{T:1},2090:{T:-1},2091:{},2092:{},2093:{T:1},2094:{T:-1},2095:{},2096:{T:1},2097:{T:-1},2098:{T:1},2099:{T:-1},2100:{T:1},2101:{T:-1},2102:{},2103:{T:1},2104:{T:-1},2105:{},2106:{T:1},2107:{T:-1},2108:{},2109:{T:1},2110:{T:-1},2111:{T:1},2112:{T:-1},2113:{T:1},2114:{T:-1},2115:{},2116:{},2117:{},2118:{T:1},2119:{T:-1},2120:{},2121:{T:1},2122:{T:-1},2123:{T:1},2124:{T:-1},2125:{},2126:{T:1},2127:{T:-1},2128:{},2129:{T:1},2130:{T:-1},2131:{T:1},2132:{T:-1},2133:{T:1},2134:{},2135:{},2136:{},2137:{T:1},2138:{T:-1},2139:{T:1},2140:{T:-1},2141:{},3072:{},3073:{},4096:{T:1},4097:{T:-1},5002:{T:1},5003:{T:-1},5081:{T:1},5082:{T:-1},5083:{},5084:{T:1},5085:{T:-1},5086:{T:1},5087:{T:-1},5088:{},5089:{},5090:{},5092:{T:1},5093:{T:-1},5094:{},5095:{T:1},5096:{T:-1},5097:{},5099:{},65535:{n:""}};function ve(e,t,r,n){var i=t;if(!isNaN(i)){var s=n||(r||[]).length||0,a=e.next(4);a.write_shift(2,i),a.write_shift(2,s),s>0&&Qa(r)&&e.push(r)}}function Xv(e,t,r,n){var i=(r||[]).length||0;if(i<=8224)return ve(e,t,r,i);var s=t;if(!isNaN(s)){for(var a=r.parts||[],o=0,f=0,u=0;u+(a[o]||8224)<=8224;)u+=a[o]||8224,o++;var d=e.next(4);for(d.write_shift(2,s),d.write_shift(2,u),e.push(r.slice(f,f+u)),f+=u;f<i;){for(d=e.next(4),d.write_shift(2,60),u=0;u+(a[o]||8224)<=8224;)u+=a[o]||8224,o++;d.write_shift(2,u),e.push(r.slice(f,f+u)),f+=u}}}function Ni(e,t,r){return e||(e=re(7)),e.write_shift(2,t),e.write_shift(2,r),e.write_shift(2,0),e.write_shift(1,0),e}function Kv(e,t,r,n){var i=re(9);return Ni(i,e,t),Z0(r,n||"b",i),i}function qv(e,t,r){var n=re(8+2*r.length);return Ni(n,e,t),n.write_shift(1,r.length),n.write_shift(r.length,r,"sbcs"),n.l<n.length?n.slice(0,n.l):n}function Jv(e,t,r,n){if(t.v!=null)switch(t.t){case"d":case"n":var i=t.t=="d"?dr(lr(t.v)):t.v;i==(i|0)&&i>=0&&i<65536?ve(e,2,fg(r,n,i)):ve(e,3,ug(r,n,i));return;case"b":case"e":ve(e,5,Kv(r,n,t.v,t.t));return;case"s":case"str":ve(e,4,qv(r,n,(t.v||"").slice(0,255)));return}ve(e,1,Ni(null,r,n))}function Zv(e,t,r,n){var i=Array.isArray(t),s=wt(t["!ref"]||"A1"),a,o="",f=[];if(s.e.c>255||s.e.r>16383){if(n.WTF)throw new Error("Range "+(t["!ref"]||"A1")+" exceeds format limit A1:IV16384");s.e.c=Math.min(s.e.c,255),s.e.r=Math.min(s.e.c,16383),a=jt(s)}for(var u=s.s.r;u<=s.e.r;++u){o=Qt(u);for(var d=s.s.c;d<=s.e.c;++d){u===s.s.r&&(f[d]=rr(d)),a=f[d]+o;var h=i?(t[u]||[])[d]:t[a];h&&Jv(e,h,u,d)}}}function Qv(e,t){for(var r=t||{},n=fr(),i=0,s=0;s<e.SheetNames.length;++s)e.SheetNames[s]==r.sheet&&(i=s);if(i==0&&r.sheet&&e.SheetNames[0]!=r.sheet)throw new Error("Sheet not found: "+r.sheet);return ve(n,r.biff==4?1033:r.biff==3?521:9,so(e,16,r)),Zv(n,e.Sheets[e.SheetNames[i]],i,r),ve(n,10),n.end()}function ey(e,t,r){ve(e,49,Yp({sz:12,name:"Arial"},r))}function ty(e,t,r){t&&[[5,8],[23,26],[41,44],[50,392]].forEach(function(n){for(var i=n[0];i<=n[1];++i)t[i]!=null&&ve(e,1054,qp(i,t[i],r))})}function ry(e,t){var r=re(19);r.write_shift(4,2151),r.write_shift(4,0),r.write_shift(4,0),r.write_shift(2,3),r.write_shift(1,1),r.write_shift(4,0),ve(e,2151,r),r=re(39),r.write_shift(4,2152),r.write_shift(4,0),r.write_shift(4,0),r.write_shift(2,3),r.write_shift(1,0),r.write_shift(4,0),r.write_shift(2,1),r.write_shift(4,4),r.write_shift(2,0),tu(wt(t["!ref"]||"A1"),r),r.write_shift(4,4),ve(e,2152,r)}function ny(e,t){for(var r=0;r<16;++r)ve(e,224,bl({numFmtId:0,style:!0},0,t));t.cellXfs.forEach(function(n){ve(e,224,bl(n,0,t))})}function iy(e,t){for(var r=0;r<t["!links"].length;++r){var n=t["!links"][r];ve(e,440,ig(n)),n[1].Tooltip&&ve(e,2048,sg(n))}delete t["!links"]}function sy(e,t){if(t){var r=0;t.forEach(function(n,i){++r<=256&&n&&ve(e,125,lg(ks(i,n),i))})}}function ay(e,t,r,n,i){var s=16+un(i.cellXfs,t,i);if(t.v==null&&!t.bf){ve(e,513,Tn(r,n,s));return}if(t.bf)ve(e,6,km(t,r,n,i,s));else switch(t.t){case"d":case"n":var a=t.t=="d"?dr(lr(t.v)):t.v;ve(e,515,eg(r,n,a,s));break;case"b":case"e":ve(e,517,Qp(r,n,t.v,s,i,t.t));break;case"s":case"str":if(i.bookSST){var o=uo(i.Strings,t.v,i.revStrings);ve(e,253,Xp(r,n,o,s))}else ve(e,516,Kp(r,n,(t.v||"").slice(0,255),s,i));break;default:ve(e,513,Tn(r,n,s))}}function oy(e,t,r){var n=fr(),i=r.SheetNames[e],s=r.Sheets[i]||{},a=(r||{}).Workbook||{},o=(a.Sheets||[])[e]||{},f=Array.isArray(s),u=t.biff==8,d,h="",m=[],l=wt(s["!ref"]||"A1"),v=u?65536:16384;if(l.e.c>255||l.e.r>=v){if(t.WTF)throw new Error("Range "+(s["!ref"]||"A1")+" exceeds format limit A1:IV16384");l.e.c=Math.min(l.e.c,255),l.e.r=Math.min(l.e.c,v-1)}ve(n,2057,so(r,16,t)),ve(n,13,br(1)),ve(n,12,br(100)),ve(n,15,or(!0)),ve(n,17,or(!1)),ve(n,16,wn(.001)),ve(n,95,or(!0)),ve(n,42,or(!1)),ve(n,43,or(!1)),ve(n,130,br(1)),ve(n,128,Zp()),ve(n,131,or(!1)),ve(n,132,or(!1)),u&&sy(n,s["!cols"]),ve(n,512,Jp(l,t)),u&&(s["!links"]=[]);for(var g=l.s.r;g<=l.e.r;++g){h=Qt(g);for(var x=l.s.c;x<=l.e.c;++x){g===l.s.r&&(m[x]=rr(x)),d=m[x]+h;var T=f?(s[g]||[])[x]:s[d];T&&(ay(n,T,g,x,t),u&&T.l&&s["!links"].push([d,T.l]))}}var b=o.CodeName||o.name||i;return u&&ve(n,574,Gp((a.Views||[])[0])),u&&(s["!merges"]||[]).length&&ve(n,229,ng(s["!merges"])),u&&iy(n,s),ve(n,442,eu(b)),u&&ry(n,s),ve(n,10),n.end()}function ly(e,t,r){var n=fr(),i=(e||{}).Workbook||{},s=i.Sheets||[],a=i.WBProps||{},o=r.biff==8,f=r.biff==5;if(ve(n,2057,so(e,5,r)),r.bookType=="xla"&&ve(n,135),ve(n,225,o?br(1200):null),ve(n,193,Np(2)),f&&ve(n,191),f&&ve(n,192),ve(n,226),ve(n,92,Wp("SheetJS",r)),ve(n,66,br(o?1200:1252)),o&&ve(n,353,br(0)),o&&ve(n,448),ve(n,317,cg(e.SheetNames.length)),o&&e.vbaraw&&ve(n,211),o&&e.vbaraw){var u=a.CodeName||"ThisWorkbook";ve(n,442,eu(u))}ve(n,156,br(17)),ve(n,25,or(!1)),ve(n,18,or(!1)),ve(n,19,br(0)),o&&ve(n,431,or(!1)),o&&ve(n,444,br(0)),ve(n,61,Hp()),ve(n,64,or(!1)),ve(n,141,br(0)),ve(n,34,or(hv(e)=="true")),ve(n,14,or(!0)),o&&ve(n,439,or(!1)),ve(n,218,br(0)),ey(n,e,r),ty(n,e.SSF,r),ny(n,r),o&&ve(n,352,or(!1));var d=n.end(),h=fr();o&&ve(h,140,ag()),o&&r.Strings&&Xv(h,252,zp(r.Strings)),ve(h,10);var m=h.end(),l=fr(),v=0,g=0;for(g=0;g<e.SheetNames.length;++g)v+=(o?12:11)+(o?2:1)*e.SheetNames[g].length;var x=d.length+v+m.length;for(g=0;g<e.SheetNames.length;++g){var T=s[g]||{};ve(l,133,Vp({pos:x,hs:T.Hidden||0,dt:0,name:e.SheetNames[g]},r)),x+=t[g].length}var b=l.end();if(v!=b.length)throw new Error("BS8 "+v+" != "+b.length);var _=[];return d.length&&_.push(d),b.length&&_.push(b),m.length&&_.push(m),Jt(_)}function cy(e,t){var r=t||{},n=[];e&&!e.SSF&&(e.SSF=hr(Dt)),e&&e.SSF&&(bs(),_s(e.SSF),r.revssf=Cs(e.SSF),r.revssf[e.SSF[65535]]=0,r.ssf=e.SSF),r.Strings=[],r.Strings.Count=0,r.Strings.Unique=0,fo(r),r.cellXfs=[],un(r.cellXfs,{},{revssf:{General:0}}),e.Props||(e.Props={});for(var i=0;i<e.SheetNames.length;++i)n[n.length]=oy(i,r,e);return n.unshift(ly(e,n,r)),Jt(n)}function Au(e,t){for(var r=0;r<=e.SheetNames.length;++r){var n=e.Sheets[e.SheetNames[r]];if(!(!n||!n["!ref"])){var i=Sr(n["!ref"]);i.e.c>255&&typeof console<"u"&&console.error&&console.error("Worksheet '"+e.SheetNames[r]+"' extends beyond column IV (255). Data may be lost.")}}var s=t||{};switch(s.biff||2){case 8:case 5:return cy(e,t);case 4:case 3:case 2:return Qv(e,t)}throw new Error("invalid type "+s.bookType+" for BIFF")}function uy(e,t,r,n){for(var i=e["!merges"]||[],s=[],a=t.s.c;a<=t.e.c;++a){for(var o=0,f=0,u=0;u<i.length;++u)if(!(i[u].s.r>r||i[u].s.c>a)&&!(i[u].e.r<r||i[u].e.c<a)){if(i[u].s.r<r||i[u].s.c<a){o=-1;break}o=i[u].e.r-i[u].s.r+1,f=i[u].e.c-i[u].s.c+1;break}if(!(o<0)){var d=ct({r,c:a}),h=n.dense?(e[r]||[])[a]:e[d],m=h&&h.v!=null&&(h.h||Uh(h.w||(qr(h),h.w)||""))||"",l={};o>1&&(l.rowspan=o),f>1&&(l.colspan=f),n.editable?m='<span contenteditable="true">'+m+"</span>":h&&(l["data-t"]=h&&h.t||"z",h.v!=null&&(l["data-v"]=h.v),h.z!=null&&(l["data-z"]=h.z),h.l&&(h.l.Target||"#").charAt(0)!="#"&&(m='<a href="'+h.l.Target+'">'+m+"</a>")),l.id=(n.id||"sjs")+"-"+d,s.push(xe("td",m,l))}}var v="<tr>";return v+s.join("")+"</tr>"}var fy='<html><head><meta charset="utf-8"/><title>SheetJS Table Export</title></head><body>',dy="</body></html>";function hy(e,t,r){var n=[];return n.join("")+"<table"+(r&&r.id?' id="'+r.id+'"':"")+">"}function Ou(e,t){var r=t||{},n=r.header!=null?r.header:fy,i=r.footer!=null?r.footer:dy,s=[n],a=Sr(e["!ref"]);r.dense=Array.isArray(e),s.push(hy(e,a,r));for(var o=a.s.r;o<=a.e.r;++o)s.push(uy(e,a,o,r));return s.push("</table>"+i),s.join("")}function Du(e,t,r){var n=r||{},i=0,s=0;if(n.origin!=null)if(typeof n.origin=="number")i=n.origin;else{var a=typeof n.origin=="string"?Vt(n.origin):n.origin;i=a.r,s=a.c}var o=t.getElementsByTagName("tr"),f=Math.min(n.sheetRows||1e7,o.length),u={s:{r:0,c:0},e:{r:i,c:s}};if(e["!ref"]){var d=Sr(e["!ref"]);u.s.r=Math.min(u.s.r,d.s.r),u.s.c=Math.min(u.s.c,d.s.c),u.e.r=Math.max(u.e.r,d.e.r),u.e.c=Math.max(u.e.c,d.e.c),i==-1&&(u.e.r=i=d.e.r+1)}var h=[],m=0,l=e["!rows"]||(e["!rows"]=[]),v=0,g=0,x=0,T=0,b=0,_=0;for(e["!cols"]||(e["!cols"]=[]);v<o.length&&g<f;++v){var k=o[v];if(Fl(k)){if(n.display)continue;l[g]={hidden:!0}}var F=k.children;for(x=T=0;x<F.length;++x){var z=F[x];if(!(n.display&&Fl(z))){var N=z.hasAttribute("data-v")?z.getAttribute("data-v"):z.hasAttribute("v")?z.getAttribute("v"):Hh(z.innerHTML),B=z.getAttribute("data-z")||z.getAttribute("z");for(m=0;m<h.length;++m){var M=h[m];M.s.c==T+s&&M.s.r<g+i&&g+i<=M.e.r&&(T=M.e.c+1-s,m=-1)}_=+z.getAttribute("colspan")||1,((b=+z.getAttribute("rowspan")||1)>1||_>1)&&h.push({s:{r:g+i,c:T+s},e:{r:g+i+(b||1)-1,c:T+s+(_||1)-1}});var L={t:"s",v:N},W=z.getAttribute("data-t")||z.getAttribute("t")||"";N!=null&&(N.length==0?L.t=W||"z":n.raw||N.trim().length==0||W=="s"||(N==="TRUE"?L={t:"b",v:!0}:N==="FALSE"?L={t:"b",v:!1}:isNaN(Yr(N))?isNaN(wi(N).getDate())||(L={t:"d",v:lr(N)},n.cellDates||(L={t:"n",v:dr(L.v)}),L.z=n.dateNF||Dt[14]):L={t:"n",v:Yr(N)})),L.z===void 0&&B!=null&&(L.z=B);var y="",H=z.getElementsByTagName("A");if(H&&H.length)for(var Q=0;Q<H.length&&!(H[Q].hasAttribute("href")&&(y=H[Q].getAttribute("href"),y.charAt(0)!="#"));++Q);y&&y.charAt(0)!="#"&&(L.l={Target:y}),n.dense?(e[g+i]||(e[g+i]=[]),e[g+i][T+s]=L):e[ct({c:T+s,r:g+i})]=L,u.e.c<T+s&&(u.e.c=T+s),T+=_}}++g}return h.length&&(e["!merges"]=(e["!merges"]||[]).concat(h)),u.e.r=Math.max(u.e.r,g-1+i),e["!ref"]=jt(u),g>=f&&(e["!fullref"]=jt((u.e.r=o.length-v+g-1+i,u))),e}function ku(e,t){var r=t||{},n=r.dense?[]:{};return Du(n,e,t)}function py(e,t){return bn(ku(e,t),t)}function Fl(e){var t="",r=gy(e);return r&&(t=r(e).getPropertyValue("display")),t||(t=e.style&&e.style.display),t==="none"}function gy(e){return e.ownerDocument.defaultView&&typeof e.ownerDocument.defaultView.getComputedStyle=="function"?e.ownerDocument.defaultView.getComputedStyle:typeof getComputedStyle=="function"?getComputedStyle:null}var my=(function(){var e=["<office:master-styles>",'<style:master-page style:name="mp1" style:page-layout-name="mp1">',"<style:header/>",'<style:header-left style:display="false"/>',"<style:footer/>",'<style:footer-left style:display="false"/>',"</style:master-page>","</office:master-styles>"].join(""),t="<office:document-styles "+Si({"xmlns:office":"urn:oasis:names:tc:opendocument:xmlns:office:1.0","xmlns:table":"urn:oasis:names:tc:opendocument:xmlns:table:1.0","xmlns:style":"urn:oasis:names:tc:opendocument:xmlns:style:1.0","xmlns:text":"urn:oasis:names:tc:opendocument:xmlns:text:1.0","xmlns:draw":"urn:oasis:names:tc:opendocument:xmlns:drawing:1.0","xmlns:fo":"urn:oasis:names:tc:opendocument:xmlns:xsl-fo-compatible:1.0","xmlns:xlink":"http://www.w3.org/1999/xlink","xmlns:dc":"http://purl.org/dc/elements/1.1/","xmlns:number":"urn:oasis:names:tc:opendocument:xmlns:datastyle:1.0","xmlns:svg":"urn:oasis:names:tc:opendocument:xmlns:svg-compatible:1.0","xmlns:of":"urn:oasis:names:tc:opendocument:xmlns:of:1.2","office:version":"1.2"})+">"+e+"</office:document-styles>";return function(){return Mt+t}})(),Nl=(function(){var e=function(s){return lt(s).replace(/ +/g,function(a){return'<text:s text:c="'+a.length+'"/>'}).replace(/\t/g,"<text:tab/>").replace(/\n/g,"</text:p><text:p>").replace(/^ /,"<text:s/>").replace(/ $/,"<text:s/>")},t=` <table:table-cell />
60
+ `,r=` <table:covered-table-cell/>
61
+ `,n=function(s,a,o){var f=[];f.push(' <table:table table:name="'+lt(a.SheetNames[o])+`" table:style-name="ta1">
62
+ `);var u=0,d=0,h=Sr(s["!ref"]||"A1"),m=s["!merges"]||[],l=0,v=Array.isArray(s);if(s["!cols"])for(d=0;d<=h.e.c;++d)f.push(" <table:table-column"+(s["!cols"][d]?' table:style-name="co'+s["!cols"][d].ods+'"':"")+`></table:table-column>
63
+ `);var g="",x=s["!rows"]||[];for(u=0;u<h.s.r;++u)g=x[u]?' table:style-name="ro'+x[u].ods+'"':"",f.push(" <table:table-row"+g+`></table:table-row>
64
+ `);for(;u<=h.e.r;++u){for(g=x[u]?' table:style-name="ro'+x[u].ods+'"':"",f.push(" <table:table-row"+g+`>
65
+ `),d=0;d<h.s.c;++d)f.push(t);for(;d<=h.e.c;++d){var T=!1,b={},_="";for(l=0;l!=m.length;++l)if(!(m[l].s.c>d)&&!(m[l].s.r>u)&&!(m[l].e.c<d)&&!(m[l].e.r<u)){(m[l].s.c!=d||m[l].s.r!=u)&&(T=!0),b["table:number-columns-spanned"]=m[l].e.c-m[l].s.c+1,b["table:number-rows-spanned"]=m[l].e.r-m[l].s.r+1;break}if(T){f.push(r);continue}var k=ct({r:u,c:d}),F=v?(s[u]||[])[d]:s[k];if(F&&F.f&&(b["table:formula"]=lt(jm(F.f)),F.F&&F.F.slice(0,k.length)==k)){var z=Sr(F.F);b["table:number-matrix-columns-spanned"]=z.e.c-z.s.c+1,b["table:number-matrix-rows-spanned"]=z.e.r-z.s.r+1}if(!F){f.push(t);continue}switch(F.t){case"b":_=F.v?"TRUE":"FALSE",b["office:value-type"]="boolean",b["office:boolean-value"]=F.v?"true":"false";break;case"n":_=F.w||String(F.v||0),b["office:value-type"]="float",b["office:value"]=F.v||0;break;case"s":case"str":_=F.v==null?"":F.v,b["office:value-type"]="string";break;case"d":_=F.w||lr(F.v).toISOString(),b["office:value-type"]="date",b["office:date-value"]=lr(F.v).toISOString(),b["table:style-name"]="ce1";break;default:f.push(t);continue}var N=e(_);if(F.l&&F.l.Target){var B=F.l.Target;B=B.charAt(0)=="#"?"#"+Mm(B.slice(1)):B,B.charAt(0)!="#"&&!B.match(/^\w+:/)&&(B="../"+B),N=xe("text:a",N,{"xlink:href":B.replace(/&/g,"&amp;")})}f.push(" "+xe("table:table-cell",xe("text:p",N,{}),b)+`
66
+ `)}f.push(` </table:table-row>
67
+ `)}return f.push(` </table:table>
68
+ `),f.join("")},i=function(s,a){s.push(` <office:automatic-styles>
69
+ `),s.push(` <number:date-style style:name="N37" number:automatic-order="true">
70
+ `),s.push(` <number:month number:style="long"/>
71
+ `),s.push(` <number:text>/</number:text>
72
+ `),s.push(` <number:day number:style="long"/>
73
+ `),s.push(` <number:text>/</number:text>
74
+ `),s.push(` <number:year/>
75
+ `),s.push(` </number:date-style>
76
+ `);var o=0;a.SheetNames.map(function(u){return a.Sheets[u]}).forEach(function(u){if(u&&u["!cols"]){for(var d=0;d<u["!cols"].length;++d)if(u["!cols"][d]){var h=u["!cols"][d];if(h.width==null&&h.wpx==null&&h.wch==null)continue;ao(h),h.ods=o;var m=u["!cols"][d].wpx+"px";s.push(' <style:style style:name="co'+o+`" style:family="table-column">
77
+ `),s.push(' <style:table-column-properties fo:break-before="auto" style:column-width="'+m+`"/>
78
+ `),s.push(` </style:style>
79
+ `),++o}}});var f=0;a.SheetNames.map(function(u){return a.Sheets[u]}).forEach(function(u){if(u&&u["!rows"]){for(var d=0;d<u["!rows"].length;++d)if(u["!rows"][d]){u["!rows"][d].ods=f;var h=u["!rows"][d].hpx+"px";s.push(' <style:style style:name="ro'+f+`" style:family="table-row">
80
+ `),s.push(' <style:table-row-properties fo:break-before="auto" style:row-height="'+h+`"/>
81
+ `),s.push(` </style:style>
82
+ `),++f}}}),s.push(` <style:style style:name="ta1" style:family="table" style:master-page-name="mp1">
83
+ `),s.push(` <style:table-properties table:display="true" style:writing-mode="lr-tb"/>
84
+ `),s.push(` </style:style>
85
+ `),s.push(` <style:style style:name="ce1" style:family="table-cell" style:parent-style-name="Default" style:data-style-name="N37"/>
86
+ `),s.push(` </office:automatic-styles>
87
+ `)};return function(a,o){var f=[Mt],u=Si({"xmlns:office":"urn:oasis:names:tc:opendocument:xmlns:office:1.0","xmlns:table":"urn:oasis:names:tc:opendocument:xmlns:table:1.0","xmlns:style":"urn:oasis:names:tc:opendocument:xmlns:style:1.0","xmlns:text":"urn:oasis:names:tc:opendocument:xmlns:text:1.0","xmlns:draw":"urn:oasis:names:tc:opendocument:xmlns:drawing:1.0","xmlns:fo":"urn:oasis:names:tc:opendocument:xmlns:xsl-fo-compatible:1.0","xmlns:xlink":"http://www.w3.org/1999/xlink","xmlns:dc":"http://purl.org/dc/elements/1.1/","xmlns:meta":"urn:oasis:names:tc:opendocument:xmlns:meta:1.0","xmlns:number":"urn:oasis:names:tc:opendocument:xmlns:datastyle:1.0","xmlns:presentation":"urn:oasis:names:tc:opendocument:xmlns:presentation:1.0","xmlns:svg":"urn:oasis:names:tc:opendocument:xmlns:svg-compatible:1.0","xmlns:chart":"urn:oasis:names:tc:opendocument:xmlns:chart:1.0","xmlns:dr3d":"urn:oasis:names:tc:opendocument:xmlns:dr3d:1.0","xmlns:math":"http://www.w3.org/1998/Math/MathML","xmlns:form":"urn:oasis:names:tc:opendocument:xmlns:form:1.0","xmlns:script":"urn:oasis:names:tc:opendocument:xmlns:script:1.0","xmlns:ooo":"http://openoffice.org/2004/office","xmlns:ooow":"http://openoffice.org/2004/writer","xmlns:oooc":"http://openoffice.org/2004/calc","xmlns:dom":"http://www.w3.org/2001/xml-events","xmlns:xforms":"http://www.w3.org/2002/xforms","xmlns:xsd":"http://www.w3.org/2001/XMLSchema","xmlns:xsi":"http://www.w3.org/2001/XMLSchema-instance","xmlns:sheet":"urn:oasis:names:tc:opendocument:sh33tjs:1.0","xmlns:rpt":"http://openoffice.org/2005/report","xmlns:of":"urn:oasis:names:tc:opendocument:xmlns:of:1.2","xmlns:xhtml":"http://www.w3.org/1999/xhtml","xmlns:grddl":"http://www.w3.org/2003/g/data-view#","xmlns:tableooo":"http://openoffice.org/2009/table","xmlns:drawooo":"http://openoffice.org/2010/draw","xmlns:calcext":"urn:org:documentfoundation:names:experimental:calc:xmlns:calcext:1.0","xmlns:loext":"urn:org:documentfoundation:names:experimental:office:xmlns:loext:1.0","xmlns:field":"urn:openoffice:names:experimental:ooo-ms-interop:xmlns:field:1.0","xmlns:formx":"urn:openoffice:names:experimental:ooxml-odf-interop:xmlns:form:1.0","xmlns:css3t":"http://www.w3.org/TR/css3-text/","office:version":"1.2"}),d=Si({"xmlns:config":"urn:oasis:names:tc:opendocument:xmlns:config:1.0","office:mimetype":"application/vnd.oasis.opendocument.spreadsheet"});o.bookType=="fods"?(f.push("<office:document"+u+d+`>
88
+ `),f.push(H0().replace(/office:document-meta/g,"office:meta"))):f.push("<office:document-content"+u+`>
89
+ `),i(f,a),f.push(` <office:body>
90
+ `),f.push(` <office:spreadsheet>
91
+ `);for(var h=0;h!=a.SheetNames.length;++h)f.push(n(a.Sheets[a.SheetNames[h]],a,h));return f.push(` </office:spreadsheet>
92
+ `),f.push(` </office:body>
93
+ `),o.bookType=="fods"?f.push("</office:document>"):f.push("</office:document-content>"),f.join("")}})();function Iu(e,t){if(t.bookType=="fods")return Nl(e,t);var r=Ka(),n="",i=[],s=[];return n="mimetype",Ue(r,n,"application/vnd.oasis.opendocument.spreadsheet"),n="content.xml",Ue(r,n,Nl(e,t)),i.push([n,"text/xml"]),s.push([n,"ContentFile"]),n="styles.xml",Ue(r,n,my(e,t)),i.push([n,"text/xml"]),s.push([n,"StylesFile"]),n="meta.xml",Ue(r,n,Mt+H0()),i.push([n,"text/xml"]),s.push([n,"MetadataFile"]),n="manifest.rdf",Ue(r,n,Op(s)),i.push([n,"application/rdf+xml"]),n="META-INF/manifest.xml",Ue(r,n,Cp(i)),r}/*! sheetjs (C) 2013-present SheetJS -- http://sheetjs.com */function xs(e){return new DataView(e.buffer,e.byteOffset,e.byteLength)}function xy(e){return typeof TextEncoder<"u"?new TextEncoder().encode(e):Nr(Ti(e))}function vy(e,t){e:for(var r=0;r<=e.length-t.length;++r){for(var n=0;n<t.length;++n)if(e[r+n]!=t[n])continue e;return!0}return!1}function ln(e){var t=e.reduce(function(i,s){return i+s.length},0),r=new Uint8Array(t),n=0;return e.forEach(function(i){r.set(i,n),n+=i.length}),r}function yy(e,t,r){var n=Math.floor(r==0?0:Math.LOG10E*Math.log(Math.abs(r)))+6176-20,i=r/Math.pow(10,n-6176);e[t+15]|=n>>7,e[t+14]|=(n&127)<<1;for(var s=0;i>=1;++s,i/=256)e[t+s]=i&255;e[t+15]|=r>=0?0:128}function Ei(e,t){var r=t?t[0]:0,n=e[r]&127;e:if(e[r++]>=128&&(n|=(e[r]&127)<<7,e[r++]<128||(n|=(e[r]&127)<<14,e[r++]<128)||(n|=(e[r]&127)<<21,e[r++]<128)||(n+=(e[r]&127)*Math.pow(2,28),++r,e[r++]<128)||(n+=(e[r]&127)*Math.pow(2,35),++r,e[r++]<128)||(n+=(e[r]&127)*Math.pow(2,42),++r,e[r++]<128)))break e;return t&&(t[0]=r),n}function at(e){var t=new Uint8Array(7);t[0]=e&127;var r=1;e:if(e>127){if(t[r-1]|=128,t[r]=e>>7&127,++r,e<=16383||(t[r-1]|=128,t[r]=e>>14&127,++r,e<=2097151)||(t[r-1]|=128,t[r]=e>>21&127,++r,e<=268435455)||(t[r-1]|=128,t[r]=e/256>>>21&127,++r,e<=34359738367)||(t[r-1]|=128,t[r]=e/65536>>>21&127,++r,e<=4398046511103))break e;t[r-1]|=128,t[r]=e/16777216>>>21&127,++r}return t.slice(0,r)}function Xn(e){var t=0,r=e[t]&127;e:if(e[t++]>=128){if(r|=(e[t]&127)<<7,e[t++]<128||(r|=(e[t]&127)<<14,e[t++]<128)||(r|=(e[t]&127)<<21,e[t++]<128))break e;r|=(e[t]&127)<<28}return r}function $t(e){for(var t=[],r=[0];r[0]<e.length;){var n=r[0],i=Ei(e,r),s=i&7;i=Math.floor(i/8);var a=0,o;if(i==0)break;switch(s){case 0:{for(var f=r[0];e[r[0]++]>=128;);o=e.slice(f,r[0])}break;case 5:a=4,o=e.slice(r[0],r[0]+a),r[0]+=a;break;case 1:a=8,o=e.slice(r[0],r[0]+a),r[0]+=a;break;case 2:a=Ei(e,r),o=e.slice(r[0],r[0]+a),r[0]+=a;break;case 3:case 4:default:throw new Error("PB Type ".concat(s," for Field ").concat(i," at offset ").concat(n))}var u={data:o,type:s};t[i]==null?t[i]=[u]:t[i].push(u)}return t}function Kt(e){var t=[];return e.forEach(function(r,n){r.forEach(function(i){i.data&&(t.push(at(n*8+i.type)),i.type==2&&t.push(at(i.data.length)),t.push(i.data))})}),ln(t)}function Ir(e){for(var t,r=[],n=[0];n[0]<e.length;){var i=Ei(e,n),s=$t(e.slice(n[0],n[0]+i));n[0]+=i;var a={id:Xn(s[1][0].data),messages:[]};s[2].forEach(function(o){var f=$t(o.data),u=Xn(f[3][0].data);a.messages.push({meta:f,data:e.slice(n[0],n[0]+u)}),n[0]+=u}),(t=s[3])!=null&&t[0]&&(a.merge=Xn(s[3][0].data)>>>0>0),r.push(a)}return r}function Nn(e){var t=[];return e.forEach(function(r){var n=[];n[1]=[{data:at(r.id),type:0}],n[2]=[],r.merge!=null&&(n[3]=[{data:at(+!!r.merge),type:0}]);var i=[];r.messages.forEach(function(a){i.push(a.data),a.meta[3]=[{type:0,data:at(a.data.length)}],n[2].push({data:Kt(a.meta),type:2})});var s=Kt(n);t.push(at(s.length)),t.push(s),i.forEach(function(a){return t.push(a)})}),ln(t)}function wy(e,t){if(e!=0)throw new Error("Unexpected Snappy chunk type ".concat(e));for(var r=[0],n=Ei(t,r),i=[];r[0]<t.length;){var s=t[r[0]]&3;if(s==0){var a=t[r[0]++]>>2;if(a<60)++a;else{var o=a-59;a=t[r[0]],o>1&&(a|=t[r[0]+1]<<8),o>2&&(a|=t[r[0]+2]<<16),o>3&&(a|=t[r[0]+3]<<24),a>>>=0,a++,r[0]+=o}i.push(t.slice(r[0],r[0]+a)),r[0]+=a;continue}else{var f=0,u=0;if(s==1?(u=(t[r[0]]>>2&7)+4,f=(t[r[0]++]&224)<<3,f|=t[r[0]++]):(u=(t[r[0]++]>>2)+1,s==2?(f=t[r[0]]|t[r[0]+1]<<8,r[0]+=2):(f=(t[r[0]]|t[r[0]+1]<<8|t[r[0]+2]<<16|t[r[0]+3]<<24)>>>0,r[0]+=4)),i=[ln(i)],f==0)throw new Error("Invalid offset 0");if(f>i[0].length)throw new Error("Invalid offset beyond length");if(u>=f)for(i.push(i[0].slice(-f)),u-=f;u>=i[i.length-1].length;)i.push(i[i.length-1]),u-=i[i.length-1].length;i.push(i[0].slice(-f,-f+u))}}var d=ln(i);if(d.length!=n)throw new Error("Unexpected length: ".concat(d.length," != ").concat(n));return d}function Fr(e){for(var t=[],r=0;r<e.length;){var n=e[r++],i=e[r]|e[r+1]<<8|e[r+2]<<16;r+=3,t.push(wy(n,e.slice(r,r+i))),r+=i}if(r!==e.length)throw new Error("data is not a valid framed stream!");return ln(t)}function Rn(e){for(var t=[],r=0;r<e.length;){var n=Math.min(e.length-r,268435455),i=new Uint8Array(4);t.push(i);var s=at(n),a=s.length;t.push(s),n<=60?(a++,t.push(new Uint8Array([n-1<<2]))):n<=256?(a+=2,t.push(new Uint8Array([240,n-1&255]))):n<=65536?(a+=3,t.push(new Uint8Array([244,n-1&255,n-1>>8&255]))):n<=16777216?(a+=4,t.push(new Uint8Array([248,n-1&255,n-1>>8&255,n-1>>16&255]))):n<=4294967296&&(a+=5,t.push(new Uint8Array([252,n-1&255,n-1>>8&255,n-1>>16&255,n-1>>>24&255]))),t.push(e.slice(r,r+n)),a+=n,i[0]=0,i[1]=a&255,i[2]=a>>8&255,i[3]=a>>16&255,r+=n}return ln(t)}function aa(e,t){var r=new Uint8Array(32),n=xs(r),i=12,s=0;switch(r[0]=5,e.t){case"n":r[1]=2,yy(r,i,e.v),s|=1,i+=16;break;case"b":r[1]=6,n.setFloat64(i,e.v?1:0,!0),s|=2,i+=8;break;case"s":if(t.indexOf(e.v)==-1)throw new Error("Value ".concat(e.v," missing from SST!"));r[1]=3,n.setUint32(i,t.indexOf(e.v),!0),s|=8,i+=4;break;default:throw"unsupported cell type "+e.t}return n.setUint32(8,s,!0),r.slice(0,i)}function oa(e,t){var r=new Uint8Array(32),n=xs(r),i=12,s=0;switch(r[0]=3,e.t){case"n":r[2]=2,n.setFloat64(i,e.v,!0),s|=32,i+=8;break;case"b":r[2]=6,n.setFloat64(i,e.v?1:0,!0),s|=32,i+=8;break;case"s":if(t.indexOf(e.v)==-1)throw new Error("Value ".concat(e.v," missing from SST!"));r[2]=3,n.setUint32(i,t.indexOf(e.v),!0),s|=16,i+=4;break;default:throw"unsupported cell type "+e.t}return n.setUint32(4,s,!0),r.slice(0,i)}function Qr(e){var t=$t(e);return Ei(t[1][0].data)}function Ty(e,t,r){var n,i,s,a;if(!((n=e[6])!=null&&n[0])||!((i=e[7])!=null&&i[0]))throw"Mutation only works on post-BNC storages!";var o=((a=(s=e[8])==null?void 0:s[0])==null?void 0:a.data)&&Xn(e[8][0].data)>0||!1;if(o)throw"Math only works with normal offsets";for(var f=0,u=xs(e[7][0].data),d=0,h=[],m=xs(e[4][0].data),l=0,v=[],g=0;g<t.length;++g){if(t[g]==null){u.setUint16(g*2,65535,!0),m.setUint16(g*2,65535);continue}u.setUint16(g*2,d,!0),m.setUint16(g*2,l,!0);var x,T;switch(typeof t[g]){case"string":x=aa({t:"s",v:t[g]},r),T=oa({t:"s",v:t[g]},r);break;case"number":x=aa({t:"n",v:t[g]},r),T=oa({t:"n",v:t[g]},r);break;case"boolean":x=aa({t:"b",v:t[g]},r),T=oa({t:"b",v:t[g]},r);break;default:throw new Error("Unsupported value "+t[g])}h.push(x),d+=x.length,v.push(T),l+=T.length,++f}for(e[2][0].data=at(f);g<e[7][0].data.length/2;++g)u.setUint16(g*2,65535,!0),m.setUint16(g*2,65535,!0);return e[6][0].data=ln(h),e[3][0].data=ln(v),f}function Sy(e,t){if(!t||!t.numbers)throw new Error("Must pass a `numbers` option -- check the README");var r=e.Sheets[e.SheetNames[0]];e.SheetNames.length>1&&console.error("The Numbers writer currently writes only the first table");var n=Sr(r["!ref"]);n.s.r=n.s.c=0;var i=!1;n.e.c>9&&(i=!0,n.e.c=9),n.e.r>49&&(i=!0,n.e.r=49),i&&console.error("The Numbers writer is currently limited to ".concat(jt(n)));var s=vs(r,{range:n,header:1}),a=["~Sh33tJ5~"];s.forEach(function(j){return j.forEach(function(R){typeof R=="string"&&a.push(R)})});var o={},f=[],u=ht.read(t.numbers,{type:"base64"});u.FileIndex.map(function(j,R){return[j,u.FullPaths[R]]}).forEach(function(j){var R=j[0],P=j[1];if(R.type==2&&R.name.match(/\.iwa/)){var V=R.content,le=Fr(V),fe=Ir(le);fe.forEach(function(ue){f.push(ue.id),o[ue.id]={deps:[],location:P,type:Xn(ue.messages[0].meta[1][0].data)}})}}),f.sort(function(j,R){return j-R});var d=f.filter(function(j){return j>1}).map(function(j){return[j,at(j)]});u.FileIndex.map(function(j,R){return[j,u.FullPaths[R]]}).forEach(function(j){var R=j[0];if(j[1],!!R.name.match(/\.iwa/)){var P=Ir(Fr(R.content));P.forEach(function(V){V.messages.forEach(function(le){d.forEach(function(fe){V.messages.some(function(ue){return Xn(ue.meta[1][0].data)!=11006&&vy(ue.data,fe[1])})&&o[fe[0]].deps.push(V.id)})})})}});for(var h=ht.find(u,o[1].location),m=Ir(Fr(h.content)),l,v=0;v<m.length;++v){var g=m[v];g.id==1&&(l=g)}var x=Qr($t(l.messages[0].data)[1][0].data);for(h=ht.find(u,o[x].location),m=Ir(Fr(h.content)),v=0;v<m.length;++v)g=m[v],g.id==x&&(l=g);for(x=Qr($t(l.messages[0].data)[2][0].data),h=ht.find(u,o[x].location),m=Ir(Fr(h.content)),v=0;v<m.length;++v)g=m[v],g.id==x&&(l=g);for(x=Qr($t(l.messages[0].data)[2][0].data),h=ht.find(u,o[x].location),m=Ir(Fr(h.content)),v=0;v<m.length;++v)g=m[v],g.id==x&&(l=g);var T=$t(l.messages[0].data);{T[6][0].data=at(n.e.r+1),T[7][0].data=at(n.e.c+1);var b=Qr(T[46][0].data),_=ht.find(u,o[b].location),k=Ir(Fr(_.content));{for(var F=0;F<k.length&&k[F].id!=b;++F);if(k[F].id!=b)throw"Bad ColumnRowUIDMapArchive";var z=$t(k[F].messages[0].data);z[1]=[],z[2]=[],z[3]=[];for(var N=0;N<=n.e.c;++N){var B=[];B[1]=B[2]=[{type:0,data:at(N+420690)}],z[1].push({type:2,data:Kt(B)}),z[2].push({type:0,data:at(N)}),z[3].push({type:0,data:at(N)})}z[4]=[],z[5]=[],z[6]=[];for(var M=0;M<=n.e.r;++M)B=[],B[1]=B[2]=[{type:0,data:at(M+726270)}],z[4].push({type:2,data:Kt(B)}),z[5].push({type:0,data:at(M)}),z[6].push({type:0,data:at(M)});k[F].messages[0].data=Kt(z)}_.content=Rn(Nn(k)),_.size=_.content.length,delete T[46];var L=$t(T[4][0].data);{L[7][0].data=at(n.e.r+1);var W=$t(L[1][0].data),y=Qr(W[2][0].data);_=ht.find(u,o[y].location),k=Ir(Fr(_.content));{if(k[0].id!=y)throw"Bad HeaderStorageBucket";var H=$t(k[0].messages[0].data);for(M=0;M<s.length;++M){var Q=$t(H[2][0].data);Q[1][0].data=at(M),Q[4][0].data=at(s[M].length),H[2][M]={type:H[2][0].type,data:Kt(Q)}}k[0].messages[0].data=Kt(H)}_.content=Rn(Nn(k)),_.size=_.content.length;var J=Qr(L[2][0].data);_=ht.find(u,o[J].location),k=Ir(Fr(_.content));{if(k[0].id!=J)throw"Bad HeaderStorageBucket";for(H=$t(k[0].messages[0].data),N=0;N<=n.e.c;++N)Q=$t(H[2][0].data),Q[1][0].data=at(N),Q[4][0].data=at(n.e.r+1),H[2][N]={type:H[2][0].type,data:Kt(Q)};k[0].messages[0].data=Kt(H)}_.content=Rn(Nn(k)),_.size=_.content.length;var ee=Qr(L[4][0].data);(function(){for(var j=ht.find(u,o[ee].location),R=Ir(Fr(j.content)),P,V=0;V<R.length;++V){var le=R[V];le.id==ee&&(P=le)}var fe=$t(P.messages[0].data);{fe[3]=[];var ue=[];a.forEach(function(ae,Pe){ue[1]=[{type:0,data:at(Pe)}],ue[2]=[{type:0,data:at(1)}],ue[3]=[{type:2,data:xy(ae)}],fe[3].push({type:2,data:Kt(ue)})})}P.messages[0].data=Kt(fe);var te=Nn(R),Ie=Rn(te);j.content=Ie,j.size=j.content.length})();var _e=$t(L[3][0].data);{var Ae=_e[1][0];delete _e[2];var De=$t(Ae.data);{var oe=Qr(De[2][0].data);(function(){for(var j=ht.find(u,o[oe].location),R=Ir(Fr(j.content)),P,V=0;V<R.length;++V){var le=R[V];le.id==oe&&(P=le)}var fe=$t(P.messages[0].data);{delete fe[6],delete _e[7];var ue=new Uint8Array(fe[5][0].data);fe[5]=[];for(var te=0,Ie=0;Ie<=n.e.r;++Ie){var ae=$t(ue);te+=Ty(ae,s[Ie],a),ae[1][0].data=at(Ie),fe[5].push({data:Kt(ae),type:2})}fe[1]=[{type:0,data:at(n.e.c+1)}],fe[2]=[{type:0,data:at(n.e.r+1)}],fe[3]=[{type:0,data:at(te)}],fe[4]=[{type:0,data:at(n.e.r+1)}]}P.messages[0].data=Kt(fe);var Pe=Nn(R),ke=Rn(Pe);j.content=ke,j.size=j.content.length})()}Ae.data=Kt(De)}L[3][0].data=Kt(_e)}T[4][0].data=Kt(L)}l.messages[0].data=Kt(T);var ce=Nn(m),C=Rn(ce);return h.content=C,h.size=h.content.length,u}function Ey(e){return function(r){for(var n=0;n!=e.length;++n){var i=e[n];r[i[0]]===void 0&&(r[i[0]]=i[1]),i[2]==="n"&&(r[i[0]]=Number(r[i[0]]))}}}function fo(e){Ey([["cellDates",!1],["bookSST",!1],["bookType","xlsx"],["compression",!1],["WTF",!1]])(e)}function _y(e,t){return t.bookType=="ods"?Iu(e,t):t.bookType=="numbers"?Sy(e,t):t.bookType=="xlsb"?by(e,t):Cy(e,t)}function by(e,t){zn=1024,e&&!e.SSF&&(e.SSF=hr(Dt)),e&&e.SSF&&(bs(),_s(e.SSF),t.revssf=Cs(e.SSF),t.revssf[e.SSF[65535]]=0,t.ssf=e.SSF),t.rels={},t.wbrels={},t.Strings=[],t.Strings.Count=0,t.Strings.Unique=0,gi?t.revStrings=new Map:(t.revStrings={},t.revStrings.foo=[],delete t.revStrings.foo);var r=t.bookType=="xlsb"?"bin":"xml",n=hu.indexOf(t.bookType)>-1,i=W0();fo(t=t||{});var s=Ka(),a="",o=0;if(t.cellXfs=[],un(t.cellXfs,{},{revssf:{General:0}}),e.Props||(e.Props={}),a="docProps/core.xml",Ue(s,a,G0(e.Props,t)),i.coreprops.push(a),ot(t.rels,2,a,Ke.CORE_PROPS),a="docProps/app.xml",!(e.Props&&e.Props.SheetNames))if(!e.Workbook||!e.Workbook.Sheets)e.Props.SheetNames=e.SheetNames;else{for(var f=[],u=0;u<e.SheetNames.length;++u)(e.Workbook.Sheets[u]||{}).Hidden!=2&&f.push(e.SheetNames[u]);e.Props.SheetNames=f}for(e.Props.Worksheets=e.Props.SheetNames.length,Ue(s,a,X0(e.Props)),i.extprops.push(a),ot(t.rels,3,a,Ke.EXT_PROPS),e.Custprops!==e.Props&&er(e.Custprops||{}).length>0&&(a="docProps/custom.xml",Ue(s,a,K0(e.Custprops)),i.custprops.push(a),ot(t.rels,4,a,Ke.CUST_PROPS)),o=1;o<=e.SheetNames.length;++o){var d={"!id":{}},h=e.Sheets[e.SheetNames[o-1]],m=(h||{})["!type"]||"sheet";switch(m){case"chart":default:a="xl/worksheets/sheet"+o+"."+r,Ue(s,a,Ov(o-1,a,t,e,d)),i.sheets.push(a),ot(t.wbrels,-1,"worksheets/sheet"+o+"."+r,Ke.WS[0])}if(h){var l=h["!comments"],v=!1,g="";l&&l.length>0&&(g="xl/comments"+o+"."+r,Ue(s,g,Iv(l,g)),i.comments.push(g),ot(d,-1,"../comments"+o+"."+r,Ke.CMNT),v=!0),h["!legacy"]&&v&&Ue(s,"xl/drawings/vmlDrawing"+o+".vml",fu(o,h["!comments"])),delete h["!comments"],delete h["!legacy"]}d["!id"].rId1&&Ue(s,z0(a),Gn(d))}return t.Strings!=null&&t.Strings.length>0&&(a="xl/sharedStrings."+r,Ue(s,a,kv(t.Strings,a,t)),i.strs.push(a),ot(t.wbrels,-1,"sharedStrings."+r,Ke.SST)),a="xl/workbook."+r,Ue(s,a,Av(e,a)),i.workbooks.push(a),ot(t.rels,1,a,Ke.WB),a="xl/theme/theme1.xml",Ue(s,a,cu(e.Themes,t)),i.themes.push(a),ot(t.wbrels,-1,"theme/theme1.xml",Ke.THEME),a="xl/styles."+r,Ue(s,a,Dv(e,a,t)),i.styles.push(a),ot(t.wbrels,-1,"styles."+r,Ke.STY),e.vbaraw&&n&&(a="xl/vbaProject.bin",Ue(s,a,e.vbaraw),i.vba.push(a),ot(t.wbrels,-1,"vbaProject.bin",Ke.VBA)),a="xl/metadata."+r,Ue(s,a,Fv(a)),i.metadata.push(a),ot(t.wbrels,-1,"metadata."+r,Ke.XLMETA),Ue(s,"[Content_Types].xml",V0(i,t)),Ue(s,"_rels/.rels",Gn(t.rels)),Ue(s,"xl/_rels/workbook."+r+".rels",Gn(t.wbrels)),delete t.revssf,delete t.ssf,s}function Cy(e,t){zn=1024,e&&!e.SSF&&(e.SSF=hr(Dt)),e&&e.SSF&&(bs(),_s(e.SSF),t.revssf=Cs(e.SSF),t.revssf[e.SSF[65535]]=0,t.ssf=e.SSF),t.rels={},t.wbrels={},t.Strings=[],t.Strings.Count=0,t.Strings.Unique=0,gi?t.revStrings=new Map:(t.revStrings={},t.revStrings.foo=[],delete t.revStrings.foo);var r="xml",n=hu.indexOf(t.bookType)>-1,i=W0();fo(t=t||{});var s=Ka(),a="",o=0;if(t.cellXfs=[],un(t.cellXfs,{},{revssf:{General:0}}),e.Props||(e.Props={}),a="docProps/core.xml",Ue(s,a,G0(e.Props,t)),i.coreprops.push(a),ot(t.rels,2,a,Ke.CORE_PROPS),a="docProps/app.xml",!(e.Props&&e.Props.SheetNames))if(!e.Workbook||!e.Workbook.Sheets)e.Props.SheetNames=e.SheetNames;else{for(var f=[],u=0;u<e.SheetNames.length;++u)(e.Workbook.Sheets[u]||{}).Hidden!=2&&f.push(e.SheetNames[u]);e.Props.SheetNames=f}e.Props.Worksheets=e.Props.SheetNames.length,Ue(s,a,X0(e.Props)),i.extprops.push(a),ot(t.rels,3,a,Ke.EXT_PROPS),e.Custprops!==e.Props&&er(e.Custprops||{}).length>0&&(a="docProps/custom.xml",Ue(s,a,K0(e.Custprops)),i.custprops.push(a),ot(t.rels,4,a,Ke.CUST_PROPS));var d=["SheetJ5"];for(t.tcid=0,o=1;o<=e.SheetNames.length;++o){var h={"!id":{}},m=e.Sheets[e.SheetNames[o-1]],l=(m||{})["!type"]||"sheet";switch(l){case"chart":default:a="xl/worksheets/sheet"+o+"."+r,Ue(s,a,Su(o-1,t,e,h)),i.sheets.push(a),ot(t.wbrels,-1,"worksheets/sheet"+o+"."+r,Ke.WS[0])}if(m){var v=m["!comments"],g=!1,x="";if(v&&v.length>0){var T=!1;v.forEach(function(b){b[1].forEach(function(_){_.T==!0&&(T=!0)})}),T&&(x="xl/threadedComments/threadedComment"+o+"."+r,Ue(s,x,n1(v,d,t)),i.threadedcomments.push(x),ot(h,-1,"../threadedComments/threadedComment"+o+"."+r,Ke.TCMNT)),x="xl/comments"+o+"."+r,Ue(s,x,du(v)),i.comments.push(x),ot(h,-1,"../comments"+o+"."+r,Ke.CMNT),g=!0}m["!legacy"]&&g&&Ue(s,"xl/drawings/vmlDrawing"+o+".vml",fu(o,m["!comments"])),delete m["!comments"],delete m["!legacy"]}h["!id"].rId1&&Ue(s,z0(a),Gn(h))}return t.Strings!=null&&t.Strings.length>0&&(a="xl/sharedStrings."+r,Ue(s,a,nu(t.Strings,t)),i.strs.push(a),ot(t.wbrels,-1,"sharedStrings."+r,Ke.SST)),a="xl/workbook."+r,Ue(s,a,bu(e)),i.workbooks.push(a),ot(t.rels,1,a,Ke.WB),a="xl/theme/theme1.xml",Ue(s,a,cu(e.Themes,t)),i.themes.push(a),ot(t.wbrels,-1,"theme/theme1.xml",Ke.THEME),a="xl/styles."+r,Ue(s,a,ou(e,t)),i.styles.push(a),ot(t.wbrels,-1,"styles."+r,Ke.STY),e.vbaraw&&n&&(a="xl/vbaProject.bin",Ue(s,a,e.vbaraw),i.vba.push(a),ot(t.wbrels,-1,"vbaProject.bin",Ke.VBA)),a="xl/metadata."+r,Ue(s,a,uu()),i.metadata.push(a),ot(t.wbrels,-1,"metadata."+r,Ke.XLMETA),d.length>1&&(a="xl/persons/person.xml",Ue(s,a,i1(d)),i.people.push(a),ot(t.wbrels,-1,"persons/person.xml",Ke.PEOPLE)),Ue(s,"[Content_Types].xml",V0(i,t)),Ue(s,"_rels/.rels",Gn(t.rels)),Ue(s,"xl/_rels/workbook."+r+".rels",Gn(t.wbrels)),delete t.revssf,delete t.ssf,s}function Ay(e,t){var r="";switch((t||{}).type||"base64"){case"buffer":return[e[0],e[1],e[2],e[3],e[4],e[5],e[6],e[7]];case"base64":r=Kr(e.slice(0,12));break;case"binary":r=e;break;case"array":return[e[0],e[1],e[2],e[3],e[4],e[5],e[6],e[7]];default:throw new Error("Unrecognized type "+(t&&t.type||"undefined"))}return[r.charCodeAt(0),r.charCodeAt(1),r.charCodeAt(2),r.charCodeAt(3),r.charCodeAt(4),r.charCodeAt(5),r.charCodeAt(6),r.charCodeAt(7)]}function Fu(e,t){switch(t.type){case"base64":case"binary":break;case"buffer":case"array":t.type="";break;case"file":return Di(t.file,ht.write(e,{type:Ze?"buffer":""}));case"string":throw new Error("'string' output type invalid for '"+t.bookType+"' files");default:throw new Error("Unrecognized type "+t.type)}return ht.write(e,t)}function Oy(e,t){var r=hr(t||{}),n=_y(e,r);return Dy(n,r)}function Dy(e,t){var r={},n=Ze?"nodebuffer":typeof Uint8Array<"u"?"array":"string";if(t.compression&&(r.compression="DEFLATE"),t.password)r.type=n;else switch(t.type){case"base64":r.type="base64";break;case"binary":r.type="string";break;case"string":throw new Error("'string' output type invalid for '"+t.bookType+"' files");case"buffer":case"file":r.type=n;break;default:throw new Error("Unrecognized type "+t.type)}var i=e.FullPaths?ht.write(e,{fileType:"zip",type:{nodebuffer:"buffer",string:"binary"}[r.type]||r.type,compression:!!t.compression}):e.generate(r);if(typeof Deno<"u"&&typeof i=="string"){if(t.type=="binary"||t.type=="base64")return i;i=new Uint8Array(Es(i))}return t.password&&typeof encrypt_agile<"u"?Fu(encrypt_agile(i,t.password),t):t.type==="file"?Di(t.file,i):t.type=="string"?fi(i):i}function ky(e,t){var r=t||{},n=Gv(e,r);return Fu(n,r)}function Ur(e,t,r){r||(r="");var n=r+e;switch(t.type){case"base64":return yi(Ti(n));case"binary":return Ti(n);case"string":return e;case"file":return Di(t.file,n,"utf8");case"buffer":return Ze?Zr(n,"utf8"):typeof TextEncoder<"u"?new TextEncoder().encode(n):Ur(n,{type:"binary"}).split("").map(function(i){return i.charCodeAt(0)})}throw new Error("Unrecognized type "+t.type)}function Iy(e,t){switch(t.type){case"base64":return yi(e);case"binary":return e;case"string":return e;case"file":return Di(t.file,e,"binary");case"buffer":return Ze?Zr(e,"binary"):e.split("").map(function(r){return r.charCodeAt(0)})}throw new Error("Unrecognized type "+t.type)}function Gi(e,t){switch(t.type){case"string":case"base64":case"binary":for(var r="",n=0;n<e.length;++n)r+=String.fromCharCode(e[n]);return t.type=="base64"?yi(r):t.type=="string"?fi(r):r;case"file":return Di(t.file,e);case"buffer":return e;default:throw new Error("Unrecognized type "+t.type)}}function Nu(e,t){sh(),mv(e);var r=hr(t||{});if(r.cellStyles&&(r.cellNF=!0,r.sheetStubs=!0),r.type=="array"){r.type="binary";var n=Nu(e,r);return r.type="array",Es(n)}var i=0;if(r.sheet&&(typeof r.sheet=="number"?i=r.sheet:i=e.SheetNames.indexOf(r.sheet),!e.SheetNames[i]))throw new Error("Sheet not found: "+r.sheet+" : "+typeof r.sheet);switch(r.bookType||"xlsb"){case"xml":case"xlml":return Ur(zv(e,r),r);case"slk":case"sylk":return Ur(hg.from_sheet(e.Sheets[e.SheetNames[i]],r),r);case"htm":case"html":return Ur(Ou(e.Sheets[e.SheetNames[i]],r),r);case"txt":return Iy(Ru(e.Sheets[e.SheetNames[i]],r),r);case"csv":return Ur(ho(e.Sheets[e.SheetNames[i]],r),r,"\uFEFF");case"dif":return Ur(pg.from_sheet(e.Sheets[e.SheetNames[i]],r),r);case"dbf":return Gi(dg.from_sheet(e.Sheets[e.SheetNames[i]],r),r);case"prn":return Ur(gg.from_sheet(e.Sheets[e.SheetNames[i]],r),r);case"rtf":return Ur(Sg.from_sheet(e.Sheets[e.SheetNames[i]],r),r);case"eth":return Ur(ru.from_sheet(e.Sheets[e.SheetNames[i]],r),r);case"fods":return Ur(Iu(e,r),r);case"wk1":return Gi(Cl.sheet_to_wk1(e.Sheets[e.SheetNames[i]],r),r);case"wk3":return Gi(Cl.book_to_wk3(e,r),r);case"biff2":r.biff||(r.biff=2);case"biff3":r.biff||(r.biff=3);case"biff4":return r.biff||(r.biff=4),Gi(Au(e,r),r);case"biff5":r.biff||(r.biff=5);case"biff8":case"xla":case"xls":return r.biff||(r.biff=8),ky(e,r);case"xlsx":case"xlsm":case"xlam":case"xlsb":case"numbers":case"ods":return Oy(e,r);default:throw new Error("Unrecognized bookType |"+r.bookType+"|")}}function Fy(e){if(!e.bookType){var t={xls:"biff8",htm:"html",slk:"sylk",socialcalc:"eth",Sh33tJS:"WTF"},r=e.file.slice(e.file.lastIndexOf(".")).toLowerCase();r.match(/^\.[a-z]+$/)&&(e.bookType=r.slice(1)),e.bookType=t[e.bookType]||e.bookType}}function Ny(e,t,r){var n={};return n.type="file",n.file=t,Fy(n),Nu(e,n)}function Ry(e,t,r,n,i,s,a,o){var f=Qt(r),u=o.defval,d=o.raw||!Object.prototype.hasOwnProperty.call(o,"raw"),h=!0,m=i===1?[]:{};if(i!==1)if(Object.defineProperty)try{Object.defineProperty(m,"__rowNum__",{value:r,enumerable:!1})}catch{m.__rowNum__=r}else m.__rowNum__=r;if(!a||e[r])for(var l=t.s.c;l<=t.e.c;++l){var v=a?e[r][l]:e[n[l]+f];if(v===void 0||v.t===void 0){if(u===void 0)continue;s[l]!=null&&(m[s[l]]=u);continue}var g=v.v;switch(v.t){case"z":if(g==null)break;continue;case"e":g=g==0?null:void 0;break;case"s":case"d":case"b":case"n":break;default:throw new Error("unrecognized type "+v.t)}if(s[l]!=null){if(g==null)if(v.t=="e"&&g===null)m[s[l]]=null;else if(u!==void 0)m[s[l]]=u;else if(d&&g===null)m[s[l]]=null;else continue;else m[s[l]]=d&&(v.t!=="n"||v.t==="n"&&o.rawNumbers!==!1)?g:qr(v,g,o);g!=null&&(h=!1)}}return{row:m,isempty:h}}function vs(e,t){if(e==null||e["!ref"]==null)return[];var r={t:"n",v:0},n=0,i=1,s=[],a=0,o="",f={s:{r:0,c:0},e:{r:0,c:0}},u=t||{},d=u.range!=null?u.range:e["!ref"];switch(u.header===1?n=1:u.header==="A"?n=2:Array.isArray(u.header)?n=3:u.header==null&&(n=0),typeof d){case"string":f=wt(d);break;case"number":f=wt(e["!ref"]),f.s.r=d;break;default:f=d}n>0&&(i=0);var h=Qt(f.s.r),m=[],l=[],v=0,g=0,x=Array.isArray(e),T=f.s.r,b=0,_={};x&&!e[T]&&(e[T]=[]);var k=u.skipHidden&&e["!cols"]||[],F=u.skipHidden&&e["!rows"]||[];for(b=f.s.c;b<=f.e.c;++b)if(!(k[b]||{}).hidden)switch(m[b]=rr(b),r=x?e[T][b]:e[m[b]+h],n){case 1:s[b]=b-f.s.c;break;case 2:s[b]=m[b];break;case 3:s[b]=u.header[b-f.s.c];break;default:if(r==null&&(r={w:"__EMPTY",t:"s"}),o=a=qr(r,null,u),g=_[a]||0,!g)_[a]=1;else{do o=a+"_"+g++;while(_[o]);_[a]=g,_[o]=1}s[b]=o}for(T=f.s.r+i;T<=f.e.r;++T)if(!(F[T]||{}).hidden){var z=Ry(e,f,T,m,n,s,x,u);(z.isempty===!1||(n===1?u.blankrows!==!1:u.blankrows))&&(l[v++]=z.row)}return l.length=v,l}var Rl=/"/g;function Py(e,t,r,n,i,s,a,o){for(var f=!0,u=[],d="",h=Qt(r),m=t.s.c;m<=t.e.c;++m)if(n[m]){var l=o.dense?(e[r]||[])[m]:e[n[m]+h];if(l==null)d="";else if(l.v!=null){f=!1,d=""+(o.rawNumbers&&l.t=="n"?l.v:qr(l,null,o));for(var v=0,g=0;v!==d.length;++v)if((g=d.charCodeAt(v))===i||g===s||g===34||o.forceQuotes){d='"'+d.replace(Rl,'""')+'"';break}d=="ID"&&(d='"ID"')}else l.f!=null&&!l.F?(f=!1,d="="+l.f,d.indexOf(",")>=0&&(d='"'+d.replace(Rl,'""')+'"')):d="";u.push(d)}return o.blankrows===!1&&f?null:u.join(a)}function ho(e,t){var r=[],n=t??{};if(e==null||e["!ref"]==null)return"";var i=wt(e["!ref"]),s=n.FS!==void 0?n.FS:",",a=s.charCodeAt(0),o=n.RS!==void 0?n.RS:`
94
+ `,f=o.charCodeAt(0),u=new RegExp((s=="|"?"\\|":s)+"+$"),d="",h=[];n.dense=Array.isArray(e);for(var m=n.skipHidden&&e["!cols"]||[],l=n.skipHidden&&e["!rows"]||[],v=i.s.c;v<=i.e.c;++v)(m[v]||{}).hidden||(h[v]=rr(v));for(var g=0,x=i.s.r;x<=i.e.r;++x)(l[x]||{}).hidden||(d=Py(e,i,x,h,a,f,s,n),d!=null&&(n.strip&&(d=d.replace(u,"")),(d||n.blankrows!==!1)&&r.push((g++?o:"")+d)));return delete n.dense,r.join("")}function Ru(e,t){t||(t={}),t.FS=" ",t.RS=`
95
+ `;var r=ho(e,t);return r}function jy(e){var t="",r,n="";if(e==null||e["!ref"]==null)return[];var i=wt(e["!ref"]),s="",a=[],o,f=[],u=Array.isArray(e);for(o=i.s.c;o<=i.e.c;++o)a[o]=rr(o);for(var d=i.s.r;d<=i.e.r;++d)for(s=Qt(d),o=i.s.c;o<=i.e.c;++o)if(t=a[o]+s,r=u?(e[d]||[])[o]:e[t],n="",r!==void 0){if(r.F!=null){if(t=r.F,!r.f)continue;n=r.f,t.indexOf(":")==-1&&(t=t+":"+t)}if(r.f!=null)n=r.f;else{if(r.t=="z")continue;if(r.t=="n"&&r.v!=null)n=""+r.v;else if(r.t=="b")n=r.v?"TRUE":"FALSE";else if(r.w!==void 0)n="'"+r.w;else{if(r.v===void 0)continue;r.t=="s"?n="'"+r.v:n=""+r.v}}f[f.length]=t+"="+n}return f}function Pu(e,t,r){var n=r||{},i=+!n.skipHeader,s=e||{},a=0,o=0;if(s&&n.origin!=null)if(typeof n.origin=="number")a=n.origin;else{var f=typeof n.origin=="string"?Vt(n.origin):n.origin;a=f.r,o=f.c}var u,d={s:{c:0,r:0},e:{c:o,r:a+t.length-1+i}};if(s["!ref"]){var h=wt(s["!ref"]);d.e.c=Math.max(d.e.c,h.e.c),d.e.r=Math.max(d.e.r,h.e.r),a==-1&&(a=h.e.r+1,d.e.r=a+t.length-1+i)}else a==-1&&(a=0,d.e.r=t.length-1+i);var m=n.header||[],l=0;t.forEach(function(g,x){er(g).forEach(function(T){(l=m.indexOf(T))==-1&&(m[l=m.length]=T);var b=g[T],_="z",k="",F=ct({c:o+l,r:a+x+i});u=_i(s,F),b&&typeof b=="object"&&!(b instanceof Date)?s[F]=b:(typeof b=="number"?_="n":typeof b=="boolean"?_="b":typeof b=="string"?_="s":b instanceof Date?(_="d",n.cellDates||(_="n",b=dr(b)),k=n.dateNF||Dt[14]):b===null&&n.nullError&&(_="e",b=0),u?(u.t=_,u.v=b,delete u.w,delete u.R,k&&(u.z=k)):s[F]=u={t:_,v:b},k&&(u.z=k))})}),d.e.c=Math.max(d.e.c,o+m.length-1);var v=Qt(a);if(i)for(l=0;l<m.length;++l)s[rr(l+o)+v]={t:"s",v:m[l]};return s["!ref"]=jt(d),s}function My(e,t){return Pu(null,e,t)}function _i(e,t,r){if(typeof t=="string"){if(Array.isArray(e)){var n=Vt(t);return e[n.r]||(e[n.r]=[]),e[n.r][n.c]||(e[n.r][n.c]={t:"z"})}return e[t]||(e[t]={t:"z"})}return typeof t!="number"?_i(e,ct(t)):_i(e,ct({r:t,c:r||0}))}function Ly(e,t){if(typeof t=="number"){if(t>=0&&e.SheetNames.length>t)return t;throw new Error("Cannot find sheet # "+t)}else if(typeof t=="string"){var r=e.SheetNames.indexOf(t);if(r>-1)return r;throw new Error("Cannot find sheet name |"+t+"|")}else throw new Error("Cannot find sheet |"+t+"|")}function By(){return{SheetNames:[],Sheets:{}}}function $y(e,t,r,n){var i=1;if(!r)for(;i<=65535&&e.SheetNames.indexOf(r="Sheet"+i)!=-1;++i,r=void 0);if(!r||e.SheetNames.length>=65535)throw new Error("Too many worksheets");if(n&&e.SheetNames.indexOf(r)>=0){var s=r.match(/(^.*?)(\d+)$/);i=s&&+s[2]||0;var a=s&&s[1]||r;for(++i;i<=65535&&e.SheetNames.indexOf(r=a+i)!=-1;++i);}if(_u(r),e.SheetNames.indexOf(r)>=0)throw new Error("Worksheet with name |"+r+"| already exists!");return e.SheetNames.push(r),e.Sheets[r]=t,r}function Uy(e,t,r){e.Workbook||(e.Workbook={}),e.Workbook.Sheets||(e.Workbook.Sheets=[]);var n=Ly(e,t);switch(e.Workbook.Sheets[n]||(e.Workbook.Sheets[n]={}),r){case 0:case 1:case 2:break;default:throw new Error("Bad sheet visibility setting "+r)}e.Workbook.Sheets[n].Hidden=r}function Wy(e,t){return e.z=t,e}function ju(e,t,r){return t?(e.l={Target:t},r&&(e.l.Tooltip=r)):delete e.l,e}function Vy(e,t,r){return ju(e,"#"+t,r)}function zy(e,t,r){e.c||(e.c=[]),e.c.push({t,a:r||"SheetJS"})}function Hy(e,t,r,n){for(var i=typeof t!="string"?t:wt(t),s=typeof t=="string"?t:jt(t),a=i.s.r;a<=i.e.r;++a)for(var o=i.s.c;o<=i.e.c;++o){var f=_i(e,a,o);f.t="n",f.F=s,delete f.v,a==i.s.r&&o==i.s.c&&(f.f=r,n&&(f.D=!0))}return e}var la={encode_col:rr,encode_row:Qt,encode_cell:ct,encode_range:jt,decode_col:to,decode_row:eo,split_cell:sp,decode_cell:Vt,decode_range:Sr,format_cell:qr,sheet_add_aoa:j0,sheet_add_json:Pu,sheet_add_dom:Du,aoa_to_sheet:Zn,json_to_sheet:My,table_to_sheet:ku,table_to_book:py,sheet_to_csv:ho,sheet_to_txt:Ru,sheet_to_json:vs,sheet_to_html:Ou,sheet_to_formulae:jy,sheet_to_row_object_array:vs,sheet_get_cell:_i,book_new:By,book_append_sheet:$y,book_set_sheet_visibility:Uy,cell_set_number_format:Wy,cell_set_hyperlink:ju,cell_set_internal_link:Vy,cell_add_comment:zy,sheet_set_array_formula:Hy,consts:{SHEET_VISIBLE:0,SHEET_HIDDEN:1,SHEET_VERY_HIDDEN:2}};function Is(e,t,r=0){const n=[];for(const i of e){const s=t.includes(i.key);if(n.push({type:"group",key:i.key,level:r,column:i.column,value:i.value,rowCount:i.rowCount,aggregates:i.aggregates,collapsed:s}),!s&&i.children&&i.children.length>0){const a=i.children[0];if(Gy(a)){const o=i.children,f=Is(o,t,r+1);n.push(...f)}else{const o=i.children;for(const f of o)n.push({type:"row",parentGroupKey:i.key,level:r+1,data:f})}}}return n}function Gy(e){return e&&typeof e=="object"&&"key"in e&&"level"in e&&"column"in e&&"value"in e&&"rowCount"in e&&"aggregates"in e&&"children"in e}function po(e){return e.filter(t=>t.type==="row").map(t=>t.type==="row"?t.data:null).filter(t=>t!==null)}function go(e,t){const r=new Date,n=r.getFullYear(),i=String(r.getMonth()+1).padStart(2,"0"),s=String(r.getDate()).padStart(2,"0"),a=`${n}-${i}-${s}`;return`${e.toLowerCase().replace(/[^a-z0-9]+/g,"_").replace(/^_+|_+$/g,"")}_${a}.${t}`}function Pl(e,t,r,n,i,s,a){let o,f;s?(o={...s},f=a||t.map(d=>d.name)):i?(o={...i.snapshot.columnVisibility},f=a||[...i.snapshot.columnOrder]):(o={},f=[],t.forEach(d=>{o[d.name]=!0,f.push(d.name)}));const u=Object.entries(o).filter(([d,h])=>!h).map(([d,h])=>d);return{data:e,schema:t,appliedFilters:r,appliedSortStack:n,columnVisibility:o,columnOrder:f,grouping:(i==null?void 0:i.snapshot.grouping)??null,hiddenColumns:u,viewMeta:i?{id:i.id,name:i.name,isDefault:i.isDefault}:void 0}}function jl(e,t="export",r){const{data:n,columnOrder:i,grouping:s}=e,a=i.filter(h=>e.columnVisibility[h]);let o;if(s&&s.enabled){const h=Is(n);o=po(h)}else o=n;const f=a.join(","),u=o.map(h=>a.map(m=>{const l=h[m];if(l==null)return"";const v=String(l);return v.includes(",")||v.includes('"')||v.includes(`
96
+ `)?`"${v.replace(/"/g,'""')}"`:v}).join(",")),d=[f,...u].join(`
97
+ `);Mu(d,go(t,"csv"),"text/csv;charset=utf-8;")}function Ml(e,t="export",r){const{data:n,columnOrder:i,grouping:s}=e,a=i.filter(h=>e.columnVisibility[h]);let o;if(s&&s.enabled){const h=Is(n);o=po(h)}else o=n;const f=[a,...o.map(h=>a.map(m=>h[m]??""))],u=la.aoa_to_sheet(f),d=la.book_new();la.book_append_sheet(d,u,"Data"),Ny(d,go(t,"xlsx"))}function Ll(e,t="export",r){const{data:n,appliedFilters:i,appliedSortStack:s,viewMeta:a,hiddenColumns:o,columnOrder:f,grouping:u}=e;let d;if(u&&u.enabled){const l=Is(n);d=po(l)}else d=n;const h={meta:{exportedAt:new Date().toISOString(),reportName:t,view:(a==null?void 0:a.name)||"Default View",filters:i.map(l=>({field:l.column,operator:l.operator,value:l.value})),sortStack:s.map(l=>({field:l.column,direction:l.direction,priority:l.priority})),grouping:u||{},hiddenColumns:o,columnOrder:f,exportConfig:r||{scope:"visible"}},data:d},m=JSON.stringify(h,null,2);Mu(m,go(t,"json"),"application/json;charset=utf-8;")}function Mu(e,t,r){const n=new Blob([e],{type:r}),i=URL.createObjectURL(n),s=document.createElement("a");s.href=i,s.download=t,document.body.appendChild(s),s.click(),document.body.removeChild(s),URL.revokeObjectURL(i)}const Bl=10;function Yy(e,t){const r=t.trim();if(!r)return e;const n=e.findIndex(s=>s.query.toLowerCase()===r.toLowerCase());let i;return n!==-1?i=[{...e[n],lastUsed:Date.now()},...e.slice(0,n),...e.slice(n+1)]:i=[{query:r,isFavourite:!1,lastUsed:Date.now()},...e],i.length>Bl&&(i=[...i].sort((a,o)=>a.isFavourite&&!o.isFavourite?-1:!a.isFavourite&&o.isFavourite?1:o.lastUsed-a.lastUsed).slice(0,Bl)),i}function Xy(e,t){return e.map(r=>r.query===t?{...r,isFavourite:!r.isFavourite}:r)}function Ky(e,t){return e.filter(r=>r.query!==t)}function qy(e){const t=e.filter(n=>n.isFavourite).sort((n,i)=>i.lastUsed-n.lastUsed),r=e.filter(n=>!n.isFavourite).sort((n,i)=>i.lastUsed-n.lastUsed);return[...t,...r]}const Jy={owner:["view_report","edit_columns","edit_filters","edit_sorting","edit_views","create_views","delete_views","delete_report","export_data"],editor:["view_report","edit_columns","edit_filters","edit_sorting","edit_views","create_views","delete_views","export_data"],viewer:["view_report","export_data"]};function Zy(e,t){return!e||e.owner===t?"owner":e.editors.includes(t)?"editor":(e.viewers.includes(t),"viewer")}function jr(e,t){return Jy[t].includes(e)}function Mr(e){return`You do not have permission to ${{view_report:"view this report",edit_columns:"modify columns",edit_filters:"modify filters",edit_sorting:"modify sorting",edit_views:"edit views",create_views:"create views",delete_views:"delete views",delete_report:"delete this report",export_data:"export data"}[e]||"perform this action"}.`}function Qy(e){return e==="viewer"}const $l=1e3;function e2(){return`EVT_${Date.now()}_${Math.random().toString(36).substr(2,9)}`}function Lu(e,t,r,n,i,s){return{id:e2(),user:t,reportId:e,feature:r,action:n,timestamp:new Date().toISOString(),previousState:i,newState:s}}function Bu(e,t){const r=[t,...e];return r.length>$l?r.slice(0,$l):r}function t2(e){return{filter_added:"Filter Added",filter_removed:"Filter Removed",filter_updated:"Filter Updated",filter_cleared:"All Filters Cleared",sort_level_added:"Sort Level Added",sort_level_removed:"Sort Level Removed",sort_reordered:"Sort Reordered",sort_cleared:"All Sorting Cleared",group_level_added:"Group Level Added",group_level_removed:"Group Level Removed",group_reordered:"Group Reordered",group_cleared:"All Grouping Cleared",column_hidden:"Column Hidden",column_shown:"Column Shown",column_reordered:"Columns Reordered",column_resized:"Column Resized",view_created:"View Created",view_updated:"View Updated",view_deleted:"View Deleted",view_set_default:"View Set as Default",view_switched:"View Switched",theme_changed:"Theme Changed",export_triggered:"Export Triggered",export_csv:"Exported as CSV",export_excel:"Exported as Excel",export_json:"Exported as JSON",preset_created:"Preset Created",preset_applied:"Preset Applied",preset_deleted:"Preset Deleted",preset_link_copied:"Preset Link Copied",error_occurred:"Error Occurred"}[e]||e}function r2(e){return{filters:"Filters",sorting:"Sorting",grouping:"Grouping",columns:"Columns",views:"Views",theme:"Theme",export:"Export",presets:"Presets",system:"System"}[e]||e}function n2(e){return{filters:"bg-blue-100 text-blue-800 border-blue-200",sorting:"bg-purple-100 text-purple-800 border-purple-200",grouping:"bg-green-100 text-green-800 border-green-200",columns:"bg-orange-100 text-orange-800 border-orange-200",views:"bg-pink-100 text-pink-800 border-pink-200",theme:"bg-gray-100 text-gray-800 border-gray-200",export:"bg-cyan-100 text-cyan-800 border-cyan-200",presets:"bg-indigo-100 text-indigo-800 border-indigo-200",system:"bg-red-100 text-red-800 border-red-200"}[e]||"bg-gray-100 text-gray-800 border-gray-200"}function i2(e){const t=new Date(e),n=new Date().getTime()-t.getTime(),i=Math.floor(n/6e4),s=Math.floor(n/36e5),a=Math.floor(n/864e5);return i<1?"Just now":i<60?`${i} minute${i>1?"s":""} ago`:s<24?`${s} hour${s>1?"s":""} ago`:a<7?`${a} day${a>1?"s":""} ago`:t.toLocaleDateString("en-US",{month:"short",day:"numeric",year:"numeric",hour:"2-digit",minute:"2-digit"})}function Ul(e){return e==null?"None":typeof e=="string"||typeof e=="number"||typeof e=="boolean"?String(e):JSON.stringify(e,null,2)}const Wl=100;function s2(){return`preset_${Date.now()}_${Math.random().toString(36).substr(2,9)}`}function a2(e){var s;const t=(s=e.views)==null?void 0:s.find(a=>a.id===e.activeViewId),r=t==null?void 0:t.snapshot.columnOrder,n=e.columnOrder||[],i=t0(n,e.grouping||null,r);return{filters:e.filters?[...e.filters]:[],sortStack:e.sortStack?[...e.sortStack]:[],columnVisibility:e.columnVisibility?{...e.columnVisibility}:{},columnOrder:i,columnWidths:e.columnWidths?{...e.columnWidths}:{},grouping:e.grouping?{...e.grouping}:null,activeViewId:e.activeViewId}}function o2(e,t,r,n){return{id:s2(),name:e,description:t,createdBy:r,createdAt:Date.now(),config:n}}function l2(e,t){const r=e||[];if(r.length>=Wl)throw new Error(`Maximum of ${Wl} presets reached. Please delete old presets first.`);return[...r,t]}function c2(e,t){return(e||[]).filter(n=>n.id!==t)}function Vl(e,t){if(e)return e.find(r=>r.id===t)}function u2(e,t){return`${window.location.origin}/reports/${e}?preset=${t}`}function f2(){return typeof window>"u"?null:new URLSearchParams(window.location.search).get("preset")}function d2(e){const t=e.columnOrder,r=Wn(t,e.grouping);return{filters:e.filters.length>0?[...e.filters]:void 0,sortStack:e.sortStack.length>0?[...e.sortStack]:void 0,columnVisibility:{...e.columnVisibility},columnOrder:r,columnWidths:{...e.columnWidths},grouping:e.grouping?{...e.grouping}:null,activeViewId:e.activeViewId}}async function h2(e){try{if(navigator.clipboard&&window.isSecureContext)return await navigator.clipboard.writeText(e),!0;{const t=document.createElement("textarea");t.value=e,t.style.position="fixed",t.style.left="-999999px",t.style.top="-999999px",document.body.appendChild(t),t.focus(),t.select();const r=document.execCommand("copy");return t.remove(),r}}catch(t){return console.error("Failed to copy to clipboard:",t),!1}}function p2(e,t){return{totalRows:e.length,totalColumns:t.length}}const g2={MAX_CACHE_ENTRIES:3};function m2(e,t){let r=null;return function(...i){const s=()=>{r=null,e(...i)};r&&clearTimeout(r),r=setTimeout(s,t)}}class Yi{constructor(t=g2.MAX_CACHE_ENTRIES){this.cache=new Map,this.maxEntries=t}get(t){const r=this.cache.get(t);return r?r.value:null}set(t,r){var n;if(this.cache.size>=this.maxEntries&&!this.cache.has(t)){const i=(n=Array.from(this.cache.entries()).sort((s,a)=>s[1].timestamp-a[1].timestamp)[0])==null?void 0:n[0];i&&this.cache.delete(i)}this.cache.set(t,{key:t,value:r,timestamp:Date.now()})}has(t){return this.cache.has(t)}clear(){this.cache.clear()}size(){return this.cache.size}}class x2{constructor(){this.metrics=new Map}start(t){this.metrics.set(t,performance.now())}end(t){const r=this.metrics.get(t);if(!r)return 0;const n=performance.now()-r;return this.metrics.delete(t),n}measure(t,r){this.start(t);const n=r(),i=this.end(t);return{result:n,duration:i}}async measureAsync(t,r){this.start(t);const n=await r(),i=this.end(t);return{result:n,duration:i}}}function Hr(e,t,r,n){const i=r instanceof Error?r.message:r,s={type:e,context:t,message:i,details:n,timestamp:Date.now(),recoverable:v2(e,t)};return process.env.NODE_ENV==="development"&&console.error("[Report Error]",{type:e,context:t,message:i,details:n}),s}function v2(e,t){return e==="ui"||e==="processing"&&["filters","sorting","grouping","columns"].includes(t)?!0:e!=="system"}function y2(e){const r={filters:"There was an issue applying filters",sorting:"Sorting could not be applied",grouping:"Grouping configuration failed",columns:"Column configuration could not be updated",views:"View operation failed",presets:"Preset could not be applied",export:"Export failed",upload:"File upload failed",search:"Search operation failed"}[e.context]||"An error occurred";return e.recoverable?`${r}. Your previous state has been restored.`:`${r}. Please refresh the page.`}function w2(e){return{filters:e.filters?[...e.filters]:void 0,sortStack:e.sortStack?[...e.sortStack]:void 0,grouping:e.grouping?{...e.grouping}:void 0,columnVisibility:e.columnVisibility?{...e.columnVisibility}:void 0,columnOrder:e.columnOrder?[...e.columnOrder]:void 0,columnWidths:e.columnWidths?{...e.columnWidths}:void 0,activeViewId:e.activeViewId}}function T2(e,t,r){r(e.id,{filters:t.filters,sortStack:t.sortStack,grouping:t.grouping,columnVisibility:t.columnVisibility,columnOrder:t.columnOrder,columnWidths:t.columnWidths,activeViewId:t.activeViewId})}function S2(e,t,r){return["equals","contains","starts_with","ends_with","gt","gte","lt","lte"].includes(t)&&(r==null||r==="")?{isValid:!1,errorMessage:"Value is required for this operator"}:e==="number"&&["gt","gte","lt","lte","equals"].includes(t)&&isNaN(Number(r))?{isValid:!1,errorMessage:"Value must be a valid number"}:e==="date"&&r&&isNaN(Date.parse(r))?{isValid:!1,errorMessage:"Value must be a valid date"}:{isValid:!0}}function $u(e,t){const r=[],n=[],i=new Set(t.map(s=>s.name));return e.forEach(s=>{i.has(s.column)?r.push(s):n.push(s.column)}),{validRules:r,invalidColumns:n}}function Uu(e,t){if(!e||!e.levels||e.levels.length===0)return{validGrouping:null,invalidColumns:[]};const r=new Set(t.map(s=>s.name)),n=[],i=[];return e.levels.forEach(s=>{r.has(s.column)?n.push(s):i.push(s.column)}),n.length===0?{validGrouping:null,invalidColumns:i}:{validGrouping:{...e,levels:n},invalidColumns:i}}function E2(e,t){const r=[],n=new Set(t.map(s=>s.name)),i={...e};if(i.filters&&Array.isArray(i.filters)){const s=i.filters.filter(a=>{const o=n.has(a.column);return o||r.push(`Filter for column "${a.column}" ignored (column not found)`),o});i.filters=s.length>0?s:void 0}if(i.sortStack&&Array.isArray(i.sortStack)){const{validRules:s,invalidColumns:a}=$u(i.sortStack,t);a.length>0&&r.push(`Sort rules for columns ignored: ${a.join(", ")}`),i.sortStack=s.length>0?s:void 0}if(i.grouping){const{validGrouping:s,invalidColumns:a}=Uu(i.grouping,t);a.length>0&&r.push(`Grouping for columns ignored: ${a.join(", ")}`),i.grouping=s}if(i.columnVisibility){const s={};Object.entries(i.columnVisibility).forEach(([a,o])=>{n.has(a)?s[a]=o:r.push(`Column visibility for "${a}" ignored (column not found)`)}),i.columnVisibility=Object.keys(s).length>0?s:void 0}if(i.columnOrder&&Array.isArray(i.columnOrder)){const s=i.columnOrder.filter(a=>{const o=n.has(a);return o||r.push(`Column "${a}" in order ignored (column not found)`),o});i.columnOrder=s.length>0?s:void 0}if(i.columnWidths){const s={};Object.entries(i.columnWidths).forEach(([a,o])=>{n.has(a)?s[a]=o:r.push(`Column width for "${a}" ignored (column not found)`)}),i.columnWidths=Object.keys(s).length>0?s:void 0}return{sanitizedConfig:i,warnings:r}}function _2(e,t){return Hr("processing","export",e,{retryAvailable:!!(t!=null&&t.onRetry)})}function zl(e,t,r,n){const i=Lu(e,t,"system","error_occurred",null,{errorType:r.type,errorContext:r.context,errorMessage:r.message,recoverable:r.recoverable,timestamp:r.timestamp});return Bu(n||[],i)}function b2(e){if(typeof document>"u")return;let t=document.head||document.getElementsByTagName("head")[0],r=document.createElement("style");r.type="text/css",t.appendChild(r),r.styleSheet?r.styleSheet.cssText=e:r.appendChild(document.createTextNode(e))}const C2=e=>{switch(e){case"success":return D2;case"info":return I2;case"warning":return k2;case"error":return F2;default:return null}},A2=Array(12).fill(0),O2=({visible:e,className:t})=>S.createElement("div",{className:["sonner-loading-wrapper",t].filter(Boolean).join(" "),"data-visible":e},S.createElement("div",{className:"sonner-spinner"},A2.map((r,n)=>S.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${n}`})))),D2=S.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},S.createElement("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z",clipRule:"evenodd"})),k2=S.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"},S.createElement("path",{fillRule:"evenodd",d:"M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z",clipRule:"evenodd"})),I2=S.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},S.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z",clipRule:"evenodd"})),F2=S.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},S.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z",clipRule:"evenodd"})),N2=S.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"},S.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),S.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"})),R2=()=>{const[e,t]=S.useState(document.hidden);return S.useEffect(()=>{const r=()=>{t(document.hidden)};return document.addEventListener("visibilitychange",r),()=>window.removeEventListener("visibilitychange",r)},[]),e};let ka=1;class P2{constructor(){this.subscribe=t=>(this.subscribers.push(t),()=>{const r=this.subscribers.indexOf(t);this.subscribers.splice(r,1)}),this.publish=t=>{this.subscribers.forEach(r=>r(t))},this.addToast=t=>{this.publish(t),this.toasts=[...this.toasts,t]},this.create=t=>{var r;const{message:n,...i}=t,s=typeof(t==null?void 0:t.id)=="number"||((r=t.id)==null?void 0:r.length)>0?t.id:ka++,a=this.toasts.find(f=>f.id===s),o=t.dismissible===void 0?!0:t.dismissible;return this.dismissedToasts.has(s)&&this.dismissedToasts.delete(s),a?this.toasts=this.toasts.map(f=>f.id===s?(this.publish({...f,...t,id:s,title:n}),{...f,...t,id:s,dismissible:o,title:n}):f):this.addToast({title:n,...i,dismissible:o,id:s}),s},this.dismiss=t=>(t?(this.dismissedToasts.add(t),requestAnimationFrame(()=>this.subscribers.forEach(r=>r({id:t,dismiss:!0})))):this.toasts.forEach(r=>{this.subscribers.forEach(n=>n({id:r.id,dismiss:!0}))}),t),this.message=(t,r)=>this.create({...r,message:t}),this.error=(t,r)=>this.create({...r,message:t,type:"error"}),this.success=(t,r)=>this.create({...r,type:"success",message:t}),this.info=(t,r)=>this.create({...r,type:"info",message:t}),this.warning=(t,r)=>this.create({...r,type:"warning",message:t}),this.loading=(t,r)=>this.create({...r,type:"loading",message:t}),this.promise=(t,r)=>{if(!r)return;let n;r.loading!==void 0&&(n=this.create({...r,promise:t,type:"loading",message:r.loading,description:typeof r.description!="function"?r.description:void 0}));const i=Promise.resolve(t instanceof Function?t():t);let s=n!==void 0,a;const o=i.then(async u=>{if(a=["resolve",u],S.isValidElement(u))s=!1,this.create({id:n,type:"default",message:u});else if(M2(u)&&!u.ok){s=!1;const h=typeof r.error=="function"?await r.error(`HTTP error! status: ${u.status}`):r.error,m=typeof r.description=="function"?await r.description(`HTTP error! status: ${u.status}`):r.description,v=typeof h=="object"&&!S.isValidElement(h)?h:{message:h};this.create({id:n,type:"error",description:m,...v})}else if(u instanceof Error){s=!1;const h=typeof r.error=="function"?await r.error(u):r.error,m=typeof r.description=="function"?await r.description(u):r.description,v=typeof h=="object"&&!S.isValidElement(h)?h:{message:h};this.create({id:n,type:"error",description:m,...v})}else if(r.success!==void 0){s=!1;const h=typeof r.success=="function"?await r.success(u):r.success,m=typeof r.description=="function"?await r.description(u):r.description,v=typeof h=="object"&&!S.isValidElement(h)?h:{message:h};this.create({id:n,type:"success",description:m,...v})}}).catch(async u=>{if(a=["reject",u],r.error!==void 0){s=!1;const d=typeof r.error=="function"?await r.error(u):r.error,h=typeof r.description=="function"?await r.description(u):r.description,l=typeof d=="object"&&!S.isValidElement(d)?d:{message:d};this.create({id:n,type:"error",description:h,...l})}}).finally(()=>{s&&(this.dismiss(n),n=void 0),r.finally==null||r.finally.call(r)}),f=()=>new Promise((u,d)=>o.then(()=>a[0]==="reject"?d(a[1]):u(a[1])).catch(d));return typeof n!="string"&&typeof n!="number"?{unwrap:f}:Object.assign(n,{unwrap:f})},this.custom=(t,r)=>{const n=(r==null?void 0:r.id)||ka++;return this.create({jsx:t(n),id:n,...r}),n},this.getActiveToasts=()=>this.toasts.filter(t=>!this.dismissedToasts.has(t.id)),this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set}}const ur=new P2,j2=(e,t)=>{const r=(t==null?void 0:t.id)||ka++;return ur.addToast({title:e,...t,id:r}),r},M2=e=>e&&typeof e=="object"&&"ok"in e&&typeof e.ok=="boolean"&&"status"in e&&typeof e.status=="number",L2=j2,B2=()=>ur.toasts,$2=()=>ur.getActiveToasts(),$e=Object.assign(L2,{success:ur.success,info:ur.info,warning:ur.warning,error:ur.error,custom:ur.custom,message:ur.message,promise:ur.promise,dismiss:ur.dismiss,loading:ur.loading},{getHistory:B2,getToasts:$2});b2("[data-sonner-toaster][dir=ltr],html[dir=ltr]{--toast-icon-margin-start:-3px;--toast-icon-margin-end:4px;--toast-svg-margin-start:-1px;--toast-svg-margin-end:0px;--toast-button-margin-start:auto;--toast-button-margin-end:0;--toast-close-button-start:0;--toast-close-button-end:unset;--toast-close-button-transform:translate(-35%, -35%)}[data-sonner-toaster][dir=rtl],html[dir=rtl]{--toast-icon-margin-start:4px;--toast-icon-margin-end:-3px;--toast-svg-margin-start:0px;--toast-svg-margin-end:-1px;--toast-button-margin-start:0;--toast-button-margin-end:auto;--toast-close-button-start:unset;--toast-close-button-end:0;--toast-close-button-transform:translate(35%, -35%)}[data-sonner-toaster]{position:fixed;width:var(--width);font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;--gray1:hsl(0, 0%, 99%);--gray2:hsl(0, 0%, 97.3%);--gray3:hsl(0, 0%, 95.1%);--gray4:hsl(0, 0%, 93%);--gray5:hsl(0, 0%, 90.9%);--gray6:hsl(0, 0%, 88.7%);--gray7:hsl(0, 0%, 85.8%);--gray8:hsl(0, 0%, 78%);--gray9:hsl(0, 0%, 56.1%);--gray10:hsl(0, 0%, 52.3%);--gray11:hsl(0, 0%, 43.5%);--gray12:hsl(0, 0%, 9%);--border-radius:8px;box-sizing:border-box;padding:0;margin:0;list-style:none;outline:0;z-index:999999999;transition:transform .4s ease}[data-sonner-toaster][data-lifted=true]{transform:translateY(-8px)}@media (hover:none) and (pointer:coarse){[data-sonner-toaster][data-lifted=true]{transform:none}}[data-sonner-toaster][data-x-position=right]{right:var(--offset-right)}[data-sonner-toaster][data-x-position=left]{left:var(--offset-left)}[data-sonner-toaster][data-x-position=center]{left:50%;transform:translateX(-50%)}[data-sonner-toaster][data-y-position=top]{top:var(--offset-top)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--offset-bottom)}[data-sonner-toast]{--y:translateY(100%);--lift-amount:calc(var(--lift) * var(--gap));z-index:var(--z-index);position:absolute;opacity:0;transform:var(--y);touch-action:none;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:0;overflow-wrap:anywhere}[data-sonner-toast][data-styled=true]{padding:16px;background:var(--normal-bg);border:1px solid var(--normal-border);color:var(--normal-text);border-radius:var(--border-radius);box-shadow:0 4px 12px rgba(0,0,0,.1);width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}[data-sonner-toast]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-y-position=top]{top:0;--y:translateY(-100%);--lift:1;--lift-amount:calc(1 * var(--gap))}[data-sonner-toast][data-y-position=bottom]{bottom:0;--y:translateY(100%);--lift:-1;--lift-amount:calc(var(--lift) * var(--gap))}[data-sonner-toast][data-styled=true] [data-description]{font-weight:400;line-height:1.4;color:#3f3f3f}[data-rich-colors=true][data-sonner-toast][data-styled=true] [data-description]{color:inherit}[data-sonner-toaster][data-sonner-theme=dark] [data-description]{color:#e8e8e8}[data-sonner-toast][data-styled=true] [data-title]{font-weight:500;line-height:1.5;color:inherit}[data-sonner-toast][data-styled=true] [data-icon]{display:flex;height:16px;width:16px;position:relative;justify-content:flex-start;align-items:center;flex-shrink:0;margin-left:var(--toast-icon-margin-start);margin-right:var(--toast-icon-margin-end)}[data-sonner-toast][data-promise=true] [data-icon]>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}[data-sonner-toast][data-styled=true] [data-icon]>*{flex-shrink:0}[data-sonner-toast][data-styled=true] [data-icon] svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}[data-sonner-toast][data-styled=true] [data-content]{display:flex;flex-direction:column;gap:2px}[data-sonner-toast][data-styled=true] [data-button]{border-radius:4px;padding-left:8px;padding-right:8px;height:24px;font-size:12px;color:var(--normal-bg);background:var(--normal-text);margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end);border:none;font-weight:500;cursor:pointer;outline:0;display:flex;align-items:center;flex-shrink:0;transition:opacity .4s,box-shadow .2s}[data-sonner-toast][data-styled=true] [data-button]:focus-visible{box-shadow:0 0 0 2px rgba(0,0,0,.4)}[data-sonner-toast][data-styled=true] [data-button]:first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}[data-sonner-toast][data-styled=true] [data-cancel]{color:var(--normal-text);background:rgba(0,0,0,.08)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-styled=true] [data-cancel]{background:rgba(255,255,255,.3)}[data-sonner-toast][data-styled=true] [data-close-button]{position:absolute;left:var(--toast-close-button-start);right:var(--toast-close-button-end);top:0;height:20px;width:20px;display:flex;justify-content:center;align-items:center;padding:0;color:var(--gray12);background:var(--normal-bg);border:1px solid var(--gray4);transform:var(--toast-close-button-transform);border-radius:50%;cursor:pointer;z-index:1;transition:opacity .1s,background .2s,border-color .2s}[data-sonner-toast][data-styled=true] [data-close-button]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-styled=true] [data-disabled=true]{cursor:not-allowed}[data-sonner-toast][data-styled=true]:hover [data-close-button]:hover{background:var(--gray2);border-color:var(--gray5)}[data-sonner-toast][data-swiping=true]::before{content:'';position:absolute;left:-100%;right:-100%;height:100%;z-index:-1}[data-sonner-toast][data-y-position=top][data-swiping=true]::before{bottom:50%;transform:scaleY(3) translateY(50%)}[data-sonner-toast][data-y-position=bottom][data-swiping=true]::before{top:50%;transform:scaleY(3) translateY(-50%)}[data-sonner-toast][data-swiping=false][data-removed=true]::before{content:'';position:absolute;inset:0;transform:scaleY(2)}[data-sonner-toast][data-expanded=true]::after{content:'';position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}[data-sonner-toast][data-mounted=true]{--y:translateY(0);opacity:1}[data-sonner-toast][data-expanded=false][data-front=false]{--scale:var(--toasts-before) * 0.05 + 1;--y:translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}[data-sonner-toast]>*{transition:opacity .4s}[data-sonner-toast][data-x-position=right]{right:0}[data-sonner-toast][data-x-position=left]{left:0}[data-sonner-toast][data-expanded=false][data-front=false][data-styled=true]>*{opacity:0}[data-sonner-toast][data-visible=false]{opacity:0;pointer-events:none}[data-sonner-toast][data-mounted=true][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}[data-sonner-toast][data-removed=true][data-front=true][data-swipe-out=false]{--y:translateY(calc(var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset) + var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=false]{--y:translateY(40%);opacity:0;transition:transform .5s,opacity .2s}[data-sonner-toast][data-removed=true][data-front=false]::before{height:calc(var(--initial-height) + 20%)}[data-sonner-toast][data-swiping=true]{transform:var(--y) translateY(var(--swipe-amount-y,0)) translateX(var(--swipe-amount-x,0));transition:none}[data-sonner-toast][data-swiped=true]{user-select:none}[data-sonner-toast][data-swipe-out=true][data-y-position=bottom],[data-sonner-toast][data-swipe-out=true][data-y-position=top]{animation-duration:.2s;animation-timing-function:ease-out;animation-fill-mode:forwards}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=left]{animation-name:swipe-out-left}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=right]{animation-name:swipe-out-right}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=up]{animation-name:swipe-out-up}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=down]{animation-name:swipe-out-down}@keyframes swipe-out-left{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) - 100%));opacity:0}}@keyframes swipe-out-right{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) + 100%));opacity:0}}@keyframes swipe-out-up{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) - 100%));opacity:0}}@keyframes swipe-out-down{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) + 100%));opacity:0}}@media (max-width:600px){[data-sonner-toaster]{position:fixed;right:var(--mobile-offset-right);left:var(--mobile-offset-left);width:100%}[data-sonner-toaster][dir=rtl]{left:calc(var(--mobile-offset-left) * -1)}[data-sonner-toaster] [data-sonner-toast]{left:0;right:0;width:calc(100% - var(--mobile-offset-left) * 2)}[data-sonner-toaster][data-x-position=left]{left:var(--mobile-offset-left)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--mobile-offset-bottom)}[data-sonner-toaster][data-y-position=top]{top:var(--mobile-offset-top)}[data-sonner-toaster][data-x-position=center]{left:var(--mobile-offset-left);right:var(--mobile-offset-right);transform:none}}[data-sonner-toaster][data-sonner-theme=light]{--normal-bg:#fff;--normal-border:var(--gray4);--normal-text:var(--gray12);--success-bg:hsl(143, 85%, 96%);--success-border:hsl(145, 92%, 87%);--success-text:hsl(140, 100%, 27%);--info-bg:hsl(208, 100%, 97%);--info-border:hsl(221, 91%, 93%);--info-text:hsl(210, 92%, 45%);--warning-bg:hsl(49, 100%, 97%);--warning-border:hsl(49, 91%, 84%);--warning-text:hsl(31, 92%, 45%);--error-bg:hsl(359, 100%, 97%);--error-border:hsl(359, 100%, 94%);--error-text:hsl(360, 100%, 45%)}[data-sonner-toaster][data-sonner-theme=light] [data-sonner-toast][data-invert=true]{--normal-bg:#000;--normal-border:hsl(0, 0%, 20%);--normal-text:var(--gray1)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg:#fff;--normal-border:var(--gray3);--normal-text:var(--gray12)}[data-sonner-toaster][data-sonner-theme=dark]{--normal-bg:#000;--normal-bg-hover:hsl(0, 0%, 12%);--normal-border:hsl(0, 0%, 20%);--normal-border-hover:hsl(0, 0%, 25%);--normal-text:var(--gray1);--success-bg:hsl(150, 100%, 6%);--success-border:hsl(147, 100%, 12%);--success-text:hsl(150, 86%, 65%);--info-bg:hsl(215, 100%, 6%);--info-border:hsl(223, 43%, 17%);--info-text:hsl(216, 87%, 65%);--warning-bg:hsl(64, 100%, 6%);--warning-border:hsl(60, 100%, 9%);--warning-text:hsl(46, 87%, 65%);--error-bg:hsl(358, 76%, 10%);--error-border:hsl(357, 89%, 16%);--error-text:hsl(358, 100%, 81%)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]{background:var(--normal-bg);border-color:var(--normal-border);color:var(--normal-text)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]:hover{background:var(--normal-bg-hover);border-color:var(--normal-border-hover)}[data-rich-colors=true][data-sonner-toast][data-type=success]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=success] [data-close-button]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=info]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=info] [data-close-button]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning] [data-close-button]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=error]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}[data-rich-colors=true][data-sonner-toast][data-type=error] [data-close-button]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}.sonner-loading-wrapper{--size:16px;height:var(--size);width:var(--size);position:absolute;inset:0;z-index:10}.sonner-loading-wrapper[data-visible=false]{transform-origin:center;animation:sonner-fade-out .2s ease forwards}.sonner-spinner{position:relative;top:50%;left:50%;height:var(--size);width:var(--size)}.sonner-loading-bar{animation:sonner-spin 1.2s linear infinite;background:var(--gray11);border-radius:6px;height:8%;left:-10%;position:absolute;top:-3.9%;width:24%}.sonner-loading-bar:first-child{animation-delay:-1.2s;transform:rotate(.0001deg) translate(146%)}.sonner-loading-bar:nth-child(2){animation-delay:-1.1s;transform:rotate(30deg) translate(146%)}.sonner-loading-bar:nth-child(3){animation-delay:-1s;transform:rotate(60deg) translate(146%)}.sonner-loading-bar:nth-child(4){animation-delay:-.9s;transform:rotate(90deg) translate(146%)}.sonner-loading-bar:nth-child(5){animation-delay:-.8s;transform:rotate(120deg) translate(146%)}.sonner-loading-bar:nth-child(6){animation-delay:-.7s;transform:rotate(150deg) translate(146%)}.sonner-loading-bar:nth-child(7){animation-delay:-.6s;transform:rotate(180deg) translate(146%)}.sonner-loading-bar:nth-child(8){animation-delay:-.5s;transform:rotate(210deg) translate(146%)}.sonner-loading-bar:nth-child(9){animation-delay:-.4s;transform:rotate(240deg) translate(146%)}.sonner-loading-bar:nth-child(10){animation-delay:-.3s;transform:rotate(270deg) translate(146%)}.sonner-loading-bar:nth-child(11){animation-delay:-.2s;transform:rotate(300deg) translate(146%)}.sonner-loading-bar:nth-child(12){animation-delay:-.1s;transform:rotate(330deg) translate(146%)}@keyframes sonner-fade-in{0%{opacity:0;transform:scale(.8)}100%{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}100%{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}100%{opacity:.15}}@media (prefers-reduced-motion){.sonner-loading-bar,[data-sonner-toast],[data-sonner-toast]>*{transition:none!important;animation:none!important}}.sonner-loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);transform-origin:center;transition:opacity .2s,transform .2s}.sonner-loader[data-visible=false]{opacity:0;transform:scale(.8) translate(-50%,-50%)}");function Xi(e){return e.label!==void 0}const U2=3,W2="24px",V2="16px",Hl=4e3,z2=356,H2=14,G2=45,Y2=200;function Lr(...e){return e.filter(Boolean).join(" ")}function X2(e){const[t,r]=e.split("-"),n=[];return t&&n.push(t),r&&n.push(r),n}const K2=e=>{var t,r,n,i,s,a,o,f,u;const{invert:d,toast:h,unstyled:m,interacting:l,setHeights:v,visibleToasts:g,heights:x,index:T,toasts:b,expanded:_,removeToast:k,defaultRichColors:F,closeButton:z,style:N,cancelButtonStyle:B,actionButtonStyle:M,className:L="",descriptionClassName:W="",duration:y,position:H,gap:Q,expandByDefault:J,classNames:ee,icons:_e,closeButtonAriaLabel:Ae="Close toast"}=e,[De,oe]=S.useState(null),[ce,C]=S.useState(null),[j,R]=S.useState(!1),[P,V]=S.useState(!1),[le,fe]=S.useState(!1),[ue,te]=S.useState(!1),[Ie,ae]=S.useState(!1),[Pe,ke]=S.useState(0),[pt,He]=S.useState(0),we=S.useRef(h.duration||y||Hl),ut=S.useRef(null),je=S.useRef(null),Rt=T===0,vt=T+1<=g,rt=h.type,kt=h.dismissible!==!1,Xe=h.className||"",Ht=h.descriptionClassName||"",It=S.useMemo(()=>x.findIndex(Oe=>Oe.toastId===h.id)||0,[x,h.id]),Gt=S.useMemo(()=>{var Oe;return(Oe=h.closeButton)!=null?Oe:z},[h.closeButton,z]),Lt=S.useMemo(()=>h.duration||y||Hl,[h.duration,y]),Bt=S.useRef(0),qe=S.useRef(0),Je=S.useRef(0),gt=S.useRef(null),[Ft,bt]=H.split("-"),cr=S.useMemo(()=>x.reduce((Oe,nt,Ye)=>Ye>=It?Oe:Oe+nt.height,0),[x,It]),Yt=R2(),Qe=h.invert||d,pr=rt==="loading";qe.current=S.useMemo(()=>It*Q+cr,[It,cr]),S.useEffect(()=>{we.current=Lt},[Lt]),S.useEffect(()=>{R(!0)},[]),S.useEffect(()=>{const Oe=je.current;if(Oe){const nt=Oe.getBoundingClientRect().height;return He(nt),v(Ye=>[{toastId:h.id,height:nt,position:h.position},...Ye]),()=>v(Ye=>Ye.filter(Tt=>Tt.toastId!==h.id))}},[v,h.id]),S.useLayoutEffect(()=>{if(!j)return;const Oe=je.current,nt=Oe.style.height;Oe.style.height="auto";const Ye=Oe.getBoundingClientRect().height;Oe.style.height=nt,He(Ye),v(Tt=>Tt.find(yt=>yt.toastId===h.id)?Tt.map(yt=>yt.toastId===h.id?{...yt,height:Ye}:yt):[{toastId:h.id,height:Ye,position:h.position},...Tt])},[j,h.title,h.description,v,h.id]);const Xt=S.useCallback(()=>{V(!0),ke(qe.current),v(Oe=>Oe.filter(nt=>nt.toastId!==h.id)),setTimeout(()=>{k(h)},Y2)},[h,k,v,qe]);S.useEffect(()=>{if(h.promise&&rt==="loading"||h.duration===1/0||h.type==="loading")return;let Oe;return _||l||Yt?(()=>{if(Je.current<Bt.current){const Tt=new Date().getTime()-Bt.current;we.current=we.current-Tt}Je.current=new Date().getTime()})():(()=>{we.current!==1/0&&(Bt.current=new Date().getTime(),Oe=setTimeout(()=>{h.onAutoClose==null||h.onAutoClose.call(h,h),Xt()},we.current))})(),()=>clearTimeout(Oe)},[_,l,h,rt,Yt,Xt]),S.useEffect(()=>{h.delete&&Xt()},[Xt,h.delete]);function ir(){var Oe;if(_e!=null&&_e.loading){var nt;return S.createElement("div",{className:Lr(ee==null?void 0:ee.loader,h==null||(nt=h.classNames)==null?void 0:nt.loader,"sonner-loader"),"data-visible":rt==="loading"},_e.loading)}return S.createElement(O2,{className:Lr(ee==null?void 0:ee.loader,h==null||(Oe=h.classNames)==null?void 0:Oe.loader),visible:rt==="loading"})}const pe=h.icon||(_e==null?void 0:_e[rt])||C2(rt);var tr,Ge;return S.createElement("li",{tabIndex:0,ref:je,className:Lr(L,Xe,ee==null?void 0:ee.toast,h==null||(t=h.classNames)==null?void 0:t.toast,ee==null?void 0:ee.default,ee==null?void 0:ee[rt],h==null||(r=h.classNames)==null?void 0:r[rt]),"data-sonner-toast":"","data-rich-colors":(tr=h.richColors)!=null?tr:F,"data-styled":!(h.jsx||h.unstyled||m),"data-mounted":j,"data-promise":!!h.promise,"data-swiped":Ie,"data-removed":P,"data-visible":vt,"data-y-position":Ft,"data-x-position":bt,"data-index":T,"data-front":Rt,"data-swiping":le,"data-dismissible":kt,"data-type":rt,"data-invert":Qe,"data-swipe-out":ue,"data-swipe-direction":ce,"data-expanded":!!(_||J&&j),style:{"--index":T,"--toasts-before":T,"--z-index":b.length-T,"--offset":`${P?Pe:qe.current}px`,"--initial-height":J?"auto":`${pt}px`,...N,...h.style},onDragEnd:()=>{fe(!1),oe(null),gt.current=null},onPointerDown:Oe=>{pr||!kt||(ut.current=new Date,ke(qe.current),Oe.target.setPointerCapture(Oe.pointerId),Oe.target.tagName!=="BUTTON"&&(fe(!0),gt.current={x:Oe.clientX,y:Oe.clientY}))},onPointerUp:()=>{var Oe,nt,Ye;if(ue||!kt)return;gt.current=null;const Tt=Number(((Oe=je.current)==null?void 0:Oe.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),sr=Number(((nt=je.current)==null?void 0:nt.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),yt=new Date().getTime()-((Ye=ut.current)==null?void 0:Ye.getTime()),xt=De==="x"?Tt:sr,mt=Math.abs(xt)/yt;if(Math.abs(xt)>=G2||mt>.11){ke(qe.current),h.onDismiss==null||h.onDismiss.call(h,h),C(De==="x"?Tt>0?"right":"left":sr>0?"down":"up"),Xt(),te(!0);return}else{var Te,he;(Te=je.current)==null||Te.style.setProperty("--swipe-amount-x","0px"),(he=je.current)==null||he.style.setProperty("--swipe-amount-y","0px")}ae(!1),fe(!1),oe(null)},onPointerMove:Oe=>{var nt,Ye,Tt;if(!gt.current||!kt||((nt=window.getSelection())==null?void 0:nt.toString().length)>0)return;const yt=Oe.clientY-gt.current.y,xt=Oe.clientX-gt.current.x;var mt;const Te=(mt=e.swipeDirections)!=null?mt:X2(H);!De&&(Math.abs(xt)>1||Math.abs(yt)>1)&&oe(Math.abs(xt)>Math.abs(yt)?"x":"y");let he={x:0,y:0};const be=We=>1/(1.5+Math.abs(We)/20);if(De==="y"){if(Te.includes("top")||Te.includes("bottom"))if(Te.includes("top")&&yt<0||Te.includes("bottom")&&yt>0)he.y=yt;else{const We=yt*be(yt);he.y=Math.abs(We)<Math.abs(yt)?We:yt}}else if(De==="x"&&(Te.includes("left")||Te.includes("right")))if(Te.includes("left")&&xt<0||Te.includes("right")&&xt>0)he.x=xt;else{const We=xt*be(xt);he.x=Math.abs(We)<Math.abs(xt)?We:xt}(Math.abs(he.x)>0||Math.abs(he.y)>0)&&ae(!0),(Ye=je.current)==null||Ye.style.setProperty("--swipe-amount-x",`${he.x}px`),(Tt=je.current)==null||Tt.style.setProperty("--swipe-amount-y",`${he.y}px`)}},Gt&&!h.jsx&&rt!=="loading"?S.createElement("button",{"aria-label":Ae,"data-disabled":pr,"data-close-button":!0,onClick:pr||!kt?()=>{}:()=>{Xt(),h.onDismiss==null||h.onDismiss.call(h,h)},className:Lr(ee==null?void 0:ee.closeButton,h==null||(n=h.classNames)==null?void 0:n.closeButton)},(Ge=_e==null?void 0:_e.close)!=null?Ge:N2):null,(rt||h.icon||h.promise)&&h.icon!==null&&((_e==null?void 0:_e[rt])!==null||h.icon)?S.createElement("div",{"data-icon":"",className:Lr(ee==null?void 0:ee.icon,h==null||(i=h.classNames)==null?void 0:i.icon)},h.promise||h.type==="loading"&&!h.icon?h.icon||ir():null,h.type!=="loading"?pe:null):null,S.createElement("div",{"data-content":"",className:Lr(ee==null?void 0:ee.content,h==null||(s=h.classNames)==null?void 0:s.content)},S.createElement("div",{"data-title":"",className:Lr(ee==null?void 0:ee.title,h==null||(a=h.classNames)==null?void 0:a.title)},h.jsx?h.jsx:typeof h.title=="function"?h.title():h.title),h.description?S.createElement("div",{"data-description":"",className:Lr(W,Ht,ee==null?void 0:ee.description,h==null||(o=h.classNames)==null?void 0:o.description)},typeof h.description=="function"?h.description():h.description):null),S.isValidElement(h.cancel)?h.cancel:h.cancel&&Xi(h.cancel)?S.createElement("button",{"data-button":!0,"data-cancel":!0,style:h.cancelButtonStyle||B,onClick:Oe=>{Xi(h.cancel)&&kt&&(h.cancel.onClick==null||h.cancel.onClick.call(h.cancel,Oe),Xt())},className:Lr(ee==null?void 0:ee.cancelButton,h==null||(f=h.classNames)==null?void 0:f.cancelButton)},h.cancel.label):null,S.isValidElement(h.action)?h.action:h.action&&Xi(h.action)?S.createElement("button",{"data-button":!0,"data-action":!0,style:h.actionButtonStyle||M,onClick:Oe=>{Xi(h.action)&&(h.action.onClick==null||h.action.onClick.call(h.action,Oe),!Oe.defaultPrevented&&Xt())},className:Lr(ee==null?void 0:ee.actionButton,h==null||(u=h.classNames)==null?void 0:u.actionButton)},h.action.label):null)};function Gl(){if(typeof window>"u"||typeof document>"u")return"ltr";const e=document.documentElement.getAttribute("dir");return e==="auto"||!e?window.getComputedStyle(document.documentElement).direction:e}function q2(e,t){const r={};return[e,t].forEach((n,i)=>{const s=i===1,a=s?"--mobile-offset":"--offset",o=s?V2:W2;function f(u){["top","right","bottom","left"].forEach(d=>{r[`${a}-${d}`]=typeof u=="number"?`${u}px`:u})}typeof n=="number"||typeof n=="string"?f(n):typeof n=="object"?["top","right","bottom","left"].forEach(u=>{n[u]===void 0?r[`${a}-${u}`]=o:r[`${a}-${u}`]=typeof n[u]=="number"?`${n[u]}px`:n[u]}):f(o)}),r}const Wu=S.forwardRef(function(t,r){const{invert:n,position:i="bottom-right",hotkey:s=["altKey","KeyT"],expand:a,closeButton:o,className:f,offset:u,mobileOffset:d,theme:h="light",richColors:m,duration:l,style:v,visibleToasts:g=U2,toastOptions:x,dir:T=Gl(),gap:b=H2,icons:_,containerAriaLabel:k="Notifications"}=t,[F,z]=S.useState([]),N=S.useMemo(()=>Array.from(new Set([i].concat(F.filter(ce=>ce.position).map(ce=>ce.position)))),[F,i]),[B,M]=S.useState([]),[L,W]=S.useState(!1),[y,H]=S.useState(!1),[Q,J]=S.useState(h!=="system"?h:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),ee=S.useRef(null),_e=s.join("+").replace(/Key/g,"").replace(/Digit/g,""),Ae=S.useRef(null),De=S.useRef(!1),oe=S.useCallback(ce=>{z(C=>{var j;return(j=C.find(R=>R.id===ce.id))!=null&&j.delete||ur.dismiss(ce.id),C.filter(({id:R})=>R!==ce.id)})},[]);return S.useEffect(()=>ur.subscribe(ce=>{if(ce.dismiss){requestAnimationFrame(()=>{z(C=>C.map(j=>j.id===ce.id?{...j,delete:!0}:j))});return}setTimeout(()=>{za.flushSync(()=>{z(C=>{const j=C.findIndex(R=>R.id===ce.id);return j!==-1?[...C.slice(0,j),{...C[j],...ce},...C.slice(j+1)]:[ce,...C]})})})}),[F]),S.useEffect(()=>{if(h!=="system"){J(h);return}if(h==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?J("dark"):J("light")),typeof window>"u")return;const ce=window.matchMedia("(prefers-color-scheme: dark)");try{ce.addEventListener("change",({matches:C})=>{J(C?"dark":"light")})}catch{ce.addListener(({matches:j})=>{try{J(j?"dark":"light")}catch(R){console.error(R)}})}},[h]),S.useEffect(()=>{F.length<=1&&W(!1)},[F]),S.useEffect(()=>{const ce=C=>{var j;if(s.every(V=>C[V]||C.code===V)){var P;W(!0),(P=ee.current)==null||P.focus()}C.code==="Escape"&&(document.activeElement===ee.current||(j=ee.current)!=null&&j.contains(document.activeElement))&&W(!1)};return document.addEventListener("keydown",ce),()=>document.removeEventListener("keydown",ce)},[s]),S.useEffect(()=>{if(ee.current)return()=>{Ae.current&&(Ae.current.focus({preventScroll:!0}),Ae.current=null,De.current=!1)}},[ee.current]),S.createElement("section",{ref:r,"aria-label":`${k} ${_e}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false",suppressHydrationWarning:!0},N.map((ce,C)=>{var j;const[R,P]=ce.split("-");return F.length?S.createElement("ol",{key:ce,dir:T==="auto"?Gl():T,tabIndex:-1,ref:ee,className:f,"data-sonner-toaster":!0,"data-sonner-theme":Q,"data-y-position":R,"data-lifted":L&&F.length>1&&!a,"data-x-position":P,style:{"--front-toast-height":`${((j=B[0])==null?void 0:j.height)||0}px`,"--width":`${z2}px`,"--gap":`${b}px`,...v,...q2(u,d)},onBlur:V=>{De.current&&!V.currentTarget.contains(V.relatedTarget)&&(De.current=!1,Ae.current&&(Ae.current.focus({preventScroll:!0}),Ae.current=null))},onFocus:V=>{V.target instanceof HTMLElement&&V.target.dataset.dismissible==="false"||De.current||(De.current=!0,Ae.current=V.relatedTarget)},onMouseEnter:()=>W(!0),onMouseMove:()=>W(!0),onMouseLeave:()=>{y||W(!1)},onDragEnd:()=>W(!1),onPointerDown:V=>{V.target instanceof HTMLElement&&V.target.dataset.dismissible==="false"||H(!0)},onPointerUp:()=>H(!1)},F.filter(V=>!V.position&&C===0||V.position===ce).map((V,le)=>{var fe,ue;return S.createElement(K2,{key:V.id,icons:_,index:le,toast:V,defaultRichColors:m,duration:(fe=x==null?void 0:x.duration)!=null?fe:l,className:x==null?void 0:x.className,descriptionClassName:x==null?void 0:x.descriptionClassName,invert:n,visibleToasts:g,closeButton:(ue=x==null?void 0:x.closeButton)!=null?ue:o,interacting:y,position:ce,style:x==null?void 0:x.style,unstyled:x==null?void 0:x.unstyled,classNames:x==null?void 0:x.classNames,cancelButtonStyle:x==null?void 0:x.cancelButtonStyle,actionButtonStyle:x==null?void 0:x.actionButtonStyle,closeButtonAriaLabel:x==null?void 0:x.closeButtonAriaLabel,removeToast:oe,toasts:F.filter(te=>te.position==V.position),heights:B.filter(te=>te.position==V.position),setHeights:M,expandByDefault:a,gap:b,expanded:L,swipeDirections:t.swipeDirections})})):null}))});function J2(e){return e==null}function Z2(e,t){const{operator:r,value:n}=t;if(r==="NULL")return e==null;if(r==="NOT_NULL")return e!=null;if(J2(e))return!1;switch(r){case"equals":return String(e)===String(n);case"contains":return String(e).toLowerCase().includes(String(n).toLowerCase());case"startsWith":return String(e).toLowerCase().startsWith(String(n).toLowerCase());case"endsWith":return String(e).toLowerCase().endsWith(String(n).toLowerCase());case"gt":return Number(e)>Number(n);case"lt":return Number(e)<Number(n);case"gte":return Number(e)>=Number(n);case"lte":return Number(e)<=Number(n);case"isTrue":return e===!0;case"isFalse":return e===!1;default:return!0}}function Q2(e,t){return!t||t.length===0?e:e.filter(r=>t.every(n=>Z2(r[n.column],n)))}function Yl(e){switch(e){case"string":return[{value:"equals",label:"Equals"},{value:"contains",label:"Contains"},{value:"startsWith",label:"Starts with"},{value:"endsWith",label:"Ends with"},{value:"NULL",label:"Is NULL"},{value:"NOT_NULL",label:"Is NOT NULL"}];case"number":return[{value:"equals",label:"="},{value:"gt",label:">"},{value:"lt",label:"<"},{value:"gte",label:"≥"},{value:"lte",label:"≤"}];case"boolean":return[{value:"isTrue",label:"Is true"},{value:"isFalse",label:"Is false"},{value:"NULL",label:"Is NULL"},{value:"NOT_NULL",label:"Is NOT NULL"}];case"mixed":case"null":case"array":case"object":default:return[]}}function Ki(e){return e!=="isTrue"&&e!=="isFalse"&&e!=="NULL"&&e!=="NOT_NULL"}function ew({data:e,filters:t}){return{filteredData:S.useMemo(()=>!t||t.length===0?e:Q2(e,t),[e,t])}}function Vu(e,t,r,n){if(!r||r.trim()==="")return e;const i=r.toLowerCase().trim(),s=t.filter(a=>n.includes(a.name));return e.filter(a=>s.some(o=>{const f=a[o.name];return f==null?!1:String(f).toLowerCase().includes(i)}))}function tw({data:e,searchQuery:t,schema:r,visibleColumns:n}){return{searchedData:S.useMemo(()=>!t||t.trim()===""?e:Vu(e,r,t,n),[e,t,r,n])}}function rw({data:e,sortStack:t,schema:r}){return{sortedData:S.useMemo(()=>!t||t.length===0?e:Wd(e,r,t),[e,t,r])}}function nw({data:e,grouping:t,schema:r}){const n=S.useMemo(()=>!t||!t.enabled||t.levels.length===0?e:Yd(e,r,t),[e,t,r]),i=(t==null?void 0:t.enabled)&&((t==null?void 0:t.levels.length)||0)>0;return{groupedData:n,isGrouped:i}}function iw({schema:e,columnVisibility:t,columnOrder:r}){const n=S.useMemo(()=>r.filter(o=>t[o]!==!1),[r,t]),i=S.useMemo(()=>Object.entries(t).filter(([o,f])=>!f).map(([o,f])=>o),[t]),s=S.useMemo(()=>r.map(o=>e.find(u=>u.name===o)||{name:o,type:"string"}),[r,e]),a=S.useMemo(()=>n.map(o=>e.find(u=>u.name===o)||{name:o,type:"string"}),[n,e]);return{visibleColumns:n,hiddenColumns:i,allColumns:s,visibleColumnSchemas:a,hiddenCount:i.length}}function sw({views:e,activeViewId:t,currentState:r}){const n=S.useMemo(()=>e.find(u=>u.id===t),[e,t]),i=S.useMemo(()=>n?Zd(r,n.snapshot):!1,[n,r]),s=S.useMemo(()=>e.find(u=>u.isDefault),[e]),a=S.useMemo(()=>e.filter(u=>!u.isDefault&&!u.isDeleted),[e]),o=S.useMemo(()=>e.filter(u=>u.isFavorite&&!u.isDeleted),[e]),f=S.useMemo(()=>e.filter(u=>u.isDeleted),[e]);return{activeView:n,isDirty:i,defaultView:s,customViews:a,favoriteViews:o,deletedViews:f,isDefaultView:(n==null?void 0:n.isDefault)||!1}}function aw({data:e,enabled:t=!1,pageSize:r=100,initialPage:n=1}){const[i,s]=S.useState(n),a=e.length,o=Math.ceil(a/r),f=S.useMemo(()=>{if(!t)return e;const l=(i-1)*r,v=l+r;return e.slice(l,v)},[e,t,i,r]),u=S.useCallback(l=>{const v=Math.max(1,Math.min(l,o));s(v)},[o]),d=S.useCallback(()=>{i<o&&s(i+1)},[i,o]),h=S.useCallback(()=>{i>1&&s(i-1)},[i]),m=S.useCallback(()=>{s(1)},[]);return{paginatedData:f,currentPage:i,totalPages:o,pageSize:r,totalRows:a,goToPage:u,nextPage:d,prevPage:h,resetPage:m,hasNextPage:i<o,hasPrevPage:i>1}}function ow(e){const{rawData:t,schema:r,filters:n,sortStack:i,grouping:s,searchQuery:a,columnVisibility:o,columnOrder:f,columnWidths:u,views:d,activeViewId:h,pagination:m}=e,l=S.useMemo(()=>({filters:n,sortStack:i,grouping:s,columnVisibility:o,columnOrder:f,columnWidths:u}),[n,i,s,o,f,u]),v=sw({views:d,activeViewId:h,currentState:l}),g=iw({schema:r,columnVisibility:o,columnOrder:f}),{filteredData:x}=ew({data:t,filters:n}),{sortedData:T}=rw({data:x,sortStack:i,schema:r}),{groupedData:b,isGrouped:_}=nw({data:T,grouping:s,schema:r}),{searchedData:k}=tw({data:b,searchQuery:a,schema:r,visibleColumns:g.visibleColumns}),F=aw({data:k,enabled:(m==null?void 0:m.enabled)||!1,pageSize:(m==null?void 0:m.pageSize)||100,initialPage:(m==null?void 0:m.currentPage)||1}),z=m!=null&&m.enabled?F.paginatedData:k,N=S.useMemo(()=>({totalRows:t.length,filteredRows:x.length,sortedRows:T.length,groupedRows:_?b.length:T.length,searchedRows:k.length,visibleRows:z.length,hiddenColumns:g.hiddenCount,activeFilters:n.length,activeSorts:i.length,isGrouped:_}),[t.length,x.length,T.length,b.length,k.length,z.length,g.hiddenCount,n.length,i.length,_]);return{data:z,filteredData:x,sortedData:T,groupedData:b,searchedData:k,viewEngine:v,columnEngine:g,paginationEngine:F,metrics:N,isGrouped:_,isPaginated:(m==null?void 0:m.enabled)||!1}}const en="user-demo-001";function lw(e={}){var Uo,Wo,Vo,zo,Ho;const{mode:t="builder",autoLoad:r=!0,initialData:n,config:i={}}=e,[s,a]=S.useState([]),[o,f]=S.useState(""),[u,d]=S.useState(!1),[h,m]=S.useState(!1),l=s.find(U=>U.id===o),[v,g]=S.useState("idle"),[x,T]=S.useState(!1),[b,_]=S.useState(!1),[k,F]=S.useState(!1),[z,N]=S.useState(!1),[B,M]=S.useState(!1),[L,W]=S.useState(!1),[y,H]=S.useState(void 0),[Q,J]=S.useState(null),[ee,_e]=S.useState(null),[Ae,De]=S.useState(!1),[oe,ce]=S.useState(!1),[C,j]=S.useState(null),[R,P]=S.useState(!1),[V,le]=S.useState(!1),[fe,ue]=S.useState({enabled:!1,levels:[],collapsedGroups:[]}),[te,Ie]=S.useState(""),[ae,Pe]=S.useState(new Set),[ke,pt]=S.useState(1),[He,we]=S.useState(10),[ut,je]=S.useState(!1),[Rt,vt]=S.useState(!1),[rt,kt]=S.useState(!1),[Xe,Ht]=S.useState(null),[It,Gt]=S.useState(null),[Lt,Bt]=S.useState(!1),[qe,Je]=S.useState(null),[gt,Ft]=S.useState(null);S.useRef(new x2),S.useRef(new Yi),S.useRef(new Yi),S.useRef(new Yi),S.useRef(new Yi);const[bt,cr]=S.useState(null),Yt=S.useRef(null),Qe=S.useMemo(()=>l?Zy(l.permissions,en):"owner",[l]),pr=Qy(Qe),Xt=S.useMemo(()=>!(l!=null&&l.uploadedData)||!(l!=null&&l.schema)?{totalRows:0,totalColumns:0}:p2(l.uploadedData,l.schema),[l==null?void 0:l.uploadedData,l==null?void 0:l.schema]),ir=S.useCallback(()=>{l&&(Yt.current=w2(l))},[l]),pe=S.useCallback((U,q)=>{a(Z=>Z.map(ie=>ie.id===U?{...ie,...q}:ie))},[]),tr=S.useCallback(U=>{if(!l)return;cr(U);const q=zl(l.id,en,U,l.auditHistory||[]);pe(l.id,{auditHistory:q}),$e.error(U.message),U.recoverable&&Yt.current&&setTimeout(()=>{T2(l,Yt.current,pe),$e.info("Previous state restored")},100)},[l,pe]),Ge=S.useCallback((U,q,Z,ie)=>{if(!l)return;const Fe=Lu(l.id,en,U,q,Z,ie),Me=l.auditHistory||[],_t=Bu(Me,Fe);setTimeout(()=>{pe(l.id,{auditHistory:_t})},0)},[l,pe]);S.useEffect(()=>{if(l!=null&&l.schemaLocked&&l.schema&&(!l.views||l.views.length===0)){const U=Xo(l.schema),q=U.snapshot.columnOrder,Z=Wn(q,U.snapshot.grouping);pe(l.id,{views:[U],activeViewId:U.id,filters:U.snapshot.filters.length>0?U.snapshot.filters:void 0,sortStack:U.snapshot.sortStack.length>0?U.snapshot.sortStack:void 0,columnVisibility:U.snapshot.columnVisibility,columnOrder:Z,columnWidths:U.snapshot.columnWidths,grouping:U.snapshot.grouping})}},[l==null?void 0:l.schemaLocked,l==null?void 0:l.schema,l==null?void 0:l.id,pe]),S.useEffect(()=>{if(n&&r&&!h&&s.length===0){const U={id:`auto-report-${Date.now()}`,name:t==="viewer"?"Data View":"Imported Data",description:"Auto-generated from external data",schemaLocked:!0,uploadedData:n,schema:Go(n),permissions:{owner:en,editors:[],viewers:[]}};a([U]),f(U.id),m(!0),g("confirmed")}},[n,r,h,s.length,t]);const Oe=(Uo=l==null?void 0:l.views)==null?void 0:Uo.find(U=>U.id===l.activeViewId),nt=ow({rawData:(l==null?void 0:l.uploadedData)||[],schema:(l==null?void 0:l.schema)||[],filters:(l==null?void 0:l.filters)||[],sortStack:(l==null?void 0:l.sortStack)||[],grouping:(l==null?void 0:l.grouping)||null,searchQuery:te||"",columnVisibility:(l==null?void 0:l.columnVisibility)||(Oe==null?void 0:Oe.snapshot.columnVisibility)||{},columnOrder:(l==null?void 0:l.columnOrder)||(Oe==null?void 0:Oe.snapshot.columnOrder)||[],columnWidths:(l==null?void 0:l.columnWidths)||(Oe==null?void 0:Oe.snapshot.columnWidths)||{},views:(l==null?void 0:l.views)||[],activeViewId:(l==null?void 0:l.activeViewId)||"",pagination:{enabled:!0,pageSize:He,currentPage:ke}}),{data:Ye=[],searchedData:Tt=[],groupedData:sr=[],metrics:yt={totalRows:0,searchedRows:0,isGrouped:!1},isGrouped:xt=!1,paginationEngine:mt}=nt||{},Te=((Wo=nt.viewEngine)==null?void 0:Wo.activeView)||Oe,he=((Vo=nt.viewEngine)==null?void 0:Vo.isDirty)||!1;S.useEffect(()=>{if(!(!Te||!l)&&!l.columnOrder){const U=Te.snapshot.columnOrder,q=Wn(U,Te.snapshot.grouping);pe(l.id,{columnOrder:q})}},[l==null?void 0:l.activeViewId]);const be=S.useMemo(()=>!(l!=null&&l.schema)||!Te?null:Jd(l.filters||[],l.sortStack||[],l.schema,l.columnVisibility,l.columnOrder,l.columnWidths,l.grouping,Te.snapshot.columnOrder),[l==null?void 0:l.filters,l==null?void 0:l.sortStack,l==null?void 0:l.schema,l==null?void 0:l.columnVisibility,l==null?void 0:l.columnOrder,l==null?void 0:l.columnWidths,l==null?void 0:l.grouping,Te]),We=S.useMemo(()=>!Te||!be||!he?[]:eh(be,Te.snapshot),[Te,be,he]),w=S.useCallback((U,q)=>{const Z={id:`report-${Date.now()}`,name:U,description:q,schemaLocked:!1,permissions:{owner:en,editors:[],viewers:[]}};a(ie=>[...ie,Z]),f(Z.id),d(!1)},[]),O=S.useCallback(U=>{l&&(g("uploading"),setTimeout(()=>{const q=Go(U);pe(l.id,{uploadedData:U,schema:q,uploadError:void 0}),g("preview")},500))},[l,pe]),E=S.useCallback(U=>{l&&(pe(l.id,{uploadError:U}),g("idle"))},[l,pe]),A=S.useCallback(()=>{l&&(pe(l.id,{uploadError:void 0,uploadedData:void 0,schema:void 0}),g("idle"))},[l,pe]),D=S.useCallback(()=>{l&&(pe(l.id,{schemaLocked:!0}),g("confirmed"))},[l,pe]),I=S.useCallback(U=>{if(!l)return;if(!jr("edit_sorting",Qe)){$e.error(Mr("edit_sorting"));return}const q=l.sortStack??[],Z=q.find(ie=>ie.column===U);if(Z){const ie=Vd(Z.direction);if(ie===null){const Fe=q.filter(Me=>Me.column!==U).map((Me,_t)=>({...Me,priority:_t+1}));pe(l.id,{sortStack:Fe.length>0?Fe:void 0})}else{const Fe=q.map(Me=>Me.column===U?{...Me,direction:ie}:Me);pe(l.id,{sortStack:Fe})}}else{if(q.length>=3)return;const ie={column:U,direction:"asc",priority:q.length+1};pe(l.id,{sortStack:[...q,ie]})}},[l,Qe,pe]),Y=S.useCallback(U=>{if(l)if(l.schema){const{validRules:q,invalidColumns:Z}=$u(U,l.schema);Z.length>0&&$e.warning(`Removed invalid sort columns: ${Z.join(", ")}`),ir();try{pe(l.id,{sortStack:q.length>0?q:void 0})}catch(ie){const Fe=Hr("processing","sorting",ie);tr(Fe)}}else pe(l.id,{sortStack:U.length>0?U:void 0})},[l,pe,ir,tr]),ne=S.useCallback(U=>{if(!l)return;const q=l.sortStack??[],Z=q.find(ie=>ie.column===U);if(!(Z&&Z.direction==="asc"))if(Z){const ie=q.map(Fe=>Fe.column===U?{...Fe,direction:"asc"}:Fe);pe(l.id,{sortStack:ie})}else{if(q.length>=3)return;const ie={column:U,direction:"asc",priority:q.length+1};pe(l.id,{sortStack:[...q,ie]})}},[l,pe]),G=S.useCallback(U=>{if(!l)return;const q=l.sortStack??[],Z=q.find(ie=>ie.column===U);if(!(Z&&Z.direction==="desc"))if(Z){const ie=q.map(Fe=>Fe.column===U?{...Fe,direction:"desc"}:Fe);pe(l.id,{sortStack:ie})}else{if(q.length>=3)return;const ie={column:U,direction:"desc",priority:q.length+1};pe(l.id,{sortStack:[...q,ie]})}},[l,pe]),X=S.useCallback(U=>{var Z;if(!l)return;if(!jr("edit_filters",Qe)){$e.error(Mr("edit_filters"));return}const q=(Z=l.schema)==null?void 0:Z.find(ie=>ie.name===U.column);if(q&&U.value!==void 0){const ie=S2(q.type,U.operator,U.value);if(!ie.isValid){$e.error(ie.errorMessage||"Invalid filter value");return}}ir();try{const ie=l.filters??[];Ge("filters","filter_added",ie,[...ie,U]),pe(l.id,{filters:[...ie,U]})}catch(ie){const Fe=Hr("processing","filters",ie);tr(Fe)}},[l,Qe,pe,ir,tr,Ge]),K=S.useCallback((U,q)=>{if(!l)return;if(!jr("edit_filters",Qe)){$e.error(Mr("edit_filters"));return}const Z=l.filters??[],ie=[...Z];Ge("filters","filter_updated",Z[U],q),ie[U]=q,pe(l.id,{filters:ie})},[l,Qe,pe,Ge]),ge=S.useCallback(U=>{if(!l)return;if(!jr("edit_filters",Qe)){$e.error(Mr("edit_filters"));return}const q=l.filters??[],Z=q.filter((ie,Fe)=>Fe!==U);Ge("filters","filter_removed",q[U],null),pe(l.id,{filters:Z.length>0?Z:void 0})},[l,Qe,pe,Ge]),ye=S.useCallback(()=>{if(!l)return;if(!jr("edit_filters",Qe)){$e.error(Mr("edit_filters"));return}const U=l.filters??[];Ge("filters","filter_cleared",U,null),pe(l.id,{filters:void 0})},[l,Qe,pe,Ge]),Ee=S.useCallback(U=>{var Fe;if(!l)return;const q=(Fe=l.views)==null?void 0:Fe.find(Me=>Me.id===U);if(!q)return;const Z=q.snapshot.columnOrder,ie=Wn(Z,q.snapshot.grouping);pe(l.id,{filters:q.snapshot.filters.length>0?[...q.snapshot.filters]:void 0,sortStack:q.snapshot.sortStack.length>0?[...q.snapshot.sortStack]:void 0,columnVisibility:{...q.snapshot.columnVisibility},columnOrder:ie,columnWidths:{...q.snapshot.columnWidths},grouping:q.snapshot.grouping,activeViewId:U}),Pe(new Set),F(!1)},[l,pe]),me=S.useCallback((U,q,Z)=>{if(!(l!=null&&l.schema)||!be)return;const ie={id:`view-${Date.now()}-${Math.random().toString(36).substr(2,9)}`,name:U,description:q||void 0,isDefault:Z,isFavorite:!1,isDeleted:!1,createdAt:Date.now(),updatedAt:Date.now(),snapshot:{...be}},Fe=l.views??[],Me=Z?Fe.map(_t=>({..._t,isDefault:!1})):Fe;pe(l.id,{views:[...Me,ie],activeViewId:ie.id}),$e.success(`"${U}" view created`)},[l,be,pe]),Se=S.useCallback(()=>{var q;if(!Te||!be||Te.isDefault||!l)return;const U=(q=l.views)==null?void 0:q.map(Z=>Z.id===Te.id?{...Z,snapshot:{...be}}:Z);pe(l.id,{views:U}),$e.success(`"${Te.name}" view updated`)},[Te,be,l,pe]),Ne=S.useCallback(()=>{N(!0)},[]),Ve=S.useCallback(()=>{if(!Te||!l)return;const U=Te.snapshot.columnOrder,q=Wn(U,Te.snapshot.grouping);pe(l.id,{filters:Te.snapshot.filters.length>0?[...Te.snapshot.filters]:void 0,sortStack:Te.snapshot.sortStack.length>0?[...Te.snapshot.sortStack]:void 0,columnVisibility:{...Te.snapshot.columnVisibility},columnOrder:q,columnWidths:{...Te.snapshot.columnWidths},grouping:Te.snapshot.grouping}),$e.info("Changes reverted to last saved state")},[Te,l,pe]),ze=S.useCallback(U=>{if(!(l!=null&&l.views))return;const q=l.views.map(ie=>({...ie,isDefault:ie.id===U}));pe(l.id,{views:q});const Z=l.views.find(ie=>ie.id===U);Z&&$e.success(`"${Z.name}" set as default view`)},[l,pe]),Ut=S.useCallback(U=>{if(!(l!=null&&l.views))return;const q=l.views.map(ie=>ie.id===U?{...ie,isFavorite:!ie.isFavorite,updatedAt:Date.now()}:ie);pe(l.id,{views:q});const Z=l.views.find(ie=>ie.id===U);Z&&!Z.isFavorite?$e.success(`"${Z.name}" added to favorites`):Z&&$e.info(`"${Z.name}" removed from favorites`)},[l,pe]),dn=S.useCallback(U=>{if(!(l!=null&&l.views))return;const q=l.views.map(Me=>Me.id===U?{...Me,isDeleted:!0,updatedAt:Date.now()}:Me),Z=l.activeViewId===U,ie=q.find(Me=>Me.isDefault&&!Me.isDeleted);pe(l.id,{views:q,activeViewId:Z&&ie?ie.id:l.activeViewId,filters:Z&&ie?ie.snapshot.filters.length>0?ie.snapshot.filters:void 0:l.filters,sortStack:Z&&ie?ie.snapshot.sortStack.length>0?ie.snapshot.sortStack:void 0:l.sortStack});const Fe=l.views.find(Me=>Me.id===U);Fe&&$e.info(`"${Fe.name}" moved to Recently Deleted`)},[l,pe]),hn=S.useCallback(U=>{if(!(l!=null&&l.views))return;const q=l.views.map(ie=>ie.id===U?{...ie,isDeleted:!1,updatedAt:Date.now()}:ie);pe(l.id,{views:q});const Z=l.views.find(ie=>ie.id===U);Z&&$e.success(`"${Z.name}" restored`)},[l,pe]),pn=S.useCallback(U=>{if(!(l!=null&&l.views))return;const q=l.views.find(gr=>gr.id===U),Z=l.views.filter(gr=>!gr.isDeleted||gr.id===U);if((q==null?void 0:q.isDefault)&&Z.filter(gr=>gr.isDefault).length===1){$e.error("Cannot delete the last default view");return}const Fe=l.views.filter(gr=>gr.id!==U),Me=l.activeViewId===U,_t=Fe.find(gr=>gr.isDefault&&!gr.isDeleted);pe(l.id,{views:Fe,activeViewId:Me&&_t?_t.id:l.activeViewId,filters:Me&&_t?_t.snapshot.filters.length>0?_t.snapshot.filters:void 0:l.filters,sortStack:Me&&_t?_t.snapshot.sortStack.length>0?_t.snapshot.sortStack:void 0:l.sortStack}),q&&$e.success(`"${q.name}" permanently deleted`)},[l,pe]),Vr=S.useCallback(U=>{J(U),M(!0),F(!1)},[]),ni=S.useCallback((U,q)=>{if(!Q||!(l!=null&&l.views))return;const Z=l.views.map(ie=>ie.id===Q?{...ie,name:U,description:q||void 0}:ie);pe(l.id,{views:Z}),J(null)},[Q,l,pe]),kr=S.useCallback(U=>{_e(U),W(!0),F(!1)},[]),nd=S.useCallback(()=>{if(!ee||!(l!=null&&l.views))return;const U=l.views.filter(ie=>ie.id!==ee),q=l.activeViewId===ee,Z=U.find(ie=>ie.isDefault);pe(l.id,{views:U,activeViewId:q&&Z?Z.id:l.activeViewId,filters:q&&Z?Z.snapshot.filters.length>0?Z.snapshot.filters:void 0:l.filters,sortStack:q&&Z?Z.snapshot.sortStack.length>0?Z.snapshot.sortStack:void 0:l.sortStack}),_e(null),W(!1)},[ee,l,pe]);S.useEffect(()=>{mt!=null&&mt.resetPage?mt.resetPage():pt(1)},[l==null?void 0:l.filters,te,l==null?void 0:l.activeViewId]),S.useEffect(()=>{mt&&mt.currentPage!==ke&&pt(mt.currentPage)},[mt==null?void 0:mt.currentPage]);const id=S.useCallback(U=>{mt!=null&&mt.goToPage&&mt.goToPage(U),pt(U)},[mt]),sd=S.useCallback(U=>{const q=(ke-1)*He,Z=Math.floor(q/U)+1;we(U),pt(Z)},[ke,He]),ad=S.useCallback((U,q)=>{if(!l)return;if(!jr("edit_columns",Qe)){$e.error(Mr("edit_columns"));return}const ie={...l.columnVisibility||(Te==null?void 0:Te.snapshot.columnVisibility)||{},[U]:q};pe(l.id,{columnVisibility:ie})},[l,Te,Qe,pe]),od=S.useCallback(U=>{if(l){if(!jr("edit_columns",Qe)){$e.error(Mr("edit_columns"));return}pe(l.id,{columnOrder:U})}},[l,Qe,pe]),ld=S.useCallback((U,q)=>{if(!l)return;if(!jr("edit_columns",Qe)){$e.error(Mr("edit_columns"));return}const ie={...l.columnWidths||(Te==null?void 0:Te.snapshot.columnWidths)||{},[U]:q};pe(l.id,{columnWidths:ie})},[l,Te,Qe,pe]),cd=S.useCallback(U=>{if(!l)return;const Z=(l.filters??[]).filter(ie=>ie.column!==U);pe(l.id,{filters:Z.length>0?Z:void 0})},[l,pe]),ud=S.useCallback(()=>{if(!Te||!(l!=null&&l.schema))return;const U={},q=[],Z={};l.schema.forEach(ie=>{U[ie.name]=!0,q.push(ie.name),Z[ie.name]=150}),pe(l.id,{columnVisibility:U,columnOrder:q,columnWidths:Z,filters:void 0,sortStack:void 0}),$e.success("Reset to default layout - all filters and sorts cleared")},[Te,l,pe]),$o=S.useCallback(m2(U=>{Ie(U)},300),[]),fd=S.useCallback(U=>{$o(U)},[$o]),dd=S.useCallback(U=>{if(!U.trim()||!l)return;const q=l.searchHistory||[],Z=Yy(q,U);pe(l.id,{searchHistory:Z})},[l,pe]),hd=S.useCallback(U=>{if(!l)return;const q=l.searchHistory||[],Z=Xy(q,U);pe(l.id,{searchHistory:Z})},[l,pe]),pd=S.useCallback(U=>{if(!l)return;const q=l.searchHistory||[],Z=Ky(q,U);pe(l.id,{searchHistory:Z})},[l,pe]),gd=S.useCallback(U=>{Pe(q=>{const Z=new Set(q);return Z.has(U)?Z.delete(U):Z.add(U),Z})},[]),md=S.useCallback((U,q)=>{if(U){const Z=new Set;for(let ie=0;ie<q;ie++)Z.add(ie);Pe(Z)}else Pe(new Set)},[]),xd=S.useCallback((U,q)=>{Pe(Z=>{const ie=new Set(Z),Fe=Math.min(U,q),Me=Math.max(U,q);for(let _t=Fe;_t<=Me;_t++)ie.add(_t);return ie})},[]),vd=S.useCallback(()=>{Pe(new Set)},[]),yd=S.useCallback(U=>{if(l){if(!jr("edit_columns",Qe)){$e.error(Mr("edit_columns"));return}if(U&&l.schema){const{validGrouping:q,invalidColumns:Z}=Uu(U,l.schema);Z.length>0&&$e.warning(`Removed invalid grouping columns: ${Z.join(", ")}`),ir();try{const ie=l.grouping;q===null?Ge("grouping","group_cleared",ie,null):ie?Ge("grouping","group_reordered",ie,q):Ge("grouping","group_level_added",null,q);const Fe=(Te==null?void 0:Te.snapshot.columnOrder)||l.columnOrder||[],Me=Wn(Fe,q);pe(l.id,{grouping:q,columnOrder:Me}),JSON.stringify(Me)!==JSON.stringify(l.columnOrder)&&Ge("columns","column_reordered",l.columnOrder,Me),le(!1)}catch(ie){const Fe=Hr("processing","grouping",ie);tr(Fe)}}else{const q=l.grouping;Ge("grouping","group_cleared",q,null);const Z=(Te==null?void 0:Te.snapshot.columnOrder)||l.columnOrder||[];pe(l.id,{grouping:U,columnOrder:[...Z]}),JSON.stringify(Z)!==JSON.stringify(l.columnOrder)&&Ge("columns","column_reordered",l.columnOrder,Z),le(!1)}}},[l,Te,Qe,pe,ir,tr,Ge]),wd=S.useCallback(U=>{if(!l)return;const q=l.grouping;if(!q)return;const Z=Xd(q,U);pe(l.id,{grouping:Z})},[l,pe]),Td=S.useCallback(()=>{Bt(!0)},[]),In=S.useCallback(U=>{l!=null&&l.schema&&(De(!0),setTimeout(()=>{try{let q;U.scope==="visible"?q=Tt:q=l.uploadedData||[];let Z;U.columnScope==="all"?(Z={},l.schema.forEach(gr=>{Z[gr.name]=!0})):Z=l.columnVisibility||(Te==null?void 0:Te.snapshot.columnVisibility)||{};const ie=l.columnOrder||(Te==null?void 0:Te.snapshot.columnOrder),Fe=Pl(q,l.schema,l.filters??[],l.sortStack??[],Te,Z,ie),Me=l.name;let _t;switch(U.format){case"csv":jl(Fe,Me,U),_t="export_csv";break;case"excel":Ml(Fe,Me,U),_t="export_excel";break;case"json":Ll(Fe,Me,U),_t="export_json";break}Ge("export",_t,null,{format:U.format,scope:U.scope,columnScope:U.columnScope,rowCount:q.length,viewName:(Te==null?void 0:Te.name)||"Default View"}),$e.success(`Export completed successfully (${U.format.toUpperCase()})`)}catch(q){const Z=_2(q,{onRetry:()=>In(U)});$e.error(`Export failed: ${Z.message}`,{action:{label:"Retry",onClick:()=>In(U)}});const ie=zl(l.id,en,Z,l.auditHistory||[]);pe(l.id,{auditHistory:ie}),console.error("Export error:",q)}finally{De(!1)}},500))},[l,Te,Tt,pe,Ge]),Sd=S.useCallback(U=>{if(l!=null&&l.schema){if(he&&Te&&!Te.isDefault){j(U.format),ce(!0),Bt(!1);return}In(U),Bt(!1)}},[l,Te,he,In]),Li=S.useCallback(U=>{In({format:U,scope:"visible",columnScope:"visible"})},[In]),Ed=S.useCallback(()=>{C&&Li(C),ce(!1),j(null)},[C,Li]),_d=S.useCallback(()=>{Se(),C&&Li(C),ce(!1),j(null)},[Se,C,Li]),bd=S.useCallback(()=>{ce(!1),j(null)},[]),Cd=S.useCallback(U=>{!(l!=null&&l.schema)||ae.size===0||(De(!0),setTimeout(()=>{try{const q=Array.from(ae).sort((Fe,Me)=>Fe-Me).map(Fe=>sr[Fe]).filter(Fe=>Fe!==void 0),Z=Pl(q,l.schema,l.filters??[],l.sortStack??[],Te),ie=`${l.name.toLowerCase().replace(/\s+/g,"_")}_selected_export`;switch(U){case"csv":jl(Z,ie);break;case"excel":Ml(Z,ie);break;case"json":Ll(Z,ie);break}$e.success(`Exported ${q.length} selected rows`)}catch(q){$e.error("Export failed. Please try again."),console.error("Export error:",q)}finally{De(!1)}},500))},[l,Te,ae,sr]),Ad=S.useCallback(()=>{if(!jr("edit_filters",Qe)){$e.error(Mr("edit_filters"));return}vt(!0)},[Qe]),Od=S.useCallback((U,q)=>{if(l)try{const Z=a2(l),ie=o2(U,q,en,Z),Fe=l2(l.presets,ie);pe(l.id,{presets:Fe});const Me=u2(l.id,ie.id);Ge("presets","preset_created",null,{presetId:ie.id,name:ie.name}),Ht({preset:ie,url:Me}),vt(!1),kt(!0),$e.success(`Preset "${U}" created successfully`)}catch(Z){$e.error(Z instanceof Error?Z.message:"Failed to create preset")}},[l,pe,Ge]),Dd=S.useCallback(async()=>{if(!Xe)return;await h2(Xe.url)?(Ge("presets","preset_link_copied",null,{presetId:Xe.preset.id}),$e.success("Link copied to clipboard")):$e.error("Failed to copy link")},[Xe,Ge]),kd=S.useCallback(()=>{Xe&&(window.location.href=Xe.url)},[Xe]),Id=S.useCallback(()=>{if(!Xe||!l)return;const U=Xe.preset.id,q=Xe.preset.name,Z=c2(l.presets,U);pe(l.id,{presets:Z}),Ge("presets","preset_deleted",{presetId:U,name:q},null),It===U&&Gt(null),kt(!1),Ht(null),$e.success(`Preset "${q}" deleted`)},[Xe,l,It,pe,Ge]),Fd=S.useCallback(()=>{Gt(null),$e.info("Exited preset view")},[]);S.useEffect(()=>{if(!l)return;const U=f2();if(U&&l.presets&&l.schemaLocked&&l.schema){const q=Vl(l.presets,U);if(q){const{sanitizedConfig:Z,warnings:ie}=E2(q.config,l.schema);ie.length>0&&ie.forEach(Me=>$e.warning(Me));const Fe=d2(Z);pe(l.id,Fe),Gt(U),Ge("presets","preset_applied",null,{presetId:q.id,name:q.name}),$e.success(`Loaded preset: ${q.name}`)}else $e.error("Preset not found")}},[l==null?void 0:l.schemaLocked]);const Nd=It?Vl(l==null?void 0:l.presets,It):void 0;S.useEffect(()=>{l!=null&&l.views&&l.views.length>0&&l.activeViewId&&th(l.id,{views:l.views,activeViewId:l.activeViewId})},[l==null?void 0:l.views,l==null?void 0:l.activeViewId,l==null?void 0:l.id]),S.useEffect(()=>{if(l!=null&&l.schemaLocked&&l.schema&&(!l.views||l.views.length===0)){const U=rh(l.id);if(U&&U.views.length>0){const q=U.views.find(Z=>Z.id===U.activeViewId);if(q)pe(l.id,{views:U.views,activeViewId:U.activeViewId,filters:q.snapshot.filters.length>0?q.snapshot.filters:void 0,sortStack:q.snapshot.sortStack.length>0?q.snapshot.sortStack:void 0});else{const Z=U.views.find(ie=>ie.isDefault)||Xo(l.schema);pe(l.id,{views:U.views,activeViewId:Z.id,filters:Z.snapshot.filters.length>0?Z.snapshot.filters:void 0,sortStack:Z.snapshot.sortStack.length>0?Z.snapshot.sortStack:void 0})}}}},[l==null?void 0:l.schemaLocked,l==null?void 0:l.schema,l==null?void 0:l.id]);const Rd=S.useCallback(U=>{H(U),T(!0)},[]),Pd=S.useCallback(()=>{T(!1),H(void 0)},[]),jd=(zo=l==null?void 0:l.views)==null?void 0:zo.find(U=>U.id===Q),Md=(Ho=l==null?void 0:l.views)==null?void 0:Ho.find(U=>U.id===ee);return{reports:s,activeReport:l,activeReportId:o,setActiveReportId:f,isModalOpen:u,setIsModalOpen:d,createReport:w,updateReport:pe,uploadState:v,handleFileUpload:O,handleUploadError:E,handleRetry:A,handleConfirm:D,paginatedData:Ye,processedData:Tt,displayData:sr,tableMetrics:yt,isGrouped:xt,tableEngine:nt,activeView:Te,isDirty:he,currentTableState:be,viewChanges:We,filters:l==null?void 0:l.filters,showFilterPanel:x,setShowFilterPanel:T,filterFocusColumn:y,handleAddFilter:X,handleUpdateFilter:K,handleRemoveFilter:ge,handleClearAllFilters:ye,handleOpenFilterForColumn:Rd,handleCloseFilterPanel:Pd,handleClearFiltersForColumn:cd,sortStack:l==null?void 0:l.sortStack,showSortPanel:b,setShowSortPanel:_,handleSort:I,handleUpdateSortStack:Y,handleSortAscending:ne,handleSortDescending:G,views:l==null?void 0:l.views,showManageViews:k,setShowManageViews:F,showCreateViewModal:z,setShowCreateViewModal:N,showEditViewModal:B,setShowEditViewModal:M,showDeleteConfirmation:L,setShowDeleteConfirmation:W,editingView:jd,deletingView:Md,editingViewId:Q,deletingViewId:ee,handleSelectView:Ee,handleCreateView:me,handleUpdateCurrentView:Se,handleSaveAsNewView:Ne,handleRevertChanges:Ve,handleToggleDefault:ze,handleToggleFavorite:Ut,handleSoftDelete:dn,handleRestoreView:hn,handlePermanentDelete:pn,handleEditView:Vr,handleSaveEditView:ni,handleDeleteView:kr,handleConfirmDelete:nd,showManageColumns:R,setShowManageColumns:P,columnVisibility:l==null?void 0:l.columnVisibility,columnOrder:l==null?void 0:l.columnOrder,columnWidths:l==null?void 0:l.columnWidths,handleUpdateColumnVisibility:ad,handleUpdateColumnOrder:od,handleUpdateColumnWidth:ld,handleResetColumnLayout:ud,showGroupPanel:V,setShowGroupPanel:le,grouping:l==null?void 0:l.grouping,groupingState:fe,handleGroup:yd,handleToggleGroupCollapse:wd,searchQuery:te,searchHistory:qy((l==null?void 0:l.searchHistory)||[]),handleSearchChange:fd,handleAddToSearchHistory:dd,handleToggleSearchFavourite:hd,handleDeleteSearchHistory:pd,selectedRowIds:ae,handleToggleRowSelection:gd,handleToggleAllRows:md,handleRangeSelection:xd,handleClearSelection:vd,currentPage:ke,pageSize:He,paginationEngine:mt,handlePageChange:id,handlePageSizeChange:sd,isExporting:Ae,showExportModal:Lt,setShowExportModal:Bt,showDirtyExportWarning:oe,handleExport:Td,handleExportWithConfig:Sd,handleExportSelected:Cd,handleExportAnyway:Ed,handleSaveAndExport:_d,handleCancelExport:bd,showAuditHistory:ut,setShowAuditHistory:je,auditHistory:l==null?void 0:l.auditHistory,showCreatePreset:Rt,setShowCreatePreset:vt,showShareLink:rt,setShowShareLink:kt,generatedPreset:Xe,activePreset:Nd,activePresetId:It,handleOpenSharePreset:Ad,handleCreatePreset:Od,handleCopyPresetLink:Dd,handleOpenPreset:kd,handleDeletePreset:Id,handleClearActivePreset:Fd,userRole:Qe,isViewerRole:pr,currentUserId:en,featureLimitWarning:gt,setFeatureLimitWarning:Ft,datasetMeta:Xt,reportError:bt,setReportError:cr,handleError:tr,schema:l==null?void 0:l.schema,hasSchemaConflicts:l!=null&&l.schema?$d(l.schema):!1}}function Sn(e,...t){const r=new URL(`https://mui.com/production-error/?code=${e}`);return t.forEach(n=>r.searchParams.append("args[]",n)),`Minified MUI error #${e}; visit ${r} for the full message.`}const vn="$$material";function cw(e){for(var t=0,r,n=0,i=e.length;i>=4;++n,i-=4)r=e.charCodeAt(n)&255|(e.charCodeAt(++n)&255)<<8|(e.charCodeAt(++n)&255)<<16|(e.charCodeAt(++n)&255)<<24,r=(r&65535)*1540483477+((r>>>16)*59797<<16),r^=r>>>24,t=(r&65535)*1540483477+((r>>>16)*59797<<16)^(t&65535)*1540483477+((t>>>16)*59797<<16);switch(i){case 3:t^=(e.charCodeAt(n+2)&255)<<16;case 2:t^=(e.charCodeAt(n+1)&255)<<8;case 1:t^=e.charCodeAt(n)&255,t=(t&65535)*1540483477+((t>>>16)*59797<<16)}return t^=t>>>13,t=(t&65535)*1540483477+((t>>>16)*59797<<16),((t^t>>>15)>>>0).toString(36)}var uw={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,scale:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1};function fw(e){var t=Object.create(null);return function(r){return t[r]===void 0&&(t[r]=e(r)),t[r]}}var dw=/[A-Z]|^ms/g,hw=/_EMO_([^_]+?)_([^]*?)_EMO_/g,zu=function(t){return t.charCodeAt(1)===45},Xl=function(t){return t!=null&&typeof t!="boolean"},ca=fw(function(e){return zu(e)?e:e.replace(dw,"-$&").toLowerCase()}),Kl=function(t,r){switch(t){case"animation":case"animationName":if(typeof r=="string")return r.replace(hw,function(n,i,s){return sn={name:i,styles:s,next:sn},i})}return uw[t]!==1&&!zu(t)&&typeof r=="number"&&r!==0?r+"px":r};function ys(e,t,r){if(r==null)return"";var n=r;if(n.__emotion_styles!==void 0)return n;switch(typeof r){case"boolean":return"";case"object":{var i=r;if(i.anim===1)return sn={name:i.name,styles:i.styles,next:sn},i.name;var s=r;if(s.styles!==void 0){var a=s.next;if(a!==void 0)for(;a!==void 0;)sn={name:a.name,styles:a.styles,next:sn},a=a.next;var o=s.styles+";";return o}return pw(e,t,r)}}var f=r;return f}function pw(e,t,r){var n="";if(Array.isArray(r))for(var i=0;i<r.length;i++)n+=ys(e,t,r[i])+";";else for(var s in r){var a=r[s];if(typeof a!="object"){var o=a;Xl(o)&&(n+=ca(s)+":"+Kl(s,o)+";")}else if(Array.isArray(a)&&typeof a[0]=="string"&&t==null)for(var f=0;f<a.length;f++)Xl(a[f])&&(n+=ca(s)+":"+Kl(s,a[f])+";");else{var u=ys(e,t,a);switch(s){case"animation":case"animationName":{n+=ca(s)+":"+u+";";break}default:n+=s+"{"+u+"}"}}}return n}var ql=/label:\s*([^\s;{]+)\s*(;|$)/g,sn;function gw(e,t,r){if(e.length===1&&typeof e[0]=="object"&&e[0]!==null&&e[0].styles!==void 0)return e[0];var n=!0,i="";sn=void 0;var s=e[0];if(s==null||s.raw===void 0)n=!1,i+=ys(r,t,s);else{var a=s;i+=a[0]}for(var o=1;o<e.length;o++)if(i+=ys(r,t,e[o]),n){var f=s;i+=f[o]}ql.lastIndex=0;for(var u="",d;(d=ql.exec(i))!==null;)u+="-"+d[1];var h=cw(i)+u;return{name:h,styles:i,next:sn}}function Hu(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var qi={exports:{}},Ji={exports:{}},et={};/** @license React v16.13.1
98
+ * react-is.production.min.js
99
+ *
100
+ * Copyright (c) Facebook, Inc. and its affiliates.
101
+ *
102
+ * This source code is licensed under the MIT license found in the
103
+ * LICENSE file in the root directory of this source tree.
104
+ */var Jl;function mw(){if(Jl)return et;Jl=1;var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,r=e?Symbol.for("react.portal"):60106,n=e?Symbol.for("react.fragment"):60107,i=e?Symbol.for("react.strict_mode"):60108,s=e?Symbol.for("react.profiler"):60114,a=e?Symbol.for("react.provider"):60109,o=e?Symbol.for("react.context"):60110,f=e?Symbol.for("react.async_mode"):60111,u=e?Symbol.for("react.concurrent_mode"):60111,d=e?Symbol.for("react.forward_ref"):60112,h=e?Symbol.for("react.suspense"):60113,m=e?Symbol.for("react.suspense_list"):60120,l=e?Symbol.for("react.memo"):60115,v=e?Symbol.for("react.lazy"):60116,g=e?Symbol.for("react.block"):60121,x=e?Symbol.for("react.fundamental"):60117,T=e?Symbol.for("react.responder"):60118,b=e?Symbol.for("react.scope"):60119;function _(F){if(typeof F=="object"&&F!==null){var z=F.$$typeof;switch(z){case t:switch(F=F.type,F){case f:case u:case n:case s:case i:case h:return F;default:switch(F=F&&F.$$typeof,F){case o:case d:case v:case l:case a:return F;default:return z}}case r:return z}}}function k(F){return _(F)===u}return et.AsyncMode=f,et.ConcurrentMode=u,et.ContextConsumer=o,et.ContextProvider=a,et.Element=t,et.ForwardRef=d,et.Fragment=n,et.Lazy=v,et.Memo=l,et.Portal=r,et.Profiler=s,et.StrictMode=i,et.Suspense=h,et.isAsyncMode=function(F){return k(F)||_(F)===f},et.isConcurrentMode=k,et.isContextConsumer=function(F){return _(F)===o},et.isContextProvider=function(F){return _(F)===a},et.isElement=function(F){return typeof F=="object"&&F!==null&&F.$$typeof===t},et.isForwardRef=function(F){return _(F)===d},et.isFragment=function(F){return _(F)===n},et.isLazy=function(F){return _(F)===v},et.isMemo=function(F){return _(F)===l},et.isPortal=function(F){return _(F)===r},et.isProfiler=function(F){return _(F)===s},et.isStrictMode=function(F){return _(F)===i},et.isSuspense=function(F){return _(F)===h},et.isValidElementType=function(F){return typeof F=="string"||typeof F=="function"||F===n||F===u||F===s||F===i||F===h||F===m||typeof F=="object"&&F!==null&&(F.$$typeof===v||F.$$typeof===l||F.$$typeof===a||F.$$typeof===o||F.$$typeof===d||F.$$typeof===x||F.$$typeof===T||F.$$typeof===b||F.$$typeof===g)},et.typeOf=_,et}var tt={};/** @license React v16.13.1
105
+ * react-is.development.js
106
+ *
107
+ * Copyright (c) Facebook, Inc. and its affiliates.
108
+ *
109
+ * This source code is licensed under the MIT license found in the
110
+ * LICENSE file in the root directory of this source tree.
111
+ */var Zl;function xw(){return Zl||(Zl=1,process.env.NODE_ENV!=="production"&&(function(){var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,r=e?Symbol.for("react.portal"):60106,n=e?Symbol.for("react.fragment"):60107,i=e?Symbol.for("react.strict_mode"):60108,s=e?Symbol.for("react.profiler"):60114,a=e?Symbol.for("react.provider"):60109,o=e?Symbol.for("react.context"):60110,f=e?Symbol.for("react.async_mode"):60111,u=e?Symbol.for("react.concurrent_mode"):60111,d=e?Symbol.for("react.forward_ref"):60112,h=e?Symbol.for("react.suspense"):60113,m=e?Symbol.for("react.suspense_list"):60120,l=e?Symbol.for("react.memo"):60115,v=e?Symbol.for("react.lazy"):60116,g=e?Symbol.for("react.block"):60121,x=e?Symbol.for("react.fundamental"):60117,T=e?Symbol.for("react.responder"):60118,b=e?Symbol.for("react.scope"):60119;function _(ae){return typeof ae=="string"||typeof ae=="function"||ae===n||ae===u||ae===s||ae===i||ae===h||ae===m||typeof ae=="object"&&ae!==null&&(ae.$$typeof===v||ae.$$typeof===l||ae.$$typeof===a||ae.$$typeof===o||ae.$$typeof===d||ae.$$typeof===x||ae.$$typeof===T||ae.$$typeof===b||ae.$$typeof===g)}function k(ae){if(typeof ae=="object"&&ae!==null){var Pe=ae.$$typeof;switch(Pe){case t:var ke=ae.type;switch(ke){case f:case u:case n:case s:case i:case h:return ke;default:var pt=ke&&ke.$$typeof;switch(pt){case o:case d:case v:case l:case a:return pt;default:return Pe}}case r:return Pe}}}var F=f,z=u,N=o,B=a,M=t,L=d,W=n,y=v,H=l,Q=r,J=s,ee=i,_e=h,Ae=!1;function De(ae){return Ae||(Ae=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")),oe(ae)||k(ae)===f}function oe(ae){return k(ae)===u}function ce(ae){return k(ae)===o}function C(ae){return k(ae)===a}function j(ae){return typeof ae=="object"&&ae!==null&&ae.$$typeof===t}function R(ae){return k(ae)===d}function P(ae){return k(ae)===n}function V(ae){return k(ae)===v}function le(ae){return k(ae)===l}function fe(ae){return k(ae)===r}function ue(ae){return k(ae)===s}function te(ae){return k(ae)===i}function Ie(ae){return k(ae)===h}tt.AsyncMode=F,tt.ConcurrentMode=z,tt.ContextConsumer=N,tt.ContextProvider=B,tt.Element=M,tt.ForwardRef=L,tt.Fragment=W,tt.Lazy=y,tt.Memo=H,tt.Portal=Q,tt.Profiler=J,tt.StrictMode=ee,tt.Suspense=_e,tt.isAsyncMode=De,tt.isConcurrentMode=oe,tt.isContextConsumer=ce,tt.isContextProvider=C,tt.isElement=j,tt.isForwardRef=R,tt.isFragment=P,tt.isLazy=V,tt.isMemo=le,tt.isPortal=fe,tt.isProfiler=ue,tt.isStrictMode=te,tt.isSuspense=Ie,tt.isValidElementType=_,tt.typeOf=k})()),tt}var Ql;function Gu(){return Ql||(Ql=1,process.env.NODE_ENV==="production"?Ji.exports=mw():Ji.exports=xw()),Ji.exports}/*
112
+ object-assign
113
+ (c) Sindre Sorhus
114
+ @license MIT
115
+ */var ua,ec;function vw(){if(ec)return ua;ec=1;var e=Object.getOwnPropertySymbols,t=Object.prototype.hasOwnProperty,r=Object.prototype.propertyIsEnumerable;function n(s){if(s==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(s)}function i(){try{if(!Object.assign)return!1;var s=new String("abc");if(s[5]="de",Object.getOwnPropertyNames(s)[0]==="5")return!1;for(var a={},o=0;o<10;o++)a["_"+String.fromCharCode(o)]=o;var f=Object.getOwnPropertyNames(a).map(function(d){return a[d]});if(f.join("")!=="0123456789")return!1;var u={};return"abcdefghijklmnopqrst".split("").forEach(function(d){u[d]=d}),Object.keys(Object.assign({},u)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}return ua=i()?Object.assign:function(s,a){for(var o,f=n(s),u,d=1;d<arguments.length;d++){o=Object(arguments[d]);for(var h in o)t.call(o,h)&&(f[h]=o[h]);if(e){u=e(o);for(var m=0;m<u.length;m++)r.call(o,u[m])&&(f[u[m]]=o[u[m]])}}return f},ua}var fa,tc;function mo(){if(tc)return fa;tc=1;var e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return fa=e,fa}var da,rc;function Yu(){return rc||(rc=1,da=Function.call.bind(Object.prototype.hasOwnProperty)),da}var ha,nc;function yw(){if(nc)return ha;nc=1;var e=function(){};if(process.env.NODE_ENV!=="production"){var t=mo(),r={},n=Yu();e=function(s){var a="Warning: "+s;typeof console<"u"&&console.error(a);try{throw new Error(a)}catch{}}}function i(s,a,o,f,u){if(process.env.NODE_ENV!=="production"){for(var d in s)if(n(s,d)){var h;try{if(typeof s[d]!="function"){var m=Error((f||"React class")+": "+o+" type `"+d+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof s[d]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw m.name="Invariant Violation",m}h=s[d](a,d,f,o,null,t)}catch(v){h=v}if(h&&!(h instanceof Error)&&e((f||"React class")+": type specification of "+o+" `"+d+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof h+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),h instanceof Error&&!(h.message in r)){r[h.message]=!0;var l=u?u():"";e("Failed "+o+" type: "+h.message+(l??""))}}}}return i.resetWarningCache=function(){process.env.NODE_ENV!=="production"&&(r={})},ha=i,ha}var pa,ic;function ww(){if(ic)return pa;ic=1;var e=Gu(),t=vw(),r=mo(),n=Yu(),i=yw(),s=function(){};process.env.NODE_ENV!=="production"&&(s=function(o){var f="Warning: "+o;typeof console<"u"&&console.error(f);try{throw new Error(f)}catch{}});function a(){return null}return pa=function(o,f){var u=typeof Symbol=="function"&&Symbol.iterator,d="@@iterator";function h(oe){var ce=oe&&(u&&oe[u]||oe[d]);if(typeof ce=="function")return ce}var m="<<anonymous>>",l={array:T("array"),bigint:T("bigint"),bool:T("boolean"),func:T("function"),number:T("number"),object:T("object"),string:T("string"),symbol:T("symbol"),any:b(),arrayOf:_,element:k(),elementType:F(),instanceOf:z,node:L(),objectOf:B,oneOf:N,oneOfType:M,shape:y,exact:H};function v(oe,ce){return oe===ce?oe!==0||1/oe===1/ce:oe!==oe&&ce!==ce}function g(oe,ce){this.message=oe,this.data=ce&&typeof ce=="object"?ce:{},this.stack=""}g.prototype=Error.prototype;function x(oe){if(process.env.NODE_ENV!=="production")var ce={},C=0;function j(P,V,le,fe,ue,te,Ie){if(fe=fe||m,te=te||le,Ie!==r){if(f){var ae=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Read more at http://fb.me/use-check-prop-types");throw ae.name="Invariant Violation",ae}else if(process.env.NODE_ENV!=="production"&&typeof console<"u"){var Pe=fe+":"+le;!ce[Pe]&&C<3&&(s("You are manually calling a React.PropTypes validation function for the `"+te+"` prop on `"+fe+"`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."),ce[Pe]=!0,C++)}}return V[le]==null?P?V[le]===null?new g("The "+ue+" `"+te+"` is marked as required "+("in `"+fe+"`, but its value is `null`.")):new g("The "+ue+" `"+te+"` is marked as required in "+("`"+fe+"`, but its value is `undefined`.")):null:oe(V,le,fe,ue,te)}var R=j.bind(null,!1);return R.isRequired=j.bind(null,!0),R}function T(oe){function ce(C,j,R,P,V,le){var fe=C[j],ue=ee(fe);if(ue!==oe){var te=_e(fe);return new g("Invalid "+P+" `"+V+"` of type "+("`"+te+"` supplied to `"+R+"`, expected ")+("`"+oe+"`."),{expectedType:oe})}return null}return x(ce)}function b(){return x(a)}function _(oe){function ce(C,j,R,P,V){if(typeof oe!="function")return new g("Property `"+V+"` of component `"+R+"` has invalid PropType notation inside arrayOf.");var le=C[j];if(!Array.isArray(le)){var fe=ee(le);return new g("Invalid "+P+" `"+V+"` of type "+("`"+fe+"` supplied to `"+R+"`, expected an array."))}for(var ue=0;ue<le.length;ue++){var te=oe(le,ue,R,P,V+"["+ue+"]",r);if(te instanceof Error)return te}return null}return x(ce)}function k(){function oe(ce,C,j,R,P){var V=ce[C];if(!o(V)){var le=ee(V);return new g("Invalid "+R+" `"+P+"` of type "+("`"+le+"` supplied to `"+j+"`, expected a single ReactElement."))}return null}return x(oe)}function F(){function oe(ce,C,j,R,P){var V=ce[C];if(!e.isValidElementType(V)){var le=ee(V);return new g("Invalid "+R+" `"+P+"` of type "+("`"+le+"` supplied to `"+j+"`, expected a single ReactElement type."))}return null}return x(oe)}function z(oe){function ce(C,j,R,P,V){if(!(C[j]instanceof oe)){var le=oe.name||m,fe=De(C[j]);return new g("Invalid "+P+" `"+V+"` of type "+("`"+fe+"` supplied to `"+R+"`, expected ")+("instance of `"+le+"`."))}return null}return x(ce)}function N(oe){if(!Array.isArray(oe))return process.env.NODE_ENV!=="production"&&(arguments.length>1?s("Invalid arguments supplied to oneOf, expected an array, got "+arguments.length+" arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z])."):s("Invalid argument supplied to oneOf, expected an array.")),a;function ce(C,j,R,P,V){for(var le=C[j],fe=0;fe<oe.length;fe++)if(v(le,oe[fe]))return null;var ue=JSON.stringify(oe,function(Ie,ae){var Pe=_e(ae);return Pe==="symbol"?String(ae):ae});return new g("Invalid "+P+" `"+V+"` of value `"+String(le)+"` "+("supplied to `"+R+"`, expected one of "+ue+"."))}return x(ce)}function B(oe){function ce(C,j,R,P,V){if(typeof oe!="function")return new g("Property `"+V+"` of component `"+R+"` has invalid PropType notation inside objectOf.");var le=C[j],fe=ee(le);if(fe!=="object")return new g("Invalid "+P+" `"+V+"` of type "+("`"+fe+"` supplied to `"+R+"`, expected an object."));for(var ue in le)if(n(le,ue)){var te=oe(le,ue,R,P,V+"."+ue,r);if(te instanceof Error)return te}return null}return x(ce)}function M(oe){if(!Array.isArray(oe))return process.env.NODE_ENV!=="production"&&s("Invalid argument supplied to oneOfType, expected an instance of array."),a;for(var ce=0;ce<oe.length;ce++){var C=oe[ce];if(typeof C!="function")return s("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+Ae(C)+" at index "+ce+"."),a}function j(R,P,V,le,fe){for(var ue=[],te=0;te<oe.length;te++){var Ie=oe[te],ae=Ie(R,P,V,le,fe,r);if(ae==null)return null;ae.data&&n(ae.data,"expectedType")&&ue.push(ae.data.expectedType)}var Pe=ue.length>0?", expected one of type ["+ue.join(", ")+"]":"";return new g("Invalid "+le+" `"+fe+"` supplied to "+("`"+V+"`"+Pe+"."))}return x(j)}function L(){function oe(ce,C,j,R,P){return Q(ce[C])?null:new g("Invalid "+R+" `"+P+"` supplied to "+("`"+j+"`, expected a ReactNode."))}return x(oe)}function W(oe,ce,C,j,R){return new g((oe||"React class")+": "+ce+" type `"+C+"."+j+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+R+"`.")}function y(oe){function ce(C,j,R,P,V){var le=C[j],fe=ee(le);if(fe!=="object")return new g("Invalid "+P+" `"+V+"` of type `"+fe+"` "+("supplied to `"+R+"`, expected `object`."));for(var ue in oe){var te=oe[ue];if(typeof te!="function")return W(R,P,V,ue,_e(te));var Ie=te(le,ue,R,P,V+"."+ue,r);if(Ie)return Ie}return null}return x(ce)}function H(oe){function ce(C,j,R,P,V){var le=C[j],fe=ee(le);if(fe!=="object")return new g("Invalid "+P+" `"+V+"` of type `"+fe+"` "+("supplied to `"+R+"`, expected `object`."));var ue=t({},C[j],oe);for(var te in ue){var Ie=oe[te];if(n(oe,te)&&typeof Ie!="function")return W(R,P,V,te,_e(Ie));if(!Ie)return new g("Invalid "+P+" `"+V+"` key `"+te+"` supplied to `"+R+"`.\nBad object: "+JSON.stringify(C[j],null," ")+`
116
+ Valid keys: `+JSON.stringify(Object.keys(oe),null," "));var ae=Ie(le,te,R,P,V+"."+te,r);if(ae)return ae}return null}return x(ce)}function Q(oe){switch(typeof oe){case"number":case"string":case"undefined":return!0;case"boolean":return!oe;case"object":if(Array.isArray(oe))return oe.every(Q);if(oe===null||o(oe))return!0;var ce=h(oe);if(ce){var C=ce.call(oe),j;if(ce!==oe.entries){for(;!(j=C.next()).done;)if(!Q(j.value))return!1}else for(;!(j=C.next()).done;){var R=j.value;if(R&&!Q(R[1]))return!1}}else return!1;return!0;default:return!1}}function J(oe,ce){return oe==="symbol"?!0:ce?ce["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&ce instanceof Symbol:!1}function ee(oe){var ce=typeof oe;return Array.isArray(oe)?"array":oe instanceof RegExp?"object":J(ce,oe)?"symbol":ce}function _e(oe){if(typeof oe>"u"||oe===null)return""+oe;var ce=ee(oe);if(ce==="object"){if(oe instanceof Date)return"date";if(oe instanceof RegExp)return"regexp"}return ce}function Ae(oe){var ce=_e(oe);switch(ce){case"array":case"object":return"an "+ce;case"boolean":case"date":case"regexp":return"a "+ce;default:return ce}}function De(oe){return!oe.constructor||!oe.constructor.name?m:oe.constructor.name}return l.checkPropTypes=i,l.resetWarningCache=i.resetWarningCache,l.PropTypes=l,l},pa}var ga,sc;function Tw(){if(sc)return ga;sc=1;var e=mo();function t(){}function r(){}return r.resetWarningCache=t,ga=function(){function n(a,o,f,u,d,h){if(h!==e){var m=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw m.name="Invariant Violation",m}}n.isRequired=n;function i(){return n}var s={array:n,bigint:n,bool:n,func:n,number:n,object:n,string:n,symbol:n,any:n,arrayOf:i,element:n,elementType:n,instanceOf:i,node:n,objectOf:i,oneOf:i,oneOfType:i,shape:i,exact:i,checkPropTypes:r,resetWarningCache:t};return s.PropTypes=s,s},ga}var ac;function Sw(){if(ac)return qi.exports;if(ac=1,process.env.NODE_ENV!=="production"){var e=Gu(),t=!0;qi.exports=ww()(e.isElement,t)}else qi.exports=Tw()();return qi.exports}var Ew=Sw();const Ce=Hu(Ew);function _w(e){return e==null||Object.keys(e).length===0}function xo(e){const{styles:t,defaultTheme:r={}}=e,n=typeof t=="function"?i=>t(_w(i)?r:i):t;return c.jsx(Ha.Global,{styles:n})}process.env.NODE_ENV!=="production"&&(xo.propTypes={defaultTheme:Ce.object,styles:Ce.oneOfType([Ce.array,Ce.string,Ce.object,Ce.func])});/**
117
+ * @mui/styled-engine v7.3.9
118
+ *
119
+ * @license MIT
120
+ * This source code is licensed under the MIT license found in the
121
+ * LICENSE file in the root directory of this source tree.
122
+ */const oc=[];function bw(e){return oc[0]=e,gw(oc)}var Zi={exports:{}},ft={};/**
123
+ * @license React
124
+ * react-is.production.js
125
+ *
126
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
127
+ *
128
+ * This source code is licensed under the MIT license found in the
129
+ * LICENSE file in the root directory of this source tree.
130
+ */var lc;function Cw(){if(lc)return ft;lc=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),n=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),s=Symbol.for("react.consumer"),a=Symbol.for("react.context"),o=Symbol.for("react.forward_ref"),f=Symbol.for("react.suspense"),u=Symbol.for("react.suspense_list"),d=Symbol.for("react.memo"),h=Symbol.for("react.lazy"),m=Symbol.for("react.view_transition"),l=Symbol.for("react.client.reference");function v(g){if(typeof g=="object"&&g!==null){var x=g.$$typeof;switch(x){case e:switch(g=g.type,g){case r:case i:case n:case f:case u:case m:return g;default:switch(g=g&&g.$$typeof,g){case a:case o:case h:case d:return g;case s:return g;default:return x}}case t:return x}}}return ft.ContextConsumer=s,ft.ContextProvider=a,ft.Element=e,ft.ForwardRef=o,ft.Fragment=r,ft.Lazy=h,ft.Memo=d,ft.Portal=t,ft.Profiler=i,ft.StrictMode=n,ft.Suspense=f,ft.SuspenseList=u,ft.isContextConsumer=function(g){return v(g)===s},ft.isContextProvider=function(g){return v(g)===a},ft.isElement=function(g){return typeof g=="object"&&g!==null&&g.$$typeof===e},ft.isForwardRef=function(g){return v(g)===o},ft.isFragment=function(g){return v(g)===r},ft.isLazy=function(g){return v(g)===h},ft.isMemo=function(g){return v(g)===d},ft.isPortal=function(g){return v(g)===t},ft.isProfiler=function(g){return v(g)===i},ft.isStrictMode=function(g){return v(g)===n},ft.isSuspense=function(g){return v(g)===f},ft.isSuspenseList=function(g){return v(g)===u},ft.isValidElementType=function(g){return typeof g=="string"||typeof g=="function"||g===r||g===i||g===n||g===f||g===u||typeof g=="object"&&g!==null&&(g.$$typeof===h||g.$$typeof===d||g.$$typeof===a||g.$$typeof===s||g.$$typeof===o||g.$$typeof===l||g.getModuleId!==void 0)},ft.typeOf=v,ft}var dt={};/**
131
+ * @license React
132
+ * react-is.development.js
133
+ *
134
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
135
+ *
136
+ * This source code is licensed under the MIT license found in the
137
+ * LICENSE file in the root directory of this source tree.
138
+ */var cc;function Aw(){return cc||(cc=1,process.env.NODE_ENV!=="production"&&(function(){function e(g){if(typeof g=="object"&&g!==null){var x=g.$$typeof;switch(x){case t:switch(g=g.type,g){case n:case s:case i:case u:case d:case l:return g;default:switch(g=g&&g.$$typeof,g){case o:case f:case m:case h:return g;case a:return g;default:return x}}case r:return x}}}var t=Symbol.for("react.transitional.element"),r=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),i=Symbol.for("react.strict_mode"),s=Symbol.for("react.profiler"),a=Symbol.for("react.consumer"),o=Symbol.for("react.context"),f=Symbol.for("react.forward_ref"),u=Symbol.for("react.suspense"),d=Symbol.for("react.suspense_list"),h=Symbol.for("react.memo"),m=Symbol.for("react.lazy"),l=Symbol.for("react.view_transition"),v=Symbol.for("react.client.reference");dt.ContextConsumer=a,dt.ContextProvider=o,dt.Element=t,dt.ForwardRef=f,dt.Fragment=n,dt.Lazy=m,dt.Memo=h,dt.Portal=r,dt.Profiler=s,dt.StrictMode=i,dt.Suspense=u,dt.SuspenseList=d,dt.isContextConsumer=function(g){return e(g)===a},dt.isContextProvider=function(g){return e(g)===o},dt.isElement=function(g){return typeof g=="object"&&g!==null&&g.$$typeof===t},dt.isForwardRef=function(g){return e(g)===f},dt.isFragment=function(g){return e(g)===n},dt.isLazy=function(g){return e(g)===m},dt.isMemo=function(g){return e(g)===h},dt.isPortal=function(g){return e(g)===r},dt.isProfiler=function(g){return e(g)===s},dt.isStrictMode=function(g){return e(g)===i},dt.isSuspense=function(g){return e(g)===u},dt.isSuspenseList=function(g){return e(g)===d},dt.isValidElementType=function(g){return typeof g=="string"||typeof g=="function"||g===n||g===s||g===i||g===u||g===d||typeof g=="object"&&g!==null&&(g.$$typeof===m||g.$$typeof===h||g.$$typeof===o||g.$$typeof===a||g.$$typeof===f||g.$$typeof===v||g.getModuleId!==void 0)},dt.typeOf=e})()),dt}var uc;function Ow(){return uc||(uc=1,process.env.NODE_ENV==="production"?Zi.exports=Cw():Zi.exports=Aw()),Zi.exports}var Xu=Ow();function tn(e){if(typeof e!="object"||e===null)return!1;const t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function Ku(e){if(Be.isValidElement(e)||Xu.isValidElementType(e)||!tn(e))return e;const t={};return Object.keys(e).forEach(r=>{t[r]=Ku(e[r])}),t}function Tr(e,t,r={clone:!0}){const n=r.clone?{...e}:e;return tn(e)&&tn(t)&&Object.keys(t).forEach(i=>{Be.isValidElement(t[i])||Xu.isValidElementType(t[i])?n[i]=t[i]:tn(t[i])&&Object.prototype.hasOwnProperty.call(e,i)&&tn(e[i])?n[i]=Tr(e[i],t[i],r):r.clone?n[i]=tn(t[i])?Ku(t[i]):t[i]:n[i]=t[i]}),n}const Dw=e=>{const t=Object.keys(e).map(r=>({key:r,val:e[r]}))||[];return t.sort((r,n)=>r.val-n.val),t.reduce((r,n)=>({...r,[n.key]:n.val}),{})};function kw(e){const{values:t={xs:0,sm:600,md:900,lg:1200,xl:1536},unit:r="px",step:n=5,...i}=e,s=Dw(t),a=Object.keys(s);function o(m){return`@media (min-width:${typeof t[m]=="number"?t[m]:m}${r})`}function f(m){return`@media (max-width:${(typeof t[m]=="number"?t[m]:m)-n/100}${r})`}function u(m,l){const v=a.indexOf(l);return`@media (min-width:${typeof t[m]=="number"?t[m]:m}${r}) and (max-width:${(v!==-1&&typeof t[a[v]]=="number"?t[a[v]]:l)-n/100}${r})`}function d(m){return a.indexOf(m)+1<a.length?u(m,a[a.indexOf(m)+1]):o(m)}function h(m){const l=a.indexOf(m);return l===0?o(a[1]):l===a.length-1?f(a[l]):u(m,a[a.indexOf(m)+1]).replace("@media","@media not all and")}return{keys:a,values:s,up:o,down:f,between:u,only:d,not:h,unit:r,...i}}function fc(e,t){if(!e.containerQueries)return t;const r=Object.keys(t).filter(n=>n.startsWith("@container")).sort((n,i)=>{var a,o;const s=/min-width:\s*([0-9.]+)/;return+(((a=n.match(s))==null?void 0:a[1])||0)-+(((o=i.match(s))==null?void 0:o[1])||0)});return r.length?r.reduce((n,i)=>{const s=t[i];return delete n[i],n[i]=s,n},{...t}):t}function Iw(e,t){return t==="@"||t.startsWith("@")&&(e.some(r=>t.startsWith(`@${r}`))||!!t.match(/^@\d/))}function Fw(e,t){const r=t.match(/^@([^/]+)?\/?(.+)?$/);if(!r){if(process.env.NODE_ENV!=="production")throw new Error(`MUI: The provided shorthand ${`(${t})`} is invalid. The format should be \`@<breakpoint | number>\` or \`@<breakpoint | number>/<container>\`.
139
+ For example, \`@sm\` or \`@600\` or \`@40rem/sidebar\`.`);return null}const[,n,i]=r,s=Number.isNaN(+n)?n||0:+n;return e.containerQueries(i).up(s)}function Nw(e){const t=(s,a)=>s.replace("@media",a?`@container ${a}`:"@container");function r(s,a){s.up=(...o)=>t(e.breakpoints.up(...o),a),s.down=(...o)=>t(e.breakpoints.down(...o),a),s.between=(...o)=>t(e.breakpoints.between(...o),a),s.only=(...o)=>t(e.breakpoints.only(...o),a),s.not=(...o)=>{const f=t(e.breakpoints.not(...o),a);return f.includes("not all and")?f.replace("not all and ","").replace("min-width:","width<").replace("max-width:","width>").replace("and","or"):f}}const n={},i=s=>(r(n,s),n);return r(i),{...e,containerQueries:i}}const Rw={borderRadius:4},fn=process.env.NODE_ENV!=="production"?Ce.oneOfType([Ce.number,Ce.string,Ce.object,Ce.array]):{};function mi(e,t){return t?Tr(e,t,{clone:!1}):e}const Fs={xs:0,sm:600,md:900,lg:1200,xl:1536},dc={keys:["xs","sm","md","lg","xl"],up:e=>`@media (min-width:${Fs[e]}px)`},Pw={containerQueries:e=>({up:t=>{let r=typeof t=="number"?t:Fs[t]||t;return typeof r=="number"&&(r=`${r}px`),e?`@container ${e} (min-width:${r})`:`@container (min-width:${r})`}})};function Jr(e,t,r){const n=e.theme||{};if(Array.isArray(t)){const s=n.breakpoints||dc;return t.reduce((a,o,f)=>(a[s.up(s.keys[f])]=r(t[f]),a),{})}if(typeof t=="object"){const s=n.breakpoints||dc;return Object.keys(t).reduce((a,o)=>{if(Iw(s.keys,o)){const f=Fw(n.containerQueries?n:Pw,o);f&&(a[f]=r(t[o],o))}else if(Object.keys(s.values||Fs).includes(o)){const f=s.up(o);a[f]=r(t[o],o)}else{const f=o;a[f]=t[f]}return a},{})}return r(t)}function jw(e={}){var r;return((r=e.keys)==null?void 0:r.reduce((n,i)=>{const s=e.up(i);return n[s]={},n},{}))||{}}function hc(e,t){return e.reduce((r,n)=>{const i=r[n];return(!i||Object.keys(i).length===0)&&delete r[n],r},t)}function qu(e){if(typeof e!="string")throw new Error(process.env.NODE_ENV!=="production"?"MUI: `capitalize(string)` expects a string argument.":Sn(7));return e.charAt(0).toUpperCase()+e.slice(1)}function Ns(e,t,r=!0){if(!t||typeof t!="string")return null;if(e&&e.vars&&r){const n=`vars.${t}`.split(".").reduce((i,s)=>i&&i[s]?i[s]:null,e);if(n!=null)return n}return t.split(".").reduce((n,i)=>n&&n[i]!=null?n[i]:null,e)}function ws(e,t,r,n=r){let i;return typeof e=="function"?i=e(r):Array.isArray(e)?i=e[r]||n:i=Ns(e,r)||n,t&&(i=t(i,n,e)),i}function Nt(e){const{prop:t,cssProperty:r=e.prop,themeKey:n,transform:i}=e,s=a=>{if(a[t]==null)return null;const o=a[t],f=a.theme,u=Ns(f,n)||{};return Jr(a,o,h=>{let m=ws(u,i,h);return h===m&&typeof h=="string"&&(m=ws(u,i,`${t}${h==="default"?"":qu(h)}`,h)),r===!1?m:{[r]:m}})};return s.propTypes=process.env.NODE_ENV!=="production"?{[t]:fn}:{},s.filterProps=[t],s}function Mw(e){const t={};return r=>(t[r]===void 0&&(t[r]=e(r)),t[r])}const Lw={m:"margin",p:"padding"},Bw={t:"Top",r:"Right",b:"Bottom",l:"Left",x:["Left","Right"],y:["Top","Bottom"]},pc={marginX:"mx",marginY:"my",paddingX:"px",paddingY:"py"},$w=Mw(e=>{if(e.length>2)if(pc[e])e=pc[e];else return[e];const[t,r]=e.split(""),n=Lw[t],i=Bw[r]||"";return Array.isArray(i)?i.map(s=>n+s):[n+i]}),Rs=["m","mt","mr","mb","ml","mx","my","margin","marginTop","marginRight","marginBottom","marginLeft","marginX","marginY","marginInline","marginInlineStart","marginInlineEnd","marginBlock","marginBlockStart","marginBlockEnd"],Ps=["p","pt","pr","pb","pl","px","py","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","paddingX","paddingY","paddingInline","paddingInlineStart","paddingInlineEnd","paddingBlock","paddingBlockStart","paddingBlockEnd"],Uw=[...Rs,...Ps];function Ri(e,t,r,n){const i=Ns(e,t,!0)??r;return typeof i=="number"||typeof i=="string"?s=>typeof s=="string"?s:(process.env.NODE_ENV!=="production"&&typeof s!="number"&&console.error(`MUI: Expected ${n} argument to be a number or a string, got ${s}.`),typeof i=="string"?i.startsWith("var(")&&s===0?0:i.startsWith("var(")&&s===1?i:`calc(${s} * ${i})`:i*s):Array.isArray(i)?s=>{if(typeof s=="string")return s;const a=Math.abs(s);process.env.NODE_ENV!=="production"&&(Number.isInteger(a)?a>i.length-1&&console.error([`MUI: The value provided (${a}) overflows.`,`The supported values are: ${JSON.stringify(i)}.`,`${a} > ${i.length-1}, you need to add the missing values.`].join(`
140
+ `)):console.error([`MUI: The \`theme.${t}\` array type cannot be combined with non integer values.You should either use an integer value that can be used as index, or define the \`theme.${t}\` as a number.`].join(`
141
+ `)));const o=i[a];return s>=0?o:typeof o=="number"?-o:typeof o=="string"&&o.startsWith("var(")?`calc(-1 * ${o})`:`-${o}`}:typeof i=="function"?i:(process.env.NODE_ENV!=="production"&&console.error([`MUI: The \`theme.${t}\` value (${i}) is invalid.`,"It should be a number, an array or a function."].join(`
142
+ `)),()=>{})}function vo(e){return Ri(e,"spacing",8,"spacing")}function Pi(e,t){return typeof t=="string"||t==null?t:e(t)}function Ww(e,t){return r=>e.reduce((n,i)=>(n[i]=Pi(t,r),n),{})}function Vw(e,t,r,n){if(!t.includes(r))return null;const i=$w(r),s=Ww(i,n),a=e[r];return Jr(e,a,s)}function Ju(e,t){const r=vo(e.theme);return Object.keys(e).map(n=>Vw(e,t,n,r)).reduce(mi,{})}function Ct(e){return Ju(e,Rs)}Ct.propTypes=process.env.NODE_ENV!=="production"?Rs.reduce((e,t)=>(e[t]=fn,e),{}):{};Ct.filterProps=Rs;function At(e){return Ju(e,Ps)}At.propTypes=process.env.NODE_ENV!=="production"?Ps.reduce((e,t)=>(e[t]=fn,e),{}):{};At.filterProps=Ps;process.env.NODE_ENV!=="production"&&Uw.reduce((e,t)=>(e[t]=fn,e),{});function Zu(e=8,t=vo({spacing:e})){if(e.mui)return e;const r=(...n)=>(process.env.NODE_ENV!=="production"&&(n.length<=4||console.error(`MUI: Too many arguments provided, expected between 0 and 4, got ${n.length}`)),(n.length===0?[1]:n).map(s=>{const a=t(s);return typeof a=="number"?`${a}px`:a}).join(" "));return r.mui=!0,r}function js(...e){const t=e.reduce((n,i)=>(i.filterProps.forEach(s=>{n[s]=i}),n),{}),r=n=>Object.keys(n).reduce((i,s)=>t[s]?mi(i,t[s](n)):i,{});return r.propTypes=process.env.NODE_ENV!=="production"?e.reduce((n,i)=>Object.assign(n,i.propTypes),{}):{},r.filterProps=e.reduce((n,i)=>n.concat(i.filterProps),[]),r}function Cr(e){return typeof e!="number"?e:`${e}px solid`}function Dr(e,t){return Nt({prop:e,themeKey:"borders",transform:t})}const zw=Dr("border",Cr),Hw=Dr("borderTop",Cr),Gw=Dr("borderRight",Cr),Yw=Dr("borderBottom",Cr),Xw=Dr("borderLeft",Cr),Kw=Dr("borderColor"),qw=Dr("borderTopColor"),Jw=Dr("borderRightColor"),Zw=Dr("borderBottomColor"),Qw=Dr("borderLeftColor"),eT=Dr("outline",Cr),tT=Dr("outlineColor"),Ms=e=>{if(e.borderRadius!==void 0&&e.borderRadius!==null){const t=Ri(e.theme,"shape.borderRadius",4,"borderRadius"),r=n=>({borderRadius:Pi(t,n)});return Jr(e,e.borderRadius,r)}return null};Ms.propTypes=process.env.NODE_ENV!=="production"?{borderRadius:fn}:{};Ms.filterProps=["borderRadius"];js(zw,Hw,Gw,Yw,Xw,Kw,qw,Jw,Zw,Qw,Ms,eT,tT);const Ls=e=>{if(e.gap!==void 0&&e.gap!==null){const t=Ri(e.theme,"spacing",8,"gap"),r=n=>({gap:Pi(t,n)});return Jr(e,e.gap,r)}return null};Ls.propTypes=process.env.NODE_ENV!=="production"?{gap:fn}:{};Ls.filterProps=["gap"];const Bs=e=>{if(e.columnGap!==void 0&&e.columnGap!==null){const t=Ri(e.theme,"spacing",8,"columnGap"),r=n=>({columnGap:Pi(t,n)});return Jr(e,e.columnGap,r)}return null};Bs.propTypes=process.env.NODE_ENV!=="production"?{columnGap:fn}:{};Bs.filterProps=["columnGap"];const $s=e=>{if(e.rowGap!==void 0&&e.rowGap!==null){const t=Ri(e.theme,"spacing",8,"rowGap"),r=n=>({rowGap:Pi(t,n)});return Jr(e,e.rowGap,r)}return null};$s.propTypes=process.env.NODE_ENV!=="production"?{rowGap:fn}:{};$s.filterProps=["rowGap"];const rT=Nt({prop:"gridColumn"}),nT=Nt({prop:"gridRow"}),iT=Nt({prop:"gridAutoFlow"}),sT=Nt({prop:"gridAutoColumns"}),aT=Nt({prop:"gridAutoRows"}),oT=Nt({prop:"gridTemplateColumns"}),lT=Nt({prop:"gridTemplateRows"}),cT=Nt({prop:"gridTemplateAreas"}),uT=Nt({prop:"gridArea"});js(Ls,Bs,$s,rT,nT,iT,sT,aT,oT,lT,cT,uT);function Kn(e,t){return t==="grey"?t:e}const fT=Nt({prop:"color",themeKey:"palette",transform:Kn}),dT=Nt({prop:"bgcolor",cssProperty:"backgroundColor",themeKey:"palette",transform:Kn}),hT=Nt({prop:"backgroundColor",themeKey:"palette",transform:Kn});js(fT,dT,hT);function wr(e){return e<=1&&e!==0?`${e*100}%`:e}const pT=Nt({prop:"width",transform:wr}),yo=e=>{if(e.maxWidth!==void 0&&e.maxWidth!==null){const t=r=>{var i,s,a,o,f;const n=((a=(s=(i=e.theme)==null?void 0:i.breakpoints)==null?void 0:s.values)==null?void 0:a[r])||Fs[r];return n?((f=(o=e.theme)==null?void 0:o.breakpoints)==null?void 0:f.unit)!=="px"?{maxWidth:`${n}${e.theme.breakpoints.unit}`}:{maxWidth:n}:{maxWidth:wr(r)}};return Jr(e,e.maxWidth,t)}return null};yo.filterProps=["maxWidth"];const gT=Nt({prop:"minWidth",transform:wr}),mT=Nt({prop:"height",transform:wr}),xT=Nt({prop:"maxHeight",transform:wr}),vT=Nt({prop:"minHeight",transform:wr});Nt({prop:"size",cssProperty:"width",transform:wr});Nt({prop:"size",cssProperty:"height",transform:wr});const yT=Nt({prop:"boxSizing"});js(pT,yo,gT,mT,xT,vT,yT);const Us={border:{themeKey:"borders",transform:Cr},borderTop:{themeKey:"borders",transform:Cr},borderRight:{themeKey:"borders",transform:Cr},borderBottom:{themeKey:"borders",transform:Cr},borderLeft:{themeKey:"borders",transform:Cr},borderColor:{themeKey:"palette"},borderTopColor:{themeKey:"palette"},borderRightColor:{themeKey:"palette"},borderBottomColor:{themeKey:"palette"},borderLeftColor:{themeKey:"palette"},outline:{themeKey:"borders",transform:Cr},outlineColor:{themeKey:"palette"},borderRadius:{themeKey:"shape.borderRadius",style:Ms},color:{themeKey:"palette",transform:Kn},bgcolor:{themeKey:"palette",cssProperty:"backgroundColor",transform:Kn},backgroundColor:{themeKey:"palette",transform:Kn},p:{style:At},pt:{style:At},pr:{style:At},pb:{style:At},pl:{style:At},px:{style:At},py:{style:At},padding:{style:At},paddingTop:{style:At},paddingRight:{style:At},paddingBottom:{style:At},paddingLeft:{style:At},paddingX:{style:At},paddingY:{style:At},paddingInline:{style:At},paddingInlineStart:{style:At},paddingInlineEnd:{style:At},paddingBlock:{style:At},paddingBlockStart:{style:At},paddingBlockEnd:{style:At},m:{style:Ct},mt:{style:Ct},mr:{style:Ct},mb:{style:Ct},ml:{style:Ct},mx:{style:Ct},my:{style:Ct},margin:{style:Ct},marginTop:{style:Ct},marginRight:{style:Ct},marginBottom:{style:Ct},marginLeft:{style:Ct},marginX:{style:Ct},marginY:{style:Ct},marginInline:{style:Ct},marginInlineStart:{style:Ct},marginInlineEnd:{style:Ct},marginBlock:{style:Ct},marginBlockStart:{style:Ct},marginBlockEnd:{style:Ct},displayPrint:{cssProperty:!1,transform:e=>({"@media print":{display:e}})},display:{},overflow:{},textOverflow:{},visibility:{},whiteSpace:{},flexBasis:{},flexDirection:{},flexWrap:{},justifyContent:{},alignItems:{},alignContent:{},order:{},flex:{},flexGrow:{},flexShrink:{},alignSelf:{},justifyItems:{},justifySelf:{},gap:{style:Ls},rowGap:{style:$s},columnGap:{style:Bs},gridColumn:{},gridRow:{},gridAutoFlow:{},gridAutoColumns:{},gridAutoRows:{},gridTemplateColumns:{},gridTemplateRows:{},gridTemplateAreas:{},gridArea:{},position:{},zIndex:{themeKey:"zIndex"},top:{},right:{},bottom:{},left:{},boxShadow:{themeKey:"shadows"},width:{transform:wr},maxWidth:{style:yo},minWidth:{transform:wr},height:{transform:wr},maxHeight:{transform:wr},minHeight:{transform:wr},boxSizing:{},font:{themeKey:"font"},fontFamily:{themeKey:"typography"},fontSize:{themeKey:"typography"},fontStyle:{themeKey:"typography"},fontWeight:{themeKey:"typography"},letterSpacing:{},textTransform:{},lineHeight:{},textAlign:{},typography:{cssProperty:!1,themeKey:"typography"}};function wT(...e){const t=e.reduce((n,i)=>n.concat(Object.keys(i)),[]),r=new Set(t);return e.every(n=>r.size===Object.keys(n).length)}function TT(e,t){return typeof e=="function"?e(t):e}function ST(){function e(r,n,i,s){const a={[r]:n,theme:i},o=s[r];if(!o)return{[r]:n};const{cssProperty:f=r,themeKey:u,transform:d,style:h}=o;if(n==null)return null;if(u==="typography"&&n==="inherit")return{[r]:n};const m=Ns(i,u)||{};return h?h(a):Jr(a,n,v=>{let g=ws(m,d,v);return v===g&&typeof v=="string"&&(g=ws(m,d,`${r}${v==="default"?"":qu(v)}`,v)),f===!1?g:{[f]:g}})}function t(r){const{sx:n,theme:i={},nested:s}=r||{};if(!n)return null;const a=i.unstable_sxConfig??Us;function o(f){let u=f;if(typeof f=="function")u=f(i);else if(typeof f!="object")return f;if(!u)return null;const d=jw(i.breakpoints),h=Object.keys(d);let m=d;return Object.keys(u).forEach(l=>{const v=TT(u[l],i);if(v!=null)if(typeof v=="object")if(a[l])m=mi(m,e(l,v,i,a));else{const g=Jr({theme:i},v,x=>({[l]:x}));wT(g,v)?m[l]=t({sx:v,theme:i,nested:!0}):m=mi(m,g)}else m=mi(m,e(l,v,i,a))}),!s&&i.modularCssLayers?{"@layer sx":fc(i,hc(h,m))}:fc(i,hc(h,m))}return Array.isArray(n)?n.map(o):o(n)}return t}const ji=ST();ji.filterProps=["sx"];function ET(e,t){var n;const r=this;if(r.vars){if(!((n=r.colorSchemes)!=null&&n[e])||typeof r.getColorSchemeSelector!="function")return{};let i=r.getColorSchemeSelector(e);return i==="&"?t:((i.includes("data-")||i.includes("."))&&(i=`*:where(${i.replace(/\s*&$/,"")}) &`),{[i]:t})}return r.palette.mode===e?t:{}}function Qu(e={},...t){const{breakpoints:r={},palette:n={},spacing:i,shape:s={},...a}=e,o=kw(r),f=Zu(i);let u=Tr({breakpoints:o,direction:"ltr",components:{},palette:{mode:"light",...n},spacing:f,shape:{...Rw,...s}},a);return u=Nw(u),u.applyStyles=ET,u=t.reduce((d,h)=>Tr(d,h),u),u.unstable_sxConfig={...Us,...a==null?void 0:a.unstable_sxConfig},u.unstable_sx=function(h){return ji({sx:h,theme:this})},u}function _T(e){return Object.keys(e).length===0}function wo(e=null){const t=Be.useContext(Ha.ThemeContext);return!t||_T(t)?e:t}const bT=Qu();function CT(e=bT){return wo(e)}function ma(e){const t=bw(e);return e!==t&&t.styles?(t.styles.match(/^@layer\s+[^{]*$/)||(t.styles=`@layer global{${t.styles}}`),t):e}function To({styles:e,themeId:t,defaultTheme:r={}}){const n=CT(r),i=t&&n[t]||n;let s=typeof e=="function"?e(i):e;return i.modularCssLayers&&(Array.isArray(s)?s=s.map(a=>ma(typeof a=="function"?a(i):a)):s=ma(s)),c.jsx(xo,{styles:s})}process.env.NODE_ENV!=="production"&&(To.propTypes={defaultTheme:Ce.object,styles:Ce.oneOfType([Ce.array,Ce.func,Ce.number,Ce.object,Ce.string,Ce.bool]),themeId:Ce.string});const gc=e=>e,AT=()=>{let e=gc;return{configure(t){e=t},generate(t){return e(t)},reset(){e=gc}}},OT=AT();function ef(e){var t,r,n="";if(typeof e=="string"||typeof e=="number")n+=e;else if(typeof e=="object")if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(r=ef(e[t]))&&(n&&(n+=" "),n+=r)}else for(r in e)e[r]&&(n&&(n+=" "),n+=r);return n}function DT(){for(var e,t,r=0,n="",i=arguments.length;r<i;r++)(e=arguments[r])&&(t=ef(e))&&(n&&(n+=" "),n+=t);return n}const kT={active:"active",checked:"checked",completed:"completed",disabled:"disabled",error:"error",expanded:"expanded",focused:"focused",focusVisible:"focusVisible",open:"open",readOnly:"readOnly",required:"required",selected:"selected"};function IT(e,t,r="Mui"){const n=kT[t];return n?`${r}-${n}`:`${OT.generate(e)}-${t}`}function Ia(e,t,r=!1){const n={...t};for(const i in e)if(Object.prototype.hasOwnProperty.call(e,i)){const s=i;if(s==="components"||s==="slots")n[s]={...e[s],...n[s]};else if(s==="componentsProps"||s==="slotProps"){const a=e[s],o=t[s];if(!o)n[s]=a||{};else if(!a)n[s]=o;else{n[s]={...o};for(const f in a)if(Object.prototype.hasOwnProperty.call(a,f)){const u=f;n[s][u]=Ia(a[u],o[u],r)}}}else s==="className"&&r&&t.className?n.className=DT(e==null?void 0:e.className,t==null?void 0:t.className):s==="style"&&r&&t.style?n.style={...e==null?void 0:e.style,...t==null?void 0:t.style}:n[s]===void 0&&(n[s]=e[s])}return n}const tf=typeof window<"u"?Be.useLayoutEffect:Be.useEffect;function FT(e,t=Number.MIN_SAFE_INTEGER,r=Number.MAX_SAFE_INTEGER){return Math.max(t,Math.min(e,r))}function So(e,t=0,r=1){return process.env.NODE_ENV!=="production"&&(e<t||e>r)&&console.error(`MUI: The value provided ${e} is out of range [${t}, ${r}].`),FT(e,t,r)}function NT(e){e=e.slice(1);const t=new RegExp(`.{1,${e.length>=6?2:1}}`,"g");let r=e.match(t);return r&&r[0].length===1&&(r=r.map(n=>n+n)),process.env.NODE_ENV!=="production"&&e.length!==e.trim().length&&console.error(`MUI: The color: "${e}" is invalid. Make sure the color input doesn't contain leading/trailing space.`),r?`rgb${r.length===4?"a":""}(${r.map((n,i)=>i<3?parseInt(n,16):Math.round(parseInt(n,16)/255*1e3)/1e3).join(", ")})`:""}function cn(e){if(e.type)return e;if(e.charAt(0)==="#")return cn(NT(e));const t=e.indexOf("("),r=e.substring(0,t);if(!["rgb","rgba","hsl","hsla","color"].includes(r))throw new Error(process.env.NODE_ENV!=="production"?`MUI: Unsupported \`${e}\` color.
143
+ The following formats are supported: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla(), color().`:Sn(9,e));let n=e.substring(t+1,e.length-1),i;if(r==="color"){if(n=n.split(" "),i=n.shift(),n.length===4&&n[3].charAt(0)==="/"&&(n[3]=n[3].slice(1)),!["srgb","display-p3","a98-rgb","prophoto-rgb","rec-2020"].includes(i))throw new Error(process.env.NODE_ENV!=="production"?`MUI: unsupported \`${i}\` color space.
144
+ The following color spaces are supported: srgb, display-p3, a98-rgb, prophoto-rgb, rec-2020.`:Sn(10,i))}else n=n.split(",");return n=n.map(s=>parseFloat(s)),{type:r,values:n,colorSpace:i}}const RT=e=>{const t=cn(e);return t.values.slice(0,3).map((r,n)=>t.type.includes("hsl")&&n!==0?`${r}%`:r).join(" ")},li=(e,t)=>{try{return RT(e)}catch{return t&&process.env.NODE_ENV!=="production"&&console.warn(t),e}};function Ws(e){const{type:t,colorSpace:r}=e;let{values:n}=e;return t.includes("rgb")?n=n.map((i,s)=>s<3?parseInt(i,10):i):t.includes("hsl")&&(n[1]=`${n[1]}%`,n[2]=`${n[2]}%`),t.includes("color")?n=`${r} ${n.join(" ")}`:n=`${n.join(", ")}`,`${t}(${n})`}function rf(e){e=cn(e);const{values:t}=e,r=t[0],n=t[1]/100,i=t[2]/100,s=n*Math.min(i,1-i),a=(u,d=(u+r/30)%12)=>i-s*Math.max(Math.min(d-3,9-d,1),-1);let o="rgb";const f=[Math.round(a(0)*255),Math.round(a(8)*255),Math.round(a(4)*255)];return e.type==="hsla"&&(o+="a",f.push(t[3])),Ws({type:o,values:f})}function Fa(e){e=cn(e);let t=e.type==="hsl"||e.type==="hsla"?cn(rf(e)).values:e.values;return t=t.map(r=>(e.type!=="color"&&(r/=255),r<=.03928?r/12.92:((r+.055)/1.055)**2.4)),Number((.2126*t[0]+.7152*t[1]+.0722*t[2]).toFixed(3))}function mc(e,t){const r=Fa(e),n=Fa(t);return(Math.max(r,n)+.05)/(Math.min(r,n)+.05)}function nf(e,t){return e=cn(e),t=So(t),(e.type==="rgb"||e.type==="hsl")&&(e.type+="a"),e.type==="color"?e.values[3]=`/${t}`:e.values[3]=t,Ws(e)}function gn(e,t,r){try{return nf(e,t)}catch{return r&&process.env.NODE_ENV!=="production"&&console.warn(r),e}}function Vs(e,t){if(e=cn(e),t=So(t),e.type.includes("hsl"))e.values[2]*=1-t;else if(e.type.includes("rgb")||e.type.includes("color"))for(let r=0;r<3;r+=1)e.values[r]*=1-t;return Ws(e)}function it(e,t,r){try{return Vs(e,t)}catch{return r&&process.env.NODE_ENV!=="production"&&console.warn(r),e}}function zs(e,t){if(e=cn(e),t=So(t),e.type.includes("hsl"))e.values[2]+=(100-e.values[2])*t;else if(e.type.includes("rgb"))for(let r=0;r<3;r+=1)e.values[r]+=(255-e.values[r])*t;else if(e.type.includes("color"))for(let r=0;r<3;r+=1)e.values[r]+=(1-e.values[r])*t;return Ws(e)}function st(e,t,r){try{return zs(e,t)}catch{return r&&process.env.NODE_ENV!=="production"&&console.warn(r),e}}function PT(e,t=.15){return Fa(e)>.5?Vs(e,t):zs(e,t)}function Qi(e,t,r){try{return PT(e,t)}catch{return e}}const jT="exact-prop: ​";function sf(e){return process.env.NODE_ENV==="production"?e:{...e,[jT]:t=>{const r=Object.keys(t).filter(n=>!e.hasOwnProperty(n));return r.length>0?new Error(`The following props are not supported: ${r.map(n=>`\`${n}\``).join(", ")}. Please remove them.`):null}}}const Eo=Be.createContext(null);process.env.NODE_ENV!=="production"&&(Eo.displayName="ThemeContext");function _o(){const e=Be.useContext(Eo);return process.env.NODE_ENV!=="production"&&Be.useDebugValue(e),e}const MT=typeof Symbol=="function"&&Symbol.for,LT=MT?Symbol.for("mui.nested"):"__THEME_NESTED__";function BT(e,t){if(typeof t=="function"){const r=t(e);return process.env.NODE_ENV!=="production"&&(r||console.error(["MUI: You should return an object from your theme function, i.e.","<ThemeProvider theme={() => ({})} />"].join(`
145
+ `))),r}return{...e,...t}}function Ts(e){const{children:t,theme:r}=e,n=_o();process.env.NODE_ENV!=="production"&&n===null&&typeof r=="function"&&console.error(["MUI: You are providing a theme function prop to the ThemeProvider component:","<ThemeProvider theme={outerTheme => outerTheme} />","","However, no outer theme is present.","Make sure a theme is already injected higher in the React tree or provide a theme object."].join(`
146
+ `));const i=Be.useMemo(()=>{const s=n===null?{...r}:BT(n,r);return s!=null&&(s[LT]=n!==null),s},[r,n]);return c.jsx(Eo.Provider,{value:i,children:t})}process.env.NODE_ENV!=="production"&&(Ts.propTypes={children:Ce.node,theme:Ce.oneOfType([Ce.object,Ce.func]).isRequired});process.env.NODE_ENV!=="production"&&process.env.NODE_ENV!=="production"&&(Ts.propTypes=sf(Ts.propTypes));const $T=Be.createContext();function af({value:e,...t}){return c.jsx($T.Provider,{value:e??!0,...t})}process.env.NODE_ENV!=="production"&&(af.propTypes={children:Ce.node,value:Ce.bool});const of=Be.createContext(void 0);function lf({value:e,children:t}){return c.jsx(of.Provider,{value:e,children:t})}process.env.NODE_ENV!=="production"&&(lf.propTypes={children:Ce.node,value:Ce.object});function UT(e){const{theme:t,name:r,props:n}=e;if(!t||!t.components||!t.components[r])return n;const i=t.components[r];return i.defaultProps?Ia(i.defaultProps,n,t.components.mergeClassNameAndStyle):!i.styleOverrides&&!i.variants?Ia(i,n,t.components.mergeClassNameAndStyle):n}function WT({props:e,name:t}){const r=Be.useContext(of);return UT({props:e,name:t,theme:{components:r}})}let xc=0;function VT(e){const[t,r]=Be.useState(e),n=e||t;return Be.useEffect(()=>{t==null&&(xc+=1,r(`mui-${xc}`))},[t]),n}const zT={...Be},vc=zT.useId;function HT(e){return vc!==void 0?vc():VT(e)}function GT(e){const t=wo(),r=HT()||"",{modularCssLayers:n}=e;let i="mui.global, mui.components, mui.theme, mui.custom, mui.sx";return!n||t!==null?i="":typeof n=="string"?i=n.replace(/mui(?!\.)/g,i):i=`@layer ${i};`,tf(()=>{var o,f;const s=document.querySelector("head");if(!s)return;const a=s.firstChild;if(i){if(a&&((o=a.hasAttribute)!=null&&o.call(a,"data-mui-layer-order"))&&a.getAttribute("data-mui-layer-order")===r)return;const u=document.createElement("style");u.setAttribute("data-mui-layer-order",r),u.textContent=i,s.prepend(u)}else(f=s.querySelector(`style[data-mui-layer-order="${r}"]`))==null||f.remove()},[i,r]),i?c.jsx(To,{styles:i}):null}const yc={};function wc(e,t,r,n=!1){return Be.useMemo(()=>{const i=e&&t[e]||t;if(typeof r=="function"){const s=r(i),a=e?{...t,[e]:s}:s;return n?()=>a:a}return e?{...t,[e]:r}:{...t,...r}},[e,t,r,n])}function bi(e){const{children:t,theme:r,themeId:n}=e,i=wo(yc),s=_o()||yc;process.env.NODE_ENV!=="production"&&(i===null&&typeof r=="function"||n&&i&&!i[n]&&typeof r=="function")&&console.error(["MUI: You are providing a theme function prop to the ThemeProvider component:","<ThemeProvider theme={outerTheme => outerTheme} />","","However, no outer theme is present.","Make sure a theme is already injected higher in the React tree or provide a theme object."].join(`
147
+ `));const a=wc(n,i,r),o=wc(n,s,r,!0),f=(n?a[n]:a).direction==="rtl",u=GT(a);return c.jsx(Ts,{theme:o,children:c.jsx(Ha.ThemeContext.Provider,{value:a,children:c.jsx(af,{value:f,children:c.jsxs(lf,{value:n?a[n].components:a.components,children:[u,t]})})})})}process.env.NODE_ENV!=="production"&&(bi.propTypes={children:Ce.node,theme:Ce.oneOfType([Ce.func,Ce.object]).isRequired,themeId:Ce.string});process.env.NODE_ENV!=="production"&&process.env.NODE_ENV!=="production"&&(bi.propTypes=sf(bi.propTypes));const bo="mode",Co="color-scheme",YT="data-color-scheme";function XT(e){const{defaultMode:t="system",defaultLightColorScheme:r="light",defaultDarkColorScheme:n="dark",modeStorageKey:i=bo,colorSchemeStorageKey:s=Co,attribute:a=YT,colorSchemeNode:o="document.documentElement",nonce:f}=e||{};let u="",d=a;if(a==="class"&&(d=".%s"),a==="data"&&(d="[data-%s]"),d.startsWith(".")){const m=d.substring(1);u+=`${o}.classList.remove('${m}'.replace('%s', light), '${m}'.replace('%s', dark));
148
+ ${o}.classList.add('${m}'.replace('%s', colorScheme));`}const h=d.match(/\[([^[\]]+)\]/);if(h){const[m,l]=h[1].split("=");l||(u+=`${o}.removeAttribute('${m}'.replace('%s', light));
149
+ ${o}.removeAttribute('${m}'.replace('%s', dark));`),u+=`
150
+ ${o}.setAttribute('${m}'.replace('%s', colorScheme), ${l?`${l}.replace('%s', colorScheme)`:'""'});`}else d!==".%s"&&(u+=`${o}.setAttribute('${d}', colorScheme);`);return c.jsx("script",{suppressHydrationWarning:!0,nonce:typeof window>"u"?f:"",dangerouslySetInnerHTML:{__html:`(function() {
151
+ try {
152
+ let colorScheme = '';
153
+ const mode = localStorage.getItem('${i}') || '${t}';
154
+ const dark = localStorage.getItem('${s}-dark') || '${n}';
155
+ const light = localStorage.getItem('${s}-light') || '${r}';
156
+ if (mode === 'system') {
157
+ // handle system mode
158
+ const mql = window.matchMedia('(prefers-color-scheme: dark)');
159
+ if (mql.matches) {
160
+ colorScheme = dark
161
+ } else {
162
+ colorScheme = light
163
+ }
164
+ }
165
+ if (mode === 'light') {
166
+ colorScheme = light;
167
+ }
168
+ if (mode === 'dark') {
169
+ colorScheme = dark;
170
+ }
171
+ if (colorScheme) {
172
+ ${u}
173
+ }
174
+ } catch(e){}})();`}},"mui-color-scheme-init")}function KT(){}const qT=({key:e,storageWindow:t})=>(!t&&typeof window<"u"&&(t=window),{get(r){if(typeof window>"u")return;if(!t)return r;let n;try{n=t.localStorage.getItem(e)}catch{}return n||r},set:r=>{if(t)try{t.localStorage.setItem(e,r)}catch{}},subscribe:r=>{if(!t)return KT;const n=i=>{const s=i.newValue;i.key===e&&r(s)};return t.addEventListener("storage",n),()=>{t.removeEventListener("storage",n)}}});function xa(){}function Tc(e){if(typeof window<"u"&&typeof window.matchMedia=="function"&&e==="system")return window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}function cf(e,t){if(e.mode==="light"||e.mode==="system"&&e.systemMode==="light")return t("light");if(e.mode==="dark"||e.mode==="system"&&e.systemMode==="dark")return t("dark")}function JT(e){return cf(e,t=>{if(t==="light")return e.lightColorScheme;if(t==="dark")return e.darkColorScheme})}function ZT(e){const{defaultMode:t="light",defaultLightColorScheme:r,defaultDarkColorScheme:n,supportedColorSchemes:i=[],modeStorageKey:s=bo,colorSchemeStorageKey:a=Co,storageWindow:o=typeof window>"u"?void 0:window,storageManager:f=qT,noSsr:u=!1}=e,d=i.join(","),h=i.length>1,m=Be.useMemo(()=>f==null?void 0:f({key:s,storageWindow:o}),[f,s,o]),l=Be.useMemo(()=>f==null?void 0:f({key:`${a}-light`,storageWindow:o}),[f,a,o]),v=Be.useMemo(()=>f==null?void 0:f({key:`${a}-dark`,storageWindow:o}),[f,a,o]),[g,x]=Be.useState(()=>{const B=(m==null?void 0:m.get(t))||t,M=(l==null?void 0:l.get(r))||r,L=(v==null?void 0:v.get(n))||n;return{mode:B,systemMode:Tc(B),lightColorScheme:M,darkColorScheme:L}}),[T,b]=Be.useState(u||!h);Be.useEffect(()=>{b(!0)},[]);const _=JT(g),k=Be.useCallback(B=>{x(M=>{if(B===M.mode)return M;const L=B??t;return m==null||m.set(L),{...M,mode:L,systemMode:Tc(L)}})},[m,t]),F=Be.useCallback(B=>{B?typeof B=="string"?B&&!d.includes(B)?console.error(`\`${B}\` does not exist in \`theme.colorSchemes\`.`):x(M=>{const L={...M};return cf(M,W=>{W==="light"&&(l==null||l.set(B),L.lightColorScheme=B),W==="dark"&&(v==null||v.set(B),L.darkColorScheme=B)}),L}):x(M=>{const L={...M},W=B.light===null?r:B.light,y=B.dark===null?n:B.dark;return W&&(d.includes(W)?(L.lightColorScheme=W,l==null||l.set(W)):console.error(`\`${W}\` does not exist in \`theme.colorSchemes\`.`)),y&&(d.includes(y)?(L.darkColorScheme=y,v==null||v.set(y)):console.error(`\`${y}\` does not exist in \`theme.colorSchemes\`.`)),L}):x(M=>(l==null||l.set(r),v==null||v.set(n),{...M,lightColorScheme:r,darkColorScheme:n}))},[d,l,v,r,n]),z=Be.useCallback(B=>{g.mode==="system"&&x(M=>{const L=B!=null&&B.matches?"dark":"light";return M.systemMode===L?M:{...M,systemMode:L}})},[g.mode]),N=Be.useRef(z);return N.current=z,Be.useEffect(()=>{if(typeof window.matchMedia!="function"||!h)return;const B=(...L)=>N.current(...L),M=window.matchMedia("(prefers-color-scheme: dark)");return M.addListener(B),B(M),()=>{M.removeListener(B)}},[h]),Be.useEffect(()=>{if(h){const B=(m==null?void 0:m.subscribe(W=>{(!W||["light","dark","system"].includes(W))&&k(W||t)}))||xa,M=(l==null?void 0:l.subscribe(W=>{(!W||d.match(W))&&F({light:W})}))||xa,L=(v==null?void 0:v.subscribe(W=>{(!W||d.match(W))&&F({dark:W})}))||xa;return()=>{B(),M(),L()}}},[F,k,d,t,o,h,m,l,v]),{...g,mode:T?g.mode:void 0,systemMode:T?g.systemMode:void 0,colorScheme:T?_:void 0,setMode:k,setColorScheme:F}}const QT="*{-webkit-transition:none!important;-moz-transition:none!important;-o-transition:none!important;-ms-transition:none!important;transition:none!important}";function eS(e){const{themeId:t,theme:r={},modeStorageKey:n=bo,colorSchemeStorageKey:i=Co,disableTransitionOnChange:s=!1,defaultColorScheme:a,resolveTheme:o}=e,f={allColorSchemes:[],colorScheme:void 0,darkColorScheme:void 0,lightColorScheme:void 0,mode:void 0,setColorScheme:()=>{},setMode:()=>{},systemMode:void 0},u=Be.createContext(void 0);process.env.NODE_ENV!=="production"&&(u.displayName="ColorSchemeContext");const d=()=>Be.useContext(u)||f,h={},m={};function l(T){var It,Gt,Lt,Bt;const{children:b,theme:_,modeStorageKey:k=n,colorSchemeStorageKey:F=i,disableTransitionOnChange:z=s,storageManager:N,storageWindow:B=typeof window>"u"?void 0:window,documentNode:M=typeof document>"u"?void 0:document,colorSchemeNode:L=typeof document>"u"?void 0:document.documentElement,disableNestedContext:W=!1,disableStyleSheetGeneration:y=!1,defaultMode:H="system",forceThemeRerender:Q=!1,noSsr:J}=T,ee=Be.useRef(!1),_e=_o(),Ae=Be.useContext(u),De=!!Ae&&!W,oe=Be.useMemo(()=>_||(typeof r=="function"?r():r),[_]),ce=oe[t],C=ce||oe,{colorSchemes:j=h,components:R=m,cssVarPrefix:P}=C,V=Object.keys(j).filter(qe=>!!j[qe]).join(","),le=Be.useMemo(()=>V.split(","),[V]),fe=typeof a=="string"?a:a.light,ue=typeof a=="string"?a:a.dark,te=j[fe]&&j[ue]?H:((Gt=(It=j[C.defaultColorScheme])==null?void 0:It.palette)==null?void 0:Gt.mode)||((Lt=C.palette)==null?void 0:Lt.mode),{mode:Ie,setMode:ae,systemMode:Pe,lightColorScheme:ke,darkColorScheme:pt,colorScheme:He,setColorScheme:we}=ZT({supportedColorSchemes:le,defaultLightColorScheme:fe,defaultDarkColorScheme:ue,modeStorageKey:k,colorSchemeStorageKey:F,defaultMode:te,storageManager:N,storageWindow:B,noSsr:J});let ut=Ie,je=He;De&&(ut=Ae.mode,je=Ae.colorScheme),process.env.NODE_ENV!=="production"&&Q&&!C.vars&&console.warn(["MUI: The `forceThemeRerender` prop should only be used with CSS theme variables.","Note that it will slow down the app when changing between modes, so only do this when you cannot find a better solution."].join(`
175
+ `));let Rt=je||C.defaultColorScheme;C.vars&&!Q&&(Rt=C.defaultColorScheme);const vt=Be.useMemo(()=>{var gt;const qe=((gt=C.generateThemeVars)==null?void 0:gt.call(C))||C.vars,Je={...C,components:R,colorSchemes:j,cssVarPrefix:P,vars:qe};if(typeof Je.generateSpacing=="function"&&(Je.spacing=Je.generateSpacing()),Rt){const Ft=j[Rt];Ft&&typeof Ft=="object"&&Object.keys(Ft).forEach(bt=>{Ft[bt]&&typeof Ft[bt]=="object"?Je[bt]={...Je[bt],...Ft[bt]}:Je[bt]=Ft[bt]})}return o?o(Je):Je},[C,Rt,R,j,P]),rt=C.colorSchemeSelector;tf(()=>{if(je&&L&&rt&&rt!=="media"){const qe=rt;let Je=rt;if(qe==="class"&&(Je=".%s"),qe==="data"&&(Je="[data-%s]"),qe!=null&&qe.startsWith("data-")&&!qe.includes("%s")&&(Je=`[${qe}="%s"]`),Je.startsWith("."))L.classList.remove(...le.map(gt=>Je.substring(1).replace("%s",gt))),L.classList.add(Je.substring(1).replace("%s",je));else{const gt=Je.replace("%s",je).match(/\[([^\]]+)\]/);if(gt){const[Ft,bt]=gt[1].split("=");bt||le.forEach(cr=>{L.removeAttribute(Ft.replace(je,cr))}),L.setAttribute(Ft,bt?bt.replace(/"|'/g,""):"")}else L.setAttribute(Je,je)}}},[je,rt,L,le]),Be.useEffect(()=>{let qe;if(z&&ee.current&&M){const Je=M.createElement("style");Je.appendChild(M.createTextNode(QT)),M.head.appendChild(Je),window.getComputedStyle(M.body),qe=setTimeout(()=>{M.head.removeChild(Je)},1)}return()=>{clearTimeout(qe)}},[je,z,M]),Be.useEffect(()=>(ee.current=!0,()=>{ee.current=!1}),[]);const kt=Be.useMemo(()=>({allColorSchemes:le,colorScheme:je,darkColorScheme:pt,lightColorScheme:ke,mode:ut,setColorScheme:we,setMode:process.env.NODE_ENV==="production"?ae:qe=>{vt.colorSchemeSelector==="media"&&console.error(["MUI: The `setMode` function has no effect if `colorSchemeSelector` is `media` (`media` is the default value).","To toggle the mode manually, please configure `colorSchemeSelector` to use a class or data attribute.","To learn more, visit https://mui.com/material-ui/customization/css-theme-variables/configuration/#toggling-dark-mode-manually"].join(`
176
+ `)),ae(qe)},systemMode:Pe}),[le,je,pt,ke,ut,we,ae,Pe,vt.colorSchemeSelector]);let Xe=!0;(y||C.cssVariables===!1||De&&(_e==null?void 0:_e.cssVarPrefix)===P)&&(Xe=!1);const Ht=c.jsxs(Be.Fragment,{children:[c.jsx(bi,{themeId:ce?t:void 0,theme:vt,children:b}),Xe&&c.jsx(xo,{styles:((Bt=vt.generateStyleSheets)==null?void 0:Bt.call(vt))||[]})]});return De?Ht:c.jsx(u.Provider,{value:kt,children:Ht})}process.env.NODE_ENV!=="production"&&(l.propTypes={children:Ce.node,colorSchemeNode:Ce.any,colorSchemeStorageKey:Ce.string,defaultMode:Ce.string,disableNestedContext:Ce.bool,disableStyleSheetGeneration:Ce.bool,disableTransitionOnChange:Ce.bool,documentNode:Ce.any,forceThemeRerender:Ce.bool,modeStorageKey:Ce.string,noSsr:Ce.bool,storageManager:Ce.func,storageWindow:Ce.any,theme:Ce.object});const v=typeof a=="string"?a:a.light,g=typeof a=="string"?a:a.dark;return{CssVarsProvider:l,useColorScheme:d,getInitColorSchemeScript:T=>XT({colorSchemeStorageKey:i,defaultLightColorScheme:v,defaultDarkColorScheme:g,modeStorageKey:n,...T})}}function tS(e=""){function t(...n){if(!n.length)return"";const i=n[0];return typeof i=="string"&&!i.match(/(#|\(|\)|(-?(\d*\.)?\d+)(px|em|%|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc))|^(-?(\d*\.)?\d+)$|(\d+ \d+ \d+)/)?`, var(--${e?`${e}-`:""}${i}${t(...n.slice(1))})`:`, ${i}`}return(n,...i)=>`var(--${e?`${e}-`:""}${n}${t(...i)})`}const Sc=(e,t,r,n=[])=>{let i=e;t.forEach((s,a)=>{a===t.length-1?Array.isArray(i)?i[Number(s)]=r:i&&typeof i=="object"&&(i[s]=r):i&&typeof i=="object"&&(i[s]||(i[s]=n.includes(s)?[]:{}),i=i[s])})},rS=(e,t,r)=>{function n(i,s=[],a=[]){Object.entries(i).forEach(([o,f])=>{(!r||r&&!r([...s,o]))&&f!=null&&(typeof f=="object"&&Object.keys(f).length>0?n(f,[...s,o],Array.isArray(f)?[...a,o]:a):t([...s,o],f,a))})}n(e)},nS=(e,t)=>typeof t=="number"?["lineHeight","fontWeight","opacity","zIndex"].some(n=>e.includes(n))||e[e.length-1].toLowerCase().includes("opacity")?t:`${t}px`:t;function va(e,t){const{prefix:r,shouldSkipGeneratingVar:n}=t||{},i={},s={},a={};return rS(e,(o,f,u)=>{if((typeof f=="string"||typeof f=="number")&&(!n||!n(o,f))){const d=`--${r?`${r}-`:""}${o.join("-")}`,h=nS(o,f);Object.assign(i,{[d]:h}),Sc(s,o,`var(${d})`,u),Sc(a,o,`var(${d}, ${h})`,u)}},o=>o[0]==="vars"),{css:i,vars:s,varsWithDefaults:a}}function iS(e,t={}){const{getSelector:r=T,disableCssColorScheme:n,colorSchemeSelector:i,enableContrastVars:s}=t,{colorSchemes:a={},components:o,defaultColorScheme:f="light",...u}=e,{vars:d,css:h,varsWithDefaults:m}=va(u,t);let l=m;const v={},{[f]:g,...x}=a;if(Object.entries(x||{}).forEach(([k,F])=>{const{vars:z,css:N,varsWithDefaults:B}=va(F,t);l=Tr(l,B),v[k]={css:N,vars:z}}),g){const{css:k,vars:F,varsWithDefaults:z}=va(g,t);l=Tr(l,z),v[f]={css:k,vars:F}}function T(k,F){var N,B;let z=i;if(i==="class"&&(z=".%s"),i==="data"&&(z="[data-%s]"),i!=null&&i.startsWith("data-")&&!i.includes("%s")&&(z=`[${i}="%s"]`),k){if(z==="media")return e.defaultColorScheme===k?":root":{[`@media (prefers-color-scheme: ${((B=(N=a[k])==null?void 0:N.palette)==null?void 0:B.mode)||k})`]:{":root":F}};if(z)return e.defaultColorScheme===k?`:root, ${z.replace("%s",String(k))}`:z.replace("%s",String(k))}return":root"}return{vars:l,generateThemeVars:()=>{let k={...d};return Object.entries(v).forEach(([,{vars:F}])=>{k=Tr(k,F)}),k},generateStyleSheets:()=>{var M,L;const k=[],F=e.defaultColorScheme||"light";function z(W,y){Object.keys(y).length&&k.push(typeof W=="string"?{[W]:{...y}}:W)}z(r(void 0,{...h}),h);const{[F]:N,...B}=v;if(N){const{css:W}=N,y=(L=(M=a[F])==null?void 0:M.palette)==null?void 0:L.mode,H=!n&&y?{colorScheme:y,...W}:{...W};z(r(F,{...H}),H)}return Object.entries(B).forEach(([W,{css:y}])=>{var J,ee;const H=(ee=(J=a[W])==null?void 0:J.palette)==null?void 0:ee.mode,Q=!n&&H?{colorScheme:H,...y}:{...y};z(r(W,{...Q}),Q)}),s&&k.push({":root":{"--__l-threshold":"0.7","--__l":"clamp(0, (l / var(--__l-threshold) - 1) * -infinity, 1)","--__a":"clamp(0.87, (l / var(--__l-threshold) - 1) * -infinity, 1)"}}),k}}}function sS(e){return function(r){return e==="media"?(process.env.NODE_ENV!=="production"&&r!=="light"&&r!=="dark"&&console.error(`MUI: @media (prefers-color-scheme) supports only 'light' or 'dark', but receive '${r}'.`),`@media (prefers-color-scheme: ${r})`):e?e.startsWith("data-")&&!e.includes("%s")?`[${e}="${r}"] &`:e==="class"?`.${r} &`:e==="data"?`[data-${r}] &`:`${e.replace("%s",r)} &`:"&"}}const Ci={black:"#000",white:"#fff"},aS={50:"#fafafa",100:"#f5f5f5",200:"#eeeeee",300:"#e0e0e0",400:"#bdbdbd",500:"#9e9e9e",600:"#757575",700:"#616161",800:"#424242",900:"#212121",A100:"#f5f5f5",A200:"#eeeeee",A400:"#bdbdbd",A700:"#616161"},Pn={50:"#f3e5f5",200:"#ce93d8",300:"#ba68c8",400:"#ab47bc",500:"#9c27b0",700:"#7b1fa2"},jn={300:"#e57373",400:"#ef5350",500:"#f44336",700:"#d32f2f",800:"#c62828"},si={300:"#ffb74d",400:"#ffa726",500:"#ff9800",700:"#f57c00",900:"#e65100"},Mn={50:"#e3f2fd",200:"#90caf9",400:"#42a5f5",700:"#1976d2",800:"#1565c0"},Ln={300:"#4fc3f7",400:"#29b6f6",500:"#03a9f4",700:"#0288d1",900:"#01579b"},Bn={300:"#81c784",400:"#66bb6a",500:"#4caf50",700:"#388e3c",800:"#2e7d32",900:"#1b5e20"};function uf(){return{text:{primary:"rgba(0, 0, 0, 0.87)",secondary:"rgba(0, 0, 0, 0.6)",disabled:"rgba(0, 0, 0, 0.38)"},divider:"rgba(0, 0, 0, 0.12)",background:{paper:Ci.white,default:Ci.white},action:{active:"rgba(0, 0, 0, 0.54)",hover:"rgba(0, 0, 0, 0.04)",hoverOpacity:.04,selected:"rgba(0, 0, 0, 0.08)",selectedOpacity:.08,disabled:"rgba(0, 0, 0, 0.26)",disabledBackground:"rgba(0, 0, 0, 0.12)",disabledOpacity:.38,focus:"rgba(0, 0, 0, 0.12)",focusOpacity:.12,activatedOpacity:.12}}}const ff=uf();function df(){return{text:{primary:Ci.white,secondary:"rgba(255, 255, 255, 0.7)",disabled:"rgba(255, 255, 255, 0.5)",icon:"rgba(255, 255, 255, 0.5)"},divider:"rgba(255, 255, 255, 0.12)",background:{paper:"#121212",default:"#121212"},action:{active:Ci.white,hover:"rgba(255, 255, 255, 0.08)",hoverOpacity:.08,selected:"rgba(255, 255, 255, 0.16)",selectedOpacity:.16,disabled:"rgba(255, 255, 255, 0.3)",disabledBackground:"rgba(255, 255, 255, 0.12)",disabledOpacity:.38,focus:"rgba(255, 255, 255, 0.12)",focusOpacity:.12,activatedOpacity:.24}}}const Na=df();function Ec(e,t,r,n){const i=n.light||n,s=n.dark||n*1.5;e[t]||(e.hasOwnProperty(r)?e[t]=e[r]:t==="light"?e.light=zs(e.main,i):t==="dark"&&(e.dark=Vs(e.main,s)))}function _c(e,t,r,n,i){const s=i.light||i,a=i.dark||i*1.5;t[r]||(t.hasOwnProperty(n)?t[r]=t[n]:r==="light"?t.light=`color-mix(in ${e}, ${t.main}, #fff ${(s*100).toFixed(0)}%)`:r==="dark"&&(t.dark=`color-mix(in ${e}, ${t.main}, #000 ${(a*100).toFixed(0)}%)`))}function oS(e="light"){return e==="dark"?{main:Mn[200],light:Mn[50],dark:Mn[400]}:{main:Mn[700],light:Mn[400],dark:Mn[800]}}function lS(e="light"){return e==="dark"?{main:Pn[200],light:Pn[50],dark:Pn[400]}:{main:Pn[500],light:Pn[300],dark:Pn[700]}}function cS(e="light"){return e==="dark"?{main:jn[500],light:jn[300],dark:jn[700]}:{main:jn[700],light:jn[400],dark:jn[800]}}function uS(e="light"){return e==="dark"?{main:Ln[400],light:Ln[300],dark:Ln[700]}:{main:Ln[700],light:Ln[500],dark:Ln[900]}}function fS(e="light"){return e==="dark"?{main:Bn[400],light:Bn[300],dark:Bn[700]}:{main:Bn[800],light:Bn[500],dark:Bn[900]}}function dS(e="light"){return e==="dark"?{main:si[400],light:si[300],dark:si[700]}:{main:"#ed6c02",light:si[500],dark:si[900]}}function hS(e){return`oklch(from ${e} var(--__l) 0 h / var(--__a))`}function Ao(e){const{mode:t="light",contrastThreshold:r=3,tonalOffset:n=.2,colorSpace:i,...s}=e,a=e.primary||oS(t),o=e.secondary||lS(t),f=e.error||cS(t),u=e.info||uS(t),d=e.success||fS(t),h=e.warning||dS(t);function m(x){if(i)return hS(x);const T=mc(x,Na.text.primary)>=r?Na.text.primary:ff.text.primary;if(process.env.NODE_ENV!=="production"){const b=mc(x,T);b<3&&console.error([`MUI: The contrast ratio of ${b}:1 for ${T} on ${x}`,"falls below the WCAG recommended absolute minimum contrast ratio of 3:1.","https://www.w3.org/TR/2008/REC-WCAG20-20081211/#visual-audio-contrast-contrast"].join(`
177
+ `))}return T}const l=({color:x,name:T,mainShade:b=500,lightShade:_=300,darkShade:k=700})=>{if(x={...x},!x.main&&x[b]&&(x.main=x[b]),!x.hasOwnProperty("main"))throw new Error(process.env.NODE_ENV!=="production"?`MUI: The color${T?` (${T})`:""} provided to augmentColor(color) is invalid.
178
+ The color object needs to have a \`main\` property or a \`${b}\` property.`:Sn(11,T?` (${T})`:"",b));if(typeof x.main!="string")throw new Error(process.env.NODE_ENV!=="production"?`MUI: The color${T?` (${T})`:""} provided to augmentColor(color) is invalid.
179
+ \`color.main\` should be a string, but \`${JSON.stringify(x.main)}\` was provided instead.
180
+
181
+ Did you intend to use one of the following approaches?
182
+
183
+ import { green } from "@mui/material/colors";
184
+
185
+ const theme1 = createTheme({ palette: {
186
+ primary: green,
187
+ } });
188
+
189
+ const theme2 = createTheme({ palette: {
190
+ primary: { main: green[500] },
191
+ } });`:Sn(12,T?` (${T})`:"",JSON.stringify(x.main)));return i?(_c(i,x,"light",_,n),_c(i,x,"dark",k,n)):(Ec(x,"light",_,n),Ec(x,"dark",k,n)),x.contrastText||(x.contrastText=m(x.main)),x};let v;return t==="light"?v=uf():t==="dark"&&(v=df()),process.env.NODE_ENV!=="production"&&(v||console.error(`MUI: The palette mode \`${t}\` is not supported.`)),Tr({common:{...Ci},mode:t,primary:l({color:a,name:"primary"}),secondary:l({color:o,name:"secondary",mainShade:"A400",lightShade:"A200",darkShade:"A700"}),error:l({color:f,name:"error"}),warning:l({color:h,name:"warning"}),info:l({color:u,name:"info"}),success:l({color:d,name:"success"}),grey:aS,contrastThreshold:r,getContrastText:m,augmentColor:l,tonalOffset:n,...v},s)}function pS(e){const t={};return Object.entries(e).forEach(n=>{const[i,s]=n;typeof s=="object"&&(t[i]=`${s.fontStyle?`${s.fontStyle} `:""}${s.fontVariant?`${s.fontVariant} `:""}${s.fontWeight?`${s.fontWeight} `:""}${s.fontStretch?`${s.fontStretch} `:""}${s.fontSize||""}${s.lineHeight?`/${s.lineHeight} `:""}${s.fontFamily||""}`)}),t}function gS(e,t){return{toolbar:{minHeight:56,[e.up("xs")]:{"@media (orientation: landscape)":{minHeight:48}},[e.up("sm")]:{minHeight:64}},...t}}function mS(e){return Math.round(e*1e5)/1e5}const bc={textTransform:"uppercase"},Cc='"Roboto", "Helvetica", "Arial", sans-serif';function hf(e,t){const{fontFamily:r=Cc,fontSize:n=14,fontWeightLight:i=300,fontWeightRegular:s=400,fontWeightMedium:a=500,fontWeightBold:o=700,htmlFontSize:f=16,allVariants:u,pxToRem:d,...h}=typeof t=="function"?t(e):t;process.env.NODE_ENV!=="production"&&(typeof n!="number"&&console.error("MUI: `fontSize` is required to be a number."),typeof f!="number"&&console.error("MUI: `htmlFontSize` is required to be a number."));const m=n/14,l=d||(x=>`${x/f*m}rem`),v=(x,T,b,_,k)=>({fontFamily:r,fontWeight:x,fontSize:l(T),lineHeight:b,...r===Cc?{letterSpacing:`${mS(_/T)}em`}:{},...k,...u}),g={h1:v(i,96,1.167,-1.5),h2:v(i,60,1.2,-.5),h3:v(s,48,1.167,0),h4:v(s,34,1.235,.25),h5:v(s,24,1.334,0),h6:v(a,20,1.6,.15),subtitle1:v(s,16,1.75,.15),subtitle2:v(a,14,1.57,.1),body1:v(s,16,1.5,.15),body2:v(s,14,1.43,.15),button:v(a,14,1.75,.4,bc),caption:v(s,12,1.66,.4),overline:v(s,12,2.66,1,bc),inherit:{fontFamily:"inherit",fontWeight:"inherit",fontSize:"inherit",lineHeight:"inherit",letterSpacing:"inherit"}};return Tr({htmlFontSize:f,pxToRem:l,fontFamily:r,fontSize:n,fontWeightLight:i,fontWeightRegular:s,fontWeightMedium:a,fontWeightBold:o,...g},h,{clone:!1})}const xS=.2,vS=.14,yS=.12;function St(...e){return[`${e[0]}px ${e[1]}px ${e[2]}px ${e[3]}px rgba(0,0,0,${xS})`,`${e[4]}px ${e[5]}px ${e[6]}px ${e[7]}px rgba(0,0,0,${vS})`,`${e[8]}px ${e[9]}px ${e[10]}px ${e[11]}px rgba(0,0,0,${yS})`].join(",")}const wS=["none",St(0,2,1,-1,0,1,1,0,0,1,3,0),St(0,3,1,-2,0,2,2,0,0,1,5,0),St(0,3,3,-2,0,3,4,0,0,1,8,0),St(0,2,4,-1,0,4,5,0,0,1,10,0),St(0,3,5,-1,0,5,8,0,0,1,14,0),St(0,3,5,-1,0,6,10,0,0,1,18,0),St(0,4,5,-2,0,7,10,1,0,2,16,1),St(0,5,5,-3,0,8,10,1,0,3,14,2),St(0,5,6,-3,0,9,12,1,0,3,16,2),St(0,6,6,-3,0,10,14,1,0,4,18,3),St(0,6,7,-4,0,11,15,1,0,4,20,3),St(0,7,8,-4,0,12,17,2,0,5,22,4),St(0,7,8,-4,0,13,19,2,0,5,24,4),St(0,7,9,-4,0,14,21,2,0,5,26,4),St(0,8,9,-5,0,15,22,2,0,6,28,5),St(0,8,10,-5,0,16,24,2,0,6,30,5),St(0,8,11,-5,0,17,26,2,0,6,32,5),St(0,9,11,-5,0,18,28,2,0,7,34,6),St(0,9,12,-6,0,19,29,2,0,7,36,6),St(0,10,13,-6,0,20,31,3,0,8,38,7),St(0,10,13,-6,0,21,33,3,0,8,40,7),St(0,10,14,-6,0,22,35,3,0,8,42,7),St(0,11,14,-7,0,23,36,3,0,9,44,8),St(0,11,15,-7,0,24,38,3,0,9,46,8)],TS={easeInOut:"cubic-bezier(0.4, 0, 0.2, 1)",easeOut:"cubic-bezier(0.0, 0, 0.2, 1)",easeIn:"cubic-bezier(0.4, 0, 1, 1)",sharp:"cubic-bezier(0.4, 0, 0.6, 1)"},SS={shortest:150,shorter:200,short:250,standard:300,complex:375,enteringScreen:225,leavingScreen:195};function Ac(e){return`${Math.round(e)}ms`}function ES(e){if(!e)return 0;const t=e/36;return Math.min(Math.round((4+15*t**.25+t/5)*10),3e3)}function _S(e){const t={...TS,...e.easing},r={...SS,...e.duration};return{getAutoHeightDuration:ES,create:(i=["all"],s={})=>{const{duration:a=r.standard,easing:o=t.easeInOut,delay:f=0,...u}=s;if(process.env.NODE_ENV!=="production"){const d=m=>typeof m=="string",h=m=>!Number.isNaN(parseFloat(m));!d(i)&&!Array.isArray(i)&&console.error('MUI: Argument "props" must be a string or Array.'),!h(a)&&!d(a)&&console.error(`MUI: Argument "duration" must be a number or a string but found ${a}.`),d(o)||console.error('MUI: Argument "easing" must be a string.'),!h(f)&&!d(f)&&console.error('MUI: Argument "delay" must be a number or a string.'),typeof s!="object"&&console.error(["MUI: Secong argument of transition.create must be an object.","Arguments should be either `create('prop1', options)` or `create(['prop1', 'prop2'], options)`"].join(`
192
+ `)),Object.keys(u).length!==0&&console.error(`MUI: Unrecognized argument(s) [${Object.keys(u).join(",")}].`)}return(Array.isArray(i)?i:[i]).map(d=>`${d} ${typeof a=="string"?a:Ac(a)} ${o} ${typeof f=="string"?f:Ac(f)}`).join(",")},...e,easing:t,duration:r}}const bS={mobileStepper:1e3,fab:1050,speedDial:1050,appBar:1100,drawer:1200,modal:1300,snackbar:1400,tooltip:1500};function CS(e){return tn(e)||typeof e>"u"||typeof e=="string"||typeof e=="boolean"||typeof e=="number"||Array.isArray(e)}function pf(e={}){const t={...e};function r(n){const i=Object.entries(n);for(let s=0;s<i.length;s++){const[a,o]=i[s];!CS(o)||a.startsWith("unstable_")?delete n[a]:tn(o)&&(n[a]={...o},r(n[a]))}}return r(t),`import { unstable_createBreakpoints as createBreakpoints, createTransitions } from '@mui/material/styles';
193
+
194
+ const theme = ${JSON.stringify(t,null,2)};
195
+
196
+ theme.breakpoints = createBreakpoints(theme.breakpoints || {});
197
+ theme.transitions = createTransitions(theme.transitions || {});
198
+
199
+ export default theme;`}function Oc(e){return typeof e=="number"?`${(e*100).toFixed(0)}%`:`calc((${e}) * 100%)`}const AS=e=>{if(!Number.isNaN(+e))return+e;const t=e.match(/\d*\.?\d+/g);if(!t)return 0;let r=0;for(let n=0;n<t.length;n+=1)r+=+t[n];return r};function OS(e){Object.assign(e,{alpha(t,r){const n=this||e;return n.colorSpace?`oklch(from ${t} l c h / ${typeof r=="string"?`calc(${r})`:r})`:n.vars?`rgba(${t.replace(/var\(--([^,\s)]+)(?:,[^)]+)?\)+/g,"var(--$1Channel)")} / ${typeof r=="string"?`calc(${r})`:r})`:nf(t,AS(r))},lighten(t,r){const n=this||e;return n.colorSpace?`color-mix(in ${n.colorSpace}, ${t}, #fff ${Oc(r)})`:zs(t,r)},darken(t,r){const n=this||e;return n.colorSpace?`color-mix(in ${n.colorSpace}, ${t}, #000 ${Oc(r)})`:Vs(t,r)}})}function Ra(e={},...t){const{breakpoints:r,mixins:n={},spacing:i,palette:s={},transitions:a={},typography:o={},shape:f,colorSpace:u,...d}=e;if(e.vars&&e.generateThemeVars===void 0)throw new Error(process.env.NODE_ENV!=="production"?"MUI: `vars` is a private field used for CSS variables support.\nPlease use another name or follow the [docs](https://mui.com/material-ui/customization/css-theme-variables/usage/) to enable the feature.":Sn(20));const h=Ao({...s,colorSpace:u}),m=Qu(e);let l=Tr(m,{mixins:gS(m.breakpoints,n),palette:h,shadows:wS.slice(),typography:hf(h,o),transitions:_S(a),zIndex:{...bS}});if(l=Tr(l,d),l=t.reduce((v,g)=>Tr(v,g),l),process.env.NODE_ENV!=="production"){const v=["active","checked","completed","disabled","error","expanded","focused","focusVisible","required","selected"],g=(x,T)=>{let b;for(b in x){const _=x[b];if(v.includes(b)&&Object.keys(_).length>0){if(process.env.NODE_ENV!=="production"){const k=IT("",b);console.error([`MUI: The \`${T}\` component increases the CSS specificity of the \`${b}\` internal state.`,"You can not override it like this: ",JSON.stringify(x,null,2),"",`Instead, you need to use the '&.${k}' syntax:`,JSON.stringify({root:{[`&.${k}`]:_}},null,2),"","https://mui.com/r/state-classes-guide"].join(`
200
+ `))}x[b]={}}}};Object.keys(l.components).forEach(x=>{const T=l.components[x].styleOverrides;T&&x.startsWith("Mui")&&g(T,x)})}return l.unstable_sxConfig={...Us,...d==null?void 0:d.unstable_sxConfig},l.unstable_sx=function(g){return ji({sx:g,theme:this})},l.toRuntimeSource=pf,OS(l),l}function DS(e){let t;return e<1?t=5.11916*e**2:t=4.5*Math.log(e+1)+2,Math.round(t*10)/1e3}const kS=[...Array(25)].map((e,t)=>{if(t===0)return"none";const r=DS(t);return`linear-gradient(rgba(255 255 255 / ${r}), rgba(255 255 255 / ${r}))`});function gf(e){return{inputPlaceholder:e==="dark"?.5:.42,inputUnderline:e==="dark"?.7:.42,switchTrackDisabled:e==="dark"?.2:.12,switchTrack:e==="dark"?.3:.38}}function mf(e){return e==="dark"?kS:[]}function IS(e){const{palette:t={mode:"light"},opacity:r,overlays:n,colorSpace:i,...s}=e,a=Ao({...t,colorSpace:i});return{palette:a,opacity:{...gf(a.mode),...r},overlays:n||mf(a.mode),...s}}function FS(e){var t;return!!e[0].match(/(cssVarPrefix|colorSchemeSelector|modularCssLayers|rootSelector|typography|mixins|breakpoints|direction|transitions)/)||!!e[0].match(/sxConfig$/)||e[0]==="palette"&&!!((t=e[1])!=null&&t.match(/(mode|contrastThreshold|tonalOffset)/))}const NS=e=>[...[...Array(25)].map((t,r)=>`--${e?`${e}-`:""}overlays-${r}`),`--${e?`${e}-`:""}palette-AppBar-darkBg`,`--${e?`${e}-`:""}palette-AppBar-darkColor`],RS=e=>(t,r)=>{const n=e.rootSelector||":root",i=e.colorSchemeSelector;let s=i;if(i==="class"&&(s=".%s"),i==="data"&&(s="[data-%s]"),i!=null&&i.startsWith("data-")&&!i.includes("%s")&&(s=`[${i}="%s"]`),e.defaultColorScheme===t){if(t==="dark"){const a={};return NS(e.cssVarPrefix).forEach(o=>{a[o]=r[o],delete r[o]}),s==="media"?{[n]:r,"@media (prefers-color-scheme: dark)":{[n]:a}}:s?{[s.replace("%s",t)]:a,[`${n}, ${s.replace("%s",t)}`]:r}:{[n]:{...r,...a}}}if(s&&s!=="media")return`${n}, ${s.replace("%s",String(t))}`}else if(t){if(s==="media")return{[`@media (prefers-color-scheme: ${String(t)})`]:{[n]:r}};if(s)return s.replace("%s",String(t))}return n};function PS(e,t){t.forEach(r=>{e[r]||(e[r]={})})}function se(e,t,r){!e[t]&&r&&(e[t]=r)}function ci(e){return typeof e!="string"||!e.startsWith("hsl")?e:rf(e)}function zr(e,t){`${t}Channel`in e||(e[`${t}Channel`]=li(ci(e[t]),`MUI: Can't create \`palette.${t}Channel\` because \`palette.${t}\` is not one of these formats: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla(), color().
201
+ To suppress this warning, you need to explicitly provide the \`palette.${t}Channel\` as a string (in rgb format, for example "12 12 12") or undefined if you want to remove the channel token.`))}function jS(e){return typeof e=="number"?`${e}px`:typeof e=="string"||typeof e=="function"||Array.isArray(e)?e:"8px"}const Br=e=>{try{return e()}catch{}},MS=(e="mui")=>tS(e);function ya(e,t,r,n,i){if(!r)return;r=r===!0?{}:r;const s=i==="dark"?"dark":"light";if(!n){t[i]=IS({...r,palette:{mode:s,...r==null?void 0:r.palette},colorSpace:e});return}const{palette:a,...o}=Ra({...n,palette:{mode:s,...r==null?void 0:r.palette},colorSpace:e});return t[i]={...r,palette:a,opacity:{...gf(s),...r==null?void 0:r.opacity},overlays:(r==null?void 0:r.overlays)||mf(s)},o}function LS(e={},...t){const{colorSchemes:r={light:!0},defaultColorScheme:n,disableCssColorScheme:i=!1,cssVarPrefix:s="mui",nativeColor:a=!1,shouldSkipGeneratingVar:o=FS,colorSchemeSelector:f=r.light&&r.dark?"media":void 0,rootSelector:u=":root",...d}=e,h=Object.keys(r)[0],m=n||(r.light&&h!=="light"?"light":h),l=MS(s),{[m]:v,light:g,dark:x,...T}=r,b={...T};let _=v;if((m==="dark"&&!("dark"in r)||m==="light"&&!("light"in r))&&(_=!0),!_)throw new Error(process.env.NODE_ENV!=="production"?`MUI: The \`colorSchemes.${m}\` option is either missing or invalid.`:Sn(21,m));let k;a&&(k="oklch");const F=ya(k,b,_,d,m);g&&!b.light&&ya(k,b,g,void 0,"light"),x&&!b.dark&&ya(k,b,x,void 0,"dark");let z={defaultColorScheme:m,...F,cssVarPrefix:s,colorSchemeSelector:f,rootSelector:u,getCssVar:l,colorSchemes:b,font:{...pS(F.typography),...F.font},spacing:jS(d.spacing)};Object.keys(z.colorSchemes).forEach(W=>{const y=z.colorSchemes[W].palette,H=J=>{const ee=J.split("-"),_e=ee[1],Ae=ee[2];return l(J,y[_e][Ae])};y.mode==="light"&&(se(y.common,"background","#fff"),se(y.common,"onBackground","#000")),y.mode==="dark"&&(se(y.common,"background","#000"),se(y.common,"onBackground","#fff"));function Q(J,ee,_e){if(k){let Ae;return J===gn&&(Ae=`transparent ${((1-_e)*100).toFixed(0)}%`),J===it&&(Ae=`#000 ${(_e*100).toFixed(0)}%`),J===st&&(Ae=`#fff ${(_e*100).toFixed(0)}%`),`color-mix(in ${k}, ${ee}, ${Ae})`}return J(ee,_e)}if(PS(y,["Alert","AppBar","Avatar","Button","Chip","FilledInput","LinearProgress","Skeleton","Slider","SnackbarContent","SpeedDialAction","StepConnector","StepContent","Switch","TableCell","Tooltip"]),y.mode==="light"){se(y.Alert,"errorColor",Q(it,y.error.light,.6)),se(y.Alert,"infoColor",Q(it,y.info.light,.6)),se(y.Alert,"successColor",Q(it,y.success.light,.6)),se(y.Alert,"warningColor",Q(it,y.warning.light,.6)),se(y.Alert,"errorFilledBg",H("palette-error-main")),se(y.Alert,"infoFilledBg",H("palette-info-main")),se(y.Alert,"successFilledBg",H("palette-success-main")),se(y.Alert,"warningFilledBg",H("palette-warning-main")),se(y.Alert,"errorFilledColor",Br(()=>y.getContrastText(y.error.main))),se(y.Alert,"infoFilledColor",Br(()=>y.getContrastText(y.info.main))),se(y.Alert,"successFilledColor",Br(()=>y.getContrastText(y.success.main))),se(y.Alert,"warningFilledColor",Br(()=>y.getContrastText(y.warning.main))),se(y.Alert,"errorStandardBg",Q(st,y.error.light,.9)),se(y.Alert,"infoStandardBg",Q(st,y.info.light,.9)),se(y.Alert,"successStandardBg",Q(st,y.success.light,.9)),se(y.Alert,"warningStandardBg",Q(st,y.warning.light,.9)),se(y.Alert,"errorIconColor",H("palette-error-main")),se(y.Alert,"infoIconColor",H("palette-info-main")),se(y.Alert,"successIconColor",H("palette-success-main")),se(y.Alert,"warningIconColor",H("palette-warning-main")),se(y.AppBar,"defaultBg",H("palette-grey-100")),se(y.Avatar,"defaultBg",H("palette-grey-400")),se(y.Button,"inheritContainedBg",H("palette-grey-300")),se(y.Button,"inheritContainedHoverBg",H("palette-grey-A100")),se(y.Chip,"defaultBorder",H("palette-grey-400")),se(y.Chip,"defaultAvatarColor",H("palette-grey-700")),se(y.Chip,"defaultIconColor",H("palette-grey-700")),se(y.FilledInput,"bg","rgba(0, 0, 0, 0.06)"),se(y.FilledInput,"hoverBg","rgba(0, 0, 0, 0.09)"),se(y.FilledInput,"disabledBg","rgba(0, 0, 0, 0.12)"),se(y.LinearProgress,"primaryBg",Q(st,y.primary.main,.62)),se(y.LinearProgress,"secondaryBg",Q(st,y.secondary.main,.62)),se(y.LinearProgress,"errorBg",Q(st,y.error.main,.62)),se(y.LinearProgress,"infoBg",Q(st,y.info.main,.62)),se(y.LinearProgress,"successBg",Q(st,y.success.main,.62)),se(y.LinearProgress,"warningBg",Q(st,y.warning.main,.62)),se(y.Skeleton,"bg",k?Q(gn,y.text.primary,.11):`rgba(${H("palette-text-primaryChannel")} / 0.11)`),se(y.Slider,"primaryTrack",Q(st,y.primary.main,.62)),se(y.Slider,"secondaryTrack",Q(st,y.secondary.main,.62)),se(y.Slider,"errorTrack",Q(st,y.error.main,.62)),se(y.Slider,"infoTrack",Q(st,y.info.main,.62)),se(y.Slider,"successTrack",Q(st,y.success.main,.62)),se(y.Slider,"warningTrack",Q(st,y.warning.main,.62));const J=k?Q(it,y.background.default,.6825):Qi(y.background.default,.8);se(y.SnackbarContent,"bg",J),se(y.SnackbarContent,"color",Br(()=>k?Na.text.primary:y.getContrastText(J))),se(y.SpeedDialAction,"fabHoverBg",Qi(y.background.paper,.15)),se(y.StepConnector,"border",H("palette-grey-400")),se(y.StepContent,"border",H("palette-grey-400")),se(y.Switch,"defaultColor",H("palette-common-white")),se(y.Switch,"defaultDisabledColor",H("palette-grey-100")),se(y.Switch,"primaryDisabledColor",Q(st,y.primary.main,.62)),se(y.Switch,"secondaryDisabledColor",Q(st,y.secondary.main,.62)),se(y.Switch,"errorDisabledColor",Q(st,y.error.main,.62)),se(y.Switch,"infoDisabledColor",Q(st,y.info.main,.62)),se(y.Switch,"successDisabledColor",Q(st,y.success.main,.62)),se(y.Switch,"warningDisabledColor",Q(st,y.warning.main,.62)),se(y.TableCell,"border",Q(st,Q(gn,y.divider,1),.88)),se(y.Tooltip,"bg",Q(gn,y.grey[700],.92))}if(y.mode==="dark"){se(y.Alert,"errorColor",Q(st,y.error.light,.6)),se(y.Alert,"infoColor",Q(st,y.info.light,.6)),se(y.Alert,"successColor",Q(st,y.success.light,.6)),se(y.Alert,"warningColor",Q(st,y.warning.light,.6)),se(y.Alert,"errorFilledBg",H("palette-error-dark")),se(y.Alert,"infoFilledBg",H("palette-info-dark")),se(y.Alert,"successFilledBg",H("palette-success-dark")),se(y.Alert,"warningFilledBg",H("palette-warning-dark")),se(y.Alert,"errorFilledColor",Br(()=>y.getContrastText(y.error.dark))),se(y.Alert,"infoFilledColor",Br(()=>y.getContrastText(y.info.dark))),se(y.Alert,"successFilledColor",Br(()=>y.getContrastText(y.success.dark))),se(y.Alert,"warningFilledColor",Br(()=>y.getContrastText(y.warning.dark))),se(y.Alert,"errorStandardBg",Q(it,y.error.light,.9)),se(y.Alert,"infoStandardBg",Q(it,y.info.light,.9)),se(y.Alert,"successStandardBg",Q(it,y.success.light,.9)),se(y.Alert,"warningStandardBg",Q(it,y.warning.light,.9)),se(y.Alert,"errorIconColor",H("palette-error-main")),se(y.Alert,"infoIconColor",H("palette-info-main")),se(y.Alert,"successIconColor",H("palette-success-main")),se(y.Alert,"warningIconColor",H("palette-warning-main")),se(y.AppBar,"defaultBg",H("palette-grey-900")),se(y.AppBar,"darkBg",H("palette-background-paper")),se(y.AppBar,"darkColor",H("palette-text-primary")),se(y.Avatar,"defaultBg",H("palette-grey-600")),se(y.Button,"inheritContainedBg",H("palette-grey-800")),se(y.Button,"inheritContainedHoverBg",H("palette-grey-700")),se(y.Chip,"defaultBorder",H("palette-grey-700")),se(y.Chip,"defaultAvatarColor",H("palette-grey-300")),se(y.Chip,"defaultIconColor",H("palette-grey-300")),se(y.FilledInput,"bg","rgba(255, 255, 255, 0.09)"),se(y.FilledInput,"hoverBg","rgba(255, 255, 255, 0.13)"),se(y.FilledInput,"disabledBg","rgba(255, 255, 255, 0.12)"),se(y.LinearProgress,"primaryBg",Q(it,y.primary.main,.5)),se(y.LinearProgress,"secondaryBg",Q(it,y.secondary.main,.5)),se(y.LinearProgress,"errorBg",Q(it,y.error.main,.5)),se(y.LinearProgress,"infoBg",Q(it,y.info.main,.5)),se(y.LinearProgress,"successBg",Q(it,y.success.main,.5)),se(y.LinearProgress,"warningBg",Q(it,y.warning.main,.5)),se(y.Skeleton,"bg",k?Q(gn,y.text.primary,.13):`rgba(${H("palette-text-primaryChannel")} / 0.13)`),se(y.Slider,"primaryTrack",Q(it,y.primary.main,.5)),se(y.Slider,"secondaryTrack",Q(it,y.secondary.main,.5)),se(y.Slider,"errorTrack",Q(it,y.error.main,.5)),se(y.Slider,"infoTrack",Q(it,y.info.main,.5)),se(y.Slider,"successTrack",Q(it,y.success.main,.5)),se(y.Slider,"warningTrack",Q(it,y.warning.main,.5));const J=k?Q(st,y.background.default,.985):Qi(y.background.default,.98);se(y.SnackbarContent,"bg",J),se(y.SnackbarContent,"color",Br(()=>k?ff.text.primary:y.getContrastText(J))),se(y.SpeedDialAction,"fabHoverBg",Qi(y.background.paper,.15)),se(y.StepConnector,"border",H("palette-grey-600")),se(y.StepContent,"border",H("palette-grey-600")),se(y.Switch,"defaultColor",H("palette-grey-300")),se(y.Switch,"defaultDisabledColor",H("palette-grey-600")),se(y.Switch,"primaryDisabledColor",Q(it,y.primary.main,.55)),se(y.Switch,"secondaryDisabledColor",Q(it,y.secondary.main,.55)),se(y.Switch,"errorDisabledColor",Q(it,y.error.main,.55)),se(y.Switch,"infoDisabledColor",Q(it,y.info.main,.55)),se(y.Switch,"successDisabledColor",Q(it,y.success.main,.55)),se(y.Switch,"warningDisabledColor",Q(it,y.warning.main,.55)),se(y.TableCell,"border",Q(it,Q(gn,y.divider,1),.68)),se(y.Tooltip,"bg",Q(gn,y.grey[700],.92))}zr(y.background,"default"),zr(y.background,"paper"),zr(y.common,"background"),zr(y.common,"onBackground"),zr(y,"divider"),Object.keys(y).forEach(J=>{const ee=y[J];J!=="tonalOffset"&&ee&&typeof ee=="object"&&(ee.main&&se(y[J],"mainChannel",li(ci(ee.main))),ee.light&&se(y[J],"lightChannel",li(ci(ee.light))),ee.dark&&se(y[J],"darkChannel",li(ci(ee.dark))),ee.contrastText&&se(y[J],"contrastTextChannel",li(ci(ee.contrastText))),J==="text"&&(zr(y[J],"primary"),zr(y[J],"secondary")),J==="action"&&(ee.active&&zr(y[J],"active"),ee.selected&&zr(y[J],"selected")))})}),z=t.reduce((W,y)=>Tr(W,y),z);const N={prefix:s,disableCssColorScheme:i,shouldSkipGeneratingVar:o,getSelector:RS(z),enableContrastVars:a},{vars:B,generateThemeVars:M,generateStyleSheets:L}=iS(z,N);return z.vars=B,Object.entries(z.colorSchemes[z.defaultColorScheme]).forEach(([W,y])=>{z[W]=y}),z.generateThemeVars=M,z.generateStyleSheets=L,z.generateSpacing=function(){return Zu(d.spacing,vo(this))},z.getColorSchemeSelector=sS(f),z.spacing=z.generateSpacing(),z.shouldSkipGeneratingVar=o,z.unstable_sxConfig={...Us,...d==null?void 0:d.unstable_sxConfig},z.unstable_sx=function(y){return ji({sx:y,theme:this})},z.toRuntimeSource=pf,z}function Dc(e,t,r){e.colorSchemes&&r&&(e.colorSchemes[t]={...r!==!0&&r,palette:Ao({...r===!0?{}:r.palette,mode:t})})}function Oo(e={},...t){const{palette:r,cssVariables:n=!1,colorSchemes:i=r?void 0:{light:!0},defaultColorScheme:s=r==null?void 0:r.mode,...a}=e,o=s||"light",f=i==null?void 0:i[o],u={...i,...r?{[o]:{...typeof f!="boolean"&&f,palette:r}}:void 0};if(n===!1){if(!("colorSchemes"in e))return Ra(e,...t);let d=r;"palette"in e||u[o]&&(u[o]!==!0?d=u[o].palette:o==="dark"&&(d={mode:"dark"}));const h=Ra({...e,palette:d},...t);return h.defaultColorScheme=o,h.colorSchemes=u,h.palette.mode==="light"&&(h.colorSchemes.light={...u.light!==!0&&u.light,palette:h.palette},Dc(h,"dark",u.dark)),h.palette.mode==="dark"&&(h.colorSchemes.dark={...u.dark!==!0&&u.dark,palette:h.palette},Dc(h,"light",u.light)),h}return!r&&!("light"in u)&&o==="light"&&(u.light=!0),LS({...a,colorSchemes:u,defaultColorScheme:o,...typeof n!="boolean"&&n},...t)}const BS=Oo();function $S({theme:e,...t}){const r=vn in e?e[vn]:void 0;return c.jsx(bi,{...t,themeId:r?vn:void 0,theme:r||e})}const es={colorSchemeStorageKey:"mui-color-scheme",defaultLightColorScheme:"light",defaultDarkColorScheme:"dark",modeStorageKey:"mui-mode"};process.env.NODE_ENV!=="production"&&(Ce.string,Ce.string,Ce.string,Ce.string,Ce.string,Ce.oneOf(["dark","light","system"]),Ce.string,Ce.string);const{CssVarsProvider:US}=eS({themeId:vn,theme:()=>Oo({cssVariables:!0}),colorSchemeStorageKey:es.colorSchemeStorageKey,modeStorageKey:es.modeStorageKey,defaultColorScheme:{light:es.defaultLightColorScheme,dark:es.defaultDarkColorScheme},resolveTheme:e=>{const t={...e,typography:hf(e.palette,e.typography)};return t.unstable_sx=function(n){return ji({sx:n,theme:this})},t}}),WS=US;function VS({theme:e,...t}){const r=Be.useMemo(()=>{if(typeof e=="function")return e;const n=vn in e?e[vn]:e;return"colorSchemes"in n?null:"vars"in n?e:{...e,vars:null}},[e]);return r?c.jsx($S,{theme:r,...t}):c.jsx(WS,{theme:e,...t})}function xf(e){return c.jsx(To,{...e,defaultTheme:BS,themeId:vn})}process.env.NODE_ENV!=="production"&&(xf.propTypes={styles:Ce.oneOfType([Ce.array,Ce.func,Ce.number,Ce.object,Ce.string,Ce.bool])});function vf(e){return function(r){return c.jsx(xf,{styles:typeof e=="function"?n=>e({theme:n,...r}):e})}}process.env.NODE_ENV!=="production"&&(Ce.node,Ce.object.isRequired);function zS(e){return WT(e)}const Pa=typeof vf({})=="function",HS=(e,t)=>({WebkitFontSmoothing:"antialiased",MozOsxFontSmoothing:"grayscale",boxSizing:"border-box",WebkitTextSizeAdjust:"100%",...t&&!e.vars&&{colorScheme:e.palette.mode}}),GS=e=>({color:(e.vars||e).palette.text.primary,...e.typography.body1,backgroundColor:(e.vars||e).palette.background.default,"@media print":{backgroundColor:(e.vars||e).palette.common.white}}),yf=(e,t=!1)=>{var s,a;const r={};t&&e.colorSchemes&&typeof e.getColorSchemeSelector=="function"&&Object.entries(e.colorSchemes).forEach(([o,f])=>{var d,h;const u=e.getColorSchemeSelector(o);u.startsWith("@")?r[u]={":root":{colorScheme:(d=f.palette)==null?void 0:d.mode}}:r[u.replace(/\s*&/,"")]={colorScheme:(h=f.palette)==null?void 0:h.mode}});let n={html:HS(e,t),"*, *::before, *::after":{boxSizing:"inherit"},"strong, b":{fontWeight:e.typography.fontWeightBold},body:{margin:0,...GS(e),"&::backdrop":{backgroundColor:(e.vars||e).palette.background.default}},...r};const i=(a=(s=e.components)==null?void 0:s.MuiCssBaseline)==null?void 0:a.styleOverrides;return i&&(n=[n,i]),n},rs="mui-ecs",YS=e=>{const t=yf(e,!1),r=Array.isArray(t)?t[0]:t;return!e.vars&&r&&(r.html[`:root:has(${rs})`]={colorScheme:e.palette.mode}),e.colorSchemes&&Object.entries(e.colorSchemes).forEach(([n,i])=>{var a,o;const s=e.getColorSchemeSelector(n);s.startsWith("@")?r[s]={[`:root:not(:has(.${rs}))`]:{colorScheme:(a=i.palette)==null?void 0:a.mode}}:r[s.replace(/\s*&/,"")]={[`&:not(:has(.${rs}))`]:{colorScheme:(o=i.palette)==null?void 0:o.mode}}}),t},XS=vf(Pa?({theme:e,enableColorScheme:t})=>yf(e,t):({theme:e})=>YS(e));function wf(e){const t=zS({props:e,name:"MuiCssBaseline"}),{children:r,enableColorScheme:n=!1}=t;return c.jsxs(Be.Fragment,{children:[Pa&&c.jsx(XS,{enableColorScheme:n}),!Pa&&!n&&c.jsx("span",{className:rs,style:{display:"none"}}),r]})}process.env.NODE_ENV!=="production"&&(wf.propTypes={children:Ce.node,enableColorScheme:Ce.bool});const Tf=S.createContext(void 0),KS=Oo({palette:{mode:"light",primary:{main:"#1976d2",lighter:"#e3f2fd"},secondary:{main:"#9c27b0",lighter:"#f3e5f5"},success:{main:"#2e7d32",lighter:"#e8f5e9"},warning:{main:"#ed6c02",lighter:"#fff3e0"},error:{main:"#d32f2f",lighter:"#ffebee"},info:{main:"#0288d1",lighter:"#e1f5fe"}}});function Do({children:e,initialData:t,data:r,mode:n="builder",autoLoad:i=!0,config:s}){const o=lw({mode:n,autoLoad:i,initialData:r||t,config:s});return c.jsxs(VS,{theme:KS,children:[c.jsx(wf,{}),c.jsx(Tf.Provider,{value:o,children:e})]})}function Sf(){const e=S.useContext(Tf);if(e===void 0)throw new Error("useReportContext must be used within a ReportProvider. Wrap your component tree with <ReportProvider>...</ReportProvider>");return e}/**
202
+ * @license lucide-react v0.487.0 - ISC
203
+ *
204
+ * This source code is licensed under the ISC license.
205
+ * See the LICENSE file in the root directory of this source tree.
206
+ */const qS=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),JS=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,r,n)=>n?n.toUpperCase():r.toLowerCase()),kc=e=>{const t=JS(e);return t.charAt(0).toUpperCase()+t.slice(1)},Ef=(...e)=>e.filter((t,r,n)=>!!t&&t.trim()!==""&&n.indexOf(t)===r).join(" ").trim();/**
207
+ * @license lucide-react v0.487.0 - ISC
208
+ *
209
+ * This source code is licensed under the ISC license.
210
+ * See the LICENSE file in the root directory of this source tree.
211
+ */var ZS={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/**
212
+ * @license lucide-react v0.487.0 - ISC
213
+ *
214
+ * This source code is licensed under the ISC license.
215
+ * See the LICENSE file in the root directory of this source tree.
216
+ */const QS=S.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:r=2,absoluteStrokeWidth:n,className:i="",children:s,iconNode:a,...o},f)=>S.createElement("svg",{ref:f,...ZS,width:t,height:t,stroke:e,strokeWidth:n?Number(r)*24/Number(t):r,className:Ef("lucide",i),...o},[...a.map(([u,d])=>S.createElement(u,d)),...Array.isArray(s)?s:[s]]));/**
217
+ * @license lucide-react v0.487.0 - ISC
218
+ *
219
+ * This source code is licensed under the ISC license.
220
+ * See the LICENSE file in the root directory of this source tree.
221
+ */const Re=(e,t)=>{const r=S.forwardRef(({className:n,...i},s)=>S.createElement(QS,{ref:s,iconNode:t,className:Ef(`lucide-${qS(kc(e))}`,`lucide-${e}`,n),...i}));return r.displayName=kc(e),r};/**
222
+ * @license lucide-react v0.487.0 - ISC
223
+ *
224
+ * This source code is licensed under the ISC license.
225
+ * See the LICENSE file in the root directory of this source tree.
226
+ */const eE=[["path",{d:"M12 5v14",key:"s699le"}],["path",{d:"m19 12-7 7-7-7",key:"1idqje"}]],_f=Re("arrow-down",eE);/**
227
+ * @license lucide-react v0.487.0 - ISC
228
+ *
229
+ * This source code is licensed under the ISC license.
230
+ * See the LICENSE file in the root directory of this source tree.
231
+ */const tE=[["path",{d:"m21 16-4 4-4-4",key:"f6ql7i"}],["path",{d:"M17 20V4",key:"1ejh1v"}],["path",{d:"m3 8 4-4 4 4",key:"11wl7u"}],["path",{d:"M7 4v16",key:"1glfcx"}]],ko=Re("arrow-up-down",tE);/**
232
+ * @license lucide-react v0.487.0 - ISC
233
+ *
234
+ * This source code is licensed under the ISC license.
235
+ * See the LICENSE file in the root directory of this source tree.
236
+ */const rE=[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]],bf=Re("arrow-up",rE);/**
237
+ * @license lucide-react v0.487.0 - ISC
238
+ *
239
+ * This source code is licensed under the ISC license.
240
+ * See the LICENSE file in the root directory of this source tree.
241
+ */const nE=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],ja=Re("check",nE);/**
242
+ * @license lucide-react v0.487.0 - ISC
243
+ *
244
+ * This source code is licensed under the ISC license.
245
+ * See the LICENSE file in the root directory of this source tree.
246
+ */const iE=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],Mi=Re("chevron-down",iE);/**
247
+ * @license lucide-react v0.487.0 - ISC
248
+ *
249
+ * This source code is licensed under the ISC license.
250
+ * See the LICENSE file in the root directory of this source tree.
251
+ */const sE=[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]],aE=Re("chevron-left",sE);/**
252
+ * @license lucide-react v0.487.0 - ISC
253
+ *
254
+ * This source code is licensed under the ISC license.
255
+ * See the LICENSE file in the root directory of this source tree.
256
+ */const oE=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],Hs=Re("chevron-right",oE);/**
257
+ * @license lucide-react v0.487.0 - ISC
258
+ *
259
+ * This source code is licensed under the ISC license.
260
+ * See the LICENSE file in the root directory of this source tree.
261
+ */const lE=[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]],cE=Re("chevron-up",lE);/**
262
+ * @license lucide-react v0.487.0 - ISC
263
+ *
264
+ * This source code is licensed under the ISC license.
265
+ * See the LICENSE file in the root directory of this source tree.
266
+ */const uE=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]],fE=Re("circle-alert",uE);/**
267
+ * @license lucide-react v0.487.0 - ISC
268
+ *
269
+ * This source code is licensed under the ISC license.
270
+ * See the LICENSE file in the root directory of this source tree.
271
+ */const dE=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3",key:"1u773s"}],["path",{d:"M12 17h.01",key:"p32p05"}]],hE=Re("circle-help",dE);/**
272
+ * @license lucide-react v0.487.0 - ISC
273
+ *
274
+ * This source code is licensed under the ISC license.
275
+ * See the LICENSE file in the root directory of this source tree.
276
+ */const pE=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]],gE=Re("circle-x",pE);/**
277
+ * @license lucide-react v0.487.0 - ISC
278
+ *
279
+ * This source code is licensed under the ISC license.
280
+ * See the LICENSE file in the root directory of this source tree.
281
+ */const mE=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],xE=Re("circle",mE);/**
282
+ * @license lucide-react v0.487.0 - ISC
283
+ *
284
+ * This source code is licensed under the ISC license.
285
+ * See the LICENSE file in the root directory of this source tree.
286
+ */const vE=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["polyline",{points:"12 6 12 12 16 14",key:"68esgv"}]],Ic=Re("clock",vE);/**
287
+ * @license lucide-react v0.487.0 - ISC
288
+ *
289
+ * This source code is licensed under the ISC license.
290
+ * See the LICENSE file in the root directory of this source tree.
291
+ */const yE=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M12 3v18",key:"108xh3"}]],Cf=Re("columns-2",yE);/**
292
+ * @license lucide-react v0.487.0 - ISC
293
+ *
294
+ * This source code is licensed under the ISC license.
295
+ * See the LICENSE file in the root directory of this source tree.
296
+ */const wE=[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]],TE=Re("copy",wE);/**
297
+ * @license lucide-react v0.487.0 - ISC
298
+ *
299
+ * This source code is licensed under the ISC license.
300
+ * See the LICENSE file in the root directory of this source tree.
301
+ */const SE=[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["polyline",{points:"7 10 12 15 17 10",key:"2ggqvy"}],["line",{x1:"12",x2:"12",y1:"15",y2:"3",key:"1vk2je"}]],Io=Re("download",SE);/**
302
+ * @license lucide-react v0.487.0 - ISC
303
+ *
304
+ * This source code is licensed under the ISC license.
305
+ * See the LICENSE file in the root directory of this source tree.
306
+ */const EE=[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]],_E=Re("external-link",EE);/**
307
+ * @license lucide-react v0.487.0 - ISC
308
+ *
309
+ * This source code is licensed under the ISC license.
310
+ * See the LICENSE file in the root directory of this source tree.
311
+ */const bE=[["path",{d:"M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49",key:"ct8e1f"}],["path",{d:"M14.084 14.158a3 3 0 0 1-4.242-4.242",key:"151rxh"}],["path",{d:"M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143",key:"13bj9a"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]],Af=Re("eye-off",bE);/**
312
+ * @license lucide-react v0.487.0 - ISC
313
+ *
314
+ * This source code is licensed under the ISC license.
315
+ * See the LICENSE file in the root directory of this source tree.
316
+ */const CE=[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]],Fo=Re("eye",CE);/**
317
+ * @license lucide-react v0.487.0 - ISC
318
+ *
319
+ * This source code is licensed under the ISC license.
320
+ * See the LICENSE file in the root directory of this source tree.
321
+ */const AE=[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M9 15h6",key:"cctwl0"}],["path",{d:"M12 18v-6",key:"17g6i2"}]],OE=Re("file-plus",AE);/**
322
+ * @license lucide-react v0.487.0 - ISC
323
+ *
324
+ * This source code is licensed under the ISC license.
325
+ * See the LICENSE file in the root directory of this source tree.
326
+ */const DE=[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]],Of=Re("file-text",DE);/**
327
+ * @license lucide-react v0.487.0 - ISC
328
+ *
329
+ * This source code is licensed under the ISC license.
330
+ * See the LICENSE file in the root directory of this source tree.
331
+ */const kE=[["path",{d:"M12.531 3H3a1 1 0 0 0-.742 1.67l7.225 7.989A2 2 0 0 1 10 14v6a1 1 0 0 0 .553.895l2 1A1 1 0 0 0 14 21v-7a2 2 0 0 1 .517-1.341l.427-.473",key:"ol2ft2"}],["path",{d:"m16.5 3.5 5 5",key:"15e6fa"}],["path",{d:"m21.5 3.5-5 5",key:"m0lwru"}]],Df=Re("funnel-x",kE);/**
332
+ * @license lucide-react v0.487.0 - ISC
333
+ *
334
+ * This source code is licensed under the ISC license.
335
+ * See the LICENSE file in the root directory of this source tree.
336
+ */const IE=[["path",{d:"M10 20a1 1 0 0 0 .553.895l2 1A1 1 0 0 0 14 21v-7a2 2 0 0 1 .517-1.341L21.74 4.67A1 1 0 0 0 21 3H3a1 1 0 0 0-.742 1.67l7.225 7.989A2 2 0 0 1 10 14z",key:"sc7q7i"}]],Gs=Re("funnel",IE);/**
337
+ * @license lucide-react v0.487.0 - ISC
338
+ *
339
+ * This source code is licensed under the ISC license.
340
+ * See the LICENSE file in the root directory of this source tree.
341
+ */const FE=[["circle",{cx:"9",cy:"12",r:"1",key:"1vctgf"}],["circle",{cx:"9",cy:"5",r:"1",key:"hp0tcf"}],["circle",{cx:"9",cy:"19",r:"1",key:"fkjjf6"}],["circle",{cx:"15",cy:"12",r:"1",key:"1tmaij"}],["circle",{cx:"15",cy:"5",r:"1",key:"19l28e"}],["circle",{cx:"15",cy:"19",r:"1",key:"f4zoj3"}]],Ma=Re("grip-vertical",FE);/**
342
+ * @license lucide-react v0.487.0 - ISC
343
+ *
344
+ * This source code is licensed under the ISC license.
345
+ * See the LICENSE file in the root directory of this source tree.
346
+ */const NE=[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}],["path",{d:"M12 7v5l4 2",key:"1fdv2h"}]],RE=Re("history",NE);/**
347
+ * @license lucide-react v0.487.0 - ISC
348
+ *
349
+ * This source code is licensed under the ISC license.
350
+ * See the LICENSE file in the root directory of this source tree.
351
+ */const PE=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]],Ai=Re("info",PE);/**
352
+ * @license lucide-react v0.487.0 - ISC
353
+ *
354
+ * This source code is licensed under the ISC license.
355
+ * See the LICENSE file in the root directory of this source tree.
356
+ */const jE=[["path",{d:"M12.83 2.18a2 2 0 0 0-1.66 0L2.6 6.08a1 1 0 0 0 0 1.83l8.58 3.91a2 2 0 0 0 1.66 0l8.58-3.9a1 1 0 0 0 0-1.83z",key:"zw3jo"}],["path",{d:"M2 12a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 12",key:"1wduqc"}],["path",{d:"M2 17a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 17",key:"kqbvx6"}]],kf=Re("layers",jE);/**
357
+ * @license lucide-react v0.487.0 - ISC
358
+ *
359
+ * This source code is licensed under the ISC license.
360
+ * See the LICENSE file in the root directory of this source tree.
361
+ */const ME=[["rect",{width:"7",height:"7",x:"3",y:"3",rx:"1",key:"1g98yp"}],["rect",{width:"7",height:"7",x:"14",y:"3",rx:"1",key:"6d4xhi"}],["rect",{width:"7",height:"7",x:"14",y:"14",rx:"1",key:"nxv5o0"}],["rect",{width:"7",height:"7",x:"3",y:"14",rx:"1",key:"1bb6yr"}]],LE=Re("layout-grid",ME);/**
362
+ * @license lucide-react v0.487.0 - ISC
363
+ *
364
+ * This source code is licensed under the ISC license.
365
+ * See the LICENSE file in the root directory of this source tree.
366
+ */const BE=[["path",{d:"M9 17H7A5 5 0 0 1 7 7h2",key:"8i5ue5"}],["path",{d:"M15 7h2a5 5 0 1 1 0 10h-2",key:"1b9ql8"}],["line",{x1:"8",x2:"16",y1:"12",y2:"12",key:"1jonct"}]],$E=Re("link-2",BE);/**
367
+ * @license lucide-react v0.487.0 - ISC
368
+ *
369
+ * This source code is licensed under the ISC license.
370
+ * See the LICENSE file in the root directory of this source tree.
371
+ */const UE=[["rect",{width:"18",height:"11",x:"3",y:"11",rx:"2",ry:"2",key:"1w4ew1"}],["path",{d:"M7 11V7a5 5 0 0 1 10 0v4",key:"fwvmzm"}]],WE=Re("lock",UE);/**
372
+ * @license lucide-react v0.487.0 - ISC
373
+ *
374
+ * This source code is licensed under the ISC license.
375
+ * See the LICENSE file in the root directory of this source tree.
376
+ */const VE=[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}]],Ss=Re("pen",VE);/**
377
+ * @license lucide-react v0.487.0 - ISC
378
+ *
379
+ * This source code is licensed under the ISC license.
380
+ * See the LICENSE file in the root directory of this source tree.
381
+ */const zE=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]],ti=Re("plus",zE);/**
382
+ * @license lucide-react v0.487.0 - ISC
383
+ *
384
+ * This source code is licensed under the ISC license.
385
+ * See the LICENSE file in the root directory of this source tree.
386
+ */const HE=[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]],GE=Re("refresh-cw",HE);/**
387
+ * @license lucide-react v0.487.0 - ISC
388
+ *
389
+ * This source code is licensed under the ISC license.
390
+ * See the LICENSE file in the root directory of this source tree.
391
+ */const YE=[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}]],Ys=Re("rotate-ccw",YE);/**
392
+ * @license lucide-react v0.487.0 - ISC
393
+ *
394
+ * This source code is licensed under the ISC license.
395
+ * See the LICENSE file in the root directory of this source tree.
396
+ */const XE=[["path",{d:"M21.3 15.3a2.4 2.4 0 0 1 0 3.4l-2.6 2.6a2.4 2.4 0 0 1-3.4 0L2.7 8.7a2.41 2.41 0 0 1 0-3.4l2.6-2.6a2.41 2.41 0 0 1 3.4 0Z",key:"icamh8"}],["path",{d:"m14.5 12.5 2-2",key:"inckbg"}],["path",{d:"m11.5 9.5 2-2",key:"fmmyf7"}],["path",{d:"m8.5 6.5 2-2",key:"vc6u1g"}],["path",{d:"m17.5 15.5 2-2",key:"wo5hmg"}]],KE=Re("ruler",XE);/**
397
+ * @license lucide-react v0.487.0 - ISC
398
+ *
399
+ * This source code is licensed under the ISC license.
400
+ * See the LICENSE file in the root directory of this source tree.
401
+ */const qE=[["path",{d:"M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z",key:"1c8476"}],["path",{d:"M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7",key:"1ydtos"}],["path",{d:"M7 3v4a1 1 0 0 0 1 1h7",key:"t51u73"}]],Xs=Re("save",qE);/**
402
+ * @license lucide-react v0.487.0 - ISC
403
+ *
404
+ * This source code is licensed under the ISC license.
405
+ * See the LICENSE file in the root directory of this source tree.
406
+ */const JE=[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]],ZE=Re("search",JE);/**
407
+ * @license lucide-react v0.487.0 - ISC
408
+ *
409
+ * This source code is licensed under the ISC license.
410
+ * See the LICENSE file in the root directory of this source tree.
411
+ */const QE=[["path",{d:"M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z",key:"1qme2f"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]],No=Re("settings",QE);/**
412
+ * @license lucide-react v0.487.0 - ISC
413
+ *
414
+ * This source code is licensed under the ISC license.
415
+ * See the LICENSE file in the root directory of this source tree.
416
+ */const e_=[["circle",{cx:"18",cy:"5",r:"3",key:"gq8acd"}],["circle",{cx:"6",cy:"12",r:"3",key:"w7nqdw"}],["circle",{cx:"18",cy:"19",r:"3",key:"1xt0gg"}],["line",{x1:"8.59",x2:"15.42",y1:"13.51",y2:"17.49",key:"47mynk"}],["line",{x1:"15.41",x2:"8.59",y1:"6.51",y2:"10.49",key:"1n3mei"}]],t_=Re("share-2",e_);/**
417
+ * @license lucide-react v0.487.0 - ISC
418
+ *
419
+ * This source code is licensed under the ISC license.
420
+ * See the LICENSE file in the root directory of this source tree.
421
+ */const r_=[["path",{d:"M11.525 2.295a.53.53 0 0 1 .95 0l2.31 4.679a2.123 2.123 0 0 0 1.595 1.16l5.166.756a.53.53 0 0 1 .294.904l-3.736 3.638a2.123 2.123 0 0 0-.611 1.878l.882 5.14a.53.53 0 0 1-.771.56l-4.618-2.428a2.122 2.122 0 0 0-1.973 0L6.396 21.01a.53.53 0 0 1-.77-.56l.881-5.139a2.122 2.122 0 0 0-.611-1.879L2.16 9.795a.53.53 0 0 1 .294-.906l5.165-.755a2.122 2.122 0 0 0 1.597-1.16z",key:"r04s7s"}]],La=Re("star",r_);/**
422
+ * @license lucide-react v0.487.0 - ISC
423
+ *
424
+ * This source code is licensed under the ISC license.
425
+ * See the LICENSE file in the root directory of this source tree.
426
+ */const n_=[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17",key:"1uufr5"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17",key:"xtxkd"}]],En=Re("trash-2",n_);/**
427
+ * @license lucide-react v0.487.0 - ISC
428
+ *
429
+ * This source code is licensed under the ISC license.
430
+ * See the LICENSE file in the root directory of this source tree.
431
+ */const i_=[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]],kn=Re("triangle-alert",i_);/**
432
+ * @license lucide-react v0.487.0 - ISC
433
+ *
434
+ * This source code is licensed under the ISC license.
435
+ * See the LICENSE file in the root directory of this source tree.
436
+ */const s_=[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["polyline",{points:"17 8 12 3 7 8",key:"t8dd8p"}],["line",{x1:"12",x2:"12",y1:"3",y2:"15",key:"widbto"}]],If=Re("upload",s_);/**
437
+ * @license lucide-react v0.487.0 - ISC
438
+ *
439
+ * This source code is licensed under the ISC license.
440
+ * See the LICENSE file in the root directory of this source tree.
441
+ */const a_=[["path",{d:"M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2",key:"975kel"}],["circle",{cx:"12",cy:"7",r:"4",key:"17ys0d"}]],o_=Re("user",a_);/**
442
+ * @license lucide-react v0.487.0 - ISC
443
+ *
444
+ * This source code is licensed under the ISC license.
445
+ * See the LICENSE file in the root directory of this source tree.
446
+ */const l_=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],Et=Re("x",l_);function c_({onCreateReport:e}){return c.jsx(p.Box,{component:"header",sx:{position:"sticky",top:0,zIndex:50,borderBottom:1,borderColor:"divider",bgcolor:"background.paper"},children:c.jsxs(p.Box,{sx:{display:"flex",alignItems:"center",justifyContent:"space-between",px:3,height:64},children:[c.jsx(p.Typography,{variant:"h6",component:"h1",sx:{fontWeight:600},children:"Reports"}),c.jsx(p.Box,{sx:{display:"flex",alignItems:"center",gap:1.5},children:c.jsx(p.Button,{variant:"contained",startIcon:c.jsx(ti,{size:16}),onClick:e,sx:{fontWeight:500},children:"New Report"})})]})})}function u_({reports:e,activeReportId:t,onTabClick:r}){if(e.length===0)return null;const n=e.findIndex(i=>i.id===t);return c.jsx(p.Paper,{sx:{position:"sticky",top:64,zIndex:40,borderBottom:1,borderColor:"divider",borderRadius:0},elevation:0,children:c.jsx(p.Box,{sx:{px:3},children:c.jsx(p.Tabs,{value:n>=0?n:0,onChange:(i,s)=>r(e[s].id),variant:"scrollable",scrollButtons:"auto",children:e.map(i=>c.jsx(p.Tab,{label:c.jsxs(p.Box,{sx:{display:"flex",alignItems:"center",gap:.75},children:[i.name,i.description&&c.jsx(p.Tooltip,{title:i.description,arrow:!0,placement:"bottom",children:c.jsx(p.Box,{component:"span",sx:{display:"inline-flex",opacity:.6},onClick:s=>s.stopPropagation(),children:c.jsx(Ai,{size:14})})})]}),sx:{textTransform:"none",fontWeight:500,fontSize:"0.875rem",minHeight:48}},i.id))})})})}function f_({isOpen:e,onClose:t,onCreate:r}){const[n,i]=S.useState(""),[s,a]=S.useState(""),o=()=>{n.trim()&&(r(n.trim(),s.trim()),i(""),a(""))},f=()=>{i(""),a(""),t()};return c.jsxs(p.Dialog,{open:e,onClose:f,maxWidth:"sm",fullWidth:!0,PaperProps:{sx:{borderRadius:2}},children:[c.jsxs(p.DialogTitle,{sx:{display:"flex",alignItems:"center",justifyContent:"space-between",pb:2},children:[c.jsx(p.Box,{component:"span",sx:{fontSize:"1.25rem",fontWeight:600},children:"Create New Report"}),c.jsx(p.IconButton,{onClick:f,size:"small",sx:{color:"text.secondary"},children:c.jsx(Et,{size:20})})]}),c.jsx(p.DialogContent,{children:c.jsxs(p.Box,{sx:{display:"flex",flexDirection:"column",gap:2,pt:1},children:[c.jsx(p.TextField,{label:"Report Name",required:!0,fullWidth:!0,value:n,onChange:u=>i(u.target.value),placeholder:"Enter report name",autoFocus:!0}),c.jsx(p.TextField,{label:"Description",fullWidth:!0,multiline:!0,rows:3,value:s,onChange:u=>a(u.target.value),placeholder:"Enter description (optional)"})]})}),c.jsxs(p.DialogActions,{sx:{px:3,py:2,bgcolor:"action.hover"},children:[c.jsx(p.Button,{onClick:f,variant:"outlined",color:"inherit",children:"Cancel"}),c.jsx(p.Button,{onClick:o,disabled:!n.trim(),variant:"contained",children:"Create Report"})]})]})}function d_({isOpen:e,onClose:t}){return e?c.jsxs(p.Dialog,{open:e,onClose:t,maxWidth:"md",fullWidth:!0,children:[c.jsxs(p.DialogTitle,{sx:{display:"flex",alignItems:"center",justifyContent:"space-between",pb:1},children:["JSON Format Guide",c.jsx(p.IconButton,{onClick:t,size:"small",sx:{color:"text.secondary"},children:c.jsx(Et,{size:20})})]}),c.jsx(p.DialogContent,{dividers:!0,children:c.jsxs(p.Box,{sx:{display:"flex",flexDirection:"column",gap:3,py:1},children:[c.jsxs(p.Box,{children:[c.jsx(p.Typography,{variant:"subtitle2",gutterBottom:!0,children:"Expected JSON Structure"}),c.jsxs(p.Typography,{variant:"body2",color:"text.secondary",children:["The uploaded JSON must be an ",c.jsx("strong",{children:"array of objects"}),". Each object represents a single row in your report, and the keys of each object become the column names."]})]}),c.jsxs(p.Box,{children:[c.jsx(p.Typography,{variant:"subtitle2",gutterBottom:!0,children:"Example JSON"}),c.jsx(p.Paper,{elevation:0,sx:{p:2,bgcolor:"action.hover",border:1,borderColor:"divider",borderRadius:1,overflowX:"auto"},children:c.jsx(p.Box,{component:"pre",sx:{fontSize:"0.75rem",fontFamily:"monospace",m:0},children:`[
447
+ {
448
+ "Active Sessions": 33,
449
+ "Active State": true,
450
+ "Email": "alex@example.com",
451
+ "Last Login": "2024-08-22",
452
+ "Product Name": "Analytics Pro",
453
+ "Region": "Europe",
454
+ "Subscription Type": "Basic"
455
+ }
456
+ ]`})})]}),c.jsxs(p.Box,{children:[c.jsx(p.Typography,{variant:"subtitle2",gutterBottom:!0,children:"Supported Column Types"}),c.jsx(p.Typography,{variant:"body2",color:"text.secondary",sx:{mb:1.5},children:"The system automatically detects column types from your data:"}),c.jsxs(p.Box,{sx:{display:"flex",flexDirection:"column",gap:1},children:[c.jsxs(p.Box,{sx:{display:"flex",gap:1},children:[c.jsx(p.Typography,{variant:"body2",sx:{fontWeight:500,minWidth:80},children:"Number:"}),c.jsxs(p.Typography,{variant:"body2",color:"text.secondary",children:["Numeric values (e.g., ",c.jsx("code",{style:{backgroundColor:"rgba(0,0,0,0.05)",padding:"2px 4px",borderRadius:4},children:"33"}),", ",c.jsx("code",{style:{backgroundColor:"rgba(0,0,0,0.05)",padding:"2px 4px",borderRadius:4},children:"42.5"}),")"]})]}),c.jsxs(p.Box,{sx:{display:"flex",gap:1},children:[c.jsx(p.Typography,{variant:"body2",sx:{fontWeight:500,minWidth:80},children:"Boolean:"}),c.jsxs(p.Typography,{variant:"body2",color:"text.secondary",children:["True/false values (e.g., ",c.jsx("code",{style:{backgroundColor:"rgba(0,0,0,0.05)",padding:"2px 4px",borderRadius:4},children:"true"}),", ",c.jsx("code",{style:{backgroundColor:"rgba(0,0,0,0.05)",padding:"2px 4px",borderRadius:4},children:"false"}),")"]})]}),c.jsxs(p.Box,{sx:{display:"flex",gap:1},children:[c.jsx(p.Typography,{variant:"body2",sx:{fontWeight:500,minWidth:80},children:"String:"}),c.jsxs(p.Typography,{variant:"body2",color:"text.secondary",children:["Text values (e.g., ",c.jsx("code",{style:{backgroundColor:"rgba(0,0,0,0.05)",padding:"2px 4px",borderRadius:4},children:'"Europe"'}),", ",c.jsx("code",{style:{backgroundColor:"rgba(0,0,0,0.05)",padding:"2px 4px",borderRadius:4},children:'"Analytics Pro"'}),")"]})]}),c.jsxs(p.Box,{sx:{display:"flex",gap:1},children:[c.jsx(p.Typography,{variant:"body2",sx:{fontWeight:500,minWidth:80},children:"Date:"}),c.jsxs(p.Typography,{variant:"body2",color:"text.secondary",children:["ISO date strings (e.g., ",c.jsx("code",{style:{backgroundColor:"rgba(0,0,0,0.05)",padding:"2px 4px",borderRadius:4},children:'"2024-08-22"'}),")"]})]})]})]}),c.jsxs(p.Box,{children:[c.jsx(p.Typography,{variant:"subtitle2",gutterBottom:!0,children:"Notes"}),c.jsxs(p.Box,{component:"ul",sx:{m:0,pl:2.5,"& li":{fontSize:"0.875rem",color:"text.secondary",mb:.5}},children:[c.jsx("li",{children:"Each object in the array represents one row in the report."}),c.jsx("li",{children:"The keys of the JSON objects become report columns."}),c.jsx("li",{children:"All objects should have consistent keys for proper column detection."}),c.jsx("li",{children:"Column names are case-sensitive and preserve spacing."})]})]})]})}),c.jsx(p.DialogActions,{sx:{px:3,pb:2,bgcolor:"action.hover"},children:c.jsx(p.Button,{onClick:t,variant:"contained",children:"Got it"})})]}):null}function h_({onFileUpload:e,onError:t,isUploading:r}){const[n,i]=S.useState(!1),[s,a]=S.useState(""),[o,f]=S.useState(!1),u=S.useRef(null),d=async T=>{if(!T.name.endsWith(".json")){t("Please upload a valid JSON file");return}a(T.name);try{const b=await T.text(),_=JSON.parse(b);if(!Array.isArray(_)){t("JSON must be an array of objects");return}if(_.length===0){t("JSON array is empty");return}e(_)}catch{t("Invalid JSON format. Please check your file and try again.")}finally{a("")}},h=T=>{T.preventDefault(),i(!0)},m=T=>{T.preventDefault(),i(!1)},l=T=>{T.preventDefault(),i(!1);const b=T.dataTransfer.files[0];b&&d(b)},v=()=>{var T;(T=u.current)==null||T.click()},g=T=>{var _;const b=(_=T.target.files)==null?void 0:_[0];b&&d(b)},x=T=>{T.stopPropagation(),f(!0)};return c.jsxs(c.Fragment,{children:[c.jsxs(p.Box,{onDragOver:h,onDragLeave:m,onDrop:l,onClick:v,sx:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",minHeight:400,border:2,borderStyle:"dashed",borderColor:n?"primary.main":"divider",bgcolor:n?"primary.lighter":"transparent",borderRadius:1,px:2,py:6,cursor:"pointer",transition:"all 0.2s",opacity:r?.5:1,pointerEvents:r?"none":"auto","&:hover":{borderColor:n?"primary.main":"text.secondary"}},children:[c.jsx("input",{ref:u,type:"file",accept:".json",onChange:g,style:{display:"none"}}),r?c.jsxs(c.Fragment,{children:[c.jsx(p.CircularProgress,{size:32,sx:{mb:2}}),c.jsx(p.Typography,{variant:"body2",sx:{fontWeight:500,mb:.5},children:"Uploading..."}),s&&c.jsx(p.Typography,{variant:"caption",color:"text.secondary",children:s})]}):c.jsxs(c.Fragment,{children:[c.jsx(p.Box,{sx:{width:64,height:64,borderRadius:"50%",bgcolor:"primary.lighter",display:"flex",alignItems:"center",justifyContent:"center",mb:2},children:c.jsx(If,{size:32,color:"primary"})}),c.jsxs(p.Box,{sx:{display:"flex",alignItems:"center",gap:1,mb:1.5},children:[c.jsx(p.Button,{variant:"contained",sx:{fontWeight:500},children:"Upload Data (JSON)"}),c.jsx(p.IconButton,{onClick:x,size:"small",sx:{border:1,borderColor:"divider","&:hover":{borderColor:"text.secondary",bgcolor:"action.hover"}},title:"View JSON format guide",children:c.jsx(Ai,{size:16})})]}),c.jsx(p.Typography,{variant:"body2",color:"text.secondary",sx:{textAlign:"center",maxWidth:500},children:"Upload structured JSON data to generate your report."}),c.jsx(p.Typography,{variant:"caption",color:"text.secondary",sx:{mt:1},children:"Click to browse or drag and drop a JSON file here"})]})]}),c.jsx(d_,{isOpen:o,onClose:()=>f(!1)})]})}function p_({schema:e,onConfirm:t,hasConflicts:r}){return c.jsxs(p.Paper,{sx:{border:2,borderColor:"divider",p:3},children:[c.jsxs(p.Box,{sx:{mb:2},children:[c.jsx(p.Typography,{variant:"h6",sx:{fontWeight:600,mb:.5},children:"Schema Preview"}),c.jsx(p.Typography,{variant:"body2",color:"text.secondary",children:"Review the detected schema before generating your table"})]}),r&&c.jsxs(p.Alert,{severity:"warning",sx:{mb:2},children:[c.jsx(p.AlertTitle,{sx:{fontWeight:600},children:"Schema Conflict Detected"}),"Some columns have inconsistent data types across rows. Please resolve these conflicts before proceeding."]}),c.jsx(p.TableContainer,{sx:{mb:3},children:c.jsxs(p.Table,{children:[c.jsx(p.TableHead,{children:c.jsxs(p.TableRow,{sx:{bgcolor:"action.hover"},children:[c.jsx(p.TableCell,{sx:{fontWeight:600,textTransform:"uppercase",fontSize:"0.75rem"},children:"Column Name"}),c.jsx(p.TableCell,{sx:{fontWeight:600,textTransform:"uppercase",fontSize:"0.75rem"},children:"Detected Type"}),c.jsx(p.TableCell,{sx:{fontWeight:600,textTransform:"uppercase",fontSize:"0.75rem"},children:"Status"})]})}),c.jsx(p.TableBody,{children:e.map(n=>c.jsxs(p.TableRow,{sx:{bgcolor:n.hasConflict?"warning.lighter":"transparent"},children:[c.jsxs(p.TableCell,{sx:{fontWeight:500},children:[n.name,n.hasConflict&&c.jsx(p.Box,{component:"span",sx:{ml:1,color:"warning.main"},children:"⚠"})]}),c.jsx(p.TableCell,{children:c.jsx(p.Chip,{label:n.type,size:"small",sx:{bgcolor:"action.hover"}})}),c.jsx(p.TableCell,{children:c.jsx(p.Chip,{label:n.required?"Required":"Optional",size:"small",color:n.required?"success":"default"})})]},n.name))})]})}),c.jsxs(p.Box,{sx:{display:"flex",alignItems:"center",justifyContent:"space-between",pt:2,borderTop:1,borderColor:"divider"},children:[c.jsxs(p.Box,{sx:{display:"flex",alignItems:"center",gap:1},children:[c.jsx(WE,{size:16}),c.jsx(p.Typography,{variant:"body2",color:"text.secondary",children:"Schema will be locked for this report"})]}),c.jsx(p.Button,{variant:"contained",onClick:t,disabled:r,sx:{fontWeight:500},children:"Generate Table"})]})]})}function g_({error:e,onRetry:t}){return c.jsxs(p.Box,{sx:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",minHeight:400,border:2,borderColor:"error.light",bgcolor:"error.lighter",borderRadius:1,px:2,py:6},children:[c.jsx(p.Box,{sx:{width:64,height:64,borderRadius:"50%",bgcolor:"error.light",display:"flex",alignItems:"center",justifyContent:"center",mb:2},children:c.jsx(fE,{size:32,color:"error"})}),c.jsx(p.Typography,{variant:"h6",color:"error.dark",sx:{fontWeight:600,mb:1},children:"Upload Failed"}),c.jsx(p.Typography,{variant:"body2",color:"error.dark",sx:{textAlign:"center",maxWidth:500,mb:3},children:e}),c.jsx(p.Button,{variant:"contained",color:"error",startIcon:c.jsx(If,{size:16}),onClick:t,sx:{fontWeight:500},children:"Try Again"})]})}function Ff({title:e,description:t,showIcon:r=!0}){return c.jsxs(p.Box,{sx:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",minHeight:400,px:2},children:[r&&c.jsx(p.Box,{sx:{width:64,height:64,borderRadius:"50%",bgcolor:"action.hover",display:"flex",alignItems:"center",justifyContent:"center",mb:2},children:c.jsx(Of,{size:32,color:"currentColor",style:{opacity:.5}})}),c.jsx(p.Typography,{variant:"h6",sx:{fontWeight:600,mb:1},children:e}),c.jsx(p.Typography,{variant:"body2",color:"text.secondary",sx:{textAlign:"center",maxWidth:500},children:t})]})}function m_({value:e,onChange:t,searchHistory:r,onAddToHistory:n,onToggleFavourite:i,onDeleteHistory:s}){const[a,o]=S.useState(!1),[f,u]=S.useState(!1),[d,h]=S.useState(-1),m=S.useRef(null),l=S.useRef(null);S.useEffect(()=>{function N(B){m.current&&!m.current.contains(B.target)&&(o(!1),u(!1))}return document.addEventListener("mousedown",N),()=>document.removeEventListener("mousedown",N)},[]);const v=()=>{u(!0),h(-1),r.length>0&&o(!0)},g=N=>{t(N),h(-1)},x=N=>{var B;t(N),n(N),o(!1),(B=l.current)==null||B.blur()},T=N=>{var B;N.key==="Enter"?d>=0&&d<r.length?(N.preventDefault(),b(r[d].query)):e.trim()&&x(e.trim()):N.key==="Escape"?(o(!1),h(-1),(B=l.current)==null||B.blur()):N.key==="ArrowDown"?(N.preventDefault(),r.length>0&&(a||o(!0),h(M=>M<r.length-1?M+1:M))):N.key==="ArrowUp"&&(N.preventDefault(),h(M=>M>0?M-1:-1))},b=N=>{h(-1),x(N)},_=()=>{var N;t(""),(N=l.current)==null||N.focus()},k=r.filter(N=>N.isFavourite),F=r.filter(N=>!N.isFavourite),z=a&&r.length>0;return c.jsxs(p.Box,{sx:{position:"relative",width:256},ref:m,children:[c.jsx(p.TextField,{inputRef:l,size:"small",fullWidth:!0,value:e,onChange:N=>g(N.target.value),onFocus:v,onKeyDown:T,placeholder:"Search…",InputProps:{startAdornment:c.jsx(p.InputAdornment,{position:"start",children:c.jsx(ZE,{size:16})}),endAdornment:e?c.jsx(p.InputAdornment,{position:"end",children:c.jsx(p.IconButton,{size:"small",onClick:_,edge:"end",children:c.jsx(Et,{size:16})})}):null}}),z&&c.jsxs(p.Paper,{sx:{position:"absolute",zIndex:50,mt:.5,width:"100%",maxHeight:384,overflowY:"auto"},elevation:3,children:[k.length>0&&c.jsxs(p.Box,{sx:{py:1},children:[c.jsx(p.Typography,{variant:"caption",sx:{px:1.5,py:.75,display:"block",fontWeight:600,textTransform:"uppercase",color:"text.secondary",letterSpacing:"0.05em"},children:"Favourite Searches"}),k.map((N,B)=>c.jsx(Fc,{entry:N,isSelected:d===B,onClick:()=>b(N.query),onToggleFavourite:()=>i(N.query),onDelete:()=>s(N.query)},`fav-${N.query}`))]}),F.length>0&&c.jsxs(p.Box,{sx:{py:1},children:[k.length>0&&c.jsx(p.Divider,{}),c.jsx(p.Typography,{variant:"caption",sx:{px:1.5,py:.75,display:"block",fontWeight:600,textTransform:"uppercase",color:"text.secondary",letterSpacing:"0.05em"},children:"Recent Searches"}),F.map((N,B)=>{const M=k.length+B;return c.jsx(Fc,{entry:N,isSelected:d===M,onClick:()=>b(N.query),onToggleFavourite:()=>i(N.query),onDelete:()=>s(N.query)},`recent-${N.query}`)})]})]})]})}function Fc({entry:e,isSelected:t,onClick:r,onToggleFavourite:n,onDelete:i}){return c.jsxs(p.Box,{sx:{display:"flex",alignItems:"center",justifyContent:"space-between",px:1.5,py:1,cursor:"pointer",bgcolor:t?"primary.lighter":"transparent","&:hover":{bgcolor:t?"primary.lighter":"action.hover"}},children:[c.jsx(p.Box,{sx:{flex:1,minWidth:0},onClick:r,children:c.jsx(p.Typography,{variant:"body2",noWrap:!0,children:e.query})}),c.jsxs(p.Box,{sx:{display:"flex",alignItems:"center",gap:.5,ml:1},children:[c.jsx(p.IconButton,{size:"small",onClick:s=>{s.stopPropagation(),n()},title:e.isFavourite?"Remove from favourites":"Add to favourites",sx:{p:.5},children:c.jsx(La,{size:14,fill:e.isFavourite?"#facc15":"none",color:e.isFavourite?"#facc15":"currentColor",style:{opacity:e.isFavourite?1:.5}})}),c.jsx(p.IconButton,{size:"small",onClick:s=>{s.stopPropagation(),i()},title:"Delete from history",sx:{p:.5,"&:hover":{color:"error.main"}},children:c.jsx(En,{size:14,style:{opacity:.5}})})]})]})}function x_({views:e,activeViewId:t,isDirty:r,onSelectView:n,onCreateView:i,onManageViews:s,onToggleDefault:a,onToggleFavorite:o,onRestoreView:f,onPermanentDelete:u,isReadOnly:d}){const[h,m]=S.useState(!1),[l,v]=S.useState(!1),[g,x]=S.useState({top:0,left:0}),T=S.useRef(null),b=S.useRef(null),_=e.find(y=>y.id===t),k=_==null?void 0:_.isDefault,F=e.filter(y=>y.isDefault&&!y.isDeleted),z=e.filter(y=>!y.isDefault&&!y.isDeleted).sort((y,H)=>(H.updatedAt||0)-(y.updatedAt||0)),N=e.filter(y=>y.isFavorite&&!y.isDeleted).sort((y,H)=>(H.updatedAt||0)-(y.updatedAt||0)),B=e.filter(y=>y.isDeleted);S.useEffect(()=>{if(h&&b.current){const y=b.current.getBoundingClientRect();x({top:y.bottom+window.scrollY+8,left:y.left+window.scrollX})}},[h]),S.useEffect(()=>{const y=H=>{T.current&&!T.current.contains(H.target)&&b.current&&!b.current.contains(H.target)&&m(!1)};return h&&document.addEventListener("mousedown",y),()=>{document.removeEventListener("mousedown",y)}},[h]);const M=y=>{n(y),m(!1)},L=(y,H=!1)=>c.jsxs("div",{className:`flex items-center justify-between px-4 py-2 text-sm hover:bg-gray-50 transition-colors ${t===y.id?"bg-blue-50":""}`,children:[c.jsxs("button",{onClick:()=>M(y.id),className:"flex items-center gap-2 flex-1 text-left min-w-0",children:[t===y.id&&c.jsx(ja,{className:"w-4 h-4 text-blue-700 flex-shrink-0"}),t!==y.id&&c.jsx("div",{className:"w-4 flex-shrink-0"}),c.jsx("span",{className:`truncate ${t===y.id?"text-blue-700 font-medium":"text-gray-700"}`,children:y.name}),H&&c.jsx("span",{className:"text-xs text-gray-500 bg-gray-100 px-2 py-0.5 rounded flex-shrink-0",children:"Default"})]}),c.jsxs("div",{className:"flex items-center gap-1 flex-shrink-0",children:[o&&c.jsx("button",{onClick:Q=>{Q.stopPropagation(),o(y.id)},className:"p-1 hover:bg-gray-200 rounded transition-colors",title:y.isFavorite?"Remove from favorites":"Add to favorites",children:c.jsx(La,{className:`w-4 h-4 ${y.isFavorite?"fill-yellow-500 text-yellow-500":"text-gray-400"}`})}),a&&!y.isDefault&&c.jsx("button",{onClick:Q=>{Q.stopPropagation(),a(y.id)},className:"p-1 hover:bg-gray-200 rounded transition-colors",title:"Set as default",children:c.jsx(xE,{className:"w-4 h-4 text-gray-400"})})]})]},y.id),W=y=>c.jsxs("div",{className:"flex items-center justify-between px-4 py-2 text-sm bg-gray-50",children:[c.jsx("span",{className:"text-gray-500 truncate flex-1",children:y.name}),c.jsxs("div",{className:"flex items-center gap-1 flex-shrink-0",children:[f&&c.jsx("button",{onClick:H=>{H.stopPropagation(),f(y.id)},className:"p-1 hover:bg-gray-200 rounded transition-colors",title:"Restore view",children:c.jsx(Ys,{className:"w-4 h-4 text-green-600"})}),u&&c.jsx("button",{onClick:H=>{H.stopPropagation(),u(y.id)},className:"p-1 hover:bg-gray-200 rounded transition-colors",title:"Delete permanently",children:c.jsx(En,{className:"w-4 h-4 text-red-600"})})]})]},y.id);return c.jsxs("div",{className:"relative",children:[c.jsxs("button",{ref:b,onClick:()=>m(!h),style:{display:"flex",alignItems:"center",gap:"8px",padding:"4px 12px",fontSize:"0.875rem",fontWeight:500,borderRadius:"4px",border:"none",background:"transparent",color:"inherit",cursor:"pointer",whiteSpace:"nowrap",transition:"background-color 0.2s"},onMouseEnter:y=>{y.currentTarget.style.backgroundColor="rgba(0, 0, 0, 0.04)"},onMouseLeave:y=>{y.currentTarget.style.backgroundColor="transparent"},children:[c.jsx("span",{style:{color:"rgba(0, 0, 0, 0.6)"},children:"View:"}),c.jsx("span",{style:{fontWeight:500},children:(_==null?void 0:_.name)||"Default View"}),!k&&!r&&c.jsx("span",{style:{marginLeft:"4px",padding:"2px 6px",fontSize:"0.75rem",fontWeight:600,backgroundColor:"#1976d2",color:"white",borderRadius:"8px"},children:"✓"}),r&&c.jsx("span",{style:{marginLeft:"4px",padding:"2px 6px",fontSize:"0.75rem",fontWeight:600,backgroundColor:"#ed6c02",color:"white",borderRadius:"8px"},children:"*"}),c.jsx(Mi,{size:16,style:{opacity:.54}})]}),h&&za.createPortal(c.jsxs("div",{ref:T,className:"fixed w-80 bg-white border border-gray-200 rounded-md shadow-lg z-50 max-h-[500px] overflow-y-auto",style:{top:`${g.top}px`,left:`${g.left}px`},children:[F.length>0&&c.jsxs("div",{className:"py-1",children:[c.jsx("div",{className:"px-4 py-2 text-xs font-semibold text-gray-500 uppercase tracking-wide",children:"Default Views"}),F.map(y=>L(y,!0))]}),N.length>0&&c.jsxs(c.Fragment,{children:[c.jsx("div",{className:"border-t border-gray-200"}),c.jsxs("div",{className:"py-1",children:[c.jsxs("div",{className:"px-4 py-2 text-xs font-semibold text-gray-500 uppercase tracking-wide flex items-center gap-1",children:[c.jsx(La,{className:"w-3 h-3 fill-yellow-500 text-yellow-500"}),"Favorite Views"]}),N.map(y=>L(y))]})]}),z.length>0&&c.jsxs(c.Fragment,{children:[c.jsx("div",{className:"border-t border-gray-200"}),c.jsxs("div",{className:"py-1",children:[c.jsx("div",{className:"px-4 py-2 text-xs font-semibold text-gray-500 uppercase tracking-wide",children:"Custom Views"}),z.map(y=>L(y))]})]}),B.length>0&&c.jsxs(c.Fragment,{children:[c.jsx("div",{className:"border-t border-gray-200"}),c.jsxs("div",{className:"py-1",children:[c.jsxs("button",{onClick:()=>v(!l),className:"w-full px-4 py-2 text-xs font-semibold text-gray-500 uppercase tracking-wide flex items-center justify-between hover:bg-gray-50",children:[c.jsxs("span",{children:["Recently Deleted (",B.length,")"]}),c.jsx(Hs,{className:`w-4 h-4 transition-transform ${l?"rotate-90":""}`})]}),l&&c.jsx("div",{className:"bg-gray-50",children:B.map(y=>W(y))})]})]}),c.jsx("div",{className:"border-t border-gray-200"}),c.jsxs("button",{onClick:()=>{i(),m(!1)},className:"w-full flex items-center gap-2 px-4 py-2 text-sm text-gray-700 hover:bg-gray-50 transition-colors",children:[c.jsx(ti,{className:"w-4 h-4"}),"Create New Report View"]}),c.jsxs("button",{onClick:()=>{s(),m(!1)},className:"w-full flex items-center gap-2 px-4 py-2 text-sm text-gray-700 hover:bg-gray-50 transition-colors",children:[c.jsx(No,{className:"w-4 h-4"}),"View Setup"]})]}),document.body)]})}function v_({onClick:e,hiddenCount:t,hasCustomOrder:r}){const n=t>0||r;return c.jsxs(p.Button,{onClick:e,variant:"text",startIcon:c.jsx(Cf,{size:18}),title:t>0?`${t} column${t===1?"":"s"} hidden`:r?"Custom column order":"Manage columns",sx:{color:"text.primary",textTransform:"none",fontWeight:500,px:1.5,py:.5,minWidth:"auto",borderRadius:1,whiteSpace:"nowrap","&:hover":{bgcolor:"action.hover"}},children:["Columns",n&&c.jsx(p.Box,{component:"span",sx:{ml:.5,px:.75,py:.25,fontSize:"0.75rem",fontWeight:600,color:"primary.contrastText",bgcolor:"primary.main",borderRadius:2},children:t>0?t:"✓"})]})}const Nf=S.createContext({dragDropManager:void 0});function Er(e){return"Minified Redux error #"+e+"; visit https://redux.js.org/Errors?code="+e+" for the full message or use the non-minified dev environment for full errors. "}var Nc=(function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"})(),Rc=function(){return Math.random().toString(36).substring(7).split("").join(".")},Pc={INIT:"@@redux/INIT"+Rc(),REPLACE:"@@redux/REPLACE"+Rc()};function y_(e){if(typeof e!="object"||e===null)return!1;for(var t=e;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}function w_(e){if(e===void 0)return"undefined";if(e===null)return"null";var t=typeof e;switch(t){case"boolean":case"string":case"number":case"symbol":case"function":return t}if(Array.isArray(e))return"array";if(E_(e))return"date";if(S_(e))return"error";var r=T_(e);switch(r){case"Symbol":case"Promise":case"WeakMap":case"WeakSet":case"Map":case"Set":return r}return t.slice(8,-1).toLowerCase().replace(/\s/g,"")}function T_(e){return typeof e.constructor=="function"?e.constructor.name:null}function S_(e){return e instanceof Error||typeof e.message=="string"&&e.constructor&&typeof e.constructor.stackTraceLimit=="number"}function E_(e){return e instanceof Date?!0:typeof e.toDateString=="function"&&typeof e.getDate=="function"&&typeof e.setDate=="function"}function $n(e){var t=typeof e;return process.env.NODE_ENV!=="production"&&(t=w_(e)),t}function Rf(e,t,r){var n;if(typeof t=="function"&&typeof r=="function"||typeof r=="function"&&typeof arguments[3]=="function")throw new Error(process.env.NODE_ENV==="production"?Er(0):"It looks like you are passing several store enhancers to createStore(). This is not supported. Instead, compose them together to a single function. See https://redux.js.org/tutorials/fundamentals/part-4-store#creating-a-store-with-enhancers for an example.");if(typeof t=="function"&&typeof r>"u"&&(r=t,t=void 0),typeof r<"u"){if(typeof r!="function")throw new Error(process.env.NODE_ENV==="production"?Er(1):"Expected the enhancer to be a function. Instead, received: '"+$n(r)+"'");return r(Rf)(e,t)}if(typeof e!="function")throw new Error(process.env.NODE_ENV==="production"?Er(2):"Expected the root reducer to be a function. Instead, received: '"+$n(e)+"'");var i=e,s=t,a=[],o=a,f=!1;function u(){o===a&&(o=a.slice())}function d(){if(f)throw new Error(process.env.NODE_ENV==="production"?Er(3):"You may not call store.getState() while the reducer is executing. The reducer has already received the state as an argument. Pass it down from the top reducer instead of reading it from the store.");return s}function h(g){if(typeof g!="function")throw new Error(process.env.NODE_ENV==="production"?Er(4):"Expected the listener to be a function. Instead, received: '"+$n(g)+"'");if(f)throw new Error(process.env.NODE_ENV==="production"?Er(5):"You may not call store.subscribe() while the reducer is executing. If you would like to be notified after the store has been updated, subscribe from a component and invoke store.getState() in the callback to access the latest state. See https://redux.js.org/api/store#subscribelistener for more details.");var x=!0;return u(),o.push(g),function(){if(x){if(f)throw new Error(process.env.NODE_ENV==="production"?Er(6):"You may not unsubscribe from a store listener while the reducer is executing. See https://redux.js.org/api/store#subscribelistener for more details.");x=!1,u();var b=o.indexOf(g);o.splice(b,1),a=null}}}function m(g){if(!y_(g))throw new Error(process.env.NODE_ENV==="production"?Er(7):"Actions must be plain objects. Instead, the actual type was: '"+$n(g)+"'. You may need to add middleware to your store setup to handle dispatching other values, such as 'redux-thunk' to handle dispatching functions. See https://redux.js.org/tutorials/fundamentals/part-4-store#middleware and https://redux.js.org/tutorials/fundamentals/part-6-async-logic#using-the-redux-thunk-middleware for examples.");if(typeof g.type>"u")throw new Error(process.env.NODE_ENV==="production"?Er(8):'Actions may not have an undefined "type" property. You may have misspelled an action type string constant.');if(f)throw new Error(process.env.NODE_ENV==="production"?Er(9):"Reducers may not dispatch actions.");try{f=!0,s=i(s,g)}finally{f=!1}for(var x=a=o,T=0;T<x.length;T++){var b=x[T];b()}return g}function l(g){if(typeof g!="function")throw new Error(process.env.NODE_ENV==="production"?Er(10):"Expected the nextReducer to be a function. Instead, received: '"+$n(g));i=g,m({type:Pc.REPLACE})}function v(){var g,x=h;return g={subscribe:function(b){if(typeof b!="object"||b===null)throw new Error(process.env.NODE_ENV==="production"?Er(11):"Expected the observer to be an object. Instead, received: '"+$n(b)+"'");function _(){b.next&&b.next(d())}_();var k=x(_);return{unsubscribe:k}}},g[Nc]=function(){return this},g}return m({type:Pc.INIT}),n={dispatch:m,subscribe:h,getState:d,replaceReducer:l},n[Nc]=v,n}function Le(e,t,...r){if(__()&&t===void 0)throw new Error("invariant requires an error message argument");if(!e){let n;if(t===void 0)n=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{let i=0;n=new Error(t.replace(/%s/g,function(){return r[i++]})),n.name="Invariant Violation"}throw n.framesToPop=1,n}}function __(){return typeof process<"u"&&process.env.NODE_ENV==="production"}function b_(e,t,r){return t.split(".").reduce((n,i)=>n&&n[i]?n[i]:r||null,e)}function C_(e,t){return e.filter(r=>r!==t)}function Pf(e){return typeof e=="object"}function A_(e,t){const r=new Map,n=s=>{r.set(s,r.has(s)?r.get(s)+1:1)};e.forEach(n),t.forEach(n);const i=[];return r.forEach((s,a)=>{s===1&&i.push(a)}),i}function O_(e,t){return e.filter(r=>t.indexOf(r)>-1)}const Ro="dnd-core/INIT_COORDS",Ks="dnd-core/BEGIN_DRAG",Po="dnd-core/PUBLISH_DRAG_SOURCE",qs="dnd-core/HOVER",Js="dnd-core/DROP",Zs="dnd-core/END_DRAG";function jc(e,t){return{type:Ro,payload:{sourceClientOffset:t||null,clientOffset:e||null}}}const D_={type:Ro,payload:{clientOffset:null,sourceClientOffset:null}};function k_(e){return function(r=[],n={publishSource:!0}){const{publishSource:i=!0,clientOffset:s,getSourceClientOffset:a}=n,o=e.getMonitor(),f=e.getRegistry();e.dispatch(jc(s)),I_(r,o,f);const u=R_(r,o);if(u==null){e.dispatch(D_);return}let d=null;if(s){if(!a)throw new Error("getSourceClientOffset must be defined");F_(a),d=a(u)}e.dispatch(jc(s,d));const m=f.getSource(u).beginDrag(o,u);if(m==null)return;N_(m),f.pinSource(u);const l=f.getSourceType(u);return{type:Ks,payload:{itemType:l,item:m,sourceId:u,clientOffset:s||null,sourceClientOffset:d||null,isSourcePublic:!!i}}}}function I_(e,t,r){Le(!t.isDragging(),"Cannot call beginDrag while dragging."),e.forEach(function(n){Le(r.getSource(n),"Expected sourceIds to be registered.")})}function F_(e){Le(typeof e=="function","When clientOffset is provided, getSourceClientOffset must be a function.")}function N_(e){Le(Pf(e),"Item must be an object.")}function R_(e,t){let r=null;for(let n=e.length-1;n>=0;n--)if(t.canDragSource(e[n])){r=e[n];break}return r}function P_(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function j_(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{},n=Object.keys(r);typeof Object.getOwnPropertySymbols=="function"&&(n=n.concat(Object.getOwnPropertySymbols(r).filter(function(i){return Object.getOwnPropertyDescriptor(r,i).enumerable}))),n.forEach(function(i){P_(e,i,r[i])})}return e}function M_(e){return function(r={}){const n=e.getMonitor(),i=e.getRegistry();L_(n),U_(n).forEach((a,o)=>{const f=B_(a,o,i,n),u={type:Js,payload:{dropResult:j_({},r,f)}};e.dispatch(u)})}}function L_(e){Le(e.isDragging(),"Cannot call drop while not dragging."),Le(!e.didDrop(),"Cannot call drop twice during one drag operation.")}function B_(e,t,r,n){const i=r.getTarget(e);let s=i?i.drop(n,e):void 0;return $_(s),typeof s>"u"&&(s=t===0?{}:n.getDropResult()),s}function $_(e){Le(typeof e>"u"||Pf(e),"Drop result must either be an object or undefined.")}function U_(e){const t=e.getTargetIds().filter(e.canDropOnTarget,e);return t.reverse(),t}function W_(e){return function(){const r=e.getMonitor(),n=e.getRegistry();V_(r);const i=r.getSourceId();return i!=null&&(n.getSource(i,!0).endDrag(r,i),n.unpinSource()),{type:Zs}}}function V_(e){Le(e.isDragging(),"Cannot call endDrag while not dragging.")}function Ba(e,t){return t===null?e===null:Array.isArray(e)?e.some(r=>r===t):e===t}function z_(e){return function(r,{clientOffset:n}={}){H_(r);const i=r.slice(0),s=e.getMonitor(),a=e.getRegistry(),o=s.getItemType();return Y_(i,a,o),G_(i,s,a),X_(i,s,a),{type:qs,payload:{targetIds:i,clientOffset:n||null}}}}function H_(e){Le(Array.isArray(e),"Expected targetIds to be an array.")}function G_(e,t,r){Le(t.isDragging(),"Cannot call hover while not dragging."),Le(!t.didDrop(),"Cannot call hover after drop.");for(let n=0;n<e.length;n++){const i=e[n];Le(e.lastIndexOf(i)===n,"Expected targetIds to be unique in the passed array.");const s=r.getTarget(i);Le(s,"Expected targetIds to be registered.")}}function Y_(e,t,r){for(let n=e.length-1;n>=0;n--){const i=e[n],s=t.getTargetType(i);Ba(s,r)||e.splice(n,1)}}function X_(e,t,r){e.forEach(function(n){r.getTarget(n).hover(t,n)})}function K_(e){return function(){if(e.getMonitor().isDragging())return{type:Po}}}function q_(e){return{beginDrag:k_(e),publishDragSource:K_(e),hover:z_(e),drop:M_(e),endDrag:W_(e)}}class J_{receiveBackend(t){this.backend=t}getMonitor(){return this.monitor}getBackend(){return this.backend}getRegistry(){return this.monitor.registry}getActions(){const t=this,{dispatch:r}=this.store;function n(s){return(...a)=>{const o=s.apply(t,a);typeof o<"u"&&r(o)}}const i=q_(this);return Object.keys(i).reduce((s,a)=>{const o=i[a];return s[a]=n(o),s},{})}dispatch(t){this.store.dispatch(t)}constructor(t,r){this.isSetUp=!1,this.handleRefCountChange=()=>{const n=this.store.getState().refCount>0;this.backend&&(n&&!this.isSetUp?(this.backend.setup(),this.isSetUp=!0):!n&&this.isSetUp&&(this.backend.teardown(),this.isSetUp=!1))},this.store=t,this.monitor=r,t.subscribe(this.handleRefCountChange)}}function Z_(e,t){return{x:e.x+t.x,y:e.y+t.y}}function jf(e,t){return{x:e.x-t.x,y:e.y-t.y}}function Q_(e){const{clientOffset:t,initialClientOffset:r,initialSourceClientOffset:n}=e;return!t||!r||!n?null:jf(Z_(t,n),r)}function eb(e){const{clientOffset:t,initialClientOffset:r}=e;return!t||!r?null:jf(t,r)}const xi=[],jo=[];xi.__IS_NONE__=!0;jo.__IS_ALL__=!0;function tb(e,t){return e===xi?!1:e===jo||typeof t>"u"?!0:O_(t,e).length>0}class rb{subscribeToStateChange(t,r={}){const{handlerIds:n}=r;Le(typeof t=="function","listener must be a function."),Le(typeof n>"u"||Array.isArray(n),"handlerIds, when specified, must be an array of strings.");let i=this.store.getState().stateId;const s=()=>{const a=this.store.getState(),o=a.stateId;try{o===i||o===i+1&&!tb(a.dirtyHandlerIds,n)||t()}finally{i=o}};return this.store.subscribe(s)}subscribeToOffsetChange(t){Le(typeof t=="function","listener must be a function.");let r=this.store.getState().dragOffset;const n=()=>{const i=this.store.getState().dragOffset;i!==r&&(r=i,t())};return this.store.subscribe(n)}canDragSource(t){if(!t)return!1;const r=this.registry.getSource(t);return Le(r,`Expected to find a valid source. sourceId=${t}`),this.isDragging()?!1:r.canDrag(this,t)}canDropOnTarget(t){if(!t)return!1;const r=this.registry.getTarget(t);if(Le(r,`Expected to find a valid target. targetId=${t}`),!this.isDragging()||this.didDrop())return!1;const n=this.registry.getTargetType(t),i=this.getItemType();return Ba(n,i)&&r.canDrop(this,t)}isDragging(){return!!this.getItemType()}isDraggingSource(t){if(!t)return!1;const r=this.registry.getSource(t,!0);if(Le(r,`Expected to find a valid source. sourceId=${t}`),!this.isDragging()||!this.isSourcePublic())return!1;const n=this.registry.getSourceType(t),i=this.getItemType();return n!==i?!1:r.isDragging(this,t)}isOverTarget(t,r={shallow:!1}){if(!t)return!1;const{shallow:n}=r;if(!this.isDragging())return!1;const i=this.registry.getTargetType(t),s=this.getItemType();if(s&&!Ba(i,s))return!1;const a=this.getTargetIds();if(!a.length)return!1;const o=a.indexOf(t);return n?o===a.length-1:o>-1}getItemType(){return this.store.getState().dragOperation.itemType}getItem(){return this.store.getState().dragOperation.item}getSourceId(){return this.store.getState().dragOperation.sourceId}getTargetIds(){return this.store.getState().dragOperation.targetIds}getDropResult(){return this.store.getState().dragOperation.dropResult}didDrop(){return this.store.getState().dragOperation.didDrop}isSourcePublic(){return!!this.store.getState().dragOperation.isSourcePublic}getInitialClientOffset(){return this.store.getState().dragOffset.initialClientOffset}getInitialSourceClientOffset(){return this.store.getState().dragOffset.initialSourceClientOffset}getClientOffset(){return this.store.getState().dragOffset.clientOffset}getSourceClientOffset(){return Q_(this.store.getState().dragOffset)}getDifferenceFromInitialOffset(){return eb(this.store.getState().dragOffset)}constructor(t,r){this.store=t,this.registry=r}}const Mc=typeof global<"u"?global:self,Mf=Mc.MutationObserver||Mc.WebKitMutationObserver;function Lf(e){return function(){const r=setTimeout(i,0),n=setInterval(i,50);function i(){clearTimeout(r),clearInterval(n),e()}}}function nb(e){let t=1;const r=new Mf(e),n=document.createTextNode("");return r.observe(n,{characterData:!0}),function(){t=-t,n.data=t}}const ib=typeof Mf=="function"?nb:Lf;class sb{enqueueTask(t){const{queue:r,requestFlush:n}=this;r.length||(n(),this.flushing=!0),r[r.length]=t}constructor(){this.queue=[],this.pendingErrors=[],this.flushing=!1,this.index=0,this.capacity=1024,this.flush=()=>{const{queue:t}=this;for(;this.index<t.length;){const r=this.index;if(this.index++,t[r].call(),this.index>this.capacity){for(let n=0,i=t.length-this.index;n<i;n++)t[n]=t[n+this.index];t.length-=this.index,this.index=0}}t.length=0,this.index=0,this.flushing=!1},this.registerPendingError=t=>{this.pendingErrors.push(t),this.requestErrorThrow()},this.requestFlush=ib(this.flush),this.requestErrorThrow=Lf(()=>{if(this.pendingErrors.length)throw this.pendingErrors.shift()})}}class ab{call(){try{this.task&&this.task()}catch(t){this.onError(t)}finally{this.task=null,this.release(this)}}constructor(t,r){this.onError=t,this.release=r,this.task=null}}class ob{create(t){const r=this.freeTasks,n=r.length?r.pop():new ab(this.onError,i=>r[r.length]=i);return n.task=t,n}constructor(t){this.onError=t,this.freeTasks=[]}}const Bf=new sb,lb=new ob(Bf.registerPendingError);function cb(e){Bf.enqueueTask(lb.create(e))}const Mo="dnd-core/ADD_SOURCE",Lo="dnd-core/ADD_TARGET",Bo="dnd-core/REMOVE_SOURCE",Qs="dnd-core/REMOVE_TARGET";function ub(e){return{type:Mo,payload:{sourceId:e}}}function fb(e){return{type:Lo,payload:{targetId:e}}}function db(e){return{type:Bo,payload:{sourceId:e}}}function hb(e){return{type:Qs,payload:{targetId:e}}}function pb(e){Le(typeof e.canDrag=="function","Expected canDrag to be a function."),Le(typeof e.beginDrag=="function","Expected beginDrag to be a function."),Le(typeof e.endDrag=="function","Expected endDrag to be a function.")}function gb(e){Le(typeof e.canDrop=="function","Expected canDrop to be a function."),Le(typeof e.hover=="function","Expected hover to be a function."),Le(typeof e.drop=="function","Expected beginDrag to be a function.")}function $a(e,t){if(t&&Array.isArray(e)){e.forEach(r=>$a(r,!1));return}Le(typeof e=="string"||typeof e=="symbol",t?"Type can only be a string, a symbol, or an array of either.":"Type can only be a string or a symbol.")}var Ar;(function(e){e.SOURCE="SOURCE",e.TARGET="TARGET"})(Ar||(Ar={}));let mb=0;function xb(){return mb++}function vb(e){const t=xb().toString();switch(e){case Ar.SOURCE:return`S${t}`;case Ar.TARGET:return`T${t}`;default:throw new Error(`Unknown Handler Role: ${e}`)}}function Lc(e){switch(e[0]){case"S":return Ar.SOURCE;case"T":return Ar.TARGET;default:throw new Error(`Cannot parse handler ID: ${e}`)}}function Bc(e,t){const r=e.entries();let n=!1;do{const{done:i,value:[,s]}=r.next();if(s===t)return!0;n=!!i}while(!n);return!1}class yb{addSource(t,r){$a(t),pb(r);const n=this.addHandler(Ar.SOURCE,t,r);return this.store.dispatch(ub(n)),n}addTarget(t,r){$a(t,!0),gb(r);const n=this.addHandler(Ar.TARGET,t,r);return this.store.dispatch(fb(n)),n}containsHandler(t){return Bc(this.dragSources,t)||Bc(this.dropTargets,t)}getSource(t,r=!1){return Le(this.isSourceId(t),"Expected a valid source ID."),r&&t===this.pinnedSourceId?this.pinnedSource:this.dragSources.get(t)}getTarget(t){return Le(this.isTargetId(t),"Expected a valid target ID."),this.dropTargets.get(t)}getSourceType(t){return Le(this.isSourceId(t),"Expected a valid source ID."),this.types.get(t)}getTargetType(t){return Le(this.isTargetId(t),"Expected a valid target ID."),this.types.get(t)}isSourceId(t){return Lc(t)===Ar.SOURCE}isTargetId(t){return Lc(t)===Ar.TARGET}removeSource(t){Le(this.getSource(t),"Expected an existing source."),this.store.dispatch(db(t)),cb(()=>{this.dragSources.delete(t),this.types.delete(t)})}removeTarget(t){Le(this.getTarget(t),"Expected an existing target."),this.store.dispatch(hb(t)),this.dropTargets.delete(t),this.types.delete(t)}pinSource(t){const r=this.getSource(t);Le(r,"Expected an existing source."),this.pinnedSourceId=t,this.pinnedSource=r}unpinSource(){Le(this.pinnedSource,"No source is pinned at the time."),this.pinnedSourceId=null,this.pinnedSource=null}addHandler(t,r,n){const i=vb(t);return this.types.set(i,r),t===Ar.SOURCE?this.dragSources.set(i,n):t===Ar.TARGET&&this.dropTargets.set(i,n),i}constructor(t){this.types=new Map,this.dragSources=new Map,this.dropTargets=new Map,this.pinnedSourceId=null,this.pinnedSource=null,this.store=t}}const wb=(e,t)=>e===t;function Tb(e,t){return!e&&!t?!0:!e||!t?!1:e.x===t.x&&e.y===t.y}function Sb(e,t,r=wb){if(e.length!==t.length)return!1;for(let n=0;n<e.length;++n)if(!r(e[n],t[n]))return!1;return!0}function Eb(e=xi,t){switch(t.type){case qs:break;case Mo:case Lo:case Qs:case Bo:return xi;case Ks:case Po:case Zs:case Js:default:return jo}const{targetIds:r=[],prevTargetIds:n=[]}=t.payload,i=A_(r,n);if(!(i.length>0||!Sb(r,n)))return xi;const a=n[n.length-1],o=r[r.length-1];return a!==o&&(a&&i.push(a),o&&i.push(o)),i}function _b(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function bb(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{},n=Object.keys(r);typeof Object.getOwnPropertySymbols=="function"&&(n=n.concat(Object.getOwnPropertySymbols(r).filter(function(i){return Object.getOwnPropertyDescriptor(r,i).enumerable}))),n.forEach(function(i){_b(e,i,r[i])})}return e}const $c={initialSourceClientOffset:null,initialClientOffset:null,clientOffset:null};function Cb(e=$c,t){const{payload:r}=t;switch(t.type){case Ro:case Ks:return{initialSourceClientOffset:r.sourceClientOffset,initialClientOffset:r.clientOffset,clientOffset:r.clientOffset};case qs:return Tb(e.clientOffset,r.clientOffset)?e:bb({},e,{clientOffset:r.clientOffset});case Zs:case Js:return $c;default:return e}}function Ab(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Un(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{},n=Object.keys(r);typeof Object.getOwnPropertySymbols=="function"&&(n=n.concat(Object.getOwnPropertySymbols(r).filter(function(i){return Object.getOwnPropertyDescriptor(r,i).enumerable}))),n.forEach(function(i){Ab(e,i,r[i])})}return e}const Ob={itemType:null,item:null,sourceId:null,targetIds:[],dropResult:null,didDrop:!1,isSourcePublic:null};function Db(e=Ob,t){const{payload:r}=t;switch(t.type){case Ks:return Un({},e,{itemType:r.itemType,item:r.item,sourceId:r.sourceId,isSourcePublic:r.isSourcePublic,dropResult:null,didDrop:!1});case Po:return Un({},e,{isSourcePublic:!0});case qs:return Un({},e,{targetIds:r.targetIds});case Qs:return e.targetIds.indexOf(r.targetId)===-1?e:Un({},e,{targetIds:C_(e.targetIds,r.targetId)});case Js:return Un({},e,{dropResult:r.dropResult,didDrop:!0,targetIds:[]});case Zs:return Un({},e,{itemType:null,item:null,sourceId:null,dropResult:null,didDrop:!1,isSourcePublic:null,targetIds:[]});default:return e}}function kb(e=0,t){switch(t.type){case Mo:case Lo:return e+1;case Bo:case Qs:return e-1;default:return e}}function Ib(e=0){return e+1}function Fb(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Nb(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{},n=Object.keys(r);typeof Object.getOwnPropertySymbols=="function"&&(n=n.concat(Object.getOwnPropertySymbols(r).filter(function(i){return Object.getOwnPropertyDescriptor(r,i).enumerable}))),n.forEach(function(i){Fb(e,i,r[i])})}return e}function Rb(e={},t){return{dirtyHandlerIds:Eb(e.dirtyHandlerIds,{type:t.type,payload:Nb({},t.payload,{prevTargetIds:b_(e,"dragOperation.targetIds",[])})}),dragOffset:Cb(e.dragOffset,t),refCount:kb(e.refCount,t),dragOperation:Db(e.dragOperation,t),stateId:Ib(e.stateId)}}function Pb(e,t=void 0,r={},n=!1){const i=jb(n),s=new rb(i,new yb(i)),a=new J_(i,s),o=e(a,t,r);return a.receiveBackend(o),a}function jb(e){const t=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION__;return Rf(Rb,e&&t&&t({name:"dnd-core",instanceId:"dnd-core"}))}function Mb(e,t){if(e==null)return{};var r=Lb(e,t),n,i;if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(i=0;i<s.length;i++)n=s[i],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function Lb(e,t){if(e==null)return{};var r={},n=Object.keys(e),i,s;for(s=0;s<n.length;s++)i=n[s],!(t.indexOf(i)>=0)&&(r[i]=e[i]);return r}let Uc=0;const ns=Symbol.for("__REACT_DND_CONTEXT_INSTANCE__");var $f=S.memo(function(t){var{children:r}=t,n=Mb(t,["children"]);const[i,s]=Bb(n);return S.useEffect(()=>{if(s){const a=Uf();return++Uc,()=>{--Uc===0&&(a[ns]=null)}}},[]),c.jsx(Nf.Provider,{value:i,children:r})});function Bb(e){if("manager"in e)return[{dragDropManager:e.manager},!1];const t=$b(e.backend,e.context,e.options,e.debugMode),r=!e.context;return[t,r]}function $b(e,t=Uf(),r,n){const i=t;return i[ns]||(i[ns]={dragDropManager:Pb(e,t,r,n)}),i[ns]}function Uf(){return typeof global<"u"?global:window}var wa,Wc;function Ub(){return Wc||(Wc=1,wa=function e(t,r){if(t===r)return!0;if(t&&r&&typeof t=="object"&&typeof r=="object"){if(t.constructor!==r.constructor)return!1;var n,i,s;if(Array.isArray(t)){if(n=t.length,n!=r.length)return!1;for(i=n;i--!==0;)if(!e(t[i],r[i]))return!1;return!0}if(t.constructor===RegExp)return t.source===r.source&&t.flags===r.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===r.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===r.toString();if(s=Object.keys(t),n=s.length,n!==Object.keys(r).length)return!1;for(i=n;i--!==0;)if(!Object.prototype.hasOwnProperty.call(r,s[i]))return!1;for(i=n;i--!==0;){var a=s[i];if(!e(t[a],r[a]))return!1}return!0}return t!==t&&r!==r}),wa}var Wb=Ub();const Vb=Hu(Wb),_n=typeof window<"u"?S.useLayoutEffect:S.useEffect;function zb(e,t,r){const[n,i]=S.useState(()=>t(e)),s=S.useCallback(()=>{const a=t(e);Vb(n,a)||(i(a),r&&r())},[n,e,r]);return _n(s),[n,s]}function Hb(e,t,r){const[n,i]=zb(e,t,r);return _n(function(){const a=e.getHandlerId();if(a!=null)return e.subscribeToStateChange(i,{handlerIds:[a]})},[e,i]),n}function Wf(e,t,r){return Hb(t,e||(()=>({})),()=>r.reconnect())}function Vf(e,t){const r=[];return typeof e!="function"&&r.push(e),S.useMemo(()=>typeof e=="function"?e():e,r)}function Gb(e){return S.useMemo(()=>e.hooks.dragSource(),[e])}function Yb(e){return S.useMemo(()=>e.hooks.dragPreview(),[e])}let Ta=!1,Sa=!1;class Xb{receiveHandlerId(t){this.sourceId=t}getHandlerId(){return this.sourceId}canDrag(){Le(!Ta,"You may not call monitor.canDrag() inside your canDrag() implementation. Read more: http://react-dnd.github.io/react-dnd/docs/api/drag-source-monitor");try{return Ta=!0,this.internalMonitor.canDragSource(this.sourceId)}finally{Ta=!1}}isDragging(){if(!this.sourceId)return!1;Le(!Sa,"You may not call monitor.isDragging() inside your isDragging() implementation. Read more: http://react-dnd.github.io/react-dnd/docs/api/drag-source-monitor");try{return Sa=!0,this.internalMonitor.isDraggingSource(this.sourceId)}finally{Sa=!1}}subscribeToStateChange(t,r){return this.internalMonitor.subscribeToStateChange(t,r)}isDraggingSource(t){return this.internalMonitor.isDraggingSource(t)}isOverTarget(t,r){return this.internalMonitor.isOverTarget(t,r)}getTargetIds(){return this.internalMonitor.getTargetIds()}isSourcePublic(){return this.internalMonitor.isSourcePublic()}getSourceId(){return this.internalMonitor.getSourceId()}subscribeToOffsetChange(t){return this.internalMonitor.subscribeToOffsetChange(t)}canDragSource(t){return this.internalMonitor.canDragSource(t)}canDropOnTarget(t){return this.internalMonitor.canDropOnTarget(t)}getItemType(){return this.internalMonitor.getItemType()}getItem(){return this.internalMonitor.getItem()}getDropResult(){return this.internalMonitor.getDropResult()}didDrop(){return this.internalMonitor.didDrop()}getInitialClientOffset(){return this.internalMonitor.getInitialClientOffset()}getInitialSourceClientOffset(){return this.internalMonitor.getInitialSourceClientOffset()}getSourceClientOffset(){return this.internalMonitor.getSourceClientOffset()}getClientOffset(){return this.internalMonitor.getClientOffset()}getDifferenceFromInitialOffset(){return this.internalMonitor.getDifferenceFromInitialOffset()}constructor(t){this.sourceId=null,this.internalMonitor=t.getMonitor()}}let Ea=!1;class Kb{receiveHandlerId(t){this.targetId=t}getHandlerId(){return this.targetId}subscribeToStateChange(t,r){return this.internalMonitor.subscribeToStateChange(t,r)}canDrop(){if(!this.targetId)return!1;Le(!Ea,"You may not call monitor.canDrop() inside your canDrop() implementation. Read more: http://react-dnd.github.io/react-dnd/docs/api/drop-target-monitor");try{return Ea=!0,this.internalMonitor.canDropOnTarget(this.targetId)}finally{Ea=!1}}isOver(t){return this.targetId?this.internalMonitor.isOverTarget(this.targetId,t):!1}getItemType(){return this.internalMonitor.getItemType()}getItem(){return this.internalMonitor.getItem()}getDropResult(){return this.internalMonitor.getDropResult()}didDrop(){return this.internalMonitor.didDrop()}getInitialClientOffset(){return this.internalMonitor.getInitialClientOffset()}getInitialSourceClientOffset(){return this.internalMonitor.getInitialSourceClientOffset()}getSourceClientOffset(){return this.internalMonitor.getSourceClientOffset()}getClientOffset(){return this.internalMonitor.getClientOffset()}getDifferenceFromInitialOffset(){return this.internalMonitor.getDifferenceFromInitialOffset()}constructor(t){this.targetId=null,this.internalMonitor=t.getMonitor()}}function qb(e,t,r){const n=r.getRegistry(),i=n.addTarget(e,t);return[i,()=>n.removeTarget(i)]}function Jb(e,t,r){const n=r.getRegistry(),i=n.addSource(e,t);return[i,()=>n.removeSource(i)]}function Ua(e,t,r,n){let i;if(i!==void 0)return!!i;if(e===t)return!0;if(typeof e!="object"||!e||typeof t!="object"||!t)return!1;const s=Object.keys(e),a=Object.keys(t);if(s.length!==a.length)return!1;const o=Object.prototype.hasOwnProperty.bind(t);for(let f=0;f<s.length;f++){const u=s[f];if(!o(u))return!1;const d=e[u],h=t[u];if(i=void 0,i===!1||i===void 0&&d!==h)return!1}return!0}function Wa(e){return e!==null&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function Zb(e){if(typeof e.type=="string")return;const t=e.type.displayName||e.type.name||"the component";throw new Error(`Only native element nodes can now be passed to React DnD connectors.You can either wrap ${t} into a <div>, or turn it into a drag source or a drop target itself.`)}function Qb(e){return(t=null,r=null)=>{if(!S.isValidElement(t)){const s=t;return e(s,r),s}const n=t;return Zb(n),eC(n,r?s=>e(s,r):e)}}function zf(e){const t={};return Object.keys(e).forEach(r=>{const n=e[r];if(r.endsWith("Ref"))t[r]=e[r];else{const i=Qb(n);t[r]=()=>i}}),t}function Vc(e,t){typeof e=="function"?e(t):e.current=t}function eC(e,t){const r=e.ref;return Le(typeof r!="string","Cannot connect React DnD to an element with an existing string ref. Please convert it to use a callback ref instead, or wrap it into a <span> or <div>. Read more: https://reactjs.org/docs/refs-and-the-dom.html#callback-refs"),r?S.cloneElement(e,{ref:n=>{Vc(r,n),Vc(t,n)}}):S.cloneElement(e,{ref:t})}class tC{receiveHandlerId(t){this.handlerId!==t&&(this.handlerId=t,this.reconnect())}get connectTarget(){return this.dragSource}get dragSourceOptions(){return this.dragSourceOptionsInternal}set dragSourceOptions(t){this.dragSourceOptionsInternal=t}get dragPreviewOptions(){return this.dragPreviewOptionsInternal}set dragPreviewOptions(t){this.dragPreviewOptionsInternal=t}reconnect(){const t=this.reconnectDragSource();this.reconnectDragPreview(t)}reconnectDragSource(){const t=this.dragSource,r=this.didHandlerIdChange()||this.didConnectedDragSourceChange()||this.didDragSourceOptionsChange();return r&&this.disconnectDragSource(),this.handlerId?t?(r&&(this.lastConnectedHandlerId=this.handlerId,this.lastConnectedDragSource=t,this.lastConnectedDragSourceOptions=this.dragSourceOptions,this.dragSourceUnsubscribe=this.backend.connectDragSource(this.handlerId,t,this.dragSourceOptions)),r):(this.lastConnectedDragSource=t,r):r}reconnectDragPreview(t=!1){const r=this.dragPreview,n=t||this.didHandlerIdChange()||this.didConnectedDragPreviewChange()||this.didDragPreviewOptionsChange();if(n&&this.disconnectDragPreview(),!!this.handlerId){if(!r){this.lastConnectedDragPreview=r;return}n&&(this.lastConnectedHandlerId=this.handlerId,this.lastConnectedDragPreview=r,this.lastConnectedDragPreviewOptions=this.dragPreviewOptions,this.dragPreviewUnsubscribe=this.backend.connectDragPreview(this.handlerId,r,this.dragPreviewOptions))}}didHandlerIdChange(){return this.lastConnectedHandlerId!==this.handlerId}didConnectedDragSourceChange(){return this.lastConnectedDragSource!==this.dragSource}didConnectedDragPreviewChange(){return this.lastConnectedDragPreview!==this.dragPreview}didDragSourceOptionsChange(){return!Ua(this.lastConnectedDragSourceOptions,this.dragSourceOptions)}didDragPreviewOptionsChange(){return!Ua(this.lastConnectedDragPreviewOptions,this.dragPreviewOptions)}disconnectDragSource(){this.dragSourceUnsubscribe&&(this.dragSourceUnsubscribe(),this.dragSourceUnsubscribe=void 0)}disconnectDragPreview(){this.dragPreviewUnsubscribe&&(this.dragPreviewUnsubscribe(),this.dragPreviewUnsubscribe=void 0,this.dragPreviewNode=null,this.dragPreviewRef=null)}get dragSource(){return this.dragSourceNode||this.dragSourceRef&&this.dragSourceRef.current}get dragPreview(){return this.dragPreviewNode||this.dragPreviewRef&&this.dragPreviewRef.current}clearDragSource(){this.dragSourceNode=null,this.dragSourceRef=null}clearDragPreview(){this.dragPreviewNode=null,this.dragPreviewRef=null}constructor(t){this.hooks=zf({dragSource:(r,n)=>{this.clearDragSource(),this.dragSourceOptions=n||null,Wa(r)?this.dragSourceRef=r:this.dragSourceNode=r,this.reconnectDragSource()},dragPreview:(r,n)=>{this.clearDragPreview(),this.dragPreviewOptions=n||null,Wa(r)?this.dragPreviewRef=r:this.dragPreviewNode=r,this.reconnectDragPreview()}}),this.handlerId=null,this.dragSourceRef=null,this.dragSourceOptionsInternal=null,this.dragPreviewRef=null,this.dragPreviewOptionsInternal=null,this.lastConnectedHandlerId=null,this.lastConnectedDragSource=null,this.lastConnectedDragSourceOptions=null,this.lastConnectedDragPreview=null,this.lastConnectedDragPreviewOptions=null,this.backend=t}}class rC{get connectTarget(){return this.dropTarget}reconnect(){const t=this.didHandlerIdChange()||this.didDropTargetChange()||this.didOptionsChange();t&&this.disconnectDropTarget();const r=this.dropTarget;if(this.handlerId){if(!r){this.lastConnectedDropTarget=r;return}t&&(this.lastConnectedHandlerId=this.handlerId,this.lastConnectedDropTarget=r,this.lastConnectedDropTargetOptions=this.dropTargetOptions,this.unsubscribeDropTarget=this.backend.connectDropTarget(this.handlerId,r,this.dropTargetOptions))}}receiveHandlerId(t){t!==this.handlerId&&(this.handlerId=t,this.reconnect())}get dropTargetOptions(){return this.dropTargetOptionsInternal}set dropTargetOptions(t){this.dropTargetOptionsInternal=t}didHandlerIdChange(){return this.lastConnectedHandlerId!==this.handlerId}didDropTargetChange(){return this.lastConnectedDropTarget!==this.dropTarget}didOptionsChange(){return!Ua(this.lastConnectedDropTargetOptions,this.dropTargetOptions)}disconnectDropTarget(){this.unsubscribeDropTarget&&(this.unsubscribeDropTarget(),this.unsubscribeDropTarget=void 0)}get dropTarget(){return this.dropTargetNode||this.dropTargetRef&&this.dropTargetRef.current}clearDropTarget(){this.dropTargetRef=null,this.dropTargetNode=null}constructor(t){this.hooks=zf({dropTarget:(r,n)=>{this.clearDropTarget(),this.dropTargetOptions=n,Wa(r)?this.dropTargetRef=r:this.dropTargetNode=r,this.reconnect()}}),this.handlerId=null,this.dropTargetRef=null,this.dropTargetOptionsInternal=null,this.lastConnectedHandlerId=null,this.lastConnectedDropTarget=null,this.lastConnectedDropTargetOptions=null,this.backend=t}}function ri(){const{dragDropManager:e}=S.useContext(Nf);return Le(e!=null,"Expected drag drop context"),e}function nC(e,t){const r=ri(),n=S.useMemo(()=>new tC(r.getBackend()),[r]);return _n(()=>(n.dragSourceOptions=e||null,n.reconnect(),()=>n.disconnectDragSource()),[n,e]),_n(()=>(n.dragPreviewOptions=t||null,n.reconnect(),()=>n.disconnectDragPreview()),[n,t]),n}function iC(){const e=ri();return S.useMemo(()=>new Xb(e),[e])}class sC{beginDrag(){const t=this.spec,r=this.monitor;let n=null;return typeof t.item=="object"?n=t.item:typeof t.item=="function"?n=t.item(r):n={},n??null}canDrag(){const t=this.spec,r=this.monitor;return typeof t.canDrag=="boolean"?t.canDrag:typeof t.canDrag=="function"?t.canDrag(r):!0}isDragging(t,r){const n=this.spec,i=this.monitor,{isDragging:s}=n;return s?s(i):r===t.getSourceId()}endDrag(){const t=this.spec,r=this.monitor,n=this.connector,{end:i}=t;i&&i(r.getItem(),r),n.reconnect()}constructor(t,r,n){this.spec=t,this.monitor=r,this.connector=n}}function aC(e,t,r){const n=S.useMemo(()=>new sC(e,t,r),[t,r]);return S.useEffect(()=>{n.spec=e},[e]),n}function oC(e){return S.useMemo(()=>{const t=e.type;return Le(t!=null,"spec.type must be defined"),t},[e])}function lC(e,t,r){const n=ri(),i=aC(e,t,r),s=oC(e);_n(function(){if(s!=null){const[o,f]=Jb(s,i,n);return t.receiveHandlerId(o),r.receiveHandlerId(o),f}},[n,t,r,i,s])}function Hf(e,t){const r=Vf(e);Le(!r.begin,"useDrag::spec.begin was deprecated in v14. Replace spec.begin() with spec.item(). (see more here - https://react-dnd.github.io/react-dnd/docs/api/use-drag)");const n=iC(),i=nC(r.options,r.previewOptions);return lC(r,n,i),[Wf(r.collect,n,i),Gb(i),Yb(i)]}function cC(e){return S.useMemo(()=>e.hooks.dropTarget(),[e])}function uC(e){const t=ri(),r=S.useMemo(()=>new rC(t.getBackend()),[t]);return _n(()=>(r.dropTargetOptions=e||null,r.reconnect(),()=>r.disconnectDropTarget()),[e]),r}function fC(){const e=ri();return S.useMemo(()=>new Kb(e),[e])}function dC(e){const{accept:t}=e;return S.useMemo(()=>(Le(e.accept!=null,"accept must be defined"),Array.isArray(t)?t:[t]),[t])}class hC{canDrop(){const t=this.spec,r=this.monitor;return t.canDrop?t.canDrop(r.getItem(),r):!0}hover(){const t=this.spec,r=this.monitor;t.hover&&t.hover(r.getItem(),r)}drop(){const t=this.spec,r=this.monitor;if(t.drop)return t.drop(r.getItem(),r)}constructor(t,r){this.spec=t,this.monitor=r}}function pC(e,t){const r=S.useMemo(()=>new hC(e,t),[t]);return S.useEffect(()=>{r.spec=e},[e]),r}function gC(e,t,r){const n=ri(),i=pC(e,t),s=dC(e);_n(function(){const[o,f]=qb(s,i,n);return t.receiveHandlerId(o),r.receiveHandlerId(o),f},[n,t,i,r,s.map(a=>a.toString()).join("|")])}function Gf(e,t){const r=Vf(e),n=fC(),i=uC(r.options);return gC(r,n,i),[Wf(r.collect,n,i),cC(i)]}function mC({columnName:e,columnType:t="string",currentSort:r,hasFilters:n,isInSortStack:i,position:s,onSort:a,onRemoveSort:o,onSortAscending:f,onSortDescending:u,onFilter:d,onClearFilter:h,onHideColumn:m,onManageColumns:l,onManageViews:v,onResetLayout:g,onClose:x}){const T=S.useRef(null);S.useEffect(()=>{const _=F=>{T.current&&!T.current.contains(F.target)&&x()},k=F=>{F.key==="Escape"&&x()};return document.addEventListener("mousedown",_),document.addEventListener("keydown",k),()=>{document.removeEventListener("mousedown",_),document.removeEventListener("keydown",k)}},[x]);const b=()=>r?r.direction==="asc"?t==="number"?"(0→9)":t==="boolean"?"(False→True)":"(A→Z)":t==="number"?"(9→0)":t==="boolean"?"(True→False)":"(Z→A)":"";return za.createPortal(c.jsxs(p.Paper,{ref:T,sx:{position:"fixed",left:`${s.x}px`,top:`${s.y}px`,zIndex:100,minWidth:240},elevation:3,children:[c.jsxs(p.Box,{sx:{px:2,py:1},children:[c.jsxs(p.Box,{sx:{display:"flex",alignItems:"center",justifyContent:"space-between",gap:1},children:[c.jsx(p.Typography,{variant:"body2",sx:{fontWeight:500},children:"Sorting"}),c.jsxs(p.Box,{sx:{display:"flex",alignItems:"center",gap:.5},children:[c.jsx(p.IconButton,{size:"small",onClick:()=>{f?f(e):(r==null?void 0:r.direction)!=="asc"&&(a(e),(r==null?void 0:r.direction)==="desc"&&setTimeout(()=>a(e),0))},title:"Sort Ascending",sx:{p:.75},children:c.jsx(bf,{size:16,color:(r==null?void 0:r.direction)==="asc"?"primary":void 0,style:{opacity:(r==null?void 0:r.direction)==="asc"?1:.4}})}),c.jsx(p.IconButton,{size:"small",onClick:()=>{u?u(e):r?r.direction==="asc"&&a(e):(a(e),setTimeout(()=>a(e),0))},title:"Sort Descending",sx:{p:.75},children:c.jsx(_f,{size:16,color:(r==null?void 0:r.direction)==="desc"?"primary":void 0,style:{opacity:(r==null?void 0:r.direction)==="desc"?1:.4}})}),c.jsx(p.IconButton,{size:"small",onClick:()=>o(e),title:"Clear sorting",disabled:!r,sx:{p:.75,"&:hover":{color:"error.main"}},children:c.jsx(Et,{size:16,style:{opacity:r?1:.3}})})]})]}),r&&c.jsxs(p.Box,{sx:{display:"flex",alignItems:"center",gap:1,mt:.5},children:[c.jsx(p.Typography,{variant:"caption",color:"text.secondary",children:b()}),c.jsx(p.Chip,{label:`Level ${r.priority}`,size:"small",color:"primary",sx:{height:20,fontSize:"0.75rem"}})]})]}),c.jsx(p.Divider,{}),c.jsxs(p.MenuList,{dense:!0,children:[c.jsxs(p.MenuItem,{onClick:()=>{d(e),x()},children:[c.jsx(Gs,{size:16,style:{marginRight:8}}),"Filter this column",n&&c.jsx(p.Chip,{label:"Active",size:"small",color:"primary",sx:{ml:"auto",height:20,fontSize:"0.75rem"}})]}),n&&c.jsxs(p.MenuItem,{onClick:()=>{h(e),x()},sx:{color:"warning.main"},children:[c.jsx(Df,{size:16,style:{marginRight:8}}),"Clear Filters"]})]}),c.jsx(p.Divider,{}),c.jsx(p.MenuList,{dense:!0,children:c.jsxs(p.MenuItem,{onClick:()=>{m(e),x()},children:[c.jsx(Af,{size:16,style:{marginRight:8}}),"Hide column"]})}),c.jsx(p.Divider,{}),c.jsxs(p.MenuList,{dense:!0,children:[c.jsxs(p.MenuItem,{onClick:()=>{l(),x()},children:[c.jsx(No,{size:16,style:{marginRight:8}}),"Column Settings"]}),c.jsxs(p.MenuItem,{onClick:()=>{v(),x()},children:[c.jsx(Of,{size:16,style:{marginRight:8}}),"View Setup"]}),c.jsxs(p.MenuItem,{onClick:()=>{g(),x()},children:[c.jsx(Ys,{size:16,style:{marginRight:8}}),"Reset to Default Layout"]})]})]}),document.body)}const zc="COLUMN_HEADER";function xC({column:e,index:t,sortRule:r,hasFilters:n,isInSortStack:i,width:s,onColumnClick:a,onMoveColumn:o,onResizeStart:f,onSort:u,onRemoveSort:d,onSortAscending:h,onSortDescending:m,onOpenFilterForColumn:l,onClearFiltersForColumn:v,onHideColumn:g,onManageColumns:x,onManageViews:T,onResetLayout:b}){const _=S.useRef(null),[k,F]=S.useState(!1),[z,N]=S.useState({x:0,y:0}),[{handlerId:B,isOver:M},L]=Gf({accept:zc,collect(ee){return{handlerId:ee.getHandlerId(),isOver:ee.isOver()}},hover(ee,_e){var R;if(!_.current)return;const Ae=ee.index,De=t;if(Ae===De)return;const oe=(R=_.current)==null?void 0:R.getBoundingClientRect(),ce=(oe.right-oe.left)/2,C=_e.getClientOffset(),j=((C==null?void 0:C.x)??0)-oe.left;Ae<De&&j<ce||Ae>De&&j>ce||(o(Ae,De),ee.index=De)}}),[{isDragging:W},y]=Hf({type:zc,item:()=>({index:t,columnName:e.name}),collect:ee=>({isDragging:ee.isDragging()})});y(L(_));const H=ee=>{ee.preventDefault(),ee.stopPropagation(),N({x:ee.clientX,y:ee.clientY}),F(!0)},Q=()=>r?c.jsxs("div",{className:"inline-flex items-center ml-1 gap-0.5",children:[r.direction==="asc"?c.jsx(bf,{className:"w-3.5 h-3.5"}):c.jsx(_f,{className:"w-3.5 h-3.5"}),c.jsx("span",{className:"flex items-center justify-center w-4 h-4 bg-blue-600 text-white text-[10px] font-bold rounded-full",children:r.priority})]}):null,J=()=>n?c.jsx("button",{onClick:ee=>{ee.stopPropagation(),l(e.name)},className:"inline-flex items-center ml-1 text-blue-600 hover:text-blue-800 transition-colors",title:"Active filters on this column",children:c.jsx(Gs,{className:"w-3.5 h-3.5 fill-current"})}):null;return c.jsxs(c.Fragment,{children:[c.jsxs(p.TableCell,{ref:_,"data-handler-id":B,onClick:()=>a(e.name),onContextMenu:H,sx:{position:"relative",textAlign:"left",fontSize:"0.75rem",fontWeight:600,textTransform:"uppercase",letterSpacing:"0.05em",whiteSpace:"nowrap",cursor:"pointer",userSelect:"none",opacity:W?.3:1,bgcolor:M?"primary.lighter":"transparent","&:hover":{bgcolor:"action.selected"},width:s?`${s}px`:"150px"},children:[c.jsxs(p.Box,{sx:{display:"inline-flex",alignItems:"center"},children:[e.name,Q(),J()]}),c.jsx(p.Box,{sx:{position:"absolute",right:0,top:0,height:"100%",width:8,cursor:"col-resize",zIndex:10,"&:hover":{bgcolor:"primary.light"}},onMouseDown:ee=>{ee.stopPropagation(),f(ee,e.name)},onClick:ee=>ee.stopPropagation()}),M&&c.jsx(p.Box,{sx:{position:"absolute",left:0,top:0,bottom:0,width:4,bgcolor:"primary.main"}})]}),k&&c.jsx(mC,{columnName:e.name,columnType:e.type,currentSort:r,hasFilters:n,isInSortStack:i,position:z,onSort:u,onRemoveSort:d,onSortAscending:h,onSortDescending:m,onFilter:l,onClearFilter:v,onHideColumn:g,onManageColumns:x,onManageViews:T,onResetLayout:b,onClose:()=>F(!1)})]})}function Yf(e){let t=null;return()=>(t==null&&(t=e()),t)}function vC(e,t){return e.filter(r=>r!==t)}function yC(e,t){const r=new Set,n=s=>r.add(s);e.forEach(n),t.forEach(n);const i=[];return r.forEach(s=>i.push(s)),i}class wC{enter(t){const r=this.entered.length,n=i=>this.isNodeInDocument(i)&&(!i.contains||i.contains(t));return this.entered=yC(this.entered.filter(n),[t]),r===0&&this.entered.length>0}leave(t){const r=this.entered.length;return this.entered=vC(this.entered.filter(this.isNodeInDocument),t),r>0&&this.entered.length===0}reset(){this.entered=[]}constructor(t){this.entered=[],this.isNodeInDocument=t}}class TC{initializeExposedProperties(){Object.keys(this.config.exposeProperties).forEach(t=>{Object.defineProperty(this.item,t,{configurable:!0,enumerable:!0,get(){return console.warn(`Browser doesn't allow reading "${t}" until the drop event.`),null}})})}loadDataTransfer(t){if(t){const r={};Object.keys(this.config.exposeProperties).forEach(n=>{const i=this.config.exposeProperties[n];i!=null&&(r[n]={value:i(t,this.config.matchesTypes),configurable:!0,enumerable:!0})}),Object.defineProperties(this.item,r)}}canDrag(){return!0}beginDrag(){return this.item}isDragging(t,r){return r===t.getSourceId()}endDrag(){}constructor(t){this.config=t,this.item={},this.initializeExposedProperties()}}const Xf="__NATIVE_FILE__",Kf="__NATIVE_URL__",qf="__NATIVE_TEXT__",Jf="__NATIVE_HTML__",Hc=Object.freeze(Object.defineProperty({__proto__:null,FILE:Xf,HTML:Jf,TEXT:qf,URL:Kf},Symbol.toStringTag,{value:"Module"}));function _a(e,t,r){const n=t.reduce((i,s)=>i||e.getData(s),"");return n??r}const Va={[Xf]:{exposeProperties:{files:e=>Array.prototype.slice.call(e.files),items:e=>e.items,dataTransfer:e=>e},matchesTypes:["Files"]},[Jf]:{exposeProperties:{html:(e,t)=>_a(e,t,""),dataTransfer:e=>e},matchesTypes:["Html","text/html"]},[Kf]:{exposeProperties:{urls:(e,t)=>_a(e,t,"").split(`
457
+ `),dataTransfer:e=>e},matchesTypes:["Url","text/uri-list"]},[qf]:{exposeProperties:{text:(e,t)=>_a(e,t,""),dataTransfer:e=>e},matchesTypes:["Text","text/plain"]}};function SC(e,t){const r=Va[e];if(!r)throw new Error(`native type ${e} has no configuration`);const n=new TC(r);return n.loadDataTransfer(t),n}function ba(e){if(!e)return null;const t=Array.prototype.slice.call(e.types||[]);return Object.keys(Va).filter(r=>{const n=Va[r];return n!=null&&n.matchesTypes?n.matchesTypes.some(i=>t.indexOf(i)>-1):!1})[0]||null}const EC=Yf(()=>/firefox/i.test(navigator.userAgent)),Zf=Yf(()=>!!window.safari);class Gc{interpolate(t){const{xs:r,ys:n,c1s:i,c2s:s,c3s:a}=this;let o=r.length-1;if(t===r[o])return n[o];let f=0,u=a.length-1,d;for(;f<=u;){d=Math.floor(.5*(f+u));const l=r[d];if(l<t)f=d+1;else if(l>t)u=d-1;else return n[d]}o=Math.max(0,u);const h=t-r[o],m=h*h;return n[o]+i[o]*h+s[o]*m+a[o]*h*m}constructor(t,r){const{length:n}=t,i=[];for(let l=0;l<n;l++)i.push(l);i.sort((l,v)=>t[l]<t[v]?-1:1);const s=[],a=[];let o,f;for(let l=0;l<n-1;l++)o=t[l+1]-t[l],f=r[l+1]-r[l],s.push(o),a.push(f/o);const u=[a[0]];for(let l=0;l<s.length-1;l++){const v=a[l],g=a[l+1];if(v*g<=0)u.push(0);else{o=s[l];const x=s[l+1],T=o+x;u.push(3*T/((T+x)/v+(T+o)/g))}}u.push(a[a.length-1]);const d=[],h=[];let m;for(let l=0;l<u.length-1;l++){m=a[l];const v=u[l],g=1/s[l],x=v+u[l+1]-m-m;d.push((m-v-x)*g),h.push(x*g*g)}this.xs=t,this.ys=r,this.c1s=u,this.c2s=d,this.c3s=h}}const _C=1;function Qf(e){const t=e.nodeType===_C?e:e.parentElement;if(!t)return null;const{top:r,left:n}=t.getBoundingClientRect();return{x:n,y:r}}function ts(e){return{x:e.clientX,y:e.clientY}}function bC(e){var t;return e.nodeName==="IMG"&&(EC()||!(!((t=document.documentElement)===null||t===void 0)&&t.contains(e)))}function CC(e,t,r,n){let i=e?t.width:r,s=e?t.height:n;return Zf()&&e&&(s/=window.devicePixelRatio,i/=window.devicePixelRatio),{dragPreviewWidth:i,dragPreviewHeight:s}}function AC(e,t,r,n,i){const s=bC(t),o=Qf(s?e:t),f={x:r.x-o.x,y:r.y-o.y},{offsetWidth:u,offsetHeight:d}=e,{anchorX:h,anchorY:m}=n,{dragPreviewWidth:l,dragPreviewHeight:v}=CC(s,t,u,d),g=()=>{let z=new Gc([0,.5,1],[f.y,f.y/d*v,f.y+v-d]).interpolate(m);return Zf()&&s&&(z+=(window.devicePixelRatio-1)*v),z},x=()=>new Gc([0,.5,1],[f.x,f.x/u*l,f.x+l-u]).interpolate(h),{offsetX:T,offsetY:b}=i,_=T===0||T,k=b===0||b;return{x:_?T:x(),y:k?b:g()}}class OC{get window(){if(this.globalContext)return this.globalContext;if(typeof window<"u")return window}get document(){var t;return!((t=this.globalContext)===null||t===void 0)&&t.document?this.globalContext.document:this.window?this.window.document:void 0}get rootElement(){var t;return((t=this.optionsArgs)===null||t===void 0?void 0:t.rootElement)||this.window}constructor(t,r){this.ownerDocument=null,this.globalContext=t,this.optionsArgs=r}}function DC(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Yc(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{},n=Object.keys(r);typeof Object.getOwnPropertySymbols=="function"&&(n=n.concat(Object.getOwnPropertySymbols(r).filter(function(i){return Object.getOwnPropertyDescriptor(r,i).enumerable}))),n.forEach(function(i){DC(e,i,r[i])})}return e}class kC{profile(){var t,r;return{sourcePreviewNodes:this.sourcePreviewNodes.size,sourcePreviewNodeOptions:this.sourcePreviewNodeOptions.size,sourceNodeOptions:this.sourceNodeOptions.size,sourceNodes:this.sourceNodes.size,dragStartSourceIds:((t=this.dragStartSourceIds)===null||t===void 0?void 0:t.length)||0,dropTargetIds:this.dropTargetIds.length,dragEnterTargetIds:this.dragEnterTargetIds.length,dragOverTargetIds:((r=this.dragOverTargetIds)===null||r===void 0?void 0:r.length)||0}}get window(){return this.options.window}get document(){return this.options.document}get rootElement(){return this.options.rootElement}setup(){const t=this.rootElement;if(t!==void 0){if(t.__isReactDndBackendSetUp)throw new Error("Cannot have two HTML5 backends at the same time.");t.__isReactDndBackendSetUp=!0,this.addEventListeners(t)}}teardown(){const t=this.rootElement;if(t!==void 0&&(t.__isReactDndBackendSetUp=!1,this.removeEventListeners(this.rootElement),this.clearCurrentDragSourceNode(),this.asyncEndDragFrameId)){var r;(r=this.window)===null||r===void 0||r.cancelAnimationFrame(this.asyncEndDragFrameId)}}connectDragPreview(t,r,n){return this.sourcePreviewNodeOptions.set(t,n),this.sourcePreviewNodes.set(t,r),()=>{this.sourcePreviewNodes.delete(t),this.sourcePreviewNodeOptions.delete(t)}}connectDragSource(t,r,n){this.sourceNodes.set(t,r),this.sourceNodeOptions.set(t,n);const i=a=>this.handleDragStart(a,t),s=a=>this.handleSelectStart(a);return r.setAttribute("draggable","true"),r.addEventListener("dragstart",i),r.addEventListener("selectstart",s),()=>{this.sourceNodes.delete(t),this.sourceNodeOptions.delete(t),r.removeEventListener("dragstart",i),r.removeEventListener("selectstart",s),r.setAttribute("draggable","false")}}connectDropTarget(t,r){const n=a=>this.handleDragEnter(a,t),i=a=>this.handleDragOver(a,t),s=a=>this.handleDrop(a,t);return r.addEventListener("dragenter",n),r.addEventListener("dragover",i),r.addEventListener("drop",s),()=>{r.removeEventListener("dragenter",n),r.removeEventListener("dragover",i),r.removeEventListener("drop",s)}}addEventListeners(t){t.addEventListener&&(t.addEventListener("dragstart",this.handleTopDragStart),t.addEventListener("dragstart",this.handleTopDragStartCapture,!0),t.addEventListener("dragend",this.handleTopDragEndCapture,!0),t.addEventListener("dragenter",this.handleTopDragEnter),t.addEventListener("dragenter",this.handleTopDragEnterCapture,!0),t.addEventListener("dragleave",this.handleTopDragLeaveCapture,!0),t.addEventListener("dragover",this.handleTopDragOver),t.addEventListener("dragover",this.handleTopDragOverCapture,!0),t.addEventListener("drop",this.handleTopDrop),t.addEventListener("drop",this.handleTopDropCapture,!0))}removeEventListeners(t){t.removeEventListener&&(t.removeEventListener("dragstart",this.handleTopDragStart),t.removeEventListener("dragstart",this.handleTopDragStartCapture,!0),t.removeEventListener("dragend",this.handleTopDragEndCapture,!0),t.removeEventListener("dragenter",this.handleTopDragEnter),t.removeEventListener("dragenter",this.handleTopDragEnterCapture,!0),t.removeEventListener("dragleave",this.handleTopDragLeaveCapture,!0),t.removeEventListener("dragover",this.handleTopDragOver),t.removeEventListener("dragover",this.handleTopDragOverCapture,!0),t.removeEventListener("drop",this.handleTopDrop),t.removeEventListener("drop",this.handleTopDropCapture,!0))}getCurrentSourceNodeOptions(){const t=this.monitor.getSourceId(),r=this.sourceNodeOptions.get(t);return Yc({dropEffect:this.altKeyPressed?"copy":"move"},r||{})}getCurrentDropEffect(){return this.isDraggingNativeItem()?"copy":this.getCurrentSourceNodeOptions().dropEffect}getCurrentSourcePreviewNodeOptions(){const t=this.monitor.getSourceId(),r=this.sourcePreviewNodeOptions.get(t);return Yc({anchorX:.5,anchorY:.5,captureDraggingState:!1},r||{})}isDraggingNativeItem(){const t=this.monitor.getItemType();return Object.keys(Hc).some(r=>Hc[r]===t)}beginDragNativeItem(t,r){this.clearCurrentDragSourceNode(),this.currentNativeSource=SC(t,r),this.currentNativeHandle=this.registry.addSource(t,this.currentNativeSource),this.actions.beginDrag([this.currentNativeHandle])}setCurrentDragSourceNode(t){this.clearCurrentDragSourceNode(),this.currentDragSourceNode=t;const r=1e3;this.mouseMoveTimeoutTimer=setTimeout(()=>{var n;return(n=this.rootElement)===null||n===void 0?void 0:n.addEventListener("mousemove",this.endDragIfSourceWasRemovedFromDOM,!0)},r)}clearCurrentDragSourceNode(){if(this.currentDragSourceNode){if(this.currentDragSourceNode=null,this.rootElement){var t;(t=this.window)===null||t===void 0||t.clearTimeout(this.mouseMoveTimeoutTimer||void 0),this.rootElement.removeEventListener("mousemove",this.endDragIfSourceWasRemovedFromDOM,!0)}return this.mouseMoveTimeoutTimer=null,!0}return!1}handleDragStart(t,r){t.defaultPrevented||(this.dragStartSourceIds||(this.dragStartSourceIds=[]),this.dragStartSourceIds.unshift(r))}handleDragEnter(t,r){this.dragEnterTargetIds.unshift(r)}handleDragOver(t,r){this.dragOverTargetIds===null&&(this.dragOverTargetIds=[]),this.dragOverTargetIds.unshift(r)}handleDrop(t,r){this.dropTargetIds.unshift(r)}constructor(t,r,n){this.sourcePreviewNodes=new Map,this.sourcePreviewNodeOptions=new Map,this.sourceNodes=new Map,this.sourceNodeOptions=new Map,this.dragStartSourceIds=null,this.dropTargetIds=[],this.dragEnterTargetIds=[],this.currentNativeSource=null,this.currentNativeHandle=null,this.currentDragSourceNode=null,this.altKeyPressed=!1,this.mouseMoveTimeoutTimer=null,this.asyncEndDragFrameId=null,this.dragOverTargetIds=null,this.lastClientOffset=null,this.hoverRafId=null,this.getSourceClientOffset=i=>{const s=this.sourceNodes.get(i);return s&&Qf(s)||null},this.endDragNativeItem=()=>{this.isDraggingNativeItem()&&(this.actions.endDrag(),this.currentNativeHandle&&this.registry.removeSource(this.currentNativeHandle),this.currentNativeHandle=null,this.currentNativeSource=null)},this.isNodeInDocument=i=>!!(i&&this.document&&this.document.body&&this.document.body.contains(i)),this.endDragIfSourceWasRemovedFromDOM=()=>{const i=this.currentDragSourceNode;i==null||this.isNodeInDocument(i)||(this.clearCurrentDragSourceNode()&&this.monitor.isDragging()&&this.actions.endDrag(),this.cancelHover())},this.scheduleHover=i=>{this.hoverRafId===null&&typeof requestAnimationFrame<"u"&&(this.hoverRafId=requestAnimationFrame(()=>{this.monitor.isDragging()&&this.actions.hover(i||[],{clientOffset:this.lastClientOffset}),this.hoverRafId=null}))},this.cancelHover=()=>{this.hoverRafId!==null&&typeof cancelAnimationFrame<"u"&&(cancelAnimationFrame(this.hoverRafId),this.hoverRafId=null)},this.handleTopDragStartCapture=()=>{this.clearCurrentDragSourceNode(),this.dragStartSourceIds=[]},this.handleTopDragStart=i=>{if(i.defaultPrevented)return;const{dragStartSourceIds:s}=this;this.dragStartSourceIds=null;const a=ts(i);this.monitor.isDragging()&&(this.actions.endDrag(),this.cancelHover()),this.actions.beginDrag(s||[],{publishSource:!1,getSourceClientOffset:this.getSourceClientOffset,clientOffset:a});const{dataTransfer:o}=i,f=ba(o);if(this.monitor.isDragging()){if(o&&typeof o.setDragImage=="function"){const d=this.monitor.getSourceId(),h=this.sourceNodes.get(d),m=this.sourcePreviewNodes.get(d)||h;if(m){const{anchorX:l,anchorY:v,offsetX:g,offsetY:x}=this.getCurrentSourcePreviewNodeOptions(),_=AC(h,m,a,{anchorX:l,anchorY:v},{offsetX:g,offsetY:x});o.setDragImage(m,_.x,_.y)}}try{o==null||o.setData("application/json",{})}catch{}this.setCurrentDragSourceNode(i.target);const{captureDraggingState:u}=this.getCurrentSourcePreviewNodeOptions();u?this.actions.publishDragSource():setTimeout(()=>this.actions.publishDragSource(),0)}else if(f)this.beginDragNativeItem(f);else{if(o&&!o.types&&(i.target&&!i.target.hasAttribute||!i.target.hasAttribute("draggable")))return;i.preventDefault()}},this.handleTopDragEndCapture=()=>{this.clearCurrentDragSourceNode()&&this.monitor.isDragging()&&this.actions.endDrag(),this.cancelHover()},this.handleTopDragEnterCapture=i=>{if(this.dragEnterTargetIds=[],this.isDraggingNativeItem()){var s;(s=this.currentNativeSource)===null||s===void 0||s.loadDataTransfer(i.dataTransfer)}if(!this.enterLeaveCounter.enter(i.target)||this.monitor.isDragging())return;const{dataTransfer:o}=i,f=ba(o);f&&this.beginDragNativeItem(f,o)},this.handleTopDragEnter=i=>{const{dragEnterTargetIds:s}=this;if(this.dragEnterTargetIds=[],!this.monitor.isDragging())return;this.altKeyPressed=i.altKey,s.length>0&&this.actions.hover(s,{clientOffset:ts(i)}),s.some(o=>this.monitor.canDropOnTarget(o))&&(i.preventDefault(),i.dataTransfer&&(i.dataTransfer.dropEffect=this.getCurrentDropEffect()))},this.handleTopDragOverCapture=i=>{if(this.dragOverTargetIds=[],this.isDraggingNativeItem()){var s;(s=this.currentNativeSource)===null||s===void 0||s.loadDataTransfer(i.dataTransfer)}},this.handleTopDragOver=i=>{const{dragOverTargetIds:s}=this;if(this.dragOverTargetIds=[],!this.monitor.isDragging()){i.preventDefault(),i.dataTransfer&&(i.dataTransfer.dropEffect="none");return}this.altKeyPressed=i.altKey,this.lastClientOffset=ts(i),this.scheduleHover(s),(s||[]).some(o=>this.monitor.canDropOnTarget(o))?(i.preventDefault(),i.dataTransfer&&(i.dataTransfer.dropEffect=this.getCurrentDropEffect())):this.isDraggingNativeItem()?i.preventDefault():(i.preventDefault(),i.dataTransfer&&(i.dataTransfer.dropEffect="none"))},this.handleTopDragLeaveCapture=i=>{this.isDraggingNativeItem()&&i.preventDefault(),this.enterLeaveCounter.leave(i.target)&&(this.isDraggingNativeItem()&&setTimeout(()=>this.endDragNativeItem(),0),this.cancelHover())},this.handleTopDropCapture=i=>{if(this.dropTargetIds=[],this.isDraggingNativeItem()){var s;i.preventDefault(),(s=this.currentNativeSource)===null||s===void 0||s.loadDataTransfer(i.dataTransfer)}else ba(i.dataTransfer)&&i.preventDefault();this.enterLeaveCounter.reset()},this.handleTopDrop=i=>{const{dropTargetIds:s}=this;this.dropTargetIds=[],this.actions.hover(s,{clientOffset:ts(i)}),this.actions.drop({dropEffect:this.getCurrentDropEffect()}),this.isDraggingNativeItem()?this.endDragNativeItem():this.monitor.isDragging()&&this.actions.endDrag(),this.cancelHover()},this.handleSelectStart=i=>{const s=i.target;typeof s.dragDrop=="function"&&(s.tagName==="INPUT"||s.tagName==="SELECT"||s.tagName==="TEXTAREA"||s.isContentEditable||(i.preventDefault(),s.dragDrop()))},this.options=new OC(r,n),this.actions=t.getActions(),this.monitor=t.getMonitor(),this.registry=t.getRegistry(),this.enterLeaveCounter=new wC(this.isNodeInDocument)}}const ed=function(t,r,n){return new kC(t,r,n)};function IC({selectedCount:e,onExportSelected:t,onClearSelection:r}){const[n,i]=S.useState(null);if(e===0)return null;const s=f=>{i(f.currentTarget)},a=f=>{t(f),i(null)},o=()=>{i(null)};return c.jsx(p.Box,{sx:{position:"fixed",bottom:24,left:"50%",transform:"translateX(-50%)",zIndex:50},children:c.jsxs(p.Box,{sx:{bgcolor:"primary.main",color:"primary.contrastText",boxShadow:3,borderRadius:2,px:3,py:1.5,display:"flex",alignItems:"center",gap:2},children:[c.jsxs(p.Typography,{variant:"body2",sx:{fontWeight:500},children:[e," ",e===1?"row":"rows"," selected"]}),c.jsx(p.Divider,{orientation:"vertical",flexItem:!0,sx:{bgcolor:"primary.light",opacity:.5}}),c.jsx(p.Button,{onClick:s,startIcon:c.jsx(Io,{size:16}),size:"small",sx:{bgcolor:"primary.dark",color:"primary.contrastText","&:hover":{bgcolor:"primary.light"},textTransform:"none"},children:"Export Selected"}),c.jsxs(p.Menu,{anchorEl:n,open:!!n,onClose:o,anchorOrigin:{vertical:"top",horizontal:"left"},transformOrigin:{vertical:"bottom",horizontal:"left"},children:[c.jsx(p.MenuItem,{onClick:()=>a("csv"),children:"Export as CSV"}),c.jsx(p.MenuItem,{onClick:()=>a("excel"),children:"Export as Excel"}),c.jsx(p.MenuItem,{onClick:()=>a("json"),children:"Export as JSON"})]}),c.jsx(p.Divider,{orientation:"vertical",flexItem:!0,sx:{bgcolor:"primary.light",opacity:.5}}),c.jsx(p.Button,{onClick:r,startIcon:c.jsx(Et,{size:16}),size:"small",sx:{color:"primary.contrastText","&:hover":{bgcolor:"primary.dark"},textTransform:"none"},children:"Clear Selection"})]})})}const Xc=[10,25,50,100];function FC({currentPage:e,pageSize:t,totalRows:r,onPageChange:n,onPageSizeChange:i}){const s=Math.ceil(r/t);if(r<=Math.min(...Xc))return null;const a=()=>{e>1&&n(e-1)},o=()=>{e<s&&n(e+1)},f=(e-1)*t+1,u=Math.min(e*t,r);return c.jsxs(p.Box,{sx:{display:"flex",alignItems:"center",justifyContent:"space-between",px:3,py:2,borderTop:1,borderColor:"divider",bgcolor:"background.paper"},children:[c.jsxs(p.Box,{sx:{display:"flex",alignItems:"center",gap:1},children:[c.jsx(p.Typography,{variant:"body2",color:"text.primary",children:"Rows per page:"}),c.jsx(p.Select,{value:t,onChange:d=>i(Number(d.target.value)),size:"small",sx:{minWidth:70},children:Xc.map(d=>c.jsx(p.MenuItem,{value:d,children:d},d))})]}),c.jsxs(p.Box,{sx:{display:"flex",alignItems:"center",gap:2},children:[c.jsxs(p.Typography,{variant:"body2",color:"text.primary",children:[f,"–",u," of ",r]}),c.jsxs(p.Box,{sx:{display:"flex",alignItems:"center",gap:1},children:[c.jsx(p.IconButton,{onClick:a,disabled:e===1,size:"small",title:"Previous page",children:c.jsx(aE,{size:20})}),c.jsxs(p.Typography,{variant:"body2",color:"text.primary",children:["Page ",e," of ",s]}),c.jsx(p.IconButton,{onClick:o,disabled:e===s,size:"small",title:"Next page",children:c.jsx(Hs,{size:20})})]})]}),c.jsx(p.Box,{sx:{width:128}})]})}function NC(){return c.jsx(p.Chip,{icon:c.jsx(Fo,{size:14}),label:"View Only",size:"small",variant:"outlined",sx:{bgcolor:"action.hover",borderColor:"divider",fontSize:"0.75rem",fontWeight:500}})}function RC({schema:e,data:t,sortStack:r=[],filters:n=[],views:i=[],activeViewId:s="",isDirty:a=!1,isExporting:o=!1,columnVisibility:f={},columnOrder:u=[],columnWidths:d={},grouping:h=null,onSort:m,onSortAscending:l,onSortDescending:v,onOpenFilters:g,onOpenSort:x,onOpenFilterForColumn:T,onSelectView:b,onCreateView:_,onManageViews:k,onUpdateCurrentView:F,onSaveAsNewView:z,onToggleDefault:N,onToggleFavorite:B,onRestoreView:M,onPermanentDelete:L,onExport:W,onOpenColumns:y,onUpdateColumnWidth:H,onUpdateColumnOrder:Q,onUpdateColumnVisibility:J,onClearFiltersForColumn:ee,onResetLayout:_e,onOpenGroup:Ae,onToggleGroupCollapse:De,onOpenAuditHistory:oe,onOpenSharePreset:ce,searchQuery:C,searchHistory:j=[],onAddToSearchHistory:R,onToggleSearchFavourite:P,onDeleteSearchHistory:V,selectedRowIds:le=new Set,onSearchChange:fe,onToggleRowSelection:ue,onToggleAllRows:te,onRangeSelection:Ie,onClearSelection:ae,onExportSelected:Pe,currentPage:ke=1,pageSize:pt=10,totalRowsBeforePagination:He=t.length,onPageChange:we,onPageSizeChange:ut,isReadOnly:je=!1,userRole:Rt}){const[vt,rt]=S.useState(null),[kt,Xe]=S.useState(0),[Ht,It]=S.useState(0),[Gt,Lt]=S.useState(null),[Bt,qe]=S.useState(!1);S.useRef(null);const gt=(u.length>0?u.map(he=>e.find(be=>be.name===he)).filter(he=>he!==void 0):e).filter(he=>f[he.name]!==!1),Ft=e.filter(he=>f[he.name]===!1).length,bt=e.map(he=>he.name),cr=JSON.stringify(u)!==JSON.stringify(bt),Yt=(he,be)=>{he.preventDefault(),he.stopPropagation(),rt(be),Xe(he.clientX),It(d[be]||150)};S.useEffect(()=>{if(!vt)return;const he=We=>{const w=We.clientX-kt,O=Math.max(100,Ht+w);H==null||H(vt,O)},be=()=>{rt(null)};return document.addEventListener("mousemove",he),document.addEventListener("mouseup",be),()=>{document.removeEventListener("mousemove",he),document.removeEventListener("mouseup",be)}},[vt,kt,Ht,H]);const Qe=he=>he==null?"-":typeof he=="object"?JSON.stringify(he):typeof he=="boolean"?he?"true":"false":String(he),pr=he=>{m&&m(he)},Xt=(he,be)=>{if(!Q)return;const We=[...u.length>0?u:e.map(O=>O.name)],[w]=We.splice(he,1);We.splice(be,0,w),Q(We)},ir=he=>{if(!m)return;const be=r.find(We=>We.column===he);(!be||be.direction!=="asc")&&m(he)},pe=he=>{if(!m)return;const be=r.find(We=>We.column===he);be?be.direction==="asc"&&m(he):(m(he),setTimeout(()=>m(he),0))},tr=he=>{if(!m)return;const be=r.find(We=>We.column===he);be&&(be.direction==="asc"?(m(he),setTimeout(()=>m(he),0)):be.direction==="desc"&&m(he))},Ge=he=>{J&&J(he,!1)},Oe=(h==null?void 0:h.enabled)&&t.length>0&&t[0]&&"isGroupHeader"in t[0],nt=gt.map(he=>he.name),Ye=C&&C.trim()?Vu(t,e,C,nt):t;S.useEffect(()=>{const he=be=>{!te||!ae||be.target instanceof HTMLInputElement||be.target instanceof HTMLTextAreaElement||((be.ctrlKey||be.metaKey)&&be.key==="a"&&(be.preventDefault(),te(!0,Ye.length)),be.key==="Escape"&&(be.preventDefault(),ae()))};return document.addEventListener("keydown",he),()=>document.removeEventListener("keydown",he)},[te,ae,Ye.length]);const Tt=(he,be)=>{ue&&(be.shiftKey&&Gt!==null?(be.preventDefault(),Ie&&Ie(Gt,he)):(ue(he),Lt(he)))},sr=Ye.length>0&&le.size>0&&Ye.every((he,be)=>le.has(be)),yt=le.size>0&&!sr,xt=ue&&te,mt=he=>{var w;const be=he.groupLevel,We=be*24;return c.jsx(p.TableRow,{onClick:()=>De==null?void 0:De(he.groupKey),sx:{bgcolor:"action.hover","&:hover":{bgcolor:"action.selected"},cursor:"pointer",borderTop:2,borderColor:"divider"},children:c.jsx(p.TableCell,{colSpan:gt.length+(xt?1:0),sx:{pl:`${We+24}px`},children:c.jsxs(p.Box,{sx:{display:"flex",alignItems:"center",gap:1},children:[he.isCollapsed?c.jsx(Hs,{size:16}):c.jsx(Mi,{size:16}),c.jsx(p.Typography,{variant:"body2",sx:{fontWeight:600},children:qd(be,((w=h==null?void 0:h.levels[be])==null?void 0:w.column)||"",he.groupValue)}),c.jsxs(p.Box,{sx:{px:1,py:.25,fontSize:"0.75rem",fontWeight:500,bgcolor:"primary.lighter",color:"primary.dark",borderRadius:2},children:[he.rowCount," ",he.rowCount===1?"row":"rows"]}),Object.keys(he.aggregates).length>0&&c.jsx(p.Typography,{variant:"caption",sx:{ml:1,color:"text.secondary"},children:Object.entries(he.aggregates).map(([O,E])=>Kd(E)).filter(Boolean).join(" • ")})]})})},he.groupKey)},Te=(he,be)=>{const We=le.has(be);return c.jsxs(p.TableRow,{onClick:w=>{xt&&w.target===w.currentTarget&&Tt(be,w)},sx:{bgcolor:We?"primary.lighter":"transparent","&:hover":{bgcolor:We?"primary.lighter":"action.hover"}},children:[xt&&c.jsx(p.TableCell,{sx:{width:48},children:c.jsx(p.Checkbox,{checked:We,onChange:w=>{w.stopPropagation(),Tt(be,w)},onClick:w=>w.stopPropagation(),size:"small"})}),gt.map(w=>c.jsx(p.TableCell,{sx:{whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",width:d[w.name]?`${d[w.name]}px`:"150px"},children:Qe(he[w.name])},w.name))]},be)};return c.jsx($f,{backend:ed,children:c.jsxs(p.Box,{sx:{display:"flex",flexDirection:"column",gap:2},children:[xt&&Pe&&ae&&c.jsx(IC,{selectedCount:le.size,onExportSelected:Pe,onClearSelection:ae}),c.jsxs(p.Box,{sx:{display:"flex",alignItems:"center",gap:1},children:[je&&c.jsx(NC,{}),fe&&R&&P&&V&&c.jsx(m_,{value:C||"",onChange:fe,searchHistory:j,onAddToHistory:R,onToggleFavourite:P,onDeleteHistory:V,disabled:je}),c.jsx(p.Button,{onClick:()=>qe(!Bt),variant:Bt?"contained":"outlined",size:"small",startIcon:c.jsx(No,{size:16}),sx:{textTransform:"none"},children:"Settings"}),Bt&&c.jsxs(p.Stack,{direction:"row",alignItems:"center",spacing:1,sx:{px:2,py:1,borderRadius:1,border:1,borderColor:"divider",bgcolor:"background.paper",overflowX:"auto",maxWidth:520,"&::-webkit-scrollbar":{height:6},"&::-webkit-scrollbar-track":{bgcolor:"action.hover",borderRadius:1},"&::-webkit-scrollbar-thumb":{bgcolor:"action.disabled",borderRadius:1}},children:[!je&&x&&c.jsxs(p.Button,{onClick:x,variant:"text",startIcon:c.jsx(ko,{size:18}),sx:{color:"text.primary",textTransform:"none",fontWeight:500,px:1.5,py:.5,minWidth:"auto",borderRadius:1,whiteSpace:"nowrap","&:hover":{bgcolor:"action.hover"}},children:["Sort",r.length>0&&c.jsx(p.Box,{component:"span",sx:{ml:.5,px:.75,py:.25,fontSize:"0.75rem",fontWeight:600,color:"primary.contrastText",bgcolor:"primary.main",borderRadius:2},children:r.length})]}),!je&&g&&c.jsxs(p.Button,{onClick:g,variant:"text",startIcon:c.jsx(Gs,{size:18}),sx:{color:"text.primary",textTransform:"none",fontWeight:500,px:1.5,py:.5,minWidth:"auto",borderRadius:1,whiteSpace:"nowrap","&:hover":{bgcolor:"action.hover"}},children:["Filter",n.length>0&&c.jsx(p.Box,{component:"span",sx:{ml:.5,px:.75,py:.25,fontSize:"0.75rem",fontWeight:600,color:"primary.contrastText",bgcolor:"primary.main",borderRadius:2},children:n.length})]}),b&&_&&k&&F&&i.length>0&&c.jsx(x_,{views:i||[],activeViewId:s||"",isDirty:a,onSelectView:b,onCreateView:_,onManageViews:k,onToggleDefault:N,onToggleFavorite:B,onRestoreView:M,onPermanentDelete:L,isReadOnly:je}),!je&&y&&c.jsx(v_,{onClick:y,hiddenCount:Ft,hasCustomOrder:cr}),W&&c.jsx(p.Button,{onClick:W,disabled:o,variant:"text",startIcon:c.jsx(Io,{size:18}),sx:{color:"text.primary",textTransform:"none",fontWeight:500,px:1.5,py:.5,minWidth:"auto",borderRadius:1,whiteSpace:"nowrap","&:hover":{bgcolor:"action.hover"}},children:o?"Exporting...":"Export"}),!je&&Ae&&c.jsx(p.Button,{onClick:Ae,variant:"text",startIcon:c.jsx(kf,{size:18}),sx:{color:"text.primary",textTransform:"none",fontWeight:500,px:1.5,py:.5,minWidth:"auto",borderRadius:1,whiteSpace:"nowrap","&:hover":{bgcolor:"action.hover"}},children:"Group"}),oe&&c.jsx(p.Button,{onClick:oe,variant:"text",startIcon:c.jsx(RE,{size:18}),sx:{color:"text.primary",textTransform:"none",fontWeight:500,px:1.5,py:.5,minWidth:"auto",borderRadius:1,whiteSpace:"nowrap","&:hover":{bgcolor:"action.hover"}},children:"Audit History"}),ce&&c.jsx(p.Button,{onClick:ce,variant:"text",startIcon:c.jsx(t_,{size:18}),sx:{color:"text.primary",textTransform:"none",fontWeight:500,px:1.5,py:.5,minWidth:"auto",borderRadius:1,whiteSpace:"nowrap","&:hover":{bgcolor:"action.hover"}},children:"Share Report State"})]})]}),c.jsxs(p.Paper,{sx:{overflow:"hidden"},variant:"outlined",children:[c.jsx(p.Box,{sx:{overflowX:"auto"},children:c.jsxs(p.Table,{sx:{tableLayout:"fixed"},children:[c.jsx(p.TableHead,{children:c.jsxs(p.TableRow,{sx:{bgcolor:"action.hover"},children:[xt&&c.jsx(p.TableCell,{sx:{width:48},children:c.jsx(p.Checkbox,{checked:sr,indeterminate:yt,onChange:he=>{te==null||te(he.target.checked,Ye.length)},size:"small",title:"Select all visible rows"})}),gt.map((he,be)=>c.jsx(xC,{column:he,index:be,sortRule:r.find(We=>We.column===he.name),hasFilters:n.some(We=>We.column===he.name),isInSortStack:r.some(We=>We.column===he.name),width:d[he.name],onColumnClick:pr,onMoveColumn:Xt,onResizeStart:Yt,onSort:pr,onRemoveSort:tr,onSortAscending:ir,onSortDescending:pe,onOpenFilterForColumn:T||(()=>{}),onClearFiltersForColumn:ee||(()=>{}),onHideColumn:Ge,onManageColumns:y||(()=>{}),onManageViews:k||(()=>{}),onResetLayout:_e||(()=>{})},he.name))]})}),c.jsx(p.TableBody,{children:Ye.length===0?c.jsx(p.TableRow,{children:c.jsx(p.TableCell,{colSpan:gt.length+(xt?1:0),align:"center",sx:{py:4},children:c.jsx(p.Typography,{variant:"body2",color:"text.secondary",children:"No data matches the current filters"})})}):Oe?Ye.map((he,be)=>he.isGroupHeader?mt(he):Te(he,be)):Ye.map((he,be)=>Te(he,be))})]})}),we&&ut&&c.jsx(FC,{currentPage:ke,pageSize:pt,totalRows:He,onPageChange:we,onPageSizeChange:ut}),!(we&&ut)&&c.jsx(p.Box,{sx:{px:3,py:1.5,bgcolor:"action.hover",borderTop:1,borderColor:"divider"},children:c.jsxs(p.Typography,{variant:"body2",color:"text.secondary",children:["Showing ",Ye.length," ",Ye.length===1?"row":"rows"]})})]})]})})}function PC({schema:e,filters:t,onAddFilter:r,onRemoveFilter:n,onUpdateFilter:i,onClearAll:s,onClose:a,focusColumn:o}){const[f,u]=S.useState(""),[d,h]=S.useState(""),[m,l]=S.useState(""),[v,g]=S.useState(null);S.useEffect(()=>{o&&u(o)},[o]);const x=()=>{u(""),h(""),l(""),g(null)},T=L=>{const W=t[L];u(W.column),h(W.operator),l(W.value!==void 0?String(W.value):""),g(L)},b=e.filter(L=>L.type!=="mixed"&&L.type!=="null"&&L.type!=="array"&&L.type!=="object"),_=e.find(L=>L.name===f),k=_?Yl(_.type):[],F=()=>!(!f||!d||Ki(d)&&!m.trim()),z=()=>{if(!F())return;const L={column:f,operator:d};if(Ki(d)){const W=_==null?void 0:_.type;L.value=W==="number"?Number(m):m}v!==null?i(v,L):r(L),x()},N=L=>{var Q;const W=e.find(J=>J.name===L.column);if(!W)return"";const H=((Q=Yl(W.type).find(J=>J.value===L.operator))==null?void 0:Q.label)||L.operator;return Ki(L.operator)?`${L.column} ${H} "${L.value}"`:`${L.column} ${H}`},B=v!==null,M=()=>{if(B&&v!==null){const L=t[v];if(L)return`Filter ${L.column} Data`}return o?`Filter ${o} Data`:"Filter Column Data"};return c.jsxs(p.Dialog,{open:!0,onClose:a,maxWidth:"md",fullWidth:!0,PaperProps:{sx:{maxHeight:"80vh",display:"flex",flexDirection:"column"}},children:[c.jsxs(p.DialogTitle,{sx:{display:"flex",alignItems:"center",justifyContent:"space-between",pb:2},children:[c.jsx(p.Typography,{variant:"h6",children:M()}),c.jsx(p.IconButton,{onClick:a,size:"small",children:c.jsx(Et,{size:20})})]}),c.jsxs(p.DialogContent,{dividers:!0,sx:{flex:1,overflow:"auto"},children:[c.jsxs(p.Box,{sx:{mb:4},children:[c.jsx(p.Typography,{variant:"subtitle2",sx:{mb:2,fontWeight:600},children:B?"Edit Filter":"Add Filter"}),c.jsxs(p.Box,{sx:{display:"flex",flexDirection:"column",gap:2},children:[c.jsxs(p.FormControl,{size:"small",fullWidth:!0,children:[c.jsx(p.InputLabel,{children:"Column"}),c.jsxs(p.Select,{value:f,onChange:L=>{u(L.target.value),h(""),l("")},label:"Column",children:[c.jsx(p.MenuItem,{value:"",children:"Select column..."}),b.map(L=>c.jsxs(p.MenuItem,{value:L.name,children:[L.name," (",L.type,")"]},L.name))]})]}),f&&c.jsxs(p.FormControl,{size:"small",fullWidth:!0,children:[c.jsx(p.InputLabel,{children:"Operator"}),c.jsxs(p.Select,{value:d,onChange:L=>{h(L.target.value),l("")},label:"Operator",children:[c.jsx(p.MenuItem,{value:"",children:"Select operator..."}),k.map(L=>c.jsx(p.MenuItem,{value:L.value,children:L.label},L.value))]})]}),d&&Ki(d)&&c.jsx(p.TextField,{size:"small",fullWidth:!0,type:(_==null?void 0:_.type)==="number"?"number":"text",value:m,onChange:L=>l(L.target.value),label:"Value",placeholder:"Enter value..."}),c.jsxs(p.Box,{sx:{display:"flex",gap:1},children:[c.jsx(p.Button,{onClick:z,disabled:!F(),variant:"contained",fullWidth:!0,startIcon:B?c.jsx(Ss,{size:16}):c.jsx(ti,{size:16}),children:B?"Update Filter":"Add Filter"}),B&&c.jsx(p.Button,{onClick:x,variant:"outlined",sx:{minWidth:100},children:"Cancel"})]})]})]}),c.jsxs(p.Box,{children:[c.jsxs(p.Box,{sx:{display:"flex",alignItems:"center",justifyContent:"space-between",mb:2},children:[c.jsxs(p.Typography,{variant:"subtitle2",sx:{fontWeight:600},children:["Active Filters (",t.length,")"]}),t.length>0&&c.jsx(p.Button,{onClick:s,size:"small",color:"error",startIcon:c.jsx(Df,{size:14}),sx:{textTransform:"none"},children:"Clear All"})]}),t.length===0?c.jsx(p.Box,{sx:{py:2,textAlign:"center",border:1,borderColor:"divider",borderRadius:1,bgcolor:"action.hover"},children:c.jsx(p.Typography,{variant:"body2",color:"text.secondary",children:"No filters applied"})}):c.jsx(p.Box,{sx:{display:"flex",flexDirection:"column",gap:1},children:t.map((L,W)=>c.jsxs(p.Box,{sx:{display:"flex",alignItems:"center",justifyContent:"space-between",px:2,py:1,bgcolor:"primary.lighter",border:1,borderColor:"primary.light",borderRadius:1},children:[c.jsx(p.Typography,{variant:"body2",children:N(L)}),c.jsxs(p.Box,{sx:{display:"flex",alignItems:"center",gap:.5},children:[c.jsx(p.IconButton,{onClick:()=>T(W),size:"small",color:"primary",title:"Edit filter",children:c.jsx(Ss,{size:16})}),c.jsx(p.IconButton,{onClick:()=>n(W),size:"small",sx:{"&:hover":{color:"error.main"}},title:"Delete filter",children:c.jsx(Et,{size:16})})]})]},W))})]})]}),c.jsx(p.DialogActions,{sx:{px:3,py:2},children:c.jsx(p.Button,{onClick:a,variant:"outlined",fullWidth:!0,children:"Close"})})]})}function jC({schema:e,sortStack:t,onUpdateSortStack:r,onClose:n}){const[i,s]=S.useState(""),[a,o]=S.useState("asc"),f=()=>!(t.length>=3||!i||t.some(x=>x.column===i)),u=()=>{if(!f())return;const x=t.length+1,T={column:i,direction:a,priority:x};r([...t,T]),s(""),o("asc")},d=x=>{const b=t.filter((_,k)=>k!==x).map((_,k)=>({..._,priority:k+1}));r(b)},h=x=>{const T=[...t];T[x]={...T[x],direction:T[x].direction==="asc"?"desc":"asc"},r(T)},m=()=>{r([])},l=x=>{if(x===0)return;const T=[...t];[T[x-1],T[x]]=[T[x],T[x-1]];const b=T.map((_,k)=>({..._,priority:k+1}));r(b)},v=x=>{if(x===t.length-1)return;const T=[...t];[T[x],T[x+1]]=[T[x+1],T[x]];const b=T.map((_,k)=>({..._,priority:k+1}));r(b)},g=e.filter(x=>!t.some(T=>T.column===x.name));return c.jsxs(p.Dialog,{open:!0,onClose:n,maxWidth:"md",fullWidth:!0,PaperProps:{sx:{maxHeight:"80vh",display:"flex",flexDirection:"column"}},children:[c.jsxs(p.DialogTitle,{sx:{display:"flex",alignItems:"center",justifyContent:"space-between",pb:2},children:[c.jsx(p.Typography,{variant:"h6",children:"Multi-Level Sort"}),c.jsx(p.IconButton,{onClick:n,size:"small",children:c.jsx(Et,{size:20})})]}),c.jsxs(p.DialogContent,{dividers:!0,sx:{flex:1,overflow:"auto"},children:[c.jsxs(p.Box,{sx:{mb:4},children:[c.jsx(p.Typography,{variant:"subtitle2",sx:{mb:2,fontWeight:600},children:"Select column for sorting (Primary, Secondary, Tertiary)"}),c.jsxs(p.Box,{sx:{display:"flex",flexDirection:"column",gap:2},children:[c.jsxs(p.FormControl,{size:"small",fullWidth:!0,disabled:t.length>=3,children:[c.jsx(p.InputLabel,{children:"Column"}),c.jsxs(p.Select,{value:i,onChange:x=>s(x.target.value),label:"Column",children:[c.jsx(p.MenuItem,{value:"",children:"Select column..."}),g.map(x=>c.jsxs(p.MenuItem,{value:x.name,children:[x.name," (",x.type,")"]},x.name))]})]}),c.jsx(p.Button,{onClick:u,disabled:!f(),variant:"contained",fullWidth:!0,startIcon:c.jsx(ti,{size:16}),children:"Add Sort Column"})]})]}),c.jsxs(p.Box,{children:[c.jsxs(p.Box,{sx:{display:"flex",alignItems:"center",justifyContent:"space-between",mb:2},children:[c.jsxs(p.Typography,{variant:"subtitle2",sx:{fontWeight:600},children:["Sorted Column Sequence (",t.length,"/3)"]}),t.length>0&&c.jsx(p.Button,{onClick:m,size:"small",color:"error",startIcon:c.jsx(En,{size:14}),sx:{textTransform:"none"},children:"Clear All"})]}),t.length===0?c.jsx(p.Box,{sx:{py:2,textAlign:"center",border:1,borderColor:"divider",borderRadius:1,bgcolor:"action.hover"},children:c.jsx(p.Typography,{variant:"body2",color:"text.secondary",children:"No sorting applied"})}):c.jsx(p.Box,{sx:{display:"flex",flexDirection:"column",gap:1},children:t.map((x,T)=>c.jsxs(p.Box,{sx:{display:"flex",alignItems:"center",gap:2,px:2,py:1.5,bgcolor:"primary.lighter",border:1,borderColor:"primary.light",borderRadius:1},children:[c.jsxs(p.Box,{sx:{display:"flex",alignItems:"center",gap:1},children:[c.jsx(p.Chip,{label:x.priority,size:"small",color:"primary",sx:{width:24,height:24,fontSize:"0.75rem",fontWeight:700}}),c.jsxs(p.Box,{sx:{display:"flex",flexDirection:"column",gap:.5},children:[c.jsx(p.IconButton,{onClick:()=>l(T),disabled:T===0,size:"small",sx:{p:0,width:16,height:16},children:c.jsx(Ma,{size:12})}),c.jsx(p.IconButton,{onClick:()=>v(T),disabled:T===t.length-1,size:"small",sx:{p:0,width:16,height:16,transform:"rotate(180deg)"},children:c.jsx(Ma,{size:12})})]})]}),c.jsxs(p.Box,{sx:{flex:1},children:[c.jsx(p.Typography,{variant:"body2",component:"span",sx:{fontWeight:500},children:x.column}),c.jsxs(p.Typography,{variant:"caption",component:"span",color:"text.secondary",sx:{ml:1},children:["(",x.direction==="asc"?"Ascending":"Descending",")"]})]}),c.jsx(p.IconButton,{onClick:()=>h(T),size:"small",color:"primary",title:"Toggle direction",children:c.jsx(ko,{size:16})}),c.jsx(p.IconButton,{onClick:()=>d(T),size:"small",sx:{"&:hover":{color:"error.main"}},children:c.jsx(Et,{size:16})})]},T))})]})]}),c.jsx(p.DialogActions,{sx:{px:3,py:2},children:c.jsx(p.Button,{onClick:n,variant:"outlined",fullWidth:!0,children:"Close"})})]})}function MC({views:e,activeViewId:t,onSelectView:r,onCreateView:n,onEditView:i,onDeleteView:s,onRestoreView:a,onPermanentDelete:o,onClose:f}){return c.jsxs(p.Dialog,{open:!0,onClose:f,maxWidth:"md",fullWidth:!0,children:[c.jsxs(p.DialogTitle,{sx:{display:"flex",alignItems:"center",justifyContent:"space-between",pb:1},children:["Manage Views",c.jsx(p.IconButton,{onClick:f,size:"small",sx:{color:"text.secondary"},children:c.jsx(Et,{size:20})})]}),c.jsxs(p.DialogContent,{children:[c.jsx(p.Box,{sx:{mb:2},children:c.jsx(p.Button,{onClick:n,variant:"contained",startIcon:c.jsx(ti,{size:16}),size:"small",children:"Create New Report View"})}),c.jsx(p.Box,{sx:{display:"flex",flexDirection:"column",gap:1},children:e.map(u=>c.jsx(p.Paper,{sx:{p:2,border:1,borderColor:u.isDeleted?"error.light":t===u.id?"primary.main":"divider",bgcolor:u.isDeleted?"error.lighter":t===u.id?"primary.lighter":"background.paper",opacity:u.isDeleted?.75:1,cursor:u.isDeleted?"default":"pointer","&:hover":u.isDeleted?{}:{bgcolor:"action.hover"}},onClick:()=>!u.isDeleted&&r(u.id),elevation:0,children:c.jsxs(p.Box,{sx:{display:"flex",alignItems:"flex-start",gap:1.5},children:[c.jsxs(p.Box,{sx:{flex:1},children:[c.jsxs(p.Box,{sx:{display:"flex",alignItems:"center",gap:1,mb:.5},children:[c.jsx(p.Typography,{variant:"body2",sx:{fontWeight:500,textDecoration:u.isDeleted?"line-through":"none",color:u.isDeleted?"text.secondary":"text.primary"},children:u.name}),u.isDeleted&&c.jsx(p.Chip,{label:"Deleted",size:"small",color:"error",sx:{height:20}}),u.isDefault&&c.jsx(p.Chip,{label:"Default",size:"small",color:"primary",sx:{height:20}}),u.isFavorite&&c.jsx(p.Chip,{label:"★ Favorite",size:"small",sx:{height:20}})]}),u.description&&c.jsx(p.Typography,{variant:"caption",color:"text.secondary",children:u.description})]}),c.jsxs(p.Box,{sx:{display:"flex",alignItems:"center",gap:.5},children:[!u.isDeleted&&c.jsxs(c.Fragment,{children:[c.jsx(p.IconButton,{size:"small",onClick:d=>{d.stopPropagation(),i(u.id)},title:"Edit view",children:c.jsx(Ss,{size:16})}),c.jsx(p.IconButton,{size:"small",onClick:d=>{d.stopPropagation(),s(u.id)},title:"Delete view",sx:{"&:hover":{color:"error.main"}},children:c.jsx(En,{size:16})})]}),u.isDeleted&&a&&c.jsx(p.IconButton,{size:"small",onClick:d=>{d.stopPropagation(),a(u.id)},title:"Restore view",sx:{color:"success.main"},children:c.jsx(Ys,{size:16})}),u.isDeleted&&o&&c.jsx(p.IconButton,{size:"small",onClick:d=>{d.stopPropagation(),o(u.id)},title:"Delete permanently",sx:{color:"error.main"},children:c.jsx(En,{size:16})})]})]})},u.id))})]}),c.jsx(p.DialogActions,{sx:{px:3,pb:2},children:c.jsx(p.Button,{onClick:f,variant:"outlined",children:"Close"})})]})}function Kc({currentSnapshot:e,onSave:t,onClose:r,isEditMode:n=!1,initialName:i="",initialDescription:s="",initialIsDefault:a=!1}){const[o,f]=S.useState(i),[u,d]=S.useState(s),[h,m]=S.useState(a),l=()=>{o.trim()&&(t(o.trim(),u.trim(),h),r())},v=x=>{x.key==="Enter"&&!x.shiftKey?l():x.key==="Escape"&&r()},g=()=>n&&i?`Update ${i} view`:"Create New Report View";return c.jsxs(p.Dialog,{open:!0,onClose:r,maxWidth:"sm",fullWidth:!0,children:[c.jsxs(p.DialogTitle,{sx:{display:"flex",alignItems:"center",justifyContent:"space-between",pb:1},children:[g(),c.jsx(p.IconButton,{onClick:r,size:"small",sx:{color:"text.secondary"},children:c.jsx(Et,{size:20})})]}),c.jsx(p.DialogContent,{children:c.jsxs(p.Box,{sx:{display:"flex",flexDirection:"column",gap:2,pt:1},children:[c.jsx(p.TextField,{label:"View Name",required:!0,value:o,onChange:x=>f(x.target.value),onKeyDown:v,placeholder:"e.g., Active Users",autoFocus:!0,fullWidth:!0,size:"small"}),c.jsx(p.TextField,{label:"Description (optional)",value:u,onChange:x=>d(x.target.value),placeholder:"Brief description of this view",multiline:!0,rows:2,fullWidth:!0,size:"small"}),c.jsxs(p.Paper,{sx:{p:2,bgcolor:"action.hover"},variant:"outlined",children:[c.jsx(p.Typography,{variant:"body2",sx:{fontWeight:500,mb:1},children:"This view will capture:"}),c.jsxs(p.Box,{component:"ul",sx:{m:0,pl:2,"& li":{fontSize:"0.875rem",color:"text.secondary"}},children:[c.jsxs("li",{children:[e.filters.length," filter",e.filters.length!==1?"s":""]}),c.jsxs("li",{children:["Sorting: ",Qd(e.sortStack)]}),c.jsx("li",{children:"Column order & visibility"})]})]}),!n&&c.jsx(p.FormControlLabel,{control:c.jsx(p.Checkbox,{checked:h,onChange:x=>m(x.target.checked),size:"small"}),label:c.jsx(p.Typography,{variant:"body2",children:"Set as default view"})})]})}),c.jsxs(p.DialogActions,{sx:{px:3,pb:2},children:[c.jsx(p.Button,{onClick:r,variant:"outlined",color:"inherit",children:"Cancel"}),c.jsx(p.Button,{onClick:l,disabled:!o.trim(),variant:"contained",startIcon:c.jsx(Xs,{size:16}),children:n?"Save Changes":"Create Report View"})]})]})}function LC({viewName:e,onConfirm:t,onCancel:r}){return c.jsxs(p.Dialog,{open:!0,onClose:r,maxWidth:"sm",fullWidth:!0,children:[c.jsxs(p.DialogTitle,{sx:{display:"flex",alignItems:"center",justifyContent:"space-between",pb:1},children:["Delete View",c.jsx(p.IconButton,{onClick:r,size:"small",sx:{color:"text.secondary"},children:c.jsx(Et,{size:20})})]}),c.jsx(p.DialogContent,{children:c.jsxs(p.Box,{sx:{display:"flex",alignItems:"flex-start",gap:1.5,mt:1},children:[c.jsx(kn,{size:20,color:"error",style:{flexShrink:0,marginTop:2}}),c.jsxs(p.Box,{children:[c.jsxs(p.Typography,{variant:"body2",sx:{mb:1},children:["Are you sure you want to delete the view ",c.jsxs("strong",{children:['"',e,'"']}),"?"]}),c.jsx(p.Typography,{variant:"body2",color:"text.secondary",children:"This action cannot be undone."})]})]})}),c.jsxs(p.DialogActions,{sx:{px:3,pb:2},children:[c.jsx(p.Button,{onClick:r,variant:"outlined",color:"inherit",children:"Cancel"}),c.jsx(p.Button,{onClick:t,variant:"contained",color:"error",children:"Delete View"})]})]})}const qc=80,Jc=600,Zc="COLUMN";function BC({column:e,index:t,isVisible:r,width:n,onToggleVisibility:i,onWidthChange:s,moveColumn:a}){const o=S.useRef(null),[f,u]=S.useState(n.toString()),[{handlerId:d},h]=Gf({accept:Zc,collect(T){return{handlerId:T.getHandlerId()}},hover(T,b){var M;if(!o.current)return;const _=T.index,k=t;if(_===k)return;const F=(M=o.current)==null?void 0:M.getBoundingClientRect(),z=(F.bottom-F.top)/2,N=b.getClientOffset(),B=((N==null?void 0:N.y)??0)-F.top;_<k&&B<z||_>k&&B>z||(a(_,k),T.index=k)}}),[{isDragging:m},l]=Hf({type:Zc,item:()=>({index:t}),collect:T=>({isDragging:T.isDragging()})});l(h(o));const v=()=>{const T=parseInt(f);if(isNaN(T)){u(n.toString());return}const b=Math.max(qc,Math.min(Jc,T));u(b.toString()),s(e.name,b)},g=T=>{(T===""||/^\d+$/.test(T))&&u(T)},x=T=>({string:"primary",number:"success",boolean:"secondary",array:"warning",object:"error",null:"default",mixed:"default"})[T]||"default";return c.jsxs(p.TableRow,{ref:o,"data-handler-id":d,sx:{opacity:m?.5:1,"&:hover":{bgcolor:"action.hover"},cursor:"move"},children:[c.jsx(p.TableCell,{children:c.jsxs(p.Box,{sx:{display:"flex",alignItems:"center",gap:1},children:[c.jsx(p.Box,{sx:{color:"text.secondary",cursor:"grab","&:active":{cursor:"grabbing"}},children:c.jsx(Ma,{size:16})}),c.jsx(p.Typography,{variant:"body2",sx:{fontWeight:500},children:e.name})]})}),c.jsx(p.TableCell,{children:c.jsx(p.Chip,{label:e.type.toUpperCase(),size:"small",color:x(e.type),sx:{height:20,fontSize:"0.7rem",fontWeight:600}})}),c.jsxs(p.TableCell,{children:[c.jsxs(p.Box,{sx:{display:"flex",alignItems:"center",gap:1},children:[c.jsx(p.TextField,{type:"text",value:f,onChange:T=>g(T.target.value),onBlur:v,placeholder:"150",size:"small",sx:{width:80},InputProps:{sx:{fontSize:"0.875rem"}}}),c.jsx(p.Typography,{variant:"caption",color:"text.secondary",children:"px"})]}),c.jsxs(p.Typography,{variant:"caption",color:"text.disabled",sx:{mt:.5,display:"block"},children:["min: ",qc,", max: ",Jc]})]}),c.jsx(p.TableCell,{children:c.jsxs(p.Box,{sx:{display:"flex",alignItems:"center",gap:1},children:[c.jsx(p.IconButton,{onClick:()=>i(e.name,!r),title:r?"Hide column":"Show column",size:"small",children:r?c.jsx(Fo,{size:16}):c.jsx(Af,{size:16,style:{opacity:.4}})}),c.jsx(p.Chip,{label:r?"Active":"Hidden",size:"small",color:r?"success":"default",sx:{height:20,fontSize:"0.7rem"}})]})})]})}function $C({schema:e,columnVisibility:t,columnOrder:r,columnWidths:n={},views:i=[],activeViewId:s="",onUpdateColumnVisibility:a,onUpdateColumnOrder:o,onUpdateColumnWidth:f,onResetLayout:u,onSaveToCurrentView:d,onSaveToAllViews:h,onSelectView:m,onClose:l}){const[v,g]=S.useState(!1),[x,T]=S.useState(r),[b,_]=S.useState("all"),[k,F]=S.useState(null),z=(J,ee)=>{const _e=[...x],[Ae]=_e.splice(J,1);_e.splice(ee,0,Ae),T(_e),o(_e)},N=()=>{u(),g(!1)},M=x.map(J=>e.find(ee=>ee.name===J)).filter(J=>J!==void 0).filter(J=>{const ee=t[J.name]??!0;return b==="active"?ee:b==="hidden"?!ee:!0}),L=Object.values(t).filter(J=>J).length,W=e.length,y=i.find(J=>J.id===s),H=i.filter(J=>!J.isDeleted),Q=S.useMemo(()=>{if(!y)return!1;const J=y.snapshot,ee=JSON.stringify(t)!==JSON.stringify(J.columnVisibility),_e=JSON.stringify(r)!==JSON.stringify(J.columnOrder),Ae=JSON.stringify(n)!==JSON.stringify(J.columnWidths);return ee||_e||Ae},[y,t,r,n]);return c.jsx($f,{backend:ed,children:c.jsxs(p.Dialog,{open:!0,onClose:l,maxWidth:"lg",fullWidth:!0,children:[c.jsxs(p.DialogTitle,{children:[c.jsxs(p.Box,{sx:{display:"flex",alignItems:"flex-start",justifyContent:"space-between"},children:[c.jsxs(p.Box,{sx:{flex:1},children:[c.jsx(p.Typography,{variant:"h6",children:"Manage Columns"}),c.jsxs(p.Typography,{variant:"body2",color:"text.secondary",children:[L," of ",W," columns visible • Drag to reorder"]})]}),H.length>0&&m&&c.jsxs(p.Box,{sx:{ml:2},children:[c.jsx(p.Typography,{variant:"caption",color:"text.secondary",sx:{mb:.5,display:"block"},children:"View:"}),c.jsx(p.Button,{onClick:J=>F(J.currentTarget),variant:"outlined",size:"small",endIcon:c.jsx(Mi,{size:16}),sx:{minWidth:180,justifyContent:"space-between"},children:c.jsx(p.Box,{component:"span",sx:{overflow:"hidden",textOverflow:"ellipsis"},children:(y==null?void 0:y.name)||"Select View"})}),c.jsx(p.Menu,{anchorEl:k,open:!!k,onClose:()=>F(null),children:H.map(J=>c.jsx(p.MenuItem,{onClick:()=>{m(J.id),F(null)},selected:J.id===s,children:J.name},J.id))})]}),c.jsx(p.IconButton,{onClick:l,size:"small",sx:{ml:2,color:"text.secondary"},children:c.jsx(Et,{size:20})})]}),c.jsxs(p.Tabs,{value:b,onChange:(J,ee)=>_(ee),sx:{mt:2},children:[c.jsx(p.Tab,{label:"All",value:"all"}),c.jsx(p.Tab,{label:"Active",value:"active"}),c.jsx(p.Tab,{label:"Hidden",value:"hidden"})]})]}),c.jsx(p.DialogContent,{dividers:!0,sx:{p:0,overflow:"hidden"},children:c.jsx(p.Box,{sx:{overflow:"auto",maxHeight:"60vh"},children:c.jsxs(p.Table,{stickyHeader:!0,children:[c.jsx(p.TableHead,{children:c.jsxs(p.TableRow,{children:[c.jsx(p.TableCell,{sx:{fontWeight:600,textTransform:"uppercase",fontSize:"0.75rem"},children:"Column Name"}),c.jsx(p.TableCell,{sx:{fontWeight:600,textTransform:"uppercase",fontSize:"0.75rem"},children:"Type"}),c.jsx(p.TableCell,{sx:{fontWeight:600,textTransform:"uppercase",fontSize:"0.75rem"},children:"Width"}),c.jsx(p.TableCell,{sx:{fontWeight:600,textTransform:"uppercase",fontSize:"0.75rem"},children:"Visibility"})]})}),c.jsx(p.TableBody,{children:M.length===0?c.jsx(p.TableRow,{children:c.jsx(p.TableCell,{colSpan:4,align:"center",children:c.jsx(p.Typography,{variant:"body2",color:"text.secondary",sx:{py:4},children:"No columns in this category"})})}):M.map((J,ee)=>c.jsx(BC,{column:J,index:ee,isVisible:t[J.name]??!0,width:n[J.name]||150,onToggleVisibility:a,onWidthChange:f||(()=>{}),moveColumn:z},J.name))})]})})}),c.jsxs(p.DialogActions,{sx:{px:3,pb:2,justifyContent:"space-between",flexWrap:"wrap"},children:[c.jsx(p.Button,{onClick:()=>g(!0),disabled:!Q,variant:"outlined",color:"inherit",startIcon:c.jsx(Ys,{size:16}),size:"small",children:"Reset to Default Layout"}),c.jsxs(p.Stack,{direction:"row",spacing:1.5,children:[c.jsx(p.Button,{onClick:l,variant:"outlined",color:"inherit",size:"small",children:"Cancel"}),d&&c.jsx(p.Button,{onClick:()=>{d(),l()},disabled:!Q,variant:"contained",startIcon:c.jsx(Xs,{size:16}),size:"small",children:"Save to Current View"}),h&&c.jsx(p.Button,{onClick:()=>{h(),l()},disabled:!Q,variant:"contained",color:"success",startIcon:c.jsx(LE,{size:16}),size:"small",children:"Save to All Views"})]})]}),v&&c.jsxs(p.Dialog,{open:!0,onClose:()=>g(!1),maxWidth:"xs",children:[c.jsx(p.DialogTitle,{children:"Reset column layout?"}),c.jsx(p.DialogContent,{children:c.jsx(p.Typography,{variant:"body2",color:"text.secondary",children:"This will restore default visibility, order, and widths for all columns."})}),c.jsxs(p.DialogActions,{children:[c.jsx(p.Button,{onClick:()=>g(!1),variant:"outlined",color:"inherit",children:"Cancel"}),c.jsx(p.Button,{onClick:N,variant:"contained",color:"error",children:"Reset Layout"})]})]})]})})}function td({content:e,type:t="tooltip",className:r=""}){const[n,i]=S.useState(null),s=!!n;return t==="popover"?c.jsxs(c.Fragment,{children:[c.jsx(p.IconButton,{onClick:a=>{a.preventDefault(),a.stopPropagation(),i(a.currentTarget)},size:"small","aria-label":"More information",sx:{width:16,height:16,color:"primary.main","&:hover":{bgcolor:"primary.lighter"}},className:r,children:c.jsx(Ai,{size:16})}),c.jsx(p.Popover,{open:s,anchorEl:n,onClose:()=>i(null),anchorOrigin:{vertical:"bottom",horizontal:"left"},transformOrigin:{vertical:"top",horizontal:"left"},sx:{mt:1},children:c.jsx(p.Box,{sx:{p:2,maxWidth:288},children:c.jsx(p.Typography,{variant:"body2",sx:{lineHeight:1.6},children:e})})})]}):c.jsx(p.Tooltip,{title:e,placement:"top",arrow:!0,children:c.jsx(p.IconButton,{size:"small","aria-label":"More information",onClick:a=>{a.preventDefault(),a.stopPropagation()},sx:{width:16,height:16,color:"primary.main","&:hover":{bgcolor:"primary.lighter"}},className:r,children:c.jsx(Ai,{size:16})})})}function UC({schema:e,grouping:t,onApply:r,onClose:n}){var k;const[i,s]=S.useState(t||{enabled:!1,levels:[],collapsedGroups:[]}),[a,o]=S.useState(""),[f,u]=S.useState(null),d=Hd(e),h=d.filter(F=>!i.levels.some((z,N)=>z.column===F.name&&N!==f)),m=i.levels.length<3&&h.length>0,l=()=>{!m||!a||(s({...i,levels:[...i.levels,{column:a}],enabled:!0}),o(""))},v=F=>{const z=i.levels.filter((N,B)=>B!==F);if(z.length===0){r(null),n();return}s({...i,levels:z,enabled:z.length>0})},g=()=>{if(f===null||!a)return;const F=[...i.levels];F[f]={column:a},s({...i,levels:F}),u(null),o("")},x=()=>{u(null),o("")},T=(F,z)=>{const N=z==="up"?F-1:F+1;if(N<0||N>=i.levels.length)return;const B=[...i.levels],[M]=B.splice(F,1);B.splice(N,0,M),s({...i,levels:B})},b=()=>{r(null),n()},_=()=>{i.levels.length===0?r(null):r({...i,enabled:!0,collapsedGroups:(t==null?void 0:t.collapsedGroups)||[]}),n()};return c.jsxs(p.Dialog,{open:!0,onClose:n,maxWidth:"md",fullWidth:!0,children:[c.jsxs(p.DialogTitle,{sx:{display:"flex",alignItems:"center",gap:1,pb:1},children:["Group Configuration",c.jsx(td,{content:"Group rows by column values. Maximum 3 group levels allowed. Only STRING and BOOLEAN columns can be used for grouping.",type:"popover"}),c.jsx(p.IconButton,{onClick:n,size:"small",sx:{ml:"auto",color:"text.secondary"},children:c.jsx(Et,{size:20})})]}),c.jsx(p.DialogContent,{dividers:!0,children:c.jsxs(p.Stack,{spacing:3,sx:{py:1},children:[f===null&&c.jsxs(p.Box,{children:[c.jsx(p.Typography,{variant:"body2",sx:{fontWeight:500,mb:1.5},children:"Add Group Level"}),c.jsx(p.FormControl,{fullWidth:!0,size:"small",sx:{mb:1.5},children:c.jsxs(p.Select,{value:a,onChange:F=>o(F.target.value),disabled:!m,displayEmpty:!0,children:[c.jsx(p.MenuItem,{value:"",children:"Select a column..."}),h.map(F=>c.jsxs(p.MenuItem,{value:F.name,children:[F.name," (",F.type.toUpperCase(),")"]},F.name))]})}),c.jsx(p.Button,{onClick:l,disabled:!m||!a,variant:"outlined",startIcon:c.jsx(ti,{size:16}),fullWidth:!0,children:"Add Group Level"}),i.levels.length===3&&c.jsx(p.Typography,{variant:"caption",color:"text.secondary",sx:{display:"block",textAlign:"center",mt:1},children:"Maximum group levels (3) reached"}),d.length===0&&c.jsx(p.Typography,{variant:"body2",color:"text.secondary",sx:{textAlign:"center",py:2},children:"No groupable columns available. Only STRING and BOOLEAN columns can be grouped."})]}),f!==null&&c.jsxs(p.Alert,{severity:"warning",sx:{mb:2},children:[c.jsxs(p.Typography,{variant:"body2",sx:{fontWeight:500,mb:1},children:["Edit Group Level ",f+1]}),c.jsx(p.FormControl,{fullWidth:!0,size:"small",sx:{mb:1.5},children:c.jsxs(p.Select,{value:a,onChange:F=>o(F.target.value),children:[c.jsx(p.MenuItem,{value:"",children:"Select a column..."}),c.jsxs(p.MenuItem,{value:i.levels[f].column,children:[i.levels[f].column," (",(k=e.find(F=>F.name===i.levels[f].column))==null?void 0:k.type.toUpperCase(),")"]}),h.filter(F=>F.name!==i.levels[f].column).map(F=>c.jsxs(p.MenuItem,{value:F.name,children:[F.name," (",F.type.toUpperCase(),")"]},F.name))]})}),c.jsxs(p.Stack,{direction:"row",spacing:1,children:[c.jsx(p.Button,{onClick:g,disabled:!a,variant:"contained",color:"warning",fullWidth:!0,size:"small",children:"Save"}),c.jsx(p.Button,{onClick:x,variant:"outlined",color:"inherit",fullWidth:!0,size:"small",children:"Cancel"})]})]}),i.levels.length>0&&f===null&&c.jsxs(p.Box,{children:[c.jsxs(p.Box,{sx:{display:"flex",justifyContent:"space-between",alignItems:"center",mb:1.5},children:[c.jsx(p.Typography,{variant:"body2",sx:{fontWeight:500},children:"Active Group Levels"}),c.jsx(p.Button,{onClick:b,size:"small",color:"error",sx:{fontSize:"0.75rem",textTransform:"none"},children:"Clear All"})]}),c.jsx(p.Stack,{spacing:1.5,children:i.levels.map((F,z)=>{const N=e.find(B=>B.name===F.column);return c.jsxs(p.Box,{sx:{display:"flex",alignItems:"center",gap:1.5,p:2,border:1,borderColor:"divider",borderRadius:1,bgcolor:"background.paper"},children:[c.jsx(p.Chip,{label:`L${z+1}`,size:"small",color:"primary",sx:{width:40,fontWeight:600}}),c.jsxs(p.Box,{sx:{flex:1},children:[c.jsx(p.Typography,{variant:"body2",sx:{fontWeight:500},children:F.column}),c.jsx(p.Typography,{variant:"caption",color:"text.secondary",children:N==null?void 0:N.type.toUpperCase()})]}),c.jsxs(p.Stack,{direction:"row",spacing:.5,children:[c.jsx(p.IconButton,{size:"small",onClick:()=>T(z,"up"),disabled:z===0,children:c.jsx(cE,{size:16})}),c.jsx(p.IconButton,{size:"small",onClick:()=>T(z,"down"),disabled:z===i.levels.length-1,children:c.jsx(Mi,{size:16})}),c.jsx(p.IconButton,{size:"small",onClick:()=>handleEditLevel(z),children:c.jsx(Ss,{size:16})}),c.jsx(p.IconButton,{size:"small",onClick:()=>v(z),sx:{color:"error.main"},children:c.jsx(En,{size:16})})]})]},z)})})]})]})}),c.jsxs(p.DialogActions,{sx:{px:3,pb:2},children:[c.jsx(p.Button,{onClick:n,variant:"outlined",color:"inherit",children:"Cancel"}),c.jsx(p.Button,{onClick:_,variant:"contained",children:"Apply Grouping"})]})]})}const WC={filters:Gs,sorting:ko,visibility:Fo,order:Cf,widths:KE,grouping:kf};function VC({changes:e,onClose:t}){const r=n=>({filters:"primary",sorting:"secondary",visibility:"success",order:"warning",widths:"info",grouping:"error"})[n]||"default";return c.jsxs(p.Dialog,{open:!0,onClose:t,maxWidth:"sm",fullWidth:!0,children:[c.jsxs(p.DialogTitle,{sx:{display:"flex",alignItems:"center",justifyContent:"space-between",pb:1},children:["View Changes Summary",c.jsx(p.IconButton,{onClick:t,size:"small",sx:{color:"text.secondary"},children:c.jsx(Et,{size:20})})]}),c.jsx(p.DialogContent,{dividers:!0,children:e.length===0?c.jsx(p.Box,{sx:{textAlign:"center",py:4},children:c.jsx(p.Typography,{variant:"body2",color:"text.secondary",children:"No changes detected"})}):c.jsxs(p.Box,{children:[c.jsx(p.Typography,{variant:"body2",color:"text.secondary",sx:{mb:2},children:"The following modifications have been made to this view:"}),c.jsx(p.Box,{sx:{display:"flex",flexDirection:"column",gap:1.5},children:e.map((n,i)=>{const s=WC[n.category];return c.jsxs(p.Paper,{elevation:0,sx:{display:"flex",gap:1.5,p:1.5,border:1,borderColor:"divider",borderRadius:1},children:[c.jsx(p.Box,{sx:{display:"flex",alignItems:"center",justifyContent:"center",width:32,height:32,borderRadius:1,bgcolor:`${r(n.category)}.lighter`,color:`${r(n.category)}.main`,flexShrink:0},children:c.jsx(s,{size:16})}),c.jsxs(p.Box,{sx:{flex:1,minWidth:0},children:[c.jsx(p.Typography,{variant:"body2",sx:{fontWeight:500},children:n.label}),c.jsx(p.Typography,{variant:"caption",color:"text.secondary",children:n.description})]})]},i)})})]})}),c.jsx(p.DialogActions,{sx:{px:3,pb:2,bgcolor:"action.hover"},children:c.jsx(p.Button,{onClick:t,variant:"outlined",color:"inherit",children:"Close"})})]})}function zC({viewName:e,isDefaultView:t,changes:r=[],onSaveToCurrentView:n,onSaveAsNewView:i,onCancel:s}){const[a,o]=S.useState(!1);return c.jsxs(c.Fragment,{children:[c.jsx(p.Box,{sx:{position:"sticky",bottom:0,width:"100%",bgcolor:"background.paper",borderTop:1,borderColor:"divider",boxShadow:4,zIndex:10},children:c.jsxs(p.Box,{sx:{display:"flex",alignItems:"center",justifyContent:"space-between",p:2},children:[c.jsxs(p.Typography,{variant:"body2",sx:{fontWeight:500},children:['Unsaved changes to "',e,'"']}),c.jsxs(p.Box,{sx:{display:"flex",alignItems:"center",gap:1.5},children:[!t&&n&&c.jsx(p.Button,{onClick:n,variant:"contained",startIcon:c.jsx(Xs,{size:16}),size:"small",children:"Save to Current View"}),c.jsx(p.Button,{onClick:i,variant:"contained",color:"success",startIcon:c.jsx(OE,{size:16}),size:"small",children:"Save as New View"}),c.jsx(p.IconButton,{onClick:s,title:"Revert changes",size:"small",children:c.jsx(Et,{size:20})}),r.length>0&&c.jsx(p.IconButton,{onClick:()=>o(!0),title:"View changes summary",size:"small",children:c.jsx(hE,{size:20})})]})]})}),a&&c.jsx(VC,{changes:r,onClose:()=>o(!1)})]})}function HC({onExportAnyway:e,onSaveAndExport:t,onCancel:r}){return c.jsx(p.Box,{sx:{mb:2},children:c.jsxs(p.Alert,{severity:"warning",icon:c.jsx(kn,{size:20}),action:c.jsx(p.IconButton,{size:"small",onClick:r,sx:{color:"warning.main"},children:c.jsx(Et,{size:20})}),sx:{alignItems:"flex-start"},children:[c.jsx(p.Typography,{variant:"subtitle2",sx:{fontWeight:600,mb:.5},children:"You are exporting with unsaved view changes"}),c.jsx(p.Typography,{variant:"body2",sx:{mb:1.5},children:"Your current view has unsaved changes. Choose how to proceed:"}),c.jsxs(p.Box,{sx:{display:"flex",gap:1},children:[c.jsx(p.Button,{onClick:t,variant:"contained",color:"primary",startIcon:c.jsx(Xs,{size:14}),size:"small",children:"Save View & Export"}),c.jsx(p.Button,{onClick:e,variant:"contained",color:"warning",startIcon:c.jsx(Io,{size:14}),size:"small",children:"Export Anyway"})]})]})})}function GC({auditHistory:e,onClose:t}){const[r,n]=S.useState(new Set),i=a=>{n(o=>{const f=new Set(o);return f.has(a)?f.delete(a):f.add(a),f})},s=[...e].sort((a,o)=>new Date(o.timestamp).getTime()-new Date(a.timestamp).getTime());return c.jsxs(p.Dialog,{open:!0,onClose:t,maxWidth:"lg",fullWidth:!0,children:[c.jsxs(p.DialogTitle,{sx:{display:"flex",alignItems:"center",justifyContent:"space-between",pb:1},children:[c.jsxs(p.Box,{children:[c.jsx(p.Typography,{variant:"h6",children:"Audit History"}),c.jsxs(p.Typography,{variant:"caption",color:"text.secondary",children:[s.length," event",s.length!==1?"s":""," recorded"]})]}),c.jsx(p.IconButton,{onClick:t,size:"small",sx:{color:"text.secondary"},children:c.jsx(Et,{size:20})})]}),c.jsx(p.DialogContent,{sx:{pt:2},children:s.length===0?c.jsxs(p.Box,{sx:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",py:6,textAlign:"center"},children:[c.jsx(Ic,{size:48,style:{opacity:.3,marginBottom:12}}),c.jsx(p.Typography,{variant:"body2",color:"text.secondary",children:"No audit events recorded yet"}),c.jsx(p.Typography,{variant:"caption",color:"text.disabled",sx:{mt:.5},children:"Changes to this report will appear here"})]}):c.jsx(p.Box,{sx:{display:"flex",flexDirection:"column",gap:1.5},children:s.map(a=>{const o=r.has(a.id);return n2(a.feature),c.jsxs(p.Paper,{variant:"outlined",children:[c.jsxs(p.Box,{onClick:()=>i(a.id),sx:{px:2,py:1.5,display:"flex",alignItems:"center",gap:1.5,cursor:"pointer","&:hover":{bgcolor:"action.hover"}},children:[c.jsx(p.Box,{sx:{flexShrink:0},children:o?c.jsx(Mi,{size:16,style:{opacity:.5}}):c.jsx(Hs,{size:16,style:{opacity:.5}})}),c.jsx(p.Chip,{label:r2(a.feature),size:"small",sx:{height:20,fontSize:"0.75rem"}}),c.jsx(p.Typography,{variant:"body2",sx:{flex:1,fontWeight:500},children:t2(a.action)}),c.jsxs(p.Box,{sx:{display:"flex",alignItems:"center",gap:.5,flexShrink:0},children:[c.jsx(Ic,{size:14,style:{opacity:.4}}),c.jsx(p.Typography,{variant:"caption",color:"text.secondary",children:i2(a.timestamp)})]}),a.user&&c.jsxs(p.Box,{sx:{display:"flex",alignItems:"center",gap:.5,flexShrink:0},children:[c.jsx(o_,{size:14,style:{opacity:.4}}),c.jsx(p.Typography,{variant:"caption",color:"text.secondary",children:a.user})]})]}),c.jsx(p.Collapse,{in:o,children:c.jsxs(p.Box,{sx:{px:2,pb:2,pt:1,borderTop:1,borderColor:"divider",bgcolor:"action.hover"},children:[a.previousState&&c.jsxs(p.Box,{sx:{mb:2},children:[c.jsx(p.Typography,{variant:"caption",sx:{fontWeight:600,color:"text.secondary",textTransform:"uppercase",mb:.5,display:"block"},children:"Previous State"}),c.jsx(p.Box,{component:"pre",sx:{fontSize:"0.75rem",bgcolor:"background.paper",border:1,borderColor:"divider",borderRadius:1,p:1,overflow:"auto",maxHeight:200},children:Ul(a.previousState)})]}),a.newState&&c.jsxs(p.Box,{children:[c.jsx(p.Typography,{variant:"caption",sx:{fontWeight:600,color:"text.secondary",textTransform:"uppercase",mb:.5,display:"block"},children:"New State"}),c.jsx(p.Box,{component:"pre",sx:{fontSize:"0.75rem",bgcolor:"background.paper",border:1,borderColor:"divider",borderRadius:1,p:1,overflow:"auto",maxHeight:200},children:Ul(a.newState)})]})]})})]},a.id)})})})]})}function YC({onSave:e,onClose:t}){const[r,n]=S.useState(""),[i,s]=S.useState(""),[a,o]=S.useState(""),f=()=>{if(!r.trim()){o("Preset name is required");return}e(r.trim(),i.trim())},u=d=>{n(d),a&&o("")};return c.jsxs(p.Dialog,{open:!0,onClose:t,maxWidth:"sm",fullWidth:!0,children:[c.jsxs(p.DialogTitle,{sx:{display:"flex",alignItems:"center",justifyContent:"space-between",pb:1},children:[c.jsxs(p.Box,{sx:{display:"flex",alignItems:"center",gap:1},children:[c.jsx(p.Typography,{variant:"h6",children:"Create Shareable Report Preset"}),c.jsx(td,{content:"This preset will capture filters, sorting, grouping, column configuration, and the active view. The actual data is not saved or shared.",type:"popover"})]}),c.jsx(p.IconButton,{onClick:t,size:"small",sx:{color:"text.secondary"},children:c.jsx(Et,{size:20})})]}),c.jsx(p.DialogContent,{children:c.jsxs(p.Box,{sx:{display:"flex",flexDirection:"column",gap:2,pt:1},children:[c.jsx(p.Typography,{variant:"body2",color:"text.secondary",children:"Save the current report configuration and generate a shareable link that others can use to view the same filters, sorting, and column layout."}),c.jsx(p.TextField,{label:"Preset Name",required:!0,value:r,onChange:d=>u(d.target.value),placeholder:"e.g., Q4 Active Users Report",error:!!a,helperText:a,autoFocus:!0,fullWidth:!0,size:"small"}),c.jsx(p.TextField,{label:"Description (optional)",value:i,onChange:d=>s(d.target.value),placeholder:"Briefly describe what this preset shows...",multiline:!0,rows:3,fullWidth:!0,size:"small"})]})}),c.jsxs(p.DialogActions,{sx:{px:3,pb:2,bgcolor:"action.hover"},children:[c.jsx(p.Button,{onClick:t,variant:"outlined",color:"inherit",children:"Cancel"}),c.jsx(p.Button,{onClick:f,variant:"contained",children:"Create & Share"})]})]})}function XC({presetName:e,shareUrl:t,onCopyLink:r,onOpenPreset:n,onDeletePreset:i,onClose:s}){const[a,o]=S.useState(!1),f=()=>{r(),o(!0),setTimeout(()=>o(!1),2e3)};return c.jsxs(p.Dialog,{open:!0,onClose:s,maxWidth:"sm",fullWidth:!0,children:[c.jsxs(p.DialogTitle,{sx:{display:"flex",alignItems:"center",justifyContent:"space-between",pb:1},children:[c.jsxs(p.Box,{children:[c.jsx(p.Typography,{variant:"h6",children:"Shareable Link Generated"}),c.jsxs(p.Typography,{variant:"caption",color:"text.secondary",children:["Preset: ",e]})]}),c.jsx(p.IconButton,{onClick:s,size:"small",sx:{color:"text.secondary"},children:c.jsx(Et,{size:20})})]}),c.jsx(p.DialogContent,{children:c.jsxs(p.Box,{sx:{display:"flex",flexDirection:"column",gap:2,pt:1},children:[c.jsxs(p.Alert,{severity:"success",icon:c.jsx(ja,{size:20}),children:[c.jsx(p.Typography,{variant:"body2",sx:{fontWeight:500},children:"Preset created successfully!"}),c.jsx(p.Typography,{variant:"body2",sx:{mt:.5},children:"Share the link below with anyone who needs access to this report configuration."})]}),c.jsxs(p.Box,{children:[c.jsx(p.Typography,{variant:"body2",sx:{fontWeight:500,mb:1},children:"Shareable URL"}),c.jsxs(p.Box,{sx:{display:"flex",gap:1},children:[c.jsx(p.TextField,{value:t,size:"small",fullWidth:!0,InputProps:{readOnly:!0},onClick:u=>u.target.select(),sx:{"& .MuiInputBase-input":{bgcolor:"action.hover"}}}),c.jsx(p.Button,{onClick:f,variant:"contained",color:a?"success":"primary",startIcon:a?c.jsx(ja,{size:16}):c.jsx(TE,{size:16}),sx:{minWidth:100},children:a?"Copied!":"Copy"})]})]}),c.jsxs(p.Box,{sx:{display:"flex",gap:1.5},children:[c.jsx(p.Button,{onClick:n,variant:"outlined",startIcon:c.jsx(_E,{size:16}),fullWidth:!0,children:"Open Link"}),c.jsx(p.Button,{onClick:i,variant:"outlined",color:"error",startIcon:c.jsx(En,{size:16}),fullWidth:!0,children:"Delete Preset"})]})]})}),c.jsx(p.DialogActions,{sx:{px:3,pb:2},children:c.jsx(p.Button,{onClick:s,variant:"contained",children:"Done"})})]})}function KC({presetName:e,onClear:t}){return c.jsx(p.Chip,{icon:c.jsx($E,{size:14}),label:c.jsxs(p.Box,{sx:{display:"flex",alignItems:"center",gap:.5},children:["Preset: ",c.jsx(p.Box,{component:"span",sx:{fontWeight:600},children:e})]}),onDelete:t,deleteIcon:c.jsx(p.IconButton,{size:"small",title:"Exit preset view",sx:{p:0},children:c.jsx(Et,{size:14})}),sx:{bgcolor:"primary.lighter",borderColor:"primary.light",border:1,fontSize:"0.875rem",fontWeight:500,"& .MuiChip-deleteIcon":{color:"primary.main","&:hover":{color:"primary.dark"}}}})}function qC({totalRows:e,visibleRows:t,hasGrouping:r,visibleColumnsCount:n,totalColumnsCount:i,onExport:s,onClose:a}){const[o,f]=S.useState("csv"),[u,d]=S.useState("visible"),[h,m]=S.useState("visible"),l=e>5e4,v=u==="visible"?t:e,g=h==="visible"?n:i,x=()=>{s({format:o,scope:u,columnScope:h}),a()},T={csv:"CSV",excel:"Excel (.xlsx)",json:"JSON"};return c.jsxs(p.Dialog,{open:!0,onClose:a,maxWidth:"sm",fullWidth:!0,children:[c.jsxs(p.DialogTitle,{sx:{display:"flex",alignItems:"center",justifyContent:"space-between",pb:1},children:["Export Report",c.jsx(p.IconButton,{onClick:a,size:"small",sx:{color:"text.secondary"},children:c.jsx(Et,{size:20})})]}),c.jsx(p.DialogContent,{children:c.jsxs(p.Box,{sx:{display:"flex",flexDirection:"column",gap:3,pt:1},children:[l&&c.jsxs(p.Alert,{severity:"warning",icon:c.jsx(kn,{size:20}),children:[c.jsx(p.AlertTitle,{children:"Large Dataset Warning"}),"This export contains over 50,000 rows. Processing may take a few moments."]}),c.jsxs(p.FormControl,{component:"fieldset",children:[c.jsx(p.FormLabel,{component:"legend",sx:{mb:1},children:"Format"}),c.jsxs(p.RadioGroup,{value:o,onChange:b=>f(b.target.value),children:[c.jsx(p.FormControlLabel,{value:"csv",control:c.jsx(p.Radio,{size:"small"}),label:c.jsxs(p.Box,{children:[c.jsx(p.Typography,{variant:"body2",sx:{fontWeight:500},children:"CSV"}),c.jsx(p.Typography,{variant:"caption",color:"text.secondary",children:"Comma-separated values, compatible with Excel"})]}),sx:{mb:1,alignItems:"flex-start"}}),c.jsx(p.FormControlLabel,{value:"excel",control:c.jsx(p.Radio,{size:"small"}),label:c.jsxs(p.Box,{children:[c.jsx(p.Typography,{variant:"body2",sx:{fontWeight:500},children:"Excel (.xlsx)"}),c.jsx(p.Typography,{variant:"caption",color:"text.secondary",children:"Native Excel format with formatting support"})]}),sx:{mb:1,alignItems:"flex-start"}}),c.jsx(p.FormControlLabel,{value:"json",control:c.jsx(p.Radio,{size:"small"}),label:c.jsxs(p.Box,{children:[c.jsx(p.Typography,{variant:"body2",sx:{fontWeight:500},children:"JSON"}),c.jsx(p.Typography,{variant:"caption",color:"text.secondary",children:"Structured data with metadata and filters"})]}),sx:{alignItems:"flex-start"}})]})]}),c.jsxs(p.FormControl,{component:"fieldset",children:[c.jsx(p.FormLabel,{component:"legend",sx:{mb:1},children:"Rows"}),c.jsxs(p.RadioGroup,{value:u,onChange:b=>d(b.target.value),children:[c.jsx(p.FormControlLabel,{value:"visible",control:c.jsx(p.Radio,{size:"small"}),label:c.jsxs(p.Box,{children:[c.jsx(p.Typography,{variant:"body2",sx:{fontWeight:500},children:"Visible Rows"}),c.jsxs(p.Typography,{variant:"caption",color:"text.secondary",children:["Export ",t.toLocaleString()," rows (filtered and searched)"]})]}),sx:{mb:1,alignItems:"flex-start"}}),c.jsx(p.FormControlLabel,{value:"all",control:c.jsx(p.Radio,{size:"small"}),label:c.jsxs(p.Box,{children:[c.jsx(p.Typography,{variant:"body2",sx:{fontWeight:500},children:"All Rows"}),c.jsxs(p.Typography,{variant:"caption",color:"text.secondary",children:["Export ",e.toLocaleString()," rows (complete original dataset)"]})]}),sx:{alignItems:"flex-start"}})]})]}),c.jsxs(p.FormControl,{component:"fieldset",children:[c.jsx(p.FormLabel,{component:"legend",sx:{mb:1},children:"Columns"}),c.jsxs(p.RadioGroup,{value:h,onChange:b=>m(b.target.value),children:[c.jsx(p.FormControlLabel,{value:"visible",control:c.jsx(p.Radio,{size:"small"}),label:c.jsxs(p.Box,{children:[c.jsx(p.Typography,{variant:"body2",sx:{fontWeight:500},children:"Visible Columns Only"}),c.jsxs(p.Typography,{variant:"caption",color:"text.secondary",children:["Export ",n," visible columns"]})]}),sx:{mb:1,alignItems:"flex-start"}}),c.jsx(p.FormControlLabel,{value:"all",control:c.jsx(p.Radio,{size:"small"}),label:c.jsxs(p.Box,{children:[c.jsx(p.Typography,{variant:"body2",sx:{fontWeight:500},children:"All Columns"}),c.jsxs(p.Typography,{variant:"caption",color:"text.secondary",children:["Export all ",i," columns (including hidden)"]})]}),sx:{alignItems:"flex-start"}})]})]}),c.jsxs(p.Box,{sx:{pt:1},children:[c.jsx(p.Divider,{sx:{mb:2}}),c.jsxs(p.Box,{sx:{display:"flex",flexDirection:"column",gap:1},children:[c.jsxs(p.Box,{sx:{display:"flex",justifyContent:"space-between"},children:[c.jsx(p.Typography,{variant:"body2",color:"text.secondary",children:"Format:"}),c.jsx(p.Typography,{variant:"body2",sx:{fontWeight:500},children:T[o]})]}),c.jsxs(p.Box,{sx:{display:"flex",justifyContent:"space-between"},children:[c.jsx(p.Typography,{variant:"body2",color:"text.secondary",children:"Rows to export:"}),c.jsx(p.Typography,{variant:"body2",sx:{fontWeight:500},children:v.toLocaleString()})]}),c.jsxs(p.Box,{sx:{display:"flex",justifyContent:"space-between"},children:[c.jsx(p.Typography,{variant:"body2",color:"text.secondary",children:"Columns to export:"}),c.jsx(p.Typography,{variant:"body2",sx:{fontWeight:500},children:g})]})]})]})]})}),c.jsxs(p.DialogActions,{sx:{px:3,pb:2,bgcolor:"action.hover"},children:[c.jsx(p.Button,{onClick:a,variant:"outlined",color:"inherit",children:"Cancel"}),c.jsxs(p.Button,{onClick:x,variant:"contained",children:["Download ",T[o]]})]})]})}function JC({warning:e,onDismiss:t}){return c.jsx(p.Box,{sx:{position:"fixed",top:16,right:16,zIndex:50,maxWidth:448},children:c.jsxs(p.Alert,{severity:"warning",icon:c.jsx(kn,{size:20}),action:c.jsx(p.IconButton,{size:"small",onClick:t,sx:{color:"warning.main"},children:c.jsx(Et,{size:16})}),sx:{borderLeft:4,borderColor:"warning.main",boxShadow:3},children:[c.jsx(p.AlertTitle,{sx:{fontWeight:600},children:"Feature Limit Reached"}),c.jsx(p.Box,{sx:{fontSize:"0.875rem",mb:1},children:e.message}),c.jsxs(p.Box,{sx:{fontSize:"0.75rem",opacity:.9},children:["Please remove some ",e.type==="filter"?"filters":e.type==="sort"?"sort levels":"grouping levels"," before adding more."]})]})})}function ZC({error:e,onDismiss:t,autoDismiss:r=!0,autoDismissDelay:n=5e3}){S.useEffect(()=>{if(r){const o=setTimeout(()=>{t()},n);return()=>clearTimeout(o)}},[r,n,t]);const s=(()=>{switch(e.type){case"system":return{severity:"error",icon:c.jsx(gE,{size:20})};case"processing":return{severity:"warning",icon:c.jsx(kn,{size:20})};case"ui":default:return{severity:"info",icon:c.jsx(Ai,{size:20})}}})(),a=y2(e);return c.jsx(p.Box,{sx:{position:"fixed",top:16,right:16,zIndex:50,maxWidth:448},children:c.jsxs(p.Alert,{severity:s.severity,icon:s.icon,action:c.jsx(p.IconButton,{size:"small",onClick:t,sx:{color:`${s.severity}.main`},children:c.jsx(Et,{size:16})}),sx:{borderLeft:4,borderColor:`${s.severity}.main`,boxShadow:3},children:[c.jsxs(p.AlertTitle,{sx:{fontWeight:600},children:[e.context.charAt(0).toUpperCase()+e.context.slice(1)," Error"]}),c.jsx(p.Box,{sx:{fontSize:"0.875rem"},children:a}),e.details&&process.env.NODE_ENV==="development"&&c.jsx(p.Box,{component:"pre",sx:{fontSize:"0.75rem",mt:1,fontFamily:"monospace",whiteSpace:"pre-wrap",wordBreak:"break-word"},children:JSON.stringify(e.details,null,2)})]})})}class QC extends S.Component{constructor(t){super(t),this.handleReset=()=>{this.setState({hasError:!1,error:null})},this.state={hasError:!1,error:null}}static getDerivedStateFromError(t){return{hasError:!0,error:t}}componentDidCatch(t,r){console.error("[ErrorBoundary] Caught error:",t,r),this.props.onError&&this.props.onError(t,r)}render(){var t,r;return this.state.hasError?this.props.fallback?this.props.fallback:c.jsx(p.Paper,{sx:{bgcolor:"error.lighter",border:1,borderColor:"error.light",borderRadius:2,p:3,m:2},children:c.jsxs(p.Box,{sx:{display:"flex",alignItems:"flex-start",gap:1.5},children:[c.jsx(kn,{size:24,color:"error",style:{flexShrink:0,marginTop:4}}),c.jsxs(p.Box,{sx:{flex:1},children:[c.jsx(p.Typography,{variant:"h6",sx:{color:"error.dark",fontWeight:600},children:this.props.context?`${this.props.context} Error`:"Something went wrong"}),c.jsx(p.Typography,{variant:"body2",sx:{color:"error.main",mt:1},children:((t=this.state.error)==null?void 0:t.message)||"An unexpected error occurred"}),process.env.NODE_ENV==="development"&&c.jsx(p.Box,{component:"pre",sx:{mt:1.5,fontSize:"0.75rem",color:"error.dark",bgcolor:"error.lighter",p:1.5,borderRadius:1,overflow:"auto",maxHeight:160},children:(r=this.state.error)==null?void 0:r.stack}),c.jsx(p.Button,{onClick:this.handleReset,variant:"contained",color:"error",startIcon:c.jsx(GE,{size:16}),sx:{mt:2},children:"Try Again"})]})]})}):this.props.children}}function ai({children:e,feature:t,onError:r}){return c.jsx(QC,{context:t,onError:(n,i)=>{r&&r(n)},fallback:c.jsxs(p.Alert,{severity:"warning",sx:{m:1},icon:c.jsx(kn,{size:20}),children:[c.jsxs(p.AlertTitle,{children:[t," temporarily unavailable"]}),"Other features continue to work normally"]}),children:e})}function rd({reportEngine:e}){var Se,Ne;const{activeReport:t,paginatedData:r,processedData:n,tableMetrics:i,tableEngine:s,activeView:a,isDirty:o,currentTableState:f,viewChanges:u,showFilterPanel:d,setShowFilterPanel:h,filterFocusColumn:m,handleAddFilter:l,handleUpdateFilter:v,handleRemoveFilter:g,handleClearAllFilters:x,handleOpenFilterForColumn:T,handleCloseFilterPanel:b,handleClearFiltersForColumn:_,showSortPanel:k,setShowSortPanel:F,handleSort:z,handleUpdateSortStack:N,handleSortAscending:B,handleSortDescending:M,showManageViews:L,setShowManageViews:W,showCreateViewModal:y,setShowCreateViewModal:H,showEditViewModal:Q,setShowEditViewModal:J,showDeleteConfirmation:ee,setShowDeleteConfirmation:_e,editingView:Ae,deletingView:De,handleSelectView:oe,handleCreateView:ce,handleUpdateCurrentView:C,handleSaveAsNewView:j,handleRevertChanges:R,handleToggleDefault:P,handleToggleFavorite:V,handleSoftDelete:le,handleRestoreView:fe,handlePermanentDelete:ue,handleEditView:te,handleSaveEditView:Ie,handleConfirmDelete:ae,showManageColumns:Pe,setShowManageColumns:ke,handleUpdateColumnVisibility:pt,handleUpdateColumnOrder:He,handleUpdateColumnWidth:we,handleResetColumnLayout:ut,showGroupPanel:je,setShowGroupPanel:Rt,handleGroup:vt,handleToggleGroupCollapse:rt,searchQuery:kt,searchHistory:Xe,handleSearchChange:Ht,handleAddToSearchHistory:It,handleToggleSearchFavourite:Gt,handleDeleteSearchHistory:Lt,selectedRowIds:Bt,handleToggleRowSelection:qe,handleToggleAllRows:Je,handleRangeSelection:gt,handleClearSelection:Ft,currentPage:bt,pageSize:cr,paginationEngine:Yt,handlePageChange:Qe,handlePageSizeChange:pr,isExporting:Xt,showExportModal:ir,setShowExportModal:pe,showDirtyExportWarning:tr,handleExport:Ge,handleExportWithConfig:Oe,handleExportSelected:nt,handleExportAnyway:Ye,handleSaveAndExport:Tt,handleCancelExport:sr,showAuditHistory:yt,setShowAuditHistory:xt,showCreatePreset:mt,setShowCreatePreset:Te,showShareLink:he,setShowShareLink:be,generatedPreset:We,activePreset:w,handleOpenSharePreset:O,handleCreatePreset:E,handleCopyPresetLink:A,handleOpenPreset:D,handleDeletePreset:I,handleClearActivePreset:Y,isViewerRole:ne,userRole:G,featureLimitWarning:X,setFeatureLimitWarning:K,reportError:ge,setReportError:ye,handleError:Ee,updateReport:me}=e;return!t||!t.schemaLocked||!t.schema||!t.uploadedData||!t.views?null:c.jsxs(p.Box,{sx:{p:3},children:[X&&c.jsx(JC,{warning:X,onDismiss:()=>K(null)}),ge&&c.jsx(ZC,{error:ge,onDismiss:()=>ye(null)}),tr&&c.jsx(HC,{onExportAnyway:Ye,onSaveAndExport:Tt,onCancel:sr}),c.jsx(RC,{schema:t.schema,data:r,sortStack:t.sortStack,filters:t.filters,views:t.views,activeViewId:t.activeViewId,isDirty:o,isExporting:Xt,columnVisibility:t.columnVisibility||(a==null?void 0:a.snapshot.columnVisibility),columnOrder:t.columnOrder||(a==null?void 0:a.snapshot.columnOrder),columnWidths:t.columnWidths||(a==null?void 0:a.snapshot.columnWidths),grouping:t.grouping,onSort:z,onSortAscending:B,onSortDescending:M,onOpenFilters:()=>h(!0),onOpenSort:()=>F(!0),onOpenFilterForColumn:T,onSelectView:oe,onCreateView:()=>H(!0),onManageViews:()=>W(!0),onUpdateCurrentView:C,onSaveAsNewView:j,onToggleDefault:P,onToggleFavorite:V,onRestoreView:fe,onPermanentDelete:ue,onExport:Ge,onOpenColumns:()=>ke(!0),onUpdateColumnWidth:we,onUpdateColumnOrder:He,onUpdateColumnVisibility:pt,onClearFiltersForColumn:_,onResetLayout:ut,onOpenGroup:()=>Rt(!0),onToggleGroupCollapse:rt,onOpenAuditHistory:()=>xt(!0),onOpenSharePreset:O,searchQuery:kt,searchHistory:Xe,onAddToSearchHistory:It,onToggleSearchFavourite:Gt,onDeleteSearchHistory:Lt,selectedRowIds:Bt,onSearchChange:Ht,onToggleRowSelection:qe,onToggleAllRows:Je,onRangeSelection:gt,onClearSelection:Ft,onExportSelected:nt,currentPage:(Yt==null?void 0:Yt.currentPage)||bt,pageSize:(Yt==null?void 0:Yt.pageSize)||cr,onPageChange:Qe,onPageSizeChange:pr,totalRowsBeforePagination:(i==null?void 0:i.searchedRows)||n.length,isReadOnly:ne,userRole:G}),!ne&&o&&a&&c.jsx(zC,{viewName:a.name,isDefaultView:a.isDefault,changes:u,onSaveToCurrentView:a.isDefault?void 0:C,onSaveAsNewView:j,onCancel:R}),d&&c.jsx(ai,{feature:"Filters",onError:Ve=>{const ze=Hr("ui","filters",Ve);Ee(ze)},children:c.jsx(PC,{schema:t.schema,filters:t.filters??[],onAddFilter:l,onUpdateFilter:v,onRemoveFilter:g,onClearAll:x,onClose:b,focusColumn:m})}),k&&c.jsx(ai,{feature:"Sorting",onError:Ve=>{const ze=Hr("ui","sorting",Ve);Ee(ze)},children:c.jsx(jC,{schema:t.schema,sortStack:t.sortStack??[],onUpdateSortStack:N,onClose:()=>F(!1)})}),L&&c.jsx(ai,{feature:"Views",onError:Ve=>{const ze=Hr("ui","views",Ve);Ee(ze)},children:c.jsx(MC,{views:t.views,activeViewId:t.activeViewId??"",onSelectView:oe,onCreateView:()=>{W(!1),H(!0)},onEditView:te,onDeleteView:le,onRestoreView:fe,onPermanentDelete:ue,onClose:()=>W(!1)})}),y&&f&&c.jsx(Kc,{currentSnapshot:f,onSave:ce,onClose:()=>H(!1)}),Q&&Ae&&c.jsx(Kc,{currentSnapshot:Ae.snapshot,onSave:Ie,onClose:()=>{J(!1)},isEditMode:!0,initialName:Ae.name,initialDescription:Ae.description,initialIsDefault:Ae.isDefault}),ee&&De&&c.jsx(LC,{viewName:De.name,onConfirm:ae,onCancel:()=>{_e(!1)}}),Pe&&a&&c.jsx($C,{schema:t.schema,columnVisibility:t.columnVisibility||a.snapshot.columnVisibility,columnOrder:t.columnOrder||a.snapshot.columnOrder,columnWidths:t.columnWidths||a.snapshot.columnWidths,views:t.views,activeViewId:t.activeViewId,onUpdateColumnVisibility:pt,onUpdateColumnOrder:He,onUpdateColumnWidth:we,onResetLayout:ut,onSelectView:Ve=>{oe(Ve)},onSaveToCurrentView:()=>{ke(!1)},onSaveToAllViews:()=>{if(a){const Ve=t.views.map(ze=>({...ze,snapshot:{...ze.snapshot,columnVisibility:a.snapshot.columnVisibility,columnOrder:a.snapshot.columnOrder,columnWidths:a.snapshot.columnWidths}}));me(t.id,{views:Ve}),$e.success("Column configuration applied to all views")}ke(!1)},onClose:()=>ke(!1)}),je&&c.jsx(ai,{feature:"Grouping",onError:Ve=>{const ze=Hr("ui","grouping",Ve);Ee(ze)},children:c.jsx(UC,{schema:t.schema,grouping:t.grouping||null,onApply:vt,onClose:()=>Rt(!1)})}),yt&&c.jsx(GC,{auditHistory:t.auditHistory||[],onClose:()=>xt(!1)}),mt&&c.jsx(YC,{onSave:E,onClose:()=>Te(!1)}),he&&We&&c.jsx(XC,{presetName:We.preset.name,shareUrl:We.url,onCopyLink:A,onOpenPreset:D,onDeletePreset:I,onClose:()=>{be(!1)}}),w&&c.jsx(p.Box,{sx:{mt:2},children:c.jsx(KC,{presetName:w.name,onClear:Y})}),ir&&c.jsx(ai,{feature:"Export",onError:Ve=>{const ze=Hr("ui","export",Ve);Ee(ze)},children:c.jsx(qC,{totalRows:(i==null?void 0:i.totalRows)||((Se=t.uploadedData)==null?void 0:Se.length)||0,visibleRows:(i==null?void 0:i.searchedRows)||n.length,visibleColumnsCount:((Ne=s==null?void 0:s.columnEngine)==null?void 0:Ne.visibleColumns.length)||t.schema.length,totalColumnsCount:t.schema.length,hasGrouping:(i==null?void 0:i.isGrouped)||!1,onExport:Oe,onClose:()=>{pe(!1)}})})]})}function e4(){const e=Sf(),{reports:t,activeReportId:r,activeReport:n,uploadState:i,schema:s,hasSchemaConflicts:a,isModalOpen:o,setIsModalOpen:f,setActiveReportId:u,createReport:d,handleFileUpload:h,handleUploadError:m,handleRetry:l,handleConfirm:v}=e;return c.jsxs(p.Box,{sx:{minHeight:"100vh"},children:[c.jsx(c_,{onCreateReport:()=>f(!0)}),c.jsx(u_,{reports:t,activeReportId:r,onTabClick:u}),c.jsx(p.Box,{component:"main",children:t.length===0?c.jsx(Ff,{title:"No reports yet",description:"Create your first report to start analyzing your data."}):n?c.jsx(c.Fragment,{children:n.schemaLocked&&n.schema&&n.uploadedData&&n.views?c.jsx(rd,{reportEngine:e}):c.jsx(p.Box,{sx:{p:3},children:i==="preview"&&n.schema&&n.uploadedData?c.jsx(p_,{schema:n.schema,onConfirm:v,hasConflicts:a}):n.uploadError?c.jsx(g_,{error:n.uploadError,onRetry:l}):c.jsx(h_,{onFileUpload:h,onError:m,isUploading:i==="uploading"})})}):null}),c.jsx(f_,{isOpen:o,onClose:()=>f(!1),onCreate:d}),c.jsx(Wu,{position:"top-right"})]})}function t4(){return c.jsx(Do,{children:c.jsx(e4,{})})}function r4(){const e=Sf();return c.jsxs(p.Box,{sx:{minHeight:"100vh"},children:[c.jsx(p.Box,{component:"main",children:e.activeReport?c.jsx(rd,{reportEngine:e}):c.jsx(Ff,{title:"No report data",description:"This viewer requires report data to be loaded."})}),c.jsx(Wu,{position:"top-right"})]})}function n4({data:e,autoLoad:t=!0,config:r}){return c.jsx(Do,{data:e,mode:"viewer",autoLoad:t,config:r,children:c.jsx(r4,{})})}exports.URMBuilder=t4;exports.URMProvider=Do;exports.URMViewer=n4;