@pubinfo-pr/core 0.171.2 → 0.171.4

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 (380) hide show
  1. package/dist/AppSetting-Dl8pVkN4.js +105 -0
  2. package/dist/HButton-CzYSwI6a.js +30 -0
  3. package/dist/HCheckList-CHR-lWIq.js +33 -0
  4. package/dist/HDivider-CXS9rl4C.js +11 -0
  5. package/dist/HInput-CSVwTg1Q.js +34 -0
  6. package/dist/HSlideover-Bc6OHPHe.js +1695 -0
  7. package/dist/HToggle-C_iVIpxv.js +30 -0
  8. package/dist/HTooltip-BHBHfrCD.js +16 -0
  9. package/dist/HeaderFullMenu-BRhGliRJ.js +6 -0
  10. package/dist/HeaderFullMenu-DCF-gTCZ.js +249 -0
  11. package/dist/HeaderThinMenu-B_7vLcQX.js +6 -0
  12. package/dist/HeaderThinMenu-PA12XAvb.js +437 -0
  13. package/dist/PreferencesContent-cll4nwwl.js +695 -0
  14. package/dist/SettingBreadcrumb-BvSc7VUo.js +45 -0
  15. package/dist/SettingCopyright-DcWLKM5d.js +45 -0
  16. package/dist/SettingEnableTransition-BBH52KKl.js +68 -0
  17. package/dist/SettingHome-Cd43oJmB.js +31 -0
  18. package/dist/SettingMenu-CJsN4F1l.js +111 -0
  19. package/dist/SettingMode-BwhhUYlz.js +60 -0
  20. package/dist/SettingNavSearch-BhHUWem3.js +31 -0
  21. package/dist/SettingOther-CDY0jSVT.js +48 -0
  22. package/dist/SettingPage-B0WNvUlj.js +22 -0
  23. package/dist/SettingTabbar-DuqQVRnz.js +142 -0
  24. package/dist/SettingThemes-Doo6Ax3u.js +121 -0
  25. package/dist/SettingToolbar-CHV_dVJ9.js +50 -0
  26. package/dist/SettingTopbar-CF1K_XIt.js +49 -0
  27. package/dist/SettingWidthMode-VaN0CrBa.js +56 -0
  28. package/dist/_plugin-vue_export-helper-DaPiLSxE.js +6 -0
  29. package/dist/auth-CPSkJwBz.js +3968 -0
  30. package/dist/built-in/layout-component/composables/useGetComputedStyle.d.ts +2 -1
  31. package/dist/{index-BRjgatUZ.js → change-organization-OjxZhWST.js} +108 -139
  32. package/dist/change-password-B6kO54-d.js +186 -0
  33. package/dist/chunk-EsrJ1IKw.js +18 -0
  34. package/dist/components-DVIyiEVI.js +5238 -0
  35. package/dist/core-Bg2PEcZK.js +4884 -0
  36. package/dist/dist-DAb-7mqe.js +468 -0
  37. package/dist/engine-oniguruma-CUfGsBrF.js +243 -0
  38. package/dist/form-EQ9eL9hv.js +2288 -0
  39. package/dist/index.js +9670 -69
  40. package/dist/json-S7wVLDnW.js +2 -0
  41. package/dist/modal-CSWipFvB.js +44104 -0
  42. package/dist/not-found-DBe-djEg.js +42 -0
  43. package/dist/not-permission-DQzWCpOK.js +39 -0
  44. package/dist/overlayscrollbars-vue-BOGU2FK-.js +1436 -0
  45. package/dist/pick-C42gkI1h.js +10 -0
  46. package/dist/profile-DJ3gpjsS.js +19206 -0
  47. package/dist/question-line-BKVlJGUb.js +17 -0
  48. package/dist/reload-DAR8dVYw.js +12 -0
  49. package/dist/right-VKgVtqD5.js +34 -0
  50. package/dist/style.css +2 -9
  51. package/dist/tree-select-CTjWj5WT.js +12178 -0
  52. package/dist/useContext-D6pJCZez.js +9 -0
  53. package/dist/utils/shikiHighlighter.d.ts +24 -0
  54. package/dist/vitesse-dark-BsnBIHGG.js +2 -0
  55. package/dist/vitesse-light-Cs_6DF7j.js +2 -0
  56. package/dist/wasm-EvDQvzqp.js +2 -0
  57. package/dist/watchDiff-C4eGkl9e.js +397 -0
  58. package/package.json +20 -20
  59. package/src/built-in/layout-component/Layout.vue +1 -1
  60. package/src/built-in/layout-component/composables/useGetComputedStyle.ts +15 -4
  61. package/src/built-in/layout-component/composables/useLayoutVisible.ts +7 -2
  62. package/src/features/components/PartyLogin/steps/One.vue +7 -20
  63. package/src/features/stores/modules/route.ts +5 -4
  64. package/src/features/stores/utils/routerHelper.ts +2 -2
  65. package/src/utils/shikiHighlighter.ts +80 -0
  66. package/types/settings.d.ts +1 -1
  67. package/dist/AppSetting-D5eSdPuB.js +0 -123
  68. package/dist/HCheckList.vue_vue_type_script_setup_true_lang-DgeRhutB.js +0 -39
  69. package/dist/HDivider.vue_vue_type_script_setup_true_lang-DIHR-9Yv.js +0 -20
  70. package/dist/HInput.vue_vue_type_script_setup_true_lang-DBqCXRnn.js +0 -33
  71. package/dist/HToggle-BajvSdEE.js +0 -34
  72. package/dist/HeaderThinMenu-ouAiyBjb.js +0 -4
  73. package/dist/PreferencesContent-mr3zgq9x.js +0 -923
  74. package/dist/SettingBreadcrumb-Chx1c5oE.js +0 -50
  75. package/dist/SettingCopyright-BgIL_X3d.js +0 -62
  76. package/dist/SettingEnableTransition-16PeKbCJ.js +0 -77
  77. package/dist/SettingHome-DuLT9846.js +0 -46
  78. package/dist/SettingMenu-DDOmRqGo.js +0 -120
  79. package/dist/SettingMode-B6OwuuHR.js +0 -68
  80. package/dist/SettingNavSearch-BzmXK8I0.js +0 -46
  81. package/dist/SettingOther-DcDn9I3J.js +0 -81
  82. package/dist/SettingPage-DmfsDzGF.js +0 -29
  83. package/dist/SettingTabbar-BxxzDY5f.js +0 -154
  84. package/dist/SettingThemes-DoTkccTu.js +0 -143
  85. package/dist/SettingToolbar-ogjoj5NI.js +0 -78
  86. package/dist/SettingTopbar-BRZEIJZt.js +0 -52
  87. package/dist/SettingWidthMode-DQmewGT6.js +0 -67
  88. package/dist/abap-Y8Dl9g_6.js +0 -6
  89. package/dist/actionscript-3-DZzbMeqX.js +0 -6
  90. package/dist/ada-vP6ak0IW.js +0 -6
  91. package/dist/andromeeda-BIpZ7gaU.js +0 -4
  92. package/dist/angular-html-BmadGEgW.js +0 -32
  93. package/dist/angular-ts-D-QQnnGT.js +0 -21
  94. package/dist/apache-BUjz-sD2.js +0 -6
  95. package/dist/apex-D_wPycVx.js +0 -6
  96. package/dist/apl-sitt7C8I.js +0 -16
  97. package/dist/applescript-BPx7YFFu.js +0 -6
  98. package/dist/ara-Z2fSOxSw.js +0 -6
  99. package/dist/asciidoc-B-pCoB3G.js +0 -6
  100. package/dist/asm-BTWLY5ym.js +0 -6
  101. package/dist/astro-DHnp0xIo.js +0 -18
  102. package/dist/aurora-x-BwoVEUWZ.js +0 -4
  103. package/dist/awk-Fb0P9dkn.js +0 -6
  104. package/dist/ayu-dark-CxPZkpb2.js +0 -4
  105. package/dist/ballerina-oZK-YekG.js +0 -6
  106. package/dist/bat-0FvbqU9S.js +0 -6
  107. package/dist/beancount-DEfTbbFX.js +0 -6
  108. package/dist/berry-PwsHPR_K.js +0 -6
  109. package/dist/bibtex-EULQRLY5.js +0 -6
  110. package/dist/bicep-DFU2oTl7.js +0 -6
  111. package/dist/blade-OPzGcV14.js +0 -20
  112. package/dist/bsl-NkNNwerW.js +0 -8
  113. package/dist/c-eeMepfLm.js +0 -6
  114. package/dist/cadence-DMRWHJp4.js +0 -6
  115. package/dist/cairo-DM6WF2e3.js +0 -8
  116. package/dist/catppuccin-frappe-5udUqgsX.js +0 -4
  117. package/dist/catppuccin-latte-ufkS-HWv.js +0 -4
  118. package/dist/catppuccin-macchiato-DzL2LPek.js +0 -4
  119. package/dist/catppuccin-mocha-DDDDwkUT.js +0 -4
  120. package/dist/clarity-BseSxcHx.js +0 -6
  121. package/dist/clojure-CXJfHrL3.js +0 -6
  122. package/dist/cmake-BJz8BOTU.js +0 -6
  123. package/dist/cobol-R4Vn9a46.js +0 -10
  124. package/dist/codeowners-Bt9yU6NX.js +0 -6
  125. package/dist/codeql-DHkodjjI.js +0 -6
  126. package/dist/coffee-Dl27lzbd.js +0 -8
  127. package/dist/common-lisp-EVqT9Zhp.js +0 -6
  128. package/dist/coq-B0L9upzn.js +0 -6
  129. package/dist/cpp-Cj177cuW.js +0 -18
  130. package/dist/crystal-ymVvJzbZ.js +0 -18
  131. package/dist/csharp-DmxfTLWR.js +0 -6
  132. package/dist/css-CECN5uSL.js +0 -6
  133. package/dist/csv-CmYOceLb.js +0 -6
  134. package/dist/cue-ZzumE7IT.js +0 -6
  135. package/dist/cypher-jpdmjtA6.js +0 -6
  136. package/dist/d-CBagWSwH.js +0 -6
  137. package/dist/dark-plus-pUHDTVV0.js +0 -4
  138. package/dist/dart-6ObCrKr9.js +0 -6
  139. package/dist/dax-CcDT-8dH.js +0 -6
  140. package/dist/desktop-B93p9R9O.js +0 -6
  141. package/dist/diff-BxzP2J8R.js +0 -6
  142. package/dist/docker-CsHqm9tx.js +0 -6
  143. package/dist/dotenv-BMjVjUL1.js +0 -6
  144. package/dist/dracula-BtZx2Kac.js +0 -4
  145. package/dist/dracula-soft-BKa-aqBv.js +0 -4
  146. package/dist/dream-maker-PAx17jaB.js +0 -6
  147. package/dist/edge-_LvgTcmu.js +0 -12
  148. package/dist/elixir-BTCUAmQk.js +0 -8
  149. package/dist/elm-BtNbw_Cd.js +0 -8
  150. package/dist/emacs-lisp-Cfxdx5D-.js +0 -6
  151. package/dist/erb-D0PIpZCP.js +0 -10
  152. package/dist/erlang-DNcDT8Hi.js +0 -8
  153. package/dist/everforest-dark-DMCBqXCK.js +0 -4
  154. package/dist/everforest-light-BbXl82Em.js +0 -4
  155. package/dist/fennel-N4WcXuKx.js +0 -6
  156. package/dist/fish-B6QqlqeT.js +0 -6
  157. package/dist/fluent-BMXUxfv1.js +0 -6
  158. package/dist/fortran-fixed-form-DUsA-VGo.js +0 -8
  159. package/dist/fortran-free-form-DPIT_jbP.js +0 -6
  160. package/dist/fsharp-Pr2u3cIG.js +0 -8
  161. package/dist/gdresource-BwtMIoBm.js +0 -10
  162. package/dist/gdscript-BifyeYhI.js +0 -6
  163. package/dist/gdshader-Bk8fF6yr.js +0 -6
  164. package/dist/genie-DzUvd7U9.js +0 -6
  165. package/dist/gherkin-DHRaV0YP.js +0 -6
  166. package/dist/git-commit-Bd32YZ0K.js +0 -8
  167. package/dist/git-rebase-ZWUFO_T4.js +0 -8
  168. package/dist/github-dark-DenFmJkN.js +0 -4
  169. package/dist/github-dark-default-BJPUVz4H.js +0 -4
  170. package/dist/github-dark-dimmed-DUshB20C.js +0 -4
  171. package/dist/github-dark-high-contrast-D3aGCnF8.js +0 -4
  172. package/dist/github-light-JYsPkUQd.js +0 -4
  173. package/dist/github-light-default-D99KPAby.js +0 -4
  174. package/dist/github-light-high-contrast-BbmZE-Mp.js +0 -4
  175. package/dist/gleam-Bv284lvN.js +0 -6
  176. package/dist/glimmer-js-CkxRszZZ.js +0 -14
  177. package/dist/glimmer-ts-Bi6BYQCn.js +0 -14
  178. package/dist/glsl-CkUcVZNK.js +0 -8
  179. package/dist/gnuplot-yPG9-sE_.js +0 -6
  180. package/dist/go-ChxJuLYK.js +0 -6
  181. package/dist/graphql-BLaPX4fU.js +0 -14
  182. package/dist/groovy-CJQTphOW.js +0 -6
  183. package/dist/gruvbox-dark-hard-C2ND4cMr.js +0 -4
  184. package/dist/gruvbox-dark-medium-C8k4c8au.js +0 -4
  185. package/dist/gruvbox-dark-soft-xx9Q6FaG.js +0 -4
  186. package/dist/gruvbox-light-hard-BpUXv5in.js +0 -4
  187. package/dist/gruvbox-light-medium-D3XFCoU1.js +0 -4
  188. package/dist/gruvbox-light-soft-u7hpfz6Z.js +0 -4
  189. package/dist/hack-Bx1jMtBC.js +0 -10
  190. package/dist/haml-6FagfhCM.js +0 -10
  191. package/dist/handlebars-Bd5Y4M6I.js +0 -14
  192. package/dist/haskell-WeIwNIP6.js +0 -6
  193. package/dist/haxe-TztHsm5T.js +0 -6
  194. package/dist/hcl-D438OF-I.js +0 -6
  195. package/dist/hjson-DYBUbqOl.js +0 -6
  196. package/dist/hlsl-Bk8TCZNL.js +0 -6
  197. package/dist/houston-BDYrDoDW.js +0 -4
  198. package/dist/html-7XVNRwN7.js +0 -10
  199. package/dist/html-derivative-BNxZ5Yf6.js +0 -8
  200. package/dist/http-WC357zBG.js +0 -14
  201. package/dist/hxml-GbqSQCLa.js +0 -8
  202. package/dist/hy-Brt5EZ7-.js +0 -6
  203. package/dist/imba-CimUv-Uh.js +0 -6
  204. package/dist/index-73TLLAnx.js +0 -25373
  205. package/dist/index-B3GOGQYd.js +0 -79648
  206. package/dist/index-BD2fkZis.js +0 -14
  207. package/dist/index-BrK3HYDT.js +0 -4
  208. package/dist/index-CkUIa4JM.js +0 -229
  209. package/dist/index-D2zvNBbe.js +0 -44
  210. package/dist/index-DwF3aqst.js +0 -49
  211. package/dist/index-NOUM2y9h.js +0 -2827
  212. package/dist/ini-BZIuRIvJ.js +0 -6
  213. package/dist/java-DY6VlHhP.js +0 -6
  214. package/dist/javascript-Dp1Jmi5H.js +0 -6
  215. package/dist/jinja-WEhOU5ES.js +0 -11
  216. package/dist/jison-c2JI40PB.js +0 -8
  217. package/dist/json-DxJze_jm.js +0 -6
  218. package/dist/json5-BT4Fjg39.js +0 -6
  219. package/dist/jsonc-CHjZD8gR.js +0 -6
  220. package/dist/jsonl-BGuvDmy9.js +0 -6
  221. package/dist/jsonnet-Bx2cfsXg.js +0 -6
  222. package/dist/jssm-BcADi6EI.js +0 -6
  223. package/dist/jsx-BtKADgXT.js +0 -6
  224. package/dist/julia-DcoDQokW.js +0 -16
  225. package/dist/kanagawa-dragon-CiKur4Hl.js +0 -4
  226. package/dist/kanagawa-lotus-BKu-smKu.js +0 -4
  227. package/dist/kanagawa-wave-CQwozSzG.js +0 -4
  228. package/dist/kotlin-ByBMgTeR.js +0 -6
  229. package/dist/kusto-VWFLl2T0.js +0 -6
  230. package/dist/laserwave-6a00oqik.js +0 -4
  231. package/dist/latex-MZCpjnva.js +0 -8
  232. package/dist/lean-DXqEE_d1.js +0 -6
  233. package/dist/less-B1GLI2Di.js +0 -6
  234. package/dist/light-plus-CZuVqSLX.js +0 -4
  235. package/dist/liquid-3HHuHOZ2.js +0 -14
  236. package/dist/llvm-6RQLId6G.js +0 -6
  237. package/dist/log-Al8wyEFV.js +0 -6
  238. package/dist/logo-DBa4JDzV.js +0 -6
  239. package/dist/lua-kX5WP_P5.js +0 -8
  240. package/dist/luau-DtBSxLyz.js +0 -6
  241. package/dist/make-CsMclxtr.js +0 -6
  242. package/dist/markdown-CrScaQ96.js +0 -6
  243. package/dist/marko-DDi9qpQP.js +0 -14
  244. package/dist/material-theme-D6KBX41T.js +0 -4
  245. package/dist/material-theme-darker-CkRroheE.js +0 -4
  246. package/dist/material-theme-lighter-BUBw43Yz.js +0 -4
  247. package/dist/material-theme-ocean-ClGX14Ja.js +0 -4
  248. package/dist/material-theme-palenight-C1RVm8K1.js +0 -4
  249. package/dist/matlab-BOAaUVP0.js +0 -6
  250. package/dist/mdc-FI2x3BiY.js +0 -12
  251. package/dist/mdx-BOhZZUJ8.js +0 -6
  252. package/dist/mermaid-B0ixDHKN.js +0 -6
  253. package/dist/min-dark-C7ak0t6c.js +0 -4
  254. package/dist/min-light-CKFxVcPp.js +0 -4
  255. package/dist/mipsasm-CTx18fBl.js +0 -6
  256. package/dist/mojo-BD611d7o.js +0 -6
  257. package/dist/monokai-C1KBYcO0.js +0 -4
  258. package/dist/move-DSb5dTSj.js +0 -6
  259. package/dist/narrat-DmhDCBs-.js +0 -6
  260. package/dist/nextflow-BAAEJxI_.js +0 -6
  261. package/dist/nginx-5vhPAEw3.js +0 -8
  262. package/dist/night-owl-Bm2rzalh.js +0 -4
  263. package/dist/nim-BhS8gg0S.js +0 -20
  264. package/dist/nix-ceY58Dty.js +0 -6
  265. package/dist/nord-CC5OiUXg.js +0 -4
  266. package/dist/nushell-CQi4NV-2.js +0 -6
  267. package/dist/objective-c-Itk8tzmv.js +0 -6
  268. package/dist/objective-cpp-DGt5UKRO.js +0 -6
  269. package/dist/ocaml-eSVK32Eg.js +0 -6
  270. package/dist/one-dark-pro-DTA3VF0_.js +0 -4
  271. package/dist/one-light-D9sNaUtq.js +0 -4
  272. package/dist/pascal-xy8pJNns.js +0 -6
  273. package/dist/perl-BoEn6HmT.js +0 -16
  274. package/dist/php-BRU9zhoN.js +0 -18
  275. package/dist/pick-dLE6MD9A.js +0 -12
  276. package/dist/plastic-CSTz3KZp.js +0 -4
  277. package/dist/plsql-pVbGZfOv.js +0 -6
  278. package/dist/po-BNfHvqmm.js +0 -6
  279. package/dist/poimandres-C-VADXHD.js +0 -4
  280. package/dist/polar-CAZahv3u.js +0 -6
  281. package/dist/postcss-05aHdL-n.js +0 -6
  282. package/dist/powerquery-DI9HkTvs.js +0 -6
  283. package/dist/powershell-Clc4ydu-.js +0 -6
  284. package/dist/prisma-FZjmVtSl.js +0 -6
  285. package/dist/prolog-C5-yg4TO.js +0 -6
  286. package/dist/proto-MmCPeFAD.js +0 -6
  287. package/dist/pug-CJWI-qSo.js +0 -12
  288. package/dist/puppet-CUJHmnxV.js +0 -6
  289. package/dist/purescript-rUfGld-4.js +0 -6
  290. package/dist/python-BFNSHbwJ.js +0 -6
  291. package/dist/qml-D3ATcgGh.js +0 -8
  292. package/dist/qmldir-BInDYbpo.js +0 -6
  293. package/dist/qss-AeJTysr_.js +0 -6
  294. package/dist/question-line-DCMVyZ3e.js +0 -18
  295. package/dist/r-Bm0uF0U2.js +0 -6
  296. package/dist/racket-B83wSAja.js +0 -6
  297. package/dist/raku-nEQ4ZJJ7.js +0 -6
  298. package/dist/razor-BPFYEoc9.js +0 -10
  299. package/dist/red-7y8PH7HH.js +0 -4
  300. package/dist/reg-m_s_Kiip.js +0 -6
  301. package/dist/regexp-BazyLpPg.js +0 -6
  302. package/dist/rel-BcRfyd6Q.js +0 -6
  303. package/dist/right-aIVrXLnr.js +0 -36
  304. package/dist/riscv-Ce8MAQLP.js +0 -6
  305. package/dist/rose-pine-Cr4kwgAY.js +0 -4
  306. package/dist/rose-pine-dawn-ClRRUdXX.js +0 -4
  307. package/dist/rose-pine-moon-ucNn3Gm8.js +0 -4
  308. package/dist/rst-B6mPMsKo.js +0 -22
  309. package/dist/ruby-DInklMmU.js +0 -30
  310. package/dist/rust-CLzF9zIN.js +0 -6
  311. package/dist/sas-fpEvgATw.js +0 -8
  312. package/dist/sass-DxHp5rTx.js +0 -6
  313. package/dist/scala-D4grkFkl.js +0 -6
  314. package/dist/scheme-BCRWuEm4.js +0 -6
  315. package/dist/scss-B1FaCqwR.js +0 -8
  316. package/dist/sdbl-B7T8abf4.js +0 -6
  317. package/dist/shaderlab-Cr62-Wb4.js +0 -8
  318. package/dist/shellscript-InADTalH.js +0 -6
  319. package/dist/shellsession-DiDJNQdy.js +0 -8
  320. package/dist/slack-dark-i7wN4OET.js +0 -4
  321. package/dist/slack-ochin-ndHf0LoP.js +0 -4
  322. package/dist/smalltalk-BlI1_OkM.js +0 -6
  323. package/dist/snazzy-light-BlSJXAu4.js +0 -4
  324. package/dist/solarized-dark-UTmkh7lw.js +0 -4
  325. package/dist/solarized-light-BheCkDPT.js +0 -4
  326. package/dist/solidity-CneOhxmR.js +0 -6
  327. package/dist/soy-LybuU3Y_.js +0 -8
  328. package/dist/sparql-B0KWFEri.js +0 -8
  329. package/dist/splunk-CRXR8A9s.js +0 -6
  330. package/dist/sql-Cn_v3PB0.js +0 -6
  331. package/dist/ssh-config-DP-hNVbF.js +0 -6
  332. package/dist/stata-B8c5fTjX.js +0 -8
  333. package/dist/stylus-CyKEU1Ej.js +0 -6
  334. package/dist/svelte-BjDUPxZ1.js +0 -14
  335. package/dist/swift-9UzSvamq.js +0 -6
  336. package/dist/synthwave-84-NU3C_KFZ.js +0 -4
  337. package/dist/system-verilog-BCm7smPJ.js +0 -6
  338. package/dist/systemd-C-4qm6XH.js +0 -6
  339. package/dist/talonscript-CFF3LF_O.js +0 -6
  340. package/dist/tasl-Cg_WBUAe.js +0 -6
  341. package/dist/tcl-DN7buRTF.js +0 -6
  342. package/dist/templ-Brj2RH7A.js +0 -12
  343. package/dist/terraform-DGvcn9zM.js +0 -6
  344. package/dist/tex-CmrLTxbG.js +0 -8
  345. package/dist/tokyo-night-DP4TmcQl.js +0 -4
  346. package/dist/toml-DY62mUL_.js +0 -6
  347. package/dist/ts-tags-CZMzuZh-.js +0 -41
  348. package/dist/tsv-BtvSkaG0.js +0 -6
  349. package/dist/tsx-B8rCNbgL.js +0 -6
  350. package/dist/turtle-_H59FV7D.js +0 -6
  351. package/dist/twig-GjIxYqCX.js +0 -18
  352. package/dist/typescript-mg6ATTE8.js +0 -6
  353. package/dist/typespec-Djmco60m.js +0 -6
  354. package/dist/typst-D_1QKWns.js +0 -6
  355. package/dist/v-BW14IZv7.js +0 -6
  356. package/dist/vala-uxaPR7d1.js +0 -6
  357. package/dist/vb-D8_c5-KN.js +0 -6
  358. package/dist/verilog-B-bybjPF.js +0 -6
  359. package/dist/vesper-BckBta1U.js +0 -4
  360. package/dist/vhdl-CUlNa8ac.js +0 -6
  361. package/dist/viml-DsfA-sWm.js +0 -6
  362. package/dist/vitesse-black-BoGvW84i.js +0 -4
  363. package/dist/vitesse-dark-Cym-eLtO.js +0 -4
  364. package/dist/vitesse-light-CcmG315c.js +0 -4
  365. package/dist/vue-D-ba2-Rx.js +0 -31
  366. package/dist/vue-html-Dn2ZoOSz.js +0 -10
  367. package/dist/vue-vine-Jmfkm6lF.js +0 -20
  368. package/dist/vyper-CPQuu50u.js +0 -6
  369. package/dist/wasm-BBXxrAl7.js +0 -6
  370. package/dist/wasm-DQxwEHae.js +0 -7
  371. package/dist/wenyan-pbVjoM9_.js +0 -6
  372. package/dist/wgsl-DY4iK1q1.js +0 -6
  373. package/dist/wikitext-Z-MoUasO.js +0 -6
  374. package/dist/wit-CQMQOlTg.js +0 -6
  375. package/dist/wolfram-Dz4KXISs.js +0 -6
  376. package/dist/xml-C2J0sS9M.js +0 -8
  377. package/dist/xsl-BmSZphgC.js +0 -8
  378. package/dist/yaml-DaO7k5B1.js +0 -6
  379. package/dist/zenscript-CxBjpf9c.js +0 -6
  380. package/dist/zig-Vm0PO9wB.js +0 -6
@@ -1,2827 +0,0 @@
1
- import { ci as Gt, cj as Bt, cd as at, ck as zt, c as Xt, d as lt, cl as kt, cc as Ut, cm as Kt, cn as Yt, e as A, co as Qt, y as Qe, A as $t, t as ye, g as je, m as ue, j as H, a9 as _e, i as Zt, aU as Jt, U as en, cp as tn, bW as nn, a2 as rn, cq as wt, E as Ft, a5 as an, cr as ln, X as on, b0 as St, P as me, cs as Ee, ct as sn, cu as un, aI as cn, aO as fn, aY as dn, cv as mn, cw as gn, bb as Ze, bX as hn, cx as Ot, aj as ce, q as ve, ar as ot, bc as vn, r as Fe, L as pn, cy as yn, cz as bn, cA as xn, f as Pe, aH as $n, cB as We } from "./index-B3GOGQYd.js";
2
- import { computed as E, shallowRef as ee, onMounted as Je, inject as et, provide as tt, defineComponent as ge, ref as xe, onBeforeUnmount as Ct, createVNode as R, cloneVNode as wn, Fragment as Ae, watch as se, Transition as Fn, withDirectives as Sn, TransitionGroup as On, vShow as Cn, watchEffect as De, reactive as Et, toRaw as He, nextTick as qt, unref as ae } from "vue";
3
- function En(e) {
4
- return e !== e;
5
- }
6
- function qn(e, t, n) {
7
- for (var r = n - 1, i = e.length; ++r < i; )
8
- if (e[r] === t)
9
- return r;
10
- return -1;
11
- }
12
- function An(e, t, n) {
13
- return t === t ? qn(e, t, n) : Gt(e, En, n);
14
- }
15
- function jn(e, t) {
16
- var n = e == null ? 0 : e.length;
17
- return !!n && An(e, t, 0) > -1;
18
- }
19
- var Ve = function() {
20
- return Bt.Date.now();
21
- }, In = "Expected a function", Mn = Math.max, Pn = Math.min;
22
- function Vn(e, t, n) {
23
- var r, i, a, l, o, c, v = 0, d = !1, y = !1, p = !0;
24
- if (typeof e != "function")
25
- throw new TypeError(In);
26
- t = at(t) || 0, zt(n) && (d = !!n.leading, y = "maxWait" in n, a = y ? Mn(at(n.maxWait) || 0, t) : a, p = "trailing" in n ? !!n.trailing : p);
27
- function b(h) {
28
- var S = r, O = i;
29
- return r = i = void 0, v = h, l = e.apply(O, S), l;
30
- }
31
- function $(h) {
32
- return v = h, o = setTimeout(g, t), d ? b(h) : l;
33
- }
34
- function f(h) {
35
- var S = h - c, O = h - v, I = t - S;
36
- return y ? Pn(I, a - O) : I;
37
- }
38
- function x(h) {
39
- var S = h - c, O = h - v;
40
- return c === void 0 || S >= t || S < 0 || y && O >= a;
41
- }
42
- function g() {
43
- var h = Ve();
44
- if (x(h))
45
- return F(h);
46
- o = setTimeout(g, f(h));
47
- }
48
- function F(h) {
49
- return o = void 0, p && r ? b(h) : (r = i = void 0, l);
50
- }
51
- function s() {
52
- o !== void 0 && clearTimeout(o), v = 0, r = c = i = o = void 0;
53
- }
54
- function u() {
55
- return o === void 0 ? l : F(Ve());
56
- }
57
- function m() {
58
- var h = Ve(), S = x(h);
59
- if (r = arguments, i = this, c = h, S) {
60
- if (o === void 0)
61
- return $(c);
62
- if (y)
63
- return clearTimeout(o), o = setTimeout(g, t), b(c);
64
- }
65
- return o === void 0 && (o = setTimeout(g, t)), l;
66
- }
67
- return m.cancel = s, m.flush = u, m;
68
- }
69
- var Tn = Math.min;
70
- function Rn(e, t, n) {
71
- for (var r = jn, i = e[0].length, a = e.length, l = a, o = Array(a), c = 1 / 0, v = []; l--; ) {
72
- var d = e[l];
73
- c = Tn(d.length, c), o[l] = i >= 120 && d.length >= 120 ? new Xt(l && d) : void 0;
74
- }
75
- d = e[0];
76
- var y = -1, p = o[0];
77
- e:
78
- for (; ++y < i && v.length < c; ) {
79
- var b = d[y], $ = b;
80
- if (b = b !== 0 ? b : 0, !(p ? lt(p, $) : r(v, $))) {
81
- for (l = a; --l; ) {
82
- var f = o[l];
83
- if (!(f ? lt(f, $) : r(e[l], $)))
84
- continue e;
85
- }
86
- p && p.push($), v.push(b);
87
- }
88
- }
89
- return v;
90
- }
91
- function Nn(e) {
92
- return kt(e) ? e : [];
93
- }
94
- var Ln = Ut(function(e) {
95
- var t = Kt(e, Nn);
96
- return t.length && t[0] === e[0] ? Rn(t) : [];
97
- });
98
- function st(e) {
99
- return typeof e == "object" && e != null && e.nodeType === 1;
100
- }
101
- function ut(e, t) {
102
- return (!t || e !== "hidden") && e !== "visible" && e !== "clip";
103
- }
104
- function Te(e, t) {
105
- if (e.clientHeight < e.scrollHeight || e.clientWidth < e.scrollWidth) {
106
- var n = getComputedStyle(e, null);
107
- return ut(n.overflowY, t) || ut(n.overflowX, t) || function(r) {
108
- var i = function(a) {
109
- if (!a.ownerDocument || !a.ownerDocument.defaultView) return null;
110
- try {
111
- return a.ownerDocument.defaultView.frameElement;
112
- } catch {
113
- return null;
114
- }
115
- }(r);
116
- return !!i && (i.clientHeight < r.scrollHeight || i.clientWidth < r.scrollWidth);
117
- }(e);
118
- }
119
- return !1;
120
- }
121
- function Se(e, t, n, r, i, a, l, o) {
122
- return a < e && l > t || a > e && l < t ? 0 : a <= e && o <= n || l >= t && o >= n ? a - e - r : l > t && o < n || a < e && o > n ? l - t + i : 0;
123
- }
124
- var ct = function(e, t) {
125
- var n = window, r = t.scrollMode, i = t.block, a = t.inline, l = t.boundary, o = t.skipOverflowHiddenElements, c = typeof l == "function" ? l : function(Ht) {
126
- return Ht !== l;
127
- };
128
- if (!st(e)) throw new TypeError("Invalid target");
129
- for (var v, d, y = document.scrollingElement || document.documentElement, p = [], b = e; st(b) && c(b); ) {
130
- if ((b = (d = (v = b).parentElement) == null ? v.getRootNode().host || null : d) === y) {
131
- p.push(b);
132
- break;
133
- }
134
- b != null && b === document.body && Te(b) && !Te(document.documentElement) || b != null && Te(b, o) && p.push(b);
135
- }
136
- for (var $ = n.visualViewport ? n.visualViewport.width : innerWidth, f = n.visualViewport ? n.visualViewport.height : innerHeight, x = window.scrollX || pageXOffset, g = window.scrollY || pageYOffset, F = e.getBoundingClientRect(), s = F.height, u = F.width, m = F.top, h = F.right, S = F.bottom, O = F.left, I = i === "start" || i === "nearest" ? m : i === "end" ? S : m + s / 2, P = a === "center" ? O + u / 2 : a === "end" ? h : O, N = [], T = 0; T < p.length; T++) {
137
- var q = p[T], G = q.getBoundingClientRect(), K = G.height, X = G.width, C = G.top, j = G.right, L = G.bottom, B = G.left;
138
- if (r === "if-needed" && m >= 0 && O >= 0 && S <= f && h <= $ && m >= C && S <= L && O >= B && h <= j) return N;
139
- var k = getComputedStyle(q), Q = parseInt(k.borderLeftWidth, 10), re = parseInt(k.borderTopWidth, 10), Y = parseInt(k.borderRightWidth, 10), w = parseInt(k.borderBottomWidth, 10), M = 0, _ = 0, W = "offsetWidth" in q ? q.offsetWidth - q.clientWidth - Q - Y : 0, D = "offsetHeight" in q ? q.offsetHeight - q.clientHeight - re - w : 0, U = "offsetWidth" in q ? q.offsetWidth === 0 ? 0 : X / q.offsetWidth : 0, te = "offsetHeight" in q ? q.offsetHeight === 0 ? 0 : K / q.offsetHeight : 0;
140
- if (y === q) M = i === "start" ? I : i === "end" ? I - f : i === "nearest" ? Se(g, g + f, f, re, w, g + I, g + I + s, s) : I - f / 2, _ = a === "start" ? P : a === "center" ? P - $ / 2 : a === "end" ? P - $ : Se(x, x + $, $, Q, Y, x + P, x + P + u, u), M = Math.max(0, M + g), _ = Math.max(0, _ + x);
141
- else {
142
- M = i === "start" ? I - C - re : i === "end" ? I - L + w + D : i === "nearest" ? Se(C, L, K, re, w + D, I, I + s, s) : I - (C + K / 2) + D / 2, _ = a === "start" ? P - B - Q : a === "center" ? P - (B + X / 2) + W / 2 : a === "end" ? P - j + Y + W : Se(B, j, X, Q, Y + W, P, P + u, u);
143
- var ne = q.scrollLeft, he = q.scrollTop;
144
- I += he - (M = Math.max(0, Math.min(he + M / te, q.scrollHeight - K / te + D))), P += ne - (_ = Math.max(0, Math.min(ne + _ / U, q.scrollWidth - X / U + W)));
145
- }
146
- N.push({ el: q, top: M, left: _ });
147
- }
148
- return N;
149
- };
150
- function At(e) {
151
- return e === Object(e) && Object.keys(e).length !== 0;
152
- }
153
- function _n(e, t) {
154
- t === void 0 && (t = "auto");
155
- var n = "scrollBehavior" in document.body.style;
156
- e.forEach(function(r) {
157
- var i = r.el, a = r.top, l = r.left;
158
- i.scroll && n ? i.scroll({
159
- top: a,
160
- left: l,
161
- behavior: t
162
- }) : (i.scrollTop = a, i.scrollLeft = l);
163
- });
164
- }
165
- function Wn(e) {
166
- return e === !1 ? {
167
- block: "end",
168
- inline: "nearest"
169
- } : At(e) ? e : {
170
- block: "start",
171
- inline: "nearest"
172
- };
173
- }
174
- function Dn(e, t) {
175
- var n = e.isConnected || e.ownerDocument.documentElement.contains(e);
176
- if (At(t) && typeof t.behavior == "function")
177
- return t.behavior(n ? ct(e, t) : []);
178
- if (n) {
179
- var r = Wn(t);
180
- return _n(ct(e, r), r.behavior);
181
- }
182
- }
183
- const Oe = ["xxxl", "xxl", "xl", "lg", "md", "sm", "xs"], Hn = (e) => ({
184
- xs: `(max-width: ${e.screenXSMax}px)`,
185
- sm: `(min-width: ${e.screenSM}px)`,
186
- md: `(min-width: ${e.screenMD}px)`,
187
- lg: `(min-width: ${e.screenLG}px)`,
188
- xl: `(min-width: ${e.screenXL}px)`,
189
- xxl: `(min-width: ${e.screenXXL}px)`,
190
- xxxl: `{min-width: ${e.screenXXXL}px}`
191
- });
192
- function Gn() {
193
- const [, e] = Yt();
194
- return E(() => {
195
- const t = Hn(e.value), n = /* @__PURE__ */ new Map();
196
- let r = -1, i = {};
197
- return {
198
- matchHandlers: {},
199
- dispatch(a) {
200
- return i = a, n.forEach((l) => l(i)), n.size >= 1;
201
- },
202
- subscribe(a) {
203
- return n.size || this.register(), r += 1, n.set(r, a), a(i), r;
204
- },
205
- unsubscribe(a) {
206
- n.delete(a), n.size || this.unregister();
207
- },
208
- unregister() {
209
- Object.keys(t).forEach((a) => {
210
- const l = t[a], o = this.matchHandlers[l];
211
- o?.mql.removeListener(o?.listener);
212
- }), n.clear();
213
- },
214
- register() {
215
- Object.keys(t).forEach((a) => {
216
- const l = t[a], o = (v) => {
217
- let {
218
- matches: d
219
- } = v;
220
- this.dispatch(A(A({}, i), {
221
- [a]: d
222
- }));
223
- }, c = window.matchMedia(l);
224
- c.addListener(o), this.matchHandlers[l] = {
225
- mql: c,
226
- listener: o
227
- }, o(c);
228
- });
229
- },
230
- responsiveMap: t
231
- };
232
- });
233
- }
234
- const Bn = () => {
235
- const e = ee(!1);
236
- return Je(() => {
237
- e.value = Qt();
238
- }), e;
239
- }, jt = Symbol("rowContextKey"), zn = (e) => {
240
- tt(jt, e);
241
- }, Xn = () => et(jt, {
242
- gutter: E(() => {
243
- }),
244
- wrap: E(() => {
245
- }),
246
- supportFlexGap: E(() => {
247
- })
248
- }), kn = (e) => {
249
- const {
250
- componentCls: t
251
- } = e;
252
- return {
253
- // Grid system
254
- [t]: {
255
- display: "flex",
256
- flexFlow: "row wrap",
257
- minWidth: 0,
258
- "&::before, &::after": {
259
- display: "flex"
260
- },
261
- "&-no-wrap": {
262
- flexWrap: "nowrap"
263
- },
264
- // The origin of the X-axis
265
- "&-start": {
266
- justifyContent: "flex-start"
267
- },
268
- // The center of the X-axis
269
- "&-center": {
270
- justifyContent: "center"
271
- },
272
- // The opposite of the X-axis
273
- "&-end": {
274
- justifyContent: "flex-end"
275
- },
276
- "&-space-between": {
277
- justifyContent: "space-between"
278
- },
279
- "&-space-around ": {
280
- justifyContent: "space-around"
281
- },
282
- "&-space-evenly ": {
283
- justifyContent: "space-evenly"
284
- },
285
- // Align at the top
286
- "&-top": {
287
- alignItems: "flex-start"
288
- },
289
- // Align at the center
290
- "&-middle": {
291
- alignItems: "center"
292
- },
293
- "&-bottom": {
294
- alignItems: "flex-end"
295
- }
296
- }
297
- };
298
- }, Un = (e) => {
299
- const {
300
- componentCls: t
301
- } = e;
302
- return {
303
- // Grid system
304
- [t]: {
305
- position: "relative",
306
- maxWidth: "100%",
307
- // Prevent columns from collapsing when empty
308
- minHeight: 1
309
- }
310
- };
311
- }, Kn = (e, t) => {
312
- const {
313
- componentCls: n,
314
- gridColumns: r
315
- } = e, i = {};
316
- for (let a = r; a >= 0; a--)
317
- a === 0 ? (i[`${n}${t}-${a}`] = {
318
- display: "none"
319
- }, i[`${n}-push-${a}`] = {
320
- insetInlineStart: "auto"
321
- }, i[`${n}-pull-${a}`] = {
322
- insetInlineEnd: "auto"
323
- }, i[`${n}${t}-push-${a}`] = {
324
- insetInlineStart: "auto"
325
- }, i[`${n}${t}-pull-${a}`] = {
326
- insetInlineEnd: "auto"
327
- }, i[`${n}${t}-offset-${a}`] = {
328
- marginInlineEnd: 0
329
- }, i[`${n}${t}-order-${a}`] = {
330
- order: 0
331
- }) : (i[`${n}${t}-${a}`] = {
332
- display: "block",
333
- flex: `0 0 ${a / r * 100}%`,
334
- maxWidth: `${a / r * 100}%`
335
- }, i[`${n}${t}-push-${a}`] = {
336
- insetInlineStart: `${a / r * 100}%`
337
- }, i[`${n}${t}-pull-${a}`] = {
338
- insetInlineEnd: `${a / r * 100}%`
339
- }, i[`${n}${t}-offset-${a}`] = {
340
- marginInlineStart: `${a / r * 100}%`
341
- }, i[`${n}${t}-order-${a}`] = {
342
- order: a
343
- });
344
- return i;
345
- }, Ge = (e, t) => Kn(e, t), Yn = (e, t, n) => ({
346
- [`@media (min-width: ${t}px)`]: A({}, Ge(e, n))
347
- }), Qn = Qe("Grid", (e) => [kn(e)]), Zn = Qe("Grid", (e) => {
348
- const t = $t(e, {
349
- gridColumns: 24
350
- // Row is divided into 24 parts in Grid
351
- }), n = {
352
- "-sm": t.screenSMMin,
353
- "-md": t.screenMDMin,
354
- "-lg": t.screenLGMin,
355
- "-xl": t.screenXLMin,
356
- "-xxl": t.screenXXLMin
357
- };
358
- return [Un(t), Ge(t, ""), Ge(t, "-xs"), Object.keys(n).map((r) => Yn(t, n[r], r)).reduce((r, i) => A(A({}, r), i), {})];
359
- }), Jn = () => ({
360
- align: ye([String, Object]),
361
- justify: ye([String, Object]),
362
- prefixCls: String,
363
- gutter: ye([Number, Array, Object], 0),
364
- wrap: {
365
- type: Boolean,
366
- default: void 0
367
- }
368
- }), er = ge({
369
- compatConfig: {
370
- MODE: 3
371
- },
372
- name: "ARow",
373
- inheritAttrs: !1,
374
- props: Jn(),
375
- setup(e, t) {
376
- let {
377
- slots: n,
378
- attrs: r
379
- } = t;
380
- const {
381
- prefixCls: i,
382
- direction: a
383
- } = je("row", e), [l, o] = Qn(i);
384
- let c;
385
- const v = Gn(), d = xe({
386
- xs: !0,
387
- sm: !0,
388
- md: !0,
389
- lg: !0,
390
- xl: !0,
391
- xxl: !0
392
- }), y = xe({
393
- xs: !1,
394
- sm: !1,
395
- md: !1,
396
- lg: !1,
397
- xl: !1,
398
- xxl: !1
399
- }), p = (s) => E(() => {
400
- if (typeof e[s] == "string")
401
- return e[s];
402
- if (typeof e[s] != "object")
403
- return "";
404
- for (let u = 0; u < Oe.length; u++) {
405
- const m = Oe[u];
406
- if (!y.value[m]) continue;
407
- const h = e[s][m];
408
- if (h !== void 0)
409
- return h;
410
- }
411
- return "";
412
- }), b = p("align"), $ = p("justify"), f = Bn();
413
- Je(() => {
414
- c = v.value.subscribe((s) => {
415
- y.value = s;
416
- const u = e.gutter || 0;
417
- (!Array.isArray(u) && typeof u == "object" || Array.isArray(u) && (typeof u[0] == "object" || typeof u[1] == "object")) && (d.value = s);
418
- });
419
- }), Ct(() => {
420
- v.value.unsubscribe(c);
421
- });
422
- const x = E(() => {
423
- const s = [void 0, void 0], {
424
- gutter: u = 0
425
- } = e;
426
- return (Array.isArray(u) ? u : [u, void 0]).forEach((h, S) => {
427
- if (typeof h == "object")
428
- for (let O = 0; O < Oe.length; O++) {
429
- const I = Oe[O];
430
- if (d.value[I] && h[I] !== void 0) {
431
- s[S] = h[I];
432
- break;
433
- }
434
- }
435
- else
436
- s[S] = h;
437
- }), s;
438
- });
439
- zn({
440
- gutter: x,
441
- supportFlexGap: f,
442
- wrap: E(() => e.wrap)
443
- });
444
- const g = E(() => ue(i.value, {
445
- [`${i.value}-no-wrap`]: e.wrap === !1,
446
- [`${i.value}-${$.value}`]: $.value,
447
- [`${i.value}-${b.value}`]: b.value,
448
- [`${i.value}-rtl`]: a.value === "rtl"
449
- }, r.class, o.value)), F = E(() => {
450
- const s = x.value, u = {}, m = s[0] != null && s[0] > 0 ? `${s[0] / -2}px` : void 0, h = s[1] != null && s[1] > 0 ? `${s[1] / -2}px` : void 0;
451
- return m && (u.marginLeft = m, u.marginRight = m), f.value ? u.rowGap = `${s[1]}px` : h && (u.marginTop = h, u.marginBottom = h), u;
452
- });
453
- return () => {
454
- var s;
455
- return l(R("div", H(H({}, r), {}, {
456
- class: g.value,
457
- style: A(A({}, F.value), r.style)
458
- }), [(s = n.default) === null || s === void 0 ? void 0 : s.call(n)]));
459
- };
460
- }
461
- });
462
- function oe() {
463
- return oe = Object.assign ? Object.assign.bind() : function(e) {
464
- for (var t = 1; t < arguments.length; t++) {
465
- var n = arguments[t];
466
- for (var r in n)
467
- Object.prototype.hasOwnProperty.call(n, r) && (e[r] = n[r]);
468
- }
469
- return e;
470
- }, oe.apply(this, arguments);
471
- }
472
- function tr(e, t) {
473
- e.prototype = Object.create(t.prototype), e.prototype.constructor = e, $e(e, t);
474
- }
475
- function Be(e) {
476
- return Be = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function(n) {
477
- return n.__proto__ || Object.getPrototypeOf(n);
478
- }, Be(e);
479
- }
480
- function $e(e, t) {
481
- return $e = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(r, i) {
482
- return r.__proto__ = i, r;
483
- }, $e(e, t);
484
- }
485
- function nr() {
486
- if (typeof Reflect > "u" || !Reflect.construct || Reflect.construct.sham) return !1;
487
- if (typeof Proxy == "function") return !0;
488
- try {
489
- return Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {
490
- })), !0;
491
- } catch {
492
- return !1;
493
- }
494
- }
495
- function qe(e, t, n) {
496
- return nr() ? qe = Reflect.construct.bind() : qe = function(i, a, l) {
497
- var o = [null];
498
- o.push.apply(o, a);
499
- var c = Function.bind.apply(i, o), v = new c();
500
- return l && $e(v, l.prototype), v;
501
- }, qe.apply(null, arguments);
502
- }
503
- function rr(e) {
504
- return Function.toString.call(e).indexOf("[native code]") !== -1;
505
- }
506
- function ze(e) {
507
- var t = typeof Map == "function" ? /* @__PURE__ */ new Map() : void 0;
508
- return ze = function(r) {
509
- if (r === null || !rr(r)) return r;
510
- if (typeof r != "function")
511
- throw new TypeError("Super expression must either be null or a function");
512
- if (typeof t < "u") {
513
- if (t.has(r)) return t.get(r);
514
- t.set(r, i);
515
- }
516
- function i() {
517
- return qe(r, arguments, Be(this).constructor);
518
- }
519
- return i.prototype = Object.create(r.prototype, {
520
- constructor: {
521
- value: i,
522
- enumerable: !1,
523
- writable: !0,
524
- configurable: !0
525
- }
526
- }), $e(i, r);
527
- }, ze(e);
528
- }
529
- var ir = /%[sdj%]/g, It = function() {
530
- };
531
- typeof process < "u" && process.env && process.env.NODE_ENV !== "production" && typeof window < "u" && typeof document < "u" && (It = function(t, n) {
532
- typeof console < "u" && console.warn && typeof ASYNC_VALIDATOR_NO_WARNING > "u" && n.every(function(r) {
533
- return typeof r == "string";
534
- }) && console.warn(t, n);
535
- });
536
- function Xe(e) {
537
- if (!e || !e.length) return null;
538
- var t = {};
539
- return e.forEach(function(n) {
540
- var r = n.field;
541
- t[r] = t[r] || [], t[r].push(n);
542
- }), t;
543
- }
544
- function J(e) {
545
- for (var t = arguments.length, n = new Array(t > 1 ? t - 1 : 0), r = 1; r < t; r++)
546
- n[r - 1] = arguments[r];
547
- var i = 0, a = n.length;
548
- if (typeof e == "function")
549
- return e.apply(null, n);
550
- if (typeof e == "string") {
551
- var l = e.replace(ir, function(o) {
552
- if (o === "%%")
553
- return "%";
554
- if (i >= a)
555
- return o;
556
- switch (o) {
557
- case "%s":
558
- return String(n[i++]);
559
- case "%d":
560
- return Number(n[i++]);
561
- case "%j":
562
- try {
563
- return JSON.stringify(n[i++]);
564
- } catch {
565
- return "[Circular]";
566
- }
567
- break;
568
- default:
569
- return o;
570
- }
571
- });
572
- return l;
573
- }
574
- return e;
575
- }
576
- function ar(e) {
577
- return e === "string" || e === "url" || e === "hex" || e === "email" || e === "date" || e === "pattern";
578
- }
579
- function z(e, t) {
580
- return !!(e == null || t === "array" && Array.isArray(e) && !e.length || ar(t) && typeof e == "string" && !e);
581
- }
582
- function lr(e, t, n) {
583
- var r = [], i = 0, a = e.length;
584
- function l(o) {
585
- r.push.apply(r, o || []), i++, i === a && n(r);
586
- }
587
- e.forEach(function(o) {
588
- t(o, l);
589
- });
590
- }
591
- function ft(e, t, n) {
592
- var r = 0, i = e.length;
593
- function a(l) {
594
- if (l && l.length) {
595
- n(l);
596
- return;
597
- }
598
- var o = r;
599
- r = r + 1, o < i ? t(e[o], a) : n([]);
600
- }
601
- a([]);
602
- }
603
- function or(e) {
604
- var t = [];
605
- return Object.keys(e).forEach(function(n) {
606
- t.push.apply(t, e[n] || []);
607
- }), t;
608
- }
609
- var dt = /* @__PURE__ */ function(e) {
610
- tr(t, e);
611
- function t(n, r) {
612
- var i;
613
- return i = e.call(this, "Async Validation Error") || this, i.errors = n, i.fields = r, i;
614
- }
615
- return t;
616
- }(/* @__PURE__ */ ze(Error));
617
- function sr(e, t, n, r, i) {
618
- if (t.first) {
619
- var a = new Promise(function(p, b) {
620
- var $ = function(g) {
621
- return r(g), g.length ? b(new dt(g, Xe(g))) : p(i);
622
- }, f = or(e);
623
- ft(f, n, $);
624
- });
625
- return a.catch(function(p) {
626
- return p;
627
- }), a;
628
- }
629
- var l = t.firstFields === !0 ? Object.keys(e) : t.firstFields || [], o = Object.keys(e), c = o.length, v = 0, d = [], y = new Promise(function(p, b) {
630
- var $ = function(x) {
631
- if (d.push.apply(d, x), v++, v === c)
632
- return r(d), d.length ? b(new dt(d, Xe(d))) : p(i);
633
- };
634
- o.length || (r(d), p(i)), o.forEach(function(f) {
635
- var x = e[f];
636
- l.indexOf(f) !== -1 ? ft(x, n, $) : lr(x, n, $);
637
- });
638
- });
639
- return y.catch(function(p) {
640
- return p;
641
- }), y;
642
- }
643
- function ur(e) {
644
- return !!(e && e.message !== void 0);
645
- }
646
- function cr(e, t) {
647
- for (var n = e, r = 0; r < t.length; r++) {
648
- if (n == null)
649
- return n;
650
- n = n[t[r]];
651
- }
652
- return n;
653
- }
654
- function mt(e, t) {
655
- return function(n) {
656
- var r;
657
- return e.fullFields ? r = cr(t, e.fullFields) : r = t[n.field || e.fullField], ur(n) ? (n.field = n.field || e.fullField, n.fieldValue = r, n) : {
658
- message: typeof n == "function" ? n() : n,
659
- fieldValue: r,
660
- field: n.field || e.fullField
661
- };
662
- };
663
- }
664
- function gt(e, t) {
665
- if (t) {
666
- for (var n in t)
667
- if (t.hasOwnProperty(n)) {
668
- var r = t[n];
669
- typeof r == "object" && typeof e[n] == "object" ? e[n] = oe({}, e[n], r) : e[n] = r;
670
- }
671
- }
672
- return e;
673
- }
674
- var Mt = function(t, n, r, i, a, l) {
675
- t.required && (!r.hasOwnProperty(t.field) || z(n, l || t.type)) && i.push(J(a.messages.required, t.fullField));
676
- }, fr = function(t, n, r, i, a) {
677
- (/^\s+$/.test(n) || n === "") && i.push(J(a.messages.whitespace, t.fullField));
678
- }, Ce, dr = function() {
679
- if (Ce)
680
- return Ce;
681
- var e = "[a-fA-F\\d:]", t = function(u) {
682
- return u && u.includeBoundaries ? "(?:(?<=\\s|^)(?=" + e + ")|(?<=" + e + ")(?=\\s|$))" : "";
683
- }, n = "(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)(?:\\.(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)){3}", r = "[a-fA-F\\d]{1,4}", i = (`
684
- (?:
685
- (?:` + r + ":){7}(?:" + r + `|:)| // 1:2:3:4:5:6:7:: 1:2:3:4:5:6:7:8
686
- (?:` + r + ":){6}(?:" + n + "|:" + r + `|:)| // 1:2:3:4:5:6:: 1:2:3:4:5:6::8 1:2:3:4:5:6::8 1:2:3:4:5:6::1.2.3.4
687
- (?:` + r + ":){5}(?::" + n + "|(?::" + r + `){1,2}|:)| // 1:2:3:4:5:: 1:2:3:4:5::7:8 1:2:3:4:5::8 1:2:3:4:5::7:1.2.3.4
688
- (?:` + r + ":){4}(?:(?::" + r + "){0,1}:" + n + "|(?::" + r + `){1,3}|:)| // 1:2:3:4:: 1:2:3:4::6:7:8 1:2:3:4::8 1:2:3:4::6:7:1.2.3.4
689
- (?:` + r + ":){3}(?:(?::" + r + "){0,2}:" + n + "|(?::" + r + `){1,4}|:)| // 1:2:3:: 1:2:3::5:6:7:8 1:2:3::8 1:2:3::5:6:7:1.2.3.4
690
- (?:` + r + ":){2}(?:(?::" + r + "){0,3}:" + n + "|(?::" + r + `){1,5}|:)| // 1:2:: 1:2::4:5:6:7:8 1:2::8 1:2::4:5:6:7:1.2.3.4
691
- (?:` + r + ":){1}(?:(?::" + r + "){0,4}:" + n + "|(?::" + r + `){1,6}|:)| // 1:: 1::3:4:5:6:7:8 1::8 1::3:4:5:6:7:1.2.3.4
692
- (?::(?:(?::` + r + "){0,5}:" + n + "|(?::" + r + `){1,7}|:)) // ::2:3:4:5:6:7:8 ::2:3:4:5:6:7:8 ::8 ::1.2.3.4
693
- )(?:%[0-9a-zA-Z]{1,})? // %eth0 %1
694
- `).replace(/\s*\/\/.*$/gm, "").replace(/\n/g, "").trim(), a = new RegExp("(?:^" + n + "$)|(?:^" + i + "$)"), l = new RegExp("^" + n + "$"), o = new RegExp("^" + i + "$"), c = function(u) {
695
- return u && u.exact ? a : new RegExp("(?:" + t(u) + n + t(u) + ")|(?:" + t(u) + i + t(u) + ")", "g");
696
- };
697
- c.v4 = function(s) {
698
- return s && s.exact ? l : new RegExp("" + t(s) + n + t(s), "g");
699
- }, c.v6 = function(s) {
700
- return s && s.exact ? o : new RegExp("" + t(s) + i + t(s), "g");
701
- };
702
- var v = "(?:(?:[a-z]+:)?//)", d = "(?:\\S+(?::\\S*)?@)?", y = c.v4().source, p = c.v6().source, b = "(?:(?:[a-z\\u00a1-\\uffff0-9][-_]*)*[a-z\\u00a1-\\uffff0-9]+)", $ = "(?:\\.(?:[a-z\\u00a1-\\uffff0-9]-*)*[a-z\\u00a1-\\uffff0-9]+)*", f = "(?:\\.(?:[a-z\\u00a1-\\uffff]{2,}))", x = "(?::\\d{2,5})?", g = '(?:[/?#][^\\s"]*)?', F = "(?:" + v + "|www\\.)" + d + "(?:localhost|" + y + "|" + p + "|" + b + $ + f + ")" + x + g;
703
- return Ce = new RegExp("(?:^" + F + "$)", "i"), Ce;
704
- }, ht = {
705
- // http://emailregex.com/
706
- email: /^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+\.)+[a-zA-Z\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]{2,}))$/,
707
- // url: new RegExp(
708
- // '^(?!mailto:)(?:(?:http|https|ftp)://|//)(?:\\S+(?::\\S*)?@)?(?:(?:(?:[1-9]\\d?|1\\d\\d|2[01]\\d|22[0-3])(?:\\.(?:1?\\d{1,2}|2[0-4]\\d|25[0-5])){2}(?:\\.(?:[0-9]\\d?|1\\d\\d|2[0-4]\\d|25[0-4]))|(?:(?:[a-z\\u00a1-\\uffff0-9]+-*)*[a-z\\u00a1-\\uffff0-9]+)(?:\\.(?:[a-z\\u00a1-\\uffff0-9]+-*)*[a-z\\u00a1-\\uffff0-9]+)*(?:\\.(?:[a-z\\u00a1-\\uffff]{2,})))|localhost)(?::\\d{2,5})?(?:(/|\\?|#)[^\\s]*)?$',
709
- // 'i',
710
- // ),
711
- hex: /^#?([a-f0-9]{6}|[a-f0-9]{3})$/i
712
- }, pe = {
713
- integer: function(t) {
714
- return pe.number(t) && parseInt(t, 10) === t;
715
- },
716
- float: function(t) {
717
- return pe.number(t) && !pe.integer(t);
718
- },
719
- array: function(t) {
720
- return Array.isArray(t);
721
- },
722
- regexp: function(t) {
723
- if (t instanceof RegExp)
724
- return !0;
725
- try {
726
- return !!new RegExp(t);
727
- } catch {
728
- return !1;
729
- }
730
- },
731
- date: function(t) {
732
- return typeof t.getTime == "function" && typeof t.getMonth == "function" && typeof t.getYear == "function" && !isNaN(t.getTime());
733
- },
734
- number: function(t) {
735
- return isNaN(t) ? !1 : typeof t == "number";
736
- },
737
- object: function(t) {
738
- return typeof t == "object" && !pe.array(t);
739
- },
740
- method: function(t) {
741
- return typeof t == "function";
742
- },
743
- email: function(t) {
744
- return typeof t == "string" && t.length <= 320 && !!t.match(ht.email);
745
- },
746
- url: function(t) {
747
- return typeof t == "string" && t.length <= 2048 && !!t.match(dr());
748
- },
749
- hex: function(t) {
750
- return typeof t == "string" && !!t.match(ht.hex);
751
- }
752
- }, mr = function(t, n, r, i, a) {
753
- if (t.required && n === void 0) {
754
- Mt(t, n, r, i, a);
755
- return;
756
- }
757
- var l = ["integer", "float", "array", "regexp", "object", "method", "email", "number", "date", "url", "hex"], o = t.type;
758
- l.indexOf(o) > -1 ? pe[o](n) || i.push(J(a.messages.types[o], t.fullField, t.type)) : o && typeof n !== t.type && i.push(J(a.messages.types[o], t.fullField, t.type));
759
- }, gr = function(t, n, r, i, a) {
760
- var l = typeof t.len == "number", o = typeof t.min == "number", c = typeof t.max == "number", v = /[\uD800-\uDBFF][\uDC00-\uDFFF]/g, d = n, y = null, p = typeof n == "number", b = typeof n == "string", $ = Array.isArray(n);
761
- if (p ? y = "number" : b ? y = "string" : $ && (y = "array"), !y)
762
- return !1;
763
- $ && (d = n.length), b && (d = n.replace(v, "_").length), l ? d !== t.len && i.push(J(a.messages[y].len, t.fullField, t.len)) : o && !c && d < t.min ? i.push(J(a.messages[y].min, t.fullField, t.min)) : c && !o && d > t.max ? i.push(J(a.messages[y].max, t.fullField, t.max)) : o && c && (d < t.min || d > t.max) && i.push(J(a.messages[y].range, t.fullField, t.min, t.max));
764
- }, fe = "enum", hr = function(t, n, r, i, a) {
765
- t[fe] = Array.isArray(t[fe]) ? t[fe] : [], t[fe].indexOf(n) === -1 && i.push(J(a.messages[fe], t.fullField, t[fe].join(", ")));
766
- }, vr = function(t, n, r, i, a) {
767
- if (t.pattern) {
768
- if (t.pattern instanceof RegExp)
769
- t.pattern.lastIndex = 0, t.pattern.test(n) || i.push(J(a.messages.pattern.mismatch, t.fullField, n, t.pattern));
770
- else if (typeof t.pattern == "string") {
771
- var l = new RegExp(t.pattern);
772
- l.test(n) || i.push(J(a.messages.pattern.mismatch, t.fullField, n, t.pattern));
773
- }
774
- }
775
- }, V = {
776
- required: Mt,
777
- whitespace: fr,
778
- type: mr,
779
- range: gr,
780
- enum: hr,
781
- pattern: vr
782
- }, pr = function(t, n, r, i, a) {
783
- var l = [], o = t.required || !t.required && i.hasOwnProperty(t.field);
784
- if (o) {
785
- if (z(n, "string") && !t.required)
786
- return r();
787
- V.required(t, n, i, l, a, "string"), z(n, "string") || (V.type(t, n, i, l, a), V.range(t, n, i, l, a), V.pattern(t, n, i, l, a), t.whitespace === !0 && V.whitespace(t, n, i, l, a));
788
- }
789
- r(l);
790
- }, yr = function(t, n, r, i, a) {
791
- var l = [], o = t.required || !t.required && i.hasOwnProperty(t.field);
792
- if (o) {
793
- if (z(n) && !t.required)
794
- return r();
795
- V.required(t, n, i, l, a), n !== void 0 && V.type(t, n, i, l, a);
796
- }
797
- r(l);
798
- }, br = function(t, n, r, i, a) {
799
- var l = [], o = t.required || !t.required && i.hasOwnProperty(t.field);
800
- if (o) {
801
- if (n === "" && (n = void 0), z(n) && !t.required)
802
- return r();
803
- V.required(t, n, i, l, a), n !== void 0 && (V.type(t, n, i, l, a), V.range(t, n, i, l, a));
804
- }
805
- r(l);
806
- }, xr = function(t, n, r, i, a) {
807
- var l = [], o = t.required || !t.required && i.hasOwnProperty(t.field);
808
- if (o) {
809
- if (z(n) && !t.required)
810
- return r();
811
- V.required(t, n, i, l, a), n !== void 0 && V.type(t, n, i, l, a);
812
- }
813
- r(l);
814
- }, $r = function(t, n, r, i, a) {
815
- var l = [], o = t.required || !t.required && i.hasOwnProperty(t.field);
816
- if (o) {
817
- if (z(n) && !t.required)
818
- return r();
819
- V.required(t, n, i, l, a), z(n) || V.type(t, n, i, l, a);
820
- }
821
- r(l);
822
- }, wr = function(t, n, r, i, a) {
823
- var l = [], o = t.required || !t.required && i.hasOwnProperty(t.field);
824
- if (o) {
825
- if (z(n) && !t.required)
826
- return r();
827
- V.required(t, n, i, l, a), n !== void 0 && (V.type(t, n, i, l, a), V.range(t, n, i, l, a));
828
- }
829
- r(l);
830
- }, Fr = function(t, n, r, i, a) {
831
- var l = [], o = t.required || !t.required && i.hasOwnProperty(t.field);
832
- if (o) {
833
- if (z(n) && !t.required)
834
- return r();
835
- V.required(t, n, i, l, a), n !== void 0 && (V.type(t, n, i, l, a), V.range(t, n, i, l, a));
836
- }
837
- r(l);
838
- }, Sr = function(t, n, r, i, a) {
839
- var l = [], o = t.required || !t.required && i.hasOwnProperty(t.field);
840
- if (o) {
841
- if (n == null && !t.required)
842
- return r();
843
- V.required(t, n, i, l, a, "array"), n != null && (V.type(t, n, i, l, a), V.range(t, n, i, l, a));
844
- }
845
- r(l);
846
- }, Or = function(t, n, r, i, a) {
847
- var l = [], o = t.required || !t.required && i.hasOwnProperty(t.field);
848
- if (o) {
849
- if (z(n) && !t.required)
850
- return r();
851
- V.required(t, n, i, l, a), n !== void 0 && V.type(t, n, i, l, a);
852
- }
853
- r(l);
854
- }, Cr = "enum", Er = function(t, n, r, i, a) {
855
- var l = [], o = t.required || !t.required && i.hasOwnProperty(t.field);
856
- if (o) {
857
- if (z(n) && !t.required)
858
- return r();
859
- V.required(t, n, i, l, a), n !== void 0 && V[Cr](t, n, i, l, a);
860
- }
861
- r(l);
862
- }, qr = function(t, n, r, i, a) {
863
- var l = [], o = t.required || !t.required && i.hasOwnProperty(t.field);
864
- if (o) {
865
- if (z(n, "string") && !t.required)
866
- return r();
867
- V.required(t, n, i, l, a), z(n, "string") || V.pattern(t, n, i, l, a);
868
- }
869
- r(l);
870
- }, Ar = function(t, n, r, i, a) {
871
- var l = [], o = t.required || !t.required && i.hasOwnProperty(t.field);
872
- if (o) {
873
- if (z(n, "date") && !t.required)
874
- return r();
875
- if (V.required(t, n, i, l, a), !z(n, "date")) {
876
- var c;
877
- n instanceof Date ? c = n : c = new Date(n), V.type(t, c, i, l, a), c && V.range(t, c.getTime(), i, l, a);
878
- }
879
- }
880
- r(l);
881
- }, jr = function(t, n, r, i, a) {
882
- var l = [], o = Array.isArray(n) ? "array" : typeof n;
883
- V.required(t, n, i, l, a, o), r(l);
884
- }, Re = function(t, n, r, i, a) {
885
- var l = t.type, o = [], c = t.required || !t.required && i.hasOwnProperty(t.field);
886
- if (c) {
887
- if (z(n, l) && !t.required)
888
- return r();
889
- V.required(t, n, i, o, a, l), z(n, l) || V.type(t, n, i, o, a);
890
- }
891
- r(o);
892
- }, Ir = function(t, n, r, i, a) {
893
- var l = [], o = t.required || !t.required && i.hasOwnProperty(t.field);
894
- if (o) {
895
- if (z(n) && !t.required)
896
- return r();
897
- V.required(t, n, i, l, a);
898
- }
899
- r(l);
900
- }, be = {
901
- string: pr,
902
- method: yr,
903
- number: br,
904
- boolean: xr,
905
- regexp: $r,
906
- integer: wr,
907
- float: Fr,
908
- array: Sr,
909
- object: Or,
910
- enum: Er,
911
- pattern: qr,
912
- date: Ar,
913
- url: Re,
914
- hex: Re,
915
- email: Re,
916
- required: jr,
917
- any: Ir
918
- };
919
- function ke() {
920
- return {
921
- default: "Validation error on field %s",
922
- required: "%s is required",
923
- enum: "%s must be one of %s",
924
- whitespace: "%s cannot be empty",
925
- date: {
926
- format: "%s date %s is invalid for format %s",
927
- parse: "%s date could not be parsed, %s is invalid ",
928
- invalid: "%s date %s is invalid"
929
- },
930
- types: {
931
- string: "%s is not a %s",
932
- method: "%s is not a %s (function)",
933
- array: "%s is not an %s",
934
- object: "%s is not an %s",
935
- number: "%s is not a %s",
936
- date: "%s is not a %s",
937
- boolean: "%s is not a %s",
938
- integer: "%s is not an %s",
939
- float: "%s is not a %s",
940
- regexp: "%s is not a valid %s",
941
- email: "%s is not a valid %s",
942
- url: "%s is not a valid %s",
943
- hex: "%s is not a valid %s"
944
- },
945
- string: {
946
- len: "%s must be exactly %s characters",
947
- min: "%s must be at least %s characters",
948
- max: "%s cannot be longer than %s characters",
949
- range: "%s must be between %s and %s characters"
950
- },
951
- number: {
952
- len: "%s must equal %s",
953
- min: "%s cannot be less than %s",
954
- max: "%s cannot be greater than %s",
955
- range: "%s must be between %s and %s"
956
- },
957
- array: {
958
- len: "%s must be exactly %s in length",
959
- min: "%s cannot be less than %s in length",
960
- max: "%s cannot be greater than %s in length",
961
- range: "%s must be between %s and %s in length"
962
- },
963
- pattern: {
964
- mismatch: "%s value %s does not match pattern %s"
965
- },
966
- clone: function() {
967
- var t = JSON.parse(JSON.stringify(this));
968
- return t.clone = this.clone, t;
969
- }
970
- };
971
- }
972
- var Ue = ke(), we = /* @__PURE__ */ function() {
973
- function e(n) {
974
- this.rules = null, this._messages = Ue, this.define(n);
975
- }
976
- var t = e.prototype;
977
- return t.define = function(r) {
978
- var i = this;
979
- if (!r)
980
- throw new Error("Cannot configure a schema with no rules");
981
- if (typeof r != "object" || Array.isArray(r))
982
- throw new Error("Rules must be an object");
983
- this.rules = {}, Object.keys(r).forEach(function(a) {
984
- var l = r[a];
985
- i.rules[a] = Array.isArray(l) ? l : [l];
986
- });
987
- }, t.messages = function(r) {
988
- return r && (this._messages = gt(ke(), r)), this._messages;
989
- }, t.validate = function(r, i, a) {
990
- var l = this;
991
- i === void 0 && (i = {}), a === void 0 && (a = function() {
992
- });
993
- var o = r, c = i, v = a;
994
- if (typeof c == "function" && (v = c, c = {}), !this.rules || Object.keys(this.rules).length === 0)
995
- return v && v(null, o), Promise.resolve(o);
996
- function d(f) {
997
- var x = [], g = {};
998
- function F(u) {
999
- if (Array.isArray(u)) {
1000
- var m;
1001
- x = (m = x).concat.apply(m, u);
1002
- } else
1003
- x.push(u);
1004
- }
1005
- for (var s = 0; s < f.length; s++)
1006
- F(f[s]);
1007
- x.length ? (g = Xe(x), v(x, g)) : v(null, o);
1008
- }
1009
- if (c.messages) {
1010
- var y = this.messages();
1011
- y === Ue && (y = ke()), gt(y, c.messages), c.messages = y;
1012
- } else
1013
- c.messages = this.messages();
1014
- var p = {}, b = c.keys || Object.keys(this.rules);
1015
- b.forEach(function(f) {
1016
- var x = l.rules[f], g = o[f];
1017
- x.forEach(function(F) {
1018
- var s = F;
1019
- typeof s.transform == "function" && (o === r && (o = oe({}, o)), g = o[f] = s.transform(g)), typeof s == "function" ? s = {
1020
- validator: s
1021
- } : s = oe({}, s), s.validator = l.getValidationMethod(s), s.validator && (s.field = f, s.fullField = s.fullField || f, s.type = l.getType(s), p[f] = p[f] || [], p[f].push({
1022
- rule: s,
1023
- value: g,
1024
- source: o,
1025
- field: f
1026
- }));
1027
- });
1028
- });
1029
- var $ = {};
1030
- return sr(p, c, function(f, x) {
1031
- var g = f.rule, F = (g.type === "object" || g.type === "array") && (typeof g.fields == "object" || typeof g.defaultField == "object");
1032
- F = F && (g.required || !g.required && f.value), g.field = f.field;
1033
- function s(h, S) {
1034
- return oe({}, S, {
1035
- fullField: g.fullField + "." + h,
1036
- fullFields: g.fullFields ? [].concat(g.fullFields, [h]) : [h]
1037
- });
1038
- }
1039
- function u(h) {
1040
- h === void 0 && (h = []);
1041
- var S = Array.isArray(h) ? h : [h];
1042
- !c.suppressWarning && S.length && e.warning("async-validator:", S), S.length && g.message !== void 0 && (S = [].concat(g.message));
1043
- var O = S.map(mt(g, o));
1044
- if (c.first && O.length)
1045
- return $[g.field] = 1, x(O);
1046
- if (!F)
1047
- x(O);
1048
- else {
1049
- if (g.required && !f.value)
1050
- return g.message !== void 0 ? O = [].concat(g.message).map(mt(g, o)) : c.error && (O = [c.error(g, J(c.messages.required, g.field))]), x(O);
1051
- var I = {};
1052
- g.defaultField && Object.keys(f.value).map(function(T) {
1053
- I[T] = g.defaultField;
1054
- }), I = oe({}, I, f.rule.fields);
1055
- var P = {};
1056
- Object.keys(I).forEach(function(T) {
1057
- var q = I[T], G = Array.isArray(q) ? q : [q];
1058
- P[T] = G.map(s.bind(null, T));
1059
- });
1060
- var N = new e(P);
1061
- N.messages(c.messages), f.rule.options && (f.rule.options.messages = c.messages, f.rule.options.error = c.error), N.validate(f.value, f.rule.options || c, function(T) {
1062
- var q = [];
1063
- O && O.length && q.push.apply(q, O), T && T.length && q.push.apply(q, T), x(q.length ? q : null);
1064
- });
1065
- }
1066
- }
1067
- var m;
1068
- if (g.asyncValidator)
1069
- m = g.asyncValidator(g, f.value, u, f.source, c);
1070
- else if (g.validator) {
1071
- try {
1072
- m = g.validator(g, f.value, u, f.source, c);
1073
- } catch (h) {
1074
- console.error?.(h), c.suppressValidatorError || setTimeout(function() {
1075
- throw h;
1076
- }, 0), u(h.message);
1077
- }
1078
- m === !0 ? u() : m === !1 ? u(typeof g.message == "function" ? g.message(g.fullField || g.field) : g.message || (g.fullField || g.field) + " fails") : m instanceof Array ? u(m) : m instanceof Error && u(m.message);
1079
- }
1080
- m && m.then && m.then(function() {
1081
- return u();
1082
- }, function(h) {
1083
- return u(h);
1084
- });
1085
- }, function(f) {
1086
- d(f);
1087
- }, o);
1088
- }, t.getType = function(r) {
1089
- if (r.type === void 0 && r.pattern instanceof RegExp && (r.type = "pattern"), typeof r.validator != "function" && r.type && !be.hasOwnProperty(r.type))
1090
- throw new Error(J("Unknown rule type %s", r.type));
1091
- return r.type || "string";
1092
- }, t.getValidationMethod = function(r) {
1093
- if (typeof r.validator == "function")
1094
- return r.validator;
1095
- var i = Object.keys(r), a = i.indexOf("message");
1096
- return a !== -1 && i.splice(a, 1), i.length === 1 && i[0] === "required" ? be.required : be[this.getType(r)] || void 0;
1097
- }, e;
1098
- }();
1099
- we.register = function(t, n) {
1100
- if (typeof n != "function")
1101
- throw new Error("Cannot register a validator by type, validator is not a function");
1102
- be[t] = n;
1103
- };
1104
- we.warning = It;
1105
- we.messages = Ue;
1106
- we.validators = be;
1107
- function ie(e) {
1108
- return e == null ? [] : Array.isArray(e) ? e : [e];
1109
- }
1110
- function Pt(e, t) {
1111
- let n = e;
1112
- for (let r = 0; r < t.length; r += 1) {
1113
- if (n == null)
1114
- return;
1115
- n = n[t[r]];
1116
- }
1117
- return n;
1118
- }
1119
- function Vt(e, t, n, r) {
1120
- if (!t.length)
1121
- return n;
1122
- const [i, ...a] = t;
1123
- let l;
1124
- return !e && typeof i == "number" ? l = [] : Array.isArray(e) ? l = [...e] : l = A({}, e), r && n === void 0 && a.length === 1 ? delete l[i][a[0]] : l[i] = Vt(l[i], a, n, r), l;
1125
- }
1126
- function Mr(e, t, n) {
1127
- let r = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : !1;
1128
- return t.length && r && n === void 0 && !Pt(e, t.slice(0, -1)) ? e : Vt(e, t, n, r);
1129
- }
1130
- function Ke(e) {
1131
- return ie(e);
1132
- }
1133
- function Pr(e, t) {
1134
- return Pt(e, t);
1135
- }
1136
- function Vr(e, t, n) {
1137
- let r = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : !1;
1138
- return Mr(e, t, n, r);
1139
- }
1140
- function Tr(e, t) {
1141
- return e && e.some((n) => Nr(n, t));
1142
- }
1143
- function vt(e) {
1144
- return typeof e == "object" && e !== null && Object.getPrototypeOf(e) === Object.prototype;
1145
- }
1146
- function Tt(e, t) {
1147
- const n = Array.isArray(e) ? [...e] : A({}, e);
1148
- return t && Object.keys(t).forEach((r) => {
1149
- const i = n[r], a = t[r], l = vt(i) && vt(a);
1150
- n[r] = l ? Tt(i, a || {}) : a;
1151
- }), n;
1152
- }
1153
- function Rr(e) {
1154
- for (var t = arguments.length, n = new Array(t > 1 ? t - 1 : 0), r = 1; r < t; r++)
1155
- n[r - 1] = arguments[r];
1156
- return n.reduce((i, a) => Tt(i, a), e);
1157
- }
1158
- function pt(e, t) {
1159
- let n = {};
1160
- return t.forEach((r) => {
1161
- const i = Pr(e, r);
1162
- n = Vr(n, r, i);
1163
- }), n;
1164
- }
1165
- function Nr(e, t) {
1166
- return !e || !t || e.length !== t.length ? !1 : e.every((n, r) => t[r] === n);
1167
- }
1168
- const Z = "'${name}' is not a valid ${type}", Ie = {
1169
- default: "Validation error on field '${name}'",
1170
- required: "'${name}' is required",
1171
- enum: "'${name}' must be one of [${enum}]",
1172
- whitespace: "'${name}' cannot be empty",
1173
- date: {
1174
- format: "'${name}' is invalid for format date",
1175
- parse: "'${name}' could not be parsed as date",
1176
- invalid: "'${name}' is invalid date"
1177
- },
1178
- types: {
1179
- string: Z,
1180
- method: Z,
1181
- array: Z,
1182
- object: Z,
1183
- number: Z,
1184
- date: Z,
1185
- boolean: Z,
1186
- integer: Z,
1187
- float: Z,
1188
- regexp: Z,
1189
- email: Z,
1190
- url: Z,
1191
- hex: Z
1192
- },
1193
- string: {
1194
- len: "'${name}' must be exactly ${len} characters",
1195
- min: "'${name}' must be at least ${min} characters",
1196
- max: "'${name}' cannot be longer than ${max} characters",
1197
- range: "'${name}' must be between ${min} and ${max} characters"
1198
- },
1199
- number: {
1200
- len: "'${name}' must equal ${len}",
1201
- min: "'${name}' cannot be less than ${min}",
1202
- max: "'${name}' cannot be greater than ${max}",
1203
- range: "'${name}' must be between ${min} and ${max}"
1204
- },
1205
- array: {
1206
- len: "'${name}' must be exactly ${len} in length",
1207
- min: "'${name}' cannot be less than ${min} in length",
1208
- max: "'${name}' cannot be greater than ${max} in length",
1209
- range: "'${name}' must be between ${min} and ${max} in length"
1210
- },
1211
- pattern: {
1212
- mismatch: "'${name}' does not match pattern ${pattern}"
1213
- }
1214
- };
1215
- var Me = function(e, t, n, r) {
1216
- function i(a) {
1217
- return a instanceof n ? a : new n(function(l) {
1218
- l(a);
1219
- });
1220
- }
1221
- return new (n || (n = Promise))(function(a, l) {
1222
- function o(d) {
1223
- try {
1224
- v(r.next(d));
1225
- } catch (y) {
1226
- l(y);
1227
- }
1228
- }
1229
- function c(d) {
1230
- try {
1231
- v(r.throw(d));
1232
- } catch (y) {
1233
- l(y);
1234
- }
1235
- }
1236
- function v(d) {
1237
- d.done ? a(d.value) : i(d.value).then(o, c);
1238
- }
1239
- v((r = r.apply(e, t || [])).next());
1240
- });
1241
- };
1242
- const Lr = we;
1243
- function _r(e, t) {
1244
- return e.replace(/\$\{\w+\}/g, (n) => {
1245
- const r = n.slice(2, -1);
1246
- return t[r];
1247
- });
1248
- }
1249
- function Ye(e, t, n, r, i) {
1250
- return Me(this, void 0, void 0, function* () {
1251
- const a = A({}, n);
1252
- delete a.ruleIndex, delete a.trigger;
1253
- let l = null;
1254
- a && a.type === "array" && a.defaultField && (l = a.defaultField, delete a.defaultField);
1255
- const o = new Lr({
1256
- [e]: [a]
1257
- }), c = Rr({}, Ie, r.validateMessages);
1258
- o.messages(c);
1259
- let v = [];
1260
- try {
1261
- yield Promise.resolve(o.validate({
1262
- [e]: t
1263
- }, A({}, r)));
1264
- } catch (p) {
1265
- p.errors ? v = p.errors.map((b, $) => {
1266
- let {
1267
- message: f
1268
- } = b;
1269
- return (
1270
- // Wrap VueNode with `key`
1271
- Zt(f) ? wn(f, {
1272
- key: `error_${$}`
1273
- }) : f
1274
- );
1275
- }) : (console.error(p), v = [c.default()]);
1276
- }
1277
- if (!v.length && l)
1278
- return (yield Promise.all(t.map((b, $) => Ye(`${e}.${$}`, b, l, r, i)))).reduce((b, $) => [...b, ...$], []);
1279
- const d = A(A(A({}, n), {
1280
- name: e,
1281
- enum: (n.enum || []).join(", ")
1282
- }), i);
1283
- return v.map((p) => typeof p == "string" ? _r(p, d) : p);
1284
- });
1285
- }
1286
- function Rt(e, t, n, r, i, a) {
1287
- const l = e.join("."), o = n.map((v, d) => {
1288
- const y = v.validator, p = A(A({}, v), {
1289
- ruleIndex: d
1290
- });
1291
- return y && (p.validator = (b, $, f) => {
1292
- let x = !1;
1293
- const F = y(b, $, function() {
1294
- for (var s = arguments.length, u = new Array(s), m = 0; m < s; m++)
1295
- u[m] = arguments[m];
1296
- Promise.resolve().then(() => {
1297
- _e(!x, "Your validator function has already return a promise. `callback` will be ignored."), x || f(...u);
1298
- });
1299
- });
1300
- x = F && typeof F.then == "function" && typeof F.catch == "function", _e(x, "`callback` is deprecated. Please return a promise instead."), x && F.then(() => {
1301
- f();
1302
- }).catch((s) => {
1303
- f(s || " ");
1304
- });
1305
- }), p;
1306
- }).sort((v, d) => {
1307
- let {
1308
- warningOnly: y,
1309
- ruleIndex: p
1310
- } = v, {
1311
- warningOnly: b,
1312
- ruleIndex: $
1313
- } = d;
1314
- return !!y == !!b ? p - $ : y ? 1 : -1;
1315
- });
1316
- let c;
1317
- if (i === !0)
1318
- c = new Promise((v, d) => Me(this, void 0, void 0, function* () {
1319
- for (let y = 0; y < o.length; y += 1) {
1320
- const p = o[y], b = yield Ye(l, t, p, r, a);
1321
- if (b.length) {
1322
- d([{
1323
- errors: b,
1324
- rule: p
1325
- }]);
1326
- return;
1327
- }
1328
- }
1329
- v([]);
1330
- }));
1331
- else {
1332
- const v = o.map((d) => Ye(l, t, d, r, a).then((y) => ({
1333
- errors: y,
1334
- rule: d
1335
- })));
1336
- c = (i ? Dr(v) : Wr(v)).then((d) => Promise.reject(d));
1337
- }
1338
- return c.catch((v) => v), c;
1339
- }
1340
- function Wr(e) {
1341
- return Me(this, void 0, void 0, function* () {
1342
- return Promise.all(e).then((t) => [].concat(...t));
1343
- });
1344
- }
1345
- function Dr(e) {
1346
- return Me(this, void 0, void 0, function* () {
1347
- let t = 0;
1348
- return new Promise((n) => {
1349
- e.forEach((r) => {
1350
- r.then((i) => {
1351
- i.errors.length && n([i]), t += 1, t === e.length && n([]);
1352
- });
1353
- });
1354
- });
1355
- });
1356
- }
1357
- const Nt = Symbol("formContextKey"), Lt = (e) => {
1358
- tt(Nt, e);
1359
- }, nt = () => et(Nt, {
1360
- name: E(() => {
1361
- }),
1362
- labelAlign: E(() => "right"),
1363
- vertical: E(() => !1),
1364
- // eslint-disable-next-line @typescript-eslint/no-unused-vars
1365
- addField: (e, t) => {
1366
- },
1367
- // eslint-disable-next-line @typescript-eslint/no-unused-vars
1368
- removeField: (e) => {
1369
- },
1370
- model: E(() => {
1371
- }),
1372
- rules: E(() => {
1373
- }),
1374
- colon: E(() => {
1375
- }),
1376
- labelWrap: E(() => {
1377
- }),
1378
- labelCol: E(() => {
1379
- }),
1380
- requiredMark: E(() => !1),
1381
- validateTrigger: E(() => {
1382
- }),
1383
- onValidate: () => {
1384
- },
1385
- validateMessages: E(() => Ie)
1386
- }), _t = Symbol("formItemPrefixContextKey"), Hr = (e) => {
1387
- tt(_t, e);
1388
- }, Gr = () => et(_t, {
1389
- prefixCls: E(() => "")
1390
- });
1391
- function Br(e) {
1392
- return typeof e == "number" ? `${e} ${e} auto` : /^\d+(\.\d+)?(px|em|rem|%)$/.test(e) ? `0 0 ${e}` : e;
1393
- }
1394
- const zr = () => ({
1395
- span: [String, Number],
1396
- order: [String, Number],
1397
- offset: [String, Number],
1398
- push: [String, Number],
1399
- pull: [String, Number],
1400
- xs: {
1401
- type: [String, Number, Object],
1402
- default: void 0
1403
- },
1404
- sm: {
1405
- type: [String, Number, Object],
1406
- default: void 0
1407
- },
1408
- md: {
1409
- type: [String, Number, Object],
1410
- default: void 0
1411
- },
1412
- lg: {
1413
- type: [String, Number, Object],
1414
- default: void 0
1415
- },
1416
- xl: {
1417
- type: [String, Number, Object],
1418
- default: void 0
1419
- },
1420
- xxl: {
1421
- type: [String, Number, Object],
1422
- default: void 0
1423
- },
1424
- prefixCls: String,
1425
- flex: [String, Number]
1426
- }), Xr = ["xs", "sm", "md", "lg", "xl", "xxl"], Wt = ge({
1427
- compatConfig: {
1428
- MODE: 3
1429
- },
1430
- name: "ACol",
1431
- inheritAttrs: !1,
1432
- props: zr(),
1433
- setup(e, t) {
1434
- let {
1435
- slots: n,
1436
- attrs: r
1437
- } = t;
1438
- const {
1439
- gutter: i,
1440
- supportFlexGap: a,
1441
- wrap: l
1442
- } = Xn(), {
1443
- prefixCls: o,
1444
- direction: c
1445
- } = je("col", e), [v, d] = Zn(o), y = E(() => {
1446
- const {
1447
- span: b,
1448
- order: $,
1449
- offset: f,
1450
- push: x,
1451
- pull: g
1452
- } = e, F = o.value;
1453
- let s = {};
1454
- return Xr.forEach((u) => {
1455
- let m = {};
1456
- const h = e[u];
1457
- typeof h == "number" ? m.span = h : typeof h == "object" && (m = h || {}), s = A(A({}, s), {
1458
- [`${F}-${u}-${m.span}`]: m.span !== void 0,
1459
- [`${F}-${u}-order-${m.order}`]: m.order || m.order === 0,
1460
- [`${F}-${u}-offset-${m.offset}`]: m.offset || m.offset === 0,
1461
- [`${F}-${u}-push-${m.push}`]: m.push || m.push === 0,
1462
- [`${F}-${u}-pull-${m.pull}`]: m.pull || m.pull === 0,
1463
- [`${F}-rtl`]: c.value === "rtl"
1464
- });
1465
- }), ue(F, {
1466
- [`${F}-${b}`]: b !== void 0,
1467
- [`${F}-order-${$}`]: $,
1468
- [`${F}-offset-${f}`]: f,
1469
- [`${F}-push-${x}`]: x,
1470
- [`${F}-pull-${g}`]: g
1471
- }, s, r.class, d.value);
1472
- }), p = E(() => {
1473
- const {
1474
- flex: b
1475
- } = e, $ = i.value, f = {};
1476
- if ($ && $[0] > 0) {
1477
- const x = `${$[0] / 2}px`;
1478
- f.paddingLeft = x, f.paddingRight = x;
1479
- }
1480
- if ($ && $[1] > 0 && !a.value) {
1481
- const x = `${$[1] / 2}px`;
1482
- f.paddingTop = x, f.paddingBottom = x;
1483
- }
1484
- return b && (f.flex = Br(b), l.value === !1 && !f.minWidth && (f.minWidth = 0)), f;
1485
- });
1486
- return () => {
1487
- var b;
1488
- return v(R("div", H(H({}, r), {}, {
1489
- class: y.value,
1490
- style: [p.value, r.style]
1491
- }), [(b = n.default) === null || b === void 0 ? void 0 : b.call(n)]));
1492
- };
1493
- }
1494
- }), rt = (e, t) => {
1495
- let {
1496
- slots: n,
1497
- emit: r,
1498
- attrs: i
1499
- } = t;
1500
- var a, l, o, c, v;
1501
- const {
1502
- prefixCls: d,
1503
- htmlFor: y,
1504
- labelCol: p,
1505
- labelAlign: b,
1506
- colon: $,
1507
- required: f,
1508
- requiredMark: x
1509
- } = A(A({}, e), i), [g] = Jt("Form"), F = (a = e.label) !== null && a !== void 0 ? a : (l = n.label) === null || l === void 0 ? void 0 : l.call(n);
1510
- if (!F) return null;
1511
- const {
1512
- vertical: s,
1513
- labelAlign: u,
1514
- labelCol: m,
1515
- labelWrap: h,
1516
- colon: S
1517
- } = nt(), O = p || m?.value || {}, I = b || u?.value, P = `${d}-item-label`, N = ue(P, I === "left" && `${P}-left`, O.class, {
1518
- [`${P}-wrap`]: !!h.value
1519
- });
1520
- let T = F;
1521
- const q = $ === !0 || S?.value !== !1 && $ !== !1;
1522
- if (q && !s.value && typeof F == "string" && F.trim() !== "" && (T = F.replace(/[:|:]\s*$/, "")), e.tooltip || n.tooltip) {
1523
- const X = R("span", {
1524
- class: `${d}-item-tooltip`
1525
- }, [R(en, {
1526
- title: e.tooltip
1527
- }, {
1528
- default: () => [R(tn, null, null)]
1529
- })]);
1530
- T = R(Ae, null, [T, n.tooltip ? (o = n.tooltip) === null || o === void 0 ? void 0 : o.call(n, {
1531
- class: `${d}-item-tooltip`
1532
- }) : X]);
1533
- }
1534
- x === "optional" && !f && (T = R(Ae, null, [T, R("span", {
1535
- class: `${d}-item-optional`
1536
- }, [((c = g.value) === null || c === void 0 ? void 0 : c.optional) || ((v = nn.Form) === null || v === void 0 ? void 0 : v.optional)])]));
1537
- const K = ue({
1538
- [`${d}-item-required`]: f,
1539
- [`${d}-item-required-mark-optional`]: x === "optional",
1540
- [`${d}-item-no-colon`]: !q
1541
- });
1542
- return R(Wt, H(H({}, O), {}, {
1543
- class: N
1544
- }), {
1545
- default: () => [R("label", {
1546
- for: y,
1547
- class: K,
1548
- title: typeof F == "string" ? F : "",
1549
- onClick: (X) => r("click", X)
1550
- }, [T])]
1551
- });
1552
- };
1553
- rt.displayName = "FormItemLabel";
1554
- rt.inheritAttrs = !1;
1555
- const kr = (e) => {
1556
- const {
1557
- componentCls: t
1558
- } = e, n = `${t}-show-help`, r = `${t}-show-help-item`;
1559
- return {
1560
- [n]: {
1561
- // Explain holder
1562
- transition: `opacity ${e.motionDurationSlow} ${e.motionEaseInOut}`,
1563
- "&-appear, &-enter": {
1564
- opacity: 0,
1565
- "&-active": {
1566
- opacity: 1
1567
- }
1568
- },
1569
- "&-leave": {
1570
- opacity: 1,
1571
- "&-active": {
1572
- opacity: 0
1573
- }
1574
- },
1575
- // Explain
1576
- [r]: {
1577
- overflow: "hidden",
1578
- transition: `height ${e.motionDurationSlow} ${e.motionEaseInOut},
1579
- opacity ${e.motionDurationSlow} ${e.motionEaseInOut},
1580
- transform ${e.motionDurationSlow} ${e.motionEaseInOut} !important`,
1581
- [`&${r}-appear, &${r}-enter`]: {
1582
- transform: "translateY(-5px)",
1583
- opacity: 0,
1584
- "&-active": {
1585
- transform: "translateY(0)",
1586
- opacity: 1
1587
- }
1588
- },
1589
- [`&${r}-leave-active`]: {
1590
- transform: "translateY(-5px)"
1591
- }
1592
- }
1593
- }
1594
- };
1595
- }, Ur = (e) => ({
1596
- legend: {
1597
- display: "block",
1598
- width: "100%",
1599
- marginBottom: e.marginLG,
1600
- padding: 0,
1601
- color: e.colorTextDescription,
1602
- fontSize: e.fontSizeLG,
1603
- lineHeight: "inherit",
1604
- border: 0,
1605
- borderBottom: `${e.lineWidth}px ${e.lineType} ${e.colorBorder}`
1606
- },
1607
- label: {
1608
- fontSize: e.fontSize
1609
- },
1610
- 'input[type="search"]': {
1611
- boxSizing: "border-box"
1612
- },
1613
- // Position radios and checkboxes better
1614
- 'input[type="radio"], input[type="checkbox"]': {
1615
- lineHeight: "normal"
1616
- },
1617
- 'input[type="file"]': {
1618
- display: "block"
1619
- },
1620
- // Make range inputs behave like textual form controls
1621
- 'input[type="range"]': {
1622
- display: "block",
1623
- width: "100%"
1624
- },
1625
- // Make multiple select elements height not fixed
1626
- "select[multiple], select[size]": {
1627
- height: "auto"
1628
- },
1629
- // Focus for file, radio, and checkbox
1630
- "input[type='file']:focus,\n input[type='radio']:focus,\n input[type='checkbox']:focus": {
1631
- outline: 0,
1632
- boxShadow: `0 0 0 ${e.controlOutlineWidth}px ${e.controlOutline}`
1633
- },
1634
- // Adjust output element
1635
- output: {
1636
- display: "block",
1637
- paddingTop: 15,
1638
- color: e.colorText,
1639
- fontSize: e.fontSize,
1640
- lineHeight: e.lineHeight
1641
- }
1642
- }), yt = (e, t) => {
1643
- const {
1644
- formItemCls: n
1645
- } = e;
1646
- return {
1647
- [n]: {
1648
- [`${n}-label > label`]: {
1649
- height: t
1650
- },
1651
- [`${n}-control-input`]: {
1652
- minHeight: t
1653
- }
1654
- }
1655
- };
1656
- }, Kr = (e) => {
1657
- const {
1658
- componentCls: t
1659
- } = e;
1660
- return {
1661
- [e.componentCls]: A(A(A({}, Ft(e)), Ur(e)), {
1662
- [`${t}-text`]: {
1663
- display: "inline-block",
1664
- paddingInlineEnd: e.paddingSM
1665
- },
1666
- // ================================================================
1667
- // = Size =
1668
- // ================================================================
1669
- "&-small": A({}, yt(e, e.controlHeightSM)),
1670
- "&-large": A({}, yt(e, e.controlHeightLG))
1671
- })
1672
- };
1673
- }, Yr = (e) => {
1674
- const {
1675
- formItemCls: t,
1676
- iconCls: n,
1677
- componentCls: r,
1678
- rootPrefixCls: i
1679
- } = e;
1680
- return {
1681
- [t]: A(A({}, Ft(e)), {
1682
- marginBottom: e.marginLG,
1683
- verticalAlign: "top",
1684
- "&-with-help": {
1685
- transition: "none"
1686
- },
1687
- [`&-hidden,
1688
- &-hidden.${i}-row`]: {
1689
- // https://github.com/ant-design/ant-design/issues/26141
1690
- display: "none"
1691
- },
1692
- "&-has-warning": {
1693
- [`${t}-split`]: {
1694
- color: e.colorError
1695
- }
1696
- },
1697
- "&-has-error": {
1698
- [`${t}-split`]: {
1699
- color: e.colorWarning
1700
- }
1701
- },
1702
- // ==============================================================
1703
- // = Label =
1704
- // ==============================================================
1705
- [`${t}-label`]: {
1706
- display: "inline-block",
1707
- flexGrow: 0,
1708
- overflow: "hidden",
1709
- whiteSpace: "nowrap",
1710
- textAlign: "end",
1711
- verticalAlign: "middle",
1712
- "&-left": {
1713
- textAlign: "start"
1714
- },
1715
- "&-wrap": {
1716
- overflow: "unset",
1717
- lineHeight: `${e.lineHeight} - 0.25em`,
1718
- whiteSpace: "unset"
1719
- },
1720
- "> label": {
1721
- position: "relative",
1722
- display: "inline-flex",
1723
- alignItems: "center",
1724
- maxWidth: "100%",
1725
- height: e.controlHeight,
1726
- color: e.colorTextHeading,
1727
- fontSize: e.fontSize,
1728
- [`> ${n}`]: {
1729
- fontSize: e.fontSize,
1730
- verticalAlign: "top"
1731
- },
1732
- // Required mark
1733
- [`&${t}-required:not(${t}-required-mark-optional)::before`]: {
1734
- display: "inline-block",
1735
- marginInlineEnd: e.marginXXS,
1736
- color: e.colorError,
1737
- fontSize: e.fontSize,
1738
- fontFamily: "SimSun, sans-serif",
1739
- lineHeight: 1,
1740
- content: '"*"',
1741
- [`${r}-hide-required-mark &`]: {
1742
- display: "none"
1743
- }
1744
- },
1745
- // Optional mark
1746
- [`${t}-optional`]: {
1747
- display: "inline-block",
1748
- marginInlineStart: e.marginXXS,
1749
- color: e.colorTextDescription,
1750
- [`${r}-hide-required-mark &`]: {
1751
- display: "none"
1752
- }
1753
- },
1754
- // Optional mark
1755
- [`${t}-tooltip`]: {
1756
- color: e.colorTextDescription,
1757
- cursor: "help",
1758
- writingMode: "horizontal-tb",
1759
- marginInlineStart: e.marginXXS
1760
- },
1761
- "&::after": {
1762
- content: '":"',
1763
- position: "relative",
1764
- marginBlock: 0,
1765
- marginInlineStart: e.marginXXS / 2,
1766
- marginInlineEnd: e.marginXS
1767
- },
1768
- [`&${t}-no-colon::after`]: {
1769
- content: '" "'
1770
- }
1771
- }
1772
- },
1773
- // ==============================================================
1774
- // = Input =
1775
- // ==============================================================
1776
- [`${t}-control`]: {
1777
- display: "flex",
1778
- flexDirection: "column",
1779
- flexGrow: 1,
1780
- [`&:first-child:not([class^="'${i}-col-'"]):not([class*="' ${i}-col-'"])`]: {
1781
- width: "100%"
1782
- },
1783
- "&-input": {
1784
- position: "relative",
1785
- display: "flex",
1786
- alignItems: "center",
1787
- minHeight: e.controlHeight,
1788
- "&-content": {
1789
- flex: "auto",
1790
- maxWidth: "100%"
1791
- }
1792
- }
1793
- },
1794
- // ==============================================================
1795
- // = Explain =
1796
- // ==============================================================
1797
- [t]: {
1798
- "&-explain, &-extra": {
1799
- clear: "both",
1800
- color: e.colorTextDescription,
1801
- fontSize: e.fontSize,
1802
- lineHeight: e.lineHeight
1803
- },
1804
- "&-explain-connected": {
1805
- width: "100%"
1806
- },
1807
- "&-extra": {
1808
- minHeight: e.controlHeightSM,
1809
- transition: `color ${e.motionDurationMid} ${e.motionEaseOut}`
1810
- // sync input color transition
1811
- },
1812
- "&-explain": {
1813
- "&-error": {
1814
- color: e.colorError
1815
- },
1816
- "&-warning": {
1817
- color: e.colorWarning
1818
- }
1819
- }
1820
- },
1821
- [`&-with-help ${t}-explain`]: {
1822
- height: "auto",
1823
- opacity: 1
1824
- },
1825
- // ==============================================================
1826
- // = Feedback Icon =
1827
- // ==============================================================
1828
- [`${t}-feedback-icon`]: {
1829
- fontSize: e.fontSize,
1830
- textAlign: "center",
1831
- visibility: "visible",
1832
- animationName: wt,
1833
- animationDuration: e.motionDurationMid,
1834
- animationTimingFunction: e.motionEaseOutBack,
1835
- pointerEvents: "none",
1836
- "&-success": {
1837
- color: e.colorSuccess
1838
- },
1839
- "&-error": {
1840
- color: e.colorError
1841
- },
1842
- "&-warning": {
1843
- color: e.colorWarning
1844
- },
1845
- "&-validating": {
1846
- color: e.colorPrimary
1847
- }
1848
- }
1849
- })
1850
- };
1851
- }, Qr = (e) => {
1852
- const {
1853
- componentCls: t,
1854
- formItemCls: n,
1855
- rootPrefixCls: r
1856
- } = e;
1857
- return {
1858
- [`${t}-horizontal`]: {
1859
- [`${n}-label`]: {
1860
- flexGrow: 0
1861
- },
1862
- [`${n}-control`]: {
1863
- flex: "1 1 0",
1864
- // https://github.com/ant-design/ant-design/issues/32777
1865
- // https://github.com/ant-design/ant-design/issues/33773
1866
- minWidth: 0
1867
- },
1868
- // https://github.com/ant-design/ant-design/issues/32980
1869
- [`${n}-label.${r}-col-24 + ${n}-control`]: {
1870
- minWidth: "unset"
1871
- }
1872
- }
1873
- };
1874
- }, Zr = (e) => {
1875
- const {
1876
- componentCls: t,
1877
- formItemCls: n
1878
- } = e;
1879
- return {
1880
- [`${t}-inline`]: {
1881
- display: "flex",
1882
- flexWrap: "wrap",
1883
- [n]: {
1884
- flex: "none",
1885
- flexWrap: "nowrap",
1886
- marginInlineEnd: e.margin,
1887
- marginBottom: 0,
1888
- "&-with-help": {
1889
- marginBottom: e.marginLG
1890
- },
1891
- [`> ${n}-label,
1892
- > ${n}-control`]: {
1893
- display: "inline-block",
1894
- verticalAlign: "top"
1895
- },
1896
- [`> ${n}-label`]: {
1897
- flex: "none"
1898
- },
1899
- [`${t}-text`]: {
1900
- display: "inline-block"
1901
- },
1902
- [`${n}-has-feedback`]: {
1903
- display: "inline-block"
1904
- }
1905
- }
1906
- }
1907
- };
1908
- }, de = (e) => ({
1909
- margin: 0,
1910
- padding: `0 0 ${e.paddingXS}px`,
1911
- whiteSpace: "initial",
1912
- textAlign: "start",
1913
- "> label": {
1914
- margin: 0,
1915
- "&::after": {
1916
- display: "none"
1917
- }
1918
- }
1919
- }), Jr = (e) => {
1920
- const {
1921
- componentCls: t,
1922
- formItemCls: n
1923
- } = e;
1924
- return {
1925
- [`${n} ${n}-label`]: de(e),
1926
- [t]: {
1927
- [n]: {
1928
- flexWrap: "wrap",
1929
- [`${n}-label,
1930
- ${n}-control`]: {
1931
- flex: "0 0 100%",
1932
- maxWidth: "100%"
1933
- }
1934
- }
1935
- }
1936
- };
1937
- }, ei = (e) => {
1938
- const {
1939
- componentCls: t,
1940
- formItemCls: n,
1941
- rootPrefixCls: r
1942
- } = e;
1943
- return {
1944
- [`${t}-vertical`]: {
1945
- [n]: {
1946
- "&-row": {
1947
- flexDirection: "column"
1948
- },
1949
- "&-label > label": {
1950
- height: "auto"
1951
- },
1952
- [`${t}-item-control`]: {
1953
- width: "100%"
1954
- }
1955
- }
1956
- },
1957
- [`${t}-vertical ${n}-label,
1958
- .${r}-col-24${n}-label,
1959
- .${r}-col-xl-24${n}-label`]: de(e),
1960
- [`@media (max-width: ${e.screenXSMax}px)`]: [Jr(e), {
1961
- [t]: {
1962
- [`.${r}-col-xs-24${n}-label`]: de(e)
1963
- }
1964
- }],
1965
- [`@media (max-width: ${e.screenSMMax}px)`]: {
1966
- [t]: {
1967
- [`.${r}-col-sm-24${n}-label`]: de(e)
1968
- }
1969
- },
1970
- [`@media (max-width: ${e.screenMDMax}px)`]: {
1971
- [t]: {
1972
- [`.${r}-col-md-24${n}-label`]: de(e)
1973
- }
1974
- },
1975
- [`@media (max-width: ${e.screenLGMax}px)`]: {
1976
- [t]: {
1977
- [`.${r}-col-lg-24${n}-label`]: de(e)
1978
- }
1979
- }
1980
- };
1981
- }, it = Qe("Form", (e, t) => {
1982
- let {
1983
- rootPrefixCls: n
1984
- } = t;
1985
- const r = $t(e, {
1986
- formItemCls: `${e.componentCls}-item`,
1987
- rootPrefixCls: n
1988
- });
1989
- return [Kr(r), Yr(r), kr(r), Qr(r), Zr(r), ei(r), rn(r), wt];
1990
- }), ti = ge({
1991
- compatConfig: {
1992
- MODE: 3
1993
- },
1994
- name: "ErrorList",
1995
- inheritAttrs: !1,
1996
- props: ["errors", "help", "onErrorVisibleChanged", "helpStatus", "warnings"],
1997
- setup(e, t) {
1998
- let {
1999
- attrs: n
2000
- } = t;
2001
- const {
2002
- prefixCls: r,
2003
- status: i
2004
- } = Gr(), a = E(() => `${r.value}-item-explain`), l = E(() => !!(e.errors && e.errors.length)), o = xe(i.value), [, c] = it(r);
2005
- return se([l, i], () => {
2006
- l.value && (o.value = i.value);
2007
- }), () => {
2008
- var v, d;
2009
- const y = an(`${r.value}-show-help-item`), p = ln(`${r.value}-show-help-item`, y);
2010
- return p.role = "alert", p.class = [c.value, a.value, n.class, `${r.value}-show-help`], R(Fn, H(H({}, on(`${r.value}-show-help`)), {}, {
2011
- onAfterEnter: () => e.onErrorVisibleChanged(!0),
2012
- onAfterLeave: () => e.onErrorVisibleChanged(!1)
2013
- }), {
2014
- default: () => [Sn(R(On, H(H({}, p), {}, {
2015
- tag: "div"
2016
- }), {
2017
- default: () => [(d = e.errors) === null || d === void 0 ? void 0 : d.map((b, $) => R("div", {
2018
- key: $,
2019
- class: o.value ? `${a.value}-${o.value}` : ""
2020
- }, [b]))]
2021
- }), [[Cn, !!(!((v = e.errors) === null || v === void 0) && v.length)]])]
2022
- });
2023
- };
2024
- }
2025
- }), ni = ge({
2026
- compatConfig: {
2027
- MODE: 3
2028
- },
2029
- slots: Object,
2030
- inheritAttrs: !1,
2031
- props: ["prefixCls", "errors", "hasFeedback", "onDomErrorVisibleChange", "wrapperCol", "help", "extra", "status", "marginBottom", "onErrorVisibleChanged"],
2032
- setup(e, t) {
2033
- let {
2034
- slots: n
2035
- } = t;
2036
- const r = nt(), {
2037
- wrapperCol: i
2038
- } = r, a = A({}, r);
2039
- return delete a.labelCol, delete a.wrapperCol, Lt(a), Hr({
2040
- prefixCls: E(() => e.prefixCls),
2041
- status: E(() => e.status)
2042
- }), () => {
2043
- var l, o, c;
2044
- const {
2045
- prefixCls: v,
2046
- wrapperCol: d,
2047
- marginBottom: y,
2048
- onErrorVisibleChanged: p,
2049
- help: b = (l = n.help) === null || l === void 0 ? void 0 : l.call(n),
2050
- errors: $ = St((o = n.errors) === null || o === void 0 ? void 0 : o.call(n)),
2051
- // hasFeedback,
2052
- // status,
2053
- extra: f = (c = n.extra) === null || c === void 0 ? void 0 : c.call(n)
2054
- } = e, x = `${v}-item`, g = d || i?.value || {}, F = ue(`${x}-control`, g.class);
2055
- return R(Wt, H(H({}, g), {}, {
2056
- class: F
2057
- }), {
2058
- default: () => {
2059
- var s;
2060
- return R(Ae, null, [R("div", {
2061
- class: `${x}-control-input`
2062
- }, [R("div", {
2063
- class: `${x}-control-input-content`
2064
- }, [(s = n.default) === null || s === void 0 ? void 0 : s.call(n)])]), y !== null || $.length ? R("div", {
2065
- style: {
2066
- display: "flex",
2067
- flexWrap: "nowrap"
2068
- }
2069
- }, [R(ti, {
2070
- errors: $,
2071
- help: b,
2072
- class: `${x}-explain-connected`,
2073
- onErrorVisibleChanged: p
2074
- }, null), !!y && R("div", {
2075
- style: {
2076
- width: 0,
2077
- height: `${y}px`
2078
- }
2079
- }, null)]) : null, f ? R("div", {
2080
- class: `${x}-extra`
2081
- }, [f]) : null]);
2082
- }
2083
- });
2084
- };
2085
- }
2086
- });
2087
- function ri(e) {
2088
- const t = ee(e.value.slice());
2089
- let n = null;
2090
- return De(() => {
2091
- clearTimeout(n), n = setTimeout(() => {
2092
- t.value = e.value;
2093
- }, e.value.length ? 0 : 10);
2094
- }), t;
2095
- }
2096
- Ze("success", "warning", "error", "validating", "");
2097
- const ii = {
2098
- success: gn,
2099
- warning: mn,
2100
- error: dn,
2101
- validating: fn
2102
- };
2103
- function Ne(e, t, n) {
2104
- let r = e;
2105
- const i = t;
2106
- let a = 0;
2107
- try {
2108
- for (let l = i.length; a < l - 1 && !(!r && !n); ++a) {
2109
- const o = i[a];
2110
- if (o in r)
2111
- r = r[o];
2112
- else {
2113
- if (n)
2114
- throw Error("please transfer a valid name path to form item!");
2115
- break;
2116
- }
2117
- }
2118
- if (n && !r)
2119
- throw Error("please transfer a valid name path to form item!");
2120
- } catch {
2121
- console.error("please transfer a valid name path to form item!");
2122
- }
2123
- return {
2124
- o: r,
2125
- k: i[a],
2126
- v: r ? r[i[a]] : void 0
2127
- };
2128
- }
2129
- const ai = () => ({
2130
- htmlFor: String,
2131
- prefixCls: String,
2132
- label: me.any,
2133
- help: me.any,
2134
- extra: me.any,
2135
- labelCol: {
2136
- type: Object
2137
- },
2138
- wrapperCol: {
2139
- type: Object
2140
- },
2141
- hasFeedback: {
2142
- type: Boolean,
2143
- default: !1
2144
- },
2145
- colon: {
2146
- type: Boolean,
2147
- default: void 0
2148
- },
2149
- labelAlign: String,
2150
- prop: {
2151
- type: [String, Number, Array]
2152
- },
2153
- name: {
2154
- type: [String, Number, Array]
2155
- },
2156
- rules: [Array, Object],
2157
- autoLink: {
2158
- type: Boolean,
2159
- default: !0
2160
- },
2161
- required: {
2162
- type: Boolean,
2163
- default: void 0
2164
- },
2165
- validateFirst: {
2166
- type: Boolean,
2167
- default: void 0
2168
- },
2169
- validateStatus: me.oneOf(Ze("", "success", "warning", "error", "validating")),
2170
- validateTrigger: {
2171
- type: [String, Array]
2172
- },
2173
- messageVariables: {
2174
- type: Object
2175
- },
2176
- hidden: Boolean,
2177
- noStyle: Boolean,
2178
- tooltip: String
2179
- });
2180
- let li = 0;
2181
- const oi = "form_item", si = ge({
2182
- compatConfig: {
2183
- MODE: 3
2184
- },
2185
- name: "AFormItem",
2186
- inheritAttrs: !1,
2187
- __ANT_NEW_FORM_ITEM: !0,
2188
- props: ai(),
2189
- slots: Object,
2190
- setup(e, t) {
2191
- let {
2192
- slots: n,
2193
- attrs: r,
2194
- expose: i
2195
- } = t;
2196
- _e(e.prop === void 0, "`prop` is deprecated. Please use `name` instead.");
2197
- const a = `form-item-${++li}`, {
2198
- prefixCls: l
2199
- } = je("form", e), [o, c] = it(l), v = ee(), d = nt(), y = E(() => e.name || e.prop), p = ee([]), b = ee(!1), $ = ee(), f = E(() => {
2200
- const w = y.value;
2201
- return Ke(w);
2202
- }), x = E(() => {
2203
- if (f.value.length) {
2204
- const w = d.name.value, M = f.value.join("_");
2205
- return w ? `${w}_${M}` : `${oi}_${M}`;
2206
- } else
2207
- return;
2208
- }), g = () => {
2209
- const w = d.model.value;
2210
- if (!(!w || !y.value))
2211
- return Ne(w, f.value, !0).v;
2212
- }, F = E(() => g()), s = ee(Ee(F.value)), u = E(() => {
2213
- let w = e.validateTrigger !== void 0 ? e.validateTrigger : d.validateTrigger.value;
2214
- return w = w === void 0 ? "change" : w, ie(w);
2215
- }), m = E(() => {
2216
- let w = d.rules.value;
2217
- const M = e.rules, _ = e.required !== void 0 ? {
2218
- required: !!e.required,
2219
- trigger: u.value
2220
- } : [], W = Ne(w, f.value);
2221
- w = w ? W.o[W.k] || W.v : [];
2222
- const D = [].concat(M || w || []);
2223
- return sn(D, (U) => U.required) ? D : D.concat(_);
2224
- }), h = E(() => {
2225
- const w = m.value;
2226
- let M = !1;
2227
- return w && w.length && w.every((_) => _.required ? (M = !0, !1) : !0), M || e.required;
2228
- }), S = ee();
2229
- De(() => {
2230
- S.value = e.validateStatus;
2231
- });
2232
- const O = E(() => {
2233
- let w = {};
2234
- return typeof e.label == "string" ? w.label = e.label : e.name && (w.label = String(e.name)), e.messageVariables && (w = A(A({}, w), e.messageVariables)), w;
2235
- }), I = (w) => {
2236
- if (f.value.length === 0)
2237
- return;
2238
- const {
2239
- validateFirst: M = !1
2240
- } = e, {
2241
- triggerName: _
2242
- } = w || {};
2243
- let W = m.value;
2244
- if (_ && (W = W.filter((U) => {
2245
- const {
2246
- trigger: te
2247
- } = U;
2248
- return !te && !u.value.length ? !0 : ie(te || u.value).includes(_);
2249
- })), !W.length)
2250
- return Promise.resolve();
2251
- const D = Rt(f.value, F.value, W, A({
2252
- validateMessages: d.validateMessages.value
2253
- }, w), M, O.value);
2254
- return S.value = "validating", p.value = [], D.catch((U) => U).then(function() {
2255
- let U = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : [];
2256
- if (S.value === "validating") {
2257
- const te = U.filter((ne) => ne && ne.errors.length);
2258
- S.value = te.length ? "error" : "success", p.value = te.map((ne) => ne.errors), d.onValidate(y.value, !p.value.length, p.value.length ? He(p.value[0]) : null);
2259
- }
2260
- }), D;
2261
- }, P = () => {
2262
- I({
2263
- triggerName: "blur"
2264
- });
2265
- }, N = () => {
2266
- if (b.value) {
2267
- b.value = !1;
2268
- return;
2269
- }
2270
- I({
2271
- triggerName: "change"
2272
- });
2273
- }, T = () => {
2274
- S.value = e.validateStatus, b.value = !1, p.value = [];
2275
- }, q = () => {
2276
- var w;
2277
- S.value = e.validateStatus, b.value = !0, p.value = [];
2278
- const M = d.model.value || {}, _ = F.value, W = Ne(M, f.value, !0);
2279
- Array.isArray(_) ? W.o[W.k] = [].concat((w = s.value) !== null && w !== void 0 ? w : []) : W.o[W.k] = s.value, qt(() => {
2280
- b.value = !1;
2281
- });
2282
- }, G = E(() => e.htmlFor === void 0 ? x.value : e.htmlFor), K = () => {
2283
- const w = G.value;
2284
- if (!w || !$.value)
2285
- return;
2286
- const M = $.value.$el.querySelector(`[id="${w}"]`);
2287
- M && M.focus && M.focus();
2288
- };
2289
- i({
2290
- onFieldBlur: P,
2291
- onFieldChange: N,
2292
- clearValidate: T,
2293
- resetField: q
2294
- }), un({
2295
- id: x,
2296
- onFieldBlur: () => {
2297
- e.autoLink && P();
2298
- },
2299
- onFieldChange: () => {
2300
- e.autoLink && N();
2301
- },
2302
- clearValidate: T
2303
- }, E(() => !!(e.autoLink && d.model.value && y.value)));
2304
- let X = !1;
2305
- se(y, (w) => {
2306
- w ? X || (X = !0, d.addField(a, {
2307
- fieldValue: F,
2308
- fieldId: x,
2309
- fieldName: y,
2310
- resetField: q,
2311
- clearValidate: T,
2312
- namePath: f,
2313
- validateRules: I,
2314
- rules: m
2315
- })) : (X = !1, d.removeField(a));
2316
- }, {
2317
- immediate: !0
2318
- }), Ct(() => {
2319
- d.removeField(a);
2320
- });
2321
- const C = ri(p), j = E(() => e.validateStatus !== void 0 ? e.validateStatus : C.value.length ? "error" : S.value), L = E(() => ({
2322
- [`${l.value}-item`]: !0,
2323
- [c.value]: !0,
2324
- // Status
2325
- [`${l.value}-item-has-feedback`]: j.value && e.hasFeedback,
2326
- [`${l.value}-item-has-success`]: j.value === "success",
2327
- [`${l.value}-item-has-warning`]: j.value === "warning",
2328
- [`${l.value}-item-has-error`]: j.value === "error",
2329
- [`${l.value}-item-is-validating`]: j.value === "validating",
2330
- [`${l.value}-item-hidden`]: e.hidden
2331
- })), B = Et({});
2332
- cn.useProvide(B), De(() => {
2333
- let w;
2334
- if (e.hasFeedback) {
2335
- const M = j.value && ii[j.value];
2336
- w = M ? R("span", {
2337
- class: ue(`${l.value}-item-feedback-icon`, `${l.value}-item-feedback-icon-${j.value}`)
2338
- }, [R(M, null, null)]) : null;
2339
- }
2340
- A(B, {
2341
- status: j.value,
2342
- hasFeedback: e.hasFeedback,
2343
- feedbackIcon: w,
2344
- isFormItemInput: !0
2345
- });
2346
- });
2347
- const k = ee(null), Q = ee(!1), re = () => {
2348
- if (v.value) {
2349
- const w = getComputedStyle(v.value);
2350
- k.value = parseInt(w.marginBottom, 10);
2351
- }
2352
- };
2353
- Je(() => {
2354
- se(Q, () => {
2355
- Q.value && re();
2356
- }, {
2357
- flush: "post",
2358
- immediate: !0
2359
- });
2360
- });
2361
- const Y = (w) => {
2362
- w || (k.value = null);
2363
- };
2364
- return () => {
2365
- var w, M;
2366
- if (e.noStyle) return (w = n.default) === null || w === void 0 ? void 0 : w.call(n);
2367
- const _ = (M = e.help) !== null && M !== void 0 ? M : n.help ? St(n.help()) : null, W = !!(_ != null && Array.isArray(_) && _.length || C.value.length);
2368
- return Q.value = W, o(R("div", {
2369
- class: [L.value, W ? `${l.value}-item-with-help` : "", r.class],
2370
- ref: v
2371
- }, [R(er, H(H({}, r), {}, {
2372
- class: `${l.value}-item-row`,
2373
- key: "row"
2374
- }), {
2375
- default: () => {
2376
- var D, U;
2377
- return R(Ae, null, [R(rt, H(H({}, e), {}, {
2378
- htmlFor: G.value,
2379
- required: h.value,
2380
- requiredMark: d.requiredMark.value,
2381
- prefixCls: l.value,
2382
- onClick: K,
2383
- label: e.label
2384
- }), {
2385
- label: n.label,
2386
- tooltip: n.tooltip
2387
- }), R(ni, H(H({}, e), {}, {
2388
- errors: _ != null ? ie(_) : C.value,
2389
- marginBottom: k.value,
2390
- prefixCls: l.value,
2391
- status: j.value,
2392
- ref: $,
2393
- help: _,
2394
- extra: (D = e.extra) !== null && D !== void 0 ? D : (U = n.extra) === null || U === void 0 ? void 0 : U.call(n),
2395
- onErrorVisibleChanged: Y
2396
- }), {
2397
- default: n.default
2398
- })]);
2399
- }
2400
- }), !!k.value && R("div", {
2401
- class: `${l.value}-margin-offset`,
2402
- style: {
2403
- marginBottom: `-${k.value}px`
2404
- }
2405
- }, null)]));
2406
- };
2407
- }
2408
- });
2409
- function Dt(e) {
2410
- let t = !1, n = e.length;
2411
- const r = [];
2412
- return e.length ? new Promise((i, a) => {
2413
- e.forEach((l, o) => {
2414
- l.catch((c) => (t = !0, c)).then((c) => {
2415
- n -= 1, r[o] = c, !(n > 0) && (t && a(r), i(r));
2416
- });
2417
- });
2418
- }) : Promise.resolve([]);
2419
- }
2420
- function bt(e) {
2421
- let t = !1;
2422
- return e && e.length && e.every((n) => n.required ? (t = !0, !1) : !0), t;
2423
- }
2424
- function xt(e) {
2425
- return e == null ? [] : Array.isArray(e) ? e : [e];
2426
- }
2427
- function Le(e, t, n) {
2428
- let r = e;
2429
- t = t.replace(/\[(\w+)\]/g, ".$1"), t = t.replace(/^\./, "");
2430
- const i = t.split(".");
2431
- let a = 0;
2432
- for (let l = i.length; a < l - 1 && !(!r && !n); ++a) {
2433
- const o = i[a];
2434
- if (o in r)
2435
- r = r[o];
2436
- else {
2437
- if (n)
2438
- throw new Error("please transfer a valid name path to validate!");
2439
- break;
2440
- }
2441
- }
2442
- return {
2443
- o: r,
2444
- k: i[a],
2445
- v: r ? r[i[a]] : null,
2446
- isValid: r && i[a] in r
2447
- };
2448
- }
2449
- function ui(e) {
2450
- let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : xe({}), n = arguments.length > 2 ? arguments[2] : void 0;
2451
- const r = Ee(ae(e)), i = Et({}), a = ee([]), l = (s) => {
2452
- A(ae(e), A(A({}, Ee(r)), s)), qt(() => {
2453
- Object.keys(i).forEach((u) => {
2454
- i[u] = {
2455
- autoLink: !1,
2456
- required: bt(ae(t)[u])
2457
- };
2458
- });
2459
- });
2460
- }, o = function() {
2461
- let s = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : [], u = arguments.length > 1 ? arguments[1] : void 0;
2462
- return u.length ? s.filter((m) => {
2463
- const h = xt(m.trigger || "change");
2464
- return Ln(h, u).length;
2465
- }) : s;
2466
- };
2467
- let c = null;
2468
- const v = function(s) {
2469
- let u = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, m = arguments.length > 2 ? arguments[2] : void 0;
2470
- const h = [], S = {};
2471
- for (let P = 0; P < s.length; P++) {
2472
- const N = s[P], T = Le(ae(e), N, m);
2473
- if (!T.isValid) continue;
2474
- S[N] = T.v;
2475
- const q = o(ae(t)[N], xt(u && u.trigger));
2476
- q.length && h.push(d(N, T.v, q, u || {}).then(() => ({
2477
- name: N,
2478
- errors: [],
2479
- warnings: []
2480
- })).catch((G) => {
2481
- const K = [], X = [];
2482
- return G.forEach((C) => {
2483
- let {
2484
- rule: {
2485
- warningOnly: j
2486
- },
2487
- errors: L
2488
- } = C;
2489
- j ? X.push(...L) : K.push(...L);
2490
- }), K.length ? Promise.reject({
2491
- name: N,
2492
- errors: K,
2493
- warnings: X
2494
- }) : {
2495
- name: N,
2496
- errors: K,
2497
- warnings: X
2498
- };
2499
- }));
2500
- }
2501
- const O = Dt(h);
2502
- c = O;
2503
- const I = O.then(() => c === O ? Promise.resolve(S) : Promise.reject([])).catch((P) => {
2504
- const N = P.filter((T) => T && T.errors.length);
2505
- return N.length ? Promise.reject({
2506
- values: S,
2507
- errorFields: N,
2508
- outOfDate: c !== O
2509
- }) : Promise.resolve(S);
2510
- });
2511
- return I.catch((P) => P), I;
2512
- }, d = function(s, u, m) {
2513
- let h = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : {};
2514
- const S = Rt([s], u, m, A({
2515
- validateMessages: Ie
2516
- }, h), !!h.validateFirst);
2517
- return i[s] ? (i[s].validateStatus = "validating", S.catch((O) => O).then(function() {
2518
- let O = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : [];
2519
- var I;
2520
- if (i[s].validateStatus === "validating") {
2521
- const P = O.filter((N) => N && N.errors.length);
2522
- i[s].validateStatus = P.length ? "error" : "success", i[s].help = P.length ? P.map((N) => N.errors) : null, (I = n?.onValidate) === null || I === void 0 || I.call(n, s, !P.length, P.length ? He(i[s].help[0]) : null);
2523
- }
2524
- }), S) : S.catch((O) => O);
2525
- }, y = (s, u) => {
2526
- let m = [], h = !0;
2527
- s ? Array.isArray(s) ? m = s : m = [s] : (h = !1, m = a.value);
2528
- const S = v(m, u || {}, h);
2529
- return S.catch((O) => O), S;
2530
- }, p = (s) => {
2531
- let u = [];
2532
- s ? Array.isArray(s) ? u = s : u = [s] : u = a.value, u.forEach((m) => {
2533
- i[m] && A(i[m], {
2534
- validateStatus: "",
2535
- help: null
2536
- });
2537
- });
2538
- }, b = (s) => {
2539
- const u = {
2540
- autoLink: !1
2541
- }, m = [], h = Array.isArray(s) ? s : [s];
2542
- for (let S = 0; S < h.length; S++) {
2543
- const O = h[S];
2544
- O?.validateStatus === "error" && (u.validateStatus = "error", O.help && m.push(O.help)), u.required = u.required || O?.required;
2545
- }
2546
- return u.help = m, u;
2547
- };
2548
- let $ = r, f = !0;
2549
- const x = (s) => {
2550
- const u = [];
2551
- a.value.forEach((m) => {
2552
- const h = Le(s, m, !1), S = Le($, m, !1);
2553
- (f && n?.immediate && h.isValid || !Ot(h.v, S.v)) && u.push(m);
2554
- }), y(u, {
2555
- trigger: "change"
2556
- }), f = !1, $ = Ee(He(s));
2557
- }, g = n?.debounce;
2558
- let F = !0;
2559
- return se(t, () => {
2560
- a.value = t ? Object.keys(ae(t)) : [], !F && n && n.validateOnRuleChange && y(), F = !1;
2561
- }, {
2562
- deep: !0,
2563
- immediate: !0
2564
- }), se(a, () => {
2565
- const s = {};
2566
- a.value.forEach((u) => {
2567
- s[u] = A({}, i[u], {
2568
- autoLink: !1,
2569
- required: bt(ae(t)[u])
2570
- }), delete i[u];
2571
- });
2572
- for (const u in i)
2573
- Object.prototype.hasOwnProperty.call(i, u) && delete i[u];
2574
- A(i, s);
2575
- }, {
2576
- immediate: !0
2577
- }), se(e, g && g.wait ? Vn(x, g.wait, hn(g, ["wait"])) : x, {
2578
- immediate: n && !!n.immediate,
2579
- deep: !0
2580
- }), {
2581
- modelRef: e,
2582
- rulesRef: t,
2583
- initialModel: r,
2584
- validateInfos: i,
2585
- resetFields: l,
2586
- validate: y,
2587
- validateField: d,
2588
- mergeValidateInfo: b,
2589
- clearValidate: p
2590
- };
2591
- }
2592
- const ci = () => ({
2593
- layout: me.oneOf(Ze("horizontal", "inline", "vertical")),
2594
- labelCol: Fe(),
2595
- wrapperCol: Fe(),
2596
- colon: ve(),
2597
- labelAlign: ot(),
2598
- labelWrap: ve(),
2599
- prefixCls: String,
2600
- requiredMark: ye([String, Boolean]),
2601
- /** @deprecated Will warning in future branch. Pls use `requiredMark` instead. */
2602
- hideRequiredMark: ve(),
2603
- model: me.object,
2604
- rules: Fe(),
2605
- validateMessages: Fe(),
2606
- validateOnRuleChange: ve(),
2607
- // 提交失败自动滚动到第一个错误字段
2608
- scrollToFirstError: vn(),
2609
- onSubmit: ce(),
2610
- name: String,
2611
- validateTrigger: ye([String, Array]),
2612
- size: ot(),
2613
- disabled: ve(),
2614
- onValuesChange: ce(),
2615
- onFieldsChange: ce(),
2616
- onFinish: ce(),
2617
- onFinishFailed: ce(),
2618
- onValidate: ce()
2619
- });
2620
- function fi(e, t) {
2621
- return Ot(ie(e), ie(t));
2622
- }
2623
- const le = ge({
2624
- compatConfig: {
2625
- MODE: 3
2626
- },
2627
- name: "AForm",
2628
- inheritAttrs: !1,
2629
- props: pn(ci(), {
2630
- layout: "horizontal",
2631
- hideRequiredMark: !1,
2632
- colon: !0
2633
- }),
2634
- Item: si,
2635
- useForm: ui,
2636
- // emits: ['finishFailed', 'submit', 'finish', 'validate'],
2637
- setup(e, t) {
2638
- let {
2639
- emit: n,
2640
- slots: r,
2641
- expose: i,
2642
- attrs: a
2643
- } = t;
2644
- const {
2645
- prefixCls: l,
2646
- direction: o,
2647
- form: c,
2648
- size: v,
2649
- disabled: d
2650
- } = je("form", e), y = E(() => e.requiredMark === "" || e.requiredMark), p = E(() => {
2651
- var C;
2652
- return y.value !== void 0 ? y.value : c && ((C = c.value) === null || C === void 0 ? void 0 : C.requiredMark) !== void 0 ? c.value.requiredMark : !e.hideRequiredMark;
2653
- });
2654
- yn(v), bn(d);
2655
- const b = E(() => {
2656
- var C, j;
2657
- return (C = e.colon) !== null && C !== void 0 ? C : (j = c.value) === null || j === void 0 ? void 0 : j.colon;
2658
- }), {
2659
- validateMessages: $
2660
- } = xn(), f = E(() => A(A(A({}, Ie), $.value), e.validateMessages)), [x, g] = it(l), F = E(() => ue(l.value, {
2661
- [`${l.value}-${e.layout}`]: !0,
2662
- [`${l.value}-hide-required-mark`]: p.value === !1,
2663
- [`${l.value}-rtl`]: o.value === "rtl",
2664
- [`${l.value}-${v.value}`]: v.value
2665
- }, g.value)), s = xe(), u = {}, m = (C, j) => {
2666
- u[C] = j;
2667
- }, h = (C) => {
2668
- delete u[C];
2669
- }, S = (C) => {
2670
- const j = !!C, L = j ? ie(C).map(Ke) : [];
2671
- return j ? Object.values(u).filter((B) => L.findIndex((k) => fi(k, B.fieldName.value)) > -1) : Object.values(u);
2672
- }, O = (C) => {
2673
- if (!e.model) {
2674
- Pe(!1, "Form", "model is required for resetFields to work.");
2675
- return;
2676
- }
2677
- S(C).forEach((j) => {
2678
- j.resetField();
2679
- });
2680
- }, I = (C) => {
2681
- S(C).forEach((j) => {
2682
- j.clearValidate();
2683
- });
2684
- }, P = (C) => {
2685
- const {
2686
- scrollToFirstError: j
2687
- } = e;
2688
- if (n("finishFailed", C), j && C.errorFields.length) {
2689
- let L = {};
2690
- typeof j == "object" && (L = j), T(C.errorFields[0].name, L);
2691
- }
2692
- }, N = function() {
2693
- return K(...arguments);
2694
- }, T = function(C) {
2695
- let j = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
2696
- const L = S(C ? [C] : void 0);
2697
- if (L.length) {
2698
- const B = L[0].fieldId.value, k = B ? document.getElementById(B) : null;
2699
- k && Dn(k, A({
2700
- scrollMode: "if-needed",
2701
- block: "nearest"
2702
- }, j));
2703
- }
2704
- }, q = function() {
2705
- let C = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : !0;
2706
- if (C === !0) {
2707
- const j = [];
2708
- return Object.values(u).forEach((L) => {
2709
- let {
2710
- namePath: B
2711
- } = L;
2712
- j.push(B.value);
2713
- }), pt(e.model, j);
2714
- } else
2715
- return pt(e.model, C);
2716
- }, G = (C, j) => {
2717
- if (Pe(!(C instanceof Function), "Form", "validateFields/validateField/validate not support callback, please use promise instead"), !e.model)
2718
- return Pe(!1, "Form", "model is required for validateFields to work."), Promise.reject("Form `model` is required for validateFields to work.");
2719
- const L = !!C, B = L ? ie(C).map(Ke) : [], k = [];
2720
- Object.values(u).forEach((Y) => {
2721
- var w;
2722
- if (L || B.push(Y.namePath.value), !(!((w = Y.rules) === null || w === void 0) && w.value.length))
2723
- return;
2724
- const M = Y.namePath.value;
2725
- if (!L || Tr(B, M)) {
2726
- const _ = Y.validateRules(A({
2727
- validateMessages: f.value
2728
- }, j));
2729
- k.push(_.then(() => ({
2730
- name: M,
2731
- errors: [],
2732
- warnings: []
2733
- })).catch((W) => {
2734
- const D = [], U = [];
2735
- return W.forEach((te) => {
2736
- let {
2737
- rule: {
2738
- warningOnly: ne
2739
- },
2740
- errors: he
2741
- } = te;
2742
- ne ? U.push(...he) : D.push(...he);
2743
- }), D.length ? Promise.reject({
2744
- name: M,
2745
- errors: D,
2746
- warnings: U
2747
- }) : {
2748
- name: M,
2749
- errors: D,
2750
- warnings: U
2751
- };
2752
- }));
2753
- }
2754
- });
2755
- const Q = Dt(k);
2756
- s.value = Q;
2757
- const re = Q.then(() => s.value === Q ? Promise.resolve(q(B)) : Promise.reject([])).catch((Y) => {
2758
- const w = Y.filter((M) => M && M.errors.length);
2759
- return Promise.reject({
2760
- values: q(B),
2761
- errorFields: w,
2762
- outOfDate: s.value !== Q
2763
- });
2764
- });
2765
- return re.catch((Y) => Y), re;
2766
- }, K = function() {
2767
- return G(...arguments);
2768
- }, X = (C) => {
2769
- C.preventDefault(), C.stopPropagation(), n("submit", C), e.model && G().then((L) => {
2770
- n("finish", L);
2771
- }).catch((L) => {
2772
- P(L);
2773
- });
2774
- };
2775
- return i({
2776
- resetFields: O,
2777
- clearValidate: I,
2778
- validateFields: G,
2779
- getFieldsValue: q,
2780
- validate: N,
2781
- scrollToField: T
2782
- }), Lt({
2783
- model: E(() => e.model),
2784
- name: E(() => e.name),
2785
- labelAlign: E(() => e.labelAlign),
2786
- labelCol: E(() => e.labelCol),
2787
- labelWrap: E(() => e.labelWrap),
2788
- wrapperCol: E(() => e.wrapperCol),
2789
- vertical: E(() => e.layout === "vertical"),
2790
- colon: b,
2791
- requiredMark: p,
2792
- validateTrigger: E(() => e.validateTrigger),
2793
- rules: E(() => e.rules),
2794
- addField: m,
2795
- removeField: h,
2796
- onValidate: (C, j, L) => {
2797
- n("validate", C, j, L);
2798
- },
2799
- validateMessages: f
2800
- }), se(() => e.rules, () => {
2801
- e.validateOnRuleChange && G();
2802
- }), () => {
2803
- var C;
2804
- return x(R("form", H(H({}, a), {}, {
2805
- onSubmit: X,
2806
- class: [F.value, a.class]
2807
- }), [(C = r.default) === null || C === void 0 ? void 0 : C.call(r)]));
2808
- };
2809
- }
2810
- });
2811
- le.useInjectFormItemContext = $n;
2812
- le.ItemRest = We;
2813
- le.install = function(e) {
2814
- return e.component(le.name, le), e.component(le.Item.name, le.Item), e.component(We.name, We), e;
2815
- };
2816
- export {
2817
- er as A,
2818
- Wt as C,
2819
- le as F,
2820
- si as _,
2821
- jn as a,
2822
- Bn as b,
2823
- ci as c,
2824
- Vn as d,
2825
- ai as f,
2826
- Gn as u
2827
- };