@myxtra/authentication-green 2.28.0 → 2.32.0

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 (184) hide show
  1. package/dist/App-rvyL3W1B.js +3940 -0
  2. package/dist/{Categoriesbaby-6gF3DXBf.js → Categoriesbaby-BK8PHi3L.js} +1 -1
  3. package/dist/{Categoriesbakery-B4iUY80P.js → Categoriesbakery-CcoBArzo.js} +1 -1
  4. package/dist/{Categoriesbbq-C60hz1B6.js → Categoriesbbq-8wHV3-M_.js} +1 -1
  5. package/dist/{Categoriesbreakfast-McuEC33n.js → Categoriesbreakfast-CrZEYv17.js} +1 -1
  6. package/dist/{Categoriesbrik-Bs5kZnTr.js → Categoriesbrik-nCENW9gv.js} +1 -1
  7. package/dist/{Categoriescandy-CvIEyKk2.js → Categoriescandy-CosPmSGe.js} +1 -1
  8. package/dist/{Categoriescar-BFSyhAg7.js → Categoriescar-7KP-M791.js} +1 -1
  9. package/dist/{Categoriescarandbike-BC-qjZEw.js → Categoriescarandbike-B9bHFhLK.js} +1 -1
  10. package/dist/{Categorieschild-DfnPlnAk.js → Categorieschild-CX99OAgT.js} +1 -1
  11. package/dist/{Categoriescigarette-DiN_VowE.js → Categoriescigarette-c4qRyeQ5.js} +1 -1
  12. package/dist/{Categoriescleaning-BcWHn0gT.js → Categoriescleaning-ChBTEOpL.js} +1 -1
  13. package/dist/{Categoriesclothing-DvtWnnns.js → Categoriesclothing-Cn0h0i2i.js} +1 -1
  14. package/dist/{Categoriesconserve-BuAfz_u6.js → Categoriesconserve-DOg50u7R.js} +1 -1
  15. package/dist/{Categoriesdairy-BsyIRs7f.js → Categoriesdairy-BN5pGn7H.js} +1 -1
  16. package/dist/{Categoriesdeskandtravel-3Ma6spBz.js → Categoriesdeskandtravel-Cp5BxS9n.js} +1 -1
  17. package/dist/{Categoriesdiet-BHIZ3Kgb.js → Categoriesdiet-XttyqzzG.js} +1 -1
  18. package/dist/{Categoriesdryfood-DrHq_KYI.js → Categoriesdryfood-ClcYgc7y.js} +1 -1
  19. package/dist/{Categorieseaster-BXUGhAFc.js → Categorieseaster-BecGCzVP.js} +1 -1
  20. package/dist/{Categoriesenergy-DS3E97j_.js → Categoriesenergy-Pja0bVRb.js} +1 -1
  21. package/dist/{Categoriesfish-CZD6yTGJ.js → Categoriesfish-BT4SOzz9.js} +1 -1
  22. package/dist/{Categoriesfood-D4AviGEb.js → Categoriesfood-DIkUZi64.js} +1 -1
  23. package/dist/{Categoriesfreezer-CrUYLzCA.js → Categoriesfreezer-Dcr4tycU.js} +1 -1
  24. package/dist/{Categoriesfuel-jdRBMmOs.js → Categoriesfuel-U0e04GV_.js} +1 -1
  25. package/dist/{Categoriesgranen-DqTKp-nv.js → Categoriesgranen-DE3ZoO-L.js} +1 -1
  26. package/dist/{Categoriesgrid-CToiisrK.js → Categoriesgrid-u09YGNf9.js} +1 -1
  27. package/dist/{Categorieshome-ChaNOSrd.js → Categorieshome-DcPxnZUL.js} +1 -1
  28. package/dist/{Categorieshygiene-Dvcw7s9e.js → Categorieshygiene-DsVq3vSG.js} +1 -1
  29. package/dist/{Categoriesmealbox-0yTXZqld.js → Categoriesmealbox-BiGiIMkT.js} +1 -1
  30. package/dist/{Categoriesmeat-D_L_1sCl.js → Categoriesmeat-D8F1Q7-6.js} +1 -1
  31. package/dist/{Categoriesmultimedia-B2RWUc8C.js → Categoriesmultimedia-BicArKmT.js} +1 -1
  32. package/dist/{Categoriesnonfood-Dzi8QtTn.js → Categoriesnonfood-BnBFaXGS.js} +1 -1
  33. package/dist/{Categoriesonlinepromo-BFfQFe2A.js → Categoriesonlinepromo-ByrVS4B6.js} +1 -1
  34. package/dist/{Categoriesparty-CJw_7b1v.js → Categoriesparty-BWzrbGN_.js} +1 -1
  35. package/dist/{Categoriespets-CqJrKBkE.js → Categoriespets-myRyzdWM.js} +1 -1
  36. package/dist/{Categoriesplaceholder-BJCkzQ5s.js → Categoriesplaceholder-BnEE1Stl.js} +1 -1
  37. package/dist/{Categoriespuzzle-BNAWvQ5P.js → Categoriespuzzle-DuCh6ovB.js} +1 -1
  38. package/dist/{Categoriessnacks-CrQiHnlu.js → Categoriessnacks-CfRIIcqL.js} +1 -1
  39. package/dist/{Categoriessoda-DcgNgr-J.js → Categoriessoda-DDzhdgY-.js} +1 -1
  40. package/dist/{Categoriessportfood-DlMcu1ku.js → Categoriessportfood-SiwSHDB7.js} +1 -1
  41. package/dist/{Categoriestins-ecq6AClO.js → Categoriestins-CKYv87hu.js} +1 -1
  42. package/dist/{Categoriestoyandhobby-DeZHNqpy.js → Categoriestoyandhobby-7i6Qk4rl.js} +1 -1
  43. package/dist/{Categoriestoys-ZzMr5vFM.js → Categoriestoys-VvydRq4P.js} +1 -1
  44. package/dist/{Categoriesvegetables-8mMcDRwN.js → Categoriesvegetables-DZmqkqzf.js} +1 -1
  45. package/dist/{Categorieswine-BE83LNgR.js → Categorieswine-DtVxSYvH.js} +1 -1
  46. package/dist/{Fueladblue-DgF7eSdv.js → Fueladblue-CSYlsyDy.js} +1 -1
  47. package/dist/{Fuelb7-ssb0PBMa.js → Fuelb7-DFmtWruD.js} +1 -1
  48. package/dist/{Fuelcng-Az_ywsP8.js → Fuelcng-bMmrTp02.js} +1 -1
  49. package/dist/{Fuele10-D8XKR8z4.js → Fuele10-CloHils2.js} +1 -1
  50. package/dist/{Fuele5-QGU89IeO.js → Fuele5-BVkTEGrj.js} +1 -1
  51. package/dist/{Fuelfreetireinflation-DzwK-yJ9.js → Fuelfreetireinflation-SRIoMXZi.js} +1 -1
  52. package/dist/{Fuelh2-DCPx9cPO.js → Fuelh2-D8ZQFbEM.js} +1 -1
  53. package/dist/{Functional18plus-Dvom6nYd.js → Functional18plus-QP8_Jdn4.js} +1 -1
  54. package/dist/{Functionalaccount-DLCejSD5.js → Functionalaccount-DrN0jVA7.js} +1 -1
  55. package/dist/{Functionaladdtolist-C6_sJNlg.js → Functionaladdtolist-oXBWyYGw.js} +1 -1
  56. package/dist/{Functionaladduser-CvfxOGqu.js → Functionaladduser-DyfUvgr7.js} +1 -1
  57. package/dist/{Functionalalphabeta-BVJAMnLO.js → Functionalalphabeta-eRsdPQrG.js} +1 -1
  58. package/dist/{Functionalback-COMzeVd_.js → Functionalback-Bp5nkAml.js} +1 -1
  59. package/dist/{Functionalbarcode-BjA_xusN.js → Functionalbarcode-CnW2Znah.js} +1 -1
  60. package/dist/{Functionalblock-C0dpftUf.js → Functionalblock-DWP4Vov2.js} +1 -1
  61. package/dist/{Functionalbox-CYM-NUPV.js → Functionalbox-BJwpdmhb.js} +1 -1
  62. package/dist/{Functionalcalendar-1Yek0iwu.js → Functionalcalendar-2td1a8iX.js} +1 -1
  63. package/dist/{Functionalcamera-D6xwt5Su.js → Functionalcamera-D9dZic6y.js} +1 -1
  64. package/dist/{Functionalcartcheckout-3hdAu2bG.js → Functionalcartcheckout-CNI63YGa.js} +1 -1
  65. package/dist/{Functionalcartedit-C-oIAz-E.js → Functionalcartedit-CLCPUmNR.js} +1 -1
  66. package/dist/{Functionalcheck-CLaFutOl.js → Functionalcheck-BxgiHlti.js} +1 -1
  67. package/dist/{Functionalchecklist-BH7UVdkF.js → Functionalchecklist-D-LnY_Ee.js} +1 -1
  68. package/dist/{Functionalchevrondown-Dfv-W7AD.js → Functionalchevrondown-D9sw9bOC.js} +1 -1
  69. package/dist/{Functionalchevronright-BZN3r3ja.js → Functionalchevronright-COUKphaj.js} +1 -1
  70. package/dist/{Functionalchevronup-nTJQr1M_.js → Functionalchevronup-CcNvpdw8.js} +1 -1
  71. package/dist/{Functionalclock-DbHYKN7u.js → Functionalclock-CQJMiOUj.js} +1 -1
  72. package/dist/{Functionalclose-Czu5y0kT.js → Functionalclose-CSc29pK8.js} +1 -1
  73. package/dist/{Functionalcommunications-BujOX55Z.js → Functionalcommunications-BvA6HmxT.js} +1 -1
  74. package/dist/{Functionalconnecteddevice-CEDF8kk_.js → Functionalconnecteddevice-DwZVzD4k.js} +1 -1
  75. package/dist/{Functionalconnectioncable-O0b0AzV4.js → Functionalconnectioncable-aTtVqI_G.js} +1 -1
  76. package/dist/{Functionalcookies-B2EQmcrt.js → Functionalcookies-CBVHL9o4.js} +1 -1
  77. package/dist/{Functionalcopy-BsYv5M7H.js → Functionalcopy-Cia7a0iN.js} +1 -1
  78. package/dist/{Functionalcustomerservice-RFWDZ7Ej.js → Functionalcustomerservice-BUF7OZYY.js} +1 -1
  79. package/dist/{Functionaldeliveryaddresses-BiZKm5Oc.js → Functionaldeliveryaddresses-Dq8bDZ0l.js} +1 -1
  80. package/dist/{Functionaldiscount-B0UiDwC2.js → Functionaldiscount-C4D1kfU5.js} +1 -1
  81. package/dist/{Functionaldiscountcode-BOxSaP9t.js → Functionaldiscountcode-BWwyTnvX.js} +1 -1
  82. package/dist/{Functionaldownload-DhkbhqEd.js → Functionaldownload-DZhkz83I.js} +1 -1
  83. package/dist/{Functionaldrycleaning-DIn5LZSp.js → Functionaldrycleaning-9e8OvgJc.js} +1 -1
  84. package/dist/{Functionalecoearth-DiHUFvUX.js → Functionalecoearth-BGJbj9YJ.js} +1 -1
  85. package/dist/{Functionaledit-Dqmrlxwr.js → Functionaledit-Bny8JHS3.js} +1 -1
  86. package/dist/{Functionalellipsis-edOp38LE.js → Functionalellipsis-DSdUTFge.js} +1 -1
  87. package/dist/{Functionalerrorcircle-Duns6fLN.js → Functionalerrorcircle-Cn9D7y2M.js} +1 -1
  88. package/dist/{Functionalerrorcirclefilled-DY9HqOtf.js → Functionalerrorcirclefilled-DT2g6pS4.js} +1 -1
  89. package/dist/{Functionaleuro-DpKvF4Va.js → Functionaleuro-BfFjpwIF.js} +1 -1
  90. package/dist/{Functionalexit-BJ5rcdWd.js → Functionalexit-BMYWgMPM.js} +1 -1
  91. package/dist/{Functionalexport-CAuNRHg4.js → Functionalexport-cDsDdHi5.js} +1 -1
  92. package/dist/{Functionalexternallink-Br_t3uLC.js → Functionalexternallink-dS7Ownhh.js} +1 -1
  93. package/dist/{Functionaleyehidden-zfHSwL3r.js → Functionaleyehidden-Bbjl6We7.js} +1 -1
  94. package/dist/{Functionaleyeshow-eos8CLvD.js → Functionaleyeshow-DeDQo-aK.js} +1 -1
  95. package/dist/{Functionalfilter-DxpZVrcp.js → Functionalfilter-oikNz5BS.js} +1 -1
  96. package/dist/{Functionalfirstadded-BbvyfBZP.js → Functionalfirstadded-BnHAUwEu.js} +1 -1
  97. package/dist/{Functionalgift-DV2dqp9h.js → Functionalgift-A-S_eFoY.js} +1 -1
  98. package/dist/{Functionalhistory-B5uZ6bZd.js → Functionalhistory-DSPZf2ii.js} +1 -1
  99. package/dist/{Functionalidea-B9cYbekX.js → Functionalidea-D6ZHRfi1.js} +1 -1
  100. package/dist/{Functionalinappnotifications-BEN5GrO0.js → Functionalinappnotifications-DOWSLSnw.js} +1 -1
  101. package/dist/{Functionalkiosk-m4D0a7Kq.js → Functionalkiosk-DW0IfYHw.js} +1 -1
  102. package/dist/{Functionallastadded-CgxjxrvF.js → Functionallastadded-u4XSW3hD.js} +1 -1
  103. package/dist/{Functionallifestyle-6yUl3Tnf.js → Functionallifestyle-B8ikBccg.js} +1 -1
  104. package/dist/{Functionallist-CGb3i4CE.js → Functionallist-CtIVDDKI.js} +1 -1
  105. package/dist/{Functionalloading-CLCA1Ty6.js → Functionalloading-CTp0Jd_T.js} +1 -1
  106. package/dist/{Functionallocate-Bmq6Zl7E.js → Functionallocate-BfzlDwwL.js} +1 -1
  107. package/dist/{Functionallocation-BTCWubMD.js → Functionallocation-BbGDMU8P.js} +1 -1
  108. package/dist/{Functionallocationhome-BExIISsd.js → Functionallocationhome-CWk-KaRh.js} +1 -1
  109. package/dist/{Functionallocationpickup-1yLy_tNQ.js → Functionallocationpickup-Du_--iBZ.js} +1 -1
  110. package/dist/{Functionallogin-BJIwdZrh.js → Functionallogin-iJT5VO2y.js} +1 -1
  111. package/dist/{Functionallogout-CMzB_AvT.js → Functionallogout-C8Mq01k0.js} +1 -1
  112. package/dist/{Functionalmail-UIG4onuq.js → Functionalmail-GurUjkNh.js} +1 -1
  113. package/dist/{Functionalmaplocation-Dcaiv5uy.js → Functionalmaplocation-ShsgfKPf.js} +1 -1
  114. package/dist/{Functionalmenu-BGjUX1J1.js → Functionalmenu-B1ta7mdn.js} +1 -1
  115. package/dist/{Functionalmessage-DCPC1-Cl.js → Functionalmessage-CuItmwfZ.js} +1 -1
  116. package/dist/{Functionalmessagefield-Bxj-GEk3.js → Functionalmessagefield-CwpyVdYL.js} +1 -1
  117. package/dist/{Functionalminus-CQ4YuBKD.js → Functionalminus-BLRZ3PXJ.js} +1 -1
  118. package/dist/{Functionalmobilepay-9wGb23yW.js → Functionalmobilepay-DbPvnMEH.js} +1 -1
  119. package/dist/{Functionalmultifactorauthenticator-C5SDLhfX.js → Functionalmultifactorauthenticator-D1jkwsgX.js} +1 -1
  120. package/dist/{Functionalnews-DZull_Hm.js → Functionalnews-C4u0KQJ-.js} +1 -1
  121. package/dist/{Functionalnext-bZeZA0uQ.js → Functionalnext-Cp_x1ZV6.js} +1 -1
  122. package/dist/{Functionalnoconnection-BGIfdWes.js → Functionalnoconnection-pPU7or3J.js} +1 -1
  123. package/dist/{Functionalnumber-CL2VFFdH.js → Functionalnumber-BQByMDKU.js} +1 -1
  124. package/dist/{Functionalother-CSvu-HRC.js → Functionalother-ClXgsR1I.js} +1 -1
  125. package/dist/{Functionalpack-BjDhhBqo.js → Functionalpack-Dm5IfprQ.js} +1 -1
  126. package/dist/{Functionalpassword-DRLSXw1c.js → Functionalpassword-YD7RSIAC.js} +1 -1
  127. package/dist/{Functionalpercentage-BQB5lrGQ.js → Functionalpercentage-DuTWZRtX.js} +1 -1
  128. package/dist/{Functionalphone-BvGYeO1i.js → Functionalphone-Bagtkohc.js} +1 -1
  129. package/dist/{Functionalpiece-Ciy3LwP5.js → Functionalpiece-C6ulS7oE.js} +1 -1
  130. package/dist/{Functionalpinoutlines-Dx_8CxcE.js → Functionalpinoutlines-C4-kRRRI.js} +1 -1
  131. package/dist/{Functionalplus-B0HvjzCe.js → Functionalplus-BfVdR4AS.js} +1 -1
  132. package/dist/{Functionalpluscircle-BdWTDoq2.js → Functionalpluscircle-485Is4Xu.js} +1 -1
  133. package/dist/{Functionalpresent-DYg0lQyl.js → Functionalpresent-Dn6juF59.js} +1 -1
  134. package/dist/{Functionalprivacy-Cdd8t2K8.js → Functionalprivacy-BG0LWqks.js} +1 -1
  135. package/dist/{Functionalpushnotifications-BKrcqzLo.js → Functionalpushnotifications-Dblb1X-g.js} +1 -1
  136. package/dist/{Functionalquestioncircle-rNemzaR5.js → Functionalquestioncircle-DP7eKeSb.js} +1 -1
  137. package/dist/{Functionalquestioncirclefilled-yHK8TsUi.js → Functionalquestioncirclefilled-4lNkj_mX.js} +1 -1
  138. package/dist/{Functionalreadtime-wsF46-i_.js → Functionalreadtime-C_bKGAYY.js} +1 -1
  139. package/dist/{Functionalregister-BBLcOqyZ.js → Functionalregister-C3HnHqxI.js} +1 -1
  140. package/dist/{Functionalreset-Bts1-_62.js → Functionalreset-B6Y7gABE.js} +1 -1
  141. package/dist/{Functionalsave-DGCejc8P.js → Functionalsave-BPm0j_jU.js} +1 -1
  142. package/dist/{Functionalsearch-CuSu11ka.js → Functionalsearch-DKHtmiN6.js} +1 -1
  143. package/dist/{Functionalsettings-zrAXduAm.js → Functionalsettings-CivQo5nO.js} +1 -1
  144. package/dist/{Functionalshare-DG0vBDyj.js → Functionalshare-DwMvgZSh.js} +1 -1
  145. package/dist/{Functionalshared-C8cH9dC3.js → Functionalshared-DzP2vBRb.js} +1 -1
  146. package/dist/{Functionalshoppingcart-DufNpCYd.js → Functionalshoppingcart-Ls0DYjqT.js} +1 -1
  147. package/dist/{Functionalshops-CZJtxMdY.js → Functionalshops-BvMRmBWC.js} +1 -1
  148. package/dist/{Functionalsms-BSdbXJK1.js → Functionalsms-DoeTMScD.js} +1 -1
  149. package/dist/{Functionalsorting-D19SFJJl.js → Functionalsorting-D8V81-yd.js} +1 -1
  150. package/dist/{Functionalspinner-Da77gyjA.js → Functionalspinner-DkwbA_aW.js} +1 -1
  151. package/dist/{Functionalstorelayout-BQ8PvUFs.js → Functionalstorelayout-CrrvFLpE.js} +1 -1
  152. package/dist/{Functionalsuccesscircle-CxAqWTjs.js → Functionalsuccesscircle-BZSKq-XE.js} +1 -1
  153. package/dist/{Functionalsuccesscirclefilled-DWsc_fVH.js → Functionalsuccesscirclefilled-BNosIoGs.js} +1 -1
  154. package/dist/{Functionalswap-BlmqNeM4.js → Functionalswap-BU4e2oLg.js} +1 -1
  155. package/dist/{Functionalswitch-CoAr-Auv.js → Functionalswitch-DQq0PT3U.js} +1 -1
  156. package/dist/{Functionalthumbsup-CKHNazgH.js → Functionalthumbsup-B2AWy6SW.js} +1 -1
  157. package/dist/{Functionaltimer-89ilQQ9r.js → Functionaltimer-H7m2s0Jo.js} +1 -1
  158. package/dist/{Functionaltrash-BTNnQrPB.js → Functionaltrash-CNfJEQWk.js} +1 -1
  159. package/dist/{Functionaltruck-Bg3jasc7.js → Functionaltruck-0Hxl-XHL.js} +1 -1
  160. package/dist/{Functionaluserinfo-Bj7l8gNz.js → Functionaluserinfo-D8YRwj0z.js} +1 -1
  161. package/dist/{Functionalviewfile-CUbdG9e0.js → Functionalviewfile-D2hknqMU.js} +1 -1
  162. package/dist/{Functionalwarningcircle-Bgvilbe7.js → Functionalwarningcircle-BlJ59knk.js} +1 -1
  163. package/dist/{Functionalwarningcirclefilled-Z1H0b9yz.js → Functionalwarningcirclefilled-Dfic7jAb.js} +1 -1
  164. package/dist/{Functionalwebsite-CYIibHir.js → Functionalwebsite-BniTsGiW.js} +1 -1
  165. package/dist/{Functionalweight-C1gXKnfC.js → Functionalweight-C1uPyrhO.js} +1 -1
  166. package/dist/{Toolsassortment-BtLzzkAU.js → Toolsassortment-36SW5iI-.js} +1 -1
  167. package/dist/{Toolscoupons-C8i6vSE4.js → Toolscoupons-H4trLwkE.js} +1 -1
  168. package/dist/{Toolsfavoriteactive-cMr_AE15.js → Toolsfavoriteactive-De8P--yf.js} +1 -1
  169. package/dist/{Toolsfavoriteinactive-CqySbCkL.js → Toolsfavoriteinactive-CK9Zd2Xl.js} +1 -1
  170. package/dist/{Toolsfuel-CqliNTWm.js → Toolsfuel-BUqE3NEG.js} +1 -1
  171. package/dist/{Toolspay-ZXhAd7K_.js → Toolspay-KtdPpmqd.js} +1 -1
  172. package/dist/{Toolspromo-DEvIy8bU.js → Toolspromo-CNo9f1KB.js} +1 -1
  173. package/dist/{Toolsreceipt-CrW8gXK1.js → Toolsreceipt-BGv1Cv7c.js} +1 -1
  174. package/dist/{Toolsrecipes2-DSdaXaKA.js → Toolsrecipes2-Bs9s6R6A.js} +1 -1
  175. package/dist/{Toolsscan2-DD9hHYFt.js → Toolsscan2-Cr5CdaM9.js} +1 -1
  176. package/dist/{Toolsshowxtranew-_Kw-qduq.js → Toolsshowxtranew-C4GLOL69.js} +1 -1
  177. package/dist/{Toolsshowxtraold-Bpe1vUEO.js → Toolsshowxtraold-BqrAPE1m.js} +1 -1
  178. package/dist/{Toolsstats-Dtv_ZM-M.js → Toolsstats-CFpH0rs8.js} +1 -1
  179. package/dist/{Toolsstorelocator-XZLY-WUr.js → Toolsstorelocator-BrDv2xeS.js} +1 -1
  180. package/dist/{Toolswarranty-NuK8UHnp.js → Toolswarranty-CZecEOkM.js} +1 -1
  181. package/dist/{index-AmCvpMSK.js → index-D1LKuEfM.js} +2421 -2392
  182. package/dist/xtra-authentication.js +1 -1
  183. package/package.json +24 -24
  184. package/dist/App-DJ9El6sy.js +0 -3885
@@ -1,3885 +0,0 @@
1
- var Ne = (t) => {
2
- throw TypeError(t);
3
- };
4
- var ne = (t, e, s) => e.has(t) || Ne("Cannot " + s);
5
- var o = (t, e, s) => (ne(t, e, "read from private field"), s ? s.call(t) : e.get(t)), v = (t, e, s) => e.has(t) ? Ne("Cannot add the same private member more than once") : e instanceof WeakSet ? e.add(t) : e.set(t, s), m = (t, e, s, i) => (ne(t, e, "write to private field"), i ? i.call(t, s) : e.set(t, s), s), j = (t, e, s) => (ne(t, e, "access private method"), s);
6
- var Yt = (t, e, s, i) => ({
7
- set _(a) {
8
- m(t, e, a, s);
9
- },
10
- get _() {
11
- return o(t, e, i);
12
- }
13
- });
14
- import { r, j as n, u as Gs, a as Vs, b as pt, g as je, P as Le, c as is, d as qs, e as $s, E as Zs, C as Xs } from "./index-AmCvpMSK.js";
15
- var Ht = class {
16
- constructor() {
17
- this.listeners = /* @__PURE__ */ new Set(), this.subscribe = this.subscribe.bind(this);
18
- }
19
- subscribe(t) {
20
- return this.listeners.add(t), this.onSubscribe(), () => {
21
- this.listeners.delete(t), this.onUnsubscribe();
22
- };
23
- }
24
- hasListeners() {
25
- return this.listeners.size > 0;
26
- }
27
- onSubscribe() {
28
- }
29
- onUnsubscribe() {
30
- }
31
- }, Qt = typeof window > "u" || "Deno" in globalThis;
32
- function q() {
33
- }
34
- function Ys(t, e) {
35
- return typeof t == "function" ? t(e) : t;
36
- }
37
- function oe(t) {
38
- return typeof t == "number" && t >= 0 && t !== 1 / 0;
39
- }
40
- function rs(t, e) {
41
- return Math.max(t + (e || 0) - Date.now(), 0);
42
- }
43
- function Pt(t, e) {
44
- return typeof t == "function" ? t(e) : t;
45
- }
46
- function X(t, e) {
47
- return typeof t == "function" ? t(e) : t;
48
- }
49
- function Me(t, e) {
50
- const {
51
- type: s = "all",
52
- exact: i,
53
- fetchStatus: a,
54
- predicate: c,
55
- queryKey: l,
56
- stale: u
57
- } = t;
58
- if (l) {
59
- if (i) {
60
- if (e.queryHash !== Se(l, e.options))
61
- return !1;
62
- } else if (!Gt(e.queryKey, l))
63
- return !1;
64
- }
65
- if (s !== "all") {
66
- const d = e.isActive();
67
- if (s === "active" && !d || s === "inactive" && d)
68
- return !1;
69
- }
70
- return !(typeof u == "boolean" && e.isStale() !== u || a && a !== e.state.fetchStatus || c && !c(e));
71
- }
72
- function Fe(t, e) {
73
- const { exact: s, status: i, predicate: a, mutationKey: c } = t;
74
- if (c) {
75
- if (!e.options.mutationKey)
76
- return !1;
77
- if (s) {
78
- if (wt(e.options.mutationKey) !== wt(c))
79
- return !1;
80
- } else if (!Gt(e.options.mutationKey, c))
81
- return !1;
82
- }
83
- return !(i && e.state.status !== i || a && !a(e));
84
- }
85
- function Se(t, e) {
86
- return ((e == null ? void 0 : e.queryKeyHashFn) || wt)(t);
87
- }
88
- function wt(t) {
89
- return JSON.stringify(
90
- t,
91
- (e, s) => le(s) ? Object.keys(s).sort().reduce((i, a) => (i[a] = s[a], i), {}) : s
92
- );
93
- }
94
- function Gt(t, e) {
95
- return t === e ? !0 : typeof t != typeof e ? !1 : t && e && typeof t == "object" && typeof e == "object" ? !Object.keys(e).some((s) => !Gt(t[s], e[s])) : !1;
96
- }
97
- function ns(t, e) {
98
- if (t === e)
99
- return t;
100
- const s = Re(t) && Re(e);
101
- if (s || le(t) && le(e)) {
102
- const i = s ? t : Object.keys(t), a = i.length, c = s ? e : Object.keys(e), l = c.length, u = s ? [] : {};
103
- let d = 0;
104
- for (let p = 0; p < l; p++) {
105
- const f = s ? p : c[p];
106
- (!s && i.includes(f) || s) && t[f] === void 0 && e[f] === void 0 ? (u[f] = void 0, d++) : (u[f] = ns(t[f], e[f]), u[f] === t[f] && t[f] !== void 0 && d++);
107
- }
108
- return a === l && d === a ? t : u;
109
- }
110
- return e;
111
- }
112
- function te(t, e) {
113
- if (!e || Object.keys(t).length !== Object.keys(e).length)
114
- return !1;
115
- for (const s in t)
116
- if (t[s] !== e[s])
117
- return !1;
118
- return !0;
119
- }
120
- function Re(t) {
121
- return Array.isArray(t) && t.length === Object.keys(t).length;
122
- }
123
- function le(t) {
124
- if (!Oe(t))
125
- return !1;
126
- const e = t.constructor;
127
- if (e === void 0)
128
- return !0;
129
- const s = e.prototype;
130
- return !(!Oe(s) || !s.hasOwnProperty("isPrototypeOf") || Object.getPrototypeOf(t) !== Object.prototype);
131
- }
132
- function Oe(t) {
133
- return Object.prototype.toString.call(t) === "[object Object]";
134
- }
135
- function Js(t) {
136
- return new Promise((e) => {
137
- setTimeout(e, t);
138
- });
139
- }
140
- function ce(t, e, s) {
141
- return typeof s.structuralSharing == "function" ? s.structuralSharing(t, e) : s.structuralSharing !== !1 ? ns(t, e) : e;
142
- }
143
- function Is(t, e, s = 0) {
144
- const i = [...t, e];
145
- return s && i.length > s ? i.slice(1) : i;
146
- }
147
- function Bs(t, e, s = 0) {
148
- const i = [e, ...t];
149
- return s && i.length > s ? i.slice(0, -1) : i;
150
- }
151
- var as = Symbol();
152
- function os(t, e) {
153
- return !t.queryFn && (e != null && e.initialPromise) ? () => e.initialPromise : !t.queryFn || t.queryFn === as ? () => Promise.reject(new Error(`Missing queryFn: '${t.queryHash}'`)) : t.queryFn;
154
- }
155
- var mt, at, Et, $e, ti = ($e = class extends Ht {
156
- constructor() {
157
- super();
158
- v(this, mt);
159
- v(this, at);
160
- v(this, Et);
161
- m(this, Et, (e) => {
162
- if (!Qt && window.addEventListener) {
163
- const s = () => e();
164
- return window.addEventListener("visibilitychange", s, !1), () => {
165
- window.removeEventListener("visibilitychange", s);
166
- };
167
- }
168
- });
169
- }
170
- onSubscribe() {
171
- o(this, at) || this.setEventListener(o(this, Et));
172
- }
173
- onUnsubscribe() {
174
- var e;
175
- this.hasListeners() || ((e = o(this, at)) == null || e.call(this), m(this, at, void 0));
176
- }
177
- setEventListener(e) {
178
- var s;
179
- m(this, Et, e), (s = o(this, at)) == null || s.call(this), m(this, at, e((i) => {
180
- typeof i == "boolean" ? this.setFocused(i) : this.onFocus();
181
- }));
182
- }
183
- setFocused(e) {
184
- o(this, mt) !== e && (m(this, mt, e), this.onFocus());
185
- }
186
- onFocus() {
187
- const e = this.isFocused();
188
- this.listeners.forEach((s) => {
189
- s(e);
190
- });
191
- }
192
- isFocused() {
193
- var e;
194
- return typeof o(this, mt) == "boolean" ? o(this, mt) : ((e = globalThis.document) == null ? void 0 : e.visibilityState) !== "hidden";
195
- }
196
- }, mt = new WeakMap(), at = new WeakMap(), Et = new WeakMap(), $e), _e = new ti(), kt, ot, At, Ze, ei = (Ze = class extends Ht {
197
- constructor() {
198
- super();
199
- v(this, kt, !0);
200
- v(this, ot);
201
- v(this, At);
202
- m(this, At, (e) => {
203
- if (!Qt && window.addEventListener) {
204
- const s = () => e(!0), i = () => e(!1);
205
- return window.addEventListener("online", s, !1), window.addEventListener("offline", i, !1), () => {
206
- window.removeEventListener("online", s), window.removeEventListener("offline", i);
207
- };
208
- }
209
- });
210
- }
211
- onSubscribe() {
212
- o(this, ot) || this.setEventListener(o(this, At));
213
- }
214
- onUnsubscribe() {
215
- var e;
216
- this.hasListeners() || ((e = o(this, ot)) == null || e.call(this), m(this, ot, void 0));
217
- }
218
- setEventListener(e) {
219
- var s;
220
- m(this, At, e), (s = o(this, ot)) == null || s.call(this), m(this, ot, e(this.setOnline.bind(this)));
221
- }
222
- setOnline(e) {
223
- o(this, kt) !== e && (m(this, kt, e), this.listeners.forEach((i) => {
224
- i(e);
225
- }));
226
- }
227
- isOnline() {
228
- return o(this, kt);
229
- }
230
- }, kt = new WeakMap(), ot = new WeakMap(), At = new WeakMap(), Ze), ee = new ei();
231
- function si(t) {
232
- return Math.min(1e3 * 2 ** t, 3e4);
233
- }
234
- function ls(t) {
235
- return (t ?? "online") === "online" ? ee.isOnline() : !0;
236
- }
237
- var cs = class extends Error {
238
- constructor(t) {
239
- super("CancelledError"), this.revert = t == null ? void 0 : t.revert, this.silent = t == null ? void 0 : t.silent;
240
- }
241
- };
242
- function ae(t) {
243
- return t instanceof cs;
244
- }
245
- function us(t) {
246
- let e = !1, s = 0, i = !1, a, c, l;
247
- const u = new Promise((x, b) => {
248
- c = x, l = b;
249
- }), d = (x) => {
250
- var b;
251
- i || (_(new cs(x)), (b = t.abort) == null || b.call(t));
252
- }, p = () => {
253
- e = !0;
254
- }, f = () => {
255
- e = !1;
256
- }, h = () => _e.isFocused() && (t.networkMode === "always" || ee.isOnline()) && t.canRun(), y = () => ls(t.networkMode) && t.canRun(), g = (x) => {
257
- var b;
258
- i || (i = !0, (b = t.onSuccess) == null || b.call(t, x), a == null || a(), c(x));
259
- }, _ = (x) => {
260
- var b;
261
- i || (i = !0, (b = t.onError) == null || b.call(t, x), a == null || a(), l(x));
262
- }, S = () => new Promise((x) => {
263
- var b;
264
- a = (w) => {
265
- (i || h()) && x(w);
266
- }, (b = t.onPause) == null || b.call(t);
267
- }).then(() => {
268
- var x;
269
- a = void 0, i || (x = t.onContinue) == null || x.call(t);
270
- }), P = () => {
271
- if (i)
272
- return;
273
- let x;
274
- const b = s === 0 ? t.initialPromise : void 0;
275
- try {
276
- x = b ?? t.fn();
277
- } catch (w) {
278
- x = Promise.reject(w);
279
- }
280
- Promise.resolve(x).then(g).catch((w) => {
281
- var A;
282
- if (i)
283
- return;
284
- const M = t.retry ?? (Qt ? 0 : 3), O = t.retryDelay ?? si, Y = typeof O == "function" ? O(s, w) : O, et = M === !0 || typeof M == "number" && s < M || typeof M == "function" && M(s, w);
285
- if (e || !et) {
286
- _(w);
287
- return;
288
- }
289
- s++, (A = t.onFail) == null || A.call(t, s, w), Js(Y).then(() => h() ? void 0 : S()).then(() => {
290
- e ? _(w) : P();
291
- });
292
- });
293
- };
294
- return {
295
- promise: u,
296
- cancel: d,
297
- continue: () => (a == null || a(), u),
298
- cancelRetry: p,
299
- continueRetry: f,
300
- canStart: y,
301
- start: () => (y() ? P() : S().then(P), u)
302
- };
303
- }
304
- function ii() {
305
- let t = [], e = 0, s = (u) => {
306
- u();
307
- }, i = (u) => {
308
- u();
309
- }, a = (u) => setTimeout(u, 0);
310
- const c = (u) => {
311
- e ? t.push(u) : a(() => {
312
- s(u);
313
- });
314
- }, l = () => {
315
- const u = t;
316
- t = [], u.length && a(() => {
317
- i(() => {
318
- u.forEach((d) => {
319
- s(d);
320
- });
321
- });
322
- });
323
- };
324
- return {
325
- batch: (u) => {
326
- let d;
327
- e++;
328
- try {
329
- d = u();
330
- } finally {
331
- e--, e || l();
332
- }
333
- return d;
334
- },
335
- /**
336
- * All calls to the wrapped function will be batched.
337
- */
338
- batchCalls: (u) => (...d) => {
339
- c(() => {
340
- u(...d);
341
- });
342
- },
343
- schedule: c,
344
- /**
345
- * Use this method to set a custom notify function.
346
- * This can be used to for example wrap notifications with `React.act` while running tests.
347
- */
348
- setNotifyFunction: (u) => {
349
- s = u;
350
- },
351
- /**
352
- * Use this method to set a custom function to batch notifications together into a single tick.
353
- * By default React Query will use the batch function provided by ReactDOM or React Native.
354
- */
355
- setBatchNotifyFunction: (u) => {
356
- i = u;
357
- },
358
- setScheduler: (u) => {
359
- a = u;
360
- }
361
- };
362
- }
363
- var z = ii(), yt, Xe, ds = (Xe = class {
364
- constructor() {
365
- v(this, yt);
366
- }
367
- destroy() {
368
- this.clearGcTimeout();
369
- }
370
- scheduleGc() {
371
- this.clearGcTimeout(), oe(this.gcTime) && m(this, yt, setTimeout(() => {
372
- this.optionalRemove();
373
- }, this.gcTime));
374
- }
375
- updateGcTime(t) {
376
- this.gcTime = Math.max(
377
- this.gcTime || 0,
378
- t ?? (Qt ? 1 / 0 : 5 * 60 * 1e3)
379
- );
380
- }
381
- clearGcTimeout() {
382
- o(this, yt) && (clearTimeout(o(this, yt)), m(this, yt, void 0));
383
- }
384
- }, yt = new WeakMap(), Xe), Nt, Lt, V, D, Vt, gt, Z, st, Ye, ri = (Ye = class extends ds {
385
- constructor(e) {
386
- super();
387
- v(this, Z);
388
- v(this, Nt);
389
- v(this, Lt);
390
- v(this, V);
391
- v(this, D);
392
- v(this, Vt);
393
- v(this, gt);
394
- m(this, gt, !1), m(this, Vt, e.defaultOptions), this.setOptions(e.options), this.observers = [], m(this, V, e.cache), this.queryKey = e.queryKey, this.queryHash = e.queryHash, m(this, Nt, ni(this.options)), this.state = e.state ?? o(this, Nt), this.scheduleGc();
395
- }
396
- get meta() {
397
- return this.options.meta;
398
- }
399
- get promise() {
400
- var e;
401
- return (e = o(this, D)) == null ? void 0 : e.promise;
402
- }
403
- setOptions(e) {
404
- this.options = { ...o(this, Vt), ...e }, this.updateGcTime(this.options.gcTime);
405
- }
406
- optionalRemove() {
407
- !this.observers.length && this.state.fetchStatus === "idle" && o(this, V).remove(this);
408
- }
409
- setData(e, s) {
410
- const i = ce(this.state.data, e, this.options);
411
- return j(this, Z, st).call(this, {
412
- data: i,
413
- type: "success",
414
- dataUpdatedAt: s == null ? void 0 : s.updatedAt,
415
- manual: s == null ? void 0 : s.manual
416
- }), i;
417
- }
418
- setState(e, s) {
419
- j(this, Z, st).call(this, { type: "setState", state: e, setStateOptions: s });
420
- }
421
- cancel(e) {
422
- var i, a;
423
- const s = (i = o(this, D)) == null ? void 0 : i.promise;
424
- return (a = o(this, D)) == null || a.cancel(e), s ? s.then(q).catch(q) : Promise.resolve();
425
- }
426
- destroy() {
427
- super.destroy(), this.cancel({ silent: !0 });
428
- }
429
- reset() {
430
- this.destroy(), this.setState(o(this, Nt));
431
- }
432
- isActive() {
433
- return this.observers.some(
434
- (e) => X(e.options.enabled, this) !== !1
435
- );
436
- }
437
- isDisabled() {
438
- return this.getObserversCount() > 0 && !this.isActive();
439
- }
440
- isStale() {
441
- return this.state.isInvalidated ? !0 : this.getObserversCount() > 0 ? this.observers.some(
442
- (e) => e.getCurrentResult().isStale
443
- ) : this.state.data === void 0;
444
- }
445
- isStaleByTime(e = 0) {
446
- return this.state.isInvalidated || this.state.data === void 0 || !rs(this.state.dataUpdatedAt, e);
447
- }
448
- onFocus() {
449
- var s;
450
- const e = this.observers.find((i) => i.shouldFetchOnWindowFocus());
451
- e == null || e.refetch({ cancelRefetch: !1 }), (s = o(this, D)) == null || s.continue();
452
- }
453
- onOnline() {
454
- var s;
455
- const e = this.observers.find((i) => i.shouldFetchOnReconnect());
456
- e == null || e.refetch({ cancelRefetch: !1 }), (s = o(this, D)) == null || s.continue();
457
- }
458
- addObserver(e) {
459
- this.observers.includes(e) || (this.observers.push(e), this.clearGcTimeout(), o(this, V).notify({ type: "observerAdded", query: this, observer: e }));
460
- }
461
- removeObserver(e) {
462
- this.observers.includes(e) && (this.observers = this.observers.filter((s) => s !== e), this.observers.length || (o(this, D) && (o(this, gt) ? o(this, D).cancel({ revert: !0 }) : o(this, D).cancelRetry()), this.scheduleGc()), o(this, V).notify({ type: "observerRemoved", query: this, observer: e }));
463
- }
464
- getObserversCount() {
465
- return this.observers.length;
466
- }
467
- invalidate() {
468
- this.state.isInvalidated || j(this, Z, st).call(this, { type: "invalidate" });
469
- }
470
- fetch(e, s) {
471
- var d, p, f;
472
- if (this.state.fetchStatus !== "idle") {
473
- if (this.state.data !== void 0 && (s != null && s.cancelRefetch))
474
- this.cancel({ silent: !0 });
475
- else if (o(this, D))
476
- return o(this, D).continueRetry(), o(this, D).promise;
477
- }
478
- if (e && this.setOptions(e), !this.options.queryFn) {
479
- const h = this.observers.find((y) => y.options.queryFn);
480
- h && this.setOptions(h.options);
481
- }
482
- const i = new AbortController(), a = (h) => {
483
- Object.defineProperty(h, "signal", {
484
- enumerable: !0,
485
- get: () => (m(this, gt, !0), i.signal)
486
- });
487
- }, c = () => {
488
- const h = os(this.options, s), y = {
489
- queryKey: this.queryKey,
490
- meta: this.meta
491
- };
492
- return a(y), m(this, gt, !1), this.options.persister ? this.options.persister(
493
- h,
494
- y,
495
- this
496
- ) : h(y);
497
- }, l = {
498
- fetchOptions: s,
499
- options: this.options,
500
- queryKey: this.queryKey,
501
- state: this.state,
502
- fetchFn: c
503
- };
504
- a(l), (d = this.options.behavior) == null || d.onFetch(
505
- l,
506
- this
507
- ), m(this, Lt, this.state), (this.state.fetchStatus === "idle" || this.state.fetchMeta !== ((p = l.fetchOptions) == null ? void 0 : p.meta)) && j(this, Z, st).call(this, { type: "fetch", meta: (f = l.fetchOptions) == null ? void 0 : f.meta });
508
- const u = (h) => {
509
- var y, g, _, S;
510
- ae(h) && h.silent || j(this, Z, st).call(this, {
511
- type: "error",
512
- error: h
513
- }), ae(h) || ((g = (y = o(this, V).config).onError) == null || g.call(
514
- y,
515
- h,
516
- this
517
- ), (S = (_ = o(this, V).config).onSettled) == null || S.call(
518
- _,
519
- this.state.data,
520
- h,
521
- this
522
- )), this.isFetchingOptimistic || this.scheduleGc(), this.isFetchingOptimistic = !1;
523
- };
524
- return m(this, D, us({
525
- initialPromise: s == null ? void 0 : s.initialPromise,
526
- fn: l.fetchFn,
527
- abort: i.abort.bind(i),
528
- onSuccess: (h) => {
529
- var y, g, _, S;
530
- if (h === void 0) {
531
- u(new Error(`${this.queryHash} data is undefined`));
532
- return;
533
- }
534
- try {
535
- this.setData(h);
536
- } catch (P) {
537
- u(P);
538
- return;
539
- }
540
- (g = (y = o(this, V).config).onSuccess) == null || g.call(y, h, this), (S = (_ = o(this, V).config).onSettled) == null || S.call(
541
- _,
542
- h,
543
- this.state.error,
544
- this
545
- ), this.isFetchingOptimistic || this.scheduleGc(), this.isFetchingOptimistic = !1;
546
- },
547
- onError: u,
548
- onFail: (h, y) => {
549
- j(this, Z, st).call(this, { type: "failed", failureCount: h, error: y });
550
- },
551
- onPause: () => {
552
- j(this, Z, st).call(this, { type: "pause" });
553
- },
554
- onContinue: () => {
555
- j(this, Z, st).call(this, { type: "continue" });
556
- },
557
- retry: l.options.retry,
558
- retryDelay: l.options.retryDelay,
559
- networkMode: l.options.networkMode,
560
- canRun: () => !0
561
- })), o(this, D).start();
562
- }
563
- }, Nt = new WeakMap(), Lt = new WeakMap(), V = new WeakMap(), D = new WeakMap(), Vt = new WeakMap(), gt = new WeakMap(), Z = new WeakSet(), st = function(e) {
564
- const s = (i) => {
565
- switch (e.type) {
566
- case "failed":
567
- return {
568
- ...i,
569
- fetchFailureCount: e.failureCount,
570
- fetchFailureReason: e.error
571
- };
572
- case "pause":
573
- return {
574
- ...i,
575
- fetchStatus: "paused"
576
- };
577
- case "continue":
578
- return {
579
- ...i,
580
- fetchStatus: "fetching"
581
- };
582
- case "fetch":
583
- return {
584
- ...i,
585
- ...hs(i.data, this.options),
586
- fetchMeta: e.meta ?? null
587
- };
588
- case "success":
589
- return {
590
- ...i,
591
- data: e.data,
592
- dataUpdateCount: i.dataUpdateCount + 1,
593
- dataUpdatedAt: e.dataUpdatedAt ?? Date.now(),
594
- error: null,
595
- isInvalidated: !1,
596
- status: "success",
597
- ...!e.manual && {
598
- fetchStatus: "idle",
599
- fetchFailureCount: 0,
600
- fetchFailureReason: null
601
- }
602
- };
603
- case "error":
604
- const a = e.error;
605
- return ae(a) && a.revert && o(this, Lt) ? { ...o(this, Lt), fetchStatus: "idle" } : {
606
- ...i,
607
- error: a,
608
- errorUpdateCount: i.errorUpdateCount + 1,
609
- errorUpdatedAt: Date.now(),
610
- fetchFailureCount: i.fetchFailureCount + 1,
611
- fetchFailureReason: a,
612
- fetchStatus: "idle",
613
- status: "error"
614
- };
615
- case "invalidate":
616
- return {
617
- ...i,
618
- isInvalidated: !0
619
- };
620
- case "setState":
621
- return {
622
- ...i,
623
- ...e.state
624
- };
625
- }
626
- };
627
- this.state = s(this.state), z.batch(() => {
628
- this.observers.forEach((i) => {
629
- i.onQueryUpdate();
630
- }), o(this, V).notify({ query: this, type: "updated", action: e });
631
- });
632
- }, Ye);
633
- function hs(t, e) {
634
- return {
635
- fetchFailureCount: 0,
636
- fetchFailureReason: null,
637
- fetchStatus: ls(e.networkMode) ? "fetching" : "paused",
638
- ...t === void 0 && {
639
- error: null,
640
- status: "pending"
641
- }
642
- };
643
- }
644
- function ni(t) {
645
- const e = typeof t.initialData == "function" ? t.initialData() : t.initialData, s = e !== void 0, i = s ? typeof t.initialDataUpdatedAt == "function" ? t.initialDataUpdatedAt() : t.initialDataUpdatedAt : 0;
646
- return {
647
- data: e,
648
- dataUpdateCount: 0,
649
- dataUpdatedAt: s ? i ?? Date.now() : 0,
650
- error: null,
651
- errorUpdateCount: 0,
652
- errorUpdatedAt: 0,
653
- fetchFailureCount: 0,
654
- fetchFailureReason: null,
655
- fetchMeta: null,
656
- isInvalidated: !1,
657
- status: s ? "success" : "pending",
658
- fetchStatus: "idle"
659
- };
660
- }
661
- var J, Je, ai = (Je = class extends Ht {
662
- constructor(e = {}) {
663
- super();
664
- v(this, J);
665
- this.config = e, m(this, J, /* @__PURE__ */ new Map());
666
- }
667
- build(e, s, i) {
668
- const a = s.queryKey, c = s.queryHash ?? Se(a, s);
669
- let l = this.get(c);
670
- return l || (l = new ri({
671
- cache: this,
672
- queryKey: a,
673
- queryHash: c,
674
- options: e.defaultQueryOptions(s),
675
- state: i,
676
- defaultOptions: e.getQueryDefaults(a)
677
- }), this.add(l)), l;
678
- }
679
- add(e) {
680
- o(this, J).has(e.queryHash) || (o(this, J).set(e.queryHash, e), this.notify({
681
- type: "added",
682
- query: e
683
- }));
684
- }
685
- remove(e) {
686
- const s = o(this, J).get(e.queryHash);
687
- s && (e.destroy(), s === e && o(this, J).delete(e.queryHash), this.notify({ type: "removed", query: e }));
688
- }
689
- clear() {
690
- z.batch(() => {
691
- this.getAll().forEach((e) => {
692
- this.remove(e);
693
- });
694
- });
695
- }
696
- get(e) {
697
- return o(this, J).get(e);
698
- }
699
- getAll() {
700
- return [...o(this, J).values()];
701
- }
702
- find(e) {
703
- const s = { exact: !0, ...e };
704
- return this.getAll().find(
705
- (i) => Me(s, i)
706
- );
707
- }
708
- findAll(e = {}) {
709
- const s = this.getAll();
710
- return Object.keys(e).length > 0 ? s.filter((i) => Me(e, i)) : s;
711
- }
712
- notify(e) {
713
- z.batch(() => {
714
- this.listeners.forEach((s) => {
715
- s(e);
716
- });
717
- });
718
- }
719
- onFocus() {
720
- z.batch(() => {
721
- this.getAll().forEach((e) => {
722
- e.onFocus();
723
- });
724
- });
725
- }
726
- onOnline() {
727
- z.batch(() => {
728
- this.getAll().forEach((e) => {
729
- e.onOnline();
730
- });
731
- });
732
- }
733
- }, J = new WeakMap(), Je), I, T, vt, B, nt, Ie, oi = (Ie = class extends ds {
734
- constructor(e) {
735
- super();
736
- v(this, B);
737
- v(this, I);
738
- v(this, T);
739
- v(this, vt);
740
- this.mutationId = e.mutationId, m(this, T, e.mutationCache), m(this, I, []), this.state = e.state || fs(), this.setOptions(e.options), this.scheduleGc();
741
- }
742
- setOptions(e) {
743
- this.options = e, this.updateGcTime(this.options.gcTime);
744
- }
745
- get meta() {
746
- return this.options.meta;
747
- }
748
- addObserver(e) {
749
- o(this, I).includes(e) || (o(this, I).push(e), this.clearGcTimeout(), o(this, T).notify({
750
- type: "observerAdded",
751
- mutation: this,
752
- observer: e
753
- }));
754
- }
755
- removeObserver(e) {
756
- m(this, I, o(this, I).filter((s) => s !== e)), this.scheduleGc(), o(this, T).notify({
757
- type: "observerRemoved",
758
- mutation: this,
759
- observer: e
760
- });
761
- }
762
- optionalRemove() {
763
- o(this, I).length || (this.state.status === "pending" ? this.scheduleGc() : o(this, T).remove(this));
764
- }
765
- continue() {
766
- var e;
767
- return ((e = o(this, vt)) == null ? void 0 : e.continue()) ?? // continuing a mutation assumes that variables are set, mutation must have been dehydrated before
768
- this.execute(this.state.variables);
769
- }
770
- async execute(e) {
771
- var a, c, l, u, d, p, f, h, y, g, _, S, P, x, b, w, M, O, Y, et;
772
- m(this, vt, us({
773
- fn: () => this.options.mutationFn ? this.options.mutationFn(e) : Promise.reject(new Error("No mutationFn found")),
774
- onFail: (A, $) => {
775
- j(this, B, nt).call(this, { type: "failed", failureCount: A, error: $ });
776
- },
777
- onPause: () => {
778
- j(this, B, nt).call(this, { type: "pause" });
779
- },
780
- onContinue: () => {
781
- j(this, B, nt).call(this, { type: "continue" });
782
- },
783
- retry: this.options.retry ?? 0,
784
- retryDelay: this.options.retryDelay,
785
- networkMode: this.options.networkMode,
786
- canRun: () => o(this, T).canRun(this)
787
- }));
788
- const s = this.state.status === "pending", i = !o(this, vt).canStart();
789
- try {
790
- if (!s) {
791
- j(this, B, nt).call(this, { type: "pending", variables: e, isPaused: i }), await ((c = (a = o(this, T).config).onMutate) == null ? void 0 : c.call(
792
- a,
793
- e,
794
- this
795
- ));
796
- const $ = await ((u = (l = this.options).onMutate) == null ? void 0 : u.call(l, e));
797
- $ !== this.state.context && j(this, B, nt).call(this, {
798
- type: "pending",
799
- context: $,
800
- variables: e,
801
- isPaused: i
802
- });
803
- }
804
- const A = await o(this, vt).start();
805
- return await ((p = (d = o(this, T).config).onSuccess) == null ? void 0 : p.call(
806
- d,
807
- A,
808
- e,
809
- this.state.context,
810
- this
811
- )), await ((h = (f = this.options).onSuccess) == null ? void 0 : h.call(f, A, e, this.state.context)), await ((g = (y = o(this, T).config).onSettled) == null ? void 0 : g.call(
812
- y,
813
- A,
814
- null,
815
- this.state.variables,
816
- this.state.context,
817
- this
818
- )), await ((S = (_ = this.options).onSettled) == null ? void 0 : S.call(_, A, null, e, this.state.context)), j(this, B, nt).call(this, { type: "success", data: A }), A;
819
- } catch (A) {
820
- try {
821
- throw await ((x = (P = o(this, T).config).onError) == null ? void 0 : x.call(
822
- P,
823
- A,
824
- e,
825
- this.state.context,
826
- this
827
- )), await ((w = (b = this.options).onError) == null ? void 0 : w.call(
828
- b,
829
- A,
830
- e,
831
- this.state.context
832
- )), await ((O = (M = o(this, T).config).onSettled) == null ? void 0 : O.call(
833
- M,
834
- void 0,
835
- A,
836
- this.state.variables,
837
- this.state.context,
838
- this
839
- )), await ((et = (Y = this.options).onSettled) == null ? void 0 : et.call(
840
- Y,
841
- void 0,
842
- A,
843
- e,
844
- this.state.context
845
- )), A;
846
- } finally {
847
- j(this, B, nt).call(this, { type: "error", error: A });
848
- }
849
- } finally {
850
- o(this, T).runNext(this);
851
- }
852
- }
853
- }, I = new WeakMap(), T = new WeakMap(), vt = new WeakMap(), B = new WeakSet(), nt = function(e) {
854
- const s = (i) => {
855
- switch (e.type) {
856
- case "failed":
857
- return {
858
- ...i,
859
- failureCount: e.failureCount,
860
- failureReason: e.error
861
- };
862
- case "pause":
863
- return {
864
- ...i,
865
- isPaused: !0
866
- };
867
- case "continue":
868
- return {
869
- ...i,
870
- isPaused: !1
871
- };
872
- case "pending":
873
- return {
874
- ...i,
875
- context: e.context,
876
- data: void 0,
877
- failureCount: 0,
878
- failureReason: null,
879
- error: null,
880
- isPaused: e.isPaused,
881
- status: "pending",
882
- variables: e.variables,
883
- submittedAt: Date.now()
884
- };
885
- case "success":
886
- return {
887
- ...i,
888
- data: e.data,
889
- failureCount: 0,
890
- failureReason: null,
891
- error: null,
892
- status: "success",
893
- isPaused: !1
894
- };
895
- case "error":
896
- return {
897
- ...i,
898
- data: void 0,
899
- error: e.error,
900
- failureCount: i.failureCount + 1,
901
- failureReason: e.error,
902
- isPaused: !1,
903
- status: "error"
904
- };
905
- }
906
- };
907
- this.state = s(this.state), z.batch(() => {
908
- o(this, I).forEach((i) => {
909
- i.onMutationUpdate(e);
910
- }), o(this, T).notify({
911
- mutation: this,
912
- type: "updated",
913
- action: e
914
- });
915
- });
916
- }, Ie);
917
- function fs() {
918
- return {
919
- context: void 0,
920
- data: void 0,
921
- error: null,
922
- failureCount: 0,
923
- failureReason: null,
924
- isPaused: !1,
925
- status: "idle",
926
- variables: void 0,
927
- submittedAt: 0
928
- };
929
- }
930
- var W, qt, Be, li = (Be = class extends Ht {
931
- constructor(e = {}) {
932
- super();
933
- v(this, W);
934
- v(this, qt);
935
- this.config = e, m(this, W, /* @__PURE__ */ new Map()), m(this, qt, Date.now());
936
- }
937
- build(e, s, i) {
938
- const a = new oi({
939
- mutationCache: this,
940
- mutationId: ++Yt(this, qt)._,
941
- options: e.defaultMutationOptions(s),
942
- state: i
943
- });
944
- return this.add(a), a;
945
- }
946
- add(e) {
947
- const s = Jt(e), i = o(this, W).get(s) ?? [];
948
- i.push(e), o(this, W).set(s, i), this.notify({ type: "added", mutation: e });
949
- }
950
- remove(e) {
951
- var i;
952
- const s = Jt(e);
953
- if (o(this, W).has(s)) {
954
- const a = (i = o(this, W).get(s)) == null ? void 0 : i.filter((c) => c !== e);
955
- a && (a.length === 0 ? o(this, W).delete(s) : o(this, W).set(s, a));
956
- }
957
- this.notify({ type: "removed", mutation: e });
958
- }
959
- canRun(e) {
960
- var i;
961
- const s = (i = o(this, W).get(Jt(e))) == null ? void 0 : i.find((a) => a.state.status === "pending");
962
- return !s || s === e;
963
- }
964
- runNext(e) {
965
- var i;
966
- const s = (i = o(this, W).get(Jt(e))) == null ? void 0 : i.find((a) => a !== e && a.state.isPaused);
967
- return (s == null ? void 0 : s.continue()) ?? Promise.resolve();
968
- }
969
- clear() {
970
- z.batch(() => {
971
- this.getAll().forEach((e) => {
972
- this.remove(e);
973
- });
974
- });
975
- }
976
- getAll() {
977
- return [...o(this, W).values()].flat();
978
- }
979
- find(e) {
980
- const s = { exact: !0, ...e };
981
- return this.getAll().find(
982
- (i) => Fe(s, i)
983
- );
984
- }
985
- findAll(e = {}) {
986
- return this.getAll().filter((s) => Fe(e, s));
987
- }
988
- notify(e) {
989
- z.batch(() => {
990
- this.listeners.forEach((s) => {
991
- s(e);
992
- });
993
- });
994
- }
995
- resumePausedMutations() {
996
- const e = this.getAll().filter((s) => s.state.isPaused);
997
- return z.batch(
998
- () => Promise.all(
999
- e.map((s) => s.continue().catch(q))
1000
- )
1001
- );
1002
- }
1003
- }, W = new WeakMap(), qt = new WeakMap(), Be);
1004
- function Jt(t) {
1005
- var e;
1006
- return ((e = t.options.scope) == null ? void 0 : e.id) ?? String(t.mutationId);
1007
- }
1008
- function ze(t) {
1009
- return {
1010
- onFetch: (e, s) => {
1011
- var f, h, y, g, _;
1012
- const i = e.options, a = (y = (h = (f = e.fetchOptions) == null ? void 0 : f.meta) == null ? void 0 : h.fetchMore) == null ? void 0 : y.direction, c = ((g = e.state.data) == null ? void 0 : g.pages) || [], l = ((_ = e.state.data) == null ? void 0 : _.pageParams) || [];
1013
- let u = { pages: [], pageParams: [] }, d = 0;
1014
- const p = async () => {
1015
- let S = !1;
1016
- const P = (w) => {
1017
- Object.defineProperty(w, "signal", {
1018
- enumerable: !0,
1019
- get: () => (e.signal.aborted ? S = !0 : e.signal.addEventListener("abort", () => {
1020
- S = !0;
1021
- }), e.signal)
1022
- });
1023
- }, x = os(e.options, e.fetchOptions), b = async (w, M, O) => {
1024
- if (S)
1025
- return Promise.reject();
1026
- if (M == null && w.pages.length)
1027
- return Promise.resolve(w);
1028
- const Y = {
1029
- queryKey: e.queryKey,
1030
- pageParam: M,
1031
- direction: O ? "backward" : "forward",
1032
- meta: e.options.meta
1033
- };
1034
- P(Y);
1035
- const et = await x(
1036
- Y
1037
- ), { maxPages: A } = e.options, $ = O ? Bs : Is;
1038
- return {
1039
- pages: $(w.pages, et, A),
1040
- pageParams: $(w.pageParams, M, A)
1041
- };
1042
- };
1043
- if (a && c.length) {
1044
- const w = a === "backward", M = w ? ci : De, O = {
1045
- pages: c,
1046
- pageParams: l
1047
- }, Y = M(i, O);
1048
- u = await b(O, Y, w);
1049
- } else {
1050
- const w = t ?? c.length;
1051
- do {
1052
- const M = d === 0 ? l[0] ?? i.initialPageParam : De(i, u);
1053
- if (d > 0 && M == null)
1054
- break;
1055
- u = await b(u, M), d++;
1056
- } while (d < w);
1057
- }
1058
- return u;
1059
- };
1060
- e.options.persister ? e.fetchFn = () => {
1061
- var S, P;
1062
- return (P = (S = e.options).persister) == null ? void 0 : P.call(
1063
- S,
1064
- p,
1065
- {
1066
- queryKey: e.queryKey,
1067
- meta: e.options.meta,
1068
- signal: e.signal
1069
- },
1070
- s
1071
- );
1072
- } : e.fetchFn = p;
1073
- }
1074
- };
1075
- }
1076
- function De(t, { pages: e, pageParams: s }) {
1077
- const i = e.length - 1;
1078
- return e.length > 0 ? t.getNextPageParam(
1079
- e[i],
1080
- e,
1081
- s[i],
1082
- s
1083
- ) : void 0;
1084
- }
1085
- function ci(t, { pages: e, pageParams: s }) {
1086
- var i;
1087
- return e.length > 0 ? (i = t.getPreviousPageParam) == null ? void 0 : i.call(t, e[0], e, s[0], s) : void 0;
1088
- }
1089
- var R, lt, ct, Mt, Ft, ut, Rt, Ot, ts, ps = (ts = class {
1090
- constructor(t = {}) {
1091
- v(this, R);
1092
- v(this, lt);
1093
- v(this, ct);
1094
- v(this, Mt);
1095
- v(this, Ft);
1096
- v(this, ut);
1097
- v(this, Rt);
1098
- v(this, Ot);
1099
- m(this, R, t.queryCache || new ai()), m(this, lt, t.mutationCache || new li()), m(this, ct, t.defaultOptions || {}), m(this, Mt, /* @__PURE__ */ new Map()), m(this, Ft, /* @__PURE__ */ new Map()), m(this, ut, 0);
1100
- }
1101
- mount() {
1102
- Yt(this, ut)._++, o(this, ut) === 1 && (m(this, Rt, _e.subscribe(async (t) => {
1103
- t && (await this.resumePausedMutations(), o(this, R).onFocus());
1104
- })), m(this, Ot, ee.subscribe(async (t) => {
1105
- t && (await this.resumePausedMutations(), o(this, R).onOnline());
1106
- })));
1107
- }
1108
- unmount() {
1109
- var t, e;
1110
- Yt(this, ut)._--, o(this, ut) === 0 && ((t = o(this, Rt)) == null || t.call(this), m(this, Rt, void 0), (e = o(this, Ot)) == null || e.call(this), m(this, Ot, void 0));
1111
- }
1112
- isFetching(t) {
1113
- return o(this, R).findAll({ ...t, fetchStatus: "fetching" }).length;
1114
- }
1115
- isMutating(t) {
1116
- return o(this, lt).findAll({ ...t, status: "pending" }).length;
1117
- }
1118
- getQueryData(t) {
1119
- var s;
1120
- const e = this.defaultQueryOptions({ queryKey: t });
1121
- return (s = o(this, R).get(e.queryHash)) == null ? void 0 : s.state.data;
1122
- }
1123
- ensureQueryData(t) {
1124
- const e = this.getQueryData(t.queryKey);
1125
- if (e === void 0)
1126
- return this.fetchQuery(t);
1127
- {
1128
- const s = this.defaultQueryOptions(t), i = o(this, R).build(this, s);
1129
- return t.revalidateIfStale && i.isStaleByTime(Pt(s.staleTime, i)) && this.prefetchQuery(s), Promise.resolve(e);
1130
- }
1131
- }
1132
- getQueriesData(t) {
1133
- return o(this, R).findAll(t).map(({ queryKey: e, state: s }) => {
1134
- const i = s.data;
1135
- return [e, i];
1136
- });
1137
- }
1138
- setQueryData(t, e, s) {
1139
- const i = this.defaultQueryOptions({ queryKey: t }), a = o(this, R).get(
1140
- i.queryHash
1141
- ), c = a == null ? void 0 : a.state.data, l = Ys(e, c);
1142
- if (l !== void 0)
1143
- return o(this, R).build(this, i).setData(l, { ...s, manual: !0 });
1144
- }
1145
- setQueriesData(t, e, s) {
1146
- return z.batch(
1147
- () => o(this, R).findAll(t).map(({ queryKey: i }) => [
1148
- i,
1149
- this.setQueryData(i, e, s)
1150
- ])
1151
- );
1152
- }
1153
- getQueryState(t) {
1154
- var s;
1155
- const e = this.defaultQueryOptions({ queryKey: t });
1156
- return (s = o(this, R).get(e.queryHash)) == null ? void 0 : s.state;
1157
- }
1158
- removeQueries(t) {
1159
- const e = o(this, R);
1160
- z.batch(() => {
1161
- e.findAll(t).forEach((s) => {
1162
- e.remove(s);
1163
- });
1164
- });
1165
- }
1166
- resetQueries(t, e) {
1167
- const s = o(this, R), i = {
1168
- type: "active",
1169
- ...t
1170
- };
1171
- return z.batch(() => (s.findAll(t).forEach((a) => {
1172
- a.reset();
1173
- }), this.refetchQueries(i, e)));
1174
- }
1175
- cancelQueries(t = {}, e = {}) {
1176
- const s = { revert: !0, ...e }, i = z.batch(
1177
- () => o(this, R).findAll(t).map((a) => a.cancel(s))
1178
- );
1179
- return Promise.all(i).then(q).catch(q);
1180
- }
1181
- invalidateQueries(t = {}, e = {}) {
1182
- return z.batch(() => {
1183
- if (o(this, R).findAll(t).forEach((i) => {
1184
- i.invalidate();
1185
- }), t.refetchType === "none")
1186
- return Promise.resolve();
1187
- const s = {
1188
- ...t,
1189
- type: t.refetchType ?? t.type ?? "active"
1190
- };
1191
- return this.refetchQueries(s, e);
1192
- });
1193
- }
1194
- refetchQueries(t = {}, e) {
1195
- const s = {
1196
- ...e,
1197
- cancelRefetch: (e == null ? void 0 : e.cancelRefetch) ?? !0
1198
- }, i = z.batch(
1199
- () => o(this, R).findAll(t).filter((a) => !a.isDisabled()).map((a) => {
1200
- let c = a.fetch(void 0, s);
1201
- return s.throwOnError || (c = c.catch(q)), a.state.fetchStatus === "paused" ? Promise.resolve() : c;
1202
- })
1203
- );
1204
- return Promise.all(i).then(q);
1205
- }
1206
- fetchQuery(t) {
1207
- const e = this.defaultQueryOptions(t);
1208
- e.retry === void 0 && (e.retry = !1);
1209
- const s = o(this, R).build(this, e);
1210
- return s.isStaleByTime(
1211
- Pt(e.staleTime, s)
1212
- ) ? s.fetch(e) : Promise.resolve(s.state.data);
1213
- }
1214
- prefetchQuery(t) {
1215
- return this.fetchQuery(t).then(q).catch(q);
1216
- }
1217
- fetchInfiniteQuery(t) {
1218
- return t.behavior = ze(t.pages), this.fetchQuery(t);
1219
- }
1220
- prefetchInfiniteQuery(t) {
1221
- return this.fetchInfiniteQuery(t).then(q).catch(q);
1222
- }
1223
- ensureInfiniteQueryData(t) {
1224
- return t.behavior = ze(t.pages), this.ensureQueryData(t);
1225
- }
1226
- resumePausedMutations() {
1227
- return ee.isOnline() ? o(this, lt).resumePausedMutations() : Promise.resolve();
1228
- }
1229
- getQueryCache() {
1230
- return o(this, R);
1231
- }
1232
- getMutationCache() {
1233
- return o(this, lt);
1234
- }
1235
- getDefaultOptions() {
1236
- return o(this, ct);
1237
- }
1238
- setDefaultOptions(t) {
1239
- m(this, ct, t);
1240
- }
1241
- setQueryDefaults(t, e) {
1242
- o(this, Mt).set(wt(t), {
1243
- queryKey: t,
1244
- defaultOptions: e
1245
- });
1246
- }
1247
- getQueryDefaults(t) {
1248
- const e = [...o(this, Mt).values()];
1249
- let s = {};
1250
- return e.forEach((i) => {
1251
- Gt(t, i.queryKey) && (s = { ...s, ...i.defaultOptions });
1252
- }), s;
1253
- }
1254
- setMutationDefaults(t, e) {
1255
- o(this, Ft).set(wt(t), {
1256
- mutationKey: t,
1257
- defaultOptions: e
1258
- });
1259
- }
1260
- getMutationDefaults(t) {
1261
- const e = [...o(this, Ft).values()];
1262
- let s = {};
1263
- return e.forEach((i) => {
1264
- Gt(t, i.mutationKey) && (s = { ...s, ...i.defaultOptions });
1265
- }), s;
1266
- }
1267
- defaultQueryOptions(t) {
1268
- if (t._defaulted)
1269
- return t;
1270
- const e = {
1271
- ...o(this, ct).queries,
1272
- ...this.getQueryDefaults(t.queryKey),
1273
- ...t,
1274
- _defaulted: !0
1275
- };
1276
- return e.queryHash || (e.queryHash = Se(
1277
- e.queryKey,
1278
- e
1279
- )), e.refetchOnReconnect === void 0 && (e.refetchOnReconnect = e.networkMode !== "always"), e.throwOnError === void 0 && (e.throwOnError = !!e.suspense), !e.networkMode && e.persister && (e.networkMode = "offlineFirst"), e.enabled !== !0 && e.queryFn === as && (e.enabled = !1), e;
1280
- }
1281
- defaultMutationOptions(t) {
1282
- return t != null && t._defaulted ? t : {
1283
- ...o(this, ct).mutations,
1284
- ...(t == null ? void 0 : t.mutationKey) && this.getMutationDefaults(t.mutationKey),
1285
- ...t,
1286
- _defaulted: !0
1287
- };
1288
- }
1289
- clear() {
1290
- o(this, R).clear(), o(this, lt).clear();
1291
- }
1292
- }, R = new WeakMap(), lt = new WeakMap(), ct = new WeakMap(), Mt = new WeakMap(), Ft = new WeakMap(), ut = new WeakMap(), Rt = new WeakMap(), Ot = new WeakMap(), ts), Q, k, $t, U, Ct, zt, tt, Zt, Dt, Tt, xt, bt, dt, Ut, L, Wt, ue, de, he, fe, pe, me, ye, ms, es, ui = (es = class extends Ht {
1293
- constructor(e, s) {
1294
- super();
1295
- v(this, L);
1296
- v(this, Q);
1297
- v(this, k);
1298
- v(this, $t);
1299
- v(this, U);
1300
- v(this, Ct);
1301
- v(this, zt);
1302
- v(this, tt);
1303
- v(this, Zt);
1304
- v(this, Dt);
1305
- // This property keeps track of the last query with defined data.
1306
- // It will be used to pass the previous data and query to the placeholder function between renders.
1307
- v(this, Tt);
1308
- v(this, xt);
1309
- v(this, bt);
1310
- v(this, dt);
1311
- v(this, Ut, /* @__PURE__ */ new Set());
1312
- this.options = s, m(this, Q, e), m(this, tt, null), this.bindMethods(), this.setOptions(s);
1313
- }
1314
- bindMethods() {
1315
- this.refetch = this.refetch.bind(this);
1316
- }
1317
- onSubscribe() {
1318
- this.listeners.size === 1 && (o(this, k).addObserver(this), Te(o(this, k), this.options) ? j(this, L, Wt).call(this) : this.updateResult(), j(this, L, fe).call(this));
1319
- }
1320
- onUnsubscribe() {
1321
- this.hasListeners() || this.destroy();
1322
- }
1323
- shouldFetchOnReconnect() {
1324
- return ge(
1325
- o(this, k),
1326
- this.options,
1327
- this.options.refetchOnReconnect
1328
- );
1329
- }
1330
- shouldFetchOnWindowFocus() {
1331
- return ge(
1332
- o(this, k),
1333
- this.options,
1334
- this.options.refetchOnWindowFocus
1335
- );
1336
- }
1337
- destroy() {
1338
- this.listeners = /* @__PURE__ */ new Set(), j(this, L, pe).call(this), j(this, L, me).call(this), o(this, k).removeObserver(this);
1339
- }
1340
- setOptions(e, s) {
1341
- const i = this.options, a = o(this, k);
1342
- if (this.options = o(this, Q).defaultQueryOptions(e), this.options.enabled !== void 0 && typeof this.options.enabled != "boolean" && typeof this.options.enabled != "function" && typeof X(this.options.enabled, o(this, k)) != "boolean")
1343
- throw new Error(
1344
- "Expected enabled to be a boolean or a callback that returns a boolean"
1345
- );
1346
- j(this, L, ye).call(this), o(this, k).setOptions(this.options), i._defaulted && !te(this.options, i) && o(this, Q).getQueryCache().notify({
1347
- type: "observerOptionsUpdated",
1348
- query: o(this, k),
1349
- observer: this
1350
- });
1351
- const c = this.hasListeners();
1352
- c && Ue(
1353
- o(this, k),
1354
- a,
1355
- this.options,
1356
- i
1357
- ) && j(this, L, Wt).call(this), this.updateResult(s), c && (o(this, k) !== a || X(this.options.enabled, o(this, k)) !== X(i.enabled, o(this, k)) || Pt(this.options.staleTime, o(this, k)) !== Pt(i.staleTime, o(this, k))) && j(this, L, ue).call(this);
1358
- const l = j(this, L, de).call(this);
1359
- c && (o(this, k) !== a || X(this.options.enabled, o(this, k)) !== X(i.enabled, o(this, k)) || l !== o(this, dt)) && j(this, L, he).call(this, l);
1360
- }
1361
- getOptimisticResult(e) {
1362
- const s = o(this, Q).getQueryCache().build(o(this, Q), e), i = this.createResult(s, e);
1363
- return hi(this, i) && (m(this, U, i), m(this, zt, this.options), m(this, Ct, o(this, k).state)), i;
1364
- }
1365
- getCurrentResult() {
1366
- return o(this, U);
1367
- }
1368
- trackResult(e, s) {
1369
- const i = {};
1370
- return Object.keys(e).forEach((a) => {
1371
- Object.defineProperty(i, a, {
1372
- configurable: !1,
1373
- enumerable: !0,
1374
- get: () => (this.trackProp(a), s == null || s(a), e[a])
1375
- });
1376
- }), i;
1377
- }
1378
- trackProp(e) {
1379
- o(this, Ut).add(e);
1380
- }
1381
- getCurrentQuery() {
1382
- return o(this, k);
1383
- }
1384
- refetch({ ...e } = {}) {
1385
- return this.fetch({
1386
- ...e
1387
- });
1388
- }
1389
- fetchOptimistic(e) {
1390
- const s = o(this, Q).defaultQueryOptions(e), i = o(this, Q).getQueryCache().build(o(this, Q), s);
1391
- return i.isFetchingOptimistic = !0, i.fetch().then(() => this.createResult(i, s));
1392
- }
1393
- fetch(e) {
1394
- return j(this, L, Wt).call(this, {
1395
- ...e,
1396
- cancelRefetch: e.cancelRefetch ?? !0
1397
- }).then(() => (this.updateResult(), o(this, U)));
1398
- }
1399
- createResult(e, s) {
1400
- var et;
1401
- const i = o(this, k), a = this.options, c = o(this, U), l = o(this, Ct), u = o(this, zt), p = e !== i ? e.state : o(this, $t), { state: f } = e;
1402
- let h = { ...f }, y = !1, g;
1403
- if (s._optimisticResults) {
1404
- const A = this.hasListeners(), $ = !A && Te(e, s), Ws = A && Ue(e, i, s, a);
1405
- ($ || Ws) && (h = {
1406
- ...h,
1407
- ...hs(f.data, e.options)
1408
- }), s._optimisticResults === "isRestoring" && (h.fetchStatus = "idle");
1409
- }
1410
- let { error: _, errorUpdatedAt: S, status: P } = h;
1411
- if (s.select && h.data !== void 0)
1412
- if (c && h.data === (l == null ? void 0 : l.data) && s.select === o(this, Zt))
1413
- g = o(this, Dt);
1414
- else
1415
- try {
1416
- m(this, Zt, s.select), g = s.select(h.data), g = ce(c == null ? void 0 : c.data, g, s), m(this, Dt, g), m(this, tt, null);
1417
- } catch (A) {
1418
- m(this, tt, A);
1419
- }
1420
- else
1421
- g = h.data;
1422
- if (s.placeholderData !== void 0 && g === void 0 && P === "pending") {
1423
- let A;
1424
- if (c != null && c.isPlaceholderData && s.placeholderData === (u == null ? void 0 : u.placeholderData))
1425
- A = c.data;
1426
- else if (A = typeof s.placeholderData == "function" ? s.placeholderData(
1427
- (et = o(this, Tt)) == null ? void 0 : et.state.data,
1428
- o(this, Tt)
1429
- ) : s.placeholderData, s.select && A !== void 0)
1430
- try {
1431
- A = s.select(A), m(this, tt, null);
1432
- } catch ($) {
1433
- m(this, tt, $);
1434
- }
1435
- A !== void 0 && (P = "success", g = ce(
1436
- c == null ? void 0 : c.data,
1437
- A,
1438
- s
1439
- ), y = !0);
1440
- }
1441
- o(this, tt) && (_ = o(this, tt), g = o(this, Dt), S = Date.now(), P = "error");
1442
- const x = h.fetchStatus === "fetching", b = P === "pending", w = P === "error", M = b && x, O = g !== void 0;
1443
- return {
1444
- status: P,
1445
- fetchStatus: h.fetchStatus,
1446
- isPending: b,
1447
- isSuccess: P === "success",
1448
- isError: w,
1449
- isInitialLoading: M,
1450
- isLoading: M,
1451
- data: g,
1452
- dataUpdatedAt: h.dataUpdatedAt,
1453
- error: _,
1454
- errorUpdatedAt: S,
1455
- failureCount: h.fetchFailureCount,
1456
- failureReason: h.fetchFailureReason,
1457
- errorUpdateCount: h.errorUpdateCount,
1458
- isFetched: h.dataUpdateCount > 0 || h.errorUpdateCount > 0,
1459
- isFetchedAfterMount: h.dataUpdateCount > p.dataUpdateCount || h.errorUpdateCount > p.errorUpdateCount,
1460
- isFetching: x,
1461
- isRefetching: x && !b,
1462
- isLoadingError: w && !O,
1463
- isPaused: h.fetchStatus === "paused",
1464
- isPlaceholderData: y,
1465
- isRefetchError: w && O,
1466
- isStale: Pe(e, s),
1467
- refetch: this.refetch
1468
- };
1469
- }
1470
- updateResult(e) {
1471
- const s = o(this, U), i = this.createResult(o(this, k), this.options);
1472
- if (m(this, Ct, o(this, k).state), m(this, zt, this.options), o(this, Ct).data !== void 0 && m(this, Tt, o(this, k)), te(i, s))
1473
- return;
1474
- m(this, U, i);
1475
- const a = {}, c = () => {
1476
- if (!s)
1477
- return !0;
1478
- const { notifyOnChangeProps: l } = this.options, u = typeof l == "function" ? l() : l;
1479
- if (u === "all" || !u && !o(this, Ut).size)
1480
- return !0;
1481
- const d = new Set(
1482
- u ?? o(this, Ut)
1483
- );
1484
- return this.options.throwOnError && d.add("error"), Object.keys(o(this, U)).some((p) => {
1485
- const f = p;
1486
- return o(this, U)[f] !== s[f] && d.has(f);
1487
- });
1488
- };
1489
- (e == null ? void 0 : e.listeners) !== !1 && c() && (a.listeners = !0), j(this, L, ms).call(this, { ...a, ...e });
1490
- }
1491
- onQueryUpdate() {
1492
- this.updateResult(), this.hasListeners() && j(this, L, fe).call(this);
1493
- }
1494
- }, Q = new WeakMap(), k = new WeakMap(), $t = new WeakMap(), U = new WeakMap(), Ct = new WeakMap(), zt = new WeakMap(), tt = new WeakMap(), Zt = new WeakMap(), Dt = new WeakMap(), Tt = new WeakMap(), xt = new WeakMap(), bt = new WeakMap(), dt = new WeakMap(), Ut = new WeakMap(), L = new WeakSet(), Wt = function(e) {
1495
- j(this, L, ye).call(this);
1496
- let s = o(this, k).fetch(
1497
- this.options,
1498
- e
1499
- );
1500
- return e != null && e.throwOnError || (s = s.catch(q)), s;
1501
- }, ue = function() {
1502
- j(this, L, pe).call(this);
1503
- const e = Pt(
1504
- this.options.staleTime,
1505
- o(this, k)
1506
- );
1507
- if (Qt || o(this, U).isStale || !oe(e))
1508
- return;
1509
- const i = rs(o(this, U).dataUpdatedAt, e) + 1;
1510
- m(this, xt, setTimeout(() => {
1511
- o(this, U).isStale || this.updateResult();
1512
- }, i));
1513
- }, de = function() {
1514
- return (typeof this.options.refetchInterval == "function" ? this.options.refetchInterval(o(this, k)) : this.options.refetchInterval) ?? !1;
1515
- }, he = function(e) {
1516
- j(this, L, me).call(this), m(this, dt, e), !(Qt || X(this.options.enabled, o(this, k)) === !1 || !oe(o(this, dt)) || o(this, dt) === 0) && m(this, bt, setInterval(() => {
1517
- (this.options.refetchIntervalInBackground || _e.isFocused()) && j(this, L, Wt).call(this);
1518
- }, o(this, dt)));
1519
- }, fe = function() {
1520
- j(this, L, ue).call(this), j(this, L, he).call(this, j(this, L, de).call(this));
1521
- }, pe = function() {
1522
- o(this, xt) && (clearTimeout(o(this, xt)), m(this, xt, void 0));
1523
- }, me = function() {
1524
- o(this, bt) && (clearInterval(o(this, bt)), m(this, bt, void 0));
1525
- }, ye = function() {
1526
- const e = o(this, Q).getQueryCache().build(o(this, Q), this.options);
1527
- if (e === o(this, k))
1528
- return;
1529
- const s = o(this, k);
1530
- m(this, k, e), m(this, $t, e.state), this.hasListeners() && (s == null || s.removeObserver(this), e.addObserver(this));
1531
- }, ms = function(e) {
1532
- z.batch(() => {
1533
- e.listeners && this.listeners.forEach((s) => {
1534
- s(o(this, U));
1535
- }), o(this, Q).getQueryCache().notify({
1536
- query: o(this, k),
1537
- type: "observerResultsUpdated"
1538
- });
1539
- });
1540
- }, es);
1541
- function di(t, e) {
1542
- return X(e.enabled, t) !== !1 && t.state.data === void 0 && !(t.state.status === "error" && e.retryOnMount === !1);
1543
- }
1544
- function Te(t, e) {
1545
- return di(t, e) || t.state.data !== void 0 && ge(t, e, e.refetchOnMount);
1546
- }
1547
- function ge(t, e, s) {
1548
- if (X(e.enabled, t) !== !1) {
1549
- const i = typeof s == "function" ? s(t) : s;
1550
- return i === "always" || i !== !1 && Pe(t, e);
1551
- }
1552
- return !1;
1553
- }
1554
- function Ue(t, e, s, i) {
1555
- return (t !== e || X(i.enabled, t) === !1) && (!s.suspense || t.state.status !== "error") && Pe(t, s);
1556
- }
1557
- function Pe(t, e) {
1558
- return X(e.enabled, t) !== !1 && t.isStaleByTime(Pt(e.staleTime, t));
1559
- }
1560
- function hi(t, e) {
1561
- return !te(t.getCurrentResult(), e);
1562
- }
1563
- var ht, ft, H, it, rt, Bt, ve, ss, fi = (ss = class extends Ht {
1564
- constructor(e, s) {
1565
- super();
1566
- v(this, rt);
1567
- v(this, ht);
1568
- v(this, ft);
1569
- v(this, H);
1570
- v(this, it);
1571
- m(this, ht, e), this.setOptions(s), this.bindMethods(), j(this, rt, Bt).call(this);
1572
- }
1573
- bindMethods() {
1574
- this.mutate = this.mutate.bind(this), this.reset = this.reset.bind(this);
1575
- }
1576
- setOptions(e) {
1577
- var i;
1578
- const s = this.options;
1579
- this.options = o(this, ht).defaultMutationOptions(e), te(this.options, s) || o(this, ht).getMutationCache().notify({
1580
- type: "observerOptionsUpdated",
1581
- mutation: o(this, H),
1582
- observer: this
1583
- }), s != null && s.mutationKey && this.options.mutationKey && wt(s.mutationKey) !== wt(this.options.mutationKey) ? this.reset() : ((i = o(this, H)) == null ? void 0 : i.state.status) === "pending" && o(this, H).setOptions(this.options);
1584
- }
1585
- onUnsubscribe() {
1586
- var e;
1587
- this.hasListeners() || (e = o(this, H)) == null || e.removeObserver(this);
1588
- }
1589
- onMutationUpdate(e) {
1590
- j(this, rt, Bt).call(this), j(this, rt, ve).call(this, e);
1591
- }
1592
- getCurrentResult() {
1593
- return o(this, ft);
1594
- }
1595
- reset() {
1596
- var e;
1597
- (e = o(this, H)) == null || e.removeObserver(this), m(this, H, void 0), j(this, rt, Bt).call(this), j(this, rt, ve).call(this);
1598
- }
1599
- mutate(e, s) {
1600
- var i;
1601
- return m(this, it, s), (i = o(this, H)) == null || i.removeObserver(this), m(this, H, o(this, ht).getMutationCache().build(o(this, ht), this.options)), o(this, H).addObserver(this), o(this, H).execute(e);
1602
- }
1603
- }, ht = new WeakMap(), ft = new WeakMap(), H = new WeakMap(), it = new WeakMap(), rt = new WeakSet(), Bt = function() {
1604
- var s;
1605
- const e = ((s = o(this, H)) == null ? void 0 : s.state) ?? fs();
1606
- m(this, ft, {
1607
- ...e,
1608
- isPending: e.status === "pending",
1609
- isSuccess: e.status === "success",
1610
- isError: e.status === "error",
1611
- isIdle: e.status === "idle",
1612
- mutate: this.mutate,
1613
- reset: this.reset
1614
- });
1615
- }, ve = function(e) {
1616
- z.batch(() => {
1617
- var s, i, a, c, l, u, d, p;
1618
- if (o(this, it) && this.hasListeners()) {
1619
- const f = o(this, ft).variables, h = o(this, ft).context;
1620
- (e == null ? void 0 : e.type) === "success" ? ((i = (s = o(this, it)).onSuccess) == null || i.call(s, e.data, f, h), (c = (a = o(this, it)).onSettled) == null || c.call(a, e.data, null, f, h)) : (e == null ? void 0 : e.type) === "error" && ((u = (l = o(this, it)).onError) == null || u.call(l, e.error, f, h), (p = (d = o(this, it)).onSettled) == null || p.call(
1621
- d,
1622
- void 0,
1623
- e.error,
1624
- f,
1625
- h
1626
- ));
1627
- }
1628
- this.listeners.forEach((f) => {
1629
- f(o(this, ft));
1630
- });
1631
- });
1632
- }, ss), ys = r.createContext(
1633
- void 0
1634
- ), Ee = (t) => {
1635
- const e = r.useContext(ys);
1636
- if (!e)
1637
- throw new Error("No QueryClient set, use QueryClientProvider to set one");
1638
- return e;
1639
- }, pi = ({
1640
- client: t,
1641
- children: e
1642
- }) => (r.useEffect(() => (t.mount(), () => {
1643
- t.unmount();
1644
- }), [t]), /* @__PURE__ */ n.jsx(ys.Provider, { value: t, children: e })), gs = r.createContext(!1), mi = () => r.useContext(gs);
1645
- gs.Provider;
1646
- function yi() {
1647
- let t = !1;
1648
- return {
1649
- clearReset: () => {
1650
- t = !1;
1651
- },
1652
- reset: () => {
1653
- t = !0;
1654
- },
1655
- isReset: () => t
1656
- };
1657
- }
1658
- var gi = r.createContext(yi()), vi = () => r.useContext(gi);
1659
- function vs(t, e) {
1660
- return typeof t == "function" ? t(...e) : !!t;
1661
- }
1662
- function Ci() {
1663
- }
1664
- var xi = (t, e) => {
1665
- (t.suspense || t.throwOnError) && (e.isReset() || (t.retryOnMount = !1));
1666
- }, bi = (t) => {
1667
- r.useEffect(() => {
1668
- t.clearReset();
1669
- }, [t]);
1670
- }, wi = ({
1671
- result: t,
1672
- errorResetBoundary: e,
1673
- throwOnError: s,
1674
- query: i
1675
- }) => t.isError && !e.isReset() && !t.isFetching && i && vs(s, [t.error, i]), ji = (t) => {
1676
- t.suspense && (typeof t.staleTime != "number" && (t.staleTime = 1e3), typeof t.gcTime == "number" && (t.gcTime = Math.max(t.gcTime, 1e3)));
1677
- }, Si = (t, e) => (t == null ? void 0 : t.suspense) && e.isPending, _i = (t, e, s) => e.fetchOptimistic(t).catch(() => {
1678
- s.clearReset();
1679
- });
1680
- function Pi(t, e, s) {
1681
- var p, f, h, y;
1682
- const i = Ee(), a = mi(), c = vi(), l = i.defaultQueryOptions(t);
1683
- (f = (p = i.getDefaultOptions().queries) == null ? void 0 : p._experimental_beforeQuery) == null || f.call(
1684
- p,
1685
- l
1686
- ), l._optimisticResults = a ? "isRestoring" : "optimistic", ji(l), xi(l, c), bi(c);
1687
- const [u] = r.useState(
1688
- () => new e(
1689
- i,
1690
- l
1691
- )
1692
- ), d = u.getOptimisticResult(l);
1693
- if (r.useSyncExternalStore(
1694
- r.useCallback(
1695
- (g) => {
1696
- const _ = a ? () => {
1697
- } : u.subscribe(z.batchCalls(g));
1698
- return u.updateResult(), _;
1699
- },
1700
- [u, a]
1701
- ),
1702
- () => u.getCurrentResult(),
1703
- () => u.getCurrentResult()
1704
- ), r.useEffect(() => {
1705
- u.setOptions(l, { listeners: !1 });
1706
- }, [l, u]), Si(l, d))
1707
- throw _i(l, u, c);
1708
- if (wi({
1709
- result: d,
1710
- errorResetBoundary: c,
1711
- throwOnError: l.throwOnError,
1712
- query: i.getQueryCache().get(l.queryHash)
1713
- }))
1714
- throw d.error;
1715
- return (y = (h = i.getDefaultOptions().queries) == null ? void 0 : h._experimental_afterQuery) == null || y.call(
1716
- h,
1717
- l,
1718
- d
1719
- ), l.notifyOnChangeProps ? d : u.trackResult(d);
1720
- }
1721
- function Cs(t, e) {
1722
- return Pi(t, ui);
1723
- }
1724
- function Ei(t, e) {
1725
- const s = Ee(), [i] = r.useState(
1726
- () => new fi(
1727
- s,
1728
- t
1729
- )
1730
- );
1731
- r.useEffect(() => {
1732
- i.setOptions(t);
1733
- }, [i, t]);
1734
- const a = r.useSyncExternalStore(
1735
- r.useCallback(
1736
- (l) => i.subscribe(z.batchCalls(l)),
1737
- [i]
1738
- ),
1739
- () => i.getCurrentResult(),
1740
- () => i.getCurrentResult()
1741
- ), c = r.useCallback(
1742
- (l, u) => {
1743
- i.mutate(l, u).catch(Ci);
1744
- },
1745
- [i]
1746
- );
1747
- if (a.error && vs(i.options.throwOnError, [a.error]))
1748
- throw a.error;
1749
- return { ...a, mutate: c, mutateAsync: a.mutate };
1750
- }
1751
- function xs(t) {
1752
- var e, s, i = "";
1753
- if (typeof t == "string" || typeof t == "number") i += t;
1754
- else if (typeof t == "object") if (Array.isArray(t)) {
1755
- var a = t.length;
1756
- for (e = 0; e < a; e++) t[e] && (s = xs(t[e])) && (i && (i += " "), i += s);
1757
- } else for (s in t) t[s] && (i && (i += " "), i += s);
1758
- return i;
1759
- }
1760
- function N() {
1761
- for (var t, e, s = 0, i = "", a = arguments.length; s < a; s++) (t = arguments[s]) && (e = xs(t)) && (i && (i += " "), i += e);
1762
- return i;
1763
- }
1764
- var ki = Object.defineProperty, Ai = Object.defineProperties, Ni = Object.getOwnPropertyDescriptors, se = Object.getOwnPropertySymbols, bs = Object.prototype.hasOwnProperty, ws = Object.prototype.propertyIsEnumerable, Qe = (t, e, s) => e in t ? ki(t, e, { enumerable: !0, configurable: !0, writable: !0, value: s }) : t[e] = s, C = (t, e) => {
1765
- for (var s in e || (e = {}))
1766
- bs.call(e, s) && Qe(t, s, e[s]);
1767
- if (se)
1768
- for (var s of se(e))
1769
- ws.call(e, s) && Qe(t, s, e[s]);
1770
- return t;
1771
- }, E = (t, e) => Ai(t, Ni(e)), F = (t, e) => {
1772
- var s = {};
1773
- for (var i in t)
1774
- bs.call(t, i) && e.indexOf(i) < 0 && (s[i] = t[i]);
1775
- if (t != null && se)
1776
- for (var i of se(t))
1777
- e.indexOf(i) < 0 && ws.call(t, i) && (s[i] = t[i]);
1778
- return s;
1779
- };
1780
- function Li(t, e) {
1781
- typeof t == "function" ? t(e) : t != null && (t.current = e);
1782
- }
1783
- function Mi(...t) {
1784
- return (e) => t.forEach((s) => Li(s, e));
1785
- }
1786
- var Fi = r.forwardRef((t, e) => {
1787
- const s = t, { children: i } = s, a = F(s, ["children"]), c = r.Children.toArray(i), l = c.find(Oi);
1788
- if (l) {
1789
- const u = l.props.children, d = c.map((p) => p === l ? r.Children.count(u) > 1 ? r.Children.only(null) : r.isValidElement(u) ? u.props.children : null : p);
1790
- return /* @__PURE__ */ n.jsx(Ce, E(C({}, a), { ref: e, children: r.isValidElement(u) ? r.cloneElement(u, void 0, d) : null }));
1791
- }
1792
- return /* @__PURE__ */ n.jsx(Ce, E(C({}, a), { ref: e, children: i }));
1793
- });
1794
- Fi.displayName = "Slot";
1795
- var Ce = r.forwardRef((t, e) => {
1796
- const s = t, { children: i } = s, a = F(s, ["children"]);
1797
- if (r.isValidElement(i)) {
1798
- const c = Di(i);
1799
- return r.cloneElement(i, E(C({}, zi(a, i.props)), {
1800
- // @ts-ignore
1801
- ref: e ? Mi(e, c) : c
1802
- }));
1803
- }
1804
- return r.Children.count(i) > 1 ? r.Children.only(null) : null;
1805
- });
1806
- Ce.displayName = "SlotClone";
1807
- var Ri = ({ children: t }) => /* @__PURE__ */ n.jsx(n.Fragment, { children: t });
1808
- function Oi(t) {
1809
- return r.isValidElement(t) && t.type === Ri;
1810
- }
1811
- function zi(t, e) {
1812
- const s = C({}, e);
1813
- for (const i in e) {
1814
- const a = t[i], c = e[i];
1815
- /^on[A-Z]/.test(i) ? a && c ? s[i] = (...u) => {
1816
- c(...u), a(...u);
1817
- } : a && (s[i] = a) : i === "style" ? s[i] = C(C({}, a), c) : i === "className" && (s[i] = [a, c].filter(Boolean).join(" "));
1818
- }
1819
- return C(C({}, t), s);
1820
- }
1821
- function Di(t) {
1822
- var e, s;
1823
- let i = (e = Object.getOwnPropertyDescriptor(t.props, "ref")) == null ? void 0 : e.get, a = i && "isReactWarning" in i && i.isReactWarning;
1824
- return a ? t.ref : (i = (s = Object.getOwnPropertyDescriptor(t, "ref")) == null ? void 0 : s.get, a = i && "isReactWarning" in i && i.isReactWarning, a ? t.props.ref : t.props.ref || t.ref);
1825
- }
1826
- var Ti = ({ firstName: t, lastName: e, variant: s = "small" }) => {
1827
- const i = `${t.charAt(0)}${e.charAt(0)}`;
1828
- return /* @__PURE__ */ n.jsx(
1829
- "span",
1830
- {
1831
- className: `avatar avatar--${s}`,
1832
- "aria-label": `${t} ${e}`,
1833
- role: "img",
1834
- children: /* @__PURE__ */ n.jsx("span", { className: "avatar__initials", children: i })
1835
- }
1836
- );
1837
- }, Kt = r.forwardRef(
1838
- (t, e) => {
1839
- var s = t, {
1840
- iconLeft: i,
1841
- iconRight: a,
1842
- isPending: c = !1,
1843
- isFilled: l = !1,
1844
- variant: u,
1845
- className: d,
1846
- children: p
1847
- } = s, f = F(s, [
1848
- "iconLeft",
1849
- "iconRight",
1850
- "isPending",
1851
- "isFilled",
1852
- "variant",
1853
- "className",
1854
- "children"
1855
- ]);
1856
- const h = !!i || !!a;
1857
- return /* @__PURE__ */ n.jsxs(
1858
- "button",
1859
- E(C({
1860
- ref: e
1861
- }, f), {
1862
- className: N(
1863
- "button",
1864
- u && `button--${u}`,
1865
- u && l && `button--${u}--filled`,
1866
- h && "button--with-icon",
1867
- c && "button--pending",
1868
- d
1869
- ),
1870
- children: [
1871
- i && /* @__PURE__ */ n.jsx("div", { className: "button__icon", children: i }),
1872
- !!p && /* @__PURE__ */ n.jsx("span", { className: "button__label", children: p }),
1873
- a && /* @__PURE__ */ n.jsx("div", { className: "button__icon button__icon-right", children: a })
1874
- ]
1875
- })
1876
- );
1877
- }
1878
- );
1879
- Kt.displayName = "Button";
1880
- r.createContext(void 0);
1881
- var Ui = r.forwardRef(
1882
- (t, e) => {
1883
- var s = t, { prefix: i, suffix: a, className: c } = s, l = F(s, ["prefix", "suffix", "className"]);
1884
- return /* @__PURE__ */ n.jsxs("div", { className: "input__wrapper", children: [
1885
- i && /* @__PURE__ */ n.jsx("span", { className: "input__prefix", children: i }),
1886
- /* @__PURE__ */ n.jsx(
1887
- "input",
1888
- C({
1889
- ref: e,
1890
- className: N(
1891
- "input",
1892
- i && "input--with-prefix",
1893
- a && "input--with-suffix",
1894
- c
1895
- )
1896
- }, l)
1897
- ),
1898
- a && /* @__PURE__ */ n.jsx("span", { className: "input__suffix", children: a })
1899
- ] });
1900
- }
1901
- );
1902
- Ui.displayName = "TextField";
1903
- r.createContext(void 0);
1904
- var js = r.createContext(null), Ss = r.createContext(null), ke = () => {
1905
- const t = r.useContext(js);
1906
- if (!t)
1907
- throw new Error("This component must be used inside <NotificationBanner>.");
1908
- return t;
1909
- }, Qi = () => {
1910
- const t = r.useContext(Ss);
1911
- if (!t)
1912
- throw new Error("This component must be used inside <NotificationBanner.Actions>.");
1913
- return t;
1914
- }, _s = (t) => {
1915
- var e = t, {
1916
- variant: s = "info",
1917
- children: i,
1918
- className: a
1919
- } = e, c = F(e, [
1920
- "variant",
1921
- "children",
1922
- "className"
1923
- ]);
1924
- return /* @__PURE__ */ n.jsx(js.Provider, { value: !0, children: /* @__PURE__ */ n.jsx("div", E(C({ className: N("notification-banner", s, a) }, c), { children: i })) });
1925
- };
1926
- _s.displayName = "NotificationBanner";
1927
- var Hi = (t) => {
1928
- var e = t, { children: s, className: i } = e, a = F(e, ["children", "className"]);
1929
- return ke(), /* @__PURE__ */ n.jsx("div", E(C({ className: N("banner-content", i) }, a), { children: s }));
1930
- }, Ki = (t) => {
1931
- var e = t, { children: s, className: i } = e, a = F(e, ["children", "className"]);
1932
- return ke(), /* @__PURE__ */ n.jsx("p", E(C({ className: N("description", i) }, a), { children: s }));
1933
- }, Wi = (t) => {
1934
- var e = t, { children: s, className: i } = e, a = F(e, ["children", "className"]);
1935
- return ke(), /* @__PURE__ */ n.jsx(Ss.Provider, { value: !0, children: /* @__PURE__ */ n.jsx("div", E(C({ className: N("actions", i) }, a), { children: s })) });
1936
- }, Gi = (t) => {
1937
- var e = t, { children: s, className: i } = e, a = F(e, ["children", "className"]);
1938
- return Qi(), /* @__PURE__ */ n.jsx(Kt, E(C({ variant: "icon--secondary", className: i }, a), { children: s }));
1939
- };
1940
- Object.assign(_s, {
1941
- Content: Hi,
1942
- Description: Ki,
1943
- Actions: Wi,
1944
- Button: Gi
1945
- });
1946
- var Vi = ({ children: t }) => /* @__PURE__ */ n.jsx("div", { className: "card__header__action", children: t }), qi = (t) => {
1947
- var e = t, { children: s, className: i } = e, a = F(e, ["children", "className"]);
1948
- return /* @__PURE__ */ n.jsx("div", E(C({ className: N("card__body", i) }, a), { children: s }));
1949
- }, $i = (t) => /* @__PURE__ */ n.jsx(
1950
- "svg",
1951
- E(C({
1952
- width: "24",
1953
- height: "24",
1954
- viewBox: "0 0 24 24",
1955
- fill: "none",
1956
- xmlns: "http://www.w3.org/2000/svg"
1957
- }, t), {
1958
- children: /* @__PURE__ */ n.jsx(
1959
- "path",
1960
- {
1961
- d: "M8 10L12 14L16 10",
1962
- stroke: "currentColor",
1963
- strokeWidth: "1.5",
1964
- strokeLinecap: "round",
1965
- strokeLinejoin: "round"
1966
- }
1967
- )
1968
- })
1969
- ), Ae = $i, Zi = (t) => /* @__PURE__ */ n.jsx(
1970
- "svg",
1971
- E(C({
1972
- width: "24",
1973
- height: "24",
1974
- viewBox: "0 0 24 24",
1975
- fill: "none",
1976
- xmlns: "http://www.w3.org/2000/svg"
1977
- }, t), {
1978
- children: /* @__PURE__ */ n.jsx(
1979
- "path",
1980
- {
1981
- d: "M20 6.5L9 17.5L4 12.5",
1982
- stroke: "currentColor",
1983
- strokeWidth: "1.5",
1984
- strokeLinecap: "round",
1985
- strokeLinejoin: "round"
1986
- }
1987
- )
1988
- })
1989
- ), Xi = Zi, Yi = (t) => /* @__PURE__ */ n.jsx(
1990
- "svg",
1991
- E(C({
1992
- width: "24",
1993
- height: "24",
1994
- viewBox: "0 0 24 24",
1995
- fill: "none",
1996
- xmlns: "http://www.w3.org/2000/svg"
1997
- }, t), {
1998
- children: /* @__PURE__ */ n.jsx(
1999
- "path",
2000
- {
2001
- fillRule: "evenodd",
2002
- clipRule: "evenodd",
2003
- fill: "currentColor",
2004
- d: "M5.53033 4.46967C5.23744 4.17678 4.76256 4.17678 4.46967 4.46967C4.17678 4.76256 4.17678 5.23744 4.46967 5.53033L10.9393 12L4.46967 18.4697C4.17678 18.7626 4.17678 19.2374 4.46967 19.5303C4.76256 19.8232 5.23744 19.8232 5.53033 19.5303L12 13.0607L18.4697 19.5303C18.7626 19.8232 19.2374 19.8232 19.5303 19.5303C19.8232 19.2374 19.8232 18.7626 19.5303 18.4697L13.0607 12L19.5303 5.53033C19.8232 5.23744 19.8232 4.76256 19.5303 4.46967C19.2374 4.17678 18.7626 4.17678 18.4697 4.46967L12 10.9393L5.53033 4.46967Z"
2005
- }
2006
- )
2007
- })
2008
- ), Ji = Yi, Ii = (t) => /* @__PURE__ */ n.jsx(
2009
- "svg",
2010
- E(C({
2011
- width: "24",
2012
- height: "24",
2013
- viewBox: "0 0 24 24",
2014
- fill: "none",
2015
- xmlns: "http://www.w3.org/2000/svg"
2016
- }, t), {
2017
- children: /* @__PURE__ */ n.jsx(
2018
- "path",
2019
- {
2020
- fillRule: "evenodd",
2021
- clipRule: "evenodd",
2022
- d: "M10.25 2.25C9.83579 2.25 9.5 2.58579 9.5 3C9.5 3.41421 9.83579 3.75 10.25 3.75H15.25C16.112 3.75 16.9386 4.09241 17.5481 4.7019C18.1576 5.3114 18.5 6.13805 18.5 7V17C18.5 17.862 18.1576 18.6886 17.5481 19.2981C16.9386 19.9076 16.112 20.25 15.25 20.25H10.25C9.83579 20.25 9.5 20.5858 9.5 21C9.5 21.4142 9.83579 21.75 10.25 21.75H15.25C16.5098 21.75 17.718 21.2496 18.6088 20.3588C19.4996 19.468 20 18.2598 20 17V7C20 5.74022 19.4996 4.53204 18.6088 3.64124C17.718 2.75044 16.5098 2.25 15.25 2.25H10.25ZM9.71967 9.53033C9.42678 9.23744 9.42678 8.76256 9.71967 8.46967C10.0126 8.17678 10.4874 8.17678 10.7803 8.46967L13.7803 11.4697C14.0732 11.7626 14.0732 12.2374 13.7803 12.5303L10.7803 15.5303C10.4874 15.8232 10.0126 15.8232 9.71967 15.5303C9.42678 15.2374 9.42678 14.7626 9.71967 14.4697L11.4393 12.75L4.25 12.75C3.83579 12.75 3.5 12.4142 3.5 12C3.5 11.5858 3.83579 11.25 4.25 11.25L11.4393 11.25L9.71967 9.53033Z",
2023
- fill: "#323232"
2024
- }
2025
- )
2026
- })
2027
- ), Bi = Ii, tr = (t) => /* @__PURE__ */ n.jsx(
2028
- "svg",
2029
- E(C({
2030
- width: "24",
2031
- height: "24",
2032
- viewBox: "0 0 24 24",
2033
- fill: "none",
2034
- xmlns: "http://www.w3.org/2000/svg"
2035
- }, t), {
2036
- children: /* @__PURE__ */ n.jsx(
2037
- "path",
2038
- {
2039
- fillRule: "evenodd",
2040
- clipRule: "evenodd",
2041
- d: "M13.25 2.25C13.6642 2.25 14 2.58579 14 3C14 3.41421 13.6642 3.75 13.25 3.75H8.25C7.38805 3.75 6.5614 4.09241 5.9519 4.7019C5.34241 5.3114 5 6.13805 5 7V17C5 17.862 5.34241 18.6886 5.9519 19.2981C6.5614 19.9076 7.38805 20.25 8.25 20.25H13.25C13.6642 20.25 14 20.5858 14 21C14 21.4142 13.6642 21.75 13.25 21.75H8.25C6.99022 21.75 5.78204 21.2496 4.89124 20.3588C4.00045 19.468 3.5 18.2598 3.5 17V7C3.5 5.74022 4.00045 4.53204 4.89124 3.64124C5.78204 2.75044 6.99022 2.25 8.25 2.25H13.25ZM15.7197 8.46967C16.0126 8.17678 16.4874 8.17678 16.7803 8.46967L19.7803 11.4697C20.0732 11.7626 20.0732 12.2374 19.7803 12.5303L16.7803 15.5303C16.4874 15.8232 16.0126 15.8232 15.7197 15.5303C15.4268 15.2374 15.4268 14.7626 15.7197 14.4697L17.4393 12.75L10.25 12.75C9.83579 12.75 9.5 12.4142 9.5 12C9.5 11.5858 9.83579 11.25 10.25 11.25L17.4393 11.25L15.7197 9.53033C15.4268 9.23744 15.4268 8.76256 15.7197 8.46967Z",
2042
- fill: "currentColor"
2043
- }
2044
- )
2045
- })
2046
- ), er = tr, sr = (t) => /* @__PURE__ */ n.jsxs(
2047
- "svg",
2048
- E(C({
2049
- width: "24",
2050
- height: "24",
2051
- fill: "none",
2052
- viewBox: "0 0 24 24",
2053
- xmlns: "http://www.w3.org/2000/svg"
2054
- }, t), {
2055
- children: [
2056
- /* @__PURE__ */ n.jsxs("g", { clipPath: "url(#clip0_19_444)", children: [
2057
- /* @__PURE__ */ n.jsx(
2058
- "path",
2059
- {
2060
- d: "M17 21H7V21C5.89543 21 5 20.1046 5 19V12V12C5 10.8954 5.89543 10 7 10H17V10C18.1046 10 19 10.8954 19 12V19V19C19 20.1046 18.1046 21 17 21C17 21 17 21 17 21V21Z",
2061
- stroke: "currentColor",
2062
- strokeWidth: "1.5",
2063
- strokeLinecap: "round",
2064
- strokeLinejoin: "round"
2065
- }
2066
- ),
2067
- /* @__PURE__ */ n.jsx("circle", { cx: "10.3", cy: "15.5", r: "0.8", fill: "currentColor" }),
2068
- /* @__PURE__ */ n.jsx("circle", { cx: "13.7", cy: "15.5", r: "0.8", fill: "currentColor" }),
2069
- /* @__PURE__ */ n.jsx(
2070
- "path",
2071
- {
2072
- d: "M8 10V7V7C8 4.79086 9.79086 3 12 3V3C14.2091 3 16 4.79086 16 7V10",
2073
- stroke: "currentColor",
2074
- strokeWidth: "1.5",
2075
- strokeLinecap: "round",
2076
- strokeLinejoin: "round"
2077
- }
2078
- )
2079
- ] }),
2080
- /* @__PURE__ */ n.jsx("defs", { children: /* @__PURE__ */ n.jsx("clipPath", { id: "clip0_19_444", children: /* @__PURE__ */ n.jsx("rect", { width: "24", height: "24", fill: "white" }) }) })
2081
- ]
2082
- })
2083
- ), ir = sr, rr = (t) => /* @__PURE__ */ n.jsxs(
2084
- "svg",
2085
- E(C({
2086
- width: "24",
2087
- height: "24",
2088
- viewBox: "0 0 24 24",
2089
- fill: "none",
2090
- xmlns: "http://www.w3.org/2000/svg"
2091
- }, t), {
2092
- children: [
2093
- /* @__PURE__ */ n.jsx(
2094
- "path",
2095
- {
2096
- d: "M14.4749 4.52513C15.8418 5.89197 15.8418 8.10804 14.4749 9.47488C13.1081 10.8417 10.892 10.8417 9.52516 9.47488C8.15832 8.10804 8.15832 5.89197 9.52516 4.52513C10.892 3.15829 13.1081 3.15829 14.4749 4.52513",
2097
- stroke: "currentColor",
2098
- strokeWidth: "1.5",
2099
- strokeLinecap: "round",
2100
- strokeLinejoin: "round"
2101
- }
2102
- ),
2103
- /* @__PURE__ */ n.jsx(
2104
- "path",
2105
- {
2106
- d: "M4 18.5V19.5C4 20.052 4.448 20.5 5 20.5H19C19.552 20.5 20 20.052 20 19.5V18.5C20 15.474 16.048 13.508 12 13.508C7.952 13.508 4 15.474 4 18.5Z",
2107
- stroke: "currentColor",
2108
- strokeWidth: "1.5",
2109
- strokeLinecap: "round",
2110
- strokeLinejoin: "round"
2111
- }
2112
- )
2113
- ]
2114
- })
2115
- ), nr = rr, ar = (t) => /* @__PURE__ */ n.jsxs(
2116
- "svg",
2117
- E(C({
2118
- width: "24",
2119
- height: "24",
2120
- viewBox: "0 0 24 24",
2121
- fill: "none",
2122
- xmlns: "http://www.w3.org/2000/svg"
2123
- }, t), {
2124
- children: [
2125
- /* @__PURE__ */ n.jsx(
2126
- "path",
2127
- {
2128
- d: "M14.4749 4.52513C15.8418 5.89197 15.8418 8.10804 14.4749 9.47488C13.1081 10.8417 10.892 10.8417 9.52516 9.47488C8.15832 8.10804 8.15832 5.89197 9.52516 4.52513C10.892 3.15829 13.1081 3.15829 14.4749 4.52513",
2129
- stroke: "currentColor",
2130
- strokeWidth: "1.5",
2131
- strokeLinecap: "round",
2132
- strokeLinejoin: "round"
2133
- }
2134
- ),
2135
- /* @__PURE__ */ n.jsx(
2136
- "path",
2137
- {
2138
- d: "M13.5 20.5H10H5C4.448 20.5 4 20.052 4 19.5V18.5C4 15.9788 6.7434 14.1935 10 13.6679C10.6521 13.5627 11.3247 13.508 12 13.508C13.0272 13.508 14.0482 13.6346 15 13.873",
2139
- stroke: "currentColor",
2140
- strokeWidth: "1.5",
2141
- strokeLinecap: "round",
2142
- strokeLinejoin: "round"
2143
- }
2144
- ),
2145
- /* @__PURE__ */ n.jsx(
2146
- "path",
2147
- {
2148
- d: "M17.5 16V18.0164V20",
2149
- stroke: "currentColor",
2150
- strokeWidth: "1.5",
2151
- strokeLinecap: "round",
2152
- strokeLinejoin: "round"
2153
- }
2154
- ),
2155
- /* @__PURE__ */ n.jsx(
2156
- "path",
2157
- {
2158
- d: "M19.5 18L17.4836 18L15.5 18",
2159
- stroke: "currentColor",
2160
- strokeWidth: "1.5",
2161
- strokeLinecap: "round",
2162
- strokeLinejoin: "round"
2163
- }
2164
- )
2165
- ]
2166
- })
2167
- ), or = ar, lr = (t) => {
2168
- var e = t, { className: s } = e, i = F(e, ["className"]);
2169
- return /* @__PURE__ */ n.jsxs(
2170
- "svg",
2171
- E(C({
2172
- width: "20",
2173
- height: "20",
2174
- viewBox: "0 0 20 20",
2175
- fill: "none",
2176
- xmlns: "http://www.w3.org/2000/svg",
2177
- className: N("spinner", s)
2178
- }, i), {
2179
- children: [
2180
- /* @__PURE__ */ n.jsx("circle", { cx: "10", cy: "10", r: "9", stroke: "currentColor", strokeOpacity: "0.2", strokeWidth: "1.5" }),
2181
- /* @__PURE__ */ n.jsx(
2182
- "circle",
2183
- {
2184
- cx: "10",
2185
- cy: "10",
2186
- r: "9",
2187
- stroke: "currentColor",
2188
- strokeWidth: "1.5",
2189
- strokeLinecap: "round",
2190
- strokeDasharray: "42.42 14.14"
2191
- }
2192
- )
2193
- ]
2194
- })
2195
- );
2196
- }, cr = lr, ur = (t) => /* @__PURE__ */ n.jsxs(
2197
- "svg",
2198
- E(C({
2199
- width: "24",
2200
- height: "24",
2201
- fill: "none",
2202
- viewBox: "0 0 24 24",
2203
- xmlns: "http://www.w3.org/2000/svg"
2204
- }, t), {
2205
- children: [
2206
- /* @__PURE__ */ n.jsxs("g", { clipPath: "url(#clip0_762_2934)", children: [
2207
- /* @__PURE__ */ n.jsx(
2208
- "path",
2209
- {
2210
- fillRule: "evenodd",
2211
- clipRule: "evenodd",
2212
- d: "M12.75 8.39996C12.75 7.98575 12.4142 7.64996 12 7.64996C11.5858 7.64996 11.25 7.98575 11.25 8.39996V11.669C11.25 12.0832 11.5858 12.419 12 12.419C12.4142 12.419 12.75 12.0832 12.75 11.669V8.39996ZM12.005 16.35C12.5159 16.35 12.93 15.9359 12.93 15.425C12.93 14.9141 12.5159 14.5 12.005 14.5C11.4942 14.5 11.08 14.9141 11.08 15.425C11.08 15.9359 11.4942 16.35 12.005 16.35Z",
2213
- fill: "currentColor"
2214
- }
2215
- ),
2216
- /* @__PURE__ */ n.jsx(
2217
- "path",
2218
- {
2219
- d: "M12 21C7.029 21 3 16.971 3 12C3 7.029 7.029 3 12 3C16.971 3 21 7.029 21 12C21 16.971 16.971 21 12 21Z",
2220
- stroke: "currentColor",
2221
- strokeWidth: "1.5",
2222
- strokeLinecap: "round",
2223
- strokeLinejoin: "round"
2224
- }
2225
- )
2226
- ] }),
2227
- /* @__PURE__ */ n.jsx("defs", { children: /* @__PURE__ */ n.jsx("clipPath", { id: "clip0_762_2934", children: /* @__PURE__ */ n.jsx("rect", { width: "24", height: "24", fill: "white" }) }) })
2228
- ]
2229
- })
2230
- ), dr = ur, hr = (t) => {
2231
- const e = (s) => `${s}${t.suffix ? `_${t.suffix}` : ""}`;
2232
- return /* @__PURE__ */ n.jsxs(
2233
- "svg",
2234
- E(C({
2235
- width: "24",
2236
- height: "24",
2237
- viewBox: "0 0 24 24",
2238
- fill: "none",
2239
- xmlns: "http://www.w3.org/2000/svg"
2240
- }, t), {
2241
- children: [
2242
- /* @__PURE__ */ n.jsx(
2243
- "path",
2244
- {
2245
- d: "M17.6214 11.1549C20.4161 8.33951 21.712 5.41047 20.6067 3.876C19.1586 1.85988 14.1278 2.98841 9.3766 6.39936C8.31103 7.15864 7.31229 8.00725 6.39122 8.93598L17.6214 11.1549Z",
2246
- fill: e("url(#paint0")
2247
- }
2248
- ),
2249
- /* @__PURE__ */ n.jsx(
2250
- "path",
2251
- {
2252
- opacity: "0.9",
2253
- d: "M17.6214 11.1548C17.1178 9.955 16.5189 8.79735 15.8301 7.693C12.6925 2.58286 8.41126 -0.498612 6.30132 0.794902C4.66377 1.79657 4.80319 5.119 6.39145 8.93562L17.6214 11.1548Z",
2254
- fill: e("url(#paint1")
2255
- }
2256
- ),
2257
- /* @__PURE__ */ n.jsx(
2258
- "path",
2259
- {
2260
- d: "M6.39122 8.93591C6.89474 10.1357 7.49373 11.2934 8.18245 12.3977C11.3329 17.5079 15.6006 20.5894 17.7229 19.2958C19.3616 18.2942 19.221 14.9718 17.6339 11.1549L6.39122 8.93591Z",
2261
- fill: e("url(#paint2")
2262
- }
2263
- ),
2264
- /* @__PURE__ */ n.jsx(
2265
- "path",
2266
- {
2267
- opacity: "0.85",
2268
- d: "M6.39113 8.93591C3.5836 11.7637 2.28796 14.6927 3.39319 16.2272C4.8413 18.2433 9.87186 17.1147 14.6224 13.7038C15.6888 12.9404 16.6916 12.0922 17.6213 11.1677L6.39113 8.93591Z",
2269
- fill: e("url(#paint3")
2270
- }
2271
- ),
2272
- /* @__PURE__ */ n.jsx(
2273
- "path",
2274
- {
2275
- opacity: "0.87",
2276
- d: "M6.39113 8.93591C3.5836 11.7509 2.28796 14.6801 3.39319 16.2272C4.8413 18.2433 9.87186 17.1147 14.6224 13.7038C15.6888 12.9404 16.6916 12.0922 17.6213 11.1677L6.39113 8.93591Z",
2277
- fill: e("url(#paint4")
2278
- }
2279
- ),
2280
- /* @__PURE__ */ n.jsx(
2281
- "path",
2282
- {
2283
- d: "M12.0064 23.2897C16.2652 23.2897 19.7177 22.9093 19.7177 22.4402C19.7177 21.971 16.2652 21.5907 12.0064 21.5907C7.74761 21.5907 4.29517 21.971 4.29517 22.4402C4.29517 22.9093 7.74761 23.2897 12.0064 23.2897Z",
2284
- fill: e("url(#paint5")
2285
- }
2286
- ),
2287
- /* @__PURE__ */ n.jsxs("defs", { children: [
2288
- /* @__PURE__ */ n.jsxs(
2289
- "linearGradient",
2290
- {
2291
- id: e("paint0"),
2292
- x1: "10.6862",
2293
- y1: "11.0225",
2294
- x2: "14.9751",
2295
- y2: "0.707188",
2296
- gradientUnits: "userSpaceOnUse",
2297
- children: [
2298
- /* @__PURE__ */ n.jsx("stop", { offset: "0.413", stopColor: "#90B117" }),
2299
- /* @__PURE__ */ n.jsx("stop", { offset: "0.501", stopColor: "#8BAF19" }),
2300
- /* @__PURE__ */ n.jsx("stop", { offset: "0.601", stopColor: "#7DAB1E" }),
2301
- /* @__PURE__ */ n.jsx("stop", { offset: "0.706", stopColor: "#67A325" }),
2302
- /* @__PURE__ */ n.jsx("stop", { offset: "0.815", stopColor: "#479830" }),
2303
- /* @__PURE__ */ n.jsx("stop", { offset: "0.925", stopColor: "#1F8A3E" }),
2304
- /* @__PURE__ */ n.jsx("stop", { offset: "1", stopColor: "#007F48" })
2305
- ]
2306
- }
2307
- ),
2308
- /* @__PURE__ */ n.jsxs(
2309
- "linearGradient",
2310
- {
2311
- id: e("paint1"),
2312
- x1: "11.5281",
2313
- y1: "8.85339",
2314
- x2: "12.4519",
2315
- y2: "1.60772",
2316
- gradientUnits: "userSpaceOnUse",
2317
- children: [
2318
- /* @__PURE__ */ n.jsx("stop", { offset: "0", stopColor: "#36BCEE" }),
2319
- /* @__PURE__ */ n.jsx("stop", { offset: "0.201", stopColor: "#31ACE3" }),
2320
- /* @__PURE__ */ n.jsx("stop", { offset: "0.59", stopColor: "#2583C5" }),
2321
- /* @__PURE__ */ n.jsx("stop", { offset: "1", stopColor: "#1652A1" })
2322
- ]
2323
- }
2324
- ),
2325
- /* @__PURE__ */ n.jsxs(
2326
- "linearGradient",
2327
- {
2328
- id: e("paint2"),
2329
- x1: "15.0651",
2330
- y1: "18.7384",
2331
- x2: "12.9747",
2332
- y2: "8.0336",
2333
- gradientUnits: "userSpaceOnUse",
2334
- children: [
2335
- /* @__PURE__ */ n.jsx("stop", { offset: "0", stopColor: "#E42313" }),
2336
- /* @__PURE__ */ n.jsx("stop", { offset: "0.071", stopColor: "#E73611" }),
2337
- /* @__PURE__ */ n.jsx("stop", { offset: "0.312", stopColor: "#F0710B" }),
2338
- /* @__PURE__ */ n.jsx("stop", { offset: "0.534", stopColor: "#F6A006" }),
2339
- /* @__PURE__ */ n.jsx("stop", { offset: "0.73", stopColor: "#FBC103" }),
2340
- /* @__PURE__ */ n.jsx("stop", { offset: "0.891", stopColor: "#FED601" }),
2341
- /* @__PURE__ */ n.jsx("stop", { offset: "0.999", stopColor: "#FFDD00" })
2342
- ]
2343
- }
2344
- ),
2345
- /* @__PURE__ */ n.jsxs(
2346
- "linearGradient",
2347
- {
2348
- id: e("paint3"),
2349
- x1: "13.9806",
2350
- y1: "8.29749",
2351
- x2: "10.8203",
2352
- y2: "18.1127",
2353
- gradientUnits: "userSpaceOnUse",
2354
- children: [
2355
- /* @__PURE__ */ n.jsx("stop", { offset: "0", stopColor: "#FFC832" }),
2356
- /* @__PURE__ */ n.jsx("stop", { offset: "0.354", stopColor: "#F8A220" }),
2357
- /* @__PURE__ */ n.jsx("stop", { offset: "0.779", stopColor: "#F07A0D" }),
2358
- /* @__PURE__ */ n.jsx("stop", { offset: "1", stopColor: "#ED6B06" })
2359
- ]
2360
- }
2361
- ),
2362
- /* @__PURE__ */ n.jsxs(
2363
- "linearGradient",
2364
- {
2365
- id: e("paint4"),
2366
- x1: "13.9806",
2367
- y1: "8.2892",
2368
- x2: "10.8212",
2369
- y2: "18.1113",
2370
- gradientUnits: "userSpaceOnUse",
2371
- children: [
2372
- /* @__PURE__ */ n.jsx("stop", { offset: "0.461", stopColor: "#F3C636", stopOpacity: "0" }),
2373
- /* @__PURE__ */ n.jsx("stop", { offset: "0.645", stopColor: "#F1A223", stopOpacity: "0.341" }),
2374
- /* @__PURE__ */ n.jsx("stop", { offset: "0.879", stopColor: "#EE7A0E", stopOpacity: "0.776" }),
2375
- /* @__PURE__ */ n.jsx("stop", { offset: "1", stopColor: "#ED6B06" })
2376
- ]
2377
- }
2378
- ),
2379
- /* @__PURE__ */ n.jsxs(
2380
- "radialGradient",
2381
- {
2382
- id: e("paint5"),
2383
- cx: "0",
2384
- cy: "0",
2385
- r: "1",
2386
- gradientUnits: "userSpaceOnUse",
2387
- gradientTransform: "translate(11.9404 22.4736) scale(7.73227 0.851796)",
2388
- children: [
2389
- /* @__PURE__ */ n.jsx("stop", { offset: "0", stopColor: "#C9C9C9" }),
2390
- /* @__PURE__ */ n.jsx("stop", { offset: "0.302", stopColor: "#CCCCCC", stopOpacity: "0.698" }),
2391
- /* @__PURE__ */ n.jsx("stop", { offset: "0.554", stopColor: "#D7D7D7", stopOpacity: "0.447" }),
2392
- /* @__PURE__ */ n.jsx("stop", { offset: "0.787", stopColor: "#E8E8E8", stopOpacity: "0.212" }),
2393
- /* @__PURE__ */ n.jsx("stop", { offset: "1", stopColor: "white", stopOpacity: "0" })
2394
- ]
2395
- }
2396
- )
2397
- ] })
2398
- ]
2399
- })
2400
- );
2401
- }, Ps = hr, fr = (t) => /* @__PURE__ */ n.jsxs(
2402
- "svg",
2403
- E(C({
2404
- fill: "none",
2405
- xmlns: "http://www.w3.org/2000/svg",
2406
- viewBox: "0 0 24 24",
2407
- width: "24",
2408
- height: "24"
2409
- }, t), {
2410
- children: [
2411
- /* @__PURE__ */ n.jsx(
2412
- "path",
2413
- {
2414
- d: "M16 3H8C5.23858 3 3 5.23858 3 8V16C3 18.7614 5.23858 21 8 21H16C18.7614 21 21 18.7614 21 16V8C21 5.23858 18.7614 3 16 3Z",
2415
- stroke: "currentColor",
2416
- strokeWidth: "1.5",
2417
- strokeLinecap: "round",
2418
- strokeLinejoin: "round"
2419
- }
2420
- ),
2421
- /* @__PURE__ */ n.jsx(
2422
- "path",
2423
- {
2424
- d: "M12.001 11.258C12.001 8.906 13.634 7 15.648 7C16.515 7 17.218 7.703 17.218 8.57C17.218 10.464 14.881 12 11.999 12C9.117 12 6.78 10.465 6.78 8.57C6.78 7.703 7.483 7 8.351 7C10.365 7 11.998 8.906 11.998 11.258",
2425
- stroke: "currentColor",
2426
- strokeWidth: "1.5",
2427
- strokeLinecap: "round",
2428
- strokeLinejoin: "round"
2429
- }
2430
- ),
2431
- /* @__PURE__ */ n.jsx(
2432
- "path",
2433
- {
2434
- d: "M8 15.854C10.208 15.854 11.998 13.764 11.998 11.186L12.002 11.2C12.002 13.778 13.792 15.868 16 15.868",
2435
- stroke: "currentColor",
2436
- strokeWidth: "1.5",
2437
- strokeLinecap: "round",
2438
- strokeLinejoin: "round"
2439
- }
2440
- ),
2441
- /* @__PURE__ */ n.jsx(
2442
- "path",
2443
- {
2444
- d: "M12 3V21",
2445
- stroke: "currentColor",
2446
- strokeWidth: "1.5",
2447
- strokeLinecap: "round",
2448
- strokeLinejoin: "round"
2449
- }
2450
- ),
2451
- /* @__PURE__ */ n.jsx(
2452
- "path",
2453
- {
2454
- d: "M21 12H3",
2455
- stroke: "currentColor",
2456
- strokeWidth: "1.5",
2457
- strokeLinecap: "round",
2458
- strokeLinejoin: "round"
2459
- }
2460
- )
2461
- ]
2462
- })
2463
- ), pr = fr, mr = (t) => /* @__PURE__ */ n.jsx(
2464
- "svg",
2465
- E(C({
2466
- fill: "none",
2467
- xmlns: "http://www.w3.org/2000/svg",
2468
- viewBox: "0 0 21 16",
2469
- width: "21",
2470
- height: "16"
2471
- }, t), {
2472
- children: /* @__PURE__ */ n.jsx(
2473
- "path",
2474
- {
2475
- d: "M1.5 5h18M8.07 9H5.5M16.5 15h-12a3 3 0 0 1-3-3V4a3 3 0 0 1 3-3h12a3 3 0 0 1 3 3v8a3 3 0 0 1-3 3Z",
2476
- stroke: "currentcolor",
2477
- strokeWidth: "1.5",
2478
- strokeLinecap: "round",
2479
- strokeLinejoin: "round"
2480
- }
2481
- )
2482
- })
2483
- ), yr = mr, gr = (t) => /* @__PURE__ */ n.jsxs(
2484
- "svg",
2485
- E(C({
2486
- width: "24",
2487
- height: "24",
2488
- fill: "none",
2489
- xmlns: "http://www.w3.org/2000/svg",
2490
- viewBox: "0 0 24 24"
2491
- }, t), {
2492
- children: [
2493
- /* @__PURE__ */ n.jsx(
2494
- "path",
2495
- {
2496
- d: "M3 3h6v6H3V3ZM2.8 14.8h6v6h-6v-6ZM20.8 8.8h-6v-6h6v6Z",
2497
- strokeWidth: "1.5",
2498
- strokeLinecap: "round",
2499
- strokeLinejoin: "round",
2500
- stroke: "currentColor"
2501
- }
2502
- ),
2503
- /* @__PURE__ */ n.jsx("circle", { r: ".8", transform: "matrix(1 0 0 -1 14.8 14.7)", fill: "currentColor" }),
2504
- /* @__PURE__ */ n.jsx("circle", { r: ".8", transform: "matrix(1 0 0 -1 20.8 14.7)", fill: "currentColor" }),
2505
- /* @__PURE__ */ n.jsx("circle", { r: ".8", transform: "matrix(1 0 0 -1 17.8 17.7)", fill: "currentColor" }),
2506
- /* @__PURE__ */ n.jsx("circle", { r: ".8", transform: "matrix(1 0 0 -1 14.8 20.7)", fill: "currentColor" }),
2507
- /* @__PURE__ */ n.jsx("circle", { r: ".8", transform: "matrix(1 0 0 -1 20.8 20.7)", fill: "currentColor" })
2508
- ]
2509
- })
2510
- ), vr = gr, Cr = (t) => {
2511
- var e = t, {
2512
- variant: s,
2513
- icon: i,
2514
- isStandalone: a,
2515
- title: c,
2516
- description: l,
2517
- className: u
2518
- } = e, d = F(e, [
2519
- "variant",
2520
- "icon",
2521
- "isStandalone",
2522
- "title",
2523
- "description",
2524
- "className"
2525
- ]);
2526
- return /* @__PURE__ */ n.jsx(
2527
- "div",
2528
- E(C({}, d), {
2529
- className: N(
2530
- "card__empty-state",
2531
- s === "error" && "card__empty-state--error",
2532
- a && "card__empty-state--standalone",
2533
- u
2534
- ),
2535
- children: /* @__PURE__ */ n.jsxs("div", { className: "card__empty-state__wrapper", children: [
2536
- /* @__PURE__ */ n.jsx("i", { className: "card__empty-state__icon", "aria-hidden": !0, children: s === "error" ? /* @__PURE__ */ n.jsx(dr, {}) : i }),
2537
- /* @__PURE__ */ n.jsxs("div", { className: "card__empty-state__content", children: [
2538
- /* @__PURE__ */ n.jsx("p", { className: "card__empty-state__title", children: c }),
2539
- /* @__PURE__ */ n.jsx("p", { className: "card__empty-state__description", children: l })
2540
- ] })
2541
- ] })
2542
- })
2543
- );
2544
- }, xr = ({ children: t }) => /* @__PURE__ */ n.jsx("div", { className: "card__footer", children: t }), br = (t) => {
2545
- var e = t, {
2546
- variant: s = "default",
2547
- sticky: i,
2548
- className: a,
2549
- children: c
2550
- } = e, l = F(e, [
2551
- "variant",
2552
- "sticky",
2553
- "className",
2554
- "children"
2555
- ]);
2556
- return /* @__PURE__ */ n.jsx(
2557
- "div",
2558
- E(C({}, l), {
2559
- className: N(
2560
- "card__header",
2561
- s && `card__header--${s}`,
2562
- i && "card__header--sticky",
2563
- a
2564
- ),
2565
- children: c
2566
- })
2567
- );
2568
- }, wr = ({ children: t }) => /* @__PURE__ */ n.jsx("div", { className: "card__image", children: t }), jr = ({ children: t, className: e }) => /* @__PURE__ */ n.jsx("div", { className: N("card__body__item", e), children: t }), Sr = ({ children: t }) => /* @__PURE__ */ n.jsx("div", { className: "card__body__subtitle", children: t }), _r = ({ icon: t, children: e }) => /* @__PURE__ */ n.jsxs("div", { className: "card__header__title", children: [
2569
- t && /* @__PURE__ */ n.jsx("span", { className: "card__header__title__icon", children: t }),
2570
- e
2571
- ] }), Es = r.forwardRef(
2572
- (t, e) => {
2573
- var s = t, { type: i, children: a, className: c, variant: l = "default", disabled: u = !1 } = s, d = F(s, ["type", "children", "className", "variant", "disabled"]);
2574
- return r.createElement(
2575
- i,
2576
- C({
2577
- className: N(
2578
- "card",
2579
- u && "card--disabled",
2580
- l && `card--${l}`,
2581
- c
2582
- ),
2583
- ref: e
2584
- }, d),
2585
- a
2586
- );
2587
- }
2588
- );
2589
- Es.displayName = "Card";
2590
- Object.assign(Es, {
2591
- Header: br,
2592
- Action: Vi,
2593
- Title: _r,
2594
- Subtitle: Sr,
2595
- Body: qi,
2596
- Image: wr,
2597
- Item: jr,
2598
- Footer: xr,
2599
- EmptyState: Cr
2600
- });
2601
- var Pr = (t) => {
2602
- var e = t, { className: s, children: i } = e, a = F(e, ["className", "children"]);
2603
- return /* @__PURE__ */ n.jsx("div", E(C({ className: N("checkbox__content", s) }, a), { children: i }));
2604
- }, Er = (t) => {
2605
- var e = t, { className: s, children: i } = e, a = F(e, ["className", "children"]);
2606
- return /* @__PURE__ */ n.jsx("span", E(C({ className: N("checkbox__hint", s) }, a), { children: i }));
2607
- }, ks = r.createContext(void 0), kr = ({ id: t, name: e, children: s }) => /* @__PURE__ */ n.jsx(ks.Provider, { value: { id: t, name: e }, children: s }), Ar = () => {
2608
- const t = r.useContext(ks);
2609
- if (!t)
2610
- throw new Error("Checkbox compound components can not be rendered outside of Checkbox");
2611
- return t;
2612
- }, Nr = (t) => {
2613
- var e = t, { className: s, children: i } = e, a = F(e, ["className", "children"]);
2614
- const { id: c } = Ar();
2615
- return /* @__PURE__ */ n.jsx("label", E(C({ htmlFor: c, className: N("checkbox__label", s) }, a), { children: i }));
2616
- }, jt = (t) => {
2617
- var e = t, {
2618
- id: s,
2619
- name: i,
2620
- isPending: a = !1,
2621
- variant: c = "neutral",
2622
- hasError: l = !1,
2623
- single: u,
2624
- className: d,
2625
- children: p
2626
- } = e, f = F(e, [
2627
- "id",
2628
- "name",
2629
- "isPending",
2630
- "variant",
2631
- "hasError",
2632
- "single",
2633
- "className",
2634
- "children"
2635
- ]);
2636
- const h = r.useRef(null);
2637
- return r.useEffect(() => {
2638
- h.current && (a ? h.current.indeterminate = !0 : h.current.indeterminate = !1);
2639
- }, [a]), /* @__PURE__ */ n.jsxs(
2640
- "div",
2641
- {
2642
- className: N("checkbox", c && `checkbox--${c}`, l && "checkbox--error"),
2643
- children: [
2644
- /* @__PURE__ */ n.jsx(
2645
- "input",
2646
- C({
2647
- id: s,
2648
- name: i,
2649
- type: "checkbox",
2650
- ref: h,
2651
- className: N("checkbox__input", d),
2652
- value: u ? "true" : ""
2653
- }, f)
2654
- ),
2655
- a ? /* @__PURE__ */ n.jsx(cr, { className: "checkbox__spinner", "aria-hidden": !0 }) : /* @__PURE__ */ n.jsx(Xi, { className: "checkbox__check", "aria-hidden": !0, strokeDasharray: "75" }),
2656
- /* @__PURE__ */ n.jsx(kr, { id: s, name: i, children: p })
2657
- ]
2658
- }
2659
- );
2660
- };
2661
- jt.Content = Pr;
2662
- jt.Label = Nr;
2663
- jt.Hint = Er;
2664
- jt.Error = Error;
2665
- var Lr = (t) => {
2666
- var e = t, { type: s = "div", className: i, children: a } = e, c = F(e, ["type", "className", "children"]);
2667
- return r.createElement(s, C({ className: N("dialog__body", i) }, c), a);
2668
- }, xe = () => document.body.style.removeProperty("overflow"), He = (t) => t.preventDefault(), Mr = 'a[href]:not([disabled]), button:not([disabled]), textarea:not([disabled]), input[type="text"]:not([disabled]), input[type="radio"]:not([disabled]), input[type="checkbox"]:not([disabled]), select:not([disabled])', Fr = (t) => {
2669
- var e = t, { className: s, children: i, shouldAnimate: a = !0 } = e, c = F(e, ["className", "children", "shouldAnimate"]);
2670
- const { ref: l, defaultOpen: u, isModal: d, onClose: p } = Xt();
2671
- return r.useEffect(() => {
2672
- const f = l == null ? void 0 : l.current;
2673
- if (f != null && f.open) {
2674
- const h = f.querySelectorAll(Mr), y = h[0], g = h[h.length - 1], _ = (S) => {
2675
- if (!(S.key === "Tab"))
2676
- return;
2677
- S.shiftKey ? document.activeElement === y && (g.focus(), S.preventDefault()) : document.activeElement === g && (y.focus(), S.preventDefault());
2678
- };
2679
- return document.body.style.overflow = "hidden", f.addEventListener("keydown", _), window.addEventListener("popstate", () => xe()), () => {
2680
- f.removeEventListener("keydown", _), window.removeEventListener("popstate", () => xe());
2681
- };
2682
- }
2683
- }, [l]), r.useEffect(() => {
2684
- const f = l == null ? void 0 : l.current;
2685
- if (!f)
2686
- return;
2687
- if (u && (f.removeAttribute("open"), f.showModal(), f.focus()), d)
2688
- return f.addEventListener("cancel", He), () => f.removeEventListener("cancel", He);
2689
- const h = ({ clientX: y, clientY: g }) => {
2690
- const { top: _, right: S, bottom: P, left: x } = f.getBoundingClientRect(), b = 0 < g && 0 < y, w = _ < g && g < P, M = x < y && y < S;
2691
- b && !(w && M) && p();
2692
- };
2693
- return f.addEventListener("cancel", p), f.addEventListener("mousedown", h), () => {
2694
- f.removeEventListener("cancel", p), f.removeEventListener("mousedown", h);
2695
- };
2696
- }, [l, d, p, u]), /* @__PURE__ */ n.jsx(
2697
- "dialog",
2698
- E(C({
2699
- ref: l,
2700
- open: u,
2701
- "aria-modal": !!d,
2702
- "aria-labelledby": "dialogTitle",
2703
- className: N("dialog", a && "dialog--animated", s)
2704
- }, c), {
2705
- children: i
2706
- })
2707
- );
2708
- }, As = r.createContext(void 0), Rr = ({ defaultOpen: t, onClose: e, isModal: s, children: i }) => {
2709
- const a = r.useRef(null), c = r.useRef(e), l = r.useCallback(() => {
2710
- var u;
2711
- xe(), (u = a.current) == null || u.close(), c.current && (c == null || c.current());
2712
- }, [a]);
2713
- return /* @__PURE__ */ n.jsx(As.Provider, { value: { ref: a, defaultOpen: t, isModal: s, onClose: l }, children: i });
2714
- }, Xt = () => {
2715
- const t = r.useContext(As);
2716
- if (!t)
2717
- throw new Error("Dialog compound components can not be rendered outside of Dialog");
2718
- return t;
2719
- }, Or = (t) => {
2720
- var e = t, { children: s } = e, i = F(e, ["children"]);
2721
- const { onClose: a } = Xt();
2722
- return /* @__PURE__ */ n.jsx(Kt, E(C({ onClick: a }, i), { children: s }));
2723
- }, Ns = r.forwardRef((t, e) => {
2724
- var s = t, { className: i } = s, a = F(s, ["className"]);
2725
- const { onClose: c } = Xt();
2726
- return /* @__PURE__ */ n.jsx(
2727
- Kt,
2728
- C({
2729
- type: "submit",
2730
- ref: e,
2731
- formMethod: "dialog",
2732
- onClick: c,
2733
- iconLeft: /* @__PURE__ */ n.jsx(Ji, {}),
2734
- variant: "icon--secondary",
2735
- className: N("dialog__close button--icon", i)
2736
- }, a)
2737
- );
2738
- });
2739
- Ns.displayName = "Close";
2740
- var zr = (t) => {
2741
- var e = t, { className: s, children: i } = e, a = F(e, ["className", "children"]);
2742
- return /* @__PURE__ */ n.jsx("div", E(C({ className: N("dialog__footer", s) }, a), { children: i }));
2743
- }, Dr = ({ children: t }) => /* @__PURE__ */ n.jsx("div", { className: "dialog__header", children: t }), Tr = (t) => {
2744
- var e = t, { icon: s, children: i, className: a } = e, c = F(e, ["icon", "children", "className"]);
2745
- const { ref: l } = Xt(), u = r.useRef(null);
2746
- return r.useEffect(() => {
2747
- l != null && l.current && l.current.focus();
2748
- }, [l]), /* @__PURE__ */ n.jsxs(
2749
- "div",
2750
- E(C({
2751
- tabIndex: 0,
2752
- ref: u,
2753
- id: "dialogTitle",
2754
- className: N("dialog__header__title", a)
2755
- }, c), {
2756
- children: [
2757
- s && /* @__PURE__ */ n.jsx("span", { className: "dialog__header__icon", children: s }),
2758
- i
2759
- ]
2760
- })
2761
- );
2762
- }, Ur = (t) => {
2763
- var e = t, { children: s } = e, i = F(e, ["children"]);
2764
- const { ref: a } = Xt();
2765
- return /* @__PURE__ */ n.jsx(Kt, E(C({ onClick: () => {
2766
- var c;
2767
- return (c = a == null ? void 0 : a.current) == null ? void 0 : c.showModal();
2768
- } }, i), { children: s }));
2769
- }, K = ({ defaultOpen: t, isModal: e, children: s, onClose: i }) => /* @__PURE__ */ n.jsx(Rr, { defaultOpen: !!t, isModal: e, onClose: i, children: s });
2770
- K.Trigger = Ur;
2771
- K.Root = Fr;
2772
- K.Title = Tr;
2773
- K.Header = Dr;
2774
- K.Body = Lr;
2775
- K.Footer = zr;
2776
- K.Button = Or;
2777
- K.Close = Ns;
2778
- var Ls = r.createContext(void 0), Qr = ({
2779
- id: t,
2780
- position: e,
2781
- isOpen: s,
2782
- setIsOpen: i,
2783
- activeItemIndex: a,
2784
- setActiveItemIndex: c,
2785
- clearActiveItemIndex: l,
2786
- triggerRef: u,
2787
- contentRef: d,
2788
- children: p
2789
- }) => /* @__PURE__ */ n.jsx(
2790
- Ls.Provider,
2791
- {
2792
- value: {
2793
- id: t,
2794
- position: e,
2795
- isOpen: s,
2796
- setIsOpen: i,
2797
- activeItemIndex: a,
2798
- setActiveItemIndex: c,
2799
- clearActiveItemIndex: l,
2800
- triggerRef: u,
2801
- contentRef: d
2802
- },
2803
- children: p
2804
- }
2805
- ), Ms = () => {
2806
- const t = r.useContext(Ls);
2807
- if (t === void 0)
2808
- throw new Error("useMenu must be used within a MenuProvider");
2809
- return t;
2810
- }, Hr = ({ as: t, children: e }) => {
2811
- const {
2812
- id: s,
2813
- position: i,
2814
- isOpen: a,
2815
- setIsOpen: c,
2816
- activeItemIndex: l,
2817
- setActiveItemIndex: u,
2818
- clearActiveItemIndex: d,
2819
- triggerRef: p,
2820
- contentRef: f
2821
- } = Ms(), h = (y) => {
2822
- var g;
2823
- if (!a)
2824
- return;
2825
- if (y.key === "Escape")
2826
- return d(), c(!1), (g = p.current) == null ? void 0 : g.focus();
2827
- const _ = y.shiftKey, S = Rs(f.current).length - 1;
2828
- switch (y.key) {
2829
- case "Tab": {
2830
- if (_ && l !== 0)
2831
- return y.preventDefault(), u(l ? Math.max(0, l - 1) : 0);
2832
- if (!_ && l !== S) {
2833
- y.preventDefault();
2834
- const P = l !== void 0 ? l + 1 : 0;
2835
- return u(Math.min(S, P));
2836
- }
2837
- break;
2838
- }
2839
- case "ArrowUp":
2840
- case "ArrowLeft":
2841
- return y.preventDefault(), u(l ? Math.max(0, l - 1) : 0);
2842
- case "ArrowDown":
2843
- case "ArrowRight": {
2844
- y.preventDefault();
2845
- const P = l !== void 0 ? l + 1 : 0;
2846
- return u(Math.min(S, P));
2847
- }
2848
- case "Home":
2849
- return y.preventDefault(), u(0);
2850
- case "End":
2851
- return y.preventDefault(), u(S);
2852
- }
2853
- };
2854
- return t ? r.createElement(
2855
- t,
2856
- {
2857
- id: `${s}-content`,
2858
- ref: f,
2859
- className: N("menu__list", `menu__list--${i}`, a && "menu__list--active"),
2860
- onKeyDown: h
2861
- },
2862
- e
2863
- ) : (
2864
- // eslint-disable-next-line jsx-a11y/no-noninteractive-element-interactions
2865
- /* @__PURE__ */ n.jsx(
2866
- "ul",
2867
- {
2868
- id: `${s}-content`,
2869
- ref: f,
2870
- className: N("menu__list", `menu__list--${i}`, a && "menu__list--active"),
2871
- onKeyDown: h,
2872
- children: e
2873
- }
2874
- )
2875
- );
2876
- }, Kr = (t) => {
2877
- var e = t, { children: s, className: i } = e, a = F(e, ["children", "className"]);
2878
- return /* @__PURE__ */ n.jsx("li", E(C({}, a), { className: N("menu__list-item", i), children: s }));
2879
- }, Fs = ({ children: t, className: e }) => {
2880
- const { id: s, isOpen: i, setIsOpen: a, clearActiveItemIndex: c, setActiveItemIndex: l, triggerRef: u } = Ms(), d = () => {
2881
- c(), a((f) => !f), i || l(0);
2882
- }, p = (f) => {
2883
- if (i) {
2884
- if (f.key === "Escape")
2885
- return c(), a(!1);
2886
- f.key === "ArrowDown" && (f.preventDefault(), l(0));
2887
- }
2888
- };
2889
- return r.cloneElement(t, {
2890
- id: `${s}-trigger`,
2891
- ref: u,
2892
- className: N("menu__trigger", e),
2893
- onClick: d,
2894
- onKeyDown: p,
2895
- "aria-expanded": i,
2896
- "aria-controls": `${s}-content`
2897
- });
2898
- };
2899
- Fs.displayName = "Trigger";
2900
- var Rs = (t) => t ? t.tagName === "UL" ? t.children : Array.from(t.getElementsByTagName("ul")).reduce((s, i) => [...s, ...Array.from(i.getElementsByTagName("li"))], []) : [], G = (t) => {
2901
- var e = t, { type: s, id: i, position: a = "bottom-end", children: c, className: l } = e, u = F(e, ["type", "id", "position", "children", "className"]);
2902
- const d = r.useRef(null), p = r.useRef(null), f = r.useRef(null), [h, y] = r.useState(!1), [g, _] = r.useState(), [S, P] = r.useState(g);
2903
- g !== S && g !== void 0 && f.current && (Rs(f.current)[g].firstChild.focus(), P(g));
2904
- const x = () => {
2905
- _(void 0), P(void 0);
2906
- }, b = (w) => {
2907
- var M;
2908
- ((M = d.current) == null ? void 0 : M.contains(w.relatedTarget)) || (x(), y(!1));
2909
- };
2910
- return /* @__PURE__ */ n.jsx(
2911
- Qr,
2912
- {
2913
- id: i,
2914
- position: a,
2915
- isOpen: h,
2916
- setIsOpen: y,
2917
- activeItemIndex: g,
2918
- setActiveItemIndex: _,
2919
- clearActiveItemIndex: x,
2920
- triggerRef: p,
2921
- contentRef: f,
2922
- children: r.createElement(
2923
- s,
2924
- E(C({}, u), {
2925
- id: i,
2926
- ref: d,
2927
- className: `menu ${l || ""}`,
2928
- onBlur: b
2929
- }),
2930
- c
2931
- )
2932
- }
2933
- );
2934
- };
2935
- G.Trigger = Fs;
2936
- G.Content = Hr;
2937
- G.Item = Kr;
2938
- r.createContext(void 0);
2939
- var Wr = (/* @__PURE__ */ new Map()).set("BE", "32").set("FR", "33").set("NL", "31").set("LU", "352").set("DE", "49").set("CA", "1").set("PR", "1").set("TC", "1").set("US", "1").set("BS", "1242").set("BB", "1246").set("AI", "1264").set("AG", "1268").set("KY", "1345").set("BM", "1441").set("GD", "1473").set("MS", "1664").set("GU", "1671").set("LC", "1758").set("DM", "1767").set("VC", "1784").set("DO", "1809").set("TT", "1868").set("KN", "1869").set("JM", "1876").set("EG", "20").set("SS", "211").set("MA", "212").set("DZ", "213").set("TN", "216").set("LY", "218").set("GM", "220").set("SN", "221").set("MR", "222").set("ML", "223").set("GN", "224").set("CI", "225").set("BF", "226").set("NE", "227").set("TG", "228").set("BJ", "229").set("MU", "230").set("LR", "231").set("SL", "232").set("GH", "233").set("NG", "234").set("TD", "235").set("CF", "236").set("CM", "237").set("CV", "238").set("ST", "239").set("GQ", "240").set("GA", "241").set("CG", "242").set("CD", "243").set("AO", "244").set("GW", "245").set("SC", "248").set("SD", "249").set("RW", "250").set("ET", "251").set("SO", "252").set("DJ", "253").set("KE", "254").set("TZ", "255").set("UG", "256").set("BI", "257").set("MZ", "258").set("ZM", "260").set("MG", "261").set("RE", "262").set("ZW", "263").set("NA", "264").set("MW", "265").set("LS", "266").set("BW", "267").set("SZ", "268").set("KM", "269").set("ZA", "27").set("VG", "284").set("ER", "291").set("AW", "297").set("FO", "298").set("GL", "299").set("GR", "30").set("ES", "34").set("GI", "350").set("PT", "351").set("IE", "353").set("IS", "354").set("AL", "355").set("MT", "356").set("CY", "357").set("FI", "358").set("BG", "359").set("HU", "36").set("LT", "370").set("LV", "371").set("EE", "372").set("MD", "373").set("AM", "374").set("BY", "375").set("AD", "376").set("MC", "377").set("SM", "378").set("UA", "380").set("RS", "381").set("ME", "382").set("HR", "385").set("SI", "386").set("BA", "387").set("MK", "389").set("IT", "39").set("RO", "40").set("CH", "41").set("CZ", "420").set("SK", "421").set("LI", "423").set("AT", "43").set("GB", "44").set("DK", "45").set("SE", "46").set("NO", "47").set("PL", "48").set("FK", "500").set("BZ", "501").set("GT", "502").set("SV", "503").set("HN", "504").set("NI", "505").set("CR", "506").set("PA", "507").set("PM", "508").set("HT", "509").set("PE", "51").set("MX", "52").set("CU", "53").set("AR", "54").set("BR", "55").set("CL", "56").set("CO", "57").set("VE", "58").set("GP", "590").set("BO", "591").set("GY", "592").set("EC", "593").set("FG", "594").set("PY", "595").set("MQ", "596").set("SR", "597").set("UY", "598").set("CW", "599").set("AN", "599").set("MY", "60").set("AU", "61").set("ID", "62").set("PH", "63").set("NZ", "64").set("SG", "65").set("TH", "66").set("TP", "670").set("BN", "673").set("PG", "675").set("TO", "676").set("SB", "677").set("VU", "678").set("FJ", "679").set("PW", "680").set("CK", "682").set("NU", "683").set("AS", "684").set("WS", "685").set("KI", "686").set("NC", "687").set("TV", "688").set("PF", "689").set("FM", "691").set("KZ", "7").set("RU", "7").set("JP", "81").set("KR", "82").set("VN", "84").set("KP", "850").set("HK", "852").set("MO", "853").set("KH", "855").set("LA", "856").set("CN", "86").set("BD", "880").set("TW", "886").set("TR", "90").set("IN", "91").set("PK", "92").set("AF", "93").set("LK", "94").set("MM", "95").set("MV", "960").set("LB", "961").set("JO", "962").set("SY", "963").set("IQ", "964").set("KW", "965").set("SA", "966").set("YE", "967").set("OM", "968").set("PS", "970").set("AE", "971").set("IL", "972").set("BH", "973").set("QA", "974").set("BT", "975").set("MN", "976").set("NP", "977").set("IR", "98").set("TK", "992").set("TM", "993").set("AZ", "994").set("GE", "995").set("KG", "996").set("UZ", "998");
2940
- [...new Set(Wr.values())].map((t) => ({
2941
- label: `+${t}`,
2942
- value: t
2943
- }));
2944
- r.createContext(void 0);
2945
- r.createContext(void 0);
2946
- var ie = /* @__PURE__ */ ((t) => (t[t.categoriesVegetables = 0] = "categoriesVegetables", t[t.categoriesMeat = 1] = "categoriesMeat", t[t.categoriesFish = 2] = "categoriesFish", t[t.categoriesDairy = 3] = "categoriesDairy", t[t.categoriesBreakfast = 4] = "categoriesBreakfast", t[t.categoriesSnacks = 5] = "categoriesSnacks", t[t.categoriesCandy = 6] = "categoriesCandy", t[t.categoriesNonFood = 7] = "categoriesNonFood", t[t.categoriesDryFood = 8] = "categoriesDryFood", t[t.categoriesTins = 9] = "categoriesTins", t[t.categoriesGrid = 10] = "categoriesGrid", t[t.categoriesSoda = 11] = "categoriesSoda", t[t.categoriesBakery = 12] = "categoriesBakery", t[t.categoriesWine = 13] = "categoriesWine", t[t.categoriesBaby = 14] = "categoriesBaby", t[t.categoriesDiet = 15] = "categoriesDiet", t[t.categoriesHygiene = 16] = "categoriesHygiene", t[t.categoriesCleaning = 17] = "categoriesCleaning", t[t.categoriesPets = 18] = "categoriesPets", t[t.categoriesFreezer = 19] = "categoriesFreezer", t[t.categoriesBbq = 20] = "categoriesBbq", t[t.categoriesMealbox = 21] = "categoriesMealbox", t[t.categoriesBrik = 22] = "categoriesBrik", t[t.categoriesGranen = 23] = "categoriesGranen", t[t.categoriesConserve = 24] = "categoriesConserve", t[t.categoriesHome = 25] = "categoriesHome", t[t.categoriesEaster = 26] = "categoriesEaster", t[t.categoriesOnlinePromo = 27] = "categoriesOnlinePromo", t[t.categoriesSportFood = 28] = "categoriesSportFood", t[t.categoriesClothing = 29] = "categoriesClothing", t[t.categoriesEnergy = 30] = "categoriesEnergy", t[t.categoriesDeskAndTravel = 31] = "categoriesDeskAndTravel", t[t.categoriesCigarette = 32] = "categoriesCigarette", t[t.categoriesFood = 33] = "categoriesFood", t[t.categoriesChild = 34] = "categoriesChild", t[t.categoriesPuzzle = 35] = "categoriesPuzzle", t[t.categoriesToys = 36] = "categoriesToys", t[t.categoriesCar = 37] = "categoriesCar", t[t.categoriesPlaceholder = 38] = "categoriesPlaceholder", t[t.categoriesFuel = 39] = "categoriesFuel", t[t.categoriesCarAndBike = 40] = "categoriesCarAndBike", t[t.categoriesToyAndHobby = 41] = "categoriesToyAndHobby", t[t.categoriesMultimedia = 42] = "categoriesMultimedia", t[t.categoriesParty = 43] = "categoriesParty", t[t.toolsPay = 44] = "toolsPay", t[t.toolsReceipt = 45] = "toolsReceipt", t[t.toolsFuel = 46] = "toolsFuel", t[t.toolsStoreLocator = 47] = "toolsStoreLocator", t[t.toolsStats = 48] = "toolsStats", t[t.toolsShowXtraOld = 49] = "toolsShowXtraOld", t[t.toolsShowXtraNew = 50] = "toolsShowXtraNew", t[t.toolsScan2 = 51] = "toolsScan2", t[t.toolsRecipes2 = 52] = "toolsRecipes2", t[t.toolsWarranty = 53] = "toolsWarranty", t[t.toolsCoupons = 54] = "toolsCoupons", t[t.toolsFavoriteInactive = 55] = "toolsFavoriteInactive", t[t.toolsFavoriteActive = 56] = "toolsFavoriteActive", t[t.toolsAssortment = 57] = "toolsAssortment", t[t.toolsPromo = 58] = "toolsPromo", t[t.fuelCng = 59] = "fuelCng", t[t.fuelE5 = 60] = "fuelE5", t[t.fuelAdblue = 61] = "fuelAdblue", t[t.fuelB7 = 62] = "fuelB7", t[t.fuelH2 = 63] = "fuelH2", t[t.fuelE10 = 64] = "fuelE10", t[t.fuelFreeTireInflation = 65] = "fuelFreeTireInflation", t[t.functionalClose = 66] = "functionalClose", t[t.functionalBack = 67] = "functionalBack", t[t.functionalSearch = 68] = "functionalSearch", t[t.functionalEdit = 69] = "functionalEdit", t[t.functionalShare = 70] = "functionalShare", t[t.functionalLocation = 71] = "functionalLocation", t[t.functionalTrash = 72] = "functionalTrash", t[t.functionalCamera = 73] = "functionalCamera", t[t.functionalPhone = 74] = "functionalPhone", t[t.functionalPushNotifications = 75] = "functionalPushNotifications", t[t.functionalMail = 76] = "functionalMail", t[t.functionalGift = 77] = "functionalGift", t[t.functionalPresent = 78] = "functionalPresent", t[t.functionalLoading = 79] = "functionalLoading", t[t.functionalChevronRight = 80] = "functionalChevronRight", t[t.functionalCheck = 81] = "functionalCheck", t[t.functionalChevronDown = 82] = "functionalChevronDown", t[t.functionalChevronUp = 83] = "functionalChevronUp", t[t.functionalPlus = 84] = "functionalPlus", t[t.functionalReset = 85] = "functionalReset", t[t.functionalDownload = 86] = "functionalDownload", t[t.functionalExport = 87] = "functionalExport", t[t.functionalCustomerService = 88] = "functionalCustomerService", t[t.functionalTruck = 89] = "functionalTruck", t[t.functionalBox = 90] = "functionalBox", t[t.functionalEllipsis = 91] = "functionalEllipsis", t[t.functionalLocationHome = 92] = "functionalLocationHome", t[t.functionalLocationPickup = 93] = "functionalLocationPickup", t[t.functionalAccount = 94] = "functionalAccount", t[t.functionalPrivacy = 95] = "functionalPrivacy", t[t.functionalSettings = 96] = "functionalSettings", t[t.functionalUserInfo = 97] = "functionalUserInfo", t[t.functionalPinOutlines = 98] = "functionalPinOutlines", t[t.functionalCalendar = 99] = "functionalCalendar", t[t.functionalMinus = 100] = "functionalMinus", t[t.functionalLifestyle = 101] = "functionalLifestyle", t[t.functionalSms = 102] = "functionalSms", t[t.functionalSwitch = 103] = "functionalSwitch", t[t.functionalSorting = 104] = "functionalSorting", t[t.functionalWarningCircle = 105] = "functionalWarningCircle", t[t.functionalQuestionCircle = 106] = "functionalQuestionCircle", t[t.functionalErrorCircle = 107] = "functionalErrorCircle", t[t.functionalSuccessCircle = 108] = "functionalSuccessCircle", t[t.functionalMessage = 109] = "functionalMessage", t[t.functionalExternalLink = 110] = "functionalExternalLink", t[t.functionalAddToList = 111] = "functionalAddToList", t[t.functionalShoppingcart = 112] = "functionalShoppingcart", t[t.functionalFilter = 113] = "functionalFilter", t[t.functionalLocate = 114] = "functionalLocate", t[t.functionalBarcode = 115] = "functionalBarcode", t[t.functionalClock = 116] = "functionalClock", t[t.functionalHistory = 117] = "functionalHistory", t[t.functionalShops = 118] = "functionalShops", t[t.functionalAddUser = 119] = "functionalAddUser", t[t.functionalOther = 120] = "functionalOther", t[t.functionalInAppNotifications = 121] = "functionalInAppNotifications", t[t.functionalExit = 122] = "functionalExit", t[t.functionalShared = 123] = "functionalShared", t[t.functionalThumbsup = 124] = "functionalThumbsup", t[t.functionalDiscount = 125] = "functionalDiscount", t[t.functionalPercentage = 126] = "functionalPercentage", t[t.functionalList = 127] = "functionalList", t[t.functionalMapLocation = 128] = "functionalMapLocation", t[t.functionalNoConnection = 129] = "functionalNoConnection", t[t.functionalSwap = 130] = "functionalSwap", t[t.functionalPiece = 131] = "functionalPiece", t[t.functionalWeight = 132] = "functionalWeight", t[t.functionalPack = 133] = "functionalPack", t[t.functionalCommunications = 134] = "functionalCommunications", t[t.functionalDeliveryAddresses = 135] = "functionalDeliveryAddresses", t[t["functional18+"] = 136] = "functional18+", t[t.functionalReadtime = 137] = "functionalReadtime", t[t.functionalCopy = 138] = "functionalCopy", t[t.functionalMessageField = 139] = "functionalMessageField", t[t.functionalNext = 140] = "functionalNext", t[t.functionalSave = 141] = "functionalSave", t[t.functionalLogin = 142] = "functionalLogin", t[t.functionalLogout = 143] = "functionalLogout", t[t.functionalWebsite = 144] = "functionalWebsite", t[t.functionalMenu = 145] = "functionalMenu", t[t.functionalRegister = 146] = "functionalRegister", t[t.functionalNews = 147] = "functionalNews", t[t.functionalTimer = 148] = "functionalTimer", t[t.functionalEyeShow = 149] = "functionalEyeShow", t[t.functionalMobilePay = 150] = "functionalMobilePay", t[t.functionalConnectionCable = 151] = "functionalConnectionCable", t[t.functionalDryCleaning = 152] = "functionalDryCleaning", t[t.functionalKiosk = 153] = "functionalKiosk", t[t.functionalConnectedDevice = 154] = "functionalConnectedDevice", t[t.functionalCookies = 155] = "functionalCookies", t[t.functionalViewFile = 156] = "functionalViewFile", t[t.functionalLastAdded = 157] = "functionalLastAdded", t[t.functionalFirstAdded = 158] = "functionalFirstAdded", t[t.functionalStoreLayout = 159] = "functionalStoreLayout", t[t.functionalBlock = 160] = "functionalBlock", t[t.functionalChecklist = 161] = "functionalChecklist", t[t.functionalCartCheckout = 162] = "functionalCartCheckout", t[t.functionalCartEdit = 163] = "functionalCartEdit", t[t.functionalEyeHidden = 164] = "functionalEyeHidden", t[t.functionalWarningCircleFilled = 165] = "functionalWarningCircleFilled", t[t.functionalQuestionCircleFilled = 166] = "functionalQuestionCircleFilled", t[t.functionalErrorCircleFilled = 167] = "functionalErrorCircleFilled", t[t.functionalSuccessCircleFilled = 168] = "functionalSuccessCircleFilled", t[t.functionalPlusCircle = 169] = "functionalPlusCircle", t[t.functionalSpinner = 170] = "functionalSpinner", t[t.functionalEcoEarth = 171] = "functionalEcoEarth", t[t.functionalAlphaBeta = 172] = "functionalAlphaBeta", t[t.functionalEuro = 173] = "functionalEuro", t[t.functionalNumber = 174] = "functionalNumber", t[t.functionalIdea = 175] = "functionalIdea", t[t.functionalMultifactorAuthenticator = 176] = "functionalMultifactorAuthenticator", t[t.functionalPassword = 177] = "functionalPassword", t[t.functionalDiscountCode = 178] = "functionalDiscountCode", t))(ie || {});
2947
- const Gr = {
2948
- categoriesVegetables: r.lazy(
2949
- () => import("./Categoriesvegetables-8mMcDRwN.js")
2950
- ),
2951
- categoriesMeat: r.lazy(() => import("./Categoriesmeat-D_L_1sCl.js")),
2952
- categoriesFish: r.lazy(() => import("./Categoriesfish-CZD6yTGJ.js")),
2953
- categoriesDairy: r.lazy(() => import("./Categoriesdairy-BsyIRs7f.js")),
2954
- categoriesBreakfast: r.lazy(
2955
- () => import("./Categoriesbreakfast-McuEC33n.js")
2956
- ),
2957
- categoriesSnacks: r.lazy(
2958
- () => import("./Categoriessnacks-CrQiHnlu.js")
2959
- ),
2960
- categoriesCandy: r.lazy(() => import("./Categoriescandy-CvIEyKk2.js")),
2961
- categoriesNonFood: r.lazy(
2962
- () => import("./Categoriesnonfood-Dzi8QtTn.js")
2963
- ),
2964
- categoriesDryFood: r.lazy(
2965
- () => import("./Categoriesdryfood-DrHq_KYI.js")
2966
- ),
2967
- categoriesTins: r.lazy(() => import("./Categoriestins-ecq6AClO.js")),
2968
- categoriesGrid: r.lazy(() => import("./Categoriesgrid-CToiisrK.js")),
2969
- categoriesSoda: r.lazy(() => import("./Categoriessoda-DcgNgr-J.js")),
2970
- categoriesBakery: r.lazy(
2971
- () => import("./Categoriesbakery-B4iUY80P.js")
2972
- ),
2973
- categoriesWine: r.lazy(() => import("./Categorieswine-BE83LNgR.js")),
2974
- categoriesBaby: r.lazy(() => import("./Categoriesbaby-6gF3DXBf.js")),
2975
- categoriesDiet: r.lazy(() => import("./Categoriesdiet-BHIZ3Kgb.js")),
2976
- categoriesHygiene: r.lazy(
2977
- () => import("./Categorieshygiene-Dvcw7s9e.js")
2978
- ),
2979
- categoriesCleaning: r.lazy(
2980
- () => import("./Categoriescleaning-BcWHn0gT.js")
2981
- ),
2982
- categoriesPets: r.lazy(() => import("./Categoriespets-CqJrKBkE.js")),
2983
- categoriesFreezer: r.lazy(
2984
- () => import("./Categoriesfreezer-CrUYLzCA.js")
2985
- ),
2986
- categoriesBbq: r.lazy(() => import("./Categoriesbbq-C60hz1B6.js")),
2987
- categoriesMealbox: r.lazy(
2988
- () => import("./Categoriesmealbox-0yTXZqld.js")
2989
- ),
2990
- categoriesBrik: r.lazy(() => import("./Categoriesbrik-Bs5kZnTr.js")),
2991
- categoriesGranen: r.lazy(
2992
- () => import("./Categoriesgranen-DqTKp-nv.js")
2993
- ),
2994
- categoriesConserve: r.lazy(
2995
- () => import("./Categoriesconserve-BuAfz_u6.js")
2996
- ),
2997
- categoriesHome: r.lazy(() => import("./Categorieshome-ChaNOSrd.js")),
2998
- categoriesEaster: r.lazy(
2999
- () => import("./Categorieseaster-BXUGhAFc.js")
3000
- ),
3001
- categoriesOnlinePromo: r.lazy(
3002
- () => import("./Categoriesonlinepromo-BFfQFe2A.js")
3003
- ),
3004
- categoriesSportFood: r.lazy(
3005
- () => import("./Categoriessportfood-DlMcu1ku.js")
3006
- ),
3007
- categoriesClothing: r.lazy(
3008
- () => import("./Categoriesclothing-DvtWnnns.js")
3009
- ),
3010
- categoriesEnergy: r.lazy(
3011
- () => import("./Categoriesenergy-DS3E97j_.js")
3012
- ),
3013
- categoriesDeskAndTravel: r.lazy(
3014
- () => import("./Categoriesdeskandtravel-3Ma6spBz.js")
3015
- ),
3016
- categoriesCigarette: r.lazy(
3017
- () => import("./Categoriescigarette-DiN_VowE.js")
3018
- ),
3019
- categoriesFood: r.lazy(() => import("./Categoriesfood-D4AviGEb.js")),
3020
- categoriesChild: r.lazy(() => import("./Categorieschild-DfnPlnAk.js")),
3021
- categoriesPuzzle: r.lazy(
3022
- () => import("./Categoriespuzzle-BNAWvQ5P.js")
3023
- ),
3024
- categoriesToys: r.lazy(() => import("./Categoriestoys-ZzMr5vFM.js")),
3025
- categoriesCar: r.lazy(() => import("./Categoriescar-BFSyhAg7.js")),
3026
- categoriesPlaceholder: r.lazy(
3027
- () => import("./Categoriesplaceholder-BJCkzQ5s.js")
3028
- ),
3029
- categoriesFuel: r.lazy(() => import("./Categoriesfuel-jdRBMmOs.js")),
3030
- categoriesCarAndBike: r.lazy(
3031
- () => import("./Categoriescarandbike-BC-qjZEw.js")
3032
- ),
3033
- categoriesToyAndHobby: r.lazy(
3034
- () => import("./Categoriestoyandhobby-DeZHNqpy.js")
3035
- ),
3036
- categoriesMultimedia: r.lazy(
3037
- () => import("./Categoriesmultimedia-B2RWUc8C.js")
3038
- ),
3039
- categoriesParty: r.lazy(() => import("./Categoriesparty-CJw_7b1v.js")),
3040
- toolsPay: r.lazy(() => import("./Toolspay-ZXhAd7K_.js")),
3041
- toolsReceipt: r.lazy(() => import("./Toolsreceipt-CrW8gXK1.js")),
3042
- toolsFuel: r.lazy(() => import("./Toolsfuel-CqliNTWm.js")),
3043
- toolsStoreLocator: r.lazy(
3044
- () => import("./Toolsstorelocator-XZLY-WUr.js")
3045
- ),
3046
- toolsStats: r.lazy(() => import("./Toolsstats-Dtv_ZM-M.js")),
3047
- toolsShowXtraOld: r.lazy(
3048
- () => import("./Toolsshowxtraold-Bpe1vUEO.js")
3049
- ),
3050
- toolsShowXtraNew: r.lazy(
3051
- () => import("./Toolsshowxtranew-_Kw-qduq.js")
3052
- ),
3053
- toolsScan2: r.lazy(() => import("./Toolsscan2-DD9hHYFt.js")),
3054
- toolsRecipes2: r.lazy(() => import("./Toolsrecipes2-DSdaXaKA.js")),
3055
- toolsWarranty: r.lazy(() => import("./Toolswarranty-NuK8UHnp.js")),
3056
- toolsCoupons: r.lazy(() => import("./Toolscoupons-C8i6vSE4.js")),
3057
- toolsFavoriteInactive: r.lazy(
3058
- () => import("./Toolsfavoriteinactive-CqySbCkL.js")
3059
- ),
3060
- toolsFavoriteActive: r.lazy(
3061
- () => import("./Toolsfavoriteactive-cMr_AE15.js")
3062
- ),
3063
- toolsAssortment: r.lazy(() => import("./Toolsassortment-BtLzzkAU.js")),
3064
- toolsPromo: r.lazy(() => import("./Toolspromo-DEvIy8bU.js")),
3065
- fuelCng: r.lazy(() => import("./Fuelcng-Az_ywsP8.js")),
3066
- fuelE5: r.lazy(() => import("./Fuele5-QGU89IeO.js")),
3067
- fuelAdblue: r.lazy(() => import("./Fueladblue-DgF7eSdv.js")),
3068
- fuelB7: r.lazy(() => import("./Fuelb7-ssb0PBMa.js")),
3069
- fuelH2: r.lazy(() => import("./Fuelh2-DCPx9cPO.js")),
3070
- fuelE10: r.lazy(() => import("./Fuele10-D8XKR8z4.js")),
3071
- fuelFreeTireInflation: r.lazy(
3072
- () => import("./Fuelfreetireinflation-DzwK-yJ9.js")
3073
- ),
3074
- functionalClose: r.lazy(() => import("./Functionalclose-Czu5y0kT.js")),
3075
- functionalBack: r.lazy(() => import("./Functionalback-COMzeVd_.js")),
3076
- functionalSearch: r.lazy(
3077
- () => import("./Functionalsearch-CuSu11ka.js")
3078
- ),
3079
- functionalEdit: r.lazy(() => import("./Functionaledit-Dqmrlxwr.js")),
3080
- functionalShare: r.lazy(() => import("./Functionalshare-DG0vBDyj.js")),
3081
- functionalLocation: r.lazy(
3082
- () => import("./Functionallocation-BTCWubMD.js")
3083
- ),
3084
- functionalTrash: r.lazy(() => import("./Functionaltrash-BTNnQrPB.js")),
3085
- functionalCamera: r.lazy(
3086
- () => import("./Functionalcamera-D6xwt5Su.js")
3087
- ),
3088
- functionalPhone: r.lazy(() => import("./Functionalphone-BvGYeO1i.js")),
3089
- functionalPushNotifications: r.lazy(
3090
- () => import("./Functionalpushnotifications-BKrcqzLo.js")
3091
- ),
3092
- functionalMail: r.lazy(() => import("./Functionalmail-UIG4onuq.js")),
3093
- functionalGift: r.lazy(() => import("./Functionalgift-DV2dqp9h.js")),
3094
- functionalPresent: r.lazy(
3095
- () => import("./Functionalpresent-DYg0lQyl.js")
3096
- ),
3097
- functionalLoading: r.lazy(
3098
- () => import("./Functionalloading-CLCA1Ty6.js")
3099
- ),
3100
- functionalChevronRight: r.lazy(
3101
- () => import("./Functionalchevronright-BZN3r3ja.js")
3102
- ),
3103
- functionalCheck: r.lazy(() => import("./Functionalcheck-CLaFutOl.js")),
3104
- functionalChevronDown: r.lazy(
3105
- () => import("./Functionalchevrondown-Dfv-W7AD.js")
3106
- ),
3107
- functionalChevronUp: r.lazy(
3108
- () => import("./Functionalchevronup-nTJQr1M_.js")
3109
- ),
3110
- functionalPlus: r.lazy(() => import("./Functionalplus-B0HvjzCe.js")),
3111
- functionalReset: r.lazy(() => import("./Functionalreset-Bts1-_62.js")),
3112
- functionalDownload: r.lazy(
3113
- () => import("./Functionaldownload-DhkbhqEd.js")
3114
- ),
3115
- functionalExport: r.lazy(
3116
- () => import("./Functionalexport-CAuNRHg4.js")
3117
- ),
3118
- functionalCustomerService: r.lazy(
3119
- () => import("./Functionalcustomerservice-RFWDZ7Ej.js")
3120
- ),
3121
- functionalTruck: r.lazy(() => import("./Functionaltruck-Bg3jasc7.js")),
3122
- functionalBox: r.lazy(() => import("./Functionalbox-CYM-NUPV.js")),
3123
- functionalEllipsis: r.lazy(
3124
- () => import("./Functionalellipsis-edOp38LE.js")
3125
- ),
3126
- functionalLocationHome: r.lazy(
3127
- () => import("./Functionallocationhome-BExIISsd.js")
3128
- ),
3129
- functionalLocationPickup: r.lazy(
3130
- () => import("./Functionallocationpickup-1yLy_tNQ.js")
3131
- ),
3132
- functionalAccount: r.lazy(
3133
- () => import("./Functionalaccount-DLCejSD5.js")
3134
- ),
3135
- functionalPrivacy: r.lazy(
3136
- () => import("./Functionalprivacy-Cdd8t2K8.js")
3137
- ),
3138
- functionalSettings: r.lazy(
3139
- () => import("./Functionalsettings-zrAXduAm.js")
3140
- ),
3141
- functionalUserInfo: r.lazy(
3142
- () => import("./Functionaluserinfo-Bj7l8gNz.js")
3143
- ),
3144
- functionalPinOutlines: r.lazy(
3145
- () => import("./Functionalpinoutlines-Dx_8CxcE.js")
3146
- ),
3147
- functionalCalendar: r.lazy(
3148
- () => import("./Functionalcalendar-1Yek0iwu.js")
3149
- ),
3150
- functionalMinus: r.lazy(() => import("./Functionalminus-CQ4YuBKD.js")),
3151
- functionalLifestyle: r.lazy(
3152
- () => import("./Functionallifestyle-6yUl3Tnf.js")
3153
- ),
3154
- functionalSms: r.lazy(() => import("./Functionalsms-BSdbXJK1.js")),
3155
- functionalSwitch: r.lazy(
3156
- () => import("./Functionalswitch-CoAr-Auv.js")
3157
- ),
3158
- functionalSorting: r.lazy(
3159
- () => import("./Functionalsorting-D19SFJJl.js")
3160
- ),
3161
- functionalWarningCircle: r.lazy(
3162
- () => import("./Functionalwarningcircle-Bgvilbe7.js")
3163
- ),
3164
- functionalQuestionCircle: r.lazy(
3165
- () => import("./Functionalquestioncircle-rNemzaR5.js")
3166
- ),
3167
- functionalErrorCircle: r.lazy(
3168
- () => import("./Functionalerrorcircle-Duns6fLN.js")
3169
- ),
3170
- functionalSuccessCircle: r.lazy(
3171
- () => import("./Functionalsuccesscircle-CxAqWTjs.js")
3172
- ),
3173
- functionalMessage: r.lazy(
3174
- () => import("./Functionalmessage-DCPC1-Cl.js")
3175
- ),
3176
- functionalExternalLink: r.lazy(
3177
- () => import("./Functionalexternallink-Br_t3uLC.js")
3178
- ),
3179
- functionalAddToList: r.lazy(
3180
- () => import("./Functionaladdtolist-C6_sJNlg.js")
3181
- ),
3182
- functionalShoppingcart: r.lazy(
3183
- () => import("./Functionalshoppingcart-DufNpCYd.js")
3184
- ),
3185
- functionalFilter: r.lazy(
3186
- () => import("./Functionalfilter-DxpZVrcp.js")
3187
- ),
3188
- functionalLocate: r.lazy(
3189
- () => import("./Functionallocate-Bmq6Zl7E.js")
3190
- ),
3191
- functionalBarcode: r.lazy(
3192
- () => import("./Functionalbarcode-BjA_xusN.js")
3193
- ),
3194
- functionalClock: r.lazy(() => import("./Functionalclock-DbHYKN7u.js")),
3195
- functionalHistory: r.lazy(
3196
- () => import("./Functionalhistory-B5uZ6bZd.js")
3197
- ),
3198
- functionalShops: r.lazy(() => import("./Functionalshops-CZJtxMdY.js")),
3199
- functionalAddUser: r.lazy(
3200
- () => import("./Functionaladduser-CvfxOGqu.js")
3201
- ),
3202
- functionalOther: r.lazy(() => import("./Functionalother-CSvu-HRC.js")),
3203
- functionalInAppNotifications: r.lazy(
3204
- () => import("./Functionalinappnotifications-BEN5GrO0.js")
3205
- ),
3206
- functionalExit: r.lazy(() => import("./Functionalexit-BJ5rcdWd.js")),
3207
- functionalShared: r.lazy(
3208
- () => import("./Functionalshared-C8cH9dC3.js")
3209
- ),
3210
- functionalThumbsup: r.lazy(
3211
- () => import("./Functionalthumbsup-CKHNazgH.js")
3212
- ),
3213
- functionalDiscount: r.lazy(
3214
- () => import("./Functionaldiscount-B0UiDwC2.js")
3215
- ),
3216
- functionalPercentage: r.lazy(
3217
- () => import("./Functionalpercentage-BQB5lrGQ.js")
3218
- ),
3219
- functionalList: r.lazy(() => import("./Functionallist-CGb3i4CE.js")),
3220
- functionalMapLocation: r.lazy(
3221
- () => import("./Functionalmaplocation-Dcaiv5uy.js")
3222
- ),
3223
- functionalNoConnection: r.lazy(
3224
- () => import("./Functionalnoconnection-BGIfdWes.js")
3225
- ),
3226
- functionalSwap: r.lazy(() => import("./Functionalswap-BlmqNeM4.js")),
3227
- functionalPiece: r.lazy(() => import("./Functionalpiece-Ciy3LwP5.js")),
3228
- functionalWeight: r.lazy(
3229
- () => import("./Functionalweight-C1gXKnfC.js")
3230
- ),
3231
- functionalPack: r.lazy(() => import("./Functionalpack-BjDhhBqo.js")),
3232
- functionalCommunications: r.lazy(
3233
- () => import("./Functionalcommunications-BujOX55Z.js")
3234
- ),
3235
- functionalDeliveryAddresses: r.lazy(
3236
- () => import("./Functionaldeliveryaddresses-BiZKm5Oc.js")
3237
- ),
3238
- "functional18+": r.lazy(
3239
- () => import("./Functional18plus-Dvom6nYd.js")
3240
- ),
3241
- functionalReadtime: r.lazy(
3242
- () => import("./Functionalreadtime-wsF46-i_.js")
3243
- ),
3244
- functionalCopy: r.lazy(() => import("./Functionalcopy-BsYv5M7H.js")),
3245
- functionalMessageField: r.lazy(
3246
- () => import("./Functionalmessagefield-Bxj-GEk3.js")
3247
- ),
3248
- functionalNext: r.lazy(() => import("./Functionalnext-bZeZA0uQ.js")),
3249
- functionalSave: r.lazy(() => import("./Functionalsave-DGCejc8P.js")),
3250
- functionalLogin: r.lazy(() => import("./Functionallogin-BJIwdZrh.js")),
3251
- functionalLogout: r.lazy(
3252
- () => import("./Functionallogout-CMzB_AvT.js")
3253
- ),
3254
- functionalWebsite: r.lazy(
3255
- () => import("./Functionalwebsite-CYIibHir.js")
3256
- ),
3257
- functionalMenu: r.lazy(() => import("./Functionalmenu-BGjUX1J1.js")),
3258
- functionalRegister: r.lazy(
3259
- () => import("./Functionalregister-BBLcOqyZ.js")
3260
- ),
3261
- functionalNews: r.lazy(() => import("./Functionalnews-DZull_Hm.js")),
3262
- functionalTimer: r.lazy(() => import("./Functionaltimer-89ilQQ9r.js")),
3263
- functionalEyeShow: r.lazy(
3264
- () => import("./Functionaleyeshow-eos8CLvD.js")
3265
- ),
3266
- functionalMobilePay: r.lazy(
3267
- () => import("./Functionalmobilepay-9wGb23yW.js")
3268
- ),
3269
- functionalConnectionCable: r.lazy(
3270
- () => import("./Functionalconnectioncable-O0b0AzV4.js")
3271
- ),
3272
- functionalDryCleaning: r.lazy(
3273
- () => import("./Functionaldrycleaning-DIn5LZSp.js")
3274
- ),
3275
- functionalKiosk: r.lazy(() => import("./Functionalkiosk-m4D0a7Kq.js")),
3276
- functionalConnectedDevice: r.lazy(
3277
- () => import("./Functionalconnecteddevice-CEDF8kk_.js")
3278
- ),
3279
- functionalCookies: r.lazy(
3280
- () => import("./Functionalcookies-B2EQmcrt.js")
3281
- ),
3282
- functionalViewFile: r.lazy(
3283
- () => import("./Functionalviewfile-CUbdG9e0.js")
3284
- ),
3285
- functionalLastAdded: r.lazy(
3286
- () => import("./Functionallastadded-CgxjxrvF.js")
3287
- ),
3288
- functionalFirstAdded: r.lazy(
3289
- () => import("./Functionalfirstadded-BbvyfBZP.js")
3290
- ),
3291
- functionalStoreLayout: r.lazy(
3292
- () => import("./Functionalstorelayout-BQ8PvUFs.js")
3293
- ),
3294
- functionalBlock: r.lazy(() => import("./Functionalblock-C0dpftUf.js")),
3295
- functionalChecklist: r.lazy(
3296
- () => import("./Functionalchecklist-BH7UVdkF.js")
3297
- ),
3298
- functionalCartCheckout: r.lazy(
3299
- () => import("./Functionalcartcheckout-3hdAu2bG.js")
3300
- ),
3301
- functionalCartEdit: r.lazy(
3302
- () => import("./Functionalcartedit-C-oIAz-E.js")
3303
- ),
3304
- functionalEyeHidden: r.lazy(
3305
- () => import("./Functionaleyehidden-zfHSwL3r.js")
3306
- ),
3307
- functionalWarningCircleFilled: r.lazy(
3308
- () => import("./Functionalwarningcirclefilled-Z1H0b9yz.js")
3309
- ),
3310
- functionalQuestionCircleFilled: r.lazy(
3311
- () => import("./Functionalquestioncirclefilled-yHK8TsUi.js")
3312
- ),
3313
- functionalErrorCircleFilled: r.lazy(
3314
- () => import("./Functionalerrorcirclefilled-DY9HqOtf.js")
3315
- ),
3316
- functionalSuccessCircleFilled: r.lazy(
3317
- () => import("./Functionalsuccesscirclefilled-DWsc_fVH.js")
3318
- ),
3319
- functionalPlusCircle: r.lazy(
3320
- () => import("./Functionalpluscircle-BdWTDoq2.js")
3321
- ),
3322
- functionalSpinner: r.lazy(
3323
- () => import("./Functionalspinner-Da77gyjA.js")
3324
- ),
3325
- functionalEcoEarth: r.lazy(
3326
- () => import("./Functionalecoearth-DiHUFvUX.js")
3327
- ),
3328
- functionalAlphaBeta: r.lazy(
3329
- () => import("./Functionalalphabeta-BVJAMnLO.js")
3330
- ),
3331
- functionalEuro: r.lazy(() => import("./Functionaleuro-DpKvF4Va.js")),
3332
- functionalNumber: r.lazy(
3333
- () => import("./Functionalnumber-CL2VFFdH.js")
3334
- ),
3335
- functionalIdea: r.lazy(() => import("./Functionalidea-B9cYbekX.js")),
3336
- functionalMultifactorAuthenticator: r.lazy(
3337
- () => import("./Functionalmultifactorauthenticator-C5SDLhfX.js")
3338
- ),
3339
- functionalPassword: r.lazy(
3340
- () => import("./Functionalpassword-DRLSXw1c.js")
3341
- ),
3342
- functionalDiscountCode: r.lazy(
3343
- () => import("./Functionaldiscountcode-BOxSaP9t.js")
3344
- )
3345
- }, Vr = ({
3346
- bouIconId: t,
3347
- ...e
3348
- }) => {
3349
- const s = ie[t], i = Gr[s];
3350
- return i ? /* @__PURE__ */ n.jsx(r.Suspense, { fallback: /* @__PURE__ */ n.jsx("div", { children: "..." }), children: /* @__PURE__ */ n.jsx(i, { width: "24", height: "24", ...e, fill: "none", ref: void 0 }) }) : null;
3351
- }, be = (t) => typeof t.icon == "string" && t.icon in ie ? /* @__PURE__ */ n.jsx(Vr, { bouIconId: ie[t.icon] }) : t.icon, qr = ({
3352
- label: t,
3353
- className: e,
3354
- onClick: s,
3355
- icon: i
3356
- }) => /* @__PURE__ */ n.jsx(G.Item, { className: e, children: /* @__PURE__ */ n.jsxs("button", { onClick: s, children: [
3357
- /* @__PURE__ */ n.jsx(be, { icon: i }),
3358
- t
3359
- ] }) }), _t = (t) => {
3360
- const e = Gs(), { className: s, label: i, mobileUrl: a, desktopUrl: c, icon: l } = t;
3361
- return /* @__PURE__ */ n.jsxs(G.Item, { className: s, children: [
3362
- (!e || e && !c) && /* @__PURE__ */ n.jsxs("a", { href: a, referrerPolicy: "no-referrer-when-downgrade", children: [
3363
- /* @__PURE__ */ n.jsx(be, { icon: l }),
3364
- i
3365
- ] }),
3366
- !!c && /* @__PURE__ */ n.jsxs("a", { href: c, referrerPolicy: "no-referrer-when-downgrade", children: [
3367
- /* @__PURE__ */ n.jsx(be, { icon: l }),
3368
- i
3369
- ] })
3370
- ] });
3371
- }, Os = r.createContext(void 0), $r = ({ apiUrl: t, authUrl: e, country: s, redirectUrl: i, bouHeaders: a, children: c }) => /* @__PURE__ */ n.jsx(Os.Provider, { value: { apiUrl: t, authUrl: e, country: s, redirectUrl: i, bouHeaders: a }, children: c }), St = () => {
3372
- const t = r.useContext(Os);
3373
- if (!t)
3374
- throw new Error("Api context can not be rendered outside of Api");
3375
- return t;
3376
- }, zs = r.createContext(void 0), Zr = ({ position: t, bouMenuItems: e, menuItemsToHide: s, children: i }) => /* @__PURE__ */ n.jsx(zs.Provider, { value: { position: t, bouMenuItems: e, menuItemsToHide: s }, children: i }), Ds = () => {
3377
- const t = r.useContext(zs);
3378
- if (!t)
3379
- throw new Error("Authentication context can not be rendered outside of Authentication");
3380
- return t;
3381
- }, Ts = ({ authUrl: t, redirectUrl: e, trackingInfo: s }) => {
3382
- const i = new URLSearchParams({ redirectUrl: e });
3383
- s && i.append("trackingInfo", s);
3384
- const a = `${t}/login?${i.toString()}`, c = `${t}/logout?${i.toString()}`;
3385
- return { loginUrl: a, logoutUrl: c };
3386
- }, re = () => {
3387
- const { authUrl: t, redirectUrl: e } = St(), s = Vs();
3388
- return Ts({ authUrl: t, redirectUrl: e, trackingInfo: s });
3389
- }, Xr = () => {
3390
- const { apiUrl: t } = St();
3391
- return `${`${t}/xtra`}/authentication/v1/user/profile`;
3392
- }, Ke = (t) => t ? `+${t.countryCode} ${t.number}` : "", We = (t, e) => e == null ? void 0 : e.find((s) => s.type === t), Ge = ({ apiUrl: t, redirectUrl: e }) => {
3393
- const { loginUrl: s } = Ts({ authUrl: t, redirectUrl: e });
3394
- window.location.replace(s);
3395
- }, Ve = (t) => {
3396
- var c;
3397
- if (!t)
3398
- return { user: { state: () => "NotAuthenticated" }, tryToLogon: Ge };
3399
- const e = new Date(t.dateOfBirth), s = We(Le.Mobile, t.phone), i = We(Le.Fixed, t.phone), a = Ke(s) ?? Ke(i) ?? "";
3400
- return {
3401
- user: {
3402
- ...(c = window.XTRA) == null ? void 0 : c.user,
3403
- firstName: () => t.firstName,
3404
- lastName: () => t.lastName,
3405
- dob: () => e.getDate(),
3406
- mob: () => e.getMonth() + 1,
3407
- yob: () => e.getFullYear(),
3408
- gender: () => t.genderCode,
3409
- phone: () => a,
3410
- streetName: () => {
3411
- var l;
3412
- return (l = t.address) == null ? void 0 : l.streetName;
3413
- },
3414
- houseNr: () => {
3415
- var l;
3416
- return (l = t.address) == null ? void 0 : l.houseNumber;
3417
- },
3418
- box: () => {
3419
- var l;
3420
- return (l = t.address) == null ? void 0 : l.letterBoxName;
3421
- },
3422
- zip: () => {
3423
- var l;
3424
- return (l = t.address) == null ? void 0 : l.postalCode;
3425
- },
3426
- city: () => {
3427
- var l;
3428
- return (l = t.address) == null ? void 0 : l.locationName;
3429
- },
3430
- country: () => {
3431
- var l;
3432
- return (l = t.address) == null ? void 0 : l.countryCode;
3433
- },
3434
- email: () => t.email,
3435
- cbh: () => t.customerIdentifier,
3436
- state: () => "Authenticated"
3437
- },
3438
- tryToLogon: Ge
3439
- };
3440
- }, Us = ["profile"], Qs = () => {
3441
- const { i18n: t } = pt(), { country: e, bouHeaders: s } = St(), i = Xr(), a = sessionStorage.getItem("profile"), c = !!a;
3442
- return Cs({
3443
- queryKey: Us,
3444
- queryFn: async () => {
3445
- const u = je(t.language, e), d = await fetch(i, {
3446
- credentials: "include",
3447
- mode: "cors",
3448
- headers: { "Accept-Language": u, ...s }
3449
- });
3450
- if (!d.ok) {
3451
- if (d.status === 401)
3452
- return window.XTRA = { ...window.XTRA, ...Ve() }, window.postMessage(
3453
- { source: "xtra-authentication", isAuthenticated: !1 },
3454
- new URL(window.location.href).origin
3455
- ), sessionStorage.removeItem("profile"), { authenticationStatus: "NotAuthenticated" };
3456
- if (c)
3457
- return { authenticationStatus: "Authenticated", profile: JSON.parse(a) };
3458
- throw new Error("Failed to retrieve profile");
3459
- }
3460
- const p = await d.json(), { firstName: f, lastName: h } = p;
3461
- return sessionStorage.setItem("profile", JSON.stringify({ firstName: f, lastName: h })), window.postMessage(
3462
- { source: "xtra-authentication", isAuthenticated: !0 },
3463
- new URL(window.location.href).origin
3464
- ), window.XTRA = { ...window.XTRA, ...Ve(p) }, {
3465
- authenticationStatus: "Authenticated",
3466
- profile: { firstName: p.firstName, lastName: p.lastName }
3467
- };
3468
- },
3469
- initialData: c ? {
3470
- authenticationStatus: "Authenticated",
3471
- profile: JSON.parse(a)
3472
- } : void 0,
3473
- placeholderData: { authenticationStatus: "Pending" },
3474
- refetchOnWindowFocus: !1
3475
- });
3476
- }, Yr = (t) => {
3477
- const e = {
3478
- shouldHidePayments: !1,
3479
- shouldHideVouchers: !1,
3480
- shouldHideQrCodes: !1
3481
- };
3482
- return Array.isArray(t) && t.forEach((s) => {
3483
- if (typeof s == "string")
3484
- switch (s.toLowerCase()) {
3485
- case "payment":
3486
- e.shouldHidePayments = !0;
3487
- break;
3488
- case "vouchers":
3489
- e.shouldHideVouchers = !0;
3490
- break;
3491
- case "qrcode":
3492
- e.shouldHideQrCodes = !0;
3493
- break;
3494
- default:
3495
- console.error(
3496
- `'${s}' is not a valid value for menuItemsToHide. Please refer https://www.npmjs.com/package/@myxtra/authentication-green#configuration`
3497
- );
3498
- }
3499
- else
3500
- console.error(
3501
- "Please make sure the Menu Items to hide are strings and the expected values are [Payment, Vouchers, QRCode]"
3502
- );
3503
- }), e;
3504
- }, Jr = () => {
3505
- const { t } = pt(), { position: e, bouMenuItems: s, menuItemsToHide: i } = Ds(), { country: a } = St(), c = is({ country: a }), { logoutUrl: l } = re(), d = Ee().getQueryData(Us), p = (d == null ? void 0 : d.profile.firstName) ?? "", f = (d == null ? void 0 : d.profile.lastName) ?? "", { shouldHidePayments: h, shouldHideVouchers: y, shouldHideQrCodes: g } = Yr(i), _ = () => {
3506
- sessionStorage.removeItem("profile"), window.location.href = l;
3507
- };
3508
- return /* @__PURE__ */ n.jsxs(G, { type: "nav", id: "xtra-menu", position: e, children: [
3509
- /* @__PURE__ */ n.jsx(
3510
- G.Trigger,
3511
- {
3512
- className: N(
3513
- "button",
3514
- "button--neutral",
3515
- "button--authentication",
3516
- "button--authentication--authenticated"
3517
- ),
3518
- children: /* @__PURE__ */ n.jsxs("button", { children: [
3519
- /* @__PURE__ */ n.jsx("div", { className: "button__icon", children: /* @__PURE__ */ n.jsx(Ti, { variant: "small", firstName: p, lastName: f }) }),
3520
- /* @__PURE__ */ n.jsx("span", { className: "button__label", children: p }),
3521
- /* @__PURE__ */ n.jsx("div", { className: "button__icon button__icon-right", children: /* @__PURE__ */ n.jsx(Ae, {}) })
3522
- ] })
3523
- }
3524
- ),
3525
- /* @__PURE__ */ n.jsxs(G.Content, { as: "div", children: [
3526
- !!s && s.length > 0 && /* @__PURE__ */ n.jsx("ul", { className: "bou-menu__list", children: s.map(({ label: S, icon: P, url: x }, b) => /* @__PURE__ */ n.jsx(
3527
- _t,
3528
- {
3529
- className: "bou-menu-item",
3530
- mobileUrl: x,
3531
- icon: P,
3532
- label: S
3533
- },
3534
- b
3535
- )) }),
3536
- /* @__PURE__ */ n.jsxs("ul", { children: [
3537
- /* @__PURE__ */ n.jsx(
3538
- _t,
3539
- {
3540
- className: "manage-profile",
3541
- mobileUrl: `${c}/manage-profile`,
3542
- desktopUrl: `${c}/manage-profile/personal-data`,
3543
- icon: /* @__PURE__ */ n.jsx(nr, {}),
3544
- label: t("manageProfile")
3545
- }
3546
- ),
3547
- a === "BE" && !h && /* @__PURE__ */ n.jsx(
3548
- _t,
3549
- {
3550
- className: "payment",
3551
- mobileUrl: `${c}/payment`,
3552
- icon: /* @__PURE__ */ n.jsx(yr, {}),
3553
- label: t("payment")
3554
- }
3555
- ),
3556
- !y && /* @__PURE__ */ n.jsx(
3557
- _t,
3558
- {
3559
- className: "gift-cards",
3560
- mobileUrl: `${c}/${a === "BE" ? "gift-cards" : "vouchers"}`,
3561
- icon: /* @__PURE__ */ n.jsx(pr, {}),
3562
- label: t("giftCards")
3563
- }
3564
- ),
3565
- !g && /* @__PURE__ */ n.jsx(
3566
- _t,
3567
- {
3568
- mobileUrl: `${c}/identifiers`,
3569
- icon: /* @__PURE__ */ n.jsx(vr, {}),
3570
- label: t("qrCode")
3571
- }
3572
- ),
3573
- /* @__PURE__ */ n.jsx(
3574
- _t,
3575
- {
3576
- className: "manage-privacy",
3577
- mobileUrl: `${c}/manage-privacy`,
3578
- desktopUrl: `${c}/manage-privacy/permissions`,
3579
- icon: /* @__PURE__ */ n.jsx(ir, {}),
3580
- label: t("privacy")
3581
- }
3582
- ),
3583
- /* @__PURE__ */ n.jsx(qr, { onClick: _, icon: /* @__PURE__ */ n.jsx(er, {}), label: t("logout") })
3584
- ] })
3585
- ] })
3586
- ] });
3587
- }, Ir = () => {
3588
- const { t } = pt();
3589
- return /* @__PURE__ */ n.jsxs("button", { className: N("button", "button--neutral", "button--authentication"), children: [
3590
- /* @__PURE__ */ n.jsx("div", { className: "button__icon", children: /* @__PURE__ */ n.jsx("i", { className: "spinner" }) }),
3591
- /* @__PURE__ */ n.jsxs("span", { className: "button__label", children: [
3592
- t("loading"),
3593
- "..."
3594
- ] })
3595
- ] });
3596
- };
3597
- /*! js-cookie v3.0.5 | MIT */
3598
- function It(t) {
3599
- for (var e = 1; e < arguments.length; e++) {
3600
- var s = arguments[e];
3601
- for (var i in s)
3602
- t[i] = s[i];
3603
- }
3604
- return t;
3605
- }
3606
- var Br = {
3607
- read: function(t) {
3608
- return t[0] === '"' && (t = t.slice(1, -1)), t.replace(/(%[\dA-F]{2})+/gi, decodeURIComponent);
3609
- },
3610
- write: function(t) {
3611
- return encodeURIComponent(t).replace(
3612
- /%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g,
3613
- decodeURIComponent
3614
- );
3615
- }
3616
- };
3617
- function we(t, e) {
3618
- function s(a, c, l) {
3619
- if (!(typeof document > "u")) {
3620
- l = It({}, e, l), typeof l.expires == "number" && (l.expires = new Date(Date.now() + l.expires * 864e5)), l.expires && (l.expires = l.expires.toUTCString()), a = encodeURIComponent(a).replace(/%(2[346B]|5E|60|7C)/g, decodeURIComponent).replace(/[()]/g, escape);
3621
- var u = "";
3622
- for (var d in l)
3623
- l[d] && (u += "; " + d, l[d] !== !0 && (u += "=" + l[d].split(";")[0]));
3624
- return document.cookie = a + "=" + t.write(c, a) + u;
3625
- }
3626
- }
3627
- function i(a) {
3628
- if (!(typeof document > "u" || arguments.length && !a)) {
3629
- for (var c = document.cookie ? document.cookie.split("; ") : [], l = {}, u = 0; u < c.length; u++) {
3630
- var d = c[u].split("="), p = d.slice(1).join("=");
3631
- try {
3632
- var f = decodeURIComponent(d[0]);
3633
- if (l[f] = t.read(p, f), a === f)
3634
- break;
3635
- } catch {
3636
- }
3637
- }
3638
- return a ? l[a] : l;
3639
- }
3640
- }
3641
- return Object.create(
3642
- {
3643
- set: s,
3644
- get: i,
3645
- remove: function(a, c) {
3646
- s(
3647
- a,
3648
- "",
3649
- It({}, c, {
3650
- expires: -1
3651
- })
3652
- );
3653
- },
3654
- withAttributes: function(a) {
3655
- return we(this.converter, It({}, this.attributes, a));
3656
- },
3657
- withConverter: function(a) {
3658
- return we(It({}, this.converter, a), this.attributes);
3659
- }
3660
- },
3661
- {
3662
- attributes: { value: Object.freeze(e) },
3663
- converter: { value: Object.freeze(t) }
3664
- }
3665
- );
3666
- }
3667
- var qe = we(Br, { path: "/" });
3668
- const tn = ({ className: t }) => {
3669
- const { t: e } = pt(), { loginUrl: s } = re(), i = r.useRef(null);
3670
- return r.useEffect(() => {
3671
- const a = qe.get("shouldLogin"), c = !!a && !!atob(a);
3672
- i != null && i.current && c && (qe.remove("shouldLogin"), i.current.click());
3673
- }, [i]), /* @__PURE__ */ n.jsxs(
3674
- "a",
3675
- {
3676
- ref: i,
3677
- href: s,
3678
- className: N(
3679
- "button",
3680
- "button--neutral",
3681
- "button--authentication",
3682
- "button--authentication--unauthenticated",
3683
- t
3684
- ),
3685
- children: [
3686
- /* @__PURE__ */ n.jsx("div", { className: "button__icon", children: /* @__PURE__ */ n.jsx(Ps, { width: 24, height: 24, suffix: "desktop" }) }),
3687
- /* @__PURE__ */ n.jsx("span", { className: "button__label", children: e("login") }),
3688
- /* @__PURE__ */ n.jsx("div", { className: "button__icon button__icon-right", children: /* @__PURE__ */ n.jsx(Ae, {}) })
3689
- ]
3690
- }
3691
- );
3692
- }, en = () => {
3693
- const { t } = pt(), { loginUrl: e } = re(), s = is(), { position: i } = Ds();
3694
- return /* @__PURE__ */ n.jsxs(
3695
- G,
3696
- {
3697
- type: "nav",
3698
- id: "xtra-menu",
3699
- position: i,
3700
- className: "menu--unauthenticated",
3701
- "aria-label": t("xtraMenuAriaLabel"),
3702
- children: [
3703
- /* @__PURE__ */ n.jsx(G.Trigger, { className: N("button", "button--neutral", "button--authentication"), children: /* @__PURE__ */ n.jsxs("button", { children: [
3704
- /* @__PURE__ */ n.jsx("div", { className: "button__icon", children: /* @__PURE__ */ n.jsx(Ps, { width: 24, height: 24, suffix: "mobile" }) }),
3705
- /* @__PURE__ */ n.jsx("div", { className: "button__icon button__icon-right", children: /* @__PURE__ */ n.jsx(Ae, {}) })
3706
- ] }) }),
3707
- /* @__PURE__ */ n.jsxs(G.Content, { children: [
3708
- /* @__PURE__ */ n.jsx(G.Item, { children: /* @__PURE__ */ n.jsxs("a", { href: e, className: "button button--with-icon", children: [
3709
- /* @__PURE__ */ n.jsx("span", { className: "button__icon", children: /* @__PURE__ */ n.jsx(Bi, {}) }),
3710
- /* @__PURE__ */ n.jsx("span", { className: "button__label", children: t("login") })
3711
- ] }) }),
3712
- /* @__PURE__ */ n.jsx(G.Item, { children: /* @__PURE__ */ n.jsxs("a", { href: `${s}/onboarding/register`, className: "button button--with-icon", children: [
3713
- /* @__PURE__ */ n.jsx("span", { className: "button__icon", children: /* @__PURE__ */ n.jsx(or, {}) }),
3714
- /* @__PURE__ */ n.jsx("span", { className: "button__label", children: t("register") })
3715
- ] }) })
3716
- ] })
3717
- ]
3718
- }
3719
- );
3720
- }, sn = () => {
3721
- var e, s;
3722
- const t = Qs();
3723
- return ((e = t.data) == null ? void 0 : e.authenticationStatus) === "Authenticated" ? /* @__PURE__ */ n.jsx(Jr, {}) : ((s = t.data) == null ? void 0 : s.authenticationStatus) === "NotAuthenticated" || t.isError ? /* @__PURE__ */ n.jsxs(n.Fragment, { children: [
3724
- /* @__PURE__ */ n.jsx(tn, {}),
3725
- /* @__PURE__ */ n.jsx(en, {})
3726
- ] }) : /* @__PURE__ */ n.jsx(Ir, {});
3727
- }, Hs = () => {
3728
- const { apiUrl: t } = St();
3729
- return `${`${t}/xtra`}/authentication/v1/gdpr`;
3730
- }, rn = () => {
3731
- const { i18n: t } = pt(), e = Hs(), { country: s, bouHeaders: i } = St(), a = new ps();
3732
- return Ei({
3733
- mutationFn: async (l) => {
3734
- const u = je(t.language, s), d = await fetch(`${e}/tc`, {
3735
- body: JSON.stringify({ acceptedTC: l }),
3736
- credentials: "include",
3737
- headers: {
3738
- "Content-Type": "application/json",
3739
- "Accept-Language": u,
3740
- ...i
3741
- },
3742
- method: "POST",
3743
- mode: "cors"
3744
- });
3745
- if (!d.ok)
3746
- throw new Error("Network response was not ok");
3747
- return d;
3748
- },
3749
- onSuccess: async () => {
3750
- await a.invalidateQueries({ queryKey: ["gdpr"] });
3751
- }
3752
- });
3753
- }, nn = () => {
3754
- var u;
3755
- const { i18n: t } = pt(), e = Hs(), { country: s, bouHeaders: i } = St(), c = ((u = Qs().data) == null ? void 0 : u.authenticationStatus) === "Authenticated";
3756
- return Cs({
3757
- queryKey: ["gdpr"],
3758
- queryFn: async () => {
3759
- const d = je(t.language, s), p = await fetch(`${e}/tc/check`, {
3760
- credentials: "include",
3761
- mode: "cors",
3762
- headers: { "Accept-Language": d, ...i }
3763
- });
3764
- if (!p.ok)
3765
- throw new Error("Network response was not ok");
3766
- return p.status === 204 ? [] : await p.json();
3767
- },
3768
- enabled: c
3769
- });
3770
- }, an = () => {
3771
- var P;
3772
- const { t } = pt(), { logoutUrl: e } = re(), [s, i] = r.useState(0), [a, c] = r.useState({}), { AccessibleFormMessage: l, formRef: u } = qs({ submitCount: s, errors: a }), { mutate: d, isError: p } = rn(), f = nn(), [h, y] = r.useState(!1);
3773
- $s({ element: "xtra-authentication" });
3774
- const g = t("termsAndConditions.error.required"), _ = () => {
3775
- y(!1), document.body.style.removeProperty("overflow");
3776
- };
3777
- r.useEffect(() => {
3778
- var x;
3779
- (x = f.data) != null && x.length && !window.showTnCPopup && (y(!0), window.showTnCPopup = !0);
3780
- }, [(P = f.data) == null ? void 0 : P.length]), r.useEffect(() => {
3781
- h && document.body.style.setProperty("overflow", "hidden");
3782
- }, [h]), r.useEffect(() => {
3783
- p && c({ acceptedTC: g });
3784
- }, [g, p]);
3785
- const S = (x) => {
3786
- x.preventDefault(), i((w) => w + 1);
3787
- const { acceptedTC: b } = x.target;
3788
- if (b instanceof RadioNodeList) {
3789
- const w = Object.values(b);
3790
- w.every((O) => O.checked) ? (c({}), d(w.map((O) => O.value)), _()) : c({ acceptedTC: g });
3791
- } else
3792
- b != null && b.checked ? (c({}), d([b.value]), _()) : c({ acceptedTC: g });
3793
- };
3794
- return h ? /* @__PURE__ */ n.jsxs(K, { defaultOpen: h, isModal: !0, children: [
3795
- l,
3796
- /* @__PURE__ */ n.jsxs(K.Root, { children: [
3797
- /* @__PURE__ */ n.jsx(K.Header, { children: /* @__PURE__ */ n.jsx(K.Title, { icon: /* @__PURE__ */ n.jsx("i", { className: "commerce__icon" }), children: /* @__PURE__ */ n.jsx(un, { children: t("termsAndConditions.title") }) }) }),
3798
- /* @__PURE__ */ n.jsx(K.Body, { children: /* @__PURE__ */ n.jsxs(Ks, { ref: u, id: "tc-form", onSubmit: S, children: [
3799
- /* @__PURE__ */ n.jsxs(ln, { children: [
3800
- t("termsAndConditions.description"),
3801
- a.acceptedTC && /* @__PURE__ */ n.jsx(dn, { children: g })
3802
- ] }),
3803
- f.data.map(({ tcCode: x, title: b, URL: w }) => /* @__PURE__ */ n.jsx(
3804
- jt,
3805
- {
3806
- id: x,
3807
- value: x,
3808
- name: "acceptedTC",
3809
- variant: "primary",
3810
- children: /* @__PURE__ */ n.jsxs(jt.Content, { children: [
3811
- /* @__PURE__ */ n.jsx(on, { children: b }),
3812
- /* @__PURE__ */ n.jsx(cn, { href: w, children: t("termsAndConditions.action", { title: b }) })
3813
- ] })
3814
- },
3815
- x
3816
- ))
3817
- ] }) }),
3818
- /* @__PURE__ */ n.jsxs(K.Footer, { children: [
3819
- /* @__PURE__ */ n.jsx(
3820
- "a",
3821
- {
3822
- className: N("button", "button--secondary", "button--terms-and-conditions"),
3823
- href: e,
3824
- children: t("logout")
3825
- }
3826
- ),
3827
- /* @__PURE__ */ n.jsx(Kt, { form: "tc-form", type: "submit", variant: "primary", children: t("confirm") })
3828
- ] })
3829
- ] })
3830
- ] }) : null;
3831
- }, on = ({
3832
- children: t,
3833
- ...e
3834
- }) => /* @__PURE__ */ n.jsx(jt.Label, { className: "form--tc__label", ...e, children: t }), Ks = r.forwardRef(({ children: t, ...e }, s) => /* @__PURE__ */ n.jsx("form", { className: "form--tc", ref: s, ...e, children: t }));
3835
- Ks.displayName = "TermsAndConditionsForm";
3836
- const ln = ({
3837
- children: t,
3838
- ...e
3839
- }) => /* @__PURE__ */ n.jsx("p", { className: "form--tc__description", ...e, children: t }), cn = ({ children: t, ...e }) => /* @__PURE__ */ n.jsx(
3840
- "a",
3841
- {
3842
- className: "form--tc__link",
3843
- target: "_blank",
3844
- rel: "noreferrer",
3845
- role: "button",
3846
- download: !0,
3847
- ...e,
3848
- children: t
3849
- }
3850
- ), un = ({ children: t }) => /* @__PURE__ */ n.jsx("h1", { className: "form--tc__title", children: t }), dn = ({ children: t, ...e }) => /* @__PURE__ */ n.jsx("span", { className: "form--tc__error", role: "alert", ...e, children: t }), hn = new ps(), mn = ({
3851
- environment: t,
3852
- redirectUrl: e,
3853
- apiUrl: s,
3854
- authUrl: i,
3855
- position: a,
3856
- commerceId: c,
3857
- bouMenuItems: l,
3858
- menuItemsToHide: u,
3859
- bouHeaders: d,
3860
- country: p
3861
- }) => /* @__PURE__ */ n.jsx(Zs, { environment: t, children: /* @__PURE__ */ n.jsx(Xs, { commerceId: c, children: /* @__PURE__ */ n.jsx(
3862
- $r,
3863
- {
3864
- apiUrl: s,
3865
- authUrl: i,
3866
- country: p,
3867
- redirectUrl: e,
3868
- bouHeaders: d,
3869
- children: /* @__PURE__ */ n.jsxs(pi, { client: hn, children: [
3870
- /* @__PURE__ */ n.jsx(
3871
- Zr,
3872
- {
3873
- position: a,
3874
- bouMenuItems: l,
3875
- menuItemsToHide: u,
3876
- children: /* @__PURE__ */ n.jsx(sn, {})
3877
- }
3878
- ),
3879
- /* @__PURE__ */ n.jsx(an, {})
3880
- ] })
3881
- }
3882
- ) }) });
3883
- export {
3884
- mn as default
3885
- };