@abtnode/blocklet-services 1.17.2-beta-20251113-233840-b720c2e6 → 1.17.2-beta-20251114-122922-4319f1ac

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.
Files changed (163) hide show
  1. package/api/libs/connect/session.js +3 -2
  2. package/api/middlewares/launcher-login.js +2 -1
  3. package/api/routes/federated.js +2 -2
  4. package/api/routes/oauth/client.js +2 -2
  5. package/api/routes/user-session.js +67 -61
  6. package/api/routes/user.js +5 -5
  7. package/api/services/auth/connect/invite.js +2 -2
  8. package/api/services/auth/connect/issue-passport.js +2 -2
  9. package/api/services/auth/connect/setup.js +2 -1
  10. package/api/services/auth/session.js +2 -2
  11. package/api/util/federated.js +2 -2
  12. package/api/util/user-util.js +3 -2
  13. package/dist/assets/{AdapterDayjs-n7bg6_1X.js → AdapterDayjs-B04P6h7J.js} +1 -1
  14. package/dist/assets/{Google-B7vPL-F-.js → Google-CqFo2faB.js} +1 -1
  15. package/dist/assets/{access-control-DzGgWWZ2.js → access-control-CjCxQlMu.js} +1 -1
  16. package/dist/assets/{add-component-core-BVgXUmDl.js → add-component-core-C2S9QiqL.js} +1 -1
  17. package/dist/assets/{add-resource-BYFXLlJi.js → add-resource-CuaLDI6L.js} +1 -1
  18. package/dist/assets/{addon-D55HADGw.js → addon-D41X7_Ha.js} +1 -1
  19. package/dist/assets/{advanced-78iwWU4o.js → advanced-DgrelCY3.js} +1 -1
  20. package/dist/assets/{aigne-D2ouITtp.js → aigne-Yr1coV9J.js} +1 -1
  21. package/dist/assets/{appearance-BxJw9_9i.js → appearance-DTPu5zPe.js} +1 -1
  22. package/dist/assets/{arrow-down.svg-jcbqXjCo.js → arrow-down.svg-BIX16b-P.js} +1 -1
  23. package/dist/assets/{audit-logs-DKA2Ld-V.js → audit-logs-ChufMFKS.js} +1 -1
  24. package/dist/assets/{authorize-C_GTM8sX.js → authorize-BvRxf82d.js} +1 -1
  25. package/dist/assets/{base32-C2ICddpr.js → base32-CE_1-AN3.js} +1 -1
  26. package/dist/assets/{bind-account-BzUOnS2v.js → bind-account-xMtYaPJ7.js} +1 -1
  27. package/dist/assets/{branding-BMYM39Yb.js → branding-C1ye6wGf.js} +1 -1
  28. package/dist/assets/{branding-CMcJRjq4.js → branding-C5BV6PKe.js} +1 -1
  29. package/dist/assets/{branding-DG0j7pus.js → branding-DbQznVYe.js} +1 -1
  30. package/dist/assets/{bundle-avatar-C2b68fsU.js → bundle-avatar-B1050zFo.js} +1 -1
  31. package/dist/assets/{button-DckwEyNC.js → button-9QcssggO.js} +1 -1
  32. package/dist/assets/{click-to-copy-dTo_gMCB.js → click-to-copy-BkU88dAD.js} +1 -1
  33. package/dist/assets/{complete-LX-wd42B.js → complete-DZVVfX5P.js} +1 -1
  34. package/dist/assets/{component-DrYS_RjR.js → component-CfrOI6i5.js} +2 -2
  35. package/dist/assets/{config-C23x5afe.js → config-CkNzsAXv.js} +1 -1
  36. package/dist/assets/{config-CrtCTkMs.js → config-D5LRMmb0.js} +1 -1
  37. package/dist/assets/{config-B1rMxK96.js → config-DeWFFWZ4.js} +1 -1
  38. package/dist/assets/{config-navigation-D_FYtIV1.js → config-navigation-kBAhTt_z.js} +9 -9
  39. package/dist/assets/{config-space-Dj1xIdxV.js → config-space-GWPehdiS.js} +1 -1
  40. package/dist/assets/{confirm-CsU3Oo5d.js → confirm-Cb7UwqYS.js} +1 -1
  41. package/dist/assets/{connect-BlLt6EUW.js → connect-BXfNpVtu.js} +1 -1
  42. package/dist/assets/{connect-Bj54R4zL.js → connect-DL9YrliM.js} +1 -1
  43. package/dist/assets/{connect-to-Bn-bpt7c.js → connect-to-5xKcFhJq.js} +1 -1
  44. package/dist/assets/{create-passport-svg-r85opQmx.js → create-passport-svg--kCsicWA.js} +1 -1
  45. package/dist/assets/{createClass-BEaxqVN7.js → createClass-D9-Z7Ng8.js} +1 -1
  46. package/dist/assets/{dashboard-ByAVWWCJ.js → dashboard-Blst3P1q.js} +2 -2
  47. package/dist/assets/{delete-confirm-GHfrlOg3.js → delete-confirm-oFx7NRBG.js} +1 -1
  48. package/dist/assets/{did-address-C7Y529i0.js → did-address-BeDbQEgo.js} +1 -1
  49. package/dist/assets/{domain-DwA0APIu.js → domain-BAz5Jnp3.js} +1 -1
  50. package/dist/assets/{domain-action-card-DNJD1QsY.js → domain-action-card-BPIGiyRz.js} +1 -1
  51. package/dist/assets/{domains-DUtzb2xL.js → domains-DzH4E7Ky.js} +1 -1
  52. package/dist/assets/{email-BcmCHHXV.js → email-AE87NO3k.js} +1 -1
  53. package/dist/assets/engine-CHbWdoYF.js +1 -0
  54. package/dist/assets/{exchange-passport-BTJI81nF.js → exchange-passport-Chzr6DQN.js} +1 -1
  55. package/dist/assets/{form-B7Bm3zQR.js → form-D_b_DG-x.js} +1 -1
  56. package/dist/assets/{form-text-input-D_psiVer.js → form-text-input-C2U1m5ol.js} +1 -1
  57. package/dist/assets/{fuel-C34uL1eO.js → fuel-C8FRHxLR.js} +1 -1
  58. package/dist/assets/{gen-access-key-C31K8UIS.js → gen-access-key-DwnkD6OQ.js} +1 -1
  59. package/dist/assets/{gen-simple-access-key-B6cEQyVG.js → gen-simple-access-key-D5wTuY1t.js} +1 -1
  60. package/dist/assets/get-safe-url-mHb8MGmt.js +1 -0
  61. package/dist/assets/{home-CnZu_C7R.js → home-2prkME-Q.js} +1 -1
  62. package/dist/assets/{iframe-0QvKnUSA.js → iframe-DqyN02cu.js} +1 -1
  63. package/dist/assets/{index-Dkr8COJ6.js → index-0PQCgggo.js} +1 -1
  64. package/dist/assets/{index-CBB-6wLp.js → index-6DYfiGIi.js} +2 -2
  65. package/dist/assets/{index-DbMXkhZq.js → index-BFjPk5rY.js} +2 -2
  66. package/dist/assets/{index-D-vmjAd3.js → index-BK6jWBnR.js} +1 -1
  67. package/dist/assets/{index-DtEKkBB8.js → index-BKvI-HQW.js} +1 -1
  68. package/dist/assets/{index-C2vqAUdb.js → index-BcWDbRWR.js} +1 -1
  69. package/dist/assets/{index-B3hel-O_.js → index-BjPh-7kQ.js} +1 -1
  70. package/dist/assets/{index-BNk73zyW.js → index-Bkmh68gh.js} +3 -3
  71. package/dist/assets/{index-BYOmYfxB.js → index-C-PaVJtk.js} +1 -1
  72. package/dist/assets/{index-thMounfk.js → index-CA0pv3Uq.js} +3 -3
  73. package/dist/assets/{index-BYYnRb6p.js → index-CDLNMKDM.js} +82 -82
  74. package/dist/assets/{index-B6Slehxb.js → index-CGsJfc7B.js} +1 -1
  75. package/dist/assets/{index-XStWNunW.js → index-CHmNqpEJ.js} +1 -1
  76. package/dist/assets/{index-4Q2nGBR1.js → index-CHnA2nN2.js} +1 -1
  77. package/dist/assets/{index-EQzXRMHS.js → index-CIHjwyhW.js} +1 -1
  78. package/dist/assets/{index-TszeC1SU.js → index-CLdviW_b.js} +1 -1
  79. package/dist/assets/{index-DqTNJ8Zu.js → index-CiTIvXav.js} +1 -1
  80. package/dist/assets/{index-Y6z8B_zK.js → index-CkLEqkuR.js} +1 -1
  81. package/dist/assets/{index-DTZgqull.js → index-D45OiFud.js} +1 -1
  82. package/dist/assets/{index-C3EbOdrf.js → index-DEoXYS44.js} +1 -1
  83. package/dist/assets/{index-nHUlbC17.js → index-DTf1TIHb.js} +1 -1
  84. package/dist/assets/{index-Dtls6zrz.js → index-DVeHusdz.js} +1 -1
  85. package/dist/assets/{index-B117pBNr.js → index-D_MyW6is.js} +1 -1
  86. package/dist/assets/{index-DpnM0Oph.js → index-DfxScG8C.js} +1 -1
  87. package/dist/assets/{index-BapXgoRr.js → index-Ds523Kr4.js} +1 -1
  88. package/dist/assets/{index-DKpBwa3h.js → index-Dw-Z7YrL.js} +1 -1
  89. package/dist/assets/{index-CTmrDTTO.js → index-YZ0yjUWt.js} +1 -1
  90. package/dist/assets/{index-Dl7ntxgc.js → index-dhiRVZZQ.js} +1 -1
  91. package/dist/assets/{index-Db5-qBEa.js → index-erLJSqBe.js} +1 -1
  92. package/dist/assets/{index-BHqk4DRy.js → index-heiIZy8r.js} +1 -1
  93. package/dist/assets/{invitation-CF-l2bGx.js → invitation-BLXeyB9R.js} +1 -1
  94. package/dist/assets/{invitations-DZgF_G9y.js → invitations-DAbKE0z_.js} +1 -1
  95. package/dist/assets/{invite-BQPUtzrP.js → invite-nkH5yAFh.js} +1 -1
  96. package/dist/assets/{isURL-CdZBC5rb.js → isURL-B8QEuluM.js} +1 -1
  97. package/dist/assets/{issue-passport-CNy122pu.js → issue-passport-DHA-EFAO.js} +1 -1
  98. package/dist/assets/{item-bs6kC0V9.js → item-CjT9qBlP.js} +1 -1
  99. package/dist/assets/{landing-page-BEdI4Uem.js → landing-page-4maignTY.js} +1 -1
  100. package/dist/assets/{layout-HVfFSCrc.js → layout-e6DMnPsI.js} +1 -1
  101. package/dist/assets/{list-UYNsLF-V.js → list-B_m0p7sB.js} +1 -1
  102. package/dist/assets/{list-DYPNdBQ0.js → list-DG5rE6en.js} +1 -1
  103. package/dist/assets/localization-Ds_U2GMW.js +1 -0
  104. package/dist/assets/{log-1vq1ZG0o.js → log-BUSdWhUD.js} +1 -1
  105. package/dist/assets/logger-BsYh0hGr.js +1 -0
  106. package/dist/assets/{login-DDVsbMic.js → login-ML7YmOtr.js} +1 -1
  107. package/dist/assets/{login-oauth-callback-DQbytE-5.js → login-oauth-callback-D958pJEU.js} +1 -1
  108. package/dist/assets/{logo-uploader-BUvQQWmf.js → logo-uploader-BBf1tYyb.js} +1 -1
  109. package/dist/assets/{lost-passport-B2FZYBUv.js → lost-passport-C0Gat_y8.js} +1 -1
  110. package/dist/assets/{open-window-BGu_PdUA.js → open-window-BCPyuDbV.js} +1 -1
  111. package/dist/assets/{over-due-invoice-payment-CSEzFVaZ.js → over-due-invoice-payment-BXBLnoyA.js} +1 -1
  112. package/dist/assets/{overview-Db_OsTPe.js → overview-DDe_917X.js} +1 -1
  113. package/dist/assets/{passport-CO7_Cu0e.js → passport-Be2_BAlL.js} +1 -1
  114. package/dist/assets/{passport-item-4wBkLlfR.js → passport-item-CrqI8LZP.js} +1 -1
  115. package/dist/assets/{permission-DvAolQ-Q.js → permission-CRiK9UiX.js} +1 -1
  116. package/dist/assets/{preferences-B82nMaO0.js → preferences-B8QM8HJG.js} +1 -1
  117. package/dist/assets/profile-embed-Dkf-JFZx.js +1 -0
  118. package/dist/assets/{publish-resource-_xYnz-Z3.js → publish-resource-DDAEroSI.js} +1 -1
  119. package/dist/assets/{react-beautiful-dnd.esm-Cj5UKyoO.js → react-beautiful-dnd.esm-BsXmsXbi.js} +1 -1
  120. package/dist/assets/{runtime-BgxpAnsa.js → runtime-Dx-xN_gK.js} +1 -1
  121. package/dist/assets/sdk-DjGKLOyd.js +1 -0
  122. package/dist/assets/{security-DoO2ZJVY.js → security-CDnrU-XX.js} +1 -1
  123. package/dist/assets/{session-DeWNn47Q.js → session-BDmvqOvc.js} +1 -1
  124. package/dist/assets/{setup-D4pKSboV.js → setup-Cju8Z063.js} +1 -1
  125. package/dist/assets/{simple-select-CINtBPZE.js → simple-select-DWI2SRq6.js} +1 -1
  126. package/dist/assets/{spaces-CCbSHYP8.js → spaces-CNXRZTcd.js} +1 -1
  127. package/dist/assets/{start-BY1R2UT5.js → start-BBRJjidX.js} +1 -1
  128. package/dist/assets/{starting-progress-CJhrg-lU.js → starting-progress-D-1aLd8t.js} +1 -1
  129. package/dist/assets/{status-BMRLu_19.js → status-CK9xg7pT.js} +1 -1
  130. package/dist/assets/{step-actions-BkqofW7Q.js → step-actions-CWp-NtsH.js} +1 -1
  131. package/dist/assets/{studio-DCgh-vhK.js → studio-B1WBQVRk.js} +1 -1
  132. package/dist/assets/{switch-control-sKJkh6AT.js → switch-control-BXLt-KrD.js} +1 -1
  133. package/dist/assets/{table-tips-BDEuNUa-.js → table-tips-CD2JCnV7.js} +1 -1
  134. package/dist/assets/{team-C3Lb5lSC.js → team-CCbX1N7p.js} +1 -1
  135. package/dist/assets/{traffic-D2Cfq9L1.js → traffic-Bxkf9fJx.js} +1 -1
  136. package/dist/assets/{transfer-DOdQMQLS.js → transfer-8WkD_jUd.js} +1 -1
  137. package/dist/assets/{unsubscribe-Dbk_TXVM.js → unsubscribe-DVeiVKLX.js} +1 -1
  138. package/dist/assets/{use-app-logo-5LCwuL_7.js → use-app-logo-lNueneHC.js} +1 -1
  139. package/dist/assets/{use-window-close-DSeaP-vP.js → use-window-close-D8vmtt2d.js} +1 -1
  140. package/dist/assets/{useLocalStorage-Cja7SGMc.js → useLocalStorage-E5ZXDlU2.js} +1 -1
  141. package/dist/assets/user-center-BU_yo3ue.js +126 -0
  142. package/dist/assets/user-follower-DLzUfaiE.js +32 -0
  143. package/dist/assets/{util-DT6hMKHn.js → util-Bj9Es728.js} +1 -1
  144. package/dist/assets/{util-CVkoegRs.js → util-CeZoM_ul.js} +1 -1
  145. package/dist/assets/{vendor-arcblock-Cjhx0qYj.js → vendor-arcblock-DrHS8FbJ.js} +1 -1
  146. package/dist/assets/{vendor-ux-CYelfrd4.js → vendor-ux-CzE32faw.js} +1 -1
  147. package/dist/assets/{wait-connect-CI9czsmS.js → wait-connect-ySKEj_Ph.js} +1 -1
  148. package/dist/assets/{wizard-components-DvfW-PYY.js → wizard-components-B1CGAMtl.js} +1 -1
  149. package/dist/assets/{wizard-DdxYdubI.js → wizard-sjepmmF5.js} +1 -1
  150. package/dist/assets/wrap-locale-cNkWnEw5.js +1 -0
  151. package/dist/assets/{zh-DtY2CCsC.js → zh-CUmZifBZ.js} +1 -1
  152. package/dist/index.html +1 -1
  153. package/dist/service-worker.js +1 -1
  154. package/package.json +49 -49
  155. package/dist/assets/engine-CnumkZlJ.js +0 -1
  156. package/dist/assets/get-safe-url-DJBvJ5j0.js +0 -1
  157. package/dist/assets/localization-CmVSMbfo.js +0 -1
  158. package/dist/assets/logger-B2ocx_Ko.js +0 -1
  159. package/dist/assets/profile-embed-Cum73eUB.js +0 -1
  160. package/dist/assets/sdk-CFjCOL-V.js +0 -1
  161. package/dist/assets/user-center-DeR7b6_x.js +0 -126
  162. package/dist/assets/user-follower-BghxPW4p.js +0 -32
  163. package/dist/assets/wrap-locale-DOU63eiN.js +0 -1
@@ -1,5 +1,5 @@
1
1
  const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=[window.__toCdnUrl("assets/vendor-ux-DYcPPYq2.css"),window.__toCdnUrl("assets/index-DrVXX4fX.css"),window.__toCdnUrl("assets/index-B5LvOF-F.css")])))=>i.map(i=>d[i]);
2
- import{e as ln,r as k,f as Pt,p as xt,d as Qi,h as Ta,g as sn,c as cn,a as oe}from"./vendor-react-Dvs43sk9.js";import{j as m,U as Pa,dS as ka,ax as Ji,a as Zi,ca as E,_ as le,W as b,al as eo,s as Je,ak as ce,T as Te,a1 as Oa,a0 as Ir,I as ke,aN as An,Q as rn,J as tr,z as ft,A as jn,aJ as to,am as za,bE as Da,a6 as Na,y as no,bV as Ma,at as La,c2 as Tr,ar as mn,D as Ea,E as Aa,P as Zt,cf as Pr,x as ja,bc as kr,M as Or,bi as Sn,cX as zr}from"./vendor-mui-core-CnXrAOs3.js";import{a5 as Fa,aY as Ga,aZ as Wa,aW as $a,V as Oe,a_ as Ha,a$ as Ua,b0 as P,b1 as Ba,b2 as Va,b3 as Dr,X as qa,a9 as Ka,aa as Xa,U as me,l as nr,b4 as ro,_ as Ya,H as kt,b as Qa,n as Ja,T as Za,W as io}from"./vendor-ux-CYelfrd4.js";import{g as Gt,b as re,z as el,j as oo,u as ao,A as tl,a as nl}from"./vendor-hooks-CjESGRlR.js";import{ao as rl,ap as il,aq as ol,G as Ne,C as Ye,Z as Mt,o as al,b as ll,g as sl,a3 as cl,F as ht,ar as lo,as as dl,af as Nr,at as ul,a as fl,A as hl,I as pl,i as gl,n as Ee}from"./vendor-utils-cJEl_UEd.js";import{b6 as vl,c7 as ml,ci as so,a5 as Sl,c6 as yl,bo as Cl,ac as at,c as we,e as wl,Y as Ve,Z as rr,aZ as nt,_ as co,cj as bl,ck as xl,r as _l,X as Rl}from"./index-BYYnRb6p.js";import{r as Il}from"./omit-hhiOJGRf.js";import{r as Tl}from"./cloneDeep-C6qewg0C.js";import{r as Pl}from"./index-BPy8_fa2.js";import{_ as pe,a as ge,b as xe,c as _e,d as Re,e as kl,f as uo}from"./createClass-BEaxqVN7.js";import{u as Ol,b as zl,C as We}from"./index.esm-JPZAjt0x.js";import{S as Fn}from"./simple-select-CINtBPZE.js";import{u as fo,a as Dl}from"./team-C3Lb5lSC.js";import{a as Nl}from"./api-Btn0Tp3W.js";import{_ as Ml}from"./index-Dtls6zrz.js";import{G as Ll}from"./dashboard-ByAVWWCJ.js";import{t as El}from"./index-C2vqAUdb.js";import{D as Al,C as jl,P as Fl}from"./react-beautiful-dnd.esm-Cj5UKyoO.js";import{I as Gl}from"./iframe-0QvKnUSA.js";import{f as Mr}from"./index-DBs9Ljax.js";import"./lottie-web-4koyQiv_.js";import"./vendor-arcblock-Cjhx0qYj.js";import"./arrow-down.svg-jcbqXjCo.js";import"./session-DeWNn47Q.js";import"./isURL-CdZBC5rb.js";import"./use-app-logo-5LCwuL_7.js";import"./useLocalStorage-Cja7SGMc.js";import"./confirm-CsU3Oo5d.js";import"./get-safe-url-DJBvJ5j0.js";import"./passport-CO7_Cu0e.js";import"./create-passport-svg-r85opQmx.js";import"./useAsyncRetry-DwwEjrjs.js";import"./useAsync-cZ_FPf9k.js";import"./useSetState-DFuQZPPV.js";import"./index-C3EbOdrf.js";import"./over-due-invoice-payment-CSEzFVaZ.js";import"./use-mobile-DCNBsOlH.js";import"./raf-schd.esm-CHNehTG3.js";var _t={};const Wl=ln(rl),$l=ln(il),Hl=ln(ol);var Lr;function Ul(){return Lr||(Lr=1,function(r){var i=_t&&_t.__importDefault||function(F){return F&&F.__esModule?F:{default:F}};Object.defineProperty(r,"__esModule",{value:!0}),r.sortRootNavigation=r.cleanOldNavigationHistory=r.checkLink=void 0,r.parseNavigation=te,r.deepWalk=R,r.isMatchSection=I,r.nestNavigationList=J,r.filterNavigation=X,r.cleanOrphanNavigation=Z,r.joinLink=j,r.flattenNavigation=U,r.splitNavigationBySection=K;const n=vl(),e=i(Wl),t=i(Fa),o=i(Ga),a=i($l),l=i(ml),s=i(Il),c=i(Tl),d=Cl(),f=i(Pl()),u=i(so()),p=i(Wa),h=i($a),v=i(Hl),y=Sl(),_=yl();Object.defineProperty(r,"checkLink",{enumerable:!0,get:function(){return _.checkLink}});const C="header",z="/",D="/",M="/";function R(F,G=()=>{},{key:N="children",order:T="first"}={}){function x($,{index:Y=0,parent:ee=null,level:se=0}={}){Array.isArray($)?$.forEach((fe,Ce)=>{x(fe,{index:Ce,parent:ee,level:se+1})}):$&&(T==="first"&&G($,ee,{index:Y,level:se}),x($[N],{parent:$,level:se}),T==="last"&&G($,ee,{index:Y,level:se}))}x(F)}function I(F,G){return G===C&&(0,a.default)(F)?!0:Array.isArray(F)?F.includes(G):F===G}function g(F){try{return JSON.parse(F)}catch{return F}}function w(F){return F.map(G=>{const N={...G};return N.role&&(N.role=g(N.role)),N.section&&(N.section=g(N.section)),N.title&&(N.title=g(N.title)),N.description&&(N.description=g(N.description)),N.link&&(N.link=g(N.link)),N})}function S(F="/",G=""){if((0,u.default)(G||""))return G;const N=f.default.join(F,G||D);return N.length>1&&N.endsWith("/")?N.slice(0,N.length-1):N}function O(F,G,{strict:N=!0}={}){let T=F,x=G;return N||(T=T||"/",x=x||"/"),(0,p.default)(T)&&(0,h.default)(x)&&(0,_.checkLink)(x)?Object.keys(T).reduce(($,Y)=>($[Y]=S(T[Y],x),$),{}):(0,h.default)(T)&&(0,_.checkLink)(T)&&(0,p.default)(x)?Object.keys(x).reduce(($,Y)=>($[Y]=S(T,x[Y]),$),{}):(0,h.default)(T)&&(0,h.default)(x)?(0,_.checkLink)(T)||(0,_.checkLink)(x)?S(T,x):x:(0,p.default)(T)&&(0,p.default)(x)?[...new Set([...Object.keys(T),...Object.keys(x)])].reduce((Y,ee)=>(Y[ee]=S(T[ee],x[ee]),Y),{}):x}function j(F,G){const N=(0,c.default)(F);return R(N,(T,x)=>{const $=T.component||T.child;if($){const Y=G.find(ee=>ee.name===$);Y&&(T.link=O(Y.link,T.link,{strict:!1}))}else x&&(T.link=O(x.link,T.link))},{key:"items"}),N}function U(F=[],{depth:G=1,transform:N=T=>T}={}){const T=(0,c.default)(F),x=[];return R(T,($,Y,{level:ee})=>{if(ee>=G){const{items:se=[]}=$;if(se&&Array.isArray(se)&&se.length>0){delete $.items;const fe=se.map(Ce=>N(Ce,$));if(Y)Y.items.push(...fe);else{const Ce=N((0,s.default)($,["items"]),Y);x.push(Ce,...fe)}}else if(ee===1){const fe=N((0,s.default)($,["items"]),Y);x.push(fe)}}else ee===1&&x.push($)},{key:"items",order:"last"}),x}function q(F){if(F.section!=="bottomNavigation")return F;const G={...F};return n.NAVIGATION_I18N_FIELDS.forEach(N=>{const T=G[N];typeof T=="string"&&(G[N]={en:T})}),G}function A(F={}){const G=[];function N(x,$={}){const Y=[],{children:ee=[],meta:se={}}=x,fe=(0,c.default)(se?.navigation||[]);(0,y.hasStartEngine)(se)&&x.meta?.capabilities?.navigation!==!1&&Y.push(...fe);const Ce=$.name||"",Le=$.mountPoint||z,he=x===F?"":se.name||"",ze=x===F?"":x.mountPoint||z;for(const ne of ee){if(!(0,y.hasStartEngine)(ne.meta))continue;const ue=ne.meta.name,Fe=ne.mountPoint,bt=[Ce,he,ue].filter(Boolean).join("."),gn=ne.meta.navigation||[],vn=(0,d.joinURL)(Le,ze,Fe);ne.meta?.capabilities?.navigation!==!1&&G.push({did:ne.meta.did,name:bt,link:vn,title:ne.meta.title||"",navigation:gn.map(De=>({section:C,...De}))});const Ge=fe.find(De=>De.component?De.component===ue:!1);if(Ge){if(!Ge.link)if(ne.meta.navigation&&ne.meta.navigation.length>0){const De=N(ne,{mountPoint:ze,name:he});De.length>0&&(Ge.items=Ge.items??[],Ge.items.push(...De))}else Ge.link=D}else if(ne.meta?.capabilities?.navigation!==!1){const De=N(ne,{mountPoint:ze,name:he}),Vt={title:ne.meta.title,component:ue,id:ne.meta.did};De.length>0?(Vt.items=De,Vt.link=void 0):Vt.link=D,Y.push(Vt)}}return Y}return{navigationList:N(F),components:G}}function W(F){const G=(0,c.default)(F).filter(N=>N.id);return R(G,(N,T)=>{if(N.items&&N.items.length){for(let x=N.items.length-1;x>=0;x--)N.items[x].id||N.items.splice(x,1);N.items.length===0&&N.component&&(N.link=N.link||D)}T&&(N.parent=T.id,N.id=[T.id,N.id].join(M)),N.from=N.from||"yaml",N.visible=N.visible??!0},{key:"items"}),G}function H(F,G=2){const N=(0,c.default)(F),T=U(N,{depth:G,transform:(x,$)=>($&&(x._parent||(x._parent=$.id,$.component||(x.link=O($.link,x.link))),x.section=x.section||$.section||[C],x.visible=x.visible??$.visible,$.role&&(x.role=x.role||$.role)),x.component=[$.component,x.component].filter(Boolean).join("."),x)});return R(T,x=>{x.items&&x.items.length>0&&x.items.reduceRight(($,Y)=>{if(Y._parent){const ee=x.items.findIndex(se=>se.id===Y._parent);ee>=0&&x.items.splice(ee,1),delete Y._parent}return null},null)},{key:"items"}),T}function V(F,G){return G&&Array.isArray(F.items)?F.items.filter(N=>(0,a.default)(N.section)?I(F.section,G):!!I(N.section,G)).map(N=>({...N,section:G})):[]}function K(F){const G=(0,c.default)(F),N=[];for(const T of G){let Y=function(ee,se){const fe=V(ee,se);$.push({...x,section:se,items:fe})};const x=(0,c.default)((0,s.default)(T,["items"])),$=[];if(Array.isArray(T.section))for(const ee of T.section)Y(T,ee);else if(T.section){const{section:ee}=T;Y(T,ee)}else if(T.items&&T.items.length>0){const ee=T.items.reduce((fe,Ce)=>{const{section:Le=[C]}=Ce||{};return fe.push(...Le),fe},[]),se=[...new Set(ee)];for(const fe of se)Y(T,fe)}else $.push({...T,section:C});N.push(...$)}return N}function J(F=[]){const G=(0,c.default)(F);return G.reduceRight((N,T,x)=>{if(T.parent){const $=G.find(Y=>T.section&&Y.section?Y.section===T.section&&Y.id===T.parent:Y.id===T.parent);$&&($.items||($.items=[]),$.items=[T,...$.items]),G.splice(x,1)}return null},null),G}function X(F,G=[]){const N=J(F);return R(N,x=>{if(x?.component&&(G.some($=>$.name===x.component)||(x.visible=!1)),x.items&&x.items.length)for(let $=x.items.length-1;$>=0;$--)x.items[$].visible===!1&&x.items.splice($,1)},{key:"items"}),N.filter(x=>!(x.visible===!1||x.items&&Array.isArray(x.items)&&x.items.length>0&&x.items?.every($=>$.visible===!1)))}function Z(F){return F.map(G=>G.items&&Array.isArray(G.items)&&G.items.length===1&&["header","footer","",void 0,null].includes(G.section)?G.items[0]:G)}const B=F=>{const[G,N]=(0,v.default)(F,T=>T.id==="/team");return[...G,...N]};r.sortRootNavigation=B;const Q=F=>{const[,G]=(0,v.default)(F,N=>{const T=typeof N.title=="string"?N.title:N.title?.en;return N.id==="/team"&&T==="Access"||N.id==="/dashboard"&&T==="Blocklet"});return G};r.cleanOldNavigationHistory=Q;function te(F={},G={}){const{beforeProcess:N=ne=>ne}=G,{navigationList:T,components:x}=A(F),$=new Map;T.forEach(ne=>{ne.items?.forEach(ue=>{$.set((0,d.joinURL)(ne.id,ue.id),ue)})});const Y=(0,l.default)(F,"settings.org.enabled",!1);F?.settings?.navigations&&(Array.isArray(F.settings.navigations)?F.settings.navigations=[...F.settings.navigations].filter(ne=>!(ne?.parent==="/team"&&ne.from==="team-tmpl")).map(ne=>{if(ne.section==="userCenter"&&!Object.prototype.hasOwnProperty.call(ne,"private")){const ue=$.get(ne.id);ue&&Object.prototype.hasOwnProperty.call(ue,"private")&&(ne.private=ue.private)}return!Y&&ne.section==="userCenter"&&ne.id==="/userCenter/orgs"?null:ne}).filter(Boolean):F.settings.navigations=[]);const ee=w(Q(F?.settings?.navigations||[])).map(q),se=H(N(T)),fe=W(se),Le=K(fe).reduce((ne,ue)=>["bottom","social","sessionManager","userCenter"].includes(ue.section)&&ue.items&&ue.items.length>0?(ne.push(...ue.items.map(bt=>{const{section:gn}=ue,vn=O(ue.link,bt.link),Ge=[ue.component,bt.component].filter(Boolean).join(".");return{...bt,section:gn,link:vn,component:Ge,parent:""}})),ne):(ne.push(ue),ne),[]),he=U(Le,{transform(ne,ue){let{component:Fe}=ne;return ue?.component&&(Fe=[ue.component,ne.component].filter(Boolean).join(".")),q({...ne,component:Fe})}});return{navigationList:(0,e.default)(ee,he,(ne,ue)=>{const Fe=["id","section"];return(0,t.default)((0,o.default)(ne,Fe),(0,o.default)(ue,Fe))}),components:x,builtinList:he}}}(_t)),_t}var Se=Ul();const ho=k.createContext(null),Er="/",Bl="header",Ar={dashboard:[{id:"/team",title:{en:"Access",zh:"访问控制"},role:["owner","admin","member"],section:["dashboard"],link:"",from:"team-tmpl",items:[{id:"member",title:{en:"Members",zh:"成员"},icon:"ant-design:user-outlined",link:`${we.WELLKNOWN_SERVICE_PATH_PREFIX}/admin/members`,from:"team-tmpl"},{id:"passport",title:{en:"Passport",zh:"通行证"},icon:"icon-park-outline:passport",link:`${we.WELLKNOWN_SERVICE_PATH_PREFIX}/admin/passports`,from:"team-tmpl"}]},{id:"/dashboard",title:"Blocklet",role:["owner","admin"],section:["dashboard"],link:"",from:"team-tmpl",items:[{id:"dashboard",title:{en:"Dashboard",zh:"仪表盘"},icon:"ant-design:dashboard-outlined",link:`${we.WELLKNOWN_SERVICE_PATH_PREFIX}/admin`,from:"team-tmpl"}]}],userCenter:[{id:"/userCenter/notification",title:{en:"Notifications",zh:"通知"},icon:"ant-design:bell-outlined",link:Ye(we.WELLKNOWN_SERVICE_PATH_PREFIX,"/user/notifications"),from:"team-tmpl",section:["userCenter"]},{id:"/userCenter/orgs",title:{en:"Organizations",zh:"组织"},icon:"ant-design:team-outlined",link:Ye(we.WELLKNOWN_SERVICE_PATH_PREFIX,"/user/orgs"),from:"team-tmpl",section:["userCenter"],shouldDisplay:r=>r.settings?.org?.enabled}]};function yn(r,i){return r.section&&i.section?r.section===i.section&&r.id===i.id:r.id===i.id}const $e=(r,i,n,e,t=!0)=>({id:r,from:"team-tmpl",title:i,icon:n,link:Ye(we.WELLKNOWN_SERVICE_PATH_PREFIX,e),visible:t}),Vl=(r,i,n)=>({id:r,from:"team-tmpl",title:i,role:["owner","admin","member"],section:["dashboard"],link:"",items:n}),ql=(r,i)=>{const n=Se.cleanOldNavigationHistory(i);return n.findIndex(t=>t.id==="/team")===-1&&n.unshift(Vl("/team",r("navigation.blockletService"),[$e("dashboard",r("navigation.dashboard"),"ant-design:dashboard-outlined","/admin"),$e("did-connect",r("navigation.didConnect"),"tabler:users","/admin/did-connect"),$e("website",r("navigation.website"),"icon-park-twotone:upload-web","/admin/website"),$e("operation",r("navigation.operations"),"grommet-icons:configure","/admin/operations"),$e("integration",r("navigation.integration"),"hugeicons:webhook","/admin/integrations"),$e("developer",r("navigation.developer"),"heroicons:command-line","/admin/developers"),$e("did-spaces",r("navigation.didSpaces"),"icon-park-outline:cloud-storage","/admin/did-spaces"),$e("studio",r("navigation.studio"),"eos-icons:subscriptions-created-outlined","/admin/publish/publish")])),n};function jr({name:r}){return m.jsx(Pa,{label:`Uninstalled: ${r}`,color:"error",size:"small",variant:"outlined",sx:{fontSize:10,height:20}})}function Kl({children:r}){const{blocklet:i,actions:n}=at(),{t:e}=Oe(),{navigationList:t,components:o,builtinList:a}=Se.parseNavigation(i,{beforeProcess(R){const I=Ne(R);return["dashboard","userCenter"].forEach(g=>{Object.prototype.hasOwnProperty.call(Ar,g)&&Ar[g].forEach(w=>{(w.shouldDisplay&&typeof w.shouldDisplay=="function"?w.shouldDisplay:()=>!0)(i)&&!I.some(O=>O.id===w.id)&&I.push(w)})}),ql(e,I)}}),l=Gt({rawNavigation:Ne(t),activeSection:Bl,components:o}),s=k.useMemo(()=>Se.nestNavigationList(Ne(l.rawNavigation)),[l.rawNavigation]),c=k.useMemo(()=>{const R=Se.filterNavigation(Ne(l.rawNavigation),o);return Se.joinLink(R,o)},[o,l.rawNavigation]),d=k.useCallback(R=>{if(!R.id)return"";const I=Se.flattenNavigation(Se.joinLink(s,o)),g=I.find(w=>w.id===R.id);if(g?.component){if(!o.some(w=>w.name===g.component))return m.jsx(jr,{name:g.component})}else if(g.parent){const w=I.find(S=>S.id===g.parent);if(w?.component&&!o.some(S=>S.name===w.component))return m.jsx(jr,{name:w.component})}return g?.link},[s,o]),f=k.useCallback(R=>{l.activeSection=R},[l]),u=k.useCallback(R=>{const I=[];Se.deepWalk(R,(w,S)=>{const O={...Mt(w,["children","expand"]),parent:S?.id};I.push(O)});const g=Ne(l.rawNavigation).filter(w=>{if(!l.activeSection)return!1;const S=I.find(O=>yn(O,w));return S?!Se.isMatchSection(S.section,l.activeSection):!0});l.rawNavigation=[...g,...I]},[l]),p=k.useCallback((R=[])=>{const I=Ne(l.rawNavigation).map(g=>{const w=R.find(S=>yn({...S,section:l.activeSection},g));return w?{...g,...w}:g});l.rawNavigation=I},[l]),h=k.useCallback((R,I=Er)=>R.map(w=>{const O=o.find(q=>q.name===w.component)?.link||I,j=w.items||[],{link:U}=w;return{title:w.title,description:w.description,subtitle:d(w),link:U,icon:w.icon,children:h(j,U||Er),section:w.section,visible:w.visible,parent:w.parent,component:w.component,id:w.id,role:w.role,from:w.from,__base:O}}),[o,d]),v=k.useCallback(R=>{p([R])},[p]),y=k.useCallback(R=>{const I=l.rawNavigation.filter(g=>g.id===R||g.parent===R).map(g=>g.id);l.rawNavigation=Ne(l.rawNavigation).filter(g=>!I.includes(g.id))},[l]),_=k.useCallback((R={},I=-1)=>{const g={...R,id:wl.nanoid(),section:l.activeSection,visible:!0},w=[...l.rawNavigation],S=w.filter(O=>O.section===l.activeSection);if(I<0||I>S.length-1)w.push(g);else{const O=S[I],j=w.findIndex(U=>yn(U,O));w.splice(j,0,g)}return l.rawNavigation=w,g},[l]),C=k.useCallback(R=>{const g=Ne(s).filter(w=>Se.isMatchSection(w.section,R));return h(g)},[s,h]),z=k.useCallback(async R=>{const g=R.map(w=>al(w,ll)).map(w=>{const S={...w};return S.role&&Array.isArray(S.role)&&(S.role=JSON.stringify(S.role)),S.section&&Array.isArray(S.section)&&(S.section=JSON.stringify(S.section)),S.title&&S.title instanceof Object&&(S.title=JSON.stringify(S.title)),S.description&&S.description instanceof Object&&(S.description=JSON.stringify(S.description)),S.link&&S.link instanceof Object&&(S.link=JSON.stringify(S.link)),S});await n.configNavigations(g)},[n]),D=k.useCallback(async R=>{if(R){const I=a.filter(w=>Se.isMatchSection(w.section,R)),g=l.rawNavigation.filter(w=>!Se.isMatchSection(w.section,R));await z(g),l.rawNavigation=[...g,...I]}else await z([]),l.rawNavigation=Ne(a)},[z,l,a]),M=k.useMemo(()=>({state:l,navigation:c,components:o,getNavigationFullLink:d,updateActiveSection:f,updateNavigationItem:v,delNavigationItem:y,addNavigationItem:_,updateNavigationTree:u,getNavigation:C,saveNavigationList:z,resetNavigation:D}),[l,c,o,d,f,v,y,_,u,C,z,D]);return m.jsx(ho.Provider,{value:M,children:r})}function po(){const r=k.useContext(ho);if(!r)throw new Error("useNavigation must be used within a NavigationProvider");return r}var Ie={},Cn,Fr;function Xl(){if(Fr)return Cn;Fr=1;var r="Expected a function",i=NaN,n="[object Symbol]",e=/^\s+|\s+$/g,t=/^[-+]0x[0-9a-f]+$/i,o=/^0b[01]+$/i,a=/^0o[0-7]+$/i,l=parseInt,s=typeof Pt=="object"&&Pt&&Pt.Object===Object&&Pt,c=typeof self=="object"&&self&&self.Object===Object&&self,d=s||c||Function("return this")(),f=Object.prototype,u=f.toString,p=Math.max,h=Math.min,v=function(){return d.Date.now()};function y(R,I,g){var w,S,O,j,U,q,A=0,W=!1,H=!1,V=!0;if(typeof R!="function")throw new TypeError(r);I=M(I)||0,C(g)&&(W=!!g.leading,H="maxWait"in g,O=H?p(M(g.maxWait)||0,I):O,V="trailing"in g?!!g.trailing:V);function K(N){var T=w,x=S;return w=S=void 0,A=N,j=R.apply(x,T),j}function J(N){return A=N,U=setTimeout(B,I),W?K(N):j}function X(N){var T=N-q,x=N-A,$=I-T;return H?h($,O-x):$}function Z(N){var T=N-q,x=N-A;return q===void 0||T>=I||T<0||H&&x>=O}function B(){var N=v();if(Z(N))return Q(N);U=setTimeout(B,X(N))}function Q(N){return U=void 0,V&&w?K(N):(w=S=void 0,j)}function te(){U!==void 0&&clearTimeout(U),A=0,w=q=S=U=void 0}function F(){return U===void 0?j:Q(v())}function G(){var N=v(),T=Z(N);if(w=arguments,S=this,q=N,T){if(U===void 0)return J(q);if(H)return U=setTimeout(B,I),K(q)}return U===void 0&&(U=setTimeout(B,I)),j}return G.cancel=te,G.flush=F,G}function _(R,I,g){var w=!0,S=!0;if(typeof R!="function")throw new TypeError(r);return C(g)&&(w="leading"in g?!!g.leading:w,S="trailing"in g?!!g.trailing:S),y(R,I,{leading:w,maxWait:I,trailing:S})}function C(R){var I=typeof R;return!!R&&(I=="object"||I=="function")}function z(R){return!!R&&typeof R=="object"}function D(R){return typeof R=="symbol"||z(R)&&u.call(R)==n}function M(R){if(typeof R=="number")return R;if(D(R))return i;if(C(R)){var I=typeof R.valueOf=="function"?R.valueOf():R;R=C(I)?I+"":I}if(typeof R!="string")return R===0?R:+R;R=R.replace(e,"");var g=o.test(R);return g||a.test(R)?l(R.slice(2),g?2:8):t.test(R)?i:+R}return Cn=_,Cn}var Rt={exports:{}},et={exports:{}},Yl=et.exports,Gr;function Ql(){return Gr||(Gr=1,(function(){var r,i,n,e,t,o;typeof performance<"u"&&performance!==null&&performance.now?et.exports=function(){return performance.now()}:typeof xt<"u"&&xt!==null&&xt.hrtime?(et.exports=function(){return(r()-t)/1e6},i=xt.hrtime,r=function(){var a;return a=i(),a[0]*1e9+a[1]},e=r(),o=xt.uptime()*1e9,t=e-o):Date.now?(et.exports=function(){return Date.now()-n},n=Date.now()):(et.exports=function(){return new Date().getTime()-n},n=new Date().getTime())}).call(Yl)),et.exports}var Wr;function Jl(){if(Wr)return Rt.exports;Wr=1;for(var r=Ql(),i=typeof window>"u"?Pt:window,n=["moz","webkit"],e="AnimationFrame",t=i["request"+e],o=i["cancel"+e]||i["cancelRequest"+e],a=0;!t&&a<n.length;a++)t=i[n[a]+"Request"+e],o=i[n[a]+"Cancel"+e]||i[n[a]+"CancelRequest"+e];if(!t||!o){var l=0,s=0,c=[],d=1e3/60;t=function(f){if(c.length===0){var u=r(),p=Math.max(0,d-(u-l));l=p+u,setTimeout(function(){var h=c.slice(0);c.length=0;for(var v=0;v<h.length;v++)if(!h[v].cancelled)try{h[v].callback(l)}catch(y){setTimeout(function(){throw y},0)}},Math.round(p))}return c.push({handle:++s,callback:f,cancelled:!1}),s},o=function(f){for(var u=0;u<c.length;u++)c[u].handle===f&&(c[u].cancelled=!0)}}return Rt.exports=function(f){return t.call(i,f)},Rt.exports.cancel=function(){o.apply(i,arguments)},Rt.exports.polyfill=function(f){f||(f=i),f.requestAnimationFrame=t,f.cancelAnimationFrame=o},Rt.exports}var qt={},$r;function Zl(){if($r)return qt;$r=1,Object.defineProperty(qt,"__esModule",{value:!0}),qt.default=r;function r(i){return i.displayName||i.name||(typeof i=="string"&&i.length>0?i:"Unknown")}return qt}var lt={},Hr;function es(){if(Hr)return lt;Hr=1,Object.defineProperty(lt,"__esModule",{value:!0}),lt.noop=r,lt.intBetween=i,lt.getCoords=n;function r(){}function i(e,t,o){return Math.floor(Math.min(t,Math.max(e,o)))}function n(e){return e.type==="touchmove"?{x:e.changedTouches[0].clientX,y:e.changedTouches[0].clientY}:{x:e.clientX,y:e.clientY}}return lt}var Ur;function ts(){if(Ur)return Ie;Ur=1,Object.defineProperty(Ie,"__esModule",{value:!0}),Ie.createHorizontalStrength=w,Ie.createVerticalStrength=S,Ie.createScrollingComponent=U,Ie.default=q,Ie.defaultVerticalStrength=Ie.defaultHorizontalStrength=void 0;var r=d(Qi()),i=c(Ji()),n=Ta(),e=c(Xl()),t=c(Jl()),o=c(Zl()),a=Ha,l=c(ka()),s=es();function c(A){return A&&A.__esModule?A:{default:A}}function d(A){if(A&&A.__esModule)return A;var W={};if(A!=null){for(var H in A)if(Object.prototype.hasOwnProperty.call(A,H)){var V=Object.defineProperty&&Object.getOwnPropertyDescriptor?Object.getOwnPropertyDescriptor(A,H):{};V.get||V.set?Object.defineProperty(W,H,V):W[H]=A[H]}}return W.default=A,W}function f(A){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?f=function(H){return typeof H}:f=function(H){return H&&typeof Symbol=="function"&&H.constructor===Symbol&&H!==Symbol.prototype?"symbol":typeof H},f(A)}function u(){return u=Object.assign||function(A){for(var W=1;W<arguments.length;W++){var H=arguments[W];for(var V in H)Object.prototype.hasOwnProperty.call(H,V)&&(A[V]=H[V])}return A},u.apply(this,arguments)}function p(A,W){if(A==null)return{};var H=h(A,W),V,K;if(Object.getOwnPropertySymbols){var J=Object.getOwnPropertySymbols(A);for(K=0;K<J.length;K++)V=J[K],!(W.indexOf(V)>=0)&&Object.prototype.propertyIsEnumerable.call(A,V)&&(H[V]=A[V])}return H}function h(A,W){if(A==null)return{};var H={},V=Object.keys(A),K,J;for(J=0;J<V.length;J++)K=V[J],!(W.indexOf(K)>=0)&&(H[K]=A[K]);return H}function v(A,W){if(!(A instanceof W))throw new TypeError("Cannot call a class as a function")}function y(A,W){for(var H=0;H<W.length;H++){var V=W[H];V.enumerable=V.enumerable||!1,V.configurable=!0,"value"in V&&(V.writable=!0),Object.defineProperty(A,V.key,V)}}function _(A,W,H){return W&&y(A.prototype,W),A}function C(A,W){return W&&(f(W)==="object"||typeof W=="function")?W:R(A)}function z(A){return z=Object.setPrototypeOf?Object.getPrototypeOf:function(H){return H.__proto__||Object.getPrototypeOf(H)},z(A)}function D(A,W){if(typeof W!="function"&&W!==null)throw new TypeError("Super expression must either be null or a function");A.prototype=Object.create(W&&W.prototype,{constructor:{value:A,writable:!0,configurable:!0}}),W&&M(A,W)}function M(A,W){return M=Object.setPrototypeOf||function(V,K){return V.__proto__=K,V},M(A,W)}function R(A){if(A===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return A}function I(A,W,H){return W in A?Object.defineProperty(A,W,{value:H,enumerable:!0,configurable:!0,writable:!0}):A[W]=H,A}var g=150;function w(A){return function(H,V){var K=H.x,J=H.w,X=H.y,Z=H.h,B=Math.min(J/2,A),Q=V.x>=K&&V.x<=K+J,te=Q&&V.y>=X&&V.y<=X+Z;if(te){if(V.x<K+B)return(V.x-K-B)/B;if(V.x>K+J-B)return-(K+J-V.x-B)/B}return 0}}function S(A){return function(H,V){var K=H.y,J=H.h,X=H.x,Z=H.w,B=Math.min(J/2,A),Q=V.y>=K&&V.y<=K+J,te=Q&&V.x>=X&&V.x<=X+Z;if(te){if(V.y<K+B)return(V.y-K-B)/B;if(V.y>K+J-B)return-(K+J-V.y-B)/B}return 0}}var O=w(g);Ie.defaultHorizontalStrength=O;var j=S(g);Ie.defaultVerticalStrength=j;function U(A){var W=function(H){D(V,H);function V(K,J){var X;return v(this,V),X=C(this,z(V).call(this,K,J)),I(R(R(X)),"updateScrolling",(0,e.default)(function(Z){var B=X.container.getBoundingClientRect(),Q=B.left,te=B.top,F=B.width,G=B.height,N={x:Q,y:te,w:F,h:G},T=(0,s.getCoords)(Z),x=X.props,$=x.horizontalStrength,Y=x.verticalStrength;X.scaleX=$(N,T),X.scaleY=Y(N,T),!X.frame&&(X.scaleX||X.scaleY)&&X.startScrolling()},100,{trailing:!1})),I(R(R(X)),"handleEvent",function(Z){X.dragging&&!X.attached&&(X.attach(),X.updateScrolling(Z))}),X.wrappedInstance=r.default.createRef(),X.scaleX=0,X.scaleY=0,X.frame=null,X.attached=!1,X.dragging=!1,X}return _(V,[{key:"componentDidMount",value:function(){var J=this;this.container=(0,n.findDOMNode)(this.wrappedInstance.current),this.container&&typeof this.container.addEventListener=="function"&&this.container.addEventListener("dragover",this.handleEvent),window.document.body.addEventListener("touchmove",this.handleEvent);var X=this.props.dragDropManager;this.clearMonitorSubscription=X.getMonitor().subscribeToStateChange(function(){return J.handleMonitorChange()})}},{key:"componentWillUnmount",value:function(){this.container&&typeof this.container.removeEventListener=="function"&&this.container.removeEventListener("dragover",this.handleEvent),window.document.body.removeEventListener("touchmove",this.handleEvent),this.clearMonitorSubscription(),this.stopScrolling()}},{key:"handleMonitorChange",value:function(){var J=this.props.dragDropManager,X=J.getMonitor().isDragging();!this.dragging&&X?this.dragging=!0:this.dragging&&!X&&(this.dragging=!1,this.stopScrolling())}},{key:"attach",value:function(){this.attached=!0,window.document.body.addEventListener("dragover",this.updateScrolling),window.document.body.addEventListener("touchmove",this.updateScrolling)}},{key:"detach",value:function(){this.attached=!1,window.document.body.removeEventListener("dragover",this.updateScrolling),window.document.body.removeEventListener("touchmove",this.updateScrolling)}},{key:"startScrolling",value:function(){var J=this,X=0,Z=function B(){var Q=J.scaleX,te=J.scaleY,F=J.container,G=J.props,N=G.strengthMultiplier,T=G.onScrollChange;if(N===0||Q+te===0){J.stopScrolling();return}if(X+=1,X%2){var x=F.scrollLeft,$=F.scrollTop,Y=F.scrollWidth,ee=F.scrollHeight,se=F.clientWidth,fe=F.clientHeight,Ce=Q?F.scrollLeft=(0,s.intBetween)(0,Y-se,x+Q*N):x,Le=te?F.scrollTop=(0,s.intBetween)(0,ee-fe,$+te*N):$;T(Ce,Le)}J.frame=(0,t.default)(B)};Z()}},{key:"stopScrolling",value:function(){this.detach(),this.scaleX=0,this.scaleY=0,this.frame&&(t.default.cancel(this.frame),this.frame=null)}},{key:"render",value:function(){var J=this.props;J.strengthMultiplier,J.verticalStrength,J.horizontalStrength,J.onScrollChange;var X=p(J,["strengthMultiplier","verticalStrength","horizontalStrength","onScrollChange"]);return r.default.createElement(A,u({ref:this.wrappedInstance},X))}}]),V}(r.Component);return I(W,"displayName","Scrolling(".concat((0,o.default)(A),")")),I(W,"propTypes",{dragDropManager:i.default.object.isRequired,onScrollChange:i.default.func,verticalStrength:i.default.func,horizontalStrength:i.default.func,strengthMultiplier:i.default.number}),I(W,"defaultProps",{onScrollChange:s.noop,verticalStrength:j,horizontalStrength:O,strengthMultiplier:30}),(0,l.default)(W,A)}function q(A){var W=U(A);return function(H){return r.default.createElement(a.DragDropContextConsumer,null,function(V){var K=V.dragDropManager;return K===void 0?null:r.default.createElement(W,u({},H,{dragDropManager:K}))})}}return Ie}var en=ts();const ns=sn(en);var rs=Ua();const Br=sn(rs);function go(){var r=this.constructor.getDerivedStateFromProps(this.props,this.state);r!=null&&this.setState(r)}function vo(r){function i(n){var e=this.constructor.getDerivedStateFromProps(r,n);return e??null}this.setState(i.bind(this))}function mo(r,i){try{var n=this.props,e=this.state;this.props=r,this.state=i,this.__reactInternalSnapshotFlag=!0,this.__reactInternalSnapshot=this.getSnapshotBeforeUpdate(n,e)}finally{this.props=n,this.state=e}}go.__suppressDeprecationWarning=!0;vo.__suppressDeprecationWarning=!0;mo.__suppressDeprecationWarning=!0;function Wt(r){var i=r.prototype;if(!i||!i.isReactComponent)throw new Error("Can only polyfill class components");if(typeof r.getDerivedStateFromProps!="function"&&typeof i.getSnapshotBeforeUpdate!="function")return r;var n=null,e=null,t=null;if(typeof i.componentWillMount=="function"?n="componentWillMount":typeof i.UNSAFE_componentWillMount=="function"&&(n="UNSAFE_componentWillMount"),typeof i.componentWillReceiveProps=="function"?e="componentWillReceiveProps":typeof i.UNSAFE_componentWillReceiveProps=="function"&&(e="UNSAFE_componentWillReceiveProps"),typeof i.componentWillUpdate=="function"?t="componentWillUpdate":typeof i.UNSAFE_componentWillUpdate=="function"&&(t="UNSAFE_componentWillUpdate"),n!==null||e!==null||t!==null){var o=r.displayName||r.name,a=typeof r.getDerivedStateFromProps=="function"?"getDerivedStateFromProps()":"getSnapshotBeforeUpdate()";throw Error(`Unsafe legacy lifecycles will not be called for components using new component APIs.
2
+ import{e as ln,r as k,f as Pt,p as xt,d as Qi,h as Ta,g as sn,c as cn,a as oe}from"./vendor-react-Dvs43sk9.js";import{j as m,U as Pa,dS as ka,ax as Ji,a as Zi,ca as E,_ as le,W as b,al as eo,s as Je,ak as ce,T as Pe,a1 as Oa,a0 as Ir,I as Oe,aN as An,Q as rn,J as tr,z as ft,A as jn,aJ as to,am as za,bE as Da,a6 as Na,y as no,bV as La,at as Ma,c2 as Tr,ar as mn,D as Ea,E as Aa,P as Zt,cf as Pr,x as ja,bc as kr,M as Or,bi as Sn,cX as zr}from"./vendor-mui-core-CnXrAOs3.js";import{a5 as Fa,aY as Ga,aZ as Wa,aW as $a,V as ze,a_ as Ha,a$ as Ua,b0 as P,b1 as Ba,b2 as Va,b3 as Dr,X as qa,a9 as Ka,aa as Xa,U as Se,l as nr,b4 as ro,_ as Ya,H as kt,b as Qa,n as Ja,T as Za,W as io}from"./vendor-ux-CzE32faw.js";import{g as Gt,b as re,z as el,j as oo,u as ao,A as tl,a as nl}from"./vendor-hooks-CjESGRlR.js";import{ao as rl,ap as il,aq as ol,G as Le,C as Ie,Z as Lt,o as al,b as ll,g as sl,a3 as cl,F as ht,ar as lo,as as dl,af as Nr,at as ul,a as fl,A as hl,I as pl,i as gl,n as Ae}from"./vendor-utils-cJEl_UEd.js";import{b6 as vl,c7 as ml,ci as so,a5 as Sl,c6 as yl,bo as Cl,ac as at,c as ve,e as wl,Y as qe,Z as rr,aZ as nt,_ as co,cj as bl,ck as xl,r as _l,X as Rl}from"./index-CDLNMKDM.js";import{r as Il}from"./omit-hhiOJGRf.js";import{r as Tl}from"./cloneDeep-C6qewg0C.js";import{r as Pl}from"./index-BPy8_fa2.js";import{_ as pe,a as ge,b as xe,c as _e,d as Re,e as kl,f as uo}from"./createClass-D9-Z7Ng8.js";import{u as Ol,b as zl,C as $e}from"./index.esm-JPZAjt0x.js";import{S as Fn}from"./simple-select-DWI2SRq6.js";import{u as fo,a as Dl}from"./team-CCbX1N7p.js";import{a as Nl}from"./api-Btn0Tp3W.js";import{_ as Ll}from"./index-DVeHusdz.js";import{G as Ml}from"./dashboard-Blst3P1q.js";import{t as El}from"./index-BcWDbRWR.js";import{D as Al,C as jl,P as Fl}from"./react-beautiful-dnd.esm-BsXmsXbi.js";import{I as Gl}from"./iframe-DqyN02cu.js";import{f as Lr}from"./index-DBs9Ljax.js";import"./lottie-web-4koyQiv_.js";import"./vendor-arcblock-DrHS8FbJ.js";import"./arrow-down.svg-BIX16b-P.js";import"./session-BDmvqOvc.js";import"./isURL-B8QEuluM.js";import"./use-app-logo-lNueneHC.js";import"./useLocalStorage-E5ZXDlU2.js";import"./confirm-Cb7UwqYS.js";import"./get-safe-url-mHb8MGmt.js";import"./passport-Be2_BAlL.js";import"./create-passport-svg--kCsicWA.js";import"./useAsyncRetry-DwwEjrjs.js";import"./useAsync-cZ_FPf9k.js";import"./useSetState-DFuQZPPV.js";import"./index-DEoXYS44.js";import"./over-due-invoice-payment-BXBLnoyA.js";import"./use-mobile-DCNBsOlH.js";import"./raf-schd.esm-CHNehTG3.js";var _t={};const Wl=ln(rl),$l=ln(il),Hl=ln(ol);var Mr;function Ul(){return Mr||(Mr=1,function(r){var i=_t&&_t.__importDefault||function(F){return F&&F.__esModule?F:{default:F}};Object.defineProperty(r,"__esModule",{value:!0}),r.sortRootNavigation=r.cleanOldNavigationHistory=r.checkLink=void 0,r.parseNavigation=te,r.deepWalk=R,r.isMatchSection=I,r.nestNavigationList=J,r.filterNavigation=X,r.cleanOrphanNavigation=Z,r.joinLink=j,r.flattenNavigation=U,r.splitNavigationBySection=K;const n=vl(),e=i(Wl),t=i(Fa),o=i(Ga),a=i($l),l=i(ml),s=i(Il),c=i(Tl),d=Cl(),f=i(Pl()),u=i(so()),p=i(Wa),h=i($a),v=i(Hl),y=Sl(),_=yl();Object.defineProperty(r,"checkLink",{enumerable:!0,get:function(){return _.checkLink}});const C="header",z="/",D="/",L="/";function R(F,G=()=>{},{key:N="children",order:T="first"}={}){function x($,{index:Y=0,parent:ee=null,level:se=0}={}){Array.isArray($)?$.forEach((fe,we)=>{x(fe,{index:we,parent:ee,level:se+1})}):$&&(T==="first"&&G($,ee,{index:Y,level:se}),x($[N],{parent:$,level:se}),T==="last"&&G($,ee,{index:Y,level:se}))}x(F)}function I(F,G){return G===C&&(0,a.default)(F)?!0:Array.isArray(F)?F.includes(G):F===G}function g(F){try{return JSON.parse(F)}catch{return F}}function w(F){return F.map(G=>{const N={...G};return N.role&&(N.role=g(N.role)),N.section&&(N.section=g(N.section)),N.title&&(N.title=g(N.title)),N.description&&(N.description=g(N.description)),N.link&&(N.link=g(N.link)),N})}function S(F="/",G=""){if((0,u.default)(G||""))return G;const N=f.default.join(F,G||D);return N.length>1&&N.endsWith("/")?N.slice(0,N.length-1):N}function O(F,G,{strict:N=!0}={}){let T=F,x=G;return N||(T=T||"/",x=x||"/"),(0,p.default)(T)&&(0,h.default)(x)&&(0,_.checkLink)(x)?Object.keys(T).reduce(($,Y)=>($[Y]=S(T[Y],x),$),{}):(0,h.default)(T)&&(0,_.checkLink)(T)&&(0,p.default)(x)?Object.keys(x).reduce(($,Y)=>($[Y]=S(T,x[Y]),$),{}):(0,h.default)(T)&&(0,h.default)(x)?(0,_.checkLink)(T)||(0,_.checkLink)(x)?S(T,x):x:(0,p.default)(T)&&(0,p.default)(x)?[...new Set([...Object.keys(T),...Object.keys(x)])].reduce((Y,ee)=>(Y[ee]=S(T[ee],x[ee]),Y),{}):x}function j(F,G){const N=(0,c.default)(F);return R(N,(T,x)=>{const $=T.component||T.child;if($){const Y=G.find(ee=>ee.name===$);Y&&(T.link=O(Y.link,T.link,{strict:!1}))}else x&&(T.link=O(x.link,T.link))},{key:"items"}),N}function U(F=[],{depth:G=1,transform:N=T=>T}={}){const T=(0,c.default)(F),x=[];return R(T,($,Y,{level:ee})=>{if(ee>=G){const{items:se=[]}=$;if(se&&Array.isArray(se)&&se.length>0){delete $.items;const fe=se.map(we=>N(we,$));if(Y)Y.items.push(...fe);else{const we=N((0,s.default)($,["items"]),Y);x.push(we,...fe)}}else if(ee===1){const fe=N((0,s.default)($,["items"]),Y);x.push(fe)}}else ee===1&&x.push($)},{key:"items",order:"last"}),x}function q(F){if(F.section!=="bottomNavigation")return F;const G={...F};return n.NAVIGATION_I18N_FIELDS.forEach(N=>{const T=G[N];typeof T=="string"&&(G[N]={en:T})}),G}function A(F={}){const G=[];function N(x,$={}){const Y=[],{children:ee=[],meta:se={}}=x,fe=(0,c.default)(se?.navigation||[]);(0,y.hasStartEngine)(se)&&x.meta?.capabilities?.navigation!==!1&&Y.push(...fe);const we=$.name||"",Ee=$.mountPoint||z,he=x===F?"":se.name||"",De=x===F?"":x.mountPoint||z;for(const ne of ee){if(!(0,y.hasStartEngine)(ne.meta))continue;const ue=ne.meta.name,Ge=ne.mountPoint,bt=[we,he,ue].filter(Boolean).join("."),gn=ne.meta.navigation||[],vn=(0,d.joinURL)(Ee,De,Ge);ne.meta?.capabilities?.navigation!==!1&&G.push({did:ne.meta.did,name:bt,link:vn,title:ne.meta.title||"",navigation:gn.map(Ne=>({section:C,...Ne}))});const We=fe.find(Ne=>Ne.component?Ne.component===ue:!1);if(We){if(!We.link)if(ne.meta.navigation&&ne.meta.navigation.length>0){const Ne=N(ne,{mountPoint:De,name:he});Ne.length>0&&(We.items=We.items??[],We.items.push(...Ne))}else We.link=D}else if(ne.meta?.capabilities?.navigation!==!1){const Ne=N(ne,{mountPoint:De,name:he}),Vt={title:ne.meta.title,component:ue,id:ne.meta.did};Ne.length>0?(Vt.items=Ne,Vt.link=void 0):Vt.link=D,Y.push(Vt)}}return Y}return{navigationList:N(F),components:G}}function W(F){const G=(0,c.default)(F).filter(N=>N.id);return R(G,(N,T)=>{if(N.items&&N.items.length){for(let x=N.items.length-1;x>=0;x--)N.items[x].id||N.items.splice(x,1);N.items.length===0&&N.component&&(N.link=N.link||D)}T&&(N.parent=T.id,N.id=[T.id,N.id].join(L)),N.from=N.from||"yaml",N.visible=N.visible??!0},{key:"items"}),G}function H(F,G=2){const N=(0,c.default)(F),T=U(N,{depth:G,transform:(x,$)=>($&&(x._parent||(x._parent=$.id,$.component||(x.link=O($.link,x.link))),x.section=x.section||$.section||[C],x.visible=x.visible??$.visible,$.role&&(x.role=x.role||$.role)),x.component=[$.component,x.component].filter(Boolean).join("."),x)});return R(T,x=>{x.items&&x.items.length>0&&x.items.reduceRight(($,Y)=>{if(Y._parent){const ee=x.items.findIndex(se=>se.id===Y._parent);ee>=0&&x.items.splice(ee,1),delete Y._parent}return null},null)},{key:"items"}),T}function V(F,G){return G&&Array.isArray(F.items)?F.items.filter(N=>(0,a.default)(N.section)?I(F.section,G):!!I(N.section,G)).map(N=>({...N,section:G})):[]}function K(F){const G=(0,c.default)(F),N=[];for(const T of G){let Y=function(ee,se){const fe=V(ee,se);$.push({...x,section:se,items:fe})};const x=(0,c.default)((0,s.default)(T,["items"])),$=[];if(Array.isArray(T.section))for(const ee of T.section)Y(T,ee);else if(T.section){const{section:ee}=T;Y(T,ee)}else if(T.items&&T.items.length>0){const ee=T.items.reduce((fe,we)=>{const{section:Ee=[C]}=we||{};return fe.push(...Ee),fe},[]),se=[...new Set(ee)];for(const fe of se)Y(T,fe)}else $.push({...T,section:C});N.push(...$)}return N}function J(F=[]){const G=(0,c.default)(F);return G.reduceRight((N,T,x)=>{if(T.parent){const $=G.find(Y=>T.section&&Y.section?Y.section===T.section&&Y.id===T.parent:Y.id===T.parent);$&&($.items||($.items=[]),$.items=[T,...$.items]),G.splice(x,1)}return null},null),G}function X(F,G=[]){const N=J(F);return R(N,x=>{if(x?.component&&(G.some($=>$.name===x.component)||(x.visible=!1)),x.items&&x.items.length)for(let $=x.items.length-1;$>=0;$--)x.items[$].visible===!1&&x.items.splice($,1)},{key:"items"}),N.filter(x=>!(x.visible===!1||x.items&&Array.isArray(x.items)&&x.items.length>0&&x.items?.every($=>$.visible===!1)))}function Z(F){return F.map(G=>G.items&&Array.isArray(G.items)&&G.items.length===1&&["header","footer","",void 0,null].includes(G.section)?G.items[0]:G)}const B=F=>{const[G,N]=(0,v.default)(F,T=>T.id==="/team");return[...G,...N]};r.sortRootNavigation=B;const Q=F=>{const[,G]=(0,v.default)(F,N=>{const T=typeof N.title=="string"?N.title:N.title?.en;return N.id==="/team"&&T==="Access"||N.id==="/dashboard"&&T==="Blocklet"});return G};r.cleanOldNavigationHistory=Q;function te(F={},G={}){const{beforeProcess:N=ne=>ne}=G,{navigationList:T,components:x}=A(F),$=new Map;T.forEach(ne=>{ne.items?.forEach(ue=>{$.set((0,d.joinURL)(ne.id,ue.id),ue)})});const Y=(0,l.default)(F,"settings.org.enabled",!1);F?.settings?.navigations&&(Array.isArray(F.settings.navigations)?F.settings.navigations=[...F.settings.navigations].filter(ne=>!(ne?.parent==="/team"&&ne.from==="team-tmpl")).map(ne=>{if(ne.section==="userCenter"&&!Object.prototype.hasOwnProperty.call(ne,"private")){const ue=$.get(ne.id);ue&&Object.prototype.hasOwnProperty.call(ue,"private")&&(ne.private=ue.private)}return!Y&&ne.section==="userCenter"&&ne.id==="/userCenter/orgs"?null:ne}).filter(Boolean):F.settings.navigations=[]);const ee=w(Q(F?.settings?.navigations||[])).map(q),se=H(N(T)),fe=W(se),Ee=K(fe).reduce((ne,ue)=>["bottom","social","sessionManager","userCenter"].includes(ue.section)&&ue.items&&ue.items.length>0?(ne.push(...ue.items.map(bt=>{const{section:gn}=ue,vn=O(ue.link,bt.link),We=[ue.component,bt.component].filter(Boolean).join(".");return{...bt,section:gn,link:vn,component:We,parent:""}})),ne):(ne.push(ue),ne),[]),he=U(Ee,{transform(ne,ue){let{component:Ge}=ne;return ue?.component&&(Ge=[ue.component,ne.component].filter(Boolean).join(".")),q({...ne,component:Ge})}});return{navigationList:(0,e.default)(ee,he,(ne,ue)=>{const Ge=["id","section"];return(0,t.default)((0,o.default)(ne,Ge),(0,o.default)(ue,Ge))}),components:x,builtinList:he}}}(_t)),_t}var ye=Ul();const ho=k.createContext(null),Er="/",Bl="header",Ar={dashboard:[{id:"/team",title:{en:"Access",zh:"访问控制"},role:["owner","admin","member"],section:["dashboard"],link:"",from:"team-tmpl",items:[{id:"member",title:{en:"Members",zh:"成员"},icon:"ant-design:user-outlined",link:`${ve.WELLKNOWN_SERVICE_PATH_PREFIX}/admin/members`,from:"team-tmpl"},{id:"passport",title:{en:"Passport",zh:"通行证"},icon:"icon-park-outline:passport",link:`${ve.WELLKNOWN_SERVICE_PATH_PREFIX}/admin/passports`,from:"team-tmpl"}]},{id:"/dashboard",title:"Blocklet",role:["owner","admin"],section:["dashboard"],link:"",from:"team-tmpl",items:[{id:"dashboard",title:{en:"Dashboard",zh:"仪表盘"},icon:"ant-design:dashboard-outlined",link:`${ve.WELLKNOWN_SERVICE_PATH_PREFIX}/admin`,from:"team-tmpl"}]}],userCenter:[{id:"/userCenter/notification",title:{en:"Notifications",zh:"通知"},icon:"ant-design:bell-outlined",link:Ie(ve.WELLKNOWN_SERVICE_PATH_PREFIX,"/user/notifications"),from:"team-tmpl",section:["userCenter"]},{id:"/userCenter/orgs",title:{en:"Organizations",zh:"组织"},icon:"ant-design:team-outlined",link:Ie(ve.WELLKNOWN_SERVICE_PATH_PREFIX,"/user/orgs"),from:"team-tmpl",section:["userCenter"],shouldDisplay:r=>r.settings?.org?.enabled},{id:"/userCenter/nfts",title:{en:"NFTs",zh:"NFTs"},icon:"ant-design:gold-outlined",link:Ie(ve.WELLKNOWN_SERVICE_PATH_PREFIX,"/user/nfts"),from:"team-tmpl",section:["userCenter"]},{id:"/userCenter/settings",title:{en:"Settings",zh:"设置"},icon:"ant-design:setting-outlined",link:Ie(ve.WELLKNOWN_SERVICE_PATH_PREFIX,"/user/settings"),from:"team-tmpl",section:["userCenter"]},{id:"/userCenter/did-spaces",title:{en:"DID Spaces",zh:"DID Spaces"},icon:"ant-design:cloud-outlined",link:Ie(ve.WELLKNOWN_SERVICE_PATH_PREFIX,"/user/did-spaces"),from:"team-tmpl",section:["userCenter"]},{id:"/userCenter/user-followers",title:{en:"Following & Followers",zh:"关注 & 粉丝"},icon:"ant-design:user-outlined",link:Ie(ve.WELLKNOWN_SERVICE_PATH_PREFIX,"/user/user-followers"),from:"team-tmpl",section:["userCenter"]}]};function yn(r,i){return r.section&&i.section?r.section===i.section&&r.id===i.id:r.id===i.id}const He=(r,i,n,e,t=!0)=>({id:r,from:"team-tmpl",title:i,icon:n,link:Ie(ve.WELLKNOWN_SERVICE_PATH_PREFIX,e),visible:t}),Vl=(r,i,n)=>({id:r,from:"team-tmpl",title:i,role:["owner","admin","member"],section:["dashboard"],link:"",items:n}),ql=(r,i)=>{const n=ye.cleanOldNavigationHistory(i);return n.findIndex(t=>t.id==="/team")===-1&&n.unshift(Vl("/team",r("navigation.blockletService"),[He("dashboard",r("navigation.dashboard"),"ant-design:dashboard-outlined","/admin"),He("did-connect",r("navigation.didConnect"),"tabler:users","/admin/did-connect"),He("website",r("navigation.website"),"icon-park-twotone:upload-web","/admin/website"),He("operation",r("navigation.operations"),"grommet-icons:configure","/admin/operations"),He("integration",r("navigation.integration"),"hugeicons:webhook","/admin/integrations"),He("developer",r("navigation.developer"),"heroicons:command-line","/admin/developers"),He("did-spaces",r("navigation.didSpaces"),"icon-park-outline:cloud-storage","/admin/did-spaces"),He("studio",r("navigation.studio"),"eos-icons:subscriptions-created-outlined","/admin/publish/publish")])),n};function jr({name:r}){return m.jsx(Pa,{label:`Uninstalled: ${r}`,color:"error",size:"small",variant:"outlined",sx:{fontSize:10,height:20}})}function Kl({children:r}){const{blocklet:i,actions:n}=at(),{t:e}=ze(),{navigationList:t,components:o,builtinList:a}=ye.parseNavigation(i,{beforeProcess(R){const I=Le(R);return["dashboard","userCenter"].forEach(g=>{Object.prototype.hasOwnProperty.call(Ar,g)&&Ar[g].forEach(w=>{(w.shouldDisplay&&typeof w.shouldDisplay=="function"?w.shouldDisplay:()=>!0)(i)&&!I.some(O=>O.id===w.id)&&I.push(w)})}),ql(e,I)}}),l=Gt({rawNavigation:Le(t),activeSection:Bl,components:o}),s=k.useMemo(()=>ye.nestNavigationList(Le(l.rawNavigation)),[l.rawNavigation]),c=k.useMemo(()=>{const R=ye.filterNavigation(Le(l.rawNavigation),o);return ye.joinLink(R,o)},[o,l.rawNavigation]),d=k.useCallback(R=>{if(!R.id)return"";const I=ye.flattenNavigation(ye.joinLink(s,o)),g=I.find(w=>w.id===R.id);if(g?.component){if(!o.some(w=>w.name===g.component))return m.jsx(jr,{name:g.component})}else if(g.parent){const w=I.find(S=>S.id===g.parent);if(w?.component&&!o.some(S=>S.name===w.component))return m.jsx(jr,{name:w.component})}return g?.link},[s,o]),f=k.useCallback(R=>{l.activeSection=R},[l]),u=k.useCallback(R=>{const I=[];ye.deepWalk(R,(w,S)=>{const O={...Lt(w,["children","expand"]),parent:S?.id};I.push(O)});const g=Le(l.rawNavigation).filter(w=>{if(!l.activeSection)return!1;const S=I.find(O=>yn(O,w));return S?!ye.isMatchSection(S.section,l.activeSection):!0});l.rawNavigation=[...g,...I]},[l]),p=k.useCallback((R=[])=>{const I=Le(l.rawNavigation).map(g=>{const w=R.find(S=>yn({...S,section:l.activeSection},g));return w?{...g,...w}:g});l.rawNavigation=I},[l]),h=k.useCallback((R,I=Er)=>R.map(w=>{const O=o.find(q=>q.name===w.component)?.link||I,j=w.items||[],{link:U}=w;return{title:w.title,description:w.description,subtitle:d(w),link:U,icon:w.icon,children:h(j,U||Er),section:w.section,visible:w.visible,parent:w.parent,component:w.component,id:w.id,role:w.role,from:w.from,__base:O}}),[o,d]),v=k.useCallback(R=>{p([R])},[p]),y=k.useCallback(R=>{const I=l.rawNavigation.filter(g=>g.id===R||g.parent===R).map(g=>g.id);l.rawNavigation=Le(l.rawNavigation).filter(g=>!I.includes(g.id))},[l]),_=k.useCallback((R={},I=-1)=>{const g={...R,id:wl.nanoid(),section:l.activeSection,visible:!0},w=[...l.rawNavigation],S=w.filter(O=>O.section===l.activeSection);if(I<0||I>S.length-1)w.push(g);else{const O=S[I],j=w.findIndex(U=>yn(U,O));w.splice(j,0,g)}return l.rawNavigation=w,g},[l]),C=k.useCallback(R=>{const g=Le(s).filter(w=>ye.isMatchSection(w.section,R));return h(g)},[s,h]),z=k.useCallback(async R=>{const g=R.map(w=>al(w,ll)).map(w=>{const S={...w};return S.role&&Array.isArray(S.role)&&(S.role=JSON.stringify(S.role)),S.section&&Array.isArray(S.section)&&(S.section=JSON.stringify(S.section)),S.title&&S.title instanceof Object&&(S.title=JSON.stringify(S.title)),S.description&&S.description instanceof Object&&(S.description=JSON.stringify(S.description)),S.link&&S.link instanceof Object&&(S.link=JSON.stringify(S.link)),S});await n.configNavigations(g)},[n]),D=k.useCallback(async R=>{if(R){const I=a.filter(w=>ye.isMatchSection(w.section,R)),g=l.rawNavigation.filter(w=>!ye.isMatchSection(w.section,R));await z(g),l.rawNavigation=[...g,...I]}else await z([]),l.rawNavigation=Le(a)},[z,l,a]),L=k.useMemo(()=>({state:l,navigation:c,components:o,getNavigationFullLink:d,updateActiveSection:f,updateNavigationItem:v,delNavigationItem:y,addNavigationItem:_,updateNavigationTree:u,getNavigation:C,saveNavigationList:z,resetNavigation:D}),[l,c,o,d,f,v,y,_,u,C,z,D]);return m.jsx(ho.Provider,{value:L,children:r})}function po(){const r=k.useContext(ho);if(!r)throw new Error("useNavigation must be used within a NavigationProvider");return r}var Te={},Cn,Fr;function Xl(){if(Fr)return Cn;Fr=1;var r="Expected a function",i=NaN,n="[object Symbol]",e=/^\s+|\s+$/g,t=/^[-+]0x[0-9a-f]+$/i,o=/^0b[01]+$/i,a=/^0o[0-7]+$/i,l=parseInt,s=typeof Pt=="object"&&Pt&&Pt.Object===Object&&Pt,c=typeof self=="object"&&self&&self.Object===Object&&self,d=s||c||Function("return this")(),f=Object.prototype,u=f.toString,p=Math.max,h=Math.min,v=function(){return d.Date.now()};function y(R,I,g){var w,S,O,j,U,q,A=0,W=!1,H=!1,V=!0;if(typeof R!="function")throw new TypeError(r);I=L(I)||0,C(g)&&(W=!!g.leading,H="maxWait"in g,O=H?p(L(g.maxWait)||0,I):O,V="trailing"in g?!!g.trailing:V);function K(N){var T=w,x=S;return w=S=void 0,A=N,j=R.apply(x,T),j}function J(N){return A=N,U=setTimeout(B,I),W?K(N):j}function X(N){var T=N-q,x=N-A,$=I-T;return H?h($,O-x):$}function Z(N){var T=N-q,x=N-A;return q===void 0||T>=I||T<0||H&&x>=O}function B(){var N=v();if(Z(N))return Q(N);U=setTimeout(B,X(N))}function Q(N){return U=void 0,V&&w?K(N):(w=S=void 0,j)}function te(){U!==void 0&&clearTimeout(U),A=0,w=q=S=U=void 0}function F(){return U===void 0?j:Q(v())}function G(){var N=v(),T=Z(N);if(w=arguments,S=this,q=N,T){if(U===void 0)return J(q);if(H)return U=setTimeout(B,I),K(q)}return U===void 0&&(U=setTimeout(B,I)),j}return G.cancel=te,G.flush=F,G}function _(R,I,g){var w=!0,S=!0;if(typeof R!="function")throw new TypeError(r);return C(g)&&(w="leading"in g?!!g.leading:w,S="trailing"in g?!!g.trailing:S),y(R,I,{leading:w,maxWait:I,trailing:S})}function C(R){var I=typeof R;return!!R&&(I=="object"||I=="function")}function z(R){return!!R&&typeof R=="object"}function D(R){return typeof R=="symbol"||z(R)&&u.call(R)==n}function L(R){if(typeof R=="number")return R;if(D(R))return i;if(C(R)){var I=typeof R.valueOf=="function"?R.valueOf():R;R=C(I)?I+"":I}if(typeof R!="string")return R===0?R:+R;R=R.replace(e,"");var g=o.test(R);return g||a.test(R)?l(R.slice(2),g?2:8):t.test(R)?i:+R}return Cn=_,Cn}var Rt={exports:{}},et={exports:{}},Yl=et.exports,Gr;function Ql(){return Gr||(Gr=1,(function(){var r,i,n,e,t,o;typeof performance<"u"&&performance!==null&&performance.now?et.exports=function(){return performance.now()}:typeof xt<"u"&&xt!==null&&xt.hrtime?(et.exports=function(){return(r()-t)/1e6},i=xt.hrtime,r=function(){var a;return a=i(),a[0]*1e9+a[1]},e=r(),o=xt.uptime()*1e9,t=e-o):Date.now?(et.exports=function(){return Date.now()-n},n=Date.now()):(et.exports=function(){return new Date().getTime()-n},n=new Date().getTime())}).call(Yl)),et.exports}var Wr;function Jl(){if(Wr)return Rt.exports;Wr=1;for(var r=Ql(),i=typeof window>"u"?Pt:window,n=["moz","webkit"],e="AnimationFrame",t=i["request"+e],o=i["cancel"+e]||i["cancelRequest"+e],a=0;!t&&a<n.length;a++)t=i[n[a]+"Request"+e],o=i[n[a]+"Cancel"+e]||i[n[a]+"CancelRequest"+e];if(!t||!o){var l=0,s=0,c=[],d=1e3/60;t=function(f){if(c.length===0){var u=r(),p=Math.max(0,d-(u-l));l=p+u,setTimeout(function(){var h=c.slice(0);c.length=0;for(var v=0;v<h.length;v++)if(!h[v].cancelled)try{h[v].callback(l)}catch(y){setTimeout(function(){throw y},0)}},Math.round(p))}return c.push({handle:++s,callback:f,cancelled:!1}),s},o=function(f){for(var u=0;u<c.length;u++)c[u].handle===f&&(c[u].cancelled=!0)}}return Rt.exports=function(f){return t.call(i,f)},Rt.exports.cancel=function(){o.apply(i,arguments)},Rt.exports.polyfill=function(f){f||(f=i),f.requestAnimationFrame=t,f.cancelAnimationFrame=o},Rt.exports}var qt={},$r;function Zl(){if($r)return qt;$r=1,Object.defineProperty(qt,"__esModule",{value:!0}),qt.default=r;function r(i){return i.displayName||i.name||(typeof i=="string"&&i.length>0?i:"Unknown")}return qt}var lt={},Hr;function es(){if(Hr)return lt;Hr=1,Object.defineProperty(lt,"__esModule",{value:!0}),lt.noop=r,lt.intBetween=i,lt.getCoords=n;function r(){}function i(e,t,o){return Math.floor(Math.min(t,Math.max(e,o)))}function n(e){return e.type==="touchmove"?{x:e.changedTouches[0].clientX,y:e.changedTouches[0].clientY}:{x:e.clientX,y:e.clientY}}return lt}var Ur;function ts(){if(Ur)return Te;Ur=1,Object.defineProperty(Te,"__esModule",{value:!0}),Te.createHorizontalStrength=w,Te.createVerticalStrength=S,Te.createScrollingComponent=U,Te.default=q,Te.defaultVerticalStrength=Te.defaultHorizontalStrength=void 0;var r=d(Qi()),i=c(Ji()),n=Ta(),e=c(Xl()),t=c(Jl()),o=c(Zl()),a=Ha,l=c(ka()),s=es();function c(A){return A&&A.__esModule?A:{default:A}}function d(A){if(A&&A.__esModule)return A;var W={};if(A!=null){for(var H in A)if(Object.prototype.hasOwnProperty.call(A,H)){var V=Object.defineProperty&&Object.getOwnPropertyDescriptor?Object.getOwnPropertyDescriptor(A,H):{};V.get||V.set?Object.defineProperty(W,H,V):W[H]=A[H]}}return W.default=A,W}function f(A){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?f=function(H){return typeof H}:f=function(H){return H&&typeof Symbol=="function"&&H.constructor===Symbol&&H!==Symbol.prototype?"symbol":typeof H},f(A)}function u(){return u=Object.assign||function(A){for(var W=1;W<arguments.length;W++){var H=arguments[W];for(var V in H)Object.prototype.hasOwnProperty.call(H,V)&&(A[V]=H[V])}return A},u.apply(this,arguments)}function p(A,W){if(A==null)return{};var H=h(A,W),V,K;if(Object.getOwnPropertySymbols){var J=Object.getOwnPropertySymbols(A);for(K=0;K<J.length;K++)V=J[K],!(W.indexOf(V)>=0)&&Object.prototype.propertyIsEnumerable.call(A,V)&&(H[V]=A[V])}return H}function h(A,W){if(A==null)return{};var H={},V=Object.keys(A),K,J;for(J=0;J<V.length;J++)K=V[J],!(W.indexOf(K)>=0)&&(H[K]=A[K]);return H}function v(A,W){if(!(A instanceof W))throw new TypeError("Cannot call a class as a function")}function y(A,W){for(var H=0;H<W.length;H++){var V=W[H];V.enumerable=V.enumerable||!1,V.configurable=!0,"value"in V&&(V.writable=!0),Object.defineProperty(A,V.key,V)}}function _(A,W,H){return W&&y(A.prototype,W),A}function C(A,W){return W&&(f(W)==="object"||typeof W=="function")?W:R(A)}function z(A){return z=Object.setPrototypeOf?Object.getPrototypeOf:function(H){return H.__proto__||Object.getPrototypeOf(H)},z(A)}function D(A,W){if(typeof W!="function"&&W!==null)throw new TypeError("Super expression must either be null or a function");A.prototype=Object.create(W&&W.prototype,{constructor:{value:A,writable:!0,configurable:!0}}),W&&L(A,W)}function L(A,W){return L=Object.setPrototypeOf||function(V,K){return V.__proto__=K,V},L(A,W)}function R(A){if(A===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return A}function I(A,W,H){return W in A?Object.defineProperty(A,W,{value:H,enumerable:!0,configurable:!0,writable:!0}):A[W]=H,A}var g=150;function w(A){return function(H,V){var K=H.x,J=H.w,X=H.y,Z=H.h,B=Math.min(J/2,A),Q=V.x>=K&&V.x<=K+J,te=Q&&V.y>=X&&V.y<=X+Z;if(te){if(V.x<K+B)return(V.x-K-B)/B;if(V.x>K+J-B)return-(K+J-V.x-B)/B}return 0}}function S(A){return function(H,V){var K=H.y,J=H.h,X=H.x,Z=H.w,B=Math.min(J/2,A),Q=V.y>=K&&V.y<=K+J,te=Q&&V.x>=X&&V.x<=X+Z;if(te){if(V.y<K+B)return(V.y-K-B)/B;if(V.y>K+J-B)return-(K+J-V.y-B)/B}return 0}}var O=w(g);Te.defaultHorizontalStrength=O;var j=S(g);Te.defaultVerticalStrength=j;function U(A){var W=function(H){D(V,H);function V(K,J){var X;return v(this,V),X=C(this,z(V).call(this,K,J)),I(R(R(X)),"updateScrolling",(0,e.default)(function(Z){var B=X.container.getBoundingClientRect(),Q=B.left,te=B.top,F=B.width,G=B.height,N={x:Q,y:te,w:F,h:G},T=(0,s.getCoords)(Z),x=X.props,$=x.horizontalStrength,Y=x.verticalStrength;X.scaleX=$(N,T),X.scaleY=Y(N,T),!X.frame&&(X.scaleX||X.scaleY)&&X.startScrolling()},100,{trailing:!1})),I(R(R(X)),"handleEvent",function(Z){X.dragging&&!X.attached&&(X.attach(),X.updateScrolling(Z))}),X.wrappedInstance=r.default.createRef(),X.scaleX=0,X.scaleY=0,X.frame=null,X.attached=!1,X.dragging=!1,X}return _(V,[{key:"componentDidMount",value:function(){var J=this;this.container=(0,n.findDOMNode)(this.wrappedInstance.current),this.container&&typeof this.container.addEventListener=="function"&&this.container.addEventListener("dragover",this.handleEvent),window.document.body.addEventListener("touchmove",this.handleEvent);var X=this.props.dragDropManager;this.clearMonitorSubscription=X.getMonitor().subscribeToStateChange(function(){return J.handleMonitorChange()})}},{key:"componentWillUnmount",value:function(){this.container&&typeof this.container.removeEventListener=="function"&&this.container.removeEventListener("dragover",this.handleEvent),window.document.body.removeEventListener("touchmove",this.handleEvent),this.clearMonitorSubscription(),this.stopScrolling()}},{key:"handleMonitorChange",value:function(){var J=this.props.dragDropManager,X=J.getMonitor().isDragging();!this.dragging&&X?this.dragging=!0:this.dragging&&!X&&(this.dragging=!1,this.stopScrolling())}},{key:"attach",value:function(){this.attached=!0,window.document.body.addEventListener("dragover",this.updateScrolling),window.document.body.addEventListener("touchmove",this.updateScrolling)}},{key:"detach",value:function(){this.attached=!1,window.document.body.removeEventListener("dragover",this.updateScrolling),window.document.body.removeEventListener("touchmove",this.updateScrolling)}},{key:"startScrolling",value:function(){var J=this,X=0,Z=function B(){var Q=J.scaleX,te=J.scaleY,F=J.container,G=J.props,N=G.strengthMultiplier,T=G.onScrollChange;if(N===0||Q+te===0){J.stopScrolling();return}if(X+=1,X%2){var x=F.scrollLeft,$=F.scrollTop,Y=F.scrollWidth,ee=F.scrollHeight,se=F.clientWidth,fe=F.clientHeight,we=Q?F.scrollLeft=(0,s.intBetween)(0,Y-se,x+Q*N):x,Ee=te?F.scrollTop=(0,s.intBetween)(0,ee-fe,$+te*N):$;T(we,Ee)}J.frame=(0,t.default)(B)};Z()}},{key:"stopScrolling",value:function(){this.detach(),this.scaleX=0,this.scaleY=0,this.frame&&(t.default.cancel(this.frame),this.frame=null)}},{key:"render",value:function(){var J=this.props;J.strengthMultiplier,J.verticalStrength,J.horizontalStrength,J.onScrollChange;var X=p(J,["strengthMultiplier","verticalStrength","horizontalStrength","onScrollChange"]);return r.default.createElement(A,u({ref:this.wrappedInstance},X))}}]),V}(r.Component);return I(W,"displayName","Scrolling(".concat((0,o.default)(A),")")),I(W,"propTypes",{dragDropManager:i.default.object.isRequired,onScrollChange:i.default.func,verticalStrength:i.default.func,horizontalStrength:i.default.func,strengthMultiplier:i.default.number}),I(W,"defaultProps",{onScrollChange:s.noop,verticalStrength:j,horizontalStrength:O,strengthMultiplier:30}),(0,l.default)(W,A)}function q(A){var W=U(A);return function(H){return r.default.createElement(a.DragDropContextConsumer,null,function(V){var K=V.dragDropManager;return K===void 0?null:r.default.createElement(W,u({},H,{dragDropManager:K}))})}}return Te}var en=ts();const ns=sn(en);var rs=Ua();const Br=sn(rs);function go(){var r=this.constructor.getDerivedStateFromProps(this.props,this.state);r!=null&&this.setState(r)}function vo(r){function i(n){var e=this.constructor.getDerivedStateFromProps(r,n);return e??null}this.setState(i.bind(this))}function mo(r,i){try{var n=this.props,e=this.state;this.props=r,this.state=i,this.__reactInternalSnapshotFlag=!0,this.__reactInternalSnapshot=this.getSnapshotBeforeUpdate(n,e)}finally{this.props=n,this.state=e}}go.__suppressDeprecationWarning=!0;vo.__suppressDeprecationWarning=!0;mo.__suppressDeprecationWarning=!0;function Wt(r){var i=r.prototype;if(!i||!i.isReactComponent)throw new Error("Can only polyfill class components");if(typeof r.getDerivedStateFromProps!="function"&&typeof i.getSnapshotBeforeUpdate!="function")return r;var n=null,e=null,t=null;if(typeof i.componentWillMount=="function"?n="componentWillMount":typeof i.UNSAFE_componentWillMount=="function"&&(n="UNSAFE_componentWillMount"),typeof i.componentWillReceiveProps=="function"?e="componentWillReceiveProps":typeof i.UNSAFE_componentWillReceiveProps=="function"&&(e="UNSAFE_componentWillReceiveProps"),typeof i.componentWillUpdate=="function"?t="componentWillUpdate":typeof i.UNSAFE_componentWillUpdate=="function"&&(t="UNSAFE_componentWillUpdate"),n!==null||e!==null||t!==null){var o=r.displayName||r.name,a=typeof r.getDerivedStateFromProps=="function"?"getDerivedStateFromProps()":"getSnapshotBeforeUpdate()";throw Error(`Unsafe legacy lifecycles will not be called for components using new component APIs.
3
3
 
4
4
  `+o+" uses "+a+" but also contains the following legacy lifecycles:"+(n!==null?`
5
5
  `+n:"")+(e!==null?`
@@ -7,10 +7,10 @@ import{e as ln,r as k,f as Pt,p as xt,d as Qi,h as Ta,g as sn,c as cn,a as oe}fr
7
7
  `+t:"")+`
8
8
 
9
9
  The above lifecycles should be removed. Learn more about this warning here:
10
- https://fb.me/react-async-component-lifecycle-hooks`)}if(typeof r.getDerivedStateFromProps=="function"&&(i.componentWillMount=go,i.componentWillReceiveProps=vo),typeof i.getSnapshotBeforeUpdate=="function"){if(typeof i.componentDidUpdate!="function")throw new Error("Cannot polyfill getSnapshotBeforeUpdate() for components that do not define componentDidUpdate() on the prototype");i.componentWillUpdate=mo;var l=i.componentDidUpdate;i.componentDidUpdate=function(c,d,f){var u=this.__reactInternalSnapshotFlag?this.__reactInternalSnapshot:f;l.call(this,c,d,u)}}return r}function So(r){var i,n,e="";if(typeof r=="string"||typeof r=="number")e+=r;else if(typeof r=="object")if(Array.isArray(r))for(i=0;i<r.length;i++)r[i]&&(n=So(r[i]))&&(e&&(e+=" "),e+=n);else for(i in r)r[i]&&(e&&(e+=" "),e+=i);return e}function Pe(){for(var r,i,n=0,e="";n<arguments.length;)(r=arguments[n++])&&(i=So(r))&&(e&&(e+=" "),e+=i);return e}function Vr(r){var i=r.cellCount,n=r.cellSize,e=r.computeMetadataCallback,t=r.computeMetadataCallbackProps,o=r.nextCellsCount,a=r.nextCellSize,l=r.nextScrollToIndex,s=r.scrollToIndex,c=r.updateScrollOffsetForScrollToIndex;(i!==o||(typeof n=="number"||typeof a=="number")&&n!==a)&&(e(t),s>=0&&s===l&&c())}function pt(r,i){if(r==null)return{};var n,e,t=Zi(r,i);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(r);for(e=0;e<o.length;e++)n=o[e],i.indexOf(n)===-1&&{}.propertyIsEnumerable.call(r,n)&&(t[n]=r[n])}return t}var is=function(){function r(i){var n=i.cellCount,e=i.cellSizeGetter,t=i.estimatedCellSize;ge(this,r),P(this,"_cellSizeAndPositionData",{}),P(this,"_lastMeasuredIndex",-1),P(this,"_lastBatchedIndex",-1),P(this,"_cellCount",void 0),P(this,"_cellSizeGetter",void 0),P(this,"_estimatedCellSize",void 0),this._cellSizeGetter=e,this._cellCount=n,this._estimatedCellSize=t}return pe(r,[{key:"areOffsetsAdjusted",value:function(){return!1}},{key:"configure",value:function(n){var e=n.cellCount,t=n.estimatedCellSize,o=n.cellSizeGetter;this._cellCount=e,this._estimatedCellSize=t,this._cellSizeGetter=o}},{key:"getCellCount",value:function(){return this._cellCount}},{key:"getEstimatedCellSize",value:function(){return this._estimatedCellSize}},{key:"getLastMeasuredIndex",value:function(){return this._lastMeasuredIndex}},{key:"getOffsetAdjustment",value:function(){return 0}},{key:"getSizeAndPositionOfCell",value:function(n){if(n<0||n>=this._cellCount)throw Error("Requested index ".concat(n," is outside of range 0..").concat(this._cellCount));if(n>this._lastMeasuredIndex)for(var e=this.getSizeAndPositionOfLastMeasuredCell(),t=e.offset+e.size,o=this._lastMeasuredIndex+1;o<=n;o++){var a=this._cellSizeGetter({index:o});if(a===void 0||isNaN(a))throw Error("Invalid size returned for cell ".concat(o," of value ").concat(a));a===null?(this._cellSizeAndPositionData[o]={offset:t,size:0},this._lastBatchedIndex=n):(this._cellSizeAndPositionData[o]={offset:t,size:a},t+=a,this._lastMeasuredIndex=n)}return this._cellSizeAndPositionData[n]}},{key:"getSizeAndPositionOfLastMeasuredCell",value:function(){return this._lastMeasuredIndex>=0?this._cellSizeAndPositionData[this._lastMeasuredIndex]:{offset:0,size:0}}},{key:"getTotalSize",value:function(){var n=this.getSizeAndPositionOfLastMeasuredCell(),e=n.offset+n.size,t=this._cellCount-this._lastMeasuredIndex-1,o=t*this._estimatedCellSize;return e+o}},{key:"getUpdatedOffsetForIndex",value:function(n){var e=n.align,t=e===void 0?"auto":e,o=n.containerSize,a=n.currentOffset,l=n.targetIndex;if(o<=0)return 0;var s=this.getSizeAndPositionOfCell(l),c=s.offset,d=c-o+s.size,f;switch(t){case"start":f=c;break;case"end":f=d;break;case"center":f=c-(o-s.size)/2;break;default:f=Math.max(d,Math.min(c,a));break}var u=this.getTotalSize();return Math.max(0,Math.min(u-o,f))}},{key:"getVisibleCellRange",value:function(n){var e=n.containerSize,t=n.offset,o=this.getTotalSize();if(o===0)return{};var a=t+e,l=this._findNearestCell(t),s=this.getSizeAndPositionOfCell(l);t=s.offset+s.size;for(var c=l;t<a&&c<this._cellCount-1;)c++,t+=this.getSizeAndPositionOfCell(c).size;return{start:l,stop:c}}},{key:"resetCell",value:function(n){this._lastMeasuredIndex=Math.min(this._lastMeasuredIndex,n-1)}},{key:"_binarySearch",value:function(n,e,t){for(;e<=n;){var o=e+Math.floor((n-e)/2),a=this.getSizeAndPositionOfCell(o).offset;if(a===t)return o;a<t?e=o+1:a>t&&(n=o-1)}return e>0?e-1:0}},{key:"_exponentialSearch",value:function(n,e){for(var t=1;n<this._cellCount&&this.getSizeAndPositionOfCell(n).offset<e;)n+=t,t*=2;return this._binarySearch(Math.min(n,this._cellCount-1),Math.floor(n/2),e)}},{key:"_findNearestCell",value:function(n){if(isNaN(n))throw Error("Invalid offset ".concat(n," specified"));n=Math.max(0,n);var e=this.getSizeAndPositionOfLastMeasuredCell(),t=Math.max(0,this._lastMeasuredIndex);return e.offset>=n?this._binarySearch(t,0,n):this._exponentialSearch(t,n)}}]),r}(),os=15e5,as=16777100,ls=function(){return typeof window<"u"},ss=function(){return!!window.chrome},cs=function(){return ls()&&ss()?as:os},qr=function(){function r(i){var n=i.maxScrollSize,e=n===void 0?cs():n,t=pt(i,["maxScrollSize"]);ge(this,r),P(this,"_cellSizeAndPositionManager",void 0),P(this,"_maxScrollSize",void 0),this._cellSizeAndPositionManager=new is(t),this._maxScrollSize=e}return pe(r,[{key:"areOffsetsAdjusted",value:function(){return this._cellSizeAndPositionManager.getTotalSize()>this._maxScrollSize}},{key:"configure",value:function(n){this._cellSizeAndPositionManager.configure(n)}},{key:"getCellCount",value:function(){return this._cellSizeAndPositionManager.getCellCount()}},{key:"getEstimatedCellSize",value:function(){return this._cellSizeAndPositionManager.getEstimatedCellSize()}},{key:"getLastMeasuredIndex",value:function(){return this._cellSizeAndPositionManager.getLastMeasuredIndex()}},{key:"getOffsetAdjustment",value:function(n){var e=n.containerSize,t=n.offset,o=this._cellSizeAndPositionManager.getTotalSize(),a=this.getTotalSize(),l=this._getOffsetPercentage({containerSize:e,offset:t,totalSize:a});return Math.round(l*(a-o))}},{key:"getSizeAndPositionOfCell",value:function(n){return this._cellSizeAndPositionManager.getSizeAndPositionOfCell(n)}},{key:"getSizeAndPositionOfLastMeasuredCell",value:function(){return this._cellSizeAndPositionManager.getSizeAndPositionOfLastMeasuredCell()}},{key:"getTotalSize",value:function(){return Math.min(this._maxScrollSize,this._cellSizeAndPositionManager.getTotalSize())}},{key:"getUpdatedOffsetForIndex",value:function(n){var e=n.align,t=e===void 0?"auto":e,o=n.containerSize,a=n.currentOffset,l=n.targetIndex;a=this._safeOffsetToOffset({containerSize:o,offset:a});var s=this._cellSizeAndPositionManager.getUpdatedOffsetForIndex({align:t,containerSize:o,currentOffset:a,targetIndex:l});return this._offsetToSafeOffset({containerSize:o,offset:s})}},{key:"getVisibleCellRange",value:function(n){var e=n.containerSize,t=n.offset;return t=this._safeOffsetToOffset({containerSize:e,offset:t}),this._cellSizeAndPositionManager.getVisibleCellRange({containerSize:e,offset:t})}},{key:"resetCell",value:function(n){this._cellSizeAndPositionManager.resetCell(n)}},{key:"_getOffsetPercentage",value:function(n){var e=n.containerSize,t=n.offset,o=n.totalSize;return o<=e?0:t/(o-e)}},{key:"_offsetToSafeOffset",value:function(n){var e=n.containerSize,t=n.offset,o=this._cellSizeAndPositionManager.getTotalSize(),a=this.getTotalSize();if(o===a)return t;var l=this._getOffsetPercentage({containerSize:e,offset:t,totalSize:o});return Math.round(l*(a-e))}},{key:"_safeOffsetToOffset",value:function(n){var e=n.containerSize,t=n.offset,o=this._cellSizeAndPositionManager.getTotalSize(),a=this.getTotalSize();if(o===a)return t;var l=this._getOffsetPercentage({containerSize:e,offset:t,totalSize:a});return Math.round(l*(o-e))}}]),r}();function St(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0,i={};return function(n){var e=n.callback,t=n.indices,o=Object.keys(t),a=!r||o.every(function(s){var c=t[s];return Array.isArray(c)?c.length>0:c>=0}),l=o.length!==Object.keys(i).length||o.some(function(s){var c=i[s],d=t[s];return Array.isArray(d)?c.join(",")!==d.join(","):c!==d});i=t,a&&l&&e(t)}}var Kt=-1,Ae=1;function ds(r){var i=r.cellCount,n=r.overscanCellsCount,e=r.scrollDirection,t=r.startIndex,o=r.stopIndex;return e===Ae?{overscanStartIndex:Math.max(0,t),overscanStopIndex:Math.min(i-1,o+n)}:{overscanStartIndex:Math.max(0,t-n),overscanStopIndex:Math.min(i-1,o)}}function Kr(r){var i=r.cellSize,n=r.cellSizeAndPositionManager,e=r.previousCellsCount,t=r.previousCellSize,o=r.previousScrollToAlignment,a=r.previousScrollToIndex,l=r.previousSize,s=r.scrollOffset,c=r.scrollToAlignment,d=r.scrollToIndex,f=r.size,u=r.sizeJustIncreasedFromZero,p=r.updateScrollIndexCallback,h=n.getCellCount(),v=d>=0&&d<h,y=f!==l||u||!t||typeof i=="number"&&i!==t;v&&(y||c!==o||d!==a)?p(d):!v&&h>0&&(f<l||h<e)&&s>n.getTotalSize()-f&&p(h-1)}function us(r){for(var i=r.cellCache,n=r.cellRenderer,e=r.columnSizeAndPositionManager,t=r.columnStartIndex,o=r.columnStopIndex,a=r.deferredMeasurementCache,l=r.horizontalOffsetAdjustment,s=r.isScrolling,c=r.isScrollingOptOut,d=r.parent,f=r.rowSizeAndPositionManager,u=r.rowStartIndex,p=r.rowStopIndex,h=r.styleCache,v=r.verticalOffsetAdjustment,y=r.visibleColumnIndices,_=r.visibleRowIndices,C=[],z=e.areOffsetsAdjusted()||f.areOffsetsAdjusted(),D=!s&&!z,M=u;M<=p;M++)for(var R=f.getSizeAndPositionOfCell(M),I=t;I<=o;I++){var g=e.getSizeAndPositionOfCell(I),w=I>=y.start&&I<=y.stop&&M>=_.start&&M<=_.stop,S="".concat(M,"-").concat(I),O=void 0;D&&h[S]?O=h[S]:a&&!a.has(M,I)?O={height:"auto",left:0,position:"absolute",top:0,width:"auto"}:(O={height:R.size,left:g.offset+l,position:"absolute",top:R.offset+v,width:g.size},h[S]=O);var j={columnIndex:I,isScrolling:s,isVisible:w,key:S,parent:d,rowIndex:M,style:O},U=void 0;(c||s)&&!l&&!v?(i[S]||(i[S]=n(j)),U=i[S]):U=n(j),!(U==null||U===!1)&&C.push(U)}return C}const fs=!!(typeof window<"u"&&window.document&&window.document.createElement);var Xt;function Gn(r){if((!Xt&&Xt!==0||r)&&fs){var i=document.createElement("div");i.style.position="absolute",i.style.top="-9999px",i.style.width="50px",i.style.height="50px",i.style.overflow="scroll",document.body.appendChild(i),Xt=i.offsetWidth-i.clientWidth,document.body.removeChild(i)}return Xt}var ye;typeof window<"u"?ye=window:typeof self<"u"?ye=self:ye={};var hs=ye.requestAnimationFrame||ye.webkitRequestAnimationFrame||ye.mozRequestAnimationFrame||ye.oRequestAnimationFrame||ye.msRequestAnimationFrame||function(r){return ye.setTimeout(r,1e3/60)},ps=ye.cancelAnimationFrame||ye.webkitCancelAnimationFrame||ye.mozCancelAnimationFrame||ye.oCancelAnimationFrame||ye.msCancelAnimationFrame||function(r){ye.clearTimeout(r)},Xr=hs,gs=ps,yt=function(i){return gs(i.id)},ir=function(i,n){var e;Promise.resolve().then(function(){e=Date.now()});var t=function a(){Date.now()-e>=n?i.call():o.id=Xr(a)},o={id:Xr(t)};return o},Yr,Qr;function Jr(r,i){var n=Object.keys(r);if(Object.getOwnPropertySymbols){var e=Object.getOwnPropertySymbols(r);i&&(e=e.filter(function(t){return Object.getOwnPropertyDescriptor(r,t).enumerable})),n.push.apply(n,e)}return n}function Ze(r){for(var i=1;i<arguments.length;i++){var n=arguments[i]!=null?arguments[i]:{};i%2?Jr(n,!0).forEach(function(e){P(r,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(n)):Jr(n).forEach(function(e){Object.defineProperty(r,e,Object.getOwnPropertyDescriptor(n,e))})}return r}var vs=150,wn={OBSERVED:"observed",REQUESTED:"requested"},ms=function(){return null},Ue=(Qr=Yr=function(r){xe(i,r);function i(n){var e;ge(this,i),e=_e(this,Re(i).call(this,n)),P(E(e),"_onGridRenderedMemoizer",St()),P(E(e),"_onScrollMemoizer",St(!1)),P(E(e),"_deferredInvalidateColumnIndex",null),P(E(e),"_deferredInvalidateRowIndex",null),P(E(e),"_recomputeScrollLeftFlag",!1),P(E(e),"_recomputeScrollTopFlag",!1),P(E(e),"_horizontalScrollBarSize",0),P(E(e),"_verticalScrollBarSize",0),P(E(e),"_scrollbarPresenceChanged",!1),P(E(e),"_scrollingContainer",void 0),P(E(e),"_childrenToDisplay",void 0),P(E(e),"_columnStartIndex",void 0),P(E(e),"_columnStopIndex",void 0),P(E(e),"_rowStartIndex",void 0),P(E(e),"_rowStopIndex",void 0),P(E(e),"_renderedColumnStartIndex",0),P(E(e),"_renderedColumnStopIndex",0),P(E(e),"_renderedRowStartIndex",0),P(E(e),"_renderedRowStopIndex",0),P(E(e),"_initialScrollTop",void 0),P(E(e),"_initialScrollLeft",void 0),P(E(e),"_disablePointerEventsTimeoutId",void 0),P(E(e),"_styleCache",{}),P(E(e),"_cellCache",{}),P(E(e),"_debounceScrollEndedCallback",function(){e._disablePointerEventsTimeoutId=null,e.setState({isScrolling:!1,needToResetStyleCache:!1})}),P(E(e),"_invokeOnGridRenderedHelper",function(){var a=e.props.onSectionRendered;e._onGridRenderedMemoizer({callback:a,indices:{columnOverscanStartIndex:e._columnStartIndex,columnOverscanStopIndex:e._columnStopIndex,columnStartIndex:e._renderedColumnStartIndex,columnStopIndex:e._renderedColumnStopIndex,rowOverscanStartIndex:e._rowStartIndex,rowOverscanStopIndex:e._rowStopIndex,rowStartIndex:e._renderedRowStartIndex,rowStopIndex:e._renderedRowStopIndex}})}),P(E(e),"_setScrollingContainerRef",function(a){e._scrollingContainer=a}),P(E(e),"_onScroll",function(a){a.target===e._scrollingContainer&&e.handleScrollEvent(a.target)});var t=new qr({cellCount:n.columnCount,cellSizeGetter:function(l){return i._wrapSizeGetter(n.columnWidth)(l)},estimatedCellSize:i._getEstimatedColumnSize(n)}),o=new qr({cellCount:n.rowCount,cellSizeGetter:function(l){return i._wrapSizeGetter(n.rowHeight)(l)},estimatedCellSize:i._getEstimatedRowSize(n)});return e.state={instanceProps:{columnSizeAndPositionManager:t,rowSizeAndPositionManager:o,prevColumnWidth:n.columnWidth,prevRowHeight:n.rowHeight,prevColumnCount:n.columnCount,prevRowCount:n.rowCount,prevIsScrolling:n.isScrolling===!0,prevScrollToColumn:n.scrollToColumn,prevScrollToRow:n.scrollToRow,scrollbarSize:0,scrollbarSizeMeasured:!1},isScrolling:!1,scrollDirectionHorizontal:Ae,scrollDirectionVertical:Ae,scrollLeft:0,scrollTop:0,scrollPositionChangeReason:null,needToResetStyleCache:!1},n.scrollToRow>0&&(e._initialScrollTop=e._getCalculatedScrollTop(n,e.state)),n.scrollToColumn>0&&(e._initialScrollLeft=e._getCalculatedScrollLeft(n,e.state)),e}return pe(i,[{key:"getOffsetForCell",value:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=e.alignment,o=t===void 0?this.props.scrollToAlignment:t,a=e.columnIndex,l=a===void 0?this.props.scrollToColumn:a,s=e.rowIndex,c=s===void 0?this.props.scrollToRow:s,d=Ze({},this.props,{scrollToAlignment:o,scrollToColumn:l,scrollToRow:c});return{scrollLeft:this._getCalculatedScrollLeft(d),scrollTop:this._getCalculatedScrollTop(d)}}},{key:"getTotalRowsHeight",value:function(){return this.state.instanceProps.rowSizeAndPositionManager.getTotalSize()}},{key:"getTotalColumnsWidth",value:function(){return this.state.instanceProps.columnSizeAndPositionManager.getTotalSize()}},{key:"handleScrollEvent",value:function(e){var t=e.scrollLeft,o=t===void 0?0:t,a=e.scrollTop,l=a===void 0?0:a;if(!(l<0)){this._debounceScrollEnded();var s=this.props,c=s.autoHeight,d=s.autoWidth,f=s.height,u=s.width,p=this.state.instanceProps,h=p.scrollbarSize,v=p.rowSizeAndPositionManager.getTotalSize(),y=p.columnSizeAndPositionManager.getTotalSize(),_=Math.min(Math.max(0,y-u+h),o),C=Math.min(Math.max(0,v-f+h),l);if(this.state.scrollLeft!==_||this.state.scrollTop!==C){var z=_!==this.state.scrollLeft?_>this.state.scrollLeft?Ae:Kt:this.state.scrollDirectionHorizontal,D=C!==this.state.scrollTop?C>this.state.scrollTop?Ae:Kt:this.state.scrollDirectionVertical,M={isScrolling:!0,scrollDirectionHorizontal:z,scrollDirectionVertical:D,scrollPositionChangeReason:wn.OBSERVED};c||(M.scrollTop=C),d||(M.scrollLeft=_),M.needToResetStyleCache=!1,this.setState(M)}this._invokeOnScrollMemoizer({scrollLeft:_,scrollTop:C,totalColumnsWidth:y,totalRowsHeight:v})}}},{key:"invalidateCellSizeAfterRender",value:function(e){var t=e.columnIndex,o=e.rowIndex;this._deferredInvalidateColumnIndex=typeof this._deferredInvalidateColumnIndex=="number"?Math.min(this._deferredInvalidateColumnIndex,t):t,this._deferredInvalidateRowIndex=typeof this._deferredInvalidateRowIndex=="number"?Math.min(this._deferredInvalidateRowIndex,o):o}},{key:"measureAllCells",value:function(){var e=this.props,t=e.columnCount,o=e.rowCount,a=this.state.instanceProps;a.columnSizeAndPositionManager.getSizeAndPositionOfCell(t-1),a.rowSizeAndPositionManager.getSizeAndPositionOfCell(o-1)}},{key:"recomputeGridSize",value:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=e.columnIndex,o=t===void 0?0:t,a=e.rowIndex,l=a===void 0?0:a,s=this.props,c=s.scrollToColumn,d=s.scrollToRow,f=this.state.instanceProps;f.columnSizeAndPositionManager.resetCell(o),f.rowSizeAndPositionManager.resetCell(l),this._recomputeScrollLeftFlag=c>=0&&(this.state.scrollDirectionHorizontal===Ae?o<=c:o>=c),this._recomputeScrollTopFlag=d>=0&&(this.state.scrollDirectionVertical===Ae?l<=d:l>=d),this._styleCache={},this._cellCache={},this.forceUpdate()}},{key:"scrollToCell",value:function(e){var t=e.columnIndex,o=e.rowIndex,a=this.props.columnCount,l=this.props;a>1&&t!==void 0&&this._updateScrollLeftForScrollToColumn(Ze({},l,{scrollToColumn:t})),o!==void 0&&this._updateScrollTopForScrollToRow(Ze({},l,{scrollToRow:o}))}},{key:"componentDidMount",value:function(){var e=this.props,t=e.getScrollbarSize,o=e.height,a=e.scrollLeft,l=e.scrollToColumn,s=e.scrollTop,c=e.scrollToRow,d=e.width,f=this.state.instanceProps;if(this._initialScrollTop=0,this._initialScrollLeft=0,this._handleInvalidatedGridSize(),f.scrollbarSizeMeasured||this.setState(function(h){var v=Ze({},h,{needToResetStyleCache:!1});return v.instanceProps.scrollbarSize=t(),v.instanceProps.scrollbarSizeMeasured=!0,v}),typeof a=="number"&&a>=0||typeof s=="number"&&s>=0){var u=i._getScrollToPositionStateUpdate({prevState:this.state,scrollLeft:a,scrollTop:s});u&&(u.needToResetStyleCache=!1,this.setState(u))}this._scrollingContainer&&(this._scrollingContainer.scrollLeft!==this.state.scrollLeft&&(this._scrollingContainer.scrollLeft=this.state.scrollLeft),this._scrollingContainer.scrollTop!==this.state.scrollTop&&(this._scrollingContainer.scrollTop=this.state.scrollTop));var p=o>0&&d>0;l>=0&&p&&this._updateScrollLeftForScrollToColumn(),c>=0&&p&&this._updateScrollTopForScrollToRow(),this._invokeOnGridRenderedHelper(),this._invokeOnScrollMemoizer({scrollLeft:a||0,scrollTop:s||0,totalColumnsWidth:f.columnSizeAndPositionManager.getTotalSize(),totalRowsHeight:f.rowSizeAndPositionManager.getTotalSize()}),this._maybeCallOnScrollbarPresenceChange()}},{key:"componentDidUpdate",value:function(e,t){var o=this,a=this.props,l=a.autoHeight,s=a.autoWidth,c=a.columnCount,d=a.height,f=a.rowCount,u=a.scrollToAlignment,p=a.scrollToColumn,h=a.scrollToRow,v=a.width,y=this.state,_=y.scrollLeft,C=y.scrollPositionChangeReason,z=y.scrollTop,D=y.instanceProps;this._handleInvalidatedGridSize();var M=c>0&&e.columnCount===0||f>0&&e.rowCount===0;C===wn.REQUESTED&&(!s&&_>=0&&(_!==this._scrollingContainer.scrollLeft||M)&&(this._scrollingContainer.scrollLeft=_),!l&&z>=0&&(z!==this._scrollingContainer.scrollTop||M)&&(this._scrollingContainer.scrollTop=z));var R=(e.width===0||e.height===0)&&d>0&&v>0;if(this._recomputeScrollLeftFlag?(this._recomputeScrollLeftFlag=!1,this._updateScrollLeftForScrollToColumn(this.props)):Kr({cellSizeAndPositionManager:D.columnSizeAndPositionManager,previousCellsCount:e.columnCount,previousCellSize:e.columnWidth,previousScrollToAlignment:e.scrollToAlignment,previousScrollToIndex:e.scrollToColumn,previousSize:e.width,scrollOffset:_,scrollToAlignment:u,scrollToIndex:p,size:v,sizeJustIncreasedFromZero:R,updateScrollIndexCallback:function(){return o._updateScrollLeftForScrollToColumn(o.props)}}),this._recomputeScrollTopFlag?(this._recomputeScrollTopFlag=!1,this._updateScrollTopForScrollToRow(this.props)):Kr({cellSizeAndPositionManager:D.rowSizeAndPositionManager,previousCellsCount:e.rowCount,previousCellSize:e.rowHeight,previousScrollToAlignment:e.scrollToAlignment,previousScrollToIndex:e.scrollToRow,previousSize:e.height,scrollOffset:z,scrollToAlignment:u,scrollToIndex:h,size:d,sizeJustIncreasedFromZero:R,updateScrollIndexCallback:function(){return o._updateScrollTopForScrollToRow(o.props)}}),this._invokeOnGridRenderedHelper(),_!==t.scrollLeft||z!==t.scrollTop){var I=D.rowSizeAndPositionManager.getTotalSize(),g=D.columnSizeAndPositionManager.getTotalSize();this._invokeOnScrollMemoizer({scrollLeft:_,scrollTop:z,totalColumnsWidth:g,totalRowsHeight:I})}this._maybeCallOnScrollbarPresenceChange()}},{key:"componentWillUnmount",value:function(){this._disablePointerEventsTimeoutId&&yt(this._disablePointerEventsTimeoutId)}},{key:"render",value:function(){var e=this.props,t=e.autoContainerWidth,o=e.autoHeight,a=e.autoWidth,l=e.className,s=e.containerProps,c=e.containerRole,d=e.containerStyle,f=e.height,u=e.id,p=e.noContentRenderer,h=e.role,v=e.style,y=e.tabIndex,_=e.width,C=this.state,z=C.instanceProps,D=C.needToResetStyleCache,M=this._isScrolling(),R={boxSizing:"border-box",direction:"ltr",height:o?"auto":f,position:"relative",width:a?"auto":_,WebkitOverflowScrolling:"touch",willChange:"transform"};D&&(this._styleCache={}),this.state.isScrolling||this._resetStyleCache(),this._calculateChildrenToRender(this.props,this.state);var I=z.columnSizeAndPositionManager.getTotalSize(),g=z.rowSizeAndPositionManager.getTotalSize(),w=g>f?z.scrollbarSize:0,S=I>_?z.scrollbarSize:0;(S!==this._horizontalScrollBarSize||w!==this._verticalScrollBarSize)&&(this._horizontalScrollBarSize=S,this._verticalScrollBarSize=w,this._scrollbarPresenceChanged=!0),R.overflowX=I+w<=_?"hidden":"auto",R.overflowY=g+S<=f?"hidden":"auto";var O=this._childrenToDisplay,j=O.length===0&&f>0&&_>0;return k.createElement("div",le({ref:this._setScrollingContainerRef},s,{"aria-label":this.props["aria-label"],"aria-readonly":this.props["aria-readonly"],className:Pe("ReactVirtualized__Grid",l),id:u,onScroll:this._onScroll,role:h,style:Ze({},R,{},v),tabIndex:y}),O.length>0&&k.createElement("div",{className:"ReactVirtualized__Grid__innerScrollContainer",role:c,style:Ze({width:t?"auto":I,height:g,maxWidth:I,maxHeight:g,overflow:"hidden",pointerEvents:M?"none":"",position:"relative"},d)},O),j&&p())}},{key:"_calculateChildrenToRender",value:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.props,t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.state,o=e.cellRenderer,a=e.cellRangeRenderer,l=e.columnCount,s=e.deferredMeasurementCache,c=e.height,d=e.overscanColumnCount,f=e.overscanIndicesGetter,u=e.overscanRowCount,p=e.rowCount,h=e.width,v=e.isScrollingOptOut,y=t.scrollDirectionHorizontal,_=t.scrollDirectionVertical,C=t.instanceProps,z=this._initialScrollTop>0?this._initialScrollTop:t.scrollTop,D=this._initialScrollLeft>0?this._initialScrollLeft:t.scrollLeft,M=this._isScrolling(e,t);if(this._childrenToDisplay=[],c>0&&h>0){var R=C.columnSizeAndPositionManager.getVisibleCellRange({containerSize:h,offset:D}),I=C.rowSizeAndPositionManager.getVisibleCellRange({containerSize:c,offset:z}),g=C.columnSizeAndPositionManager.getOffsetAdjustment({containerSize:h,offset:D}),w=C.rowSizeAndPositionManager.getOffsetAdjustment({containerSize:c,offset:z});this._renderedColumnStartIndex=R.start,this._renderedColumnStopIndex=R.stop,this._renderedRowStartIndex=I.start,this._renderedRowStopIndex=I.stop;var S=f({direction:"horizontal",cellCount:l,overscanCellsCount:d,scrollDirection:y,startIndex:typeof R.start=="number"?R.start:0,stopIndex:typeof R.stop=="number"?R.stop:-1}),O=f({direction:"vertical",cellCount:p,overscanCellsCount:u,scrollDirection:_,startIndex:typeof I.start=="number"?I.start:0,stopIndex:typeof I.stop=="number"?I.stop:-1}),j=S.overscanStartIndex,U=S.overscanStopIndex,q=O.overscanStartIndex,A=O.overscanStopIndex;if(s){if(!s.hasFixedHeight()){for(var W=q;W<=A;W++)if(!s.has(W,0)){j=0,U=l-1;break}}if(!s.hasFixedWidth()){for(var H=j;H<=U;H++)if(!s.has(0,H)){q=0,A=p-1;break}}}this._childrenToDisplay=a({cellCache:this._cellCache,cellRenderer:o,columnSizeAndPositionManager:C.columnSizeAndPositionManager,columnStartIndex:j,columnStopIndex:U,deferredMeasurementCache:s,horizontalOffsetAdjustment:g,isScrolling:M,isScrollingOptOut:v,parent:this,rowSizeAndPositionManager:C.rowSizeAndPositionManager,rowStartIndex:q,rowStopIndex:A,scrollLeft:D,scrollTop:z,styleCache:this._styleCache,verticalOffsetAdjustment:w,visibleColumnIndices:R,visibleRowIndices:I}),this._columnStartIndex=j,this._columnStopIndex=U,this._rowStartIndex=q,this._rowStopIndex=A}}},{key:"_debounceScrollEnded",value:function(){var e=this.props.scrollingResetTimeInterval;this._disablePointerEventsTimeoutId&&yt(this._disablePointerEventsTimeoutId),this._disablePointerEventsTimeoutId=ir(this._debounceScrollEndedCallback,e)}},{key:"_handleInvalidatedGridSize",value:function(){if(typeof this._deferredInvalidateColumnIndex=="number"&&typeof this._deferredInvalidateRowIndex=="number"){var e=this._deferredInvalidateColumnIndex,t=this._deferredInvalidateRowIndex;this._deferredInvalidateColumnIndex=null,this._deferredInvalidateRowIndex=null,this.recomputeGridSize({columnIndex:e,rowIndex:t})}}},{key:"_invokeOnScrollMemoizer",value:function(e){var t=this,o=e.scrollLeft,a=e.scrollTop,l=e.totalColumnsWidth,s=e.totalRowsHeight;this._onScrollMemoizer({callback:function(d){var f=d.scrollLeft,u=d.scrollTop,p=t.props,h=p.height,v=p.onScroll,y=p.width;v({clientHeight:h,clientWidth:y,scrollHeight:s,scrollLeft:f,scrollTop:u,scrollWidth:l})},indices:{scrollLeft:o,scrollTop:a}})}},{key:"_isScrolling",value:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.props,t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.state;return Object.hasOwnProperty.call(e,"isScrolling")?!!e.isScrolling:!!t.isScrolling}},{key:"_maybeCallOnScrollbarPresenceChange",value:function(){if(this._scrollbarPresenceChanged){var e=this.props.onScrollbarPresenceChange;this._scrollbarPresenceChanged=!1,e({horizontal:this._horizontalScrollBarSize>0,size:this.state.instanceProps.scrollbarSize,vertical:this._verticalScrollBarSize>0})}}},{key:"scrollToPosition",value:function(e){var t=e.scrollLeft,o=e.scrollTop,a=i._getScrollToPositionStateUpdate({prevState:this.state,scrollLeft:t,scrollTop:o});a&&(a.needToResetStyleCache=!1,this.setState(a))}},{key:"_getCalculatedScrollLeft",value:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.props,t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.state;return i._getCalculatedScrollLeft(e,t)}},{key:"_updateScrollLeftForScrollToColumn",value:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.props,t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.state,o=i._getScrollLeftForScrollToColumnStateUpdate(e,t);o&&(o.needToResetStyleCache=!1,this.setState(o))}},{key:"_getCalculatedScrollTop",value:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.props,t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.state;return i._getCalculatedScrollTop(e,t)}},{key:"_resetStyleCache",value:function(){var e=this._styleCache,t=this._cellCache,o=this.props.isScrollingOptOut;this._cellCache={},this._styleCache={};for(var a=this._rowStartIndex;a<=this._rowStopIndex;a++)for(var l=this._columnStartIndex;l<=this._columnStopIndex;l++){var s="".concat(a,"-").concat(l);this._styleCache[s]=e[s],o&&(this._cellCache[s]=t[s])}}},{key:"_updateScrollTopForScrollToRow",value:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.props,t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.state,o=i._getScrollTopForScrollToRowStateUpdate(e,t);o&&(o.needToResetStyleCache=!1,this.setState(o))}}],[{key:"getDerivedStateFromProps",value:function(e,t){var o={};e.columnCount===0&&t.scrollLeft!==0||e.rowCount===0&&t.scrollTop!==0?(o.scrollLeft=0,o.scrollTop=0):(e.scrollLeft!==t.scrollLeft&&e.scrollToColumn<0||e.scrollTop!==t.scrollTop&&e.scrollToRow<0)&&Object.assign(o,i._getScrollToPositionStateUpdate({prevState:t,scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}));var a=t.instanceProps;o.needToResetStyleCache=!1,(e.columnWidth!==a.prevColumnWidth||e.rowHeight!==a.prevRowHeight)&&(o.needToResetStyleCache=!0),a.columnSizeAndPositionManager.configure({cellCount:e.columnCount,estimatedCellSize:i._getEstimatedColumnSize(e),cellSizeGetter:i._wrapSizeGetter(e.columnWidth)}),a.rowSizeAndPositionManager.configure({cellCount:e.rowCount,estimatedCellSize:i._getEstimatedRowSize(e),cellSizeGetter:i._wrapSizeGetter(e.rowHeight)}),(a.prevColumnCount===0||a.prevRowCount===0)&&(a.prevColumnCount=0,a.prevRowCount=0),e.autoHeight&&e.isScrolling===!1&&a.prevIsScrolling===!0&&Object.assign(o,{isScrolling:!1});var l,s;return Vr({cellCount:a.prevColumnCount,cellSize:typeof a.prevColumnWidth=="number"?a.prevColumnWidth:null,computeMetadataCallback:function(){return a.columnSizeAndPositionManager.resetCell(0)},computeMetadataCallbackProps:e,nextCellsCount:e.columnCount,nextCellSize:typeof e.columnWidth=="number"?e.columnWidth:null,nextScrollToIndex:e.scrollToColumn,scrollToIndex:a.prevScrollToColumn,updateScrollOffsetForScrollToIndex:function(){l=i._getScrollLeftForScrollToColumnStateUpdate(e,t)}}),Vr({cellCount:a.prevRowCount,cellSize:typeof a.prevRowHeight=="number"?a.prevRowHeight:null,computeMetadataCallback:function(){return a.rowSizeAndPositionManager.resetCell(0)},computeMetadataCallbackProps:e,nextCellsCount:e.rowCount,nextCellSize:typeof e.rowHeight=="number"?e.rowHeight:null,nextScrollToIndex:e.scrollToRow,scrollToIndex:a.prevScrollToRow,updateScrollOffsetForScrollToIndex:function(){s=i._getScrollTopForScrollToRowStateUpdate(e,t)}}),a.prevColumnCount=e.columnCount,a.prevColumnWidth=e.columnWidth,a.prevIsScrolling=e.isScrolling===!0,a.prevRowCount=e.rowCount,a.prevRowHeight=e.rowHeight,a.prevScrollToColumn=e.scrollToColumn,a.prevScrollToRow=e.scrollToRow,a.scrollbarSize=e.getScrollbarSize(),a.scrollbarSize===void 0?(a.scrollbarSizeMeasured=!1,a.scrollbarSize=0):a.scrollbarSizeMeasured=!0,o.instanceProps=a,Ze({},o,{},l,{},s)}},{key:"_getEstimatedColumnSize",value:function(e){return typeof e.columnWidth=="number"?e.columnWidth:e.estimatedColumnSize}},{key:"_getEstimatedRowSize",value:function(e){return typeof e.rowHeight=="number"?e.rowHeight:e.estimatedRowSize}},{key:"_getScrollToPositionStateUpdate",value:function(e){var t=e.prevState,o=e.scrollLeft,a=e.scrollTop,l={scrollPositionChangeReason:wn.REQUESTED};return typeof o=="number"&&o>=0&&(l.scrollDirectionHorizontal=o>t.scrollLeft?Ae:Kt,l.scrollLeft=o),typeof a=="number"&&a>=0&&(l.scrollDirectionVertical=a>t.scrollTop?Ae:Kt,l.scrollTop=a),typeof o=="number"&&o>=0&&o!==t.scrollLeft||typeof a=="number"&&a>=0&&a!==t.scrollTop?l:{}}},{key:"_wrapSizeGetter",value:function(e){return typeof e=="function"?e:function(){return e}}},{key:"_getCalculatedScrollLeft",value:function(e,t){var o=e.columnCount,a=e.height,l=e.scrollToAlignment,s=e.scrollToColumn,c=e.width,d=t.scrollLeft,f=t.instanceProps;if(o>0){var u=o-1,p=s<0?u:Math.min(u,s),h=f.rowSizeAndPositionManager.getTotalSize(),v=f.scrollbarSizeMeasured&&h>a?f.scrollbarSize:0;return f.columnSizeAndPositionManager.getUpdatedOffsetForIndex({align:l,containerSize:c-v,currentOffset:d,targetIndex:p})}return 0}},{key:"_getScrollLeftForScrollToColumnStateUpdate",value:function(e,t){var o=t.scrollLeft,a=i._getCalculatedScrollLeft(e,t);return typeof a=="number"&&a>=0&&o!==a?i._getScrollToPositionStateUpdate({prevState:t,scrollLeft:a,scrollTop:-1}):{}}},{key:"_getCalculatedScrollTop",value:function(e,t){var o=e.height,a=e.rowCount,l=e.scrollToAlignment,s=e.scrollToRow,c=e.width,d=t.scrollTop,f=t.instanceProps;if(a>0){var u=a-1,p=s<0?u:Math.min(u,s),h=f.columnSizeAndPositionManager.getTotalSize(),v=f.scrollbarSizeMeasured&&h>c?f.scrollbarSize:0;return f.rowSizeAndPositionManager.getUpdatedOffsetForIndex({align:l,containerSize:o-v,currentOffset:d,targetIndex:p})}return 0}},{key:"_getScrollTopForScrollToRowStateUpdate",value:function(e,t){var o=t.scrollTop,a=i._getCalculatedScrollTop(e,t);return typeof a=="number"&&a>=0&&o!==a?i._getScrollToPositionStateUpdate({prevState:t,scrollLeft:-1,scrollTop:a}):{}}}]),i}(k.PureComponent),P(Yr,"propTypes",null),Qr);P(Ue,"defaultProps",{"aria-label":"grid","aria-readonly":!0,autoContainerWidth:!1,autoHeight:!1,autoWidth:!1,cellRangeRenderer:us,containerRole:"rowgroup",containerStyle:{},estimatedColumnSize:100,estimatedRowSize:30,getScrollbarSize:Gn,noContentRenderer:ms,onScroll:function(){},onScrollbarPresenceChange:function(){},onSectionRendered:function(){},overscanColumnCount:0,overscanIndicesGetter:ds,overscanRowCount:10,role:"grid",scrollingResetTimeInterval:vs,scrollToAlignment:"auto",scrollToColumn:-1,scrollToRow:-1,style:{},tabIndex:0,isScrollingOptOut:!1});Wt(Ue);var Ss=1;function yo(r){var i=r.cellCount,n=r.overscanCellsCount,e=r.scrollDirection,t=r.startIndex,o=r.stopIndex;return n=Math.max(1,n),e===Ss?{overscanStartIndex:Math.max(0,t-1),overscanStopIndex:Math.min(i-1,o+n)}:{overscanStartIndex:Math.max(0,t-n),overscanStopIndex:Math.min(i-1,o+1)}}var Zr,ei;function ti(r,i){var n=Object.keys(r);if(Object.getOwnPropertySymbols){var e=Object.getOwnPropertySymbols(r);i&&(e=e.filter(function(t){return Object.getOwnPropertyDescriptor(r,t).enumerable})),n.push.apply(n,e)}return n}function ys(r){for(var i=1;i<arguments.length;i++){var n=arguments[i]!=null?arguments[i]:{};i%2?ti(n,!0).forEach(function(e){P(r,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(n)):ti(n).forEach(function(e){Object.defineProperty(r,e,Object.getOwnPropertyDescriptor(n,e))})}return r}var Co=(ei=Zr=function(r){xe(i,r);function i(){var n,e;ge(this,i);for(var t=arguments.length,o=new Array(t),a=0;a<t;a++)o[a]=arguments[a];return e=_e(this,(n=Re(i)).call.apply(n,[this].concat(o))),P(E(e),"state",{scrollToColumn:0,scrollToRow:0,instanceProps:{prevScrollToColumn:0,prevScrollToRow:0}}),P(E(e),"_columnStartIndex",0),P(E(e),"_columnStopIndex",0),P(E(e),"_rowStartIndex",0),P(E(e),"_rowStopIndex",0),P(E(e),"_onKeyDown",function(l){var s=e.props,c=s.columnCount,d=s.disabled,f=s.mode,u=s.rowCount;if(!d){var p=e._getScrollState(),h=p.scrollToColumn,v=p.scrollToRow,y=e._getScrollState(),_=y.scrollToColumn,C=y.scrollToRow;switch(l.key){case"ArrowDown":C=Math.min(f==="cells"?C+1:e._rowStopIndex+1,u-1);break;case"ArrowLeft":_=Math.max(f==="cells"?_-1:e._columnStartIndex-1,0);break;case"ArrowRight":_=Math.min(f==="cells"?_+1:e._columnStopIndex+1,c-1);break;case"ArrowUp":C=Math.max(f==="cells"?C-1:e._rowStartIndex-1,0);break}(_!==h||C!==v)&&(l.preventDefault(),e._updateScrollState({scrollToColumn:_,scrollToRow:C}))}}),P(E(e),"_onSectionRendered",function(l){var s=l.columnStartIndex,c=l.columnStopIndex,d=l.rowStartIndex,f=l.rowStopIndex;e._columnStartIndex=s,e._columnStopIndex=c,e._rowStartIndex=d,e._rowStopIndex=f}),e}return pe(i,[{key:"setScrollIndexes",value:function(e){var t=e.scrollToColumn,o=e.scrollToRow;this.setState({scrollToRow:o,scrollToColumn:t})}},{key:"render",value:function(){var e=this.props,t=e.className,o=e.children,a=this._getScrollState(),l=a.scrollToColumn,s=a.scrollToRow;return k.createElement("div",{className:t,onKeyDown:this._onKeyDown},o({onSectionRendered:this._onSectionRendered,scrollToColumn:l,scrollToRow:s}))}},{key:"_getScrollState",value:function(){return this.props.isControlled?this.props:this.state}},{key:"_updateScrollState",value:function(e){var t=e.scrollToColumn,o=e.scrollToRow,a=this.props,l=a.isControlled,s=a.onScrollToChange;typeof s=="function"&&s({scrollToColumn:t,scrollToRow:o}),l||this.setState({scrollToColumn:t,scrollToRow:o})}}],[{key:"getDerivedStateFromProps",value:function(e,t){return e.isControlled?{}:e.scrollToColumn!==t.instanceProps.prevScrollToColumn||e.scrollToRow!==t.instanceProps.prevScrollToRow?ys({},t,{scrollToColumn:e.scrollToColumn,scrollToRow:e.scrollToRow,instanceProps:{prevScrollToColumn:e.scrollToColumn,prevScrollToRow:e.scrollToRow}}):{}}}]),i}(k.PureComponent),P(Zr,"propTypes",null),ei);P(Co,"defaultProps",{disabled:!1,isControlled:!1,mode:"edges",scrollToColumn:0,scrollToRow:0});Wt(Co);function wo(r,i){var n;typeof i<"u"?n=i:typeof window<"u"?n=window:typeof self<"u"?n=self:n=sl;var e=typeof n.document<"u"&&n.document.attachEvent;if(!e){var t=function(){var I=n.requestAnimationFrame||n.mozRequestAnimationFrame||n.webkitRequestAnimationFrame||function(g){return n.setTimeout(g,20)};return function(g){return I(g)}}(),o=function(){var I=n.cancelAnimationFrame||n.mozCancelAnimationFrame||n.webkitCancelAnimationFrame||n.clearTimeout;return function(g){return I(g)}}(),a=function(g){var w=g.__resizeTriggers__,S=w.firstElementChild,O=w.lastElementChild,j=S.firstElementChild;O.scrollLeft=O.scrollWidth,O.scrollTop=O.scrollHeight,j.style.width=S.offsetWidth+1+"px",j.style.height=S.offsetHeight+1+"px",S.scrollLeft=S.scrollWidth,S.scrollTop=S.scrollHeight},l=function(g){return g.offsetWidth!=g.__resizeLast__.width||g.offsetHeight!=g.__resizeLast__.height},s=function(g){if(!(g.target.className&&typeof g.target.className.indexOf=="function"&&g.target.className.indexOf("contract-trigger")<0&&g.target.className.indexOf("expand-trigger")<0)){var w=this;a(this),this.__resizeRAF__&&o(this.__resizeRAF__),this.__resizeRAF__=t(function(){l(w)&&(w.__resizeLast__.width=w.offsetWidth,w.__resizeLast__.height=w.offsetHeight,w.__resizeListeners__.forEach(function(S){S.call(w,g)}))})}},c=!1,d="",f="animationstart",u="Webkit Moz O ms".split(" "),p="webkitAnimationStart animationstart oAnimationStart MSAnimationStart".split(" "),h="";{var v=n.document.createElement("fakeelement");if(v.style.animationName!==void 0&&(c=!0),c===!1){for(var y=0;y<u.length;y++)if(v.style[u[y]+"AnimationName"]!==void 0){h=u[y],d="-"+h.toLowerCase()+"-",f=p[y],c=!0;break}}}var _="resizeanim",C="@"+d+"keyframes "+_+" { from { opacity: 0; } to { opacity: 0; } } ",z=d+"animation: 1ms "+_+"; "}var D=function(g){if(!g.getElementById("detectElementResize")){var w=(C||"")+".resize-triggers { "+(z||"")+'visibility: hidden; opacity: 0; } .resize-triggers, .resize-triggers > div, .contract-trigger:before { content: " "; display: block; position: absolute; top: 0; left: 0; height: 100%; width: 100%; overflow: hidden; z-index: -1; } .resize-triggers > div { background: #eee; overflow: auto; } .contract-trigger:before { width: 200%; height: 200%; }',S=g.head||g.getElementsByTagName("head")[0],O=g.createElement("style");O.id="detectElementResize",O.type="text/css",r!=null&&O.setAttribute("nonce",r),O.styleSheet?O.styleSheet.cssText=w:O.appendChild(g.createTextNode(w)),S.appendChild(O)}},M=function(g,w){if(e)g.attachEvent("onresize",w);else{if(!g.__resizeTriggers__){var S=g.ownerDocument,O=n.getComputedStyle(g);O&&O.position=="static"&&(g.style.position="relative"),D(S),g.__resizeLast__={},g.__resizeListeners__=[],(g.__resizeTriggers__=S.createElement("div")).className="resize-triggers";var j='<div class="expand-trigger"><div></div></div><div class="contract-trigger"></div>';if(window.trustedTypes){var U=trustedTypes.createPolicy("react-virtualized-auto-sizer",{createHTML:function(){return j}});g.__resizeTriggers__.innerHTML=U.createHTML("")}else g.__resizeTriggers__.innerHTML=j;g.appendChild(g.__resizeTriggers__),a(g),g.addEventListener("scroll",s,!0),f&&(g.__resizeTriggers__.__animationListener__=function(A){A.animationName==_&&a(g)},g.__resizeTriggers__.addEventListener(f,g.__resizeTriggers__.__animationListener__))}g.__resizeListeners__.push(w)}},R=function(g,w){if(e)g.detachEvent("onresize",w);else if(g.__resizeListeners__.splice(g.__resizeListeners__.indexOf(w),1),!g.__resizeListeners__.length){g.removeEventListener("scroll",s,!0),g.__resizeTriggers__.__animationListener__&&(g.__resizeTriggers__.removeEventListener(f,g.__resizeTriggers__.__animationListener__),g.__resizeTriggers__.__animationListener__=null);try{g.__resizeTriggers__=!g.removeChild(g.__resizeTriggers__)}catch{}}};return{addResizeListener:M,removeResizeListener:R}}var ni,ri;function ii(r,i){var n=Object.keys(r);if(Object.getOwnPropertySymbols){var e=Object.getOwnPropertySymbols(r);i&&(e=e.filter(function(t){return Object.getOwnPropertyDescriptor(r,t).enumerable})),n.push.apply(n,e)}return n}function Cs(r){for(var i=1;i<arguments.length;i++){var n=arguments[i]!=null?arguments[i]:{};i%2?ii(n,!0).forEach(function(e){P(r,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(n)):ii(n).forEach(function(e){Object.defineProperty(r,e,Object.getOwnPropertyDescriptor(n,e))})}return r}var bo=(ri=ni=function(r){xe(i,r);function i(){var n,e;ge(this,i);for(var t=arguments.length,o=new Array(t),a=0;a<t;a++)o[a]=arguments[a];return e=_e(this,(n=Re(i)).call.apply(n,[this].concat(o))),P(E(e),"state",{height:e.props.defaultHeight||0,width:e.props.defaultWidth||0}),P(E(e),"_parentNode",void 0),P(E(e),"_autoSizer",void 0),P(E(e),"_window",void 0),P(E(e),"_detectElementResize",void 0),P(E(e),"_onResize",function(){var l=e.props,s=l.disableHeight,c=l.disableWidth,d=l.onResize;if(e._parentNode){var f=e._parentNode.offsetHeight||0,u=e._parentNode.offsetWidth||0,p=e._window||window,h=p.getComputedStyle(e._parentNode)||{},v=parseInt(h.paddingLeft,10)||0,y=parseInt(h.paddingRight,10)||0,_=parseInt(h.paddingTop,10)||0,C=parseInt(h.paddingBottom,10)||0,z=f-_-C,D=u-v-y;(!s&&e.state.height!==z||!c&&e.state.width!==D)&&(e.setState({height:f-_-C,width:u-v-y}),d({height:f,width:u}))}}),P(E(e),"_setRef",function(l){e._autoSizer=l}),e}return pe(i,[{key:"componentDidMount",value:function(){var e=this.props.nonce;this._autoSizer&&this._autoSizer.parentNode&&this._autoSizer.parentNode.ownerDocument&&this._autoSizer.parentNode.ownerDocument.defaultView&&this._autoSizer.parentNode instanceof this._autoSizer.parentNode.ownerDocument.defaultView.HTMLElement&&(this._parentNode=this._autoSizer.parentNode,this._window=this._autoSizer.parentNode.ownerDocument.defaultView,this._detectElementResize=wo(e,this._window),this._detectElementResize.addResizeListener(this._parentNode,this._onResize),this._onResize())}},{key:"componentWillUnmount",value:function(){this._detectElementResize&&this._parentNode&&this._detectElementResize.removeResizeListener(this._parentNode,this._onResize)}},{key:"render",value:function(){var e=this.props,t=e.children,o=e.className,a=e.disableHeight,l=e.disableWidth,s=e.style,c=this.state,d=c.height,f=c.width,u={overflow:"visible"},p={};return a||(u.height=0,p.height=d),l||(u.width=0,p.width=f),k.createElement("div",{className:o,ref:this._setRef,style:Cs({},u,{},s)},t(p))}}]),i}(k.Component),P(ni,"propTypes",null),ri);P(bo,"defaultProps",{onResize:function(){},disableHeight:!1,disableWidth:!1,style:{}});var oi,ai,ws=(ai=oi=function(r){xe(i,r);function i(){var n,e;ge(this,i);for(var t=arguments.length,o=new Array(t),a=0;a<t;a++)o[a]=arguments[a];return e=_e(this,(n=Re(i)).call.apply(n,[this].concat(o))),P(E(e),"_child",void 0),P(E(e),"_measure",function(){var l=e.props,s=l.cache,c=l.columnIndex,d=c===void 0?0:c,f=l.parent,u=l.rowIndex,p=u===void 0?e.props.index||0:u,h=e._getCellMeasurements(),v=h.height,y=h.width;(v!==s.getHeight(p,d)||y!==s.getWidth(p,d))&&(s.set(p,d,y,v),f&&typeof f.recomputeGridSize=="function"&&f.recomputeGridSize({columnIndex:d,rowIndex:p}))}),P(E(e),"_registerChild",function(l){l&&!(l instanceof Element)&&console.warn("CellMeasurer registerChild expects to be passed Element or null"),e._child=l,l&&e._maybeMeasureCell()}),e}return pe(i,[{key:"componentDidMount",value:function(){this._maybeMeasureCell()}},{key:"componentDidUpdate",value:function(){this._maybeMeasureCell()}},{key:"render",value:function(){var e=this.props.children;return typeof e=="function"?e({measure:this._measure,registerChild:this._registerChild}):e}},{key:"_getCellMeasurements",value:function(){var e=this.props.cache,t=this._child||cn.findDOMNode(this);if(t&&t.ownerDocument&&t.ownerDocument.defaultView&&t instanceof t.ownerDocument.defaultView.HTMLElement){var o=t.style.width,a=t.style.height;e.hasFixedWidth()||(t.style.width="auto"),e.hasFixedHeight()||(t.style.height="auto");var l=Math.ceil(t.offsetHeight),s=Math.ceil(t.offsetWidth);return o&&(t.style.width=o),a&&(t.style.height=a),{height:l,width:s}}else return{height:0,width:0}}},{key:"_maybeMeasureCell",value:function(){var e=this.props,t=e.cache,o=e.columnIndex,a=o===void 0?0:o,l=e.parent,s=e.rowIndex,c=s===void 0?this.props.index||0:s;if(!t.has(c,a)){var d=this._getCellMeasurements(),f=d.height,u=d.width;t.set(c,a,u,f),l&&typeof l.invalidateCellSizeAfterRender=="function"&&l.invalidateCellSizeAfterRender({columnIndex:a,rowIndex:c})}}}]),i}(k.PureComponent),P(oi,"propTypes",null),ai);P(ws,"__internalCellMeasurerFlag",!1);function li(r,i){var n=Object.keys(r);if(Object.getOwnPropertySymbols){var e=Object.getOwnPropertySymbols(r);i&&(e=e.filter(function(t){return Object.getOwnPropertyDescriptor(r,t).enumerable})),n.push.apply(n,e)}return n}function bs(r){for(var i=1;i<arguments.length;i++){var n=arguments[i]!=null?arguments[i]:{};i%2?li(n,!0).forEach(function(e){P(r,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(n)):li(n).forEach(function(e){Object.defineProperty(r,e,Object.getOwnPropertyDescriptor(n,e))})}return r}var xs=150,st={OBSERVED:"observed",REQUESTED:"requested"},dn=function(r){xe(i,r);function i(){var n,e;ge(this,i);for(var t=arguments.length,o=new Array(t),a=0;a<t;a++)o[a]=arguments[a];return e=_e(this,(n=Re(i)).call.apply(n,[this].concat(o))),P(E(e),"state",{isScrolling:!1,scrollLeft:0,scrollTop:0}),P(E(e),"_calculateSizeAndPositionDataOnNextUpdate",!1),P(E(e),"_onSectionRenderedMemoizer",St()),P(E(e),"_onScrollMemoizer",St(!1)),P(E(e),"_invokeOnSectionRenderedHelper",function(){var l=e.props,s=l.cellLayoutManager,c=l.onSectionRendered;e._onSectionRenderedMemoizer({callback:c,indices:{indices:s.getLastRenderedIndices()}})}),P(E(e),"_setScrollingContainerRef",function(l){e._scrollingContainer=l}),P(E(e),"_updateScrollPositionForScrollToCell",function(){var l=e.props,s=l.cellLayoutManager,c=l.height,d=l.scrollToAlignment,f=l.scrollToCell,u=l.width,p=e.state,h=p.scrollLeft,v=p.scrollTop;if(f>=0){var y=s.getScrollPositionForCell({align:d,cellIndex:f,height:c,scrollLeft:h,scrollTop:v,width:u});(y.scrollLeft!==h||y.scrollTop!==v)&&e._setScrollPosition(y)}}),P(E(e),"_onScroll",function(l){if(l.target===e._scrollingContainer){e._enablePointerEventsAfterDelay();var s=e.props,c=s.cellLayoutManager,d=s.height,f=s.isScrollingChange,u=s.width,p=e._scrollbarSize,h=c.getTotalSize(),v=h.height,y=h.width,_=Math.max(0,Math.min(y-u+p,l.target.scrollLeft)),C=Math.max(0,Math.min(v-d+p,l.target.scrollTop));if(e.state.scrollLeft!==_||e.state.scrollTop!==C){var z=l.cancelable?st.OBSERVED:st.REQUESTED;e.state.isScrolling||f(!0),e.setState({isScrolling:!0,scrollLeft:_,scrollPositionChangeReason:z,scrollTop:C})}e._invokeOnScrollMemoizer({scrollLeft:_,scrollTop:C,totalWidth:y,totalHeight:v})}}),e._scrollbarSize=Gn(),e._scrollbarSize===void 0?(e._scrollbarSizeMeasured=!1,e._scrollbarSize=0):e._scrollbarSizeMeasured=!0,e}return pe(i,[{key:"recomputeCellSizesAndPositions",value:function(){this._calculateSizeAndPositionDataOnNextUpdate=!0,this.forceUpdate()}},{key:"componentDidMount",value:function(){var e=this.props,t=e.cellLayoutManager,o=e.scrollLeft,a=e.scrollToCell,l=e.scrollTop;this._scrollbarSizeMeasured||(this._scrollbarSize=Gn(),this._scrollbarSizeMeasured=!0,this.setState({})),a>=0?this._updateScrollPositionForScrollToCell():(o>=0||l>=0)&&this._setScrollPosition({scrollLeft:o,scrollTop:l}),this._invokeOnSectionRenderedHelper();var s=t.getTotalSize(),c=s.height,d=s.width;this._invokeOnScrollMemoizer({scrollLeft:o||0,scrollTop:l||0,totalHeight:c,totalWidth:d})}},{key:"componentDidUpdate",value:function(e,t){var o=this.props,a=o.height,l=o.scrollToAlignment,s=o.scrollToCell,c=o.width,d=this.state,f=d.scrollLeft,u=d.scrollPositionChangeReason,p=d.scrollTop;u===st.REQUESTED&&(f>=0&&f!==t.scrollLeft&&f!==this._scrollingContainer.scrollLeft&&(this._scrollingContainer.scrollLeft=f),p>=0&&p!==t.scrollTop&&p!==this._scrollingContainer.scrollTop&&(this._scrollingContainer.scrollTop=p)),(a!==e.height||l!==e.scrollToAlignment||s!==e.scrollToCell||c!==e.width)&&this._updateScrollPositionForScrollToCell(),this._invokeOnSectionRenderedHelper()}},{key:"componentWillUnmount",value:function(){this._disablePointerEventsTimeoutId&&clearTimeout(this._disablePointerEventsTimeoutId)}},{key:"render",value:function(){var e=this.props,t=e.autoHeight,o=e.cellCount,a=e.cellLayoutManager,l=e.className,s=e.height,c=e.horizontalOverscanSize,d=e.id,f=e.noContentRenderer,u=e.style,p=e.verticalOverscanSize,h=e.width,v=this.state,y=v.isScrolling,_=v.scrollLeft,C=v.scrollTop;(this._lastRenderedCellCount!==o||this._lastRenderedCellLayoutManager!==a||this._calculateSizeAndPositionDataOnNextUpdate)&&(this._lastRenderedCellCount=o,this._lastRenderedCellLayoutManager=a,this._calculateSizeAndPositionDataOnNextUpdate=!1,a.calculateSizeAndPositionData());var z=a.getTotalSize(),D=z.height,M=z.width,R=Math.max(0,_-c),I=Math.max(0,C-p),g=Math.min(M,_+h+c),w=Math.min(D,C+s+p),S=s>0&&h>0?a.cellRenderers({height:w-I,isScrolling:y,width:g-R,x:R,y:I}):[],O={boxSizing:"border-box",direction:"ltr",height:t?"auto":s,position:"relative",WebkitOverflowScrolling:"touch",width:h,willChange:"transform"},j=D>s?this._scrollbarSize:0,U=M>h?this._scrollbarSize:0;return O.overflowX=M+j<=h?"hidden":"auto",O.overflowY=D+U<=s?"hidden":"auto",k.createElement("div",{ref:this._setScrollingContainerRef,"aria-label":this.props["aria-label"],className:Pe("ReactVirtualized__Collection",l),id:d,onScroll:this._onScroll,role:"grid",style:bs({},O,{},u),tabIndex:0},o>0&&k.createElement("div",{className:"ReactVirtualized__Collection__innerScrollContainer",style:{height:D,maxHeight:D,maxWidth:M,overflow:"hidden",pointerEvents:y?"none":"",width:M}},S),o===0&&f())}},{key:"_enablePointerEventsAfterDelay",value:function(){var e=this;this._disablePointerEventsTimeoutId&&clearTimeout(this._disablePointerEventsTimeoutId),this._disablePointerEventsTimeoutId=setTimeout(function(){var t=e.props.isScrollingChange;t(!1),e._disablePointerEventsTimeoutId=null,e.setState({isScrolling:!1})},xs)}},{key:"_invokeOnScrollMemoizer",value:function(e){var t=this,o=e.scrollLeft,a=e.scrollTop,l=e.totalHeight,s=e.totalWidth;this._onScrollMemoizer({callback:function(d){var f=d.scrollLeft,u=d.scrollTop,p=t.props,h=p.height,v=p.onScroll,y=p.width;v({clientHeight:h,clientWidth:y,scrollHeight:l,scrollLeft:f,scrollTop:u,scrollWidth:s})},indices:{scrollLeft:o,scrollTop:a}})}},{key:"_setScrollPosition",value:function(e){var t=e.scrollLeft,o=e.scrollTop,a={scrollPositionChangeReason:st.REQUESTED};t>=0&&(a.scrollLeft=t),o>=0&&(a.scrollTop=o),(t>=0&&t!==this.state.scrollLeft||o>=0&&o!==this.state.scrollTop)&&this.setState(a)}}],[{key:"getDerivedStateFromProps",value:function(e,t){return e.cellCount===0&&(t.scrollLeft!==0||t.scrollTop!==0)?{scrollLeft:0,scrollTop:0,scrollPositionChangeReason:st.REQUESTED}:e.scrollLeft!==t.scrollLeft||e.scrollTop!==t.scrollTop?{scrollLeft:e.scrollLeft!=null?e.scrollLeft:t.scrollLeft,scrollTop:e.scrollTop!=null?e.scrollTop:t.scrollTop,scrollPositionChangeReason:st.REQUESTED}:null}}]),i}(k.PureComponent);P(dn,"defaultProps",{"aria-label":"grid",horizontalOverscanSize:0,noContentRenderer:function(){return null},onScroll:function(){return null},onSectionRendered:function(){return null},scrollToAlignment:"auto",scrollToCell:-1,style:{},verticalOverscanSize:0});dn.propTypes={};Wt(dn);var _s=function(){function r(i){var n=i.height,e=i.width,t=i.x,o=i.y;ge(this,r),this.height=n,this.width=e,this.x=t,this.y=o,this._indexMap={},this._indices=[]}return pe(r,[{key:"addCellIndex",value:function(n){var e=n.index;this._indexMap[e]||(this._indexMap[e]=!0,this._indices.push(e))}},{key:"getCellIndices",value:function(){return this._indices}},{key:"toString",value:function(){return"".concat(this.x,",").concat(this.y," ").concat(this.width,"x").concat(this.height)}}]),r}(),Rs=100,Is=function(){function r(){var i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:Rs;ge(this,r),this._sectionSize=i,this._cellMetadata=[],this._sections={}}return pe(r,[{key:"getCellIndices",value:function(n){var e=n.height,t=n.width,o=n.x,a=n.y,l={};return this.getSections({height:e,width:t,x:o,y:a}).forEach(function(s){return s.getCellIndices().forEach(function(c){l[c]=c})}),Object.keys(l).map(function(s){return l[s]})}},{key:"getCellMetadata",value:function(n){var e=n.index;return this._cellMetadata[e]}},{key:"getSections",value:function(n){for(var e=n.height,t=n.width,o=n.x,a=n.y,l=Math.floor(o/this._sectionSize),s=Math.floor((o+t-1)/this._sectionSize),c=Math.floor(a/this._sectionSize),d=Math.floor((a+e-1)/this._sectionSize),f=[],u=l;u<=s;u++)for(var p=c;p<=d;p++){var h="".concat(u,".").concat(p);this._sections[h]||(this._sections[h]=new _s({height:this._sectionSize,width:this._sectionSize,x:u*this._sectionSize,y:p*this._sectionSize})),f.push(this._sections[h])}return f}},{key:"getTotalSectionCount",value:function(){return Object.keys(this._sections).length}},{key:"toString",value:function(){var n=this;return Object.keys(this._sections).map(function(e){return n._sections[e].toString()})}},{key:"registerCell",value:function(n){var e=n.cellMetadatum,t=n.index;this._cellMetadata[t]=e,this.getSections(e).forEach(function(o){return o.addCellIndex({index:t})})}}]),r}();function Ts(r){for(var i=r.cellCount,n=r.cellSizeAndPositionGetter,e=r.sectionSize,t=[],o=new Is(e),a=0,l=0,s=0;s<i;s++){var c=n({index:s});if(c.height==null||isNaN(c.height)||c.width==null||isNaN(c.width)||c.x==null||isNaN(c.x)||c.y==null||isNaN(c.y))throw Error("Invalid metadata returned for cell ".concat(s,`:
10
+ https://fb.me/react-async-component-lifecycle-hooks`)}if(typeof r.getDerivedStateFromProps=="function"&&(i.componentWillMount=go,i.componentWillReceiveProps=vo),typeof i.getSnapshotBeforeUpdate=="function"){if(typeof i.componentDidUpdate!="function")throw new Error("Cannot polyfill getSnapshotBeforeUpdate() for components that do not define componentDidUpdate() on the prototype");i.componentWillUpdate=mo;var l=i.componentDidUpdate;i.componentDidUpdate=function(c,d,f){var u=this.__reactInternalSnapshotFlag?this.__reactInternalSnapshot:f;l.call(this,c,d,u)}}return r}function So(r){var i,n,e="";if(typeof r=="string"||typeof r=="number")e+=r;else if(typeof r=="object")if(Array.isArray(r))for(i=0;i<r.length;i++)r[i]&&(n=So(r[i]))&&(e&&(e+=" "),e+=n);else for(i in r)r[i]&&(e&&(e+=" "),e+=i);return e}function ke(){for(var r,i,n=0,e="";n<arguments.length;)(r=arguments[n++])&&(i=So(r))&&(e&&(e+=" "),e+=i);return e}function Vr(r){var i=r.cellCount,n=r.cellSize,e=r.computeMetadataCallback,t=r.computeMetadataCallbackProps,o=r.nextCellsCount,a=r.nextCellSize,l=r.nextScrollToIndex,s=r.scrollToIndex,c=r.updateScrollOffsetForScrollToIndex;(i!==o||(typeof n=="number"||typeof a=="number")&&n!==a)&&(e(t),s>=0&&s===l&&c())}function pt(r,i){if(r==null)return{};var n,e,t=Zi(r,i);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(r);for(e=0;e<o.length;e++)n=o[e],i.indexOf(n)===-1&&{}.propertyIsEnumerable.call(r,n)&&(t[n]=r[n])}return t}var is=function(){function r(i){var n=i.cellCount,e=i.cellSizeGetter,t=i.estimatedCellSize;ge(this,r),P(this,"_cellSizeAndPositionData",{}),P(this,"_lastMeasuredIndex",-1),P(this,"_lastBatchedIndex",-1),P(this,"_cellCount",void 0),P(this,"_cellSizeGetter",void 0),P(this,"_estimatedCellSize",void 0),this._cellSizeGetter=e,this._cellCount=n,this._estimatedCellSize=t}return pe(r,[{key:"areOffsetsAdjusted",value:function(){return!1}},{key:"configure",value:function(n){var e=n.cellCount,t=n.estimatedCellSize,o=n.cellSizeGetter;this._cellCount=e,this._estimatedCellSize=t,this._cellSizeGetter=o}},{key:"getCellCount",value:function(){return this._cellCount}},{key:"getEstimatedCellSize",value:function(){return this._estimatedCellSize}},{key:"getLastMeasuredIndex",value:function(){return this._lastMeasuredIndex}},{key:"getOffsetAdjustment",value:function(){return 0}},{key:"getSizeAndPositionOfCell",value:function(n){if(n<0||n>=this._cellCount)throw Error("Requested index ".concat(n," is outside of range 0..").concat(this._cellCount));if(n>this._lastMeasuredIndex)for(var e=this.getSizeAndPositionOfLastMeasuredCell(),t=e.offset+e.size,o=this._lastMeasuredIndex+1;o<=n;o++){var a=this._cellSizeGetter({index:o});if(a===void 0||isNaN(a))throw Error("Invalid size returned for cell ".concat(o," of value ").concat(a));a===null?(this._cellSizeAndPositionData[o]={offset:t,size:0},this._lastBatchedIndex=n):(this._cellSizeAndPositionData[o]={offset:t,size:a},t+=a,this._lastMeasuredIndex=n)}return this._cellSizeAndPositionData[n]}},{key:"getSizeAndPositionOfLastMeasuredCell",value:function(){return this._lastMeasuredIndex>=0?this._cellSizeAndPositionData[this._lastMeasuredIndex]:{offset:0,size:0}}},{key:"getTotalSize",value:function(){var n=this.getSizeAndPositionOfLastMeasuredCell(),e=n.offset+n.size,t=this._cellCount-this._lastMeasuredIndex-1,o=t*this._estimatedCellSize;return e+o}},{key:"getUpdatedOffsetForIndex",value:function(n){var e=n.align,t=e===void 0?"auto":e,o=n.containerSize,a=n.currentOffset,l=n.targetIndex;if(o<=0)return 0;var s=this.getSizeAndPositionOfCell(l),c=s.offset,d=c-o+s.size,f;switch(t){case"start":f=c;break;case"end":f=d;break;case"center":f=c-(o-s.size)/2;break;default:f=Math.max(d,Math.min(c,a));break}var u=this.getTotalSize();return Math.max(0,Math.min(u-o,f))}},{key:"getVisibleCellRange",value:function(n){var e=n.containerSize,t=n.offset,o=this.getTotalSize();if(o===0)return{};var a=t+e,l=this._findNearestCell(t),s=this.getSizeAndPositionOfCell(l);t=s.offset+s.size;for(var c=l;t<a&&c<this._cellCount-1;)c++,t+=this.getSizeAndPositionOfCell(c).size;return{start:l,stop:c}}},{key:"resetCell",value:function(n){this._lastMeasuredIndex=Math.min(this._lastMeasuredIndex,n-1)}},{key:"_binarySearch",value:function(n,e,t){for(;e<=n;){var o=e+Math.floor((n-e)/2),a=this.getSizeAndPositionOfCell(o).offset;if(a===t)return o;a<t?e=o+1:a>t&&(n=o-1)}return e>0?e-1:0}},{key:"_exponentialSearch",value:function(n,e){for(var t=1;n<this._cellCount&&this.getSizeAndPositionOfCell(n).offset<e;)n+=t,t*=2;return this._binarySearch(Math.min(n,this._cellCount-1),Math.floor(n/2),e)}},{key:"_findNearestCell",value:function(n){if(isNaN(n))throw Error("Invalid offset ".concat(n," specified"));n=Math.max(0,n);var e=this.getSizeAndPositionOfLastMeasuredCell(),t=Math.max(0,this._lastMeasuredIndex);return e.offset>=n?this._binarySearch(t,0,n):this._exponentialSearch(t,n)}}]),r}(),os=15e5,as=16777100,ls=function(){return typeof window<"u"},ss=function(){return!!window.chrome},cs=function(){return ls()&&ss()?as:os},qr=function(){function r(i){var n=i.maxScrollSize,e=n===void 0?cs():n,t=pt(i,["maxScrollSize"]);ge(this,r),P(this,"_cellSizeAndPositionManager",void 0),P(this,"_maxScrollSize",void 0),this._cellSizeAndPositionManager=new is(t),this._maxScrollSize=e}return pe(r,[{key:"areOffsetsAdjusted",value:function(){return this._cellSizeAndPositionManager.getTotalSize()>this._maxScrollSize}},{key:"configure",value:function(n){this._cellSizeAndPositionManager.configure(n)}},{key:"getCellCount",value:function(){return this._cellSizeAndPositionManager.getCellCount()}},{key:"getEstimatedCellSize",value:function(){return this._cellSizeAndPositionManager.getEstimatedCellSize()}},{key:"getLastMeasuredIndex",value:function(){return this._cellSizeAndPositionManager.getLastMeasuredIndex()}},{key:"getOffsetAdjustment",value:function(n){var e=n.containerSize,t=n.offset,o=this._cellSizeAndPositionManager.getTotalSize(),a=this.getTotalSize(),l=this._getOffsetPercentage({containerSize:e,offset:t,totalSize:a});return Math.round(l*(a-o))}},{key:"getSizeAndPositionOfCell",value:function(n){return this._cellSizeAndPositionManager.getSizeAndPositionOfCell(n)}},{key:"getSizeAndPositionOfLastMeasuredCell",value:function(){return this._cellSizeAndPositionManager.getSizeAndPositionOfLastMeasuredCell()}},{key:"getTotalSize",value:function(){return Math.min(this._maxScrollSize,this._cellSizeAndPositionManager.getTotalSize())}},{key:"getUpdatedOffsetForIndex",value:function(n){var e=n.align,t=e===void 0?"auto":e,o=n.containerSize,a=n.currentOffset,l=n.targetIndex;a=this._safeOffsetToOffset({containerSize:o,offset:a});var s=this._cellSizeAndPositionManager.getUpdatedOffsetForIndex({align:t,containerSize:o,currentOffset:a,targetIndex:l});return this._offsetToSafeOffset({containerSize:o,offset:s})}},{key:"getVisibleCellRange",value:function(n){var e=n.containerSize,t=n.offset;return t=this._safeOffsetToOffset({containerSize:e,offset:t}),this._cellSizeAndPositionManager.getVisibleCellRange({containerSize:e,offset:t})}},{key:"resetCell",value:function(n){this._cellSizeAndPositionManager.resetCell(n)}},{key:"_getOffsetPercentage",value:function(n){var e=n.containerSize,t=n.offset,o=n.totalSize;return o<=e?0:t/(o-e)}},{key:"_offsetToSafeOffset",value:function(n){var e=n.containerSize,t=n.offset,o=this._cellSizeAndPositionManager.getTotalSize(),a=this.getTotalSize();if(o===a)return t;var l=this._getOffsetPercentage({containerSize:e,offset:t,totalSize:o});return Math.round(l*(a-e))}},{key:"_safeOffsetToOffset",value:function(n){var e=n.containerSize,t=n.offset,o=this._cellSizeAndPositionManager.getTotalSize(),a=this.getTotalSize();if(o===a)return t;var l=this._getOffsetPercentage({containerSize:e,offset:t,totalSize:a});return Math.round(l*(o-e))}}]),r}();function St(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0,i={};return function(n){var e=n.callback,t=n.indices,o=Object.keys(t),a=!r||o.every(function(s){var c=t[s];return Array.isArray(c)?c.length>0:c>=0}),l=o.length!==Object.keys(i).length||o.some(function(s){var c=i[s],d=t[s];return Array.isArray(d)?c.join(",")!==d.join(","):c!==d});i=t,a&&l&&e(t)}}var Kt=-1,je=1;function ds(r){var i=r.cellCount,n=r.overscanCellsCount,e=r.scrollDirection,t=r.startIndex,o=r.stopIndex;return e===je?{overscanStartIndex:Math.max(0,t),overscanStopIndex:Math.min(i-1,o+n)}:{overscanStartIndex:Math.max(0,t-n),overscanStopIndex:Math.min(i-1,o)}}function Kr(r){var i=r.cellSize,n=r.cellSizeAndPositionManager,e=r.previousCellsCount,t=r.previousCellSize,o=r.previousScrollToAlignment,a=r.previousScrollToIndex,l=r.previousSize,s=r.scrollOffset,c=r.scrollToAlignment,d=r.scrollToIndex,f=r.size,u=r.sizeJustIncreasedFromZero,p=r.updateScrollIndexCallback,h=n.getCellCount(),v=d>=0&&d<h,y=f!==l||u||!t||typeof i=="number"&&i!==t;v&&(y||c!==o||d!==a)?p(d):!v&&h>0&&(f<l||h<e)&&s>n.getTotalSize()-f&&p(h-1)}function us(r){for(var i=r.cellCache,n=r.cellRenderer,e=r.columnSizeAndPositionManager,t=r.columnStartIndex,o=r.columnStopIndex,a=r.deferredMeasurementCache,l=r.horizontalOffsetAdjustment,s=r.isScrolling,c=r.isScrollingOptOut,d=r.parent,f=r.rowSizeAndPositionManager,u=r.rowStartIndex,p=r.rowStopIndex,h=r.styleCache,v=r.verticalOffsetAdjustment,y=r.visibleColumnIndices,_=r.visibleRowIndices,C=[],z=e.areOffsetsAdjusted()||f.areOffsetsAdjusted(),D=!s&&!z,L=u;L<=p;L++)for(var R=f.getSizeAndPositionOfCell(L),I=t;I<=o;I++){var g=e.getSizeAndPositionOfCell(I),w=I>=y.start&&I<=y.stop&&L>=_.start&&L<=_.stop,S="".concat(L,"-").concat(I),O=void 0;D&&h[S]?O=h[S]:a&&!a.has(L,I)?O={height:"auto",left:0,position:"absolute",top:0,width:"auto"}:(O={height:R.size,left:g.offset+l,position:"absolute",top:R.offset+v,width:g.size},h[S]=O);var j={columnIndex:I,isScrolling:s,isVisible:w,key:S,parent:d,rowIndex:L,style:O},U=void 0;(c||s)&&!l&&!v?(i[S]||(i[S]=n(j)),U=i[S]):U=n(j),!(U==null||U===!1)&&C.push(U)}return C}const fs=!!(typeof window<"u"&&window.document&&window.document.createElement);var Xt;function Gn(r){if((!Xt&&Xt!==0||r)&&fs){var i=document.createElement("div");i.style.position="absolute",i.style.top="-9999px",i.style.width="50px",i.style.height="50px",i.style.overflow="scroll",document.body.appendChild(i),Xt=i.offsetWidth-i.clientWidth,document.body.removeChild(i)}return Xt}var Ce;typeof window<"u"?Ce=window:typeof self<"u"?Ce=self:Ce={};var hs=Ce.requestAnimationFrame||Ce.webkitRequestAnimationFrame||Ce.mozRequestAnimationFrame||Ce.oRequestAnimationFrame||Ce.msRequestAnimationFrame||function(r){return Ce.setTimeout(r,1e3/60)},ps=Ce.cancelAnimationFrame||Ce.webkitCancelAnimationFrame||Ce.mozCancelAnimationFrame||Ce.oCancelAnimationFrame||Ce.msCancelAnimationFrame||function(r){Ce.clearTimeout(r)},Xr=hs,gs=ps,yt=function(i){return gs(i.id)},ir=function(i,n){var e;Promise.resolve().then(function(){e=Date.now()});var t=function a(){Date.now()-e>=n?i.call():o.id=Xr(a)},o={id:Xr(t)};return o},Yr,Qr;function Jr(r,i){var n=Object.keys(r);if(Object.getOwnPropertySymbols){var e=Object.getOwnPropertySymbols(r);i&&(e=e.filter(function(t){return Object.getOwnPropertyDescriptor(r,t).enumerable})),n.push.apply(n,e)}return n}function Ze(r){for(var i=1;i<arguments.length;i++){var n=arguments[i]!=null?arguments[i]:{};i%2?Jr(n,!0).forEach(function(e){P(r,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(n)):Jr(n).forEach(function(e){Object.defineProperty(r,e,Object.getOwnPropertyDescriptor(n,e))})}return r}var vs=150,wn={OBSERVED:"observed",REQUESTED:"requested"},ms=function(){return null},Be=(Qr=Yr=function(r){xe(i,r);function i(n){var e;ge(this,i),e=_e(this,Re(i).call(this,n)),P(E(e),"_onGridRenderedMemoizer",St()),P(E(e),"_onScrollMemoizer",St(!1)),P(E(e),"_deferredInvalidateColumnIndex",null),P(E(e),"_deferredInvalidateRowIndex",null),P(E(e),"_recomputeScrollLeftFlag",!1),P(E(e),"_recomputeScrollTopFlag",!1),P(E(e),"_horizontalScrollBarSize",0),P(E(e),"_verticalScrollBarSize",0),P(E(e),"_scrollbarPresenceChanged",!1),P(E(e),"_scrollingContainer",void 0),P(E(e),"_childrenToDisplay",void 0),P(E(e),"_columnStartIndex",void 0),P(E(e),"_columnStopIndex",void 0),P(E(e),"_rowStartIndex",void 0),P(E(e),"_rowStopIndex",void 0),P(E(e),"_renderedColumnStartIndex",0),P(E(e),"_renderedColumnStopIndex",0),P(E(e),"_renderedRowStartIndex",0),P(E(e),"_renderedRowStopIndex",0),P(E(e),"_initialScrollTop",void 0),P(E(e),"_initialScrollLeft",void 0),P(E(e),"_disablePointerEventsTimeoutId",void 0),P(E(e),"_styleCache",{}),P(E(e),"_cellCache",{}),P(E(e),"_debounceScrollEndedCallback",function(){e._disablePointerEventsTimeoutId=null,e.setState({isScrolling:!1,needToResetStyleCache:!1})}),P(E(e),"_invokeOnGridRenderedHelper",function(){var a=e.props.onSectionRendered;e._onGridRenderedMemoizer({callback:a,indices:{columnOverscanStartIndex:e._columnStartIndex,columnOverscanStopIndex:e._columnStopIndex,columnStartIndex:e._renderedColumnStartIndex,columnStopIndex:e._renderedColumnStopIndex,rowOverscanStartIndex:e._rowStartIndex,rowOverscanStopIndex:e._rowStopIndex,rowStartIndex:e._renderedRowStartIndex,rowStopIndex:e._renderedRowStopIndex}})}),P(E(e),"_setScrollingContainerRef",function(a){e._scrollingContainer=a}),P(E(e),"_onScroll",function(a){a.target===e._scrollingContainer&&e.handleScrollEvent(a.target)});var t=new qr({cellCount:n.columnCount,cellSizeGetter:function(l){return i._wrapSizeGetter(n.columnWidth)(l)},estimatedCellSize:i._getEstimatedColumnSize(n)}),o=new qr({cellCount:n.rowCount,cellSizeGetter:function(l){return i._wrapSizeGetter(n.rowHeight)(l)},estimatedCellSize:i._getEstimatedRowSize(n)});return e.state={instanceProps:{columnSizeAndPositionManager:t,rowSizeAndPositionManager:o,prevColumnWidth:n.columnWidth,prevRowHeight:n.rowHeight,prevColumnCount:n.columnCount,prevRowCount:n.rowCount,prevIsScrolling:n.isScrolling===!0,prevScrollToColumn:n.scrollToColumn,prevScrollToRow:n.scrollToRow,scrollbarSize:0,scrollbarSizeMeasured:!1},isScrolling:!1,scrollDirectionHorizontal:je,scrollDirectionVertical:je,scrollLeft:0,scrollTop:0,scrollPositionChangeReason:null,needToResetStyleCache:!1},n.scrollToRow>0&&(e._initialScrollTop=e._getCalculatedScrollTop(n,e.state)),n.scrollToColumn>0&&(e._initialScrollLeft=e._getCalculatedScrollLeft(n,e.state)),e}return pe(i,[{key:"getOffsetForCell",value:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=e.alignment,o=t===void 0?this.props.scrollToAlignment:t,a=e.columnIndex,l=a===void 0?this.props.scrollToColumn:a,s=e.rowIndex,c=s===void 0?this.props.scrollToRow:s,d=Ze({},this.props,{scrollToAlignment:o,scrollToColumn:l,scrollToRow:c});return{scrollLeft:this._getCalculatedScrollLeft(d),scrollTop:this._getCalculatedScrollTop(d)}}},{key:"getTotalRowsHeight",value:function(){return this.state.instanceProps.rowSizeAndPositionManager.getTotalSize()}},{key:"getTotalColumnsWidth",value:function(){return this.state.instanceProps.columnSizeAndPositionManager.getTotalSize()}},{key:"handleScrollEvent",value:function(e){var t=e.scrollLeft,o=t===void 0?0:t,a=e.scrollTop,l=a===void 0?0:a;if(!(l<0)){this._debounceScrollEnded();var s=this.props,c=s.autoHeight,d=s.autoWidth,f=s.height,u=s.width,p=this.state.instanceProps,h=p.scrollbarSize,v=p.rowSizeAndPositionManager.getTotalSize(),y=p.columnSizeAndPositionManager.getTotalSize(),_=Math.min(Math.max(0,y-u+h),o),C=Math.min(Math.max(0,v-f+h),l);if(this.state.scrollLeft!==_||this.state.scrollTop!==C){var z=_!==this.state.scrollLeft?_>this.state.scrollLeft?je:Kt:this.state.scrollDirectionHorizontal,D=C!==this.state.scrollTop?C>this.state.scrollTop?je:Kt:this.state.scrollDirectionVertical,L={isScrolling:!0,scrollDirectionHorizontal:z,scrollDirectionVertical:D,scrollPositionChangeReason:wn.OBSERVED};c||(L.scrollTop=C),d||(L.scrollLeft=_),L.needToResetStyleCache=!1,this.setState(L)}this._invokeOnScrollMemoizer({scrollLeft:_,scrollTop:C,totalColumnsWidth:y,totalRowsHeight:v})}}},{key:"invalidateCellSizeAfterRender",value:function(e){var t=e.columnIndex,o=e.rowIndex;this._deferredInvalidateColumnIndex=typeof this._deferredInvalidateColumnIndex=="number"?Math.min(this._deferredInvalidateColumnIndex,t):t,this._deferredInvalidateRowIndex=typeof this._deferredInvalidateRowIndex=="number"?Math.min(this._deferredInvalidateRowIndex,o):o}},{key:"measureAllCells",value:function(){var e=this.props,t=e.columnCount,o=e.rowCount,a=this.state.instanceProps;a.columnSizeAndPositionManager.getSizeAndPositionOfCell(t-1),a.rowSizeAndPositionManager.getSizeAndPositionOfCell(o-1)}},{key:"recomputeGridSize",value:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=e.columnIndex,o=t===void 0?0:t,a=e.rowIndex,l=a===void 0?0:a,s=this.props,c=s.scrollToColumn,d=s.scrollToRow,f=this.state.instanceProps;f.columnSizeAndPositionManager.resetCell(o),f.rowSizeAndPositionManager.resetCell(l),this._recomputeScrollLeftFlag=c>=0&&(this.state.scrollDirectionHorizontal===je?o<=c:o>=c),this._recomputeScrollTopFlag=d>=0&&(this.state.scrollDirectionVertical===je?l<=d:l>=d),this._styleCache={},this._cellCache={},this.forceUpdate()}},{key:"scrollToCell",value:function(e){var t=e.columnIndex,o=e.rowIndex,a=this.props.columnCount,l=this.props;a>1&&t!==void 0&&this._updateScrollLeftForScrollToColumn(Ze({},l,{scrollToColumn:t})),o!==void 0&&this._updateScrollTopForScrollToRow(Ze({},l,{scrollToRow:o}))}},{key:"componentDidMount",value:function(){var e=this.props,t=e.getScrollbarSize,o=e.height,a=e.scrollLeft,l=e.scrollToColumn,s=e.scrollTop,c=e.scrollToRow,d=e.width,f=this.state.instanceProps;if(this._initialScrollTop=0,this._initialScrollLeft=0,this._handleInvalidatedGridSize(),f.scrollbarSizeMeasured||this.setState(function(h){var v=Ze({},h,{needToResetStyleCache:!1});return v.instanceProps.scrollbarSize=t(),v.instanceProps.scrollbarSizeMeasured=!0,v}),typeof a=="number"&&a>=0||typeof s=="number"&&s>=0){var u=i._getScrollToPositionStateUpdate({prevState:this.state,scrollLeft:a,scrollTop:s});u&&(u.needToResetStyleCache=!1,this.setState(u))}this._scrollingContainer&&(this._scrollingContainer.scrollLeft!==this.state.scrollLeft&&(this._scrollingContainer.scrollLeft=this.state.scrollLeft),this._scrollingContainer.scrollTop!==this.state.scrollTop&&(this._scrollingContainer.scrollTop=this.state.scrollTop));var p=o>0&&d>0;l>=0&&p&&this._updateScrollLeftForScrollToColumn(),c>=0&&p&&this._updateScrollTopForScrollToRow(),this._invokeOnGridRenderedHelper(),this._invokeOnScrollMemoizer({scrollLeft:a||0,scrollTop:s||0,totalColumnsWidth:f.columnSizeAndPositionManager.getTotalSize(),totalRowsHeight:f.rowSizeAndPositionManager.getTotalSize()}),this._maybeCallOnScrollbarPresenceChange()}},{key:"componentDidUpdate",value:function(e,t){var o=this,a=this.props,l=a.autoHeight,s=a.autoWidth,c=a.columnCount,d=a.height,f=a.rowCount,u=a.scrollToAlignment,p=a.scrollToColumn,h=a.scrollToRow,v=a.width,y=this.state,_=y.scrollLeft,C=y.scrollPositionChangeReason,z=y.scrollTop,D=y.instanceProps;this._handleInvalidatedGridSize();var L=c>0&&e.columnCount===0||f>0&&e.rowCount===0;C===wn.REQUESTED&&(!s&&_>=0&&(_!==this._scrollingContainer.scrollLeft||L)&&(this._scrollingContainer.scrollLeft=_),!l&&z>=0&&(z!==this._scrollingContainer.scrollTop||L)&&(this._scrollingContainer.scrollTop=z));var R=(e.width===0||e.height===0)&&d>0&&v>0;if(this._recomputeScrollLeftFlag?(this._recomputeScrollLeftFlag=!1,this._updateScrollLeftForScrollToColumn(this.props)):Kr({cellSizeAndPositionManager:D.columnSizeAndPositionManager,previousCellsCount:e.columnCount,previousCellSize:e.columnWidth,previousScrollToAlignment:e.scrollToAlignment,previousScrollToIndex:e.scrollToColumn,previousSize:e.width,scrollOffset:_,scrollToAlignment:u,scrollToIndex:p,size:v,sizeJustIncreasedFromZero:R,updateScrollIndexCallback:function(){return o._updateScrollLeftForScrollToColumn(o.props)}}),this._recomputeScrollTopFlag?(this._recomputeScrollTopFlag=!1,this._updateScrollTopForScrollToRow(this.props)):Kr({cellSizeAndPositionManager:D.rowSizeAndPositionManager,previousCellsCount:e.rowCount,previousCellSize:e.rowHeight,previousScrollToAlignment:e.scrollToAlignment,previousScrollToIndex:e.scrollToRow,previousSize:e.height,scrollOffset:z,scrollToAlignment:u,scrollToIndex:h,size:d,sizeJustIncreasedFromZero:R,updateScrollIndexCallback:function(){return o._updateScrollTopForScrollToRow(o.props)}}),this._invokeOnGridRenderedHelper(),_!==t.scrollLeft||z!==t.scrollTop){var I=D.rowSizeAndPositionManager.getTotalSize(),g=D.columnSizeAndPositionManager.getTotalSize();this._invokeOnScrollMemoizer({scrollLeft:_,scrollTop:z,totalColumnsWidth:g,totalRowsHeight:I})}this._maybeCallOnScrollbarPresenceChange()}},{key:"componentWillUnmount",value:function(){this._disablePointerEventsTimeoutId&&yt(this._disablePointerEventsTimeoutId)}},{key:"render",value:function(){var e=this.props,t=e.autoContainerWidth,o=e.autoHeight,a=e.autoWidth,l=e.className,s=e.containerProps,c=e.containerRole,d=e.containerStyle,f=e.height,u=e.id,p=e.noContentRenderer,h=e.role,v=e.style,y=e.tabIndex,_=e.width,C=this.state,z=C.instanceProps,D=C.needToResetStyleCache,L=this._isScrolling(),R={boxSizing:"border-box",direction:"ltr",height:o?"auto":f,position:"relative",width:a?"auto":_,WebkitOverflowScrolling:"touch",willChange:"transform"};D&&(this._styleCache={}),this.state.isScrolling||this._resetStyleCache(),this._calculateChildrenToRender(this.props,this.state);var I=z.columnSizeAndPositionManager.getTotalSize(),g=z.rowSizeAndPositionManager.getTotalSize(),w=g>f?z.scrollbarSize:0,S=I>_?z.scrollbarSize:0;(S!==this._horizontalScrollBarSize||w!==this._verticalScrollBarSize)&&(this._horizontalScrollBarSize=S,this._verticalScrollBarSize=w,this._scrollbarPresenceChanged=!0),R.overflowX=I+w<=_?"hidden":"auto",R.overflowY=g+S<=f?"hidden":"auto";var O=this._childrenToDisplay,j=O.length===0&&f>0&&_>0;return k.createElement("div",le({ref:this._setScrollingContainerRef},s,{"aria-label":this.props["aria-label"],"aria-readonly":this.props["aria-readonly"],className:ke("ReactVirtualized__Grid",l),id:u,onScroll:this._onScroll,role:h,style:Ze({},R,{},v),tabIndex:y}),O.length>0&&k.createElement("div",{className:"ReactVirtualized__Grid__innerScrollContainer",role:c,style:Ze({width:t?"auto":I,height:g,maxWidth:I,maxHeight:g,overflow:"hidden",pointerEvents:L?"none":"",position:"relative"},d)},O),j&&p())}},{key:"_calculateChildrenToRender",value:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.props,t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.state,o=e.cellRenderer,a=e.cellRangeRenderer,l=e.columnCount,s=e.deferredMeasurementCache,c=e.height,d=e.overscanColumnCount,f=e.overscanIndicesGetter,u=e.overscanRowCount,p=e.rowCount,h=e.width,v=e.isScrollingOptOut,y=t.scrollDirectionHorizontal,_=t.scrollDirectionVertical,C=t.instanceProps,z=this._initialScrollTop>0?this._initialScrollTop:t.scrollTop,D=this._initialScrollLeft>0?this._initialScrollLeft:t.scrollLeft,L=this._isScrolling(e,t);if(this._childrenToDisplay=[],c>0&&h>0){var R=C.columnSizeAndPositionManager.getVisibleCellRange({containerSize:h,offset:D}),I=C.rowSizeAndPositionManager.getVisibleCellRange({containerSize:c,offset:z}),g=C.columnSizeAndPositionManager.getOffsetAdjustment({containerSize:h,offset:D}),w=C.rowSizeAndPositionManager.getOffsetAdjustment({containerSize:c,offset:z});this._renderedColumnStartIndex=R.start,this._renderedColumnStopIndex=R.stop,this._renderedRowStartIndex=I.start,this._renderedRowStopIndex=I.stop;var S=f({direction:"horizontal",cellCount:l,overscanCellsCount:d,scrollDirection:y,startIndex:typeof R.start=="number"?R.start:0,stopIndex:typeof R.stop=="number"?R.stop:-1}),O=f({direction:"vertical",cellCount:p,overscanCellsCount:u,scrollDirection:_,startIndex:typeof I.start=="number"?I.start:0,stopIndex:typeof I.stop=="number"?I.stop:-1}),j=S.overscanStartIndex,U=S.overscanStopIndex,q=O.overscanStartIndex,A=O.overscanStopIndex;if(s){if(!s.hasFixedHeight()){for(var W=q;W<=A;W++)if(!s.has(W,0)){j=0,U=l-1;break}}if(!s.hasFixedWidth()){for(var H=j;H<=U;H++)if(!s.has(0,H)){q=0,A=p-1;break}}}this._childrenToDisplay=a({cellCache:this._cellCache,cellRenderer:o,columnSizeAndPositionManager:C.columnSizeAndPositionManager,columnStartIndex:j,columnStopIndex:U,deferredMeasurementCache:s,horizontalOffsetAdjustment:g,isScrolling:L,isScrollingOptOut:v,parent:this,rowSizeAndPositionManager:C.rowSizeAndPositionManager,rowStartIndex:q,rowStopIndex:A,scrollLeft:D,scrollTop:z,styleCache:this._styleCache,verticalOffsetAdjustment:w,visibleColumnIndices:R,visibleRowIndices:I}),this._columnStartIndex=j,this._columnStopIndex=U,this._rowStartIndex=q,this._rowStopIndex=A}}},{key:"_debounceScrollEnded",value:function(){var e=this.props.scrollingResetTimeInterval;this._disablePointerEventsTimeoutId&&yt(this._disablePointerEventsTimeoutId),this._disablePointerEventsTimeoutId=ir(this._debounceScrollEndedCallback,e)}},{key:"_handleInvalidatedGridSize",value:function(){if(typeof this._deferredInvalidateColumnIndex=="number"&&typeof this._deferredInvalidateRowIndex=="number"){var e=this._deferredInvalidateColumnIndex,t=this._deferredInvalidateRowIndex;this._deferredInvalidateColumnIndex=null,this._deferredInvalidateRowIndex=null,this.recomputeGridSize({columnIndex:e,rowIndex:t})}}},{key:"_invokeOnScrollMemoizer",value:function(e){var t=this,o=e.scrollLeft,a=e.scrollTop,l=e.totalColumnsWidth,s=e.totalRowsHeight;this._onScrollMemoizer({callback:function(d){var f=d.scrollLeft,u=d.scrollTop,p=t.props,h=p.height,v=p.onScroll,y=p.width;v({clientHeight:h,clientWidth:y,scrollHeight:s,scrollLeft:f,scrollTop:u,scrollWidth:l})},indices:{scrollLeft:o,scrollTop:a}})}},{key:"_isScrolling",value:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.props,t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.state;return Object.hasOwnProperty.call(e,"isScrolling")?!!e.isScrolling:!!t.isScrolling}},{key:"_maybeCallOnScrollbarPresenceChange",value:function(){if(this._scrollbarPresenceChanged){var e=this.props.onScrollbarPresenceChange;this._scrollbarPresenceChanged=!1,e({horizontal:this._horizontalScrollBarSize>0,size:this.state.instanceProps.scrollbarSize,vertical:this._verticalScrollBarSize>0})}}},{key:"scrollToPosition",value:function(e){var t=e.scrollLeft,o=e.scrollTop,a=i._getScrollToPositionStateUpdate({prevState:this.state,scrollLeft:t,scrollTop:o});a&&(a.needToResetStyleCache=!1,this.setState(a))}},{key:"_getCalculatedScrollLeft",value:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.props,t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.state;return i._getCalculatedScrollLeft(e,t)}},{key:"_updateScrollLeftForScrollToColumn",value:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.props,t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.state,o=i._getScrollLeftForScrollToColumnStateUpdate(e,t);o&&(o.needToResetStyleCache=!1,this.setState(o))}},{key:"_getCalculatedScrollTop",value:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.props,t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.state;return i._getCalculatedScrollTop(e,t)}},{key:"_resetStyleCache",value:function(){var e=this._styleCache,t=this._cellCache,o=this.props.isScrollingOptOut;this._cellCache={},this._styleCache={};for(var a=this._rowStartIndex;a<=this._rowStopIndex;a++)for(var l=this._columnStartIndex;l<=this._columnStopIndex;l++){var s="".concat(a,"-").concat(l);this._styleCache[s]=e[s],o&&(this._cellCache[s]=t[s])}}},{key:"_updateScrollTopForScrollToRow",value:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.props,t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.state,o=i._getScrollTopForScrollToRowStateUpdate(e,t);o&&(o.needToResetStyleCache=!1,this.setState(o))}}],[{key:"getDerivedStateFromProps",value:function(e,t){var o={};e.columnCount===0&&t.scrollLeft!==0||e.rowCount===0&&t.scrollTop!==0?(o.scrollLeft=0,o.scrollTop=0):(e.scrollLeft!==t.scrollLeft&&e.scrollToColumn<0||e.scrollTop!==t.scrollTop&&e.scrollToRow<0)&&Object.assign(o,i._getScrollToPositionStateUpdate({prevState:t,scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}));var a=t.instanceProps;o.needToResetStyleCache=!1,(e.columnWidth!==a.prevColumnWidth||e.rowHeight!==a.prevRowHeight)&&(o.needToResetStyleCache=!0),a.columnSizeAndPositionManager.configure({cellCount:e.columnCount,estimatedCellSize:i._getEstimatedColumnSize(e),cellSizeGetter:i._wrapSizeGetter(e.columnWidth)}),a.rowSizeAndPositionManager.configure({cellCount:e.rowCount,estimatedCellSize:i._getEstimatedRowSize(e),cellSizeGetter:i._wrapSizeGetter(e.rowHeight)}),(a.prevColumnCount===0||a.prevRowCount===0)&&(a.prevColumnCount=0,a.prevRowCount=0),e.autoHeight&&e.isScrolling===!1&&a.prevIsScrolling===!0&&Object.assign(o,{isScrolling:!1});var l,s;return Vr({cellCount:a.prevColumnCount,cellSize:typeof a.prevColumnWidth=="number"?a.prevColumnWidth:null,computeMetadataCallback:function(){return a.columnSizeAndPositionManager.resetCell(0)},computeMetadataCallbackProps:e,nextCellsCount:e.columnCount,nextCellSize:typeof e.columnWidth=="number"?e.columnWidth:null,nextScrollToIndex:e.scrollToColumn,scrollToIndex:a.prevScrollToColumn,updateScrollOffsetForScrollToIndex:function(){l=i._getScrollLeftForScrollToColumnStateUpdate(e,t)}}),Vr({cellCount:a.prevRowCount,cellSize:typeof a.prevRowHeight=="number"?a.prevRowHeight:null,computeMetadataCallback:function(){return a.rowSizeAndPositionManager.resetCell(0)},computeMetadataCallbackProps:e,nextCellsCount:e.rowCount,nextCellSize:typeof e.rowHeight=="number"?e.rowHeight:null,nextScrollToIndex:e.scrollToRow,scrollToIndex:a.prevScrollToRow,updateScrollOffsetForScrollToIndex:function(){s=i._getScrollTopForScrollToRowStateUpdate(e,t)}}),a.prevColumnCount=e.columnCount,a.prevColumnWidth=e.columnWidth,a.prevIsScrolling=e.isScrolling===!0,a.prevRowCount=e.rowCount,a.prevRowHeight=e.rowHeight,a.prevScrollToColumn=e.scrollToColumn,a.prevScrollToRow=e.scrollToRow,a.scrollbarSize=e.getScrollbarSize(),a.scrollbarSize===void 0?(a.scrollbarSizeMeasured=!1,a.scrollbarSize=0):a.scrollbarSizeMeasured=!0,o.instanceProps=a,Ze({},o,{},l,{},s)}},{key:"_getEstimatedColumnSize",value:function(e){return typeof e.columnWidth=="number"?e.columnWidth:e.estimatedColumnSize}},{key:"_getEstimatedRowSize",value:function(e){return typeof e.rowHeight=="number"?e.rowHeight:e.estimatedRowSize}},{key:"_getScrollToPositionStateUpdate",value:function(e){var t=e.prevState,o=e.scrollLeft,a=e.scrollTop,l={scrollPositionChangeReason:wn.REQUESTED};return typeof o=="number"&&o>=0&&(l.scrollDirectionHorizontal=o>t.scrollLeft?je:Kt,l.scrollLeft=o),typeof a=="number"&&a>=0&&(l.scrollDirectionVertical=a>t.scrollTop?je:Kt,l.scrollTop=a),typeof o=="number"&&o>=0&&o!==t.scrollLeft||typeof a=="number"&&a>=0&&a!==t.scrollTop?l:{}}},{key:"_wrapSizeGetter",value:function(e){return typeof e=="function"?e:function(){return e}}},{key:"_getCalculatedScrollLeft",value:function(e,t){var o=e.columnCount,a=e.height,l=e.scrollToAlignment,s=e.scrollToColumn,c=e.width,d=t.scrollLeft,f=t.instanceProps;if(o>0){var u=o-1,p=s<0?u:Math.min(u,s),h=f.rowSizeAndPositionManager.getTotalSize(),v=f.scrollbarSizeMeasured&&h>a?f.scrollbarSize:0;return f.columnSizeAndPositionManager.getUpdatedOffsetForIndex({align:l,containerSize:c-v,currentOffset:d,targetIndex:p})}return 0}},{key:"_getScrollLeftForScrollToColumnStateUpdate",value:function(e,t){var o=t.scrollLeft,a=i._getCalculatedScrollLeft(e,t);return typeof a=="number"&&a>=0&&o!==a?i._getScrollToPositionStateUpdate({prevState:t,scrollLeft:a,scrollTop:-1}):{}}},{key:"_getCalculatedScrollTop",value:function(e,t){var o=e.height,a=e.rowCount,l=e.scrollToAlignment,s=e.scrollToRow,c=e.width,d=t.scrollTop,f=t.instanceProps;if(a>0){var u=a-1,p=s<0?u:Math.min(u,s),h=f.columnSizeAndPositionManager.getTotalSize(),v=f.scrollbarSizeMeasured&&h>c?f.scrollbarSize:0;return f.rowSizeAndPositionManager.getUpdatedOffsetForIndex({align:l,containerSize:o-v,currentOffset:d,targetIndex:p})}return 0}},{key:"_getScrollTopForScrollToRowStateUpdate",value:function(e,t){var o=t.scrollTop,a=i._getCalculatedScrollTop(e,t);return typeof a=="number"&&a>=0&&o!==a?i._getScrollToPositionStateUpdate({prevState:t,scrollLeft:-1,scrollTop:a}):{}}}]),i}(k.PureComponent),P(Yr,"propTypes",null),Qr);P(Be,"defaultProps",{"aria-label":"grid","aria-readonly":!0,autoContainerWidth:!1,autoHeight:!1,autoWidth:!1,cellRangeRenderer:us,containerRole:"rowgroup",containerStyle:{},estimatedColumnSize:100,estimatedRowSize:30,getScrollbarSize:Gn,noContentRenderer:ms,onScroll:function(){},onScrollbarPresenceChange:function(){},onSectionRendered:function(){},overscanColumnCount:0,overscanIndicesGetter:ds,overscanRowCount:10,role:"grid",scrollingResetTimeInterval:vs,scrollToAlignment:"auto",scrollToColumn:-1,scrollToRow:-1,style:{},tabIndex:0,isScrollingOptOut:!1});Wt(Be);var Ss=1;function yo(r){var i=r.cellCount,n=r.overscanCellsCount,e=r.scrollDirection,t=r.startIndex,o=r.stopIndex;return n=Math.max(1,n),e===Ss?{overscanStartIndex:Math.max(0,t-1),overscanStopIndex:Math.min(i-1,o+n)}:{overscanStartIndex:Math.max(0,t-n),overscanStopIndex:Math.min(i-1,o+1)}}var Zr,ei;function ti(r,i){var n=Object.keys(r);if(Object.getOwnPropertySymbols){var e=Object.getOwnPropertySymbols(r);i&&(e=e.filter(function(t){return Object.getOwnPropertyDescriptor(r,t).enumerable})),n.push.apply(n,e)}return n}function ys(r){for(var i=1;i<arguments.length;i++){var n=arguments[i]!=null?arguments[i]:{};i%2?ti(n,!0).forEach(function(e){P(r,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(n)):ti(n).forEach(function(e){Object.defineProperty(r,e,Object.getOwnPropertyDescriptor(n,e))})}return r}var Co=(ei=Zr=function(r){xe(i,r);function i(){var n,e;ge(this,i);for(var t=arguments.length,o=new Array(t),a=0;a<t;a++)o[a]=arguments[a];return e=_e(this,(n=Re(i)).call.apply(n,[this].concat(o))),P(E(e),"state",{scrollToColumn:0,scrollToRow:0,instanceProps:{prevScrollToColumn:0,prevScrollToRow:0}}),P(E(e),"_columnStartIndex",0),P(E(e),"_columnStopIndex",0),P(E(e),"_rowStartIndex",0),P(E(e),"_rowStopIndex",0),P(E(e),"_onKeyDown",function(l){var s=e.props,c=s.columnCount,d=s.disabled,f=s.mode,u=s.rowCount;if(!d){var p=e._getScrollState(),h=p.scrollToColumn,v=p.scrollToRow,y=e._getScrollState(),_=y.scrollToColumn,C=y.scrollToRow;switch(l.key){case"ArrowDown":C=Math.min(f==="cells"?C+1:e._rowStopIndex+1,u-1);break;case"ArrowLeft":_=Math.max(f==="cells"?_-1:e._columnStartIndex-1,0);break;case"ArrowRight":_=Math.min(f==="cells"?_+1:e._columnStopIndex+1,c-1);break;case"ArrowUp":C=Math.max(f==="cells"?C-1:e._rowStartIndex-1,0);break}(_!==h||C!==v)&&(l.preventDefault(),e._updateScrollState({scrollToColumn:_,scrollToRow:C}))}}),P(E(e),"_onSectionRendered",function(l){var s=l.columnStartIndex,c=l.columnStopIndex,d=l.rowStartIndex,f=l.rowStopIndex;e._columnStartIndex=s,e._columnStopIndex=c,e._rowStartIndex=d,e._rowStopIndex=f}),e}return pe(i,[{key:"setScrollIndexes",value:function(e){var t=e.scrollToColumn,o=e.scrollToRow;this.setState({scrollToRow:o,scrollToColumn:t})}},{key:"render",value:function(){var e=this.props,t=e.className,o=e.children,a=this._getScrollState(),l=a.scrollToColumn,s=a.scrollToRow;return k.createElement("div",{className:t,onKeyDown:this._onKeyDown},o({onSectionRendered:this._onSectionRendered,scrollToColumn:l,scrollToRow:s}))}},{key:"_getScrollState",value:function(){return this.props.isControlled?this.props:this.state}},{key:"_updateScrollState",value:function(e){var t=e.scrollToColumn,o=e.scrollToRow,a=this.props,l=a.isControlled,s=a.onScrollToChange;typeof s=="function"&&s({scrollToColumn:t,scrollToRow:o}),l||this.setState({scrollToColumn:t,scrollToRow:o})}}],[{key:"getDerivedStateFromProps",value:function(e,t){return e.isControlled?{}:e.scrollToColumn!==t.instanceProps.prevScrollToColumn||e.scrollToRow!==t.instanceProps.prevScrollToRow?ys({},t,{scrollToColumn:e.scrollToColumn,scrollToRow:e.scrollToRow,instanceProps:{prevScrollToColumn:e.scrollToColumn,prevScrollToRow:e.scrollToRow}}):{}}}]),i}(k.PureComponent),P(Zr,"propTypes",null),ei);P(Co,"defaultProps",{disabled:!1,isControlled:!1,mode:"edges",scrollToColumn:0,scrollToRow:0});Wt(Co);function wo(r,i){var n;typeof i<"u"?n=i:typeof window<"u"?n=window:typeof self<"u"?n=self:n=sl;var e=typeof n.document<"u"&&n.document.attachEvent;if(!e){var t=function(){var I=n.requestAnimationFrame||n.mozRequestAnimationFrame||n.webkitRequestAnimationFrame||function(g){return n.setTimeout(g,20)};return function(g){return I(g)}}(),o=function(){var I=n.cancelAnimationFrame||n.mozCancelAnimationFrame||n.webkitCancelAnimationFrame||n.clearTimeout;return function(g){return I(g)}}(),a=function(g){var w=g.__resizeTriggers__,S=w.firstElementChild,O=w.lastElementChild,j=S.firstElementChild;O.scrollLeft=O.scrollWidth,O.scrollTop=O.scrollHeight,j.style.width=S.offsetWidth+1+"px",j.style.height=S.offsetHeight+1+"px",S.scrollLeft=S.scrollWidth,S.scrollTop=S.scrollHeight},l=function(g){return g.offsetWidth!=g.__resizeLast__.width||g.offsetHeight!=g.__resizeLast__.height},s=function(g){if(!(g.target.className&&typeof g.target.className.indexOf=="function"&&g.target.className.indexOf("contract-trigger")<0&&g.target.className.indexOf("expand-trigger")<0)){var w=this;a(this),this.__resizeRAF__&&o(this.__resizeRAF__),this.__resizeRAF__=t(function(){l(w)&&(w.__resizeLast__.width=w.offsetWidth,w.__resizeLast__.height=w.offsetHeight,w.__resizeListeners__.forEach(function(S){S.call(w,g)}))})}},c=!1,d="",f="animationstart",u="Webkit Moz O ms".split(" "),p="webkitAnimationStart animationstart oAnimationStart MSAnimationStart".split(" "),h="";{var v=n.document.createElement("fakeelement");if(v.style.animationName!==void 0&&(c=!0),c===!1){for(var y=0;y<u.length;y++)if(v.style[u[y]+"AnimationName"]!==void 0){h=u[y],d="-"+h.toLowerCase()+"-",f=p[y],c=!0;break}}}var _="resizeanim",C="@"+d+"keyframes "+_+" { from { opacity: 0; } to { opacity: 0; } } ",z=d+"animation: 1ms "+_+"; "}var D=function(g){if(!g.getElementById("detectElementResize")){var w=(C||"")+".resize-triggers { "+(z||"")+'visibility: hidden; opacity: 0; } .resize-triggers, .resize-triggers > div, .contract-trigger:before { content: " "; display: block; position: absolute; top: 0; left: 0; height: 100%; width: 100%; overflow: hidden; z-index: -1; } .resize-triggers > div { background: #eee; overflow: auto; } .contract-trigger:before { width: 200%; height: 200%; }',S=g.head||g.getElementsByTagName("head")[0],O=g.createElement("style");O.id="detectElementResize",O.type="text/css",r!=null&&O.setAttribute("nonce",r),O.styleSheet?O.styleSheet.cssText=w:O.appendChild(g.createTextNode(w)),S.appendChild(O)}},L=function(g,w){if(e)g.attachEvent("onresize",w);else{if(!g.__resizeTriggers__){var S=g.ownerDocument,O=n.getComputedStyle(g);O&&O.position=="static"&&(g.style.position="relative"),D(S),g.__resizeLast__={},g.__resizeListeners__=[],(g.__resizeTriggers__=S.createElement("div")).className="resize-triggers";var j='<div class="expand-trigger"><div></div></div><div class="contract-trigger"></div>';if(window.trustedTypes){var U=trustedTypes.createPolicy("react-virtualized-auto-sizer",{createHTML:function(){return j}});g.__resizeTriggers__.innerHTML=U.createHTML("")}else g.__resizeTriggers__.innerHTML=j;g.appendChild(g.__resizeTriggers__),a(g),g.addEventListener("scroll",s,!0),f&&(g.__resizeTriggers__.__animationListener__=function(A){A.animationName==_&&a(g)},g.__resizeTriggers__.addEventListener(f,g.__resizeTriggers__.__animationListener__))}g.__resizeListeners__.push(w)}},R=function(g,w){if(e)g.detachEvent("onresize",w);else if(g.__resizeListeners__.splice(g.__resizeListeners__.indexOf(w),1),!g.__resizeListeners__.length){g.removeEventListener("scroll",s,!0),g.__resizeTriggers__.__animationListener__&&(g.__resizeTriggers__.removeEventListener(f,g.__resizeTriggers__.__animationListener__),g.__resizeTriggers__.__animationListener__=null);try{g.__resizeTriggers__=!g.removeChild(g.__resizeTriggers__)}catch{}}};return{addResizeListener:L,removeResizeListener:R}}var ni,ri;function ii(r,i){var n=Object.keys(r);if(Object.getOwnPropertySymbols){var e=Object.getOwnPropertySymbols(r);i&&(e=e.filter(function(t){return Object.getOwnPropertyDescriptor(r,t).enumerable})),n.push.apply(n,e)}return n}function Cs(r){for(var i=1;i<arguments.length;i++){var n=arguments[i]!=null?arguments[i]:{};i%2?ii(n,!0).forEach(function(e){P(r,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(n)):ii(n).forEach(function(e){Object.defineProperty(r,e,Object.getOwnPropertyDescriptor(n,e))})}return r}var bo=(ri=ni=function(r){xe(i,r);function i(){var n,e;ge(this,i);for(var t=arguments.length,o=new Array(t),a=0;a<t;a++)o[a]=arguments[a];return e=_e(this,(n=Re(i)).call.apply(n,[this].concat(o))),P(E(e),"state",{height:e.props.defaultHeight||0,width:e.props.defaultWidth||0}),P(E(e),"_parentNode",void 0),P(E(e),"_autoSizer",void 0),P(E(e),"_window",void 0),P(E(e),"_detectElementResize",void 0),P(E(e),"_onResize",function(){var l=e.props,s=l.disableHeight,c=l.disableWidth,d=l.onResize;if(e._parentNode){var f=e._parentNode.offsetHeight||0,u=e._parentNode.offsetWidth||0,p=e._window||window,h=p.getComputedStyle(e._parentNode)||{},v=parseInt(h.paddingLeft,10)||0,y=parseInt(h.paddingRight,10)||0,_=parseInt(h.paddingTop,10)||0,C=parseInt(h.paddingBottom,10)||0,z=f-_-C,D=u-v-y;(!s&&e.state.height!==z||!c&&e.state.width!==D)&&(e.setState({height:f-_-C,width:u-v-y}),d({height:f,width:u}))}}),P(E(e),"_setRef",function(l){e._autoSizer=l}),e}return pe(i,[{key:"componentDidMount",value:function(){var e=this.props.nonce;this._autoSizer&&this._autoSizer.parentNode&&this._autoSizer.parentNode.ownerDocument&&this._autoSizer.parentNode.ownerDocument.defaultView&&this._autoSizer.parentNode instanceof this._autoSizer.parentNode.ownerDocument.defaultView.HTMLElement&&(this._parentNode=this._autoSizer.parentNode,this._window=this._autoSizer.parentNode.ownerDocument.defaultView,this._detectElementResize=wo(e,this._window),this._detectElementResize.addResizeListener(this._parentNode,this._onResize),this._onResize())}},{key:"componentWillUnmount",value:function(){this._detectElementResize&&this._parentNode&&this._detectElementResize.removeResizeListener(this._parentNode,this._onResize)}},{key:"render",value:function(){var e=this.props,t=e.children,o=e.className,a=e.disableHeight,l=e.disableWidth,s=e.style,c=this.state,d=c.height,f=c.width,u={overflow:"visible"},p={};return a||(u.height=0,p.height=d),l||(u.width=0,p.width=f),k.createElement("div",{className:o,ref:this._setRef,style:Cs({},u,{},s)},t(p))}}]),i}(k.Component),P(ni,"propTypes",null),ri);P(bo,"defaultProps",{onResize:function(){},disableHeight:!1,disableWidth:!1,style:{}});var oi,ai,ws=(ai=oi=function(r){xe(i,r);function i(){var n,e;ge(this,i);for(var t=arguments.length,o=new Array(t),a=0;a<t;a++)o[a]=arguments[a];return e=_e(this,(n=Re(i)).call.apply(n,[this].concat(o))),P(E(e),"_child",void 0),P(E(e),"_measure",function(){var l=e.props,s=l.cache,c=l.columnIndex,d=c===void 0?0:c,f=l.parent,u=l.rowIndex,p=u===void 0?e.props.index||0:u,h=e._getCellMeasurements(),v=h.height,y=h.width;(v!==s.getHeight(p,d)||y!==s.getWidth(p,d))&&(s.set(p,d,y,v),f&&typeof f.recomputeGridSize=="function"&&f.recomputeGridSize({columnIndex:d,rowIndex:p}))}),P(E(e),"_registerChild",function(l){l&&!(l instanceof Element)&&console.warn("CellMeasurer registerChild expects to be passed Element or null"),e._child=l,l&&e._maybeMeasureCell()}),e}return pe(i,[{key:"componentDidMount",value:function(){this._maybeMeasureCell()}},{key:"componentDidUpdate",value:function(){this._maybeMeasureCell()}},{key:"render",value:function(){var e=this.props.children;return typeof e=="function"?e({measure:this._measure,registerChild:this._registerChild}):e}},{key:"_getCellMeasurements",value:function(){var e=this.props.cache,t=this._child||cn.findDOMNode(this);if(t&&t.ownerDocument&&t.ownerDocument.defaultView&&t instanceof t.ownerDocument.defaultView.HTMLElement){var o=t.style.width,a=t.style.height;e.hasFixedWidth()||(t.style.width="auto"),e.hasFixedHeight()||(t.style.height="auto");var l=Math.ceil(t.offsetHeight),s=Math.ceil(t.offsetWidth);return o&&(t.style.width=o),a&&(t.style.height=a),{height:l,width:s}}else return{height:0,width:0}}},{key:"_maybeMeasureCell",value:function(){var e=this.props,t=e.cache,o=e.columnIndex,a=o===void 0?0:o,l=e.parent,s=e.rowIndex,c=s===void 0?this.props.index||0:s;if(!t.has(c,a)){var d=this._getCellMeasurements(),f=d.height,u=d.width;t.set(c,a,u,f),l&&typeof l.invalidateCellSizeAfterRender=="function"&&l.invalidateCellSizeAfterRender({columnIndex:a,rowIndex:c})}}}]),i}(k.PureComponent),P(oi,"propTypes",null),ai);P(ws,"__internalCellMeasurerFlag",!1);function li(r,i){var n=Object.keys(r);if(Object.getOwnPropertySymbols){var e=Object.getOwnPropertySymbols(r);i&&(e=e.filter(function(t){return Object.getOwnPropertyDescriptor(r,t).enumerable})),n.push.apply(n,e)}return n}function bs(r){for(var i=1;i<arguments.length;i++){var n=arguments[i]!=null?arguments[i]:{};i%2?li(n,!0).forEach(function(e){P(r,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(n)):li(n).forEach(function(e){Object.defineProperty(r,e,Object.getOwnPropertyDescriptor(n,e))})}return r}var xs=150,st={OBSERVED:"observed",REQUESTED:"requested"},dn=function(r){xe(i,r);function i(){var n,e;ge(this,i);for(var t=arguments.length,o=new Array(t),a=0;a<t;a++)o[a]=arguments[a];return e=_e(this,(n=Re(i)).call.apply(n,[this].concat(o))),P(E(e),"state",{isScrolling:!1,scrollLeft:0,scrollTop:0}),P(E(e),"_calculateSizeAndPositionDataOnNextUpdate",!1),P(E(e),"_onSectionRenderedMemoizer",St()),P(E(e),"_onScrollMemoizer",St(!1)),P(E(e),"_invokeOnSectionRenderedHelper",function(){var l=e.props,s=l.cellLayoutManager,c=l.onSectionRendered;e._onSectionRenderedMemoizer({callback:c,indices:{indices:s.getLastRenderedIndices()}})}),P(E(e),"_setScrollingContainerRef",function(l){e._scrollingContainer=l}),P(E(e),"_updateScrollPositionForScrollToCell",function(){var l=e.props,s=l.cellLayoutManager,c=l.height,d=l.scrollToAlignment,f=l.scrollToCell,u=l.width,p=e.state,h=p.scrollLeft,v=p.scrollTop;if(f>=0){var y=s.getScrollPositionForCell({align:d,cellIndex:f,height:c,scrollLeft:h,scrollTop:v,width:u});(y.scrollLeft!==h||y.scrollTop!==v)&&e._setScrollPosition(y)}}),P(E(e),"_onScroll",function(l){if(l.target===e._scrollingContainer){e._enablePointerEventsAfterDelay();var s=e.props,c=s.cellLayoutManager,d=s.height,f=s.isScrollingChange,u=s.width,p=e._scrollbarSize,h=c.getTotalSize(),v=h.height,y=h.width,_=Math.max(0,Math.min(y-u+p,l.target.scrollLeft)),C=Math.max(0,Math.min(v-d+p,l.target.scrollTop));if(e.state.scrollLeft!==_||e.state.scrollTop!==C){var z=l.cancelable?st.OBSERVED:st.REQUESTED;e.state.isScrolling||f(!0),e.setState({isScrolling:!0,scrollLeft:_,scrollPositionChangeReason:z,scrollTop:C})}e._invokeOnScrollMemoizer({scrollLeft:_,scrollTop:C,totalWidth:y,totalHeight:v})}}),e._scrollbarSize=Gn(),e._scrollbarSize===void 0?(e._scrollbarSizeMeasured=!1,e._scrollbarSize=0):e._scrollbarSizeMeasured=!0,e}return pe(i,[{key:"recomputeCellSizesAndPositions",value:function(){this._calculateSizeAndPositionDataOnNextUpdate=!0,this.forceUpdate()}},{key:"componentDidMount",value:function(){var e=this.props,t=e.cellLayoutManager,o=e.scrollLeft,a=e.scrollToCell,l=e.scrollTop;this._scrollbarSizeMeasured||(this._scrollbarSize=Gn(),this._scrollbarSizeMeasured=!0,this.setState({})),a>=0?this._updateScrollPositionForScrollToCell():(o>=0||l>=0)&&this._setScrollPosition({scrollLeft:o,scrollTop:l}),this._invokeOnSectionRenderedHelper();var s=t.getTotalSize(),c=s.height,d=s.width;this._invokeOnScrollMemoizer({scrollLeft:o||0,scrollTop:l||0,totalHeight:c,totalWidth:d})}},{key:"componentDidUpdate",value:function(e,t){var o=this.props,a=o.height,l=o.scrollToAlignment,s=o.scrollToCell,c=o.width,d=this.state,f=d.scrollLeft,u=d.scrollPositionChangeReason,p=d.scrollTop;u===st.REQUESTED&&(f>=0&&f!==t.scrollLeft&&f!==this._scrollingContainer.scrollLeft&&(this._scrollingContainer.scrollLeft=f),p>=0&&p!==t.scrollTop&&p!==this._scrollingContainer.scrollTop&&(this._scrollingContainer.scrollTop=p)),(a!==e.height||l!==e.scrollToAlignment||s!==e.scrollToCell||c!==e.width)&&this._updateScrollPositionForScrollToCell(),this._invokeOnSectionRenderedHelper()}},{key:"componentWillUnmount",value:function(){this._disablePointerEventsTimeoutId&&clearTimeout(this._disablePointerEventsTimeoutId)}},{key:"render",value:function(){var e=this.props,t=e.autoHeight,o=e.cellCount,a=e.cellLayoutManager,l=e.className,s=e.height,c=e.horizontalOverscanSize,d=e.id,f=e.noContentRenderer,u=e.style,p=e.verticalOverscanSize,h=e.width,v=this.state,y=v.isScrolling,_=v.scrollLeft,C=v.scrollTop;(this._lastRenderedCellCount!==o||this._lastRenderedCellLayoutManager!==a||this._calculateSizeAndPositionDataOnNextUpdate)&&(this._lastRenderedCellCount=o,this._lastRenderedCellLayoutManager=a,this._calculateSizeAndPositionDataOnNextUpdate=!1,a.calculateSizeAndPositionData());var z=a.getTotalSize(),D=z.height,L=z.width,R=Math.max(0,_-c),I=Math.max(0,C-p),g=Math.min(L,_+h+c),w=Math.min(D,C+s+p),S=s>0&&h>0?a.cellRenderers({height:w-I,isScrolling:y,width:g-R,x:R,y:I}):[],O={boxSizing:"border-box",direction:"ltr",height:t?"auto":s,position:"relative",WebkitOverflowScrolling:"touch",width:h,willChange:"transform"},j=D>s?this._scrollbarSize:0,U=L>h?this._scrollbarSize:0;return O.overflowX=L+j<=h?"hidden":"auto",O.overflowY=D+U<=s?"hidden":"auto",k.createElement("div",{ref:this._setScrollingContainerRef,"aria-label":this.props["aria-label"],className:ke("ReactVirtualized__Collection",l),id:d,onScroll:this._onScroll,role:"grid",style:bs({},O,{},u),tabIndex:0},o>0&&k.createElement("div",{className:"ReactVirtualized__Collection__innerScrollContainer",style:{height:D,maxHeight:D,maxWidth:L,overflow:"hidden",pointerEvents:y?"none":"",width:L}},S),o===0&&f())}},{key:"_enablePointerEventsAfterDelay",value:function(){var e=this;this._disablePointerEventsTimeoutId&&clearTimeout(this._disablePointerEventsTimeoutId),this._disablePointerEventsTimeoutId=setTimeout(function(){var t=e.props.isScrollingChange;t(!1),e._disablePointerEventsTimeoutId=null,e.setState({isScrolling:!1})},xs)}},{key:"_invokeOnScrollMemoizer",value:function(e){var t=this,o=e.scrollLeft,a=e.scrollTop,l=e.totalHeight,s=e.totalWidth;this._onScrollMemoizer({callback:function(d){var f=d.scrollLeft,u=d.scrollTop,p=t.props,h=p.height,v=p.onScroll,y=p.width;v({clientHeight:h,clientWidth:y,scrollHeight:l,scrollLeft:f,scrollTop:u,scrollWidth:s})},indices:{scrollLeft:o,scrollTop:a}})}},{key:"_setScrollPosition",value:function(e){var t=e.scrollLeft,o=e.scrollTop,a={scrollPositionChangeReason:st.REQUESTED};t>=0&&(a.scrollLeft=t),o>=0&&(a.scrollTop=o),(t>=0&&t!==this.state.scrollLeft||o>=0&&o!==this.state.scrollTop)&&this.setState(a)}}],[{key:"getDerivedStateFromProps",value:function(e,t){return e.cellCount===0&&(t.scrollLeft!==0||t.scrollTop!==0)?{scrollLeft:0,scrollTop:0,scrollPositionChangeReason:st.REQUESTED}:e.scrollLeft!==t.scrollLeft||e.scrollTop!==t.scrollTop?{scrollLeft:e.scrollLeft!=null?e.scrollLeft:t.scrollLeft,scrollTop:e.scrollTop!=null?e.scrollTop:t.scrollTop,scrollPositionChangeReason:st.REQUESTED}:null}}]),i}(k.PureComponent);P(dn,"defaultProps",{"aria-label":"grid",horizontalOverscanSize:0,noContentRenderer:function(){return null},onScroll:function(){return null},onSectionRendered:function(){return null},scrollToAlignment:"auto",scrollToCell:-1,style:{},verticalOverscanSize:0});dn.propTypes={};Wt(dn);var _s=function(){function r(i){var n=i.height,e=i.width,t=i.x,o=i.y;ge(this,r),this.height=n,this.width=e,this.x=t,this.y=o,this._indexMap={},this._indices=[]}return pe(r,[{key:"addCellIndex",value:function(n){var e=n.index;this._indexMap[e]||(this._indexMap[e]=!0,this._indices.push(e))}},{key:"getCellIndices",value:function(){return this._indices}},{key:"toString",value:function(){return"".concat(this.x,",").concat(this.y," ").concat(this.width,"x").concat(this.height)}}]),r}(),Rs=100,Is=function(){function r(){var i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:Rs;ge(this,r),this._sectionSize=i,this._cellMetadata=[],this._sections={}}return pe(r,[{key:"getCellIndices",value:function(n){var e=n.height,t=n.width,o=n.x,a=n.y,l={};return this.getSections({height:e,width:t,x:o,y:a}).forEach(function(s){return s.getCellIndices().forEach(function(c){l[c]=c})}),Object.keys(l).map(function(s){return l[s]})}},{key:"getCellMetadata",value:function(n){var e=n.index;return this._cellMetadata[e]}},{key:"getSections",value:function(n){for(var e=n.height,t=n.width,o=n.x,a=n.y,l=Math.floor(o/this._sectionSize),s=Math.floor((o+t-1)/this._sectionSize),c=Math.floor(a/this._sectionSize),d=Math.floor((a+e-1)/this._sectionSize),f=[],u=l;u<=s;u++)for(var p=c;p<=d;p++){var h="".concat(u,".").concat(p);this._sections[h]||(this._sections[h]=new _s({height:this._sectionSize,width:this._sectionSize,x:u*this._sectionSize,y:p*this._sectionSize})),f.push(this._sections[h])}return f}},{key:"getTotalSectionCount",value:function(){return Object.keys(this._sections).length}},{key:"toString",value:function(){var n=this;return Object.keys(this._sections).map(function(e){return n._sections[e].toString()})}},{key:"registerCell",value:function(n){var e=n.cellMetadatum,t=n.index;this._cellMetadata[t]=e,this.getSections(e).forEach(function(o){return o.addCellIndex({index:t})})}}]),r}();function Ts(r){for(var i=r.cellCount,n=r.cellSizeAndPositionGetter,e=r.sectionSize,t=[],o=new Is(e),a=0,l=0,s=0;s<i;s++){var c=n({index:s});if(c.height==null||isNaN(c.height)||c.width==null||isNaN(c.width)||c.x==null||isNaN(c.x)||c.y==null||isNaN(c.y))throw Error("Invalid metadata returned for cell ".concat(s,`:
11
11
  x:`).concat(c.x,", y:").concat(c.y,", width:").concat(c.width,", height:").concat(c.height));a=Math.max(a,c.y+c.height),l=Math.max(l,c.x+c.width),t[s]=c,o.registerCell({cellMetadatum:c,index:s})}return{cellMetadata:t,height:a,sectionManager:o,width:l}}function si(r){var i=r.align,n=i===void 0?"auto":i,e=r.cellOffset,t=r.cellSize,o=r.containerSize,a=r.currentOffset,l=e,s=l-o+t;switch(n){case"start":return l;case"end":return s;case"center":return l-(o-t)/2;default:return Math.max(s,Math.min(l,a))}}var xo=function(r){xe(i,r);function i(n,e){var t;return ge(this,i),t=_e(this,Re(i).call(this,n,e)),t._cellMetadata=[],t._lastRenderedCellIndices=[],t._cellCache=[],t._isScrollingChange=t._isScrollingChange.bind(E(t)),t._setCollectionViewRef=t._setCollectionViewRef.bind(E(t)),t}return pe(i,[{key:"forceUpdate",value:function(){this._collectionView!==void 0&&this._collectionView.forceUpdate()}},{key:"recomputeCellSizesAndPositions",value:function(){this._cellCache=[],this._collectionView.recomputeCellSizesAndPositions()}},{key:"render",value:function(){var e=le({},this.props);return k.createElement(dn,le({cellLayoutManager:this,isScrollingChange:this._isScrollingChange,ref:this._setCollectionViewRef},e))}},{key:"calculateSizeAndPositionData",value:function(){var e=this.props,t=e.cellCount,o=e.cellSizeAndPositionGetter,a=e.sectionSize,l=Ts({cellCount:t,cellSizeAndPositionGetter:o,sectionSize:a});this._cellMetadata=l.cellMetadata,this._sectionManager=l.sectionManager,this._height=l.height,this._width=l.width}},{key:"getLastRenderedIndices",value:function(){return this._lastRenderedCellIndices}},{key:"getScrollPositionForCell",value:function(e){var t=e.align,o=e.cellIndex,a=e.height,l=e.scrollLeft,s=e.scrollTop,c=e.width,d=this.props.cellCount;if(o>=0&&o<d){var f=this._cellMetadata[o];l=si({align:t,cellOffset:f.x,cellSize:f.width,containerSize:c,currentOffset:l}),s=si({align:t,cellOffset:f.y,cellSize:f.height,containerSize:a,currentOffset:s})}return{scrollLeft:l,scrollTop:s}}},{key:"getTotalSize",value:function(){return{height:this._height,width:this._width}}},{key:"cellRenderers",value:function(e){var t=this,o=e.height,a=e.isScrolling,l=e.width,s=e.x,c=e.y,d=this.props,f=d.cellGroupRenderer,u=d.cellRenderer;return this._lastRenderedCellIndices=this._sectionManager.getCellIndices({height:o,width:l,x:s,y:c}),f({cellCache:this._cellCache,cellRenderer:u,cellSizeAndPositionGetter:function(h){var v=h.index;return t._sectionManager.getCellMetadata({index:v})},indices:this._lastRenderedCellIndices,isScrolling:a})}},{key:"_isScrollingChange",value:function(e){e||(this._cellCache=[])}},{key:"_setCollectionViewRef",value:function(e){this._collectionView=e}}]),i}(k.PureComponent);P(xo,"defaultProps",{"aria-label":"grid",cellGroupRenderer:Ps});xo.propTypes={};function Ps(r){var i=r.cellCache,n=r.cellRenderer,e=r.cellSizeAndPositionGetter,t=r.indices,o=r.isScrolling;return t.map(function(a){var l=e({index:a}),s={index:a,isScrolling:o,key:a,style:{height:l.height,left:l.x,position:"absolute",top:l.y,width:l.width}};return o?(a in i||(i[a]=n(s)),i[a]):n(s)}).filter(function(a){return!!a})}function ks(r){if(Array.isArray(r))return kl(r)}function Os(r){if(typeof Symbol<"u"&&r[Symbol.iterator]!=null||r["@@iterator"]!=null)return Array.from(r)}function zs(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
12
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function _o(r){return ks(r)||Os(r)||uo(r)||zs()}var Ro=function(r){xe(i,r);function i(n,e){var t;return ge(this,i),t=_e(this,Re(i).call(this,n,e)),t._loadMoreRowsMemoizer=St(),t._onRowsRendered=t._onRowsRendered.bind(E(t)),t._registerChild=t._registerChild.bind(E(t)),t}return pe(i,[{key:"resetLoadMoreRowsCache",value:function(e){this._loadMoreRowsMemoizer=St(),e&&this._doStuff(this._lastRenderedStartIndex,this._lastRenderedStopIndex)}},{key:"render",value:function(){var e=this.props.children;return e({onRowsRendered:this._onRowsRendered,registerChild:this._registerChild})}},{key:"_loadUnloadedRanges",value:function(e){var t=this,o=this.props.loadMoreRows;e.forEach(function(a){var l=o(a);l&&l.then(function(){Ds({lastRenderedStartIndex:t._lastRenderedStartIndex,lastRenderedStopIndex:t._lastRenderedStopIndex,startIndex:a.startIndex,stopIndex:a.stopIndex})&&t._registeredChild&&Ms(t._registeredChild,t._lastRenderedStartIndex)})})}},{key:"_onRowsRendered",value:function(e){var t=e.startIndex,o=e.stopIndex;this._lastRenderedStartIndex=t,this._lastRenderedStopIndex=o,this._doStuff(t,o)}},{key:"_doStuff",value:function(e,t){var o,a=this,l=this.props,s=l.isRowLoaded,c=l.minimumBatchSize,d=l.rowCount,f=l.threshold,u=Ns({isRowLoaded:s,minimumBatchSize:c,rowCount:d,startIndex:Math.max(0,e-f),stopIndex:Math.min(d-1,t+f)}),p=(o=[]).concat.apply(o,_o(u.map(function(h){var v=h.startIndex,y=h.stopIndex;return[v,y]})));this._loadMoreRowsMemoizer({callback:function(){a._loadUnloadedRanges(u)},indices:{squashedUnloadedRanges:p}})}},{key:"_registerChild",value:function(e){this._registeredChild=e}}]),i}(k.PureComponent);P(Ro,"defaultProps",{minimumBatchSize:10,rowCount:0,threshold:15});Ro.propTypes={};function Ds(r){var i=r.lastRenderedStartIndex,n=r.lastRenderedStopIndex,e=r.startIndex,t=r.stopIndex;return!(e>n||t<i)}function Ns(r){for(var i=r.isRowLoaded,n=r.minimumBatchSize,e=r.rowCount,t=r.startIndex,o=r.stopIndex,a=[],l=null,s=null,c=t;c<=o;c++){var d=i({index:c});d?s!==null&&(a.push({startIndex:l,stopIndex:s}),l=s=null):(s=c,l===null&&(l=c))}if(s!==null){for(var f=Math.min(Math.max(s,l+n-1),e-1),u=s+1;u<=f&&!i({index:u});u++)s=u;a.push({startIndex:l,stopIndex:s})}if(a.length)for(var p=a[0];p.stopIndex-p.startIndex+1<n&&p.startIndex>0;){var h=p.startIndex-1;if(!i({index:h}))p.startIndex=h;else break}return a}function Ms(r){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,n=typeof r.recomputeGridSize=="function"?r.recomputeGridSize:r.recomputeRowHeights;n?n.call(r,i):r.forceUpdate()}var ci,di,Io=(di=ci=function(r){xe(i,r);function i(){var n,e;ge(this,i);for(var t=arguments.length,o=new Array(t),a=0;a<t;a++)o[a]=arguments[a];return e=_e(this,(n=Re(i)).call.apply(n,[this].concat(o))),P(E(e),"Grid",void 0),P(E(e),"_cellRenderer",function(l){var s=l.parent,c=l.rowIndex,d=l.style,f=l.isScrolling,u=l.isVisible,p=l.key,h=e.props.rowRenderer,v=Object.getOwnPropertyDescriptor(d,"width");return v&&v.writable&&(d.width="100%"),h({index:c,style:d,isScrolling:f,isVisible:u,key:p,parent:s})}),P(E(e),"_setRef",function(l){e.Grid=l}),P(E(e),"_onScroll",function(l){var s=l.clientHeight,c=l.scrollHeight,d=l.scrollTop,f=e.props.onScroll;f({clientHeight:s,scrollHeight:c,scrollTop:d})}),P(E(e),"_onSectionRendered",function(l){var s=l.rowOverscanStartIndex,c=l.rowOverscanStopIndex,d=l.rowStartIndex,f=l.rowStopIndex,u=e.props.onRowsRendered;u({overscanStartIndex:s,overscanStopIndex:c,startIndex:d,stopIndex:f})}),e}return pe(i,[{key:"forceUpdateGrid",value:function(){this.Grid&&this.Grid.forceUpdate()}},{key:"getOffsetForRow",value:function(e){var t=e.alignment,o=e.index;if(this.Grid){var a=this.Grid.getOffsetForCell({alignment:t,rowIndex:o,columnIndex:0}),l=a.scrollTop;return l}return 0}},{key:"invalidateCellSizeAfterRender",value:function(e){var t=e.columnIndex,o=e.rowIndex;this.Grid&&this.Grid.invalidateCellSizeAfterRender({rowIndex:o,columnIndex:t})}},{key:"measureAllRows",value:function(){this.Grid&&this.Grid.measureAllCells()}},{key:"recomputeGridSize",value:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=e.columnIndex,o=t===void 0?0:t,a=e.rowIndex,l=a===void 0?0:a;this.Grid&&this.Grid.recomputeGridSize({rowIndex:l,columnIndex:o})}},{key:"recomputeRowHeights",value:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0;this.Grid&&this.Grid.recomputeGridSize({rowIndex:e,columnIndex:0})}},{key:"scrollToPosition",value:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0;this.Grid&&this.Grid.scrollToPosition({scrollTop:e})}},{key:"scrollToRow",value:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0;this.Grid&&this.Grid.scrollToCell({columnIndex:0,rowIndex:e})}},{key:"render",value:function(){var e=this.props,t=e.className,o=e.noRowsRenderer,a=e.scrollToIndex,l=e.width,s=Pe("ReactVirtualized__List",t);return k.createElement(Ue,le({},this.props,{autoContainerWidth:!0,cellRenderer:this._cellRenderer,className:s,columnWidth:l,columnCount:1,noContentRenderer:o,onScroll:this._onScroll,onSectionRendered:this._onSectionRendered,ref:this._setRef,scrollToRow:a}))}}]),i}(k.PureComponent),P(ci,"propTypes",null),di);P(Io,"defaultProps",{autoHeight:!1,estimatedRowSize:30,onScroll:function(){},noRowsRenderer:function(){return null},onRowsRendered:function(){},overscanIndicesGetter:yo,overscanRowCount:10,scrollToAlignment:"auto",scrollToIndex:-1,style:{}});function Ls(r){if(Array.isArray(r))return r}function Es(r,i){var n=r==null?null:typeof Symbol<"u"&&r[Symbol.iterator]||r["@@iterator"];if(n!=null){var e,t,o,a,l=[],s=!0,c=!1;try{if(o=(n=n.call(r)).next,i!==0)for(;!(s=(e=o.call(n)).done)&&(l.push(e.value),l.length!==i);s=!0);}catch(d){c=!0,t=d}finally{try{if(!s&&n.return!=null&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw t}}return l}}function As(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
13
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function js(r,i){return Ls(r)||Es(r,i)||uo(r,i)||As()}function Fs(r,i,n,e){for(var t=n+1;i<=n;){var o=i+n>>>1,a=r[o];a>=e?(t=o,n=o-1):i=o+1}return t}function Gs(r,i,n,e,t){for(var o=n+1;i<=n;){var a=i+n>>>1,l=r[a];t(l,e)>=0?(o=a,n=a-1):i=a+1}return o}function Ws(r,i,n,e,t){return typeof n=="function"?Gs(r,e===void 0?0:e|0,t===void 0?r.length-1:t|0,i,n):Fs(r,n===void 0?0:n|0,e===void 0?r.length-1:e|0,i)}function $s(r,i,n,e){for(var t=n+1;i<=n;){var o=i+n>>>1,a=r[o];a>e?(t=o,n=o-1):i=o+1}return t}function Hs(r,i,n,e,t){for(var o=n+1;i<=n;){var a=i+n>>>1,l=r[a];t(l,e)>0?(o=a,n=a-1):i=a+1}return o}function Us(r,i,n,e,t){return typeof n=="function"?Hs(r,e===void 0?0:e|0,t===void 0?r.length-1:t|0,i,n):$s(r,n===void 0?0:n|0,e===void 0?r.length-1:e|0,i)}function Bs(r,i,n,e){for(var t=i-1;i<=n;){var o=i+n>>>1,a=r[o];a<e?(t=o,i=o+1):n=o-1}return t}function Vs(r,i,n,e,t){for(var o=i-1;i<=n;){var a=i+n>>>1,l=r[a];t(l,e)<0?(o=a,i=a+1):n=a-1}return o}function qs(r,i,n,e,t){return typeof n=="function"?Vs(r,e===void 0?0:e|0,t===void 0?r.length-1:t|0,i,n):Bs(r,n===void 0?0:n|0,e===void 0?r.length-1:e|0,i)}function Ks(r,i,n,e){for(var t=i-1;i<=n;){var o=i+n>>>1,a=r[o];a<=e?(t=o,i=o+1):n=o-1}return t}function Xs(r,i,n,e,t){for(var o=i-1;i<=n;){var a=i+n>>>1,l=r[a];t(l,e)<=0?(o=a,i=a+1):n=a-1}return o}function Ys(r,i,n,e,t){return typeof n=="function"?Xs(r,e===void 0?0:e|0,t===void 0?r.length-1:t|0,i,n):Ks(r,n===void 0?0:n|0,e===void 0?r.length-1:e|0,i)}function Qs(r,i,n,e){for(;i<=n;){var t=i+n>>>1,o=r[t];if(o===e)return t;o<=e?i=t+1:n=t-1}return-1}function Js(r,i,n,e,t){for(;i<=n;){var o=i+n>>>1,a=r[o],l=t(a,e);if(l===0)return o;l<=0?i=o+1:n=o-1}return-1}function Zs(r,i,n,e,t){return typeof n=="function"?Js(r,e===void 0?0:e|0,t===void 0?r.length-1:t|0,i,n):Qs(r,n===void 0?0:n|0,e===void 0?r.length-1:e|0,i)}const on={ge:Ws,gt:Us,lt:qs,le:Ys,eq:Zs};var gt=0,tt=1,tn=2;function or(r,i,n,e,t){this.mid=r,this.left=i,this.right=n,this.leftPoints=e,this.rightPoints=t,this.count=(i?i.count:0)+(n?n.count:0)+e.length}var $t=or.prototype;function bn(r,i){r.mid=i.mid,r.left=i.left,r.right=i.right,r.leftPoints=i.leftPoints,r.rightPoints=i.rightPoints,r.count=i.count}function To(r,i){var n=jt(i);r.mid=n.mid,r.left=n.left,r.right=n.right,r.leftPoints=n.leftPoints,r.rightPoints=n.rightPoints,r.count=n.count}function ui(r,i){var n=r.intervals([]);n.push(i),To(r,n)}function fi(r,i){var n=r.intervals([]),e=n.indexOf(i);return e<0?gt:(n.splice(e,1),To(r,n),tt)}$t.intervals=function(r){return r.push.apply(r,this.leftPoints),this.left&&this.left.intervals(r),this.right&&this.right.intervals(r),r};$t.insert=function(r){var i=this.count-this.leftPoints.length;if(this.count+=1,r[1]<this.mid)this.left?4*(this.left.count+1)>3*(i+1)?ui(this,r):this.left.insert(r):this.left=jt([r]);else if(r[0]>this.mid)this.right?4*(this.right.count+1)>3*(i+1)?ui(this,r):this.right.insert(r):this.right=jt([r]);else{var n=on.ge(this.leftPoints,r,ar),e=on.ge(this.rightPoints,r,lr);this.leftPoints.splice(n,0,r),this.rightPoints.splice(e,0,r)}};$t.remove=function(r){var i=this.count-this.leftPoints;if(r[1]<this.mid){if(!this.left)return gt;var n=this.right?this.right.count:0;if(4*n>3*(i-1))return fi(this,r);var e=this.left.remove(r);return e===tn?(this.left=null,this.count-=1,tt):(e===tt&&(this.count-=1),e)}else if(r[0]>this.mid){if(!this.right)return gt;var t=this.left?this.left.count:0;if(4*t>3*(i-1))return fi(this,r);var e=this.right.remove(r);return e===tn?(this.right=null,this.count-=1,tt):(e===tt&&(this.count-=1),e)}else{if(this.count===1)return this.leftPoints[0]===r?tn:gt;if(this.leftPoints.length===1&&this.leftPoints[0]===r){if(this.left&&this.right){for(var o=this,a=this.left;a.right;)o=a,a=a.right;if(o===this)a.right=this.right;else{var l=this.left,e=this.right;o.count-=a.count,o.right=a.left,a.left=l,a.right=e}bn(this,a),this.count=(this.left?this.left.count:0)+(this.right?this.right.count:0)+this.leftPoints.length}else this.left?bn(this,this.left):bn(this,this.right);return tt}for(var l=on.ge(this.leftPoints,r,ar);l<this.leftPoints.length&&this.leftPoints[l][0]===r[0];++l)if(this.leftPoints[l]===r){this.count-=1,this.leftPoints.splice(l,1);for(var e=on.ge(this.rightPoints,r,lr);e<this.rightPoints.length&&this.rightPoints[e][1]===r[1];++e)if(this.rightPoints[e]===r)return this.rightPoints.splice(e,1),tt}return gt}};function Po(r,i,n){for(var e=0;e<r.length&&r[e][0]<=i;++e){var t=n(r[e]);if(t)return t}}function ko(r,i,n){for(var e=r.length-1;e>=0&&r[e][1]>=i;--e){var t=n(r[e]);if(t)return t}}function Oo(r,i){for(var n=0;n<r.length;++n){var e=i(r[n]);if(e)return e}}$t.queryPoint=function(r,i){if(r<this.mid){if(this.left){var n=this.left.queryPoint(r,i);if(n)return n}return Po(this.leftPoints,r,i)}else if(r>this.mid){if(this.right){var n=this.right.queryPoint(r,i);if(n)return n}return ko(this.rightPoints,r,i)}else return Oo(this.leftPoints,i)};$t.queryInterval=function(r,i,n){if(r<this.mid&&this.left){var e=this.left.queryInterval(r,i,n);if(e)return e}if(i>this.mid&&this.right){var e=this.right.queryInterval(r,i,n);if(e)return e}return i<this.mid?Po(this.leftPoints,i,n):r>this.mid?ko(this.rightPoints,r,n):Oo(this.leftPoints,n)};function ec(r,i){return r-i}function ar(r,i){var n=r[0]-i[0];return n||r[1]-i[1]}function lr(r,i){var n=r[1]-i[1];return n||r[0]-i[0]}function jt(r){if(r.length===0)return null;for(var i=[],n=0;n<r.length;++n)i.push(r[n][0],r[n][1]);i.sort(ec);for(var e=i[i.length>>1],t=[],o=[],a=[],n=0;n<r.length;++n){var l=r[n];l[1]<e?t.push(l):e<l[0]?o.push(l):a.push(l)}var s=a,c=a.slice();return s.sort(ar),c.sort(lr),new or(e,jt(t),jt(o),s,c)}function zo(r){this.root=r}var Ct=zo.prototype;Ct.insert=function(r){this.root?this.root.insert(r):this.root=new or(r[0],null,null,[r],[r])};Ct.remove=function(r){if(this.root){var i=this.root.remove(r);return i===tn&&(this.root=null),i!==gt}return!1};Ct.queryPoint=function(r,i){if(this.root)return this.root.queryPoint(r,i)};Ct.queryInterval=function(r,i,n){if(r<=i&&this.root)return this.root.queryInterval(r,i,n)};Object.defineProperty(Ct,"count",{get:function(){return this.root?this.root.count:0}});Object.defineProperty(Ct,"intervals",{get:function(){return this.root?this.root.intervals([]):[]}});function tc(r){return new zo(null)}var xn=function(){function r(){ge(this,r),P(this,"_columnSizeMap",{}),P(this,"_intervalTree",tc()),P(this,"_leftMap",{})}return pe(r,[{key:"estimateTotalHeight",value:function(n,e,t){var o=n-this.count;return this.tallestColumnSize+Math.ceil(o/e)*t}},{key:"range",value:function(n,e,t){var o=this;this._intervalTree.queryInterval(n,n+e,function(a){var l=js(a,3),s=l[0];l[1];var c=l[2];return t(c,o._leftMap[c],s)})}},{key:"setPosition",value:function(n,e,t,o){this._intervalTree.insert([t,t+o,n]),this._leftMap[n]=e;var a=this._columnSizeMap,l=a[e];l===void 0?a[e]=t+o:a[e]=Math.max(l,t+o)}},{key:"count",get:function(){return this._intervalTree.count}},{key:"shortestColumnSize",get:function(){var n=this._columnSizeMap,e=0;for(var t in n){var o=n[t];e=e===0?o:Math.min(e,o)}return e}},{key:"tallestColumnSize",get:function(){var n=this._columnSizeMap,e=0;for(var t in n){var o=n[t];e=Math.max(e,o)}return e}}]),r}(),hi,pi;function gi(r,i){var n=Object.keys(r);if(Object.getOwnPropertySymbols){var e=Object.getOwnPropertySymbols(r);i&&(e=e.filter(function(t){return Object.getOwnPropertyDescriptor(r,t).enumerable})),n.push.apply(n,e)}return n}function nc(r){for(var i=1;i<arguments.length;i++){var n=arguments[i]!=null?arguments[i]:{};i%2?gi(n,!0).forEach(function(e){P(r,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(n)):gi(n).forEach(function(e){Object.defineProperty(r,e,Object.getOwnPropertyDescriptor(n,e))})}return r}var rc={},ic=150,Do=(pi=hi=function(r){xe(i,r);function i(){var n,e;ge(this,i);for(var t=arguments.length,o=new Array(t),a=0;a<t;a++)o[a]=arguments[a];return e=_e(this,(n=Re(i)).call.apply(n,[this].concat(o))),P(E(e),"state",{isScrolling:!1,scrollTop:0}),P(E(e),"_debounceResetIsScrollingId",void 0),P(E(e),"_invalidateOnUpdateStartIndex",null),P(E(e),"_invalidateOnUpdateStopIndex",null),P(E(e),"_positionCache",new xn),P(E(e),"_startIndex",null),P(E(e),"_startIndexMemoized",null),P(E(e),"_stopIndex",null),P(E(e),"_stopIndexMemoized",null),P(E(e),"_debounceResetIsScrollingCallback",function(){e.setState({isScrolling:!1})}),P(E(e),"_setScrollingContainerRef",function(l){e._scrollingContainer=l}),P(E(e),"_onScroll",function(l){var s=e.props.height,c=l.currentTarget.scrollTop,d=Math.min(Math.max(0,e._getEstimatedTotalHeight()-s),c);c===d&&(e._debounceResetIsScrolling(),e.state.scrollTop!==d&&e.setState({isScrolling:!0,scrollTop:d}))}),e}return pe(i,[{key:"clearCellPositions",value:function(){this._positionCache=new xn,this.forceUpdate()}},{key:"invalidateCellSizeAfterRender",value:function(e){var t=e.rowIndex;this._invalidateOnUpdateStartIndex===null?(this._invalidateOnUpdateStartIndex=t,this._invalidateOnUpdateStopIndex=t):(this._invalidateOnUpdateStartIndex=Math.min(this._invalidateOnUpdateStartIndex,t),this._invalidateOnUpdateStopIndex=Math.max(this._invalidateOnUpdateStopIndex,t))}},{key:"recomputeCellPositions",value:function(){var e=this._positionCache.count-1;this._positionCache=new xn,this._populatePositionCache(0,e),this.forceUpdate()}},{key:"componentDidMount",value:function(){this._checkInvalidateOnUpdate(),this._invokeOnScrollCallback(),this._invokeOnCellsRenderedCallback()}},{key:"componentDidUpdate",value:function(e,t){this._checkInvalidateOnUpdate(),this._invokeOnScrollCallback(),this._invokeOnCellsRenderedCallback(),this.props.scrollTop!==e.scrollTop&&this._debounceResetIsScrolling()}},{key:"componentWillUnmount",value:function(){this._debounceResetIsScrollingId&&yt(this._debounceResetIsScrollingId)}},{key:"render",value:function(){var e=this,t=this.props,o=t.autoHeight,a=t.cellCount,l=t.cellMeasurerCache,s=t.cellRenderer,c=t.className,d=t.height,f=t.id,u=t.keyMapper,p=t.overscanByPixels,h=t.role,v=t.style,y=t.tabIndex,_=t.width,C=t.rowDirection,z=this.state,D=z.isScrolling,M=z.scrollTop,R=[],I=this._getEstimatedTotalHeight(),g=this._positionCache.shortestColumnSize,w=this._positionCache.count,S=0,O;if(this._positionCache.range(Math.max(0,M-p),d+p*2,function(q,A,W){var H;typeof O>"u"?(S=q,O=q):(S=Math.min(S,q),O=Math.max(O,q)),R.push(s({index:q,isScrolling:D,key:u(q),parent:e,style:(H={height:l.getHeight(q)},P(H,C==="ltr"?"left":"right",A),P(H,"position","absolute"),P(H,"top",W),P(H,"width",l.getWidth(q)),H)}))}),g<M+d+p&&w<a)for(var j=Math.min(a-w,Math.ceil((M+d+p-g)/l.defaultHeight*_/l.defaultWidth)),U=w;U<w+j;U++)O=U,R.push(s({index:U,isScrolling:D,key:u(U),parent:this,style:{width:l.getWidth(U)}}));return this._startIndex=S,this._stopIndex=O,k.createElement("div",{ref:this._setScrollingContainerRef,"aria-label":this.props["aria-label"],className:Pe("ReactVirtualized__Masonry",c),id:f,onScroll:this._onScroll,role:h,style:nc({boxSizing:"border-box",direction:"ltr",height:o?"auto":d,overflowX:"hidden",overflowY:I<d?"hidden":"auto",position:"relative",width:_,WebkitOverflowScrolling:"touch",willChange:"transform"},v),tabIndex:y},k.createElement("div",{className:"ReactVirtualized__Masonry__innerScrollContainer",style:{width:"100%",height:I,maxWidth:"100%",maxHeight:I,overflow:"hidden",pointerEvents:D?"none":"",position:"relative"}},R))}},{key:"_checkInvalidateOnUpdate",value:function(){if(typeof this._invalidateOnUpdateStartIndex=="number"){var e=this._invalidateOnUpdateStartIndex,t=this._invalidateOnUpdateStopIndex;this._invalidateOnUpdateStartIndex=null,this._invalidateOnUpdateStopIndex=null,this._populatePositionCache(e,t),this.forceUpdate()}}},{key:"_debounceResetIsScrolling",value:function(){var e=this.props.scrollingResetTimeInterval;this._debounceResetIsScrollingId&&yt(this._debounceResetIsScrollingId),this._debounceResetIsScrollingId=ir(this._debounceResetIsScrollingCallback,e)}},{key:"_getEstimatedTotalHeight",value:function(){var e=this.props,t=e.cellCount,o=e.cellMeasurerCache,a=e.width,l=Math.max(1,Math.floor(a/o.defaultWidth));return this._positionCache.estimateTotalHeight(t,l,o.defaultHeight)}},{key:"_invokeOnScrollCallback",value:function(){var e=this.props,t=e.height,o=e.onScroll,a=this.state.scrollTop;this._onScrollMemoized!==a&&(o({clientHeight:t,scrollHeight:this._getEstimatedTotalHeight(),scrollTop:a}),this._onScrollMemoized=a)}},{key:"_invokeOnCellsRenderedCallback",value:function(){if(this._startIndexMemoized!==this._startIndex||this._stopIndexMemoized!==this._stopIndex){var e=this.props.onCellsRendered;e({startIndex:this._startIndex,stopIndex:this._stopIndex}),this._startIndexMemoized=this._startIndex,this._stopIndexMemoized=this._stopIndex}}},{key:"_populatePositionCache",value:function(e,t){for(var o=this.props,a=o.cellMeasurerCache,l=o.cellPositioner,s=e;s<=t;s++){var c=l(s),d=c.left,f=c.top;this._positionCache.setPosition(s,d,f,a.getHeight(s))}}}],[{key:"getDerivedStateFromProps",value:function(e,t){return e.scrollTop!==void 0&&t.scrollTop!==e.scrollTop?{isScrolling:!0,scrollTop:e.scrollTop}:null}}]),i}(k.PureComponent),P(hi,"propTypes",null),pi);P(Do,"defaultProps",{autoHeight:!1,keyMapper:oc,onCellsRendered:vi,onScroll:vi,overscanByPixels:20,role:"grid",scrollingResetTimeInterval:ic,style:rc,tabIndex:0,rowDirection:"ltr"});function oc(r){return r}function vi(){}Wt(Do);var _n=function(){function r(){var i=this,n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};ge(this,r),P(this,"_cellMeasurerCache",void 0),P(this,"_columnIndexOffset",void 0),P(this,"_rowIndexOffset",void 0),P(this,"columnWidth",function(s){var c=s.index;i._cellMeasurerCache.columnWidth({index:c+i._columnIndexOffset})}),P(this,"rowHeight",function(s){var c=s.index;i._cellMeasurerCache.rowHeight({index:c+i._rowIndexOffset})});var e=n.cellMeasurerCache,t=n.columnIndexOffset,o=t===void 0?0:t,a=n.rowIndexOffset,l=a===void 0?0:a;this._cellMeasurerCache=e,this._columnIndexOffset=o,this._rowIndexOffset=l}return pe(r,[{key:"clear",value:function(n,e){this._cellMeasurerCache.clear(n+this._rowIndexOffset,e+this._columnIndexOffset)}},{key:"clearAll",value:function(){this._cellMeasurerCache.clearAll()}},{key:"hasFixedHeight",value:function(){return this._cellMeasurerCache.hasFixedHeight()}},{key:"hasFixedWidth",value:function(){return this._cellMeasurerCache.hasFixedWidth()}},{key:"getHeight",value:function(n){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return this._cellMeasurerCache.getHeight(n+this._rowIndexOffset,e+this._columnIndexOffset)}},{key:"getWidth",value:function(n){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return this._cellMeasurerCache.getWidth(n+this._rowIndexOffset,e+this._columnIndexOffset)}},{key:"has",value:function(n){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return this._cellMeasurerCache.has(n+this._rowIndexOffset,e+this._columnIndexOffset)}},{key:"set",value:function(n,e,t,o){this._cellMeasurerCache.set(n+this._rowIndexOffset,e+this._columnIndexOffset,t,o)}},{key:"defaultHeight",get:function(){return this._cellMeasurerCache.defaultHeight}},{key:"defaultWidth",get:function(){return this._cellMeasurerCache.defaultWidth}}]),r}();function mi(r,i){var n=Object.keys(r);if(Object.getOwnPropertySymbols){var e=Object.getOwnPropertySymbols(r);i&&(e=e.filter(function(t){return Object.getOwnPropertyDescriptor(r,t).enumerable})),n.push.apply(n,e)}return n}function ve(r){for(var i=1;i<arguments.length;i++){var n=arguments[i]!=null?arguments[i]:{};i%2?mi(n,!0).forEach(function(e){P(r,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(n)):mi(n).forEach(function(e){Object.defineProperty(r,e,Object.getOwnPropertyDescriptor(n,e))})}return r}var Si=20,sr=function(r){xe(i,r);function i(n,e){var t;ge(this,i),t=_e(this,Re(i).call(this,n,e)),P(E(t),"state",{scrollLeft:0,scrollTop:0,scrollbarSize:0,showHorizontalScrollbar:!1,showVerticalScrollbar:!1}),P(E(t),"_deferredInvalidateColumnIndex",null),P(E(t),"_deferredInvalidateRowIndex",null),P(E(t),"_bottomLeftGridRef",function(s){t._bottomLeftGrid=s}),P(E(t),"_bottomRightGridRef",function(s){t._bottomRightGrid=s}),P(E(t),"_cellRendererBottomLeftGrid",function(s){var c=s.rowIndex,d=pt(s,["rowIndex"]),f=t.props,u=f.cellRenderer,p=f.fixedRowCount,h=f.rowCount;return c===h-p?k.createElement("div",{key:d.key,style:ve({},d.style,{height:Si})}):u(ve({},d,{parent:E(t),rowIndex:c+p}))}),P(E(t),"_cellRendererBottomRightGrid",function(s){var c=s.columnIndex,d=s.rowIndex,f=pt(s,["columnIndex","rowIndex"]),u=t.props,p=u.cellRenderer,h=u.fixedColumnCount,v=u.fixedRowCount;return p(ve({},f,{columnIndex:c+h,parent:E(t),rowIndex:d+v}))}),P(E(t),"_cellRendererTopRightGrid",function(s){var c=s.columnIndex,d=pt(s,["columnIndex"]),f=t.props,u=f.cellRenderer,p=f.columnCount,h=f.fixedColumnCount;return c===p-h?k.createElement("div",{key:d.key,style:ve({},d.style,{width:Si})}):u(ve({},d,{columnIndex:c+h,parent:E(t)}))}),P(E(t),"_columnWidthRightGrid",function(s){var c=s.index,d=t.props,f=d.columnCount,u=d.fixedColumnCount,p=d.columnWidth,h=t.state,v=h.scrollbarSize,y=h.showHorizontalScrollbar;return y&&c===f-u?v:typeof p=="function"?p({index:c+u}):p}),P(E(t),"_onScroll",function(s){var c=s.scrollLeft,d=s.scrollTop;t.setState({scrollLeft:c,scrollTop:d});var f=t.props.onScroll;f&&f(s)}),P(E(t),"_onScrollbarPresenceChange",function(s){var c=s.horizontal,d=s.size,f=s.vertical,u=t.state,p=u.showHorizontalScrollbar,h=u.showVerticalScrollbar;if(c!==p||f!==h){t.setState({scrollbarSize:d,showHorizontalScrollbar:c,showVerticalScrollbar:f});var v=t.props.onScrollbarPresenceChange;typeof v=="function"&&v({horizontal:c,size:d,vertical:f})}}),P(E(t),"_onScrollLeft",function(s){var c=s.scrollLeft;t._onScroll({scrollLeft:c,scrollTop:t.state.scrollTop})}),P(E(t),"_onScrollTop",function(s){var c=s.scrollTop;t._onScroll({scrollTop:c,scrollLeft:t.state.scrollLeft})}),P(E(t),"_rowHeightBottomGrid",function(s){var c=s.index,d=t.props,f=d.fixedRowCount,u=d.rowCount,p=d.rowHeight,h=t.state,v=h.scrollbarSize,y=h.showVerticalScrollbar;return y&&c===u-f?v:typeof p=="function"?p({index:c+f}):p}),P(E(t),"_topLeftGridRef",function(s){t._topLeftGrid=s}),P(E(t),"_topRightGridRef",function(s){t._topRightGrid=s});var o=n.deferredMeasurementCache,a=n.fixedColumnCount,l=n.fixedRowCount;return t._maybeCalculateCachedStyles(!0),o&&(t._deferredMeasurementCacheBottomLeftGrid=l>0?new _n({cellMeasurerCache:o,columnIndexOffset:0,rowIndexOffset:l}):o,t._deferredMeasurementCacheBottomRightGrid=a>0||l>0?new _n({cellMeasurerCache:o,columnIndexOffset:a,rowIndexOffset:l}):o,t._deferredMeasurementCacheTopRightGrid=a>0?new _n({cellMeasurerCache:o,columnIndexOffset:a,rowIndexOffset:0}):o),t}return pe(i,[{key:"forceUpdateGrids",value:function(){this._bottomLeftGrid&&this._bottomLeftGrid.forceUpdate(),this._bottomRightGrid&&this._bottomRightGrid.forceUpdate(),this._topLeftGrid&&this._topLeftGrid.forceUpdate(),this._topRightGrid&&this._topRightGrid.forceUpdate()}},{key:"invalidateCellSizeAfterRender",value:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=e.columnIndex,o=t===void 0?0:t,a=e.rowIndex,l=a===void 0?0:a;this._deferredInvalidateColumnIndex=typeof this._deferredInvalidateColumnIndex=="number"?Math.min(this._deferredInvalidateColumnIndex,o):o,this._deferredInvalidateRowIndex=typeof this._deferredInvalidateRowIndex=="number"?Math.min(this._deferredInvalidateRowIndex,l):l}},{key:"measureAllCells",value:function(){this._bottomLeftGrid&&this._bottomLeftGrid.measureAllCells(),this._bottomRightGrid&&this._bottomRightGrid.measureAllCells(),this._topLeftGrid&&this._topLeftGrid.measureAllCells(),this._topRightGrid&&this._topRightGrid.measureAllCells()}},{key:"recomputeGridSize",value:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=e.columnIndex,o=t===void 0?0:t,a=e.rowIndex,l=a===void 0?0:a,s=this.props,c=s.fixedColumnCount,d=s.fixedRowCount,f=Math.max(0,o-c),u=Math.max(0,l-d);this._bottomLeftGrid&&this._bottomLeftGrid.recomputeGridSize({columnIndex:o,rowIndex:u}),this._bottomRightGrid&&this._bottomRightGrid.recomputeGridSize({columnIndex:f,rowIndex:u}),this._topLeftGrid&&this._topLeftGrid.recomputeGridSize({columnIndex:o,rowIndex:l}),this._topRightGrid&&this._topRightGrid.recomputeGridSize({columnIndex:f,rowIndex:l}),this._leftGridWidth=null,this._topGridHeight=null,this._maybeCalculateCachedStyles(!0)}},{key:"componentDidMount",value:function(){var e=this.props,t=e.scrollLeft,o=e.scrollTop;if(t>0||o>0){var a={};t>0&&(a.scrollLeft=t),o>0&&(a.scrollTop=o),this.setState(a)}this._handleInvalidatedGridSize()}},{key:"componentDidUpdate",value:function(){this._handleInvalidatedGridSize()}},{key:"render",value:function(){var e=this.props,t=e.onScroll,o=e.onSectionRendered;e.onScrollbarPresenceChange,e.scrollLeft;var a=e.scrollToColumn;e.scrollTop;var l=e.scrollToRow,s=pt(e,["onScroll","onSectionRendered","onScrollbarPresenceChange","scrollLeft","scrollToColumn","scrollTop","scrollToRow"]);if(this._prepareForRender(),this.props.width===0||this.props.height===0)return null;var c=this.state,d=c.scrollLeft,f=c.scrollTop;return k.createElement("div",{style:this._containerOuterStyle},k.createElement("div",{style:this._containerTopStyle},this._renderTopLeftGrid(s),this._renderTopRightGrid(ve({},s,{onScroll:t,scrollLeft:d}))),k.createElement("div",{style:this._containerBottomStyle},this._renderBottomLeftGrid(ve({},s,{onScroll:t,scrollTop:f})),this._renderBottomRightGrid(ve({},s,{onScroll:t,onSectionRendered:o,scrollLeft:d,scrollToColumn:a,scrollToRow:l,scrollTop:f}))))}},{key:"_getBottomGridHeight",value:function(e){var t=e.height,o=this._getTopGridHeight(e);return t-o}},{key:"_getLeftGridWidth",value:function(e){var t=e.fixedColumnCount,o=e.columnWidth;if(this._leftGridWidth==null)if(typeof o=="function"){for(var a=0,l=0;l<t;l++)a+=o({index:l});this._leftGridWidth=a}else this._leftGridWidth=o*t;return this._leftGridWidth}},{key:"_getRightGridWidth",value:function(e){var t=e.width,o=this._getLeftGridWidth(e);return t-o}},{key:"_getTopGridHeight",value:function(e){var t=e.fixedRowCount,o=e.rowHeight;if(this._topGridHeight==null)if(typeof o=="function"){for(var a=0,l=0;l<t;l++)a+=o({index:l});this._topGridHeight=a}else this._topGridHeight=o*t;return this._topGridHeight}},{key:"_handleInvalidatedGridSize",value:function(){if(typeof this._deferredInvalidateColumnIndex=="number"){var e=this._deferredInvalidateColumnIndex,t=this._deferredInvalidateRowIndex;this._deferredInvalidateColumnIndex=null,this._deferredInvalidateRowIndex=null,this.recomputeGridSize({columnIndex:e,rowIndex:t}),this.forceUpdate()}}},{key:"_maybeCalculateCachedStyles",value:function(e){var t=this.props,o=t.columnWidth,a=t.enableFixedColumnScroll,l=t.enableFixedRowScroll,s=t.height,c=t.fixedColumnCount,d=t.fixedRowCount,f=t.rowHeight,u=t.style,p=t.styleBottomLeftGrid,h=t.styleBottomRightGrid,v=t.styleTopLeftGrid,y=t.styleTopRightGrid,_=t.width,C=e||s!==this._lastRenderedHeight||_!==this._lastRenderedWidth,z=e||o!==this._lastRenderedColumnWidth||c!==this._lastRenderedFixedColumnCount,D=e||d!==this._lastRenderedFixedRowCount||f!==this._lastRenderedRowHeight;(e||C||u!==this._lastRenderedStyle)&&(this._containerOuterStyle=ve({height:s,overflow:"visible",width:_},u)),(e||C||D)&&(this._containerTopStyle={height:this._getTopGridHeight(this.props),position:"relative",width:_},this._containerBottomStyle={height:s-this._getTopGridHeight(this.props),overflow:"visible",position:"relative",width:_}),(e||p!==this._lastRenderedStyleBottomLeftGrid)&&(this._bottomLeftGridStyle=ve({left:0,overflowX:"hidden",overflowY:a?"auto":"hidden",position:"absolute"},p)),(e||z||h!==this._lastRenderedStyleBottomRightGrid)&&(this._bottomRightGridStyle=ve({left:this._getLeftGridWidth(this.props),position:"absolute"},h)),(e||v!==this._lastRenderedStyleTopLeftGrid)&&(this._topLeftGridStyle=ve({left:0,overflowX:"hidden",overflowY:"hidden",position:"absolute",top:0},v)),(e||z||y!==this._lastRenderedStyleTopRightGrid)&&(this._topRightGridStyle=ve({left:this._getLeftGridWidth(this.props),overflowX:l?"auto":"hidden",overflowY:"hidden",position:"absolute",top:0},y)),this._lastRenderedColumnWidth=o,this._lastRenderedFixedColumnCount=c,this._lastRenderedFixedRowCount=d,this._lastRenderedHeight=s,this._lastRenderedRowHeight=f,this._lastRenderedStyle=u,this._lastRenderedStyleBottomLeftGrid=p,this._lastRenderedStyleBottomRightGrid=h,this._lastRenderedStyleTopLeftGrid=v,this._lastRenderedStyleTopRightGrid=y,this._lastRenderedWidth=_}},{key:"_prepareForRender",value:function(){(this._lastRenderedColumnWidth!==this.props.columnWidth||this._lastRenderedFixedColumnCount!==this.props.fixedColumnCount)&&(this._leftGridWidth=null),(this._lastRenderedFixedRowCount!==this.props.fixedRowCount||this._lastRenderedRowHeight!==this.props.rowHeight)&&(this._topGridHeight=null),this._maybeCalculateCachedStyles(),this._lastRenderedColumnWidth=this.props.columnWidth,this._lastRenderedFixedColumnCount=this.props.fixedColumnCount,this._lastRenderedFixedRowCount=this.props.fixedRowCount,this._lastRenderedRowHeight=this.props.rowHeight}},{key:"_renderBottomLeftGrid",value:function(e){var t=e.enableFixedColumnScroll,o=e.fixedColumnCount,a=e.fixedRowCount,l=e.rowCount,s=e.hideBottomLeftGridScrollbar,c=this.state.showVerticalScrollbar;if(!o)return null;var d=c?1:0,f=this._getBottomGridHeight(e),u=this._getLeftGridWidth(e),p=this.state.showVerticalScrollbar?this.state.scrollbarSize:0,h=s?u+p:u,v=k.createElement(Ue,le({},e,{cellRenderer:this._cellRendererBottomLeftGrid,className:this.props.classNameBottomLeftGrid,columnCount:o,deferredMeasurementCache:this._deferredMeasurementCacheBottomLeftGrid,height:f,onScroll:t?this._onScrollTop:void 0,ref:this._bottomLeftGridRef,rowCount:Math.max(0,l-a)+d,rowHeight:this._rowHeightBottomGrid,style:this._bottomLeftGridStyle,tabIndex:null,width:h}));return s?k.createElement("div",{className:"BottomLeftGrid_ScrollWrapper",style:ve({},this._bottomLeftGridStyle,{height:f,width:u,overflowY:"hidden"})},v):v}},{key:"_renderBottomRightGrid",value:function(e){var t=e.columnCount,o=e.fixedColumnCount,a=e.fixedRowCount,l=e.rowCount,s=e.scrollToColumn,c=e.scrollToRow;return k.createElement(Ue,le({},e,{cellRenderer:this._cellRendererBottomRightGrid,className:this.props.classNameBottomRightGrid,columnCount:Math.max(0,t-o),columnWidth:this._columnWidthRightGrid,deferredMeasurementCache:this._deferredMeasurementCacheBottomRightGrid,height:this._getBottomGridHeight(e),onScroll:this._onScroll,onScrollbarPresenceChange:this._onScrollbarPresenceChange,ref:this._bottomRightGridRef,rowCount:Math.max(0,l-a),rowHeight:this._rowHeightBottomGrid,scrollToColumn:s-o,scrollToRow:c-a,style:this._bottomRightGridStyle,width:this._getRightGridWidth(e)}))}},{key:"_renderTopLeftGrid",value:function(e){var t=e.fixedColumnCount,o=e.fixedRowCount;return!t||!o?null:k.createElement(Ue,le({},e,{className:this.props.classNameTopLeftGrid,columnCount:t,height:this._getTopGridHeight(e),ref:this._topLeftGridRef,rowCount:o,style:this._topLeftGridStyle,tabIndex:null,width:this._getLeftGridWidth(e)}))}},{key:"_renderTopRightGrid",value:function(e){var t=e.columnCount,o=e.enableFixedRowScroll,a=e.fixedColumnCount,l=e.fixedRowCount,s=e.scrollLeft,c=e.hideTopRightGridScrollbar,d=this.state,f=d.showHorizontalScrollbar,u=d.scrollbarSize;if(!l)return null;var p=f?1:0,h=this._getTopGridHeight(e),v=this._getRightGridWidth(e),y=f?u:0,_=h,C=this._topRightGridStyle;c&&(_=h+y,C=ve({},this._topRightGridStyle,{left:0}));var z=k.createElement(Ue,le({},e,{cellRenderer:this._cellRendererTopRightGrid,className:this.props.classNameTopRightGrid,columnCount:Math.max(0,t-a)+p,columnWidth:this._columnWidthRightGrid,deferredMeasurementCache:this._deferredMeasurementCacheTopRightGrid,height:_,onScroll:o?this._onScrollLeft:void 0,ref:this._topRightGridRef,rowCount:l,scrollLeft:s,style:C,tabIndex:null,width:v}));return c?k.createElement("div",{className:"TopRightGrid_ScrollWrapper",style:ve({},this._topRightGridStyle,{height:h,width:v,overflowX:"hidden"})},z):z}}],[{key:"getDerivedStateFromProps",value:function(e,t){return e.scrollLeft!==t.scrollLeft||e.scrollTop!==t.scrollTop?{scrollLeft:e.scrollLeft!=null&&e.scrollLeft>=0?e.scrollLeft:t.scrollLeft,scrollTop:e.scrollTop!=null&&e.scrollTop>=0?e.scrollTop:t.scrollTop}:null}}]),i}(k.PureComponent);P(sr,"defaultProps",{classNameBottomLeftGrid:"",classNameBottomRightGrid:"",classNameTopLeftGrid:"",classNameTopRightGrid:"",enableFixedColumnScroll:!1,enableFixedRowScroll:!1,fixedColumnCount:0,fixedRowCount:0,scrollToColumn:-1,scrollToRow:-1,style:{},styleBottomLeftGrid:{},styleBottomRightGrid:{},styleTopLeftGrid:{},styleTopRightGrid:{},hideTopRightGridScrollbar:!1,hideBottomLeftGridScrollbar:!1});sr.propTypes={};Wt(sr);function ac(r){var i=r.dataKey,n=r.rowData;return typeof n.get=="function"?n.get(i):n[i]}function lc(r){var i=r.cellData;return i==null?"":String(i)}function No(r){var i=r.className,n=r.columns,e=r.style;return k.createElement("div",{className:i,role:"row",style:e},n)}No.propTypes=null;var Be={ASC:"ASC",DESC:"DESC"};function Mo(r){var i=r.sortDirection,n=Pe("ReactVirtualized__Table__sortableHeaderIcon",{"ReactVirtualized__Table__sortableHeaderIcon--ASC":i===Be.ASC,"ReactVirtualized__Table__sortableHeaderIcon--DESC":i===Be.DESC});return k.createElement("svg",{className:n,width:18,height:18,viewBox:"0 0 24 24"},i===Be.ASC?k.createElement("path",{d:"M7 14l5-5 5 5z"}):k.createElement("path",{d:"M7 10l5 5 5-5z"}),k.createElement("path",{d:"M0 0h24v24H0z",fill:"none"}))}Mo.propTypes={};function Lo(r){var i=r.dataKey,n=r.label,e=r.sortBy,t=r.sortDirection,o=e===i,a=[k.createElement("span",{className:"ReactVirtualized__Table__headerTruncatedText",key:"label",title:typeof n=="string"?n:null},n)];return o&&a.push(k.createElement(Mo,{key:"SortIndicator",sortDirection:t})),a}Lo.propTypes=null;function Eo(r){var i=r.className,n=r.columns,e=r.index,t=r.key,o=r.onRowClick,a=r.onRowDoubleClick,l=r.onRowMouseOut,s=r.onRowMouseOver,c=r.onRowRightClick,d=r.rowData,f=r.style,u={"aria-rowindex":e+1};return(o||a||l||s||c)&&(u["aria-label"]="row",u.tabIndex=0,o&&(u.onClick=function(p){return o({event:p,index:e,rowData:d})}),a&&(u.onDoubleClick=function(p){return a({event:p,index:e,rowData:d})}),l&&(u.onMouseOut=function(p){return l({event:p,index:e,rowData:d})}),s&&(u.onMouseOver=function(p){return s({event:p,index:e,rowData:d})}),c&&(u.onContextMenu=function(p){return c({event:p,index:e,rowData:d})})),k.createElement("div",le({},u,{className:i,key:t,role:"row",style:f}),n)}Eo.propTypes=null;var Ao=function(r){xe(i,r);function i(){return ge(this,i),_e(this,Re(i).apply(this,arguments))}return i}(k.Component);P(Ao,"defaultProps",{cellDataGetter:ac,cellRenderer:lc,defaultSortDirection:Be.ASC,flexGrow:0,flexShrink:1,headerRenderer:Lo,style:{}});Ao.propTypes={};function yi(r,i){var n=Object.keys(r);if(Object.getOwnPropertySymbols){var e=Object.getOwnPropertySymbols(r);i&&(e=e.filter(function(t){return Object.getOwnPropertyDescriptor(r,t).enumerable})),n.push.apply(n,e)}return n}function ct(r){for(var i=1;i<arguments.length;i++){var n=arguments[i]!=null?arguments[i]:{};i%2?yi(n,!0).forEach(function(e){P(r,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(n)):yi(n).forEach(function(e){Object.defineProperty(r,e,Object.getOwnPropertyDescriptor(n,e))})}return r}var jo=function(r){xe(i,r);function i(n){var e;return ge(this,i),e=_e(this,Re(i).call(this,n)),e.state={scrollbarWidth:0},e._createColumn=e._createColumn.bind(E(e)),e._createRow=e._createRow.bind(E(e)),e._onScroll=e._onScroll.bind(E(e)),e._onSectionRendered=e._onSectionRendered.bind(E(e)),e._setRef=e._setRef.bind(E(e)),e}return pe(i,[{key:"forceUpdateGrid",value:function(){this.Grid&&this.Grid.forceUpdate()}},{key:"getOffsetForRow",value:function(e){var t=e.alignment,o=e.index;if(this.Grid){var a=this.Grid.getOffsetForCell({alignment:t,rowIndex:o}),l=a.scrollTop;return l}return 0}},{key:"invalidateCellSizeAfterRender",value:function(e){var t=e.columnIndex,o=e.rowIndex;this.Grid&&this.Grid.invalidateCellSizeAfterRender({rowIndex:o,columnIndex:t})}},{key:"measureAllRows",value:function(){this.Grid&&this.Grid.measureAllCells()}},{key:"recomputeGridSize",value:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=e.columnIndex,o=t===void 0?0:t,a=e.rowIndex,l=a===void 0?0:a;this.Grid&&this.Grid.recomputeGridSize({rowIndex:l,columnIndex:o})}},{key:"recomputeRowHeights",value:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0;this.Grid&&this.Grid.recomputeGridSize({rowIndex:e})}},{key:"scrollToPosition",value:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0;this.Grid&&this.Grid.scrollToPosition({scrollTop:e})}},{key:"scrollToRow",value:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0;this.Grid&&this.Grid.scrollToCell({columnIndex:0,rowIndex:e})}},{key:"getScrollbarWidth",value:function(){if(this.Grid){var e=cn.findDOMNode(this.Grid),t=e.clientWidth||0,o=e.offsetWidth||0;return o-t}return 0}},{key:"componentDidMount",value:function(){this._setScrollbarWidth()}},{key:"componentDidUpdate",value:function(){this._setScrollbarWidth()}},{key:"render",value:function(){var e=this,t=this.props,o=t.children,a=t.className,l=t.disableHeader,s=t.gridClassName,c=t.gridStyle,d=t.headerHeight,f=t.headerRowRenderer,u=t.height,p=t.id,h=t.noRowsRenderer,v=t.rowClassName,y=t.rowStyle,_=t.scrollToIndex,C=t.style,z=t.width,D=this.state.scrollbarWidth,M=l?u:u-d,R=typeof v=="function"?v({index:-1}):v,I=typeof y=="function"?y({index:-1}):y;return this._cachedColumnStyles=[],k.Children.toArray(o).forEach(function(g,w){var S=e._getFlexStyleForColumn(g,g.props.style);e._cachedColumnStyles[w]=ct({overflow:"hidden"},S)}),k.createElement("div",{"aria-label":this.props["aria-label"],"aria-labelledby":this.props["aria-labelledby"],"aria-colcount":k.Children.toArray(o).length,"aria-rowcount":this.props.rowCount,className:Pe("ReactVirtualized__Table",a),id:p,role:"grid",style:C},!l&&f({className:Pe("ReactVirtualized__Table__headerRow",R),columns:this._getHeaderColumns(),style:ct({height:d,overflow:"hidden",paddingRight:D,width:z},I)}),k.createElement(Ue,le({},this.props,{"aria-readonly":null,autoContainerWidth:!0,className:Pe("ReactVirtualized__Table__Grid",s),cellRenderer:this._createRow,columnWidth:z,columnCount:1,height:M,id:void 0,noContentRenderer:h,onScroll:this._onScroll,onSectionRendered:this._onSectionRendered,ref:this._setRef,role:"rowgroup",scrollbarWidth:D,scrollToRow:_,style:ct({},c,{overflowX:"hidden"})})))}},{key:"_createColumn",value:function(e){var t=e.column,o=e.columnIndex,a=e.isScrolling,l=e.parent,s=e.rowData,c=e.rowIndex,d=this.props.onColumnClick,f=t.props,u=f.cellDataGetter,p=f.cellRenderer,h=f.className,v=f.columnData,y=f.dataKey,_=f.id,C=u({columnData:v,dataKey:y,rowData:s}),z=p({cellData:C,columnData:v,columnIndex:o,dataKey:y,isScrolling:a,parent:l,rowData:s,rowIndex:c}),D=function(g){d&&d({columnData:v,dataKey:y,event:g})},M=this._cachedColumnStyles[o],R=typeof z=="string"?z:null;return k.createElement("div",{"aria-colindex":o+1,"aria-describedby":_,className:Pe("ReactVirtualized__Table__rowColumn",h),key:"Row"+c+"-Col"+o,onClick:D,role:"gridcell",style:M,title:R},z)}},{key:"_createHeader",value:function(e){var t=e.column,o=e.index,a=this.props,l=a.headerClassName,s=a.headerStyle,c=a.onHeaderClick,d=a.sort,f=a.sortBy,u=a.sortDirection,p=t.props,h=p.columnData,v=p.dataKey,y=p.defaultSortDirection,_=p.disableSort,C=p.headerRenderer,z=p.id,D=p.label,M=!_&&d,R=Pe("ReactVirtualized__Table__headerColumn",l,t.props.headerClassName,{ReactVirtualized__Table__sortableHeaderColumn:M}),I=this._getFlexStyleForColumn(t,ct({},s,{},t.props.headerStyle)),g=C({columnData:h,dataKey:v,disableSort:_,label:D,sortBy:f,sortDirection:u}),w,S,O,j,U;if(M||c){var q=f!==v,A=q?y:u===Be.DESC?Be.ASC:Be.DESC,W=function(K){M&&d({defaultSortDirection:y,event:K,sortBy:v,sortDirection:A}),c&&c({columnData:h,dataKey:v,event:K})},H=function(K){(K.key==="Enter"||K.key===" ")&&W(K)};U=t.props["aria-label"]||D||v,j="none",O=0,w=W,S=H}return f===v&&(j=u===Be.ASC?"ascending":"descending"),k.createElement("div",{"aria-label":U,"aria-sort":j,className:R,id:z,key:"Header-Col"+o,onClick:w,onKeyDown:S,role:"columnheader",style:I,tabIndex:O},g)}},{key:"_createRow",value:function(e){var t=this,o=e.rowIndex,a=e.isScrolling,l=e.key,s=e.parent,c=e.style,d=this.props,f=d.children,u=d.onRowClick,p=d.onRowDoubleClick,h=d.onRowRightClick,v=d.onRowMouseOver,y=d.onRowMouseOut,_=d.rowClassName,C=d.rowGetter,z=d.rowRenderer,D=d.rowStyle,M=this.state.scrollbarWidth,R=typeof _=="function"?_({index:o}):_,I=typeof D=="function"?D({index:o}):D,g=C({index:o}),w=k.Children.toArray(f).map(function(j,U){return t._createColumn({column:j,columnIndex:U,isScrolling:a,parent:s,rowData:g,rowIndex:o,scrollbarWidth:M})}),S=Pe("ReactVirtualized__Table__row",R),O=ct({},c,{height:this._getRowHeight(o),overflow:"hidden",paddingRight:M},I);return z({className:S,columns:w,index:o,isScrolling:a,key:l,onRowClick:u,onRowDoubleClick:p,onRowRightClick:h,onRowMouseOver:v,onRowMouseOut:y,rowData:g,style:O})}},{key:"_getFlexStyleForColumn",value:function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},o="".concat(e.props.flexGrow," ").concat(e.props.flexShrink," ").concat(e.props.width,"px"),a=ct({},t,{flex:o,msFlex:o,WebkitFlex:o});return e.props.maxWidth&&(a.maxWidth=e.props.maxWidth),e.props.minWidth&&(a.minWidth=e.props.minWidth),a}},{key:"_getHeaderColumns",value:function(){var e=this,t=this.props,o=t.children,a=t.disableHeader,l=a?[]:k.Children.toArray(o);return l.map(function(s,c){return e._createHeader({column:s,index:c})})}},{key:"_getRowHeight",value:function(e){var t=this.props.rowHeight;return typeof t=="function"?t({index:e}):t}},{key:"_onScroll",value:function(e){var t=e.clientHeight,o=e.scrollHeight,a=e.scrollTop,l=this.props.onScroll;l({clientHeight:t,scrollHeight:o,scrollTop:a})}},{key:"_onSectionRendered",value:function(e){var t=e.rowOverscanStartIndex,o=e.rowOverscanStopIndex,a=e.rowStartIndex,l=e.rowStopIndex,s=this.props.onRowsRendered;s({overscanStartIndex:t,overscanStopIndex:o,startIndex:a,stopIndex:l})}},{key:"_setRef",value:function(e){this.Grid=e}},{key:"_setScrollbarWidth",value:function(){var e=this.getScrollbarWidth();this.setState({scrollbarWidth:e})}}]),i}(k.PureComponent);P(jo,"defaultProps",{disableHeader:!1,estimatedRowSize:30,headerHeight:0,headerStyle:{},noRowsRenderer:function(){return null},onRowsRendered:function(){return null},onScroll:function(){return null},overscanIndicesGetter:yo,overscanRowCount:10,rowRenderer:Eo,headerRowRenderer:No,rowStyle:{},scrollToAlignment:"auto",scrollToIndex:-1,style:{}});jo.propTypes={};var qe=[],Lt=null,it=null;function Fo(){it&&(it=null,document.body&&Lt!=null&&(document.body.style.pointerEvents=Lt),Lt=null)}function sc(){Fo(),qe.forEach(function(r){return r.__resetIsScrolling()})}function cc(){it&&yt(it);var r=0;qe.forEach(function(i){r=Math.max(r,i.props.scrollingResetTimeInterval)}),it=ir(sc,r)}function Go(r){r.currentTarget===window&&Lt==null&&document.body&&(Lt=document.body.style.pointerEvents,document.body.style.pointerEvents="none"),cc(),qe.forEach(function(i){i.props.scrollElement===r.currentTarget&&i.__handleWindowScrollEvent()})}function Ci(r,i){qe.some(function(n){return n.props.scrollElement===i})||i.addEventListener("scroll",Go),qe.push(r)}function wi(r,i){qe=qe.filter(function(n){return n!==r}),qe.length||(i.removeEventListener("scroll",Go),it&&(yt(it),Fo()))}var cr=function(i){return i===window},Ot=function(i){return i.getBoundingClientRect()};function bi(r,i){if(r)if(cr(r)){var n=window,e=n.innerHeight,t=n.innerWidth;return{height:typeof e=="number"?e:0,width:typeof t=="number"?t:0}}else return Ot(r);else return{height:i.serverHeight,width:i.serverWidth}}function dc(r,i){if(cr(i)&&document.documentElement){var n=document.documentElement,e=Ot(r),t=Ot(n);return{top:e.top-t.top,left:e.left-t.left}}else{var o=Wo(i),a=Ot(r),l=Ot(i);return{top:a.top+o.top-l.top,left:a.left+o.left-l.left}}}function Wo(r){return cr(r)&&document.documentElement?{top:"scrollY"in window?window.scrollY:document.documentElement.scrollTop,left:"scrollX"in window?window.scrollX:document.documentElement.scrollLeft}:{top:r.scrollTop,left:r.scrollLeft}}var xi,_i;function Ri(r,i){var n=Object.keys(r);if(Object.getOwnPropertySymbols){var e=Object.getOwnPropertySymbols(r);i&&(e=e.filter(function(t){return Object.getOwnPropertyDescriptor(r,t).enumerable})),n.push.apply(n,e)}return n}function uc(r){for(var i=1;i<arguments.length;i++){var n=arguments[i]!=null?arguments[i]:{};i%2?Ri(n,!0).forEach(function(e){P(r,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(n)):Ri(n).forEach(function(e){Object.defineProperty(r,e,Object.getOwnPropertyDescriptor(n,e))})}return r}var fc=150,$o=function(){return typeof window<"u"?window:void 0},hc=(_i=xi=function(r){xe(i,r);function i(){var n,e;ge(this,i);for(var t=arguments.length,o=new Array(t),a=0;a<t;a++)o[a]=arguments[a];return e=_e(this,(n=Re(i)).call.apply(n,[this].concat(o))),P(E(e),"_window",$o()),P(E(e),"_isMounted",!1),P(E(e),"_positionFromTop",0),P(E(e),"_positionFromLeft",0),P(E(e),"_detectElementResize",void 0),P(E(e),"_child",void 0),P(E(e),"state",uc({},bi(e.props.scrollElement,e.props),{isScrolling:!1,scrollLeft:0,scrollTop:0})),P(E(e),"_registerChild",function(l){l&&!(l instanceof Element)&&console.warn("WindowScroller registerChild expects to be passed Element or null"),e._child=l,e.updatePosition()}),P(E(e),"_onChildScroll",function(l){var s=l.scrollTop;if(e.state.scrollTop!==s){var c=e.props.scrollElement;c&&(typeof c.scrollTo=="function"?c.scrollTo(0,s+e._positionFromTop):c.scrollTop=s+e._positionFromTop)}}),P(E(e),"_registerResizeListener",function(l){l===window?window.addEventListener("resize",e._onResize,!1):e._detectElementResize.addResizeListener(l,e._onResize)}),P(E(e),"_unregisterResizeListener",function(l){l===window?window.removeEventListener("resize",e._onResize,!1):l&&e._detectElementResize.removeResizeListener(l,e._onResize)}),P(E(e),"_onResize",function(){e.updatePosition()}),P(E(e),"__handleWindowScrollEvent",function(){if(e._isMounted){var l=e.props.onScroll,s=e.props.scrollElement;if(s){var c=Wo(s),d=Math.max(0,c.left-e._positionFromLeft),f=Math.max(0,c.top-e._positionFromTop);e.setState({isScrolling:!0,scrollLeft:d,scrollTop:f}),l({scrollLeft:d,scrollTop:f})}}}),P(E(e),"__resetIsScrolling",function(){e.setState({isScrolling:!1})}),e}return pe(i,[{key:"updatePosition",value:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.props.scrollElement,t=this.props.onResize,o=this.state,a=o.height,l=o.width,s=this._child||cn.findDOMNode(this);if(s instanceof Element&&e){var c=dc(s,e);this._positionFromTop=c.top,this._positionFromLeft=c.left}var d=bi(e,this.props);(a!==d.height||l!==d.width)&&(this.setState({height:d.height,width:d.width}),t({height:d.height,width:d.width}))}},{key:"componentDidMount",value:function(){var e=this.props.scrollElement;this._detectElementResize=wo(),this.updatePosition(e),e&&(Ci(this,e),this._registerResizeListener(e)),this._isMounted=!0}},{key:"componentDidUpdate",value:function(e,t){var o=this.props.scrollElement,a=e.scrollElement;a!==o&&a!=null&&o!=null&&(this.updatePosition(o),wi(this,a),Ci(this,o),this._unregisterResizeListener(a),this._registerResizeListener(o))}},{key:"componentWillUnmount",value:function(){var e=this.props.scrollElement;e&&(wi(this,e),this._unregisterResizeListener(e)),this._isMounted=!1}},{key:"render",value:function(){var e=this.props.children,t=this.state,o=t.isScrolling,a=t.scrollTop,l=t.scrollLeft,s=t.height,c=t.width;return e({onChildScroll:this._onChildScroll,registerChild:this._registerChild,height:s,isScrolling:o,scrollLeft:l,scrollTop:a,width:c})}}]),i}(k.PureComponent),P(xi,"propTypes",null),_i);P(hc,"defaultProps",{onResize:function(){},onScroll:function(){},scrollingResetTimeInterval:fc,scrollElement:$o(),serverHeight:0,serverWidth:0});function mt(r){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?mt=function(i){return typeof i}:mt=function(i){return i&&typeof Symbol=="function"&&i.constructor===Symbol&&i!==Symbol.prototype?"symbol":typeof i},mt(r)}function Ht(r,i){if(!(r instanceof i))throw new TypeError("Cannot call a class as a function")}function Ii(r,i){for(var n=0;n<i.length;n++){var e=i[n];e.enumerable=e.enumerable||!1,e.configurable=!0,"value"in e&&(e.writable=!0),Object.defineProperty(r,e.key,e)}}function Ut(r,i,n){return i&&Ii(r.prototype,i),n&&Ii(r,n),r}function pc(r,i,n){return i in r?Object.defineProperty(r,i,{value:n,enumerable:!0,configurable:!0,writable:!0}):r[i]=n,r}function Ke(){return Ke=Object.assign||function(r){for(var i=1;i<arguments.length;i++){var n=arguments[i];for(var e in n)Object.prototype.hasOwnProperty.call(n,e)&&(r[e]=n[e])}return r},Ke.apply(this,arguments)}function Ti(r,i){var n=Object.keys(r);if(Object.getOwnPropertySymbols){var e=Object.getOwnPropertySymbols(r);i&&(e=e.filter(function(t){return Object.getOwnPropertyDescriptor(r,t).enumerable})),n.push.apply(n,e)}return n}function ae(r){for(var i=1;i<arguments.length;i++){var n=arguments[i]!=null?arguments[i]:{};i%2?Ti(Object(n),!0).forEach(function(e){pc(r,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(n)):Ti(Object(n)).forEach(function(e){Object.defineProperty(r,e,Object.getOwnPropertyDescriptor(n,e))})}return r}function un(r,i){if(typeof i!="function"&&i!==null)throw new TypeError("Super expression must either be null or a function");r.prototype=Object.create(i&&i.prototype,{constructor:{value:r,writable:!0,configurable:!0}}),i&&Wn(r,i)}function Me(r){return Me=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},Me(r)}function Wn(r,i){return Wn=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},Wn(r,i)}function gc(r,i){if(r==null)return{};var n={},e=Object.keys(r),t,o;for(o=0;o<e.length;o++)t=e[o],!(i.indexOf(t)>=0)&&(n[t]=r[t]);return n}function dr(r,i){if(r==null)return{};var n=gc(r,i),e,t;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(r);for(t=0;t<o.length;t++)e=o[t],!(i.indexOf(e)>=0)&&Object.prototype.propertyIsEnumerable.call(r,e)&&(n[e]=r[e])}return n}function je(r){if(r===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return r}function fn(r,i){return i&&(typeof i=="object"||typeof i=="function")?i:je(r)}function de(r){return vc(r)||mc(r)||Sc()}function vc(r){if(Array.isArray(r)){for(var i=0,n=new Array(r.length);i<r.length;i++)n[i]=r[i];return n}}function mc(r){if(Symbol.iterator in Object(r)||Object.prototype.toString.call(r)==="[object Arguments]")return Array.from(r)}function Sc(){throw new TypeError("Invalid attempt to spread non-iterable instance")}function Ho(){var r=this.constructor.getDerivedStateFromProps(this.props,this.state);r!=null&&this.setState(r)}function Uo(r){function i(n){var e=this.constructor.getDerivedStateFromProps(r,n);return e??null}this.setState(i.bind(this))}function Bo(r,i){try{var n=this.props,e=this.state;this.props=r,this.state=i,this.__reactInternalSnapshotFlag=!0,this.__reactInternalSnapshot=this.getSnapshotBeforeUpdate(n,e)}finally{this.props=n,this.state=e}}Ho.__suppressDeprecationWarning=!0;Uo.__suppressDeprecationWarning=!0;Bo.__suppressDeprecationWarning=!0;function yc(r){var i=r.prototype;if(!i||!i.isReactComponent)throw new Error("Can only polyfill class components");if(typeof r.getDerivedStateFromProps!="function"&&typeof i.getSnapshotBeforeUpdate!="function")return r;var n=null,e=null,t=null;if(typeof i.componentWillMount=="function"?n="componentWillMount":typeof i.UNSAFE_componentWillMount=="function"&&(n="UNSAFE_componentWillMount"),typeof i.componentWillReceiveProps=="function"?e="componentWillReceiveProps":typeof i.UNSAFE_componentWillReceiveProps=="function"&&(e="UNSAFE_componentWillReceiveProps"),typeof i.componentWillUpdate=="function"?t="componentWillUpdate":typeof i.UNSAFE_componentWillUpdate=="function"&&(t="UNSAFE_componentWillUpdate"),n!==null||e!==null||t!==null){var o=r.displayName||r.name,a=typeof r.getDerivedStateFromProps=="function"?"getDerivedStateFromProps()":"getSnapshotBeforeUpdate()";throw Error(`Unsafe legacy lifecycles will not be called for components using new component APIs.
12
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function _o(r){return ks(r)||Os(r)||uo(r)||zs()}var Ro=function(r){xe(i,r);function i(n,e){var t;return ge(this,i),t=_e(this,Re(i).call(this,n,e)),t._loadMoreRowsMemoizer=St(),t._onRowsRendered=t._onRowsRendered.bind(E(t)),t._registerChild=t._registerChild.bind(E(t)),t}return pe(i,[{key:"resetLoadMoreRowsCache",value:function(e){this._loadMoreRowsMemoizer=St(),e&&this._doStuff(this._lastRenderedStartIndex,this._lastRenderedStopIndex)}},{key:"render",value:function(){var e=this.props.children;return e({onRowsRendered:this._onRowsRendered,registerChild:this._registerChild})}},{key:"_loadUnloadedRanges",value:function(e){var t=this,o=this.props.loadMoreRows;e.forEach(function(a){var l=o(a);l&&l.then(function(){Ds({lastRenderedStartIndex:t._lastRenderedStartIndex,lastRenderedStopIndex:t._lastRenderedStopIndex,startIndex:a.startIndex,stopIndex:a.stopIndex})&&t._registeredChild&&Ls(t._registeredChild,t._lastRenderedStartIndex)})})}},{key:"_onRowsRendered",value:function(e){var t=e.startIndex,o=e.stopIndex;this._lastRenderedStartIndex=t,this._lastRenderedStopIndex=o,this._doStuff(t,o)}},{key:"_doStuff",value:function(e,t){var o,a=this,l=this.props,s=l.isRowLoaded,c=l.minimumBatchSize,d=l.rowCount,f=l.threshold,u=Ns({isRowLoaded:s,minimumBatchSize:c,rowCount:d,startIndex:Math.max(0,e-f),stopIndex:Math.min(d-1,t+f)}),p=(o=[]).concat.apply(o,_o(u.map(function(h){var v=h.startIndex,y=h.stopIndex;return[v,y]})));this._loadMoreRowsMemoizer({callback:function(){a._loadUnloadedRanges(u)},indices:{squashedUnloadedRanges:p}})}},{key:"_registerChild",value:function(e){this._registeredChild=e}}]),i}(k.PureComponent);P(Ro,"defaultProps",{minimumBatchSize:10,rowCount:0,threshold:15});Ro.propTypes={};function Ds(r){var i=r.lastRenderedStartIndex,n=r.lastRenderedStopIndex,e=r.startIndex,t=r.stopIndex;return!(e>n||t<i)}function Ns(r){for(var i=r.isRowLoaded,n=r.minimumBatchSize,e=r.rowCount,t=r.startIndex,o=r.stopIndex,a=[],l=null,s=null,c=t;c<=o;c++){var d=i({index:c});d?s!==null&&(a.push({startIndex:l,stopIndex:s}),l=s=null):(s=c,l===null&&(l=c))}if(s!==null){for(var f=Math.min(Math.max(s,l+n-1),e-1),u=s+1;u<=f&&!i({index:u});u++)s=u;a.push({startIndex:l,stopIndex:s})}if(a.length)for(var p=a[0];p.stopIndex-p.startIndex+1<n&&p.startIndex>0;){var h=p.startIndex-1;if(!i({index:h}))p.startIndex=h;else break}return a}function Ls(r){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,n=typeof r.recomputeGridSize=="function"?r.recomputeGridSize:r.recomputeRowHeights;n?n.call(r,i):r.forceUpdate()}var ci,di,Io=(di=ci=function(r){xe(i,r);function i(){var n,e;ge(this,i);for(var t=arguments.length,o=new Array(t),a=0;a<t;a++)o[a]=arguments[a];return e=_e(this,(n=Re(i)).call.apply(n,[this].concat(o))),P(E(e),"Grid",void 0),P(E(e),"_cellRenderer",function(l){var s=l.parent,c=l.rowIndex,d=l.style,f=l.isScrolling,u=l.isVisible,p=l.key,h=e.props.rowRenderer,v=Object.getOwnPropertyDescriptor(d,"width");return v&&v.writable&&(d.width="100%"),h({index:c,style:d,isScrolling:f,isVisible:u,key:p,parent:s})}),P(E(e),"_setRef",function(l){e.Grid=l}),P(E(e),"_onScroll",function(l){var s=l.clientHeight,c=l.scrollHeight,d=l.scrollTop,f=e.props.onScroll;f({clientHeight:s,scrollHeight:c,scrollTop:d})}),P(E(e),"_onSectionRendered",function(l){var s=l.rowOverscanStartIndex,c=l.rowOverscanStopIndex,d=l.rowStartIndex,f=l.rowStopIndex,u=e.props.onRowsRendered;u({overscanStartIndex:s,overscanStopIndex:c,startIndex:d,stopIndex:f})}),e}return pe(i,[{key:"forceUpdateGrid",value:function(){this.Grid&&this.Grid.forceUpdate()}},{key:"getOffsetForRow",value:function(e){var t=e.alignment,o=e.index;if(this.Grid){var a=this.Grid.getOffsetForCell({alignment:t,rowIndex:o,columnIndex:0}),l=a.scrollTop;return l}return 0}},{key:"invalidateCellSizeAfterRender",value:function(e){var t=e.columnIndex,o=e.rowIndex;this.Grid&&this.Grid.invalidateCellSizeAfterRender({rowIndex:o,columnIndex:t})}},{key:"measureAllRows",value:function(){this.Grid&&this.Grid.measureAllCells()}},{key:"recomputeGridSize",value:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=e.columnIndex,o=t===void 0?0:t,a=e.rowIndex,l=a===void 0?0:a;this.Grid&&this.Grid.recomputeGridSize({rowIndex:l,columnIndex:o})}},{key:"recomputeRowHeights",value:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0;this.Grid&&this.Grid.recomputeGridSize({rowIndex:e,columnIndex:0})}},{key:"scrollToPosition",value:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0;this.Grid&&this.Grid.scrollToPosition({scrollTop:e})}},{key:"scrollToRow",value:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0;this.Grid&&this.Grid.scrollToCell({columnIndex:0,rowIndex:e})}},{key:"render",value:function(){var e=this.props,t=e.className,o=e.noRowsRenderer,a=e.scrollToIndex,l=e.width,s=ke("ReactVirtualized__List",t);return k.createElement(Be,le({},this.props,{autoContainerWidth:!0,cellRenderer:this._cellRenderer,className:s,columnWidth:l,columnCount:1,noContentRenderer:o,onScroll:this._onScroll,onSectionRendered:this._onSectionRendered,ref:this._setRef,scrollToRow:a}))}}]),i}(k.PureComponent),P(ci,"propTypes",null),di);P(Io,"defaultProps",{autoHeight:!1,estimatedRowSize:30,onScroll:function(){},noRowsRenderer:function(){return null},onRowsRendered:function(){},overscanIndicesGetter:yo,overscanRowCount:10,scrollToAlignment:"auto",scrollToIndex:-1,style:{}});function Ms(r){if(Array.isArray(r))return r}function Es(r,i){var n=r==null?null:typeof Symbol<"u"&&r[Symbol.iterator]||r["@@iterator"];if(n!=null){var e,t,o,a,l=[],s=!0,c=!1;try{if(o=(n=n.call(r)).next,i!==0)for(;!(s=(e=o.call(n)).done)&&(l.push(e.value),l.length!==i);s=!0);}catch(d){c=!0,t=d}finally{try{if(!s&&n.return!=null&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw t}}return l}}function As(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
13
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function js(r,i){return Ms(r)||Es(r,i)||uo(r,i)||As()}function Fs(r,i,n,e){for(var t=n+1;i<=n;){var o=i+n>>>1,a=r[o];a>=e?(t=o,n=o-1):i=o+1}return t}function Gs(r,i,n,e,t){for(var o=n+1;i<=n;){var a=i+n>>>1,l=r[a];t(l,e)>=0?(o=a,n=a-1):i=a+1}return o}function Ws(r,i,n,e,t){return typeof n=="function"?Gs(r,e===void 0?0:e|0,t===void 0?r.length-1:t|0,i,n):Fs(r,n===void 0?0:n|0,e===void 0?r.length-1:e|0,i)}function $s(r,i,n,e){for(var t=n+1;i<=n;){var o=i+n>>>1,a=r[o];a>e?(t=o,n=o-1):i=o+1}return t}function Hs(r,i,n,e,t){for(var o=n+1;i<=n;){var a=i+n>>>1,l=r[a];t(l,e)>0?(o=a,n=a-1):i=a+1}return o}function Us(r,i,n,e,t){return typeof n=="function"?Hs(r,e===void 0?0:e|0,t===void 0?r.length-1:t|0,i,n):$s(r,n===void 0?0:n|0,e===void 0?r.length-1:e|0,i)}function Bs(r,i,n,e){for(var t=i-1;i<=n;){var o=i+n>>>1,a=r[o];a<e?(t=o,i=o+1):n=o-1}return t}function Vs(r,i,n,e,t){for(var o=i-1;i<=n;){var a=i+n>>>1,l=r[a];t(l,e)<0?(o=a,i=a+1):n=a-1}return o}function qs(r,i,n,e,t){return typeof n=="function"?Vs(r,e===void 0?0:e|0,t===void 0?r.length-1:t|0,i,n):Bs(r,n===void 0?0:n|0,e===void 0?r.length-1:e|0,i)}function Ks(r,i,n,e){for(var t=i-1;i<=n;){var o=i+n>>>1,a=r[o];a<=e?(t=o,i=o+1):n=o-1}return t}function Xs(r,i,n,e,t){for(var o=i-1;i<=n;){var a=i+n>>>1,l=r[a];t(l,e)<=0?(o=a,i=a+1):n=a-1}return o}function Ys(r,i,n,e,t){return typeof n=="function"?Xs(r,e===void 0?0:e|0,t===void 0?r.length-1:t|0,i,n):Ks(r,n===void 0?0:n|0,e===void 0?r.length-1:e|0,i)}function Qs(r,i,n,e){for(;i<=n;){var t=i+n>>>1,o=r[t];if(o===e)return t;o<=e?i=t+1:n=t-1}return-1}function Js(r,i,n,e,t){for(;i<=n;){var o=i+n>>>1,a=r[o],l=t(a,e);if(l===0)return o;l<=0?i=o+1:n=o-1}return-1}function Zs(r,i,n,e,t){return typeof n=="function"?Js(r,e===void 0?0:e|0,t===void 0?r.length-1:t|0,i,n):Qs(r,n===void 0?0:n|0,e===void 0?r.length-1:e|0,i)}const on={ge:Ws,gt:Us,lt:qs,le:Ys,eq:Zs};var gt=0,tt=1,tn=2;function or(r,i,n,e,t){this.mid=r,this.left=i,this.right=n,this.leftPoints=e,this.rightPoints=t,this.count=(i?i.count:0)+(n?n.count:0)+e.length}var $t=or.prototype;function bn(r,i){r.mid=i.mid,r.left=i.left,r.right=i.right,r.leftPoints=i.leftPoints,r.rightPoints=i.rightPoints,r.count=i.count}function To(r,i){var n=jt(i);r.mid=n.mid,r.left=n.left,r.right=n.right,r.leftPoints=n.leftPoints,r.rightPoints=n.rightPoints,r.count=n.count}function ui(r,i){var n=r.intervals([]);n.push(i),To(r,n)}function fi(r,i){var n=r.intervals([]),e=n.indexOf(i);return e<0?gt:(n.splice(e,1),To(r,n),tt)}$t.intervals=function(r){return r.push.apply(r,this.leftPoints),this.left&&this.left.intervals(r),this.right&&this.right.intervals(r),r};$t.insert=function(r){var i=this.count-this.leftPoints.length;if(this.count+=1,r[1]<this.mid)this.left?4*(this.left.count+1)>3*(i+1)?ui(this,r):this.left.insert(r):this.left=jt([r]);else if(r[0]>this.mid)this.right?4*(this.right.count+1)>3*(i+1)?ui(this,r):this.right.insert(r):this.right=jt([r]);else{var n=on.ge(this.leftPoints,r,ar),e=on.ge(this.rightPoints,r,lr);this.leftPoints.splice(n,0,r),this.rightPoints.splice(e,0,r)}};$t.remove=function(r){var i=this.count-this.leftPoints;if(r[1]<this.mid){if(!this.left)return gt;var n=this.right?this.right.count:0;if(4*n>3*(i-1))return fi(this,r);var e=this.left.remove(r);return e===tn?(this.left=null,this.count-=1,tt):(e===tt&&(this.count-=1),e)}else if(r[0]>this.mid){if(!this.right)return gt;var t=this.left?this.left.count:0;if(4*t>3*(i-1))return fi(this,r);var e=this.right.remove(r);return e===tn?(this.right=null,this.count-=1,tt):(e===tt&&(this.count-=1),e)}else{if(this.count===1)return this.leftPoints[0]===r?tn:gt;if(this.leftPoints.length===1&&this.leftPoints[0]===r){if(this.left&&this.right){for(var o=this,a=this.left;a.right;)o=a,a=a.right;if(o===this)a.right=this.right;else{var l=this.left,e=this.right;o.count-=a.count,o.right=a.left,a.left=l,a.right=e}bn(this,a),this.count=(this.left?this.left.count:0)+(this.right?this.right.count:0)+this.leftPoints.length}else this.left?bn(this,this.left):bn(this,this.right);return tt}for(var l=on.ge(this.leftPoints,r,ar);l<this.leftPoints.length&&this.leftPoints[l][0]===r[0];++l)if(this.leftPoints[l]===r){this.count-=1,this.leftPoints.splice(l,1);for(var e=on.ge(this.rightPoints,r,lr);e<this.rightPoints.length&&this.rightPoints[e][1]===r[1];++e)if(this.rightPoints[e]===r)return this.rightPoints.splice(e,1),tt}return gt}};function Po(r,i,n){for(var e=0;e<r.length&&r[e][0]<=i;++e){var t=n(r[e]);if(t)return t}}function ko(r,i,n){for(var e=r.length-1;e>=0&&r[e][1]>=i;--e){var t=n(r[e]);if(t)return t}}function Oo(r,i){for(var n=0;n<r.length;++n){var e=i(r[n]);if(e)return e}}$t.queryPoint=function(r,i){if(r<this.mid){if(this.left){var n=this.left.queryPoint(r,i);if(n)return n}return Po(this.leftPoints,r,i)}else if(r>this.mid){if(this.right){var n=this.right.queryPoint(r,i);if(n)return n}return ko(this.rightPoints,r,i)}else return Oo(this.leftPoints,i)};$t.queryInterval=function(r,i,n){if(r<this.mid&&this.left){var e=this.left.queryInterval(r,i,n);if(e)return e}if(i>this.mid&&this.right){var e=this.right.queryInterval(r,i,n);if(e)return e}return i<this.mid?Po(this.leftPoints,i,n):r>this.mid?ko(this.rightPoints,r,n):Oo(this.leftPoints,n)};function ec(r,i){return r-i}function ar(r,i){var n=r[0]-i[0];return n||r[1]-i[1]}function lr(r,i){var n=r[1]-i[1];return n||r[0]-i[0]}function jt(r){if(r.length===0)return null;for(var i=[],n=0;n<r.length;++n)i.push(r[n][0],r[n][1]);i.sort(ec);for(var e=i[i.length>>1],t=[],o=[],a=[],n=0;n<r.length;++n){var l=r[n];l[1]<e?t.push(l):e<l[0]?o.push(l):a.push(l)}var s=a,c=a.slice();return s.sort(ar),c.sort(lr),new or(e,jt(t),jt(o),s,c)}function zo(r){this.root=r}var Ct=zo.prototype;Ct.insert=function(r){this.root?this.root.insert(r):this.root=new or(r[0],null,null,[r],[r])};Ct.remove=function(r){if(this.root){var i=this.root.remove(r);return i===tn&&(this.root=null),i!==gt}return!1};Ct.queryPoint=function(r,i){if(this.root)return this.root.queryPoint(r,i)};Ct.queryInterval=function(r,i,n){if(r<=i&&this.root)return this.root.queryInterval(r,i,n)};Object.defineProperty(Ct,"count",{get:function(){return this.root?this.root.count:0}});Object.defineProperty(Ct,"intervals",{get:function(){return this.root?this.root.intervals([]):[]}});function tc(r){return new zo(null)}var xn=function(){function r(){ge(this,r),P(this,"_columnSizeMap",{}),P(this,"_intervalTree",tc()),P(this,"_leftMap",{})}return pe(r,[{key:"estimateTotalHeight",value:function(n,e,t){var o=n-this.count;return this.tallestColumnSize+Math.ceil(o/e)*t}},{key:"range",value:function(n,e,t){var o=this;this._intervalTree.queryInterval(n,n+e,function(a){var l=js(a,3),s=l[0];l[1];var c=l[2];return t(c,o._leftMap[c],s)})}},{key:"setPosition",value:function(n,e,t,o){this._intervalTree.insert([t,t+o,n]),this._leftMap[n]=e;var a=this._columnSizeMap,l=a[e];l===void 0?a[e]=t+o:a[e]=Math.max(l,t+o)}},{key:"count",get:function(){return this._intervalTree.count}},{key:"shortestColumnSize",get:function(){var n=this._columnSizeMap,e=0;for(var t in n){var o=n[t];e=e===0?o:Math.min(e,o)}return e}},{key:"tallestColumnSize",get:function(){var n=this._columnSizeMap,e=0;for(var t in n){var o=n[t];e=Math.max(e,o)}return e}}]),r}(),hi,pi;function gi(r,i){var n=Object.keys(r);if(Object.getOwnPropertySymbols){var e=Object.getOwnPropertySymbols(r);i&&(e=e.filter(function(t){return Object.getOwnPropertyDescriptor(r,t).enumerable})),n.push.apply(n,e)}return n}function nc(r){for(var i=1;i<arguments.length;i++){var n=arguments[i]!=null?arguments[i]:{};i%2?gi(n,!0).forEach(function(e){P(r,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(n)):gi(n).forEach(function(e){Object.defineProperty(r,e,Object.getOwnPropertyDescriptor(n,e))})}return r}var rc={},ic=150,Do=(pi=hi=function(r){xe(i,r);function i(){var n,e;ge(this,i);for(var t=arguments.length,o=new Array(t),a=0;a<t;a++)o[a]=arguments[a];return e=_e(this,(n=Re(i)).call.apply(n,[this].concat(o))),P(E(e),"state",{isScrolling:!1,scrollTop:0}),P(E(e),"_debounceResetIsScrollingId",void 0),P(E(e),"_invalidateOnUpdateStartIndex",null),P(E(e),"_invalidateOnUpdateStopIndex",null),P(E(e),"_positionCache",new xn),P(E(e),"_startIndex",null),P(E(e),"_startIndexMemoized",null),P(E(e),"_stopIndex",null),P(E(e),"_stopIndexMemoized",null),P(E(e),"_debounceResetIsScrollingCallback",function(){e.setState({isScrolling:!1})}),P(E(e),"_setScrollingContainerRef",function(l){e._scrollingContainer=l}),P(E(e),"_onScroll",function(l){var s=e.props.height,c=l.currentTarget.scrollTop,d=Math.min(Math.max(0,e._getEstimatedTotalHeight()-s),c);c===d&&(e._debounceResetIsScrolling(),e.state.scrollTop!==d&&e.setState({isScrolling:!0,scrollTop:d}))}),e}return pe(i,[{key:"clearCellPositions",value:function(){this._positionCache=new xn,this.forceUpdate()}},{key:"invalidateCellSizeAfterRender",value:function(e){var t=e.rowIndex;this._invalidateOnUpdateStartIndex===null?(this._invalidateOnUpdateStartIndex=t,this._invalidateOnUpdateStopIndex=t):(this._invalidateOnUpdateStartIndex=Math.min(this._invalidateOnUpdateStartIndex,t),this._invalidateOnUpdateStopIndex=Math.max(this._invalidateOnUpdateStopIndex,t))}},{key:"recomputeCellPositions",value:function(){var e=this._positionCache.count-1;this._positionCache=new xn,this._populatePositionCache(0,e),this.forceUpdate()}},{key:"componentDidMount",value:function(){this._checkInvalidateOnUpdate(),this._invokeOnScrollCallback(),this._invokeOnCellsRenderedCallback()}},{key:"componentDidUpdate",value:function(e,t){this._checkInvalidateOnUpdate(),this._invokeOnScrollCallback(),this._invokeOnCellsRenderedCallback(),this.props.scrollTop!==e.scrollTop&&this._debounceResetIsScrolling()}},{key:"componentWillUnmount",value:function(){this._debounceResetIsScrollingId&&yt(this._debounceResetIsScrollingId)}},{key:"render",value:function(){var e=this,t=this.props,o=t.autoHeight,a=t.cellCount,l=t.cellMeasurerCache,s=t.cellRenderer,c=t.className,d=t.height,f=t.id,u=t.keyMapper,p=t.overscanByPixels,h=t.role,v=t.style,y=t.tabIndex,_=t.width,C=t.rowDirection,z=this.state,D=z.isScrolling,L=z.scrollTop,R=[],I=this._getEstimatedTotalHeight(),g=this._positionCache.shortestColumnSize,w=this._positionCache.count,S=0,O;if(this._positionCache.range(Math.max(0,L-p),d+p*2,function(q,A,W){var H;typeof O>"u"?(S=q,O=q):(S=Math.min(S,q),O=Math.max(O,q)),R.push(s({index:q,isScrolling:D,key:u(q),parent:e,style:(H={height:l.getHeight(q)},P(H,C==="ltr"?"left":"right",A),P(H,"position","absolute"),P(H,"top",W),P(H,"width",l.getWidth(q)),H)}))}),g<L+d+p&&w<a)for(var j=Math.min(a-w,Math.ceil((L+d+p-g)/l.defaultHeight*_/l.defaultWidth)),U=w;U<w+j;U++)O=U,R.push(s({index:U,isScrolling:D,key:u(U),parent:this,style:{width:l.getWidth(U)}}));return this._startIndex=S,this._stopIndex=O,k.createElement("div",{ref:this._setScrollingContainerRef,"aria-label":this.props["aria-label"],className:ke("ReactVirtualized__Masonry",c),id:f,onScroll:this._onScroll,role:h,style:nc({boxSizing:"border-box",direction:"ltr",height:o?"auto":d,overflowX:"hidden",overflowY:I<d?"hidden":"auto",position:"relative",width:_,WebkitOverflowScrolling:"touch",willChange:"transform"},v),tabIndex:y},k.createElement("div",{className:"ReactVirtualized__Masonry__innerScrollContainer",style:{width:"100%",height:I,maxWidth:"100%",maxHeight:I,overflow:"hidden",pointerEvents:D?"none":"",position:"relative"}},R))}},{key:"_checkInvalidateOnUpdate",value:function(){if(typeof this._invalidateOnUpdateStartIndex=="number"){var e=this._invalidateOnUpdateStartIndex,t=this._invalidateOnUpdateStopIndex;this._invalidateOnUpdateStartIndex=null,this._invalidateOnUpdateStopIndex=null,this._populatePositionCache(e,t),this.forceUpdate()}}},{key:"_debounceResetIsScrolling",value:function(){var e=this.props.scrollingResetTimeInterval;this._debounceResetIsScrollingId&&yt(this._debounceResetIsScrollingId),this._debounceResetIsScrollingId=ir(this._debounceResetIsScrollingCallback,e)}},{key:"_getEstimatedTotalHeight",value:function(){var e=this.props,t=e.cellCount,o=e.cellMeasurerCache,a=e.width,l=Math.max(1,Math.floor(a/o.defaultWidth));return this._positionCache.estimateTotalHeight(t,l,o.defaultHeight)}},{key:"_invokeOnScrollCallback",value:function(){var e=this.props,t=e.height,o=e.onScroll,a=this.state.scrollTop;this._onScrollMemoized!==a&&(o({clientHeight:t,scrollHeight:this._getEstimatedTotalHeight(),scrollTop:a}),this._onScrollMemoized=a)}},{key:"_invokeOnCellsRenderedCallback",value:function(){if(this._startIndexMemoized!==this._startIndex||this._stopIndexMemoized!==this._stopIndex){var e=this.props.onCellsRendered;e({startIndex:this._startIndex,stopIndex:this._stopIndex}),this._startIndexMemoized=this._startIndex,this._stopIndexMemoized=this._stopIndex}}},{key:"_populatePositionCache",value:function(e,t){for(var o=this.props,a=o.cellMeasurerCache,l=o.cellPositioner,s=e;s<=t;s++){var c=l(s),d=c.left,f=c.top;this._positionCache.setPosition(s,d,f,a.getHeight(s))}}}],[{key:"getDerivedStateFromProps",value:function(e,t){return e.scrollTop!==void 0&&t.scrollTop!==e.scrollTop?{isScrolling:!0,scrollTop:e.scrollTop}:null}}]),i}(k.PureComponent),P(hi,"propTypes",null),pi);P(Do,"defaultProps",{autoHeight:!1,keyMapper:oc,onCellsRendered:vi,onScroll:vi,overscanByPixels:20,role:"grid",scrollingResetTimeInterval:ic,style:rc,tabIndex:0,rowDirection:"ltr"});function oc(r){return r}function vi(){}Wt(Do);var _n=function(){function r(){var i=this,n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};ge(this,r),P(this,"_cellMeasurerCache",void 0),P(this,"_columnIndexOffset",void 0),P(this,"_rowIndexOffset",void 0),P(this,"columnWidth",function(s){var c=s.index;i._cellMeasurerCache.columnWidth({index:c+i._columnIndexOffset})}),P(this,"rowHeight",function(s){var c=s.index;i._cellMeasurerCache.rowHeight({index:c+i._rowIndexOffset})});var e=n.cellMeasurerCache,t=n.columnIndexOffset,o=t===void 0?0:t,a=n.rowIndexOffset,l=a===void 0?0:a;this._cellMeasurerCache=e,this._columnIndexOffset=o,this._rowIndexOffset=l}return pe(r,[{key:"clear",value:function(n,e){this._cellMeasurerCache.clear(n+this._rowIndexOffset,e+this._columnIndexOffset)}},{key:"clearAll",value:function(){this._cellMeasurerCache.clearAll()}},{key:"hasFixedHeight",value:function(){return this._cellMeasurerCache.hasFixedHeight()}},{key:"hasFixedWidth",value:function(){return this._cellMeasurerCache.hasFixedWidth()}},{key:"getHeight",value:function(n){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return this._cellMeasurerCache.getHeight(n+this._rowIndexOffset,e+this._columnIndexOffset)}},{key:"getWidth",value:function(n){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return this._cellMeasurerCache.getWidth(n+this._rowIndexOffset,e+this._columnIndexOffset)}},{key:"has",value:function(n){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return this._cellMeasurerCache.has(n+this._rowIndexOffset,e+this._columnIndexOffset)}},{key:"set",value:function(n,e,t,o){this._cellMeasurerCache.set(n+this._rowIndexOffset,e+this._columnIndexOffset,t,o)}},{key:"defaultHeight",get:function(){return this._cellMeasurerCache.defaultHeight}},{key:"defaultWidth",get:function(){return this._cellMeasurerCache.defaultWidth}}]),r}();function mi(r,i){var n=Object.keys(r);if(Object.getOwnPropertySymbols){var e=Object.getOwnPropertySymbols(r);i&&(e=e.filter(function(t){return Object.getOwnPropertyDescriptor(r,t).enumerable})),n.push.apply(n,e)}return n}function me(r){for(var i=1;i<arguments.length;i++){var n=arguments[i]!=null?arguments[i]:{};i%2?mi(n,!0).forEach(function(e){P(r,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(n)):mi(n).forEach(function(e){Object.defineProperty(r,e,Object.getOwnPropertyDescriptor(n,e))})}return r}var Si=20,sr=function(r){xe(i,r);function i(n,e){var t;ge(this,i),t=_e(this,Re(i).call(this,n,e)),P(E(t),"state",{scrollLeft:0,scrollTop:0,scrollbarSize:0,showHorizontalScrollbar:!1,showVerticalScrollbar:!1}),P(E(t),"_deferredInvalidateColumnIndex",null),P(E(t),"_deferredInvalidateRowIndex",null),P(E(t),"_bottomLeftGridRef",function(s){t._bottomLeftGrid=s}),P(E(t),"_bottomRightGridRef",function(s){t._bottomRightGrid=s}),P(E(t),"_cellRendererBottomLeftGrid",function(s){var c=s.rowIndex,d=pt(s,["rowIndex"]),f=t.props,u=f.cellRenderer,p=f.fixedRowCount,h=f.rowCount;return c===h-p?k.createElement("div",{key:d.key,style:me({},d.style,{height:Si})}):u(me({},d,{parent:E(t),rowIndex:c+p}))}),P(E(t),"_cellRendererBottomRightGrid",function(s){var c=s.columnIndex,d=s.rowIndex,f=pt(s,["columnIndex","rowIndex"]),u=t.props,p=u.cellRenderer,h=u.fixedColumnCount,v=u.fixedRowCount;return p(me({},f,{columnIndex:c+h,parent:E(t),rowIndex:d+v}))}),P(E(t),"_cellRendererTopRightGrid",function(s){var c=s.columnIndex,d=pt(s,["columnIndex"]),f=t.props,u=f.cellRenderer,p=f.columnCount,h=f.fixedColumnCount;return c===p-h?k.createElement("div",{key:d.key,style:me({},d.style,{width:Si})}):u(me({},d,{columnIndex:c+h,parent:E(t)}))}),P(E(t),"_columnWidthRightGrid",function(s){var c=s.index,d=t.props,f=d.columnCount,u=d.fixedColumnCount,p=d.columnWidth,h=t.state,v=h.scrollbarSize,y=h.showHorizontalScrollbar;return y&&c===f-u?v:typeof p=="function"?p({index:c+u}):p}),P(E(t),"_onScroll",function(s){var c=s.scrollLeft,d=s.scrollTop;t.setState({scrollLeft:c,scrollTop:d});var f=t.props.onScroll;f&&f(s)}),P(E(t),"_onScrollbarPresenceChange",function(s){var c=s.horizontal,d=s.size,f=s.vertical,u=t.state,p=u.showHorizontalScrollbar,h=u.showVerticalScrollbar;if(c!==p||f!==h){t.setState({scrollbarSize:d,showHorizontalScrollbar:c,showVerticalScrollbar:f});var v=t.props.onScrollbarPresenceChange;typeof v=="function"&&v({horizontal:c,size:d,vertical:f})}}),P(E(t),"_onScrollLeft",function(s){var c=s.scrollLeft;t._onScroll({scrollLeft:c,scrollTop:t.state.scrollTop})}),P(E(t),"_onScrollTop",function(s){var c=s.scrollTop;t._onScroll({scrollTop:c,scrollLeft:t.state.scrollLeft})}),P(E(t),"_rowHeightBottomGrid",function(s){var c=s.index,d=t.props,f=d.fixedRowCount,u=d.rowCount,p=d.rowHeight,h=t.state,v=h.scrollbarSize,y=h.showVerticalScrollbar;return y&&c===u-f?v:typeof p=="function"?p({index:c+f}):p}),P(E(t),"_topLeftGridRef",function(s){t._topLeftGrid=s}),P(E(t),"_topRightGridRef",function(s){t._topRightGrid=s});var o=n.deferredMeasurementCache,a=n.fixedColumnCount,l=n.fixedRowCount;return t._maybeCalculateCachedStyles(!0),o&&(t._deferredMeasurementCacheBottomLeftGrid=l>0?new _n({cellMeasurerCache:o,columnIndexOffset:0,rowIndexOffset:l}):o,t._deferredMeasurementCacheBottomRightGrid=a>0||l>0?new _n({cellMeasurerCache:o,columnIndexOffset:a,rowIndexOffset:l}):o,t._deferredMeasurementCacheTopRightGrid=a>0?new _n({cellMeasurerCache:o,columnIndexOffset:a,rowIndexOffset:0}):o),t}return pe(i,[{key:"forceUpdateGrids",value:function(){this._bottomLeftGrid&&this._bottomLeftGrid.forceUpdate(),this._bottomRightGrid&&this._bottomRightGrid.forceUpdate(),this._topLeftGrid&&this._topLeftGrid.forceUpdate(),this._topRightGrid&&this._topRightGrid.forceUpdate()}},{key:"invalidateCellSizeAfterRender",value:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=e.columnIndex,o=t===void 0?0:t,a=e.rowIndex,l=a===void 0?0:a;this._deferredInvalidateColumnIndex=typeof this._deferredInvalidateColumnIndex=="number"?Math.min(this._deferredInvalidateColumnIndex,o):o,this._deferredInvalidateRowIndex=typeof this._deferredInvalidateRowIndex=="number"?Math.min(this._deferredInvalidateRowIndex,l):l}},{key:"measureAllCells",value:function(){this._bottomLeftGrid&&this._bottomLeftGrid.measureAllCells(),this._bottomRightGrid&&this._bottomRightGrid.measureAllCells(),this._topLeftGrid&&this._topLeftGrid.measureAllCells(),this._topRightGrid&&this._topRightGrid.measureAllCells()}},{key:"recomputeGridSize",value:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=e.columnIndex,o=t===void 0?0:t,a=e.rowIndex,l=a===void 0?0:a,s=this.props,c=s.fixedColumnCount,d=s.fixedRowCount,f=Math.max(0,o-c),u=Math.max(0,l-d);this._bottomLeftGrid&&this._bottomLeftGrid.recomputeGridSize({columnIndex:o,rowIndex:u}),this._bottomRightGrid&&this._bottomRightGrid.recomputeGridSize({columnIndex:f,rowIndex:u}),this._topLeftGrid&&this._topLeftGrid.recomputeGridSize({columnIndex:o,rowIndex:l}),this._topRightGrid&&this._topRightGrid.recomputeGridSize({columnIndex:f,rowIndex:l}),this._leftGridWidth=null,this._topGridHeight=null,this._maybeCalculateCachedStyles(!0)}},{key:"componentDidMount",value:function(){var e=this.props,t=e.scrollLeft,o=e.scrollTop;if(t>0||o>0){var a={};t>0&&(a.scrollLeft=t),o>0&&(a.scrollTop=o),this.setState(a)}this._handleInvalidatedGridSize()}},{key:"componentDidUpdate",value:function(){this._handleInvalidatedGridSize()}},{key:"render",value:function(){var e=this.props,t=e.onScroll,o=e.onSectionRendered;e.onScrollbarPresenceChange,e.scrollLeft;var a=e.scrollToColumn;e.scrollTop;var l=e.scrollToRow,s=pt(e,["onScroll","onSectionRendered","onScrollbarPresenceChange","scrollLeft","scrollToColumn","scrollTop","scrollToRow"]);if(this._prepareForRender(),this.props.width===0||this.props.height===0)return null;var c=this.state,d=c.scrollLeft,f=c.scrollTop;return k.createElement("div",{style:this._containerOuterStyle},k.createElement("div",{style:this._containerTopStyle},this._renderTopLeftGrid(s),this._renderTopRightGrid(me({},s,{onScroll:t,scrollLeft:d}))),k.createElement("div",{style:this._containerBottomStyle},this._renderBottomLeftGrid(me({},s,{onScroll:t,scrollTop:f})),this._renderBottomRightGrid(me({},s,{onScroll:t,onSectionRendered:o,scrollLeft:d,scrollToColumn:a,scrollToRow:l,scrollTop:f}))))}},{key:"_getBottomGridHeight",value:function(e){var t=e.height,o=this._getTopGridHeight(e);return t-o}},{key:"_getLeftGridWidth",value:function(e){var t=e.fixedColumnCount,o=e.columnWidth;if(this._leftGridWidth==null)if(typeof o=="function"){for(var a=0,l=0;l<t;l++)a+=o({index:l});this._leftGridWidth=a}else this._leftGridWidth=o*t;return this._leftGridWidth}},{key:"_getRightGridWidth",value:function(e){var t=e.width,o=this._getLeftGridWidth(e);return t-o}},{key:"_getTopGridHeight",value:function(e){var t=e.fixedRowCount,o=e.rowHeight;if(this._topGridHeight==null)if(typeof o=="function"){for(var a=0,l=0;l<t;l++)a+=o({index:l});this._topGridHeight=a}else this._topGridHeight=o*t;return this._topGridHeight}},{key:"_handleInvalidatedGridSize",value:function(){if(typeof this._deferredInvalidateColumnIndex=="number"){var e=this._deferredInvalidateColumnIndex,t=this._deferredInvalidateRowIndex;this._deferredInvalidateColumnIndex=null,this._deferredInvalidateRowIndex=null,this.recomputeGridSize({columnIndex:e,rowIndex:t}),this.forceUpdate()}}},{key:"_maybeCalculateCachedStyles",value:function(e){var t=this.props,o=t.columnWidth,a=t.enableFixedColumnScroll,l=t.enableFixedRowScroll,s=t.height,c=t.fixedColumnCount,d=t.fixedRowCount,f=t.rowHeight,u=t.style,p=t.styleBottomLeftGrid,h=t.styleBottomRightGrid,v=t.styleTopLeftGrid,y=t.styleTopRightGrid,_=t.width,C=e||s!==this._lastRenderedHeight||_!==this._lastRenderedWidth,z=e||o!==this._lastRenderedColumnWidth||c!==this._lastRenderedFixedColumnCount,D=e||d!==this._lastRenderedFixedRowCount||f!==this._lastRenderedRowHeight;(e||C||u!==this._lastRenderedStyle)&&(this._containerOuterStyle=me({height:s,overflow:"visible",width:_},u)),(e||C||D)&&(this._containerTopStyle={height:this._getTopGridHeight(this.props),position:"relative",width:_},this._containerBottomStyle={height:s-this._getTopGridHeight(this.props),overflow:"visible",position:"relative",width:_}),(e||p!==this._lastRenderedStyleBottomLeftGrid)&&(this._bottomLeftGridStyle=me({left:0,overflowX:"hidden",overflowY:a?"auto":"hidden",position:"absolute"},p)),(e||z||h!==this._lastRenderedStyleBottomRightGrid)&&(this._bottomRightGridStyle=me({left:this._getLeftGridWidth(this.props),position:"absolute"},h)),(e||v!==this._lastRenderedStyleTopLeftGrid)&&(this._topLeftGridStyle=me({left:0,overflowX:"hidden",overflowY:"hidden",position:"absolute",top:0},v)),(e||z||y!==this._lastRenderedStyleTopRightGrid)&&(this._topRightGridStyle=me({left:this._getLeftGridWidth(this.props),overflowX:l?"auto":"hidden",overflowY:"hidden",position:"absolute",top:0},y)),this._lastRenderedColumnWidth=o,this._lastRenderedFixedColumnCount=c,this._lastRenderedFixedRowCount=d,this._lastRenderedHeight=s,this._lastRenderedRowHeight=f,this._lastRenderedStyle=u,this._lastRenderedStyleBottomLeftGrid=p,this._lastRenderedStyleBottomRightGrid=h,this._lastRenderedStyleTopLeftGrid=v,this._lastRenderedStyleTopRightGrid=y,this._lastRenderedWidth=_}},{key:"_prepareForRender",value:function(){(this._lastRenderedColumnWidth!==this.props.columnWidth||this._lastRenderedFixedColumnCount!==this.props.fixedColumnCount)&&(this._leftGridWidth=null),(this._lastRenderedFixedRowCount!==this.props.fixedRowCount||this._lastRenderedRowHeight!==this.props.rowHeight)&&(this._topGridHeight=null),this._maybeCalculateCachedStyles(),this._lastRenderedColumnWidth=this.props.columnWidth,this._lastRenderedFixedColumnCount=this.props.fixedColumnCount,this._lastRenderedFixedRowCount=this.props.fixedRowCount,this._lastRenderedRowHeight=this.props.rowHeight}},{key:"_renderBottomLeftGrid",value:function(e){var t=e.enableFixedColumnScroll,o=e.fixedColumnCount,a=e.fixedRowCount,l=e.rowCount,s=e.hideBottomLeftGridScrollbar,c=this.state.showVerticalScrollbar;if(!o)return null;var d=c?1:0,f=this._getBottomGridHeight(e),u=this._getLeftGridWidth(e),p=this.state.showVerticalScrollbar?this.state.scrollbarSize:0,h=s?u+p:u,v=k.createElement(Be,le({},e,{cellRenderer:this._cellRendererBottomLeftGrid,className:this.props.classNameBottomLeftGrid,columnCount:o,deferredMeasurementCache:this._deferredMeasurementCacheBottomLeftGrid,height:f,onScroll:t?this._onScrollTop:void 0,ref:this._bottomLeftGridRef,rowCount:Math.max(0,l-a)+d,rowHeight:this._rowHeightBottomGrid,style:this._bottomLeftGridStyle,tabIndex:null,width:h}));return s?k.createElement("div",{className:"BottomLeftGrid_ScrollWrapper",style:me({},this._bottomLeftGridStyle,{height:f,width:u,overflowY:"hidden"})},v):v}},{key:"_renderBottomRightGrid",value:function(e){var t=e.columnCount,o=e.fixedColumnCount,a=e.fixedRowCount,l=e.rowCount,s=e.scrollToColumn,c=e.scrollToRow;return k.createElement(Be,le({},e,{cellRenderer:this._cellRendererBottomRightGrid,className:this.props.classNameBottomRightGrid,columnCount:Math.max(0,t-o),columnWidth:this._columnWidthRightGrid,deferredMeasurementCache:this._deferredMeasurementCacheBottomRightGrid,height:this._getBottomGridHeight(e),onScroll:this._onScroll,onScrollbarPresenceChange:this._onScrollbarPresenceChange,ref:this._bottomRightGridRef,rowCount:Math.max(0,l-a),rowHeight:this._rowHeightBottomGrid,scrollToColumn:s-o,scrollToRow:c-a,style:this._bottomRightGridStyle,width:this._getRightGridWidth(e)}))}},{key:"_renderTopLeftGrid",value:function(e){var t=e.fixedColumnCount,o=e.fixedRowCount;return!t||!o?null:k.createElement(Be,le({},e,{className:this.props.classNameTopLeftGrid,columnCount:t,height:this._getTopGridHeight(e),ref:this._topLeftGridRef,rowCount:o,style:this._topLeftGridStyle,tabIndex:null,width:this._getLeftGridWidth(e)}))}},{key:"_renderTopRightGrid",value:function(e){var t=e.columnCount,o=e.enableFixedRowScroll,a=e.fixedColumnCount,l=e.fixedRowCount,s=e.scrollLeft,c=e.hideTopRightGridScrollbar,d=this.state,f=d.showHorizontalScrollbar,u=d.scrollbarSize;if(!l)return null;var p=f?1:0,h=this._getTopGridHeight(e),v=this._getRightGridWidth(e),y=f?u:0,_=h,C=this._topRightGridStyle;c&&(_=h+y,C=me({},this._topRightGridStyle,{left:0}));var z=k.createElement(Be,le({},e,{cellRenderer:this._cellRendererTopRightGrid,className:this.props.classNameTopRightGrid,columnCount:Math.max(0,t-a)+p,columnWidth:this._columnWidthRightGrid,deferredMeasurementCache:this._deferredMeasurementCacheTopRightGrid,height:_,onScroll:o?this._onScrollLeft:void 0,ref:this._topRightGridRef,rowCount:l,scrollLeft:s,style:C,tabIndex:null,width:v}));return c?k.createElement("div",{className:"TopRightGrid_ScrollWrapper",style:me({},this._topRightGridStyle,{height:h,width:v,overflowX:"hidden"})},z):z}}],[{key:"getDerivedStateFromProps",value:function(e,t){return e.scrollLeft!==t.scrollLeft||e.scrollTop!==t.scrollTop?{scrollLeft:e.scrollLeft!=null&&e.scrollLeft>=0?e.scrollLeft:t.scrollLeft,scrollTop:e.scrollTop!=null&&e.scrollTop>=0?e.scrollTop:t.scrollTop}:null}}]),i}(k.PureComponent);P(sr,"defaultProps",{classNameBottomLeftGrid:"",classNameBottomRightGrid:"",classNameTopLeftGrid:"",classNameTopRightGrid:"",enableFixedColumnScroll:!1,enableFixedRowScroll:!1,fixedColumnCount:0,fixedRowCount:0,scrollToColumn:-1,scrollToRow:-1,style:{},styleBottomLeftGrid:{},styleBottomRightGrid:{},styleTopLeftGrid:{},styleTopRightGrid:{},hideTopRightGridScrollbar:!1,hideBottomLeftGridScrollbar:!1});sr.propTypes={};Wt(sr);function ac(r){var i=r.dataKey,n=r.rowData;return typeof n.get=="function"?n.get(i):n[i]}function lc(r){var i=r.cellData;return i==null?"":String(i)}function No(r){var i=r.className,n=r.columns,e=r.style;return k.createElement("div",{className:i,role:"row",style:e},n)}No.propTypes=null;var Ve={ASC:"ASC",DESC:"DESC"};function Lo(r){var i=r.sortDirection,n=ke("ReactVirtualized__Table__sortableHeaderIcon",{"ReactVirtualized__Table__sortableHeaderIcon--ASC":i===Ve.ASC,"ReactVirtualized__Table__sortableHeaderIcon--DESC":i===Ve.DESC});return k.createElement("svg",{className:n,width:18,height:18,viewBox:"0 0 24 24"},i===Ve.ASC?k.createElement("path",{d:"M7 14l5-5 5 5z"}):k.createElement("path",{d:"M7 10l5 5 5-5z"}),k.createElement("path",{d:"M0 0h24v24H0z",fill:"none"}))}Lo.propTypes={};function Mo(r){var i=r.dataKey,n=r.label,e=r.sortBy,t=r.sortDirection,o=e===i,a=[k.createElement("span",{className:"ReactVirtualized__Table__headerTruncatedText",key:"label",title:typeof n=="string"?n:null},n)];return o&&a.push(k.createElement(Lo,{key:"SortIndicator",sortDirection:t})),a}Mo.propTypes=null;function Eo(r){var i=r.className,n=r.columns,e=r.index,t=r.key,o=r.onRowClick,a=r.onRowDoubleClick,l=r.onRowMouseOut,s=r.onRowMouseOver,c=r.onRowRightClick,d=r.rowData,f=r.style,u={"aria-rowindex":e+1};return(o||a||l||s||c)&&(u["aria-label"]="row",u.tabIndex=0,o&&(u.onClick=function(p){return o({event:p,index:e,rowData:d})}),a&&(u.onDoubleClick=function(p){return a({event:p,index:e,rowData:d})}),l&&(u.onMouseOut=function(p){return l({event:p,index:e,rowData:d})}),s&&(u.onMouseOver=function(p){return s({event:p,index:e,rowData:d})}),c&&(u.onContextMenu=function(p){return c({event:p,index:e,rowData:d})})),k.createElement("div",le({},u,{className:i,key:t,role:"row",style:f}),n)}Eo.propTypes=null;var Ao=function(r){xe(i,r);function i(){return ge(this,i),_e(this,Re(i).apply(this,arguments))}return i}(k.Component);P(Ao,"defaultProps",{cellDataGetter:ac,cellRenderer:lc,defaultSortDirection:Ve.ASC,flexGrow:0,flexShrink:1,headerRenderer:Mo,style:{}});Ao.propTypes={};function yi(r,i){var n=Object.keys(r);if(Object.getOwnPropertySymbols){var e=Object.getOwnPropertySymbols(r);i&&(e=e.filter(function(t){return Object.getOwnPropertyDescriptor(r,t).enumerable})),n.push.apply(n,e)}return n}function ct(r){for(var i=1;i<arguments.length;i++){var n=arguments[i]!=null?arguments[i]:{};i%2?yi(n,!0).forEach(function(e){P(r,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(n)):yi(n).forEach(function(e){Object.defineProperty(r,e,Object.getOwnPropertyDescriptor(n,e))})}return r}var jo=function(r){xe(i,r);function i(n){var e;return ge(this,i),e=_e(this,Re(i).call(this,n)),e.state={scrollbarWidth:0},e._createColumn=e._createColumn.bind(E(e)),e._createRow=e._createRow.bind(E(e)),e._onScroll=e._onScroll.bind(E(e)),e._onSectionRendered=e._onSectionRendered.bind(E(e)),e._setRef=e._setRef.bind(E(e)),e}return pe(i,[{key:"forceUpdateGrid",value:function(){this.Grid&&this.Grid.forceUpdate()}},{key:"getOffsetForRow",value:function(e){var t=e.alignment,o=e.index;if(this.Grid){var a=this.Grid.getOffsetForCell({alignment:t,rowIndex:o}),l=a.scrollTop;return l}return 0}},{key:"invalidateCellSizeAfterRender",value:function(e){var t=e.columnIndex,o=e.rowIndex;this.Grid&&this.Grid.invalidateCellSizeAfterRender({rowIndex:o,columnIndex:t})}},{key:"measureAllRows",value:function(){this.Grid&&this.Grid.measureAllCells()}},{key:"recomputeGridSize",value:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=e.columnIndex,o=t===void 0?0:t,a=e.rowIndex,l=a===void 0?0:a;this.Grid&&this.Grid.recomputeGridSize({rowIndex:l,columnIndex:o})}},{key:"recomputeRowHeights",value:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0;this.Grid&&this.Grid.recomputeGridSize({rowIndex:e})}},{key:"scrollToPosition",value:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0;this.Grid&&this.Grid.scrollToPosition({scrollTop:e})}},{key:"scrollToRow",value:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0;this.Grid&&this.Grid.scrollToCell({columnIndex:0,rowIndex:e})}},{key:"getScrollbarWidth",value:function(){if(this.Grid){var e=cn.findDOMNode(this.Grid),t=e.clientWidth||0,o=e.offsetWidth||0;return o-t}return 0}},{key:"componentDidMount",value:function(){this._setScrollbarWidth()}},{key:"componentDidUpdate",value:function(){this._setScrollbarWidth()}},{key:"render",value:function(){var e=this,t=this.props,o=t.children,a=t.className,l=t.disableHeader,s=t.gridClassName,c=t.gridStyle,d=t.headerHeight,f=t.headerRowRenderer,u=t.height,p=t.id,h=t.noRowsRenderer,v=t.rowClassName,y=t.rowStyle,_=t.scrollToIndex,C=t.style,z=t.width,D=this.state.scrollbarWidth,L=l?u:u-d,R=typeof v=="function"?v({index:-1}):v,I=typeof y=="function"?y({index:-1}):y;return this._cachedColumnStyles=[],k.Children.toArray(o).forEach(function(g,w){var S=e._getFlexStyleForColumn(g,g.props.style);e._cachedColumnStyles[w]=ct({overflow:"hidden"},S)}),k.createElement("div",{"aria-label":this.props["aria-label"],"aria-labelledby":this.props["aria-labelledby"],"aria-colcount":k.Children.toArray(o).length,"aria-rowcount":this.props.rowCount,className:ke("ReactVirtualized__Table",a),id:p,role:"grid",style:C},!l&&f({className:ke("ReactVirtualized__Table__headerRow",R),columns:this._getHeaderColumns(),style:ct({height:d,overflow:"hidden",paddingRight:D,width:z},I)}),k.createElement(Be,le({},this.props,{"aria-readonly":null,autoContainerWidth:!0,className:ke("ReactVirtualized__Table__Grid",s),cellRenderer:this._createRow,columnWidth:z,columnCount:1,height:L,id:void 0,noContentRenderer:h,onScroll:this._onScroll,onSectionRendered:this._onSectionRendered,ref:this._setRef,role:"rowgroup",scrollbarWidth:D,scrollToRow:_,style:ct({},c,{overflowX:"hidden"})})))}},{key:"_createColumn",value:function(e){var t=e.column,o=e.columnIndex,a=e.isScrolling,l=e.parent,s=e.rowData,c=e.rowIndex,d=this.props.onColumnClick,f=t.props,u=f.cellDataGetter,p=f.cellRenderer,h=f.className,v=f.columnData,y=f.dataKey,_=f.id,C=u({columnData:v,dataKey:y,rowData:s}),z=p({cellData:C,columnData:v,columnIndex:o,dataKey:y,isScrolling:a,parent:l,rowData:s,rowIndex:c}),D=function(g){d&&d({columnData:v,dataKey:y,event:g})},L=this._cachedColumnStyles[o],R=typeof z=="string"?z:null;return k.createElement("div",{"aria-colindex":o+1,"aria-describedby":_,className:ke("ReactVirtualized__Table__rowColumn",h),key:"Row"+c+"-Col"+o,onClick:D,role:"gridcell",style:L,title:R},z)}},{key:"_createHeader",value:function(e){var t=e.column,o=e.index,a=this.props,l=a.headerClassName,s=a.headerStyle,c=a.onHeaderClick,d=a.sort,f=a.sortBy,u=a.sortDirection,p=t.props,h=p.columnData,v=p.dataKey,y=p.defaultSortDirection,_=p.disableSort,C=p.headerRenderer,z=p.id,D=p.label,L=!_&&d,R=ke("ReactVirtualized__Table__headerColumn",l,t.props.headerClassName,{ReactVirtualized__Table__sortableHeaderColumn:L}),I=this._getFlexStyleForColumn(t,ct({},s,{},t.props.headerStyle)),g=C({columnData:h,dataKey:v,disableSort:_,label:D,sortBy:f,sortDirection:u}),w,S,O,j,U;if(L||c){var q=f!==v,A=q?y:u===Ve.DESC?Ve.ASC:Ve.DESC,W=function(K){L&&d({defaultSortDirection:y,event:K,sortBy:v,sortDirection:A}),c&&c({columnData:h,dataKey:v,event:K})},H=function(K){(K.key==="Enter"||K.key===" ")&&W(K)};U=t.props["aria-label"]||D||v,j="none",O=0,w=W,S=H}return f===v&&(j=u===Ve.ASC?"ascending":"descending"),k.createElement("div",{"aria-label":U,"aria-sort":j,className:R,id:z,key:"Header-Col"+o,onClick:w,onKeyDown:S,role:"columnheader",style:I,tabIndex:O},g)}},{key:"_createRow",value:function(e){var t=this,o=e.rowIndex,a=e.isScrolling,l=e.key,s=e.parent,c=e.style,d=this.props,f=d.children,u=d.onRowClick,p=d.onRowDoubleClick,h=d.onRowRightClick,v=d.onRowMouseOver,y=d.onRowMouseOut,_=d.rowClassName,C=d.rowGetter,z=d.rowRenderer,D=d.rowStyle,L=this.state.scrollbarWidth,R=typeof _=="function"?_({index:o}):_,I=typeof D=="function"?D({index:o}):D,g=C({index:o}),w=k.Children.toArray(f).map(function(j,U){return t._createColumn({column:j,columnIndex:U,isScrolling:a,parent:s,rowData:g,rowIndex:o,scrollbarWidth:L})}),S=ke("ReactVirtualized__Table__row",R),O=ct({},c,{height:this._getRowHeight(o),overflow:"hidden",paddingRight:L},I);return z({className:S,columns:w,index:o,isScrolling:a,key:l,onRowClick:u,onRowDoubleClick:p,onRowRightClick:h,onRowMouseOver:v,onRowMouseOut:y,rowData:g,style:O})}},{key:"_getFlexStyleForColumn",value:function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},o="".concat(e.props.flexGrow," ").concat(e.props.flexShrink," ").concat(e.props.width,"px"),a=ct({},t,{flex:o,msFlex:o,WebkitFlex:o});return e.props.maxWidth&&(a.maxWidth=e.props.maxWidth),e.props.minWidth&&(a.minWidth=e.props.minWidth),a}},{key:"_getHeaderColumns",value:function(){var e=this,t=this.props,o=t.children,a=t.disableHeader,l=a?[]:k.Children.toArray(o);return l.map(function(s,c){return e._createHeader({column:s,index:c})})}},{key:"_getRowHeight",value:function(e){var t=this.props.rowHeight;return typeof t=="function"?t({index:e}):t}},{key:"_onScroll",value:function(e){var t=e.clientHeight,o=e.scrollHeight,a=e.scrollTop,l=this.props.onScroll;l({clientHeight:t,scrollHeight:o,scrollTop:a})}},{key:"_onSectionRendered",value:function(e){var t=e.rowOverscanStartIndex,o=e.rowOverscanStopIndex,a=e.rowStartIndex,l=e.rowStopIndex,s=this.props.onRowsRendered;s({overscanStartIndex:t,overscanStopIndex:o,startIndex:a,stopIndex:l})}},{key:"_setRef",value:function(e){this.Grid=e}},{key:"_setScrollbarWidth",value:function(){var e=this.getScrollbarWidth();this.setState({scrollbarWidth:e})}}]),i}(k.PureComponent);P(jo,"defaultProps",{disableHeader:!1,estimatedRowSize:30,headerHeight:0,headerStyle:{},noRowsRenderer:function(){return null},onRowsRendered:function(){return null},onScroll:function(){return null},overscanIndicesGetter:yo,overscanRowCount:10,rowRenderer:Eo,headerRowRenderer:No,rowStyle:{},scrollToAlignment:"auto",scrollToIndex:-1,style:{}});jo.propTypes={};var Ke=[],Mt=null,it=null;function Fo(){it&&(it=null,document.body&&Mt!=null&&(document.body.style.pointerEvents=Mt),Mt=null)}function sc(){Fo(),Ke.forEach(function(r){return r.__resetIsScrolling()})}function cc(){it&&yt(it);var r=0;Ke.forEach(function(i){r=Math.max(r,i.props.scrollingResetTimeInterval)}),it=ir(sc,r)}function Go(r){r.currentTarget===window&&Mt==null&&document.body&&(Mt=document.body.style.pointerEvents,document.body.style.pointerEvents="none"),cc(),Ke.forEach(function(i){i.props.scrollElement===r.currentTarget&&i.__handleWindowScrollEvent()})}function Ci(r,i){Ke.some(function(n){return n.props.scrollElement===i})||i.addEventListener("scroll",Go),Ke.push(r)}function wi(r,i){Ke=Ke.filter(function(n){return n!==r}),Ke.length||(i.removeEventListener("scroll",Go),it&&(yt(it),Fo()))}var cr=function(i){return i===window},Ot=function(i){return i.getBoundingClientRect()};function bi(r,i){if(r)if(cr(r)){var n=window,e=n.innerHeight,t=n.innerWidth;return{height:typeof e=="number"?e:0,width:typeof t=="number"?t:0}}else return Ot(r);else return{height:i.serverHeight,width:i.serverWidth}}function dc(r,i){if(cr(i)&&document.documentElement){var n=document.documentElement,e=Ot(r),t=Ot(n);return{top:e.top-t.top,left:e.left-t.left}}else{var o=Wo(i),a=Ot(r),l=Ot(i);return{top:a.top+o.top-l.top,left:a.left+o.left-l.left}}}function Wo(r){return cr(r)&&document.documentElement?{top:"scrollY"in window?window.scrollY:document.documentElement.scrollTop,left:"scrollX"in window?window.scrollX:document.documentElement.scrollLeft}:{top:r.scrollTop,left:r.scrollLeft}}var xi,_i;function Ri(r,i){var n=Object.keys(r);if(Object.getOwnPropertySymbols){var e=Object.getOwnPropertySymbols(r);i&&(e=e.filter(function(t){return Object.getOwnPropertyDescriptor(r,t).enumerable})),n.push.apply(n,e)}return n}function uc(r){for(var i=1;i<arguments.length;i++){var n=arguments[i]!=null?arguments[i]:{};i%2?Ri(n,!0).forEach(function(e){P(r,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(n)):Ri(n).forEach(function(e){Object.defineProperty(r,e,Object.getOwnPropertyDescriptor(n,e))})}return r}var fc=150,$o=function(){return typeof window<"u"?window:void 0},hc=(_i=xi=function(r){xe(i,r);function i(){var n,e;ge(this,i);for(var t=arguments.length,o=new Array(t),a=0;a<t;a++)o[a]=arguments[a];return e=_e(this,(n=Re(i)).call.apply(n,[this].concat(o))),P(E(e),"_window",$o()),P(E(e),"_isMounted",!1),P(E(e),"_positionFromTop",0),P(E(e),"_positionFromLeft",0),P(E(e),"_detectElementResize",void 0),P(E(e),"_child",void 0),P(E(e),"state",uc({},bi(e.props.scrollElement,e.props),{isScrolling:!1,scrollLeft:0,scrollTop:0})),P(E(e),"_registerChild",function(l){l&&!(l instanceof Element)&&console.warn("WindowScroller registerChild expects to be passed Element or null"),e._child=l,e.updatePosition()}),P(E(e),"_onChildScroll",function(l){var s=l.scrollTop;if(e.state.scrollTop!==s){var c=e.props.scrollElement;c&&(typeof c.scrollTo=="function"?c.scrollTo(0,s+e._positionFromTop):c.scrollTop=s+e._positionFromTop)}}),P(E(e),"_registerResizeListener",function(l){l===window?window.addEventListener("resize",e._onResize,!1):e._detectElementResize.addResizeListener(l,e._onResize)}),P(E(e),"_unregisterResizeListener",function(l){l===window?window.removeEventListener("resize",e._onResize,!1):l&&e._detectElementResize.removeResizeListener(l,e._onResize)}),P(E(e),"_onResize",function(){e.updatePosition()}),P(E(e),"__handleWindowScrollEvent",function(){if(e._isMounted){var l=e.props.onScroll,s=e.props.scrollElement;if(s){var c=Wo(s),d=Math.max(0,c.left-e._positionFromLeft),f=Math.max(0,c.top-e._positionFromTop);e.setState({isScrolling:!0,scrollLeft:d,scrollTop:f}),l({scrollLeft:d,scrollTop:f})}}}),P(E(e),"__resetIsScrolling",function(){e.setState({isScrolling:!1})}),e}return pe(i,[{key:"updatePosition",value:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.props.scrollElement,t=this.props.onResize,o=this.state,a=o.height,l=o.width,s=this._child||cn.findDOMNode(this);if(s instanceof Element&&e){var c=dc(s,e);this._positionFromTop=c.top,this._positionFromLeft=c.left}var d=bi(e,this.props);(a!==d.height||l!==d.width)&&(this.setState({height:d.height,width:d.width}),t({height:d.height,width:d.width}))}},{key:"componentDidMount",value:function(){var e=this.props.scrollElement;this._detectElementResize=wo(),this.updatePosition(e),e&&(Ci(this,e),this._registerResizeListener(e)),this._isMounted=!0}},{key:"componentDidUpdate",value:function(e,t){var o=this.props.scrollElement,a=e.scrollElement;a!==o&&a!=null&&o!=null&&(this.updatePosition(o),wi(this,a),Ci(this,o),this._unregisterResizeListener(a),this._registerResizeListener(o))}},{key:"componentWillUnmount",value:function(){var e=this.props.scrollElement;e&&(wi(this,e),this._unregisterResizeListener(e)),this._isMounted=!1}},{key:"render",value:function(){var e=this.props.children,t=this.state,o=t.isScrolling,a=t.scrollTop,l=t.scrollLeft,s=t.height,c=t.width;return e({onChildScroll:this._onChildScroll,registerChild:this._registerChild,height:s,isScrolling:o,scrollLeft:l,scrollTop:a,width:c})}}]),i}(k.PureComponent),P(xi,"propTypes",null),_i);P(hc,"defaultProps",{onResize:function(){},onScroll:function(){},scrollingResetTimeInterval:fc,scrollElement:$o(),serverHeight:0,serverWidth:0});function mt(r){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?mt=function(i){return typeof i}:mt=function(i){return i&&typeof Symbol=="function"&&i.constructor===Symbol&&i!==Symbol.prototype?"symbol":typeof i},mt(r)}function Ht(r,i){if(!(r instanceof i))throw new TypeError("Cannot call a class as a function")}function Ii(r,i){for(var n=0;n<i.length;n++){var e=i[n];e.enumerable=e.enumerable||!1,e.configurable=!0,"value"in e&&(e.writable=!0),Object.defineProperty(r,e.key,e)}}function Ut(r,i,n){return i&&Ii(r.prototype,i),n&&Ii(r,n),r}function pc(r,i,n){return i in r?Object.defineProperty(r,i,{value:n,enumerable:!0,configurable:!0,writable:!0}):r[i]=n,r}function Xe(){return Xe=Object.assign||function(r){for(var i=1;i<arguments.length;i++){var n=arguments[i];for(var e in n)Object.prototype.hasOwnProperty.call(n,e)&&(r[e]=n[e])}return r},Xe.apply(this,arguments)}function Ti(r,i){var n=Object.keys(r);if(Object.getOwnPropertySymbols){var e=Object.getOwnPropertySymbols(r);i&&(e=e.filter(function(t){return Object.getOwnPropertyDescriptor(r,t).enumerable})),n.push.apply(n,e)}return n}function ae(r){for(var i=1;i<arguments.length;i++){var n=arguments[i]!=null?arguments[i]:{};i%2?Ti(Object(n),!0).forEach(function(e){pc(r,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(n)):Ti(Object(n)).forEach(function(e){Object.defineProperty(r,e,Object.getOwnPropertyDescriptor(n,e))})}return r}function un(r,i){if(typeof i!="function"&&i!==null)throw new TypeError("Super expression must either be null or a function");r.prototype=Object.create(i&&i.prototype,{constructor:{value:r,writable:!0,configurable:!0}}),i&&Wn(r,i)}function Me(r){return Me=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},Me(r)}function Wn(r,i){return Wn=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},Wn(r,i)}function gc(r,i){if(r==null)return{};var n={},e=Object.keys(r),t,o;for(o=0;o<e.length;o++)t=e[o],!(i.indexOf(t)>=0)&&(n[t]=r[t]);return n}function dr(r,i){if(r==null)return{};var n=gc(r,i),e,t;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(r);for(t=0;t<o.length;t++)e=o[t],!(i.indexOf(e)>=0)&&Object.prototype.propertyIsEnumerable.call(r,e)&&(n[e]=r[e])}return n}function Fe(r){if(r===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return r}function fn(r,i){return i&&(typeof i=="object"||typeof i=="function")?i:Fe(r)}function de(r){return vc(r)||mc(r)||Sc()}function vc(r){if(Array.isArray(r)){for(var i=0,n=new Array(r.length);i<r.length;i++)n[i]=r[i];return n}}function mc(r){if(Symbol.iterator in Object(r)||Object.prototype.toString.call(r)==="[object Arguments]")return Array.from(r)}function Sc(){throw new TypeError("Invalid attempt to spread non-iterable instance")}function Ho(){var r=this.constructor.getDerivedStateFromProps(this.props,this.state);r!=null&&this.setState(r)}function Uo(r){function i(n){var e=this.constructor.getDerivedStateFromProps(r,n);return e??null}this.setState(i.bind(this))}function Bo(r,i){try{var n=this.props,e=this.state;this.props=r,this.state=i,this.__reactInternalSnapshotFlag=!0,this.__reactInternalSnapshot=this.getSnapshotBeforeUpdate(n,e)}finally{this.props=n,this.state=e}}Ho.__suppressDeprecationWarning=!0;Uo.__suppressDeprecationWarning=!0;Bo.__suppressDeprecationWarning=!0;function yc(r){var i=r.prototype;if(!i||!i.isReactComponent)throw new Error("Can only polyfill class components");if(typeof r.getDerivedStateFromProps!="function"&&typeof i.getSnapshotBeforeUpdate!="function")return r;var n=null,e=null,t=null;if(typeof i.componentWillMount=="function"?n="componentWillMount":typeof i.UNSAFE_componentWillMount=="function"&&(n="UNSAFE_componentWillMount"),typeof i.componentWillReceiveProps=="function"?e="componentWillReceiveProps":typeof i.UNSAFE_componentWillReceiveProps=="function"&&(e="UNSAFE_componentWillReceiveProps"),typeof i.componentWillUpdate=="function"?t="componentWillUpdate":typeof i.UNSAFE_componentWillUpdate=="function"&&(t="UNSAFE_componentWillUpdate"),n!==null||e!==null||t!==null){var o=r.displayName||r.name,a=typeof r.getDerivedStateFromProps=="function"?"getDerivedStateFromProps()":"getSnapshotBeforeUpdate()";throw Error(`Unsafe legacy lifecycles will not be called for components using new component APIs.
14
14
 
15
15
  `+o+" uses "+a+" but also contains the following legacy lifecycles:"+(n!==null?`
16
16
  `+n:"")+(e!==null?`
@@ -18,23 +18,23 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
18
18
  `+t:"")+`
19
19
 
20
20
  The above lifecycles should be removed. Learn more about this warning here:
21
- https://fb.me/react-async-component-lifecycle-hooks`)}if(typeof r.getDerivedStateFromProps=="function"&&(i.componentWillMount=Ho,i.componentWillReceiveProps=Uo),typeof i.getSnapshotBeforeUpdate=="function"){if(typeof i.componentDidUpdate!="function")throw new Error("Cannot polyfill getSnapshotBeforeUpdate() for components that do not define componentDidUpdate() on the prototype");i.componentWillUpdate=Bo;var l=i.componentDidUpdate;i.componentDidUpdate=function(c,d,f){var u=this.__reactInternalSnapshotFlag?this.__reactInternalSnapshot:f;l.call(this,c,d,u)}}return r}function Vo(r){var i=r.targetIndex,n=r.node,e=r.currentIndex,t=r.getNodeKey,o=r.path,a=o===void 0?[]:o,l=r.lowerSiblingCounts,s=l===void 0?[]:l,c=r.ignoreCollapsed,d=c===void 0?!0:c,f=r.isPseudoRoot,u=f===void 0?!1:f,p=u?[]:[].concat(de(a),[t({node:n,treeIndex:e})]);if(e===i)return{node:n,lowerSiblingCounts:s,path:p};if(!n.children||d&&n.expanded!==!0)return{nextIndex:e+1};for(var h=e+1,v=n.children.length,y=0;y<v;y+=1){var _=Vo({ignoreCollapsed:d,getNodeKey:t,targetIndex:i,node:n.children[y],currentIndex:h,lowerSiblingCounts:[].concat(de(s),[v-y-1]),path:p});if(_.node)return _;h=_.nextIndex}return{nextIndex:h}}function ur(r){var i=r.node,n=r.ignoreCollapsed,e=n===void 0?!0:n;return Vo({getNodeKey:function(){},ignoreCollapsed:e,node:i,currentIndex:0,targetIndex:-1}).nextIndex-1}function qo(r){var i=r.callback,n=r.getNodeKey,e=r.ignoreCollapsed,t=r.isPseudoRoot,o=t===void 0?!1:t,a=r.node,l=r.parentNode,s=l===void 0?null:l,c=r.currentIndex,d=r.path,f=d===void 0?[]:d,u=r.lowerSiblingCounts,p=u===void 0?[]:u,h=o?[]:[].concat(de(f),[n({node:a,treeIndex:c})]),v=o?null:{node:a,parentNode:s,path:h,lowerSiblingCounts:p,treeIndex:c};if(!o){var y=i(v);if(y===!1)return!1}if(!a.children||a.expanded!==!0&&e&&!o)return c;var _=c,C=a.children.length;if(typeof a.children!="function"){for(var z=0;z<C;z+=1)if(_=qo({callback:i,getNodeKey:n,ignoreCollapsed:e,node:a.children[z],parentNode:o?null:a,currentIndex:_+1,lowerSiblingCounts:[].concat(de(p),[C-z-1]),path:h}),_===!1)return!1}return _}function Ko(r){var i=r.callback,n=r.getNodeKey,e=r.ignoreCollapsed,t=r.isPseudoRoot,o=t===void 0?!1:t,a=r.node,l=r.parentNode,s=l===void 0?null:l,c=r.currentIndex,d=r.path,f=d===void 0?[]:d,u=r.lowerSiblingCounts,p=u===void 0?[]:u,h=ae({},a),v=o?[]:[].concat(de(f),[n({node:h,treeIndex:c})]),y={node:h,parentNode:s,path:v,lowerSiblingCounts:p,treeIndex:c};if(!h.children||h.expanded!==!0&&e&&!o)return{treeIndex:c,node:i(y)};var _=c,C=h.children.length;return typeof h.children!="function"&&(h.children=h.children.map(function(z,D){var M=Ko({callback:i,getNodeKey:n,ignoreCollapsed:e,node:z,parentNode:o?null:h,currentIndex:_+1,lowerSiblingCounts:[].concat(de(p),[C-D-1]),path:v});return _=M.treeIndex,M.node})),{node:i(y),treeIndex:_}}function Xo(r){var i=r.treeData,n=r.getNodeKey,e=r.callback,t=r.ignoreCollapsed,o=t===void 0?!0:t;!i||i.length<1||qo({callback:e,getNodeKey:n,ignoreCollapsed:o,isPseudoRoot:!0,node:{children:i},currentIndex:-1,path:[],lowerSiblingCounts:[]})}function Cc(r){var i=r.treeData,n=r.getNodeKey,e=r.callback,t=r.ignoreCollapsed,o=t;return!i||i.length<1?[]:Ko({callback:e,getNodeKey:n,ignoreCollapsed:o,isPseudoRoot:!0,node:{children:i},currentIndex:-1,path:[],lowerSiblingCounts:[]}).node.children}function wc(r){var i=r.treeData,n=r.expanded,e=n===void 0?!0:n;return Cc({treeData:i,callback:function(o){var a=o.node;return ae(ae({},a),{},{expanded:e})},getNodeKey:function(o){var a=o.treeIndex;return a},ignoreCollapsed:!1})}function zt(r){var i=r.treeData,n=r.path,e=r.newNode,t=r.getNodeKey,o=r.ignoreCollapsed,a=o===void 0?!0:o,l="RESULT_MISS",s=function d(f){var u=f.isPseudoRoot,p=u===void 0?!1:u,h=f.node,v=f.currentTreeIndex,y=f.pathIndex;if(!p&&t({node:h,treeIndex:v})!==n[y])return l;if(y>=n.length-1)return typeof e=="function"?e({node:h,treeIndex:v}):e;if(!h.children)throw new Error("Path referenced children of node with no children.");for(var _=v+1,C=0;C<h.children.length;C+=1){var z=d({node:h.children[C],currentTreeIndex:_,pathIndex:y+1});if(z!==l)return z?ae(ae({},h),{},{children:[].concat(de(h.children.slice(0,C)),[z],de(h.children.slice(C+1)))}):ae(ae({},h),{},{children:[].concat(de(h.children.slice(0,C)),de(h.children.slice(C+1)))});_+=1+ur({node:h.children[C],ignoreCollapsed:a})}return l},c=s({node:{children:i},currentTreeIndex:-1,pathIndex:-1,isPseudoRoot:!0});if(c===l)throw new Error("No node found at the given path.");return c.children}function bc(r){var i=r.treeData,n=r.path,e=r.getNodeKey,t=r.ignoreCollapsed,o=t===void 0?!0:t,a=null,l=null,s=zt({treeData:i,path:n,getNodeKey:e,ignoreCollapsed:o,newNode:function(d){var f=d.node,u=d.treeIndex;return a=f,l=u,null}});return{treeData:s,node:a,treeIndex:l}}function Yo(r){var i=r.targetDepth,n=r.minimumTreeIndex,e=r.newNode,t=r.ignoreCollapsed,o=r.expandParent,a=r.isPseudoRoot,l=a===void 0?!1:a,s=r.isLastChild,c=r.node,d=r.currentIndex,f=r.currentDepth,u=r.getNodeKey,p=r.path,h=p===void 0?[]:p,v=function(A){return l?[]:[].concat(de(h),[u({node:A,treeIndex:d})])};if(d>=n-1||s&&!(c.children&&c.children.length)){if(typeof c.children=="function")throw new Error("Cannot add to children defined by a function");var y=o?{expanded:!0}:{},_=ae(ae(ae({},c),y),{},{children:c.children?[e].concat(de(c.children)):[e]});return{node:_,nextIndex:d+2,insertedTreeIndex:d+1,parentPath:v(_),parentNode:l?null:_}}if(f>=i-1){if(!c.children||typeof c.children=="function"||c.expanded!==!0&&t&&!l)return{node:c,nextIndex:d+1};for(var C=d+1,z=null,D=null,M=0;M<c.children.length;M+=1){if(C>=n){z=C,D=M;break}C+=1+ur({node:c.children[M],ignoreCollapsed:t})}if(D===null){if(C<n&&!s)return{node:c,nextIndex:C};z=C,D=c.children.length}var R=ae(ae({},c),{},{children:[].concat(de(c.children.slice(0,D)),[e],de(c.children.slice(D)))});return{node:R,nextIndex:C,insertedTreeIndex:z,parentPath:v(R),parentNode:l?null:R}}if(!c.children||typeof c.children=="function"||c.expanded!==!0&&t&&!l)return{node:c,nextIndex:d+1};var I=null,g=null,w=null,S=d+1,O=c.children;typeof O!="function"&&(O=O.map(function(q,A){if(I!==null)return q;var W=Yo({targetDepth:i,minimumTreeIndex:n,newNode:e,ignoreCollapsed:t,expandParent:o,isLastChild:s&&A===O.length-1,node:q,currentIndex:S,currentDepth:f+1,getNodeKey:u,path:[]});return"insertedTreeIndex"in W&&(I=W.insertedTreeIndex,w=W.parentNode,g=W.parentPath),S=W.nextIndex,W.node}));var j=ae(ae({},c),{},{children:O}),U={node:j,nextIndex:S};return I!==null&&(U.insertedTreeIndex=I,U.parentPath=[].concat(de(v(j)),de(g)),U.parentNode=w),U}function Qo(r){var i=r.treeData,n=r.depth,e=r.minimumTreeIndex,t=r.newNode,o=r.getNodeKey,a=o===void 0?function(){}:o,l=r.ignoreCollapsed,s=l===void 0?!0:l,c=r.expandParent,d=c===void 0?!1:c;if(!i&&n===0)return{treeData:[t],treeIndex:0,path:[a({node:t,treeIndex:0})],parentNode:null};var f=Yo({targetDepth:n,minimumTreeIndex:e,newNode:t,ignoreCollapsed:s,expandParent:d,getNodeKey:a,isPseudoRoot:!0,isLastChild:!0,node:{children:i},currentIndex:-1,currentDepth:-1});if(!("insertedTreeIndex"in f))throw new Error("No suitable position found to insert.");var u=f.insertedTreeIndex;return{treeData:f.node.children,treeIndex:u,path:[].concat(de(f.parentPath),[a({node:t,treeIndex:u})]),parentNode:f.parentNode}}function xc(r){var i=r.treeData,n=r.getNodeKey,e=r.ignoreCollapsed,t=e===void 0?!0:e;if(!i||i.length<1)return[];var o=[];return Xo({treeData:i,getNodeKey:n,ignoreCollapsed:t,callback:function(l){o.push(l)}}),o}function Jo(r,i){return!!r.children&&typeof r.children!="function"&&r.children.some(function(n){return n===i||Jo(n,i)})}function Zo(r){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return r.children?typeof r.children=="function"?i+1:r.children.reduce(function(n,e){return Math.max(n,Zo(e,i+1))},i):i}function _c(r){var i=r.getNodeKey,n=r.treeData,e=r.searchQuery,t=r.searchMethod,o=r.searchFocusOffset,a=r.expandAllMatchPaths,l=a===void 0?!1:a,s=r.expandFocusMatchPaths,c=s===void 0?!0:s,d=0,f=function p(h){var v=h.isPseudoRoot,y=v===void 0?!1:v,_=h.node,C=h.currentIndex,z=h.path,D=z===void 0?[]:z,M=[],R=!1,I=!1,g=y?[]:[].concat(de(D),[i({node:_,treeIndex:C})]),w=y?null:{path:g,treeIndex:C},S=_.children&&typeof _.children!="function"&&_.children.length>0;!y&&t(ae(ae({},w),{},{node:_,searchQuery:e}))&&(d===o&&(I=!0),d+=1,R=!0);var O=C,j=ae({},_);return S&&(j.children=j.children.map(function(U){var q=p({node:U,currentIndex:O+1,path:g});return q.node.expanded?O=q.treeIndex:O+=1,(q.matches.length>0||q.hasFocusMatch)&&(M=[].concat(de(M),de(q.matches)),q.hasFocusMatch&&(I=!0),(l&&q.matches.length>0||(l||c)&&q.hasFocusMatch)&&(j.expanded=!0)),q.node})),!y&&!j.expanded&&(M=M.map(function(U){return ae(ae({},U),{},{treeIndex:null})})),R&&(M=[ae(ae({},w),{},{node:j})].concat(de(M))),{node:M.length>0?j:_,matches:M,hasFocusMatch:I,treeIndex:O}},u=f({node:{children:n},isPseudoRoot:!0,currentIndex:-1});return{matches:u.matches,treeData:u.node.children}}function be(){for(var r=arguments.length,i=new Array(r),n=0;n<r;n++)i[n]=arguments[n];return i.filter(Boolean).join(" ")}function Rc(r){function i(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}return function(){var n=Me(r),e;if(i()){var t=Me(this).constructor;e=Reflect.construct(n,arguments,t)}else e=n.apply(this,arguments);return fn(this,e)}}var fr=function(r){un(n,r);var i=Rc(n);function n(){return Ht(this,n),i.apply(this,arguments)}return Ut(n,[{key:"render",value:function(){var t=this.props,o=t.scaffoldBlockPxWidth,a=t.toggleChildrenVisibility,l=t.connectDragPreview,s=t.connectDragSource,c=t.isDragging,d=t.canDrop,f=t.canDrag,u=t.node,p=t.title,h=t.subtitle,v=t.draggedNode,y=t.path,_=t.treeIndex,C=t.isSearchMatch,z=t.isSearchFocus,D=t.buttons,M=t.className,R=t.style,I=t.didDrop;t.treeId,t.isOver,t.parentNode;var g=t.rowDirection,w=dr(t,["scaffoldBlockPxWidth","toggleChildrenVisibility","connectDragPreview","connectDragSource","isDragging","canDrop","canDrag","node","title","subtitle","draggedNode","path","treeIndex","isSearchMatch","isSearchFocus","buttons","className","style","didDrop","treeId","isOver","parentNode","rowDirection"]),S=p||u.title,O=h||u.subtitle,j=g==="rtl"?"rst__rtl":null,U;f&&(typeof u.children=="function"&&u.expanded?U=oe.createElement("div",{className:"rst__loadingHandle"},oe.createElement("div",{className:"rst__loadingCircle"},de(new Array(12)).map(function(H,V){return oe.createElement("div",{key:V,className:be("rst__loadingCirclePoint",j)})}))):U=s(oe.createElement("div",{className:"rst__moveHandle"}),{dropEffect:"copy"}));var q=v&&Jo(v,u),A=!I&&c,W={left:-.5*o};return g==="rtl"&&(W={right:-.5*o}),oe.createElement("div",Ke({style:{height:"100%"}},w),a&&u.children&&(u.children.length>0||typeof u.children=="function")&&oe.createElement("div",null,oe.createElement("button",{type:"button","aria-label":u.expanded?"Collapse":"Expand",className:be(u.expanded?"rst__collapseButton":"rst__expandButton",j),style:W,onClick:function(){return a({node:u,path:y,treeIndex:_})}}),u.expanded&&!c&&oe.createElement("div",{style:{width:o},className:be("rst__lineChildren",j)})),oe.createElement("div",{className:be("rst__rowWrapper",j)},l(oe.createElement("div",{className:be("rst__row",A&&"rst__rowLandingPad",A&&!d&&"rst__rowCancelPad",C&&"rst__rowSearchMatch",z&&"rst__rowSearchFocus",j,M),style:ae({opacity:q?.5:1},R)},U,oe.createElement("div",{className:be("rst__rowContents",!f&&"rst__rowContentsDragDisabled",j)},oe.createElement("div",{className:be("rst__rowLabel",j)},oe.createElement("span",{className:be("rst__rowTitle",u.subtitle&&"rst__rowTitleWithSubtitle")},typeof S=="function"?S({node:u,path:y,treeIndex:_}):S),O&&oe.createElement("span",{className:"rst__rowSubtitle"},typeof O=="function"?O({node:u,path:y,treeIndex:_}):O)),oe.createElement("div",{className:"rst__rowToolbar"},D.map(function(H,V){return oe.createElement("div",{key:V,className:"rst__toolbarButton"},H)})))))))}}]),n}(k.Component);fr.defaultProps={isSearchMatch:!1,isSearchFocus:!1,canDrag:!1,toggleChildrenVisibility:null,buttons:[],className:"",style:{},parentNode:null,draggedNode:null,canDrop:!1,title:null,subtitle:null,rowDirection:"ltr"};fr.propTypes={node:b.shape({}).isRequired,title:b.oneOfType([b.func,b.node]),subtitle:b.oneOfType([b.func,b.node]),path:b.arrayOf(b.oneOfType([b.string,b.number])).isRequired,treeIndex:b.number.isRequired,treeId:b.string.isRequired,isSearchMatch:b.bool,isSearchFocus:b.bool,canDrag:b.bool,scaffoldBlockPxWidth:b.number.isRequired,toggleChildrenVisibility:b.func,buttons:b.arrayOf(b.node),className:b.string,style:b.shape({}),connectDragPreview:b.func.isRequired,connectDragSource:b.func.isRequired,parentNode:b.shape({}),isDragging:b.bool.isRequired,didDrop:b.bool.isRequired,draggedNode:b.shape({}),isOver:b.bool.isRequired,canDrop:b.bool,rowDirection:b.string};var hr=function(i){var n=i.isOver,e=i.canDrop;return oe.createElement("div",{className:be("rst__placeholder",e&&"rst__placeholderLandingPad",e&&!n&&"rst__placeholderCancelPad")})};hr.defaultProps={isOver:!1,canDrop:!1};hr.propTypes={isOver:b.bool,canDrop:b.bool};function Ic(r){function i(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}return function(){var n=Me(r),e;if(i()){var t=Me(this).constructor;e=Reflect.construct(n,arguments,t)}else e=n.apply(this,arguments);return fn(this,e)}}var pr=function(r){un(n,r);var i=Ic(n);function n(){return Ht(this,n),i.apply(this,arguments)}return Ut(n,[{key:"render",value:function(){var t=this.props,o=t.children,a=t.listIndex,l=t.swapFrom,s=t.swapLength,c=t.swapDepth,d=t.scaffoldBlockPxWidth,f=t.lowerSiblingCounts,u=t.connectDropTarget,p=t.isOver,h=t.draggedNode,v=t.canDrop,y=t.treeIndex;t.treeId,t.getPrevRow,t.node,t.path;var _=t.rowDirection,C=dr(t,["children","listIndex","swapFrom","swapLength","swapDepth","scaffoldBlockPxWidth","lowerSiblingCounts","connectDropTarget","isOver","draggedNode","canDrop","treeIndex","treeId","getPrevRow","node","path","rowDirection"]),z=_==="rtl"?"rst__rtl":null,D=f.length,M=[];f.forEach(function(I,g){var w="";if(I>0?a===0?w="rst__lineHalfHorizontalRight rst__lineHalfVerticalBottom":g===D-1?w="rst__lineHalfHorizontalRight rst__lineFullVertical":w="rst__lineFullVertical":a===0?w="rst__lineHalfHorizontalRight":g===D-1&&(w="rst__lineHalfVerticalTop rst__lineHalfHorizontalRight"),M.push(oe.createElement("div",{key:"pre_".concat(1+g),style:{width:d},className:be("rst__lineBlock",w,z)})),y!==a&&g===c){var S="";a===l+s-1?S="rst__highlightBottomLeftCorner":y===l?S="rst__highlightTopLeftCorner":S="rst__highlightLineVertical";var O;_==="rtl"?O={width:d,right:d*g}:O={width:d,left:d*g},M.push(oe.createElement("div",{key:g,style:O,className:be("rst__absoluteLineBlock",S,z)}))}});var R;return _==="rtl"?R={right:d*D}:R={left:d*D},u(oe.createElement("div",Ke({},C,{className:be("rst__node",z)}),M,oe.createElement("div",{className:"rst__nodeContent",style:R},k.Children.map(o,function(I){return k.cloneElement(I,{isOver:p,canDrop:v,draggedNode:h})}))))}}]),n}(k.Component);pr.defaultProps={swapFrom:null,swapDepth:null,swapLength:null,canDrop:!1,draggedNode:null,rowDirection:"ltr"};pr.propTypes={treeIndex:b.number.isRequired,treeId:b.string.isRequired,swapFrom:b.number,swapDepth:b.number,swapLength:b.number,scaffoldBlockPxWidth:b.number.isRequired,lowerSiblingCounts:b.arrayOf(b.number).isRequired,listIndex:b.number.isRequired,children:b.node.isRequired,connectDropTarget:b.func.isRequired,isOver:b.bool.isRequired,canDrop:b.bool,draggedNode:b.shape({}),getPrevRow:b.func.isRequired,node:b.shape({}).isRequired,path:b.arrayOf(b.oneOfType([b.string,b.number])).isRequired,rowDirection:b.string};function Tc(r){function i(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}return function(){var n=Me(r),e;if(i()){var t=Me(this).constructor;e=Reflect.construct(n,arguments,t)}else e=n.apply(this,arguments);return fn(this,e)}}var gr=function(r){un(n,r);var i=Tc(n);function n(){return Ht(this,n),i.apply(this,arguments)}return Ut(n,[{key:"render",value:function(){var t=this.props,o=t.children,a=t.connectDropTarget;t.treeId,t.drop;var l=dr(t,["children","connectDropTarget","treeId","drop"]);return a(oe.createElement("div",null,k.Children.map(o,function(s){return k.cloneElement(s,ae({},l))})))}}]),n}(k.Component);gr.defaultProps={canDrop:!1,draggedNode:null};gr.propTypes={children:b.node.isRequired,connectDropTarget:b.func.isRequired,isOver:b.bool.isRequired,canDrop:b.bool,draggedNode:b.shape({}),treeId:b.string.isRequired,drop:b.func.isRequired};function Pc(r){var i=r.treeIndex;return i}function ea(r){return typeof r=="string"?r:r===null||mt(r)!=="object"||!r.props||!r.props.children||typeof r.props.children!="string"&&mt(r.props.children)!=="object"?"":typeof r.props.children=="string"?r.props.children:r.props.children.map(function(i){return ea(i)}).join("")}function Pi(r,i,n,e,t){return typeof n[r]=="function"?String(n[r]({node:n,path:e,treeIndex:t})).indexOf(i)>-1:mt(n[r])==="object"?ea(n[r]).indexOf(i)>-1:n[r]&&String(n[r]).indexOf(i)>-1}function kc(r){var i=r.node,n=r.path,e=r.treeIndex,t=r.searchQuery;return Pi("title",t,i,n,e)||Pi("subtitle",t,i,n,e)}var vr=function(i){var n=[],e=[],t=null;return function(o){var a=Object.keys(o).sort(),l=a.map(function(s){return o[s]});return(l.length!==n.length||l.some(function(s,c){return s!==n[c]})||a.some(function(s,c){return s!==e[c]}))&&(n=l,e=a,t=i(o)),t}},$n=vr(Qo),Oc=vr(xc),zc=vr(ur),Dc=function(){function r(i){Ht(this,r),this.treeRef=i}return Ut(r,[{key:"getTargetDepth",value:function(n,e,t){var o=0,a=n.getPrevRow();if(a){var l=a.path,s=!this.treeRef.canNodeHaveChildren(a.node);s&&(l=l.slice(0,l.length-1)),o=Math.min(l.length,n.path.length)}var c,d=(e.getItem().path||[]).length;if(e.getItem().treeId!==this.treeId)if(d=0,t){var f=cn.findDOMNode(t).getBoundingClientRect(),u=e.getSourceClientOffset().x-f.left;c=Math.round(u/n.scaffoldBlockPxWidth)}else c=n.path.length;else{var p=n.rowDirection==="rtl"?-1:1;c=Math.round(p*e.getDifferenceFromInitialOffset().x/n.scaffoldBlockPxWidth)}var h=Math.min(o,Math.max(0,d+c-1));if(typeof this.maxDepth<"u"&&this.maxDepth!==null){var v=e.getItem().node,y=Zo(v);h=Math.max(0,Math.min(h,this.maxDepth-y-1))}return h}},{key:"canDrop",value:function(n,e){if(!e.isOver())return!1;var t=n.getPrevRow(),o=t?t.path:[],a=t?t.node:{},l=this.getTargetDepth(n,e,null);if(l>=o.length&&typeof a.children=="function")return!1;if(typeof this.customCanDrop=="function"){var s=e.getItem(),c=s.node,d=$n({treeData:this.treeData,newNode:c,depth:l,getNodeKey:this.getNodeKey,minimumTreeIndex:n.listIndex,expandParent:!0});return this.customCanDrop({node:c,prevPath:e.getItem().path,prevParent:e.getItem().parentNode,prevTreeIndex:e.getItem().treeIndex,nextPath:d.path,nextParent:d.parentNode,nextTreeIndex:d.treeIndex})}return!0}},{key:"wrapSource",value:function(n){var e=this,t={beginDrag:function(l){return e.startDrag(l),{node:l.node,parentNode:l.parentNode,path:l.path,treeIndex:l.treeIndex,treeId:l.treeId}},endDrag:function(l,s){e.endDrag(s.getDropResult())},isDragging:function(l,s){var c=s.getItem().node,d=l.node;return d===c}};function o(a,l){return{connectDragSource:a.dragSource(),connectDragPreview:a.dragPreview(),isDragging:l.isDragging(),didDrop:l.didDrop()}}return Va(this.dndType,t,o)(n)}},{key:"wrapTarget",value:function(n){var e=this,t={drop:function(l,s,c){var d={node:s.getItem().node,path:s.getItem().path,treeIndex:s.getItem().treeIndex,treeId:e.treeId,minimumTreeIndex:l.treeIndex,depth:e.getTargetDepth(l,s,c)};return e.drop(d),d},hover:function(l,s,c){var d=e.getTargetDepth(l,s,c),f=s.getItem().node,u=l.node!==f||d!==l.path.length-1;u&&(cancelAnimationFrame(e.rafId),e.rafId=requestAnimationFrame(function(){e.dragHover({node:f,path:s.getItem().path,minimumTreeIndex:l.listIndex,depth:d})}))},canDrop:this.canDrop.bind(this)};function o(a,l){var s=l.getItem();return{connectDropTarget:a.dropTarget(),isOver:l.isOver(),canDrop:l.canDrop(),draggedNode:s?s.node:null}}return Dr(this.dndType,t,o)(n)}},{key:"wrapPlaceholder",value:function(n){var e=this,t={drop:function(l,s){var c=s.getItem(),d=c.node,f=c.path,u=c.treeIndex,p={node:d,path:f,treeIndex:u,treeId:e.treeId,minimumTreeIndex:0,depth:0};return e.drop(p),p}};function o(a,l){var s=l.getItem();return{connectDropTarget:a.dropTarget(),isOver:l.isOver(),canDrop:l.canDrop(),draggedNode:s?s.node:null}}return Dr(this.dndType,t,o)(n)}},{key:"startDrag",get:function(){return this.treeRef.startDrag}},{key:"dragHover",get:function(){return this.treeRef.dragHover}},{key:"endDrag",get:function(){return this.treeRef.endDrag}},{key:"drop",get:function(){return this.treeRef.drop}},{key:"treeId",get:function(){return this.treeRef.treeId}},{key:"dndType",get:function(){return this.treeRef.dndType}},{key:"treeData",get:function(){return this.treeRef.state.draggingTreeData||this.treeRef.props.treeData}},{key:"getNodeKey",get:function(){return this.treeRef.props.getNodeKey}},{key:"customCanDrop",get:function(){return this.treeRef.props.canDrop}},{key:"maxDepth",get:function(){return this.treeRef.props.maxDepth}}]),r}();function Nc(r,i,n){var e=arguments.length>3&&arguments[3]!==void 0?arguments[3]:1,t=[].concat(de(r.slice(0,i)),de(r.slice(i+e)));return[].concat(de(t.slice(0,n)),de(r.slice(i,i+e)),de(t.slice(n)))}function Mc(r){function i(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}return function(){var n=Me(r),e;if(i()){var t=Me(this).constructor;e=Reflect.construct(n,arguments,t)}else e=n.apply(this,arguments);return fn(this,e)}}var ki=1,Rn=function(i){var n=ae(ae({},i),{},{style:ae(ae({},i.theme.style),i.style),innerStyle:ae(ae({},i.theme.innerStyle),i.innerStyle),reactVirtualizedListProps:ae(ae({},i.theme.reactVirtualizedListProps),i.reactVirtualizedListProps)}),e={nodeContentRenderer:fr,placeholderRenderer:hr,rowHeight:62,scaffoldBlockPxWidth:44,slideRegionSize:100,treeNodeRenderer:pr};return Object.keys(e).forEach(function(t){i[t]===null&&(n[t]=typeof i.theme[t]<"u"?i.theme[t]:e[t])}),n},hn=function(r){un(n,r);var i=Mc(n);function n(e){var t;Ht(this,n),t=i.call(this,e);var o=Rn(e),a=o.dndType,l=o.nodeContentRenderer,s=o.treeNodeRenderer,c=o.isVirtualized,d=o.slideRegionSize;return t.dndManager=new Dc(je(t)),t.treeId="rst__".concat(ki),ki+=1,t.dndType=a||t.treeId,t.nodeContentRenderer=t.dndManager.wrapSource(l),t.treePlaceholderRenderer=t.dndManager.wrapPlaceholder(gr),t.treeNodeRenderer=t.dndManager.wrapTarget(s),c&&(t.scrollZoneVirtualList=(en.createScrollingComponent||ns)(Io),t.vStrength=en.createVerticalStrength(d),t.hStrength=en.createHorizontalStrength(d)),t.state={draggingTreeData:null,draggedNode:null,draggedMinimumTreeIndex:null,draggedDepth:null,searchMatches:[],searchFocusTreeIndex:null,dragging:!1,instanceProps:{treeData:[],ignoreOneTreeUpdate:!1,searchQuery:null,searchFocusOffset:null}},t.toggleChildrenVisibility=t.toggleChildrenVisibility.bind(je(t)),t.moveNode=t.moveNode.bind(je(t)),t.startDrag=t.startDrag.bind(je(t)),t.dragHover=t.dragHover.bind(je(t)),t.endDrag=t.endDrag.bind(je(t)),t.drop=t.drop.bind(je(t)),t.handleDndMonitorChange=t.handleDndMonitorChange.bind(je(t)),t}return Ut(n,[{key:"componentDidMount",value:function(){n.loadLazyChildren(this.props,this.state);var t=n.search(this.props,this.state,!0,!0,!1);this.setState(t),this.clearMonitorSubscription=this.props.dragDropManager.getMonitor().subscribeToStateChange(this.handleDndMonitorChange)}},{key:"componentDidUpdate",value:function(t,o){this.state.dragging!==o.dragging&&this.props.onDragStateChanged&&this.props.onDragStateChanged({isDragging:this.state.dragging,draggedNode:this.state.draggedNode})}},{key:"componentWillUnmount",value:function(){this.clearMonitorSubscription()}},{key:"getRows",value:function(t){return Oc({ignoreCollapsed:!0,getNodeKey:this.props.getNodeKey,treeData:t})}},{key:"handleDndMonitorChange",value:function(){var t=this.props.dragDropManager.getMonitor();!t.isDragging()&&this.state.draggingTreeData&&this.endDrag()}},{key:"toggleChildrenVisibility",value:function(t){var o=t.node,a=t.path,l=this.state.instanceProps,s=zt({treeData:l.treeData,path:a,newNode:function(d){var f=d.node;return ae(ae({},f),{},{expanded:!f.expanded})},getNodeKey:this.props.getNodeKey});this.props.onChange(s),this.props.onVisibilityToggle({treeData:s,node:o,expanded:!o.expanded,path:a})}},{key:"moveNode",value:function(t){var o=t.node,a=t.path,l=t.treeIndex,s=t.depth,c=t.minimumTreeIndex,d=Qo({treeData:this.state.draggingTreeData,newNode:o,depth:s,minimumTreeIndex:c,expandParent:!0,getNodeKey:this.props.getNodeKey}),f=d.treeData,u=d.treeIndex,p=d.path,h=d.parentNode;this.props.onChange(f),this.props.onMoveNode({treeData:f,node:o,treeIndex:u,path:p,nextPath:p,nextTreeIndex:u,prevPath:a,prevTreeIndex:l,nextParentNode:h})}},{key:"startDrag",value:function(t){var o=this,a=t.path;this.setState(function(l){var s=bc({treeData:l.instanceProps.treeData,path:a,getNodeKey:o.props.getNodeKey}),c=s.treeData,d=s.node,f=s.treeIndex;return{draggingTreeData:c,draggedNode:d,draggedDepth:a.length-1,draggedMinimumTreeIndex:f,dragging:!0}})}},{key:"dragHover",value:function(t){var o=this,a=t.node,l=t.depth,s=t.minimumTreeIndex;this.state.draggedDepth===l&&this.state.draggedMinimumTreeIndex===s||this.setState(function(c){var d=c.draggingTreeData,f=c.instanceProps,u=d||f.treeData,p=$n({treeData:u,newNode:a,depth:l,minimumTreeIndex:s,expandParent:!0,getNodeKey:o.props.getNodeKey}),h=o.getRows(p.treeData),v=h[p.treeIndex].path;return{draggedNode:a,draggedDepth:l,draggedMinimumTreeIndex:s,draggingTreeData:zt({treeData:u,path:v.slice(0,-1),newNode:function(_){var C=_.node;return ae(ae({},C),{},{expanded:!0})},getNodeKey:o.props.getNodeKey}),searchFocusTreeIndex:null,dragging:!0}})}},{key:"endDrag",value:function(t){var o=this,a=this.state.instanceProps,l=function(){return o.setState({draggingTreeData:null,draggedNode:null,draggedMinimumTreeIndex:null,draggedDepth:null,dragging:!1})};if(!t)l();else if(t.treeId!==this.treeId){var s=t.node,c=t.path,d=t.treeIndex,f=this.props.shouldCopyOnOutsideDrop;typeof f=="function"&&(f=f({node:s,prevTreeIndex:d,prevPath:c}));var u=this.state.draggingTreeData||a.treeData;f&&(u=zt({treeData:a.treeData,path:c,newNode:function(h){var v=h.node;return ae({},v)},getNodeKey:this.props.getNodeKey})),this.props.onChange(u),this.props.onMoveNode({treeData:u,node:s,treeIndex:null,path:null,nextPath:null,nextTreeIndex:null,prevPath:c,prevTreeIndex:d})}}},{key:"drop",value:function(t){this.moveNode(t)}},{key:"canNodeHaveChildren",value:function(t){var o=this.props.canNodeHaveChildren;return o?o(t):!0}},{key:"renderRow",value:function(t,o){var a=o.listIndex,l=o.style,s=o.getPrevRow,c=o.matchKeys,d=o.swapFrom,f=o.swapDepth,u=o.swapLength,p=t.node,h=t.parentNode,v=t.path,y=t.lowerSiblingCounts,_=t.treeIndex,C=Rn(this.props),z=C.canDrag,D=C.generateNodeProps,M=C.scaffoldBlockPxWidth,R=C.searchFocusOffset,I=C.rowDirection,g=this.treeNodeRenderer,w=this.nodeContentRenderer,S=v[v.length-1],O=S in c,j=O&&c[S]===R,U={node:p,parentNode:h,path:v,lowerSiblingCounts:y,treeIndex:_,isSearchMatch:O,isSearchFocus:j},q=D?D(U):{},A=typeof z!="function"?z:z(U),W={treeIndex:_,scaffoldBlockPxWidth:M,node:p,path:v,treeId:this.treeId,rowDirection:I};return oe.createElement(g,Ke({style:l,key:S,listIndex:a,getPrevRow:s,lowerSiblingCounts:y,swapFrom:d,swapLength:u,swapDepth:f},W),oe.createElement(w,Ke({parentNode:h,isSearchMatch:O,isSearchFocus:j,canDrag:A,toggleChildrenVisibility:this.toggleChildrenVisibility},W,q)))}},{key:"render",value:function(){var t=this,o=Rn(this.props),a=o.dragDropManager,l=o.style,s=o.className,c=o.innerStyle,d=o.rowHeight,f=o.isVirtualized,u=o.placeholderRenderer,p=o.reactVirtualizedListProps,h=o.getNodeKey,v=o.rowDirection,y=this.state,_=y.searchMatches,C=y.searchFocusTreeIndex,z=y.draggedNode,D=y.draggedDepth,M=y.draggedMinimumTreeIndex,R=y.instanceProps,I=this.state.draggingTreeData||R.treeData,g=v==="rtl"?"rst__rtl":null,w,S=null,O=null;if(z&&M!==null){var j=$n({treeData:I,newNode:z,depth:D,minimumTreeIndex:M,expandParent:!0,getNodeKey:h}),U=M;S=j.treeIndex,O=1+zc({node:z}),w=Nc(this.getRows(j.treeData),S,U,O)}else w=this.getRows(I);var q={};_.forEach(function(X,Z){var B=X.path;q[B[B.length-1]]=Z});var A=C!==null?{scrollToIndex:C}:{},W=l,H;if(w.length<1){var V=this.treePlaceholderRenderer,K=u;H=oe.createElement(V,{treeId:this.treeId,drop:this.drop},oe.createElement(K,null))}else if(f){W=ae({height:"100%"},W);var J=this.scrollZoneVirtualList;H=oe.createElement(bo,null,function(X){var Z=X.height,B=X.width;return oe.createElement(J,Ke({},A,{dragDropManager:a,verticalStrength:t.vStrength,horizontalStrength:t.hStrength,speed:30,scrollToAlignment:"start",className:"rst__virtualScrollOverride",width:B,onScroll:function(te){var F=te.scrollTop;t.scrollTop=F},height:Z,style:c,rowCount:w.length,estimatedRowSize:typeof d!="function"?d:void 0,rowHeight:typeof d!="function"?d:function(Q){var te=Q.index;return d({index:te,treeIndex:te,node:w[te].node,path:w[te].path})},rowRenderer:function(te){var F=te.index,G=te.style;return t.renderRow(w[F],{listIndex:F,style:G,getPrevRow:function(){return w[F-1]||null},matchKeys:q,swapFrom:S,swapDepth:D,swapLength:O})}},p))})}else H=w.map(function(X,Z){return t.renderRow(X,{listIndex:Z,style:{height:typeof d!="function"?d:d({index:Z,treeIndex:Z,node:X.node,path:X.path})},getPrevRow:function(){return w[Z-1]||null},matchKeys:q,swapFrom:S,swapDepth:D,swapLength:O})});return oe.createElement("div",{className:be("rst__tree",s,g),style:W},H)}}],[{key:"getDerivedStateFromProps",value:function(t,o){var a=o.instanceProps,l={},s=Br(a.treeData,t.treeData);return a.treeData=t.treeData,s?Br(a.searchQuery,t.searchQuery)?a.searchFocusOffset!==t.searchFocusOffset&&Object.assign(l,n.search(t,o,!0,!0,!0)):Object.assign(l,n.search(t,o,!0,!0,!1)):(a.ignoreOneTreeUpdate?a.ignoreOneTreeUpdate=!1:(l.searchFocusTreeIndex=null,n.loadLazyChildren(t,o),Object.assign(l,n.search(t,o,!1,!1,!1))),l.draggingTreeData=null,l.draggedNode=null,l.draggedMinimumTreeIndex=null,l.draggedDepth=null,l.dragging=!1),a.searchQuery=t.searchQuery,a.searchFocusOffset=t.searchFocusOffset,l.instanceProps=ae(ae({},a),l.instanceProps),l}},{key:"search",value:function(t,o,a,l,s){var c=t.onChange,d=t.getNodeKey,f=t.searchFinishCallback,u=t.searchQuery,p=t.searchMethod,h=t.searchFocusOffset,v=t.onlyExpandSearchedNodes,y=o.instanceProps;if(!u&&!p)return f&&f([]),{searchMatches:[]};var _={instanceProps:{}},C=_c({getNodeKey:d,treeData:v?wc({treeData:y.treeData,expanded:!1}):y.treeData,searchQuery:u,searchMethod:p||kc,searchFocusOffset:h,expandAllMatchPaths:l&&!s,expandFocusMatchPaths:!!l}),z=C.treeData,D=C.matches;l&&(_.instanceProps.ignoreOneTreeUpdate=!0,c(z)),f&&f(D);var M=null;return a&&h!==null&&h<D.length&&(M=D[h].treeIndex),_.searchMatches=D,_.searchFocusTreeIndex=M,_}},{key:"loadLazyChildren",value:function(t,o){var a=o.instanceProps;Xo({treeData:a.treeData,getNodeKey:t.getNodeKey,callback:function(s){var c=s.node,d=s.path,f=s.lowerSiblingCounts,u=s.treeIndex;c.children&&typeof c.children=="function"&&(c.expanded||t.loadCollapsedLazyChildren)&&c.children({node:c,path:d,lowerSiblingCounts:f,treeIndex:u,done:function(h){return t.onChange(zt({treeData:a.treeData,path:d,newNode:function(y){var _=y.node;return _===c?ae(ae({},_),{},{children:h}):_},getNodeKey:t.getNodeKey}))}})}})}}]),n}(k.Component);hn.propTypes={dragDropManager:b.shape({getMonitor:b.func}).isRequired,treeData:b.arrayOf(b.object).isRequired,style:b.shape({}),className:b.string,innerStyle:b.shape({}),rowHeight:b.oneOfType([b.number,b.func]),slideRegionSize:b.number,reactVirtualizedListProps:b.shape({}),scaffoldBlockPxWidth:b.number,maxDepth:b.number,searchMethod:b.func,searchQuery:b.any,searchFocusOffset:b.number,searchFinishCallback:b.func,generateNodeProps:b.func,isVirtualized:b.bool,treeNodeRenderer:b.func,nodeContentRenderer:b.func,placeholderRenderer:b.func,theme:b.shape({style:b.shape({}),innerStyle:b.shape({}),reactVirtualizedListProps:b.shape({}),scaffoldBlockPxWidth:b.number,slideRegionSize:b.number,rowHeight:b.oneOfType([b.number,b.func]),treeNodeRenderer:b.func,nodeContentRenderer:b.func,placeholderRenderer:b.func}),getNodeKey:b.func,onChange:b.func.isRequired,onMoveNode:b.func,canDrag:b.oneOfType([b.func,b.bool]),canDrop:b.func,canNodeHaveChildren:b.func,shouldCopyOnOutsideDrop:b.oneOfType([b.func,b.bool]),onVisibilityToggle:b.func,dndType:b.string,onDragStateChanged:b.func,onlyExpandSearchedNodes:b.bool,rowDirection:b.string};hn.defaultProps={canDrag:!0,canDrop:null,canNodeHaveChildren:function(){return!0},className:"",dndType:null,generateNodeProps:null,getNodeKey:Pc,innerStyle:{},isVirtualized:!0,maxDepth:null,treeNodeRenderer:null,nodeContentRenderer:null,onMoveNode:function(){},onVisibilityToggle:function(){},placeholderRenderer:null,reactVirtualizedListProps:{},rowHeight:null,scaffoldBlockPxWidth:null,searchFinishCallback:null,searchFocusOffset:null,searchMethod:null,searchQuery:null,shouldCopyOnOutsideDrop:!1,slideRegionSize:null,style:{},theme:{},onDragStateChanged:function(){},onlyExpandSearchedNodes:!1,rowDirection:"ltr"};yc(hn);var Lc=function(i){return oe.createElement(Ba.Consumer,null,function(n){var e=n.dragDropManager;return e===void 0?null:oe.createElement(hn,Ke({},i,{dragDropManager:e}))})},nn={exports:{}},Oi=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},Bt=(typeof window>"u"?"undefined":Oi(window))==="object"&&(typeof document>"u"?"undefined":Oi(document))==="object"&&document.nodeType===9,Ec={}.constructor;function Hn(r){if(r==null||typeof r!="object")return r;if(Array.isArray(r))return r.map(Hn);if(r.constructor!==Ec)return r;var i={};for(var n in r)i[n]=Hn(r[n]);return i}function mr(r,i,n){r===void 0&&(r="unnamed");var e=n.jss,t=Hn(i),o=e.plugins.onCreateRule(r,t,n);return o||(r[0],null)}var zi=function(i,n){for(var e="",t=0;t<i.length&&i[t]!=="!important";t++)e&&(e+=n),e+=i[t];return e},ot=function(i){if(!Array.isArray(i))return i;var n="";if(Array.isArray(i[0]))for(var e=0;e<i.length&&i[e]!=="!important";e++)n&&(n+=", "),n+=zi(i[e]," ");else n=zi(i,", ");return i[i.length-1]==="!important"&&(n+=" !important"),n};function wt(r){return r&&r.format===!1?{linebreak:"",space:""}:{linebreak:`
21
+ https://fb.me/react-async-component-lifecycle-hooks`)}if(typeof r.getDerivedStateFromProps=="function"&&(i.componentWillMount=Ho,i.componentWillReceiveProps=Uo),typeof i.getSnapshotBeforeUpdate=="function"){if(typeof i.componentDidUpdate!="function")throw new Error("Cannot polyfill getSnapshotBeforeUpdate() for components that do not define componentDidUpdate() on the prototype");i.componentWillUpdate=Bo;var l=i.componentDidUpdate;i.componentDidUpdate=function(c,d,f){var u=this.__reactInternalSnapshotFlag?this.__reactInternalSnapshot:f;l.call(this,c,d,u)}}return r}function Vo(r){var i=r.targetIndex,n=r.node,e=r.currentIndex,t=r.getNodeKey,o=r.path,a=o===void 0?[]:o,l=r.lowerSiblingCounts,s=l===void 0?[]:l,c=r.ignoreCollapsed,d=c===void 0?!0:c,f=r.isPseudoRoot,u=f===void 0?!1:f,p=u?[]:[].concat(de(a),[t({node:n,treeIndex:e})]);if(e===i)return{node:n,lowerSiblingCounts:s,path:p};if(!n.children||d&&n.expanded!==!0)return{nextIndex:e+1};for(var h=e+1,v=n.children.length,y=0;y<v;y+=1){var _=Vo({ignoreCollapsed:d,getNodeKey:t,targetIndex:i,node:n.children[y],currentIndex:h,lowerSiblingCounts:[].concat(de(s),[v-y-1]),path:p});if(_.node)return _;h=_.nextIndex}return{nextIndex:h}}function ur(r){var i=r.node,n=r.ignoreCollapsed,e=n===void 0?!0:n;return Vo({getNodeKey:function(){},ignoreCollapsed:e,node:i,currentIndex:0,targetIndex:-1}).nextIndex-1}function qo(r){var i=r.callback,n=r.getNodeKey,e=r.ignoreCollapsed,t=r.isPseudoRoot,o=t===void 0?!1:t,a=r.node,l=r.parentNode,s=l===void 0?null:l,c=r.currentIndex,d=r.path,f=d===void 0?[]:d,u=r.lowerSiblingCounts,p=u===void 0?[]:u,h=o?[]:[].concat(de(f),[n({node:a,treeIndex:c})]),v=o?null:{node:a,parentNode:s,path:h,lowerSiblingCounts:p,treeIndex:c};if(!o){var y=i(v);if(y===!1)return!1}if(!a.children||a.expanded!==!0&&e&&!o)return c;var _=c,C=a.children.length;if(typeof a.children!="function"){for(var z=0;z<C;z+=1)if(_=qo({callback:i,getNodeKey:n,ignoreCollapsed:e,node:a.children[z],parentNode:o?null:a,currentIndex:_+1,lowerSiblingCounts:[].concat(de(p),[C-z-1]),path:h}),_===!1)return!1}return _}function Ko(r){var i=r.callback,n=r.getNodeKey,e=r.ignoreCollapsed,t=r.isPseudoRoot,o=t===void 0?!1:t,a=r.node,l=r.parentNode,s=l===void 0?null:l,c=r.currentIndex,d=r.path,f=d===void 0?[]:d,u=r.lowerSiblingCounts,p=u===void 0?[]:u,h=ae({},a),v=o?[]:[].concat(de(f),[n({node:h,treeIndex:c})]),y={node:h,parentNode:s,path:v,lowerSiblingCounts:p,treeIndex:c};if(!h.children||h.expanded!==!0&&e&&!o)return{treeIndex:c,node:i(y)};var _=c,C=h.children.length;return typeof h.children!="function"&&(h.children=h.children.map(function(z,D){var L=Ko({callback:i,getNodeKey:n,ignoreCollapsed:e,node:z,parentNode:o?null:h,currentIndex:_+1,lowerSiblingCounts:[].concat(de(p),[C-D-1]),path:v});return _=L.treeIndex,L.node})),{node:i(y),treeIndex:_}}function Xo(r){var i=r.treeData,n=r.getNodeKey,e=r.callback,t=r.ignoreCollapsed,o=t===void 0?!0:t;!i||i.length<1||qo({callback:e,getNodeKey:n,ignoreCollapsed:o,isPseudoRoot:!0,node:{children:i},currentIndex:-1,path:[],lowerSiblingCounts:[]})}function Cc(r){var i=r.treeData,n=r.getNodeKey,e=r.callback,t=r.ignoreCollapsed,o=t;return!i||i.length<1?[]:Ko({callback:e,getNodeKey:n,ignoreCollapsed:o,isPseudoRoot:!0,node:{children:i},currentIndex:-1,path:[],lowerSiblingCounts:[]}).node.children}function wc(r){var i=r.treeData,n=r.expanded,e=n===void 0?!0:n;return Cc({treeData:i,callback:function(o){var a=o.node;return ae(ae({},a),{},{expanded:e})},getNodeKey:function(o){var a=o.treeIndex;return a},ignoreCollapsed:!1})}function zt(r){var i=r.treeData,n=r.path,e=r.newNode,t=r.getNodeKey,o=r.ignoreCollapsed,a=o===void 0?!0:o,l="RESULT_MISS",s=function d(f){var u=f.isPseudoRoot,p=u===void 0?!1:u,h=f.node,v=f.currentTreeIndex,y=f.pathIndex;if(!p&&t({node:h,treeIndex:v})!==n[y])return l;if(y>=n.length-1)return typeof e=="function"?e({node:h,treeIndex:v}):e;if(!h.children)throw new Error("Path referenced children of node with no children.");for(var _=v+1,C=0;C<h.children.length;C+=1){var z=d({node:h.children[C],currentTreeIndex:_,pathIndex:y+1});if(z!==l)return z?ae(ae({},h),{},{children:[].concat(de(h.children.slice(0,C)),[z],de(h.children.slice(C+1)))}):ae(ae({},h),{},{children:[].concat(de(h.children.slice(0,C)),de(h.children.slice(C+1)))});_+=1+ur({node:h.children[C],ignoreCollapsed:a})}return l},c=s({node:{children:i},currentTreeIndex:-1,pathIndex:-1,isPseudoRoot:!0});if(c===l)throw new Error("No node found at the given path.");return c.children}function bc(r){var i=r.treeData,n=r.path,e=r.getNodeKey,t=r.ignoreCollapsed,o=t===void 0?!0:t,a=null,l=null,s=zt({treeData:i,path:n,getNodeKey:e,ignoreCollapsed:o,newNode:function(d){var f=d.node,u=d.treeIndex;return a=f,l=u,null}});return{treeData:s,node:a,treeIndex:l}}function Yo(r){var i=r.targetDepth,n=r.minimumTreeIndex,e=r.newNode,t=r.ignoreCollapsed,o=r.expandParent,a=r.isPseudoRoot,l=a===void 0?!1:a,s=r.isLastChild,c=r.node,d=r.currentIndex,f=r.currentDepth,u=r.getNodeKey,p=r.path,h=p===void 0?[]:p,v=function(A){return l?[]:[].concat(de(h),[u({node:A,treeIndex:d})])};if(d>=n-1||s&&!(c.children&&c.children.length)){if(typeof c.children=="function")throw new Error("Cannot add to children defined by a function");var y=o?{expanded:!0}:{},_=ae(ae(ae({},c),y),{},{children:c.children?[e].concat(de(c.children)):[e]});return{node:_,nextIndex:d+2,insertedTreeIndex:d+1,parentPath:v(_),parentNode:l?null:_}}if(f>=i-1){if(!c.children||typeof c.children=="function"||c.expanded!==!0&&t&&!l)return{node:c,nextIndex:d+1};for(var C=d+1,z=null,D=null,L=0;L<c.children.length;L+=1){if(C>=n){z=C,D=L;break}C+=1+ur({node:c.children[L],ignoreCollapsed:t})}if(D===null){if(C<n&&!s)return{node:c,nextIndex:C};z=C,D=c.children.length}var R=ae(ae({},c),{},{children:[].concat(de(c.children.slice(0,D)),[e],de(c.children.slice(D)))});return{node:R,nextIndex:C,insertedTreeIndex:z,parentPath:v(R),parentNode:l?null:R}}if(!c.children||typeof c.children=="function"||c.expanded!==!0&&t&&!l)return{node:c,nextIndex:d+1};var I=null,g=null,w=null,S=d+1,O=c.children;typeof O!="function"&&(O=O.map(function(q,A){if(I!==null)return q;var W=Yo({targetDepth:i,minimumTreeIndex:n,newNode:e,ignoreCollapsed:t,expandParent:o,isLastChild:s&&A===O.length-1,node:q,currentIndex:S,currentDepth:f+1,getNodeKey:u,path:[]});return"insertedTreeIndex"in W&&(I=W.insertedTreeIndex,w=W.parentNode,g=W.parentPath),S=W.nextIndex,W.node}));var j=ae(ae({},c),{},{children:O}),U={node:j,nextIndex:S};return I!==null&&(U.insertedTreeIndex=I,U.parentPath=[].concat(de(v(j)),de(g)),U.parentNode=w),U}function Qo(r){var i=r.treeData,n=r.depth,e=r.minimumTreeIndex,t=r.newNode,o=r.getNodeKey,a=o===void 0?function(){}:o,l=r.ignoreCollapsed,s=l===void 0?!0:l,c=r.expandParent,d=c===void 0?!1:c;if(!i&&n===0)return{treeData:[t],treeIndex:0,path:[a({node:t,treeIndex:0})],parentNode:null};var f=Yo({targetDepth:n,minimumTreeIndex:e,newNode:t,ignoreCollapsed:s,expandParent:d,getNodeKey:a,isPseudoRoot:!0,isLastChild:!0,node:{children:i},currentIndex:-1,currentDepth:-1});if(!("insertedTreeIndex"in f))throw new Error("No suitable position found to insert.");var u=f.insertedTreeIndex;return{treeData:f.node.children,treeIndex:u,path:[].concat(de(f.parentPath),[a({node:t,treeIndex:u})]),parentNode:f.parentNode}}function xc(r){var i=r.treeData,n=r.getNodeKey,e=r.ignoreCollapsed,t=e===void 0?!0:e;if(!i||i.length<1)return[];var o=[];return Xo({treeData:i,getNodeKey:n,ignoreCollapsed:t,callback:function(l){o.push(l)}}),o}function Jo(r,i){return!!r.children&&typeof r.children!="function"&&r.children.some(function(n){return n===i||Jo(n,i)})}function Zo(r){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return r.children?typeof r.children=="function"?i+1:r.children.reduce(function(n,e){return Math.max(n,Zo(e,i+1))},i):i}function _c(r){var i=r.getNodeKey,n=r.treeData,e=r.searchQuery,t=r.searchMethod,o=r.searchFocusOffset,a=r.expandAllMatchPaths,l=a===void 0?!1:a,s=r.expandFocusMatchPaths,c=s===void 0?!0:s,d=0,f=function p(h){var v=h.isPseudoRoot,y=v===void 0?!1:v,_=h.node,C=h.currentIndex,z=h.path,D=z===void 0?[]:z,L=[],R=!1,I=!1,g=y?[]:[].concat(de(D),[i({node:_,treeIndex:C})]),w=y?null:{path:g,treeIndex:C},S=_.children&&typeof _.children!="function"&&_.children.length>0;!y&&t(ae(ae({},w),{},{node:_,searchQuery:e}))&&(d===o&&(I=!0),d+=1,R=!0);var O=C,j=ae({},_);return S&&(j.children=j.children.map(function(U){var q=p({node:U,currentIndex:O+1,path:g});return q.node.expanded?O=q.treeIndex:O+=1,(q.matches.length>0||q.hasFocusMatch)&&(L=[].concat(de(L),de(q.matches)),q.hasFocusMatch&&(I=!0),(l&&q.matches.length>0||(l||c)&&q.hasFocusMatch)&&(j.expanded=!0)),q.node})),!y&&!j.expanded&&(L=L.map(function(U){return ae(ae({},U),{},{treeIndex:null})})),R&&(L=[ae(ae({},w),{},{node:j})].concat(de(L))),{node:L.length>0?j:_,matches:L,hasFocusMatch:I,treeIndex:O}},u=f({node:{children:n},isPseudoRoot:!0,currentIndex:-1});return{matches:u.matches,treeData:u.node.children}}function be(){for(var r=arguments.length,i=new Array(r),n=0;n<r;n++)i[n]=arguments[n];return i.filter(Boolean).join(" ")}function Rc(r){function i(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}return function(){var n=Me(r),e;if(i()){var t=Me(this).constructor;e=Reflect.construct(n,arguments,t)}else e=n.apply(this,arguments);return fn(this,e)}}var fr=function(r){un(n,r);var i=Rc(n);function n(){return Ht(this,n),i.apply(this,arguments)}return Ut(n,[{key:"render",value:function(){var t=this.props,o=t.scaffoldBlockPxWidth,a=t.toggleChildrenVisibility,l=t.connectDragPreview,s=t.connectDragSource,c=t.isDragging,d=t.canDrop,f=t.canDrag,u=t.node,p=t.title,h=t.subtitle,v=t.draggedNode,y=t.path,_=t.treeIndex,C=t.isSearchMatch,z=t.isSearchFocus,D=t.buttons,L=t.className,R=t.style,I=t.didDrop;t.treeId,t.isOver,t.parentNode;var g=t.rowDirection,w=dr(t,["scaffoldBlockPxWidth","toggleChildrenVisibility","connectDragPreview","connectDragSource","isDragging","canDrop","canDrag","node","title","subtitle","draggedNode","path","treeIndex","isSearchMatch","isSearchFocus","buttons","className","style","didDrop","treeId","isOver","parentNode","rowDirection"]),S=p||u.title,O=h||u.subtitle,j=g==="rtl"?"rst__rtl":null,U;f&&(typeof u.children=="function"&&u.expanded?U=oe.createElement("div",{className:"rst__loadingHandle"},oe.createElement("div",{className:"rst__loadingCircle"},de(new Array(12)).map(function(H,V){return oe.createElement("div",{key:V,className:be("rst__loadingCirclePoint",j)})}))):U=s(oe.createElement("div",{className:"rst__moveHandle"}),{dropEffect:"copy"}));var q=v&&Jo(v,u),A=!I&&c,W={left:-.5*o};return g==="rtl"&&(W={right:-.5*o}),oe.createElement("div",Xe({style:{height:"100%"}},w),a&&u.children&&(u.children.length>0||typeof u.children=="function")&&oe.createElement("div",null,oe.createElement("button",{type:"button","aria-label":u.expanded?"Collapse":"Expand",className:be(u.expanded?"rst__collapseButton":"rst__expandButton",j),style:W,onClick:function(){return a({node:u,path:y,treeIndex:_})}}),u.expanded&&!c&&oe.createElement("div",{style:{width:o},className:be("rst__lineChildren",j)})),oe.createElement("div",{className:be("rst__rowWrapper",j)},l(oe.createElement("div",{className:be("rst__row",A&&"rst__rowLandingPad",A&&!d&&"rst__rowCancelPad",C&&"rst__rowSearchMatch",z&&"rst__rowSearchFocus",j,L),style:ae({opacity:q?.5:1},R)},U,oe.createElement("div",{className:be("rst__rowContents",!f&&"rst__rowContentsDragDisabled",j)},oe.createElement("div",{className:be("rst__rowLabel",j)},oe.createElement("span",{className:be("rst__rowTitle",u.subtitle&&"rst__rowTitleWithSubtitle")},typeof S=="function"?S({node:u,path:y,treeIndex:_}):S),O&&oe.createElement("span",{className:"rst__rowSubtitle"},typeof O=="function"?O({node:u,path:y,treeIndex:_}):O)),oe.createElement("div",{className:"rst__rowToolbar"},D.map(function(H,V){return oe.createElement("div",{key:V,className:"rst__toolbarButton"},H)})))))))}}]),n}(k.Component);fr.defaultProps={isSearchMatch:!1,isSearchFocus:!1,canDrag:!1,toggleChildrenVisibility:null,buttons:[],className:"",style:{},parentNode:null,draggedNode:null,canDrop:!1,title:null,subtitle:null,rowDirection:"ltr"};fr.propTypes={node:b.shape({}).isRequired,title:b.oneOfType([b.func,b.node]),subtitle:b.oneOfType([b.func,b.node]),path:b.arrayOf(b.oneOfType([b.string,b.number])).isRequired,treeIndex:b.number.isRequired,treeId:b.string.isRequired,isSearchMatch:b.bool,isSearchFocus:b.bool,canDrag:b.bool,scaffoldBlockPxWidth:b.number.isRequired,toggleChildrenVisibility:b.func,buttons:b.arrayOf(b.node),className:b.string,style:b.shape({}),connectDragPreview:b.func.isRequired,connectDragSource:b.func.isRequired,parentNode:b.shape({}),isDragging:b.bool.isRequired,didDrop:b.bool.isRequired,draggedNode:b.shape({}),isOver:b.bool.isRequired,canDrop:b.bool,rowDirection:b.string};var hr=function(i){var n=i.isOver,e=i.canDrop;return oe.createElement("div",{className:be("rst__placeholder",e&&"rst__placeholderLandingPad",e&&!n&&"rst__placeholderCancelPad")})};hr.defaultProps={isOver:!1,canDrop:!1};hr.propTypes={isOver:b.bool,canDrop:b.bool};function Ic(r){function i(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}return function(){var n=Me(r),e;if(i()){var t=Me(this).constructor;e=Reflect.construct(n,arguments,t)}else e=n.apply(this,arguments);return fn(this,e)}}var pr=function(r){un(n,r);var i=Ic(n);function n(){return Ht(this,n),i.apply(this,arguments)}return Ut(n,[{key:"render",value:function(){var t=this.props,o=t.children,a=t.listIndex,l=t.swapFrom,s=t.swapLength,c=t.swapDepth,d=t.scaffoldBlockPxWidth,f=t.lowerSiblingCounts,u=t.connectDropTarget,p=t.isOver,h=t.draggedNode,v=t.canDrop,y=t.treeIndex;t.treeId,t.getPrevRow,t.node,t.path;var _=t.rowDirection,C=dr(t,["children","listIndex","swapFrom","swapLength","swapDepth","scaffoldBlockPxWidth","lowerSiblingCounts","connectDropTarget","isOver","draggedNode","canDrop","treeIndex","treeId","getPrevRow","node","path","rowDirection"]),z=_==="rtl"?"rst__rtl":null,D=f.length,L=[];f.forEach(function(I,g){var w="";if(I>0?a===0?w="rst__lineHalfHorizontalRight rst__lineHalfVerticalBottom":g===D-1?w="rst__lineHalfHorizontalRight rst__lineFullVertical":w="rst__lineFullVertical":a===0?w="rst__lineHalfHorizontalRight":g===D-1&&(w="rst__lineHalfVerticalTop rst__lineHalfHorizontalRight"),L.push(oe.createElement("div",{key:"pre_".concat(1+g),style:{width:d},className:be("rst__lineBlock",w,z)})),y!==a&&g===c){var S="";a===l+s-1?S="rst__highlightBottomLeftCorner":y===l?S="rst__highlightTopLeftCorner":S="rst__highlightLineVertical";var O;_==="rtl"?O={width:d,right:d*g}:O={width:d,left:d*g},L.push(oe.createElement("div",{key:g,style:O,className:be("rst__absoluteLineBlock",S,z)}))}});var R;return _==="rtl"?R={right:d*D}:R={left:d*D},u(oe.createElement("div",Xe({},C,{className:be("rst__node",z)}),L,oe.createElement("div",{className:"rst__nodeContent",style:R},k.Children.map(o,function(I){return k.cloneElement(I,{isOver:p,canDrop:v,draggedNode:h})}))))}}]),n}(k.Component);pr.defaultProps={swapFrom:null,swapDepth:null,swapLength:null,canDrop:!1,draggedNode:null,rowDirection:"ltr"};pr.propTypes={treeIndex:b.number.isRequired,treeId:b.string.isRequired,swapFrom:b.number,swapDepth:b.number,swapLength:b.number,scaffoldBlockPxWidth:b.number.isRequired,lowerSiblingCounts:b.arrayOf(b.number).isRequired,listIndex:b.number.isRequired,children:b.node.isRequired,connectDropTarget:b.func.isRequired,isOver:b.bool.isRequired,canDrop:b.bool,draggedNode:b.shape({}),getPrevRow:b.func.isRequired,node:b.shape({}).isRequired,path:b.arrayOf(b.oneOfType([b.string,b.number])).isRequired,rowDirection:b.string};function Tc(r){function i(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}return function(){var n=Me(r),e;if(i()){var t=Me(this).constructor;e=Reflect.construct(n,arguments,t)}else e=n.apply(this,arguments);return fn(this,e)}}var gr=function(r){un(n,r);var i=Tc(n);function n(){return Ht(this,n),i.apply(this,arguments)}return Ut(n,[{key:"render",value:function(){var t=this.props,o=t.children,a=t.connectDropTarget;t.treeId,t.drop;var l=dr(t,["children","connectDropTarget","treeId","drop"]);return a(oe.createElement("div",null,k.Children.map(o,function(s){return k.cloneElement(s,ae({},l))})))}}]),n}(k.Component);gr.defaultProps={canDrop:!1,draggedNode:null};gr.propTypes={children:b.node.isRequired,connectDropTarget:b.func.isRequired,isOver:b.bool.isRequired,canDrop:b.bool,draggedNode:b.shape({}),treeId:b.string.isRequired,drop:b.func.isRequired};function Pc(r){var i=r.treeIndex;return i}function ea(r){return typeof r=="string"?r:r===null||mt(r)!=="object"||!r.props||!r.props.children||typeof r.props.children!="string"&&mt(r.props.children)!=="object"?"":typeof r.props.children=="string"?r.props.children:r.props.children.map(function(i){return ea(i)}).join("")}function Pi(r,i,n,e,t){return typeof n[r]=="function"?String(n[r]({node:n,path:e,treeIndex:t})).indexOf(i)>-1:mt(n[r])==="object"?ea(n[r]).indexOf(i)>-1:n[r]&&String(n[r]).indexOf(i)>-1}function kc(r){var i=r.node,n=r.path,e=r.treeIndex,t=r.searchQuery;return Pi("title",t,i,n,e)||Pi("subtitle",t,i,n,e)}var vr=function(i){var n=[],e=[],t=null;return function(o){var a=Object.keys(o).sort(),l=a.map(function(s){return o[s]});return(l.length!==n.length||l.some(function(s,c){return s!==n[c]})||a.some(function(s,c){return s!==e[c]}))&&(n=l,e=a,t=i(o)),t}},$n=vr(Qo),Oc=vr(xc),zc=vr(ur),Dc=function(){function r(i){Ht(this,r),this.treeRef=i}return Ut(r,[{key:"getTargetDepth",value:function(n,e,t){var o=0,a=n.getPrevRow();if(a){var l=a.path,s=!this.treeRef.canNodeHaveChildren(a.node);s&&(l=l.slice(0,l.length-1)),o=Math.min(l.length,n.path.length)}var c,d=(e.getItem().path||[]).length;if(e.getItem().treeId!==this.treeId)if(d=0,t){var f=cn.findDOMNode(t).getBoundingClientRect(),u=e.getSourceClientOffset().x-f.left;c=Math.round(u/n.scaffoldBlockPxWidth)}else c=n.path.length;else{var p=n.rowDirection==="rtl"?-1:1;c=Math.round(p*e.getDifferenceFromInitialOffset().x/n.scaffoldBlockPxWidth)}var h=Math.min(o,Math.max(0,d+c-1));if(typeof this.maxDepth<"u"&&this.maxDepth!==null){var v=e.getItem().node,y=Zo(v);h=Math.max(0,Math.min(h,this.maxDepth-y-1))}return h}},{key:"canDrop",value:function(n,e){if(!e.isOver())return!1;var t=n.getPrevRow(),o=t?t.path:[],a=t?t.node:{},l=this.getTargetDepth(n,e,null);if(l>=o.length&&typeof a.children=="function")return!1;if(typeof this.customCanDrop=="function"){var s=e.getItem(),c=s.node,d=$n({treeData:this.treeData,newNode:c,depth:l,getNodeKey:this.getNodeKey,minimumTreeIndex:n.listIndex,expandParent:!0});return this.customCanDrop({node:c,prevPath:e.getItem().path,prevParent:e.getItem().parentNode,prevTreeIndex:e.getItem().treeIndex,nextPath:d.path,nextParent:d.parentNode,nextTreeIndex:d.treeIndex})}return!0}},{key:"wrapSource",value:function(n){var e=this,t={beginDrag:function(l){return e.startDrag(l),{node:l.node,parentNode:l.parentNode,path:l.path,treeIndex:l.treeIndex,treeId:l.treeId}},endDrag:function(l,s){e.endDrag(s.getDropResult())},isDragging:function(l,s){var c=s.getItem().node,d=l.node;return d===c}};function o(a,l){return{connectDragSource:a.dragSource(),connectDragPreview:a.dragPreview(),isDragging:l.isDragging(),didDrop:l.didDrop()}}return Va(this.dndType,t,o)(n)}},{key:"wrapTarget",value:function(n){var e=this,t={drop:function(l,s,c){var d={node:s.getItem().node,path:s.getItem().path,treeIndex:s.getItem().treeIndex,treeId:e.treeId,minimumTreeIndex:l.treeIndex,depth:e.getTargetDepth(l,s,c)};return e.drop(d),d},hover:function(l,s,c){var d=e.getTargetDepth(l,s,c),f=s.getItem().node,u=l.node!==f||d!==l.path.length-1;u&&(cancelAnimationFrame(e.rafId),e.rafId=requestAnimationFrame(function(){e.dragHover({node:f,path:s.getItem().path,minimumTreeIndex:l.listIndex,depth:d})}))},canDrop:this.canDrop.bind(this)};function o(a,l){var s=l.getItem();return{connectDropTarget:a.dropTarget(),isOver:l.isOver(),canDrop:l.canDrop(),draggedNode:s?s.node:null}}return Dr(this.dndType,t,o)(n)}},{key:"wrapPlaceholder",value:function(n){var e=this,t={drop:function(l,s){var c=s.getItem(),d=c.node,f=c.path,u=c.treeIndex,p={node:d,path:f,treeIndex:u,treeId:e.treeId,minimumTreeIndex:0,depth:0};return e.drop(p),p}};function o(a,l){var s=l.getItem();return{connectDropTarget:a.dropTarget(),isOver:l.isOver(),canDrop:l.canDrop(),draggedNode:s?s.node:null}}return Dr(this.dndType,t,o)(n)}},{key:"startDrag",get:function(){return this.treeRef.startDrag}},{key:"dragHover",get:function(){return this.treeRef.dragHover}},{key:"endDrag",get:function(){return this.treeRef.endDrag}},{key:"drop",get:function(){return this.treeRef.drop}},{key:"treeId",get:function(){return this.treeRef.treeId}},{key:"dndType",get:function(){return this.treeRef.dndType}},{key:"treeData",get:function(){return this.treeRef.state.draggingTreeData||this.treeRef.props.treeData}},{key:"getNodeKey",get:function(){return this.treeRef.props.getNodeKey}},{key:"customCanDrop",get:function(){return this.treeRef.props.canDrop}},{key:"maxDepth",get:function(){return this.treeRef.props.maxDepth}}]),r}();function Nc(r,i,n){var e=arguments.length>3&&arguments[3]!==void 0?arguments[3]:1,t=[].concat(de(r.slice(0,i)),de(r.slice(i+e)));return[].concat(de(t.slice(0,n)),de(r.slice(i,i+e)),de(t.slice(n)))}function Lc(r){function i(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}return function(){var n=Me(r),e;if(i()){var t=Me(this).constructor;e=Reflect.construct(n,arguments,t)}else e=n.apply(this,arguments);return fn(this,e)}}var ki=1,Rn=function(i){var n=ae(ae({},i),{},{style:ae(ae({},i.theme.style),i.style),innerStyle:ae(ae({},i.theme.innerStyle),i.innerStyle),reactVirtualizedListProps:ae(ae({},i.theme.reactVirtualizedListProps),i.reactVirtualizedListProps)}),e={nodeContentRenderer:fr,placeholderRenderer:hr,rowHeight:62,scaffoldBlockPxWidth:44,slideRegionSize:100,treeNodeRenderer:pr};return Object.keys(e).forEach(function(t){i[t]===null&&(n[t]=typeof i.theme[t]<"u"?i.theme[t]:e[t])}),n},hn=function(r){un(n,r);var i=Lc(n);function n(e){var t;Ht(this,n),t=i.call(this,e);var o=Rn(e),a=o.dndType,l=o.nodeContentRenderer,s=o.treeNodeRenderer,c=o.isVirtualized,d=o.slideRegionSize;return t.dndManager=new Dc(Fe(t)),t.treeId="rst__".concat(ki),ki+=1,t.dndType=a||t.treeId,t.nodeContentRenderer=t.dndManager.wrapSource(l),t.treePlaceholderRenderer=t.dndManager.wrapPlaceholder(gr),t.treeNodeRenderer=t.dndManager.wrapTarget(s),c&&(t.scrollZoneVirtualList=(en.createScrollingComponent||ns)(Io),t.vStrength=en.createVerticalStrength(d),t.hStrength=en.createHorizontalStrength(d)),t.state={draggingTreeData:null,draggedNode:null,draggedMinimumTreeIndex:null,draggedDepth:null,searchMatches:[],searchFocusTreeIndex:null,dragging:!1,instanceProps:{treeData:[],ignoreOneTreeUpdate:!1,searchQuery:null,searchFocusOffset:null}},t.toggleChildrenVisibility=t.toggleChildrenVisibility.bind(Fe(t)),t.moveNode=t.moveNode.bind(Fe(t)),t.startDrag=t.startDrag.bind(Fe(t)),t.dragHover=t.dragHover.bind(Fe(t)),t.endDrag=t.endDrag.bind(Fe(t)),t.drop=t.drop.bind(Fe(t)),t.handleDndMonitorChange=t.handleDndMonitorChange.bind(Fe(t)),t}return Ut(n,[{key:"componentDidMount",value:function(){n.loadLazyChildren(this.props,this.state);var t=n.search(this.props,this.state,!0,!0,!1);this.setState(t),this.clearMonitorSubscription=this.props.dragDropManager.getMonitor().subscribeToStateChange(this.handleDndMonitorChange)}},{key:"componentDidUpdate",value:function(t,o){this.state.dragging!==o.dragging&&this.props.onDragStateChanged&&this.props.onDragStateChanged({isDragging:this.state.dragging,draggedNode:this.state.draggedNode})}},{key:"componentWillUnmount",value:function(){this.clearMonitorSubscription()}},{key:"getRows",value:function(t){return Oc({ignoreCollapsed:!0,getNodeKey:this.props.getNodeKey,treeData:t})}},{key:"handleDndMonitorChange",value:function(){var t=this.props.dragDropManager.getMonitor();!t.isDragging()&&this.state.draggingTreeData&&this.endDrag()}},{key:"toggleChildrenVisibility",value:function(t){var o=t.node,a=t.path,l=this.state.instanceProps,s=zt({treeData:l.treeData,path:a,newNode:function(d){var f=d.node;return ae(ae({},f),{},{expanded:!f.expanded})},getNodeKey:this.props.getNodeKey});this.props.onChange(s),this.props.onVisibilityToggle({treeData:s,node:o,expanded:!o.expanded,path:a})}},{key:"moveNode",value:function(t){var o=t.node,a=t.path,l=t.treeIndex,s=t.depth,c=t.minimumTreeIndex,d=Qo({treeData:this.state.draggingTreeData,newNode:o,depth:s,minimumTreeIndex:c,expandParent:!0,getNodeKey:this.props.getNodeKey}),f=d.treeData,u=d.treeIndex,p=d.path,h=d.parentNode;this.props.onChange(f),this.props.onMoveNode({treeData:f,node:o,treeIndex:u,path:p,nextPath:p,nextTreeIndex:u,prevPath:a,prevTreeIndex:l,nextParentNode:h})}},{key:"startDrag",value:function(t){var o=this,a=t.path;this.setState(function(l){var s=bc({treeData:l.instanceProps.treeData,path:a,getNodeKey:o.props.getNodeKey}),c=s.treeData,d=s.node,f=s.treeIndex;return{draggingTreeData:c,draggedNode:d,draggedDepth:a.length-1,draggedMinimumTreeIndex:f,dragging:!0}})}},{key:"dragHover",value:function(t){var o=this,a=t.node,l=t.depth,s=t.minimumTreeIndex;this.state.draggedDepth===l&&this.state.draggedMinimumTreeIndex===s||this.setState(function(c){var d=c.draggingTreeData,f=c.instanceProps,u=d||f.treeData,p=$n({treeData:u,newNode:a,depth:l,minimumTreeIndex:s,expandParent:!0,getNodeKey:o.props.getNodeKey}),h=o.getRows(p.treeData),v=h[p.treeIndex].path;return{draggedNode:a,draggedDepth:l,draggedMinimumTreeIndex:s,draggingTreeData:zt({treeData:u,path:v.slice(0,-1),newNode:function(_){var C=_.node;return ae(ae({},C),{},{expanded:!0})},getNodeKey:o.props.getNodeKey}),searchFocusTreeIndex:null,dragging:!0}})}},{key:"endDrag",value:function(t){var o=this,a=this.state.instanceProps,l=function(){return o.setState({draggingTreeData:null,draggedNode:null,draggedMinimumTreeIndex:null,draggedDepth:null,dragging:!1})};if(!t)l();else if(t.treeId!==this.treeId){var s=t.node,c=t.path,d=t.treeIndex,f=this.props.shouldCopyOnOutsideDrop;typeof f=="function"&&(f=f({node:s,prevTreeIndex:d,prevPath:c}));var u=this.state.draggingTreeData||a.treeData;f&&(u=zt({treeData:a.treeData,path:c,newNode:function(h){var v=h.node;return ae({},v)},getNodeKey:this.props.getNodeKey})),this.props.onChange(u),this.props.onMoveNode({treeData:u,node:s,treeIndex:null,path:null,nextPath:null,nextTreeIndex:null,prevPath:c,prevTreeIndex:d})}}},{key:"drop",value:function(t){this.moveNode(t)}},{key:"canNodeHaveChildren",value:function(t){var o=this.props.canNodeHaveChildren;return o?o(t):!0}},{key:"renderRow",value:function(t,o){var a=o.listIndex,l=o.style,s=o.getPrevRow,c=o.matchKeys,d=o.swapFrom,f=o.swapDepth,u=o.swapLength,p=t.node,h=t.parentNode,v=t.path,y=t.lowerSiblingCounts,_=t.treeIndex,C=Rn(this.props),z=C.canDrag,D=C.generateNodeProps,L=C.scaffoldBlockPxWidth,R=C.searchFocusOffset,I=C.rowDirection,g=this.treeNodeRenderer,w=this.nodeContentRenderer,S=v[v.length-1],O=S in c,j=O&&c[S]===R,U={node:p,parentNode:h,path:v,lowerSiblingCounts:y,treeIndex:_,isSearchMatch:O,isSearchFocus:j},q=D?D(U):{},A=typeof z!="function"?z:z(U),W={treeIndex:_,scaffoldBlockPxWidth:L,node:p,path:v,treeId:this.treeId,rowDirection:I};return oe.createElement(g,Xe({style:l,key:S,listIndex:a,getPrevRow:s,lowerSiblingCounts:y,swapFrom:d,swapLength:u,swapDepth:f},W),oe.createElement(w,Xe({parentNode:h,isSearchMatch:O,isSearchFocus:j,canDrag:A,toggleChildrenVisibility:this.toggleChildrenVisibility},W,q)))}},{key:"render",value:function(){var t=this,o=Rn(this.props),a=o.dragDropManager,l=o.style,s=o.className,c=o.innerStyle,d=o.rowHeight,f=o.isVirtualized,u=o.placeholderRenderer,p=o.reactVirtualizedListProps,h=o.getNodeKey,v=o.rowDirection,y=this.state,_=y.searchMatches,C=y.searchFocusTreeIndex,z=y.draggedNode,D=y.draggedDepth,L=y.draggedMinimumTreeIndex,R=y.instanceProps,I=this.state.draggingTreeData||R.treeData,g=v==="rtl"?"rst__rtl":null,w,S=null,O=null;if(z&&L!==null){var j=$n({treeData:I,newNode:z,depth:D,minimumTreeIndex:L,expandParent:!0,getNodeKey:h}),U=L;S=j.treeIndex,O=1+zc({node:z}),w=Nc(this.getRows(j.treeData),S,U,O)}else w=this.getRows(I);var q={};_.forEach(function(X,Z){var B=X.path;q[B[B.length-1]]=Z});var A=C!==null?{scrollToIndex:C}:{},W=l,H;if(w.length<1){var V=this.treePlaceholderRenderer,K=u;H=oe.createElement(V,{treeId:this.treeId,drop:this.drop},oe.createElement(K,null))}else if(f){W=ae({height:"100%"},W);var J=this.scrollZoneVirtualList;H=oe.createElement(bo,null,function(X){var Z=X.height,B=X.width;return oe.createElement(J,Xe({},A,{dragDropManager:a,verticalStrength:t.vStrength,horizontalStrength:t.hStrength,speed:30,scrollToAlignment:"start",className:"rst__virtualScrollOverride",width:B,onScroll:function(te){var F=te.scrollTop;t.scrollTop=F},height:Z,style:c,rowCount:w.length,estimatedRowSize:typeof d!="function"?d:void 0,rowHeight:typeof d!="function"?d:function(Q){var te=Q.index;return d({index:te,treeIndex:te,node:w[te].node,path:w[te].path})},rowRenderer:function(te){var F=te.index,G=te.style;return t.renderRow(w[F],{listIndex:F,style:G,getPrevRow:function(){return w[F-1]||null},matchKeys:q,swapFrom:S,swapDepth:D,swapLength:O})}},p))})}else H=w.map(function(X,Z){return t.renderRow(X,{listIndex:Z,style:{height:typeof d!="function"?d:d({index:Z,treeIndex:Z,node:X.node,path:X.path})},getPrevRow:function(){return w[Z-1]||null},matchKeys:q,swapFrom:S,swapDepth:D,swapLength:O})});return oe.createElement("div",{className:be("rst__tree",s,g),style:W},H)}}],[{key:"getDerivedStateFromProps",value:function(t,o){var a=o.instanceProps,l={},s=Br(a.treeData,t.treeData);return a.treeData=t.treeData,s?Br(a.searchQuery,t.searchQuery)?a.searchFocusOffset!==t.searchFocusOffset&&Object.assign(l,n.search(t,o,!0,!0,!0)):Object.assign(l,n.search(t,o,!0,!0,!1)):(a.ignoreOneTreeUpdate?a.ignoreOneTreeUpdate=!1:(l.searchFocusTreeIndex=null,n.loadLazyChildren(t,o),Object.assign(l,n.search(t,o,!1,!1,!1))),l.draggingTreeData=null,l.draggedNode=null,l.draggedMinimumTreeIndex=null,l.draggedDepth=null,l.dragging=!1),a.searchQuery=t.searchQuery,a.searchFocusOffset=t.searchFocusOffset,l.instanceProps=ae(ae({},a),l.instanceProps),l}},{key:"search",value:function(t,o,a,l,s){var c=t.onChange,d=t.getNodeKey,f=t.searchFinishCallback,u=t.searchQuery,p=t.searchMethod,h=t.searchFocusOffset,v=t.onlyExpandSearchedNodes,y=o.instanceProps;if(!u&&!p)return f&&f([]),{searchMatches:[]};var _={instanceProps:{}},C=_c({getNodeKey:d,treeData:v?wc({treeData:y.treeData,expanded:!1}):y.treeData,searchQuery:u,searchMethod:p||kc,searchFocusOffset:h,expandAllMatchPaths:l&&!s,expandFocusMatchPaths:!!l}),z=C.treeData,D=C.matches;l&&(_.instanceProps.ignoreOneTreeUpdate=!0,c(z)),f&&f(D);var L=null;return a&&h!==null&&h<D.length&&(L=D[h].treeIndex),_.searchMatches=D,_.searchFocusTreeIndex=L,_}},{key:"loadLazyChildren",value:function(t,o){var a=o.instanceProps;Xo({treeData:a.treeData,getNodeKey:t.getNodeKey,callback:function(s){var c=s.node,d=s.path,f=s.lowerSiblingCounts,u=s.treeIndex;c.children&&typeof c.children=="function"&&(c.expanded||t.loadCollapsedLazyChildren)&&c.children({node:c,path:d,lowerSiblingCounts:f,treeIndex:u,done:function(h){return t.onChange(zt({treeData:a.treeData,path:d,newNode:function(y){var _=y.node;return _===c?ae(ae({},_),{},{children:h}):_},getNodeKey:t.getNodeKey}))}})}})}}]),n}(k.Component);hn.propTypes={dragDropManager:b.shape({getMonitor:b.func}).isRequired,treeData:b.arrayOf(b.object).isRequired,style:b.shape({}),className:b.string,innerStyle:b.shape({}),rowHeight:b.oneOfType([b.number,b.func]),slideRegionSize:b.number,reactVirtualizedListProps:b.shape({}),scaffoldBlockPxWidth:b.number,maxDepth:b.number,searchMethod:b.func,searchQuery:b.any,searchFocusOffset:b.number,searchFinishCallback:b.func,generateNodeProps:b.func,isVirtualized:b.bool,treeNodeRenderer:b.func,nodeContentRenderer:b.func,placeholderRenderer:b.func,theme:b.shape({style:b.shape({}),innerStyle:b.shape({}),reactVirtualizedListProps:b.shape({}),scaffoldBlockPxWidth:b.number,slideRegionSize:b.number,rowHeight:b.oneOfType([b.number,b.func]),treeNodeRenderer:b.func,nodeContentRenderer:b.func,placeholderRenderer:b.func}),getNodeKey:b.func,onChange:b.func.isRequired,onMoveNode:b.func,canDrag:b.oneOfType([b.func,b.bool]),canDrop:b.func,canNodeHaveChildren:b.func,shouldCopyOnOutsideDrop:b.oneOfType([b.func,b.bool]),onVisibilityToggle:b.func,dndType:b.string,onDragStateChanged:b.func,onlyExpandSearchedNodes:b.bool,rowDirection:b.string};hn.defaultProps={canDrag:!0,canDrop:null,canNodeHaveChildren:function(){return!0},className:"",dndType:null,generateNodeProps:null,getNodeKey:Pc,innerStyle:{},isVirtualized:!0,maxDepth:null,treeNodeRenderer:null,nodeContentRenderer:null,onMoveNode:function(){},onVisibilityToggle:function(){},placeholderRenderer:null,reactVirtualizedListProps:{},rowHeight:null,scaffoldBlockPxWidth:null,searchFinishCallback:null,searchFocusOffset:null,searchMethod:null,searchQuery:null,shouldCopyOnOutsideDrop:!1,slideRegionSize:null,style:{},theme:{},onDragStateChanged:function(){},onlyExpandSearchedNodes:!1,rowDirection:"ltr"};yc(hn);var Mc=function(i){return oe.createElement(Ba.Consumer,null,function(n){var e=n.dragDropManager;return e===void 0?null:oe.createElement(hn,Xe({},i,{dragDropManager:e}))})},nn={exports:{}},Oi=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},Bt=(typeof window>"u"?"undefined":Oi(window))==="object"&&(typeof document>"u"?"undefined":Oi(document))==="object"&&document.nodeType===9,Ec={}.constructor;function Hn(r){if(r==null||typeof r!="object")return r;if(Array.isArray(r))return r.map(Hn);if(r.constructor!==Ec)return r;var i={};for(var n in r)i[n]=Hn(r[n]);return i}function mr(r,i,n){r===void 0&&(r="unnamed");var e=n.jss,t=Hn(i),o=e.plugins.onCreateRule(r,t,n);return o||(r[0],null)}var zi=function(i,n){for(var e="",t=0;t<i.length&&i[t]!=="!important";t++)e&&(e+=n),e+=i[t];return e},ot=function(i){if(!Array.isArray(i))return i;var n="";if(Array.isArray(i[0]))for(var e=0;e<i.length&&i[e]!=="!important";e++)n&&(n+=", "),n+=zi(i[e]," ");else n=zi(i,", ");return i[i.length-1]==="!important"&&(n+=" !important"),n};function wt(r){return r&&r.format===!1?{linebreak:"",space:""}:{linebreak:`
22
22
  `,space:" "}}function It(r,i){for(var n="",e=0;e<i;e++)n+=" ";return n+r}function Ft(r,i,n){n===void 0&&(n={});var e="";if(!i)return e;var t=n,o=t.indent,a=o===void 0?0:o,l=i.fallbacks;n.format===!1&&(a=-1/0);var s=wt(n),c=s.linebreak,d=s.space;if(r&&a++,l)if(Array.isArray(l))for(var f=0;f<l.length;f++){var u=l[f];for(var p in u){var h=u[p];h!=null&&(e&&(e+=c),e+=It(p+":"+d+ot(h)+";",a))}}else for(var v in l){var y=l[v];y!=null&&(e&&(e+=c),e+=It(v+":"+d+ot(y)+";",a))}for(var _ in i){var C=i[_];C!=null&&_!=="fallbacks"&&(e&&(e+=c),e+=It(_+":"+d+ot(C)+";",a))}return!e&&!n.allowEmpty||!r?e:(a--,e&&(e=""+c+e+c),It(""+r+d+"{"+e,a)+It("}",a))}var Ac=/([[\].#*$><+~=|^:(),"'`\s])/g,Di=typeof CSS<"u"&&CSS.escape,Sr=function(r){return Di?Di(r):r.replace(Ac,"\\$1")},ta=function(){function r(n,e,t){this.type="style",this.isProcessed=!1;var o=t.sheet,a=t.Renderer;this.key=n,this.options=t,this.style=e,o?this.renderer=o.renderer:a&&(this.renderer=new a)}var i=r.prototype;return i.prop=function(e,t,o){if(t===void 0)return this.style[e];var a=o?o.force:!1;if(!a&&this.style[e]===t)return this;var l=t;(!o||o.process!==!1)&&(l=this.options.jss.plugins.onChangeValue(t,e,this));var s=l==null||l===!1,c=e in this.style;if(s&&!c&&!a)return this;var d=s&&c;if(d?delete this.style[e]:this.style[e]=l,this.renderable&&this.renderer)return d?this.renderer.removeProperty(this.renderable,e):this.renderer.setProperty(this.renderable,e,l),this;var f=this.options.sheet;return f&&f.attached,this},r}(),Un=function(r){eo(i,r);function i(e,t,o){var a;a=r.call(this,e,t,o)||this;var l=o.selector,s=o.scoped,c=o.sheet,d=o.generateId;return l?a.selectorText=l:s!==!1&&(a.id=d(E(E(a)),c),a.selectorText="."+Sr(a.id)),a}var n=i.prototype;return n.applyTo=function(t){var o=this.renderer;if(o){var a=this.toJSON();for(var l in a)o.setProperty(t,l,a[l])}return this},n.toJSON=function(){var t={};for(var o in this.style){var a=this.style[o];typeof a!="object"?t[o]=a:Array.isArray(a)&&(t[o]=ot(a))}return t},n.toString=function(t){var o=this.options.sheet,a=o?o.options.link:!1,l=a?le({},t,{allowEmpty:!0}):t;return Ft(this.selectorText,this.style,l)},pe(i,[{key:"selector",set:function(t){if(t!==this.selectorText){this.selectorText=t;var o=this.renderer,a=this.renderable;if(!(!a||!o)){var l=o.setSelector(a,t);l||o.replaceRule(a,this)}}},get:function(){return this.selectorText}}]),i}(ta),jc={onCreateRule:function(i,n,e){return i[0]==="@"||e.parent&&e.parent.type==="keyframes"?null:new Un(i,n,e)}},In={indent:1,children:!0},Fc=/@([\w-]+)/,Gc=function(){function r(n,e,t){this.type="conditional",this.isProcessed=!1,this.key=n;var o=n.match(Fc);this.at=o?o[1]:"unknown",this.query=t.name||"@"+this.at,this.options=t,this.rules=new pn(le({},t,{parent:this}));for(var a in e)this.rules.add(a,e[a]);this.rules.process()}var i=r.prototype;return i.getRule=function(e){return this.rules.get(e)},i.indexOf=function(e){return this.rules.indexOf(e)},i.addRule=function(e,t,o){var a=this.rules.add(e,t,o);return a?(this.options.jss.plugins.onProcessRule(a),a):null},i.replaceRule=function(e,t,o){var a=this.rules.replace(e,t,o);return a&&this.options.jss.plugins.onProcessRule(a),a},i.toString=function(e){e===void 0&&(e=In);var t=wt(e),o=t.linebreak;if(e.indent==null&&(e.indent=In.indent),e.children==null&&(e.children=In.children),e.children===!1)return this.query+" {}";var a=this.rules.toString(e);return a?this.query+" {"+o+a+o+"}":""},r}(),Wc=/@container|@media|@supports\s+/,$c={onCreateRule:function(i,n,e){return Wc.test(i)?new Gc(i,n,e):null}},Tn={indent:1,children:!0},Hc=/@keyframes\s+([\w-]+)/,Bn=function(){function r(n,e,t){this.type="keyframes",this.at="@keyframes",this.isProcessed=!1;var o=n.match(Hc);o&&o[1]?this.name=o[1]:this.name="noname",this.key=this.type+"-"+this.name,this.options=t;var a=t.scoped,l=t.sheet,s=t.generateId;this.id=a===!1?this.name:Sr(s(this,l)),this.rules=new pn(le({},t,{parent:this}));for(var c in e)this.rules.add(c,e[c],le({},t,{parent:this}));this.rules.process()}var i=r.prototype;return i.toString=function(e){e===void 0&&(e=Tn);var t=wt(e),o=t.linebreak;if(e.indent==null&&(e.indent=Tn.indent),e.children==null&&(e.children=Tn.children),e.children===!1)return this.at+" "+this.id+" {}";var a=this.rules.toString(e);return a&&(a=""+o+a+o),this.at+" "+this.id+" {"+a+"}"},r}(),Uc=/@keyframes\s+/,Bc=/\$([\w-]+)/g,Vn=function(i,n){return typeof i=="string"?i.replace(Bc,function(e,t){return t in n?n[t]:e}):i},Ni=function(i,n,e){var t=i[n],o=Vn(t,e);o!==t&&(i[n]=o)},Vc={onCreateRule:function(i,n,e){return typeof i=="string"&&Uc.test(i)?new Bn(i,n,e):null},onProcessStyle:function(i,n,e){return n.type!=="style"||!e||("animation-name"in i&&Ni(i,"animation-name",e.keyframes),"animation"in i&&Ni(i,"animation",e.keyframes)),i},onChangeValue:function(i,n,e){var t=e.options.sheet;if(!t)return i;switch(n){case"animation":return Vn(i,t.keyframes);case"animation-name":return Vn(i,t.keyframes);default:return i}}},qc=function(r){eo(i,r);function i(){return r.apply(this,arguments)||this}var n=i.prototype;return n.toString=function(t){var o=this.options.sheet,a=o?o.options.link:!1,l=a?le({},t,{allowEmpty:!0}):t;return Ft(this.key,this.style,l)},i}(ta),Kc={onCreateRule:function(i,n,e){return e.parent&&e.parent.type==="keyframes"?new qc(i,n,e):null}},Xc=function(){function r(n,e,t){this.type="font-face",this.at="@font-face",this.isProcessed=!1,this.key=n,this.style=e,this.options=t}var i=r.prototype;return i.toString=function(e){var t=wt(e),o=t.linebreak;if(Array.isArray(this.style)){for(var a="",l=0;l<this.style.length;l++)a+=Ft(this.at,this.style[l]),this.style[l+1]&&(a+=o);return a}return Ft(this.at,this.style,e)},r}(),Yc=/@font-face/,Qc={onCreateRule:function(i,n,e){return Yc.test(i)?new Xc(i,n,e):null}},Jc=function(){function r(n,e,t){this.type="viewport",this.at="@viewport",this.isProcessed=!1,this.key=n,this.style=e,this.options=t}var i=r.prototype;return i.toString=function(e){return Ft(this.key,this.style,e)},r}(),Zc={onCreateRule:function(i,n,e){return i==="@viewport"||i==="@-ms-viewport"?new Jc(i,n,e):null}},ed=function(){function r(n,e,t){this.type="simple",this.isProcessed=!1,this.key=n,this.value=e,this.options=t}var i=r.prototype;return i.toString=function(e){if(Array.isArray(this.value)){for(var t="",o=0;o<this.value.length;o++)t+=this.key+" "+this.value[o]+";",this.value[o+1]&&(t+=`
23
- `);return t}return this.key+" "+this.value+";"},r}(),td={"@charset":!0,"@import":!0,"@namespace":!0},nd={onCreateRule:function(i,n,e){return i in td?new ed(i,n,e):null}},Mi=[jc,$c,Vc,Kc,Qc,Zc,nd],rd={process:!0},Li={force:!0,process:!0},pn=function(){function r(n){this.map={},this.raw={},this.index=[],this.counter=0,this.options=n,this.classes=n.classes,this.keyframes=n.keyframes}var i=r.prototype;return i.add=function(e,t,o){var a=this.options,l=a.parent,s=a.sheet,c=a.jss,d=a.Renderer,f=a.generateId,u=a.scoped,p=le({classes:this.classes,parent:l,sheet:s,jss:c,Renderer:d,generateId:f,scoped:u,name:e,keyframes:this.keyframes,selector:void 0},o),h=e;e in this.raw&&(h=e+"-d"+this.counter++),this.raw[h]=t,h in this.classes&&(p.selector="."+Sr(this.classes[h]));var v=mr(h,t,p);if(!v)return null;this.register(v);var y=p.index===void 0?this.index.length:p.index;return this.index.splice(y,0,v),v},i.replace=function(e,t,o){var a=this.get(e),l=this.index.indexOf(a);a&&this.remove(a);var s=o;return l!==-1&&(s=le({},o,{index:l})),this.add(e,t,s)},i.get=function(e){return this.map[e]},i.remove=function(e){this.unregister(e),delete this.raw[e.key],this.index.splice(this.index.indexOf(e),1)},i.indexOf=function(e){return this.index.indexOf(e)},i.process=function(){var e=this.options.jss.plugins;this.index.slice(0).forEach(e.onProcessRule,e)},i.register=function(e){this.map[e.key]=e,e instanceof Un?(this.map[e.selector]=e,e.id&&(this.classes[e.key]=e.id)):e instanceof Bn&&this.keyframes&&(this.keyframes[e.name]=e.id)},i.unregister=function(e){delete this.map[e.key],e instanceof Un?(delete this.map[e.selector],delete this.classes[e.key]):e instanceof Bn&&delete this.keyframes[e.name]},i.update=function(){var e,t,o;if(typeof(arguments.length<=0?void 0:arguments[0])=="string"?(e=arguments.length<=0?void 0:arguments[0],t=arguments.length<=1?void 0:arguments[1],o=arguments.length<=2?void 0:arguments[2]):(t=arguments.length<=0?void 0:arguments[0],o=arguments.length<=1?void 0:arguments[1],e=null),e)this.updateOne(this.get(e),t,o);else for(var a=0;a<this.index.length;a++)this.updateOne(this.index[a],t,o)},i.updateOne=function(e,t,o){o===void 0&&(o=rd);var a=this.options,l=a.jss.plugins,s=a.sheet;if(e.rules instanceof r){e.rules.update(t,o);return}var c=e.style;if(l.onUpdate(t,e,s,o),o.process&&c&&c!==e.style){l.onProcessStyle(e.style,e,s);for(var d in e.style){var f=e.style[d],u=c[d];f!==u&&e.prop(d,f,Li)}for(var p in c){var h=e.style[p],v=c[p];h==null&&h!==v&&e.prop(p,null,Li)}}},i.toString=function(e){for(var t="",o=this.options.sheet,a=o?o.options.link:!1,l=wt(e),s=l.linebreak,c=0;c<this.index.length;c++){var d=this.index[c],f=d.toString(e);!f&&!a||(t&&(t+=s),t+=f)}return t},r}(),na=function(){function r(n,e){this.attached=!1,this.deployed=!1,this.classes={},this.keyframes={},this.options=le({},e,{sheet:this,parent:this,classes:this.classes,keyframes:this.keyframes}),e.Renderer&&(this.renderer=new e.Renderer(this)),this.rules=new pn(this.options);for(var t in n)this.rules.add(t,n[t]);this.rules.process()}var i=r.prototype;return i.attach=function(){return this.attached?this:(this.renderer&&this.renderer.attach(),this.attached=!0,this.deployed||this.deploy(),this)},i.detach=function(){return this.attached?(this.renderer&&this.renderer.detach(),this.attached=!1,this):this},i.addRule=function(e,t,o){var a=this.queue;this.attached&&!a&&(this.queue=[]);var l=this.rules.add(e,t,o);return l?(this.options.jss.plugins.onProcessRule(l),this.attached?(this.deployed&&(a?a.push(l):(this.insertRule(l),this.queue&&(this.queue.forEach(this.insertRule,this),this.queue=void 0))),l):(this.deployed=!1,l)):null},i.replaceRule=function(e,t,o){var a=this.rules.get(e);if(!a)return this.addRule(e,t,o);var l=this.rules.replace(e,t,o);return l&&this.options.jss.plugins.onProcessRule(l),this.attached?(this.deployed&&this.renderer&&(l?a.renderable&&this.renderer.replaceRule(a.renderable,l):this.renderer.deleteRule(a)),l):(this.deployed=!1,l)},i.insertRule=function(e){this.renderer&&this.renderer.insertRule(e)},i.addRules=function(e,t){var o=[];for(var a in e){var l=this.addRule(a,e[a],t);l&&o.push(l)}return o},i.getRule=function(e){return this.rules.get(e)},i.deleteRule=function(e){var t=typeof e=="object"?e:this.rules.get(e);return!t||this.attached&&!t.renderable?!1:(this.rules.remove(t),this.attached&&t.renderable&&this.renderer?this.renderer.deleteRule(t.renderable):!0)},i.indexOf=function(e){return this.rules.indexOf(e)},i.deploy=function(){return this.renderer&&this.renderer.deploy(),this.deployed=!0,this},i.update=function(){var e;return(e=this.rules).update.apply(e,arguments),this},i.updateOne=function(e,t,o){return this.rules.updateOne(e,t,o),this},i.toString=function(e){return this.rules.toString(e)},r}(),id=function(){function r(){this.plugins={internal:[],external:[]},this.registry={}}var i=r.prototype;return i.onCreateRule=function(e,t,o){for(var a=0;a<this.registry.onCreateRule.length;a++){var l=this.registry.onCreateRule[a](e,t,o);if(l)return l}return null},i.onProcessRule=function(e){if(!e.isProcessed){for(var t=e.options.sheet,o=0;o<this.registry.onProcessRule.length;o++)this.registry.onProcessRule[o](e,t);e.style&&this.onProcessStyle(e.style,e,t),e.isProcessed=!0}},i.onProcessStyle=function(e,t,o){for(var a=0;a<this.registry.onProcessStyle.length;a++)t.style=this.registry.onProcessStyle[a](t.style,t,o)},i.onProcessSheet=function(e){for(var t=0;t<this.registry.onProcessSheet.length;t++)this.registry.onProcessSheet[t](e)},i.onUpdate=function(e,t,o,a){for(var l=0;l<this.registry.onUpdate.length;l++)this.registry.onUpdate[l](e,t,o,a)},i.onChangeValue=function(e,t,o){for(var a=e,l=0;l<this.registry.onChangeValue.length;l++)a=this.registry.onChangeValue[l](a,t,o);return a},i.use=function(e,t){t===void 0&&(t={queue:"external"});var o=this.plugins[t.queue];o.indexOf(e)===-1&&(o.push(e),this.registry=[].concat(this.plugins.external,this.plugins.internal).reduce(function(a,l){for(var s in l)s in a&&a[s].push(l[s]);return a},{onCreateRule:[],onProcessRule:[],onProcessStyle:[],onProcessSheet:[],onChangeValue:[],onUpdate:[]}))},r}(),od=function(){function r(){this.registry=[]}var i=r.prototype;return i.add=function(e){var t=this.registry,o=e.options.index;if(t.indexOf(e)===-1){if(t.length===0||o>=this.index){t.push(e);return}for(var a=0;a<t.length;a++)if(t[a].options.index>o){t.splice(a,0,e);return}}},i.reset=function(){this.registry=[]},i.remove=function(e){var t=this.registry.indexOf(e);this.registry.splice(t,1)},i.toString=function(e){for(var t=e===void 0?{}:e,o=t.attached,a=Zi(t,["attached"]),l=wt(a),s=l.linebreak,c="",d=0;d<this.registry.length;d++){var f=this.registry[d];o!=null&&f.attached!==o||(c&&(c+=s),c+=f.toString(a))}return c},pe(r,[{key:"index",get:function(){return this.registry.length===0?0:this.registry[this.registry.length-1].options.index}}]),r}(),Et=new od,qn=typeof globalThis<"u"?globalThis:typeof window<"u"&&window.Math===Math?window:typeof self<"u"&&self.Math===Math?self:Function("return this")(),Kn="2f1acc6c3a606b082e5eef5e54414ffb";qn[Kn]==null&&(qn[Kn]=0);var Ei=qn[Kn]++,Ai=function(i){i===void 0&&(i={});var n=0,e=function(o,a){n+=1;var l="",s="";return a&&(a.options.classNamePrefix&&(s=a.options.classNamePrefix),a.options.jss.id!=null&&(l=String(a.options.jss.id))),i.minify?""+(s||"c")+Ei+l+n:s+o.key+"-"+Ei+(l?"-"+l:"")+"-"+n};return e},ra=function(i){var n;return function(){return n||(n=i()),n}},ad=function(i,n){try{return i.attributeStyleMap?i.attributeStyleMap.get(n):i.style.getPropertyValue(n)}catch{return""}},ld=function(i,n,e){try{var t=e;if(Array.isArray(e)&&(t=ot(e)),i.attributeStyleMap)i.attributeStyleMap.set(n,t);else{var o=t?t.indexOf("!important"):-1,a=o>-1?t.substr(0,o-1):t;i.style.setProperty(n,a,o>-1?"important":"")}}catch{return!1}return!0},sd=function(i,n){try{i.attributeStyleMap?i.attributeStyleMap.delete(n):i.style.removeProperty(n)}catch{}},cd=function(i,n){return i.selectorText=n,i.selectorText===n},ia=ra(function(){return document.querySelector("head")});function dd(r,i){for(var n=0;n<r.length;n++){var e=r[n];if(e.attached&&e.options.index>i.index&&e.options.insertionPoint===i.insertionPoint)return e}return null}function ud(r,i){for(var n=r.length-1;n>=0;n--){var e=r[n];if(e.attached&&e.options.insertionPoint===i.insertionPoint)return e}return null}function fd(r){for(var i=ia(),n=0;n<i.childNodes.length;n++){var e=i.childNodes[n];if(e.nodeType===8&&e.nodeValue.trim()===r)return e}return null}function hd(r){var i=Et.registry;if(i.length>0){var n=dd(i,r);if(n&&n.renderer)return{parent:n.renderer.element.parentNode,node:n.renderer.element};if(n=ud(i,r),n&&n.renderer)return{parent:n.renderer.element.parentNode,node:n.renderer.element.nextSibling}}var e=r.insertionPoint;if(e&&typeof e=="string"){var t=fd(e);if(t)return{parent:t.parentNode,node:t.nextSibling}}return!1}function pd(r,i){var n=i.insertionPoint,e=hd(i);if(e!==!1&&e.parent){e.parent.insertBefore(r,e.node);return}if(n&&typeof n.nodeType=="number"){var t=n,o=t.parentNode;o&&o.insertBefore(r,t.nextSibling);return}ia().appendChild(r)}var gd=ra(function(){var r=document.querySelector('meta[property="csp-nonce"]');return r?r.getAttribute("content"):null}),ji=function(i,n,e){try{"insertRule"in i?i.insertRule(n,e):"appendRule"in i&&i.appendRule(n)}catch{return!1}return i.cssRules[e]},Fi=function(i,n){var e=i.cssRules.length;return n===void 0||n>e?e:n},vd=function(){var i=document.createElement("style");return i.textContent=`
23
+ `);return t}return this.key+" "+this.value+";"},r}(),td={"@charset":!0,"@import":!0,"@namespace":!0},nd={onCreateRule:function(i,n,e){return i in td?new ed(i,n,e):null}},Li=[jc,$c,Vc,Kc,Qc,Zc,nd],rd={process:!0},Mi={force:!0,process:!0},pn=function(){function r(n){this.map={},this.raw={},this.index=[],this.counter=0,this.options=n,this.classes=n.classes,this.keyframes=n.keyframes}var i=r.prototype;return i.add=function(e,t,o){var a=this.options,l=a.parent,s=a.sheet,c=a.jss,d=a.Renderer,f=a.generateId,u=a.scoped,p=le({classes:this.classes,parent:l,sheet:s,jss:c,Renderer:d,generateId:f,scoped:u,name:e,keyframes:this.keyframes,selector:void 0},o),h=e;e in this.raw&&(h=e+"-d"+this.counter++),this.raw[h]=t,h in this.classes&&(p.selector="."+Sr(this.classes[h]));var v=mr(h,t,p);if(!v)return null;this.register(v);var y=p.index===void 0?this.index.length:p.index;return this.index.splice(y,0,v),v},i.replace=function(e,t,o){var a=this.get(e),l=this.index.indexOf(a);a&&this.remove(a);var s=o;return l!==-1&&(s=le({},o,{index:l})),this.add(e,t,s)},i.get=function(e){return this.map[e]},i.remove=function(e){this.unregister(e),delete this.raw[e.key],this.index.splice(this.index.indexOf(e),1)},i.indexOf=function(e){return this.index.indexOf(e)},i.process=function(){var e=this.options.jss.plugins;this.index.slice(0).forEach(e.onProcessRule,e)},i.register=function(e){this.map[e.key]=e,e instanceof Un?(this.map[e.selector]=e,e.id&&(this.classes[e.key]=e.id)):e instanceof Bn&&this.keyframes&&(this.keyframes[e.name]=e.id)},i.unregister=function(e){delete this.map[e.key],e instanceof Un?(delete this.map[e.selector],delete this.classes[e.key]):e instanceof Bn&&delete this.keyframes[e.name]},i.update=function(){var e,t,o;if(typeof(arguments.length<=0?void 0:arguments[0])=="string"?(e=arguments.length<=0?void 0:arguments[0],t=arguments.length<=1?void 0:arguments[1],o=arguments.length<=2?void 0:arguments[2]):(t=arguments.length<=0?void 0:arguments[0],o=arguments.length<=1?void 0:arguments[1],e=null),e)this.updateOne(this.get(e),t,o);else for(var a=0;a<this.index.length;a++)this.updateOne(this.index[a],t,o)},i.updateOne=function(e,t,o){o===void 0&&(o=rd);var a=this.options,l=a.jss.plugins,s=a.sheet;if(e.rules instanceof r){e.rules.update(t,o);return}var c=e.style;if(l.onUpdate(t,e,s,o),o.process&&c&&c!==e.style){l.onProcessStyle(e.style,e,s);for(var d in e.style){var f=e.style[d],u=c[d];f!==u&&e.prop(d,f,Mi)}for(var p in c){var h=e.style[p],v=c[p];h==null&&h!==v&&e.prop(p,null,Mi)}}},i.toString=function(e){for(var t="",o=this.options.sheet,a=o?o.options.link:!1,l=wt(e),s=l.linebreak,c=0;c<this.index.length;c++){var d=this.index[c],f=d.toString(e);!f&&!a||(t&&(t+=s),t+=f)}return t},r}(),na=function(){function r(n,e){this.attached=!1,this.deployed=!1,this.classes={},this.keyframes={},this.options=le({},e,{sheet:this,parent:this,classes:this.classes,keyframes:this.keyframes}),e.Renderer&&(this.renderer=new e.Renderer(this)),this.rules=new pn(this.options);for(var t in n)this.rules.add(t,n[t]);this.rules.process()}var i=r.prototype;return i.attach=function(){return this.attached?this:(this.renderer&&this.renderer.attach(),this.attached=!0,this.deployed||this.deploy(),this)},i.detach=function(){return this.attached?(this.renderer&&this.renderer.detach(),this.attached=!1,this):this},i.addRule=function(e,t,o){var a=this.queue;this.attached&&!a&&(this.queue=[]);var l=this.rules.add(e,t,o);return l?(this.options.jss.plugins.onProcessRule(l),this.attached?(this.deployed&&(a?a.push(l):(this.insertRule(l),this.queue&&(this.queue.forEach(this.insertRule,this),this.queue=void 0))),l):(this.deployed=!1,l)):null},i.replaceRule=function(e,t,o){var a=this.rules.get(e);if(!a)return this.addRule(e,t,o);var l=this.rules.replace(e,t,o);return l&&this.options.jss.plugins.onProcessRule(l),this.attached?(this.deployed&&this.renderer&&(l?a.renderable&&this.renderer.replaceRule(a.renderable,l):this.renderer.deleteRule(a)),l):(this.deployed=!1,l)},i.insertRule=function(e){this.renderer&&this.renderer.insertRule(e)},i.addRules=function(e,t){var o=[];for(var a in e){var l=this.addRule(a,e[a],t);l&&o.push(l)}return o},i.getRule=function(e){return this.rules.get(e)},i.deleteRule=function(e){var t=typeof e=="object"?e:this.rules.get(e);return!t||this.attached&&!t.renderable?!1:(this.rules.remove(t),this.attached&&t.renderable&&this.renderer?this.renderer.deleteRule(t.renderable):!0)},i.indexOf=function(e){return this.rules.indexOf(e)},i.deploy=function(){return this.renderer&&this.renderer.deploy(),this.deployed=!0,this},i.update=function(){var e;return(e=this.rules).update.apply(e,arguments),this},i.updateOne=function(e,t,o){return this.rules.updateOne(e,t,o),this},i.toString=function(e){return this.rules.toString(e)},r}(),id=function(){function r(){this.plugins={internal:[],external:[]},this.registry={}}var i=r.prototype;return i.onCreateRule=function(e,t,o){for(var a=0;a<this.registry.onCreateRule.length;a++){var l=this.registry.onCreateRule[a](e,t,o);if(l)return l}return null},i.onProcessRule=function(e){if(!e.isProcessed){for(var t=e.options.sheet,o=0;o<this.registry.onProcessRule.length;o++)this.registry.onProcessRule[o](e,t);e.style&&this.onProcessStyle(e.style,e,t),e.isProcessed=!0}},i.onProcessStyle=function(e,t,o){for(var a=0;a<this.registry.onProcessStyle.length;a++)t.style=this.registry.onProcessStyle[a](t.style,t,o)},i.onProcessSheet=function(e){for(var t=0;t<this.registry.onProcessSheet.length;t++)this.registry.onProcessSheet[t](e)},i.onUpdate=function(e,t,o,a){for(var l=0;l<this.registry.onUpdate.length;l++)this.registry.onUpdate[l](e,t,o,a)},i.onChangeValue=function(e,t,o){for(var a=e,l=0;l<this.registry.onChangeValue.length;l++)a=this.registry.onChangeValue[l](a,t,o);return a},i.use=function(e,t){t===void 0&&(t={queue:"external"});var o=this.plugins[t.queue];o.indexOf(e)===-1&&(o.push(e),this.registry=[].concat(this.plugins.external,this.plugins.internal).reduce(function(a,l){for(var s in l)s in a&&a[s].push(l[s]);return a},{onCreateRule:[],onProcessRule:[],onProcessStyle:[],onProcessSheet:[],onChangeValue:[],onUpdate:[]}))},r}(),od=function(){function r(){this.registry=[]}var i=r.prototype;return i.add=function(e){var t=this.registry,o=e.options.index;if(t.indexOf(e)===-1){if(t.length===0||o>=this.index){t.push(e);return}for(var a=0;a<t.length;a++)if(t[a].options.index>o){t.splice(a,0,e);return}}},i.reset=function(){this.registry=[]},i.remove=function(e){var t=this.registry.indexOf(e);this.registry.splice(t,1)},i.toString=function(e){for(var t=e===void 0?{}:e,o=t.attached,a=Zi(t,["attached"]),l=wt(a),s=l.linebreak,c="",d=0;d<this.registry.length;d++){var f=this.registry[d];o!=null&&f.attached!==o||(c&&(c+=s),c+=f.toString(a))}return c},pe(r,[{key:"index",get:function(){return this.registry.length===0?0:this.registry[this.registry.length-1].options.index}}]),r}(),Et=new od,qn=typeof globalThis<"u"?globalThis:typeof window<"u"&&window.Math===Math?window:typeof self<"u"&&self.Math===Math?self:Function("return this")(),Kn="2f1acc6c3a606b082e5eef5e54414ffb";qn[Kn]==null&&(qn[Kn]=0);var Ei=qn[Kn]++,Ai=function(i){i===void 0&&(i={});var n=0,e=function(o,a){n+=1;var l="",s="";return a&&(a.options.classNamePrefix&&(s=a.options.classNamePrefix),a.options.jss.id!=null&&(l=String(a.options.jss.id))),i.minify?""+(s||"c")+Ei+l+n:s+o.key+"-"+Ei+(l?"-"+l:"")+"-"+n};return e},ra=function(i){var n;return function(){return n||(n=i()),n}},ad=function(i,n){try{return i.attributeStyleMap?i.attributeStyleMap.get(n):i.style.getPropertyValue(n)}catch{return""}},ld=function(i,n,e){try{var t=e;if(Array.isArray(e)&&(t=ot(e)),i.attributeStyleMap)i.attributeStyleMap.set(n,t);else{var o=t?t.indexOf("!important"):-1,a=o>-1?t.substr(0,o-1):t;i.style.setProperty(n,a,o>-1?"important":"")}}catch{return!1}return!0},sd=function(i,n){try{i.attributeStyleMap?i.attributeStyleMap.delete(n):i.style.removeProperty(n)}catch{}},cd=function(i,n){return i.selectorText=n,i.selectorText===n},ia=ra(function(){return document.querySelector("head")});function dd(r,i){for(var n=0;n<r.length;n++){var e=r[n];if(e.attached&&e.options.index>i.index&&e.options.insertionPoint===i.insertionPoint)return e}return null}function ud(r,i){for(var n=r.length-1;n>=0;n--){var e=r[n];if(e.attached&&e.options.insertionPoint===i.insertionPoint)return e}return null}function fd(r){for(var i=ia(),n=0;n<i.childNodes.length;n++){var e=i.childNodes[n];if(e.nodeType===8&&e.nodeValue.trim()===r)return e}return null}function hd(r){var i=Et.registry;if(i.length>0){var n=dd(i,r);if(n&&n.renderer)return{parent:n.renderer.element.parentNode,node:n.renderer.element};if(n=ud(i,r),n&&n.renderer)return{parent:n.renderer.element.parentNode,node:n.renderer.element.nextSibling}}var e=r.insertionPoint;if(e&&typeof e=="string"){var t=fd(e);if(t)return{parent:t.parentNode,node:t.nextSibling}}return!1}function pd(r,i){var n=i.insertionPoint,e=hd(i);if(e!==!1&&e.parent){e.parent.insertBefore(r,e.node);return}if(n&&typeof n.nodeType=="number"){var t=n,o=t.parentNode;o&&o.insertBefore(r,t.nextSibling);return}ia().appendChild(r)}var gd=ra(function(){var r=document.querySelector('meta[property="csp-nonce"]');return r?r.getAttribute("content"):null}),ji=function(i,n,e){try{"insertRule"in i?i.insertRule(n,e):"appendRule"in i&&i.appendRule(n)}catch{return!1}return i.cssRules[e]},Fi=function(i,n){var e=i.cssRules.length;return n===void 0||n>e?e:n},vd=function(){var i=document.createElement("style");return i.textContent=`
24
24
  `,i},md=function(){function r(n){this.getPropertyValue=ad,this.setProperty=ld,this.removeProperty=sd,this.setSelector=cd,this.hasInsertedRules=!1,this.cssRules=[],n&&Et.add(n),this.sheet=n;var e=this.sheet?this.sheet.options:{},t=e.media,o=e.meta,a=e.element;this.element=a||vd(),this.element.setAttribute("data-jss",""),t&&this.element.setAttribute("media",t),o&&this.element.setAttribute("data-meta",o);var l=gd();l&&this.element.setAttribute("nonce",l)}var i=r.prototype;return i.attach=function(){if(!(this.element.parentNode||!this.sheet)){pd(this.element,this.sheet.options);var e=!!(this.sheet&&this.sheet.deployed);this.hasInsertedRules&&e&&(this.hasInsertedRules=!1,this.deploy())}},i.detach=function(){if(this.sheet){var e=this.element.parentNode;e&&e.removeChild(this.element),this.sheet.options.link&&(this.cssRules=[],this.element.textContent=`
25
25
  `)}},i.deploy=function(){var e=this.sheet;if(e){if(e.options.link){this.insertRules(e.rules);return}this.element.textContent=`
26
26
  `+e.toString()+`
27
- `}},i.insertRules=function(e,t){for(var o=0;o<e.index.length;o++)this.insertRule(e.index[o],o,t)},i.insertRule=function(e,t,o){if(o===void 0&&(o=this.element.sheet),e.rules){var a=e,l=o;if(e.type==="conditional"||e.type==="keyframes"){var s=Fi(o,t);if(l=ji(o,a.toString({children:!1}),s),l===!1)return!1;this.refCssRule(e,s,l)}return this.insertRules(a.rules,l),l}var c=e.toString();if(!c)return!1;var d=Fi(o,t),f=ji(o,c,d);return f===!1?!1:(this.hasInsertedRules=!0,this.refCssRule(e,d,f),f)},i.refCssRule=function(e,t,o){e.renderable=o,e.options.parent instanceof na&&this.cssRules.splice(t,0,o)},i.deleteRule=function(e){var t=this.element.sheet,o=this.indexOf(e);return o===-1?!1:(t.deleteRule(o),this.cssRules.splice(o,1),!0)},i.indexOf=function(e){return this.cssRules.indexOf(e)},i.replaceRule=function(e,t){var o=this.indexOf(e);return o===-1?!1:(this.element.sheet.deleteRule(o),this.cssRules.splice(o,1),this.insertRule(t,o))},i.getRules=function(){return this.element.sheet.cssRules},r}(),Sd=0,yd=function(){function r(n){this.id=Sd++,this.version="10.10.0",this.plugins=new id,this.options={id:{minify:!1},createGenerateId:Ai,Renderer:Bt?md:null,plugins:[]},this.generateId=Ai({minify:!1});for(var e=0;e<Mi.length;e++)this.plugins.use(Mi[e],{queue:"internal"});this.setup(n)}var i=r.prototype;return i.setup=function(e){return e===void 0&&(e={}),e.createGenerateId&&(this.options.createGenerateId=e.createGenerateId),e.id&&(this.options.id=le({},this.options.id,e.id)),(e.createGenerateId||e.id)&&(this.generateId=this.options.createGenerateId(this.options.id)),e.insertionPoint!=null&&(this.options.insertionPoint=e.insertionPoint),"Renderer"in e&&(this.options.Renderer=e.Renderer),e.plugins&&this.use.apply(this,e.plugins),this},i.createStyleSheet=function(e,t){t===void 0&&(t={});var o=t,a=o.index;typeof a!="number"&&(a=Et.index===0?0:Et.index+1);var l=new na(e,le({},t,{jss:this,generateId:t.generateId||this.generateId,insertionPoint:this.options.insertionPoint,Renderer:this.options.Renderer,index:a}));return this.plugins.onProcessSheet(l),l},i.removeStyleSheet=function(e){return e.detach(),Et.remove(e),this},i.createRule=function(e,t,o){if(t===void 0&&(t={}),o===void 0&&(o={}),typeof e=="object")return this.createRule(void 0,e,t);var a=le({},o,{name:e,jss:this,Renderer:this.options.Renderer});a.generateId||(a.generateId=this.generateId),a.classes||(a.classes={}),a.keyframes||(a.keyframes={});var l=mr(e,t,a);return l&&this.plugins.onProcessRule(l),l},i.use=function(){for(var e=this,t=arguments.length,o=new Array(t),a=0;a<t;a++)o[a]=arguments[a];return o.forEach(function(l){e.plugins.use(l)}),this},r}(),oa=function(i){return new yd(i)},yr=typeof CSS=="object"&&CSS!=null&&"number"in CSS;function aa(r){var i=null;for(var n in r){var e=r[n],t=typeof e;if(t==="function")i||(i={}),i[n]=e;else if(t==="object"&&e!==null&&!Array.isArray(e)){var o=aa(e);o&&(i||(i={}),i[n]=o)}}return i}/**
27
+ `}},i.insertRules=function(e,t){for(var o=0;o<e.index.length;o++)this.insertRule(e.index[o],o,t)},i.insertRule=function(e,t,o){if(o===void 0&&(o=this.element.sheet),e.rules){var a=e,l=o;if(e.type==="conditional"||e.type==="keyframes"){var s=Fi(o,t);if(l=ji(o,a.toString({children:!1}),s),l===!1)return!1;this.refCssRule(e,s,l)}return this.insertRules(a.rules,l),l}var c=e.toString();if(!c)return!1;var d=Fi(o,t),f=ji(o,c,d);return f===!1?!1:(this.hasInsertedRules=!0,this.refCssRule(e,d,f),f)},i.refCssRule=function(e,t,o){e.renderable=o,e.options.parent instanceof na&&this.cssRules.splice(t,0,o)},i.deleteRule=function(e){var t=this.element.sheet,o=this.indexOf(e);return o===-1?!1:(t.deleteRule(o),this.cssRules.splice(o,1),!0)},i.indexOf=function(e){return this.cssRules.indexOf(e)},i.replaceRule=function(e,t){var o=this.indexOf(e);return o===-1?!1:(this.element.sheet.deleteRule(o),this.cssRules.splice(o,1),this.insertRule(t,o))},i.getRules=function(){return this.element.sheet.cssRules},r}(),Sd=0,yd=function(){function r(n){this.id=Sd++,this.version="10.10.0",this.plugins=new id,this.options={id:{minify:!1},createGenerateId:Ai,Renderer:Bt?md:null,plugins:[]},this.generateId=Ai({minify:!1});for(var e=0;e<Li.length;e++)this.plugins.use(Li[e],{queue:"internal"});this.setup(n)}var i=r.prototype;return i.setup=function(e){return e===void 0&&(e={}),e.createGenerateId&&(this.options.createGenerateId=e.createGenerateId),e.id&&(this.options.id=le({},this.options.id,e.id)),(e.createGenerateId||e.id)&&(this.generateId=this.options.createGenerateId(this.options.id)),e.insertionPoint!=null&&(this.options.insertionPoint=e.insertionPoint),"Renderer"in e&&(this.options.Renderer=e.Renderer),e.plugins&&this.use.apply(this,e.plugins),this},i.createStyleSheet=function(e,t){t===void 0&&(t={});var o=t,a=o.index;typeof a!="number"&&(a=Et.index===0?0:Et.index+1);var l=new na(e,le({},t,{jss:this,generateId:t.generateId||this.generateId,insertionPoint:this.options.insertionPoint,Renderer:this.options.Renderer,index:a}));return this.plugins.onProcessSheet(l),l},i.removeStyleSheet=function(e){return e.detach(),Et.remove(e),this},i.createRule=function(e,t,o){if(t===void 0&&(t={}),o===void 0&&(o={}),typeof e=="object")return this.createRule(void 0,e,t);var a=le({},o,{name:e,jss:this,Renderer:this.options.Renderer});a.generateId||(a.generateId=this.generateId),a.classes||(a.classes={}),a.keyframes||(a.keyframes={});var l=mr(e,t,a);return l&&this.plugins.onProcessRule(l),l},i.use=function(){for(var e=this,t=arguments.length,o=new Array(t),a=0;a<t;a++)o[a]=arguments[a];return o.forEach(function(l){e.plugins.use(l)}),this},r}(),oa=function(i){return new yd(i)},yr=typeof CSS=="object"&&CSS!=null&&"number"in CSS;function aa(r){var i=null;for(var n in r){var e=r[n],t=typeof e;if(t==="function")i||(i={}),i[n]=e;else if(t==="object"&&e!==null&&!Array.isArray(e)){var o=aa(e);o&&(i||(i={}),i[n]=o)}}return i}/**
28
28
  * A better abstraction over CSS.
29
29
  *
30
30
  * @copyright Oleg Isonen (Slobodskoi) / Isonen 2014-present
31
31
  * @website https://github.com/cssinjs/jss
32
32
  * @license MIT
33
- */oa();function Pn(r){return r&&qa(r)==="object"&&r.constructor===Object}function la(r,i){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{clone:!0},e=n.clone?le({},r):r;return Pn(r)&&Pn(i)&&Object.keys(i).forEach(function(t){t!=="__proto__"&&(Pn(i[t])&&t in r?e[t]=la(r[t],i[t],n):e[t]=i[t])}),e}function sa(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},i=r.baseClasses,n=r.newClasses;if(r.Component,!n)return i;var e=le({},i);return Object.keys(n).forEach(function(t){n[t]&&(e[t]="".concat(i[t]," ").concat(n[t]))}),e}var vt={set:function(i,n,e,t){var o=i.get(n);o||(o=new Map,i.set(n,o)),o.set(e,t)},get:function(i,n,e){var t=i.get(n);return t?t.get(e):void 0},delete:function(i,n,e){var t=i.get(n);t.delete(e)}},Cd=oe.createContext(null);function wd(){var r=oe.useContext(Cd);return r}var bd=typeof Symbol=="function"&&Symbol.for;const xd=bd?Symbol.for("mui.nested"):"__THEME_NESTED__";var _d=["checked","disabled","error","focused","focusVisible","required","expanded","selected"];function Rd(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},i=r.disableGlobal,n=i===void 0?!1:i,e=r.productionPrefix,t=e===void 0?"jss":e,o=r.seed,a=o===void 0?"":o,l=a===""?"":"".concat(a,"-"),s=0,c=function(){return s+=1,s};return function(d,f){var u=f.options.name;if(u&&u.indexOf("Mui")===0&&!f.options.link&&!n){if(_d.indexOf(d.key)!==-1)return"Mui-".concat(d.key);var p="".concat(l).concat(u,"-").concat(d.key);return!f.options.theme[xd]||a!==""?p:"".concat(p,"-").concat(c())}return"".concat(l).concat(t).concat(c())}}var ca=Date.now(),kn="fnValues"+ca,On="fnStyle"+ ++ca,Id=function(){return{onCreateRule:function(n,e,t){if(typeof e!="function")return null;var o=mr(n,{},t);return o[On]=e,o},onProcessStyle:function(n,e){if(kn in e||On in e)return n;var t={};for(var o in n){var a=n[o];typeof a=="function"&&(delete n[o],t[o]=a)}return e[kn]=t,n},onUpdate:function(n,e,t,o){var a=e,l=a[On];l&&(a.style=l(n)||{});var s=a[kn];if(s)for(var c in s)a.prop(c,s[c](n),o)}}},Xe="@global",Xn="@global ",Td=function(){function r(n,e,t){this.type="global",this.at=Xe,this.isProcessed=!1,this.key=n,this.options=t,this.rules=new pn(le({},t,{parent:this}));for(var o in e)this.rules.add(o,e[o]);this.rules.process()}var i=r.prototype;return i.getRule=function(e){return this.rules.get(e)},i.addRule=function(e,t,o){var a=this.rules.add(e,t,o);return a&&this.options.jss.plugins.onProcessRule(a),a},i.replaceRule=function(e,t,o){var a=this.rules.replace(e,t,o);return a&&this.options.jss.plugins.onProcessRule(a),a},i.indexOf=function(e){return this.rules.indexOf(e)},i.toString=function(e){return this.rules.toString(e)},r}(),Pd=function(){function r(n,e,t){this.type="global",this.at=Xe,this.isProcessed=!1,this.key=n,this.options=t;var o=n.substr(Xn.length);this.rule=t.jss.createRule(o,e,le({},t,{parent:this}))}var i=r.prototype;return i.toString=function(e){return this.rule?this.rule.toString(e):""},r}(),kd=/\s*,\s*/g;function da(r,i){for(var n=r.split(kd),e="",t=0;t<n.length;t++)e+=i+" "+n[t].trim(),n[t+1]&&(e+=", ");return e}function Od(r,i){var n=r.options,e=r.style,t=e?e[Xe]:null;if(t){for(var o in t)i.addRule(o,t[o],le({},n,{selector:da(o,r.selector)}));delete e[Xe]}}function zd(r,i){var n=r.options,e=r.style;for(var t in e)if(!(t[0]!=="@"||t.substr(0,Xe.length)!==Xe)){var o=da(t.substr(Xe.length),r.selector);i.addRule(o,e[t],le({},n,{selector:o})),delete e[t]}}function Dd(){function r(n,e,t){if(!n)return null;if(n===Xe)return new Td(n,e,t);if(n[0]==="@"&&n.substr(0,Xn.length)===Xn)return new Pd(n,e,t);var o=t.parent;return o&&(o.type==="global"||o.options.parent&&o.options.parent.type==="global")&&(t.scoped=!1),!t.selector&&t.scoped===!1&&(t.selector=n),null}function i(n,e){n.type!=="style"||!e||(Od(n,e),zd(n,e))}return{onCreateRule:r,onProcessRule:i}}var Gi=/\s*,\s*/g,Nd=/&/g,Md=/\$([\w-]+)/g;function Ld(){function r(t,o){return function(a,l){var s=t.getRule(l)||o&&o.getRule(l);return s?s.selector:l}}function i(t,o){for(var a=o.split(Gi),l=t.split(Gi),s="",c=0;c<a.length;c++)for(var d=a[c],f=0;f<l.length;f++){var u=l[f];s&&(s+=", "),s+=u.indexOf("&")!==-1?u.replace(Nd,d):d+" "+u}return s}function n(t,o,a){if(a)return le({},a,{index:a.index+1});var l=t.options.nestingLevel;l=l===void 0?1:l+1;var s=le({},t.options,{nestingLevel:l,index:o.indexOf(t)+1});return delete s.name,s}function e(t,o,a){if(o.type!=="style")return t;var l=o,s=l.options.parent,c,d;for(var f in t){var u=f.indexOf("&")!==-1,p=f[0]==="@";if(!(!u&&!p)){if(c=n(l,s,c),u){var h=i(f,l.selector);d||(d=r(s,a)),h=h.replace(Md,d);var v=l.key+"-"+f;"replaceRule"in s?s.replaceRule(v,t[f],le({},c,{selector:h})):s.addRule(v,t[f],le({},c,{selector:h}))}else p&&s.addRule(f,{},c).addRule(l.key,t[f],{selector:l.selector});delete t[f]}}return t}return{onProcessStyle:e}}var Ed=/[A-Z]/g,Ad=/^ms-/,zn={};function jd(r){return"-"+r.toLowerCase()}function ua(r){if(zn.hasOwnProperty(r))return zn[r];var i=r.replace(Ed,jd);return zn[r]=Ad.test(i)?"-"+i:i}function an(r){var i={};for(var n in r){var e=n.indexOf("--")===0?n:ua(n);i[e]=r[n]}return r.fallbacks&&(Array.isArray(r.fallbacks)?i.fallbacks=r.fallbacks.map(an):i.fallbacks=an(r.fallbacks)),i}function Fd(){function r(n){if(Array.isArray(n)){for(var e=0;e<n.length;e++)n[e]=an(n[e]);return n}return an(n)}function i(n,e,t){if(e.indexOf("--")===0)return n;var o=ua(e);return e===o?n:(t.prop(o,n),null)}return{onProcessStyle:r,onChangeValue:i}}var L=yr&&CSS?CSS.px:"px",Yt=yr&&CSS?CSS.ms:"ms",dt=yr&&CSS?CSS.percent:"%",Gd={"animation-delay":Yt,"animation-duration":Yt,"background-position":L,"background-position-x":L,"background-position-y":L,"background-size":L,border:L,"border-bottom":L,"border-bottom-left-radius":L,"border-bottom-right-radius":L,"border-bottom-width":L,"border-left":L,"border-left-width":L,"border-radius":L,"border-right":L,"border-right-width":L,"border-top":L,"border-top-left-radius":L,"border-top-right-radius":L,"border-top-width":L,"border-width":L,"border-block":L,"border-block-end":L,"border-block-end-width":L,"border-block-start":L,"border-block-start-width":L,"border-block-width":L,"border-inline":L,"border-inline-end":L,"border-inline-end-width":L,"border-inline-start":L,"border-inline-start-width":L,"border-inline-width":L,"border-start-start-radius":L,"border-start-end-radius":L,"border-end-start-radius":L,"border-end-end-radius":L,margin:L,"margin-bottom":L,"margin-left":L,"margin-right":L,"margin-top":L,"margin-block":L,"margin-block-end":L,"margin-block-start":L,"margin-inline":L,"margin-inline-end":L,"margin-inline-start":L,padding:L,"padding-bottom":L,"padding-left":L,"padding-right":L,"padding-top":L,"padding-block":L,"padding-block-end":L,"padding-block-start":L,"padding-inline":L,"padding-inline-end":L,"padding-inline-start":L,"mask-position-x":L,"mask-position-y":L,"mask-size":L,height:L,width:L,"min-height":L,"max-height":L,"min-width":L,"max-width":L,bottom:L,left:L,top:L,right:L,inset:L,"inset-block":L,"inset-block-end":L,"inset-block-start":L,"inset-inline":L,"inset-inline-end":L,"inset-inline-start":L,"box-shadow":L,"text-shadow":L,"column-gap":L,"column-rule":L,"column-rule-width":L,"column-width":L,"font-size":L,"font-size-delta":L,"letter-spacing":L,"text-decoration-thickness":L,"text-indent":L,"text-stroke":L,"text-stroke-width":L,"word-spacing":L,motion:L,"motion-offset":L,outline:L,"outline-offset":L,"outline-width":L,perspective:L,"perspective-origin-x":dt,"perspective-origin-y":dt,"transform-origin":dt,"transform-origin-x":dt,"transform-origin-y":dt,"transform-origin-z":dt,"transition-delay":Yt,"transition-duration":Yt,"vertical-align":L,"flex-basis":L,"shape-margin":L,size:L,gap:L,grid:L,"grid-gap":L,"row-gap":L,"grid-row-gap":L,"grid-column-gap":L,"grid-template-rows":L,"grid-template-columns":L,"grid-auto-rows":L,"grid-auto-columns":L,"box-shadow-x":L,"box-shadow-y":L,"box-shadow-blur":L,"box-shadow-spread":L,"font-line-height":L,"text-shadow-x":L,"text-shadow-y":L,"text-shadow-blur":L};function fa(r){var i=/(-[a-z])/g,n=function(a){return a[1].toUpperCase()},e={};for(var t in r)e[t]=r[t],e[t.replace(i,n)]=r[t];return e}var Wd=fa(Gd);function At(r,i,n){if(i==null)return i;if(Array.isArray(i))for(var e=0;e<i.length;e++)i[e]=At(r,i[e],n);else if(typeof i=="object")if(r==="fallbacks")for(var t in i)i[t]=At(t,i[t],n);else for(var o in i)i[o]=At(r+"-"+o,i[o],n);else if(typeof i=="number"&&isNaN(i)===!1){var a=n[r]||Wd[r];return a&&!(i===0&&a===L)?typeof a=="function"?a(i).toString():""+i+a:i.toString()}return i}function $d(r){r===void 0&&(r={});var i=fa(r);function n(t,o){if(o.type!=="style")return t;for(var a in t)t[a]=At(a,t[a],i);return t}function e(t,o){return At(o,t,i)}return{onProcessStyle:n,onChangeValue:e}}var Dt="",Yn="",ha="",pa="",Hd=Bt&&"ontouchstart"in document.documentElement;if(Bt){var Dn={Moz:"-moz-",ms:"-ms-",O:"-o-",Webkit:"-webkit-"},Ud=document.createElement("p"),Nn=Ud.style,Bd="Transform";for(var Mn in Dn)if(Mn+Bd in Nn){Dt=Mn,Yn=Dn[Mn];break}Dt==="Webkit"&&"msHyphens"in Nn&&(Dt="ms",Yn=Dn.ms,pa="edge"),Dt==="Webkit"&&"-apple-trailing-word"in Nn&&(ha="apple")}var ie={js:Dt,css:Yn,vendor:ha,browser:pa,isTouch:Hd};function Vd(r){return r[1]==="-"||ie.js==="ms"?r:"@"+ie.css+"keyframes"+r.substr(10)}var qd={noPrefill:["appearance"],supportedProperty:function(i){return i!=="appearance"?!1:ie.js==="ms"?"-webkit-"+i:ie.css+i}},Kd={noPrefill:["color-adjust"],supportedProperty:function(i){return i!=="color-adjust"?!1:ie.js==="Webkit"?ie.css+"print-"+i:i}},Xd=/[-\s]+(.)?/g;function Yd(r,i){return i?i.toUpperCase():""}function Cr(r){return r.replace(Xd,Yd)}function Qe(r){return Cr("-"+r)}var Qd={noPrefill:["mask"],supportedProperty:function(i,n){if(!/^mask/.test(i))return!1;if(ie.js==="Webkit"){var e="mask-image";if(Cr(e)in n)return i;if(ie.js+Qe(e)in n)return ie.css+i}return i}},Jd={noPrefill:["text-orientation"],supportedProperty:function(i){return i!=="text-orientation"?!1:ie.vendor==="apple"&&!ie.isTouch?ie.css+i:i}},Zd={noPrefill:["transform"],supportedProperty:function(i,n,e){return i!=="transform"?!1:e.transform?i:ie.css+i}},eu={noPrefill:["transition"],supportedProperty:function(i,n,e){return i!=="transition"?!1:e.transition?i:ie.css+i}},tu={noPrefill:["writing-mode"],supportedProperty:function(i){return i!=="writing-mode"?!1:ie.js==="Webkit"||ie.js==="ms"&&ie.browser!=="edge"?ie.css+i:i}},nu={noPrefill:["user-select"],supportedProperty:function(i){return i!=="user-select"?!1:ie.js==="Moz"||ie.js==="ms"||ie.vendor==="apple"?ie.css+i:i}},ru={supportedProperty:function(i,n){if(!/^break-/.test(i))return!1;if(ie.js==="Webkit"){var e="WebkitColumn"+Qe(i);return e in n?ie.css+"column-"+i:!1}if(ie.js==="Moz"){var t="page"+Qe(i);return t in n?"page-"+i:!1}return!1}},iu={supportedProperty:function(i,n){if(!/^(border|margin|padding)-inline/.test(i))return!1;if(ie.js==="Moz")return i;var e=i.replace("-inline","");return ie.js+Qe(e)in n?ie.css+e:!1}},ou={supportedProperty:function(i,n){return Cr(i)in n?i:!1}},au={supportedProperty:function(i,n){var e=Qe(i);return i[0]==="-"||i[0]==="-"&&i[1]==="-"?i:ie.js+e in n?ie.css+i:ie.js!=="Webkit"&&"Webkit"+e in n?"-webkit-"+i:!1}},lu={supportedProperty:function(i){return i.substring(0,11)!=="scroll-snap"?!1:ie.js==="ms"?""+ie.css+i:i}},su={supportedProperty:function(i){return i!=="overscroll-behavior"?!1:ie.js==="ms"?ie.css+"scroll-chaining":i}},cu={"flex-grow":"flex-positive","flex-shrink":"flex-negative","flex-basis":"flex-preferred-size","justify-content":"flex-pack",order:"flex-order","align-items":"flex-align","align-content":"flex-line-pack"},du={supportedProperty:function(i,n){var e=cu[i];return e&&ie.js+Qe(e)in n?ie.css+e:!1}},ga={flex:"box-flex","flex-grow":"box-flex","flex-direction":["box-orient","box-direction"],order:"box-ordinal-group","align-items":"box-align","flex-flow":["box-orient","box-direction"],"justify-content":"box-pack"},uu=Object.keys(ga),fu=function(i){return ie.css+i},hu={supportedProperty:function(i,n,e){var t=e.multiple;if(uu.indexOf(i)>-1){var o=ga[i];if(!Array.isArray(o))return ie.js+Qe(o)in n?ie.css+o:!1;if(!t)return!1;for(var a=0;a<o.length;a++)if(!(ie.js+Qe(o[0])in n))return!1;return o.map(fu)}return!1}},va=[qd,Kd,Qd,Jd,Zd,eu,tu,nu,ru,iu,ou,au,lu,su,du,hu],Wi=va.filter(function(r){return r.supportedProperty}).map(function(r){return r.supportedProperty}),pu=va.filter(function(r){return r.noPrefill}).reduce(function(r,i){return r.push.apply(r,_o(i.noPrefill)),r},[]),Nt,rt={};if(Bt){Nt=document.createElement("p");var Ln=window.getComputedStyle(document.documentElement,"");for(var En in Ln)isNaN(En)||(rt[Ln[En]]=Ln[En]);pu.forEach(function(r){return delete rt[r]})}function Qn(r,i){if(i===void 0&&(i={}),!Nt)return r;if(rt[r]!=null)return rt[r];(r==="transition"||r==="transform")&&(i[r]=r in Nt.style);for(var n=0;n<Wi.length&&(rt[r]=Wi[n](r,Nt.style,i),!rt[r]);n++);try{Nt.style[r]=""}catch{return!1}return rt[r]}var ut={},gu={transition:1,"transition-property":1,"-webkit-transition":1,"-webkit-transition-property":1},vu=/(^\s*[\w-]+)|, (\s*[\w-]+)(?![^()]*\))/g,He;function mu(r,i,n){if(i==="var")return"var";if(i==="all")return"all";if(n==="all")return", all";var e=i?Qn(i):", "+Qn(n);return e||i||n}Bt&&(He=document.createElement("p"));function $i(r,i){var n=i;if(!He||r==="content")return i;if(typeof n!="string"||!isNaN(parseInt(n,10)))return n;var e=r+n;if(ut[e]!=null)return ut[e];try{He.style[r]=n}catch{return ut[e]=!1,!1}if(gu[r])n=n.replace(vu,mu);else if(He.style[r]===""&&(n=ie.css+n,n==="-ms-flex"&&(He.style[r]="-ms-flexbox"),He.style[r]=n,He.style[r]===""))return ut[e]=!1,!1;return He.style[r]="",ut[e]=n,ut[e]}function Su(){function r(t){if(t.type==="keyframes"){var o=t;o.at=Vd(o.at)}}function i(t){for(var o in t){var a=t[o];if(o==="fallbacks"&&Array.isArray(a)){t[o]=a.map(i);continue}var l=!1,s=Qn(o);s&&s!==o&&(l=!0);var c=!1,d=$i(s,ot(a));d&&d!==a&&(c=!0),(l||c)&&(l&&delete t[o],t[s||o]=d||a)}return t}function n(t,o){return o.type!=="style"?t:i(t)}function e(t,o){return $i(o,ot(t))||t}return{onProcessRule:r,onProcessStyle:n,onChangeValue:e}}function yu(){var r=function(n,e){return n.length===e.length?n>e?1:-1:n.length-e.length};return{onProcessStyle:function(n,e){if(e.type!=="style")return n;for(var t={},o=Object.keys(n).sort(r),a=0;a<o.length;a++)t[o[a]]=n[o[a]];return t}}}function Cu(){return{plugins:[Id(),Dd(),Ld(),Fd(),$d(),typeof window>"u"?null:Su(),yu()]}}var wu=oa(Cu()),bu=Rd(),xu=new Map,_u={disableGeneration:!1,generateClassName:bu,jss:wu,sheetsCache:null,sheetsManager:xu,sheetsRegistry:null},Ru=oe.createContext(_u),Hi=-1e9;function Iu(){return Hi+=1,Hi}var Tu={};function Pu(r){var i=typeof r=="function";return{create:function(e,t){var o;try{o=i?r(e):r}catch(s){throw s}if(!t||!e.overrides||!e.overrides[t])return o;var a=e.overrides[t],l=le({},o);return Object.keys(a).forEach(function(s){l[s]=la(l[s],a[s])}),l},options:{}}}function ku(r,i,n){var e=r.state,t=r.stylesOptions;if(t.disableGeneration)return i||{};e.cacheClasses||(e.cacheClasses={value:null,lastProp:null,lastJSS:{}});var o=!1;return e.classes!==e.cacheClasses.lastJSS&&(e.cacheClasses.lastJSS=e.classes,o=!0),i!==e.cacheClasses.lastProp&&(e.cacheClasses.lastProp=i,o=!0),o&&(e.cacheClasses.value=sa({baseClasses:e.cacheClasses.lastJSS,newClasses:i,Component:n})),e.cacheClasses.value}function Ou(r,i){var n=r.state,e=r.theme,t=r.stylesOptions,o=r.stylesCreator,a=r.name;if(!t.disableGeneration){var l=vt.get(t.sheetsManager,o,e);l||(l={refs:0,staticSheet:null,dynamicStyles:null},vt.set(t.sheetsManager,o,e,l));var s=le({},o.options,t,{theme:e,flip:typeof t.flip=="boolean"?t.flip:e.direction==="rtl"});s.generateId=s.serverGenerateClassName||s.generateClassName;var c=t.sheetsRegistry;if(l.refs===0){var d;t.sheetsCache&&(d=vt.get(t.sheetsCache,o,e));var f=o.create(e,a);d||(d=t.jss.createStyleSheet(f,le({link:!1},s)),d.attach(),t.sheetsCache&&vt.set(t.sheetsCache,o,e,d)),c&&c.add(d),l.staticSheet=d,l.dynamicStyles=aa(f)}if(l.dynamicStyles){var u=t.jss.createStyleSheet(l.dynamicStyles,le({link:!0},s));u.update(i),u.attach(),n.dynamicSheet=u,n.classes=sa({baseClasses:l.staticSheet.classes,newClasses:u.classes}),c&&c.add(u)}else n.classes=l.staticSheet.classes;l.refs+=1}}function zu(r,i){var n=r.state;n.dynamicSheet&&n.dynamicSheet.update(i)}function Du(r){var i=r.state,n=r.theme,e=r.stylesOptions,t=r.stylesCreator;if(!e.disableGeneration){var o=vt.get(e.sheetsManager,t,n);o.refs-=1;var a=e.sheetsRegistry;o.refs===0&&(vt.delete(e.sheetsManager,t,n),e.jss.removeStyleSheet(o.staticSheet),a&&a.remove(o.staticSheet)),i.dynamicSheet&&(e.jss.removeStyleSheet(i.dynamicSheet),a&&a.remove(i.dynamicSheet))}}function Nu(r,i){var n=oe.useRef([]),e,t=oe.useMemo(function(){return{}},i);n.current!==t&&(n.current=t,e=r()),oe.useEffect(function(){return function(){e&&e()}},[t])}function Mu(r){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=i.name,e=i.classNamePrefix,t=i.Component,o=i.defaultTheme,a=o===void 0?Tu:o,l=pt(i,["name","classNamePrefix","Component","defaultTheme"]),s=Pu(r),c=n||e||"makeStyles";s.options={index:Iu(),name:n,meta:c,classNamePrefix:c};var d=function(){var u=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},p=wd()||a,h=le({},oe.useContext(Ru),l),v=oe.useRef(),y=oe.useRef();Nu(function(){var C={name:n,state:{},stylesCreator:s,stylesOptions:h,theme:p};return Ou(C,u),y.current=!1,v.current=C,function(){Du(C)}},[p,s]),oe.useEffect(function(){y.current&&zu(v.current,u),y.current=!0});var _=ku(v.current,u.classes,t);return _};return d}const Lu=Object.freeze(Object.defineProperty({__proto__:null,default:Mu},Symbol.toStringTag,{value:"Module"})),Eu=ln(Lu);var Au=nn.exports,Ui;function ju(){return Ui||(Ui=1,function(r,i){(function(n,e){r.exports=e()})(typeof self<"u"?self:Au,function(){return function(n){function e(o){if(t[o])return t[o].exports;var a=t[o]={i:o,l:!1,exports:{}};return n[o].call(a.exports,a,a.exports,e),a.l=!0,a.exports}var t={};return e.m=n,e.c=t,e.d=function(o,a,l){e.o(o,a)||Object.defineProperty(o,a,{configurable:!1,enumerable:!0,get:l})},e.n=function(o){var a=o&&o.__esModule?function(){return o.default}:function(){return o};return e.d(a,"a",a),a},e.o=function(o,a){return Object.prototype.hasOwnProperty.call(o,a)},e.p="",e(e.s=3)}([function(n,e){n.exports=Qi()},function(n,e){n.exports=Ji()},function(n,e){n.exports=Eu},function(n,e,t){function o(d){return d&&d.__esModule?d:{default:d}}Object.defineProperty(e,"__esModule",{value:!0});var a=t(4),l=o(a),s=t(6),c=o(s);e.default={isVirtualized:!1,nodeContentRenderer:l.default,scaffoldBlockPxWidth:25,treeNodeRenderer:c.default}},function(n,e,t){function o(C){return C&&C.__esModule?C:{default:C}}function a(C,z){return!!C.children&&typeof C.children!="function"&&C.children.some(function(D){return D===z||a(D,z)})}function l(C){var z=C.scaffoldBlockPxWidth,D=C.connectDragPreview,M=C.connectDragSource,R=C.isDragging,I=C.canDrop,g=C.canDrag,w=C.node,S=C.title,O=C.draggedNode,j=C.path,U=C.treeIndex,q=C.isSearchMatch,A=C.isSearchFocus,W=C.icons,H=C.buttons,V=C.className,K=C.style,J=C.didDrop,X=C.lowerSiblingCounts,Z=C.listIndex,B=C.swapFrom,Q=C.swapLength,te=C.swapDepth,F=C.onItemClick,G=_(),N=S||w.title,T=O&&a(O,w),x=!J&&R,$=[];X.forEach(function(ee,se){if(se>0&&($.push(d.default.createElement("div",{className:G.lineBlock,key:"pre_"+(1+se),style:{width:z}})),U!==Z&&se===te)){var fe="";fe=Z===B+Q-1?G.highlightBottomLeftCorner:U===B?G.highlightTopLeftCorner:G.highlightLineVertical,$.push(d.default.createElement("div",{className:G.absoluteLineBlock+" "+fe,key:"highlight_"+(1+se),style:{left:z*se,width:z}}))}});var Y=d.default.createElement("div",{className:G.contentNode},D(d.default.createElement("div",{className:G.row+(w.active?" "+G.activeRow:"")+(x?" "+G.rowLandingPad:"")+(R?" "+G.rowLandingPadDisable:"")+(x&&!I?" "+G.rowCancelPad:"")+(q?" "+G.rowSearchMatch:"")+(A?" "+G.rowSearchFocus:"")+(g?"":" "+G.rowWrapperDragDisabled)+(V?" "+V:""),onClick:function(){return F?F(s({},w,{index:U})):null},style:s({opacity:T?.5:1},K)},w.type==="divider"?d.default.createElement("div",{className:G.divider}):d.default.createElement(c.Fragment,null,$,d.default.createElement("div",{className:G.rowIcon},W),d.default.createElement("div",{className:G.rowLabel},typeof N=="string"?d.default.createElement("span",{className:G.rowTitle},N):typeof N=="function"?N({node:w,path:j,treeIndex:U}):N),d.default.createElement("div",{className:G.rowToolbar},H)))));return g?M(Y,{dropEffect:"copy"}):Y}Object.defineProperty(e,"__esModule",{value:!0});var s=Object.assign||function(C){for(var z=1;z<arguments.length;z++){var D=arguments[z];for(var M in D)Object.prototype.hasOwnProperty.call(D,M)&&(C[M]=D[M])}return C},c=t(0),d=o(c),f=t(1),u=o(f),p=t(2),h=o(p),v=t(5),y=o(v),_=(0,h.default)(y.default,{name:"MuiNodeContent"});l.defaultProps={buttons:null,canDrag:!1,canDrop:!1,className:"",draggedNode:null,icons:null,isSearchFocus:!1,isSearchMatch:!1,parentNode:null,style:{},swapDepth:null,swapFrom:null,swapLength:null,title:null,toggleChildrenVisibility:null},l.propTypes={buttons:u.default.node,canDrag:u.default.bool,canDrop:u.default.bool,className:u.default.string,connectDragPreview:u.default.func.isRequired,connectDragSource:u.default.func.isRequired,didDrop:u.default.bool.isRequired,draggedNode:u.default.shape({}),icons:u.default.node,isDragging:u.default.bool.isRequired,isOver:u.default.bool.isRequired,isSearchFocus:u.default.bool,isSearchMatch:u.default.bool,listIndex:u.default.number.isRequired,lowerSiblingCounts:u.default.arrayOf(u.default.number).isRequired,node:u.default.shape({}).isRequired,parentNode:u.default.shape({}),path:u.default.arrayOf(u.default.oneOfType([u.default.string,u.default.number])).isRequired,rowDirection:u.default.string.isRequired,scaffoldBlockPxWidth:u.default.number.isRequired,style:u.default.shape({}),swapDepth:u.default.number,swapFrom:u.default.number,swapLength:u.default.number,title:u.default.oneOfType([u.default.func,u.default.node]),toggleChildrenVisibility:u.default.func,treeId:u.default.string.isRequired,treeIndex:u.default.number.isRequired},e.default=l},function(n,e,t){Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(){return{"@keyframes arrow-pulse":{"0%":{opacity:0,transform:"translate(0, 0)"},"100%":{opacity:0,transform:"translate(0, 1000%)"},"30%":{opacity:1,transform:"translate(0, 300%)"},"70%":{opacity:1,transform:"translate(0, 700%)"}},absoluteLineBlock:{position:"absolute",top:0},activeRow:{},collapseButton:{},contentNode:{width:"100%"},divider:{backgroundColor:"#D8D8D8",height:1,width:"100%"},expandButton:{},highlightBottomLeftCorner:{zIndex:3},highlightLineVertical:{zIndex:3},highlightTopLeftCorner:{},lineBlock:{display:"inline-block",flex:"0 0 auto",height:"100%",position:"relative"},lineChildren:{display:"inline-block",height:"100%"},nodeContent:{"& $collapseButton, & $expandButton":{"&::after":{border:"solid transparent 10px",borderLeftWidth:7,borderRightWidth:7,borderTopColor:"gray",content:'""',position:"absolute",transform:"translate3d(-50%, -20%, 0)",transformOrigin:"7px 4px"},"&:focus":{"&::after":{filter:"drop-shadow(0 0 1px #83bef9) drop-shadow(0 0 1px #83bef9) drop-shadow(0 0 1px #83bef9)"},outline:"none"},"&:hover::after":{borderTopColor:"black"},appearance:"none",background:"transparent",border:"none",cursor:"pointer",height:30,padding:0,position:"absolute",top:"45%",transform:"translate3d(-50%, -50%, 0)",width:30,zIndex:2},"& $lineBlock, & $absoluteLineBlock":{display:"inline-block",flex:"0 0 auto",height:"100%",position:"relative"},"& $rowContents":{alignItems:"center",borderRadius:"3px",color:"#595959",display:"flex",height:"100%",justifyContent:"space-between",padding:10,position:"relative"}},row:{"& $rowIcon, & $rowLabel,& $rowToolbar":{alignItems:"center",display:"flex"},"& $rowLabel":{flex:1,overflow:"hidden",padding:"0px 6px"},"& $rowToolbar":{cursor:"pointer"},"&$activeRow":{backgroundColor:"#F3FBFF",color:"#1890FF"},"&$rowCancelPad":{"&::before":{backgroundColor:"#ffd2d6",border:"2px dotted #e6a8ad"}},"&$rowLandingPad":{"&::before":{backgroundColor:"#dddddd",border:"2px dotted #b5b5b5"}},"&$rowLandingPad, &$rowCancelPad":{"& *":{opacity:".6 !important"},"&::before":{bottom:0,content:'""',left:0,position:"absolute",right:0,top:0,zIndex:-1},backgroundColor:"transparent",border:"none",boxShadow:"none",outline:"none"},"&$rowLandingPadDisable":{"&:hover":{backgroundColor:"white"}},backgroundColor:"white",cursor:"grab",display:"flex",flex:1,padding:6,position:"relative"},rowCancelPad:{},rowContents:{},rowIcon:{color:"#D9D9D9"},rowLabel:{},rowLandingPad:{},rowLandingPadDisable:{},rowSearchFocus:{boxShadow:"inset 0 -7px 7px -3px #fc6421"},rowSearchMatch:{boxShadow:"inset 0 -7px 7px -3px #0080ff"},rowToolbar:{},rowWrapper:{"&:active":{backgroundColor:"transparent"},"&:hover":{backgroundColor:"#F3FBFF"},boxSizing:"border-box",cursor:"grab",display:"flex",height:"100%"},rowWrapperDragDisabled:{cursor:"default"}}}},function(n,e,t){function o(y){return y&&y.__esModule?y:{default:y}}function a(y){var _=y.children,C=y.listIndex,z=y.swapFrom,D=y.swapLength,M=y.swapDepth,R=y.lowerSiblingCounts,I=y.connectDropTarget,g=y.isOver,w=y.draggedNode,S=y.canDrop,O=v();return I(s.default.createElement("div",{className:O.node},l.Children.map(_,function(j){return(0,l.cloneElement)(j,{canDrop:S,draggedNode:w,isOver:g,listIndex:C,lowerSiblingCounts:R,swapDepth:M,swapFrom:z,swapLength:D})})))}Object.defineProperty(e,"__esModule",{value:!0});var l=t(0),s=o(l),c=t(1),d=o(c),f=t(2),u=o(f),p=t(7),h=o(p),v=(0,u.default)(h.default,{name:"MuiTreeNode"});a.defaultProps={canDrop:!1,draggedNode:null,swapDepth:null,swapFrom:null,swapLength:null},a.propTypes={canDrop:d.default.bool,children:d.default.node.isRequired,connectDropTarget:d.default.func.isRequired,draggedNode:d.default.shape({}),getPrevRow:d.default.func.isRequired,isOver:d.default.bool.isRequired,listIndex:d.default.number.isRequired,lowerSiblingCounts:d.default.arrayOf(d.default.number).isRequired,node:d.default.shape({}).isRequired,path:d.default.arrayOf(d.default.oneOfType([d.default.string,d.default.number])).isRequired,rowDirection:d.default.string.isRequired,scaffoldBlockPxWidth:d.default.number.isRequired,swapDepth:d.default.number,swapFrom:d.default.number,swapLength:d.default.number,treeId:d.default.string.isRequired,treeIndex:d.default.number.isRequired},e.default=a},function(n,e,t){Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(){return{node:{display:"flex"}}}}])})}(nn)),nn.exports}var Fu=ju();const Gu=sn(Fu);function wr(r=["en","zh"]){const{blocklet:i}=at();return k.useMemo(()=>{const e=i.environments.find(c=>c.key==="BLOCKLET_APP_LANGUAGES"),t=e?e.value.split(","):r,o=t[0]||"en",a=t.filter(c=>Ve.SUPPORTED_LANGUAGES[c]),l=a.reduce((c,d)=>(c[d]=Ve.SUPPORTED_LANGUAGES[d].nativeName,c),{}),s=a.map(c=>({code:c,name:Ve.SUPPORTED_LANGUAGES[c].nativeName}));return{locales:t,localeMap:l,defaultLocale:o,languages:s}},[i.environments,r])}const Wu=r=>r.from!=="team-tmpl";function $u({prevPath:r,nextPath:i,node:n}){if(n.from==="team-tmpl")return!1;const e=r.length,t=i.length;return!!(e===t&&cl(r.slice(0,e-1),i.slice(0,t-1)))}function ma({treeNode:r}){const{locale:i}=Oe(),{blocklet:n}=at(),{defaultLocale:e}=wr(),t=n.environments.find(l=>l.key===Ve.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_URL),o=re(l=>{if(l?.startsWith("/"))try{return new URL(l,t?.value).href}catch{console.error("Failed to parse url",{url:l,origin:t?.value})}return l});function a(){const{title:l,subtitle:s}=r;let c=l,d=s;return ht(l)&&(c=l[i]||l[e]||l.en),!k.isValidElement(s)&&ht(s)&&(d=s[i]||s[e]||s.en),m.jsxs(ce,{sx:{display:"flex",alignItems:"center"},children:[m.jsx(Te,{variant:"subtitle1",sx:{fontSize:16},children:c}),s&&m.jsx(Te,{variant:"body2",color:"gray",sx:{ml:1.5,lineHeight:1},children:d})]})}return m.jsxs(m.Fragment,{children:[r.icon&&(rr(o(r.icon))?m.jsx(nt,{size:16,style:{marginRight:4},icon:o(r.icon)}):m.jsx(me,{size:16,style:{marginRight:4},icon:r.icon})),a()]})}ma.propTypes={treeNode:b.object.isRequired};const Hu=Je(ce)(({theme:r})=>({"& .MuiNodeContent-row":{backgroundColor:r.palette.background.default}}));function Sa({treeData:r,setTreeData:i=()=>{},renderActions:n=()=>{}}){const e=r.map(o=>({...o,expanded:!0})),t={};return typeof window<"u"&&(t.context=window),m.jsx(Hu,{children:m.jsx(Ka,{backend:Xa,...t,children:m.jsx(Lc,{generateNodeProps:o=>{const a=Wu(o.node);return{buttons:n({data:o.node,className:"list-item-actions"}),icons:a?m.jsx(me,{icon:"ic:round-drag-indicator"}):m.jsx(ce,{sx:{width:16,height:16}}),title:m.jsx(ma,{treeNode:o.node})}},maxDepth:2,isVirtualized:!1,treeData:e,onChange:i,canDrop:$u,theme:Gu})})})}Sa.propTypes={treeData:b.object.isRequired,setTreeData:b.func,renderActions:b.func};var Uu=so();const Bu=sn(Uu);function ya({sx:r=null,onAdd:i=()=>{},onChange:n=()=>{},defaultLocale:e="en",locale:t="",locales:o=[],localeMap:a={},onRemoveLocale:l=()=>{}}){const{t:s}=Oe(),c=k.useRef(),[d,f]=k.useState(null),u=Gt({localeList:[],inputLocale:"",localeError:""}),p=k.useMemo(()=>!!d,[d]),h=k.useMemo(()=>o.includes(t)?t:e,[o,t]),v=k.useMemo(()=>u.localeList.filter(g=>!!a[g]),[u.localeList,a]),y=k.useMemo(()=>Object.keys(Mt(a,[...u.localeList,e])).map(g=>({title:a[g],value:g})),[u.localeList]),_=k.useMemo(()=>`Default (${a[e]||Object.values(a)?.[0]})`,[a]),C=re(g=>g?g===e||u.localeList.includes(g)?s("navigation.form.localeExists",{value:g}):!0:s("common.requiredErrorText",{name:"Locale"})),z=re((g="")=>{const w=g?.trim(),S=C(w);return S!==!0?u.localeError=S:u.localeError="",S}),D=re(()=>{f(null),u.inputLocale="",u.localeError=""}),M=re(()=>{const g=u.inputLocale?.trim();z(g)===!0&&(D(),u.localeList.push(g),i(g))}),R=re((g,w)=>{g.preventDefault(),g.stopPropagation(),u.localeList=lo(u.localeList,w),l(w)}),I=re(g=>{const{value:w}=g.target;z(w),u.inputLocale=w});return k.useEffect(()=>{u.localeList=[...o]},[o,u]),el("enter",()=>{setTimeout(()=>{M()})},{target:c}),m.jsxs(m.Fragment,{children:[m.jsxs(Oa,{sx:r,value:h,onChange:(g,w)=>{n(w)},children:[m.jsx(Ir,{label:_,value:e}),v.map(g=>m.jsx(Ir,{sx:{position:"relative"},label:m.jsxs(m.Fragment,{children:[a[g],m.jsx(ke,{size:"small",color:"inherit",sx:{position:"absolute",top:0,right:0},onClick:w=>{R(w,g)},children:m.jsx(me,{icon:"mdi:close",height:14})})]}),value:g},g)),m.jsx(ke,{color:"primary",disableFocusRipple:!0,sx:{width:"48px"},onClick:g=>{f(g.currentTarget)},children:m.jsx(me,{icon:"mdi:plus"})})]}),m.jsx(An,{open:p,anchorEl:d,onClose:D,anchorOrigin:{vertical:"bottom",horizontal:"left"},children:m.jsxs(ce,{sx:{p:2,width:"270px"},children:[m.jsx(Te,{variant:"subtitle2",children:s("navigation.form.localePlaceholder")}),m.jsx(ce,{sx:{mt:1},children:m.jsx(Fn,{required:!0,fullWidth:!0,label:"Locale",value:u.inputLocale,options:y,onChange:I,error:!!u.localeError,helperText:u.localeError||" "})}),m.jsx(ce,{sx:{display:"flex",justifyContent:"flex-end"},children:m.jsx(rn,{size:"small",variant:"contained",onClick:M,children:s("common.confirm")})})]})})]})}ya.propTypes={sx:b.any,onAdd:b.func,onChange:b.func,onRemoveLocale:b.func,defaultLocale:b.string,locale:b.string,localeMap:b.object,locales:b.array};const br=["https://api.iconify.design","https://api.unisvg.com","https://api.simplesvg.com"];async function Ca(r,i,n=5e3){for(const e of br){const t=Ye(e,r);try{return await Nl.get(t,{params:i,timeout:n})}catch(o){console.warn(`Failed to fetch from ${t}:`,o)}}throw new Error(`All icon API endpoints ${r} failed`)}async function Vu({keyword:r,limit:i=999,start:n=0,palette:e=!1}){let t="",o=r;r.includes(":")&&([t,o]=r.split(":"));const{data:a}=await Ca("/search",{query:`${o} palette=${e}`||r,start:n,limit:i,...t&&{prefix:t}});return a}const Qt=new Map;async function qu(r){if(Qt.has(r))return Qt.get(r);const i=(async()=>{const{data:n}=await Ca("/collection",{prefix:r}),e=new Set;return n.uncategorized?.forEach(t=>e.add(`${r}:${t}`)),Object.values(n.categories??{}).forEach(t=>{t.forEach(o=>e.add(`${r}:${o}`))}),Array.from(e)})();Qt.set(r,i);try{return await i}catch(n){throw Qt.delete(r),n}}function Ku(r){return Ye(br[0],`${r}.svg`)}function Xu(r){try{const i=new URL(r);for(const n of br)if(i.origin===n)return dl(i.pathname).replace(".svg","");return""}catch{return""}}function Yu(r){let i=!0,n=r;return r&&(r.startsWith("/")?(i=!1,n=""):rr(r)&&(n=Xu(r))),{isIconId:i,iconId:n}}const Qu=k.lazy(()=>Ya(()=>import("./index-CBB-6wLp.js"),__vite__mapDeps([0,1,2]),import.meta.url).then(r=>({default:r.Uploader}))),Bi=nr(nt)(({theme:r})=>({"&&":{color:r.palette.text.primary},"> img":{filter:r.palette.mode==="dark"?"invert(1)":"none"}}));function wa({icon:r,...i}){const[n,e]=k.useState(!1);return oo(async()=>{e(!1),await ro(r),e(!0)},[r]),r?n?m.jsx(me,{icon:r,...i}):m.jsx(me,{color:"#f06f6e",icon:"ic:baseline-error",...i}):m.jsx(me,{icon:"material-symbols-light:select-rounded",...i})}wa.propTypes={icon:b.string.isRequired};function Jn({value:r,helperText:i,label:n,placeholder:e,methods:t=["select"],iconifyShape:o="id",...a}){const{getSessionInHeader:l,prefix:s,inService:c}=co(),{blocklet:d}=at(),f=tr(Z=>Z.breakpoints.down("md")),u=d.environments.find(Z=>Z.key===Ve.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_URL),p=l(),h=k.useRef(null),v=k.useRef(null),y=k.useRef(null),{t:_,locale:C}=Oe(),{isIconId:z,iconId:D}=Yu(r),[M,R]=k.useState(null),{onChange:I,onBlur:g,sx:w,...S}=a,O=t.includes("upload"),j=t.includes("select"),U=Ye(s,"/api/media/upload",d.appPid),q=Gt({showPopover:!1}),A=re(Z=>{if(Z?.startsWith("/"))try{const B=c?window.location.origin:u?.value;return new URL(Z,B).href}catch{console.error("Failed to resolve url: ",Z)}return Z},[u?.value,c]),W=re(async Z=>await h.current.getUploader().uploadFile(Z)),H=re(()=>{R(null)}),V=re(()=>{j&&R(y.current)}),K=re(async Z=>{try{if(o==="url"){const B=Ku(Z),Q=await bl(B,{width:128,height:128}),te=await xl(Q,Z);await W(te)}else I?.(Z)}catch(B){console.error("Failed to pick icon:",B)}H()}),J=re(Z=>{Z.stopPropagation(),v.current.open(),H()}),X=re(Z=>{a?.onChange?.(Z.data.url)});return m.jsxs(m.Fragment,{children:[m.jsx(ft,{helperText:i,value:r,sx:{"& .MuiInputBase-root,.MuiInputBase-input":{cursor:"pointer"},...w},onClick:j?V:void 0,...S,label:n,placeholder:e,slotProps:{input:{ref:y,readOnly:!0,startAdornment:m.jsx(jn,{position:"start",sx:{cursor:"auto"},onMouseEnter:()=>{r&&(q.showPopover=!0)},onMouseLeave:()=>{q.showPopover=!1},children:m.jsx(Bi,{size:28,icon:A(r),alt:"Error"})}),endAdornment:m.jsxs(jn,{position:"end",children:[m.jsx(ke,{sx:{visibility:r?"visible":"hidden"},onClick:Z=>{Z.stopPropagation(),I("")},children:m.jsx(to,{style:{fontSize:18}})}),O&&m.jsx(za,{title:_("common.upload"),children:m.jsx(ke,{disableFocusRipple:!1,disableRipple:!1,onClick:J,children:m.jsx(wa,{icon:"material-symbols:upload-file-outline-rounded",width:24,height:24})})}),j&&m.jsx(ce,{component:Da,sx:{mr:"-6px",fontSize:24,transform:M?"rotate(180deg)":"rotate(0deg)",transition:"transform 200ms",pointerEvents:"none"}})]})}}}),j&&m.jsx(An,{open:!!M,anchorEl:M,anchorOrigin:{vertical:"bottom",horizontal:"left"},transformOrigin:{vertical:"top",horizontal:"left"},slotProps:{paper:{style:{...f&&{width:"100vw",height:"100vh",boxShadow:"none"}}}},onClose:H,children:m.jsx(ba,{label:n,placeholder:e,value:z?D:"",sx:{width:y.current?.offsetWidth??"auto"},onPick:K,onClose:H})}),m.jsx(Zn,{ref:h,locale:C,apiPath:U,headers:p,imageEditorProps:{},onUploadFinish:X}),m.jsx(Zn,{ref:v,locale:C,apiPath:U,headers:p,onUploadFinish:X}),m.jsx(An,{sx:{pointerEvents:"none"},open:q.showPopover,anchorEl:y.current,anchorOrigin:{vertical:"top",horizontal:"left"},transformOrigin:{vertical:"bottom",horizontal:"center"},onClose:()=>{q.showPopover=!1},disableRestoreFocus:!0,children:m.jsx(Bi,{size:120,icon:A(r),alt:"Error"})})]})}Jn.propTypes={value:b.string.isRequired,label:b.any,placeholder:b.any,helperText:b.string,methods:b.arrayOf(b.oneOf(["select","upload"])),iconifyShape:b.oneOf(["id","url"])};function ba({label:r,placeholder:i,value:n="",sx:e,onPick:t,onClose:o,...a}){const[l,s]=k.useState([]),[c,d]=k.useState(!0),[f,u]=k.useState(n),[p,h]=k.useState(!1),v=k.useRef(null),y=k.useRef([]),_=k.useRef(1),C=k.useRef(!0),{t:z}=Oe(),D=96,M=re(()=>{!C.current||c||(d(!0),setTimeout(()=>{const g=_.current+1,w=(g-1)*D,S=g*D,O=y.current.slice(w,S);s(j=>[...j,...O]),_.current=g,C.current=S<y.current.length,d(!1)},300))}),R=re(g=>{y.current=g,_.current=1,C.current=g.length>D;const w=g.slice(0,D);s(w),h(g.length===0),C.current&&M()}),{run:I}=ao(async g=>{if(g){d(!0);try{const{icons:w}=await Vu({keyword:g});R(w)}catch(w){console.error("Failed to search icons:",w),h(!0)}finally{d(!1)}}},{wait:300,trailing:!0});return k.useEffect(()=>{const g=()=>{if(!v.current)return;const{scrollTop:S,scrollHeight:O,clientHeight:j}=v.current;(S+j>=O-150||O<=j)&&M()},w=v.current;return w&&(w.addEventListener("scroll",g),g()),()=>{w&&w.removeEventListener("scroll",g)}},[M,c]),oo(async()=>{if(f)I(f);else{d(!0);try{const g=await qu("mdi-light");R(g)}catch(g){console.error("Failed to fetch default icons:",g),h(!0)}finally{d(!1)}}},[f,I,R]),m.jsxs(Ju,{ref:v,sx:e,...a,children:[m.jsxs(ce,{className:"icon-picker-input",children:[m.jsx(ft,{label:z("navigation.form.searchIcons"),placeholder:z("navigation.form.searchIconsPlaceholder"),size:"small",value:f,sx:{flexGrow:1},autoFocus:!0,onChange:g=>u(g.target.value),slotProps:{input:{endAdornment:m.jsx(ke,{sx:{visibility:f?"visible":"hidden"},onClick:()=>u(""),children:m.jsx(to,{style:{fontSize:18}})})}}}),m.jsx(rn,{onClick:o,children:z("common.cancel")})]}),m.jsxs(ce,{children:[l.length>0&&m.jsx(ce,{sx:{display:"grid",gridTemplateColumns:"repeat(auto-fill, minmax(32px, auto))",gridAutoRows:"min-content",alignItems:"center",gap:1,p:2},children:l.map(g=>m.jsx(Zu,{$active:n===g,onClick:()=>{t(g)},children:m.jsx(me,{icon:g,width:"32",height:"32"})},g))}),p&&m.jsx(ce,{sx:{p:2,display:"flex",justifyContent:"center",alignItems:"center",height:"100%"},children:m.jsx(ce,{sx:{textAlign:"center"},children:"No matching results"})}),c&&m.jsx(ce,{sx:{p:2,display:"flex",justifyContent:"center"},children:m.jsx(Na,{size:20})})]})]})}ba.propTypes={label:b.any,placeholder:b.any,value:b.string,sx:b.object,onPick:b.func.isRequired,onClose:b.func.isRequired};const Ju=nr(ce)(({theme:r})=>({minWidth:"100%",height:"100%",padding:0,overflow:"auto",[r.breakpoints.up("md")]:{minWidth:"480px",maxHeight:"400px",padding:r.spacing(1),paddingTop:0,".icon-picker-input":{paddingTop:r.spacing(2),paddingBottom:r.spacing(1),paddingLeft:r.spacing(2),paddingRight:r.spacing(2)}},".icon-picker-input":{position:"sticky",display:"flex",alignItems:"center",gap:r.spacing(1),top:0,zIndex:1,backgroundColor:r.palette.background.paper}})),Zu=nr(ke,{shouldForwardProp:r=>r!=="$active"})(({$active:r,theme:i})=>({boxSizing:"content-box",backgroundColor:r?i.palette.action.hover:"transparent",borderRadius:4,padding:1,width:32,height:32,"&:hover":{backgroundColor:i.palette.action.hover}}));function Zn({ref:r=null,locale:i,apiPath:n,headers:e,imageEditorProps:t={actions:{revert:!0,rotate:!0,granularRotate:!0,flip:!0,zoomIn:!0,zoomOut:!0,cropSquare:!1,cropWidescreen:!1,cropWidescreenVertical:!1},cropperOptions:{autoCrop:!0,autoCropArea:1,aspectRatio:1,initialAspectRatio:1,croppedCanvasOptions:{minWidth:120,minHeight:120}}},onUploadFinish:o}){return m.jsx(k.Suspense,{children:m.jsx(Qu,{locale:i,ref:r,popup:!0,installerProps:{disabled:!0},plugins:["ImageEditor"],onUploadFinish:a=>o?.(a),coreProps:{restrictions:{allowedFileTypes:["image/*"],maxFileSize:1024*1024*1,maxNumberOfFiles:1}},dashboardProps:{autoOpen:"imageEditor"},imageEditorProps:t,apiPathProps:{uploader:n,disableMediaKitPrefix:!0,disableAutoPrefix:!0,disableMediaKitStatus:!0},tusProps:{headers:e}})})}Zn.propTypes={ref:b.any,locale:b.string,apiPath:b.string,headers:b.object,imageEditorProps:b.object,onUploadFinish:b.func};const Vi=24,qi=48,Ki="add";b.string.isRequired;function xr({ref:r=null,section:i="",components:n=[],rawNavigations:e=[],onChange:t=()=>{},...o}){const{roles:a}=fo(),{t:l,locale:s}=Oe(),{localeMap:c,defaultLocale:d}=wr(),f=re(()=>({title:{[d]:""},description:{[d]:""},link:{[d]:""}})),u=re(T=>lo(Array.from(new Set(we.NAVIGATION_I18N_FIELDS.flatMap(x=>ht(T[x])?Object.keys(T[x]):[]))),d)),p=k.useRef(()=>{}),h=Gt({isRoot:!0,type:Ki,linkDisabled:!1,locale:d,formState:f(),get localeList(){return u(h.formState)}}),{handleSubmit:v,control:y,reset:_,setValue:C,clearErrors:z,formState:{errors:D}}=Ol({mode:"onChange",defaultValues:{id:"",title:"",description:"",icon:"",link:"",component:"",parent:"",role:[]}});k.useEffect(()=>{we.NAVIGATION_I18N_FIELDS.forEach(T=>C(T,h.formState[T][h.locale]))},[C,h.locale]);const M=zl({control:y}),R=M.component,I=M.title,g=M.description,w=M.link,S=M.parent;k.useEffect(()=>{h.formState.title[h.locale]=I},[I]),k.useEffect(()=>{h.formState.description[h.locale]=g},[g]),k.useEffect(()=>{h.formState.link[h.locale]=w},[w]),k.useEffect(()=>{t?.(M)},[M,t]);const O=k.useMemo(()=>e.find(x=>R?n.find(Y=>Y.name===R).did===x.id:x.id===S),[n,e,R,S]),j=k.useMemo(()=>{if(O?.component){const T=n.find(ee=>ee.name===O.component),{link:x}=T||{},$=ht(x)?x[h.locale]:x;if(R)return Nr($);const Y=ht(O.link)?O.link[h.locale]:O.link;return Nr(Ye($,Y||"/"))}return null},[n,h.locale,O,R]),U=k.useMemo(()=>{const{component:T}=O||{},x=n.find(ee=>ee.name===T),{navigation:$=[]}=x||{};return Se.flattenNavigation($,{transform(ee,se){return se?.section&&(ee.section=ee.section||se.section),ee}}).filter(ee=>ee.link).filter(ee=>Se.isMatchSection(ee.section,i)).map(ee=>({label:ee.link,title:ee.title[s]||ee.title}))},[O,n,i,s]),q=re(()=>{h.isRoot=!0,h.locale=d,h.type=Ki,h.linkDisabled=!1,h.formState=f(),_(),z(),p.current=()=>{}}),A=re((T={})=>(h.localeList.length>0&&we.NAVIGATION_I18N_FIELDS.forEach(x=>{ul(h.formState[x]).length>1&&(T[x]=h.formState[x])}),fl(T.role)&&(T.role=void 0),T)),W=re(({parent:T}={},x=()=>{})=>{h.type="add",h.isRoot=!T,C("parent",T?.id),p.current=$=>{x($)}}),H=re((T={},x=()=>{})=>{const{id:$,icon:Y,parent:ee,component:se,role:fe=[]}=T;C("id",$),C("icon",Y),T.from==="team-tmpl"&&(h.linkDisabled=!0);const Ce=u(T),Le=(he,ze)=>{pl(he)?h.formState[ze]=Ce.reduce((ne,ue)=>(ne[ue]=he,ne),{[d]:he}):ht(he)?h.formState[ze]=Ne(he):h.formState[ze]={}};we.NAVIGATION_I18N_FIELDS.forEach(he=>Le(T[he],he)),we.NAVIGATION_I18N_FIELDS.forEach(he=>C(he,h.formState[he][h.locale])),C("component",se),C("parent",ee),C("role",fe||[]),h.type="edit",h.isRoot=!ee,p.current=he=>{const ze=hl(he,["id","title","description","icon","component","link","role"]);x(ze)}}),V=re(T=>{const x=T?.trim();if(i!=="bottomNavigation"){if(!x)return l("common.requiredErrorText",{name:l("navigation.form.title")});if(x.length>Vi)return l("navigation.form.titleTooLong",{len:Vi})}return!0}),K=re(T=>{const x=T?.trim();return x&&x.length>qi?l("navigation.form.descriptionTooLong",{len:qi}):!0}),J=re(T=>T?.startsWith("/")?new URL(T,window.location.origin).href:T),X=re(async T=>{const x=T?.trim();if(x){if(rr(J(x)))return!0;try{await ro(x)}catch{return l("navigation.form.invalidIcon")}}return!0}),Z=re(T=>{const x=T?.trim();return x?X(x):l("common.requiredErrorText",{name:l("navigation.form.icon")})}),B=re(T=>{const x=T?.trim();return x?Se.checkLink(x)?!0:l("navigation.form.invalidLink"):h.isRoot?!0:l("common.requiredErrorText",{name:l("navigation.form.link")})}),Q=re(T=>{h.locale=T,we.NAVIGATION_I18N_FIELDS.forEach(x=>{h.formState[x][T]||(h.formState[x][T]="")}),setTimeout(()=>{z()})}),te=re(()=>{const{title:T,link:x}=h.formState;if(i!=="bottomNavigation")for(const $ of Object.keys(T)){const Y=V(T[$]);if(Y!==!0)return Y}for(const $ of Object.keys(x)){const Y=B(x[$]);if(Y!==!0)return Y}return!0}),F=re(T=>{const x=te();x===!0?p.current(A(T)):kt.error(x)}),G=re(T=>{h.locale=d,we.NAVIGATION_I18N_FIELDS.forEach(x=>{h.formState[x]=Mt(h.formState[x],T)}),t?.(M)}),N=re(T=>{h.locale=T,we.NAVIGATION_I18N_FIELDS.forEach(x=>{h.formState[x][T]=h.formState[x][d]}),t?.(M),setTimeout(()=>{z()})});return k.useImperativeHandle(r,()=>({add:W,edit:H,resetImmediate:()=>q(),reset:()=>setTimeout(()=>q(),0),submit:v(F)}),[W,q,H,v,F]),m.jsxs(ce,{...o,children:[m.jsx(ya,{sx:{mb:1},onAdd:N,onChange:Q,onRemoveLocale:G,defaultLocale:d,locale:h.locale,localeMap:c,locales:h.localeList}),m.jsxs("form",{noValidate:!0,autoComplete:"off",children:[i!=="bottomNavigation"&&m.jsx(We,{name:"title",control:y,rules:{validate:V},render:({field:T})=>m.jsx(ft,{fullWidth:!0,variant:"outlined",margin:"dense",required:!0,placeholder:l("navigation.form.titlePlaceholder"),label:l("navigation.form.title"),disabled:h.isEdit,error:!!D?.title?.message,helperText:D?.title?.message||" ",...T})}),i==="bottomNavigation"?m.jsx(We,{name:"icon",control:y,rules:{validate:Z},render:({field:T})=>m.jsx(Jn,{fullWidth:!0,required:!0,variant:"outlined",margin:"dense",placeholder:l("navigation.form.iconPlaceholder"),label:l("navigation.form.icon"),error:!!D?.icon?.message,helperText:D?.icon?.message,disabled:h.locale!==d,methods:["select"],iconifyShape:"url",...T})}):m.jsx(We,{name:"icon",control:y,rules:{validate:X},render:({field:T})=>m.jsx(Jn,{fullWidth:!0,variant:"outlined",margin:"dense",placeholder:l("navigation.form.iconPlaceholder"),label:l("navigation.form.icon"),error:!!D?.icon?.message,helperText:D?.icon?.message,disabled:h.locale!==d,...T})}),h.isRoot&&m.jsx(We,{name:"component",control:y,render:({field:T})=>m.jsx(Fn,{fullWidth:!0,margin:"dense",disabled:h.locale!==d&&T.value,label:l("navigation.form.component"),placeholer:l("navigation.form.componentPlaceholder"),options:n.map(x=>({title:x.title,value:x.name,description:x.link})),error:!!D?.component?.message,helperText:D?.component?.message||" ",...Mt(T,"ref")})}),!h.isRoot&&["header"].includes(i)&&m.jsx(We,{name:"description",control:y,rules:{validate:K},render:({field:T})=>m.jsx(ft,{fullWidth:!0,variant:"outlined",margin:"dense",placeholder:l("navigation.form.descriptionPlaceholder"),label:l("navigation.form.description"),disabled:h.isEdit,error:!!D?.description?.message,helperText:D?.description?.message||" ",...T})}),m.jsx(We,{name:"link",control:y,rules:{validate:B},render:({field:T})=>m.jsx(no,{fullWidth:!0,margin:"dense",children:m.jsx(Ma,{disablePortal:!0,freeSolo:!0,blurOnSelect:!0,autoSelect:!0,fullWidth:!0,disabled:h.linkDisabled,isOptionEqualToValue:x=>x.label,options:U,renderInput:x=>m.jsx(ft,{...x,placeholder:l("navigation.form.linkPlaceholder"),label:l("navigation.form.link"),error:!!D?.link?.message,helperText:D?.link?.message||"/abc/bcd or /abc or https://arcblock.io",slotProps:{input:{startAdornment:j?m.jsx(jn,{position:"start",sx:{textDecoration:Bu(w||"")?"line-through":""},children:j}):null}}}),renderOption:(x,$)=>m.jsxs(ce,{component:"li",...x,children:[$.label,m.jsx(Te,{component:"span",variant:"body2",sx:{marginLeft:1,color:"text.secondary"},children:$.title})]}),margin:"dense",...T,onChange:()=>{},onInputChange:(x,$)=>{T.onChange($)}})})}),["dashboard","sessionManager"].includes(i)&&m.jsx(We,{name:"role",control:y,render:({field:T})=>m.jsx(Fn,{fullWidth:!0,multiple:!0,margin:"dense",label:l("navigation.form.role"),placeholer:l("navigation.form.rolePlaceholder"),options:a.map(x=>({title:x.title,value:x.name})),error:!!D?.role?.message,helperText:D?.role?.message||" ",...Mt(T,"ref")})}),i==="bottomNavigation"&&m.jsx(We,{name:"title",control:y,rules:{validate:V},render:({field:T})=>m.jsx(ft,{fullWidth:!0,variant:"outlined",margin:"dense",placeholder:l("navigation.form.titlePlaceholder"),label:l("navigation.form.title"),disabled:h.isEdit,error:!!D?.title?.message,helperText:D?.title?.message||" ",...T})})]})]})}xr.propTypes={ref:b.any,section:b.string,components:b.array,rawNavigations:b.array,onChange:b.func};function _r({ref:r=null,section:i="",components:n=[],rawNavigations:e=[]}){const{t}=Oe(),[o,{setTrue:a,setFalse:l}]=tl(),[s,c]=k.useState("add"),d=k.useRef(null),f=k.useMemo(()=>{const y={add:t("common.create"),edit:t("common.edit")}[s];return y?`${y} ${t("navigation.navigation")}`:"--"},[t,s]),u=k.useCallback(()=>{l(),d.current?.reset()},[l]),p=k.useCallback((v={},y=()=>{})=>{c("add"),d.current?.add(v,_=>y(u,_)),a()},[a,u]),h=k.useCallback((v={},y=()=>{})=>{c("edit"),d.current?.edit(v,_=>y(u,_)),a()},[a,u]);return k.useImperativeHandle(r,()=>({add:p,edit:h,close:u}),[p,h,u]),m.jsx(Qa,{open:o,title:f,keepMounted:!0,onClose:u,sx:{".MuiDialogContent-root":{pt:0}},actions:m.jsx(Ja,{color:"primary",variant:"contained",onClick:()=>d.current?.submit(),children:t("common.confirm")}),children:m.jsx(xr,{ref:d,section:i,components:n,rawNavigations:e})})}_r.propTypes={ref:b.any,section:b.string,components:b.array,rawNavigations:b.array};function xa({className:r="",add:i=()=>{},edit:n=()=>{},toggle:e=()=>{},del:t=()=>{},data:o,section:a=""}){const{t:l}=Oe(),s=["yaml","team-tmpl"].includes(o.from),c=k.isValidElement(o.subtitle);function d(v){v.preventDefault(),v.stopPropagation()}const f=k.useCallback(v=>{d(v),i(o)},[i,o]),u=k.useCallback(v=>{d(v),n(o)},[n,o]),p=k.useCallback(v=>{d(v),e(o)},[e,o]),h=k.useCallback(v=>{d(v),t(o)},[t,o]);return m.jsxs("div",{className:r,children:[!o.parent&&["header","footer","dashboard"].includes(a)&&m.jsx("span",{title:l(c?"navigation.action.noAddSub":"navigation.action.addSub"),children:m.jsx(ke,{size:"small",color:"success",onClick:f,disabled:c,children:m.jsx(me,{icon:"mdi:plus-box-outline"})})}),m.jsx("span",{title:l(c?"navigation.action.noEdit":"navigation.action.edit"),children:m.jsx(ke,{size:"small",color:"primary",onClick:u,disabled:c||o.from==="team-tmpl",children:m.jsx(me,{icon:"mdi:pencil-outline"})})}),m.jsx("span",{title:c?l("navigation.action.noEdit"):o.visible?l("navigation.action.hide"):l("navigation.action.show"),children:m.jsx(ke,{size:"small",color:"warning",onClick:p,disabled:c,children:o.visible===!1?m.jsx(me,{icon:"mdi:eye-off-outline"}):m.jsx(me,{icon:"mdi:eye-outline"})})}),m.jsx("span",{title:l(s&&!c?"navigation.action.noDel":"navigation.action.del"),children:m.jsx(ke,{disabled:s&&!c,size:"small",color:"error",onClick:h,children:m.jsx(me,{icon:"mdi:delete"})})})]})}xa.propTypes={data:b.object.isRequired,className:b.string,add:b.func,edit:b.func,toggle:b.func,del:b.func,section:b.string};function _a(r,i){return r?i===r.nodeName?!0:_a(r.parentNode,i):!1}function ef({...r}){return m.jsx("div",{onClick:i=>{_a(i.target,"A")&&i.preventDefault()},...r})}function Ra({className:r="",navigation:i=[]}){const{blocklet:n}=at(),{locale:e}=Oe(),{languages:t}=wr(),o=Dl({blocklet:n,square:!0}),a=n?.environments?.find(d=>d.key===Ve.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_COPYRIGHT_OWNER)?.value,l=n?.environments?.find(d=>d.key===Ve.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_COPYRIGHT_YEAR)?.value,s=a||l?{owner:a,year:l}:void 0,c={appId:n.appDid,appLogo:o,appName:n.meta.title,enableConnect:!0,enableLocale:!1,navigation:i,copyright:s};return m.jsx(Za,{translations:El,locale:e,languages:t,children:m.jsx(ef,{children:m.jsxs(ce,{className:r,children:[m.jsx(_l,{meta:c,showDomainWarningDialog:!1,sx:{".header-container":{maxWidth:"none"}}}),m.jsx(ce,{children:m.jsx(Ll,{meta:c,invalidPathFallback:()=>{},headerProps:{style:{display:"none"}},hideHtmlTitle:!0,showDomainWarningDialog:!1,children:m.jsx(Tr,{container:!0,spacing:2,children:new Array(6).fill().map((d,f)=>m.jsxs(Tr,{size:4,children:[m.jsx(mn,{animation:!1,variant:"rectangular",width:"100%",height:120}),m.jsxs(ce,{sx:{pt:.5},children:[m.jsx(mn,{animation:!1}),m.jsx(mn,{width:"60%",animation:!1})]})]},f))})})}),m.jsx(Ml,{meta:c,sx:{".MuiContainer-root":{maxWidth:"none"}}})]})})})}Ra.propTypes={className:b.string,navigation:b.array};const tf=La(Ra)`
33
+ */oa();function Pn(r){return r&&qa(r)==="object"&&r.constructor===Object}function la(r,i){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{clone:!0},e=n.clone?le({},r):r;return Pn(r)&&Pn(i)&&Object.keys(i).forEach(function(t){t!=="__proto__"&&(Pn(i[t])&&t in r?e[t]=la(r[t],i[t],n):e[t]=i[t])}),e}function sa(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},i=r.baseClasses,n=r.newClasses;if(r.Component,!n)return i;var e=le({},i);return Object.keys(n).forEach(function(t){n[t]&&(e[t]="".concat(i[t]," ").concat(n[t]))}),e}var vt={set:function(i,n,e,t){var o=i.get(n);o||(o=new Map,i.set(n,o)),o.set(e,t)},get:function(i,n,e){var t=i.get(n);return t?t.get(e):void 0},delete:function(i,n,e){var t=i.get(n);t.delete(e)}},Cd=oe.createContext(null);function wd(){var r=oe.useContext(Cd);return r}var bd=typeof Symbol=="function"&&Symbol.for;const xd=bd?Symbol.for("mui.nested"):"__THEME_NESTED__";var _d=["checked","disabled","error","focused","focusVisible","required","expanded","selected"];function Rd(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},i=r.disableGlobal,n=i===void 0?!1:i,e=r.productionPrefix,t=e===void 0?"jss":e,o=r.seed,a=o===void 0?"":o,l=a===""?"":"".concat(a,"-"),s=0,c=function(){return s+=1,s};return function(d,f){var u=f.options.name;if(u&&u.indexOf("Mui")===0&&!f.options.link&&!n){if(_d.indexOf(d.key)!==-1)return"Mui-".concat(d.key);var p="".concat(l).concat(u,"-").concat(d.key);return!f.options.theme[xd]||a!==""?p:"".concat(p,"-").concat(c())}return"".concat(l).concat(t).concat(c())}}var ca=Date.now(),kn="fnValues"+ca,On="fnStyle"+ ++ca,Id=function(){return{onCreateRule:function(n,e,t){if(typeof e!="function")return null;var o=mr(n,{},t);return o[On]=e,o},onProcessStyle:function(n,e){if(kn in e||On in e)return n;var t={};for(var o in n){var a=n[o];typeof a=="function"&&(delete n[o],t[o]=a)}return e[kn]=t,n},onUpdate:function(n,e,t,o){var a=e,l=a[On];l&&(a.style=l(n)||{});var s=a[kn];if(s)for(var c in s)a.prop(c,s[c](n),o)}}},Ye="@global",Xn="@global ",Td=function(){function r(n,e,t){this.type="global",this.at=Ye,this.isProcessed=!1,this.key=n,this.options=t,this.rules=new pn(le({},t,{parent:this}));for(var o in e)this.rules.add(o,e[o]);this.rules.process()}var i=r.prototype;return i.getRule=function(e){return this.rules.get(e)},i.addRule=function(e,t,o){var a=this.rules.add(e,t,o);return a&&this.options.jss.plugins.onProcessRule(a),a},i.replaceRule=function(e,t,o){var a=this.rules.replace(e,t,o);return a&&this.options.jss.plugins.onProcessRule(a),a},i.indexOf=function(e){return this.rules.indexOf(e)},i.toString=function(e){return this.rules.toString(e)},r}(),Pd=function(){function r(n,e,t){this.type="global",this.at=Ye,this.isProcessed=!1,this.key=n,this.options=t;var o=n.substr(Xn.length);this.rule=t.jss.createRule(o,e,le({},t,{parent:this}))}var i=r.prototype;return i.toString=function(e){return this.rule?this.rule.toString(e):""},r}(),kd=/\s*,\s*/g;function da(r,i){for(var n=r.split(kd),e="",t=0;t<n.length;t++)e+=i+" "+n[t].trim(),n[t+1]&&(e+=", ");return e}function Od(r,i){var n=r.options,e=r.style,t=e?e[Ye]:null;if(t){for(var o in t)i.addRule(o,t[o],le({},n,{selector:da(o,r.selector)}));delete e[Ye]}}function zd(r,i){var n=r.options,e=r.style;for(var t in e)if(!(t[0]!=="@"||t.substr(0,Ye.length)!==Ye)){var o=da(t.substr(Ye.length),r.selector);i.addRule(o,e[t],le({},n,{selector:o})),delete e[t]}}function Dd(){function r(n,e,t){if(!n)return null;if(n===Ye)return new Td(n,e,t);if(n[0]==="@"&&n.substr(0,Xn.length)===Xn)return new Pd(n,e,t);var o=t.parent;return o&&(o.type==="global"||o.options.parent&&o.options.parent.type==="global")&&(t.scoped=!1),!t.selector&&t.scoped===!1&&(t.selector=n),null}function i(n,e){n.type!=="style"||!e||(Od(n,e),zd(n,e))}return{onCreateRule:r,onProcessRule:i}}var Gi=/\s*,\s*/g,Nd=/&/g,Ld=/\$([\w-]+)/g;function Md(){function r(t,o){return function(a,l){var s=t.getRule(l)||o&&o.getRule(l);return s?s.selector:l}}function i(t,o){for(var a=o.split(Gi),l=t.split(Gi),s="",c=0;c<a.length;c++)for(var d=a[c],f=0;f<l.length;f++){var u=l[f];s&&(s+=", "),s+=u.indexOf("&")!==-1?u.replace(Nd,d):d+" "+u}return s}function n(t,o,a){if(a)return le({},a,{index:a.index+1});var l=t.options.nestingLevel;l=l===void 0?1:l+1;var s=le({},t.options,{nestingLevel:l,index:o.indexOf(t)+1});return delete s.name,s}function e(t,o,a){if(o.type!=="style")return t;var l=o,s=l.options.parent,c,d;for(var f in t){var u=f.indexOf("&")!==-1,p=f[0]==="@";if(!(!u&&!p)){if(c=n(l,s,c),u){var h=i(f,l.selector);d||(d=r(s,a)),h=h.replace(Ld,d);var v=l.key+"-"+f;"replaceRule"in s?s.replaceRule(v,t[f],le({},c,{selector:h})):s.addRule(v,t[f],le({},c,{selector:h}))}else p&&s.addRule(f,{},c).addRule(l.key,t[f],{selector:l.selector});delete t[f]}}return t}return{onProcessStyle:e}}var Ed=/[A-Z]/g,Ad=/^ms-/,zn={};function jd(r){return"-"+r.toLowerCase()}function ua(r){if(zn.hasOwnProperty(r))return zn[r];var i=r.replace(Ed,jd);return zn[r]=Ad.test(i)?"-"+i:i}function an(r){var i={};for(var n in r){var e=n.indexOf("--")===0?n:ua(n);i[e]=r[n]}return r.fallbacks&&(Array.isArray(r.fallbacks)?i.fallbacks=r.fallbacks.map(an):i.fallbacks=an(r.fallbacks)),i}function Fd(){function r(n){if(Array.isArray(n)){for(var e=0;e<n.length;e++)n[e]=an(n[e]);return n}return an(n)}function i(n,e,t){if(e.indexOf("--")===0)return n;var o=ua(e);return e===o?n:(t.prop(o,n),null)}return{onProcessStyle:r,onChangeValue:i}}var M=yr&&CSS?CSS.px:"px",Yt=yr&&CSS?CSS.ms:"ms",dt=yr&&CSS?CSS.percent:"%",Gd={"animation-delay":Yt,"animation-duration":Yt,"background-position":M,"background-position-x":M,"background-position-y":M,"background-size":M,border:M,"border-bottom":M,"border-bottom-left-radius":M,"border-bottom-right-radius":M,"border-bottom-width":M,"border-left":M,"border-left-width":M,"border-radius":M,"border-right":M,"border-right-width":M,"border-top":M,"border-top-left-radius":M,"border-top-right-radius":M,"border-top-width":M,"border-width":M,"border-block":M,"border-block-end":M,"border-block-end-width":M,"border-block-start":M,"border-block-start-width":M,"border-block-width":M,"border-inline":M,"border-inline-end":M,"border-inline-end-width":M,"border-inline-start":M,"border-inline-start-width":M,"border-inline-width":M,"border-start-start-radius":M,"border-start-end-radius":M,"border-end-start-radius":M,"border-end-end-radius":M,margin:M,"margin-bottom":M,"margin-left":M,"margin-right":M,"margin-top":M,"margin-block":M,"margin-block-end":M,"margin-block-start":M,"margin-inline":M,"margin-inline-end":M,"margin-inline-start":M,padding:M,"padding-bottom":M,"padding-left":M,"padding-right":M,"padding-top":M,"padding-block":M,"padding-block-end":M,"padding-block-start":M,"padding-inline":M,"padding-inline-end":M,"padding-inline-start":M,"mask-position-x":M,"mask-position-y":M,"mask-size":M,height:M,width:M,"min-height":M,"max-height":M,"min-width":M,"max-width":M,bottom:M,left:M,top:M,right:M,inset:M,"inset-block":M,"inset-block-end":M,"inset-block-start":M,"inset-inline":M,"inset-inline-end":M,"inset-inline-start":M,"box-shadow":M,"text-shadow":M,"column-gap":M,"column-rule":M,"column-rule-width":M,"column-width":M,"font-size":M,"font-size-delta":M,"letter-spacing":M,"text-decoration-thickness":M,"text-indent":M,"text-stroke":M,"text-stroke-width":M,"word-spacing":M,motion:M,"motion-offset":M,outline:M,"outline-offset":M,"outline-width":M,perspective:M,"perspective-origin-x":dt,"perspective-origin-y":dt,"transform-origin":dt,"transform-origin-x":dt,"transform-origin-y":dt,"transform-origin-z":dt,"transition-delay":Yt,"transition-duration":Yt,"vertical-align":M,"flex-basis":M,"shape-margin":M,size:M,gap:M,grid:M,"grid-gap":M,"row-gap":M,"grid-row-gap":M,"grid-column-gap":M,"grid-template-rows":M,"grid-template-columns":M,"grid-auto-rows":M,"grid-auto-columns":M,"box-shadow-x":M,"box-shadow-y":M,"box-shadow-blur":M,"box-shadow-spread":M,"font-line-height":M,"text-shadow-x":M,"text-shadow-y":M,"text-shadow-blur":M};function fa(r){var i=/(-[a-z])/g,n=function(a){return a[1].toUpperCase()},e={};for(var t in r)e[t]=r[t],e[t.replace(i,n)]=r[t];return e}var Wd=fa(Gd);function At(r,i,n){if(i==null)return i;if(Array.isArray(i))for(var e=0;e<i.length;e++)i[e]=At(r,i[e],n);else if(typeof i=="object")if(r==="fallbacks")for(var t in i)i[t]=At(t,i[t],n);else for(var o in i)i[o]=At(r+"-"+o,i[o],n);else if(typeof i=="number"&&isNaN(i)===!1){var a=n[r]||Wd[r];return a&&!(i===0&&a===M)?typeof a=="function"?a(i).toString():""+i+a:i.toString()}return i}function $d(r){r===void 0&&(r={});var i=fa(r);function n(t,o){if(o.type!=="style")return t;for(var a in t)t[a]=At(a,t[a],i);return t}function e(t,o){return At(o,t,i)}return{onProcessStyle:n,onChangeValue:e}}var Dt="",Yn="",ha="",pa="",Hd=Bt&&"ontouchstart"in document.documentElement;if(Bt){var Dn={Moz:"-moz-",ms:"-ms-",O:"-o-",Webkit:"-webkit-"},Ud=document.createElement("p"),Nn=Ud.style,Bd="Transform";for(var Ln in Dn)if(Ln+Bd in Nn){Dt=Ln,Yn=Dn[Ln];break}Dt==="Webkit"&&"msHyphens"in Nn&&(Dt="ms",Yn=Dn.ms,pa="edge"),Dt==="Webkit"&&"-apple-trailing-word"in Nn&&(ha="apple")}var ie={js:Dt,css:Yn,vendor:ha,browser:pa,isTouch:Hd};function Vd(r){return r[1]==="-"||ie.js==="ms"?r:"@"+ie.css+"keyframes"+r.substr(10)}var qd={noPrefill:["appearance"],supportedProperty:function(i){return i!=="appearance"?!1:ie.js==="ms"?"-webkit-"+i:ie.css+i}},Kd={noPrefill:["color-adjust"],supportedProperty:function(i){return i!=="color-adjust"?!1:ie.js==="Webkit"?ie.css+"print-"+i:i}},Xd=/[-\s]+(.)?/g;function Yd(r,i){return i?i.toUpperCase():""}function Cr(r){return r.replace(Xd,Yd)}function Qe(r){return Cr("-"+r)}var Qd={noPrefill:["mask"],supportedProperty:function(i,n){if(!/^mask/.test(i))return!1;if(ie.js==="Webkit"){var e="mask-image";if(Cr(e)in n)return i;if(ie.js+Qe(e)in n)return ie.css+i}return i}},Jd={noPrefill:["text-orientation"],supportedProperty:function(i){return i!=="text-orientation"?!1:ie.vendor==="apple"&&!ie.isTouch?ie.css+i:i}},Zd={noPrefill:["transform"],supportedProperty:function(i,n,e){return i!=="transform"?!1:e.transform?i:ie.css+i}},eu={noPrefill:["transition"],supportedProperty:function(i,n,e){return i!=="transition"?!1:e.transition?i:ie.css+i}},tu={noPrefill:["writing-mode"],supportedProperty:function(i){return i!=="writing-mode"?!1:ie.js==="Webkit"||ie.js==="ms"&&ie.browser!=="edge"?ie.css+i:i}},nu={noPrefill:["user-select"],supportedProperty:function(i){return i!=="user-select"?!1:ie.js==="Moz"||ie.js==="ms"||ie.vendor==="apple"?ie.css+i:i}},ru={supportedProperty:function(i,n){if(!/^break-/.test(i))return!1;if(ie.js==="Webkit"){var e="WebkitColumn"+Qe(i);return e in n?ie.css+"column-"+i:!1}if(ie.js==="Moz"){var t="page"+Qe(i);return t in n?"page-"+i:!1}return!1}},iu={supportedProperty:function(i,n){if(!/^(border|margin|padding)-inline/.test(i))return!1;if(ie.js==="Moz")return i;var e=i.replace("-inline","");return ie.js+Qe(e)in n?ie.css+e:!1}},ou={supportedProperty:function(i,n){return Cr(i)in n?i:!1}},au={supportedProperty:function(i,n){var e=Qe(i);return i[0]==="-"||i[0]==="-"&&i[1]==="-"?i:ie.js+e in n?ie.css+i:ie.js!=="Webkit"&&"Webkit"+e in n?"-webkit-"+i:!1}},lu={supportedProperty:function(i){return i.substring(0,11)!=="scroll-snap"?!1:ie.js==="ms"?""+ie.css+i:i}},su={supportedProperty:function(i){return i!=="overscroll-behavior"?!1:ie.js==="ms"?ie.css+"scroll-chaining":i}},cu={"flex-grow":"flex-positive","flex-shrink":"flex-negative","flex-basis":"flex-preferred-size","justify-content":"flex-pack",order:"flex-order","align-items":"flex-align","align-content":"flex-line-pack"},du={supportedProperty:function(i,n){var e=cu[i];return e&&ie.js+Qe(e)in n?ie.css+e:!1}},ga={flex:"box-flex","flex-grow":"box-flex","flex-direction":["box-orient","box-direction"],order:"box-ordinal-group","align-items":"box-align","flex-flow":["box-orient","box-direction"],"justify-content":"box-pack"},uu=Object.keys(ga),fu=function(i){return ie.css+i},hu={supportedProperty:function(i,n,e){var t=e.multiple;if(uu.indexOf(i)>-1){var o=ga[i];if(!Array.isArray(o))return ie.js+Qe(o)in n?ie.css+o:!1;if(!t)return!1;for(var a=0;a<o.length;a++)if(!(ie.js+Qe(o[0])in n))return!1;return o.map(fu)}return!1}},va=[qd,Kd,Qd,Jd,Zd,eu,tu,nu,ru,iu,ou,au,lu,su,du,hu],Wi=va.filter(function(r){return r.supportedProperty}).map(function(r){return r.supportedProperty}),pu=va.filter(function(r){return r.noPrefill}).reduce(function(r,i){return r.push.apply(r,_o(i.noPrefill)),r},[]),Nt,rt={};if(Bt){Nt=document.createElement("p");var Mn=window.getComputedStyle(document.documentElement,"");for(var En in Mn)isNaN(En)||(rt[Mn[En]]=Mn[En]);pu.forEach(function(r){return delete rt[r]})}function Qn(r,i){if(i===void 0&&(i={}),!Nt)return r;if(rt[r]!=null)return rt[r];(r==="transition"||r==="transform")&&(i[r]=r in Nt.style);for(var n=0;n<Wi.length&&(rt[r]=Wi[n](r,Nt.style,i),!rt[r]);n++);try{Nt.style[r]=""}catch{return!1}return rt[r]}var ut={},gu={transition:1,"transition-property":1,"-webkit-transition":1,"-webkit-transition-property":1},vu=/(^\s*[\w-]+)|, (\s*[\w-]+)(?![^()]*\))/g,Ue;function mu(r,i,n){if(i==="var")return"var";if(i==="all")return"all";if(n==="all")return", all";var e=i?Qn(i):", "+Qn(n);return e||i||n}Bt&&(Ue=document.createElement("p"));function $i(r,i){var n=i;if(!Ue||r==="content")return i;if(typeof n!="string"||!isNaN(parseInt(n,10)))return n;var e=r+n;if(ut[e]!=null)return ut[e];try{Ue.style[r]=n}catch{return ut[e]=!1,!1}if(gu[r])n=n.replace(vu,mu);else if(Ue.style[r]===""&&(n=ie.css+n,n==="-ms-flex"&&(Ue.style[r]="-ms-flexbox"),Ue.style[r]=n,Ue.style[r]===""))return ut[e]=!1,!1;return Ue.style[r]="",ut[e]=n,ut[e]}function Su(){function r(t){if(t.type==="keyframes"){var o=t;o.at=Vd(o.at)}}function i(t){for(var o in t){var a=t[o];if(o==="fallbacks"&&Array.isArray(a)){t[o]=a.map(i);continue}var l=!1,s=Qn(o);s&&s!==o&&(l=!0);var c=!1,d=$i(s,ot(a));d&&d!==a&&(c=!0),(l||c)&&(l&&delete t[o],t[s||o]=d||a)}return t}function n(t,o){return o.type!=="style"?t:i(t)}function e(t,o){return $i(o,ot(t))||t}return{onProcessRule:r,onProcessStyle:n,onChangeValue:e}}function yu(){var r=function(n,e){return n.length===e.length?n>e?1:-1:n.length-e.length};return{onProcessStyle:function(n,e){if(e.type!=="style")return n;for(var t={},o=Object.keys(n).sort(r),a=0;a<o.length;a++)t[o[a]]=n[o[a]];return t}}}function Cu(){return{plugins:[Id(),Dd(),Md(),Fd(),$d(),typeof window>"u"?null:Su(),yu()]}}var wu=oa(Cu()),bu=Rd(),xu=new Map,_u={disableGeneration:!1,generateClassName:bu,jss:wu,sheetsCache:null,sheetsManager:xu,sheetsRegistry:null},Ru=oe.createContext(_u),Hi=-1e9;function Iu(){return Hi+=1,Hi}var Tu={};function Pu(r){var i=typeof r=="function";return{create:function(e,t){var o;try{o=i?r(e):r}catch(s){throw s}if(!t||!e.overrides||!e.overrides[t])return o;var a=e.overrides[t],l=le({},o);return Object.keys(a).forEach(function(s){l[s]=la(l[s],a[s])}),l},options:{}}}function ku(r,i,n){var e=r.state,t=r.stylesOptions;if(t.disableGeneration)return i||{};e.cacheClasses||(e.cacheClasses={value:null,lastProp:null,lastJSS:{}});var o=!1;return e.classes!==e.cacheClasses.lastJSS&&(e.cacheClasses.lastJSS=e.classes,o=!0),i!==e.cacheClasses.lastProp&&(e.cacheClasses.lastProp=i,o=!0),o&&(e.cacheClasses.value=sa({baseClasses:e.cacheClasses.lastJSS,newClasses:i,Component:n})),e.cacheClasses.value}function Ou(r,i){var n=r.state,e=r.theme,t=r.stylesOptions,o=r.stylesCreator,a=r.name;if(!t.disableGeneration){var l=vt.get(t.sheetsManager,o,e);l||(l={refs:0,staticSheet:null,dynamicStyles:null},vt.set(t.sheetsManager,o,e,l));var s=le({},o.options,t,{theme:e,flip:typeof t.flip=="boolean"?t.flip:e.direction==="rtl"});s.generateId=s.serverGenerateClassName||s.generateClassName;var c=t.sheetsRegistry;if(l.refs===0){var d;t.sheetsCache&&(d=vt.get(t.sheetsCache,o,e));var f=o.create(e,a);d||(d=t.jss.createStyleSheet(f,le({link:!1},s)),d.attach(),t.sheetsCache&&vt.set(t.sheetsCache,o,e,d)),c&&c.add(d),l.staticSheet=d,l.dynamicStyles=aa(f)}if(l.dynamicStyles){var u=t.jss.createStyleSheet(l.dynamicStyles,le({link:!0},s));u.update(i),u.attach(),n.dynamicSheet=u,n.classes=sa({baseClasses:l.staticSheet.classes,newClasses:u.classes}),c&&c.add(u)}else n.classes=l.staticSheet.classes;l.refs+=1}}function zu(r,i){var n=r.state;n.dynamicSheet&&n.dynamicSheet.update(i)}function Du(r){var i=r.state,n=r.theme,e=r.stylesOptions,t=r.stylesCreator;if(!e.disableGeneration){var o=vt.get(e.sheetsManager,t,n);o.refs-=1;var a=e.sheetsRegistry;o.refs===0&&(vt.delete(e.sheetsManager,t,n),e.jss.removeStyleSheet(o.staticSheet),a&&a.remove(o.staticSheet)),i.dynamicSheet&&(e.jss.removeStyleSheet(i.dynamicSheet),a&&a.remove(i.dynamicSheet))}}function Nu(r,i){var n=oe.useRef([]),e,t=oe.useMemo(function(){return{}},i);n.current!==t&&(n.current=t,e=r()),oe.useEffect(function(){return function(){e&&e()}},[t])}function Lu(r){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=i.name,e=i.classNamePrefix,t=i.Component,o=i.defaultTheme,a=o===void 0?Tu:o,l=pt(i,["name","classNamePrefix","Component","defaultTheme"]),s=Pu(r),c=n||e||"makeStyles";s.options={index:Iu(),name:n,meta:c,classNamePrefix:c};var d=function(){var u=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},p=wd()||a,h=le({},oe.useContext(Ru),l),v=oe.useRef(),y=oe.useRef();Nu(function(){var C={name:n,state:{},stylesCreator:s,stylesOptions:h,theme:p};return Ou(C,u),y.current=!1,v.current=C,function(){Du(C)}},[p,s]),oe.useEffect(function(){y.current&&zu(v.current,u),y.current=!0});var _=ku(v.current,u.classes,t);return _};return d}const Mu=Object.freeze(Object.defineProperty({__proto__:null,default:Lu},Symbol.toStringTag,{value:"Module"})),Eu=ln(Mu);var Au=nn.exports,Ui;function ju(){return Ui||(Ui=1,function(r,i){(function(n,e){r.exports=e()})(typeof self<"u"?self:Au,function(){return function(n){function e(o){if(t[o])return t[o].exports;var a=t[o]={i:o,l:!1,exports:{}};return n[o].call(a.exports,a,a.exports,e),a.l=!0,a.exports}var t={};return e.m=n,e.c=t,e.d=function(o,a,l){e.o(o,a)||Object.defineProperty(o,a,{configurable:!1,enumerable:!0,get:l})},e.n=function(o){var a=o&&o.__esModule?function(){return o.default}:function(){return o};return e.d(a,"a",a),a},e.o=function(o,a){return Object.prototype.hasOwnProperty.call(o,a)},e.p="",e(e.s=3)}([function(n,e){n.exports=Qi()},function(n,e){n.exports=Ji()},function(n,e){n.exports=Eu},function(n,e,t){function o(d){return d&&d.__esModule?d:{default:d}}Object.defineProperty(e,"__esModule",{value:!0});var a=t(4),l=o(a),s=t(6),c=o(s);e.default={isVirtualized:!1,nodeContentRenderer:l.default,scaffoldBlockPxWidth:25,treeNodeRenderer:c.default}},function(n,e,t){function o(C){return C&&C.__esModule?C:{default:C}}function a(C,z){return!!C.children&&typeof C.children!="function"&&C.children.some(function(D){return D===z||a(D,z)})}function l(C){var z=C.scaffoldBlockPxWidth,D=C.connectDragPreview,L=C.connectDragSource,R=C.isDragging,I=C.canDrop,g=C.canDrag,w=C.node,S=C.title,O=C.draggedNode,j=C.path,U=C.treeIndex,q=C.isSearchMatch,A=C.isSearchFocus,W=C.icons,H=C.buttons,V=C.className,K=C.style,J=C.didDrop,X=C.lowerSiblingCounts,Z=C.listIndex,B=C.swapFrom,Q=C.swapLength,te=C.swapDepth,F=C.onItemClick,G=_(),N=S||w.title,T=O&&a(O,w),x=!J&&R,$=[];X.forEach(function(ee,se){if(se>0&&($.push(d.default.createElement("div",{className:G.lineBlock,key:"pre_"+(1+se),style:{width:z}})),U!==Z&&se===te)){var fe="";fe=Z===B+Q-1?G.highlightBottomLeftCorner:U===B?G.highlightTopLeftCorner:G.highlightLineVertical,$.push(d.default.createElement("div",{className:G.absoluteLineBlock+" "+fe,key:"highlight_"+(1+se),style:{left:z*se,width:z}}))}});var Y=d.default.createElement("div",{className:G.contentNode},D(d.default.createElement("div",{className:G.row+(w.active?" "+G.activeRow:"")+(x?" "+G.rowLandingPad:"")+(R?" "+G.rowLandingPadDisable:"")+(x&&!I?" "+G.rowCancelPad:"")+(q?" "+G.rowSearchMatch:"")+(A?" "+G.rowSearchFocus:"")+(g?"":" "+G.rowWrapperDragDisabled)+(V?" "+V:""),onClick:function(){return F?F(s({},w,{index:U})):null},style:s({opacity:T?.5:1},K)},w.type==="divider"?d.default.createElement("div",{className:G.divider}):d.default.createElement(c.Fragment,null,$,d.default.createElement("div",{className:G.rowIcon},W),d.default.createElement("div",{className:G.rowLabel},typeof N=="string"?d.default.createElement("span",{className:G.rowTitle},N):typeof N=="function"?N({node:w,path:j,treeIndex:U}):N),d.default.createElement("div",{className:G.rowToolbar},H)))));return g?L(Y,{dropEffect:"copy"}):Y}Object.defineProperty(e,"__esModule",{value:!0});var s=Object.assign||function(C){for(var z=1;z<arguments.length;z++){var D=arguments[z];for(var L in D)Object.prototype.hasOwnProperty.call(D,L)&&(C[L]=D[L])}return C},c=t(0),d=o(c),f=t(1),u=o(f),p=t(2),h=o(p),v=t(5),y=o(v),_=(0,h.default)(y.default,{name:"MuiNodeContent"});l.defaultProps={buttons:null,canDrag:!1,canDrop:!1,className:"",draggedNode:null,icons:null,isSearchFocus:!1,isSearchMatch:!1,parentNode:null,style:{},swapDepth:null,swapFrom:null,swapLength:null,title:null,toggleChildrenVisibility:null},l.propTypes={buttons:u.default.node,canDrag:u.default.bool,canDrop:u.default.bool,className:u.default.string,connectDragPreview:u.default.func.isRequired,connectDragSource:u.default.func.isRequired,didDrop:u.default.bool.isRequired,draggedNode:u.default.shape({}),icons:u.default.node,isDragging:u.default.bool.isRequired,isOver:u.default.bool.isRequired,isSearchFocus:u.default.bool,isSearchMatch:u.default.bool,listIndex:u.default.number.isRequired,lowerSiblingCounts:u.default.arrayOf(u.default.number).isRequired,node:u.default.shape({}).isRequired,parentNode:u.default.shape({}),path:u.default.arrayOf(u.default.oneOfType([u.default.string,u.default.number])).isRequired,rowDirection:u.default.string.isRequired,scaffoldBlockPxWidth:u.default.number.isRequired,style:u.default.shape({}),swapDepth:u.default.number,swapFrom:u.default.number,swapLength:u.default.number,title:u.default.oneOfType([u.default.func,u.default.node]),toggleChildrenVisibility:u.default.func,treeId:u.default.string.isRequired,treeIndex:u.default.number.isRequired},e.default=l},function(n,e,t){Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(){return{"@keyframes arrow-pulse":{"0%":{opacity:0,transform:"translate(0, 0)"},"100%":{opacity:0,transform:"translate(0, 1000%)"},"30%":{opacity:1,transform:"translate(0, 300%)"},"70%":{opacity:1,transform:"translate(0, 700%)"}},absoluteLineBlock:{position:"absolute",top:0},activeRow:{},collapseButton:{},contentNode:{width:"100%"},divider:{backgroundColor:"#D8D8D8",height:1,width:"100%"},expandButton:{},highlightBottomLeftCorner:{zIndex:3},highlightLineVertical:{zIndex:3},highlightTopLeftCorner:{},lineBlock:{display:"inline-block",flex:"0 0 auto",height:"100%",position:"relative"},lineChildren:{display:"inline-block",height:"100%"},nodeContent:{"& $collapseButton, & $expandButton":{"&::after":{border:"solid transparent 10px",borderLeftWidth:7,borderRightWidth:7,borderTopColor:"gray",content:'""',position:"absolute",transform:"translate3d(-50%, -20%, 0)",transformOrigin:"7px 4px"},"&:focus":{"&::after":{filter:"drop-shadow(0 0 1px #83bef9) drop-shadow(0 0 1px #83bef9) drop-shadow(0 0 1px #83bef9)"},outline:"none"},"&:hover::after":{borderTopColor:"black"},appearance:"none",background:"transparent",border:"none",cursor:"pointer",height:30,padding:0,position:"absolute",top:"45%",transform:"translate3d(-50%, -50%, 0)",width:30,zIndex:2},"& $lineBlock, & $absoluteLineBlock":{display:"inline-block",flex:"0 0 auto",height:"100%",position:"relative"},"& $rowContents":{alignItems:"center",borderRadius:"3px",color:"#595959",display:"flex",height:"100%",justifyContent:"space-between",padding:10,position:"relative"}},row:{"& $rowIcon, & $rowLabel,& $rowToolbar":{alignItems:"center",display:"flex"},"& $rowLabel":{flex:1,overflow:"hidden",padding:"0px 6px"},"& $rowToolbar":{cursor:"pointer"},"&$activeRow":{backgroundColor:"#F3FBFF",color:"#1890FF"},"&$rowCancelPad":{"&::before":{backgroundColor:"#ffd2d6",border:"2px dotted #e6a8ad"}},"&$rowLandingPad":{"&::before":{backgroundColor:"#dddddd",border:"2px dotted #b5b5b5"}},"&$rowLandingPad, &$rowCancelPad":{"& *":{opacity:".6 !important"},"&::before":{bottom:0,content:'""',left:0,position:"absolute",right:0,top:0,zIndex:-1},backgroundColor:"transparent",border:"none",boxShadow:"none",outline:"none"},"&$rowLandingPadDisable":{"&:hover":{backgroundColor:"white"}},backgroundColor:"white",cursor:"grab",display:"flex",flex:1,padding:6,position:"relative"},rowCancelPad:{},rowContents:{},rowIcon:{color:"#D9D9D9"},rowLabel:{},rowLandingPad:{},rowLandingPadDisable:{},rowSearchFocus:{boxShadow:"inset 0 -7px 7px -3px #fc6421"},rowSearchMatch:{boxShadow:"inset 0 -7px 7px -3px #0080ff"},rowToolbar:{},rowWrapper:{"&:active":{backgroundColor:"transparent"},"&:hover":{backgroundColor:"#F3FBFF"},boxSizing:"border-box",cursor:"grab",display:"flex",height:"100%"},rowWrapperDragDisabled:{cursor:"default"}}}},function(n,e,t){function o(y){return y&&y.__esModule?y:{default:y}}function a(y){var _=y.children,C=y.listIndex,z=y.swapFrom,D=y.swapLength,L=y.swapDepth,R=y.lowerSiblingCounts,I=y.connectDropTarget,g=y.isOver,w=y.draggedNode,S=y.canDrop,O=v();return I(s.default.createElement("div",{className:O.node},l.Children.map(_,function(j){return(0,l.cloneElement)(j,{canDrop:S,draggedNode:w,isOver:g,listIndex:C,lowerSiblingCounts:R,swapDepth:L,swapFrom:z,swapLength:D})})))}Object.defineProperty(e,"__esModule",{value:!0});var l=t(0),s=o(l),c=t(1),d=o(c),f=t(2),u=o(f),p=t(7),h=o(p),v=(0,u.default)(h.default,{name:"MuiTreeNode"});a.defaultProps={canDrop:!1,draggedNode:null,swapDepth:null,swapFrom:null,swapLength:null},a.propTypes={canDrop:d.default.bool,children:d.default.node.isRequired,connectDropTarget:d.default.func.isRequired,draggedNode:d.default.shape({}),getPrevRow:d.default.func.isRequired,isOver:d.default.bool.isRequired,listIndex:d.default.number.isRequired,lowerSiblingCounts:d.default.arrayOf(d.default.number).isRequired,node:d.default.shape({}).isRequired,path:d.default.arrayOf(d.default.oneOfType([d.default.string,d.default.number])).isRequired,rowDirection:d.default.string.isRequired,scaffoldBlockPxWidth:d.default.number.isRequired,swapDepth:d.default.number,swapFrom:d.default.number,swapLength:d.default.number,treeId:d.default.string.isRequired,treeIndex:d.default.number.isRequired},e.default=a},function(n,e,t){Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(){return{node:{display:"flex"}}}}])})}(nn)),nn.exports}var Fu=ju();const Gu=sn(Fu);function wr(r=["en","zh"]){const{blocklet:i}=at();return k.useMemo(()=>{const e=i.environments.find(c=>c.key==="BLOCKLET_APP_LANGUAGES"),t=e?e.value.split(","):r,o=t[0]||"en",a=t.filter(c=>qe.SUPPORTED_LANGUAGES[c]),l=a.reduce((c,d)=>(c[d]=qe.SUPPORTED_LANGUAGES[d].nativeName,c),{}),s=a.map(c=>({code:c,name:qe.SUPPORTED_LANGUAGES[c].nativeName}));return{locales:t,localeMap:l,defaultLocale:o,languages:s}},[i.environments,r])}const Wu=r=>r.from!=="team-tmpl";function $u({prevPath:r,nextPath:i,node:n}){if(n.from==="team-tmpl")return!1;const e=r.length,t=i.length;return!!(e===t&&cl(r.slice(0,e-1),i.slice(0,t-1)))}function ma({treeNode:r}){const{locale:i}=ze(),{blocklet:n}=at(),{defaultLocale:e}=wr(),t=n.environments.find(l=>l.key===qe.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_URL),o=re(l=>{if(l?.startsWith("/"))try{return new URL(l,t?.value).href}catch{console.error("Failed to parse url",{url:l,origin:t?.value})}return l});function a(){const{title:l,subtitle:s}=r;let c=l,d=s;return ht(l)&&(c=l[i]||l[e]||l.en),!k.isValidElement(s)&&ht(s)&&(d=s[i]||s[e]||s.en),m.jsxs(ce,{sx:{display:"flex",alignItems:"center"},children:[m.jsx(Pe,{variant:"subtitle1",sx:{fontSize:16},children:c}),s&&m.jsx(Pe,{variant:"body2",color:"gray",sx:{ml:1.5,lineHeight:1},children:d})]})}return m.jsxs(m.Fragment,{children:[r.icon&&(rr(o(r.icon))?m.jsx(nt,{size:16,style:{marginRight:4},icon:o(r.icon)}):m.jsx(Se,{size:16,style:{marginRight:4},icon:r.icon})),a()]})}ma.propTypes={treeNode:b.object.isRequired};const Hu=Je(ce)(({theme:r})=>({"& .MuiNodeContent-row":{backgroundColor:r.palette.background.default}}));function Sa({treeData:r,setTreeData:i=()=>{},renderActions:n=()=>{}}){const e=r.map(o=>({...o,expanded:!0})),t={};return typeof window<"u"&&(t.context=window),m.jsx(Hu,{children:m.jsx(Ka,{backend:Xa,...t,children:m.jsx(Mc,{generateNodeProps:o=>{const a=Wu(o.node);return{buttons:n({data:o.node,className:"list-item-actions"}),icons:a?m.jsx(Se,{icon:"ic:round-drag-indicator"}):m.jsx(ce,{sx:{width:16,height:16}}),title:m.jsx(ma,{treeNode:o.node})}},maxDepth:2,isVirtualized:!1,treeData:e,onChange:i,canDrop:$u,theme:Gu})})})}Sa.propTypes={treeData:b.object.isRequired,setTreeData:b.func,renderActions:b.func};var Uu=so();const Bu=sn(Uu);function ya({sx:r=null,onAdd:i=()=>{},onChange:n=()=>{},defaultLocale:e="en",locale:t="",locales:o=[],localeMap:a={},onRemoveLocale:l=()=>{}}){const{t:s}=ze(),c=k.useRef(),[d,f]=k.useState(null),u=Gt({localeList:[],inputLocale:"",localeError:""}),p=k.useMemo(()=>!!d,[d]),h=k.useMemo(()=>o.includes(t)?t:e,[o,t]),v=k.useMemo(()=>u.localeList.filter(g=>!!a[g]),[u.localeList,a]),y=k.useMemo(()=>Object.keys(Lt(a,[...u.localeList,e])).map(g=>({title:a[g],value:g})),[u.localeList]),_=k.useMemo(()=>`Default (${a[e]||Object.values(a)?.[0]})`,[a]),C=re(g=>g?g===e||u.localeList.includes(g)?s("navigation.form.localeExists",{value:g}):!0:s("common.requiredErrorText",{name:"Locale"})),z=re((g="")=>{const w=g?.trim(),S=C(w);return S!==!0?u.localeError=S:u.localeError="",S}),D=re(()=>{f(null),u.inputLocale="",u.localeError=""}),L=re(()=>{const g=u.inputLocale?.trim();z(g)===!0&&(D(),u.localeList.push(g),i(g))}),R=re((g,w)=>{g.preventDefault(),g.stopPropagation(),u.localeList=lo(u.localeList,w),l(w)}),I=re(g=>{const{value:w}=g.target;z(w),u.inputLocale=w});return k.useEffect(()=>{u.localeList=[...o]},[o,u]),el("enter",()=>{setTimeout(()=>{L()})},{target:c}),m.jsxs(m.Fragment,{children:[m.jsxs(Oa,{sx:r,value:h,onChange:(g,w)=>{n(w)},children:[m.jsx(Ir,{label:_,value:e}),v.map(g=>m.jsx(Ir,{sx:{position:"relative"},label:m.jsxs(m.Fragment,{children:[a[g],m.jsx(Oe,{size:"small",color:"inherit",sx:{position:"absolute",top:0,right:0},onClick:w=>{R(w,g)},children:m.jsx(Se,{icon:"mdi:close",height:14})})]}),value:g},g)),m.jsx(Oe,{color:"primary",disableFocusRipple:!0,sx:{width:"48px"},onClick:g=>{f(g.currentTarget)},children:m.jsx(Se,{icon:"mdi:plus"})})]}),m.jsx(An,{open:p,anchorEl:d,onClose:D,anchorOrigin:{vertical:"bottom",horizontal:"left"},children:m.jsxs(ce,{sx:{p:2,width:"270px"},children:[m.jsx(Pe,{variant:"subtitle2",children:s("navigation.form.localePlaceholder")}),m.jsx(ce,{sx:{mt:1},children:m.jsx(Fn,{required:!0,fullWidth:!0,label:"Locale",value:u.inputLocale,options:y,onChange:I,error:!!u.localeError,helperText:u.localeError||" "})}),m.jsx(ce,{sx:{display:"flex",justifyContent:"flex-end"},children:m.jsx(rn,{size:"small",variant:"contained",onClick:L,children:s("common.confirm")})})]})})]})}ya.propTypes={sx:b.any,onAdd:b.func,onChange:b.func,onRemoveLocale:b.func,defaultLocale:b.string,locale:b.string,localeMap:b.object,locales:b.array};const br=["https://api.iconify.design","https://api.unisvg.com","https://api.simplesvg.com"];async function Ca(r,i,n=5e3){for(const e of br){const t=Ie(e,r);try{return await Nl.get(t,{params:i,timeout:n})}catch(o){console.warn(`Failed to fetch from ${t}:`,o)}}throw new Error(`All icon API endpoints ${r} failed`)}async function Vu({keyword:r,limit:i=999,start:n=0,palette:e=!1}){let t="",o=r;r.includes(":")&&([t,o]=r.split(":"));const{data:a}=await Ca("/search",{query:`${o} palette=${e}`||r,start:n,limit:i,...t&&{prefix:t}});return a}const Qt=new Map;async function qu(r){if(Qt.has(r))return Qt.get(r);const i=(async()=>{const{data:n}=await Ca("/collection",{prefix:r}),e=new Set;return n.uncategorized?.forEach(t=>e.add(`${r}:${t}`)),Object.values(n.categories??{}).forEach(t=>{t.forEach(o=>e.add(`${r}:${o}`))}),Array.from(e)})();Qt.set(r,i);try{return await i}catch(n){throw Qt.delete(r),n}}function Ku(r){return Ie(br[0],`${r}.svg`)}function Xu(r){try{const i=new URL(r);for(const n of br)if(i.origin===n)return dl(i.pathname).replace(".svg","");return""}catch{return""}}function Yu(r){let i=!0,n=r;return r&&(r.startsWith("/")?(i=!1,n=""):rr(r)&&(n=Xu(r))),{isIconId:i,iconId:n}}const Qu=k.lazy(()=>Ya(()=>import("./index-6DYfiGIi.js"),__vite__mapDeps([0,1,2]),import.meta.url).then(r=>({default:r.Uploader}))),Bi=nr(nt)(({theme:r})=>({"&&":{color:r.palette.text.primary},"> img":{filter:r.palette.mode==="dark"?"invert(1)":"none"}}));function wa({icon:r,...i}){const[n,e]=k.useState(!1);return oo(async()=>{e(!1),await ro(r),e(!0)},[r]),r?n?m.jsx(Se,{icon:r,...i}):m.jsx(Se,{color:"#f06f6e",icon:"ic:baseline-error",...i}):m.jsx(Se,{icon:"material-symbols-light:select-rounded",...i})}wa.propTypes={icon:b.string.isRequired};function Jn({value:r,helperText:i,label:n,placeholder:e,methods:t=["select"],iconifyShape:o="id",...a}){const{getSessionInHeader:l,prefix:s,inService:c}=co(),{blocklet:d}=at(),f=tr(Z=>Z.breakpoints.down("md")),u=d.environments.find(Z=>Z.key===qe.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_URL),p=l(),h=k.useRef(null),v=k.useRef(null),y=k.useRef(null),{t:_,locale:C}=ze(),{isIconId:z,iconId:D}=Yu(r),[L,R]=k.useState(null),{onChange:I,onBlur:g,sx:w,...S}=a,O=t.includes("upload"),j=t.includes("select"),U=Ie(s,"/api/media/upload",d.appPid),q=Gt({showPopover:!1}),A=re(Z=>{if(Z?.startsWith("/"))try{const B=c?window.location.origin:u?.value;return new URL(Z,B).href}catch{console.error("Failed to resolve url: ",Z)}return Z},[u?.value,c]),W=re(async Z=>await h.current.getUploader().uploadFile(Z)),H=re(()=>{R(null)}),V=re(()=>{j&&R(y.current)}),K=re(async Z=>{try{if(o==="url"){const B=Ku(Z),Q=await bl(B,{width:128,height:128}),te=await xl(Q,Z);await W(te)}else I?.(Z)}catch(B){console.error("Failed to pick icon:",B)}H()}),J=re(Z=>{Z.stopPropagation(),v.current.open(),H()}),X=re(Z=>{a?.onChange?.(Z.data.url)});return m.jsxs(m.Fragment,{children:[m.jsx(ft,{helperText:i,value:r,sx:{"& .MuiInputBase-root,.MuiInputBase-input":{cursor:"pointer"},...w},onClick:j?V:void 0,...S,label:n,placeholder:e,slotProps:{input:{ref:y,readOnly:!0,startAdornment:m.jsx(jn,{position:"start",sx:{cursor:"auto"},onMouseEnter:()=>{r&&(q.showPopover=!0)},onMouseLeave:()=>{q.showPopover=!1},children:m.jsx(Bi,{size:28,icon:A(r),alt:"Error"})}),endAdornment:m.jsxs(jn,{position:"end",children:[m.jsx(Oe,{sx:{visibility:r?"visible":"hidden"},onClick:Z=>{Z.stopPropagation(),I("")},children:m.jsx(to,{style:{fontSize:18}})}),O&&m.jsx(za,{title:_("common.upload"),children:m.jsx(Oe,{disableFocusRipple:!1,disableRipple:!1,onClick:J,children:m.jsx(wa,{icon:"material-symbols:upload-file-outline-rounded",width:24,height:24})})}),j&&m.jsx(ce,{component:Da,sx:{mr:"-6px",fontSize:24,transform:L?"rotate(180deg)":"rotate(0deg)",transition:"transform 200ms",pointerEvents:"none"}})]})}}}),j&&m.jsx(An,{open:!!L,anchorEl:L,anchorOrigin:{vertical:"bottom",horizontal:"left"},transformOrigin:{vertical:"top",horizontal:"left"},slotProps:{paper:{style:{...f&&{width:"100vw",height:"100vh",boxShadow:"none"}}}},onClose:H,children:m.jsx(ba,{label:n,placeholder:e,value:z?D:"",sx:{width:y.current?.offsetWidth??"auto"},onPick:K,onClose:H})}),m.jsx(Zn,{ref:h,locale:C,apiPath:U,headers:p,imageEditorProps:{},onUploadFinish:X}),m.jsx(Zn,{ref:v,locale:C,apiPath:U,headers:p,onUploadFinish:X}),m.jsx(An,{sx:{pointerEvents:"none"},open:q.showPopover,anchorEl:y.current,anchorOrigin:{vertical:"top",horizontal:"left"},transformOrigin:{vertical:"bottom",horizontal:"center"},onClose:()=>{q.showPopover=!1},disableRestoreFocus:!0,children:m.jsx(Bi,{size:120,icon:A(r),alt:"Error"})})]})}Jn.propTypes={value:b.string.isRequired,label:b.any,placeholder:b.any,helperText:b.string,methods:b.arrayOf(b.oneOf(["select","upload"])),iconifyShape:b.oneOf(["id","url"])};function ba({label:r,placeholder:i,value:n="",sx:e,onPick:t,onClose:o,...a}){const[l,s]=k.useState([]),[c,d]=k.useState(!0),[f,u]=k.useState(n),[p,h]=k.useState(!1),v=k.useRef(null),y=k.useRef([]),_=k.useRef(1),C=k.useRef(!0),{t:z}=ze(),D=96,L=re(()=>{!C.current||c||(d(!0),setTimeout(()=>{const g=_.current+1,w=(g-1)*D,S=g*D,O=y.current.slice(w,S);s(j=>[...j,...O]),_.current=g,C.current=S<y.current.length,d(!1)},300))}),R=re(g=>{y.current=g,_.current=1,C.current=g.length>D;const w=g.slice(0,D);s(w),h(g.length===0),C.current&&L()}),{run:I}=ao(async g=>{if(g){d(!0);try{const{icons:w}=await Vu({keyword:g});R(w)}catch(w){console.error("Failed to search icons:",w),h(!0)}finally{d(!1)}}},{wait:300,trailing:!0});return k.useEffect(()=>{const g=()=>{if(!v.current)return;const{scrollTop:S,scrollHeight:O,clientHeight:j}=v.current;(S+j>=O-150||O<=j)&&L()},w=v.current;return w&&(w.addEventListener("scroll",g),g()),()=>{w&&w.removeEventListener("scroll",g)}},[L,c]),oo(async()=>{if(f)I(f);else{d(!0);try{const g=await qu("mdi-light");R(g)}catch(g){console.error("Failed to fetch default icons:",g),h(!0)}finally{d(!1)}}},[f,I,R]),m.jsxs(Ju,{ref:v,sx:e,...a,children:[m.jsxs(ce,{className:"icon-picker-input",children:[m.jsx(ft,{label:z("navigation.form.searchIcons"),placeholder:z("navigation.form.searchIconsPlaceholder"),size:"small",value:f,sx:{flexGrow:1},autoFocus:!0,onChange:g=>u(g.target.value),slotProps:{input:{endAdornment:m.jsx(Oe,{sx:{visibility:f?"visible":"hidden"},onClick:()=>u(""),children:m.jsx(to,{style:{fontSize:18}})})}}}),m.jsx(rn,{onClick:o,children:z("common.cancel")})]}),m.jsxs(ce,{children:[l.length>0&&m.jsx(ce,{sx:{display:"grid",gridTemplateColumns:"repeat(auto-fill, minmax(32px, auto))",gridAutoRows:"min-content",alignItems:"center",gap:1,p:2},children:l.map(g=>m.jsx(Zu,{$active:n===g,onClick:()=>{t(g)},children:m.jsx(Se,{icon:g,width:"32",height:"32"})},g))}),p&&m.jsx(ce,{sx:{p:2,display:"flex",justifyContent:"center",alignItems:"center",height:"100%"},children:m.jsx(ce,{sx:{textAlign:"center"},children:"No matching results"})}),c&&m.jsx(ce,{sx:{p:2,display:"flex",justifyContent:"center"},children:m.jsx(Na,{size:20})})]})]})}ba.propTypes={label:b.any,placeholder:b.any,value:b.string,sx:b.object,onPick:b.func.isRequired,onClose:b.func.isRequired};const Ju=nr(ce)(({theme:r})=>({minWidth:"100%",height:"100%",padding:0,overflow:"auto",[r.breakpoints.up("md")]:{minWidth:"480px",maxHeight:"400px",padding:r.spacing(1),paddingTop:0,".icon-picker-input":{paddingTop:r.spacing(2),paddingBottom:r.spacing(1),paddingLeft:r.spacing(2),paddingRight:r.spacing(2)}},".icon-picker-input":{position:"sticky",display:"flex",alignItems:"center",gap:r.spacing(1),top:0,zIndex:1,backgroundColor:r.palette.background.paper}})),Zu=nr(Oe,{shouldForwardProp:r=>r!=="$active"})(({$active:r,theme:i})=>({boxSizing:"content-box",backgroundColor:r?i.palette.action.hover:"transparent",borderRadius:4,padding:1,width:32,height:32,"&:hover":{backgroundColor:i.palette.action.hover}}));function Zn({ref:r=null,locale:i,apiPath:n,headers:e,imageEditorProps:t={actions:{revert:!0,rotate:!0,granularRotate:!0,flip:!0,zoomIn:!0,zoomOut:!0,cropSquare:!1,cropWidescreen:!1,cropWidescreenVertical:!1},cropperOptions:{autoCrop:!0,autoCropArea:1,aspectRatio:1,initialAspectRatio:1,croppedCanvasOptions:{minWidth:120,minHeight:120}}},onUploadFinish:o}){return m.jsx(k.Suspense,{children:m.jsx(Qu,{locale:i,ref:r,popup:!0,installerProps:{disabled:!0},plugins:["ImageEditor"],onUploadFinish:a=>o?.(a),coreProps:{restrictions:{allowedFileTypes:["image/*"],maxFileSize:1024*1024*1,maxNumberOfFiles:1}},dashboardProps:{autoOpen:"imageEditor"},imageEditorProps:t,apiPathProps:{uploader:n,disableMediaKitPrefix:!0,disableAutoPrefix:!0,disableMediaKitStatus:!0},tusProps:{headers:e}})})}Zn.propTypes={ref:b.any,locale:b.string,apiPath:b.string,headers:b.object,imageEditorProps:b.object,onUploadFinish:b.func};const Vi=24,qi=48,Ki="add";b.string.isRequired;function xr({ref:r=null,section:i="",components:n=[],rawNavigations:e=[],onChange:t=()=>{},...o}){const{roles:a}=fo(),{t:l,locale:s}=ze(),{localeMap:c,defaultLocale:d}=wr(),f=re(()=>({title:{[d]:""},description:{[d]:""},link:{[d]:""}})),u=re(T=>lo(Array.from(new Set(ve.NAVIGATION_I18N_FIELDS.flatMap(x=>ht(T[x])?Object.keys(T[x]):[]))),d)),p=k.useRef(()=>{}),h=Gt({isRoot:!0,type:Ki,linkDisabled:!1,locale:d,formState:f(),get localeList(){return u(h.formState)}}),{handleSubmit:v,control:y,reset:_,setValue:C,clearErrors:z,formState:{errors:D}}=Ol({mode:"onChange",defaultValues:{id:"",title:"",description:"",icon:"",link:"",component:"",parent:"",role:[]}});k.useEffect(()=>{ve.NAVIGATION_I18N_FIELDS.forEach(T=>C(T,h.formState[T][h.locale]))},[C,h.locale]);const L=zl({control:y}),R=L.component,I=L.title,g=L.description,w=L.link,S=L.parent;k.useEffect(()=>{h.formState.title[h.locale]=I},[I]),k.useEffect(()=>{h.formState.description[h.locale]=g},[g]),k.useEffect(()=>{h.formState.link[h.locale]=w},[w]),k.useEffect(()=>{t?.(L)},[L,t]);const O=k.useMemo(()=>e.find(x=>R?n.find(Y=>Y.name===R).did===x.id:x.id===S),[n,e,R,S]),j=k.useMemo(()=>{if(O?.component){const T=n.find(ee=>ee.name===O.component),{link:x}=T||{},$=ht(x)?x[h.locale]:x;if(R)return Nr($);const Y=ht(O.link)?O.link[h.locale]:O.link;return Nr(Ie($,Y||"/"))}return null},[n,h.locale,O,R]),U=k.useMemo(()=>{const{component:T}=O||{},x=n.find(ee=>ee.name===T),{navigation:$=[]}=x||{};return ye.flattenNavigation($,{transform(ee,se){return se?.section&&(ee.section=ee.section||se.section),ee}}).filter(ee=>ee.link).filter(ee=>ye.isMatchSection(ee.section,i)).map(ee=>({label:ee.link,title:ee.title[s]||ee.title}))},[O,n,i,s]),q=re(()=>{h.isRoot=!0,h.locale=d,h.type=Ki,h.linkDisabled=!1,h.formState=f(),_(),z(),p.current=()=>{}}),A=re((T={})=>(h.localeList.length>0&&ve.NAVIGATION_I18N_FIELDS.forEach(x=>{ul(h.formState[x]).length>1&&(T[x]=h.formState[x])}),fl(T.role)&&(T.role=void 0),T)),W=re(({parent:T}={},x=()=>{})=>{h.type="add",h.isRoot=!T,C("parent",T?.id),p.current=$=>{x($)}}),H=re((T={},x=()=>{})=>{const{id:$,icon:Y,parent:ee,component:se,role:fe=[]}=T;C("id",$),C("icon",Y),T.from==="team-tmpl"&&(h.linkDisabled=!0);const we=u(T),Ee=(he,De)=>{pl(he)?h.formState[De]=we.reduce((ne,ue)=>(ne[ue]=he,ne),{[d]:he}):ht(he)?h.formState[De]=Le(he):h.formState[De]={}};ve.NAVIGATION_I18N_FIELDS.forEach(he=>Ee(T[he],he)),ve.NAVIGATION_I18N_FIELDS.forEach(he=>C(he,h.formState[he][h.locale])),C("component",se),C("parent",ee),C("role",fe||[]),h.type="edit",h.isRoot=!ee,p.current=he=>{const De=hl(he,["id","title","description","icon","component","link","role"]);x(De)}}),V=re(T=>{const x=T?.trim();if(i!=="bottomNavigation"){if(!x)return l("common.requiredErrorText",{name:l("navigation.form.title")});if(x.length>Vi)return l("navigation.form.titleTooLong",{len:Vi})}return!0}),K=re(T=>{const x=T?.trim();return x&&x.length>qi?l("navigation.form.descriptionTooLong",{len:qi}):!0}),J=re(T=>T?.startsWith("/")?new URL(T,window.location.origin).href:T),X=re(async T=>{const x=T?.trim();if(x){if(rr(J(x)))return!0;try{await ro(x)}catch{return l("navigation.form.invalidIcon")}}return!0}),Z=re(T=>{const x=T?.trim();return x?X(x):l("common.requiredErrorText",{name:l("navigation.form.icon")})}),B=re(T=>{const x=T?.trim();return x?ye.checkLink(x)?!0:l("navigation.form.invalidLink"):h.isRoot?!0:l("common.requiredErrorText",{name:l("navigation.form.link")})}),Q=re(T=>{h.locale=T,ve.NAVIGATION_I18N_FIELDS.forEach(x=>{h.formState[x][T]||(h.formState[x][T]="")}),setTimeout(()=>{z()})}),te=re(()=>{const{title:T,link:x}=h.formState;if(i!=="bottomNavigation")for(const $ of Object.keys(T)){const Y=V(T[$]);if(Y!==!0)return Y}for(const $ of Object.keys(x)){const Y=B(x[$]);if(Y!==!0)return Y}return!0}),F=re(T=>{const x=te();x===!0?p.current(A(T)):kt.error(x)}),G=re(T=>{h.locale=d,ve.NAVIGATION_I18N_FIELDS.forEach(x=>{h.formState[x]=Lt(h.formState[x],T)}),t?.(L)}),N=re(T=>{h.locale=T,ve.NAVIGATION_I18N_FIELDS.forEach(x=>{h.formState[x][T]=h.formState[x][d]}),t?.(L),setTimeout(()=>{z()})});return k.useImperativeHandle(r,()=>({add:W,edit:H,resetImmediate:()=>q(),reset:()=>setTimeout(()=>q(),0),submit:v(F)}),[W,q,H,v,F]),m.jsxs(ce,{...o,children:[m.jsx(ya,{sx:{mb:1},onAdd:N,onChange:Q,onRemoveLocale:G,defaultLocale:d,locale:h.locale,localeMap:c,locales:h.localeList}),m.jsxs("form",{noValidate:!0,autoComplete:"off",children:[i!=="bottomNavigation"&&m.jsx($e,{name:"title",control:y,rules:{validate:V},render:({field:T})=>m.jsx(ft,{fullWidth:!0,variant:"outlined",margin:"dense",required:!0,placeholder:l("navigation.form.titlePlaceholder"),label:l("navigation.form.title"),disabled:h.isEdit,error:!!D?.title?.message,helperText:D?.title?.message||" ",...T})}),i==="bottomNavigation"?m.jsx($e,{name:"icon",control:y,rules:{validate:Z},render:({field:T})=>m.jsx(Jn,{fullWidth:!0,required:!0,variant:"outlined",margin:"dense",placeholder:l("navigation.form.iconPlaceholder"),label:l("navigation.form.icon"),error:!!D?.icon?.message,helperText:D?.icon?.message,disabled:h.locale!==d,methods:["select"],iconifyShape:"url",...T})}):m.jsx($e,{name:"icon",control:y,rules:{validate:X},render:({field:T})=>m.jsx(Jn,{fullWidth:!0,variant:"outlined",margin:"dense",placeholder:l("navigation.form.iconPlaceholder"),label:l("navigation.form.icon"),error:!!D?.icon?.message,helperText:D?.icon?.message,disabled:h.locale!==d,...T})}),h.isRoot&&m.jsx($e,{name:"component",control:y,render:({field:T})=>m.jsx(Fn,{fullWidth:!0,margin:"dense",disabled:h.locale!==d&&T.value,label:l("navigation.form.component"),placeholer:l("navigation.form.componentPlaceholder"),options:n.map(x=>({title:x.title,value:x.name,description:x.link})),error:!!D?.component?.message,helperText:D?.component?.message||" ",...Lt(T,"ref")})}),!h.isRoot&&["header"].includes(i)&&m.jsx($e,{name:"description",control:y,rules:{validate:K},render:({field:T})=>m.jsx(ft,{fullWidth:!0,variant:"outlined",margin:"dense",placeholder:l("navigation.form.descriptionPlaceholder"),label:l("navigation.form.description"),disabled:h.isEdit,error:!!D?.description?.message,helperText:D?.description?.message||" ",...T})}),m.jsx($e,{name:"link",control:y,rules:{validate:B},render:({field:T})=>m.jsx(no,{fullWidth:!0,margin:"dense",children:m.jsx(La,{disablePortal:!0,freeSolo:!0,blurOnSelect:!0,autoSelect:!0,fullWidth:!0,disabled:h.linkDisabled,isOptionEqualToValue:x=>x.label,options:U,renderInput:x=>m.jsx(ft,{...x,placeholder:l("navigation.form.linkPlaceholder"),label:l("navigation.form.link"),error:!!D?.link?.message,helperText:D?.link?.message||"/abc/bcd or /abc or https://arcblock.io",slotProps:{input:{startAdornment:j?m.jsx(jn,{position:"start",sx:{textDecoration:Bu(w||"")?"line-through":""},children:j}):null}}}),renderOption:(x,$)=>m.jsxs(ce,{component:"li",...x,children:[$.label,m.jsx(Pe,{component:"span",variant:"body2",sx:{marginLeft:1,color:"text.secondary"},children:$.title})]}),margin:"dense",...T,onChange:()=>{},onInputChange:(x,$)=>{T.onChange($)}})})}),["dashboard","sessionManager"].includes(i)&&m.jsx($e,{name:"role",control:y,render:({field:T})=>m.jsx(Fn,{fullWidth:!0,multiple:!0,margin:"dense",label:l("navigation.form.role"),placeholer:l("navigation.form.rolePlaceholder"),options:a.map(x=>({title:x.title,value:x.name})),error:!!D?.role?.message,helperText:D?.role?.message||" ",...Lt(T,"ref")})}),i==="bottomNavigation"&&m.jsx($e,{name:"title",control:y,rules:{validate:V},render:({field:T})=>m.jsx(ft,{fullWidth:!0,variant:"outlined",margin:"dense",placeholder:l("navigation.form.titlePlaceholder"),label:l("navigation.form.title"),disabled:h.isEdit,error:!!D?.title?.message,helperText:D?.title?.message||" ",...T})})]})]})}xr.propTypes={ref:b.any,section:b.string,components:b.array,rawNavigations:b.array,onChange:b.func};function _r({ref:r=null,section:i="",components:n=[],rawNavigations:e=[]}){const{t}=ze(),[o,{setTrue:a,setFalse:l}]=tl(),[s,c]=k.useState("add"),d=k.useRef(null),f=k.useMemo(()=>{const y={add:t("common.create"),edit:t("common.edit")}[s];return y?`${y} ${t("navigation.navigation")}`:"--"},[t,s]),u=k.useCallback(()=>{l(),d.current?.reset()},[l]),p=k.useCallback((v={},y=()=>{})=>{c("add"),d.current?.add(v,_=>y(u,_)),a()},[a,u]),h=k.useCallback((v={},y=()=>{})=>{c("edit"),d.current?.edit(v,_=>y(u,_)),a()},[a,u]);return k.useImperativeHandle(r,()=>({add:p,edit:h,close:u}),[p,h,u]),m.jsx(Qa,{open:o,title:f,keepMounted:!0,onClose:u,sx:{".MuiDialogContent-root":{pt:0}},actions:m.jsx(Ja,{color:"primary",variant:"contained",onClick:()=>d.current?.submit(),children:t("common.confirm")}),children:m.jsx(xr,{ref:d,section:i,components:n,rawNavigations:e})})}_r.propTypes={ref:b.any,section:b.string,components:b.array,rawNavigations:b.array};function xa({className:r="",add:i=()=>{},edit:n=()=>{},toggle:e=()=>{},del:t=()=>{},data:o,section:a=""}){const{t:l}=ze(),s=["yaml","team-tmpl"].includes(o.from),c=k.isValidElement(o.subtitle);function d(v){v.preventDefault(),v.stopPropagation()}const f=k.useCallback(v=>{d(v),i(o)},[i,o]),u=k.useCallback(v=>{d(v),n(o)},[n,o]),p=k.useCallback(v=>{d(v),e(o)},[e,o]),h=k.useCallback(v=>{d(v),t(o)},[t,o]);return m.jsxs("div",{className:r,children:[!o.parent&&["header","footer","dashboard"].includes(a)&&m.jsx("span",{title:l(c?"navigation.action.noAddSub":"navigation.action.addSub"),children:m.jsx(Oe,{size:"small",color:"success",onClick:f,disabled:c,children:m.jsx(Se,{icon:"mdi:plus-box-outline"})})}),m.jsx("span",{title:l(c?"navigation.action.noEdit":"navigation.action.edit"),children:m.jsx(Oe,{size:"small",color:"primary",onClick:u,disabled:c||o.from==="team-tmpl",children:m.jsx(Se,{icon:"mdi:pencil-outline"})})}),m.jsx("span",{title:c?l("navigation.action.noEdit"):o.visible?l("navigation.action.hide"):l("navigation.action.show"),children:m.jsx(Oe,{size:"small",color:"warning",onClick:p,disabled:c,children:o.visible===!1?m.jsx(Se,{icon:"mdi:eye-off-outline"}):m.jsx(Se,{icon:"mdi:eye-outline"})})}),m.jsx("span",{title:l(s&&!c?"navigation.action.noDel":"navigation.action.del"),children:m.jsx(Oe,{disabled:s&&!c,size:"small",color:"error",onClick:h,children:m.jsx(Se,{icon:"mdi:delete"})})})]})}xa.propTypes={data:b.object.isRequired,className:b.string,add:b.func,edit:b.func,toggle:b.func,del:b.func,section:b.string};function _a(r,i){return r?i===r.nodeName?!0:_a(r.parentNode,i):!1}function ef({...r}){return m.jsx("div",{onClick:i=>{_a(i.target,"A")&&i.preventDefault()},...r})}function Ra({className:r="",navigation:i=[]}){const{blocklet:n}=at(),{locale:e}=ze(),{languages:t}=wr(),o=Dl({blocklet:n,square:!0}),a=n?.environments?.find(d=>d.key===qe.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_COPYRIGHT_OWNER)?.value,l=n?.environments?.find(d=>d.key===qe.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_COPYRIGHT_YEAR)?.value,s=a||l?{owner:a,year:l}:void 0,c={appId:n.appDid,appLogo:o,appName:n.meta.title,enableConnect:!0,enableLocale:!1,navigation:i,copyright:s};return m.jsx(Za,{translations:El,locale:e,languages:t,children:m.jsx(ef,{children:m.jsxs(ce,{className:r,children:[m.jsx(_l,{meta:c,showDomainWarningDialog:!1,sx:{".header-container":{maxWidth:"none"}}}),m.jsx(ce,{children:m.jsx(Ml,{meta:c,invalidPathFallback:()=>{},headerProps:{style:{display:"none"}},hideHtmlTitle:!0,showDomainWarningDialog:!1,children:m.jsx(Tr,{container:!0,spacing:2,children:new Array(6).fill().map((d,f)=>m.jsxs(Tr,{size:4,children:[m.jsx(mn,{animation:!1,variant:"rectangular",width:"100%",height:120}),m.jsxs(ce,{sx:{pt:.5},children:[m.jsx(mn,{animation:!1}),m.jsx(mn,{width:"60%",animation:!1})]})]},f))})})}),m.jsx(Ll,{meta:c,sx:{".MuiContainer-root":{maxWidth:"none"}}})]})})})}Ra.propTypes={className:b.string,navigation:b.array};const tf=Ma(Ra)`
34
34
  .dashboard {
35
35
  height: auto !important;
36
36
  }
37
37
  .dashboard-content + div {
38
38
  display: none;
39
39
  }
40
- `,nf=r=>{const i=r.replace("#","");if(!/^([A-Fa-f0-9]{3}){1,2}$/.test(i))return{r:0,g:0,b:0};const n=i.length===3?i.split("").map(e=>e+e).join(""):i;return{r:parseInt(n.substr(0,2),16),g:parseInt(n.substr(2,2),16),b:parseInt(n.substr(4,2),16)}};function rf({src:r,color:i,size:n=24,...e}){const[t,o]=k.useState("");return k.useEffect(()=>{const a=new Image;return a.crossOrigin="anonymous",a.onload=()=>{const l=document.createElement("canvas");l.width=a.width,l.height=a.height;const s=l.getContext("2d");s.drawImage(a,0,0);const c=s.getImageData(0,0,l.width,l.height),{data:d}=c,f=nf(i);for(let u=0;u<d.length;u+=4)if(d[u+3]>0){const p=d[u+3]/255;d[u]=f.r*p,d[u+1]=f.g*p,d[u+2]=f.b*p}s.putImageData(c,0,0),o(l.toDataURL("image/png"))},a.src=r,()=>{a.onload=null}},[r,i]),m.jsx(ce,{component:"img",src:t||r,sx:{width:n,height:n,display:"block",opacity:t?1:.5,transition:"opacity 0.2s"},...e})}const er=375,Ia=667,Rr=56,of=Je(Zt)(({theme:r})=>({width:er,height:Ia,display:"flex",flexDirection:"column",overflow:"hidden",border:`1px solid ${r.palette.divider}`,borderRadius:32,position:"relative"})),Xi=Je(ce)(({theme:r})=>({height:Rr,borderTop:`1px solid ${r.palette.divider}`,display:"flex",backgroundColor:r.palette.background.paper})),Yi=Je(ce)(({theme:r,active:i})=>({flex:1,display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",cursor:"pointer",position:"relative",color:i?r.palette.primary.main:r.palette.text.secondary,"&:hover":{backgroundColor:r.palette.action.hover}})),af=Je(ce)(({theme:r,left:i})=>({position:"absolute",bottom:-Rr,left:i,transform:"translateX(-50%)",display:"flex",alignItems:"center",backgroundColor:r.palette.background.paper,borderRadius:r.shape.borderRadius,padding:`${r.spacing(.5)} ${r.spacing(1)}`,boxShadow:r.shadows[2],zIndex:1})),Jt=Je(ke)(({theme:r})=>({padding:r.spacing(.5),"&:not(:last-child)":{marginRight:r.spacing(.5)}})),lf=Je(ce)({flexGrow:1,height:"100%",position:"relative",overflow:"hidden"}),sf=Je(ce)(({theme:r})=>({width:400,paddingLeft:r.spacing(3),backgroundColor:r.palette.background.default,height:Ia,overflowY:"auto"}));function cf(){const{t:r,locale:i}=Oe(),{blocklet:n}=at(),e=Ea(),t=tr(e.breakpoints.down("md")),{state:o,getNavigation:a,updateNavigationItem:l,addNavigationItem:s,delNavigationItem:c,updateNavigationTree:d}=po(),{inService:f}=co(),u=k.useRef(null),p=k.useRef(null),h=k.useRef(null),v=n.environments.find(B=>B.key===Ve.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_URL),y=n?.settings?.theme?.light?.palette?.primary?.main,[_,C]=k.useState(0),[z,D]=k.useState(!1),M=k.useRef(0),R=k.useRef(null),I=a("bottomNavigation"),g=I.length>0,w=I.length<5,[S,O]=k.useState(I.length>0?I[0]:null),j=I.findIndex(B=>B.id===S?.id),U=re((B,Q)=>{const te=B?.[Q];return gl(te)?te[i]||te.en:te}),q=re(B=>{B.id!==S?.id&&O(B)}),A=re(B=>{R.current=B,h.current?.add({},(Q,te)=>{const F=s(te,R.current);O(F),Q()})}),W=re(()=>{D(!0)}),H=re(()=>{h.current?.edit(S,(B,Q)=>{l(Q),B()})}),{run:V}=ao(()=>{p.current?.submit()},{wait:300}),K=re(V),J=re(B=>{if(B?.startsWith("/"))try{const Q=f?window.location.origin:v?.value;return new URL(B,Q).href}catch{console.error("Failed to resolve url: ",B)}return B},[v?.value,f]),X=re(B=>{if(!B.destination)return;const Q=Array.from(I),[te]=Q.splice(B.source.index,1);Q.splice(B.destination.index,0,te),d(Q)}),Z=re(()=>{const B=I.find(te=>te.id===S?.id);if(!B)return"";let Q=U(B,"link")||"/";if(Q.startsWith("/"))try{Q=J(Ye(B.__base||"/",Q))}catch(te){return console.error("Failed to get active tab link",te),""}return Q});return k.useEffect(()=>{S&&!t&&(p.current?.resetImmediate(),p.current?.edit(S,B=>{l(B)}))},[S,l,t]),k.useEffect(()=>{const B=I.findIndex(x=>x.id===S?.id);if(B===-1||!u.current)return C(M.current);const te=er/I.length*(B+.5),F=u.current.getBoundingClientRect().width,G=F/2+16,N=er-(F/2+16),T=Math.min(Math.max(te,G),N);return M.current=T,C(T)},[S,I,M]),k.useEffect(()=>{I.length>0&&!S&&O(I[0])},[I,S]),m.jsx(ce,{sx:{display:"flex",justifyContent:"center"},children:m.jsxs(ce,{sx:{position:"relative",display:"inline-flex",alignItems:"flex-start",margin:"4px auto 0"},children:[m.jsxs(of,{elevation:2,children:[m.jsx(lf,{children:g&&m.jsx(Gl,{url:Z(),width:"100%",height:"100%",id:"tabbar-preview",className:"tabbar-preview-iframe",display:"block",position:"relative",styles:{border:"none",background:"#fff"}})}),m.jsxs(ce,{sx:{height:Rr,overflowY:"auto",flexShrink:0},children:[g&&m.jsx(Al,{onDragEnd:X,children:m.jsx(jl,{droppableId:"tabbar",direction:"horizontal",children:B=>m.jsxs(Xi,{ref:B.innerRef,...B.droppableProps,children:[I.map((Q,te)=>m.jsx(Fl,{draggableId:Q.id,index:te,children:(F,G)=>m.jsxs(Yi,{className:"tab-item",ref:F.innerRef,...F.draggableProps,...F.dragHandleProps,active:Q.id===S?.id,onClick:N=>q(Q,N),sx:{color:Q.id===S?.id?y:"text.secondary",opacity:G.isDragging?.5:1},children:[m.jsx(rf,{src:J(Q.icon),color:Q.id===S?.id?y:e.palette.text.secondary,size:24}),m.jsx(Te,{variant:"caption",children:U(Q,"title")})]})},Q.id)),B.placeholder]})})}),!g&&m.jsx(Xi,{children:m.jsx(Yi,{className:"tab-item",onClick:()=>A(0),children:m.jsx(nt,{icon:"mdi:plus-circle-outline",size:28})})})]})]}),!t&&g&&m.jsx(sf,{children:S&&m.jsx(xr,{ref:p,sx:{p:0},section:"bottomNavigation",components:o.components,rawNavigations:o.rawNavigation,onChange:K})}),m.jsx(Aa,{in:S!==null,children:m.jsxs(af,{ref:u,left:_,children:[m.jsx(Jt,{size:"small",disabled:!w,onClick:()=>A(j),children:m.jsx(nt,{icon:"mdi:plus-circle-outline",size:28})}),t&&m.jsx(Jt,{size:"small",onClick:()=>H(),children:m.jsx(nt,{icon:"mdi:edit-box-outline",size:28})}),m.jsx(Jt,{size:"small",onClick:()=>W(),children:m.jsx(nt,{icon:"mdi:delete-outline",size:28})}),m.jsx(Jt,{size:"small",disabled:!w,onClick:()=>A(j+1),children:m.jsx(nt,{icon:"mdi:plus-circle-outline",size:28})})]})}),m.jsx(_r,{ref:h,section:"bottomNavigation",components:o.components,rawNavigations:o.rawNavigation}),m.jsx(io,{confirmButton:{text:r("common.confirm"),props:{variant:"contained",color:"error"}},cancelButton:{text:r("common.cancel"),props:{color:"primary"}},open:z,title:r("navigation.action.delTabBarTitle"),onConfirm:()=>{D(!1),c(S.id),I.length>1?j>0?O(I[j-1]):O(I[j+1]):O(null)},onCancel:()=>{D(!1)},children:m.jsx("p",{children:r("navigation.action.delTabBarDesc")})})]})})}const df={login:Ee,logout:Ee,switch:Ee,switchDid:Ee,switchProfile:Ee,switchPassport:Ee,useDid:()=>({walletDid:"abcdefghijklmnopqrstuvwxyz"}),useOAuth:()=>({logoutOAuth:Ee,bindOAuth:Ee,configs:{},switchOAuthPassport:Ee})},Tt={header:"Header",footer:"Footer",bottom:"Footer Link",social:"Footer Social",dashboard:"Dashboard",sessionManager:"Session Blocklet",userCenter:"User Center",bottomNavigation:"Tab Bar"};function uf(){const{t:r}=Oe(),{blocklet:i}=at(),n=k.useRef(null),{roles:e}=fo(),t=tr(S=>S.breakpoints.down("md")),o=Gt({saveLoading:!1,resetLoading:!1,showResetConfirm:!1,mockRole:"owner"}),{state:a,navigation:l,getNavigation:s,saveNavigationList:c,resetNavigation:d,updateActiveSection:f,updateNavigationTree:u,updateNavigationItem:p,delNavigationItem:h,addNavigationItem:v}=po(),y=a.activeSection==="bottomNavigation",_=k.useCallback(S=>{n.current.add({parent:S},(O,j)=>{v(j),O()})},[v]),C=k.useCallback((S,O={})=>{switch(S){case"edit":n.current.edit(O,(j,U)=>{p(U),j()});break;case"toggle":p({id:O.id,visible:!O.visible});break;case"del":h(O.id);break}},[h,p]),z=k.useCallback(async()=>{try{o.saveLoading=!0,await c(a.rawNavigation),kt.success(r("common.succeeded"))}catch(S){kt.error(m.jsxs(ce,{children:[m.jsx(Te,{variant:"subtitle2",children:r("navigation.actionFailed")}),m.jsx(Te,{variant:"body1",children:Mr(S)||S.error})]}))}finally{o.saveLoading=!1}},[a.rawNavigation,o,c,r]),D=k.useCallback(async()=>{try{o.resetLoading=!0,await d(a.activeSection),kt.success(r("navigation.action.resetSuccessful"),{variant:"success"})}catch(S){kt.error(m.jsxs(ce,{children:[m.jsx(Te,{variant:"subtitle2",children:r("navigation.actionFailed")}),m.jsx(Te,{variant:"body1",children:Mr(S)||S.error})]}))}finally{o.resetLoading=!1}},[o,d,a.activeSection,r]),M=k.useMemo(()=>({session:{...df,user:{did:i.appDid,fullName:"Preview User",role:o.mockRole,isPreviewUser:!0}}}),[i.appDid,o.mockRole]),R=s(a.activeSection),I=nl(()=>a.activeSection!=="bottomNavigation"?!1:R.length>=5,[a.activeSection,R.length]),g=m.jsxs(m.Fragment,{children:[m.jsx(Zt,{variant:"outlined",sx:{display:"flex",height:660,overflow:"hidden",bgcolor:"background.default"},children:m.jsx(Zt,{elevation:0,sx:{flex:1,overflow:"auto",bgcolor:"background.default"},children:m.jsx(Sa,{treeData:R,setTreeData:u,renderActions:({data:S,className:O})=>m.jsx(xa,{data:S,className:O,section:a.activeSection,add:(...j)=>_(...j),del:(...j)=>C("del",...j),edit:(...j)=>C("edit",...j),toggle:(...j)=>C("toggle",...j)})})})}),m.jsxs(Pr,{variant:"dense",sx:{paddingLeft:"0px !important",paddingRight:"0px !important",mt:3},children:[m.jsx(Te,{variant:"h6",component:"div",sx:{flexGrow:1},children:r("common.preview")}),m.jsxs(no,{sx:{m:1,minWidth:120},size:"small",children:[m.jsx(ja,{children:r("common.role")}),m.jsx(kr,{value:o.mockRole,label:"Role",onChange:S=>{o.mockRole=S.target.value},children:e.map(S=>m.jsx(Or,{value:S.name,children:S.title},S.name))})]})]}),m.jsx(Zt,{variant:"outlined",children:m.jsx(Rl.Provider,{value:M,children:m.jsx(tf,{navigation:l})})})]}),w=m.jsx(cf,{});return m.jsxs(m.Fragment,{children:[t&&m.jsx(kr,{fullWidth:!0,size:"small",value:a.activeSection,onChange:S=>f(S.target.value),children:Object.keys(Tt).map(S=>m.jsxs(Or,{value:S,children:[Tt[S],` (${s(S).length})`]}))}),!t&&m.jsx(Sn,{variant:"outlined",children:Object.keys(Tt).map(S=>m.jsxs(rn,{variant:a.activeSection===S?"contained":void 0,onClick:()=>f(S),children:[Tt[S],` (${s(S).length})`]},S))}),m.jsxs(Pr,{variant:"dense",sx:{paddingLeft:"0px !important",paddingRight:"0px !important",mt:2},children:[m.jsx(Te,{variant:"h6",component:"div",sx:{flexGrow:1},children:r("common.config")}),m.jsx(Sn,{variant:"outlined",children:m.jsx(zr,{size:"small",variant:"outlined",color:"error",startIcon:m.jsx(me,{icon:"system-uicons:reset"}),sx:{mr:2},loading:o.resetLoading,loadingPosition:"start",onClick:()=>{o.showResetConfirm=!0},children:r("navigation.action.reset")})}),m.jsxs(Sn,{variant:"outlined",children:[a.activeSection!=="bottomNavigation"&&m.jsx(rn,{size:"small",variant:"outlined",disabled:I,startIcon:m.jsx(me,{icon:"mdi:plus"}),onClick:()=>_(),children:r("navigation.action.new")}),m.jsx(zr,{size:"small",variant:"contained",startIcon:m.jsx(me,{icon:"mdi:content-save"}),loading:o.saveLoading,loadingPosition:"start",onClick:z,children:r("common.save")})]})]}),y?w:g,m.jsx(_r,{ref:n,section:a.activeSection,components:a.components,rawNavigations:a.rawNavigation}),m.jsx(io,{confirmButton:{text:r("common.confirm"),props:{variant:"contained",color:"error"}},cancelButton:{text:r("common.cancel"),props:{color:"primary"}},open:o.showResetConfirm,title:r("navigation.action.restConfirmTitle",{section:Tt[a.activeSection]}),onConfirm:async()=>{await D(),o.showResetConfirm=!1},onCancel:()=>{o.showResetConfirm=!1},children:m.jsx("p",{children:r("navigation.action.restConfirmDesc")})})]})}function Yf(){return m.jsx(Kl,{children:m.jsx(uf,{})})}export{Yf as default};
40
+ `,nf=r=>{const i=r.replace("#","");if(!/^([A-Fa-f0-9]{3}){1,2}$/.test(i))return{r:0,g:0,b:0};const n=i.length===3?i.split("").map(e=>e+e).join(""):i;return{r:parseInt(n.substr(0,2),16),g:parseInt(n.substr(2,2),16),b:parseInt(n.substr(4,2),16)}};function rf({src:r,color:i,size:n=24,...e}){const[t,o]=k.useState("");return k.useEffect(()=>{const a=new Image;return a.crossOrigin="anonymous",a.onload=()=>{const l=document.createElement("canvas");l.width=a.width,l.height=a.height;const s=l.getContext("2d");s.drawImage(a,0,0);const c=s.getImageData(0,0,l.width,l.height),{data:d}=c,f=nf(i);for(let u=0;u<d.length;u+=4)if(d[u+3]>0){const p=d[u+3]/255;d[u]=f.r*p,d[u+1]=f.g*p,d[u+2]=f.b*p}s.putImageData(c,0,0),o(l.toDataURL("image/png"))},a.src=r,()=>{a.onload=null}},[r,i]),m.jsx(ce,{component:"img",src:t||r,sx:{width:n,height:n,display:"block",opacity:t?1:.5,transition:"opacity 0.2s"},...e})}const er=375,Ia=667,Rr=56,of=Je(Zt)(({theme:r})=>({width:er,height:Ia,display:"flex",flexDirection:"column",overflow:"hidden",border:`1px solid ${r.palette.divider}`,borderRadius:32,position:"relative"})),Xi=Je(ce)(({theme:r})=>({height:Rr,borderTop:`1px solid ${r.palette.divider}`,display:"flex",backgroundColor:r.palette.background.paper})),Yi=Je(ce)(({theme:r,active:i})=>({flex:1,display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",cursor:"pointer",position:"relative",color:i?r.palette.primary.main:r.palette.text.secondary,"&:hover":{backgroundColor:r.palette.action.hover}})),af=Je(ce)(({theme:r,left:i})=>({position:"absolute",bottom:-Rr,left:i,transform:"translateX(-50%)",display:"flex",alignItems:"center",backgroundColor:r.palette.background.paper,borderRadius:r.shape.borderRadius,padding:`${r.spacing(.5)} ${r.spacing(1)}`,boxShadow:r.shadows[2],zIndex:1})),Jt=Je(Oe)(({theme:r})=>({padding:r.spacing(.5),"&:not(:last-child)":{marginRight:r.spacing(.5)}})),lf=Je(ce)({flexGrow:1,height:"100%",position:"relative",overflow:"hidden"}),sf=Je(ce)(({theme:r})=>({width:400,paddingLeft:r.spacing(3),backgroundColor:r.palette.background.default,height:Ia,overflowY:"auto"}));function cf(){const{t:r,locale:i}=ze(),{blocklet:n}=at(),e=Ea(),t=tr(e.breakpoints.down("md")),{state:o,getNavigation:a,updateNavigationItem:l,addNavigationItem:s,delNavigationItem:c,updateNavigationTree:d}=po(),{inService:f}=co(),u=k.useRef(null),p=k.useRef(null),h=k.useRef(null),v=n.environments.find(B=>B.key===qe.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_URL),y=n?.settings?.theme?.light?.palette?.primary?.main,[_,C]=k.useState(0),[z,D]=k.useState(!1),L=k.useRef(0),R=k.useRef(null),I=a("bottomNavigation"),g=I.length>0,w=I.length<5,[S,O]=k.useState(I.length>0?I[0]:null),j=I.findIndex(B=>B.id===S?.id),U=re((B,Q)=>{const te=B?.[Q];return gl(te)?te[i]||te.en:te}),q=re(B=>{B.id!==S?.id&&O(B)}),A=re(B=>{R.current=B,h.current?.add({},(Q,te)=>{const F=s(te,R.current);O(F),Q()})}),W=re(()=>{D(!0)}),H=re(()=>{h.current?.edit(S,(B,Q)=>{l(Q),B()})}),{run:V}=ao(()=>{p.current?.submit()},{wait:300}),K=re(V),J=re(B=>{if(B?.startsWith("/"))try{const Q=f?window.location.origin:v?.value;return new URL(B,Q).href}catch{console.error("Failed to resolve url: ",B)}return B},[v?.value,f]),X=re(B=>{if(!B.destination)return;const Q=Array.from(I),[te]=Q.splice(B.source.index,1);Q.splice(B.destination.index,0,te),d(Q)}),Z=re(()=>{const B=I.find(te=>te.id===S?.id);if(!B)return"";let Q=U(B,"link")||"/";if(Q.startsWith("/"))try{Q=J(Ie(B.__base||"/",Q))}catch(te){return console.error("Failed to get active tab link",te),""}return Q});return k.useEffect(()=>{S&&!t&&(p.current?.resetImmediate(),p.current?.edit(S,B=>{l(B)}))},[S,l,t]),k.useEffect(()=>{const B=I.findIndex(x=>x.id===S?.id);if(B===-1||!u.current)return C(L.current);const te=er/I.length*(B+.5),F=u.current.getBoundingClientRect().width,G=F/2+16,N=er-(F/2+16),T=Math.min(Math.max(te,G),N);return L.current=T,C(T)},[S,I,L]),k.useEffect(()=>{I.length>0&&!S&&O(I[0])},[I,S]),m.jsx(ce,{sx:{display:"flex",justifyContent:"center"},children:m.jsxs(ce,{sx:{position:"relative",display:"inline-flex",alignItems:"flex-start",margin:"4px auto 0"},children:[m.jsxs(of,{elevation:2,children:[m.jsx(lf,{children:g&&m.jsx(Gl,{url:Z(),width:"100%",height:"100%",id:"tabbar-preview",className:"tabbar-preview-iframe",display:"block",position:"relative",styles:{border:"none",background:"#fff"}})}),m.jsxs(ce,{sx:{height:Rr,overflowY:"auto",flexShrink:0},children:[g&&m.jsx(Al,{onDragEnd:X,children:m.jsx(jl,{droppableId:"tabbar",direction:"horizontal",children:B=>m.jsxs(Xi,{ref:B.innerRef,...B.droppableProps,children:[I.map((Q,te)=>m.jsx(Fl,{draggableId:Q.id,index:te,children:(F,G)=>m.jsxs(Yi,{className:"tab-item",ref:F.innerRef,...F.draggableProps,...F.dragHandleProps,active:Q.id===S?.id,onClick:N=>q(Q,N),sx:{color:Q.id===S?.id?y:"text.secondary",opacity:G.isDragging?.5:1},children:[m.jsx(rf,{src:J(Q.icon),color:Q.id===S?.id?y:e.palette.text.secondary,size:24}),m.jsx(Pe,{variant:"caption",children:U(Q,"title")})]})},Q.id)),B.placeholder]})})}),!g&&m.jsx(Xi,{children:m.jsx(Yi,{className:"tab-item",onClick:()=>A(0),children:m.jsx(nt,{icon:"mdi:plus-circle-outline",size:28})})})]})]}),!t&&g&&m.jsx(sf,{children:S&&m.jsx(xr,{ref:p,sx:{p:0},section:"bottomNavigation",components:o.components,rawNavigations:o.rawNavigation,onChange:K})}),m.jsx(Aa,{in:S!==null,children:m.jsxs(af,{ref:u,left:_,children:[m.jsx(Jt,{size:"small",disabled:!w,onClick:()=>A(j),children:m.jsx(nt,{icon:"mdi:plus-circle-outline",size:28})}),t&&m.jsx(Jt,{size:"small",onClick:()=>H(),children:m.jsx(nt,{icon:"mdi:edit-box-outline",size:28})}),m.jsx(Jt,{size:"small",onClick:()=>W(),children:m.jsx(nt,{icon:"mdi:delete-outline",size:28})}),m.jsx(Jt,{size:"small",disabled:!w,onClick:()=>A(j+1),children:m.jsx(nt,{icon:"mdi:plus-circle-outline",size:28})})]})}),m.jsx(_r,{ref:h,section:"bottomNavigation",components:o.components,rawNavigations:o.rawNavigation}),m.jsx(io,{confirmButton:{text:r("common.confirm"),props:{variant:"contained",color:"error"}},cancelButton:{text:r("common.cancel"),props:{color:"primary"}},open:z,title:r("navigation.action.delTabBarTitle"),onConfirm:()=>{D(!1),c(S.id),I.length>1?j>0?O(I[j-1]):O(I[j+1]):O(null)},onCancel:()=>{D(!1)},children:m.jsx("p",{children:r("navigation.action.delTabBarDesc")})})]})})}const df={login:Ae,logout:Ae,switch:Ae,switchDid:Ae,switchProfile:Ae,switchPassport:Ae,useDid:()=>({walletDid:"abcdefghijklmnopqrstuvwxyz"}),useOAuth:()=>({logoutOAuth:Ae,bindOAuth:Ae,configs:{},switchOAuthPassport:Ae})},Tt={header:"Header",footer:"Footer",bottom:"Footer Link",social:"Footer Social",dashboard:"Dashboard",sessionManager:"Session Blocklet",userCenter:"User Center",bottomNavigation:"Tab Bar"};function uf(){const{t:r}=ze(),{blocklet:i}=at(),n=k.useRef(null),{roles:e}=fo(),t=tr(S=>S.breakpoints.down("md")),o=Gt({saveLoading:!1,resetLoading:!1,showResetConfirm:!1,mockRole:"owner"}),{state:a,navigation:l,getNavigation:s,saveNavigationList:c,resetNavigation:d,updateActiveSection:f,updateNavigationTree:u,updateNavigationItem:p,delNavigationItem:h,addNavigationItem:v}=po(),y=a.activeSection==="bottomNavigation",_=k.useCallback(S=>{n.current.add({parent:S},(O,j)=>{v(j),O()})},[v]),C=k.useCallback((S,O={})=>{switch(S){case"edit":n.current.edit(O,(j,U)=>{p(U),j()});break;case"toggle":p({id:O.id,visible:!O.visible});break;case"del":h(O.id);break}},[h,p]),z=k.useCallback(async()=>{try{o.saveLoading=!0,await c(a.rawNavigation),kt.success(r("common.succeeded"))}catch(S){kt.error(m.jsxs(ce,{children:[m.jsx(Pe,{variant:"subtitle2",children:r("navigation.actionFailed")}),m.jsx(Pe,{variant:"body1",children:Lr(S)||S.error})]}))}finally{o.saveLoading=!1}},[a.rawNavigation,o,c,r]),D=k.useCallback(async()=>{try{o.resetLoading=!0,await d(a.activeSection),kt.success(r("navigation.action.resetSuccessful"),{variant:"success"})}catch(S){kt.error(m.jsxs(ce,{children:[m.jsx(Pe,{variant:"subtitle2",children:r("navigation.actionFailed")}),m.jsx(Pe,{variant:"body1",children:Lr(S)||S.error})]}))}finally{o.resetLoading=!1}},[o,d,a.activeSection,r]),L=k.useMemo(()=>({session:{...df,user:{did:i.appDid,fullName:"Preview User",role:o.mockRole,isPreviewUser:!0}}}),[i.appDid,o.mockRole]),R=s(a.activeSection),I=nl(()=>a.activeSection!=="bottomNavigation"?!1:R.length>=5,[a.activeSection,R.length]),g=m.jsxs(m.Fragment,{children:[m.jsx(Zt,{variant:"outlined",sx:{display:"flex",height:660,overflow:"hidden",bgcolor:"background.default"},children:m.jsx(Zt,{elevation:0,sx:{flex:1,overflow:"auto",bgcolor:"background.default"},children:m.jsx(Sa,{treeData:R,setTreeData:u,renderActions:({data:S,className:O})=>m.jsx(xa,{data:S,className:O,section:a.activeSection,add:(...j)=>_(...j),del:(...j)=>C("del",...j),edit:(...j)=>C("edit",...j),toggle:(...j)=>C("toggle",...j)})})})}),m.jsxs(Pr,{variant:"dense",sx:{paddingLeft:"0px !important",paddingRight:"0px !important",mt:3},children:[m.jsx(Pe,{variant:"h6",component:"div",sx:{flexGrow:1},children:r("common.preview")}),m.jsxs(no,{sx:{m:1,minWidth:120},size:"small",children:[m.jsx(ja,{children:r("common.role")}),m.jsx(kr,{value:o.mockRole,label:"Role",onChange:S=>{o.mockRole=S.target.value},children:e.map(S=>m.jsx(Or,{value:S.name,children:S.title},S.name))})]})]}),m.jsx(Zt,{variant:"outlined",children:m.jsx(Rl.Provider,{value:L,children:m.jsx(tf,{navigation:l})})})]}),w=m.jsx(cf,{});return m.jsxs(m.Fragment,{children:[t&&m.jsx(kr,{fullWidth:!0,size:"small",value:a.activeSection,onChange:S=>f(S.target.value),children:Object.keys(Tt).map(S=>m.jsxs(Or,{value:S,children:[Tt[S],` (${s(S).length})`]}))}),!t&&m.jsx(Sn,{variant:"outlined",children:Object.keys(Tt).map(S=>m.jsxs(rn,{variant:a.activeSection===S?"contained":void 0,onClick:()=>f(S),children:[Tt[S],` (${s(S).length})`]},S))}),m.jsxs(Pr,{variant:"dense",sx:{paddingLeft:"0px !important",paddingRight:"0px !important",mt:2},children:[m.jsx(Pe,{variant:"h6",component:"div",sx:{flexGrow:1},children:r("common.config")}),m.jsx(Sn,{variant:"outlined",children:m.jsx(zr,{size:"small",variant:"outlined",color:"error",startIcon:m.jsx(Se,{icon:"system-uicons:reset"}),sx:{mr:2},loading:o.resetLoading,loadingPosition:"start",onClick:()=>{o.showResetConfirm=!0},children:r("navigation.action.reset")})}),m.jsxs(Sn,{variant:"outlined",children:[a.activeSection!=="bottomNavigation"&&m.jsx(rn,{size:"small",variant:"outlined",disabled:I,startIcon:m.jsx(Se,{icon:"mdi:plus"}),onClick:()=>_(),children:r("navigation.action.new")}),m.jsx(zr,{size:"small",variant:"contained",startIcon:m.jsx(Se,{icon:"mdi:content-save"}),loading:o.saveLoading,loadingPosition:"start",onClick:z,children:r("common.save")})]})]}),y?w:g,m.jsx(_r,{ref:n,section:a.activeSection,components:a.components,rawNavigations:a.rawNavigation}),m.jsx(io,{confirmButton:{text:r("common.confirm"),props:{variant:"contained",color:"error"}},cancelButton:{text:r("common.cancel"),props:{color:"primary"}},open:o.showResetConfirm,title:r("navigation.action.restConfirmTitle",{section:Tt[a.activeSection]}),onConfirm:async()=>{await D(),o.showResetConfirm=!1},onCancel:()=>{o.showResetConfirm=!1},children:m.jsx("p",{children:r("navigation.action.restConfirmDesc")})})]})}function Yf(){return m.jsx(Kl,{children:m.jsx(uf,{})})}export{Yf as default};