cindy-ai-chatbot
Version:
An AI-powered chatbot component for React applications
1 lines • 500 kB
JavaScript
"use strict";var e=require("react/jsx-runtime"),t=require("react"),n=require("react-dom"),r=require("axios"),o=require("js-cookie"),i=require("uuid");function l(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 a=l(t);function s(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function u(e,t){if(e){if("string"==typeof e)return s(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?s(e,t):void 0}}function c(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i,l,a=[],s=!0,u=!1;try{if(i=(n=n.call(e)).next,0===t);else for(;!(s=(r=i.call(n)).done)&&(a.push(r.value),a.length!==t);s=!0);}catch(e){u=!0,o=e}finally{try{if(!s&&null!=n.return&&(l=n.return(),Object(l)!==l))return}finally{if(u)throw o}}return a}}(e,t)||u(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function p(e){return p="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},p(e)}function f(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];if(t){for(var r=[],o=0;o<t.length;o++){var i=t[o];if(i){var l=p(i);if("string"===l||"number"===l)r.push(i);else if("object"===l){var a=Array.isArray(i)?i:Object.entries(i).map((function(e){var t=c(e,2),n=t[0];return t[1]?n:null}));r=a.length?r.concat(a.filter((function(e){return!!e}))):r}}}return r.join(" ").trim()}}function d(e){return function(e){if(Array.isArray(e))return s(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||u(e)||function(){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 m(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function h(e){var t=function(e,t){if("object"!=p(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=p(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==p(t)?t:t+""}function g(e,t,n){return n&&function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,h(r.key),r)}}(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function v(e,t,n){return(t=h(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function y(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return b(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?b(e,t):void 0}}(e))||t){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,l=!0,a=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return l=e.done,e},e:function(e){a=!0,i=e},f:function(){try{l||null==n.return||n.return()}finally{if(a)throw i}}}}function b(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var x=function(){function e(){m(this,e)}return g(e,0,[{key:"innerWidth",value:function(e){if(e){var t=e.offsetWidth,n=getComputedStyle(e);return t+=parseFloat(n.paddingLeft)+parseFloat(n.paddingRight)}return 0}},{key:"width",value:function(e){if(e){var t=e.offsetWidth,n=getComputedStyle(e);return t-=parseFloat(n.paddingLeft)+parseFloat(n.paddingRight)}return 0}},{key:"getBrowserLanguage",value:function(){return navigator.userLanguage||navigator.languages&&navigator.languages.length&&navigator.languages[0]||navigator.language||navigator.browserLanguage||navigator.systemLanguage||"en"}},{key:"getWindowScrollTop",value:function(){var e=document.documentElement;return(window.pageYOffset||e.scrollTop)-(e.clientTop||0)}},{key:"getWindowScrollLeft",value:function(){var e=document.documentElement;return(window.pageXOffset||e.scrollLeft)-(e.clientLeft||0)}},{key:"getOuterWidth",value:function(e,t){if(e){var n=e.getBoundingClientRect().width||e.offsetWidth;if(t){var r=getComputedStyle(e);n+=parseFloat(r.marginLeft)+parseFloat(r.marginRight)}return n}return 0}},{key:"getOuterHeight",value:function(e,t){if(e){var n=e.getBoundingClientRect().height||e.offsetHeight;if(t){var r=getComputedStyle(e);n+=parseFloat(r.marginTop)+parseFloat(r.marginBottom)}return n}return 0}},{key:"getClientHeight",value:function(e,t){if(e){var n=e.clientHeight;if(t){var r=getComputedStyle(e);n+=parseFloat(r.marginTop)+parseFloat(r.marginBottom)}return n}return 0}},{key:"getClientWidth",value:function(e,t){if(e){var n=e.clientWidth;if(t){var r=getComputedStyle(e);n+=parseFloat(r.marginLeft)+parseFloat(r.marginRight)}return n}return 0}},{key:"getViewport",value:function(){var e=window,t=document,n=t.documentElement,r=t.getElementsByTagName("body")[0];return{width:e.innerWidth||n.clientWidth||r.clientWidth,height:e.innerHeight||n.clientHeight||r.clientHeight}}},{key:"getOffset",value:function(e){if(e){var t=e.getBoundingClientRect();return{top:t.top+(window.pageYOffset||document.documentElement.scrollTop||document.body.scrollTop||0),left:t.left+(window.pageXOffset||document.documentElement.scrollLeft||document.body.scrollLeft||0)}}return{top:"auto",left:"auto"}}},{key:"index",value:function(e){if(e)for(var t=e.parentNode.childNodes,n=0,r=0;r<t.length;r++){if(t[r]===e)return n;1===t[r].nodeType&&n++}return-1}},{key:"addMultipleClasses",value:function(e,t){if(e&&t)if(e.classList)for(var n=t.split(" "),r=0;r<n.length;r++)e.classList.add(n[r]);else for(var o=t.split(" "),i=0;i<o.length;i++)e.className=e.className+" "+o[i]}},{key:"removeMultipleClasses",value:function(e,t){if(e&&t)if(e.classList)for(var n=t.split(" "),r=0;r<n.length;r++)e.classList.remove(n[r]);else for(var o=t.split(" "),i=0;i<o.length;i++)e.className=e.className.replace(new RegExp("(^|\\b)"+o[i].split(" ").join("|")+"(\\b|$)","gi")," ")}},{key:"addClass",value:function(e,t){e&&t&&(e.classList?e.classList.add(t):e.className=e.className+" "+t)}},{key:"removeClass",value:function(e,t){e&&t&&(e.classList?e.classList.remove(t):e.className=e.className.replace(new RegExp("(^|\\b)"+t.split(" ").join("|")+"(\\b|$)","gi")," "))}},{key:"hasClass",value:function(e,t){return!!e&&(e.classList?e.classList.contains(t):new RegExp("(^| )"+t+"( |$)","gi").test(e.className))}},{key:"addStyles",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};e&&Object.entries(t).forEach((function(t){var n=c(t,2),r=n[0],o=n[1];return e.style[r]=o}))}},{key:"find",value:function(e,t){return e?Array.from(e.querySelectorAll(t)):[]}},{key:"findSingle",value:function(e,t){return e?e.querySelector(t):null}},{key:"setAttributes",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(e){var r=function(t,n){var o,i,l=null!=e&&null!==(o=e.$attrs)&&void 0!==o&&o[t]?[null==e||null===(i=e.$attrs)||void 0===i?void 0:i[t]]:[];return[n].flat().reduce((function(e,n){if(null!=n){var o=p(n);if("string"===o||"number"===o)e.push(n);else if("object"===o){var i=Array.isArray(n)?r(t,n):Object.entries(n).map((function(e){var n=c(e,2),r=n[0],o=n[1];return"style"!==t||!o&&0!==o?o?r:void 0:"".concat(r.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase(),":").concat(o)}));e=i.length?e.concat(i.filter((function(e){return!!e}))):e}}return e}),l)};Object.entries(n).forEach((function(n){var o=c(n,2),i=o[0],l=o[1];if(null!=l){var a=i.match(/^on(.+)/);a?e.addEventListener(a[1].toLowerCase(),l):"p-bind"===i?t.setAttributes(e,l):(l="class"===i?d(new Set(r("class",l))).join(" ").trim():"style"===i?r("style",l).join(";").trim():l,(e.$attrs=e.$attrs||{})&&(e.$attrs[i]=l),e.setAttribute(i,l))}}))}}},{key:"getAttribute",value:function(e,t){if(e){var n=e.getAttribute(t);return isNaN(n)?"true"===n||"false"===n?"true"===n:n:+n}}},{key:"isAttributeEquals",value:function(e,t,n){return!!e&&this.getAttribute(e,t)===n}},{key:"isAttributeNotEquals",value:function(e,t,n){return!this.isAttributeEquals(e,t,n)}},{key:"getHeight",value:function(e){if(e){var t=e.offsetHeight,n=getComputedStyle(e);return t-=parseFloat(n.paddingTop)+parseFloat(n.paddingBottom)+parseFloat(n.borderTopWidth)+parseFloat(n.borderBottomWidth)}return 0}},{key:"getWidth",value:function(e){if(e){var t=e.offsetWidth,n=getComputedStyle(e);return t-=parseFloat(n.paddingLeft)+parseFloat(n.paddingRight)+parseFloat(n.borderLeftWidth)+parseFloat(n.borderRightWidth)}return 0}},{key:"alignOverlay",value:function(t,n,r){var o=!(arguments.length>3&&void 0!==arguments[3])||arguments[3];t&&n&&("self"===r?this.relativePosition(t,n):(o&&(t.style.minWidth=e.getOuterWidth(n)+"px"),this.absolutePosition(t,n)))}},{key:"absolutePosition",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"left";if(e&&t){var r,o,i=e.offsetParent?{width:e.offsetWidth,height:e.offsetHeight}:this.getHiddenElementDimensions(e),l=i.height,a=i.width,s=t.offsetHeight,u=t.offsetWidth,c=t.getBoundingClientRect(),p=this.getWindowScrollTop(),f=this.getWindowScrollLeft(),d=this.getViewport();c.top+s+l>d.height?((r=c.top+p-l)<0&&(r=p),e.style.transformOrigin="bottom"):(r=s+c.top+p,e.style.transformOrigin="top");var m=c.left,h="left"===n?0:a-u;o=m+u+a>d.width?Math.max(0,m+f+u-a):m-h+f,e.style.top=r+"px",e.style.left=o+"px"}}},{key:"relativePosition",value:function(e,t){if(e&&t){var n,r,o=e.offsetParent?{width:e.offsetWidth,height:e.offsetHeight}:this.getHiddenElementDimensions(e),i=t.offsetHeight,l=t.getBoundingClientRect(),a=this.getViewport();l.top+i+o.height>a.height?(n=-1*o.height,l.top+n<0&&(n=-1*l.top),e.style.transformOrigin="bottom"):(n=i,e.style.transformOrigin="top"),r=o.width>a.width?-1*l.left:l.left+o.width>a.width?-1*(l.left+o.width-a.width):0,e.style.top=n+"px",e.style.left=r+"px"}}},{key:"flipfitCollision",value:function(t,n){var r=this,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"left top",i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"left bottom",l=arguments.length>4?arguments[4]:void 0;if(t&&n){var a=n.getBoundingClientRect(),s=this.getViewport(),u=o.split(" "),c=i.split(" "),p=function(e,t){return t?+e.substring(e.search(/(\+|-)/g))||0:e.substring(0,e.search(/(\+|-)/g))||e},f={my:{x:p(u[0]),y:p(u[1]||u[0]),offsetX:p(u[0],!0),offsetY:p(u[1]||u[0],!0)},at:{x:p(c[0]),y:p(c[1]||c[0]),offsetX:p(c[0],!0),offsetY:p(c[1]||c[0],!0)}},d={left:function(){return f.my.offsetX+f.at.offsetX+a.left+("left"===f.my.x?0:-1*("center"===f.my.x?r.getOuterWidth(t)/2:r.getOuterWidth(t)))},top:function(){return f.my.offsetY+f.at.offsetY+a.top+("top"===f.my.y?0:-1*("center"===f.my.y?r.getOuterHeight(t)/2:r.getOuterHeight(t)))}},m={count:{x:0,y:0},left:function(){var n=d.left(),r=e.getWindowScrollLeft();t.style.left=n+r+"px",2===this.count.x?(t.style.left=r+"px",this.count.x=0):n<0&&(this.count.x++,f.my.x="left",f.at.x="right",f.my.offsetX*=-1,f.at.offsetX*=-1,this.right())},right:function(){var r=d.left()+e.getOuterWidth(n),o=e.getWindowScrollLeft();t.style.left=r+o+"px",2===this.count.x?(t.style.left=s.width-e.getOuterWidth(t)+o+"px",this.count.x=0):r+e.getOuterWidth(t)>s.width&&(this.count.x++,f.my.x="right",f.at.x="left",f.my.offsetX*=-1,f.at.offsetX*=-1,this.left())},top:function(){var n=d.top(),r=e.getWindowScrollTop();t.style.top=n+r+"px",2===this.count.y?(t.style.left=r+"px",this.count.y=0):n<0&&(this.count.y++,f.my.y="top",f.at.y="bottom",f.my.offsetY*=-1,f.at.offsetY*=-1,this.bottom())},bottom:function(){var r=d.top()+e.getOuterHeight(n),o=e.getWindowScrollTop();t.style.top=r+o+"px",2===this.count.y?(t.style.left=s.height-e.getOuterHeight(t)+o+"px",this.count.y=0):r+e.getOuterHeight(n)>s.height&&(this.count.y++,f.my.y="bottom",f.at.y="top",f.my.offsetY*=-1,f.at.offsetY*=-1,this.top())},center:function(r){if("y"===r){var o=d.top()+e.getOuterHeight(n)/2;t.style.top=o+e.getWindowScrollTop()+"px",o<0?this.bottom():o+e.getOuterHeight(n)>s.height&&this.top()}else{var i=d.left()+e.getOuterWidth(n)/2;t.style.left=i+e.getWindowScrollLeft()+"px",i<0?this.left():i+e.getOuterWidth(t)>s.width&&this.right()}}};m[f.at.x]("x"),m[f.at.y]("y"),this.isFunction(l)&&l(f)}}},{key:"findCollisionPosition",value:function(e){if(e){var t="left"===e?"right":"left";return"top"===e||"bottom"===e?{axis:"y",my:"center ".concat("top"===e?"bottom":"top"),at:"center ".concat(e)}:{axis:"x",my:"".concat(t," center"),at:"".concat(e," center")}}}},{key:"getParents",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return null===e.parentNode?t:this.getParents(e.parentNode,t.concat([e.parentNode]))}},{key:"getScrollableParents",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=[];if(e){var r,o=this.getParents(e),i=/(auto|scroll)/,l=function(e){var t=e?getComputedStyle(e):null;return t&&(i.test(t.getPropertyValue("overflow"))||i.test(t.getPropertyValue("overflow-x"))||i.test(t.getPropertyValue("overflow-y")))},a=function(e){t&&n.push("BODY"===e.nodeName||"HTML"===e.nodeName||9===e.nodeType?window:e)},s=y(o);try{for(s.s();!(r=s.n()).done;){var u,c=r.value,p=1===c.nodeType&&(null===(u=c.dataset)||void 0===u?void 0:u.scrollselectors);if(p){var f,d=y(p.split(","));try{for(d.s();!(f=d.n()).done;){var m=f.value,h=this.findSingle(c,m);h&&l(h)&&a(h)}}catch(e){d.e(e)}finally{d.f()}}1===c.nodeType&&l(c)&&a(c)}}catch(e){s.e(e)}finally{s.f()}}return n.some((function(e){return e===document.body||e===window}))||n.push(t?window:document.body),n}},{key:"getHiddenElementOuterHeight",value:function(e){if(e){e.style.visibility="hidden",e.style.display="block";var t=e.offsetHeight;return e.style.display="none",e.style.visibility="visible",t}return 0}},{key:"getHiddenElementOuterWidth",value:function(e){if(e){e.style.visibility="hidden",e.style.display="block";var t=e.offsetWidth;return e.style.display="none",e.style.visibility="visible",t}return 0}},{key:"getHiddenElementDimensions",value:function(e){var t={};return e&&(e.style.visibility="hidden",e.style.display="block",t.width=e.offsetWidth,t.height=e.offsetHeight,e.style.display="none",e.style.visibility="visible"),t}},{key:"fadeIn",value:function(e,t){if(e){e.style.opacity=0;var n=+new Date,r=0,o=function(){r=+e.style.opacity+((new Date).getTime()-n)/t,e.style.opacity=r,n=+new Date,+r<1&&(window.requestAnimationFrame&&requestAnimationFrame(o)||setTimeout(o,16))};o()}}},{key:"fadeOut",value:function(e,t){if(e)var n=1,r=50/t,o=setInterval((function(){(n-=r)<=0&&(n=0,clearInterval(o)),e.style.opacity=n}),50)}},{key:"getUserAgent",value:function(){return navigator.userAgent}},{key:"isIOS",value:function(){return/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream}},{key:"isAndroid",value:function(){return/(android)/i.test(navigator.userAgent)}},{key:"isChrome",value:function(){return/(chrome)/i.test(navigator.userAgent)}},{key:"isClient",value:function(){return!("undefined"==typeof window||!window.document||!window.document.createElement)}},{key:"isTouchDevice",value:function(){return"ontouchstart"in window||navigator.maxTouchPoints>0||navigator.msMaxTouchPoints>0}},{key:"isFunction",value:function(e){return!!(e&&e.constructor&&e.call&&e.apply)}},{key:"appendChild",value:function(e,t){if(this.isElement(t))t.appendChild(e);else{if(!t.el||!t.el.nativeElement)throw new Error("Cannot append "+t+" to "+e);t.el.nativeElement.appendChild(e)}}},{key:"removeChild",value:function(e,t){if(this.isElement(t))t.removeChild(e);else{if(!t.el||!t.el.nativeElement)throw new Error("Cannot remove "+e+" from "+t);t.el.nativeElement.removeChild(e)}}},{key:"isElement",value:function(e){return"object"===("undefined"==typeof HTMLElement?"undefined":p(HTMLElement))?e instanceof HTMLElement:e&&"object"===p(e)&&null!==e&&1===e.nodeType&&"string"==typeof e.nodeName}},{key:"scrollInView",value:function(e,t){var n=getComputedStyle(e).getPropertyValue("border-top-width"),r=n?parseFloat(n):0,o=getComputedStyle(e).getPropertyValue("padding-top"),i=o?parseFloat(o):0,l=e.getBoundingClientRect(),a=t.getBoundingClientRect().top+document.body.scrollTop-(l.top+document.body.scrollTop)-r-i,s=e.scrollTop,u=e.clientHeight,c=this.getOuterHeight(t);a<0?e.scrollTop=s+a:a+c>u&&(e.scrollTop=s+a-u+c)}},{key:"clearSelection",value:function(){if(window.getSelection)window.getSelection().empty?window.getSelection().empty():window.getSelection().removeAllRanges&&window.getSelection().rangeCount>0&&window.getSelection().getRangeAt(0).getClientRects().length>0&&window.getSelection().removeAllRanges();else if(document.selection&&document.selection.empty)try{document.selection.empty()}catch(e){}}},{key:"calculateScrollbarWidth",value:function(e){if(e){var t=getComputedStyle(e);return e.offsetWidth-e.clientWidth-parseFloat(t.borderLeftWidth)-parseFloat(t.borderRightWidth)}if(null!=this.calculatedScrollbarWidth)return this.calculatedScrollbarWidth;var n=document.createElement("div");n.className="p-scrollbar-measure",document.body.appendChild(n);var r=n.offsetWidth-n.clientWidth;return document.body.removeChild(n),this.calculatedScrollbarWidth=r,r}},{key:"calculateBodyScrollbarWidth",value:function(){return window.innerWidth-document.documentElement.offsetWidth}},{key:"getBrowser",value:function(){if(!this.browser){var e=this.resolveUserAgent();this.browser={},e.browser&&(this.browser[e.browser]=!0,this.browser.version=e.version),this.browser.chrome?this.browser.webkit=!0:this.browser.webkit&&(this.browser.safari=!0)}return this.browser}},{key:"resolveUserAgent",value:function(){var e=navigator.userAgent.toLowerCase(),t=/(chrome)[ ]([\w.]+)/.exec(e)||/(webkit)[ ]([\w.]+)/.exec(e)||/(opera)(?:.*version|)[ ]([\w.]+)/.exec(e)||/(msie) ([\w.]+)/.exec(e)||e.indexOf("compatible")<0&&/(mozilla)(?:.*? rv:([\w.]+)|)/.exec(e)||[];return{browser:t[1]||"",version:t[2]||"0"}}},{key:"blockBodyScroll",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"p-overflow-hidden";!!!document.body.style.getPropertyValue("--scrollbar-width")&&document.body.style.setProperty("--scrollbar-width",this.calculateBodyScrollbarWidth()+"px"),this.addClass(document.body,e)}},{key:"unblockBodyScroll",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"p-overflow-hidden";document.body.style.removeProperty("--scrollbar-width"),this.removeClass(document.body,e)}},{key:"isVisible",value:function(e){return e&&(0!==e.clientHeight||0!==e.getClientRects().length||"none"!==getComputedStyle(e).display)}},{key:"isExist",value:function(e){return!(null==e||!e.nodeName||!e.parentNode)}},{key:"getFocusableElements",value:function(t){var n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",o=[],i=y(e.find(t,'button:not([tabindex = "-1"]):not([disabled]):not([style*="display:none"]):not([hidden])'.concat(r,',\n [href][clientHeight][clientWidth]:not([tabindex = "-1"]):not([disabled]):not([style*="display:none"]):not([hidden])').concat(r,',\n input:not([tabindex = "-1"]):not([disabled]):not([style*="display:none"]):not([hidden])').concat(r,',\n select:not([tabindex = "-1"]):not([disabled]):not([style*="display:none"]):not([hidden])').concat(r,',\n textarea:not([tabindex = "-1"]):not([disabled]):not([style*="display:none"]):not([hidden])').concat(r,',\n [tabIndex]:not([tabIndex = "-1"]):not([disabled]):not([style*="display:none"]):not([hidden])').concat(r,',\n [contenteditable]:not([tabIndex = "-1"]):not([disabled]):not([style*="display:none"]):not([hidden])').concat(r)));try{for(i.s();!(n=i.n()).done;){var l=n.value;"none"!==getComputedStyle(l).display&&"hidden"!==getComputedStyle(l).visibility&&o.push(l)}}catch(e){i.e(e)}finally{i.f()}return o}},{key:"getFirstFocusableElement",value:function(t,n){var r=e.getFocusableElements(t,n);return r.length>0?r[0]:null}},{key:"getLastFocusableElement",value:function(t,n){var r=e.getFocusableElements(t,n);return r.length>0?r[r.length-1]:null}},{key:"focus",value:function(e,t){var n=void 0===t||!t;e&&document.activeElement!==e&&e.focus({preventScroll:n})}},{key:"focusFirstElement",value:function(t,n){if(t){var r=e.getFirstFocusableElement(t);return r&&e.focus(r,n),r}}},{key:"getCursorOffset",value:function(e,t,n,r){if(e){var o=getComputedStyle(e),i=document.createElement("div");i.style.position="absolute",i.style.top="0px",i.style.left="0px",i.style.visibility="hidden",i.style.pointerEvents="none",i.style.overflow=o.overflow,i.style.width=o.width,i.style.height=o.height,i.style.padding=o.padding,i.style.border=o.border,i.style.overflowWrap=o.overflowWrap,i.style.whiteSpace=o.whiteSpace,i.style.lineHeight=o.lineHeight,i.innerHTML=t.replace(/\r\n|\r|\n/g,"<br />");var l=document.createElement("span");l.textContent=r,i.appendChild(l);var a=document.createTextNode(n);i.appendChild(a),document.body.appendChild(i);var s=l.offsetLeft,u=l.offsetTop,c=l.clientHeight;return document.body.removeChild(i),{left:Math.abs(s-e.scrollLeft),top:Math.abs(u-e.scrollTop)+c}}return{top:"auto",left:"auto"}}},{key:"invokeElementMethod",value:function(e,t,n){e[t].apply(e,n)}},{key:"isClickable",value:function(e){var t=e.nodeName,n=e.parentElement&&e.parentElement.nodeName;return"INPUT"===t||"TEXTAREA"===t||"BUTTON"===t||"A"===t||"INPUT"===n||"TEXTAREA"===n||"BUTTON"===n||"A"===n||this.hasClass(e,"p-button")||this.hasClass(e.parentElement,"p-button")||this.hasClass(e.parentElement,"p-checkbox")||this.hasClass(e.parentElement,"p-radiobutton")}},{key:"applyStyle",value:function(e,t){if("string"==typeof t)e.style.cssText=t;else for(var n in t)e.style[n]=t[n]}},{key:"exportCSV",value:function(t,n){var r=new Blob([t],{type:"application/csv;charset=utf-8;"});window.navigator.msSaveOrOpenBlob?navigator.msSaveOrOpenBlob(r,n+".csv"):e.saveAs({name:n+".csv",src:URL.createObjectURL(r)})||(t="data:text/csv;charset=utf-8,"+t,window.open(encodeURI(t)))}},{key:"saveAs",value:function(e){if(e){var t=document.createElement("a");if(void 0!==t.download){var n=e.name,r=e.src;return t.setAttribute("href",r),t.setAttribute("download",n),t.style.display="none",document.body.appendChild(t),t.click(),document.body.removeChild(t),!0}}return!1}},{key:"createInlineStyle",value:function(t,n){var r=document.createElement("style");return e.addNonce(r,t),n||(n=document.head),n.appendChild(r),r}},{key:"removeInlineStyle",value:function(e){if(this.isExist(e)){try{e.parentNode.removeChild(e)}catch(e){}e=null}return e}},{key:"addNonce",value:function(e,t){try{t||(t=process.env.REACT_APP_CSS_NONCE)}catch(e){}t&&e.setAttribute("nonce",t)}},{key:"getTargetElement",value:function(e){if(!e)return null;if("document"===e)return document;if("window"===e)return window;if("object"===p(e)&&e.hasOwnProperty("current"))return this.isExist(e.current)?e.current:null;var t,n=(t=e)&&t.constructor&&t.call&&t.apply?e():e;return n&&9===n.nodeType||this.isExist(n)?n:null}},{key:"getAttributeNames",value:function(e){var t,n,r;for(n=[],r=e.attributes,t=0;t<r.length;++t)n.push(r[t].nodeName);return n.sort(),n}},{key:"isEqualElement",value:function(t,n){var r,o,i,l,a;if(r=e.getAttributeNames(t),o=e.getAttributeNames(n),r.join(",")!==o.join(","))return!1;for(var s=0;s<r.length;++s)if("style"===(i=r[s]))for(var u=t.style,c=n.style,p=/^\d+$/,f=0,d=Object.keys(u);f<d.length;f++){var m=d[f];if(!p.test(m)&&u[m]!==c[m])return!1}else if(t.getAttribute(i)!==n.getAttribute(i))return!1;for(l=t.firstChild,a=n.firstChild;l&&a;l=l.nextSibling,a=a.nextSibling){if(l.nodeType!==a.nodeType)return!1;if(1===l.nodeType){if(!e.isEqualElement(l,a))return!1}else if(l.nodeValue!==a.nodeValue)return!1}return!l&&!a}},{key:"hasCSSAnimation",value:function(e){if(e){var t=getComputedStyle(e);return parseFloat(t.getPropertyValue("animation-duration")||"0")>0}return!1}},{key:"hasCSSTransition",value:function(e){if(e){var t=getComputedStyle(e);return parseFloat(t.getPropertyValue("transition-duration")||"0")>0}return!1}}])}();function w(){return w=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},w.apply(null,arguments)}function k(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return E(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?E(e,t):void 0}}(e))||t){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,l=!0,a=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return l=e.done,e},e:function(e){a=!0,i=e},f:function(){try{l||null==n.return||n.return()}finally{if(a)throw i}}}}function E(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}v(x,"DATA_PROPS",["data-"]),v(x,"ARIA_PROPS",["aria","focus-target"]);var S=function(){return g((function e(){m(this,e)}),0,[{key:"equals",value:function(e,t,n){return n&&e&&"object"===p(e)&&t&&"object"===p(t)?this.deepEquals(this.resolveFieldData(e,n),this.resolveFieldData(t,n)):this.deepEquals(e,t)}},{key:"deepEquals",value:function(e,t){if(e===t)return!0;if(e&&t&&"object"===p(e)&&"object"===p(t)){var n,r,o,i=Array.isArray(e),l=Array.isArray(t);if(i&&l){if((r=e.length)!==t.length)return!1;for(n=r;0!=n--;)if(!this.deepEquals(e[n],t[n]))return!1;return!0}if(i!==l)return!1;var a=e instanceof Date,s=t instanceof Date;if(a!==s)return!1;if(a&&s)return e.getTime()===t.getTime();var u=e instanceof RegExp,c=t instanceof RegExp;if(u!==c)return!1;if(u&&c)return e.toString()===t.toString();var f=Object.keys(e);if((r=f.length)!==Object.keys(t).length)return!1;for(n=r;0!=n--;)if(!Object.prototype.hasOwnProperty.call(t,f[n]))return!1;for(n=r;0!=n--;)if(o=f[n],!this.deepEquals(e[o],t[o]))return!1;return!0}return e!=e&&t!=t}},{key:"resolveFieldData",value:function(e,t){if(!e||!t)return null;try{var n=e[t];if(this.isNotEmpty(n))return n}catch(e){}if(Object.keys(e).length){if(this.isFunction(t))return t(e);if(this.isNotEmpty(e[t]))return e[t];if(-1===t.indexOf("."))return e[t];for(var r=t.split("."),o=e,i=0,l=r.length;i<l;++i){if(null==o)return null;o=o[r[i]]}return o}return null}},{key:"findDiffKeys",value:function(e,t){return e&&t?Object.keys(e).filter((function(e){return!t.hasOwnProperty(e)})).reduce((function(t,n){return t[n]=e[n],t}),{}):{}}},{key:"reduceKeys",value:function(e,t){var n={};return e&&t&&0!==t.length?(Object.keys(e).filter((function(e){return t.some((function(t){return e.startsWith(t)}))})).forEach((function(t){n[t]=e[t],delete e[t]})),n):n}},{key:"reorderArray",value:function(e,t,n){e&&t!==n&&(n>=e.length&&(n%=e.length,t%=e.length),e.splice(n,0,e.splice(t,1)[0]))}},{key:"findIndexInList",value:function(e,t,n){var r=this;return t?n?t.findIndex((function(t){return r.equals(t,e,n)})):t.findIndex((function(t){return t===e})):-1}},{key:"getJSXElement",value:function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return this.isFunction(e)?e.apply(void 0,n):e}},{key:"getItemValue",value:function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return this.isFunction(e)?e.apply(void 0,n):e}},{key:"getProp",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=e?e[t]:void 0;return void 0===r?n[t]:r}},{key:"getPropCaseInsensitive",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=this.toFlatCase(t);for(var o in e)if(e.hasOwnProperty(o)&&this.toFlatCase(o)===r)return e[o];for(var i in n)if(n.hasOwnProperty(i)&&this.toFlatCase(i)===r)return n[i]}},{key:"getMergedProps",value:function(e,t){return Object.assign({},t,e)}},{key:"getDiffProps",value:function(e,t){return this.findDiffKeys(e,t)}},{key:"getPropValue",value:function(e){if(!this.isFunction(e))return e;for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];if(1===n.length){var o=n[0];return e(Array.isArray(o)?o[0]:o)}return e.apply(void 0,n)}},{key:"getComponentProp",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return this.isNotEmpty(e)?this.getProp(e.props,t,n):void 0}},{key:"getComponentProps",value:function(e,t){return this.isNotEmpty(e)?this.getMergedProps(e.props,t):void 0}},{key:"getComponentDiffProps",value:function(e,t){return this.isNotEmpty(e)?this.getDiffProps(e.props,t):void 0}},{key:"isValidChild",value:function(e,t,n){if(e){var r,o=this.getComponentProp(e,"__TYPE")||(e.type?e.type.displayName:void 0);!o&&null!=e&&null!==(r=e.type)&&void 0!==r&&null!==(r=r._payload)&&void 0!==r&&r.value&&(o=e.type._payload.value.find((function(e){return e===t})));var i=o===t;try{0}catch(e){}return i}return!1}},{key:"getRefElement",value:function(e){return e?"object"===p(e)&&e.hasOwnProperty("current")?e.current:e:null}},{key:"combinedRefs",value:function(e,t){e&&t&&("function"==typeof t?t(e.current):t.current=e.current)}},{key:"removeAccents",value:function(e){return e&&e.search(/[\xC0-\xFF]/g)>-1&&(e=e.replace(/[\xC0-\xC5]/g,"A").replace(/[\xC6]/g,"AE").replace(/[\xC7]/g,"C").replace(/[\xC8-\xCB]/g,"E").replace(/[\xCC-\xCF]/g,"I").replace(/[\xD0]/g,"D").replace(/[\xD1]/g,"N").replace(/[\xD2-\xD6\xD8]/g,"O").replace(/[\xD9-\xDC]/g,"U").replace(/[\xDD]/g,"Y").replace(/[\xDE]/g,"P").replace(/[\xE0-\xE5]/g,"a").replace(/[\xE6]/g,"ae").replace(/[\xE7]/g,"c").replace(/[\xE8-\xEB]/g,"e").replace(/[\xEC-\xEF]/g,"i").replace(/[\xF1]/g,"n").replace(/[\xF2-\xF6\xF8]/g,"o").replace(/[\xF9-\xFC]/g,"u").replace(/[\xFE]/g,"p").replace(/[\xFD\xFF]/g,"y")),e}},{key:"toFlatCase",value:function(e){return this.isNotEmpty(e)&&this.isString(e)?e.replace(/(-|_)/g,"").toLowerCase():e}},{key:"toCapitalCase",value:function(e){return this.isNotEmpty(e)&&this.isString(e)?e[0].toUpperCase()+e.slice(1):e}},{key:"trim",value:function(e){return this.isNotEmpty(e)&&this.isString(e)?e.trim():e}},{key:"isEmpty",value:function(e){return null==e||""===e||Array.isArray(e)&&0===e.length||!(e instanceof Date)&&"object"===p(e)&&0===Object.keys(e).length}},{key:"isNotEmpty",value:function(e){return!this.isEmpty(e)}},{key:"isFunction",value:function(e){return!!(e&&e.constructor&&e.call&&e.apply)}},{key:"isObject",value:function(e){return null!==e&&e instanceof Object&&e.constructor===Object}},{key:"isDate",value:function(e){return null!==e&&e instanceof Date&&e.constructor===Date}},{key:"isArray",value:function(e){return null!==e&&Array.isArray(e)}},{key:"isString",value:function(e){return null!==e&&"string"==typeof e}},{key:"isPrintableCharacter",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return this.isNotEmpty(e)&&1===e.length&&e.match(/\S| /)}},{key:"isLetter",value:function(e){return/^[a-zA-Z\u00C0-\u017F]$/.test(e)}},{key:"isScalar",value:function(e){return null!=e&&("string"==typeof e||"number"==typeof e||"bigint"==typeof e||"boolean"==typeof e)}},{key:"findLast",value:function(e,t){var n;if(this.isNotEmpty(e))try{n=e.findLast(t)}catch(r){n=d(e).reverse().find(t)}return n}},{key:"findLastIndex",value:function(e,t){var n=-1;if(this.isNotEmpty(e))try{n=e.findLastIndex(t)}catch(r){n=e.lastIndexOf(d(e).reverse().find(t))}return n}},{key:"sort",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,r=arguments.length>3?arguments[3]:void 0,o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:1,i=this.compare(e,t,r,n),l=n;return(this.isEmpty(e)||this.isEmpty(t))&&(l=1===o?n:o),l*i}},{key:"compare",value:function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:1,o=this.isEmpty(e),i=this.isEmpty(t);return o&&i?0:o?r:i?-r:"string"==typeof e&&"string"==typeof t?n(e,t):e<t?-1:e>t?1:0}},{key:"localeComparator",value:function(e){return new Intl.Collator(e,{numeric:!0}).compare}},{key:"findChildrenByKey",value:function(e,t){var n,r=k(e);try{for(r.s();!(n=r.n()).done;){var o=n.value;if(o.key===t)return o.children||[];if(o.children){var i=this.findChildrenByKey(o.children,t);if(i.length>0)return i}}}catch(e){r.e(e)}finally{r.f()}return[]}},{key:"mutateFieldData",value:function(e,t,n){if("object"===p(e)&&"string"==typeof t)for(var r=t.split("."),o=e,i=0,l=r.length;i<l;++i){if(i+1-l==0){o[r[i]]=n;break}o[r[i]]||(o[r[i]]={}),o=o[r[i]]}}}])}(),C=0;function O(){return C++,"".concat(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"pr_id_").concat(C)}function T(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}var P=function(){return g((function e(){m(this,e)}),0,[{key:"getJSXIcon",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=null;if(null!==e){var o=p(e),i=f(t.className,"string"===o&&e);if(r=a.createElement("span",w({},t,{className:i,key:O("icon")})),"string"!==o){var l=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?T(Object(n),!0).forEach((function(t){v(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):T(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({iconProps:t,element:r},n);return S.getJSXElement(e,l)}}return r}}])}();function I(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 j(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?I(Object(n),!0).forEach((function(t){v(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):I(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function A(e){if(e){var t=function(e){return"function"==typeof e},n=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).classNameMergeFunction,r=t(n);return e.reduce((function(e,o){if(!o)return e;var i=function(){var i=o[l];if("style"===l)e.style=j(j({},e.style),o.style);else if("className"===l){var a="";a=r?n(e.className,o.className):[e.className,o.className].join(" ").trim(),e.className=a||void 0}else if(t(i)){var s=e[l];e[l]=s?function(){s.apply(void 0,arguments),i.apply(void 0,arguments)}:i}else e[l]=i};for(var l in o)i();return e}),{})}}var D,N,L=(D=[],N=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;return d(D).reverse().find((function(n){return!!t||n.key===e}))||{key:e,value:n}},{get:function(e){return e&&parseInt(e.style.zIndex,10)||0},set:function(e,t,n,r){t&&(t.style.zIndex=String(function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:999,r=N(e,t,n),o=r.value+(r.key===e?0:n)+1;return D.push({key:e,value:o}),o}(e,n,r)))},clear:function(e){var t;e&&(t=L.get(e),D=D.filter((function(e){return e.value!==t})),e.style.zIndex="")},getCurrent:function(e,t){return function(e,t){return N(e,t).value}(e,t)}}),R=Object.freeze({STARTS_WITH:"startsWith",CONTAINS:"contains",NOT_CONTAINS:"notContains",ENDS_WITH:"endsWith",EQUALS:"equals",NOT_EQUALS:"notEquals",IN:"in",LESS_THAN:"lt",LESS_THAN_OR_EQUAL_TO:"lte",GREATER_THAN:"gt",GREATER_THAN_OR_EQUAL_TO:"gte",BETWEEN:"between",DATE_IS:"dateIs",DATE_IS_NOT:"dateIsNot",DATE_BEFORE:"dateBefore",DATE_AFTER:"dateAfter",CUSTOM:"custom"});function _(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return F(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?F(e,t):void 0}}(e))||t){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,l=!0,a=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return l=e.done,e},e:function(e){a=!0,i=e},f:function(){try{l||null==n.return||n.return()}finally{if(a)throw i}}}}function F(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var M={filter:function(e,t,n,r,o){var i=[];if(!e)return i;var l,a=_(e);try{for(a.s();!(l=a.n()).done;){var s=l.value;if("string"==typeof s){if(this.filters[r](s,n,o)){i.push(s);continue}}else{var u,c=_(t);try{for(c.s();!(u=c.n()).done;){var p=u.value,f=S.resolveFieldData(s,p);if(this.filters[r](f,n,o)){i.push(s);break}}}catch(e){c.e(e)}finally{c.f()}}}}catch(e){a.e(e)}finally{a.f()}return i},filters:{startsWith:function(e,t,n){if(null==t||""===t.trim())return!0;if(null==e)return!1;var r=S.removeAccents(t.toString()).toLocaleLowerCase(n);return S.removeAccents(e.toString()).toLocaleLowerCase(n).slice(0,r.length)===r},contains:function(e,t,n){if(null==t||"string"==typeof t&&""===t.trim())return!0;if(null==e)return!1;var r=S.removeAccents(t.toString()).toLocaleLowerCase(n);return-1!==S.removeAccents(e.toString()).toLocaleLowerCase(n).indexOf(r)},notContains:function(e,t,n){if(null==t||"string"==typeof t&&""===t.trim())return!0;if(null==e)return!1;var r=S.removeAccents(t.toString()).toLocaleLowerCase(n);return-1===S.removeAccents(e.toString()).toLocaleLowerCase(n).indexOf(r)},endsWith:function(e,t,n){if(null==t||""===t.trim())return!0;if(null==e)return!1;var r=S.removeAccents(t.toString()).toLocaleLowerCase(n),o=S.removeAccents(e.toString()).toLocaleLowerCase(n);return-1!==o.indexOf(r,o.length-r.length)},equals:function(e,t,n){return null==t||"string"==typeof t&&""===t.trim()||null!=e&&(e.getTime&&t.getTime?e.getTime()===t.getTime():S.removeAccents(e.toString()).toLocaleLowerCase(n)===S.removeAccents(t.toString()).toLocaleLowerCase(n))},notEquals:function(e,t,n){return null==t||"string"==typeof t&&""===t.trim()||(null==e||(e.getTime&&t.getTime?e.getTime()!==t.getTime():S.removeAccents(e.toString()).toLocaleLowerCase(n)!==S.removeAccents(t.toString()).toLocaleLowerCase(n)))},in:function(e,t){if(null==t||0===t.length)return!0;for(var n=0;n<t.length;n++)if(S.equals(e,t[n]))return!0;return!1},notIn:function(e,t){if(null==t||0===t.length)return!0;for(var n=0;n<t.length;n++)if(S.equals(e,t[n]))return!1;return!0},between:function(e,t){return null==t||null==t[0]||null==t[1]||null!=e&&(e.getTime?t[0].getTime()<=e.getTime()&&e.getTime()<=t[1].getTime():t[0]<=e&&e<=t[1])},lt:function(e,t){return null==t||null!=e&&(e.getTime&&t.getTime?e.getTime()<t.getTime():e<t)},lte:function(e,t){return null==t||null!=e&&(e.getTime&&t.getTime?e.getTime()<=t.getTime():e<=t)},gt:function(e,t){return null==t||null!=e&&(e.getTime&&t.getTime?e.getTime()>t.getTime():e>t)},gte:function(e,t){return null==t||null!=e&&(e.getTime&&t.getTime?e.getTime()>=t.getTime():e>=t)},dateIs:function(e,t){return null==t||null!=e&&e.toDateString()===t.toDateString()},dateIsNot:function(e,t){return null==t||null!=e&&e.toDateString()!==t.toDateString()},dateBefore:function(e,t){return null==t||null!=e&&e.getTime()<t.getTime()},dateAfter:function(e,t){return null==t||null!=e&&e.getTime()>t.getTime()}},register:function(e,t){this.filters[e]=t}};function z(e){return z="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},z(e)}function q(e){var t=function(e,t){if("object"!=z(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=z(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==z(t)?t:t+""}function B(e,t,n){return(t=q(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function H(e,t,n){return Object.defineProperty(e,"prototype",{writable:!1}),e}var V=H((function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}));B(V,"ripple",!1),B(V,"inputStyle","outlined"),B(V,"locale","en"),B(V,"appendTo",null),B(V,"cssTransition",!0),B(V,"autoZIndex",!0),B(V,"hideOverlaysOnDocumentScrolling",!1),B(V,"nonce",null),B(V,"nullSortOrder",1),B(V,"zIndex",{modal:1100,overlay:1e3,menu:1e3,tooltip:1100,toast:1200}),B(V,"pt",void 0),B(V,"filterMatchModeOptions",{text:[R.STARTS_WITH,R.CONTAINS,R.NOT_CONTAINS,R.ENDS_WITH,R.EQUALS,R.NOT_EQUALS],numeric:[R.EQUALS,R.NOT_EQUALS,R.LESS_THAN,R.LESS_THAN_OR_EQUAL_TO,R.GREATER_THAN,R.GREATER_THAN_OR_EQUAL_TO],date:[R.DATE_IS,R.DATE_IS_NOT,R.DATE_BEFORE,R.DATE_AFTER]}),B(V,"changeTheme",(function(e,t,n,r){var o,i=document.getElementById(n);if(!i)throw Error("Element with id ".concat(n," not found."));var l=i.getAttribute("href").replace(e,t),a=document.createElement("link");a.setAttribute("rel","stylesheet"),a.setAttribute("id",n),a.setAttribute("href",l),a.addEventListener("load",(function(){r&&r()})),null===(o=i.parentNode)||void 0===o||o.replaceChild(a,i)}));var U={en:{accept:"Yes",addRule:"Add Rule",am:"AM",apply:"Apply",cancel:"Cancel",choose:"Choose",chooseDate:"Choose Date",chooseMonth:"Choose Month",chooseYear:"Choose Year",clear:"Clear",completed:"Completed",contains:"Contains",custom:"Custom",dateAfter:"Date is after",dateBefore:"Date is before",dateFormat:"mm/dd/yy",dateIs:"Date is",dateIsNot:"Date is not",dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesMin:["Su","Mo","Tu","We","Th","Fr","Sa"],dayNamesShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],emptyFilterMessage:"No results found",emptyMessage:"No available options",emptySearchMessage:"No results found",emptySelectionMessage:"No selected item",endsWith:"Ends with",equals:"Equals",fileSizeTypes:["B","KB","MB","GB","TB","PB","EB","ZB","YB"],filter:"Filter",firstDayOfWeek:0,gt:"Greater than",gte:"Greater than or equal to",lt:"Less than",lte:"Less than or equal to",matchAll:"Match All",matchAny:"Match Any",medium:"Medium",monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],monthNamesShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],nextDecade:"Next Decade",nextHour:"Next Hour",nextMinute:"Next Minute",nextMonth:"Next Month",nextSecond:"Next Second",nextYear:"Next Year",noFilter:"No Filter",notContains:"Not contains",notEquals:"Not equals",now:"Now",passwordPrompt:"Enter a password",pending:"Pending",pm:"PM",prevDecade:"Previous Decade",prevHour:"Previous Hour",prevMinute:"Previous Minute",prevMonth:"Previous Month",prevSecond:"Previous Second",prevYear:"Previous Year",reject:"No",removeRule:"Remove Rule",searchMessage:"{0} results are available",selectionMessage:"{0} items selected",showMonthAfterYear:!1,startsWith:"Starts with",strong:"Strong",today:"Today",upload:"Upload",weak:"Weak",weekHeader:"Wk",aria:{cancelEdit:"Cancel Edit",close:"Close",collapseRow:"Row Collapsed",editRow:"Edit Row",expandRow:"Row Expanded",falseLabel:"False",filterConstraint:"Filter Constraint",filterOperator:"Filter Operator",firstPageLabel:"First Page",gridView:"Grid View",hideFilterMenu:"Hide Filter Menu",jumpToPageDropdownLabel:"Jump to Page Dropdown",jumpToPageInputLabel:"Jump to Page Input",lastPageLabel:"Last Page",listLabel:"Option List",listView:"List View",moveAllToSource:"Move All to Source",moveAllToTarget:"Move All to Target",moveBottom:"Move Bottom",moveDown:"Move Down",moveToSource:"Move to Source",moveToTarget:"Move to Target",moveTop:"Move Top",moveUp:"Move Up",navigation:"Navigation",next:"Next",nextPageLabel:"Next Page",nullLabel:"Not Selected",pageLabel:"Page {page}",otpLabel:"Please enter one time password character {0}",passwordHide:"Hide Password",passwordShow:"Show Password",previous:"Previous",prevPageLabel:"Previous Page",rotateLeft:"Rotate Left",rotateRight:"Rotate Right",rowsPerPageLabel:"Rows per page",saveEdit:"Save Edit",scrollTop:"Scroll Top",selectAll:"All items selected",selectRow:"Row Selected",showFilterMenu:"Show Filter Menu",slide:"Slide",slideNumber:"{slideNumber}",star:"1 star",stars:"{star} stars",trueLabel:"True",unselectAll:"All items unselected",unselectRow:"Row Unselected",zoomImage:"Zoom Image",zoomIn:"Zoom In",zoomOut:"Zoom Out"}}};function W(e,t){if(e.includes("__proto__")||e.includes("prototype"))throw new Error("Unsafe key detected");var n=V.locale;try{return Y(n)[e]}catch(t){throw new Error("The ".concat(e," option is not found in the current locale('").concat(n,"')."))}}function $(e,t){if(e.includes("__proto__")||e.includes("prototype"))throw new Error("Unsafe ariaKey detected");var n=V.locale;try{var r=Y(n).aria[e];if(r)for(var o in t)t.hasOwnProperty(o)&&(r=r.replace("{".concat(o,"}"),t[o]));return r}catch(t){throw new Error("The ".concat(e," option is not found in the current locale('").concat(n,"')."))}}function Y(e){var t=e||V.locale;if(t.includes("__proto__")||t.includes("prototype"))throw new Error("Unsafe locale detected");return U[t]}function K(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function G(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i,l,a=[],s=!0,u=!1;try{if(i=(n=n.call(e)).next,0===t);else for(;!(s=(r=i.call(n)).done)&&(a.push(r.value),a.length!==t);s=!0);}catch(e){u=!0,o=e}finally{try{if(!s&&null!=n.return&&(l=n.return(),Object(l)!==l))return}finally{if(u)throw o}}return a}}(e,t)||function(e,t){if(e){if("string"==typeof e)return K(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?K(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var Z=t.createContext(),X=function(e){var n,r,o,i,l,a,s,u,c,p,f,d,m,h,g,v,y=null!==(n=e.value)&&void 0!==n?n:{},b=G(t.useState(null!==(r=y.ripple)&&void 0!==r&&r),2),x=b[0],w=b[1],k=G(t.useState(null!==(o=y.inputStyle)&&void 0!==o?o:"outlined"),2),E=k[0],S=k[1],C=G(t.useState(null!==(i=y.locale)&&void 0!==i?i:"en"),2),O=C[0],T=C[1],P=G(t.useState(null!==(l=y.appendTo)&&void 0!==l?l:null),2),I=P[0],j=P[1],A=G(t.useState(null!==(a=y.styleContainer)&&void 0!==a?a:null),2),D=A[0],N=A[1],L=G(t.useState(null===(s=y.cssTransition)||void 0===s||s),2),_=L[0],F=L[1],M=G(t.useState(null===(u=y.autoZIndex)||void 0===u||u),2),z=M[0],q=M[1],B=G(t.useState(null!==(c=y.hideOverlaysOnDocumentScrolling)&&void 0!==c&&c),2),H=B[0],U=B[1],W=G(t.useState(null!==(p=y.nonce)&&void 0!==p?p:null),2),$=W[0],Y=W[1],K=G(t.useState(null!==(f=y.nullSortOrder)&&void 0!==f?f:1),2),X=K[0],J=K[1],Q=G(t.useState(null!==(d=y.zIndex)&&void 0!==d?d:{modal:1100,overlay:1e3,menu:1e3,tooltip:1100,toast:1200}),2),ee=Q[0],te=Q[1],ne=G(t.useState(null!==(m=y.ptOptions)&&void 0!==m?m:{mergeSections:!0,mergeProps:!0}),2),re=ne[0],oe=ne[1],ie=G(t.useState(null!==(h=y.pt)&&void 0!==h?h:void 0),2),le=ie[0],ae=ie[1],se=G(t.useState(null!==(g=y.unstyled)&&void 0!==g&&g),2),ue=se[0],ce=se[1],pe=G(t.useState(null!==(v=y.filterMatchModeOptions)&&void 0!==v?v:{text:[R.STARTS_WITH,R.CONTAINS,R.NOT_CONTAINS,R.ENDS_WITH,R.EQUALS,R.NOT_EQUALS],numeric:[R.EQUALS,R.NOT_EQUALS,R.LESS_THAN,R.LESS_THAN_OR_EQUAL_TO,R.GREATER_THAN,R.GREATER_THAN_OR_EQUAL_TO],date:[R.DATE_IS,R.DATE_IS_NOT,R.DATE_BEFORE,R.DATE_AFTER]}),2),fe=pe[0],de=pe[1];t.useEffect((function(){V.ripple=x}),[x]),t.useEffect((function(){V.inputStyle=E}),[E]),t.useEffect((function(){V.locale=O}),[O]);var me={changeTheme:function(e,t,n,r){var o,i=document.getElementById(n);if(!i)throw Error("Element with id ".concat(n," not found."));var l=i.getAttribute("href").replace(e,t),a=document.createElement("link");a.setAttribute("rel","stylesheet"),a.setAttribute("id",n),a.setAttribute("href",l),a.addEventListener("load",(function(){r&&r()})),null===(o=i.parentNode)||void 0===o||o.replaceChild(a,i)},ripple:x,setRipple:w,inputStyle:E,setInputStyle:S,locale:O,setLocale:T,appendTo:I,setAppendTo:j,styleContainer:D,setStyleContainer:N,cssTransition:_,setCssTransition:F,autoZIndex:z,setAutoZIndex: