@oneclick.dev/cms-core-modules 0.0.105 → 0.0.107

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 (574) hide show
  1. package/dist/Acquisition-DypEyPSO.js +1 -0
  2. package/dist/Acquisition-TCNX-th6.mjs +308 -0
  3. package/dist/AgendaOpeningHoursCard-BIhm0vpV.js +1 -0
  4. package/dist/AgendaOpeningHoursCard-BKUdJxRI.mjs +133 -0
  5. package/dist/AppointmentDetailsCard-C5rQ5jsW.js +1 -0
  6. package/dist/AppointmentDetailsCard-NRHeNP2L.mjs +111 -0
  7. package/dist/AppointmentEditor-BcF8CiD-.mjs +150 -0
  8. package/dist/AppointmentEditor-BlhFtoCm.js +1 -0
  9. package/dist/AppointmentListTable-B-ReBVtV.js +1 -0
  10. package/dist/AppointmentListTable-DHmy-iid.mjs +129 -0
  11. package/dist/Audience-Cq1Gu-Vo.mjs +394 -0
  12. package/dist/Audience-h5PfXPz4.js +1 -0
  13. package/dist/Components-BehelN4r.js +1 -0
  14. package/dist/Components-CR6zukUU.mjs +468 -0
  15. package/dist/Content-C5Iye3t0.mjs +257 -0
  16. package/dist/Content-eOfBx52Y.js +1 -0
  17. package/dist/ContentEditor-BgL4qEeg.mjs +26835 -0
  18. package/dist/ContentEditor-Tlu3w0Hu.js +462 -0
  19. package/dist/CountryBreakdownCard-CWVyB8be.mjs +151 -0
  20. package/dist/CountryBreakdownCard-Db-pMiNe.js +1 -0
  21. package/dist/Create-B1it8S4m.js +1 -0
  22. package/dist/Create-DbYi0FAI.mjs +907 -0
  23. package/dist/DateFormatter-DLrDYkby.mjs +630 -0
  24. package/dist/DateFormatter-Dni0Oq8r.js +1 -0
  25. package/dist/Detail-D-eahJGO.mjs +21 -0
  26. package/dist/Detail-D0kdPPIm.mjs +2757 -0
  27. package/dist/Detail-DAafePYi.mjs +485 -0
  28. package/dist/Detail-DYpv4fYg.js +1 -0
  29. package/dist/Detail-Dc_ui4LM.js +1 -0
  30. package/dist/Detail-DccUekl_.js +1 -0
  31. package/dist/Detail-Dhz0V0Vf.js +1 -0
  32. package/dist/Detail-DjnGY0F8.mjs +282 -0
  33. package/dist/Detail-DplAitHg.mjs +447 -0
  34. package/dist/Detail-SugyeSxb.js +1 -0
  35. package/dist/DeviceBreakdownCard-CzxZT6To.js +1 -0
  36. package/dist/DeviceBreakdownCard-eEwPjzKl.mjs +115 -0
  37. package/dist/EditLayout-Bnz9q_jd.js +1 -0
  38. package/dist/EditLayout-J_DGXb8v.mjs +99 -0
  39. package/dist/Entries-CgpWg6fE.js +1 -0
  40. package/dist/Entries-CkGTXcAq.mjs +575 -0
  41. package/dist/Find-Bz0TNJzk.mjs +164 -0
  42. package/dist/Find-D-ItTXaZ.js +1 -0
  43. package/dist/GlobalStyling-CSQPF7o_.mjs +1162 -0
  44. package/dist/GlobalStyling-DabldMZh.js +15 -0
  45. package/dist/NewReservationDialog-BhIiY2B9.js +1 -0
  46. package/dist/NewReservationDialog-CN49aGcM.mjs +1002 -0
  47. package/dist/OrderDetailDialog-BJ01DZFe.js +1 -0
  48. package/dist/OrderDetailDialog-CoVQ_rzs.mjs +215 -0
  49. package/dist/Overview-9FMgn5hT.mjs +492 -0
  50. package/dist/Overview-BOOwMQ-c.mjs +636 -0
  51. package/dist/Overview-Biz3h60w.js +1 -0
  52. package/dist/Overview-C2K2ofdS.js +1 -0
  53. package/dist/Overview-CFHOXP9N.mjs +123 -0
  54. package/dist/Overview-CTJe7J5_.js +1 -0
  55. package/dist/Overview-Cvj2i9eW.js +1 -0
  56. package/dist/Overview-D2I1F8Dm.mjs +21 -0
  57. package/dist/Overview-DFOc9emt.mjs +345 -0
  58. package/dist/Overview-Dmhfb94Y.js +1 -0
  59. package/dist/Overview-PPzv7weG.mjs +450 -0
  60. package/dist/Overview-qFKcXHVF.js +1 -0
  61. package/dist/Overview-xkmYYTae.mjs +133 -0
  62. package/dist/Overview-yPsLvR2c.js +1 -0
  63. package/dist/PeakHoursCard-CtgEP-ez.mjs +157 -0
  64. package/dist/PeakHoursCard-DPeoMyhu.js +1 -0
  65. package/dist/ProductDetailsCard-B0WhmzO-.mjs +98 -0
  66. package/dist/ProductDetailsCard-C1ROuH6l.js +1 -0
  67. package/dist/RealtimeCard-DQno-Okz.js +1 -0
  68. package/dist/RealtimeCard-dR-g1iDo.mjs +92 -0
  69. package/dist/ReservationDetailDialog-Cdo6h0RD.mjs +2163 -0
  70. package/dist/ReservationDetailDialog-DZTFD2xI.js +349 -0
  71. package/dist/SearchTermsCard-BXJSXz_k.js +1 -0
  72. package/dist/SearchTermsCard-DsaxLKwP.mjs +146 -0
  73. package/dist/SendPush-Bssi-OZD.mjs +150 -0
  74. package/dist/SendPush-BuaYboRH.js +1 -0
  75. package/dist/SeoHealth-CP-kL0us.js +1 -0
  76. package/dist/SeoHealth-Cxp_Gb3Y.mjs +459 -0
  77. package/dist/TableView-7iwBkQ_k.mjs +4757 -0
  78. package/dist/TableView-BB_oIYYZ.js +4 -0
  79. package/dist/TemplateList-CNcM_Kgq.mjs +56 -0
  80. package/dist/TemplateList-VuPcBUJO.js +1 -0
  81. package/dist/TopPagesCard-CvDECn3_.mjs +117 -0
  82. package/dist/TopPagesCard-DNdATXJE.js +1 -0
  83. package/dist/TrafficSourcesCard-BLpBr7u0.mjs +151 -0
  84. package/dist/TrafficSourcesCard-_3gRUCw3.js +1 -0
  85. package/dist/View-DSnUHI7h.mjs +30 -0
  86. package/dist/View-Dbcfpdqh.js +1 -0
  87. package/dist/VisitorStatsCard-CFEnXSjF.mjs +185 -0
  88. package/dist/VisitorStatsCard-C_jhQxDW.js +1 -0
  89. package/dist/_plugin-vue_export-helper-5u7tqpWC.js +1 -0
  90. package/dist/_plugin-vue_export-helper-BJQSo0im.mjs +8 -0
  91. package/dist/agenda-CzMRcQTA.mjs +989 -0
  92. package/dist/agenda-D4zWRYSQ.js +1 -0
  93. package/dist/appointments-9syR5TZE.js +1 -0
  94. package/dist/appointments-BBmOJMhM.mjs +23 -0
  95. package/dist/array-BH1uH7XT.js +1 -0
  96. package/dist/array-DnDL9cFz.mjs +98 -0
  97. package/dist/availability-CAXB7Yd6.js +1 -0
  98. package/dist/availability-Dp7eF-ZK.mjs +215 -0
  99. package/dist/booking-data-Bysf6e5x.mjs +724 -0
  100. package/dist/booking-data-C6SGjC2X.js +1 -0
  101. package/dist/chunk-DQi1bQcV.js +1 -0
  102. package/dist/cms-core-modules.css +2 -1
  103. package/dist/contentManager-D7JxXCwE.js +1 -0
  104. package/dist/contentManager-tfy0x1LD.mjs +22 -0
  105. package/dist/context-AQKfnJ4t.mjs +3809 -0
  106. package/dist/context-ubyMq9Xe.js +54 -0
  107. package/dist/core-Dhgr4ctC.mjs +202 -0
  108. package/dist/core-_HKfBlaZ.js +1 -0
  109. package/dist/countries-MXLT3mVe.mjs +4 -0
  110. package/dist/countries-OCd5qPxG.js +1 -0
  111. package/dist/create-BfNc2C7N.js +1 -0
  112. package/dist/create-C7JlIlIh.mjs +95 -0
  113. package/dist/custom-BwN9-6Mb.js +1 -0
  114. package/dist/custom-INNwaWla.mjs +13 -0
  115. package/dist/dist-BCVg7FKM.js +1 -0
  116. package/dist/dist-DIhK9VWh.mjs +3045 -0
  117. package/dist/edit-BiI2VG60.js +35 -0
  118. package/dist/edit-DD3iFBEh.mjs +1097 -0
  119. package/dist/exceptions-DICMaDcH.mjs +462 -0
  120. package/dist/exceptions-DpWqMNuG.js +1 -0
  121. package/dist/google-Bcc4XZnV.mjs +4 -0
  122. package/dist/google-DTSRmJ51.js +1 -0
  123. package/dist/googleAnalytics-BSaqRR_L.js +1 -0
  124. package/dist/googleAnalytics-Cg-iWblZ.mjs +47 -0
  125. package/dist/index.cjs.js +1 -1
  126. package/dist/index.mjs +1095 -806
  127. package/dist/interpolation-B8OzkMyi.mjs +131 -0
  128. package/dist/interpolation-DpAqtGOW.js +1 -0
  129. package/dist/lib-4wSi00Vr.js +1 -0
  130. package/dist/lib-BZgXUui5.mjs +198 -0
  131. package/dist/line-DJdnFNI7.js +75 -0
  132. package/dist/line-tYLnEDGV.mjs +1500 -0
  133. package/dist/mailTemplates-BNk8fhVS.mjs +23 -0
  134. package/dist/mailTemplates-DswHzyQe.js +1 -0
  135. package/dist/orders-CIc0JlKX.mjs +512 -0
  136. package/dist/orders-DwPSi_pD.js +1 -0
  137. package/dist/payment-BsNWFaDm.js +1 -0
  138. package/dist/payment-Ced5_dpa.mjs +718 -0
  139. package/dist/productCollections-Cuvw_8zC.js +1 -0
  140. package/dist/productCollections-D0AxRlzr.mjs +23 -0
  141. package/dist/products-DUD-ZMkR.mjs +22 -0
  142. package/dist/products-DvX9B-Ul.js +1 -0
  143. package/dist/promoCodes-BCWqN6w4.mjs +23 -0
  144. package/dist/promoCodes-CEZ4LYot.js +1 -0
  145. package/dist/push-notifications-BGp4XWo9.js +1 -0
  146. package/dist/push-notifications-C7W7KuzR.mjs +23 -0
  147. package/dist/regular-BCFrS6lK.mjs +908 -0
  148. package/dist/regular-DBqPgT8C.js +1 -0
  149. package/dist/resources-DwsMmWgm.mjs +669 -0
  150. package/dist/resources-Dz81GkHe.js +1 -0
  151. package/dist/server-handlers.cjs.js +1 -1
  152. package/dist/server-handlers.mjs +1049 -996
  153. package/dist/shippingOptions-C3NEJff1.mjs +23 -0
  154. package/dist/shippingOptions-Cy040ZW1.js +1 -0
  155. package/dist/single-container-BJmmqq65.mjs +468 -0
  156. package/dist/single-container-Xoo0Xzxv.js +58 -0
  157. package/dist/src/appointments/composables/useHorizontalScroll.d.ts +20 -0
  158. package/dist/src/appointments/index.d.ts +9 -12
  159. package/dist/src/appointments/metadata.d.ts +1 -1
  160. package/dist/src/appointments/routes.d.ts +3 -6
  161. package/dist/src/contentManager/components/content-editor/tiptap-extensions/LockBlocks.d.ts +15 -0
  162. package/dist/src/contentManager/components/content-editor/tiptap-extensions/TrailingNodeInContainers.d.ts +4 -1
  163. package/dist/src/contentManager/components/content-editor/tiptap-menus/element-editor-views/index.d.ts +12 -132
  164. package/dist/src/contentManager/index.d.ts +5 -14
  165. package/dist/src/contentManager/metadata.d.ts +1 -1
  166. package/dist/src/contentManager/routes.d.ts +3 -12
  167. package/dist/src/custom/index.d.ts +2 -2
  168. package/dist/src/custom/routes.d.ts +1 -1
  169. package/dist/src/googleAnalytics/index.d.ts +10 -10
  170. package/dist/src/googleAnalytics/routes.d.ts +1 -1
  171. package/dist/src/lib/interpolation.d.ts +6 -0
  172. package/dist/src/mailTemplates/index.d.ts +3 -3
  173. package/dist/src/mailTemplates/metadata.d.ts +1 -1
  174. package/dist/src/mailTemplates/routes.d.ts +1 -1
  175. package/dist/src/productCollections/index.d.ts +3 -3
  176. package/dist/src/productCollections/metadata.d.ts +1 -1
  177. package/dist/src/productCollections/routes.d.ts +1 -1
  178. package/dist/src/products/index.d.ts +4 -4
  179. package/dist/src/products/metadata.d.ts +1 -1
  180. package/dist/src/products/routes.d.ts +1 -1
  181. package/dist/src/promoCodes/index.d.ts +3 -3
  182. package/dist/src/promoCodes/metadata.d.ts +1 -1
  183. package/dist/src/promoCodes/routes.d.ts +1 -1
  184. package/dist/src/push-notifications/index.d.ts +3 -3
  185. package/dist/src/push-notifications/metadata.d.ts +1 -1
  186. package/dist/src/push-notifications/routes.d.ts +1 -1
  187. package/dist/src/shippingOptions/index.d.ts +3 -3
  188. package/dist/src/shippingOptions/metadata.d.ts +1 -1
  189. package/dist/src/shippingOptions/routes.d.ts +1 -1
  190. package/dist/src/table/flow-builder-extensions/row-item.d.ts +3 -17
  191. package/dist/src/table/index.d.ts +2 -2
  192. package/dist/src/table/routes.d.ts +1 -1
  193. package/dist/src/types/index.d.ts +6 -0
  194. package/dist/src/vue-shim.d.ts +7 -0
  195. package/dist/table-DWw0fs3S.js +1 -0
  196. package/dist/table-LXt5DQOL.mjs +23 -0
  197. package/dist/utils-CVIHqQsU.js +3 -0
  198. package/dist/utils-h3owcMtS.mjs +37 -0
  199. package/dist/vee-validate-zod-BmXMJo8W.js +1 -0
  200. package/dist/vee-validate-zod-D9dZzbWZ.mjs +4985 -0
  201. package/dist/xy-container-CuQSwrtB.mjs +3180 -0
  202. package/dist/xy-container-_6YpscZh.js +158 -0
  203. package/package.json +55 -55
  204. package/dist/Acquisition-Br1Pfny3.js +0 -1
  205. package/dist/Acquisition-CPlZzUBo.mjs +0 -400
  206. package/dist/AgendaOpeningHoursCard-B7ROIPWw.js +0 -1
  207. package/dist/AgendaOpeningHoursCard-Cp4wxUeK.mjs +0 -172
  208. package/dist/AppointmentDetailsCard-33WpATpV.mjs +0 -161
  209. package/dist/AppointmentDetailsCard-DpLM5IrB.js +0 -1
  210. package/dist/AppointmentEditor-BeOtYV6u.mjs +0 -196
  211. package/dist/AppointmentEditor-CaTfbkIf.js +0 -1
  212. package/dist/AppointmentListTable-DZJNmTMb.mjs +0 -177
  213. package/dist/AppointmentListTable-Dieu9US_.js +0 -1
  214. package/dist/Audience-BfkrmBuQ.js +0 -1
  215. package/dist/Audience-DTblSAiL.mjs +0 -489
  216. package/dist/Components-C83O-xlF.mjs +0 -623
  217. package/dist/Components-DXbx0RLV.js +0 -1
  218. package/dist/Content-BHr_rPVY.js +0 -1
  219. package/dist/Content-CYOZKvWK.mjs +0 -358
  220. package/dist/ContentEditor-B1nfKG_5.mjs +0 -30676
  221. package/dist/ContentEditor-DdFU8piH.js +0 -462
  222. package/dist/CountryBreakdownCard-D7BK3nRD.js +0 -1
  223. package/dist/CountryBreakdownCard-DVxNz2DJ.mjs +0 -196
  224. package/dist/Create-BRBh0xjM.mjs +0 -1247
  225. package/dist/Create-qPeQxkdl.js +0 -1
  226. package/dist/DateFormatter-Bw-87W31.mjs +0 -734
  227. package/dist/DateFormatter-CYAD4GBN.js +0 -1
  228. package/dist/Detail-Byk781b4.mjs +0 -26
  229. package/dist/Detail-C1Blq61w.mjs +0 -585
  230. package/dist/Detail-C857g62L.js +0 -1
  231. package/dist/Detail-C8wQiDcv.js +0 -1
  232. package/dist/Detail-CPqug27l.js +0 -1
  233. package/dist/Detail-CjuhjPby.js +0 -1
  234. package/dist/Detail-CtItxMX4.mjs +0 -649
  235. package/dist/Detail-CujdFApD.mjs +0 -379
  236. package/dist/Detail-Dnpnmy4-.mjs +0 -3477
  237. package/dist/Detail-mvSGbnFU.js +0 -1
  238. package/dist/DeviceBreakdownCard-DRhQ9ufG.js +0 -1
  239. package/dist/DeviceBreakdownCard-W1frLe0L.mjs +0 -159
  240. package/dist/EditLayout.vue_vue_type_script_setup_true_lang-DWMqQvHl.mjs +0 -76
  241. package/dist/EditLayout.vue_vue_type_script_setup_true_lang-kpjbVSXg.js +0 -1
  242. package/dist/Entries-BaS6H6ak.js +0 -1
  243. package/dist/Entries-C8UJkrVC.mjs +0 -728
  244. package/dist/Find-B24ZEhYM.mjs +0 -229
  245. package/dist/Find-D4Qa45qC.js +0 -1
  246. package/dist/GlobalStyling-C9VthHWK.mjs +0 -1588
  247. package/dist/GlobalStyling-CnSlXkZc.js +0 -25
  248. package/dist/NewReservationDialog.vue_vue_type_script_setup_true_lang-9Q7TMm4u.mjs +0 -401
  249. package/dist/NewReservationDialog.vue_vue_type_script_setup_true_lang-DiNzGl-q.js +0 -1
  250. package/dist/Overview-3HWhsqaz.mjs +0 -860
  251. package/dist/Overview-BCpJNiEB.mjs +0 -190
  252. package/dist/Overview-BDlBCUI_.js +0 -1
  253. package/dist/Overview-BYMrsZjM.mjs +0 -332
  254. package/dist/Overview-BbvfH1u-.js +0 -1
  255. package/dist/Overview-BrCwozey.js +0 -1
  256. package/dist/Overview-CIa1E-HH.mjs +0 -178
  257. package/dist/Overview-CpHhuiaV.js +0 -1
  258. package/dist/Overview-DAxCu9XC.js +0 -1
  259. package/dist/Overview-D_T3K6aq.mjs +0 -632
  260. package/dist/Overview-Su8ZUbMs.mjs +0 -26
  261. package/dist/Overview-T-lsy3UZ.js +0 -1
  262. package/dist/Overview-kaMhsIUq.mjs +0 -567
  263. package/dist/Overview-t0pG5xjA.js +0 -1
  264. package/dist/PeakHoursCard-9-EZFZLR.mjs +0 -182
  265. package/dist/PeakHoursCard-BR5zmta4.js +0 -1
  266. package/dist/ProductDetailsCard-6nHikw4V.mjs +0 -121
  267. package/dist/ProductDetailsCard-Bn7qrgmc.js +0 -1
  268. package/dist/RealtimeCard--APfRNc8.js +0 -1
  269. package/dist/RealtimeCard-fvQlJcM7.mjs +0 -126
  270. package/dist/ReservationDetailDialog.vue_vue_type_script_setup_true_lang-Cz_22Oce.mjs +0 -2927
  271. package/dist/ReservationDetailDialog.vue_vue_type_script_setup_true_lang-DPPNc-Z5.js +0 -349
  272. package/dist/SearchTermsCard-BsB-63aH.js +0 -1
  273. package/dist/SearchTermsCard-BzVrHKqQ.mjs +0 -201
  274. package/dist/SendPush-COns44j7.js +0 -1
  275. package/dist/SendPush-CPIOjVX4.mjs +0 -184
  276. package/dist/SeoHealth-09sEOu3G.js +0 -1
  277. package/dist/SeoHealth-BzcWd_w7.mjs +0 -615
  278. package/dist/TableView-CPAw3h8g.js +0 -4
  279. package/dist/TableView-DXmEF6pY.mjs +0 -6143
  280. package/dist/TemplateList.vue_vue_type_script_setup_true_lang-B_AtWnHa.js +0 -1
  281. package/dist/TemplateList.vue_vue_type_script_setup_true_lang-Cmovy7kk.mjs +0 -40
  282. package/dist/TopPagesCard-BDeA997A.js +0 -1
  283. package/dist/TopPagesCard-CTozhOr_.mjs +0 -159
  284. package/dist/TrafficSourcesCard-BxtCKsqx.mjs +0 -197
  285. package/dist/TrafficSourcesCard-C3ziDTUL.js +0 -1
  286. package/dist/View-CsudjxCE.mjs +0 -30
  287. package/dist/View-Dw_wA6kK.js +0 -1
  288. package/dist/VisitorStatsCard-BmByE_Hi.js +0 -1
  289. package/dist/VisitorStatsCard-CXizEbVK.mjs +0 -174
  290. package/dist/_plugin-vue_export-helper-BHFhmbuH.js +0 -1
  291. package/dist/_plugin-vue_export-helper-CHgC5LLL.mjs +0 -9
  292. package/dist/agenda-BNG05SAq.js +0 -1
  293. package/dist/agenda-D1RxMxBS.mjs +0 -1152
  294. package/dist/array-CbATeQbk.js +0 -1
  295. package/dist/array-CvmZXzxF.mjs +0 -108
  296. package/dist/availability-CMrRa5y2.mjs +0 -269
  297. package/dist/availability-Cf2YfMwM.js +0 -1
  298. package/dist/booking-data-DgJd0BcM.mjs +0 -889
  299. package/dist/booking-data-Di5GmH_8.js +0 -1
  300. package/dist/countries-BTPvmrsb.mjs +0 -4
  301. package/dist/countries-CgZ081No.js +0 -1
  302. package/dist/exceptions-CI0B4xVj.js +0 -1
  303. package/dist/exceptions-vo8SA5SE.mjs +0 -646
  304. package/dist/google-CvtuJwgk.mjs +0 -4
  305. package/dist/google-D4N3gb01.js +0 -1
  306. package/dist/index-4tjmIans.js +0 -1
  307. package/dist/index-9HVlmvK3.js +0 -1
  308. package/dist/index-BWDwEd8D.mjs +0 -24
  309. package/dist/index-BfBBm9uY.mjs +0 -24
  310. package/dist/index-Bkq58CeQ.mjs +0 -22
  311. package/dist/index-BtujSJeg.js +0 -35
  312. package/dist/index-BuzLn4Km.js +0 -54
  313. package/dist/index-C4YUVWzJ.js +0 -75
  314. package/dist/index-CJQQBRLY.js +0 -1
  315. package/dist/index-CMk3uhUt.mjs +0 -3837
  316. package/dist/index-CQkOH2_3.mjs +0 -24
  317. package/dist/index-CSxYBeVA.js +0 -1
  318. package/dist/index-CU-tbS5W.mjs +0 -24
  319. package/dist/index-CZn2nDLv.mjs +0 -34
  320. package/dist/index-CkiNvRzs.js +0 -1
  321. package/dist/index-Co4ON2Di.js +0 -1
  322. package/dist/index-Cpnn_Pxd.mjs +0 -24
  323. package/dist/index-CrgzoTyR.mjs +0 -110
  324. package/dist/index-CsVeM3PA.mjs +0 -24
  325. package/dist/index-CwqrAU-H.js +0 -1
  326. package/dist/index-CxETuRsG.js +0 -1
  327. package/dist/index-Cz-baGax.js +0 -1
  328. package/dist/index-D3L8WAJI.js +0 -58
  329. package/dist/index-DFQGVHTs.js +0 -1
  330. package/dist/index-DPd3waTN.js +0 -1
  331. package/dist/index-DQYBP8Js.js +0 -158
  332. package/dist/index-DRqJOqUR.mjs +0 -3484
  333. package/dist/index-DjDCYQ_6.mjs +0 -441
  334. package/dist/index-DjWuIBxh.js +0 -1
  335. package/dist/index-Dnn2SCSl.js +0 -1
  336. package/dist/index-Dpl9sU6a.mjs +0 -12
  337. package/dist/index-DrXxXB2F.mjs +0 -138
  338. package/dist/index-MYWjg0zi.mjs +0 -176
  339. package/dist/index-R2oUDsjx.js +0 -1
  340. package/dist/index-RLz1QPrf.mjs +0 -203
  341. package/dist/index-UtjLbLw-.js +0 -1
  342. package/dist/index-_2lRVt_k.mjs +0 -2942
  343. package/dist/index-cOnxXTbF.mjs +0 -24
  344. package/dist/index-dOdMm1pV.mjs +0 -1105
  345. package/dist/index-hlylYYgy.mjs +0 -24
  346. package/dist/index-ijdf0d9-.js +0 -1
  347. package/dist/index-p5Uqu8c2.mjs +0 -1438
  348. package/dist/interpolation-DEDSLETn.mjs +0 -128
  349. package/dist/interpolation-DERg6Lwt.js +0 -1
  350. package/dist/orders-CzzcFQha.mjs +0 -559
  351. package/dist/orders-ETtbA4aQ.js +0 -1
  352. package/dist/payment-C3ohkehF.mjs +0 -1080
  353. package/dist/payment-Dfr-Ro-a.js +0 -1
  354. package/dist/regular-1LXNPviB.js +0 -1
  355. package/dist/regular-_05oq5Tx.mjs +0 -1101
  356. package/dist/resources-CxeFd57z.js +0 -1
  357. package/dist/resources-WI_4SO6T.mjs +0 -811
  358. package/dist/src/appointments/chat-components/AgendaOpeningHoursCard.vue.d.ts +0 -15
  359. package/dist/src/appointments/chat-components/AppointmentDetailsCard.vue.d.ts +0 -14
  360. package/dist/src/appointments/chat-components/AppointmentEditor.vue.d.ts +0 -14
  361. package/dist/src/appointments/chat-components/AppointmentListTable.vue.d.ts +0 -14
  362. package/dist/src/appointments/components/create/StepNavigation.vue.d.ts +0 -32
  363. package/dist/src/appointments/components/create/regular/Step1.vue.d.ts +0 -2
  364. package/dist/src/appointments/components/create/regular/Step2.vue.d.ts +0 -2
  365. package/dist/src/appointments/components/create/regular/Step3.vue.d.ts +0 -2
  366. package/dist/src/appointments/components/create/regular/Step4.vue.d.ts +0 -2
  367. package/dist/src/appointments/components/edit/CustomerInformationFieldEditorDialog.vue.d.ts +0 -24
  368. package/dist/src/appointments/components/edit/EditLayout.vue.d.ts +0 -17
  369. package/dist/src/appointments/components/edit/Event24hSidebar.vue.d.ts +0 -2
  370. package/dist/src/appointments/components/edit/EventDialog/ApproveReservationDialog.vue.d.ts +0 -8
  371. package/dist/src/appointments/components/edit/EventDialog/BookingsList.vue.d.ts +0 -127
  372. package/dist/src/appointments/components/edit/EventDialog/CancelReservationDialog.vue.d.ts +0 -8
  373. package/dist/src/appointments/components/edit/EventDialog/EventDialog.vue.d.ts +0 -11
  374. package/dist/src/appointments/components/edit/EventDialog/RejectReservationDialog.vue.d.ts +0 -8
  375. package/dist/src/appointments/components/edit/EventDialog/ReservationDetailDialog.vue.d.ts +0 -82
  376. package/dist/src/appointments/components/edit/EventDialog/TimelineChart.vue.d.ts +0 -24
  377. package/dist/src/appointments/components/edit/EventDialog/TransferReservationDialog.vue.d.ts +0 -4
  378. package/dist/src/appointments/components/edit/EventTimeIndicator.vue.d.ts +0 -12
  379. package/dist/src/appointments/components/edit/EventTimeline.vue.d.ts +0 -48
  380. package/dist/src/appointments/components/edit/EventView.vue.d.ts +0 -9
  381. package/dist/src/appointments/components/edit/ExceptionDialog.vue.d.ts +0 -29
  382. package/dist/src/appointments/components/edit/MetadataSchemaEditorDialog.vue.d.ts +0 -12
  383. package/dist/src/appointments/components/edit/NewReservationDialog/NewReservationDialog.vue.d.ts +0 -2
  384. package/dist/src/appointments/components/edit/OrderMetadataDisplay.vue.d.ts +0 -21
  385. package/dist/src/appointments/components/edit/PaymentAddons/Addon.vue.d.ts +0 -22
  386. package/dist/src/appointments/components/edit/PaymentAddons/AddonList.vue.d.ts +0 -5
  387. package/dist/src/appointments/components/edit/PaymentAddons/index.vue.d.ts +0 -15
  388. package/dist/src/appointments/components/edit/ResourceEditorDialog.vue.d.ts +0 -13
  389. package/dist/src/appointments/components/edit/dashboard/BookingsList.vue.d.ts +0 -110
  390. package/dist/src/appointments/components/edit/dashboard/Timeline.vue.d.ts +0 -34
  391. package/dist/src/appointments/components/edit/dashboard/timeline/ResourceSelector.vue.d.ts +0 -50
  392. package/dist/src/appointments/index.vue.d.ts +0 -22
  393. package/dist/src/appointments/pages/Overview.vue.d.ts +0 -4
  394. package/dist/src/appointments/pages/create/index.vue.d.ts +0 -2
  395. package/dist/src/appointments/pages/create/regular.vue.d.ts +0 -6
  396. package/dist/src/appointments/pages/edit/agenda.vue.d.ts +0 -4
  397. package/dist/src/appointments/pages/edit/availability.vue.d.ts +0 -2
  398. package/dist/src/appointments/pages/edit/booking-data.vue.d.ts +0 -65
  399. package/dist/src/appointments/pages/edit/index.vue.d.ts +0 -2
  400. package/dist/src/appointments/pages/edit/orders.vue.d.ts +0 -98
  401. package/dist/src/appointments/pages/edit/payment.vue.d.ts +0 -2
  402. package/dist/src/appointments/pages/edit/resources.vue.d.ts +0 -28
  403. package/dist/src/contentManager/components/components/ComponentDialog.vue.d.ts +0 -12
  404. package/dist/src/contentManager/components/components/ComponentGridItem.vue.d.ts +0 -16
  405. package/dist/src/contentManager/components/content-editor/ApiDocs.vue.d.ts +0 -2
  406. package/dist/src/contentManager/components/content-editor/ContentLayout.vue.d.ts +0 -49
  407. package/dist/src/contentManager/components/content-editor/ContentSettings.vue.d.ts +0 -24
  408. package/dist/src/contentManager/components/content-editor/ContentStructuredContentSections.vue.d.ts +0 -4
  409. package/dist/src/contentManager/components/content-editor/Header.vue.d.ts +0 -64
  410. package/dist/src/contentManager/components/content-editor/LivePreviewWrapper.vue.d.ts +0 -53
  411. package/dist/src/contentManager/components/content-editor/Locales.vue.d.ts +0 -44
  412. package/dist/src/contentManager/components/content-editor/NewSectionDialog.vue.d.ts +0 -21
  413. package/dist/src/contentManager/components/content-editor/PageSettings.vue.d.ts +0 -2
  414. package/dist/src/contentManager/components/content-editor/SEO.vue.d.ts +0 -14
  415. package/dist/src/contentManager/components/content-editor/SidebarSectionWrapper.vue.d.ts +0 -39
  416. package/dist/src/contentManager/components/content-editor/Status.vue.d.ts +0 -2
  417. package/dist/src/contentManager/components/content-editor/Versions.vue.d.ts +0 -63
  418. package/dist/src/contentManager/components/content-editor/tiptap-extensions/Button.vue.d.ts +0 -94
  419. package/dist/src/contentManager/components/content-editor/tiptap-extensions/Card.vue.d.ts +0 -92
  420. package/dist/src/contentManager/components/content-editor/tiptap-extensions/Column.vue.d.ts +0 -92
  421. package/dist/src/contentManager/components/content-editor/tiptap-extensions/Container.vue.d.ts +0 -92
  422. package/dist/src/contentManager/components/content-editor/tiptap-extensions/Divider.vue.d.ts +0 -92
  423. package/dist/src/contentManager/components/content-editor/tiptap-extensions/EmptySpace.vue.d.ts +0 -94
  424. package/dist/src/contentManager/components/content-editor/tiptap-extensions/Heading.vue.d.ts +0 -92
  425. package/dist/src/contentManager/components/content-editor/tiptap-extensions/Image.vue.d.ts +0 -92
  426. package/dist/src/contentManager/components/content-editor/tiptap-extensions/Map.vue.d.ts +0 -92
  427. package/dist/src/contentManager/components/content-editor/tiptap-extensions/Paragraph.vue.d.ts +0 -92
  428. package/dist/src/contentManager/components/content-editor/tiptap-extensions/Row.vue.d.ts +0 -115
  429. package/dist/src/contentManager/components/content-editor/tiptap-extensions/Stack.vue.d.ts +0 -115
  430. package/dist/src/contentManager/components/content-editor/tiptap-extensions/Video.vue.d.ts +0 -92
  431. package/dist/src/contentManager/components/content-editor/tiptap-extensions/extension-details/DetailsNodeView.vue.d.ts +0 -92
  432. package/dist/src/contentManager/components/content-editor/tiptap-extensions/helpers/NodeLabel.vue.d.ts +0 -108
  433. package/dist/src/contentManager/components/content-editor/tiptap-extensions/helpers/ResizeHandlers.vue.d.ts +0 -20
  434. package/dist/src/contentManager/components/content-editor/tiptap-extensions/helpers/TopMarginDragger.vue.d.ts +0 -104
  435. package/dist/src/contentManager/components/content-editor/tiptap-menus/BubbleMenuClassBuilder.vue.d.ts +0 -19
  436. package/dist/src/contentManager/components/content-editor/tiptap-menus/BubbleMenuLinkBuilder.vue.d.ts +0 -19
  437. package/dist/src/contentManager/components/content-editor/tiptap-menus/BubbleMenuToggleButton.vue.d.ts +0 -29
  438. package/dist/src/contentManager/components/content-editor/tiptap-menus/DefaultBubbleMenu.vue.d.ts +0 -13
  439. package/dist/src/contentManager/components/content-editor/tiptap-menus/ElementEditorMenu.vue.d.ts +0 -19
  440. package/dist/src/contentManager/components/content-editor/tiptap-menus/EmojiMenu.vue.d.ts +0 -8
  441. package/dist/src/contentManager/components/content-editor/tiptap-menus/NewNodeView.vue.d.ts +0 -47
  442. package/dist/src/contentManager/components/content-editor/tiptap-menus/SlashMenu.vue.d.ts +0 -6
  443. package/dist/src/contentManager/components/content-editor/tiptap-menus/SlashMenuButton.vue.d.ts +0 -17
  444. package/dist/src/contentManager/components/content-editor/tiptap-menus/element-editor-views/ButtonMenu.vue.d.ts +0 -13
  445. package/dist/src/contentManager/components/content-editor/tiptap-menus/element-editor-views/CardMenu.vue.d.ts +0 -13
  446. package/dist/src/contentManager/components/content-editor/tiptap-menus/element-editor-views/ColumnMenu.vue.d.ts +0 -13
  447. package/dist/src/contentManager/components/content-editor/tiptap-menus/element-editor-views/DividerMenu.vue.d.ts +0 -13
  448. package/dist/src/contentManager/components/content-editor/tiptap-menus/element-editor-views/EmptySpaceMenu.vue.d.ts +0 -13
  449. package/dist/src/contentManager/components/content-editor/tiptap-menus/element-editor-views/HeadingMenu.vue.d.ts +0 -13
  450. package/dist/src/contentManager/components/content-editor/tiptap-menus/element-editor-views/ImageMenu.vue.d.ts +0 -13
  451. package/dist/src/contentManager/components/content-editor/tiptap-menus/element-editor-views/MapMenu.vue.d.ts +0 -13
  452. package/dist/src/contentManager/components/content-editor/tiptap-menus/element-editor-views/RowMenu.vue.d.ts +0 -13
  453. package/dist/src/contentManager/components/content-editor/tiptap-menus/element-editor-views/StackMenu.vue.d.ts +0 -13
  454. package/dist/src/contentManager/components/content-editor/tiptap-menus/element-editor-views/TextMenu.vue.d.ts +0 -13
  455. package/dist/src/contentManager/components/content-editor/tiptap-menus/element-editor-views/VideoMenu.vue.d.ts +0 -13
  456. package/dist/src/contentManager/components/overview/CollectionDialog.vue.d.ts +0 -30
  457. package/dist/src/contentManager/components/overview/CollectionsGridView.vue.d.ts +0 -18
  458. package/dist/src/contentManager/components/overview/ContentEntryContextMenu.vue.d.ts +0 -27
  459. package/dist/src/contentManager/components/overview/FilterPopover.vue.d.ts +0 -2
  460. package/dist/src/contentManager/components/overview/ListView.vue.d.ts +0 -12
  461. package/dist/src/contentManager/components/styling/ButtonStyleDialog.vue.d.ts +0 -24
  462. package/dist/src/contentManager/components/styling/CardStyleDialog.vue.d.ts +0 -24
  463. package/dist/src/contentManager/components/styling/SectionStyleDialog.vue.d.ts +0 -24
  464. package/dist/src/contentManager/index.vue.d.ts +0 -22
  465. package/dist/src/contentManager/pages/Components.vue.d.ts +0 -27
  466. package/dist/src/contentManager/pages/ContentEditor.vue.d.ts +0 -14
  467. package/dist/src/contentManager/pages/Entries.vue.d.ts +0 -16
  468. package/dist/src/contentManager/pages/GlobalStyling.vue.d.ts +0 -117
  469. package/dist/src/contentManager/pages/Overview.vue.d.ts +0 -57
  470. package/dist/src/custom/index.vue.d.ts +0 -2
  471. package/dist/src/custom/pages/View.vue.d.ts +0 -2
  472. package/dist/src/googleAnalytics/chat-components/CountryBreakdownCard.vue.d.ts +0 -14
  473. package/dist/src/googleAnalytics/chat-components/DeviceBreakdownCard.vue.d.ts +0 -14
  474. package/dist/src/googleAnalytics/chat-components/PeakHoursCard.vue.d.ts +0 -14
  475. package/dist/src/googleAnalytics/chat-components/RealtimeCard.vue.d.ts +0 -14
  476. package/dist/src/googleAnalytics/chat-components/SearchTermsCard.vue.d.ts +0 -14
  477. package/dist/src/googleAnalytics/chat-components/TopPagesCard.vue.d.ts +0 -14
  478. package/dist/src/googleAnalytics/chat-components/TrafficSourcesCard.vue.d.ts +0 -14
  479. package/dist/src/googleAnalytics/chat-components/VisitorStatsCard.vue.d.ts +0 -14
  480. package/dist/src/googleAnalytics/components/seo-health/SeoClicksChart.vue.d.ts +0 -5
  481. package/dist/src/googleAnalytics/components/seo-health/SeoImpressionsChart.vue.d.ts +0 -5
  482. package/dist/src/googleAnalytics/components/seo-health/SeoKeywordsTab.vue.d.ts +0 -5
  483. package/dist/src/googleAnalytics/components/seo-health/SeoKpiCards.vue.d.ts +0 -10
  484. package/dist/src/googleAnalytics/components/seo-health/SeoMappingTab.vue.d.ts +0 -5
  485. package/dist/src/googleAnalytics/components/seo-health/SeoPagesTab.vue.d.ts +0 -5
  486. package/dist/src/googleAnalytics/components/seo-health/SeoRankingDistribution.vue.d.ts +0 -5
  487. package/dist/src/googleAnalytics/index.vue.d.ts +0 -2
  488. package/dist/src/googleAnalytics/pages/Acquisition.vue.d.ts +0 -2
  489. package/dist/src/googleAnalytics/pages/Audience.vue.d.ts +0 -2
  490. package/dist/src/googleAnalytics/pages/Content.vue.d.ts +0 -2
  491. package/dist/src/googleAnalytics/pages/Overview.vue.d.ts +0 -2
  492. package/dist/src/googleAnalytics/pages/SeoHealth.vue.d.ts +0 -2
  493. package/dist/src/mailTemplates/components/TemplateList.vue.d.ts +0 -2
  494. package/dist/src/mailTemplates/index.vue.d.ts +0 -22
  495. package/dist/src/mailTemplates/pages/Detail.vue.d.ts +0 -14
  496. package/dist/src/mailTemplates/pages/Overview.vue.d.ts +0 -14
  497. package/dist/src/productCollections/components/detail/Main.vue.d.ts +0 -2
  498. package/dist/src/productCollections/components/detail/SEO.vue.d.ts +0 -2
  499. package/dist/src/productCollections/components/detail/Status.vue.d.ts +0 -2
  500. package/dist/src/productCollections/components/overview/ListView.vue.d.ts +0 -12
  501. package/dist/src/productCollections/index.vue.d.ts +0 -22
  502. package/dist/src/productCollections/pages/Detail.vue.d.ts +0 -14
  503. package/dist/src/productCollections/pages/Overview.vue.d.ts +0 -16
  504. package/dist/src/products/chat-components/ProductDetailsCard.vue.d.ts +0 -14
  505. package/dist/src/products/components/detail/Collections.vue.d.ts +0 -14
  506. package/dist/src/products/components/detail/Inventory.vue.d.ts +0 -2
  507. package/dist/src/products/components/detail/Main.vue.d.ts +0 -2
  508. package/dist/src/products/components/detail/NewSection.vue.d.ts +0 -2
  509. package/dist/src/products/components/detail/Price.vue.d.ts +0 -2
  510. package/dist/src/products/components/detail/SEO.vue.d.ts +0 -2
  511. package/dist/src/products/components/detail/Shipping.vue.d.ts +0 -2
  512. package/dist/src/products/components/detail/Status.vue.d.ts +0 -2
  513. package/dist/src/products/components/detail/price/UnitPriceDialog.vue.d.ts +0 -17
  514. package/dist/src/products/components/detail/variants/Option.vue.d.ts +0 -33
  515. package/dist/src/products/components/detail/variants/VariantList.vue.d.ts +0 -38
  516. package/dist/src/products/components/overview/FilterPopover.vue.d.ts +0 -2
  517. package/dist/src/products/components/overview/GridView.vue.d.ts +0 -12
  518. package/dist/src/products/components/overview/ListView.vue.d.ts +0 -12
  519. package/dist/src/products/components/overview/ProductContextMenu.vue.d.ts +0 -27
  520. package/dist/src/products/index.vue.d.ts +0 -22
  521. package/dist/src/products/pages/Detail.vue.d.ts +0 -14
  522. package/dist/src/products/pages/Overview.vue.d.ts +0 -16
  523. package/dist/src/promoCodes/components/create/DateRange.vue.d.ts +0 -2
  524. package/dist/src/promoCodes/components/create/MultiCodes.vue.d.ts +0 -2
  525. package/dist/src/promoCodes/components/create/Note.vue.d.ts +0 -2
  526. package/dist/src/promoCodes/components/create/SingleCode.vue.d.ts +0 -2
  527. package/dist/src/promoCodes/components/create/TypeAndValue/TypeDetailDialog.vue.d.ts +0 -6
  528. package/dist/src/promoCodes/components/create/TypeAndValue/TypeManageDialog.vue.d.ts +0 -18
  529. package/dist/src/promoCodes/components/create/TypeAndValue/index.vue.d.ts +0 -2
  530. package/dist/src/promoCodes/index.vue.d.ts +0 -22
  531. package/dist/src/promoCodes/pages/Create.vue.d.ts +0 -16
  532. package/dist/src/promoCodes/pages/Detail.vue.d.ts +0 -14
  533. package/dist/src/promoCodes/pages/Find.vue.d.ts +0 -16
  534. package/dist/src/push-notifications/components/PreviewAndroid.vue.d.ts +0 -28
  535. package/dist/src/push-notifications/components/PreviewIPhone.vue.d.ts +0 -28
  536. package/dist/src/push-notifications/components/PushPreview.vue.d.ts +0 -28
  537. package/dist/src/push-notifications/index.vue.d.ts +0 -22
  538. package/dist/src/push-notifications/pages/SendPush.vue.d.ts +0 -14
  539. package/dist/src/shared/BrandLogo.vue.d.ts +0 -12
  540. package/dist/src/shared/DrawerToggle.vue.d.ts +0 -60
  541. package/dist/src/shared/VerticalToggle.vue.d.ts +0 -60
  542. package/dist/src/shippingOptions/components/detail/Condition.vue.d.ts +0 -2
  543. package/dist/src/shippingOptions/components/detail/Countries.vue.d.ts +0 -2
  544. package/dist/src/shippingOptions/components/detail/Example.vue.d.ts +0 -2
  545. package/dist/src/shippingOptions/components/detail/Main.vue.d.ts +0 -2
  546. package/dist/src/shippingOptions/components/overview/ListView.vue.d.ts +0 -12
  547. package/dist/src/shippingOptions/index.vue.d.ts +0 -22
  548. package/dist/src/shippingOptions/pages/Detail.vue.d.ts +0 -14
  549. package/dist/src/shippingOptions/pages/Overview.vue.d.ts +0 -16
  550. package/dist/src/table/components/DataTable.vue.d.ts +0 -18
  551. package/dist/src/table/components/DataTableAction.vue.d.ts +0 -14
  552. package/dist/src/table/components/DataTableMobileRowActionDrawer.vue.d.ts +0 -4
  553. package/dist/src/table/components/DataTablePagination.vue.d.ts +0 -6
  554. package/dist/src/table/components/actions/ActionDialog.vue.d.ts +0 -19
  555. package/dist/src/table/components/actions/CtaActionDialog.vue.d.ts +0 -4
  556. package/dist/src/table/components/columns/ColumnDropdown.vue.d.ts +0 -2
  557. package/dist/src/table/components/columns/ColumnEditorDialog.vue.d.ts +0 -34
  558. package/dist/src/table/components/columns/DialogTableColumnItem.vue.d.ts +0 -12
  559. package/dist/src/table/components/date-range-filter/DateRangeFilter.vue.d.ts +0 -2
  560. package/dist/src/table/components/date-range-filter/DateRangeSettingsDialog.vue.d.ts +0 -27
  561. package/dist/src/table/components/filters/FilterDialog.vue.d.ts +0 -12
  562. package/dist/src/table/components/filters/Filters.vue.d.ts +0 -27
  563. package/dist/src/table/components/search/Search.vue.d.ts +0 -2
  564. package/dist/src/table/components/sort/SortMode.vue.d.ts +0 -2
  565. package/dist/src/table/components/sort/SortModeSettingsDialog.vue.d.ts +0 -18
  566. package/dist/src/table/components/stats/StatDialog.vue.d.ts +0 -12
  567. package/dist/src/table/components/stats/Stats.vue.d.ts +0 -27
  568. package/dist/src/table/flow-builder-extensions/TableRowEditor.vue.d.ts +0 -16
  569. package/dist/src/table/index.vue.d.ts +0 -22
  570. package/dist/src/table/pages/TableView.vue.d.ts +0 -54
  571. package/dist/utils-CanmrIWO.mjs +0 -47
  572. package/dist/utils-Yd6F5mea.js +0 -3
  573. package/dist/vee-validate-zod-ByykgYKJ.js +0 -1
  574. package/dist/vee-validate-zod-CcOwoF6y.mjs +0 -4402
@@ -1,2927 +0,0 @@
1
- import { defineComponent as ie, ref as R, resolveComponent as x, openBlock as D, createBlock as H, withCtx as y, createVNode as p, createTextVNode as C, createElementVNode as g, unref as $, normalizeClass as Y, toDisplayString as I, computed as J, createElementBlock as M, Fragment as G, renderList as re, normalizeStyle as ne, resolveDynamicComponent as le, createCommentVNode as E, inject as rt, useTemplateRef as fe } from "vue";
2
- import { icons as Q, User as lt, Mail as ct, Phone as ut, Clock as dt, Users as ft, Tag as pt, CreditCard as mt, Receipt as ht, Ban as gt, ClockCheck as vt, MoreHorizontal as _t, Download as yt, MailCheck as xt, XCircle as bt, Gift as Dt } from "lucide-vue-next";
3
- import { useModule as ue, useMailer as $e, useModulePermissions as Ct, useFirebaseIntegration as kt } from "@oneclick.dev/cms-kit";
4
- import { t as oe } from "./index-RLz1QPrf.mjs";
5
- function Z(s) {
6
- return Array.isArray ? Array.isArray(s) : Ke(s) === "[object Array]";
7
- }
8
- function At(s) {
9
- if (typeof s == "string")
10
- return s;
11
- if (typeof s == "bigint")
12
- return s.toString();
13
- const e = s + "";
14
- return e == "0" && 1 / s == -1 / 0 ? "-0" : e;
15
- }
16
- function be(s) {
17
- return s == null ? "" : At(s);
18
- }
19
- function P(s) {
20
- return typeof s == "string";
21
- }
22
- function me(s) {
23
- return typeof s == "number";
24
- }
25
- function wt(s) {
26
- return s === !0 || s === !1 || Mt(s) && Ke(s) == "[object Boolean]";
27
- }
28
- function He(s) {
29
- return typeof s == "object";
30
- }
31
- function Mt(s) {
32
- return He(s) && s !== null;
33
- }
34
- function V(s) {
35
- return s != null;
36
- }
37
- function pe(s) {
38
- return !s.trim().length;
39
- }
40
- function Ke(s) {
41
- return s == null ? s === void 0 ? "[object Undefined]" : "[object Null]" : Object.prototype.toString.call(s);
42
- }
43
- const It = "Incorrect 'index' type", $t = (s) => `Invalid value for key ${s}`, Et = (s) => `Pattern length exceeds max of ${s}.`, St = (s) => `Missing ${s} property in key`, Ft = (s) => `Property 'weight' in key '${s}' must be a positive integer`, Te = Object.prototype.hasOwnProperty;
44
- class Bt {
45
- constructor(e) {
46
- this._keys = [], this._keyMap = {};
47
- let t = 0;
48
- e.forEach((n) => {
49
- const i = Ge(n);
50
- this._keys.push(i), this._keyMap[i.id] = i, t += i.weight;
51
- }), this._keys.forEach((n) => {
52
- n.weight /= t;
53
- });
54
- }
55
- get(e) {
56
- return this._keyMap[e];
57
- }
58
- keys() {
59
- return this._keys;
60
- }
61
- toJSON() {
62
- return JSON.stringify(this._keys);
63
- }
64
- }
65
- function Ge(s) {
66
- let e = null, t = null, n = null, i = 1, l = null;
67
- if (P(s) || Z(s))
68
- n = s, e = Ne(s), t = De(s);
69
- else {
70
- if (!Te.call(s, "name"))
71
- throw new Error(St("name"));
72
- const r = s.name;
73
- if (n = r, Te.call(s, "weight") && (i = s.weight, i <= 0))
74
- throw new Error(Ft(r));
75
- e = Ne(r), t = De(r), l = s.getFn;
76
- }
77
- return {
78
- path: e,
79
- id: t,
80
- weight: i,
81
- src: n,
82
- getFn: l
83
- };
84
- }
85
- function Ne(s) {
86
- return Z(s) ? s : s.split(".");
87
- }
88
- function De(s) {
89
- return Z(s) ? s.join(".") : s;
90
- }
91
- function Rt(s, e) {
92
- const t = [];
93
- let n = !1;
94
- const i = (l, r, u, c) => {
95
- if (V(l))
96
- if (!r[u])
97
- t.push(c !== void 0 ? {
98
- v: l,
99
- i: c
100
- } : l);
101
- else {
102
- const m = r[u], o = l[m];
103
- if (!V(o))
104
- return;
105
- if (u === r.length - 1 && (P(o) || me(o) || wt(o) || typeof o == "bigint"))
106
- t.push(c !== void 0 ? {
107
- v: be(o),
108
- i: c
109
- } : be(o));
110
- else if (Z(o)) {
111
- n = !0;
112
- for (let a = 0, h = o.length; a < h; a += 1)
113
- i(o[a], r, u + 1, a);
114
- } else r.length && i(o, r, u + 1, c);
115
- }
116
- };
117
- return i(s, P(e) ? e.split(".") : e, 0), n ? t : t[0];
118
- }
119
- const jt = {
120
- includeMatches: !1,
121
- findAllMatches: !1,
122
- minMatchCharLength: 1
123
- }, Ot = {
124
- isCaseSensitive: !1,
125
- ignoreDiacritics: !1,
126
- includeScore: !1,
127
- keys: [],
128
- shouldSort: !0,
129
- sortFn: (s, e) => s.score === e.score ? s.idx < e.idx ? -1 : 1 : s.score < e.score ? -1 : 1
130
- }, Tt = {
131
- location: 0,
132
- threshold: 0.6,
133
- distance: 100
134
- }, Nt = {
135
- useExtendedSearch: !1,
136
- useTokenSearch: !1,
137
- getFn: Rt,
138
- ignoreLocation: !1,
139
- ignoreFieldNorm: !1,
140
- fieldNormWeight: 1
141
- }, b = Object.freeze({
142
- ...Ot,
143
- ...jt,
144
- ...Tt,
145
- ...Nt
146
- }), zt = /[^ ]+/g;
147
- function Lt(s = 1, e = 3) {
148
- const t = /* @__PURE__ */ new Map(), n = Math.pow(10, e);
149
- return {
150
- get(i) {
151
- const l = i.match(zt).length;
152
- if (t.has(l))
153
- return t.get(l);
154
- const r = 1 / Math.pow(l, 0.5 * s), u = parseFloat(Math.round(r * n) / n);
155
- return t.set(l, u), u;
156
- },
157
- clear() {
158
- t.clear();
159
- }
160
- };
161
- }
162
- class Ee {
163
- constructor({
164
- getFn: e = b.getFn,
165
- fieldNormWeight: t = b.fieldNormWeight
166
- } = {}) {
167
- this.norm = Lt(t, 3), this.getFn = e, this.isCreated = !1, this.docs = [], this.keys = [], this._keysMap = {}, this.setIndexRecords();
168
- }
169
- setSources(e = []) {
170
- this.docs = e;
171
- }
172
- setIndexRecords(e = []) {
173
- this.records = e;
174
- }
175
- setKeys(e = []) {
176
- this.keys = e, this._keysMap = {}, e.forEach((t, n) => {
177
- this._keysMap[t.id] = n;
178
- });
179
- }
180
- create() {
181
- this.isCreated || !this.docs.length || (this.isCreated = !0, P(this.docs[0]) ? this.docs.forEach((e, t) => {
182
- this._addString(e, t);
183
- }) : this.docs.forEach((e, t) => {
184
- this._addObject(e, t);
185
- }), this.norm.clear());
186
- }
187
- // Adds a doc to the end of the index
188
- add(e) {
189
- const t = this.size();
190
- P(e) ? this._addString(e, t) : this._addObject(e, t);
191
- }
192
- // Removes the doc at the specified index of the index
193
- removeAt(e) {
194
- this.records.splice(e, 1);
195
- for (let t = e, n = this.size(); t < n; t += 1)
196
- this.records[t].i -= 1;
197
- }
198
- // Removes docs at the specified indices (must be sorted ascending)
199
- removeAll(e) {
200
- for (let t = e.length - 1; t >= 0; t -= 1)
201
- this.records.splice(e[t], 1);
202
- for (let t = 0, n = this.records.length; t < n; t += 1)
203
- this.records[t].i = t;
204
- }
205
- getValueForItemAtKeyId(e, t) {
206
- return e[this._keysMap[t]];
207
- }
208
- size() {
209
- return this.records.length;
210
- }
211
- _addString(e, t) {
212
- if (!V(e) || pe(e))
213
- return;
214
- const n = {
215
- v: e,
216
- i: t,
217
- n: this.norm.get(e)
218
- };
219
- this.records.push(n);
220
- }
221
- _addObject(e, t) {
222
- const n = {
223
- i: t,
224
- $: {}
225
- };
226
- this.keys.forEach((i, l) => {
227
- const r = i.getFn ? i.getFn(e) : this.getFn(e, i.path);
228
- if (V(r)) {
229
- if (Z(r)) {
230
- const u = [];
231
- for (let c = 0, m = r.length; c < m; c += 1) {
232
- const o = r[c];
233
- if (V(o)) {
234
- if (P(o)) {
235
- if (!pe(o)) {
236
- const a = {
237
- v: o,
238
- i: c,
239
- n: this.norm.get(o)
240
- };
241
- u.push(a);
242
- }
243
- } else if (V(o.v)) {
244
- const a = P(o.v) ? o.v : be(o.v);
245
- if (!pe(a)) {
246
- const h = {
247
- v: a,
248
- i: o.i,
249
- n: this.norm.get(a)
250
- };
251
- u.push(h);
252
- }
253
- }
254
- }
255
- }
256
- n.$[l] = u;
257
- } else if (P(r) && !pe(r)) {
258
- const u = {
259
- v: r,
260
- n: this.norm.get(r)
261
- };
262
- n.$[l] = u;
263
- }
264
- }
265
- }), this.records.push(n);
266
- }
267
- toJSON() {
268
- return {
269
- // eslint-disable-next-line @typescript-eslint/no-unused-vars
270
- keys: this.keys.map(({
271
- getFn: e,
272
- ...t
273
- }) => t),
274
- records: this.records
275
- };
276
- }
277
- }
278
- function Ye(s, e, {
279
- getFn: t = b.getFn,
280
- fieldNormWeight: n = b.fieldNormWeight
281
- } = {}) {
282
- const i = new Ee({
283
- getFn: t,
284
- fieldNormWeight: n
285
- });
286
- return i.setKeys(s.map(Ge)), i.setSources(e), i.create(), i;
287
- }
288
- function Pt(s, {
289
- getFn: e = b.getFn,
290
- fieldNormWeight: t = b.fieldNormWeight
291
- } = {}) {
292
- const {
293
- keys: n,
294
- records: i
295
- } = s, l = new Ee({
296
- getFn: e,
297
- fieldNormWeight: t
298
- });
299
- return l.setKeys(n), l.setIndexRecords(i), l;
300
- }
301
- function Vt(s = [], e = b.minMatchCharLength) {
302
- const t = [];
303
- let n = -1, i = -1, l = 0;
304
- for (let r = s.length; l < r; l += 1) {
305
- const u = s[l];
306
- u && n === -1 ? n = l : !u && n !== -1 && (i = l - 1, i - n + 1 >= e && t.push([n, i]), n = -1);
307
- }
308
- return s[l - 1] && l - n >= e && t.push([n, l - 1]), t;
309
- }
310
- const te = 32;
311
- function Ut(s, e, t, {
312
- location: n = b.location,
313
- distance: i = b.distance,
314
- threshold: l = b.threshold,
315
- findAllMatches: r = b.findAllMatches,
316
- minMatchCharLength: u = b.minMatchCharLength,
317
- includeMatches: c = b.includeMatches,
318
- ignoreLocation: m = b.ignoreLocation
319
- } = {}) {
320
- if (e.length > te)
321
- throw new Error(Et(te));
322
- const o = e.length, a = s.length, h = Math.max(0, Math.min(n, a));
323
- let d = l, f = h;
324
- const _ = (F, T) => {
325
- const k = F / o;
326
- if (m) return k;
327
- const N = Math.abs(h - T);
328
- return i ? k + N / i : N ? 1 : k;
329
- }, w = u > 1 || c, O = w ? Array(a) : [];
330
- let L;
331
- for (; (L = s.indexOf(e, f)) > -1; ) {
332
- const F = _(0, L);
333
- if (d = Math.min(F, d), f = L + o, w) {
334
- let T = 0;
335
- for (; T < o; )
336
- O[L + T] = 1, T += 1;
337
- }
338
- }
339
- f = -1;
340
- let S = [], B = 1, j = o + a;
341
- const K = 1 << o - 1;
342
- for (let F = 0; F < o; F += 1) {
343
- let T = 0, k = j;
344
- for (; T < k; )
345
- _(F, h + k) <= d ? T = k : j = k, k = Math.floor((j - T) / 2 + T);
346
- j = k;
347
- let N = Math.max(1, h - k + 1);
348
- const ae = r ? a : Math.min(h + k, a) + o, X = Array(ae + 2);
349
- X[ae + 1] = (1 << F) - 1;
350
- for (let U = ae; U >= N; U -= 1) {
351
- const A = U - 1, v = t[s[A]];
352
- if (w && (O[A] = +!!v), X[U] = (X[U + 1] << 1 | 1) & v, F && (X[U] |= (S[U + 1] | S[U]) << 1 | 1 | S[U + 1]), X[U] & K && (B = _(F, A), B <= d)) {
353
- if (d = B, f = A, f <= h)
354
- break;
355
- N = Math.max(1, 2 * h - f);
356
- }
357
- }
358
- if (_(F + 1, h) > d)
359
- break;
360
- S = X;
361
- }
362
- const W = {
363
- isMatch: f >= 0,
364
- // Count exact matches (those with a score of 0) to be "almost" exact
365
- score: Math.max(1e-3, B)
366
- };
367
- if (w) {
368
- const F = Vt(O, u);
369
- F.length ? c && (W.indices = F) : W.isMatch = !1;
370
- }
371
- return W;
372
- }
373
- function Wt(s) {
374
- const e = {};
375
- for (let t = 0, n = s.length; t < n; t += 1) {
376
- const i = s.charAt(t);
377
- e[i] = (e[i] || 0) | 1 << n - t - 1;
378
- }
379
- return e;
380
- }
381
- function Se(s) {
382
- if (s.length <= 1) return s;
383
- s.sort((t, n) => t[0] - n[0] || t[1] - n[1]);
384
- const e = [s[0]];
385
- for (let t = 1, n = s.length; t < n; t += 1) {
386
- const i = e[e.length - 1], l = s[t];
387
- l[0] <= i[1] + 1 ? i[1] = Math.max(i[1], l[1]) : e.push(l);
388
- }
389
- return e;
390
- }
391
- const Qe = {
392
- ł: "l",
393
- // ł
394
- Ł: "L",
395
- // Ł
396
- đ: "d",
397
- // đ
398
- Đ: "D",
399
- // Đ
400
- ø: "o",
401
- // ø
402
- Ø: "O",
403
- // Ø
404
- ħ: "h",
405
- // ħ
406
- Ħ: "H",
407
- // Ħ
408
- ŧ: "t",
409
- // ŧ
410
- Ŧ: "T",
411
- // Ŧ
412
- ı: "i",
413
- // ı
414
- ß: "ss"
415
- // ß
416
- }, Ht = new RegExp("[" + Object.keys(Qe).join("") + "]", "g"), ce = String.prototype.normalize ? (s) => s.normalize("NFD").replace(/[\u0300-\u036F\u0483-\u0489\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u0610-\u061A\u064B-\u065F\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u0711\u0730-\u074A\u07A6-\u07B0\u07EB-\u07F3\u07FD\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u08D3-\u08E1\u08E3-\u0903\u093A-\u093C\u093E-\u094F\u0951-\u0957\u0962\u0963\u0981-\u0983\u09BC\u09BE-\u09C4\u09C7\u09C8\u09CB-\u09CD\u09D7\u09E2\u09E3\u09FE\u0A01-\u0A03\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A70\u0A71\u0A75\u0A81-\u0A83\u0ABC\u0ABE-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AE2\u0AE3\u0AFA-\u0AFF\u0B01-\u0B03\u0B3C\u0B3E-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B62\u0B63\u0B82\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD7\u0C00-\u0C04\u0C3E-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C81-\u0C83\u0CBC\u0CBE-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CE2\u0CE3\u0D00-\u0D03\u0D3B\u0D3C\u0D3E-\u0D44\u0D46-\u0D48\u0D4A-\u0D4D\u0D57\u0D62\u0D63\u0D82\u0D83\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DF2\u0DF3\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0EB1\u0EB4-\u0EB9\u0EBB\u0EBC\u0EC8-\u0ECD\u0F18\u0F19\u0F35\u0F37\u0F39\u0F3E\u0F3F\u0F71-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102B-\u103E\u1056-\u1059\u105E-\u1060\u1062-\u1064\u1067-\u106D\u1071-\u1074\u1082-\u108D\u108F\u109A-\u109D\u135D-\u135F\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17B4-\u17D3\u17DD\u180B-\u180D\u1885\u1886\u18A9\u1920-\u192B\u1930-\u193B\u1A17-\u1A1B\u1A55-\u1A5E\u1A60-\u1A7C\u1A7F\u1AB0-\u1ABE\u1B00-\u1B04\u1B34-\u1B44\u1B6B-\u1B73\u1B80-\u1B82\u1BA1-\u1BAD\u1BE6-\u1BF3\u1C24-\u1C37\u1CD0-\u1CD2\u1CD4-\u1CE8\u1CED\u1CF2-\u1CF4\u1CF7-\u1CF9\u1DC0-\u1DF9\u1DFB-\u1DFF\u20D0-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302F\u3099\u309A\uA66F-\uA672\uA674-\uA67D\uA69E\uA69F\uA6F0\uA6F1\uA802\uA806\uA80B\uA823-\uA827\uA880\uA881\uA8B4-\uA8C5\uA8E0-\uA8F1\uA8FF\uA926-\uA92D\uA947-\uA953\uA980-\uA983\uA9B3-\uA9C0\uA9E5\uAA29-\uAA36\uAA43\uAA4C\uAA4D\uAA7B-\uAA7D\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEB-\uAAEF\uAAF5\uAAF6\uABE3-\uABEA\uABEC\uABED\uFB1E\uFE00-\uFE0F\uFE20-\uFE2F]/g, "").replace(Ht, (e) => Qe[e]) : (s) => s;
417
- class Fe {
418
- constructor(e, {
419
- location: t = b.location,
420
- threshold: n = b.threshold,
421
- distance: i = b.distance,
422
- includeMatches: l = b.includeMatches,
423
- findAllMatches: r = b.findAllMatches,
424
- minMatchCharLength: u = b.minMatchCharLength,
425
- isCaseSensitive: c = b.isCaseSensitive,
426
- ignoreDiacritics: m = b.ignoreDiacritics,
427
- ignoreLocation: o = b.ignoreLocation
428
- } = {}) {
429
- if (this.options = {
430
- location: t,
431
- threshold: n,
432
- distance: i,
433
- includeMatches: l,
434
- findAllMatches: r,
435
- minMatchCharLength: u,
436
- isCaseSensitive: c,
437
- ignoreDiacritics: m,
438
- ignoreLocation: o
439
- }, e = c ? e : e.toLowerCase(), e = m ? ce(e) : e, this.pattern = e, this.chunks = [], !this.pattern.length)
440
- return;
441
- const a = (d, f) => {
442
- this.chunks.push({
443
- pattern: d,
444
- alphabet: Wt(d),
445
- startIndex: f
446
- });
447
- }, h = this.pattern.length;
448
- if (h > te) {
449
- let d = 0;
450
- const f = h % te, _ = h - f;
451
- for (; d < _; )
452
- a(this.pattern.substr(d, te), d), d += te;
453
- if (f) {
454
- const w = h - te;
455
- a(this.pattern.substr(w), w);
456
- }
457
- } else
458
- a(this.pattern, 0);
459
- }
460
- searchIn(e) {
461
- const {
462
- isCaseSensitive: t,
463
- ignoreDiacritics: n,
464
- includeMatches: i
465
- } = this.options;
466
- if (e = t ? e : e.toLowerCase(), e = n ? ce(e) : e, this.pattern === e) {
467
- const _ = {
468
- isMatch: !0,
469
- score: 0
470
- };
471
- return i && (_.indices = [[0, e.length - 1]]), _;
472
- }
473
- const {
474
- location: l,
475
- distance: r,
476
- threshold: u,
477
- findAllMatches: c,
478
- minMatchCharLength: m,
479
- ignoreLocation: o
480
- } = this.options, a = [];
481
- let h = 0, d = !1;
482
- this.chunks.forEach(({
483
- pattern: _,
484
- alphabet: w,
485
- startIndex: O
486
- }) => {
487
- const {
488
- isMatch: L,
489
- score: S,
490
- indices: B
491
- } = Ut(e, _, w, {
492
- location: l + O,
493
- distance: r,
494
- threshold: u,
495
- findAllMatches: c,
496
- minMatchCharLength: m,
497
- includeMatches: i,
498
- ignoreLocation: o
499
- });
500
- L && (d = !0), h += S, L && B && a.push(...B);
501
- });
502
- const f = {
503
- isMatch: d,
504
- score: d ? h / this.chunks.length : 1
505
- };
506
- return d && i && (f.indices = Se(a)), f;
507
- }
508
- }
509
- class q {
510
- constructor(e) {
511
- this.pattern = e;
512
- }
513
- static isMultiMatch(e) {
514
- return ze(e, this.multiRegex);
515
- }
516
- static isSingleMatch(e) {
517
- return ze(e, this.singleRegex);
518
- }
519
- // eslint-disable-next-line @typescript-eslint/no-unused-vars
520
- search(e) {
521
- return {
522
- isMatch: !1,
523
- score: 1
524
- };
525
- }
526
- }
527
- function ze(s, e) {
528
- const t = s.match(e);
529
- return t ? t[1] : null;
530
- }
531
- class Kt extends q {
532
- constructor(e) {
533
- super(e);
534
- }
535
- static get type() {
536
- return "exact";
537
- }
538
- static get multiRegex() {
539
- return /^="(.*)"$/;
540
- }
541
- static get singleRegex() {
542
- return /^=(.*)$/;
543
- }
544
- search(e) {
545
- const t = e === this.pattern;
546
- return {
547
- isMatch: t,
548
- score: t ? 0 : 1,
549
- indices: [0, this.pattern.length - 1]
550
- };
551
- }
552
- }
553
- class Gt extends q {
554
- constructor(e) {
555
- super(e);
556
- }
557
- static get type() {
558
- return "inverse-exact";
559
- }
560
- static get multiRegex() {
561
- return /^!"(.*)"$/;
562
- }
563
- static get singleRegex() {
564
- return /^!(.*)$/;
565
- }
566
- search(e) {
567
- const n = e.indexOf(this.pattern) === -1;
568
- return {
569
- isMatch: n,
570
- score: n ? 0 : 1,
571
- indices: [0, e.length - 1]
572
- };
573
- }
574
- }
575
- class Yt extends q {
576
- constructor(e) {
577
- super(e);
578
- }
579
- static get type() {
580
- return "prefix-exact";
581
- }
582
- static get multiRegex() {
583
- return /^\^"(.*)"$/;
584
- }
585
- static get singleRegex() {
586
- return /^\^(.*)$/;
587
- }
588
- search(e) {
589
- const t = e.startsWith(this.pattern);
590
- return {
591
- isMatch: t,
592
- score: t ? 0 : 1,
593
- indices: [0, this.pattern.length - 1]
594
- };
595
- }
596
- }
597
- class Qt extends q {
598
- constructor(e) {
599
- super(e);
600
- }
601
- static get type() {
602
- return "inverse-prefix-exact";
603
- }
604
- static get multiRegex() {
605
- return /^!\^"(.*)"$/;
606
- }
607
- static get singleRegex() {
608
- return /^!\^(.*)$/;
609
- }
610
- search(e) {
611
- const t = !e.startsWith(this.pattern);
612
- return {
613
- isMatch: t,
614
- score: t ? 0 : 1,
615
- indices: [0, e.length - 1]
616
- };
617
- }
618
- }
619
- class Jt extends q {
620
- constructor(e) {
621
- super(e);
622
- }
623
- static get type() {
624
- return "suffix-exact";
625
- }
626
- static get multiRegex() {
627
- return /^"(.*)"\$$/;
628
- }
629
- static get singleRegex() {
630
- return /^(.*)\$$/;
631
- }
632
- search(e) {
633
- const t = e.endsWith(this.pattern);
634
- return {
635
- isMatch: t,
636
- score: t ? 0 : 1,
637
- indices: [e.length - this.pattern.length, e.length - 1]
638
- };
639
- }
640
- }
641
- class Xt extends q {
642
- constructor(e) {
643
- super(e);
644
- }
645
- static get type() {
646
- return "inverse-suffix-exact";
647
- }
648
- static get multiRegex() {
649
- return /^!"(.*)"\$$/;
650
- }
651
- static get singleRegex() {
652
- return /^!(.*)\$$/;
653
- }
654
- search(e) {
655
- const t = !e.endsWith(this.pattern);
656
- return {
657
- isMatch: t,
658
- score: t ? 0 : 1,
659
- indices: [0, e.length - 1]
660
- };
661
- }
662
- }
663
- class Je extends q {
664
- constructor(e, {
665
- location: t = b.location,
666
- threshold: n = b.threshold,
667
- distance: i = b.distance,
668
- includeMatches: l = b.includeMatches,
669
- findAllMatches: r = b.findAllMatches,
670
- minMatchCharLength: u = b.minMatchCharLength,
671
- isCaseSensitive: c = b.isCaseSensitive,
672
- ignoreDiacritics: m = b.ignoreDiacritics,
673
- ignoreLocation: o = b.ignoreLocation
674
- } = {}) {
675
- super(e), this._bitapSearch = new Fe(e, {
676
- location: t,
677
- threshold: n,
678
- distance: i,
679
- includeMatches: l,
680
- findAllMatches: r,
681
- minMatchCharLength: u,
682
- isCaseSensitive: c,
683
- ignoreDiacritics: m,
684
- ignoreLocation: o
685
- });
686
- }
687
- static get type() {
688
- return "fuzzy";
689
- }
690
- static get multiRegex() {
691
- return /^"(.*)"$/;
692
- }
693
- static get singleRegex() {
694
- return /^(.*)$/;
695
- }
696
- search(e) {
697
- return this._bitapSearch.searchIn(e);
698
- }
699
- }
700
- class Xe extends q {
701
- constructor(e) {
702
- super(e);
703
- }
704
- static get type() {
705
- return "include";
706
- }
707
- static get multiRegex() {
708
- return /^'"(.*)"$/;
709
- }
710
- static get singleRegex() {
711
- return /^'(.*)$/;
712
- }
713
- search(e) {
714
- let t = 0, n;
715
- const i = [], l = this.pattern.length;
716
- for (; (n = e.indexOf(this.pattern, t)) > -1; )
717
- t = n + l, i.push([n, t - 1]);
718
- const r = !!i.length;
719
- return {
720
- isMatch: r,
721
- score: r ? 0 : 1,
722
- indices: i
723
- };
724
- }
725
- }
726
- const Ce = [Kt, Xe, Yt, Qt, Xt, Jt, Gt, Je], Le = Ce.length, Zt = "\0", qt = "|";
727
- function es(s) {
728
- const e = [], t = s.length;
729
- let n = 0;
730
- for (; n < t; ) {
731
- for (; n < t && s[n] === " "; ) n++;
732
- if (n >= t) break;
733
- let i = n;
734
- for (; i < t && s[i] !== " " && s[i] !== '"'; ) i++;
735
- if (i < t && s[i] === '"') {
736
- for (i++; i < t; ) {
737
- if (s[i] === '"') {
738
- const l = i + 1;
739
- if (l >= t || s[l] === " ") {
740
- i++;
741
- break;
742
- }
743
- if (s[l] === "$" && (l + 1 >= t || s[l + 1] === " ")) {
744
- i += 2;
745
- break;
746
- }
747
- }
748
- i++;
749
- }
750
- e.push(s.substring(n, i)), n = i;
751
- } else {
752
- for (; i < t && s[i] !== " "; ) i++;
753
- e.push(s.substring(n, i)), n = i;
754
- }
755
- }
756
- return e;
757
- }
758
- function ts(s, e = {}) {
759
- return s.replace(/\\\|/g, Zt).split(qt).map((n) => {
760
- const i = n.replace(/\u0000/g, "|"), l = es(i.trim()).filter((u) => u && !!u.trim()), r = [];
761
- for (let u = 0, c = l.length; u < c; u += 1) {
762
- const m = l[u];
763
- let o = !1, a = -1;
764
- for (; !o && ++a < Le; ) {
765
- const h = Ce[a], d = h.isMultiMatch(m);
766
- d && (r.push(new h(d, e)), o = !0);
767
- }
768
- if (!o)
769
- for (a = -1; ++a < Le; ) {
770
- const h = Ce[a], d = h.isSingleMatch(m);
771
- if (d) {
772
- r.push(new h(d, e));
773
- break;
774
- }
775
- }
776
- }
777
- return r;
778
- });
779
- }
780
- const ss = /* @__PURE__ */ new Set([Je.type, Xe.type]);
781
- class ns {
782
- constructor(e, {
783
- isCaseSensitive: t = b.isCaseSensitive,
784
- ignoreDiacritics: n = b.ignoreDiacritics,
785
- includeMatches: i = b.includeMatches,
786
- minMatchCharLength: l = b.minMatchCharLength,
787
- ignoreLocation: r = b.ignoreLocation,
788
- findAllMatches: u = b.findAllMatches,
789
- location: c = b.location,
790
- threshold: m = b.threshold,
791
- distance: o = b.distance
792
- } = {}) {
793
- this.query = null, this.options = {
794
- isCaseSensitive: t,
795
- ignoreDiacritics: n,
796
- includeMatches: i,
797
- minMatchCharLength: l,
798
- findAllMatches: u,
799
- ignoreLocation: r,
800
- location: c,
801
- threshold: m,
802
- distance: o
803
- }, e = t ? e : e.toLowerCase(), e = n ? ce(e) : e, this.pattern = e, this.query = ts(this.pattern, this.options);
804
- }
805
- static condition(e, t) {
806
- return t.useExtendedSearch;
807
- }
808
- // Note: searchIn operates on a single text value and sets hasInverse on the
809
- // result when inverse patterns are involved. _searchObjectList uses this to
810
- // switch from "ANY key" to "ALL keys" aggregation. See #712.
811
- searchIn(e) {
812
- const t = this.query;
813
- if (!t)
814
- return {
815
- isMatch: !1,
816
- score: 1
817
- };
818
- const {
819
- includeMatches: n,
820
- isCaseSensitive: i,
821
- ignoreDiacritics: l
822
- } = this.options;
823
- e = i ? e : e.toLowerCase(), e = l ? ce(e) : e;
824
- let r = 0;
825
- const u = [];
826
- let c = 0, m = !1;
827
- for (let o = 0, a = t.length; o < a; o += 1) {
828
- const h = t[o];
829
- u.length = 0, r = 0, m = !1;
830
- for (let d = 0, f = h.length; d < f; d += 1) {
831
- const _ = h[d], {
832
- isMatch: w,
833
- indices: O,
834
- score: L
835
- } = _.search(e);
836
- if (w) {
837
- r += 1, c += L;
838
- const S = _.constructor.type;
839
- S.startsWith("inverse") && (m = !0), n && (ss.has(S) ? u.push(...O) : u.push(O));
840
- } else {
841
- c = 0, r = 0, u.length = 0, m = !1;
842
- break;
843
- }
844
- }
845
- if (r) {
846
- const d = {
847
- isMatch: !0,
848
- score: c / r
849
- };
850
- return m && (d.hasInverse = !0), n && (d.indices = Se(u)), d;
851
- }
852
- }
853
- return {
854
- isMatch: !1,
855
- score: 1
856
- };
857
- }
858
- }
859
- const ke = [];
860
- function Be(...s) {
861
- ke.push(...s);
862
- }
863
- function he(s, e) {
864
- for (let t = 0, n = ke.length; t < n; t += 1) {
865
- const i = ke[t];
866
- if (i.condition(s, e))
867
- return new i(s, e);
868
- }
869
- return new Fe(s, e);
870
- }
871
- const ge = {
872
- AND: "$and",
873
- OR: "$or"
874
- }, Ae = {
875
- PATH: "$path",
876
- PATTERN: "$val"
877
- }, we = (s) => !!(s[ge.AND] || s[ge.OR]), os = (s) => !!s[Ae.PATH], is = (s) => !Z(s) && He(s) && !we(s), Pe = (s) => ({
878
- [ge.AND]: Object.keys(s).map((e) => ({
879
- [e]: s[e]
880
- }))
881
- });
882
- function Ze(s, e, {
883
- auto: t = !0
884
- } = {}) {
885
- const n = (i) => {
886
- if (P(i)) {
887
- const c = {
888
- keyId: null,
889
- pattern: i
890
- };
891
- return t && (c.searcher = he(i, e)), c;
892
- }
893
- const l = Object.keys(i), r = os(i);
894
- if (!r && l.length > 1 && !we(i))
895
- return n(Pe(i));
896
- if (is(i)) {
897
- const c = r ? i[Ae.PATH] : l[0], m = r ? i[Ae.PATTERN] : i[c];
898
- if (!P(m))
899
- throw new Error($t(c));
900
- const o = {
901
- keyId: De(c),
902
- pattern: m
903
- };
904
- return t && (o.searcher = he(m, e)), o;
905
- }
906
- const u = {
907
- children: [],
908
- operator: l[0]
909
- };
910
- return l.forEach((c) => {
911
- const m = i[c];
912
- Z(m) && m.forEach((o) => {
913
- u.children.push(n(o));
914
- });
915
- }), u;
916
- };
917
- return we(s) || (s = Pe(s)), n(s);
918
- }
919
- function Me(s, {
920
- ignoreFieldNorm: e = b.ignoreFieldNorm
921
- }) {
922
- let t = 1;
923
- return s.forEach(({
924
- key: n,
925
- norm: i,
926
- score: l
927
- }) => {
928
- const r = n ? n.weight : null;
929
- t *= Math.pow(l === 0 && r ? Number.EPSILON : l, (r || 1) * (e ? 1 : i));
930
- }), t;
931
- }
932
- function as(s, {
933
- ignoreFieldNorm: e = b.ignoreFieldNorm
934
- }) {
935
- s.forEach((t) => {
936
- t.score = Me(t.matches, {
937
- ignoreFieldNorm: e
938
- });
939
- });
940
- }
941
- class rs {
942
- constructor(e) {
943
- this.limit = e, this.heap = [];
944
- }
945
- get size() {
946
- return this.heap.length;
947
- }
948
- shouldInsert(e) {
949
- return this.size < this.limit || e < this.heap[0].score;
950
- }
951
- insert(e) {
952
- this.size < this.limit ? (this.heap.push(e), this._bubbleUp(this.size - 1)) : e.score < this.heap[0].score && (this.heap[0] = e, this._sinkDown(0));
953
- }
954
- extractSorted(e) {
955
- return this.heap.sort(e);
956
- }
957
- _bubbleUp(e) {
958
- const t = this.heap;
959
- for (; e > 0; ) {
960
- const n = e - 1 >> 1;
961
- if (t[e].score <= t[n].score) break;
962
- const i = t[e];
963
- t[e] = t[n], t[n] = i, e = n;
964
- }
965
- }
966
- _sinkDown(e) {
967
- const t = this.heap, n = t.length;
968
- let i = e;
969
- do {
970
- e = i;
971
- const l = 2 * e + 1, r = 2 * e + 2;
972
- if (l < n && t[l].score > t[i].score && (i = l), r < n && t[r].score > t[i].score && (i = r), i !== e) {
973
- const u = t[e];
974
- t[e] = t[i], t[i] = u;
975
- }
976
- } while (i !== e);
977
- }
978
- }
979
- function ls(s, e) {
980
- const t = s.matches;
981
- e.matches = [], V(t) && t.forEach((n) => {
982
- if (!V(n.indices) || !n.indices.length)
983
- return;
984
- const {
985
- indices: i,
986
- value: l
987
- } = n, r = {
988
- indices: i,
989
- value: l
990
- };
991
- n.key && (r.key = n.key.src), n.idx > -1 && (r.refIndex = n.idx), e.matches.push(r);
992
- });
993
- }
994
- function cs(s, e) {
995
- e.score = s.score;
996
- }
997
- function us(s, e, {
998
- includeMatches: t = b.includeMatches,
999
- includeScore: n = b.includeScore
1000
- } = {}) {
1001
- const i = [];
1002
- return t && i.push(ls), n && i.push(cs), s.map((l) => {
1003
- const {
1004
- idx: r
1005
- } = l, u = {
1006
- item: e[r],
1007
- refIndex: r
1008
- };
1009
- return i.length && i.forEach((c) => {
1010
- c(l, u);
1011
- }), u;
1012
- });
1013
- }
1014
- const ds = /\b\w+\b/g;
1015
- function Ie({
1016
- isCaseSensitive: s = !1,
1017
- ignoreDiacritics: e = !1
1018
- } = {}) {
1019
- return {
1020
- tokenize(t) {
1021
- return s || (t = t.toLowerCase()), e && (t = ce(t)), t.match(ds) || [];
1022
- }
1023
- };
1024
- }
1025
- function fs(s, e, t) {
1026
- const n = /* @__PURE__ */ new Map(), i = /* @__PURE__ */ new Map();
1027
- let l = 0;
1028
- function r(u, c, m, o) {
1029
- const a = t.tokenize(u);
1030
- if (!a.length) return;
1031
- l++;
1032
- const h = /* @__PURE__ */ new Map();
1033
- for (const d of a)
1034
- h.set(d, (h.get(d) || 0) + 1);
1035
- for (const [d, f] of h) {
1036
- const _ = {
1037
- docIdx: c,
1038
- keyIdx: m,
1039
- subIdx: o,
1040
- tf: f
1041
- };
1042
- let w = n.get(d);
1043
- w || (w = [], n.set(d, w)), w.push(_), i.set(d, (i.get(d) || 0) + 1);
1044
- }
1045
- }
1046
- for (const u of s) {
1047
- const {
1048
- i: c,
1049
- v: m,
1050
- $: o
1051
- } = u;
1052
- if (m !== void 0) {
1053
- r(m, c, -1, -1);
1054
- continue;
1055
- }
1056
- if (o)
1057
- for (let a = 0; a < e; a++) {
1058
- const h = o[a];
1059
- if (h)
1060
- if (Array.isArray(h))
1061
- for (const d of h)
1062
- r(d.v, c, a, d.i ?? -1);
1063
- else
1064
- r(h.v, c, a, -1);
1065
- }
1066
- }
1067
- return {
1068
- terms: n,
1069
- fieldCount: l,
1070
- df: i
1071
- };
1072
- }
1073
- function ps(s, e, t, n) {
1074
- const {
1075
- i,
1076
- v: l,
1077
- $: r
1078
- } = e;
1079
- function u(c, m, o) {
1080
- const a = n.tokenize(c);
1081
- if (!a.length) return;
1082
- s.fieldCount++;
1083
- const h = /* @__PURE__ */ new Map();
1084
- for (const d of a)
1085
- h.set(d, (h.get(d) || 0) + 1);
1086
- for (const [d, f] of h) {
1087
- const _ = {
1088
- docIdx: i,
1089
- keyIdx: m,
1090
- subIdx: o,
1091
- tf: f
1092
- };
1093
- let w = s.terms.get(d);
1094
- w || (w = [], s.terms.set(d, w)), w.push(_), s.df.set(d, (s.df.get(d) || 0) + 1);
1095
- }
1096
- }
1097
- if (l !== void 0) {
1098
- u(l, -1, -1);
1099
- return;
1100
- }
1101
- if (r)
1102
- for (let c = 0; c < t; c++) {
1103
- const m = r[c];
1104
- if (m)
1105
- if (Array.isArray(m))
1106
- for (const o of m)
1107
- u(o.v, c, o.i ?? -1);
1108
- else
1109
- u(m.v, c, -1);
1110
- }
1111
- }
1112
- function Ve(s, e) {
1113
- for (const [t, n] of s.terms) {
1114
- const i = n.filter((r) => r.docIdx !== e), l = n.length - i.length;
1115
- l > 0 && (s.fieldCount -= l, s.df.set(t, (s.df.get(t) || 0) - l), i.length === 0 ? (s.terms.delete(t), s.df.delete(t)) : s.terms.set(t, i));
1116
- }
1117
- }
1118
- class se {
1119
- // Statics are assigned in entry.ts
1120
- constructor(e, t, n) {
1121
- this.options = {
1122
- ...b,
1123
- ...t
1124
- }, this.options.useExtendedSearch, this.options.useTokenSearch, this._keyStore = new Bt(this.options.keys), this._docs = e, this._myIndex = null, this._invertedIndex = null, this.setCollection(e, n), this._lastQuery = null, this._lastSearcher = null;
1125
- }
1126
- _getSearcher(e) {
1127
- if (this._lastQuery === e)
1128
- return this._lastSearcher;
1129
- const t = this._invertedIndex ? {
1130
- ...this.options,
1131
- _invertedIndex: this._invertedIndex
1132
- } : this.options, n = he(e, t);
1133
- return this._lastQuery = e, this._lastSearcher = n, n;
1134
- }
1135
- setCollection(e, t) {
1136
- if (this._docs = e, t && !(t instanceof Ee))
1137
- throw new Error(It);
1138
- if (this._myIndex = t || Ye(this.options.keys, this._docs, {
1139
- getFn: this.options.getFn,
1140
- fieldNormWeight: this.options.fieldNormWeight
1141
- }), this.options.useTokenSearch) {
1142
- const n = Ie({
1143
- isCaseSensitive: this.options.isCaseSensitive,
1144
- ignoreDiacritics: this.options.ignoreDiacritics
1145
- });
1146
- this._invertedIndex = fs(this._myIndex.records, this._myIndex.keys.length, n);
1147
- }
1148
- }
1149
- add(e) {
1150
- if (V(e) && (this._docs.push(e), this._myIndex.add(e), this._invertedIndex)) {
1151
- const t = this._myIndex.records[this._myIndex.records.length - 1], n = Ie({
1152
- isCaseSensitive: this.options.isCaseSensitive,
1153
- ignoreDiacritics: this.options.ignoreDiacritics
1154
- });
1155
- ps(this._invertedIndex, t, this._myIndex.keys.length, n);
1156
- }
1157
- }
1158
- remove(e = () => !1) {
1159
- const t = [], n = [];
1160
- for (let i = 0, l = this._docs.length; i < l; i += 1)
1161
- e(this._docs[i], i) && (t.push(this._docs[i]), n.push(i));
1162
- if (n.length) {
1163
- if (this._invertedIndex)
1164
- for (const i of n)
1165
- Ve(this._invertedIndex, i);
1166
- for (let i = n.length - 1; i >= 0; i -= 1)
1167
- this._docs.splice(n[i], 1);
1168
- this._myIndex.removeAll(n);
1169
- }
1170
- return t;
1171
- }
1172
- removeAt(e) {
1173
- this._invertedIndex && Ve(this._invertedIndex, e);
1174
- const t = this._docs.splice(e, 1)[0];
1175
- return this._myIndex.removeAt(e), t;
1176
- }
1177
- getIndex() {
1178
- return this._myIndex;
1179
- }
1180
- search(e, t) {
1181
- const {
1182
- limit: n = -1
1183
- } = t || {}, {
1184
- includeMatches: i,
1185
- includeScore: l,
1186
- shouldSort: r,
1187
- sortFn: u,
1188
- ignoreFieldNorm: c
1189
- } = this.options;
1190
- if (P(e) && !e.trim()) {
1191
- let a = this._docs.map((h, d) => ({
1192
- item: h,
1193
- refIndex: d
1194
- }));
1195
- return me(n) && n > -1 && (a = a.slice(0, n)), a;
1196
- }
1197
- const m = me(n) && n > 0 && P(e);
1198
- let o;
1199
- if (m) {
1200
- const a = new rs(n);
1201
- P(this._docs[0]) ? this._searchStringList(e, {
1202
- heap: a,
1203
- ignoreFieldNorm: c
1204
- }) : this._searchObjectList(e, {
1205
- heap: a,
1206
- ignoreFieldNorm: c
1207
- }), o = a.extractSorted(u);
1208
- } else
1209
- o = P(e) ? P(this._docs[0]) ? this._searchStringList(e) : this._searchObjectList(e) : this._searchLogical(e), as(o, {
1210
- ignoreFieldNorm: c
1211
- }), r && o.sort(u), me(n) && n > -1 && (o = o.slice(0, n));
1212
- return us(o, this._docs, {
1213
- includeMatches: i,
1214
- includeScore: l
1215
- });
1216
- }
1217
- _searchStringList(e, {
1218
- heap: t,
1219
- ignoreFieldNorm: n
1220
- } = {}) {
1221
- const i = this._getSearcher(e), {
1222
- records: l
1223
- } = this._myIndex, r = t ? null : [];
1224
- return l.forEach(({
1225
- v: u,
1226
- i: c,
1227
- n: m
1228
- }) => {
1229
- if (!V(u))
1230
- return;
1231
- const {
1232
- isMatch: o,
1233
- score: a,
1234
- indices: h
1235
- } = i.searchIn(u);
1236
- if (o) {
1237
- const d = {
1238
- item: u,
1239
- idx: c,
1240
- matches: [{
1241
- score: a,
1242
- value: u,
1243
- norm: m,
1244
- indices: h
1245
- }]
1246
- };
1247
- t ? (d.score = Me(d.matches, {
1248
- ignoreFieldNorm: n
1249
- }), t.shouldInsert(d.score) && t.insert(d)) : r.push(d);
1250
- }
1251
- }), r;
1252
- }
1253
- _searchLogical(e) {
1254
- const t = Ze(e, this.options), n = (u, c, m) => {
1255
- if (!("children" in u)) {
1256
- const {
1257
- keyId: d,
1258
- searcher: f
1259
- } = u;
1260
- let _;
1261
- return d === null ? (_ = [], this._myIndex.keys.forEach((w, O) => {
1262
- _.push(...this._findMatches({
1263
- key: w,
1264
- value: c[O],
1265
- searcher: f
1266
- }));
1267
- })) : _ = this._findMatches({
1268
- key: this._keyStore.get(d),
1269
- value: this._myIndex.getValueForItemAtKeyId(c, d),
1270
- searcher: f
1271
- }), _ && _.length ? [{
1272
- idx: m,
1273
- item: c,
1274
- matches: _
1275
- }] : [];
1276
- }
1277
- const {
1278
- children: o,
1279
- operator: a
1280
- } = u, h = [];
1281
- for (let d = 0, f = o.length; d < f; d += 1) {
1282
- const _ = o[d], w = n(_, c, m);
1283
- if (w.length)
1284
- h.push(...w);
1285
- else if (a === ge.AND)
1286
- return [];
1287
- }
1288
- return h;
1289
- }, i = this._myIndex.records, l = /* @__PURE__ */ new Map(), r = [];
1290
- return i.forEach(({
1291
- $: u,
1292
- i: c
1293
- }) => {
1294
- if (V(u)) {
1295
- const m = n(t, u, c);
1296
- m.length && (l.has(c) || (l.set(c, {
1297
- idx: c,
1298
- item: u,
1299
- matches: []
1300
- }), r.push(l.get(c))), m.forEach(({
1301
- matches: o
1302
- }) => {
1303
- l.get(c).matches.push(...o);
1304
- }));
1305
- }
1306
- }), r;
1307
- }
1308
- // When a search involves inverse patterns (e.g. !Syrup), the aggregation
1309
- // across keys switches from "ANY key matches" to "ALL keys must match."
1310
- // This is signaled by hasInverse on the SearchResult from ExtendedSearch.
1311
- //
1312
- // For mixed patterns like "^hello !Syrup", a key failure is ambiguous —
1313
- // it could be the positive or inverse term that failed. In that case we
1314
- // conservatively exclude the item, which is strictly better than the old
1315
- // behavior of including it. See: https://github.com/krisk/Fuse/issues/712
1316
- _searchObjectList(e, {
1317
- heap: t,
1318
- ignoreFieldNorm: n
1319
- } = {}) {
1320
- const i = this._getSearcher(e), {
1321
- keys: l,
1322
- records: r
1323
- } = this._myIndex, u = t ? null : [];
1324
- return r.forEach(({
1325
- $: c,
1326
- i: m
1327
- }) => {
1328
- if (!V(c))
1329
- return;
1330
- const o = [];
1331
- let a = !1, h = !1;
1332
- if (l.forEach((d, f) => {
1333
- const _ = this._findMatches({
1334
- key: d,
1335
- value: c[f],
1336
- searcher: i
1337
- });
1338
- _.length ? (o.push(..._), _[0].hasInverse && (h = !0)) : a = !0;
1339
- }), !(h && a) && o.length) {
1340
- const d = {
1341
- idx: m,
1342
- item: c,
1343
- matches: o
1344
- };
1345
- t ? (d.score = Me(d.matches, {
1346
- ignoreFieldNorm: n
1347
- }), t.shouldInsert(d.score) && t.insert(d)) : u.push(d);
1348
- }
1349
- }), u;
1350
- }
1351
- _findMatches({
1352
- key: e,
1353
- value: t,
1354
- searcher: n
1355
- }) {
1356
- if (!V(t))
1357
- return [];
1358
- const i = [];
1359
- if (Z(t))
1360
- t.forEach(({
1361
- v: l,
1362
- i: r,
1363
- n: u
1364
- }) => {
1365
- if (!V(l))
1366
- return;
1367
- const {
1368
- isMatch: c,
1369
- score: m,
1370
- indices: o,
1371
- hasInverse: a
1372
- } = n.searchIn(l);
1373
- c && i.push({
1374
- score: m,
1375
- key: e,
1376
- value: l,
1377
- idx: r,
1378
- norm: u,
1379
- indices: o,
1380
- hasInverse: a
1381
- });
1382
- });
1383
- else {
1384
- const {
1385
- v: l,
1386
- n: r
1387
- } = t, {
1388
- isMatch: u,
1389
- score: c,
1390
- indices: m,
1391
- hasInverse: o
1392
- } = n.searchIn(l);
1393
- u && i.push({
1394
- score: c,
1395
- key: e,
1396
- value: l,
1397
- norm: r,
1398
- indices: m,
1399
- hasInverse: o
1400
- });
1401
- }
1402
- return i;
1403
- }
1404
- }
1405
- class ms {
1406
- static condition(e, t) {
1407
- return t.useTokenSearch;
1408
- }
1409
- constructor(e, t) {
1410
- this.options = t, this.analyzer = Ie({
1411
- isCaseSensitive: t.isCaseSensitive,
1412
- ignoreDiacritics: t.ignoreDiacritics
1413
- });
1414
- const n = this.analyzer.tokenize(e), i = t._invertedIndex, {
1415
- df: l,
1416
- fieldCount: r
1417
- } = i;
1418
- this.termSearchers = [], this.idfWeights = [];
1419
- for (const u of n) {
1420
- this.termSearchers.push(new Fe(u, {
1421
- location: t.location,
1422
- threshold: t.threshold,
1423
- distance: t.distance,
1424
- includeMatches: t.includeMatches,
1425
- findAllMatches: t.findAllMatches,
1426
- minMatchCharLength: t.minMatchCharLength,
1427
- isCaseSensitive: t.isCaseSensitive,
1428
- ignoreDiacritics: t.ignoreDiacritics,
1429
- ignoreLocation: !0
1430
- }));
1431
- const c = l.get(u) || 0, m = Math.log(1 + (r - c + 0.5) / (c + 0.5));
1432
- this.idfWeights.push(m);
1433
- }
1434
- }
1435
- searchIn(e) {
1436
- if (!this.termSearchers.length)
1437
- return {
1438
- isMatch: !1,
1439
- score: 1
1440
- };
1441
- const t = [];
1442
- let n = 0, i = 0, l = 0;
1443
- for (let c = 0; c < this.termSearchers.length; c++) {
1444
- const m = this.termSearchers[c].searchIn(e), o = this.idfWeights[c];
1445
- i += o, m.isMatch && (l++, n += o * (1 - m.score), m.indices && t.push(...m.indices));
1446
- }
1447
- if (l === 0)
1448
- return {
1449
- isMatch: !1,
1450
- score: 1
1451
- };
1452
- const r = i > 0 ? 1 - n / i : 0, u = {
1453
- isMatch: !0,
1454
- score: Math.max(1e-3, r)
1455
- };
1456
- return this.options.includeMatches && t.length && (u.indices = Se(t)), u;
1457
- }
1458
- }
1459
- se.version = "7.3.0";
1460
- se.createIndex = Ye;
1461
- se.parseIndex = Pt;
1462
- se.config = b;
1463
- se.match = function(s, e, t) {
1464
- return he(s, {
1465
- ...b,
1466
- ...t
1467
- }).searchIn(e);
1468
- };
1469
- se.parseQuery = Ze;
1470
- Be(ns);
1471
- Be(ms);
1472
- se.use = function(...s) {
1473
- s.forEach((e) => Be(e));
1474
- };
1475
- const ee = (s) => s == null ? "—" : `€${s.toFixed(2)}`, hs = (s) => {
1476
- if (!s) return "—";
1477
- if (s < 60) return `${s} min`;
1478
- const e = Math.floor(s / 60), t = s % 60;
1479
- return t > 0 ? `${e}h ${t}min` : `${e}h`;
1480
- }, gs = (s) => {
1481
- switch (s) {
1482
- case "confirmed":
1483
- return "Confirmed";
1484
- case "pending":
1485
- return "Pending";
1486
- case "cancelled":
1487
- return "Cancelled";
1488
- default:
1489
- return s || "Unknown";
1490
- }
1491
- }, Ue = (s) => {
1492
- switch (s) {
1493
- case "confirmed":
1494
- return "#16a34a";
1495
- // green-600
1496
- case "pending":
1497
- return "#ca8a04";
1498
- // yellow-600
1499
- case "cancelled":
1500
- return "#dc2626";
1501
- // red-600
1502
- default:
1503
- return "#6b7280";
1504
- }
1505
- }, vs = (s, e = {}) => {
1506
- const t = `${s.customerInfo?.firstName || ""} ${s.customerInfo?.lastName || ""}`.trim() || "Unknown Customer", n = s.id?.slice(0, 8) || "—", i = (/* @__PURE__ */ new Date()).toLocaleDateString("en-US", {
1507
- year: "numeric",
1508
- month: "long",
1509
- day: "numeric"
1510
- }), l = `
1511
- <!DOCTYPE html>
1512
- <html lang="en">
1513
- <head>
1514
- <meta charset="UTF-8">
1515
- <meta name="viewport" content="width=device-width, initial-scale=1.0">
1516
- <title>Reservation ${n}</title>
1517
- <style>
1518
- * {
1519
- margin: 0;
1520
- padding: 0;
1521
- box-sizing: border-box;
1522
- }
1523
-
1524
- body {
1525
- font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
1526
- line-height: 1.6;
1527
- color: #1f2937;
1528
- background: #fff;
1529
- padding: 40px;
1530
- max-width: 800px;
1531
- margin: 0 auto;
1532
- }
1533
-
1534
- .header {
1535
- display: flex;
1536
- justify-content: space-between;
1537
- align-items: flex-start;
1538
- margin-bottom: 40px;
1539
- padding-bottom: 20px;
1540
- border-bottom: 2px solid #e5e7eb;
1541
- }
1542
-
1543
- .company-info {
1544
- display: flex;
1545
- align-items: center;
1546
- gap: 16px;
1547
- }
1548
-
1549
- .company-logo {
1550
- max-height: 50px;
1551
- max-width: 150px;
1552
- object-fit: contain;
1553
- }
1554
-
1555
- .company-name {
1556
- font-size: 24px;
1557
- font-weight: 700;
1558
- color: #111827;
1559
- }
1560
-
1561
- .document-info {
1562
- text-align: right;
1563
- }
1564
-
1565
- .document-title {
1566
- font-size: 28px;
1567
- font-weight: 700;
1568
- color: #111827;
1569
- margin-bottom: 8px;
1570
- }
1571
-
1572
- .booking-id {
1573
- font-size: 14px;
1574
- color: #6b7280;
1575
- }
1576
-
1577
- .status-badge {
1578
- display: inline-block;
1579
- padding: 4px 12px;
1580
- border-radius: 9999px;
1581
- font-size: 12px;
1582
- font-weight: 600;
1583
- text-transform: uppercase;
1584
- margin-top: 8px;
1585
- }
1586
-
1587
- .section {
1588
- margin-bottom: 32px;
1589
- }
1590
-
1591
- .section-title {
1592
- font-size: 12px;
1593
- font-weight: 600;
1594
- text-transform: uppercase;
1595
- letter-spacing: 0.05em;
1596
- color: #6b7280;
1597
- margin-bottom: 12px;
1598
- }
1599
-
1600
- .section-content {
1601
- background: #f9fafb;
1602
- border-radius: 8px;
1603
- padding: 20px;
1604
- }
1605
-
1606
- .customer-name {
1607
- font-size: 18px;
1608
- font-weight: 600;
1609
- margin-bottom: 8px;
1610
- }
1611
-
1612
- .contact-info {
1613
- font-size: 14px;
1614
- color: #4b5563;
1615
- }
1616
-
1617
- .contact-info a {
1618
- color: #4b5563;
1619
- text-decoration: none;
1620
- }
1621
-
1622
- .grid {
1623
- display: grid;
1624
- grid-template-columns: 1fr 1fr;
1625
- gap: 16px;
1626
- }
1627
-
1628
- .info-card {
1629
- background: #f9fafb;
1630
- border-radius: 8px;
1631
- padding: 16px;
1632
- }
1633
-
1634
- .info-label {
1635
- font-size: 12px;
1636
- color: #6b7280;
1637
- margin-bottom: 4px;
1638
- }
1639
-
1640
- .info-value {
1641
- font-size: 16px;
1642
- font-weight: 600;
1643
- }
1644
-
1645
- .package-row {
1646
- display: flex;
1647
- justify-content: space-between;
1648
- align-items: flex-start;
1649
- }
1650
-
1651
- .package-name {
1652
- font-size: 16px;
1653
- font-weight: 600;
1654
- }
1655
-
1656
- .package-duration {
1657
- font-size: 14px;
1658
- color: #6b7280;
1659
- }
1660
-
1661
- .package-price {
1662
- font-size: 16px;
1663
- font-weight: 600;
1664
- }
1665
-
1666
- .payment-row {
1667
- display: flex;
1668
- justify-content: space-between;
1669
- padding: 8px 0;
1670
- font-size: 14px;
1671
- }
1672
-
1673
- .payment-label {
1674
- color: #6b7280;
1675
- }
1676
-
1677
- .payment-value {
1678
- font-weight: 500;
1679
- }
1680
-
1681
- .payment-value.green {
1682
- color: #16a34a;
1683
- }
1684
-
1685
- .payment-value.orange {
1686
- color: #ea580c;
1687
- }
1688
-
1689
- .payment-divider {
1690
- border-top: 1px solid #e5e7eb;
1691
- margin: 12px 0;
1692
- }
1693
-
1694
- .payment-total {
1695
- font-size: 16px;
1696
- font-weight: 600;
1697
- }
1698
-
1699
- .footer {
1700
- margin-top: 60px;
1701
- padding-top: 20px;
1702
- border-top: 1px solid #e5e7eb;
1703
- text-align: center;
1704
- font-size: 12px;
1705
- color: #9ca3af;
1706
- }
1707
-
1708
- @media print {
1709
- body {
1710
- padding: 20px;
1711
- }
1712
-
1713
- .no-print {
1714
- display: none;
1715
- }
1716
- }
1717
- </style>
1718
- </head>
1719
- <body>
1720
- <div class="header">
1721
- <div class="company-info">
1722
- ${e.companyLogo ? `<img src="${e.companyLogo}" alt="Logo" class="company-logo" />` : ""}
1723
- ${e.companyName ? `<span class="company-name">${e.companyName}</span>` : ""}
1724
- </div>
1725
- <div class="document-info">
1726
- <div class="document-title">Reservation</div>
1727
- <div class="booking-id">Booking #${n}</div>
1728
- <div
1729
- class="status-badge"
1730
- style="background-color: ${Ue(s.status)}20; color: ${Ue(s.status)};"
1731
- >
1732
- ${gs(s.status)}
1733
- </div>
1734
- </div>
1735
- </div>
1736
-
1737
- <div class="section">
1738
- <div class="section-title">Customer</div>
1739
- <div class="section-content">
1740
- <div class="customer-name">${t}</div>
1741
- <div class="contact-info">
1742
- ${s.customerInfo?.email ? `<div>Email: <a href="mailto:${s.customerInfo.email}">${s.customerInfo.email}</a></div>` : ""}
1743
- ${s.customerInfo?.phone ? `<div>Phone: <a href="tel:${s.customerInfo.phone}">${s.customerInfo.phone}</a></div>` : ""}
1744
- </div>
1745
- </div>
1746
- </div>
1747
-
1748
- <div class="section">
1749
- <div class="section-title">Reservation Details</div>
1750
- <div class="grid">
1751
- <div class="info-card">
1752
- <div class="info-label">Date</div>
1753
- <div class="info-value">${e.date || "—"}</div>
1754
- </div>
1755
- <div class="info-card">
1756
- <div class="info-label">Time</div>
1757
- <div class="info-value">${s.startTime} - ${s.endTime}</div>
1758
- </div>
1759
- <div class="info-card">
1760
- <div class="info-label">Spots</div>
1761
- <div class="info-value">${s.spots || 1} ${(s.spots || 1) === 1 ? "person" : "people"}</div>
1762
- </div>
1763
- ${e.resourceName ? `
1764
- <div class="info-card">
1765
- <div class="info-label">Resource</div>
1766
- <div class="info-value">${e.resourceName}</div>
1767
- </div>
1768
- ` : ""}
1769
- ${e.agendaName ? `
1770
- <div class="info-card">
1771
- <div class="info-label">Service</div>
1772
- <div class="info-value">${e.agendaName}</div>
1773
- </div>
1774
- ` : ""}
1775
- </div>
1776
- </div>
1777
-
1778
- ${s.pricingOption ? `
1779
- <div class="section">
1780
- <div class="section-title">Package</div>
1781
- <div class="section-content">
1782
- <div class="package-row">
1783
- <div>
1784
- <div class="package-name">${s.pricingOption.name}</div>
1785
- <div class="package-duration">${hs(s.pricingOption.duration)}</div>
1786
- </div>
1787
- <div class="package-price">${ee(s.pricingOption.price)}</div>
1788
- </div>
1789
- </div>
1790
- </div>
1791
- ` : ""}
1792
-
1793
- <div class="section">
1794
- <div class="section-title">Payment Summary</div>
1795
- <div class="section-content">
1796
- <div class="payment-row">
1797
- <span class="payment-label">Base price</span>
1798
- <span class="payment-value">${ee(s.reservationBasePrice)}</span>
1799
- </div>
1800
- ${s.reservationAddOnsPrice ? `
1801
- <div class="payment-row">
1802
- <span class="payment-label">Add-ons</span>
1803
- <span class="payment-value">${ee(s.reservationAddOnsPrice)}</span>
1804
- </div>
1805
- ` : ""}
1806
- ${s.discount ? `
1807
- <div class="payment-row">
1808
- <span class="payment-label">Discount</span>
1809
- <span class="payment-value green">-${ee(s.discount)}</span>
1810
- </div>
1811
- ` : ""}
1812
-
1813
- <div class="payment-divider"></div>
1814
-
1815
- <div class="payment-row payment-total">
1816
- <span>Reservation Total</span>
1817
- <span>${ee(s.reservationPrice)}</span>
1818
- </div>
1819
-
1820
- ${s.amountPaid !== void 0 || s.amountDue !== void 0 ? `
1821
- <div class="payment-divider"></div>
1822
-
1823
- ${s.amountPaid !== void 0 ? `
1824
- <div class="payment-row">
1825
- <span class="payment-label">Amount paid</span>
1826
- <span class="payment-value green">${ee(s.amountPaid)}</span>
1827
- </div>
1828
- ` : ""}
1829
-
1830
- ${s.amountDue !== void 0 && s.amountDue > 0 ? `
1831
- <div class="payment-row">
1832
- <span class="payment-label">Amount due</span>
1833
- <span class="payment-value orange">${ee(s.amountDue)}</span>
1834
- </div>
1835
- ` : ""}
1836
- ` : ""}
1837
- </div>
1838
- </div>
1839
-
1840
- <div class="footer">
1841
- <p>Generated on ${i}</p>
1842
- ${e.companyName ? `<p>${e.companyName}</p>` : ""}
1843
- </div>
1844
- </body>
1845
- </html>
1846
- `, r = window.open("", "_blank");
1847
- r && (r.document.write(l), r.document.close(), r.onload = () => {
1848
- r.print();
1849
- });
1850
- }, _s = { class: "flex items-center bg-muted/70 dark:bg-muted/20 px-4 rounded-md" }, ys = { class: "grid gap-2" }, xs = { class: "grid gap-2" }, bs = { class: "grid gap-2" }, Ds = /* @__PURE__ */ ie({
1851
- __name: "CancelReservationDialog",
1852
- emits: ["confirm"],
1853
- setup(s, { expose: e, emit: t }) {
1854
- const { config: n } = ue(), { sendMail: i } = $e(n.mailAccount), l = t, r = R(!1), u = R(!1), c = R(""), m = R(""), o = R(""), a = (d) => {
1855
- u.value = !n.mailAccount, r.value = !0, d && (c.value = d.customerInfo?.email, m.value = "Cancellation of your reservation - " + new Date(d.date)?.toDateString(), o.value = `Dear ${d.customerInfo?.firstName ?? ""} ${d.customerInfo?.lastName ?? ""},
1856
-
1857
- We are writing to inform you that your reservation scheduled for ${new Date(d.date)?.toDateString()} at ${d.startTime} has been cancelled.
1858
-
1859
- Please accept our sincere apologies for any inconvenience this may cause. We would be happy to help you find an alternative time that works for you.`);
1860
- }, h = () => {
1861
- if (!u.value) {
1862
- if (!c.value || !m.value || !o.value) return alert("Please fill in all the fields.");
1863
- i({
1864
- to: c.value,
1865
- subject: m.value,
1866
- body: o.value
1867
- });
1868
- }
1869
- r.value = !1;
1870
- const { $confetti: d } = useNuxtApp();
1871
- d(), l("confirm");
1872
- };
1873
- return e({
1874
- openDialog: a
1875
- }), (d, f) => {
1876
- const _ = x("DialogTitle"), w = x("DialogDescription"), O = x("DialogHeader"), L = x("Checkbox"), S = x("Label"), B = x("Input"), j = x("Textarea"), K = x("Button"), W = x("DialogFooter"), F = x("DialogScrollContent"), T = x("Dialog");
1877
- return D(), H(T, {
1878
- open: r.value,
1879
- "onUpdate:open": f[5] || (f[5] = (k) => r.value = k)
1880
- }, {
1881
- default: y(() => [
1882
- p(F, { class: "sm:max-w-3xl" }, {
1883
- default: y(() => [
1884
- p(O, null, {
1885
- default: y(() => [
1886
- p(_, null, {
1887
- default: y(() => [...f[6] || (f[6] = [
1888
- C(" Cancel Reservation ", -1)
1889
- ])]),
1890
- _: 1
1891
- }),
1892
- p(w)
1893
- ]),
1894
- _: 1
1895
- }),
1896
- g("div", _s, [
1897
- p(L, {
1898
- modelValue: u.value,
1899
- "onUpdate:modelValue": f[0] || (f[0] = (k) => u.value = k),
1900
- id: "cancel-dialog-skip-mail",
1901
- class: "border-black/80 dark:border-gray-200",
1902
- disabled: !$(n).mailAccount
1903
- }, null, 8, ["modelValue", "disabled"]),
1904
- p(S, {
1905
- for: "cancel-dialog-skip-mail",
1906
- class: "py-4 pl-2 pr-4"
1907
- }, {
1908
- default: y(() => [...f[7] || (f[7] = [
1909
- C("Do not send email to customer", -1)
1910
- ])]),
1911
- _: 1
1912
- })
1913
- ]),
1914
- g("div", {
1915
- class: Y(["grid gap-4 py-4", { "opacity-50": u.value }])
1916
- }, [
1917
- g("div", ys, [
1918
- p(S, { for: "cancel-dialog-email" }, {
1919
- default: y(() => [...f[8] || (f[8] = [
1920
- C("To:", -1)
1921
- ])]),
1922
- _: 1
1923
- }),
1924
- p(B, {
1925
- modelValue: c.value,
1926
- "onUpdate:modelValue": f[1] || (f[1] = (k) => c.value = k),
1927
- disabled: u.value,
1928
- id: "cancel-dialog-email"
1929
- }, null, 8, ["modelValue", "disabled"])
1930
- ]),
1931
- g("div", xs, [
1932
- p(S, { for: "cancel-dialog-subject" }, {
1933
- default: y(() => [...f[9] || (f[9] = [
1934
- C("Subject:", -1)
1935
- ])]),
1936
- _: 1
1937
- }),
1938
- p(B, {
1939
- modelValue: m.value,
1940
- "onUpdate:modelValue": f[2] || (f[2] = (k) => m.value = k),
1941
- disabled: u.value,
1942
- id: "cancel-dialog-subject"
1943
- }, null, 8, ["modelValue", "disabled"])
1944
- ]),
1945
- g("div", bs, [
1946
- p(S, { for: "cancel-dialog-body" }, {
1947
- default: y(() => [...f[10] || (f[10] = [
1948
- C("Body:", -1)
1949
- ])]),
1950
- _: 1
1951
- }),
1952
- p(j, {
1953
- modelValue: o.value,
1954
- "onUpdate:modelValue": f[3] || (f[3] = (k) => o.value = k),
1955
- disabled: u.value,
1956
- id: "cancel-dialog-body"
1957
- }, null, 8, ["modelValue", "disabled"])
1958
- ])
1959
- ], 2),
1960
- p(W, null, {
1961
- default: y(() => [
1962
- p(K, {
1963
- variant: "outline",
1964
- onClick: f[4] || (f[4] = (k) => r.value = !1)
1965
- }, {
1966
- default: y(() => [...f[11] || (f[11] = [
1967
- C("Close", -1)
1968
- ])]),
1969
- _: 1
1970
- }),
1971
- p(K, {
1972
- variant: "destructive",
1973
- onClick: h
1974
- }, {
1975
- default: y(() => [...f[12] || (f[12] = [
1976
- C("Cancel reservation", -1)
1977
- ])]),
1978
- _: 1
1979
- })
1980
- ]),
1981
- _: 1
1982
- })
1983
- ]),
1984
- _: 1
1985
- })
1986
- ]),
1987
- _: 1
1988
- }, 8, ["open"]);
1989
- };
1990
- }
1991
- }), Cs = /* @__PURE__ */ ie({
1992
- __name: "TransferReservationDialog",
1993
- setup(s, { expose: e }) {
1994
- const { config: t } = ue(), n = R(!1);
1995
- return e({
1996
- openDialog: () => {
1997
- n.value = !0;
1998
- }
1999
- }), (l, r) => {
2000
- const u = x("DialogTitle"), c = x("DialogDescription"), m = x("DialogHeader"), o = x("Button"), a = x("DialogFooter"), h = x("DialogScrollContent"), d = x("Dialog");
2001
- return D(), H(d, {
2002
- open: n.value,
2003
- "onUpdate:open": r[2] || (r[2] = (f) => n.value = f)
2004
- }, {
2005
- default: y(() => [
2006
- p(h, { class: "sm:max-w-3xl" }, {
2007
- default: y(() => [
2008
- p(m, null, {
2009
- default: y(() => [
2010
- p(u, null, {
2011
- default: y(() => [...r[3] || (r[3] = [
2012
- C(" Transfer Reservation ", -1)
2013
- ])]),
2014
- _: 1
2015
- }),
2016
- p(c)
2017
- ]),
2018
- _: 1
2019
- }),
2020
- r[6] || (r[6] = g("div", { class: "py-4" }, null, -1)),
2021
- p(a, null, {
2022
- default: y(() => [
2023
- p(o, {
2024
- variant: "outline",
2025
- onClick: r[0] || (r[0] = (f) => n.value = !1)
2026
- }, {
2027
- default: y(() => [...r[4] || (r[4] = [
2028
- C("Close", -1)
2029
- ])]),
2030
- _: 1
2031
- }),
2032
- p(o, {
2033
- onClick: r[1] || (r[1] = (f) => n.value = !1)
2034
- }, {
2035
- default: y(() => [...r[5] || (r[5] = [
2036
- C("Transfer reservation", -1)
2037
- ])]),
2038
- _: 1
2039
- })
2040
- ]),
2041
- _: 1
2042
- })
2043
- ]),
2044
- _: 1
2045
- })
2046
- ]),
2047
- _: 1
2048
- }, 8, ["open"]);
2049
- };
2050
- }
2051
- }), ks = { class: "flex items-center bg-muted/70 dark:bg-muted/20 px-4 rounded-md" }, As = { class: "grid gap-2" }, ws = { class: "grid gap-2" }, Ms = { class: "grid gap-2" }, Is = /* @__PURE__ */ ie({
2052
- __name: "ApproveReservationDialog",
2053
- emits: ["confirm"],
2054
- setup(s, { expose: e, emit: t }) {
2055
- const { config: n } = ue(), { sendMail: i } = $e(n.mailAccount), l = t, r = R(!1), u = R("approve"), c = R(!1), m = R(""), o = R(""), a = R(""), h = (f, _) => {
2056
- c.value = !n.mailAccount, r.value = !0, f && (_ || (_ = "approve"), u.value = _, m.value = f.customerInfo?.email, o.value = "Confirmation: Your reservation for " + new Date(f.date)?.toDateString(), a.value = `Dear ${f.customerInfo?.firstName ?? ""} ${f.customerInfo?.lastName ?? ""},
2057
-
2058
- This email confirms your reservation for ${new Date(f.date)?.toDateString()} at ${f.startTime}.
2059
-
2060
- We've got everything ready for you and look forward to your visit! If you need to make any changes or have special requests, please let us know.`);
2061
- }, d = () => {
2062
- if (!c.value) {
2063
- if (!m.value || !o.value || !a.value) return alert("Please fill in all the fields.");
2064
- i({
2065
- to: m.value,
2066
- subject: o.value,
2067
- body: a.value
2068
- });
2069
- }
2070
- r.value = !1;
2071
- const { $confetti: f } = useNuxtApp();
2072
- f(), l("confirm");
2073
- };
2074
- return e({
2075
- openDialog: h
2076
- }), (f, _) => {
2077
- const w = x("DialogTitle"), O = x("DialogDescription"), L = x("DialogHeader"), S = x("Checkbox"), B = x("Label"), j = x("Input"), K = x("Textarea"), W = x("Button"), F = x("DialogFooter"), T = x("DialogScrollContent"), k = x("Dialog");
2078
- return D(), H(k, {
2079
- open: r.value,
2080
- "onUpdate:open": _[5] || (_[5] = (N) => r.value = N)
2081
- }, {
2082
- default: y(() => [
2083
- p(T, { class: "sm:max-w-3xl" }, {
2084
- default: y(() => [
2085
- p(L, null, {
2086
- default: y(() => [
2087
- p(w, null, {
2088
- default: y(() => [
2089
- C(I(u.value === "approve" ? "Approve Reservation" : "Resend Confirmation Email"), 1)
2090
- ]),
2091
- _: 1
2092
- }),
2093
- p(O)
2094
- ]),
2095
- _: 1
2096
- }),
2097
- g("div", ks, [
2098
- p(S, {
2099
- modelValue: c.value,
2100
- "onUpdate:modelValue": _[0] || (_[0] = (N) => c.value = N),
2101
- id: "reject-dialog-skip-mail",
2102
- class: "border-black/80 dark:border-gray-200",
2103
- disabled: !$(n).mailAccount
2104
- }, null, 8, ["modelValue", "disabled"]),
2105
- p(B, {
2106
- for: "reject-dialog-skip-mail",
2107
- class: "py-4 pl-2 pr-4"
2108
- }, {
2109
- default: y(() => [..._[6] || (_[6] = [
2110
- C("Do not send email to customer", -1)
2111
- ])]),
2112
- _: 1
2113
- })
2114
- ]),
2115
- g("div", {
2116
- class: Y(["grid gap-4 py-4", { "opacity-50": c.value }])
2117
- }, [
2118
- g("div", As, [
2119
- p(B, { for: "approve-dialog-email" }, {
2120
- default: y(() => [..._[7] || (_[7] = [
2121
- C("To:", -1)
2122
- ])]),
2123
- _: 1
2124
- }),
2125
- p(j, {
2126
- modelValue: m.value,
2127
- "onUpdate:modelValue": _[1] || (_[1] = (N) => m.value = N),
2128
- disabled: c.value,
2129
- id: "approve-dialog-email"
2130
- }, null, 8, ["modelValue", "disabled"])
2131
- ]),
2132
- g("div", ws, [
2133
- p(B, { for: "approve-dialog-subject" }, {
2134
- default: y(() => [..._[8] || (_[8] = [
2135
- C("Subject:", -1)
2136
- ])]),
2137
- _: 1
2138
- }),
2139
- p(j, {
2140
- modelValue: o.value,
2141
- "onUpdate:modelValue": _[2] || (_[2] = (N) => o.value = N),
2142
- disabled: c.value,
2143
- id: "approve-dialog-subject"
2144
- }, null, 8, ["modelValue", "disabled"])
2145
- ]),
2146
- g("div", Ms, [
2147
- p(B, { for: "approve-dialog-body" }, {
2148
- default: y(() => [..._[9] || (_[9] = [
2149
- C("Body:", -1)
2150
- ])]),
2151
- _: 1
2152
- }),
2153
- p(K, {
2154
- modelValue: a.value,
2155
- "onUpdate:modelValue": _[3] || (_[3] = (N) => a.value = N),
2156
- disabled: c.value,
2157
- id: "approve-dialog-body"
2158
- }, null, 8, ["modelValue", "disabled"])
2159
- ])
2160
- ], 2),
2161
- p(F, null, {
2162
- default: y(() => [
2163
- p(W, {
2164
- variant: "outline",
2165
- onClick: _[4] || (_[4] = (N) => r.value = !1)
2166
- }, {
2167
- default: y(() => [..._[10] || (_[10] = [
2168
- C("Close", -1)
2169
- ])]),
2170
- _: 1
2171
- }),
2172
- p(W, { onClick: d }, {
2173
- default: y(() => [..._[11] || (_[11] = [
2174
- C("Approve reservation", -1)
2175
- ])]),
2176
- _: 1
2177
- })
2178
- ]),
2179
- _: 1
2180
- })
2181
- ]),
2182
- _: 1
2183
- })
2184
- ]),
2185
- _: 1
2186
- }, 8, ["open"]);
2187
- };
2188
- }
2189
- }), $s = { class: "flex items-center bg-muted/70 dark:bg-muted/20 px-4 rounded-md" }, Es = { class: "grid gap-2" }, Ss = { class: "grid gap-2" }, Fs = { class: "grid gap-2" }, Bs = /* @__PURE__ */ ie({
2190
- __name: "RejectReservationDialog",
2191
- emits: ["confirm"],
2192
- setup(s, { expose: e, emit: t }) {
2193
- const { config: n } = ue(), { sendMail: i } = $e(n.mailAccount), l = t, r = R(!1), u = R(!1), c = R(""), m = R(""), o = R(""), a = (d) => {
2194
- u.value = !n.mailAccount, r.value = !0, d && (c.value = d.customerInfo?.email, m.value = "Regarding your reservation request for " + new Date(d.date)?.toDateString(), o.value = `Dear ${d.customerInfo?.firstName ?? ""} ${d.customerInfo?.lastName ?? ""},
2195
-
2196
- Thank you for your interest in booking with us. Unfortunately, we are unable to confirm your request for ${new Date(d.date)?.toDateString()} at ${d.startTime}.
2197
-
2198
- We would love to see you another time!`);
2199
- }, h = () => {
2200
- if (!u.value) {
2201
- if (!c.value || !m.value || !o.value) return alert("Please fill in all the fields.");
2202
- i({
2203
- to: c.value,
2204
- subject: m.value,
2205
- body: o.value
2206
- });
2207
- }
2208
- r.value = !1;
2209
- const { $confetti: d } = useNuxtApp();
2210
- d(), l("confirm");
2211
- };
2212
- return e({
2213
- openDialog: a
2214
- }), (d, f) => {
2215
- const _ = x("DialogTitle"), w = x("DialogDescription"), O = x("DialogHeader"), L = x("Checkbox"), S = x("Label"), B = x("Input"), j = x("Textarea"), K = x("Button"), W = x("DialogFooter"), F = x("DialogScrollContent"), T = x("Dialog");
2216
- return D(), H(T, {
2217
- open: r.value,
2218
- "onUpdate:open": f[5] || (f[5] = (k) => r.value = k)
2219
- }, {
2220
- default: y(() => [
2221
- p(F, { class: "sm:max-w-3xl" }, {
2222
- default: y(() => [
2223
- p(O, null, {
2224
- default: y(() => [
2225
- p(_, null, {
2226
- default: y(() => [...f[6] || (f[6] = [
2227
- C(" Reject Reservation Request ", -1)
2228
- ])]),
2229
- _: 1
2230
- }),
2231
- p(w)
2232
- ]),
2233
- _: 1
2234
- }),
2235
- g("div", $s, [
2236
- p(L, {
2237
- modelValue: u.value,
2238
- "onUpdate:modelValue": f[0] || (f[0] = (k) => u.value = k),
2239
- id: "reject-dialog-skip-mail",
2240
- class: "border-black/80 dark:border-gray-200",
2241
- disabled: !$(n).mailAccount
2242
- }, null, 8, ["modelValue", "disabled"]),
2243
- p(S, {
2244
- for: "reject-dialog-skip-mail",
2245
- class: "py-4 pl-2 pr-4"
2246
- }, {
2247
- default: y(() => [...f[7] || (f[7] = [
2248
- C("Do not send email to customer", -1)
2249
- ])]),
2250
- _: 1
2251
- })
2252
- ]),
2253
- g("div", {
2254
- class: Y(["grid gap-4 py-4", { "opacity-50": u.value }])
2255
- }, [
2256
- g("div", Es, [
2257
- p(S, { for: "reject-dialog-email" }, {
2258
- default: y(() => [...f[8] || (f[8] = [
2259
- C("To:", -1)
2260
- ])]),
2261
- _: 1
2262
- }),
2263
- p(B, {
2264
- modelValue: c.value,
2265
- "onUpdate:modelValue": f[1] || (f[1] = (k) => c.value = k),
2266
- disabled: u.value,
2267
- id: "reject-dialog-email"
2268
- }, null, 8, ["modelValue", "disabled"])
2269
- ]),
2270
- g("div", Ss, [
2271
- p(S, { for: "reject-dialog-subject" }, {
2272
- default: y(() => [...f[9] || (f[9] = [
2273
- C("Subject:", -1)
2274
- ])]),
2275
- _: 1
2276
- }),
2277
- p(B, {
2278
- modelValue: m.value,
2279
- "onUpdate:modelValue": f[2] || (f[2] = (k) => m.value = k),
2280
- disabled: u.value,
2281
- id: "reject-dialog-subject"
2282
- }, null, 8, ["modelValue", "disabled"])
2283
- ]),
2284
- g("div", Fs, [
2285
- p(S, { for: "reject-dialog-body" }, {
2286
- default: y(() => [...f[10] || (f[10] = [
2287
- C("Body:", -1)
2288
- ])]),
2289
- _: 1
2290
- }),
2291
- p(j, {
2292
- modelValue: o.value,
2293
- "onUpdate:modelValue": f[3] || (f[3] = (k) => o.value = k),
2294
- disabled: u.value,
2295
- id: "reject-dialog-body"
2296
- }, null, 8, ["modelValue", "disabled"])
2297
- ])
2298
- ], 2),
2299
- p(W, null, {
2300
- default: y(() => [
2301
- p(K, {
2302
- variant: "outline",
2303
- onClick: f[4] || (f[4] = (k) => r.value = !1)
2304
- }, {
2305
- default: y(() => [...f[11] || (f[11] = [
2306
- C("Close", -1)
2307
- ])]),
2308
- _: 1
2309
- }),
2310
- p(K, {
2311
- variant: "destructive",
2312
- onClick: h
2313
- }, {
2314
- default: y(() => [...f[12] || (f[12] = [
2315
- C("Reject reservation", -1)
2316
- ])]),
2317
- _: 1
2318
- })
2319
- ]),
2320
- _: 1
2321
- })
2322
- ]),
2323
- _: 1
2324
- })
2325
- ]),
2326
- _: 1
2327
- }, 8, ["open"]);
2328
- };
2329
- }
2330
- }), Rs = { key: 0 }, js = {
2331
- key: 0,
2332
- class: "flex items-center gap-1.5 flex-wrap"
2333
- }, Os = {
2334
- key: 0,
2335
- class: "space-y-2 mb-4"
2336
- }, Ts = { class: "text-xs font-medium text-muted-foreground uppercase tracking-wide" }, Ns = {
2337
- key: 0,
2338
- class: "text-2xl font-bold tracking-wider"
2339
- }, zs = {
2340
- key: 1,
2341
- class: "flex flex-wrap gap-2 mb-4"
2342
- }, Ls = {
2343
- key: 1,
2344
- class: "text-xs text-muted-foreground mr-0.5"
2345
- }, Ps = {
2346
- key: 2,
2347
- class: "space-y-3"
2348
- }, Vs = { class: "bg-muted/30 rounded-lg p-4 space-y-2" }, Us = { class: "text-muted-foreground flex items-center gap-1.5" }, Ws = { class: "font-medium" }, We = /* @__PURE__ */ ie({
2349
- __name: "OrderMetadataDisplay",
2350
- props: {
2351
- metadata: { default: () => ({}) },
2352
- schema: { default: () => [] },
2353
- displayFilter: { default: void 0 },
2354
- scope: { default: void 0 },
2355
- compact: { type: Boolean, default: !1 }
2356
- },
2357
- setup(s, { expose: e }) {
2358
- const t = s, n = J(() => {
2359
- if (!t.metadata) return [];
2360
- const c = new Set(t.schema?.map((a) => a.key) || []), m = (t.schema || []).filter((a) => !(t.scope && a.scope !== t.scope || t.displayFilter && !t.displayFilter.includes(a.display) || t.metadata[a.key] === void 0 || t.metadata[a.key] === null || a.display === "hidden" || t.metadata[a.key] === !1)).sort((a, h) => (a.order || 0) - (h.order || 0)).map((a) => ({
2361
- ...a,
2362
- value: t.metadata[a.key]
2363
- }));
2364
- if (t.displayFilter && !t.displayFilter.includes("field")) return m;
2365
- const o = Object.entries(t.metadata).filter(([a, h]) => !c.has(a) && h !== void 0 && h !== null && h !== !1).map(([a, h]) => ({
2366
- id: `_fallback_${a}`,
2367
- key: a,
2368
- label: a.replace(/([A-Z])/g, " $1").replace(/[_-]/g, " ").replace(/^\w/, (d) => d.toUpperCase()).trim(),
2369
- display: "field",
2370
- scope: "order",
2371
- value: typeof h == "object" ? JSON.stringify(h) : String(h)
2372
- }));
2373
- return [...m, ...o];
2374
- }), i = J(() => n.value.filter((c) => c.display === "highlight")), l = J(() => n.value.filter((c) => c.display === "badge")), r = J(() => n.value.filter((c) => c.display === "field")), u = J(() => n.value.length > 0);
2375
- return e({ hasContent: u }), (c, m) => u.value ? (D(), M("div", Rs, [
2376
- s.compact ? (D(), M("div", js, [
2377
- (D(!0), M(G, null, re(i.value, (o) => (D(), M("span", {
2378
- key: o.id,
2379
- class: Y(["inline-flex items-center gap-1 px-2 py-0.5 text-xs font-bold rounded-md", o.color ? "" : "bg-primary/10 text-primary"]),
2380
- style: ne(o.color ? { backgroundColor: o.color + "20", color: o.color } : {})
2381
- }, [
2382
- (D(), H(le($(Q)[o.icon]), { size: 12 })),
2383
- C(" " + I(o.value === !0 ? o.label : o.value), 1)
2384
- ], 6))), 128)),
2385
- (D(!0), M(G, null, re(l.value, (o) => (D(), M("span", {
2386
- key: o.id,
2387
- class: Y(["inline-flex items-center gap-1 px-2 py-0.5 text-xs font-medium rounded-full", o.color ? "" : "bg-muted text-muted-foreground"]),
2388
- style: ne(o.color ? { backgroundColor: o.color + "20", color: o.color } : {})
2389
- }, [
2390
- o.icon && $(Q)[o.icon] ? (D(), H(le($(Q)[o.icon]), {
2391
- key: 0,
2392
- size: 10
2393
- })) : E("", !0),
2394
- C(" " + I(o.value === !0 ? o.label : o.value), 1)
2395
- ], 6))), 128))
2396
- ])) : (D(), M(G, { key: 1 }, [
2397
- i.value.length ? (D(), M("div", Os, [
2398
- (D(!0), M(G, null, re(i.value, (o) => (D(), M("div", {
2399
- key: o.id,
2400
- class: Y(["rounded-lg border-2 p-4 flex items-center gap-4", o.color ? "" : "border-primary/20 bg-primary/5"]),
2401
- style: ne(o.color ? { borderColor: o.color + "40", backgroundColor: o.color + "08" } : {})
2402
- }, [
2403
- g("div", {
2404
- class: Y(["h-12 w-12 rounded-xl flex items-center justify-center shrink-0", o.color ? "" : "bg-primary/10"]),
2405
- style: ne(o.color ? { backgroundColor: o.color + "20" } : {})
2406
- }, [
2407
- o.icon && $(Q)[o.icon] ? (D(), H(le($(Q)[o.icon]), {
2408
- key: 0,
2409
- size: 24,
2410
- style: ne(o.color ? { color: o.color } : {}),
2411
- class: Y(o.color ? "" : "text-primary")
2412
- }, null, 8, ["style", "class"])) : E("", !0)
2413
- ], 6),
2414
- g("div", null, [
2415
- g("p", Ts, I(o.label), 1),
2416
- o.value !== !0 ? (D(), M("p", Ns, I(o.value), 1)) : E("", !0)
2417
- ])
2418
- ], 6))), 128))
2419
- ])) : E("", !0),
2420
- l.value.length ? (D(), M("div", zs, [
2421
- (D(!0), M(G, null, re(l.value, (o) => (D(), M("span", {
2422
- key: o.id,
2423
- class: Y(["inline-flex items-center gap-1.5 px-3 py-1.5 text-sm font-medium rounded-full", o.color ? "" : "bg-muted text-muted-foreground"]),
2424
- style: ne(o.color ? { backgroundColor: o.color + "20", color: o.color } : {})
2425
- }, [
2426
- o.icon && $(Q)[o.icon] ? (D(), H(le($(Q)[o.icon]), {
2427
- key: 0,
2428
- size: 14
2429
- })) : E("", !0),
2430
- o.label ? (D(), M("span", Ls, [
2431
- C(I(o.label), 1),
2432
- o.value !== !0 ? (D(), M(G, { key: 0 }, [
2433
- C(":")
2434
- ], 64)) : E("", !0)
2435
- ])) : E("", !0),
2436
- o.value !== !0 ? (D(), M(G, { key: 2 }, [
2437
- C(I(o.value), 1)
2438
- ], 64)) : E("", !0)
2439
- ], 6))), 128))
2440
- ])) : E("", !0),
2441
- r.value.length ? (D(), M("div", Ps, [
2442
- m[0] || (m[0] = g("h3", { class: "text-sm font-semibold text-muted-foreground uppercase tracking-wide" }, "Additional Info", -1)),
2443
- g("div", Vs, [
2444
- (D(!0), M(G, null, re(r.value, (o) => (D(), M("div", {
2445
- key: o.id,
2446
- class: "flex justify-between text-sm"
2447
- }, [
2448
- g("span", Us, [
2449
- o.icon && $(Q)[o.icon] ? (D(), H(le($(Q)[o.icon]), {
2450
- key: 0,
2451
- size: 14
2452
- })) : E("", !0),
2453
- C(" " + I(o.label), 1)
2454
- ]),
2455
- g("span", Ws, I(o.value === !0 ? "✓" : o.value), 1)
2456
- ]))), 128))
2457
- ])
2458
- ])) : E("", !0)
2459
- ], 64))
2460
- ])) : E("", !0);
2461
- }
2462
- }), Hs = {
2463
- key: 0,
2464
- class: "space-y-6 py-4"
2465
- }, Ks = { class: "space-y-3" }, Gs = { class: "bg-muted/30 rounded-lg p-4 space-y-3" }, Ys = { class: "flex items-center gap-3" }, Qs = { class: "h-10 w-10 rounded-full bg-primary/10 flex items-center justify-center" }, Js = { class: "font-medium" }, Xs = { class: "grid gap-2 text-sm" }, Zs = {
2466
- key: 0,
2467
- class: "flex items-center gap-2 text-muted-foreground"
2468
- }, qs = ["href"], en = {
2469
- key: 1,
2470
- class: "flex items-center gap-2 text-muted-foreground"
2471
- }, tn = ["href"], sn = { class: "space-y-3" }, nn = { class: "grid grid-cols-2 gap-3" }, on = { class: "bg-muted/30 rounded-lg p-3" }, an = { class: "flex items-center gap-2 text-muted-foreground mb-1" }, rn = { class: "text-xs" }, ln = { class: "font-medium" }, cn = { class: "bg-muted/30 rounded-lg p-3" }, un = { class: "flex items-center gap-2 text-muted-foreground mb-1" }, dn = { class: "font-medium" }, fn = {
2472
- key: 0,
2473
- class: "space-y-3"
2474
- }, pn = { class: "bg-muted/30 rounded-lg p-4" }, mn = { class: "flex items-start justify-between" }, hn = { class: "flex items-start gap-3" }, gn = { class: "h-9 w-9 rounded-lg bg-primary/10 flex items-center justify-center mt-0.5" }, vn = { class: "font-medium" }, _n = { class: "text-sm text-muted-foreground" }, yn = { class: "font-semibold" }, xn = { class: "space-y-3" }, bn = { class: "bg-muted/30 rounded-lg p-4 space-y-3" }, Dn = { class: "space-y-2 text-sm" }, Cn = { class: "flex justify-between" }, kn = {
2475
- key: 0,
2476
- class: "flex justify-between"
2477
- }, An = {
2478
- key: 1,
2479
- class: "flex justify-between text-green-600 dark:text-green-400"
2480
- }, wn = { class: "flex justify-between font-semibold" }, Mn = {
2481
- key: 1,
2482
- class: "space-y-2 text-sm"
2483
- }, In = {
2484
- key: 0,
2485
- class: "flex justify-between"
2486
- }, $n = { class: "text-muted-foreground flex items-center gap-1.5" }, En = { class: "text-green-600 dark:text-green-400" }, Sn = {
2487
- key: 1,
2488
- class: "flex justify-between"
2489
- }, Fn = { class: "text-muted-foreground flex items-center gap-1.5" }, Bn = { class: "text-orange-600 dark:text-orange-400 font-medium" }, Nn = /* @__PURE__ */ ie({
2490
- __name: "ReservationDetailDialog",
2491
- props: {
2492
- agendaData: {}
2493
- },
2494
- emits: ["cancelled", "confirmed", "rejected"],
2495
- setup(s, { expose: e, emit: t }) {
2496
- const n = s, { hasPermission: i } = Ct(), { config: l } = ue(), r = kt(l.project), u = rt("event", R(null)), c = J(() => n.agendaData?.metadataSchema || []), m = t, o = R(!1), a = R(null), h = R(!1), d = fe("cancelReservationDialog"), f = fe("approveReservationDialog"), _ = fe("rejectReservationDialog"), w = fe("transferReservationDialog"), O = (A) => {
2497
- a.value = A, o.value = !0;
2498
- }, L = J(() => a.value?.customerInfo && `${a.value.customerInfo.firstName} ${a.value.customerInfo.lastName}`.trim() || "Unknown Customer"), S = J(() => {
2499
- let A = a.value?.status;
2500
- const v = a.value?.reservationStatus;
2501
- switch (A === "confirmed" && ["needs_approval", "rejected", "approved", "cancelled"].includes(v) && (A = v), A) {
2502
- case "pending":
2503
- return { label: "Pending", class: "bg-yellow-100 text-yellow-800 dark:bg-yellow-900/30 dark:text-yellow-400" };
2504
- case "cancelled":
2505
- return { label: "Cancelled", class: "bg-red-100 text-red-800 dark:bg-red-900/30 dark:text-red-400" };
2506
- case "needs_approval":
2507
- return { label: "Needs Approval", class: "bg-blue-100 text-blue-800 dark:bg-blue-900/30 dark:text-blue-400" };
2508
- case "rejected":
2509
- return { label: "Rejected", class: "bg-red-100 text-red-800 dark:bg-red-900/30 dark:text-red-400" };
2510
- case "approved":
2511
- return { label: "Approved", class: "bg-green-100 text-green-800 dark:bg-green-900/30 dark:text-green-400" };
2512
- case "confirmed":
2513
- return { label: "Confirmed", class: "bg-green-100 text-green-800 dark:bg-green-900/30 dark:text-green-400" };
2514
- default:
2515
- return { label: A || "Unknown", class: "bg-muted text-muted-foreground" };
2516
- }
2517
- }), B = J(() => a.value?.status === "cancelled"), j = (A) => A == null || typeof A != "number" ? "—" : `€${A?.toFixed(2)}`, K = (A) => {
2518
- if (!A) return "—";
2519
- if (A < 60) return `${A} min`;
2520
- const v = Math.floor(A / 60), z = A % 60;
2521
- return z > 0 ? `${v}h ${z}min` : `${v}h`;
2522
- }, W = () => {
2523
- if (!a.value) return;
2524
- let A = "";
2525
- const v = u?.value?.date;
2526
- if (v)
2527
- try {
2528
- A = new Date(v).toLocaleDateString("en-US", {
2529
- weekday: "long",
2530
- year: "numeric",
2531
- month: "long",
2532
- day: "numeric"
2533
- });
2534
- } catch {
2535
- A = v;
2536
- }
2537
- const z = {
2538
- date: A,
2539
- resourceName: u?.value?.resource?.name
2540
- };
2541
- vs(a.value, z);
2542
- }, F = () => {
2543
- f.value?.openDialog(a.value);
2544
- }, T = () => {
2545
- _.value?.openDialog(a.value);
2546
- }, k = () => {
2547
- f.value?.openDialog(a.value);
2548
- }, N = () => {
2549
- d.value?.openDialog(a.value);
2550
- }, ae = async () => {
2551
- try {
2552
- if (h.value || !a.value?.id) throw new Error("Invalid state");
2553
- h.value = !0;
2554
- let v = (await r.get(l.reservationsCollection, a.value.id))?.reservations || [];
2555
- if (!v.find((z) => z.id === a.value.res_id))
2556
- throw new Error("Reservation not found");
2557
- v.find((z) => z.id === a.value.res_id).status = "cancelled", await r.update(l.reservationsCollection, a.value.id, {
2558
- reservations: v
2559
- }), a.value.status = "cancelled", oe.success("Reservation cancelled successfully"), m("cancelled"), o.value = !1;
2560
- } catch (A) {
2561
- console.error("Error cancelling reservation:", A), oe.error("Failed to cancel reservation");
2562
- } finally {
2563
- h.value = !1;
2564
- }
2565
- }, X = async () => {
2566
- try {
2567
- if (h.value || !a.value?.id) throw new Error("Invalid state");
2568
- h.value = !0;
2569
- let v = (await r.get(l.reservationsCollection, a.value.id))?.reservations || [];
2570
- if (!v.find((z) => z.id === a.value.res_id))
2571
- throw new Error("Reservation not found");
2572
- v.find((z) => z.id === a.value.res_id).status = "approved", await r.update(l.reservationsCollection, a.value.id, {
2573
- reservations: v
2574
- }), a.value.status = "approved", oe.success("Reservation approved successfully"), m("confirmed"), o.value = !1;
2575
- } catch (A) {
2576
- console.error("Error approving reservation:", A), oe.error("Failed to approve reservation");
2577
- } finally {
2578
- h.value = !1;
2579
- }
2580
- }, Re = async () => {
2581
- try {
2582
- if (h.value || !a.value?.id) throw new Error("Invalid state");
2583
- h.value = !0;
2584
- let v = (await r.get(l.reservationsCollection, a.value.id))?.reservations || [];
2585
- if (!v.find((z) => z.id === a.value.res_id))
2586
- throw new Error("Reservation not found");
2587
- v.find((z) => z.id === a.value.res_id).status = "rejected", await r.update(l.reservationsCollection, a.value.id, {
2588
- reservations: v
2589
- }), a.value.status = "rejected", oe.success("Reservation rejected successfully"), m("rejected"), o.value = !1;
2590
- } catch (A) {
2591
- console.error("Error rejecting reservation:", A), oe.error("Failed to reject reservation");
2592
- } finally {
2593
- h.value = !1;
2594
- }
2595
- }, U = () => {
2596
- };
2597
- return e({
2598
- openDialog: O
2599
- }), (A, v) => {
2600
- const z = x("DialogTitle"), ve = x("DialogDescription"), qe = x("DialogHeader"), je = x("Separator"), _e = x("Button"), et = x("DropdownMenuTrigger"), ye = x("DropdownMenuLabel"), de = x("DropdownMenuItem"), xe = x("DropdownMenuGroup"), Oe = x("DropdownMenuSeparator"), tt = x("DropdownMenuContent"), st = x("DropdownMenu"), nt = x("DialogFooter"), ot = x("DialogScrollContent"), it = x("Dialog");
2601
- return D(), M(G, null, [
2602
- p(it, {
2603
- open: o.value,
2604
- "onUpdate:open": v[0] || (v[0] = (at) => o.value = at)
2605
- }, {
2606
- default: y(() => [
2607
- p(ot, { class: "sm:max-w-xl" }, {
2608
- default: y(() => [
2609
- p(qe, null, {
2610
- default: y(() => [
2611
- p(z, { class: "flex items-center gap-3" }, {
2612
- default: y(() => [
2613
- v[1] || (v[1] = g("span", null, "Reservation Details", -1)),
2614
- g("span", {
2615
- class: Y(["px-2.5 py-1 text-xs font-medium rounded-full", S.value.class])
2616
- }, I(S.value.label), 3)
2617
- ]),
2618
- _: 1
2619
- }),
2620
- p(ve, null, {
2621
- default: y(() => [
2622
- C(" Booking #" + I(a.value?.id?.slice(0, 8) || "—"), 1)
2623
- ]),
2624
- _: 1
2625
- })
2626
- ]),
2627
- _: 1
2628
- }),
2629
- a.value ? (D(), M("div", Hs, [
2630
- p(We, {
2631
- metadata: a.value.metadata,
2632
- schema: c.value,
2633
- scope: "order"
2634
- }, null, 8, ["metadata", "schema"]),
2635
- p(We, {
2636
- metadata: a.value.reservationMetadata,
2637
- schema: c.value,
2638
- scope: "reservation"
2639
- }, null, 8, ["metadata", "schema"]),
2640
- g("div", Ks, [
2641
- v[2] || (v[2] = g("h3", { class: "text-sm font-semibold text-muted-foreground uppercase tracking-wide" }, "Customer", -1)),
2642
- g("div", Gs, [
2643
- g("div", Ys, [
2644
- g("div", Qs, [
2645
- p($(lt), {
2646
- size: 20,
2647
- class: "text-primary"
2648
- })
2649
- ]),
2650
- g("div", null, [
2651
- g("p", Js, I(L.value), 1)
2652
- ])
2653
- ]),
2654
- g("div", Xs, [
2655
- a.value.customerInfo?.email ? (D(), M("div", Zs, [
2656
- p($(ct), { size: 14 }),
2657
- g("a", {
2658
- href: `mailto:${a.value.customerInfo.email}`,
2659
- class: "hover:text-foreground transition-colors"
2660
- }, I(a.value.customerInfo.email), 9, qs)
2661
- ])) : E("", !0),
2662
- a.value.customerInfo?.phone ? (D(), M("div", en, [
2663
- p($(ut), { size: 14 }),
2664
- g("a", {
2665
- href: `tel:${a.value.customerInfo.phone}`,
2666
- class: "hover:text-foreground transition-colors"
2667
- }, I(a.value.customerInfo.phone), 9, tn)
2668
- ])) : E("", !0)
2669
- ])
2670
- ])
2671
- ]),
2672
- g("div", sn, [
2673
- v[4] || (v[4] = g("h3", { class: "text-sm font-semibold text-muted-foreground uppercase tracking-wide" }, "Reservation", -1)),
2674
- g("div", nn, [
2675
- g("div", on, [
2676
- g("div", an, [
2677
- p($(dt), { size: 14 }),
2678
- g("span", rn, I(a.value.startTime) + " - " + I(a.value.endTime), 1)
2679
- ]),
2680
- g("p", ln, I(new Date(a.value.date).toLocaleDateString("en-US", { weekday: "long", month: "long", day: "numeric", year: "numeric" })), 1)
2681
- ]),
2682
- g("div", cn, [
2683
- g("div", un, [
2684
- p($(ft), { size: 14 }),
2685
- v[3] || (v[3] = g("span", { class: "text-xs" }, "Spots", -1))
2686
- ]),
2687
- g("p", dn, I(a.value.spots || 1) + " " + I(a.value.spots === 1 ? "person" : "people"), 1)
2688
- ])
2689
- ])
2690
- ]),
2691
- a.value.pricingOption ? (D(), M("div", fn, [
2692
- v[5] || (v[5] = g("h3", { class: "text-sm font-semibold text-muted-foreground uppercase tracking-wide" }, "Package", -1)),
2693
- g("div", pn, [
2694
- g("div", mn, [
2695
- g("div", hn, [
2696
- g("div", gn, [
2697
- p($(pt), {
2698
- size: 18,
2699
- class: "text-primary"
2700
- })
2701
- ]),
2702
- g("div", null, [
2703
- g("p", vn, I(a.value.pricingOption.name), 1),
2704
- g("p", _n, I(K(a.value.pricingOption.duration)), 1)
2705
- ])
2706
- ]),
2707
- g("p", yn, I(j(a.value.pricingOption.price)), 1)
2708
- ])
2709
- ])
2710
- ])) : E("", !0),
2711
- g("div", xn, [
2712
- v[12] || (v[12] = g("h3", { class: "text-sm font-semibold text-muted-foreground uppercase tracking-wide" }, "Payment", -1)),
2713
- g("div", bn, [
2714
- g("div", Dn, [
2715
- g("div", Cn, [
2716
- v[6] || (v[6] = g("span", { class: "text-muted-foreground" }, "Base price", -1)),
2717
- g("span", null, I(j(a.value.reservationBasePrice)), 1)
2718
- ]),
2719
- a.value.reservationAddOnsPrice ? (D(), M("div", kn, [
2720
- v[7] || (v[7] = g("span", { class: "text-muted-foreground" }, "Add-ons", -1)),
2721
- g("span", null, I(j(a.value.reservationAddOnsPrice)), 1)
2722
- ])) : E("", !0),
2723
- a.value.discount ? (D(), M("div", An, [
2724
- v[8] || (v[8] = g("span", null, "Discount", -1)),
2725
- g("span", null, "-" + I(j(a.value.discount)), 1)
2726
- ])) : E("", !0)
2727
- ]),
2728
- p(je),
2729
- g("div", wn, [
2730
- v[9] || (v[9] = g("span", null, "Reservation Total", -1)),
2731
- g("span", null, I(j(a.value.reservationPrice)), 1)
2732
- ]),
2733
- a.value.amountPaid !== void 0 || a.value.amountDue !== void 0 ? (D(), H(je, { key: 0 })) : E("", !0),
2734
- a.value.amountPaid !== void 0 || a.value.amountDue !== void 0 ? (D(), M("div", Mn, [
2735
- a.value.amountPaid !== void 0 ? (D(), M("div", In, [
2736
- g("span", $n, [
2737
- p($(mt), { size: 14 }),
2738
- v[10] || (v[10] = C(" Amount paid ", -1))
2739
- ]),
2740
- g("span", En, I(j(a.value.amountPaid)), 1)
2741
- ])) : E("", !0),
2742
- a.value.amountDue !== void 0 && a.value.amountDue > 0 ? (D(), M("div", Sn, [
2743
- g("span", Fn, [
2744
- p($(ht), { size: 14 }),
2745
- v[11] || (v[11] = C(" Amount due ", -1))
2746
- ]),
2747
- g("span", Bn, I(j(a.value.amountDue)), 1)
2748
- ])) : E("", !0)
2749
- ])) : E("", !0)
2750
- ])
2751
- ])
2752
- ])) : E("", !0),
2753
- p(nt, { class: "gap-2 sm:justify-between" }, {
2754
- default: y(() => [
2755
- a.value.status === "confirmed" && a.value.reservationStatus === "needs_approval" ? (D(), M(G, { key: 0 }, [
2756
- p(_e, {
2757
- variant: "destructive",
2758
- onClick: T
2759
- }, {
2760
- default: y(() => [
2761
- p($(gt), { size: 16 }),
2762
- v[13] || (v[13] = C(" Reject Reservation ", -1))
2763
- ]),
2764
- _: 1
2765
- }),
2766
- p(_e, { onClick: F }, {
2767
- default: y(() => [
2768
- p($(vt), { size: 16 }),
2769
- v[14] || (v[14] = C(" Approve Reservation ", -1))
2770
- ]),
2771
- _: 1
2772
- })
2773
- ], 64)) : a.value.status === "confirmed" && a.value.reservationStatus === "approved" ? (D(), H(st, { key: 1 }, {
2774
- default: y(() => [
2775
- p(et, { "as-child": "" }, {
2776
- default: y(() => [
2777
- p(_e, {
2778
- variant: "outline",
2779
- class: "gap-2"
2780
- }, {
2781
- default: y(() => [
2782
- p($(_t), { size: 16 }),
2783
- v[15] || (v[15] = C(" Actions ", -1))
2784
- ]),
2785
- _: 1
2786
- })
2787
- ]),
2788
- _: 1
2789
- }),
2790
- p(tt, {
2791
- class: "w-60",
2792
- align: "start"
2793
- }, {
2794
- default: y(() => [
2795
- p(ye, { class: "text-xs text-muted-foreground font-normal" }, {
2796
- default: y(() => [...v[16] || (v[16] = [
2797
- C(" Reservation Actions ", -1)
2798
- ])]),
2799
- _: 1
2800
- }),
2801
- p(xe, null, {
2802
- default: y(() => [
2803
- p(de, {
2804
- onClick: W,
2805
- class: "gap-2 cursor-pointer"
2806
- }, {
2807
- default: y(() => [
2808
- p($(yt), {
2809
- size: 16,
2810
- class: "text-muted-foreground"
2811
- }),
2812
- v[17] || (v[17] = g("span", null, "Download PDF", -1))
2813
- ]),
2814
- _: 1
2815
- })
2816
- ]),
2817
- _: 1
2818
- }),
2819
- p(Oe),
2820
- p(xe, null, {
2821
- default: y(() => [
2822
- p(ye, { class: "text-xs text-muted-foreground font-normal" }, {
2823
- default: y(() => [...v[18] || (v[18] = [
2824
- C(" Communication ", -1)
2825
- ])]),
2826
- _: 1
2827
- }),
2828
- p(de, {
2829
- onClick: k,
2830
- class: "gap-2 cursor-pointer"
2831
- }, {
2832
- default: y(() => [
2833
- p($(xt), {
2834
- size: 16,
2835
- class: "text-muted-foreground"
2836
- }),
2837
- v[19] || (v[19] = g("span", null, "(Re)send Confirmation Mail", -1))
2838
- ]),
2839
- _: 1
2840
- })
2841
- ]),
2842
- _: 1
2843
- }),
2844
- $(i)("manage-reservations") ? (D(), M(G, { key: 0 }, [
2845
- p(Oe),
2846
- p(xe, null, {
2847
- default: y(() => [
2848
- p(ye, { class: "text-xs text-muted-foreground font-normal" }, {
2849
- default: y(() => [...v[20] || (v[20] = [
2850
- C(" Cancellation ", -1)
2851
- ])]),
2852
- _: 1
2853
- }),
2854
- p(de, {
2855
- onClick: N,
2856
- class: "gap-2 cursor-pointer",
2857
- variant: "destructive",
2858
- disabled: B.value
2859
- }, {
2860
- default: y(() => [
2861
- p($(bt), { size: 16 }),
2862
- v[21] || (v[21] = g("span", null, "Cancel Reservation", -1))
2863
- ]),
2864
- _: 1
2865
- }, 8, ["disabled"]),
2866
- a.value?.reservationPrice && a.value.reservationPrice > 0 ? (D(), H(de, {
2867
- key: 0,
2868
- onClick: U,
2869
- class: "gap-2 cursor-pointer text-orange-600 dark:text-orange-400 focus:text-orange-600 dark:focus:text-orange-400",
2870
- disabled: B.value
2871
- }, {
2872
- default: y(() => [
2873
- p($(Dt), {
2874
- class: "text-inherit",
2875
- size: 16
2876
- }),
2877
- v[22] || (v[22] = g("span", null, "Cancel & Send Coupon", -1))
2878
- ]),
2879
- _: 1
2880
- }, 8, ["disabled"])) : E("", !0)
2881
- ]),
2882
- _: 1
2883
- })
2884
- ], 64)) : E("", !0)
2885
- ]),
2886
- _: 1
2887
- })
2888
- ]),
2889
- _: 1
2890
- })) : E("", !0)
2891
- ]),
2892
- _: 1
2893
- })
2894
- ]),
2895
- _: 1
2896
- })
2897
- ]),
2898
- _: 1
2899
- }, 8, ["open"]),
2900
- p(Ds, {
2901
- ref_key: "cancelReservationDialog",
2902
- ref: d,
2903
- onConfirm: ae
2904
- }, null, 512),
2905
- p(Is, {
2906
- ref_key: "approveReservationDialog",
2907
- ref: f,
2908
- onConfirm: X
2909
- }, null, 512),
2910
- p(Bs, {
2911
- ref_key: "rejectReservationDialog",
2912
- ref: _,
2913
- onConfirm: Re
2914
- }, null, 512),
2915
- p(Cs, {
2916
- ref_key: "transferReservationDialog",
2917
- ref: w
2918
- }, null, 512)
2919
- ], 64);
2920
- };
2921
- }
2922
- });
2923
- export {
2924
- se as F,
2925
- We as _,
2926
- Nn as a
2927
- };