primevue 3.50.0 → 3.51.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (488) hide show
  1. package/accordion/Accordion.d.ts +2 -2
  2. package/accordion/Accordion.vue +5 -5
  3. package/accordion/accordion.cjs.js +5 -5
  4. package/accordion/accordion.cjs.min.js +1 -1
  5. package/accordion/accordion.esm.js +5 -5
  6. package/accordion/accordion.esm.min.js +1 -1
  7. package/accordion/accordion.js +5 -5
  8. package/accordion/accordion.min.js +1 -1
  9. package/accordiontab/AccordionTab.d.ts +2 -2
  10. package/autocomplete/AutoComplete.d.ts +2 -2
  11. package/autocomplete/AutoComplete.vue +11 -4
  12. package/autocomplete/autocomplete.cjs.js +34 -25
  13. package/autocomplete/autocomplete.cjs.min.js +1 -1
  14. package/autocomplete/autocomplete.esm.js +34 -25
  15. package/autocomplete/autocomplete.esm.min.js +1 -1
  16. package/autocomplete/autocomplete.js +34 -25
  17. package/autocomplete/autocomplete.min.js +1 -1
  18. package/avatar/Avatar.d.ts +2 -2
  19. package/avatargroup/AvatarGroup.d.ts +2 -2
  20. package/badge/Badge.d.ts +2 -2
  21. package/blockui/BlockUI.d.ts +2 -2
  22. package/breadcrumb/Breadcrumb.d.ts +2 -2
  23. package/button/Button.d.ts +2 -2
  24. package/buttongroup/ButtonGroup.d.ts +2 -2
  25. package/calendar/Calendar.d.ts +6 -5
  26. package/calendar/Calendar.vue +5 -7
  27. package/calendar/calendar.cjs.js +5 -6
  28. package/calendar/calendar.cjs.min.js +1 -1
  29. package/calendar/calendar.esm.js +6 -7
  30. package/calendar/calendar.esm.min.js +1 -1
  31. package/calendar/calendar.js +5 -6
  32. package/calendar/calendar.min.js +1 -1
  33. package/card/Card.d.ts +2 -2
  34. package/carousel/Carousel.d.ts +6 -2
  35. package/carousel/Carousel.vue +62 -52
  36. package/carousel/carousel.cjs.js +65 -49
  37. package/carousel/carousel.cjs.min.js +1 -1
  38. package/carousel/carousel.esm.js +66 -50
  39. package/carousel/carousel.esm.min.js +1 -1
  40. package/carousel/carousel.js +65 -49
  41. package/carousel/carousel.min.js +1 -1
  42. package/cascadeselect/CascadeSelect.d.ts +2 -2
  43. package/cascadeselect/CascadeSelect.vue +5 -3
  44. package/cascadeselect/cascadeselect.cjs.js +5 -3
  45. package/cascadeselect/cascadeselect.cjs.min.js +1 -1
  46. package/cascadeselect/cascadeselect.esm.js +5 -3
  47. package/cascadeselect/cascadeselect.esm.min.js +1 -1
  48. package/cascadeselect/cascadeselect.js +5 -3
  49. package/cascadeselect/cascadeselect.min.js +1 -1
  50. package/chart/Chart.d.ts +2 -2
  51. package/checkbox/Checkbox.d.ts +2 -2
  52. package/chip/Chip.d.ts +2 -2
  53. package/chips/Chips.d.ts +2 -2
  54. package/chips/Chips.vue +5 -5
  55. package/chips/chips.cjs.js +5 -5
  56. package/chips/chips.cjs.min.js +1 -1
  57. package/chips/chips.esm.js +5 -5
  58. package/chips/chips.esm.min.js +1 -1
  59. package/chips/chips.js +5 -5
  60. package/chips/chips.min.js +1 -1
  61. package/colorpicker/ColorPicker.d.ts +2 -2
  62. package/column/Column.d.ts +2 -2
  63. package/columngroup/ColumnGroup.d.ts +2 -2
  64. package/confirmdialog/ConfirmDialog.d.ts +2 -2
  65. package/confirmpopup/ConfirmPopup.d.ts +2 -2
  66. package/contextmenu/ContextMenu.d.ts +2 -2
  67. package/contextmenu/ContextMenu.vue +9 -5
  68. package/contextmenu/contextmenu.cjs.js +9 -4
  69. package/contextmenu/contextmenu.cjs.min.js +1 -1
  70. package/contextmenu/contextmenu.esm.js +9 -4
  71. package/contextmenu/contextmenu.esm.min.js +1 -1
  72. package/contextmenu/contextmenu.js +9 -4
  73. package/contextmenu/contextmenu.min.js +1 -1
  74. package/core/core.js +43 -22
  75. package/core/core.min.js +7 -7
  76. package/datatable/ColumnFilter.vue +5 -4
  77. package/datatable/DataTable.d.ts +4 -4
  78. package/datatable/DataTable.vue +1 -0
  79. package/datatable/TableHeader.vue +5 -0
  80. package/datatable/datatable.cjs.js +13 -5
  81. package/datatable/datatable.cjs.min.js +1 -1
  82. package/datatable/datatable.esm.js +13 -5
  83. package/datatable/datatable.esm.min.js +1 -1
  84. package/datatable/datatable.js +13 -5
  85. package/datatable/datatable.min.js +1 -1
  86. package/dataview/DataView.d.ts +2 -2
  87. package/dataviewlayoutoptions/DataViewLayoutOptions.d.ts +2 -2
  88. package/deferredcontent/DeferredContent.d.ts +2 -2
  89. package/dialog/Dialog.d.ts +2 -2
  90. package/dialog/Dialog.vue +5 -4
  91. package/dialog/dialog.cjs.js +5 -3
  92. package/dialog/dialog.cjs.min.js +1 -1
  93. package/dialog/dialog.esm.js +5 -3
  94. package/dialog/dialog.esm.min.js +1 -1
  95. package/dialog/dialog.js +5 -3
  96. package/dialog/dialog.min.js +1 -1
  97. package/divider/Divider.d.ts +2 -2
  98. package/dock/Dock.d.ts +2 -2
  99. package/dock/DockSub.vue +5 -5
  100. package/dock/dock.cjs.js +5 -5
  101. package/dock/dock.cjs.min.js +1 -1
  102. package/dock/dock.esm.js +5 -5
  103. package/dock/dock.esm.min.js +1 -1
  104. package/dock/dock.js +5 -5
  105. package/dock/dock.min.js +1 -1
  106. package/dropdown/Dropdown.d.ts +11 -3
  107. package/dropdown/Dropdown.vue +7 -3
  108. package/dropdown/dropdown.cjs.js +7 -3
  109. package/dropdown/dropdown.cjs.min.js +1 -1
  110. package/dropdown/dropdown.esm.js +7 -3
  111. package/dropdown/dropdown.esm.min.js +1 -1
  112. package/dropdown/dropdown.js +7 -3
  113. package/dropdown/dropdown.min.js +1 -1
  114. package/dropdown/style/dropdownstyle.cjs.js +2 -1
  115. package/dropdown/style/dropdownstyle.cjs.min.js +1 -1
  116. package/dropdown/style/dropdownstyle.esm.js +2 -1
  117. package/dropdown/style/dropdownstyle.esm.min.js +1 -1
  118. package/dropdown/style/dropdownstyle.js +2 -1
  119. package/dropdown/style/dropdownstyle.min.js +1 -1
  120. package/dynamicdialog/DynamicDialog.d.ts +2 -2
  121. package/editor/Editor.d.ts +2 -2
  122. package/fieldset/Fieldset.d.ts +2 -2
  123. package/fieldset/Fieldset.vue +5 -5
  124. package/fieldset/fieldset.cjs.js +5 -5
  125. package/fieldset/fieldset.cjs.min.js +1 -1
  126. package/fieldset/fieldset.esm.js +5 -5
  127. package/fieldset/fieldset.esm.min.js +1 -1
  128. package/fieldset/fieldset.js +5 -5
  129. package/fieldset/fieldset.min.js +1 -1
  130. package/fileupload/FileUpload.d.ts +2 -2
  131. package/fileupload/FileUpload.vue +1 -1
  132. package/fileupload/fileupload.cjs.js +10 -10
  133. package/fileupload/fileupload.cjs.min.js +1 -1
  134. package/fileupload/fileupload.esm.js +10 -10
  135. package/fileupload/fileupload.esm.min.js +1 -1
  136. package/fileupload/fileupload.js +10 -10
  137. package/fileupload/fileupload.min.js +1 -1
  138. package/floatlabel/FloatLabel.d.ts +2 -2
  139. package/galleria/Galleria.d.ts +2 -2
  140. package/galleria/GalleriaContent.vue +6 -6
  141. package/galleria/galleria.cjs.js +6 -6
  142. package/galleria/galleria.cjs.min.js +1 -1
  143. package/galleria/galleria.esm.js +6 -6
  144. package/galleria/galleria.esm.min.js +1 -1
  145. package/galleria/galleria.js +6 -6
  146. package/galleria/galleria.min.js +1 -1
  147. package/iconfield/IconField.d.ts +2 -2
  148. package/icons/angledoubledown/index.d.ts +2 -2
  149. package/icons/angledoubleleft/index.d.ts +2 -2
  150. package/icons/angledoubleright/index.d.ts +2 -2
  151. package/icons/angledoubleup/index.d.ts +2 -2
  152. package/icons/angledown/index.d.ts +2 -2
  153. package/icons/angleleft/index.d.ts +2 -2
  154. package/icons/angleright/index.d.ts +2 -2
  155. package/icons/angleup/index.d.ts +2 -2
  156. package/icons/arrowdown/index.d.ts +2 -2
  157. package/icons/arrowup/index.d.ts +2 -2
  158. package/icons/ban/index.d.ts +2 -2
  159. package/icons/bars/index.d.ts +2 -2
  160. package/icons/blank/index.d.ts +2 -2
  161. package/icons/calendar/index.d.ts +2 -2
  162. package/icons/check/index.d.ts +2 -2
  163. package/icons/chevrondown/index.d.ts +2 -2
  164. package/icons/chevronleft/index.d.ts +2 -2
  165. package/icons/chevronright/index.d.ts +2 -2
  166. package/icons/chevronup/index.d.ts +2 -2
  167. package/icons/exclamationtriangle/index.d.ts +2 -2
  168. package/icons/eye/index.d.ts +2 -2
  169. package/icons/eyeslash/index.d.ts +2 -2
  170. package/icons/filter/index.d.ts +2 -2
  171. package/icons/filterslash/index.d.ts +2 -2
  172. package/icons/infocircle/index.d.ts +2 -2
  173. package/icons/minus/index.d.ts +2 -2
  174. package/icons/pencil/index.d.ts +2 -2
  175. package/icons/plus/index.d.ts +2 -2
  176. package/icons/refresh/index.d.ts +2 -2
  177. package/icons/search/index.d.ts +2 -2
  178. package/icons/searchminus/index.d.ts +2 -2
  179. package/icons/searchplus/index.d.ts +2 -2
  180. package/icons/sortalt/index.d.ts +2 -2
  181. package/icons/sortamountdown/index.d.ts +2 -2
  182. package/icons/sortamountupalt/index.d.ts +2 -2
  183. package/icons/spinner/index.d.ts +2 -2
  184. package/icons/star/index.d.ts +2 -2
  185. package/icons/starfill/index.d.ts +2 -2
  186. package/icons/thlarge/index.d.ts +2 -2
  187. package/icons/times/index.d.ts +2 -2
  188. package/icons/timescircle/index.d.ts +2 -2
  189. package/icons/trash/index.d.ts +2 -2
  190. package/icons/undo/index.d.ts +2 -2
  191. package/icons/upload/index.d.ts +2 -2
  192. package/icons/windowmaximize/index.d.ts +2 -2
  193. package/icons/windowminimize/index.d.ts +2 -2
  194. package/image/Image.d.ts +2 -2
  195. package/inlinemessage/InlineMessage.d.ts +2 -2
  196. package/inplace/Inplace.d.ts +2 -2
  197. package/inputgroup/InputGroup.d.ts +2 -2
  198. package/inputgroupaddon/InputGroupAddon.d.ts +2 -2
  199. package/inputicon/InputIcon.d.ts +2 -2
  200. package/inputmask/InputMask.d.ts +2 -2
  201. package/inputnumber/InputNumber.d.ts +2 -2
  202. package/inputnumber/InputNumber.vue +1 -1
  203. package/inputnumber/inputnumber.cjs.js +1 -1
  204. package/inputnumber/inputnumber.cjs.min.js +1 -1
  205. package/inputnumber/inputnumber.esm.js +1 -1
  206. package/inputnumber/inputnumber.esm.min.js +1 -1
  207. package/inputnumber/inputnumber.js +1 -1
  208. package/inputnumber/inputnumber.min.js +1 -1
  209. package/inputotp/InputOtp.d.ts +2 -2
  210. package/inputotp/InputOtp.vue +1 -1
  211. package/inputotp/inputotp.cjs.js +1 -1
  212. package/inputotp/inputotp.cjs.min.js +1 -1
  213. package/inputotp/inputotp.esm.js +1 -1
  214. package/inputotp/inputotp.esm.min.js +1 -1
  215. package/inputotp/inputotp.js +1 -1
  216. package/inputotp/inputotp.min.js +1 -1
  217. package/inputswitch/InputSwitch.d.ts +2 -2
  218. package/inputtext/InputText.d.ts +2 -2
  219. package/knob/Knob.d.ts +2 -2
  220. package/listbox/Listbox.d.ts +2 -2
  221. package/listbox/Listbox.vue +5 -3
  222. package/listbox/listbox.cjs.js +5 -3
  223. package/listbox/listbox.cjs.min.js +1 -1
  224. package/listbox/listbox.esm.js +5 -3
  225. package/listbox/listbox.esm.min.js +1 -1
  226. package/listbox/listbox.js +5 -3
  227. package/listbox/listbox.min.js +1 -1
  228. package/megamenu/MegaMenu.d.ts +2 -2
  229. package/megamenu/MegaMenu.vue +9 -4
  230. package/megamenu/megamenu.cjs.js +9 -4
  231. package/megamenu/megamenu.cjs.min.js +1 -1
  232. package/megamenu/megamenu.esm.js +9 -4
  233. package/megamenu/megamenu.esm.min.js +1 -1
  234. package/megamenu/megamenu.js +9 -4
  235. package/megamenu/megamenu.min.js +1 -1
  236. package/menu/Menu.d.ts +2 -2
  237. package/menu/Menu.vue +5 -4
  238. package/menu/menu.cjs.js +5 -3
  239. package/menu/menu.cjs.min.js +1 -1
  240. package/menu/menu.esm.js +5 -3
  241. package/menu/menu.esm.min.js +1 -1
  242. package/menu/menu.js +5 -3
  243. package/menu/menu.min.js +1 -1
  244. package/menubar/Menubar.d.ts +2 -2
  245. package/menubar/Menubar.vue +9 -4
  246. package/menubar/menubar.cjs.js +9 -4
  247. package/menubar/menubar.cjs.min.js +1 -1
  248. package/menubar/menubar.esm.js +9 -4
  249. package/menubar/menubar.esm.min.js +1 -1
  250. package/menubar/menubar.js +9 -4
  251. package/menubar/menubar.min.js +1 -1
  252. package/message/Message.d.ts +2 -2
  253. package/metergroup/MeterGroup.d.ts +2 -2
  254. package/multiselect/MultiSelect.d.ts +2 -2
  255. package/multiselect/MultiSelect.vue +7 -5
  256. package/multiselect/multiselect.cjs.js +7 -5
  257. package/multiselect/multiselect.cjs.min.js +1 -1
  258. package/multiselect/multiselect.esm.js +7 -5
  259. package/multiselect/multiselect.esm.min.js +1 -1
  260. package/multiselect/multiselect.js +7 -5
  261. package/multiselect/multiselect.min.js +1 -1
  262. package/orderlist/OrderList.d.ts +2 -2
  263. package/orderlist/OrderList.vue +5 -4
  264. package/orderlist/orderlist.cjs.js +5 -3
  265. package/orderlist/orderlist.cjs.min.js +1 -1
  266. package/orderlist/orderlist.esm.js +5 -3
  267. package/orderlist/orderlist.esm.min.js +1 -1
  268. package/orderlist/orderlist.js +5 -3
  269. package/orderlist/orderlist.min.js +1 -1
  270. package/organizationchart/OrganizationChart.d.ts +2 -2
  271. package/overlaypanel/OverlayPanel.d.ts +2 -2
  272. package/package.json +1 -1
  273. package/paginator/Paginator.d.ts +2 -2
  274. package/panel/Panel.d.ts +2 -2
  275. package/panel/Panel.vue +5 -5
  276. package/panel/panel.cjs.js +5 -5
  277. package/panel/panel.cjs.min.js +1 -1
  278. package/panel/panel.esm.js +5 -5
  279. package/panel/panel.esm.min.js +1 -1
  280. package/panel/panel.js +5 -5
  281. package/panel/panel.min.js +1 -1
  282. package/panelmenu/PanelMenu.d.ts +2 -2
  283. package/panelmenu/PanelMenu.vue +5 -5
  284. package/panelmenu/panelmenu.cjs.js +5 -5
  285. package/panelmenu/panelmenu.cjs.min.js +1 -1
  286. package/panelmenu/panelmenu.esm.js +5 -5
  287. package/panelmenu/panelmenu.esm.min.js +1 -1
  288. package/panelmenu/panelmenu.js +5 -5
  289. package/panelmenu/panelmenu.min.js +1 -1
  290. package/password/Password.d.ts +2 -2
  291. package/password/Password.vue +5 -3
  292. package/password/password.cjs.js +5 -3
  293. package/password/password.cjs.min.js +1 -1
  294. package/password/password.esm.js +5 -3
  295. package/password/password.esm.min.js +1 -1
  296. package/password/password.js +5 -3
  297. package/password/password.min.js +1 -1
  298. package/picklist/PickList.d.ts +2 -2
  299. package/picklist/PickList.vue +5 -4
  300. package/picklist/picklist.cjs.js +5 -3
  301. package/picklist/picklist.cjs.min.js +1 -1
  302. package/picklist/picklist.esm.js +5 -3
  303. package/picklist/picklist.esm.min.js +1 -1
  304. package/picklist/picklist.js +5 -3
  305. package/picklist/picklist.min.js +1 -1
  306. package/portal/Portal.d.ts +2 -2
  307. package/progressbar/ProgressBar.d.ts +2 -2
  308. package/progressspinner/ProgressSpinner.d.ts +2 -2
  309. package/radiobutton/RadioButton.d.ts +2 -2
  310. package/rating/Rating.d.ts +2 -2
  311. package/rating/Rating.vue +5 -5
  312. package/rating/rating.cjs.js +5 -5
  313. package/rating/rating.cjs.min.js +1 -1
  314. package/rating/rating.esm.js +5 -5
  315. package/rating/rating.esm.min.js +1 -1
  316. package/rating/rating.js +5 -5
  317. package/rating/rating.min.js +1 -1
  318. package/resources/themes/arya-blue/theme.css +1 -0
  319. package/resources/themes/arya-green/theme.css +1 -0
  320. package/resources/themes/arya-orange/theme.css +1 -0
  321. package/resources/themes/arya-purple/theme.css +1 -0
  322. package/resources/themes/aura-dark-amber/theme.css +1 -0
  323. package/resources/themes/aura-dark-blue/theme.css +1 -0
  324. package/resources/themes/aura-dark-cyan/theme.css +1 -0
  325. package/resources/themes/aura-dark-green/theme.css +1 -0
  326. package/resources/themes/aura-dark-indigo/theme.css +1 -0
  327. package/resources/themes/aura-dark-lime/theme.css +1 -0
  328. package/resources/themes/aura-dark-noir/theme.css +1 -0
  329. package/resources/themes/aura-dark-pink/theme.css +1 -0
  330. package/resources/themes/aura-dark-purple/theme.css +1 -0
  331. package/resources/themes/aura-dark-teal/theme.css +1 -0
  332. package/resources/themes/aura-light-amber/theme.css +7 -1
  333. package/resources/themes/aura-light-blue/theme.css +7 -1
  334. package/resources/themes/aura-light-cyan/theme.css +7 -1
  335. package/resources/themes/aura-light-green/theme.css +7 -1
  336. package/resources/themes/aura-light-indigo/theme.css +7 -1
  337. package/resources/themes/aura-light-lime/theme.css +7 -1
  338. package/resources/themes/aura-light-noir/theme.css +7 -1
  339. package/resources/themes/aura-light-pink/theme.css +7 -1
  340. package/resources/themes/aura-light-purple/theme.css +7 -1
  341. package/resources/themes/aura-light-teal/theme.css +7 -1
  342. package/resources/themes/bootstrap4-dark-blue/theme.css +1 -0
  343. package/resources/themes/bootstrap4-dark-purple/theme.css +1 -0
  344. package/resources/themes/bootstrap4-light-blue/theme.css +1 -0
  345. package/resources/themes/bootstrap4-light-purple/theme.css +1 -0
  346. package/resources/themes/fluent-light/theme.css +1 -0
  347. package/resources/themes/lara-dark-amber/theme.css +1 -0
  348. package/resources/themes/lara-dark-blue/theme.css +1 -0
  349. package/resources/themes/lara-dark-cyan/theme.css +1 -0
  350. package/resources/themes/lara-dark-green/theme.css +1 -0
  351. package/resources/themes/lara-dark-indigo/theme.css +1 -0
  352. package/resources/themes/lara-dark-pink/theme.css +1 -0
  353. package/resources/themes/lara-dark-purple/theme.css +1 -0
  354. package/resources/themes/lara-dark-teal/theme.css +1 -0
  355. package/resources/themes/lara-light-amber/theme.css +1 -0
  356. package/resources/themes/lara-light-blue/theme.css +1 -0
  357. package/resources/themes/lara-light-cyan/theme.css +1 -0
  358. package/resources/themes/lara-light-green/theme.css +1 -0
  359. package/resources/themes/lara-light-indigo/theme.css +1 -0
  360. package/resources/themes/lara-light-pink/theme.css +1 -0
  361. package/resources/themes/lara-light-purple/theme.css +1 -0
  362. package/resources/themes/lara-light-teal/theme.css +1 -0
  363. package/resources/themes/luna-amber/theme.css +1 -0
  364. package/resources/themes/luna-blue/theme.css +1 -0
  365. package/resources/themes/luna-green/theme.css +1 -0
  366. package/resources/themes/luna-pink/theme.css +1 -0
  367. package/resources/themes/md-dark-deeppurple/theme.css +1 -0
  368. package/resources/themes/md-dark-indigo/theme.css +1 -0
  369. package/resources/themes/md-light-deeppurple/theme.css +1 -0
  370. package/resources/themes/md-light-indigo/theme.css +1 -0
  371. package/resources/themes/mdc-dark-deeppurple/theme.css +1 -0
  372. package/resources/themes/mdc-dark-indigo/theme.css +1 -0
  373. package/resources/themes/mdc-light-deeppurple/theme.css +1 -0
  374. package/resources/themes/mdc-light-indigo/theme.css +1 -0
  375. package/resources/themes/mira/theme.css +1 -0
  376. package/resources/themes/nano/theme.css +1 -0
  377. package/resources/themes/nova/theme.css +1 -0
  378. package/resources/themes/nova-accent/theme.css +1 -0
  379. package/resources/themes/nova-alt/theme.css +1 -0
  380. package/resources/themes/nova-vue/theme.css +1 -0
  381. package/resources/themes/rhea/theme.css +1 -0
  382. package/resources/themes/saga-blue/theme.css +1 -0
  383. package/resources/themes/saga-green/theme.css +1 -0
  384. package/resources/themes/saga-orange/theme.css +1 -0
  385. package/resources/themes/saga-purple/theme.css +1 -0
  386. package/resources/themes/soho-dark/theme.css +1 -0
  387. package/resources/themes/soho-light/theme.css +1 -0
  388. package/resources/themes/tailwind-light/theme.css +1 -0
  389. package/resources/themes/vela-blue/theme.css +1 -0
  390. package/resources/themes/vela-green/theme.css +1 -0
  391. package/resources/themes/vela-orange/theme.css +1 -0
  392. package/resources/themes/vela-purple/theme.css +1 -0
  393. package/resources/themes/viva-dark/theme.css +1 -0
  394. package/resources/themes/viva-light/theme.css +1 -0
  395. package/row/Row.d.ts +2 -2
  396. package/scrollpanel/ScrollPanel.d.ts +2 -2
  397. package/scrollpanel/ScrollPanel.vue +5 -4
  398. package/scrollpanel/scrollpanel.cjs.js +5 -3
  399. package/scrollpanel/scrollpanel.cjs.min.js +1 -1
  400. package/scrollpanel/scrollpanel.esm.js +5 -3
  401. package/scrollpanel/scrollpanel.esm.min.js +1 -1
  402. package/scrollpanel/scrollpanel.js +5 -3
  403. package/scrollpanel/scrollpanel.min.js +1 -1
  404. package/scrolltop/ScrollTop.d.ts +2 -2
  405. package/selectbutton/SelectButton.d.ts +2 -2
  406. package/sidebar/Sidebar.d.ts +2 -2
  407. package/skeleton/Skeleton.d.ts +2 -2
  408. package/slider/Slider.d.ts +2 -2
  409. package/slider/Slider.vue +7 -6
  410. package/slider/slider.cjs.js +7 -6
  411. package/slider/slider.cjs.min.js +1 -1
  412. package/slider/slider.esm.js +7 -6
  413. package/slider/slider.esm.min.js +1 -1
  414. package/slider/slider.js +7 -6
  415. package/slider/slider.min.js +1 -1
  416. package/speeddial/SpeedDial.d.ts +2 -2
  417. package/speeddial/SpeedDial.vue +5 -4
  418. package/speeddial/speeddial.cjs.js +5 -3
  419. package/speeddial/speeddial.cjs.min.js +1 -1
  420. package/speeddial/speeddial.esm.js +5 -3
  421. package/speeddial/speeddial.esm.min.js +1 -1
  422. package/speeddial/speeddial.js +5 -3
  423. package/speeddial/speeddial.min.js +1 -1
  424. package/splitbutton/SplitButton.d.ts +2 -2
  425. package/splitbutton/SplitButton.vue +5 -4
  426. package/splitbutton/splitbutton.cjs.js +5 -3
  427. package/splitbutton/splitbutton.cjs.min.js +1 -1
  428. package/splitbutton/splitbutton.esm.js +5 -3
  429. package/splitbutton/splitbutton.esm.min.js +1 -1
  430. package/splitbutton/splitbutton.js +5 -3
  431. package/splitbutton/splitbutton.min.js +1 -1
  432. package/splitter/Splitter.d.ts +2 -2
  433. package/splitterpanel/SplitterPanel.d.ts +2 -2
  434. package/stepper/Stepper.d.ts +2 -2
  435. package/stepper/Stepper.vue +6 -8
  436. package/stepper/stepper.cjs.js +12 -16
  437. package/stepper/stepper.cjs.min.js +1 -1
  438. package/stepper/stepper.esm.js +13 -17
  439. package/stepper/stepper.esm.min.js +1 -1
  440. package/stepper/stepper.js +12 -16
  441. package/stepper/stepper.min.js +1 -1
  442. package/stepperpanel/StepperPanel.d.ts +3 -3
  443. package/steps/Steps.d.ts +2 -2
  444. package/tabmenu/TabMenu.d.ts +2 -2
  445. package/tabpanel/TabPanel.d.ts +2 -2
  446. package/tabview/TabView.d.ts +2 -2
  447. package/tabview/TabView.vue +5 -3
  448. package/tabview/tabview.cjs.js +5 -3
  449. package/tabview/tabview.cjs.min.js +1 -1
  450. package/tabview/tabview.esm.js +5 -3
  451. package/tabview/tabview.esm.min.js +1 -1
  452. package/tabview/tabview.js +5 -3
  453. package/tabview/tabview.min.js +1 -1
  454. package/tag/Tag.d.ts +2 -2
  455. package/terminal/Terminal.d.ts +2 -2
  456. package/textarea/Textarea.d.ts +2 -2
  457. package/tieredmenu/TieredMenu.d.ts +2 -2
  458. package/tieredmenu/TieredMenu.vue +15 -8
  459. package/tieredmenu/tieredmenu.cjs.js +18 -8
  460. package/tieredmenu/tieredmenu.cjs.min.js +1 -1
  461. package/tieredmenu/tieredmenu.esm.js +18 -8
  462. package/tieredmenu/tieredmenu.esm.min.js +1 -1
  463. package/tieredmenu/tieredmenu.js +18 -8
  464. package/tieredmenu/tieredmenu.min.js +1 -1
  465. package/timeline/Timeline.d.ts +2 -2
  466. package/toast/Toast.d.ts +2 -2
  467. package/togglebutton/ToggleButton.d.ts +2 -2
  468. package/toolbar/Toolbar.d.ts +2 -2
  469. package/tree/Tree.d.ts +7 -3
  470. package/tree/TreeNode.vue +2 -1
  471. package/tree/tree.cjs.js +5 -3
  472. package/tree/tree.cjs.min.js +1 -1
  473. package/tree/tree.esm.js +5 -3
  474. package/tree/tree.esm.min.js +1 -1
  475. package/tree/tree.js +5 -3
  476. package/tree/tree.min.js +1 -1
  477. package/treeselect/TreeSelect.d.ts +2 -2
  478. package/treeselect/TreeSelect.vue +5 -3
  479. package/treeselect/treeselect.cjs.js +5 -3
  480. package/treeselect/treeselect.cjs.min.js +1 -1
  481. package/treeselect/treeselect.esm.js +5 -3
  482. package/treeselect/treeselect.esm.min.js +1 -1
  483. package/treeselect/treeselect.js +5 -3
  484. package/treeselect/treeselect.min.js +1 -1
  485. package/treetable/TreeTable.d.ts +2 -2
  486. package/tristatecheckbox/TriStateCheckbox.d.ts +2 -2
  487. package/virtualscroller/VirtualScroller.d.ts +2 -2
  488. package/web-types.json +6 -1
@@ -1 +1 @@
1
- "use strict";var e=require("primevue/button"),t=require("primevue/icons/chevrondown"),i=require("primevue/icons/spinner"),n=require("primevue/icons/timescircle"),o=require("primevue/overlayeventbus"),s=require("primevue/portal"),l=require("primevue/ripple"),r=require("primevue/utils"),a=require("primevue/virtualscroller"),u=require("primevue/autocomplete/style"),c=require("primevue/basecomponent"),d=require("vue");function p(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var h=p(e),f=p(t),y=p(i),m=p(n),v=p(o),b=p(s),O=p(l),g=p(a),x=p(u);function I(e){return I="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},I(e)}function S(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function k(e,t){if(e){if("string"==typeof e)return L(e,t);var i=Object.prototype.toString.call(e).slice(8,-1);return"Object"===i&&e.constructor&&(i=e.constructor.name),"Map"===i||"Set"===i?Array.from(e):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?L(e,t):void 0}}function w(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function C(e){if(Array.isArray(e))return L(e)}function L(e,t){(null==t||t>e.length)&&(t=e.length);for(var i=0,n=new Array(t);i<t;i++)n[i]=e[i];return n}var V={name:"AutoComplete",extends:{name:"BaseAutoComplete",extends:p(c).default,props:{modelValue:null,suggestions:{type:Array,default:null},field:{type:[String,Function],default:null},optionLabel:null,optionDisabled:null,optionGroupLabel:null,optionGroupChildren:null,scrollHeight:{type:String,default:"200px"},dropdown:{type:Boolean,default:!1},dropdownMode:{type:String,default:"blank"},autoHighlight:{type:Boolean,default:!1},multiple:{type:Boolean,default:!1},loading:{type:Boolean,default:!1},variant:{type:String,default:null},invalid:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},placeholder:{type:String,default:null},dataKey:{type:String,default:null},minLength:{type:Number,default:1},delay:{type:Number,default:300},appendTo:{type:[String,Object],default:"body"},forceSelection:{type:Boolean,default:!1},completeOnFocus:{type:Boolean,default:!1},inputId:{type:String,default:null},inputStyle:{type:Object,default:null},inputClass:{type:[String,Object],default:null},inputProps:{type:null,default:null},panelStyle:{type:Object,default:null},panelClass:{type:[String,Object],default:null},panelProps:{type:null,default:null},dropdownIcon:{type:String,default:void 0},dropdownClass:{type:[String,Object],default:null},loadingIcon:{type:String,default:void 0},removeTokenIcon:{type:String,default:void 0},virtualScrollerOptions:{type:Object,default:null},autoOptionFocus:{type:Boolean,default:!1},selectOnFocus:{type:Boolean,default:!1},focusOnHover:{type:Boolean,default:!0},searchLocale:{type:String,default:void 0},searchMessage:{type:String,default:null},selectionMessage:{type:String,default:null},emptySelectionMessage:{type:String,default:null},emptySearchMessage:{type:String,default:null},tabindex:{type:Number,default:0},ariaLabel:{type:String,default:null},ariaLabelledby:{type:String,default:null}},style:x.default,provide:function(){return{$parentInstance:this}}},inheritAttrs:!1,emits:["update:modelValue","change","focus","blur","item-select","item-unselect","dropdown-click","clear","complete","before-show","before-hide","show","hide"],outsideClickListener:null,resizeListener:null,scrollHandler:null,overlay:null,virtualScroller:null,searchTimeout:null,dirty:!1,data:function(){return{id:this.$attrs.id,clicked:!1,focused:!1,focusedOptionIndex:-1,focusedMultipleOptionIndex:-1,overlayVisible:!1,searching:!1}},watch:{"$attrs.id":function(e){this.id=e||r.UniqueComponentId()},suggestions:function(){this.searching&&(this.show(),this.focusedOptionIndex=this.overlayVisible&&this.autoOptionFocus?this.findFirstFocusedOptionIndex():-1,this.searching=!1),this.autoUpdateModel()}},mounted:function(){this.id=this.id||r.UniqueComponentId(),this.autoUpdateModel()},updated:function(){this.overlayVisible&&this.alignOverlay()},beforeUnmount:function(){this.unbindOutsideClickListener(),this.unbindResizeListener(),this.scrollHandler&&(this.scrollHandler.destroy(),this.scrollHandler=null),this.overlay&&(r.ZIndexUtils.clear(this.overlay),this.overlay=null)},methods:{getOptionIndex:function(e,t){return this.virtualScrollerDisabled?e:t&&t(e).index},getOptionLabel:function(e){return this.field||this.optionLabel?r.ObjectUtils.resolveFieldData(e,this.field||this.optionLabel):e},getOptionValue:function(e){return e},getOptionRenderKey:function(e,t){return(this.dataKey?r.ObjectUtils.resolveFieldData(e,this.dataKey):this.getOptionLabel(e))+"_"+t},getPTOptions:function(e,t,i,n){return this.ptm(n,{context:{selected:this.isSelected(e),focused:this.focusedOptionIndex===this.getOptionIndex(i,t),disabled:this.isOptionDisabled(e)}})},isOptionDisabled:function(e){return!!this.optionDisabled&&r.ObjectUtils.resolveFieldData(e,this.optionDisabled)},isOptionGroup:function(e){return this.optionGroupLabel&&e.optionGroup&&e.group},getOptionGroupLabel:function(e){return r.ObjectUtils.resolveFieldData(e,this.optionGroupLabel)},getOptionGroupChildren:function(e){return r.ObjectUtils.resolveFieldData(e,this.optionGroupChildren)},getAriaPosInset:function(e){var t=this;return(this.optionGroupLabel?e-this.visibleOptions.slice(0,e).filter((function(e){return t.isOptionGroup(e)})).length:e)+1},show:function(e){this.$emit("before-show"),this.dirty=!0,this.overlayVisible=!0,this.focusedOptionIndex=-1!==this.focusedOptionIndex?this.focusedOptionIndex:this.autoOptionFocus?this.findFirstFocusedOptionIndex():-1,e&&r.DomHandler.focus(this.$refs.focusInput)},hide:function(e){var t=this;setTimeout((function(){t.$emit("before-hide"),t.dirty=e,t.overlayVisible=!1,t.clicked=!1,t.focusedOptionIndex=-1,e&&r.DomHandler.focus(t.$refs.focusInput)}),0)},onFocus:function(e){this.disabled||(!this.dirty&&this.completeOnFocus&&this.search(e,e.target.value,"focus"),this.dirty=!0,this.focused=!0,this.overlayVisible&&(this.focusedOptionIndex=-1!==this.focusedOptionIndex?this.focusedOptionIndex:this.overlayVisible&&this.autoOptionFocus?this.findFirstFocusedOptionIndex():-1,this.scrollInView(this.focusedOptionIndex)),this.$emit("focus",e))},onBlur:function(e){this.dirty=!1,this.focused=!1,this.focusedOptionIndex=-1,this.$emit("blur",e)},onKeyDown:function(e){if(this.disabled)e.preventDefault();else{switch(e.code){case"ArrowDown":this.onArrowDownKey(e);break;case"ArrowUp":this.onArrowUpKey(e);break;case"ArrowLeft":this.onArrowLeftKey(e);break;case"ArrowRight":this.onArrowRightKey(e);break;case"Home":this.onHomeKey(e);break;case"End":this.onEndKey(e);break;case"PageDown":this.onPageDownKey(e);break;case"PageUp":this.onPageUpKey(e);break;case"Enter":case"NumpadEnter":this.onEnterKey(e);break;case"Escape":this.onEscapeKey(e);break;case"Tab":this.onTabKey(e);break;case"Backspace":this.onBackspaceKey(e)}this.clicked=!1}},onInput:function(e){var t=this;this.searchTimeout&&clearTimeout(this.searchTimeout);var i=e.target.value;this.multiple||this.updateModel(e,i),0===i.length?(this.hide(),this.$emit("clear")):i.length>=this.minLength?(this.focusedOptionIndex=-1,this.searchTimeout=setTimeout((function(){t.search(e,i,"input")}),this.delay)):this.hide()},onChange:function(e){var t=this;if(this.forceSelection){var i=!1;if(this.visibleOptions&&!this.multiple){var n=this.visibleOptions.find((function(e){return t.isOptionMatched(e,t.$refs.focusInput.value||"")}));void 0!==n&&(i=!0,!this.isSelected(n)&&this.onOptionSelect(e,n))}i||(this.$refs.focusInput.value="",this.$emit("clear"),!this.multiple&&this.updateModel(e,null))}},onMultipleContainerFocus:function(){this.disabled||(this.focused=!0)},onMultipleContainerBlur:function(){this.focusedMultipleOptionIndex=-1,this.focused=!1},onMultipleContainerKeyDown:function(e){if(this.disabled)e.preventDefault();else switch(e.code){case"ArrowLeft":this.onArrowLeftKeyOnMultiple(e);break;case"ArrowRight":this.onArrowRightKeyOnMultiple(e);break;case"Backspace":this.onBackspaceKeyOnMultiple(e)}},onContainerClick:function(e){this.clicked=!0,this.disabled||this.searching||this.loading||this.isInputClicked(e)||this.isDropdownClicked(e)||this.overlay&&this.overlay.contains(e.target)||r.DomHandler.focus(this.$refs.focusInput)},onDropdownClick:function(e){var t=void 0;this.overlayVisible?this.hide(!0):(r.DomHandler.focus(this.$refs.focusInput),t=this.$refs.focusInput.value,"blank"===this.dropdownMode?this.search(e,"","dropdown"):"current"===this.dropdownMode&&this.search(e,t,"dropdown")),this.$emit("dropdown-click",{originalEvent:e,query:t})},onOptionSelect:function(e,t){var i,n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],o=this.getOptionValue(t);this.multiple?(this.$refs.focusInput.value="",this.isSelected(t)||this.updateModel(e,[].concat(C(i=this.modelValue||[])||w(i)||k(i)||S(),[o]))):this.updateModel(e,o),this.$emit("item-select",{originalEvent:e,value:t}),n&&this.hide(!0)},onOptionMouseMove:function(e,t){this.focusOnHover&&this.changeFocusedOptionIndex(e,t)},onOverlayClick:function(e){v.default.emit("overlay-click",{originalEvent:e,target:this.$el})},onOverlayKeyDown:function(e){if("Escape"===e.code)this.onEscapeKey(e)},onArrowDownKey:function(e){if(this.overlayVisible){var t=-1!==this.focusedOptionIndex?this.findNextOptionIndex(this.focusedOptionIndex):this.clicked?this.findFirstOptionIndex():this.findFirstFocusedOptionIndex();this.changeFocusedOptionIndex(e,t),e.preventDefault()}},onArrowUpKey:function(e){if(this.overlayVisible)if(e.altKey)-1!==this.focusedOptionIndex&&this.onOptionSelect(e,this.visibleOptions[this.focusedOptionIndex]),this.overlayVisible&&this.hide(),e.preventDefault();else{var t=-1!==this.focusedOptionIndex?this.findPrevOptionIndex(this.focusedOptionIndex):this.clicked?this.findLastOptionIndex():this.findLastFocusedOptionIndex();this.changeFocusedOptionIndex(e,t),e.preventDefault()}},onArrowLeftKey:function(e){var t=e.currentTarget;this.focusedOptionIndex=-1,this.multiple&&(r.ObjectUtils.isEmpty(t.value)&&this.hasSelectedOption?(r.DomHandler.focus(this.$refs.multiContainer),this.focusedMultipleOptionIndex=this.modelValue.length):e.stopPropagation())},onArrowRightKey:function(e){this.focusedOptionIndex=-1,this.multiple&&e.stopPropagation()},onHomeKey:function(e){var t=e.currentTarget;t.setSelectionRange(0,e.shiftKey?t.value.length:0),this.focusedOptionIndex=-1,e.preventDefault()},onEndKey:function(e){var t=e.currentTarget,i=t.value.length;t.setSelectionRange(e.shiftKey?0:i,i),this.focusedOptionIndex=-1,e.preventDefault()},onPageUpKey:function(e){this.scrollInView(0),e.preventDefault()},onPageDownKey:function(e){this.scrollInView(this.visibleOptions.length-1),e.preventDefault()},onEnterKey:function(e){this.overlayVisible?(-1!==this.focusedOptionIndex&&this.onOptionSelect(e,this.visibleOptions[this.focusedOptionIndex]),this.hide()):(this.focusedOptionIndex=-1,this.onArrowDownKey(e)),e.preventDefault()},onEscapeKey:function(e){this.overlayVisible&&this.hide(!0),e.preventDefault()},onTabKey:function(e){-1!==this.focusedOptionIndex&&this.onOptionSelect(e,this.visibleOptions[this.focusedOptionIndex]),this.overlayVisible&&this.hide()},onBackspaceKey:function(e){if(this.multiple){if(r.ObjectUtils.isNotEmpty(this.modelValue)&&!this.$refs.focusInput.value){var t=this.modelValue[this.modelValue.length-1],i=this.modelValue.slice(0,-1);this.$emit("update:modelValue",i),this.$emit("item-unselect",{originalEvent:e,value:t})}e.stopPropagation()}},onArrowLeftKeyOnMultiple:function(){this.focusedMultipleOptionIndex=this.focusedMultipleOptionIndex<1?0:this.focusedMultipleOptionIndex-1},onArrowRightKeyOnMultiple:function(){this.focusedMultipleOptionIndex++,this.focusedMultipleOptionIndex>this.modelValue.length-1&&(this.focusedMultipleOptionIndex=-1,r.DomHandler.focus(this.$refs.focusInput))},onBackspaceKeyOnMultiple:function(e){-1!==this.focusedMultipleOptionIndex&&this.removeOption(e,this.focusedMultipleOptionIndex)},onOverlayEnter:function(e){r.ZIndexUtils.set("overlay",e,this.$primevue.config.zIndex.overlay),r.DomHandler.addStyles(e,{position:"absolute",top:"0",left:"0"}),this.alignOverlay()},onOverlayAfterEnter:function(){this.bindOutsideClickListener(),this.bindScrollListener(),this.bindResizeListener(),this.$emit("show")},onOverlayLeave:function(){this.unbindOutsideClickListener(),this.unbindScrollListener(),this.unbindResizeListener(),this.$emit("hide"),this.overlay=null},onOverlayAfterLeave:function(e){r.ZIndexUtils.clear(e)},alignOverlay:function(){var e=this.multiple?this.$refs.multiContainer:this.$refs.focusInput;"self"===this.appendTo?r.DomHandler.relativePosition(this.overlay,e):(this.overlay.style.minWidth=r.DomHandler.getOuterWidth(e)+"px",r.DomHandler.absolutePosition(this.overlay,e))},bindOutsideClickListener:function(){var e=this;this.outsideClickListener||(this.outsideClickListener=function(t){e.overlayVisible&&e.overlay&&e.isOutsideClicked(t)&&e.hide()},document.addEventListener("click",this.outsideClickListener))},unbindOutsideClickListener:function(){this.outsideClickListener&&(document.removeEventListener("click",this.outsideClickListener),this.outsideClickListener=null)},bindScrollListener:function(){var e=this;this.scrollHandler||(this.scrollHandler=new r.ConnectedOverlayScrollHandler(this.$refs.container,(function(){e.overlayVisible&&e.hide()}))),this.scrollHandler.bindScrollListener()},unbindScrollListener:function(){this.scrollHandler&&this.scrollHandler.unbindScrollListener()},bindResizeListener:function(){var e=this;this.resizeListener||(this.resizeListener=function(){e.overlayVisible&&!r.DomHandler.isTouchDevice()&&e.hide()},window.addEventListener("resize",this.resizeListener))},unbindResizeListener:function(){this.resizeListener&&(window.removeEventListener("resize",this.resizeListener),this.resizeListener=null)},isOutsideClicked:function(e){return!this.overlay.contains(e.target)&&!this.isInputClicked(e)&&!this.isDropdownClicked(e)},isInputClicked:function(e){return this.multiple?e.target===this.$refs.multiContainer||this.$refs.multiContainer.contains(e.target):e.target===this.$refs.focusInput},isDropdownClicked:function(e){return!!this.$refs.dropdownButton&&(e.target===this.$refs.dropdownButton||this.$refs.dropdownButton.$el.contains(e.target))},isOptionMatched:function(e,t){var i;return this.isValidOption(e)&&(null===(i=this.getOptionLabel(e))||void 0===i?void 0:i.toLocaleLowerCase(this.searchLocale))===t.toLocaleLowerCase(this.searchLocale)},isValidOption:function(e){return r.ObjectUtils.isNotEmpty(e)&&!(this.isOptionDisabled(e)||this.isOptionGroup(e))},isValidSelectedOption:function(e){return this.isValidOption(e)&&this.isSelected(e)},isSelected:function(e){return r.ObjectUtils.equals(this.modelValue,this.getOptionValue(e),this.equalityKey)},findFirstOptionIndex:function(){var e=this;return this.visibleOptions.findIndex((function(t){return e.isValidOption(t)}))},findLastOptionIndex:function(){var e=this;return r.ObjectUtils.findLastIndex(this.visibleOptions,(function(t){return e.isValidOption(t)}))},findNextOptionIndex:function(e){var t=this,i=e<this.visibleOptions.length-1?this.visibleOptions.slice(e+1).findIndex((function(e){return t.isValidOption(e)})):-1;return i>-1?i+e+1:e},findPrevOptionIndex:function(e){var t=this,i=e>0?r.ObjectUtils.findLastIndex(this.visibleOptions.slice(0,e),(function(e){return t.isValidOption(e)})):-1;return i>-1?i:e},findSelectedOptionIndex:function(){var e=this;return this.hasSelectedOption?this.visibleOptions.findIndex((function(t){return e.isValidSelectedOption(t)})):-1},findFirstFocusedOptionIndex:function(){var e=this.findSelectedOptionIndex();return e<0?this.findFirstOptionIndex():e},findLastFocusedOptionIndex:function(){var e=this.findSelectedOptionIndex();return e<0?this.findLastOptionIndex():e},search:function(e,t,i){null!=t&&("input"===i&&0===t.trim().length||(this.searching=!0,this.$emit("complete",{originalEvent:e,query:t})))},removeOption:function(e,t){var i=this,n=this.modelValue[t],o=this.modelValue.filter((function(e,i){return i!==t})).map((function(e){return i.getOptionValue(e)}));this.updateModel(e,o),this.$emit("item-unselect",{originalEvent:e,value:n}),this.dirty=!0,r.DomHandler.focus(this.$refs.focusInput)},changeFocusedOptionIndex:function(e,t){this.focusedOptionIndex!==t&&(this.focusedOptionIndex=t,this.scrollInView(),(this.selectOnFocus||this.autoHighlight)&&this.onOptionSelect(e,this.visibleOptions[t],!1))},scrollInView:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:-1;this.$nextTick((function(){var i=-1!==t?"".concat(e.id,"_").concat(t):e.focusedOptionId,n=r.DomHandler.findSingle(e.list,'li[id="'.concat(i,'"]'));n?n.scrollIntoView&&n.scrollIntoView({block:"nearest",inline:"start"}):e.virtualScrollerDisabled||e.virtualScroller&&e.virtualScroller.scrollToIndex(-1!==t?t:e.focusedOptionIndex)}))},autoUpdateModel:function(){(this.selectOnFocus||this.autoHighlight)&&this.autoOptionFocus&&!this.hasSelectedOption&&(this.focusedOptionIndex=this.findFirstFocusedOptionIndex(),this.onOptionSelect(null,this.visibleOptions[this.focusedOptionIndex],!1))},updateModel:function(e,t){this.$emit("update:modelValue",t),this.$emit("change",{originalEvent:e,value:t})},flatOptions:function(e){var t=this;return(e||[]).reduce((function(e,i,n){e.push({optionGroup:i,group:!0,index:n});var o=t.getOptionGroupChildren(i);return o&&o.forEach((function(t){return e.push(t)})),e}),[])},overlayRef:function(e){this.overlay=e},listRef:function(e,t){this.list=e,t&&t(e)},virtualScrollerRef:function(e){this.virtualScroller=e}},computed:{visibleOptions:function(){return this.optionGroupLabel?this.flatOptions(this.suggestions):this.suggestions||[]},inputValue:function(){if(r.ObjectUtils.isNotEmpty(this.modelValue)){if("object"===I(this.modelValue)){var e=this.getOptionLabel(this.modelValue);return null!=e?e:this.modelValue}return this.modelValue}return""},hasSelectedOption:function(){return r.ObjectUtils.isNotEmpty(this.modelValue)},equalityKey:function(){return this.dataKey},searchResultMessageText:function(){return r.ObjectUtils.isNotEmpty(this.visibleOptions)&&this.overlayVisible?this.searchMessageText.replaceAll("{0}",this.visibleOptions.length):this.emptySearchMessageText},searchMessageText:function(){return this.searchMessage||this.$primevue.config.locale.searchMessage||""},emptySearchMessageText:function(){return this.emptySearchMessage||this.$primevue.config.locale.emptySearchMessage||""},selectionMessageText:function(){return this.selectionMessage||this.$primevue.config.locale.selectionMessage||""},emptySelectionMessageText:function(){return this.emptySelectionMessage||this.$primevue.config.locale.emptySelectionMessage||""},selectedMessageText:function(){return this.hasSelectedOption?this.selectionMessageText.replaceAll("{0}",this.multiple?this.modelValue.length:"1"):this.emptySelectionMessageText},focusedOptionId:function(){return-1!==this.focusedOptionIndex?"".concat(this.id,"_").concat(this.focusedOptionIndex):null},focusedMultipleOptionId:function(){return-1!==this.focusedMultipleOptionIndex?"".concat(this.id,"_multiple_option_").concat(this.focusedMultipleOptionIndex):null},ariaSetSize:function(){var e=this;return this.visibleOptions.filter((function(t){return!e.isOptionGroup(t)})).length},virtualScrollerDisabled:function(){return!this.virtualScrollerOptions}},components:{Button:h.default,VirtualScroller:g.default,Portal:b.default,ChevronDownIcon:f.default,SpinnerIcon:y.default,TimesCircleIcon:m.default},directives:{ripple:O.default}};function D(e){return D="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},D(e)}function M(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),i.push.apply(i,n)}return i}function B(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?M(Object(i),!0).forEach((function(t){$(e,t,i[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):M(Object(i)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))}))}return e}function $(e,t,i){var n;return(t="symbol"==D(n=E(t,"string"))?n:String(n))in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,e}function E(e,t){if("object"!=D(e)||!e)return e;var i=e[Symbol.toPrimitive];if(void 0!==i){var n=i.call(e,t||"default");if("object"!=D(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}var K=["id","value","placeholder","tabindex","disabled","aria-label","aria-labelledby","aria-expanded","aria-controls","aria-activedescendant","aria-invalid"],P=["aria-activedescendant"],T=["id","aria-label","aria-setsize","aria-posinset"],F=["id","placeholder","tabindex","disabled","aria-label","aria-labelledby","aria-expanded","aria-controls","aria-activedescendant","aria-invalid"],A=["id"],j=["id"],H=["id","aria-label","aria-selected","aria-disabled","aria-setsize","aria-posinset","onClick","onMousemove","data-p-highlight","data-p-focus","data-p-disabled"];V.render=function(e,t,i,n,o,s){var l=d.resolveComponent("SpinnerIcon"),r=d.resolveComponent("Button"),a=d.resolveComponent("VirtualScroller"),u=d.resolveComponent("Portal"),c=d.resolveDirective("ripple");return d.openBlock(),d.createElementBlock("div",d.mergeProps({ref:"container",class:e.cx("root"),style:e.sx("root"),onClick:t[15]||(t[15]=function(){return s.onContainerClick&&s.onContainerClick.apply(s,arguments)})},e.ptmi("root")),[e.multiple?d.createCommentVNode("",!0):(d.openBlock(),d.createElementBlock("input",d.mergeProps({key:0,ref:"focusInput",id:e.inputId,type:"text",class:[e.cx("input"),e.inputClass],style:e.inputStyle,value:s.inputValue,placeholder:e.placeholder,tabindex:e.disabled?-1:e.tabindex,disabled:e.disabled,autocomplete:"off",role:"combobox","aria-label":e.ariaLabel,"aria-labelledby":e.ariaLabelledby,"aria-haspopup":"listbox","aria-autocomplete":"list","aria-expanded":o.overlayVisible,"aria-controls":o.id+"_list","aria-activedescendant":o.focused?s.focusedOptionId:void 0,"aria-invalid":e.invalid||void 0,onFocus:t[0]||(t[0]=function(){return s.onFocus&&s.onFocus.apply(s,arguments)}),onBlur:t[1]||(t[1]=function(){return s.onBlur&&s.onBlur.apply(s,arguments)}),onKeydown:t[2]||(t[2]=function(){return s.onKeyDown&&s.onKeyDown.apply(s,arguments)}),onInput:t[3]||(t[3]=function(){return s.onInput&&s.onInput.apply(s,arguments)}),onChange:t[4]||(t[4]=function(){return s.onChange&&s.onChange.apply(s,arguments)})},B(B({},e.inputProps),e.ptm("input"))),null,16,K)),e.multiple?(d.openBlock(),d.createElementBlock("ul",d.mergeProps({key:1,ref:"multiContainer",class:e.cx("container"),tabindex:"-1",role:"listbox","aria-orientation":"horizontal","aria-activedescendant":o.focused?s.focusedMultipleOptionId:void 0,onFocus:t[10]||(t[10]=function(){return s.onMultipleContainerFocus&&s.onMultipleContainerFocus.apply(s,arguments)}),onBlur:t[11]||(t[11]=function(){return s.onMultipleContainerBlur&&s.onMultipleContainerBlur.apply(s,arguments)}),onKeydown:t[12]||(t[12]=function(){return s.onMultipleContainerKeyDown&&s.onMultipleContainerKeyDown.apply(s,arguments)})},e.ptm("container")),[(d.openBlock(!0),d.createElementBlock(d.Fragment,null,d.renderList(e.modelValue,(function(t,i){return d.openBlock(),d.createElementBlock("li",d.mergeProps({key:i,id:o.id+"_multiple_option_"+i,class:e.cx("token",{i:i}),role:"option","aria-label":s.getOptionLabel(t),"aria-selected":!0,"aria-setsize":e.modelValue.length,"aria-posinset":i+1},e.ptm("token")),[d.renderSlot(e.$slots,"chip",{value:t},(function(){return[d.createElementVNode("span",d.mergeProps({class:e.cx("tokenLabel")},e.ptm("tokenLabel")),d.toDisplayString(s.getOptionLabel(t)),17)]})),d.renderSlot(e.$slots,"removetokenicon",{class:d.normalizeClass(e.cx("removeTokenIcon")),index:i,onClick:function(e){return s.removeOption(e,i)},removeCallback:function(e){return s.removeOption(e,i)}},(function(){return[(d.openBlock(),d.createBlock(d.resolveDynamicComponent(e.removeTokenIcon?"span":"TimesCircleIcon"),d.mergeProps({class:[e.cx("removeTokenIcon"),e.removeTokenIcon],onClick:function(e){return s.removeOption(e,i)},"aria-hidden":"true"},e.ptm("removeTokenIcon")),null,16,["class","onClick"]))]}))],16,T)})),128)),d.createElementVNode("li",d.mergeProps({class:e.cx("inputToken"),role:"option"},e.ptm("inputToken")),[d.createElementVNode("input",d.mergeProps({ref:"focusInput",id:e.inputId,type:"text",style:e.inputStyle,class:e.inputClass,placeholder:e.placeholder,tabindex:e.disabled?-1:e.tabindex,disabled:e.disabled,autocomplete:"off",role:"combobox","aria-label":e.ariaLabel,"aria-labelledby":e.ariaLabelledby,"aria-haspopup":"listbox","aria-autocomplete":"list","aria-expanded":o.overlayVisible,"aria-controls":o.id+"_list","aria-activedescendant":o.focused?s.focusedOptionId:void 0,"aria-invalid":e.invalid||void 0,onFocus:t[5]||(t[5]=function(){return s.onFocus&&s.onFocus.apply(s,arguments)}),onBlur:t[6]||(t[6]=function(){return s.onBlur&&s.onBlur.apply(s,arguments)}),onKeydown:t[7]||(t[7]=function(){return s.onKeyDown&&s.onKeyDown.apply(s,arguments)}),onInput:t[8]||(t[8]=function(){return s.onInput&&s.onInput.apply(s,arguments)}),onChange:t[9]||(t[9]=function(){return s.onChange&&s.onChange.apply(s,arguments)})},B(B({},e.inputProps),e.ptm("input"))),null,16,F)],16)],16,P)):d.createCommentVNode("",!0),o.searching||e.loading?d.renderSlot(e.$slots,"loadingicon",{key:2,class:d.normalizeClass(e.cx("loadingIcon"))},(function(){return[e.loadingIcon?(d.openBlock(),d.createElementBlock("i",d.mergeProps({key:0,class:["pi-spin",e.cx("loadingIcon"),e.loadingIcon],"aria-hidden":"true"},e.ptm("loadingIcon")),null,16)):(d.openBlock(),d.createBlock(l,d.mergeProps({key:1,class:[e.cx("loadingIcon"),e.loadingIcon],spin:"","aria-hidden":"true"},e.ptm("loadingIcon")),null,16,["class"]))]})):d.createCommentVNode("",!0),e.dropdown?(d.openBlock(),d.createBlock(r,{key:3,ref:"dropdownButton",type:"button",tabindex:"-1",class:d.normalizeClass([e.cx("dropdownButton"),e.dropdownClass]),disabled:e.disabled,"aria-hidden":"true",onClick:s.onDropdownClick,unstyled:e.unstyled,pt:e.ptm("dropdownButton")},{icon:d.withCtx((function(){return[d.renderSlot(e.$slots,"dropdownicon",{class:d.normalizeClass(e.dropdownIcon)},(function(){return[(d.openBlock(),d.createBlock(d.resolveDynamicComponent(e.dropdownIcon?"span":"ChevronDownIcon"),d.mergeProps({class:e.dropdownIcon},e.ptm("dropdownButton").icon,{"data-pc-section":"dropdownicon"}),null,16,["class"]))]}))]})),_:3},8,["class","disabled","onClick","unstyled","pt"])):d.createCommentVNode("",!0),d.createElementVNode("span",d.mergeProps({role:"status","aria-live":"polite",class:"p-hidden-accessible"},e.ptm("hiddenSearchResult"),{"data-p-hidden-accessible":!0}),d.toDisplayString(s.searchResultMessageText),17),d.createVNode(u,{appendTo:e.appendTo},{default:d.withCtx((function(){return[d.createVNode(d.Transition,d.mergeProps({name:"p-connected-overlay",onEnter:s.onOverlayEnter,onAfterEnter:s.onOverlayAfterEnter,onLeave:s.onOverlayLeave,onAfterLeave:s.onOverlayAfterLeave},e.ptm("transition")),{default:d.withCtx((function(){return[o.overlayVisible?(d.openBlock(),d.createElementBlock("div",d.mergeProps({key:0,ref:s.overlayRef,class:[e.cx("panel"),e.panelClass],style:B(B({},e.panelStyle),{},{"max-height":s.virtualScrollerDisabled?e.scrollHeight:""}),onClick:t[13]||(t[13]=function(){return s.onOverlayClick&&s.onOverlayClick.apply(s,arguments)}),onKeydown:t[14]||(t[14]=function(){return s.onOverlayKeyDown&&s.onOverlayKeyDown.apply(s,arguments)})},B(B({},e.panelProps),e.ptm("panel"))),[d.renderSlot(e.$slots,"header",{value:e.modelValue,suggestions:s.visibleOptions}),d.createVNode(a,d.mergeProps({ref:s.virtualScrollerRef},e.virtualScrollerOptions,{style:{height:e.scrollHeight},items:s.visibleOptions,tabindex:-1,disabled:s.virtualScrollerDisabled,pt:e.ptm("virtualScroller")}),d.createSlots({content:d.withCtx((function(t){var i=t.styleClass,n=t.contentRef,l=t.items,r=t.getItemOptions,a=t.contentStyle,u=t.itemSize;return[d.createElementVNode("ul",d.mergeProps({ref:function(e){return s.listRef(e,n)},id:o.id+"_list",class:[e.cx("list"),i],style:a,role:"listbox"},e.ptm("list")),[(d.openBlock(!0),d.createElementBlock(d.Fragment,null,d.renderList(l,(function(t,i){return d.openBlock(),d.createElementBlock(d.Fragment,{key:s.getOptionRenderKey(t,s.getOptionIndex(i,r))},[s.isOptionGroup(t)?(d.openBlock(),d.createElementBlock("li",d.mergeProps({key:0,id:o.id+"_"+s.getOptionIndex(i,r),style:{height:u?u+"px":void 0},class:e.cx("itemGroup"),role:"option"},e.ptm("itemGroup")),[d.renderSlot(e.$slots,"optiongroup",{option:t.optionGroup,item:t.optionGroup,index:s.getOptionIndex(i,r)},(function(){return[d.createTextVNode(d.toDisplayString(s.getOptionGroupLabel(t.optionGroup)),1)]}))],16,j)):d.withDirectives((d.openBlock(),d.createElementBlock("li",d.mergeProps({key:1,id:o.id+"_"+s.getOptionIndex(i,r),style:{height:u?u+"px":void 0},class:e.cx("item",{option:t,i:i,getItemOptions:r}),role:"option","aria-label":s.getOptionLabel(t),"aria-selected":s.isSelected(t),"aria-disabled":s.isOptionDisabled(t),"aria-setsize":s.ariaSetSize,"aria-posinset":s.getAriaPosInset(s.getOptionIndex(i,r)),onClick:function(e){return s.onOptionSelect(e,t)},onMousemove:function(e){return s.onOptionMouseMove(e,s.getOptionIndex(i,r))},"data-p-highlight":s.isSelected(t),"data-p-focus":o.focusedOptionIndex===s.getOptionIndex(i,r),"data-p-disabled":s.isOptionDisabled(t)},s.getPTOptions(t,r,i,"item")),[e.$slots.option?d.renderSlot(e.$slots,"option",{key:0,option:t,index:s.getOptionIndex(i,r)},(function(){return[d.createTextVNode(d.toDisplayString(s.getOptionLabel(t)),1)]})):d.renderSlot(e.$slots,"item",{key:1,item:t,index:s.getOptionIndex(i,r)},(function(){return[d.createTextVNode(d.toDisplayString(s.getOptionLabel(t)),1)]}))],16,H)),[[c]])],64)})),128)),!l||l&&0===l.length?(d.openBlock(),d.createElementBlock("li",d.mergeProps({key:0,class:e.cx("emptyMessage"),role:"option"},e.ptm("emptyMessage")),[d.renderSlot(e.$slots,"empty",{},(function(){return[d.createTextVNode(d.toDisplayString(s.searchResultMessageText),1)]}))],16)):d.createCommentVNode("",!0)],16,A)]})),_:2},[e.$slots.loader?{name:"loader",fn:d.withCtx((function(t){return[d.renderSlot(e.$slots,"loader",{options:t.options})]})),key:"0"}:void 0]),1040,["style","items","disabled","pt"]),d.renderSlot(e.$slots,"footer",{value:e.modelValue,suggestions:s.visibleOptions}),d.createElementVNode("span",d.mergeProps({role:"status","aria-live":"polite",class:"p-hidden-accessible"},e.ptm("hiddenSelectedMessage"),{"data-p-hidden-accessible":!0}),d.toDisplayString(s.selectedMessageText),17)],16)):d.createCommentVNode("",!0)]})),_:3},16,["onEnter","onAfterEnter","onLeave","onAfterLeave"])]})),_:3},8,["appendTo"])],16)},module.exports=V;
1
+ "use strict";var e=require("primevue/button"),t=require("primevue/icons/chevrondown"),i=require("primevue/icons/spinner"),n=require("primevue/icons/timescircle"),o=require("primevue/overlayeventbus"),s=require("primevue/portal"),l=require("primevue/ripple"),r=require("primevue/utils"),a=require("primevue/virtualscroller"),u=require("primevue/autocomplete/style"),c=require("primevue/basecomponent"),d=require("vue");function p(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var h=p(e),f=p(t),m=p(i),y=p(n),v=p(o),b=p(s),O=p(l),g=p(a),x=p(u);function I(e){return I="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},I(e)}function S(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function k(e,t){if(e){if("string"==typeof e)return L(e,t);var i=Object.prototype.toString.call(e).slice(8,-1);return"Object"===i&&e.constructor&&(i=e.constructor.name),"Map"===i||"Set"===i?Array.from(e):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?L(e,t):void 0}}function w(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function C(e){if(Array.isArray(e))return L(e)}function L(e,t){(null==t||t>e.length)&&(t=e.length);for(var i=0,n=new Array(t);i<t;i++)n[i]=e[i];return n}var V={name:"AutoComplete",extends:{name:"BaseAutoComplete",extends:p(c).default,props:{modelValue:null,suggestions:{type:Array,default:null},field:{type:[String,Function],default:null},optionLabel:null,optionDisabled:null,optionGroupLabel:null,optionGroupChildren:null,scrollHeight:{type:String,default:"200px"},dropdown:{type:Boolean,default:!1},dropdownMode:{type:String,default:"blank"},autoHighlight:{type:Boolean,default:!1},multiple:{type:Boolean,default:!1},loading:{type:Boolean,default:!1},variant:{type:String,default:null},invalid:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},placeholder:{type:String,default:null},dataKey:{type:String,default:null},minLength:{type:Number,default:1},delay:{type:Number,default:300},appendTo:{type:[String,Object],default:"body"},forceSelection:{type:Boolean,default:!1},completeOnFocus:{type:Boolean,default:!1},inputId:{type:String,default:null},inputStyle:{type:Object,default:null},inputClass:{type:[String,Object],default:null},inputProps:{type:null,default:null},panelStyle:{type:Object,default:null},panelClass:{type:[String,Object],default:null},panelProps:{type:null,default:null},dropdownIcon:{type:String,default:void 0},dropdownClass:{type:[String,Object],default:null},loadingIcon:{type:String,default:void 0},removeTokenIcon:{type:String,default:void 0},virtualScrollerOptions:{type:Object,default:null},autoOptionFocus:{type:Boolean,default:!1},selectOnFocus:{type:Boolean,default:!1},focusOnHover:{type:Boolean,default:!0},searchLocale:{type:String,default:void 0},searchMessage:{type:String,default:null},selectionMessage:{type:String,default:null},emptySelectionMessage:{type:String,default:null},emptySearchMessage:{type:String,default:null},tabindex:{type:Number,default:0},ariaLabel:{type:String,default:null},ariaLabelledby:{type:String,default:null}},style:x.default,provide:function(){return{$parentInstance:this}}},inheritAttrs:!1,emits:["update:modelValue","change","focus","blur","item-select","item-unselect","dropdown-click","clear","complete","before-show","before-hide","show","hide"],outsideClickListener:null,resizeListener:null,scrollHandler:null,overlay:null,virtualScroller:null,searchTimeout:null,dirty:!1,data:function(){return{id:this.$attrs.id,clicked:!1,focused:!1,focusedOptionIndex:-1,focusedMultipleOptionIndex:-1,overlayVisible:!1,searching:!1}},watch:{"$attrs.id":{immediate:!0,handler:function(e){this.id=e||r.UniqueComponentId()}},suggestions:function(){this.searching&&(this.show(),this.focusedOptionIndex=this.overlayVisible&&this.autoOptionFocus?this.findFirstFocusedOptionIndex():-1,this.searching=!1),this.autoUpdateModel()}},mounted:function(){this.autoUpdateModel()},updated:function(){this.overlayVisible&&this.alignOverlay()},beforeUnmount:function(){this.unbindOutsideClickListener(),this.unbindResizeListener(),this.scrollHandler&&(this.scrollHandler.destroy(),this.scrollHandler=null),this.overlay&&(r.ZIndexUtils.clear(this.overlay),this.overlay=null)},methods:{getOptionIndex:function(e,t){return this.virtualScrollerDisabled?e:t&&t(e).index},getOptionLabel:function(e){return this.field||this.optionLabel?r.ObjectUtils.resolveFieldData(e,this.field||this.optionLabel):e},getOptionValue:function(e){return e},getOptionRenderKey:function(e,t){return(this.dataKey?r.ObjectUtils.resolveFieldData(e,this.dataKey):this.getOptionLabel(e))+"_"+t},getPTOptions:function(e,t,i,n){return this.ptm(n,{context:{selected:this.isSelected(e),focused:this.focusedOptionIndex===this.getOptionIndex(i,t),disabled:this.isOptionDisabled(e)}})},isOptionDisabled:function(e){return!!this.optionDisabled&&r.ObjectUtils.resolveFieldData(e,this.optionDisabled)},isOptionGroup:function(e){return this.optionGroupLabel&&e.optionGroup&&e.group},getOptionGroupLabel:function(e){return r.ObjectUtils.resolveFieldData(e,this.optionGroupLabel)},getOptionGroupChildren:function(e){return r.ObjectUtils.resolveFieldData(e,this.optionGroupChildren)},getAriaPosInset:function(e){var t=this;return(this.optionGroupLabel?e-this.visibleOptions.slice(0,e).filter((function(e){return t.isOptionGroup(e)})).length:e)+1},show:function(e){this.$emit("before-show"),this.dirty=!0,this.overlayVisible=!0,this.focusedOptionIndex=-1!==this.focusedOptionIndex?this.focusedOptionIndex:this.autoOptionFocus?this.findFirstFocusedOptionIndex():-1,e&&r.DomHandler.focus(this.$refs.focusInput)},hide:function(e){var t=this;setTimeout((function(){t.$emit("before-hide"),t.dirty=e,t.overlayVisible=!1,t.clicked=!1,t.focusedOptionIndex=-1,e&&r.DomHandler.focus(t.$refs.focusInput)}),0)},onFocus:function(e){this.disabled||(!this.dirty&&this.completeOnFocus&&this.search(e,e.target.value,"focus"),this.dirty=!0,this.focused=!0,this.overlayVisible&&(this.focusedOptionIndex=-1!==this.focusedOptionIndex?this.focusedOptionIndex:this.overlayVisible&&this.autoOptionFocus?this.findFirstFocusedOptionIndex():-1,this.scrollInView(this.focusedOptionIndex)),this.$emit("focus",e))},onBlur:function(e){this.dirty=!1,this.focused=!1,this.focusedOptionIndex=-1,this.$emit("blur",e)},onKeyDown:function(e){if(this.disabled)e.preventDefault();else{switch(e.code){case"ArrowDown":this.onArrowDownKey(e);break;case"ArrowUp":this.onArrowUpKey(e);break;case"ArrowLeft":this.onArrowLeftKey(e);break;case"ArrowRight":this.onArrowRightKey(e);break;case"Home":this.onHomeKey(e);break;case"End":this.onEndKey(e);break;case"PageDown":this.onPageDownKey(e);break;case"PageUp":this.onPageUpKey(e);break;case"Enter":case"NumpadEnter":this.onEnterKey(e);break;case"Escape":this.onEscapeKey(e);break;case"Tab":this.onTabKey(e);break;case"Backspace":this.onBackspaceKey(e)}this.clicked=!1}},onInput:function(e){var t=this;this.searchTimeout&&clearTimeout(this.searchTimeout);var i=e.target.value;this.multiple||this.updateModel(e,i),0===i.length?(this.hide(),this.$emit("clear")):i.length>=this.minLength?(this.focusedOptionIndex=-1,this.searchTimeout=setTimeout((function(){t.search(e,i,"input")}),this.delay)):this.hide()},onChange:function(e){var t=this;if(this.forceSelection){var i=!1;if(this.visibleOptions&&!this.multiple){var n=this.visibleOptions.find((function(e){return t.isOptionMatched(e,t.$refs.focusInput.value||"")}));void 0!==n&&(i=!0,!this.isSelected(n)&&this.onOptionSelect(e,n))}i||(this.$refs.focusInput.value="",this.$emit("clear"),!this.multiple&&this.updateModel(e,null))}},onMultipleContainerFocus:function(){this.disabled||(this.focused=!0)},onMultipleContainerBlur:function(){this.focusedMultipleOptionIndex=-1,this.focused=!1},onMultipleContainerKeyDown:function(e){if(this.disabled)e.preventDefault();else switch(e.code){case"ArrowLeft":this.onArrowLeftKeyOnMultiple(e);break;case"ArrowRight":this.onArrowRightKeyOnMultiple(e);break;case"Backspace":this.onBackspaceKeyOnMultiple(e)}},onContainerClick:function(e){this.clicked=!0,this.disabled||this.searching||this.loading||this.isInputClicked(e)||this.isDropdownClicked(e)||this.overlay&&this.overlay.contains(e.target)||r.DomHandler.focus(this.$refs.focusInput)},onDropdownClick:function(e){var t=void 0;this.overlayVisible?this.hide(!0):(r.DomHandler.focus(this.$refs.focusInput),t=this.$refs.focusInput.value,"blank"===this.dropdownMode?this.search(e,"","dropdown"):"current"===this.dropdownMode&&this.search(e,t,"dropdown")),this.$emit("dropdown-click",{originalEvent:e,query:t})},onOptionSelect:function(e,t){var i,n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],o=this.getOptionValue(t);this.multiple?(this.$refs.focusInput.value="",this.isSelected(t)||this.updateModel(e,[].concat(C(i=this.modelValue||[])||w(i)||k(i)||S(),[o]))):this.updateModel(e,o),this.$emit("item-select",{originalEvent:e,value:t}),n&&this.hide(!0)},onOptionMouseMove:function(e,t){this.focusOnHover&&this.changeFocusedOptionIndex(e,t)},onOverlayClick:function(e){v.default.emit("overlay-click",{originalEvent:e,target:this.$el})},onOverlayKeyDown:function(e){if("Escape"===e.code)this.onEscapeKey(e)},onArrowDownKey:function(e){if(this.overlayVisible){var t=-1!==this.focusedOptionIndex?this.findNextOptionIndex(this.focusedOptionIndex):this.clicked?this.findFirstOptionIndex():this.findFirstFocusedOptionIndex();this.changeFocusedOptionIndex(e,t),e.preventDefault()}},onArrowUpKey:function(e){if(this.overlayVisible)if(e.altKey)-1!==this.focusedOptionIndex&&this.onOptionSelect(e,this.visibleOptions[this.focusedOptionIndex]),this.overlayVisible&&this.hide(),e.preventDefault();else{var t=-1!==this.focusedOptionIndex?this.findPrevOptionIndex(this.focusedOptionIndex):this.clicked?this.findLastOptionIndex():this.findLastFocusedOptionIndex();this.changeFocusedOptionIndex(e,t),e.preventDefault()}},onArrowLeftKey:function(e){var t=e.currentTarget;this.focusedOptionIndex=-1,this.multiple&&(r.ObjectUtils.isEmpty(t.value)&&this.hasSelectedOption?(r.DomHandler.focus(this.$refs.multiContainer),this.focusedMultipleOptionIndex=this.modelValue.length):e.stopPropagation())},onArrowRightKey:function(e){this.focusedOptionIndex=-1,this.multiple&&e.stopPropagation()},onHomeKey:function(e){var t=e.currentTarget;t.setSelectionRange(0,e.shiftKey?t.value.length:0),this.focusedOptionIndex=-1,e.preventDefault()},onEndKey:function(e){var t=e.currentTarget,i=t.value.length;t.setSelectionRange(e.shiftKey?0:i,i),this.focusedOptionIndex=-1,e.preventDefault()},onPageUpKey:function(e){this.scrollInView(0),e.preventDefault()},onPageDownKey:function(e){this.scrollInView(this.visibleOptions.length-1),e.preventDefault()},onEnterKey:function(e){this.overlayVisible?(-1!==this.focusedOptionIndex&&this.onOptionSelect(e,this.visibleOptions[this.focusedOptionIndex]),this.hide()):(this.focusedOptionIndex=-1,this.onArrowDownKey(e)),e.preventDefault()},onEscapeKey:function(e){this.overlayVisible&&this.hide(!0),e.preventDefault()},onTabKey:function(e){-1!==this.focusedOptionIndex&&this.onOptionSelect(e,this.visibleOptions[this.focusedOptionIndex]),this.overlayVisible&&this.hide()},onBackspaceKey:function(e){if(this.multiple){if(r.ObjectUtils.isNotEmpty(this.modelValue)&&!this.$refs.focusInput.value){var t=this.modelValue[this.modelValue.length-1],i=this.modelValue.slice(0,-1);this.$emit("update:modelValue",i),this.$emit("item-unselect",{originalEvent:e,value:t})}e.stopPropagation()}},onArrowLeftKeyOnMultiple:function(){this.focusedMultipleOptionIndex=this.focusedMultipleOptionIndex<1?0:this.focusedMultipleOptionIndex-1},onArrowRightKeyOnMultiple:function(){this.focusedMultipleOptionIndex++,this.focusedMultipleOptionIndex>this.modelValue.length-1&&(this.focusedMultipleOptionIndex=-1,r.DomHandler.focus(this.$refs.focusInput))},onBackspaceKeyOnMultiple:function(e){-1!==this.focusedMultipleOptionIndex&&this.removeOption(e,this.focusedMultipleOptionIndex)},onOverlayEnter:function(e){r.ZIndexUtils.set("overlay",e,this.$primevue.config.zIndex.overlay),r.DomHandler.addStyles(e,{position:"absolute",top:"0",left:"0"}),this.alignOverlay()},onOverlayAfterEnter:function(){this.bindOutsideClickListener(),this.bindScrollListener(),this.bindResizeListener(),this.$emit("show")},onOverlayLeave:function(){this.unbindOutsideClickListener(),this.unbindScrollListener(),this.unbindResizeListener(),this.$emit("hide"),this.overlay=null},onOverlayAfterLeave:function(e){r.ZIndexUtils.clear(e)},alignOverlay:function(){var e=this.multiple?this.$refs.multiContainer:this.$refs.focusInput;"self"===this.appendTo?r.DomHandler.relativePosition(this.overlay,e):(this.overlay.style.minWidth=r.DomHandler.getOuterWidth(e)+"px",r.DomHandler.absolutePosition(this.overlay,e))},bindOutsideClickListener:function(){var e=this;this.outsideClickListener||(this.outsideClickListener=function(t){e.overlayVisible&&e.overlay&&e.isOutsideClicked(t)&&e.hide()},document.addEventListener("click",this.outsideClickListener))},unbindOutsideClickListener:function(){this.outsideClickListener&&(document.removeEventListener("click",this.outsideClickListener),this.outsideClickListener=null)},bindScrollListener:function(){var e=this;this.scrollHandler||(this.scrollHandler=new r.ConnectedOverlayScrollHandler(this.$refs.container,(function(){e.overlayVisible&&e.hide()}))),this.scrollHandler.bindScrollListener()},unbindScrollListener:function(){this.scrollHandler&&this.scrollHandler.unbindScrollListener()},bindResizeListener:function(){var e=this;this.resizeListener||(this.resizeListener=function(){e.overlayVisible&&!r.DomHandler.isTouchDevice()&&e.hide()},window.addEventListener("resize",this.resizeListener))},unbindResizeListener:function(){this.resizeListener&&(window.removeEventListener("resize",this.resizeListener),this.resizeListener=null)},isOutsideClicked:function(e){return!this.overlay.contains(e.target)&&!this.isInputClicked(e)&&!this.isDropdownClicked(e)},isInputClicked:function(e){return this.multiple?e.target===this.$refs.multiContainer||this.$refs.multiContainer.contains(e.target):e.target===this.$refs.focusInput},isDropdownClicked:function(e){return!!this.$refs.dropdownButton&&(e.target===this.$refs.dropdownButton||this.$refs.dropdownButton.$el.contains(e.target))},isOptionMatched:function(e,t){var i;return this.isValidOption(e)&&(null===(i=this.getOptionLabel(e))||void 0===i?void 0:i.toLocaleLowerCase(this.searchLocale))===t.toLocaleLowerCase(this.searchLocale)},isValidOption:function(e){return r.ObjectUtils.isNotEmpty(e)&&!(this.isOptionDisabled(e)||this.isOptionGroup(e))},isValidSelectedOption:function(e){return this.isValidOption(e)&&this.isSelected(e)},isEquals:function(e,t){return r.ObjectUtils.equals(e,t,this.equalityKey)},isSelected:function(e){var t=this,i=this.getOptionValue(e);return this.multiple?(this.modelValue||[]).some((function(e){return t.isEquals(e,i)})):this.isEquals(this.modelValue,this.getOptionValue(e))},findFirstOptionIndex:function(){var e=this;return this.visibleOptions.findIndex((function(t){return e.isValidOption(t)}))},findLastOptionIndex:function(){var e=this;return r.ObjectUtils.findLastIndex(this.visibleOptions,(function(t){return e.isValidOption(t)}))},findNextOptionIndex:function(e){var t=this,i=e<this.visibleOptions.length-1?this.visibleOptions.slice(e+1).findIndex((function(e){return t.isValidOption(e)})):-1;return i>-1?i+e+1:e},findPrevOptionIndex:function(e){var t=this,i=e>0?r.ObjectUtils.findLastIndex(this.visibleOptions.slice(0,e),(function(e){return t.isValidOption(e)})):-1;return i>-1?i:e},findSelectedOptionIndex:function(){var e=this;return this.hasSelectedOption?this.visibleOptions.findIndex((function(t){return e.isValidSelectedOption(t)})):-1},findFirstFocusedOptionIndex:function(){var e=this.findSelectedOptionIndex();return e<0?this.findFirstOptionIndex():e},findLastFocusedOptionIndex:function(){var e=this.findSelectedOptionIndex();return e<0?this.findLastOptionIndex():e},search:function(e,t,i){null!=t&&("input"===i&&0===t.trim().length||(this.searching=!0,this.$emit("complete",{originalEvent:e,query:t})))},removeOption:function(e,t){var i=this,n=this.modelValue[t],o=this.modelValue.filter((function(e,i){return i!==t})).map((function(e){return i.getOptionValue(e)}));this.updateModel(e,o),this.$emit("item-unselect",{originalEvent:e,value:n}),this.dirty=!0,r.DomHandler.focus(this.$refs.focusInput)},changeFocusedOptionIndex:function(e,t){this.focusedOptionIndex!==t&&(this.focusedOptionIndex=t,this.scrollInView(),(this.selectOnFocus||this.autoHighlight)&&this.onOptionSelect(e,this.visibleOptions[t],!1))},scrollInView:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:-1;this.$nextTick((function(){var i=-1!==t?"".concat(e.id,"_").concat(t):e.focusedOptionId,n=r.DomHandler.findSingle(e.list,'li[id="'.concat(i,'"]'));n?n.scrollIntoView&&n.scrollIntoView({block:"nearest",inline:"start"}):e.virtualScrollerDisabled||e.virtualScroller&&e.virtualScroller.scrollToIndex(-1!==t?t:e.focusedOptionIndex)}))},autoUpdateModel:function(){(this.selectOnFocus||this.autoHighlight)&&this.autoOptionFocus&&!this.hasSelectedOption&&(this.focusedOptionIndex=this.findFirstFocusedOptionIndex(),this.onOptionSelect(null,this.visibleOptions[this.focusedOptionIndex],!1))},updateModel:function(e,t){this.$emit("update:modelValue",t),this.$emit("change",{originalEvent:e,value:t})},flatOptions:function(e){var t=this;return(e||[]).reduce((function(e,i,n){e.push({optionGroup:i,group:!0,index:n});var o=t.getOptionGroupChildren(i);return o&&o.forEach((function(t){return e.push(t)})),e}),[])},overlayRef:function(e){this.overlay=e},listRef:function(e,t){this.list=e,t&&t(e)},virtualScrollerRef:function(e){this.virtualScroller=e}},computed:{visibleOptions:function(){return this.optionGroupLabel?this.flatOptions(this.suggestions):this.suggestions||[]},inputValue:function(){if(r.ObjectUtils.isNotEmpty(this.modelValue)){if("object"===I(this.modelValue)){var e=this.getOptionLabel(this.modelValue);return null!=e?e:this.modelValue}return this.modelValue}return""},hasSelectedOption:function(){return r.ObjectUtils.isNotEmpty(this.modelValue)},equalityKey:function(){return this.dataKey},searchResultMessageText:function(){return r.ObjectUtils.isNotEmpty(this.visibleOptions)&&this.overlayVisible?this.searchMessageText.replaceAll("{0}",this.visibleOptions.length):this.emptySearchMessageText},searchMessageText:function(){return this.searchMessage||this.$primevue.config.locale.searchMessage||""},emptySearchMessageText:function(){return this.emptySearchMessage||this.$primevue.config.locale.emptySearchMessage||""},selectionMessageText:function(){return this.selectionMessage||this.$primevue.config.locale.selectionMessage||""},emptySelectionMessageText:function(){return this.emptySelectionMessage||this.$primevue.config.locale.emptySelectionMessage||""},selectedMessageText:function(){return this.hasSelectedOption?this.selectionMessageText.replaceAll("{0}",this.multiple?this.modelValue.length:"1"):this.emptySelectionMessageText},focusedOptionId:function(){return-1!==this.focusedOptionIndex?"".concat(this.id,"_").concat(this.focusedOptionIndex):null},focusedMultipleOptionId:function(){return-1!==this.focusedMultipleOptionIndex?"".concat(this.id,"_multiple_option_").concat(this.focusedMultipleOptionIndex):null},ariaSetSize:function(){var e=this;return this.visibleOptions.filter((function(t){return!e.isOptionGroup(t)})).length},virtualScrollerDisabled:function(){return!this.virtualScrollerOptions}},components:{Button:h.default,VirtualScroller:g.default,Portal:b.default,ChevronDownIcon:f.default,SpinnerIcon:m.default,TimesCircleIcon:y.default},directives:{ripple:O.default}};function D(e){return D="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},D(e)}function M(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),i.push.apply(i,n)}return i}function B(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?M(Object(i),!0).forEach((function(t){E(e,t,i[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):M(Object(i)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))}))}return e}function E(e,t,i){var n;return(t="symbol"==D(n=$(t,"string"))?n:String(n))in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,e}function $(e,t){if("object"!=D(e)||!e)return e;var i=e[Symbol.toPrimitive];if(void 0!==i){var n=i.call(e,t||"default");if("object"!=D(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}var K=["id","value","placeholder","tabindex","disabled","aria-label","aria-labelledby","aria-expanded","aria-controls","aria-activedescendant","aria-invalid"],P=["aria-activedescendant"],T=["id","aria-label","aria-setsize","aria-posinset"],F=["id","placeholder","tabindex","disabled","aria-label","aria-labelledby","aria-expanded","aria-controls","aria-activedescendant","aria-invalid"],A=["id"],j=["id"],H=["id","aria-label","aria-selected","aria-disabled","aria-setsize","aria-posinset","onClick","onMousemove","data-p-highlight","data-p-focus","data-p-disabled"];V.render=function(e,t,i,n,o,s){var l=d.resolveComponent("SpinnerIcon"),r=d.resolveComponent("Button"),a=d.resolveComponent("VirtualScroller"),u=d.resolveComponent("Portal"),c=d.resolveDirective("ripple");return d.openBlock(),d.createElementBlock("div",d.mergeProps({ref:"container",class:e.cx("root"),style:e.sx("root"),onClick:t[15]||(t[15]=function(){return s.onContainerClick&&s.onContainerClick.apply(s,arguments)})},e.ptmi("root")),[e.multiple?d.createCommentVNode("",!0):(d.openBlock(),d.createElementBlock("input",d.mergeProps({key:0,ref:"focusInput",id:e.inputId,type:"text",class:[e.cx("input"),e.inputClass],style:e.inputStyle,value:s.inputValue,placeholder:e.placeholder,tabindex:e.disabled?-1:e.tabindex,disabled:e.disabled,autocomplete:"off",role:"combobox","aria-label":e.ariaLabel,"aria-labelledby":e.ariaLabelledby,"aria-haspopup":"listbox","aria-autocomplete":"list","aria-expanded":o.overlayVisible,"aria-controls":o.id+"_list","aria-activedescendant":o.focused?s.focusedOptionId:void 0,"aria-invalid":e.invalid||void 0,onFocus:t[0]||(t[0]=function(){return s.onFocus&&s.onFocus.apply(s,arguments)}),onBlur:t[1]||(t[1]=function(){return s.onBlur&&s.onBlur.apply(s,arguments)}),onKeydown:t[2]||(t[2]=function(){return s.onKeyDown&&s.onKeyDown.apply(s,arguments)}),onInput:t[3]||(t[3]=function(){return s.onInput&&s.onInput.apply(s,arguments)}),onChange:t[4]||(t[4]=function(){return s.onChange&&s.onChange.apply(s,arguments)})},B(B({},e.inputProps),e.ptm("input"))),null,16,K)),e.multiple?(d.openBlock(),d.createElementBlock("ul",d.mergeProps({key:1,ref:"multiContainer",class:e.cx("container"),tabindex:"-1",role:"listbox","aria-orientation":"horizontal","aria-activedescendant":o.focused?s.focusedMultipleOptionId:void 0,onFocus:t[10]||(t[10]=function(){return s.onMultipleContainerFocus&&s.onMultipleContainerFocus.apply(s,arguments)}),onBlur:t[11]||(t[11]=function(){return s.onMultipleContainerBlur&&s.onMultipleContainerBlur.apply(s,arguments)}),onKeydown:t[12]||(t[12]=function(){return s.onMultipleContainerKeyDown&&s.onMultipleContainerKeyDown.apply(s,arguments)})},e.ptm("container")),[(d.openBlock(!0),d.createElementBlock(d.Fragment,null,d.renderList(e.modelValue,(function(t,i){return d.openBlock(),d.createElementBlock("li",d.mergeProps({key:i,id:o.id+"_multiple_option_"+i,class:e.cx("token",{i:i}),role:"option","aria-label":s.getOptionLabel(t),"aria-selected":!0,"aria-setsize":e.modelValue.length,"aria-posinset":i+1},e.ptm("token")),[d.renderSlot(e.$slots,"chip",{value:t},(function(){return[d.createElementVNode("span",d.mergeProps({class:e.cx("tokenLabel")},e.ptm("tokenLabel")),d.toDisplayString(s.getOptionLabel(t)),17)]})),d.renderSlot(e.$slots,"removetokenicon",{class:d.normalizeClass(e.cx("removeTokenIcon")),index:i,onClick:function(e){return s.removeOption(e,i)},removeCallback:function(e){return s.removeOption(e,i)}},(function(){return[(d.openBlock(),d.createBlock(d.resolveDynamicComponent(e.removeTokenIcon?"span":"TimesCircleIcon"),d.mergeProps({class:[e.cx("removeTokenIcon"),e.removeTokenIcon],onClick:function(e){return s.removeOption(e,i)},"aria-hidden":"true"},e.ptm("removeTokenIcon")),null,16,["class","onClick"]))]}))],16,T)})),128)),d.createElementVNode("li",d.mergeProps({class:e.cx("inputToken"),role:"option"},e.ptm("inputToken")),[d.createElementVNode("input",d.mergeProps({ref:"focusInput",id:e.inputId,type:"text",style:e.inputStyle,class:e.inputClass,placeholder:e.placeholder,tabindex:e.disabled?-1:e.tabindex,disabled:e.disabled,autocomplete:"off",role:"combobox","aria-label":e.ariaLabel,"aria-labelledby":e.ariaLabelledby,"aria-haspopup":"listbox","aria-autocomplete":"list","aria-expanded":o.overlayVisible,"aria-controls":o.id+"_list","aria-activedescendant":o.focused?s.focusedOptionId:void 0,"aria-invalid":e.invalid||void 0,onFocus:t[5]||(t[5]=function(){return s.onFocus&&s.onFocus.apply(s,arguments)}),onBlur:t[6]||(t[6]=function(){return s.onBlur&&s.onBlur.apply(s,arguments)}),onKeydown:t[7]||(t[7]=function(){return s.onKeyDown&&s.onKeyDown.apply(s,arguments)}),onInput:t[8]||(t[8]=function(){return s.onInput&&s.onInput.apply(s,arguments)}),onChange:t[9]||(t[9]=function(){return s.onChange&&s.onChange.apply(s,arguments)})},B(B({},e.inputProps),e.ptm("input"))),null,16,F)],16)],16,P)):d.createCommentVNode("",!0),o.searching||e.loading?d.renderSlot(e.$slots,"loadingicon",{key:2,class:d.normalizeClass(e.cx("loadingIcon"))},(function(){return[e.loadingIcon?(d.openBlock(),d.createElementBlock("i",d.mergeProps({key:0,class:["pi-spin",e.cx("loadingIcon"),e.loadingIcon],"aria-hidden":"true"},e.ptm("loadingIcon")),null,16)):(d.openBlock(),d.createBlock(l,d.mergeProps({key:1,class:[e.cx("loadingIcon"),e.loadingIcon],spin:"","aria-hidden":"true"},e.ptm("loadingIcon")),null,16,["class"]))]})):d.createCommentVNode("",!0),e.dropdown?(d.openBlock(),d.createBlock(r,{key:3,ref:"dropdownButton",type:"button",tabindex:"-1",class:d.normalizeClass([e.cx("dropdownButton"),e.dropdownClass]),disabled:e.disabled,"aria-hidden":"true",onClick:s.onDropdownClick,unstyled:e.unstyled,pt:e.ptm("dropdownButton")},{icon:d.withCtx((function(){return[d.renderSlot(e.$slots,"dropdownicon",{class:d.normalizeClass(e.dropdownIcon)},(function(){return[(d.openBlock(),d.createBlock(d.resolveDynamicComponent(e.dropdownIcon?"span":"ChevronDownIcon"),d.mergeProps({class:e.dropdownIcon},e.ptm("dropdownButton").icon,{"data-pc-section":"dropdownicon"}),null,16,["class"]))]}))]})),_:3},8,["class","disabled","onClick","unstyled","pt"])):d.createCommentVNode("",!0),d.createElementVNode("span",d.mergeProps({role:"status","aria-live":"polite",class:"p-hidden-accessible"},e.ptm("hiddenSearchResult"),{"data-p-hidden-accessible":!0}),d.toDisplayString(s.searchResultMessageText),17),d.createVNode(u,{appendTo:e.appendTo},{default:d.withCtx((function(){return[d.createVNode(d.Transition,d.mergeProps({name:"p-connected-overlay",onEnter:s.onOverlayEnter,onAfterEnter:s.onOverlayAfterEnter,onLeave:s.onOverlayLeave,onAfterLeave:s.onOverlayAfterLeave},e.ptm("transition")),{default:d.withCtx((function(){return[o.overlayVisible?(d.openBlock(),d.createElementBlock("div",d.mergeProps({key:0,ref:s.overlayRef,class:[e.cx("panel"),e.panelClass],style:B(B({},e.panelStyle),{},{"max-height":s.virtualScrollerDisabled?e.scrollHeight:""}),onClick:t[13]||(t[13]=function(){return s.onOverlayClick&&s.onOverlayClick.apply(s,arguments)}),onKeydown:t[14]||(t[14]=function(){return s.onOverlayKeyDown&&s.onOverlayKeyDown.apply(s,arguments)})},B(B({},e.panelProps),e.ptm("panel"))),[d.renderSlot(e.$slots,"header",{value:e.modelValue,suggestions:s.visibleOptions}),d.createVNode(a,d.mergeProps({ref:s.virtualScrollerRef},e.virtualScrollerOptions,{style:{height:e.scrollHeight},items:s.visibleOptions,tabindex:-1,disabled:s.virtualScrollerDisabled,pt:e.ptm("virtualScroller")}),d.createSlots({content:d.withCtx((function(t){var i=t.styleClass,n=t.contentRef,l=t.items,r=t.getItemOptions,a=t.contentStyle,u=t.itemSize;return[d.createElementVNode("ul",d.mergeProps({ref:function(e){return s.listRef(e,n)},id:o.id+"_list",class:[e.cx("list"),i],style:a,role:"listbox"},e.ptm("list")),[(d.openBlock(!0),d.createElementBlock(d.Fragment,null,d.renderList(l,(function(t,i){return d.openBlock(),d.createElementBlock(d.Fragment,{key:s.getOptionRenderKey(t,s.getOptionIndex(i,r))},[s.isOptionGroup(t)?(d.openBlock(),d.createElementBlock("li",d.mergeProps({key:0,id:o.id+"_"+s.getOptionIndex(i,r),style:{height:u?u+"px":void 0},class:e.cx("itemGroup"),role:"option"},e.ptm("itemGroup")),[d.renderSlot(e.$slots,"optiongroup",{option:t.optionGroup,item:t.optionGroup,index:s.getOptionIndex(i,r)},(function(){return[d.createTextVNode(d.toDisplayString(s.getOptionGroupLabel(t.optionGroup)),1)]}))],16,j)):d.withDirectives((d.openBlock(),d.createElementBlock("li",d.mergeProps({key:1,id:o.id+"_"+s.getOptionIndex(i,r),style:{height:u?u+"px":void 0},class:e.cx("item",{option:t,i:i,getItemOptions:r}),role:"option","aria-label":s.getOptionLabel(t),"aria-selected":s.isSelected(t),"aria-disabled":s.isOptionDisabled(t),"aria-setsize":s.ariaSetSize,"aria-posinset":s.getAriaPosInset(s.getOptionIndex(i,r)),onClick:function(e){return s.onOptionSelect(e,t)},onMousemove:function(e){return s.onOptionMouseMove(e,s.getOptionIndex(i,r))},"data-p-highlight":s.isSelected(t),"data-p-focus":o.focusedOptionIndex===s.getOptionIndex(i,r),"data-p-disabled":s.isOptionDisabled(t)},s.getPTOptions(t,r,i,"item")),[e.$slots.option?d.renderSlot(e.$slots,"option",{key:0,option:t,index:s.getOptionIndex(i,r)},(function(){return[d.createTextVNode(d.toDisplayString(s.getOptionLabel(t)),1)]})):d.renderSlot(e.$slots,"item",{key:1,item:t,index:s.getOptionIndex(i,r)},(function(){return[d.createTextVNode(d.toDisplayString(s.getOptionLabel(t)),1)]}))],16,H)),[[c]])],64)})),128)),!l||l&&0===l.length?(d.openBlock(),d.createElementBlock("li",d.mergeProps({key:0,class:e.cx("emptyMessage"),role:"option"},e.ptm("emptyMessage")),[d.renderSlot(e.$slots,"empty",{},(function(){return[d.createTextVNode(d.toDisplayString(s.searchResultMessageText),1)]}))],16)):d.createCommentVNode("",!0)],16,A)]})),_:2},[e.$slots.loader?{name:"loader",fn:d.withCtx((function(t){return[d.renderSlot(e.$slots,"loader",{options:t.options})]})),key:"0"}:void 0]),1040,["style","items","disabled","pt"]),d.renderSlot(e.$slots,"footer",{value:e.modelValue,suggestions:s.visibleOptions}),d.createElementVNode("span",d.mergeProps({role:"status","aria-live":"polite",class:"p-hidden-accessible"},e.ptm("hiddenSelectedMessage"),{"data-p-hidden-accessible":!0}),d.toDisplayString(s.selectedMessageText),17)],16)):d.createCommentVNode("",!0)]})),_:3},16,["onEnter","onAfterEnter","onLeave","onAfterLeave"])]})),_:3},8,["appendTo"])],16)},module.exports=V;
@@ -226,8 +226,11 @@ var script = {
226
226
  };
227
227
  },
228
228
  watch: {
229
- '$attrs.id': function $attrsId(newValue) {
230
- this.id = newValue || UniqueComponentId();
229
+ '$attrs.id': {
230
+ immediate: true,
231
+ handler: function handler(newValue) {
232
+ this.id = newValue || UniqueComponentId();
233
+ }
231
234
  },
232
235
  suggestions: function suggestions() {
233
236
  if (this.searching) {
@@ -239,7 +242,6 @@ var script = {
239
242
  }
240
243
  },
241
244
  mounted: function mounted() {
242
- this.id = this.id || UniqueComponentId();
243
245
  this.autoUpdateModel();
244
246
  },
245
247
  updated: function updated() {
@@ -735,39 +737,46 @@ var script = {
735
737
  isValidSelectedOption: function isValidSelectedOption(option) {
736
738
  return this.isValidOption(option) && this.isSelected(option);
737
739
  },
740
+ isEquals: function isEquals(value1, value2) {
741
+ return ObjectUtils.equals(value1, value2, this.equalityKey);
742
+ },
738
743
  isSelected: function isSelected(option) {
739
- return ObjectUtils.equals(this.modelValue, this.getOptionValue(option), this.equalityKey);
744
+ var _this8 = this;
745
+ var optionValue = this.getOptionValue(option);
746
+ return this.multiple ? (this.modelValue || []).some(function (value) {
747
+ return _this8.isEquals(value, optionValue);
748
+ }) : this.isEquals(this.modelValue, this.getOptionValue(option));
740
749
  },
741
750
  findFirstOptionIndex: function findFirstOptionIndex() {
742
- var _this8 = this;
751
+ var _this9 = this;
743
752
  return this.visibleOptions.findIndex(function (option) {
744
- return _this8.isValidOption(option);
753
+ return _this9.isValidOption(option);
745
754
  });
746
755
  },
747
756
  findLastOptionIndex: function findLastOptionIndex() {
748
- var _this9 = this;
757
+ var _this10 = this;
749
758
  return ObjectUtils.findLastIndex(this.visibleOptions, function (option) {
750
- return _this9.isValidOption(option);
759
+ return _this10.isValidOption(option);
751
760
  });
752
761
  },
753
762
  findNextOptionIndex: function findNextOptionIndex(index) {
754
- var _this10 = this;
763
+ var _this11 = this;
755
764
  var matchedOptionIndex = index < this.visibleOptions.length - 1 ? this.visibleOptions.slice(index + 1).findIndex(function (option) {
756
- return _this10.isValidOption(option);
765
+ return _this11.isValidOption(option);
757
766
  }) : -1;
758
767
  return matchedOptionIndex > -1 ? matchedOptionIndex + index + 1 : index;
759
768
  },
760
769
  findPrevOptionIndex: function findPrevOptionIndex(index) {
761
- var _this11 = this;
770
+ var _this12 = this;
762
771
  var matchedOptionIndex = index > 0 ? ObjectUtils.findLastIndex(this.visibleOptions.slice(0, index), function (option) {
763
- return _this11.isValidOption(option);
772
+ return _this12.isValidOption(option);
764
773
  }) : -1;
765
774
  return matchedOptionIndex > -1 ? matchedOptionIndex : index;
766
775
  },
767
776
  findSelectedOptionIndex: function findSelectedOptionIndex() {
768
- var _this12 = this;
777
+ var _this13 = this;
769
778
  return this.hasSelectedOption ? this.visibleOptions.findIndex(function (option) {
770
- return _this12.isValidSelectedOption(option);
779
+ return _this13.isValidSelectedOption(option);
771
780
  }) : -1;
772
781
  },
773
782
  findFirstFocusedOptionIndex: function findFirstFocusedOptionIndex() {
@@ -795,12 +804,12 @@ var script = {
795
804
  });
796
805
  },
797
806
  removeOption: function removeOption(event, index) {
798
- var _this13 = this;
807
+ var _this14 = this;
799
808
  var removedOption = this.modelValue[index];
800
809
  var value = this.modelValue.filter(function (_, i) {
801
810
  return i !== index;
802
811
  }).map(function (option) {
803
- return _this13.getOptionValue(option);
812
+ return _this14.getOptionValue(option);
804
813
  });
805
814
  this.updateModel(event, value);
806
815
  this.$emit('item-unselect', {
@@ -820,18 +829,18 @@ var script = {
820
829
  }
821
830
  },
822
831
  scrollInView: function scrollInView() {
823
- var _this14 = this;
832
+ var _this15 = this;
824
833
  var index = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : -1;
825
834
  this.$nextTick(function () {
826
- var id = index !== -1 ? "".concat(_this14.id, "_").concat(index) : _this14.focusedOptionId;
827
- var element = DomHandler.findSingle(_this14.list, "li[id=\"".concat(id, "\"]"));
835
+ var id = index !== -1 ? "".concat(_this15.id, "_").concat(index) : _this15.focusedOptionId;
836
+ var element = DomHandler.findSingle(_this15.list, "li[id=\"".concat(id, "\"]"));
828
837
  if (element) {
829
838
  element.scrollIntoView && element.scrollIntoView({
830
839
  block: 'nearest',
831
840
  inline: 'start'
832
841
  });
833
- } else if (!_this14.virtualScrollerDisabled) {
834
- _this14.virtualScroller && _this14.virtualScroller.scrollToIndex(index !== -1 ? index : _this14.focusedOptionIndex);
842
+ } else if (!_this15.virtualScrollerDisabled) {
843
+ _this15.virtualScroller && _this15.virtualScroller.scrollToIndex(index !== -1 ? index : _this15.focusedOptionIndex);
835
844
  }
836
845
  });
837
846
  },
@@ -849,14 +858,14 @@ var script = {
849
858
  });
850
859
  },
851
860
  flatOptions: function flatOptions(options) {
852
- var _this15 = this;
861
+ var _this16 = this;
853
862
  return (options || []).reduce(function (result, option, index) {
854
863
  result.push({
855
864
  optionGroup: option,
856
865
  group: true,
857
866
  index: index
858
867
  });
859
- var optionGroupChildren = _this15.getOptionGroupChildren(option);
868
+ var optionGroupChildren = _this16.getOptionGroupChildren(option);
860
869
  optionGroupChildren && optionGroupChildren.forEach(function (o) {
861
870
  return result.push(o);
862
871
  });
@@ -921,9 +930,9 @@ var script = {
921
930
  return this.focusedMultipleOptionIndex !== -1 ? "".concat(this.id, "_multiple_option_").concat(this.focusedMultipleOptionIndex) : null;
922
931
  },
923
932
  ariaSetSize: function ariaSetSize() {
924
- var _this16 = this;
933
+ var _this17 = this;
925
934
  return this.visibleOptions.filter(function (option) {
926
- return !_this16.isOptionGroup(option);
935
+ return !_this17.isOptionGroup(option);
927
936
  }).length;
928
937
  },
929
938
  virtualScrollerDisabled: function virtualScrollerDisabled() {
@@ -1 +1 @@
1
- import e from"primevue/button";import t from"primevue/icons/chevrondown";import i from"primevue/icons/spinner";import n from"primevue/icons/timescircle";import o from"primevue/overlayeventbus";import s from"primevue/portal";import l from"primevue/ripple";import{UniqueComponentId as r,ZIndexUtils as a,ObjectUtils as u,DomHandler as c,ConnectedOverlayScrollHandler as d}from"primevue/utils";import p from"primevue/virtualscroller";import h from"primevue/autocomplete/style";import f from"primevue/basecomponent";import{resolveComponent as y,resolveDirective as v,openBlock as m,createElementBlock as b,mergeProps as O,createCommentVNode as g,Fragment as I,renderList as x,renderSlot as S,createElementVNode as w,toDisplayString as k,normalizeClass as L,createBlock as C,resolveDynamicComponent as M,withCtx as V,createVNode as $,Transition as D,createSlots as K,createTextVNode as F,withDirectives as T}from"vue";function A(e){return A="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},A(e)}function E(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function B(e,t){if(e){if("string"==typeof e)return j(e,t);var i=Object.prototype.toString.call(e).slice(8,-1);return"Object"===i&&e.constructor&&(i=e.constructor.name),"Map"===i||"Set"===i?Array.from(e):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?j(e,t):void 0}}function P(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function R(e){if(Array.isArray(e))return j(e)}function j(e,t){(null==t||t>e.length)&&(t=e.length);for(var i=0,n=new Array(t);i<t;i++)n[i]=e[i];return n}var z={name:"AutoComplete",extends:{name:"BaseAutoComplete",extends:f,props:{modelValue:null,suggestions:{type:Array,default:null},field:{type:[String,Function],default:null},optionLabel:null,optionDisabled:null,optionGroupLabel:null,optionGroupChildren:null,scrollHeight:{type:String,default:"200px"},dropdown:{type:Boolean,default:!1},dropdownMode:{type:String,default:"blank"},autoHighlight:{type:Boolean,default:!1},multiple:{type:Boolean,default:!1},loading:{type:Boolean,default:!1},variant:{type:String,default:null},invalid:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},placeholder:{type:String,default:null},dataKey:{type:String,default:null},minLength:{type:Number,default:1},delay:{type:Number,default:300},appendTo:{type:[String,Object],default:"body"},forceSelection:{type:Boolean,default:!1},completeOnFocus:{type:Boolean,default:!1},inputId:{type:String,default:null},inputStyle:{type:Object,default:null},inputClass:{type:[String,Object],default:null},inputProps:{type:null,default:null},panelStyle:{type:Object,default:null},panelClass:{type:[String,Object],default:null},panelProps:{type:null,default:null},dropdownIcon:{type:String,default:void 0},dropdownClass:{type:[String,Object],default:null},loadingIcon:{type:String,default:void 0},removeTokenIcon:{type:String,default:void 0},virtualScrollerOptions:{type:Object,default:null},autoOptionFocus:{type:Boolean,default:!1},selectOnFocus:{type:Boolean,default:!1},focusOnHover:{type:Boolean,default:!0},searchLocale:{type:String,default:void 0},searchMessage:{type:String,default:null},selectionMessage:{type:String,default:null},emptySelectionMessage:{type:String,default:null},emptySearchMessage:{type:String,default:null},tabindex:{type:Number,default:0},ariaLabel:{type:String,default:null},ariaLabelledby:{type:String,default:null}},style:h,provide:function(){return{$parentInstance:this}}},inheritAttrs:!1,emits:["update:modelValue","change","focus","blur","item-select","item-unselect","dropdown-click","clear","complete","before-show","before-hide","show","hide"],outsideClickListener:null,resizeListener:null,scrollHandler:null,overlay:null,virtualScroller:null,searchTimeout:null,dirty:!1,data:function(){return{id:this.$attrs.id,clicked:!1,focused:!1,focusedOptionIndex:-1,focusedMultipleOptionIndex:-1,overlayVisible:!1,searching:!1}},watch:{"$attrs.id":function(e){this.id=e||r()},suggestions:function(){this.searching&&(this.show(),this.focusedOptionIndex=this.overlayVisible&&this.autoOptionFocus?this.findFirstFocusedOptionIndex():-1,this.searching=!1),this.autoUpdateModel()}},mounted:function(){this.id=this.id||r(),this.autoUpdateModel()},updated:function(){this.overlayVisible&&this.alignOverlay()},beforeUnmount:function(){this.unbindOutsideClickListener(),this.unbindResizeListener(),this.scrollHandler&&(this.scrollHandler.destroy(),this.scrollHandler=null),this.overlay&&(a.clear(this.overlay),this.overlay=null)},methods:{getOptionIndex:function(e,t){return this.virtualScrollerDisabled?e:t&&t(e).index},getOptionLabel:function(e){return this.field||this.optionLabel?u.resolveFieldData(e,this.field||this.optionLabel):e},getOptionValue:function(e){return e},getOptionRenderKey:function(e,t){return(this.dataKey?u.resolveFieldData(e,this.dataKey):this.getOptionLabel(e))+"_"+t},getPTOptions:function(e,t,i,n){return this.ptm(n,{context:{selected:this.isSelected(e),focused:this.focusedOptionIndex===this.getOptionIndex(i,t),disabled:this.isOptionDisabled(e)}})},isOptionDisabled:function(e){return!!this.optionDisabled&&u.resolveFieldData(e,this.optionDisabled)},isOptionGroup:function(e){return this.optionGroupLabel&&e.optionGroup&&e.group},getOptionGroupLabel:function(e){return u.resolveFieldData(e,this.optionGroupLabel)},getOptionGroupChildren:function(e){return u.resolveFieldData(e,this.optionGroupChildren)},getAriaPosInset:function(e){var t=this;return(this.optionGroupLabel?e-this.visibleOptions.slice(0,e).filter((function(e){return t.isOptionGroup(e)})).length:e)+1},show:function(e){this.$emit("before-show"),this.dirty=!0,this.overlayVisible=!0,this.focusedOptionIndex=-1!==this.focusedOptionIndex?this.focusedOptionIndex:this.autoOptionFocus?this.findFirstFocusedOptionIndex():-1,e&&c.focus(this.$refs.focusInput)},hide:function(e){var t=this;setTimeout((function(){t.$emit("before-hide"),t.dirty=e,t.overlayVisible=!1,t.clicked=!1,t.focusedOptionIndex=-1,e&&c.focus(t.$refs.focusInput)}),0)},onFocus:function(e){this.disabled||(!this.dirty&&this.completeOnFocus&&this.search(e,e.target.value,"focus"),this.dirty=!0,this.focused=!0,this.overlayVisible&&(this.focusedOptionIndex=-1!==this.focusedOptionIndex?this.focusedOptionIndex:this.overlayVisible&&this.autoOptionFocus?this.findFirstFocusedOptionIndex():-1,this.scrollInView(this.focusedOptionIndex)),this.$emit("focus",e))},onBlur:function(e){this.dirty=!1,this.focused=!1,this.focusedOptionIndex=-1,this.$emit("blur",e)},onKeyDown:function(e){if(this.disabled)e.preventDefault();else{switch(e.code){case"ArrowDown":this.onArrowDownKey(e);break;case"ArrowUp":this.onArrowUpKey(e);break;case"ArrowLeft":this.onArrowLeftKey(e);break;case"ArrowRight":this.onArrowRightKey(e);break;case"Home":this.onHomeKey(e);break;case"End":this.onEndKey(e);break;case"PageDown":this.onPageDownKey(e);break;case"PageUp":this.onPageUpKey(e);break;case"Enter":case"NumpadEnter":this.onEnterKey(e);break;case"Escape":this.onEscapeKey(e);break;case"Tab":this.onTabKey(e);break;case"Backspace":this.onBackspaceKey(e)}this.clicked=!1}},onInput:function(e){var t=this;this.searchTimeout&&clearTimeout(this.searchTimeout);var i=e.target.value;this.multiple||this.updateModel(e,i),0===i.length?(this.hide(),this.$emit("clear")):i.length>=this.minLength?(this.focusedOptionIndex=-1,this.searchTimeout=setTimeout((function(){t.search(e,i,"input")}),this.delay)):this.hide()},onChange:function(e){var t=this;if(this.forceSelection){var i=!1;if(this.visibleOptions&&!this.multiple){var n=this.visibleOptions.find((function(e){return t.isOptionMatched(e,t.$refs.focusInput.value||"")}));void 0!==n&&(i=!0,!this.isSelected(n)&&this.onOptionSelect(e,n))}i||(this.$refs.focusInput.value="",this.$emit("clear"),!this.multiple&&this.updateModel(e,null))}},onMultipleContainerFocus:function(){this.disabled||(this.focused=!0)},onMultipleContainerBlur:function(){this.focusedMultipleOptionIndex=-1,this.focused=!1},onMultipleContainerKeyDown:function(e){if(this.disabled)e.preventDefault();else switch(e.code){case"ArrowLeft":this.onArrowLeftKeyOnMultiple(e);break;case"ArrowRight":this.onArrowRightKeyOnMultiple(e);break;case"Backspace":this.onBackspaceKeyOnMultiple(e)}},onContainerClick:function(e){this.clicked=!0,this.disabled||this.searching||this.loading||this.isInputClicked(e)||this.isDropdownClicked(e)||this.overlay&&this.overlay.contains(e.target)||c.focus(this.$refs.focusInput)},onDropdownClick:function(e){var t=void 0;this.overlayVisible?this.hide(!0):(c.focus(this.$refs.focusInput),t=this.$refs.focusInput.value,"blank"===this.dropdownMode?this.search(e,"","dropdown"):"current"===this.dropdownMode&&this.search(e,t,"dropdown")),this.$emit("dropdown-click",{originalEvent:e,query:t})},onOptionSelect:function(e,t){var i,n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],o=this.getOptionValue(t);this.multiple?(this.$refs.focusInput.value="",this.isSelected(t)||this.updateModel(e,[].concat(R(i=this.modelValue||[])||P(i)||B(i)||E(),[o]))):this.updateModel(e,o),this.$emit("item-select",{originalEvent:e,value:t}),n&&this.hide(!0)},onOptionMouseMove:function(e,t){this.focusOnHover&&this.changeFocusedOptionIndex(e,t)},onOverlayClick:function(e){o.emit("overlay-click",{originalEvent:e,target:this.$el})},onOverlayKeyDown:function(e){if("Escape"===e.code)this.onEscapeKey(e)},onArrowDownKey:function(e){if(this.overlayVisible){var t=-1!==this.focusedOptionIndex?this.findNextOptionIndex(this.focusedOptionIndex):this.clicked?this.findFirstOptionIndex():this.findFirstFocusedOptionIndex();this.changeFocusedOptionIndex(e,t),e.preventDefault()}},onArrowUpKey:function(e){if(this.overlayVisible)if(e.altKey)-1!==this.focusedOptionIndex&&this.onOptionSelect(e,this.visibleOptions[this.focusedOptionIndex]),this.overlayVisible&&this.hide(),e.preventDefault();else{var t=-1!==this.focusedOptionIndex?this.findPrevOptionIndex(this.focusedOptionIndex):this.clicked?this.findLastOptionIndex():this.findLastFocusedOptionIndex();this.changeFocusedOptionIndex(e,t),e.preventDefault()}},onArrowLeftKey:function(e){var t=e.currentTarget;this.focusedOptionIndex=-1,this.multiple&&(u.isEmpty(t.value)&&this.hasSelectedOption?(c.focus(this.$refs.multiContainer),this.focusedMultipleOptionIndex=this.modelValue.length):e.stopPropagation())},onArrowRightKey:function(e){this.focusedOptionIndex=-1,this.multiple&&e.stopPropagation()},onHomeKey:function(e){var t=e.currentTarget;t.setSelectionRange(0,e.shiftKey?t.value.length:0),this.focusedOptionIndex=-1,e.preventDefault()},onEndKey:function(e){var t=e.currentTarget,i=t.value.length;t.setSelectionRange(e.shiftKey?0:i,i),this.focusedOptionIndex=-1,e.preventDefault()},onPageUpKey:function(e){this.scrollInView(0),e.preventDefault()},onPageDownKey:function(e){this.scrollInView(this.visibleOptions.length-1),e.preventDefault()},onEnterKey:function(e){this.overlayVisible?(-1!==this.focusedOptionIndex&&this.onOptionSelect(e,this.visibleOptions[this.focusedOptionIndex]),this.hide()):(this.focusedOptionIndex=-1,this.onArrowDownKey(e)),e.preventDefault()},onEscapeKey:function(e){this.overlayVisible&&this.hide(!0),e.preventDefault()},onTabKey:function(e){-1!==this.focusedOptionIndex&&this.onOptionSelect(e,this.visibleOptions[this.focusedOptionIndex]),this.overlayVisible&&this.hide()},onBackspaceKey:function(e){if(this.multiple){if(u.isNotEmpty(this.modelValue)&&!this.$refs.focusInput.value){var t=this.modelValue[this.modelValue.length-1],i=this.modelValue.slice(0,-1);this.$emit("update:modelValue",i),this.$emit("item-unselect",{originalEvent:e,value:t})}e.stopPropagation()}},onArrowLeftKeyOnMultiple:function(){this.focusedMultipleOptionIndex=this.focusedMultipleOptionIndex<1?0:this.focusedMultipleOptionIndex-1},onArrowRightKeyOnMultiple:function(){this.focusedMultipleOptionIndex++,this.focusedMultipleOptionIndex>this.modelValue.length-1&&(this.focusedMultipleOptionIndex=-1,c.focus(this.$refs.focusInput))},onBackspaceKeyOnMultiple:function(e){-1!==this.focusedMultipleOptionIndex&&this.removeOption(e,this.focusedMultipleOptionIndex)},onOverlayEnter:function(e){a.set("overlay",e,this.$primevue.config.zIndex.overlay),c.addStyles(e,{position:"absolute",top:"0",left:"0"}),this.alignOverlay()},onOverlayAfterEnter:function(){this.bindOutsideClickListener(),this.bindScrollListener(),this.bindResizeListener(),this.$emit("show")},onOverlayLeave:function(){this.unbindOutsideClickListener(),this.unbindScrollListener(),this.unbindResizeListener(),this.$emit("hide"),this.overlay=null},onOverlayAfterLeave:function(e){a.clear(e)},alignOverlay:function(){var e=this.multiple?this.$refs.multiContainer:this.$refs.focusInput;"self"===this.appendTo?c.relativePosition(this.overlay,e):(this.overlay.style.minWidth=c.getOuterWidth(e)+"px",c.absolutePosition(this.overlay,e))},bindOutsideClickListener:function(){var e=this;this.outsideClickListener||(this.outsideClickListener=function(t){e.overlayVisible&&e.overlay&&e.isOutsideClicked(t)&&e.hide()},document.addEventListener("click",this.outsideClickListener))},unbindOutsideClickListener:function(){this.outsideClickListener&&(document.removeEventListener("click",this.outsideClickListener),this.outsideClickListener=null)},bindScrollListener:function(){var e=this;this.scrollHandler||(this.scrollHandler=new d(this.$refs.container,(function(){e.overlayVisible&&e.hide()}))),this.scrollHandler.bindScrollListener()},unbindScrollListener:function(){this.scrollHandler&&this.scrollHandler.unbindScrollListener()},bindResizeListener:function(){var e=this;this.resizeListener||(this.resizeListener=function(){e.overlayVisible&&!c.isTouchDevice()&&e.hide()},window.addEventListener("resize",this.resizeListener))},unbindResizeListener:function(){this.resizeListener&&(window.removeEventListener("resize",this.resizeListener),this.resizeListener=null)},isOutsideClicked:function(e){return!this.overlay.contains(e.target)&&!this.isInputClicked(e)&&!this.isDropdownClicked(e)},isInputClicked:function(e){return this.multiple?e.target===this.$refs.multiContainer||this.$refs.multiContainer.contains(e.target):e.target===this.$refs.focusInput},isDropdownClicked:function(e){return!!this.$refs.dropdownButton&&(e.target===this.$refs.dropdownButton||this.$refs.dropdownButton.$el.contains(e.target))},isOptionMatched:function(e,t){var i;return this.isValidOption(e)&&(null===(i=this.getOptionLabel(e))||void 0===i?void 0:i.toLocaleLowerCase(this.searchLocale))===t.toLocaleLowerCase(this.searchLocale)},isValidOption:function(e){return u.isNotEmpty(e)&&!(this.isOptionDisabled(e)||this.isOptionGroup(e))},isValidSelectedOption:function(e){return this.isValidOption(e)&&this.isSelected(e)},isSelected:function(e){return u.equals(this.modelValue,this.getOptionValue(e),this.equalityKey)},findFirstOptionIndex:function(){var e=this;return this.visibleOptions.findIndex((function(t){return e.isValidOption(t)}))},findLastOptionIndex:function(){var e=this;return u.findLastIndex(this.visibleOptions,(function(t){return e.isValidOption(t)}))},findNextOptionIndex:function(e){var t=this,i=e<this.visibleOptions.length-1?this.visibleOptions.slice(e+1).findIndex((function(e){return t.isValidOption(e)})):-1;return i>-1?i+e+1:e},findPrevOptionIndex:function(e){var t=this,i=e>0?u.findLastIndex(this.visibleOptions.slice(0,e),(function(e){return t.isValidOption(e)})):-1;return i>-1?i:e},findSelectedOptionIndex:function(){var e=this;return this.hasSelectedOption?this.visibleOptions.findIndex((function(t){return e.isValidSelectedOption(t)})):-1},findFirstFocusedOptionIndex:function(){var e=this.findSelectedOptionIndex();return e<0?this.findFirstOptionIndex():e},findLastFocusedOptionIndex:function(){var e=this.findSelectedOptionIndex();return e<0?this.findLastOptionIndex():e},search:function(e,t,i){null!=t&&("input"===i&&0===t.trim().length||(this.searching=!0,this.$emit("complete",{originalEvent:e,query:t})))},removeOption:function(e,t){var i=this,n=this.modelValue[t],o=this.modelValue.filter((function(e,i){return i!==t})).map((function(e){return i.getOptionValue(e)}));this.updateModel(e,o),this.$emit("item-unselect",{originalEvent:e,value:n}),this.dirty=!0,c.focus(this.$refs.focusInput)},changeFocusedOptionIndex:function(e,t){this.focusedOptionIndex!==t&&(this.focusedOptionIndex=t,this.scrollInView(),(this.selectOnFocus||this.autoHighlight)&&this.onOptionSelect(e,this.visibleOptions[t],!1))},scrollInView:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:-1;this.$nextTick((function(){var i=-1!==t?"".concat(e.id,"_").concat(t):e.focusedOptionId,n=c.findSingle(e.list,'li[id="'.concat(i,'"]'));n?n.scrollIntoView&&n.scrollIntoView({block:"nearest",inline:"start"}):e.virtualScrollerDisabled||e.virtualScroller&&e.virtualScroller.scrollToIndex(-1!==t?t:e.focusedOptionIndex)}))},autoUpdateModel:function(){(this.selectOnFocus||this.autoHighlight)&&this.autoOptionFocus&&!this.hasSelectedOption&&(this.focusedOptionIndex=this.findFirstFocusedOptionIndex(),this.onOptionSelect(null,this.visibleOptions[this.focusedOptionIndex],!1))},updateModel:function(e,t){this.$emit("update:modelValue",t),this.$emit("change",{originalEvent:e,value:t})},flatOptions:function(e){var t=this;return(e||[]).reduce((function(e,i,n){e.push({optionGroup:i,group:!0,index:n});var o=t.getOptionGroupChildren(i);return o&&o.forEach((function(t){return e.push(t)})),e}),[])},overlayRef:function(e){this.overlay=e},listRef:function(e,t){this.list=e,t&&t(e)},virtualScrollerRef:function(e){this.virtualScroller=e}},computed:{visibleOptions:function(){return this.optionGroupLabel?this.flatOptions(this.suggestions):this.suggestions||[]},inputValue:function(){if(u.isNotEmpty(this.modelValue)){if("object"===A(this.modelValue)){var e=this.getOptionLabel(this.modelValue);return null!=e?e:this.modelValue}return this.modelValue}return""},hasSelectedOption:function(){return u.isNotEmpty(this.modelValue)},equalityKey:function(){return this.dataKey},searchResultMessageText:function(){return u.isNotEmpty(this.visibleOptions)&&this.overlayVisible?this.searchMessageText.replaceAll("{0}",this.visibleOptions.length):this.emptySearchMessageText},searchMessageText:function(){return this.searchMessage||this.$primevue.config.locale.searchMessage||""},emptySearchMessageText:function(){return this.emptySearchMessage||this.$primevue.config.locale.emptySearchMessage||""},selectionMessageText:function(){return this.selectionMessage||this.$primevue.config.locale.selectionMessage||""},emptySelectionMessageText:function(){return this.emptySelectionMessage||this.$primevue.config.locale.emptySelectionMessage||""},selectedMessageText:function(){return this.hasSelectedOption?this.selectionMessageText.replaceAll("{0}",this.multiple?this.modelValue.length:"1"):this.emptySelectionMessageText},focusedOptionId:function(){return-1!==this.focusedOptionIndex?"".concat(this.id,"_").concat(this.focusedOptionIndex):null},focusedMultipleOptionId:function(){return-1!==this.focusedMultipleOptionIndex?"".concat(this.id,"_multiple_option_").concat(this.focusedMultipleOptionIndex):null},ariaSetSize:function(){var e=this;return this.visibleOptions.filter((function(t){return!e.isOptionGroup(t)})).length},virtualScrollerDisabled:function(){return!this.virtualScrollerOptions}},components:{Button:e,VirtualScroller:p,Portal:s,ChevronDownIcon:t,SpinnerIcon:i,TimesCircleIcon:n},directives:{ripple:l}};function G(e){return G="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},G(e)}function H(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),i.push.apply(i,n)}return i}function _(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?H(Object(i),!0).forEach((function(t){N(e,t,i[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):H(Object(i)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))}))}return e}function N(e,t,i){var n;return(t="symbol"==G(n=U(t,"string"))?n:String(n))in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,e}function U(e,t){if("object"!=G(e)||!e)return e;var i=e[Symbol.toPrimitive];if(void 0!==i){var n=i.call(e,t||"default");if("object"!=G(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}var q=["id","value","placeholder","tabindex","disabled","aria-label","aria-labelledby","aria-expanded","aria-controls","aria-activedescendant","aria-invalid"],W=["aria-activedescendant"],J=["id","aria-label","aria-setsize","aria-posinset"],Q=["id","placeholder","tabindex","disabled","aria-label","aria-labelledby","aria-expanded","aria-controls","aria-activedescendant","aria-invalid"],X=["id"],Y=["id"],Z=["id","aria-label","aria-selected","aria-disabled","aria-setsize","aria-posinset","onClick","onMousemove","data-p-highlight","data-p-focus","data-p-disabled"];z.render=function(e,t,i,n,o,s){var l=y("SpinnerIcon"),r=y("Button"),a=y("VirtualScroller"),u=y("Portal"),c=v("ripple");return m(),b("div",O({ref:"container",class:e.cx("root"),style:e.sx("root"),onClick:t[15]||(t[15]=function(){return s.onContainerClick&&s.onContainerClick.apply(s,arguments)})},e.ptmi("root")),[e.multiple?g("",!0):(m(),b("input",O({key:0,ref:"focusInput",id:e.inputId,type:"text",class:[e.cx("input"),e.inputClass],style:e.inputStyle,value:s.inputValue,placeholder:e.placeholder,tabindex:e.disabled?-1:e.tabindex,disabled:e.disabled,autocomplete:"off",role:"combobox","aria-label":e.ariaLabel,"aria-labelledby":e.ariaLabelledby,"aria-haspopup":"listbox","aria-autocomplete":"list","aria-expanded":o.overlayVisible,"aria-controls":o.id+"_list","aria-activedescendant":o.focused?s.focusedOptionId:void 0,"aria-invalid":e.invalid||void 0,onFocus:t[0]||(t[0]=function(){return s.onFocus&&s.onFocus.apply(s,arguments)}),onBlur:t[1]||(t[1]=function(){return s.onBlur&&s.onBlur.apply(s,arguments)}),onKeydown:t[2]||(t[2]=function(){return s.onKeyDown&&s.onKeyDown.apply(s,arguments)}),onInput:t[3]||(t[3]=function(){return s.onInput&&s.onInput.apply(s,arguments)}),onChange:t[4]||(t[4]=function(){return s.onChange&&s.onChange.apply(s,arguments)})},_(_({},e.inputProps),e.ptm("input"))),null,16,q)),e.multiple?(m(),b("ul",O({key:1,ref:"multiContainer",class:e.cx("container"),tabindex:"-1",role:"listbox","aria-orientation":"horizontal","aria-activedescendant":o.focused?s.focusedMultipleOptionId:void 0,onFocus:t[10]||(t[10]=function(){return s.onMultipleContainerFocus&&s.onMultipleContainerFocus.apply(s,arguments)}),onBlur:t[11]||(t[11]=function(){return s.onMultipleContainerBlur&&s.onMultipleContainerBlur.apply(s,arguments)}),onKeydown:t[12]||(t[12]=function(){return s.onMultipleContainerKeyDown&&s.onMultipleContainerKeyDown.apply(s,arguments)})},e.ptm("container")),[(m(!0),b(I,null,x(e.modelValue,(function(t,i){return m(),b("li",O({key:i,id:o.id+"_multiple_option_"+i,class:e.cx("token",{i:i}),role:"option","aria-label":s.getOptionLabel(t),"aria-selected":!0,"aria-setsize":e.modelValue.length,"aria-posinset":i+1},e.ptm("token")),[S(e.$slots,"chip",{value:t},(function(){return[w("span",O({class:e.cx("tokenLabel")},e.ptm("tokenLabel")),k(s.getOptionLabel(t)),17)]})),S(e.$slots,"removetokenicon",{class:L(e.cx("removeTokenIcon")),index:i,onClick:function(e){return s.removeOption(e,i)},removeCallback:function(e){return s.removeOption(e,i)}},(function(){return[(m(),C(M(e.removeTokenIcon?"span":"TimesCircleIcon"),O({class:[e.cx("removeTokenIcon"),e.removeTokenIcon],onClick:function(e){return s.removeOption(e,i)},"aria-hidden":"true"},e.ptm("removeTokenIcon")),null,16,["class","onClick"]))]}))],16,J)})),128)),w("li",O({class:e.cx("inputToken"),role:"option"},e.ptm("inputToken")),[w("input",O({ref:"focusInput",id:e.inputId,type:"text",style:e.inputStyle,class:e.inputClass,placeholder:e.placeholder,tabindex:e.disabled?-1:e.tabindex,disabled:e.disabled,autocomplete:"off",role:"combobox","aria-label":e.ariaLabel,"aria-labelledby":e.ariaLabelledby,"aria-haspopup":"listbox","aria-autocomplete":"list","aria-expanded":o.overlayVisible,"aria-controls":o.id+"_list","aria-activedescendant":o.focused?s.focusedOptionId:void 0,"aria-invalid":e.invalid||void 0,onFocus:t[5]||(t[5]=function(){return s.onFocus&&s.onFocus.apply(s,arguments)}),onBlur:t[6]||(t[6]=function(){return s.onBlur&&s.onBlur.apply(s,arguments)}),onKeydown:t[7]||(t[7]=function(){return s.onKeyDown&&s.onKeyDown.apply(s,arguments)}),onInput:t[8]||(t[8]=function(){return s.onInput&&s.onInput.apply(s,arguments)}),onChange:t[9]||(t[9]=function(){return s.onChange&&s.onChange.apply(s,arguments)})},_(_({},e.inputProps),e.ptm("input"))),null,16,Q)],16)],16,W)):g("",!0),o.searching||e.loading?S(e.$slots,"loadingicon",{key:2,class:L(e.cx("loadingIcon"))},(function(){return[e.loadingIcon?(m(),b("i",O({key:0,class:["pi-spin",e.cx("loadingIcon"),e.loadingIcon],"aria-hidden":"true"},e.ptm("loadingIcon")),null,16)):(m(),C(l,O({key:1,class:[e.cx("loadingIcon"),e.loadingIcon],spin:"","aria-hidden":"true"},e.ptm("loadingIcon")),null,16,["class"]))]})):g("",!0),e.dropdown?(m(),C(r,{key:3,ref:"dropdownButton",type:"button",tabindex:"-1",class:L([e.cx("dropdownButton"),e.dropdownClass]),disabled:e.disabled,"aria-hidden":"true",onClick:s.onDropdownClick,unstyled:e.unstyled,pt:e.ptm("dropdownButton")},{icon:V((function(){return[S(e.$slots,"dropdownicon",{class:L(e.dropdownIcon)},(function(){return[(m(),C(M(e.dropdownIcon?"span":"ChevronDownIcon"),O({class:e.dropdownIcon},e.ptm("dropdownButton").icon,{"data-pc-section":"dropdownicon"}),null,16,["class"]))]}))]})),_:3},8,["class","disabled","onClick","unstyled","pt"])):g("",!0),w("span",O({role:"status","aria-live":"polite",class:"p-hidden-accessible"},e.ptm("hiddenSearchResult"),{"data-p-hidden-accessible":!0}),k(s.searchResultMessageText),17),$(u,{appendTo:e.appendTo},{default:V((function(){return[$(D,O({name:"p-connected-overlay",onEnter:s.onOverlayEnter,onAfterEnter:s.onOverlayAfterEnter,onLeave:s.onOverlayLeave,onAfterLeave:s.onOverlayAfterLeave},e.ptm("transition")),{default:V((function(){return[o.overlayVisible?(m(),b("div",O({key:0,ref:s.overlayRef,class:[e.cx("panel"),e.panelClass],style:_(_({},e.panelStyle),{},{"max-height":s.virtualScrollerDisabled?e.scrollHeight:""}),onClick:t[13]||(t[13]=function(){return s.onOverlayClick&&s.onOverlayClick.apply(s,arguments)}),onKeydown:t[14]||(t[14]=function(){return s.onOverlayKeyDown&&s.onOverlayKeyDown.apply(s,arguments)})},_(_({},e.panelProps),e.ptm("panel"))),[S(e.$slots,"header",{value:e.modelValue,suggestions:s.visibleOptions}),$(a,O({ref:s.virtualScrollerRef},e.virtualScrollerOptions,{style:{height:e.scrollHeight},items:s.visibleOptions,tabindex:-1,disabled:s.virtualScrollerDisabled,pt:e.ptm("virtualScroller")}),K({content:V((function(t){var i=t.styleClass,n=t.contentRef,l=t.items,r=t.getItemOptions,a=t.contentStyle,u=t.itemSize;return[w("ul",O({ref:function(e){return s.listRef(e,n)},id:o.id+"_list",class:[e.cx("list"),i],style:a,role:"listbox"},e.ptm("list")),[(m(!0),b(I,null,x(l,(function(t,i){return m(),b(I,{key:s.getOptionRenderKey(t,s.getOptionIndex(i,r))},[s.isOptionGroup(t)?(m(),b("li",O({key:0,id:o.id+"_"+s.getOptionIndex(i,r),style:{height:u?u+"px":void 0},class:e.cx("itemGroup"),role:"option"},e.ptm("itemGroup")),[S(e.$slots,"optiongroup",{option:t.optionGroup,item:t.optionGroup,index:s.getOptionIndex(i,r)},(function(){return[F(k(s.getOptionGroupLabel(t.optionGroup)),1)]}))],16,Y)):T((m(),b("li",O({key:1,id:o.id+"_"+s.getOptionIndex(i,r),style:{height:u?u+"px":void 0},class:e.cx("item",{option:t,i:i,getItemOptions:r}),role:"option","aria-label":s.getOptionLabel(t),"aria-selected":s.isSelected(t),"aria-disabled":s.isOptionDisabled(t),"aria-setsize":s.ariaSetSize,"aria-posinset":s.getAriaPosInset(s.getOptionIndex(i,r)),onClick:function(e){return s.onOptionSelect(e,t)},onMousemove:function(e){return s.onOptionMouseMove(e,s.getOptionIndex(i,r))},"data-p-highlight":s.isSelected(t),"data-p-focus":o.focusedOptionIndex===s.getOptionIndex(i,r),"data-p-disabled":s.isOptionDisabled(t)},s.getPTOptions(t,r,i,"item")),[e.$slots.option?S(e.$slots,"option",{key:0,option:t,index:s.getOptionIndex(i,r)},(function(){return[F(k(s.getOptionLabel(t)),1)]})):S(e.$slots,"item",{key:1,item:t,index:s.getOptionIndex(i,r)},(function(){return[F(k(s.getOptionLabel(t)),1)]}))],16,Z)),[[c]])],64)})),128)),!l||l&&0===l.length?(m(),b("li",O({key:0,class:e.cx("emptyMessage"),role:"option"},e.ptm("emptyMessage")),[S(e.$slots,"empty",{},(function(){return[F(k(s.searchResultMessageText),1)]}))],16)):g("",!0)],16,X)]})),_:2},[e.$slots.loader?{name:"loader",fn:V((function(t){return[S(e.$slots,"loader",{options:t.options})]})),key:"0"}:void 0]),1040,["style","items","disabled","pt"]),S(e.$slots,"footer",{value:e.modelValue,suggestions:s.visibleOptions}),w("span",O({role:"status","aria-live":"polite",class:"p-hidden-accessible"},e.ptm("hiddenSelectedMessage"),{"data-p-hidden-accessible":!0}),k(s.selectedMessageText),17)],16)):g("",!0)]})),_:3},16,["onEnter","onAfterEnter","onLeave","onAfterLeave"])]})),_:3},8,["appendTo"])],16)};export{z as default};
1
+ import e from"primevue/button";import t from"primevue/icons/chevrondown";import i from"primevue/icons/spinner";import n from"primevue/icons/timescircle";import o from"primevue/overlayeventbus";import s from"primevue/portal";import l from"primevue/ripple";import{UniqueComponentId as r,ZIndexUtils as a,ObjectUtils as u,DomHandler as c,ConnectedOverlayScrollHandler as d}from"primevue/utils";import p from"primevue/virtualscroller";import h from"primevue/autocomplete/style";import f from"primevue/basecomponent";import{resolveComponent as y,resolveDirective as v,openBlock as m,createElementBlock as b,mergeProps as O,createCommentVNode as g,Fragment as I,renderList as x,renderSlot as S,createElementVNode as w,toDisplayString as k,normalizeClass as L,createBlock as C,resolveDynamicComponent as M,withCtx as V,createVNode as $,Transition as D,createSlots as K,createTextVNode as F,withDirectives as T}from"vue";function E(e){return E="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},E(e)}function A(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function B(e,t){if(e){if("string"==typeof e)return j(e,t);var i=Object.prototype.toString.call(e).slice(8,-1);return"Object"===i&&e.constructor&&(i=e.constructor.name),"Map"===i||"Set"===i?Array.from(e):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?j(e,t):void 0}}function P(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function R(e){if(Array.isArray(e))return j(e)}function j(e,t){(null==t||t>e.length)&&(t=e.length);for(var i=0,n=new Array(t);i<t;i++)n[i]=e[i];return n}var z={name:"AutoComplete",extends:{name:"BaseAutoComplete",extends:f,props:{modelValue:null,suggestions:{type:Array,default:null},field:{type:[String,Function],default:null},optionLabel:null,optionDisabled:null,optionGroupLabel:null,optionGroupChildren:null,scrollHeight:{type:String,default:"200px"},dropdown:{type:Boolean,default:!1},dropdownMode:{type:String,default:"blank"},autoHighlight:{type:Boolean,default:!1},multiple:{type:Boolean,default:!1},loading:{type:Boolean,default:!1},variant:{type:String,default:null},invalid:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},placeholder:{type:String,default:null},dataKey:{type:String,default:null},minLength:{type:Number,default:1},delay:{type:Number,default:300},appendTo:{type:[String,Object],default:"body"},forceSelection:{type:Boolean,default:!1},completeOnFocus:{type:Boolean,default:!1},inputId:{type:String,default:null},inputStyle:{type:Object,default:null},inputClass:{type:[String,Object],default:null},inputProps:{type:null,default:null},panelStyle:{type:Object,default:null},panelClass:{type:[String,Object],default:null},panelProps:{type:null,default:null},dropdownIcon:{type:String,default:void 0},dropdownClass:{type:[String,Object],default:null},loadingIcon:{type:String,default:void 0},removeTokenIcon:{type:String,default:void 0},virtualScrollerOptions:{type:Object,default:null},autoOptionFocus:{type:Boolean,default:!1},selectOnFocus:{type:Boolean,default:!1},focusOnHover:{type:Boolean,default:!0},searchLocale:{type:String,default:void 0},searchMessage:{type:String,default:null},selectionMessage:{type:String,default:null},emptySelectionMessage:{type:String,default:null},emptySearchMessage:{type:String,default:null},tabindex:{type:Number,default:0},ariaLabel:{type:String,default:null},ariaLabelledby:{type:String,default:null}},style:h,provide:function(){return{$parentInstance:this}}},inheritAttrs:!1,emits:["update:modelValue","change","focus","blur","item-select","item-unselect","dropdown-click","clear","complete","before-show","before-hide","show","hide"],outsideClickListener:null,resizeListener:null,scrollHandler:null,overlay:null,virtualScroller:null,searchTimeout:null,dirty:!1,data:function(){return{id:this.$attrs.id,clicked:!1,focused:!1,focusedOptionIndex:-1,focusedMultipleOptionIndex:-1,overlayVisible:!1,searching:!1}},watch:{"$attrs.id":{immediate:!0,handler:function(e){this.id=e||r()}},suggestions:function(){this.searching&&(this.show(),this.focusedOptionIndex=this.overlayVisible&&this.autoOptionFocus?this.findFirstFocusedOptionIndex():-1,this.searching=!1),this.autoUpdateModel()}},mounted:function(){this.autoUpdateModel()},updated:function(){this.overlayVisible&&this.alignOverlay()},beforeUnmount:function(){this.unbindOutsideClickListener(),this.unbindResizeListener(),this.scrollHandler&&(this.scrollHandler.destroy(),this.scrollHandler=null),this.overlay&&(a.clear(this.overlay),this.overlay=null)},methods:{getOptionIndex:function(e,t){return this.virtualScrollerDisabled?e:t&&t(e).index},getOptionLabel:function(e){return this.field||this.optionLabel?u.resolveFieldData(e,this.field||this.optionLabel):e},getOptionValue:function(e){return e},getOptionRenderKey:function(e,t){return(this.dataKey?u.resolveFieldData(e,this.dataKey):this.getOptionLabel(e))+"_"+t},getPTOptions:function(e,t,i,n){return this.ptm(n,{context:{selected:this.isSelected(e),focused:this.focusedOptionIndex===this.getOptionIndex(i,t),disabled:this.isOptionDisabled(e)}})},isOptionDisabled:function(e){return!!this.optionDisabled&&u.resolveFieldData(e,this.optionDisabled)},isOptionGroup:function(e){return this.optionGroupLabel&&e.optionGroup&&e.group},getOptionGroupLabel:function(e){return u.resolveFieldData(e,this.optionGroupLabel)},getOptionGroupChildren:function(e){return u.resolveFieldData(e,this.optionGroupChildren)},getAriaPosInset:function(e){var t=this;return(this.optionGroupLabel?e-this.visibleOptions.slice(0,e).filter((function(e){return t.isOptionGroup(e)})).length:e)+1},show:function(e){this.$emit("before-show"),this.dirty=!0,this.overlayVisible=!0,this.focusedOptionIndex=-1!==this.focusedOptionIndex?this.focusedOptionIndex:this.autoOptionFocus?this.findFirstFocusedOptionIndex():-1,e&&c.focus(this.$refs.focusInput)},hide:function(e){var t=this;setTimeout((function(){t.$emit("before-hide"),t.dirty=e,t.overlayVisible=!1,t.clicked=!1,t.focusedOptionIndex=-1,e&&c.focus(t.$refs.focusInput)}),0)},onFocus:function(e){this.disabled||(!this.dirty&&this.completeOnFocus&&this.search(e,e.target.value,"focus"),this.dirty=!0,this.focused=!0,this.overlayVisible&&(this.focusedOptionIndex=-1!==this.focusedOptionIndex?this.focusedOptionIndex:this.overlayVisible&&this.autoOptionFocus?this.findFirstFocusedOptionIndex():-1,this.scrollInView(this.focusedOptionIndex)),this.$emit("focus",e))},onBlur:function(e){this.dirty=!1,this.focused=!1,this.focusedOptionIndex=-1,this.$emit("blur",e)},onKeyDown:function(e){if(this.disabled)e.preventDefault();else{switch(e.code){case"ArrowDown":this.onArrowDownKey(e);break;case"ArrowUp":this.onArrowUpKey(e);break;case"ArrowLeft":this.onArrowLeftKey(e);break;case"ArrowRight":this.onArrowRightKey(e);break;case"Home":this.onHomeKey(e);break;case"End":this.onEndKey(e);break;case"PageDown":this.onPageDownKey(e);break;case"PageUp":this.onPageUpKey(e);break;case"Enter":case"NumpadEnter":this.onEnterKey(e);break;case"Escape":this.onEscapeKey(e);break;case"Tab":this.onTabKey(e);break;case"Backspace":this.onBackspaceKey(e)}this.clicked=!1}},onInput:function(e){var t=this;this.searchTimeout&&clearTimeout(this.searchTimeout);var i=e.target.value;this.multiple||this.updateModel(e,i),0===i.length?(this.hide(),this.$emit("clear")):i.length>=this.minLength?(this.focusedOptionIndex=-1,this.searchTimeout=setTimeout((function(){t.search(e,i,"input")}),this.delay)):this.hide()},onChange:function(e){var t=this;if(this.forceSelection){var i=!1;if(this.visibleOptions&&!this.multiple){var n=this.visibleOptions.find((function(e){return t.isOptionMatched(e,t.$refs.focusInput.value||"")}));void 0!==n&&(i=!0,!this.isSelected(n)&&this.onOptionSelect(e,n))}i||(this.$refs.focusInput.value="",this.$emit("clear"),!this.multiple&&this.updateModel(e,null))}},onMultipleContainerFocus:function(){this.disabled||(this.focused=!0)},onMultipleContainerBlur:function(){this.focusedMultipleOptionIndex=-1,this.focused=!1},onMultipleContainerKeyDown:function(e){if(this.disabled)e.preventDefault();else switch(e.code){case"ArrowLeft":this.onArrowLeftKeyOnMultiple(e);break;case"ArrowRight":this.onArrowRightKeyOnMultiple(e);break;case"Backspace":this.onBackspaceKeyOnMultiple(e)}},onContainerClick:function(e){this.clicked=!0,this.disabled||this.searching||this.loading||this.isInputClicked(e)||this.isDropdownClicked(e)||this.overlay&&this.overlay.contains(e.target)||c.focus(this.$refs.focusInput)},onDropdownClick:function(e){var t=void 0;this.overlayVisible?this.hide(!0):(c.focus(this.$refs.focusInput),t=this.$refs.focusInput.value,"blank"===this.dropdownMode?this.search(e,"","dropdown"):"current"===this.dropdownMode&&this.search(e,t,"dropdown")),this.$emit("dropdown-click",{originalEvent:e,query:t})},onOptionSelect:function(e,t){var i,n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],o=this.getOptionValue(t);this.multiple?(this.$refs.focusInput.value="",this.isSelected(t)||this.updateModel(e,[].concat(R(i=this.modelValue||[])||P(i)||B(i)||A(),[o]))):this.updateModel(e,o),this.$emit("item-select",{originalEvent:e,value:t}),n&&this.hide(!0)},onOptionMouseMove:function(e,t){this.focusOnHover&&this.changeFocusedOptionIndex(e,t)},onOverlayClick:function(e){o.emit("overlay-click",{originalEvent:e,target:this.$el})},onOverlayKeyDown:function(e){if("Escape"===e.code)this.onEscapeKey(e)},onArrowDownKey:function(e){if(this.overlayVisible){var t=-1!==this.focusedOptionIndex?this.findNextOptionIndex(this.focusedOptionIndex):this.clicked?this.findFirstOptionIndex():this.findFirstFocusedOptionIndex();this.changeFocusedOptionIndex(e,t),e.preventDefault()}},onArrowUpKey:function(e){if(this.overlayVisible)if(e.altKey)-1!==this.focusedOptionIndex&&this.onOptionSelect(e,this.visibleOptions[this.focusedOptionIndex]),this.overlayVisible&&this.hide(),e.preventDefault();else{var t=-1!==this.focusedOptionIndex?this.findPrevOptionIndex(this.focusedOptionIndex):this.clicked?this.findLastOptionIndex():this.findLastFocusedOptionIndex();this.changeFocusedOptionIndex(e,t),e.preventDefault()}},onArrowLeftKey:function(e){var t=e.currentTarget;this.focusedOptionIndex=-1,this.multiple&&(u.isEmpty(t.value)&&this.hasSelectedOption?(c.focus(this.$refs.multiContainer),this.focusedMultipleOptionIndex=this.modelValue.length):e.stopPropagation())},onArrowRightKey:function(e){this.focusedOptionIndex=-1,this.multiple&&e.stopPropagation()},onHomeKey:function(e){var t=e.currentTarget;t.setSelectionRange(0,e.shiftKey?t.value.length:0),this.focusedOptionIndex=-1,e.preventDefault()},onEndKey:function(e){var t=e.currentTarget,i=t.value.length;t.setSelectionRange(e.shiftKey?0:i,i),this.focusedOptionIndex=-1,e.preventDefault()},onPageUpKey:function(e){this.scrollInView(0),e.preventDefault()},onPageDownKey:function(e){this.scrollInView(this.visibleOptions.length-1),e.preventDefault()},onEnterKey:function(e){this.overlayVisible?(-1!==this.focusedOptionIndex&&this.onOptionSelect(e,this.visibleOptions[this.focusedOptionIndex]),this.hide()):(this.focusedOptionIndex=-1,this.onArrowDownKey(e)),e.preventDefault()},onEscapeKey:function(e){this.overlayVisible&&this.hide(!0),e.preventDefault()},onTabKey:function(e){-1!==this.focusedOptionIndex&&this.onOptionSelect(e,this.visibleOptions[this.focusedOptionIndex]),this.overlayVisible&&this.hide()},onBackspaceKey:function(e){if(this.multiple){if(u.isNotEmpty(this.modelValue)&&!this.$refs.focusInput.value){var t=this.modelValue[this.modelValue.length-1],i=this.modelValue.slice(0,-1);this.$emit("update:modelValue",i),this.$emit("item-unselect",{originalEvent:e,value:t})}e.stopPropagation()}},onArrowLeftKeyOnMultiple:function(){this.focusedMultipleOptionIndex=this.focusedMultipleOptionIndex<1?0:this.focusedMultipleOptionIndex-1},onArrowRightKeyOnMultiple:function(){this.focusedMultipleOptionIndex++,this.focusedMultipleOptionIndex>this.modelValue.length-1&&(this.focusedMultipleOptionIndex=-1,c.focus(this.$refs.focusInput))},onBackspaceKeyOnMultiple:function(e){-1!==this.focusedMultipleOptionIndex&&this.removeOption(e,this.focusedMultipleOptionIndex)},onOverlayEnter:function(e){a.set("overlay",e,this.$primevue.config.zIndex.overlay),c.addStyles(e,{position:"absolute",top:"0",left:"0"}),this.alignOverlay()},onOverlayAfterEnter:function(){this.bindOutsideClickListener(),this.bindScrollListener(),this.bindResizeListener(),this.$emit("show")},onOverlayLeave:function(){this.unbindOutsideClickListener(),this.unbindScrollListener(),this.unbindResizeListener(),this.$emit("hide"),this.overlay=null},onOverlayAfterLeave:function(e){a.clear(e)},alignOverlay:function(){var e=this.multiple?this.$refs.multiContainer:this.$refs.focusInput;"self"===this.appendTo?c.relativePosition(this.overlay,e):(this.overlay.style.minWidth=c.getOuterWidth(e)+"px",c.absolutePosition(this.overlay,e))},bindOutsideClickListener:function(){var e=this;this.outsideClickListener||(this.outsideClickListener=function(t){e.overlayVisible&&e.overlay&&e.isOutsideClicked(t)&&e.hide()},document.addEventListener("click",this.outsideClickListener))},unbindOutsideClickListener:function(){this.outsideClickListener&&(document.removeEventListener("click",this.outsideClickListener),this.outsideClickListener=null)},bindScrollListener:function(){var e=this;this.scrollHandler||(this.scrollHandler=new d(this.$refs.container,(function(){e.overlayVisible&&e.hide()}))),this.scrollHandler.bindScrollListener()},unbindScrollListener:function(){this.scrollHandler&&this.scrollHandler.unbindScrollListener()},bindResizeListener:function(){var e=this;this.resizeListener||(this.resizeListener=function(){e.overlayVisible&&!c.isTouchDevice()&&e.hide()},window.addEventListener("resize",this.resizeListener))},unbindResizeListener:function(){this.resizeListener&&(window.removeEventListener("resize",this.resizeListener),this.resizeListener=null)},isOutsideClicked:function(e){return!this.overlay.contains(e.target)&&!this.isInputClicked(e)&&!this.isDropdownClicked(e)},isInputClicked:function(e){return this.multiple?e.target===this.$refs.multiContainer||this.$refs.multiContainer.contains(e.target):e.target===this.$refs.focusInput},isDropdownClicked:function(e){return!!this.$refs.dropdownButton&&(e.target===this.$refs.dropdownButton||this.$refs.dropdownButton.$el.contains(e.target))},isOptionMatched:function(e,t){var i;return this.isValidOption(e)&&(null===(i=this.getOptionLabel(e))||void 0===i?void 0:i.toLocaleLowerCase(this.searchLocale))===t.toLocaleLowerCase(this.searchLocale)},isValidOption:function(e){return u.isNotEmpty(e)&&!(this.isOptionDisabled(e)||this.isOptionGroup(e))},isValidSelectedOption:function(e){return this.isValidOption(e)&&this.isSelected(e)},isEquals:function(e,t){return u.equals(e,t,this.equalityKey)},isSelected:function(e){var t=this,i=this.getOptionValue(e);return this.multiple?(this.modelValue||[]).some((function(e){return t.isEquals(e,i)})):this.isEquals(this.modelValue,this.getOptionValue(e))},findFirstOptionIndex:function(){var e=this;return this.visibleOptions.findIndex((function(t){return e.isValidOption(t)}))},findLastOptionIndex:function(){var e=this;return u.findLastIndex(this.visibleOptions,(function(t){return e.isValidOption(t)}))},findNextOptionIndex:function(e){var t=this,i=e<this.visibleOptions.length-1?this.visibleOptions.slice(e+1).findIndex((function(e){return t.isValidOption(e)})):-1;return i>-1?i+e+1:e},findPrevOptionIndex:function(e){var t=this,i=e>0?u.findLastIndex(this.visibleOptions.slice(0,e),(function(e){return t.isValidOption(e)})):-1;return i>-1?i:e},findSelectedOptionIndex:function(){var e=this;return this.hasSelectedOption?this.visibleOptions.findIndex((function(t){return e.isValidSelectedOption(t)})):-1},findFirstFocusedOptionIndex:function(){var e=this.findSelectedOptionIndex();return e<0?this.findFirstOptionIndex():e},findLastFocusedOptionIndex:function(){var e=this.findSelectedOptionIndex();return e<0?this.findLastOptionIndex():e},search:function(e,t,i){null!=t&&("input"===i&&0===t.trim().length||(this.searching=!0,this.$emit("complete",{originalEvent:e,query:t})))},removeOption:function(e,t){var i=this,n=this.modelValue[t],o=this.modelValue.filter((function(e,i){return i!==t})).map((function(e){return i.getOptionValue(e)}));this.updateModel(e,o),this.$emit("item-unselect",{originalEvent:e,value:n}),this.dirty=!0,c.focus(this.$refs.focusInput)},changeFocusedOptionIndex:function(e,t){this.focusedOptionIndex!==t&&(this.focusedOptionIndex=t,this.scrollInView(),(this.selectOnFocus||this.autoHighlight)&&this.onOptionSelect(e,this.visibleOptions[t],!1))},scrollInView:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:-1;this.$nextTick((function(){var i=-1!==t?"".concat(e.id,"_").concat(t):e.focusedOptionId,n=c.findSingle(e.list,'li[id="'.concat(i,'"]'));n?n.scrollIntoView&&n.scrollIntoView({block:"nearest",inline:"start"}):e.virtualScrollerDisabled||e.virtualScroller&&e.virtualScroller.scrollToIndex(-1!==t?t:e.focusedOptionIndex)}))},autoUpdateModel:function(){(this.selectOnFocus||this.autoHighlight)&&this.autoOptionFocus&&!this.hasSelectedOption&&(this.focusedOptionIndex=this.findFirstFocusedOptionIndex(),this.onOptionSelect(null,this.visibleOptions[this.focusedOptionIndex],!1))},updateModel:function(e,t){this.$emit("update:modelValue",t),this.$emit("change",{originalEvent:e,value:t})},flatOptions:function(e){var t=this;return(e||[]).reduce((function(e,i,n){e.push({optionGroup:i,group:!0,index:n});var o=t.getOptionGroupChildren(i);return o&&o.forEach((function(t){return e.push(t)})),e}),[])},overlayRef:function(e){this.overlay=e},listRef:function(e,t){this.list=e,t&&t(e)},virtualScrollerRef:function(e){this.virtualScroller=e}},computed:{visibleOptions:function(){return this.optionGroupLabel?this.flatOptions(this.suggestions):this.suggestions||[]},inputValue:function(){if(u.isNotEmpty(this.modelValue)){if("object"===E(this.modelValue)){var e=this.getOptionLabel(this.modelValue);return null!=e?e:this.modelValue}return this.modelValue}return""},hasSelectedOption:function(){return u.isNotEmpty(this.modelValue)},equalityKey:function(){return this.dataKey},searchResultMessageText:function(){return u.isNotEmpty(this.visibleOptions)&&this.overlayVisible?this.searchMessageText.replaceAll("{0}",this.visibleOptions.length):this.emptySearchMessageText},searchMessageText:function(){return this.searchMessage||this.$primevue.config.locale.searchMessage||""},emptySearchMessageText:function(){return this.emptySearchMessage||this.$primevue.config.locale.emptySearchMessage||""},selectionMessageText:function(){return this.selectionMessage||this.$primevue.config.locale.selectionMessage||""},emptySelectionMessageText:function(){return this.emptySelectionMessage||this.$primevue.config.locale.emptySelectionMessage||""},selectedMessageText:function(){return this.hasSelectedOption?this.selectionMessageText.replaceAll("{0}",this.multiple?this.modelValue.length:"1"):this.emptySelectionMessageText},focusedOptionId:function(){return-1!==this.focusedOptionIndex?"".concat(this.id,"_").concat(this.focusedOptionIndex):null},focusedMultipleOptionId:function(){return-1!==this.focusedMultipleOptionIndex?"".concat(this.id,"_multiple_option_").concat(this.focusedMultipleOptionIndex):null},ariaSetSize:function(){var e=this;return this.visibleOptions.filter((function(t){return!e.isOptionGroup(t)})).length},virtualScrollerDisabled:function(){return!this.virtualScrollerOptions}},components:{Button:e,VirtualScroller:p,Portal:s,ChevronDownIcon:t,SpinnerIcon:i,TimesCircleIcon:n},directives:{ripple:l}};function G(e){return G="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},G(e)}function H(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),i.push.apply(i,n)}return i}function _(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?H(Object(i),!0).forEach((function(t){N(e,t,i[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):H(Object(i)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))}))}return e}function N(e,t,i){var n;return(t="symbol"==G(n=U(t,"string"))?n:String(n))in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,e}function U(e,t){if("object"!=G(e)||!e)return e;var i=e[Symbol.toPrimitive];if(void 0!==i){var n=i.call(e,t||"default");if("object"!=G(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}var q=["id","value","placeholder","tabindex","disabled","aria-label","aria-labelledby","aria-expanded","aria-controls","aria-activedescendant","aria-invalid"],W=["aria-activedescendant"],J=["id","aria-label","aria-setsize","aria-posinset"],Q=["id","placeholder","tabindex","disabled","aria-label","aria-labelledby","aria-expanded","aria-controls","aria-activedescendant","aria-invalid"],X=["id"],Y=["id"],Z=["id","aria-label","aria-selected","aria-disabled","aria-setsize","aria-posinset","onClick","onMousemove","data-p-highlight","data-p-focus","data-p-disabled"];z.render=function(e,t,i,n,o,s){var l=y("SpinnerIcon"),r=y("Button"),a=y("VirtualScroller"),u=y("Portal"),c=v("ripple");return m(),b("div",O({ref:"container",class:e.cx("root"),style:e.sx("root"),onClick:t[15]||(t[15]=function(){return s.onContainerClick&&s.onContainerClick.apply(s,arguments)})},e.ptmi("root")),[e.multiple?g("",!0):(m(),b("input",O({key:0,ref:"focusInput",id:e.inputId,type:"text",class:[e.cx("input"),e.inputClass],style:e.inputStyle,value:s.inputValue,placeholder:e.placeholder,tabindex:e.disabled?-1:e.tabindex,disabled:e.disabled,autocomplete:"off",role:"combobox","aria-label":e.ariaLabel,"aria-labelledby":e.ariaLabelledby,"aria-haspopup":"listbox","aria-autocomplete":"list","aria-expanded":o.overlayVisible,"aria-controls":o.id+"_list","aria-activedescendant":o.focused?s.focusedOptionId:void 0,"aria-invalid":e.invalid||void 0,onFocus:t[0]||(t[0]=function(){return s.onFocus&&s.onFocus.apply(s,arguments)}),onBlur:t[1]||(t[1]=function(){return s.onBlur&&s.onBlur.apply(s,arguments)}),onKeydown:t[2]||(t[2]=function(){return s.onKeyDown&&s.onKeyDown.apply(s,arguments)}),onInput:t[3]||(t[3]=function(){return s.onInput&&s.onInput.apply(s,arguments)}),onChange:t[4]||(t[4]=function(){return s.onChange&&s.onChange.apply(s,arguments)})},_(_({},e.inputProps),e.ptm("input"))),null,16,q)),e.multiple?(m(),b("ul",O({key:1,ref:"multiContainer",class:e.cx("container"),tabindex:"-1",role:"listbox","aria-orientation":"horizontal","aria-activedescendant":o.focused?s.focusedMultipleOptionId:void 0,onFocus:t[10]||(t[10]=function(){return s.onMultipleContainerFocus&&s.onMultipleContainerFocus.apply(s,arguments)}),onBlur:t[11]||(t[11]=function(){return s.onMultipleContainerBlur&&s.onMultipleContainerBlur.apply(s,arguments)}),onKeydown:t[12]||(t[12]=function(){return s.onMultipleContainerKeyDown&&s.onMultipleContainerKeyDown.apply(s,arguments)})},e.ptm("container")),[(m(!0),b(I,null,x(e.modelValue,(function(t,i){return m(),b("li",O({key:i,id:o.id+"_multiple_option_"+i,class:e.cx("token",{i:i}),role:"option","aria-label":s.getOptionLabel(t),"aria-selected":!0,"aria-setsize":e.modelValue.length,"aria-posinset":i+1},e.ptm("token")),[S(e.$slots,"chip",{value:t},(function(){return[w("span",O({class:e.cx("tokenLabel")},e.ptm("tokenLabel")),k(s.getOptionLabel(t)),17)]})),S(e.$slots,"removetokenicon",{class:L(e.cx("removeTokenIcon")),index:i,onClick:function(e){return s.removeOption(e,i)},removeCallback:function(e){return s.removeOption(e,i)}},(function(){return[(m(),C(M(e.removeTokenIcon?"span":"TimesCircleIcon"),O({class:[e.cx("removeTokenIcon"),e.removeTokenIcon],onClick:function(e){return s.removeOption(e,i)},"aria-hidden":"true"},e.ptm("removeTokenIcon")),null,16,["class","onClick"]))]}))],16,J)})),128)),w("li",O({class:e.cx("inputToken"),role:"option"},e.ptm("inputToken")),[w("input",O({ref:"focusInput",id:e.inputId,type:"text",style:e.inputStyle,class:e.inputClass,placeholder:e.placeholder,tabindex:e.disabled?-1:e.tabindex,disabled:e.disabled,autocomplete:"off",role:"combobox","aria-label":e.ariaLabel,"aria-labelledby":e.ariaLabelledby,"aria-haspopup":"listbox","aria-autocomplete":"list","aria-expanded":o.overlayVisible,"aria-controls":o.id+"_list","aria-activedescendant":o.focused?s.focusedOptionId:void 0,"aria-invalid":e.invalid||void 0,onFocus:t[5]||(t[5]=function(){return s.onFocus&&s.onFocus.apply(s,arguments)}),onBlur:t[6]||(t[6]=function(){return s.onBlur&&s.onBlur.apply(s,arguments)}),onKeydown:t[7]||(t[7]=function(){return s.onKeyDown&&s.onKeyDown.apply(s,arguments)}),onInput:t[8]||(t[8]=function(){return s.onInput&&s.onInput.apply(s,arguments)}),onChange:t[9]||(t[9]=function(){return s.onChange&&s.onChange.apply(s,arguments)})},_(_({},e.inputProps),e.ptm("input"))),null,16,Q)],16)],16,W)):g("",!0),o.searching||e.loading?S(e.$slots,"loadingicon",{key:2,class:L(e.cx("loadingIcon"))},(function(){return[e.loadingIcon?(m(),b("i",O({key:0,class:["pi-spin",e.cx("loadingIcon"),e.loadingIcon],"aria-hidden":"true"},e.ptm("loadingIcon")),null,16)):(m(),C(l,O({key:1,class:[e.cx("loadingIcon"),e.loadingIcon],spin:"","aria-hidden":"true"},e.ptm("loadingIcon")),null,16,["class"]))]})):g("",!0),e.dropdown?(m(),C(r,{key:3,ref:"dropdownButton",type:"button",tabindex:"-1",class:L([e.cx("dropdownButton"),e.dropdownClass]),disabled:e.disabled,"aria-hidden":"true",onClick:s.onDropdownClick,unstyled:e.unstyled,pt:e.ptm("dropdownButton")},{icon:V((function(){return[S(e.$slots,"dropdownicon",{class:L(e.dropdownIcon)},(function(){return[(m(),C(M(e.dropdownIcon?"span":"ChevronDownIcon"),O({class:e.dropdownIcon},e.ptm("dropdownButton").icon,{"data-pc-section":"dropdownicon"}),null,16,["class"]))]}))]})),_:3},8,["class","disabled","onClick","unstyled","pt"])):g("",!0),w("span",O({role:"status","aria-live":"polite",class:"p-hidden-accessible"},e.ptm("hiddenSearchResult"),{"data-p-hidden-accessible":!0}),k(s.searchResultMessageText),17),$(u,{appendTo:e.appendTo},{default:V((function(){return[$(D,O({name:"p-connected-overlay",onEnter:s.onOverlayEnter,onAfterEnter:s.onOverlayAfterEnter,onLeave:s.onOverlayLeave,onAfterLeave:s.onOverlayAfterLeave},e.ptm("transition")),{default:V((function(){return[o.overlayVisible?(m(),b("div",O({key:0,ref:s.overlayRef,class:[e.cx("panel"),e.panelClass],style:_(_({},e.panelStyle),{},{"max-height":s.virtualScrollerDisabled?e.scrollHeight:""}),onClick:t[13]||(t[13]=function(){return s.onOverlayClick&&s.onOverlayClick.apply(s,arguments)}),onKeydown:t[14]||(t[14]=function(){return s.onOverlayKeyDown&&s.onOverlayKeyDown.apply(s,arguments)})},_(_({},e.panelProps),e.ptm("panel"))),[S(e.$slots,"header",{value:e.modelValue,suggestions:s.visibleOptions}),$(a,O({ref:s.virtualScrollerRef},e.virtualScrollerOptions,{style:{height:e.scrollHeight},items:s.visibleOptions,tabindex:-1,disabled:s.virtualScrollerDisabled,pt:e.ptm("virtualScroller")}),K({content:V((function(t){var i=t.styleClass,n=t.contentRef,l=t.items,r=t.getItemOptions,a=t.contentStyle,u=t.itemSize;return[w("ul",O({ref:function(e){return s.listRef(e,n)},id:o.id+"_list",class:[e.cx("list"),i],style:a,role:"listbox"},e.ptm("list")),[(m(!0),b(I,null,x(l,(function(t,i){return m(),b(I,{key:s.getOptionRenderKey(t,s.getOptionIndex(i,r))},[s.isOptionGroup(t)?(m(),b("li",O({key:0,id:o.id+"_"+s.getOptionIndex(i,r),style:{height:u?u+"px":void 0},class:e.cx("itemGroup"),role:"option"},e.ptm("itemGroup")),[S(e.$slots,"optiongroup",{option:t.optionGroup,item:t.optionGroup,index:s.getOptionIndex(i,r)},(function(){return[F(k(s.getOptionGroupLabel(t.optionGroup)),1)]}))],16,Y)):T((m(),b("li",O({key:1,id:o.id+"_"+s.getOptionIndex(i,r),style:{height:u?u+"px":void 0},class:e.cx("item",{option:t,i:i,getItemOptions:r}),role:"option","aria-label":s.getOptionLabel(t),"aria-selected":s.isSelected(t),"aria-disabled":s.isOptionDisabled(t),"aria-setsize":s.ariaSetSize,"aria-posinset":s.getAriaPosInset(s.getOptionIndex(i,r)),onClick:function(e){return s.onOptionSelect(e,t)},onMousemove:function(e){return s.onOptionMouseMove(e,s.getOptionIndex(i,r))},"data-p-highlight":s.isSelected(t),"data-p-focus":o.focusedOptionIndex===s.getOptionIndex(i,r),"data-p-disabled":s.isOptionDisabled(t)},s.getPTOptions(t,r,i,"item")),[e.$slots.option?S(e.$slots,"option",{key:0,option:t,index:s.getOptionIndex(i,r)},(function(){return[F(k(s.getOptionLabel(t)),1)]})):S(e.$slots,"item",{key:1,item:t,index:s.getOptionIndex(i,r)},(function(){return[F(k(s.getOptionLabel(t)),1)]}))],16,Z)),[[c]])],64)})),128)),!l||l&&0===l.length?(m(),b("li",O({key:0,class:e.cx("emptyMessage"),role:"option"},e.ptm("emptyMessage")),[S(e.$slots,"empty",{},(function(){return[F(k(s.searchResultMessageText),1)]}))],16)):g("",!0)],16,X)]})),_:2},[e.$slots.loader?{name:"loader",fn:V((function(t){return[S(e.$slots,"loader",{options:t.options})]})),key:"0"}:void 0]),1040,["style","items","disabled","pt"]),S(e.$slots,"footer",{value:e.modelValue,suggestions:s.visibleOptions}),w("span",O({role:"status","aria-live":"polite",class:"p-hidden-accessible"},e.ptm("hiddenSelectedMessage"),{"data-p-hidden-accessible":!0}),k(s.selectedMessageText),17)],16)):g("",!0)]})),_:3},16,["onEnter","onAfterEnter","onLeave","onAfterLeave"])]})),_:3},8,["appendTo"])],16)};export{z as default};
@@ -230,8 +230,11 @@ this.primevue.autocomplete = (function (Button, ChevronDownIcon, SpinnerIcon, Ti
230
230
  };
231
231
  },
232
232
  watch: {
233
- '$attrs.id': function $attrsId(newValue) {
234
- this.id = newValue || utils.UniqueComponentId();
233
+ '$attrs.id': {
234
+ immediate: true,
235
+ handler: function handler(newValue) {
236
+ this.id = newValue || utils.UniqueComponentId();
237
+ }
235
238
  },
236
239
  suggestions: function suggestions() {
237
240
  if (this.searching) {
@@ -243,7 +246,6 @@ this.primevue.autocomplete = (function (Button, ChevronDownIcon, SpinnerIcon, Ti
243
246
  }
244
247
  },
245
248
  mounted: function mounted() {
246
- this.id = this.id || utils.UniqueComponentId();
247
249
  this.autoUpdateModel();
248
250
  },
249
251
  updated: function updated() {
@@ -739,39 +741,46 @@ this.primevue.autocomplete = (function (Button, ChevronDownIcon, SpinnerIcon, Ti
739
741
  isValidSelectedOption: function isValidSelectedOption(option) {
740
742
  return this.isValidOption(option) && this.isSelected(option);
741
743
  },
744
+ isEquals: function isEquals(value1, value2) {
745
+ return utils.ObjectUtils.equals(value1, value2, this.equalityKey);
746
+ },
742
747
  isSelected: function isSelected(option) {
743
- return utils.ObjectUtils.equals(this.modelValue, this.getOptionValue(option), this.equalityKey);
748
+ var _this8 = this;
749
+ var optionValue = this.getOptionValue(option);
750
+ return this.multiple ? (this.modelValue || []).some(function (value) {
751
+ return _this8.isEquals(value, optionValue);
752
+ }) : this.isEquals(this.modelValue, this.getOptionValue(option));
744
753
  },
745
754
  findFirstOptionIndex: function findFirstOptionIndex() {
746
- var _this8 = this;
755
+ var _this9 = this;
747
756
  return this.visibleOptions.findIndex(function (option) {
748
- return _this8.isValidOption(option);
757
+ return _this9.isValidOption(option);
749
758
  });
750
759
  },
751
760
  findLastOptionIndex: function findLastOptionIndex() {
752
- var _this9 = this;
761
+ var _this10 = this;
753
762
  return utils.ObjectUtils.findLastIndex(this.visibleOptions, function (option) {
754
- return _this9.isValidOption(option);
763
+ return _this10.isValidOption(option);
755
764
  });
756
765
  },
757
766
  findNextOptionIndex: function findNextOptionIndex(index) {
758
- var _this10 = this;
767
+ var _this11 = this;
759
768
  var matchedOptionIndex = index < this.visibleOptions.length - 1 ? this.visibleOptions.slice(index + 1).findIndex(function (option) {
760
- return _this10.isValidOption(option);
769
+ return _this11.isValidOption(option);
761
770
  }) : -1;
762
771
  return matchedOptionIndex > -1 ? matchedOptionIndex + index + 1 : index;
763
772
  },
764
773
  findPrevOptionIndex: function findPrevOptionIndex(index) {
765
- var _this11 = this;
774
+ var _this12 = this;
766
775
  var matchedOptionIndex = index > 0 ? utils.ObjectUtils.findLastIndex(this.visibleOptions.slice(0, index), function (option) {
767
- return _this11.isValidOption(option);
776
+ return _this12.isValidOption(option);
768
777
  }) : -1;
769
778
  return matchedOptionIndex > -1 ? matchedOptionIndex : index;
770
779
  },
771
780
  findSelectedOptionIndex: function findSelectedOptionIndex() {
772
- var _this12 = this;
781
+ var _this13 = this;
773
782
  return this.hasSelectedOption ? this.visibleOptions.findIndex(function (option) {
774
- return _this12.isValidSelectedOption(option);
783
+ return _this13.isValidSelectedOption(option);
775
784
  }) : -1;
776
785
  },
777
786
  findFirstFocusedOptionIndex: function findFirstFocusedOptionIndex() {
@@ -799,12 +808,12 @@ this.primevue.autocomplete = (function (Button, ChevronDownIcon, SpinnerIcon, Ti
799
808
  });
800
809
  },
801
810
  removeOption: function removeOption(event, index) {
802
- var _this13 = this;
811
+ var _this14 = this;
803
812
  var removedOption = this.modelValue[index];
804
813
  var value = this.modelValue.filter(function (_, i) {
805
814
  return i !== index;
806
815
  }).map(function (option) {
807
- return _this13.getOptionValue(option);
816
+ return _this14.getOptionValue(option);
808
817
  });
809
818
  this.updateModel(event, value);
810
819
  this.$emit('item-unselect', {
@@ -824,18 +833,18 @@ this.primevue.autocomplete = (function (Button, ChevronDownIcon, SpinnerIcon, Ti
824
833
  }
825
834
  },
826
835
  scrollInView: function scrollInView() {
827
- var _this14 = this;
836
+ var _this15 = this;
828
837
  var index = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : -1;
829
838
  this.$nextTick(function () {
830
- var id = index !== -1 ? "".concat(_this14.id, "_").concat(index) : _this14.focusedOptionId;
831
- var element = utils.DomHandler.findSingle(_this14.list, "li[id=\"".concat(id, "\"]"));
839
+ var id = index !== -1 ? "".concat(_this15.id, "_").concat(index) : _this15.focusedOptionId;
840
+ var element = utils.DomHandler.findSingle(_this15.list, "li[id=\"".concat(id, "\"]"));
832
841
  if (element) {
833
842
  element.scrollIntoView && element.scrollIntoView({
834
843
  block: 'nearest',
835
844
  inline: 'start'
836
845
  });
837
- } else if (!_this14.virtualScrollerDisabled) {
838
- _this14.virtualScroller && _this14.virtualScroller.scrollToIndex(index !== -1 ? index : _this14.focusedOptionIndex);
846
+ } else if (!_this15.virtualScrollerDisabled) {
847
+ _this15.virtualScroller && _this15.virtualScroller.scrollToIndex(index !== -1 ? index : _this15.focusedOptionIndex);
839
848
  }
840
849
  });
841
850
  },
@@ -853,14 +862,14 @@ this.primevue.autocomplete = (function (Button, ChevronDownIcon, SpinnerIcon, Ti
853
862
  });
854
863
  },
855
864
  flatOptions: function flatOptions(options) {
856
- var _this15 = this;
865
+ var _this16 = this;
857
866
  return (options || []).reduce(function (result, option, index) {
858
867
  result.push({
859
868
  optionGroup: option,
860
869
  group: true,
861
870
  index: index
862
871
  });
863
- var optionGroupChildren = _this15.getOptionGroupChildren(option);
872
+ var optionGroupChildren = _this16.getOptionGroupChildren(option);
864
873
  optionGroupChildren && optionGroupChildren.forEach(function (o) {
865
874
  return result.push(o);
866
875
  });
@@ -925,9 +934,9 @@ this.primevue.autocomplete = (function (Button, ChevronDownIcon, SpinnerIcon, Ti
925
934
  return this.focusedMultipleOptionIndex !== -1 ? "".concat(this.id, "_multiple_option_").concat(this.focusedMultipleOptionIndex) : null;
926
935
  },
927
936
  ariaSetSize: function ariaSetSize() {
928
- var _this16 = this;
937
+ var _this17 = this;
929
938
  return this.visibleOptions.filter(function (option) {
930
- return !_this16.isOptionGroup(option);
939
+ return !_this17.isOptionGroup(option);
931
940
  }).length;
932
941
  },
933
942
  virtualScrollerDisabled: function virtualScrollerDisabled() {