import*as e from"react";import t,{PrimeReactContext as n,localeOption as r,ariaLabel as a}from"primereact/api";import{ComponentBase as o,useHandleStyle as i}from"primereact/componentbase";import{useMergeProps as l,usePrevious as c,useResizeListener as u,useMountEffect as s,useUpdateEffect as p}from"primereact/hooks";import{ChevronDownIcon as m}from"primereact/icons/chevrondown";import{ChevronLeftIcon as f}from"primereact/icons/chevronleft";import{ChevronRightIcon as d}from"primereact/icons/chevronright";import{ChevronUpIcon as v}from"primereact/icons/chevronup";import{Ripple as h}from"primereact/ripple";import{classNames as b,UniqueComponentId as g,DomHandler as y,ObjectUtils as x,IconUtils as w}from"primereact/utils";function I(e){return I="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},I(e)}function S(e,t){if("object"!=I(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=I(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}function N(e){var t=S(e,"string");return"symbol"==I(t)?t:t+""}function E(e,t,n){return(t=N(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function C(){return C=Object.assign?Object.assign.bind():function(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=Array(t);n button {\n display: flex;\n align-items: center;\n justify-content: center;\n }\n \n /* Vertical */\n .p-carousel-vertical .p-carousel-container {\n flex-direction: column;\n }\n \n .p-carousel-vertical .p-carousel-items-container {\n flex-direction: column;\n height: 100%;\n }\n \n /* Keyboard Support */\n .p-items-hidden .p-carousel-item {\n visibility: hidden;\n }\n \n .p-items-hidden .p-carousel-item.p-carousel-item-active {\n visibility: visible;\n }\n}\n",inlineStyles:{itemsContent:function(e){return{height:e.height}}}}});function H(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function L(e){for(var t=1;t=P,de=E.value?Math.max(Math.ceil((E.value.length-P)/A)+1,0):0,ve=de&&E.autoplayInterval&&Q.current,he=E.onPageChange&&!ve,be=he?E.page:U,ge=V(u({listener:function(){xe()},when:E.responsiveOptions}),1)[0],ye=function(e,t){var n=B;null!=t?(n=A*t*-1,fe&&(n-=P),oe.current=!1):(n+=A*e,oe.current&&(n+=G.current-A*e,oe.current=!1),t=Math.abs(Math.floor((fe?n+P:n)/A)));fe&&U===de-1&&-1===e?(n=-1*(E.value.length+P),t=0):fe&&0===U&&1===e?(n=0,t=de-1):t===de-1&&G.current>0&&(n+=-1*G.current-A*e,oe.current=!0),q.current&&(!W()&&y.removeClass(q.current,"p-items-hidden"),Xe(n),q.current.style.transition="transform 500ms ease 0s"),_e(t),H(n)},xe=function(){if(q.current&&ie.current){for(var e=window.innerWidth,t={numVisible:E.numVisible,numScroll:E.numScroll},n=0;n=e&&(t=r)}if(A!==t.numScroll){var a=Math.floor(be*A/t.numScroll),o=t.numScroll*a*-1;fe&&(o-=t.numVisible),H(o),R(t.numScroll),_e(a)}P!==t.numVisible&&j(t.numVisible)}},we=function(e,t){(me||0!==be)&&ye(1,t),Q.current=!1,e.cancelable&&e.preventDefault()},Ie=function(e,t){(me||bebe?Ie(e,t):tee.current&&(t<0?Ie(e):we(e))},je=function(e){switch(e.code){case"ArrowRight":ke();break;case"ArrowLeft":Ae();break;case"Home":De(),e.preventDefault();break;case"End":Re(),e.preventDefault();break;case"ArrowUp":case"ArrowDown":e.preventDefault();break;case"Tab":Te()}},ke=function(){var e=D(y.find(ae.current,'[data-pc-section="indicator"]')),t=Be();Ve(t,t+1===e.length?e.length-1:t+1)},Ae=function(){var e=Be();Ve(e,e-1<=0?0:e-1)},De=function(){var e=Be();Ve(e,0)},Re=function(){var e=D(y.find(ae.current,'[data-pc-section="indicator"]r')),t=Be();Ve(t,e.length-1)},Te=function(){var e=D(y.find(ae.current,'[data-pc-section="indicator"]')),t=e.findIndex((function(e){return!0===y.getAttribute(e,"data-p-highlight")})),n=y.findSingle(ae.current,'[data-pc-section="indicator"] > button[tabindex="0"]'),r=e.findIndex((function(e){return e===n.parentElement}));e[r].children[0].tabIndex="-1",e[t].children[0].tabIndex="0"},Be=function(){var e=D(y.find(ae.current,'[data-pc-section="indicator"]')),t=y.findSingle(ae.current,'[data-pc-section="indicator"] > button[tabindex="0"]');return e.findIndex((function(e){return e===t.parentElement}))},Ve=function(e,t){var n=D(y.find(ae.current,'[data-pc-section="indicator"]'));n[e].children[0].tabIndex="-1",n[t].children[0].tabIndex="0",n[t].children[0].focus()},Me=function(){E.autoplayInterval>0&&(ne.current=setInterval((function(){ye(-1,U===de-1?0:U+1)}),E.autoplayInterval))},He=function(){ne.current&&clearInterval(ne.current)},Le=function(){re.current||(re.current=y.createInlineStyle(N&&N.nonce||t.nonce,N&&N.styleContainer));var e="\n .p-carousel[".concat(Z.current,"] .p-carousel-item {\n flex: 1 0 ").concat(100/P,"%\n }\n ");if(E.responsiveOptions){var n=x.localeComparator(N&&N.locale||t.locale);ie.current=D(E.responsiveOptions),ie.current.sort((function(e,r){return x.sort(e.breakpoint,r.breakpoint,-1,n,N&&N.nullSortOrder||t.nullSortOrder)}));for(var r=0;r=de&&(_e(n=de-1),e=!0),t=n*A*-1,fe&&(t-=P),n===de-1&&G.current>0?(t+=-1*G.current+A,oe.current=!0):oe.current=!1,t!==B&&(H(t),e=!0),Xe(t)}return fe&&(0===U?t=-1*P:0===t&&(t=-1*E.value.length,G.current>0&&(oe.current=!0)),t!==B&&(H(t),e=!0)),se!==E.page&&(E.page>se&&E.page<=de-1?ye(-1,E.page):E.page=n,l=a===n,c=o===n,u=a>n||o