primevue 3.47.0 → 3.47.1

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 (100) hide show
  1. package/listbox/Listbox.vue +1 -1
  2. package/listbox/listbox.cjs.js +2 -1
  3. package/listbox/listbox.cjs.min.js +1 -1
  4. package/listbox/listbox.esm.js +2 -1
  5. package/listbox/listbox.esm.min.js +1 -1
  6. package/listbox/listbox.js +2 -1
  7. package/listbox/listbox.min.js +1 -1
  8. package/orderlist/OrderList.vue +8 -9
  9. package/orderlist/orderlist.cjs.js +9 -8
  10. package/orderlist/orderlist.cjs.min.js +1 -1
  11. package/orderlist/orderlist.esm.js +9 -8
  12. package/orderlist/orderlist.esm.min.js +1 -1
  13. package/orderlist/orderlist.js +9 -8
  14. package/orderlist/orderlist.min.js +1 -1
  15. package/package.json +1 -1
  16. package/picklist/PickList.vue +7 -7
  17. package/picklist/picklist.cjs.js +8 -6
  18. package/picklist/picklist.cjs.min.js +1 -1
  19. package/picklist/picklist.esm.js +8 -6
  20. package/picklist/picklist.esm.min.js +1 -1
  21. package/picklist/picklist.js +8 -6
  22. package/picklist/picklist.min.js +1 -1
  23. package/resources/themes/arya-blue/theme.css +4 -4
  24. package/resources/themes/arya-green/theme.css +4 -4
  25. package/resources/themes/arya-orange/theme.css +4 -4
  26. package/resources/themes/arya-purple/theme.css +4 -4
  27. package/resources/themes/aura-dark-amber/theme.css +4 -4
  28. package/resources/themes/aura-dark-blue/theme.css +4 -4
  29. package/resources/themes/aura-dark-cyan/theme.css +4 -4
  30. package/resources/themes/aura-dark-green/theme.css +4 -4
  31. package/resources/themes/aura-dark-indigo/theme.css +4 -4
  32. package/resources/themes/aura-dark-lime/theme.css +4 -4
  33. package/resources/themes/aura-dark-noir/theme.css +4 -4
  34. package/resources/themes/aura-dark-pink/theme.css +4 -4
  35. package/resources/themes/aura-dark-purple/theme.css +4 -4
  36. package/resources/themes/aura-dark-teal/theme.css +4 -4
  37. package/resources/themes/aura-light-amber/theme.css +8 -8
  38. package/resources/themes/aura-light-blue/theme.css +8 -8
  39. package/resources/themes/aura-light-cyan/theme.css +8 -8
  40. package/resources/themes/aura-light-green/theme.css +8 -8
  41. package/resources/themes/aura-light-indigo/theme.css +8 -8
  42. package/resources/themes/aura-light-lime/theme.css +8 -8
  43. package/resources/themes/aura-light-noir/theme.css +8 -8
  44. package/resources/themes/aura-light-pink/theme.css +8 -8
  45. package/resources/themes/aura-light-purple/theme.css +8 -8
  46. package/resources/themes/aura-light-teal/theme.css +8 -8
  47. package/resources/themes/bootstrap4-dark-blue/theme.css +4 -4
  48. package/resources/themes/bootstrap4-dark-purple/theme.css +4 -4
  49. package/resources/themes/bootstrap4-light-blue/theme.css +4 -4
  50. package/resources/themes/bootstrap4-light-purple/theme.css +4 -4
  51. package/resources/themes/fluent-light/theme.css +4 -4
  52. package/resources/themes/lara-dark-amber/theme.css +4 -4
  53. package/resources/themes/lara-dark-blue/theme.css +4 -4
  54. package/resources/themes/lara-dark-cyan/theme.css +4 -4
  55. package/resources/themes/lara-dark-green/theme.css +4 -4
  56. package/resources/themes/lara-dark-indigo/theme.css +4 -4
  57. package/resources/themes/lara-dark-pink/theme.css +4 -4
  58. package/resources/themes/lara-dark-purple/theme.css +4 -4
  59. package/resources/themes/lara-dark-teal/theme.css +4 -4
  60. package/resources/themes/lara-light-amber/theme.css +4 -4
  61. package/resources/themes/lara-light-blue/theme.css +4 -4
  62. package/resources/themes/lara-light-cyan/theme.css +4 -4
  63. package/resources/themes/lara-light-green/theme.css +4 -4
  64. package/resources/themes/lara-light-indigo/theme.css +4 -4
  65. package/resources/themes/lara-light-pink/theme.css +4 -4
  66. package/resources/themes/lara-light-purple/theme.css +4 -4
  67. package/resources/themes/lara-light-teal/theme.css +4 -4
  68. package/resources/themes/luna-amber/theme.css +4 -4
  69. package/resources/themes/luna-blue/theme.css +4 -4
  70. package/resources/themes/luna-green/theme.css +4 -4
  71. package/resources/themes/luna-pink/theme.css +4 -4
  72. package/resources/themes/md-dark-deeppurple/theme.css +4 -4
  73. package/resources/themes/md-dark-indigo/theme.css +4 -4
  74. package/resources/themes/md-light-deeppurple/theme.css +4 -4
  75. package/resources/themes/md-light-indigo/theme.css +4 -4
  76. package/resources/themes/mdc-dark-deeppurple/theme.css +4 -4
  77. package/resources/themes/mdc-dark-indigo/theme.css +4 -4
  78. package/resources/themes/mdc-light-deeppurple/theme.css +4 -4
  79. package/resources/themes/mdc-light-indigo/theme.css +4 -4
  80. package/resources/themes/mira/theme.css +4 -4
  81. package/resources/themes/nano/theme.css +4 -4
  82. package/resources/themes/nova/theme.css +4 -4
  83. package/resources/themes/nova-accent/theme.css +4 -4
  84. package/resources/themes/nova-alt/theme.css +4 -4
  85. package/resources/themes/nova-vue/theme.css +4 -4
  86. package/resources/themes/rhea/theme.css +4 -4
  87. package/resources/themes/saga-blue/theme.css +4 -4
  88. package/resources/themes/saga-green/theme.css +4 -4
  89. package/resources/themes/saga-orange/theme.css +4 -4
  90. package/resources/themes/saga-purple/theme.css +4 -4
  91. package/resources/themes/soho-dark/theme.css +4 -4
  92. package/resources/themes/soho-light/theme.css +4 -4
  93. package/resources/themes/tailwind-light/theme.css +4 -4
  94. package/resources/themes/vela-blue/theme.css +4 -4
  95. package/resources/themes/vela-green/theme.css +4 -4
  96. package/resources/themes/vela-orange/theme.css +4 -4
  97. package/resources/themes/vela-purple/theme.css +4 -4
  98. package/resources/themes/viva-dark/theme.css +4 -4
  99. package/resources/themes/viva-light/theme.css +4 -4
  100. package/web-types.json +1 -1
@@ -1 +1 @@
1
- "use strict";var e=require("primevue/button"),t=require("primevue/icons/angledoubledown"),o=require("primevue/icons/angledoubleleft"),n=require("primevue/icons/angledoubleright"),i=require("primevue/icons/angledoubleup"),r=require("primevue/icons/angledown"),l=require("primevue/icons/angleleft"),s=require("primevue/icons/angleright"),a=require("primevue/icons/angleup"),c=require("primevue/ripple"),u=require("primevue/utils"),d=require("primevue/basecomponent"),m=require("primevue/picklist/style"),p=require("vue");function h(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var f=h(e),v=h(t),g=h(o),b=h(n),y=h(i),I=h(r),w=h(l),L=h(s),x=h(a),S=h(c);function D(e){return O(e)||C(e)||$(e)||T()}function T(){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 $(e,t){if(e){if("string"==typeof e)return k(e,t);var o=Object.prototype.toString.call(e).slice(8,-1);return"Object"===o&&e.constructor&&(o=e.constructor.name),"Map"===o||"Set"===o?Array.from(e):"Arguments"===o||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(o)?k(e,t):void 0}}function C(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function O(e){if(Array.isArray(e))return k(e)}function k(e,t){(null==t||t>e.length)&&(t=e.length);for(var o=0,n=new Array(t);o<t;o++)n[o]=e[o];return n}var B={name:"PickList",extends:{name:"BasePickList",extends:h(d).default,props:{modelValue:{type:Array,default:function(){return[[],[]]}},selection:{type:Array,default:function(){return[[],[]]}},dataKey:{type:String,default:null},listStyle:{type:null,default:null},metaKeySelection:{type:Boolean,default:!1},autoOptionFocus:{type:Boolean,default:!0},focusOnHover:{type:Boolean,default:!0},responsive:{type:Boolean,default:!0},breakpoint:{type:String,default:"960px"},stripedRows:{type:Boolean,default:!1},showSourceControls:{type:Boolean,default:!0},showTargetControls:{type:Boolean,default:!0},targetListProps:{type:null,default:null},sourceListProps:{type:null,default:null},moveUpButtonProps:{type:null,default:null},moveTopButtonProps:{type:null,default:null},moveDownButtonProps:{type:null,default:null},moveBottomButtonProps:{type:null,default:null},moveToTargetProps:{type:null,default:null},moveAllToTargetProps:{type:null,default:null},moveToSourceProps:{type:null,default:null},moveAllToSourceProps:{type:null,default:null},tabindex:{type:Number,default:0}},style:h(m).default,provide:function(){return{$parentInstance:this}}},emits:["update:modelValue","reorder","update:selection","selection-change","move-to-target","move-to-source","move-all-to-target","move-all-to-source","focus","blur"],itemTouched:!1,reorderDirection:null,styleElement:null,media:null,mediaChangeListener:null,data:function(){return{id:this.$attrs.id,d_selection:this.selection,focused:{sourceList:!1,targetList:!1},focusedOptionIndex:-1,viewChanged:!1}},watch:{"$attrs.id":function(e){this.id=e||u.UniqueComponentId()},selection:function(e){this.d_selection=e},breakpoint:function(){this.destroyMedia(),this.initMedia()}},updated:function(){this.reorderDirection&&(this.updateListScroll(this.$refs.sourceList.$el),this.updateListScroll(this.$refs.targetList.$el),this.reorderDirection=null)},beforeUnmount:function(){this.destroyStyle(),this.destroyMedia()},mounted:function(){this.id=this.id||u.UniqueComponentId(),this.responsive&&(this.createStyle(),this.initMedia())},methods:{getItemKey:function(e,t){return this.dataKey?u.ObjectUtils.resolveFieldData(e,this.dataKey):t},getPTOptions:function(e,t,o,n){return this.ptm(t,{context:{active:this.isSelected(e,n),focused:o===this.focusedOptionId}})},isSelected:function(e,t){return-1!=u.ObjectUtils.findIndexInList(e,this.d_selection[t])},onListFocus:function(e,t){this.focused[t]=!0,this.findCurrentFocusedIndex(t),this.$emit("focus",e)},onListBlur:function(e,t){this.focused[t]=!1,this.focusedOptionIndex=-1,this.$emit("blur",e)},onOptionMouseDown:function(e,t,o){this.focused[o]=!0,this.focusedOptionIndex=t,e.preventDefault()},onOptionMouseMove:function(e,t){this.focusOnHover&&this.focused[t]&&this.changeFocusedOptionIndex(e,t)},moveUp:function(e,t){if(this.d_selection&&this.d_selection[t]){for(var o=D(this.modelValue[t]),n=this.d_selection[t],i=0;i<n.length;i++){var r=u.ObjectUtils.findIndexInList(n[i],o);if(0===r)break;var l=o[r-1];o[r-1]=o[r],o[r]=l}var s=D(this.modelValue);s[t]=o,this.reorderDirection="up",this.$emit("update:modelValue",s),this.$emit("reorder",{originalEvent:e,value:s,direction:this.reorderDirection,listIndex:t})}},moveTop:function(e,t){if(this.d_selection){for(var o=D(this.modelValue[t]),n=this.d_selection[t],i=0;i<n.length;i++){var r=u.ObjectUtils.findIndexInList(n[i],o);if(0===r)break;var l=o.splice(r,1)[0];o.unshift(l)}var s=D(this.modelValue);s[t]=o,this.reorderDirection="top",this.$emit("update:modelValue",s),this.$emit("reorder",{originalEvent:e,value:s,direction:this.reorderDirection,listIndex:t})}},moveDown:function(e,t){if(this.d_selection){for(var o=D(this.modelValue[t]),n=this.d_selection[t],i=n.length-1;i>=0;i--){var r=u.ObjectUtils.findIndexInList(n[i],o);if(r===o.length-1)break;var l=o[r+1];o[r+1]=o[r],o[r]=l}var s=D(this.modelValue);s[t]=o,this.reorderDirection="down",this.$emit("update:modelValue",s),this.$emit("reorder",{originalEvent:e,value:s,direction:this.reorderDirection,listIndex:t})}},moveBottom:function(e,t){if(this.d_selection){for(var o=D(this.modelValue[t]),n=this.d_selection[t],i=n.length-1;i>=0;i--){var r=u.ObjectUtils.findIndexInList(n[i],o);if(r===o.length-1)break;var l=o.splice(r,1)[0];o.push(l)}var s=D(this.modelValue);s[t]=o,this.reorderDirection="bottom",this.$emit("update:modelValue",s),this.$emit("reorder",{originalEvent:e,value:s,direction:this.reorderDirection,listIndex:t})}},moveToTarget:function(e){var t=this.d_selection&&this.d_selection[0]?this.d_selection[0]:null,o=D(this.modelValue[0]),n=D(this.modelValue[1]);if(t){for(var i=0;i<t.length;i++){var r=t[i];-1==u.ObjectUtils.findIndexInList(r,n)&&n.push(o.splice(u.ObjectUtils.findIndexInList(r,o),1)[0])}var l=D(this.modelValue);l[0]=o,l[1]=n,this.$emit("update:modelValue",l),this.$emit("move-to-target",{originalEvent:e,items:D(new Set(t))}),this.d_selection[0]=[],this.$emit("update:selection",this.d_selection),this.$emit("selection-change",{originalEvent:e,value:this.d_selection})}},moveAllToTarget:function(e){if(this.modelValue[0]){var t=D(this.modelValue[0]),o=D(this.modelValue[1]);this.$emit("move-all-to-target",{originalEvent:e,items:t}),o=[].concat(D(o),D(t)),t=[];var n=D(this.modelValue);n[0]=t,n[1]=o,this.$emit("update:modelValue",n),this.d_selection[0]=[],this.$emit("update:selection",this.d_selection),this.$emit("selection-change",{originalEvent:e,value:this.d_selection})}},moveToSource:function(e){var t=this.d_selection&&this.d_selection[1]?this.d_selection[1]:null,o=D(this.modelValue[0]),n=D(this.modelValue[1]);if(t){for(var i=0;i<t.length;i++){var r=t[i];-1==u.ObjectUtils.findIndexInList(r,o)&&o.push(n.splice(u.ObjectUtils.findIndexInList(r,n),1)[0])}var l=D(this.modelValue);l[0]=o,l[1]=n,this.$emit("update:modelValue",l),this.$emit("move-to-source",{originalEvent:e,items:D(new Set(t))}),this.d_selection[1]=[],this.$emit("update:selection",this.d_selection),this.$emit("selection-change",{originalEvent:e,value:this.d_selection})}},moveAllToSource:function(e){if(this.modelValue[1]){var t=D(this.modelValue[0]),o=D(this.modelValue[1]);this.$emit("move-all-to-source",{originalEvent:e,items:o}),t=[].concat(D(t),D(o)),o=[];var n=D(this.modelValue);n[0]=t,n[1]=o,this.$emit("update:modelValue",n),this.d_selection[1]=[],this.$emit("update:selection",this.d_selection),this.$emit("selection-change",{originalEvent:e,value:this.d_selection})}},onItemClick:function(e,t,o,n){var i=0===n?"sourceList":"targetList";this.itemTouched=!1;var r,l=this.d_selection[n],s=u.ObjectUtils.findIndexInList(t,l),a=-1!=s,c=!this.itemTouched&&this.metaKeySelection,d=u.DomHandler.find(this.$refs[i].$el,'[data-pc-section="item"]')[o].getAttribute("id");if(this.focusedOptionIndex=d,c){var m=e.metaKey||e.ctrlKey;a&&m?r=l.filter((function(e,t){return t!==s})):(r=m&&l?D(l):[]).push(t)}else a?r=l.filter((function(e,t){return t!==s})):(r=l?D(l):[]).push(t);var p=D(this.d_selection);p[n]=r,this.d_selection=p,this.$emit("update:selection",this.d_selection),this.$emit("selection-change",{originalEvent:e,value:this.d_selection})},onItemDblClick:function(e,t,o){0===o?this.moveToTarget(e):1===o&&this.moveToSource(e)},onItemTouchEnd:function(){this.itemTouched=!0},onItemKeyDown:function(e,t){switch(e.code){case"ArrowDown":this.onArrowDownKey(e,t);break;case"ArrowUp":this.onArrowUpKey(e,t);break;case"Home":this.onHomeKey(e,t);break;case"End":this.onEndKey(e,t);break;case"Enter":case"NumpadEnter":this.onEnterKey(e,t);break;case"Space":this.onSpaceKey(e,t);break;case"KeyA":e.ctrlKey&&(this.d_selection=D(this.modelValue),this.$emit("update:selection",this.d_selection),e.preventDefault())}},onArrowDownKey:function(e,t){var o=-1!==this.focusedOptionIndex?this.findNextOptionIndex(t):this.findFirstSelectedOptionIndex(t);this.changeFocusedOptionIndex(o,t),e.shiftKey&&this.onEnterKey(e,t),e.preventDefault()},onArrowUpKey:function(e,t){var o=-1!==this.focusedOptionIndex?this.findPrevOptionIndex(t):this.findLastSelectedOptionIndex(t);this.changeFocusedOptionIndex(o,t),e.shiftKey&&this.onEnterKey(e,t),e.preventDefault()},onEnterKey:function(e,t){var o="sourceList"===t?0:1,n=this.findMatchedOptionIndex(t);this.onItemClick(e,this.modelValue[o][n],n,o),e.preventDefault()},onSpaceKey:function(e,t){if(e.preventDefault(),e.shiftKey&&this.d_selection&&this.d_selection.length>0){var o="sourceList"===t?0:1,n=u.ObjectUtils.findIndexInList(this.d_selection[o][0],D(this.modelValue[o])),i=this.findMatchedOptionIndex(t);this.d_selection[o]=D(this.modelValue[o]).slice(Math.min(n,i),Math.max(n,i)+1),this.$emit("update:selection",this.d_selection),this.$emit("selection-change",{originalEvent:e,value:this.d_selection})}else this.onEnterKey(e,t)},onHomeKey:function(e,t){if(e.ctrlKey&&e.shiftKey){var o="sourceList"===t?0:1,n=this.findMatchedOptionIndex(t);this.d_selection[o]=D(this.modelValue[o]).slice(0,n+1),this.$emit("update:selection",this.d_selection),this.$emit("selection-change",{originalEvent:e,value:this.d_selection})}else this.changeFocusedOptionIndex(0,t);e.preventDefault()},onEndKey:function(e,t){var o=this.findAllItems(t);if(e.ctrlKey&&e.shiftKey){var n="sourceList"===t?0:1,i=this.findMatchedOptionIndex(t);this.d_selection[n]=D(this.modelValue[n]).slice(i,o.length),this.$emit("update:selection",this.d_selection),this.$emit("selection-change",{originalEvent:e,value:this.d_selection})}else this.changeFocusedOptionIndex(o.length-1,t);e.preventDefault()},findAllItems:function(e){return u.DomHandler.find(this.$refs[e].$el,'[data-pc-section="item"]')},findFocusedItem:function(e){return u.DomHandler.findSingle(this.$refs[e].$el,'[data-pc-section="item"][id='.concat(this.focusedOptionIndex,"]"))},findCurrentFocusedIndex:function(e){this.focusedOptionIndex=this.findFirstSelectedOptionIndex(e),this.autoOptionFocus&&-1===this.focusedOptionIndex&&(this.focusedOptionIndex=this.findFirstFocusedOptionIndex(e)),this.scrollInView(this.focusedOptionIndex,e)},findFirstFocusedOptionIndex:function(e){var t=u.DomHandler.findSingle(this.$refs[e].$el,'[data-pc-section="item"]');return u.DomHandler.getAttribute(t,"id")},findFirstSelectedOptionIndex:function(e){if(this.hasSelectedOption(e)){var t=u.DomHandler.findSingle(this.$refs[e].$el,'[data-p-highlight="true"]');return u.DomHandler.getAttribute(t,"id")}return-1},findLastSelectedOptionIndex:function(e){if(this.hasSelectedOption(e)){var t=u.DomHandler.find(this.$refs[e].$el,'[data-p-highlight="true"]');return u.ObjectUtils.findIndexInList(t[t.length-1],this.list.children)}return-1},findMatchedOptionIndex:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.focusedOptionIndex;return D(this.findAllItems(e)).findIndex((function(e){return e.id===t}))},findNextOptionIndex:function(e){var t=this.findMatchedOptionIndex(e);return t>-1?t+1:0},findPrevOptionIndex:function(e){var t=this.findMatchedOptionIndex(e);return t>-1?t-1:0},changeFocusedOptionIndex:function(e,t){var o=this.findAllItems(t),n=e>=o.length?o.length-1:e<0?0:e;this.focusedOptionIndex=o[n].getAttribute("id"),this.scrollInView(o[n].getAttribute("id"),t)},scrollInView:function(e,t){var o=u.DomHandler.findSingle(this.$refs[t].$el,'[data-pc-section="item"][id="'.concat(e,'"]'));o&&o.scrollIntoView&&o.scrollIntoView({block:"nearest",inline:"start"})},updateListScroll:function(e){var t=u.DomHandler.find(e,'[data-pc-section="item"][data-p-highlight="true"]');if(t&&t.length)switch(this.reorderDirection){case"up":u.DomHandler.scrollInView(e,t[0]);break;case"top":e.scrollTop=0;break;case"down":u.DomHandler.scrollInView(e,t[t.length-1]);break;case"bottom":e.scrollTop=e.scrollHeight}},initMedia:function(){this.media=window.matchMedia("(max-width: ".concat(this.breakpoint,")")),this.viewChanged=this.media.matches,this.bindMediaChangeListener()},destroyMedia:function(){this.unbindMediaChangeListener()},bindMediaChangeListener:function(){var e=this;this.media&&!this.mediaChangeListener&&(this.mediaChangeListener=function(t){e.viewChanged=t.matches},this.media.addEventListener("change",this.mediaChangeListener))},unbindMediaChangeListener:function(){this.media&&this.mediaChangeListener&&(this.media.removeEventListener("change",this.mediaChangeListener),this.mediaChangeListener=null)},createStyle:function(){if(!this.styleElement&&!this.isUnstyled){var e;this.$el.setAttribute(this.attributeSelector,""),this.styleElement=document.createElement("style"),this.styleElement.type="text/css",u.DomHandler.setAttribute(this.styleElement,"nonce",null===(e=this.$primevue)||void 0===e||null===(e=e.config)||void 0===e||null===(e=e.csp)||void 0===e?void 0:e.nonce),document.head.appendChild(this.styleElement);var t="\n@media screen and (max-width: ".concat(this.breakpoint,") {\n .p-picklist[").concat(this.attributeSelector,"] {\n flex-direction: column;\n }\n\n .p-picklist[").concat(this.attributeSelector,"] .p-picklist-buttons {\n padding: var(--content-padding);\n flex-direction: row;\n }\n\n .p-picklist[").concat(this.attributeSelector,"] .p-picklist-buttons .p-button {\n margin-right: var(--inline-spacing);\n margin-bottom: 0;\n }\n\n .p-picklist[").concat(this.attributeSelector,"] .p-picklist-buttons .p-button:last-child {\n margin-right: 0;\n }\n}\n");this.styleElement.innerHTML=t}},destroyStyle:function(){this.styleElement&&(document.head.removeChild(this.styleElement),this.styleElement=null)},moveDisabled:function(e){if(!this.d_selection[e]||!this.d_selection[e].length)return!0},moveAllDisabled:function(e){return u.ObjectUtils.isEmpty(this[e])},hasSelectedOption:function(e){return u.ObjectUtils.isNotEmpty("sourceList"===e?this.d_selection[0]:this.d_selection[1])}},computed:{idSource:function(){return"".concat(this.id,"_source")},idTarget:function(){return"".concat(this.id,"_target")},focusedOptionId:function(){return-1!==this.focusedOptionIndex?this.focusedOptionIndex:null},sourceList:function(){return this.modelValue&&this.modelValue[0]?this.modelValue[0]:null},targetList:function(){return this.modelValue&&this.modelValue[1]?this.modelValue[1]:null},attributeSelector:function(){return u.UniqueComponentId()},moveUpAriaLabel:function(){return this.$primevue.config.locale.aria?this.$primevue.config.locale.aria.moveUp:void 0},moveTopAriaLabel:function(){return this.$primevue.config.locale.aria?this.$primevue.config.locale.aria.moveTop:void 0},moveDownAriaLabel:function(){return this.$primevue.config.locale.aria?this.$primevue.config.locale.aria.moveDown:void 0},moveBottomAriaLabel:function(){return this.$primevue.config.locale.aria?this.$primevue.config.locale.aria.moveBottom:void 0},moveToTargetAriaLabel:function(){return this.$primevue.config.locale.aria?this.$primevue.config.locale.aria.moveToTarget:void 0},moveAllToTargetAriaLabel:function(){return this.$primevue.config.locale.aria?this.$primevue.config.locale.aria.moveAllToTarget:void 0},moveToSourceAriaLabel:function(){return this.$primevue.config.locale.aria?this.$primevue.config.locale.aria.moveToSource:void 0},moveAllToSourceAriaLabel:function(){return this.$primevue.config.locale.aria?this.$primevue.config.locale.aria.moveAllToSource:void 0}},components:{PLButton:f.default,AngleRightIcon:L.default,AngleLeftIcon:w.default,AngleDownIcon:I.default,AngleUpIcon:x.default,AngleDoubleRightIcon:b.default,AngleDoubleLeftIcon:g.default,AngleDoubleDownIcon:v.default,AngleDoubleUpIcon:y.default},directives:{ripple:S.default}};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 P(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),o.push.apply(o,n)}return o}function V(e){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?P(Object(o),!0).forEach((function(t){_(e,t,o[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):P(Object(o)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(o,t))}))}return e}function _(e,t,o){var n;return(t="symbol"==A(n=E(t,"string"))?n:String(n))in e?Object.defineProperty(e,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[t]=o,e}function E(e,t){if("object"!=A(e)||!e)return e;var o=e[Symbol.toPrimitive];if(void 0!==o){var n=o.call(e,t||"default");if("object"!=A(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}var M=["id","onClick","onDblclick","onMousedown","onMousemove","aria-selected","data-p-highlight","data-p-focused"],U=["id","onClick","onDblclick","onMousedown","onMousemove","aria-selected","data-p-highlight","data-p-focused"];B.render=function(e,t,o,n,i,r){var l=p.resolveComponent("AngleUpIcon"),s=p.resolveComponent("PLButton"),a=p.resolveComponent("AngleDoubleUpIcon"),c=p.resolveComponent("AngleDownIcon"),u=p.resolveComponent("AngleDoubleDownIcon"),d=p.resolveDirective("ripple");return p.openBlock(),p.createElementBlock("div",p.mergeProps({class:e.cx("root")},e.ptm("root")),[e.showSourceControls?(p.openBlock(),p.createElementBlock("div",p.mergeProps({key:0,class:e.cx("sourceControls")},e.ptm("sourceControls"),{"data-pc-group-section":"controls"}),[p.renderSlot(e.$slots,"sourcecontrolsstart"),p.createVNode(s,p.mergeProps({"aria-label":r.moveUpAriaLabel,disabled:r.moveDisabled(0),type:"button",onClick:t[0]||(t[0]=function(e){return r.moveUp(e,0)})},e.moveUpButtonProps,{pt:e.ptm("sourceMoveUpButton"),unstyled:e.unstyled,"data-pc-section":"sourcemoveupbutton"}),{icon:p.withCtx((function(){return[p.renderSlot(e.$slots,"moveupicon",{},(function(){return[p.createVNode(l,p.mergeProps(e.ptm("sourceMoveUpButton").icon,{"data-pc-section":"moveupicon"}),null,16)]}))]})),_:3},16,["aria-label","disabled","pt","unstyled"]),p.createVNode(s,p.mergeProps({"aria-label":r.moveTopAriaLabel,disabled:r.moveDisabled(0),type:"button",onClick:t[1]||(t[1]=function(e){return r.moveTop(e,0)})},e.moveTopButtonProps,{pt:e.ptm("sourceMoveTopButton"),unstyled:e.unstyled,"data-pc-section":"sourcemovetopbutton"}),{icon:p.withCtx((function(){return[p.renderSlot(e.$slots,"movetopicon",{},(function(){return[p.createVNode(a,p.mergeProps(e.ptm("sourceMoveTopButton").icon,{"data-pc-section":"movetopicon"}),null,16)]}))]})),_:3},16,["aria-label","disabled","pt","unstyled"]),p.createVNode(s,p.mergeProps({"aria-label":r.moveDownAriaLabel,disabled:r.moveDisabled(0),type:"button",onClick:t[2]||(t[2]=function(e){return r.moveDown(e,0)})},e.moveDownButtonProps,{pt:e.ptm("sourceMoveDownButton"),unstyled:e.unstyled,"data-pc-section":"sourcemovedownbutton"}),{icon:p.withCtx((function(){return[p.renderSlot(e.$slots,"movedownicon",{},(function(){return[p.createVNode(c,p.mergeProps(e.ptm("sourceMoveDownButton").icon,{"data-pc-section":"movedownicon"}),null,16)]}))]})),_:3},16,["aria-label","disabled","pt","unstyled"]),p.createVNode(s,p.mergeProps({"aria-label":r.moveBottomAriaLabel,disabled:r.moveDisabled(0),type:"button",onClick:t[3]||(t[3]=function(e){return r.moveBottom(e,0)})},e.moveBottomButtonProps,{pt:e.ptm("sourceMoveBottomButton"),unstyled:e.unstyled,"data-pc-section":"sourcemovebottombutton"}),{icon:p.withCtx((function(){return[p.renderSlot(e.$slots,"movebottomicon",{},(function(){return[p.createVNode(u,p.mergeProps(e.ptm("sourceMoveBottomButton").icon,{"data-pc-section":"movebottomicon"}),null,16)]}))]})),_:3},16,["aria-label","disabled","pt","unstyled"]),p.renderSlot(e.$slots,"sourcecontrolsend")],16)):p.createCommentVNode("",!0),p.createElementVNode("div",p.mergeProps({class:e.cx("sourceWrapper")},e.ptm("sourceWrapper"),{"data-pc-group-section":"listwrapper"}),[e.$slots.sourceheader?(p.openBlock(),p.createElementBlock("div",p.mergeProps({key:0,class:e.cx("sourceHeader")},e.ptm("sourceHeader"),{"data-pc-group-section":"header"}),[p.renderSlot(e.$slots,"sourceheader")],16)):p.createCommentVNode("",!0),p.createVNode(p.TransitionGroup,p.mergeProps({ref:"sourceList",id:r.idSource+"_list",name:"p-picklist-flip",tag:"ul",class:e.cx("sourceList"),style:e.listStyle,role:"listbox","aria-multiselectable":"true","aria-activedescendant":i.focused.sourceList?r.focusedOptionId:void 0,tabindex:r.sourceList&&r.sourceList.length>0?e.tabindex:-1,onFocus:t[5]||(t[5]=function(e){return r.onListFocus(e,"sourceList")}),onBlur:t[6]||(t[6]=function(e){return r.onListBlur(e,"sourceList")}),onKeydown:t[7]||(t[7]=function(e){return r.onItemKeyDown(e,"sourceList")})},V(V(V({},e.sourceListProps),e.ptm("sourceList")),e.ptm("transition")),{"data-pc-group-section":"list"}),{default:p.withCtx((function(){return[(p.openBlock(!0),p.createElementBlock(p.Fragment,null,p.renderList(r.sourceList,(function(o,n){return p.withDirectives((p.openBlock(),p.createElementBlock("li",p.mergeProps({key:r.getItemKey(o,n),id:r.idSource+"_"+n,class:e.cx("item",{item:o,id:"".concat(r.idSource,"_").concat(n),listIndex:0}),onClick:function(e){return r.onItemClick(e,o,n,0)},onDblclick:function(e){return r.onItemDblClick(e,o,0)},onTouchend:t[4]||(t[4]=function(){return r.onItemTouchEnd&&r.onItemTouchEnd.apply(r,arguments)}),onMousedown:function(e){return r.onOptionMouseDown(e,n,"sourceList")},onMousemove:function(e){return r.onOptionMouseMove(n,"sourceList")},role:"option","aria-selected":r.isSelected(o,0)},r.getPTOptions(o,"item","".concat(r.idSource,"_").concat(n),0),{"data-p-highlight":r.isSelected(o,0),"data-p-focused":"".concat(r.idSource,"_").concat(n)===r.focusedOptionId}),[p.renderSlot(e.$slots,"item",{item:o,index:n})],16,M)),[[d]])})),128))]})),_:3},16,["id","class","style","aria-activedescendant","tabindex"])],16),p.createElementVNode("div",p.mergeProps({class:e.cx("buttons")},e.ptm("buttons"),{"data-pc-group-section":"controls"}),[p.renderSlot(e.$slots,"movecontrolsstart"),p.createVNode(s,p.mergeProps({"aria-label":r.moveToTargetAriaLabel,type:"button",onClick:r.moveToTarget,disabled:r.moveDisabled(0)},e.moveToTargetProps,{pt:e.ptm("moveToTargetButton"),unstyled:e.unstyled,"data-pc-section":"movetotargetbuton"}),{icon:p.withCtx((function(){return[p.renderSlot(e.$slots,"movetotargeticon",{viewChanged:i.viewChanged},(function(){return[(p.openBlock(),p.createBlock(p.resolveDynamicComponent(i.viewChanged?"AngleDownIcon":"AngleRightIcon"),p.mergeProps(e.ptm("moveToTargetButton").icon,{"data-pc-section":"movetotargeticon"}),null,16))]}))]})),_:3},16,["aria-label","onClick","disabled","pt","unstyled"]),p.createVNode(s,p.mergeProps({"aria-label":r.moveAllToTargetAriaLabel,type:"button",onClick:r.moveAllToTarget,disabled:r.moveAllDisabled("sourceList")},e.moveAllToTargetProps,{pt:e.ptm("moveAllToTargetButton"),unstyled:e.unstyled,"data-pc-section":"movealltotargetbuton"}),{icon:p.withCtx((function(){return[p.renderSlot(e.$slots,"movealltotargeticon",{viewChanged:i.viewChanged},(function(){return[(p.openBlock(),p.createBlock(p.resolveDynamicComponent(i.viewChanged?"AngleDoubleDownIcon":"AngleDoubleRightIcon"),p.mergeProps(e.ptm("moveAllToTargetButton").icon,{"data-pc-section":"movealltotargeticon"}),null,16))]}))]})),_:3},16,["aria-label","onClick","disabled","pt","unstyled"]),p.createVNode(s,p.mergeProps({"aria-label":r.moveToSourceAriaLabel,type:"button",onClick:r.moveToSource,disabled:r.moveDisabled(1)},e.moveToSourceProps,{pt:e.ptm("moveToSourceButton"),unstyled:e.unstyled,"data-pc-section":"movetosourcebuton"}),{icon:p.withCtx((function(){return[p.renderSlot(e.$slots,"movetosourceicon",{viewChanged:i.viewChanged},(function(){return[(p.openBlock(),p.createBlock(p.resolveDynamicComponent(i.viewChanged?"AngleUpIcon":"AngleLeftIcon"),p.mergeProps(e.ptm("moveToSourceButton").icon,{"data-pc-section":"movetosourceicon"}),null,16))]}))]})),_:3},16,["aria-label","onClick","disabled","pt","unstyled"]),p.createVNode(s,p.mergeProps({"aria-label":r.moveAllToSourceAriaLabel,type:"button",onClick:r.moveAllToSource,disabled:r.moveAllDisabled("targetList")},e.moveAllToSourceProps,{pt:e.ptm("moveAllToSourceButton"),"data-pc-section":"movealltosourcebuton",unstyled:e.unstyled}),{icon:p.withCtx((function(){return[p.renderSlot(e.$slots,"movealltosourceicon",{viewChanged:i.viewChanged},(function(){return[(p.openBlock(),p.createBlock(p.resolveDynamicComponent(i.viewChanged?"AngleDoubleUpIcon":"AngleDoubleLeftIcon"),p.mergeProps(e.ptm("moveAllToSourceButton").icon,{"data-pc-section":"movealltosourceicon"}),null,16))]}))]})),_:3},16,["aria-label","onClick","disabled","pt","unstyled"]),p.renderSlot(e.$slots,"movecontrolsend")],16),p.createElementVNode("div",p.mergeProps({class:e.cx("targetWrapper")},e.ptm("targetWrapper"),{"data-pc-group-section":"listwrapper"}),[e.$slots.targetheader?(p.openBlock(),p.createElementBlock("div",p.mergeProps({key:0,class:e.cx("targetHeader")},e.ptm("targetHeader"),{"data-pc-group-section":"header"}),[p.renderSlot(e.$slots,"targetheader")],16)):p.createCommentVNode("",!0),p.createVNode(p.TransitionGroup,p.mergeProps({ref:"targetList",id:r.idTarget+"_list",name:"p-picklist-flip",tag:"ul",class:e.cx("targetList"),style:e.listStyle,role:"listbox","aria-multiselectable":"true","aria-activedescendant":i.focused.targetList?r.focusedOptionId:void 0,tabindex:r.targetList&&r.targetList.length>0?e.tabindex:-1,onFocus:t[10]||(t[10]=function(e){return r.onListFocus(e,"targetList")}),onBlur:t[11]||(t[11]=function(e){return r.onListBlur(e,"targetList")}),onKeydown:t[12]||(t[12]=function(e){return r.onItemKeyDown(e,"targetList")})},V(V(V({},e.targetListProps),e.ptm("targetList")),e.ptm("transition")),{"data-pc-group-section":"list"}),{default:p.withCtx((function(){return[(p.openBlock(!0),p.createElementBlock(p.Fragment,null,p.renderList(r.targetList,(function(o,n){return p.withDirectives((p.openBlock(),p.createElementBlock("li",p.mergeProps({key:r.getItemKey(o,n),id:r.idTarget+"_"+n,class:e.cx("item",{item:o,id:"".concat(r.idTarget,"_").concat(n),listIndex:1}),onClick:function(e){return r.onItemClick(e,o,n,1)},onDblclick:function(e){return r.onItemDblClick(e,o,1)},onKeydown:t[8]||(t[8]=function(e){return r.onItemKeyDown(e,"targetList")}),onMousedown:function(e){return r.onOptionMouseDown(e,n,"targetList")},onMousemove:function(e){return r.onOptionMouseMove(n,"targetList")},onTouchend:t[9]||(t[9]=function(){return r.onItemTouchEnd&&r.onItemTouchEnd.apply(r,arguments)}),role:"option","aria-selected":r.isSelected(o,1)},r.getPTOptions(o,"item","".concat(r.idTarget,"_").concat(n),1),{"data-p-highlight":r.isSelected(o,1),"data-p-focused":"".concat(r.idTarget,"_").concat(n)===r.focusedOptionId}),[p.renderSlot(e.$slots,"item",{item:o,index:n})],16,U)),[[d]])})),128))]})),_:3},16,["id","class","style","aria-activedescendant","tabindex"])],16),e.showTargetControls?(p.openBlock(),p.createElementBlock("div",p.mergeProps({key:1,class:e.cx("targetControls")},e.ptm("targetControls"),{"data-pc-group-section":"controls"}),[p.renderSlot(e.$slots,"targetcontrolsstart"),p.createVNode(s,p.mergeProps({"aria-label":r.moveUpAriaLabel,disabled:r.moveDisabled(1),type:"button",onClick:t[13]||(t[13]=function(e){return r.moveUp(e,1)})},e.moveUpButtonProps,{pt:e.ptm("targetMoveUpButton"),unstyled:e.unstyled,"data-pc-section":"targetmoveupbutton"}),{icon:p.withCtx((function(){return[p.renderSlot(e.$slots,"moveupicon",{},(function(){return[p.createVNode(l,p.mergeProps(e.ptm("targetMoveUpButton").icon,{"data-pc-section":"moveupicon"}),null,16)]}))]})),_:3},16,["aria-label","disabled","pt","unstyled"]),p.createVNode(s,p.mergeProps({"aria-label":r.moveTopAriaLabel,disabled:r.moveDisabled(1),type:"button",onClick:t[14]||(t[14]=function(e){return r.moveTop(e,1)})},e.moveTopButtonProps,{pt:e.ptm("targetMoveTopButton"),unstyled:e.unstyled,"data-pc-section":"targetmovetopbutton"}),{icon:p.withCtx((function(){return[p.renderSlot(e.$slots,"movetopicon",{},(function(){return[p.createVNode(a,p.mergeProps(e.ptm("targetMoveTopButton").icon,{"data-pc-section":"movetopicon"}),null,16)]}))]})),_:3},16,["aria-label","disabled","pt","unstyled"]),p.createVNode(s,p.mergeProps({"aria-label":r.moveDownAriaLabel,disabled:r.moveDisabled(1),type:"button",onClick:t[15]||(t[15]=function(e){return r.moveDown(e,1)})},e.moveDownButtonProps,{pt:e.ptm("targetMoveDownButton"),unstyled:e.unstyled,"data-pc-section":"targetmovedownbutton"}),{icon:p.withCtx((function(){return[p.renderSlot(e.$slots,"movedownicon",{},(function(){return[p.createVNode(c,p.mergeProps(e.ptm("targetMoveDownButton").icon,{"data-pc-section":"movedownicon"}),null,16)]}))]})),_:3},16,["aria-label","disabled","pt","unstyled"]),p.createVNode(s,p.mergeProps({"aria-label":r.moveBottomAriaLabel,disabled:r.moveDisabled(1),type:"button",onClick:t[16]||(t[16]=function(e){return r.moveBottom(e,1)})},e.moveBottomButtonProps,{pt:e.ptm("targetMoveBottomButton"),unstyled:e.unstyled,"data-pc-section":"targetmovebottombutton"}),{icon:p.withCtx((function(){return[p.renderSlot(e.$slots,"movebottomicon",{},(function(){return[p.createVNode(u,p.mergeProps(e.ptm("targetMoveBottomButton").icon,{"data-pc-section":"movebottomicon"}),null,16)]}))]})),_:3},16,["aria-label","disabled","pt","unstyled"]),p.renderSlot(e.$slots,"targetcontrolsend")],16)):p.createCommentVNode("",!0)],16)},module.exports=B;
1
+ "use strict";var e=require("primevue/button"),t=require("primevue/icons/angledoubledown"),o=require("primevue/icons/angledoubleleft"),n=require("primevue/icons/angledoubleright"),i=require("primevue/icons/angledoubleup"),r=require("primevue/icons/angledown"),s=require("primevue/icons/angleleft"),l=require("primevue/icons/angleright"),a=require("primevue/icons/angleup"),c=require("primevue/ripple"),u=require("primevue/utils"),d=require("primevue/basecomponent"),m=require("primevue/picklist/style"),p=require("vue");function h(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var f=h(e),v=h(t),g=h(o),b=h(n),y=h(i),I=h(r),w=h(s),x=h(l),L=h(a),S=h(c);function D(e){return C(e)||O(e)||$(e)||T()}function T(){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 $(e,t){if(e){if("string"==typeof e)return k(e,t);var o=Object.prototype.toString.call(e).slice(8,-1);return"Object"===o&&e.constructor&&(o=e.constructor.name),"Map"===o||"Set"===o?Array.from(e):"Arguments"===o||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(o)?k(e,t):void 0}}function O(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function C(e){if(Array.isArray(e))return k(e)}function k(e,t){(null==t||t>e.length)&&(t=e.length);for(var o=0,n=new Array(t);o<t;o++)n[o]=e[o];return n}var B={name:"PickList",extends:{name:"BasePickList",extends:h(d).default,props:{modelValue:{type:Array,default:function(){return[[],[]]}},selection:{type:Array,default:function(){return[[],[]]}},dataKey:{type:String,default:null},listStyle:{type:null,default:null},metaKeySelection:{type:Boolean,default:!1},autoOptionFocus:{type:Boolean,default:!0},focusOnHover:{type:Boolean,default:!0},responsive:{type:Boolean,default:!0},breakpoint:{type:String,default:"960px"},stripedRows:{type:Boolean,default:!1},showSourceControls:{type:Boolean,default:!0},showTargetControls:{type:Boolean,default:!0},targetListProps:{type:null,default:null},sourceListProps:{type:null,default:null},moveUpButtonProps:{type:null,default:null},moveTopButtonProps:{type:null,default:null},moveDownButtonProps:{type:null,default:null},moveBottomButtonProps:{type:null,default:null},moveToTargetProps:{type:null,default:null},moveAllToTargetProps:{type:null,default:null},moveToSourceProps:{type:null,default:null},moveAllToSourceProps:{type:null,default:null},tabindex:{type:Number,default:0}},style:h(m).default,provide:function(){return{$parentInstance:this}}},emits:["update:modelValue","reorder","update:selection","selection-change","move-to-target","move-to-source","move-all-to-target","move-all-to-source","focus","blur"],itemTouched:!1,reorderDirection:null,styleElement:null,media:null,mediaChangeListener:null,data:function(){return{id:this.$attrs.id,d_selection:this.selection,focused:{sourceList:!1,targetList:!1},focusedOptionIndex:-1,viewChanged:!1}},watch:{"$attrs.id":function(e){this.id=e||u.UniqueComponentId()},selection:function(e){this.d_selection=e},breakpoint:function(){this.destroyMedia(),this.initMedia()}},updated:function(){this.reorderDirection&&(this.updateListScroll(this.$refs.sourceList.$el),this.updateListScroll(this.$refs.targetList.$el),this.reorderDirection=null)},beforeUnmount:function(){this.destroyStyle(),this.destroyMedia()},mounted:function(){this.id=this.id||u.UniqueComponentId(),this.responsive&&(this.createStyle(),this.initMedia())},methods:{getItemKey:function(e,t){return this.dataKey?u.ObjectUtils.resolveFieldData(e,this.dataKey):t},getPTOptions:function(e,t,o,n){return this.ptm(t,{context:{active:this.isSelected(e,n),focused:o===this.focusedOptionId}})},isSelected:function(e,t){return-1!=u.ObjectUtils.findIndexInList(e,this.d_selection[t])},onListFocus:function(e,t){this.focused[t]=!0,this.findCurrentFocusedIndex(t),this.scrollInView(this.focusedOptionIndex,t),this.$emit("focus",e)},onListBlur:function(e,t){this.focused[t]=!1,this.focusedOptionIndex=-1,this.$emit("blur",e)},onOptionMouseDown:function(e,t,o){this.focused[o]=!0,this.focusedOptionIndex=t},onOptionMouseMove:function(e,t){this.focusOnHover&&this.focused[t]&&this.changeFocusedOptionIndex(e,t)},moveUp:function(e,t){if(this.d_selection&&this.d_selection[t]){for(var o=D(this.modelValue[t]),n=this.d_selection[t],i=0;i<n.length;i++){var r=u.ObjectUtils.findIndexInList(n[i],o);if(0===r)break;var s=o[r-1];o[r-1]=o[r],o[r]=s}var l=D(this.modelValue);l[t]=o,this.reorderDirection="up",this.$emit("update:modelValue",l),this.$emit("reorder",{originalEvent:e,value:l,direction:this.reorderDirection,listIndex:t})}},moveTop:function(e,t){if(this.d_selection){for(var o=D(this.modelValue[t]),n=this.d_selection[t],i=0;i<n.length;i++){var r=u.ObjectUtils.findIndexInList(n[i],o);if(0===r)break;var s=o.splice(r,1)[0];o.unshift(s)}var l=D(this.modelValue);l[t]=o,this.reorderDirection="top",this.$emit("update:modelValue",l),this.$emit("reorder",{originalEvent:e,value:l,direction:this.reorderDirection,listIndex:t})}},moveDown:function(e,t){if(this.d_selection){for(var o=D(this.modelValue[t]),n=this.d_selection[t],i=n.length-1;i>=0;i--){var r=u.ObjectUtils.findIndexInList(n[i],o);if(r===o.length-1)break;var s=o[r+1];o[r+1]=o[r],o[r]=s}var l=D(this.modelValue);l[t]=o,this.reorderDirection="down",this.$emit("update:modelValue",l),this.$emit("reorder",{originalEvent:e,value:l,direction:this.reorderDirection,listIndex:t})}},moveBottom:function(e,t){if(this.d_selection){for(var o=D(this.modelValue[t]),n=this.d_selection[t],i=n.length-1;i>=0;i--){var r=u.ObjectUtils.findIndexInList(n[i],o);if(r===o.length-1)break;var s=o.splice(r,1)[0];o.push(s)}var l=D(this.modelValue);l[t]=o,this.reorderDirection="bottom",this.$emit("update:modelValue",l),this.$emit("reorder",{originalEvent:e,value:l,direction:this.reorderDirection,listIndex:t})}},moveToTarget:function(e){var t=this.d_selection&&this.d_selection[0]?this.d_selection[0]:null,o=D(this.modelValue[0]),n=D(this.modelValue[1]);if(t){for(var i=0;i<t.length;i++){var r=t[i];-1==u.ObjectUtils.findIndexInList(r,n)&&n.push(o.splice(u.ObjectUtils.findIndexInList(r,o),1)[0])}var s=D(this.modelValue);s[0]=o,s[1]=n,this.$emit("update:modelValue",s),this.$emit("move-to-target",{originalEvent:e,items:D(new Set(t))}),this.d_selection[0]=[],this.$emit("update:selection",this.d_selection),this.$emit("selection-change",{originalEvent:e,value:this.d_selection})}},moveAllToTarget:function(e){if(this.modelValue[0]){var t=D(this.modelValue[0]),o=D(this.modelValue[1]);this.$emit("move-all-to-target",{originalEvent:e,items:t}),o=[].concat(D(o),D(t)),t=[];var n=D(this.modelValue);n[0]=t,n[1]=o,this.$emit("update:modelValue",n),this.d_selection[0]=[],this.$emit("update:selection",this.d_selection),this.$emit("selection-change",{originalEvent:e,value:this.d_selection})}},moveToSource:function(e){var t=this.d_selection&&this.d_selection[1]?this.d_selection[1]:null,o=D(this.modelValue[0]),n=D(this.modelValue[1]);if(t){for(var i=0;i<t.length;i++){var r=t[i];-1==u.ObjectUtils.findIndexInList(r,o)&&o.push(n.splice(u.ObjectUtils.findIndexInList(r,n),1)[0])}var s=D(this.modelValue);s[0]=o,s[1]=n,this.$emit("update:modelValue",s),this.$emit("move-to-source",{originalEvent:e,items:D(new Set(t))}),this.d_selection[1]=[],this.$emit("update:selection",this.d_selection),this.$emit("selection-change",{originalEvent:e,value:this.d_selection})}},moveAllToSource:function(e){if(this.modelValue[1]){var t=D(this.modelValue[0]),o=D(this.modelValue[1]);this.$emit("move-all-to-source",{originalEvent:e,items:o}),t=[].concat(D(t),D(o)),o=[];var n=D(this.modelValue);n[0]=t,n[1]=o,this.$emit("update:modelValue",n),this.d_selection[1]=[],this.$emit("update:selection",this.d_selection),this.$emit("selection-change",{originalEvent:e,value:this.d_selection})}},onItemClick:function(e,t,o,n){var i=0===n?"sourceList":"targetList";this.itemTouched=!1;var r,s=this.d_selection[n],l=u.ObjectUtils.findIndexInList(t,s),a=-1!=l,c=!this.itemTouched&&this.metaKeySelection,d=u.DomHandler.find(this.$refs[i].$el,'[data-pc-section="item"]')[o].getAttribute("id");if(this.focusedOptionIndex=d,c){var m=e.metaKey||e.ctrlKey;a&&m?r=s.filter((function(e,t){return t!==l})):(r=m&&s?D(s):[]).push(t)}else a?r=s.filter((function(e,t){return t!==l})):(r=s?D(s):[]).push(t);var p=D(this.d_selection);p[n]=r,this.d_selection=p,this.$emit("update:selection",this.d_selection),this.$emit("selection-change",{originalEvent:e,value:this.d_selection})},onItemDblClick:function(e,t,o){0===o?this.moveToTarget(e):1===o&&this.moveToSource(e)},onItemTouchEnd:function(){this.itemTouched=!0},onItemKeyDown:function(e,t){switch(e.code){case"ArrowDown":this.onArrowDownKey(e,t);break;case"ArrowUp":this.onArrowUpKey(e,t);break;case"Home":this.onHomeKey(e,t);break;case"End":this.onEndKey(e,t);break;case"Enter":case"NumpadEnter":this.onEnterKey(e,t);break;case"Space":this.onSpaceKey(e,t);break;case"KeyA":e.ctrlKey&&(this.d_selection=D(this.modelValue),this.$emit("update:selection",this.d_selection),e.preventDefault())}},onArrowDownKey:function(e,t){var o=-1!==this.focusedOptionIndex?this.findNextOptionIndex(t):this.findFirstSelectedOptionIndex(t);this.changeFocusedOptionIndex(o,t),e.shiftKey&&this.onEnterKey(e,t),e.preventDefault()},onArrowUpKey:function(e,t){var o=-1!==this.focusedOptionIndex?this.findPrevOptionIndex(t):this.findLastSelectedOptionIndex(t);this.changeFocusedOptionIndex(o,t),e.shiftKey&&this.onEnterKey(e,t),e.preventDefault()},onEnterKey:function(e,t){var o="sourceList"===t?0:1,n=this.findMatchedOptionIndex(t);this.onItemClick(e,this.modelValue[o][n],n,o),e.preventDefault()},onSpaceKey:function(e,t){if(e.preventDefault(),e.shiftKey&&this.d_selection&&this.d_selection.length>0){var o="sourceList"===t?0:1,n=u.ObjectUtils.findIndexInList(this.d_selection[o][0],D(this.modelValue[o])),i=this.findMatchedOptionIndex(t);this.d_selection[o]=D(this.modelValue[o]).slice(Math.min(n,i),Math.max(n,i)+1),this.$emit("update:selection",this.d_selection),this.$emit("selection-change",{originalEvent:e,value:this.d_selection})}else this.onEnterKey(e,t)},onHomeKey:function(e,t){if(e.ctrlKey&&e.shiftKey){var o="sourceList"===t?0:1,n=this.findMatchedOptionIndex(t);this.d_selection[o]=D(this.modelValue[o]).slice(0,n+1),this.$emit("update:selection",this.d_selection),this.$emit("selection-change",{originalEvent:e,value:this.d_selection})}else this.changeFocusedOptionIndex(0,t);e.preventDefault()},onEndKey:function(e,t){var o=this.findAllItems(t);if(e.ctrlKey&&e.shiftKey){var n="sourceList"===t?0:1,i=this.findMatchedOptionIndex(t);this.d_selection[n]=D(this.modelValue[n]).slice(i,o.length),this.$emit("update:selection",this.d_selection),this.$emit("selection-change",{originalEvent:e,value:this.d_selection})}else this.changeFocusedOptionIndex(o.length-1,t);e.preventDefault()},findAllItems:function(e){return u.DomHandler.find(this.$refs[e].$el,'[data-pc-section="item"]')},findFocusedItem:function(e){return u.DomHandler.findSingle(this.$refs[e].$el,'[data-pc-section="item"][id='.concat(this.focusedOptionIndex,"]"))},findCurrentFocusedIndex:function(e){-1===this.focusedOptionIndex&&(this.focusedOptionIndex=this.findFirstSelectedOptionIndex(e),this.autoOptionFocus&&-1===this.focusedOptionIndex&&(this.focusedOptionIndex=this.findFirstFocusedOptionIndex(e)))},findFirstFocusedOptionIndex:function(e){var t=u.DomHandler.findSingle(this.$refs[e].$el,'[data-pc-section="item"]');return u.DomHandler.getAttribute(t,"id")},findFirstSelectedOptionIndex:function(e){if(this.hasSelectedOption(e)){var t=u.DomHandler.findSingle(this.$refs[e].$el,'[data-p-highlight="true"]');return u.DomHandler.getAttribute(t,"id")}return-1},findLastSelectedOptionIndex:function(e){if(this.hasSelectedOption(e)){var t=u.DomHandler.find(this.$refs[e].$el,'[data-p-highlight="true"]');return u.ObjectUtils.findIndexInList(t[t.length-1],this.list.children)}return-1},findMatchedOptionIndex:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.focusedOptionIndex;return D(this.findAllItems(e)).findIndex((function(e){return e.id===t}))},findNextOptionIndex:function(e){var t=this.findMatchedOptionIndex(e);return t>-1?t+1:0},findPrevOptionIndex:function(e){var t=this.findMatchedOptionIndex(e);return t>-1?t-1:0},changeFocusedOptionIndex:function(e,t){var o=this.findAllItems(t),n=e>=o.length?o.length-1:e<0?0:e;this.focusedOptionIndex=o[n].getAttribute("id"),this.scrollInView(o[n].getAttribute("id"),t)},scrollInView:function(e,t){var o=u.DomHandler.findSingle(this.$refs[t].$el,'[data-pc-section="item"][id="'.concat(e,'"]'));o&&o.scrollIntoView&&o.scrollIntoView({block:"nearest",inline:"start",behavior:"smooth"})},updateListScroll:function(e){var t=u.DomHandler.find(e,'[data-pc-section="item"][data-p-highlight="true"]');if(t&&t.length)switch(this.reorderDirection){case"up":u.DomHandler.scrollInView(e,t[0]);break;case"top":e.scrollTop=0;break;case"down":u.DomHandler.scrollInView(e,t[t.length-1]);break;case"bottom":e.scrollTop=e.scrollHeight}},initMedia:function(){this.media=window.matchMedia("(max-width: ".concat(this.breakpoint,")")),this.viewChanged=this.media.matches,this.bindMediaChangeListener()},destroyMedia:function(){this.unbindMediaChangeListener()},bindMediaChangeListener:function(){var e=this;this.media&&!this.mediaChangeListener&&(this.mediaChangeListener=function(t){e.viewChanged=t.matches},this.media.addEventListener("change",this.mediaChangeListener))},unbindMediaChangeListener:function(){this.media&&this.mediaChangeListener&&(this.media.removeEventListener("change",this.mediaChangeListener),this.mediaChangeListener=null)},createStyle:function(){if(!this.styleElement&&!this.isUnstyled){var e;this.$el.setAttribute(this.attributeSelector,""),this.styleElement=document.createElement("style"),this.styleElement.type="text/css",u.DomHandler.setAttribute(this.styleElement,"nonce",null===(e=this.$primevue)||void 0===e||null===(e=e.config)||void 0===e||null===(e=e.csp)||void 0===e?void 0:e.nonce),document.head.appendChild(this.styleElement);var t="\n@media screen and (max-width: ".concat(this.breakpoint,") {\n .p-picklist[").concat(this.attributeSelector,"] {\n flex-direction: column;\n }\n\n .p-picklist[").concat(this.attributeSelector,"] .p-picklist-buttons {\n padding: var(--content-padding);\n flex-direction: row;\n }\n\n .p-picklist[").concat(this.attributeSelector,"] .p-picklist-buttons .p-button {\n margin-right: var(--inline-spacing);\n margin-bottom: 0;\n }\n\n .p-picklist[").concat(this.attributeSelector,"] .p-picklist-buttons .p-button:last-child {\n margin-right: 0;\n }\n}\n");this.styleElement.innerHTML=t}},destroyStyle:function(){this.styleElement&&(document.head.removeChild(this.styleElement),this.styleElement=null)},moveDisabled:function(e){if(!this.d_selection[e]||!this.d_selection[e].length)return!0},moveAllDisabled:function(e){return u.ObjectUtils.isEmpty(this[e])},hasSelectedOption:function(e){return u.ObjectUtils.isNotEmpty("sourceList"===e?this.d_selection[0]:this.d_selection[1])}},computed:{idSource:function(){return"".concat(this.id,"_source")},idTarget:function(){return"".concat(this.id,"_target")},focusedOptionId:function(){return-1!==this.focusedOptionIndex?this.focusedOptionIndex:null},sourceList:function(){return this.modelValue&&this.modelValue[0]?this.modelValue[0]:null},targetList:function(){return this.modelValue&&this.modelValue[1]?this.modelValue[1]:null},attributeSelector:function(){return u.UniqueComponentId()},moveUpAriaLabel:function(){return this.$primevue.config.locale.aria?this.$primevue.config.locale.aria.moveUp:void 0},moveTopAriaLabel:function(){return this.$primevue.config.locale.aria?this.$primevue.config.locale.aria.moveTop:void 0},moveDownAriaLabel:function(){return this.$primevue.config.locale.aria?this.$primevue.config.locale.aria.moveDown:void 0},moveBottomAriaLabel:function(){return this.$primevue.config.locale.aria?this.$primevue.config.locale.aria.moveBottom:void 0},moveToTargetAriaLabel:function(){return this.$primevue.config.locale.aria?this.$primevue.config.locale.aria.moveToTarget:void 0},moveAllToTargetAriaLabel:function(){return this.$primevue.config.locale.aria?this.$primevue.config.locale.aria.moveAllToTarget:void 0},moveToSourceAriaLabel:function(){return this.$primevue.config.locale.aria?this.$primevue.config.locale.aria.moveToSource:void 0},moveAllToSourceAriaLabel:function(){return this.$primevue.config.locale.aria?this.$primevue.config.locale.aria.moveAllToSource:void 0}},components:{PLButton:f.default,AngleRightIcon:x.default,AngleLeftIcon:w.default,AngleDownIcon:I.default,AngleUpIcon:L.default,AngleDoubleRightIcon:b.default,AngleDoubleLeftIcon:g.default,AngleDoubleDownIcon:v.default,AngleDoubleUpIcon:y.default},directives:{ripple:S.default}};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 P(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),o.push.apply(o,n)}return o}function V(e){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?P(Object(o),!0).forEach((function(t){_(e,t,o[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):P(Object(o)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(o,t))}))}return e}function _(e,t,o){var n;return(t="symbol"==A(n=E(t,"string"))?n:String(n))in e?Object.defineProperty(e,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[t]=o,e}function E(e,t){if("object"!=A(e)||!e)return e;var o=e[Symbol.toPrimitive];if(void 0!==o){var n=o.call(e,t||"default");if("object"!=A(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}var M=["id","onClick","onDblclick","onMousedown","onMousemove","aria-selected","data-p-highlight","data-p-focused"],U=["id","onClick","onDblclick","onMousedown","onMousemove","aria-selected","data-p-highlight","data-p-focused"];B.render=function(e,t,o,n,i,r){var s=p.resolveComponent("AngleUpIcon"),l=p.resolveComponent("PLButton"),a=p.resolveComponent("AngleDoubleUpIcon"),c=p.resolveComponent("AngleDownIcon"),u=p.resolveComponent("AngleDoubleDownIcon"),d=p.resolveDirective("ripple");return p.openBlock(),p.createElementBlock("div",p.mergeProps({class:e.cx("root")},e.ptm("root")),[e.showSourceControls?(p.openBlock(),p.createElementBlock("div",p.mergeProps({key:0,class:e.cx("sourceControls")},e.ptm("sourceControls"),{"data-pc-group-section":"controls"}),[p.renderSlot(e.$slots,"sourcecontrolsstart"),p.createVNode(l,p.mergeProps({"aria-label":r.moveUpAriaLabel,disabled:r.moveDisabled(0),type:"button",onClick:t[0]||(t[0]=function(e){return r.moveUp(e,0)})},e.moveUpButtonProps,{pt:e.ptm("sourceMoveUpButton"),unstyled:e.unstyled,"data-pc-section":"sourcemoveupbutton"}),{icon:p.withCtx((function(){return[p.renderSlot(e.$slots,"moveupicon",{},(function(){return[p.createVNode(s,p.mergeProps(e.ptm("sourceMoveUpButton").icon,{"data-pc-section":"moveupicon"}),null,16)]}))]})),_:3},16,["aria-label","disabled","pt","unstyled"]),p.createVNode(l,p.mergeProps({"aria-label":r.moveTopAriaLabel,disabled:r.moveDisabled(0),type:"button",onClick:t[1]||(t[1]=function(e){return r.moveTop(e,0)})},e.moveTopButtonProps,{pt:e.ptm("sourceMoveTopButton"),unstyled:e.unstyled,"data-pc-section":"sourcemovetopbutton"}),{icon:p.withCtx((function(){return[p.renderSlot(e.$slots,"movetopicon",{},(function(){return[p.createVNode(a,p.mergeProps(e.ptm("sourceMoveTopButton").icon,{"data-pc-section":"movetopicon"}),null,16)]}))]})),_:3},16,["aria-label","disabled","pt","unstyled"]),p.createVNode(l,p.mergeProps({"aria-label":r.moveDownAriaLabel,disabled:r.moveDisabled(0),type:"button",onClick:t[2]||(t[2]=function(e){return r.moveDown(e,0)})},e.moveDownButtonProps,{pt:e.ptm("sourceMoveDownButton"),unstyled:e.unstyled,"data-pc-section":"sourcemovedownbutton"}),{icon:p.withCtx((function(){return[p.renderSlot(e.$slots,"movedownicon",{},(function(){return[p.createVNode(c,p.mergeProps(e.ptm("sourceMoveDownButton").icon,{"data-pc-section":"movedownicon"}),null,16)]}))]})),_:3},16,["aria-label","disabled","pt","unstyled"]),p.createVNode(l,p.mergeProps({"aria-label":r.moveBottomAriaLabel,disabled:r.moveDisabled(0),type:"button",onClick:t[3]||(t[3]=function(e){return r.moveBottom(e,0)})},e.moveBottomButtonProps,{pt:e.ptm("sourceMoveBottomButton"),unstyled:e.unstyled,"data-pc-section":"sourcemovebottombutton"}),{icon:p.withCtx((function(){return[p.renderSlot(e.$slots,"movebottomicon",{},(function(){return[p.createVNode(u,p.mergeProps(e.ptm("sourceMoveBottomButton").icon,{"data-pc-section":"movebottomicon"}),null,16)]}))]})),_:3},16,["aria-label","disabled","pt","unstyled"]),p.renderSlot(e.$slots,"sourcecontrolsend")],16)):p.createCommentVNode("",!0),p.createElementVNode("div",p.mergeProps({class:e.cx("sourceWrapper")},e.ptm("sourceWrapper"),{"data-pc-group-section":"listwrapper"}),[e.$slots.sourceheader?(p.openBlock(),p.createElementBlock("div",p.mergeProps({key:0,class:e.cx("sourceHeader")},e.ptm("sourceHeader"),{"data-pc-group-section":"header"}),[p.renderSlot(e.$slots,"sourceheader")],16)):p.createCommentVNode("",!0),p.createVNode(p.TransitionGroup,p.mergeProps({ref:"sourceList",id:r.idSource+"_list",name:"p-picklist-flip",tag:"ul",class:e.cx("sourceList"),style:e.listStyle,role:"listbox","aria-multiselectable":"true","aria-activedescendant":i.focused.sourceList?r.focusedOptionId:void 0,tabindex:r.sourceList&&r.sourceList.length>0?e.tabindex:-1,onFocus:t[5]||(t[5]=function(e){return r.onListFocus(e,"sourceList")}),onBlur:t[6]||(t[6]=function(e){return r.onListBlur(e,"sourceList")}),onKeydown:t[7]||(t[7]=function(e){return r.onItemKeyDown(e,"sourceList")})},V(V(V({},e.sourceListProps),e.ptm("sourceList")),e.ptm("transition")),{"data-pc-group-section":"list"}),{default:p.withCtx((function(){return[(p.openBlock(!0),p.createElementBlock(p.Fragment,null,p.renderList(r.sourceList,(function(o,n){return p.withDirectives((p.openBlock(),p.createElementBlock("li",p.mergeProps({key:r.getItemKey(o,n),id:r.idSource+"_"+n,class:e.cx("item",{item:o,id:"".concat(r.idSource,"_").concat(n),listIndex:0}),onClick:function(e){return r.onItemClick(e,o,n,0)},onDblclick:function(e){return r.onItemDblClick(e,o,0)},onTouchend:t[4]||(t[4]=function(){return r.onItemTouchEnd&&r.onItemTouchEnd.apply(r,arguments)}),onMousedown:function(e){return r.onOptionMouseDown(e,n,"sourceList")},onMousemove:function(e){return r.onOptionMouseMove(n,"sourceList")},role:"option","aria-selected":r.isSelected(o,0)},r.getPTOptions(o,"item","".concat(r.idSource,"_").concat(n),0),{"data-p-highlight":r.isSelected(o,0),"data-p-focused":"".concat(r.idSource,"_").concat(n)===r.focusedOptionId}),[p.renderSlot(e.$slots,"item",{item:o,index:n})],16,M)),[[d]])})),128))]})),_:3},16,["id","class","style","aria-activedescendant","tabindex"])],16),p.createElementVNode("div",p.mergeProps({class:e.cx("buttons")},e.ptm("buttons"),{"data-pc-group-section":"controls"}),[p.renderSlot(e.$slots,"movecontrolsstart"),p.createVNode(l,p.mergeProps({"aria-label":r.moveToTargetAriaLabel,type:"button",onClick:r.moveToTarget,disabled:r.moveDisabled(0)},e.moveToTargetProps,{pt:e.ptm("moveToTargetButton"),unstyled:e.unstyled,"data-pc-section":"movetotargetbuton"}),{icon:p.withCtx((function(){return[p.renderSlot(e.$slots,"movetotargeticon",{viewChanged:i.viewChanged},(function(){return[(p.openBlock(),p.createBlock(p.resolveDynamicComponent(i.viewChanged?"AngleDownIcon":"AngleRightIcon"),p.mergeProps(e.ptm("moveToTargetButton").icon,{"data-pc-section":"movetotargeticon"}),null,16))]}))]})),_:3},16,["aria-label","onClick","disabled","pt","unstyled"]),p.createVNode(l,p.mergeProps({"aria-label":r.moveAllToTargetAriaLabel,type:"button",onClick:r.moveAllToTarget,disabled:r.moveAllDisabled("sourceList")},e.moveAllToTargetProps,{pt:e.ptm("moveAllToTargetButton"),unstyled:e.unstyled,"data-pc-section":"movealltotargetbuton"}),{icon:p.withCtx((function(){return[p.renderSlot(e.$slots,"movealltotargeticon",{viewChanged:i.viewChanged},(function(){return[(p.openBlock(),p.createBlock(p.resolveDynamicComponent(i.viewChanged?"AngleDoubleDownIcon":"AngleDoubleRightIcon"),p.mergeProps(e.ptm("moveAllToTargetButton").icon,{"data-pc-section":"movealltotargeticon"}),null,16))]}))]})),_:3},16,["aria-label","onClick","disabled","pt","unstyled"]),p.createVNode(l,p.mergeProps({"aria-label":r.moveToSourceAriaLabel,type:"button",onClick:r.moveToSource,disabled:r.moveDisabled(1)},e.moveToSourceProps,{pt:e.ptm("moveToSourceButton"),unstyled:e.unstyled,"data-pc-section":"movetosourcebuton"}),{icon:p.withCtx((function(){return[p.renderSlot(e.$slots,"movetosourceicon",{viewChanged:i.viewChanged},(function(){return[(p.openBlock(),p.createBlock(p.resolveDynamicComponent(i.viewChanged?"AngleUpIcon":"AngleLeftIcon"),p.mergeProps(e.ptm("moveToSourceButton").icon,{"data-pc-section":"movetosourceicon"}),null,16))]}))]})),_:3},16,["aria-label","onClick","disabled","pt","unstyled"]),p.createVNode(l,p.mergeProps({"aria-label":r.moveAllToSourceAriaLabel,type:"button",onClick:r.moveAllToSource,disabled:r.moveAllDisabled("targetList")},e.moveAllToSourceProps,{pt:e.ptm("moveAllToSourceButton"),"data-pc-section":"movealltosourcebuton",unstyled:e.unstyled}),{icon:p.withCtx((function(){return[p.renderSlot(e.$slots,"movealltosourceicon",{viewChanged:i.viewChanged},(function(){return[(p.openBlock(),p.createBlock(p.resolveDynamicComponent(i.viewChanged?"AngleDoubleUpIcon":"AngleDoubleLeftIcon"),p.mergeProps(e.ptm("moveAllToSourceButton").icon,{"data-pc-section":"movealltosourceicon"}),null,16))]}))]})),_:3},16,["aria-label","onClick","disabled","pt","unstyled"]),p.renderSlot(e.$slots,"movecontrolsend")],16),p.createElementVNode("div",p.mergeProps({class:e.cx("targetWrapper")},e.ptm("targetWrapper"),{"data-pc-group-section":"listwrapper"}),[e.$slots.targetheader?(p.openBlock(),p.createElementBlock("div",p.mergeProps({key:0,class:e.cx("targetHeader")},e.ptm("targetHeader"),{"data-pc-group-section":"header"}),[p.renderSlot(e.$slots,"targetheader")],16)):p.createCommentVNode("",!0),p.createVNode(p.TransitionGroup,p.mergeProps({ref:"targetList",id:r.idTarget+"_list",name:"p-picklist-flip",tag:"ul",class:e.cx("targetList"),style:e.listStyle,role:"listbox","aria-multiselectable":"true","aria-activedescendant":i.focused.targetList?r.focusedOptionId:void 0,tabindex:r.targetList&&r.targetList.length>0?e.tabindex:-1,onFocus:t[10]||(t[10]=function(e){return r.onListFocus(e,"targetList")}),onBlur:t[11]||(t[11]=function(e){return r.onListBlur(e,"targetList")}),onKeydown:t[12]||(t[12]=function(e){return r.onItemKeyDown(e,"targetList")})},V(V(V({},e.targetListProps),e.ptm("targetList")),e.ptm("transition")),{"data-pc-group-section":"list"}),{default:p.withCtx((function(){return[(p.openBlock(!0),p.createElementBlock(p.Fragment,null,p.renderList(r.targetList,(function(o,n){return p.withDirectives((p.openBlock(),p.createElementBlock("li",p.mergeProps({key:r.getItemKey(o,n),id:r.idTarget+"_"+n,class:e.cx("item",{item:o,id:"".concat(r.idTarget,"_").concat(n),listIndex:1}),onClick:function(e){return r.onItemClick(e,o,n,1)},onDblclick:function(e){return r.onItemDblClick(e,o,1)},onKeydown:t[8]||(t[8]=function(e){return r.onItemKeyDown(e,"targetList")}),onMousedown:function(e){return r.onOptionMouseDown(e,n,"targetList")},onMousemove:function(e){return r.onOptionMouseMove(n,"targetList")},onTouchend:t[9]||(t[9]=function(){return r.onItemTouchEnd&&r.onItemTouchEnd.apply(r,arguments)}),role:"option","aria-selected":r.isSelected(o,1)},r.getPTOptions(o,"item","".concat(r.idTarget,"_").concat(n),1),{"data-p-highlight":r.isSelected(o,1),"data-p-focused":"".concat(r.idTarget,"_").concat(n)===r.focusedOptionId}),[p.renderSlot(e.$slots,"item",{item:o,index:n})],16,U)),[[d]])})),128))]})),_:3},16,["id","class","style","aria-activedescendant","tabindex"])],16),e.showTargetControls?(p.openBlock(),p.createElementBlock("div",p.mergeProps({key:1,class:e.cx("targetControls")},e.ptm("targetControls"),{"data-pc-group-section":"controls"}),[p.renderSlot(e.$slots,"targetcontrolsstart"),p.createVNode(l,p.mergeProps({"aria-label":r.moveUpAriaLabel,disabled:r.moveDisabled(1),type:"button",onClick:t[13]||(t[13]=function(e){return r.moveUp(e,1)})},e.moveUpButtonProps,{pt:e.ptm("targetMoveUpButton"),unstyled:e.unstyled,"data-pc-section":"targetmoveupbutton"}),{icon:p.withCtx((function(){return[p.renderSlot(e.$slots,"moveupicon",{},(function(){return[p.createVNode(s,p.mergeProps(e.ptm("targetMoveUpButton").icon,{"data-pc-section":"moveupicon"}),null,16)]}))]})),_:3},16,["aria-label","disabled","pt","unstyled"]),p.createVNode(l,p.mergeProps({"aria-label":r.moveTopAriaLabel,disabled:r.moveDisabled(1),type:"button",onClick:t[14]||(t[14]=function(e){return r.moveTop(e,1)})},e.moveTopButtonProps,{pt:e.ptm("targetMoveTopButton"),unstyled:e.unstyled,"data-pc-section":"targetmovetopbutton"}),{icon:p.withCtx((function(){return[p.renderSlot(e.$slots,"movetopicon",{},(function(){return[p.createVNode(a,p.mergeProps(e.ptm("targetMoveTopButton").icon,{"data-pc-section":"movetopicon"}),null,16)]}))]})),_:3},16,["aria-label","disabled","pt","unstyled"]),p.createVNode(l,p.mergeProps({"aria-label":r.moveDownAriaLabel,disabled:r.moveDisabled(1),type:"button",onClick:t[15]||(t[15]=function(e){return r.moveDown(e,1)})},e.moveDownButtonProps,{pt:e.ptm("targetMoveDownButton"),unstyled:e.unstyled,"data-pc-section":"targetmovedownbutton"}),{icon:p.withCtx((function(){return[p.renderSlot(e.$slots,"movedownicon",{},(function(){return[p.createVNode(c,p.mergeProps(e.ptm("targetMoveDownButton").icon,{"data-pc-section":"movedownicon"}),null,16)]}))]})),_:3},16,["aria-label","disabled","pt","unstyled"]),p.createVNode(l,p.mergeProps({"aria-label":r.moveBottomAriaLabel,disabled:r.moveDisabled(1),type:"button",onClick:t[16]||(t[16]=function(e){return r.moveBottom(e,1)})},e.moveBottomButtonProps,{pt:e.ptm("targetMoveBottomButton"),unstyled:e.unstyled,"data-pc-section":"targetmovebottombutton"}),{icon:p.withCtx((function(){return[p.renderSlot(e.$slots,"movebottomicon",{},(function(){return[p.createVNode(u,p.mergeProps(e.ptm("targetMoveBottomButton").icon,{"data-pc-section":"movebottomicon"}),null,16)]}))]})),_:3},16,["aria-label","disabled","pt","unstyled"]),p.renderSlot(e.$slots,"targetcontrolsend")],16)):p.createCommentVNode("",!0)],16)},module.exports=B;
@@ -197,6 +197,7 @@ var script = {
197
197
  onListFocus: function onListFocus(event, listType) {
198
198
  this.focused[listType] = true;
199
199
  this.findCurrentFocusedIndex(listType);
200
+ this.scrollInView(this.focusedOptionIndex, listType);
200
201
  this.$emit('focus', event);
201
202
  },
202
203
  onListBlur: function onListBlur(event, listType) {
@@ -207,7 +208,6 @@ var script = {
207
208
  onOptionMouseDown: function onOptionMouseDown(event, index, listType) {
208
209
  this.focused[listType] = true;
209
210
  this.focusedOptionIndex = index;
210
- event.preventDefault();
211
211
  },
212
212
  onOptionMouseMove: function onOptionMouseMove(index, listType) {
213
213
  if (this.focusOnHover && this.focused[listType]) {
@@ -570,11 +570,12 @@ var script = {
570
570
  return DomHandler.findSingle(this.$refs[listType].$el, "[data-pc-section=\"item\"][id=".concat(this.focusedOptionIndex, "]"));
571
571
  },
572
572
  findCurrentFocusedIndex: function findCurrentFocusedIndex(listType) {
573
- this.focusedOptionIndex = this.findFirstSelectedOptionIndex(listType);
574
- if (this.autoOptionFocus && this.focusedOptionIndex === -1) {
575
- this.focusedOptionIndex = this.findFirstFocusedOptionIndex(listType);
573
+ if (this.focusedOptionIndex === -1) {
574
+ this.focusedOptionIndex = this.findFirstSelectedOptionIndex(listType);
575
+ if (this.autoOptionFocus && this.focusedOptionIndex === -1) {
576
+ this.focusedOptionIndex = this.findFirstFocusedOptionIndex(listType);
577
+ }
576
578
  }
577
- this.scrollInView(this.focusedOptionIndex, listType);
578
579
  },
579
580
  findFirstFocusedOptionIndex: function findFirstFocusedOptionIndex(listType) {
580
581
  var firstFocusableItem = DomHandler.findSingle(this.$refs[listType].$el, '[data-pc-section="item"]');
@@ -620,7 +621,8 @@ var script = {
620
621
  if (element) {
621
622
  element.scrollIntoView && element.scrollIntoView({
622
623
  block: 'nearest',
623
- inline: 'start'
624
+ inline: 'start',
625
+ behavior: 'smooth'
624
626
  });
625
627
  }
626
628
  },
@@ -1 +1 @@
1
- import e from"primevue/button";import t from"primevue/icons/angledoubledown";import o from"primevue/icons/angledoubleleft";import n from"primevue/icons/angledoubleright";import i from"primevue/icons/angledoubleup";import s from"primevue/icons/angledown";import r from"primevue/icons/angleleft";import l from"primevue/icons/angleright";import a from"primevue/icons/angleup";import c from"primevue/ripple";import{UniqueComponentId as u,ObjectUtils as d,DomHandler as p}from"primevue/utils";import m from"primevue/basecomponent";import h from"primevue/picklist/style";import{resolveComponent as f,resolveDirective as v,openBlock as g,createElementBlock as b,mergeProps as y,renderSlot as I,createVNode as L,withCtx as w,createCommentVNode as $,createElementVNode as T,TransitionGroup as x,Fragment as A,renderList as D,withDirectives as S,createBlock as O,resolveDynamicComponent as _}from"vue";function k(e){return V(e)||M(e)||B(e)||C()}function C(){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 E(e,t);var o=Object.prototype.toString.call(e).slice(8,-1);return"Object"===o&&e.constructor&&(o=e.constructor.name),"Map"===o||"Set"===o?Array.from(e):"Arguments"===o||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(o)?E(e,t):void 0}}function M(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function V(e){if(Array.isArray(e))return E(e)}function E(e,t){(null==t||t>e.length)&&(t=e.length);for(var o=0,n=new Array(t);o<t;o++)n[o]=e[o];return n}var P={name:"PickList",extends:{name:"BasePickList",extends:m,props:{modelValue:{type:Array,default:function(){return[[],[]]}},selection:{type:Array,default:function(){return[[],[]]}},dataKey:{type:String,default:null},listStyle:{type:null,default:null},metaKeySelection:{type:Boolean,default:!1},autoOptionFocus:{type:Boolean,default:!0},focusOnHover:{type:Boolean,default:!0},responsive:{type:Boolean,default:!0},breakpoint:{type:String,default:"960px"},stripedRows:{type:Boolean,default:!1},showSourceControls:{type:Boolean,default:!0},showTargetControls:{type:Boolean,default:!0},targetListProps:{type:null,default:null},sourceListProps:{type:null,default:null},moveUpButtonProps:{type:null,default:null},moveTopButtonProps:{type:null,default:null},moveDownButtonProps:{type:null,default:null},moveBottomButtonProps:{type:null,default:null},moveToTargetProps:{type:null,default:null},moveAllToTargetProps:{type:null,default:null},moveToSourceProps:{type:null,default:null},moveAllToSourceProps:{type:null,default:null},tabindex:{type:Number,default:0}},style:h,provide:function(){return{$parentInstance:this}}},emits:["update:modelValue","reorder","update:selection","selection-change","move-to-target","move-to-source","move-all-to-target","move-all-to-source","focus","blur"],itemTouched:!1,reorderDirection:null,styleElement:null,media:null,mediaChangeListener:null,data:function(){return{id:this.$attrs.id,d_selection:this.selection,focused:{sourceList:!1,targetList:!1},focusedOptionIndex:-1,viewChanged:!1}},watch:{"$attrs.id":function(e){this.id=e||u()},selection:function(e){this.d_selection=e},breakpoint:function(){this.destroyMedia(),this.initMedia()}},updated:function(){this.reorderDirection&&(this.updateListScroll(this.$refs.sourceList.$el),this.updateListScroll(this.$refs.targetList.$el),this.reorderDirection=null)},beforeUnmount:function(){this.destroyStyle(),this.destroyMedia()},mounted:function(){this.id=this.id||u(),this.responsive&&(this.createStyle(),this.initMedia())},methods:{getItemKey:function(e,t){return this.dataKey?d.resolveFieldData(e,this.dataKey):t},getPTOptions:function(e,t,o,n){return this.ptm(t,{context:{active:this.isSelected(e,n),focused:o===this.focusedOptionId}})},isSelected:function(e,t){return-1!=d.findIndexInList(e,this.d_selection[t])},onListFocus:function(e,t){this.focused[t]=!0,this.findCurrentFocusedIndex(t),this.$emit("focus",e)},onListBlur:function(e,t){this.focused[t]=!1,this.focusedOptionIndex=-1,this.$emit("blur",e)},onOptionMouseDown:function(e,t,o){this.focused[o]=!0,this.focusedOptionIndex=t,e.preventDefault()},onOptionMouseMove:function(e,t){this.focusOnHover&&this.focused[t]&&this.changeFocusedOptionIndex(e,t)},moveUp:function(e,t){if(this.d_selection&&this.d_selection[t]){for(var o=k(this.modelValue[t]),n=this.d_selection[t],i=0;i<n.length;i++){var s=d.findIndexInList(n[i],o);if(0===s)break;var r=o[s-1];o[s-1]=o[s],o[s]=r}var l=k(this.modelValue);l[t]=o,this.reorderDirection="up",this.$emit("update:modelValue",l),this.$emit("reorder",{originalEvent:e,value:l,direction:this.reorderDirection,listIndex:t})}},moveTop:function(e,t){if(this.d_selection){for(var o=k(this.modelValue[t]),n=this.d_selection[t],i=0;i<n.length;i++){var s=d.findIndexInList(n[i],o);if(0===s)break;var r=o.splice(s,1)[0];o.unshift(r)}var l=k(this.modelValue);l[t]=o,this.reorderDirection="top",this.$emit("update:modelValue",l),this.$emit("reorder",{originalEvent:e,value:l,direction:this.reorderDirection,listIndex:t})}},moveDown:function(e,t){if(this.d_selection){for(var o=k(this.modelValue[t]),n=this.d_selection[t],i=n.length-1;i>=0;i--){var s=d.findIndexInList(n[i],o);if(s===o.length-1)break;var r=o[s+1];o[s+1]=o[s],o[s]=r}var l=k(this.modelValue);l[t]=o,this.reorderDirection="down",this.$emit("update:modelValue",l),this.$emit("reorder",{originalEvent:e,value:l,direction:this.reorderDirection,listIndex:t})}},moveBottom:function(e,t){if(this.d_selection){for(var o=k(this.modelValue[t]),n=this.d_selection[t],i=n.length-1;i>=0;i--){var s=d.findIndexInList(n[i],o);if(s===o.length-1)break;var r=o.splice(s,1)[0];o.push(r)}var l=k(this.modelValue);l[t]=o,this.reorderDirection="bottom",this.$emit("update:modelValue",l),this.$emit("reorder",{originalEvent:e,value:l,direction:this.reorderDirection,listIndex:t})}},moveToTarget:function(e){var t=this.d_selection&&this.d_selection[0]?this.d_selection[0]:null,o=k(this.modelValue[0]),n=k(this.modelValue[1]);if(t){for(var i=0;i<t.length;i++){var s=t[i];-1==d.findIndexInList(s,n)&&n.push(o.splice(d.findIndexInList(s,o),1)[0])}var r=k(this.modelValue);r[0]=o,r[1]=n,this.$emit("update:modelValue",r),this.$emit("move-to-target",{originalEvent:e,items:k(new Set(t))}),this.d_selection[0]=[],this.$emit("update:selection",this.d_selection),this.$emit("selection-change",{originalEvent:e,value:this.d_selection})}},moveAllToTarget:function(e){if(this.modelValue[0]){var t=k(this.modelValue[0]),o=k(this.modelValue[1]);this.$emit("move-all-to-target",{originalEvent:e,items:t}),o=[].concat(k(o),k(t)),t=[];var n=k(this.modelValue);n[0]=t,n[1]=o,this.$emit("update:modelValue",n),this.d_selection[0]=[],this.$emit("update:selection",this.d_selection),this.$emit("selection-change",{originalEvent:e,value:this.d_selection})}},moveToSource:function(e){var t=this.d_selection&&this.d_selection[1]?this.d_selection[1]:null,o=k(this.modelValue[0]),n=k(this.modelValue[1]);if(t){for(var i=0;i<t.length;i++){var s=t[i];-1==d.findIndexInList(s,o)&&o.push(n.splice(d.findIndexInList(s,n),1)[0])}var r=k(this.modelValue);r[0]=o,r[1]=n,this.$emit("update:modelValue",r),this.$emit("move-to-source",{originalEvent:e,items:k(new Set(t))}),this.d_selection[1]=[],this.$emit("update:selection",this.d_selection),this.$emit("selection-change",{originalEvent:e,value:this.d_selection})}},moveAllToSource:function(e){if(this.modelValue[1]){var t=k(this.modelValue[0]),o=k(this.modelValue[1]);this.$emit("move-all-to-source",{originalEvent:e,items:o}),t=[].concat(k(t),k(o)),o=[];var n=k(this.modelValue);n[0]=t,n[1]=o,this.$emit("update:modelValue",n),this.d_selection[1]=[],this.$emit("update:selection",this.d_selection),this.$emit("selection-change",{originalEvent:e,value:this.d_selection})}},onItemClick:function(e,t,o,n){var i=0===n?"sourceList":"targetList";this.itemTouched=!1;var s,r=this.d_selection[n],l=d.findIndexInList(t,r),a=-1!=l,c=!this.itemTouched&&this.metaKeySelection,u=p.find(this.$refs[i].$el,'[data-pc-section="item"]')[o].getAttribute("id");if(this.focusedOptionIndex=u,c){var m=e.metaKey||e.ctrlKey;a&&m?s=r.filter((function(e,t){return t!==l})):(s=m&&r?k(r):[]).push(t)}else a?s=r.filter((function(e,t){return t!==l})):(s=r?k(r):[]).push(t);var h=k(this.d_selection);h[n]=s,this.d_selection=h,this.$emit("update:selection",this.d_selection),this.$emit("selection-change",{originalEvent:e,value:this.d_selection})},onItemDblClick:function(e,t,o){0===o?this.moveToTarget(e):1===o&&this.moveToSource(e)},onItemTouchEnd:function(){this.itemTouched=!0},onItemKeyDown:function(e,t){switch(e.code){case"ArrowDown":this.onArrowDownKey(e,t);break;case"ArrowUp":this.onArrowUpKey(e,t);break;case"Home":this.onHomeKey(e,t);break;case"End":this.onEndKey(e,t);break;case"Enter":case"NumpadEnter":this.onEnterKey(e,t);break;case"Space":this.onSpaceKey(e,t);break;case"KeyA":e.ctrlKey&&(this.d_selection=k(this.modelValue),this.$emit("update:selection",this.d_selection),e.preventDefault())}},onArrowDownKey:function(e,t){var o=-1!==this.focusedOptionIndex?this.findNextOptionIndex(t):this.findFirstSelectedOptionIndex(t);this.changeFocusedOptionIndex(o,t),e.shiftKey&&this.onEnterKey(e,t),e.preventDefault()},onArrowUpKey:function(e,t){var o=-1!==this.focusedOptionIndex?this.findPrevOptionIndex(t):this.findLastSelectedOptionIndex(t);this.changeFocusedOptionIndex(o,t),e.shiftKey&&this.onEnterKey(e,t),e.preventDefault()},onEnterKey:function(e,t){var o="sourceList"===t?0:1,n=this.findMatchedOptionIndex(t);this.onItemClick(e,this.modelValue[o][n],n,o),e.preventDefault()},onSpaceKey:function(e,t){if(e.preventDefault(),e.shiftKey&&this.d_selection&&this.d_selection.length>0){var o="sourceList"===t?0:1,n=d.findIndexInList(this.d_selection[o][0],k(this.modelValue[o])),i=this.findMatchedOptionIndex(t);this.d_selection[o]=k(this.modelValue[o]).slice(Math.min(n,i),Math.max(n,i)+1),this.$emit("update:selection",this.d_selection),this.$emit("selection-change",{originalEvent:e,value:this.d_selection})}else this.onEnterKey(e,t)},onHomeKey:function(e,t){if(e.ctrlKey&&e.shiftKey){var o="sourceList"===t?0:1,n=this.findMatchedOptionIndex(t);this.d_selection[o]=k(this.modelValue[o]).slice(0,n+1),this.$emit("update:selection",this.d_selection),this.$emit("selection-change",{originalEvent:e,value:this.d_selection})}else this.changeFocusedOptionIndex(0,t);e.preventDefault()},onEndKey:function(e,t){var o=this.findAllItems(t);if(e.ctrlKey&&e.shiftKey){var n="sourceList"===t?0:1,i=this.findMatchedOptionIndex(t);this.d_selection[n]=k(this.modelValue[n]).slice(i,o.length),this.$emit("update:selection",this.d_selection),this.$emit("selection-change",{originalEvent:e,value:this.d_selection})}else this.changeFocusedOptionIndex(o.length-1,t);e.preventDefault()},findAllItems:function(e){return p.find(this.$refs[e].$el,'[data-pc-section="item"]')},findFocusedItem:function(e){return p.findSingle(this.$refs[e].$el,'[data-pc-section="item"][id='.concat(this.focusedOptionIndex,"]"))},findCurrentFocusedIndex:function(e){this.focusedOptionIndex=this.findFirstSelectedOptionIndex(e),this.autoOptionFocus&&-1===this.focusedOptionIndex&&(this.focusedOptionIndex=this.findFirstFocusedOptionIndex(e)),this.scrollInView(this.focusedOptionIndex,e)},findFirstFocusedOptionIndex:function(e){var t=p.findSingle(this.$refs[e].$el,'[data-pc-section="item"]');return p.getAttribute(t,"id")},findFirstSelectedOptionIndex:function(e){if(this.hasSelectedOption(e)){var t=p.findSingle(this.$refs[e].$el,'[data-p-highlight="true"]');return p.getAttribute(t,"id")}return-1},findLastSelectedOptionIndex:function(e){if(this.hasSelectedOption(e)){var t=p.find(this.$refs[e].$el,'[data-p-highlight="true"]');return d.findIndexInList(t[t.length-1],this.list.children)}return-1},findMatchedOptionIndex:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.focusedOptionIndex;return k(this.findAllItems(e)).findIndex((function(e){return e.id===t}))},findNextOptionIndex:function(e){var t=this.findMatchedOptionIndex(e);return t>-1?t+1:0},findPrevOptionIndex:function(e){var t=this.findMatchedOptionIndex(e);return t>-1?t-1:0},changeFocusedOptionIndex:function(e,t){var o=this.findAllItems(t),n=e>=o.length?o.length-1:e<0?0:e;this.focusedOptionIndex=o[n].getAttribute("id"),this.scrollInView(o[n].getAttribute("id"),t)},scrollInView:function(e,t){var o=p.findSingle(this.$refs[t].$el,'[data-pc-section="item"][id="'.concat(e,'"]'));o&&o.scrollIntoView&&o.scrollIntoView({block:"nearest",inline:"start"})},updateListScroll:function(e){var t=p.find(e,'[data-pc-section="item"][data-p-highlight="true"]');if(t&&t.length)switch(this.reorderDirection){case"up":p.scrollInView(e,t[0]);break;case"top":e.scrollTop=0;break;case"down":p.scrollInView(e,t[t.length-1]);break;case"bottom":e.scrollTop=e.scrollHeight}},initMedia:function(){this.media=window.matchMedia("(max-width: ".concat(this.breakpoint,")")),this.viewChanged=this.media.matches,this.bindMediaChangeListener()},destroyMedia:function(){this.unbindMediaChangeListener()},bindMediaChangeListener:function(){var e=this;this.media&&!this.mediaChangeListener&&(this.mediaChangeListener=function(t){e.viewChanged=t.matches},this.media.addEventListener("change",this.mediaChangeListener))},unbindMediaChangeListener:function(){this.media&&this.mediaChangeListener&&(this.media.removeEventListener("change",this.mediaChangeListener),this.mediaChangeListener=null)},createStyle:function(){if(!this.styleElement&&!this.isUnstyled){var e;this.$el.setAttribute(this.attributeSelector,""),this.styleElement=document.createElement("style"),this.styleElement.type="text/css",p.setAttribute(this.styleElement,"nonce",null===(e=this.$primevue)||void 0===e||null===(e=e.config)||void 0===e||null===(e=e.csp)||void 0===e?void 0:e.nonce),document.head.appendChild(this.styleElement);var t="\n@media screen and (max-width: ".concat(this.breakpoint,") {\n .p-picklist[").concat(this.attributeSelector,"] {\n flex-direction: column;\n }\n\n .p-picklist[").concat(this.attributeSelector,"] .p-picklist-buttons {\n padding: var(--content-padding);\n flex-direction: row;\n }\n\n .p-picklist[").concat(this.attributeSelector,"] .p-picklist-buttons .p-button {\n margin-right: var(--inline-spacing);\n margin-bottom: 0;\n }\n\n .p-picklist[").concat(this.attributeSelector,"] .p-picklist-buttons .p-button:last-child {\n margin-right: 0;\n }\n}\n");this.styleElement.innerHTML=t}},destroyStyle:function(){this.styleElement&&(document.head.removeChild(this.styleElement),this.styleElement=null)},moveDisabled:function(e){if(!this.d_selection[e]||!this.d_selection[e].length)return!0},moveAllDisabled:function(e){return d.isEmpty(this[e])},hasSelectedOption:function(e){return d.isNotEmpty("sourceList"===e?this.d_selection[0]:this.d_selection[1])}},computed:{idSource:function(){return"".concat(this.id,"_source")},idTarget:function(){return"".concat(this.id,"_target")},focusedOptionId:function(){return-1!==this.focusedOptionIndex?this.focusedOptionIndex:null},sourceList:function(){return this.modelValue&&this.modelValue[0]?this.modelValue[0]:null},targetList:function(){return this.modelValue&&this.modelValue[1]?this.modelValue[1]:null},attributeSelector:function(){return u()},moveUpAriaLabel:function(){return this.$primevue.config.locale.aria?this.$primevue.config.locale.aria.moveUp:void 0},moveTopAriaLabel:function(){return this.$primevue.config.locale.aria?this.$primevue.config.locale.aria.moveTop:void 0},moveDownAriaLabel:function(){return this.$primevue.config.locale.aria?this.$primevue.config.locale.aria.moveDown:void 0},moveBottomAriaLabel:function(){return this.$primevue.config.locale.aria?this.$primevue.config.locale.aria.moveBottom:void 0},moveToTargetAriaLabel:function(){return this.$primevue.config.locale.aria?this.$primevue.config.locale.aria.moveToTarget:void 0},moveAllToTargetAriaLabel:function(){return this.$primevue.config.locale.aria?this.$primevue.config.locale.aria.moveAllToTarget:void 0},moveToSourceAriaLabel:function(){return this.$primevue.config.locale.aria?this.$primevue.config.locale.aria.moveToSource:void 0},moveAllToSourceAriaLabel:function(){return this.$primevue.config.locale.aria?this.$primevue.config.locale.aria.moveAllToSource:void 0}},components:{PLButton:e,AngleRightIcon:l,AngleLeftIcon:r,AngleDownIcon:s,AngleUpIcon:a,AngleDoubleRightIcon:n,AngleDoubleLeftIcon:o,AngleDoubleDownIcon:t,AngleDoubleUpIcon:i},directives:{ripple:c}};function K(e){return K="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},K(e)}function U(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),o.push.apply(o,n)}return o}function F(e){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?U(Object(o),!0).forEach((function(t){j(e,t,o[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):U(Object(o)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(o,t))}))}return e}function j(e,t,o){var n;return(t="symbol"==K(n=H(t,"string"))?n:String(n))in e?Object.defineProperty(e,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[t]=o,e}function H(e,t){if("object"!=K(e)||!e)return e;var o=e[Symbol.toPrimitive];if(void 0!==o){var n=o.call(e,t||"default");if("object"!=K(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}var N=["id","onClick","onDblclick","onMousedown","onMousemove","aria-selected","data-p-highlight","data-p-focused"],R=["id","onClick","onDblclick","onMousedown","onMousemove","aria-selected","data-p-highlight","data-p-focused"];P.render=function(e,t,o,n,i,s){var r=f("AngleUpIcon"),l=f("PLButton"),a=f("AngleDoubleUpIcon"),c=f("AngleDownIcon"),u=f("AngleDoubleDownIcon"),d=v("ripple");return g(),b("div",y({class:e.cx("root")},e.ptm("root")),[e.showSourceControls?(g(),b("div",y({key:0,class:e.cx("sourceControls")},e.ptm("sourceControls"),{"data-pc-group-section":"controls"}),[I(e.$slots,"sourcecontrolsstart"),L(l,y({"aria-label":s.moveUpAriaLabel,disabled:s.moveDisabled(0),type:"button",onClick:t[0]||(t[0]=function(e){return s.moveUp(e,0)})},e.moveUpButtonProps,{pt:e.ptm("sourceMoveUpButton"),unstyled:e.unstyled,"data-pc-section":"sourcemoveupbutton"}),{icon:w((function(){return[I(e.$slots,"moveupicon",{},(function(){return[L(r,y(e.ptm("sourceMoveUpButton").icon,{"data-pc-section":"moveupicon"}),null,16)]}))]})),_:3},16,["aria-label","disabled","pt","unstyled"]),L(l,y({"aria-label":s.moveTopAriaLabel,disabled:s.moveDisabled(0),type:"button",onClick:t[1]||(t[1]=function(e){return s.moveTop(e,0)})},e.moveTopButtonProps,{pt:e.ptm("sourceMoveTopButton"),unstyled:e.unstyled,"data-pc-section":"sourcemovetopbutton"}),{icon:w((function(){return[I(e.$slots,"movetopicon",{},(function(){return[L(a,y(e.ptm("sourceMoveTopButton").icon,{"data-pc-section":"movetopicon"}),null,16)]}))]})),_:3},16,["aria-label","disabled","pt","unstyled"]),L(l,y({"aria-label":s.moveDownAriaLabel,disabled:s.moveDisabled(0),type:"button",onClick:t[2]||(t[2]=function(e){return s.moveDown(e,0)})},e.moveDownButtonProps,{pt:e.ptm("sourceMoveDownButton"),unstyled:e.unstyled,"data-pc-section":"sourcemovedownbutton"}),{icon:w((function(){return[I(e.$slots,"movedownicon",{},(function(){return[L(c,y(e.ptm("sourceMoveDownButton").icon,{"data-pc-section":"movedownicon"}),null,16)]}))]})),_:3},16,["aria-label","disabled","pt","unstyled"]),L(l,y({"aria-label":s.moveBottomAriaLabel,disabled:s.moveDisabled(0),type:"button",onClick:t[3]||(t[3]=function(e){return s.moveBottom(e,0)})},e.moveBottomButtonProps,{pt:e.ptm("sourceMoveBottomButton"),unstyled:e.unstyled,"data-pc-section":"sourcemovebottombutton"}),{icon:w((function(){return[I(e.$slots,"movebottomicon",{},(function(){return[L(u,y(e.ptm("sourceMoveBottomButton").icon,{"data-pc-section":"movebottomicon"}),null,16)]}))]})),_:3},16,["aria-label","disabled","pt","unstyled"]),I(e.$slots,"sourcecontrolsend")],16)):$("",!0),T("div",y({class:e.cx("sourceWrapper")},e.ptm("sourceWrapper"),{"data-pc-group-section":"listwrapper"}),[e.$slots.sourceheader?(g(),b("div",y({key:0,class:e.cx("sourceHeader")},e.ptm("sourceHeader"),{"data-pc-group-section":"header"}),[I(e.$slots,"sourceheader")],16)):$("",!0),L(x,y({ref:"sourceList",id:s.idSource+"_list",name:"p-picklist-flip",tag:"ul",class:e.cx("sourceList"),style:e.listStyle,role:"listbox","aria-multiselectable":"true","aria-activedescendant":i.focused.sourceList?s.focusedOptionId:void 0,tabindex:s.sourceList&&s.sourceList.length>0?e.tabindex:-1,onFocus:t[5]||(t[5]=function(e){return s.onListFocus(e,"sourceList")}),onBlur:t[6]||(t[6]=function(e){return s.onListBlur(e,"sourceList")}),onKeydown:t[7]||(t[7]=function(e){return s.onItemKeyDown(e,"sourceList")})},F(F(F({},e.sourceListProps),e.ptm("sourceList")),e.ptm("transition")),{"data-pc-group-section":"list"}),{default:w((function(){return[(g(!0),b(A,null,D(s.sourceList,(function(o,n){return S((g(),b("li",y({key:s.getItemKey(o,n),id:s.idSource+"_"+n,class:e.cx("item",{item:o,id:"".concat(s.idSource,"_").concat(n),listIndex:0}),onClick:function(e){return s.onItemClick(e,o,n,0)},onDblclick:function(e){return s.onItemDblClick(e,o,0)},onTouchend:t[4]||(t[4]=function(){return s.onItemTouchEnd&&s.onItemTouchEnd.apply(s,arguments)}),onMousedown:function(e){return s.onOptionMouseDown(e,n,"sourceList")},onMousemove:function(e){return s.onOptionMouseMove(n,"sourceList")},role:"option","aria-selected":s.isSelected(o,0)},s.getPTOptions(o,"item","".concat(s.idSource,"_").concat(n),0),{"data-p-highlight":s.isSelected(o,0),"data-p-focused":"".concat(s.idSource,"_").concat(n)===s.focusedOptionId}),[I(e.$slots,"item",{item:o,index:n})],16,N)),[[d]])})),128))]})),_:3},16,["id","class","style","aria-activedescendant","tabindex"])],16),T("div",y({class:e.cx("buttons")},e.ptm("buttons"),{"data-pc-group-section":"controls"}),[I(e.$slots,"movecontrolsstart"),L(l,y({"aria-label":s.moveToTargetAriaLabel,type:"button",onClick:s.moveToTarget,disabled:s.moveDisabled(0)},e.moveToTargetProps,{pt:e.ptm("moveToTargetButton"),unstyled:e.unstyled,"data-pc-section":"movetotargetbuton"}),{icon:w((function(){return[I(e.$slots,"movetotargeticon",{viewChanged:i.viewChanged},(function(){return[(g(),O(_(i.viewChanged?"AngleDownIcon":"AngleRightIcon"),y(e.ptm("moveToTargetButton").icon,{"data-pc-section":"movetotargeticon"}),null,16))]}))]})),_:3},16,["aria-label","onClick","disabled","pt","unstyled"]),L(l,y({"aria-label":s.moveAllToTargetAriaLabel,type:"button",onClick:s.moveAllToTarget,disabled:s.moveAllDisabled("sourceList")},e.moveAllToTargetProps,{pt:e.ptm("moveAllToTargetButton"),unstyled:e.unstyled,"data-pc-section":"movealltotargetbuton"}),{icon:w((function(){return[I(e.$slots,"movealltotargeticon",{viewChanged:i.viewChanged},(function(){return[(g(),O(_(i.viewChanged?"AngleDoubleDownIcon":"AngleDoubleRightIcon"),y(e.ptm("moveAllToTargetButton").icon,{"data-pc-section":"movealltotargeticon"}),null,16))]}))]})),_:3},16,["aria-label","onClick","disabled","pt","unstyled"]),L(l,y({"aria-label":s.moveToSourceAriaLabel,type:"button",onClick:s.moveToSource,disabled:s.moveDisabled(1)},e.moveToSourceProps,{pt:e.ptm("moveToSourceButton"),unstyled:e.unstyled,"data-pc-section":"movetosourcebuton"}),{icon:w((function(){return[I(e.$slots,"movetosourceicon",{viewChanged:i.viewChanged},(function(){return[(g(),O(_(i.viewChanged?"AngleUpIcon":"AngleLeftIcon"),y(e.ptm("moveToSourceButton").icon,{"data-pc-section":"movetosourceicon"}),null,16))]}))]})),_:3},16,["aria-label","onClick","disabled","pt","unstyled"]),L(l,y({"aria-label":s.moveAllToSourceAriaLabel,type:"button",onClick:s.moveAllToSource,disabled:s.moveAllDisabled("targetList")},e.moveAllToSourceProps,{pt:e.ptm("moveAllToSourceButton"),"data-pc-section":"movealltosourcebuton",unstyled:e.unstyled}),{icon:w((function(){return[I(e.$slots,"movealltosourceicon",{viewChanged:i.viewChanged},(function(){return[(g(),O(_(i.viewChanged?"AngleDoubleUpIcon":"AngleDoubleLeftIcon"),y(e.ptm("moveAllToSourceButton").icon,{"data-pc-section":"movealltosourceicon"}),null,16))]}))]})),_:3},16,["aria-label","onClick","disabled","pt","unstyled"]),I(e.$slots,"movecontrolsend")],16),T("div",y({class:e.cx("targetWrapper")},e.ptm("targetWrapper"),{"data-pc-group-section":"listwrapper"}),[e.$slots.targetheader?(g(),b("div",y({key:0,class:e.cx("targetHeader")},e.ptm("targetHeader"),{"data-pc-group-section":"header"}),[I(e.$slots,"targetheader")],16)):$("",!0),L(x,y({ref:"targetList",id:s.idTarget+"_list",name:"p-picklist-flip",tag:"ul",class:e.cx("targetList"),style:e.listStyle,role:"listbox","aria-multiselectable":"true","aria-activedescendant":i.focused.targetList?s.focusedOptionId:void 0,tabindex:s.targetList&&s.targetList.length>0?e.tabindex:-1,onFocus:t[10]||(t[10]=function(e){return s.onListFocus(e,"targetList")}),onBlur:t[11]||(t[11]=function(e){return s.onListBlur(e,"targetList")}),onKeydown:t[12]||(t[12]=function(e){return s.onItemKeyDown(e,"targetList")})},F(F(F({},e.targetListProps),e.ptm("targetList")),e.ptm("transition")),{"data-pc-group-section":"list"}),{default:w((function(){return[(g(!0),b(A,null,D(s.targetList,(function(o,n){return S((g(),b("li",y({key:s.getItemKey(o,n),id:s.idTarget+"_"+n,class:e.cx("item",{item:o,id:"".concat(s.idTarget,"_").concat(n),listIndex:1}),onClick:function(e){return s.onItemClick(e,o,n,1)},onDblclick:function(e){return s.onItemDblClick(e,o,1)},onKeydown:t[8]||(t[8]=function(e){return s.onItemKeyDown(e,"targetList")}),onMousedown:function(e){return s.onOptionMouseDown(e,n,"targetList")},onMousemove:function(e){return s.onOptionMouseMove(n,"targetList")},onTouchend:t[9]||(t[9]=function(){return s.onItemTouchEnd&&s.onItemTouchEnd.apply(s,arguments)}),role:"option","aria-selected":s.isSelected(o,1)},s.getPTOptions(o,"item","".concat(s.idTarget,"_").concat(n),1),{"data-p-highlight":s.isSelected(o,1),"data-p-focused":"".concat(s.idTarget,"_").concat(n)===s.focusedOptionId}),[I(e.$slots,"item",{item:o,index:n})],16,R)),[[d]])})),128))]})),_:3},16,["id","class","style","aria-activedescendant","tabindex"])],16),e.showTargetControls?(g(),b("div",y({key:1,class:e.cx("targetControls")},e.ptm("targetControls"),{"data-pc-group-section":"controls"}),[I(e.$slots,"targetcontrolsstart"),L(l,y({"aria-label":s.moveUpAriaLabel,disabled:s.moveDisabled(1),type:"button",onClick:t[13]||(t[13]=function(e){return s.moveUp(e,1)})},e.moveUpButtonProps,{pt:e.ptm("targetMoveUpButton"),unstyled:e.unstyled,"data-pc-section":"targetmoveupbutton"}),{icon:w((function(){return[I(e.$slots,"moveupicon",{},(function(){return[L(r,y(e.ptm("targetMoveUpButton").icon,{"data-pc-section":"moveupicon"}),null,16)]}))]})),_:3},16,["aria-label","disabled","pt","unstyled"]),L(l,y({"aria-label":s.moveTopAriaLabel,disabled:s.moveDisabled(1),type:"button",onClick:t[14]||(t[14]=function(e){return s.moveTop(e,1)})},e.moveTopButtonProps,{pt:e.ptm("targetMoveTopButton"),unstyled:e.unstyled,"data-pc-section":"targetmovetopbutton"}),{icon:w((function(){return[I(e.$slots,"movetopicon",{},(function(){return[L(a,y(e.ptm("targetMoveTopButton").icon,{"data-pc-section":"movetopicon"}),null,16)]}))]})),_:3},16,["aria-label","disabled","pt","unstyled"]),L(l,y({"aria-label":s.moveDownAriaLabel,disabled:s.moveDisabled(1),type:"button",onClick:t[15]||(t[15]=function(e){return s.moveDown(e,1)})},e.moveDownButtonProps,{pt:e.ptm("targetMoveDownButton"),unstyled:e.unstyled,"data-pc-section":"targetmovedownbutton"}),{icon:w((function(){return[I(e.$slots,"movedownicon",{},(function(){return[L(c,y(e.ptm("targetMoveDownButton").icon,{"data-pc-section":"movedownicon"}),null,16)]}))]})),_:3},16,["aria-label","disabled","pt","unstyled"]),L(l,y({"aria-label":s.moveBottomAriaLabel,disabled:s.moveDisabled(1),type:"button",onClick:t[16]||(t[16]=function(e){return s.moveBottom(e,1)})},e.moveBottomButtonProps,{pt:e.ptm("targetMoveBottomButton"),unstyled:e.unstyled,"data-pc-section":"targetmovebottombutton"}),{icon:w((function(){return[I(e.$slots,"movebottomicon",{},(function(){return[L(u,y(e.ptm("targetMoveBottomButton").icon,{"data-pc-section":"movebottomicon"}),null,16)]}))]})),_:3},16,["aria-label","disabled","pt","unstyled"]),I(e.$slots,"targetcontrolsend")],16)):$("",!0)],16)};export{P as default};
1
+ import e from"primevue/button";import t from"primevue/icons/angledoubledown";import o from"primevue/icons/angledoubleleft";import n from"primevue/icons/angledoubleright";import i from"primevue/icons/angledoubleup";import s from"primevue/icons/angledown";import r from"primevue/icons/angleleft";import l from"primevue/icons/angleright";import a from"primevue/icons/angleup";import c from"primevue/ripple";import{UniqueComponentId as u,ObjectUtils as d,DomHandler as p}from"primevue/utils";import m from"primevue/basecomponent";import h from"primevue/picklist/style";import{resolveComponent as f,resolveDirective as v,openBlock as g,createElementBlock as b,mergeProps as y,renderSlot as I,createVNode as L,withCtx as w,createCommentVNode as $,createElementVNode as T,TransitionGroup as x,Fragment as A,renderList as D,withDirectives as S,createBlock as O,resolveDynamicComponent as _}from"vue";function k(e){return V(e)||M(e)||B(e)||C()}function C(){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 E(e,t);var o=Object.prototype.toString.call(e).slice(8,-1);return"Object"===o&&e.constructor&&(o=e.constructor.name),"Map"===o||"Set"===o?Array.from(e):"Arguments"===o||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(o)?E(e,t):void 0}}function M(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function V(e){if(Array.isArray(e))return E(e)}function E(e,t){(null==t||t>e.length)&&(t=e.length);for(var o=0,n=new Array(t);o<t;o++)n[o]=e[o];return n}var P={name:"PickList",extends:{name:"BasePickList",extends:m,props:{modelValue:{type:Array,default:function(){return[[],[]]}},selection:{type:Array,default:function(){return[[],[]]}},dataKey:{type:String,default:null},listStyle:{type:null,default:null},metaKeySelection:{type:Boolean,default:!1},autoOptionFocus:{type:Boolean,default:!0},focusOnHover:{type:Boolean,default:!0},responsive:{type:Boolean,default:!0},breakpoint:{type:String,default:"960px"},stripedRows:{type:Boolean,default:!1},showSourceControls:{type:Boolean,default:!0},showTargetControls:{type:Boolean,default:!0},targetListProps:{type:null,default:null},sourceListProps:{type:null,default:null},moveUpButtonProps:{type:null,default:null},moveTopButtonProps:{type:null,default:null},moveDownButtonProps:{type:null,default:null},moveBottomButtonProps:{type:null,default:null},moveToTargetProps:{type:null,default:null},moveAllToTargetProps:{type:null,default:null},moveToSourceProps:{type:null,default:null},moveAllToSourceProps:{type:null,default:null},tabindex:{type:Number,default:0}},style:h,provide:function(){return{$parentInstance:this}}},emits:["update:modelValue","reorder","update:selection","selection-change","move-to-target","move-to-source","move-all-to-target","move-all-to-source","focus","blur"],itemTouched:!1,reorderDirection:null,styleElement:null,media:null,mediaChangeListener:null,data:function(){return{id:this.$attrs.id,d_selection:this.selection,focused:{sourceList:!1,targetList:!1},focusedOptionIndex:-1,viewChanged:!1}},watch:{"$attrs.id":function(e){this.id=e||u()},selection:function(e){this.d_selection=e},breakpoint:function(){this.destroyMedia(),this.initMedia()}},updated:function(){this.reorderDirection&&(this.updateListScroll(this.$refs.sourceList.$el),this.updateListScroll(this.$refs.targetList.$el),this.reorderDirection=null)},beforeUnmount:function(){this.destroyStyle(),this.destroyMedia()},mounted:function(){this.id=this.id||u(),this.responsive&&(this.createStyle(),this.initMedia())},methods:{getItemKey:function(e,t){return this.dataKey?d.resolveFieldData(e,this.dataKey):t},getPTOptions:function(e,t,o,n){return this.ptm(t,{context:{active:this.isSelected(e,n),focused:o===this.focusedOptionId}})},isSelected:function(e,t){return-1!=d.findIndexInList(e,this.d_selection[t])},onListFocus:function(e,t){this.focused[t]=!0,this.findCurrentFocusedIndex(t),this.scrollInView(this.focusedOptionIndex,t),this.$emit("focus",e)},onListBlur:function(e,t){this.focused[t]=!1,this.focusedOptionIndex=-1,this.$emit("blur",e)},onOptionMouseDown:function(e,t,o){this.focused[o]=!0,this.focusedOptionIndex=t},onOptionMouseMove:function(e,t){this.focusOnHover&&this.focused[t]&&this.changeFocusedOptionIndex(e,t)},moveUp:function(e,t){if(this.d_selection&&this.d_selection[t]){for(var o=k(this.modelValue[t]),n=this.d_selection[t],i=0;i<n.length;i++){var s=d.findIndexInList(n[i],o);if(0===s)break;var r=o[s-1];o[s-1]=o[s],o[s]=r}var l=k(this.modelValue);l[t]=o,this.reorderDirection="up",this.$emit("update:modelValue",l),this.$emit("reorder",{originalEvent:e,value:l,direction:this.reorderDirection,listIndex:t})}},moveTop:function(e,t){if(this.d_selection){for(var o=k(this.modelValue[t]),n=this.d_selection[t],i=0;i<n.length;i++){var s=d.findIndexInList(n[i],o);if(0===s)break;var r=o.splice(s,1)[0];o.unshift(r)}var l=k(this.modelValue);l[t]=o,this.reorderDirection="top",this.$emit("update:modelValue",l),this.$emit("reorder",{originalEvent:e,value:l,direction:this.reorderDirection,listIndex:t})}},moveDown:function(e,t){if(this.d_selection){for(var o=k(this.modelValue[t]),n=this.d_selection[t],i=n.length-1;i>=0;i--){var s=d.findIndexInList(n[i],o);if(s===o.length-1)break;var r=o[s+1];o[s+1]=o[s],o[s]=r}var l=k(this.modelValue);l[t]=o,this.reorderDirection="down",this.$emit("update:modelValue",l),this.$emit("reorder",{originalEvent:e,value:l,direction:this.reorderDirection,listIndex:t})}},moveBottom:function(e,t){if(this.d_selection){for(var o=k(this.modelValue[t]),n=this.d_selection[t],i=n.length-1;i>=0;i--){var s=d.findIndexInList(n[i],o);if(s===o.length-1)break;var r=o.splice(s,1)[0];o.push(r)}var l=k(this.modelValue);l[t]=o,this.reorderDirection="bottom",this.$emit("update:modelValue",l),this.$emit("reorder",{originalEvent:e,value:l,direction:this.reorderDirection,listIndex:t})}},moveToTarget:function(e){var t=this.d_selection&&this.d_selection[0]?this.d_selection[0]:null,o=k(this.modelValue[0]),n=k(this.modelValue[1]);if(t){for(var i=0;i<t.length;i++){var s=t[i];-1==d.findIndexInList(s,n)&&n.push(o.splice(d.findIndexInList(s,o),1)[0])}var r=k(this.modelValue);r[0]=o,r[1]=n,this.$emit("update:modelValue",r),this.$emit("move-to-target",{originalEvent:e,items:k(new Set(t))}),this.d_selection[0]=[],this.$emit("update:selection",this.d_selection),this.$emit("selection-change",{originalEvent:e,value:this.d_selection})}},moveAllToTarget:function(e){if(this.modelValue[0]){var t=k(this.modelValue[0]),o=k(this.modelValue[1]);this.$emit("move-all-to-target",{originalEvent:e,items:t}),o=[].concat(k(o),k(t)),t=[];var n=k(this.modelValue);n[0]=t,n[1]=o,this.$emit("update:modelValue",n),this.d_selection[0]=[],this.$emit("update:selection",this.d_selection),this.$emit("selection-change",{originalEvent:e,value:this.d_selection})}},moveToSource:function(e){var t=this.d_selection&&this.d_selection[1]?this.d_selection[1]:null,o=k(this.modelValue[0]),n=k(this.modelValue[1]);if(t){for(var i=0;i<t.length;i++){var s=t[i];-1==d.findIndexInList(s,o)&&o.push(n.splice(d.findIndexInList(s,n),1)[0])}var r=k(this.modelValue);r[0]=o,r[1]=n,this.$emit("update:modelValue",r),this.$emit("move-to-source",{originalEvent:e,items:k(new Set(t))}),this.d_selection[1]=[],this.$emit("update:selection",this.d_selection),this.$emit("selection-change",{originalEvent:e,value:this.d_selection})}},moveAllToSource:function(e){if(this.modelValue[1]){var t=k(this.modelValue[0]),o=k(this.modelValue[1]);this.$emit("move-all-to-source",{originalEvent:e,items:o}),t=[].concat(k(t),k(o)),o=[];var n=k(this.modelValue);n[0]=t,n[1]=o,this.$emit("update:modelValue",n),this.d_selection[1]=[],this.$emit("update:selection",this.d_selection),this.$emit("selection-change",{originalEvent:e,value:this.d_selection})}},onItemClick:function(e,t,o,n){var i=0===n?"sourceList":"targetList";this.itemTouched=!1;var s,r=this.d_selection[n],l=d.findIndexInList(t,r),a=-1!=l,c=!this.itemTouched&&this.metaKeySelection,u=p.find(this.$refs[i].$el,'[data-pc-section="item"]')[o].getAttribute("id");if(this.focusedOptionIndex=u,c){var m=e.metaKey||e.ctrlKey;a&&m?s=r.filter((function(e,t){return t!==l})):(s=m&&r?k(r):[]).push(t)}else a?s=r.filter((function(e,t){return t!==l})):(s=r?k(r):[]).push(t);var h=k(this.d_selection);h[n]=s,this.d_selection=h,this.$emit("update:selection",this.d_selection),this.$emit("selection-change",{originalEvent:e,value:this.d_selection})},onItemDblClick:function(e,t,o){0===o?this.moveToTarget(e):1===o&&this.moveToSource(e)},onItemTouchEnd:function(){this.itemTouched=!0},onItemKeyDown:function(e,t){switch(e.code){case"ArrowDown":this.onArrowDownKey(e,t);break;case"ArrowUp":this.onArrowUpKey(e,t);break;case"Home":this.onHomeKey(e,t);break;case"End":this.onEndKey(e,t);break;case"Enter":case"NumpadEnter":this.onEnterKey(e,t);break;case"Space":this.onSpaceKey(e,t);break;case"KeyA":e.ctrlKey&&(this.d_selection=k(this.modelValue),this.$emit("update:selection",this.d_selection),e.preventDefault())}},onArrowDownKey:function(e,t){var o=-1!==this.focusedOptionIndex?this.findNextOptionIndex(t):this.findFirstSelectedOptionIndex(t);this.changeFocusedOptionIndex(o,t),e.shiftKey&&this.onEnterKey(e,t),e.preventDefault()},onArrowUpKey:function(e,t){var o=-1!==this.focusedOptionIndex?this.findPrevOptionIndex(t):this.findLastSelectedOptionIndex(t);this.changeFocusedOptionIndex(o,t),e.shiftKey&&this.onEnterKey(e,t),e.preventDefault()},onEnterKey:function(e,t){var o="sourceList"===t?0:1,n=this.findMatchedOptionIndex(t);this.onItemClick(e,this.modelValue[o][n],n,o),e.preventDefault()},onSpaceKey:function(e,t){if(e.preventDefault(),e.shiftKey&&this.d_selection&&this.d_selection.length>0){var o="sourceList"===t?0:1,n=d.findIndexInList(this.d_selection[o][0],k(this.modelValue[o])),i=this.findMatchedOptionIndex(t);this.d_selection[o]=k(this.modelValue[o]).slice(Math.min(n,i),Math.max(n,i)+1),this.$emit("update:selection",this.d_selection),this.$emit("selection-change",{originalEvent:e,value:this.d_selection})}else this.onEnterKey(e,t)},onHomeKey:function(e,t){if(e.ctrlKey&&e.shiftKey){var o="sourceList"===t?0:1,n=this.findMatchedOptionIndex(t);this.d_selection[o]=k(this.modelValue[o]).slice(0,n+1),this.$emit("update:selection",this.d_selection),this.$emit("selection-change",{originalEvent:e,value:this.d_selection})}else this.changeFocusedOptionIndex(0,t);e.preventDefault()},onEndKey:function(e,t){var o=this.findAllItems(t);if(e.ctrlKey&&e.shiftKey){var n="sourceList"===t?0:1,i=this.findMatchedOptionIndex(t);this.d_selection[n]=k(this.modelValue[n]).slice(i,o.length),this.$emit("update:selection",this.d_selection),this.$emit("selection-change",{originalEvent:e,value:this.d_selection})}else this.changeFocusedOptionIndex(o.length-1,t);e.preventDefault()},findAllItems:function(e){return p.find(this.$refs[e].$el,'[data-pc-section="item"]')},findFocusedItem:function(e){return p.findSingle(this.$refs[e].$el,'[data-pc-section="item"][id='.concat(this.focusedOptionIndex,"]"))},findCurrentFocusedIndex:function(e){-1===this.focusedOptionIndex&&(this.focusedOptionIndex=this.findFirstSelectedOptionIndex(e),this.autoOptionFocus&&-1===this.focusedOptionIndex&&(this.focusedOptionIndex=this.findFirstFocusedOptionIndex(e)))},findFirstFocusedOptionIndex:function(e){var t=p.findSingle(this.$refs[e].$el,'[data-pc-section="item"]');return p.getAttribute(t,"id")},findFirstSelectedOptionIndex:function(e){if(this.hasSelectedOption(e)){var t=p.findSingle(this.$refs[e].$el,'[data-p-highlight="true"]');return p.getAttribute(t,"id")}return-1},findLastSelectedOptionIndex:function(e){if(this.hasSelectedOption(e)){var t=p.find(this.$refs[e].$el,'[data-p-highlight="true"]');return d.findIndexInList(t[t.length-1],this.list.children)}return-1},findMatchedOptionIndex:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.focusedOptionIndex;return k(this.findAllItems(e)).findIndex((function(e){return e.id===t}))},findNextOptionIndex:function(e){var t=this.findMatchedOptionIndex(e);return t>-1?t+1:0},findPrevOptionIndex:function(e){var t=this.findMatchedOptionIndex(e);return t>-1?t-1:0},changeFocusedOptionIndex:function(e,t){var o=this.findAllItems(t),n=e>=o.length?o.length-1:e<0?0:e;this.focusedOptionIndex=o[n].getAttribute("id"),this.scrollInView(o[n].getAttribute("id"),t)},scrollInView:function(e,t){var o=p.findSingle(this.$refs[t].$el,'[data-pc-section="item"][id="'.concat(e,'"]'));o&&o.scrollIntoView&&o.scrollIntoView({block:"nearest",inline:"start",behavior:"smooth"})},updateListScroll:function(e){var t=p.find(e,'[data-pc-section="item"][data-p-highlight="true"]');if(t&&t.length)switch(this.reorderDirection){case"up":p.scrollInView(e,t[0]);break;case"top":e.scrollTop=0;break;case"down":p.scrollInView(e,t[t.length-1]);break;case"bottom":e.scrollTop=e.scrollHeight}},initMedia:function(){this.media=window.matchMedia("(max-width: ".concat(this.breakpoint,")")),this.viewChanged=this.media.matches,this.bindMediaChangeListener()},destroyMedia:function(){this.unbindMediaChangeListener()},bindMediaChangeListener:function(){var e=this;this.media&&!this.mediaChangeListener&&(this.mediaChangeListener=function(t){e.viewChanged=t.matches},this.media.addEventListener("change",this.mediaChangeListener))},unbindMediaChangeListener:function(){this.media&&this.mediaChangeListener&&(this.media.removeEventListener("change",this.mediaChangeListener),this.mediaChangeListener=null)},createStyle:function(){if(!this.styleElement&&!this.isUnstyled){var e;this.$el.setAttribute(this.attributeSelector,""),this.styleElement=document.createElement("style"),this.styleElement.type="text/css",p.setAttribute(this.styleElement,"nonce",null===(e=this.$primevue)||void 0===e||null===(e=e.config)||void 0===e||null===(e=e.csp)||void 0===e?void 0:e.nonce),document.head.appendChild(this.styleElement);var t="\n@media screen and (max-width: ".concat(this.breakpoint,") {\n .p-picklist[").concat(this.attributeSelector,"] {\n flex-direction: column;\n }\n\n .p-picklist[").concat(this.attributeSelector,"] .p-picklist-buttons {\n padding: var(--content-padding);\n flex-direction: row;\n }\n\n .p-picklist[").concat(this.attributeSelector,"] .p-picklist-buttons .p-button {\n margin-right: var(--inline-spacing);\n margin-bottom: 0;\n }\n\n .p-picklist[").concat(this.attributeSelector,"] .p-picklist-buttons .p-button:last-child {\n margin-right: 0;\n }\n}\n");this.styleElement.innerHTML=t}},destroyStyle:function(){this.styleElement&&(document.head.removeChild(this.styleElement),this.styleElement=null)},moveDisabled:function(e){if(!this.d_selection[e]||!this.d_selection[e].length)return!0},moveAllDisabled:function(e){return d.isEmpty(this[e])},hasSelectedOption:function(e){return d.isNotEmpty("sourceList"===e?this.d_selection[0]:this.d_selection[1])}},computed:{idSource:function(){return"".concat(this.id,"_source")},idTarget:function(){return"".concat(this.id,"_target")},focusedOptionId:function(){return-1!==this.focusedOptionIndex?this.focusedOptionIndex:null},sourceList:function(){return this.modelValue&&this.modelValue[0]?this.modelValue[0]:null},targetList:function(){return this.modelValue&&this.modelValue[1]?this.modelValue[1]:null},attributeSelector:function(){return u()},moveUpAriaLabel:function(){return this.$primevue.config.locale.aria?this.$primevue.config.locale.aria.moveUp:void 0},moveTopAriaLabel:function(){return this.$primevue.config.locale.aria?this.$primevue.config.locale.aria.moveTop:void 0},moveDownAriaLabel:function(){return this.$primevue.config.locale.aria?this.$primevue.config.locale.aria.moveDown:void 0},moveBottomAriaLabel:function(){return this.$primevue.config.locale.aria?this.$primevue.config.locale.aria.moveBottom:void 0},moveToTargetAriaLabel:function(){return this.$primevue.config.locale.aria?this.$primevue.config.locale.aria.moveToTarget:void 0},moveAllToTargetAriaLabel:function(){return this.$primevue.config.locale.aria?this.$primevue.config.locale.aria.moveAllToTarget:void 0},moveToSourceAriaLabel:function(){return this.$primevue.config.locale.aria?this.$primevue.config.locale.aria.moveToSource:void 0},moveAllToSourceAriaLabel:function(){return this.$primevue.config.locale.aria?this.$primevue.config.locale.aria.moveAllToSource:void 0}},components:{PLButton:e,AngleRightIcon:l,AngleLeftIcon:r,AngleDownIcon:s,AngleUpIcon:a,AngleDoubleRightIcon:n,AngleDoubleLeftIcon:o,AngleDoubleDownIcon:t,AngleDoubleUpIcon:i},directives:{ripple:c}};function K(e){return K="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},K(e)}function U(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),o.push.apply(o,n)}return o}function F(e){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?U(Object(o),!0).forEach((function(t){j(e,t,o[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):U(Object(o)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(o,t))}))}return e}function j(e,t,o){var n;return(t="symbol"==K(n=H(t,"string"))?n:String(n))in e?Object.defineProperty(e,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[t]=o,e}function H(e,t){if("object"!=K(e)||!e)return e;var o=e[Symbol.toPrimitive];if(void 0!==o){var n=o.call(e,t||"default");if("object"!=K(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}var N=["id","onClick","onDblclick","onMousedown","onMousemove","aria-selected","data-p-highlight","data-p-focused"],R=["id","onClick","onDblclick","onMousedown","onMousemove","aria-selected","data-p-highlight","data-p-focused"];P.render=function(e,t,o,n,i,s){var r=f("AngleUpIcon"),l=f("PLButton"),a=f("AngleDoubleUpIcon"),c=f("AngleDownIcon"),u=f("AngleDoubleDownIcon"),d=v("ripple");return g(),b("div",y({class:e.cx("root")},e.ptm("root")),[e.showSourceControls?(g(),b("div",y({key:0,class:e.cx("sourceControls")},e.ptm("sourceControls"),{"data-pc-group-section":"controls"}),[I(e.$slots,"sourcecontrolsstart"),L(l,y({"aria-label":s.moveUpAriaLabel,disabled:s.moveDisabled(0),type:"button",onClick:t[0]||(t[0]=function(e){return s.moveUp(e,0)})},e.moveUpButtonProps,{pt:e.ptm("sourceMoveUpButton"),unstyled:e.unstyled,"data-pc-section":"sourcemoveupbutton"}),{icon:w((function(){return[I(e.$slots,"moveupicon",{},(function(){return[L(r,y(e.ptm("sourceMoveUpButton").icon,{"data-pc-section":"moveupicon"}),null,16)]}))]})),_:3},16,["aria-label","disabled","pt","unstyled"]),L(l,y({"aria-label":s.moveTopAriaLabel,disabled:s.moveDisabled(0),type:"button",onClick:t[1]||(t[1]=function(e){return s.moveTop(e,0)})},e.moveTopButtonProps,{pt:e.ptm("sourceMoveTopButton"),unstyled:e.unstyled,"data-pc-section":"sourcemovetopbutton"}),{icon:w((function(){return[I(e.$slots,"movetopicon",{},(function(){return[L(a,y(e.ptm("sourceMoveTopButton").icon,{"data-pc-section":"movetopicon"}),null,16)]}))]})),_:3},16,["aria-label","disabled","pt","unstyled"]),L(l,y({"aria-label":s.moveDownAriaLabel,disabled:s.moveDisabled(0),type:"button",onClick:t[2]||(t[2]=function(e){return s.moveDown(e,0)})},e.moveDownButtonProps,{pt:e.ptm("sourceMoveDownButton"),unstyled:e.unstyled,"data-pc-section":"sourcemovedownbutton"}),{icon:w((function(){return[I(e.$slots,"movedownicon",{},(function(){return[L(c,y(e.ptm("sourceMoveDownButton").icon,{"data-pc-section":"movedownicon"}),null,16)]}))]})),_:3},16,["aria-label","disabled","pt","unstyled"]),L(l,y({"aria-label":s.moveBottomAriaLabel,disabled:s.moveDisabled(0),type:"button",onClick:t[3]||(t[3]=function(e){return s.moveBottom(e,0)})},e.moveBottomButtonProps,{pt:e.ptm("sourceMoveBottomButton"),unstyled:e.unstyled,"data-pc-section":"sourcemovebottombutton"}),{icon:w((function(){return[I(e.$slots,"movebottomicon",{},(function(){return[L(u,y(e.ptm("sourceMoveBottomButton").icon,{"data-pc-section":"movebottomicon"}),null,16)]}))]})),_:3},16,["aria-label","disabled","pt","unstyled"]),I(e.$slots,"sourcecontrolsend")],16)):$("",!0),T("div",y({class:e.cx("sourceWrapper")},e.ptm("sourceWrapper"),{"data-pc-group-section":"listwrapper"}),[e.$slots.sourceheader?(g(),b("div",y({key:0,class:e.cx("sourceHeader")},e.ptm("sourceHeader"),{"data-pc-group-section":"header"}),[I(e.$slots,"sourceheader")],16)):$("",!0),L(x,y({ref:"sourceList",id:s.idSource+"_list",name:"p-picklist-flip",tag:"ul",class:e.cx("sourceList"),style:e.listStyle,role:"listbox","aria-multiselectable":"true","aria-activedescendant":i.focused.sourceList?s.focusedOptionId:void 0,tabindex:s.sourceList&&s.sourceList.length>0?e.tabindex:-1,onFocus:t[5]||(t[5]=function(e){return s.onListFocus(e,"sourceList")}),onBlur:t[6]||(t[6]=function(e){return s.onListBlur(e,"sourceList")}),onKeydown:t[7]||(t[7]=function(e){return s.onItemKeyDown(e,"sourceList")})},F(F(F({},e.sourceListProps),e.ptm("sourceList")),e.ptm("transition")),{"data-pc-group-section":"list"}),{default:w((function(){return[(g(!0),b(A,null,D(s.sourceList,(function(o,n){return S((g(),b("li",y({key:s.getItemKey(o,n),id:s.idSource+"_"+n,class:e.cx("item",{item:o,id:"".concat(s.idSource,"_").concat(n),listIndex:0}),onClick:function(e){return s.onItemClick(e,o,n,0)},onDblclick:function(e){return s.onItemDblClick(e,o,0)},onTouchend:t[4]||(t[4]=function(){return s.onItemTouchEnd&&s.onItemTouchEnd.apply(s,arguments)}),onMousedown:function(e){return s.onOptionMouseDown(e,n,"sourceList")},onMousemove:function(e){return s.onOptionMouseMove(n,"sourceList")},role:"option","aria-selected":s.isSelected(o,0)},s.getPTOptions(o,"item","".concat(s.idSource,"_").concat(n),0),{"data-p-highlight":s.isSelected(o,0),"data-p-focused":"".concat(s.idSource,"_").concat(n)===s.focusedOptionId}),[I(e.$slots,"item",{item:o,index:n})],16,N)),[[d]])})),128))]})),_:3},16,["id","class","style","aria-activedescendant","tabindex"])],16),T("div",y({class:e.cx("buttons")},e.ptm("buttons"),{"data-pc-group-section":"controls"}),[I(e.$slots,"movecontrolsstart"),L(l,y({"aria-label":s.moveToTargetAriaLabel,type:"button",onClick:s.moveToTarget,disabled:s.moveDisabled(0)},e.moveToTargetProps,{pt:e.ptm("moveToTargetButton"),unstyled:e.unstyled,"data-pc-section":"movetotargetbuton"}),{icon:w((function(){return[I(e.$slots,"movetotargeticon",{viewChanged:i.viewChanged},(function(){return[(g(),O(_(i.viewChanged?"AngleDownIcon":"AngleRightIcon"),y(e.ptm("moveToTargetButton").icon,{"data-pc-section":"movetotargeticon"}),null,16))]}))]})),_:3},16,["aria-label","onClick","disabled","pt","unstyled"]),L(l,y({"aria-label":s.moveAllToTargetAriaLabel,type:"button",onClick:s.moveAllToTarget,disabled:s.moveAllDisabled("sourceList")},e.moveAllToTargetProps,{pt:e.ptm("moveAllToTargetButton"),unstyled:e.unstyled,"data-pc-section":"movealltotargetbuton"}),{icon:w((function(){return[I(e.$slots,"movealltotargeticon",{viewChanged:i.viewChanged},(function(){return[(g(),O(_(i.viewChanged?"AngleDoubleDownIcon":"AngleDoubleRightIcon"),y(e.ptm("moveAllToTargetButton").icon,{"data-pc-section":"movealltotargeticon"}),null,16))]}))]})),_:3},16,["aria-label","onClick","disabled","pt","unstyled"]),L(l,y({"aria-label":s.moveToSourceAriaLabel,type:"button",onClick:s.moveToSource,disabled:s.moveDisabled(1)},e.moveToSourceProps,{pt:e.ptm("moveToSourceButton"),unstyled:e.unstyled,"data-pc-section":"movetosourcebuton"}),{icon:w((function(){return[I(e.$slots,"movetosourceicon",{viewChanged:i.viewChanged},(function(){return[(g(),O(_(i.viewChanged?"AngleUpIcon":"AngleLeftIcon"),y(e.ptm("moveToSourceButton").icon,{"data-pc-section":"movetosourceicon"}),null,16))]}))]})),_:3},16,["aria-label","onClick","disabled","pt","unstyled"]),L(l,y({"aria-label":s.moveAllToSourceAriaLabel,type:"button",onClick:s.moveAllToSource,disabled:s.moveAllDisabled("targetList")},e.moveAllToSourceProps,{pt:e.ptm("moveAllToSourceButton"),"data-pc-section":"movealltosourcebuton",unstyled:e.unstyled}),{icon:w((function(){return[I(e.$slots,"movealltosourceicon",{viewChanged:i.viewChanged},(function(){return[(g(),O(_(i.viewChanged?"AngleDoubleUpIcon":"AngleDoubleLeftIcon"),y(e.ptm("moveAllToSourceButton").icon,{"data-pc-section":"movealltosourceicon"}),null,16))]}))]})),_:3},16,["aria-label","onClick","disabled","pt","unstyled"]),I(e.$slots,"movecontrolsend")],16),T("div",y({class:e.cx("targetWrapper")},e.ptm("targetWrapper"),{"data-pc-group-section":"listwrapper"}),[e.$slots.targetheader?(g(),b("div",y({key:0,class:e.cx("targetHeader")},e.ptm("targetHeader"),{"data-pc-group-section":"header"}),[I(e.$slots,"targetheader")],16)):$("",!0),L(x,y({ref:"targetList",id:s.idTarget+"_list",name:"p-picklist-flip",tag:"ul",class:e.cx("targetList"),style:e.listStyle,role:"listbox","aria-multiselectable":"true","aria-activedescendant":i.focused.targetList?s.focusedOptionId:void 0,tabindex:s.targetList&&s.targetList.length>0?e.tabindex:-1,onFocus:t[10]||(t[10]=function(e){return s.onListFocus(e,"targetList")}),onBlur:t[11]||(t[11]=function(e){return s.onListBlur(e,"targetList")}),onKeydown:t[12]||(t[12]=function(e){return s.onItemKeyDown(e,"targetList")})},F(F(F({},e.targetListProps),e.ptm("targetList")),e.ptm("transition")),{"data-pc-group-section":"list"}),{default:w((function(){return[(g(!0),b(A,null,D(s.targetList,(function(o,n){return S((g(),b("li",y({key:s.getItemKey(o,n),id:s.idTarget+"_"+n,class:e.cx("item",{item:o,id:"".concat(s.idTarget,"_").concat(n),listIndex:1}),onClick:function(e){return s.onItemClick(e,o,n,1)},onDblclick:function(e){return s.onItemDblClick(e,o,1)},onKeydown:t[8]||(t[8]=function(e){return s.onItemKeyDown(e,"targetList")}),onMousedown:function(e){return s.onOptionMouseDown(e,n,"targetList")},onMousemove:function(e){return s.onOptionMouseMove(n,"targetList")},onTouchend:t[9]||(t[9]=function(){return s.onItemTouchEnd&&s.onItemTouchEnd.apply(s,arguments)}),role:"option","aria-selected":s.isSelected(o,1)},s.getPTOptions(o,"item","".concat(s.idTarget,"_").concat(n),1),{"data-p-highlight":s.isSelected(o,1),"data-p-focused":"".concat(s.idTarget,"_").concat(n)===s.focusedOptionId}),[I(e.$slots,"item",{item:o,index:n})],16,R)),[[d]])})),128))]})),_:3},16,["id","class","style","aria-activedescendant","tabindex"])],16),e.showTargetControls?(g(),b("div",y({key:1,class:e.cx("targetControls")},e.ptm("targetControls"),{"data-pc-group-section":"controls"}),[I(e.$slots,"targetcontrolsstart"),L(l,y({"aria-label":s.moveUpAriaLabel,disabled:s.moveDisabled(1),type:"button",onClick:t[13]||(t[13]=function(e){return s.moveUp(e,1)})},e.moveUpButtonProps,{pt:e.ptm("targetMoveUpButton"),unstyled:e.unstyled,"data-pc-section":"targetmoveupbutton"}),{icon:w((function(){return[I(e.$slots,"moveupicon",{},(function(){return[L(r,y(e.ptm("targetMoveUpButton").icon,{"data-pc-section":"moveupicon"}),null,16)]}))]})),_:3},16,["aria-label","disabled","pt","unstyled"]),L(l,y({"aria-label":s.moveTopAriaLabel,disabled:s.moveDisabled(1),type:"button",onClick:t[14]||(t[14]=function(e){return s.moveTop(e,1)})},e.moveTopButtonProps,{pt:e.ptm("targetMoveTopButton"),unstyled:e.unstyled,"data-pc-section":"targetmovetopbutton"}),{icon:w((function(){return[I(e.$slots,"movetopicon",{},(function(){return[L(a,y(e.ptm("targetMoveTopButton").icon,{"data-pc-section":"movetopicon"}),null,16)]}))]})),_:3},16,["aria-label","disabled","pt","unstyled"]),L(l,y({"aria-label":s.moveDownAriaLabel,disabled:s.moveDisabled(1),type:"button",onClick:t[15]||(t[15]=function(e){return s.moveDown(e,1)})},e.moveDownButtonProps,{pt:e.ptm("targetMoveDownButton"),unstyled:e.unstyled,"data-pc-section":"targetmovedownbutton"}),{icon:w((function(){return[I(e.$slots,"movedownicon",{},(function(){return[L(c,y(e.ptm("targetMoveDownButton").icon,{"data-pc-section":"movedownicon"}),null,16)]}))]})),_:3},16,["aria-label","disabled","pt","unstyled"]),L(l,y({"aria-label":s.moveBottomAriaLabel,disabled:s.moveDisabled(1),type:"button",onClick:t[16]||(t[16]=function(e){return s.moveBottom(e,1)})},e.moveBottomButtonProps,{pt:e.ptm("targetMoveBottomButton"),unstyled:e.unstyled,"data-pc-section":"targetmovebottombutton"}),{icon:w((function(){return[I(e.$slots,"movebottomicon",{},(function(){return[L(u,y(e.ptm("targetMoveBottomButton").icon,{"data-pc-section":"movebottomicon"}),null,16)]}))]})),_:3},16,["aria-label","disabled","pt","unstyled"]),I(e.$slots,"targetcontrolsend")],16)):$("",!0)],16)};export{P as default};
@@ -201,6 +201,7 @@ this.primevue.picklist = (function (Button, AngleDoubleDownIcon, AngleDoubleLeft
201
201
  onListFocus: function onListFocus(event, listType) {
202
202
  this.focused[listType] = true;
203
203
  this.findCurrentFocusedIndex(listType);
204
+ this.scrollInView(this.focusedOptionIndex, listType);
204
205
  this.$emit('focus', event);
205
206
  },
206
207
  onListBlur: function onListBlur(event, listType) {
@@ -211,7 +212,6 @@ this.primevue.picklist = (function (Button, AngleDoubleDownIcon, AngleDoubleLeft
211
212
  onOptionMouseDown: function onOptionMouseDown(event, index, listType) {
212
213
  this.focused[listType] = true;
213
214
  this.focusedOptionIndex = index;
214
- event.preventDefault();
215
215
  },
216
216
  onOptionMouseMove: function onOptionMouseMove(index, listType) {
217
217
  if (this.focusOnHover && this.focused[listType]) {
@@ -574,11 +574,12 @@ this.primevue.picklist = (function (Button, AngleDoubleDownIcon, AngleDoubleLeft
574
574
  return utils.DomHandler.findSingle(this.$refs[listType].$el, "[data-pc-section=\"item\"][id=".concat(this.focusedOptionIndex, "]"));
575
575
  },
576
576
  findCurrentFocusedIndex: function findCurrentFocusedIndex(listType) {
577
- this.focusedOptionIndex = this.findFirstSelectedOptionIndex(listType);
578
- if (this.autoOptionFocus && this.focusedOptionIndex === -1) {
579
- this.focusedOptionIndex = this.findFirstFocusedOptionIndex(listType);
577
+ if (this.focusedOptionIndex === -1) {
578
+ this.focusedOptionIndex = this.findFirstSelectedOptionIndex(listType);
579
+ if (this.autoOptionFocus && this.focusedOptionIndex === -1) {
580
+ this.focusedOptionIndex = this.findFirstFocusedOptionIndex(listType);
581
+ }
580
582
  }
581
- this.scrollInView(this.focusedOptionIndex, listType);
582
583
  },
583
584
  findFirstFocusedOptionIndex: function findFirstFocusedOptionIndex(listType) {
584
585
  var firstFocusableItem = utils.DomHandler.findSingle(this.$refs[listType].$el, '[data-pc-section="item"]');
@@ -624,7 +625,8 @@ this.primevue.picklist = (function (Button, AngleDoubleDownIcon, AngleDoubleLeft
624
625
  if (element) {
625
626
  element.scrollIntoView && element.scrollIntoView({
626
627
  block: 'nearest',
627
- inline: 'start'
628
+ inline: 'start',
629
+ behavior: 'smooth'
628
630
  });
629
631
  }
630
632
  },
@@ -1 +1 @@
1
- this.primevue=this.primevue||{},this.primevue.picklist=function(e,t,o,n,i,r,s,l,a,c,u,d,m,p){"use strict";function h(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var f=h(e),v=h(t),g=h(o),b=h(n),y=h(i),I=h(r),w=h(s),L=h(l),x=h(a),S=h(c);function D(e){return O(e)||C(e)||$(e)||T()}function T(){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 $(e,t){if(e){if("string"==typeof e)return k(e,t);var o=Object.prototype.toString.call(e).slice(8,-1);return"Object"===o&&e.constructor&&(o=e.constructor.name),"Map"===o||"Set"===o?Array.from(e):"Arguments"===o||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(o)?k(e,t):void 0}}function C(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function O(e){if(Array.isArray(e))return k(e)}function k(e,t){(null==t||t>e.length)&&(t=e.length);for(var o=0,n=new Array(t);o<t;o++)n[o]=e[o];return n}var B={name:"PickList",extends:{name:"BasePickList",extends:h(d).default,props:{modelValue:{type:Array,default:function(){return[[],[]]}},selection:{type:Array,default:function(){return[[],[]]}},dataKey:{type:String,default:null},listStyle:{type:null,default:null},metaKeySelection:{type:Boolean,default:!1},autoOptionFocus:{type:Boolean,default:!0},focusOnHover:{type:Boolean,default:!0},responsive:{type:Boolean,default:!0},breakpoint:{type:String,default:"960px"},stripedRows:{type:Boolean,default:!1},showSourceControls:{type:Boolean,default:!0},showTargetControls:{type:Boolean,default:!0},targetListProps:{type:null,default:null},sourceListProps:{type:null,default:null},moveUpButtonProps:{type:null,default:null},moveTopButtonProps:{type:null,default:null},moveDownButtonProps:{type:null,default:null},moveBottomButtonProps:{type:null,default:null},moveToTargetProps:{type:null,default:null},moveAllToTargetProps:{type:null,default:null},moveToSourceProps:{type:null,default:null},moveAllToSourceProps:{type:null,default:null},tabindex:{type:Number,default:0}},style:h(m).default,provide:function(){return{$parentInstance:this}}},emits:["update:modelValue","reorder","update:selection","selection-change","move-to-target","move-to-source","move-all-to-target","move-all-to-source","focus","blur"],itemTouched:!1,reorderDirection:null,styleElement:null,media:null,mediaChangeListener:null,data:function(){return{id:this.$attrs.id,d_selection:this.selection,focused:{sourceList:!1,targetList:!1},focusedOptionIndex:-1,viewChanged:!1}},watch:{"$attrs.id":function(e){this.id=e||u.UniqueComponentId()},selection:function(e){this.d_selection=e},breakpoint:function(){this.destroyMedia(),this.initMedia()}},updated:function(){this.reorderDirection&&(this.updateListScroll(this.$refs.sourceList.$el),this.updateListScroll(this.$refs.targetList.$el),this.reorderDirection=null)},beforeUnmount:function(){this.destroyStyle(),this.destroyMedia()},mounted:function(){this.id=this.id||u.UniqueComponentId(),this.responsive&&(this.createStyle(),this.initMedia())},methods:{getItemKey:function(e,t){return this.dataKey?u.ObjectUtils.resolveFieldData(e,this.dataKey):t},getPTOptions:function(e,t,o,n){return this.ptm(t,{context:{active:this.isSelected(e,n),focused:o===this.focusedOptionId}})},isSelected:function(e,t){return-1!=u.ObjectUtils.findIndexInList(e,this.d_selection[t])},onListFocus:function(e,t){this.focused[t]=!0,this.findCurrentFocusedIndex(t),this.$emit("focus",e)},onListBlur:function(e,t){this.focused[t]=!1,this.focusedOptionIndex=-1,this.$emit("blur",e)},onOptionMouseDown:function(e,t,o){this.focused[o]=!0,this.focusedOptionIndex=t,e.preventDefault()},onOptionMouseMove:function(e,t){this.focusOnHover&&this.focused[t]&&this.changeFocusedOptionIndex(e,t)},moveUp:function(e,t){if(this.d_selection&&this.d_selection[t]){for(var o=D(this.modelValue[t]),n=this.d_selection[t],i=0;i<n.length;i++){var r=u.ObjectUtils.findIndexInList(n[i],o);if(0===r)break;var s=o[r-1];o[r-1]=o[r],o[r]=s}var l=D(this.modelValue);l[t]=o,this.reorderDirection="up",this.$emit("update:modelValue",l),this.$emit("reorder",{originalEvent:e,value:l,direction:this.reorderDirection,listIndex:t})}},moveTop:function(e,t){if(this.d_selection){for(var o=D(this.modelValue[t]),n=this.d_selection[t],i=0;i<n.length;i++){var r=u.ObjectUtils.findIndexInList(n[i],o);if(0===r)break;var s=o.splice(r,1)[0];o.unshift(s)}var l=D(this.modelValue);l[t]=o,this.reorderDirection="top",this.$emit("update:modelValue",l),this.$emit("reorder",{originalEvent:e,value:l,direction:this.reorderDirection,listIndex:t})}},moveDown:function(e,t){if(this.d_selection){for(var o=D(this.modelValue[t]),n=this.d_selection[t],i=n.length-1;i>=0;i--){var r=u.ObjectUtils.findIndexInList(n[i],o);if(r===o.length-1)break;var s=o[r+1];o[r+1]=o[r],o[r]=s}var l=D(this.modelValue);l[t]=o,this.reorderDirection="down",this.$emit("update:modelValue",l),this.$emit("reorder",{originalEvent:e,value:l,direction:this.reorderDirection,listIndex:t})}},moveBottom:function(e,t){if(this.d_selection){for(var o=D(this.modelValue[t]),n=this.d_selection[t],i=n.length-1;i>=0;i--){var r=u.ObjectUtils.findIndexInList(n[i],o);if(r===o.length-1)break;var s=o.splice(r,1)[0];o.push(s)}var l=D(this.modelValue);l[t]=o,this.reorderDirection="bottom",this.$emit("update:modelValue",l),this.$emit("reorder",{originalEvent:e,value:l,direction:this.reorderDirection,listIndex:t})}},moveToTarget:function(e){var t=this.d_selection&&this.d_selection[0]?this.d_selection[0]:null,o=D(this.modelValue[0]),n=D(this.modelValue[1]);if(t){for(var i=0;i<t.length;i++){var r=t[i];-1==u.ObjectUtils.findIndexInList(r,n)&&n.push(o.splice(u.ObjectUtils.findIndexInList(r,o),1)[0])}var s=D(this.modelValue);s[0]=o,s[1]=n,this.$emit("update:modelValue",s),this.$emit("move-to-target",{originalEvent:e,items:D(new Set(t))}),this.d_selection[0]=[],this.$emit("update:selection",this.d_selection),this.$emit("selection-change",{originalEvent:e,value:this.d_selection})}},moveAllToTarget:function(e){if(this.modelValue[0]){var t=D(this.modelValue[0]),o=D(this.modelValue[1]);this.$emit("move-all-to-target",{originalEvent:e,items:t}),o=[].concat(D(o),D(t)),t=[];var n=D(this.modelValue);n[0]=t,n[1]=o,this.$emit("update:modelValue",n),this.d_selection[0]=[],this.$emit("update:selection",this.d_selection),this.$emit("selection-change",{originalEvent:e,value:this.d_selection})}},moveToSource:function(e){var t=this.d_selection&&this.d_selection[1]?this.d_selection[1]:null,o=D(this.modelValue[0]),n=D(this.modelValue[1]);if(t){for(var i=0;i<t.length;i++){var r=t[i];-1==u.ObjectUtils.findIndexInList(r,o)&&o.push(n.splice(u.ObjectUtils.findIndexInList(r,n),1)[0])}var s=D(this.modelValue);s[0]=o,s[1]=n,this.$emit("update:modelValue",s),this.$emit("move-to-source",{originalEvent:e,items:D(new Set(t))}),this.d_selection[1]=[],this.$emit("update:selection",this.d_selection),this.$emit("selection-change",{originalEvent:e,value:this.d_selection})}},moveAllToSource:function(e){if(this.modelValue[1]){var t=D(this.modelValue[0]),o=D(this.modelValue[1]);this.$emit("move-all-to-source",{originalEvent:e,items:o}),t=[].concat(D(t),D(o)),o=[];var n=D(this.modelValue);n[0]=t,n[1]=o,this.$emit("update:modelValue",n),this.d_selection[1]=[],this.$emit("update:selection",this.d_selection),this.$emit("selection-change",{originalEvent:e,value:this.d_selection})}},onItemClick:function(e,t,o,n){var i=0===n?"sourceList":"targetList";this.itemTouched=!1;var r,s=this.d_selection[n],l=u.ObjectUtils.findIndexInList(t,s),a=-1!=l,c=!this.itemTouched&&this.metaKeySelection,d=u.DomHandler.find(this.$refs[i].$el,'[data-pc-section="item"]')[o].getAttribute("id");if(this.focusedOptionIndex=d,c){var m=e.metaKey||e.ctrlKey;a&&m?r=s.filter((function(e,t){return t!==l})):(r=m&&s?D(s):[]).push(t)}else a?r=s.filter((function(e,t){return t!==l})):(r=s?D(s):[]).push(t);var p=D(this.d_selection);p[n]=r,this.d_selection=p,this.$emit("update:selection",this.d_selection),this.$emit("selection-change",{originalEvent:e,value:this.d_selection})},onItemDblClick:function(e,t,o){0===o?this.moveToTarget(e):1===o&&this.moveToSource(e)},onItemTouchEnd:function(){this.itemTouched=!0},onItemKeyDown:function(e,t){switch(e.code){case"ArrowDown":this.onArrowDownKey(e,t);break;case"ArrowUp":this.onArrowUpKey(e,t);break;case"Home":this.onHomeKey(e,t);break;case"End":this.onEndKey(e,t);break;case"Enter":case"NumpadEnter":this.onEnterKey(e,t);break;case"Space":this.onSpaceKey(e,t);break;case"KeyA":e.ctrlKey&&(this.d_selection=D(this.modelValue),this.$emit("update:selection",this.d_selection),e.preventDefault())}},onArrowDownKey:function(e,t){var o=-1!==this.focusedOptionIndex?this.findNextOptionIndex(t):this.findFirstSelectedOptionIndex(t);this.changeFocusedOptionIndex(o,t),e.shiftKey&&this.onEnterKey(e,t),e.preventDefault()},onArrowUpKey:function(e,t){var o=-1!==this.focusedOptionIndex?this.findPrevOptionIndex(t):this.findLastSelectedOptionIndex(t);this.changeFocusedOptionIndex(o,t),e.shiftKey&&this.onEnterKey(e,t),e.preventDefault()},onEnterKey:function(e,t){var o="sourceList"===t?0:1,n=this.findMatchedOptionIndex(t);this.onItemClick(e,this.modelValue[o][n],n,o),e.preventDefault()},onSpaceKey:function(e,t){if(e.preventDefault(),e.shiftKey&&this.d_selection&&this.d_selection.length>0){var o="sourceList"===t?0:1,n=u.ObjectUtils.findIndexInList(this.d_selection[o][0],D(this.modelValue[o])),i=this.findMatchedOptionIndex(t);this.d_selection[o]=D(this.modelValue[o]).slice(Math.min(n,i),Math.max(n,i)+1),this.$emit("update:selection",this.d_selection),this.$emit("selection-change",{originalEvent:e,value:this.d_selection})}else this.onEnterKey(e,t)},onHomeKey:function(e,t){if(e.ctrlKey&&e.shiftKey){var o="sourceList"===t?0:1,n=this.findMatchedOptionIndex(t);this.d_selection[o]=D(this.modelValue[o]).slice(0,n+1),this.$emit("update:selection",this.d_selection),this.$emit("selection-change",{originalEvent:e,value:this.d_selection})}else this.changeFocusedOptionIndex(0,t);e.preventDefault()},onEndKey:function(e,t){var o=this.findAllItems(t);if(e.ctrlKey&&e.shiftKey){var n="sourceList"===t?0:1,i=this.findMatchedOptionIndex(t);this.d_selection[n]=D(this.modelValue[n]).slice(i,o.length),this.$emit("update:selection",this.d_selection),this.$emit("selection-change",{originalEvent:e,value:this.d_selection})}else this.changeFocusedOptionIndex(o.length-1,t);e.preventDefault()},findAllItems:function(e){return u.DomHandler.find(this.$refs[e].$el,'[data-pc-section="item"]')},findFocusedItem:function(e){return u.DomHandler.findSingle(this.$refs[e].$el,'[data-pc-section="item"][id='.concat(this.focusedOptionIndex,"]"))},findCurrentFocusedIndex:function(e){this.focusedOptionIndex=this.findFirstSelectedOptionIndex(e),this.autoOptionFocus&&-1===this.focusedOptionIndex&&(this.focusedOptionIndex=this.findFirstFocusedOptionIndex(e)),this.scrollInView(this.focusedOptionIndex,e)},findFirstFocusedOptionIndex:function(e){var t=u.DomHandler.findSingle(this.$refs[e].$el,'[data-pc-section="item"]');return u.DomHandler.getAttribute(t,"id")},findFirstSelectedOptionIndex:function(e){if(this.hasSelectedOption(e)){var t=u.DomHandler.findSingle(this.$refs[e].$el,'[data-p-highlight="true"]');return u.DomHandler.getAttribute(t,"id")}return-1},findLastSelectedOptionIndex:function(e){if(this.hasSelectedOption(e)){var t=u.DomHandler.find(this.$refs[e].$el,'[data-p-highlight="true"]');return u.ObjectUtils.findIndexInList(t[t.length-1],this.list.children)}return-1},findMatchedOptionIndex:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.focusedOptionIndex;return D(this.findAllItems(e)).findIndex((function(e){return e.id===t}))},findNextOptionIndex:function(e){var t=this.findMatchedOptionIndex(e);return t>-1?t+1:0},findPrevOptionIndex:function(e){var t=this.findMatchedOptionIndex(e);return t>-1?t-1:0},changeFocusedOptionIndex:function(e,t){var o=this.findAllItems(t),n=e>=o.length?o.length-1:e<0?0:e;this.focusedOptionIndex=o[n].getAttribute("id"),this.scrollInView(o[n].getAttribute("id"),t)},scrollInView:function(e,t){var o=u.DomHandler.findSingle(this.$refs[t].$el,'[data-pc-section="item"][id="'.concat(e,'"]'));o&&o.scrollIntoView&&o.scrollIntoView({block:"nearest",inline:"start"})},updateListScroll:function(e){var t=u.DomHandler.find(e,'[data-pc-section="item"][data-p-highlight="true"]');if(t&&t.length)switch(this.reorderDirection){case"up":u.DomHandler.scrollInView(e,t[0]);break;case"top":e.scrollTop=0;break;case"down":u.DomHandler.scrollInView(e,t[t.length-1]);break;case"bottom":e.scrollTop=e.scrollHeight}},initMedia:function(){this.media=window.matchMedia("(max-width: ".concat(this.breakpoint,")")),this.viewChanged=this.media.matches,this.bindMediaChangeListener()},destroyMedia:function(){this.unbindMediaChangeListener()},bindMediaChangeListener:function(){var e=this;this.media&&!this.mediaChangeListener&&(this.mediaChangeListener=function(t){e.viewChanged=t.matches},this.media.addEventListener("change",this.mediaChangeListener))},unbindMediaChangeListener:function(){this.media&&this.mediaChangeListener&&(this.media.removeEventListener("change",this.mediaChangeListener),this.mediaChangeListener=null)},createStyle:function(){if(!this.styleElement&&!this.isUnstyled){var e;this.$el.setAttribute(this.attributeSelector,""),this.styleElement=document.createElement("style"),this.styleElement.type="text/css",u.DomHandler.setAttribute(this.styleElement,"nonce",null===(e=this.$primevue)||void 0===e||null===(e=e.config)||void 0===e||null===(e=e.csp)||void 0===e?void 0:e.nonce),document.head.appendChild(this.styleElement);var t="\n@media screen and (max-width: ".concat(this.breakpoint,") {\n .p-picklist[").concat(this.attributeSelector,"] {\n flex-direction: column;\n }\n\n .p-picklist[").concat(this.attributeSelector,"] .p-picklist-buttons {\n padding: var(--content-padding);\n flex-direction: row;\n }\n\n .p-picklist[").concat(this.attributeSelector,"] .p-picklist-buttons .p-button {\n margin-right: var(--inline-spacing);\n margin-bottom: 0;\n }\n\n .p-picklist[").concat(this.attributeSelector,"] .p-picklist-buttons .p-button:last-child {\n margin-right: 0;\n }\n}\n");this.styleElement.innerHTML=t}},destroyStyle:function(){this.styleElement&&(document.head.removeChild(this.styleElement),this.styleElement=null)},moveDisabled:function(e){if(!this.d_selection[e]||!this.d_selection[e].length)return!0},moveAllDisabled:function(e){return u.ObjectUtils.isEmpty(this[e])},hasSelectedOption:function(e){return u.ObjectUtils.isNotEmpty("sourceList"===e?this.d_selection[0]:this.d_selection[1])}},computed:{idSource:function(){return"".concat(this.id,"_source")},idTarget:function(){return"".concat(this.id,"_target")},focusedOptionId:function(){return-1!==this.focusedOptionIndex?this.focusedOptionIndex:null},sourceList:function(){return this.modelValue&&this.modelValue[0]?this.modelValue[0]:null},targetList:function(){return this.modelValue&&this.modelValue[1]?this.modelValue[1]:null},attributeSelector:function(){return u.UniqueComponentId()},moveUpAriaLabel:function(){return this.$primevue.config.locale.aria?this.$primevue.config.locale.aria.moveUp:void 0},moveTopAriaLabel:function(){return this.$primevue.config.locale.aria?this.$primevue.config.locale.aria.moveTop:void 0},moveDownAriaLabel:function(){return this.$primevue.config.locale.aria?this.$primevue.config.locale.aria.moveDown:void 0},moveBottomAriaLabel:function(){return this.$primevue.config.locale.aria?this.$primevue.config.locale.aria.moveBottom:void 0},moveToTargetAriaLabel:function(){return this.$primevue.config.locale.aria?this.$primevue.config.locale.aria.moveToTarget:void 0},moveAllToTargetAriaLabel:function(){return this.$primevue.config.locale.aria?this.$primevue.config.locale.aria.moveAllToTarget:void 0},moveToSourceAriaLabel:function(){return this.$primevue.config.locale.aria?this.$primevue.config.locale.aria.moveToSource:void 0},moveAllToSourceAriaLabel:function(){return this.$primevue.config.locale.aria?this.$primevue.config.locale.aria.moveAllToSource:void 0}},components:{PLButton:f.default,AngleRightIcon:L.default,AngleLeftIcon:w.default,AngleDownIcon:I.default,AngleUpIcon:x.default,AngleDoubleRightIcon:b.default,AngleDoubleLeftIcon:g.default,AngleDoubleDownIcon:v.default,AngleDoubleUpIcon:y.default},directives:{ripple:S.default}};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 V(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),o.push.apply(o,n)}return o}function P(e){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?V(Object(o),!0).forEach((function(t){_(e,t,o[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):V(Object(o)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(o,t))}))}return e}function _(e,t,o){var n;return(t="symbol"==A(n=E(t,"string"))?n:String(n))in e?Object.defineProperty(e,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[t]=o,e}function E(e,t){if("object"!=A(e)||!e)return e;var o=e[Symbol.toPrimitive];if(void 0!==o){var n=o.call(e,t||"default");if("object"!=A(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}var M=["id","onClick","onDblclick","onMousedown","onMousemove","aria-selected","data-p-highlight","data-p-focused"],U=["id","onClick","onDblclick","onMousedown","onMousemove","aria-selected","data-p-highlight","data-p-focused"];return B.render=function(e,t,o,n,i,r){var s=p.resolveComponent("AngleUpIcon"),l=p.resolveComponent("PLButton"),a=p.resolveComponent("AngleDoubleUpIcon"),c=p.resolveComponent("AngleDownIcon"),u=p.resolveComponent("AngleDoubleDownIcon"),d=p.resolveDirective("ripple");return p.openBlock(),p.createElementBlock("div",p.mergeProps({class:e.cx("root")},e.ptm("root")),[e.showSourceControls?(p.openBlock(),p.createElementBlock("div",p.mergeProps({key:0,class:e.cx("sourceControls")},e.ptm("sourceControls"),{"data-pc-group-section":"controls"}),[p.renderSlot(e.$slots,"sourcecontrolsstart"),p.createVNode(l,p.mergeProps({"aria-label":r.moveUpAriaLabel,disabled:r.moveDisabled(0),type:"button",onClick:t[0]||(t[0]=function(e){return r.moveUp(e,0)})},e.moveUpButtonProps,{pt:e.ptm("sourceMoveUpButton"),unstyled:e.unstyled,"data-pc-section":"sourcemoveupbutton"}),{icon:p.withCtx((function(){return[p.renderSlot(e.$slots,"moveupicon",{},(function(){return[p.createVNode(s,p.mergeProps(e.ptm("sourceMoveUpButton").icon,{"data-pc-section":"moveupicon"}),null,16)]}))]})),_:3},16,["aria-label","disabled","pt","unstyled"]),p.createVNode(l,p.mergeProps({"aria-label":r.moveTopAriaLabel,disabled:r.moveDisabled(0),type:"button",onClick:t[1]||(t[1]=function(e){return r.moveTop(e,0)})},e.moveTopButtonProps,{pt:e.ptm("sourceMoveTopButton"),unstyled:e.unstyled,"data-pc-section":"sourcemovetopbutton"}),{icon:p.withCtx((function(){return[p.renderSlot(e.$slots,"movetopicon",{},(function(){return[p.createVNode(a,p.mergeProps(e.ptm("sourceMoveTopButton").icon,{"data-pc-section":"movetopicon"}),null,16)]}))]})),_:3},16,["aria-label","disabled","pt","unstyled"]),p.createVNode(l,p.mergeProps({"aria-label":r.moveDownAriaLabel,disabled:r.moveDisabled(0),type:"button",onClick:t[2]||(t[2]=function(e){return r.moveDown(e,0)})},e.moveDownButtonProps,{pt:e.ptm("sourceMoveDownButton"),unstyled:e.unstyled,"data-pc-section":"sourcemovedownbutton"}),{icon:p.withCtx((function(){return[p.renderSlot(e.$slots,"movedownicon",{},(function(){return[p.createVNode(c,p.mergeProps(e.ptm("sourceMoveDownButton").icon,{"data-pc-section":"movedownicon"}),null,16)]}))]})),_:3},16,["aria-label","disabled","pt","unstyled"]),p.createVNode(l,p.mergeProps({"aria-label":r.moveBottomAriaLabel,disabled:r.moveDisabled(0),type:"button",onClick:t[3]||(t[3]=function(e){return r.moveBottom(e,0)})},e.moveBottomButtonProps,{pt:e.ptm("sourceMoveBottomButton"),unstyled:e.unstyled,"data-pc-section":"sourcemovebottombutton"}),{icon:p.withCtx((function(){return[p.renderSlot(e.$slots,"movebottomicon",{},(function(){return[p.createVNode(u,p.mergeProps(e.ptm("sourceMoveBottomButton").icon,{"data-pc-section":"movebottomicon"}),null,16)]}))]})),_:3},16,["aria-label","disabled","pt","unstyled"]),p.renderSlot(e.$slots,"sourcecontrolsend")],16)):p.createCommentVNode("",!0),p.createElementVNode("div",p.mergeProps({class:e.cx("sourceWrapper")},e.ptm("sourceWrapper"),{"data-pc-group-section":"listwrapper"}),[e.$slots.sourceheader?(p.openBlock(),p.createElementBlock("div",p.mergeProps({key:0,class:e.cx("sourceHeader")},e.ptm("sourceHeader"),{"data-pc-group-section":"header"}),[p.renderSlot(e.$slots,"sourceheader")],16)):p.createCommentVNode("",!0),p.createVNode(p.TransitionGroup,p.mergeProps({ref:"sourceList",id:r.idSource+"_list",name:"p-picklist-flip",tag:"ul",class:e.cx("sourceList"),style:e.listStyle,role:"listbox","aria-multiselectable":"true","aria-activedescendant":i.focused.sourceList?r.focusedOptionId:void 0,tabindex:r.sourceList&&r.sourceList.length>0?e.tabindex:-1,onFocus:t[5]||(t[5]=function(e){return r.onListFocus(e,"sourceList")}),onBlur:t[6]||(t[6]=function(e){return r.onListBlur(e,"sourceList")}),onKeydown:t[7]||(t[7]=function(e){return r.onItemKeyDown(e,"sourceList")})},P(P(P({},e.sourceListProps),e.ptm("sourceList")),e.ptm("transition")),{"data-pc-group-section":"list"}),{default:p.withCtx((function(){return[(p.openBlock(!0),p.createElementBlock(p.Fragment,null,p.renderList(r.sourceList,(function(o,n){return p.withDirectives((p.openBlock(),p.createElementBlock("li",p.mergeProps({key:r.getItemKey(o,n),id:r.idSource+"_"+n,class:e.cx("item",{item:o,id:"".concat(r.idSource,"_").concat(n),listIndex:0}),onClick:function(e){return r.onItemClick(e,o,n,0)},onDblclick:function(e){return r.onItemDblClick(e,o,0)},onTouchend:t[4]||(t[4]=function(){return r.onItemTouchEnd&&r.onItemTouchEnd.apply(r,arguments)}),onMousedown:function(e){return r.onOptionMouseDown(e,n,"sourceList")},onMousemove:function(e){return r.onOptionMouseMove(n,"sourceList")},role:"option","aria-selected":r.isSelected(o,0)},r.getPTOptions(o,"item","".concat(r.idSource,"_").concat(n),0),{"data-p-highlight":r.isSelected(o,0),"data-p-focused":"".concat(r.idSource,"_").concat(n)===r.focusedOptionId}),[p.renderSlot(e.$slots,"item",{item:o,index:n})],16,M)),[[d]])})),128))]})),_:3},16,["id","class","style","aria-activedescendant","tabindex"])],16),p.createElementVNode("div",p.mergeProps({class:e.cx("buttons")},e.ptm("buttons"),{"data-pc-group-section":"controls"}),[p.renderSlot(e.$slots,"movecontrolsstart"),p.createVNode(l,p.mergeProps({"aria-label":r.moveToTargetAriaLabel,type:"button",onClick:r.moveToTarget,disabled:r.moveDisabled(0)},e.moveToTargetProps,{pt:e.ptm("moveToTargetButton"),unstyled:e.unstyled,"data-pc-section":"movetotargetbuton"}),{icon:p.withCtx((function(){return[p.renderSlot(e.$slots,"movetotargeticon",{viewChanged:i.viewChanged},(function(){return[(p.openBlock(),p.createBlock(p.resolveDynamicComponent(i.viewChanged?"AngleDownIcon":"AngleRightIcon"),p.mergeProps(e.ptm("moveToTargetButton").icon,{"data-pc-section":"movetotargeticon"}),null,16))]}))]})),_:3},16,["aria-label","onClick","disabled","pt","unstyled"]),p.createVNode(l,p.mergeProps({"aria-label":r.moveAllToTargetAriaLabel,type:"button",onClick:r.moveAllToTarget,disabled:r.moveAllDisabled("sourceList")},e.moveAllToTargetProps,{pt:e.ptm("moveAllToTargetButton"),unstyled:e.unstyled,"data-pc-section":"movealltotargetbuton"}),{icon:p.withCtx((function(){return[p.renderSlot(e.$slots,"movealltotargeticon",{viewChanged:i.viewChanged},(function(){return[(p.openBlock(),p.createBlock(p.resolveDynamicComponent(i.viewChanged?"AngleDoubleDownIcon":"AngleDoubleRightIcon"),p.mergeProps(e.ptm("moveAllToTargetButton").icon,{"data-pc-section":"movealltotargeticon"}),null,16))]}))]})),_:3},16,["aria-label","onClick","disabled","pt","unstyled"]),p.createVNode(l,p.mergeProps({"aria-label":r.moveToSourceAriaLabel,type:"button",onClick:r.moveToSource,disabled:r.moveDisabled(1)},e.moveToSourceProps,{pt:e.ptm("moveToSourceButton"),unstyled:e.unstyled,"data-pc-section":"movetosourcebuton"}),{icon:p.withCtx((function(){return[p.renderSlot(e.$slots,"movetosourceicon",{viewChanged:i.viewChanged},(function(){return[(p.openBlock(),p.createBlock(p.resolveDynamicComponent(i.viewChanged?"AngleUpIcon":"AngleLeftIcon"),p.mergeProps(e.ptm("moveToSourceButton").icon,{"data-pc-section":"movetosourceicon"}),null,16))]}))]})),_:3},16,["aria-label","onClick","disabled","pt","unstyled"]),p.createVNode(l,p.mergeProps({"aria-label":r.moveAllToSourceAriaLabel,type:"button",onClick:r.moveAllToSource,disabled:r.moveAllDisabled("targetList")},e.moveAllToSourceProps,{pt:e.ptm("moveAllToSourceButton"),"data-pc-section":"movealltosourcebuton",unstyled:e.unstyled}),{icon:p.withCtx((function(){return[p.renderSlot(e.$slots,"movealltosourceicon",{viewChanged:i.viewChanged},(function(){return[(p.openBlock(),p.createBlock(p.resolveDynamicComponent(i.viewChanged?"AngleDoubleUpIcon":"AngleDoubleLeftIcon"),p.mergeProps(e.ptm("moveAllToSourceButton").icon,{"data-pc-section":"movealltosourceicon"}),null,16))]}))]})),_:3},16,["aria-label","onClick","disabled","pt","unstyled"]),p.renderSlot(e.$slots,"movecontrolsend")],16),p.createElementVNode("div",p.mergeProps({class:e.cx("targetWrapper")},e.ptm("targetWrapper"),{"data-pc-group-section":"listwrapper"}),[e.$slots.targetheader?(p.openBlock(),p.createElementBlock("div",p.mergeProps({key:0,class:e.cx("targetHeader")},e.ptm("targetHeader"),{"data-pc-group-section":"header"}),[p.renderSlot(e.$slots,"targetheader")],16)):p.createCommentVNode("",!0),p.createVNode(p.TransitionGroup,p.mergeProps({ref:"targetList",id:r.idTarget+"_list",name:"p-picklist-flip",tag:"ul",class:e.cx("targetList"),style:e.listStyle,role:"listbox","aria-multiselectable":"true","aria-activedescendant":i.focused.targetList?r.focusedOptionId:void 0,tabindex:r.targetList&&r.targetList.length>0?e.tabindex:-1,onFocus:t[10]||(t[10]=function(e){return r.onListFocus(e,"targetList")}),onBlur:t[11]||(t[11]=function(e){return r.onListBlur(e,"targetList")}),onKeydown:t[12]||(t[12]=function(e){return r.onItemKeyDown(e,"targetList")})},P(P(P({},e.targetListProps),e.ptm("targetList")),e.ptm("transition")),{"data-pc-group-section":"list"}),{default:p.withCtx((function(){return[(p.openBlock(!0),p.createElementBlock(p.Fragment,null,p.renderList(r.targetList,(function(o,n){return p.withDirectives((p.openBlock(),p.createElementBlock("li",p.mergeProps({key:r.getItemKey(o,n),id:r.idTarget+"_"+n,class:e.cx("item",{item:o,id:"".concat(r.idTarget,"_").concat(n),listIndex:1}),onClick:function(e){return r.onItemClick(e,o,n,1)},onDblclick:function(e){return r.onItemDblClick(e,o,1)},onKeydown:t[8]||(t[8]=function(e){return r.onItemKeyDown(e,"targetList")}),onMousedown:function(e){return r.onOptionMouseDown(e,n,"targetList")},onMousemove:function(e){return r.onOptionMouseMove(n,"targetList")},onTouchend:t[9]||(t[9]=function(){return r.onItemTouchEnd&&r.onItemTouchEnd.apply(r,arguments)}),role:"option","aria-selected":r.isSelected(o,1)},r.getPTOptions(o,"item","".concat(r.idTarget,"_").concat(n),1),{"data-p-highlight":r.isSelected(o,1),"data-p-focused":"".concat(r.idTarget,"_").concat(n)===r.focusedOptionId}),[p.renderSlot(e.$slots,"item",{item:o,index:n})],16,U)),[[d]])})),128))]})),_:3},16,["id","class","style","aria-activedescendant","tabindex"])],16),e.showTargetControls?(p.openBlock(),p.createElementBlock("div",p.mergeProps({key:1,class:e.cx("targetControls")},e.ptm("targetControls"),{"data-pc-group-section":"controls"}),[p.renderSlot(e.$slots,"targetcontrolsstart"),p.createVNode(l,p.mergeProps({"aria-label":r.moveUpAriaLabel,disabled:r.moveDisabled(1),type:"button",onClick:t[13]||(t[13]=function(e){return r.moveUp(e,1)})},e.moveUpButtonProps,{pt:e.ptm("targetMoveUpButton"),unstyled:e.unstyled,"data-pc-section":"targetmoveupbutton"}),{icon:p.withCtx((function(){return[p.renderSlot(e.$slots,"moveupicon",{},(function(){return[p.createVNode(s,p.mergeProps(e.ptm("targetMoveUpButton").icon,{"data-pc-section":"moveupicon"}),null,16)]}))]})),_:3},16,["aria-label","disabled","pt","unstyled"]),p.createVNode(l,p.mergeProps({"aria-label":r.moveTopAriaLabel,disabled:r.moveDisabled(1),type:"button",onClick:t[14]||(t[14]=function(e){return r.moveTop(e,1)})},e.moveTopButtonProps,{pt:e.ptm("targetMoveTopButton"),unstyled:e.unstyled,"data-pc-section":"targetmovetopbutton"}),{icon:p.withCtx((function(){return[p.renderSlot(e.$slots,"movetopicon",{},(function(){return[p.createVNode(a,p.mergeProps(e.ptm("targetMoveTopButton").icon,{"data-pc-section":"movetopicon"}),null,16)]}))]})),_:3},16,["aria-label","disabled","pt","unstyled"]),p.createVNode(l,p.mergeProps({"aria-label":r.moveDownAriaLabel,disabled:r.moveDisabled(1),type:"button",onClick:t[15]||(t[15]=function(e){return r.moveDown(e,1)})},e.moveDownButtonProps,{pt:e.ptm("targetMoveDownButton"),unstyled:e.unstyled,"data-pc-section":"targetmovedownbutton"}),{icon:p.withCtx((function(){return[p.renderSlot(e.$slots,"movedownicon",{},(function(){return[p.createVNode(c,p.mergeProps(e.ptm("targetMoveDownButton").icon,{"data-pc-section":"movedownicon"}),null,16)]}))]})),_:3},16,["aria-label","disabled","pt","unstyled"]),p.createVNode(l,p.mergeProps({"aria-label":r.moveBottomAriaLabel,disabled:r.moveDisabled(1),type:"button",onClick:t[16]||(t[16]=function(e){return r.moveBottom(e,1)})},e.moveBottomButtonProps,{pt:e.ptm("targetMoveBottomButton"),unstyled:e.unstyled,"data-pc-section":"targetmovebottombutton"}),{icon:p.withCtx((function(){return[p.renderSlot(e.$slots,"movebottomicon",{},(function(){return[p.createVNode(u,p.mergeProps(e.ptm("targetMoveBottomButton").icon,{"data-pc-section":"movebottomicon"}),null,16)]}))]})),_:3},16,["aria-label","disabled","pt","unstyled"]),p.renderSlot(e.$slots,"targetcontrolsend")],16)):p.createCommentVNode("",!0)],16)},B}(primevue.button,primevue.icons.angledoubledown,primevue.icons.angledoubleleft,primevue.icons.angledoubleright,primevue.icons.angledoubleup,primevue.icons.angledown,primevue.icons.angleleft,primevue.icons.angleright,primevue.icons.angleup,primevue.ripple,primevue.utils,primevue.basecomponent,primevue.picklist.style,Vue);
1
+ this.primevue=this.primevue||{},this.primevue.picklist=function(e,t,o,n,i,r,s,l,a,c,u,d,m,p){"use strict";function h(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var f=h(e),v=h(t),g=h(o),b=h(n),y=h(i),I=h(r),w=h(s),L=h(l),x=h(a),S=h(c);function D(e){return C(e)||O(e)||$(e)||T()}function T(){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 $(e,t){if(e){if("string"==typeof e)return k(e,t);var o=Object.prototype.toString.call(e).slice(8,-1);return"Object"===o&&e.constructor&&(o=e.constructor.name),"Map"===o||"Set"===o?Array.from(e):"Arguments"===o||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(o)?k(e,t):void 0}}function O(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function C(e){if(Array.isArray(e))return k(e)}function k(e,t){(null==t||t>e.length)&&(t=e.length);for(var o=0,n=new Array(t);o<t;o++)n[o]=e[o];return n}var B={name:"PickList",extends:{name:"BasePickList",extends:h(d).default,props:{modelValue:{type:Array,default:function(){return[[],[]]}},selection:{type:Array,default:function(){return[[],[]]}},dataKey:{type:String,default:null},listStyle:{type:null,default:null},metaKeySelection:{type:Boolean,default:!1},autoOptionFocus:{type:Boolean,default:!0},focusOnHover:{type:Boolean,default:!0},responsive:{type:Boolean,default:!0},breakpoint:{type:String,default:"960px"},stripedRows:{type:Boolean,default:!1},showSourceControls:{type:Boolean,default:!0},showTargetControls:{type:Boolean,default:!0},targetListProps:{type:null,default:null},sourceListProps:{type:null,default:null},moveUpButtonProps:{type:null,default:null},moveTopButtonProps:{type:null,default:null},moveDownButtonProps:{type:null,default:null},moveBottomButtonProps:{type:null,default:null},moveToTargetProps:{type:null,default:null},moveAllToTargetProps:{type:null,default:null},moveToSourceProps:{type:null,default:null},moveAllToSourceProps:{type:null,default:null},tabindex:{type:Number,default:0}},style:h(m).default,provide:function(){return{$parentInstance:this}}},emits:["update:modelValue","reorder","update:selection","selection-change","move-to-target","move-to-source","move-all-to-target","move-all-to-source","focus","blur"],itemTouched:!1,reorderDirection:null,styleElement:null,media:null,mediaChangeListener:null,data:function(){return{id:this.$attrs.id,d_selection:this.selection,focused:{sourceList:!1,targetList:!1},focusedOptionIndex:-1,viewChanged:!1}},watch:{"$attrs.id":function(e){this.id=e||u.UniqueComponentId()},selection:function(e){this.d_selection=e},breakpoint:function(){this.destroyMedia(),this.initMedia()}},updated:function(){this.reorderDirection&&(this.updateListScroll(this.$refs.sourceList.$el),this.updateListScroll(this.$refs.targetList.$el),this.reorderDirection=null)},beforeUnmount:function(){this.destroyStyle(),this.destroyMedia()},mounted:function(){this.id=this.id||u.UniqueComponentId(),this.responsive&&(this.createStyle(),this.initMedia())},methods:{getItemKey:function(e,t){return this.dataKey?u.ObjectUtils.resolveFieldData(e,this.dataKey):t},getPTOptions:function(e,t,o,n){return this.ptm(t,{context:{active:this.isSelected(e,n),focused:o===this.focusedOptionId}})},isSelected:function(e,t){return-1!=u.ObjectUtils.findIndexInList(e,this.d_selection[t])},onListFocus:function(e,t){this.focused[t]=!0,this.findCurrentFocusedIndex(t),this.scrollInView(this.focusedOptionIndex,t),this.$emit("focus",e)},onListBlur:function(e,t){this.focused[t]=!1,this.focusedOptionIndex=-1,this.$emit("blur",e)},onOptionMouseDown:function(e,t,o){this.focused[o]=!0,this.focusedOptionIndex=t},onOptionMouseMove:function(e,t){this.focusOnHover&&this.focused[t]&&this.changeFocusedOptionIndex(e,t)},moveUp:function(e,t){if(this.d_selection&&this.d_selection[t]){for(var o=D(this.modelValue[t]),n=this.d_selection[t],i=0;i<n.length;i++){var r=u.ObjectUtils.findIndexInList(n[i],o);if(0===r)break;var s=o[r-1];o[r-1]=o[r],o[r]=s}var l=D(this.modelValue);l[t]=o,this.reorderDirection="up",this.$emit("update:modelValue",l),this.$emit("reorder",{originalEvent:e,value:l,direction:this.reorderDirection,listIndex:t})}},moveTop:function(e,t){if(this.d_selection){for(var o=D(this.modelValue[t]),n=this.d_selection[t],i=0;i<n.length;i++){var r=u.ObjectUtils.findIndexInList(n[i],o);if(0===r)break;var s=o.splice(r,1)[0];o.unshift(s)}var l=D(this.modelValue);l[t]=o,this.reorderDirection="top",this.$emit("update:modelValue",l),this.$emit("reorder",{originalEvent:e,value:l,direction:this.reorderDirection,listIndex:t})}},moveDown:function(e,t){if(this.d_selection){for(var o=D(this.modelValue[t]),n=this.d_selection[t],i=n.length-1;i>=0;i--){var r=u.ObjectUtils.findIndexInList(n[i],o);if(r===o.length-1)break;var s=o[r+1];o[r+1]=o[r],o[r]=s}var l=D(this.modelValue);l[t]=o,this.reorderDirection="down",this.$emit("update:modelValue",l),this.$emit("reorder",{originalEvent:e,value:l,direction:this.reorderDirection,listIndex:t})}},moveBottom:function(e,t){if(this.d_selection){for(var o=D(this.modelValue[t]),n=this.d_selection[t],i=n.length-1;i>=0;i--){var r=u.ObjectUtils.findIndexInList(n[i],o);if(r===o.length-1)break;var s=o.splice(r,1)[0];o.push(s)}var l=D(this.modelValue);l[t]=o,this.reorderDirection="bottom",this.$emit("update:modelValue",l),this.$emit("reorder",{originalEvent:e,value:l,direction:this.reorderDirection,listIndex:t})}},moveToTarget:function(e){var t=this.d_selection&&this.d_selection[0]?this.d_selection[0]:null,o=D(this.modelValue[0]),n=D(this.modelValue[1]);if(t){for(var i=0;i<t.length;i++){var r=t[i];-1==u.ObjectUtils.findIndexInList(r,n)&&n.push(o.splice(u.ObjectUtils.findIndexInList(r,o),1)[0])}var s=D(this.modelValue);s[0]=o,s[1]=n,this.$emit("update:modelValue",s),this.$emit("move-to-target",{originalEvent:e,items:D(new Set(t))}),this.d_selection[0]=[],this.$emit("update:selection",this.d_selection),this.$emit("selection-change",{originalEvent:e,value:this.d_selection})}},moveAllToTarget:function(e){if(this.modelValue[0]){var t=D(this.modelValue[0]),o=D(this.modelValue[1]);this.$emit("move-all-to-target",{originalEvent:e,items:t}),o=[].concat(D(o),D(t)),t=[];var n=D(this.modelValue);n[0]=t,n[1]=o,this.$emit("update:modelValue",n),this.d_selection[0]=[],this.$emit("update:selection",this.d_selection),this.$emit("selection-change",{originalEvent:e,value:this.d_selection})}},moveToSource:function(e){var t=this.d_selection&&this.d_selection[1]?this.d_selection[1]:null,o=D(this.modelValue[0]),n=D(this.modelValue[1]);if(t){for(var i=0;i<t.length;i++){var r=t[i];-1==u.ObjectUtils.findIndexInList(r,o)&&o.push(n.splice(u.ObjectUtils.findIndexInList(r,n),1)[0])}var s=D(this.modelValue);s[0]=o,s[1]=n,this.$emit("update:modelValue",s),this.$emit("move-to-source",{originalEvent:e,items:D(new Set(t))}),this.d_selection[1]=[],this.$emit("update:selection",this.d_selection),this.$emit("selection-change",{originalEvent:e,value:this.d_selection})}},moveAllToSource:function(e){if(this.modelValue[1]){var t=D(this.modelValue[0]),o=D(this.modelValue[1]);this.$emit("move-all-to-source",{originalEvent:e,items:o}),t=[].concat(D(t),D(o)),o=[];var n=D(this.modelValue);n[0]=t,n[1]=o,this.$emit("update:modelValue",n),this.d_selection[1]=[],this.$emit("update:selection",this.d_selection),this.$emit("selection-change",{originalEvent:e,value:this.d_selection})}},onItemClick:function(e,t,o,n){var i=0===n?"sourceList":"targetList";this.itemTouched=!1;var r,s=this.d_selection[n],l=u.ObjectUtils.findIndexInList(t,s),a=-1!=l,c=!this.itemTouched&&this.metaKeySelection,d=u.DomHandler.find(this.$refs[i].$el,'[data-pc-section="item"]')[o].getAttribute("id");if(this.focusedOptionIndex=d,c){var m=e.metaKey||e.ctrlKey;a&&m?r=s.filter((function(e,t){return t!==l})):(r=m&&s?D(s):[]).push(t)}else a?r=s.filter((function(e,t){return t!==l})):(r=s?D(s):[]).push(t);var p=D(this.d_selection);p[n]=r,this.d_selection=p,this.$emit("update:selection",this.d_selection),this.$emit("selection-change",{originalEvent:e,value:this.d_selection})},onItemDblClick:function(e,t,o){0===o?this.moveToTarget(e):1===o&&this.moveToSource(e)},onItemTouchEnd:function(){this.itemTouched=!0},onItemKeyDown:function(e,t){switch(e.code){case"ArrowDown":this.onArrowDownKey(e,t);break;case"ArrowUp":this.onArrowUpKey(e,t);break;case"Home":this.onHomeKey(e,t);break;case"End":this.onEndKey(e,t);break;case"Enter":case"NumpadEnter":this.onEnterKey(e,t);break;case"Space":this.onSpaceKey(e,t);break;case"KeyA":e.ctrlKey&&(this.d_selection=D(this.modelValue),this.$emit("update:selection",this.d_selection),e.preventDefault())}},onArrowDownKey:function(e,t){var o=-1!==this.focusedOptionIndex?this.findNextOptionIndex(t):this.findFirstSelectedOptionIndex(t);this.changeFocusedOptionIndex(o,t),e.shiftKey&&this.onEnterKey(e,t),e.preventDefault()},onArrowUpKey:function(e,t){var o=-1!==this.focusedOptionIndex?this.findPrevOptionIndex(t):this.findLastSelectedOptionIndex(t);this.changeFocusedOptionIndex(o,t),e.shiftKey&&this.onEnterKey(e,t),e.preventDefault()},onEnterKey:function(e,t){var o="sourceList"===t?0:1,n=this.findMatchedOptionIndex(t);this.onItemClick(e,this.modelValue[o][n],n,o),e.preventDefault()},onSpaceKey:function(e,t){if(e.preventDefault(),e.shiftKey&&this.d_selection&&this.d_selection.length>0){var o="sourceList"===t?0:1,n=u.ObjectUtils.findIndexInList(this.d_selection[o][0],D(this.modelValue[o])),i=this.findMatchedOptionIndex(t);this.d_selection[o]=D(this.modelValue[o]).slice(Math.min(n,i),Math.max(n,i)+1),this.$emit("update:selection",this.d_selection),this.$emit("selection-change",{originalEvent:e,value:this.d_selection})}else this.onEnterKey(e,t)},onHomeKey:function(e,t){if(e.ctrlKey&&e.shiftKey){var o="sourceList"===t?0:1,n=this.findMatchedOptionIndex(t);this.d_selection[o]=D(this.modelValue[o]).slice(0,n+1),this.$emit("update:selection",this.d_selection),this.$emit("selection-change",{originalEvent:e,value:this.d_selection})}else this.changeFocusedOptionIndex(0,t);e.preventDefault()},onEndKey:function(e,t){var o=this.findAllItems(t);if(e.ctrlKey&&e.shiftKey){var n="sourceList"===t?0:1,i=this.findMatchedOptionIndex(t);this.d_selection[n]=D(this.modelValue[n]).slice(i,o.length),this.$emit("update:selection",this.d_selection),this.$emit("selection-change",{originalEvent:e,value:this.d_selection})}else this.changeFocusedOptionIndex(o.length-1,t);e.preventDefault()},findAllItems:function(e){return u.DomHandler.find(this.$refs[e].$el,'[data-pc-section="item"]')},findFocusedItem:function(e){return u.DomHandler.findSingle(this.$refs[e].$el,'[data-pc-section="item"][id='.concat(this.focusedOptionIndex,"]"))},findCurrentFocusedIndex:function(e){-1===this.focusedOptionIndex&&(this.focusedOptionIndex=this.findFirstSelectedOptionIndex(e),this.autoOptionFocus&&-1===this.focusedOptionIndex&&(this.focusedOptionIndex=this.findFirstFocusedOptionIndex(e)))},findFirstFocusedOptionIndex:function(e){var t=u.DomHandler.findSingle(this.$refs[e].$el,'[data-pc-section="item"]');return u.DomHandler.getAttribute(t,"id")},findFirstSelectedOptionIndex:function(e){if(this.hasSelectedOption(e)){var t=u.DomHandler.findSingle(this.$refs[e].$el,'[data-p-highlight="true"]');return u.DomHandler.getAttribute(t,"id")}return-1},findLastSelectedOptionIndex:function(e){if(this.hasSelectedOption(e)){var t=u.DomHandler.find(this.$refs[e].$el,'[data-p-highlight="true"]');return u.ObjectUtils.findIndexInList(t[t.length-1],this.list.children)}return-1},findMatchedOptionIndex:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.focusedOptionIndex;return D(this.findAllItems(e)).findIndex((function(e){return e.id===t}))},findNextOptionIndex:function(e){var t=this.findMatchedOptionIndex(e);return t>-1?t+1:0},findPrevOptionIndex:function(e){var t=this.findMatchedOptionIndex(e);return t>-1?t-1:0},changeFocusedOptionIndex:function(e,t){var o=this.findAllItems(t),n=e>=o.length?o.length-1:e<0?0:e;this.focusedOptionIndex=o[n].getAttribute("id"),this.scrollInView(o[n].getAttribute("id"),t)},scrollInView:function(e,t){var o=u.DomHandler.findSingle(this.$refs[t].$el,'[data-pc-section="item"][id="'.concat(e,'"]'));o&&o.scrollIntoView&&o.scrollIntoView({block:"nearest",inline:"start",behavior:"smooth"})},updateListScroll:function(e){var t=u.DomHandler.find(e,'[data-pc-section="item"][data-p-highlight="true"]');if(t&&t.length)switch(this.reorderDirection){case"up":u.DomHandler.scrollInView(e,t[0]);break;case"top":e.scrollTop=0;break;case"down":u.DomHandler.scrollInView(e,t[t.length-1]);break;case"bottom":e.scrollTop=e.scrollHeight}},initMedia:function(){this.media=window.matchMedia("(max-width: ".concat(this.breakpoint,")")),this.viewChanged=this.media.matches,this.bindMediaChangeListener()},destroyMedia:function(){this.unbindMediaChangeListener()},bindMediaChangeListener:function(){var e=this;this.media&&!this.mediaChangeListener&&(this.mediaChangeListener=function(t){e.viewChanged=t.matches},this.media.addEventListener("change",this.mediaChangeListener))},unbindMediaChangeListener:function(){this.media&&this.mediaChangeListener&&(this.media.removeEventListener("change",this.mediaChangeListener),this.mediaChangeListener=null)},createStyle:function(){if(!this.styleElement&&!this.isUnstyled){var e;this.$el.setAttribute(this.attributeSelector,""),this.styleElement=document.createElement("style"),this.styleElement.type="text/css",u.DomHandler.setAttribute(this.styleElement,"nonce",null===(e=this.$primevue)||void 0===e||null===(e=e.config)||void 0===e||null===(e=e.csp)||void 0===e?void 0:e.nonce),document.head.appendChild(this.styleElement);var t="\n@media screen and (max-width: ".concat(this.breakpoint,") {\n .p-picklist[").concat(this.attributeSelector,"] {\n flex-direction: column;\n }\n\n .p-picklist[").concat(this.attributeSelector,"] .p-picklist-buttons {\n padding: var(--content-padding);\n flex-direction: row;\n }\n\n .p-picklist[").concat(this.attributeSelector,"] .p-picklist-buttons .p-button {\n margin-right: var(--inline-spacing);\n margin-bottom: 0;\n }\n\n .p-picklist[").concat(this.attributeSelector,"] .p-picklist-buttons .p-button:last-child {\n margin-right: 0;\n }\n}\n");this.styleElement.innerHTML=t}},destroyStyle:function(){this.styleElement&&(document.head.removeChild(this.styleElement),this.styleElement=null)},moveDisabled:function(e){if(!this.d_selection[e]||!this.d_selection[e].length)return!0},moveAllDisabled:function(e){return u.ObjectUtils.isEmpty(this[e])},hasSelectedOption:function(e){return u.ObjectUtils.isNotEmpty("sourceList"===e?this.d_selection[0]:this.d_selection[1])}},computed:{idSource:function(){return"".concat(this.id,"_source")},idTarget:function(){return"".concat(this.id,"_target")},focusedOptionId:function(){return-1!==this.focusedOptionIndex?this.focusedOptionIndex:null},sourceList:function(){return this.modelValue&&this.modelValue[0]?this.modelValue[0]:null},targetList:function(){return this.modelValue&&this.modelValue[1]?this.modelValue[1]:null},attributeSelector:function(){return u.UniqueComponentId()},moveUpAriaLabel:function(){return this.$primevue.config.locale.aria?this.$primevue.config.locale.aria.moveUp:void 0},moveTopAriaLabel:function(){return this.$primevue.config.locale.aria?this.$primevue.config.locale.aria.moveTop:void 0},moveDownAriaLabel:function(){return this.$primevue.config.locale.aria?this.$primevue.config.locale.aria.moveDown:void 0},moveBottomAriaLabel:function(){return this.$primevue.config.locale.aria?this.$primevue.config.locale.aria.moveBottom:void 0},moveToTargetAriaLabel:function(){return this.$primevue.config.locale.aria?this.$primevue.config.locale.aria.moveToTarget:void 0},moveAllToTargetAriaLabel:function(){return this.$primevue.config.locale.aria?this.$primevue.config.locale.aria.moveAllToTarget:void 0},moveToSourceAriaLabel:function(){return this.$primevue.config.locale.aria?this.$primevue.config.locale.aria.moveToSource:void 0},moveAllToSourceAriaLabel:function(){return this.$primevue.config.locale.aria?this.$primevue.config.locale.aria.moveAllToSource:void 0}},components:{PLButton:f.default,AngleRightIcon:L.default,AngleLeftIcon:w.default,AngleDownIcon:I.default,AngleUpIcon:x.default,AngleDoubleRightIcon:b.default,AngleDoubleLeftIcon:g.default,AngleDoubleDownIcon:v.default,AngleDoubleUpIcon:y.default},directives:{ripple:S.default}};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 V(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),o.push.apply(o,n)}return o}function P(e){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?V(Object(o),!0).forEach((function(t){_(e,t,o[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):V(Object(o)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(o,t))}))}return e}function _(e,t,o){var n;return(t="symbol"==A(n=E(t,"string"))?n:String(n))in e?Object.defineProperty(e,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[t]=o,e}function E(e,t){if("object"!=A(e)||!e)return e;var o=e[Symbol.toPrimitive];if(void 0!==o){var n=o.call(e,t||"default");if("object"!=A(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}var M=["id","onClick","onDblclick","onMousedown","onMousemove","aria-selected","data-p-highlight","data-p-focused"],U=["id","onClick","onDblclick","onMousedown","onMousemove","aria-selected","data-p-highlight","data-p-focused"];return B.render=function(e,t,o,n,i,r){var s=p.resolveComponent("AngleUpIcon"),l=p.resolveComponent("PLButton"),a=p.resolveComponent("AngleDoubleUpIcon"),c=p.resolveComponent("AngleDownIcon"),u=p.resolveComponent("AngleDoubleDownIcon"),d=p.resolveDirective("ripple");return p.openBlock(),p.createElementBlock("div",p.mergeProps({class:e.cx("root")},e.ptm("root")),[e.showSourceControls?(p.openBlock(),p.createElementBlock("div",p.mergeProps({key:0,class:e.cx("sourceControls")},e.ptm("sourceControls"),{"data-pc-group-section":"controls"}),[p.renderSlot(e.$slots,"sourcecontrolsstart"),p.createVNode(l,p.mergeProps({"aria-label":r.moveUpAriaLabel,disabled:r.moveDisabled(0),type:"button",onClick:t[0]||(t[0]=function(e){return r.moveUp(e,0)})},e.moveUpButtonProps,{pt:e.ptm("sourceMoveUpButton"),unstyled:e.unstyled,"data-pc-section":"sourcemoveupbutton"}),{icon:p.withCtx((function(){return[p.renderSlot(e.$slots,"moveupicon",{},(function(){return[p.createVNode(s,p.mergeProps(e.ptm("sourceMoveUpButton").icon,{"data-pc-section":"moveupicon"}),null,16)]}))]})),_:3},16,["aria-label","disabled","pt","unstyled"]),p.createVNode(l,p.mergeProps({"aria-label":r.moveTopAriaLabel,disabled:r.moveDisabled(0),type:"button",onClick:t[1]||(t[1]=function(e){return r.moveTop(e,0)})},e.moveTopButtonProps,{pt:e.ptm("sourceMoveTopButton"),unstyled:e.unstyled,"data-pc-section":"sourcemovetopbutton"}),{icon:p.withCtx((function(){return[p.renderSlot(e.$slots,"movetopicon",{},(function(){return[p.createVNode(a,p.mergeProps(e.ptm("sourceMoveTopButton").icon,{"data-pc-section":"movetopicon"}),null,16)]}))]})),_:3},16,["aria-label","disabled","pt","unstyled"]),p.createVNode(l,p.mergeProps({"aria-label":r.moveDownAriaLabel,disabled:r.moveDisabled(0),type:"button",onClick:t[2]||(t[2]=function(e){return r.moveDown(e,0)})},e.moveDownButtonProps,{pt:e.ptm("sourceMoveDownButton"),unstyled:e.unstyled,"data-pc-section":"sourcemovedownbutton"}),{icon:p.withCtx((function(){return[p.renderSlot(e.$slots,"movedownicon",{},(function(){return[p.createVNode(c,p.mergeProps(e.ptm("sourceMoveDownButton").icon,{"data-pc-section":"movedownicon"}),null,16)]}))]})),_:3},16,["aria-label","disabled","pt","unstyled"]),p.createVNode(l,p.mergeProps({"aria-label":r.moveBottomAriaLabel,disabled:r.moveDisabled(0),type:"button",onClick:t[3]||(t[3]=function(e){return r.moveBottom(e,0)})},e.moveBottomButtonProps,{pt:e.ptm("sourceMoveBottomButton"),unstyled:e.unstyled,"data-pc-section":"sourcemovebottombutton"}),{icon:p.withCtx((function(){return[p.renderSlot(e.$slots,"movebottomicon",{},(function(){return[p.createVNode(u,p.mergeProps(e.ptm("sourceMoveBottomButton").icon,{"data-pc-section":"movebottomicon"}),null,16)]}))]})),_:3},16,["aria-label","disabled","pt","unstyled"]),p.renderSlot(e.$slots,"sourcecontrolsend")],16)):p.createCommentVNode("",!0),p.createElementVNode("div",p.mergeProps({class:e.cx("sourceWrapper")},e.ptm("sourceWrapper"),{"data-pc-group-section":"listwrapper"}),[e.$slots.sourceheader?(p.openBlock(),p.createElementBlock("div",p.mergeProps({key:0,class:e.cx("sourceHeader")},e.ptm("sourceHeader"),{"data-pc-group-section":"header"}),[p.renderSlot(e.$slots,"sourceheader")],16)):p.createCommentVNode("",!0),p.createVNode(p.TransitionGroup,p.mergeProps({ref:"sourceList",id:r.idSource+"_list",name:"p-picklist-flip",tag:"ul",class:e.cx("sourceList"),style:e.listStyle,role:"listbox","aria-multiselectable":"true","aria-activedescendant":i.focused.sourceList?r.focusedOptionId:void 0,tabindex:r.sourceList&&r.sourceList.length>0?e.tabindex:-1,onFocus:t[5]||(t[5]=function(e){return r.onListFocus(e,"sourceList")}),onBlur:t[6]||(t[6]=function(e){return r.onListBlur(e,"sourceList")}),onKeydown:t[7]||(t[7]=function(e){return r.onItemKeyDown(e,"sourceList")})},P(P(P({},e.sourceListProps),e.ptm("sourceList")),e.ptm("transition")),{"data-pc-group-section":"list"}),{default:p.withCtx((function(){return[(p.openBlock(!0),p.createElementBlock(p.Fragment,null,p.renderList(r.sourceList,(function(o,n){return p.withDirectives((p.openBlock(),p.createElementBlock("li",p.mergeProps({key:r.getItemKey(o,n),id:r.idSource+"_"+n,class:e.cx("item",{item:o,id:"".concat(r.idSource,"_").concat(n),listIndex:0}),onClick:function(e){return r.onItemClick(e,o,n,0)},onDblclick:function(e){return r.onItemDblClick(e,o,0)},onTouchend:t[4]||(t[4]=function(){return r.onItemTouchEnd&&r.onItemTouchEnd.apply(r,arguments)}),onMousedown:function(e){return r.onOptionMouseDown(e,n,"sourceList")},onMousemove:function(e){return r.onOptionMouseMove(n,"sourceList")},role:"option","aria-selected":r.isSelected(o,0)},r.getPTOptions(o,"item","".concat(r.idSource,"_").concat(n),0),{"data-p-highlight":r.isSelected(o,0),"data-p-focused":"".concat(r.idSource,"_").concat(n)===r.focusedOptionId}),[p.renderSlot(e.$slots,"item",{item:o,index:n})],16,M)),[[d]])})),128))]})),_:3},16,["id","class","style","aria-activedescendant","tabindex"])],16),p.createElementVNode("div",p.mergeProps({class:e.cx("buttons")},e.ptm("buttons"),{"data-pc-group-section":"controls"}),[p.renderSlot(e.$slots,"movecontrolsstart"),p.createVNode(l,p.mergeProps({"aria-label":r.moveToTargetAriaLabel,type:"button",onClick:r.moveToTarget,disabled:r.moveDisabled(0)},e.moveToTargetProps,{pt:e.ptm("moveToTargetButton"),unstyled:e.unstyled,"data-pc-section":"movetotargetbuton"}),{icon:p.withCtx((function(){return[p.renderSlot(e.$slots,"movetotargeticon",{viewChanged:i.viewChanged},(function(){return[(p.openBlock(),p.createBlock(p.resolveDynamicComponent(i.viewChanged?"AngleDownIcon":"AngleRightIcon"),p.mergeProps(e.ptm("moveToTargetButton").icon,{"data-pc-section":"movetotargeticon"}),null,16))]}))]})),_:3},16,["aria-label","onClick","disabled","pt","unstyled"]),p.createVNode(l,p.mergeProps({"aria-label":r.moveAllToTargetAriaLabel,type:"button",onClick:r.moveAllToTarget,disabled:r.moveAllDisabled("sourceList")},e.moveAllToTargetProps,{pt:e.ptm("moveAllToTargetButton"),unstyled:e.unstyled,"data-pc-section":"movealltotargetbuton"}),{icon:p.withCtx((function(){return[p.renderSlot(e.$slots,"movealltotargeticon",{viewChanged:i.viewChanged},(function(){return[(p.openBlock(),p.createBlock(p.resolveDynamicComponent(i.viewChanged?"AngleDoubleDownIcon":"AngleDoubleRightIcon"),p.mergeProps(e.ptm("moveAllToTargetButton").icon,{"data-pc-section":"movealltotargeticon"}),null,16))]}))]})),_:3},16,["aria-label","onClick","disabled","pt","unstyled"]),p.createVNode(l,p.mergeProps({"aria-label":r.moveToSourceAriaLabel,type:"button",onClick:r.moveToSource,disabled:r.moveDisabled(1)},e.moveToSourceProps,{pt:e.ptm("moveToSourceButton"),unstyled:e.unstyled,"data-pc-section":"movetosourcebuton"}),{icon:p.withCtx((function(){return[p.renderSlot(e.$slots,"movetosourceicon",{viewChanged:i.viewChanged},(function(){return[(p.openBlock(),p.createBlock(p.resolveDynamicComponent(i.viewChanged?"AngleUpIcon":"AngleLeftIcon"),p.mergeProps(e.ptm("moveToSourceButton").icon,{"data-pc-section":"movetosourceicon"}),null,16))]}))]})),_:3},16,["aria-label","onClick","disabled","pt","unstyled"]),p.createVNode(l,p.mergeProps({"aria-label":r.moveAllToSourceAriaLabel,type:"button",onClick:r.moveAllToSource,disabled:r.moveAllDisabled("targetList")},e.moveAllToSourceProps,{pt:e.ptm("moveAllToSourceButton"),"data-pc-section":"movealltosourcebuton",unstyled:e.unstyled}),{icon:p.withCtx((function(){return[p.renderSlot(e.$slots,"movealltosourceicon",{viewChanged:i.viewChanged},(function(){return[(p.openBlock(),p.createBlock(p.resolveDynamicComponent(i.viewChanged?"AngleDoubleUpIcon":"AngleDoubleLeftIcon"),p.mergeProps(e.ptm("moveAllToSourceButton").icon,{"data-pc-section":"movealltosourceicon"}),null,16))]}))]})),_:3},16,["aria-label","onClick","disabled","pt","unstyled"]),p.renderSlot(e.$slots,"movecontrolsend")],16),p.createElementVNode("div",p.mergeProps({class:e.cx("targetWrapper")},e.ptm("targetWrapper"),{"data-pc-group-section":"listwrapper"}),[e.$slots.targetheader?(p.openBlock(),p.createElementBlock("div",p.mergeProps({key:0,class:e.cx("targetHeader")},e.ptm("targetHeader"),{"data-pc-group-section":"header"}),[p.renderSlot(e.$slots,"targetheader")],16)):p.createCommentVNode("",!0),p.createVNode(p.TransitionGroup,p.mergeProps({ref:"targetList",id:r.idTarget+"_list",name:"p-picklist-flip",tag:"ul",class:e.cx("targetList"),style:e.listStyle,role:"listbox","aria-multiselectable":"true","aria-activedescendant":i.focused.targetList?r.focusedOptionId:void 0,tabindex:r.targetList&&r.targetList.length>0?e.tabindex:-1,onFocus:t[10]||(t[10]=function(e){return r.onListFocus(e,"targetList")}),onBlur:t[11]||(t[11]=function(e){return r.onListBlur(e,"targetList")}),onKeydown:t[12]||(t[12]=function(e){return r.onItemKeyDown(e,"targetList")})},P(P(P({},e.targetListProps),e.ptm("targetList")),e.ptm("transition")),{"data-pc-group-section":"list"}),{default:p.withCtx((function(){return[(p.openBlock(!0),p.createElementBlock(p.Fragment,null,p.renderList(r.targetList,(function(o,n){return p.withDirectives((p.openBlock(),p.createElementBlock("li",p.mergeProps({key:r.getItemKey(o,n),id:r.idTarget+"_"+n,class:e.cx("item",{item:o,id:"".concat(r.idTarget,"_").concat(n),listIndex:1}),onClick:function(e){return r.onItemClick(e,o,n,1)},onDblclick:function(e){return r.onItemDblClick(e,o,1)},onKeydown:t[8]||(t[8]=function(e){return r.onItemKeyDown(e,"targetList")}),onMousedown:function(e){return r.onOptionMouseDown(e,n,"targetList")},onMousemove:function(e){return r.onOptionMouseMove(n,"targetList")},onTouchend:t[9]||(t[9]=function(){return r.onItemTouchEnd&&r.onItemTouchEnd.apply(r,arguments)}),role:"option","aria-selected":r.isSelected(o,1)},r.getPTOptions(o,"item","".concat(r.idTarget,"_").concat(n),1),{"data-p-highlight":r.isSelected(o,1),"data-p-focused":"".concat(r.idTarget,"_").concat(n)===r.focusedOptionId}),[p.renderSlot(e.$slots,"item",{item:o,index:n})],16,U)),[[d]])})),128))]})),_:3},16,["id","class","style","aria-activedescendant","tabindex"])],16),e.showTargetControls?(p.openBlock(),p.createElementBlock("div",p.mergeProps({key:1,class:e.cx("targetControls")},e.ptm("targetControls"),{"data-pc-group-section":"controls"}),[p.renderSlot(e.$slots,"targetcontrolsstart"),p.createVNode(l,p.mergeProps({"aria-label":r.moveUpAriaLabel,disabled:r.moveDisabled(1),type:"button",onClick:t[13]||(t[13]=function(e){return r.moveUp(e,1)})},e.moveUpButtonProps,{pt:e.ptm("targetMoveUpButton"),unstyled:e.unstyled,"data-pc-section":"targetmoveupbutton"}),{icon:p.withCtx((function(){return[p.renderSlot(e.$slots,"moveupicon",{},(function(){return[p.createVNode(s,p.mergeProps(e.ptm("targetMoveUpButton").icon,{"data-pc-section":"moveupicon"}),null,16)]}))]})),_:3},16,["aria-label","disabled","pt","unstyled"]),p.createVNode(l,p.mergeProps({"aria-label":r.moveTopAriaLabel,disabled:r.moveDisabled(1),type:"button",onClick:t[14]||(t[14]=function(e){return r.moveTop(e,1)})},e.moveTopButtonProps,{pt:e.ptm("targetMoveTopButton"),unstyled:e.unstyled,"data-pc-section":"targetmovetopbutton"}),{icon:p.withCtx((function(){return[p.renderSlot(e.$slots,"movetopicon",{},(function(){return[p.createVNode(a,p.mergeProps(e.ptm("targetMoveTopButton").icon,{"data-pc-section":"movetopicon"}),null,16)]}))]})),_:3},16,["aria-label","disabled","pt","unstyled"]),p.createVNode(l,p.mergeProps({"aria-label":r.moveDownAriaLabel,disabled:r.moveDisabled(1),type:"button",onClick:t[15]||(t[15]=function(e){return r.moveDown(e,1)})},e.moveDownButtonProps,{pt:e.ptm("targetMoveDownButton"),unstyled:e.unstyled,"data-pc-section":"targetmovedownbutton"}),{icon:p.withCtx((function(){return[p.renderSlot(e.$slots,"movedownicon",{},(function(){return[p.createVNode(c,p.mergeProps(e.ptm("targetMoveDownButton").icon,{"data-pc-section":"movedownicon"}),null,16)]}))]})),_:3},16,["aria-label","disabled","pt","unstyled"]),p.createVNode(l,p.mergeProps({"aria-label":r.moveBottomAriaLabel,disabled:r.moveDisabled(1),type:"button",onClick:t[16]||(t[16]=function(e){return r.moveBottom(e,1)})},e.moveBottomButtonProps,{pt:e.ptm("targetMoveBottomButton"),unstyled:e.unstyled,"data-pc-section":"targetmovebottombutton"}),{icon:p.withCtx((function(){return[p.renderSlot(e.$slots,"movebottomicon",{},(function(){return[p.createVNode(u,p.mergeProps(e.ptm("targetMoveBottomButton").icon,{"data-pc-section":"movebottomicon"}),null,16)]}))]})),_:3},16,["aria-label","disabled","pt","unstyled"]),p.renderSlot(e.$slots,"targetcontrolsend")],16)):p.createCommentVNode("",!0)],16)},B}(primevue.button,primevue.icons.angledoubledown,primevue.icons.angledoubleleft,primevue.icons.angledoubleright,primevue.icons.angledoubleup,primevue.icons.angledown,primevue.icons.angleleft,primevue.icons.angleright,primevue.icons.angleup,primevue.ripple,primevue.utils,primevue.basecomponent,primevue.picklist.style,Vue);