this.primereact=this.primereact||{},this.primereact.hooks=function(e,t,n,r){"use strict";function u(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}function o(e){if(e&&e.__esModule)return e;var t=Object.create(null);return e&&Object.keys(e).forEach((function(n){if("default"!==n){var r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:function(){return e[n]}})}})),t.default=e,Object.freeze(t)}var c=o(t),i=u(r);function a(e){if(Array.isArray(e))return e}function l(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,u,o,c,i=[],a=!0,l=!1;try{if(o=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;a=!1}else for(;!(a=(r=o.call(n)).done)&&(i.push(r.value),i.length!==t);a=!0);}catch(e){l=!0,u=e}finally{try{if(!a&&null!=n.return&&(c=n.return(),Object(c)!==c))return}finally{if(l)throw u}}return i}}function f(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n0&&void 0!==arguments[0]?arguments[0]:{},t=e.target;n.ObjectUtils.isNotEmpty(t)&&(g(),(e.when||l)&&(f.current=n.DomHandler.getTargetElement(t))),!s.current&&f.current&&(s.current=function(e){return o&&o(e)},f.current.addEventListener(u,s.current,i))},g=function(){s.current&&(f.current.removeEventListener(u,s.current,i),s.current=null)},h=function(){g(),d=null,v=null},b=c.useCallback((function(){l?f.current=n.DomHandler.getTargetElement(r):(g(),f.current=null)}),[r,l]);return c.useEffect((function(){b()}),[b]),c.useEffect((function(){var e="".concat(d)!=="".concat(o),t=s.current;t&&(e||v!==i)?(g(),l&&p()):t||h()}),[o,i,l]),m((function(){h()})),[p,g]},g={},h={ico:"image/x-icon",png:"image/png",svg:"image/svg+xml",gif:"image/gif"};function b(e){if(Array.isArray(e))return f(e)}function w(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function E(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function O(e){return b(e)||w(e)||s(e)||E()}var S={escKeyListeners:new Map,onGlobalKeyDown:function(e){if("Escape"===e.code){var t=S.escKeyListeners,n=Math.max.apply(Math,O(t.keys())),r=t.get(n),u=Math.max.apply(Math,O(r.keys()));r.get(u)(e)}},refreshGlobalKeyDownListener:function(){var e=n.DomHandler.getTargetElement("document");this.escKeyListeners.size>0?e.addEventListener("keydown",this.onGlobalKeyDown):e.removeEventListener("keydown",this.onGlobalKeyDown)},addListener:function(e,t){var n=this,r=v(t,2),u=r[0],o=r[1],c=this.escKeyListeners;c.has(u)||c.set(u,new Map);var i=c.get(u);if(i.has(o))throw new Error("Unexpected: global esc key listener with priority [".concat(u,", ").concat(o,"] already exists."));return i.set(o,e),this.refreshGlobalKeyDownListener(),function(){i.delete(o),0===i.size&&c.delete(u),n.refreshGlobalKeyDownListener()}}},D=function(e){var t=c.useRef(!1);return c.useEffect((function(){if(!t.current)return t.current=!0,e&&e()}),[])};function j(e){return j="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},j(e)}function P(e,t){if("object"!=j(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=j(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}function R(e){var t=P(e,"string");return"symbol"==j(t)?t:t+""}function L(e,t,n){return(t=R(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function x(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 I(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:{};if(n.ObjectUtils.isNotEmpty(e.target)&&(b(),(e.when||l)&&(s.current=n.DomHandler.getTargetElement(e.target))),!d.current&&s.current){var t=f?f.hideOverlaysOnDocumentScrolling:i.default.hideOverlaysOnDocumentScrolling,r=v.current=n.DomHandler.getScrollableParents(s.current);r.some((function(e){return e===document.body||e===window}))||r.push(t?window:document.body),d.current=function(e){return u&&u(e)},r.forEach((function(e){return e.addEventListener("scroll",d.current,o)}))}},b=function(){d.current&&(v.current.forEach((function(e){return e.removeEventListener("scroll",d.current,o)})),d.current=null)},w=function(){b(),v.current=null,p=null,g=null},E=c.useCallback((function(){l?s.current=n.DomHandler.getTargetElement(t):(b(),s.current=null)}),[t,l]);return c.useEffect((function(){E()}),[E]),c.useEffect((function(){var e="".concat(p)!=="".concat(u),t=d.current;t&&(e||g!==o)?(b(),l&&h()):t||w()}),[u,o,l]),m((function(){w()})),[h,b]},M=function(e){var t=e.when;return p({target:"window",type:"resize",listener:e.listener,when:void 0===t||t})},k=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"local",r="undefined"!=typeof window,u=v(p({target:"window",type:"storage",listener:function(e){var r="local"===n?window.localStorage:window.sessionStorage;if(e.storageArea===r&&e.key===t){var u=e.newValue?JSON.parse(e.newValue):void 0;f(u)}}}),2),o=u[0],i=u[1],a=v(c.useState(e),2),l=a[0],f=a[1];return c.useEffect((function(){r||f(e);try{var u="local"===n?window.localStorage.getItem(t):window.sessionStorage.getItem(t);f(u?JSON.parse(u):e)}catch(t){f(e)}return o(),function(){return i()}}),[]),[l,function(e){try{var u=e instanceof Function?e(l):e;if(f(u),r){var o=JSON.stringify(u);"local"===n?window.localStorage.setItem(t,o):window.sessionStorage.setItem(t,o)}}catch(e){throw new Error("PrimeReact useStorage: Failed to serialize the value at key: ".concat(t))}}]},N=0;return e.ESC_KEY_HANDLING_PRIORITIES={SIDEBAR:100,SLIDE_MENU:200,DIALOG:300,IMAGE:400,MENU:500,OVERLAY_PANEL:600,PASSWORD:700,CASCADE_SELECT:800,SPLIT_BUTTON:900,SPEED_DIAL:1e3,TOOLTIP:1200},e.useClickOutside=function(e,t){var n=function(n){e.current&&!e.current.contains(n.target)&&t(n)},r=v(p({type:"mousedown",listener:n}),2),u=r[0],o=r[1],i=v(p({type:"touchstart",listener:n}),2),a=i[0],l=i[1];return c.useEffect((function(){if(e.current)return u(),a(),function(){o(),l()}})),[e,t]},e.useCounter=function(){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{step:1},t=v(c.useState(arguments.length>0&&void 0!==arguments[0]?arguments[0]:0),2),n=t[0],r=t[1];return{count:n,increment:function(){e.max&&n>=e.max||r(n+e.step)},decrement:function(){if(e.min||0===e.min&&n<=e.min)return null;r(n-e.step)},reset:function(){r(0)}}},e.useDebounce=function(e,t){var n=v(c.useState(e),2),r=n[0],u=n[1],o=v(c.useState(e),2),i=o[0],a=o[1],l=c.useRef(!1),f=c.useRef(null),s=function(){return window.clearTimeout(f.current)};return D((function(){l.current=!0})),m((function(){s()})),c.useEffect((function(){l.current&&(s(),f.current=window.setTimeout((function(){a(r)}),t))}),[r,t]),[r,i,u]},e.useDisplayOrder=function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],r=v(c.useState((function(){return n.UniqueComponentId()})),1)[0],u=v(c.useState(0),2),o=u[0],i=u[1];return c.useEffect((function(){if(t){g[e]||(g[e]=[]);var u=g[e].push(r);return i(u),function(){delete g[e][u-1];var t=g[e].length-1,r=n.ObjectUtils.findLastIndex(g[e],(function(e){return void 0!==e}));r!==t&&g[e].splice(r+1),i(void 0)}}}),[e,r,t]),o},e.useEventListener=p,e.useFavicon=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"shortcut icon";c.useLayoutEffect((function(){if(e){document.querySelectorAll("link[rel*='icon']").forEach((function(e){document.head.removeChild(e)}));var n=document.createElement("link");n.setAttribute("type",h[e.split(".").pop()]),n.setAttribute("rel",t),n.setAttribute("href",e),document.head.appendChild(n)}}),[e,t])},e.useGlobalOnEscapeKey=function(e){var n=e.callback,r=e.when,u=e.priority;t.useEffect((function(){if(r)return S.addListener(n,u)}),[n,r,u])},e.useIntersectionObserver=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=v(c.useState(!1),2),r=n[0],u=n[1];return c.useEffect((function(){if(e.current){var n=new IntersectionObserver((function(e){var t=v(e,1);u(t[0].isIntersecting)}),t);return n.observe(e.current),function(){n.disconnect()}}}),[t,e]),r},e.useInterval=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],r=c.useRef(null),u=c.useRef(null),o=c.useCallback((function(){return clearInterval(r.current)}),[r.current]);return c.useEffect((function(){u.current=e})),c.useEffect((function(){if(n)return r.current=setInterval((function(){u.current()}),t),o;o()}),[t,n]),m((function(){o()})),[o]},e.useLocalStorage=function(e,t){return k(e,t,"local")},e.useMatchMedia=function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=v(c.useState(!1),2),r=n[0],u=n[1],o=c.useRef(null),i=function(e){return u(e.matches)},a=function(){return o.current&&o.current.removeEventListener("change",i)&&(o.current=null)};return c.useEffect((function(){return t&&(o.current=window.matchMedia(e),u(o.current.matches),o.current&&o.current.addEventListener("change",i)),a}),[e,t]),r},e.useMergeProps=function(){var e=t.useContext(r.PrimeReactContext);return function(){for(var t=arguments.length,r=new Array(t),u=0;u1&&void 0!==arguments[1]?arguments[1]:{},o=v(t.useState(!1),2),c=o[0],a=o[1],l=t.useRef(null),f=t.useContext(r.PrimeReactContext),s=n.DomHandler.isClient()?window.document:void 0,d=u.document,y=void 0===d?s:d,m=u.manual,p=void 0!==m&&m,g=u.name,h=void 0===g?"style_".concat(++N):g,b=u.id,w=void 0===b?void 0:b,E=u.media,O=void 0===E?void 0:E,S=function(e){var t=e.querySelector('style[data-primereact-style-id="'.concat(h,'"]'));if(t)return t;if(void 0!==w){var n=y.getElementById(w);if(n)return n}return y.createElement("style")},D=function(){if(y&&!c){var t=(null==f?void 0:f.styleContainer)||y.head;l.current=S(t),l.current.isConnected||(l.current.type="text/css",w&&(l.current.id=w),O&&(l.current.media=O),n.DomHandler.addNonce(l.current,f&&f.nonce||i.default.nonce),t.appendChild(l.current),h&&l.current.setAttribute("data-primereact-style-id",h)),l.current.textContent=e,a(!0)}};return t.useEffect((function(){p||D()}),[p]),{id:w,name:h,update:function(t){c&&e!==t&&(l.current.textContent=t)},unload:function(){y&&l.current&&(n.DomHandler.removeInlineStyle(l.current),a(!1))},load:D,isLoaded:c}},e.useTimeout=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],r=c.useRef(null),u=c.useRef(null),o=c.useCallback((function(){return clearTimeout(r.current)}),[r.current]);return c.useEffect((function(){u.current=e})),c.useEffect((function(){if(n)return r.current=setTimeout((function(){u.current()}),t),o;o()}),[t,n]),m((function(){o()})),[o]},e.useUnmountEffect=m,e.useUpdateEffect=function(e,t){var n=c.useRef(!1);return c.useEffect((function(){if(n.current)return e&&e();n.current=!0}),t)},Object.defineProperty(e,"__esModule",{value:!0}),e}({},React,primereact.utils,primereact.api);