@zeniai/web-cockpit-ui 2.3.20-qa → 2.3.21-dev
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/assets/CreditAgentRoutes-moJLbhEX.js +4 -0
- package/dist/assets/Editor-CbBxvSmp-C_jDBK45.js +285 -0
- package/dist/assets/{Preview-huVJNyXN.js → Preview-Bi907R7d.js} +1 -1
- package/dist/assets/{ScreenRoutes-BVeTebnD.js → ScreenRoutes-DBIjAKtT.js} +3 -3
- package/dist/assets/SignInScreen-4aU3_vW0.js +1 -0
- package/dist/assets/TaskDescriptionEditor-DyTyMxvk-CDpdNbKO.js +197 -0
- package/dist/assets/{analytics-D_6AzL-K.js → analytics-D6rU2phb.js} +1 -1
- package/dist/assets/analyticsHelper-9zdI2_60.js +1 -0
- package/dist/assets/apple-wallet-DMr790ZM-DUQOY6Dc.js +1 -0
- package/dist/assets/bank-verification-HpVi21UA-BeKlMSCu.js +1 -0
- package/dist/assets/{core-EMayeIBi.js → core-B3-F7eBr.js} +1 -1
- package/dist/assets/{dash.all.min-B6r3rMmw.js → dash.all.min-DcSmBiNR.js} +1 -1
- package/dist/assets/{index-BF49wH_D.js → empty-BvT6gWa7.js} +1 -1
- package/dist/assets/{empty-DWl7kK3I.js → empty-CQ_4F6AL.js} +1 -1
- package/dist/assets/epic-DGxFS5aI.js +2 -0
- package/dist/assets/index-B_T8blia.js +1 -0
- package/dist/assets/{index-DLCiuKlI.js → index-BbtpQSrw.js} +1 -1
- package/dist/assets/{index-CXM4J1yl.js → index-Bsjk-vms.js} +2 -2
- package/dist/assets/{index-PFCRZHdX.js → index-D9Ex1U6B.js} +1 -1
- package/dist/assets/{empty-Dc8aQJi7.js → index-DZRDjwaC.js} +1 -1
- package/dist/assets/index-DpXUK-2V.js +13 -0
- package/dist/assets/index-TjJI1T_l.js +1 -0
- package/dist/assets/{index-2_BWMG_M.js → index-ovt9Xz6x.js} +33891 -34438
- package/dist/assets/{lexical-XXrytMHo.js → lexical-C9tRwoBl.js} +1 -1
- package/dist/assets/{liveblocks-Dcp8HPbe.js → liveblocks-CyhgjAmM.js} +1 -1
- package/dist/assets/{lottie-CUtPCTZf.js → lottie-CaZsq4ox.js} +2 -2
- package/dist/assets/mcdonalds-logo-BTFuGR4i-BcsmRWp0.js +1 -0
- package/dist/assets/mercury-logo-Xd1WsXHh-CcGfsdFc.js +1 -0
- package/dist/assets/mercury-logo-dark-WebeUx9w-DDvE2mnq.js +1 -0
- package/dist/assets/more-providers-avatars-Dt7HPmCt-D7fl3oXk.js +1 -0
- package/dist/assets/{mui-DVv8D0EW.js → mui-DF3cXn7x.js} +1 -1
- package/dist/assets/netsuite-logo-Dp53a_wk-DHhfSa5A.js +1 -0
- package/dist/assets/netsuite-logo-dark-C53BYo7C-slTYfQG6.js +1 -0
- package/dist/assets/paypal-logo-RhbjaD58-BEMjEPiS.js +1 -0
- package/dist/assets/paypal-logo-dark-_jTZA_FH-Cc9Dr3f1.js +1 -0
- package/dist/assets/phone-otp-DI7iHM2C-DaB1jXjs.js +1 -0
- package/dist/assets/{react-CF1JFhLb.js → react-BFTgt5Nr.js} +1 -1
- package/dist/assets/{react-7gv0B6Cx.js → react-BL5QuQiL.js} +1 -1
- package/dist/assets/{react-qMWr9N9D.js → react-B_2gErNA.js} +2 -2
- package/dist/assets/{react-BpNlQ4lR.js → react-CEc9o3j_.js} +1 -1
- package/dist/assets/{react-Cxrkdp9m.js → react-CSvt5NVX.js} +2 -2
- package/dist/assets/{react-BmQlOArf.js → react-DgoxEFcu.js} +1 -1
- package/dist/assets/{react-uP2Tahv7.js → react-TFqk2ULt.js} +1 -1
- package/dist/assets/{react-BWHB6R4S.js → react-XUzH62MA.js} +1 -1
- package/dist/assets/{recharts-DP84o1Kk.js → recharts-mBO0sQiJ.js} +2 -2
- package/dist/assets/{sentry-BQtIKXSc.js → sentry-CMq56eOF.js} +1 -1
- package/dist/assets/subway-logo-B-Kc0fke-tO7AD_Vb.js +1 -0
- package/dist/assets/underline-BNKkE4Fr-DOksg_Rq.js +78 -0
- package/dist/assets/{url-DJ7W4rZe.js → url-BGsWubiD.js} +1 -1
- package/dist/assets/url-YDIkIjen.js +1 -0
- package/dist/assets/{utils-CAfHkCpW.js → utils-DegUrf4b.js} +1 -1
- package/dist/assets/vendor-react-lottie-player-Qhg4gMF8-B6KA4tHZ.js +2 -0
- package/dist/assets/zeni-card-trust-BpxZYDve-QOGaaPs2.js +1 -0
- package/dist/assets/{zeni-epic-state-qveEgWuQ.js → zeni-epic-state-XxVgcdSL.js} +3 -3
- package/dist/assets/zeni-thanksgiving-logo-full-BLmLHEXd-D9EXpClk.js +1 -0
- package/dist/index.html +1 -1
- package/package.json +3 -3
- package/dist/assets/CreditAgentRoutes-vtq9zBsd.js +0 -4
- package/dist/assets/SignInScreen-DnXOoEOV.js +0 -1
- package/dist/assets/analyticsHelper-ZhQhbv4U.js +0 -1
- package/dist/assets/epic-De3WRRh2.js +0 -2
- package/dist/assets/index-9SwwVgyL.js +0 -1
- package/dist/assets/index-DR9LimVo.js +0 -1
- package/dist/assets/url-GrtEhHSr.js +0 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/CreditAgentRoutes-
|
|
2
|
-
import{Sn as qf,So as Df,lQ as xt,f5 as vs,Sp as Dt,fe as an,f3 as Nf,Sq as Jt,fa as sn,Sr as ch,Ss as lh,St as ur,Su as fh,k3 as Mf,lS as Ct,k0 as dh,k7 as Ff,Sv as ys,k9 as hh,ka as ph,Sw as Er,Sx as cr,jy as mh,Sy as pn,Sz as Uo,dj as gh,h6 as Vo,h3 as un,hb as Mt,h9 as vh,SA as Bf,SB as Uf,ko as yh,kl as _h,SC as bh,kz as wh,ku as _s,kr as Eh,kg as Sh,SD as Rh,eN as Oh,dt as Th,m2 as Vf,SE as Ah,be as on,kd as bs,ki as Ih,AI as $f,lR as mn,SF as zf,SG as pt,md as cn,m8 as Gf,kT as $o,SH as xh,mg as Ch,H as et,bm as zo,SI as kh,jv as Ph,SJ as jh,SK as Hf,SL as Lh,z0 as ws,yy as qh,SM as Dh,yE as In,SN as Nh,yG as Mh,SO as Tt,yv as Fh,d7 as Bh,lV as Zf,lW as Wf,lU as Go,lT as Ho,lX as Uh,SP as Vh,z3 as $h,SQ as zh,yM as Gh,yZ as Hh,SR as Zh,yQ as Wh,SS as Yh,ST as Kt,SU as Zo,SV as Jh,SW as Kh,su as Xh,sA as Yf,SX as Jf,j0 as Qh,Rs as Kf,SY as ep,Rm as tp,SZ as rp,S_ as np,sD as ip,S$ as ap,Rx as op,Rl as sp,CF as Xf,T0 as xn,T1 as Qf,NW as Wo,NI as up,NZ as ed,NL as cp,T2 as lp,NQ as fp,NC as dp,NF as hp,T3 as pp,O1 as mp,NT as gp,bp as vp,bd as yp,T4 as _p,T5 as Gt,T6 as bp,T7 as wp,T8 as Ep,kH as No,kD as Sp,kN as Rp,kQ as Es,ba as td}from"./zeni-epic-state-qveEgWuQ.js";import{j as U}from"./liveblocks-Dcp8HPbe.js";import{a as ce,p as ye,d as rd,c as Yo,g as Op}from"./sentry-BQtIKXSc.js";import{m as wt,j as At,z as He,S as Tp,p as Ap,i as lr,N as Ip,C as Et,R as nd,v as at,a as Fe,h as kt,g as Ft,e as xp,u as Cp,T as kp,I as Pp,b as gn,L as jp,G as fr,c as vn,n as Nt,_ as Lp,x as qp,H as yn,d as Dp,B as Np,f as Cn,P as Mp,k as id,A as Fp,l as ad,o as od,q as Mo,r as Bp,W as Up,F as Vp,s as sd,M as $p,E as zp,t as Gp,w as Hp,V as Zp,y as Wp,D as Yp,J as Jp,K as Kp,O as Xp,Q as Qp,U as em,X as ud}from"./index-2_BWMG_M.js";import{f as tm}from"./analyticsHelper-ZhQhbv4U.js";import{i as Be,n as We,g as Se,o as ot,N as ir,k as gt,l as Te,p as cd,h as ze,u as Jo,j as Fo}from"./core-EMayeIBi.js";import{u as Bt,D as dr,n as tt,S as Zt}from"./mui-DVv8D0EW.js";import{a as Ze,b as rm,c as nm,d as im,e as Ko,f as am,g as om,h as sm,i as Wt,j as um,k as or,l as _n,m as cm,n as hr,o as lm}from"./utils-CAfHkCpW.js";import{r as Xo}from"./empty-DWl7kK3I.js";import{r as pr,a as fm}from"./index-DLCiuKlI.js";import{r as dm}from"./index-9SwwVgyL.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="47652c81-563c-4a3a-9651-d192a37ca2aa",e._sentryDebugIdIdentifier="sentry-dbid-47652c81-563c-4a3a-9651-d192a37ca2aa")}catch{}})();var kn={},Ss;function bn(){return Ss||(Ss=1,(function(e){var t=typeof Uint8Array<"u"&&typeof Uint16Array<"u"&&typeof Int32Array<"u";function n(a,o){return Object.prototype.hasOwnProperty.call(a,o)}e.assign=function(a){for(var o=Array.prototype.slice.call(arguments,1);o.length;){var d=o.shift();if(d){if(typeof d!="object")throw new TypeError(d+"must be non-object");for(var f in d)n(d,f)&&(a[f]=d[f])}}return a},e.shrinkBuf=function(a,o){return a.length===o?a:a.subarray?a.subarray(0,o):(a.length=o,a)};var r={arraySet:function(a,o,d,f,v){if(o.subarray&&a.subarray){a.set(o.subarray(d,d+f),v);return}for(var s=0;s<f;s++)a[v+s]=o[d+s]},flattenChunks:function(a){var o,d,f,v,s,l;for(f=0,o=0,d=a.length;o<d;o++)f+=a[o].length;for(l=new Uint8Array(f),v=0,o=0,d=a.length;o<d;o++)s=a[o],l.set(s,v),v+=s.length;return l}},i={arraySet:function(a,o,d,f,v){for(var s=0;s<f;s++)a[v+s]=o[d+s]},flattenChunks:function(a){return[].concat.apply([],a)}};e.setTyped=function(a){a?(e.Buf8=Uint8Array,e.Buf16=Uint16Array,e.Buf32=Int32Array,e.assign(e,r)):(e.Buf8=Array,e.Buf16=Array,e.Buf32=Array,e.assign(e,i))},e.setTyped(t)})(kn)),kn}var ut={},Pt={},Rs;function hm(){if(Rs)return Pt;Rs=1;var e=bn(),t=4,n=0,r=1,i=2;function a(C){for(var ne=C.length;--ne>=0;)C[ne]=0}var o=0,d=1,f=2,v=3,s=258,l=29,c=256,y=c+1+l,h=30,m=19,g=2*y+1,u=15,_=16,E=7,w=256,b=16,x=17,O=18,P=[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],M=[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],W=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],V=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],S=512,I=new Array((y+2)*2);a(I);var $=new Array(h*2);a($);var z=new Array(S);a(z);var X=new Array(s-v+1);a(X);var A=new Array(l);a(A);var k=new Array(h);a(k);function j(C,ne,se,fe,Z){this.static_tree=C,this.extra_bits=ne,this.extra_base=se,this.elems=fe,this.max_length=Z,this.has_stree=C&&C.length}var N,H,B;function q(C,ne){this.dyn_tree=C,this.max_code=0,this.stat_desc=ne}function L(C){return C<256?z[C]:z[256+(C>>>7)]}function D(C,ne){C.pending_buf[C.pending++]=ne&255,C.pending_buf[C.pending++]=ne>>>8&255}function F(C,ne,se){C.bi_valid>_-se?(C.bi_buf|=ne<<C.bi_valid&65535,D(C,C.bi_buf),C.bi_buf=ne>>_-C.bi_valid,C.bi_valid+=se-_):(C.bi_buf|=ne<<C.bi_valid&65535,C.bi_valid+=se)}function K(C,ne,se){F(C,se[ne*2],se[ne*2+1])}function J(C,ne){var se=0;do se|=C&1,C>>>=1,se<<=1;while(--ne>0);return se>>>1}function ae(C){C.bi_valid===16?(D(C,C.bi_buf),C.bi_buf=0,C.bi_valid=0):C.bi_valid>=8&&(C.pending_buf[C.pending++]=C.bi_buf&255,C.bi_buf>>=8,C.bi_valid-=8)}function ue(C,ne){var se=ne.dyn_tree,fe=ne.max_code,Z=ne.stat_desc.static_tree,ie=ne.stat_desc.has_stree,R=ne.stat_desc.extra_bits,oe=ne.stat_desc.extra_base,be=ne.stat_desc.max_length,p,te,re,T,G,ee,_e=0;for(T=0;T<=u;T++)C.bl_count[T]=0;for(se[C.heap[C.heap_max]*2+1]=0,p=C.heap_max+1;p<g;p++)te=C.heap[p],T=se[se[te*2+1]*2+1]+1,T>be&&(T=be,_e++),se[te*2+1]=T,!(te>fe)&&(C.bl_count[T]++,G=0,te>=oe&&(G=R[te-oe]),ee=se[te*2],C.opt_len+=ee*(T+G),ie&&(C.static_len+=ee*(Z[te*2+1]+G)));if(_e!==0){do{for(T=be-1;C.bl_count[T]===0;)T--;C.bl_count[T]--,C.bl_count[T+1]+=2,C.bl_count[be]--,_e-=2}while(_e>0);for(T=be;T!==0;T--)for(te=C.bl_count[T];te!==0;)re=C.heap[--p],!(re>fe)&&(se[re*2+1]!==T&&(C.opt_len+=(T-se[re*2+1])*se[re*2],se[re*2+1]=T),te--)}}function ve(C,ne,se){var fe=new Array(u+1),Z=0,ie,R;for(ie=1;ie<=u;ie++)fe[ie]=Z=Z+se[ie-1]<<1;for(R=0;R<=ne;R++){var oe=C[R*2+1];oe!==0&&(C[R*2]=J(fe[oe]++,oe))}}function me(){var C,ne,se,fe,Z,ie=new Array(u+1);for(se=0,fe=0;fe<l-1;fe++)for(A[fe]=se,C=0;C<1<<P[fe];C++)X[se++]=fe;for(X[se-1]=fe,Z=0,fe=0;fe<16;fe++)for(k[fe]=Z,C=0;C<1<<M[fe];C++)z[Z++]=fe;for(Z>>=7;fe<h;fe++)for(k[fe]=Z<<7,C=0;C<1<<M[fe]-7;C++)z[256+Z++]=fe;for(ne=0;ne<=u;ne++)ie[ne]=0;for(C=0;C<=143;)I[C*2+1]=8,C++,ie[8]++;for(;C<=255;)I[C*2+1]=9,C++,ie[9]++;for(;C<=279;)I[C*2+1]=7,C++,ie[7]++;for(;C<=287;)I[C*2+1]=8,C++,ie[8]++;for(ve(I,y+1,ie),C=0;C<h;C++)$[C*2+1]=5,$[C*2]=J(C,5);N=new j(I,P,c+1,y,u),H=new j($,M,0,h,u),B=new j(new Array(0),W,0,m,E)}function we(C){var ne;for(ne=0;ne<y;ne++)C.dyn_ltree[ne*2]=0;for(ne=0;ne<h;ne++)C.dyn_dtree[ne*2]=0;for(ne=0;ne<m;ne++)C.bl_tree[ne*2]=0;C.dyn_ltree[w*2]=1,C.opt_len=C.static_len=0,C.last_lit=C.matches=0}function Ce(C){C.bi_valid>8?D(C,C.bi_buf):C.bi_valid>0&&(C.pending_buf[C.pending++]=C.bi_buf),C.bi_buf=0,C.bi_valid=0}function Pe(C,ne,se,fe){Ce(C),D(C,se),D(C,~se),e.arraySet(C.pending_buf,C.window,ne,se,C.pending),C.pending+=se}function je(C,ne,se,fe){var Z=ne*2,ie=se*2;return C[Z]<C[ie]||C[Z]===C[ie]&&fe[ne]<=fe[se]}function Ie(C,ne,se){for(var fe=C.heap[se],Z=se<<1;Z<=C.heap_len&&(Z<C.heap_len&&je(ne,C.heap[Z+1],C.heap[Z],C.depth)&&Z++,!je(ne,fe,C.heap[Z],C.depth));)C.heap[se]=C.heap[Z],se=Z,Z<<=1;C.heap[se]=fe}function Ee(C,ne,se){var fe,Z,ie=0,R,oe;if(C.last_lit!==0)do fe=C.pending_buf[C.d_buf+ie*2]<<8|C.pending_buf[C.d_buf+ie*2+1],Z=C.pending_buf[C.l_buf+ie],ie++,fe===0?K(C,Z,ne):(R=X[Z],K(C,R+c+1,ne),oe=P[R],oe!==0&&(Z-=A[R],F(C,Z,oe)),fe--,R=L(fe),K(C,R,se),oe=M[R],oe!==0&&(fe-=k[R],F(C,fe,oe)));while(ie<C.last_lit);K(C,w,ne)}function $e(C,ne){var se=ne.dyn_tree,fe=ne.stat_desc.static_tree,Z=ne.stat_desc.has_stree,ie=ne.stat_desc.elems,R,oe,be=-1,p;for(C.heap_len=0,C.heap_max=g,R=0;R<ie;R++)se[R*2]!==0?(C.heap[++C.heap_len]=be=R,C.depth[R]=0):se[R*2+1]=0;for(;C.heap_len<2;)p=C.heap[++C.heap_len]=be<2?++be:0,se[p*2]=1,C.depth[p]=0,C.opt_len--,Z&&(C.static_len-=fe[p*2+1]);for(ne.max_code=be,R=C.heap_len>>1;R>=1;R--)Ie(C,se,R);p=ie;do R=C.heap[1],C.heap[1]=C.heap[C.heap_len--],Ie(C,se,1),oe=C.heap[1],C.heap[--C.heap_max]=R,C.heap[--C.heap_max]=oe,se[p*2]=se[R*2]+se[oe*2],C.depth[p]=(C.depth[R]>=C.depth[oe]?C.depth[R]:C.depth[oe])+1,se[R*2+1]=se[oe*2+1]=p,C.heap[1]=p++,Ie(C,se,1);while(C.heap_len>=2);C.heap[--C.heap_max]=C.heap[1],ue(C,ne),ve(se,be,C.bl_count)}function st(C,ne,se){var fe,Z=-1,ie,R=ne[1],oe=0,be=7,p=4;for(R===0&&(be=138,p=3),ne[(se+1)*2+1]=65535,fe=0;fe<=se;fe++)ie=R,R=ne[(fe+1)*2+1],!(++oe<be&&ie===R)&&(oe<p?C.bl_tree[ie*2]+=oe:ie!==0?(ie!==Z&&C.bl_tree[ie*2]++,C.bl_tree[b*2]++):oe<=10?C.bl_tree[x*2]++:C.bl_tree[O*2]++,oe=0,Z=ie,R===0?(be=138,p=3):ie===R?(be=6,p=3):(be=7,p=4))}function qe(C,ne,se){var fe,Z=-1,ie,R=ne[1],oe=0,be=7,p=4;for(R===0&&(be=138,p=3),fe=0;fe<=se;fe++)if(ie=R,R=ne[(fe+1)*2+1],!(++oe<be&&ie===R)){if(oe<p)do K(C,ie,C.bl_tree);while(--oe!==0);else ie!==0?(ie!==Z&&(K(C,ie,C.bl_tree),oe--),K(C,b,C.bl_tree),F(C,oe-3,2)):oe<=10?(K(C,x,C.bl_tree),F(C,oe-3,3)):(K(C,O,C.bl_tree),F(C,oe-11,7));oe=0,Z=ie,R===0?(be=138,p=3):ie===R?(be=6,p=3):(be=7,p=4)}}function Ne(C){var ne;for(st(C,C.dyn_ltree,C.l_desc.max_code),st(C,C.dyn_dtree,C.d_desc.max_code),$e(C,C.bl_desc),ne=m-1;ne>=3&&C.bl_tree[V[ne]*2+1]===0;ne--);return C.opt_len+=3*(ne+1)+5+5+4,ne}function Ye(C,ne,se,fe){var Z;for(F(C,ne-257,5),F(C,se-1,5),F(C,fe-4,4),Z=0;Z<fe;Z++)F(C,C.bl_tree[V[Z]*2+1],3);qe(C,C.dyn_ltree,ne-1),qe(C,C.dyn_dtree,se-1)}function Y(C){var ne=4093624447,se;for(se=0;se<=31;se++,ne>>>=1)if(ne&1&&C.dyn_ltree[se*2]!==0)return n;if(C.dyn_ltree[18]!==0||C.dyn_ltree[20]!==0||C.dyn_ltree[26]!==0)return r;for(se=32;se<c;se++)if(C.dyn_ltree[se*2]!==0)return r;return n}var Q=!1;function le(C){Q||(me(),Q=!0),C.l_desc=new q(C.dyn_ltree,N),C.d_desc=new q(C.dyn_dtree,H),C.bl_desc=new q(C.bl_tree,B),C.bi_buf=0,C.bi_valid=0,we(C)}function ge(C,ne,se,fe){F(C,(o<<1)+(fe?1:0),3),Pe(C,ne,se)}function de(C){F(C,d<<1,3),K(C,w,I),ae(C)}function Re(C,ne,se,fe){var Z,ie,R=0;C.level>0?(C.strm.data_type===i&&(C.strm.data_type=Y(C)),$e(C,C.l_desc),$e(C,C.d_desc),R=Ne(C),Z=C.opt_len+3+7>>>3,ie=C.static_len+3+7>>>3,ie<=Z&&(Z=ie)):Z=ie=se+5,se+4<=Z&&ne!==-1?ge(C,ne,se,fe):C.strategy===t||ie===Z?(F(C,(d<<1)+(fe?1:0),3),Ee(C,I,$)):(F(C,(f<<1)+(fe?1:0),3),Ye(C,C.l_desc.max_code+1,C.d_desc.max_code+1,R+1),Ee(C,C.dyn_ltree,C.dyn_dtree)),we(C),fe&&Ce(C)}function Oe(C,ne,se){return C.pending_buf[C.d_buf+C.last_lit*2]=ne>>>8&255,C.pending_buf[C.d_buf+C.last_lit*2+1]=ne&255,C.pending_buf[C.l_buf+C.last_lit]=se&255,C.last_lit++,ne===0?C.dyn_ltree[se*2]++:(C.matches++,ne--,C.dyn_ltree[(X[se]+c+1)*2]++,C.dyn_dtree[L(ne)*2]++),C.last_lit===C.lit_bufsize-1}return Pt._tr_init=le,Pt._tr_stored_block=ge,Pt._tr_flush_block=Re,Pt._tr_tally=Oe,Pt._tr_align=de,Pt}var Pn,Os;function ld(){if(Os)return Pn;Os=1;function e(t,n,r,i){for(var a=t&65535|0,o=t>>>16&65535|0,d=0;r!==0;){d=r>2e3?2e3:r,r-=d;do a=a+n[i++]|0,o=o+a|0;while(--d);a%=65521,o%=65521}return a|o<<16|0}return Pn=e,Pn}var jn,Ts;function fd(){if(Ts)return jn;Ts=1;function e(){for(var r,i=[],a=0;a<256;a++){r=a;for(var o=0;o<8;o++)r=r&1?3988292384^r>>>1:r>>>1;i[a]=r}return i}var t=e();function n(r,i,a,o){var d=t,f=o+a;r^=-1;for(var v=o;v<f;v++)r=r>>>8^d[(r^i[v])&255];return r^-1}return jn=n,jn}var Ln,As;function pm(){return As||(As=1,Ln={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"}),Ln}var Is;function mm(){if(Is)return ut;Is=1;var e=bn(),t=hm(),n=ld(),r=fd(),i=pm(),a=0,o=1,d=3,f=4,v=5,s=0,l=1,c=-2,y=-3,h=-5,m=-1,g=1,u=2,_=3,E=4,w=0,b=2,x=8,O=9,P=15,M=8,W=29,V=256,S=V+1+W,I=30,$=19,z=2*S+1,X=15,A=3,k=258,j=k+A+1,N=32,H=42,B=69,q=73,L=91,D=103,F=113,K=666,J=1,ae=2,ue=3,ve=4,me=3;function we(p,te){return p.msg=i[te],te}function Ce(p){return(p<<1)-(p>4?9:0)}function Pe(p){for(var te=p.length;--te>=0;)p[te]=0}function je(p){var te=p.state,re=te.pending;re>p.avail_out&&(re=p.avail_out),re!==0&&(e.arraySet(p.output,te.pending_buf,te.pending_out,re,p.next_out),p.next_out+=re,te.pending_out+=re,p.total_out+=re,p.avail_out-=re,te.pending-=re,te.pending===0&&(te.pending_out=0))}function Ie(p,te){t._tr_flush_block(p,p.block_start>=0?p.block_start:-1,p.strstart-p.block_start,te),p.block_start=p.strstart,je(p.strm)}function Ee(p,te){p.pending_buf[p.pending++]=te}function $e(p,te){p.pending_buf[p.pending++]=te>>>8&255,p.pending_buf[p.pending++]=te&255}function st(p,te,re,T){var G=p.avail_in;return G>T&&(G=T),G===0?0:(p.avail_in-=G,e.arraySet(te,p.input,p.next_in,G,re),p.state.wrap===1?p.adler=n(p.adler,te,G,re):p.state.wrap===2&&(p.adler=r(p.adler,te,G,re)),p.next_in+=G,p.total_in+=G,G)}function qe(p,te){var re=p.max_chain_length,T=p.strstart,G,ee,_e=p.prev_length,he=p.nice_match,pe=p.strstart>p.w_size-j?p.strstart-(p.w_size-j):0,Ae=p.window,vt=p.w_mask,Le=p.prev,xe=p.strstart+k,Ue=Ae[T+_e-1],Je=Ae[T+_e];p.prev_length>=p.good_match&&(re>>=2),he>p.lookahead&&(he=p.lookahead);do if(G=te,!(Ae[G+_e]!==Je||Ae[G+_e-1]!==Ue||Ae[G]!==Ae[T]||Ae[++G]!==Ae[T+1])){T+=2,G++;do;while(Ae[++T]===Ae[++G]&&Ae[++T]===Ae[++G]&&Ae[++T]===Ae[++G]&&Ae[++T]===Ae[++G]&&Ae[++T]===Ae[++G]&&Ae[++T]===Ae[++G]&&Ae[++T]===Ae[++G]&&Ae[++T]===Ae[++G]&&T<xe);if(ee=k-(xe-T),T=xe-k,ee>_e){if(p.match_start=te,_e=ee,ee>=he)break;Ue=Ae[T+_e-1],Je=Ae[T+_e]}}while((te=Le[te&vt])>pe&&--re!==0);return _e<=p.lookahead?_e:p.lookahead}function Ne(p){var te=p.w_size,re,T,G,ee,_e;do{if(ee=p.window_size-p.lookahead-p.strstart,p.strstart>=te+(te-j)){e.arraySet(p.window,p.window,te,te,0),p.match_start-=te,p.strstart-=te,p.block_start-=te,T=p.hash_size,re=T;do G=p.head[--re],p.head[re]=G>=te?G-te:0;while(--T);T=te,re=T;do G=p.prev[--re],p.prev[re]=G>=te?G-te:0;while(--T);ee+=te}if(p.strm.avail_in===0)break;if(T=st(p.strm,p.window,p.strstart+p.lookahead,ee),p.lookahead+=T,p.lookahead+p.insert>=A)for(_e=p.strstart-p.insert,p.ins_h=p.window[_e],p.ins_h=(p.ins_h<<p.hash_shift^p.window[_e+1])&p.hash_mask;p.insert&&(p.ins_h=(p.ins_h<<p.hash_shift^p.window[_e+A-1])&p.hash_mask,p.prev[_e&p.w_mask]=p.head[p.ins_h],p.head[p.ins_h]=_e,_e++,p.insert--,!(p.lookahead+p.insert<A)););}while(p.lookahead<j&&p.strm.avail_in!==0)}function Ye(p,te){var re=65535;for(re>p.pending_buf_size-5&&(re=p.pending_buf_size-5);;){if(p.lookahead<=1){if(Ne(p),p.lookahead===0&&te===a)return J;if(p.lookahead===0)break}p.strstart+=p.lookahead,p.lookahead=0;var T=p.block_start+re;if((p.strstart===0||p.strstart>=T)&&(p.lookahead=p.strstart-T,p.strstart=T,Ie(p,!1),p.strm.avail_out===0)||p.strstart-p.block_start>=p.w_size-j&&(Ie(p,!1),p.strm.avail_out===0))return J}return p.insert=0,te===f?(Ie(p,!0),p.strm.avail_out===0?ue:ve):(p.strstart>p.block_start&&(Ie(p,!1),p.strm.avail_out===0),J)}function Y(p,te){for(var re,T;;){if(p.lookahead<j){if(Ne(p),p.lookahead<j&&te===a)return J;if(p.lookahead===0)break}if(re=0,p.lookahead>=A&&(p.ins_h=(p.ins_h<<p.hash_shift^p.window[p.strstart+A-1])&p.hash_mask,re=p.prev[p.strstart&p.w_mask]=p.head[p.ins_h],p.head[p.ins_h]=p.strstart),re!==0&&p.strstart-re<=p.w_size-j&&(p.match_length=qe(p,re)),p.match_length>=A)if(T=t._tr_tally(p,p.strstart-p.match_start,p.match_length-A),p.lookahead-=p.match_length,p.match_length<=p.max_lazy_match&&p.lookahead>=A){p.match_length--;do p.strstart++,p.ins_h=(p.ins_h<<p.hash_shift^p.window[p.strstart+A-1])&p.hash_mask,re=p.prev[p.strstart&p.w_mask]=p.head[p.ins_h],p.head[p.ins_h]=p.strstart;while(--p.match_length!==0);p.strstart++}else p.strstart+=p.match_length,p.match_length=0,p.ins_h=p.window[p.strstart],p.ins_h=(p.ins_h<<p.hash_shift^p.window[p.strstart+1])&p.hash_mask;else T=t._tr_tally(p,0,p.window[p.strstart]),p.lookahead--,p.strstart++;if(T&&(Ie(p,!1),p.strm.avail_out===0))return J}return p.insert=p.strstart<A-1?p.strstart:A-1,te===f?(Ie(p,!0),p.strm.avail_out===0?ue:ve):p.last_lit&&(Ie(p,!1),p.strm.avail_out===0)?J:ae}function Q(p,te){for(var re,T,G;;){if(p.lookahead<j){if(Ne(p),p.lookahead<j&&te===a)return J;if(p.lookahead===0)break}if(re=0,p.lookahead>=A&&(p.ins_h=(p.ins_h<<p.hash_shift^p.window[p.strstart+A-1])&p.hash_mask,re=p.prev[p.strstart&p.w_mask]=p.head[p.ins_h],p.head[p.ins_h]=p.strstart),p.prev_length=p.match_length,p.prev_match=p.match_start,p.match_length=A-1,re!==0&&p.prev_length<p.max_lazy_match&&p.strstart-re<=p.w_size-j&&(p.match_length=qe(p,re),p.match_length<=5&&(p.strategy===g||p.match_length===A&&p.strstart-p.match_start>4096)&&(p.match_length=A-1)),p.prev_length>=A&&p.match_length<=p.prev_length){G=p.strstart+p.lookahead-A,T=t._tr_tally(p,p.strstart-1-p.prev_match,p.prev_length-A),p.lookahead-=p.prev_length-1,p.prev_length-=2;do++p.strstart<=G&&(p.ins_h=(p.ins_h<<p.hash_shift^p.window[p.strstart+A-1])&p.hash_mask,re=p.prev[p.strstart&p.w_mask]=p.head[p.ins_h],p.head[p.ins_h]=p.strstart);while(--p.prev_length!==0);if(p.match_available=0,p.match_length=A-1,p.strstart++,T&&(Ie(p,!1),p.strm.avail_out===0))return J}else if(p.match_available){if(T=t._tr_tally(p,0,p.window[p.strstart-1]),T&&Ie(p,!1),p.strstart++,p.lookahead--,p.strm.avail_out===0)return J}else p.match_available=1,p.strstart++,p.lookahead--}return p.match_available&&(T=t._tr_tally(p,0,p.window[p.strstart-1]),p.match_available=0),p.insert=p.strstart<A-1?p.strstart:A-1,te===f?(Ie(p,!0),p.strm.avail_out===0?ue:ve):p.last_lit&&(Ie(p,!1),p.strm.avail_out===0)?J:ae}function le(p,te){for(var re,T,G,ee,_e=p.window;;){if(p.lookahead<=k){if(Ne(p),p.lookahead<=k&&te===a)return J;if(p.lookahead===0)break}if(p.match_length=0,p.lookahead>=A&&p.strstart>0&&(G=p.strstart-1,T=_e[G],T===_e[++G]&&T===_e[++G]&&T===_e[++G])){ee=p.strstart+k;do;while(T===_e[++G]&&T===_e[++G]&&T===_e[++G]&&T===_e[++G]&&T===_e[++G]&&T===_e[++G]&&T===_e[++G]&&T===_e[++G]&&G<ee);p.match_length=k-(ee-G),p.match_length>p.lookahead&&(p.match_length=p.lookahead)}if(p.match_length>=A?(re=t._tr_tally(p,1,p.match_length-A),p.lookahead-=p.match_length,p.strstart+=p.match_length,p.match_length=0):(re=t._tr_tally(p,0,p.window[p.strstart]),p.lookahead--,p.strstart++),re&&(Ie(p,!1),p.strm.avail_out===0))return J}return p.insert=0,te===f?(Ie(p,!0),p.strm.avail_out===0?ue:ve):p.last_lit&&(Ie(p,!1),p.strm.avail_out===0)?J:ae}function ge(p,te){for(var re;;){if(p.lookahead===0&&(Ne(p),p.lookahead===0)){if(te===a)return J;break}if(p.match_length=0,re=t._tr_tally(p,0,p.window[p.strstart]),p.lookahead--,p.strstart++,re&&(Ie(p,!1),p.strm.avail_out===0))return J}return p.insert=0,te===f?(Ie(p,!0),p.strm.avail_out===0?ue:ve):p.last_lit&&(Ie(p,!1),p.strm.avail_out===0)?J:ae}function de(p,te,re,T,G){this.good_length=p,this.max_lazy=te,this.nice_length=re,this.max_chain=T,this.func=G}var Re;Re=[new de(0,0,0,0,Ye),new de(4,4,8,4,Y),new de(4,5,16,8,Y),new de(4,6,32,32,Y),new de(4,4,16,16,Q),new de(8,16,32,32,Q),new de(8,16,128,128,Q),new de(8,32,128,256,Q),new de(32,128,258,1024,Q),new de(32,258,258,4096,Q)];function Oe(p){p.window_size=2*p.w_size,Pe(p.head),p.max_lazy_match=Re[p.level].max_lazy,p.good_match=Re[p.level].good_length,p.nice_match=Re[p.level].nice_length,p.max_chain_length=Re[p.level].max_chain,p.strstart=0,p.block_start=0,p.lookahead=0,p.insert=0,p.match_length=p.prev_length=A-1,p.match_available=0,p.ins_h=0}function C(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=x,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new e.Buf16(z*2),this.dyn_dtree=new e.Buf16((2*I+1)*2),this.bl_tree=new e.Buf16((2*$+1)*2),Pe(this.dyn_ltree),Pe(this.dyn_dtree),Pe(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new e.Buf16(X+1),this.heap=new e.Buf16(2*S+1),Pe(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new e.Buf16(2*S+1),Pe(this.depth),this.l_buf=0,this.lit_bufsize=0,this.last_lit=0,this.d_buf=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}function ne(p){var te;return!p||!p.state?we(p,c):(p.total_in=p.total_out=0,p.data_type=b,te=p.state,te.pending=0,te.pending_out=0,te.wrap<0&&(te.wrap=-te.wrap),te.status=te.wrap?H:F,p.adler=te.wrap===2?0:1,te.last_flush=a,t._tr_init(te),s)}function se(p){var te=ne(p);return te===s&&Oe(p.state),te}function fe(p,te){return!p||!p.state||p.state.wrap!==2?c:(p.state.gzhead=te,s)}function Z(p,te,re,T,G,ee){if(!p)return c;var _e=1;if(te===m&&(te=6),T<0?(_e=0,T=-T):T>15&&(_e=2,T-=16),G<1||G>O||re!==x||T<8||T>15||te<0||te>9||ee<0||ee>E)return we(p,c);T===8&&(T=9);var he=new C;return p.state=he,he.strm=p,he.wrap=_e,he.gzhead=null,he.w_bits=T,he.w_size=1<<he.w_bits,he.w_mask=he.w_size-1,he.hash_bits=G+7,he.hash_size=1<<he.hash_bits,he.hash_mask=he.hash_size-1,he.hash_shift=~~((he.hash_bits+A-1)/A),he.window=new e.Buf8(he.w_size*2),he.head=new e.Buf16(he.hash_size),he.prev=new e.Buf16(he.w_size),he.lit_bufsize=1<<G+6,he.pending_buf_size=he.lit_bufsize*4,he.pending_buf=new e.Buf8(he.pending_buf_size),he.d_buf=1*he.lit_bufsize,he.l_buf=3*he.lit_bufsize,he.level=te,he.strategy=ee,he.method=re,se(p)}function ie(p,te){return Z(p,te,x,P,M,w)}function R(p,te){var re,T,G,ee;if(!p||!p.state||te>v||te<0)return p?we(p,c):c;if(T=p.state,!p.output||!p.input&&p.avail_in!==0||T.status===K&&te!==f)return we(p,p.avail_out===0?h:c);if(T.strm=p,re=T.last_flush,T.last_flush=te,T.status===H)if(T.wrap===2)p.adler=0,Ee(T,31),Ee(T,139),Ee(T,8),T.gzhead?(Ee(T,(T.gzhead.text?1:0)+(T.gzhead.hcrc?2:0)+(T.gzhead.extra?4:0)+(T.gzhead.name?8:0)+(T.gzhead.comment?16:0)),Ee(T,T.gzhead.time&255),Ee(T,T.gzhead.time>>8&255),Ee(T,T.gzhead.time>>16&255),Ee(T,T.gzhead.time>>24&255),Ee(T,T.level===9?2:T.strategy>=u||T.level<2?4:0),Ee(T,T.gzhead.os&255),T.gzhead.extra&&T.gzhead.extra.length&&(Ee(T,T.gzhead.extra.length&255),Ee(T,T.gzhead.extra.length>>8&255)),T.gzhead.hcrc&&(p.adler=r(p.adler,T.pending_buf,T.pending,0)),T.gzindex=0,T.status=B):(Ee(T,0),Ee(T,0),Ee(T,0),Ee(T,0),Ee(T,0),Ee(T,T.level===9?2:T.strategy>=u||T.level<2?4:0),Ee(T,me),T.status=F);else{var _e=x+(T.w_bits-8<<4)<<8,he=-1;T.strategy>=u||T.level<2?he=0:T.level<6?he=1:T.level===6?he=2:he=3,_e|=he<<6,T.strstart!==0&&(_e|=N),_e+=31-_e%31,T.status=F,$e(T,_e),T.strstart!==0&&($e(T,p.adler>>>16),$e(T,p.adler&65535)),p.adler=1}if(T.status===B)if(T.gzhead.extra){for(G=T.pending;T.gzindex<(T.gzhead.extra.length&65535)&&!(T.pending===T.pending_buf_size&&(T.gzhead.hcrc&&T.pending>G&&(p.adler=r(p.adler,T.pending_buf,T.pending-G,G)),je(p),G=T.pending,T.pending===T.pending_buf_size));)Ee(T,T.gzhead.extra[T.gzindex]&255),T.gzindex++;T.gzhead.hcrc&&T.pending>G&&(p.adler=r(p.adler,T.pending_buf,T.pending-G,G)),T.gzindex===T.gzhead.extra.length&&(T.gzindex=0,T.status=q)}else T.status=q;if(T.status===q)if(T.gzhead.name){G=T.pending;do{if(T.pending===T.pending_buf_size&&(T.gzhead.hcrc&&T.pending>G&&(p.adler=r(p.adler,T.pending_buf,T.pending-G,G)),je(p),G=T.pending,T.pending===T.pending_buf_size)){ee=1;break}T.gzindex<T.gzhead.name.length?ee=T.gzhead.name.charCodeAt(T.gzindex++)&255:ee=0,Ee(T,ee)}while(ee!==0);T.gzhead.hcrc&&T.pending>G&&(p.adler=r(p.adler,T.pending_buf,T.pending-G,G)),ee===0&&(T.gzindex=0,T.status=L)}else T.status=L;if(T.status===L)if(T.gzhead.comment){G=T.pending;do{if(T.pending===T.pending_buf_size&&(T.gzhead.hcrc&&T.pending>G&&(p.adler=r(p.adler,T.pending_buf,T.pending-G,G)),je(p),G=T.pending,T.pending===T.pending_buf_size)){ee=1;break}T.gzindex<T.gzhead.comment.length?ee=T.gzhead.comment.charCodeAt(T.gzindex++)&255:ee=0,Ee(T,ee)}while(ee!==0);T.gzhead.hcrc&&T.pending>G&&(p.adler=r(p.adler,T.pending_buf,T.pending-G,G)),ee===0&&(T.status=D)}else T.status=D;if(T.status===D&&(T.gzhead.hcrc?(T.pending+2>T.pending_buf_size&&je(p),T.pending+2<=T.pending_buf_size&&(Ee(T,p.adler&255),Ee(T,p.adler>>8&255),p.adler=0,T.status=F)):T.status=F),T.pending!==0){if(je(p),p.avail_out===0)return T.last_flush=-1,s}else if(p.avail_in===0&&Ce(te)<=Ce(re)&&te!==f)return we(p,h);if(T.status===K&&p.avail_in!==0)return we(p,h);if(p.avail_in!==0||T.lookahead!==0||te!==a&&T.status!==K){var pe=T.strategy===u?ge(T,te):T.strategy===_?le(T,te):Re[T.level].func(T,te);if((pe===ue||pe===ve)&&(T.status=K),pe===J||pe===ue)return p.avail_out===0&&(T.last_flush=-1),s;if(pe===ae&&(te===o?t._tr_align(T):te!==v&&(t._tr_stored_block(T,0,0,!1),te===d&&(Pe(T.head),T.lookahead===0&&(T.strstart=0,T.block_start=0,T.insert=0))),je(p),p.avail_out===0))return T.last_flush=-1,s}return te!==f?s:T.wrap<=0?l:(T.wrap===2?(Ee(T,p.adler&255),Ee(T,p.adler>>8&255),Ee(T,p.adler>>16&255),Ee(T,p.adler>>24&255),Ee(T,p.total_in&255),Ee(T,p.total_in>>8&255),Ee(T,p.total_in>>16&255),Ee(T,p.total_in>>24&255)):($e(T,p.adler>>>16),$e(T,p.adler&65535)),je(p),T.wrap>0&&(T.wrap=-T.wrap),T.pending!==0?s:l)}function oe(p){var te;return!p||!p.state?c:(te=p.state.status,te!==H&&te!==B&&te!==q&&te!==L&&te!==D&&te!==F&&te!==K?we(p,c):(p.state=null,te===F?we(p,y):s))}function be(p,te){var re=te.length,T,G,ee,_e,he,pe,Ae,vt;if(!p||!p.state||(T=p.state,_e=T.wrap,_e===2||_e===1&&T.status!==H||T.lookahead))return c;for(_e===1&&(p.adler=n(p.adler,te,re,0)),T.wrap=0,re>=T.w_size&&(_e===0&&(Pe(T.head),T.strstart=0,T.block_start=0,T.insert=0),vt=new e.Buf8(T.w_size),e.arraySet(vt,te,re-T.w_size,T.w_size,0),te=vt,re=T.w_size),he=p.avail_in,pe=p.next_in,Ae=p.input,p.avail_in=re,p.next_in=0,p.input=te,Ne(T);T.lookahead>=A;){G=T.strstart,ee=T.lookahead-(A-1);do T.ins_h=(T.ins_h<<T.hash_shift^T.window[G+A-1])&T.hash_mask,T.prev[G&T.w_mask]=T.head[T.ins_h],T.head[T.ins_h]=G,G++;while(--ee);T.strstart=G,T.lookahead=A-1,Ne(T)}return T.strstart+=T.lookahead,T.block_start=T.strstart,T.insert=T.lookahead,T.lookahead=0,T.match_length=T.prev_length=A-1,T.match_available=0,p.next_in=pe,p.input=Ae,p.avail_in=he,T.wrap=_e,s}return ut.deflateInit=ie,ut.deflateInit2=Z,ut.deflateReset=se,ut.deflateResetKeep=ne,ut.deflateSetHeader=fe,ut.deflate=R,ut.deflateEnd=oe,ut.deflateSetDictionary=be,ut.deflateInfo="pako deflate (from Nodeca project)",ut}var qn,xs;function gm(){if(xs)return qn;xs=1;function e(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}return qn=e,qn}var it={},Dn,Cs;function vm(){if(Cs)return Dn;Cs=1;var e=30,t=12;return Dn=function(r,i){var a,o,d,f,v,s,l,c,y,h,m,g,u,_,E,w,b,x,O,P,M,W,V,S,I;a=r.state,o=r.next_in,S=r.input,d=o+(r.avail_in-5),f=r.next_out,I=r.output,v=f-(i-r.avail_out),s=f+(r.avail_out-257),l=a.dmax,c=a.wsize,y=a.whave,h=a.wnext,m=a.window,g=a.hold,u=a.bits,_=a.lencode,E=a.distcode,w=(1<<a.lenbits)-1,b=(1<<a.distbits)-1;e:do{u<15&&(g+=S[o++]<<u,u+=8,g+=S[o++]<<u,u+=8),x=_[g&w];t:for(;;){if(O=x>>>24,g>>>=O,u-=O,O=x>>>16&255,O===0)I[f++]=x&65535;else if(O&16){P=x&65535,O&=15,O&&(u<O&&(g+=S[o++]<<u,u+=8),P+=g&(1<<O)-1,g>>>=O,u-=O),u<15&&(g+=S[o++]<<u,u+=8,g+=S[o++]<<u,u+=8),x=E[g&b];r:for(;;){if(O=x>>>24,g>>>=O,u-=O,O=x>>>16&255,O&16){if(M=x&65535,O&=15,u<O&&(g+=S[o++]<<u,u+=8,u<O&&(g+=S[o++]<<u,u+=8)),M+=g&(1<<O)-1,M>l){r.msg="invalid distance too far back",a.mode=e;break e}if(g>>>=O,u-=O,O=f-v,M>O){if(O=M-O,O>y&&a.sane){r.msg="invalid distance too far back",a.mode=e;break e}if(W=0,V=m,h===0){if(W+=c-O,O<P){P-=O;do I[f++]=m[W++];while(--O);W=f-M,V=I}}else if(h<O){if(W+=c+h-O,O-=h,O<P){P-=O;do I[f++]=m[W++];while(--O);if(W=0,h<P){O=h,P-=O;do I[f++]=m[W++];while(--O);W=f-M,V=I}}}else if(W+=h-O,O<P){P-=O;do I[f++]=m[W++];while(--O);W=f-M,V=I}for(;P>2;)I[f++]=V[W++],I[f++]=V[W++],I[f++]=V[W++],P-=3;P&&(I[f++]=V[W++],P>1&&(I[f++]=V[W++]))}else{W=f-M;do I[f++]=I[W++],I[f++]=I[W++],I[f++]=I[W++],P-=3;while(P>2);P&&(I[f++]=I[W++],P>1&&(I[f++]=I[W++]))}}else if((O&64)===0){x=E[(x&65535)+(g&(1<<O)-1)];continue r}else{r.msg="invalid distance code",a.mode=e;break e}break}}else if((O&64)===0){x=_[(x&65535)+(g&(1<<O)-1)];continue t}else if(O&32){a.mode=t;break e}else{r.msg="invalid literal/length code",a.mode=e;break e}break}}while(o<d&&f<s);P=u>>3,o-=P,u-=P<<3,g&=(1<<u)-1,r.next_in=o,r.next_out=f,r.avail_in=o<d?5+(d-o):5-(o-d),r.avail_out=f<s?257+(s-f):257-(f-s),a.hold=g,a.bits=u},Dn}var Nn,ks;function ym(){if(ks)return Nn;ks=1;var e=bn(),t=15,n=852,r=592,i=0,a=1,o=2,d=[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,0,0],f=[16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78],v=[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,0,0],s=[16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64];return Nn=function(c,y,h,m,g,u,_,E){var w=E.bits,b=0,x=0,O=0,P=0,M=0,W=0,V=0,S=0,I=0,$=0,z,X,A,k,j,N=null,H=0,B,q=new e.Buf16(t+1),L=new e.Buf16(t+1),D=null,F=0,K,J,ae;for(b=0;b<=t;b++)q[b]=0;for(x=0;x<m;x++)q[y[h+x]]++;for(M=w,P=t;P>=1&&q[P]===0;P--);if(M>P&&(M=P),P===0)return g[u++]=1<<24|64<<16|0,g[u++]=1<<24|64<<16|0,E.bits=1,0;for(O=1;O<P&&q[O]===0;O++);for(M<O&&(M=O),S=1,b=1;b<=t;b++)if(S<<=1,S-=q[b],S<0)return-1;if(S>0&&(c===i||P!==1))return-1;for(L[1]=0,b=1;b<t;b++)L[b+1]=L[b]+q[b];for(x=0;x<m;x++)y[h+x]!==0&&(_[L[y[h+x]]++]=x);if(c===i?(N=D=_,B=19):c===a?(N=d,H-=257,D=f,F-=257,B=256):(N=v,D=s,B=-1),$=0,x=0,b=O,j=u,W=M,V=0,A=-1,I=1<<M,k=I-1,c===a&&I>n||c===o&&I>r)return 1;for(;;){K=b-V,_[x]<B?(J=0,ae=_[x]):_[x]>B?(J=D[F+_[x]],ae=N[H+_[x]]):(J=96,ae=0),z=1<<b-V,X=1<<W,O=X;do X-=z,g[j+($>>V)+X]=K<<24|J<<16|ae|0;while(X!==0);for(z=1<<b-1;$&z;)z>>=1;if(z!==0?($&=z-1,$+=z):$=0,x++,--q[b]===0){if(b===P)break;b=y[h+_[x]]}if(b>M&&($&k)!==A){for(V===0&&(V=M),j+=O,W=b-V,S=1<<W;W+V<P&&(S-=q[W+V],!(S<=0));)W++,S<<=1;if(I+=1<<W,c===a&&I>n||c===o&&I>r)return 1;A=$&k,g[A]=M<<24|W<<16|j-u|0}}return $!==0&&(g[j+$]=b-V<<24|64<<16|0),E.bits=M,0},Nn}var Ps;function _m(){if(Ps)return it;Ps=1;var e=bn(),t=ld(),n=fd(),r=vm(),i=ym(),a=0,o=1,d=2,f=4,v=5,s=6,l=0,c=1,y=2,h=-2,m=-3,g=-4,u=-5,_=8,E=1,w=2,b=3,x=4,O=5,P=6,M=7,W=8,V=9,S=10,I=11,$=12,z=13,X=14,A=15,k=16,j=17,N=18,H=19,B=20,q=21,L=22,D=23,F=24,K=25,J=26,ae=27,ue=28,ve=29,me=30,we=31,Ce=32,Pe=852,je=592,Ie=15,Ee=Ie;function $e(Z){return(Z>>>24&255)+(Z>>>8&65280)+((Z&65280)<<8)+((Z&255)<<24)}function st(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new e.Buf16(320),this.work=new e.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function qe(Z){var ie;return!Z||!Z.state?h:(ie=Z.state,Z.total_in=Z.total_out=ie.total=0,Z.msg="",ie.wrap&&(Z.adler=ie.wrap&1),ie.mode=E,ie.last=0,ie.havedict=0,ie.dmax=32768,ie.head=null,ie.hold=0,ie.bits=0,ie.lencode=ie.lendyn=new e.Buf32(Pe),ie.distcode=ie.distdyn=new e.Buf32(je),ie.sane=1,ie.back=-1,l)}function Ne(Z){var ie;return!Z||!Z.state?h:(ie=Z.state,ie.wsize=0,ie.whave=0,ie.wnext=0,qe(Z))}function Ye(Z,ie){var R,oe;return!Z||!Z.state||(oe=Z.state,ie<0?(R=0,ie=-ie):(R=(ie>>4)+1,ie<48&&(ie&=15)),ie&&(ie<8||ie>15))?h:(oe.window!==null&&oe.wbits!==ie&&(oe.window=null),oe.wrap=R,oe.wbits=ie,Ne(Z))}function Y(Z,ie){var R,oe;return Z?(oe=new st,Z.state=oe,oe.window=null,R=Ye(Z,ie),R!==l&&(Z.state=null),R):h}function Q(Z){return Y(Z,Ee)}var le=!0,ge,de;function Re(Z){if(le){var ie;for(ge=new e.Buf32(512),de=new e.Buf32(32),ie=0;ie<144;)Z.lens[ie++]=8;for(;ie<256;)Z.lens[ie++]=9;for(;ie<280;)Z.lens[ie++]=7;for(;ie<288;)Z.lens[ie++]=8;for(i(o,Z.lens,0,288,ge,0,Z.work,{bits:9}),ie=0;ie<32;)Z.lens[ie++]=5;i(d,Z.lens,0,32,de,0,Z.work,{bits:5}),le=!1}Z.lencode=ge,Z.lenbits=9,Z.distcode=de,Z.distbits=5}function Oe(Z,ie,R,oe){var be,p=Z.state;return p.window===null&&(p.wsize=1<<p.wbits,p.wnext=0,p.whave=0,p.window=new e.Buf8(p.wsize)),oe>=p.wsize?(e.arraySet(p.window,ie,R-p.wsize,p.wsize,0),p.wnext=0,p.whave=p.wsize):(be=p.wsize-p.wnext,be>oe&&(be=oe),e.arraySet(p.window,ie,R-oe,be,p.wnext),oe-=be,oe?(e.arraySet(p.window,ie,R-oe,oe,0),p.wnext=oe,p.whave=p.wsize):(p.wnext+=be,p.wnext===p.wsize&&(p.wnext=0),p.whave<p.wsize&&(p.whave+=be))),0}function C(Z,ie){var R,oe,be,p,te,re,T,G,ee,_e,he,pe,Ae,vt,Le=0,xe,Ue,Je,Xe,br,wr,Me,nt,Ge=new e.Buf8(4),yt,dt,gs=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];if(!Z||!Z.state||!Z.output||!Z.input&&Z.avail_in!==0)return h;R=Z.state,R.mode===$&&(R.mode=z),te=Z.next_out,be=Z.output,T=Z.avail_out,p=Z.next_in,oe=Z.input,re=Z.avail_in,G=R.hold,ee=R.bits,_e=re,he=T,nt=l;e:for(;;)switch(R.mode){case E:if(R.wrap===0){R.mode=z;break}for(;ee<16;){if(re===0)break e;re--,G+=oe[p++]<<ee,ee+=8}if(R.wrap&2&&G===35615){R.check=0,Ge[0]=G&255,Ge[1]=G>>>8&255,R.check=n(R.check,Ge,2,0),G=0,ee=0,R.mode=w;break}if(R.flags=0,R.head&&(R.head.done=!1),!(R.wrap&1)||(((G&255)<<8)+(G>>8))%31){Z.msg="incorrect header check",R.mode=me;break}if((G&15)!==_){Z.msg="unknown compression method",R.mode=me;break}if(G>>>=4,ee-=4,Me=(G&15)+8,R.wbits===0)R.wbits=Me;else if(Me>R.wbits){Z.msg="invalid window size",R.mode=me;break}R.dmax=1<<Me,Z.adler=R.check=1,R.mode=G&512?S:$,G=0,ee=0;break;case w:for(;ee<16;){if(re===0)break e;re--,G+=oe[p++]<<ee,ee+=8}if(R.flags=G,(R.flags&255)!==_){Z.msg="unknown compression method",R.mode=me;break}if(R.flags&57344){Z.msg="unknown header flags set",R.mode=me;break}R.head&&(R.head.text=G>>8&1),R.flags&512&&(Ge[0]=G&255,Ge[1]=G>>>8&255,R.check=n(R.check,Ge,2,0)),G=0,ee=0,R.mode=b;case b:for(;ee<32;){if(re===0)break e;re--,G+=oe[p++]<<ee,ee+=8}R.head&&(R.head.time=G),R.flags&512&&(Ge[0]=G&255,Ge[1]=G>>>8&255,Ge[2]=G>>>16&255,Ge[3]=G>>>24&255,R.check=n(R.check,Ge,4,0)),G=0,ee=0,R.mode=x;case x:for(;ee<16;){if(re===0)break e;re--,G+=oe[p++]<<ee,ee+=8}R.head&&(R.head.xflags=G&255,R.head.os=G>>8),R.flags&512&&(Ge[0]=G&255,Ge[1]=G>>>8&255,R.check=n(R.check,Ge,2,0)),G=0,ee=0,R.mode=O;case O:if(R.flags&1024){for(;ee<16;){if(re===0)break e;re--,G+=oe[p++]<<ee,ee+=8}R.length=G,R.head&&(R.head.extra_len=G),R.flags&512&&(Ge[0]=G&255,Ge[1]=G>>>8&255,R.check=n(R.check,Ge,2,0)),G=0,ee=0}else R.head&&(R.head.extra=null);R.mode=P;case P:if(R.flags&1024&&(pe=R.length,pe>re&&(pe=re),pe&&(R.head&&(Me=R.head.extra_len-R.length,R.head.extra||(R.head.extra=new Array(R.head.extra_len)),e.arraySet(R.head.extra,oe,p,pe,Me)),R.flags&512&&(R.check=n(R.check,oe,pe,p)),re-=pe,p+=pe,R.length-=pe),R.length))break e;R.length=0,R.mode=M;case M:if(R.flags&2048){if(re===0)break e;pe=0;do Me=oe[p+pe++],R.head&&Me&&R.length<65536&&(R.head.name+=String.fromCharCode(Me));while(Me&&pe<re);if(R.flags&512&&(R.check=n(R.check,oe,pe,p)),re-=pe,p+=pe,Me)break e}else R.head&&(R.head.name=null);R.length=0,R.mode=W;case W:if(R.flags&4096){if(re===0)break e;pe=0;do Me=oe[p+pe++],R.head&&Me&&R.length<65536&&(R.head.comment+=String.fromCharCode(Me));while(Me&&pe<re);if(R.flags&512&&(R.check=n(R.check,oe,pe,p)),re-=pe,p+=pe,Me)break e}else R.head&&(R.head.comment=null);R.mode=V;case V:if(R.flags&512){for(;ee<16;){if(re===0)break e;re--,G+=oe[p++]<<ee,ee+=8}if(G!==(R.check&65535)){Z.msg="header crc mismatch",R.mode=me;break}G=0,ee=0}R.head&&(R.head.hcrc=R.flags>>9&1,R.head.done=!0),Z.adler=R.check=0,R.mode=$;break;case S:for(;ee<32;){if(re===0)break e;re--,G+=oe[p++]<<ee,ee+=8}Z.adler=R.check=$e(G),G=0,ee=0,R.mode=I;case I:if(R.havedict===0)return Z.next_out=te,Z.avail_out=T,Z.next_in=p,Z.avail_in=re,R.hold=G,R.bits=ee,y;Z.adler=R.check=1,R.mode=$;case $:if(ie===v||ie===s)break e;case z:if(R.last){G>>>=ee&7,ee-=ee&7,R.mode=ae;break}for(;ee<3;){if(re===0)break e;re--,G+=oe[p++]<<ee,ee+=8}switch(R.last=G&1,G>>>=1,ee-=1,G&3){case 0:R.mode=X;break;case 1:if(Re(R),R.mode=B,ie===s){G>>>=2,ee-=2;break e}break;case 2:R.mode=j;break;case 3:Z.msg="invalid block type",R.mode=me}G>>>=2,ee-=2;break;case X:for(G>>>=ee&7,ee-=ee&7;ee<32;){if(re===0)break e;re--,G+=oe[p++]<<ee,ee+=8}if((G&65535)!==(G>>>16^65535)){Z.msg="invalid stored block lengths",R.mode=me;break}if(R.length=G&65535,G=0,ee=0,R.mode=A,ie===s)break e;case A:R.mode=k;case k:if(pe=R.length,pe){if(pe>re&&(pe=re),pe>T&&(pe=T),pe===0)break e;e.arraySet(be,oe,p,pe,te),re-=pe,p+=pe,T-=pe,te+=pe,R.length-=pe;break}R.mode=$;break;case j:for(;ee<14;){if(re===0)break e;re--,G+=oe[p++]<<ee,ee+=8}if(R.nlen=(G&31)+257,G>>>=5,ee-=5,R.ndist=(G&31)+1,G>>>=5,ee-=5,R.ncode=(G&15)+4,G>>>=4,ee-=4,R.nlen>286||R.ndist>30){Z.msg="too many length or distance symbols",R.mode=me;break}R.have=0,R.mode=N;case N:for(;R.have<R.ncode;){for(;ee<3;){if(re===0)break e;re--,G+=oe[p++]<<ee,ee+=8}R.lens[gs[R.have++]]=G&7,G>>>=3,ee-=3}for(;R.have<19;)R.lens[gs[R.have++]]=0;if(R.lencode=R.lendyn,R.lenbits=7,yt={bits:R.lenbits},nt=i(a,R.lens,0,19,R.lencode,0,R.work,yt),R.lenbits=yt.bits,nt){Z.msg="invalid code lengths set",R.mode=me;break}R.have=0,R.mode=H;case H:for(;R.have<R.nlen+R.ndist;){for(;Le=R.lencode[G&(1<<R.lenbits)-1],xe=Le>>>24,Ue=Le>>>16&255,Je=Le&65535,!(xe<=ee);){if(re===0)break e;re--,G+=oe[p++]<<ee,ee+=8}if(Je<16)G>>>=xe,ee-=xe,R.lens[R.have++]=Je;else{if(Je===16){for(dt=xe+2;ee<dt;){if(re===0)break e;re--,G+=oe[p++]<<ee,ee+=8}if(G>>>=xe,ee-=xe,R.have===0){Z.msg="invalid bit length repeat",R.mode=me;break}Me=R.lens[R.have-1],pe=3+(G&3),G>>>=2,ee-=2}else if(Je===17){for(dt=xe+3;ee<dt;){if(re===0)break e;re--,G+=oe[p++]<<ee,ee+=8}G>>>=xe,ee-=xe,Me=0,pe=3+(G&7),G>>>=3,ee-=3}else{for(dt=xe+7;ee<dt;){if(re===0)break e;re--,G+=oe[p++]<<ee,ee+=8}G>>>=xe,ee-=xe,Me=0,pe=11+(G&127),G>>>=7,ee-=7}if(R.have+pe>R.nlen+R.ndist){Z.msg="invalid bit length repeat",R.mode=me;break}for(;pe--;)R.lens[R.have++]=Me}}if(R.mode===me)break;if(R.lens[256]===0){Z.msg="invalid code -- missing end-of-block",R.mode=me;break}if(R.lenbits=9,yt={bits:R.lenbits},nt=i(o,R.lens,0,R.nlen,R.lencode,0,R.work,yt),R.lenbits=yt.bits,nt){Z.msg="invalid literal/lengths set",R.mode=me;break}if(R.distbits=6,R.distcode=R.distdyn,yt={bits:R.distbits},nt=i(d,R.lens,R.nlen,R.ndist,R.distcode,0,R.work,yt),R.distbits=yt.bits,nt){Z.msg="invalid distances set",R.mode=me;break}if(R.mode=B,ie===s)break e;case B:R.mode=q;case q:if(re>=6&&T>=258){Z.next_out=te,Z.avail_out=T,Z.next_in=p,Z.avail_in=re,R.hold=G,R.bits=ee,r(Z,he),te=Z.next_out,be=Z.output,T=Z.avail_out,p=Z.next_in,oe=Z.input,re=Z.avail_in,G=R.hold,ee=R.bits,R.mode===$&&(R.back=-1);break}for(R.back=0;Le=R.lencode[G&(1<<R.lenbits)-1],xe=Le>>>24,Ue=Le>>>16&255,Je=Le&65535,!(xe<=ee);){if(re===0)break e;re--,G+=oe[p++]<<ee,ee+=8}if(Ue&&(Ue&240)===0){for(Xe=xe,br=Ue,wr=Je;Le=R.lencode[wr+((G&(1<<Xe+br)-1)>>Xe)],xe=Le>>>24,Ue=Le>>>16&255,Je=Le&65535,!(Xe+xe<=ee);){if(re===0)break e;re--,G+=oe[p++]<<ee,ee+=8}G>>>=Xe,ee-=Xe,R.back+=Xe}if(G>>>=xe,ee-=xe,R.back+=xe,R.length=Je,Ue===0){R.mode=J;break}if(Ue&32){R.back=-1,R.mode=$;break}if(Ue&64){Z.msg="invalid literal/length code",R.mode=me;break}R.extra=Ue&15,R.mode=L;case L:if(R.extra){for(dt=R.extra;ee<dt;){if(re===0)break e;re--,G+=oe[p++]<<ee,ee+=8}R.length+=G&(1<<R.extra)-1,G>>>=R.extra,ee-=R.extra,R.back+=R.extra}R.was=R.length,R.mode=D;case D:for(;Le=R.distcode[G&(1<<R.distbits)-1],xe=Le>>>24,Ue=Le>>>16&255,Je=Le&65535,!(xe<=ee);){if(re===0)break e;re--,G+=oe[p++]<<ee,ee+=8}if((Ue&240)===0){for(Xe=xe,br=Ue,wr=Je;Le=R.distcode[wr+((G&(1<<Xe+br)-1)>>Xe)],xe=Le>>>24,Ue=Le>>>16&255,Je=Le&65535,!(Xe+xe<=ee);){if(re===0)break e;re--,G+=oe[p++]<<ee,ee+=8}G>>>=Xe,ee-=Xe,R.back+=Xe}if(G>>>=xe,ee-=xe,R.back+=xe,Ue&64){Z.msg="invalid distance code",R.mode=me;break}R.offset=Je,R.extra=Ue&15,R.mode=F;case F:if(R.extra){for(dt=R.extra;ee<dt;){if(re===0)break e;re--,G+=oe[p++]<<ee,ee+=8}R.offset+=G&(1<<R.extra)-1,G>>>=R.extra,ee-=R.extra,R.back+=R.extra}if(R.offset>R.dmax){Z.msg="invalid distance too far back",R.mode=me;break}R.mode=K;case K:if(T===0)break e;if(pe=he-T,R.offset>pe){if(pe=R.offset-pe,pe>R.whave&&R.sane){Z.msg="invalid distance too far back",R.mode=me;break}pe>R.wnext?(pe-=R.wnext,Ae=R.wsize-pe):Ae=R.wnext-pe,pe>R.length&&(pe=R.length),vt=R.window}else vt=be,Ae=te-R.offset,pe=R.length;pe>T&&(pe=T),T-=pe,R.length-=pe;do be[te++]=vt[Ae++];while(--pe);R.length===0&&(R.mode=q);break;case J:if(T===0)break e;be[te++]=R.length,T--,R.mode=q;break;case ae:if(R.wrap){for(;ee<32;){if(re===0)break e;re--,G|=oe[p++]<<ee,ee+=8}if(he-=T,Z.total_out+=he,R.total+=he,he&&(Z.adler=R.check=R.flags?n(R.check,be,he,te-he):t(R.check,be,he,te-he)),he=T,(R.flags?G:$e(G))!==R.check){Z.msg="incorrect data check",R.mode=me;break}G=0,ee=0}R.mode=ue;case ue:if(R.wrap&&R.flags){for(;ee<32;){if(re===0)break e;re--,G+=oe[p++]<<ee,ee+=8}if(G!==(R.total&4294967295)){Z.msg="incorrect length check",R.mode=me;break}G=0,ee=0}R.mode=ve;case ve:nt=c;break e;case me:nt=m;break e;case we:return g;case Ce:default:return h}return Z.next_out=te,Z.avail_out=T,Z.next_in=p,Z.avail_in=re,R.hold=G,R.bits=ee,(R.wsize||he!==Z.avail_out&&R.mode<me&&(R.mode<ae||ie!==f))&&Oe(Z,Z.output,Z.next_out,he-Z.avail_out),_e-=Z.avail_in,he-=Z.avail_out,Z.total_in+=_e,Z.total_out+=he,R.total+=he,R.wrap&&he&&(Z.adler=R.check=R.flags?n(R.check,be,he,Z.next_out-he):t(R.check,be,he,Z.next_out-he)),Z.data_type=R.bits+(R.last?64:0)+(R.mode===$?128:0)+(R.mode===B||R.mode===A?256:0),(_e===0&&he===0||ie===f)&&nt===l&&(nt=u),nt}function ne(Z){if(!Z||!Z.state)return h;var ie=Z.state;return ie.window&&(ie.window=null),Z.state=null,l}function se(Z,ie){var R;return!Z||!Z.state||(R=Z.state,(R.wrap&2)===0)?h:(R.head=ie,ie.done=!1,l)}function fe(Z,ie){var R=ie.length,oe,be,p;return!Z||!Z.state||(oe=Z.state,oe.wrap!==0&&oe.mode!==I)?h:oe.mode===I&&(be=1,be=t(be,ie,R,0),be!==oe.check)?m:(p=Oe(Z,ie,R,R),p?(oe.mode=we,g):(oe.havedict=1,l))}return it.inflateReset=Ne,it.inflateReset2=Ye,it.inflateResetKeep=qe,it.inflateInit=Q,it.inflateInit2=Y,it.inflate=C,it.inflateEnd=ne,it.inflateGetHeader=se,it.inflateSetDictionary=fe,it.inflateInfo="pako inflate (from Nodeca project)",it}var Mn,js;function bm(){return js||(js=1,Mn={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8}),Mn}function wm(){const{useDynamicConfig:e}=wt(),{configValue:t,isDynamicConfigLoading:n}=e(At.creditAgentEnablement),r=He.getSignedInUser()?.userEmail;return{isAllowed:ce.useMemo(()=>{const a=Array.isArray(t?.allowedUserEmails)?t.allowedUserEmails:[];return r!=null&&a.includes(r)},[t,r]),isLoading:n}}function St(){const{isAllowed:e}=wm();return e?Tp:Ap}const Em={overlayWidth:new at(100,100,50)};function Ls(){const e=Be(),t=We(),n=lr(),r=Bt(),i=St(),a=Se(V=>qf(V)),o=a.uiState.selectedCustomerTenantId,d=ce.useMemo(()=>o?a.customers.find(V=>V.tenantId===o):void 0,[a.customers,o]),f=Se(V=>o?Df(V.aiAccountantCustomerState,V.userState,o):[]),v=a.customerViewStateByTenantId[o],s=v?.jobsFetchStatus??{fetchState:"Not-Started"},l=v?.jobsPageToken!=null;ce.useEffect(()=>{a.fetchState==="Completed"?t(xt(!1)):(a.fetchState==="Not-Started"||a.fetchState==="Error")&&t(vs())},[a.fetchState]);const c=V=>{const S=kt(V),I=Ft(V);Fe.trackCockpitTabClicked(I),e(`../../${S}`,{replace:!0})},y=(V,S,I,$)=>{t(Dt([V.tenantId])),t(an(S,I,$))},h=(V,S,I)=>{t(an(V,S,I))},m=(V,S)=>{t(Dt(a.unonboardedTenantIds)),t(an("retrain",V,S))},g=V=>{const S=a.selectedTenantIds,I=S.includes(V)?S.filter($=>$!==V):[...S,V];t(Dt(I))},u=V=>{if(V.length===0)return;const S=a.selectedTenantIds,I=new Set(S);if(V.every(z=>I.has(z))){const z=new Set(V);t(Dt(S.filter(X=>!z.has(X))))}else{const z=Array.from(new Set([...S,...V]));t(Dt(z))}},_=()=>{t(Dt([]))},E=V=>{t(Nf(V.companyId,V.tenantId))},w=V=>{V==="aiAccountant"&&t(vs())},b=(V,S)=>{t(Jt({sortKey:V,sortOrder:S}))},x=V=>{t(Jt({selectedCustomerTenantId:V.tenantId})),t(sn(V.tenantId))},O=()=>{t(Jt({selectedCustomerTenantId:""}))},P=V=>{t(Jt({filterText:V}))},M=(V,S)=>{t(Jt({filters:S}))},W=()=>{o&&t(sn(o,!0))};return U.jsxs(U.Fragment,{children:[U.jsx(Ip,{headerData:{allTabOptions:i,selectedTabOption:Et("aiAccountant")},headerActions:{onTabChange:c},aiAccountantPageData:{aiAccountantView:a},aiAccountantPageActions:{onAction:y,onBulkAction:h,onCancelOnboarding:E,onClearSelection:_,onCockpitReloadData:w,onColumnSortConfigChanged:b,onCustomerSelected:x,onEvaluateAll:m,onFilterTextChanged:P,onFiltersChange:M,onToggleAllVisible:u,onToggleTenantSelection:g}}),U.jsx(dr,{anchor:"right",open:d!=null,PaperProps:{style:{width:Em.overlayWidth.valuePercentage(n),boxShadow:"none"}},slotProps:{backdrop:{style:{backgroundColor:r.colors.black,opacity:.75,cursor:"pointer"}}},onClose:O,children:d!=null&&U.jsx(nd,{customer:d,hasMoreJobs:l,jobs:f,jobsFetchStatus:s,onAction:y,onCancelOnboarding:E,onClose:O,onLoadMoreJobs:W})})]})}function Sm(){const{tenantId:e=""}=ot(),t=Be(),n=We(),r=Se(c=>ch(c.aiAccountantCustomerState,c.userState)),i=Se(c=>qf(c)),a=r.find(c=>c.tenantId===e),o=i.customerViewStateByTenantId[e],d=Se(c=>Df(c.aiAccountantCustomerState,c.userState,e));if(ce.useEffect(()=>{n(sn(e))},[e,n]),a==null)return null;const f=(c,y,h,m)=>{n(Dt([c.tenantId])),n(an(y,h,m))},v=c=>{n(Nf(c.companyId,c.tenantId))},s=()=>{t("../")},l=()=>{n(sn(e,!0))};return U.jsx(nd,{customer:a,hasMoreJobs:o?.jobsPageToken!=null,jobs:d,jobsFetchStatus:o?.jobsFetchStatus??{fetchState:"Not-Started"},onAction:f,onCancelOnboarding:v,onClose:s,onLoadMoreJobs:l})}const dd=(e,t)=>{const n=[...e??[]];return n.push(t),n},Rm=e=>{const t=[...e??[]];return{poppedPathname:t.pop(),newStack:t}},Om=(e=2)=>{let t="../";for(let n=0;n<e;n++)t=`${t}../`;return t},ke=({state:e,element:t})=>He.isSignedIn()===!0?U.jsx(U.Fragment,{children:t}):U.jsx(ir,{to:"/signin/auth",replace:!0,state:{...e,message:"...",origin:window.location.pathname}});function Tm(){return U.jsxs(gt,{children:[U.jsx(Te,{path:"/",element:U.jsx(ke,{element:U.jsx(Ls,{})})}),U.jsx(Te,{path:"/detail/:tenantId",element:U.jsx(ke,{element:U.jsx(Sm,{})})}),U.jsx(Te,{path:"/*",element:U.jsx(ke,{element:U.jsx(Ls,{})})})]})}const Ut=()=>{const[e,t]=cd(),[n,r]=ce.useState(),i=ce.useRef(!1);return ce.useEffect(()=>{if(i.current===!0||!(e.has("thread_id")||e.has("entity_type")||e.has("company_id")))return;const o=xp(e);o!=null&&r(o);const d=new URLSearchParams(e);d.delete("thread_id"),d.delete("entity_type"),d.delete("company_id"),t(d,{replace:!0}),i.current=!0},[e,t]),n},Am={overlayWidth:new at(100,100,50)},{common:{strings:qs}}=fr.getLocalizedStrings();function Im(e,t){return{headerActions:{onTabChange:n=>{const r=kt(n),i=Ft(n);Fe.trackCockpitTabClicked(i),t.navigate(`../../${r}`,{replace:!0})},filterActions:{onFilterTextChanged:(n,r)=>{e(Er({uiState:{filterText:r}}))},onFiltersChange:(n,r)=>{r.categories!=null&&r.categoryCombinationOperator!=null&&Fe.trackHealthMonitorFiltersApplied({filterSelection:{condition:r.categories.map(i=>i.matchingOperator).join(qs.comma),logic:r.categoryCombinationOperator,parameter:r.categories.map(i=>i.field).join(qs.comma)}}),e(Er({uiState:{filters:r}}))}}},healthPageActions:{onRowClick:n=>{e(Ff(n))},onColumnSortConfigChanged:(n,r)=>{e(Er({uiState:{sortKey:n,sortOrder:r}}))},onCockpitReloadData:n=>{n==="healthMonitor"&&e(Mf())},onFiltersChange:n=>{e(Er({uiState:{filters:n}}))}}}}function xm(e,t){return{healthPageData:{healthView:t.healthView,managementView:t.managementView,mixpanelUrl:t.mixpanelHMUrl}}}const Cm=ze(xm,Im)(jp);function Fn({isDrawerOpen:e}){const t=Be(),n=We(),r=Bt(),i=lr(),{companyId:a}=ot(),[o,d]=cd(),[f,v]=ce.useState(!1),s=Ut(),l=St(),c=Se(b=>lh(b)),y=Se(b=>ur(b)),{additionalChurnFactors:h}=Se(b=>fh(b)),{selectedCompanyDetail:m,selectedCompanyId:g,localFormDataAndStatusByCompanyId:u}=c,_=Se(b=>b.companyViewState.zeniUsers.fetchState),E=Se(b=>b.companyHealthMetricConfigViewState);if(ce.useEffect(()=>{const b=x=>x==="Not-Started"||x==="Error";c.fetchState==="Completed"?n(xt(!1)):b(c.fetchState)&&(n(Mf()),b(_)&&n(Ct()),b(E.fetchState)&&n(dh()))},[c.fetchState,E.fetchState]),ce.useEffect(()=>{a!=null&&c.fetchState==="Completed"&&o.has("utm_source")===!0&&(n(Ff(a)),m!=null&&(Cp(),Fe.trackCockpitHealthMonitorNotificationAlertClicked({companyId:m.companyInfo.companyId,companyName:m.companyInfo.name,churnProbability:m.companyHealthMetric.churnProbabilityPercentage??null}),v(!0),o.delete("utm_source"),d(o)))},[c.fetchState,m?.companyInfo.companyId,m?.companyInfo.name]),He.getSignedInUser()==null)throw Error("Can't access Health Monitor page without signing in...");return U.jsxs(U.Fragment,{children:[e===!0||g!=null&&m!=null?U.jsx(dr,{anchor:"right",open:g!=null,PaperProps:{style:{width:Am.overlayWidth.valuePercentage(i),boxShadow:"none"}},slotProps:{backdrop:{style:{backgroundColor:r.colors.black,opacity:.75,cursor:"pointer"}}},onClose:()=>n(ys()),children:U.jsx(kp,{roomId:`cockpit_${g}`,autoConnect:!0,children:U.jsx(Pp,{onSaveClick:()=>{g!=null&&n(ph(g))},onSaveChangesToLocalStore:b=>{c.selectedCompanyId!=null&&n(hh({companyId:c.selectedCompanyId,updatedLocalData:b}))},localData:u?.companyHealthMetricLocalData??{netPromoterScore:void 0,externalProductServiceExposure:void 0,additionalChurnFactors:{increasingChurnProbability:[],decreasingChurnProbability:[]}},companyHealthMetricViewSelector:c,onCloseDrawer:()=>n(ys()),analytics:Fe,urlSource:f,additionalChurnFactorsOptions:h})})}):null,U.jsx(Cm,{headerData:{allTabOptions:l,selectedTabOption:Et("healthMonitor")},initialOpenThreadRequest:s??void 0,healthView:c,managementView:y,navigate:t,mixpanelHMUrl:gn.mixpanelHMUrl})]})}function km(){return U.jsxs(gt,{children:[U.jsx(Te,{path:"/companies/:companyId",element:U.jsx(ke,{element:U.jsx(Fn,{isDrawerOpen:!0})})}),U.jsx(Te,{path:"/",element:U.jsx(ke,{element:U.jsx(Fn,{})})}),U.jsx(Te,{path:"/*",element:U.jsx(ke,{element:U.jsx(Fn,{})})})]})}const Pm={drawerLeftMargin:new at(0,0,240)};function mr(e){const{isOpen:t,drawerLeftMargin:n,children:r,onClose:i}=e,a=lr(),o=n?.valuePx(a)??Pm.drawerLeftMargin.valuePx(a),d=Bt();return U.jsx(dr,{anchor:"right",open:t,PaperProps:{style:{width:`calc(100% - ${o})`}},slotProps:{backdrop:{style:{backgroundColor:d.colors.black,opacity:.8,cursor:"pointer"}}},onClose:i,children:r})}const jm=({fetchState:e})=>e==="In-Progress"||e==="Not-Started"?U.jsx(Lm,{children:U.jsx(vn,{size:"ExtraLarge",start:!0})}):null,Lm=tt.div`
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/CreditAgentRoutes-moJLbhEX.js","assets/liveblocks-CyhgjAmM.js","assets/sentry-CMq56eOF.js","assets/core-B3-F7eBr.js","assets/recharts-mBO0sQiJ.js","assets/zeni-epic-state-XxVgcdSL.js","assets/index-ovt9Xz6x.js","assets/mui-DF3cXn7x.js","assets/analytics-D6rU2phb.js","assets/utils-DegUrf4b.js","assets/index-Bd7ri422.css","assets/analyticsHelper-9zdI2_60.js","assets/empty-CQ_4F6AL.js","assets/index-BbtpQSrw.js","assets/url-BGsWubiD.js","assets/index-TjJI1T_l.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{Sn as qf,So as Df,lQ as xt,f5 as vs,Sp as Dt,fe as an,f3 as Nf,Sq as Jt,fa as sn,Sr as ch,Ss as lh,St as ur,Su as fh,k3 as Mf,lS as Ct,k0 as dh,k7 as Ff,Sv as ys,k9 as hh,ka as ph,Sw as Er,Sx as cr,jy as mh,Sy as pn,Sz as Uo,dj as gh,h6 as Vo,h3 as un,hb as Mt,h9 as vh,SA as Bf,SB as Uf,ko as yh,kl as _h,SC as bh,kz as wh,ku as _s,kr as Eh,kg as Sh,SD as Rh,eN as Oh,dt as Th,m2 as Vf,SE as Ah,be as on,kd as bs,ki as Ih,AI as $f,lR as mn,SF as zf,SG as pt,md as cn,m8 as Gf,kT as $o,SH as xh,mg as Ch,H as et,bm as zo,SI as kh,jv as Ph,SJ as jh,SK as Hf,SL as Lh,z0 as ws,yy as qh,SM as Dh,yE as In,SN as Nh,yG as Mh,SO as Tt,yv as Fh,d7 as Bh,lV as Zf,lW as Wf,lU as Go,lT as Ho,lX as Uh,SP as Vh,z3 as $h,SQ as zh,yM as Gh,yZ as Hh,SR as Zh,yQ as Wh,SS as Yh,ST as Kt,SU as Zo,SV as Jh,SW as Kh,su as Xh,sA as Yf,SX as Jf,j0 as Qh,Rs as Kf,SY as ep,Rm as tp,SZ as rp,S_ as np,sD as ip,S$ as ap,Rx as op,Rl as sp,CF as Xf,T0 as xn,T1 as Qf,NW as Wo,NI as up,NZ as ed,NL as cp,T2 as lp,NQ as fp,NC as dp,NF as hp,T3 as pp,O1 as mp,NT as gp,bp as vp,bc as yp,T4 as _p,T5 as Gt,T6 as bp,T7 as wp,T8 as Ep,kH as No,kD as Sp,kN as Rp,kQ as Es,bd as td}from"./zeni-epic-state-XxVgcdSL.js";import{j as U}from"./liveblocks-CyhgjAmM.js";import{a as ce,p as ye,d as rd,c as Yo,g as Op}from"./sentry-CMq56eOF.js";import{m as wt,C as At,z as He,S as Tp,p as Ap,o as lr,f as Ip,g as Et,R as nd,j as at,l as Fe,r as kt,s as Ft,U as xp,u as Cp,t as kp,I as Pp,v as gn,L as jp,q as fr,h as vn,n as Nt,_ as Lp,w as qp,x as yn,A as Dp,B as Np,D as Cn,E as Mp,T as id,F as Fp,G as ad,J as od,K as Mo,M as Bp,O as Up,P as Vp,Q as sd,V as $p,Y as zp,Z as Gp,$ as Hp,a0 as Zp,a1 as Wp,a2 as Yp,a3 as Jp,a4 as Kp,a5 as Xp,a6 as Qp,a7 as em,a8 as ud}from"./index-ovt9Xz6x.js";import{f as tm}from"./analyticsHelper-9zdI2_60.js";import{i as Be,n as We,g as Se,o as ot,N as ir,k as gt,l as Te,p as cd,h as ze,u as Jo,j as Fo}from"./core-B3-F7eBr.js";import{u as Bt,D as dr,n as tt,S as Zt}from"./mui-DF3cXn7x.js";import{a as Ze,b as rm,c as nm,d as im,e as Ko,f as am,g as om,h as sm,i as Wt,j as um,k as or,l as _n,m as cm,n as hr,o as lm}from"./utils-DegUrf4b.js";import{r as Xo}from"./empty-CQ_4F6AL.js";import{r as pr,a as fm}from"./index-BbtpQSrw.js";import{r as dm}from"./index-TjJI1T_l.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="295752d3-81a3-4af5-97ea-f2fa6f3ebe9a",e._sentryDebugIdIdentifier="sentry-dbid-295752d3-81a3-4af5-97ea-f2fa6f3ebe9a")}catch{}})();var kn={},Ss;function bn(){return Ss||(Ss=1,(function(e){var t=typeof Uint8Array<"u"&&typeof Uint16Array<"u"&&typeof Int32Array<"u";function n(a,o){return Object.prototype.hasOwnProperty.call(a,o)}e.assign=function(a){for(var o=Array.prototype.slice.call(arguments,1);o.length;){var d=o.shift();if(d){if(typeof d!="object")throw new TypeError(d+"must be non-object");for(var f in d)n(d,f)&&(a[f]=d[f])}}return a},e.shrinkBuf=function(a,o){return a.length===o?a:a.subarray?a.subarray(0,o):(a.length=o,a)};var r={arraySet:function(a,o,d,f,v){if(o.subarray&&a.subarray){a.set(o.subarray(d,d+f),v);return}for(var s=0;s<f;s++)a[v+s]=o[d+s]},flattenChunks:function(a){var o,d,f,v,s,l;for(f=0,o=0,d=a.length;o<d;o++)f+=a[o].length;for(l=new Uint8Array(f),v=0,o=0,d=a.length;o<d;o++)s=a[o],l.set(s,v),v+=s.length;return l}},i={arraySet:function(a,o,d,f,v){for(var s=0;s<f;s++)a[v+s]=o[d+s]},flattenChunks:function(a){return[].concat.apply([],a)}};e.setTyped=function(a){a?(e.Buf8=Uint8Array,e.Buf16=Uint16Array,e.Buf32=Int32Array,e.assign(e,r)):(e.Buf8=Array,e.Buf16=Array,e.Buf32=Array,e.assign(e,i))},e.setTyped(t)})(kn)),kn}var ut={},Pt={},Rs;function hm(){if(Rs)return Pt;Rs=1;var e=bn(),t=4,n=0,r=1,i=2;function a(C){for(var ne=C.length;--ne>=0;)C[ne]=0}var o=0,d=1,f=2,v=3,s=258,l=29,c=256,y=c+1+l,h=30,m=19,g=2*y+1,u=15,_=16,E=7,w=256,b=16,x=17,O=18,P=[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],M=[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],W=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],V=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],S=512,I=new Array((y+2)*2);a(I);var $=new Array(h*2);a($);var z=new Array(S);a(z);var X=new Array(s-v+1);a(X);var A=new Array(l);a(A);var k=new Array(h);a(k);function j(C,ne,se,fe,Z){this.static_tree=C,this.extra_bits=ne,this.extra_base=se,this.elems=fe,this.max_length=Z,this.has_stree=C&&C.length}var N,H,B;function q(C,ne){this.dyn_tree=C,this.max_code=0,this.stat_desc=ne}function L(C){return C<256?z[C]:z[256+(C>>>7)]}function D(C,ne){C.pending_buf[C.pending++]=ne&255,C.pending_buf[C.pending++]=ne>>>8&255}function F(C,ne,se){C.bi_valid>_-se?(C.bi_buf|=ne<<C.bi_valid&65535,D(C,C.bi_buf),C.bi_buf=ne>>_-C.bi_valid,C.bi_valid+=se-_):(C.bi_buf|=ne<<C.bi_valid&65535,C.bi_valid+=se)}function K(C,ne,se){F(C,se[ne*2],se[ne*2+1])}function J(C,ne){var se=0;do se|=C&1,C>>>=1,se<<=1;while(--ne>0);return se>>>1}function ae(C){C.bi_valid===16?(D(C,C.bi_buf),C.bi_buf=0,C.bi_valid=0):C.bi_valid>=8&&(C.pending_buf[C.pending++]=C.bi_buf&255,C.bi_buf>>=8,C.bi_valid-=8)}function ue(C,ne){var se=ne.dyn_tree,fe=ne.max_code,Z=ne.stat_desc.static_tree,ie=ne.stat_desc.has_stree,R=ne.stat_desc.extra_bits,oe=ne.stat_desc.extra_base,be=ne.stat_desc.max_length,p,te,re,T,G,ee,_e=0;for(T=0;T<=u;T++)C.bl_count[T]=0;for(se[C.heap[C.heap_max]*2+1]=0,p=C.heap_max+1;p<g;p++)te=C.heap[p],T=se[se[te*2+1]*2+1]+1,T>be&&(T=be,_e++),se[te*2+1]=T,!(te>fe)&&(C.bl_count[T]++,G=0,te>=oe&&(G=R[te-oe]),ee=se[te*2],C.opt_len+=ee*(T+G),ie&&(C.static_len+=ee*(Z[te*2+1]+G)));if(_e!==0){do{for(T=be-1;C.bl_count[T]===0;)T--;C.bl_count[T]--,C.bl_count[T+1]+=2,C.bl_count[be]--,_e-=2}while(_e>0);for(T=be;T!==0;T--)for(te=C.bl_count[T];te!==0;)re=C.heap[--p],!(re>fe)&&(se[re*2+1]!==T&&(C.opt_len+=(T-se[re*2+1])*se[re*2],se[re*2+1]=T),te--)}}function ve(C,ne,se){var fe=new Array(u+1),Z=0,ie,R;for(ie=1;ie<=u;ie++)fe[ie]=Z=Z+se[ie-1]<<1;for(R=0;R<=ne;R++){var oe=C[R*2+1];oe!==0&&(C[R*2]=J(fe[oe]++,oe))}}function me(){var C,ne,se,fe,Z,ie=new Array(u+1);for(se=0,fe=0;fe<l-1;fe++)for(A[fe]=se,C=0;C<1<<P[fe];C++)X[se++]=fe;for(X[se-1]=fe,Z=0,fe=0;fe<16;fe++)for(k[fe]=Z,C=0;C<1<<M[fe];C++)z[Z++]=fe;for(Z>>=7;fe<h;fe++)for(k[fe]=Z<<7,C=0;C<1<<M[fe]-7;C++)z[256+Z++]=fe;for(ne=0;ne<=u;ne++)ie[ne]=0;for(C=0;C<=143;)I[C*2+1]=8,C++,ie[8]++;for(;C<=255;)I[C*2+1]=9,C++,ie[9]++;for(;C<=279;)I[C*2+1]=7,C++,ie[7]++;for(;C<=287;)I[C*2+1]=8,C++,ie[8]++;for(ve(I,y+1,ie),C=0;C<h;C++)$[C*2+1]=5,$[C*2]=J(C,5);N=new j(I,P,c+1,y,u),H=new j($,M,0,h,u),B=new j(new Array(0),W,0,m,E)}function we(C){var ne;for(ne=0;ne<y;ne++)C.dyn_ltree[ne*2]=0;for(ne=0;ne<h;ne++)C.dyn_dtree[ne*2]=0;for(ne=0;ne<m;ne++)C.bl_tree[ne*2]=0;C.dyn_ltree[w*2]=1,C.opt_len=C.static_len=0,C.last_lit=C.matches=0}function Ce(C){C.bi_valid>8?D(C,C.bi_buf):C.bi_valid>0&&(C.pending_buf[C.pending++]=C.bi_buf),C.bi_buf=0,C.bi_valid=0}function Pe(C,ne,se,fe){Ce(C),D(C,se),D(C,~se),e.arraySet(C.pending_buf,C.window,ne,se,C.pending),C.pending+=se}function je(C,ne,se,fe){var Z=ne*2,ie=se*2;return C[Z]<C[ie]||C[Z]===C[ie]&&fe[ne]<=fe[se]}function Ie(C,ne,se){for(var fe=C.heap[se],Z=se<<1;Z<=C.heap_len&&(Z<C.heap_len&&je(ne,C.heap[Z+1],C.heap[Z],C.depth)&&Z++,!je(ne,fe,C.heap[Z],C.depth));)C.heap[se]=C.heap[Z],se=Z,Z<<=1;C.heap[se]=fe}function Ee(C,ne,se){var fe,Z,ie=0,R,oe;if(C.last_lit!==0)do fe=C.pending_buf[C.d_buf+ie*2]<<8|C.pending_buf[C.d_buf+ie*2+1],Z=C.pending_buf[C.l_buf+ie],ie++,fe===0?K(C,Z,ne):(R=X[Z],K(C,R+c+1,ne),oe=P[R],oe!==0&&(Z-=A[R],F(C,Z,oe)),fe--,R=L(fe),K(C,R,se),oe=M[R],oe!==0&&(fe-=k[R],F(C,fe,oe)));while(ie<C.last_lit);K(C,w,ne)}function $e(C,ne){var se=ne.dyn_tree,fe=ne.stat_desc.static_tree,Z=ne.stat_desc.has_stree,ie=ne.stat_desc.elems,R,oe,be=-1,p;for(C.heap_len=0,C.heap_max=g,R=0;R<ie;R++)se[R*2]!==0?(C.heap[++C.heap_len]=be=R,C.depth[R]=0):se[R*2+1]=0;for(;C.heap_len<2;)p=C.heap[++C.heap_len]=be<2?++be:0,se[p*2]=1,C.depth[p]=0,C.opt_len--,Z&&(C.static_len-=fe[p*2+1]);for(ne.max_code=be,R=C.heap_len>>1;R>=1;R--)Ie(C,se,R);p=ie;do R=C.heap[1],C.heap[1]=C.heap[C.heap_len--],Ie(C,se,1),oe=C.heap[1],C.heap[--C.heap_max]=R,C.heap[--C.heap_max]=oe,se[p*2]=se[R*2]+se[oe*2],C.depth[p]=(C.depth[R]>=C.depth[oe]?C.depth[R]:C.depth[oe])+1,se[R*2+1]=se[oe*2+1]=p,C.heap[1]=p++,Ie(C,se,1);while(C.heap_len>=2);C.heap[--C.heap_max]=C.heap[1],ue(C,ne),ve(se,be,C.bl_count)}function st(C,ne,se){var fe,Z=-1,ie,R=ne[1],oe=0,be=7,p=4;for(R===0&&(be=138,p=3),ne[(se+1)*2+1]=65535,fe=0;fe<=se;fe++)ie=R,R=ne[(fe+1)*2+1],!(++oe<be&&ie===R)&&(oe<p?C.bl_tree[ie*2]+=oe:ie!==0?(ie!==Z&&C.bl_tree[ie*2]++,C.bl_tree[b*2]++):oe<=10?C.bl_tree[x*2]++:C.bl_tree[O*2]++,oe=0,Z=ie,R===0?(be=138,p=3):ie===R?(be=6,p=3):(be=7,p=4))}function qe(C,ne,se){var fe,Z=-1,ie,R=ne[1],oe=0,be=7,p=4;for(R===0&&(be=138,p=3),fe=0;fe<=se;fe++)if(ie=R,R=ne[(fe+1)*2+1],!(++oe<be&&ie===R)){if(oe<p)do K(C,ie,C.bl_tree);while(--oe!==0);else ie!==0?(ie!==Z&&(K(C,ie,C.bl_tree),oe--),K(C,b,C.bl_tree),F(C,oe-3,2)):oe<=10?(K(C,x,C.bl_tree),F(C,oe-3,3)):(K(C,O,C.bl_tree),F(C,oe-11,7));oe=0,Z=ie,R===0?(be=138,p=3):ie===R?(be=6,p=3):(be=7,p=4)}}function Ne(C){var ne;for(st(C,C.dyn_ltree,C.l_desc.max_code),st(C,C.dyn_dtree,C.d_desc.max_code),$e(C,C.bl_desc),ne=m-1;ne>=3&&C.bl_tree[V[ne]*2+1]===0;ne--);return C.opt_len+=3*(ne+1)+5+5+4,ne}function Ye(C,ne,se,fe){var Z;for(F(C,ne-257,5),F(C,se-1,5),F(C,fe-4,4),Z=0;Z<fe;Z++)F(C,C.bl_tree[V[Z]*2+1],3);qe(C,C.dyn_ltree,ne-1),qe(C,C.dyn_dtree,se-1)}function Y(C){var ne=4093624447,se;for(se=0;se<=31;se++,ne>>>=1)if(ne&1&&C.dyn_ltree[se*2]!==0)return n;if(C.dyn_ltree[18]!==0||C.dyn_ltree[20]!==0||C.dyn_ltree[26]!==0)return r;for(se=32;se<c;se++)if(C.dyn_ltree[se*2]!==0)return r;return n}var Q=!1;function le(C){Q||(me(),Q=!0),C.l_desc=new q(C.dyn_ltree,N),C.d_desc=new q(C.dyn_dtree,H),C.bl_desc=new q(C.bl_tree,B),C.bi_buf=0,C.bi_valid=0,we(C)}function ge(C,ne,se,fe){F(C,(o<<1)+(fe?1:0),3),Pe(C,ne,se)}function de(C){F(C,d<<1,3),K(C,w,I),ae(C)}function Re(C,ne,se,fe){var Z,ie,R=0;C.level>0?(C.strm.data_type===i&&(C.strm.data_type=Y(C)),$e(C,C.l_desc),$e(C,C.d_desc),R=Ne(C),Z=C.opt_len+3+7>>>3,ie=C.static_len+3+7>>>3,ie<=Z&&(Z=ie)):Z=ie=se+5,se+4<=Z&&ne!==-1?ge(C,ne,se,fe):C.strategy===t||ie===Z?(F(C,(d<<1)+(fe?1:0),3),Ee(C,I,$)):(F(C,(f<<1)+(fe?1:0),3),Ye(C,C.l_desc.max_code+1,C.d_desc.max_code+1,R+1),Ee(C,C.dyn_ltree,C.dyn_dtree)),we(C),fe&&Ce(C)}function Oe(C,ne,se){return C.pending_buf[C.d_buf+C.last_lit*2]=ne>>>8&255,C.pending_buf[C.d_buf+C.last_lit*2+1]=ne&255,C.pending_buf[C.l_buf+C.last_lit]=se&255,C.last_lit++,ne===0?C.dyn_ltree[se*2]++:(C.matches++,ne--,C.dyn_ltree[(X[se]+c+1)*2]++,C.dyn_dtree[L(ne)*2]++),C.last_lit===C.lit_bufsize-1}return Pt._tr_init=le,Pt._tr_stored_block=ge,Pt._tr_flush_block=Re,Pt._tr_tally=Oe,Pt._tr_align=de,Pt}var Pn,Os;function ld(){if(Os)return Pn;Os=1;function e(t,n,r,i){for(var a=t&65535|0,o=t>>>16&65535|0,d=0;r!==0;){d=r>2e3?2e3:r,r-=d;do a=a+n[i++]|0,o=o+a|0;while(--d);a%=65521,o%=65521}return a|o<<16|0}return Pn=e,Pn}var jn,Ts;function fd(){if(Ts)return jn;Ts=1;function e(){for(var r,i=[],a=0;a<256;a++){r=a;for(var o=0;o<8;o++)r=r&1?3988292384^r>>>1:r>>>1;i[a]=r}return i}var t=e();function n(r,i,a,o){var d=t,f=o+a;r^=-1;for(var v=o;v<f;v++)r=r>>>8^d[(r^i[v])&255];return r^-1}return jn=n,jn}var Ln,As;function pm(){return As||(As=1,Ln={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"}),Ln}var Is;function mm(){if(Is)return ut;Is=1;var e=bn(),t=hm(),n=ld(),r=fd(),i=pm(),a=0,o=1,d=3,f=4,v=5,s=0,l=1,c=-2,y=-3,h=-5,m=-1,g=1,u=2,_=3,E=4,w=0,b=2,x=8,O=9,P=15,M=8,W=29,V=256,S=V+1+W,I=30,$=19,z=2*S+1,X=15,A=3,k=258,j=k+A+1,N=32,H=42,B=69,q=73,L=91,D=103,F=113,K=666,J=1,ae=2,ue=3,ve=4,me=3;function we(p,te){return p.msg=i[te],te}function Ce(p){return(p<<1)-(p>4?9:0)}function Pe(p){for(var te=p.length;--te>=0;)p[te]=0}function je(p){var te=p.state,re=te.pending;re>p.avail_out&&(re=p.avail_out),re!==0&&(e.arraySet(p.output,te.pending_buf,te.pending_out,re,p.next_out),p.next_out+=re,te.pending_out+=re,p.total_out+=re,p.avail_out-=re,te.pending-=re,te.pending===0&&(te.pending_out=0))}function Ie(p,te){t._tr_flush_block(p,p.block_start>=0?p.block_start:-1,p.strstart-p.block_start,te),p.block_start=p.strstart,je(p.strm)}function Ee(p,te){p.pending_buf[p.pending++]=te}function $e(p,te){p.pending_buf[p.pending++]=te>>>8&255,p.pending_buf[p.pending++]=te&255}function st(p,te,re,T){var G=p.avail_in;return G>T&&(G=T),G===0?0:(p.avail_in-=G,e.arraySet(te,p.input,p.next_in,G,re),p.state.wrap===1?p.adler=n(p.adler,te,G,re):p.state.wrap===2&&(p.adler=r(p.adler,te,G,re)),p.next_in+=G,p.total_in+=G,G)}function qe(p,te){var re=p.max_chain_length,T=p.strstart,G,ee,_e=p.prev_length,he=p.nice_match,pe=p.strstart>p.w_size-j?p.strstart-(p.w_size-j):0,Ae=p.window,vt=p.w_mask,Le=p.prev,xe=p.strstart+k,Ue=Ae[T+_e-1],Je=Ae[T+_e];p.prev_length>=p.good_match&&(re>>=2),he>p.lookahead&&(he=p.lookahead);do if(G=te,!(Ae[G+_e]!==Je||Ae[G+_e-1]!==Ue||Ae[G]!==Ae[T]||Ae[++G]!==Ae[T+1])){T+=2,G++;do;while(Ae[++T]===Ae[++G]&&Ae[++T]===Ae[++G]&&Ae[++T]===Ae[++G]&&Ae[++T]===Ae[++G]&&Ae[++T]===Ae[++G]&&Ae[++T]===Ae[++G]&&Ae[++T]===Ae[++G]&&Ae[++T]===Ae[++G]&&T<xe);if(ee=k-(xe-T),T=xe-k,ee>_e){if(p.match_start=te,_e=ee,ee>=he)break;Ue=Ae[T+_e-1],Je=Ae[T+_e]}}while((te=Le[te&vt])>pe&&--re!==0);return _e<=p.lookahead?_e:p.lookahead}function Ne(p){var te=p.w_size,re,T,G,ee,_e;do{if(ee=p.window_size-p.lookahead-p.strstart,p.strstart>=te+(te-j)){e.arraySet(p.window,p.window,te,te,0),p.match_start-=te,p.strstart-=te,p.block_start-=te,T=p.hash_size,re=T;do G=p.head[--re],p.head[re]=G>=te?G-te:0;while(--T);T=te,re=T;do G=p.prev[--re],p.prev[re]=G>=te?G-te:0;while(--T);ee+=te}if(p.strm.avail_in===0)break;if(T=st(p.strm,p.window,p.strstart+p.lookahead,ee),p.lookahead+=T,p.lookahead+p.insert>=A)for(_e=p.strstart-p.insert,p.ins_h=p.window[_e],p.ins_h=(p.ins_h<<p.hash_shift^p.window[_e+1])&p.hash_mask;p.insert&&(p.ins_h=(p.ins_h<<p.hash_shift^p.window[_e+A-1])&p.hash_mask,p.prev[_e&p.w_mask]=p.head[p.ins_h],p.head[p.ins_h]=_e,_e++,p.insert--,!(p.lookahead+p.insert<A)););}while(p.lookahead<j&&p.strm.avail_in!==0)}function Ye(p,te){var re=65535;for(re>p.pending_buf_size-5&&(re=p.pending_buf_size-5);;){if(p.lookahead<=1){if(Ne(p),p.lookahead===0&&te===a)return J;if(p.lookahead===0)break}p.strstart+=p.lookahead,p.lookahead=0;var T=p.block_start+re;if((p.strstart===0||p.strstart>=T)&&(p.lookahead=p.strstart-T,p.strstart=T,Ie(p,!1),p.strm.avail_out===0)||p.strstart-p.block_start>=p.w_size-j&&(Ie(p,!1),p.strm.avail_out===0))return J}return p.insert=0,te===f?(Ie(p,!0),p.strm.avail_out===0?ue:ve):(p.strstart>p.block_start&&(Ie(p,!1),p.strm.avail_out===0),J)}function Y(p,te){for(var re,T;;){if(p.lookahead<j){if(Ne(p),p.lookahead<j&&te===a)return J;if(p.lookahead===0)break}if(re=0,p.lookahead>=A&&(p.ins_h=(p.ins_h<<p.hash_shift^p.window[p.strstart+A-1])&p.hash_mask,re=p.prev[p.strstart&p.w_mask]=p.head[p.ins_h],p.head[p.ins_h]=p.strstart),re!==0&&p.strstart-re<=p.w_size-j&&(p.match_length=qe(p,re)),p.match_length>=A)if(T=t._tr_tally(p,p.strstart-p.match_start,p.match_length-A),p.lookahead-=p.match_length,p.match_length<=p.max_lazy_match&&p.lookahead>=A){p.match_length--;do p.strstart++,p.ins_h=(p.ins_h<<p.hash_shift^p.window[p.strstart+A-1])&p.hash_mask,re=p.prev[p.strstart&p.w_mask]=p.head[p.ins_h],p.head[p.ins_h]=p.strstart;while(--p.match_length!==0);p.strstart++}else p.strstart+=p.match_length,p.match_length=0,p.ins_h=p.window[p.strstart],p.ins_h=(p.ins_h<<p.hash_shift^p.window[p.strstart+1])&p.hash_mask;else T=t._tr_tally(p,0,p.window[p.strstart]),p.lookahead--,p.strstart++;if(T&&(Ie(p,!1),p.strm.avail_out===0))return J}return p.insert=p.strstart<A-1?p.strstart:A-1,te===f?(Ie(p,!0),p.strm.avail_out===0?ue:ve):p.last_lit&&(Ie(p,!1),p.strm.avail_out===0)?J:ae}function Q(p,te){for(var re,T,G;;){if(p.lookahead<j){if(Ne(p),p.lookahead<j&&te===a)return J;if(p.lookahead===0)break}if(re=0,p.lookahead>=A&&(p.ins_h=(p.ins_h<<p.hash_shift^p.window[p.strstart+A-1])&p.hash_mask,re=p.prev[p.strstart&p.w_mask]=p.head[p.ins_h],p.head[p.ins_h]=p.strstart),p.prev_length=p.match_length,p.prev_match=p.match_start,p.match_length=A-1,re!==0&&p.prev_length<p.max_lazy_match&&p.strstart-re<=p.w_size-j&&(p.match_length=qe(p,re),p.match_length<=5&&(p.strategy===g||p.match_length===A&&p.strstart-p.match_start>4096)&&(p.match_length=A-1)),p.prev_length>=A&&p.match_length<=p.prev_length){G=p.strstart+p.lookahead-A,T=t._tr_tally(p,p.strstart-1-p.prev_match,p.prev_length-A),p.lookahead-=p.prev_length-1,p.prev_length-=2;do++p.strstart<=G&&(p.ins_h=(p.ins_h<<p.hash_shift^p.window[p.strstart+A-1])&p.hash_mask,re=p.prev[p.strstart&p.w_mask]=p.head[p.ins_h],p.head[p.ins_h]=p.strstart);while(--p.prev_length!==0);if(p.match_available=0,p.match_length=A-1,p.strstart++,T&&(Ie(p,!1),p.strm.avail_out===0))return J}else if(p.match_available){if(T=t._tr_tally(p,0,p.window[p.strstart-1]),T&&Ie(p,!1),p.strstart++,p.lookahead--,p.strm.avail_out===0)return J}else p.match_available=1,p.strstart++,p.lookahead--}return p.match_available&&(T=t._tr_tally(p,0,p.window[p.strstart-1]),p.match_available=0),p.insert=p.strstart<A-1?p.strstart:A-1,te===f?(Ie(p,!0),p.strm.avail_out===0?ue:ve):p.last_lit&&(Ie(p,!1),p.strm.avail_out===0)?J:ae}function le(p,te){for(var re,T,G,ee,_e=p.window;;){if(p.lookahead<=k){if(Ne(p),p.lookahead<=k&&te===a)return J;if(p.lookahead===0)break}if(p.match_length=0,p.lookahead>=A&&p.strstart>0&&(G=p.strstart-1,T=_e[G],T===_e[++G]&&T===_e[++G]&&T===_e[++G])){ee=p.strstart+k;do;while(T===_e[++G]&&T===_e[++G]&&T===_e[++G]&&T===_e[++G]&&T===_e[++G]&&T===_e[++G]&&T===_e[++G]&&T===_e[++G]&&G<ee);p.match_length=k-(ee-G),p.match_length>p.lookahead&&(p.match_length=p.lookahead)}if(p.match_length>=A?(re=t._tr_tally(p,1,p.match_length-A),p.lookahead-=p.match_length,p.strstart+=p.match_length,p.match_length=0):(re=t._tr_tally(p,0,p.window[p.strstart]),p.lookahead--,p.strstart++),re&&(Ie(p,!1),p.strm.avail_out===0))return J}return p.insert=0,te===f?(Ie(p,!0),p.strm.avail_out===0?ue:ve):p.last_lit&&(Ie(p,!1),p.strm.avail_out===0)?J:ae}function ge(p,te){for(var re;;){if(p.lookahead===0&&(Ne(p),p.lookahead===0)){if(te===a)return J;break}if(p.match_length=0,re=t._tr_tally(p,0,p.window[p.strstart]),p.lookahead--,p.strstart++,re&&(Ie(p,!1),p.strm.avail_out===0))return J}return p.insert=0,te===f?(Ie(p,!0),p.strm.avail_out===0?ue:ve):p.last_lit&&(Ie(p,!1),p.strm.avail_out===0)?J:ae}function de(p,te,re,T,G){this.good_length=p,this.max_lazy=te,this.nice_length=re,this.max_chain=T,this.func=G}var Re;Re=[new de(0,0,0,0,Ye),new de(4,4,8,4,Y),new de(4,5,16,8,Y),new de(4,6,32,32,Y),new de(4,4,16,16,Q),new de(8,16,32,32,Q),new de(8,16,128,128,Q),new de(8,32,128,256,Q),new de(32,128,258,1024,Q),new de(32,258,258,4096,Q)];function Oe(p){p.window_size=2*p.w_size,Pe(p.head),p.max_lazy_match=Re[p.level].max_lazy,p.good_match=Re[p.level].good_length,p.nice_match=Re[p.level].nice_length,p.max_chain_length=Re[p.level].max_chain,p.strstart=0,p.block_start=0,p.lookahead=0,p.insert=0,p.match_length=p.prev_length=A-1,p.match_available=0,p.ins_h=0}function C(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=x,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new e.Buf16(z*2),this.dyn_dtree=new e.Buf16((2*I+1)*2),this.bl_tree=new e.Buf16((2*$+1)*2),Pe(this.dyn_ltree),Pe(this.dyn_dtree),Pe(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new e.Buf16(X+1),this.heap=new e.Buf16(2*S+1),Pe(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new e.Buf16(2*S+1),Pe(this.depth),this.l_buf=0,this.lit_bufsize=0,this.last_lit=0,this.d_buf=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}function ne(p){var te;return!p||!p.state?we(p,c):(p.total_in=p.total_out=0,p.data_type=b,te=p.state,te.pending=0,te.pending_out=0,te.wrap<0&&(te.wrap=-te.wrap),te.status=te.wrap?H:F,p.adler=te.wrap===2?0:1,te.last_flush=a,t._tr_init(te),s)}function se(p){var te=ne(p);return te===s&&Oe(p.state),te}function fe(p,te){return!p||!p.state||p.state.wrap!==2?c:(p.state.gzhead=te,s)}function Z(p,te,re,T,G,ee){if(!p)return c;var _e=1;if(te===m&&(te=6),T<0?(_e=0,T=-T):T>15&&(_e=2,T-=16),G<1||G>O||re!==x||T<8||T>15||te<0||te>9||ee<0||ee>E)return we(p,c);T===8&&(T=9);var he=new C;return p.state=he,he.strm=p,he.wrap=_e,he.gzhead=null,he.w_bits=T,he.w_size=1<<he.w_bits,he.w_mask=he.w_size-1,he.hash_bits=G+7,he.hash_size=1<<he.hash_bits,he.hash_mask=he.hash_size-1,he.hash_shift=~~((he.hash_bits+A-1)/A),he.window=new e.Buf8(he.w_size*2),he.head=new e.Buf16(he.hash_size),he.prev=new e.Buf16(he.w_size),he.lit_bufsize=1<<G+6,he.pending_buf_size=he.lit_bufsize*4,he.pending_buf=new e.Buf8(he.pending_buf_size),he.d_buf=1*he.lit_bufsize,he.l_buf=3*he.lit_bufsize,he.level=te,he.strategy=ee,he.method=re,se(p)}function ie(p,te){return Z(p,te,x,P,M,w)}function R(p,te){var re,T,G,ee;if(!p||!p.state||te>v||te<0)return p?we(p,c):c;if(T=p.state,!p.output||!p.input&&p.avail_in!==0||T.status===K&&te!==f)return we(p,p.avail_out===0?h:c);if(T.strm=p,re=T.last_flush,T.last_flush=te,T.status===H)if(T.wrap===2)p.adler=0,Ee(T,31),Ee(T,139),Ee(T,8),T.gzhead?(Ee(T,(T.gzhead.text?1:0)+(T.gzhead.hcrc?2:0)+(T.gzhead.extra?4:0)+(T.gzhead.name?8:0)+(T.gzhead.comment?16:0)),Ee(T,T.gzhead.time&255),Ee(T,T.gzhead.time>>8&255),Ee(T,T.gzhead.time>>16&255),Ee(T,T.gzhead.time>>24&255),Ee(T,T.level===9?2:T.strategy>=u||T.level<2?4:0),Ee(T,T.gzhead.os&255),T.gzhead.extra&&T.gzhead.extra.length&&(Ee(T,T.gzhead.extra.length&255),Ee(T,T.gzhead.extra.length>>8&255)),T.gzhead.hcrc&&(p.adler=r(p.adler,T.pending_buf,T.pending,0)),T.gzindex=0,T.status=B):(Ee(T,0),Ee(T,0),Ee(T,0),Ee(T,0),Ee(T,0),Ee(T,T.level===9?2:T.strategy>=u||T.level<2?4:0),Ee(T,me),T.status=F);else{var _e=x+(T.w_bits-8<<4)<<8,he=-1;T.strategy>=u||T.level<2?he=0:T.level<6?he=1:T.level===6?he=2:he=3,_e|=he<<6,T.strstart!==0&&(_e|=N),_e+=31-_e%31,T.status=F,$e(T,_e),T.strstart!==0&&($e(T,p.adler>>>16),$e(T,p.adler&65535)),p.adler=1}if(T.status===B)if(T.gzhead.extra){for(G=T.pending;T.gzindex<(T.gzhead.extra.length&65535)&&!(T.pending===T.pending_buf_size&&(T.gzhead.hcrc&&T.pending>G&&(p.adler=r(p.adler,T.pending_buf,T.pending-G,G)),je(p),G=T.pending,T.pending===T.pending_buf_size));)Ee(T,T.gzhead.extra[T.gzindex]&255),T.gzindex++;T.gzhead.hcrc&&T.pending>G&&(p.adler=r(p.adler,T.pending_buf,T.pending-G,G)),T.gzindex===T.gzhead.extra.length&&(T.gzindex=0,T.status=q)}else T.status=q;if(T.status===q)if(T.gzhead.name){G=T.pending;do{if(T.pending===T.pending_buf_size&&(T.gzhead.hcrc&&T.pending>G&&(p.adler=r(p.adler,T.pending_buf,T.pending-G,G)),je(p),G=T.pending,T.pending===T.pending_buf_size)){ee=1;break}T.gzindex<T.gzhead.name.length?ee=T.gzhead.name.charCodeAt(T.gzindex++)&255:ee=0,Ee(T,ee)}while(ee!==0);T.gzhead.hcrc&&T.pending>G&&(p.adler=r(p.adler,T.pending_buf,T.pending-G,G)),ee===0&&(T.gzindex=0,T.status=L)}else T.status=L;if(T.status===L)if(T.gzhead.comment){G=T.pending;do{if(T.pending===T.pending_buf_size&&(T.gzhead.hcrc&&T.pending>G&&(p.adler=r(p.adler,T.pending_buf,T.pending-G,G)),je(p),G=T.pending,T.pending===T.pending_buf_size)){ee=1;break}T.gzindex<T.gzhead.comment.length?ee=T.gzhead.comment.charCodeAt(T.gzindex++)&255:ee=0,Ee(T,ee)}while(ee!==0);T.gzhead.hcrc&&T.pending>G&&(p.adler=r(p.adler,T.pending_buf,T.pending-G,G)),ee===0&&(T.status=D)}else T.status=D;if(T.status===D&&(T.gzhead.hcrc?(T.pending+2>T.pending_buf_size&&je(p),T.pending+2<=T.pending_buf_size&&(Ee(T,p.adler&255),Ee(T,p.adler>>8&255),p.adler=0,T.status=F)):T.status=F),T.pending!==0){if(je(p),p.avail_out===0)return T.last_flush=-1,s}else if(p.avail_in===0&&Ce(te)<=Ce(re)&&te!==f)return we(p,h);if(T.status===K&&p.avail_in!==0)return we(p,h);if(p.avail_in!==0||T.lookahead!==0||te!==a&&T.status!==K){var pe=T.strategy===u?ge(T,te):T.strategy===_?le(T,te):Re[T.level].func(T,te);if((pe===ue||pe===ve)&&(T.status=K),pe===J||pe===ue)return p.avail_out===0&&(T.last_flush=-1),s;if(pe===ae&&(te===o?t._tr_align(T):te!==v&&(t._tr_stored_block(T,0,0,!1),te===d&&(Pe(T.head),T.lookahead===0&&(T.strstart=0,T.block_start=0,T.insert=0))),je(p),p.avail_out===0))return T.last_flush=-1,s}return te!==f?s:T.wrap<=0?l:(T.wrap===2?(Ee(T,p.adler&255),Ee(T,p.adler>>8&255),Ee(T,p.adler>>16&255),Ee(T,p.adler>>24&255),Ee(T,p.total_in&255),Ee(T,p.total_in>>8&255),Ee(T,p.total_in>>16&255),Ee(T,p.total_in>>24&255)):($e(T,p.adler>>>16),$e(T,p.adler&65535)),je(p),T.wrap>0&&(T.wrap=-T.wrap),T.pending!==0?s:l)}function oe(p){var te;return!p||!p.state?c:(te=p.state.status,te!==H&&te!==B&&te!==q&&te!==L&&te!==D&&te!==F&&te!==K?we(p,c):(p.state=null,te===F?we(p,y):s))}function be(p,te){var re=te.length,T,G,ee,_e,he,pe,Ae,vt;if(!p||!p.state||(T=p.state,_e=T.wrap,_e===2||_e===1&&T.status!==H||T.lookahead))return c;for(_e===1&&(p.adler=n(p.adler,te,re,0)),T.wrap=0,re>=T.w_size&&(_e===0&&(Pe(T.head),T.strstart=0,T.block_start=0,T.insert=0),vt=new e.Buf8(T.w_size),e.arraySet(vt,te,re-T.w_size,T.w_size,0),te=vt,re=T.w_size),he=p.avail_in,pe=p.next_in,Ae=p.input,p.avail_in=re,p.next_in=0,p.input=te,Ne(T);T.lookahead>=A;){G=T.strstart,ee=T.lookahead-(A-1);do T.ins_h=(T.ins_h<<T.hash_shift^T.window[G+A-1])&T.hash_mask,T.prev[G&T.w_mask]=T.head[T.ins_h],T.head[T.ins_h]=G,G++;while(--ee);T.strstart=G,T.lookahead=A-1,Ne(T)}return T.strstart+=T.lookahead,T.block_start=T.strstart,T.insert=T.lookahead,T.lookahead=0,T.match_length=T.prev_length=A-1,T.match_available=0,p.next_in=pe,p.input=Ae,p.avail_in=he,T.wrap=_e,s}return ut.deflateInit=ie,ut.deflateInit2=Z,ut.deflateReset=se,ut.deflateResetKeep=ne,ut.deflateSetHeader=fe,ut.deflate=R,ut.deflateEnd=oe,ut.deflateSetDictionary=be,ut.deflateInfo="pako deflate (from Nodeca project)",ut}var qn,xs;function gm(){if(xs)return qn;xs=1;function e(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}return qn=e,qn}var it={},Dn,Cs;function vm(){if(Cs)return Dn;Cs=1;var e=30,t=12;return Dn=function(r,i){var a,o,d,f,v,s,l,c,y,h,m,g,u,_,E,w,b,x,O,P,M,W,V,S,I;a=r.state,o=r.next_in,S=r.input,d=o+(r.avail_in-5),f=r.next_out,I=r.output,v=f-(i-r.avail_out),s=f+(r.avail_out-257),l=a.dmax,c=a.wsize,y=a.whave,h=a.wnext,m=a.window,g=a.hold,u=a.bits,_=a.lencode,E=a.distcode,w=(1<<a.lenbits)-1,b=(1<<a.distbits)-1;e:do{u<15&&(g+=S[o++]<<u,u+=8,g+=S[o++]<<u,u+=8),x=_[g&w];t:for(;;){if(O=x>>>24,g>>>=O,u-=O,O=x>>>16&255,O===0)I[f++]=x&65535;else if(O&16){P=x&65535,O&=15,O&&(u<O&&(g+=S[o++]<<u,u+=8),P+=g&(1<<O)-1,g>>>=O,u-=O),u<15&&(g+=S[o++]<<u,u+=8,g+=S[o++]<<u,u+=8),x=E[g&b];r:for(;;){if(O=x>>>24,g>>>=O,u-=O,O=x>>>16&255,O&16){if(M=x&65535,O&=15,u<O&&(g+=S[o++]<<u,u+=8,u<O&&(g+=S[o++]<<u,u+=8)),M+=g&(1<<O)-1,M>l){r.msg="invalid distance too far back",a.mode=e;break e}if(g>>>=O,u-=O,O=f-v,M>O){if(O=M-O,O>y&&a.sane){r.msg="invalid distance too far back",a.mode=e;break e}if(W=0,V=m,h===0){if(W+=c-O,O<P){P-=O;do I[f++]=m[W++];while(--O);W=f-M,V=I}}else if(h<O){if(W+=c+h-O,O-=h,O<P){P-=O;do I[f++]=m[W++];while(--O);if(W=0,h<P){O=h,P-=O;do I[f++]=m[W++];while(--O);W=f-M,V=I}}}else if(W+=h-O,O<P){P-=O;do I[f++]=m[W++];while(--O);W=f-M,V=I}for(;P>2;)I[f++]=V[W++],I[f++]=V[W++],I[f++]=V[W++],P-=3;P&&(I[f++]=V[W++],P>1&&(I[f++]=V[W++]))}else{W=f-M;do I[f++]=I[W++],I[f++]=I[W++],I[f++]=I[W++],P-=3;while(P>2);P&&(I[f++]=I[W++],P>1&&(I[f++]=I[W++]))}}else if((O&64)===0){x=E[(x&65535)+(g&(1<<O)-1)];continue r}else{r.msg="invalid distance code",a.mode=e;break e}break}}else if((O&64)===0){x=_[(x&65535)+(g&(1<<O)-1)];continue t}else if(O&32){a.mode=t;break e}else{r.msg="invalid literal/length code",a.mode=e;break e}break}}while(o<d&&f<s);P=u>>3,o-=P,u-=P<<3,g&=(1<<u)-1,r.next_in=o,r.next_out=f,r.avail_in=o<d?5+(d-o):5-(o-d),r.avail_out=f<s?257+(s-f):257-(f-s),a.hold=g,a.bits=u},Dn}var Nn,ks;function ym(){if(ks)return Nn;ks=1;var e=bn(),t=15,n=852,r=592,i=0,a=1,o=2,d=[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,0,0],f=[16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78],v=[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,0,0],s=[16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64];return Nn=function(c,y,h,m,g,u,_,E){var w=E.bits,b=0,x=0,O=0,P=0,M=0,W=0,V=0,S=0,I=0,$=0,z,X,A,k,j,N=null,H=0,B,q=new e.Buf16(t+1),L=new e.Buf16(t+1),D=null,F=0,K,J,ae;for(b=0;b<=t;b++)q[b]=0;for(x=0;x<m;x++)q[y[h+x]]++;for(M=w,P=t;P>=1&&q[P]===0;P--);if(M>P&&(M=P),P===0)return g[u++]=1<<24|64<<16|0,g[u++]=1<<24|64<<16|0,E.bits=1,0;for(O=1;O<P&&q[O]===0;O++);for(M<O&&(M=O),S=1,b=1;b<=t;b++)if(S<<=1,S-=q[b],S<0)return-1;if(S>0&&(c===i||P!==1))return-1;for(L[1]=0,b=1;b<t;b++)L[b+1]=L[b]+q[b];for(x=0;x<m;x++)y[h+x]!==0&&(_[L[y[h+x]]++]=x);if(c===i?(N=D=_,B=19):c===a?(N=d,H-=257,D=f,F-=257,B=256):(N=v,D=s,B=-1),$=0,x=0,b=O,j=u,W=M,V=0,A=-1,I=1<<M,k=I-1,c===a&&I>n||c===o&&I>r)return 1;for(;;){K=b-V,_[x]<B?(J=0,ae=_[x]):_[x]>B?(J=D[F+_[x]],ae=N[H+_[x]]):(J=96,ae=0),z=1<<b-V,X=1<<W,O=X;do X-=z,g[j+($>>V)+X]=K<<24|J<<16|ae|0;while(X!==0);for(z=1<<b-1;$&z;)z>>=1;if(z!==0?($&=z-1,$+=z):$=0,x++,--q[b]===0){if(b===P)break;b=y[h+_[x]]}if(b>M&&($&k)!==A){for(V===0&&(V=M),j+=O,W=b-V,S=1<<W;W+V<P&&(S-=q[W+V],!(S<=0));)W++,S<<=1;if(I+=1<<W,c===a&&I>n||c===o&&I>r)return 1;A=$&k,g[A]=M<<24|W<<16|j-u|0}}return $!==0&&(g[j+$]=b-V<<24|64<<16|0),E.bits=M,0},Nn}var Ps;function _m(){if(Ps)return it;Ps=1;var e=bn(),t=ld(),n=fd(),r=vm(),i=ym(),a=0,o=1,d=2,f=4,v=5,s=6,l=0,c=1,y=2,h=-2,m=-3,g=-4,u=-5,_=8,E=1,w=2,b=3,x=4,O=5,P=6,M=7,W=8,V=9,S=10,I=11,$=12,z=13,X=14,A=15,k=16,j=17,N=18,H=19,B=20,q=21,L=22,D=23,F=24,K=25,J=26,ae=27,ue=28,ve=29,me=30,we=31,Ce=32,Pe=852,je=592,Ie=15,Ee=Ie;function $e(Z){return(Z>>>24&255)+(Z>>>8&65280)+((Z&65280)<<8)+((Z&255)<<24)}function st(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new e.Buf16(320),this.work=new e.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function qe(Z){var ie;return!Z||!Z.state?h:(ie=Z.state,Z.total_in=Z.total_out=ie.total=0,Z.msg="",ie.wrap&&(Z.adler=ie.wrap&1),ie.mode=E,ie.last=0,ie.havedict=0,ie.dmax=32768,ie.head=null,ie.hold=0,ie.bits=0,ie.lencode=ie.lendyn=new e.Buf32(Pe),ie.distcode=ie.distdyn=new e.Buf32(je),ie.sane=1,ie.back=-1,l)}function Ne(Z){var ie;return!Z||!Z.state?h:(ie=Z.state,ie.wsize=0,ie.whave=0,ie.wnext=0,qe(Z))}function Ye(Z,ie){var R,oe;return!Z||!Z.state||(oe=Z.state,ie<0?(R=0,ie=-ie):(R=(ie>>4)+1,ie<48&&(ie&=15)),ie&&(ie<8||ie>15))?h:(oe.window!==null&&oe.wbits!==ie&&(oe.window=null),oe.wrap=R,oe.wbits=ie,Ne(Z))}function Y(Z,ie){var R,oe;return Z?(oe=new st,Z.state=oe,oe.window=null,R=Ye(Z,ie),R!==l&&(Z.state=null),R):h}function Q(Z){return Y(Z,Ee)}var le=!0,ge,de;function Re(Z){if(le){var ie;for(ge=new e.Buf32(512),de=new e.Buf32(32),ie=0;ie<144;)Z.lens[ie++]=8;for(;ie<256;)Z.lens[ie++]=9;for(;ie<280;)Z.lens[ie++]=7;for(;ie<288;)Z.lens[ie++]=8;for(i(o,Z.lens,0,288,ge,0,Z.work,{bits:9}),ie=0;ie<32;)Z.lens[ie++]=5;i(d,Z.lens,0,32,de,0,Z.work,{bits:5}),le=!1}Z.lencode=ge,Z.lenbits=9,Z.distcode=de,Z.distbits=5}function Oe(Z,ie,R,oe){var be,p=Z.state;return p.window===null&&(p.wsize=1<<p.wbits,p.wnext=0,p.whave=0,p.window=new e.Buf8(p.wsize)),oe>=p.wsize?(e.arraySet(p.window,ie,R-p.wsize,p.wsize,0),p.wnext=0,p.whave=p.wsize):(be=p.wsize-p.wnext,be>oe&&(be=oe),e.arraySet(p.window,ie,R-oe,be,p.wnext),oe-=be,oe?(e.arraySet(p.window,ie,R-oe,oe,0),p.wnext=oe,p.whave=p.wsize):(p.wnext+=be,p.wnext===p.wsize&&(p.wnext=0),p.whave<p.wsize&&(p.whave+=be))),0}function C(Z,ie){var R,oe,be,p,te,re,T,G,ee,_e,he,pe,Ae,vt,Le=0,xe,Ue,Je,Xe,br,wr,Me,nt,Ge=new e.Buf8(4),yt,dt,gs=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];if(!Z||!Z.state||!Z.output||!Z.input&&Z.avail_in!==0)return h;R=Z.state,R.mode===$&&(R.mode=z),te=Z.next_out,be=Z.output,T=Z.avail_out,p=Z.next_in,oe=Z.input,re=Z.avail_in,G=R.hold,ee=R.bits,_e=re,he=T,nt=l;e:for(;;)switch(R.mode){case E:if(R.wrap===0){R.mode=z;break}for(;ee<16;){if(re===0)break e;re--,G+=oe[p++]<<ee,ee+=8}if(R.wrap&2&&G===35615){R.check=0,Ge[0]=G&255,Ge[1]=G>>>8&255,R.check=n(R.check,Ge,2,0),G=0,ee=0,R.mode=w;break}if(R.flags=0,R.head&&(R.head.done=!1),!(R.wrap&1)||(((G&255)<<8)+(G>>8))%31){Z.msg="incorrect header check",R.mode=me;break}if((G&15)!==_){Z.msg="unknown compression method",R.mode=me;break}if(G>>>=4,ee-=4,Me=(G&15)+8,R.wbits===0)R.wbits=Me;else if(Me>R.wbits){Z.msg="invalid window size",R.mode=me;break}R.dmax=1<<Me,Z.adler=R.check=1,R.mode=G&512?S:$,G=0,ee=0;break;case w:for(;ee<16;){if(re===0)break e;re--,G+=oe[p++]<<ee,ee+=8}if(R.flags=G,(R.flags&255)!==_){Z.msg="unknown compression method",R.mode=me;break}if(R.flags&57344){Z.msg="unknown header flags set",R.mode=me;break}R.head&&(R.head.text=G>>8&1),R.flags&512&&(Ge[0]=G&255,Ge[1]=G>>>8&255,R.check=n(R.check,Ge,2,0)),G=0,ee=0,R.mode=b;case b:for(;ee<32;){if(re===0)break e;re--,G+=oe[p++]<<ee,ee+=8}R.head&&(R.head.time=G),R.flags&512&&(Ge[0]=G&255,Ge[1]=G>>>8&255,Ge[2]=G>>>16&255,Ge[3]=G>>>24&255,R.check=n(R.check,Ge,4,0)),G=0,ee=0,R.mode=x;case x:for(;ee<16;){if(re===0)break e;re--,G+=oe[p++]<<ee,ee+=8}R.head&&(R.head.xflags=G&255,R.head.os=G>>8),R.flags&512&&(Ge[0]=G&255,Ge[1]=G>>>8&255,R.check=n(R.check,Ge,2,0)),G=0,ee=0,R.mode=O;case O:if(R.flags&1024){for(;ee<16;){if(re===0)break e;re--,G+=oe[p++]<<ee,ee+=8}R.length=G,R.head&&(R.head.extra_len=G),R.flags&512&&(Ge[0]=G&255,Ge[1]=G>>>8&255,R.check=n(R.check,Ge,2,0)),G=0,ee=0}else R.head&&(R.head.extra=null);R.mode=P;case P:if(R.flags&1024&&(pe=R.length,pe>re&&(pe=re),pe&&(R.head&&(Me=R.head.extra_len-R.length,R.head.extra||(R.head.extra=new Array(R.head.extra_len)),e.arraySet(R.head.extra,oe,p,pe,Me)),R.flags&512&&(R.check=n(R.check,oe,pe,p)),re-=pe,p+=pe,R.length-=pe),R.length))break e;R.length=0,R.mode=M;case M:if(R.flags&2048){if(re===0)break e;pe=0;do Me=oe[p+pe++],R.head&&Me&&R.length<65536&&(R.head.name+=String.fromCharCode(Me));while(Me&&pe<re);if(R.flags&512&&(R.check=n(R.check,oe,pe,p)),re-=pe,p+=pe,Me)break e}else R.head&&(R.head.name=null);R.length=0,R.mode=W;case W:if(R.flags&4096){if(re===0)break e;pe=0;do Me=oe[p+pe++],R.head&&Me&&R.length<65536&&(R.head.comment+=String.fromCharCode(Me));while(Me&&pe<re);if(R.flags&512&&(R.check=n(R.check,oe,pe,p)),re-=pe,p+=pe,Me)break e}else R.head&&(R.head.comment=null);R.mode=V;case V:if(R.flags&512){for(;ee<16;){if(re===0)break e;re--,G+=oe[p++]<<ee,ee+=8}if(G!==(R.check&65535)){Z.msg="header crc mismatch",R.mode=me;break}G=0,ee=0}R.head&&(R.head.hcrc=R.flags>>9&1,R.head.done=!0),Z.adler=R.check=0,R.mode=$;break;case S:for(;ee<32;){if(re===0)break e;re--,G+=oe[p++]<<ee,ee+=8}Z.adler=R.check=$e(G),G=0,ee=0,R.mode=I;case I:if(R.havedict===0)return Z.next_out=te,Z.avail_out=T,Z.next_in=p,Z.avail_in=re,R.hold=G,R.bits=ee,y;Z.adler=R.check=1,R.mode=$;case $:if(ie===v||ie===s)break e;case z:if(R.last){G>>>=ee&7,ee-=ee&7,R.mode=ae;break}for(;ee<3;){if(re===0)break e;re--,G+=oe[p++]<<ee,ee+=8}switch(R.last=G&1,G>>>=1,ee-=1,G&3){case 0:R.mode=X;break;case 1:if(Re(R),R.mode=B,ie===s){G>>>=2,ee-=2;break e}break;case 2:R.mode=j;break;case 3:Z.msg="invalid block type",R.mode=me}G>>>=2,ee-=2;break;case X:for(G>>>=ee&7,ee-=ee&7;ee<32;){if(re===0)break e;re--,G+=oe[p++]<<ee,ee+=8}if((G&65535)!==(G>>>16^65535)){Z.msg="invalid stored block lengths",R.mode=me;break}if(R.length=G&65535,G=0,ee=0,R.mode=A,ie===s)break e;case A:R.mode=k;case k:if(pe=R.length,pe){if(pe>re&&(pe=re),pe>T&&(pe=T),pe===0)break e;e.arraySet(be,oe,p,pe,te),re-=pe,p+=pe,T-=pe,te+=pe,R.length-=pe;break}R.mode=$;break;case j:for(;ee<14;){if(re===0)break e;re--,G+=oe[p++]<<ee,ee+=8}if(R.nlen=(G&31)+257,G>>>=5,ee-=5,R.ndist=(G&31)+1,G>>>=5,ee-=5,R.ncode=(G&15)+4,G>>>=4,ee-=4,R.nlen>286||R.ndist>30){Z.msg="too many length or distance symbols",R.mode=me;break}R.have=0,R.mode=N;case N:for(;R.have<R.ncode;){for(;ee<3;){if(re===0)break e;re--,G+=oe[p++]<<ee,ee+=8}R.lens[gs[R.have++]]=G&7,G>>>=3,ee-=3}for(;R.have<19;)R.lens[gs[R.have++]]=0;if(R.lencode=R.lendyn,R.lenbits=7,yt={bits:R.lenbits},nt=i(a,R.lens,0,19,R.lencode,0,R.work,yt),R.lenbits=yt.bits,nt){Z.msg="invalid code lengths set",R.mode=me;break}R.have=0,R.mode=H;case H:for(;R.have<R.nlen+R.ndist;){for(;Le=R.lencode[G&(1<<R.lenbits)-1],xe=Le>>>24,Ue=Le>>>16&255,Je=Le&65535,!(xe<=ee);){if(re===0)break e;re--,G+=oe[p++]<<ee,ee+=8}if(Je<16)G>>>=xe,ee-=xe,R.lens[R.have++]=Je;else{if(Je===16){for(dt=xe+2;ee<dt;){if(re===0)break e;re--,G+=oe[p++]<<ee,ee+=8}if(G>>>=xe,ee-=xe,R.have===0){Z.msg="invalid bit length repeat",R.mode=me;break}Me=R.lens[R.have-1],pe=3+(G&3),G>>>=2,ee-=2}else if(Je===17){for(dt=xe+3;ee<dt;){if(re===0)break e;re--,G+=oe[p++]<<ee,ee+=8}G>>>=xe,ee-=xe,Me=0,pe=3+(G&7),G>>>=3,ee-=3}else{for(dt=xe+7;ee<dt;){if(re===0)break e;re--,G+=oe[p++]<<ee,ee+=8}G>>>=xe,ee-=xe,Me=0,pe=11+(G&127),G>>>=7,ee-=7}if(R.have+pe>R.nlen+R.ndist){Z.msg="invalid bit length repeat",R.mode=me;break}for(;pe--;)R.lens[R.have++]=Me}}if(R.mode===me)break;if(R.lens[256]===0){Z.msg="invalid code -- missing end-of-block",R.mode=me;break}if(R.lenbits=9,yt={bits:R.lenbits},nt=i(o,R.lens,0,R.nlen,R.lencode,0,R.work,yt),R.lenbits=yt.bits,nt){Z.msg="invalid literal/lengths set",R.mode=me;break}if(R.distbits=6,R.distcode=R.distdyn,yt={bits:R.distbits},nt=i(d,R.lens,R.nlen,R.ndist,R.distcode,0,R.work,yt),R.distbits=yt.bits,nt){Z.msg="invalid distances set",R.mode=me;break}if(R.mode=B,ie===s)break e;case B:R.mode=q;case q:if(re>=6&&T>=258){Z.next_out=te,Z.avail_out=T,Z.next_in=p,Z.avail_in=re,R.hold=G,R.bits=ee,r(Z,he),te=Z.next_out,be=Z.output,T=Z.avail_out,p=Z.next_in,oe=Z.input,re=Z.avail_in,G=R.hold,ee=R.bits,R.mode===$&&(R.back=-1);break}for(R.back=0;Le=R.lencode[G&(1<<R.lenbits)-1],xe=Le>>>24,Ue=Le>>>16&255,Je=Le&65535,!(xe<=ee);){if(re===0)break e;re--,G+=oe[p++]<<ee,ee+=8}if(Ue&&(Ue&240)===0){for(Xe=xe,br=Ue,wr=Je;Le=R.lencode[wr+((G&(1<<Xe+br)-1)>>Xe)],xe=Le>>>24,Ue=Le>>>16&255,Je=Le&65535,!(Xe+xe<=ee);){if(re===0)break e;re--,G+=oe[p++]<<ee,ee+=8}G>>>=Xe,ee-=Xe,R.back+=Xe}if(G>>>=xe,ee-=xe,R.back+=xe,R.length=Je,Ue===0){R.mode=J;break}if(Ue&32){R.back=-1,R.mode=$;break}if(Ue&64){Z.msg="invalid literal/length code",R.mode=me;break}R.extra=Ue&15,R.mode=L;case L:if(R.extra){for(dt=R.extra;ee<dt;){if(re===0)break e;re--,G+=oe[p++]<<ee,ee+=8}R.length+=G&(1<<R.extra)-1,G>>>=R.extra,ee-=R.extra,R.back+=R.extra}R.was=R.length,R.mode=D;case D:for(;Le=R.distcode[G&(1<<R.distbits)-1],xe=Le>>>24,Ue=Le>>>16&255,Je=Le&65535,!(xe<=ee);){if(re===0)break e;re--,G+=oe[p++]<<ee,ee+=8}if((Ue&240)===0){for(Xe=xe,br=Ue,wr=Je;Le=R.distcode[wr+((G&(1<<Xe+br)-1)>>Xe)],xe=Le>>>24,Ue=Le>>>16&255,Je=Le&65535,!(Xe+xe<=ee);){if(re===0)break e;re--,G+=oe[p++]<<ee,ee+=8}G>>>=Xe,ee-=Xe,R.back+=Xe}if(G>>>=xe,ee-=xe,R.back+=xe,Ue&64){Z.msg="invalid distance code",R.mode=me;break}R.offset=Je,R.extra=Ue&15,R.mode=F;case F:if(R.extra){for(dt=R.extra;ee<dt;){if(re===0)break e;re--,G+=oe[p++]<<ee,ee+=8}R.offset+=G&(1<<R.extra)-1,G>>>=R.extra,ee-=R.extra,R.back+=R.extra}if(R.offset>R.dmax){Z.msg="invalid distance too far back",R.mode=me;break}R.mode=K;case K:if(T===0)break e;if(pe=he-T,R.offset>pe){if(pe=R.offset-pe,pe>R.whave&&R.sane){Z.msg="invalid distance too far back",R.mode=me;break}pe>R.wnext?(pe-=R.wnext,Ae=R.wsize-pe):Ae=R.wnext-pe,pe>R.length&&(pe=R.length),vt=R.window}else vt=be,Ae=te-R.offset,pe=R.length;pe>T&&(pe=T),T-=pe,R.length-=pe;do be[te++]=vt[Ae++];while(--pe);R.length===0&&(R.mode=q);break;case J:if(T===0)break e;be[te++]=R.length,T--,R.mode=q;break;case ae:if(R.wrap){for(;ee<32;){if(re===0)break e;re--,G|=oe[p++]<<ee,ee+=8}if(he-=T,Z.total_out+=he,R.total+=he,he&&(Z.adler=R.check=R.flags?n(R.check,be,he,te-he):t(R.check,be,he,te-he)),he=T,(R.flags?G:$e(G))!==R.check){Z.msg="incorrect data check",R.mode=me;break}G=0,ee=0}R.mode=ue;case ue:if(R.wrap&&R.flags){for(;ee<32;){if(re===0)break e;re--,G+=oe[p++]<<ee,ee+=8}if(G!==(R.total&4294967295)){Z.msg="incorrect length check",R.mode=me;break}G=0,ee=0}R.mode=ve;case ve:nt=c;break e;case me:nt=m;break e;case we:return g;case Ce:default:return h}return Z.next_out=te,Z.avail_out=T,Z.next_in=p,Z.avail_in=re,R.hold=G,R.bits=ee,(R.wsize||he!==Z.avail_out&&R.mode<me&&(R.mode<ae||ie!==f))&&Oe(Z,Z.output,Z.next_out,he-Z.avail_out),_e-=Z.avail_in,he-=Z.avail_out,Z.total_in+=_e,Z.total_out+=he,R.total+=he,R.wrap&&he&&(Z.adler=R.check=R.flags?n(R.check,be,he,Z.next_out-he):t(R.check,be,he,Z.next_out-he)),Z.data_type=R.bits+(R.last?64:0)+(R.mode===$?128:0)+(R.mode===B||R.mode===A?256:0),(_e===0&&he===0||ie===f)&&nt===l&&(nt=u),nt}function ne(Z){if(!Z||!Z.state)return h;var ie=Z.state;return ie.window&&(ie.window=null),Z.state=null,l}function se(Z,ie){var R;return!Z||!Z.state||(R=Z.state,(R.wrap&2)===0)?h:(R.head=ie,ie.done=!1,l)}function fe(Z,ie){var R=ie.length,oe,be,p;return!Z||!Z.state||(oe=Z.state,oe.wrap!==0&&oe.mode!==I)?h:oe.mode===I&&(be=1,be=t(be,ie,R,0),be!==oe.check)?m:(p=Oe(Z,ie,R,R),p?(oe.mode=we,g):(oe.havedict=1,l))}return it.inflateReset=Ne,it.inflateReset2=Ye,it.inflateResetKeep=qe,it.inflateInit=Q,it.inflateInit2=Y,it.inflate=C,it.inflateEnd=ne,it.inflateGetHeader=se,it.inflateSetDictionary=fe,it.inflateInfo="pako inflate (from Nodeca project)",it}var Mn,js;function bm(){return js||(js=1,Mn={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8}),Mn}function wm(){const{useDynamicConfig:e}=wt(),{configValue:t,isDynamicConfigLoading:n}=e(At.creditAgentEnablement),r=He.getSignedInUser()?.userEmail;return{isAllowed:ce.useMemo(()=>{const a=Array.isArray(t?.allowedUserEmails)?t.allowedUserEmails:[];return r!=null&&a.includes(r)},[t,r]),isLoading:n}}function St(){const{isAllowed:e}=wm();return e?Tp:Ap}const Em={overlayWidth:new at(100,100,50)};function Ls(){const e=Be(),t=We(),n=lr(),r=Bt(),i=St(),a=Se(V=>qf(V)),o=a.uiState.selectedCustomerTenantId,d=ce.useMemo(()=>o?a.customers.find(V=>V.tenantId===o):void 0,[a.customers,o]),f=Se(V=>o?Df(V.aiAccountantCustomerState,V.userState,o):[]),v=a.customerViewStateByTenantId[o],s=v?.jobsFetchStatus??{fetchState:"Not-Started"},l=v?.jobsPageToken!=null;ce.useEffect(()=>{a.fetchState==="Completed"?t(xt(!1)):(a.fetchState==="Not-Started"||a.fetchState==="Error")&&t(vs())},[a.fetchState]);const c=V=>{const S=kt(V),I=Ft(V);Fe.trackCockpitTabClicked(I),e(`../../${S}`,{replace:!0})},y=(V,S,I,$)=>{t(Dt([V.tenantId])),t(an(S,I,$))},h=(V,S,I)=>{t(an(V,S,I))},m=(V,S)=>{t(Dt(a.unonboardedTenantIds)),t(an("retrain",V,S))},g=V=>{const S=a.selectedTenantIds,I=S.includes(V)?S.filter($=>$!==V):[...S,V];t(Dt(I))},u=V=>{if(V.length===0)return;const S=a.selectedTenantIds,I=new Set(S);if(V.every(z=>I.has(z))){const z=new Set(V);t(Dt(S.filter(X=>!z.has(X))))}else{const z=Array.from(new Set([...S,...V]));t(Dt(z))}},_=()=>{t(Dt([]))},E=V=>{t(Nf(V.companyId,V.tenantId))},w=V=>{V==="aiAccountant"&&t(vs())},b=(V,S)=>{t(Jt({sortKey:V,sortOrder:S}))},x=V=>{t(Jt({selectedCustomerTenantId:V.tenantId})),t(sn(V.tenantId))},O=()=>{t(Jt({selectedCustomerTenantId:""}))},P=V=>{t(Jt({filterText:V}))},M=(V,S)=>{t(Jt({filters:S}))},W=()=>{o&&t(sn(o,!0))};return U.jsxs(U.Fragment,{children:[U.jsx(Ip,{headerData:{allTabOptions:i,selectedTabOption:Et("aiAccountant")},headerActions:{onTabChange:c},aiAccountantPageData:{aiAccountantView:a},aiAccountantPageActions:{onAction:y,onBulkAction:h,onCancelOnboarding:E,onClearSelection:_,onCockpitReloadData:w,onColumnSortConfigChanged:b,onCustomerSelected:x,onEvaluateAll:m,onFilterTextChanged:P,onFiltersChange:M,onToggleAllVisible:u,onToggleTenantSelection:g}}),U.jsx(dr,{anchor:"right",open:d!=null,PaperProps:{style:{width:Em.overlayWidth.valuePercentage(n),boxShadow:"none"}},slotProps:{backdrop:{style:{backgroundColor:r.colors.black,opacity:.75,cursor:"pointer"}}},onClose:O,children:d!=null&&U.jsx(nd,{customer:d,hasMoreJobs:l,jobs:f,jobsFetchStatus:s,onAction:y,onCancelOnboarding:E,onClose:O,onLoadMoreJobs:W})})]})}function Sm(){const{tenantId:e=""}=ot(),t=Be(),n=We(),r=Se(c=>ch(c.aiAccountantCustomerState,c.userState)),i=Se(c=>qf(c)),a=r.find(c=>c.tenantId===e),o=i.customerViewStateByTenantId[e],d=Se(c=>Df(c.aiAccountantCustomerState,c.userState,e));if(ce.useEffect(()=>{n(sn(e))},[e,n]),a==null)return null;const f=(c,y,h,m)=>{n(Dt([c.tenantId])),n(an(y,h,m))},v=c=>{n(Nf(c.companyId,c.tenantId))},s=()=>{t("../")},l=()=>{n(sn(e,!0))};return U.jsx(nd,{customer:a,hasMoreJobs:o?.jobsPageToken!=null,jobs:d,jobsFetchStatus:o?.jobsFetchStatus??{fetchState:"Not-Started"},onAction:f,onCancelOnboarding:v,onClose:s,onLoadMoreJobs:l})}const dd=(e,t)=>{const n=[...e??[]];return n.push(t),n},Rm=e=>{const t=[...e??[]];return{poppedPathname:t.pop(),newStack:t}},Om=(e=2)=>{let t="../";for(let n=0;n<e;n++)t=`${t}../`;return t},ke=({state:e,element:t})=>He.isSignedIn()===!0?U.jsx(U.Fragment,{children:t}):U.jsx(ir,{to:"/signin/auth",replace:!0,state:{...e,message:"...",origin:window.location.pathname}});function Tm(){return U.jsxs(gt,{children:[U.jsx(Te,{path:"/",element:U.jsx(ke,{element:U.jsx(Ls,{})})}),U.jsx(Te,{path:"/detail/:tenantId",element:U.jsx(ke,{element:U.jsx(Sm,{})})}),U.jsx(Te,{path:"/*",element:U.jsx(ke,{element:U.jsx(Ls,{})})})]})}const Ut=()=>{const[e,t]=cd(),[n,r]=ce.useState(),i=ce.useRef(!1);return ce.useEffect(()=>{if(i.current===!0||!(e.has("thread_id")||e.has("entity_type")||e.has("company_id")))return;const o=xp(e);o!=null&&r(o);const d=new URLSearchParams(e);d.delete("thread_id"),d.delete("entity_type"),d.delete("company_id"),t(d,{replace:!0}),i.current=!0},[e,t]),n},Am={overlayWidth:new at(100,100,50)},{common:{strings:qs}}=fr.getLocalizedStrings();function Im(e,t){return{headerActions:{onTabChange:n=>{const r=kt(n),i=Ft(n);Fe.trackCockpitTabClicked(i),t.navigate(`../../${r}`,{replace:!0})},filterActions:{onFilterTextChanged:(n,r)=>{e(Er({uiState:{filterText:r}}))},onFiltersChange:(n,r)=>{r.categories!=null&&r.categoryCombinationOperator!=null&&Fe.trackHealthMonitorFiltersApplied({filterSelection:{condition:r.categories.map(i=>i.matchingOperator).join(qs.comma),logic:r.categoryCombinationOperator,parameter:r.categories.map(i=>i.field).join(qs.comma)}}),e(Er({uiState:{filters:r}}))}}},healthPageActions:{onRowClick:n=>{e(Ff(n))},onColumnSortConfigChanged:(n,r)=>{e(Er({uiState:{sortKey:n,sortOrder:r}}))},onCockpitReloadData:n=>{n==="healthMonitor"&&e(Mf())},onFiltersChange:n=>{e(Er({uiState:{filters:n}}))}}}}function xm(e,t){return{healthPageData:{healthView:t.healthView,managementView:t.managementView,mixpanelUrl:t.mixpanelHMUrl}}}const Cm=ze(xm,Im)(jp);function Fn({isDrawerOpen:e}){const t=Be(),n=We(),r=Bt(),i=lr(),{companyId:a}=ot(),[o,d]=cd(),[f,v]=ce.useState(!1),s=Ut(),l=St(),c=Se(b=>lh(b)),y=Se(b=>ur(b)),{additionalChurnFactors:h}=Se(b=>fh(b)),{selectedCompanyDetail:m,selectedCompanyId:g,localFormDataAndStatusByCompanyId:u}=c,_=Se(b=>b.companyViewState.zeniUsers.fetchState),E=Se(b=>b.companyHealthMetricConfigViewState);if(ce.useEffect(()=>{const b=x=>x==="Not-Started"||x==="Error";c.fetchState==="Completed"?n(xt(!1)):b(c.fetchState)&&(n(Mf()),b(_)&&n(Ct()),b(E.fetchState)&&n(dh()))},[c.fetchState,E.fetchState]),ce.useEffect(()=>{a!=null&&c.fetchState==="Completed"&&o.has("utm_source")===!0&&(n(Ff(a)),m!=null&&(Cp(),Fe.trackCockpitHealthMonitorNotificationAlertClicked({companyId:m.companyInfo.companyId,companyName:m.companyInfo.name,churnProbability:m.companyHealthMetric.churnProbabilityPercentage??null}),v(!0),o.delete("utm_source"),d(o)))},[c.fetchState,m?.companyInfo.companyId,m?.companyInfo.name]),He.getSignedInUser()==null)throw Error("Can't access Health Monitor page without signing in...");return U.jsxs(U.Fragment,{children:[e===!0||g!=null&&m!=null?U.jsx(dr,{anchor:"right",open:g!=null,PaperProps:{style:{width:Am.overlayWidth.valuePercentage(i),boxShadow:"none"}},slotProps:{backdrop:{style:{backgroundColor:r.colors.black,opacity:.75,cursor:"pointer"}}},onClose:()=>n(ys()),children:U.jsx(kp,{roomId:`cockpit_${g}`,autoConnect:!0,children:U.jsx(Pp,{onSaveClick:()=>{g!=null&&n(ph(g))},onSaveChangesToLocalStore:b=>{c.selectedCompanyId!=null&&n(hh({companyId:c.selectedCompanyId,updatedLocalData:b}))},localData:u?.companyHealthMetricLocalData??{netPromoterScore:void 0,externalProductServiceExposure:void 0,additionalChurnFactors:{increasingChurnProbability:[],decreasingChurnProbability:[]}},companyHealthMetricViewSelector:c,onCloseDrawer:()=>n(ys()),analytics:Fe,urlSource:f,additionalChurnFactorsOptions:h})})}):null,U.jsx(Cm,{headerData:{allTabOptions:l,selectedTabOption:Et("healthMonitor")},initialOpenThreadRequest:s??void 0,healthView:c,managementView:y,navigate:t,mixpanelHMUrl:gn.mixpanelHMUrl})]})}function km(){return U.jsxs(gt,{children:[U.jsx(Te,{path:"/companies/:companyId",element:U.jsx(ke,{element:U.jsx(Fn,{isDrawerOpen:!0})})}),U.jsx(Te,{path:"/",element:U.jsx(ke,{element:U.jsx(Fn,{})})}),U.jsx(Te,{path:"/*",element:U.jsx(ke,{element:U.jsx(Fn,{})})})]})}const Pm={drawerLeftMargin:new at(0,0,240)};function mr(e){const{isOpen:t,drawerLeftMargin:n,children:r,onClose:i}=e,a=lr(),o=n?.valuePx(a)??Pm.drawerLeftMargin.valuePx(a),d=Bt();return U.jsx(dr,{anchor:"right",open:t,PaperProps:{style:{width:`calc(100% - ${o})`}},slotProps:{backdrop:{style:{backgroundColor:d.colors.black,opacity:.8,cursor:"pointer"}}},onClose:i,children:r})}const jm=({fetchState:e})=>e==="In-Progress"||e==="Not-Started"?U.jsx(Lm,{children:U.jsx(vn,{size:"ExtraLarge",start:!0})}):null,Lm=tt.div`
|
|
3
3
|
display: flex;
|
|
4
4
|
width: 100%;
|
|
5
5
|
height: 100%;
|
|
@@ -177,4 +177,4 @@ Found: ${n.toString().split(`
|
|
|
177
177
|
`;function B_(){return U.jsxs(gt,{children:[U.jsx(Te,{path:"/report/:companyId",element:U.jsx(ke,{element:U.jsx(qo,{})})}),U.jsx(Te,{path:"/warnings/:companyId",element:U.jsx(ke,{element:U.jsx(qo,{})})}),U.jsx(Te,{path:"/*",element:U.jsx(ke,{element:U.jsx(qo,{})})})]})}function U_(e,t){const n=Qf(e,t.tenantId),r=n.estimateStatus?.fetchState!=="In-Progress"?void 0:"readonly";return{localData:n,isDisabled:r}}function V_(e,t){const{tenantId:n,companyId:r,location:i,navigate:a}=t;return{onSubscriptionDetailsChanged:o=>{const{addPlan:d,invoiceOption:f}=o,{subscriptionPlan:v,recurringAddOns:s,coupon:l}=d,c={subscriptionPlanId:v.selectedOption??"",subscriptionAddOnIds:s.filter(y=>y.selectedOption!=null).map(y=>y.selectedOption),subscriptionCouponIds:l.selectedOption!=null?[l.selectedOption]:[],invoiceImmediately:f.invoicingOption!=null};d.planStartDate!=null&&(c.startDate=on(d.planStartDate.toString())),e(ed({tenantId:n,subscriptionData:c}))},onEstimateSuccess:()=>{const o=dd(i.state?.pathnameStackToGoBack,i.pathname);a(`../tenants/${n}/companies/${r}/summary`,{state:{pathnameStackToGoBack:o}})},onReviewClick:()=>{e(up(n))},onBackClick:()=>{a(`../tenants/${n}/companies/${r}`)},onResetClick:()=>{e(Wo(n))}}}const $_=ze(U_,V_)(Yp),z_=e=>{const{tenantId:t,companyId:n,location:r,navigate:i}=e;return U.jsx($_,{tenantId:t,companyId:n,location:r,navigate:i})};function G_(e,t){const{companyId:n,tenantId:r}=t,i=lp(e,n,r),a=i.fetchState!=="In-Progress";return{subscriptionDetailView:i,canUpdate:a}}function H_(e,t){const{tenantId:n,location:r,navigate:i}=t;return{onUpdateOrAddPlanClick:a=>{e(Wo(n,a)),e(fp()),e(dp()),e(hp()),a!=null?i(`${r.pathname}/update`):i(`${r.pathname}/add`)},onCloseClick:()=>{i("../")}}}const Z_=ze(G_,H_)(Jp),W_=e=>{const{tenantId:t,companyId:n,location:r,navigate:i}=e,a=We(),[o,d]=ce.useState(!1),f=Se(v=>v.subscriptionViewState.subscriptionDetailsByCompanyId[n]?.fetchStatus);return ce.useEffect(()=>{!o&&(f==null||f?.fetchState==="Not-Started")&&(d(!0),a(cp(n)))},[o,f,n,a]),ce.useEffect(()=>{o&&f!=null&&f?.fetchState==="Error"&&i("../subscription")},[o,f]),U.jsx(Z_,{tenantId:t,companyId:n,location:r,navigate:i})};function Y_(e,t){return{subscriptionEstimateData:pp(e,t.tenantId)}}function J_(e,t){const{tenantId:n,companyId:r,location:i,navigate:a}=t,o=()=>{const d=Rm(i.state?.pathnameStackToGoBack),f=d.poppedPathname??Om(1);a(f,{state:{pathnameStackToGoBack:d.newStack}})};return{onBackClick:()=>{o()},onCancelClick:()=>{o()},onConfirmClick:()=>{e(mp(n))},onConfirmSuccess:()=>{a(`../tenants/${n}/companies/${r}`)}}}const K_=ze(Y_,J_)(Kp),X_=e=>{const{tenantId:t,companyId:n,location:r,navigate:i}=e;return U.jsx(K_,{companyId:n,tenantId:t,location:r,navigate:i})};function Q_(e,t){const n=Qf(e,t.tenantId),r=n.estimateStatus.fetchState!=="In-Progress"?void 0:"readonly";return{localData:n,isDisabled:r}}function eb(e,t){const{tenantId:n,companyId:r,location:i,navigate:a}=t;return{onSubscriptionDetailsChanged:o=>{const{updatePlan:d,applyChanges:f}=o,{subscriptionPlan:v,recurringAddOns:s,coupon:l}=d,c={subscriptionPlanId:v.selectedOption??"",subscriptionAddOnIds:s.filter(y=>y.selectedOption!=null).map(y=>y.selectedOption),subscriptionCouponIds:l.selectedOption!=null?[l.selectedOption]:[],invoiceImmediately:!0,applyEndOfTerm:f.changeType==="applyEndOfTerm",shouldProrate:f.shouldProrate};e(ed({tenantId:n,subscriptionData:c}))},onEstimateSuccess:()=>{const o=dd(i.state?.pathnameStackToGoBack,i.pathname);a(`../tenants/${n}/companies/${r}/summary`,{state:{pathnameStackToGoBack:o}})},onReviewClick:()=>{e(gp(n))},onBackClick:()=>{a(`../tenants/${n}/companies/${r}`)},onResetClick:o=>{e(Wo(n,o.subscription.subscription.subscriptionId))}}}const tb=ze(Q_,eb)(Xp),rb=e=>{const{tenantId:t,companyId:n,location:r,navigate:i}=e;return U.jsx(tb,{tenantId:t,companyId:n,location:r,navigate:i})},uh=["add","update","summary"],nb=e=>yp(e,uh),ib=e=>vp(e,uh),ab=()=>{const[e,t]=ce.useState(!0),{tenantId:n,companyId:r,updatePageType:i}=ot(),a=Be(),o=Se(f=>n!=null?f.subscriptionViewState.subscriptionUpdateViewDataByTenantId[n]:null);if(He.getSignedInUser()==null)throw Error("Can't access subscription details drawer without signing in...");return ce.useEffect(()=>{(o==null&&i!=null||ib(i??"")==null)&&a(`../tenants/${n}/companies/${r}`)},[o]),U.jsx(mr,{isOpen:e,onClose:()=>{t(!1),a("../subscription")},children:U.jsx(sb,{children:U.jsx(ob,{tenantId:n,companyId:r,updatePageType:i!=null?nb(i):void 0})})})},ob=({tenantId:e,companyId:t,updatePageType:n})=>{const r=Be(),i=Jo(),a={tenantId:e,companyId:t,navigate:r,location:i};if(n==null)return U.jsx(W_,{...a});switch(n){case"update":return U.jsx(rb,{...a});case"add":return U.jsx(z_,{...a});case"summary":return U.jsx(X_,{...a});default:return console.error("Subscription Update Page - Invalid Url"),U.jsx(ir,{to:"/",replace:!0})}},sb=tt(Zt)`
|
|
178
178
|
display: flex;
|
|
179
179
|
min-height: 100%;
|
|
180
|
-
`;function ub(e,t){return{headerActions:{onTabChange:n=>{const r=kt(n),i=Ft(n);Fe.trackCockpitTabClicked(i),t.navigate(`../../${r}`,{replace:!0})},filterActions:{onFilterTextChanged:(n,r)=>{e(Gt({filterText:r}))},onFiltersChange:(n,r)=>{e(Gt({filters:r}))}}},subscriptionPageActions:{onColumnSortConfigChanged:(n,r)=>{e(Gt({sortKey:n,sortOrder:r}))},onCollapseToggled:(n,r)=>{e(Gt({isRowCollapseToggled:{companyId:n,isCollapsed:r}}))},onScroll:n=>{e(Gt({scrollYOffset:n}))},changeHandlers:(n,r)=>{const i=fb(r);Object.keys(i).length>0&&e($o(n,i))},onCompanyNameClicked:n=>window.open(`/${n.company.company.companyInfo.primaryEmailDomain}/dashboard`),onPassportIconClicked:n=>window.open(`/${n.company.company.companyInfo.primaryEmailDomain}/dashboard/company_details`),onPlanOrAddOnClicked:(n,r)=>{e(bp({tenantId:r})),t.navigate(`../tenants/${r}/companies/${n}`)},onFiltersChange:(n,r)=>{e(Gt({filters:r}))},onCockpitReloadData:n=>{n==="subscription"&&e(Ho())}}}}function cb(e,t){return{subscriptionPageData:{loggedInUser:t.signedInUser,subscriptionView:t.subscriptionView}}}const lb=ze(cb,ub)(Qp);function Do({isDrawerOpen:e}){const t=Be(),n=We(),r=Ut(),i=St(),a=Se(f=>_p(f)),o=Se(f=>f.companyViewState.zeniUsers.fetchState);ce.useEffect(()=>{a.fetchState==="Completed"?n(xt(!1)):(a.fetchState==="Not-Started"||a.fetchState==="Error")&&(n(Ho()),(o==="Not-Started"||o==="Error")&&n(Ct()))},[a.fetchState]);const d=He.getSignedInUser();return U.jsxs(U.Fragment,{children:[e===!0?U.jsx(ab,{}):null,U.jsx(lb,{headerData:{allTabOptions:i,selectedTabOption:Et("subscription")},initialOpenThreadRequest:r??void 0,signedInUser:d,subscriptionView:a,navigate:t})]})}const fb=e=>{const{users:t}=e;return t?{users:t}:{}};function db(){return U.jsxs(gt,{children:[U.jsx(Te,{path:"/tenants/:tenantId/companies/:companyId",element:U.jsx(ke,{element:U.jsx(Do,{isDrawerOpen:!0})})}),U.jsx(Te,{path:"/tenants/:tenantId/companies/:companyId/:updatePageType",element:U.jsx(ke,{element:U.jsx(Do,{isDrawerOpen:!0})})}),U.jsx(Te,{path:"/*",element:U.jsx(ke,{element:U.jsx(Do,{})})})]})}function hb(e,t){const{navigate:n}=t;return{headerActions:{onTabChange:r=>{const i=kt(r);n(`../../${i}`,{replace:!0})},filterActions:{onFilterTextChanged:(r,i)=>{e(Es({filterText:i}))},onFiltersChange:(r,i)=>{e(Es({filters:i}))}}},taskManagerPageActions:{onRowClick:(r,i)=>{window.open(`/${r}/tasks/${i}`)},onCockpitReloadData:r=>{r==="taskManager"&&e(No(0,"dueDate","descending",!1))},onFetchTaskManagerView:(r,i,a,o,d,f)=>{e(No(r,i,a,o,d,f))}}}}function pb(e,t){return{isBirdsEyeViewEnabled:t.isBirdsEyeViewEnabled,taskManagerPageData:{companyTaskManagerView:t.companyTaskManagerView}}}const mb=ze(pb,hb)(em);function jf(){const e=Be(),t=We(),n=Ut(),r=St(),{useFeatureGate:i}=wt(),{isFeatureEnabled:a}=i(yn.isBirdsEyeViewEnabled),o=Se(l=>wp(l)),d=Se(l=>Ep(l)),f=Se(l=>l.companyViewState.zeniUsers.fetchState);if(ce.useEffect(()=>{o.fetchState==="Completed"?t(xt(!1)):o.fetchState==="Not-Started"&&(t(No(0,"dueDate","descending",!1)),t(Sp()),(f==="Not-Started"||f==="Error")&&t(Ct()))},[o.fetchState]),ce.useEffect(()=>{a&&(o.metricsFetchState==="Not-Started"||o.metricsFetchState==="Error")&&t(Rp())},[a,o.metricsFetchState]),He.getSignedInUser()==null)throw Error("Can't access task manager page without signing in...");const s=ce.useMemo(()=>({allTabOptions:r,selectedTabOption:Et("taskManager")}),[r]);return U.jsx(mb,{headerData:s,companyTaskManagerView:o,isBirdsEyeViewEnabled:a,initialOpenThreadRequest:n,navigate:e,reviewCount:d})}function gb(){return U.jsxs(gt,{children:[U.jsx(Te,{path:"/",element:U.jsx(ke,{element:U.jsx(jf,{})})}),U.jsx(Te,{path:"/*",element:U.jsx(ke,{element:U.jsx(jf,{})})})]})}const vb=ud(()=>td(()=>import("./CreditAgentRoutes-
|
|
180
|
+
`;function ub(e,t){return{headerActions:{onTabChange:n=>{const r=kt(n),i=Ft(n);Fe.trackCockpitTabClicked(i),t.navigate(`../../${r}`,{replace:!0})},filterActions:{onFilterTextChanged:(n,r)=>{e(Gt({filterText:r}))},onFiltersChange:(n,r)=>{e(Gt({filters:r}))}}},subscriptionPageActions:{onColumnSortConfigChanged:(n,r)=>{e(Gt({sortKey:n,sortOrder:r}))},onCollapseToggled:(n,r)=>{e(Gt({isRowCollapseToggled:{companyId:n,isCollapsed:r}}))},onScroll:n=>{e(Gt({scrollYOffset:n}))},changeHandlers:(n,r)=>{const i=fb(r);Object.keys(i).length>0&&e($o(n,i))},onCompanyNameClicked:n=>window.open(`/${n.company.company.companyInfo.primaryEmailDomain}/dashboard`),onPassportIconClicked:n=>window.open(`/${n.company.company.companyInfo.primaryEmailDomain}/dashboard/company_details`),onPlanOrAddOnClicked:(n,r)=>{e(bp({tenantId:r})),t.navigate(`../tenants/${r}/companies/${n}`)},onFiltersChange:(n,r)=>{e(Gt({filters:r}))},onCockpitReloadData:n=>{n==="subscription"&&e(Ho())}}}}function cb(e,t){return{subscriptionPageData:{loggedInUser:t.signedInUser,subscriptionView:t.subscriptionView}}}const lb=ze(cb,ub)(Qp);function Do({isDrawerOpen:e}){const t=Be(),n=We(),r=Ut(),i=St(),a=Se(f=>_p(f)),o=Se(f=>f.companyViewState.zeniUsers.fetchState);ce.useEffect(()=>{a.fetchState==="Completed"?n(xt(!1)):(a.fetchState==="Not-Started"||a.fetchState==="Error")&&(n(Ho()),(o==="Not-Started"||o==="Error")&&n(Ct()))},[a.fetchState]);const d=He.getSignedInUser();return U.jsxs(U.Fragment,{children:[e===!0?U.jsx(ab,{}):null,U.jsx(lb,{headerData:{allTabOptions:i,selectedTabOption:Et("subscription")},initialOpenThreadRequest:r??void 0,signedInUser:d,subscriptionView:a,navigate:t})]})}const fb=e=>{const{users:t}=e;return t?{users:t}:{}};function db(){return U.jsxs(gt,{children:[U.jsx(Te,{path:"/tenants/:tenantId/companies/:companyId",element:U.jsx(ke,{element:U.jsx(Do,{isDrawerOpen:!0})})}),U.jsx(Te,{path:"/tenants/:tenantId/companies/:companyId/:updatePageType",element:U.jsx(ke,{element:U.jsx(Do,{isDrawerOpen:!0})})}),U.jsx(Te,{path:"/*",element:U.jsx(ke,{element:U.jsx(Do,{})})})]})}function hb(e,t){const{navigate:n}=t;return{headerActions:{onTabChange:r=>{const i=kt(r);n(`../../${i}`,{replace:!0})},filterActions:{onFilterTextChanged:(r,i)=>{e(Es({filterText:i}))},onFiltersChange:(r,i)=>{e(Es({filters:i}))}}},taskManagerPageActions:{onRowClick:(r,i)=>{window.open(`/${r}/tasks/${i}`)},onCockpitReloadData:r=>{r==="taskManager"&&e(No(0,"dueDate","descending",!1))},onFetchTaskManagerView:(r,i,a,o,d,f)=>{e(No(r,i,a,o,d,f))}}}}function pb(e,t){return{isBirdsEyeViewEnabled:t.isBirdsEyeViewEnabled,taskManagerPageData:{companyTaskManagerView:t.companyTaskManagerView}}}const mb=ze(pb,hb)(em);function jf(){const e=Be(),t=We(),n=Ut(),r=St(),{useFeatureGate:i}=wt(),{isFeatureEnabled:a}=i(yn.isBirdsEyeViewEnabled),o=Se(l=>wp(l)),d=Se(l=>Ep(l)),f=Se(l=>l.companyViewState.zeniUsers.fetchState);if(ce.useEffect(()=>{o.fetchState==="Completed"?t(xt(!1)):o.fetchState==="Not-Started"&&(t(No(0,"dueDate","descending",!1)),t(Sp()),(f==="Not-Started"||f==="Error")&&t(Ct()))},[o.fetchState]),ce.useEffect(()=>{a&&(o.metricsFetchState==="Not-Started"||o.metricsFetchState==="Error")&&t(Rp())},[a,o.metricsFetchState]),He.getSignedInUser()==null)throw Error("Can't access task manager page without signing in...");const s=ce.useMemo(()=>({allTabOptions:r,selectedTabOption:Et("taskManager")}),[r]);return U.jsx(mb,{headerData:s,companyTaskManagerView:o,isBirdsEyeViewEnabled:a,initialOpenThreadRequest:n,navigate:e,reviewCount:d})}function gb(){return U.jsxs(gt,{children:[U.jsx(Te,{path:"/",element:U.jsx(ke,{element:U.jsx(jf,{})})}),U.jsx(Te,{path:"/*",element:U.jsx(ke,{element:U.jsx(jf,{})})})]})}const vb=ud(()=>td(()=>import("./CreditAgentRoutes-moJLbhEX.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15])));let Lf=!1;const yb=ud(()=>td(()=>Promise.resolve().then(()=>Km),void 0));function _b(){const e=He.getSignedInUser(),t=Bt().mode;return ce.useEffect(()=>{He.isSignedIn()&&!Lf&&e!=null&&(tm(e,t),Lf=!0)},[e]),U.jsxs(gt,{children:[U.jsx(Te,{path:"/ai-accountant/*",element:U.jsx(Tm,{})}),U.jsx(Te,{path:"/management/*",element:U.jsx(ig,{})}),U.jsx(Te,{path:"/subscription/*",element:U.jsx(db,{})}),U.jsx(Te,{path:"/onboarding/*",element:U.jsx(g_,{})}),U.jsx(Te,{path:"/portfolio/*",element:U.jsx(b_,{})}),U.jsx(Te,{path:"/audit/*",element:U.jsx(B_,{})}),U.jsx(Te,{path:"/reconciliation/*",element:U.jsx(C_,{})}),U.jsx(Te,{path:"/health-monitor/*",element:U.jsx(km,{})}),U.jsx(Te,{path:"/task-manager/*",element:U.jsx(gb,{})}),U.jsx(Te,{path:"/credit-agent/*",element:U.jsx(vb,{})}),U.jsx(Te,{path:"/*",element:U.jsx(yb,{})})]})}const kb=Object.freeze(Object.defineProperty({__proto__:null,default:_b},Symbol.toStringTag,{value:"Module"}));export{ke as P,kb as S,wm as u};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{j as d}from"./liveblocks-CyhgjAmM.js";import{a as f,R as S,n as m}from"./sentry-CMq56eOF.js";import{n as I,i as w,g,u as h,N as b,h as y}from"./core-B3-F7eBr.js";import{z as l,q as T,l as v,K as C,a9 as E,v as u}from"./index-ovt9Xz6x.js";import{T9 as U,Ta as L,Tb as x,Tc as z,bm as p}from"./zeni-epic-state-XxVgcdSL.js";import{f as D}from"./analyticsHelper-9zdI2_60.js";import{u as A}from"./mui-DF3cXn7x.js";import"./recharts-mBO0sQiJ.js";import"./analytics-D6rU2phb.js";import"./utils-DegUrf4b.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},o=new e.Error().stack;o&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[o]="45b66bb6-1cdd-47c0-9142-ee58742e36ce",e._sentryDebugIdIdentifier="sentry-dbid-45b66bb6-1cdd-47c0-9142-ee58742e36ce")}catch{}})();function N(e){const o=e.tenantState.fetchState,i=e.tenantState.sendEmailMagicLinkFetchState;return{googleClientId:u.googleClientId,microsoftClientId:u.microsoftClientId,signInError:e.tenantState.error?.error,fetchState:o,sendMagicLinkStatus:i,showEmailLogin:!1}}function k(e,o){const{location:i,navigate:r}=o;return console.warn(JSON.stringify(window.location)),{onOAuthError:(n,t)=>{m({message:`OAuth error from provider ${t} with error ${n}`,level:"error",tags:{authProvider:t,errorType:"zeni.login.error"},extra:{error:n,windowLocation:window.location.href}})},onOAuthSuccess:(n,t)=>{const s=t==="google"?window.location.origin:window.location.origin+window.location.pathname;e(z({authCode:n,oauthProvider:t,appType:"web",redirectUri:p(s),sourceUri:p(i.state!=null?i.state.origin:"")}))},getSignedInUser:()=>l.getSignedInUser(),onSignedInCallback:()=>{const n=i.state?.origin;n&&n!=="/"?r(n,{replace:!0}):window.open(window.location.origin,"_self")},clearSignInError:()=>{e(x())}}}const P=y(N,k)(E),_=S.memo(P);function J(){const e=I(),o=w(),i=l.getSignedInUser(),r=g(a=>a.tenantState.fetchState),n=g(a=>a.tenantState.signInState),t=g(a=>a.tenantState.loggedInUser),s=A().mode,c=h();if(f.useEffect(()=>{n==="In-Progress"&&r==="Completed"&&t?.zeniSessionId!=null&&(l.saveSignedInUserWithSession(t,t.zeniSessionId),U(t.userId,t.zeniSessionId),e(L("Completed")),T.updateAppLocaleID("en"),D(t,s),setTimeout(()=>{v.trackLogin(C.Event.loginSuccess,t.authProvider??"google")},2e3))},[]),n==="In-Progress"&&r==="Completed"&&t?.zeniSessionId!=null||i!=null){const a=c.state?.origin??"/";return d.jsx(b,{to:a,state:{...c.state,origin:""}})}else return d.jsx(_,{navigate:o,location:c})}export{J as default};
|
|
@@ -0,0 +1,197 @@
|
|
|
1
|
+
import{y as t,n,a as U,W as re,N as b,b as le,i as ne,q as de,e as ce,ab as pe,ac as me,ad as ue,ae as be,k as xe}from"./index-ovt9Xz6x.js";import{a as i}from"./sentry-CMq56eOF.js";import{n as N,u as ge}from"./mui-DF3cXn7x.js";import{L as he,Z as fe,e as H,f as D,g as C,F as Ne,h as Ee,J as Ce,i as ye,j as ke,X as je,k as $e,l as Le,m as Te,K as ve,q as Oe,o as ee,n as l,s as F,t as P,p as te,z as De,u as Me,v as Ae,w as _e,x as Re,y as we,Q as Se,A as Ie,B as He,C as Fe,D as Pe,E as Ue}from"./underline-BNKkE4Fr-DOksg_Rq.js";import{r as ze}from"./core-B3-F7eBr.js";import"./liveblocks-CyhgjAmM.js";import"./recharts-mBO0sQiJ.js";import"./zeni-epic-state-XxVgcdSL.js";import"./analytics-D6rU2phb.js";import"./utils-DegUrf4b.js";import"./lexical-C9tRwoBl.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},o=new e.Error().stack;o&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[o]="5702a701-f751-421e-b8f3-3cbe4fde8f6a",e._sentryDebugIdIdentifier="sentry-dbid-5702a701-f751-421e-b8f3-3cbe4fde8f6a")}catch{}})();const Ge=e=>e.replace(pe,"&").replace(me,"<").replace(ue,">"),We=new Set(["ADDRESS","ARTICLE","ASIDE","BLOCKQUOTE","DD","DIV","DL","DT","FIGURE","FOOTER","H1","H2","H3","H4","H5","H6","HEADER","LI","MAIN","NAV","OL","P","PRE","SECTION","TABLE","TBODY","TD","TFOOT","TH","THEAD","TR","UL"]),S=e=>e!=null&&e.nodeType===Node.ELEMENT_NODE&&We.has(e.tagName),Be=e=>{const{previousSibling:o,nextSibling:a}=e,r=o==null||S(o),s=a==null||S(a);return r&&s&&(S(o)||S(a))},Ke=e=>{const o=e.createTreeWalker(e.body,NodeFilter.SHOW_TEXT),a=[];let r=o.nextNode();for(;r!=null;)a.push(r),r=o.nextNode();a.forEach(s=>{if(s.parentNode==null||s.textContent==null)return;const c=s.textContent.replace(be,`
|
|
2
|
+
`);if(!c.includes(`
|
|
3
|
+
`)||c.trim()===""&&Be(s))return;const p=e.createDocumentFragment();c.split(`
|
|
4
|
+
`).forEach((m,g)=>{g>0&&p.appendChild(e.createElement("br")),m!==""&&p.appendChild(e.createTextNode(m))}),s.parentNode.replaceChild(p,s)})},Xe=200,Ve=(e,o)=>{if(e.delete(o),e.add(o),e.size>Xe){const a=e.values().next().value;a!=null&&e.delete(a)}},qe=(e,o,a)=>e!==o&&!a.has(e),I=1,{taskManagement:{taskDetail:{descriptionEditorTooltip:k}},common:{texts:{bold:z,italic:G,underline:W,link:B,bulletList:K,indent:X,outdent:V,undo:q,redo:Q}}}=de.getLocalizedStrings();function J(e,o){o===null?(e.style.opacity="0",e.style.top="-1000px",e.style.left="-1000px"):(e.style.opacity="1",e.style.top=`${o.top+o.height+window.pageYOffset+10}px`,e.style.left=`${o.left+window.pageXOffset-e.offsetWidth/2+o.width/2}px`)}function oe(e){const o=e.anchor,a=e.focus,r=e.anchor.getNode(),s=e.focus.getNode();return r===s?r:e?.isBackward()?P.$isAtNodeEnd(a)?r:s:P.$isAtNodeEnd(o)?s:r}function Qe({editor:e}){const o=ge(),a=i.useRef(null),r=i.useRef(null),s=i.useRef(!1),[c,p]=i.useState(""),[m,g]=i.useState(!1),[L,E]=i.useState(null),h=i.useCallback(()=>{const d=l.$getSelection();if(l.$isRangeSelection(d)){const $=oe(d),f=$.getParent();C.$isLinkNode(f)?p(f.getURL()):C.$isLinkNode($)?p($.getURL()):p("")}const M=a.current,j=window.getSelection(),A=document.activeElement;if(M===null)return;const T=e.getRootElement();if(d!==null&&j!=null&&!j.isCollapsed&&T!==null&&T.contains(j.anchorNode)){const $=j.getRangeAt(0);let f;if(j.anchorNode===T){let v=T;for(;v.firstElementChild!=null;)v=v.firstElementChild;f=v.getBoundingClientRect()}else f=$.getBoundingClientRect();s.current||J(M,f),E(d)}else(!A||A.className!=="link-input")&&(J(M,null),E(null),g(!1),p(""));return!0},[e]);return i.useEffect(()=>F.mergeRegister(e.registerUpdateListener(({editorState:d})=>{d.read(()=>{h()})}),e.registerCommand(l.SELECTION_CHANGE_COMMAND,()=>(h(),!0),I)),[e,h]),i.useEffect(()=>{e.getEditorState().read(()=>{h()})},[e,h]),i.useEffect(()=>{m&&r.current!=null&&r.current?.focus()},[m]),t.jsx(it,{ref:a,children:m?t.jsx("input",{ref:r,className:"link-input",value:c,onChange:d=>{p(d.target.value)},onKeyDown:d=>{d.key==="Enter"?(d.preventDefault(),L!==null&&(c!==""&&e.dispatchCommand(C.TOGGLE_LINK_COMMAND,c),g(!1))):d.key==="Escape"&&(d.preventDefault(),g(!1))}}):t.jsxs(st,{className:"link-input",children:[t.jsx(rt,{href:c,target:"_blank",rel:"noopener noreferrer",children:c}),t.jsx(lt,{className:"link-edit",type:"button",tabIndex:0,onMouseDown:d=>d.preventDefault(),onClick:()=>{g(!0)},children:t.jsx(ce,{style:{width:n.sp3,height:n.sp3,color:o.colors.primary}})})]})})}function Je({onChange:e}){const[o]=ee.useLexicalComposerContext(),a=i.useRef(null),[r,s]=i.useState(!1),[c,p]=i.useState(!1),[m,g]=i.useState("paragraph"),[,L]=i.useState(!1),[E,h]=i.useState(!1),[d,M]=i.useState(!1),[j,A]=i.useState(!1),[T,$]=i.useState(!1),f=i.useCallback(()=>{const u=l.$getSelection();if(l.$isRangeSelection(u)){const O=u.anchor.getNode(),y=O.getKey()==="root"?O:O.getTopLevelElementOrThrow(),_=y.getKey();if(o.getElementByKey(_)!==null)if(D.$isListNode(y)){const w=F.$getNearestNodeOfType(O,D.ListNode),se=w?w.getTag():y.getTag();g(se)}else{const w=H.$isHeadingNode(y)?y.getTag():y.getType();g(w)}$(u.hasFormat("bold")),M(u.hasFormat("italic")),A(u.hasFormat("underline")),L(P.$isParentElementRTL(u));const R=oe(u),ie=R.getParent();C.$isLinkNode(ie)||C.$isLinkNode(R)?h(!0):h(!1)}},[o]);i.useEffect(()=>F.mergeRegister(o.registerUpdateListener(({editorState:u})=>{u.read(()=>{f()})}),o.registerCommand(l.SELECTION_CHANGE_COMMAND,()=>(f(),!1),I),o.registerCommand(l.CAN_UNDO_COMMAND,u=>(s(u),!1),I),o.registerCommand(l.CAN_REDO_COMMAND,u=>(p(u),!1),I)),[o,f]),i.useEffect(()=>o.registerUpdateListener(({dirtyElements:u,dirtyLeaves:O,editorState:y,tags:_})=>{_.has("history-merge")||_.has("initial-content")||u.size===0&&O.size===0||y.read(()=>{const R=te.$generateHtmlFromNodes(o,null);e(R)})}),[o,e]);const v=i.useCallback(()=>{E?o.dispatchCommand(C.TOGGLE_LINK_COMMAND,null):o.dispatchCommand(C.TOGGLE_LINK_COMMAND,"https://")},[o,E]),ae=()=>{m!=="ul"?o.dispatchCommand(D.INSERT_UNORDERED_LIST_COMMAND,void 0):o.dispatchCommand(D.REMOVE_LIST_COMMAND,void 0)};return t.jsxs(at,{className:"toolbar",ref:a,children:[t.jsxs(Y,{children:[t.jsx(b,{placement:"bottom",title:z,children:t.jsx(x,{type:"button",onClick:()=>o.dispatchCommand(l.FORMAT_TEXT_COMMAND,"bold"),className:"toolbar-item spaced "+(T?"active":""),"data-testid":"task-description-editor-toolbar-bold","aria-label":z,children:t.jsx(De,{className:"format"})})}),t.jsx(b,{placement:"bottom",title:G,children:t.jsx(x,{type:"button",onClick:()=>o.dispatchCommand(l.FORMAT_TEXT_COMMAND,"italic"),className:"toolbar-item spaced "+(d?"active":""),"data-testid":"task-description-editor-toolbar-italic","aria-label":G,children:t.jsx(Me,{className:"format"})})}),t.jsx(b,{placement:"bottom",title:W,children:t.jsx(x,{type:"button",onClick:()=>o.dispatchCommand(l.FORMAT_TEXT_COMMAND,"underline"),className:"toolbar-item spaced "+(j?"active":""),"data-testid":"task-description-editor-toolbar-underline","aria-label":W,children:t.jsx(Ae,{className:"format"})})}),t.jsx(b,{placement:"bottom",title:B,children:t.jsx(x,{type:"button",onClick:v,className:"toolbar-item spaced "+(E?"active":""),"data-testid":"task-description-editor-toolbar-link","aria-label":B,children:t.jsx(_e,{className:"format"})})}),E&&ze.createPortal(t.jsx(Qe,{editor:o}),document.body),t.jsx(Z,{}),t.jsx(b,{placement:"bottom",title:K,children:t.jsx(x,{type:"button",onClick:ae,className:"toolbar-item spaced "+(m==="ul"?"active":""),"data-testid":"task-description-editor-toolbar-bulletList","aria-label":K,children:t.jsx(Re,{className:"format"})})}),t.jsx(Z,{}),t.jsx(b,{placement:"bottom",title:k.leftAlign,children:t.jsx(x,{type:"button",onClick:()=>o.dispatchCommand(l.FORMAT_ELEMENT_COMMAND,"left"),className:"toolbar-item spaced","data-testid":"task-description-editor-toolbar-leftAlign","aria-label":k.leftAlign,children:t.jsx(we,{className:"format"})})}),t.jsx(b,{placement:"bottom",title:k.centerAlign,children:t.jsx(x,{type:"button",onClick:()=>o.dispatchCommand(l.FORMAT_ELEMENT_COMMAND,"center"),className:"toolbar-item spaced","data-testid":"task-description-editor-toolbar-centerAlign","aria-label":k.centerAlign,children:t.jsx(Se,{className:"format"})})}),t.jsx(b,{placement:"bottom",title:k.rightAlign,children:t.jsx(x,{type:"button",onClick:()=>o.dispatchCommand(l.FORMAT_ELEMENT_COMMAND,"right"),className:"toolbar-item spaced","data-testid":"task-description-editor-toolbar-rightAlign","aria-label":k.rightAlign,children:t.jsx(Ie,{className:"format"})})}),t.jsx(b,{placement:"bottom",title:k.justifyAlign,children:t.jsx(x,{type:"button",onClick:()=>o.dispatchCommand(l.FORMAT_ELEMENT_COMMAND,"justify"),className:"toolbar-item","data-testid":"task-description-editor-toolbar-justifyAlign","aria-label":k.justifyAlign,children:t.jsx(He,{className:"format"})})}),t.jsx(b,{placement:"bottom",title:X,children:t.jsx(x,{type:"button",onClick:()=>o.dispatchCommand(l.INDENT_CONTENT_COMMAND,void 0),className:"toolbar-item","data-testid":"task-description-editor-toolbar-indent","aria-label":X,children:t.jsx(Fe,{className:"format"})})}),t.jsx(b,{placement:"bottom",title:V,children:t.jsx(x,{type:"button",onClick:()=>o.dispatchCommand(l.OUTDENT_CONTENT_COMMAND,void 0),className:"toolbar-item","data-testid":"task-description-editor-toolbar-outdent","aria-label":V,children:t.jsx(Pe,{className:"format"})})})]}),t.jsxs(Y,{children:[t.jsx(b,{placement:"bottom",title:q,children:t.jsx(x,{type:"button",disabled:!r,onClick:()=>o.dispatchCommand(l.UNDO_COMMAND,void 0),className:"toolbar-item spaced","data-testid":"task-description-editor-toolbar-undo","aria-label":q,children:t.jsx(le,{className:"format"})})}),t.jsx(b,{placement:"bottom",title:Q,children:t.jsx(x,{type:"button",disabled:!c,onClick:()=>o.dispatchCommand(l.REDO_COMMAND,void 0),className:"toolbar-item","data-testid":"task-description-editor-toolbar-redo","aria-label":Q,children:t.jsx(Ue,{className:"format"})})})]})]})}function Ye({emittedHtml:e,initialValue:o}){const[a]=ee.useLexicalComposerContext(),r=i.useRef(void 0);return i.useEffect(()=>{const s=o??"";if(!qe(s,r.current,e)){r.current=s;return}const c=r.current==null;if(r.current=s,s.trim()===""){c||a.update(()=>{const p=l.$getRoot();p.clear(),p.append(l.$createParagraphNode())},{tag:"initial-content"});return}a.update(()=>{const p=new DOMParser,m=s.trim(),g=m.startsWith("<p")||m.startsWith("<div")||m.startsWith("<ul")||m.startsWith("<ol")||m.startsWith("<h")?s:`<p>${Ge(s)}</p>`,L=p.parseFromString(g,"text/html");Ke(L);const E=te.$generateNodesFromDOM(a,L),h=l.$getRoot();h.clear(),h.append(...E)},{tag:"initial-content"})},[a,o,e]),null}const Ze={namespace:"TaskDescriptionEditor",onError(e){throw e},nodes:[H.HeadingNode,D.ListNode,D.ListItemNode,H.QuoteNode,C.AutoLinkNode,C.LinkNode],theme:fe};function Nt({initialValue:e,placeholder:o,onChange:a}){const r=i.useRef(new Set).current,s=i.useCallback(c=>{Ve(r,c),a(c)},[r,a]);return t.jsxs(he.LexicalComposer,{initialConfig:Ze,children:[t.jsx(Ne,{}),t.jsxs(et,{children:[t.jsx(Je,{onChange:s}),t.jsxs(tt,{children:[t.jsx(Ee.RichTextPlugin,{contentEditable:t.jsx(ye.ContentEditable,{className:"task-editor-input"}),placeholder:o!=null&&o!==""?t.jsx(ot,{children:o}):null,ErrorBoundary:Ce}),t.jsx(Ye,{emittedHtml:r,initialValue:e}),t.jsx(ke,{}),t.jsx(je,{}),t.jsx($e.HistoryPlugin,{}),t.jsx(Le.ListPlugin,{}),t.jsx(Te.LinkPlugin,{}),t.jsx(ve,{}),t.jsx(Oe,{maxDepth:7})]})]})]})}const et=N(re)`
|
|
5
|
+
position: relative;
|
|
6
|
+
margin: ${n.sp0};
|
|
7
|
+
border-radius: ${n.sp2};
|
|
8
|
+
color: ${e=>e.theme.colors.primary};
|
|
9
|
+
text-align: left;
|
|
10
|
+
border: 1px solid ${e=>e.theme.colors.grey3};
|
|
11
|
+
overflow: hidden;
|
|
12
|
+
margin-bottom: ${n.sp3};
|
|
13
|
+
|
|
14
|
+
&:hover {
|
|
15
|
+
border: 1px solid ${e=>e.theme.colors.primary};
|
|
16
|
+
|
|
17
|
+
.toolbar {
|
|
18
|
+
border-bottom: 1px solid ${e=>e.theme.colors.primary};
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
&:focus-within {
|
|
23
|
+
border: 1px solid ${e=>e.theme.colors.primary};
|
|
24
|
+
|
|
25
|
+
.toolbar {
|
|
26
|
+
border-bottom: 1px solid ${e=>e.theme.colors.primary};
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
.task-editor-input {
|
|
31
|
+
min-height: 80px;
|
|
32
|
+
max-height: 240px;
|
|
33
|
+
overflow: auto;
|
|
34
|
+
resize: none;
|
|
35
|
+
${U.largeRegular.css};
|
|
36
|
+
color: ${e=>e.theme.colors.primary};
|
|
37
|
+
position: relative;
|
|
38
|
+
tab-size: 1;
|
|
39
|
+
outline: 0;
|
|
40
|
+
padding: ${n.sp3} 12px;
|
|
41
|
+
|
|
42
|
+
.editor__link {
|
|
43
|
+
color: ${e=>e.theme.colors.link};
|
|
44
|
+
text-decoration: none;
|
|
45
|
+
}
|
|
46
|
+
.editor__link:hover {
|
|
47
|
+
text-decoration: underline;
|
|
48
|
+
cursor: pointer;
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
.task-editor-input p {
|
|
53
|
+
margin: 0;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
.toolbar {
|
|
57
|
+
display: flex;
|
|
58
|
+
margin-bottom: 1px;
|
|
59
|
+
background: ${e=>e.theme.colors.grey5};
|
|
60
|
+
padding: ${n.sp1};
|
|
61
|
+
border-top-left-radius: 10px;
|
|
62
|
+
border-top-right-radius: 10px;
|
|
63
|
+
vertical-align: middle;
|
|
64
|
+
border-bottom: 1px solid ${e=>e.theme.colors.grey3};
|
|
65
|
+
justify-content: space-between;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
.toolbar button.toolbar-item {
|
|
69
|
+
border: 0;
|
|
70
|
+
display: flex;
|
|
71
|
+
background: none;
|
|
72
|
+
border-radius: ${n.sp2};
|
|
73
|
+
padding: ${n.sp1};
|
|
74
|
+
cursor: pointer;
|
|
75
|
+
vertical-align: middle;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
.toolbar button.toolbar-item:disabled {
|
|
79
|
+
cursor: not-allowed;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
.toolbar button.toolbar-item.spaced {
|
|
83
|
+
margin-right: 2px;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
.toolbar button.toolbar-item svg.format {
|
|
87
|
+
background-size: contain;
|
|
88
|
+
display: inline-block;
|
|
89
|
+
height: ${n.sp3};
|
|
90
|
+
width: ${n.sp3};
|
|
91
|
+
vertical-align: -0.25em;
|
|
92
|
+
display: flex;
|
|
93
|
+
color: ${e=>e.theme.colors.grey1};
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
.toolbar button.toolbar-item:disabled svg.format {
|
|
97
|
+
opacity: 0.2;
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
.toolbar button.toolbar-item.active {
|
|
101
|
+
svg.format {
|
|
102
|
+
color: ${e=>e.theme.colors.primary};
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
.toolbar .toolbar-item:hover:not([disabled]) {
|
|
107
|
+
svg.format {
|
|
108
|
+
color: ${e=>e.theme.colors.primary};
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
.toolbar .divider {
|
|
113
|
+
width: 1px;
|
|
114
|
+
background-color: ${e=>e.theme.colors.background};
|
|
115
|
+
margin: ${n.sp0} ${n.sp1};
|
|
116
|
+
}
|
|
117
|
+
`,tt=N.div`
|
|
118
|
+
background-color: transparent;
|
|
119
|
+
position: relative;
|
|
120
|
+
`,ot=N(ne)`
|
|
121
|
+
color: ${e=>e.theme.colors.grey2};
|
|
122
|
+
overflow: hidden;
|
|
123
|
+
position: absolute;
|
|
124
|
+
text-overflow: ellipsis;
|
|
125
|
+
top: ${n.sp3};
|
|
126
|
+
left: 12px;
|
|
127
|
+
user-select: none;
|
|
128
|
+
display: inline-block;
|
|
129
|
+
pointer-events: none;
|
|
130
|
+
`,at=N.div``,Y=N.div`
|
|
131
|
+
display: flex;
|
|
132
|
+
align-items: center;
|
|
133
|
+
gap: ${n.sp1};
|
|
134
|
+
`,x=N.button``,Z=()=>t.jsx("div",{className:"divider"}),it=N.div`
|
|
135
|
+
position: absolute;
|
|
136
|
+
z-index: 10000;
|
|
137
|
+
top: -10000px;
|
|
138
|
+
left: -10000px;
|
|
139
|
+
margin-top: -6px;
|
|
140
|
+
max-width: 300px;
|
|
141
|
+
width: 100%;
|
|
142
|
+
opacity: 0;
|
|
143
|
+
border: 1px solid ${e=>e.theme.colors.grey3};
|
|
144
|
+
background-color: ${e=>e.theme.colors.grey5};
|
|
145
|
+
box-shadow: ${n.sp0} 5px 10px ${xe.overlayLight};
|
|
146
|
+
border-radius: ${n.sp2};
|
|
147
|
+
transition: opacity 0.5s;
|
|
148
|
+
|
|
149
|
+
.link-input {
|
|
150
|
+
display: block;
|
|
151
|
+
box-sizing: border-box;
|
|
152
|
+
padding: ${n.sp3};
|
|
153
|
+
border-radius: ${n.sp3};
|
|
154
|
+
background-color: ${e=>e.theme.colors.grey5};
|
|
155
|
+
${U.standardRegular.css};
|
|
156
|
+
color: ${e=>e.theme.colors.primary};
|
|
157
|
+
border: 0;
|
|
158
|
+
outline: 0;
|
|
159
|
+
position: relative;
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
button.link-edit {
|
|
163
|
+
display: flex;
|
|
164
|
+
align-items: center;
|
|
165
|
+
width: 35px;
|
|
166
|
+
position: absolute;
|
|
167
|
+
right: ${n.sp0};
|
|
168
|
+
top: ${n.sp0};
|
|
169
|
+
bottom: ${n.sp0};
|
|
170
|
+
cursor: pointer;
|
|
171
|
+
background: none;
|
|
172
|
+
border: none;
|
|
173
|
+
padding: 0;
|
|
174
|
+
margin: 0;
|
|
175
|
+
|
|
176
|
+
&:focus {
|
|
177
|
+
outline: none;
|
|
178
|
+
}
|
|
179
|
+
}
|
|
180
|
+
`,st=N.div`
|
|
181
|
+
display: flex;
|
|
182
|
+
align-items: center;
|
|
183
|
+
justify-content: space-between;
|
|
184
|
+
`,rt=N.a`
|
|
185
|
+
color: ${e=>e.theme.colors.link};
|
|
186
|
+
text-decoration: none;
|
|
187
|
+
display: block;
|
|
188
|
+
white-space: nowrap;
|
|
189
|
+
overflow: hidden;
|
|
190
|
+
text-overflow: ellipsis;
|
|
191
|
+
margin-right: 30px;
|
|
192
|
+
${U.standardRegular.css};
|
|
193
|
+
|
|
194
|
+
&:hover {
|
|
195
|
+
text-decoration: underline;
|
|
196
|
+
}
|
|
197
|
+
`,lt=N.button``;export{Nt as default};
|