@zeniai/web-components 4.3.76-beta3MM → 4.3.76-beta4MM

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.
@@ -1127,7 +1127,7 @@ return jsxRuntimeExports.jsxs(Container$7D,{style:s,hasHelperText:null!=i,childr
1127
1127
  /* @__PURE__ */jsxRuntimeExports.jsxs(ButtonsWithHelperText$5,{style:a,children:[null!=u?/* @__PURE__ */jsxRuntimeExports.jsx(StyledDiv$16,{children:u}):null,
1128
1128
  /* @__PURE__ */jsxRuntimeExports.jsxs(ButtonsContainer$2,{style:c,children:[!0===n&&null!=g?/* @__PURE__ */jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[
1129
1129
  /* @__PURE__ */jsxRuntimeExports.jsx(Button$4,{"data-testid":generateDataTestId("cancel-button",t),style:g.style,variant:"outline",label:g.label,onClick:g.onClick,size:g.size??"standard",reverseSpinnerColor:g.reverseSpinnerColor,form:t,loading:g.isLoading,disabled:g.isDisabled,type:!0===g.shouldResetOnCancel?"reset":"button",prefixIcon:g.prefixIcon,suffixIcon:g.suffixIcon}),
1130
- /* @__PURE__ */jsxRuntimeExports.jsx(Box$7,{space:Space.sp3,style:d})]}):null,!0===o?/* @__PURE__ */jsxRuntimeExports.jsx(Button$4,{"data-testid":generateDataTestId("primary-button",t),style:e.style,loading:e.isLoading,variant:e.variant??"primary",label:e.label,size:e.size??"standard",form:t,type:e.type??"submit",disabled:e.isDisabled,onClick:e.onClick,prefixIcon:e.prefixIcon,suffixIcon:e.suffixIcon}):null,h??null]}),null!=i?/* @__PURE__ */jsxRuntimeExports.jsx(HelperText$3,{windowSize:f,style:r,children:i}):null]}),
1130
+ /* @__PURE__ */jsxRuntimeExports.jsx(Box$7,{space:Space.sp3,style:d})]}):null,!0===o?/* @__PURE__ */jsxRuntimeExports.jsx(Button$4,{"data-testid":generateDataTestId("primary-button",t),style:e.style,loading:e.isLoading,variant:e.variant??"primary",label:e.label,size:e.size??"standard",form:t,type:e.type??"submit",disabled:e.isDisabled,reverseSpinnerColor:e.reverseSpinnerColor,onClick:e.onClick,prefixIcon:e.prefixIcon,suffixIcon:e.suffixIcon}):null,h??null]}),null!=i?/* @__PURE__ */jsxRuntimeExports.jsx(HelperText$3,{windowSize:f,style:r,children:i}):null]}),
1131
1131
  /* @__PURE__ */jsxRuntimeExports.jsx(StyledDiv$16,{children:m})]}),x]})}const Container$7D=styled$2.div`
1132
1132
  border-top: 1px solid ${e=>e.theme.colors.grey2};
1133
1133
  padding: ${Space.sp2} ${Space.sp3};
@@ -11816,7 +11816,7 @@ return jsxRuntimeExports.jsxs(ModalContainer$h,{windowSize:a,role:"presentation"
11816
11816
  padding-top: ${e=>D$4S.ButtonContainerPaddingTop.valuePx(e.windowSize)};
11817
11817
  `,StyledDiv$X=styled$2.div``,StyledSSNCardTemplate=styled$2(SvgSsnCardFront)`
11818
11818
  transform: scale(1, 0.9);
11819
- `,BottomHeader=styled$2(H6Medium)``;function _mergeNamespaces$1(e,t){return t.forEach(function(t){t&&"string"!=typeof t&&!Array.isArray(t)&&Object.keys(t).forEach(function(n){if("default"!==n&&!(n in e)){var o=Object.getOwnPropertyDescriptor(t,n);Object.defineProperty(e,n,o.get?o:{enumerable:!0,get:function(){return t[n]}})}})}),Object.freeze(e)}function copyExifWithoutOrientation(e,t){return new Promise(function(n,o){let i;return getApp1Segment(e).then(function(e){try{return i=e,n(new Blob([t.slice(0,2),i,t.slice(2)],{type:"image/jpeg"}))}catch(r){return o(r)}},o)})}const getApp1Segment=e=>new Promise((t,n)=>{const o=new FileReader;o.addEventListener("load",({target:{result:e}})=>{const o=new DataView(e);let i=0;if(65496!==o.getUint16(i))return n("not a valid JPEG");for(i+=2;;){const r=o.getUint16(i);if(65498===r)break;const a=o.getUint16(i+2);if(65505===r&&1165519206===o.getUint32(i+4)){const r=i+10;let s;switch(o.getUint16(r)){case 18761:s=!0;break;case 19789:s=!1;break;default:return n("TIFF header contains invalid endian")}if(42!==o.getUint16(r+2,s))return n("TIFF header contains invalid version");const l=o.getUint32(r+4,s),c=r+l+2+12*o.getUint16(r+l,s);for(let e=r+l+2;e<c;e+=12)if(274==o.getUint16(e,s)){if(3!==o.getUint16(e+2,s))return n("Orientation data type is invalid");if(1!==o.getUint32(e+4,s))return n("Orientation data count is invalid");o.setUint16(e+8,1,s);break}return t(e.slice(i,i+2+a))}i+=2+a}return t(new Blob)}),o.readAsArrayBuffer(e)});var e={},t={get exports(){return e},set exports(t){e=t}},r2,i3,UZIP2;UZIP2={},t.exports=UZIP2,UZIP2.parse=function(e,t){for(var n=UZIP2.bin.readUshort,o=UZIP2.bin.readUint,i=0,r={},a=new Uint8Array(e),s=a.length-4;101010256!=o(a,s);)s--;i=s,i+=4;var l=n(a,i+=4);n(a,i+=2);var c=o(a,i+=2),d=o(a,i+=4);i+=4,i=d;for(var p=0;p<l;p++){o(a,i),i+=4,i+=4,i+=4,o(a,i+=4),c=o(a,i+=4);var u=o(a,i+=4),m=n(a,i+=4),h=n(a,i+2),g=n(a,i+4);i+=6;var x=o(a,i+=8);i+=4,i+=m+h+g,UZIP2._readLocal(a,x,r,c,u,t)}return r},UZIP2._readLocal=function(e,t,n,o,i,r){var a=UZIP2.bin.readUshort,s=UZIP2.bin.readUint;s(e,t),a(e,t+=4),a(e,t+=2);var l=a(e,t+=2);s(e,t+=2),s(e,t+=4),t+=4;var c=a(e,t+=8),d=a(e,t+=2);t+=2;var p=UZIP2.bin.readUTF8(e,t,c);if(t+=c,t+=d,r)n[p]={size:i,csize:o};else{var u=new Uint8Array(e.buffer,t);if(0==l)n[p]=new Uint8Array(u.buffer.slice(t,t+o));else{if(8!=l)throw"unknown compression method: "+l;var m=new Uint8Array(i);UZIP2.inflateRaw(u,m),n[p]=m}}},UZIP2.inflateRaw=function(e,t){return UZIP2.F.inflate(e,t)},UZIP2.inflate=function(e,t){return e[0],e[1],UZIP2.inflateRaw(new Uint8Array(e.buffer,e.byteOffset+2,e.length-6),t)},UZIP2.deflate=function(e,t){null==t&&(t={level:6});var n=0,o=new Uint8Array(50+Math.floor(1.1*e.length));o[n]=120,o[n+1]=156,n+=2,n=UZIP2.F.deflateRaw(e,o,n,t.level);var i=UZIP2.adler(e,0,e.length);return o[n+0]=i>>>24&255,o[n+1]=i>>>16&255,o[n+2]=i>>>8&255,o[n+3]=i>>>0&255,new Uint8Array(o.buffer,0,n+4)},UZIP2.deflateRaw=function(e,t){null==t&&(t={level:6});var n=new Uint8Array(50+Math.floor(1.1*e.length)),o=UZIP2.F.deflateRaw(e,n,o,t.level);return new Uint8Array(n.buffer,0,o)},UZIP2.encode=function(e,t){null==t&&(t=!1);var n=0,o=UZIP2.bin.writeUint,i=UZIP2.bin.writeUshort,r={};for(var a in e){var s=!UZIP2._noNeed(a)&&!t,l=e[a],c=UZIP2.crc.crc(l,0,l.length);r[a]={cpr:s,usize:l.length,crc:c,file:s?UZIP2.deflateRaw(l):l}}for(var a in r)n+=r[a].file.length+30+46+2*UZIP2.bin.sizeUTF8(a);n+=22;var d=new Uint8Array(n),p=0,u=[];for(var a in r){var m=r[a];u.push(p),p=UZIP2._writeHeader(d,p,a,m,0)}var h=0,g=p;for(var a in r)m=r[a],u.push(p),p=UZIP2._writeHeader(d,p,a,m,1,u[h++]);var x=p-g;return o(d,p,101010256),p+=4,i(d,p+=4,h),i(d,p+=2,h),o(d,p+=2,x),o(d,p+=4,g),p+=4,p+=2,d.buffer},UZIP2._noNeed=function(e){var t=e.split(".").pop().toLowerCase();return-1!="png,jpg,jpeg,zip".indexOf(t)},UZIP2._writeHeader=function(e,t,n,o,i,r){var a=UZIP2.bin.writeUint,s=UZIP2.bin.writeUshort,l=o.file;return a(e,t,0==i?67324752:33639248),t+=4,1==i&&(t+=2),s(e,t,20),s(e,t+=2,0),s(e,t+=2,o.cpr?8:0),a(e,t+=2,0),a(e,t+=4,o.crc),a(e,t+=4,l.length),a(e,t+=4,o.usize),s(e,t+=4,UZIP2.bin.sizeUTF8(n)),s(e,t+=2,0),t+=2,1==i&&(t+=2,t+=2,a(e,t+=6,r),t+=4),t+=UZIP2.bin.writeUTF8(e,t,n),0==i&&(e.set(l,t),t+=l.length),t},UZIP2.crc={table:function(){for(var e=new Uint32Array(256),t=0;t<256;t++){for(var n=t,o=0;o<8;o++)1&n?n=3988292384^n>>>1:n>>>=1;e[t]=n}return e}(),update:function(e,t,n,o){for(var i=0;i<o;i++)e=UZIP2.crc.table[255&(e^t[n+i])]^e>>>8;return e},crc:function(e,t,n){return 4294967295^UZIP2.crc.update(4294967295,e,t,n)}},UZIP2.adler=function(e,t,n){for(var o=1,i=0,r=t,a=t+n;r<a;){for(var s=Math.min(r+5552,a);r<s;)i+=o+=e[r++];o%=65521,i%=65521}return i<<16|o},UZIP2.bin={readUshort:function(e,t){return e[t]|e[t+1]<<8},writeUshort:function(e,t,n){e[t]=255&n,e[t+1]=n>>8&255},readUint:function(e,t){return 16777216*e[t+3]+(e[t+2]<<16|e[t+1]<<8|e[t])},writeUint:function(e,t,n){e[t]=255&n,e[t+1]=n>>8&255,e[t+2]=n>>16&255,e[t+3]=n>>24&255},readASCII:function(e,t,n){for(var o="",i=0;i<n;i++)o+=String.fromCharCode(e[t+i]);return o},writeASCII:function(e,t,n){for(var o=0;o<n.length;o++)e[t+o]=n.charCodeAt(o)},pad:function(e){return e.length<2?"0"+e:e},readUTF8:function(e,t,n){for(var o,i="",r=0;r<n;r++)i+="%"+UZIP2.bin.pad(e[t+r].toString(16));try{o=decodeURIComponent(i)}catch(a){return UZIP2.bin.readASCII(e,t,n)}return o},writeUTF8:function(e,t,n){for(var o=n.length,i=0,r=0;r<o;r++){var a=n.charCodeAt(r);if(4294967168&a)if(4294965248&a)if(4294901760&a){if(4292870144&a)throw"e";e[t+i]=240|a>>18,e[t+i+1]=128|a>>12&63,e[t+i+2]=128|a>>6&63,e[t+i+3]=128|63&a,i+=4}else e[t+i]=224|a>>12,e[t+i+1]=128|a>>6&63,e[t+i+2]=128|63&a,i+=3;else e[t+i]=192|a>>6,e[t+i+1]=128|63&a,i+=2;else e[t+i]=a,i++}return i},sizeUTF8:function(e){for(var t=e.length,n=0,o=0;o<t;o++){var i=e.charCodeAt(o);if(4294967168&i)if(4294965248&i)if(4294901760&i){if(4292870144&i)throw"e";n+=4}else n+=3;else n+=2;else n++}return n}},UZIP2.F={},UZIP2.F.deflateRaw=function(e,t,n,o){var i=[[0,0,0,0,0],[4,4,8,4,0],[4,5,16,8,0],[4,6,16,16,0],[4,10,16,32,0],[8,16,32,32,0],[8,16,128,128,0],[8,32,128,256,0],[32,128,258,1024,1],[32,258,258,4096,1]][o],r=UZIP2.F.U,a=UZIP2.F._goodIndex;UZIP2.F._hash;var s=UZIP2.F._putsE,l=0,c=n<<3,d=0,p=e.length;if(0==o){for(;l<p;)s(t,c,l+(v=Math.min(65535,p-l))==p?1:0),c=UZIP2.F._copyExact(e,l,v,t,c+8),l+=v;return c>>>3}var u=r.lits,m=r.strt,h=r.prev,g=0,x=0,f=0,y=0,S=0,C=0;for(p>2&&(m[C=UZIP2.F._hash(e,0)]=0),l=0;l<p;l++){if(S=C,l+1<p-2){C=UZIP2.F._hash(e,l+1);var $=l+1&32767;h[$]=m[C],m[C]=$}if(d<=l){(g>14e3||x>26697)&&p-l>100&&(d<l&&(u[g]=l-d,g+=2,d=l),c=UZIP2.F._writeBlock(l==p-1||d==p?1:0,u,g,y,e,f,l-f,t,c),g=x=y=0,f=l);var b=0;l<p-2&&(b=UZIP2.F._bestMatch(e,l,h,S,Math.min(i[2],p-l),i[3]));var v=b>>>16,E=65535&b;if(0!=b){E=65535&b;var w=a(v=b>>>16,r.of0);r.lhst[257+w]++;var R=a(E,r.df0);r.dhst[R]++,y+=r.exb[w]+r.dxb[R],u[g]=v<<23|l-d,u[g+1]=E<<16|w<<8|R,g+=2,d=l+v}else r.lhst[e[l]]++;x++}}for(f==l&&0!=e.length||(d<l&&(u[g]=l-d,g+=2,d=l),c=UZIP2.F._writeBlock(1,u,g,y,e,f,l-f,t,c),g=0,x=0,g=x=y=0,f=l);7&c;)c++;return c>>>3},UZIP2.F._bestMatch=function(e,t,n,o,i,r){var a=32767&t,s=n[a],l=a-s+32768&32767;if(s==a||o!=UZIP2.F._hash(e,t-l))return 0;for(var c=0,d=0,p=Math.min(32767,t);l<=p&&0!=--r&&s!=a;){if(0==c||e[t+c]==e[t+c-l]){var u=UZIP2.F._howLong(e,t,l);if(u>c){if(d=l,(c=u)>=i)break;l+2<u&&(u=l+2);for(var m=0,h=0;h<u-2;h++){var g=t-l+h+32768&32767,x=g-n[g]+32768&32767;x>m&&(m=x,s=g)}}}l+=(a=s)-(s=n[a])+32768&32767}return c<<16|d},UZIP2.F._howLong=function(e,t,n){if(e[t]!=e[t-n]||e[t+1]!=e[t+1-n]||e[t+2]!=e[t+2-n])return 0;var o=t,i=Math.min(e.length,t+258);for(t+=3;t<i&&e[t]==e[t-n];)t++;return t-o},UZIP2.F._hash=function(e,t){return(e[t]<<8|e[t+1])+(e[t+2]<<4)&65535},UZIP2.saved=0,UZIP2.F._writeBlock=function(e,t,n,o,i,r,a,s,l){var c,d,p,u,m,h,g,x,f,y=UZIP2.F.U,S=UZIP2.F._putsF,C=UZIP2.F._putsE;y.lhst[256]++,d=(c=UZIP2.F.getTrees())[0],p=c[1],u=c[2],m=c[3],h=c[4],g=c[5],x=c[6],f=c[7];var $=32+(l+3&7?8-(l+3&7):0)+(a<<3),b=o+UZIP2.F.contSize(y.fltree,y.lhst)+UZIP2.F.contSize(y.fdtree,y.dhst),v=o+UZIP2.F.contSize(y.ltree,y.lhst)+UZIP2.F.contSize(y.dtree,y.dhst);v+=14+3*g+UZIP2.F.contSize(y.itree,y.ihst)+(2*y.ihst[16]+3*y.ihst[17]+7*y.ihst[18]);for(var E=0;E<286;E++)y.lhst[E]=0;for(E=0;E<30;E++)y.dhst[E]=0;for(E=0;E<19;E++)y.ihst[E]=0;var w=$<b&&$<v?0:b<v?1:2;if(S(s,l,e),S(s,l+1,w),l+=3,0==w){for(;7&l;)l++;l=UZIP2.F._copyExact(i,r,a,s,l)}else{var R,A;if(1==w&&(R=y.fltree,A=y.fdtree),2==w){UZIP2.F.makeCodes(y.ltree,d),UZIP2.F.revCodes(y.ltree,d),UZIP2.F.makeCodes(y.dtree,p),UZIP2.F.revCodes(y.dtree,p),UZIP2.F.makeCodes(y.itree,u),UZIP2.F.revCodes(y.itree,u),R=y.ltree,A=y.dtree,C(s,l,m-257),C(s,l+=5,h-1),C(s,l+=5,g-4),l+=4;for(var j=0;j<g;j++)C(s,l+3*j,y.itree[1+(y.ordr[j]<<1)]);l+=3*g,l=UZIP2.F._codeTiny(x,y.itree,s,l),l=UZIP2.F._codeTiny(f,y.itree,s,l)}for(var T=r,I=0;I<n;I+=2){for(var k=t[I],L=k>>>23,D=T+(8388607&k);T<D;)l=UZIP2.F._writeLit(i[T++],R,s,l);if(0!=L){var _=t[I+1],P=_>>16,B=_>>8&255,M=255&_;C(s,l=UZIP2.F._writeLit(257+B,R,s,l),L-y.of0[B]),l+=y.exb[B],S(s,l=UZIP2.F._writeLit(M,A,s,l),P-y.df0[M]),l+=y.dxb[M],T+=L}}l=UZIP2.F._writeLit(256,R,s,l)}return l},UZIP2.F._copyExact=function(e,t,n,o,i){var r=i>>>3;return o[r]=n,o[r+1]=n>>>8,o[r+2]=255-o[r],o[r+3]=255-o[r+1],r+=4,o.set(new Uint8Array(e.buffer,t,n),r),i+(n+4<<3)},UZIP2.F.getTrees=function(){for(var e=UZIP2.F.U,t=UZIP2.F._hufTree(e.lhst,e.ltree,15),n=UZIP2.F._hufTree(e.dhst,e.dtree,15),o=[],i=UZIP2.F._lenCodes(e.ltree,o),r=[],a=UZIP2.F._lenCodes(e.dtree,r),s=0;s<o.length;s+=2)e.ihst[o[s]]++;for(s=0;s<r.length;s+=2)e.ihst[r[s]]++;for(var l=UZIP2.F._hufTree(e.ihst,e.itree,7),c=19;c>4&&0==e.itree[1+(e.ordr[c-1]<<1)];)c--;return[t,n,l,i,a,c,o,r]},UZIP2.F.getSecond=function(e){for(var t=[],n=0;n<e.length;n+=2)t.push(e[n+1]);return t},UZIP2.F.nonZero=function(e){for(var t="",n=0;n<e.length;n+=2)0!=e[n+1]&&(t+=(n>>1)+",");return t},UZIP2.F.contSize=function(e,t){for(var n=0,o=0;o<t.length;o++)n+=t[o]*e[1+(o<<1)];return n},UZIP2.F._codeTiny=function(e,t,n,o){for(var i=0;i<e.length;i+=2){var r=e[i],a=e[i+1];o=UZIP2.F._writeLit(r,t,n,o);var s=16==r?2:17==r?3:7;r>15&&(UZIP2.F._putsE(n,o,a,s),o+=s)}return o},UZIP2.F._lenCodes=function(e,t){for(var n=e.length;2!=n&&0==e[n-1];)n-=2;for(var o=0;o<n;o+=2){var i=e[o+1],r=o+3<n?e[o+3]:-1,a=o+5<n?e[o+5]:-1,s=0==o?-1:e[o-1];if(0==i&&r==i&&a==i){for(var l=o+5;l+2<n&&e[l+2]==i;)l+=2;(c=Math.min(l+1-o>>>1,138))<11?t.push(17,c-3):t.push(18,c-11),o+=2*c-2}else if(i==s&&r==i&&a==i){for(l=o+5;l+2<n&&e[l+2]==i;)l+=2;var c=Math.min(l+1-o>>>1,6);t.push(16,c-3),o+=2*c-2}else t.push(i,0)}return n>>>1},UZIP2.F._hufTree=function(e,t,n){var o=[],i=e.length,r=t.length,a=0;for(a=0;a<r;a+=2)t[a]=0,t[a+1]=0;for(a=0;a<i;a++)0!=e[a]&&o.push({lit:a,f:e[a]});var s=o.length,l=o.slice(0);if(0==s)return 0;if(1==s){var c=o[0].lit;return l=0==c?1:0,t[1+(c<<1)]=1,t[1+(l<<1)]=1,1}o.sort(function(e,t){return e.f-t.f});var d=o[0],p=o[1],u=0,m=1,h=2;for(o[0]={lit:-1,f:d.f+p.f,l:d,r:p,d:0};m!=s-1;)d=u!=m&&(h==s||o[u].f<o[h].f)?o[u++]:o[h++],p=u!=m&&(h==s||o[u].f<o[h].f)?o[u++]:o[h++],o[m++]={lit:-1,f:d.f+p.f,l:d,r:p};var g=UZIP2.F.setDepth(o[m-1],0);for(g>n&&(UZIP2.F.restrictDepth(l,n,g),g=n),a=0;a<s;a++)t[1+(l[a].lit<<1)]=l[a].d;return g},UZIP2.F.setDepth=function(e,t){return-1!=e.lit?(e.d=t,t):Math.max(UZIP2.F.setDepth(e.l,t+1),UZIP2.F.setDepth(e.r,t+1))},UZIP2.F.restrictDepth=function(e,t,n){var o=0,i=1<<n-t,r=0;for(e.sort(function(e,t){return t.d==e.d?e.f-t.f:t.d-e.d}),o=0;o<e.length&&e[o].d>t;o++){var a=e[o].d;e[o].d=t,r+=i-(1<<n-a)}for(r>>>=n-t;r>0;)(a=e[o].d)<t?(e[o].d++,r-=1<<t-a-1):o++;for(;o>=0;o--)e[o].d==t&&r<0&&(e[o].d--,r++);0!=r&&console.log("debt left")},UZIP2.F._goodIndex=function(e,t){var n=0;return t[16|n]<=e&&(n|=16),t[8|n]<=e&&(n|=8),t[4|n]<=e&&(n|=4),t[2|n]<=e&&(n|=2),t[1|n]<=e&&(n|=1),n},UZIP2.F._writeLit=function(e,t,n,o){return UZIP2.F._putsF(n,o,t[e<<1]),o+t[1+(e<<1)]},UZIP2.F.inflate=function(e,t){var n=Uint8Array;if(3==e[0]&&0==e[1])return t||new n(0);var o=UZIP2.F,i=o._bitsF,r=o._bitsE,a=o._decodeTiny,s=o.makeCodes,l=o.codes2map,c=o._get17,d=o.U,p=null==t;p&&(t=new n(e.length>>>2<<3));for(var u,m,h=0,g=0,x=0,f=0,y=0,S=0,C=0,$=0,b=0;0==h;)if(h=i(e,b,1),g=i(e,b+1,2),b+=3,0!=g){if(p&&(t=UZIP2.F._check(t,$+(1<<17))),1==g&&(u=d.flmap,m=d.fdmap,S=511,C=31),2==g){x=r(e,b,5)+257,f=r(e,b+5,5)+1,y=r(e,b+10,4)+4,b+=14;for(var v=0;v<38;v+=2)d.itree[v]=0,d.itree[v+1]=0;var E=1;for(v=0;v<y;v++){var w=r(e,b+3*v,3);d.itree[1+(d.ordr[v]<<1)]=w,w>E&&(E=w)}b+=3*y,s(d.itree,E),l(d.itree,E,d.imap),u=d.lmap,m=d.dmap,b=a(d.imap,(1<<E)-1,x+f,e,b,d.ttree);var R=o._copyOut(d.ttree,0,x,d.ltree);S=(1<<R)-1;var A=o._copyOut(d.ttree,x,f,d.dtree);C=(1<<A)-1,s(d.ltree,R),l(d.ltree,R,u),s(d.dtree,A),l(d.dtree,A,m)}for(;;){var j=u[c(e,b)&S];b+=15&j;var T=j>>>4;if(T>>>8==0)t[$++]=T;else{if(256==T)break;var I=$+T-254;if(T>264){var k=d.ldef[T-257];I=$+(k>>>3)+r(e,b,7&k),b+=7&k}var L=m[c(e,b)&C];b+=15&L;var D=L>>>4,_=d.ddef[D],P=(_>>>4)+i(e,b,15&_);for(b+=15&_,p&&(t=UZIP2.F._check(t,$+(1<<17)));$<I;)t[$]=t[$++-P],t[$]=t[$++-P],t[$]=t[$++-P],t[$]=t[$++-P];$=I}}}else{7&b&&(b+=8-(7&b));var B=4+(b>>>3),M=e[B-4]|e[B-3]<<8;p&&(t=UZIP2.F._check(t,$+M)),t.set(new n(e.buffer,e.byteOffset+B,M),$),b=B+M<<3,$+=M}return t.length==$?t:t.slice(0,$)},UZIP2.F._check=function(e,t){var n=e.length;if(t<=n)return e;var o=new Uint8Array(Math.max(n<<1,t));return o.set(e,0),o},UZIP2.F._decodeTiny=function(e,t,n,o,i,r){for(var a=UZIP2.F._bitsE,s=UZIP2.F._get17,l=0;l<n;){var c=e[s(o,i)&t];i+=15&c;var d=c>>>4;if(d<=15)r[l]=d,l++;else{var p=0,u=0;16==d?(u=3+a(o,i,2),i+=2,p=r[l-1]):17==d?(u=3+a(o,i,3),i+=3):18==d&&(u=11+a(o,i,7),i+=7);for(var m=l+u;l<m;)r[l]=p,l++}}return i},UZIP2.F._copyOut=function(e,t,n,o){for(var i=0,r=0,a=o.length>>>1;r<n;){var s=e[r+t];o[r<<1]=0,o[1+(r<<1)]=s,s>i&&(i=s),r++}for(;r<a;)o[r<<1]=0,o[1+(r<<1)]=0,r++;return i},UZIP2.F.makeCodes=function(e,t){for(var n,o,i,r,a=UZIP2.F.U,s=e.length,l=a.bl_count,c=0;c<=t;c++)l[c]=0;for(c=1;c<s;c+=2)l[e[c]]++;var d=a.next_code;for(n=0,l[0]=0,o=1;o<=t;o++)n=n+l[o-1]<<1,d[o]=n;for(i=0;i<s;i+=2)0!=(r=e[i+1])&&(e[i]=d[r],d[r]++)},UZIP2.F.codes2map=function(e,t,n){for(var o=e.length,i=UZIP2.F.U.rev15,r=0;r<o;r+=2)if(0!=e[r+1])for(var a=r>>1,s=e[r+1],l=a<<4|s,c=t-s,d=e[r]<<c,p=d+(1<<c);d!=p;)n[i[d]>>>15-t]=l,d++},UZIP2.F.revCodes=function(e,t){for(var n=UZIP2.F.U.rev15,o=15-t,i=0;i<e.length;i+=2){var r=e[i]<<t-e[i+1];e[i]=n[r]>>>o}},UZIP2.F._putsE=function(e,t,n){n<<=7&t;var o=t>>>3;e[o]|=n,e[o+1]|=n>>>8},UZIP2.F._putsF=function(e,t,n){n<<=7&t;var o=t>>>3;e[o]|=n,e[o+1]|=n>>>8,e[o+2]|=n>>>16},UZIP2.F._bitsE=function(e,t,n){return(e[t>>>3]|e[1+(t>>>3)]<<8)>>>(7&t)&(1<<n)-1},UZIP2.F._bitsF=function(e,t,n){return(e[t>>>3]|e[1+(t>>>3)]<<8|e[2+(t>>>3)]<<16)>>>(7&t)&(1<<n)-1},UZIP2.F._get17=function(e,t){return(e[t>>>3]|e[1+(t>>>3)]<<8|e[2+(t>>>3)]<<16)>>>(7&t)},UZIP2.F._get25=function(e,t){return(e[t>>>3]|e[1+(t>>>3)]<<8|e[2+(t>>>3)]<<16|e[3+(t>>>3)]<<24)>>>(7&t)},UZIP2.F.U=(r2=Uint16Array,i3=Uint32Array,{next_code:new r2(16),bl_count:new r2(16),ordr:[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],of0:[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,999,999,999],exb:[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0],ldef:new r2(32),df0:[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,65535,65535],dxb:[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0],ddef:new i3(32),flmap:new r2(512),fltree:[],fdmap:new r2(32),fdtree:[],lmap:new r2(32768),ltree:[],ttree:[],dmap:new r2(32768),dtree:[],imap:new r2(512),itree:[],rev15:new r2(32768),lhst:new i3(286),dhst:new i3(30),ihst:new i3(19),lits:new i3(15e3),strt:new r2(65536),prev:new r2(32768)}),function(){for(var e=UZIP2.F.U,t=0;t<32768;t++){var n=t;n=(4278255360&(n=(4042322160&(n=(3435973836&(n=(2863311530&n)>>>1|(1431655765&n)<<1))>>>2|(858993459&n)<<2))>>>4|(252645135&n)<<4))>>>8|(16711935&n)<<8,e.rev15[t]=(n>>>16|n<<16)>>>17}function o(e,t,n){for(;0!=t--;)e.push(0,n)}for(t=0;t<32;t++)e.ldef[t]=e.of0[t]<<3|e.exb[t],e.ddef[t]=e.df0[t]<<4|e.dxb[t];o(e.fltree,144,8),o(e.fltree,112,9),o(e.fltree,24,7),o(e.fltree,8,8),UZIP2.F.makeCodes(e.fltree,9),UZIP2.F.codes2map(e.fltree,9,e.flmap),UZIP2.F.revCodes(e.fltree,9),o(e.fdtree,32,5),UZIP2.F.makeCodes(e.fdtree,5),UZIP2.F.codes2map(e.fdtree,5,e.fdmap),UZIP2.F.revCodes(e.fdtree,5),o(e.itree,19,0),o(e.ltree,286,0),o(e.dtree,30,0),o(e.ttree,320,0)}();var UZIP=_mergeNamespaces$1({__proto__:null,default:e},[e]);const UPNG=function(){var e={nextZero(e,t){for(;0!=e[t];)t++;return t},readUshort:(e,t)=>e[t]<<8|e[t+1],writeUshort(e,t,n){e[t]=n>>8&255,e[t+1]=255&n},readUint:(e,t)=>16777216*e[t]+(e[t+1]<<16|e[t+2]<<8|e[t+3]),writeUint(e,t,n){e[t]=n>>24&255,e[t+1]=n>>16&255,e[t+2]=n>>8&255,e[t+3]=255&n},readASCII(e,t,n){let o="";for(let i=0;i<n;i++)o+=String.fromCharCode(e[t+i]);return o},writeASCII(e,t,n){for(let o=0;o<n.length;o++)e[t+o]=n.charCodeAt(o)},readBytes(e,t,n){const o=[];for(let i=0;i<n;i++)o.push(e[t+i]);return o},pad:e=>e.length<2?`0${e}`:e,readUTF8(t,n,o){let i,r="";for(let s=0;s<o;s++)r+=`%${e.pad(t[n+s].toString(16))}`;try{i=decodeURIComponent(r)}catch(a){return e.readASCII(t,n,o)}return i}};function t(t,n,o,i){const a=n*o,s=r(i),l=Math.ceil(n*s/8),c=new Uint8Array(4*a),d=new Uint32Array(c.buffer),{ctype:p}=i,{depth:u}=i,m=e.readUshort;if(6==p){const e=a<<2;if(8==u)for(var h=0;h<e;h+=4)c[h]=t[h],c[h+1]=t[h+1],c[h+2]=t[h+2],c[h+3]=t[h+3];if(16==u)for(h=0;h<e;h++)c[h]=t[h<<1]}else if(2==p){const e=i.tabs.tRNS;if(null==e){if(8==u)for(h=0;h<a;h++){var g=3*h;d[h]=255<<24|t[g+2]<<16|t[g+1]<<8|t[g]}if(16==u)for(h=0;h<a;h++)g=6*h,d[h]=255<<24|t[g+4]<<16|t[g+2]<<8|t[g]}else{var x=e[0];const n=e[1],o=e[2];if(8==u)for(h=0;h<a;h++){var f=h<<2;g=3*h,d[h]=255<<24|t[g+2]<<16|t[g+1]<<8|t[g],t[g]==x&&t[g+1]==n&&t[g+2]==o&&(c[f+3]=0)}if(16==u)for(h=0;h<a;h++)f=h<<2,g=6*h,d[h]=255<<24|t[g+4]<<16|t[g+2]<<8|t[g],m(t,g)==x&&m(t,g+2)==n&&m(t,g+4)==o&&(c[f+3]=0)}}else if(3==p){const e=i.tabs.PLTE,r=i.tabs.tRNS,s=r?r.length:0;if(1==u)for(var y=0;y<o;y++){var S=y*l,C=y*n;for(h=0;h<n;h++){f=C+h<<2;var $=3*(b=t[S+(h>>3)]>>7-(7&h)&1);c[f]=e[$],c[f+1]=e[$+1],c[f+2]=e[$+2],c[f+3]=b<s?r[b]:255}}if(2==u)for(y=0;y<o;y++)for(S=y*l,C=y*n,h=0;h<n;h++)f=C+h<<2,$=3*(b=t[S+(h>>2)]>>6-((3&h)<<1)&3),c[f]=e[$],c[f+1]=e[$+1],c[f+2]=e[$+2],c[f+3]=b<s?r[b]:255;if(4==u)for(y=0;y<o;y++)for(S=y*l,C=y*n,h=0;h<n;h++)f=C+h<<2,$=3*(b=t[S+(h>>1)]>>4-((1&h)<<2)&15),c[f]=e[$],c[f+1]=e[$+1],c[f+2]=e[$+2],c[f+3]=b<s?r[b]:255;if(8==u)for(h=0;h<a;h++){var b;f=h<<2,$=3*(b=t[h]),c[f]=e[$],c[f+1]=e[$+1],c[f+2]=e[$+2],c[f+3]=b<s?r[b]:255}}else if(4==p){if(8==u)for(h=0;h<a;h++){f=h<<2;var v=t[E=h<<1];c[f]=v,c[f+1]=v,c[f+2]=v,c[f+3]=t[E+1]}if(16==u)for(h=0;h<a;h++){var E;f=h<<2,v=t[E=h<<2],c[f]=v,c[f+1]=v,c[f+2]=v,c[f+3]=t[E+2]}}else if(0==p)for(x=i.tabs.tRNS?i.tabs.tRNS:-1,y=0;y<o;y++){const e=y*l,o=y*n;if(1==u)for(var w=0;w<n;w++){var R=(v=255*(t[e+(w>>>3)]>>>7-(7&w)&1))==255*x?0:255;d[o+w]=R<<24|v<<16|v<<8|v}else if(2==u)for(w=0;w<n;w++)R=(v=85*(t[e+(w>>>2)]>>>6-((3&w)<<1)&3))==85*x?0:255,d[o+w]=R<<24|v<<16|v<<8|v;else if(4==u)for(w=0;w<n;w++)R=(v=17*(t[e+(w>>>1)]>>>4-((1&w)<<2)&15))==17*x?0:255,d[o+w]=R<<24|v<<16|v<<8|v;else if(8==u)for(w=0;w<n;w++)R=(v=t[e+w])==x?0:255,d[o+w]=R<<24|v<<16|v<<8|v;else if(16==u)for(w=0;w<n;w++)v=t[e+(w<<1)],R=m(t,e+(w<<1))==x?0:255,d[o+w]=R<<24|v<<16|v<<8|v}return c}function n(e,t,n,s){const l=r(e),c=Math.ceil(n*l/8),d=new Uint8Array((c+1+e.interlace)*s);return t=e.tabs.CgBI?i(t,d):o(t,d),0==e.interlace?t=a(t,e,0,n,s):1==e.interlace&&(t=function(e,t){const n=t.width,o=t.height,i=r(t),s=i>>3,l=Math.ceil(n*i/8),c=new Uint8Array(o*l);let d=0;const p=[0,0,4,0,2,0,1],u=[0,4,0,2,0,1,0],m=[8,8,8,4,4,2,2],h=[8,8,4,4,2,2,1];let g=0;for(;g<7;){const r=m[g],f=h[g];let y=0,S=0,C=p[g];for(;C<o;)C+=r,S++;let $=u[g];for(;$<n;)$+=f,y++;const b=Math.ceil(y*i/8);a(e,t,d,y,S);let v=0,E=p[g];for(;E<o;){let t=u[g],o=d+v*b<<3;for(;t<n;){var x;if(1==i&&(x=(x=e[o>>3])>>7-(7&o)&1,c[E*l+(t>>3)]|=x<<7-(7&t)),2==i&&(x=(x=e[o>>3])>>6-(7&o)&3,c[E*l+(t>>2)]|=x<<6-((3&t)<<1)),4==i&&(x=(x=e[o>>3])>>4-(7&o)&15,c[E*l+(t>>1)]|=x<<4-((1&t)<<2)),i>=8){const n=E*l+t*s;for(let t=0;t<s;t++)c[n+t]=e[(o>>3)+t]}o+=i,t+=f}v++,E+=r}y*S!=0&&(d+=S*(1+b)),g+=1}return c}(t,e)),t}function o(e,t){return i(new Uint8Array(e.buffer,2,e.length-6),t)}var i=function(){const e={H:{}};return e.H.N=function(t,n){const o=Uint8Array;let i,r,a=0,s=0,l=0,c=0,d=0,p=0,u=0,m=0,h=0;if(3==t[0]&&0==t[1])return n||new o(0);const g=e.H,x=g.b,f=g.e,y=g.R,S=g.n,C=g.A,$=g.Z,b=g.m,v=null==n;for(v&&(n=new o(t.length>>>2<<5));0==a;)if(a=x(t,h,1),s=x(t,h+1,2),h+=3,0!=s){if(v&&(n=e.H.W(n,m+(1<<17))),1==s&&(i=b.J,r=b.h,p=511,u=31),2==s){l=f(t,h,5)+257,c=f(t,h+5,5)+1,d=f(t,h+10,4)+4,h+=14;let e=1;for(var E=0;E<38;E+=2)b.Q[E]=0,b.Q[E+1]=0;for(E=0;E<d;E++){const n=f(t,h+3*E,3);b.Q[1+(b.X[E]<<1)]=n,n>e&&(e=n)}h+=3*d,S(b.Q,e),C(b.Q,e,b.u),i=b.w,r=b.d,h=y(b.u,(1<<e)-1,l+c,t,h,b.v);const n=g.V(b.v,0,l,b.C);p=(1<<n)-1;const o=g.V(b.v,l,c,b.D);u=(1<<o)-1,S(b.C,n),C(b.C,n,i),S(b.D,o),C(b.D,o,r)}for(;;){const e=i[$(t,h)&p];h+=15&e;const o=e>>>4;if(o>>>8==0)n[m++]=o;else{if(256==o)break;{let e=m+o-254;if(o>264){const n=b.q[o-257];e=m+(n>>>3)+f(t,h,7&n),h+=7&n}const i=r[$(t,h)&u];h+=15&i;const a=i>>>4,s=b.c[a],l=(s>>>4)+x(t,h,15&s);for(h+=15&s;m<e;)n[m]=n[m++-l],n[m]=n[m++-l],n[m]=n[m++-l],n[m]=n[m++-l];m=e}}}}else{7&h&&(h+=8-(7&h));const i=4+(h>>>3),r=t[i-4]|t[i-3]<<8;v&&(n=e.H.W(n,m+r)),n.set(new o(t.buffer,t.byteOffset+i,r),m),h=i+r<<3,m+=r}return n.length==m?n:n.slice(0,m)},e.H.W=function(e,t){const n=e.length;if(t<=n)return e;const o=new Uint8Array(n<<1);return o.set(e,0),o},e.H.R=function(t,n,o,i,r,a){const s=e.H.e,l=e.H.Z;let c=0;for(;c<o;){const e=t[l(i,r)&n];r+=15&e;const o=e>>>4;if(o<=15)a[c]=o,c++;else{let e=0,t=0;16==o?(t=3+s(i,r,2),r+=2,e=a[c-1]):17==o?(t=3+s(i,r,3),r+=3):18==o&&(t=11+s(i,r,7),r+=7);const n=c+t;for(;c<n;)a[c]=e,c++}}return r},e.H.V=function(e,t,n,o){let i=0,r=0;const a=o.length>>>1;for(;r<n;){const n=e[r+t];o[r<<1]=0,o[1+(r<<1)]=n,n>i&&(i=n),r++}for(;r<a;)o[r<<1]=0,o[1+(r<<1)]=0,r++;return i},e.H.n=function(t,n){const o=e.H.m,i=t.length;let r,a,s,l;const c=o.j;for(var d=0;d<=n;d++)c[d]=0;for(d=1;d<i;d+=2)c[t[d]]++;const p=o.K;for(r=0,c[0]=0,a=1;a<=n;a++)r=r+c[a-1]<<1,p[a]=r;for(s=0;s<i;s+=2)l=t[s+1],0!=l&&(t[s]=p[l],p[l]++)},e.H.A=function(t,n,o){const i=t.length,r=e.H.m.r;for(let e=0;e<i;e+=2)if(0!=t[e+1]){const i=e>>1,a=t[e+1],s=i<<4|a,l=n-a;let c=t[e]<<l;const d=c+(1<<l);for(;c!=d;)o[r[c]>>>15-n]=s,c++}},e.H.l=function(t,n){const o=e.H.m.r,i=15-n;for(let e=0;e<t.length;e+=2){const r=t[e]<<n-t[e+1];t[e]=o[r]>>>i}},e.H.M=function(e,t,n){n<<=7&t;const o=t>>>3;e[o]|=n,e[o+1]|=n>>>8},e.H.I=function(e,t,n){n<<=7&t;const o=t>>>3;e[o]|=n,e[o+1]|=n>>>8,e[o+2]|=n>>>16},e.H.e=function(e,t,n){return(e[t>>>3]|e[1+(t>>>3)]<<8)>>>(7&t)&(1<<n)-1},e.H.b=function(e,t,n){return(e[t>>>3]|e[1+(t>>>3)]<<8|e[2+(t>>>3)]<<16)>>>(7&t)&(1<<n)-1},e.H.Z=function(e,t){return(e[t>>>3]|e[1+(t>>>3)]<<8|e[2+(t>>>3)]<<16)>>>(7&t)},e.H.i=function(e,t){return(e[t>>>3]|e[1+(t>>>3)]<<8|e[2+(t>>>3)]<<16|e[3+(t>>>3)]<<24)>>>(7&t)},e.H.m=function(){const e=Uint16Array,t=Uint32Array;return{K:new e(16),j:new e(16),X:[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],S:[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,999,999,999],T:[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0],q:new e(32),p:[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,65535,65535],z:[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0],c:new t(32),J:new e(512),_:[],h:new e(32),$:[],w:new e(32768),C:[],v:[],d:new e(32768),D:[],u:new e(512),Q:[],r:new e(32768),s:new t(286),Y:new t(30),a:new t(19),t:new t(15e3),k:new e(65536),g:new e(32768)}}(),function(){const t=e.H.m;for(var n=0;n<32768;n++){let e=n;e=(2863311530&e)>>>1|(1431655765&e)<<1,e=(3435973836&e)>>>2|(858993459&e)<<2,e=(4042322160&e)>>>4|(252645135&e)<<4,e=(4278255360&e)>>>8|(16711935&e)<<8,t.r[n]=(e>>>16|e<<16)>>>17}function o(e,t,n){for(;0!=t--;)e.push(0,n)}for(n=0;n<32;n++)t.q[n]=t.S[n]<<3|t.T[n],t.c[n]=t.p[n]<<4|t.z[n];o(t._,144,8),o(t._,112,9),o(t._,24,7),o(t._,8,8),e.H.n(t._,9),e.H.A(t._,9,t.J),e.H.l(t._,9),o(t.$,32,5),e.H.n(t.$,5),e.H.A(t.$,5,t.h),e.H.l(t.$,5),o(t.Q,19,0),o(t.C,286,0),o(t.D,30,0),o(t.v,320,0)}(),e.H.N}();function r(e){return[1,null,3,1,2,null,4][e.ctype]*e.depth}function a(e,t,n,o,i){let a=r(t);const l=Math.ceil(o*a/8);let c,d;a=Math.ceil(a/8);let p=e[n],u=0;if(p>1&&(e[n]=[0,0,1][p-2]),3==p)for(u=a;u<l;u++)e[u+1]=e[u+1]+(e[u+1-a]>>>1)&255;for(let r=0;r<i;r++)if(c=n+r*l,d=c+r+1,p=e[d-1],u=0,0==p)for(;u<l;u++)e[c+u]=e[d+u];else if(1==p){for(;u<a;u++)e[c+u]=e[d+u];for(;u<l;u++)e[c+u]=e[d+u]+e[c+u-a]}else if(2==p)for(;u<l;u++)e[c+u]=e[d+u]+e[c+u-l];else if(3==p){for(;u<a;u++)e[c+u]=e[d+u]+(e[c+u-l]>>>1);for(;u<l;u++)e[c+u]=e[d+u]+(e[c+u-l]+e[c+u-a]>>>1)}else{for(;u<a;u++)e[c+u]=e[d+u]+s(0,e[c+u-l],0);for(;u<l;u++)e[c+u]=e[d+u]+s(e[c+u-a],e[c+u-l],e[c+u-a-l])}return e}function s(e,t,n){const o=e+t-n,i=o-e,r=o-t,a=o-n;return i*i<=r*r&&i*i<=a*a?e:r*r<=a*a?t:n}function l(t,n,o){o.width=e.readUint(t,n),n+=4,o.height=e.readUint(t,n),n+=4,o.depth=t[n],n++,o.ctype=t[n],n++,o.compress=t[n],n++,o.filter=t[n],n++,o.interlace=t[n],n++}function c(e,t,n,o,i,r,a,s,l){const c=Math.min(t,i),d=Math.min(n,r);let p=0,u=0;for(let $=0;$<d;$++)for(let n=0;n<c;n++)if(a>=0&&s>=0?(p=$*t+n<<2,u=(s+$)*i+a+n<<2):(p=(-s+$)*t-a+n<<2,u=$*i+n<<2),0==l)o[u]=e[p],o[u+1]=e[p+1],o[u+2]=e[p+2],o[u+3]=e[p+3];else if(1==l){var m=e[p+3]*(1/255),h=e[p]*m,g=e[p+1]*m,x=e[p+2]*m,f=o[u+3]*(1/255),y=o[u]*f,S=o[u+1]*f,C=o[u+2]*f;const t=1-m,n=m+f*t,i=0==n?0:1/n;o[u+3]=255*n,o[u+0]=(h+y*t)*i,o[u+1]=(g+S*t)*i,o[u+2]=(x+C*t)*i}else if(2==l)m=e[p+3],h=e[p],g=e[p+1],x=e[p+2],f=o[u+3],y=o[u],S=o[u+1],C=o[u+2],m==f&&h==y&&g==S&&x==C?(o[u]=0,o[u+1]=0,o[u+2]=0,o[u+3]=0):(o[u]=h,o[u+1]=g,o[u+2]=x,o[u+3]=m);else if(3==l){if(m=e[p+3],h=e[p],g=e[p+1],x=e[p+2],f=o[u+3],y=o[u],S=o[u+1],C=o[u+2],m==f&&h==y&&g==S&&x==C)continue;if(m<220&&f>20)return!1}return!0}return{decode:function(t){const r=new Uint8Array(t);let a=8;const s=e,c=s.readUshort,d=s.readUint,p={tabs:{},frames:[]},u=new Uint8Array(r.length);let m,h=0,g=0;const x=[137,80,78,71,13,10,26,10];for(var f=0;f<8;f++)if(r[f]!=x[f])throw"The input is not a PNG file!";for(;a<r.length;){const e=s.readUint(r,a);a+=4;const t=s.readASCII(r,a,4);if(a+=4,"IHDR"==t)l(r,a,p);else if("iCCP"==t){for(var y=a;0!=r[y];)y++;s.readASCII(r,a,y-a),r[y+1];const n=r.slice(y+2,a+e);let l=null;try{l=o(n)}catch(w){l=i(n)}p.tabs[t]=l}else if("CgBI"==t)p.tabs[t]=r.slice(a,a+4);else if("IDAT"==t){for(f=0;f<e;f++)u[h+f]=r[a+f];h+=e}else if("acTL"==t)p.tabs[t]={num_frames:d(r,a),num_plays:d(r,a+4)},m=new Uint8Array(r.length);else if("fcTL"==t){0!=g&&((E=p.frames[p.frames.length-1]).data=n(p,m.slice(0,g),E.rect.width,E.rect.height),g=0);const e={x:d(r,a+12),y:d(r,a+16),width:d(r,a+4),height:d(r,a+8)};let t=c(r,a+22);t=c(r,a+20)/(0==t?100:t);const o={rect:e,delay:Math.round(1e3*t),dispose:r[a+24],blend:r[a+25]};p.frames.push(o)}else if("fdAT"==t){for(f=0;f<e-4;f++)m[g+f]=r[a+f+4];g+=e-4}else if("pHYs"==t)p.tabs[t]=[s.readUint(r,a),s.readUint(r,a+4),r[a+8]];else if("cHRM"==t)for(p.tabs[t]=[],f=0;f<8;f++)p.tabs[t].push(s.readUint(r,a+4*f));else if("tEXt"==t||"zTXt"==t){null==p.tabs[t]&&(p.tabs[t]={});var S=s.nextZero(r,a),C=s.readASCII(r,a,S-a),$=a+e-S-1;if("tEXt"==t)v=s.readASCII(r,S+1,$);else{var b=o(r.slice(S+2,S+2+$));v=s.readUTF8(b,0,b.length)}p.tabs[t][C]=v}else if("iTXt"==t){null==p.tabs[t]&&(p.tabs[t]={}),S=0,y=a,S=s.nextZero(r,y),C=s.readASCII(r,y,S-y);const n=r[y=S+1];var v;r[y+1],y+=2,S=s.nextZero(r,y),s.readASCII(r,y,S-y),y=S+1,S=s.nextZero(r,y),s.readUTF8(r,y,S-y),$=e-((y=S+1)-a),0==n?v=s.readUTF8(r,y,$):(b=o(r.slice(y,y+$)),v=s.readUTF8(b,0,b.length)),p.tabs[t][C]=v}else if("PLTE"==t)p.tabs[t]=s.readBytes(r,a,e);else if("hIST"==t){const e=p.tabs.PLTE.length/3;for(p.tabs[t]=[],f=0;f<e;f++)p.tabs[t].push(c(r,a+2*f))}else if("tRNS"==t)3==p.ctype?p.tabs[t]=s.readBytes(r,a,e):0==p.ctype?p.tabs[t]=c(r,a):2==p.ctype&&(p.tabs[t]=[c(r,a),c(r,a+2),c(r,a+4)]);else if("gAMA"==t)p.tabs[t]=s.readUint(r,a)/1e5;else if("sRGB"==t)p.tabs[t]=r[a];else if("bKGD"==t)0==p.ctype||4==p.ctype?p.tabs[t]=[c(r,a)]:2==p.ctype||6==p.ctype?p.tabs[t]=[c(r,a),c(r,a+2),c(r,a+4)]:3==p.ctype&&(p.tabs[t]=r[a]);else if("IEND"==t)break;a+=e,s.readUint(r,a),a+=4}var E;return 0!=g&&((E=p.frames[p.frames.length-1]).data=n(p,m.slice(0,g),E.rect.width,E.rect.height)),p.data=n(p,u,p.width,p.height),delete p.compress,delete p.interlace,delete p.filter,p},toRGBA8:function(e){const n=e.width,o=e.height;if(null==e.tabs.acTL)return[t(e.data,n,o,e).buffer];const i=[];null==e.frames[0].data&&(e.frames[0].data=e.data);const r=n*o*4,a=new Uint8Array(r),s=new Uint8Array(r),l=new Uint8Array(r);for(let p=0;p<e.frames.length;p++){const u=e.frames[p],m=u.rect.x,h=u.rect.y,g=u.rect.width,x=u.rect.height,f=t(u.data,g,x,e);if(0!=p)for(var d=0;d<r;d++)l[d]=a[d];if(0==u.blend?c(f,g,x,a,n,o,m,h,0):1==u.blend&&c(f,g,x,a,n,o,m,h,1),i.push(a.buffer.slice(0)),0==u.dispose);else if(1==u.dispose)c(s,g,x,a,n,o,m,h,0);else if(2==u.dispose)for(d=0;d<r;d++)a[d]=l[d]}return i},_paeth:s,_copyTile:c,_bin:e}}();!function(){const{_copyTile:e}=UPNG,{_bin:t}=UPNG,n=UPNG._paeth;var o={table:function(){const e=new Uint32Array(256);for(let t=0;t<256;t++){let n=t;for(let e=0;e<8;e++)1&n?n=3988292384^n>>>1:n>>>=1;e[t]=n}return e}(),update(e,t,n,i){for(let r=0;r<i;r++)e=o.table[255&(e^t[n+r])]^e>>>8;return e},crc:(e,t,n)=>4294967295^o.update(4294967295,e,t,n)};function i(e,t,n,o){t[n]+=e[0]*o>>4,t[n+1]+=e[1]*o>>4,t[n+2]+=e[2]*o>>4,t[n+3]+=e[3]*o>>4}function r(e){return Math.max(0,Math.min(255,e))}function a(e,t){const n=e[0]-t[0],o=e[1]-t[1],i=e[2]-t[2],r=e[3]-t[3];return n*n+o*o+i*i+r*r}function s(e,t,n,o,s,l,c){null==c&&(c=1);const d=o.length,p=[];for(var u=0;u<d;u++){const e=o[u];p.push([e>>>0&255,e>>>8&255,e>>>16&255,e>>>24&255])}for(u=0;u<d;u++){let e=4294967295;for(var m=0,h=0;h<d;h++){var g=a(p[u],p[h]);h!=u&&g<e&&(e=g,m=h)}}const x=new Uint32Array(s.buffer),f=new Int16Array(t*n*4),y=[0,8,2,10,12,4,14,6,3,11,1,9,15,7,13,5];for(u=0;u<y.length;u++)y[u]=255*((y[u]+.5)/16-.5);for(let C=0;C<n;C++)for(let s=0;s<t;s++){var S;u=4*(C*t+s),2!=c?S=[r(e[u]+f[u]),r(e[u+1]+f[u+1]),r(e[u+2]+f[u+2]),r(e[u+3]+f[u+3])]:(g=y[4*(3&C)+(3&s)],S=[r(e[u]+g),r(e[u+1]+g),r(e[u+2]+g),r(e[u+3]+g)]),m=0;let $=16777215;for(h=0;h<d;h++){const e=a(S,p[h]);e<$&&($=e,m=h)}const b=p[m],v=[S[0]-b[0],S[1]-b[1],S[2]-b[2],S[3]-b[3]];1==c&&(s!=t-1&&i(v,f,u+4,7),C!=n-1&&(0!=s&&i(v,f,u+4*t-4,3),i(v,f,u+4*t,5),s!=t-1&&i(v,f,u+4*t+4,1))),l[u>>2]=m,x[u>>2]=o[m]}}function l(e,n,i,r,a){null==a&&(a={});const{crc:s}=o,l=t.writeUint,c=t.writeUshort,d=t.writeASCII;let p=8;const u=e.frames.length>1;let m,h=!1,g=33+(u?20:0);if(null!=a.sRGB&&(g+=13),null!=a.pHYs&&(g+=21),null!=a.iCCP&&(m=pako.deflate(a.iCCP),g+=21+m.length+4),3==e.ctype){for(var x=e.plte.length,f=0;f<x;f++)e.plte[f]>>>24!=255&&(h=!0);g+=8+3*x+4+(h?8+1*x+4:0)}for(var y=0;y<e.frames.length;y++)u&&(g+=38),g+=(b=e.frames[y]).cimg.length+12,0!=y&&(g+=4);g+=12;const S=new Uint8Array(g),C=[137,80,78,71,13,10,26,10];for(f=0;f<8;f++)S[f]=C[f];if(l(S,p,13),p+=4,d(S,p,"IHDR"),p+=4,l(S,p,n),p+=4,l(S,p,i),p+=4,S[p]=e.depth,p++,S[p]=e.ctype,p++,S[p]=0,p++,S[p]=0,p++,S[p]=0,p++,l(S,p,s(S,p-17,17)),p+=4,null!=a.sRGB&&(l(S,p,1),p+=4,d(S,p,"sRGB"),p+=4,S[p]=a.sRGB,p++,l(S,p,s(S,p-5,5)),p+=4),null!=a.iCCP){const e=13+m.length;l(S,p,e),p+=4,d(S,p,"iCCP"),p+=4,d(S,p,"ICC profile"),p+=11,p+=2,S.set(m,p),p+=m.length,l(S,p,s(S,p-(e+4),e+4)),p+=4}if(null!=a.pHYs&&(l(S,p,9),p+=4,d(S,p,"pHYs"),p+=4,l(S,p,a.pHYs[0]),p+=4,l(S,p,a.pHYs[1]),p+=4,S[p]=a.pHYs[2],p++,l(S,p,s(S,p-13,13)),p+=4),u&&(l(S,p,8),p+=4,d(S,p,"acTL"),p+=4,l(S,p,e.frames.length),p+=4,l(S,p,null!=a.loop?a.loop:0),p+=4,l(S,p,s(S,p-12,12)),p+=4),3==e.ctype){for(l(S,p,3*(x=e.plte.length)),p+=4,d(S,p,"PLTE"),p+=4,f=0;f<x;f++){const t=3*f,n=e.plte[f],o=255&n,i=n>>>8&255,r=n>>>16&255;S[p+t+0]=o,S[p+t+1]=i,S[p+t+2]=r}if(p+=3*x,l(S,p,s(S,p-3*x-4,3*x+4)),p+=4,h){for(l(S,p,x),p+=4,d(S,p,"tRNS"),p+=4,f=0;f<x;f++)S[p+f]=e.plte[f]>>>24&255;p+=x,l(S,p,s(S,p-x-4,x+4)),p+=4}}let $=0;for(y=0;y<e.frames.length;y++){var b=e.frames[y];u&&(l(S,p,26),p+=4,d(S,p,"fcTL"),p+=4,l(S,p,$++),p+=4,l(S,p,b.rect.width),p+=4,l(S,p,b.rect.height),p+=4,l(S,p,b.rect.x),p+=4,l(S,p,b.rect.y),p+=4,c(S,p,r[y]),p+=2,c(S,p,1e3),p+=2,S[p]=b.dispose,p++,S[p]=b.blend,p++,l(S,p,s(S,p-30,30)),p+=4);const t=b.cimg;l(S,p,(x=t.length)+(0==y?0:4)),p+=4;const n=p;d(S,p,0==y?"IDAT":"fdAT"),p+=4,0!=y&&(l(S,p,$++),p+=4),S.set(t,p),p+=x,l(S,p,s(S,n,p-n)),p+=4}return l(S,p,0),p+=4,d(S,p,"IEND"),p+=4,l(S,p,s(S,p-4,4)),p+=4,S.buffer}function c(e,t,n){for(let o=0;o<e.frames.length;o++){const i=e.frames[o];i.rect.width;const r=i.rect.height,a=new Uint8Array(r*i.bpl+r);i.cimg=m(i.img,r,i.bpp,i.bpl,a,t,n)}}function d(t,n,o,i,r){const a=r[0],l=r[1],c=r[2],d=r[3],m=r[4],h=r[5];let x=6,f=8,y=255;for(var S=0;S<t.length;S++){const e=new Uint8Array(t[S]);for(var C=e.length,$=0;$<C;$+=4)y&=e[$+3]}const b=255!=y,v=function(t,n,o,i,r,a){const s=[];for(var l=0;l<t.length;l++){const p=new Uint8Array(t[l]),m=new Uint32Array(p.buffer);var c;let g=0,x=0,f=n,y=o,S=i?1:0;if(0!=l){const C=a||i||1==l||0!=s[l-2].dispose?1:2;let $=0,b=1e9;for(let e=0;e<C;e++){var d=new Uint8Array(t[l-1-e]);const i=new Uint32Array(t[l-1-e]);let a=n,s=o,c=-1,p=-1;for(let e=0;e<o;e++)for(let t=0;t<n;t++)m[h=e*n+t]!=i[h]&&(t<a&&(a=t),t>c&&(c=t),e<s&&(s=e),e>p&&(p=e));-1==c&&(a=s=c=p=0),r&&(!(1&~a)&&a--,!(1&~s)&&s--);const u=(c-a+1)*(p-s+1);u<b&&(b=u,$=e,g=a,x=s,f=c-a+1,y=p-s+1)}d=new Uint8Array(t[l-1-$]),1==$&&(s[l-1].dispose=2),c=new Uint8Array(f*y*4),e(d,n,o,c,f,y,-g,-x,0),S=e(p,n,o,c,f,y,-g,-x,3)?1:0,1==S?u(p,n,o,c,{x:g,y:x,width:f,height:y}):e(p,n,o,c,f,y,-g,-x,0)}else c=p.slice(0);s.push({rect:{x:g,y:x,width:f,height:y},img:c,blend:S,dispose:0})}if(i)for(l=0;l<s.length;l++){if(1==(g=s[l]).blend)continue;const e=g.rect,i=s[l-1].rect,a=Math.min(e.x,i.x),c=Math.min(e.y,i.y),d={x:a,y:c,width:Math.max(e.x+e.width,i.x+i.width)-a,height:Math.max(e.y+e.height,i.y+i.height)-c};s[l-1].dispose=1,l-1!=0&&p(t,n,o,s,l-1,d,r),p(t,n,o,s,l,d,r)}let m=0;if(1!=t.length)for(var h=0;h<s.length;h++){var g;m+=(g=s[h]).rect.width*g.rect.height}return s}(t,n,o,a,l,c),E={},w=[],R=[];if(0!=i){const e=[];for($=0;$<v.length;$++)e.push(v[$].img.buffer);const t=g(function(e){let t=0;for(var n=0;n<e.length;n++)t+=e[n].byteLength;const o=new Uint8Array(t);let i=0;for(n=0;n<e.length;n++){const t=new Uint8Array(e[n]),r=t.length;for(let e=0;e<r;e+=4){let n=t[e],r=t[e+1],a=t[e+2];const s=t[e+3];0==s&&(n=r=a=0),o[i+e]=n,o[i+e+1]=r,o[i+e+2]=a,o[i+e+3]=s}i+=r}return o.buffer}(e),i);for($=0;$<t.plte.length;$++)w.push(t.plte[$].est.rgba);let n=0;for($=0;$<v.length;$++){const e=(j=v[$]).img.length;var A=new Uint8Array(t.inds.buffer,n>>2,e>>2);R.push(A);const o=new Uint8Array(t.abuf,n,e);h&&s(j.img,j.rect.width,j.rect.height,w,o,A),j.img.set(o),n+=e}}else for(S=0;S<v.length;S++){var j=v[S];const e=new Uint32Array(j.img.buffer);var T=j.rect.width;for(C=e.length,A=new Uint8Array(C),R.push(A),$=0;$<C;$++){const t=e[$];if(0!=$&&t==e[$-1])A[$]=A[$-1];else if($>T&&t==e[$-T])A[$]=A[$-T];else{let e=E[t];if(null==e&&(E[t]=e=w.length,w.push(t),w.length>=300))break;A[$]=e}}}const I=w.length;for(I<=256&&0==m&&(f=I<=2?1:I<=4?2:I<=16?4:8,f=Math.max(f,d)),S=0;S<v.length;S++){(j=v[S]).rect.x,j.rect.y,T=j.rect.width;const e=j.rect.height;let t=j.img;new Uint32Array(t.buffer);let n=4*T,o=4;if(I<=256&&0==m){n=Math.ceil(f*T/8);var k=new Uint8Array(n*e);const i=R[S];for(let t=0;t<e;t++){$=t*n;const e=t*T;if(8==f)for(var L=0;L<T;L++)k[$+L]=i[e+L];else if(4==f)for(L=0;L<T;L++)k[$+(L>>1)]|=i[e+L]<<4-4*(1&L);else if(2==f)for(L=0;L<T;L++)k[$+(L>>2)]|=i[e+L]<<6-2*(3&L);else if(1==f)for(L=0;L<T;L++)k[$+(L>>3)]|=i[e+L]<<7-1*(7&L)}t=k,x=3,o=1}else if(0==b&&1==v.length){k=new Uint8Array(T*e*3);const i=T*e;for($=0;$<i;$++){const e=3*$,n=4*$;k[e]=t[n],k[e+1]=t[n+1],k[e+2]=t[n+2]}t=k,x=2,o=3,n=3*T}j.img=t,j.bpl=n,j.bpp=o}return{ctype:x,depth:f,plte:w,frames:v}}function p(t,n,o,i,r,a,s){const l=Uint8Array,c=Uint32Array,d=new l(t[r-1]),p=new c(t[r-1]),m=r+1<t.length?new l(t[r+1]):null,h=new l(t[r]),g=new c(h.buffer);let x=n,f=o,y=-1,S=-1;for(let e=0;e<a.height;e++)for(let t=0;t<a.width;t++){const o=a.x+t,s=a.y+e,l=s*n+o,c=g[l];0==c||0==i[r-1].dispose&&p[l]==c&&(null==m||0!=m[4*l+3])||(o<x&&(x=o),o>y&&(y=o),s<f&&(f=s),s>S&&(S=s))}-1==y&&(x=f=y=S=0),s&&(!(1&~x)&&x--,!(1&~f)&&f--),a={x:x,y:f,width:y-x+1,height:S-f+1};const C=i[r];C.rect=a,C.blend=1,C.img=new Uint8Array(a.width*a.height*4),0==i[r-1].dispose?(e(d,n,o,C.img,a.width,a.height,-a.x,-a.y,0),u(h,n,o,C.img,a)):e(h,n,o,C.img,a.width,a.height,-a.x,-a.y,0)}function u(t,n,o,i,r){e(t,n,o,i,r.width,r.height,-r.x,-r.y,2)}function m(e,t,n,o,i,r,a){const s=[];let l,c=[0,1,2,3,4];-1!=r?c=[r]:(t*o>5e5||1==n)&&(c=[0]),a&&(l={level:0});const d=UZIP;for(var p=0;p<c.length;p++){for(let r=0;r<t;r++)h(i,e,r,o,n,c[p]);s.push(d.deflate(i,l))}let u,m=1e9;for(p=0;p<s.length;p++)s[p].length<m&&(u=p,m=s[p].length);return s[u]}function h(e,t,o,i,r,a){const s=o*i;let l=s+o;if(e[l]=a,l++,0==a)if(i<500)for(var c=0;c<i;c++)e[l+c]=t[s+c];else e.set(new Uint8Array(t.buffer,s,i),l);else if(1==a){for(c=0;c<r;c++)e[l+c]=t[s+c];for(c=r;c<i;c++)e[l+c]=t[s+c]-t[s+c-r]+256&255}else if(0==o){for(c=0;c<r;c++)e[l+c]=t[s+c];if(2==a)for(c=r;c<i;c++)e[l+c]=t[s+c];if(3==a)for(c=r;c<i;c++)e[l+c]=t[s+c]-(t[s+c-r]>>1)+256&255;if(4==a)for(c=r;c<i;c++)e[l+c]=t[s+c]-n(t[s+c-r],0,0)+256&255}else{if(2==a)for(c=0;c<i;c++)e[l+c]=t[s+c]+256-t[s+c-i]&255;if(3==a){for(c=0;c<r;c++)e[l+c]=t[s+c]+256-(t[s+c-i]>>1)&255;for(c=r;c<i;c++)e[l+c]=t[s+c]+256-(t[s+c-i]+t[s+c-r]>>1)&255}if(4==a){for(c=0;c<r;c++)e[l+c]=t[s+c]+256-n(0,t[s+c-i],0)&255;for(c=r;c<i;c++)e[l+c]=t[s+c]+256-n(t[s+c-r],t[s+c-i],t[s+c-r-i])&255}}}function g(e,t){const n=new Uint8Array(e),o=n.slice(0),i=new Uint32Array(o.buffer),r=x(o,t),a=r[0],s=r[1],l=n.length,c=new Uint8Array(l>>2);let d;if(n.length<2e7)for(var p=0;p<l;p+=4)d=f(a,u=n[p]*(1/255),m=n[p+1]*(1/255),h=n[p+2]*(1/255),g=n[p+3]*(1/255)),c[p>>2]=d.ind,i[p>>2]=d.est.rgba;else for(p=0;p<l;p+=4){var u=n[p]*(1/255),m=n[p+1]*(1/255),h=n[p+2]*(1/255),g=n[p+3]*(1/255);for(d=a;d.left;)d=y(d.est,u,m,h,g)<=0?d.left:d.right;c[p>>2]=d.ind,i[p>>2]=d.est.rgba}return{abuf:o.buffer,inds:c,plte:s}}function x(e,t,n){null==n&&(n=1e-4);const o=new Uint32Array(e.buffer),i={i0:0,i1:e.length,bst:null,est:null,tdst:0,left:null,right:null};i.bst=$(e,i.i0,i.i1),i.est=b(i.bst);const r=[i];for(;r.length<t;){let t=0,i=0;for(var a=0;a<r.length;a++)r[a].est.L>t&&(t=r[a].est.L,i=a);if(t<n)break;const s=r[i],l=S(e,o,s.i0,s.i1,s.est.e,s.est.eMq255);if(s.i0>=l||s.i1<=l){s.est.L=0;continue}const c={i0:s.i0,i1:l,bst:null,est:null,tdst:0,left:null,right:null};c.bst=$(e,c.i0,c.i1),c.est=b(c.bst);const d={i0:l,i1:s.i1,bst:null,est:null,tdst:0,left:null,right:null};for(d.bst={R:[],m:[],N:s.bst.N-c.bst.N},a=0;a<16;a++)d.bst.R[a]=s.bst.R[a]-c.bst.R[a];for(a=0;a<4;a++)d.bst.m[a]=s.bst.m[a]-c.bst.m[a];d.est=b(d.bst),s.left=c,s.right=d,r[i]=c,r.push(d)}for(r.sort((e,t)=>t.bst.N-e.bst.N),a=0;a<r.length;a++)r[a].ind=a;return[i,r]}function f(e,t,n,o,i){if(null==e.left)return e.tdst=function(e,t,n,o,i){const r=t-e[0],a=n-e[1],s=o-e[2],l=i-e[3];return r*r+a*a+s*s+l*l}(e.est.q,t,n,o,i),e;const r=y(e.est,t,n,o,i);let a=e.left,s=e.right;r>0&&(a=e.right,s=e.left);const l=f(a,t,n,o,i);if(l.tdst<=r*r)return l;const c=f(s,t,n,o,i);return c.tdst<l.tdst?c:l}function y(e,t,n,o,i){const{e:r}=e;return r[0]*t+r[1]*n+r[2]*o+r[3]*i-e.eMq}function S(e,t,n,o,i,r){for(o-=4;n<o;){for(;C(e,n,i)<=r;)n+=4;for(;C(e,o,i)>r;)o-=4;if(n>=o)break;const a=t[n>>2];t[n>>2]=t[o>>2],t[o>>2]=a,n+=4,o-=4}for(;C(e,n,i)>r;)n-=4;return n+4}function C(e,t,n){return e[t]*n[0]+e[t+1]*n[1]+e[t+2]*n[2]+e[t+3]*n[3]}function $(e,t,n){const o=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],i=[0,0,0,0],r=n-t>>2;for(let a=t;a<n;a+=4){const t=e[a]*(1/255),n=e[a+1]*(1/255),r=e[a+2]*(1/255),s=e[a+3]*(1/255);i[0]+=t,i[1]+=n,i[2]+=r,i[3]+=s,o[0]+=t*t,o[1]+=t*n,o[2]+=t*r,o[3]+=t*s,o[5]+=n*n,o[6]+=n*r,o[7]+=n*s,o[10]+=r*r,o[11]+=r*s,o[15]+=s*s}return o[4]=o[1],o[8]=o[2],o[9]=o[6],o[12]=o[3],o[13]=o[7],o[14]=o[11],{R:o,m:i,N:r}}function b(e){const{R:t}=e,{m:n}=e,{N:o}=e,i=n[0],r=n[1],a=n[2],s=n[3],l=0==o?0:1/o,c=[t[0]-i*i*l,t[1]-i*r*l,t[2]-i*a*l,t[3]-i*s*l,t[4]-r*i*l,t[5]-r*r*l,t[6]-r*a*l,t[7]-r*s*l,t[8]-a*i*l,t[9]-a*r*l,t[10]-a*a*l,t[11]-a*s*l,t[12]-s*i*l,t[13]-s*r*l,t[14]-s*a*l,t[15]-s*s*l],d=c,p=v;let u=[Math.random(),Math.random(),Math.random(),Math.random()],m=0,h=0;if(0!=o)for(let x=0;x<16&&(u=p.multVec(d,u),h=Math.sqrt(p.dot(u,u)),u=p.sml(1/h,u),!(0!=x&&Math.abs(h-m)<1e-9));x++)m=h;const g=[i*l,r*l,a*l,s*l];return{Cov:c,q:g,e:u,L:m,eMq255:p.dot(p.sml(255,g),u),eMq:p.dot(u,g),rgba:(Math.round(255*g[3])<<24|Math.round(255*g[2])<<16|Math.round(255*g[1])<<8|Math.round(255*g[0]))>>>0}}var v={multVec:(e,t)=>[e[0]*t[0]+e[1]*t[1]+e[2]*t[2]+e[3]*t[3],e[4]*t[0]+e[5]*t[1]+e[6]*t[2]+e[7]*t[3],e[8]*t[0]+e[9]*t[1]+e[10]*t[2]+e[11]*t[3],e[12]*t[0]+e[13]*t[1]+e[14]*t[2]+e[15]*t[3]],dot:(e,t)=>e[0]*t[0]+e[1]*t[1]+e[2]*t[2]+e[3]*t[3],sml:(e,t)=>[e*t[0],e*t[1],e*t[2],e*t[3]]};UPNG.encode=function(e,t,n,o,i,r,a){null==o&&(o=0),null==a&&(a=!1);const s=d(e,t,n,o,[!1,!1,!1,0,a,!1]);return c(s,-1),l(s,t,n,i,r)},UPNG.encodeLL=function(e,t,n,o,i,r,a,s){const d={ctype:0+(1==o?0:2)+(0==i?0:4),depth:r,frames:[]},p=(o+i)*r,u=p*t;for(let l=0;l<e.length;l++)d.frames.push({rect:{x:0,y:0,width:t,height:n},img:new Uint8Array(e[l]),blend:0,dispose:1,bpp:Math.ceil(p/8),bpl:Math.ceil(u/8)});return c(d,0,!0),l(d,t,n,a,s)},UPNG.encode.compress=d,UPNG.encode.dither=s,UPNG.quantize=g,UPNG.quantize.getKDtree=x,UPNG.quantize.getNearest=f}();const r={toArrayBuffer(e,t){const n=e.width,o=e.height,i=n<<2,a=e.getContext("2d").getImageData(0,0,n,o),s=new Uint32Array(a.data.buffer),l=(32*n+31)/32<<2,c=l*o,d=122+c,p=new ArrayBuffer(d),u=new DataView(p),m=1<<20;let h,g,x,f,y=m,S=0,C=0,$=0;function b(e){u.setUint16(C,e,!0),C+=2}function v(e){u.setUint32(C,e,!0),C+=4}function E(e){C+=e}b(19778),v(d),E(4),v(122),v(108),v(n),v(-o>>>0),b(1),b(32),v(3),v(c),v(2835),v(2835),E(8),v(16711680),v(65280),v(255),v(4278190080),v(1466527264),function e(){for(;S<o&&y>0;){for(f=122+S*l,h=0;h<i;)y--,g=s[$++],x=g>>>24,u.setUint32(f+h,g<<8|x),h+=4;S++}$<s.length?(y=m,setTimeout(e,r._dly)):t(p)}()},toBlob(e,t){this.toArrayBuffer(e,e=>{t(new Blob([e],{type:"image/bmp"}))})},_dly:9};var i={CHROME:"CHROME",FIREFOX:"FIREFOX",DESKTOP_SAFARI:"DESKTOP_SAFARI",IE:"IE",IOS:"IOS",ETC:"ETC"},o={[i.CHROME]:16384,[i.FIREFOX]:11180,[i.DESKTOP_SAFARI]:16384,[i.IE]:8192,[i.IOS]:4096,[i.ETC]:8192};const a="undefined"!=typeof window,s="undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope,f=a&&window.cordova&&window.cordova.require&&window.cordova.require("cordova/modulemapper"),CustomFile=(a||s)&&(f&&f.getOriginalSymbol(window,"File")||"undefined"!=typeof File&&File),CustomFileReader=(a||s)&&(f&&f.getOriginalSymbol(window,"FileReader")||"undefined"!=typeof FileReader&&FileReader);function getFilefromDataUrl(e,t,n=Date.now()){return new Promise(o=>{const i=e.split(","),r=i[0].match(/:(.*?);/)[1],a=globalThis.atob(i[1]);let s=a.length;const l=new Uint8Array(s);for(;s--;)l[s]=a.charCodeAt(s);const c=new Blob([l],{type:r});c.name=t,c.lastModified=n,o(c)})}function getDataUrlFromFile(e){return new Promise((t,n)=>{const o=new CustomFileReader;o.onload=()=>t(o.result),o.onerror=e=>n(e),o.readAsDataURL(e)})}function loadImage(e){return new Promise((t,n)=>{const o=new Image;o.onload=()=>t(o),o.onerror=e=>n(e),o.src=e})}function getBrowserName(){if(void 0!==getBrowserName.cachedResult)return getBrowserName.cachedResult;let e=i.ETC;const{userAgent:t}=navigator;return/Chrom(e|ium)/i.test(t)?e=i.CHROME:/iP(ad|od|hone)/i.test(t)&&/WebKit/i.test(t)?e=i.IOS:/Safari/i.test(t)?e=i.DESKTOP_SAFARI:/Firefox/i.test(t)?e=i.FIREFOX:(/MSIE/i.test(t)||1==!!document.documentMode)&&(e=i.IE),getBrowserName.cachedResult=e,getBrowserName.cachedResult}function approximateBelowMaximumCanvasSizeOfBrowser(e,t){const n=getBrowserName(),i=o[n];let r=e,a=t,s=r*a;const l=r>a?a/r:r/a;for(;s>i*i;){const e=(i+r)/2,t=(i+a)/2;e<t?(a=t,r=t*l):(a=e*l,r=e),s=r*a}return{width:r,height:a}}function getNewCanvasAndCtx(e,t){let n,o;try{if(n=new OffscreenCanvas(e,t),o=n.getContext("2d"),null===o)throw new Error("getContext of OffscreenCanvas returns null")}catch(i){n=document.createElement("canvas"),o=n.getContext("2d")}return n.width=e,n.height=t,[n,o]}function drawImageInCanvas(e,t){const{width:n,height:o}=approximateBelowMaximumCanvasSizeOfBrowser(e.width,e.height),[i,r]=getNewCanvasAndCtx(n,o);return t&&/jpe?g/.test(t)&&(r.fillStyle="white",r.fillRect(0,0,i.width,i.height)),r.drawImage(e,0,0,i.width,i.height),i}function isIOS(){return void 0!==isIOS.cachedResult||(isIOS.cachedResult=["iPad Simulator","iPhone Simulator","iPod Simulator","iPad","iPhone","iPod"].includes(navigator.platform)||navigator.userAgent.includes("Mac")&&"undefined"!=typeof document&&"ontouchend"in document),isIOS.cachedResult}function drawFileInCanvas(e,t={}){return new Promise(function(n,o){let r,a;var s=function(){try{return a=drawImageInCanvas(r,t.fileType||e.type),n([r,a])}catch(i){return o(i)}},l=function(t){try{var n=function(e){try{throw e}catch(t){return o(t)}};try{let t;return getDataUrlFromFile(e).then(function(e){try{return t=e,loadImage(t).then(function(e){try{return r=e,function(){try{return s()}catch(e){return o(e)}}()}catch(t){return n(t)}},n)}catch(i){return n(i)}},n)}catch(i){n(i)}}catch(i){return o(i)}};try{if(isIOS()||[i.DESKTOP_SAFARI,i.MOBILE_SAFARI].includes(getBrowserName()))throw new Error("Skip createImageBitmap on IOS and Safari");return createImageBitmap(e).then(function(e){try{return r=e,s()}catch(t){return l()}},l)}catch(c){l()}})}function canvasToFile(e,t,n,o,i=1){return new Promise(function(a,s){let l;if("image/png"===t){let r,a,s;return r=e.getContext("2d"),({data:a}=r.getImageData(0,0,e.width,e.height)),s=UPNG.encode([a.buffer],e.width,e.height,4096*i),l=new Blob([s],{type:t}),l.name=n,l.lastModified=o,c.call(this)}{let a=function(){return c.call(this)};if("image/bmp"===t)return new Promise(t=>r.toBlob(e,t)).then(function(e){try{return l=e,l.name=n,l.lastModified=o,a.call(this)}catch(t){return s(t)}}.bind(this),s);{let r=function(){return a.call(this)};if("function"==typeof OffscreenCanvas&&e instanceof OffscreenCanvas)return e.convertToBlob({type:t,quality:i}).then(function(e){try{return l=e,l.name=n,l.lastModified=o,r.call(this)}catch(t){return s(t)}}.bind(this),s);{let a;return a=e.toDataURL(t,i),getFilefromDataUrl(a,n,o).then(function(e){try{return l=e,r.call(this)}catch(t){return s(t)}}.bind(this),s)}}}function c(){return a(l)}})}function cleanupCanvasMemory(e){e.width=0,e.height=0}function isAutoOrientationInBrowser(){return new Promise(function(e,t){let n,o,i,r;return void 0!==isAutoOrientationInBrowser.cachedResult?e(isAutoOrientationInBrowser.cachedResult):getFilefromDataUrl("data:image/jpeg;base64,/9j/4QAiRXhpZgAATU0AKgAAAAgAAQESAAMAAAABAAYAAAAAAAD/2wCEAAEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAf/AABEIAAEAAgMBEQACEQEDEQH/xABKAAEAAAAAAAAAAAAAAAAAAAALEAEAAAAAAAAAAAAAAAAAAAAAAQEAAAAAAAAAAAAAAAAAAAAAEQEAAAAAAAAAAAAAAAAAAAAA/9oADAMBAAIRAxEAPwA/8H//2Q==","test.jpg",Date.now()).then(function(a){try{return n=a,drawFileInCanvas(n).then(function(a){try{return o=a[1],canvasToFile(o,n.type,n.name,n.lastModified).then(function(n){try{return i=n,cleanupCanvasMemory(o),drawFileInCanvas(i).then(function(n){try{return r=n[0],isAutoOrientationInBrowser.cachedResult=1===r.width&&2===r.height,e(isAutoOrientationInBrowser.cachedResult)}catch(o){return t(o)}},t)}catch(a){return t(a)}},t)}catch(s){return t(s)}},t)}catch(s){return t(s)}},t)})}function getExifOrientation(e){return new Promise((t,n)=>{const o=new CustomFileReader;o.onload=e=>{const n=new DataView(e.target.result);if(65496!=n.getUint16(0,!1))return t(-2);const o=n.byteLength;let i=2;for(;i<o;){if(n.getUint16(i+2,!1)<=8)return t(-1);const e=n.getUint16(i,!1);if(i+=2,65505==e){if(1165519206!=n.getUint32(i+=2,!1))return t(-1);const e=18761==n.getUint16(i+=6,!1);i+=n.getUint32(i+4,e);const o=n.getUint16(i,e);i+=2;for(let r=0;r<o;r++)if(274==n.getUint16(i+12*r,e))return t(n.getUint16(i+12*r+8,e))}else{if(65280&~e)break;i+=n.getUint16(i,!1)}}return t(-1)},o.onerror=e=>n(e),o.readAsArrayBuffer(e)})}function handleMaxWidthOrHeight(e,t){const{width:n}=e,{height:o}=e,{maxWidthOrHeight:i}=t;let r,a=e;return isFinite(i)&&(n>i||o>i)&&([a,r]=getNewCanvasAndCtx(n,o),n>o?(a.width=i,a.height=o/n*i):(a.width=n/o*i,a.height=i),r.drawImage(e,0,0,a.width,a.height),cleanupCanvasMemory(e)),a}function followExifOrientation(e,t){const{width:n}=e,{height:o}=e,[i,r]=getNewCanvasAndCtx(n,o);switch(t>4&&t<9?(i.width=o,i.height=n):(i.width=n,i.height=o),t){case 2:r.transform(-1,0,0,1,n,0);break;case 3:r.transform(-1,0,0,-1,n,o);break;case 4:r.transform(1,0,0,-1,0,o);break;case 5:r.transform(0,1,1,0,0,0);break;case 6:r.transform(0,1,-1,0,o,0);break;case 7:r.transform(0,-1,-1,0,o,n);break;case 8:r.transform(0,-1,1,0,0,n)}return r.drawImage(e,0,0,n,o),cleanupCanvasMemory(e),i}function compress(e,t,n=0){return new Promise(function(o,i){let r,a,s,l,c,d,p,u,m,h,g,x,f,y,S,C,$,b,v,E;function w(e=5){if(t.signal&&t.signal.aborted)throw t.signal.reason;r+=e,t.onProgress(Math.min(r,100))}function R(e){if(t.signal&&t.signal.aborted)throw t.signal.reason;r=Math.min(Math.max(e,r),100),t.onProgress(r)}return r=n,a=t.maxIteration||10,s=1024*t.maxSizeMB*1024,w(),drawFileInCanvas(e,t).then(function(n){try{return[,l]=n,w(),c=handleMaxWidthOrHeight(l,t),w(),new Promise(function(n,o){var i;if(!(i=t.exifOrientation))return getExifOrientation(e).then(function(e){try{return i=e,r.call(this)}catch(t){return o(t)}}.bind(this),o);function r(){return n(i)}return r.call(this)}).then(function(n){try{return d=n,w(),isAutoOrientationInBrowser().then(function(n){try{return p=n?c:followExifOrientation(c,d),w(),u=t.initialQuality||1,m=t.fileType||e.type,canvasToFile(p,m,e.name,e.lastModified,u).then(function(n){try{{let d=function(){if(a--&&(S>s||S>f)){let t,n;return t=E?.95*v.width:v.width,n=E?.95*v.height:v.height,[$,b]=getNewCanvasAndCtx(t,n),b.drawImage(v,0,0,t,n),u*="image/png"===m?.85:.95,canvasToFile($,m,e.name,e.lastModified,u).then(function(e){try{return C=e,cleanupCanvasMemory(v),v=$,S=C.size,R(Math.min(99,Math.floor((y-S)/(y-s)*100))),d}catch(t){return i(t)}},i)}return[1]},A=function(){return cleanupCanvasMemory(v),cleanupCanvasMemory($),cleanupCanvasMemory(c),cleanupCanvasMemory(p),cleanupCanvasMemory(l),R(100),o(C)};return h=n,w(),g=h.size>s,x=h.size>e.size,g||x?(f=e.size,y=h.size,S=y,v=p,E=!t.alwaysKeepResolution&&g,(r=function(e){for(;e;){if(e.then)return void e.then(r,i);try{if(e.pop){if(e.length)return e.pop()?A.call(this):e;e=d}else e=e.call(this)}catch(t){return i(t)}}}.bind(this))(d)):(R(100),o(h));var r}}catch(d){return i(d)}}.bind(this),i)}catch(r){return i(r)}}.bind(this),i)}catch(r){return i(r)}}.bind(this),i)}catch(r){return i(r)}}.bind(this),i)})}const l="\nlet scriptImported = false\nself.addEventListener('message', async (e) => {\n const { file, id, imageCompressionLibUrl, options } = e.data\n options.onProgress = (progress) => self.postMessage({ progress, id })\n try {\n if (!scriptImported) {\n // console.log('[worker] importScripts', imageCompressionLibUrl)\n self.importScripts(imageCompressionLibUrl)\n scriptImported = true\n }\n // console.log('[worker] self', self)\n const compressedFile = await imageCompression(file, options)\n self.postMessage({ file: compressedFile, id })\n } catch (e) {\n // console.error('[worker] error', e)\n self.postMessage({ error: e.message + '\\n' + e.stack, id })\n }\n})\n";let c;function compressOnWebWorker(e,t){return new Promise((n,o)=>{c||(c=function(e){const t=[];return t.push(e),URL.createObjectURL(new Blob(t))}(l));const i=new Worker(c);i.addEventListener("message",function(e){if(t.signal&&t.signal.aborted)i.terminate();else if(void 0===e.data.progress){if(e.data.error)return o(new Error(e.data.error)),void i.terminate();n(e.data.file),i.terminate()}else t.onProgress(e.data.progress)}),i.addEventListener("error",o),t.signal&&t.signal.addEventListener("abort",()=>{o(t.signal.reason),i.terminate()}),i.postMessage({file:e,imageCompressionLibUrl:t.libURL,options:{...t,onProgress:void 0,signal:void 0}})})}function imageCompression(e,t){return new Promise(function(n,o){let i,r,a,s,l,c;if(i={...t},a=0,({onProgress:s}=i),i.maxSizeMB=i.maxSizeMB||Number.POSITIVE_INFINITY,l="boolean"!=typeof i.useWebWorker||i.useWebWorker,delete i.useWebWorker,i.onProgress=e=>{a=e,"function"==typeof s&&s(a)},!(e instanceof Blob||e instanceof CustomFile))return o(new Error("The file given is not an instance of Blob or File"));if(!/^image/.test(e.type))return o(new Error("The file given is not an image"));if(c="undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope,!l||"function"!=typeof Worker||c)return compress(e,i).then(function(e){try{return r=e,u.call(this)}catch(t){return o(t)}}.bind(this),o);var d=function(){try{return u.call(this)}catch(e){return o(e)}}.bind(this),p=function(t){try{return compress(e,i).then(function(e){try{return r=e,d()}catch(t){return o(t)}},o)}catch(n){return o(n)}};try{return i.libURL=i.libURL||"https://cdn.jsdelivr.net/npm/browser-image-compression@2.0.2/dist/browser-image-compression.js",compressOnWebWorker(e,i).then(function(e){try{return r=e,d()}catch(t){return p()}},p)}catch(m){p()}function u(){try{r.name=e.name,r.lastModified=e.lastModified}catch(m){}try{i.preserveExif&&"image/jpeg"===e.type&&(!i.fileType||i.fileType&&i.fileType===e.type)&&(r=copyExifWithoutOrientation(e,r))}catch(m){}return n(r)}})}imageCompression.getDataUrlFromFile=getDataUrlFromFile,imageCompression.getFilefromDataUrl=getFilefromDataUrl,imageCompression.loadImage=loadImage,imageCompression.drawImageInCanvas=drawImageInCanvas,imageCompression.drawFileInCanvas=drawFileInCanvas,imageCompression.canvasToFile=canvasToFile,imageCompression.getExifOrientation=getExifOrientation,imageCompression.handleMaxWidthOrHeight=handleMaxWidthOrHeight,imageCompression.followExifOrientation=followExifOrientation,imageCompression.cleanupCanvasMemory=cleanupCanvasMemory,imageCompression.isAutoOrientationInBrowser=isAutoOrientationInBrowser,imageCompression.approximateBelowMaximumCanvasSizeOfBrowser=approximateBelowMaximumCanvasSizeOfBrowser,imageCompression.copyExifWithoutOrientation=copyExifWithoutOrientation,imageCompression.getBrowserName=getBrowserName,imageCompression.version="2.0.2";const PDF_MIME_TYPE$1="application/pdf",imageCompressionAcceptableFileTypes=["image/jpg","image/jpeg","image/png","image/webp","image/bmp"],RECEIPT_IMAGE_COMPRESSION_OPTIONS={useWebWorker:!0,maxWidthOrHeight:1920,initialQuality:.92,maxSizeMB:2},handleImageCompression=async(e,t)=>{if(!1===imageCompressionAcceptableFileTypes.includes(e.type))return e;const n=await imageCompression(e,{useWebWorker:!0,maxWidthOrHeight:900,initialQuality:1,maxSizeMB:1.4}),o=n.lastModified,i=n.type.split("/")[1];let r=`image_${o}.${i}`;null!=t&&(r=`${t}.${i}`);return new File([n],r,{lastModified:o,type:n.type})},compressImageForReceipt=async(e,t)=>{if(!1===imageCompressionAcceptableFileTypes.includes(e.type))return e;const n=await imageCompression(e,RECEIPT_IMAGE_COMPRESSION_OPTIONS),o=n.type.split("/")[1],i=t.replace(/\.[^.]+$/,"")||"image";return new File([n],`${i}.${o}`,{lastModified:e.lastModified,type:n.type})},PDF_RENDER_SCALE=1.5,PDF_JPEG_QUALITY=.7;function canvasToJpegBlob(e,t){return new Promise((n,o)=>{e.toBlob(e=>{null!=e?n(e):o(new Error("canvas.toBlob returned null"))},"image/jpeg",t)})}async function renderPageToJpeg(e,t,n){const o=e.getViewport({scale:t}),i=document.createElement("canvas");i.width=Math.floor(o.width),i.height=Math.floor(o.height);const r=i.getContext("2d");if(null==r)throw new Error("Could not get canvas 2d context");await e.render({canvasContext:r,viewport:o}).promise;return(await canvasToJpegBlob(i,n)).arrayBuffer()}async function compressPdfForReceipt(e,t){const[{PDFDocument:n},o]=await Promise.all([import("./index-B4OS9zN1.js"),Promise.resolve().then(()=>index$2).then(e=>e.pdfjs)]),i=await e.arrayBuffer(),r=await o.getDocument({data:new Uint8Array(i)}).promise,a=r.numPages,s=await n.create();for(let d=1;d<=a;d++){const e=await r.getPage(d),t=await renderPageToJpeg(e,PDF_RENDER_SCALE,PDF_JPEG_QUALITY),n=await s.embedJpg(new Uint8Array(t)),o=n.scale(1);s.addPage([o.width,o.height]).drawImage(n,{x:0,y:0,width:o.width,height:o.height})}const l=await s.save(),c=t.toLowerCase().endsWith(".pdf")?t:`${t}.pdf`;return new File([l],c,{type:PDF_MIME_TYPE$1,lastModified:e.lastModified})}async function compressSingleFile(e,t){const n=e instanceof File?e:new File([e],t,{type:e.type});if(e.type===PDF_MIME_TYPE$1){const o=await compressPdfForReceipt(n,t);return o.size<n.size?{blob:o,name:o.name}:{blob:e,name:t}}const o=await compressImageForReceipt(n,t);return{blob:o,name:o.name}}async function compressReceiptFiles(e,t){const n=await Promise.all(e.map((e,n)=>{const o=t[n]??`file_${n}`;return compressSingleFile(e,o).catch(t=>(console.warn("[compressReceiptFiles] compression failed, using original:",t instanceof Error?t.message:t),{blob:e,name:o}))}));return{blobs:n.map(e=>e.blob),names:n.map(e=>e.name)}}const InputElementMobileCamera=({fileType:e="file",fileRef:t,name:n,value:o="",multiple:i=!1,acceptableTypes:r,onFileSizeError:a,onImageChange:s})=>/* @__PURE__ */jsxRuntimeExports.jsx("input",{type:e,ref:t,name:n,value:o,size:1e3,"data-testid":generateDataTestId("input-file-element-mobile",n),onChange:async e=>{const t=e.target.files?.[0],n=t?.size;null!=t&&null!=n?(a?.(!1),s(t),e.target.value=""):(a?.(!0),e.target.value="")},style:{display:"none"},accept:`${(r??"image/jpg, image/jpeg").toString()}`,multiple:i,capture:!0}),MoneyTransferSuccessAnimation=({shouldDisplay:e,width:t=30,height:n=30,styles:o,animationInLoop:i=!1})=>{const[,r]=useMusic(SUCCESS_SOUND_SOURCE),[a]=useAnimation("MoneyTransferSuccess");return React__default.useEffect(()=>{e&&r(!0)},[e,r]),e&&null!=a?/* @__PURE__ */jsxRuntimeExports.jsx(Lottie,{style:{width:t,height:n,...o},play:!0,animationData:a,loop:i,rendererSettings:{preserveAspectRatio:"xMidYMid slice"}}):null};var browserPonyfill={exports:{}},hasRequiredBrowserPonyfill;function requireBrowserPonyfill(){return hasRequiredBrowserPonyfill||(hasRequiredBrowserPonyfill=1,function(e,t){var n,o="undefined"!=typeof globalThis&&globalThis||"undefined"!=typeof self&&self||void 0!==commonjsGlobal$1&&commonjsGlobal$1,i=function(){function e(){this.fetch=!1,this.DOMException=o.DOMException}return e.prototype=o,new e}();n=i,function(e){var t=void 0!==n&&n||"undefined"!=typeof self&&self||void 0!==commonjsGlobal$1&&commonjsGlobal$1||{},o="URLSearchParams"in t,i="Symbol"in t&&"iterator"in Symbol,r="FileReader"in t&&"Blob"in t&&function(){try{return new Blob,!0}catch(e){return!1}}(),a="FormData"in t,s="ArrayBuffer"in t;if(s)var l=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],c=ArrayBuffer.isView||function(e){return e&&l.indexOf(Object.prototype.toString.call(e))>-1};function d(e){if("string"!=typeof e&&(e=String(e)),/[^a-z0-9\-#$%&'*+.^_`|~!]/i.test(e)||""===e)throw new TypeError('Invalid character in header field name: "'+e+'"');return e.toLowerCase()}function p(e){return"string"!=typeof e&&(e=String(e)),e}function u(e){var t={next:function(){var t=e.shift();return{done:void 0===t,value:t}}};return i&&(t[Symbol.iterator]=function(){return t}),t}function m(e){this.map={},e instanceof m?e.forEach(function(e,t){this.append(t,e)},this):Array.isArray(e)?e.forEach(function(e){if(2!=e.length)throw new TypeError("Headers constructor: expected name/value pair to be length 2, found"+e.length);this.append(e[0],e[1])},this):e&&Object.getOwnPropertyNames(e).forEach(function(t){this.append(t,e[t])},this)}function h(e){if(!e._noBody)return e.bodyUsed?Promise.reject(new TypeError("Already read")):void(e.bodyUsed=!0)}function g(e){return new Promise(function(t,n){e.onload=function(){t(e.result)},e.onerror=function(){n(e.error)}})}function x(e){var t=new FileReader,n=g(t);return t.readAsArrayBuffer(e),n}function f(e){if(e.slice)return e.slice(0);var t=new Uint8Array(e.byteLength);return t.set(new Uint8Array(e)),t.buffer}function y(){return this.bodyUsed=!1,this._initBody=function(e){var t;this.bodyUsed=this.bodyUsed,this._bodyInit=e,e?"string"==typeof e?this._bodyText=e:r&&Blob.prototype.isPrototypeOf(e)?this._bodyBlob=e:a&&FormData.prototype.isPrototypeOf(e)?this._bodyFormData=e:o&&URLSearchParams.prototype.isPrototypeOf(e)?this._bodyText=e.toString():s&&r&&(t=e)&&DataView.prototype.isPrototypeOf(t)?(this._bodyArrayBuffer=f(e.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):s&&(ArrayBuffer.prototype.isPrototypeOf(e)||c(e))?this._bodyArrayBuffer=f(e):this._bodyText=e=Object.prototype.toString.call(e):(this._noBody=!0,this._bodyText=""),this.headers.get("content-type")||("string"==typeof e?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):o&&URLSearchParams.prototype.isPrototypeOf(e)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},r&&(this.blob=function(){var e=h(this);if(e)return e;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))}),this.arrayBuffer=function(){if(this._bodyArrayBuffer){var e=h(this);return e||(ArrayBuffer.isView(this._bodyArrayBuffer)?Promise.resolve(this._bodyArrayBuffer.buffer.slice(this._bodyArrayBuffer.byteOffset,this._bodyArrayBuffer.byteOffset+this._bodyArrayBuffer.byteLength)):Promise.resolve(this._bodyArrayBuffer))}if(r)return this.blob().then(x);throw new Error("could not read as ArrayBuffer")},this.text=function(){var e,t,n,o,i,r=h(this);if(r)return r;if(this._bodyBlob)return e=this._bodyBlob,t=new FileReader,n=g(t),o=/charset=([A-Za-z0-9_-]+)/.exec(e.type),i=o?o[1]:"utf-8",t.readAsText(e,i),n;if(this._bodyArrayBuffer)return Promise.resolve(function(e){for(var t=new Uint8Array(e),n=new Array(t.length),o=0;o<t.length;o++)n[o]=String.fromCharCode(t[o]);return n.join("")}(this._bodyArrayBuffer));if(this._bodyFormData)throw new Error("could not read FormData body as text");return Promise.resolve(this._bodyText)},a&&(this.formData=function(){return this.text().then($)}),this.json=function(){return this.text().then(JSON.parse)},this}m.prototype.append=function(e,t){e=d(e),t=p(t);var n=this.map[e];this.map[e]=n?n+", "+t:t},m.prototype.delete=function(e){delete this.map[d(e)]},m.prototype.get=function(e){return e=d(e),this.has(e)?this.map[e]:null},m.prototype.has=function(e){return this.map.hasOwnProperty(d(e))},m.prototype.set=function(e,t){this.map[d(e)]=p(t)},m.prototype.forEach=function(e,t){for(var n in this.map)this.map.hasOwnProperty(n)&&e.call(t,this.map[n],n,this)},m.prototype.keys=function(){var e=[];return this.forEach(function(t,n){e.push(n)}),u(e)},m.prototype.values=function(){var e=[];return this.forEach(function(t){e.push(t)}),u(e)},m.prototype.entries=function(){var e=[];return this.forEach(function(t,n){e.push([n,t])}),u(e)},i&&(m.prototype[Symbol.iterator]=m.prototype.entries);var S=["CONNECT","DELETE","GET","HEAD","OPTIONS","PATCH","POST","PUT","TRACE"];function C(e,n){if(!(this instanceof C))throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');var o,i,r=(n=n||{}).body;if(e instanceof C){if(e.bodyUsed)throw new TypeError("Already read");this.url=e.url,this.credentials=e.credentials,n.headers||(this.headers=new m(e.headers)),this.method=e.method,this.mode=e.mode,this.signal=e.signal,r||null==e._bodyInit||(r=e._bodyInit,e.bodyUsed=!0)}else this.url=String(e);if(this.credentials=n.credentials||this.credentials||"same-origin",!n.headers&&this.headers||(this.headers=new m(n.headers)),this.method=(o=n.method||this.method||"GET",i=o.toUpperCase(),S.indexOf(i)>-1?i:o),this.mode=n.mode||this.mode||null,this.signal=n.signal||this.signal||function(){if("AbortController"in t)return(new AbortController).signal}(),this.referrer=null,("GET"===this.method||"HEAD"===this.method)&&r)throw new TypeError("Body not allowed for GET or HEAD requests");if(this._initBody(r),!("GET"!==this.method&&"HEAD"!==this.method||"no-store"!==n.cache&&"no-cache"!==n.cache)){var a=/([?&])_=[^&]*/;a.test(this.url)?this.url=this.url.replace(a,"$1_="+/* @__PURE__ */(new Date).getTime()):this.url+=(/\?/.test(this.url)?"&":"?")+"_="+/* @__PURE__ */(new Date).getTime()}}function $(e){var t=new FormData;return e.trim().split("&").forEach(function(e){if(e){var n=e.split("="),o=n.shift().replace(/\+/g," "),i=n.join("=").replace(/\+/g," ");t.append(decodeURIComponent(o),decodeURIComponent(i))}}),t}function b(e,t){if(!(this instanceof b))throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');if(t||(t={}),this.type="default",this.status=void 0===t.status?200:t.status,this.status<200||this.status>599)throw new RangeError("Failed to construct 'Response': The status provided (0) is outside the range [200, 599].");this.ok=this.status>=200&&this.status<300,this.statusText=void 0===t.statusText?"":""+t.statusText,this.headers=new m(t.headers),this.url=t.url||"",this._initBody(e)}C.prototype.clone=function(){return new C(this,{body:this._bodyInit})},y.call(C.prototype),y.call(b.prototype),b.prototype.clone=function(){return new b(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new m(this.headers),url:this.url})},b.error=function(){var e=new b(null,{status:200,statusText:""});return e.ok=!1,e.status=0,e.type="error",e};var v=[301,302,303,307,308];b.redirect=function(e,t){if(-1===v.indexOf(t))throw new RangeError("Invalid status code");return new b(null,{status:t,headers:{location:e}})},e.DOMException=t.DOMException;try{new e.DOMException}catch(w){e.DOMException=function(e,t){this.message=e,this.name=t;var n=Error(e);this.stack=n.stack},e.DOMException.prototype=Object.create(Error.prototype),e.DOMException.prototype.constructor=e.DOMException}function E(n,o){return new Promise(function(i,a){var l=new C(n,o);if(l.signal&&l.signal.aborted)return a(new e.DOMException("Aborted","AbortError"));var c=new XMLHttpRequest;function u(){c.abort()}if(c.onload=function(){var e,t,n={statusText:c.statusText,headers:(e=c.getAllResponseHeaders()||"",t=new m,e.replace(/\r?\n[\t ]+/g," ").split("\r").map(function(e){return 0===e.indexOf("\n")?e.substr(1,e.length):e}).forEach(function(e){var n=e.split(":"),o=n.shift().trim();if(o){var i=n.join(":").trim();try{t.append(o,i)}catch(r){console.warn("Response "+r.message)}}}),t)};0===l.url.indexOf("file://")&&(c.status<200||c.status>599)?n.status=200:n.status=c.status,n.url="responseURL"in c?c.responseURL:n.headers.get("X-Request-URL");var o="response"in c?c.response:c.responseText;setTimeout(function(){i(new b(o,n))},0)},c.onerror=function(){setTimeout(function(){a(new TypeError("Network request failed"))},0)},c.ontimeout=function(){setTimeout(function(){a(new TypeError("Network request timed out"))},0)},c.onabort=function(){setTimeout(function(){a(new e.DOMException("Aborted","AbortError"))},0)},c.open(l.method,function(e){try{return""===e&&t.location.href?t.location.href:e}catch(n){return e}}(l.url),!0),"include"===l.credentials?c.withCredentials=!0:"omit"===l.credentials&&(c.withCredentials=!1),"responseType"in c&&(r?c.responseType="blob":s&&(c.responseType="arraybuffer")),o&&"object"==typeof o.headers&&!(o.headers instanceof m||t.Headers&&o.headers instanceof t.Headers)){var h=[];Object.getOwnPropertyNames(o.headers).forEach(function(e){h.push(d(e)),c.setRequestHeader(e,p(o.headers[e]))}),l.headers.forEach(function(e,t){-1===h.indexOf(t)&&c.setRequestHeader(t,e)})}else l.headers.forEach(function(e,t){c.setRequestHeader(t,e)});l.signal&&(l.signal.addEventListener("abort",u),c.onreadystatechange=function(){4===c.readyState&&l.signal.removeEventListener("abort",u)}),c.send(void 0===l._bodyInit?null:l._bodyInit)})}E.polyfill=!0,t.fetch||(t.fetch=E,t.Headers=m,t.Request=C,t.Response=b),e.Headers=m,e.Request=C,e.Response=b,e.fetch=E,Object.defineProperty(e,"__esModule",{value:!0})}({}),i.fetch.ponyfill=!0,delete i.fetch.polyfill;var r=o.fetch?o:i;(t=r.fetch).default=r.fetch,t.fetch=r.fetch,t.Headers=r.Headers,t.Request=r.Request,t.Response=r.Response,e.exports=t}(browserPonyfill,browserPonyfill.exports)),browserPonyfill.exports}var browserPonyfillExports=requireBrowserPonyfill();const fetch$1=/* @__PURE__ */getDefaultExportFromCjs(browserPonyfillExports),SvgNewVendor=e=>/* @__PURE__ */React.createElement("svg",{viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},/* @__PURE__ */React.createElement("path",{d:"M7.5055 4L1.5 9.54354L22.5 9.5435",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),/* @__PURE__ */React.createElement("path",{d:"M16.4945 19.7067L22.5 14.1632H1.5",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}));__webpack_exports__GlobalWorkerOptions.workerSrc=`//cdnjs.cloudflare.com/ajax/libs/pdf.js/${__webpack_exports__version}/pdf.worker.mjs`;const{common:common$3b}=appLocale.getLocalizedStrings(),FileInputElementName$1="invoice",getEffectiveCitationVariant=(e,t,n)=>{if("deleted"===e.variant)return"deleted";if("excluded"===e.variant)return"excluded";return null!=t&&e.statementTransactionId===t||null!=n&&e.statementTransactionId===n?"hovered":e.variant??"default"},findCitationTransactionIdAtPoint=(e,t,n)=>{const o=Array.from(e.querySelectorAll("[data-statement-transaction-id]"));for(const i of o){if("excluded"===i.dataset.citationVariant)continue;const e=i.getBoundingClientRect();if(t>=e.left&&t<=e.right&&n>=e.top&&n<=e.bottom)return i.dataset.statementTransactionId}},getScrollTargetPageNumber=(e,t)=>{if(null==t)return;const n=e.find(e=>e.statementTransactionId===t);return n?.page},isElementVisibleInContainer=(e,t)=>{const n=e.getBoundingClientRect(),o=null!=t?t.getBoundingClientRect():{top:0,left:0,bottom:window.innerHeight,right:window.innerWidth};return n.bottom>o.top&&n.top<o.bottom&&n.right>o.left&&n.left<o.right},getScrollableParent=e=>{let t=e.parentElement;for(;null!=t;){const{overflowY:e}=window.getComputedStyle(t);if(("auto"===e||"scroll"===e)&&t.scrollHeight>t.clientHeight)return t;t=t.parentElement}return null},scrollPageElementIntoView=(e,t,n="smooth")=>{const o=t??getScrollableParent(e);if(null==o)return void e.scrollIntoView({behavior:n,block:"center"});const i=e.getBoundingClientRect(),r=o.getBoundingClientRect(),a=o.scrollTop+(i.top-r.top)-(o.clientHeight-i.height)/2;o.scrollTo({top:Math.max(0,a),behavior:n})};function getPolygonBounds(e){const t=e.map(e=>e.x),n=e.map(e=>e.y);return{maxX:Math.max(...t),maxY:Math.max(...n),minX:Math.min(...t),minY:Math.min(...n)}}function convertPolygonToPercent(e,t,n){const{minX:o,maxX:i,minY:r,maxY:a}=getPolygonBounds(e);return{height:(a-r)/n*100,left:o/t*100,top:r/n*100,width:(i-o)/t*100}}function RenderPdf(e){const[t,n]=useState(0),[o,i]=useState(void 0),[r,a]=useState(null),[s,l]=useState(void 0),c=useWindowSizeContext(),d=useRef(null),p=useRef(null),u=useRef(void 0),m=null!=e.highlightedCitations&&e.highlightedCitations.length>0;useLayoutEffect(()=>{if(e.isFullScreen)return void i(void 0);const t=p.current;if(null==t)return;const n=()=>{const e=Math.floor(t.clientWidth);e>0&&i(t=>t===e?t:e)};n();const o=new ResizeObserver(n);return o.observe(t),()=>{o.disconnect()}},[e.isFullScreen,e.fileUrl]);const h=t=>{u.current!==t&&(u.current=t,l(t),e.onCitationHover?.(t))},g=e=>{!0===m&&h(findCitationTransactionIdAtPoint(e.currentTarget,e.clientX,e.clientY))},x=()=>{!0===m&&h(void 0)},f=t=>{null!=e.onCitationClick&&e.onCitationClick(findCitationTransactionIdAtPoint(t.currentTarget,t.clientX,t.clientY))},y=useCallback(()=>{if(null==e.highlightedCitations||0===e.highlightedCitations.length)return;const t=getScrollTargetPageNumber(e.highlightedCitations,e.selectedStatementTransactionId);if(null==t)return;const n=p.current?.querySelector(`[data-testid="pdf-page-${t}"]`);if(null!=n){const t=p.current,o=null!=t&&t.scrollHeight>t.clientHeight?t:null,i=(null!=e.selectedStatementTransactionId?n.querySelector(`[data-statement-transaction-id="${CSS.escape(String(e.selectedStatementTransactionId))}"]`):null)??n;if(isElementVisibleInContainer(i,o))return;scrollPageElementIntoView(i,o)}},[e.highlightedCitations,e.selectedStatementTransactionId]);useEffect(()=>{if(null==e.highlightedCitations||0===e.highlightedCitations.length||null==e.selectedStatementTransactionId)return;y();const t=requestAnimationFrame(y),n=window.setTimeout(y,150);return()=>{cancelAnimationFrame(t),window.clearTimeout(n)}},[e.highlightedCitations,e.selectedStatementTransactionId,t,y]),useEffect(()=>{a(null),n(0)},[e.fileUrl]);const S=t=>{if(!e.highlightedCitations)return null;const n=e.highlightedCitations.filter(e=>e.page===t);return 0===n.length?null:/* @__PURE__ */jsxRuntimeExports.jsx(HighlightsOverlay,{children:n.flatMap((t,n)=>{const o=convertPolygonToPercent(t.polygon,t.pageWidth,t.pageHeight),i=getEffectiveCitationVariant(t,e.selectedStatementTransactionId,s);/* @__PURE__ */
11819
+ `,BottomHeader=styled$2(H6Medium)``;function _mergeNamespaces$1(e,t){return t.forEach(function(t){t&&"string"!=typeof t&&!Array.isArray(t)&&Object.keys(t).forEach(function(n){if("default"!==n&&!(n in e)){var o=Object.getOwnPropertyDescriptor(t,n);Object.defineProperty(e,n,o.get?o:{enumerable:!0,get:function(){return t[n]}})}})}),Object.freeze(e)}function copyExifWithoutOrientation(e,t){return new Promise(function(n,o){let i;return getApp1Segment(e).then(function(e){try{return i=e,n(new Blob([t.slice(0,2),i,t.slice(2)],{type:"image/jpeg"}))}catch(r){return o(r)}},o)})}const getApp1Segment=e=>new Promise((t,n)=>{const o=new FileReader;o.addEventListener("load",({target:{result:e}})=>{const o=new DataView(e);let i=0;if(65496!==o.getUint16(i))return n("not a valid JPEG");for(i+=2;;){const r=o.getUint16(i);if(65498===r)break;const a=o.getUint16(i+2);if(65505===r&&1165519206===o.getUint32(i+4)){const r=i+10;let s;switch(o.getUint16(r)){case 18761:s=!0;break;case 19789:s=!1;break;default:return n("TIFF header contains invalid endian")}if(42!==o.getUint16(r+2,s))return n("TIFF header contains invalid version");const l=o.getUint32(r+4,s),c=r+l+2+12*o.getUint16(r+l,s);for(let e=r+l+2;e<c;e+=12)if(274==o.getUint16(e,s)){if(3!==o.getUint16(e+2,s))return n("Orientation data type is invalid");if(1!==o.getUint32(e+4,s))return n("Orientation data count is invalid");o.setUint16(e+8,1,s);break}return t(e.slice(i,i+2+a))}i+=2+a}return t(new Blob)}),o.readAsArrayBuffer(e)});var e={},t={get exports(){return e},set exports(t){e=t}},r2,i3,UZIP2;UZIP2={},t.exports=UZIP2,UZIP2.parse=function(e,t){for(var n=UZIP2.bin.readUshort,o=UZIP2.bin.readUint,i=0,r={},a=new Uint8Array(e),s=a.length-4;101010256!=o(a,s);)s--;i=s,i+=4;var l=n(a,i+=4);n(a,i+=2);var c=o(a,i+=2),d=o(a,i+=4);i+=4,i=d;for(var p=0;p<l;p++){o(a,i),i+=4,i+=4,i+=4,o(a,i+=4),c=o(a,i+=4);var u=o(a,i+=4),m=n(a,i+=4),h=n(a,i+2),g=n(a,i+4);i+=6;var x=o(a,i+=8);i+=4,i+=m+h+g,UZIP2._readLocal(a,x,r,c,u,t)}return r},UZIP2._readLocal=function(e,t,n,o,i,r){var a=UZIP2.bin.readUshort,s=UZIP2.bin.readUint;s(e,t),a(e,t+=4),a(e,t+=2);var l=a(e,t+=2);s(e,t+=2),s(e,t+=4),t+=4;var c=a(e,t+=8),d=a(e,t+=2);t+=2;var p=UZIP2.bin.readUTF8(e,t,c);if(t+=c,t+=d,r)n[p]={size:i,csize:o};else{var u=new Uint8Array(e.buffer,t);if(0==l)n[p]=new Uint8Array(u.buffer.slice(t,t+o));else{if(8!=l)throw"unknown compression method: "+l;var m=new Uint8Array(i);UZIP2.inflateRaw(u,m),n[p]=m}}},UZIP2.inflateRaw=function(e,t){return UZIP2.F.inflate(e,t)},UZIP2.inflate=function(e,t){return e[0],e[1],UZIP2.inflateRaw(new Uint8Array(e.buffer,e.byteOffset+2,e.length-6),t)},UZIP2.deflate=function(e,t){null==t&&(t={level:6});var n=0,o=new Uint8Array(50+Math.floor(1.1*e.length));o[n]=120,o[n+1]=156,n+=2,n=UZIP2.F.deflateRaw(e,o,n,t.level);var i=UZIP2.adler(e,0,e.length);return o[n+0]=i>>>24&255,o[n+1]=i>>>16&255,o[n+2]=i>>>8&255,o[n+3]=i>>>0&255,new Uint8Array(o.buffer,0,n+4)},UZIP2.deflateRaw=function(e,t){null==t&&(t={level:6});var n=new Uint8Array(50+Math.floor(1.1*e.length)),o=UZIP2.F.deflateRaw(e,n,o,t.level);return new Uint8Array(n.buffer,0,o)},UZIP2.encode=function(e,t){null==t&&(t=!1);var n=0,o=UZIP2.bin.writeUint,i=UZIP2.bin.writeUshort,r={};for(var a in e){var s=!UZIP2._noNeed(a)&&!t,l=e[a],c=UZIP2.crc.crc(l,0,l.length);r[a]={cpr:s,usize:l.length,crc:c,file:s?UZIP2.deflateRaw(l):l}}for(var a in r)n+=r[a].file.length+30+46+2*UZIP2.bin.sizeUTF8(a);n+=22;var d=new Uint8Array(n),p=0,u=[];for(var a in r){var m=r[a];u.push(p),p=UZIP2._writeHeader(d,p,a,m,0)}var h=0,g=p;for(var a in r)m=r[a],u.push(p),p=UZIP2._writeHeader(d,p,a,m,1,u[h++]);var x=p-g;return o(d,p,101010256),p+=4,i(d,p+=4,h),i(d,p+=2,h),o(d,p+=2,x),o(d,p+=4,g),p+=4,p+=2,d.buffer},UZIP2._noNeed=function(e){var t=e.split(".").pop().toLowerCase();return-1!="png,jpg,jpeg,zip".indexOf(t)},UZIP2._writeHeader=function(e,t,n,o,i,r){var a=UZIP2.bin.writeUint,s=UZIP2.bin.writeUshort,l=o.file;return a(e,t,0==i?67324752:33639248),t+=4,1==i&&(t+=2),s(e,t,20),s(e,t+=2,0),s(e,t+=2,o.cpr?8:0),a(e,t+=2,0),a(e,t+=4,o.crc),a(e,t+=4,l.length),a(e,t+=4,o.usize),s(e,t+=4,UZIP2.bin.sizeUTF8(n)),s(e,t+=2,0),t+=2,1==i&&(t+=2,t+=2,a(e,t+=6,r),t+=4),t+=UZIP2.bin.writeUTF8(e,t,n),0==i&&(e.set(l,t),t+=l.length),t},UZIP2.crc={table:function(){for(var e=new Uint32Array(256),t=0;t<256;t++){for(var n=t,o=0;o<8;o++)1&n?n=3988292384^n>>>1:n>>>=1;e[t]=n}return e}(),update:function(e,t,n,o){for(var i=0;i<o;i++)e=UZIP2.crc.table[255&(e^t[n+i])]^e>>>8;return e},crc:function(e,t,n){return 4294967295^UZIP2.crc.update(4294967295,e,t,n)}},UZIP2.adler=function(e,t,n){for(var o=1,i=0,r=t,a=t+n;r<a;){for(var s=Math.min(r+5552,a);r<s;)i+=o+=e[r++];o%=65521,i%=65521}return i<<16|o},UZIP2.bin={readUshort:function(e,t){return e[t]|e[t+1]<<8},writeUshort:function(e,t,n){e[t]=255&n,e[t+1]=n>>8&255},readUint:function(e,t){return 16777216*e[t+3]+(e[t+2]<<16|e[t+1]<<8|e[t])},writeUint:function(e,t,n){e[t]=255&n,e[t+1]=n>>8&255,e[t+2]=n>>16&255,e[t+3]=n>>24&255},readASCII:function(e,t,n){for(var o="",i=0;i<n;i++)o+=String.fromCharCode(e[t+i]);return o},writeASCII:function(e,t,n){for(var o=0;o<n.length;o++)e[t+o]=n.charCodeAt(o)},pad:function(e){return e.length<2?"0"+e:e},readUTF8:function(e,t,n){for(var o,i="",r=0;r<n;r++)i+="%"+UZIP2.bin.pad(e[t+r].toString(16));try{o=decodeURIComponent(i)}catch(a){return UZIP2.bin.readASCII(e,t,n)}return o},writeUTF8:function(e,t,n){for(var o=n.length,i=0,r=0;r<o;r++){var a=n.charCodeAt(r);if(4294967168&a)if(4294965248&a)if(4294901760&a){if(4292870144&a)throw"e";e[t+i]=240|a>>18,e[t+i+1]=128|a>>12&63,e[t+i+2]=128|a>>6&63,e[t+i+3]=128|63&a,i+=4}else e[t+i]=224|a>>12,e[t+i+1]=128|a>>6&63,e[t+i+2]=128|63&a,i+=3;else e[t+i]=192|a>>6,e[t+i+1]=128|63&a,i+=2;else e[t+i]=a,i++}return i},sizeUTF8:function(e){for(var t=e.length,n=0,o=0;o<t;o++){var i=e.charCodeAt(o);if(4294967168&i)if(4294965248&i)if(4294901760&i){if(4292870144&i)throw"e";n+=4}else n+=3;else n+=2;else n++}return n}},UZIP2.F={},UZIP2.F.deflateRaw=function(e,t,n,o){var i=[[0,0,0,0,0],[4,4,8,4,0],[4,5,16,8,0],[4,6,16,16,0],[4,10,16,32,0],[8,16,32,32,0],[8,16,128,128,0],[8,32,128,256,0],[32,128,258,1024,1],[32,258,258,4096,1]][o],r=UZIP2.F.U,a=UZIP2.F._goodIndex;UZIP2.F._hash;var s=UZIP2.F._putsE,l=0,c=n<<3,d=0,p=e.length;if(0==o){for(;l<p;)s(t,c,l+(v=Math.min(65535,p-l))==p?1:0),c=UZIP2.F._copyExact(e,l,v,t,c+8),l+=v;return c>>>3}var u=r.lits,m=r.strt,h=r.prev,g=0,x=0,f=0,y=0,S=0,C=0;for(p>2&&(m[C=UZIP2.F._hash(e,0)]=0),l=0;l<p;l++){if(S=C,l+1<p-2){C=UZIP2.F._hash(e,l+1);var $=l+1&32767;h[$]=m[C],m[C]=$}if(d<=l){(g>14e3||x>26697)&&p-l>100&&(d<l&&(u[g]=l-d,g+=2,d=l),c=UZIP2.F._writeBlock(l==p-1||d==p?1:0,u,g,y,e,f,l-f,t,c),g=x=y=0,f=l);var b=0;l<p-2&&(b=UZIP2.F._bestMatch(e,l,h,S,Math.min(i[2],p-l),i[3]));var v=b>>>16,E=65535&b;if(0!=b){E=65535&b;var w=a(v=b>>>16,r.of0);r.lhst[257+w]++;var R=a(E,r.df0);r.dhst[R]++,y+=r.exb[w]+r.dxb[R],u[g]=v<<23|l-d,u[g+1]=E<<16|w<<8|R,g+=2,d=l+v}else r.lhst[e[l]]++;x++}}for(f==l&&0!=e.length||(d<l&&(u[g]=l-d,g+=2,d=l),c=UZIP2.F._writeBlock(1,u,g,y,e,f,l-f,t,c),g=0,x=0,g=x=y=0,f=l);7&c;)c++;return c>>>3},UZIP2.F._bestMatch=function(e,t,n,o,i,r){var a=32767&t,s=n[a],l=a-s+32768&32767;if(s==a||o!=UZIP2.F._hash(e,t-l))return 0;for(var c=0,d=0,p=Math.min(32767,t);l<=p&&0!=--r&&s!=a;){if(0==c||e[t+c]==e[t+c-l]){var u=UZIP2.F._howLong(e,t,l);if(u>c){if(d=l,(c=u)>=i)break;l+2<u&&(u=l+2);for(var m=0,h=0;h<u-2;h++){var g=t-l+h+32768&32767,x=g-n[g]+32768&32767;x>m&&(m=x,s=g)}}}l+=(a=s)-(s=n[a])+32768&32767}return c<<16|d},UZIP2.F._howLong=function(e,t,n){if(e[t]!=e[t-n]||e[t+1]!=e[t+1-n]||e[t+2]!=e[t+2-n])return 0;var o=t,i=Math.min(e.length,t+258);for(t+=3;t<i&&e[t]==e[t-n];)t++;return t-o},UZIP2.F._hash=function(e,t){return(e[t]<<8|e[t+1])+(e[t+2]<<4)&65535},UZIP2.saved=0,UZIP2.F._writeBlock=function(e,t,n,o,i,r,a,s,l){var c,d,p,u,m,h,g,x,f,y=UZIP2.F.U,S=UZIP2.F._putsF,C=UZIP2.F._putsE;y.lhst[256]++,d=(c=UZIP2.F.getTrees())[0],p=c[1],u=c[2],m=c[3],h=c[4],g=c[5],x=c[6],f=c[7];var $=32+(l+3&7?8-(l+3&7):0)+(a<<3),b=o+UZIP2.F.contSize(y.fltree,y.lhst)+UZIP2.F.contSize(y.fdtree,y.dhst),v=o+UZIP2.F.contSize(y.ltree,y.lhst)+UZIP2.F.contSize(y.dtree,y.dhst);v+=14+3*g+UZIP2.F.contSize(y.itree,y.ihst)+(2*y.ihst[16]+3*y.ihst[17]+7*y.ihst[18]);for(var E=0;E<286;E++)y.lhst[E]=0;for(E=0;E<30;E++)y.dhst[E]=0;for(E=0;E<19;E++)y.ihst[E]=0;var w=$<b&&$<v?0:b<v?1:2;if(S(s,l,e),S(s,l+1,w),l+=3,0==w){for(;7&l;)l++;l=UZIP2.F._copyExact(i,r,a,s,l)}else{var R,A;if(1==w&&(R=y.fltree,A=y.fdtree),2==w){UZIP2.F.makeCodes(y.ltree,d),UZIP2.F.revCodes(y.ltree,d),UZIP2.F.makeCodes(y.dtree,p),UZIP2.F.revCodes(y.dtree,p),UZIP2.F.makeCodes(y.itree,u),UZIP2.F.revCodes(y.itree,u),R=y.ltree,A=y.dtree,C(s,l,m-257),C(s,l+=5,h-1),C(s,l+=5,g-4),l+=4;for(var j=0;j<g;j++)C(s,l+3*j,y.itree[1+(y.ordr[j]<<1)]);l+=3*g,l=UZIP2.F._codeTiny(x,y.itree,s,l),l=UZIP2.F._codeTiny(f,y.itree,s,l)}for(var T=r,I=0;I<n;I+=2){for(var k=t[I],L=k>>>23,D=T+(8388607&k);T<D;)l=UZIP2.F._writeLit(i[T++],R,s,l);if(0!=L){var _=t[I+1],P=_>>16,B=_>>8&255,M=255&_;C(s,l=UZIP2.F._writeLit(257+B,R,s,l),L-y.of0[B]),l+=y.exb[B],S(s,l=UZIP2.F._writeLit(M,A,s,l),P-y.df0[M]),l+=y.dxb[M],T+=L}}l=UZIP2.F._writeLit(256,R,s,l)}return l},UZIP2.F._copyExact=function(e,t,n,o,i){var r=i>>>3;return o[r]=n,o[r+1]=n>>>8,o[r+2]=255-o[r],o[r+3]=255-o[r+1],r+=4,o.set(new Uint8Array(e.buffer,t,n),r),i+(n+4<<3)},UZIP2.F.getTrees=function(){for(var e=UZIP2.F.U,t=UZIP2.F._hufTree(e.lhst,e.ltree,15),n=UZIP2.F._hufTree(e.dhst,e.dtree,15),o=[],i=UZIP2.F._lenCodes(e.ltree,o),r=[],a=UZIP2.F._lenCodes(e.dtree,r),s=0;s<o.length;s+=2)e.ihst[o[s]]++;for(s=0;s<r.length;s+=2)e.ihst[r[s]]++;for(var l=UZIP2.F._hufTree(e.ihst,e.itree,7),c=19;c>4&&0==e.itree[1+(e.ordr[c-1]<<1)];)c--;return[t,n,l,i,a,c,o,r]},UZIP2.F.getSecond=function(e){for(var t=[],n=0;n<e.length;n+=2)t.push(e[n+1]);return t},UZIP2.F.nonZero=function(e){for(var t="",n=0;n<e.length;n+=2)0!=e[n+1]&&(t+=(n>>1)+",");return t},UZIP2.F.contSize=function(e,t){for(var n=0,o=0;o<t.length;o++)n+=t[o]*e[1+(o<<1)];return n},UZIP2.F._codeTiny=function(e,t,n,o){for(var i=0;i<e.length;i+=2){var r=e[i],a=e[i+1];o=UZIP2.F._writeLit(r,t,n,o);var s=16==r?2:17==r?3:7;r>15&&(UZIP2.F._putsE(n,o,a,s),o+=s)}return o},UZIP2.F._lenCodes=function(e,t){for(var n=e.length;2!=n&&0==e[n-1];)n-=2;for(var o=0;o<n;o+=2){var i=e[o+1],r=o+3<n?e[o+3]:-1,a=o+5<n?e[o+5]:-1,s=0==o?-1:e[o-1];if(0==i&&r==i&&a==i){for(var l=o+5;l+2<n&&e[l+2]==i;)l+=2;(c=Math.min(l+1-o>>>1,138))<11?t.push(17,c-3):t.push(18,c-11),o+=2*c-2}else if(i==s&&r==i&&a==i){for(l=o+5;l+2<n&&e[l+2]==i;)l+=2;var c=Math.min(l+1-o>>>1,6);t.push(16,c-3),o+=2*c-2}else t.push(i,0)}return n>>>1},UZIP2.F._hufTree=function(e,t,n){var o=[],i=e.length,r=t.length,a=0;for(a=0;a<r;a+=2)t[a]=0,t[a+1]=0;for(a=0;a<i;a++)0!=e[a]&&o.push({lit:a,f:e[a]});var s=o.length,l=o.slice(0);if(0==s)return 0;if(1==s){var c=o[0].lit;return l=0==c?1:0,t[1+(c<<1)]=1,t[1+(l<<1)]=1,1}o.sort(function(e,t){return e.f-t.f});var d=o[0],p=o[1],u=0,m=1,h=2;for(o[0]={lit:-1,f:d.f+p.f,l:d,r:p,d:0};m!=s-1;)d=u!=m&&(h==s||o[u].f<o[h].f)?o[u++]:o[h++],p=u!=m&&(h==s||o[u].f<o[h].f)?o[u++]:o[h++],o[m++]={lit:-1,f:d.f+p.f,l:d,r:p};var g=UZIP2.F.setDepth(o[m-1],0);for(g>n&&(UZIP2.F.restrictDepth(l,n,g),g=n),a=0;a<s;a++)t[1+(l[a].lit<<1)]=l[a].d;return g},UZIP2.F.setDepth=function(e,t){return-1!=e.lit?(e.d=t,t):Math.max(UZIP2.F.setDepth(e.l,t+1),UZIP2.F.setDepth(e.r,t+1))},UZIP2.F.restrictDepth=function(e,t,n){var o=0,i=1<<n-t,r=0;for(e.sort(function(e,t){return t.d==e.d?e.f-t.f:t.d-e.d}),o=0;o<e.length&&e[o].d>t;o++){var a=e[o].d;e[o].d=t,r+=i-(1<<n-a)}for(r>>>=n-t;r>0;)(a=e[o].d)<t?(e[o].d++,r-=1<<t-a-1):o++;for(;o>=0;o--)e[o].d==t&&r<0&&(e[o].d--,r++);0!=r&&console.log("debt left")},UZIP2.F._goodIndex=function(e,t){var n=0;return t[16|n]<=e&&(n|=16),t[8|n]<=e&&(n|=8),t[4|n]<=e&&(n|=4),t[2|n]<=e&&(n|=2),t[1|n]<=e&&(n|=1),n},UZIP2.F._writeLit=function(e,t,n,o){return UZIP2.F._putsF(n,o,t[e<<1]),o+t[1+(e<<1)]},UZIP2.F.inflate=function(e,t){var n=Uint8Array;if(3==e[0]&&0==e[1])return t||new n(0);var o=UZIP2.F,i=o._bitsF,r=o._bitsE,a=o._decodeTiny,s=o.makeCodes,l=o.codes2map,c=o._get17,d=o.U,p=null==t;p&&(t=new n(e.length>>>2<<3));for(var u,m,h=0,g=0,x=0,f=0,y=0,S=0,C=0,$=0,b=0;0==h;)if(h=i(e,b,1),g=i(e,b+1,2),b+=3,0!=g){if(p&&(t=UZIP2.F._check(t,$+(1<<17))),1==g&&(u=d.flmap,m=d.fdmap,S=511,C=31),2==g){x=r(e,b,5)+257,f=r(e,b+5,5)+1,y=r(e,b+10,4)+4,b+=14;for(var v=0;v<38;v+=2)d.itree[v]=0,d.itree[v+1]=0;var E=1;for(v=0;v<y;v++){var w=r(e,b+3*v,3);d.itree[1+(d.ordr[v]<<1)]=w,w>E&&(E=w)}b+=3*y,s(d.itree,E),l(d.itree,E,d.imap),u=d.lmap,m=d.dmap,b=a(d.imap,(1<<E)-1,x+f,e,b,d.ttree);var R=o._copyOut(d.ttree,0,x,d.ltree);S=(1<<R)-1;var A=o._copyOut(d.ttree,x,f,d.dtree);C=(1<<A)-1,s(d.ltree,R),l(d.ltree,R,u),s(d.dtree,A),l(d.dtree,A,m)}for(;;){var j=u[c(e,b)&S];b+=15&j;var T=j>>>4;if(T>>>8==0)t[$++]=T;else{if(256==T)break;var I=$+T-254;if(T>264){var k=d.ldef[T-257];I=$+(k>>>3)+r(e,b,7&k),b+=7&k}var L=m[c(e,b)&C];b+=15&L;var D=L>>>4,_=d.ddef[D],P=(_>>>4)+i(e,b,15&_);for(b+=15&_,p&&(t=UZIP2.F._check(t,$+(1<<17)));$<I;)t[$]=t[$++-P],t[$]=t[$++-P],t[$]=t[$++-P],t[$]=t[$++-P];$=I}}}else{7&b&&(b+=8-(7&b));var B=4+(b>>>3),M=e[B-4]|e[B-3]<<8;p&&(t=UZIP2.F._check(t,$+M)),t.set(new n(e.buffer,e.byteOffset+B,M),$),b=B+M<<3,$+=M}return t.length==$?t:t.slice(0,$)},UZIP2.F._check=function(e,t){var n=e.length;if(t<=n)return e;var o=new Uint8Array(Math.max(n<<1,t));return o.set(e,0),o},UZIP2.F._decodeTiny=function(e,t,n,o,i,r){for(var a=UZIP2.F._bitsE,s=UZIP2.F._get17,l=0;l<n;){var c=e[s(o,i)&t];i+=15&c;var d=c>>>4;if(d<=15)r[l]=d,l++;else{var p=0,u=0;16==d?(u=3+a(o,i,2),i+=2,p=r[l-1]):17==d?(u=3+a(o,i,3),i+=3):18==d&&(u=11+a(o,i,7),i+=7);for(var m=l+u;l<m;)r[l]=p,l++}}return i},UZIP2.F._copyOut=function(e,t,n,o){for(var i=0,r=0,a=o.length>>>1;r<n;){var s=e[r+t];o[r<<1]=0,o[1+(r<<1)]=s,s>i&&(i=s),r++}for(;r<a;)o[r<<1]=0,o[1+(r<<1)]=0,r++;return i},UZIP2.F.makeCodes=function(e,t){for(var n,o,i,r,a=UZIP2.F.U,s=e.length,l=a.bl_count,c=0;c<=t;c++)l[c]=0;for(c=1;c<s;c+=2)l[e[c]]++;var d=a.next_code;for(n=0,l[0]=0,o=1;o<=t;o++)n=n+l[o-1]<<1,d[o]=n;for(i=0;i<s;i+=2)0!=(r=e[i+1])&&(e[i]=d[r],d[r]++)},UZIP2.F.codes2map=function(e,t,n){for(var o=e.length,i=UZIP2.F.U.rev15,r=0;r<o;r+=2)if(0!=e[r+1])for(var a=r>>1,s=e[r+1],l=a<<4|s,c=t-s,d=e[r]<<c,p=d+(1<<c);d!=p;)n[i[d]>>>15-t]=l,d++},UZIP2.F.revCodes=function(e,t){for(var n=UZIP2.F.U.rev15,o=15-t,i=0;i<e.length;i+=2){var r=e[i]<<t-e[i+1];e[i]=n[r]>>>o}},UZIP2.F._putsE=function(e,t,n){n<<=7&t;var o=t>>>3;e[o]|=n,e[o+1]|=n>>>8},UZIP2.F._putsF=function(e,t,n){n<<=7&t;var o=t>>>3;e[o]|=n,e[o+1]|=n>>>8,e[o+2]|=n>>>16},UZIP2.F._bitsE=function(e,t,n){return(e[t>>>3]|e[1+(t>>>3)]<<8)>>>(7&t)&(1<<n)-1},UZIP2.F._bitsF=function(e,t,n){return(e[t>>>3]|e[1+(t>>>3)]<<8|e[2+(t>>>3)]<<16)>>>(7&t)&(1<<n)-1},UZIP2.F._get17=function(e,t){return(e[t>>>3]|e[1+(t>>>3)]<<8|e[2+(t>>>3)]<<16)>>>(7&t)},UZIP2.F._get25=function(e,t){return(e[t>>>3]|e[1+(t>>>3)]<<8|e[2+(t>>>3)]<<16|e[3+(t>>>3)]<<24)>>>(7&t)},UZIP2.F.U=(r2=Uint16Array,i3=Uint32Array,{next_code:new r2(16),bl_count:new r2(16),ordr:[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],of0:[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,999,999,999],exb:[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0],ldef:new r2(32),df0:[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,65535,65535],dxb:[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0],ddef:new i3(32),flmap:new r2(512),fltree:[],fdmap:new r2(32),fdtree:[],lmap:new r2(32768),ltree:[],ttree:[],dmap:new r2(32768),dtree:[],imap:new r2(512),itree:[],rev15:new r2(32768),lhst:new i3(286),dhst:new i3(30),ihst:new i3(19),lits:new i3(15e3),strt:new r2(65536),prev:new r2(32768)}),function(){for(var e=UZIP2.F.U,t=0;t<32768;t++){var n=t;n=(4278255360&(n=(4042322160&(n=(3435973836&(n=(2863311530&n)>>>1|(1431655765&n)<<1))>>>2|(858993459&n)<<2))>>>4|(252645135&n)<<4))>>>8|(16711935&n)<<8,e.rev15[t]=(n>>>16|n<<16)>>>17}function o(e,t,n){for(;0!=t--;)e.push(0,n)}for(t=0;t<32;t++)e.ldef[t]=e.of0[t]<<3|e.exb[t],e.ddef[t]=e.df0[t]<<4|e.dxb[t];o(e.fltree,144,8),o(e.fltree,112,9),o(e.fltree,24,7),o(e.fltree,8,8),UZIP2.F.makeCodes(e.fltree,9),UZIP2.F.codes2map(e.fltree,9,e.flmap),UZIP2.F.revCodes(e.fltree,9),o(e.fdtree,32,5),UZIP2.F.makeCodes(e.fdtree,5),UZIP2.F.codes2map(e.fdtree,5,e.fdmap),UZIP2.F.revCodes(e.fdtree,5),o(e.itree,19,0),o(e.ltree,286,0),o(e.dtree,30,0),o(e.ttree,320,0)}();var UZIP=_mergeNamespaces$1({__proto__:null,default:e},[e]);const UPNG=function(){var e={nextZero(e,t){for(;0!=e[t];)t++;return t},readUshort:(e,t)=>e[t]<<8|e[t+1],writeUshort(e,t,n){e[t]=n>>8&255,e[t+1]=255&n},readUint:(e,t)=>16777216*e[t]+(e[t+1]<<16|e[t+2]<<8|e[t+3]),writeUint(e,t,n){e[t]=n>>24&255,e[t+1]=n>>16&255,e[t+2]=n>>8&255,e[t+3]=255&n},readASCII(e,t,n){let o="";for(let i=0;i<n;i++)o+=String.fromCharCode(e[t+i]);return o},writeASCII(e,t,n){for(let o=0;o<n.length;o++)e[t+o]=n.charCodeAt(o)},readBytes(e,t,n){const o=[];for(let i=0;i<n;i++)o.push(e[t+i]);return o},pad:e=>e.length<2?`0${e}`:e,readUTF8(t,n,o){let i,r="";for(let s=0;s<o;s++)r+=`%${e.pad(t[n+s].toString(16))}`;try{i=decodeURIComponent(r)}catch(a){return e.readASCII(t,n,o)}return i}};function t(t,n,o,i){const a=n*o,s=r(i),l=Math.ceil(n*s/8),c=new Uint8Array(4*a),d=new Uint32Array(c.buffer),{ctype:p}=i,{depth:u}=i,m=e.readUshort;if(6==p){const e=a<<2;if(8==u)for(var h=0;h<e;h+=4)c[h]=t[h],c[h+1]=t[h+1],c[h+2]=t[h+2],c[h+3]=t[h+3];if(16==u)for(h=0;h<e;h++)c[h]=t[h<<1]}else if(2==p){const e=i.tabs.tRNS;if(null==e){if(8==u)for(h=0;h<a;h++){var g=3*h;d[h]=255<<24|t[g+2]<<16|t[g+1]<<8|t[g]}if(16==u)for(h=0;h<a;h++)g=6*h,d[h]=255<<24|t[g+4]<<16|t[g+2]<<8|t[g]}else{var x=e[0];const n=e[1],o=e[2];if(8==u)for(h=0;h<a;h++){var f=h<<2;g=3*h,d[h]=255<<24|t[g+2]<<16|t[g+1]<<8|t[g],t[g]==x&&t[g+1]==n&&t[g+2]==o&&(c[f+3]=0)}if(16==u)for(h=0;h<a;h++)f=h<<2,g=6*h,d[h]=255<<24|t[g+4]<<16|t[g+2]<<8|t[g],m(t,g)==x&&m(t,g+2)==n&&m(t,g+4)==o&&(c[f+3]=0)}}else if(3==p){const e=i.tabs.PLTE,r=i.tabs.tRNS,s=r?r.length:0;if(1==u)for(var y=0;y<o;y++){var S=y*l,C=y*n;for(h=0;h<n;h++){f=C+h<<2;var $=3*(b=t[S+(h>>3)]>>7-(7&h)&1);c[f]=e[$],c[f+1]=e[$+1],c[f+2]=e[$+2],c[f+3]=b<s?r[b]:255}}if(2==u)for(y=0;y<o;y++)for(S=y*l,C=y*n,h=0;h<n;h++)f=C+h<<2,$=3*(b=t[S+(h>>2)]>>6-((3&h)<<1)&3),c[f]=e[$],c[f+1]=e[$+1],c[f+2]=e[$+2],c[f+3]=b<s?r[b]:255;if(4==u)for(y=0;y<o;y++)for(S=y*l,C=y*n,h=0;h<n;h++)f=C+h<<2,$=3*(b=t[S+(h>>1)]>>4-((1&h)<<2)&15),c[f]=e[$],c[f+1]=e[$+1],c[f+2]=e[$+2],c[f+3]=b<s?r[b]:255;if(8==u)for(h=0;h<a;h++){var b;f=h<<2,$=3*(b=t[h]),c[f]=e[$],c[f+1]=e[$+1],c[f+2]=e[$+2],c[f+3]=b<s?r[b]:255}}else if(4==p){if(8==u)for(h=0;h<a;h++){f=h<<2;var v=t[E=h<<1];c[f]=v,c[f+1]=v,c[f+2]=v,c[f+3]=t[E+1]}if(16==u)for(h=0;h<a;h++){var E;f=h<<2,v=t[E=h<<2],c[f]=v,c[f+1]=v,c[f+2]=v,c[f+3]=t[E+2]}}else if(0==p)for(x=i.tabs.tRNS?i.tabs.tRNS:-1,y=0;y<o;y++){const e=y*l,o=y*n;if(1==u)for(var w=0;w<n;w++){var R=(v=255*(t[e+(w>>>3)]>>>7-(7&w)&1))==255*x?0:255;d[o+w]=R<<24|v<<16|v<<8|v}else if(2==u)for(w=0;w<n;w++)R=(v=85*(t[e+(w>>>2)]>>>6-((3&w)<<1)&3))==85*x?0:255,d[o+w]=R<<24|v<<16|v<<8|v;else if(4==u)for(w=0;w<n;w++)R=(v=17*(t[e+(w>>>1)]>>>4-((1&w)<<2)&15))==17*x?0:255,d[o+w]=R<<24|v<<16|v<<8|v;else if(8==u)for(w=0;w<n;w++)R=(v=t[e+w])==x?0:255,d[o+w]=R<<24|v<<16|v<<8|v;else if(16==u)for(w=0;w<n;w++)v=t[e+(w<<1)],R=m(t,e+(w<<1))==x?0:255,d[o+w]=R<<24|v<<16|v<<8|v}return c}function n(e,t,n,s){const l=r(e),c=Math.ceil(n*l/8),d=new Uint8Array((c+1+e.interlace)*s);return t=e.tabs.CgBI?i(t,d):o(t,d),0==e.interlace?t=a(t,e,0,n,s):1==e.interlace&&(t=function(e,t){const n=t.width,o=t.height,i=r(t),s=i>>3,l=Math.ceil(n*i/8),c=new Uint8Array(o*l);let d=0;const p=[0,0,4,0,2,0,1],u=[0,4,0,2,0,1,0],m=[8,8,8,4,4,2,2],h=[8,8,4,4,2,2,1];let g=0;for(;g<7;){const r=m[g],f=h[g];let y=0,S=0,C=p[g];for(;C<o;)C+=r,S++;let $=u[g];for(;$<n;)$+=f,y++;const b=Math.ceil(y*i/8);a(e,t,d,y,S);let v=0,E=p[g];for(;E<o;){let t=u[g],o=d+v*b<<3;for(;t<n;){var x;if(1==i&&(x=(x=e[o>>3])>>7-(7&o)&1,c[E*l+(t>>3)]|=x<<7-(7&t)),2==i&&(x=(x=e[o>>3])>>6-(7&o)&3,c[E*l+(t>>2)]|=x<<6-((3&t)<<1)),4==i&&(x=(x=e[o>>3])>>4-(7&o)&15,c[E*l+(t>>1)]|=x<<4-((1&t)<<2)),i>=8){const n=E*l+t*s;for(let t=0;t<s;t++)c[n+t]=e[(o>>3)+t]}o+=i,t+=f}v++,E+=r}y*S!=0&&(d+=S*(1+b)),g+=1}return c}(t,e)),t}function o(e,t){return i(new Uint8Array(e.buffer,2,e.length-6),t)}var i=function(){const e={H:{}};return e.H.N=function(t,n){const o=Uint8Array;let i,r,a=0,s=0,l=0,c=0,d=0,p=0,u=0,m=0,h=0;if(3==t[0]&&0==t[1])return n||new o(0);const g=e.H,x=g.b,f=g.e,y=g.R,S=g.n,C=g.A,$=g.Z,b=g.m,v=null==n;for(v&&(n=new o(t.length>>>2<<5));0==a;)if(a=x(t,h,1),s=x(t,h+1,2),h+=3,0!=s){if(v&&(n=e.H.W(n,m+(1<<17))),1==s&&(i=b.J,r=b.h,p=511,u=31),2==s){l=f(t,h,5)+257,c=f(t,h+5,5)+1,d=f(t,h+10,4)+4,h+=14;let e=1;for(var E=0;E<38;E+=2)b.Q[E]=0,b.Q[E+1]=0;for(E=0;E<d;E++){const n=f(t,h+3*E,3);b.Q[1+(b.X[E]<<1)]=n,n>e&&(e=n)}h+=3*d,S(b.Q,e),C(b.Q,e,b.u),i=b.w,r=b.d,h=y(b.u,(1<<e)-1,l+c,t,h,b.v);const n=g.V(b.v,0,l,b.C);p=(1<<n)-1;const o=g.V(b.v,l,c,b.D);u=(1<<o)-1,S(b.C,n),C(b.C,n,i),S(b.D,o),C(b.D,o,r)}for(;;){const e=i[$(t,h)&p];h+=15&e;const o=e>>>4;if(o>>>8==0)n[m++]=o;else{if(256==o)break;{let e=m+o-254;if(o>264){const n=b.q[o-257];e=m+(n>>>3)+f(t,h,7&n),h+=7&n}const i=r[$(t,h)&u];h+=15&i;const a=i>>>4,s=b.c[a],l=(s>>>4)+x(t,h,15&s);for(h+=15&s;m<e;)n[m]=n[m++-l],n[m]=n[m++-l],n[m]=n[m++-l],n[m]=n[m++-l];m=e}}}}else{7&h&&(h+=8-(7&h));const i=4+(h>>>3),r=t[i-4]|t[i-3]<<8;v&&(n=e.H.W(n,m+r)),n.set(new o(t.buffer,t.byteOffset+i,r),m),h=i+r<<3,m+=r}return n.length==m?n:n.slice(0,m)},e.H.W=function(e,t){const n=e.length;if(t<=n)return e;const o=new Uint8Array(n<<1);return o.set(e,0),o},e.H.R=function(t,n,o,i,r,a){const s=e.H.e,l=e.H.Z;let c=0;for(;c<o;){const e=t[l(i,r)&n];r+=15&e;const o=e>>>4;if(o<=15)a[c]=o,c++;else{let e=0,t=0;16==o?(t=3+s(i,r,2),r+=2,e=a[c-1]):17==o?(t=3+s(i,r,3),r+=3):18==o&&(t=11+s(i,r,7),r+=7);const n=c+t;for(;c<n;)a[c]=e,c++}}return r},e.H.V=function(e,t,n,o){let i=0,r=0;const a=o.length>>>1;for(;r<n;){const n=e[r+t];o[r<<1]=0,o[1+(r<<1)]=n,n>i&&(i=n),r++}for(;r<a;)o[r<<1]=0,o[1+(r<<1)]=0,r++;return i},e.H.n=function(t,n){const o=e.H.m,i=t.length;let r,a,s,l;const c=o.j;for(var d=0;d<=n;d++)c[d]=0;for(d=1;d<i;d+=2)c[t[d]]++;const p=o.K;for(r=0,c[0]=0,a=1;a<=n;a++)r=r+c[a-1]<<1,p[a]=r;for(s=0;s<i;s+=2)l=t[s+1],0!=l&&(t[s]=p[l],p[l]++)},e.H.A=function(t,n,o){const i=t.length,r=e.H.m.r;for(let e=0;e<i;e+=2)if(0!=t[e+1]){const i=e>>1,a=t[e+1],s=i<<4|a,l=n-a;let c=t[e]<<l;const d=c+(1<<l);for(;c!=d;)o[r[c]>>>15-n]=s,c++}},e.H.l=function(t,n){const o=e.H.m.r,i=15-n;for(let e=0;e<t.length;e+=2){const r=t[e]<<n-t[e+1];t[e]=o[r]>>>i}},e.H.M=function(e,t,n){n<<=7&t;const o=t>>>3;e[o]|=n,e[o+1]|=n>>>8},e.H.I=function(e,t,n){n<<=7&t;const o=t>>>3;e[o]|=n,e[o+1]|=n>>>8,e[o+2]|=n>>>16},e.H.e=function(e,t,n){return(e[t>>>3]|e[1+(t>>>3)]<<8)>>>(7&t)&(1<<n)-1},e.H.b=function(e,t,n){return(e[t>>>3]|e[1+(t>>>3)]<<8|e[2+(t>>>3)]<<16)>>>(7&t)&(1<<n)-1},e.H.Z=function(e,t){return(e[t>>>3]|e[1+(t>>>3)]<<8|e[2+(t>>>3)]<<16)>>>(7&t)},e.H.i=function(e,t){return(e[t>>>3]|e[1+(t>>>3)]<<8|e[2+(t>>>3)]<<16|e[3+(t>>>3)]<<24)>>>(7&t)},e.H.m=function(){const e=Uint16Array,t=Uint32Array;return{K:new e(16),j:new e(16),X:[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],S:[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,999,999,999],T:[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0],q:new e(32),p:[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,65535,65535],z:[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0],c:new t(32),J:new e(512),_:[],h:new e(32),$:[],w:new e(32768),C:[],v:[],d:new e(32768),D:[],u:new e(512),Q:[],r:new e(32768),s:new t(286),Y:new t(30),a:new t(19),t:new t(15e3),k:new e(65536),g:new e(32768)}}(),function(){const t=e.H.m;for(var n=0;n<32768;n++){let e=n;e=(2863311530&e)>>>1|(1431655765&e)<<1,e=(3435973836&e)>>>2|(858993459&e)<<2,e=(4042322160&e)>>>4|(252645135&e)<<4,e=(4278255360&e)>>>8|(16711935&e)<<8,t.r[n]=(e>>>16|e<<16)>>>17}function o(e,t,n){for(;0!=t--;)e.push(0,n)}for(n=0;n<32;n++)t.q[n]=t.S[n]<<3|t.T[n],t.c[n]=t.p[n]<<4|t.z[n];o(t._,144,8),o(t._,112,9),o(t._,24,7),o(t._,8,8),e.H.n(t._,9),e.H.A(t._,9,t.J),e.H.l(t._,9),o(t.$,32,5),e.H.n(t.$,5),e.H.A(t.$,5,t.h),e.H.l(t.$,5),o(t.Q,19,0),o(t.C,286,0),o(t.D,30,0),o(t.v,320,0)}(),e.H.N}();function r(e){return[1,null,3,1,2,null,4][e.ctype]*e.depth}function a(e,t,n,o,i){let a=r(t);const l=Math.ceil(o*a/8);let c,d;a=Math.ceil(a/8);let p=e[n],u=0;if(p>1&&(e[n]=[0,0,1][p-2]),3==p)for(u=a;u<l;u++)e[u+1]=e[u+1]+(e[u+1-a]>>>1)&255;for(let r=0;r<i;r++)if(c=n+r*l,d=c+r+1,p=e[d-1],u=0,0==p)for(;u<l;u++)e[c+u]=e[d+u];else if(1==p){for(;u<a;u++)e[c+u]=e[d+u];for(;u<l;u++)e[c+u]=e[d+u]+e[c+u-a]}else if(2==p)for(;u<l;u++)e[c+u]=e[d+u]+e[c+u-l];else if(3==p){for(;u<a;u++)e[c+u]=e[d+u]+(e[c+u-l]>>>1);for(;u<l;u++)e[c+u]=e[d+u]+(e[c+u-l]+e[c+u-a]>>>1)}else{for(;u<a;u++)e[c+u]=e[d+u]+s(0,e[c+u-l],0);for(;u<l;u++)e[c+u]=e[d+u]+s(e[c+u-a],e[c+u-l],e[c+u-a-l])}return e}function s(e,t,n){const o=e+t-n,i=o-e,r=o-t,a=o-n;return i*i<=r*r&&i*i<=a*a?e:r*r<=a*a?t:n}function l(t,n,o){o.width=e.readUint(t,n),n+=4,o.height=e.readUint(t,n),n+=4,o.depth=t[n],n++,o.ctype=t[n],n++,o.compress=t[n],n++,o.filter=t[n],n++,o.interlace=t[n],n++}function c(e,t,n,o,i,r,a,s,l){const c=Math.min(t,i),d=Math.min(n,r);let p=0,u=0;for(let $=0;$<d;$++)for(let n=0;n<c;n++)if(a>=0&&s>=0?(p=$*t+n<<2,u=(s+$)*i+a+n<<2):(p=(-s+$)*t-a+n<<2,u=$*i+n<<2),0==l)o[u]=e[p],o[u+1]=e[p+1],o[u+2]=e[p+2],o[u+3]=e[p+3];else if(1==l){var m=e[p+3]*(1/255),h=e[p]*m,g=e[p+1]*m,x=e[p+2]*m,f=o[u+3]*(1/255),y=o[u]*f,S=o[u+1]*f,C=o[u+2]*f;const t=1-m,n=m+f*t,i=0==n?0:1/n;o[u+3]=255*n,o[u+0]=(h+y*t)*i,o[u+1]=(g+S*t)*i,o[u+2]=(x+C*t)*i}else if(2==l)m=e[p+3],h=e[p],g=e[p+1],x=e[p+2],f=o[u+3],y=o[u],S=o[u+1],C=o[u+2],m==f&&h==y&&g==S&&x==C?(o[u]=0,o[u+1]=0,o[u+2]=0,o[u+3]=0):(o[u]=h,o[u+1]=g,o[u+2]=x,o[u+3]=m);else if(3==l){if(m=e[p+3],h=e[p],g=e[p+1],x=e[p+2],f=o[u+3],y=o[u],S=o[u+1],C=o[u+2],m==f&&h==y&&g==S&&x==C)continue;if(m<220&&f>20)return!1}return!0}return{decode:function(t){const r=new Uint8Array(t);let a=8;const s=e,c=s.readUshort,d=s.readUint,p={tabs:{},frames:[]},u=new Uint8Array(r.length);let m,h=0,g=0;const x=[137,80,78,71,13,10,26,10];for(var f=0;f<8;f++)if(r[f]!=x[f])throw"The input is not a PNG file!";for(;a<r.length;){const e=s.readUint(r,a);a+=4;const t=s.readASCII(r,a,4);if(a+=4,"IHDR"==t)l(r,a,p);else if("iCCP"==t){for(var y=a;0!=r[y];)y++;s.readASCII(r,a,y-a),r[y+1];const n=r.slice(y+2,a+e);let l=null;try{l=o(n)}catch(w){l=i(n)}p.tabs[t]=l}else if("CgBI"==t)p.tabs[t]=r.slice(a,a+4);else if("IDAT"==t){for(f=0;f<e;f++)u[h+f]=r[a+f];h+=e}else if("acTL"==t)p.tabs[t]={num_frames:d(r,a),num_plays:d(r,a+4)},m=new Uint8Array(r.length);else if("fcTL"==t){0!=g&&((E=p.frames[p.frames.length-1]).data=n(p,m.slice(0,g),E.rect.width,E.rect.height),g=0);const e={x:d(r,a+12),y:d(r,a+16),width:d(r,a+4),height:d(r,a+8)};let t=c(r,a+22);t=c(r,a+20)/(0==t?100:t);const o={rect:e,delay:Math.round(1e3*t),dispose:r[a+24],blend:r[a+25]};p.frames.push(o)}else if("fdAT"==t){for(f=0;f<e-4;f++)m[g+f]=r[a+f+4];g+=e-4}else if("pHYs"==t)p.tabs[t]=[s.readUint(r,a),s.readUint(r,a+4),r[a+8]];else if("cHRM"==t)for(p.tabs[t]=[],f=0;f<8;f++)p.tabs[t].push(s.readUint(r,a+4*f));else if("tEXt"==t||"zTXt"==t){null==p.tabs[t]&&(p.tabs[t]={});var S=s.nextZero(r,a),C=s.readASCII(r,a,S-a),$=a+e-S-1;if("tEXt"==t)v=s.readASCII(r,S+1,$);else{var b=o(r.slice(S+2,S+2+$));v=s.readUTF8(b,0,b.length)}p.tabs[t][C]=v}else if("iTXt"==t){null==p.tabs[t]&&(p.tabs[t]={}),S=0,y=a,S=s.nextZero(r,y),C=s.readASCII(r,y,S-y);const n=r[y=S+1];var v;r[y+1],y+=2,S=s.nextZero(r,y),s.readASCII(r,y,S-y),y=S+1,S=s.nextZero(r,y),s.readUTF8(r,y,S-y),$=e-((y=S+1)-a),0==n?v=s.readUTF8(r,y,$):(b=o(r.slice(y,y+$)),v=s.readUTF8(b,0,b.length)),p.tabs[t][C]=v}else if("PLTE"==t)p.tabs[t]=s.readBytes(r,a,e);else if("hIST"==t){const e=p.tabs.PLTE.length/3;for(p.tabs[t]=[],f=0;f<e;f++)p.tabs[t].push(c(r,a+2*f))}else if("tRNS"==t)3==p.ctype?p.tabs[t]=s.readBytes(r,a,e):0==p.ctype?p.tabs[t]=c(r,a):2==p.ctype&&(p.tabs[t]=[c(r,a),c(r,a+2),c(r,a+4)]);else if("gAMA"==t)p.tabs[t]=s.readUint(r,a)/1e5;else if("sRGB"==t)p.tabs[t]=r[a];else if("bKGD"==t)0==p.ctype||4==p.ctype?p.tabs[t]=[c(r,a)]:2==p.ctype||6==p.ctype?p.tabs[t]=[c(r,a),c(r,a+2),c(r,a+4)]:3==p.ctype&&(p.tabs[t]=r[a]);else if("IEND"==t)break;a+=e,s.readUint(r,a),a+=4}var E;return 0!=g&&((E=p.frames[p.frames.length-1]).data=n(p,m.slice(0,g),E.rect.width,E.rect.height)),p.data=n(p,u,p.width,p.height),delete p.compress,delete p.interlace,delete p.filter,p},toRGBA8:function(e){const n=e.width,o=e.height;if(null==e.tabs.acTL)return[t(e.data,n,o,e).buffer];const i=[];null==e.frames[0].data&&(e.frames[0].data=e.data);const r=n*o*4,a=new Uint8Array(r),s=new Uint8Array(r),l=new Uint8Array(r);for(let p=0;p<e.frames.length;p++){const u=e.frames[p],m=u.rect.x,h=u.rect.y,g=u.rect.width,x=u.rect.height,f=t(u.data,g,x,e);if(0!=p)for(var d=0;d<r;d++)l[d]=a[d];if(0==u.blend?c(f,g,x,a,n,o,m,h,0):1==u.blend&&c(f,g,x,a,n,o,m,h,1),i.push(a.buffer.slice(0)),0==u.dispose);else if(1==u.dispose)c(s,g,x,a,n,o,m,h,0);else if(2==u.dispose)for(d=0;d<r;d++)a[d]=l[d]}return i},_paeth:s,_copyTile:c,_bin:e}}();!function(){const{_copyTile:e}=UPNG,{_bin:t}=UPNG,n=UPNG._paeth;var o={table:function(){const e=new Uint32Array(256);for(let t=0;t<256;t++){let n=t;for(let e=0;e<8;e++)1&n?n=3988292384^n>>>1:n>>>=1;e[t]=n}return e}(),update(e,t,n,i){for(let r=0;r<i;r++)e=o.table[255&(e^t[n+r])]^e>>>8;return e},crc:(e,t,n)=>4294967295^o.update(4294967295,e,t,n)};function i(e,t,n,o){t[n]+=e[0]*o>>4,t[n+1]+=e[1]*o>>4,t[n+2]+=e[2]*o>>4,t[n+3]+=e[3]*o>>4}function r(e){return Math.max(0,Math.min(255,e))}function a(e,t){const n=e[0]-t[0],o=e[1]-t[1],i=e[2]-t[2],r=e[3]-t[3];return n*n+o*o+i*i+r*r}function s(e,t,n,o,s,l,c){null==c&&(c=1);const d=o.length,p=[];for(var u=0;u<d;u++){const e=o[u];p.push([e>>>0&255,e>>>8&255,e>>>16&255,e>>>24&255])}for(u=0;u<d;u++){let e=4294967295;for(var m=0,h=0;h<d;h++){var g=a(p[u],p[h]);h!=u&&g<e&&(e=g,m=h)}}const x=new Uint32Array(s.buffer),f=new Int16Array(t*n*4),y=[0,8,2,10,12,4,14,6,3,11,1,9,15,7,13,5];for(u=0;u<y.length;u++)y[u]=255*((y[u]+.5)/16-.5);for(let C=0;C<n;C++)for(let s=0;s<t;s++){var S;u=4*(C*t+s),2!=c?S=[r(e[u]+f[u]),r(e[u+1]+f[u+1]),r(e[u+2]+f[u+2]),r(e[u+3]+f[u+3])]:(g=y[4*(3&C)+(3&s)],S=[r(e[u]+g),r(e[u+1]+g),r(e[u+2]+g),r(e[u+3]+g)]),m=0;let $=16777215;for(h=0;h<d;h++){const e=a(S,p[h]);e<$&&($=e,m=h)}const b=p[m],v=[S[0]-b[0],S[1]-b[1],S[2]-b[2],S[3]-b[3]];1==c&&(s!=t-1&&i(v,f,u+4,7),C!=n-1&&(0!=s&&i(v,f,u+4*t-4,3),i(v,f,u+4*t,5),s!=t-1&&i(v,f,u+4*t+4,1))),l[u>>2]=m,x[u>>2]=o[m]}}function l(e,n,i,r,a){null==a&&(a={});const{crc:s}=o,l=t.writeUint,c=t.writeUshort,d=t.writeASCII;let p=8;const u=e.frames.length>1;let m,h=!1,g=33+(u?20:0);if(null!=a.sRGB&&(g+=13),null!=a.pHYs&&(g+=21),null!=a.iCCP&&(m=pako.deflate(a.iCCP),g+=21+m.length+4),3==e.ctype){for(var x=e.plte.length,f=0;f<x;f++)e.plte[f]>>>24!=255&&(h=!0);g+=8+3*x+4+(h?8+1*x+4:0)}for(var y=0;y<e.frames.length;y++)u&&(g+=38),g+=(b=e.frames[y]).cimg.length+12,0!=y&&(g+=4);g+=12;const S=new Uint8Array(g),C=[137,80,78,71,13,10,26,10];for(f=0;f<8;f++)S[f]=C[f];if(l(S,p,13),p+=4,d(S,p,"IHDR"),p+=4,l(S,p,n),p+=4,l(S,p,i),p+=4,S[p]=e.depth,p++,S[p]=e.ctype,p++,S[p]=0,p++,S[p]=0,p++,S[p]=0,p++,l(S,p,s(S,p-17,17)),p+=4,null!=a.sRGB&&(l(S,p,1),p+=4,d(S,p,"sRGB"),p+=4,S[p]=a.sRGB,p++,l(S,p,s(S,p-5,5)),p+=4),null!=a.iCCP){const e=13+m.length;l(S,p,e),p+=4,d(S,p,"iCCP"),p+=4,d(S,p,"ICC profile"),p+=11,p+=2,S.set(m,p),p+=m.length,l(S,p,s(S,p-(e+4),e+4)),p+=4}if(null!=a.pHYs&&(l(S,p,9),p+=4,d(S,p,"pHYs"),p+=4,l(S,p,a.pHYs[0]),p+=4,l(S,p,a.pHYs[1]),p+=4,S[p]=a.pHYs[2],p++,l(S,p,s(S,p-13,13)),p+=4),u&&(l(S,p,8),p+=4,d(S,p,"acTL"),p+=4,l(S,p,e.frames.length),p+=4,l(S,p,null!=a.loop?a.loop:0),p+=4,l(S,p,s(S,p-12,12)),p+=4),3==e.ctype){for(l(S,p,3*(x=e.plte.length)),p+=4,d(S,p,"PLTE"),p+=4,f=0;f<x;f++){const t=3*f,n=e.plte[f],o=255&n,i=n>>>8&255,r=n>>>16&255;S[p+t+0]=o,S[p+t+1]=i,S[p+t+2]=r}if(p+=3*x,l(S,p,s(S,p-3*x-4,3*x+4)),p+=4,h){for(l(S,p,x),p+=4,d(S,p,"tRNS"),p+=4,f=0;f<x;f++)S[p+f]=e.plte[f]>>>24&255;p+=x,l(S,p,s(S,p-x-4,x+4)),p+=4}}let $=0;for(y=0;y<e.frames.length;y++){var b=e.frames[y];u&&(l(S,p,26),p+=4,d(S,p,"fcTL"),p+=4,l(S,p,$++),p+=4,l(S,p,b.rect.width),p+=4,l(S,p,b.rect.height),p+=4,l(S,p,b.rect.x),p+=4,l(S,p,b.rect.y),p+=4,c(S,p,r[y]),p+=2,c(S,p,1e3),p+=2,S[p]=b.dispose,p++,S[p]=b.blend,p++,l(S,p,s(S,p-30,30)),p+=4);const t=b.cimg;l(S,p,(x=t.length)+(0==y?0:4)),p+=4;const n=p;d(S,p,0==y?"IDAT":"fdAT"),p+=4,0!=y&&(l(S,p,$++),p+=4),S.set(t,p),p+=x,l(S,p,s(S,n,p-n)),p+=4}return l(S,p,0),p+=4,d(S,p,"IEND"),p+=4,l(S,p,s(S,p-4,4)),p+=4,S.buffer}function c(e,t,n){for(let o=0;o<e.frames.length;o++){const i=e.frames[o];i.rect.width;const r=i.rect.height,a=new Uint8Array(r*i.bpl+r);i.cimg=m(i.img,r,i.bpp,i.bpl,a,t,n)}}function d(t,n,o,i,r){const a=r[0],l=r[1],c=r[2],d=r[3],m=r[4],h=r[5];let x=6,f=8,y=255;for(var S=0;S<t.length;S++){const e=new Uint8Array(t[S]);for(var C=e.length,$=0;$<C;$+=4)y&=e[$+3]}const b=255!=y,v=function(t,n,o,i,r,a){const s=[];for(var l=0;l<t.length;l++){const p=new Uint8Array(t[l]),m=new Uint32Array(p.buffer);var c;let g=0,x=0,f=n,y=o,S=i?1:0;if(0!=l){const C=a||i||1==l||0!=s[l-2].dispose?1:2;let $=0,b=1e9;for(let e=0;e<C;e++){var d=new Uint8Array(t[l-1-e]);const i=new Uint32Array(t[l-1-e]);let a=n,s=o,c=-1,p=-1;for(let e=0;e<o;e++)for(let t=0;t<n;t++)m[h=e*n+t]!=i[h]&&(t<a&&(a=t),t>c&&(c=t),e<s&&(s=e),e>p&&(p=e));-1==c&&(a=s=c=p=0),r&&(!(1&~a)&&a--,!(1&~s)&&s--);const u=(c-a+1)*(p-s+1);u<b&&(b=u,$=e,g=a,x=s,f=c-a+1,y=p-s+1)}d=new Uint8Array(t[l-1-$]),1==$&&(s[l-1].dispose=2),c=new Uint8Array(f*y*4),e(d,n,o,c,f,y,-g,-x,0),S=e(p,n,o,c,f,y,-g,-x,3)?1:0,1==S?u(p,n,o,c,{x:g,y:x,width:f,height:y}):e(p,n,o,c,f,y,-g,-x,0)}else c=p.slice(0);s.push({rect:{x:g,y:x,width:f,height:y},img:c,blend:S,dispose:0})}if(i)for(l=0;l<s.length;l++){if(1==(g=s[l]).blend)continue;const e=g.rect,i=s[l-1].rect,a=Math.min(e.x,i.x),c=Math.min(e.y,i.y),d={x:a,y:c,width:Math.max(e.x+e.width,i.x+i.width)-a,height:Math.max(e.y+e.height,i.y+i.height)-c};s[l-1].dispose=1,l-1!=0&&p(t,n,o,s,l-1,d,r),p(t,n,o,s,l,d,r)}let m=0;if(1!=t.length)for(var h=0;h<s.length;h++){var g;m+=(g=s[h]).rect.width*g.rect.height}return s}(t,n,o,a,l,c),E={},w=[],R=[];if(0!=i){const e=[];for($=0;$<v.length;$++)e.push(v[$].img.buffer);const t=g(function(e){let t=0;for(var n=0;n<e.length;n++)t+=e[n].byteLength;const o=new Uint8Array(t);let i=0;for(n=0;n<e.length;n++){const t=new Uint8Array(e[n]),r=t.length;for(let e=0;e<r;e+=4){let n=t[e],r=t[e+1],a=t[e+2];const s=t[e+3];0==s&&(n=r=a=0),o[i+e]=n,o[i+e+1]=r,o[i+e+2]=a,o[i+e+3]=s}i+=r}return o.buffer}(e),i);for($=0;$<t.plte.length;$++)w.push(t.plte[$].est.rgba);let n=0;for($=0;$<v.length;$++){const e=(j=v[$]).img.length;var A=new Uint8Array(t.inds.buffer,n>>2,e>>2);R.push(A);const o=new Uint8Array(t.abuf,n,e);h&&s(j.img,j.rect.width,j.rect.height,w,o,A),j.img.set(o),n+=e}}else for(S=0;S<v.length;S++){var j=v[S];const e=new Uint32Array(j.img.buffer);var T=j.rect.width;for(C=e.length,A=new Uint8Array(C),R.push(A),$=0;$<C;$++){const t=e[$];if(0!=$&&t==e[$-1])A[$]=A[$-1];else if($>T&&t==e[$-T])A[$]=A[$-T];else{let e=E[t];if(null==e&&(E[t]=e=w.length,w.push(t),w.length>=300))break;A[$]=e}}}const I=w.length;for(I<=256&&0==m&&(f=I<=2?1:I<=4?2:I<=16?4:8,f=Math.max(f,d)),S=0;S<v.length;S++){(j=v[S]).rect.x,j.rect.y,T=j.rect.width;const e=j.rect.height;let t=j.img;new Uint32Array(t.buffer);let n=4*T,o=4;if(I<=256&&0==m){n=Math.ceil(f*T/8);var k=new Uint8Array(n*e);const i=R[S];for(let t=0;t<e;t++){$=t*n;const e=t*T;if(8==f)for(var L=0;L<T;L++)k[$+L]=i[e+L];else if(4==f)for(L=0;L<T;L++)k[$+(L>>1)]|=i[e+L]<<4-4*(1&L);else if(2==f)for(L=0;L<T;L++)k[$+(L>>2)]|=i[e+L]<<6-2*(3&L);else if(1==f)for(L=0;L<T;L++)k[$+(L>>3)]|=i[e+L]<<7-1*(7&L)}t=k,x=3,o=1}else if(0==b&&1==v.length){k=new Uint8Array(T*e*3);const i=T*e;for($=0;$<i;$++){const e=3*$,n=4*$;k[e]=t[n],k[e+1]=t[n+1],k[e+2]=t[n+2]}t=k,x=2,o=3,n=3*T}j.img=t,j.bpl=n,j.bpp=o}return{ctype:x,depth:f,plte:w,frames:v}}function p(t,n,o,i,r,a,s){const l=Uint8Array,c=Uint32Array,d=new l(t[r-1]),p=new c(t[r-1]),m=r+1<t.length?new l(t[r+1]):null,h=new l(t[r]),g=new c(h.buffer);let x=n,f=o,y=-1,S=-1;for(let e=0;e<a.height;e++)for(let t=0;t<a.width;t++){const o=a.x+t,s=a.y+e,l=s*n+o,c=g[l];0==c||0==i[r-1].dispose&&p[l]==c&&(null==m||0!=m[4*l+3])||(o<x&&(x=o),o>y&&(y=o),s<f&&(f=s),s>S&&(S=s))}-1==y&&(x=f=y=S=0),s&&(!(1&~x)&&x--,!(1&~f)&&f--),a={x:x,y:f,width:y-x+1,height:S-f+1};const C=i[r];C.rect=a,C.blend=1,C.img=new Uint8Array(a.width*a.height*4),0==i[r-1].dispose?(e(d,n,o,C.img,a.width,a.height,-a.x,-a.y,0),u(h,n,o,C.img,a)):e(h,n,o,C.img,a.width,a.height,-a.x,-a.y,0)}function u(t,n,o,i,r){e(t,n,o,i,r.width,r.height,-r.x,-r.y,2)}function m(e,t,n,o,i,r,a){const s=[];let l,c=[0,1,2,3,4];-1!=r?c=[r]:(t*o>5e5||1==n)&&(c=[0]),a&&(l={level:0});const d=UZIP;for(var p=0;p<c.length;p++){for(let r=0;r<t;r++)h(i,e,r,o,n,c[p]);s.push(d.deflate(i,l))}let u,m=1e9;for(p=0;p<s.length;p++)s[p].length<m&&(u=p,m=s[p].length);return s[u]}function h(e,t,o,i,r,a){const s=o*i;let l=s+o;if(e[l]=a,l++,0==a)if(i<500)for(var c=0;c<i;c++)e[l+c]=t[s+c];else e.set(new Uint8Array(t.buffer,s,i),l);else if(1==a){for(c=0;c<r;c++)e[l+c]=t[s+c];for(c=r;c<i;c++)e[l+c]=t[s+c]-t[s+c-r]+256&255}else if(0==o){for(c=0;c<r;c++)e[l+c]=t[s+c];if(2==a)for(c=r;c<i;c++)e[l+c]=t[s+c];if(3==a)for(c=r;c<i;c++)e[l+c]=t[s+c]-(t[s+c-r]>>1)+256&255;if(4==a)for(c=r;c<i;c++)e[l+c]=t[s+c]-n(t[s+c-r],0,0)+256&255}else{if(2==a)for(c=0;c<i;c++)e[l+c]=t[s+c]+256-t[s+c-i]&255;if(3==a){for(c=0;c<r;c++)e[l+c]=t[s+c]+256-(t[s+c-i]>>1)&255;for(c=r;c<i;c++)e[l+c]=t[s+c]+256-(t[s+c-i]+t[s+c-r]>>1)&255}if(4==a){for(c=0;c<r;c++)e[l+c]=t[s+c]+256-n(0,t[s+c-i],0)&255;for(c=r;c<i;c++)e[l+c]=t[s+c]+256-n(t[s+c-r],t[s+c-i],t[s+c-r-i])&255}}}function g(e,t){const n=new Uint8Array(e),o=n.slice(0),i=new Uint32Array(o.buffer),r=x(o,t),a=r[0],s=r[1],l=n.length,c=new Uint8Array(l>>2);let d;if(n.length<2e7)for(var p=0;p<l;p+=4)d=f(a,u=n[p]*(1/255),m=n[p+1]*(1/255),h=n[p+2]*(1/255),g=n[p+3]*(1/255)),c[p>>2]=d.ind,i[p>>2]=d.est.rgba;else for(p=0;p<l;p+=4){var u=n[p]*(1/255),m=n[p+1]*(1/255),h=n[p+2]*(1/255),g=n[p+3]*(1/255);for(d=a;d.left;)d=y(d.est,u,m,h,g)<=0?d.left:d.right;c[p>>2]=d.ind,i[p>>2]=d.est.rgba}return{abuf:o.buffer,inds:c,plte:s}}function x(e,t,n){null==n&&(n=1e-4);const o=new Uint32Array(e.buffer),i={i0:0,i1:e.length,bst:null,est:null,tdst:0,left:null,right:null};i.bst=$(e,i.i0,i.i1),i.est=b(i.bst);const r=[i];for(;r.length<t;){let t=0,i=0;for(var a=0;a<r.length;a++)r[a].est.L>t&&(t=r[a].est.L,i=a);if(t<n)break;const s=r[i],l=S(e,o,s.i0,s.i1,s.est.e,s.est.eMq255);if(s.i0>=l||s.i1<=l){s.est.L=0;continue}const c={i0:s.i0,i1:l,bst:null,est:null,tdst:0,left:null,right:null};c.bst=$(e,c.i0,c.i1),c.est=b(c.bst);const d={i0:l,i1:s.i1,bst:null,est:null,tdst:0,left:null,right:null};for(d.bst={R:[],m:[],N:s.bst.N-c.bst.N},a=0;a<16;a++)d.bst.R[a]=s.bst.R[a]-c.bst.R[a];for(a=0;a<4;a++)d.bst.m[a]=s.bst.m[a]-c.bst.m[a];d.est=b(d.bst),s.left=c,s.right=d,r[i]=c,r.push(d)}for(r.sort((e,t)=>t.bst.N-e.bst.N),a=0;a<r.length;a++)r[a].ind=a;return[i,r]}function f(e,t,n,o,i){if(null==e.left)return e.tdst=function(e,t,n,o,i){const r=t-e[0],a=n-e[1],s=o-e[2],l=i-e[3];return r*r+a*a+s*s+l*l}(e.est.q,t,n,o,i),e;const r=y(e.est,t,n,o,i);let a=e.left,s=e.right;r>0&&(a=e.right,s=e.left);const l=f(a,t,n,o,i);if(l.tdst<=r*r)return l;const c=f(s,t,n,o,i);return c.tdst<l.tdst?c:l}function y(e,t,n,o,i){const{e:r}=e;return r[0]*t+r[1]*n+r[2]*o+r[3]*i-e.eMq}function S(e,t,n,o,i,r){for(o-=4;n<o;){for(;C(e,n,i)<=r;)n+=4;for(;C(e,o,i)>r;)o-=4;if(n>=o)break;const a=t[n>>2];t[n>>2]=t[o>>2],t[o>>2]=a,n+=4,o-=4}for(;C(e,n,i)>r;)n-=4;return n+4}function C(e,t,n){return e[t]*n[0]+e[t+1]*n[1]+e[t+2]*n[2]+e[t+3]*n[3]}function $(e,t,n){const o=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],i=[0,0,0,0],r=n-t>>2;for(let a=t;a<n;a+=4){const t=e[a]*(1/255),n=e[a+1]*(1/255),r=e[a+2]*(1/255),s=e[a+3]*(1/255);i[0]+=t,i[1]+=n,i[2]+=r,i[3]+=s,o[0]+=t*t,o[1]+=t*n,o[2]+=t*r,o[3]+=t*s,o[5]+=n*n,o[6]+=n*r,o[7]+=n*s,o[10]+=r*r,o[11]+=r*s,o[15]+=s*s}return o[4]=o[1],o[8]=o[2],o[9]=o[6],o[12]=o[3],o[13]=o[7],o[14]=o[11],{R:o,m:i,N:r}}function b(e){const{R:t}=e,{m:n}=e,{N:o}=e,i=n[0],r=n[1],a=n[2],s=n[3],l=0==o?0:1/o,c=[t[0]-i*i*l,t[1]-i*r*l,t[2]-i*a*l,t[3]-i*s*l,t[4]-r*i*l,t[5]-r*r*l,t[6]-r*a*l,t[7]-r*s*l,t[8]-a*i*l,t[9]-a*r*l,t[10]-a*a*l,t[11]-a*s*l,t[12]-s*i*l,t[13]-s*r*l,t[14]-s*a*l,t[15]-s*s*l],d=c,p=v;let u=[Math.random(),Math.random(),Math.random(),Math.random()],m=0,h=0;if(0!=o)for(let x=0;x<16&&(u=p.multVec(d,u),h=Math.sqrt(p.dot(u,u)),u=p.sml(1/h,u),!(0!=x&&Math.abs(h-m)<1e-9));x++)m=h;const g=[i*l,r*l,a*l,s*l];return{Cov:c,q:g,e:u,L:m,eMq255:p.dot(p.sml(255,g),u),eMq:p.dot(u,g),rgba:(Math.round(255*g[3])<<24|Math.round(255*g[2])<<16|Math.round(255*g[1])<<8|Math.round(255*g[0]))>>>0}}var v={multVec:(e,t)=>[e[0]*t[0]+e[1]*t[1]+e[2]*t[2]+e[3]*t[3],e[4]*t[0]+e[5]*t[1]+e[6]*t[2]+e[7]*t[3],e[8]*t[0]+e[9]*t[1]+e[10]*t[2]+e[11]*t[3],e[12]*t[0]+e[13]*t[1]+e[14]*t[2]+e[15]*t[3]],dot:(e,t)=>e[0]*t[0]+e[1]*t[1]+e[2]*t[2]+e[3]*t[3],sml:(e,t)=>[e*t[0],e*t[1],e*t[2],e*t[3]]};UPNG.encode=function(e,t,n,o,i,r,a){null==o&&(o=0),null==a&&(a=!1);const s=d(e,t,n,o,[!1,!1,!1,0,a,!1]);return c(s,-1),l(s,t,n,i,r)},UPNG.encodeLL=function(e,t,n,o,i,r,a,s){const d={ctype:0+(1==o?0:2)+(0==i?0:4),depth:r,frames:[]},p=(o+i)*r,u=p*t;for(let l=0;l<e.length;l++)d.frames.push({rect:{x:0,y:0,width:t,height:n},img:new Uint8Array(e[l]),blend:0,dispose:1,bpp:Math.ceil(p/8),bpl:Math.ceil(u/8)});return c(d,0,!0),l(d,t,n,a,s)},UPNG.encode.compress=d,UPNG.encode.dither=s,UPNG.quantize=g,UPNG.quantize.getKDtree=x,UPNG.quantize.getNearest=f}();const r={toArrayBuffer(e,t){const n=e.width,o=e.height,i=n<<2,a=e.getContext("2d").getImageData(0,0,n,o),s=new Uint32Array(a.data.buffer),l=(32*n+31)/32<<2,c=l*o,d=122+c,p=new ArrayBuffer(d),u=new DataView(p),m=1<<20;let h,g,x,f,y=m,S=0,C=0,$=0;function b(e){u.setUint16(C,e,!0),C+=2}function v(e){u.setUint32(C,e,!0),C+=4}function E(e){C+=e}b(19778),v(d),E(4),v(122),v(108),v(n),v(-o>>>0),b(1),b(32),v(3),v(c),v(2835),v(2835),E(8),v(16711680),v(65280),v(255),v(4278190080),v(1466527264),function e(){for(;S<o&&y>0;){for(f=122+S*l,h=0;h<i;)y--,g=s[$++],x=g>>>24,u.setUint32(f+h,g<<8|x),h+=4;S++}$<s.length?(y=m,setTimeout(e,r._dly)):t(p)}()},toBlob(e,t){this.toArrayBuffer(e,e=>{t(new Blob([e],{type:"image/bmp"}))})},_dly:9};var i={CHROME:"CHROME",FIREFOX:"FIREFOX",DESKTOP_SAFARI:"DESKTOP_SAFARI",IE:"IE",IOS:"IOS",ETC:"ETC"},o={[i.CHROME]:16384,[i.FIREFOX]:11180,[i.DESKTOP_SAFARI]:16384,[i.IE]:8192,[i.IOS]:4096,[i.ETC]:8192};const a="undefined"!=typeof window,s="undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope,f=a&&window.cordova&&window.cordova.require&&window.cordova.require("cordova/modulemapper"),CustomFile=(a||s)&&(f&&f.getOriginalSymbol(window,"File")||"undefined"!=typeof File&&File),CustomFileReader=(a||s)&&(f&&f.getOriginalSymbol(window,"FileReader")||"undefined"!=typeof FileReader&&FileReader);function getFilefromDataUrl(e,t,n=Date.now()){return new Promise(o=>{const i=e.split(","),r=i[0].match(/:(.*?);/)[1],a=globalThis.atob(i[1]);let s=a.length;const l=new Uint8Array(s);for(;s--;)l[s]=a.charCodeAt(s);const c=new Blob([l],{type:r});c.name=t,c.lastModified=n,o(c)})}function getDataUrlFromFile(e){return new Promise((t,n)=>{const o=new CustomFileReader;o.onload=()=>t(o.result),o.onerror=e=>n(e),o.readAsDataURL(e)})}function loadImage(e){return new Promise((t,n)=>{const o=new Image;o.onload=()=>t(o),o.onerror=e=>n(e),o.src=e})}function getBrowserName(){if(void 0!==getBrowserName.cachedResult)return getBrowserName.cachedResult;let e=i.ETC;const{userAgent:t}=navigator;return/Chrom(e|ium)/i.test(t)?e=i.CHROME:/iP(ad|od|hone)/i.test(t)&&/WebKit/i.test(t)?e=i.IOS:/Safari/i.test(t)?e=i.DESKTOP_SAFARI:/Firefox/i.test(t)?e=i.FIREFOX:(/MSIE/i.test(t)||1==!!document.documentMode)&&(e=i.IE),getBrowserName.cachedResult=e,getBrowserName.cachedResult}function approximateBelowMaximumCanvasSizeOfBrowser(e,t){const n=getBrowserName(),i=o[n];let r=e,a=t,s=r*a;const l=r>a?a/r:r/a;for(;s>i*i;){const e=(i+r)/2,t=(i+a)/2;e<t?(a=t,r=t*l):(a=e*l,r=e),s=r*a}return{width:r,height:a}}function getNewCanvasAndCtx(e,t){let n,o;try{if(n=new OffscreenCanvas(e,t),o=n.getContext("2d"),null===o)throw new Error("getContext of OffscreenCanvas returns null")}catch(i){n=document.createElement("canvas"),o=n.getContext("2d")}return n.width=e,n.height=t,[n,o]}function drawImageInCanvas(e,t){const{width:n,height:o}=approximateBelowMaximumCanvasSizeOfBrowser(e.width,e.height),[i,r]=getNewCanvasAndCtx(n,o);return t&&/jpe?g/.test(t)&&(r.fillStyle="white",r.fillRect(0,0,i.width,i.height)),r.drawImage(e,0,0,i.width,i.height),i}function isIOS(){return void 0!==isIOS.cachedResult||(isIOS.cachedResult=["iPad Simulator","iPhone Simulator","iPod Simulator","iPad","iPhone","iPod"].includes(navigator.platform)||navigator.userAgent.includes("Mac")&&"undefined"!=typeof document&&"ontouchend"in document),isIOS.cachedResult}function drawFileInCanvas(e,t={}){return new Promise(function(n,o){let r,a;var s=function(){try{return a=drawImageInCanvas(r,t.fileType||e.type),n([r,a])}catch(i){return o(i)}},l=function(t){try{var n=function(e){try{throw e}catch(t){return o(t)}};try{let t;return getDataUrlFromFile(e).then(function(e){try{return t=e,loadImage(t).then(function(e){try{return r=e,function(){try{return s()}catch(e){return o(e)}}()}catch(t){return n(t)}},n)}catch(i){return n(i)}},n)}catch(i){n(i)}}catch(i){return o(i)}};try{if(isIOS()||[i.DESKTOP_SAFARI,i.MOBILE_SAFARI].includes(getBrowserName()))throw new Error("Skip createImageBitmap on IOS and Safari");return createImageBitmap(e).then(function(e){try{return r=e,s()}catch(t){return l()}},l)}catch(c){l()}})}function canvasToFile(e,t,n,o,i=1){return new Promise(function(a,s){let l;if("image/png"===t){let r,a,s;return r=e.getContext("2d"),({data:a}=r.getImageData(0,0,e.width,e.height)),s=UPNG.encode([a.buffer],e.width,e.height,4096*i),l=new Blob([s],{type:t}),l.name=n,l.lastModified=o,c.call(this)}{let a=function(){return c.call(this)};if("image/bmp"===t)return new Promise(t=>r.toBlob(e,t)).then(function(e){try{return l=e,l.name=n,l.lastModified=o,a.call(this)}catch(t){return s(t)}}.bind(this),s);{let r=function(){return a.call(this)};if("function"==typeof OffscreenCanvas&&e instanceof OffscreenCanvas)return e.convertToBlob({type:t,quality:i}).then(function(e){try{return l=e,l.name=n,l.lastModified=o,r.call(this)}catch(t){return s(t)}}.bind(this),s);{let a;return a=e.toDataURL(t,i),getFilefromDataUrl(a,n,o).then(function(e){try{return l=e,r.call(this)}catch(t){return s(t)}}.bind(this),s)}}}function c(){return a(l)}})}function cleanupCanvasMemory(e){e.width=0,e.height=0}function isAutoOrientationInBrowser(){return new Promise(function(e,t){let n,o,i,r;return void 0!==isAutoOrientationInBrowser.cachedResult?e(isAutoOrientationInBrowser.cachedResult):getFilefromDataUrl("data:image/jpeg;base64,/9j/4QAiRXhpZgAATU0AKgAAAAgAAQESAAMAAAABAAYAAAAAAAD/2wCEAAEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAf/AABEIAAEAAgMBEQACEQEDEQH/xABKAAEAAAAAAAAAAAAAAAAAAAALEAEAAAAAAAAAAAAAAAAAAAAAAQEAAAAAAAAAAAAAAAAAAAAAEQEAAAAAAAAAAAAAAAAAAAAA/9oADAMBAAIRAxEAPwA/8H//2Q==","test.jpg",Date.now()).then(function(a){try{return n=a,drawFileInCanvas(n).then(function(a){try{return o=a[1],canvasToFile(o,n.type,n.name,n.lastModified).then(function(n){try{return i=n,cleanupCanvasMemory(o),drawFileInCanvas(i).then(function(n){try{return r=n[0],isAutoOrientationInBrowser.cachedResult=1===r.width&&2===r.height,e(isAutoOrientationInBrowser.cachedResult)}catch(o){return t(o)}},t)}catch(a){return t(a)}},t)}catch(s){return t(s)}},t)}catch(s){return t(s)}},t)})}function getExifOrientation(e){return new Promise((t,n)=>{const o=new CustomFileReader;o.onload=e=>{const n=new DataView(e.target.result);if(65496!=n.getUint16(0,!1))return t(-2);const o=n.byteLength;let i=2;for(;i<o;){if(n.getUint16(i+2,!1)<=8)return t(-1);const e=n.getUint16(i,!1);if(i+=2,65505==e){if(1165519206!=n.getUint32(i+=2,!1))return t(-1);const e=18761==n.getUint16(i+=6,!1);i+=n.getUint32(i+4,e);const o=n.getUint16(i,e);i+=2;for(let r=0;r<o;r++)if(274==n.getUint16(i+12*r,e))return t(n.getUint16(i+12*r+8,e))}else{if(65280&~e)break;i+=n.getUint16(i,!1)}}return t(-1)},o.onerror=e=>n(e),o.readAsArrayBuffer(e)})}function handleMaxWidthOrHeight(e,t){const{width:n}=e,{height:o}=e,{maxWidthOrHeight:i}=t;let r,a=e;return isFinite(i)&&(n>i||o>i)&&([a,r]=getNewCanvasAndCtx(n,o),n>o?(a.width=i,a.height=o/n*i):(a.width=n/o*i,a.height=i),r.drawImage(e,0,0,a.width,a.height),cleanupCanvasMemory(e)),a}function followExifOrientation(e,t){const{width:n}=e,{height:o}=e,[i,r]=getNewCanvasAndCtx(n,o);switch(t>4&&t<9?(i.width=o,i.height=n):(i.width=n,i.height=o),t){case 2:r.transform(-1,0,0,1,n,0);break;case 3:r.transform(-1,0,0,-1,n,o);break;case 4:r.transform(1,0,0,-1,0,o);break;case 5:r.transform(0,1,1,0,0,0);break;case 6:r.transform(0,1,-1,0,o,0);break;case 7:r.transform(0,-1,-1,0,o,n);break;case 8:r.transform(0,-1,1,0,0,n)}return r.drawImage(e,0,0,n,o),cleanupCanvasMemory(e),i}function compress(e,t,n=0){return new Promise(function(o,i){let r,a,s,l,c,d,p,u,m,h,g,x,f,y,S,C,$,b,v,E;function w(e=5){if(t.signal&&t.signal.aborted)throw t.signal.reason;r+=e,t.onProgress(Math.min(r,100))}function R(e){if(t.signal&&t.signal.aborted)throw t.signal.reason;r=Math.min(Math.max(e,r),100),t.onProgress(r)}return r=n,a=t.maxIteration||10,s=1024*t.maxSizeMB*1024,w(),drawFileInCanvas(e,t).then(function(n){try{return[,l]=n,w(),c=handleMaxWidthOrHeight(l,t),w(),new Promise(function(n,o){var i;if(!(i=t.exifOrientation))return getExifOrientation(e).then(function(e){try{return i=e,r.call(this)}catch(t){return o(t)}}.bind(this),o);function r(){return n(i)}return r.call(this)}).then(function(n){try{return d=n,w(),isAutoOrientationInBrowser().then(function(n){try{return p=n?c:followExifOrientation(c,d),w(),u=t.initialQuality||1,m=t.fileType||e.type,canvasToFile(p,m,e.name,e.lastModified,u).then(function(n){try{{let d=function(){if(a--&&(S>s||S>f)){let t,n;return t=E?.95*v.width:v.width,n=E?.95*v.height:v.height,[$,b]=getNewCanvasAndCtx(t,n),b.drawImage(v,0,0,t,n),u*="image/png"===m?.85:.95,canvasToFile($,m,e.name,e.lastModified,u).then(function(e){try{return C=e,cleanupCanvasMemory(v),v=$,S=C.size,R(Math.min(99,Math.floor((y-S)/(y-s)*100))),d}catch(t){return i(t)}},i)}return[1]},A=function(){return cleanupCanvasMemory(v),cleanupCanvasMemory($),cleanupCanvasMemory(c),cleanupCanvasMemory(p),cleanupCanvasMemory(l),R(100),o(C)};return h=n,w(),g=h.size>s,x=h.size>e.size,g||x?(f=e.size,y=h.size,S=y,v=p,E=!t.alwaysKeepResolution&&g,(r=function(e){for(;e;){if(e.then)return void e.then(r,i);try{if(e.pop){if(e.length)return e.pop()?A.call(this):e;e=d}else e=e.call(this)}catch(t){return i(t)}}}.bind(this))(d)):(R(100),o(h));var r}}catch(d){return i(d)}}.bind(this),i)}catch(r){return i(r)}}.bind(this),i)}catch(r){return i(r)}}.bind(this),i)}catch(r){return i(r)}}.bind(this),i)})}const l="\nlet scriptImported = false\nself.addEventListener('message', async (e) => {\n const { file, id, imageCompressionLibUrl, options } = e.data\n options.onProgress = (progress) => self.postMessage({ progress, id })\n try {\n if (!scriptImported) {\n // console.log('[worker] importScripts', imageCompressionLibUrl)\n self.importScripts(imageCompressionLibUrl)\n scriptImported = true\n }\n // console.log('[worker] self', self)\n const compressedFile = await imageCompression(file, options)\n self.postMessage({ file: compressedFile, id })\n } catch (e) {\n // console.error('[worker] error', e)\n self.postMessage({ error: e.message + '\\n' + e.stack, id })\n }\n})\n";let c;function compressOnWebWorker(e,t){return new Promise((n,o)=>{c||(c=function(e){const t=[];return t.push(e),URL.createObjectURL(new Blob(t))}(l));const i=new Worker(c);i.addEventListener("message",function(e){if(t.signal&&t.signal.aborted)i.terminate();else if(void 0===e.data.progress){if(e.data.error)return o(new Error(e.data.error)),void i.terminate();n(e.data.file),i.terminate()}else t.onProgress(e.data.progress)}),i.addEventListener("error",o),t.signal&&t.signal.addEventListener("abort",()=>{o(t.signal.reason),i.terminate()}),i.postMessage({file:e,imageCompressionLibUrl:t.libURL,options:{...t,onProgress:void 0,signal:void 0}})})}function imageCompression(e,t){return new Promise(function(n,o){let i,r,a,s,l,c;if(i={...t},a=0,({onProgress:s}=i),i.maxSizeMB=i.maxSizeMB||Number.POSITIVE_INFINITY,l="boolean"!=typeof i.useWebWorker||i.useWebWorker,delete i.useWebWorker,i.onProgress=e=>{a=e,"function"==typeof s&&s(a)},!(e instanceof Blob||e instanceof CustomFile))return o(new Error("The file given is not an instance of Blob or File"));if(!/^image/.test(e.type))return o(new Error("The file given is not an image"));if(c="undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope,!l||"function"!=typeof Worker||c)return compress(e,i).then(function(e){try{return r=e,u.call(this)}catch(t){return o(t)}}.bind(this),o);var d=function(){try{return u.call(this)}catch(e){return o(e)}}.bind(this),p=function(t){try{return compress(e,i).then(function(e){try{return r=e,d()}catch(t){return o(t)}},o)}catch(n){return o(n)}};try{return i.libURL=i.libURL||"https://cdn.jsdelivr.net/npm/browser-image-compression@2.0.2/dist/browser-image-compression.js",compressOnWebWorker(e,i).then(function(e){try{return r=e,d()}catch(t){return p()}},p)}catch(m){p()}function u(){try{r.name=e.name,r.lastModified=e.lastModified}catch(m){}try{i.preserveExif&&"image/jpeg"===e.type&&(!i.fileType||i.fileType&&i.fileType===e.type)&&(r=copyExifWithoutOrientation(e,r))}catch(m){}return n(r)}})}imageCompression.getDataUrlFromFile=getDataUrlFromFile,imageCompression.getFilefromDataUrl=getFilefromDataUrl,imageCompression.loadImage=loadImage,imageCompression.drawImageInCanvas=drawImageInCanvas,imageCompression.drawFileInCanvas=drawFileInCanvas,imageCompression.canvasToFile=canvasToFile,imageCompression.getExifOrientation=getExifOrientation,imageCompression.handleMaxWidthOrHeight=handleMaxWidthOrHeight,imageCompression.followExifOrientation=followExifOrientation,imageCompression.cleanupCanvasMemory=cleanupCanvasMemory,imageCompression.isAutoOrientationInBrowser=isAutoOrientationInBrowser,imageCompression.approximateBelowMaximumCanvasSizeOfBrowser=approximateBelowMaximumCanvasSizeOfBrowser,imageCompression.copyExifWithoutOrientation=copyExifWithoutOrientation,imageCompression.getBrowserName=getBrowserName,imageCompression.version="2.0.2";const PDF_MIME_TYPE$1="application/pdf",imageCompressionAcceptableFileTypes=["image/jpg","image/jpeg","image/png","image/webp","image/bmp"],RECEIPT_IMAGE_COMPRESSION_OPTIONS={useWebWorker:!0,maxWidthOrHeight:1920,initialQuality:.92,maxSizeMB:2},handleImageCompression=async(e,t)=>{if(!1===imageCompressionAcceptableFileTypes.includes(e.type))return e;const n=await imageCompression(e,{useWebWorker:!0,maxWidthOrHeight:900,initialQuality:1,maxSizeMB:1.4}),o=n.lastModified,i=n.type.split("/")[1];let r=`image_${o}.${i}`;null!=t&&(r=`${t}.${i}`);return new File([n],r,{lastModified:o,type:n.type})},compressImageForReceipt=async(e,t)=>{if(!1===imageCompressionAcceptableFileTypes.includes(e.type))return e;const n=await imageCompression(e,RECEIPT_IMAGE_COMPRESSION_OPTIONS),o=n.type.split("/")[1],i=t.replace(/\.[^.]+$/,"")||"image";return new File([n],`${i}.${o}`,{lastModified:e.lastModified,type:n.type})},PDF_RENDER_SCALE=1.5,PDF_JPEG_QUALITY=.7;function canvasToJpegBlob(e,t){return new Promise((n,o)=>{e.toBlob(e=>{null!=e?n(e):o(new Error("canvas.toBlob returned null"))},"image/jpeg",t)})}async function renderPageToJpeg(e,t,n){const o=e.getViewport({scale:t}),i=document.createElement("canvas");i.width=Math.floor(o.width),i.height=Math.floor(o.height);const r=i.getContext("2d");if(null==r)throw new Error("Could not get canvas 2d context");await e.render({canvasContext:r,viewport:o}).promise;return(await canvasToJpegBlob(i,n)).arrayBuffer()}async function compressPdfForReceipt(e,t){const[{PDFDocument:n},o]=await Promise.all([import("./index-BCxMklOW.js"),Promise.resolve().then(()=>index$2).then(e=>e.pdfjs)]),i=await e.arrayBuffer(),r=await o.getDocument({data:new Uint8Array(i)}).promise,a=r.numPages,s=await n.create();for(let d=1;d<=a;d++){const e=await r.getPage(d),t=await renderPageToJpeg(e,PDF_RENDER_SCALE,PDF_JPEG_QUALITY),n=await s.embedJpg(new Uint8Array(t)),o=n.scale(1);s.addPage([o.width,o.height]).drawImage(n,{x:0,y:0,width:o.width,height:o.height})}const l=await s.save(),c=t.toLowerCase().endsWith(".pdf")?t:`${t}.pdf`;return new File([l],c,{type:PDF_MIME_TYPE$1,lastModified:e.lastModified})}async function compressSingleFile(e,t){const n=e instanceof File?e:new File([e],t,{type:e.type});if(e.type===PDF_MIME_TYPE$1){const o=await compressPdfForReceipt(n,t);return o.size<n.size?{blob:o,name:o.name}:{blob:e,name:t}}const o=await compressImageForReceipt(n,t);return{blob:o,name:o.name}}async function compressReceiptFiles(e,t){const n=await Promise.all(e.map((e,n)=>{const o=t[n]??`file_${n}`;return compressSingleFile(e,o).catch(t=>(console.warn("[compressReceiptFiles] compression failed, using original:",t instanceof Error?t.message:t),{blob:e,name:o}))}));return{blobs:n.map(e=>e.blob),names:n.map(e=>e.name)}}const InputElementMobileCamera=({fileType:e="file",fileRef:t,name:n,value:o="",multiple:i=!1,acceptableTypes:r,onFileSizeError:a,onImageChange:s})=>/* @__PURE__ */jsxRuntimeExports.jsx("input",{type:e,ref:t,name:n,value:o,size:1e3,"data-testid":generateDataTestId("input-file-element-mobile",n),onChange:async e=>{const t=e.target.files?.[0],n=t?.size;null!=t&&null!=n?(a?.(!1),s(t),e.target.value=""):(a?.(!0),e.target.value="")},style:{display:"none"},accept:`${(r??"image/jpg, image/jpeg").toString()}`,multiple:i,capture:!0}),MoneyTransferSuccessAnimation=({shouldDisplay:e,width:t=30,height:n=30,styles:o,animationInLoop:i=!1})=>{const[,r]=useMusic(SUCCESS_SOUND_SOURCE),[a]=useAnimation("MoneyTransferSuccess");return React__default.useEffect(()=>{e&&r(!0)},[e,r]),e&&null!=a?/* @__PURE__ */jsxRuntimeExports.jsx(Lottie,{style:{width:t,height:n,...o},play:!0,animationData:a,loop:i,rendererSettings:{preserveAspectRatio:"xMidYMid slice"}}):null};var browserPonyfill={exports:{}},hasRequiredBrowserPonyfill;function requireBrowserPonyfill(){return hasRequiredBrowserPonyfill||(hasRequiredBrowserPonyfill=1,function(e,t){var n,o="undefined"!=typeof globalThis&&globalThis||"undefined"!=typeof self&&self||void 0!==commonjsGlobal$1&&commonjsGlobal$1,i=function(){function e(){this.fetch=!1,this.DOMException=o.DOMException}return e.prototype=o,new e}();n=i,function(e){var t=void 0!==n&&n||"undefined"!=typeof self&&self||void 0!==commonjsGlobal$1&&commonjsGlobal$1||{},o="URLSearchParams"in t,i="Symbol"in t&&"iterator"in Symbol,r="FileReader"in t&&"Blob"in t&&function(){try{return new Blob,!0}catch(e){return!1}}(),a="FormData"in t,s="ArrayBuffer"in t;if(s)var l=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],c=ArrayBuffer.isView||function(e){return e&&l.indexOf(Object.prototype.toString.call(e))>-1};function d(e){if("string"!=typeof e&&(e=String(e)),/[^a-z0-9\-#$%&'*+.^_`|~!]/i.test(e)||""===e)throw new TypeError('Invalid character in header field name: "'+e+'"');return e.toLowerCase()}function p(e){return"string"!=typeof e&&(e=String(e)),e}function u(e){var t={next:function(){var t=e.shift();return{done:void 0===t,value:t}}};return i&&(t[Symbol.iterator]=function(){return t}),t}function m(e){this.map={},e instanceof m?e.forEach(function(e,t){this.append(t,e)},this):Array.isArray(e)?e.forEach(function(e){if(2!=e.length)throw new TypeError("Headers constructor: expected name/value pair to be length 2, found"+e.length);this.append(e[0],e[1])},this):e&&Object.getOwnPropertyNames(e).forEach(function(t){this.append(t,e[t])},this)}function h(e){if(!e._noBody)return e.bodyUsed?Promise.reject(new TypeError("Already read")):void(e.bodyUsed=!0)}function g(e){return new Promise(function(t,n){e.onload=function(){t(e.result)},e.onerror=function(){n(e.error)}})}function x(e){var t=new FileReader,n=g(t);return t.readAsArrayBuffer(e),n}function f(e){if(e.slice)return e.slice(0);var t=new Uint8Array(e.byteLength);return t.set(new Uint8Array(e)),t.buffer}function y(){return this.bodyUsed=!1,this._initBody=function(e){var t;this.bodyUsed=this.bodyUsed,this._bodyInit=e,e?"string"==typeof e?this._bodyText=e:r&&Blob.prototype.isPrototypeOf(e)?this._bodyBlob=e:a&&FormData.prototype.isPrototypeOf(e)?this._bodyFormData=e:o&&URLSearchParams.prototype.isPrototypeOf(e)?this._bodyText=e.toString():s&&r&&(t=e)&&DataView.prototype.isPrototypeOf(t)?(this._bodyArrayBuffer=f(e.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):s&&(ArrayBuffer.prototype.isPrototypeOf(e)||c(e))?this._bodyArrayBuffer=f(e):this._bodyText=e=Object.prototype.toString.call(e):(this._noBody=!0,this._bodyText=""),this.headers.get("content-type")||("string"==typeof e?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):o&&URLSearchParams.prototype.isPrototypeOf(e)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},r&&(this.blob=function(){var e=h(this);if(e)return e;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))}),this.arrayBuffer=function(){if(this._bodyArrayBuffer){var e=h(this);return e||(ArrayBuffer.isView(this._bodyArrayBuffer)?Promise.resolve(this._bodyArrayBuffer.buffer.slice(this._bodyArrayBuffer.byteOffset,this._bodyArrayBuffer.byteOffset+this._bodyArrayBuffer.byteLength)):Promise.resolve(this._bodyArrayBuffer))}if(r)return this.blob().then(x);throw new Error("could not read as ArrayBuffer")},this.text=function(){var e,t,n,o,i,r=h(this);if(r)return r;if(this._bodyBlob)return e=this._bodyBlob,t=new FileReader,n=g(t),o=/charset=([A-Za-z0-9_-]+)/.exec(e.type),i=o?o[1]:"utf-8",t.readAsText(e,i),n;if(this._bodyArrayBuffer)return Promise.resolve(function(e){for(var t=new Uint8Array(e),n=new Array(t.length),o=0;o<t.length;o++)n[o]=String.fromCharCode(t[o]);return n.join("")}(this._bodyArrayBuffer));if(this._bodyFormData)throw new Error("could not read FormData body as text");return Promise.resolve(this._bodyText)},a&&(this.formData=function(){return this.text().then($)}),this.json=function(){return this.text().then(JSON.parse)},this}m.prototype.append=function(e,t){e=d(e),t=p(t);var n=this.map[e];this.map[e]=n?n+", "+t:t},m.prototype.delete=function(e){delete this.map[d(e)]},m.prototype.get=function(e){return e=d(e),this.has(e)?this.map[e]:null},m.prototype.has=function(e){return this.map.hasOwnProperty(d(e))},m.prototype.set=function(e,t){this.map[d(e)]=p(t)},m.prototype.forEach=function(e,t){for(var n in this.map)this.map.hasOwnProperty(n)&&e.call(t,this.map[n],n,this)},m.prototype.keys=function(){var e=[];return this.forEach(function(t,n){e.push(n)}),u(e)},m.prototype.values=function(){var e=[];return this.forEach(function(t){e.push(t)}),u(e)},m.prototype.entries=function(){var e=[];return this.forEach(function(t,n){e.push([n,t])}),u(e)},i&&(m.prototype[Symbol.iterator]=m.prototype.entries);var S=["CONNECT","DELETE","GET","HEAD","OPTIONS","PATCH","POST","PUT","TRACE"];function C(e,n){if(!(this instanceof C))throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');var o,i,r=(n=n||{}).body;if(e instanceof C){if(e.bodyUsed)throw new TypeError("Already read");this.url=e.url,this.credentials=e.credentials,n.headers||(this.headers=new m(e.headers)),this.method=e.method,this.mode=e.mode,this.signal=e.signal,r||null==e._bodyInit||(r=e._bodyInit,e.bodyUsed=!0)}else this.url=String(e);if(this.credentials=n.credentials||this.credentials||"same-origin",!n.headers&&this.headers||(this.headers=new m(n.headers)),this.method=(o=n.method||this.method||"GET",i=o.toUpperCase(),S.indexOf(i)>-1?i:o),this.mode=n.mode||this.mode||null,this.signal=n.signal||this.signal||function(){if("AbortController"in t)return(new AbortController).signal}(),this.referrer=null,("GET"===this.method||"HEAD"===this.method)&&r)throw new TypeError("Body not allowed for GET or HEAD requests");if(this._initBody(r),!("GET"!==this.method&&"HEAD"!==this.method||"no-store"!==n.cache&&"no-cache"!==n.cache)){var a=/([?&])_=[^&]*/;a.test(this.url)?this.url=this.url.replace(a,"$1_="+/* @__PURE__ */(new Date).getTime()):this.url+=(/\?/.test(this.url)?"&":"?")+"_="+/* @__PURE__ */(new Date).getTime()}}function $(e){var t=new FormData;return e.trim().split("&").forEach(function(e){if(e){var n=e.split("="),o=n.shift().replace(/\+/g," "),i=n.join("=").replace(/\+/g," ");t.append(decodeURIComponent(o),decodeURIComponent(i))}}),t}function b(e,t){if(!(this instanceof b))throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');if(t||(t={}),this.type="default",this.status=void 0===t.status?200:t.status,this.status<200||this.status>599)throw new RangeError("Failed to construct 'Response': The status provided (0) is outside the range [200, 599].");this.ok=this.status>=200&&this.status<300,this.statusText=void 0===t.statusText?"":""+t.statusText,this.headers=new m(t.headers),this.url=t.url||"",this._initBody(e)}C.prototype.clone=function(){return new C(this,{body:this._bodyInit})},y.call(C.prototype),y.call(b.prototype),b.prototype.clone=function(){return new b(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new m(this.headers),url:this.url})},b.error=function(){var e=new b(null,{status:200,statusText:""});return e.ok=!1,e.status=0,e.type="error",e};var v=[301,302,303,307,308];b.redirect=function(e,t){if(-1===v.indexOf(t))throw new RangeError("Invalid status code");return new b(null,{status:t,headers:{location:e}})},e.DOMException=t.DOMException;try{new e.DOMException}catch(w){e.DOMException=function(e,t){this.message=e,this.name=t;var n=Error(e);this.stack=n.stack},e.DOMException.prototype=Object.create(Error.prototype),e.DOMException.prototype.constructor=e.DOMException}function E(n,o){return new Promise(function(i,a){var l=new C(n,o);if(l.signal&&l.signal.aborted)return a(new e.DOMException("Aborted","AbortError"));var c=new XMLHttpRequest;function u(){c.abort()}if(c.onload=function(){var e,t,n={statusText:c.statusText,headers:(e=c.getAllResponseHeaders()||"",t=new m,e.replace(/\r?\n[\t ]+/g," ").split("\r").map(function(e){return 0===e.indexOf("\n")?e.substr(1,e.length):e}).forEach(function(e){var n=e.split(":"),o=n.shift().trim();if(o){var i=n.join(":").trim();try{t.append(o,i)}catch(r){console.warn("Response "+r.message)}}}),t)};0===l.url.indexOf("file://")&&(c.status<200||c.status>599)?n.status=200:n.status=c.status,n.url="responseURL"in c?c.responseURL:n.headers.get("X-Request-URL");var o="response"in c?c.response:c.responseText;setTimeout(function(){i(new b(o,n))},0)},c.onerror=function(){setTimeout(function(){a(new TypeError("Network request failed"))},0)},c.ontimeout=function(){setTimeout(function(){a(new TypeError("Network request timed out"))},0)},c.onabort=function(){setTimeout(function(){a(new e.DOMException("Aborted","AbortError"))},0)},c.open(l.method,function(e){try{return""===e&&t.location.href?t.location.href:e}catch(n){return e}}(l.url),!0),"include"===l.credentials?c.withCredentials=!0:"omit"===l.credentials&&(c.withCredentials=!1),"responseType"in c&&(r?c.responseType="blob":s&&(c.responseType="arraybuffer")),o&&"object"==typeof o.headers&&!(o.headers instanceof m||t.Headers&&o.headers instanceof t.Headers)){var h=[];Object.getOwnPropertyNames(o.headers).forEach(function(e){h.push(d(e)),c.setRequestHeader(e,p(o.headers[e]))}),l.headers.forEach(function(e,t){-1===h.indexOf(t)&&c.setRequestHeader(t,e)})}else l.headers.forEach(function(e,t){c.setRequestHeader(t,e)});l.signal&&(l.signal.addEventListener("abort",u),c.onreadystatechange=function(){4===c.readyState&&l.signal.removeEventListener("abort",u)}),c.send(void 0===l._bodyInit?null:l._bodyInit)})}E.polyfill=!0,t.fetch||(t.fetch=E,t.Headers=m,t.Request=C,t.Response=b),e.Headers=m,e.Request=C,e.Response=b,e.fetch=E,Object.defineProperty(e,"__esModule",{value:!0})}({}),i.fetch.ponyfill=!0,delete i.fetch.polyfill;var r=o.fetch?o:i;(t=r.fetch).default=r.fetch,t.fetch=r.fetch,t.Headers=r.Headers,t.Request=r.Request,t.Response=r.Response,e.exports=t}(browserPonyfill,browserPonyfill.exports)),browserPonyfill.exports}var browserPonyfillExports=requireBrowserPonyfill();const fetch$1=/* @__PURE__ */getDefaultExportFromCjs(browserPonyfillExports),SvgNewVendor=e=>/* @__PURE__ */React.createElement("svg",{viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},/* @__PURE__ */React.createElement("path",{d:"M7.5055 4L1.5 9.54354L22.5 9.5435",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),/* @__PURE__ */React.createElement("path",{d:"M16.4945 19.7067L22.5 14.1632H1.5",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}));__webpack_exports__GlobalWorkerOptions.workerSrc=`//cdnjs.cloudflare.com/ajax/libs/pdf.js/${__webpack_exports__version}/pdf.worker.mjs`;const{common:common$3b}=appLocale.getLocalizedStrings(),FileInputElementName$1="invoice",getEffectiveCitationVariant=(e,t,n)=>{if("deleted"===e.variant)return"deleted";if("excluded"===e.variant)return"excluded";return null!=t&&e.statementTransactionId===t||null!=n&&e.statementTransactionId===n?"hovered":e.variant??"default"},findCitationTransactionIdAtPoint=(e,t,n)=>{const o=Array.from(e.querySelectorAll("[data-statement-transaction-id]"));for(const i of o){if("excluded"===i.dataset.citationVariant)continue;const e=i.getBoundingClientRect();if(t>=e.left&&t<=e.right&&n>=e.top&&n<=e.bottom)return i.dataset.statementTransactionId}},getScrollTargetPageNumber=(e,t)=>{if(null==t)return;const n=e.find(e=>e.statementTransactionId===t);return n?.page},isElementVisibleInContainer=(e,t)=>{const n=e.getBoundingClientRect(),o=null!=t?t.getBoundingClientRect():{top:0,left:0,bottom:window.innerHeight,right:window.innerWidth};return n.bottom>o.top&&n.top<o.bottom&&n.right>o.left&&n.left<o.right},getScrollableParent=e=>{let t=e.parentElement;for(;null!=t;){const{overflowY:e}=window.getComputedStyle(t);if(("auto"===e||"scroll"===e)&&t.scrollHeight>t.clientHeight)return t;t=t.parentElement}return null},scrollPageElementIntoView=(e,t,n="smooth")=>{const o=t??getScrollableParent(e);if(null==o)return void e.scrollIntoView({behavior:n,block:"center"});const i=e.getBoundingClientRect(),r=o.getBoundingClientRect(),a=o.scrollTop+(i.top-r.top)-(o.clientHeight-i.height)/2;o.scrollTo({top:Math.max(0,a),behavior:n})};function getPolygonBounds(e){const t=e.map(e=>e.x),n=e.map(e=>e.y);return{maxX:Math.max(...t),maxY:Math.max(...n),minX:Math.min(...t),minY:Math.min(...n)}}function convertPolygonToPercent(e,t,n){const{minX:o,maxX:i,minY:r,maxY:a}=getPolygonBounds(e);return{height:(a-r)/n*100,left:o/t*100,top:r/n*100,width:(i-o)/t*100}}function RenderPdf(e){const[t,n]=useState(0),[o,i]=useState(void 0),[r,a]=useState(null),[s,l]=useState(void 0),c=useWindowSizeContext(),d=useRef(null),p=useRef(null),u=useRef(void 0),m=null!=e.highlightedCitations&&e.highlightedCitations.length>0;useLayoutEffect(()=>{if(e.isFullScreen)return void i(void 0);const t=p.current;if(null==t)return;const n=()=>{const e=Math.floor(t.clientWidth);e>0&&i(t=>t===e?t:e)};n();const o=new ResizeObserver(n);return o.observe(t),()=>{o.disconnect()}},[e.isFullScreen,e.fileUrl]);const h=t=>{u.current!==t&&(u.current=t,l(t),e.onCitationHover?.(t))},g=e=>{!0===m&&h(findCitationTransactionIdAtPoint(e.currentTarget,e.clientX,e.clientY))},x=()=>{!0===m&&h(void 0)},f=t=>{null!=e.onCitationClick&&e.onCitationClick(findCitationTransactionIdAtPoint(t.currentTarget,t.clientX,t.clientY))},y=useCallback(()=>{if(null==e.highlightedCitations||0===e.highlightedCitations.length)return;const t=getScrollTargetPageNumber(e.highlightedCitations,e.selectedStatementTransactionId);if(null==t)return;const n=p.current?.querySelector(`[data-testid="pdf-page-${t}"]`);if(null!=n){const t=p.current,o=null!=t&&t.scrollHeight>t.clientHeight?t:null,i=(null!=e.selectedStatementTransactionId?n.querySelector(`[data-statement-transaction-id="${CSS.escape(String(e.selectedStatementTransactionId))}"]`):null)??n;if(isElementVisibleInContainer(i,o))return;scrollPageElementIntoView(i,o)}},[e.highlightedCitations,e.selectedStatementTransactionId]);useEffect(()=>{if(null==e.highlightedCitations||0===e.highlightedCitations.length||null==e.selectedStatementTransactionId)return;y();const t=requestAnimationFrame(y),n=window.setTimeout(y,150);return()=>{cancelAnimationFrame(t),window.clearTimeout(n)}},[e.highlightedCitations,e.selectedStatementTransactionId,t,y]),useEffect(()=>{a(null),n(0)},[e.fileUrl]);const S=t=>{if(!e.highlightedCitations)return null;const n=e.highlightedCitations.filter(e=>e.page===t);return 0===n.length?null:/* @__PURE__ */jsxRuntimeExports.jsx(HighlightsOverlay,{children:n.flatMap((t,n)=>{const o=convertPolygonToPercent(t.polygon,t.pageWidth,t.pageHeight),i=getEffectiveCitationVariant(t,e.selectedStatementTransactionId,s);/* @__PURE__ */
11820
11820
  return jsxRuntimeExports.jsx(HighlightBox,{"data-citation-variant":i,"data-statement-transaction-id":t.statementTransactionId,$variant:i,style:{height:`${o.height}%`,left:`${o.left}%`,top:`${o.top}%`,width:`${o.width}%`}},`${n}`)})})},C=()=>{e.setShowFullScreenView(!0)};/* @__PURE__ */
11821
11821
  return jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[
11822
11822
  /* @__PURE__ */jsxRuntimeExports.jsx(FileInputElement,{fileRef:d,name:FileInputElementName$1,onFileChange:t=>{if(null!=t.target.files){const n=t.target.files[0];e.onUploadAttachment?.([n],[n.name])}},multiple:e.allowMultiFiles,sizeLimit:SizeLimit32MB,onFileSizeError:t=>e.openSizeLimitPopup?.(t)}),
@@ -91026,7 +91026,7 @@ return jsxRuntimeExports.jsx(FormProvider,{...S,children:/* @__PURE__ */jsxRunti
91026
91026
  display: flex;
91027
91027
  justify-content: flex-end;
91028
91028
  padding: ${Space.sp0} ${Space.sp3};
91029
- `,KPI_TILE_BREAKDOWN_PLACEHOLDER=" ";function formatAmount(e){return amountToString("0,0",e)}function buildTypeBreakdown(e,t){const n={};for(const o of e){const e=getJEScheduleRowType(o);null!=e&&(n[e]=(n[e]??0)+1)}return Object.entries(n).filter(([,e])=>e>0).map(([e,n])=>`${n} ${t[e]??e}`).join(" • ")}function buildTypeBreakdownItems(e,t){const n={};for(const o of e){const e=getJEScheduleRowType(o);null!=e&&(n[e]=(n[e]??0)+1)}return Object.entries(n).filter(([,e])=>e>0).map(([e,n])=>({text:t[e]??e,amount:n.toString()}))}const{expenseAutomation:{jeSchedules:{actualMatching:actualMatchingStrings$a,oneTimeAccrualType:oneTimeAccrualType$2}},common:{strings:{hyphen:hyphen$k}},dateFormat:dateFormat$o}=appLocale.getLocalizedStrings(),EMPTY_ACTUAL_MATCHING_KPI_SUMMARY={actualsReceived:{count:0,expectedCount:0,vendorsPending:0},autoReversed:{count:0,percent:0,clearedAmount:0},pendingReview:{count:0,amount:0,estimatedMinutesToClear:0},variance:{percent:0,averagePercentPerMatch:0,netAmount:0}},EMPTY_ACTUAL_MATCHING_VIEW={fetchState:"Not-Started",error:void 0,reversed:[],pendingReview:[],kpiSummary:EMPTY_ACTUAL_MATCHING_KPI_SUMMARY,uiState:{sortKey:"date",sortOrder:"descending",searchString:"",scrollPosition:void 0,statusFilter:"all"},refreshStatus:{fetchState:"Not-Started",error:void 0},ignoreStatusByMatchId:{},undoReversalStatusByMatchId:{},hasLoadedForSelectedPeriod:!1,matchModal:{isOpen:!1,confirmStatus:{fetchState:"Not-Started",error:void 0},transactionSearch:{query:"",results:[],fetchState:{fetchState:"Not-Started",error:void 0},nextPageToken:null,isLoadingMore:!1},accrualSearch:{query:"",results:[],fetchState:{fetchState:"Not-Started",error:void 0},nextPageToken:null,isLoadingMore:!1}}};function getActualMatchingFromSelector(e){return e.actualMatching??EMPTY_ACTUAL_MATCHING_VIEW}function getAccruedAmount(e){return e.accruedAmount?.amount??e.estimatedAmount.amount}function isGroupedClearedMatch(e){const t=e?.groupSum?.amount;if(null==t||t<=0)return!1;const n=e?.matchShape;return"1:N"===n||"N:1"===n||(e?.accrualIds?.length??0)>1}function getActualAmount(e){return null!=e.actualAmount?e.actualAmount.amount:"pending_review"===e.kind?e.matchSuggestion?.matchedAmount?.amount:e.cleared?.matchedAmount?.amount}function getVariancePercent(e){if(isGroupedClearedMatch(e.cleared)){const t=e.cleared?.matchedAmount?.amount,n=e.cleared?.groupSum?.amount;if(null==t||null==n||0===n)return;return(t-n)/n*100}const t=getAccruedAmount(e),n=getActualAmount(e);if(null!=n&&0!==t)return(n-t)/t*100}function formatVariancePercent(e){const t=Math.round(10*e)/10;return`${t>0?"+":""}${t.toFixed(1)}%`}function getVarianceCapsuleType(e){const t=Math.abs(e);return t<=5?"success":t<=15?"warning":"attention"}function getMatchTierKey(e){return e.cleared?.matchTier??e.matchSuggestion?.matchTier}function getMatchTierLabel(e){const t=getMatchTierKey(e);return"tier_1"===t?actualMatchingStrings$a.matchTier.exact:"tier_2"===t?actualMatchingStrings$a.matchTier.fuzzy:"manual"===t?actualMatchingStrings$a.matchTier.manual:"agent"===e.origin?actualMatchingStrings$a.matchTier.aiAccountant:hyphen$k}function getMatchTierCapsuleType(e){const t=getMatchTierKey(e);return"tier_1"===t?"success":"tier_2"===t?"warning":"manual"===t?"default":"info"}function getActualMatchingTypeLabel(e){const t=e.cleared?.matchedTransactionType??e.matchSuggestion?.matchedTransactionType;return null!=t&&""!==t?formatTransactionTypeLabel(t):oneTimeAccrualType$2}function getActualMatchingTypeCapsuleType(e){const t=(e.cleared?.matchedTransactionType??e.matchSuggestion?.matchedTransactionType??"").toLowerCase();return"bill"===t?"info":"expense"===t||t.includes("card")||"credit_card_payment"===t?"success":t.includes("payroll")?"attention":t.includes("ach")||"check"===t||"transfer"===t?"warning":"default"}function formatActualMatchingServiceMonth(e){return/^\d{4}-\d{2}$/.test(e)?zeniDate(`${e}-01`).format(dateFormat$o.visual.MMMYYYYFormat):""===e?hyphen$k:e}function toServiceMonthIndex(e){const t=/^(\d{4})-(\d{2})$/.exec(e);return null==t?null:12*Number(t[1])+Number(t[2])-1}function formatServiceMonthName(e){return zeniDate(`${e}-01`).format("MMM")}function getUniqueSortedServiceMonths(e){return[...new Set(e.filter(e=>null!=toServiceMonthIndex(e)))].sort((e,t)=>(toServiceMonthIndex(e)??0)-(toServiceMonthIndex(t)??0))}function collapseServiceMonthRuns(e){const t=[];return e.forEach(e=>{const n=t.at(-1),o=toServiceMonthIndex(e),i=null!=n?toServiceMonthIndex(n.end):null;null==n||null==o||null==i||o!==i+1?t.push({start:e,end:e}):n.end=e}),t}function formatServiceMonthRun(e,t){const n=formatServiceMonthName(e.start),o=e.start.slice(0,4);if(e.start===e.end)return t?`${n} ${o}`:n;const i=formatServiceMonthName(e.end),r=e.end.slice(0,4);if(o===r){const e=`${n}-${i}`;return t?`${e} ${o}`:e}return`${n} ${o}-${i} ${r}`}function formatActualMatchingServiceMonths(e){const t=getUniqueSortedServiceMonths(e);if(0===t.length)return hyphen$k;if(1===t.length)return formatActualMatchingServiceMonth(t[0]);const n=collapseServiceMonthRuns(t);if(1===new Set(t.map(e=>e.slice(0,4))).size){const e=t[0].slice(0,4);return`${n.map(e=>formatServiceMonthRun(e,!1)).join(", ")} ${e}`}return n.map(e=>formatServiceMonthRun(e,!0)).join(", ")}function getActualMatchingServiceMonths(e){const t=(e.groupedMembers??[]).map(e=>e.serviceMonth).filter(e=>null!=e&&""!==e);return t.length>0?getUniqueSortedServiceMonths(t):""===e.serviceMonth?[]:getUniqueSortedServiceMonths([e.serviceMonth])}function getActualMatchingServiceLabel(e){return formatActualMatchingServiceMonths(getActualMatchingServiceMonths(e))}function getReceivedDate(e){if(null!=e.reversalDate)return e.reversalDate;if(null==e.transactionDate||""===e.transactionDate)return;const t=zeniDate(e.transactionDate);return Number.isFinite(t.valueOf())?t:void 0}function getReceivedLabel(e){return getReceivedDate(e)?.format(dateFormat$o.visual.MMMDFormat)??hyphen$k}function getReversesGroupedCount(e){const t=e.intendedAccrualIds;if(null!=t&&t.length>0)return t.length;const n=e.leftovers?.length??0,o=e.groupedAccrualIds??e.cleared?.accrualIds;return(null!=o&&o.length>0?o.length:1)+n}function isGroupedActualMatchingRow(e){return getReversesGroupedCount(e)>1}function groupedMemberFromRow(e,t){return t!==e.accrualId?{accrualId:t}:{accrualId:t,estimatedAmount:e.estimatedAmount,jeDebitAccountName:e.jeDebitAccountName,memo:e.memo,serviceMonth:e.serviceMonth}}const MAX_GROUPED_MENU_ITEMS=12;function getGroupedAccrualMenuItems(e){if(!isGroupedActualMatchingRow(e))return[];if(null!=e.groupedMembers&&e.groupedMembers.length>0)return e.groupedMembers.slice(0,MAX_GROUPED_MENU_ITEMS);const t=e.groupedAccrualIds??e.cleared?.accrualIds;return null==t||t.length<=1?[]:t.slice(0,MAX_GROUPED_MENU_ITEMS).map(t=>groupedMemberFromRow(e,t))}function getReversesLabel(e){const t=getReversesGroupedCount(e);if(t>1)return actualMatchingStrings$a.reversesCount.replace("{count}",String(t));const n=e.memo.trim();return""!==n?n:hyphen$k}function getReversesTooltip(e){if(isGroupedActualMatchingRow(e)){const t=getGroupedAccrualMenuItems(e).map(e=>e.memo?.trim()).filter(e=>null!=e&&""!==e),n=[...new Set(t)];if(n.length>0)return n.join(", ")}return e.memo.trim()}function isSameMatchVendor(e,t){const n=e.vendorId,o=t.vendorId;return null!=n&&""!==n&&null!=o&&""!==o&&n===o}const DEFAULT_DISPLAY_CURRENCY={amount:0,currencyCode:"USD",currencySymbol:"$"};function getAccruedDisplayAmount(e){if(null!=e.accruedAmount)return e.accruedAmount;const t=e.groupedMembers;if(null!=t&&t.length>1){const n=t.map(e=>e.estimatedAmount);if(n.every(e=>null!=e)){const t=n.reduce((e,t)=>e+t.amount,0);return toAmount(t,e.estimatedAmount.currencyCode,e.estimatedAmount.currencySymbol)}}return e.estimatedAmount}function getActualDisplayAmount(e){const t=getActualAmount(e);if(null!=t)return toAmount(t,e.estimatedAmount.currencyCode,e.estimatedAmount.currencySymbol)}function getActualMatchingDisplayCurrency(e){return e[0]?.estimatedAmount??DEFAULT_DISPLAY_CURRENCY}function formatKpiAmount(e,t){return formatAmount(toAmount(e,t.currencyCode,t.currencySymbol))}function isHumanReversedRow(e){return"manually_reversed"===e.kind||"manual_reverse"===e.reversalTrigger}function isAiReversedBy(e){return"pending_review"===e.kind||!isHumanReversedRow(e)}function getColumnKeyForActualMatchingSortKey(e){switch(e){case"vendor":return"vendor";case"type":return"type";case"amount":case"accrued":return"accrued";case"actual":return"actual";case"variance":return"variance";default:return"received"}}function getActualMatchingColumnSortValue(e,t){switch(t){case"received":return getReceivedDate(e)?.valueOf()??null;case"vendor":return e.vendorName.toLowerCase();case"type":return getActualMatchingTypeLabel(e).toLowerCase();case"accrued":return getAccruedAmount(e);case"actual":return getActualAmount(e)??null;case"variance":return getVariancePercent(e)??null;default:return null}}function sortActualMatchingRowsByColumn(e,t,n){const o="ascending"===n?1:-1;return[...e].sort((e,n)=>{const i=getActualMatchingColumnSortValue(e,t),r=getActualMatchingColumnSortValue(n,t);return null==i&&null==r?0:null==i?1:null==r?-1:"number"==typeof i&&"number"==typeof r?(i-r)*o:String(i).localeCompare(String(r),void 0,{numeric:!0,sensitivity:"base"})*o})}function getUndoReversalAccrualIds(e){const t=(e.groupedMembers??[]).map(e=>e.accrualId).filter(e=>""!==e);return t.length>0?Array.from(new Set(t)):""!==e.accrualId?[e.accrualId]:[]}function getActualMatchingStatusFilter(e){const t=e.statusFilter;return"pending_review"===t||"auto_reversed"===t?t:"all"}function getMatchedBillTransaction(e){const t=[...e.members,...e.leftovers??[]];for(const n of t){const t=n.cleared?.matchedTransactionId??n.matchSuggestion?.matchedTransactionId??"";if(""===t)continue;const o=n.cleared?.matchedTransactionType??n.matchSuggestion?.matchedTransactionType??e.transactionType;if(""!==o)return{id:t,type:o}}return null}function getUndoReversalAccrualIdsFromMatch(e){return Array.from(new Set(e.members.map(e=>e.accrualId).filter(e=>""!==e)))}function getApproveAndReverseParams(e){const t=e.members.map(e=>e.matchSuggestion).find(e=>null!=e?.matchedTransactionId&&""!==e.matchedTransactionId),n=t?.matchedTransactionId??"",o=t?.matchedTransactionIntegrationId??e.transactionIntegrationId,i=(t?.matchedTransactionType??e.transactionType).toLowerCase(),r=t?.matchedLineId??"",a=getUndoReversalAccrualIdsFromMatch(e);return""===n||""===o||""===i||""===r||0===a.length?null:{accrualIds:a,lineIds:[r],transactionId:n,transactionIntegrationId:o,transactionSyncToken:t?.matchedTransactionSyncToken??"",transactionType:i}}function getLeftoverWarningTooltip(e){return(e.leftovers??[]).map(e=>`${null!=e.memo&&""!==e.memo.trim()?e.memo.trim():hyphen$k} · ${null!=e.serviceMonth&&""!==e.serviceMonth?formatActualMatchingServiceMonth(e.serviceMonth):hyphen$k} · ${null!=e.estimatedAmount?formatAmount(e.estimatedAmount):hyphen$k}`).join("\n")}function pruneSelectionToVisibleResults(e,t,n){return"Completed"!==n?e:e.filter(e=>t.has(e))}function nextSelectedTransactionLines(e,t,n){if(e.includes(t))return e.filter(e=>e!==t);const o=n.find(e=>getTransactionLineKey(e.transactionId,e.lineId)===t);if(null==o)return e;if(0===e.length)return[t];const i=n.find(t=>getTransactionLineKey(t.transactionId,t.lineId)===e[0]);return null!=i&&i.transactionIntegrationId===o.transactionIntegrationId&&i.transactionType===o.transactionType?[...e,t]:[t]}function pickPrefillTransactionLines(e,t){if(0===e.length)return[];const n=t?.consumedLineIds,o=t?.matchedTransactionId;if(null!=n&&n.length>0){if(null==o)return[];const t=e.filter(e=>e.transactionId===o);return n.flatMap(e=>{const n=t.find(t=>t.lineId===e);return null!=n?[getTransactionLineKey(n.transactionId,n.lineId)]:[]})}const i=pickPrefillTransactionLine(e,t);return null!=i?[i]:[]}function pickPrefillTransactionLine(e,t){if(0===e.length)return null;const n=t?.matchedLineId,o=t?.matchedTransactionId;if(null!=o&&null!=n){const t=e.find(e=>e.transactionId===o&&e.lineId===n);if(null!=t)return getTransactionLineKey(t.transactionId,t.lineId)}const i=null!=o?e.filter(e=>e.transactionId===o):e;if(null!=o&&0===i.length)return null;const r=i;if(1===r.length)return getTransactionLineKey(r[0].transactionId,r[0].lineId);const a=t?.actualAmount;if(null!=a){const e=r.filter(e=>areMatchAmountsEqual(e.amount,a));if(1===e.length)return getTransactionLineKey(e[0].transactionId,e[0].lineId)}return null}function shouldPromptSelectMatchLine({isTxnSearchComplete:e,lineCount:t,openedFromMatchId:n,selectedLineKey:o}){return null!=n&&""!==n&&e&&t>1&&null==o}function areMatchAmountsEqual(e,t){return Math.abs(e-t)<.005}const{expenseAutomation:{jeSchedules:{actualMatching:actualMatchingStrings$9}},common:{strings:{middleDot:middleDot$2}}}=appLocale.getLocalizedStrings();function KpiTile$3({footer:e,footerTone:t="default",hover:n,icon:o,label:i,primary:r,secondary:a,secondaryWithDot:s=!1}){/* @__PURE__ */
91029
+ `,KPI_TILE_BREAKDOWN_PLACEHOLDER=" ";function formatAmount(e){return amountToString("0,0",e)}function buildTypeBreakdown(e,t){const n={};for(const o of e){const e=getJEScheduleRowType(o);null!=e&&(n[e]=(n[e]??0)+1)}return Object.entries(n).filter(([,e])=>e>0).map(([e,n])=>`${n} ${t[e]??e}`).join(" • ")}function buildTypeBreakdownItems(e,t){const n={};for(const o of e){const e=getJEScheduleRowType(o);null!=e&&(n[e]=(n[e]??0)+1)}return Object.entries(n).filter(([,e])=>e>0).map(([e,n])=>({text:t[e]??e,amount:n.toString()}))}const{expenseAutomation:{jeSchedules:{actualMatching:actualMatchingStrings$a,oneTimeAccrualType:oneTimeAccrualType$2}},common:{strings:{hyphen:hyphen$k}},dateFormat:dateFormat$o}=appLocale.getLocalizedStrings(),EMPTY_ACTUAL_MATCHING_KPI_SUMMARY={actualsReceived:{count:0,expectedCount:0,vendorsPending:0},autoReversed:{count:0,percent:0,clearedAmount:0},pendingReview:{count:0,amount:0,estimatedMinutesToClear:0},variance:{percent:0,averagePercentPerMatch:0,netAmount:0}},EMPTY_ACTUAL_MATCHING_VIEW={fetchState:"Not-Started",error:void 0,reversed:[],pendingReview:[],kpiSummary:EMPTY_ACTUAL_MATCHING_KPI_SUMMARY,uiState:{sortKey:"date",sortOrder:"descending",searchString:"",scrollPosition:void 0,statusFilter:"all"},refreshStatus:{fetchState:"Not-Started",error:void 0},ignoreStatusByMatchId:{},undoReversalStatusByMatchId:{},hasLoadedForSelectedPeriod:!1,matchModal:{isOpen:!1,confirmStatus:{fetchState:"Not-Started",error:void 0},transactionSearch:{query:"",results:[],fetchState:{fetchState:"Not-Started",error:void 0},nextPageToken:null,isLoadingMore:!1},accrualSearch:{query:"",results:[],fetchState:{fetchState:"Not-Started",error:void 0},nextPageToken:null,isLoadingMore:!1}}};function getActualMatchingFromSelector(e){return e.actualMatching??EMPTY_ACTUAL_MATCHING_VIEW}function getAccruedAmount(e){return e.accruedAmount?.amount??e.estimatedAmount.amount}function isGroupedClearedMatch(e){const t=e?.groupSum?.amount;if(null==t||t<=0)return!1;const n=e?.matchShape;return"1:N"===n||"N:1"===n||(e?.accrualIds?.length??0)>1}function getActualAmount(e){return null!=e.actualAmount?e.actualAmount.amount:"pending_review"===e.kind?e.matchSuggestion?.matchedAmount?.amount:e.cleared?.matchedAmount?.amount}function getVariancePercent(e){if(isGroupedClearedMatch(e.cleared)){const t=e.cleared?.matchedAmount?.amount,n=e.cleared?.groupSum?.amount;if(null==t||null==n||0===n)return;return(t-n)/n*100}const t=getAccruedAmount(e),n=getActualAmount(e);if(null!=n&&0!==t)return(n-t)/t*100}function formatVariancePercent(e){const t=Math.round(10*e)/10;return`${t>0?"+":""}${t.toFixed(1)}%`}function getVarianceCapsuleType(e){const t=Math.abs(e);return t<=5?"success":t<=15?"warning":"attention"}function getMatchTierKey(e){return e.cleared?.matchTier??e.matchSuggestion?.matchTier}function getMatchTierLabel(e){const t=getMatchTierKey(e);return"tier_1"===t?actualMatchingStrings$a.matchTier.exact:"tier_2"===t?actualMatchingStrings$a.matchTier.fuzzy:"manual"===t?actualMatchingStrings$a.matchTier.manual:"agent"===e.origin?actualMatchingStrings$a.matchTier.aiAccountant:hyphen$k}function getMatchTierCapsuleType(e){const t=getMatchTierKey(e);return"tier_1"===t?"success":"tier_2"===t?"warning":"manual"===t?"default":"info"}function getActualMatchingTypeLabel(e){const t=e.cleared?.matchedTransactionType??e.matchSuggestion?.matchedTransactionType;return null!=t&&""!==t?formatTransactionTypeLabel(t):oneTimeAccrualType$2}function getActualMatchingTypeCapsuleType(e){const t=(e.cleared?.matchedTransactionType??e.matchSuggestion?.matchedTransactionType??"").toLowerCase();return"bill"===t?"info":"expense"===t||t.includes("card")||"credit_card_payment"===t?"success":t.includes("payroll")?"attention":t.includes("ach")||"check"===t||"transfer"===t?"warning":"default"}function formatActualMatchingServiceMonth(e){return/^\d{4}-\d{2}$/.test(e)?zeniDate(`${e}-01`).format(dateFormat$o.visual.MMMYYYYFormat):""===e?hyphen$k:e}function toServiceMonthIndex(e){const t=/^(\d{4})-(\d{2})$/.exec(e);return null==t?null:12*Number(t[1])+Number(t[2])-1}function formatServiceMonthName(e){return zeniDate(`${e}-01`).format("MMM")}function getUniqueSortedServiceMonths(e){return[...new Set(e.filter(e=>null!=toServiceMonthIndex(e)))].sort((e,t)=>(toServiceMonthIndex(e)??0)-(toServiceMonthIndex(t)??0))}function collapseServiceMonthRuns(e){const t=[];return e.forEach(e=>{const n=t.at(-1),o=toServiceMonthIndex(e),i=null!=n?toServiceMonthIndex(n.end):null;null==n||null==o||null==i||o!==i+1?t.push({start:e,end:e}):n.end=e}),t}function formatServiceMonthRun(e,t){const n=formatServiceMonthName(e.start),o=e.start.slice(0,4);if(e.start===e.end)return t?`${n} ${o}`:n;const i=formatServiceMonthName(e.end),r=e.end.slice(0,4);if(o===r){const e=`${n}-${i}`;return t?`${e} ${o}`:e}return`${n} ${o}-${i} ${r}`}function formatActualMatchingServiceMonths(e){const t=getUniqueSortedServiceMonths(e);if(0===t.length)return hyphen$k;if(1===t.length)return formatActualMatchingServiceMonth(t[0]);const n=collapseServiceMonthRuns(t);if(1===new Set(t.map(e=>e.slice(0,4))).size){const e=t[0].slice(0,4);return`${n.map(e=>formatServiceMonthRun(e,!1)).join(", ")} ${e}`}return n.map(e=>formatServiceMonthRun(e,!0)).join(", ")}function getActualMatchingServiceMonths(e){const t=(e.groupedMembers??[]).map(e=>e.serviceMonth).filter(e=>null!=e&&""!==e);return t.length>0?getUniqueSortedServiceMonths(t):""===e.serviceMonth?[]:getUniqueSortedServiceMonths([e.serviceMonth])}function getActualMatchingServiceLabel(e){return formatActualMatchingServiceMonths(getActualMatchingServiceMonths(e))}function getReceivedDate(e){if(null!=e.reversalDate)return e.reversalDate;if(null==e.transactionDate||""===e.transactionDate)return;const t=zeniDate(e.transactionDate);return Number.isFinite(t.valueOf())?t:void 0}function getReceivedLabel(e){return getReceivedDate(e)?.format(dateFormat$o.visual.MMMDFormat)??hyphen$k}function getReversesGroupedCount(e){const t=e.intendedAccrualIds;if(null!=t&&t.length>0)return t.length;const n=e.leftovers?.length??0,o=e.groupedAccrualIds??e.cleared?.accrualIds;return(null!=o&&o.length>0?o.length:1)+n}function isGroupedActualMatchingRow(e){return getReversesGroupedCount(e)>1}function groupedMemberFromRow(e,t){return t!==e.accrualId?{accrualId:t}:{accrualId:t,estimatedAmount:e.estimatedAmount,jeDebitAccountName:e.jeDebitAccountName,memo:e.memo,serviceMonth:e.serviceMonth}}const MAX_GROUPED_MENU_ITEMS=12;function getGroupedAccrualMenuItems(e){if(!isGroupedActualMatchingRow(e))return[];if(null!=e.groupedMembers&&e.groupedMembers.length>0)return e.groupedMembers.slice(0,MAX_GROUPED_MENU_ITEMS);const t=e.groupedAccrualIds??e.cleared?.accrualIds;return null==t||t.length<=1?[]:t.slice(0,MAX_GROUPED_MENU_ITEMS).map(t=>groupedMemberFromRow(e,t))}function getReversesLabel(e){const t=getReversesGroupedCount(e);if(t>1)return actualMatchingStrings$a.reversesCount.replace("{count}",String(t));const n=e.memo.trim();return""!==n?n:hyphen$k}function getReversesTooltip(e){if(isGroupedActualMatchingRow(e)){const t=getGroupedAccrualMenuItems(e).map(e=>e.memo?.trim()).filter(e=>null!=e&&""!==e),n=[...new Set(t)];if(n.length>0)return n.join(", ")}return e.memo.trim()}function isSameMatchVendor(e,t){const n=e.vendorId,o=t.vendorId;return null!=n&&""!==n&&null!=o&&""!==o&&n===o}const DEFAULT_DISPLAY_CURRENCY={amount:0,currencyCode:"USD",currencySymbol:"$"};function getAccruedDisplayAmount(e){if(null!=e.accruedAmount)return e.accruedAmount;const t=e.groupedMembers;if(null!=t&&t.length>1){const n=t.map(e=>e.estimatedAmount);if(n.every(e=>null!=e)){const t=n.reduce((e,t)=>e+t.amount,0);return toAmount(t,e.estimatedAmount.currencyCode,e.estimatedAmount.currencySymbol)}}return e.estimatedAmount}function getActualDisplayAmount(e){const t=getActualAmount(e);if(null!=t)return toAmount(t,e.estimatedAmount.currencyCode,e.estimatedAmount.currencySymbol)}function getActualMatchingDisplayCurrency(e){return e[0]?.estimatedAmount??DEFAULT_DISPLAY_CURRENCY}function formatKpiAmount(e,t){return formatAmount(toAmount(e,t.currencyCode,t.currencySymbol))}function isHumanReversedRow(e){return"manually_reversed"===e.kind||"manual_reverse"===e.reversalTrigger}function isAiReversedBy(e){return"pending_review"===e.kind||!isHumanReversedRow(e)}function getColumnKeyForActualMatchingSortKey(e){switch(e){case"vendor":return"vendor";case"type":return"type";case"amount":case"accrued":return"accrued";case"actual":return"actual";case"variance":return"variance";default:return"received"}}function getActualMatchingColumnSortValue(e,t){switch(t){case"received":return getReceivedDate(e)?.valueOf()??null;case"vendor":return e.vendorName.toLowerCase();case"type":return getActualMatchingTypeLabel(e).toLowerCase();case"accrued":return getAccruedAmount(e);case"actual":return getActualAmount(e)??null;case"variance":return getVariancePercent(e)??null;default:return null}}function sortActualMatchingRowsByColumn(e,t,n){const o="ascending"===n?1:-1;return[...e].sort((e,n)=>{const i=getActualMatchingColumnSortValue(e,t),r=getActualMatchingColumnSortValue(n,t);return null==i&&null==r?0:null==i?1:null==r?-1:"number"==typeof i&&"number"==typeof r?(i-r)*o:String(i).localeCompare(String(r),void 0,{numeric:!0,sensitivity:"base"})*o})}function getUndoReversalAccrualIds(e){const t=(e.groupedMembers??[]).map(e=>e.accrualId).filter(e=>""!==e);return t.length>0?Array.from(new Set(t)):""!==e.accrualId?[e.accrualId]:[]}function getActualMatchingStatusFilter(e){const t=e.statusFilter;return"pending_review"===t||"auto_reversed"===t?t:"all"}function getMatchedBillTransaction(e){const t=[...e.members,...e.leftovers??[]];for(const n of t){const t=n.cleared?.matchedTransactionId??n.matchSuggestion?.matchedTransactionId??"";if(""===t)continue;const o=n.cleared?.matchedTransactionType??n.matchSuggestion?.matchedTransactionType??e.transactionType;if(""!==o)return{id:t,type:o}}return null}function getUndoReversalAccrualIdsFromMatch(e){return Array.from(new Set(e.members.map(e=>e.accrualId).filter(e=>""!==e)))}function getApproveAndReverseParams(e){const t=e.members.map(e=>e.matchSuggestion).find(e=>null!=e?.matchedTransactionId&&""!==e.matchedTransactionId),n=t?.matchedTransactionId??"",o=t?.matchedTransactionIntegrationId??e.transactionIntegrationId,i=(t?.matchedTransactionType??e.transactionType).toLowerCase(),r=suggestionLineIds(t),a=getUndoReversalAccrualIdsFromMatch(e);return""===n||""===o||""===i||0===r.length||0===a.length?null:{accrualIds:a,lineIds:r,transactionId:n,transactionIntegrationId:o,transactionSyncToken:t?.matchedTransactionSyncToken??"",transactionType:i}}function suggestionLineIds(e){const t=(e?.consumedLineIds??[]).filter(e=>""!==e);if(t.length>0)return t;const n=e?.matchedLineId??"";return""===n?[]:[n]}function getLeftoverWarningTooltip(e){return(e.leftovers??[]).map(e=>`${null!=e.memo&&""!==e.memo.trim()?e.memo.trim():hyphen$k} · ${null!=e.serviceMonth&&""!==e.serviceMonth?formatActualMatchingServiceMonth(e.serviceMonth):hyphen$k} · ${null!=e.estimatedAmount?formatAmount(e.estimatedAmount):hyphen$k}`).join("\n")}function pruneSelectionToVisibleResults(e,t,n){return"Completed"!==n?e:e.filter(e=>t.has(e))}function nextSelectedTransactionLines(e,t,n){if(e.includes(t))return e.filter(e=>e!==t);const o=n.find(e=>getTransactionLineKey(e.transactionId,e.lineId)===t);if(null==o)return e;if(0===e.length)return[t];const i=n.find(t=>getTransactionLineKey(t.transactionId,t.lineId)===e[0]);return null!=i&&i.transactionIntegrationId===o.transactionIntegrationId&&i.transactionType===o.transactionType?[...e,t]:[t]}function pickPrefillTransactionLines(e,t){if(0===e.length)return[];const n=t?.consumedLineIds,o=t?.matchedTransactionId;if(null!=n&&n.length>0){if(null==o)return[];const t=e.filter(e=>e.transactionId===o);return n.flatMap(e=>{const n=t.find(t=>t.lineId===e);return null!=n?[getTransactionLineKey(n.transactionId,n.lineId)]:[]})}const i=pickPrefillTransactionLine(e,t);return null!=i?[i]:[]}function pickPrefillTransactionLine(e,t){if(0===e.length)return null;const n=t?.matchedLineId,o=t?.matchedTransactionId;if(null!=o&&null!=n){const t=e.find(e=>e.transactionId===o&&e.lineId===n);if(null!=t)return getTransactionLineKey(t.transactionId,t.lineId)}const i=null!=o?e.filter(e=>e.transactionId===o):e;if(null!=o&&0===i.length)return null;const r=i;if(1===r.length)return getTransactionLineKey(r[0].transactionId,r[0].lineId);const a=t?.actualAmount;if(null!=a){const e=r.filter(e=>areMatchAmountsEqual(e.amount,a));if(1===e.length)return getTransactionLineKey(e[0].transactionId,e[0].lineId)}return null}function shouldPromptSelectMatchLine({isTxnSearchComplete:e,lineCount:t,openedFromMatchId:n,selectedLineKey:o}){return null!=n&&""!==n&&e&&t>1&&null==o}function areMatchAmountsEqual(e,t){return Math.abs(e-t)<.005}const{expenseAutomation:{jeSchedules:{actualMatching:actualMatchingStrings$9}},common:{strings:{middleDot:middleDot$2}}}=appLocale.getLocalizedStrings();function KpiTile$3({footer:e,footerTone:t="default",hover:n,icon:o,label:i,primary:r,secondary:a,secondaryWithDot:s=!1}){/* @__PURE__ */
91030
91030
  return jsxRuntimeExports.jsx(Tile$2,{children:/* @__PURE__ */jsxRuntimeExports.jsxs(Header$6,{children:[
91031
91031
  /* @__PURE__ */jsxRuntimeExports.jsxs(TitleRow$2,{children:[
91032
91032
  /* @__PURE__ */jsxRuntimeExports.jsx(TileLabel$2,{children:i}),
@@ -91364,6 +91364,350 @@ return jsxRuntimeExports.jsx(HeaderCell$4,{$hasLeftBorder:"action"===e.key,$just
91364
91364
  `,GroupBandFill=styled$2.div`
91365
91365
  grid-column: 1 / -1;
91366
91366
  min-width: 0;
91367
+ `,{dateFormat:dateFormat$n,common:{strings:{hyphen:hyphen$h}}}=appLocale.getLocalizedStrings();function formatServiceMonthLabel(e){return""===e?hyphen$h:zeniDate(`${e}-01`).format(dateFormat$n.visual.MMMYYYYFormat)}function formatAccrualJeDate(e,t){const n=formatServiceMonthLabel(e);return n===hyphen$h?t:`${n}, ${t}`}function formatJeShortDate(e){if(""===e)return hyphen$h;const t=zeniDate(e);return null!=t&&"function"==typeof t.isValid&&t.isValid()?t.format(dateFormat$n.visual.MMMDFormat):e}function formatReversalJeDate(e){return null==e?hyphen$h:"function"!=typeof e.isValid||e.isValid()?e.format(dateFormat$n.visual.MMMDFormat):hyphen$h}function sumAccruedAmount(e){return e.reduce((e,t)=>e+(t.estimatedAmount?.amount??0),0)}function variancePercent(e,t){return 0===t?null:(e-t)/t*100}function uniqueServiceMonthLabel(e){const t=Array.from(new Set(e.map(e=>formatServiceMonthLabel(e.serviceMonth)).filter(e=>e!==hyphen$h)));return 1!==t.length?null:t[0]}function transactionMatchLabel(e,t){const n=uniqueServiceMonthLabel(t);return null==n?e.vendorName:`${e.vendorName} — ${n}`}function creditAccountName(e,t){return null!=e.jeCreditAccountName&&""!==e.jeCreditAccountName?e.jeCreditAccountName:t}function debitAccountName(e,t){return null!=e.jeDebitAccountName&&""!==e.jeDebitAccountName?e.jeDebitAccountName:t}const{common:{strings:{hyphen:hyphen$g}},expenseAutomation:{jeSchedules:{actualMatching:actualMatchingStrings$5}}}=appLocale.getLocalizedStrings(),detailStrings$1=actualMatchingStrings$5.matchDetail;function getMatchServiceMonthsLabel(e){return formatActualMatchingServiceMonths(e.map(e=>e.serviceMonth))}function matchTierFromMatch(e){const t=e.matchTier??"";if(""!==t)return t.toLowerCase();const n=e.members[0];return(n?.cleared?.matchTier??n?.matchSuggestion?.matchTier??"").toLowerCase()}function getMatchMethodKey(e){const t=matchTierFromMatch(e);return"tier_1"===t||"deterministic"===t||"exact"===t?"exact":"tier_2"===t||"fuzzy"===t?"fuzzy":"manual"===t?"manual":"ai"}function getMatchMethodLabel(e){const t=getMatchMethodKey(e);return"exact"===t?detailStrings$1.matchMethodExact:"fuzzy"===t?detailStrings$1.matchMethodFuzzy:"manual"===t?detailStrings$1.matchMethodManual:detailStrings$1.matchMethodAi}function getWhyThisMatchedCopy(e){const t=getMatchServiceMonthsLabel(e.members),n=getMatchMethodKey(e);if("exact"===n)return detailStrings$1.whyExact.replace("{service}",t);if("fuzzy"===n){const t=getMatchVariancePercent(e),n=null==t?hyphen$g:`${(Math.round(10*Math.abs(t))/10).toFixed(1)}%`;return detailStrings$1.whyFuzzy.replace("{variance}",n)}return"manual"===n?detailStrings$1.whyManual.replace("{service}",t):detailStrings$1.whyAi.replace("{service}",t)}function getMatchJeSectionTitle(e){return"pending_review"===e?detailStrings$1.pendingReversalJe:detailStrings$1.reversedJe}function getMatchStatusLabel(e,t){return"pending_review"===e?t.statusPendingReview:"manually_reversed"===e?t.statusManuallyReversed:t.statusAutoReversed}function getMatchVariancePercent(e){return variancePercent(e.actualAmount.amount,e.accruedAmount.amount)}function formatMatchVarianceLabel(e){const t=getMatchVariancePercent(e);return null==t?null:formatVariancePercent(t)}function isMatchRefreshSpinning(e,t,n){return"In-Progress"===n||null==e&&("In-Progress"===t||"Not-Started"===t)}function transactionTypeDisplayLabel(e){const t=formatTransactionTypeLabel(e);return""===t?"transaction":t.toLowerCase()}function getOpenMatchedTransactionLabel(e,t){return t.openTransaction.replace("{type}",transactionTypeDisplayLabel(e))}const{common:{back:back$1,ignore:ignoreText$1,texts:{refresh:refresh},strings:{colon:colon$2,hyphen:hyphen$f}},expenseAutomation:{jeSchedules:{actualMatching:actualMatchingStrings$4}}}=appLocale.getLocalizedStrings(),previewStrings$5=actualMatchingStrings$4.matchModal,detailStrings=actualMatchingStrings$4.matchDetail,{reversalFailed:reversalFailed,undoFailed:undoFailed}=detailStrings,TEST_ID_PREFIX$2="actual-matching-match-detail",AMOUNT_FORMAT$1="0,0.[00]";function ActualMatchingOpenBillActionButton({match:e,transaction:t,onOpenBill:n}){const o=t??(null!=e?getMatchedBillTransaction(e):null);if(null==e&&null==o)return null;const i=getOpenMatchedTransactionLabel(o?.type??e?.transactionType??"bill",actualMatchingStrings$4);/* @__PURE__ */
91368
+ return jsxRuntimeExports.jsx(Tooltip$6,{title:i,enterDelay:600,placement:"bottom",children:/* @__PURE__ */jsxRuntimeExports.jsx("span",{style:{display:"inline-flex"},children:/* @__PURE__ */jsxRuntimeExports.jsx(OpenBillIconButton,{"data-testid":generateDataTestId(TEST_ID_PREFIX$2,"open-bill"),type:"button","aria-label":i,disabled:null==o,onClick:()=>{null!=o&&n?.(o)},children:/* @__PURE__ */jsxRuntimeExports.jsx(OpenBillIcon,{})})})})}function formatMemberAmount(e){return amountToString(AMOUNT_FORMAT$1,e.estimatedAmount)??hyphen$f}function ActualMatchingMatchDetailPage({detailFetchState:e,isRenderedInPanel:t=!1,isApproveInFlight:n=!1,isIgnoreInFlight:o=!1,isUndoInFlight:i=!1,match:r,onNavigateBack:a,onRefresh:s,onOpenBill:l,onApproveAndReverse:c,onIgnoreMatchSuggestion:d,onUndoReversal:p,lastMatchResults:u,lastUndoResults:m,refreshStatus:h}){const g=useTheme(),[x,f]=useState(!1),y=null!=r?getMatchedBillTransaction(r):null,S=r?.leftovers??[],C=null!=r?getApproveAndReverseParams(r):null,$=null!=r&&"pending_review"===r.kind&&null!=d,b=null!=r&&"pending_review"===r.kind&&null!=c,v=null!=r&&"pending_review"!==r.kind&&null!=p,E=isMatchRefreshSpinning(r,e,h),w=()=>{E||s()},R=null!=r?.vendorName&&""!==r.vendorName?r.vendorName:void 0,A=null!=l?/* @__PURE__ */jsxRuntimeExports.jsx(ActualMatchingOpenBillActionButton,{match:r,transaction:y??void 0,onOpenBill:l}):null,j=/* @__PURE__ */jsxRuntimeExports.jsx(Tooltip$6,{title:refresh,enterDelay:600,placement:"bottom",children:/* @__PURE__ */jsxRuntimeExports.jsx(RefreshButtonWrapper,{"data-testid":generateDataTestId("refresh-icon"),onClick:w,children:/* @__PURE__ */jsxRuntimeExports.jsx(StyledRefreshIcon$1,{$spinning:E})})});/* @__PURE__ */
91369
+ return jsxRuntimeExports.jsxs(PageRoot,{"data-testid":generateDataTestId(TEST_ID_PREFIX$2,"page"),children:[t?null:/* @__PURE__ */jsxRuntimeExports.jsx(NavbarContainer,{children:/* @__PURE__ */jsxRuntimeExports.jsx(NavBar,{title:R??"",source:"ActualMatchingMatchDetail",backgroundColor:g.colors.grey5,onBackClick:a,leftSideComponent:/* @__PURE__ */jsxRuntimeExports.jsx(Tooltip$6,{title:back$1,enterDelay:600,placement:"bottom",children:/* @__PURE__ */jsxRuntimeExports.jsx(BackButtonWrapper,{"data-testid":generateDataTestId(TEST_ID_PREFIX$2,"back"),onClick:a,children:/* @__PURE__ */jsxRuntimeExports.jsx(Back,{})})}),rightSideComponent:/* @__PURE__ */jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[A,j]})})}),null==r?"In-Progress"===e||"Not-Started"===e?/* @__PURE__ */jsxRuntimeExports.jsx(MatchDetailSkeleton,{}):/* @__PURE__ */jsxRuntimeExports.jsx(MatchDetailLoadError,{onRefresh:w}):/* @__PURE__ */jsxRuntimeExports.jsxs(Content$1,{children:[
91370
+ /* @__PURE__ */jsxRuntimeExports.jsxs(HeaderCard,{children:[
91371
+ /* @__PURE__ */jsxRuntimeExports.jsxs(VendorRow,{children:[
91372
+ /* @__PURE__ */jsxRuntimeExports.jsx(EntityAvatar,{name:r.vendorName??""}),
91373
+ /* @__PURE__ */jsxRuntimeExports.jsx(VendorName,{children:r.vendorName??""}),
91374
+ /* @__PURE__ */jsxRuntimeExports.jsx(FitContentCapsule,{children:/* @__PURE__ */jsxRuntimeExports.jsx(StyledCapsule,{label:getMatchStatusLabel(r.kind,detailStrings),type:"pending_review"===r.kind?"warning":"manually_reversed"===r.kind?"default":"success"})}),
91375
+ /* @__PURE__ */jsxRuntimeExports.jsx(HeaderAmount,{children:formatAmount(r.actualAmount)})]}),
91376
+ /* @__PURE__ */jsxRuntimeExports.jsxs(SummaryRows,{children:[
91377
+ /* @__PURE__ */jsxRuntimeExports.jsxs(SummaryRow$1,{children:[
91378
+ /* @__PURE__ */jsxRuntimeExports.jsx(SummaryLabel,{children:detailStrings.servicePeriod}),
91379
+ /* @__PURE__ */jsxRuntimeExports.jsx(SummaryValue,{children:getMatchServiceMonthsLabel(r.members)})]}),
91380
+ /* @__PURE__ */jsxRuntimeExports.jsxs(SummaryRow$1,{children:[
91381
+ /* @__PURE__ */jsxRuntimeExports.jsx(SummaryLabel,{children:detailStrings.billDate}),
91382
+ /* @__PURE__ */jsxRuntimeExports.jsx(SummaryValue,{children:null!=r.transactionDate&&""!==r.transactionDate?formatJeShortDate(r.transactionDate):hyphen$f})]})]})]}),
91383
+ /* @__PURE__ */jsxRuntimeExports.jsxs(BodyPad,{children:[
91384
+ /* @__PURE__ */jsxRuntimeExports.jsxs(FieldCard,{children:[
91385
+ /* @__PURE__ */jsxRuntimeExports.jsx(FieldRow,{label:detailStrings.matchMethod,value:getMatchMethodLabel(r)}),
91386
+ /* @__PURE__ */jsxRuntimeExports.jsx(FieldRow,{label:detailStrings.source,value:detailStrings.sourceJeAgent}),
91387
+ /* @__PURE__ */jsxRuntimeExports.jsx(FieldRow,{label:detailStrings.accruedAmount,value:formatAmount(r.accruedAmount)}),
91388
+ /* @__PURE__ */jsxRuntimeExports.jsx(FieldRow,{label:detailStrings.actualAmount,value:formatAmount(r.actualAmount)}),
91389
+ /* @__PURE__ */jsxRuntimeExports.jsx(FieldRow,{label:detailStrings.variance,value:/* @__PURE__ */jsxRuntimeExports.jsx(VarianceValue,{match:r})})]}),
91390
+ /* @__PURE__ */jsxRuntimeExports.jsx(SectionTitle$9,{children:getMatchJeSectionTitle(r.kind)}),r.members.map(e=>/* @__PURE__ */jsxRuntimeExports.jsx(ReversalJeBlock,{accrual:e,postingDateLabel:"pending_review"===r.kind?null!=r.transactionDate&&""!==r.transactionDate?formatJeShortDate(r.transactionDate):hyphen$f:formatReversalJeDate(e.reversalPostingDate),failureReason:undoFailureReason(m,e.accrualId),testIdSuffix:`reversal-je-${e.accrualId}`},`reversal-je-${e.accrualId}`)),S.filter(e=>shouldShowLeftoverReversalFailure(e.accrualId,u,m)).map(e=>/* @__PURE__ */jsxRuntimeExports.jsx(ReversalJeBlock,{accrual:e,postingDateLabel:null!=r.transactionDate&&""!==r.transactionDate?formatJeShortDate(r.transactionDate):hyphen$f,failureReason:leftoverReversalFailureReason(u,e.accrualId),testIdSuffix:`reversal-je-${e.accrualId}`},`reversal-je-${e.accrualId}`)),
91391
+ /* @__PURE__ */jsxRuntimeExports.jsx(SectionTitle$9,{children:detailStrings.whyThisMatched}),
91392
+ /* @__PURE__ */jsxRuntimeExports.jsxs(WhyPanel,{"data-testid":generateDataTestId(TEST_ID_PREFIX$2,"why"),children:[
91393
+ /* @__PURE__ */jsxRuntimeExports.jsxs(WhyHead,{children:[
91394
+ /* @__PURE__ */jsxRuntimeExports.jsx(WhyMethod,{children:getMatchMethodLabel(r)}),
91395
+ /* @__PURE__ */jsxRuntimeExports.jsx(WhySource,{children:detailStrings.sourceAttribution.replace("{source}",detailStrings.sourceJeAgent)})]}),
91396
+ /* @__PURE__ */jsxRuntimeExports.jsx(WhyCopy,{children:getWhyThisMatchedCopy(r)})]})]})]}),$&&b?/* @__PURE__ */jsxRuntimeExports.jsx(Footer$7,{cancelBtn:{isDisabled:o||n,isLoading:o,label:ignoreText$1,reverseSpinnerColor:!1,onClick:()=>f(!0)},primaryBtn:{isDisabled:o||n||null==C,isLoading:n,label:actualMatchingStrings$4.approveAndReverse,type:"button",onClick:()=>{null!=C&&c?.(C)}},showCancel:!0}):b?/* @__PURE__ */jsxRuntimeExports.jsx(Footer$7,{primaryBtn:{isDisabled:n||null==C,isLoading:n,label:actualMatchingStrings$4.approveAndReverse,type:"button",onClick:()=>{null!=C&&c?.(C)}}}):null,v&&null!=p&&null!=r?/* @__PURE__ */jsxRuntimeExports.jsx(Footer$7,{primaryBtn:{isDisabled:i,isLoading:i,label:actualMatchingStrings$4.undoReversal,reverseSpinnerColor:!1,type:"button",variant:"outline",onClick:()=>p(getUndoReversalAccrualIdsFromMatch(r))}}):null,$&&/* @__PURE__ */jsxRuntimeExports.jsx(JEAccrualFeedbackDialog,{amount:amountToString(AMOUNT_FORMAT$1,r.actualAmount)??"",isOpen:x,isSubmitting:o,mode:"ignoreMatchSuggestion",vendorName:r.vendorName??"",onClose:()=>f(!1),onSubmit:(e,t)=>{d?.(e,t)}})]})}function prefixLastAction(e,t){return`${e}: ${t}`}function resultDetail(e,t){return null!=e&&""!==e?e:null!=t&&""!==t?t:void 0}function leftoverMatchFailureDetail(e,t){const n=e?.find(e=>e.accrualId===t);if(null!=n&&"reversed"!==n.status&&"noop"!==n.status)return resultDetail(n.reason,n.status)}function leftoverReversalFailureReason(e,t){const n=leftoverMatchFailureDetail(e,t);if(null!=n)return prefixLastAction(reversalFailed,n)}function shouldShowLeftoverReversalFailure(e,t,n){return!0!==n?.some(t=>t.accrualId===e&&"undone"===t.status)&&null!=leftoverMatchFailureDetail(t,e)}function undoFailureReason(e,t){const n=e?.find(e=>e.accrualId===t);if(null==n||"undone"===n.status)return;const o=resultDetail(n.reason,n.status);return null!=o?prefixLastAction(undoFailed,o):void 0}function FieldRow({label:e,value:t}){/* @__PURE__ */
91397
+ return jsxRuntimeExports.jsxs(FieldRowRoot,{children:[
91398
+ /* @__PURE__ */jsxRuntimeExports.jsx(FieldLabel$1,{children:`${e}${colon$2}`}),
91399
+ /* @__PURE__ */jsxRuntimeExports.jsx(FieldValue,{children:t})]})}function VarianceValue({match:e}){const t=formatMatchVarianceLabel(e),n=getMatchVariancePercent(e);return null==t||null==n?/* @__PURE__ */jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{children:hyphen$f}):/* @__PURE__ */jsxRuntimeExports.jsx(FitContentCapsule,{children:/* @__PURE__ */jsxRuntimeExports.jsx(StyledCapsule,{label:t,type:getVarianceCapsuleType(n)})})}function ReversalJeBlock({accrual:e,postingDateLabel:t,testIdSuffix:n,failureReason:o}){const i=formatMemberAmount(e);/* @__PURE__ */
91400
+ return jsxRuntimeExports.jsx(JeBlock$1,{creditAccount:debitAccountName(e,hyphen$f),creditAmount:i,dateLabel:t,debitAccount:creditAccountName(e,previewStrings$5.accruedExpensesFallback),debitAmount:i,failureReason:o,testIdSuffix:n})}function JeBlock$1({creditAccount:e,creditAmount:t,dateLabel:n,debitAccount:o,debitAmount:i,testIdSuffix:r,failureReason:a}){const s=null!=a&&""!==a;/* @__PURE__ */
91401
+ return jsxRuntimeExports.jsxs(JeCard$1,{$hasFailure:s,"data-testid":generateDataTestId(TEST_ID_PREFIX$2,r),children:[
91402
+ /* @__PURE__ */jsxRuntimeExports.jsxs(JeTable$1,{children:[
91403
+ /* @__PURE__ */jsxRuntimeExports.jsx(JeHeaderCell$1,{children:detailStrings.jePostingDate}),
91404
+ /* @__PURE__ */jsxRuntimeExports.jsx(JeHeaderCell$1,{children:previewStrings$5.columnAccount}),
91405
+ /* @__PURE__ */jsxRuntimeExports.jsx(JeHeaderCell$1,{$align:"right",children:previewStrings$5.columnDebit}),
91406
+ /* @__PURE__ */jsxRuntimeExports.jsx(JeHeaderCell$1,{$align:"right",children:previewStrings$5.columnCredit}),
91407
+ /* @__PURE__ */jsxRuntimeExports.jsx(JeCell$1,{children:n}),
91408
+ /* @__PURE__ */jsxRuntimeExports.jsx(JeCell$1,{children:o}),
91409
+ /* @__PURE__ */jsxRuntimeExports.jsx(JeCell$1,{$align:"right",$isFailureAmount:s,children:i}),
91410
+ /* @__PURE__ */jsxRuntimeExports.jsx(JeCell$1,{$align:"right",$muted:!0,children:hyphen$f}),
91411
+ /* @__PURE__ */jsxRuntimeExports.jsx(JeCell$1,{children:n}),
91412
+ /* @__PURE__ */jsxRuntimeExports.jsx(JeCell$1,{children:e}),
91413
+ /* @__PURE__ */jsxRuntimeExports.jsx(JeCell$1,{$align:"right",$muted:!0,children:hyphen$f}),
91414
+ /* @__PURE__ */jsxRuntimeExports.jsx(JeCell$1,{$align:"right",$isFailureAmount:s,children:t})]}),s?/* @__PURE__ */jsxRuntimeExports.jsx(JeFailureReason,{"data-testid":generateDataTestId(TEST_ID_PREFIX$2,`${r}-reason`),children:a}):null]})}function MatchDetailLoadError({onRefresh:e}){/* @__PURE__ */
91415
+ return jsxRuntimeExports.jsxs(LoadErrorRoot,{"data-testid":generateDataTestId(TEST_ID_PREFIX$2,"load-error"),children:[
91416
+ /* @__PURE__ */jsxRuntimeExports.jsx(Tooltip$6,{title:refresh,enterDelay:600,placement:"bottom",children:/* @__PURE__ */jsxRuntimeExports.jsx(LoadErrorIconButton,{type:"button","aria-label":refresh,onClick:e,children:/* @__PURE__ */jsxRuntimeExports.jsx(StyledAlertIcon$2,{})})}),
91417
+ /* @__PURE__ */jsxRuntimeExports.jsx(LoadErrorTitle,{children:detailStrings.loadErrorTitle}),
91418
+ /* @__PURE__ */jsxRuntimeExports.jsx(LoadErrorSubTitle,{children:detailStrings.loadErrorSubTitle})]})}function MatchDetailSkeleton(){/* @__PURE__ */
91419
+ return jsxRuntimeExports.jsxs(Content$1,{"data-testid":generateDataTestId(TEST_ID_PREFIX$2,"skeleton"),children:[
91420
+ /* @__PURE__ */jsxRuntimeExports.jsxs(HeaderCard,{children:[
91421
+ /* @__PURE__ */jsxRuntimeExports.jsxs(VendorRow,{children:[
91422
+ /* @__PURE__ */jsxRuntimeExports.jsx(ContentLoaderSkeleton$1,{width:sp[5],height:sp[5]}),
91423
+ /* @__PURE__ */jsxRuntimeExports.jsx(ContentLoaderSkeleton$1,{width:180,height:sp[4]})]}),
91424
+ /* @__PURE__ */jsxRuntimeExports.jsx(ContentLoaderSkeleton$1,{width:240,height:sp[3]})]}),
91425
+ /* @__PURE__ */jsxRuntimeExports.jsxs(BodyPad,{children:[
91426
+ /* @__PURE__ */jsxRuntimeExports.jsxs(FieldCard,{children:[
91427
+ /* @__PURE__ */jsxRuntimeExports.jsx(ContentLoaderSkeleton$1,{width:"100%",height:sp[6]}),
91428
+ /* @__PURE__ */jsxRuntimeExports.jsx(ContentLoaderSkeleton$1,{width:"100%",height:sp[6]}),
91429
+ /* @__PURE__ */jsxRuntimeExports.jsx(ContentLoaderSkeleton$1,{width:"100%",height:sp[6]})]}),
91430
+ /* @__PURE__ */jsxRuntimeExports.jsx(ContentLoaderSkeleton$1,{width:240,height:sp[3]}),
91431
+ /* @__PURE__ */jsxRuntimeExports.jsx(ContentLoaderSkeleton$1,{width:"100%",height:120})]})]})}const spin=keyframes`
91432
+ 0% {
91433
+ transform: rotate(0deg);
91434
+ }
91435
+ 100% {
91436
+ transform: rotate(360deg);
91437
+ }
91438
+ `,PageRoot=styled$2.div`
91439
+ display: flex;
91440
+ flex-direction: column;
91441
+ flex: 1;
91442
+ width: 100%;
91443
+ height: 100%;
91444
+ min-height: 0;
91445
+ overflow: hidden;
91446
+ background-color: ${e=>e.theme.colors.grey4};
91447
+ `,NavbarContainer=styled$2.div`
91448
+ position: sticky;
91449
+ z-index: 3;
91450
+ top: ${Space.sp0};
91451
+ width: 100%;
91452
+ `,BackButtonWrapper=styled$2.div`
91453
+ display: flex;
91454
+ align-items: center;
91455
+ justify-content: center;
91456
+ padding: ${Space.sp1};
91457
+ width: ${Space.sp4};
91458
+ height: ${Space.sp4};
91459
+ border-radius: ${Space.sp1};
91460
+ box-sizing: border-box;
91461
+ cursor: pointer;
91462
+ &:hover {
91463
+ background-color: ${e=>e.theme.colors.grey3};
91464
+ }
91465
+ `,Back=styled$2(SvgArrowLeft)`
91466
+ width: ${Space.sp3};
91467
+ height: ${Space.sp3};
91468
+ color: ${e=>e.theme.colors.champion};
91469
+ &:hover {
91470
+ color: ${e=>e.theme.colors.primary};
91471
+ }
91472
+ `,RefreshButtonWrapper=styled$2.div`
91473
+ display: flex;
91474
+ align-items: center;
91475
+ justify-content: center;
91476
+ width: ${Space.sp4};
91477
+ height: ${Space.sp4};
91478
+ border-radius: ${Space.sp1};
91479
+ cursor: pointer;
91480
+ &:hover {
91481
+ background-color: ${e=>e.theme.colors.grey3};
91482
+ }
91483
+ `,StyledRefreshIcon$1=styled$2(SvgRefresh,{shouldForwardProp:e=>"string"==typeof e&&"$spinning"!==e})`
91484
+ cursor: pointer;
91485
+ width: ${Space.sp3};
91486
+ height: ${Space.sp3};
91487
+ color: ${e=>e.theme.colors.champion};
91488
+ animation: ${e=>e.$spinning?css$2`
91489
+ ${spin} 2s linear infinite;
91490
+ `:"none"};
91491
+ &:hover {
91492
+ color: ${e=>e.theme.colors.primary};
91493
+ }
91494
+ `,Content$1=styled$2.div`
91495
+ display: flex;
91496
+ flex: 1;
91497
+ flex-direction: column;
91498
+ overflow-y: auto;
91499
+ min-height: 0;
91500
+ background: ${e=>e.theme.colors.grey4};
91501
+ `,LoadErrorRoot=styled$2.div`
91502
+ display: flex;
91503
+ flex: 1;
91504
+ flex-direction: column;
91505
+ align-items: center;
91506
+ justify-content: center;
91507
+ gap: ${Space.sp2};
91508
+ padding: ${Space.sp4};
91509
+ min-height: 0;
91510
+ `,LoadErrorIconButton=styled$2.button`
91511
+ display: flex;
91512
+ align-items: center;
91513
+ justify-content: center;
91514
+ width: ${sp[8]}px;
91515
+ height: ${sp[8]}px;
91516
+ padding: 0;
91517
+ border: none;
91518
+ border-radius: 50%;
91519
+ background: ${e=>e.theme.colors.grey5};
91520
+ cursor: pointer;
91521
+ color: ${e=>e.theme.colors.alert};
91522
+ &:hover {
91523
+ background: ${e=>e.theme.colors.grey3};
91524
+ }
91525
+ `,StyledAlertIcon$2=styled$2(SvgAlertRound)`
91526
+ width: ${sp[5]}px;
91527
+ height: ${sp[5]}px;
91528
+ `,LoadErrorTitle=styled$2(H6Regular)`
91529
+ color: ${e=>e.theme.colors.alert};
91530
+ `,LoadErrorSubTitle=styled$2(ExtraLargeRegular)`
91531
+ color: ${e=>e.theme.colors.primary};
91532
+ `,HeaderCard=styled$2.div`
91533
+ display: flex;
91534
+ flex-direction: column;
91535
+ width: 100%;
91536
+ box-sizing: border-box;
91537
+ background: ${e=>e.theme.colors.grey5};
91538
+ border-bottom: 1px solid ${e=>e.theme.colors.grey2};
91539
+ padding: ${Space.sp3} ${Space.sp5} ${Space.sp2};
91540
+ `,VendorRow=styled$2.div`
91541
+ display: flex;
91542
+ align-items: center;
91543
+ gap: ${Space.sp2};
91544
+ min-width: 0;
91545
+ min-height: ${Space.sp6};
91546
+ margin-bottom: ${Space.sp2};
91547
+ `,HeaderAmount=styled$2(H7SemiBold)`
91548
+ color: ${e=>e.theme.colors.champion};
91549
+ font-variant-numeric: tabular-nums;
91550
+ white-space: nowrap;
91551
+ margin-left: auto;
91552
+ `,SummaryRows=styled$2.div`
91553
+ display: flex;
91554
+ flex-direction: column;
91555
+ margin-bottom: ${Space.sp1};
91556
+ `,SummaryRow$1=styled$2.div`
91557
+ display: flex;
91558
+ flex-direction: row;
91559
+ justify-content: space-between;
91560
+ align-items: center;
91561
+ gap: ${Space.sp3};
91562
+ min-height: ${Space.sp5};
91563
+ `,SummaryLabel=styled$2(StandardMedium)`
91564
+ color: ${e=>e.theme.colors.hero};
91565
+ `,SummaryValue=styled$2(StandardMedium)`
91566
+ color: ${e=>e.theme.colors.champion};
91567
+ text-align: right;
91568
+ word-break: break-all;
91569
+ `,BodyPad=styled$2.div`
91570
+ display: flex;
91571
+ flex-direction: column;
91572
+ gap: ${Space.sp4};
91573
+ padding: ${Space.sp4};
91574
+ `,FieldCard=styled$2.div`
91575
+ display: flex;
91576
+ flex-direction: column;
91577
+ width: 100%;
91578
+ box-sizing: border-box;
91579
+ overflow: hidden;
91580
+ background: ${e=>e.theme.colors.grey5};
91581
+ border: 1px solid ${e=>e.theme.colors.grey2};
91582
+ border-radius: ${Space.sp2};
91583
+ `,FieldRowRoot=styled$2.div`
91584
+ display: flex;
91585
+ align-items: center;
91586
+ gap: ${Space.sp3};
91587
+ min-height: ${sp[8]}px;
91588
+ padding: ${Space.sp1} ${Space.sp3} ${Space.sp1} ${Space.sp4};
91589
+ box-sizing: border-box;
91590
+ border-top: 1px solid ${e=>e.theme.colors.grey2};
91591
+ &:first-of-type {
91592
+ border-top: none;
91593
+ }
91594
+ &:hover {
91595
+ background: ${e=>e.theme.colors.background};
91596
+ }
91597
+ `,FieldLabel$1=styled$2(StandardMedium)`
91598
+ flex: 0 1 268px;
91599
+ min-width: 0;
91600
+ color: ${e=>e.theme.colors.hero};
91601
+ white-space: nowrap;
91602
+ overflow: hidden;
91603
+ text-overflow: ellipsis;
91604
+ `,FieldValue=styled$2.div`
91605
+ flex: 1;
91606
+ min-width: 0;
91607
+ display: flex;
91608
+ align-items: center;
91609
+ justify-content: flex-end;
91610
+ ${textStyles.standardMedium.css}
91611
+ color: ${e=>e.theme.colors.champion};
91612
+ text-align: right;
91613
+ `,OpenBillIconButton=styled$2.button`
91614
+ display: flex;
91615
+ align-items: center;
91616
+ justify-content: center;
91617
+ width: ${Space.sp4};
91618
+ height: ${Space.sp4};
91619
+ padding: ${Space.sp1};
91620
+ border: none;
91621
+ border-radius: ${Space.sp1};
91622
+ background: none;
91623
+ cursor: pointer;
91624
+ color: ${e=>e.theme.colors.champion};
91625
+ &:hover:not(:disabled) {
91626
+ background: ${e=>e.theme.colors.grey3};
91627
+ color: ${e=>e.theme.colors.primary};
91628
+ }
91629
+ &:disabled {
91630
+ cursor: default;
91631
+ opacity: 0.4;
91632
+ }
91633
+ `,OpenBillIcon=styled$2(SvgOpenLink)`
91634
+ width: ${Space.sp3};
91635
+ height: ${Space.sp3};
91636
+ flex-shrink: 0;
91637
+ color: inherit;
91638
+ `,VendorName=styled$2(H7SemiBold)`
91639
+ color: ${e=>e.theme.colors.champion};
91640
+ min-width: 0;
91641
+ `,FitContentCapsule=styled$2.div`
91642
+ display: inline-flex;
91643
+ width: fit-content;
91644
+ max-width: 100%;
91645
+ flex: 0 0 auto;
91646
+ align-self: center;
91647
+ `,SectionTitle$9=styled$2(LargeSemiBold)`
91648
+ color: ${e=>e.theme.colors.champion};
91649
+ `,WhyPanel=styled$2.div`
91650
+ display: flex;
91651
+ flex-direction: column;
91652
+ gap: ${Space.sp2};
91653
+ padding: ${Space.sp3};
91654
+ border-radius: ${Space.sp2};
91655
+ background: color-mix(
91656
+ in srgb,
91657
+ ${Colors.brandColorOpalLight} 34%,
91658
+ ${e=>e.theme.colors.grey5}
91659
+ );
91660
+ border: 1px solid ${Colors.brandColorOpalLight};
91661
+ `,WhyHead=styled$2.div`
91662
+ display: flex;
91663
+ align-items: center;
91664
+ gap: ${Space.sp2};
91665
+ `,WhyMethod=styled$2(ExtraSmallMedium)`
91666
+ color: ${Colors.brandColorOpalDark};
91667
+ `,WhySource=styled$2(ExtraSmallMedium)`
91668
+ color: ${e=>e.theme.colors.hero};
91669
+ margin-left: auto;
91670
+ `,WhyCopy=styled$2(StandardMedium)`
91671
+ color: ${e=>e.theme.colors.champion};
91672
+ line-height: 1.55;
91673
+ `,JeCard$1=styled$2.div`
91674
+ display: flex;
91675
+ flex-direction: column;
91676
+ overflow: hidden;
91677
+ background: ${e=>e.theme.colors.grey5};
91678
+ border: 1px solid ${e=>e.theme.colors.grey2};
91679
+ border-radius: ${Space.sp2};
91680
+ ${e=>!0===e.$hasFailure?`\n border-left: 2px solid ${e.theme.colors.important};\n `:""}
91681
+ `,JeFailureReason=styled$2(ExtraSmallMedium)`
91682
+ color: ${e=>e.theme.colors.important};
91683
+ padding: ${Space.sp2} ${Space.sp3} ${Space.sp3};
91684
+ `,JeTable$1=styled$2.div`
91685
+ display: grid;
91686
+ grid-template-columns: 140px minmax(0, 1fr) 100px 100px;
91687
+ `,JeHeaderCell$1=styled$2.span`
91688
+ ${textStyles.extraSmallSemiBold.css}
91689
+ color: ${e=>e.theme.colors.hero};
91690
+ background: ${e=>e.theme.colors.grey4};
91691
+ height: ${Space.sp5};
91692
+ display: flex;
91693
+ align-items: center;
91694
+ padding: ${Space.sp0} ${Space.sp3};
91695
+ text-align: ${e=>e.$align??"left"};
91696
+ justify-content: ${e=>"right"===e.$align?"flex-end":"flex-start"};
91697
+ border-bottom: 1px solid ${e=>e.theme.colors.grey2};
91698
+ `,JeCell$1=styled$2.span`
91699
+ ${textStyles.standardMedium.css}
91700
+ color: ${e=>!0===e.$isFailureAmount?e.theme.colors.important:!0===e.$muted?e.theme.colors.hero:e.theme.colors.champion};
91701
+ text-align: ${e=>e.$align??"left"};
91702
+ min-width: 0;
91703
+ overflow: hidden;
91704
+ text-overflow: ellipsis;
91705
+ white-space: nowrap;
91706
+ padding: ${Space.sp3};
91707
+ font-variant-numeric: tabular-nums;
91708
+ &:nth-child(n + 9) {
91709
+ border-top: 1px solid ${e=>e.theme.colors.grey2};
91710
+ }
91367
91711
  `;function ActualMatchingKpiStripSkeleton(){/* @__PURE__ */
91368
91712
  return jsxRuntimeExports.jsx(KpiStrip$1,{children:Array.from({length:4},(e,t)=>/* @__PURE__ */jsxRuntimeExports.jsxs(KpiTile$2,{children:[
91369
91713
  /* @__PURE__ */jsxRuntimeExports.jsx(ContentLoaderSkeleton$1,{width:90,height:16}),
@@ -91405,39 +91749,39 @@ return jsxRuntimeExports.jsx(ListFill,{children:/* @__PURE__ */jsxRuntimeExports
91405
91749
  background: ${e=>e.theme.colors.grey5};
91406
91750
  border: 1px solid ${e=>e.theme.colors.grey2};
91407
91751
  border-radius: ${Space.sp2};
91408
- `,{expenseAutomation:{jeSchedules:{actualMatching:actualMatchingStrings$5}}}=appLocale.getLocalizedStrings();function ActualMatchingStatusFilterBar({pendingReviewCount:e,autoReversedCount:t,selectedFilter:n,onFilterChange:o}){const i=useMemo(()=>[{id:"all",label:actualMatchingStrings$5.statusFilter.all},{id:"pending_review",label:actualMatchingStrings$5.statusFilter.pendingReview,inlineCount:e},{id:"auto_reversed",label:actualMatchingStrings$5.statusFilter.autoReversed,inlineCount:t}],[t,e]);/* @__PURE__ */
91409
- return jsxRuntimeExports.jsx(ExpenseAutomationSubTabSwitcher,{activeSubTab:n,allTabs:i,onSubTabChange:o})}const{dateFormat:{visual:{MMMDCommaYYYYformat:MMMDCommaYYYYformat$2}}}=appLocale.getLocalizedStrings(),UNMATCHED_LIST_AMOUNT_FORMAT="0,0.[00]";function getVisualDateFormat(){return MMMDCommaYYYYformat$2}function formatUnmatchedListZeniDate(e){return e.format(getVisualDateFormat())}function formatUnmatchedListTransactionDate(e){if(null==e||""===String(e).trim())return"";const t=String(e).trim(),n=getVisualDateFormat(),o=zeniDate(t);return null!=o&&"function"==typeof o.isValid&&o.isValid()?o.format(n):t}function currencySymbolForListAmount(e){if(null==e||""===e)return"";if(!/^[A-Z]{3}$/.test(e))return e;try{const t=new Intl.NumberFormat("en",{style:"currency",currency:e,currencyDisplay:"narrowSymbol"}).formatToParts(0);return t.find(e=>"currency"===e.type)?.value??e}catch{return e}}function formatUnmatchedListAmount(e,t){return amountValueToString(UNMATCHED_LIST_AMOUNT_FORMAT,e,currencySymbolForListAmount(t))}const{dateFormat:dateFormat$n,common:{strings:{hyphen:hyphen$h}}}=appLocale.getLocalizedStrings();function formatServiceMonthLabel(e){return""===e?hyphen$h:zeniDate(`${e}-01`).format(dateFormat$n.visual.MMMYYYYFormat)}function formatAccrualJeDate(e,t){const n=formatServiceMonthLabel(e);return n===hyphen$h?t:`${n}, ${t}`}function formatJeShortDate(e){if(""===e)return hyphen$h;const t=zeniDate(e);return null!=t&&"function"==typeof t.isValid&&t.isValid()?t.format(dateFormat$n.visual.MMMDFormat):e}function formatReversalJeDate(e){return null==e?hyphen$h:"function"!=typeof e.isValid||e.isValid()?e.format(dateFormat$n.visual.MMMDFormat):hyphen$h}function sumAccruedAmount(e){return e.reduce((e,t)=>e+(t.estimatedAmount?.amount??0),0)}function variancePercent(e,t){return 0===t?null:(e-t)/t*100}function uniqueServiceMonthLabel(e){const t=Array.from(new Set(e.map(e=>formatServiceMonthLabel(e.serviceMonth)).filter(e=>e!==hyphen$h)));return 1!==t.length?null:t[0]}function transactionMatchLabel(e,t){const n=uniqueServiceMonthLabel(t);return null==n?e.vendorName:`${e.vendorName} — ${n}`}function creditAccountName(e,t){return null!=e.jeCreditAccountName&&""!==e.jeCreditAccountName?e.jeCreditAccountName:t}function debitAccountName(e,t){return null!=e.jeDebitAccountName&&""!==e.jeDebitAccountName?e.jeDebitAccountName:t}const{expenseAutomation:{jeSchedules:{actualMatching:actualMatchingStrings$4}},common:{strings:{hyphen:hyphen$g},currency:currency$8}}=appLocale.getLocalizedStrings(),previewStrings$5=actualMatchingStrings$4.matchModal,TEST_ID_PREFIX$2="actual-matching-match-new",AMOUNT_FORMAT$1="0,0.[00]";function formatAccrualAmount$1(e){return amountToString(AMOUNT_FORMAT$1,e.estimatedAmount)??formatUnmatchedListAmount(e.estimatedAmount.amount,e.estimatedAmount.currencySymbol??currency$8.currencySymbol)}function MatchNewPreview({selectedAccruals:e,selectedTransactions:t}){const n=t[0]??null;if(null==n||0===e.length)/* @__PURE__ */
91410
- return jsxRuntimeExports.jsx(EmptyPreview,{"data-testid":generateDataTestId(TEST_ID_PREFIX$2,"preview-empty"),children:/* @__PURE__ */jsxRuntimeExports.jsx(SmallMedium,{children:previewStrings$5.previewEmpty})});const o=sumAccruedAmount(e),i=t.reduce((e,t)=>e+t.amount,0),r=variancePercent(i,o),a=null!=n.accountName&&""!==n.accountName?n.accountName:debitAccountName(e[0],hyphen$g),s=n.currencySymbol||currency$8.currencySymbol,l=formatUnmatchedListAmount(o,s),c=formatUnmatchedListAmount(i,s);/* @__PURE__ */
91411
- return jsxRuntimeExports.jsxs(PreviewRoot,{"data-testid":generateDataTestId(TEST_ID_PREFIX$2,"preview"),children:[
91752
+ `,{expenseAutomation:{jeSchedules:{actualMatching:actualMatchingStrings$3}}}=appLocale.getLocalizedStrings();function ActualMatchingStatusFilterBar({pendingReviewCount:e,autoReversedCount:t,selectedFilter:n,onFilterChange:o}){const i=useMemo(()=>[{id:"all",label:actualMatchingStrings$3.statusFilter.all},{id:"pending_review",label:actualMatchingStrings$3.statusFilter.pendingReview,inlineCount:e},{id:"auto_reversed",label:actualMatchingStrings$3.statusFilter.autoReversed,inlineCount:t}],[t,e]);/* @__PURE__ */
91753
+ return jsxRuntimeExports.jsx(ExpenseAutomationSubTabSwitcher,{activeSubTab:n,allTabs:i,onSubTabChange:o})}const{dateFormat:{visual:{MMMDCommaYYYYformat:MMMDCommaYYYYformat$2}}}=appLocale.getLocalizedStrings(),UNMATCHED_LIST_AMOUNT_FORMAT="0,0.[00]";function getVisualDateFormat(){return MMMDCommaYYYYformat$2}function formatUnmatchedListZeniDate(e){return e.format(getVisualDateFormat())}function formatUnmatchedListTransactionDate(e){if(null==e||""===String(e).trim())return"";const t=String(e).trim(),n=getVisualDateFormat(),o=zeniDate(t);return null!=o&&"function"==typeof o.isValid&&o.isValid()?o.format(n):t}function currencySymbolForListAmount(e){if(null==e||""===e)return"";if(!/^[A-Z]{3}$/.test(e))return e;try{const t=new Intl.NumberFormat("en",{style:"currency",currency:e,currencyDisplay:"narrowSymbol"}).formatToParts(0);return t.find(e=>"currency"===e.type)?.value??e}catch{return e}}function formatUnmatchedListAmount(e,t){return amountValueToString(UNMATCHED_LIST_AMOUNT_FORMAT,e,currencySymbolForListAmount(t))}const{expenseAutomation:{jeSchedules:{actualMatching:actualMatchingStrings$2}},common:{strings:{hyphen:hyphen$e},currency:currency$8}}=appLocale.getLocalizedStrings(),previewStrings$4=actualMatchingStrings$2.matchModal,TEST_ID_PREFIX$1="actual-matching-match-new",AMOUNT_FORMAT="0,0.[00]";function formatAccrualAmount$1(e){return amountToString(AMOUNT_FORMAT,e.estimatedAmount)??formatUnmatchedListAmount(e.estimatedAmount.amount,e.estimatedAmount.currencySymbol??currency$8.currencySymbol)}function MatchNewPreview({selectedAccruals:e,selectedTransactions:t}){const n=t[0]??null;if(null==n||0===e.length)/* @__PURE__ */
91754
+ return jsxRuntimeExports.jsx(EmptyPreview,{"data-testid":generateDataTestId(TEST_ID_PREFIX$1,"preview-empty"),children:/* @__PURE__ */jsxRuntimeExports.jsx(SmallMedium,{children:previewStrings$4.previewEmpty})});const o=sumAccruedAmount(e),i=t.reduce((e,t)=>e+t.amount,0),r=variancePercent(i,o),a=null!=n.accountName&&""!==n.accountName?n.accountName:debitAccountName(e[0],hyphen$e),s=n.currencySymbol||currency$8.currencySymbol,l=formatUnmatchedListAmount(o,s),c=formatUnmatchedListAmount(i,s);/* @__PURE__ */
91755
+ return jsxRuntimeExports.jsxs(PreviewRoot,{"data-testid":generateDataTestId(TEST_ID_PREFIX$1,"preview"),children:[
91412
91756
  /* @__PURE__ */jsxRuntimeExports.jsxs(PreviewSection,{children:[
91413
- /* @__PURE__ */jsxRuntimeExports.jsx(SectionTitle$9,{children:previewStrings$5.accrualJeTitle}),e.map(e=>/* @__PURE__ */jsxRuntimeExports.jsx(JeBlock$1,{creditAccount:creditAccountName(e,previewStrings$5.accruedExpensesFallback),creditAmount:formatAccrualAmount$1(e),dateLabel:formatAccrualJeDate(e.serviceMonth,previewStrings$5.lastDayOfMonth),debitAccount:debitAccountName(e,hyphen$g),debitAmount:formatAccrualAmount$1(e),subtitle:`${e.vendorName} · ${formatServiceMonthLabel(e.serviceMonth)}`,testIdSuffix:`accrual-je-${e.accrualId}`},`accrual-je-${e.accrualId}`))]}),
91757
+ /* @__PURE__ */jsxRuntimeExports.jsx(SectionTitle$8,{children:previewStrings$4.accrualJeTitle}),e.map(e=>/* @__PURE__ */jsxRuntimeExports.jsx(JeBlock,{creditAccount:creditAccountName(e,previewStrings$4.accruedExpensesFallback),creditAmount:formatAccrualAmount$1(e),dateLabel:formatAccrualJeDate(e.serviceMonth,previewStrings$4.lastDayOfMonth),debitAccount:debitAccountName(e,hyphen$e),debitAmount:formatAccrualAmount$1(e),subtitle:`${e.vendorName} · ${formatServiceMonthLabel(e.serviceMonth)}`,testIdSuffix:`accrual-je-${e.accrualId}`},`accrual-je-${e.accrualId}`))]}),
91414
91758
  /* @__PURE__ */jsxRuntimeExports.jsxs(PreviewSection,{children:[
91415
- /* @__PURE__ */jsxRuntimeExports.jsx(SectionTitle$9,{children:previewStrings$5.reversalJeTitle}),
91416
- /* @__PURE__ */jsxRuntimeExports.jsx(SectionNote,{children:previewStrings$5.reversalJeNote}),e.map(e=>/* @__PURE__ */jsxRuntimeExports.jsx(JeBlock$1,{creditAccount:debitAccountName(e,hyphen$g),creditAmount:formatAccrualAmount$1(e),dateLabel:hyphen$g,debitAccount:creditAccountName(e,previewStrings$5.accruedExpensesFallback),debitAmount:formatAccrualAmount$1(e),subtitle:`${previewStrings$5.reversesLabel} · ${formatServiceMonthLabel(e.serviceMonth)}`,testIdSuffix:`reversal-je-${e.accrualId}`},`reversal-je-${e.accrualId}`))]}),
91759
+ /* @__PURE__ */jsxRuntimeExports.jsx(SectionTitle$8,{children:previewStrings$4.reversalJeTitle}),
91760
+ /* @__PURE__ */jsxRuntimeExports.jsx(SectionNote,{children:previewStrings$4.reversalJeNote}),e.map(e=>/* @__PURE__ */jsxRuntimeExports.jsx(JeBlock,{creditAccount:debitAccountName(e,hyphen$e),creditAmount:formatAccrualAmount$1(e),dateLabel:hyphen$e,debitAccount:creditAccountName(e,previewStrings$4.accruedExpensesFallback),debitAmount:formatAccrualAmount$1(e),subtitle:`${previewStrings$4.reversesLabel} · ${formatServiceMonthLabel(e.serviceMonth)}`,testIdSuffix:`reversal-je-${e.accrualId}`},`reversal-je-${e.accrualId}`))]}),
91417
91761
  /* @__PURE__ */jsxRuntimeExports.jsxs(PreviewSection,{children:[
91418
- /* @__PURE__ */jsxRuntimeExports.jsx(SectionTitle$9,{children:previewStrings$5.transactionMatchedTitle}),
91762
+ /* @__PURE__ */jsxRuntimeExports.jsx(SectionTitle$8,{children:previewStrings$4.transactionMatchedTitle}),
91419
91763
  /* @__PURE__ */jsxRuntimeExports.jsxs(TxnMatchRow,{children:[
91420
91764
  /* @__PURE__ */jsxRuntimeExports.jsx(TxnMatchDate,{children:formatUnmatchedListTransactionDate(n.transactionDate)}),
91421
91765
  /* @__PURE__ */jsxRuntimeExports.jsx(TxnMatchVendor,{children:transactionMatchLabel(n,e)}),
91422
91766
  /* @__PURE__ */jsxRuntimeExports.jsx(TxnMatchAmount,{children:c})]}),
91423
91767
  /* @__PURE__ */jsxRuntimeExports.jsxs(VarianceRow,{children:[
91424
- /* @__PURE__ */jsxRuntimeExports.jsx(VarianceCopy,{children:previewStrings$5.vsAccrued.replace("{amount}",l).replace("{account}",a)}),
91425
- /* @__PURE__ */jsxRuntimeExports.jsx(TxnMatchAmount,{children:c}),null!=r?/* @__PURE__ */jsxRuntimeExports.jsx(StyledCapsule,{dataTestId:generateDataTestId(TEST_ID_PREFIX$2,"variance"),label:formatVariancePercent(r),type:getVarianceCapsuleType(r)}):null]})]})]})}function JeBlock$1({creditAccount:e,creditAmount:t,dateLabel:n,debitAccount:o,debitAmount:i,subtitle:r,testIdSuffix:a}){/* @__PURE__ */
91426
- return jsxRuntimeExports.jsxs(JeCard$1,{"data-testid":generateDataTestId(TEST_ID_PREFIX$2,a),children:[
91768
+ /* @__PURE__ */jsxRuntimeExports.jsx(VarianceCopy,{children:previewStrings$4.vsAccrued.replace("{amount}",l).replace("{account}",a)}),
91769
+ /* @__PURE__ */jsxRuntimeExports.jsx(TxnMatchAmount,{children:c}),null!=r?/* @__PURE__ */jsxRuntimeExports.jsx(StyledCapsule,{dataTestId:generateDataTestId(TEST_ID_PREFIX$1,"variance"),label:formatVariancePercent(r),type:getVarianceCapsuleType(r)}):null]})]})]})}function JeBlock({creditAccount:e,creditAmount:t,dateLabel:n,debitAccount:o,debitAmount:i,subtitle:r,testIdSuffix:a}){/* @__PURE__ */
91770
+ return jsxRuntimeExports.jsxs(JeCard,{"data-testid":generateDataTestId(TEST_ID_PREFIX$1,a),children:[
91427
91771
  /* @__PURE__ */jsxRuntimeExports.jsx(JeSubtitle,{children:r}),
91428
- /* @__PURE__ */jsxRuntimeExports.jsxs(JeTable$1,{children:[
91429
- /* @__PURE__ */jsxRuntimeExports.jsx(JeHeaderCell$1,{children:previewStrings$5.columnDate}),
91430
- /* @__PURE__ */jsxRuntimeExports.jsx(JeHeaderCell$1,{children:previewStrings$5.columnAccount}),
91431
- /* @__PURE__ */jsxRuntimeExports.jsx(JeHeaderCell$1,{align:"right",children:previewStrings$5.columnDebit}),
91432
- /* @__PURE__ */jsxRuntimeExports.jsx(JeHeaderCell$1,{align:"right",children:previewStrings$5.columnCredit}),
91433
- /* @__PURE__ */jsxRuntimeExports.jsx(JeCell$1,{children:n}),
91434
- /* @__PURE__ */jsxRuntimeExports.jsx(JeCell$1,{children:o}),
91435
- /* @__PURE__ */jsxRuntimeExports.jsx(JeCell$1,{align:"right",children:i}),
91436
- /* @__PURE__ */jsxRuntimeExports.jsx(JeCell$1,{align:"right",children:hyphen$g}),
91437
- /* @__PURE__ */jsxRuntimeExports.jsx(JeCell$1,{children:n}),
91438
- /* @__PURE__ */jsxRuntimeExports.jsx(JeCell$1,{children:e}),
91439
- /* @__PURE__ */jsxRuntimeExports.jsx(JeCell$1,{align:"right",children:hyphen$g}),
91440
- /* @__PURE__ */jsxRuntimeExports.jsx(JeCell$1,{align:"right",children:t})]})]})}const PreviewRoot=styled$2.div`
91772
+ /* @__PURE__ */jsxRuntimeExports.jsxs(JeTable,{children:[
91773
+ /* @__PURE__ */jsxRuntimeExports.jsx(JeHeaderCell,{children:previewStrings$4.columnDate}),
91774
+ /* @__PURE__ */jsxRuntimeExports.jsx(JeHeaderCell,{children:previewStrings$4.columnAccount}),
91775
+ /* @__PURE__ */jsxRuntimeExports.jsx(JeHeaderCell,{align:"right",children:previewStrings$4.columnDebit}),
91776
+ /* @__PURE__ */jsxRuntimeExports.jsx(JeHeaderCell,{align:"right",children:previewStrings$4.columnCredit}),
91777
+ /* @__PURE__ */jsxRuntimeExports.jsx(JeCell,{children:n}),
91778
+ /* @__PURE__ */jsxRuntimeExports.jsx(JeCell,{children:o}),
91779
+ /* @__PURE__ */jsxRuntimeExports.jsx(JeCell,{align:"right",children:i}),
91780
+ /* @__PURE__ */jsxRuntimeExports.jsx(JeCell,{align:"right",children:hyphen$e}),
91781
+ /* @__PURE__ */jsxRuntimeExports.jsx(JeCell,{children:n}),
91782
+ /* @__PURE__ */jsxRuntimeExports.jsx(JeCell,{children:e}),
91783
+ /* @__PURE__ */jsxRuntimeExports.jsx(JeCell,{align:"right",children:hyphen$e}),
91784
+ /* @__PURE__ */jsxRuntimeExports.jsx(JeCell,{align:"right",children:t})]})]})}const PreviewRoot=styled$2.div`
91441
91785
  display: flex;
91442
91786
  flex-direction: column;
91443
91787
  gap: ${Space.sp3};
@@ -91466,29 +91810,29 @@ return jsxRuntimeExports.jsxs(JeCard$1,{"data-testid":generateDataTestId(TEST_ID
91466
91810
  display: flex;
91467
91811
  flex-direction: column;
91468
91812
  gap: ${Space.sp2};
91469
- `,SectionTitle$9=styled$2(ExtraSmallSemiBold)`
91813
+ `,SectionTitle$8=styled$2(ExtraSmallSemiBold)`
91470
91814
  color: ${e=>e.theme.colors.hero};
91471
91815
  text-transform: uppercase;
91472
91816
  `,SectionNote=styled$2(ExtraSmallMedium)`
91473
91817
  color: ${e=>e.theme.colors.hero};
91474
- `,JeCard$1=styled$2.div`
91818
+ `,JeCard=styled$2.div`
91475
91819
  display: flex;
91476
91820
  flex-direction: column;
91477
91821
  gap: ${Space.sp2};
91478
91822
  `,JeSubtitle=styled$2(SmallSemiBold)`
91479
91823
  color: ${e=>e.theme.colors.champion};
91480
- `,JeTable$1=styled$2.div`
91824
+ `,JeTable=styled$2.div`
91481
91825
  display: grid;
91482
91826
  grid-template-columns:
91483
91827
  minmax(56px, auto) minmax(0, 1fr) minmax(72px, auto)
91484
91828
  minmax(72px, auto);
91485
91829
  column-gap: ${Space.sp2};
91486
91830
  row-gap: ${Space.sp1};
91487
- `,JeHeaderCell$1=styled$2(ExtraSmallSemiBold)`
91831
+ `,JeHeaderCell=styled$2(ExtraSmallSemiBold)`
91488
91832
  color: ${e=>e.theme.colors.hero};
91489
91833
  text-transform: uppercase;
91490
91834
  text-align: ${e=>"right"===e.align?"right":"left"};
91491
- `,JeCell$1=styled$2(ExtraSmallMedium)`
91835
+ `,JeCell=styled$2(ExtraSmallMedium)`
91492
91836
  color: ${e=>e.theme.colors.champion};
91493
91837
  text-align: ${e=>"right"===e.align?"right":"left"};
91494
91838
  min-width: 0;
@@ -91522,31 +91866,31 @@ return jsxRuntimeExports.jsxs(JeCard$1,{"data-testid":generateDataTestId(TEST_ID
91522
91866
  flex: 1;
91523
91867
  min-width: 0;
91524
91868
  color: ${e=>e.theme.colors.hero};
91525
- `,{expenseAutomation:{jeSchedules:{actualMatching:actualMatchingStrings$3}},common:{cancel:cancel$1,close:close,strings:{hyphen:hyphen$f},currency:currency$7}}=appLocale.getLocalizedStrings(),TEST_ID_PREFIX$1="actual-matching-match-new",SET_VALUE_OPTS={shouldDirty:!0,shouldTouch:!0},MATCH_NEW_DRAWER_WIDTH=new ResponsiveSized(100,100,55);function MatchNewModal({initialFormValues:e,matchModal:t,onClearMatchNewModal:n,onCloseMatchNewModal:o,onMatchAndReverse:i,onSearchMatchAccruals:r,onSearchMatchTransactions:a}){const s=useTheme(),l=useWindowSizeContext(),c=useForm({mode:"all",defaultValues:{selectedTransactionLines:[],selectedAccrualIds:[],...e}}),d=c.watch("selectedTransactionLines")??[],p=c.watch("selectedAccrualIds")??[],u=useRef(null),m=useRef(null),h=t.openedFromMatchId??"",g=t.transactionSearch.results,x=t.accrualSearch.results,f="In-Progress"===t.confirmStatus.fetchState,y=useMemo(()=>new Set(g.map(e=>getTransactionLineKey(e.transactionId,e.lineId))),[g]),S=useMemo(()=>new Set(x.map(e=>e.accrualId)),[x]);useEffect(()=>{const e=c.getValues("selectedTransactionLines")??[],n=c.getValues("selectedAccrualIds")??[],o=pruneSelectionToVisibleResults(e,y,t.transactionSearch.fetchState.fetchState);o.length!==e.length&&c.setValue("selectedTransactionLines",o,SET_VALUE_OPTS);const i=pruneSelectionToVisibleResults(n,S,t.accrualSearch.fetchState.fetchState);i.length!==n.length&&c.setValue("selectedAccrualIds",i,SET_VALUE_OPTS)},[c,t.accrualSearch.fetchState.fetchState,t.transactionSearch.fetchState.fetchState,y,S]);const C=d.filter(e=>y.has(e)).map(e=>g.find(t=>getTransactionLineKey(t.transactionId,t.lineId)===e)??null).filter(e=>null!=e),$=C[0]??null;useEffect(()=>{if(null==$)return;const e=c.getValues("selectedAccrualIds")??[],t=e.filter(e=>{const t=x.find(t=>t.accrualId===e);return null!=t&&isSameMatchVendor($,t)});t.length!==e.length&&c.setValue("selectedAccrualIds",t,SET_VALUE_OPTS)},[c,x,$]),useEffect(()=>{t.isOpen||(u.current=null,m.current=null,c.reset({selectedTransactionLines:[],selectedAccrualIds:[]}))},[c,t.isOpen]),useEffect(()=>{t.isOpen&&null!=t.openedFromMatchId&&(u.current=null,m.current=null,c.setValue("selectedTransactionLines",[],SET_VALUE_OPTS),c.setValue("selectedAccrualIds",[],SET_VALUE_OPTS))},[c,t.isOpen,t.openedFromMatchId]),useEffect(()=>{if(!t.isOpen||null==t.prefill)return;if(u.current===h)return;const e=t.prefill.selectedAccrualIds.filter(e=>S.has(e));0!==e.length&&(c.setValue("selectedAccrualIds",e,SET_VALUE_OPTS),u.current=h)},[c,t.isOpen,t.prefill,h,S]),useEffect(()=>{if(!t.isOpen||null==t.prefill)return;if(m.current===h)return;const e=pickPrefillTransactionLines(g,t.prefill).filter(e=>y.has(e));0!==e.length&&(c.setValue("selectedTransactionLines",e,SET_VALUE_OPTS),m.current=h)},[c,g,t.isOpen,t.prefill,h,y]);const b=p.filter(e=>{if(!S.has(e))return!1;if(null==$)return!0;const t=x.find(t=>t.accrualId===e);return null!=t&&isSameMatchVendor($,t)}),v=b.map(e=>x.find(t=>t.accrualId===e)).filter(e=>null!=e),E=null!=$&&v.length>=1&&!f,w=useCallback(()=>{c.reset({selectedTransactionLines:[],selectedAccrualIds:[]}),o(),n()},[c,n,o]),R=()=>{if(f)return;const e=c.getValues(),t=(e.selectedTransactionLines??[]).map(e=>g.find(t=>getTransactionLineKey(t.transactionId,t.lineId)===e)).filter(e=>null!=e),n=t[0],o=(e.selectedAccrualIds??[]).filter(e=>{if(!S.has(e))return!1;if(null==n)return!1;const t=x.find(t=>t.accrualId===e);return null!=t&&isSameMatchVendor(n,t)});null!=n&&0!==t.length&&0!==o.length&&i({transactionId:n.transactionId,transactionIntegrationId:n.transactionIntegrationId,transactionType:n.transactionType,lineIds:t.map(e=>e.lineId),transactionSyncToken:n.syncToken,accrualIds:o})},A=C.length,j=0===A?null:C[0]?getTransactionLineKey(C[0].transactionId,C[0].lineId):null,T=shouldPromptSelectMatchLine({isTxnSearchComplete:"Completed"===t.transactionSearch.fetchState.fetchState,lineCount:g.length,openedFromMatchId:t.openedFromMatchId,selectedLineKey:0===A?null:j});/* @__PURE__ */
91869
+ `,{expenseAutomation:{jeSchedules:{actualMatching:actualMatchingStrings$1}},common:{cancel:cancel$1,close:close,strings:{hyphen:hyphen$d},currency:currency$7}}=appLocale.getLocalizedStrings(),TEST_ID_PREFIX="actual-matching-match-new",SET_VALUE_OPTS={shouldDirty:!0,shouldTouch:!0},MATCH_NEW_DRAWER_WIDTH=new ResponsiveSized(100,100,55);function MatchNewModal({initialFormValues:e,matchModal:t,onClearMatchNewModal:n,onCloseMatchNewModal:o,onMatchAndReverse:i,onSearchMatchAccruals:r,onSearchMatchTransactions:a}){const s=useTheme(),l=useWindowSizeContext(),c=useForm({mode:"all",defaultValues:{selectedTransactionLines:[],selectedAccrualIds:[],...e}}),d=c.watch("selectedTransactionLines")??[],p=c.watch("selectedAccrualIds")??[],u=useRef(null),m=useRef(null),h=t.openedFromMatchId??"",g=t.transactionSearch.results,x=t.accrualSearch.results,f="In-Progress"===t.confirmStatus.fetchState,y=useMemo(()=>new Set(g.map(e=>getTransactionLineKey(e.transactionId,e.lineId))),[g]),S=useMemo(()=>new Set(x.map(e=>e.accrualId)),[x]);useEffect(()=>{const e=c.getValues("selectedTransactionLines")??[],n=c.getValues("selectedAccrualIds")??[],o=pruneSelectionToVisibleResults(e,y,t.transactionSearch.fetchState.fetchState);o.length!==e.length&&c.setValue("selectedTransactionLines",o,SET_VALUE_OPTS);const i=pruneSelectionToVisibleResults(n,S,t.accrualSearch.fetchState.fetchState);i.length!==n.length&&c.setValue("selectedAccrualIds",i,SET_VALUE_OPTS)},[c,t.accrualSearch.fetchState.fetchState,t.transactionSearch.fetchState.fetchState,y,S]);const C=d.filter(e=>y.has(e)).map(e=>g.find(t=>getTransactionLineKey(t.transactionId,t.lineId)===e)??null).filter(e=>null!=e),$=C[0]??null;useEffect(()=>{if(null==$)return;const e=c.getValues("selectedAccrualIds")??[],t=e.filter(e=>{const t=x.find(t=>t.accrualId===e);return null!=t&&isSameMatchVendor($,t)});t.length!==e.length&&c.setValue("selectedAccrualIds",t,SET_VALUE_OPTS)},[c,x,$]),useEffect(()=>{t.isOpen||(u.current=null,m.current=null,c.reset({selectedTransactionLines:[],selectedAccrualIds:[]}))},[c,t.isOpen]),useEffect(()=>{t.isOpen&&null!=t.openedFromMatchId&&(u.current=null,m.current=null,c.setValue("selectedTransactionLines",[],SET_VALUE_OPTS),c.setValue("selectedAccrualIds",[],SET_VALUE_OPTS))},[c,t.isOpen,t.openedFromMatchId]),useEffect(()=>{if(!t.isOpen||null==t.prefill)return;if(u.current===h)return;const e=t.prefill.selectedAccrualIds.filter(e=>S.has(e));0!==e.length&&(c.setValue("selectedAccrualIds",e,SET_VALUE_OPTS),u.current=h)},[c,t.isOpen,t.prefill,h,S]),useEffect(()=>{if(!t.isOpen||null==t.prefill)return;if(m.current===h)return;const e=pickPrefillTransactionLines(g,t.prefill).filter(e=>y.has(e));0!==e.length&&(c.setValue("selectedTransactionLines",e,SET_VALUE_OPTS),m.current=h)},[c,g,t.isOpen,t.prefill,h,y]);const b=p.filter(e=>{if(!S.has(e))return!1;if(null==$)return!0;const t=x.find(t=>t.accrualId===e);return null!=t&&isSameMatchVendor($,t)}),v=b.map(e=>x.find(t=>t.accrualId===e)).filter(e=>null!=e),E=null!=$&&v.length>=1&&!f,w=useCallback(()=>{c.reset({selectedTransactionLines:[],selectedAccrualIds:[]}),o(),n()},[c,n,o]),R=()=>{if(f)return;const e=c.getValues(),t=(e.selectedTransactionLines??[]).map(e=>g.find(t=>getTransactionLineKey(t.transactionId,t.lineId)===e)).filter(e=>null!=e),n=t[0],o=(e.selectedAccrualIds??[]).filter(e=>{if(!S.has(e))return!1;if(null==n)return!1;const t=x.find(t=>t.accrualId===e);return null!=t&&isSameMatchVendor(n,t)});null!=n&&0!==t.length&&0!==o.length&&i({transactionId:n.transactionId,transactionIntegrationId:n.transactionIntegrationId,transactionType:n.transactionType,lineIds:t.map(e=>e.lineId),transactionSyncToken:n.syncToken,accrualIds:o})},A=C.length,j=0===A?null:C[0]?getTransactionLineKey(C[0].transactionId,C[0].lineId):null,T=shouldPromptSelectMatchLine({isTxnSearchComplete:"Completed"===t.transactionSearch.fetchState.fetchState,lineCount:g.length,openedFromMatchId:t.openedFromMatchId,selectedLineKey:0===A?null:j});/* @__PURE__ */
91526
91870
  return jsxRuntimeExports.jsx(Drawer,{anchor:"right",open:t.isOpen,PaperProps:{role:"dialog",style:{width:MATCH_NEW_DRAWER_WIDTH.valuePercentage(l),maxWidth:922,height:"100%",maxHeight:"100%",overflow:"hidden",display:"flex",flexDirection:"column",boxShadow:"none"}},slotProps:{backdrop:{style:{backgroundColor:s.colors.black,opacity:.8,cursor:"pointer"}}},onClose:w,children:/* @__PURE__ */jsxRuntimeExports.jsx(FormProvider,{...c,children:/* @__PURE__ */jsxRuntimeExports.jsxs(Panel,{id:MATCH_NEW_FORM,onSubmit:e=>{e.preventDefault(),R()},children:[
91527
91871
  /* @__PURE__ */jsxRuntimeExports.jsxs(Header$4,{children:[
91528
91872
  /* @__PURE__ */jsxRuntimeExports.jsxs(TitleBlock$1,{children:[
91529
- /* @__PURE__ */jsxRuntimeExports.jsx(PanelTitle,{children:actualMatchingStrings$3.matchModal.title}),
91530
- /* @__PURE__ */jsxRuntimeExports.jsx(PanelSubtitle,{children:actualMatchingStrings$3.matchModal.subtitle})]}),
91531
- /* @__PURE__ */jsxRuntimeExports.jsx(CloseIconButton$2,{"aria-label":close,"data-testid":generateDataTestId(TEST_ID_PREFIX$1,"close"),type:"button",onClick:w,children:/* @__PURE__ */jsxRuntimeExports.jsx(StyledCloseIcon$c,{})})]}),
91873
+ /* @__PURE__ */jsxRuntimeExports.jsx(PanelTitle,{children:actualMatchingStrings$1.matchModal.title}),
91874
+ /* @__PURE__ */jsxRuntimeExports.jsx(PanelSubtitle,{children:actualMatchingStrings$1.matchModal.subtitle})]}),
91875
+ /* @__PURE__ */jsxRuntimeExports.jsx(CloseIconButton$2,{"aria-label":close,"data-testid":generateDataTestId(TEST_ID_PREFIX,"close"),type:"button",onClick:w,children:/* @__PURE__ */jsxRuntimeExports.jsx(StyledCloseIcon$c,{})})]}),
91532
91876
  /* @__PURE__ */jsxRuntimeExports.jsxs(Panes,{children:[
91533
- /* @__PURE__ */jsxRuntimeExports.jsx(MatchPane,{emptyText:actualMatchingStrings$3.matchModal.emptyLeft,hint:T?actualMatchingStrings$3.matchModal.selectLineHint:void 0,isLoading:"In-Progress"===t.transactionSearch.fetchState.fetchState,searchPlaceholder:actualMatchingStrings$3.matchModal.leftSearchPlaceholder,searchValue:t.transactionSearch.query,selectedCount:A,testIdSuffix:"transactions",title:actualMatchingStrings$3.matchModal.leftTitle,onSearchChange:a,children:g.map(e=>{const t=getTransactionLineKey(e.transactionId,e.lineId);/* @__PURE__ */
91877
+ /* @__PURE__ */jsxRuntimeExports.jsx(MatchPane,{emptyText:actualMatchingStrings$1.matchModal.emptyLeft,hint:T?actualMatchingStrings$1.matchModal.selectLineHint:void 0,isLoading:"In-Progress"===t.transactionSearch.fetchState.fetchState,searchPlaceholder:actualMatchingStrings$1.matchModal.leftSearchPlaceholder,searchValue:t.transactionSearch.query,selectedCount:A,testIdSuffix:"transactions",title:actualMatchingStrings$1.matchModal.leftTitle,onSearchChange:a,children:g.map(e=>{const t=getTransactionLineKey(e.transactionId,e.lineId);/* @__PURE__ */
91534
91878
  return jsxRuntimeExports.jsx(TransactionMatchRow,{isDisabled:f,isSelected:d.includes(t),row:e,onSelect:()=>(e=>{if(f)return;const t=c.getValues("selectedTransactionLines")??[];c.setValue("selectedTransactionLines",nextSelectedTransactionLines(t,e,g),SET_VALUE_OPTS)})(t)},t)})}),
91535
- /* @__PURE__ */jsxRuntimeExports.jsx(MatchPane,{emptyText:actualMatchingStrings$3.matchModal.emptyRight,isLoading:"In-Progress"===t.accrualSearch.fetchState.fetchState,searchPlaceholder:actualMatchingStrings$3.matchModal.rightSearchPlaceholder,searchValue:t.accrualSearch.query,selectedCount:b.length,testIdSuffix:"accruals",title:actualMatchingStrings$3.matchModal.rightTitle,onSearchChange:r,children:x.map(e=>{const t=null!=$&&!isSameMatchVendor($,e);/* @__PURE__ */
91536
- return jsxRuntimeExports.jsx(AccrualMatchRow,{isDisabled:f||t,isSelected:p.includes(e.accrualId),row:e,vendorLockReason:t?actualMatchingStrings$3.matchModal.vendorLock:void 0,onToggle:()=>(e=>{if(f)return;if(null!=$){const t=x.find(t=>t.accrualId===e);if(null==t||!isSameMatchVendor($,t))return}const t=c.getValues("selectedAccrualIds")??[];t.includes(e)?c.setValue("selectedAccrualIds",t.filter(t=>t!==e),SET_VALUE_OPTS):t.length>=MATCH_ACCRUAL_SELECTION_CAP||c.setValue("selectedAccrualIds",[...t,e],SET_VALUE_OPTS)})(e.accrualId)},e.accrualId)})})]}),
91879
+ /* @__PURE__ */jsxRuntimeExports.jsx(MatchPane,{emptyText:actualMatchingStrings$1.matchModal.emptyRight,isLoading:"In-Progress"===t.accrualSearch.fetchState.fetchState,searchPlaceholder:actualMatchingStrings$1.matchModal.rightSearchPlaceholder,searchValue:t.accrualSearch.query,selectedCount:b.length,testIdSuffix:"accruals",title:actualMatchingStrings$1.matchModal.rightTitle,onSearchChange:r,children:x.map(e=>{const t=null!=$&&!isSameMatchVendor($,e);/* @__PURE__ */
91880
+ return jsxRuntimeExports.jsx(AccrualMatchRow,{isDisabled:f||t,isSelected:p.includes(e.accrualId),row:e,vendorLockReason:t?actualMatchingStrings$1.matchModal.vendorLock:void 0,onToggle:()=>(e=>{if(f)return;if(null!=$){const t=x.find(t=>t.accrualId===e);if(null==t||!isSameMatchVendor($,t))return}const t=c.getValues("selectedAccrualIds")??[];t.includes(e)?c.setValue("selectedAccrualIds",t.filter(t=>t!==e),SET_VALUE_OPTS):t.length>=MATCH_ACCRUAL_SELECTION_CAP||c.setValue("selectedAccrualIds",[...t,e],SET_VALUE_OPTS)})(e.accrualId)},e.accrualId)})})]}),
91537
91881
  /* @__PURE__ */jsxRuntimeExports.jsx(MatchNewPreview,{selectedAccruals:v,selectedTransactions:C}),
91538
91882
  /* @__PURE__ */jsxRuntimeExports.jsxs(DialogActions$1,{children:[
91539
- /* @__PURE__ */jsxRuntimeExports.jsx(Button$4,{dataTestId:generateDataTestId(TEST_ID_PREFIX$1,"cancel"),label:cancel$1,type:"button",variant:"outline",onClick:w}),
91540
- /* @__PURE__ */jsxRuntimeExports.jsx(Button$4,{dataTestId:generateDataTestId(TEST_ID_PREFIX$1,"confirm"),disabled:!E,label:actualMatchingStrings$3.matchModal.confirm,loading:f,type:"button",variant:"primary",onClick:()=>R()})]})]})})})}function MatchPane({children:e,emptyText:t,hint:n,isLoading:o,searchPlaceholder:i,searchValue:r,selectedCount:a,testIdSuffix:s,title:l,onSearchChange:c}){const[d,p]=useState(r);useEffect(()=>{p(r)},[r]);const u=Array.isArray(e)?e.length:0;/* @__PURE__ */
91883
+ /* @__PURE__ */jsxRuntimeExports.jsx(Button$4,{dataTestId:generateDataTestId(TEST_ID_PREFIX,"cancel"),label:cancel$1,type:"button",variant:"outline",onClick:w}),
91884
+ /* @__PURE__ */jsxRuntimeExports.jsx(Button$4,{dataTestId:generateDataTestId(TEST_ID_PREFIX,"confirm"),disabled:!E,label:actualMatchingStrings$1.matchModal.confirm,loading:f,type:"button",variant:"primary",onClick:()=>R()})]})]})})})}function MatchPane({children:e,emptyText:t,hint:n,isLoading:o,searchPlaceholder:i,searchValue:r,selectedCount:a,testIdSuffix:s,title:l,onSearchChange:c}){const[d,p]=useState(r);useEffect(()=>{p(r)},[r]);const u=Array.isArray(e)?e.length:0;/* @__PURE__ */
91541
91885
  return jsxRuntimeExports.jsxs(Pane,{children:[
91542
91886
  /* @__PURE__ */jsxRuntimeExports.jsxs(PaneHeader,{children:[
91543
91887
  /* @__PURE__ */jsxRuntimeExports.jsx(LargeSemiBold,{children:l}),
91544
- /* @__PURE__ */jsxRuntimeExports.jsx(PaneSelectedCount,{children:`${a} ${actualMatchingStrings$3.matchModal.selectedLabel}`})]}),null!=n?/* @__PURE__ */jsxRuntimeExports.jsx(PaneHint,{"data-testid":generateDataTestId(TEST_ID_PREFIX$1,`hint-${s}`),children:n}):null,
91888
+ /* @__PURE__ */jsxRuntimeExports.jsx(PaneSelectedCount,{children:`${a} ${actualMatchingStrings$1.matchModal.selectedLabel}`})]}),null!=n?/* @__PURE__ */jsxRuntimeExports.jsx(PaneHint,{"data-testid":generateDataTestId(TEST_ID_PREFIX,`hint-${s}`),children:n}):null,
91545
91889
  /* @__PURE__ */jsxRuntimeExports.jsxs(SearchRow,{children:[
91546
91890
  /* @__PURE__ */jsxRuntimeExports.jsx(StyledSearchIcon$2,{}),
91547
- /* @__PURE__ */jsxRuntimeExports.jsx(SearchInput$1,{"data-testid":generateDataTestId(TEST_ID_PREFIX$1,`search-${s}`),placeholder:i,value:d,onChange:e=>{const t=e.target.value;p(t),c(t)}})]}),
91891
+ /* @__PURE__ */jsxRuntimeExports.jsx(SearchInput$1,{"data-testid":generateDataTestId(TEST_ID_PREFIX,`search-${s}`),placeholder:i,value:d,onChange:e=>{const t=e.target.value;p(t),c(t)}})]}),
91548
91892
  /* @__PURE__ */jsxRuntimeExports.jsx(ScrollableRows,{children:o?/* @__PURE__ */jsxRuntimeExports.jsx(MatchPaneLoader,{testIdSuffix:s}):0===u?/* @__PURE__ */jsxRuntimeExports.jsx(EmptyPaneText,{children:/* @__PURE__ */jsxRuntimeExports.jsx(SmallMedium,{children:t})}):e})]})}const MATCH_PANE_LOADER_ROW_COUNT=3;function MatchPaneLoader({testIdSuffix:e}){/* @__PURE__ */
91549
- return jsxRuntimeExports.jsx(LoaderList,{"data-testid":generateDataTestId(TEST_ID_PREFIX$1,`loader-${e}`),children:Array.from({length:MATCH_PANE_LOADER_ROW_COUNT},(e,t)=>/* @__PURE__ */jsxRuntimeExports.jsxs(LoaderRow,{children:[
91893
+ return jsxRuntimeExports.jsx(LoaderList,{"data-testid":generateDataTestId(TEST_ID_PREFIX,`loader-${e}`),children:Array.from({length:MATCH_PANE_LOADER_ROW_COUNT},(e,t)=>/* @__PURE__ */jsxRuntimeExports.jsxs(LoaderRow,{children:[
91550
91894
  /* @__PURE__ */jsxRuntimeExports.jsx(ContentLoaderSkeleton$1,{height:16,width:16}),
91551
91895
  /* @__PURE__ */jsxRuntimeExports.jsx(CircularContentLoader,{height:24,width:24}),
91552
91896
  /* @__PURE__ */jsxRuntimeExports.jsxs(LoaderTexts,{children:[
@@ -91554,7 +91898,7 @@ return jsxRuntimeExports.jsx(LoaderList,{"data-testid":generateDataTestId(TEST_I
91554
91898
  /* @__PURE__ */jsxRuntimeExports.jsx(ContentLoaderSkeleton$1,{height:12,width:96})]}),
91555
91899
  /* @__PURE__ */jsxRuntimeExports.jsx(ContentLoaderSkeleton$1,{height:14,width:48})]},t))})}function DisplayCheckBox({checked:e,name:t}){/* @__PURE__ */
91556
91900
  return jsxRuntimeExports.jsx(CheckCell,{children:/* @__PURE__ */jsxRuntimeExports.jsx(StyledCheckBox$1,{checkBoxValue:t,isDisabled:"readonly",name:t,value:e,onChange:()=>{}})})}function TransactionMatchRow({isDisabled:e,isSelected:t,row:n,onSelect:o}){const i=getTransactionLineKey(n.transactionId,n.lineId);/* @__PURE__ */
91557
- return jsxRuntimeExports.jsxs(MatchRow$1,{"data-testid":generateDataTestId(TEST_ID_PREFIX$1,`txn-row-${i}`),$isDisabled:e,$isSelected:t,onClick:e?void 0:o,children:[
91901
+ return jsxRuntimeExports.jsxs(MatchRow$1,{"data-testid":generateDataTestId(TEST_ID_PREFIX,`txn-row-${i}`),$isDisabled:e,$isSelected:t,onClick:e?void 0:o,children:[
91558
91902
  /* @__PURE__ */jsxRuntimeExports.jsx(DisplayCheckBox,{checked:t,name:`txn-select-${i}`}),
91559
91903
  /* @__PURE__ */jsxRuntimeExports.jsx(EntityAvatar,{name:n.vendorName}),
91560
91904
  /* @__PURE__ */jsxRuntimeExports.jsxs(RowBody,{children:[
@@ -91562,8 +91906,8 @@ return jsxRuntimeExports.jsxs(MatchRow$1,{"data-testid":generateDataTestId(TEST_
91562
91906
  /* @__PURE__ */jsxRuntimeExports.jsx(TooltipWithEllipsisText,{maxWidth:"160px",text:n.vendorName,withNoHover:!0,itemTextStyle:{fontWeight:600,color:"inherit"}}),
91563
91907
  /* @__PURE__ */jsxRuntimeExports.jsx(StyledCapsule,{label:formatTransactionTypeLabel(n.transactionType),style:{flexShrink:0},type:"info"})]}),
91564
91908
  /* @__PURE__ */jsxRuntimeExports.jsxs(RowMeta,{children:[formatUnmatchedListTransactionDate(n.transactionDate),null!=n.transactionMemo&&""!==n.transactionMemo?` · ${n.transactionMemo}`:""]})]}),
91565
- /* @__PURE__ */jsxRuntimeExports.jsx(RowAmount,{children:amountToString("0,0.[00]",{amount:n.amount,currencyCode:n.currencyCode||"USD",currencySymbol:n.currencySymbol||currency$7.currencySymbol})??formatUnmatchedListAmount(n.amount,n.currencySymbol||currency$7.currencySymbol)})]})}function AccrualMatchRow({isDisabled:e,isSelected:t,row:n,vendorLockReason:o,onToggle:i}){const r=null!=n.jeDebitAccountName&&""!==n.jeDebitAccountName?n.jeDebitAccountName:hyphen$f,a=`${formatServiceMonthLabel(n.serviceMonth)} · ${r}`;/* @__PURE__ */
91566
- return jsxRuntimeExports.jsx(AccrualRowBlock,{title:o,children:/* @__PURE__ */jsxRuntimeExports.jsxs(MatchRow$1,{"aria-disabled":e,"data-testid":generateDataTestId(TEST_ID_PREFIX$1,`accrual-row-${n.accrualId}`),$isDisabled:e,$isSelected:t,onClick:e?void 0:i,children:[
91909
+ /* @__PURE__ */jsxRuntimeExports.jsx(RowAmount,{children:amountToString("0,0.[00]",{amount:n.amount,currencyCode:n.currencyCode||"USD",currencySymbol:n.currencySymbol||currency$7.currencySymbol})??formatUnmatchedListAmount(n.amount,n.currencySymbol||currency$7.currencySymbol)})]})}function AccrualMatchRow({isDisabled:e,isSelected:t,row:n,vendorLockReason:o,onToggle:i}){const r=null!=n.jeDebitAccountName&&""!==n.jeDebitAccountName?n.jeDebitAccountName:hyphen$d,a=`${formatServiceMonthLabel(n.serviceMonth)} · ${r}`;/* @__PURE__ */
91910
+ return jsxRuntimeExports.jsx(AccrualRowBlock,{title:o,children:/* @__PURE__ */jsxRuntimeExports.jsxs(MatchRow$1,{"aria-disabled":e,"data-testid":generateDataTestId(TEST_ID_PREFIX,`accrual-row-${n.accrualId}`),$isDisabled:e,$isSelected:t,onClick:e?void 0:i,children:[
91567
91911
  /* @__PURE__ */jsxRuntimeExports.jsx(DisplayCheckBox,{checked:t,name:`accrual-select-${n.accrualId}`}),
91568
91912
  /* @__PURE__ */jsxRuntimeExports.jsx(EntityAvatar,{name:n.vendorName}),
91569
91913
  /* @__PURE__ */jsxRuntimeExports.jsxs(RowBody,{children:[
@@ -91756,13 +92100,13 @@ return jsxRuntimeExports.jsx(AccrualRowBlock,{title:o,children:/* @__PURE__ */js
91756
92100
  padding: ${Space.sp3} ${Space.sp4};
91757
92101
  border-top: 1px solid ${e=>e.theme.colors.grey2};
91758
92102
  `;function ActualMatchingPageKpis({actualMatching:e}){/* @__PURE__ */
91759
- return jsxRuntimeExports.jsx(KpiHeader,{children:e.hasLoadedForSelectedPeriod?/* @__PURE__ */jsxRuntimeExports.jsx(ActualMatchingKpiStrip,{displayCurrency:getActualMatchingDisplayCurrency([...e.reversed,...e.pendingReview]),kpiSummary:e.kpiSummary}):/* @__PURE__ */jsxRuntimeExports.jsx(ActualMatchingKpiStripSkeleton,{})})}function ActualMatchingPage({actualMatching:e,isMatchPanelOpen:t=!1,matchPanelContent:n,onClearMatchNewModal:o,onCloseMatchNewModal:i,onIgnoreMatchSuggestion:r,onMatchAndReverse:a,onOpenMatch:s,onSearchMatchAccruals:l,onSearchMatchTransactions:c,onUndoReversal:d,onUpdateActualMatchingUIState:p}){const u=t,[m,h]=useState(),g=null!=m?e.ignoreStatusByMatchId?.[m.matchId]:void 0;useEffect(()=>{null!=m&&"Completed"===g?.fetchState&&h(void 0)},[g?.fetchState,m]);const x=e.hasLoadedForSelectedPeriod?/* @__PURE__ */jsxRuntimeExports.jsx(ListShell,{children:/* @__PURE__ */jsxRuntimeExports.jsx(ActualMatchingList,{ignoreStatusByMatchId:e.ignoreStatusByMatchId,pendingReview:e.pendingReview,reversed:e.reversed,sortKey:e.uiState.sortKey,sortOrder:e.uiState.sortOrder,undoStatusByMatchId:e.undoReversalStatusByMatchId,onIgnoreMatchSuggestion:t=>{const n=e.pendingReview.find(e=>e.matchId===t);h(n)},onOpenMatch:s,onUndoReversal:d,onUpdateActualMatchingUIState:p})}):/* @__PURE__ */jsxRuntimeExports.jsx(ActualMatchingPageSkeleton,{});/* @__PURE__ */
92103
+ return jsxRuntimeExports.jsx(KpiHeader,{children:e.hasLoadedForSelectedPeriod?/* @__PURE__ */jsxRuntimeExports.jsx(ActualMatchingKpiStrip,{displayCurrency:getActualMatchingDisplayCurrency([...e.reversed,...e.pendingReview]),kpiSummary:e.kpiSummary}):/* @__PURE__ */jsxRuntimeExports.jsx(ActualMatchingKpiStripSkeleton,{})})}function ActualMatchingPage({actualMatching:e,isMatchPanelOpen:t=!1,matchPanelContent:n,onClearMatchNewModal:o,onCloseMatchNewModal:i,onIgnoreMatchSuggestion:r,onMatchAndReverse:a,onOpenBill:s,onOpenMatch:l,onSearchMatchAccruals:c,onSearchMatchTransactions:d,onUndoReversal:p,onUpdateActualMatchingUIState:u}){const m=t,h=usePanelInternal()?.selectedItemId,g=null==h?void 0:e.pendingReview.find(e=>e.matchId===h)??e.reversed.find(e=>e.matchId===h),x=null==g?void 0:getMatchedBillTransaction({members:[g],transactionType:g.transactionType??"bill"})??void 0,[f,y]=useState(),S=null!=f?e.ignoreStatusByMatchId?.[f.matchId]:void 0;useEffect(()=>{null!=f&&"Completed"===S?.fetchState&&y(void 0)},[S?.fetchState,f]);const C=e.hasLoadedForSelectedPeriod?/* @__PURE__ */jsxRuntimeExports.jsx(ListShell,{children:/* @__PURE__ */jsxRuntimeExports.jsx(ActualMatchingList,{ignoreStatusByMatchId:e.ignoreStatusByMatchId,pendingReview:e.pendingReview,reversed:e.reversed,sortKey:e.uiState.sortKey,sortOrder:e.uiState.sortOrder,undoStatusByMatchId:e.undoReversalStatusByMatchId,onIgnoreMatchSuggestion:t=>{const n=e.pendingReview.find(e=>e.matchId===t);y(n)},onOpenMatch:l,onUndoReversal:p,onUpdateActualMatchingUIState:u})}):/* @__PURE__ */jsxRuntimeExports.jsx(ActualMatchingPageSkeleton,{});/* @__PURE__ */
91760
92104
  return jsxRuntimeExports.jsxs(SectionWrapper$2,{children:[
91761
- /* @__PURE__ */jsxRuntimeExports.jsxs(SectionContent$2,{$isPanelOpen:u,children:[
91762
- /* @__PURE__ */jsxRuntimeExports.jsx(ActualMatchingStatusFilterBar,{autoReversedCount:e.kpiSummary.autoReversed.count,pendingReviewCount:e.kpiSummary.pendingReview.count,selectedFilter:getActualMatchingStatusFilter(e.uiState),onFilterChange:e=>p?.({statusFilter:e})}),
92105
+ /* @__PURE__ */jsxRuntimeExports.jsxs(SectionContent$2,{$isPanelOpen:m,children:[
92106
+ /* @__PURE__ */jsxRuntimeExports.jsx(ActualMatchingStatusFilterBar,{autoReversedCount:e.kpiSummary.autoReversed.count,pendingReviewCount:e.kpiSummary.pendingReview.count,selectedFilter:getActualMatchingStatusFilter(e.uiState),onFilterChange:e=>u?.({statusFilter:e})}),
91763
92107
  /* @__PURE__ */jsxRuntimeExports.jsx(ActualMatchingPageKpis,{actualMatching:e}),
91764
- /* @__PURE__ */jsxRuntimeExports.jsx(SidePanelLayout$1,{isOpen:u,isFullView:!1,disableMarginTop:!0,panelStyle:PANEL_FLUSH_WITH_LIST_STYLE$2,panelContent:n,listContent:x})]}),
91765
- /* @__PURE__ */jsxRuntimeExports.jsx(MatchNewModal,{matchModal:e.matchModal,onClearMatchNewModal:o,onCloseMatchNewModal:i,onMatchAndReverse:a,onSearchMatchAccruals:l,onSearchMatchTransactions:c}),null!=m&&/* @__PURE__ */jsxRuntimeExports.jsx(JEAccrualFeedbackDialog,{amount:amountToString("0,0.[00]",m.actualAmount)??amountToString("0,0.[00]",m.estimatedAmount)??"",isOpen:!0,isSubmitting:"In-Progress"===g?.fetchState,mode:"ignoreMatchSuggestion",vendorName:m.vendorName,onClose:()=>h(void 0),onSubmit:(e,t)=>{r(m.matchId,e,t)}})]})}const PANEL_FLUSH_WITH_LIST_STYLE$2={paddingTop:Space.sp0,right:Space.sp0},SectionWrapper$2=styled$2.div`
92108
+ /* @__PURE__ */jsxRuntimeExports.jsx(SidePanelLayout$1,{isOpen:m,isFullView:!1,disableMarginTop:!0,panelStyle:PANEL_FLUSH_WITH_LIST_STYLE$2,panelActionBarContent:null==s?void 0:/* @__PURE__ */jsxRuntimeExports.jsx(ActualMatchingOpenBillActionButton,{transaction:x,onOpenBill:s}),panelContent:n,listContent:C})]}),
92109
+ /* @__PURE__ */jsxRuntimeExports.jsx(MatchNewModal,{matchModal:e.matchModal,onClearMatchNewModal:o,onCloseMatchNewModal:i,onMatchAndReverse:a,onSearchMatchAccruals:c,onSearchMatchTransactions:d}),null!=f&&/* @__PURE__ */jsxRuntimeExports.jsx(JEAccrualFeedbackDialog,{amount:amountToString("0,0.[00]",f.actualAmount)??amountToString("0,0.[00]",f.estimatedAmount)??"",isOpen:!0,isSubmitting:"In-Progress"===S?.fetchState,mode:"ignoreMatchSuggestion",vendorName:f.vendorName,onClose:()=>y(void 0),onSubmit:(e,t)=>{r(f.matchId,e,t)}})]})}const PANEL_FLUSH_WITH_LIST_STYLE$2={paddingTop:Space.sp0,right:Space.sp0},SectionWrapper$2=styled$2.div`
91766
92110
  display: flex;
91767
92111
  flex-direction: column;
91768
92112
  background-color: ${e=>e.theme.colors.grey4};
@@ -91800,11 +92144,11 @@ return jsxRuntimeExports.jsxs(SectionWrapper$2,{children:[
91800
92144
  `,KpiHeader=styled$2.div`
91801
92145
  flex-shrink: 0;
91802
92146
  background-color: ${e=>e.theme.colors.grey4};
91803
- `,{expenseAutomation:{jeSchedules:jeScheduleStrings$b},common:{strings:{hyphen:hyphen$e}},dateFormat:dateFormat$m}=appLocale.getLocalizedStrings(),PROGRESS_BAR_WIDTH_PX=115,LIFECYCLE_COLUMN_WIDTH_PX=PROGRESS_BAR_WIDTH_PX+sp[4],JEScheduleLifecycle=({endDate:e,forcePostedLabel:t,isOneTimeAccrual:n=!1,posted:o,reversesOnBillMatch:i,scheduleType:r,total:a})=>{if(n){if(!0===i)/* @__PURE__ */
92147
+ `,{expenseAutomation:{jeSchedules:jeScheduleStrings$b},common:{strings:{hyphen:hyphen$c}},dateFormat:dateFormat$m}=appLocale.getLocalizedStrings(),PROGRESS_BAR_WIDTH_PX=115,LIFECYCLE_COLUMN_WIDTH_PX=PROGRESS_BAR_WIDTH_PX+sp[4],JEScheduleLifecycle=({endDate:e,forcePostedLabel:t,isOneTimeAccrual:n=!1,posted:o,reversesOnBillMatch:i,scheduleType:r,total:a})=>{if(n){if(!0===i)/* @__PURE__ */
91804
92148
  return jsxRuntimeExports.jsx(Container$y,{children:/* @__PURE__ */jsxRuntimeExports.jsx(ReversalColumn,{children:/* @__PURE__ */jsxRuntimeExports.jsx(ReversalText,{children:jeScheduleStrings$b.scheduleHeaders.reversesOnMatch})})});const t=e?.format(dateFormat$m.visual.MMMDCommaYYYYformat);/* @__PURE__ */
91805
92149
  return jsxRuntimeExports.jsx(Container$y,{children:/* @__PURE__ */jsxRuntimeExports.jsx(ReversalColumn,{children:null!=t?/* @__PURE__ */jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[
91806
92150
  /* @__PURE__ */jsxRuntimeExports.jsx(ReversalText,{children:jeScheduleStrings$b.scheduleHeaders.reversesOn}),
91807
- /* @__PURE__ */jsxRuntimeExports.jsx(ReversalText,{children:t})]}):/* @__PURE__ */jsxRuntimeExports.jsx(ReversalText,{children:hyphen$e})})})}const s=a>0?Math.round(o/a*100):0,l=a>0?Math.round(o/a*PROGRESS_BAR_WIDTH_PX):0,c=o>0&&o<a,d=!0===t?jeScheduleStrings$b.existingSchedules.kpi.posted:o>0?jeScheduleStrings$b.scheduleHeaders.scheduledAndPosted:jeScheduleStrings$b.lifecycleLabel[r];/* @__PURE__ */
92151
+ /* @__PURE__ */jsxRuntimeExports.jsx(ReversalText,{children:t})]}):/* @__PURE__ */jsxRuntimeExports.jsx(ReversalText,{children:hyphen$c})})})}const s=a>0?Math.round(o/a*100):0,l=a>0?Math.round(o/a*PROGRESS_BAR_WIDTH_PX):0,c=o>0&&o<a,d=!0===t?jeScheduleStrings$b.existingSchedules.kpi.posted:o>0?jeScheduleStrings$b.scheduleHeaders.scheduledAndPosted:jeScheduleStrings$b.lifecycleLabel[r];/* @__PURE__ */
91808
92152
  return jsxRuntimeExports.jsx(Container$y,{children:/* @__PURE__ */jsxRuntimeExports.jsxs(InnerColumn,{children:[
91809
92153
  /* @__PURE__ */jsxRuntimeExports.jsxs(TopRow$1,{children:[
91810
92154
  /* @__PURE__ */jsxRuntimeExports.jsx(CountText,{children:`${o}/${a}`}),
@@ -92059,27 +92403,27 @@ return jsxRuntimeExports.jsxs(Strip$2,{children:[
92059
92403
  flex-shrink: 0;
92060
92404
  color: ${e=>e.theme.colors.hero};
92061
92405
  `,{expenseAutomation:{jeSchedules:jeScheduleStrings$8}}=appLocale.getLocalizedStrings(),{all:allLabel$1,...scheduleTypeLabels}=jeScheduleStrings$8.typeFilter,typeLabels$1=scheduleTypeLabels;function JETypeFilterBar({counts:e,selectedFilter:t,onFilterChange:n}){const o=t??"all",i=useMemo(()=>[{id:"all",label:allLabel$1},...Object.entries(typeLabels$1).filter(([e])=>"deferred_revenue"!==e).map(([t,n])=>({id:t,label:n,inlineCount:e[t]??0}))],[e]);/* @__PURE__ */
92062
- return jsxRuntimeExports.jsx(ExpenseAutomationSubTabSwitcher,{activeSubTab:o,allTabs:i,onSubTabChange:e=>n("all"===e?null:e)})}const{expenseAutomation:{jeSchedules:{scheduleCot:{credit:credit$1,debit:debit$1,methodByType:methodByType,monthLifeSuffix:monthLifeSuffix,recommendedMethod:recommendedMethod}}},common:{strings:{middleDot:middleDot$1,space:space}}}=appLocale.getLocalizedStrings();function buildJEScheduleSummaryCOTData(e){if(isOneTimeAccrualRow(e))return null;const t=e.aiSummaries?.scheduleSummary,n=Array.isArray(t?.cot)?t.cot:[];return 0===n.length?null:{isCOTEnabled:!0,isThoughtProcessOnly:!1,recommendations:[{id:getJEScheduleRowKey(e),title:recommendedMethod,name:buildRecommendedMethodName(e),reason:t?.reasoning??buildDebitCreditSummary(e),confidencePercentage:toConfidencePercentage(e),cot:n,isSelected:!1,isDisabled:!0}]}}function buildRecommendedMethodName(e){const t=getJEScheduleRowType(e),n=null!=t?methodByType[t]:void 0,o=e.period;return null==n?null!=o?`${o}${monthLifeSuffix}`:"":null==o?n:`${n}${space}${middleDot$1}${space}${o}${monthLifeSuffix}`}function buildDebitCreditSummary(e){const t=e.jeDebit.account?.accountName,n=e.jeCredit.account?.accountName;return null==t||null==n?"":`${debit$1}${space}${t}${space}${middleDot$1}${space}${credit$1}${space}${n}`}function toConfidencePercentage(e){const t=e.aiSummaries?.scheduleSummary?.confidence??e.confidenceScore;if("number"==typeof t)return t<=1?Math.round(100*t):Math.round(t)}function getOrdinalSuffix(e){if(e>=11&&e<=13)return"th";switch(e%10){case 1:return"st";case 2:return"nd";case 3:return"rd";default:return"th"}}function getJEPostingDateText(e,t){if(isOneTimeAccrualRow(e))return t;if(!0===e.lastDayOfMonth)return"Last day of every month";if(null!=e.dayOfPostingDate){const t=e.dayOfPostingDate;return`${t}${getOrdinalSuffix(t)} of every month`}return t}const COUNTED_ENTRY_STATUS_CODES=/* @__PURE__ */new Set(["posted","unknown","canceled"]);function countPostedEntries(e){return null==e?0:Array.isArray(e)?e.filter(e=>COUNTED_ENTRY_STATUS_CODES.has(e.status.code)).length:COUNTED_ENTRY_STATUS_CODES.has(e.status.code)?1:0}function getRemainingMonthsText(e,t){if(isOneTimeAccrualRow(e))return t;const n=e.period;if(null==n||n<=0)return t;const o=e.scheduledJournalEntry;if(Array.isArray(o))return`${countPostedEntries(o)}/${n}`;if(null!=o){const t=o;if(null!=t.expectedPostDate&&null!=e.startDate){return`${t.expectedPostDate.diff(e.startDate,"month")+1}/${n}`}}return t}function getJEScheduleRowKey(e){return isOneTimeAccrualRow(e)?e.jeOneTimeAccrualKey:isAccruedScheduleRow(e)?e.jeAccruedScheduleKey:e.jeScheduleTransactionKey}function getJEScheduleRowPanelId(e){return isOneTimeAccrualRow(e)?e.accrualId:e.jeScheduleId}const INTERACTIVE_CELL_CLASS_NAMES=["item-value-container","hover-background","auto-complete-single-select-field__input","auto-complete-single-select-field__option","grouped-single-select-field__input","grouped-single-select-field__menu"];function isInteractiveCellClick(e){let t=e instanceof HTMLElement?e:null;for(;null!=t;){const e=t;if(INTERACTIVE_CELL_CLASS_NAMES.some(t=>e.classList.contains(t)))return!0;t=t.parentElement}return!1}const{expenseAutomation:{jeSchedules:jeScheduleStrings$7},common:{scheduleTypes:scheduleTypes$2,currency:currency$6,retry:retry,review:review$1,strings:{hyphen:hyphen$d},texts:{addCategory2:addCategory2$1,addVendor:addVendor,months:month$1}},dateFormat:dateFormat$l}=appLocale.getLocalizedStrings(),BUTTON_MIN_WIDTH$2=75,jeScheduleId="jeSchedulePage",uniqueName$d=e=>`${jeScheduleId}.${e}`,vendorFieldName=uniqueName$d("vendor"),categoryDropdownFieldName=uniqueName$d("scheduleExpenseCategory"),accumulatedDepreciationCategoryDropdownFieldName=uniqueName$d("accumulatedDepreciationCategory");function strippedDeletedName(e){return e?.split("(deleted)")[0]?.trim()??""}const JEScheduleResolveListRow=({allAccountGroupedOptions:e,allAccountList:t,allDepAccountGroupedOptions:n,allDepAccountList:o,dataListColumnKey:i,draft:r,localData:a,postStatus:s,uncategorizedAccounts:l,vendorSearchAutoCompleteActions:c,vendorSearchAutoCompleteData:d,onFormDataChange:p,onPostJESchedule:u,onReviewClickHandler:m})=>{const h=r?.scheduledJournalEntry.error??[],g=h.includes("vendor_deleted"),x=h.includes("debit_category_deleted"),f=h.includes("credit_category_deleted"),y=h.every(e=>"vendor_deleted"===e?null!=a.updatedVendor?.id&&""!==a.updatedVendor.id&&null!=a.updatedVendor?.name&&""!==a.updatedVendor.name:"debit_category_deleted"===e?null!=a.updatedCategoryId:"credit_category_deleted"!==e||null!=a.updatedAccumulatedDepreciationCategoryID),S={menu:()=>({width:300}),menuPortal:e=>({...e,zIndex:9999})},C=e=>[l.expense?.qboId,l.income?.qboId].includes(e),$=e=>{const n=t.find(t=>t.qboId===e);return n?.qboId},b=e=>{const t=o.find(t=>t.qboId===e);return t?.qboId};switch(i){case"vendor":{if(g)/* @__PURE__ */
92406
+ return jsxRuntimeExports.jsx(ExpenseAutomationSubTabSwitcher,{activeSubTab:o,allTabs:i,onSubTabChange:e=>n("all"===e?null:e)})}const{expenseAutomation:{jeSchedules:{scheduleCot:{credit:credit$1,debit:debit$1,methodByType:methodByType,monthLifeSuffix:monthLifeSuffix,recommendedMethod:recommendedMethod}}},common:{strings:{middleDot:middleDot$1,space:space}}}=appLocale.getLocalizedStrings();function buildJEScheduleSummaryCOTData(e){if(isOneTimeAccrualRow(e))return null;const t=e.aiSummaries?.scheduleSummary,n=Array.isArray(t?.cot)?t.cot:[];return 0===n.length?null:{isCOTEnabled:!0,isThoughtProcessOnly:!1,recommendations:[{id:getJEScheduleRowKey(e),title:recommendedMethod,name:buildRecommendedMethodName(e),reason:t?.reasoning??buildDebitCreditSummary(e),confidencePercentage:toConfidencePercentage(e),cot:n,isSelected:!1,isDisabled:!0}]}}function buildRecommendedMethodName(e){const t=getJEScheduleRowType(e),n=null!=t?methodByType[t]:void 0,o=e.period;return null==n?null!=o?`${o}${monthLifeSuffix}`:"":null==o?n:`${n}${space}${middleDot$1}${space}${o}${monthLifeSuffix}`}function buildDebitCreditSummary(e){const t=e.jeDebit.account?.accountName,n=e.jeCredit.account?.accountName;return null==t||null==n?"":`${debit$1}${space}${t}${space}${middleDot$1}${space}${credit$1}${space}${n}`}function toConfidencePercentage(e){const t=e.aiSummaries?.scheduleSummary?.confidence??e.confidenceScore;if("number"==typeof t)return t<=1?Math.round(100*t):Math.round(t)}function getOrdinalSuffix(e){if(e>=11&&e<=13)return"th";switch(e%10){case 1:return"st";case 2:return"nd";case 3:return"rd";default:return"th"}}function getJEPostingDateText(e,t){if(isOneTimeAccrualRow(e))return t;if(!0===e.lastDayOfMonth)return"Last day of every month";if(null!=e.dayOfPostingDate){const t=e.dayOfPostingDate;return`${t}${getOrdinalSuffix(t)} of every month`}return t}const COUNTED_ENTRY_STATUS_CODES=/* @__PURE__ */new Set(["posted","unknown","canceled"]);function countPostedEntries(e){return null==e?0:Array.isArray(e)?e.filter(e=>COUNTED_ENTRY_STATUS_CODES.has(e.status.code)).length:COUNTED_ENTRY_STATUS_CODES.has(e.status.code)?1:0}function getRemainingMonthsText(e,t){if(isOneTimeAccrualRow(e))return t;const n=e.period;if(null==n||n<=0)return t;const o=e.scheduledJournalEntry;if(Array.isArray(o))return`${countPostedEntries(o)}/${n}`;if(null!=o){const t=o;if(null!=t.expectedPostDate&&null!=e.startDate){return`${t.expectedPostDate.diff(e.startDate,"month")+1}/${n}`}}return t}function getJEScheduleRowKey(e){return isOneTimeAccrualRow(e)?e.jeOneTimeAccrualKey:isAccruedScheduleRow(e)?e.jeAccruedScheduleKey:e.jeScheduleTransactionKey}function getJEScheduleRowPanelId(e){return isOneTimeAccrualRow(e)?e.accrualId:e.jeScheduleId}const INTERACTIVE_CELL_CLASS_NAMES=["item-value-container","hover-background","auto-complete-single-select-field__input","auto-complete-single-select-field__option","grouped-single-select-field__input","grouped-single-select-field__menu"];function isInteractiveCellClick(e){let t=e instanceof HTMLElement?e:null;for(;null!=t;){const e=t;if(INTERACTIVE_CELL_CLASS_NAMES.some(t=>e.classList.contains(t)))return!0;t=t.parentElement}return!1}const{expenseAutomation:{jeSchedules:jeScheduleStrings$7},common:{scheduleTypes:scheduleTypes$2,currency:currency$6,retry:retry,review:review$1,strings:{hyphen:hyphen$b},texts:{addCategory2:addCategory2$1,addVendor:addVendor,months:month$1}},dateFormat:dateFormat$l}=appLocale.getLocalizedStrings(),BUTTON_MIN_WIDTH$2=75,jeScheduleId="jeSchedulePage",uniqueName$d=e=>`${jeScheduleId}.${e}`,vendorFieldName=uniqueName$d("vendor"),categoryDropdownFieldName=uniqueName$d("scheduleExpenseCategory"),accumulatedDepreciationCategoryDropdownFieldName=uniqueName$d("accumulatedDepreciationCategory");function strippedDeletedName(e){return e?.split("(deleted)")[0]?.trim()??""}const JEScheduleResolveListRow=({allAccountGroupedOptions:e,allAccountList:t,allDepAccountGroupedOptions:n,allDepAccountList:o,dataListColumnKey:i,draft:r,localData:a,postStatus:s,uncategorizedAccounts:l,vendorSearchAutoCompleteActions:c,vendorSearchAutoCompleteData:d,onFormDataChange:p,onPostJESchedule:u,onReviewClickHandler:m})=>{const h=r?.scheduledJournalEntry.error??[],g=h.includes("vendor_deleted"),x=h.includes("debit_category_deleted"),f=h.includes("credit_category_deleted"),y=h.every(e=>"vendor_deleted"===e?null!=a.updatedVendor?.id&&""!==a.updatedVendor.id&&null!=a.updatedVendor?.name&&""!==a.updatedVendor.name:"debit_category_deleted"===e?null!=a.updatedCategoryId:"credit_category_deleted"!==e||null!=a.updatedAccumulatedDepreciationCategoryID),S={menu:()=>({width:300}),menuPortal:e=>({...e,zIndex:9999})},C=e=>[l.expense?.qboId,l.income?.qboId].includes(e),$=e=>{const n=t.find(t=>t.qboId===e);return n?.qboId},b=e=>{const t=o.find(t=>t.qboId===e);return t?.qboId};switch(i){case"vendor":{if(g)/* @__PURE__ */
92063
92407
  return jsxRuntimeExports.jsx(ResolveVendorCell,{draft:r,localData:a,vendorSearchAutoCompleteActions:c,vendorSearchAutoCompleteData:d,onFormDataChange:p});const e=r.vendor.name,t=null!=e&&""!==e;/* @__PURE__ */
92064
92408
  return jsxRuntimeExports.jsxs(VendorCell$4,{children:[null!=r.vendor.logo?.href?/* @__PURE__ */jsxRuntimeExports.jsx(EntityLogoAvatar,{photoUrl:r.vendor.logo.href,styles:{width:sp[3],height:sp[3]}}):/* @__PURE__ */jsxRuntimeExports.jsx(EntityAvatar,{name:e}),
92065
- /* @__PURE__ */jsxRuntimeExports.jsx(Tooltip$6,{arrow:!0,display:"block",placement:"bottom",style:{width:"fit-content"},title:t?e:"",children:/* @__PURE__ */jsxRuntimeExports.jsx(TruncatedText$3,{children:t?e:hyphen$d})})]})}case"category":{if(x)/* @__PURE__ */
92409
+ /* @__PURE__ */jsxRuntimeExports.jsx(Tooltip$6,{arrow:!0,display:"block",placement:"bottom",style:{width:"fit-content"},title:t?e:"",children:/* @__PURE__ */jsxRuntimeExports.jsx(TruncatedText$3,{children:t?e:hyphen$b})})]})}case"category":{if(x)/* @__PURE__ */
92066
92410
  return jsxRuntimeExports.jsx(ResolveCategoryCell,{allAccountGroupedOptions:e,allAccountList:t,customStyle:S,draft:r,getCOAIdForCategory:$,isAccountOptionDisabled:C,localData:a,onFormDataChange:p});const n=r.jeDebit.account?.accountName,o=null!=n&&""!==n;/* @__PURE__ */
92067
- return jsxRuntimeExports.jsx(CellWithIcon$2,{children:/* @__PURE__ */jsxRuntimeExports.jsx(Tooltip$6,{arrow:!0,display:"block",placement:"bottom",style:{width:"fit-content"},title:o?n:"",children:/* @__PURE__ */jsxRuntimeExports.jsx(TruncatedText$3,{children:o?n:hyphen$d})})})}case"class":{const e=r.jeDebit.accountingClass?.className,t=null!=e&&""!==e;/* @__PURE__ */
92068
- return jsxRuntimeExports.jsx(CellWithIcon$2,{children:/* @__PURE__ */jsxRuntimeExports.jsx(Tooltip$6,{arrow:!0,display:"block",placement:"bottom",style:{width:"fit-content"},title:t?e:"",children:/* @__PURE__ */jsxRuntimeExports.jsx(TruncatedText$3,{children:t?e:hyphen$d})})})}case"depCategory":{if("prepaid_expenses"===r.jeScheduleType)/* @__PURE__ */
92411
+ return jsxRuntimeExports.jsx(CellWithIcon$2,{children:/* @__PURE__ */jsxRuntimeExports.jsx(Tooltip$6,{arrow:!0,display:"block",placement:"bottom",style:{width:"fit-content"},title:o?n:"",children:/* @__PURE__ */jsxRuntimeExports.jsx(TruncatedText$3,{children:o?n:hyphen$b})})})}case"class":{const e=r.jeDebit.accountingClass?.className,t=null!=e&&""!==e;/* @__PURE__ */
92412
+ return jsxRuntimeExports.jsx(CellWithIcon$2,{children:/* @__PURE__ */jsxRuntimeExports.jsx(Tooltip$6,{arrow:!0,display:"block",placement:"bottom",style:{width:"fit-content"},title:t?e:"",children:/* @__PURE__ */jsxRuntimeExports.jsx(TruncatedText$3,{children:t?e:hyphen$b})})})}case"depCategory":{if("prepaid_expenses"===r.jeScheduleType)/* @__PURE__ */
92069
92413
  return jsxRuntimeExports.jsxs(CellWithIcon$2,{children:[
92070
92414
  /* @__PURE__ */jsxRuntimeExports.jsx(IconSlot$2,{}),
92071
- /* @__PURE__ */jsxRuntimeExports.jsx(TruncatedText$3,{children:hyphen$d})]});if(f&&"fixed_assets"===r.jeScheduleType)/* @__PURE__ */
92415
+ /* @__PURE__ */jsxRuntimeExports.jsx(TruncatedText$3,{children:hyphen$b})]});if(f&&"fixed_assets"===r.jeScheduleType)/* @__PURE__ */
92072
92416
  return jsxRuntimeExports.jsx(ResolveDepCategoryCell,{allDepAccountGroupedOptions:n,allDepAccountList:o,draft:r,getDepCOAIdForCategory:b,isAccountOptionDisabled:C,localData:a,onFormDataChange:p});const e=r.jeCredit.account?.accountName,t=null!=e&&""!==e;/* @__PURE__ */
92073
- return jsxRuntimeExports.jsx(CellWithIcon$2,{children:/* @__PURE__ */jsxRuntimeExports.jsx(Tooltip$6,{arrow:!0,display:"block",placement:"bottom",style:{width:"fit-content"},title:t?e:"",children:/* @__PURE__ */jsxRuntimeExports.jsx(TruncatedText$3,{children:t?e:hyphen$d})})})}case"scheduleCategory":{const e=r.baseTransaction.account.accountName,t=null!=e&&""!==e;/* @__PURE__ */
92074
- return jsxRuntimeExports.jsx(Tooltip$6,{arrow:!0,display:"block",placement:"bottom",style:{width:"fit-content"},title:t?e:"",children:/* @__PURE__ */jsxRuntimeExports.jsx(TruncatedText$3,{children:t?e:hyphen$d})})}case"startMonth":{const e=r.startDate?.format(dateFormat$l.visual.MMMCommaYYYYFormat);return null!=e?/* @__PURE__ */jsxRuntimeExports.jsx(TruncatedText$3,{children:e}):/* @__PURE__ */jsxRuntimeExports.jsx(TruncatedText$3,{children:hyphen$d})}case"type":{const e=scheduleTypes$2[r.jeScheduleType??"prepaid_expenses"];/* @__PURE__ */
92075
- return jsxRuntimeExports.jsx(StyledCapsule,{label:e})}case"amortizationPeriod":{const e=null!=r.period?`${r.period} ${1===r.period?month$1.slice(0,-1):month$1}`:hyphen$d;/* @__PURE__ */
92076
- return jsxRuntimeExports.jsx(CellWithIcon$2,{children:/* @__PURE__ */jsxRuntimeExports.jsx(TruncatedText$3,{children:e})})}case"jePostingDate":{const e=getJEPostingDateText(r,hyphen$d);/* @__PURE__ */
92077
- return jsxRuntimeExports.jsx(CellWithIcon$2,{children:/* @__PURE__ */jsxRuntimeExports.jsx(TruncatedText$3,{children:e})})}case"remainingMonths":{const e=getRemainingMonthsText(r,hyphen$d);/* @__PURE__ */
92078
- return jsxRuntimeExports.jsx(TruncatedText$3,{style:{textAlign:"center"},children:e})}case"runningBalance":{const e=r.scheduledJournalEntry;if(null!=e?.runningBalance){const t=amountToString("0,0.[00]",toAmount(e.runningBalance.amount,currency$6.currencyCode,currency$6.currencySymbol));return null!=t?/* @__PURE__ */jsxRuntimeExports.jsx(TruncatedText$3,{children:t}):/* @__PURE__ */jsxRuntimeExports.jsx(TruncatedText$3,{children:hyphen$d})}/* @__PURE__ */
92079
- return jsxRuntimeExports.jsx(TruncatedText$3,{children:hyphen$d})}case"transactionDate":{const e=r.createTime?.format(dateFormat$l.visual.MMMDCommaYYYYformat);return null!=e?/* @__PURE__ */jsxRuntimeExports.jsx(TruncatedText$3,{children:e}):/* @__PURE__ */jsxRuntimeExports.jsx(TruncatedText$3,{children:hyphen$d})}case"totalAmount":{const e=amountToString("0,0.[00]",toAmount(r.baseTransaction.amount.amount,currency$6.currencyCode,currency$6.currencySymbol));/* @__PURE__ */
92080
- return jsxRuntimeExports.jsx(Tooltip$6,{arrow:!0,display:"block",placement:"bottom",style:{width:"fit-content"},title:e??"",children:null!=e?/* @__PURE__ */jsxRuntimeExports.jsx(TruncatedText$3,{children:e}):/* @__PURE__ */jsxRuntimeExports.jsx(TruncatedText$3,{children:hyphen$d})})}case"action":/* @__PURE__ */
92417
+ return jsxRuntimeExports.jsx(CellWithIcon$2,{children:/* @__PURE__ */jsxRuntimeExports.jsx(Tooltip$6,{arrow:!0,display:"block",placement:"bottom",style:{width:"fit-content"},title:t?e:"",children:/* @__PURE__ */jsxRuntimeExports.jsx(TruncatedText$3,{children:t?e:hyphen$b})})})}case"scheduleCategory":{const e=r.baseTransaction.account.accountName,t=null!=e&&""!==e;/* @__PURE__ */
92418
+ return jsxRuntimeExports.jsx(Tooltip$6,{arrow:!0,display:"block",placement:"bottom",style:{width:"fit-content"},title:t?e:"",children:/* @__PURE__ */jsxRuntimeExports.jsx(TruncatedText$3,{children:t?e:hyphen$b})})}case"startMonth":{const e=r.startDate?.format(dateFormat$l.visual.MMMCommaYYYYFormat);return null!=e?/* @__PURE__ */jsxRuntimeExports.jsx(TruncatedText$3,{children:e}):/* @__PURE__ */jsxRuntimeExports.jsx(TruncatedText$3,{children:hyphen$b})}case"type":{const e=scheduleTypes$2[r.jeScheduleType??"prepaid_expenses"];/* @__PURE__ */
92419
+ return jsxRuntimeExports.jsx(StyledCapsule,{label:e})}case"amortizationPeriod":{const e=null!=r.period?`${r.period} ${1===r.period?month$1.slice(0,-1):month$1}`:hyphen$b;/* @__PURE__ */
92420
+ return jsxRuntimeExports.jsx(CellWithIcon$2,{children:/* @__PURE__ */jsxRuntimeExports.jsx(TruncatedText$3,{children:e})})}case"jePostingDate":{const e=getJEPostingDateText(r,hyphen$b);/* @__PURE__ */
92421
+ return jsxRuntimeExports.jsx(CellWithIcon$2,{children:/* @__PURE__ */jsxRuntimeExports.jsx(TruncatedText$3,{children:e})})}case"remainingMonths":{const e=getRemainingMonthsText(r,hyphen$b);/* @__PURE__ */
92422
+ return jsxRuntimeExports.jsx(TruncatedText$3,{style:{textAlign:"center"},children:e})}case"runningBalance":{const e=r.scheduledJournalEntry;if(null!=e?.runningBalance){const t=amountToString("0,0.[00]",toAmount(e.runningBalance.amount,currency$6.currencyCode,currency$6.currencySymbol));return null!=t?/* @__PURE__ */jsxRuntimeExports.jsx(TruncatedText$3,{children:t}):/* @__PURE__ */jsxRuntimeExports.jsx(TruncatedText$3,{children:hyphen$b})}/* @__PURE__ */
92423
+ return jsxRuntimeExports.jsx(TruncatedText$3,{children:hyphen$b})}case"transactionDate":{const e=r.createTime?.format(dateFormat$l.visual.MMMDCommaYYYYformat);return null!=e?/* @__PURE__ */jsxRuntimeExports.jsx(TruncatedText$3,{children:e}):/* @__PURE__ */jsxRuntimeExports.jsx(TruncatedText$3,{children:hyphen$b})}case"totalAmount":{const e=amountToString("0,0.[00]",toAmount(r.baseTransaction.amount.amount,currency$6.currencyCode,currency$6.currencySymbol));/* @__PURE__ */
92424
+ return jsxRuntimeExports.jsx(Tooltip$6,{arrow:!0,display:"block",placement:"bottom",style:{width:"fit-content"},title:e??"",children:null!=e?/* @__PURE__ */jsxRuntimeExports.jsx(TruncatedText$3,{children:e}):/* @__PURE__ */jsxRuntimeExports.jsx(TruncatedText$3,{children:hyphen$b})})}case"action":/* @__PURE__ */
92081
92425
  return jsxRuntimeExports.jsxs(ActionContainer$3,{className:"item-value-container",children:[
92082
- /* @__PURE__ */jsxRuntimeExports.jsx(Button$4,{variant:"ghost",label:retry,size:"small",prefixIcon:/* @__PURE__ */jsxRuntimeExports.jsx(StyledRefreshIcon$1,{}),loading:"In-Progress"===s?.fetchState,disabled:!y,onClick:()=>{u(r.scheduledJournalEntry.scheduledJournalEntryID,r.jeScheduleTransactionKey)},style:{width:BUTTON_MIN_WIDTH$2}}),
92426
+ /* @__PURE__ */jsxRuntimeExports.jsx(Button$4,{variant:"ghost",label:retry,size:"small",prefixIcon:/* @__PURE__ */jsxRuntimeExports.jsx(StyledRefreshIcon,{}),loading:"In-Progress"===s?.fetchState,disabled:!y,onClick:()=>{u(r.scheduledJournalEntry.scheduledJournalEntryID,r.jeScheduleTransactionKey)},style:{width:BUTTON_MIN_WIDTH$2}}),
92083
92427
  /* @__PURE__ */jsxRuntimeExports.jsx(Button$4,{label:review$1,variant:"secondary",size:"small",onClick:()=>{null!=r.jeScheduleId&&null!=r.jeScheduleType&&m(r.jeScheduleId,r.jeScheduleTransactionKey,r.jeScheduleType)},style:{minWidth:BUTTON_MIN_WIDTH$2}})]});case"createdBy":{const e=r.updatedByUser??r.createdByUser;/* @__PURE__ */
92084
92428
  return jsxRuntimeExports.jsx(JEScheduleCreatedBy,{cotData:buildJEScheduleSummaryCOTData(r),displayName:e?.firstName??e?.email,isAiAccountant:null==r.updatedByUser&&isAiAccountantSchedule(r),photoUrl:e?.photo?.toString()})}case"lifecycle":/* @__PURE__ */
92085
92429
  return jsxRuntimeExports.jsx(JEScheduleLifecycle,{endDate:r.endDate,posted:r.postedCount,scheduleType:r.jeScheduleType??"prepaid_expenses",total:r.lifecycleTotal});default:return null}},JEScheduleResolveListRow$1=memo$c(JEScheduleResolveListRow);function ResolveVendorCell({draft:e,localData:t,vendorSearchAutoCompleteActions:n,vendorSearchAutoCompleteData:o,onFormDataChange:i}){const{updatedVendor:r}=t,a=r?.id,s=null!=a&&""!==a,l=r?.name??"",c=strippedDeletedName(e.vendor.name),d=useMemo(()=>{if(!s)return[];const e=o.entityAutoCompleteView.vendor.find(e=>e.id===a)??r;return[{value:e?.id??"",label:e?.name??""}]},[s,a,r,o]),p=useMemo(()=>({[jeScheduleId]:{vendor:{selectedOption:s?a:void 0,defaultOptions:d}}}),[s,a,d]),u=useForm({defaultValues:p,values:p}),[m,h]=useState(!1),g=useRef();useEffect(()=>{const t=u.watch((t,{name:n})=>{if(null!=n&&String(n).includes("vendor")){const n=t?.[jeScheduleId]?.vendor;i(e.scheduledJournalEntry.scheduledJournalEntryID,{jeScheduleID:e.jeScheduleId??"",scheduledJournalEntryID:e.scheduledJournalEntry.scheduledJournalEntryID,vendor:n})}});return()=>t.unsubscribe()},[u,e,i]),useEffect(()=>{if("Completed"===o.entityAutoCompleteView.fetchState){const e=o.entityAutoCompleteView.vendor;g.current?.(e.map(e=>({label:e.name??"",value:e.id})))}},[o.entityAutoCompleteView.fetchState]);const x=(e,t)=>{n.onAutoCompleteInputChange?.(e,"vendor"),g.current=t},f=()=>{h(!1)};if(!s&&!m)/* @__PURE__ */
@@ -92090,13 +92434,13 @@ return jsxRuntimeExports.jsxs(VendorCell$4,{children:[
92090
92434
  return jsxRuntimeExports.jsx(FormProvider,{...u,children:/* @__PURE__ */jsxRuntimeExports.jsx(ClickAwayListener,{onClickAway:f,children:/* @__PURE__ */jsxRuntimeExports.jsx(DropdownWrap,{className:"item-value-container",onClick:e=>e.stopPropagation(),children:/* @__PURE__ */jsxRuntimeExports.jsx(AutoCompleteSingleSelectField,{autoFocus:!0,name:vendorFieldName,placeholder:addVendor,valueToId:e=>e,defaultValue:{selectedOption:s?a:void 0,defaultOptions:d},menuIsOpen:!0,menuPortal:document.body,style:{width:"100%"},customStyleConfig:{menuPortal:e=>({...e,zIndex:9999})},loadOptions:x,onMenuClose:f})})})});const y=null!=l&&""!==l;/* @__PURE__ */
92091
92435
  return jsxRuntimeExports.jsxs(VendorCell$4,{children:[
92092
92436
  /* @__PURE__ */jsxRuntimeExports.jsx(EntityAvatar,{name:l||""}),
92093
- /* @__PURE__ */jsxRuntimeExports.jsx(Tooltip$6,{arrow:!0,display:"block",placement:"bottom",style:{width:"fit-content"},title:y?l:"",children:/* @__PURE__ */jsxRuntimeExports.jsx(SelectedValueLabel,{onClick:e=>{e.stopPropagation(),h(!0)},"data-testid":generateDataTestId("je-schedule-resolve-vendor-label",e.jeScheduleId),children:y?l:hyphen$d})})]})}function ResolveCategoryCell({allAccountGroupedOptions:e,allAccountList:t,customStyle:n,draft:o,getCOAIdForCategory:i,isAccountOptionDisabled:r,localData:a,onFormDataChange:s}){const l=useMemo(()=>{if(null==a.updatedCategoryId)return;const e=t.find(e=>e.accountId===a.updatedCategoryId);return e?.qboId},[a.updatedCategoryId,t]),c=null!=l,d=strippedDeletedName(o.jeDebit.account?.accountName),p=useMemo(()=>{if(null!=l){for(const t of e){const e=t.options.find(e=>e.value===l);if(null!=e)return e.label}return l}},[l,e]),u=useMemo(()=>({[jeScheduleId]:{scheduleExpenseCategory:{selectedOption:l,allOptions:e}}}),[l,e]),m=useForm({defaultValues:u,values:u}),[h,g]=useState(!1);useEffect(()=>{const e=m.watch((e,{name:t})=>{if(null!=t&&String(t).includes("scheduleExpenseCategory")){const t=e?.[jeScheduleId]?.scheduleExpenseCategory;s(o.scheduledJournalEntry.scheduledJournalEntryID,{jeScheduleID:o.jeScheduleId??"",scheduledJournalEntryID:o.scheduledJournalEntry.scheduledJournalEntryID,scheduleExpenseCategory:t})}});return()=>e.unsubscribe()},[m,o,s]);const x=()=>{g(!1)};if(!c&&!h)/* @__PURE__ */
92437
+ /* @__PURE__ */jsxRuntimeExports.jsx(Tooltip$6,{arrow:!0,display:"block",placement:"bottom",style:{width:"fit-content"},title:y?l:"",children:/* @__PURE__ */jsxRuntimeExports.jsx(SelectedValueLabel,{onClick:e=>{e.stopPropagation(),h(!0)},"data-testid":generateDataTestId("je-schedule-resolve-vendor-label",e.jeScheduleId),children:y?l:hyphen$b})})]})}function ResolveCategoryCell({allAccountGroupedOptions:e,allAccountList:t,customStyle:n,draft:o,getCOAIdForCategory:i,isAccountOptionDisabled:r,localData:a,onFormDataChange:s}){const l=useMemo(()=>{if(null==a.updatedCategoryId)return;const e=t.find(e=>e.accountId===a.updatedCategoryId);return e?.qboId},[a.updatedCategoryId,t]),c=null!=l,d=strippedDeletedName(o.jeDebit.account?.accountName),p=useMemo(()=>{if(null!=l){for(const t of e){const e=t.options.find(e=>e.value===l);if(null!=e)return e.label}return l}},[l,e]),u=useMemo(()=>({[jeScheduleId]:{scheduleExpenseCategory:{selectedOption:l,allOptions:e}}}),[l,e]),m=useForm({defaultValues:u,values:u}),[h,g]=useState(!1);useEffect(()=>{const e=m.watch((e,{name:t})=>{if(null!=t&&String(t).includes("scheduleExpenseCategory")){const t=e?.[jeScheduleId]?.scheduleExpenseCategory;s(o.scheduledJournalEntry.scheduledJournalEntryID,{jeScheduleID:o.jeScheduleId??"",scheduledJournalEntryID:o.scheduledJournalEntry.scheduledJournalEntryID,scheduleExpenseCategory:t})}});return()=>e.unsubscribe()},[m,o,s]);const x=()=>{g(!1)};if(!c&&!h)/* @__PURE__ */
92094
92438
  return jsxRuntimeExports.jsxs(CellWithIcon$2,{children:[
92095
92439
  /* @__PURE__ */jsxRuntimeExports.jsx(Tooltip$6,{display:"flex",placement:"top-start",title:/* @__PURE__ */jsxRuntimeExports.jsx(TooltipText,{children:jeScheduleStrings$7.tooltipText.missingCategory.replace("_deleted_category_",d)}),children:/* @__PURE__ */jsxRuntimeExports.jsx(StyledAlertRoundIcon,{})}),
92096
92440
  /* @__PURE__ */jsxRuntimeExports.jsxs(AddFieldButton,{onClick:e=>{e.stopPropagation(),g(!0)},"data-testid":generateDataTestId("je-schedule-resolve-add-category-button",o.jeScheduleId),children:[addCategory2$1,
92097
92441
  /* @__PURE__ */jsxRuntimeExports.jsx(StyledChevronIcon,{})]})]});if(h)/* @__PURE__ */
92098
92442
  return jsxRuntimeExports.jsx(FormProvider,{...m,children:/* @__PURE__ */jsxRuntimeExports.jsx(CellWithIcon$2,{children:/* @__PURE__ */jsxRuntimeExports.jsx(ClickAwayListener,{onClickAway:x,children:/* @__PURE__ */jsxRuntimeExports.jsx(DropdownWrap,{className:"item-value-container",onClick:e=>e.stopPropagation(),children:/* @__PURE__ */jsxRuntimeExports.jsx(GroupedSingleSelectFieldWithCOT,{autoFocus:!0,name:categoryDropdownFieldName,placeholder:addCategory2$1,type:"category",pageSource:"list_page",transactionStatus:null,showCOT:!1,menuIsOpen:!0,menuPortal:document.body,valueToId:e=>i(e),defaultValue:{selectedOption:l,allOptions:e},registerOptions:{required:!0,validate:e=>!0===Boolean(e.selectedOption)},disableCurrentOption:r,customStyleConfig:n,onMenuClose:x})})})})});const f=null!=p&&""!==p;/* @__PURE__ */
92099
- return jsxRuntimeExports.jsx(CellWithIcon$2,{children:/* @__PURE__ */jsxRuntimeExports.jsx(Tooltip$6,{arrow:!0,display:"block",placement:"bottom",style:{width:"fit-content"},title:f?p:"",children:/* @__PURE__ */jsxRuntimeExports.jsx(SelectedValueLabel,{onClick:e=>{e.stopPropagation(),g(!0)},"data-testid":generateDataTestId("je-schedule-resolve-category-label",o.jeScheduleId),children:f?p:hyphen$d})})})}function ResolveDepCategoryCell({allDepAccountGroupedOptions:e,allDepAccountList:t,draft:n,getDepCOAIdForCategory:o,isAccountOptionDisabled:i,localData:r,onFormDataChange:a}){const s={menu:()=>({width:350}),menuPortal:e=>({...e,zIndex:9999})},l=useMemo(()=>{if(null==r.updatedAccumulatedDepreciationCategoryID)return;const e=t.find(e=>e.accountId===r.updatedAccumulatedDepreciationCategoryID);return e?.qboId},[r.updatedAccumulatedDepreciationCategoryID,t]),c=null!=l,d=strippedDeletedName(n.jeCredit.account?.accountName),p=useMemo(()=>{if(null!=l){for(const t of e){const e=t.options.find(e=>e.value===l);if(null!=e)return e.label}return l}},[l,e]),u=useMemo(()=>({[jeScheduleId]:{accumulatedDepreciationCategory:{selectedOption:l,allOptions:e}}}),[l,e]),m=useForm({defaultValues:u,values:u}),[h,g]=useState(!1);useEffect(()=>{const e=m.watch((e,{name:t})=>{if(null!=t&&String(t).includes("accumulatedDepreciationCategory")){const t=e?.[jeScheduleId]?.accumulatedDepreciationCategory;a(n.scheduledJournalEntry.scheduledJournalEntryID,{jeScheduleID:n.jeScheduleId??"",scheduledJournalEntryID:n.scheduledJournalEntry.scheduledJournalEntryID,accumulatedDepreciationCategory:t})}});return()=>e.unsubscribe()},[m,n,a]);const x=()=>{g(!1)};if(!c&&!h)/* @__PURE__ */
92443
+ return jsxRuntimeExports.jsx(CellWithIcon$2,{children:/* @__PURE__ */jsxRuntimeExports.jsx(Tooltip$6,{arrow:!0,display:"block",placement:"bottom",style:{width:"fit-content"},title:f?p:"",children:/* @__PURE__ */jsxRuntimeExports.jsx(SelectedValueLabel,{onClick:e=>{e.stopPropagation(),g(!0)},"data-testid":generateDataTestId("je-schedule-resolve-category-label",o.jeScheduleId),children:f?p:hyphen$b})})})}function ResolveDepCategoryCell({allDepAccountGroupedOptions:e,allDepAccountList:t,draft:n,getDepCOAIdForCategory:o,isAccountOptionDisabled:i,localData:r,onFormDataChange:a}){const s={menu:()=>({width:350}),menuPortal:e=>({...e,zIndex:9999})},l=useMemo(()=>{if(null==r.updatedAccumulatedDepreciationCategoryID)return;const e=t.find(e=>e.accountId===r.updatedAccumulatedDepreciationCategoryID);return e?.qboId},[r.updatedAccumulatedDepreciationCategoryID,t]),c=null!=l,d=strippedDeletedName(n.jeCredit.account?.accountName),p=useMemo(()=>{if(null!=l){for(const t of e){const e=t.options.find(e=>e.value===l);if(null!=e)return e.label}return l}},[l,e]),u=useMemo(()=>({[jeScheduleId]:{accumulatedDepreciationCategory:{selectedOption:l,allOptions:e}}}),[l,e]),m=useForm({defaultValues:u,values:u}),[h,g]=useState(!1);useEffect(()=>{const e=m.watch((e,{name:t})=>{if(null!=t&&String(t).includes("accumulatedDepreciationCategory")){const t=e?.[jeScheduleId]?.accumulatedDepreciationCategory;a(n.scheduledJournalEntry.scheduledJournalEntryID,{jeScheduleID:n.jeScheduleId??"",scheduledJournalEntryID:n.scheduledJournalEntry.scheduledJournalEntryID,accumulatedDepreciationCategory:t})}});return()=>e.unsubscribe()},[m,n,a]);const x=()=>{g(!1)};if(!c&&!h)/* @__PURE__ */
92100
92444
  return jsxRuntimeExports.jsxs(CellWithIcon$2,{children:[
92101
92445
  /* @__PURE__ */jsxRuntimeExports.jsx(Tooltip$6,{display:"flex",placement:"top-start",title:/* @__PURE__ */jsxRuntimeExports.jsx(TooltipText,{children:jeScheduleStrings$7.tooltipText.missingDepCategory.replace("_deleted_dep_category_",d)}),children:/* @__PURE__ */jsxRuntimeExports.jsx(StyledAlertRoundIcon,{})}),
92102
92446
  /* @__PURE__ */jsxRuntimeExports.jsxs(AddFieldButton,{onClick:e=>{e.stopPropagation(),g(!0)},"data-testid":generateDataTestId("je-schedule-resolve-add-dep-category-button",n.jeScheduleId),children:[jeScheduleStrings$7.addDepCategory,
@@ -92106,7 +92450,7 @@ return jsxRuntimeExports.jsx(FormProvider,{...m,children:/* @__PURE__ */jsxRunti
92106
92450
  /* @__PURE__ */jsxRuntimeExports.jsx(ClickAwayListener,{onClickAway:x,children:/* @__PURE__ */jsxRuntimeExports.jsx(DropdownWrap,{className:"item-value-container",onClick:e=>e.stopPropagation(),children:/* @__PURE__ */jsxRuntimeExports.jsx(GroupedSingleSelectFieldWithCOT,{autoFocus:!0,name:accumulatedDepreciationCategoryDropdownFieldName,placeholder:jeScheduleStrings$7.addDepCategory,type:"category",pageSource:"list_page",transactionStatus:null,showCOT:!1,menuIsOpen:!0,menuPortal:document.body,valueToId:e=>o(e),defaultValue:{selectedOption:l,allOptions:e},registerOptions:{required:!0,validate:e=>!0===Boolean(e.selectedOption)},disableCurrentOption:i,customStyleConfig:s,onMenuClose:x})})})]})});const f=null!=p&&""!==p;/* @__PURE__ */
92107
92451
  return jsxRuntimeExports.jsxs(CellWithIcon$2,{children:[
92108
92452
  /* @__PURE__ */jsxRuntimeExports.jsx(IconSlot$2,{}),
92109
- /* @__PURE__ */jsxRuntimeExports.jsx(Tooltip$6,{arrow:!0,display:"block",placement:"bottom",style:{width:"fit-content"},title:f?p:"",children:/* @__PURE__ */jsxRuntimeExports.jsx(SelectedValueLabel,{onClick:e=>{e.stopPropagation(),g(!0)},"data-testid":generateDataTestId("je-schedule-resolve-dep-category-label",n.jeScheduleId),children:f?p:hyphen$d})})]})}const VendorCell$4=styled$2.div`
92453
+ /* @__PURE__ */jsxRuntimeExports.jsx(Tooltip$6,{arrow:!0,display:"block",placement:"bottom",style:{width:"fit-content"},title:f?p:"",children:/* @__PURE__ */jsxRuntimeExports.jsx(SelectedValueLabel,{onClick:e=>{e.stopPropagation(),g(!0)},"data-testid":generateDataTestId("je-schedule-resolve-dep-category-label",n.jeScheduleId),children:f?p:hyphen$b})})]})}const VendorCell$4=styled$2.div`
92110
92454
  display: flex;
92111
92455
  align-items: center;
92112
92456
  gap: ${Space.sp2};
@@ -92171,7 +92515,7 @@ return jsxRuntimeExports.jsxs(CellWithIcon$2,{children:[
92171
92515
  color: inherit;
92172
92516
  padding-left: ${Space.sp2};
92173
92517
  }
92174
- `,StyledRefreshIcon$1=styled$2(SvgRefresh)`
92518
+ `,StyledRefreshIcon=styled$2(SvgRefresh)`
92175
92519
  width: 14px;
92176
92520
  height: 14px;
92177
92521
  color: inherit;
@@ -92196,22 +92540,22 @@ return jsxRuntimeExports.jsxs(CellWithIcon$2,{children:[
92196
92540
  width: ${COT_ICON_SIZE_PX}px;
92197
92541
  height: ${COT_ICON_SIZE_PX}px;
92198
92542
  flex-shrink: 0;
92199
- `;function accrualActions(e){switch(e){case"draft":return{canIgnore:!0,canPromote:!0,canReview:!0,canRevert:!1};case"posted":return{canIgnore:!1,canPromote:!1,canReview:!0,canRevert:!0};case"reversed":return{canIgnore:!1,canPromote:!1,canReview:!0,canRevert:!1,statusState:"reversed"};default:return{canIgnore:!1,canPromote:!1,canReview:!0,canRevert:!1}}}const{expenseAutomation:{jeSchedules:jeScheduleStrings$6},common:{currency:currency$5,strings:{hyphen:hyphen$c},ignore:ignoreText$1,texts:{review:reviewText$2,revert:revertText$2}},dateFormat:dateFormat$k}=appLocale.getLocalizedStrings(),{accrualDetail:accrualDetailStrings$6}=jeScheduleStrings$6,BUTTON_MIN_WIDTH$1=75,JEOneTimeAccrualCell=({dataListColumnKey:e,row:t,isActionInProgress:n=!1,onIgnoreOneTimeAccrual:o,onReviewOneTimeAccrual:i,onRevertOneTimeAccrual:r})=>{switch(e){case"vendor":{const e=""!==t.vendorName?t.vendorName:t.memo,n=""!==e;/* @__PURE__ */
92543
+ `;function accrualActions(e){switch(e){case"draft":return{canIgnore:!0,canPromote:!0,canReview:!0,canRevert:!1};case"posted":return{canIgnore:!1,canPromote:!1,canReview:!0,canRevert:!0};case"reversed":return{canIgnore:!1,canPromote:!1,canReview:!0,canRevert:!1,statusState:"reversed"};default:return{canIgnore:!1,canPromote:!1,canReview:!0,canRevert:!1}}}const{expenseAutomation:{jeSchedules:jeScheduleStrings$6},common:{currency:currency$5,strings:{hyphen:hyphen$a},ignore:ignoreText,texts:{review:reviewText$2,revert:revertText$2}},dateFormat:dateFormat$k}=appLocale.getLocalizedStrings(),{accrualDetail:accrualDetailStrings$6}=jeScheduleStrings$6,BUTTON_MIN_WIDTH$1=75,JEOneTimeAccrualCell=({dataListColumnKey:e,row:t,isActionInProgress:n=!1,onIgnoreOneTimeAccrual:o,onReviewOneTimeAccrual:i,onRevertOneTimeAccrual:r})=>{switch(e){case"vendor":{const e=""!==t.vendorName?t.vendorName:t.memo,n=""!==e;/* @__PURE__ */
92200
92544
  return jsxRuntimeExports.jsxs(VendorCell$3,{children:[n&&/* @__PURE__ */jsxRuntimeExports.jsx(EntityAvatar,{name:e}),
92201
- /* @__PURE__ */jsxRuntimeExports.jsx(Tooltip$6,{arrow:!0,display:"block",placement:"bottom",style:{width:"fit-content"},title:n?e:"",children:/* @__PURE__ */jsxRuntimeExports.jsx(TruncatedText$2,{children:n?e:hyphen$c})})]})}case"type":/* @__PURE__ */
92545
+ /* @__PURE__ */jsxRuntimeExports.jsx(Tooltip$6,{arrow:!0,display:"block",placement:"bottom",style:{width:"fit-content"},title:n?e:"",children:/* @__PURE__ */jsxRuntimeExports.jsx(TruncatedText$2,{children:n?e:hyphen$a})})]})}case"type":/* @__PURE__ */
92202
92546
  return jsxRuntimeExports.jsx(StyledCapsule,{label:jeScheduleStrings$6.oneTimeAccrualType});case"category":/* @__PURE__ */
92203
92547
  return jsxRuntimeExports.jsx(AccrualTextCell,{text:t.jeDebitAccountName});case"class":/* @__PURE__ */
92204
92548
  return jsxRuntimeExports.jsx(AccrualTextCell,{text:t.jeDebitAccountingClassName});case"depCategory":/* @__PURE__ */
92205
92549
  return jsxRuntimeExports.jsx(AccrualTextCell,{text:t.jeCreditAccountName});case"transactionDate":{const e=t.postingDate?.format(dateFormat$k.visual.MMMDCommaYYYYformat);/* @__PURE__ */
92206
- return jsxRuntimeExports.jsx(TruncatedText$2,{children:e??hyphen$c})}case"period":{const e=""!==t.serviceMonth?zeniDate(`${t.serviceMonth}-01`).format(dateFormat$k.visual.MMMCommaYYYYFormat):void 0;/* @__PURE__ */
92207
- return jsxRuntimeExports.jsx(TruncatedText$2,{children:e??hyphen$c})}case"createdBy":/* @__PURE__ */
92550
+ return jsxRuntimeExports.jsx(TruncatedText$2,{children:e??hyphen$a})}case"period":{const e=""!==t.serviceMonth?zeniDate(`${t.serviceMonth}-01`).format(dateFormat$k.visual.MMMCommaYYYYFormat):void 0;/* @__PURE__ */
92551
+ return jsxRuntimeExports.jsx(TruncatedText$2,{children:e??hyphen$a})}case"createdBy":/* @__PURE__ */
92208
92552
  return jsxRuntimeExports.jsx(JEScheduleCreatedBy,{displayName:t.createdBy?.firstName??t.createdBy?.email,isAiAccountant:isAiAccountantSchedule(t),photoUrl:t.createdBy?.photo?.toString()});case"lifecycle":/* @__PURE__ */
92209
92553
  return jsxRuntimeExports.jsx(JEScheduleLifecycle,{endDate:t.expectedReversalDate,isOneTimeAccrual:!0,posted:0,reversesOnBillMatch:"on_bill_match"===t.reversalPolicy,scheduleType:"accrued_expenses",total:0});case"monthlyAmount":case"totalAmount":{const e=amountToString("0,0.[00]",toAmount(t.estimatedAmount.amount,currency$5.currencyCode,currency$5.currencySymbol));/* @__PURE__ */
92210
- return jsxRuntimeExports.jsx(Tooltip$6,{arrow:!0,display:"block",placement:"bottom",style:{width:"fit-content"},title:e??"",children:/* @__PURE__ */jsxRuntimeExports.jsx(TruncatedText$2,{children:e??hyphen$c})})}case"memo":return""!==t.memo?/* @__PURE__ */jsxRuntimeExports.jsx(Tooltip$6,{arrow:!0,display:"inline-flex",placement:"bottom",title:t.memo,children:/* @__PURE__ */jsxRuntimeExports.jsx(MemoIconWrapper$1,{children:/* @__PURE__ */jsxRuntimeExports.jsx(StyledMemoIcon$2,{})})}):/* @__PURE__ */jsxRuntimeExports.jsx(MemoIconWrapper$1,{children:/* @__PURE__ */jsxRuntimeExports.jsx(StyledMemoIcon$2,{})});case"action":{const e=accrualActions(t.accrualStatus);return null!=e.statusState?/* @__PURE__ */jsxRuntimeExports.jsx(ActionContainer$2,{className:"item-value-container",children:/* @__PURE__ */jsxRuntimeExports.jsx(StatusNote,{children:accrualDetailStrings$6.statusStates[e.statusState]})}):e.canRevert&&null!=r?/* @__PURE__ */jsxRuntimeExports.jsx(ActionContainer$2,{className:"item-value-container",children:/* @__PURE__ */jsxRuntimeExports.jsx(Button$4,{dataTestId:generateDataTestId("je-accrual-revert-button",t.accrualId),disabled:n,label:revertText$2,loading:n,reverseSpinnerColor:!1,size:"small",variant:"secondary",onClick:()=>r(t.accrualId)})}):e.canReview&&e.canIgnore?/* @__PURE__ */jsxRuntimeExports.jsxs(ActionContainer$2,{className:"item-value-container",children:[
92211
- /* @__PURE__ */jsxRuntimeExports.jsx(Button$4,{dataTestId:generateDataTestId("je-accrual-ignore-button",t.accrualId),disabled:n,label:ignoreText$1,loading:n,reverseSpinnerColor:!1,size:"small",variant:"ghost",style:{minWidth:BUTTON_MIN_WIDTH$1},onClick:()=>o?.(t.accrualId)}),
92554
+ return jsxRuntimeExports.jsx(Tooltip$6,{arrow:!0,display:"block",placement:"bottom",style:{width:"fit-content"},title:e??"",children:/* @__PURE__ */jsxRuntimeExports.jsx(TruncatedText$2,{children:e??hyphen$a})})}case"memo":return""!==t.memo?/* @__PURE__ */jsxRuntimeExports.jsx(Tooltip$6,{arrow:!0,display:"inline-flex",placement:"bottom",title:t.memo,children:/* @__PURE__ */jsxRuntimeExports.jsx(MemoIconWrapper$1,{children:/* @__PURE__ */jsxRuntimeExports.jsx(StyledMemoIcon$2,{})})}):/* @__PURE__ */jsxRuntimeExports.jsx(MemoIconWrapper$1,{children:/* @__PURE__ */jsxRuntimeExports.jsx(StyledMemoIcon$2,{})});case"action":{const e=accrualActions(t.accrualStatus);return null!=e.statusState?/* @__PURE__ */jsxRuntimeExports.jsx(ActionContainer$2,{className:"item-value-container",children:/* @__PURE__ */jsxRuntimeExports.jsx(StatusNote,{children:accrualDetailStrings$6.statusStates[e.statusState]})}):e.canRevert&&null!=r?/* @__PURE__ */jsxRuntimeExports.jsx(ActionContainer$2,{className:"item-value-container",children:/* @__PURE__ */jsxRuntimeExports.jsx(Button$4,{dataTestId:generateDataTestId("je-accrual-revert-button",t.accrualId),disabled:n,label:revertText$2,loading:n,reverseSpinnerColor:!1,size:"small",variant:"secondary",onClick:()=>r(t.accrualId)})}):e.canReview&&e.canIgnore?/* @__PURE__ */jsxRuntimeExports.jsxs(ActionContainer$2,{className:"item-value-container",children:[
92555
+ /* @__PURE__ */jsxRuntimeExports.jsx(Button$4,{dataTestId:generateDataTestId("je-accrual-ignore-button",t.accrualId),disabled:n,label:ignoreText,loading:n,reverseSpinnerColor:!1,size:"small",variant:"ghost",style:{minWidth:BUTTON_MIN_WIDTH$1},onClick:()=>o?.(t.accrualId)}),
92212
92556
  /* @__PURE__ */jsxRuntimeExports.jsx(Button$4,{dataTestId:generateDataTestId("je-accrual-review-button",t.accrualId),disabled:n,label:reviewText$2,reverseSpinnerColor:!1,size:"small",variant:"secondary",style:{minWidth:BUTTON_MIN_WIDTH$1},onClick:()=>i?.(t.accrualId)})]}):null}default:/* @__PURE__ */
92213
- return jsxRuntimeExports.jsx(TruncatedText$2,{children:hyphen$c})}},JEOneTimeAccrualCell$1=memo$c(JEOneTimeAccrualCell),AccrualTextCell=({text:e})=>{const t=null!=e&&""!==e;/* @__PURE__ */
92214
- return jsxRuntimeExports.jsx(Tooltip$6,{arrow:!0,display:"block",placement:"bottom",style:{width:"fit-content"},title:t?e:"",children:/* @__PURE__ */jsxRuntimeExports.jsx(TruncatedText$2,{children:t?e:hyphen$c})})},ActionContainer$2=styled$2.div`
92557
+ return jsxRuntimeExports.jsx(TruncatedText$2,{children:hyphen$a})}},JEOneTimeAccrualCell$1=memo$c(JEOneTimeAccrualCell),AccrualTextCell=({text:e})=>{const t=null!=e&&""!==e;/* @__PURE__ */
92558
+ return jsxRuntimeExports.jsx(Tooltip$6,{arrow:!0,display:"block",placement:"bottom",style:{width:"fit-content"},title:t?e:"",children:/* @__PURE__ */jsxRuntimeExports.jsx(TruncatedText$2,{children:t?e:hyphen$a})})},ActionContainer$2=styled$2.div`
92215
92559
  display: flex;
92216
92560
  align-items: center;
92217
92561
  justify-content: flex-end;
@@ -92240,23 +92584,23 @@ return jsxRuntimeExports.jsx(Tooltip$6,{arrow:!0,display:"block",placement:"bott
92240
92584
  width: ${Space.sp3};
92241
92585
  height: ${Space.sp3};
92242
92586
  flex-shrink: 0;
92243
- `,{common:{scheduleTypes:scheduleTypes$1,currency:currency$4,review:review,ignore:ignore,strings:{hyphen:hyphen$b},texts:{months:month}},dateFormat:dateFormat$j}=appLocale.getLocalizedStrings(),BUTTON_MIN_WIDTH=75,JEScheduleDraftListRow=({dataListColumnKey:e,draft:t,ignoreRecommendedJeSchedule:n,ignoreStatus:o,onReviewClickHandler:i,isActionInProgress:r,onIgnoreOneTimeAccrual:a,onReviewOneTimeAccrual:s,onRevertOneTimeAccrual:l})=>{if(isOneTimeAccrualRow(t))/* @__PURE__ */
92587
+ `,{common:{scheduleTypes:scheduleTypes$1,currency:currency$4,review:review,ignore:ignore,strings:{hyphen:hyphen$9},texts:{months:month}},dateFormat:dateFormat$j}=appLocale.getLocalizedStrings(),BUTTON_MIN_WIDTH=75,JEScheduleDraftListRow=({dataListColumnKey:e,draft:t,ignoreRecommendedJeSchedule:n,ignoreStatus:o,onReviewClickHandler:i,isActionInProgress:r,onIgnoreOneTimeAccrual:a,onReviewOneTimeAccrual:s,onRevertOneTimeAccrual:l})=>{if(isOneTimeAccrualRow(t))/* @__PURE__ */
92244
92588
  return jsxRuntimeExports.jsx(JEOneTimeAccrualCell$1,{dataListColumnKey:e,isActionInProgress:r,onIgnoreOneTimeAccrual:a,onReviewOneTimeAccrual:s,row:t,onRevertOneTimeAccrual:l});switch(e){case"vendor":{const e=t.vendor.name,n=null!=e&&""!==e;/* @__PURE__ */
92245
92589
  return jsxRuntimeExports.jsxs(VendorCell$2,{children:[null!=t.vendor.logo?/* @__PURE__ */jsxRuntimeExports.jsx(EntityLogoAvatar,{photoUrl:t.vendor.logo.href,styles:{width:sp[3],height:sp[3]}}):/* @__PURE__ */jsxRuntimeExports.jsx(EntityAvatar,{name:e}),
92246
- /* @__PURE__ */jsxRuntimeExports.jsx(Tooltip$6,{arrow:!0,display:"block",placement:"bottom",style:{width:"fit-content"},title:n?e:"",children:/* @__PURE__ */jsxRuntimeExports.jsx(TruncatedText$1,{children:n?e:hyphen$b})})]})}case"category":{const e=t.jeDebit.account?.accountName,n=null!=e&&""!==e;/* @__PURE__ */
92247
- return jsxRuntimeExports.jsx(CellWithIcon$1,{children:/* @__PURE__ */jsxRuntimeExports.jsx(Tooltip$6,{arrow:!0,display:"block",placement:"bottom",style:{width:"fit-content"},title:n?e:"",children:/* @__PURE__ */jsxRuntimeExports.jsx(TruncatedText$1,{children:n?e:hyphen$b})})})}case"class":{const e=t.jeDebit.accountingClass?.className,n=null!=e&&""!==e;/* @__PURE__ */
92248
- return jsxRuntimeExports.jsx(CellWithIcon$1,{children:/* @__PURE__ */jsxRuntimeExports.jsx(Tooltip$6,{arrow:!0,display:"block",placement:"bottom",style:{width:"fit-content"},title:n?e:"",children:/* @__PURE__ */jsxRuntimeExports.jsx(TruncatedText$1,{children:n?e:hyphen$b})})})}case"depCategory":{if("prepaid_expenses"===t.jeScheduleType)/* @__PURE__ */
92590
+ /* @__PURE__ */jsxRuntimeExports.jsx(Tooltip$6,{arrow:!0,display:"block",placement:"bottom",style:{width:"fit-content"},title:n?e:"",children:/* @__PURE__ */jsxRuntimeExports.jsx(TruncatedText$1,{children:n?e:hyphen$9})})]})}case"category":{const e=t.jeDebit.account?.accountName,n=null!=e&&""!==e;/* @__PURE__ */
92591
+ return jsxRuntimeExports.jsx(CellWithIcon$1,{children:/* @__PURE__ */jsxRuntimeExports.jsx(Tooltip$6,{arrow:!0,display:"block",placement:"bottom",style:{width:"fit-content"},title:n?e:"",children:/* @__PURE__ */jsxRuntimeExports.jsx(TruncatedText$1,{children:n?e:hyphen$9})})})}case"class":{const e=t.jeDebit.accountingClass?.className,n=null!=e&&""!==e;/* @__PURE__ */
92592
+ return jsxRuntimeExports.jsx(CellWithIcon$1,{children:/* @__PURE__ */jsxRuntimeExports.jsx(Tooltip$6,{arrow:!0,display:"block",placement:"bottom",style:{width:"fit-content"},title:n?e:"",children:/* @__PURE__ */jsxRuntimeExports.jsx(TruncatedText$1,{children:n?e:hyphen$9})})})}case"depCategory":{if("prepaid_expenses"===t.jeScheduleType)/* @__PURE__ */
92249
92593
  return jsxRuntimeExports.jsxs(CellWithIcon$1,{children:[
92250
92594
  /* @__PURE__ */jsxRuntimeExports.jsx(IconSlot$1,{}),
92251
- /* @__PURE__ */jsxRuntimeExports.jsx(TruncatedText$1,{children:hyphen$b})]});const e=t.jeCredit.account?.accountName,n=null!=e&&""!==e;/* @__PURE__ */
92252
- return jsxRuntimeExports.jsx(CellWithIcon$1,{children:/* @__PURE__ */jsxRuntimeExports.jsx(Tooltip$6,{arrow:!0,display:"block",placement:"bottom",style:{width:"fit-content"},title:n?e:"",children:/* @__PURE__ */jsxRuntimeExports.jsx(TruncatedText$1,{children:n?e:hyphen$b})})})}case"scheduleCategory":{const e=isAccruedScheduleRow(t)?void 0:t.baseTransaction.account.accountName,n=null!=e&&""!==e;/* @__PURE__ */
92253
- return jsxRuntimeExports.jsx(Tooltip$6,{arrow:!0,display:"block",placement:"bottom",style:{width:"fit-content"},title:n?e:"",children:/* @__PURE__ */jsxRuntimeExports.jsx(TruncatedText$1,{children:n?e:hyphen$b})})}case"startMonth":{const e=t.startDate?.format(dateFormat$j.visual.MMMCommaYYYYFormat);return null!=e?/* @__PURE__ */jsxRuntimeExports.jsx(TruncatedText$1,{children:e}):/* @__PURE__ */jsxRuntimeExports.jsx(TruncatedText$1,{children:hyphen$b})}case"type":{const e=scheduleTypes$1[t.jeScheduleType??"prepaid_expenses"];/* @__PURE__ */
92254
- return jsxRuntimeExports.jsx(StyledCapsule,{label:e})}case"amortizationPeriod":{const e=null!=t.period?`${t.period} ${1===t.period?month.slice(0,-1):month}`:hyphen$b;/* @__PURE__ */
92255
- return jsxRuntimeExports.jsx(CellWithIcon$1,{children:/* @__PURE__ */jsxRuntimeExports.jsx(TruncatedText$1,{children:e})})}case"transactionDate":{const e=t.createTime?.format(dateFormat$j.visual.MMMDCommaYYYYformat);return null!=e?/* @__PURE__ */jsxRuntimeExports.jsx(TruncatedText$1,{children:e}):/* @__PURE__ */jsxRuntimeExports.jsx(TruncatedText$1,{children:hyphen$b})}case"jePostingDate":{const e=getJEPostingDateText(t,hyphen$b);/* @__PURE__ */
92256
- return jsxRuntimeExports.jsx(CellWithIcon$1,{children:/* @__PURE__ */jsxRuntimeExports.jsx(TruncatedText$1,{children:e})})}case"remainingMonths":{const e=getRemainingMonthsText(t,hyphen$b);/* @__PURE__ */
92595
+ /* @__PURE__ */jsxRuntimeExports.jsx(TruncatedText$1,{children:hyphen$9})]});const e=t.jeCredit.account?.accountName,n=null!=e&&""!==e;/* @__PURE__ */
92596
+ return jsxRuntimeExports.jsx(CellWithIcon$1,{children:/* @__PURE__ */jsxRuntimeExports.jsx(Tooltip$6,{arrow:!0,display:"block",placement:"bottom",style:{width:"fit-content"},title:n?e:"",children:/* @__PURE__ */jsxRuntimeExports.jsx(TruncatedText$1,{children:n?e:hyphen$9})})})}case"scheduleCategory":{const e=isAccruedScheduleRow(t)?void 0:t.baseTransaction.account.accountName,n=null!=e&&""!==e;/* @__PURE__ */
92597
+ return jsxRuntimeExports.jsx(Tooltip$6,{arrow:!0,display:"block",placement:"bottom",style:{width:"fit-content"},title:n?e:"",children:/* @__PURE__ */jsxRuntimeExports.jsx(TruncatedText$1,{children:n?e:hyphen$9})})}case"startMonth":{const e=t.startDate?.format(dateFormat$j.visual.MMMCommaYYYYFormat);return null!=e?/* @__PURE__ */jsxRuntimeExports.jsx(TruncatedText$1,{children:e}):/* @__PURE__ */jsxRuntimeExports.jsx(TruncatedText$1,{children:hyphen$9})}case"type":{const e=scheduleTypes$1[t.jeScheduleType??"prepaid_expenses"];/* @__PURE__ */
92598
+ return jsxRuntimeExports.jsx(StyledCapsule,{label:e})}case"amortizationPeriod":{const e=null!=t.period?`${t.period} ${1===t.period?month.slice(0,-1):month}`:hyphen$9;/* @__PURE__ */
92599
+ return jsxRuntimeExports.jsx(CellWithIcon$1,{children:/* @__PURE__ */jsxRuntimeExports.jsx(TruncatedText$1,{children:e})})}case"transactionDate":{const e=t.createTime?.format(dateFormat$j.visual.MMMDCommaYYYYformat);return null!=e?/* @__PURE__ */jsxRuntimeExports.jsx(TruncatedText$1,{children:e}):/* @__PURE__ */jsxRuntimeExports.jsx(TruncatedText$1,{children:hyphen$9})}case"jePostingDate":{const e=getJEPostingDateText(t,hyphen$9);/* @__PURE__ */
92600
+ return jsxRuntimeExports.jsx(CellWithIcon$1,{children:/* @__PURE__ */jsxRuntimeExports.jsx(TruncatedText$1,{children:e})})}case"remainingMonths":{const e=getRemainingMonthsText(t,hyphen$9);/* @__PURE__ */
92257
92601
  return jsxRuntimeExports.jsx(TruncatedText$1,{style:{textAlign:"center"},children:e})}case"runningBalance":{const e="balanceAsOfToday"in t?t.balanceAsOfToday:void 0;if(null==e)/* @__PURE__ */
92258
- return jsxRuntimeExports.jsx(TruncatedText$1,{children:hyphen$b});const n=amountToString("0,0.[00]",toAmount(e.amount,currency$4.currencyCode,currency$4.currencySymbol));return null!=n?/* @__PURE__ */jsxRuntimeExports.jsx(TruncatedText$1,{children:n}):/* @__PURE__ */jsxRuntimeExports.jsx(TruncatedText$1,{children:hyphen$b})}case"totalAmount":{const e=amountToString("0,0.[00]",toAmount(isAccruedScheduleRow(t)?t.recurringAmount.amount:t.baseTransaction.amount.amount,currency$4.currencyCode,currency$4.currencySymbol));/* @__PURE__ */
92259
- return jsxRuntimeExports.jsx(Tooltip$6,{arrow:!0,display:"block",placement:"bottom",style:{width:"fit-content"},title:e??"",children:null!=e?/* @__PURE__ */jsxRuntimeExports.jsx(TruncatedText$1,{children:e}):/* @__PURE__ */jsxRuntimeExports.jsx(TruncatedText$1,{children:hyphen$b})})}case"createdBy":{const e=t.createdByUser;/* @__PURE__ */
92602
+ return jsxRuntimeExports.jsx(TruncatedText$1,{children:hyphen$9});const n=amountToString("0,0.[00]",toAmount(e.amount,currency$4.currencyCode,currency$4.currencySymbol));return null!=n?/* @__PURE__ */jsxRuntimeExports.jsx(TruncatedText$1,{children:n}):/* @__PURE__ */jsxRuntimeExports.jsx(TruncatedText$1,{children:hyphen$9})}case"totalAmount":{const e=amountToString("0,0.[00]",toAmount(isAccruedScheduleRow(t)?t.recurringAmount.amount:t.baseTransaction.amount.amount,currency$4.currencyCode,currency$4.currencySymbol));/* @__PURE__ */
92603
+ return jsxRuntimeExports.jsx(Tooltip$6,{arrow:!0,display:"block",placement:"bottom",style:{width:"fit-content"},title:e??"",children:null!=e?/* @__PURE__ */jsxRuntimeExports.jsx(TruncatedText$1,{children:e}):/* @__PURE__ */jsxRuntimeExports.jsx(TruncatedText$1,{children:hyphen$9})})}case"createdBy":{const e=t.createdByUser;/* @__PURE__ */
92260
92604
  return jsxRuntimeExports.jsx(JEScheduleCreatedBy,{cotData:buildJEScheduleSummaryCOTData(t),displayName:e?.firstName??e?.email,isAiAccountant:isAiAccountantSchedule(t),photoUrl:e?.photo?.toString()})}case"lifecycle":/* @__PURE__ */
92261
92605
  return jsxRuntimeExports.jsx(JEScheduleLifecycle,{endDate:t.endDate,posted:t.postedCount,scheduleType:t.jeScheduleType??"prepaid_expenses",total:t.lifecycleTotal});case"action":/* @__PURE__ */
92262
92606
  return jsxRuntimeExports.jsxs(ActionContainer$1,{className:"item-value-container",children:[
@@ -92289,24 +92633,24 @@ return jsxRuntimeExports.jsxs(ActionContainer$1,{className:"item-value-container
92289
92633
  align-items: center;
92290
92634
  justify-content: center;
92291
92635
  gap: ${Space.sp2};
92292
- `,{common:{scheduleTypes:scheduleTypes,currency:currency$3,strings:{hyphen:hyphen$a,rightArrow:rightArrow},texts:{revert:revertText$1}},dateFormat:dateFormat$i}=appLocale.getLocalizedStrings(),JEScheduleReadOnlyListRow=({dataListColumnKey:e,isActionInProgress:t,onIgnoreOneTimeAccrual:n,onReviewOneTimeAccrual:o,onRevertOneTimeAccrual:i,forcePostedLabel:r,revertStatus:a,onRevertJeSchedule:s,row:l})=>{if(isOneTimeAccrualRow(l))/* @__PURE__ */
92636
+ `,{common:{scheduleTypes:scheduleTypes,currency:currency$3,strings:{hyphen:hyphen$8,rightArrow:rightArrow},texts:{revert:revertText$1}},dateFormat:dateFormat$i}=appLocale.getLocalizedStrings(),JEScheduleReadOnlyListRow=({dataListColumnKey:e,isActionInProgress:t,onIgnoreOneTimeAccrual:n,onReviewOneTimeAccrual:o,onRevertOneTimeAccrual:i,forcePostedLabel:r,revertStatus:a,onRevertJeSchedule:s,row:l})=>{if(isOneTimeAccrualRow(l))/* @__PURE__ */
92293
92637
  return jsxRuntimeExports.jsx(JEOneTimeAccrualCell$1,{dataListColumnKey:e,isActionInProgress:t,onIgnoreOneTimeAccrual:n,onReviewOneTimeAccrual:o,row:l,onRevertOneTimeAccrual:i});switch(e){case"vendor":{const e=l.vendor.name,t=null!=e&&""!==e;/* @__PURE__ */
92294
92638
  return jsxRuntimeExports.jsxs(VendorCell$1,{children:[null!=l.vendor.logo?/* @__PURE__ */jsxRuntimeExports.jsx(EntityLogoAvatar,{photoUrl:l.vendor.logo.href,styles:{width:sp[3],height:sp[3]}}):/* @__PURE__ */jsxRuntimeExports.jsx(EntityAvatar,{name:e}),
92295
- /* @__PURE__ */jsxRuntimeExports.jsx(Tooltip$6,{arrow:!0,display:"block",placement:"bottom",style:{width:"fit-content"},title:t?e:"",children:/* @__PURE__ */jsxRuntimeExports.jsx(TruncatedText,{children:t?e:hyphen$a})})]})}case"category":{const e=l.jeDebit.account?.accountName,t=null!=e&&""!==e;/* @__PURE__ */
92296
- return jsxRuntimeExports.jsx(Tooltip$6,{arrow:!0,display:"block",placement:"bottom",style:{width:"fit-content"},title:t?e:"",children:/* @__PURE__ */jsxRuntimeExports.jsx(TruncatedText,{children:t?e:hyphen$a})})}case"class":{const e=l.jeDebit.accountingClass?.className,t=null!=e&&""!==e;/* @__PURE__ */
92297
- return jsxRuntimeExports.jsx(Tooltip$6,{arrow:!0,display:"block",placement:"bottom",style:{width:"fit-content"},title:t?e:"",children:/* @__PURE__ */jsxRuntimeExports.jsx(TruncatedText,{children:t?e:hyphen$a})})}case"depCategory":{if("prepaid_expenses"===l.jeScheduleType)/* @__PURE__ */
92639
+ /* @__PURE__ */jsxRuntimeExports.jsx(Tooltip$6,{arrow:!0,display:"block",placement:"bottom",style:{width:"fit-content"},title:t?e:"",children:/* @__PURE__ */jsxRuntimeExports.jsx(TruncatedText,{children:t?e:hyphen$8})})]})}case"category":{const e=l.jeDebit.account?.accountName,t=null!=e&&""!==e;/* @__PURE__ */
92640
+ return jsxRuntimeExports.jsx(Tooltip$6,{arrow:!0,display:"block",placement:"bottom",style:{width:"fit-content"},title:t?e:"",children:/* @__PURE__ */jsxRuntimeExports.jsx(TruncatedText,{children:t?e:hyphen$8})})}case"class":{const e=l.jeDebit.accountingClass?.className,t=null!=e&&""!==e;/* @__PURE__ */
92641
+ return jsxRuntimeExports.jsx(Tooltip$6,{arrow:!0,display:"block",placement:"bottom",style:{width:"fit-content"},title:t?e:"",children:/* @__PURE__ */jsxRuntimeExports.jsx(TruncatedText,{children:t?e:hyphen$8})})}case"depCategory":{if("prepaid_expenses"===l.jeScheduleType)/* @__PURE__ */
92298
92642
  return jsxRuntimeExports.jsxs(CellWithIcon,{children:[
92299
92643
  /* @__PURE__ */jsxRuntimeExports.jsx(IconSlot,{}),
92300
- /* @__PURE__ */jsxRuntimeExports.jsx(TruncatedText,{children:hyphen$a})]});const e=l.jeCredit.account?.accountName,t=null!=e&&""!==e;/* @__PURE__ */
92301
- return jsxRuntimeExports.jsx(CellWithIcon,{children:/* @__PURE__ */jsxRuntimeExports.jsx(Tooltip$6,{arrow:!0,display:"block",placement:"bottom",style:{width:"fit-content"},title:t?e:"",children:/* @__PURE__ */jsxRuntimeExports.jsx(TruncatedText,{children:t?e:hyphen$a})})})}case"scheduleCategory":{const e=isAccruedScheduleRow(l)?void 0:l.baseTransaction.account.accountName,t=null!=e&&""!==e;/* @__PURE__ */
92302
- return jsxRuntimeExports.jsx(Tooltip$6,{arrow:!0,display:"block",placement:"bottom",style:{width:"fit-content"},title:t?e:"",children:/* @__PURE__ */jsxRuntimeExports.jsx(TruncatedText,{children:t?e:hyphen$a})})}case"transactionDate":{const e=l.createTime?.format(dateFormat$i.visual.MMMDCommaYYYYformat);return null!=e?/* @__PURE__ */jsxRuntimeExports.jsx(TruncatedText,{children:e}):/* @__PURE__ */jsxRuntimeExports.jsx(TruncatedText,{children:hyphen$a})}case"type":{if(null==l.jeScheduleType)/* @__PURE__ */
92303
- return jsxRuntimeExports.jsx(TruncatedText,{children:hyphen$a});const e=scheduleTypes[l.jeScheduleType];/* @__PURE__ */
92644
+ /* @__PURE__ */jsxRuntimeExports.jsx(TruncatedText,{children:hyphen$8})]});const e=l.jeCredit.account?.accountName,t=null!=e&&""!==e;/* @__PURE__ */
92645
+ return jsxRuntimeExports.jsx(CellWithIcon,{children:/* @__PURE__ */jsxRuntimeExports.jsx(Tooltip$6,{arrow:!0,display:"block",placement:"bottom",style:{width:"fit-content"},title:t?e:"",children:/* @__PURE__ */jsxRuntimeExports.jsx(TruncatedText,{children:t?e:hyphen$8})})})}case"scheduleCategory":{const e=isAccruedScheduleRow(l)?void 0:l.baseTransaction.account.accountName,t=null!=e&&""!==e;/* @__PURE__ */
92646
+ return jsxRuntimeExports.jsx(Tooltip$6,{arrow:!0,display:"block",placement:"bottom",style:{width:"fit-content"},title:t?e:"",children:/* @__PURE__ */jsxRuntimeExports.jsx(TruncatedText,{children:t?e:hyphen$8})})}case"transactionDate":{const e=l.createTime?.format(dateFormat$i.visual.MMMDCommaYYYYformat);return null!=e?/* @__PURE__ */jsxRuntimeExports.jsx(TruncatedText,{children:e}):/* @__PURE__ */jsxRuntimeExports.jsx(TruncatedText,{children:hyphen$8})}case"type":{if(null==l.jeScheduleType)/* @__PURE__ */
92647
+ return jsxRuntimeExports.jsx(TruncatedText,{children:hyphen$8});const e=scheduleTypes[l.jeScheduleType];/* @__PURE__ */
92304
92648
  return jsxRuntimeExports.jsx(StyledCapsule,{label:e})}case"memo":{const e=isAccruedScheduleRow(l)?l.memo:l.baseTransaction.memo;return null!=e&&""!==e?/* @__PURE__ */jsxRuntimeExports.jsx(Tooltip$6,{arrow:!0,display:"inline-flex",placement:"bottom",title:e,children:/* @__PURE__ */jsxRuntimeExports.jsx(MemoIconWrapper,{children:/* @__PURE__ */jsxRuntimeExports.jsx(StyledMemoIcon$1,{})})}):/* @__PURE__ */jsxRuntimeExports.jsx(MemoIconWrapper,{children:/* @__PURE__ */jsxRuntimeExports.jsx(StyledMemoIcon$1,{})})}case"runningBalance":{const e="balanceAsOfToday"in l?l.balanceAsOfToday:void 0;if(null==e)/* @__PURE__ */
92305
- return jsxRuntimeExports.jsx(TruncatedText,{children:hyphen$a});const t=amountToString("0,0.[00]",toAmount(e.amount,currency$3.currencyCode,currency$3.currencySymbol));return null!=t?/* @__PURE__ */jsxRuntimeExports.jsx(TruncatedText,{children:t}):/* @__PURE__ */jsxRuntimeExports.jsx(TruncatedText,{children:hyphen$a})}case"monthlyAmount":{const e=null!=l.recurringAmount?amountToString("0,0.[00]",l.recurringAmount):void 0;/* @__PURE__ */
92306
- return jsxRuntimeExports.jsx(TruncatedText,{children:e??hyphen$a})}case"totalAmount":{const e=amountToString("0,0.[00]",toAmount(isAccruedScheduleRow(l)?l.recurringAmount.amount:l.baseTransaction.amount.amount,currency$3.currencyCode,currency$3.currencySymbol));/* @__PURE__ */
92307
- return jsxRuntimeExports.jsx(Tooltip$6,{arrow:!0,display:"block",placement:"bottom",style:{width:"fit-content"},title:e??"",children:null!=e?/* @__PURE__ */jsxRuntimeExports.jsx(TruncatedText,{children:e}):/* @__PURE__ */jsxRuntimeExports.jsx(TruncatedText,{children:hyphen$a})})}case"createdBy":{const e=l.createdByUser;/* @__PURE__ */
92649
+ return jsxRuntimeExports.jsx(TruncatedText,{children:hyphen$8});const t=amountToString("0,0.[00]",toAmount(e.amount,currency$3.currencyCode,currency$3.currencySymbol));return null!=t?/* @__PURE__ */jsxRuntimeExports.jsx(TruncatedText,{children:t}):/* @__PURE__ */jsxRuntimeExports.jsx(TruncatedText,{children:hyphen$8})}case"monthlyAmount":{const e=null!=l.recurringAmount?amountToString("0,0.[00]",l.recurringAmount):void 0;/* @__PURE__ */
92650
+ return jsxRuntimeExports.jsx(TruncatedText,{children:e??hyphen$8})}case"totalAmount":{const e=amountToString("0,0.[00]",toAmount(isAccruedScheduleRow(l)?l.recurringAmount.amount:l.baseTransaction.amount.amount,currency$3.currencyCode,currency$3.currencySymbol));/* @__PURE__ */
92651
+ return jsxRuntimeExports.jsx(Tooltip$6,{arrow:!0,display:"block",placement:"bottom",style:{width:"fit-content"},title:e??"",children:null!=e?/* @__PURE__ */jsxRuntimeExports.jsx(TruncatedText,{children:e}):/* @__PURE__ */jsxRuntimeExports.jsx(TruncatedText,{children:hyphen$8})})}case"createdBy":{const e=l.createdByUser;/* @__PURE__ */
92308
92652
  return jsxRuntimeExports.jsx(JEScheduleCreatedBy,{cotData:buildJEScheduleSummaryCOTData(l),displayName:e?.firstName??e?.email,isAiAccountant:isAiAccountantSchedule(l),photoUrl:e?.photo?.toString()})}case"lifecycle":/* @__PURE__ */
92309
- return jsxRuntimeExports.jsx(JEScheduleLifecycle,{endDate:l.endDate,forcePostedLabel:r,posted:l.postedCount,scheduleType:l.jeScheduleType??"prepaid_expenses",total:l.lifecycleTotal});case"period":{const e=l.startDate?.format(dateFormat$i.visual.MMMCommaYYYYFormat),t=l.endDate?.format(dateFormat$i.visual.MMMCommaYYYYFormat);return null==e||null==t?/* @__PURE__ */jsxRuntimeExports.jsx(TruncatedText,{children:hyphen$a}):/* @__PURE__ */jsxRuntimeExports.jsxs(StackedPeriodCell,{children:[
92653
+ return jsxRuntimeExports.jsx(JEScheduleLifecycle,{endDate:l.endDate,forcePostedLabel:r,posted:l.postedCount,scheduleType:l.jeScheduleType??"prepaid_expenses",total:l.lifecycleTotal});case"period":{const e=l.startDate?.format(dateFormat$i.visual.MMMCommaYYYYFormat),t=l.endDate?.format(dateFormat$i.visual.MMMCommaYYYYFormat);return null==e||null==t?/* @__PURE__ */jsxRuntimeExports.jsx(TruncatedText,{children:hyphen$8}):/* @__PURE__ */jsxRuntimeExports.jsxs(StackedPeriodCell,{children:[
92310
92654
  /* @__PURE__ */jsxRuntimeExports.jsx(TruncatedText,{children:e}),
92311
92655
  /* @__PURE__ */jsxRuntimeExports.jsx(MutedTruncatedText,{children:`${rightArrow} ${t}`})]})}case"action":{if("revert"!==resolveScheduleDecision({jeScheduleId:l.jeScheduleId,postedCount:l.postedCount,status:l.status.code}))return null;const e=isAccruedScheduleRow(l)?l.jeAccruedScheduleKey:l.jeScheduleTransactionKey;/* @__PURE__ */
92312
92656
  return jsxRuntimeExports.jsx(ActionContainer,{className:"item-value-container",children:/* @__PURE__ */jsxRuntimeExports.jsx(Button$4,{"data-testid":generateDataTestId("je-schedule-revert-button",l.jeScheduleId),label:revertText$1,size:"small",variant:"secondary",reverseSpinnerColor:!1,loading:"In-Progress"===a?.fetchState,disabled:"In-Progress"===a?.fetchState,onClick:()=>{null!=l.jeScheduleId&&null!=l.jeScheduleType&&null!=s&&s(l.jeScheduleId,e,l.jeScheduleType)}})})}default:return null}},JEScheduleReadOnlyListRow$1=memo$c(JEScheduleReadOnlyListRow),VendorCell$1=styled$2.div`
@@ -92929,13 +93273,13 @@ return jsxRuntimeExports.jsxs(BaseTransactionResultRow,{type:"button",onClick:()
92929
93273
  color: ${Colors.brandColorOpalDark};
92930
93274
  `,AiAccountantInsightText=styled$2(SmallMedium)`
92931
93275
  color: ${Colors.brandColorOpalDark};
92932
- `,{expenseAutomation:{jeSchedules:jeScheduleStrings$3}}=appLocale.getLocalizedStrings(),previewStrings$4=jeScheduleStrings$3.newSchedule.journalEntryPreview,JEJournalEntryPreview=({amount:e,creditAccountName:t,debitAccountName:n,reversalDescription:o,debitClassName:i,detailRows:r,showTitle:a=!0})=>/* @__PURE__ */jsxRuntimeExports.jsxs(PreviewCard$1,{children:[a&&/* @__PURE__ */jsxRuntimeExports.jsx(PreviewTitle$1,{children:previewStrings$4.title}),
93276
+ `,{expenseAutomation:{jeSchedules:jeScheduleStrings$3}}=appLocale.getLocalizedStrings(),previewStrings$3=jeScheduleStrings$3.newSchedule.journalEntryPreview,JEJournalEntryPreview=({amount:e,creditAccountName:t,debitAccountName:n,reversalDescription:o,debitClassName:i,detailRows:r,showTitle:a=!0})=>/* @__PURE__ */jsxRuntimeExports.jsxs(PreviewCard$1,{children:[a&&/* @__PURE__ */jsxRuntimeExports.jsx(PreviewTitle$1,{children:previewStrings$3.title}),
92933
93277
  /* @__PURE__ */jsxRuntimeExports.jsxs(EntryLine,{children:[
92934
- /* @__PURE__ */jsxRuntimeExports.jsx(SideLabel,{children:previewStrings$4.debit}),
93278
+ /* @__PURE__ */jsxRuntimeExports.jsx(SideLabel,{children:previewStrings$3.debit}),
92935
93279
  /* @__PURE__ */jsxRuntimeExports.jsxs(AccountName$1,{children:[n,null!=i&&""!==i&&/* @__PURE__ */jsxRuntimeExports.jsxs(ClassName,{children:[" · ",i]})]}),
92936
93280
  /* @__PURE__ */jsxRuntimeExports.jsx(EntryAmount$1,{children:e})]}),
92937
93281
  /* @__PURE__ */jsxRuntimeExports.jsxs(EntryLine,{children:[
92938
- /* @__PURE__ */jsxRuntimeExports.jsx(SideLabel,{children:previewStrings$4.credit}),
93282
+ /* @__PURE__ */jsxRuntimeExports.jsx(SideLabel,{children:previewStrings$3.credit}),
92939
93283
  /* @__PURE__ */jsxRuntimeExports.jsx(AccountName$1,{children:t}),
92940
93284
  /* @__PURE__ */jsxRuntimeExports.jsx(EntryAmount$1,{children:e})]}),null!=r&&r.length>0&&/* @__PURE__ */jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[
92941
93285
  /* @__PURE__ */jsxRuntimeExports.jsx(Divider$2,{}),r.map(e=>/* @__PURE__ */jsxRuntimeExports.jsxs(DetailRow$4,{children:[
@@ -92990,27 +93334,27 @@ return jsxRuntimeExports.jsxs(BaseTransactionResultRow,{type:"button",onClick:()
92990
93334
  color: ${e=>e.theme.colors.champion};
92991
93335
  `,ReversalNote=styled$2(SmallMedium)`
92992
93336
  color: ${e=>e.theme.colors.hero};
92993
- `,{expenseAutomation:{jeSchedules:jeScheduleStrings$2}}=appLocale.getLocalizedStrings(),previewStrings$3=jeScheduleStrings$2.newSchedule.schedulePreview,JESchedulePreview=({eachEntry:e,posts:t,totalCommitted:n,window:o,accountingClassName:i})=>/* @__PURE__ */jsxRuntimeExports.jsxs(PreviewCard,{children:[
92994
- /* @__PURE__ */jsxRuntimeExports.jsx(PreviewTitle,{children:previewStrings$3.title}),
93337
+ `,{expenseAutomation:{jeSchedules:jeScheduleStrings$2}}=appLocale.getLocalizedStrings(),previewStrings$2=jeScheduleStrings$2.newSchedule.schedulePreview,JESchedulePreview=({eachEntry:e,posts:t,totalCommitted:n,window:o,accountingClassName:i})=>/* @__PURE__ */jsxRuntimeExports.jsxs(PreviewCard,{children:[
93338
+ /* @__PURE__ */jsxRuntimeExports.jsx(PreviewTitle,{children:previewStrings$2.title}),
92995
93339
  /* @__PURE__ */jsxRuntimeExports.jsxs(PreviewRow,{children:[
92996
- /* @__PURE__ */jsxRuntimeExports.jsx(RowLabel$2,{children:previewStrings$3.posts}),
93340
+ /* @__PURE__ */jsxRuntimeExports.jsx(RowLabel$2,{children:previewStrings$2.posts}),
92997
93341
  /* @__PURE__ */jsxRuntimeExports.jsx(RowValue$2,{children:t})]}),
92998
93342
  /* @__PURE__ */jsxRuntimeExports.jsxs(PreviewRow,{children:[
92999
- /* @__PURE__ */jsxRuntimeExports.jsx(RowLabel$2,{children:previewStrings$3.window}),
93343
+ /* @__PURE__ */jsxRuntimeExports.jsx(RowLabel$2,{children:previewStrings$2.window}),
93000
93344
  /* @__PURE__ */jsxRuntimeExports.jsx(RowValue$2,{children:o})]}),
93001
93345
  /* @__PURE__ */jsxRuntimeExports.jsxs(PreviewRow,{children:[
93002
- /* @__PURE__ */jsxRuntimeExports.jsx(RowLabel$2,{children:previewStrings$3.totalCommitted}),
93346
+ /* @__PURE__ */jsxRuntimeExports.jsx(RowLabel$2,{children:previewStrings$2.totalCommitted}),
93003
93347
  /* @__PURE__ */jsxRuntimeExports.jsx(RowValue$2,{children:n})]}),
93004
93348
  /* @__PURE__ */jsxRuntimeExports.jsxs(PreviewRow,{children:[
93005
- /* @__PURE__ */jsxRuntimeExports.jsx(RowLabel$2,{children:previewStrings$3.eachEntry}),
93349
+ /* @__PURE__ */jsxRuntimeExports.jsx(RowLabel$2,{children:previewStrings$2.eachEntry}),
93006
93350
  /* @__PURE__ */jsxRuntimeExports.jsx(RowValue$2,{children:e})]}),null!=i&&""!==i&&/* @__PURE__ */jsxRuntimeExports.jsxs(PreviewRow,{children:[
93007
- /* @__PURE__ */jsxRuntimeExports.jsx(RowLabel$2,{children:previewStrings$3.class}),
93351
+ /* @__PURE__ */jsxRuntimeExports.jsx(RowLabel$2,{children:previewStrings$2.class}),
93008
93352
  /* @__PURE__ */jsxRuntimeExports.jsx(RowValue$2,{children:i})]}),
93009
93353
  /* @__PURE__ */jsxRuntimeExports.jsx(Divider$1,{}),
93010
93354
  /* @__PURE__ */jsxRuntimeExports.jsxs(AutoPostNote,{children:[
93011
93355
  /* @__PURE__ */jsxRuntimeExports.jsx(StyledAiIcon$1,{}),
93012
93356
  /* @__PURE__ */jsxRuntimeExports.jsxs(AutoPostText,{children:[
93013
- /* @__PURE__ */jsxRuntimeExports.jsx(SmallSemiBoldSp,{children:previewStrings$3.autoPostPrefix}),previewStrings$3.autoPostSuffix]})]})]}),PreviewCard=styled$2.div`
93357
+ /* @__PURE__ */jsxRuntimeExports.jsx(SmallSemiBoldSp,{children:previewStrings$2.autoPostPrefix}),previewStrings$2.autoPostSuffix]})]})]}),PreviewCard=styled$2.div`
93014
93358
  display: flex;
93015
93359
  flex-direction: column;
93016
93360
  gap: ${Space.sp2};
@@ -93303,11 +93647,11 @@ return jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[
93303
93647
  height: 100%;
93304
93648
  min-width: 0;
93305
93649
  background-color: ${e=>e.theme.colors.grey4};
93306
- `;function JESchedulePage({accountListNestedAccountHierarchy:e,baseTransactionSearchFetchState:t,baseTransactionSearchResults:n,classListNestedAccountHierarchy:o,expenseAutomationViewSelector:i,currentFooterFormId:r,isAccountingClassesEnabled:a,isCreatingNewSchedule:s,newScheduleSaveStatus:l,allDepreciationAccountListNestedAccountHierarchy:c,closeMonth:d,initialScheduleDetailsMode:p,initialScheduleType:u,newAccrualAccountsView:m,onCreateAccruedSchedule:h,onCreateOneTimeAccrual:g,setResetJeAccountSettingsForm:x,vendorSearchAutoCompleteData:f,onJESchedulesFormDataChange:y,onPostJESchedule:S,handleJeScheduleClick:C,onOneTimeAccrualClick:$,onOneTimeAccrualFeedback:b,onJeAccountSettingsChange:v,onSaveJeAccountSettingsClick:E,onSaveSchedule:w,onScheduleTypeChange:R,onSearchBaseTransaction:A,onViewTransaction:j,newScheduleLocalData:T,initialSelectedBaseTransaction:I,isAccrualEnabled:k,onNewScheduleFormChange:L,ignoreRecommendedJeSchedule:D,vendorSearchAutoCompleteActions:_,isMatchPanelOpen:P,isSchedulePanelOpen:B,matchPanelContent:M,schedulePanelContent:O,schedulePendingDiscardConfirmation:F,setCurrentFooterFormId:N,setIsCreatingNewSchedule:z,setIsJeAccountSettingsOpened:H,onRevertJeSchedule:V,onToggleCreatedGroupCollapsed:W,onTogglePendingGroupCollapsed:U,onUpdateJEScheduleTypeFilter:G,onUpdateJESchedulesUIState:q,onClearMatchNewModal:Q,onCloseMatchNewModal:Y,onIgnoreMatchSuggestion:K,onMatchAndReverse:Z,onOpenMatch:X,onOpenMatchNewModal:J,onSearchMatchAccruals:ee,onSearchMatchTransactions:te,onUndoReversal:ne,onUpdateActualMatchingUIState:oe}){const{jeSchedules:ie}=i,re=useCallback(()=>{z(!1),"schedules"!==ie.uiState.selectedPageTab&&q({selectedPageTab:"schedules"})},[ie.uiState.selectedPageTab,q,z]),ae={isAccountingClassesEnabled:a,setCurrentFooterFormId:N,handleJeScheduleClick:C,onOneTimeAccrualClick:$,onOneTimeAccrualFeedback:b,ignoreRecommendedJeSchedule:D,jeSchedules:ie,onJESchedulesFormDataChange:y,onPostJESchedule:S,onRevertJeSchedule:V,onToggleCreatedGroupCollapsed:W,onTogglePendingGroupCollapsed:U,onUpdateJEScheduleTypeFilter:G,onUpdateJESchedulesUIState:q,vendorSearchAutoCompleteActions:_,vendorSearchAutoCompleteData:f,isPanelOpen:B,panelContent:O,pendingDiscardConfirmation:F};if(isActualMatchingPageTab(ie.uiState.selectedPageTab))/* @__PURE__ */
93307
- return jsxRuntimeExports.jsx(ActualMatchingPage,{actualMatching:getActualMatchingFromSelector(i),isMatchPanelOpen:P,matchPanelContent:M,selectedPeriod:i.selectedPeriod,onClearMatchNewModal:Q??(()=>{}),onCloseMatchNewModal:Y??(()=>{}),onIgnoreMatchSuggestion:K??(()=>{}),onMatchAndReverse:Z??(()=>{}),onOpenMatch:X??(()=>{}),onOpenMatchNewModal:J??(()=>{}),onSearchMatchAccruals:ee??(()=>{}),onSearchMatchTransactions:te??(()=>{}),onUndoReversal:ne,onUpdateActualMatchingUIState:oe});if(!ie.hasLoadedForSelectedTab||!ie.accountSettingsView.hasLoaded)return"existing_schedules"===ie.uiState.selectedPageTab?/* @__PURE__ */jsxRuntimeExports.jsx(JEExistingSchedulesTabSkeleton,{isAccountingClassesEnabled:a}):/* @__PURE__ */jsxRuntimeExports.jsx(JESchedulesTabSkeleton,{isAccountingClassesEnabled:a});if("Completed"===ie.accountSettingsView.fetchState&&0===ie.accountSettingsView.accountSettingsLocalData.previousPrepaidExpensesAccount.length&&0===ie.accountSettingsView.accountSettingsLocalData.previousFixedAssetsAccount.length)/* @__PURE__ */
93308
- return jsxRuntimeExports.jsx(JEScheduleAccountSettings,{setIsJeAccountSettingsOpened:H,setResetJeAccountSettingsForm:x,currentFooterFormId:r,onJeAccountSettingsChange:v,onSaveJeAccountSettingsClick:E,accountSettings:ie.accountSettingsView,setCurrentFooterFormId:N});const se=/* @__PURE__ */jsxRuntimeExports.jsx(NewJEScheduleDrawer,{isOpen:s,closeMonth:d,accountListNestedAccountHierarchy:e,baseTransactionSearchFetchState:t,baseTransactionSearchResults:n,classListNestedAccountHierarchy:o,isAccountingClassesEnabled:a,newScheduleSaveStatus:l,allDepreciationAccountListNestedAccountHierarchy:c,initialScheduleDetailsMode:p,initialScheduleType:u,newAccrualAccountsView:m,vendorSearchAutoCompleteActions:_,vendorSearchAutoCompleteData:f,onCancel:()=>z(!1),onCreateAccruedSchedule:h,onCreateOneTimeAccrual:g,onCreationComplete:re,onSaveSchedule:w,onScheduleTypeChange:R,onSearchBaseTransaction:A,onViewTransaction:j,isAccrualEnabled:k,newScheduleLocalData:T,initialSelectedBaseTransaction:I,onNewScheduleFormChange:L});return"existing_schedules"===ie.uiState.selectedPageTab?/* @__PURE__ */jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[
93309
- /* @__PURE__ */jsxRuntimeExports.jsx(JEExistingSection,{isPanelOpen:B,panelContent:O,pendingDiscardConfirmation:F,handleJeScheduleClick:C,onOneTimeAccrualClick:$,onOneTimeAccrualFeedback:b,ignoreRecommendedJeSchedule:D,isAccountingClassesEnabled:a,jeSchedules:ie,onJESchedulesFormDataChange:y,onPostJESchedule:S,onUpdateJEScheduleTypeFilter:G,setCurrentFooterFormId:N,vendorSearchAutoCompleteActions:_,vendorSearchAutoCompleteData:f}),se]}):/* @__PURE__ */jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[
93310
- /* @__PURE__ */jsxRuntimeExports.jsx(JESchedulesSection,{...ae}),se]})}const MISSING_RECEIPTS_LIST_EMPTY_TABLE_COL_PCTS=[15,22,23,16,15,9],MissingReceiptsListEmptyTable=e=>/* @__PURE__ */jsxRuntimeExports.jsx(Container$t,{children:/* @__PURE__ */jsxRuntimeExports.jsx(ListTableSkeleton,{colPcts:MISSING_RECEIPTS_LIST_EMPTY_TABLE_COL_PCTS})}),Container$t=styled$2.div``,DEFAULT_LIST_ITEM_HEIGHT_REGULAR=48,DEFAULT_LIST_HEADER_HEIGHT_REGULAR$1=32,OVERSCAN_COUNT=1,MISSING_RECEIPTS_COLUMN_NON_SORT_KEYS=["receipts"],toMissingReceiptsColumnNonSortableKeyStrict=e=>stringToUnionStrict(e,MISSING_RECEIPTS_COLUMN_NON_SORT_KEYS),{common:{texts:{vendor:vendor$4,amount:amount$6,receipts:receipts$1,category:category$3,date:date$4,class:classText$2}}}=appLocale.getLocalizedStrings(),missingReceiptsVendorHeaderItem={key:"vendor",value:vendor$4,sortOrder:"ascending",width:new ResponsiveSized(25,25)},missingReceiptsCategoryHeaderItem={key:"category",value:category$3,sortOrder:"ascending",width:new ResponsiveSized(21,21)},missingReceiptsClassHeaderItem={key:"class",value:classText$2,sortOrder:"ascending",width:new ResponsiveSized(20,20)},missingReceiptsDateHeaderItem={key:"date",value:date$4,sortOrder:"descending",width:new ResponsiveSized(8,8)},missingReceiptsLabelHeaderItem={key:"receipts",value:receipts$1,sortOrder:"descending",width:new ResponsiveSized(14,14)},missingReceiptsAmountHeaderItem={key:"amount",value:amount$6,sortOrder:"ascending",width:new ResponsiveSized(12,12)};function getMissingReceiptsHeaderItemsData(e){return[missingReceiptsVendorHeaderItem,missingReceiptsCategoryHeaderItem,...e?[missingReceiptsClassHeaderItem]:[],missingReceiptsLabelHeaderItem,missingReceiptsDateHeaderItem,missingReceiptsAmountHeaderItem]}const compressedMissingReceiptsHeaderItemsData=[{...missingReceiptsVendorHeaderItem,width:new ResponsiveSized(65,65)},{...missingReceiptsAmountHeaderItem,width:new ResponsiveSized(30,30)}],defaultSortOption$1={sortKey:"date",sortOrder:"descending"},MissingReceiptsHeader=({isAccountingClassesEnabled:e,sortConfig:t,isDisabled:n,onColumnSortConfigChanged:o})=>{const i=useWindowSizeContext(),r=useQuickViewMode(),a=r?compressedMissingReceiptsHeaderItemsData:getMissingReceiptsHeaderItemsData(e),[s,l]=useState(a);useEffect(()=>{const e=[...a];for(const n of e)n.key===t.sortKey?n.sortOrder=t.sortOrder:n.sortOrder="ascending";l(e)},[t.sortKey,t.sortOrder,r]);const c=(e,n)=>{let i=n;t.sortKey===e&&(i="ascending"===n?"descending":"ascending"),o(e,i)};/* @__PURE__ */
93650
+ `;function JESchedulePage({accountListNestedAccountHierarchy:e,baseTransactionSearchFetchState:t,baseTransactionSearchResults:n,classListNestedAccountHierarchy:o,expenseAutomationViewSelector:i,currentFooterFormId:r,isAccountingClassesEnabled:a,isCreatingNewSchedule:s,newScheduleSaveStatus:l,allDepreciationAccountListNestedAccountHierarchy:c,closeMonth:d,initialScheduleDetailsMode:p,initialScheduleType:u,newAccrualAccountsView:m,onCreateAccruedSchedule:h,onCreateOneTimeAccrual:g,setResetJeAccountSettingsForm:x,vendorSearchAutoCompleteData:f,onJESchedulesFormDataChange:y,onPostJESchedule:S,handleJeScheduleClick:C,onOneTimeAccrualClick:$,onOneTimeAccrualFeedback:b,onJeAccountSettingsChange:v,onSaveJeAccountSettingsClick:E,onSaveSchedule:w,onScheduleTypeChange:R,onSearchBaseTransaction:A,onViewTransaction:j,newScheduleLocalData:T,initialSelectedBaseTransaction:I,isAccrualEnabled:k,onNewScheduleFormChange:L,ignoreRecommendedJeSchedule:D,vendorSearchAutoCompleteActions:_,isMatchPanelOpen:P,isSchedulePanelOpen:B,matchPanelContent:M,schedulePanelContent:O,schedulePendingDiscardConfirmation:F,setCurrentFooterFormId:N,setIsCreatingNewSchedule:z,setIsJeAccountSettingsOpened:H,onRevertJeSchedule:V,onToggleCreatedGroupCollapsed:W,onTogglePendingGroupCollapsed:U,onUpdateJEScheduleTypeFilter:G,onUpdateJESchedulesUIState:q,onClearMatchNewModal:Q,onCloseMatchNewModal:Y,onIgnoreMatchSuggestion:K,onMatchAndReverse:Z,onOpenBill:X,onOpenMatch:J,onOpenMatchNewModal:ee,onSearchMatchAccruals:te,onSearchMatchTransactions:ne,onUndoReversal:oe,onUpdateActualMatchingUIState:ie}){const{jeSchedules:re}=i,ae=useCallback(()=>{z(!1),"schedules"!==re.uiState.selectedPageTab&&q({selectedPageTab:"schedules"})},[re.uiState.selectedPageTab,q,z]),se={isAccountingClassesEnabled:a,setCurrentFooterFormId:N,handleJeScheduleClick:C,onOneTimeAccrualClick:$,onOneTimeAccrualFeedback:b,ignoreRecommendedJeSchedule:D,jeSchedules:re,onJESchedulesFormDataChange:y,onPostJESchedule:S,onRevertJeSchedule:V,onToggleCreatedGroupCollapsed:W,onTogglePendingGroupCollapsed:U,onUpdateJEScheduleTypeFilter:G,onUpdateJESchedulesUIState:q,vendorSearchAutoCompleteActions:_,vendorSearchAutoCompleteData:f,isPanelOpen:B,panelContent:O,pendingDiscardConfirmation:F};if(isActualMatchingPageTab(re.uiState.selectedPageTab))/* @__PURE__ */
93651
+ return jsxRuntimeExports.jsx(ActualMatchingPage,{actualMatching:getActualMatchingFromSelector(i),isMatchPanelOpen:P,matchPanelContent:M,selectedPeriod:i.selectedPeriod,onClearMatchNewModal:Q??(()=>{}),onCloseMatchNewModal:Y??(()=>{}),onIgnoreMatchSuggestion:K??(()=>{}),onMatchAndReverse:Z??(()=>{}),onOpenBill:X,onOpenMatch:J??(()=>{}),onOpenMatchNewModal:ee??(()=>{}),onSearchMatchAccruals:te??(()=>{}),onSearchMatchTransactions:ne??(()=>{}),onUndoReversal:oe,onUpdateActualMatchingUIState:ie});if(!re.hasLoadedForSelectedTab||!re.accountSettingsView.hasLoaded)return"existing_schedules"===re.uiState.selectedPageTab?/* @__PURE__ */jsxRuntimeExports.jsx(JEExistingSchedulesTabSkeleton,{isAccountingClassesEnabled:a}):/* @__PURE__ */jsxRuntimeExports.jsx(JESchedulesTabSkeleton,{isAccountingClassesEnabled:a});if("Completed"===re.accountSettingsView.fetchState&&0===re.accountSettingsView.accountSettingsLocalData.previousPrepaidExpensesAccount.length&&0===re.accountSettingsView.accountSettingsLocalData.previousFixedAssetsAccount.length)/* @__PURE__ */
93652
+ return jsxRuntimeExports.jsx(JEScheduleAccountSettings,{setIsJeAccountSettingsOpened:H,setResetJeAccountSettingsForm:x,currentFooterFormId:r,onJeAccountSettingsChange:v,onSaveJeAccountSettingsClick:E,accountSettings:re.accountSettingsView,setCurrentFooterFormId:N});const le=/* @__PURE__ */jsxRuntimeExports.jsx(NewJEScheduleDrawer,{isOpen:s,closeMonth:d,accountListNestedAccountHierarchy:e,baseTransactionSearchFetchState:t,baseTransactionSearchResults:n,classListNestedAccountHierarchy:o,isAccountingClassesEnabled:a,newScheduleSaveStatus:l,allDepreciationAccountListNestedAccountHierarchy:c,initialScheduleDetailsMode:p,initialScheduleType:u,newAccrualAccountsView:m,vendorSearchAutoCompleteActions:_,vendorSearchAutoCompleteData:f,onCancel:()=>z(!1),onCreateAccruedSchedule:h,onCreateOneTimeAccrual:g,onCreationComplete:ae,onSaveSchedule:w,onScheduleTypeChange:R,onSearchBaseTransaction:A,onViewTransaction:j,isAccrualEnabled:k,newScheduleLocalData:T,initialSelectedBaseTransaction:I,onNewScheduleFormChange:L});return"existing_schedules"===re.uiState.selectedPageTab?/* @__PURE__ */jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[
93653
+ /* @__PURE__ */jsxRuntimeExports.jsx(JEExistingSection,{isPanelOpen:B,panelContent:O,pendingDiscardConfirmation:F,handleJeScheduleClick:C,onOneTimeAccrualClick:$,onOneTimeAccrualFeedback:b,ignoreRecommendedJeSchedule:D,isAccountingClassesEnabled:a,jeSchedules:re,onJESchedulesFormDataChange:y,onPostJESchedule:S,onUpdateJEScheduleTypeFilter:G,setCurrentFooterFormId:N,vendorSearchAutoCompleteActions:_,vendorSearchAutoCompleteData:f}),le]}):/* @__PURE__ */jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[
93654
+ /* @__PURE__ */jsxRuntimeExports.jsx(JESchedulesSection,{...se}),le]})}const MISSING_RECEIPTS_LIST_EMPTY_TABLE_COL_PCTS=[15,22,23,16,15,9],MissingReceiptsListEmptyTable=e=>/* @__PURE__ */jsxRuntimeExports.jsx(Container$t,{children:/* @__PURE__ */jsxRuntimeExports.jsx(ListTableSkeleton,{colPcts:MISSING_RECEIPTS_LIST_EMPTY_TABLE_COL_PCTS})}),Container$t=styled$2.div``,DEFAULT_LIST_ITEM_HEIGHT_REGULAR=48,DEFAULT_LIST_HEADER_HEIGHT_REGULAR$1=32,OVERSCAN_COUNT=1,MISSING_RECEIPTS_COLUMN_NON_SORT_KEYS=["receipts"],toMissingReceiptsColumnNonSortableKeyStrict=e=>stringToUnionStrict(e,MISSING_RECEIPTS_COLUMN_NON_SORT_KEYS),{common:{texts:{vendor:vendor$4,amount:amount$6,receipts:receipts$1,category:category$3,date:date$4,class:classText$2}}}=appLocale.getLocalizedStrings(),missingReceiptsVendorHeaderItem={key:"vendor",value:vendor$4,sortOrder:"ascending",width:new ResponsiveSized(25,25)},missingReceiptsCategoryHeaderItem={key:"category",value:category$3,sortOrder:"ascending",width:new ResponsiveSized(21,21)},missingReceiptsClassHeaderItem={key:"class",value:classText$2,sortOrder:"ascending",width:new ResponsiveSized(20,20)},missingReceiptsDateHeaderItem={key:"date",value:date$4,sortOrder:"descending",width:new ResponsiveSized(8,8)},missingReceiptsLabelHeaderItem={key:"receipts",value:receipts$1,sortOrder:"descending",width:new ResponsiveSized(14,14)},missingReceiptsAmountHeaderItem={key:"amount",value:amount$6,sortOrder:"ascending",width:new ResponsiveSized(12,12)};function getMissingReceiptsHeaderItemsData(e){return[missingReceiptsVendorHeaderItem,missingReceiptsCategoryHeaderItem,...e?[missingReceiptsClassHeaderItem]:[],missingReceiptsLabelHeaderItem,missingReceiptsDateHeaderItem,missingReceiptsAmountHeaderItem]}const compressedMissingReceiptsHeaderItemsData=[{...missingReceiptsVendorHeaderItem,width:new ResponsiveSized(65,65)},{...missingReceiptsAmountHeaderItem,width:new ResponsiveSized(30,30)}],defaultSortOption$1={sortKey:"date",sortOrder:"descending"},MissingReceiptsHeader=({isAccountingClassesEnabled:e,sortConfig:t,isDisabled:n,onColumnSortConfigChanged:o})=>{const i=useWindowSizeContext(),r=useQuickViewMode(),a=r?compressedMissingReceiptsHeaderItemsData:getMissingReceiptsHeaderItemsData(e),[s,l]=useState(a);useEffect(()=>{const e=[...a];for(const n of e)n.key===t.sortKey?n.sortOrder=t.sortOrder:n.sortOrder="ascending";l(e)},[t.sortKey,t.sortOrder,r]);const c=(e,n)=>{let i=n;t.sortKey===e&&(i="ascending"===n?"descending":"ascending"),o(e,i)};/* @__PURE__ */
93311
93655
  return jsxRuntimeExports.jsx(HeaderContainer$3,{windowSize:i,isQuickViewMode:r,children:s.map((e,o)=>{const a=null!=n||null!=toMissingReceiptsColumnNonSortableKeyStrict(e.key);/* @__PURE__ */
93312
93656
  return jsxRuntimeExports.jsxs(HeaderWrapper$3,{sortDataValue:t.sortKey,actualDataValue:e.key,wrapperWidth:e.width,isSortDisabled:a,windowSize:i,isQuickViewMode:r,isLastItem:o===s.length-1,style:"receipts"===e.key?{justifyContent:"center"}:void 0,children:[
93313
93657
  /* @__PURE__ */jsxRuntimeExports.jsxs(HeaderNameWrapper$3,{onClick:()=>a?null:(e=>{null==toMissingReceiptsColumnNonSortableKeyStrict(e.key)&&c(toExpenseAutomationMissingReceiptsSortKey(e.key),e.sortOrder)})(e),isSortDisabled:a,children:[
@@ -93383,12 +93727,12 @@ return jsxRuntimeExports.jsxs(HeaderWrapper$3,{sortDataValue:t.sortKey,actualDat
93383
93727
  }
93384
93728
  `,HeaderName$2=styled$2(ExtraSmallSemiBold)`
93385
93729
  display: flex;
93386
- `,{common:{strings:{underscore:underscore$2,hyphen:hyphen$9,empty:empty$6},documents:{singleFileUploadSizeErrorMessage:singleFileUploadSizeErrorMessage,multipleFileUploadSizeErrorMessage:multipleFileUploadSizeErrorMessage},snackBar:{missing_receipts_attachment:{failed:failed}},tooltips:{addMissingReceipt:addMissingReceipt}},dateFormat:dateFormat$e}=appLocale.getLocalizedStrings(),D$m={containerPaddingLeftRight:new ResponsiveSized(sp[4],sp[4]),containerPaddingTopBottom:new ResponsiveSized(sp[0],sp[0])},MissingReceiptsListRow=({transaction:e,uploadReceiptsFetchState:t,receiptUploadEndpoint:n,authParams:o,isAccountingClassesEnabled:i,selectedPeriod:r,isLastRow:a=!1,onUploadReceiptComplete:s,onMissingReceiptsRowClick:l,onUploadReceiptFetchStatus:c,onUploadReceiptAttachment:d})=>{const p=useWindowSizeContext(),u=useQuickViewMode(),m=useTheme(),h=useExpenseAutomationRowCommenting({transactionId:e.id,rowEntityType:"expense_automation.receipts.row",transactionType:e.type}),{isCommentingActive:g,rowRef:x,totalThreadCount:f,isThreadsLoading:y,handleActiveThreadClick:S,handleAddRowCommentClick:C}=h,$=useRef(null),b=useCallback(async(t,n,o,i,a)=>{c(e.id,"In-Progress"),await uploadAttachment(t,n,o,i,a).then(({uploadResponse:t,errorMessage:n})=>{null!=t?null!=t.transaction.attachments&&(d(t.transaction),setTimeout(()=>s(t.transaction,r),2e3)):c(e.id,"Error",{code:500,message:failed},n)}).catch(t=>{c(e.id,"Error",t)})},[e.id,r,d,s,c]),v=useCallback(t=>{if(null!=t.target.files){const i=t.target.files,r=[],a=[];for(let e=0;e<i.length;e++)r.push(i[e].name),a.push(i[e]);b(n,o,i[0],i[0].name,{id:e.id,type:e.type})}},[o,b,n,e.id,e.type]),E=useCallback(()=>{u||$.current?.click()},[$,u]),w=u?compressedMissingReceiptsHeaderItemsData:getMissingReceiptsHeaderItemsData(i);/* @__PURE__ */
93730
+ `,{common:{strings:{underscore:underscore$2,hyphen:hyphen$7,empty:empty$6},documents:{singleFileUploadSizeErrorMessage:singleFileUploadSizeErrorMessage,multipleFileUploadSizeErrorMessage:multipleFileUploadSizeErrorMessage},snackBar:{missing_receipts_attachment:{failed:failed}},tooltips:{addMissingReceipt:addMissingReceipt}},dateFormat:dateFormat$e}=appLocale.getLocalizedStrings(),D$m={containerPaddingLeftRight:new ResponsiveSized(sp[4],sp[4]),containerPaddingTopBottom:new ResponsiveSized(sp[0],sp[0])},MissingReceiptsListRow=({transaction:e,uploadReceiptsFetchState:t,receiptUploadEndpoint:n,authParams:o,isAccountingClassesEnabled:i,selectedPeriod:r,isLastRow:a=!1,onUploadReceiptComplete:s,onMissingReceiptsRowClick:l,onUploadReceiptFetchStatus:c,onUploadReceiptAttachment:d})=>{const p=useWindowSizeContext(),u=useQuickViewMode(),m=useTheme(),h=useExpenseAutomationRowCommenting({transactionId:e.id,rowEntityType:"expense_automation.receipts.row",transactionType:e.type}),{isCommentingActive:g,rowRef:x,totalThreadCount:f,isThreadsLoading:y,handleActiveThreadClick:S,handleAddRowCommentClick:C}=h,$=useRef(null),b=useCallback(async(t,n,o,i,a)=>{c(e.id,"In-Progress"),await uploadAttachment(t,n,o,i,a).then(({uploadResponse:t,errorMessage:n})=>{null!=t?null!=t.transaction.attachments&&(d(t.transaction),setTimeout(()=>s(t.transaction,r),2e3)):c(e.id,"Error",{code:500,message:failed},n)}).catch(t=>{c(e.id,"Error",t)})},[e.id,r,d,s,c]),v=useCallback(t=>{if(null!=t.target.files){const i=t.target.files,r=[],a=[];for(let e=0;e<i.length;e++)r.push(i[e].name),a.push(i[e]);b(n,o,i[0],i[0].name,{id:e.id,type:e.type})}},[o,b,n,e.id,e.type]),E=useCallback(()=>{u||$.current?.click()},[$,u]),w=u?compressedMissingReceiptsHeaderItemsData:getMissingReceiptsHeaderItemsData(i);/* @__PURE__ */
93387
93731
  return jsxRuntimeExports.jsxs(Container$s,{ref:x,className:"missing-receipts-row-card",$isLastRow:a,windowSize:p,isQuickViewMode:u,onClick:()=>l(e.id,e.type),"data-testid":generateDataTestId("missing-receipts-list-row",e.id),style:{position:"relative"},children:[w.map((n,o)=>{const i=`${e.id}${underscore$2}${n.key}`;switch(n.key){case"vendor":default:/* @__PURE__ */
93388
93732
  return jsxRuntimeExports.jsx(RowItemContainer$2,{windowSize:p,wrapperWidth:n.width,isQuickViewMode:u,children:/* @__PURE__ */jsxRuntimeExports.jsx(RowItem$3,{windowSize:p,isLastItem:o===w.length-1,children:/* @__PURE__ */jsxRuntimeExports.jsxs(TextContainer$2,{children:[
93389
93733
  /* @__PURE__ */jsxRuntimeExports.jsx(EntityLogoAvatarWithCustomFallback,{photoUrl:null!=e.vendorId?e.logo?.toString()??empty$6:empty$6,styles:{width:Space.sp3,height:Space.sp3,borderRadius:Space.sp2},placeholder:{width:sp[3],height:sp[3]},fallbackAvatar:/* @__PURE__ */jsxRuntimeExports.jsx(EntityAvatarContainer$2,{children:/* @__PURE__ */jsxRuntimeExports.jsx(EntityAvatar,{name:e.vendorName??e.description})})}),
93390
- /* @__PURE__ */jsxRuntimeExports.jsx(TooltipWithEllipsisText,{text:e.vendorName??e.description,itemTextStyle:{...textStyles.standardMedium.cssObject,color:"inherit"}})]})})},i);case"category":case"class":{const t=null!=e.lines&&e.lines.length>0&&null!=e.lines[0]?.account&&Boolean(e.lines[0].account.accountName)?e.lines[0].account.accountName:hyphen$9,r=null!=e.lines&&e.lines.length>0&&null!=e.lines[0]?.class&&Boolean(e.lines[0].class?.className)?e.lines[0].class?.className??hyphen$9:hyphen$9,a="category"===n.key?t:r;/* @__PURE__ */
93391
- return jsxRuntimeExports.jsx(RowItemContainer$2,{windowSize:p,wrapperWidth:n.width,isQuickViewMode:u,children:/* @__PURE__ */jsxRuntimeExports.jsx(RowItem$3,{windowSize:p,isLastItem:o===w.length-1,children:/* @__PURE__ */jsxRuntimeExports.jsx(TextContainer$2,{children:a!==hyphen$9?/* @__PURE__ */jsxRuntimeExports.jsx(TooltipWithEllipsisText,{text:a,itemTextStyle:{...textStyles.standardMedium.cssObject,color:"inherit"}}):/* @__PURE__ */jsxRuntimeExports.jsx(ItemText$2,{children:a})})})},i)}case"date":/* @__PURE__ */
93734
+ /* @__PURE__ */jsxRuntimeExports.jsx(TooltipWithEllipsisText,{text:e.vendorName??e.description,itemTextStyle:{...textStyles.standardMedium.cssObject,color:"inherit"}})]})})},i);case"category":case"class":{const t=null!=e.lines&&e.lines.length>0&&null!=e.lines[0]?.account&&Boolean(e.lines[0].account.accountName)?e.lines[0].account.accountName:hyphen$7,r=null!=e.lines&&e.lines.length>0&&null!=e.lines[0]?.class&&Boolean(e.lines[0].class?.className)?e.lines[0].class?.className??hyphen$7:hyphen$7,a="category"===n.key?t:r;/* @__PURE__ */
93735
+ return jsxRuntimeExports.jsx(RowItemContainer$2,{windowSize:p,wrapperWidth:n.width,isQuickViewMode:u,children:/* @__PURE__ */jsxRuntimeExports.jsx(RowItem$3,{windowSize:p,isLastItem:o===w.length-1,children:/* @__PURE__ */jsxRuntimeExports.jsx(TextContainer$2,{children:a!==hyphen$7?/* @__PURE__ */jsxRuntimeExports.jsx(TooltipWithEllipsisText,{text:a,itemTextStyle:{...textStyles.standardMedium.cssObject,color:"inherit"}}):/* @__PURE__ */jsxRuntimeExports.jsx(ItemText$2,{children:a})})})},i)}case"date":/* @__PURE__ */
93392
93736
  return jsxRuntimeExports.jsx(RowItemContainer$2,{windowSize:p,wrapperWidth:n.width,isQuickViewMode:u,children:/* @__PURE__ */jsxRuntimeExports.jsx(RowItem$3,{windowSize:p,isLastItem:o===w.length-1,children:/* @__PURE__ */jsxRuntimeExports.jsx(TextContainer$2,{children:/* @__PURE__ */jsxRuntimeExports.jsx(TooltipWithEllipsisText,{text:e.date.format(dateFormat$e.visual.MMMDCommaYYYYformat),itemTextStyle:{...textStyles.standardMedium.cssObject,color:"inherit"}})})})},i);case"receipts":/* @__PURE__ */
93393
93737
  return jsxRuntimeExports.jsx(RowItemContainer$2,{windowSize:p,wrapperWidth:n.width,isQuickViewMode:u,children:/* @__PURE__ */jsxRuntimeExports.jsx(RowItem$3,{windowSize:p,isLastItem:o===w.length-1,style:{justifyContent:"center"},children:"In-Progress"===t.fetchState?/* @__PURE__ */jsxRuntimeExports.jsx(ActivityIndicator,{size:"Small",style:{display:"flex"},start:!0}):"Completed"===t.fetchState||null!=e.attachments&&e.attachments.length>0?/* @__PURE__ */jsxRuntimeExports.jsx(SuccessAnimation,{shouldDisplay:!0,width:sp[4],height:sp[4],animationInLoop:!1,shouldFade:!1,onAnimationComplete:()=>null}):/* @__PURE__ */jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[
93394
93738
  /* @__PURE__ */jsxRuntimeExports.jsx(StyledDiv$4,{onClick:e=>{e.stopPropagation()},children:/* @__PURE__ */jsxRuntimeExports.jsx(FileInputElement,{"data-testid":generateDataTestId("missing-receipts-file-input",e.id),name:`missing-receipts-${e.id}`,fileRef:$,sizeLimit:SizeLimit32MB,multiple:!1,acceptableTypes:[...SUPPORTED_TRANSACTION_LINE_ATTACHMENT_FILE_TYPES],onFileChange:v,onFileSizeError:(t,n)=>{t&&c(e.id,"Error",{code:500,message:!0===n?singleFileUploadSizeErrorMessage.replace("__maxFileSize__",formatFileSize(SizeLimit32MB,0)):multipleFileUploadSizeErrorMessage.replace("__maxFileSize__",formatFileSize(SizeLimit32MB,0))})}})}),
@@ -93576,7 +93920,7 @@ return jsxRuntimeExports.jsx("div",{ref:t,style:{...n,width:"auto",position:"rel
93576
93920
  display: flex;
93577
93921
  flex-direction: column;
93578
93922
  row-gap: ${Space.sp1};
93579
- `,FieldLabel$1=styled$2(StandardSemiBold)`
93923
+ `,FieldLabel=styled$2(StandardSemiBold)`
93580
93924
  color: ${e=>e.theme.colors.grey1};
93581
93925
  `,Note=styled$2(SmallRegular)`
93582
93926
  color: ${e=>e.theme.colors.grey1};
@@ -93611,9 +93955,9 @@ return jsxRuntimeExports.jsx("div",{ref:t,style:{...n,width:"auto",position:"rel
93611
93955
  return jsxRuntimeExports.jsxs(Container$r,{children:[
93612
93956
  /* @__PURE__ */jsxRuntimeExports.jsx(Note,{children:i.note}),
93613
93957
  /* @__PURE__ */jsxRuntimeExports.jsxs(Field,{children:[
93614
- /* @__PURE__ */jsxRuntimeExports.jsx(FieldLabel$1,{children:i.fields.agent_insights_header}),
93958
+ /* @__PURE__ */jsxRuntimeExports.jsx(FieldLabel,{children:i.fields.agent_insights_header}),
93615
93959
  /* @__PURE__ */jsxRuntimeExports.jsx(HeaderInput,{"aria-label":i.fields.agent_insights_header,ref:a,defaultValue:(d=AGENT_INSIGHTS_HEADER_KEY,e[d]??asText(n[d])),onBlur:e=>c(AGENT_INSIGHTS_HEADER_KEY,e.currentTarget.value),onKeyDown:e=>{"Enter"===e.key&&(e.preventDefault(),e.currentTarget.blur())}})]}),AGENT_INSIGHTS_SECTION_KEYS.map(e=>/* @__PURE__ */jsxRuntimeExports.jsxs(Field,{children:[
93616
- /* @__PURE__ */jsxRuntimeExports.jsx(FieldLabel$1,{children:i.fields[e]}),
93960
+ /* @__PURE__ */jsxRuntimeExports.jsx(FieldLabel,{children:i.fields[e]}),
93617
93961
  /* @__PURE__ */jsxRuntimeExports.jsx(SectionBody,{ref:t=>{r.current[e]=t},contentEditable:!0,suppressContentEditableWarning:!0,role:"textbox","aria-multiline":!0,"aria-label":i.fields[e],onBlur:t=>c(e,t.currentTarget.innerHTML)})]},e))]});var d}const SvgCustomerRequest=e=>/* @__PURE__ */React.createElement("svg",{viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},/* @__PURE__ */React.createElement("g",{clipPath:"url(#clip0_2060_207)"},/* @__PURE__ */React.createElement("path",{d:"M10.3108 13.7666L8.91958 11.6416C8.75644 11.3546 8.71341 11.0148 8.7999 10.6962C8.88638 10.3777 9.09536 10.1063 9.38121 9.94123C9.66707 9.77619 10.0066 9.73091 10.3257 9.81528C10.6449 9.89965 10.9176 10.1068 11.0846 10.3916L11.7521 11.4109V6.78552",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),/* @__PURE__ */React.createElement("path",{d:"M11.7672 6.77606C12.5298 7.23352 13.1415 7.85903 13.5796 8.63286C14.0177 9.40668 14.2479 10.2808 14.2479 11.17V13.7544V15.7458",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),/* @__PURE__ */React.createElement("path",{d:"M8.25208 1.2543L11.7521 4.7543V6.7421",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),/* @__PURE__ */React.createElement("path",{d:"M8.22098 1.2543H2.75208C2.19979 1.2543 1.75208 1.70202 1.75208 2.2543L1.75208 13.2543C1.75208 13.8066 2.19979 14.2543 2.75208 14.2543H8.75208",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),/* @__PURE__ */React.createElement("path",{d:"M8.25208 1.2543V4.7543H11.7521",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),/* @__PURE__ */React.createElement("path",{d:"M4.1521 6.68448H7.28102",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),/* @__PURE__ */React.createElement("path",{d:"M4.1521 8.68448H7.28102",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"})),/* @__PURE__ */React.createElement("defs",null,/* @__PURE__ */React.createElement("clipPath",{id:"clip0_2060_207"},/* @__PURE__ */React.createElement("rect",{width:16,height:16,fill:"currentColor"})))),strings$t=appLocale.getLocalizedStrings(),D$l={iconContainerMaxWidthHeight:new ResponsiveSized(sp[6],sp[7]),iconContainerMarginRight:new ResponsiveSized(12,sp[3]),iconPadding:new ResponsiveSized(10,12)},fontStyles$b={title:new ResponsiveSizedStyle("standardSemiBold","largeSemiBold")},Container$q=styled$2.div`
93618
93962
  background-color: ${e=>e.theme.colors.grey5};
93619
93963
  border: ${e=>`1px solid ${e.theme.colors.grey2}`};
@@ -94184,7 +94528,7 @@ return jsxRuntimeExports.jsx(AddThreadsWrapper,{style:{top:e.top,left:e.left,...
94184
94528
  position: relative;
94185
94529
  height: fit-content;
94186
94530
  min-height: ${Space.sp12};
94187
- `,Content$1=styled$2.div`
94531
+ `,Content=styled$2.div`
94188
94532
  flex-grow: 1;
94189
94533
  overflow: auto;
94190
94534
  min-height: 2em;
@@ -94289,7 +94633,7 @@ return jsxRuntimeExports.jsx(AddThreadsWrapper,{style:{top:e.top,left:e.left,...
94289
94633
  max-width: ${COMMENTS_DRAWER_MAXIMUM_WIDTH}px;
94290
94634
  `,monthEndReportFormSectionId="monthEndReportFormSection",monthEndReportPage="monthEndReportPage",{common:common$m,cockpit:cockpit,dateFormat:dateFormat$c}=appLocale.getLocalizedStrings();function MonthEndInsightsForm({companyId:e,enableZeniGPTFeature:t,monthEndReportView:n,previewMode:o,customerRequestData:i,allThreadsSectionOpen:r,filterMetaData:a,newThreadMetadata:s,isZeniUser:l,selectedPeriod:c,improveUsingZeniGPTClick:d,onRemoveFileAttachment:p,onUpdateFileAttachment:u,onCloseAllThreadsSection:m,previewMonthEndReport:h,saveMonthEndReport:g,onEditClick:x,onOpenFileAttachmentSnackBar:f,onClickCustomerRequest:y,sendMonthEndReport:S}){const C=useTheme(),[$,b]=useState(),[v,E]=useState(0),[w,R]=useState(0),A=useRef(),j=useRef(null),T=useRef(null),{html:I,subject:k,improveUsingZeniGPTStatus:L}=n,[D,_]=useState(),[P,B]=useState(!1),[M,O]=useState(!1),F=useRef(null),N=useRef(null),z=useDelayUnmount(r,250),H="Not-Started"===n.fetchState||"In-Progress"===n.fetchState||"Not-Started"===n.companyMonthEndReportTemplatesData.fetchState||"In-Progress"===n.companyMonthEndReportTemplatesData.fetchState,{threadsRefs:V,sortedThreads:W,threadsPositions:U,observer:G,unresolvedThreadsMap:q,handleRemoveFloatingThread:Q}=useFloatingThreads(a,F,!o,H),Y=useCallback(()=>{r?null!=N.current&&R(Math.min((N.current.offsetWidth-MONTH_END_INSIGHTS_FORM_WIDTH-sp[4])/2,N.current.offsetWidth-MONTH_END_INSIGHTS_FORM_WIDTH-COMMENTS_DRAWER_MAXIMUM_WIDTH-sp[4])):null!=N.current&&E(Math.min((N.current.offsetWidth-MONTH_END_INSIGHTS_FORM_WIDTH-sp[4])/2,N.current.offsetWidth-MONTH_END_INSIGHTS_FORM_WIDTH-COMMENTS_SECTION_MINIMUM_WIDTH-sp[4]))},[r]);useEffect(()=>{Y()},[r,Y]),useEffect(()=>(window.addEventListener("resize",Y),()=>{window.removeEventListener("resize",Y)}),[Y]);const{openThread:K,addThread:Z,setOpenThread:X}=useContext(ThreadsContext),J=useHandleSelection(MONTH_END_REPORT_CANVAS,!1,!o),ee=F.current?.getBoundingClientRect(),te=null!=J&&J.coords&&ee?{left:J.coords.left-ee.left,top:J.coords.top-ee.top}:void 0,ne=useCallback(()=>{const t=window.getSelection()?.getRangeAt(0),n=getSelectionData();if(!t||null==n)return;const o={...s,...n,startPath:n.startPath.join(),endPath:n.endPath.join()},i=`${nanoid()}${NEW_THREAD_SUFFIX}`;Z(i,{type:"thread",visibility:"public",id:i,roomId:`cockpit_${e}`,createdAt:/* @__PURE__ */new Date,comments:[],metadata:o,updatedAt:/* @__PURE__ */new Date,resolved:!1}),X(i)},[Z,e,s,X]);useEffect(()=>{null!=K&&r&&m()},[r,K,m]);const oe="In-Progress"===L.fetchState,ie=useForm({mode:"all",defaultValues:getDefaultValues$8(n),values:getDefaultValues$8(n)}),[re,ae]=useState(!1),{agentInsightEdits:se,agentInsightEditsRef:le,hasUnpersistedAgentEdits:ce,onAgentInsightEdit:de,saveState:pe}=useAgentInsightEdits({save:()=>me(),saveStatus:n.saveMonthEndReportStatus}),ue=ie.handleSubmit(e=>{const{recipientEmailList:t,subject:n}=e[monthEndReportFormSectionId];if(!ce)if(!0===o)S?.(D?.id);else{const e=$?.replace(EMPTY_HTML_CHECKER,common$m.strings.empty);null!=t&&null!=n&&h(t,n,D?.id,null!=e&&e.length>0?$:void 0,le.current)}}),me=()=>{const e=ie.getValues(),{recipientEmailList:t,subject:o}=e[monthEndReportFormSectionId];g(t??n.recipientEmailList??[],o??common$m.strings.empty,D?.id,$,le.current)};useEffect(()=>{b(n.zeniRequestsHtml)},[n.zeniRequestsHtml]),useEffect(()=>{A.current=D},[D]),useEffect(()=>{_(mapAttachmentFileToAttachmentFilePayload(n.attachmentFile)),B(!1)},[n.attachmentFile]),useEffect(()=>{M&&f()},[M,f]);const he=zeniDate(`${c.year}-${c.month}-01`).format(dateFormat$c.visual.MMMMFormat),ge=cockpit.monthEndReport.agentInsights,xe=n.templateData,fe=!o&&hasAgentInsights(xe),ye=null!=I?I.split(MONTH_END_EDITOR_PLACEHOLDER):[],Se=n.concatenatedHtml,Ce=(n.zeniRequestsData??[]).length+getTemplatesFromTemplatedData(n.companyMonthEndReportTemplatesData).length;/* @__PURE__ */
94291
94635
  return jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[
94292
- /* @__PURE__ */jsxRuntimeExports.jsxs(Content$1,{ref:N,children:[
94636
+ /* @__PURE__ */jsxRuntimeExports.jsxs(Content,{ref:N,children:[
94293
94637
  /* @__PURE__ */jsxRuntimeExports.jsx(EmptySection,{availableWidth:r?w:v}),
94294
94638
  /* @__PURE__ */jsxRuntimeExports.jsxs(FormContainer,{children:[
94295
94639
  /* @__PURE__ */jsxRuntimeExports.jsx(FormProvider,{...ie,children:/* @__PURE__ */jsxRuntimeExports.jsx("form",{id:uniqueName$b(monthEndReportPage),onSubmit:ue,children:/* @__PURE__ */jsxRuntimeExports.jsxs(SectionContainer$2,{children:[
@@ -94405,11 +94749,11 @@ return jsxRuntimeExports.jsxs(HeaderWrapper$2,{actualDataValue:i.key,"data-testi
94405
94749
  `,HeaderName$1=styled$2(ExtraSmallSemiBold)`
94406
94750
  display: flex;
94407
94751
  white-space: nowrap;
94408
- `,expenseAutomationTransactionsPage="expenseAutomationTransactionsPage",transactionCategorizationListTableSectionId="transactionCategorizationListTable",transactionDetailLineCategory="account",transactionDetailLineClass="class",transactionDetailLineProject="project",transactionDetailLineEntitySelection="lineEntitySelection",transactionDetailLineEntity="lineEntity",recommendations="recommendations",lineInfo="lineInfo",vendorDetails="vendorDetails",customerDetails="customerDetails",selectedTransactionIds="selectedTransactionIds",uniqueName$a=(e,t,n)=>`${e}.${n}.${t}`,SvgCheque=e=>/* @__PURE__ */React.createElement("svg",{viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},/* @__PURE__ */React.createElement("path",{d:"M4.85022 13.5836L5.52057 12.9133C5.63229 12.8016 5.77164 12.7217 5.92438 12.6815C6.07712 12.6413 6.23779 12.6424 6.38999 12.6846C6.54218 12.7268 6.68046 12.8086 6.7907 12.9217C6.90094 13.0348 6.97919 13.1751 7.01747 13.3283L7.08174 13.5836L7.8119 13.0972C7.98361 12.9827 8.1897 12.9312 8.39508 12.9515C8.60046 12.9719 8.79245 13.0628 8.93837 13.2087L9.31326 13.5836H11.0985",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),/* @__PURE__ */React.createElement("path",{d:"M17.4206 6H2.24629C2.12792 6 2.01441 6.04702 1.93071 6.13072C1.84701 6.21442 1.79999 6.32794 1.79999 6.4463V17.1576C1.79999 17.276 1.84701 17.3895 1.93071 17.4732C2.01441 17.5569 2.12792 17.6039 2.24629 17.6039H21.8837C22.0021 17.6039 22.1156 17.5569 22.1993 17.4732C22.283 17.3895 22.33 17.276 22.33 17.1576V6.4463C22.33 6.32794 22.283 6.21442 22.1993 6.13072C22.1156 6.04702 22.0021 6 21.8837 6H17.4206Z",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),/* @__PURE__ */React.createElement("path",{d:"M16.0854 9.6521H19.6559V12.0656H16.0854V9.6521Z",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"})),{common:{strings:{underscore:underscore$1,hyphen:hyphen$8,empty:empty$4,colon:colon$2},tooltips:{addReceipt:addReceipt,viewReceipt:viewReceipt$1,viewReceipts:viewReceipts$1},texts:{account:account,addCategory2:addCategory2,addClass2:addClass2,addPayee:addPayee,description2:description2$1,memo:memoLabel,method:method}},expenseAutomation:{transactions:transactionsStrings},dateFormat:dateFormat$b}=appLocale.getLocalizedStrings(),D$k={containerPaddingLeftRight:new ResponsiveSized(sp[3],sp[3]),containerPaddingTopBottom:new ResponsiveSized(6,6),controlHeight:new ResponsiveSized(sp[4],sp[5]),nameLogoWidth:new ResponsiveSized(sp[2],sp[3]),nameLogoHeight:new ResponsiveSized(sp[2],sp[3]),borderRadius:6},RecommendationCellSkeleton=({windowSize:e,wrapperWidth:t,widthPercentage:n})=>/* @__PURE__ */jsxRuntimeExports.jsxs(RowItemContainer$1,{windowSize:e,wrapperWidth:t,widthPercentage:n,className:"item-value-container",children:[
94752
+ `,expenseAutomationTransactionsPage="expenseAutomationTransactionsPage",transactionCategorizationListTableSectionId="transactionCategorizationListTable",transactionDetailLineCategory="account",transactionDetailLineClass="class",transactionDetailLineProject="project",transactionDetailLineEntitySelection="lineEntitySelection",transactionDetailLineEntity="lineEntity",recommendations="recommendations",lineInfo="lineInfo",vendorDetails="vendorDetails",customerDetails="customerDetails",selectedTransactionIds="selectedTransactionIds",uniqueName$a=(e,t,n)=>`${e}.${n}.${t}`,SvgCheque=e=>/* @__PURE__ */React.createElement("svg",{viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},/* @__PURE__ */React.createElement("path",{d:"M4.85022 13.5836L5.52057 12.9133C5.63229 12.8016 5.77164 12.7217 5.92438 12.6815C6.07712 12.6413 6.23779 12.6424 6.38999 12.6846C6.54218 12.7268 6.68046 12.8086 6.7907 12.9217C6.90094 13.0348 6.97919 13.1751 7.01747 13.3283L7.08174 13.5836L7.8119 13.0972C7.98361 12.9827 8.1897 12.9312 8.39508 12.9515C8.60046 12.9719 8.79245 13.0628 8.93837 13.2087L9.31326 13.5836H11.0985",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),/* @__PURE__ */React.createElement("path",{d:"M17.4206 6H2.24629C2.12792 6 2.01441 6.04702 1.93071 6.13072C1.84701 6.21442 1.79999 6.32794 1.79999 6.4463V17.1576C1.79999 17.276 1.84701 17.3895 1.93071 17.4732C2.01441 17.5569 2.12792 17.6039 2.24629 17.6039H21.8837C22.0021 17.6039 22.1156 17.5569 22.1993 17.4732C22.283 17.3895 22.33 17.276 22.33 17.1576V6.4463C22.33 6.32794 22.283 6.21442 22.1993 6.13072C22.1156 6.04702 22.0021 6 21.8837 6H17.4206Z",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),/* @__PURE__ */React.createElement("path",{d:"M16.0854 9.6521H19.6559V12.0656H16.0854V9.6521Z",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"})),{common:{strings:{underscore:underscore$1,hyphen:hyphen$6,empty:empty$4,colon:colon$1},tooltips:{addReceipt:addReceipt,viewReceipt:viewReceipt$1,viewReceipts:viewReceipts$1},texts:{account:account,addCategory2:addCategory2,addClass2:addClass2,addPayee:addPayee,description2:description2$1,memo:memoLabel,method:method}},expenseAutomation:{transactions:transactionsStrings},dateFormat:dateFormat$b}=appLocale.getLocalizedStrings(),D$k={containerPaddingLeftRight:new ResponsiveSized(sp[3],sp[3]),containerPaddingTopBottom:new ResponsiveSized(6,6),controlHeight:new ResponsiveSized(sp[4],sp[5]),nameLogoWidth:new ResponsiveSized(sp[2],sp[3]),nameLogoHeight:new ResponsiveSized(sp[2],sp[3]),borderRadius:6},RecommendationCellSkeleton=({windowSize:e,wrapperWidth:t,widthPercentage:n})=>/* @__PURE__ */jsxRuntimeExports.jsxs(RowItemContainer$1,{windowSize:e,wrapperWidth:t,widthPercentage:n,className:"item-value-container",children:[
94409
94753
  /* @__PURE__ */jsxRuntimeExports.jsx(RecommendationIconContainer,{children:/* @__PURE__ */jsxRuntimeExports.jsx("span",{})}),
94410
94754
  /* @__PURE__ */jsxRuntimeExports.jsx(SelectContainerWrapper,{children:/* @__PURE__ */jsxRuntimeExports.jsx(ContentLoaderSkeleton$1,{width:"100%",height:sp[4]})})]}),isJournalEntryCreditLine=(e,t)=>"journal_entry"===e&&"credit"===t,TransactionCategorizationListRow=({transactionView:e,transaction:t,sectionId:n,vendorSearchAutoCompleteData:o,vendorSearchAutoCompleteActions:i,selectedTab:r,containerRef:a,listContainerRef:s,isAccountingClassesEnabled:l,showProjectField:c,isCOTEnabled:d,isCreateTransferEntryFromExpenseEnabled:p,transferConvertibleSourceTypes:u,isPanelSelected:m,cotTracking:h,onTransactionCategorizationRowClick:g,setCurrentTransactionInAction:x,vendorLoadOptions:f,openTooltipId:y,setOpenTooltipId:S,onOpenTransferDrawer:C,authParams:$,onUploadTransactionReceipt:b,rowCommenting:v})=>{const E=useWindowSizeContext(),w=useQuickViewMode(),R=useFlexibleWidth(),{isCommentingActive:A,rowRef:j,totalThreadCount:T,isThreadsLoading:I,handleActiveThreadClick:k,handleAddRowCommentClick:L}=v,[D,_]=useState(!1),{lineItemById:P,sortedLineItems:B}=t.transactionReviewLocalData,M=t.transactionReviewLocalData.tabSpecificLineItems?.[r]||[],O=B.filter(e=>-1!==M.indexOf(e)),F=[];O.forEach(e=>{F.push(P[e])});const{accountList:N,accountsHierarchyList:z,classHierarchyList:H,classList:V,projectList:W,uncategorizedAccounts:U,transactions:G,selectedCheckBoxTransactionIds:q}=e,Q=W?.projects??[],Y=e.uploadReceiptStatusById,K=q.includes(t.transactionId),Z=!0!==w&&!0===K,X=useTheme(),J={control:()=>({marginLeft:-2,backgroundColor:D?X.colors.background:X.colors.grey5,minHeight:sp[5]}),valueContainer:()=>({justifyContent:"flex-start",paddingLeft:sp[0],height:sp[5],backgroundColor:X.colors.grey5}),menu:()=>({width:"150%",background:X.colors.grey5}),singleValue:()=>({color:D||Z?X.colors.primary:X.colors.champion,paddingLeft:sp[2]}),input:e=>({...e,color:D||Z?X.colors.primary:X.colors.champion,textAlign:"left",paddingLeft:sp[2]}),menuPortal:e=>({...e,zIndex:10})},ee={...J,singleValue:e=>({...e,color:D||Z?X.colors.primary:X.colors.champion}),menu:()=>({marginTop:sp[1],marginLeft:-sp[2]}),input:e=>({...e,color:D||Z?X.colors.primary:X.colors.champion,textAlign:"left",...textStyles.standardMedium}),control:e=>({...e,height:sp[5]})},te=G.find(e=>e.id===t.transactionId),ne=useRef(null),[oe,ie]=useState(void 0),[re,ae]=useState("bottom");return useEffect(()=>{if(void 0===oe)return;const e=s?.current,t=e?._outerRef??null,n=()=>{const e=ne.current;if(null==e||null==t)return;const n=e.getBoundingClientRect(),o=t.getBoundingClientRect(),i=t.scrollTop+(n.bottom-o.top),r=t.scrollHeight-i;ae(r>=288?"bottom":"top")};return n(),window.addEventListener("resize",n),t?.addEventListener("scroll",n),()=>{window.removeEventListener("resize",n),t?.removeEventListener("scroll",n)}},[s,oe]),/* @__PURE__ */jsxRuntimeExports.jsx(RowWrapper,{ref:j,onMouseEnter:()=>_(!0),onMouseLeave:()=>_(!1),children:/* @__PURE__ */jsxRuntimeExports.jsxs(Container$p,{className:"categorization-row-card",windowSize:E,isSelected:K,isPanelSelected:m,isQuickViewMode:w,isHovered:D,style:{position:"relative"},children:[
94411
94755
  /* @__PURE__ */jsxRuntimeExports.jsx(RowOuterContainer,{windowSize:E,isQuickViewMode:w,children:F.map((e,a)=>/* @__PURE__ */jsxRuntimeExports.jsx(RowInnerContainer,{ref:oe===a?ne:void 0,isFirstItem:0===a,isLastItem:a===F.length-1,"data-testid":generateDataTestId("transaction-categorization-list-row",e.lineId),flexibleWidth:R,isQuickViewMode:w,windowSize:E,onClick:e=>((e,t)=>{const{transactionType:n}=t.transactionReviewLocalData;if(!0!==w){const t=e.target;let n=t;for(;n;){if(n.classList.contains("select-value-container")||n!==t&&n.classList.contains("item-value-container")||n.classList.contains("grouped-single-select-field__value-container")||n.classList.contains("auto-complete-grouped-creatable-single-custom-group-select-field__option")||n.classList.contains("grouped-single-select-field__input")||n.classList.contains("grouped-single-select-field__menu"))return;n=n.parentElement}}null!=n&&g(t.transactionId,n)})(e,t),children:/* @__PURE__ */jsxRuntimeExports.jsx(TransactionCategorizationListItemRow,{isAccountingClassesEnabled:l,showProjectField:c,allProjectList:Q,line:e,isHovered:D||Z||m,isSelected:K,isQuickViewMode:w,lineIndex:a,sectionId:n,transaction:t,currentTransaction:te,windowSize:E,accountsHierarchyList:z,classHierarchyList:H,allAccountList:N,allClassList:V,uncategorizedAccounts:U,vendorSearchAutoCompleteData:o,vendorSearchAutoCompleteActions:i,setCurrentTransactionInAction:x,vendorLoadOptions:f,customStyle:J,customStyleAutoComplete:ee,recommendations:e.recommendationsWithCOT,selectedTab:r,isCOTEnabled:d,menuPlacement:re,cotTracking:h,openTooltipId:y,setOpenTooltipId:S,authParams:$,uploadReceiptStatus:Y?.[t.transactionId],onUploadTransactionReceipt:b,onDropdownClose:()=>ie(void 0),onDropdownOpen:()=>ie(a),onOpenTransferDrawer:C,isCreateTransferEntryFromExpenseEnabled:p,transferConvertibleSourceTypes:u})},`${t.transactionId}.${e.lineId}.${a}`))},t.transactionId),!0===w&&A&&T>0?/* @__PURE__ */jsxRuntimeExports.jsx(RowCommentSlot,{flushRight:!0,children:/* @__PURE__ */jsxRuntimeExports.jsx(ActiveThreadCount,{isLoading:I,count:T,style:{backgroundColor:X.colors.grey4,borderRadius:"50% 50% 50% 0",cursor:"pointer"},openThread:k})}):null,!0===w&&A&&!1===I&&0===T?/* @__PURE__ */jsxRuntimeExports.jsx(RowCommentSlot,{flushRight:!0,innerClassName:"comment-add-icon",children:/* @__PURE__ */jsxRuntimeExports.jsx(StyledAddThreadsIcon$1,{"data-testid":generateDataTestId("expense-automation-transaction-row-add-comment",t.transactionId),onClick:L})}):null,
94412
- /* @__PURE__ */jsxRuntimeExports.jsx(ExpenseAutomationRowThreadPortals,{state:v})]},t.transactionId)})},TransactionCategorizationListItemRow=({accountsHierarchyList:e,allAccountList:t,allClassList:n,allProjectList:o,showProjectField:i,classHierarchyList:r,customStyle:a,customStyleAutoComplete:s,line:l,lineIndex:c,transaction:d,currentTransaction:p,windowSize:u,uncategorizedAccounts:m,isHovered:h=!1,isQuickViewMode:g=!1,sectionId:x,recommendations:f,vendorSearchAutoCompleteData:y,selectedTab:S,isCOTEnabled:C,menuPlacement:$,cotTracking:b,openTooltipId:v,setCurrentTransactionInAction:E,vendorLoadOptions:w,setOpenTooltipId:R,isAccountingClassesEnabled:A,isCreateTransferEntryFromExpenseEnabled:j,transferConvertibleSourceTypes:T,onDropdownClose:I,onDropdownOpen:k,authParams:L,onOpenTransferDrawer:D,uploadReceiptStatus:_,onUploadTransactionReceipt:P})=>{const{transactionDate:B,transactionType:M,transactionTypeName:O,memo:F}=d.transactionReviewLocalData,[N,z]=useState(!1),H=useMemo(()=>"undefined"!=typeof document?document.body:null,[]),V=useMemo(()=>({...a,control:()=>({height:0,minHeight:0,overflow:"hidden",border:"none",padding:0,margin:0}),menuPortal:e=>({...e,zIndex:TRANSFER_MENU_Z_INDEX})}),[a]),W=p?.account?.accountType,U=(p?.totalLinesCount??0)>1,G=!0===j&&isTransactionTypeDropdownInteractive(W,M)&&!U,q=!0===j&&isTransactionTypeDropdownInteractive(W,M)&&U,Q=p?.accountIntegrationId,Y=uniqueName$a(x,"transactionType",c.toString()),{setValue:K,watch:Z}=useFormContext(),X=Z(Y),J=useRef(X?.selectedOption);useEffect(()=>{const e=X?.selectedOption,t="transfer"===e||"credit_card_payment"===e,n="transfer"===J.current||"credit_card_payment"===J.current;if(J.current=e,t&&!n&&null!=D){z(!1);const t=d.transactionReviewLocalData,n=t.sortedLineItems.map(e=>t.lineItemById[e]).find(e=>null!=e);null!=n&&(D({transactionId:d.transactionId,transactionType:e,sourceTransactionType:coerceSourceTransactionType(M),sourceTransactionTypeName:O,payee:t.vendorDetails?.name??t.vendor?.name??"",category:n.account?.accountName??"",className:n.class?.className??"",amount:n.amount,debitAccountIntegrationId:Q??"",debitAccountName:p?.account?.accountName??"",memo:t.memo??""}),K(Y,buildTypeDropdownValue(M??"expense",W,O)))}},[X?.selectedOption,D,K,M,O,Y,d.transactionId,d.transactionReviewLocalData,p,Q,W]);const ee=useCallback((e,t)=>{null!=b?.onCOTView&&b.onCOTView(l.lineId,d.transactionId,e,t)},[b,l.lineId,d.transactionId]),te=l.lineDescription,ne=useMemo(()=>{if(!0===Boolean(te)||!0===Boolean(F))return[{title:description2$1,description:!0===Boolean(te)?te:hyphen$8},{title:memoLabel,description:!0===Boolean(F)?F:hyphen$8}]},[F,te]),oe=uniqueName$a(x,transactionDetailLineEntitySelection,c.toString()),ie=uniqueName$a(x,transactionDetailLineCategory,c.toString()),re=uniqueName$a(x,transactionDetailLineClass,c.toString()),ae=uniqueName$a(x,transactionDetailLineProject,c.toString()),se=(e,t)=>{if(g)return;let n;switch(t){case"vendor":n=oe;break;case"category":n=ie;break;case"class":n=re;break;default:return}K(`${n}.selectedOption`,e,{shouldValidate:!0,shouldDirty:!0})},le=useTheme(),ce=useMemo(()=>null!=p&&!0===isVendorTransaction(p)?{id:d.transactionReviewLocalData.customer?.id??"",logo:d.transactionReviewLocalData.customer?.logo,name:d.transactionReviewLocalData.customer?.name??""}:{id:l.customer?.id??"",logo:l.customer?.logo,name:l.customer?.name??""},[p,l.customer?.id,l.customer?.logo,l.customer?.name,d.transactionReviewLocalData.customer?.id,d.transactionReviewLocalData.customer?.logo,d.transactionReviewLocalData.customer?.name]),de=useMemo(()=>null!=p&&!0===isVendorTransaction(p)?{id:d.transactionReviewLocalData.vendor?.id??"",logo:d.transactionReviewLocalData.vendor?.logo,name:d.transactionReviewLocalData.vendor?.name??""}:{id:l.vendor?.id??"",logo:l.vendor?.logo,name:l.vendor?.name??""},[p,l.vendor?.id,l.vendor?.logo,l.vendor?.name,d.transactionReviewLocalData.vendor?.id,d.transactionReviewLocalData.vendor?.logo,d.transactionReviewLocalData.vendor?.name]),pe=l[transactionDetailLineClass]?.classId,ue=l[transactionDetailLineClass]?.className,me=l.project?.projectId,he=l.project?.projectName,ge=l[transactionDetailLineCategory]?.qboId??l[transactionDetailLineCategory]?.accountId,xe=l[transactionDetailLineCategory]?.accountName,fe=ce?.id,ye=de?.id,Se=de?.name,Ce=useMemo(()=>({vendor:Se??ce?.name,category:xe,className:ue,date:B?.format(dateFormat$b.visual.MMMDCommaYYYYformat),memo:!0===Boolean(te)?te:F,amount:amountToString("0,0.[00]",l.amount,!0)}),[Se,ce?.name,xe,ue,B,te,F,l.amount]),[$e,be]=useState(!1===Boolean(pe)),[ve,Ee]=useState(!1===Boolean(me)),[we,Re]=useState(!1===Boolean(ge)),[Ae,je]=useState(!1===Boolean(ye)||!1===Boolean(fe)),Te=e=>{const t=f?.find(t=>t.vendor?.qboId===e||t.vendor?.id===e||t.vendor?.name===e);return t?.vendor?.reason??""},Ie=d.transactionReviewLocalData.lineItemById[l.lineId]?.recommendationsWithCOT||[],ke=getGroupedAccountOptionsWithCOT(e,Ie),Le=getGroupedClassOptionsWithCOT(r,Ie),De=getGroupedProjectOptions(o),_e=useCallback(()=>!1,[]),[Pe,Be]=useState(!1),[Me,Oe]=useState(!1),[Fe,Ne]=useState(!1),[ze,He]=useState(!1),[Ve,We]=useState(0),[Ue,Ge]=useState(null),[qe,Qe]=useState([]),[Ye,Ke]=useState(void 0),Ze=useRef(null),[Xe,Je]=useState(0),[et,tt]=useState(0),nt=WebV2MicroService()?.url,[ot,it]=useState(!1),rt=(e,t)=>{E({transactionId:d.transactionId,lineItemId:l.lineId}),w(e,t)},at=()=>{!0===Boolean(ye)||!0===Boolean(fe)?je(!1):je(!0),Be(!1),I?.()},st=()=>{!0===Boolean(ge)?Re(!1):Re(!0),it(!1),I?.()},lt=()=>{!0===Boolean(pe)?be(!1):be(!0),Oe(!1),I?.()},ct=()=>{!0===Boolean(me)?Ee(!1):Ee(!0),Ne(!1),I?.()},dt=()=>{g||!0!==Boolean(ye)&&!0!==Boolean(fe)||(Be(!0),k?.())},pt=()=>{g||(Oe(!0),k?.())},ut=()=>{g||(Ne(!0),k?.())},mt=()=>{g||(it(!0),k?.())};useEffect(()=>{!0===Boolean(ge)?Re(!1):Re(!0)},[ge]),useEffect(()=>{!0===Boolean(pe)?be(!1):be(!0)},[pe]),useEffect(()=>{!0===Boolean(me)?Ee(!1):Ee(!0)},[me]),useEffect(()=>{!0===Boolean(ye)||!0===Boolean(fe)?je(!1):je(!0)},[ye,fe]);const ht=d.transactionReviewLocalData.selectedEntity,gt=d.transactionReviewLocalData.lineItemById[l.lineId].selectedEntityLine,xt=null!=p&&!0===isVendorTransaction(p)?ht:gt,ft=useMemo(()=>{const e=d.transactionReviewLocalData.lineItemById[l.lineId]?.recommendationsWithCOT||[],t=y.entityAutoCompleteView;return{selectedOption:xt?.qboId??xt?.id,defaultOptions:getGroupedForPayeeEntityOptionsWithCOT(t,xt,e??[])}},[xt,d.transactionReviewLocalData.lineItemById,l.lineId,y.entityAutoCompleteView]),yt=(e,t,n)=>{if(null==t||!1===Boolean(t))return;let o=[];return e.forEach(e=>{o=o.concat(e.options)}),o.find(e=>e.value===t)?.label??n??t},St=yt(Le,pe,ue),Ct=yt(De,me,he),$t=yt(ke,ge,xe),bt="review"===S,vt=isMiscategorizedField("vendor",ft.defaultOptions,ft.selectedOption),Et=isMiscategorizedField("category",ke,ge),wt=isMiscategorizedField("class",Le,pe),Rt=e=>{const{isLineRecommendationsLoading:n,itemsData:o,key:i,resolvedWidthPercentage:r}=e;if(!0===n)/* @__PURE__ */
94756
+ /* @__PURE__ */jsxRuntimeExports.jsx(ExpenseAutomationRowThreadPortals,{state:v})]},t.transactionId)})},TransactionCategorizationListItemRow=({accountsHierarchyList:e,allAccountList:t,allClassList:n,allProjectList:o,showProjectField:i,classHierarchyList:r,customStyle:a,customStyleAutoComplete:s,line:l,lineIndex:c,transaction:d,currentTransaction:p,windowSize:u,uncategorizedAccounts:m,isHovered:h=!1,isQuickViewMode:g=!1,sectionId:x,recommendations:f,vendorSearchAutoCompleteData:y,selectedTab:S,isCOTEnabled:C,menuPlacement:$,cotTracking:b,openTooltipId:v,setCurrentTransactionInAction:E,vendorLoadOptions:w,setOpenTooltipId:R,isAccountingClassesEnabled:A,isCreateTransferEntryFromExpenseEnabled:j,transferConvertibleSourceTypes:T,onDropdownClose:I,onDropdownOpen:k,authParams:L,onOpenTransferDrawer:D,uploadReceiptStatus:_,onUploadTransactionReceipt:P})=>{const{transactionDate:B,transactionType:M,transactionTypeName:O,memo:F}=d.transactionReviewLocalData,[N,z]=useState(!1),H=useMemo(()=>"undefined"!=typeof document?document.body:null,[]),V=useMemo(()=>({...a,control:()=>({height:0,minHeight:0,overflow:"hidden",border:"none",padding:0,margin:0}),menuPortal:e=>({...e,zIndex:TRANSFER_MENU_Z_INDEX})}),[a]),W=p?.account?.accountType,U=(p?.totalLinesCount??0)>1,G=!0===j&&isTransactionTypeDropdownInteractive(W,M)&&!U,q=!0===j&&isTransactionTypeDropdownInteractive(W,M)&&U,Q=p?.accountIntegrationId,Y=uniqueName$a(x,"transactionType",c.toString()),{setValue:K,watch:Z}=useFormContext(),X=Z(Y),J=useRef(X?.selectedOption);useEffect(()=>{const e=X?.selectedOption,t="transfer"===e||"credit_card_payment"===e,n="transfer"===J.current||"credit_card_payment"===J.current;if(J.current=e,t&&!n&&null!=D){z(!1);const t=d.transactionReviewLocalData,n=t.sortedLineItems.map(e=>t.lineItemById[e]).find(e=>null!=e);null!=n&&(D({transactionId:d.transactionId,transactionType:e,sourceTransactionType:coerceSourceTransactionType(M),sourceTransactionTypeName:O,payee:t.vendorDetails?.name??t.vendor?.name??"",category:n.account?.accountName??"",className:n.class?.className??"",amount:n.amount,debitAccountIntegrationId:Q??"",debitAccountName:p?.account?.accountName??"",memo:t.memo??""}),K(Y,buildTypeDropdownValue(M??"expense",W,O)))}},[X?.selectedOption,D,K,M,O,Y,d.transactionId,d.transactionReviewLocalData,p,Q,W]);const ee=useCallback((e,t)=>{null!=b?.onCOTView&&b.onCOTView(l.lineId,d.transactionId,e,t)},[b,l.lineId,d.transactionId]),te=l.lineDescription,ne=useMemo(()=>{if(!0===Boolean(te)||!0===Boolean(F))return[{title:description2$1,description:!0===Boolean(te)?te:hyphen$6},{title:memoLabel,description:!0===Boolean(F)?F:hyphen$6}]},[F,te]),oe=uniqueName$a(x,transactionDetailLineEntitySelection,c.toString()),ie=uniqueName$a(x,transactionDetailLineCategory,c.toString()),re=uniqueName$a(x,transactionDetailLineClass,c.toString()),ae=uniqueName$a(x,transactionDetailLineProject,c.toString()),se=(e,t)=>{if(g)return;let n;switch(t){case"vendor":n=oe;break;case"category":n=ie;break;case"class":n=re;break;default:return}K(`${n}.selectedOption`,e,{shouldValidate:!0,shouldDirty:!0})},le=useTheme(),ce=useMemo(()=>null!=p&&!0===isVendorTransaction(p)?{id:d.transactionReviewLocalData.customer?.id??"",logo:d.transactionReviewLocalData.customer?.logo,name:d.transactionReviewLocalData.customer?.name??""}:{id:l.customer?.id??"",logo:l.customer?.logo,name:l.customer?.name??""},[p,l.customer?.id,l.customer?.logo,l.customer?.name,d.transactionReviewLocalData.customer?.id,d.transactionReviewLocalData.customer?.logo,d.transactionReviewLocalData.customer?.name]),de=useMemo(()=>null!=p&&!0===isVendorTransaction(p)?{id:d.transactionReviewLocalData.vendor?.id??"",logo:d.transactionReviewLocalData.vendor?.logo,name:d.transactionReviewLocalData.vendor?.name??""}:{id:l.vendor?.id??"",logo:l.vendor?.logo,name:l.vendor?.name??""},[p,l.vendor?.id,l.vendor?.logo,l.vendor?.name,d.transactionReviewLocalData.vendor?.id,d.transactionReviewLocalData.vendor?.logo,d.transactionReviewLocalData.vendor?.name]),pe=l[transactionDetailLineClass]?.classId,ue=l[transactionDetailLineClass]?.className,me=l.project?.projectId,he=l.project?.projectName,ge=l[transactionDetailLineCategory]?.qboId??l[transactionDetailLineCategory]?.accountId,xe=l[transactionDetailLineCategory]?.accountName,fe=ce?.id,ye=de?.id,Se=de?.name,Ce=useMemo(()=>({vendor:Se??ce?.name,category:xe,className:ue,date:B?.format(dateFormat$b.visual.MMMDCommaYYYYformat),memo:!0===Boolean(te)?te:F,amount:amountToString("0,0.[00]",l.amount,!0)}),[Se,ce?.name,xe,ue,B,te,F,l.amount]),[$e,be]=useState(!1===Boolean(pe)),[ve,Ee]=useState(!1===Boolean(me)),[we,Re]=useState(!1===Boolean(ge)),[Ae,je]=useState(!1===Boolean(ye)||!1===Boolean(fe)),Te=e=>{const t=f?.find(t=>t.vendor?.qboId===e||t.vendor?.id===e||t.vendor?.name===e);return t?.vendor?.reason??""},Ie=d.transactionReviewLocalData.lineItemById[l.lineId]?.recommendationsWithCOT||[],ke=getGroupedAccountOptionsWithCOT(e,Ie),Le=getGroupedClassOptionsWithCOT(r,Ie),De=getGroupedProjectOptions(o),_e=useCallback(()=>!1,[]),[Pe,Be]=useState(!1),[Me,Oe]=useState(!1),[Fe,Ne]=useState(!1),[ze,He]=useState(!1),[Ve,We]=useState(0),[Ue,Ge]=useState(null),[qe,Qe]=useState([]),[Ye,Ke]=useState(void 0),Ze=useRef(null),[Xe,Je]=useState(0),[et,tt]=useState(0),nt=WebV2MicroService()?.url,[ot,it]=useState(!1),rt=(e,t)=>{E({transactionId:d.transactionId,lineItemId:l.lineId}),w(e,t)},at=()=>{!0===Boolean(ye)||!0===Boolean(fe)?je(!1):je(!0),Be(!1),I?.()},st=()=>{!0===Boolean(ge)?Re(!1):Re(!0),it(!1),I?.()},lt=()=>{!0===Boolean(pe)?be(!1):be(!0),Oe(!1),I?.()},ct=()=>{!0===Boolean(me)?Ee(!1):Ee(!0),Ne(!1),I?.()},dt=()=>{g||!0!==Boolean(ye)&&!0!==Boolean(fe)||(Be(!0),k?.())},pt=()=>{g||(Oe(!0),k?.())},ut=()=>{g||(Ne(!0),k?.())},mt=()=>{g||(it(!0),k?.())};useEffect(()=>{!0===Boolean(ge)?Re(!1):Re(!0)},[ge]),useEffect(()=>{!0===Boolean(pe)?be(!1):be(!0)},[pe]),useEffect(()=>{!0===Boolean(me)?Ee(!1):Ee(!0)},[me]),useEffect(()=>{!0===Boolean(ye)||!0===Boolean(fe)?je(!1):je(!0)},[ye,fe]);const ht=d.transactionReviewLocalData.selectedEntity,gt=d.transactionReviewLocalData.lineItemById[l.lineId].selectedEntityLine,xt=null!=p&&!0===isVendorTransaction(p)?ht:gt,ft=useMemo(()=>{const e=d.transactionReviewLocalData.lineItemById[l.lineId]?.recommendationsWithCOT||[],t=y.entityAutoCompleteView;return{selectedOption:xt?.qboId??xt?.id,defaultOptions:getGroupedForPayeeEntityOptionsWithCOT(t,xt,e??[])}},[xt,d.transactionReviewLocalData.lineItemById,l.lineId,y.entityAutoCompleteView]),yt=(e,t,n)=>{if(null==t||!1===Boolean(t))return;let o=[];return e.forEach(e=>{o=o.concat(e.options)}),o.find(e=>e.value===t)?.label??n??t},St=yt(Le,pe,ue),Ct=yt(De,me,he),$t=yt(ke,ge,xe),bt="review"===S,vt=isMiscategorizedField("vendor",ft.defaultOptions,ft.selectedOption),Et=isMiscategorizedField("category",ke,ge),wt=isMiscategorizedField("class",Le,pe),Rt=e=>{const{isLineRecommendationsLoading:n,itemsData:o,key:i,resolvedWidthPercentage:r}=e;if(!0===n)/* @__PURE__ */
94413
94757
  return jsxRuntimeExports.jsx(RecommendationCellSkeleton,{windowSize:u,wrapperWidth:o.width,widthPercentage:r},i);const s=null!=p?.lines?p.lines[c]:void 0;/* @__PURE__ */
94414
94758
  return jsxRuntimeExports.jsxs(RowItemContainer$1,{windowSize:u,wrapperWidth:o.width,widthPercentage:r,className:"item-value-container",children:[
94415
94759
  /* @__PURE__ */jsxRuntimeExports.jsx(RecommendationIcon,{isCOTEnabled:C,recommendations:Ie,type:"category",isReviewTab:bt,isEnabled:Boolean(l[transactionDetailLineCategory]?.isPreFilled),isAccountOptionDisabled:_e,isMisCategorized:Et,onRecommendationClick:se,selectedValue:ge,selectedValueLabel:$t,existingOption:{label:s?.account?.accountName,value:s?.account?.qboId??s?.account?.accountId},cotTracking:b,lineId:l.lineId,transactionId:d.transactionId,openTooltipId:v,setOpenTooltipId:R}),
@@ -94424,7 +94768,7 @@ return jsxRuntimeExports.jsx(EmptyCell,{},r);case"vendor":default:/* @__PURE__ *
94424
94768
  return jsxRuntimeExports.jsxs(RowItemContainer$1,{windowSize:u,wrapperWidth:t.width,widthPercentage:m,isQuickViewMode:g,isSticky:!0===t.isSticky,className:"item-value-container",children:[
94425
94769
  /* @__PURE__ */jsxRuntimeExports.jsx(RecommendationIcon,{isCOTEnabled:C,recommendations:Ie,type:"vendor",isEnabled:Boolean(xt?.isPreFilled),isMisCategorized:vt,onRecommendationClick:se,selectedValue:ye,selectedValueLabel:Se,isReviewTab:bt,isAccountOptionDisabled:_e,existingOption:{label:null!=p&&!0===isVendorTransaction(p)?p?.vendor?.name:void 0,value:null!=p&&!0===isVendorTransaction(p)?p?.vendor?.id:void 0},cotTracking:b,lineId:l.lineId,transactionId:d.transactionId,openTooltipId:v,setOpenTooltipId:R}),
94426
94770
  /* @__PURE__ */jsxRuntimeExports.jsx(SelectContainerWrapper,{children:!0===Ae?/* @__PURE__ */jsxRuntimeExports.jsx(StyledHoveredBackground,{isHovered:h,isQuickViewMode:g,children:/* @__PURE__ */jsxRuntimeExports.jsxs(ItemValue,{onClick:e=>{e.stopPropagation(),g||(k?.(),je(!1),Be(!0))},"data-testid":generateDataTestId("add-vendor-button",x),style:{display:"inline-flex",alignItems:"center",color:Colors.neutralGrey1Light,cursor:"pointer",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},children:[addPayee,!1===g&&/* @__PURE__ */jsxRuntimeExports.jsx(ChevronIconContainer,{children:/* @__PURE__ */jsxRuntimeExports.jsx(StyledArrowBottomSmall,{})})]})}):!0===Pe?/* @__PURE__ */jsxRuntimeExports.jsx(ClickAwayListener,{onClickAway:at,children:/* @__PURE__ */jsxRuntimeExports.jsx(VendorSelectContainer,{"data-testid":generateDataTestId("vendor-selection-dropdown-container",uniqueName$a(x,transactionDetailLineEntitySelection,c.toString())),children:/* @__PURE__ */jsxRuntimeExports.jsx(AutoCompleteGroupedCreatableSingleSelectCustomGroupFieldWithCOT,{name:oe,transactionId:d.transactionId,lineId:l.lineId,feedbackContext:Ce,placeholder:addPayee,valueToInfo:Te,defaultValue:{selectedOption:ft.selectedOption,selectedOptionLabel:Se,defaultOptions:ft.defaultOptions},type:"vendor",autoFocus:!Ae,style:{width:"100%"},pageSource:"list_page",transactionStatus:bt?"pending_review":"auto_categorized",isOptionRemovable:!1,customStyleConfig:s,menuIsOpen:Pe,onMenuClose:at,registerOptions:{required:!1},loadOptions:rt,showCOT:C,onCOTView:ee,menuPlacement:$,menuPortal:document.body})})}):/* @__PURE__ */jsxRuntimeExports.jsx(VendorNameTextContainer,{children:/* @__PURE__ */jsxRuntimeExports.jsxs(StyledBackgroundHover,{isHovered:h,isQuickViewMode:g,children:[null!=xt&&null!=xt.logo?/* @__PURE__ */jsxRuntimeExports.jsx(EntityLogoAvatarWithCustomFallback,{photoUrl:xt.logo.toString(),styles:{width:D$k.nameLogoWidth.valuePx(u),height:D$k.nameLogoHeight.valuePx(u)},fallbackAvatar:/* @__PURE__ */jsxRuntimeExports.jsx(EntityAvatarContainer$1,{children:/* @__PURE__ */jsxRuntimeExports.jsx(EntityAvatar,{name:xt.name})})}):null!=xt&&null!=xt.name?/* @__PURE__ */jsxRuntimeExports.jsx(EntityAvatarContainer$1,{children:/* @__PURE__ */jsxRuntimeExports.jsx(EntityAvatar,{name:xt.name})}):null,
94427
- /* @__PURE__ */jsxRuntimeExports.jsxs(VendorNameText,{onClick:dt,"data-testid":generateDataTestId("vendor-name-text",x),children:[null!=xt&&!0===Boolean(xt.name)?/* @__PURE__ */jsxRuntimeExports.jsx(TooltipWithEllipsisText,{text:xt.name,itemTextStyle:{color:h?le.colors.primary:le.colors.champion,fontSize:textStyles.standardMedium.fontSizeValue,fontWeight:textStyles.standardMedium.fontWeight}}):/* @__PURE__ */jsxRuntimeExports.jsx(NameText,{children:hyphen$8}),!1===g&&/* @__PURE__ */jsxRuntimeExports.jsx(ChevronIconContainer,{children:/* @__PURE__ */jsxRuntimeExports.jsx(StyledArrowBottomSmall,{})})]})]})})})]},r);case"category":return isJournalEntryCreditLine(M,l.postingType)?/* @__PURE__ */jsxRuntimeExports.jsx(RowItemContainer$1,{windowSize:u,wrapperWidth:t.width,widthPercentage:m,children:/* @__PURE__ */jsxRuntimeExports.jsx(RowItem$2,{windowSize:u,style:{paddingLeft:Space.sp6},isLastItem:o===e.length-1,children:/* @__PURE__ */jsxRuntimeExports.jsx(ItemText$1,{style:{textAlign:"left",width:"100%"},children:hyphen$8})})},r):Rt({isLineRecommendationsLoading:At,itemsData:t,key:r,resolvedWidthPercentage:m});case"class":{if(!A)return null;if(!0===At)/* @__PURE__ */
94771
+ /* @__PURE__ */jsxRuntimeExports.jsxs(VendorNameText,{onClick:dt,"data-testid":generateDataTestId("vendor-name-text",x),children:[null!=xt&&!0===Boolean(xt.name)?/* @__PURE__ */jsxRuntimeExports.jsx(TooltipWithEllipsisText,{text:xt.name,itemTextStyle:{color:h?le.colors.primary:le.colors.champion,fontSize:textStyles.standardMedium.fontSizeValue,fontWeight:textStyles.standardMedium.fontWeight}}):/* @__PURE__ */jsxRuntimeExports.jsx(NameText,{children:hyphen$6}),!1===g&&/* @__PURE__ */jsxRuntimeExports.jsx(ChevronIconContainer,{children:/* @__PURE__ */jsxRuntimeExports.jsx(StyledArrowBottomSmall,{})})]})]})})})]},r);case"category":return isJournalEntryCreditLine(M,l.postingType)?/* @__PURE__ */jsxRuntimeExports.jsx(RowItemContainer$1,{windowSize:u,wrapperWidth:t.width,widthPercentage:m,children:/* @__PURE__ */jsxRuntimeExports.jsx(RowItem$2,{windowSize:u,style:{paddingLeft:Space.sp6},isLastItem:o===e.length-1,children:/* @__PURE__ */jsxRuntimeExports.jsx(ItemText$1,{style:{textAlign:"left",width:"100%"},children:hyphen$6})})},r):Rt({isLineRecommendationsLoading:At,itemsData:t,key:r,resolvedWidthPercentage:m});case"class":{if(!A)return null;if(!0===At)/* @__PURE__ */
94428
94772
  return jsxRuntimeExports.jsx(RecommendationCellSkeleton,{windowSize:u,wrapperWidth:t.width,widthPercentage:m},r);const e=null!=p?.lines?p?.lines[c]:void 0;/* @__PURE__ */
94429
94773
  return jsxRuntimeExports.jsxs(RowItemContainer$1,{windowSize:u,wrapperWidth:t.width,widthPercentage:m,className:"item-value-container",children:[
94430
94774
  /* @__PURE__ */jsxRuntimeExports.jsx(RecommendationIcon,{isCOTEnabled:C,recommendations:Ie,type:"class",isReviewTab:bt,isEnabled:Boolean(l[transactionDetailLineClass]?.isPreFilled),isAccountOptionDisabled:_e,isMisCategorized:wt,onRecommendationClick:se,selectedValue:pe,selectedValueLabel:St,existingOption:{label:e?.class?.className,value:e?.class?.classId},cotTracking:b,lineId:l.lineId,transactionId:d.transactionId,openTooltipId:v,setOpenTooltipId:R}),
@@ -94439,11 +94783,11 @@ return jsxRuntimeExports.jsxs(RowItemContainer$1,{windowSize:u,wrapperWidth:t.wi
94439
94783
  /* @__PURE__ */jsxRuntimeExports.jsx(ChevronIconContainer,{children:/* @__PURE__ */jsxRuntimeExports.jsx(StyledArrowBottomSmall,{})})]})})})]},r):null;case"date":/* @__PURE__ */
94440
94784
  return jsxRuntimeExports.jsx(RowItemContainer$1,{windowSize:u,wrapperWidth:t.width,widthPercentage:m,children:/* @__PURE__ */jsxRuntimeExports.jsx(RowItem$2,{windowSize:u,isLastItem:o===e.length-1,children:/* @__PURE__ */jsxRuntimeExports.jsx(TextContainer$1,{"data-testid":generateDataTestId("date-field",uniqueName$a(x,transactionDetailLineClass,c.toString())),children:/* @__PURE__ */jsxRuntimeExports.jsx(ItemText$1,{style:{color:h?le.colors.primary:le.colors.champion},children:null!=B?B.format(dateFormat$b.visual.MMMDCommaYYYYformat):null})})})},r);case"transaction_type":{const n=isTransferConvertibleSourceType(M,T);/* @__PURE__ */
94441
94785
  return jsxRuntimeExports.jsx(RowItemContainer$1,{windowSize:u,wrapperWidth:t.width,widthPercentage:m,children:null!=O?/* @__PURE__ */jsxRuntimeExports.jsx(RowItem$2,{windowSize:u,"data-testid":generateDataTestId("transaction-type-field",uniqueName$a(x,transactionDetailLineClass,c.toString())),isLastItem:o===e.length-1,children:/* @__PURE__ */jsxRuntimeExports.jsxs(TypeTagAnchor,{className:n&&G?"select-value-container":void 0,children:[n&&q?/* @__PURE__ */jsxRuntimeExports.jsx(Tooltip$6,{title:transactionsStrings.transactionTypeDropdown.multilineNotEligibleTooltip,enterDelay:600,placement:"bottom",children:/* @__PURE__ */jsxRuntimeExports.jsx(StyledCapsule,{label:O??M})}):/* @__PURE__ */jsxRuntimeExports.jsx(StyledCapsule,{label:O??M,onClick:n&&G?()=>{K(Y,buildTypeDropdownValue(M??"expense",W,O)),z(!0)}:void 0,capsuleBackground:G&&N?le.colors.background:void 0,showChevron:n&&G}),n&&G&&N&&/* @__PURE__ */jsxRuntimeExports.jsx(ClickAwayListener,{onClickAway:()=>z(!1),children:/* @__PURE__ */jsxRuntimeExports.jsx(TypeSelectWrapper,{children:/* @__PURE__ */jsxRuntimeExports.jsx(GroupedSingleSelectFieldWithCOT,{name:Y,defaultValue:buildTypeDropdownValue(M??"expense",W,O),pageSource:"list_page",showCOT:!1,transactionStatus:bt?"pending_review":"auto_categorized",type:"category",menuIsOpen:N,autoFocus:!0,onMenuClose:()=>z(!1),customStyleConfig:V,menuPlacement:$,menuPortal:H,allowEmpty:!1,menuOptionPresentation:"typePill"})})})]})}):null},r)}case"amount":{const e=amountToString("0,0.[00]",l.amount,!0);/* @__PURE__ */
94442
- return jsxRuntimeExports.jsx(RowItemContainer$1,{windowSize:u,style:{marginRight:sp[0]},wrapperWidth:t.width,widthPercentage:m,isQuickViewMode:g,isLastItem:!0,children:/* @__PURE__ */jsxRuntimeExports.jsx(RowItem$2,{windowSize:u,isLastItem:!0,style:{justifyContent:"flex-end"},children:/* @__PURE__ */jsxRuntimeExports.jsx(TextContainer$1,{"data-testid":generateDataTestId("transaction-amount-field",uniqueName$a(x,transactionDetailLineClass,c.toString())),style:{color:h?le.colors.primary:le.colors.champion},children:e})})},r)}case"payment_account":{if("journal_entry"===M)return"credit"===l.postingType?Rt({isLineRecommendationsLoading:At,itemsData:t,key:r,resolvedWidthPercentage:m}):/* @__PURE__ */jsxRuntimeExports.jsx(RowItemContainer$1,{windowSize:u,wrapperWidth:t.width,widthPercentage:m,children:/* @__PURE__ */jsxRuntimeExports.jsx(RowItem$2,{windowSize:u,style:{paddingLeft:Space.sp6},isLastItem:o===e.length-1,children:/* @__PURE__ */jsxRuntimeExports.jsx(ItemText$1,{style:{textAlign:"left",width:"100%"},children:hyphen$8})})},r);if(!("expense"===M||"check"===M||"bill_payment"===M||"vendor_credit"===M||"credit_card_credit"===M||"deposit"===M||"sales_receipt"===M||"refund"===M||"payment"===M))/* @__PURE__ */
94443
- return jsxRuntimeExports.jsx(RowItemContainer$1,{windowSize:u,wrapperWidth:t.width,widthPercentage:m,children:/* @__PURE__ */jsxRuntimeExports.jsx(RowItem$2,{windowSize:u,style:{paddingLeft:Space.sp6},isLastItem:o===e.length-1,children:/* @__PURE__ */jsxRuntimeExports.jsx(ItemText$1,{style:{textAlign:"left",width:"100%"},children:hyphen$8})})},r);const n=p?.account?.accountName,i=p?.paymentType,a=p?.paymentTypeName,s="credit_card"===i?StyledCardsIcon:"cash"===i?StyledOfflinePaymentsIcon:"check"===i?StyledChequeIcon:"ach"===i?StyledPaymentACHIcon:StyledBankLetterIcon,c={title:empty$4,items:[{text:account+colon$2,amount:n??hyphen$8},...null!=a?[{text:method+colon$2,amount:a}]:[]]};/* @__PURE__ */
94444
- return jsxRuntimeExports.jsx(RowItemContainer$1,{windowSize:u,wrapperWidth:t.width,widthPercentage:m,children:/* @__PURE__ */jsxRuntimeExports.jsx(RowItem$2,{windowSize:u,isLastItem:o===e.length-1,children:/* @__PURE__ */jsxRuntimeExports.jsx(Tooltip$6,{display:"flex",placement:"bottom",variant:"list-description",data:c,title:n??hyphen$8,enterDelay:600,arrow:!0,style:{overflow:"hidden",minWidth:0},children:/* @__PURE__ */jsxRuntimeExports.jsxs(PaymentAccountContainer,{"data-testid":generateDataTestId("payment-account",x),style:{color:h?le.colors.primary:le.colors.champion},children:[null!=s&&/* @__PURE__ */jsxRuntimeExports.jsx(s,{style:{color:h?le.colors.primary:le.colors.champion,width:Space.sp5}}),
94445
- /* @__PURE__ */jsxRuntimeExports.jsx(ItemText$1,{style:{color:"inherit",whiteSpace:"pre-wrap"},children:n??hyphen$8})]})})})},r)}case"memo_and_receipt":{const e=p?.attachments??[],n="In-Progress"===_?.fetchState,o=t=>{if(t.stopPropagation(),0===e.length||null==p)return;if(null==nt)return void console.warn("webV2MicroServiceEndpoint is not available, cannot fetch attachments.");Ke(e[0]),We(0),He(!0);const n=e.map(e=>e.id);fetchTransactionAttachments(`${nt}/transaction_attachments`,L,{transaction_key:{transaction_id:p.id,transaction_type:p.type},attachment_ids:n}).then(e=>{Qe(e),e.length>0&&Ge(e[0])})},i=e=>{e.stopPropagation(),Ze.current?.click()};/* @__PURE__ */
94446
- return jsxRuntimeExports.jsx(RowItemContainer$1,{windowSize:u,wrapperWidth:t.width,widthPercentage:m,"data-testid":generateDataTestId("memo-field",uniqueName$a(x,transactionDetailLineClass,c.toString())),children:/* @__PURE__ */jsxRuntimeExports.jsxs(MemoReceiptColumnContainer,{className:"item-value-container",children:[null!=ne?/* @__PURE__ */jsxRuntimeExports.jsx(Tooltip$6,{display:"flex",placement:"bottom",data:ne,variant:"multi-information-points",arrow:!0,style:{maxHeight:"min(60vh, 360px)",overflowY:"auto",overflowX:"hidden"},children:/* @__PURE__ */jsxRuntimeExports.jsx(StyledMemoIcon,{"data-testid":generateDataTestId("memo-icon",x),style:{color:h?le.colors.primary:le.colors.champion}})}):/* @__PURE__ */jsxRuntimeExports.jsx(StyledHyphen,{style:{margin:0},children:hyphen$8}),n?/* @__PURE__ */jsxRuntimeExports.jsx(ActivityIndicator,{size:"Small",style:{display:"flex"},start:!0}):0===e.length?/* @__PURE__ */jsxRuntimeExports.jsx(Tooltip$6,{display:"flex",placement:"bottom",title:addReceipt,arrow:!0,enterDelay:600,children:/* @__PURE__ */jsxRuntimeExports.jsx(StyledAddRoundIcon$2,{"data-testid":generateDataTestId("upload-receipt-icon",x),style:{margin:0},onClick:e=>{e.stopPropagation(),i(e)}})}):1===e.length?/* @__PURE__ */jsxRuntimeExports.jsx(Tooltip$6,{display:"flex",placement:"bottom",title:viewReceipt$1,arrow:!0,enterDelay:600,children:/* @__PURE__ */jsxRuntimeExports.jsx(StyledDocumentsIcon,{"data-testid":generateDataTestId("view-receipt-icon",x),style:{color:h?le.colors.primary:le.colors.champion},onClick:o})}):/* @__PURE__ */jsxRuntimeExports.jsx(Tooltip$6,{display:"flex",placement:"bottom",arrow:!0,title:viewReceipts$1,enterDelay:600,children:/* @__PURE__ */jsxRuntimeExports.jsx(StyledReceiptsMultipleIcon,{"data-testid":generateDataTestId("view-receipts-icon",x),style:{color:h?le.colors.primary:le.colors.hero},onClick:o})}),
94786
+ return jsxRuntimeExports.jsx(RowItemContainer$1,{windowSize:u,style:{marginRight:sp[0]},wrapperWidth:t.width,widthPercentage:m,isQuickViewMode:g,isLastItem:!0,children:/* @__PURE__ */jsxRuntimeExports.jsx(RowItem$2,{windowSize:u,isLastItem:!0,style:{justifyContent:"flex-end"},children:/* @__PURE__ */jsxRuntimeExports.jsx(TextContainer$1,{"data-testid":generateDataTestId("transaction-amount-field",uniqueName$a(x,transactionDetailLineClass,c.toString())),style:{color:h?le.colors.primary:le.colors.champion},children:e})})},r)}case"payment_account":{if("journal_entry"===M)return"credit"===l.postingType?Rt({isLineRecommendationsLoading:At,itemsData:t,key:r,resolvedWidthPercentage:m}):/* @__PURE__ */jsxRuntimeExports.jsx(RowItemContainer$1,{windowSize:u,wrapperWidth:t.width,widthPercentage:m,children:/* @__PURE__ */jsxRuntimeExports.jsx(RowItem$2,{windowSize:u,style:{paddingLeft:Space.sp6},isLastItem:o===e.length-1,children:/* @__PURE__ */jsxRuntimeExports.jsx(ItemText$1,{style:{textAlign:"left",width:"100%"},children:hyphen$6})})},r);if(!("expense"===M||"check"===M||"bill_payment"===M||"vendor_credit"===M||"credit_card_credit"===M||"deposit"===M||"sales_receipt"===M||"refund"===M||"payment"===M))/* @__PURE__ */
94787
+ return jsxRuntimeExports.jsx(RowItemContainer$1,{windowSize:u,wrapperWidth:t.width,widthPercentage:m,children:/* @__PURE__ */jsxRuntimeExports.jsx(RowItem$2,{windowSize:u,style:{paddingLeft:Space.sp6},isLastItem:o===e.length-1,children:/* @__PURE__ */jsxRuntimeExports.jsx(ItemText$1,{style:{textAlign:"left",width:"100%"},children:hyphen$6})})},r);const n=p?.account?.accountName,i=p?.paymentType,a=p?.paymentTypeName,s="credit_card"===i?StyledCardsIcon:"cash"===i?StyledOfflinePaymentsIcon:"check"===i?StyledChequeIcon:"ach"===i?StyledPaymentACHIcon:StyledBankLetterIcon,c={title:empty$4,items:[{text:account+colon$1,amount:n??hyphen$6},...null!=a?[{text:method+colon$1,amount:a}]:[]]};/* @__PURE__ */
94788
+ return jsxRuntimeExports.jsx(RowItemContainer$1,{windowSize:u,wrapperWidth:t.width,widthPercentage:m,children:/* @__PURE__ */jsxRuntimeExports.jsx(RowItem$2,{windowSize:u,isLastItem:o===e.length-1,children:/* @__PURE__ */jsxRuntimeExports.jsx(Tooltip$6,{display:"flex",placement:"bottom",variant:"list-description",data:c,title:n??hyphen$6,enterDelay:600,arrow:!0,style:{overflow:"hidden",minWidth:0},children:/* @__PURE__ */jsxRuntimeExports.jsxs(PaymentAccountContainer,{"data-testid":generateDataTestId("payment-account",x),style:{color:h?le.colors.primary:le.colors.champion},children:[null!=s&&/* @__PURE__ */jsxRuntimeExports.jsx(s,{style:{color:h?le.colors.primary:le.colors.champion,width:Space.sp5}}),
94789
+ /* @__PURE__ */jsxRuntimeExports.jsx(ItemText$1,{style:{color:"inherit",whiteSpace:"pre-wrap"},children:n??hyphen$6})]})})})},r)}case"memo_and_receipt":{const e=p?.attachments??[],n="In-Progress"===_?.fetchState,o=t=>{if(t.stopPropagation(),0===e.length||null==p)return;if(null==nt)return void console.warn("webV2MicroServiceEndpoint is not available, cannot fetch attachments.");Ke(e[0]),We(0),He(!0);const n=e.map(e=>e.id);fetchTransactionAttachments(`${nt}/transaction_attachments`,L,{transaction_key:{transaction_id:p.id,transaction_type:p.type},attachment_ids:n}).then(e=>{Qe(e),e.length>0&&Ge(e[0])})},i=e=>{e.stopPropagation(),Ze.current?.click()};/* @__PURE__ */
94790
+ return jsxRuntimeExports.jsx(RowItemContainer$1,{windowSize:u,wrapperWidth:t.width,widthPercentage:m,"data-testid":generateDataTestId("memo-field",uniqueName$a(x,transactionDetailLineClass,c.toString())),children:/* @__PURE__ */jsxRuntimeExports.jsxs(MemoReceiptColumnContainer,{className:"item-value-container",children:[null!=ne?/* @__PURE__ */jsxRuntimeExports.jsx(Tooltip$6,{display:"flex",placement:"bottom",data:ne,variant:"multi-information-points",arrow:!0,style:{maxHeight:"min(60vh, 360px)",overflowY:"auto",overflowX:"hidden"},children:/* @__PURE__ */jsxRuntimeExports.jsx(StyledMemoIcon,{"data-testid":generateDataTestId("memo-icon",x),style:{color:h?le.colors.primary:le.colors.champion}})}):/* @__PURE__ */jsxRuntimeExports.jsx(StyledHyphen,{style:{margin:0},children:hyphen$6}),n?/* @__PURE__ */jsxRuntimeExports.jsx(ActivityIndicator,{size:"Small",style:{display:"flex"},start:!0}):0===e.length?/* @__PURE__ */jsxRuntimeExports.jsx(Tooltip$6,{display:"flex",placement:"bottom",title:addReceipt,arrow:!0,enterDelay:600,children:/* @__PURE__ */jsxRuntimeExports.jsx(StyledAddRoundIcon$2,{"data-testid":generateDataTestId("upload-receipt-icon",x),style:{margin:0},onClick:e=>{e.stopPropagation(),i(e)}})}):1===e.length?/* @__PURE__ */jsxRuntimeExports.jsx(Tooltip$6,{display:"flex",placement:"bottom",title:viewReceipt$1,arrow:!0,enterDelay:600,children:/* @__PURE__ */jsxRuntimeExports.jsx(StyledDocumentsIcon,{"data-testid":generateDataTestId("view-receipt-icon",x),style:{color:h?le.colors.primary:le.colors.champion},onClick:o})}):/* @__PURE__ */jsxRuntimeExports.jsx(Tooltip$6,{display:"flex",placement:"bottom",arrow:!0,title:viewReceipts$1,enterDelay:600,children:/* @__PURE__ */jsxRuntimeExports.jsx(StyledReceiptsMultipleIcon,{"data-testid":generateDataTestId("view-receipts-icon",x),style:{color:h?le.colors.primary:le.colors.hero},onClick:o})}),
94447
94791
  /* @__PURE__ */jsxRuntimeExports.jsx(FileInputElement,{name:`transaction-receipt-${d.transactionId}`,fileRef:Ze,sizeLimit:SizeLimit32MB,multiple:!0,acceptableTypes:[...SUPPORTED_TRANSACTION_LINE_ATTACHMENT_FILE_TYPES],onFileChange:e=>{const t=e.target.files;if(null!=t&&t.length>0){const e=Array.from(t);P(S,d.transactionId,M??empty$4,e,e.map(e=>e.name))}},onFileSizeError:()=>{}})]})},r)}}})})(),ze&&jt.length>0&&null!=Tt?createPortal(
94448
94792
  /* @__PURE__ */jsxRuntimeExports.jsx(DocumentWithThumbnailView,{allFiles:qe,fileSource:Ue,file:Tt,title:Tt.fileName,attachments:jt,showNavigation:!1,setFileSource:Ge,setShowFullScreenView:He,onCrossClick:()=>{He(!1),Ge(null),Qe([]),Ke(void 0),We(0)},onNextClick:()=>{const e=(Ve+1)%jt.length;We(e),Ke(jt[e]),null!=qe[e]&&Ge(qe[e])},onPreviousClick:()=>{const e=(Ve-1+jt.length)%jt.length;We(e),Ke(jt[e]),null!=qe[e]&&Ge(qe[e])},setSelectedFileAttachment:e=>{Ke("function"==typeof e?t=>e(t??jt[0]):e)},handleTouchStart:e=>Je(e.targetTouches[0].clientX),handleTouchMove:e=>tt(e.targetTouches[0].clientX),handleTouchEnd:()=>{if(Xe-et>50&&0!==et&&Ve<jt.length-1){const e=Ve+1;We(e),Ke(jt[e]),null!=qe[e]&&Ge(qe[e]),Je(0),tt(0)}else if(Xe-et<-50&&0!==et&&Ve>0){const e=Ve-1;We(e),Ke(jt[e]),null!=qe[e]&&Ge(qe[e]),Je(0),tt(0)}}}),document.body):null]})},RecommendationIconContent=({isEnabled:e,isMisCategorized:t,hasRecommendations:n,isTooltipVisible:o=!1,type:i})=>e?o?/* @__PURE__ */jsxRuntimeExports.jsx(StyledAISelectedFilledIconPlain,{"data-testid":generateDataTestId("recommendation-icon",i)}):/* @__PURE__ */jsxRuntimeExports.jsx(StyledAIIconSelectedPlain,{className:"ai-icon-selected-plain","data-testid":generateDataTestId("recommendation-icon",i)}):!e&&t||n?o?/* @__PURE__ */jsxRuntimeExports.jsx(StyledAIFilledIcon,{"data-testid":generateDataTestId("recommendation-icon",i)}):/* @__PURE__ */jsxRuntimeExports.jsx(StyledAIIcon$1,{"data-testid":generateDataTestId("recommendation-icon",i)}):null,RecommendationIconContainer=({children:e})=>/* @__PURE__ */jsxRuntimeExports.jsx(COTContent,{children:e}),RecommendationIcon=({recommendations:e,isCOTEnabled:t,type:n,isReviewTab:o,selectedValueLabel:i,isEnabled:r=!1,isMisCategorized:a=!1,selectedValue:s,existingOption:l,cotTracking:c,lineId:d,openTooltipId:p,transactionId:u,isAccountOptionDisabled:m,onRecommendationClick:h,setOpenTooltipId:g})=>{const x=useMemo(()=>`${u}:${d}:${n}`,[u,d,n]),f=p===x,y=useToolkitContext().analytics,{createAlternateRecommendationCallback:S}=useCOTAnalytics(),C=useCallback(t=>{const r=e[1],a=e[0];S(n,{currentValue:i??empty$4,transactionCurrentStatus:o?"pending_review":"auto_categorized",transactionPage:"list_page",cotTracking:c?{transactionId:u,lineId:d,onCOTView:(e,t,n,o)=>{c.onCOTView?.(e,t,n,o)}}:void 0},r,a)(t)},[S,e,i,o,n,c,d,u]),$=createCOTDataFromRecommendations(e,n,t,l,"list_page",o?"pending_review":"auto_categorized",h,C,s,m),b=hasRecommendationsForType(e,n),v=useCallback(()=>{g(x);const e=$?.recommendations[0]?.cot??[],t=$?.recommendations[1]?.cot??[],r=t.length>0;if(y.trackTransactionCotView({recommendationFor:n,currentValue:i??empty$4,recommendation:$?.recommendations[0]?.name??empty$4,recommendationCot:e,isRecommendationCotAvailable:e.length>0,recommendationReason:$?.recommendations[0]?.reason??empty$4,recommendationConfidencePercentage:$?.recommendations[0]?.confidencePercentage??null,recommendationConfidenceLevel:toConfidenceLevelType(getConfidenceLevel($?.recommendations[0]?.confidencePercentage).toLocaleLowerCase()),alternativeRecommendation:$?.recommendations[1]?.name??empty$4,alternativeRecommendationCot:t,isAlternativeRecommendationCotAvailable:r,alternativeRecommendationReason:$?.recommendations[1]?.reason??empty$4,alternativeRecommendationConfidencePercentage:$?.recommendations[1]?.confidencePercentage??null,alternativeRecommendationConfidenceLevel:r?toConfidenceLevelType(getConfidenceLevel($?.recommendations[1]?.confidencePercentage).toLocaleLowerCase()):null,transactionCurrentStatus:o?"pending_review":"auto_categorized",transactionPage:"list_page",transactionId:u??null,lineId:d??null}),null!=c?.onCOTView){const e=getCOTRecommendationSourceToTrack($);null!=e&&c.onCOTView(d,u,n,e)}},[y,$,o,i,n,d,u,x,g]),E=useCallback(()=>{p===x&&g(void 0)},[p,x,g]),w=useMemo(()=>!(!1===Boolean(s)||!b)&&e.some(e=>"vendor"===n&&null!=e.vendor?e.vendor.id===s||e.vendor.qboId===s:"category"===n&&null!=e.account?e.account.qboId===s||e.account.accountId===s:"class"===n&&null!=e.class&&e.class.classId===s),[s,b,e,n]);if(!b)/* @__PURE__ */
94449
94793
  return jsxRuntimeExports.jsx(COTContent,{});const R=r||w;return $?/* @__PURE__ */jsxRuntimeExports.jsx(RecommendationIconContainer,{children:/* @__PURE__ */jsxRuntimeExports.jsx(Tooltip$6,{variant:"chain-of-thought",data:$,placement:"bottom-start",disableIntersectionObserver:!0,position:"static",display:"block",open:f,style:{width:"auto",height:"auto"},leaveDelay:200,onOpen:v,onClose:E,children:/* @__PURE__ */jsxRuntimeExports.jsx(COTContentWrapper,{"data-testid":generateDataTestId("recommendation-icon",n),children:/* @__PURE__ */jsxRuntimeExports.jsx(RecommendationIconContent,{isEnabled:R,isMisCategorized:a,hasRecommendations:b,isTooltipVisible:f})})})}):/* @__PURE__ */jsxRuntimeExports.jsx(RecommendationIconContainer,{children:/* @__PURE__ */jsxRuntimeExports.jsx(RecommendationIconContent,{isEnabled:R,isMisCategorized:a,hasRecommendations:b,isTooltipVisible:f,type:n})})},TransactionCategorizationListEmptyRow=({isAccountingClassesEnabled:e,showProjectField:t})=>{const n=useWindowSizeContext(),o=useQuickViewMode(),i=useFlexibleWidth(),r=o?compressedTransactionCategorizationHeaderItemsData:getTransactionCategorizationHeaderItemsData(e,t);/* @__PURE__ */
@@ -95102,14 +95446,14 @@ return jsxRuntimeExports.jsx(Container$o,{ref:W,"data-testid":generateDataTestId
95102
95446
  display: flex;
95103
95447
  flex-direction: column;
95104
95448
  width: 100%;
95105
- `,ListTable=e=>{const{accountListNestedAccountHierarchy:t,baseTransactionSearchFetchState:n,baseTransactionSearchResults:o,classListNestedAccountHierarchy:i,currentFooterFormId:r,filters:a,onJeAccountSettingsChange:s,onSaveJeAccountSettingsClick:l,onSaveSchedule:c,onScheduleTypeChange:d,onSearchBaseTransaction:p,onViewTransaction:u,newScheduleLocalData:m,initialSelectedBaseTransaction:h,isAccrualEnabled:g,onNewScheduleFormChange:x,setResetJeAccountSettingsForm:f,expenseAutomationViewSelector:y,isAccountingClassesEnabled:S,isProjectsTransactionsEnabled:C,isTransactionActivityEnabled:$,authParams:b,receiptUploadEndpoint:v,companyId:E,vendorSearchAutoCompleteActions:w,vendorSearchAutoCompleteData:R,enableMonthEndInsightsZeniGPTFeature:A,monthEndInsightsPreviewMode:j,monthEndInsightsCustomerRequestData:T,allThreadsSectionOpen:I,loggedInUser:k,isCOTEnabled:L,setCurrentFooterFormId:D,onFetchRecommendationsForEntityCategorization:_,onFetchRecommendationsForEntityCategorizationWithCustomer:P,onTransactionCategorizationRowClick:B,onFetchMissingReceiptsList:M,onMissingReceiptsRowClick:O,onUploadReceiptAttachment:F,onUploadReceiptComplete:N,onUploadReceiptFetchStatus:z,onReconTabColumnSortConfigChanged:H,onReloadReconciliationListPage:V,onUpdateReconcileTabLocalData:W,onUpdateMissingReceiptsUIState:U,onUpdateJESchedulesUIState:G,onFetchTransactionCategorizationList:q,onUpdateTransactionCategorizationUIState:Q,onUpdateScrollYOffSetTransactionCategorizationUIState:Y,handleJeScheduleClick:K,onOneTimeAccrualClick:Z,onOpenMatch:X,onOneTimeAccrualFeedback:J,ignoreRecommendedJeSchedule:ee,onJESchedulesFormDataChange:te,onPostJESchedule:ne,onToggleCreatedGroupCollapsed:oe,onTogglePendingGroupCollapsed:ie,onUpdateJEScheduleTypeFilter:re,setLocalDataForCategoryAndClass:ae,resetTransactionCategorizationLocalData:se,updateSelectedVendorForTransaction:le,onSaveUpdateTransactionCategorization:ce,onUpdateSelectedCheckboxTransactionIds:de,improveMonthEndInsightsUsingZeniGPTClick:pe,onRemoveFileAttachment:ue,onUpdateFileAttachment:me,onCloseAllThreadsSection:he,onEditMonthEndInsightsClick:ge,previewMonthEndReport:xe,saveMonthEndReport:fe,onOpenFileAttachmentSnackBar:ye,onCloseFileAttachmentSnackBar:Se,onClickCustomerRequest:Ce,sendMonthEndReport:$e,markAsReview:be,onReloadPage:ve,updateOperatingExpensesIdsForReview:Ee,onFetchReimbursementView:we,updateSectionIdsForReview:Re,onUpdateFluxAnalysisUIState:Ae,fetchFluxViewOnScroll:je,onFetchFluxViewList:Te,setIsJeAccountSettingsOpened:Ie,isCreatingNewSchedule:ke,setIsCreatingNewSchedule:Le,initialScheduleDetailsMode:De,initialScheduleType:_e,onReviewClicked:Pe,setOpenDrawerClicked:Be,onEstablishConnectionClick:Me,onFetchLinkTokenClick:Oe,updateReconReviewTabLocalData:Fe,onReconReviewTabColumnSortConfigChanged:Ne,onSaveReconciliation:ze,onSaveReconciliationReview:He,onReconMatchedTransactionClick:Ve,onAddStatementClick:We,redirectToVendorDetailPage:Ue,onOpenTransferRightPanel:Ge,isCreateTransferEntryFromExpenseEnabled:qe,setActivityLogTransactionId:Qe,onReconNodeCollapseToggled:Ye,onExcludeAccountFromReconciliation:Ke,onIncludeAccountIntoReconciliation:Ze,isReconV3Enabled:Xe,onClearMatchNewModal:Je,onCloseMatchNewModal:et,onIgnoreMatchSuggestion:tt,onMatchAndReverse:nt,onOpenMatchNewModal:ot,onSearchMatchAccruals:it,onSearchMatchTransactions:rt,onUndoReversal:at,onUpdateActualMatchingUIState:st}=e,{currentSelectedView:lt,missingReceipts:ct,transactionView:dt,selectedPeriod:pt,monthEndInsights:ut,selectedTransactionCategorizationTab:mt,reconciliation:ht}=y;switch(lt){case"transaction_categorization":if("Completed"===dt.fetchState&&0===dt.transactionLocalData.length){const{title:e,subTitle:t}=getNavBarHeaderData(lt).allDoneText,n=hasActiveSearchOrFilters(dt.uiState.searchString??"",a);/* @__PURE__ */
95106
- return jsxRuntimeExports.jsx(EmptyTableSection,{tab:lt,title:n&&emptyStates?.noSearchResults?.title?emptyStates.noSearchResults.title:e,subTitle:n&&emptyStates?.noSearchResults?.subTitle?emptyStates.noSearchResults.subTitle:t,useNoSearchResultIcon:n})}/* @__PURE__ */
95107
- return jsxRuntimeExports.jsx(TransactionCategorizationListPage,{companyId:E,setCurrentFooterFormId:D,selectedPeriod:pt,selectedTab:mt,sectionId:transactionCategorizationListTableSectionId,transactionView:dt,authParams:b,isAccountingClassesEnabled:S,isProjectsTransactionsEnabled:C,isTransactionActivityEnabled:$,onUpdateTransactionCategorizationUIState:Q,onUpdateScrollYOffSetTransactionCategorizationUIState:Y,onFetchTransactionCategorizationList:q,onTransactionCategorizationRowClick:B,setLocalDataForCategoryAndClass:ae,resetTransactionCategorizationLocalData:se,updateSelectedVendorForTransaction:le,onSaveUpdateTransactionCategorization:ce,onUpdateSelectedCheckboxTransactionIds:de,vendorSearchAutoCompleteActions:w,vendorSearchAutoCompleteData:R,onFetchRecommendationsForEntityCategorization:_,onFetchRecommendationsForEntityCategorizationWithCustomer:P,isCOTEnabled:L,isCreateTransferEntryFromExpenseEnabled:qe,onOpenTransferRightPanel:Ge,setActivityLogTransactionId:Qe,onUploadTransactionReceipt:e.onUploadTransactionReceipt});case"je_schedules":/* @__PURE__ */
95108
- return jsxRuntimeExports.jsx(JESchedulePage,{closeMonth:e.closeMonth,isMatchPanelOpen:e.isMatchPanelOpen,isSchedulePanelOpen:e.isSchedulePanelOpen,matchPanelContent:e.matchPanelContent,schedulePanelContent:e.schedulePanelContent,schedulePendingDiscardConfirmation:e.schedulePendingDiscardConfirmation,accountListNestedAccountHierarchy:t,baseTransactionSearchFetchState:n,baseTransactionSearchResults:o,classListNestedAccountHierarchy:i,allDepreciationAccountListNestedAccountHierarchy:e.allDepreciationAccountListNestedAccountHierarchy,newAccrualAccountsView:e.newAccrualAccountsView,newScheduleSaveStatus:e.newScheduleSaveStatus,onCreateAccruedSchedule:e.onCreateAccruedSchedule,onCreateOneTimeAccrual:e.onCreateOneTimeAccrual,isAccountingClassesEnabled:S,setIsJeAccountSettingsOpened:Ie,isCreatingNewSchedule:ke,setIsCreatingNewSchedule:Le,initialScheduleDetailsMode:De,initialScheduleType:_e,onSaveSchedule:c,onScheduleTypeChange:d,onSearchBaseTransaction:p,onViewTransaction:u,isAccrualEnabled:g,newScheduleLocalData:m,initialSelectedBaseTransaction:h,onNewScheduleFormChange:x,expenseAutomationViewSelector:y,setResetJeAccountSettingsForm:f,currentFooterFormId:r,onJeAccountSettingsChange:s,onSaveJeAccountSettingsClick:l,setCurrentFooterFormId:D,handleJeScheduleClick:K,onOneTimeAccrualClick:Z,onOneTimeAccrualFeedback:J,ignoreRecommendedJeSchedule:ee,onJESchedulesFormDataChange:te,onPostJESchedule:ne,onRevertJeSchedule:e.onRevertJeSchedule,onToggleCreatedGroupCollapsed:oe,onTogglePendingGroupCollapsed:ie,onUpdateJEScheduleTypeFilter:re,onUpdateJESchedulesUIState:G,vendorSearchAutoCompleteActions:w,vendorSearchAutoCompleteData:R,onClearMatchNewModal:Je,onCloseMatchNewModal:et,onIgnoreMatchSuggestion:tt,onMatchAndReverse:nt,onOpenMatch:X,onOpenMatchNewModal:ot,onSearchMatchAccruals:it,onSearchMatchTransactions:rt,onUndoReversal:at,onUpdateActualMatchingUIState:st});case"missing_receipts":return"Completed"===ct.fetchState&&0===ct.transactions.length?/* @__PURE__ */jsxRuntimeExports.jsx(EmptyTableSection,{tab:lt,title:getNavBarHeaderData(lt).allDoneText.title,subTitle:getNavBarHeaderData(lt).allDoneText.subTitle}):/* @__PURE__ */jsxRuntimeExports.jsx(MissingReceiptsListTable,{onUpdateMissingReceiptsUIState:U,onFetchMissingReceiptsList:M,missingReceipts:ct,receiptUploadEndpoint:v,authParams:b,isAccountingClassesEnabled:S,selectedPeriod:pt,onMissingReceiptsRowClick:O,onUploadReceiptComplete:N,onUploadReceiptFetchStatus:z,onUploadReceiptAttachment:F});case"month_end_insights":if(null!=ut&&null!=y.monthEndCloseChecksView.monthEndCloseChecks){if("Not-Started"===ut.fetchState||"In-Progress"===ut.fetchState||"Not-Started"===ut.companyMonthEndReportTemplatesData.fetchState||"In-Progress"===ut.companyMonthEndReportTemplatesData.fetchState)/* @__PURE__ */
95109
- return jsxRuntimeExports.jsx(BusyIndication,{fetchState:"In-Progress"});{const e={application:"cockpit",companyId:E,entityId:E,tab:"expense_automation",isGlobalComment:!1,entityType:"expense_automation.monthEndEmail",companyName:ut.companyName,url:window.location.href},{url:t,...n}=e,o={...n};/* @__PURE__ */
95110
- return jsxRuntimeExports.jsx(MonthEndInsightsContainer,{children:/* @__PURE__ */jsxRuntimeExports.jsx(MonthEndInsightsForm,{allThreadsSectionOpen:I,customerRequestData:T,companyId:E,enableZeniGPTFeature:A,filterMetaData:o,selectedPeriod:y.selectedPeriod,improveUsingZeniGPTClick:pe,isZeniUser:k?.userEmail?.includes("zeni.ai")??!1,monthEndReportView:ut,newThreadMetadata:e,onClickCustomerRequest:Ce,onCloseAllThreadsSection:he,onCloseFileAttachmentSnackBar:Se,onOpenFileAttachmentSnackBar:ye,onRemoveFileAttachment:ue,onUpdateFileAttachment:me,previewMode:j,previewMonthEndReport:xe,saveMonthEndReport:fe,onEditClick:ge,sendMonthEndReport:$e})})}}return null;case"flux_analysis":{const e=y.fluxAnalysis,t=e.fetchStatus.fetchState,n=e.sections.generalExpense.vendors.length>0||e.sections.reimbursement.vendors.length>0;return"Not-Started"===t||"In-Progress"===t&&!n?/* @__PURE__ */jsxRuntimeExports.jsx(FluxAnalysisTableSkeleton,{}):"Completed"===t&&0===e.sections.generalExpense.vendors.length&&0===e.sections.reimbursement.vendors.length?/* @__PURE__ */jsxRuntimeExports.jsx(EmptyTableSection,{tab:lt,title:getNavBarHeaderData(lt).allDoneText.title,subTitle:getNavBarHeaderData(lt).allDoneText.subTitle}):/* @__PURE__ */jsxRuntimeExports.jsx(FluxAnalysisTable,{isAccountingClassesEnabled:S,fluxAnalysis:e,selectedPeriod:y.selectedPeriod,markAsReview:be,onReloadPage:ve,updateOperatingExpensesIdsForReview:Ee,updateSectionIdsForReview:Re,onUpdateFluxAnalysisUIState:Ae,setCurrentFooterFormId:D,fetchFluxViewOnScroll:je,onFetchFluxViewList:Te,onFetchReimbursementView:we,redirectToVendorDetailPage:Ue})}case"reconciliation":/* @__PURE__ */
95111
- return jsxRuntimeExports.jsx(AccountReconciliationPage,{onReloadReconciliationListPage:V,currentFooterFormId:r,isAccountingClassesEnabled:S,reconciliation:ht,companyId:E,vendorSearchAutoCompleteActions:w,vendorSearchAutoCompleteData:R,onReviewClicked:Pe,setOpenDrawerClicked:Be,setCurrentFooterFormId:D,onReconTabColumnSortConfigChanged:H,onUpdateReconcileTabLocalData:W,onEstablishConnectionClick:Me,onFetchLinkTokenClick:Oe,updateReconReviewTabLocalData:Fe,onReconReviewTabColumnSortConfigChanged:Ne,onSaveReconciliation:ze,onSaveReconciliationReview:He,onReconMatchedTransactionClick:Ve,onAddStatementClick:We,onReconNodeCollapseToggled:Ye,onExcludeAccountFromReconciliation:Ke,onIncludeAccountIntoReconciliation:Ze,isReconV3Enabled:Xe});default:/* @__PURE__ */
95112
- return jsxRuntimeExports.jsx(EmptyTableSection,{tab:lt,title:getNavBarHeaderData(lt).allDoneText.title,subTitle:getNavBarHeaderData(lt).allDoneText.subTitle})}};function TableSection(e){const t=useWindowSizeContext();/* @__PURE__ */
95449
+ `,ListTable=e=>{const{accountListNestedAccountHierarchy:t,baseTransactionSearchFetchState:n,baseTransactionSearchResults:o,classListNestedAccountHierarchy:i,currentFooterFormId:r,filters:a,onJeAccountSettingsChange:s,onSaveJeAccountSettingsClick:l,onSaveSchedule:c,onScheduleTypeChange:d,onSearchBaseTransaction:p,onViewTransaction:u,newScheduleLocalData:m,initialSelectedBaseTransaction:h,isAccrualEnabled:g,onNewScheduleFormChange:x,setResetJeAccountSettingsForm:f,expenseAutomationViewSelector:y,isAccountingClassesEnabled:S,isProjectsTransactionsEnabled:C,isTransactionActivityEnabled:$,authParams:b,receiptUploadEndpoint:v,companyId:E,vendorSearchAutoCompleteActions:w,vendorSearchAutoCompleteData:R,enableMonthEndInsightsZeniGPTFeature:A,monthEndInsightsPreviewMode:j,monthEndInsightsCustomerRequestData:T,allThreadsSectionOpen:I,loggedInUser:k,isCOTEnabled:L,setCurrentFooterFormId:D,onFetchRecommendationsForEntityCategorization:_,onFetchRecommendationsForEntityCategorizationWithCustomer:P,onTransactionCategorizationRowClick:B,onFetchMissingReceiptsList:M,onMissingReceiptsRowClick:O,onUploadReceiptAttachment:F,onUploadReceiptComplete:N,onUploadReceiptFetchStatus:z,onReconTabColumnSortConfigChanged:H,onReloadReconciliationListPage:V,onUpdateReconcileTabLocalData:W,onUpdateMissingReceiptsUIState:U,onUpdateJESchedulesUIState:G,onFetchTransactionCategorizationList:q,onUpdateTransactionCategorizationUIState:Q,onUpdateScrollYOffSetTransactionCategorizationUIState:Y,handleJeScheduleClick:K,onOneTimeAccrualClick:Z,onOpenMatch:X,onOneTimeAccrualFeedback:J,ignoreRecommendedJeSchedule:ee,onJESchedulesFormDataChange:te,onPostJESchedule:ne,onToggleCreatedGroupCollapsed:oe,onTogglePendingGroupCollapsed:ie,onUpdateJEScheduleTypeFilter:re,setLocalDataForCategoryAndClass:ae,resetTransactionCategorizationLocalData:se,updateSelectedVendorForTransaction:le,onSaveUpdateTransactionCategorization:ce,onUpdateSelectedCheckboxTransactionIds:de,improveMonthEndInsightsUsingZeniGPTClick:pe,onRemoveFileAttachment:ue,onUpdateFileAttachment:me,onCloseAllThreadsSection:he,onEditMonthEndInsightsClick:ge,previewMonthEndReport:xe,saveMonthEndReport:fe,onOpenFileAttachmentSnackBar:ye,onCloseFileAttachmentSnackBar:Se,onClickCustomerRequest:Ce,sendMonthEndReport:$e,markAsReview:be,onReloadPage:ve,updateOperatingExpensesIdsForReview:Ee,onFetchReimbursementView:we,updateSectionIdsForReview:Re,onUpdateFluxAnalysisUIState:Ae,fetchFluxViewOnScroll:je,onFetchFluxViewList:Te,setIsJeAccountSettingsOpened:Ie,isCreatingNewSchedule:ke,setIsCreatingNewSchedule:Le,initialScheduleDetailsMode:De,initialScheduleType:_e,onReviewClicked:Pe,setOpenDrawerClicked:Be,onEstablishConnectionClick:Me,onFetchLinkTokenClick:Oe,updateReconReviewTabLocalData:Fe,onReconReviewTabColumnSortConfigChanged:Ne,onSaveReconciliation:ze,onSaveReconciliationReview:He,onReconMatchedTransactionClick:Ve,onAddStatementClick:We,redirectToVendorDetailPage:Ue,onOpenTransferRightPanel:Ge,isCreateTransferEntryFromExpenseEnabled:qe,setActivityLogTransactionId:Qe,onReconNodeCollapseToggled:Ye,onExcludeAccountFromReconciliation:Ke,onIncludeAccountIntoReconciliation:Ze,isReconV3Enabled:Xe,onClearMatchNewModal:Je,onCloseMatchNewModal:et,onIgnoreMatchSuggestion:tt,onMatchAndReverse:nt,onOpenBill:ot,onOpenMatchNewModal:it,onSearchMatchAccruals:rt,onSearchMatchTransactions:at,onUndoReversal:st,onUpdateActualMatchingUIState:lt}=e,{currentSelectedView:ct,missingReceipts:dt,transactionView:pt,selectedPeriod:ut,monthEndInsights:mt,selectedTransactionCategorizationTab:ht,reconciliation:gt}=y;switch(ct){case"transaction_categorization":if("Completed"===pt.fetchState&&0===pt.transactionLocalData.length){const{title:e,subTitle:t}=getNavBarHeaderData(ct).allDoneText,n=hasActiveSearchOrFilters(pt.uiState.searchString??"",a);/* @__PURE__ */
95450
+ return jsxRuntimeExports.jsx(EmptyTableSection,{tab:ct,title:n&&emptyStates?.noSearchResults?.title?emptyStates.noSearchResults.title:e,subTitle:n&&emptyStates?.noSearchResults?.subTitle?emptyStates.noSearchResults.subTitle:t,useNoSearchResultIcon:n})}/* @__PURE__ */
95451
+ return jsxRuntimeExports.jsx(TransactionCategorizationListPage,{companyId:E,setCurrentFooterFormId:D,selectedPeriod:ut,selectedTab:ht,sectionId:transactionCategorizationListTableSectionId,transactionView:pt,authParams:b,isAccountingClassesEnabled:S,isProjectsTransactionsEnabled:C,isTransactionActivityEnabled:$,onUpdateTransactionCategorizationUIState:Q,onUpdateScrollYOffSetTransactionCategorizationUIState:Y,onFetchTransactionCategorizationList:q,onTransactionCategorizationRowClick:B,setLocalDataForCategoryAndClass:ae,resetTransactionCategorizationLocalData:se,updateSelectedVendorForTransaction:le,onSaveUpdateTransactionCategorization:ce,onUpdateSelectedCheckboxTransactionIds:de,vendorSearchAutoCompleteActions:w,vendorSearchAutoCompleteData:R,onFetchRecommendationsForEntityCategorization:_,onFetchRecommendationsForEntityCategorizationWithCustomer:P,isCOTEnabled:L,isCreateTransferEntryFromExpenseEnabled:qe,onOpenTransferRightPanel:Ge,setActivityLogTransactionId:Qe,onUploadTransactionReceipt:e.onUploadTransactionReceipt});case"je_schedules":/* @__PURE__ */
95452
+ return jsxRuntimeExports.jsx(JESchedulePage,{closeMonth:e.closeMonth,isMatchPanelOpen:e.isMatchPanelOpen,isSchedulePanelOpen:e.isSchedulePanelOpen,matchPanelContent:e.matchPanelContent,schedulePanelContent:e.schedulePanelContent,schedulePendingDiscardConfirmation:e.schedulePendingDiscardConfirmation,accountListNestedAccountHierarchy:t,baseTransactionSearchFetchState:n,baseTransactionSearchResults:o,classListNestedAccountHierarchy:i,allDepreciationAccountListNestedAccountHierarchy:e.allDepreciationAccountListNestedAccountHierarchy,newAccrualAccountsView:e.newAccrualAccountsView,newScheduleSaveStatus:e.newScheduleSaveStatus,onCreateAccruedSchedule:e.onCreateAccruedSchedule,onCreateOneTimeAccrual:e.onCreateOneTimeAccrual,isAccountingClassesEnabled:S,setIsJeAccountSettingsOpened:Ie,isCreatingNewSchedule:ke,setIsCreatingNewSchedule:Le,initialScheduleDetailsMode:De,initialScheduleType:_e,onSaveSchedule:c,onScheduleTypeChange:d,onSearchBaseTransaction:p,onViewTransaction:u,isAccrualEnabled:g,newScheduleLocalData:m,initialSelectedBaseTransaction:h,onNewScheduleFormChange:x,expenseAutomationViewSelector:y,setResetJeAccountSettingsForm:f,currentFooterFormId:r,onJeAccountSettingsChange:s,onSaveJeAccountSettingsClick:l,setCurrentFooterFormId:D,handleJeScheduleClick:K,onOneTimeAccrualClick:Z,onOneTimeAccrualFeedback:J,ignoreRecommendedJeSchedule:ee,onJESchedulesFormDataChange:te,onPostJESchedule:ne,onRevertJeSchedule:e.onRevertJeSchedule,onToggleCreatedGroupCollapsed:oe,onTogglePendingGroupCollapsed:ie,onUpdateJEScheduleTypeFilter:re,onUpdateJESchedulesUIState:G,vendorSearchAutoCompleteActions:w,vendorSearchAutoCompleteData:R,onClearMatchNewModal:Je,onCloseMatchNewModal:et,onIgnoreMatchSuggestion:tt,onMatchAndReverse:nt,onOpenBill:ot,onOpenMatch:X,onOpenMatchNewModal:it,onSearchMatchAccruals:rt,onSearchMatchTransactions:at,onUndoReversal:st,onUpdateActualMatchingUIState:lt});case"missing_receipts":return"Completed"===dt.fetchState&&0===dt.transactions.length?/* @__PURE__ */jsxRuntimeExports.jsx(EmptyTableSection,{tab:ct,title:getNavBarHeaderData(ct).allDoneText.title,subTitle:getNavBarHeaderData(ct).allDoneText.subTitle}):/* @__PURE__ */jsxRuntimeExports.jsx(MissingReceiptsListTable,{onUpdateMissingReceiptsUIState:U,onFetchMissingReceiptsList:M,missingReceipts:dt,receiptUploadEndpoint:v,authParams:b,isAccountingClassesEnabled:S,selectedPeriod:ut,onMissingReceiptsRowClick:O,onUploadReceiptComplete:N,onUploadReceiptFetchStatus:z,onUploadReceiptAttachment:F});case"month_end_insights":if(null!=mt&&null!=y.monthEndCloseChecksView.monthEndCloseChecks){if("Not-Started"===mt.fetchState||"In-Progress"===mt.fetchState||"Not-Started"===mt.companyMonthEndReportTemplatesData.fetchState||"In-Progress"===mt.companyMonthEndReportTemplatesData.fetchState)/* @__PURE__ */
95453
+ return jsxRuntimeExports.jsx(BusyIndication,{fetchState:"In-Progress"});{const e={application:"cockpit",companyId:E,entityId:E,tab:"expense_automation",isGlobalComment:!1,entityType:"expense_automation.monthEndEmail",companyName:mt.companyName,url:window.location.href},{url:t,...n}=e,o={...n};/* @__PURE__ */
95454
+ return jsxRuntimeExports.jsx(MonthEndInsightsContainer,{children:/* @__PURE__ */jsxRuntimeExports.jsx(MonthEndInsightsForm,{allThreadsSectionOpen:I,customerRequestData:T,companyId:E,enableZeniGPTFeature:A,filterMetaData:o,selectedPeriod:y.selectedPeriod,improveUsingZeniGPTClick:pe,isZeniUser:k?.userEmail?.includes("zeni.ai")??!1,monthEndReportView:mt,newThreadMetadata:e,onClickCustomerRequest:Ce,onCloseAllThreadsSection:he,onCloseFileAttachmentSnackBar:Se,onOpenFileAttachmentSnackBar:ye,onRemoveFileAttachment:ue,onUpdateFileAttachment:me,previewMode:j,previewMonthEndReport:xe,saveMonthEndReport:fe,onEditClick:ge,sendMonthEndReport:$e})})}}return null;case"flux_analysis":{const e=y.fluxAnalysis,t=e.fetchStatus.fetchState,n=e.sections.generalExpense.vendors.length>0||e.sections.reimbursement.vendors.length>0;return"Not-Started"===t||"In-Progress"===t&&!n?/* @__PURE__ */jsxRuntimeExports.jsx(FluxAnalysisTableSkeleton,{}):"Completed"===t&&0===e.sections.generalExpense.vendors.length&&0===e.sections.reimbursement.vendors.length?/* @__PURE__ */jsxRuntimeExports.jsx(EmptyTableSection,{tab:ct,title:getNavBarHeaderData(ct).allDoneText.title,subTitle:getNavBarHeaderData(ct).allDoneText.subTitle}):/* @__PURE__ */jsxRuntimeExports.jsx(FluxAnalysisTable,{isAccountingClassesEnabled:S,fluxAnalysis:e,selectedPeriod:y.selectedPeriod,markAsReview:be,onReloadPage:ve,updateOperatingExpensesIdsForReview:Ee,updateSectionIdsForReview:Re,onUpdateFluxAnalysisUIState:Ae,setCurrentFooterFormId:D,fetchFluxViewOnScroll:je,onFetchFluxViewList:Te,onFetchReimbursementView:we,redirectToVendorDetailPage:Ue})}case"reconciliation":/* @__PURE__ */
95455
+ return jsxRuntimeExports.jsx(AccountReconciliationPage,{onReloadReconciliationListPage:V,currentFooterFormId:r,isAccountingClassesEnabled:S,reconciliation:gt,companyId:E,vendorSearchAutoCompleteActions:w,vendorSearchAutoCompleteData:R,onReviewClicked:Pe,setOpenDrawerClicked:Be,setCurrentFooterFormId:D,onReconTabColumnSortConfigChanged:H,onUpdateReconcileTabLocalData:W,onEstablishConnectionClick:Me,onFetchLinkTokenClick:Oe,updateReconReviewTabLocalData:Fe,onReconReviewTabColumnSortConfigChanged:Ne,onSaveReconciliation:ze,onSaveReconciliationReview:He,onReconMatchedTransactionClick:Ve,onAddStatementClick:We,onReconNodeCollapseToggled:Ye,onExcludeAccountFromReconciliation:Ke,onIncludeAccountIntoReconciliation:Ze,isReconV3Enabled:Xe});default:/* @__PURE__ */
95456
+ return jsxRuntimeExports.jsx(EmptyTableSection,{tab:ct,title:getNavBarHeaderData(ct).allDoneText.title,subTitle:getNavBarHeaderData(ct).allDoneText.subTitle})}};function TableSection(e){const t=useWindowSizeContext();/* @__PURE__ */
95113
95457
  return jsxRuntimeExports.jsx(Container$n,{windowSize:t,children:/* @__PURE__ */jsxRuntimeExports.jsx(ListTable,{...e})})}const{expenseAutomation:{transactions:{transactionGroupFilter:strings$q}},common:{all:allLabel,texts:{income:income,expenses:expenses}}}=appLocale.getLocalizedStrings(),FilterRow=styled$2.div`
95114
95458
  display: flex;
95115
95459
  flex-direction: row;
@@ -95274,8 +95618,8 @@ return jsxRuntimeExports.jsx(FilterRow,{children:/* @__PURE__ */jsxRuntimeExport
95274
95618
  /* @__PURE__ */jsxRuntimeExports.jsx(StepBody,{children:copy.step4.body})]})]})]}),
95275
95619
  /* @__PURE__ */jsxRuntimeExports.jsxs(ToggleContainer,{onClick:()=>t(!0),"data-testid":generateDataTestId("account-reconciliation-steps-banner","hide"),children:[
95276
95620
  /* @__PURE__ */jsxRuntimeExports.jsx(ExtraSmallSemiBold,{children:hide$1}),
95277
- /* @__PURE__ */jsxRuntimeExports.jsx(ChevronUpStyled,{})]})]})}const{expenseAutomation:{jeSchedules:{actualMatching:actualMatchingStrings$2}}}=appLocale.getLocalizedStrings();function ActualMatchingMatchNewButton({onClick:e}){/* @__PURE__ */
95278
- return jsxRuntimeExports.jsx(Button,{"data-testid":generateDataTestId("actual-matching-match-new-button"),type:"button",onClick:e,children:/* @__PURE__ */jsxRuntimeExports.jsx(StandardMedium,{style:{whiteSpace:"nowrap"},children:actualMatchingStrings$2.matchNew})})}const Button=styled$2.button`
95621
+ /* @__PURE__ */jsxRuntimeExports.jsx(ChevronUpStyled,{})]})]})}const{expenseAutomation:{jeSchedules:{actualMatching:actualMatchingStrings}}}=appLocale.getLocalizedStrings();function ActualMatchingMatchNewButton({onClick:e}){/* @__PURE__ */
95622
+ return jsxRuntimeExports.jsx(Button,{"data-testid":generateDataTestId("actual-matching-match-new-button"),type:"button",onClick:e,children:/* @__PURE__ */jsxRuntimeExports.jsx(StandardMedium,{style:{whiteSpace:"nowrap"},children:actualMatchingStrings.matchNew})})}const Button=styled$2.button`
95279
95623
  box-sizing: border-box;
95280
95624
  display: inline-flex;
95281
95625
  align-items: center;
@@ -95657,12 +96001,12 @@ return jsxRuntimeExports.jsxs(HeaderWrapper$1,{sortDataValue:t.sortKey,actualDat
95657
96001
  }
95658
96002
  `,HeaderName=styled$2(ExtraSmallSemiBold)`
95659
96003
  display: flex;
95660
- `,{dateFormat:dateFormat$9,common:{strings:{underscore:underscore,hyphen:hyphen$7,empty:empty$3},tooltips:{viewReceipt:viewReceipt,viewReceipts:viewReceipts}}}=appLocale.getLocalizedStrings(),D$j={containerPaddingLeftRight:new ResponsiveSized(sp[4],sp[4]),containerPaddingTopBottom:new ResponsiveSized(sp[0],sp[0])},CompletedTabListRow=({transaction:e,authParams:t,isAccountingClassesEnabled:n,transactionAttachmentsEndpoint:o,isLastRow:i=!1,onMissingReceiptsRowClick:r})=>{const a=useWindowSizeContext(),s=useQuickViewMode(),l=useTheme(),c=s?compressedCompletedTabHeaderItemsData:getCompletedTabHeaderItemsData(n),d=useExpenseAutomationRowCommenting({transactionId:e.id,rowEntityType:"expense_automation.receipts.row",transactionType:e.type}),{isCommentingActive:p,rowRef:u,totalThreadCount:m,isThreadsLoading:h,handleActiveThreadClick:g,handleAddRowCommentClick:x}=d,[f,y]=useState(!1),[S,C]=useState([]),[$,b]=useState(null),v=e.attachments?.filter(e=>null!=e.contentType&&allowedDocumentPreviewContentType.includes(e.contentType))??[],[E,w]=useState(v[0]),R=null!=e.attachments&&e.attachments.length>0,A=e.date?.format?.(dateFormat$9.visual.MMMDCommaYYYYformat)??hyphen$7;/* @__PURE__ */
96004
+ `,{dateFormat:dateFormat$9,common:{strings:{underscore:underscore,hyphen:hyphen$5,empty:empty$3},tooltips:{viewReceipt:viewReceipt,viewReceipts:viewReceipts}}}=appLocale.getLocalizedStrings(),D$j={containerPaddingLeftRight:new ResponsiveSized(sp[4],sp[4]),containerPaddingTopBottom:new ResponsiveSized(sp[0],sp[0])},CompletedTabListRow=({transaction:e,authParams:t,isAccountingClassesEnabled:n,transactionAttachmentsEndpoint:o,isLastRow:i=!1,onMissingReceiptsRowClick:r})=>{const a=useWindowSizeContext(),s=useQuickViewMode(),l=useTheme(),c=s?compressedCompletedTabHeaderItemsData:getCompletedTabHeaderItemsData(n),d=useExpenseAutomationRowCommenting({transactionId:e.id,rowEntityType:"expense_automation.receipts.row",transactionType:e.type}),{isCommentingActive:p,rowRef:u,totalThreadCount:m,isThreadsLoading:h,handleActiveThreadClick:g,handleAddRowCommentClick:x}=d,[f,y]=useState(!1),[S,C]=useState([]),[$,b]=useState(null),v=e.attachments?.filter(e=>null!=e.contentType&&allowedDocumentPreviewContentType.includes(e.contentType))??[],[E,w]=useState(v[0]),R=null!=e.attachments&&e.attachments.length>0,A=e.date?.format?.(dateFormat$9.visual.MMMDCommaYYYYformat)??hyphen$5;/* @__PURE__ */
95661
96005
  return jsxRuntimeExports.jsxs(Container$l,{ref:u,$isLastRow:i,windowSize:a,isQuickViewMode:s,onClick:()=>r(e.id,e.type),"data-testid":generateDataTestId("completed-tab-list-row",e.id),style:{position:"relative"},children:[c.map((n,i)=>{const r=`${e.id}${underscore}${n.key}`;switch(n.key){case"vendor":default:/* @__PURE__ */
95662
96006
  return jsxRuntimeExports.jsx(RowItemContainer,{windowSize:a,wrapperWidth:n.width,isQuickViewMode:s,children:/* @__PURE__ */jsxRuntimeExports.jsx(RowItem,{windowSize:a,isLastItem:i===c.length-1,children:/* @__PURE__ */jsxRuntimeExports.jsxs(TextContainer,{children:[
95663
- /* @__PURE__ */jsxRuntimeExports.jsx(EntityLogoAvatarWithCustomFallback,{photoUrl:null!=e.vendorId?e.logo?.toString()??empty$3:empty$3,styles:{width:Space.sp3,height:Space.sp3,borderRadius:Space.sp2},placeholder:{width:sp[3],height:sp[3]},fallbackAvatar:/* @__PURE__ */jsxRuntimeExports.jsx(EntityAvatarContainer,{children:/* @__PURE__ */jsxRuntimeExports.jsx(EntityAvatar,{name:e.vendorName??e.description??hyphen$7})})}),
95664
- /* @__PURE__ */jsxRuntimeExports.jsx(TooltipWithEllipsisText,{text:e.vendorName??e.description??hyphen$7,itemTextStyle:{...textStyles.standardMedium.cssObject,color:"inherit"}})]})})},r);case"category":case"class":{const t=null!=e.lines&&e.lines.length>0&&null!=e.lines[0]?.account&&Boolean(e.lines[0].account.accountName)?e.lines[0].account.accountName:hyphen$7,o=null!=e.lines&&e.lines.length>0&&null!=e.lines[0]?.class&&Boolean(e.lines[0].class?.className)?e.lines[0].class?.className??hyphen$7:hyphen$7,l="category"===n.key?t:o;/* @__PURE__ */
95665
- return jsxRuntimeExports.jsx(RowItemContainer,{windowSize:a,wrapperWidth:n.width,isQuickViewMode:s,children:/* @__PURE__ */jsxRuntimeExports.jsx(RowItem,{windowSize:a,isLastItem:i===c.length-1,children:/* @__PURE__ */jsxRuntimeExports.jsx(TextContainer,{children:l!==hyphen$7?/* @__PURE__ */jsxRuntimeExports.jsx(TooltipWithEllipsisText,{text:l,itemTextStyle:{...textStyles.standardMedium.cssObject,color:"inherit"}}):/* @__PURE__ */jsxRuntimeExports.jsx(ItemText,{children:l})})})},r)}case"date":/* @__PURE__ */
96007
+ /* @__PURE__ */jsxRuntimeExports.jsx(EntityLogoAvatarWithCustomFallback,{photoUrl:null!=e.vendorId?e.logo?.toString()??empty$3:empty$3,styles:{width:Space.sp3,height:Space.sp3,borderRadius:Space.sp2},placeholder:{width:sp[3],height:sp[3]},fallbackAvatar:/* @__PURE__ */jsxRuntimeExports.jsx(EntityAvatarContainer,{children:/* @__PURE__ */jsxRuntimeExports.jsx(EntityAvatar,{name:e.vendorName??e.description??hyphen$5})})}),
96008
+ /* @__PURE__ */jsxRuntimeExports.jsx(TooltipWithEllipsisText,{text:e.vendorName??e.description??hyphen$5,itemTextStyle:{...textStyles.standardMedium.cssObject,color:"inherit"}})]})})},r);case"category":case"class":{const t=null!=e.lines&&e.lines.length>0&&null!=e.lines[0]?.account&&Boolean(e.lines[0].account.accountName)?e.lines[0].account.accountName:hyphen$5,o=null!=e.lines&&e.lines.length>0&&null!=e.lines[0]?.class&&Boolean(e.lines[0].class?.className)?e.lines[0].class?.className??hyphen$5:hyphen$5,l="category"===n.key?t:o;/* @__PURE__ */
96009
+ return jsxRuntimeExports.jsx(RowItemContainer,{windowSize:a,wrapperWidth:n.width,isQuickViewMode:s,children:/* @__PURE__ */jsxRuntimeExports.jsx(RowItem,{windowSize:a,isLastItem:i===c.length-1,children:/* @__PURE__ */jsxRuntimeExports.jsx(TextContainer,{children:l!==hyphen$5?/* @__PURE__ */jsxRuntimeExports.jsx(TooltipWithEllipsisText,{text:l,itemTextStyle:{...textStyles.standardMedium.cssObject,color:"inherit"}}):/* @__PURE__ */jsxRuntimeExports.jsx(ItemText,{children:l})})})},r)}case"date":/* @__PURE__ */
95666
96010
  return jsxRuntimeExports.jsx(RowItemContainer,{windowSize:a,wrapperWidth:n.width,isQuickViewMode:s,children:/* @__PURE__ */jsxRuntimeExports.jsx(RowItem,{windowSize:a,isLastItem:i===c.length-1,children:/* @__PURE__ */jsxRuntimeExports.jsx(TextContainer,{children:/* @__PURE__ */jsxRuntimeExports.jsx(TooltipWithEllipsisText,{text:A,itemTextStyle:{...textStyles.standardMedium.cssObject,color:"inherit"}})})})},r);case"receipts":/* @__PURE__ */
95667
96011
  return jsxRuntimeExports.jsx(RowItemContainer,{windowSize:a,wrapperWidth:n.width,isQuickViewMode:s,style:{justifyContent:"center"},children:R?/* @__PURE__ */jsxRuntimeExports.jsx(Tooltip$6,{display:"flex",placement:"bottom",title:(e.attachments?.length??0)>1?viewReceipts:viewReceipt,enterDelay:600,children:/* @__PURE__ */jsxRuntimeExports.jsx(StyledReceiptIcon,{onClick:n=>{n.stopPropagation(),(()=>{y(!0),w(v[0]);const n=v.map(e=>e.id);fetchTransactionAttachments(o,t,{transaction_key:{transaction_id:e.id,transaction_type:e.type},attachment_ids:n}).then(e=>{C(e),e.length>0&&b(e[0])})})()}})}):null},r);case"amount":{const t=amountToString("0,0.[00]",e.amount);/* @__PURE__ */
95668
96012
  return jsxRuntimeExports.jsx(RowItemContainer,{windowSize:a,wrapperWidth:n.width,isQuickViewMode:s,children:/* @__PURE__ */jsxRuntimeExports.jsx(RowItem,{windowSize:a,isLastItem:i===c.length-1,children:/* @__PURE__ */jsxRuntimeExports.jsx(TooltipWithEllipsisText,{text:null!=e.amount&&e.amount.amount<0?`-${t}`:t,itemTextStyle:{...textStyles.standardMedium.cssObject,color:"inherit"}})})},r)}}}),f&&v.length>0?createPortal(
@@ -95818,9 +96162,9 @@ return jsxRuntimeExports.jsx(Outer,{onTransitionEnd:e=>{e.target===e.currentTarg
95818
96162
  will-change: opacity;
95819
96163
  transform: translateZ(0);
95820
96164
  `,MATCH_LIST_COL_PCTS=[50,25,25],PossibleMatchesSectionSkeleton=()=>/* @__PURE__ */jsxRuntimeExports.jsxs(PossibleMatchesBlock,{children:[
95821
- /* @__PURE__ */jsxRuntimeExports.jsx(SectionTitle$8,{children:/* @__PURE__ */jsxRuntimeExports.jsx(ContentLoaderSkeleton$1,{width:200,height:31,style:{display:"block"}})}),
96165
+ /* @__PURE__ */jsxRuntimeExports.jsx(SectionTitle$7,{children:/* @__PURE__ */jsxRuntimeExports.jsx(ContentLoaderSkeleton$1,{width:200,height:31,style:{display:"block"}})}),
95822
96166
  /* @__PURE__ */jsxRuntimeExports.jsx(ListTableSkeleton,{colPcts:MATCH_LIST_COL_PCTS,rowCount:2})]}),ManualSearchFieldSkeleton=()=>/* @__PURE__ */jsxRuntimeExports.jsxs(ManualSearchBlock,{children:[
95823
- /* @__PURE__ */jsxRuntimeExports.jsx(SectionTitle$8,{children:/* @__PURE__ */jsxRuntimeExports.jsx(ContentLoaderSkeleton$1,{width:220,height:31,style:{display:"block"}})}),
96167
+ /* @__PURE__ */jsxRuntimeExports.jsx(SectionTitle$7,{children:/* @__PURE__ */jsxRuntimeExports.jsx(ContentLoaderSkeleton$1,{width:220,height:31,style:{display:"block"}})}),
95824
96168
  /* @__PURE__ */jsxRuntimeExports.jsx(SearchInputSkeletonBar,{children:/* @__PURE__ */jsxRuntimeExports.jsx(ContentLoaderSkeleton$1,{width:200,height:sp[3],style:{display:"block"}})})]}),ManualSearchResultsSkeleton=()=>/* @__PURE__ */jsxRuntimeExports.jsx(SearchResultsBlock,{children:/* @__PURE__ */jsxRuntimeExports.jsx(ListTableSkeleton,{colPcts:MATCH_LIST_COL_PCTS,rowCount:1})}),PossibleMatchesBlock=styled$2.div`
95825
96169
  display: flex;
95826
96170
  flex-direction: column;
@@ -95832,7 +96176,7 @@ return jsxRuntimeExports.jsx(Outer,{onTransitionEnd:e=>{e.target===e.currentTarg
95832
96176
  flex-direction: column;
95833
96177
  gap: ${Space.sp2};
95834
96178
  min-width: 0;
95835
- `,SectionTitle$8=styled$2.div``,SearchInputSkeletonBar=styled$2.div`
96179
+ `,SectionTitle$7=styled$2.div``,SearchInputSkeletonBar=styled$2.div`
95836
96180
  display: flex;
95837
96181
  align-items: center;
95838
96182
  flex: 1;
@@ -97042,7 +97386,7 @@ return jsxRuntimeExports.jsx(StyledBankReconNavStatsContainer,{children:/* @__PU
97042
97386
  display: flex;
97043
97387
  flex-direction: column;
97044
97388
  gap: ${Space.sp2};
97045
- `,{common:{currency:currency$1,strings:{hyphen:hyphen$6}},expenseAutomation:{jeSchedules:{accrualDetail:accrualDetailStrings$5}}}=appLocale.getLocalizedStrings(),billingPatternStrings=accrualDetailStrings$5.billingPattern,JEAccrualBillingPatternCard=({profileSnapshot:e,serviceMonth:t})=>{const{billingPattern:n,monthlyTotals:o}=e,i=niceAxisMax(o.reduce((e,t)=>Math.max(e,t.amount.amount),0)),r=axisTicks(i),a=[{label:billingPatternStrings.avgAmount,value:formatOptionalAmount(n?.avgAmount?.amount)},{label:billingPatternStrings.lastBill,value:formatOptionalAmount(n?.lastBillAmount?.amount)},{label:billingPatternStrings.monthsTracked,value:n?.monthsOfHistory?.toString()??hyphen$6},{label:billingPatternStrings.consistency,value:null!=n?.consistencyScore?billingPatternStrings.percentValue.replace("{percent}",Math.round(100*n.consistencyScore).toString()):hyphen$6},{label:billingPatternStrings.billingLag,value:null!=n?.billingLagDays?billingPatternStrings.daysValue.replace("{days}",n.billingLagDays.toString()):hyphen$6}];/* @__PURE__ */
97389
+ `,{common:{currency:currency$1,strings:{hyphen:hyphen$4}},expenseAutomation:{jeSchedules:{accrualDetail:accrualDetailStrings$5}}}=appLocale.getLocalizedStrings(),billingPatternStrings=accrualDetailStrings$5.billingPattern,JEAccrualBillingPatternCard=({profileSnapshot:e,serviceMonth:t})=>{const{billingPattern:n,monthlyTotals:o}=e,i=niceAxisMax(o.reduce((e,t)=>Math.max(e,t.amount.amount),0)),r=axisTicks(i),a=[{label:billingPatternStrings.avgAmount,value:formatOptionalAmount(n?.avgAmount?.amount)},{label:billingPatternStrings.lastBill,value:formatOptionalAmount(n?.lastBillAmount?.amount)},{label:billingPatternStrings.monthsTracked,value:n?.monthsOfHistory?.toString()??hyphen$4},{label:billingPatternStrings.consistency,value:null!=n?.consistencyScore?billingPatternStrings.percentValue.replace("{percent}",Math.round(100*n.consistencyScore).toString()):hyphen$4},{label:billingPatternStrings.billingLag,value:null!=n?.billingLagDays?billingPatternStrings.daysValue.replace("{days}",n.billingLagDays.toString()):hyphen$4}];/* @__PURE__ */
97046
97390
  return jsxRuntimeExports.jsxs(Card$3,{children:[
97047
97391
  /* @__PURE__ */jsxRuntimeExports.jsx(MetricGrid,{children:a.map(e=>/* @__PURE__ */jsxRuntimeExports.jsxs(Metric,{children:[
97048
97392
  /* @__PURE__ */jsxRuntimeExports.jsx(MetricLabel,{children:e.label}),
@@ -97053,7 +97397,7 @@ return jsxRuntimeExports.jsxs(Card$3,{children:[
97053
97397
  /* @__PURE__ */jsxRuntimeExports.jsx(Columns,{children:o.map(e=>{const n=formatOptionalAmount(e.amount.amount),o=e.month===t;/* @__PURE__ */
97054
97398
  return jsxRuntimeExports.jsx(ChartColumn,{children:/* @__PURE__ */jsxRuntimeExports.jsx(Tooltip$6,{arrow:!0,display:"block",placement:"top",style:{width:"100%",height:"100%"},title:`${monthLabel(e.month)} · ${n}`,children:/* @__PURE__ */jsxRuntimeExports.jsx(BarTrack,{children:/* @__PURE__ */jsxRuntimeExports.jsx(Bar,{heightPercent:i>0?e.amount.amount/i*100:0,isServiceMonth:o})})})},e.month)})})]}),
97055
97399
  /* @__PURE__ */jsxRuntimeExports.jsx(YAxisSpacer,{}),
97056
- /* @__PURE__ */jsxRuntimeExports.jsx(MonthLabels,{children:o.map(e=>/* @__PURE__ */jsxRuntimeExports.jsx(BarLabel,{isServiceMonth:e.month===t,children:monthLabel(e.month)},e.month))})]})]})};function formatOptionalAmount(e){return null==e?hyphen$6:amountToString("0,0.[00]",toAmount(e,currency$1.currencyCode,currency$1.currencySymbol))??hyphen$6}function monthLabel(e){const[t,n]=e.split("-"),o=Number(n)-1,i=MONTH_NAMES[o];return null==i||null==t?e:`${i} '${t.slice(2)}`}const MONTH_NAMES=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],AXIS_TICK_COUNT=4;function niceAxisMax(e){if(e<=0)return 0;const t=10**Math.floor(Math.log10(e));return Math.ceil(1.2*e/t)*t}function axisTicks(e){return e<=0?[0]:Array.from({length:AXIS_TICK_COUNT+1},(t,n)=>e/AXIS_TICK_COUNT*n)}function compactAmount(e){if(0===e)return"$0";if(e>=1e3){const t=e/1e3;return`$${t>=100?Math.round(t):Math.round(10*t)/10}k`}return`$${Math.round(e)}`}function trendPoints(e,t){const n=100/e.length;return e.map((e,o)=>`${n*o+n/2},${100-(t>0?e.amount.amount/t*100:0)}`).join(" ")}const CHART_HEIGHT_PX=160,Card$3=styled$2.div`
97400
+ /* @__PURE__ */jsxRuntimeExports.jsx(MonthLabels,{children:o.map(e=>/* @__PURE__ */jsxRuntimeExports.jsx(BarLabel,{isServiceMonth:e.month===t,children:monthLabel(e.month)},e.month))})]})]})};function formatOptionalAmount(e){return null==e?hyphen$4:amountToString("0,0.[00]",toAmount(e,currency$1.currencyCode,currency$1.currencySymbol))??hyphen$4}function monthLabel(e){const[t,n]=e.split("-"),o=Number(n)-1,i=MONTH_NAMES[o];return null==i||null==t?e:`${i} '${t.slice(2)}`}const MONTH_NAMES=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],AXIS_TICK_COUNT=4;function niceAxisMax(e){if(e<=0)return 0;const t=10**Math.floor(Math.log10(e));return Math.ceil(1.2*e/t)*t}function axisTicks(e){return e<=0?[0]:Array.from({length:AXIS_TICK_COUNT+1},(t,n)=>e/AXIS_TICK_COUNT*n)}function compactAmount(e){if(0===e)return"$0";if(e>=1e3){const t=e/1e3;return`$${t>=100?Math.round(t):Math.round(10*t)/10}k`}return`$${Math.round(e)}`}function trendPoints(e,t){const n=100/e.length;return e.map((e,o)=>`${n*o+n/2},${100-(t>0?e.amount.amount/t*100:0)}`).join(" ")}const CHART_HEIGHT_PX=160,Card$3=styled$2.div`
97057
97401
  display: flex;
97058
97402
  flex-direction: column;
97059
97403
  gap: ${Space.sp3};
@@ -97235,13 +97579,13 @@ return jsxRuntimeExports.jsxs(Card$2,{children:[
97235
97579
  `,RecommendedValue=styled$2(H7Bold)`
97236
97580
  color: ${e=>e.theme.colors.champion};
97237
97581
  font-variant-numeric: tabular-nums;
97238
- `,findAccountByOptionValue=(e,t)=>null==t?void 0:e.find(e=>e.qboId===t||e.accountId===t),findClassByOptionValue=(e,t)=>null==t?void 0:e.find(e=>e.classId===t||e.qboId===t),toAccountOptionValue=(e,t)=>{if(null==t)return;const n=e.find(e=>e.accountId===t);return n?.qboId??n?.accountId??t},REVERSAL_SCHEDULED_DATE="scheduled_date",REVERSAL_ON_BILL_MATCH="on_bill_match",seedAccrualFields=(e,t)=>{const n=e.reversalPolicy??REVERSAL_ON_BILL_MATCH,o=null==t?.reverseNextMonth?n:t.reverseNextMonth?REVERSAL_SCHEDULED_DATE:REVERSAL_ON_BILL_MATCH;return{memo:t?.memo??e.memo,reversalPolicy:o,jeCreditAccountId:t?.jeCreditAccountId??e.jeCreditAccountId,jeDebitAccountId:t?.jeDebitAccountId??e.jeDebitAccountId,jeDebitAccountingClassId:t?.jeDebitAccountingClassId??e.jeDebitAccountingClassId}},resolveAccrualSelections=(e,t,n)=>{const o=n?.allAccountList??[],i=n?.allAccruedExpenseList??[];return{debitAccount:findAccountByOptionValue(o,e.debitAccount?.selectedOption),creditAccount:findAccountByOptionValue([...o,...i],e.creditAccount?.selectedOption),debitClass:findClassByOptionValue(n?.allClassList??[],e.debitClass?.selectedOption),reversalPolicy:e.reversalPolicy?.selectedOption??t.reversalPolicy??REVERSAL_ON_BILL_MATCH}},scheduledReversalDate=e=>null!=e.expectedReversalDate?e.expectedReversalDate:""!==e.serviceMonth?zeniDate(`${e.serviceMonth}-01`).add(1,"month").startOf("month"):void 0,resolveAccrualPreviewFields=(e,t,n)=>{if("draft"!==t.accrualStatus)return{jeCreditAccountName:t.jeCreditAccountName??"",jeDebitAccountName:t.jeDebitAccountName??"",expectedReversalDate:t.expectedReversalDate,jeDebitAccountingClassName:t.jeDebitAccountingClassName,reversalPolicy:t.reversalPolicy??REVERSAL_ON_BILL_MATCH};const o=resolveAccrualSelections(e,t,n);return{jeCreditAccountName:o.creditAccount?.accountName??t.jeCreditAccountName??"",jeDebitAccountName:o.debitAccount?.accountName??t.jeDebitAccountName??"",expectedReversalDate:o.reversalPolicy===REVERSAL_SCHEDULED_DATE?scheduledReversalDate(t):void 0,jeDebitAccountingClassName:o.debitClass?.className??t.jeDebitAccountingClassName,reversalPolicy:o.reversalPolicy}},buildAccrualEdits=(e,t,n)=>{if("draft"!==t.accrualStatus)return{};const{creditAccount:o,debitAccount:i,debitClass:r,reversalPolicy:a}=resolveAccrualSelections(e,t,n),s=a===REVERSAL_SCHEDULED_DATE;return{memo:e.memo,jeDebitAccountId:i?.accountId,jeDebitAccountName:i?.accountName,jeCreditAccountId:o?.accountId,jeCreditAccountName:o?.accountName,jeDebitAccountingClassId:r?.classId,jeDebitAccountingClassName:r?.className,reverseNextMonth:s,expectedReversalDate:s?t.expectedReversalDate:void 0}},{common:{strings:{hyphen:hyphen$5},settings:{integrations:{connectorTooltips:{accountantSectionLabel:accountantSectionLabel$1}}}},dateFormat:dateFormat$8,expenseAutomation:{jeSchedules:{accrualDetail:accrualDetailStrings$3,newSchedule:newSchedule}}}=appLocale.getLocalizedStrings(),detailsStrings$3=accrualDetailStrings$3.details,fieldStrings=newSchedule.fields,FIELD_LABEL_WIDTH=200,FULL_WIDTH_ROW_STYLE={width:"100%",boxSizing:"border-box"},READ_ONLY="disabled",REVERSAL_OPTIONS=[{label:"",options:[{label:detailsStrings$3.reverseNextMonthOption,value:REVERSAL_SCHEDULED_DATE},{label:detailsStrings$3.onInvoiceMatch,value:REVERSAL_ON_BILL_MATCH}]}],JEAccrualDetailsSection=({accrual:e,accountHierarchy:t,allAccountList:n,allAccruedExpenseList:o,classHierarchy:i,isAccountingClassesEnabled:r,liabilityHierarchy:a,localData:s})=>{const l=getGroupedAccountOptions(t??[]),c=getGroupedAccountOptions(a??[]),d=getGroupedClassOptions(i??[]),p="draft"===e.accrualStatus,u=p?void 0:READ_ONLY,m=e=>e.some(e=>e.options.length>0),h=e=>e?void 0:READ_ONLY,g=p&&m(l),x=p&&m(c),f=p&&m(d),y=seedAccrualFields(e,s),S=toAccountOptionValue(n??[],y.jeDebitAccountId),C=toAccountOptionValue([...n??[],...o??[]],y.jeCreditAccountId),$=y.jeDebitAccountingClassId;/* @__PURE__ */
97582
+ `,findAccountByOptionValue=(e,t)=>null==t?void 0:e.find(e=>e.qboId===t||e.accountId===t),findClassByOptionValue=(e,t)=>null==t?void 0:e.find(e=>e.classId===t||e.qboId===t),toAccountOptionValue=(e,t)=>{if(null==t)return;const n=e.find(e=>e.accountId===t);return n?.qboId??n?.accountId??t},REVERSAL_SCHEDULED_DATE="scheduled_date",REVERSAL_ON_BILL_MATCH="on_bill_match",seedAccrualFields=(e,t)=>{const n=e.reversalPolicy??REVERSAL_ON_BILL_MATCH,o=null==t?.reverseNextMonth?n:t.reverseNextMonth?REVERSAL_SCHEDULED_DATE:REVERSAL_ON_BILL_MATCH;return{memo:t?.memo??e.memo,reversalPolicy:o,jeCreditAccountId:t?.jeCreditAccountId??e.jeCreditAccountId,jeDebitAccountId:t?.jeDebitAccountId??e.jeDebitAccountId,jeDebitAccountingClassId:t?.jeDebitAccountingClassId??e.jeDebitAccountingClassId}},resolveAccrualSelections=(e,t,n)=>{const o=n?.allAccountList??[],i=n?.allAccruedExpenseList??[];return{debitAccount:findAccountByOptionValue(o,e.debitAccount?.selectedOption),creditAccount:findAccountByOptionValue([...o,...i],e.creditAccount?.selectedOption),debitClass:findClassByOptionValue(n?.allClassList??[],e.debitClass?.selectedOption),reversalPolicy:e.reversalPolicy?.selectedOption??t.reversalPolicy??REVERSAL_ON_BILL_MATCH}},scheduledReversalDate=e=>null!=e.expectedReversalDate?e.expectedReversalDate:""!==e.serviceMonth?zeniDate(`${e.serviceMonth}-01`).add(1,"month").startOf("month"):void 0,resolveAccrualPreviewFields=(e,t,n)=>{if("draft"!==t.accrualStatus)return{jeCreditAccountName:t.jeCreditAccountName??"",jeDebitAccountName:t.jeDebitAccountName??"",expectedReversalDate:t.expectedReversalDate,jeDebitAccountingClassName:t.jeDebitAccountingClassName,reversalPolicy:t.reversalPolicy??REVERSAL_ON_BILL_MATCH};const o=resolveAccrualSelections(e,t,n);return{jeCreditAccountName:o.creditAccount?.accountName??t.jeCreditAccountName??"",jeDebitAccountName:o.debitAccount?.accountName??t.jeDebitAccountName??"",expectedReversalDate:o.reversalPolicy===REVERSAL_SCHEDULED_DATE?scheduledReversalDate(t):void 0,jeDebitAccountingClassName:o.debitClass?.className??t.jeDebitAccountingClassName,reversalPolicy:o.reversalPolicy}},buildAccrualEdits=(e,t,n)=>{if("draft"!==t.accrualStatus)return{};const{creditAccount:o,debitAccount:i,debitClass:r,reversalPolicy:a}=resolveAccrualSelections(e,t,n),s=a===REVERSAL_SCHEDULED_DATE;return{memo:e.memo,jeDebitAccountId:i?.accountId,jeDebitAccountName:i?.accountName,jeCreditAccountId:o?.accountId,jeCreditAccountName:o?.accountName,jeDebitAccountingClassId:r?.classId,jeDebitAccountingClassName:r?.className,reverseNextMonth:s,expectedReversalDate:s?t.expectedReversalDate:void 0}},{common:{strings:{hyphen:hyphen$3},settings:{integrations:{connectorTooltips:{accountantSectionLabel:accountantSectionLabel$1}}}},dateFormat:dateFormat$8,expenseAutomation:{jeSchedules:{accrualDetail:accrualDetailStrings$3,newSchedule:newSchedule}}}=appLocale.getLocalizedStrings(),detailsStrings$3=accrualDetailStrings$3.details,fieldStrings=newSchedule.fields,FIELD_LABEL_WIDTH=200,FULL_WIDTH_ROW_STYLE={width:"100%",boxSizing:"border-box"},READ_ONLY="disabled",REVERSAL_OPTIONS=[{label:"",options:[{label:detailsStrings$3.reverseNextMonthOption,value:REVERSAL_SCHEDULED_DATE},{label:detailsStrings$3.onInvoiceMatch,value:REVERSAL_ON_BILL_MATCH}]}],JEAccrualDetailsSection=({accrual:e,accountHierarchy:t,allAccountList:n,allAccruedExpenseList:o,classHierarchy:i,isAccountingClassesEnabled:r,liabilityHierarchy:a,localData:s})=>{const l=getGroupedAccountOptions(t??[]),c=getGroupedAccountOptions(a??[]),d=getGroupedClassOptions(i??[]),p="draft"===e.accrualStatus,u=p?void 0:READ_ONLY,m=e=>e.some(e=>e.options.length>0),h=e=>e?void 0:READ_ONLY,g=p&&m(l),x=p&&m(c),f=p&&m(d),y=seedAccrualFields(e,s),S=toAccountOptionValue(n??[],y.jeDebitAccountId),C=toAccountOptionValue([...n??[],...o??[]],y.jeCreditAccountId),$=y.jeDebitAccountingClassId;/* @__PURE__ */
97239
97583
  return jsxRuntimeExports.jsxs(SectionCard,{children:[
97240
- /* @__PURE__ */jsxRuntimeExports.jsx(LabeledTextField,{controlWidth:"100%",isDisabled:READ_ONLY,label:{label:detailsStrings$3.postingDate,width:FIELD_LABEL_WIDTH},style:FULL_WIDTH_ROW_STYLE,text:{type:"text",name:"postingDate",defaultValue:e.postingDate?.format(dateFormat$8.visual.MMMDCommaYYYYformat)??hyphen$5}}),p?/* @__PURE__ */jsxRuntimeExports.jsx(LabeledGroupSingleSelectWithRecommendationCheckboxField,{isLoading:!1,label:{label:detailsStrings$3.autoReversal,width:FIELD_LABEL_WIDTH},groupedSingleSelectField:{shouldShowChevronIcon:!0,name:"reversalPolicy",placeholder:reversalText(e),valueToId:e=>e,defaultValue:{allOptions:REVERSAL_OPTIONS,selectedOption:y.reversalPolicy}}}):/* @__PURE__ */jsxRuntimeExports.jsx(LabeledTextField,{controlWidth:"100%",isDisabled:READ_ONLY,label:{label:detailsStrings$3.autoReversal,width:FIELD_LABEL_WIDTH},style:FULL_WIDTH_ROW_STYLE,text:{type:"text",name:"autoReversal",defaultValue:reversalText(e)}}),
97584
+ /* @__PURE__ */jsxRuntimeExports.jsx(LabeledTextField,{controlWidth:"100%",isDisabled:READ_ONLY,label:{label:detailsStrings$3.postingDate,width:FIELD_LABEL_WIDTH},style:FULL_WIDTH_ROW_STYLE,text:{type:"text",name:"postingDate",defaultValue:e.postingDate?.format(dateFormat$8.visual.MMMDCommaYYYYformat)??hyphen$3}}),p?/* @__PURE__ */jsxRuntimeExports.jsx(LabeledGroupSingleSelectWithRecommendationCheckboxField,{isLoading:!1,label:{label:detailsStrings$3.autoReversal,width:FIELD_LABEL_WIDTH},groupedSingleSelectField:{shouldShowChevronIcon:!0,name:"reversalPolicy",placeholder:reversalText(e),valueToId:e=>e,defaultValue:{allOptions:REVERSAL_OPTIONS,selectedOption:y.reversalPolicy}}}):/* @__PURE__ */jsxRuntimeExports.jsx(LabeledTextField,{controlWidth:"100%",isDisabled:READ_ONLY,label:{label:detailsStrings$3.autoReversal,width:FIELD_LABEL_WIDTH},style:FULL_WIDTH_ROW_STYLE,text:{type:"text",name:"autoReversal",defaultValue:reversalText(e)}}),
97241
97585
  /* @__PURE__ */jsxRuntimeExports.jsx(LabeledGroupSingleSelectWithRecommendationCheckboxField,{isDisabled:h(g),isLoading:!1,label:{label:detailsStrings$3.expenseCategory,width:FIELD_LABEL_WIDTH},groupedSingleSelectField:{shouldShowChevronIcon:g,name:"debitAccount",placeholder:valueOrHyphen$1(e.jeDebitAccountName),valueToId:e=>e,defaultValue:g?{allOptions:l,selectedOption:S}:singleOptionValue(e.jeDebitAccountName)}}),
97242
97586
  /* @__PURE__ */jsxRuntimeExports.jsx(LabeledGroupSingleSelectWithRecommendationCheckboxField,{isDisabled:h(x),isLoading:!1,label:{label:detailsStrings$3.liabilityAccount,width:FIELD_LABEL_WIDTH},groupedSingleSelectField:{shouldShowChevronIcon:x,name:"creditAccount",placeholder:valueOrHyphen$1(e.jeCreditAccountName),valueToId:e=>e,defaultValue:x?{allOptions:c,selectedOption:C}:singleOptionValue(e.jeCreditAccountName)}}),r&&/* @__PURE__ */jsxRuntimeExports.jsx(LabeledGroupSingleSelectWithRecommendationCheckboxField,{isDisabled:h(f),isLoading:!1,label:{label:detailsStrings$3.department,width:FIELD_LABEL_WIDTH},groupedSingleSelectField:{shouldShowChevronIcon:f,name:"debitClass",placeholder:valueOrHyphen$1(e.jeDebitAccountingClassName),valueToId:e=>e,defaultValue:f?{allOptions:d,selectedOption:$}:singleOptionValue(e.jeDebitAccountingClassName)}}),
97243
97587
  /* @__PURE__ */jsxRuntimeExports.jsx(LabeledTextField,{controlWidth:"100%",isDisabled:u,label:{label:fieldStrings.memo,width:FIELD_LABEL_WIDTH},style:FULL_WIDTH_ROW_STYLE,text:{type:"text",name:"memo",defaultValue:p?y.memo:valueOrHyphen$1(e.memo)}}),
97244
- /* @__PURE__ */jsxRuntimeExports.jsx(LabeledTextField,{controlWidth:"100%",isDisabled:READ_ONLY,label:{label:accrualDetailStrings$3.estimatedBy,width:FIELD_LABEL_WIDTH},style:FULL_WIDTH_ROW_STYLE,text:{type:"text",name:"estimatedBy",defaultValue:estimatedByText(e)}})]})};function valueOrHyphen$1(e){return null!=e&&""!==e?e:hyphen$5}function singleOptionValue(e){const t=valueOrHyphen$1(e);return{selectedOption:t,allOptions:[{label:"",options:[{label:t,value:t}]}]}}function reversalText(e){if("on_bill_match"===e.reversalPolicy)return accrualDetailStrings$3.details.onInvoiceMatch;const t=e.expectedReversalDate?.format(dateFormat$8.visual.MMMDCommaYYYYformat);return null!=t?accrualDetailStrings$3.details.onDate.replace("{date}",t):hyphen$5}function estimatedByText(e){if("agent"===e.origin)return accountantSectionLabel$1;const t=e.createdBy;if(null==t)return hyphen$5;const n=[t.firstName,t.lastName].filter(e=>null!=e&&""!==e).join(" ");return""!==n?n:valueOrHyphen$1(t.email)}const SectionCard=styled$2.div`
97588
+ /* @__PURE__ */jsxRuntimeExports.jsx(LabeledTextField,{controlWidth:"100%",isDisabled:READ_ONLY,label:{label:accrualDetailStrings$3.estimatedBy,width:FIELD_LABEL_WIDTH},style:FULL_WIDTH_ROW_STYLE,text:{type:"text",name:"estimatedBy",defaultValue:estimatedByText(e)}})]})};function valueOrHyphen$1(e){return null!=e&&""!==e?e:hyphen$3}function singleOptionValue(e){const t=valueOrHyphen$1(e);return{selectedOption:t,allOptions:[{label:"",options:[{label:t,value:t}]}]}}function reversalText(e){if("on_bill_match"===e.reversalPolicy)return accrualDetailStrings$3.details.onInvoiceMatch;const t=e.expectedReversalDate?.format(dateFormat$8.visual.MMMDCommaYYYYformat);return null!=t?accrualDetailStrings$3.details.onDate.replace("{date}",t):hyphen$3}function estimatedByText(e){if("agent"===e.origin)return accountantSectionLabel$1;const t=e.createdBy;if(null==t)return hyphen$3;const n=[t.firstName,t.lastName].filter(e=>null!=e&&""!==e).join(" ");return""!==n?n:valueOrHyphen$1(t.email)}const SectionCard=styled$2.div`
97245
97589
  display: flex;
97246
97590
  flex-direction: column;
97247
97591
  width: 100%;
@@ -97249,7 +97593,7 @@ return jsxRuntimeExports.jsxs(SectionCard,{children:[
97249
97593
  border-top: 1px solid ${e=>e.theme.colors.grey2};
97250
97594
  border-radius: ${Space.sp2};
97251
97595
  background: ${e=>e.theme.colors.grey5};
97252
- `,{common:{currency:currency,strings:{hyphen:hyphen$4}},dateFormat:dateFormat$7,expenseAutomation:{jeSchedules:{accrualDetail:accrualDetailStrings$2,oneTimeAccrualType:oneTimeAccrualType$1}}}=appLocale.getLocalizedStrings(),detailsStrings$2=accrualDetailStrings$2.details,HEADER_TEST_ID_PREFIX="je-accrual-detail",MAXIMUM_ACCRUAL_AMOUNT_ALLOWED=1e7,dimensions$8={containerPadding:new ResponsiveSized(sp[3],sp[5]),containerMarginTop:new ResponsiveSized(sp[3],sp[3]),containerMarginBottom:new ResponsiveSized(sp[2],sp[2]),vendorTitleContainerWidth:new ResponsiveSized(187,480)},fontStyles$a={vendorTitle:new ResponsiveSizedStyle("h7SemiBold","h7SemiBold")},AVATAR_SIZE_PX=sp[5],ACCRUAL_TAG_STYLE={padding:"2px 10px"},ACCRUAL_TAG_LABEL_STYLE=textStyles.smallMedium.cssObject,AMOUNT_FIELD_WIDTH_PX=160;function isAmountEditable(e){return accrualActions(e.accrualStatus).canPromote}const JEAccrualHeader=({accrual:e,isEditingAmount:t,onEditAmount:n})=>{const o=useWindowSizeContext(),i=useTheme(),r=""!==e.vendorName?e.vendorName:hyphen$4,a={...ACCRUAL_TAG_STYLE,border:`1px solid ${i.colors.grey2}`},s="monthly"===e.profileSnapshot?.billingPattern?.frequency?accrualDetailStrings$2.accrualTypeMonthly:oneTimeAccrualType$1,l=[{title:detailsStrings$2.servicePeriod,value:servicePeriodText(e)},{title:detailsStrings$2.accrualType,value:s},{title:detailsStrings$2.expenseCategory,value:valueOrHyphen(e.jeDebitAccountName)},{title:detailsStrings$2.department,value:valueOrHyphen(e.jeDebitAccountingClassName)}];/* @__PURE__ */
97596
+ `,{common:{currency:currency,strings:{hyphen:hyphen$2}},dateFormat:dateFormat$7,expenseAutomation:{jeSchedules:{accrualDetail:accrualDetailStrings$2,oneTimeAccrualType:oneTimeAccrualType$1}}}=appLocale.getLocalizedStrings(),detailsStrings$2=accrualDetailStrings$2.details,HEADER_TEST_ID_PREFIX="je-accrual-detail",MAXIMUM_ACCRUAL_AMOUNT_ALLOWED=1e7,dimensions$8={containerPadding:new ResponsiveSized(sp[3],sp[5]),containerMarginTop:new ResponsiveSized(sp[3],sp[3]),containerMarginBottom:new ResponsiveSized(sp[2],sp[2]),vendorTitleContainerWidth:new ResponsiveSized(187,480)},fontStyles$a={vendorTitle:new ResponsiveSizedStyle("h7SemiBold","h7SemiBold")},AVATAR_SIZE_PX=sp[5],ACCRUAL_TAG_STYLE={padding:"2px 10px"},ACCRUAL_TAG_LABEL_STYLE=textStyles.smallMedium.cssObject,AMOUNT_FIELD_WIDTH_PX=160;function isAmountEditable(e){return accrualActions(e.accrualStatus).canPromote}const JEAccrualHeader=({accrual:e,isEditingAmount:t,onEditAmount:n})=>{const o=useWindowSizeContext(),i=useTheme(),r=""!==e.vendorName?e.vendorName:hyphen$2,a={...ACCRUAL_TAG_STYLE,border:`1px solid ${i.colors.grey2}`},s="monthly"===e.profileSnapshot?.billingPattern?.frequency?accrualDetailStrings$2.accrualTypeMonthly:oneTimeAccrualType$1,l=[{title:detailsStrings$2.servicePeriod,value:servicePeriodText(e)},{title:detailsStrings$2.accrualType,value:s},{title:detailsStrings$2.expenseCategory,value:valueOrHyphen(e.jeDebitAccountName)},{title:detailsStrings$2.department,value:valueOrHyphen(e.jeDebitAccountingClassName)}];/* @__PURE__ */
97253
97597
  return jsxRuntimeExports.jsxs(Container$e,{windowSize:o,children:[
97254
97598
  /* @__PURE__ */jsxRuntimeExports.jsxs(TitleContainer$1,{windowSize:o,children:[
97255
97599
  /* @__PURE__ */jsxRuntimeExports.jsxs(TitleWithLabelContainer,{windowSize:o,children:[
@@ -97264,7 +97608,7 @@ return jsxRuntimeExports.jsxs(Container$e,{windowSize:o,children:[
97264
97608
  /* @__PURE__ */jsxRuntimeExports.jsx(HeaderValue,{children:e.value})]})},e.title)),
97265
97609
  /* @__PURE__ */jsxRuntimeExports.jsx(HeaderRowContainer,{children:/* @__PURE__ */jsxRuntimeExports.jsxs(HeaderRowBox,{children:[
97266
97610
  /* @__PURE__ */jsxRuntimeExports.jsx(HeaderText,{children:detailsStrings$2.memo}),
97267
- /* @__PURE__ */jsxRuntimeExports.jsx(MemoValue,{children:valueOrHyphen(e.memo)})]})})]})]})};function valueOrHyphen(e){return null!=e&&""!==e?e:hyphen$4}function servicePeriodText(e){if(""===e.serviceMonth)return hyphen$4;const t=zeniDate(`${e.serviceMonth}-01`);return detailsStrings$2.servicePeriodValue.replace("{month}",t.isValid()?t.format(dateFormat$7.visual.MMMYYYYFormat):e.serviceMonth)}function statusCapsuleType(e){switch(e){case"posted":return"success";case"posting_blocked":return"warning";case"draft":return"attention";default:return"default"}}function formatAccrualAmount(e){return amountToString("0,0.[00]",toAmount(e,currency.currencyCode,currency.currencySymbol))??hyphen$4}const Container$e=styled$2.div`
97611
+ /* @__PURE__ */jsxRuntimeExports.jsx(MemoValue,{children:valueOrHyphen(e.memo)})]})})]})]})};function valueOrHyphen(e){return null!=e&&""!==e?e:hyphen$2}function servicePeriodText(e){if(""===e.serviceMonth)return hyphen$2;const t=zeniDate(`${e.serviceMonth}-01`);return detailsStrings$2.servicePeriodValue.replace("{month}",t.isValid()?t.format(dateFormat$7.visual.MMMYYYYFormat):e.serviceMonth)}function statusCapsuleType(e){switch(e){case"posted":return"success";case"posting_blocked":return"warning";case"draft":return"attention";default:return"default"}}function formatAccrualAmount(e){return amountToString("0,0.[00]",toAmount(e,currency.currencyCode,currency.currencySymbol))??hyphen$2}const Container$e=styled$2.div`
97268
97612
  display: flex;
97269
97613
  width: 100%;
97270
97614
  box-sizing: border-box;
@@ -97348,7 +97692,7 @@ return jsxRuntimeExports.jsxs(Container$e,{windowSize:o,children:[
97348
97692
  text-align: right;
97349
97693
  `,MemoValue=styled$2(HeaderValue)`
97350
97694
  font-style: italic;
97351
- `,{common:{strings:{colon:colon$1,hyphen:hyphen$3,middleDot:middleDot}},expenseAutomation:{jeSchedules:{accrualDetail:accrualDetailStrings$1,newSchedule:{journalEntryPreview:sideLabelStrings}}}}=appLocale.getLocalizedStrings(),detailsStrings$1=accrualDetailStrings$1.details,previewStrings$2=accrualDetailStrings$1.journalEntryPreview,CHIP_STYLE={borderRadius:"6px"},CHIP_LABEL_STYLE=textStyles.superSmallSemiBold.cssObject,JEAccrualJournalEntryCard=({amount:e,autoReversalDetail:t,creditAccountName:n,debitAccountName:o,postingDate:i,debitClassName:r})=>{const a=null!=r&&""!==r,s=`${middleDot} ${t}`;/* @__PURE__ */
97695
+ `,{common:{strings:{colon:colon,hyphen:hyphen$1,middleDot:middleDot}},expenseAutomation:{jeSchedules:{accrualDetail:accrualDetailStrings$1,newSchedule:{journalEntryPreview:sideLabelStrings}}}}=appLocale.getLocalizedStrings(),detailsStrings$1=accrualDetailStrings$1.details,previewStrings$1=accrualDetailStrings$1.journalEntryPreview,CHIP_STYLE={borderRadius:"6px"},CHIP_LABEL_STYLE=textStyles.superSmallSemiBold.cssObject,JEAccrualJournalEntryCard=({amount:e,autoReversalDetail:t,creditAccountName:n,debitAccountName:o,postingDate:i,debitClassName:r})=>{const a=null!=r&&""!==r,s=`${middleDot} ${t}`;/* @__PURE__ */
97352
97696
  return jsxRuntimeExports.jsxs(Card$1,{children:[
97353
97697
  /* @__PURE__ */jsxRuntimeExports.jsxs(EntryRow,{children:[
97354
97698
  /* @__PURE__ */jsxRuntimeExports.jsx(ChipColumn,{children:/* @__PURE__ */jsxRuntimeExports.jsx(StyledCapsule,{label:sideLabelStrings.debit,labelStyle:CHIP_LABEL_STYLE,style:CHIP_STYLE,type:"info"})}),
@@ -97360,16 +97704,16 @@ return jsxRuntimeExports.jsxs(Card$1,{children:[
97360
97704
  /* @__PURE__ */jsxRuntimeExports.jsx(AccountColumn,{children:/* @__PURE__ */jsxRuntimeExports.jsx(AccountName,{children:n})}),
97361
97705
  /* @__PURE__ */jsxRuntimeExports.jsx(EntryAmount,{children:e})]}),
97362
97706
  /* @__PURE__ */jsxRuntimeExports.jsxs(DetailRow$3,{children:[
97363
- /* @__PURE__ */jsxRuntimeExports.jsx(DetailLabel$3,{children:`${detailsStrings$1.postingDate}${colon$1}`}),
97707
+ /* @__PURE__ */jsxRuntimeExports.jsx(DetailLabel$3,{children:`${detailsStrings$1.postingDate}${colon}`}),
97364
97708
  /* @__PURE__ */jsxRuntimeExports.jsx(DetailValue$2,{children:i})]}),
97365
97709
  /* @__PURE__ */jsxRuntimeExports.jsxs(DetailRow$3,{children:[
97366
- /* @__PURE__ */jsxRuntimeExports.jsx(DetailLabel$3,{children:`${detailsStrings$1.department}${colon$1}`}),
97367
- /* @__PURE__ */jsxRuntimeExports.jsx(DetailValue$2,{children:a?r:hyphen$3})]}),
97710
+ /* @__PURE__ */jsxRuntimeExports.jsx(DetailLabel$3,{children:`${detailsStrings$1.department}${colon}`}),
97711
+ /* @__PURE__ */jsxRuntimeExports.jsx(DetailValue$2,{children:a?r:hyphen$1})]}),
97368
97712
  /* @__PURE__ */jsxRuntimeExports.jsxs(DetailRow$3,{children:[
97369
- /* @__PURE__ */jsxRuntimeExports.jsx(DetailLabel$3,{children:`${detailsStrings$1.autoReversal}${colon$1}`}),
97713
+ /* @__PURE__ */jsxRuntimeExports.jsx(DetailLabel$3,{children:`${detailsStrings$1.autoReversal}${colon}`}),
97370
97714
  /* @__PURE__ */jsxRuntimeExports.jsxs(AutoReversalValue,{children:[
97371
97715
  /* @__PURE__ */jsxRuntimeExports.jsx(StyledTickIcon$1,{}),
97372
- /* @__PURE__ */jsxRuntimeExports.jsx(EnabledText,{children:previewStrings$2.autoReversalEnabled}),
97716
+ /* @__PURE__ */jsxRuntimeExports.jsx(EnabledText,{children:previewStrings$1.autoReversalEnabled}),
97373
97717
  /* @__PURE__ */jsxRuntimeExports.jsx(AutoReversalDetail,{children:s})]})]})]})},Card$1=styled$2.div`
97374
97718
  display: flex;
97375
97719
  flex-direction: column;
@@ -97440,7 +97784,7 @@ return jsxRuntimeExports.jsxs(Card$1,{children:[
97440
97784
  min-width: 0;
97441
97785
  text-align: right;
97442
97786
  color: ${e=>e.theme.colors.hero};
97443
- `,{common:{strings:{hyphen:hyphen$2},texts:{revert:revertText}},dateFormat:dateFormat$6,expenseAutomation:{jeSchedules:{accrualDetail:accrualDetailStrings,oneTimeAccrualType:oneTimeAccrualType}}}=appLocale.getLocalizedStrings(),detailsStrings=accrualDetailStrings.details,previewStrings$1=accrualDetailStrings.journalEntryPreview,JEOneTimeAccrualDetailPage=({accrual:e,actionFetchState:t,isAccountingClassesEnabled:n,isRenderedInPanel:o=!1,localData:i,newAccrualAccountsView:r,onAccrualFormChange:a,onAccrualFormClear:s,onApproveAndPost:l,onNavigateBack:c,onRevert:d,onSkip:p})=>{const[u,m]=useState(!1),[h,g]=useState(void 0),[x,f]=useState(void 0),y="In-Progress"===t,S=y&&"promote"===x,C=y&&"skip"===x,$=y&&"revert"===x,b=accrualActions(e.accrualStatus);useEffect(()=>{"In-Progress"!==t&&f(void 0)},[t]);const v=useForm({mode:"all",defaultValues:{amount:e.estimatedAmount.amount}}),{accrualId:E}=e,w=useRef(()=>{});w.current=()=>a(E,buildAccrualEdits(v.getValues(),e,r));const R=useRef(!0);useEffect(()=>(R.current=!0,()=>{R.current=!1}),[]),useEffect(()=>{const e=v.watch(()=>{defer(()=>{R.current&&w.current()})});return()=>e.unsubscribe()},[v]);const A=useRef(s);A.current=s,useEffect(()=>()=>A.current(E),[E]);const j=v.watch("amount"),T=u?j:e.estimatedAmount.amount,I=formatAccrualAmount(T),k=e.profileSnapshot?.monthlyTotals??[],L=resolveAccrualPreviewFields({creditAccount:v.watch("creditAccount"),debitAccount:v.watch("debitAccount"),debitClass:v.watch("debitClass"),reversalPolicy:v.watch("reversalPolicy")},e,r),D=L.reversalPolicy===REVERSAL_ON_BILL_MATCH,_=L.expectedReversalDate?.format(dateFormat$6.visual.MMMDCommaYYYYformat)??hyphen$2,P=D?detailsStrings.onInvoiceMatch:detailsStrings.onDate.replace("{date}",_),B=e.actualPostDate??e.postingDate,M=B?.format(dateFormat$6.visual.MMMDCommaYYYYformat)??hyphen$2;/* @__PURE__ */
97787
+ `,{common:{strings:{hyphen:hyphen},texts:{revert:revertText}},dateFormat:dateFormat$6,expenseAutomation:{jeSchedules:{accrualDetail:accrualDetailStrings,oneTimeAccrualType:oneTimeAccrualType}}}=appLocale.getLocalizedStrings(),detailsStrings=accrualDetailStrings.details,previewStrings=accrualDetailStrings.journalEntryPreview,JEOneTimeAccrualDetailPage=({accrual:e,actionFetchState:t,isAccountingClassesEnabled:n,isRenderedInPanel:o=!1,localData:i,newAccrualAccountsView:r,onAccrualFormChange:a,onAccrualFormClear:s,onApproveAndPost:l,onNavigateBack:c,onRevert:d,onSkip:p})=>{const[u,m]=useState(!1),[h,g]=useState(void 0),[x,f]=useState(void 0),y="In-Progress"===t,S=y&&"promote"===x,C=y&&"skip"===x,$=y&&"revert"===x,b=accrualActions(e.accrualStatus);useEffect(()=>{"In-Progress"!==t&&f(void 0)},[t]);const v=useForm({mode:"all",defaultValues:{amount:e.estimatedAmount.amount}}),{accrualId:E}=e,w=useRef(()=>{});w.current=()=>a(E,buildAccrualEdits(v.getValues(),e,r));const R=useRef(!0);useEffect(()=>(R.current=!0,()=>{R.current=!1}),[]),useEffect(()=>{const e=v.watch(()=>{defer(()=>{R.current&&w.current()})});return()=>e.unsubscribe()},[v]);const A=useRef(s);A.current=s,useEffect(()=>()=>A.current(E),[E]);const j=v.watch("amount"),T=u?j:e.estimatedAmount.amount,I=formatAccrualAmount(T),k=e.profileSnapshot?.monthlyTotals??[],L=resolveAccrualPreviewFields({creditAccount:v.watch("creditAccount"),debitAccount:v.watch("debitAccount"),debitClass:v.watch("debitClass"),reversalPolicy:v.watch("reversalPolicy")},e,r),D=L.reversalPolicy===REVERSAL_ON_BILL_MATCH,_=L.expectedReversalDate?.format(dateFormat$6.visual.MMMDCommaYYYYformat)??hyphen,P=D?detailsStrings.onInvoiceMatch:detailsStrings.onDate.replace("{date}",_),B=e.actualPostDate??e.postingDate,M=B?.format(dateFormat$6.visual.MMMDCommaYYYYformat)??hyphen;/* @__PURE__ */
97444
97788
  return jsxRuntimeExports.jsxs(OuterContainer,{$isRenderedInPanel:o,children:[o?null:/* @__PURE__ */jsxRuntimeExports.jsx(NavBarWithLaunch,{showLaunchIcon:!1,title:""!==e.vendorName?e.vendorName:oneTimeAccrualType,onBackClick:c,onLaunchClick:()=>{}}),
97445
97789
  /* @__PURE__ */jsxRuntimeExports.jsxs(FormProvider,{...v,children:[
97446
97790
  /* @__PURE__ */jsxRuntimeExports.jsx(JEAccrualHeader,{accrual:e,isEditingAmount:u,onEditAmount:()=>m(!0)}),
@@ -97456,8 +97800,8 @@ return jsxRuntimeExports.jsxs(OuterContainer,{$isRenderedInPanel:o,children:[o?n
97456
97800
  /* @__PURE__ */jsxRuntimeExports.jsx(JEAccrualCalculationBreakdownCard,{recommendedAccrual:formatAccrualAmount(e.aiSuggestion?.estimatedAmount?.amount??e.estimatedAmount.amount),rows:calculationRows(k)})]}),
97457
97801
  /* @__PURE__ */jsxRuntimeExports.jsxs(Section$1,{children:[
97458
97802
  /* @__PURE__ */jsxRuntimeExports.jsx(SectionHeading,{children:journalEntryTitle(e.accrualStatus)}),
97459
- /* @__PURE__ */jsxRuntimeExports.jsx(JEAccrualJournalEntryCard,{amount:I,autoReversalDetail:P,creditAccountName:""!==L.jeCreditAccountName?L.jeCreditAccountName:hyphen$2,debitAccountName:""!==L.jeDebitAccountName?L.jeDebitAccountName:hyphen$2,debitClassName:L.jeDebitAccountingClassName,postingDate:M})]})]}),b.canPromote&&/* @__PURE__ */jsxRuntimeExports.jsx(Footer$7,{cancelBtn:{label:accrualDetailStrings.actions.skipThisMonth,isDisabled:y,isLoading:C,onClick:()=>g("skip")},primaryBtn:{label:accrualDetailStrings.actions.approveAndPost,isDisabled:y,isLoading:S,type:"button",onClick:()=>{y||(f("promote"),l(T))}},showCancel:!0}),b.canRevert&&/* @__PURE__ */jsxRuntimeExports.jsx(Footer$7,{primaryBtn:{label:revertText,isDisabled:y,isLoading:$,type:"button",variant:"destructive",onClick:()=>g("revert")}})]}),
97460
- /* @__PURE__ */jsxRuntimeExports.jsx(JEAccrualFeedbackDialog,{amount:I,isOpen:null!=h,isSubmitting:C||$,mode:h??"skip",vendorName:""!==e.vendorName?e.vendorName:hyphen$2,onClose:()=>g(void 0),onSubmit:(e,t)=>{const n="revert"===h;g(void 0),f(n?"revert":"skip"),n?d(e,t):p(e,t)}})]})};function journalEntryTitle(e){switch(e){case"posting":case"posted":case"reversing":return previewStrings$1.postedTitle;case"reversed":case"reverted":return previewStrings$1.reversedTitle;default:return previewStrings$1.title}}function calculationRows(e){return e.map(e=>({month:e.month,invoiceAmount:formatAccrualAmount(e.amount.amount)}))}const OuterContainer=styled$2.div`
97803
+ /* @__PURE__ */jsxRuntimeExports.jsx(JEAccrualJournalEntryCard,{amount:I,autoReversalDetail:P,creditAccountName:""!==L.jeCreditAccountName?L.jeCreditAccountName:hyphen,debitAccountName:""!==L.jeDebitAccountName?L.jeDebitAccountName:hyphen,debitClassName:L.jeDebitAccountingClassName,postingDate:M})]})]}),b.canPromote&&/* @__PURE__ */jsxRuntimeExports.jsx(Footer$7,{cancelBtn:{label:accrualDetailStrings.actions.skipThisMonth,isDisabled:y,isLoading:C,onClick:()=>g("skip")},primaryBtn:{label:accrualDetailStrings.actions.approveAndPost,isDisabled:y,isLoading:S,type:"button",onClick:()=>{y||(f("promote"),l(T))}},showCancel:!0}),b.canRevert&&/* @__PURE__ */jsxRuntimeExports.jsx(Footer$7,{primaryBtn:{label:revertText,isDisabled:y,isLoading:$,type:"button",variant:"destructive",onClick:()=>g("revert")}})]}),
97804
+ /* @__PURE__ */jsxRuntimeExports.jsx(JEAccrualFeedbackDialog,{amount:I,isOpen:null!=h,isSubmitting:C||$,mode:h??"skip",vendorName:""!==e.vendorName?e.vendorName:hyphen,onClose:()=>g(void 0),onSubmit:(e,t)=>{const n="revert"===h;g(void 0),f(n?"revert":"skip"),n?d(e,t):p(e,t)}})]})};function journalEntryTitle(e){switch(e){case"posting":case"posted":case"reversing":return previewStrings.postedTitle;case"reversed":case"reverted":return previewStrings.reversedTitle;default:return previewStrings.title}}function calculationRows(e){return e.map(e=>({month:e.month,invoiceAmount:formatAccrualAmount(e.amount.amount)}))}const OuterContainer=styled$2.div`
97461
97805
  display: flex;
97462
97806
  flex-direction: column;
97463
97807
  width: 100%;
@@ -97492,350 +97836,6 @@ return jsxRuntimeExports.jsxs(OuterContainer,{$isRenderedInPanel:o,children:[o?n
97492
97836
  color: ${e=>e.theme.colors.champion};
97493
97837
  `,EmptyStateDescription=styled$2(SmallMedium)`
97494
97838
  color: ${e=>e.theme.colors.hero};
97495
- `,{common:{strings:{hyphen:hyphen$1}},expenseAutomation:{jeSchedules:{actualMatching:actualMatchingStrings$1}}}=appLocale.getLocalizedStrings(),detailStrings$1=actualMatchingStrings$1.matchDetail;function getMatchServiceMonthsLabel(e){return formatActualMatchingServiceMonths(e.map(e=>e.serviceMonth))}function matchTierFromMatch(e){const t=e.matchTier??"";if(""!==t)return t.toLowerCase();const n=e.members[0];return(n?.cleared?.matchTier??n?.matchSuggestion?.matchTier??"").toLowerCase()}function getMatchMethodKey(e){const t=matchTierFromMatch(e);return"tier_1"===t||"deterministic"===t||"exact"===t?"exact":"tier_2"===t||"fuzzy"===t?"fuzzy":"manual"===t?"manual":"ai"}function getMatchMethodLabel(e){const t=getMatchMethodKey(e);return"exact"===t?detailStrings$1.matchMethodExact:"fuzzy"===t?detailStrings$1.matchMethodFuzzy:"manual"===t?detailStrings$1.matchMethodManual:detailStrings$1.matchMethodAi}function getWhyThisMatchedCopy(e){const t=getMatchServiceMonthsLabel(e.members),n=getMatchMethodKey(e);if("exact"===n)return detailStrings$1.whyExact.replace("{service}",t);if("fuzzy"===n){const t=getMatchVariancePercent(e),n=null==t?hyphen$1:`${(Math.round(10*Math.abs(t))/10).toFixed(1)}%`;return detailStrings$1.whyFuzzy.replace("{variance}",n)}return"manual"===n?detailStrings$1.whyManual.replace("{service}",t):detailStrings$1.whyAi.replace("{service}",t)}function getMatchJeSectionTitle(e){return"pending_review"===e?detailStrings$1.pendingReversalJe:detailStrings$1.reversedJe}function getMatchStatusLabel(e,t){return"pending_review"===e?t.statusPendingReview:"manually_reversed"===e?t.statusManuallyReversed:t.statusAutoReversed}function getMatchVariancePercent(e){return variancePercent(e.actualAmount.amount,e.accruedAmount.amount)}function formatMatchVarianceLabel(e){const t=getMatchVariancePercent(e);return null==t?null:formatVariancePercent(t)}function isMatchRefreshSpinning(e,t,n){return"In-Progress"===n||null==e&&("In-Progress"===t||"Not-Started"===t)}function transactionTypeDisplayLabel(e){const t=formatTransactionTypeLabel(e);return""===t?"transaction":t.toLowerCase()}function getOpenMatchedTransactionLabel(e,t){return t.openTransaction.replace("{type}",transactionTypeDisplayLabel(e))}const{common:{back:back$1,ignore:ignoreText,texts:{refresh:refresh},strings:{colon:colon,hyphen:hyphen}},expenseAutomation:{jeSchedules:{actualMatching:actualMatchingStrings}}}=appLocale.getLocalizedStrings(),previewStrings=actualMatchingStrings.matchModal,detailStrings=actualMatchingStrings.matchDetail,{reversalFailed:reversalFailed,undoFailed:undoFailed}=detailStrings,TEST_ID_PREFIX="actual-matching-match-detail",AMOUNT_FORMAT="0,0.[00]";function ActualMatchingOpenBillActionButton({match:e,transaction:t,onOpenBill:n}){const o=t??(null!=e?getMatchedBillTransaction(e):null);if(null==e&&null==o)return null;const i=getOpenMatchedTransactionLabel(o?.type??e?.transactionType??"bill",actualMatchingStrings);/* @__PURE__ */
97496
- return jsxRuntimeExports.jsx(Tooltip$6,{title:i,enterDelay:600,placement:"bottom",children:/* @__PURE__ */jsxRuntimeExports.jsx("span",{style:{display:"inline-flex"},children:/* @__PURE__ */jsxRuntimeExports.jsx(OpenBillIconButton,{"data-testid":generateDataTestId(TEST_ID_PREFIX,"open-bill"),type:"button","aria-label":i,disabled:null==o,onClick:()=>{null!=o&&n?.(o)},children:/* @__PURE__ */jsxRuntimeExports.jsx(OpenBillIcon,{})})})})}function formatMemberAmount(e){return amountToString(AMOUNT_FORMAT,e.estimatedAmount)??hyphen}function ActualMatchingMatchDetailPage({detailFetchState:e,isRenderedInPanel:t=!1,isApproveInFlight:n=!1,isIgnoreInFlight:o=!1,isUndoInFlight:i=!1,match:r,onNavigateBack:a,onRefresh:s,onOpenBill:l,onApproveAndReverse:c,onIgnoreMatchSuggestion:d,onUndoReversal:p,lastMatchResults:u,lastUndoResults:m,refreshStatus:h}){const g=useTheme(),[x,f]=useState(!1),y=null!=r?getMatchedBillTransaction(r):null,S=r?.leftovers??[],C=null!=r?getApproveAndReverseParams(r):null,$=null!=r&&"pending_review"===r.kind&&null!=d,b=null!=r&&"pending_review"===r.kind&&null!=c,v=null!=r&&"pending_review"!==r.kind&&null!=p,E=isMatchRefreshSpinning(r,e,h),w=()=>{E||s()},R=null!=r?.vendorName&&""!==r.vendorName?r.vendorName:void 0,A=null!=l?/* @__PURE__ */jsxRuntimeExports.jsx(ActualMatchingOpenBillActionButton,{match:r,transaction:y??void 0,onOpenBill:l}):null,j=/* @__PURE__ */jsxRuntimeExports.jsx(Tooltip$6,{title:refresh,enterDelay:600,placement:"bottom",children:/* @__PURE__ */jsxRuntimeExports.jsx(RefreshButtonWrapper,{"data-testid":generateDataTestId("refresh-icon"),onClick:w,children:/* @__PURE__ */jsxRuntimeExports.jsx(StyledRefreshIcon,{$spinning:E})})});/* @__PURE__ */
97497
- return jsxRuntimeExports.jsxs(PageRoot,{"data-testid":generateDataTestId(TEST_ID_PREFIX,"page"),children:[t?null:/* @__PURE__ */jsxRuntimeExports.jsx(NavbarContainer,{children:/* @__PURE__ */jsxRuntimeExports.jsx(NavBar,{title:R??"",source:"ActualMatchingMatchDetail",backgroundColor:g.colors.grey5,onBackClick:a,leftSideComponent:/* @__PURE__ */jsxRuntimeExports.jsx(Tooltip$6,{title:back$1,enterDelay:600,placement:"bottom",children:/* @__PURE__ */jsxRuntimeExports.jsx(BackButtonWrapper,{"data-testid":generateDataTestId(TEST_ID_PREFIX,"back"),onClick:a,children:/* @__PURE__ */jsxRuntimeExports.jsx(Back,{})})}),rightSideComponent:/* @__PURE__ */jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[A,j]})})}),null==r?"In-Progress"===e||"Not-Started"===e?/* @__PURE__ */jsxRuntimeExports.jsx(MatchDetailSkeleton,{}):/* @__PURE__ */jsxRuntimeExports.jsx(MatchDetailLoadError,{onRefresh:w}):/* @__PURE__ */jsxRuntimeExports.jsxs(Content,{children:[
97498
- /* @__PURE__ */jsxRuntimeExports.jsxs(HeaderCard,{children:[
97499
- /* @__PURE__ */jsxRuntimeExports.jsxs(VendorRow,{children:[
97500
- /* @__PURE__ */jsxRuntimeExports.jsx(EntityAvatar,{name:r.vendorName??""}),
97501
- /* @__PURE__ */jsxRuntimeExports.jsx(VendorName,{children:r.vendorName??""}),
97502
- /* @__PURE__ */jsxRuntimeExports.jsx(FitContentCapsule,{children:/* @__PURE__ */jsxRuntimeExports.jsx(StyledCapsule,{label:getMatchStatusLabel(r.kind,detailStrings),type:"pending_review"===r.kind?"warning":"manually_reversed"===r.kind?"default":"success"})}),
97503
- /* @__PURE__ */jsxRuntimeExports.jsx(HeaderAmount,{children:formatAmount(r.actualAmount)}),t?A:null]}),
97504
- /* @__PURE__ */jsxRuntimeExports.jsxs(SummaryRows,{children:[
97505
- /* @__PURE__ */jsxRuntimeExports.jsxs(SummaryRow$1,{children:[
97506
- /* @__PURE__ */jsxRuntimeExports.jsx(SummaryLabel,{children:detailStrings.servicePeriod}),
97507
- /* @__PURE__ */jsxRuntimeExports.jsx(SummaryValue,{children:getMatchServiceMonthsLabel(r.members)})]}),
97508
- /* @__PURE__ */jsxRuntimeExports.jsxs(SummaryRow$1,{children:[
97509
- /* @__PURE__ */jsxRuntimeExports.jsx(SummaryLabel,{children:detailStrings.billDate}),
97510
- /* @__PURE__ */jsxRuntimeExports.jsx(SummaryValue,{children:null!=r.transactionDate&&""!==r.transactionDate?formatJeShortDate(r.transactionDate):hyphen})]})]})]}),
97511
- /* @__PURE__ */jsxRuntimeExports.jsxs(BodyPad,{children:[
97512
- /* @__PURE__ */jsxRuntimeExports.jsxs(FieldCard,{children:[
97513
- /* @__PURE__ */jsxRuntimeExports.jsx(FieldRow,{label:detailStrings.matchMethod,value:getMatchMethodLabel(r)}),
97514
- /* @__PURE__ */jsxRuntimeExports.jsx(FieldRow,{label:detailStrings.source,value:detailStrings.sourceJeAgent}),
97515
- /* @__PURE__ */jsxRuntimeExports.jsx(FieldRow,{label:detailStrings.accruedAmount,value:formatAmount(r.accruedAmount)}),
97516
- /* @__PURE__ */jsxRuntimeExports.jsx(FieldRow,{label:detailStrings.actualAmount,value:formatAmount(r.actualAmount)}),
97517
- /* @__PURE__ */jsxRuntimeExports.jsx(FieldRow,{label:detailStrings.variance,value:/* @__PURE__ */jsxRuntimeExports.jsx(VarianceValue,{match:r})})]}),
97518
- /* @__PURE__ */jsxRuntimeExports.jsx(SectionTitle$7,{children:getMatchJeSectionTitle(r.kind)}),r.members.map(e=>/* @__PURE__ */jsxRuntimeExports.jsx(ReversalJeBlock,{accrual:e,postingDateLabel:"pending_review"===r.kind?null!=r.transactionDate&&""!==r.transactionDate?formatJeShortDate(r.transactionDate):hyphen:formatReversalJeDate(e.reversalPostingDate),failureReason:undoFailureReason(m,e.accrualId),testIdSuffix:`reversal-je-${e.accrualId}`},`reversal-je-${e.accrualId}`)),S.filter(e=>shouldShowLeftoverReversalFailure(e.accrualId,u,m)).map(e=>/* @__PURE__ */jsxRuntimeExports.jsx(ReversalJeBlock,{accrual:e,postingDateLabel:null!=r.transactionDate&&""!==r.transactionDate?formatJeShortDate(r.transactionDate):hyphen,failureReason:leftoverReversalFailureReason(u,e.accrualId),testIdSuffix:`reversal-je-${e.accrualId}`},`reversal-je-${e.accrualId}`)),
97519
- /* @__PURE__ */jsxRuntimeExports.jsx(SectionTitle$7,{children:detailStrings.whyThisMatched}),
97520
- /* @__PURE__ */jsxRuntimeExports.jsxs(WhyPanel,{"data-testid":generateDataTestId(TEST_ID_PREFIX,"why"),children:[
97521
- /* @__PURE__ */jsxRuntimeExports.jsxs(WhyHead,{children:[
97522
- /* @__PURE__ */jsxRuntimeExports.jsx(WhyMethod,{children:getMatchMethodLabel(r)}),
97523
- /* @__PURE__ */jsxRuntimeExports.jsx(WhySource,{children:detailStrings.sourceAttribution.replace("{source}",detailStrings.sourceJeAgent)})]}),
97524
- /* @__PURE__ */jsxRuntimeExports.jsx(WhyCopy,{children:getWhyThisMatchedCopy(r)})]})]})]}),$&&b?/* @__PURE__ */jsxRuntimeExports.jsx(Footer$7,{cancelBtn:{isDisabled:o||n,isLoading:o,label:ignoreText,onClick:()=>f(!0)},primaryBtn:{isDisabled:o||n||null==C,isLoading:n,label:actualMatchingStrings.approveAndReverse,type:"button",onClick:()=>{null!=C&&c?.(C)}},showCancel:!0}):b?/* @__PURE__ */jsxRuntimeExports.jsx(Footer$7,{primaryBtn:{isDisabled:n||null==C,isLoading:n,label:actualMatchingStrings.approveAndReverse,type:"button",onClick:()=>{null!=C&&c?.(C)}}}):null,v&&null!=p&&null!=r?/* @__PURE__ */jsxRuntimeExports.jsx(Footer$7,{primaryBtn:{isDisabled:i,isLoading:i,label:actualMatchingStrings.undoReversal,type:"button",variant:"outline",onClick:()=>p(getUndoReversalAccrualIdsFromMatch(r))}}):null,$&&/* @__PURE__ */jsxRuntimeExports.jsx(JEAccrualFeedbackDialog,{amount:amountToString(AMOUNT_FORMAT,r.actualAmount)??"",isOpen:x,isSubmitting:o,mode:"ignoreMatchSuggestion",vendorName:r.vendorName??"",onClose:()=>f(!1),onSubmit:(e,t)=>{d?.(e,t)}})]})}function prefixLastAction(e,t){return`${e}: ${t}`}function resultDetail(e,t){return null!=e&&""!==e?e:null!=t&&""!==t?t:void 0}function leftoverMatchFailureDetail(e,t){const n=e?.find(e=>e.accrualId===t);if(null!=n&&"reversed"!==n.status&&"noop"!==n.status)return resultDetail(n.reason,n.status)}function leftoverReversalFailureReason(e,t){const n=leftoverMatchFailureDetail(e,t);if(null!=n)return prefixLastAction(reversalFailed,n)}function shouldShowLeftoverReversalFailure(e,t,n){return!0!==n?.some(t=>t.accrualId===e&&"undone"===t.status)&&null!=leftoverMatchFailureDetail(t,e)}function undoFailureReason(e,t){const n=e?.find(e=>e.accrualId===t);if(null==n||"undone"===n.status)return;const o=resultDetail(n.reason,n.status);return null!=o?prefixLastAction(undoFailed,o):void 0}function FieldRow({label:e,value:t}){/* @__PURE__ */
97525
- return jsxRuntimeExports.jsxs(FieldRowRoot,{children:[
97526
- /* @__PURE__ */jsxRuntimeExports.jsx(FieldLabel,{children:`${e}${colon}`}),
97527
- /* @__PURE__ */jsxRuntimeExports.jsx(FieldValue,{children:t})]})}function VarianceValue({match:e}){const t=formatMatchVarianceLabel(e),n=getMatchVariancePercent(e);return null==t||null==n?/* @__PURE__ */jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{children:hyphen}):/* @__PURE__ */jsxRuntimeExports.jsx(FitContentCapsule,{children:/* @__PURE__ */jsxRuntimeExports.jsx(StyledCapsule,{label:t,type:getVarianceCapsuleType(n)})})}function ReversalJeBlock({accrual:e,postingDateLabel:t,testIdSuffix:n,failureReason:o}){const i=formatMemberAmount(e);/* @__PURE__ */
97528
- return jsxRuntimeExports.jsx(JeBlock,{creditAccount:debitAccountName(e,hyphen),creditAmount:i,dateLabel:t,debitAccount:creditAccountName(e,previewStrings.accruedExpensesFallback),debitAmount:i,failureReason:o,testIdSuffix:n})}function JeBlock({creditAccount:e,creditAmount:t,dateLabel:n,debitAccount:o,debitAmount:i,testIdSuffix:r,failureReason:a}){const s=null!=a&&""!==a;/* @__PURE__ */
97529
- return jsxRuntimeExports.jsxs(JeCard,{$hasFailure:s,"data-testid":generateDataTestId(TEST_ID_PREFIX,r),children:[
97530
- /* @__PURE__ */jsxRuntimeExports.jsxs(JeTable,{children:[
97531
- /* @__PURE__ */jsxRuntimeExports.jsx(JeHeaderCell,{children:detailStrings.jePostingDate}),
97532
- /* @__PURE__ */jsxRuntimeExports.jsx(JeHeaderCell,{children:previewStrings.columnAccount}),
97533
- /* @__PURE__ */jsxRuntimeExports.jsx(JeHeaderCell,{$align:"right",children:previewStrings.columnDebit}),
97534
- /* @__PURE__ */jsxRuntimeExports.jsx(JeHeaderCell,{$align:"right",children:previewStrings.columnCredit}),
97535
- /* @__PURE__ */jsxRuntimeExports.jsx(JeCell,{children:n}),
97536
- /* @__PURE__ */jsxRuntimeExports.jsx(JeCell,{children:o}),
97537
- /* @__PURE__ */jsxRuntimeExports.jsx(JeCell,{$align:"right",$isFailureAmount:s,children:i}),
97538
- /* @__PURE__ */jsxRuntimeExports.jsx(JeCell,{$align:"right",$muted:!0,children:hyphen}),
97539
- /* @__PURE__ */jsxRuntimeExports.jsx(JeCell,{children:n}),
97540
- /* @__PURE__ */jsxRuntimeExports.jsx(JeCell,{children:e}),
97541
- /* @__PURE__ */jsxRuntimeExports.jsx(JeCell,{$align:"right",$muted:!0,children:hyphen}),
97542
- /* @__PURE__ */jsxRuntimeExports.jsx(JeCell,{$align:"right",$isFailureAmount:s,children:t})]}),s?/* @__PURE__ */jsxRuntimeExports.jsx(JeFailureReason,{"data-testid":generateDataTestId(TEST_ID_PREFIX,`${r}-reason`),children:a}):null]})}function MatchDetailLoadError({onRefresh:e}){/* @__PURE__ */
97543
- return jsxRuntimeExports.jsxs(LoadErrorRoot,{"data-testid":generateDataTestId(TEST_ID_PREFIX,"load-error"),children:[
97544
- /* @__PURE__ */jsxRuntimeExports.jsx(Tooltip$6,{title:refresh,enterDelay:600,placement:"bottom",children:/* @__PURE__ */jsxRuntimeExports.jsx(LoadErrorIconButton,{type:"button","aria-label":refresh,onClick:e,children:/* @__PURE__ */jsxRuntimeExports.jsx(StyledAlertIcon$2,{})})}),
97545
- /* @__PURE__ */jsxRuntimeExports.jsx(LoadErrorTitle,{children:detailStrings.loadErrorTitle}),
97546
- /* @__PURE__ */jsxRuntimeExports.jsx(LoadErrorSubTitle,{children:detailStrings.loadErrorSubTitle})]})}function MatchDetailSkeleton(){/* @__PURE__ */
97547
- return jsxRuntimeExports.jsxs(Content,{"data-testid":generateDataTestId(TEST_ID_PREFIX,"skeleton"),children:[
97548
- /* @__PURE__ */jsxRuntimeExports.jsxs(HeaderCard,{children:[
97549
- /* @__PURE__ */jsxRuntimeExports.jsxs(VendorRow,{children:[
97550
- /* @__PURE__ */jsxRuntimeExports.jsx(ContentLoaderSkeleton$1,{width:sp[5],height:sp[5]}),
97551
- /* @__PURE__ */jsxRuntimeExports.jsx(ContentLoaderSkeleton$1,{width:180,height:sp[4]})]}),
97552
- /* @__PURE__ */jsxRuntimeExports.jsx(ContentLoaderSkeleton$1,{width:240,height:sp[3]})]}),
97553
- /* @__PURE__ */jsxRuntimeExports.jsxs(BodyPad,{children:[
97554
- /* @__PURE__ */jsxRuntimeExports.jsxs(FieldCard,{children:[
97555
- /* @__PURE__ */jsxRuntimeExports.jsx(ContentLoaderSkeleton$1,{width:"100%",height:sp[6]}),
97556
- /* @__PURE__ */jsxRuntimeExports.jsx(ContentLoaderSkeleton$1,{width:"100%",height:sp[6]}),
97557
- /* @__PURE__ */jsxRuntimeExports.jsx(ContentLoaderSkeleton$1,{width:"100%",height:sp[6]})]}),
97558
- /* @__PURE__ */jsxRuntimeExports.jsx(ContentLoaderSkeleton$1,{width:240,height:sp[3]}),
97559
- /* @__PURE__ */jsxRuntimeExports.jsx(ContentLoaderSkeleton$1,{width:"100%",height:120})]})]})}const spin=keyframes`
97560
- 0% {
97561
- transform: rotate(0deg);
97562
- }
97563
- 100% {
97564
- transform: rotate(360deg);
97565
- }
97566
- `,PageRoot=styled$2.div`
97567
- display: flex;
97568
- flex-direction: column;
97569
- flex: 1;
97570
- width: 100%;
97571
- height: 100%;
97572
- min-height: 0;
97573
- overflow: hidden;
97574
- background-color: ${e=>e.theme.colors.grey4};
97575
- `,NavbarContainer=styled$2.div`
97576
- position: sticky;
97577
- z-index: 3;
97578
- top: ${Space.sp0};
97579
- width: 100%;
97580
- `,BackButtonWrapper=styled$2.div`
97581
- display: flex;
97582
- align-items: center;
97583
- justify-content: center;
97584
- padding: ${Space.sp1};
97585
- width: ${Space.sp4};
97586
- height: ${Space.sp4};
97587
- border-radius: ${Space.sp1};
97588
- box-sizing: border-box;
97589
- cursor: pointer;
97590
- &:hover {
97591
- background-color: ${e=>e.theme.colors.grey3};
97592
- }
97593
- `,Back=styled$2(SvgArrowLeft)`
97594
- width: ${Space.sp3};
97595
- height: ${Space.sp3};
97596
- color: ${e=>e.theme.colors.champion};
97597
- &:hover {
97598
- color: ${e=>e.theme.colors.primary};
97599
- }
97600
- `,RefreshButtonWrapper=styled$2.div`
97601
- display: flex;
97602
- align-items: center;
97603
- justify-content: center;
97604
- width: ${Space.sp4};
97605
- height: ${Space.sp4};
97606
- border-radius: ${Space.sp1};
97607
- cursor: pointer;
97608
- &:hover {
97609
- background-color: ${e=>e.theme.colors.grey3};
97610
- }
97611
- `,StyledRefreshIcon=styled$2(SvgRefresh,{shouldForwardProp:e=>"string"==typeof e&&"$spinning"!==e})`
97612
- cursor: pointer;
97613
- width: ${Space.sp3};
97614
- height: ${Space.sp3};
97615
- color: ${e=>e.theme.colors.champion};
97616
- animation: ${e=>e.$spinning?css$2`
97617
- ${spin} 2s linear infinite;
97618
- `:"none"};
97619
- &:hover {
97620
- color: ${e=>e.theme.colors.primary};
97621
- }
97622
- `,Content=styled$2.div`
97623
- display: flex;
97624
- flex: 1;
97625
- flex-direction: column;
97626
- overflow-y: auto;
97627
- min-height: 0;
97628
- background: ${e=>e.theme.colors.grey4};
97629
- `,LoadErrorRoot=styled$2.div`
97630
- display: flex;
97631
- flex: 1;
97632
- flex-direction: column;
97633
- align-items: center;
97634
- justify-content: center;
97635
- gap: ${Space.sp2};
97636
- padding: ${Space.sp4};
97637
- min-height: 0;
97638
- `,LoadErrorIconButton=styled$2.button`
97639
- display: flex;
97640
- align-items: center;
97641
- justify-content: center;
97642
- width: ${sp[8]}px;
97643
- height: ${sp[8]}px;
97644
- padding: 0;
97645
- border: none;
97646
- border-radius: 50%;
97647
- background: ${e=>e.theme.colors.grey5};
97648
- cursor: pointer;
97649
- color: ${e=>e.theme.colors.alert};
97650
- &:hover {
97651
- background: ${e=>e.theme.colors.grey3};
97652
- }
97653
- `,StyledAlertIcon$2=styled$2(SvgAlertRound)`
97654
- width: ${sp[5]}px;
97655
- height: ${sp[5]}px;
97656
- `,LoadErrorTitle=styled$2(H6Regular)`
97657
- color: ${e=>e.theme.colors.alert};
97658
- `,LoadErrorSubTitle=styled$2(ExtraLargeRegular)`
97659
- color: ${e=>e.theme.colors.primary};
97660
- `,HeaderCard=styled$2.div`
97661
- display: flex;
97662
- flex-direction: column;
97663
- width: 100%;
97664
- box-sizing: border-box;
97665
- background: ${e=>e.theme.colors.grey5};
97666
- border-bottom: 1px solid ${e=>e.theme.colors.grey2};
97667
- padding: ${Space.sp3} ${Space.sp5} ${Space.sp2};
97668
- `,VendorRow=styled$2.div`
97669
- display: flex;
97670
- align-items: center;
97671
- gap: ${Space.sp2};
97672
- min-width: 0;
97673
- min-height: ${Space.sp6};
97674
- margin-bottom: ${Space.sp2};
97675
- `,HeaderAmount=styled$2(H7SemiBold)`
97676
- color: ${e=>e.theme.colors.champion};
97677
- font-variant-numeric: tabular-nums;
97678
- white-space: nowrap;
97679
- margin-left: auto;
97680
- `,SummaryRows=styled$2.div`
97681
- display: flex;
97682
- flex-direction: column;
97683
- margin-bottom: ${Space.sp1};
97684
- `,SummaryRow$1=styled$2.div`
97685
- display: flex;
97686
- flex-direction: row;
97687
- justify-content: space-between;
97688
- align-items: center;
97689
- gap: ${Space.sp3};
97690
- min-height: ${Space.sp5};
97691
- `,SummaryLabel=styled$2(StandardMedium)`
97692
- color: ${e=>e.theme.colors.hero};
97693
- `,SummaryValue=styled$2(StandardMedium)`
97694
- color: ${e=>e.theme.colors.champion};
97695
- text-align: right;
97696
- word-break: break-all;
97697
- `,BodyPad=styled$2.div`
97698
- display: flex;
97699
- flex-direction: column;
97700
- gap: ${Space.sp4};
97701
- padding: ${Space.sp4};
97702
- `,FieldCard=styled$2.div`
97703
- display: flex;
97704
- flex-direction: column;
97705
- width: 100%;
97706
- box-sizing: border-box;
97707
- overflow: hidden;
97708
- background: ${e=>e.theme.colors.grey5};
97709
- border: 1px solid ${e=>e.theme.colors.grey2};
97710
- border-radius: ${Space.sp2};
97711
- `,FieldRowRoot=styled$2.div`
97712
- display: flex;
97713
- align-items: center;
97714
- gap: ${Space.sp3};
97715
- min-height: ${sp[8]}px;
97716
- padding: ${Space.sp1} ${Space.sp3} ${Space.sp1} ${Space.sp4};
97717
- box-sizing: border-box;
97718
- border-top: 1px solid ${e=>e.theme.colors.grey2};
97719
- &:first-of-type {
97720
- border-top: none;
97721
- }
97722
- &:hover {
97723
- background: ${e=>e.theme.colors.background};
97724
- }
97725
- `,FieldLabel=styled$2(StandardMedium)`
97726
- flex: 0 1 268px;
97727
- min-width: 0;
97728
- color: ${e=>e.theme.colors.hero};
97729
- white-space: nowrap;
97730
- overflow: hidden;
97731
- text-overflow: ellipsis;
97732
- `,FieldValue=styled$2.div`
97733
- flex: 1;
97734
- min-width: 0;
97735
- display: flex;
97736
- align-items: center;
97737
- justify-content: flex-end;
97738
- ${textStyles.standardMedium.css}
97739
- color: ${e=>e.theme.colors.champion};
97740
- text-align: right;
97741
- `,OpenBillIconButton=styled$2.button`
97742
- display: flex;
97743
- align-items: center;
97744
- justify-content: center;
97745
- width: ${Space.sp4};
97746
- height: ${Space.sp4};
97747
- padding: ${Space.sp1};
97748
- border: none;
97749
- border-radius: ${Space.sp1};
97750
- background: none;
97751
- cursor: pointer;
97752
- color: ${e=>e.theme.colors.champion};
97753
- &:hover:not(:disabled) {
97754
- background: ${e=>e.theme.colors.grey3};
97755
- color: ${e=>e.theme.colors.primary};
97756
- }
97757
- &:disabled {
97758
- cursor: default;
97759
- opacity: 0.4;
97760
- }
97761
- `,OpenBillIcon=styled$2(SvgOpenLink)`
97762
- width: ${Space.sp3};
97763
- height: ${Space.sp3};
97764
- flex-shrink: 0;
97765
- color: inherit;
97766
- `,VendorName=styled$2(H7SemiBold)`
97767
- color: ${e=>e.theme.colors.champion};
97768
- min-width: 0;
97769
- `,FitContentCapsule=styled$2.div`
97770
- display: inline-flex;
97771
- width: fit-content;
97772
- max-width: 100%;
97773
- flex: 0 0 auto;
97774
- align-self: center;
97775
- `,SectionTitle$7=styled$2(LargeSemiBold)`
97776
- color: ${e=>e.theme.colors.champion};
97777
- `,WhyPanel=styled$2.div`
97778
- display: flex;
97779
- flex-direction: column;
97780
- gap: ${Space.sp2};
97781
- padding: ${Space.sp3};
97782
- border-radius: ${Space.sp2};
97783
- background: color-mix(
97784
- in srgb,
97785
- ${Colors.brandColorOpalLight} 34%,
97786
- ${e=>e.theme.colors.grey5}
97787
- );
97788
- border: 1px solid ${Colors.brandColorOpalLight};
97789
- `,WhyHead=styled$2.div`
97790
- display: flex;
97791
- align-items: center;
97792
- gap: ${Space.sp2};
97793
- `,WhyMethod=styled$2(ExtraSmallMedium)`
97794
- color: ${Colors.brandColorOpalDark};
97795
- `,WhySource=styled$2(ExtraSmallMedium)`
97796
- color: ${e=>e.theme.colors.hero};
97797
- margin-left: auto;
97798
- `,WhyCopy=styled$2(StandardMedium)`
97799
- color: ${e=>e.theme.colors.champion};
97800
- line-height: 1.55;
97801
- `,JeCard=styled$2.div`
97802
- display: flex;
97803
- flex-direction: column;
97804
- overflow: hidden;
97805
- background: ${e=>e.theme.colors.grey5};
97806
- border: 1px solid ${e=>e.theme.colors.grey2};
97807
- border-radius: ${Space.sp2};
97808
- ${e=>!0===e.$hasFailure?`\n border-left: 2px solid ${e.theme.colors.important};\n `:""}
97809
- `,JeFailureReason=styled$2(ExtraSmallMedium)`
97810
- color: ${e=>e.theme.colors.important};
97811
- padding: ${Space.sp2} ${Space.sp3} ${Space.sp3};
97812
- `,JeTable=styled$2.div`
97813
- display: grid;
97814
- grid-template-columns: 140px minmax(0, 1fr) 100px 100px;
97815
- `,JeHeaderCell=styled$2.span`
97816
- ${textStyles.extraSmallSemiBold.css}
97817
- color: ${e=>e.theme.colors.hero};
97818
- background: ${e=>e.theme.colors.grey4};
97819
- height: ${Space.sp5};
97820
- display: flex;
97821
- align-items: center;
97822
- padding: ${Space.sp0} ${Space.sp3};
97823
- text-align: ${e=>e.$align??"left"};
97824
- justify-content: ${e=>"right"===e.$align?"flex-end":"flex-start"};
97825
- border-bottom: 1px solid ${e=>e.theme.colors.grey2};
97826
- `,JeCell=styled$2.span`
97827
- ${textStyles.standardMedium.css}
97828
- color: ${e=>!0===e.$isFailureAmount?e.theme.colors.important:!0===e.$muted?e.theme.colors.hero:e.theme.colors.champion};
97829
- text-align: ${e=>e.$align??"left"};
97830
- min-width: 0;
97831
- overflow: hidden;
97832
- text-overflow: ellipsis;
97833
- white-space: nowrap;
97834
- padding: ${Space.sp3};
97835
- font-variant-numeric: tabular-nums;
97836
- &:nth-child(n + 9) {
97837
- border-top: 1px solid ${e=>e.theme.colors.grey2};
97838
- }
97839
97839
  `,SvgExcludeRound=e=>/* @__PURE__ */React.createElement("svg",{viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},/* @__PURE__ */React.createElement("path",{d:"M8 14C11.3137 14 14 11.3137 14 8C14 4.68629 11.3137 2 8 2C4.68629 2 2 4.68629 2 8C2 11.3137 4.68629 14 8 14Z",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),/* @__PURE__ */React.createElement("path",{d:"M4.06543 3.672L11.9318 12.325",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"})),PageContainer$2=styled$2.div`
97840
97840
  display: flex;
97841
97841
  flex-direction: column;
@@ -104608,4 +104608,4 @@ return jsxRuntimeExports.jsx(ModalContainer,{children:/* @__PURE__ */jsxRuntimeE
104608
104608
  `,StyledButton=styled$2(Button$4)`
104609
104609
  min-width: 140px;
104610
104610
  `;export{BillPayApprovalRuleDetailPage as $,AIAgentsActivatingPage as A,AiCfoScopeModalScrollBody as B,AiCfoSidePanel as C,AiCfoSkillsBrowser as D,AiFinanceTeamReadyPage as E,AllThreadsDrawer as F,AllThreadsSection as G,AllowBlockChipPicker as H,AnalyticsOnLoad as I,ApAgingDetailPage as J,AppBasePage as K,AppDrawerContent as L,AppDrawerHeightMobile as M,ApprovalRulesSettingsPage as N,ArAgingDetailPage as O,AskAiCfoNavButton as P,AskAiCfoNavButtonWhenEnabled as Q,AttachmentView as R,AutoSizer as S,AutoTransferRulePage as T,AvatarSVG$1 as U,BORDER_RADIUS_SELECT_FIELD as V,BackNavigationProvider as W,BankConnectionsSettingsPage as X,BillDetailPage as Y,BillDetailPageSkeleton as Z,BillPayApprovalRuleDetailPage$1 as _,AIIconButton as a,CompanyPassportPage as a$,BillPayApprovalRulesPage$1 as a0,BillPayApprovalRulesPage as a1,BillPayPromoPage as a2,BillPaySetUpPage as a3,BillingSettingsPage as a4,BillsBulkReviewDrawerPage as a5,BusinessVerificationPage as a6,BusyIndication as a7,Button$4 as a8,ButtonBase as a9,ChargeCardListSkeletonRow as aA,ChargeCardPaymentHistoryPage as aB,ChargeCardPromoPage as aC,ChargeCardPromoPageSkeleton as aD,ChargeCardSetUpPage as aE,ChargeCardStatementsLoading as aF,ChargeCardStatementsPage as aG,ChargeCardUserOnboardingPromoPage as aH,ChargeCardUserOnboardingPromoPageSkeleton as aI,CheckDepositDrawerPage as aJ,Checkbox as aK,CircleWithAttachmentSuccessIcon as aL,CircularProgress as aM,ClickAwayListener as aN,ClickableRow as aO,CollaborationGlobalStyles as aP,CollaborationProvider as aQ,CollaborationRoomProvider as aR,Color$1 as aS,Colors as aT,CombinationOperatorButton as aU,CommentsAndNotesCount as aV,CommentsDrawerProvider as aW,CommonDot as aX,CompanyOfficerOnboardingDetailsSection as aY,CompanyOnboardingDetailsSection as aZ,CompanyPassportCard as a_,CARD_POLICY_LIMIT_ROW_ID_REQUIRE_RECEIPT as aa,CARD_POLICY_LIMIT_ROW_ID_TRANSACTION as ab,COMMAND_CENTER_SUBMENU_TYPES as ac,COMMENTS_DRAWER_MAXIMUM_WIDTH as ad,COMMENTS_SECTION_MINIMUM_WIDTH as ae,COMMENT_NOTIFICATION_KINDS as af,CapitalizationOnboardingPopup as ag,CapitalizationSettingsSection as ah,CardPolicyCreatePage as ai,CardPolicyEditPage as aj,CardPolicyFormPageSkeleton as ak,CardPolicyFormSections as al,CardPolicyListPage as am,CardPolicyListPageSkeleton as an,CardPolicyListRow as ao,CardPolicyListSkeletonRow as ap,CardPolicyManualEmptyState as aq,CardsAiCfoHero as ar,CardsShutdownBanner as as,CashbackDetailLoading as at,CashbackDetailPage as au,ChargeCardCVVActivate as av,ChargeCardDetailLoading as aw,ChargeCardDetailPage as ax,ChargeCardListLoading as ay,ChargeCardListPage as az,AIPerformancePage as b,FieldHelpProvider as b$,CompleteProfile as b0,ConfettiBurst as b1,ConfirmationPopUpDescription$2 as b2,ConfirmationPopUpTitle$3 as b3,ConfirmationPopup as b4,ConnectDataSourcesPage as b5,ContentLoaderSkeleton$1 as b6,ControlledComponent as b7,Controller as b8,CreateOrEditVendorPage as b9,EditReimbursementDetailPage as bA,EditableBillDetailPage as bB,Editor as bC,EmptySearchResults as bD,EntityAvatar as bE,EntityAvatarWithInitials as bF,EntityDetailPage as bG,ErrorBoundaryWrapper as bH,ExcludedAccountReconDetailsDrawerPage as bI,ExpenseAutomationOverviewPage as bJ,ExpenseAutomationOverviewPageSkeleton as bK,ExpenseAutomationPage as bL,ExpressPayPage as bM,ExtraLargeMedium as bN,ExtraLargeRegular as bO,ExtraLargeSemiBold as bP,ExtraSmallBoldSp as bQ,ExtraSmallRegular as bR,ExtraSmallRegularSp as bS,ExtraSmallSemiBold as bT,ExtraSmallSemiBoldSp as bU,EyebrowSmallSemiBoldSp as bV,FORM_MINIMUM_WIDTH as bW,FeatureGatesNames as bX,FeaturePreviewPage as bY,FeatureProvider as bZ,FieldHelpIcon as b_,CreateOrEditVendorPageSkeleton as ba,CreatedEntitiesAnswer as bb,CreatingEntitiesAnswerLoading as bc,CreditCardPaymentDrawerPage as bd,CustomerOnboardingContainerPage as be,CustomerOnboardingNoStepsPage as bf,CustomerOnboardingPage as bg,CustomerOnboardingProductSuitePage as bh,DIGITS_PATTERN as bi,DOMAIN_PATTERN as bj,Dashboard as bk,DashboardReportPage as bl,DashboardSidebarLogoAnimation as bm,DataListTable as bn,DataListTableHeader as bo,DataListTableRow as bp,DataListTableSortIndicator as bq,DateRangeFilterField as br,DebitCardSetPin as bs,Drawer as bt,DrawerPage as bu,DropdownOption$1 as bv,DropdownPortalContext as bw,DynamicConfigNames as bx,EMPTY_HTML_CHECKER as by,EditPeoplePage as bz,ALL_AI_CFO_MENU_OPTIONS as c,InvoicingInvoiceDetailPage as c$,FileAttachment as c0,FileInputElement as c1,FiltersPopover as c2,FirstReviewVendorDetailPage as c3,FixedSizeList as c4,FloatingThreads as c5,FontWeight as c6,Footer$7 as c7,FormProvider as c8,GlobalInfoProvider as c9,InvoicingAuditLogPage as cA,InvoicingBrandingSettingsPage as cB,InvoicingCatalogItemDetailPage as cC,InvoicingCatalogItemFormPage as cD,InvoicingCatalogPage as cE,InvoicingCouponFormPage as cF,InvoicingCreateInvoicePage as cG,InvoicingCreateInvoiceSkeleton as cH,InvoicingCreatePromotionalCreditsDialog as cI,InvoicingCreditDetailPage as cJ,InvoicingCreditListPage as cK,InvoicingCustomerDetailPage as cL,InvoicingCustomerFormPage as cM,InvoicingCustomerListPage as cN,InvoicingDashboardSkeleton as cO,InvoicingDataImportDetailPage as cP,InvoicingDataImportHubPage as cQ,InvoicingDataImportMigratePage as cR,InvoicingDetailScaffold as cS,InvoicingDiscountDetailPage as cT,InvoicingDiscountListPage as cU,InvoicingDunningDetailPage as cV,InvoicingDunningEmailComposerDialog as cW,InvoicingDunningListPage as cX,InvoicingDunningSettingsPage as cY,InvoicingEmptyState as cZ,InvoicingIntegrationsSettingsPage as c_,GlobalReviewListPage as ca,H5Regular as cb,H6Regular as cc,INPUT_BG_COLOR as cd,INPUT_BORDER_COLOR_SELECT_FIELD as ce,INPUT_COLOR as cf,INPUT_ERROR_BG_COLOR as cg,INPUT_HOVER_FOCUS_COLOR as ch,INPUT_PLACEHOLDER_COLOR as ci,INVOICING_SETTINGS_NAV_SECTIONS as cj,INVOICING_SETTINGS_TABS as ck,InfiniteLoader as cl,InformationCardStack as cm,InitialCollaborationProvider as cn,InsightCardStack as co,IntegrationCardView as cp,IntegrationsCardGrid as cq,IntegrationsSection as cr,IntegrationsSettingsPage as cs,InternationalWireVerificationPage as ct,InviteFormPage as cu,InvitePageListView as cv,InvitePeoplePage as cw,InvoiceUploadSection as cx,InvoiceUploadSectionSkeleton as cy,InvoicingAddPaymentMethodDialog as cz,ALL_INVOICING_MENU_GROUPS as d,MonthCalendar as d$,InvoicingInvoiceListPage as d0,InvoicingIssueCreditNotePage as d1,InvoicingOverviewPage as d2,InvoicingPaymentDestinationSettingsPage as d3,InvoicingPaymentLinkEmailComposerDialog as d4,InvoicingPaymentLinkPage as d5,InvoicingPaymentListPage as d6,InvoicingPromoPage as d7,InvoicingQBOSettingsPage as d8,InvoicingRecordPaymentPage as d9,LargeRegular as dA,LargeRegularA as dB,LargeRegularLabel as dC,LargeRegularSp as dD,LargeRegularTA as dE,LargeSemiBold as dF,LinkBillExpensePage as dG,LinkJETransactionPage as dH,ListTableSkeleton as dI,Loader as dJ,LogoutButton as dK,Lottie as dL,MCC_CHIP_ID_PREFIX as dM,MEETING_LINK_DEFAULTS as dN,MENU_BG_COLOR as dO,MONTH_END_EDITOR_PLACEHOLDER as dP,MONTH_END_EMAIL_BODY_SECTION as dQ,MONTH_END_EMAIL_EDITOR_SECTION as dR,MONTH_END_EMAIL_HEADER_SECTION as dS,MONTH_END_REPORT_CANVAS as dT,MagicLinkDomesticWireDetailsPage as dU,MagicLinkInternationalWireDetailsPage as dV,MagicLinkSuccessPage as dW,MagicLinkVendorACHDetailsPage as dX,MatchingOperatorDropdown as dY,Modal as dZ,Modal$1 as d_,InvoicingSettingsHubPage as da,InvoicingSubscriptionDetailPage as db,InvoicingSubscriptionFormPage as dc,InvoicingSubscriptionListPage as dd,InvoicingTransactionDetailPage as de,InvoicingVoidInvoiceDialog as df,IssueChargeCardPage as dg,IssueChargeCardPageSkeleton as dh,ItemWithButton as di,JEOneTimeAccrualDetailPage as dj,Label$f as dk,LabeledDatePickerField as dl,LabeledGroupedMultiSelectField as dm,LabeledItemWithButton as dn,LabeledNameField as dp,LabeledRadioField as dq,LabeledReadOnlyTextField as dr,LabeledSingleSelectNumericField as ds,LabeledSingleSelectPickerField as dt,LabeledSingleSelectWithoutClearableField as du,LabeledTextField as dv,LabeledUnSafeCheckBoxField as dw,LargeBoldSp as dx,LargeMedium as dy,LargeMediumSp as dz,ALL_INVOICING_MENU_OPTIONS as e,ScheduleDetailSkeleton as e$,MonthEndEmailDrawerCustomerRequestPage as e0,MonthEndReportCustomerRequestSection as e1,MonthEndReportSection as e2,MoreMenuButton$1 as e3,MyBankConnectionsSettingsPage as e4,MyPendingActivationChargeCardListPage as e5,MyProfileSettingsPage as e6,NEW_CATEGORY_BODY$2 as e7,NEW_THREAD_SUFFIX as e8,NavBar as e9,PolicyModeSelector as eA,Popover as eB,PortfolioAllocationFormPage as eC,PropTypes as eD,QBOConnectionDialog as eE,QBOSetupSectionWithForm as eF,QuickResponsesPage as eG,QuickViewModeContext as eH,REALM_ID as eI,RIGHT_SIDE_PANEL_WIDTH_PX as eJ,RecommendationFeedbackPopup as eK,ReimbursementApprovalRuleDetailPage$1 as eL,ReimbursementApprovalRuleDetailPage as eM,ReimbursementApprovalRulesPage$1 as eN,ReimbursementApprovalRulesPage as eO,ReimbursementDetailPage as eP,ReimbursementDetailPageSkeleton as eQ,ReimbursementPromoPage as eR,ReimbursementsBulkReviewDrawerPage as eS,ReloadContainer as eT,RemiSetupPage as eU,ReportsPage as eV,ResponsiveSized as eW,ResponsiveSizedStyle as eX,ReviewBillDetailsPage as eY,ReviewConfirmTransferPanel as eZ,ReviewDetailsPageSkeleton as e_,NavBarRightRowStyled as ea,NavBarWithClose as eb,NewGlobalMerchantPage as ec,NewUpdateAvailablePage as ed,NotFoundPage as ee,NotificationSettingsPage as ef,NotificationsPage as eg,OAuthConsentPage as eh,OPTION_BG_COLOR as ei,OPTION_DISABLED_BG_COLOR as ej,OPTION_HOVER_FOCUS_BG_COLOR as ek,OPTION_LABEL_COLOR as el,OPTION_LABEL_DISABLED_COLOR as em,OPTION_LABEL_HOVER_FOCUS_COLOR as en,OnboardingInitialLoader as eo,OnboardingSidebar as ep,OnboardingStepFrame as eq,OpExByVendorPage as er,OverlayContainerPage as es,PandLWithForecastPage as et,PanelDirtyGuardContext as eu,PanelInternalContext as ev,PaymentAccountSetupBillingAddressSection as ew,PeoplePage as ex,Picker as ey,PolicyLimitsRowList as ez,ALL_SETTINGS_MENU_OPTIONS as f,SvgClock as f$,ScheduleDetailsAccruedExpensesPage as f0,ScheduleDetailsFixedAssetsPage as f1,ScheduleDetailsPage as f2,SearchBoxWithFilterButton as f3,SearchableCheckboxCardList as f4,SessionTimeoutPopup as f5,SidePanelContext as f6,SidePanelLayout$1 as f7,SidePanelProvider as f8,SignIn as f9,StandardRegularLabel as fA,StandardRegularLi as fB,StandardRegularSp as fC,StandardSemiBold as fD,StandardSemiBoldSp as fE,StateManagedSelect$1 as fF,StatementParseInfoEntry as fG,StatementProcessingPage as fH,StatementsPage as fI,StickyThread as fJ,StyledCapsule as fK,StyledCheckBox$1 as fL,StyledText$c as fM,SubscriptionDetailPage as fN,SubscriptionSnackBar as fO,SubscriptionSummaryPage as fP,SvgAddRound as fQ,SvgAiIcon as fR,SvgAlert as fS,SvgArrowBottom as fT,SvgArrowCircleBottom as fU,SvgArrowFilledBottom as fV,SvgArrowLeft as fW,SvgArrowRight as fX,SvgArrowTailRight as fY,SvgArrowTailTop as fZ,SvgAvatar as f_,SimpleDownloadMenuButton as fa,SingleSelectNumeric as fb,SingleSelectPickerField as fc,SingleSelectWithoutClearableField as fd,SmallMedium as fe,SmallMediumBtn as ff,SmallMediumSp as fg,SmallRegular as fh,SmallRegularA as fi,SmallRegularBtn as fj,SmallRegularInput as fk,SmallRegularP as fl,SmallRegularSp as fm,SmallRegularUl as fn,SmallSemiBoldSp as fo,SomethingWrongPage as fp,Space as fq,SpendManagementListLoading as fr,SpendManagementListViewPage as fs,SpendManagementSetUpLoading as ft,StandardBold as fu,StandardMedium as fv,StandardMediumA as fw,StandardMediumSp as fx,StandardMediumTA as fy,StandardRegular as fz,ALPHA_NUMERIC_PATTERN as g,VENDOR_CHIP_ID_PREFIX as g$,SvgClose as g0,SvgCloseRound as g1,SvgComment as g2,SvgCompanyDetails as g3,SvgDelete as g4,SvgDoubleTick as g5,SvgEdit as g6,SvgEmail as g7,SvgFlag as g8,SvgHighImportance as g9,TextStyle as gA,ThreadComponent as gB,ThreadDotComponent as gC,ThreadsContext as gD,ToolkitProvider as gE,Tooltip$6 as gF,TopExDetailPage as gG,TransactionActivityLogPage as gH,TransactionActivityLogPanel as gI,TransactionDetailPage as gJ,TransactionDetailSkeleton as gK,TransactionListBig as gL,TransactionListComments as gM,TransactionListPage as gN,TransactionVendorDetailPage as gO,TransferDrawerPage as gP,TreasuryOverviewPage as gQ,TreasuryPromoPage as gR,TreasurySetUpPage as gS,TreasuryStatementsPage as gT,TreasuryTaxLetterPage as gU,TreasuryTransferOrReviewPage as gV,TrendChart as gW,UncategorizedAccountsMappingPage as gX,UnitIntegrationPage as gY,UserMultiSelectField as gZ,UserWithTimestamp as g_,SvgHighImportanceFill as ga,SvgHighImportanceFilled as gb,SvgInfinite as gc,SvgInfo as gd,SvgIntuitQuickBooksLogo as ge,SvgLoader as gf,SvgMore as gg,SvgNotification as gh,SvgOpenLink as gi,SvgPlayButtonSmall as gj,SvgQueryRound as gk,SvgRefresh as gl,SvgReload as gm,SvgSearch as gn,SvgTick as go,SvgTickRound as gp,SvgTickRoundFill as gq,SvgWarning as gr,SvgZeniLogoFull as gs,SyntheticAiCfoAnswerView as gt,THREAD_RESOLVED_NOTIFICATION_KIND as gu,THREAD_UNRESOLVED_NOTIFICATION_KIND as gv,TaskDetailPage as gw,TaskManagementPage as gx,TenantsDropDown as gy,TextHighlightSection as gz,APP_DRAWER_CONTENT_WIDTH_PX as h,debounce as h$,VariableSizeList as h0,Vendor2FAPopup as h1,VendorACHDetailsPage as h2,VendorAccruedSchedulesPage as h3,VendorDetailPage as h4,VendorDomesticWireDetailsPage as h5,VendorFiling1099DetailsEditablePage as h6,VendorFiling1099EditableFormSkeleton as h7,VendorFiling1099ListPage as h8,VendorFirstReviewPage as h9,appLocale as hA,applyExtractedPolicyRulesToFormValues as hB,base64FileSize as hC,buildBulkCreateCardPolicyTemplateRequestsFromInteractiveForm as hD,buildCardPolicyFormValuesFromRequest as hE,buildCreateCardPolicyTemplateRequest as hF,buildCreateCardPolicyTemplateRequestFromInteractiveForm as hG,buildMccCategoryChipId as hH,buildStickyKeySet as hI,buildVendorChipId as hJ,capitaliseWords as hK,capitalize as hL,cellVerticalAlignToFlexAlign as hM,clearAutoLogoutContext as hN,clickableRowStyles as hO,cloneDeep as hP,clsx$1 as hQ,components as hR,composeClasses as hS,computeRecommendationSelectionFeedback as hT,computeStatementProcessingStepsFromElapsedTime as hU,computeStickyLeftOffsets as hV,createSvgIcon as hW,currencyAmountCompactFormatter as hX,darkColors as hY,darkTheme as hZ,debounce$1 as h_,VendorInternationalSwiftBasedDetailsPage as ha,VendorInternationalWireDetailsPage as hb,VendorListPage as hc,VendorSchedulesPage as hd,VerificationFrame as he,VerifyDevice as hf,VerifyUnlockFinancialStackPage as hg,WebV2MicroService as hh,WebV2MicroServiceProvider as hi,WelcomeAnimation as hj,WindowSizeProvider as hk,ZeniAccountDetailLoading as hl,ZeniAccountDetailNavBarTitleShimmer as hm,ZeniAccountDetailPage as hn,ZeniAccountListLoading as ho,ZeniAccountListViewPage as hp,ZeniAccountPromoPage as hq,ZeniAccountSetUpPage as hr,ZeniAvatar as hs,ZeniDatePickerField as ht,ZeniText as hu,ZeniThemeProvider as hv,activeElement as hw,alignToJustify$1 as hx,amountToString as hy,amountValueToString as hz,AccountInfoPage as i,menuList as i$,defaultCardPolicyFormValues as i0,defer as i1,describeSchedule as i2,designDimension as i3,fetchRequest as i4,fileDownload as i5,formHasDirtyFields as i6,formatReconAccountDisplayName as i7,generateDataTestId as i8,generateUtilityClass as i9,getShowNegativeAmountInParenthesisForPercentDefaultValue as iA,getStableTransactionId as iB,getStatementParseTransactionCount as iC,getTagLabel as iD,getTemplatesFromTemplatedData as iE,getTransactionAppliedFiltersCount as iF,getTransactionTagColor$1 as iG,getUpdatedFiltersOnCategoryChange$1 as iH,getUpdatedFiltersOnMatchingOperatorChange$1 as iI,getUpdatedFiltersOnValueChange$1 as iJ,has as iK,hasAgentInsights as iL,invoicingMenuList as iM,isCloseManagementMenu as iN,isClosedCardStatus as iO,isCollaborationEntityType as iP,isCommentNotificationKind as iQ,isEqual$5 as iR,isLayoutSupported as iS,isMobileOrTabletView as iT,isMobilePhoneScreen as iU,isRecommendationFeedbackDimension as iV,isZeniAIUser as iW,jsxRuntimeExports as iX,lightColors as iY,lightTheme as iZ,memoTheme as i_,generateUtilityClasses as ia,getAlpha2 as ib,getAlpha3 as ic,getCockpitColor as id,getColorForALabel as ie,getCountries$1 as ig,getCustomerDataFromAutoComplete as ih,getDefaultExportFromCjs as ii,getDropdownStyles$1 as ij,getFileNameFromResponseHeaders as ik,getFilteredThreads as il,getFullName$1 as im,getHTMLWithCommentingSections as io,getHistoricMonthsList as ip,getInitialOpenThreadRequestFromSearch as iq,getLabelColor as ir,getMonthIndex as is,getMultiSelectDropdownStyles as it,getRecipientTotalAmount as iu,getReconAccountDisplayName as iv,getReviewVendorTagColor as iw,getRichLabel as ix,getSelectionData as iy,getShowNegativeAmountInParenthesisDefaultValue as iz,AccountLockedInfoModal as j,useLockBodyScroll as j$,mergeColumnDeclarativeWithRenderers as j0,mergeLayoutDefaults as j1,nanoid as j2,ownerDocument as j3,ownerWindow as j4,percentValueToString as j5,reactIsExports$1 as j6,refType as j7,requireToInteger as j8,requireToString as j9,toMccCategoryChipFieldValue as jA,toMenuOptionType as jB,toSettingsMenuOptionTypeStrict as jC,toSupportedLocaleStrict as jD,toVendorChipFieldValue as jE,trackTreasuryTransferAnalytics as jF,uploadAttachmentReceipts as jG,useAgentInsightEdits as jH,useAnimation as jI,useApprovalRulesV3Config as jJ,useBackNavigation as jK,useCollaborationInfoContext as jL,useCommentsDrawer as jM,useDefaultProps as jN,useDelayUnmount as jO,useDropdownPortal as jP,useEnhancedEffect as jQ,useEventCallback as jR,useExpenseAutomationEnabledForUser as jS,useFieldArray as jT,useFieldHelp as jU,useFilteredThreads as jV,useFloatingThreads as jW,useForm as jX,useFormContext as jY,useGlobalInfoContext as jZ,useHandleSelection as j_,require_baseProperty as ja,require_baseToString as jb,require_castSlice as jc,require_hasUnicode as jd,require_stringToArray as je,resolveBackgroundStatementProcessingCompletedSteps as jf,resolveColumnWidth as jg,roundAmountIfNeeded as jh,roundOffNumberToTwoDecimal as ji,routineIdFromSession as jj,scrollContainerToTargetAdjusted as jk,setAutoLogoutContext as jl,setShowNegativeAmountInParenthesisDefaultValue as jm,setShowNegativeAmountInParenthesisForPercentDefaultValue as jn,settingMenuList as jo,shortCadence as jp,sp as jq,styled as jr,textAlignForCell as js,textStyles as jt,toCollaborationEntityType as ju,toGroupedAccountingClassOptions as jv,toGroupedQboAccountOptions as jw,toInstitutionLogoDataUri as jx,toInvoicingMenuOptionType as jy,toInvoicingMenuOptionTypeStrict as jz,AccountReconDetailsDrawerPage$1 as k,useMeetingLinks as k0,usePanelDirtyGuardRegistry as k1,usePanelInternal as k2,usePrevious$1 as k3,useQuickViewMode as k4,useRegisterBackHandler as k5,useRegisterPanelDirtyGuard as k6,useRequestCloseAllCommentDrawers as k7,useRtl as k8,useSessionAutoLogoutConfig as k9,useSidePanelContext as ka,useSlot as kb,useSlotProps as kc,useTheme as kd,useToolkitContext as ke,useWindowSizeContext as kf,useZeniCardsVisibilityConfig as kg,useZeniFeatureContext as kh,useZeniThemeContext as ki,waitFor as kj,AccountReconDetailsDrawerPage as l,ActivityIndicator as m,ActualMatchingMatchDetailPage as n,AddAddressForCardDrawer as o,AddThreadFloating as p,AddThreadsComponent as q,AddToWalletPage as r,AddressFormPage as s,AgentInsightsEditor as t,AgingReportsPage as u,AiCfoChatHeader as v,AiCfoMenuContent as w,AiCfoOnboardingPage as x,AiCfoPage as y,AiCfoScopeModal as z};
104611
- //# sourceMappingURL=SessionTimeoutPopup-B2lRt_Ae.js.map
104611
+ //# sourceMappingURL=SessionTimeoutPopup-D4hx54Wu.js.map