renovate-log-parser 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (325) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +402 -0
  3. package/dist/cli.d.ts +2 -0
  4. package/dist/cli.js +30 -0
  5. package/dist/cli.js.map +1 -0
  6. package/dist/commands/analyze.d.ts +24 -0
  7. package/dist/commands/analyze.js +114 -0
  8. package/dist/commands/analyze.js.map +1 -0
  9. package/dist/commands/detect-errors.d.ts +17 -0
  10. package/dist/commands/detect-errors.js +119 -0
  11. package/dist/commands/detect-errors.js.map +1 -0
  12. package/dist/commands/install-analyze-skill.d.ts +27 -0
  13. package/dist/commands/install-analyze-skill.js +181 -0
  14. package/dist/commands/install-analyze-skill.js.map +1 -0
  15. package/dist/commands/web.d.ts +12 -0
  16. package/dist/commands/web.js +103 -0
  17. package/dist/commands/web.js.map +1 -0
  18. package/dist/core/analyzer.d.ts +89 -0
  19. package/dist/core/analyzer.js +179 -0
  20. package/dist/core/analyzer.js.map +1 -0
  21. package/dist/core/error-detector.d.ts +56 -0
  22. package/dist/core/error-detector.js +236 -0
  23. package/dist/core/error-detector.js.map +1 -0
  24. package/dist/core/filters.d.ts +136 -0
  25. package/dist/core/filters.js +95 -0
  26. package/dist/core/filters.js.map +1 -0
  27. package/dist/core/ignore-file.d.ts +52 -0
  28. package/dist/core/ignore-file.js +104 -0
  29. package/dist/core/ignore-file.js.map +1 -0
  30. package/dist/core/levels.d.ts +33 -0
  31. package/dist/core/levels.js +35 -0
  32. package/dist/core/levels.js.map +1 -0
  33. package/dist/core/parser.d.ts +57 -0
  34. package/dist/core/parser.js +201 -0
  35. package/dist/core/parser.js.map +1 -0
  36. package/dist/core/query-builder.d.ts +47 -0
  37. package/dist/core/query-builder.js +155 -0
  38. package/dist/core/query-builder.js.map +1 -0
  39. package/dist/core/skill-template.d.ts +34 -0
  40. package/dist/core/skill-template.js +259 -0
  41. package/dist/core/skill-template.js.map +1 -0
  42. package/package.json +68 -0
  43. package/web/.output/nitro.json +15 -0
  44. package/web/.output/public/_fonts/57NSSoFy1VLVs2gqly8Ls9awBnZMFyXGrefpmqvdqmc-zJfbBtpgM4cDmcXBsqZNW79_kFnlpPd62b48glgdydA.woff2 +0 -0
  45. package/web/.output/public/_fonts/8VR2wSMN-3U4NbWAVYXlkRV6hA0jFBXP-0RtL3X7fko-x2gYI4qfmkRdxyQQUPaBZdZdgl1TeVrquF_TxHeM4lM.woff2 +0 -0
  46. package/web/.output/public/_fonts/GsKUclqeNLJ96g5AU593ug6yanivOiwjW_7zESNPChw-jHA4tBeM1bjF7LATGUpfBuSTyomIFrWBTzjF7txVYfg.woff2 +0 -0
  47. package/web/.output/public/_fonts/Ld1FnTo3yTIwDyGfTQ5-Fws9AWsCbKfMvgxduXr7JcY-W25bL8NF1fjpLRSOgJb7RoZPHqGQNwMTM7S9tHVoxx8.woff2 +0 -0
  48. package/web/.output/public/_fonts/NdzqRASp2bovDUhQT1IRE_EMqKJ2KYQdTCfFcBvL8yw-KhwZiS86o3fErOe5GGMExHUemmI_dBfaEFxjISZrBd0.woff2 +0 -0
  49. package/web/.output/public/_fonts/iTkrULNFJJkTvihIg1Vqi5IODRH_9btXCioVF5l98I8-AndUyau2HR2felA_ra8V2mutQgschhasE5FD1dXGJX8.woff2 +0 -0
  50. package/web/.output/public/_nuxt/BWja8e3M.js +37 -0
  51. package/web/.output/public/_nuxt/BgApMHS1.js +1 -0
  52. package/web/.output/public/_nuxt/CGPWRqbc.js +1 -0
  53. package/web/.output/public/_nuxt/DlAUqK2U.js +1 -0
  54. package/web/.output/public/_nuxt/Sgtec1U0.js +1 -0
  55. package/web/.output/public/_nuxt/builds/latest.json +1 -0
  56. package/web/.output/public/_nuxt/builds/meta/c4723e49-0623-47af-ae79-9ab6428bdcc1.json +1 -0
  57. package/web/.output/public/_nuxt/entry.9mB-pyEY.css +1 -0
  58. package/web/.output/public/_nuxt/error-404.B_PvSG-P.css +1 -0
  59. package/web/.output/public/_nuxt/error-500.CghkKCEr.css +1 -0
  60. package/web/.output/public/_nuxt/index.BlvAG7F6.css +1 -0
  61. package/web/.output/public/favicon.ico +0 -0
  62. package/web/.output/server/chunks/_/error-500.mjs +19 -0
  63. package/web/.output/server/chunks/_/error-500.mjs.map +1 -0
  64. package/web/.output/server/chunks/_/icons.mjs +6153 -0
  65. package/web/.output/server/chunks/_/icons.mjs.map +1 -0
  66. package/web/.output/server/chunks/_/icons2.mjs +11494 -0
  67. package/web/.output/server/chunks/_/icons2.mjs.map +1 -0
  68. package/web/.output/server/chunks/build/_plugin-vue_export-helper-1tPrXgE0.mjs +10 -0
  69. package/web/.output/server/chunks/build/_plugin-vue_export-helper-1tPrXgE0.mjs.map +1 -0
  70. package/web/.output/server/chunks/build/client.precomputed.mjs +4 -0
  71. package/web/.output/server/chunks/build/client.precomputed.mjs.map +1 -0
  72. package/web/.output/server/chunks/build/error-404-DyaaQUIS.mjs +106 -0
  73. package/web/.output/server/chunks/build/error-404-DyaaQUIS.mjs.map +1 -0
  74. package/web/.output/server/chunks/build/error-404-styles.9cNA4arh.mjs +8 -0
  75. package/web/.output/server/chunks/build/error-404-styles.9cNA4arh.mjs.map +1 -0
  76. package/web/.output/server/chunks/build/error-500-CVSP-p02.mjs +89 -0
  77. package/web/.output/server/chunks/build/error-500-CVSP-p02.mjs.map +1 -0
  78. package/web/.output/server/chunks/build/error-500-styles.BX54ZlkH.mjs +8 -0
  79. package/web/.output/server/chunks/build/error-500-styles.BX54ZlkH.mjs.map +1 -0
  80. package/web/.output/server/chunks/build/index-88dXYOxO.mjs +19675 -0
  81. package/web/.output/server/chunks/build/index-88dXYOxO.mjs.map +1 -0
  82. package/web/.output/server/chunks/build/index-styles.V2iua2bE.mjs +8 -0
  83. package/web/.output/server/chunks/build/index-styles.V2iua2bE.mjs.map +1 -0
  84. package/web/.output/server/chunks/build/server.mjs +7910 -0
  85. package/web/.output/server/chunks/build/server.mjs.map +1 -0
  86. package/web/.output/server/chunks/build/styles.mjs +10 -0
  87. package/web/.output/server/chunks/build/styles.mjs.map +1 -0
  88. package/web/.output/server/chunks/nitro/nitro.mjs +6944 -0
  89. package/web/.output/server/chunks/nitro/nitro.mjs.map +1 -0
  90. package/web/.output/server/chunks/routes/api/fields.get.mjs +27 -0
  91. package/web/.output/server/chunks/routes/api/fields.get.mjs.map +1 -0
  92. package/web/.output/server/chunks/routes/api/findings.get.mjs +30 -0
  93. package/web/.output/server/chunks/routes/api/findings.get.mjs.map +1 -0
  94. package/web/.output/server/chunks/routes/api/log/contents.post.mjs +29 -0
  95. package/web/.output/server/chunks/routes/api/log/contents.post.mjs.map +1 -0
  96. package/web/.output/server/chunks/routes/api/log/path.post.mjs +30 -0
  97. package/web/.output/server/chunks/routes/api/log/path.post.mjs.map +1 -0
  98. package/web/.output/server/chunks/routes/api/repositories.get.mjs +27 -0
  99. package/web/.output/server/chunks/routes/api/repositories.get.mjs.map +1 -0
  100. package/web/.output/server/chunks/routes/api/rows.get.mjs +48 -0
  101. package/web/.output/server/chunks/routes/api/rows.get.mjs.map +1 -0
  102. package/web/.output/server/chunks/routes/renderer.mjs +451 -0
  103. package/web/.output/server/chunks/routes/renderer.mjs.map +1 -0
  104. package/web/.output/server/chunks/virtual/_virtual_spa-template.mjs +4 -0
  105. package/web/.output/server/chunks/virtual/_virtual_spa-template.mjs.map +1 -0
  106. package/web/.output/server/index.mjs +16 -0
  107. package/web/.output/server/index.mjs.map +1 -0
  108. package/web/.output/server/node_modules/.nitro/hookable@5.5.3/dist/index.mjs +290 -0
  109. package/web/.output/server/node_modules/.nitro/hookable@5.5.3/package.json +49 -0
  110. package/web/.output/server/node_modules/.nitro/hookable@6.1.1/dist/index.mjs +257 -0
  111. package/web/.output/server/node_modules/.nitro/hookable@6.1.1/package.json +53 -0
  112. package/web/.output/server/node_modules/@babel/parser/lib/index.js +14599 -0
  113. package/web/.output/server/node_modules/@babel/parser/package.json +50 -0
  114. package/web/.output/server/node_modules/@floating-ui/core/dist/floating-ui.core.mjs +1038 -0
  115. package/web/.output/server/node_modules/@floating-ui/core/package.json +63 -0
  116. package/web/.output/server/node_modules/@floating-ui/dom/dist/floating-ui.dom.mjs +789 -0
  117. package/web/.output/server/node_modules/@floating-ui/dom/package.json +72 -0
  118. package/web/.output/server/node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.mjs +165 -0
  119. package/web/.output/server/node_modules/@floating-ui/utils/dist/floating-ui.utils.mjs +136 -0
  120. package/web/.output/server/node_modules/@floating-ui/utils/package.json +70 -0
  121. package/web/.output/server/node_modules/@floating-ui/vue/dist/floating-ui.vue.mjs +190 -0
  122. package/web/.output/server/node_modules/@floating-ui/vue/package.json +71 -0
  123. package/web/.output/server/node_modules/@iconify/utils/lib/colors/index.js +295 -0
  124. package/web/.output/server/node_modules/@iconify/utils/lib/colors/keywords.js +701 -0
  125. package/web/.output/server/node_modules/@iconify/utils/lib/css/common.js +75 -0
  126. package/web/.output/server/node_modules/@iconify/utils/lib/css/format.js +39 -0
  127. package/web/.output/server/node_modules/@iconify/utils/lib/css/icon.js +47 -0
  128. package/web/.output/server/node_modules/@iconify/utils/lib/css/icons.js +128 -0
  129. package/web/.output/server/node_modules/@iconify/utils/lib/customisations/bool.js +19 -0
  130. package/web/.output/server/node_modules/@iconify/utils/lib/customisations/defaults.js +13 -0
  131. package/web/.output/server/node_modules/@iconify/utils/lib/customisations/flip.js +17 -0
  132. package/web/.output/server/node_modules/@iconify/utils/lib/customisations/merge.js +16 -0
  133. package/web/.output/server/node_modules/@iconify/utils/lib/customisations/rotate.js +30 -0
  134. package/web/.output/server/node_modules/@iconify/utils/lib/emoji/cleanup.js +78 -0
  135. package/web/.output/server/node_modules/@iconify/utils/lib/emoji/convert.js +100 -0
  136. package/web/.output/server/node_modules/@iconify/utils/lib/emoji/data.js +28 -0
  137. package/web/.output/server/node_modules/@iconify/utils/lib/emoji/format.js +58 -0
  138. package/web/.output/server/node_modules/@iconify/utils/lib/emoji/parse.js +48 -0
  139. package/web/.output/server/node_modules/@iconify/utils/lib/emoji/regex/base.js +203 -0
  140. package/web/.output/server/node_modules/@iconify/utils/lib/emoji/regex/create.js +33 -0
  141. package/web/.output/server/node_modules/@iconify/utils/lib/emoji/regex/numbers.js +132 -0
  142. package/web/.output/server/node_modules/@iconify/utils/lib/emoji/regex/similar.js +165 -0
  143. package/web/.output/server/node_modules/@iconify/utils/lib/emoji/regex/tree.js +79 -0
  144. package/web/.output/server/node_modules/@iconify/utils/lib/emoji/replace/find.js +92 -0
  145. package/web/.output/server/node_modules/@iconify/utils/lib/emoji/replace/replace.js +26 -0
  146. package/web/.output/server/node_modules/@iconify/utils/lib/emoji/test/components.js +76 -0
  147. package/web/.output/server/node_modules/@iconify/utils/lib/emoji/test/missing.js +66 -0
  148. package/web/.output/server/node_modules/@iconify/utils/lib/emoji/test/name.js +45 -0
  149. package/web/.output/server/node_modules/@iconify/utils/lib/emoji/test/parse.js +103 -0
  150. package/web/.output/server/node_modules/@iconify/utils/lib/emoji/test/similar.js +36 -0
  151. package/web/.output/server/node_modules/@iconify/utils/lib/emoji/test/tree.js +92 -0
  152. package/web/.output/server/node_modules/@iconify/utils/lib/emoji/test/variations.js +62 -0
  153. package/web/.output/server/node_modules/@iconify/utils/lib/icon/defaults.js +25 -0
  154. package/web/.output/server/node_modules/@iconify/utils/lib/icon/merge.js +16 -0
  155. package/web/.output/server/node_modules/@iconify/utils/lib/icon/name.js +57 -0
  156. package/web/.output/server/node_modules/@iconify/utils/lib/icon/square.js +33 -0
  157. package/web/.output/server/node_modules/@iconify/utils/lib/icon/transformations.js +12 -0
  158. package/web/.output/server/node_modules/@iconify/utils/lib/icon-set/convert-info.js +125 -0
  159. package/web/.output/server/node_modules/@iconify/utils/lib/icon-set/expand.js +19 -0
  160. package/web/.output/server/node_modules/@iconify/utils/lib/icon-set/get-icon.js +25 -0
  161. package/web/.output/server/node_modules/@iconify/utils/lib/icon-set/get-icons.js +36 -0
  162. package/web/.output/server/node_modules/@iconify/utils/lib/icon-set/minify.js +91 -0
  163. package/web/.output/server/node_modules/@iconify/utils/lib/icon-set/parse.js +46 -0
  164. package/web/.output/server/node_modules/@iconify/utils/lib/icon-set/tree.js +23 -0
  165. package/web/.output/server/node_modules/@iconify/utils/lib/icon-set/validate-basic.js +42 -0
  166. package/web/.output/server/node_modules/@iconify/utils/lib/icon-set/validate.js +123 -0
  167. package/web/.output/server/node_modules/@iconify/utils/lib/index.js +52 -0
  168. package/web/.output/server/node_modules/@iconify/utils/lib/loader/custom.js +30 -0
  169. package/web/.output/server/node_modules/@iconify/utils/lib/loader/loader.js +26 -0
  170. package/web/.output/server/node_modules/@iconify/utils/lib/loader/modern.js +27 -0
  171. package/web/.output/server/node_modules/@iconify/utils/lib/loader/utils.js +105 -0
  172. package/web/.output/server/node_modules/@iconify/utils/lib/misc/objects.js +26 -0
  173. package/web/.output/server/node_modules/@iconify/utils/lib/misc/strings.js +26 -0
  174. package/web/.output/server/node_modules/@iconify/utils/lib/misc/title.js +9 -0
  175. package/web/.output/server/node_modules/@iconify/utils/lib/svg/build.js +113 -0
  176. package/web/.output/server/node_modules/@iconify/utils/lib/svg/defs.js +31 -0
  177. package/web/.output/server/node_modules/@iconify/utils/lib/svg/encode-svg-for-css.js +13 -0
  178. package/web/.output/server/node_modules/@iconify/utils/lib/svg/html.js +9 -0
  179. package/web/.output/server/node_modules/@iconify/utils/lib/svg/id.js +41 -0
  180. package/web/.output/server/node_modules/@iconify/utils/lib/svg/inner-html.js +22 -0
  181. package/web/.output/server/node_modules/@iconify/utils/lib/svg/parse.js +67 -0
  182. package/web/.output/server/node_modules/@iconify/utils/lib/svg/pretty.js +54 -0
  183. package/web/.output/server/node_modules/@iconify/utils/lib/svg/size.js +27 -0
  184. package/web/.output/server/node_modules/@iconify/utils/lib/svg/trim.js +7 -0
  185. package/web/.output/server/node_modules/@iconify/utils/lib/svg/url.js +22 -0
  186. package/web/.output/server/node_modules/@iconify/utils/lib/svg/viewbox.js +8 -0
  187. package/web/.output/server/node_modules/@iconify/utils/package.json +119 -0
  188. package/web/.output/server/node_modules/@iconify/vue/dist/iconify.mjs +1896 -0
  189. package/web/.output/server/node_modules/@iconify/vue/package.json +62 -0
  190. package/web/.output/server/node_modules/@tanstack/virtual-core/dist/esm/index.js +1268 -0
  191. package/web/.output/server/node_modules/@tanstack/virtual-core/dist/esm/lazy-measurements.js +34 -0
  192. package/web/.output/server/node_modules/@tanstack/virtual-core/dist/esm/utils.js +74 -0
  193. package/web/.output/server/node_modules/@tanstack/virtual-core/package.json +56 -0
  194. package/web/.output/server/node_modules/@tanstack/vue-virtual/dist/esm/index.js +66 -0
  195. package/web/.output/server/node_modules/@tanstack/vue-virtual/package.json +68 -0
  196. package/web/.output/server/node_modules/@vue/compiler-core/dist/compiler-core.cjs.prod.js +6759 -0
  197. package/web/.output/server/node_modules/@vue/compiler-core/package.json +58 -0
  198. package/web/.output/server/node_modules/@vue/compiler-dom/dist/compiler-dom.cjs.prod.js +689 -0
  199. package/web/.output/server/node_modules/@vue/compiler-dom/package.json +57 -0
  200. package/web/.output/server/node_modules/@vue/compiler-ssr/dist/compiler-ssr.cjs.js +1413 -0
  201. package/web/.output/server/node_modules/@vue/compiler-ssr/package.json +34 -0
  202. package/web/.output/server/node_modules/@vue/devtools-api/dist/index.js +2 -0
  203. package/web/.output/server/node_modules/@vue/devtools-api/package.json +34 -0
  204. package/web/.output/server/node_modules/@vue/devtools-kit/dist/index.js +5670 -0
  205. package/web/.output/server/node_modules/@vue/devtools-kit/node_modules/hookable/dist/index.mjs +290 -0
  206. package/web/.output/server/node_modules/@vue/devtools-kit/node_modules/hookable/package.json +49 -0
  207. package/web/.output/server/node_modules/@vue/devtools-kit/package.json +44 -0
  208. package/web/.output/server/node_modules/@vue/devtools-shared/dist/index.js +239 -0
  209. package/web/.output/server/node_modules/@vue/devtools-shared/package.json +33 -0
  210. package/web/.output/server/node_modules/@vue/reactivity/dist/reactivity.cjs.prod.js +1899 -0
  211. package/web/.output/server/node_modules/@vue/reactivity/package.json +55 -0
  212. package/web/.output/server/node_modules/@vue/runtime-core/dist/runtime-core.cjs.prod.js +6940 -0
  213. package/web/.output/server/node_modules/@vue/runtime-core/package.json +52 -0
  214. package/web/.output/server/node_modules/@vue/runtime-dom/dist/runtime-dom.cjs.prod.js +1822 -0
  215. package/web/.output/server/node_modules/@vue/runtime-dom/package.json +60 -0
  216. package/web/.output/server/node_modules/@vue/server-renderer/dist/server-renderer.cjs.prod.js +896 -0
  217. package/web/.output/server/node_modules/@vue/server-renderer/package.json +55 -0
  218. package/web/.output/server/node_modules/@vue/shared/dist/shared.cjs.prod.js +604 -0
  219. package/web/.output/server/node_modules/@vue/shared/package.json +47 -0
  220. package/web/.output/server/node_modules/@vueuse/core/dist/index.js +8464 -0
  221. package/web/.output/server/node_modules/@vueuse/core/package.json +49 -0
  222. package/web/.output/server/node_modules/@vueuse/shared/dist/index.js +2013 -0
  223. package/web/.output/server/node_modules/@vueuse/shared/package.json +42 -0
  224. package/web/.output/server/node_modules/aria-hidden/dist/es5/index.js +174 -0
  225. package/web/.output/server/node_modules/aria-hidden/package.json +71 -0
  226. package/web/.output/server/node_modules/birpc/dist/index.mjs +291 -0
  227. package/web/.output/server/node_modules/birpc/package.json +57 -0
  228. package/web/.output/server/node_modules/consola/dist/chunks/prompt.mjs +280 -0
  229. package/web/.output/server/node_modules/consola/dist/core.mjs +512 -0
  230. package/web/.output/server/node_modules/consola/dist/index.mjs +651 -0
  231. package/web/.output/server/node_modules/consola/dist/shared/consola.DRwqZj3T.mjs +72 -0
  232. package/web/.output/server/node_modules/consola/dist/shared/consola.DXBYu-KD.mjs +288 -0
  233. package/web/.output/server/node_modules/consola/package.json +136 -0
  234. package/web/.output/server/node_modules/devalue/index.js +4 -0
  235. package/web/.output/server/node_modules/devalue/package.json +40 -0
  236. package/web/.output/server/node_modules/devalue/src/base64.js +60 -0
  237. package/web/.output/server/node_modules/devalue/src/constants.js +12 -0
  238. package/web/.output/server/node_modules/devalue/src/parse.js +283 -0
  239. package/web/.output/server/node_modules/devalue/src/stringify.js +401 -0
  240. package/web/.output/server/node_modules/devalue/src/uneval.js +552 -0
  241. package/web/.output/server/node_modules/devalue/src/utils.js +160 -0
  242. package/web/.output/server/node_modules/entities/dist/commonjs/decode-codepoint.js +77 -0
  243. package/web/.output/server/node_modules/entities/dist/commonjs/decode.js +568 -0
  244. package/web/.output/server/node_modules/entities/dist/commonjs/generated/decode-data-html.js +7 -0
  245. package/web/.output/server/node_modules/entities/dist/commonjs/generated/decode-data-xml.js +7 -0
  246. package/web/.output/server/node_modules/entities/dist/commonjs/internal/bin-trie-flags.js +21 -0
  247. package/web/.output/server/node_modules/entities/dist/commonjs/internal/decode-shared.js +31 -0
  248. package/web/.output/server/node_modules/entities/dist/commonjs/package.json +3 -0
  249. package/web/.output/server/node_modules/entities/package.json +120 -0
  250. package/web/.output/server/node_modules/estree-walker/dist/umd/estree-walker.js +344 -0
  251. package/web/.output/server/node_modules/estree-walker/package.json +37 -0
  252. package/web/.output/server/node_modules/hookable/dist/index.mjs +257 -0
  253. package/web/.output/server/node_modules/hookable/package.json +53 -0
  254. package/web/.output/server/node_modules/nostics/dist/index.mjs +179 -0
  255. package/web/.output/server/node_modules/nostics/package.json +124 -0
  256. package/web/.output/server/node_modules/perfect-debounce/dist/index.mjs +89 -0
  257. package/web/.output/server/node_modules/perfect-debounce/package.json +41 -0
  258. package/web/.output/server/node_modules/rou3/dist/index.mjs +501 -0
  259. package/web/.output/server/node_modules/rou3/package.json +48 -0
  260. package/web/.output/server/node_modules/source-map-js/lib/array-set.js +121 -0
  261. package/web/.output/server/node_modules/source-map-js/lib/base64-vlq.js +140 -0
  262. package/web/.output/server/node_modules/source-map-js/lib/base64.js +67 -0
  263. package/web/.output/server/node_modules/source-map-js/lib/binary-search.js +111 -0
  264. package/web/.output/server/node_modules/source-map-js/lib/mapping-list.js +79 -0
  265. package/web/.output/server/node_modules/source-map-js/lib/quick-sort.js +132 -0
  266. package/web/.output/server/node_modules/source-map-js/lib/source-map-consumer.js +1188 -0
  267. package/web/.output/server/node_modules/source-map-js/lib/source-map-generator.js +444 -0
  268. package/web/.output/server/node_modules/source-map-js/lib/source-node.js +413 -0
  269. package/web/.output/server/node_modules/source-map-js/lib/util.js +594 -0
  270. package/web/.output/server/node_modules/source-map-js/package.json +71 -0
  271. package/web/.output/server/node_modules/source-map-js/source-map.js +8 -0
  272. package/web/.output/server/node_modules/srvx/dist/_chunks/_body-limit.mjs +39 -0
  273. package/web/.output/server/node_modules/srvx/dist/_chunks/_plugins.mjs +56 -0
  274. package/web/.output/server/node_modules/srvx/dist/_chunks/_trust-proxy.mjs +58 -0
  275. package/web/.output/server/node_modules/srvx/dist/_chunks/_url.mjs +134 -0
  276. package/web/.output/server/node_modules/srvx/dist/_chunks/_utils.mjs +15 -0
  277. package/web/.output/server/node_modules/srvx/dist/_chunks/_utils2.mjs +75 -0
  278. package/web/.output/server/node_modules/srvx/dist/adapters/node.mjs +976 -0
  279. package/web/.output/server/node_modules/srvx/package.json +102 -0
  280. package/web/.output/server/node_modules/tailwind-merge/dist/bundle-mjs.mjs +3365 -0
  281. package/web/.output/server/node_modules/tailwind-merge/package.json +93 -0
  282. package/web/.output/server/node_modules/tailwind-variants/dist/chunk-LQJYWU4O.js +112 -0
  283. package/web/.output/server/node_modules/tailwind-variants/dist/chunk-RZF76H2U.js +269 -0
  284. package/web/.output/server/node_modules/tailwind-variants/dist/index.js +38 -0
  285. package/web/.output/server/node_modules/tailwind-variants/package.json +122 -0
  286. package/web/.output/server/node_modules/tailwindcss/dist/chunk-X4GG3EDV.mjs +1 -0
  287. package/web/.output/server/node_modules/tailwindcss/dist/colors.mjs +1 -0
  288. package/web/.output/server/node_modules/tailwindcss/package.json +89 -0
  289. package/web/.output/server/node_modules/ufo/dist/index.mjs +645 -0
  290. package/web/.output/server/node_modules/ufo/package.json +48 -0
  291. package/web/.output/server/node_modules/unhead/dist/index.mjs +9 -0
  292. package/web/.output/server/node_modules/unhead/dist/parser.mjs +508 -0
  293. package/web/.output/server/node_modules/unhead/dist/plugins.mjs +101 -0
  294. package/web/.output/server/node_modules/unhead/dist/scripts.mjs +30 -0
  295. package/web/.output/server/node_modules/unhead/dist/server.mjs +180 -0
  296. package/web/.output/server/node_modules/unhead/dist/shared/unhead.B3VbJo7Y.mjs +207 -0
  297. package/web/.output/server/node_modules/unhead/dist/shared/unhead.BYvz9V1x.mjs +43 -0
  298. package/web/.output/server/node_modules/unhead/dist/shared/unhead.BnoAbrHA.mjs +269 -0
  299. package/web/.output/server/node_modules/unhead/dist/shared/unhead.CaI5ZD4O.mjs +182 -0
  300. package/web/.output/server/node_modules/unhead/dist/shared/unhead.CbpEuj3y.mjs +71 -0
  301. package/web/.output/server/node_modules/unhead/dist/shared/unhead.D4vSFytZ.mjs +236 -0
  302. package/web/.output/server/node_modules/unhead/dist/shared/unhead.DQc16pHI.mjs +196 -0
  303. package/web/.output/server/node_modules/unhead/dist/shared/unhead.Dh1cQCTe.mjs +44 -0
  304. package/web/.output/server/node_modules/unhead/dist/shared/unhead.TxTMM7cM.mjs +166 -0
  305. package/web/.output/server/node_modules/unhead/dist/shared/unhead.yem5I2v_.mjs +38 -0
  306. package/web/.output/server/node_modules/unhead/dist/utils.mjs +5 -0
  307. package/web/.output/server/node_modules/unhead/node_modules/hookable/dist/index.mjs +257 -0
  308. package/web/.output/server/node_modules/unhead/node_modules/hookable/package.json +53 -0
  309. package/web/.output/server/node_modules/unhead/package.json +105 -0
  310. package/web/.output/server/node_modules/vue/dist/vue.cjs.js +80 -0
  311. package/web/.output/server/node_modules/vue/dist/vue.cjs.prod.js +66 -0
  312. package/web/.output/server/node_modules/vue/index.js +7 -0
  313. package/web/.output/server/node_modules/vue/index.mjs +1 -0
  314. package/web/.output/server/node_modules/vue/package.json +112 -0
  315. package/web/.output/server/node_modules/vue/server-renderer/index.mjs +1 -0
  316. package/web/.output/server/node_modules/vue-bundle-renderer/dist/runtime.mjs +249 -0
  317. package/web/.output/server/node_modules/vue-bundle-renderer/package.json +57 -0
  318. package/web/.output/server/node_modules/vue-demi/lib/index.mjs +34 -0
  319. package/web/.output/server/node_modules/vue-demi/package.json +47 -0
  320. package/web/.output/server/node_modules/vue-router/dist/devtools-Bpr7ZAVB.js +1056 -0
  321. package/web/.output/server/node_modules/vue-router/dist/useApi-CROJJdhE.js +436 -0
  322. package/web/.output/server/node_modules/vue-router/dist/vue-router.js +1543 -0
  323. package/web/.output/server/node_modules/vue-router/package.json +214 -0
  324. package/web/.output/server/node_modules/vue-router/vue-router.node.mjs +2 -0
  325. package/web/.output/server/package.json +51 -0
@@ -0,0 +1,2013 @@
1
+ import { computed, customRef, effectScope, getCurrentInstance, getCurrentScope, hasInjectionContext, inject, isReactive, isRef, nextTick, onBeforeMount, onBeforeUnmount, onMounted, onScopeDispose, onUnmounted, provide, reactive, readonly, ref, shallowReadonly, shallowRef, toRef as toRef$1, toRefs as toRefs$1, toValue, unref, watch, watchEffect } from "vue";
2
+ //#region computedEager/index.ts
3
+ /**
4
+ *
5
+ * @deprecated This function will be removed in future version.
6
+ *
7
+ * Note: If you are using Vue 3.4+, you can straight use computed instead.
8
+ * Because in Vue 3.4+, if computed new value does not change,
9
+ * computed, effect, watch, watchEffect, render dependencies will not be triggered.
10
+ * refer: https://github.com/vuejs/core/pull/5912
11
+ *
12
+ * @param fn effect function
13
+ * @param options WatchOptionsBase
14
+ * @returns readonly shallowRef
15
+ */
16
+ function computedEager(fn, options) {
17
+ var _options$flush;
18
+ const result = shallowRef();
19
+ watchEffect(() => {
20
+ result.value = fn();
21
+ }, {
22
+ ...options,
23
+ flush: (_options$flush = options === null || options === void 0 ? void 0 : options.flush) !== null && _options$flush !== void 0 ? _options$flush : "sync"
24
+ });
25
+ return readonly(result);
26
+ }
27
+ /** @deprecated use `computedEager` instead */
28
+ const eagerComputed = computedEager;
29
+ //#endregion
30
+ //#region computedWithControl/index.ts
31
+ /**
32
+ * Explicitly define the deps of computed.
33
+ *
34
+ * @param source
35
+ * @param fn
36
+ */
37
+ function computedWithControl(source, fn, options = {}) {
38
+ let v = void 0;
39
+ let track;
40
+ let trigger;
41
+ let dirty = true;
42
+ const update = () => {
43
+ dirty = true;
44
+ trigger();
45
+ };
46
+ watch(source, update, {
47
+ flush: "sync",
48
+ ...options
49
+ });
50
+ const get = typeof fn === "function" ? fn : fn.get;
51
+ const set = typeof fn === "function" ? void 0 : fn.set;
52
+ const result = customRef((_track, _trigger) => {
53
+ track = _track;
54
+ trigger = _trigger;
55
+ return {
56
+ get() {
57
+ if (dirty) {
58
+ v = get(v);
59
+ dirty = false;
60
+ }
61
+ track();
62
+ return v;
63
+ },
64
+ set(v) {
65
+ set === null || set === void 0 || set(v);
66
+ }
67
+ };
68
+ });
69
+ result.trigger = update;
70
+ return result;
71
+ }
72
+ /** @deprecated use `computedWithControl` instead */
73
+ const controlledComputed = computedWithControl;
74
+ //#endregion
75
+ //#region createDisposableDirective/index.ts
76
+ /**
77
+ * Utility for authoring disposable directives. Reactive effects created within `mounted` directive hook will be tracked and automatically disposed when directive is unmounted.
78
+ *
79
+ * @see https://vueuse.org/createDisposableDirective
80
+ *
81
+ * @__NO_SIDE_EFFECTS__
82
+ */
83
+ function createDisposableDirective(origin = {}) {
84
+ function isFunc(fn) {
85
+ return typeof fn === "function";
86
+ }
87
+ const normalisedOrigin = isFunc(origin) ? {
88
+ mounted: origin,
89
+ updated: origin
90
+ } : origin;
91
+ const { mounted, unmounted } = normalisedOrigin;
92
+ if (!isFunc(mounted)) return origin;
93
+ const scopeWeakMap = /* @__PURE__ */ new WeakMap();
94
+ return {
95
+ ...normalisedOrigin,
96
+ mounted(el, binding, vNode, prevNode) {
97
+ var _scopeWeakMap$get;
98
+ const scope = (_scopeWeakMap$get = scopeWeakMap.get(el)) !== null && _scopeWeakMap$get !== void 0 ? _scopeWeakMap$get : effectScope();
99
+ scopeWeakMap.set(el, scope);
100
+ scope.run(() => {
101
+ mounted === null || mounted === void 0 || mounted(el, binding, vNode, prevNode);
102
+ });
103
+ },
104
+ unmounted(el, binding, vNode, prevNode) {
105
+ var _scopeWeakMap$get2;
106
+ (_scopeWeakMap$get2 = scopeWeakMap.get(el)) === null || _scopeWeakMap$get2 === void 0 || _scopeWeakMap$get2.stop();
107
+ scopeWeakMap.delete(el);
108
+ if (isFunc(unmounted)) unmounted(el, binding, vNode, prevNode);
109
+ }
110
+ };
111
+ }
112
+ //#endregion
113
+ //#region tryOnScopeDispose/index.ts
114
+ /**
115
+ * Call onScopeDispose() if it's inside an effect scope lifecycle, if not, do nothing
116
+ *
117
+ * @param fn
118
+ */
119
+ function tryOnScopeDispose(fn, failSilently) {
120
+ if (getCurrentScope()) {
121
+ onScopeDispose(fn, failSilently);
122
+ return true;
123
+ }
124
+ return false;
125
+ }
126
+ //#endregion
127
+ //#region createEventHook/index.ts
128
+ /**
129
+ * Utility for creating event hooks
130
+ *
131
+ * @see https://vueuse.org/createEventHook
132
+ *
133
+ * @__NO_SIDE_EFFECTS__
134
+ */
135
+ function createEventHook() {
136
+ const fns = /* @__PURE__ */ new Set();
137
+ const off = (fn) => {
138
+ fns.delete(fn);
139
+ };
140
+ const clear = () => {
141
+ fns.clear();
142
+ };
143
+ const on = (fn) => {
144
+ fns.add(fn);
145
+ const offFn = () => off(fn);
146
+ tryOnScopeDispose(offFn);
147
+ return { off: offFn };
148
+ };
149
+ const trigger = (...args) => {
150
+ return Promise.all(Array.from(fns).map((fn) => fn(...args)));
151
+ };
152
+ return {
153
+ on,
154
+ off,
155
+ trigger,
156
+ clear
157
+ };
158
+ }
159
+ //#endregion
160
+ //#region createGlobalState/index.ts
161
+ /**
162
+ * Keep states in the global scope to be reusable across Vue instances.
163
+ *
164
+ * @see https://vueuse.org/createGlobalState
165
+ * @param stateFactory A factory function to create the state
166
+ *
167
+ * @__NO_SIDE_EFFECTS__
168
+ */
169
+ function createGlobalState(stateFactory) {
170
+ let initialized = false;
171
+ let state;
172
+ const scope = effectScope(true);
173
+ return ((...args) => {
174
+ if (!initialized) {
175
+ state = scope.run(() => stateFactory(...args));
176
+ initialized = true;
177
+ }
178
+ return state;
179
+ });
180
+ }
181
+ //#endregion
182
+ //#region provideLocal/map.ts
183
+ const localProvidedStateMap = /* @__PURE__ */ new WeakMap();
184
+ //#endregion
185
+ //#region injectLocal/index.ts
186
+ /**
187
+ * On the basis of `inject`, it is allowed to directly call inject to obtain the value after call provide in the same component.
188
+ *
189
+ * @example
190
+ * ```ts
191
+ * injectLocal('MyInjectionKey', 1)
192
+ * const injectedValue = injectLocal('MyInjectionKey') // injectedValue === 1
193
+ * ```
194
+ *
195
+ * @__NO_SIDE_EFFECTS__
196
+ */
197
+ const injectLocal = (...args) => {
198
+ var _getCurrentInstance;
199
+ const key = args[0];
200
+ const instance = (_getCurrentInstance = getCurrentInstance()) === null || _getCurrentInstance === void 0 ? void 0 : _getCurrentInstance.proxy;
201
+ const owner = instance !== null && instance !== void 0 ? instance : getCurrentScope();
202
+ if (owner == null && !hasInjectionContext()) throw new Error("injectLocal must be called in setup");
203
+ if (owner && localProvidedStateMap.has(owner) && key in localProvidedStateMap.get(owner)) return localProvidedStateMap.get(owner)[key];
204
+ return inject(...args);
205
+ };
206
+ //#endregion
207
+ //#region provideLocal/index.ts
208
+ /**
209
+ * On the basis of `provide`, it is allowed to directly call inject to obtain the value after call provide in the same component.
210
+ *
211
+ * @example
212
+ * ```ts
213
+ * provideLocal('MyInjectionKey', 1)
214
+ * const injectedValue = injectLocal('MyInjectionKey') // injectedValue === 1
215
+ * ```
216
+ */
217
+ function provideLocal(key, value) {
218
+ var _getCurrentInstance;
219
+ const instance = (_getCurrentInstance = getCurrentInstance()) === null || _getCurrentInstance === void 0 ? void 0 : _getCurrentInstance.proxy;
220
+ const owner = instance !== null && instance !== void 0 ? instance : getCurrentScope();
221
+ if (owner == null) throw new Error("provideLocal must be called in setup");
222
+ if (!localProvidedStateMap.has(owner)) localProvidedStateMap.set(owner, Object.create(null));
223
+ const localProvidedState = localProvidedStateMap.get(owner);
224
+ localProvidedState[key] = value;
225
+ return provide(key, value);
226
+ }
227
+ //#endregion
228
+ //#region createInjectionState/index.ts
229
+ function createInjectionState(composable, options) {
230
+ const key = (options === null || options === void 0 ? void 0 : options.injectionKey) || Symbol(composable.name || "InjectionState");
231
+ const defaultValue = options === null || options === void 0 ? void 0 : options.defaultValue;
232
+ const useProvidingState = (...args) => {
233
+ const state = composable(...args);
234
+ provideLocal(key, state);
235
+ return state;
236
+ };
237
+ const useInjectedState = () => injectLocal(key, defaultValue);
238
+ return [useProvidingState, useInjectedState];
239
+ }
240
+ //#endregion
241
+ //#region createRef/index.ts
242
+ /**
243
+ * Returns a `deepRef` or `shallowRef` depending on the `deep` param.
244
+ *
245
+ * @example createRef(1) // ShallowRef<number>
246
+ * @example createRef(1, false) // ShallowRef<number>
247
+ * @example createRef(1, true) // Ref<number>
248
+ * @example createRef("string") // ShallowRef<string>
249
+ * @example createRef<"A"|"B">("A", true) // Ref<"A"|"B">
250
+ *
251
+ * @param value
252
+ * @param deep
253
+ * @returns the `deepRef` or `shallowRef`
254
+ *
255
+ * @__NO_SIDE_EFFECTS__
256
+ */
257
+ function createRef(value, deep) {
258
+ if (deep === true) return ref(value);
259
+ else return shallowRef(value);
260
+ }
261
+ //#endregion
262
+ //#region utils/is.ts
263
+ const isClient = typeof window !== "undefined" && typeof document !== "undefined";
264
+ const isWorker = typeof WorkerGlobalScope !== "undefined" && globalThis instanceof WorkerGlobalScope;
265
+ const isDef = (val) => typeof val !== "undefined";
266
+ const notNullish = (val) => val != null;
267
+ const assert = (condition, ...infos) => {
268
+ if (!condition) console.warn(...infos);
269
+ };
270
+ const toString = Object.prototype.toString;
271
+ const isObject = (val) => toString.call(val) === "[object Object]";
272
+ const now = () => Date.now();
273
+ const timestamp = () => +Date.now();
274
+ const clamp = (n, min, max) => Math.min(max, Math.max(min, n));
275
+ const noop = () => {};
276
+ const rand = (min, max) => {
277
+ min = Math.ceil(min);
278
+ max = Math.floor(max);
279
+ return Math.floor(Math.random() * (max - min + 1)) + min;
280
+ };
281
+ const hasOwn = (val, key) => Object.hasOwn(val, key);
282
+ const isIOS = /* @__PURE__ */ getIsIOS();
283
+ function getIsIOS() {
284
+ var _window, _window2, _window3;
285
+ return isClient && !!((_window = window) === null || _window === void 0 || (_window = _window.navigator) === null || _window === void 0 ? void 0 : _window.userAgent) && (/iP(?:ad|hone|od)/.test(window.navigator.userAgent) || ((_window2 = window) === null || _window2 === void 0 || (_window2 = _window2.navigator) === null || _window2 === void 0 ? void 0 : _window2.maxTouchPoints) > 2 && /iPad|Macintosh/.test((_window3 = window) === null || _window3 === void 0 ? void 0 : _window3.navigator.userAgent));
286
+ }
287
+ //#endregion
288
+ //#region toRef/index.ts
289
+ function toRef(...args) {
290
+ if (args.length !== 1) return toRef$1(...args);
291
+ const r = args[0];
292
+ return typeof r === "function" ? readonly(customRef(() => ({
293
+ get: r,
294
+ set: noop
295
+ }))) : ref(r);
296
+ }
297
+ //#endregion
298
+ //#region utils/filters.ts
299
+ /**
300
+ * @internal
301
+ */
302
+ function createFilterWrapper(filter, fn) {
303
+ function wrapper(...args) {
304
+ return new Promise((resolve, reject) => {
305
+ Promise.resolve(filter(() => fn.apply(this, args), {
306
+ fn,
307
+ thisArg: this,
308
+ args
309
+ })).then(resolve).catch(reject);
310
+ });
311
+ }
312
+ return wrapper;
313
+ }
314
+ const bypassFilter = (invoke) => {
315
+ return invoke();
316
+ };
317
+ /**
318
+ * Create an EventFilter that debounce the events
319
+ */
320
+ function debounceFilter(ms, options = {}) {
321
+ let timer;
322
+ let maxTimer;
323
+ let lastRejector = noop;
324
+ const _clearTimeout = (timer) => {
325
+ clearTimeout(timer);
326
+ lastRejector();
327
+ lastRejector = noop;
328
+ };
329
+ let lastInvoker;
330
+ const filter = (invoke) => {
331
+ const duration = toValue(ms);
332
+ const maxDuration = toValue(options.maxWait);
333
+ if (timer) _clearTimeout(timer);
334
+ if (duration <= 0 || maxDuration !== void 0 && maxDuration <= 0) {
335
+ if (maxTimer) {
336
+ _clearTimeout(maxTimer);
337
+ maxTimer = void 0;
338
+ }
339
+ return Promise.resolve(invoke());
340
+ }
341
+ return new Promise((resolve, reject) => {
342
+ lastRejector = options.rejectOnCancel ? reject : resolve;
343
+ lastInvoker = invoke;
344
+ if (maxDuration && !maxTimer) maxTimer = setTimeout(() => {
345
+ if (timer) _clearTimeout(timer);
346
+ maxTimer = void 0;
347
+ resolve(lastInvoker());
348
+ }, maxDuration);
349
+ timer = setTimeout(() => {
350
+ if (maxTimer) _clearTimeout(maxTimer);
351
+ maxTimer = void 0;
352
+ resolve(invoke());
353
+ }, duration);
354
+ });
355
+ };
356
+ return filter;
357
+ }
358
+ function throttleFilter(...args) {
359
+ let lastExec = 0;
360
+ let timer;
361
+ let isLeading = true;
362
+ let lastRejector = noop;
363
+ let lastValue;
364
+ let ms;
365
+ let trailing;
366
+ let leading;
367
+ let rejectOnCancel;
368
+ if (!isRef(args[0]) && typeof args[0] === "object") ({delay: ms, trailing = true, leading = true, rejectOnCancel = false} = args[0]);
369
+ else [ms, trailing = true, leading = true, rejectOnCancel = false] = args;
370
+ const clear = () => {
371
+ if (timer) {
372
+ clearTimeout(timer);
373
+ timer = void 0;
374
+ lastRejector();
375
+ lastRejector = noop;
376
+ }
377
+ };
378
+ const filter = (_invoke) => {
379
+ const duration = toValue(ms);
380
+ const elapsed = Date.now() - lastExec;
381
+ const invoke = () => {
382
+ return lastValue = _invoke();
383
+ };
384
+ clear();
385
+ if (duration <= 0) {
386
+ lastExec = Date.now();
387
+ return invoke();
388
+ }
389
+ if (elapsed > duration) {
390
+ lastExec = Date.now();
391
+ if (leading || !isLeading) invoke();
392
+ } else if (trailing) lastValue = new Promise((resolve, reject) => {
393
+ lastRejector = rejectOnCancel ? reject : resolve;
394
+ timer = setTimeout(() => {
395
+ lastExec = Date.now();
396
+ isLeading = true;
397
+ resolve(invoke());
398
+ clear();
399
+ }, Math.max(0, duration - elapsed));
400
+ });
401
+ if (!leading && !timer) timer = setTimeout(() => isLeading = true, duration);
402
+ isLeading = false;
403
+ return lastValue;
404
+ };
405
+ return filter;
406
+ }
407
+ /**
408
+ * EventFilter that gives extra controls to pause and resume the filter
409
+ *
410
+ * @param extendFilter Extra filter to apply when the PausableFilter is active, default to none
411
+ * @param options Options to configure the filter
412
+ */
413
+ function pausableFilter(extendFilter = bypassFilter, options = {}) {
414
+ const { initialState = "active" } = options;
415
+ const isActive = toRef(initialState === "active");
416
+ function pause() {
417
+ isActive.value = false;
418
+ }
419
+ function resume() {
420
+ isActive.value = true;
421
+ }
422
+ const eventFilter = (...args) => {
423
+ if (isActive.value) extendFilter(...args);
424
+ };
425
+ return {
426
+ isActive: shallowReadonly(isActive),
427
+ pause,
428
+ resume,
429
+ eventFilter
430
+ };
431
+ }
432
+ //#endregion
433
+ //#region utils/general.ts
434
+ function promiseTimeout(ms, throwOnTimeout = false, reason = "Timeout") {
435
+ return new Promise((resolve, reject) => {
436
+ if (throwOnTimeout) setTimeout(reject, ms, reason);
437
+ else setTimeout(resolve, ms);
438
+ });
439
+ }
440
+ function identity(arg) {
441
+ return arg;
442
+ }
443
+ /**
444
+ * Create singleton promise function
445
+ *
446
+ * @example
447
+ * ```
448
+ * const promise = createSingletonPromise(async () => { ... })
449
+ *
450
+ * await promise()
451
+ * await promise() // all of them will be bind to a single promise instance
452
+ * await promise() // and be resolved together
453
+ * ```
454
+ */
455
+ function createSingletonPromise(fn) {
456
+ let _promise;
457
+ function wrapper() {
458
+ if (!_promise) _promise = fn();
459
+ return _promise;
460
+ }
461
+ wrapper.reset = async () => {
462
+ const _prev = _promise;
463
+ _promise = void 0;
464
+ if (_prev) await _prev;
465
+ };
466
+ return wrapper;
467
+ }
468
+ function invoke(fn) {
469
+ return fn();
470
+ }
471
+ function containsProp(obj, ...props) {
472
+ return props.some((k) => k in obj);
473
+ }
474
+ function increaseWithUnit(target, delta) {
475
+ var _target$match;
476
+ if (typeof target === "number") return target + delta;
477
+ const value = ((_target$match = target.match(/^-?\d+\.?\d*/)) === null || _target$match === void 0 ? void 0 : _target$match[0]) || "";
478
+ const unit = target.slice(value.length);
479
+ const result = Number.parseFloat(value) + delta;
480
+ if (Number.isNaN(result)) return target;
481
+ return result + unit;
482
+ }
483
+ /**
484
+ * Get a px value for SSR use, do not rely on this method outside of SSR as REM unit is assumed at 16px, which might not be the case on the client
485
+ */
486
+ function pxValue(px) {
487
+ return px.endsWith("rem") ? Number.parseFloat(px) * 16 : Number.parseFloat(px);
488
+ }
489
+ /**
490
+ * Create a new subset object by giving keys
491
+ */
492
+ function objectPick(obj, keys, omitUndefined = false) {
493
+ return keys.reduce((n, k) => {
494
+ if (k in obj) {
495
+ if (!omitUndefined || obj[k] !== void 0) n[k] = obj[k];
496
+ }
497
+ return n;
498
+ }, {});
499
+ }
500
+ /**
501
+ * Create a new subset object by omit giving keys
502
+ */
503
+ function objectOmit(obj, keys, omitUndefined = false) {
504
+ return Object.fromEntries(Object.entries(obj).filter(([key, value]) => {
505
+ return (!omitUndefined || value !== void 0) && !keys.includes(key);
506
+ }));
507
+ }
508
+ function objectEntries(obj) {
509
+ return Object.entries(obj);
510
+ }
511
+ function toArray(value) {
512
+ return Array.isArray(value) ? value : [value];
513
+ }
514
+ //#endregion
515
+ //#region utils/port.ts
516
+ function cacheStringFunction(fn) {
517
+ const cache = Object.create(null);
518
+ return ((str) => {
519
+ return cache[str] || (cache[str] = fn(str));
520
+ });
521
+ }
522
+ const hyphenateRE = /\B([A-Z])/g;
523
+ const hyphenate = cacheStringFunction((str) => str.replace(hyphenateRE, "-$1").toLowerCase());
524
+ const camelizeRE = /-(\w)/g;
525
+ const camelize = cacheStringFunction((str) => {
526
+ return str.replace(camelizeRE, (_, c) => c ? c.toUpperCase() : "");
527
+ });
528
+ //#endregion
529
+ //#region utils/vue.ts
530
+ function getLifeCycleTarget(target) {
531
+ return target || getCurrentInstance();
532
+ }
533
+ //#endregion
534
+ //#region createSharedComposable/index.ts
535
+ /**
536
+ * Make a composable function usable with multiple Vue instances.
537
+ *
538
+ * @see https://vueuse.org/createSharedComposable
539
+ *
540
+ * @__NO_SIDE_EFFECTS__
541
+ */
542
+ function createSharedComposable(composable) {
543
+ if (!isClient) return composable;
544
+ let subscribers = 0;
545
+ let state;
546
+ let scope;
547
+ const dispose = () => {
548
+ subscribers -= 1;
549
+ if (scope && subscribers <= 0) {
550
+ scope.stop();
551
+ state = void 0;
552
+ scope = void 0;
553
+ }
554
+ };
555
+ return ((...args) => {
556
+ subscribers += 1;
557
+ if (!scope) {
558
+ scope = effectScope(true);
559
+ state = scope.run(() => composable(...args));
560
+ }
561
+ tryOnScopeDispose(dispose);
562
+ return state;
563
+ });
564
+ }
565
+ //#endregion
566
+ //#region extendRef/index.ts
567
+ function extendRef(ref, extend, { enumerable = false, unwrap = true } = {}) {
568
+ for (const [key, value] of Object.entries(extend)) {
569
+ if (key === "value") continue;
570
+ if (isRef(value) && unwrap) Object.defineProperty(ref, key, {
571
+ get() {
572
+ return value.value;
573
+ },
574
+ set(v) {
575
+ value.value = v;
576
+ },
577
+ enumerable
578
+ });
579
+ else Object.defineProperty(ref, key, {
580
+ value,
581
+ enumerable
582
+ });
583
+ }
584
+ return ref;
585
+ }
586
+ //#endregion
587
+ //#region get/index.ts
588
+ function get(obj, key) {
589
+ if (key == null) return unref(obj);
590
+ return unref(obj)[key];
591
+ }
592
+ //#endregion
593
+ //#region isDefined/index.ts
594
+ function isDefined(v) {
595
+ return unref(v) != null;
596
+ }
597
+ //#endregion
598
+ //#region makeDestructurable/index.ts
599
+ /* @__NO_SIDE_EFFECTS__ */
600
+ function makeDestructurable(obj, arr) {
601
+ if (typeof Symbol !== "undefined") {
602
+ const clone = { ...obj };
603
+ Object.defineProperty(clone, Symbol.iterator, {
604
+ enumerable: false,
605
+ value() {
606
+ let index = 0;
607
+ return { next: () => ({
608
+ value: arr[index++],
609
+ done: index > arr.length
610
+ }) };
611
+ }
612
+ });
613
+ return clone;
614
+ } else return Object.assign([...arr], obj);
615
+ }
616
+ //#endregion
617
+ //#region reactify/index.ts
618
+ /**
619
+ * Converts plain function into a reactive function.
620
+ * The converted function accepts refs as it's arguments
621
+ * and returns a ComputedRef, with proper typing.
622
+ *
623
+ * @param fn - Source function
624
+ * @param options - Options
625
+ *
626
+ * @__NO_SIDE_EFFECTS__
627
+ */
628
+ function reactify(fn, options) {
629
+ const unrefFn = (options === null || options === void 0 ? void 0 : options.computedGetter) === false ? unref : toValue;
630
+ return function(...args) {
631
+ return computed(() => fn.apply(this, args.map((i) => unrefFn(i))));
632
+ };
633
+ }
634
+ /** @deprecated use `reactify` instead */
635
+ const createReactiveFn = reactify;
636
+ //#endregion
637
+ //#region reactifyObject/index.ts
638
+ /**
639
+ * Apply `reactify` to an object
640
+ *
641
+ * @__NO_SIDE_EFFECTS__
642
+ */
643
+ function reactifyObject(obj, optionsOrKeys = {}) {
644
+ let keys = [];
645
+ let options;
646
+ if (Array.isArray(optionsOrKeys)) keys = optionsOrKeys;
647
+ else {
648
+ options = optionsOrKeys;
649
+ const { includeOwnProperties = true } = optionsOrKeys;
650
+ keys.push(...Object.keys(obj));
651
+ if (includeOwnProperties) keys.push(...Object.getOwnPropertyNames(obj));
652
+ }
653
+ return Object.fromEntries(keys.map((key) => {
654
+ const value = obj[key];
655
+ return [key, typeof value === "function" ? reactify(value.bind(obj), options) : value];
656
+ }));
657
+ }
658
+ //#endregion
659
+ //#region toReactive/index.ts
660
+ /**
661
+ * Converts ref to reactive.
662
+ *
663
+ * @see https://vueuse.org/toReactive
664
+ * @param objectRef A ref of object
665
+ */
666
+ function toReactive(objectRef) {
667
+ if (!isRef(objectRef)) return reactive(objectRef);
668
+ return reactive(new Proxy({}, {
669
+ get(_, p, receiver) {
670
+ return unref(Reflect.get(objectRef.value, p, receiver));
671
+ },
672
+ set(_, p, value) {
673
+ if (isRef(objectRef.value[p]) && !isRef(value)) objectRef.value[p].value = value;
674
+ else objectRef.value[p] = value;
675
+ return true;
676
+ },
677
+ deleteProperty(_, p) {
678
+ return Reflect.deleteProperty(objectRef.value, p);
679
+ },
680
+ has(_, p) {
681
+ return Reflect.has(objectRef.value, p);
682
+ },
683
+ ownKeys() {
684
+ return Object.keys(objectRef.value);
685
+ },
686
+ getOwnPropertyDescriptor() {
687
+ return {
688
+ enumerable: true,
689
+ configurable: true
690
+ };
691
+ }
692
+ }));
693
+ }
694
+ //#endregion
695
+ //#region reactiveComputed/index.ts
696
+ /**
697
+ * Computed reactive object.
698
+ */
699
+ function reactiveComputed(fn) {
700
+ return toReactive(computed(fn));
701
+ }
702
+ //#endregion
703
+ //#region reactiveOmit/index.ts
704
+ /**
705
+ * Reactively omit fields from a reactive object
706
+ *
707
+ * @see https://vueuse.org/reactiveOmit
708
+ */
709
+ function reactiveOmit(obj, ...keys) {
710
+ const flatKeys = keys.flat();
711
+ const predicate = flatKeys[0];
712
+ return reactiveComputed(() => typeof predicate === "function" ? Object.fromEntries(Object.entries(toRefs$1(obj)).filter(([k, v]) => !predicate(toValue(v), k))) : Object.fromEntries(Object.entries(toRefs$1(obj)).filter((e) => !flatKeys.includes(e[0]))));
713
+ }
714
+ //#endregion
715
+ //#region reactivePick/index.ts
716
+ /**
717
+ * Reactively pick fields from a reactive object
718
+ *
719
+ * @see https://vueuse.org/reactivePick
720
+ */
721
+ function reactivePick(obj, ...keys) {
722
+ const flatKeys = keys.flat();
723
+ const predicate = flatKeys[0];
724
+ return reactiveComputed(() => typeof predicate === "function" ? Object.fromEntries(Object.entries(toRefs$1(obj)).filter(([k, v]) => predicate(toValue(v), k))) : Object.fromEntries(flatKeys.map((k) => [k, toRef(obj, k)])));
725
+ }
726
+ //#endregion
727
+ //#region refAutoReset/index.ts
728
+ /**
729
+ * Create a ref which will be reset to the default value after some time.
730
+ *
731
+ * @see https://vueuse.org/refAutoReset
732
+ * @param defaultValue The value which will be set.
733
+ * @param afterMs A zero-or-greater delay in milliseconds.
734
+ */
735
+ function refAutoReset(defaultValue, afterMs = 1e4) {
736
+ return customRef((track, trigger) => {
737
+ let value = toValue(defaultValue);
738
+ let timer;
739
+ const resetAfter = () => setTimeout(() => {
740
+ value = toValue(defaultValue);
741
+ trigger();
742
+ }, toValue(afterMs));
743
+ tryOnScopeDispose(() => {
744
+ clearTimeout(timer);
745
+ });
746
+ return {
747
+ get() {
748
+ track();
749
+ return value;
750
+ },
751
+ set(newValue) {
752
+ value = newValue;
753
+ trigger();
754
+ clearTimeout(timer);
755
+ timer = resetAfter();
756
+ }
757
+ };
758
+ });
759
+ }
760
+ /** @deprecated use `refAutoReset` instead */
761
+ const autoResetRef = refAutoReset;
762
+ //#endregion
763
+ //#region useDebounceFn/index.ts
764
+ /**
765
+ * Debounce execution of a function.
766
+ *
767
+ * @see https://vueuse.org/useDebounceFn
768
+ * @param fn A function to be executed after delay milliseconds debounced.
769
+ * @param ms A zero-or-greater delay in milliseconds. For event callbacks, values around 100 or 250 (or even higher) are most useful.
770
+ * @param options Options
771
+ *
772
+ * @return A new, debounce, function.
773
+ *
774
+ * @__NO_SIDE_EFFECTS__
775
+ */
776
+ function useDebounceFn(fn, ms = 200, options = {}) {
777
+ return createFilterWrapper(debounceFilter(ms, options), fn);
778
+ }
779
+ //#endregion
780
+ //#region refDebounced/index.ts
781
+ /**
782
+ * Debounce updates of a ref.
783
+ *
784
+ * @return A new debounced ref.
785
+ */
786
+ function refDebounced(value, ms = 200, options = {}) {
787
+ const debounced = ref(toValue(value));
788
+ const updater = useDebounceFn(() => {
789
+ debounced.value = value.value;
790
+ }, ms, options);
791
+ watch(value, () => updater());
792
+ return shallowReadonly(debounced);
793
+ }
794
+ /** @deprecated use `refDebounced` instead */
795
+ const debouncedRef = refDebounced;
796
+ /** @deprecated use `refDebounced` instead */
797
+ const useDebounce = refDebounced;
798
+ //#endregion
799
+ //#region refDefault/index.ts
800
+ /**
801
+ * Apply default value to a ref.
802
+ *
803
+ * @__NO_SIDE_EFFECTS__
804
+ */
805
+ function refDefault(source, defaultValue) {
806
+ return computed({
807
+ get() {
808
+ var _source$value;
809
+ return (_source$value = source.value) !== null && _source$value !== void 0 ? _source$value : defaultValue;
810
+ },
811
+ set(value) {
812
+ source.value = value;
813
+ }
814
+ });
815
+ }
816
+ //#endregion
817
+ //#region refManualReset/index.ts
818
+ /**
819
+ * Create a ref with manual reset functionality.
820
+ *
821
+ * @see https://vueuse.org/refManualReset
822
+ * @param defaultValue The value which will be set.
823
+ */
824
+ function refManualReset(defaultValue) {
825
+ let value = toValue(defaultValue);
826
+ let trigger;
827
+ const reset = () => {
828
+ value = toValue(defaultValue);
829
+ trigger();
830
+ };
831
+ const refValue = customRef((track, _trigger) => {
832
+ trigger = _trigger;
833
+ return {
834
+ get() {
835
+ track();
836
+ return value;
837
+ },
838
+ set(newValue) {
839
+ value = newValue;
840
+ trigger();
841
+ }
842
+ };
843
+ });
844
+ refValue.reset = reset;
845
+ return refValue;
846
+ }
847
+ //#endregion
848
+ //#region useThrottleFn/index.ts
849
+ /**
850
+ * Throttle execution of a function. Especially useful for rate limiting
851
+ * execution of handlers on events like resize and scroll.
852
+ *
853
+ * @param fn A function to be executed after delay milliseconds. The `this` context and all arguments are passed through, as-is,
854
+ * to `callback` when the throttled-function is executed.
855
+ * @param ms A zero-or-greater delay in milliseconds. For event callbacks, values around 100 or 250 (or even higher) are most useful.
856
+ * (default value: 200)
857
+ *
858
+ * @param [trailing] if true, call fn again after the time is up (default value: false)
859
+ *
860
+ * @param [leading] if true, call fn on the leading edge of the ms timeout (default value: true)
861
+ *
862
+ * @param [rejectOnCancel] if true, reject the last call if it's been cancel (default value: false)
863
+ *
864
+ * @return A new, throttled, function.
865
+ *
866
+ * @__NO_SIDE_EFFECTS__
867
+ */
868
+ function useThrottleFn(fn, ms = 200, trailing = false, leading = true, rejectOnCancel = false) {
869
+ return createFilterWrapper(throttleFilter(ms, trailing, leading, rejectOnCancel), fn);
870
+ }
871
+ //#endregion
872
+ //#region refThrottled/index.ts
873
+ /**
874
+ * Throttle execution of a function. Especially useful for rate limiting
875
+ * execution of handlers on events like resize and scroll.
876
+ *
877
+ * @param value Ref value to be watched with throttle effect
878
+ * @param delay A zero-or-greater delay in milliseconds. For event callbacks, values around 100 or 250 (or even higher) are most useful.
879
+ * @param trailing if true, update the value again after the delay time is up
880
+ * @param leading if true, update the value on the leading edge of the ms timeout
881
+ */
882
+ function refThrottled(value, delay = 200, trailing = true, leading = true) {
883
+ if (delay <= 0) return value;
884
+ const throttled = ref(toValue(value));
885
+ const updater = useThrottleFn(() => {
886
+ throttled.value = value.value;
887
+ }, delay, trailing, leading);
888
+ watch(value, () => updater());
889
+ return throttled;
890
+ }
891
+ /** @deprecated use `refThrottled` instead */
892
+ const throttledRef = refThrottled;
893
+ /** @deprecated use `refThrottled` instead */
894
+ const useThrottle = refThrottled;
895
+ //#endregion
896
+ //#region refWithControl/index.ts
897
+ /**
898
+ * Fine-grained controls over ref and its reactivity.
899
+ *
900
+ * @__NO_SIDE_EFFECTS__
901
+ */
902
+ function refWithControl(initial, options = {}) {
903
+ let source = initial;
904
+ let track;
905
+ let trigger;
906
+ const ref = customRef((_track, _trigger) => {
907
+ track = _track;
908
+ trigger = _trigger;
909
+ return {
910
+ get() {
911
+ return get();
912
+ },
913
+ set(v) {
914
+ set(v);
915
+ }
916
+ };
917
+ });
918
+ function get(tracking = true) {
919
+ if (tracking) track();
920
+ return source;
921
+ }
922
+ function set(value, triggering = true) {
923
+ var _options$onBeforeChan, _options$onChanged;
924
+ if (value === source) return;
925
+ const old = source;
926
+ if (((_options$onBeforeChan = options.onBeforeChange) === null || _options$onBeforeChan === void 0 ? void 0 : _options$onBeforeChan.call(options, value, old)) === false) return;
927
+ source = value;
928
+ (_options$onChanged = options.onChanged) === null || _options$onChanged === void 0 || _options$onChanged.call(options, value, old);
929
+ if (triggering) trigger();
930
+ }
931
+ /**
932
+ * Get the value without tracked in the reactivity system
933
+ */
934
+ const untrackedGet = () => get(false);
935
+ /**
936
+ * Set the value without triggering the reactivity system
937
+ */
938
+ const silentSet = (v) => set(v, false);
939
+ /**
940
+ * Get the value without tracked in the reactivity system.
941
+ *
942
+ * Alias for `untrackedGet()`
943
+ */
944
+ const peek = () => get(false);
945
+ /**
946
+ * Set the value without triggering the reactivity system
947
+ *
948
+ * Alias for `silentSet(v)`
949
+ */
950
+ const lay = (v) => set(v, false);
951
+ return extendRef(ref, {
952
+ get,
953
+ set,
954
+ untrackedGet,
955
+ silentSet,
956
+ peek,
957
+ lay
958
+ }, { enumerable: true });
959
+ }
960
+ /** @deprecated use `refWithControl` instead */
961
+ const controlledRef = refWithControl;
962
+ //#endregion
963
+ //#region set/index.ts
964
+ /**
965
+ * Shorthand for `ref.value = x`
966
+ */
967
+ function set(...args) {
968
+ if (args.length === 2) {
969
+ const [ref, value] = args;
970
+ ref.value = value;
971
+ }
972
+ if (args.length === 3) {
973
+ const [target, key, value] = args;
974
+ target[key] = value;
975
+ }
976
+ }
977
+ //#endregion
978
+ //#region watchWithFilter/index.ts
979
+ function watchWithFilter(source, cb, options = {}) {
980
+ const { eventFilter = bypassFilter, ...watchOptions } = options;
981
+ return watch(source, createFilterWrapper(eventFilter, cb), watchOptions);
982
+ }
983
+ //#endregion
984
+ //#region watchPausable/index.ts
985
+ /** @deprecated Use Vue's built-in `watch` instead. This function will be removed in future version. */
986
+ function watchPausable(source, cb, options = {}) {
987
+ const { eventFilter: filter, initialState = "active", ...watchOptions } = options;
988
+ const { eventFilter, pause, resume, isActive } = pausableFilter(filter, { initialState });
989
+ return {
990
+ stop: watchWithFilter(source, cb, {
991
+ ...watchOptions,
992
+ eventFilter
993
+ }),
994
+ pause,
995
+ resume,
996
+ isActive
997
+ };
998
+ }
999
+ /** @deprecated Use Vue's built-in `watch` instead. This function will be removed in future version. */
1000
+ const pausableWatch = watchPausable;
1001
+ //#endregion
1002
+ //#region syncRef/index.ts
1003
+ /**
1004
+ * Two-way refs synchronization.
1005
+ * From the set theory perspective to restrict the option's type
1006
+ * Check in the following order:
1007
+ * 1. L = R
1008
+ * 2. L ∩ R ≠ ∅
1009
+ * 3. L ⊆ R
1010
+ * 4. L ∩ R = ∅
1011
+ */
1012
+ function syncRef(left, right, ...[options]) {
1013
+ const { flush = "sync", deep = false, immediate = true, direction = "both", transform = {} } = options || {};
1014
+ const watchers = [];
1015
+ const transformLTR = "ltr" in transform && transform.ltr || ((v) => v);
1016
+ const transformRTL = "rtl" in transform && transform.rtl || ((v) => v);
1017
+ if (direction === "both" || direction === "ltr") watchers.push(watchPausable(left, (newValue) => {
1018
+ watchers.forEach((w) => w.pause());
1019
+ right.value = transformLTR(newValue);
1020
+ watchers.forEach((w) => w.resume());
1021
+ }, {
1022
+ flush,
1023
+ deep,
1024
+ immediate
1025
+ }));
1026
+ if (direction === "both" || direction === "rtl") watchers.push(watchPausable(right, (newValue) => {
1027
+ watchers.forEach((w) => w.pause());
1028
+ left.value = transformRTL(newValue);
1029
+ watchers.forEach((w) => w.resume());
1030
+ }, {
1031
+ flush,
1032
+ deep,
1033
+ immediate
1034
+ }));
1035
+ const stop = () => {
1036
+ watchers.forEach((w) => w.stop());
1037
+ };
1038
+ return stop;
1039
+ }
1040
+ //#endregion
1041
+ //#region syncRefs/index.ts
1042
+ /**
1043
+ * Keep target ref(s) in sync with the source ref
1044
+ *
1045
+ * @param source source ref
1046
+ * @param targets
1047
+ */
1048
+ function syncRefs(source, targets, options = {}) {
1049
+ const { flush = "sync", deep = false, immediate = true } = options;
1050
+ const targetsArray = toArray(targets);
1051
+ return watch(source, (newValue) => targetsArray.forEach((target) => target.value = newValue), {
1052
+ flush,
1053
+ deep,
1054
+ immediate
1055
+ });
1056
+ }
1057
+ //#endregion
1058
+ //#region toRefs/index.ts
1059
+ /**
1060
+ * Extended `toRefs` that also accepts refs of an object.
1061
+ *
1062
+ * @see https://vueuse.org/toRefs
1063
+ * @param objectRef A ref or normal object or array.
1064
+ * @param options Options
1065
+ */
1066
+ function toRefs(objectRef, options = {}) {
1067
+ if (!isRef(objectRef)) return toRefs$1(objectRef);
1068
+ const result = Array.isArray(objectRef.value) ? Array.from({ length: objectRef.value.length }) : {};
1069
+ for (const key in objectRef.value) result[key] = customRef(() => ({
1070
+ get() {
1071
+ return objectRef.value[key];
1072
+ },
1073
+ set(v) {
1074
+ var _toValue;
1075
+ if ((_toValue = toValue(options.replaceRef)) !== null && _toValue !== void 0 ? _toValue : true) if (Array.isArray(objectRef.value)) {
1076
+ const copy = [...objectRef.value];
1077
+ copy[key] = v;
1078
+ objectRef.value = copy;
1079
+ } else {
1080
+ const newObject = {
1081
+ ...objectRef.value,
1082
+ [key]: v
1083
+ };
1084
+ Object.setPrototypeOf(newObject, Object.getPrototypeOf(objectRef.value));
1085
+ objectRef.value = newObject;
1086
+ }
1087
+ else objectRef.value[key] = v;
1088
+ }
1089
+ }));
1090
+ return result;
1091
+ }
1092
+ //#endregion
1093
+ //#region tryOnBeforeMount/index.ts
1094
+ /**
1095
+ * Call onBeforeMount() if it's inside a component lifecycle, if not, just call the function
1096
+ *
1097
+ * @param fn
1098
+ * @param sync if set to false, it will run in the nextTick() of Vue
1099
+ * @param target
1100
+ */
1101
+ function tryOnBeforeMount(fn, sync = true, target) {
1102
+ if (getLifeCycleTarget(target)) onBeforeMount(fn, target);
1103
+ else if (sync) fn();
1104
+ else nextTick(fn);
1105
+ }
1106
+ //#endregion
1107
+ //#region tryOnBeforeUnmount/index.ts
1108
+ /**
1109
+ * Call onBeforeUnmount() if it's inside a component lifecycle, if not, do nothing
1110
+ *
1111
+ * @param fn
1112
+ * @param target
1113
+ */
1114
+ function tryOnBeforeUnmount(fn, target) {
1115
+ if (getLifeCycleTarget(target)) onBeforeUnmount(fn, target);
1116
+ }
1117
+ //#endregion
1118
+ //#region tryOnMounted/index.ts
1119
+ /**
1120
+ * Call onMounted() if it's inside a component lifecycle, if not, just call the function
1121
+ *
1122
+ * @param fn
1123
+ * @param sync if set to false, it will run in the nextTick() of Vue
1124
+ * @param target
1125
+ */
1126
+ function tryOnMounted(fn, sync = true, target) {
1127
+ if (getLifeCycleTarget(target)) onMounted(fn, target);
1128
+ else if (sync) fn();
1129
+ else nextTick(fn);
1130
+ }
1131
+ //#endregion
1132
+ //#region tryOnUnmounted/index.ts
1133
+ /**
1134
+ * Call onUnmounted() if it's inside a component lifecycle, if not, do nothing
1135
+ *
1136
+ * @param fn
1137
+ * @param target
1138
+ */
1139
+ function tryOnUnmounted(fn, target) {
1140
+ if (getLifeCycleTarget(target)) onUnmounted(fn, target);
1141
+ }
1142
+ //#endregion
1143
+ //#region until/index.ts
1144
+ function createUntil(r, isNot = false) {
1145
+ function toMatch(condition, { flush = "sync", deep = false, timeout, throwOnTimeout } = {}) {
1146
+ let stop = null;
1147
+ const promises = [new Promise((resolve) => {
1148
+ stop = watch(r, (v) => {
1149
+ if (condition(v) !== isNot) {
1150
+ if (stop) stop();
1151
+ else nextTick(() => stop === null || stop === void 0 ? void 0 : stop());
1152
+ resolve(v);
1153
+ }
1154
+ }, {
1155
+ flush,
1156
+ deep,
1157
+ immediate: true
1158
+ });
1159
+ })];
1160
+ if (timeout != null) promises.push(promiseTimeout(timeout, throwOnTimeout).then(() => toValue(r)).finally(() => stop === null || stop === void 0 ? void 0 : stop()));
1161
+ return Promise.race(promises);
1162
+ }
1163
+ function toBe(value, options) {
1164
+ if (!isRef(value)) return toMatch((v) => v === value, options);
1165
+ const { flush = "sync", deep = false, timeout, throwOnTimeout } = options !== null && options !== void 0 ? options : {};
1166
+ let stop = null;
1167
+ const promises = [new Promise((resolve) => {
1168
+ stop = watch([r, value], ([v1, v2]) => {
1169
+ if (isNot !== (v1 === v2)) {
1170
+ if (stop) stop();
1171
+ else nextTick(() => stop === null || stop === void 0 ? void 0 : stop());
1172
+ resolve(v1);
1173
+ }
1174
+ }, {
1175
+ flush,
1176
+ deep,
1177
+ immediate: true
1178
+ });
1179
+ })];
1180
+ if (timeout != null) promises.push(promiseTimeout(timeout, throwOnTimeout).then(() => toValue(r)).finally(() => {
1181
+ stop === null || stop === void 0 || stop();
1182
+ return toValue(r);
1183
+ }));
1184
+ return Promise.race(promises);
1185
+ }
1186
+ function toBeTruthy(options) {
1187
+ return toMatch((v) => Boolean(v), options);
1188
+ }
1189
+ function toBeNull(options) {
1190
+ return toBe(null, options);
1191
+ }
1192
+ function toBeUndefined(options) {
1193
+ return toBe(void 0, options);
1194
+ }
1195
+ function toBeNaN(options) {
1196
+ return toMatch(Number.isNaN, options);
1197
+ }
1198
+ function toContains(value, options) {
1199
+ return toMatch((v) => {
1200
+ const array = Array.from(v);
1201
+ return array.includes(value) || array.includes(toValue(value));
1202
+ }, options);
1203
+ }
1204
+ function changed(options) {
1205
+ return changedTimes(1, options);
1206
+ }
1207
+ function changedTimes(n = 1, options) {
1208
+ let count = -1;
1209
+ return toMatch(() => {
1210
+ count += 1;
1211
+ return count >= n;
1212
+ }, options);
1213
+ }
1214
+ if (Array.isArray(toValue(r))) return {
1215
+ toMatch,
1216
+ toContains,
1217
+ changed,
1218
+ changedTimes,
1219
+ get not() {
1220
+ return createUntil(r, !isNot);
1221
+ }
1222
+ };
1223
+ else return {
1224
+ toMatch,
1225
+ toBe,
1226
+ toBeTruthy,
1227
+ toBeNull,
1228
+ toBeNaN,
1229
+ toBeUndefined,
1230
+ changed,
1231
+ changedTimes,
1232
+ get not() {
1233
+ return createUntil(r, !isNot);
1234
+ }
1235
+ };
1236
+ }
1237
+ function until(r) {
1238
+ return createUntil(r);
1239
+ }
1240
+ //#endregion
1241
+ //#region useArrayDifference/index.ts
1242
+ function defaultComparator(value, othVal) {
1243
+ return value === othVal;
1244
+ }
1245
+ /**
1246
+ * Reactive get array difference of two array
1247
+ * @see https://vueuse.org/useArrayDifference
1248
+ * @returns - the difference of two array
1249
+ * @param args
1250
+ *
1251
+ * @__NO_SIDE_EFFECTS__
1252
+ */
1253
+ function useArrayDifference(...args) {
1254
+ var _args$, _args$2;
1255
+ const list = args[0];
1256
+ const values = args[1];
1257
+ let compareFn = (_args$ = args[2]) !== null && _args$ !== void 0 ? _args$ : defaultComparator;
1258
+ const { symmetric = false } = (_args$2 = args[3]) !== null && _args$2 !== void 0 ? _args$2 : {};
1259
+ if (typeof compareFn === "string") {
1260
+ const key = compareFn;
1261
+ compareFn = (value, othVal) => value[key] === othVal[key];
1262
+ }
1263
+ const diff1 = computed(() => toValue(list).filter((x) => toValue(values).findIndex((y) => compareFn(x, y)) === -1));
1264
+ if (symmetric) {
1265
+ const diff2 = computed(() => toValue(values).filter((x) => toValue(list).findIndex((y) => compareFn(x, y)) === -1));
1266
+ return computed(() => symmetric ? [...toValue(diff1), ...toValue(diff2)] : toValue(diff1));
1267
+ } else return diff1;
1268
+ }
1269
+ //#endregion
1270
+ //#region useArrayEvery/index.ts
1271
+ /**
1272
+ * Reactive `Array.every`
1273
+ *
1274
+ * @see https://vueuse.org/useArrayEvery
1275
+ * @param list - the array was called upon.
1276
+ * @param fn - a function to test each element.
1277
+ *
1278
+ * @returns **true** if the `fn` function returns a **truthy** value for every element from the array. Otherwise, **false**.
1279
+ *
1280
+ * @__NO_SIDE_EFFECTS__
1281
+ */
1282
+ function useArrayEvery(list, fn) {
1283
+ return computed(() => toValue(list).every((element, index, array) => fn(toValue(element), index, array)));
1284
+ }
1285
+ //#endregion
1286
+ //#region useArrayFilter/index.ts
1287
+ /**
1288
+ * Reactive `Array.filter`
1289
+ *
1290
+ * @see https://vueuse.org/useArrayFilter
1291
+ * @param list - the array was called upon.
1292
+ * @param fn - a function that is called for every element of the given `list`. Each time `fn` executes, the returned value is added to the new array.
1293
+ *
1294
+ * @returns a shallow copy of a portion of the given array, filtered down to just the elements from the given array that pass the test implemented by the provided function. If no elements pass the test, an empty array will be returned.
1295
+ *
1296
+ * @__NO_SIDE_EFFECTS__
1297
+ */
1298
+ function useArrayFilter(list, fn) {
1299
+ return computed(() => toValue(list).map((i) => toValue(i)).filter(fn));
1300
+ }
1301
+ //#endregion
1302
+ //#region useArrayFind/index.ts
1303
+ /**
1304
+ * Reactive `Array.find`
1305
+ *
1306
+ * @see https://vueuse.org/useArrayFind
1307
+ * @param list - the array was called upon.
1308
+ * @param fn - a function to test each element.
1309
+ *
1310
+ * @returns the first element in the array that satisfies the provided testing function. Otherwise, undefined is returned.
1311
+ *
1312
+ * @__NO_SIDE_EFFECTS__
1313
+ */
1314
+ function useArrayFind(list, fn) {
1315
+ return computed(() => toValue(toValue(list).find((element, index, array) => fn(toValue(element), index, array))));
1316
+ }
1317
+ //#endregion
1318
+ //#region useArrayFindIndex/index.ts
1319
+ /**
1320
+ * Reactive `Array.findIndex`
1321
+ *
1322
+ * @see https://vueuse.org/useArrayFindIndex
1323
+ * @param list - the array was called upon.
1324
+ * @param fn - a function to test each element.
1325
+ *
1326
+ * @returns the index of the first element in the array that passes the test. Otherwise, "-1".
1327
+ *
1328
+ * @__NO_SIDE_EFFECTS__
1329
+ */
1330
+ function useArrayFindIndex(list, fn) {
1331
+ return computed(() => toValue(list).findIndex((element, index, array) => fn(toValue(element), index, array)));
1332
+ }
1333
+ //#endregion
1334
+ //#region useArrayFindLast/index.ts
1335
+ function findLast(arr, cb) {
1336
+ let index = arr.length;
1337
+ while (index-- > 0) if (cb(arr[index], index, arr)) return arr[index];
1338
+ }
1339
+ /**
1340
+ * Reactive `Array.findLast`
1341
+ *
1342
+ * @see https://vueuse.org/useArrayFindLast
1343
+ * @param list - the array was called upon.
1344
+ * @param fn - a function to test each element.
1345
+ *
1346
+ * @returns the last element in the array that satisfies the provided testing function. Otherwise, undefined is returned.
1347
+ *
1348
+ * @__NO_SIDE_EFFECTS__
1349
+ */
1350
+ function useArrayFindLast(list, fn) {
1351
+ return computed(() => toValue(!Array.prototype.findLast ? findLast(toValue(list), (element, index, array) => fn(toValue(element), index, array)) : toValue(list).findLast((element, index, array) => fn(toValue(element), index, array))));
1352
+ }
1353
+ //#endregion
1354
+ //#region useArrayIncludes/index.ts
1355
+ function isArrayIncludesOptions(obj) {
1356
+ return isObject(obj) && containsProp(obj, "formIndex", "comparator");
1357
+ }
1358
+ /**
1359
+ * Reactive `Array.includes`
1360
+ *
1361
+ * @see https://vueuse.org/useArrayIncludes
1362
+ *
1363
+ * @returns true if the `value` is found in the array. Otherwise, false.
1364
+ *
1365
+ * @__NO_SIDE_EFFECTS__
1366
+ */
1367
+ function useArrayIncludes(...args) {
1368
+ var _comparator;
1369
+ const list = args[0];
1370
+ const value = args[1];
1371
+ let comparator = args[2];
1372
+ let formIndex = 0;
1373
+ if (isArrayIncludesOptions(comparator)) {
1374
+ var _comparator$fromIndex;
1375
+ formIndex = (_comparator$fromIndex = comparator.fromIndex) !== null && _comparator$fromIndex !== void 0 ? _comparator$fromIndex : 0;
1376
+ comparator = comparator.comparator;
1377
+ }
1378
+ if (typeof comparator === "string") {
1379
+ const key = comparator;
1380
+ comparator = (element, value) => element[key] === toValue(value);
1381
+ }
1382
+ comparator = (_comparator = comparator) !== null && _comparator !== void 0 ? _comparator : ((element, value) => element === toValue(value));
1383
+ return computed(() => toValue(list).slice(formIndex).some((element, index, array) => comparator(toValue(element), toValue(value), index, toValue(array))));
1384
+ }
1385
+ //#endregion
1386
+ //#region useArrayJoin/index.ts
1387
+ /**
1388
+ * Reactive `Array.join`
1389
+ *
1390
+ * @see https://vueuse.org/useArrayJoin
1391
+ * @param list - the array was called upon.
1392
+ * @param separator - a string to separate each pair of adjacent elements of the array. If omitted, the array elements are separated with a comma (",").
1393
+ *
1394
+ * @returns a string with all array elements joined. If arr.length is 0, the empty string is returned.
1395
+ *
1396
+ * @__NO_SIDE_EFFECTS__
1397
+ */
1398
+ function useArrayJoin(list, separator) {
1399
+ return computed(() => toValue(list).map((i) => toValue(i)).join(toValue(separator)));
1400
+ }
1401
+ //#endregion
1402
+ //#region useArrayMap/index.ts
1403
+ /**
1404
+ * Reactive `Array.map`
1405
+ *
1406
+ * @see https://vueuse.org/useArrayMap
1407
+ * @param list - the array was called upon.
1408
+ * @param fn - a function that is called for every element of the given `list`. Each time `fn` executes, the returned value is added to the new array.
1409
+ *
1410
+ * @returns a new array with each element being the result of the callback function.
1411
+ *
1412
+ * @__NO_SIDE_EFFECTS__
1413
+ */
1414
+ function useArrayMap(list, fn) {
1415
+ return computed(() => toValue(list).map((i) => toValue(i)).map(fn));
1416
+ }
1417
+ //#endregion
1418
+ //#region useArrayReduce/index.ts
1419
+ /**
1420
+ * Reactive `Array.reduce`
1421
+ *
1422
+ * @see https://vueuse.org/useArrayReduce
1423
+ * @param list - the array was called upon.
1424
+ * @param reducer - a "reducer" function.
1425
+ * @param args
1426
+ *
1427
+ * @returns the value that results from running the "reducer" callback function to completion over the entire array.
1428
+ *
1429
+ * @__NO_SIDE_EFFECTS__
1430
+ */
1431
+ function useArrayReduce(list, reducer, ...args) {
1432
+ const reduceCallback = (sum, value, index) => reducer(toValue(sum), toValue(value), index);
1433
+ return computed(() => {
1434
+ const resolved = toValue(list);
1435
+ return args.length ? resolved.reduce(reduceCallback, typeof args[0] === "function" ? toValue(args[0]()) : toValue(args[0])) : resolved.reduce(reduceCallback);
1436
+ });
1437
+ }
1438
+ //#endregion
1439
+ //#region useArraySome/index.ts
1440
+ /**
1441
+ * Reactive `Array.some`
1442
+ *
1443
+ * @see https://vueuse.org/useArraySome
1444
+ * @param list - the array was called upon.
1445
+ * @param fn - a function to test each element.
1446
+ *
1447
+ * @returns **true** if the `fn` function returns a **truthy** value for any element from the array. Otherwise, **false**.
1448
+ *
1449
+ * @__NO_SIDE_EFFECTS__
1450
+ */
1451
+ function useArraySome(list, fn) {
1452
+ return computed(() => toValue(list).some((element, index, array) => fn(toValue(element), index, array)));
1453
+ }
1454
+ //#endregion
1455
+ //#region useArrayUnique/index.ts
1456
+ function uniq(array) {
1457
+ return Array.from(new Set(array));
1458
+ }
1459
+ function uniqueElementsBy(array, fn) {
1460
+ return array.reduce((acc, v) => {
1461
+ if (!acc.some((x) => fn(v, x, array))) acc.push(v);
1462
+ return acc;
1463
+ }, []);
1464
+ }
1465
+ /**
1466
+ * reactive unique array
1467
+ * @see https://vueuse.org/useArrayUnique
1468
+ * @param list - the array was called upon.
1469
+ * @param compareFn
1470
+ * @returns A computed ref that returns a unique array of items.
1471
+ *
1472
+ * @__NO_SIDE_EFFECTS__
1473
+ */
1474
+ function useArrayUnique(list, compareFn) {
1475
+ return computed(() => {
1476
+ const resolvedList = toValue(list).map((element) => toValue(element));
1477
+ return compareFn ? uniqueElementsBy(resolvedList, compareFn) : uniq(resolvedList);
1478
+ });
1479
+ }
1480
+ //#endregion
1481
+ //#region useCounter/index.ts
1482
+ /**
1483
+ * Basic counter with utility functions.
1484
+ *
1485
+ * @see https://vueuse.org/useCounter
1486
+ * @param [initialValue]
1487
+ * @param options
1488
+ */
1489
+ function useCounter(initialValue = 0, options = {}) {
1490
+ let _initialValue = unref(initialValue);
1491
+ const count = shallowRef(initialValue);
1492
+ const { max = Number.POSITIVE_INFINITY, min = Number.NEGATIVE_INFINITY } = options;
1493
+ const inc = (delta = 1) => count.value = Math.max(Math.min(max, count.value + delta), min);
1494
+ const dec = (delta = 1) => count.value = Math.min(Math.max(min, count.value - delta), max);
1495
+ const get = () => count.value;
1496
+ const set = (val) => count.value = Math.max(min, Math.min(max, val));
1497
+ const reset = (val = _initialValue) => {
1498
+ _initialValue = val;
1499
+ return set(val);
1500
+ };
1501
+ return {
1502
+ count: shallowReadonly(count),
1503
+ inc,
1504
+ dec,
1505
+ get,
1506
+ set,
1507
+ reset
1508
+ };
1509
+ }
1510
+ //#endregion
1511
+ //#region useDateFormat/index.ts
1512
+ const REGEX_PARSE = /^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[T\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/i;
1513
+ const REGEX_FORMAT = /[YMDHhms]o|\[([^\]]+)\]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a{1,2}|A{1,2}|m{1,2}|s{1,2}|Z{1,2}|z{1,4}|SSS/g;
1514
+ function defaultMeridiem(hours, minutes, isLowercase, hasPeriod) {
1515
+ let m = hours < 12 ? "AM" : "PM";
1516
+ if (hasPeriod) m = m.split("").reduce((acc, curr) => acc += `${curr}.`, "");
1517
+ return isLowercase ? m.toLowerCase() : m;
1518
+ }
1519
+ function formatOrdinal(num) {
1520
+ const suffixes = [
1521
+ "th",
1522
+ "st",
1523
+ "nd",
1524
+ "rd"
1525
+ ];
1526
+ const v = num % 100;
1527
+ return num + (suffixes[(v - 20) % 10] || suffixes[v] || suffixes[0]);
1528
+ }
1529
+ function formatDate(date, formatStr, options = {}) {
1530
+ var _options$customMeridi;
1531
+ const years = date.getFullYear();
1532
+ const month = date.getMonth();
1533
+ const days = date.getDate();
1534
+ const hours = date.getHours();
1535
+ const minutes = date.getMinutes();
1536
+ const seconds = date.getSeconds();
1537
+ const milliseconds = date.getMilliseconds();
1538
+ const day = date.getDay();
1539
+ const meridiem = (_options$customMeridi = options.customMeridiem) !== null && _options$customMeridi !== void 0 ? _options$customMeridi : defaultMeridiem;
1540
+ const stripTimeZone = (dateString) => {
1541
+ var _dateString$split$;
1542
+ return (_dateString$split$ = dateString.split(" ")[1]) !== null && _dateString$split$ !== void 0 ? _dateString$split$ : "";
1543
+ };
1544
+ const matches = {
1545
+ Yo: () => formatOrdinal(years),
1546
+ YY: () => String(years).slice(-2),
1547
+ YYYY: () => years,
1548
+ M: () => month + 1,
1549
+ Mo: () => formatOrdinal(month + 1),
1550
+ MM: () => `${month + 1}`.padStart(2, "0"),
1551
+ MMM: () => date.toLocaleDateString(toValue(options.locales), { month: "short" }),
1552
+ MMMM: () => date.toLocaleDateString(toValue(options.locales), { month: "long" }),
1553
+ D: () => String(days),
1554
+ Do: () => formatOrdinal(days),
1555
+ DD: () => `${days}`.padStart(2, "0"),
1556
+ H: () => String(hours),
1557
+ Ho: () => formatOrdinal(hours),
1558
+ HH: () => `${hours}`.padStart(2, "0"),
1559
+ h: () => `${hours % 12 || 12}`.padStart(1, "0"),
1560
+ ho: () => formatOrdinal(hours % 12 || 12),
1561
+ hh: () => `${hours % 12 || 12}`.padStart(2, "0"),
1562
+ m: () => String(minutes),
1563
+ mo: () => formatOrdinal(minutes),
1564
+ mm: () => `${minutes}`.padStart(2, "0"),
1565
+ s: () => String(seconds),
1566
+ so: () => formatOrdinal(seconds),
1567
+ ss: () => `${seconds}`.padStart(2, "0"),
1568
+ SSS: () => `${milliseconds}`.padStart(3, "0"),
1569
+ d: () => day,
1570
+ dd: () => date.toLocaleDateString(toValue(options.locales), { weekday: "narrow" }),
1571
+ ddd: () => date.toLocaleDateString(toValue(options.locales), { weekday: "short" }),
1572
+ dddd: () => date.toLocaleDateString(toValue(options.locales), { weekday: "long" }),
1573
+ A: () => meridiem(hours, minutes),
1574
+ AA: () => meridiem(hours, minutes, false, true),
1575
+ a: () => meridiem(hours, minutes, true),
1576
+ aa: () => meridiem(hours, minutes, true, true),
1577
+ z: () => stripTimeZone(date.toLocaleDateString(toValue(options.locales), { timeZoneName: "shortOffset" })),
1578
+ zz: () => stripTimeZone(date.toLocaleDateString(toValue(options.locales), { timeZoneName: "shortOffset" })),
1579
+ zzz: () => stripTimeZone(date.toLocaleDateString(toValue(options.locales), { timeZoneName: "shortOffset" })),
1580
+ zzzz: () => stripTimeZone(date.toLocaleDateString(toValue(options.locales), { timeZoneName: "longOffset" }))
1581
+ };
1582
+ return formatStr.replace(REGEX_FORMAT, (match, $1) => {
1583
+ var _ref, _matches$match;
1584
+ return (_ref = $1 !== null && $1 !== void 0 ? $1 : (_matches$match = matches[match]) === null || _matches$match === void 0 ? void 0 : _matches$match.call(matches)) !== null && _ref !== void 0 ? _ref : match;
1585
+ });
1586
+ }
1587
+ function normalizeDate(date) {
1588
+ if (date === null) return /* @__PURE__ */ new Date(NaN);
1589
+ if (date === void 0) return /* @__PURE__ */ new Date();
1590
+ if (date instanceof Date) return new Date(date);
1591
+ if (typeof date === "string" && !/Z$/i.test(date)) {
1592
+ const d = date.match(REGEX_PARSE);
1593
+ if (d) {
1594
+ const m = d[2] - 1 || 0;
1595
+ const ms = (d[7] || "0").substring(0, 3);
1596
+ return new Date(d[1], m, d[3] || 1, d[4] || 0, d[5] || 0, d[6] || 0, ms);
1597
+ }
1598
+ }
1599
+ return new Date(date);
1600
+ }
1601
+ /**
1602
+ * Get the formatted date according to the string of tokens passed in.
1603
+ *
1604
+ * @see https://vueuse.org/useDateFormat
1605
+ * @param date - The date to format, can either be a `Date` object, a timestamp, or a string
1606
+ * @param formatStr - The combination of tokens to format the date
1607
+ * @param options - UseDateFormatOptions
1608
+ *
1609
+ * @__NO_SIDE_EFFECTS__
1610
+ */
1611
+ function useDateFormat(date, formatStr = "HH:mm:ss", options = {}) {
1612
+ return computed(() => formatDate(normalizeDate(toValue(date)), toValue(formatStr), options));
1613
+ }
1614
+ //#endregion
1615
+ //#region useIntervalFn/index.ts
1616
+ /**
1617
+ * Wrapper for `setInterval` with controls
1618
+ *
1619
+ * @see https://vueuse.org/useIntervalFn
1620
+ * @param cb
1621
+ * @param interval
1622
+ * @param options
1623
+ */
1624
+ function useIntervalFn(cb, interval = 1e3, options = {}) {
1625
+ const { immediate = true, immediateCallback = false } = options;
1626
+ let timer = null;
1627
+ const isActive = shallowRef(false);
1628
+ function clean() {
1629
+ if (timer) {
1630
+ clearInterval(timer);
1631
+ timer = null;
1632
+ }
1633
+ }
1634
+ function pause() {
1635
+ isActive.value = false;
1636
+ clean();
1637
+ }
1638
+ function resume() {
1639
+ const intervalValue = toValue(interval);
1640
+ if (intervalValue <= 0) return;
1641
+ isActive.value = true;
1642
+ if (immediateCallback) cb();
1643
+ clean();
1644
+ if (isActive.value) timer = setInterval(cb, intervalValue);
1645
+ }
1646
+ if (immediate && isClient) resume();
1647
+ if (isRef(interval) || typeof interval === "function") tryOnScopeDispose(watch(interval, () => {
1648
+ if (isActive.value && isClient) resume();
1649
+ }));
1650
+ tryOnScopeDispose(pause);
1651
+ return {
1652
+ isActive: shallowReadonly(isActive),
1653
+ pause,
1654
+ resume
1655
+ };
1656
+ }
1657
+ //#endregion
1658
+ //#region useInterval/index.ts
1659
+ function useInterval(interval = 1e3, options = {}) {
1660
+ const { controls: exposeControls = false, immediate = true, callback } = options;
1661
+ const counter = shallowRef(0);
1662
+ const update = () => counter.value += 1;
1663
+ const reset = () => {
1664
+ counter.value = 0;
1665
+ };
1666
+ const controls = useIntervalFn(callback ? () => {
1667
+ update();
1668
+ callback(counter.value);
1669
+ } : update, interval, { immediate });
1670
+ if (exposeControls) return {
1671
+ counter: shallowReadonly(counter),
1672
+ reset,
1673
+ ...controls
1674
+ };
1675
+ else return shallowReadonly(counter);
1676
+ }
1677
+ //#endregion
1678
+ //#region useLastChanged/index.ts
1679
+ function useLastChanged(source, options = {}) {
1680
+ var _options$initialValue;
1681
+ const ms = shallowRef((_options$initialValue = options.initialValue) !== null && _options$initialValue !== void 0 ? _options$initialValue : null);
1682
+ watch(source, () => ms.value = timestamp(), options);
1683
+ return shallowReadonly(ms);
1684
+ }
1685
+ //#endregion
1686
+ //#region useTimeoutFn/index.ts
1687
+ /**
1688
+ * Wrapper for `setTimeout` with controls.
1689
+ *
1690
+ * @param cb
1691
+ * @param interval
1692
+ * @param options
1693
+ */
1694
+ function useTimeoutFn(cb, interval, options = {}) {
1695
+ const { immediate = true, immediateCallback = false } = options;
1696
+ const isPending = shallowRef(false);
1697
+ let timer;
1698
+ function clear() {
1699
+ if (timer) {
1700
+ clearTimeout(timer);
1701
+ timer = void 0;
1702
+ }
1703
+ }
1704
+ function stop() {
1705
+ isPending.value = false;
1706
+ clear();
1707
+ }
1708
+ function start(...args) {
1709
+ if (immediateCallback) cb();
1710
+ clear();
1711
+ isPending.value = true;
1712
+ timer = setTimeout(() => {
1713
+ isPending.value = false;
1714
+ timer = void 0;
1715
+ cb(...args);
1716
+ }, toValue(interval));
1717
+ }
1718
+ if (immediate) {
1719
+ isPending.value = true;
1720
+ if (isClient) start();
1721
+ }
1722
+ tryOnScopeDispose(stop);
1723
+ return {
1724
+ isPending: shallowReadonly(isPending),
1725
+ start,
1726
+ stop
1727
+ };
1728
+ }
1729
+ //#endregion
1730
+ //#region useTimeout/index.ts
1731
+ function useTimeout(interval = 1e3, options = {}) {
1732
+ const { controls: exposeControls = false, callback } = options;
1733
+ const controls = useTimeoutFn(callback !== null && callback !== void 0 ? callback : noop, interval, options);
1734
+ const ready = computed(() => !controls.isPending.value);
1735
+ if (exposeControls) return {
1736
+ ready,
1737
+ ...controls
1738
+ };
1739
+ else return ready;
1740
+ }
1741
+ //#endregion
1742
+ //#region useToNumber/index.ts
1743
+ /**
1744
+ * Reactively convert a string ref to number.
1745
+ *
1746
+ * @__NO_SIDE_EFFECTS__
1747
+ */
1748
+ function useToNumber(value, options = {}) {
1749
+ const { method = "parseFloat", radix, nanToZero } = options;
1750
+ return computed(() => {
1751
+ let resolved = toValue(value);
1752
+ if (typeof method === "function") resolved = method(resolved);
1753
+ else if (typeof resolved === "string") resolved = Number[method](resolved, radix);
1754
+ if (nanToZero && Number.isNaN(resolved)) resolved = 0;
1755
+ return resolved;
1756
+ });
1757
+ }
1758
+ //#endregion
1759
+ //#region useToString/index.ts
1760
+ /**
1761
+ * Reactively convert a ref to string.
1762
+ *
1763
+ * @see https://vueuse.org/useToString
1764
+ *
1765
+ * @__NO_SIDE_EFFECTS__
1766
+ */
1767
+ function useToString(value) {
1768
+ return computed(() => `${toValue(value)}`);
1769
+ }
1770
+ //#endregion
1771
+ //#region useToggle/index.ts
1772
+ /**
1773
+ * A boolean ref with a toggler
1774
+ *
1775
+ * @see https://vueuse.org/useToggle
1776
+ * @param [initialValue]
1777
+ * @param options
1778
+ *
1779
+ * @__NO_SIDE_EFFECTS__
1780
+ */
1781
+ function useToggle(initialValue = false, options = {}) {
1782
+ const { truthyValue = true, falsyValue = false } = options;
1783
+ const valueIsRef = isRef(initialValue);
1784
+ const _value = shallowRef(initialValue);
1785
+ function toggle(value) {
1786
+ if (arguments.length) {
1787
+ _value.value = value;
1788
+ return _value.value;
1789
+ } else {
1790
+ const truthy = toValue(truthyValue);
1791
+ _value.value = _value.value === truthy ? toValue(falsyValue) : truthy;
1792
+ return _value.value;
1793
+ }
1794
+ }
1795
+ if (valueIsRef) return toggle;
1796
+ else return [_value, toggle];
1797
+ }
1798
+ //#endregion
1799
+ //#region watchArray/index.ts
1800
+ /**
1801
+ * Watch for an array with additions and removals.
1802
+ *
1803
+ * @see https://vueuse.org/watchArray
1804
+ */
1805
+ function watchArray(source, cb, options) {
1806
+ let oldList = (options === null || options === void 0 ? void 0 : options.immediate) ? [] : [...typeof source === "function" ? source() : Array.isArray(source) ? source : toValue(source)];
1807
+ return watch(source, (newList, _, onCleanup) => {
1808
+ const oldListRemains = Array.from({ length: oldList.length });
1809
+ const added = [];
1810
+ for (const obj of newList) {
1811
+ let found = false;
1812
+ for (let i = 0; i < oldList.length; i++) if (!oldListRemains[i] && obj === oldList[i]) {
1813
+ oldListRemains[i] = true;
1814
+ found = true;
1815
+ break;
1816
+ }
1817
+ if (!found) added.push(obj);
1818
+ }
1819
+ const removed = oldList.filter((_, i) => !oldListRemains[i]);
1820
+ cb(newList, oldList, added, removed, onCleanup);
1821
+ oldList = [...newList];
1822
+ }, options);
1823
+ }
1824
+ //#endregion
1825
+ //#region watchAtMost/index.ts
1826
+ function watchAtMost(source, cb, options) {
1827
+ const { count, ...watchOptions } = options;
1828
+ const current = shallowRef(0);
1829
+ const { stop, resume, pause } = watchWithFilter(source, (...args) => {
1830
+ current.value += 1;
1831
+ if (current.value >= toValue(count)) nextTick(() => stop());
1832
+ cb(...args);
1833
+ }, watchOptions);
1834
+ return {
1835
+ count: current,
1836
+ stop,
1837
+ resume,
1838
+ pause
1839
+ };
1840
+ }
1841
+ //#endregion
1842
+ //#region watchDebounced/index.ts
1843
+ function watchDebounced(source, cb, options = {}) {
1844
+ const { debounce = 0, maxWait = void 0, ...watchOptions } = options;
1845
+ return watchWithFilter(source, cb, {
1846
+ ...watchOptions,
1847
+ eventFilter: debounceFilter(debounce, { maxWait })
1848
+ });
1849
+ }
1850
+ /** @deprecated use `watchDebounced` instead */
1851
+ const debouncedWatch = watchDebounced;
1852
+ //#endregion
1853
+ //#region watchDeep/index.ts
1854
+ /**
1855
+ * Shorthand for watching value with {deep: true}
1856
+ *
1857
+ * @see https://vueuse.org/watchDeep
1858
+ */
1859
+ function watchDeep(source, cb, options) {
1860
+ return watch(source, cb, {
1861
+ ...options,
1862
+ deep: true
1863
+ });
1864
+ }
1865
+ //#endregion
1866
+ //#region watchIgnorable/index.ts
1867
+ function watchIgnorable(source, cb, options = {}) {
1868
+ const { eventFilter = bypassFilter, ...watchOptions } = options;
1869
+ const filteredCb = createFilterWrapper(eventFilter, cb);
1870
+ let ignoreUpdates;
1871
+ let ignorePrevAsyncUpdates;
1872
+ let stop;
1873
+ if (watchOptions.flush === "sync") {
1874
+ let ignore = false;
1875
+ ignorePrevAsyncUpdates = () => {};
1876
+ ignoreUpdates = (updater) => {
1877
+ ignore = true;
1878
+ updater();
1879
+ ignore = false;
1880
+ };
1881
+ stop = watch(source, (...args) => {
1882
+ if (!ignore) filteredCb(...args);
1883
+ }, watchOptions);
1884
+ } else {
1885
+ const disposables = [];
1886
+ let ignoreCounter = 0;
1887
+ let syncCounter = 0;
1888
+ ignorePrevAsyncUpdates = () => {
1889
+ ignoreCounter = syncCounter;
1890
+ };
1891
+ disposables.push(watch(source, () => {
1892
+ syncCounter++;
1893
+ }, {
1894
+ ...watchOptions,
1895
+ flush: "sync"
1896
+ }));
1897
+ ignoreUpdates = (updater) => {
1898
+ const syncCounterPrev = syncCounter;
1899
+ updater();
1900
+ ignoreCounter += syncCounter - syncCounterPrev;
1901
+ };
1902
+ disposables.push(watch(source, (...args) => {
1903
+ const ignore = ignoreCounter > 0 && ignoreCounter === syncCounter;
1904
+ ignoreCounter = 0;
1905
+ syncCounter = 0;
1906
+ if (ignore) return;
1907
+ filteredCb(...args);
1908
+ }, watchOptions));
1909
+ stop = () => {
1910
+ disposables.forEach((fn) => fn());
1911
+ };
1912
+ }
1913
+ return {
1914
+ stop,
1915
+ ignoreUpdates,
1916
+ ignorePrevAsyncUpdates
1917
+ };
1918
+ }
1919
+ /** @deprecated use `watchIgnorable` instead */
1920
+ const ignorableWatch = watchIgnorable;
1921
+ //#endregion
1922
+ //#region watchImmediate/index.ts
1923
+ /**
1924
+ * Shorthand for watching value with {immediate: true}
1925
+ *
1926
+ * @see https://vueuse.org/watchImmediate
1927
+ */
1928
+ function watchImmediate(source, cb, options) {
1929
+ return watch(source, cb, {
1930
+ ...options,
1931
+ immediate: true
1932
+ });
1933
+ }
1934
+ //#endregion
1935
+ //#region watchOnce/index.ts
1936
+ /**
1937
+ * Shorthand for watching value with { once: true }
1938
+ *
1939
+ * @see https://vueuse.org/watchOnce
1940
+ */
1941
+ function watchOnce(source, cb, options) {
1942
+ return watch(source, cb, {
1943
+ ...options,
1944
+ once: true
1945
+ });
1946
+ }
1947
+ //#endregion
1948
+ //#region watchThrottled/index.ts
1949
+ function watchThrottled(source, cb, options = {}) {
1950
+ const { throttle = 0, trailing = true, leading = true, ...watchOptions } = options;
1951
+ return watchWithFilter(source, cb, {
1952
+ ...watchOptions,
1953
+ eventFilter: throttleFilter(throttle, trailing, leading)
1954
+ });
1955
+ }
1956
+ /** @deprecated use `watchThrottled` instead */
1957
+ const throttledWatch = watchThrottled;
1958
+ //#endregion
1959
+ //#region watchTriggerable/index.ts
1960
+ function watchTriggerable(source, cb, options = {}) {
1961
+ let cleanupFn;
1962
+ function onEffect() {
1963
+ if (!cleanupFn) return;
1964
+ const fn = cleanupFn;
1965
+ cleanupFn = void 0;
1966
+ fn();
1967
+ }
1968
+ /** Register the function `cleanupFn` */
1969
+ function onCleanup(callback) {
1970
+ cleanupFn = callback;
1971
+ }
1972
+ const _cb = (value, oldValue) => {
1973
+ onEffect();
1974
+ return cb(value, oldValue, onCleanup);
1975
+ };
1976
+ const res = watchIgnorable(source, _cb, options);
1977
+ const { ignoreUpdates } = res;
1978
+ const trigger = () => {
1979
+ let res;
1980
+ ignoreUpdates(() => {
1981
+ res = _cb(getWatchSources(source), getOldValue(source));
1982
+ });
1983
+ return res;
1984
+ };
1985
+ return {
1986
+ ...res,
1987
+ trigger
1988
+ };
1989
+ }
1990
+ function getWatchSources(sources) {
1991
+ if (isReactive(sources)) return sources;
1992
+ if (Array.isArray(sources)) return sources.map((item) => toValue(item));
1993
+ return toValue(sources);
1994
+ }
1995
+ function getOldValue(source) {
1996
+ return Array.isArray(source) ? source.map(() => void 0) : void 0;
1997
+ }
1998
+ //#endregion
1999
+ //#region whenever/index.ts
2000
+ function whenever(source, cb, options) {
2001
+ const stop = watch(source, (v, ov, onInvalidate) => {
2002
+ if (v) {
2003
+ if (options === null || options === void 0 ? void 0 : options.once) nextTick(() => stop());
2004
+ cb(v, ov, onInvalidate);
2005
+ }
2006
+ }, {
2007
+ ...options,
2008
+ once: false
2009
+ });
2010
+ return stop;
2011
+ }
2012
+ //#endregion
2013
+ export { assert, autoResetRef, bypassFilter, camelize, clamp, computedEager, computedWithControl, containsProp, controlledComputed, controlledRef, createDisposableDirective, createEventHook, createFilterWrapper, createGlobalState, createInjectionState, createReactiveFn, createRef, createSharedComposable, createSingletonPromise, debounceFilter, debouncedRef, debouncedWatch, eagerComputed, extendRef, formatDate, get, getLifeCycleTarget, hasOwn, hyphenate, identity, ignorableWatch, increaseWithUnit, injectLocal, invoke, isClient, isDef, isDefined, isIOS, isObject, isWorker, makeDestructurable, noop, normalizeDate, notNullish, now, objectEntries, objectOmit, objectPick, pausableFilter, pausableWatch, promiseTimeout, provideLocal, pxValue, rand, reactify, reactifyObject, reactiveComputed, reactiveOmit, reactivePick, refAutoReset, refDebounced, refDefault, refManualReset, refThrottled, refWithControl, set, syncRef, syncRefs, throttleFilter, throttledRef, throttledWatch, timestamp, toArray, toReactive, toRef, toRefs, tryOnBeforeMount, tryOnBeforeUnmount, tryOnMounted, tryOnScopeDispose, tryOnUnmounted, until, useArrayDifference, useArrayEvery, useArrayFilter, useArrayFind, useArrayFindIndex, useArrayFindLast, useArrayIncludes, useArrayJoin, useArrayMap, useArrayReduce, useArraySome, useArrayUnique, useCounter, useDateFormat, useDebounce, useDebounceFn, useInterval, useIntervalFn, useLastChanged, useThrottle, useThrottleFn, useTimeout, useTimeoutFn, useToNumber, useToString, useToggle, watchArray, watchAtMost, watchDebounced, watchDeep, watchIgnorable, watchImmediate, watchOnce, watchPausable, watchThrottled, watchTriggerable, watchWithFilter, whenever };