From 6cd79ecbdc12a653ff1ad9351d55e95261b46708 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andrey=20Ca=C3=B1on?= <36200299+andrey-canon@users.noreply.github.com> Date: Wed, 17 Jul 2024 12:59:24 -0500 Subject: [PATCH] feat: update frontend-essentials to 2.7.0 (#204) --- .../css/feedback_carousel.css | 3 +- .../feedback_carousel/js/feedback_carousel.js | 2 +- .../static/tenant_stats/css/tenant_stats.css | 3 +- .../static/tenant_stats/js/tenant_stats.js | 2 +- .../static/user_profile/css/user_profile.css | 5 ++-- .../static/user_profile/js/user_profile.js | 2 +- .../src/components/UserProfileForm/index.scss | 17 +++++++++++ package-lock.json | 30 ++++++++++++++----- package.json | 2 +- 9 files changed, 51 insertions(+), 15 deletions(-) diff --git a/eox_nelp/static/feedback_carousel/css/feedback_carousel.css b/eox_nelp/static/feedback_carousel/css/feedback_carousel.css index 80e2d3c2..31a18e08 100644 --- a/eox_nelp/static/feedback_carousel/css/feedback_carousel.css +++ b/eox_nelp/static/feedback_carousel/css/feedback_carousel.css @@ -4,7 +4,8 @@ .feedback-modal label,.feedback-modal p,.feedback-modal textarea{font-size:var(--pgn-typography-font-size-sm)}.feedback-modal .pgn__form-group{display:flex;text-align:center}.feedback-modal .pgn__form-group .rating-container{padding:1px}[dir=ltr] .feedback-modal .pgn__form-group .rating-container{margin-left:10px}[dir=rtl] .feedback-modal .pgn__form-group .rating-container{margin-right:10px}.feedback-modal .pgn__form-group .rating-container label{font-size:var(--pgn-typography-font-size-lg)!important}.feedback-modal .pgn__form-group .rating-label{margin-top:3px}.feedback-modal .pgn__form-group .pgn__form-control-set{flex-direction:row}[dir=ltr] .feedback-modal .pgn__form-group .pgn__form-control-set .public-option,[dir=ltr] .feedback-modal .pgn__form-group .pgn__form-control-set .recommended-option{margin:0 0 10px 15px}[dir=rtl] .feedback-modal .pgn__form-group .pgn__form-control-set .public-option,[dir=rtl] .feedback-modal .pgn__form-group .pgn__form-control-set .recommended-option{margin:0 15px 10px 0}.feedback-modal .pgn__form-group .pgn__form-control-set .public-option label,.feedback-modal .pgn__form-group .pgn__form-control-set .recommended-option label{font-size:var(--pgn-typography-font-size-sm)} .feedback-card{border:2px solid var(--pgn-color-primary-200);border-radius:16px;display:flex;flex-direction:column;font-size:var(--pgn-typography-font-size-base);height:180px;overflow:auto;padding:1.5rem 1.5rem 0;text-align:justify;transition:box-shadow .3s ease;width:400px}.feedback-card:hover{box-shadow:0 0 10px var(--pgn-color-primary-300)}.feedback-card hr{border-color:var(--pgn-color-primary-400);margin:0}.feedback-card .feedback-header{display:flex;margin-bottom:10px;width:50%}.feedback-card .feedback-header .feedback-username{align-items:center;padding-top:2px}.feedback-card .feedback-header .feedback-rating{font-size:var(--pgn-typography-font-size-lg);padding:1px}[dir=ltr] .feedback-card .feedback-header .feedback-rating{margin-left:10px}[dir=rtl] .feedback-card .feedback-header .feedback-rating{margin-right:10px}.feedback-card .feedback-body{flex-grow:1;font-size:var(--pgn-typography-font-size-sm);margin-top:10px}.feedback-card .feedback-footer .feedback-coursename{color:var(--pgn-color-primary-base);font-size:var(--pgn-typography-font-size-xs);padding-bottom:5px;text-align:end} .feedback-container{width:100%}.feedback-container .feedback-carousel-title{color:var(--pgn-color-primary-base)}[dir=ltr] .feedback-container .feedback-carousel-title{margin:10px 0 50px 50px}[dir=rtl] .feedback-container .feedback-carousel-title{margin:10px 50px 50px 0}.feedback-container .feedback-carousel{padding-bottom:40px;width:100%}.feedback-container .feedback-carousel .carousel-indicators li{background-color:var(--pgn-color-primary-400)}.feedback-container .feedback-carousel .feedback-carousel-row{display:flex;justify-content:center;padding-left:10px;padding-right:10px}[dir=ltr] .feedback-container .feedback-carousel .feedback-carousel-row .feedback-card{margin-right:10px}[dir=rtl] .feedback-container .feedback-carousel .feedback-carousel-row .feedback-card{margin-left:10px}[dir=ltr] .feedback-container .feedback-carousel .feedback-carousel-row .feedback-card:last-child{margin-right:0}[dir=rtl] .feedback-container .feedback-carousel .feedback-carousel-row .feedback-card:last-child{margin-left:0} -.user-profile-modal .user-profile-form .user-profile-field{margin-bottom:15px} +.react-international-phone-country-selector{position:relative}.react-international-phone-country-selector-button{align-items:center;-moz-appearance:button;appearance:button;-webkit-appearance:button;background-color:var(--react-international-phone-country-selector-background-color,var(--react-international-phone-background-color,#fff));border:1px solid var(--react-international-phone-country-selector-border-color,var(--react-international-phone-border-color,#dcdcdc));box-sizing:border-box;cursor:pointer;display:flex;height:var(--react-international-phone-height,36px);justify-content:center;margin:0;padding:0;text-transform:none;-webkit-user-select:none;-moz-user-select:none;user-select:none}.react-international-phone-country-selector-button:hover{background-color:var(--react-international-phone-country-selector-background-color-hover,#f5f5f5)}.react-international-phone-country-selector-button--hide-dropdown{cursor:auto}.react-international-phone-country-selector-button--hide-dropdown:hover{background-color:transparent}.react-international-phone-country-selector-button__button-content{align-items:center;display:flex;justify-content:center}.react-international-phone-country-selector-button__flag-emoji{margin:0 4px}.react-international-phone-country-selector-button__flag-emoji--disabled{opacity:.75}.react-international-phone-country-selector-button__dropdown-arrow{border-left:var(--react-international-phone-country-selector-arrow-size,4px) solid transparent;border-right:var(--react-international-phone-country-selector-arrow-size,4px) solid transparent;border-top:var(--react-international-phone-country-selector-arrow-size,4px) solid var(--react-international-phone-country-selector-arrow-color,#777);transition:all .1s ease-out}[dir=ltr] .react-international-phone-country-selector-button__dropdown-arrow{margin-right:4px}[dir=rtl] .react-international-phone-country-selector-button__dropdown-arrow{margin-left:4px}.react-international-phone-country-selector-button__dropdown-arrow--active{transform:rotateX(180deg)}.react-international-phone-country-selector-button__dropdown-arrow--disabled{border-top-color:var(--react-international-phone-disabled-country-selector-arrow-color,#999)}.react-international-phone-country-selector-button--disabled{cursor:auto}.react-international-phone-country-selector-button--disabled,.react-international-phone-country-selector-button--disabled:hover{background-color:var(--react-international-phone-disabled-country-selector-background-color,var(--react-international-phone-disabled-background-color,#f5f5f5))}.react-international-phone-flag-emoji{box-sizing:border-box;height:var(--react-international-phone-flag-height,24px);width:var(--react-international-phone-flag-width,24px)}.react-international-phone-country-selector-dropdown{background-color:var(--react-international-phone-dropdown-item-background-color,var(--react-international-phone-background-color,#fff));box-shadow:var(--react-international-phone-dropdown-shadow,2px 2px 16px rgba(0,0,0,.25));color:var(--react-international-phone-dropdown-item-text-color,var(--react-international-phone-text-color,#222));display:flex;flex-direction:column;list-style:none;margin:0;max-height:200px;overflow-y:scroll;padding:4px 0;position:absolute;top:var(--react-international-phone-dropdown-top,44px);width:300px;z-index:1}[dir=ltr] .react-international-phone-country-selector-dropdown{left:var(--react-international-phone-dropdown-left,0)}[dir=rtl] .react-international-phone-country-selector-dropdown{right:var(--react-international-phone-dropdown-left,0)}.react-international-phone-country-selector-dropdown__preferred-list-divider{background:var(--react-international-phone-dropdown-preferred-list-divider-color,var(--react-international-phone-border-color,#dcdcdc));border:none;height:1px;margin:var(--react-international-phone-dropdown-preferred-list-divider-margin,0)}.react-international-phone-country-selector-dropdown__list-item{align-items:center;box-sizing:border-box;display:flex;min-height:var(--react-international-phone-dropdown-item-height,28px);padding:2px 8px}[dir=ltr] .react-international-phone-country-selector-dropdown__list-item-flag-emoji{margin-right:8px}[dir=rtl] .react-international-phone-country-selector-dropdown__list-item-flag-emoji{margin-left:8px}.react-international-phone-country-selector-dropdown__list-item-country-name{font-size:var(--react-international-phone-dropdown-item-font-size,14px);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}[dir=ltr] .react-international-phone-country-selector-dropdown__list-item-country-name{margin-right:8px}[dir=rtl] .react-international-phone-country-selector-dropdown__list-item-country-name{margin-left:8px}.react-international-phone-country-selector-dropdown__list-item-dial-code{color:var(--react-international-phone-dropdown-item-dial-code-color,gray);font-size:var(--react-international-phone-dropdown-item-font-size,14px)}.react-international-phone-country-selector-dropdown__list-item:hover{background-color:var(--react-international-phone-selected-dropdown-item-background-color,var(--react-international-phone-selected-dropdown-item-background-color,#f5f5f5));cursor:pointer}.react-international-phone-country-selector-dropdown__list-item--focused,.react-international-phone-country-selector-dropdown__list-item--selected{background-color:var(--react-international-phone-selected-dropdown-item-background-color,#f5f5f5);color:var(--react-international-phone-selected-dropdown-item-text-color,var(--react-international-phone-text-color,#222))}.react-international-phone-country-selector-dropdown__list-item--focused .react-international-phone-country-selector-dropdown__list-item-dial-code,.react-international-phone-country-selector-dropdown__list-item--selected .react-international-phone-country-selector-dropdown__list-item-dial-code{color:var(--react-international-phone-selected-dropdown-item-dial-code-color,var(--react-international-phone-dropdown-item-dial-code-color,gray))}.react-international-phone-country-selector-dropdown__list-item--focused{background-color:var(--react-international-phone-selected-dropdown-item-background-color,var(--react-international-phone-selected-dropdown-item-background-color,#f5f5f5))}.react-international-phone-dial-code-preview{align-items:center;background-color:var(--react-international-phone-dial-code-preview-background-color,var(--react-international-phone-background-color,#fff));border:1px solid var(--react-international-phone-dial-code-preview-border-color,var(--react-international-phone-border-color,#dcdcdc));color:var(--react-international-phone-dial-code-preview-text-color,var(--react-international-phone-text-color,#222));display:flex;font-size:var(--react-international-phone-dial-code-preview-font-size,var(--react-international-phone-font-size,13px));justify-content:center;padding:0 8px}[dir=ltr] .react-international-phone-dial-code-preview{margin-right:-1px}[dir=rtl] .react-international-phone-dial-code-preview{margin-left:-1px}.react-international-phone-dial-code-preview--disabled{background-color:var(--react-international-phone-dial-code-preview-disabled-background-color,var(--react-international-phone-disabled-background-color,#f5f5f5));color:var(--react-international-phone-dial-code-preview-disabled-text-color,var(--react-international-phone-disabled-text-color,#666))}.react-international-phone-input-container{display:flex}.react-international-phone-input-container .react-international-phone-country-selector-button{border-radius:var(--react-international-phone-border-radius,4px)}[dir=ltr] .react-international-phone-input-container .react-international-phone-country-selector-button{border-bottom-right-radius:0;border-top-right-radius:0;margin-right:-1px}[dir=rtl] .react-international-phone-input-container .react-international-phone-country-selector-button{border-bottom-left-radius:0;border-top-left-radius:0;margin-left:-1px}.react-international-phone-input-container .react-international-phone-input{background-color:var(--react-international-phone-background-color,#fff);border:1px solid var(--react-international-phone-border-color,#dcdcdc);border-radius:var(--react-international-phone-border-radius,4px);box-sizing:border-box;color:var(--react-international-phone-text-color,#222);font-family:inherit;font-size:var(--react-international-phone-font-size,13px);height:var(--react-international-phone-height,36px);margin:0;overflow:visible;padding:0 8px}[dir=ltr] .react-international-phone-input-container .react-international-phone-input{border-bottom-left-radius:0;border-top-left-radius:0}[dir=rtl] .react-international-phone-input-container .react-international-phone-input{border-bottom-right-radius:0;border-top-right-radius:0}.react-international-phone-input-container .react-international-phone-input:focus{outline:none}.react-international-phone-input-container .react-international-phone-input--disabled{background-color:var(--react-international-phone-disabled-background-color,#f5f5f5);color:var(--react-international-phone-disabled-text-color,#666)} +.user-profile-modal{overflow:visible!important}.user-profile-modal .user-profile-form{overflow:visible}.user-profile-modal .user-profile-form .user-profile-phone-number-field .phone-number-input{display:flex;position:relative}.user-profile-modal .user-profile-form .user-profile-phone-number-field .phone-number-input .form-control{padding:var(--pgn-spacing-form-input-padding-y-base) calc(var(--pgn-spacing-form-input-padding-x-base) + 50px)}.user-profile-modal .user-profile-form .user-profile-phone-number-field .phone-number-input .react-international-phone-country-selector{margin:0 var(--pgn-spacing-form-input-padding-x-base);position:absolute;top:50%;transform:translateY(-50%);z-index:10}.user-profile-modal .user-profile-form .user-profile-phone-number-field .phone-number-input .react-international-phone-country-selector .react-international-phone-country-selector-button{background:#0000;border:none} .stats-card{border-radius:10px;margin:5px 10px;max-width:200px;overflow:hidden;padding:10px}.stats-card .stats-header{display:flex}.stats-card .stats-header .stats-image{margin:5px}.stats-card .stats-header .stats-image img{height:60px;max-width:100px;min-width:60px;width:auto}.stats-card .stats-header .stats-count{color:var(--pgn-color-primary-700);font-size:var(--pgn-typography-font-size-h2);margin:auto;padding-left:5px;padding-right:5px}.stats-card .stats-title{color:var(--pgn-color-primary-400);font-size:var(--pgn-typography-font-size-small-base);padding:5px;text-align:center}.stats-card:hover{box-shadow:0 0 10px var(--pgn-color-primary-200);transition:transform .3s ease-in-out}[dir=ltr] .stats-card:hover{transform:translate(2px,-2px)}[dir=rtl] .stats-card:hover{transform:translate(-2px,-2px)} .stats-container{margin:12px;width:100%}.stats-container h4{color:var(--pgn-color-primary-base)}.stats-container .stats{display:flex;flex-wrap:wrap;justify-content:center} @keyframes react-loading-skeleton { diff --git a/eox_nelp/static/feedback_carousel/js/feedback_carousel.js b/eox_nelp/static/feedback_carousel/js/feedback_carousel.js index 2c84576c..63a460df 100644 --- a/eox_nelp/static/feedback_carousel/js/feedback_carousel.js +++ b/eox_nelp/static/feedback_carousel/js/feedback_carousel.js @@ -1,2 +1,2 @@ /*! For license information please see feedback_carousel.js.LICENSE.txt */ -(()=>{var e,t,n={9541:(e,t,n)=>{"use strict";n.d(t,{PB:()=>c,Z5:()=>u,jK:()=>s,oG:()=>f});var r,o=n(5826),a=n.n(o),i={config:a().object.isRequired,httpClient:a().oneOfType([a().func,a().object]).isRequired,loggingService:a().shape({logError:a().func.isRequired,logInfo:a().func.isRequired}).isRequired},l={sendTrackingLogEvent:a().func.isRequired,identifyAuthenticatedUser:a().func.isRequired,identifyAnonymousUser:a().func.isRequired,sendTrackEvent:a().func.isRequired,sendPageEvent:a().func.isRequired};function s(e,t){return a().checkPropTypes(i,t,"property","Analytics"),r=new e(t),a().checkPropTypes(l,r,"property","AnalyticsService"),r}function u(e,t){r.identifyAuthenticatedUser(e,t)}function c(e){return r.identifyAnonymousUser(e)}function f(e,t){r.sendTrackEvent(e,t)}},3865:(e,t,n)=>{"use strict";n.d(t,{A:()=>ie});var r=n(3159),o=n.n(r),a=n(5826),i=n.n(a);function l(e){return l="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},l(e)}function s(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 u(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=new Array(t);n")?"":c;t.customAttributes=u(u({},t.customAttributes),{},{httpErrorType:"api-response-error",httpErrorStatus:l,httpErrorResponseData:f,httpErrorRequestUrl:a,httpErrorRequestMethod:i}),t.message="Axios Error (Response): ".concat(l," - See custom attributes for details.")}else n?(t.customAttributes=u(u({},t.customAttributes),{},{httpErrorType:"api-request-error",httpErrorMessage:t.message,httpErrorRequestUrl:a,httpErrorRequestMethod:i}),t.message="Axios Error (Request): (Possible local connectivity issue.) See custom attributes for details."):(t.customAttributes=u(u({},t.customAttributes),{},{httpErrorType:"api-request-config-error",httpErrorMessage:t.message,httpErrorRequestUrl:a,httpErrorRequestMethod:i}),t.message="Axios Error (Config): See custom attributes for details.");return t},v=function(e){throw m(e)},g=n(5656);function y(e){return y="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},y(e)}function b(){b=function(){return e};var e={},t=Object.prototype,n=t.hasOwnProperty,r=Object.defineProperty||function(e,t,n){e[t]=n.value},o="function"==typeof Symbol?Symbol:{},a=o.iterator||"@@iterator",i=o.asyncIterator||"@@asyncIterator",l=o.toStringTag||"@@toStringTag";function s(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{s({},"")}catch(e){s=function(e,t,n){return e[t]=n}}function u(e,t,n,o){var a=t&&t.prototype instanceof d?t:d,i=Object.create(a.prototype),l=new k(o||[]);return r(i,"_invoke",{value:E(e,n,l)}),i}function c(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}e.wrap=u;var f={};function d(){}function p(){}function h(){}var m={};s(m,a,(function(){return this}));var v=Object.getPrototypeOf,g=v&&v(v(P([])));g&&g!==t&&n.call(g,a)&&(m=g);var w=h.prototype=d.prototype=Object.create(m);function S(e){["next","throw","return"].forEach((function(t){s(e,t,(function(e){return this._invoke(t,e)}))}))}function O(e,t){function o(r,a,i,l){var s=c(e[r],e,a);if("throw"!==s.type){var u=s.arg,f=u.value;return f&&"object"==y(f)&&n.call(f,"__await")?t.resolve(f.__await).then((function(e){o("next",e,i,l)}),(function(e){o("throw",e,i,l)})):t.resolve(f).then((function(e){u.value=e,i(u)}),(function(e){return o("throw",e,i,l)}))}l(s.arg)}var a;r(this,"_invoke",{value:function(e,n){function r(){return new t((function(t,r){o(e,n,t,r)}))}return a=a?a.then(r,r):r()}})}function E(e,t,n){var r="suspendedStart";return function(o,a){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===o)throw a;return{value:void 0,done:!0}}for(n.method=o,n.arg=a;;){var i=n.delegate;if(i){var l=x(i,n);if(l){if(l===f)continue;return l}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var s=c(e,t,n);if("normal"===s.type){if(r=n.done?"completed":"suspendedYield",s.arg===f)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(r="completed",n.method="throw",n.arg=s.arg)}}}function x(e,t){var n=t.method,r=e.iterator[n];if(void 0===r)return t.delegate=null,"throw"===n&&e.iterator.return&&(t.method="return",t.arg=void 0,x(e,t),"throw"===t.method)||"return"!==n&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+n+"' method")),f;var o=c(r,e.iterator,t.arg);if("throw"===o.type)return t.method="throw",t.arg=o.arg,t.delegate=null,f;var a=o.arg;return a?a.done?(t[e.resultName]=a.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,f):a:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,f)}function C(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function T(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function k(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(C,this),this.reset(!0)}function P(e){if(e){var t=e[a];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var r=-1,o=function t(){for(;++r=0;--o){var a=this.tryEntries[o],i=a.completion;if("root"===a.tryLoc)return r("end");if(a.tryLoc<=this.prev){var l=n.call(a,"catchLoc"),s=n.call(a,"finallyLoc");if(l&&s){if(this.prev=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),T(n),f}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var o=r.arg;T(n)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,n){return this.delegate={iterator:P(e),resultName:t,nextLoc:n},"next"===this.method&&(this.arg=void 0),f}},e}function w(e,t,n,r,o,a,i){try{var l=e[a](i),s=l.value}catch(e){return void n(e)}l.done?t(s):Promise.resolve(s).then(r,o)}function S(e){return S="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},S(e)}function O(){O=function(){return e};var e={},t=Object.prototype,n=t.hasOwnProperty,r=Object.defineProperty||function(e,t,n){e[t]=n.value},o="function"==typeof Symbol?Symbol:{},a=o.iterator||"@@iterator",i=o.asyncIterator||"@@asyncIterator",l=o.toStringTag||"@@toStringTag";function s(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{s({},"")}catch(e){s=function(e,t,n){return e[t]=n}}function u(e,t,n,o){var a=t&&t.prototype instanceof d?t:d,i=Object.create(a.prototype),l=new k(o||[]);return r(i,"_invoke",{value:E(e,n,l)}),i}function c(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}e.wrap=u;var f={};function d(){}function p(){}function h(){}var m={};s(m,a,(function(){return this}));var v=Object.getPrototypeOf,g=v&&v(v(P([])));g&&g!==t&&n.call(g,a)&&(m=g);var y=h.prototype=d.prototype=Object.create(m);function b(e){["next","throw","return"].forEach((function(t){s(e,t,(function(e){return this._invoke(t,e)}))}))}function w(e,t){function o(r,a,i,l){var s=c(e[r],e,a);if("throw"!==s.type){var u=s.arg,f=u.value;return f&&"object"==S(f)&&n.call(f,"__await")?t.resolve(f.__await).then((function(e){o("next",e,i,l)}),(function(e){o("throw",e,i,l)})):t.resolve(f).then((function(e){u.value=e,i(u)}),(function(e){return o("throw",e,i,l)}))}l(s.arg)}var a;r(this,"_invoke",{value:function(e,n){function r(){return new t((function(t,r){o(e,n,t,r)}))}return a=a?a.then(r,r):r()}})}function E(e,t,n){var r="suspendedStart";return function(o,a){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===o)throw a;return{value:void 0,done:!0}}for(n.method=o,n.arg=a;;){var i=n.delegate;if(i){var l=x(i,n);if(l){if(l===f)continue;return l}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var s=c(e,t,n);if("normal"===s.type){if(r=n.done?"completed":"suspendedYield",s.arg===f)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(r="completed",n.method="throw",n.arg=s.arg)}}}function x(e,t){var n=t.method,r=e.iterator[n];if(void 0===r)return t.delegate=null,"throw"===n&&e.iterator.return&&(t.method="return",t.arg=void 0,x(e,t),"throw"===t.method)||"return"!==n&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+n+"' method")),f;var o=c(r,e.iterator,t.arg);if("throw"===o.type)return t.method="throw",t.arg=o.arg,t.delegate=null,f;var a=o.arg;return a?a.done?(t[e.resultName]=a.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,f):a:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,f)}function C(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function T(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function k(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(C,this),this.reset(!0)}function P(e){if(e){var t=e[a];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var r=-1,o=function t(){for(;++r=0;--o){var a=this.tryEntries[o],i=a.completion;if("root"===a.tryLoc)return r("end");if(a.tryLoc<=this.prev){var l=n.call(a,"catchLoc"),s=n.call(a,"finallyLoc");if(l&&s){if(this.prev=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),T(n),f}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var o=r.arg;T(n)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,n){return this.delegate={iterator:P(e),resultName:t,nextLoc:n},"next"===this.method&&(this.arg=void 0),f}},e}function E(e,t,n,r,o,a,i){try{var l=e[a](i),s=l.value}catch(e){return void n(e)}l.done?t(s):Promise.resolve(s).then(r,o)}function x(e){return x="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},x(e)}function C(){C=function(){return e};var e={},t=Object.prototype,n=t.hasOwnProperty,r=Object.defineProperty||function(e,t,n){e[t]=n.value},o="function"==typeof Symbol?Symbol:{},a=o.iterator||"@@iterator",i=o.asyncIterator||"@@asyncIterator",l=o.toStringTag||"@@toStringTag";function s(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{s({},"")}catch(e){s=function(e,t,n){return e[t]=n}}function u(e,t,n,o){var a=t&&t.prototype instanceof d?t:d,i=Object.create(a.prototype),l=new k(o||[]);return r(i,"_invoke",{value:S(e,n,l)}),i}function c(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}e.wrap=u;var f={};function d(){}function p(){}function h(){}var m={};s(m,a,(function(){return this}));var v=Object.getPrototypeOf,g=v&&v(v(P([])));g&&g!==t&&n.call(g,a)&&(m=g);var y=h.prototype=d.prototype=Object.create(m);function b(e){["next","throw","return"].forEach((function(t){s(e,t,(function(e){return this._invoke(t,e)}))}))}function w(e,t){function o(r,a,i,l){var s=c(e[r],e,a);if("throw"!==s.type){var u=s.arg,f=u.value;return f&&"object"==x(f)&&n.call(f,"__await")?t.resolve(f.__await).then((function(e){o("next",e,i,l)}),(function(e){o("throw",e,i,l)})):t.resolve(f).then((function(e){u.value=e,i(u)}),(function(e){return o("throw",e,i,l)}))}l(s.arg)}var a;r(this,"_invoke",{value:function(e,n){function r(){return new t((function(t,r){o(e,n,t,r)}))}return a=a?a.then(r,r):r()}})}function S(e,t,n){var r="suspendedStart";return function(o,a){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===o)throw a;return{value:void 0,done:!0}}for(n.method=o,n.arg=a;;){var i=n.delegate;if(i){var l=O(i,n);if(l){if(l===f)continue;return l}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var s=c(e,t,n);if("normal"===s.type){if(r=n.done?"completed":"suspendedYield",s.arg===f)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(r="completed",n.method="throw",n.arg=s.arg)}}}function O(e,t){var n=t.method,r=e.iterator[n];if(void 0===r)return t.delegate=null,"throw"===n&&e.iterator.return&&(t.method="return",t.arg=void 0,O(e,t),"throw"===t.method)||"return"!==n&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+n+"' method")),f;var o=c(r,e.iterator,t.arg);if("throw"===o.type)return t.method="throw",t.arg=o.arg,t.delegate=null,f;var a=o.arg;return a?a.done?(t[e.resultName]=a.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,f):a:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,f)}function E(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function T(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function k(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(E,this),this.reset(!0)}function P(e){if(e){var t=e[a];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var r=-1,o=function t(){for(;++r=0;--o){var a=this.tryEntries[o],i=a.completion;if("root"===a.tryLoc)return r("end");if(a.tryLoc<=this.prev){var l=n.call(a,"catchLoc"),s=n.call(a,"finallyLoc");if(l&&s){if(this.prev=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),T(n),f}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var o=r.arg;T(n)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,n){return this.delegate={iterator:P(e),resultName:t,nextLoc:n},"next"===this.method&&(this.arg=void 0),f}},e}function T(e,t,n,r,o,a,i){try{var l=e[a](i),s=l.value}catch(e){return void n(e)}l.done?t(s):Promise.resolve(s).then(r,o)}var k=n(786);function P(e){this.message=e}P.prototype=new Error,P.prototype.name="InvalidCharacterError";var A="undefined"!=typeof window&&window.atob&&window.atob.bind(window)||function(e){var t=String(e).replace(/=+$/,"");if(t.length%4==1)throw new P("'atob' failed: The string to be decoded is not correctly encoded.");for(var n,r,o=0,a=0,i="";r=t.charAt(a++);~r&&(n=o%4?64*n+r:r,o++%4)?i+=String.fromCharCode(255&n>>(-2*o&6)):0)r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".indexOf(r);return i};function _(e){var t=e.replace(/-/g,"+").replace(/_/g,"/");switch(t.length%4){case 0:break;case 2:t+="==";break;case 3:t+="=";break;default:throw"Illegal base64url string!"}try{return function(e){return decodeURIComponent(A(e).replace(/(.)/g,(function(e,t){var n=t.charCodeAt(0).toString(16).toUpperCase();return n.length<2&&(n="0"+n),"%"+n})))}(t)}catch(e){return A(t)}}function j(e){this.message=e}j.prototype=new Error,j.prototype.name="InvalidTokenError";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 R(){R=function(){return e};var e={},t=Object.prototype,n=t.hasOwnProperty,r=Object.defineProperty||function(e,t,n){e[t]=n.value},o="function"==typeof Symbol?Symbol:{},a=o.iterator||"@@iterator",i=o.asyncIterator||"@@asyncIterator",l=o.toStringTag||"@@toStringTag";function s(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{s({},"")}catch(e){s=function(e,t,n){return e[t]=n}}function u(e,t,n,o){var a=t&&t.prototype instanceof d?t:d,i=Object.create(a.prototype),l=new C(o||[]);return r(i,"_invoke",{value:S(e,n,l)}),i}function c(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}e.wrap=u;var f={};function d(){}function p(){}function h(){}var m={};s(m,a,(function(){return this}));var v=Object.getPrototypeOf,g=v&&v(v(T([])));g&&g!==t&&n.call(g,a)&&(m=g);var y=h.prototype=d.prototype=Object.create(m);function b(e){["next","throw","return"].forEach((function(t){s(e,t,(function(e){return this._invoke(t,e)}))}))}function w(e,t){function o(r,a,i,l){var s=c(e[r],e,a);if("throw"!==s.type){var u=s.arg,f=u.value;return f&&"object"==I(f)&&n.call(f,"__await")?t.resolve(f.__await).then((function(e){o("next",e,i,l)}),(function(e){o("throw",e,i,l)})):t.resolve(f).then((function(e){u.value=e,i(u)}),(function(e){return o("throw",e,i,l)}))}l(s.arg)}var a;r(this,"_invoke",{value:function(e,n){function r(){return new t((function(t,r){o(e,n,t,r)}))}return a=a?a.then(r,r):r()}})}function S(e,t,n){var r="suspendedStart";return function(o,a){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===o)throw a;return{value:void 0,done:!0}}for(n.method=o,n.arg=a;;){var i=n.delegate;if(i){var l=O(i,n);if(l){if(l===f)continue;return l}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var s=c(e,t,n);if("normal"===s.type){if(r=n.done?"completed":"suspendedYield",s.arg===f)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(r="completed",n.method="throw",n.arg=s.arg)}}}function O(e,t){var n=t.method,r=e.iterator[n];if(void 0===r)return t.delegate=null,"throw"===n&&e.iterator.return&&(t.method="return",t.arg=void 0,O(e,t),"throw"===t.method)||"return"!==n&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+n+"' method")),f;var o=c(r,e.iterator,t.arg);if("throw"===o.type)return t.method="throw",t.arg=o.arg,t.delegate=null,f;var a=o.arg;return a?a.done?(t[e.resultName]=a.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,f):a:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,f)}function E(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function x(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function C(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(E,this),this.reset(!0)}function T(e){if(e){var t=e[a];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var r=-1,o=function t(){for(;++r=0;--o){var a=this.tryEntries[o],i=a.completion;if("root"===a.tryLoc)return r("end");if(a.tryLoc<=this.prev){var l=n.call(a,"catchLoc"),s=n.call(a,"finallyLoc");if(l&&s){if(this.prev=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),x(n),f}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var o=r.arg;x(n)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,n){return this.delegate={iterator:T(e),resultName:t,nextLoc:n},"next"===this.method&&(this.arg=void 0),f}},e}function N(e,t,n,r,o,a,i){try{var l=e[a](i),s=l.value}catch(e){return void n(e)}l.done?t(s):Promise.resolve(s).then(r,o)}function M(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var a=e.apply(t,n);function i(e){N(a,r,o,i,l,"next",e)}function l(e){N(a,r,o,i,l,"throw",e)}i(void 0)}))}}var D=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:16e3,n=Math.pow(2,e)+Math.random(),r=Math.round(1e3*n);return Math.min(r,t)};function L(e){return L="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},L(e)}function B(){B=function(){return e};var e={},t=Object.prototype,n=t.hasOwnProperty,r=Object.defineProperty||function(e,t,n){e[t]=n.value},o="function"==typeof Symbol?Symbol:{},a=o.iterator||"@@iterator",i=o.asyncIterator||"@@asyncIterator",l=o.toStringTag||"@@toStringTag";function s(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{s({},"")}catch(e){s=function(e,t,n){return e[t]=n}}function u(e,t,n,o){var a=t&&t.prototype instanceof d?t:d,i=Object.create(a.prototype),l=new C(o||[]);return r(i,"_invoke",{value:S(e,n,l)}),i}function c(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}e.wrap=u;var f={};function d(){}function p(){}function h(){}var m={};s(m,a,(function(){return this}));var v=Object.getPrototypeOf,g=v&&v(v(T([])));g&&g!==t&&n.call(g,a)&&(m=g);var y=h.prototype=d.prototype=Object.create(m);function b(e){["next","throw","return"].forEach((function(t){s(e,t,(function(e){return this._invoke(t,e)}))}))}function w(e,t){function o(r,a,i,l){var s=c(e[r],e,a);if("throw"!==s.type){var u=s.arg,f=u.value;return f&&"object"==L(f)&&n.call(f,"__await")?t.resolve(f.__await).then((function(e){o("next",e,i,l)}),(function(e){o("throw",e,i,l)})):t.resolve(f).then((function(e){u.value=e,i(u)}),(function(e){return o("throw",e,i,l)}))}l(s.arg)}var a;r(this,"_invoke",{value:function(e,n){function r(){return new t((function(t,r){o(e,n,t,r)}))}return a=a?a.then(r,r):r()}})}function S(e,t,n){var r="suspendedStart";return function(o,a){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===o)throw a;return{value:void 0,done:!0}}for(n.method=o,n.arg=a;;){var i=n.delegate;if(i){var l=O(i,n);if(l){if(l===f)continue;return l}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var s=c(e,t,n);if("normal"===s.type){if(r=n.done?"completed":"suspendedYield",s.arg===f)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(r="completed",n.method="throw",n.arg=s.arg)}}}function O(e,t){var n=t.method,r=e.iterator[n];if(void 0===r)return t.delegate=null,"throw"===n&&e.iterator.return&&(t.method="return",t.arg=void 0,O(e,t),"throw"===t.method)||"return"!==n&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+n+"' method")),f;var o=c(r,e.iterator,t.arg);if("throw"===o.type)return t.method="throw",t.arg=o.arg,t.delegate=null,f;var a=o.arg;return a?a.done?(t[e.resultName]=a.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,f):a:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,f)}function E(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function x(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function C(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(E,this),this.reset(!0)}function T(e){if(e){var t=e[a];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var r=-1,o=function t(){for(;++r=0;--o){var a=this.tryEntries[o],i=a.completion;if("root"===a.tryLoc)return r("end");if(a.tryLoc<=this.prev){var l=n.call(a,"catchLoc"),s=n.call(a,"finallyLoc");if(l&&s){if(this.prev=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),x(n),f}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var o=r.arg;x(n)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,n){return this.delegate={iterator:T(e),resultName:t,nextLoc:n},"next"===this.method&&(this.arg=void 0),f}},e}function F(e,t,n,r,o,a,i){try{var l=e[a](i),s=l.value}catch(e){return void n(e)}l.done?t(s):Promise.resolve(s).then(r,o)}function z(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var a=e.apply(t,n);function i(e){F(a,r,o,i,l,"next",e)}function l(e){F(a,r,o,i,l,"throw",e)}i(void 0)}))}}function G(e,t){for(var n=0;n0&&void 0!==arguments[0]?arguments[0]:{},t=e.httpClient,n=void 0===t?o().create():t,r=e.getBackoffMilliseconds,a=void 0===r?D:r,i=e.shouldRetry,l=void 0===i?function(e){return!e.response&&e.config}:i,s=e.defaultMaxRetries,u=void 0===s?2:s,c=function(){var e=M(R().mark((function e(t){var r,o,i,s;return R().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=t.config){e.next=3;break}return e.abrupt("return",Promise.reject(t));case 3:if(l(t)){e.next=5;break}return e.abrupt("return",Promise.reject(t));case 5:return o=r.maxRetries,i=void 0===o?u:o,s=function(){var e=M(R().mark((function e(o){var l,u;return R().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!(o>i)){e.next=2;break}return e.abrupt("return",Promise.reject(t));case 2:return e.prev=2,u=a(o),e.next=6,new Promise((function(e){setTimeout(e,u)}));case 6:return e.next=8,n.request(r);case 8:l=e.sent,e.next=14;break;case 11:return e.prev=11,e.t0=e.catch(2),e.abrupt("return",s(o+1));case 14:return e.abrupt("return",l);case 15:case"end":return e.stop()}}),e,null,[[2,11]])})));return function(t){return e.apply(this,arguments)}}(),e.abrupt("return",s(1));case 8:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}();return c}({httpClient:this.httpClient})),this.cookies=new k.A,this.refreshRequestPromises={}}var t,n,r,a;return t=e,n=[{key:"getHttpClient",value:function(){return this.httpClient}},{key:"decodeJwtCookie",value:function(){var e=this.cookies.get(this.tokenCookieName);if(e)try{return function(e,t){if("string"!=typeof e)throw new j("Invalid token specified");var n=!0===(t=t||{}).header?0:1;try{return JSON.parse(_(e.split(".")[n]))}catch(e){throw new j("Invalid token specified: "+e.message)}}(e)}catch(n){var t=Object.create(n);throw t.message="Error decoding JWT token",t.customAttributes={cookieValue:e},t}return null}},{key:"refresh",value:function(){var e=this,t=0;if(void 0===this.refreshRequestPromises[this.tokenCookieName]){var n=function(){var n=z(B().mark((function n(){var r,o,a,i,l;return B().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.prev=0,n.prev=1,n.next=4,e.httpClient.post(e.tokenRefreshEndpoint);case 4:(r=n.sent).data&&r.data.response_epoch_seconds&&(t=r.data.response_epoch_seconds),n.next=11;break;case 8:n.prev=8,n.t0=n.catch(1),v(n.t0);case 11:n.next=21;break;case 13:if(n.prev=13,n.t1=n.catch(0),!n.t1.response||401!==n.t1.response.status){n.next=20;break}return e.cookies.remove(e.tokenCookieName),n.abrupt("return",null);case 20:throw n.t1;case 21:if(o=Date.now()/1e3,a=t>0?Math.abs(o-t):null,i=e.decodeJwtCookie()){n.next=28;break}throw(l=new Error("Access token is still null after successful refresh.")).customAttributes={axiosResponse:r,browserDriftSeconds:a,browserEpochSeconds:o},l;case 28:return n.abrupt("return",i);case 29:case"end":return n.stop()}}),n,null,[[0,13],[1,8]])})));return function(){return n.apply(this,arguments)}}();this.refreshRequestPromises[this.tokenCookieName]=n().finally((function(){delete e.refreshRequestPromises[e.tokenCookieName]}))}return this.refreshRequestPromises[this.tokenCookieName]}},{key:"getJwtToken",value:(a=z(B().mark((function t(){var n,r,o=arguments;return B().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(n=o.length>0&&void 0!==o[0]&&o[0],t.prev=1,r=this.decodeJwtCookie(this.tokenCookieName),e.isTokenExpired(r)||n){t.next=5;break}return t.abrupt("return",r);case 5:t.next=10;break;case 7:t.prev=7,t.t0=t.catch(1),h(this.loggingService,t.t0);case 10:return t.prev=10,t.next=13,this.refresh();case 13:return t.abrupt("return",t.sent);case 16:throw t.prev=16,t.t1=t.catch(10),h(this.loggingService,t.t1),t.t1;case 20:case"end":return t.stop()}}),t,this,[[1,7],[10,16]])}))),function(){return a.apply(this,arguments)})}],r=[{key:"isTokenExpired",value:function(e){return!e||e.exp=0;--o){var a=this.tryEntries[o],i=a.completion;if("root"===a.tryLoc)return r("end");if(a.tryLoc<=this.prev){var l=n.call(a,"catchLoc"),s=n.call(a,"finallyLoc");if(l&&s){if(this.prev=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),x(n),f}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var o=r.arg;x(n)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,n){return this.delegate={iterator:T(e),resultName:t,nextLoc:n},"next"===this.method&&(this.arg=void 0),f}},e}function K(e,t,n,r,o,a,i){try{var l=e[a](i),s=l.value}catch(e){return void n(e)}l.done?t(s):Promise.resolve(s).then(r,o)}function q(e,t){for(var n=0;n=0;--o){var a=this.tryEntries[o],i=a.completion;if("root"===a.tryLoc)return r("end");if(a.tryLoc<=this.prev){var l=n.call(a,"catchLoc"),s=n.call(a,"finallyLoc");if(l&&s){if(this.prev=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),x(n),f}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var o=r.arg;x(n)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,n){return this.delegate={iterator:T(e),resultName:t,nextLoc:n},"next"===this.method&&(this.arg=void 0),f}},e}function ee(e,t,n,r,o,a,i){try{var l=e[a](i),s=l.value}catch(e){return void n(e)}l.done?t(s):Promise.resolve(s).then(r,o)}function te(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var a=e.apply(t,n);function i(e){ee(a,r,o,i,l,"next",e)}function l(e){ee(a,r,o,i,l,"throw",e)}i(void 0)}))}}function ne(e,t){for(var n=0;n0&&void 0!==arguments[0]?arguments[0]:[],t=[this.authenticatedHttpClient,this.httpClient,this.cachedAuthenticatedHttpClient,this.cachedHttpClient];try{e.forEach((function(e){t.forEach((function(t){return t&&e(t)}))}))}catch(e){throw h(this.loggingService,e),e}}},{key:"getAuthenticatedHttpClient",value:function(){return(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).useCache?this.cachedAuthenticatedHttpClient:this.authenticatedHttpClient}},{key:"getHttpClient",value:function(){return(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).useCache?this.cachedHttpClient:this.httpClient}},{key:"getJwtTokenService",value:function(){return this.jwtTokenService}},{key:"getCsrfTokenService",value:function(){return this.csrfTokenService}},{key:"getLoginRedirectUrl",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.config.BASE_URL;return"".concat(this.config.LOGIN_URL,"?next=").concat(encodeURIComponent(e))}},{key:"redirectToLogin",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.config.BASE_URL;n.g.location.assign(this.getLoginRedirectUrl(e))}},{key:"getLogoutRedirectUrl",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.config.BASE_URL;return"".concat(this.config.LOGOUT_URL,"?redirect_url=").concat(encodeURIComponent(e))}},{key:"redirectToLogout",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.config.BASE_URL;n.g.location.assign(this.getLogoutRedirectUrl(e))}},{key:"getAuthenticatedUser",value:function(){return this.authenticatedUser}},{key:"setAuthenticatedUser",value:function(e){this.authenticatedUser=e}},{key:"fetchAuthenticatedUser",value:(s=te(Q().mark((function e(){var t,n,r=arguments;return Q().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=r.length>0&&void 0!==r[0]?r[0]:{},e.next=3,this.jwtTokenService.getJwtToken(t.forceRefresh||!1);case 3:return null!==(n=e.sent)?(this.setAuthenticatedUser({email:n.email,userId:n.user_id,username:n.preferred_username,roles:n.roles||[],administrator:n.administrator,name:n.name}),this.loggingService.setCustomAttribute("userId",n.user_id)):this.setAuthenticatedUser(null),e.abrupt("return",this.getAuthenticatedUser());case 6:case"end":return e.stop()}}),e,this)}))),function(){return s.apply(this,arguments)})},{key:"ensureAuthenticatedUser",value:(l=te(Q().mark((function e(){var t,r,o,a=arguments;return Q().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=a.length>0&&void 0!==a[0]?a[0]:this.config.BASE_URL,e.next=3,this.fetchAuthenticatedUser();case 3:if(null!==this.getAuthenticatedUser()){e.next=13;break}if(!n.g.document.referrer||!n.g.document.referrer.startsWith(this.config.LOGIN_URL)){e.next=9;break}throw r=new Error("Redirect from login page. Rejecting to avoid infinite redirect loop."),h(this.loggingService,r),r;case 9:throw this.redirectToLogin(t),(o=new Error("Failed to ensure the user is authenticated")).isRedirecting=!0,o;case 13:return e.abrupt("return",this.getAuthenticatedUser());case 14:case"end":return e.stop()}}),e,this)}))),function(){return l.apply(this,arguments)})},{key:"hydrateAuthenticatedUser",value:(a=te(Q().mark((function e(){var t,n;return Q().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(null===(t=this.getAuthenticatedUser())){e.next=6;break}return e.next=4,this.authenticatedHttpClient.get("".concat(this.config.LMS_BASE_URL,"/api/user/v1/accounts/").concat(t.username));case 4:n=e.sent,this.setAuthenticatedUser(J(J({},t),(0,g.il)(n.data)));case 6:case"end":return e.stop()}}),e,this)}))),function(){return a.apply(this,arguments)})},{key:"addAuthenticationToHttpClient",value:function(e){var t=Object.create(e);t.defaults.withCredentials=!0;var n,r,o,a,i=(n={jwtTokenService:this.jwtTokenService,shouldSkip:function(e){return e.isPublic}},r=n.jwtTokenService,o=n.shouldSkip,a=function(){var e,t=(e=b().mark((function e(t){var n;return b().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!o(t)){e.next=2;break}return e.abrupt("return",t);case 2:return e.prev=2,e.next=5,r.getJwtToken();case 5:e.next=13;break;case 7:return e.prev=7,e.t0=e.catch(2),(n=Object.create(e.t0)).message="[getJwtToken] ".concat(n.message),n.config=t,e.abrupt("return",Promise.reject(n));case 13:return t.headers.common["USE-JWT-COOKIE"]=!0,e.abrupt("return",t);case 15:case"end":return e.stop()}}),e,null,[[2,7]])})),function(){var t=this,n=arguments;return new Promise((function(r,o){var a=e.apply(t,n);function i(e){w(a,r,o,i,l,"next",e)}function l(e){w(a,r,o,i,l,"throw",e)}i(void 0)}))});return function(e){return t.apply(this,arguments)}}(),a),l=function(e){var t=e.csrfTokenService,n=e.CSRF_TOKEN_API_PATH,r=e.shouldSkip,o=function(){var e,o=(e=O().mark((function e(o){var a,i,l;return O().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!r(o)){e.next=2;break}return e.abrupt("return",o);case 2:return a=o.url,e.prev=3,e.next=6,t.getCsrfToken(a,n);case 6:i=e.sent,e.next=15;break;case 9:return e.prev=9,e.t0=e.catch(3),(l=Object.create(e.t0)).message="[getCsrfToken] ".concat(l.message),l.config=o,e.abrupt("return",Promise.reject(l));case 15:return o.headers["X-CSRFToken"]=i,e.abrupt("return",o);case 18:case"end":return e.stop()}}),e,null,[[3,9]])})),function(){var t=this,n=arguments;return new Promise((function(r,o){var a=e.apply(t,n);function i(e){E(a,r,o,i,l,"next",e)}function l(e){E(a,r,o,i,l,"throw",e)}i(void 0)}))});return function(e){return o.apply(this,arguments)}}();return o}({csrfTokenService:this.csrfTokenService,CSRF_TOKEN_API_PATH:this.config.CSRF_TOKEN_API_PATH,shouldSkip:function(e){var t=e.method;return e.isCsrfExempt||!["post","put","patch","delete"].includes(t)}}),s=function(e){var t=e.loggingService,n=function(){var e,n=(e=C().mark((function e(n){var r,o;return C().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=m(n),401!==(o=r.customAttributes.httpErrorStatus)&&403!==o||t.logInfo(r.message,r.customAttributes),e.abrupt("return",Promise.reject(r));case 4:case"end":return e.stop()}}),e)})),function(){var t=this,n=arguments;return new Promise((function(r,o){var a=e.apply(t,n);function i(e){T(a,r,o,i,l,"next",e)}function l(e){T(a,r,o,i,l,"throw",e)}i(void 0)}))});return function(e){return n.apply(this,arguments)}}();return n}({loggingService:this.loggingService});return t.interceptors.request.use(l),t.interceptors.request.use(i),t.interceptors.response.use((function(e){return e}),s),t}}],r&&ne(t.prototype,r),Object.defineProperty(t,"prototype",{writable:!1}),e}();const ie=ae},2498:(e,t,n)=>{"use strict";n.d(t,{A:()=>J});var r=n(8492),o=n.n(r),a=n(3642),i=n.n(a),l=Symbol("cache-parser");function s(e){return("string"==typeof e||"number"==typeof e)&&(e=Number(e))>=0&&e<1/0}function u(e){return!0===e||"number"==typeof e||"string"==typeof e&&"false"!==e}var c=Number;function f(e){var t=Object.defineProperty({},l,{enumerable:!1,value:1});if(!e||"string"!=typeof e)return t;var n=function(e){var t={},n=e.toLowerCase().replace(/\s+/g,"").split(",");for(var r in n){var o,a=n[r].split("=",2);t[a[0]]=null==(o=a[1])||o}return t}(e),r=n["max-age"],o=n["max-stale"],a=n["min-fresh"],i=n["s-maxage"],f=n["stale-if-error"],d=n["stale-while-revalidate"];return u(n.immutable)&&(t.immutable=!0),s(r)&&(t.maxAge=c(r)),s(o)&&(t.maxStale=c(o)),s(a)&&(t.minFresh=c(a)),u(n["must-revalidate"])&&(t.mustRevalidate=!0),u(n["must-understand"])&&(t.mustUnderstand=!0),u(n["no-cache"])&&(t.noCache=!0),u(n["no-store"])&&(t.noStore=!0),u(n["no-transform"])&&(t.noTransform=!0),u(n["only-if-cached"])&&(t.onlyIfCached=!0),u(n.private)&&(t.private=!0),u(n["proxy-revalidate"])&&(t.proxyRevalidate=!0),u(n.public)&&(t.public=!0),s(i)&&(t.sMaxAge=c(i)),s(f)&&(t.staleIfError=c(f)),s(d)&&(t.staleWhileRevalidate=c(d)),t}var d=Symbol();function p(){var e,t,n=new Promise((function(n,r){e=n,t=r}));return n.resolve=e,n.reject=t,n[d]=1,n}function h(e,t){return e>t?1:-1}function m(e,t){var n=5381;if("object"==typeof e&&null!==e&&(e.toString===Object.prototype.toString||e.toString===Array.prototype.toString)){t||(t=new WeakSet);for(var r=Object.keys(e).sort(h),o=0;o{for(var n in t)v.o(t,n)&&!v.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t)},g={};v.d(g,{h4:()=>b,UN:()=>L,uu:()=>N,Kd:()=>R,ZF:()=>z,nv:()=>j,p:()=>C,E7:()=>O,NQ:()=>w,xK:()=>B,G6:()=>T,LN:()=>A,Bw:()=>I,Ad:()=>E,$k:()=>_,v8:()=>F,Jk:()=>k,tI:()=>P,iS:()=>x});const y=(e=>{var t={};return v.d(t,e),t})({parse:()=>f}),b=Object.freeze({IfModifiedSince:"if-modified-since",LastModified:"last-modified",IfNoneMatch:"if-none-match",CacheControl:"cache-control",ETag:"etag",Expires:"expires",Age:"age",XAxiosCacheEtag:"x-axios-cache-etag",XAxiosCacheLastModified:"x-axios-cache-last-modified",XAxiosCacheStaleIfError:"x-axios-cache-stale-if-error"}),w=e=>{if(!e)return"not enough headers";const t=e[b.CacheControl];if(t){const{noCache:n,noStore:r,mustRevalidate:o,maxAge:a,immutable:i}=(0,y.parse)(String(t));if(n||r)return"dont cache";if(i)return 31536e6;if(o)return 0;if(void 0!==a){const t=e[b.Age];return t?1e3*(a-Number(t)):1e3*a}}const n=e[b.Expires];if(n){const e=Date.parse(String(n))-Date.now();return e>=0?e:"dont cache"}return"not enough headers"},S=(e=>{var t={};return v.d(t,e),t})({deferred:()=>p});function O(e){return e?t=>e(t)||304===t:e=>e>=200&&e<300||304===e}function E(e="get",t=[]){return e=e.toLowerCase(),t.some((t=>t===e))}function x(e,t){var n;t.headers||(t.headers={});const{etag:r,modifiedSince:o}=t.cache;if(r){const o=!0===r?null===(n=e.data)||void 0===n?void 0:n.headers[b.ETag]:r;o&&(t.headers[b.IfNoneMatch]=o)}o&&(t.headers[b.IfModifiedSince]=!0===o?e.data.headers[b.LastModified]||new Date(e.createdAt).toUTCString():o.toUTCString())}function C(e,t){return 304===e.status&&t?(e.cached=!0,e.data=t.data,e.status=t.status,e.statusText=t.statusText,e.headers=Object.assign(Object.assign({},t.headers),e.headers),t):{data:e.data,status:e.status,statusText:e.statusText,headers:e.headers}}function T(e){const t=async t=>{var n;const r=t.id=e.generateKey(t);if(!1===t.cache)return t;if(t.cache=Object.assign(Object.assign({},e.defaults.cache),t.cache),!E(t.method,t.cache.methods))return t;let o=await e.storage.get(r,t);const a=t.cache.override;e:if("empty"===o.state||"stale"===o.state||a){if(e.waiting[r]&&!a&&(o=await e.storage.get(r,t),"empty"!==o.state))break e;return e.waiting[r]=(0,S.deferred)(),null===(n=e.waiting[r])||void 0===n||n.catch((()=>{})),await e.storage.set(r,{state:"loading",previous:a?o.data?"stale":"empty":o.state,data:o.data,createdAt:a&&!o.createdAt?Date.now():o.createdAt},t),"stale"===o.state&&x(o,t),t.validateStatus=O(t.validateStatus),t}let i;if("loading"===o.state){const n=e.waiting[r];if(!n)return await e.storage.remove(r,t),t;try{i=await n}catch(e){return t}}else i=o.data;return t.adapter=()=>Promise.resolve({config:t,data:i.data,headers:i.headers,status:i.status,statusText:i.statusText,cached:!0,id:r}),t};return{onFulfilled:t,apply:()=>e.interceptors.request.use(t)}}async function k(e,t){var n;if("function"==typeof t)return t(e);const{statusCheck:r,responseMatch:o,containsHeaders:a}=t;if(r&&!await r(e.status)||o&&!await o(e))return!1;if(a)for(const[t,r]of Object.entries(a))if(!await r(null!==(n=e.headers[t.toLowerCase()])&&void 0!==n?n:e.headers[t]))return!1;return!0}async function P(e,t,n){if("function"==typeof n)return n(t);for(const[r,o]of Object.entries(n)){if("delete"===o){await e.remove(r,t.config);continue}const n=await e.get(r,t.config);if("loading"===n.state)continue;const a=await o(n,t);"delete"!==a?"ignore"!==a&&await e.set(r,a,t.config):await e.remove(r,t.config)}}function A(e){const t=async(t,n)=>{var r;await e.storage.remove(t,n),null===(r=e.waiting[t])||void 0===r||r.reject(),delete e.waiting[t]},n=async n=>{var r,o,a;const i=n.id=null!==(r=(a=n.config).id)&&void 0!==r?r:a.id=e.generateKey(n.config);if(null!==(o=n.cached)&&void 0!==o||(n.cached=!1),n.cached)return n;const l=n.config.cache;if(!l)return Object.assign(Object.assign({},n),{cached:!1});const s=n.config,u=await e.storage.get(i,s);if((null==l?void 0:l.update)&&await P(e.storage,n,l.update),"loading"!==u.state)return n;if(!u.data&&!await k(n,l.cachePredicate))return await t(i,s),n;for(const e of Object.keys(n.headers))e.startsWith("x-axios-cache")&&delete n.headers[e];l.etag&&!0!==l.etag&&(n.headers[b.XAxiosCacheEtag]=l.etag),l.modifiedSince&&(n.headers[b.XAxiosCacheLastModified]=!0===l.modifiedSince?"use-cache-timestamp":l.modifiedSince.toUTCString());let c=l.ttl||-1;if(null==l?void 0:l.interpretHeader){const r=e.headerInterpreter(n.headers);if("dont cache"===r)return await t(i,s),n;c="not enough headers"===r?c:r}const f=C(n,u.data);"function"==typeof c&&(c=await c(n)),l.staleIfError&&(n.headers[b.XAxiosCacheStaleIfError]=String(c));const d={state:"cached",ttl:c,createdAt:Date.now(),data:f},p=e.waiting[i];return p&&(p.resolve(d.data),delete e.waiting[i]),await e.storage.set(i,d,s),n},r=async n=>{var r;const o=n.config;if(!(null==o?void 0:o.cache)||!o.id)throw n;const a=await e.storage.get(o.id,o),i=o.cache;if("loading"!==a.state||"stale"!==a.previous)throw await t(o.id,o),n;if(null==i?void 0:i.staleIfError){const t="function"==typeof i.staleIfError?await i.staleIfError(n.response,a,n):i.staleIfError;if(!0===t||"number"==typeof t&&a.createdAt+t>Date.now())return null===(r=e.waiting[o.id])||void 0===r||r.resolve(a.data),delete e.waiting[o.id],await e.storage.set(o.id,{state:"stale",createdAt:Date.now(),data:a.data},o),{cached:!0,config:o,id:o.id,data:a.data.data,headers:a.data.headers,status:a.data.status,statusText:a.data.statusText}}throw n};return{onFulfilled:n,onRejected:r,apply:()=>e.interceptors.response.use(n,r)}}const _=e=>!!e&&!!e["is-storage"];function j(e){const t=e.data.headers;return b.ETag in t||b.LastModified in t||b.XAxiosCacheEtag in t||b.XAxiosCacheStaleIfError in t||b.XAxiosCacheLastModified in t}function I(e){return e.createdAt+e.ttl<=Date.now()}function R({set:e,find:t,remove:n}){return{"is-storage":1,set:e,remove:n,get:async(r,o)=>{const a=await t(r,o);if(!a)return{state:"empty"};if("cached"!==a.state||!I(a))return a;if(j(a)){const t={state:"stale",createdAt:a.createdAt,data:a.data};return await e(r,t,o),t}return await n(r,o),{state:"empty"}}}}function N(e=!1){const t=R({set:(e,n)=>{t.data[e]=n},remove:e=>{delete t.data[e]},find:n=>{const r=t.data[n];return e&&void 0!==r?"function"==typeof structuredClone?structuredClone(r):JSON.parse(JSON.stringify(r)):r}});return t.data=Object.create(null),t}const M=(e=>{var t={};return v.d(t,e),t})({hash:()=>m}),D=/^\/|\/$/g;function L(e){return t=>{if(t.id)return t.id;const n=e(t);return"string"==typeof n||"number"==typeof n?`${n}`:`${(0,M.hash)(n)}`}}const B=L((({baseURL:e="",url:t="",method:n="get",params:r,data:o})=>(e&&(e=e.replace(D,"")),t&&(t=t.replace(D,"")),n&&(n=n.toLowerCase()),{url:e+(e&&t?"/":"")+t,params:r,method:n,data:o})));function F(e,t={}){var n,r,o,a,i;const l=e;if(l.storage=t.storage||N(),!_(l.storage))throw new Error("Use buildStorage() function");return l.waiting=t.waiting||{},l.generateKey=t.generateKey||B,l.headerInterpreter=t.headerInterpreter||w,l.requestInterceptor=t.requestInterceptor||T(l),l.responseInterceptor=t.responseInterceptor||A(l),l.debug=t.debug,l.defaults.cache={update:t.update||{},ttl:null!==(n=t.ttl)&&void 0!==n?n:3e5,methods:t.methods||["get"],cachePredicate:t.cachePredicate||{statusCheck:e=>e>=200&&e<400},etag:null===(r=t.etag)||void 0===r||r,modifiedSince:null!==(o=t.modifiedSince)&&void 0!==o?o:!1===t.etag,interpretHeader:null===(a=t.interpretHeader)||void 0===a||a,staleIfError:null===(i=t.staleIfError)||void 0===i||i,override:!1},l.requestInterceptor.apply(),l.responseInterceptor.apply(),l}function z(e,t=""){return R({find:n=>{const r=e.getItem(t+n);return r?JSON.parse(r):void 0},remove:n=>{e.removeItem(t+n)},set:(n,r)=>{const o=()=>e.setItem(t+n,JSON.stringify(r));try{return o()}catch(r){const a=Object.entries(e).filter((e=>e[0].startsWith(t))).map((e=>[e[0],JSON.parse(e[1])]));for(const t of a)"cached"===t[1].state&&I(t[1])&&!j(t[1])&&e.removeItem(t[0]);try{return o()}catch(t){const n=a.sort(((e,t)=>(e[1].createdAt||0)-(t[1].createdAt||0)));for(const t of n){e.removeItem(t[0]);try{return o()}catch(e){}}}e.removeItem(t+n)}}})}var G=g.Kd,U=g.NQ,H=g.xK,V=g.v8,K=n(3159),q=n.n(K);function W(e){return W="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},W(e)}function $(){$=function(){return e};var e={},t=Object.prototype,n=t.hasOwnProperty,r=Object.defineProperty||function(e,t,n){e[t]=n.value},o="function"==typeof Symbol?Symbol:{},a=o.iterator||"@@iterator",i=o.asyncIterator||"@@asyncIterator",l=o.toStringTag||"@@toStringTag";function s(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{s({},"")}catch(e){s=function(e,t,n){return e[t]=n}}function u(e,t,n,o){var a=t&&t.prototype instanceof d?t:d,i=Object.create(a.prototype),l=new C(o||[]);return r(i,"_invoke",{value:S(e,n,l)}),i}function c(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}e.wrap=u;var f={};function d(){}function p(){}function h(){}var m={};s(m,a,(function(){return this}));var v=Object.getPrototypeOf,g=v&&v(v(T([])));g&&g!==t&&n.call(g,a)&&(m=g);var y=h.prototype=d.prototype=Object.create(m);function b(e){["next","throw","return"].forEach((function(t){s(e,t,(function(e){return this._invoke(t,e)}))}))}function w(e,t){function o(r,a,i,l){var s=c(e[r],e,a);if("throw"!==s.type){var u=s.arg,f=u.value;return f&&"object"==W(f)&&n.call(f,"__await")?t.resolve(f.__await).then((function(e){o("next",e,i,l)}),(function(e){o("throw",e,i,l)})):t.resolve(f).then((function(e){u.value=e,i(u)}),(function(e){return o("throw",e,i,l)}))}l(s.arg)}var a;r(this,"_invoke",{value:function(e,n){function r(){return new t((function(t,r){o(e,n,t,r)}))}return a=a?a.then(r,r):r()}})}function S(e,t,n){var r="suspendedStart";return function(o,a){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===o)throw a;return{value:void 0,done:!0}}for(n.method=o,n.arg=a;;){var i=n.delegate;if(i){var l=O(i,n);if(l){if(l===f)continue;return l}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var s=c(e,t,n);if("normal"===s.type){if(r=n.done?"completed":"suspendedYield",s.arg===f)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(r="completed",n.method="throw",n.arg=s.arg)}}}function O(e,t){var n=t.method,r=e.iterator[n];if(void 0===r)return t.delegate=null,"throw"===n&&e.iterator.return&&(t.method="return",t.arg=void 0,O(e,t),"throw"===t.method)||"return"!==n&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+n+"' method")),f;var o=c(r,e.iterator,t.arg);if("throw"===o.type)return t.method="throw",t.arg=o.arg,t.delegate=null,f;var a=o.arg;return a?a.done?(t[e.resultName]=a.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,f):a:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,f)}function E(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function x(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function C(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(E,this),this.reset(!0)}function T(e){if(e){var t=e[a];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var r=-1,o=function t(){for(;++r=0;--o){var a=this.tryEntries[o],i=a.completion;if("root"===a.tryLoc)return r("end");if(a.tryLoc<=this.prev){var l=n.call(a,"catchLoc"),s=n.call(a,"finallyLoc");if(l&&s){if(this.prev=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),x(n),f}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var o=r.arg;x(n)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,n){return this.delegate={iterator:T(e),resultName:t,nextLoc:n},"next"===this.method&&(this.arg=void 0),f}},e}function Z(e,t,n,r,o,a,i){try{var l=e[a](i),s=l.value}catch(e){return void n(e)}l.done?t(s):Promise.resolve(s).then(r,o)}function Y(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var a=e.apply(t,n);function i(e){Z(a,r,o,i,l,"next",e)}function l(e){Z(a,r,o,i,l,"throw",e)}i(void 0)}))}}function J(){return X.apply(this,arguments)}function X(){return(X=Y($().mark((function e(){var t,n;return $().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,o().defineDriver(i());case 2:return t=o().createInstance({driver:[o().INDEXEDDB,o().LOCALSTORAGE,i()._driver],name:"edx-cache"}),n=G({find:function(e){return Y($().mark((function n(){var r;return $().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,t.getItem("axios-cache:".concat(e));case 2:return r=n.sent,n.abrupt("return",JSON.parse(r));case 4:case"end":return n.stop()}}),n)})))()},set:function(e,n){return Y($().mark((function r(){return $().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.next=2,t.setItem("axios-cache:".concat(e),JSON.stringify(n));case 2:case"end":return r.stop()}}),r)})))()},remove:function(e){return Y($().mark((function n(){return $().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,t.removeItem("axios-cache:".concat(e));case 2:case"end":return n.stop()}}),n)})))()}}),e.abrupt("return",V(q().create(),{ttl:3e5,storage:n,generateKey:H,headerInterpreter:U,debug:console.log}));case 5:case"end":return e.stop()}}),e)})))).apply(this,arguments)}},5399:(e,t,n)=>{"use strict";n.d(t,{A:()=>v});var r=n(3159),o=n.n(r),a=n(5826),i=n.n(a),l=n(5656);function s(e){return s="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},s(e)}function u(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 c(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:n.config.BASE_URL;return"".concat(n.config.LOGIN_URL,"?next=").concat(encodeURIComponent(e))}))),d(this,"redirectToLogin",jest.fn((function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:n.config.BASE_URL;n.getLoginRedirectUrl(e)}))),d(this,"getLogoutRedirectUrl",jest.fn((function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:n.config.BASE_URL;return"".concat(n.config.LOGOUT_URL,"?redirect_url=").concat(encodeURIComponent(e))}))),d(this,"redirectToLogout",jest.fn((function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:n.config.BASE_URL;n.getLogoutRedirectUrl(e)}))),d(this,"getAuthenticatedUser",jest.fn((function(){return n.authenticatedUser}))),d(this,"setAuthenticatedUser",jest.fn((function(e){n.authenticatedUser=e}))),d(this,"fetchAuthenticatedUser",jest.fn((function(){return n.getAuthenticatedUser()}))),d(this,"ensureAuthenticatedUser",jest.fn((function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:n.config.BASE_URL;return n.fetchAuthenticatedUser(),null===n.getAuthenticatedUser()&&n.redirectToLogin(e),n.getAuthenticatedUser()}))),d(this,"hydrateAuthenticatedUser",jest.fn((function(){var e=n.getAuthenticatedUser();null!==e&&n.setAuthenticatedUser(c(c({},e),n.hydratedAuthenticatedUser))}))),this.authenticatedHttpClient=null,this.httpClient=null,(0,l.ce)(t,"AuthService"),i().checkPropTypes(m,t,"options","AuthService"),this.config=t.config,this.loggingService=t.loggingService,this.authenticatedUser=this.config.authenticatedUser?this.config.authenticatedUser:null,this.hydratedAuthenticatedUser=this.config.hydratedAuthenticatedUser?this.config.hydratedAuthenticatedUser:{},this.authenticatedHttpClient=o().create(),this.httpClient=o().create()}var t,n;return t=e,n=[{key:"applyMiddleware",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=[this.authenticatedHttpClient,this.httpClient,this.cachedAuthenticatedHttpClient,this.cachedHttpClient];try{e.forEach((function(e){t.forEach((function(t){return t&&e(t)}))}))}catch(e){throw new Error("Failed to apply middleware: ".concat(e.message,"."))}}}],n&&f(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),e}()},7740:(e,t,n)=>{"use strict";n.r(t),n.d(t,{AUTHENTICATED_USER_CHANGED:()=>r.Pr,AUTHENTICATED_USER_TOPIC:()=>r.UW,AxiosJwtAuthService:()=>o.A,MockAuthService:()=>a.A,configure:()=>r.jK,ensureAuthenticatedUser:()=>r.fL,fetchAuthenticatedUser:()=>r.rn,getAuthService:()=>r.cn,getAuthenticatedHttpClient:()=>r.bv,getAuthenticatedUser:()=>r.vD,getHttpClient:()=>r.cX,getLoginRedirectUrl:()=>r.dE,getLogoutRedirectUrl:()=>r.eX,hydrateAuthenticatedUser:()=>r.W,redirectToLogin:()=>r.jL,redirectToLogout:()=>r.cW,setAuthenticatedUser:()=>r.tQ});var r=n(9659),o=n(3865),a=n(5399)},9659:(e,t,n)=>{"use strict";n.d(t,{Pr:()=>d,UW:()=>f,W:()=>A,bv:()=>g,cW:()=>O,cX:()=>y,cn:()=>v,dE:()=>b,eX:()=>S,fL:()=>k,jK:()=>m,jL:()=>w,rn:()=>C,tQ:()=>x,vD:()=>E});var r=n(5826),o=n.n(r),a=n(6454);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 l(){l=function(){return e};var e={},t=Object.prototype,n=t.hasOwnProperty,r=Object.defineProperty||function(e,t,n){e[t]=n.value},o="function"==typeof Symbol?Symbol:{},a=o.iterator||"@@iterator",s=o.asyncIterator||"@@asyncIterator",u=o.toStringTag||"@@toStringTag";function c(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{c({},"")}catch(e){c=function(e,t,n){return e[t]=n}}function f(e,t,n,o){var a=t&&t.prototype instanceof h?t:h,i=Object.create(a.prototype),l=new k(o||[]);return r(i,"_invoke",{value:E(e,n,l)}),i}function d(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}e.wrap=f;var p={};function h(){}function m(){}function v(){}var g={};c(g,a,(function(){return this}));var y=Object.getPrototypeOf,b=y&&y(y(P([])));b&&b!==t&&n.call(b,a)&&(g=b);var w=v.prototype=h.prototype=Object.create(g);function S(e){["next","throw","return"].forEach((function(t){c(e,t,(function(e){return this._invoke(t,e)}))}))}function O(e,t){function o(r,a,l,s){var u=d(e[r],e,a);if("throw"!==u.type){var c=u.arg,f=c.value;return f&&"object"==i(f)&&n.call(f,"__await")?t.resolve(f.__await).then((function(e){o("next",e,l,s)}),(function(e){o("throw",e,l,s)})):t.resolve(f).then((function(e){c.value=e,l(c)}),(function(e){return o("throw",e,l,s)}))}s(u.arg)}var a;r(this,"_invoke",{value:function(e,n){function r(){return new t((function(t,r){o(e,n,t,r)}))}return a=a?a.then(r,r):r()}})}function E(e,t,n){var r="suspendedStart";return function(o,a){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===o)throw a;return{value:void 0,done:!0}}for(n.method=o,n.arg=a;;){var i=n.delegate;if(i){var l=x(i,n);if(l){if(l===p)continue;return l}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var s=d(e,t,n);if("normal"===s.type){if(r=n.done?"completed":"suspendedYield",s.arg===p)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(r="completed",n.method="throw",n.arg=s.arg)}}}function x(e,t){var n=t.method,r=e.iterator[n];if(void 0===r)return t.delegate=null,"throw"===n&&e.iterator.return&&(t.method="return",t.arg=void 0,x(e,t),"throw"===t.method)||"return"!==n&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+n+"' method")),p;var o=d(r,e.iterator,t.arg);if("throw"===o.type)return t.method="throw",t.arg=o.arg,t.delegate=null,p;var a=o.arg;return a?a.done?(t[e.resultName]=a.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,p):a:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,p)}function C(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function T(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function k(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(C,this),this.reset(!0)}function P(e){if(e){var t=e[a];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var r=-1,o=function t(){for(;++r=0;--o){var a=this.tryEntries[o],i=a.completion;if("root"===a.tryLoc)return r("end");if(a.tryLoc<=this.prev){var l=n.call(a,"catchLoc"),s=n.call(a,"finallyLoc");if(l&&s){if(this.prev=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),T(n),p}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var o=r.arg;T(n)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,n){return this.delegate={iterator:P(e),resultName:t,nextLoc:n},"next"===this.method&&(this.arg=void 0),p}},e}function s(e,t,n,r,o,a,i){try{var l=e[a](i),s=l.value}catch(e){return void n(e)}l.done?t(s):Promise.resolve(s).then(r,o)}function u(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var a=e.apply(t,n);function i(e){s(a,r,o,i,l,"next",e)}function l(e){s(a,r,o,i,l,"throw",e)}i(void 0)}))}}var c,f="AUTHENTICATED_USER",d="".concat(f,".CHANGED"),p={config:o().shape({BASE_URL:o().string.isRequired,LMS_BASE_URL:o().string.isRequired,LOGIN_URL:o().string.isRequired,LOGOUT_URL:o().string.isRequired,REFRESH_ACCESS_TOKEN_ENDPOINT:o().string.isRequired,ACCESS_TOKEN_COOKIE_NAME:o().string.isRequired,CSRF_TOKEN_API_PATH:o().string.isRequired}).isRequired,loggingService:o().shape({logError:o().func.isRequired,logInfo:o().func.isRequired}).isRequired},h={getAuthenticatedHttpClient:o().func.isRequired,getHttpClient:o().func.isRequired,getLoginRedirectUrl:o().func.isRequired,redirectToLogin:o().func.isRequired,getLogoutRedirectUrl:o().func.isRequired,redirectToLogout:o().func.isRequired,getAuthenticatedUser:o().func.isRequired,setAuthenticatedUser:o().func.isRequired,fetchAuthenticatedUser:o().func.isRequired,ensureAuthenticatedUser:o().func.isRequired,hydrateAuthenticatedUser:o().func.isRequired};function m(e,t){return o().checkPropTypes(p,t,"property","Auth"),c=new e(t),o().checkPropTypes(h,c,"property","AuthService"),c}function v(){if(!c)throw Error("You must first configure the auth service.");return c}function g(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return c.getAuthenticatedHttpClient(e)}function y(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return c.getHttpClient(e)}function b(e){return c.getLoginRedirectUrl(e)}function w(e){return c.redirectToLogin(e)}function S(e){return c.getLogoutRedirectUrl(e)}function O(e){return c.redirectToLogout(e)}function E(){return c.getAuthenticatedUser()}function x(e){c.setAuthenticatedUser(e),(0,a.mk)(d)}function C(){return T.apply(this,arguments)}function T(){return T=u(l().mark((function e(){var t,n=arguments;return l().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=n.length>0&&void 0!==n[0]?n[0]:{},e.abrupt("return",c.fetchAuthenticatedUser(t));case 2:case"end":return e.stop()}}),e)}))),T.apply(this,arguments)}function k(e){return P.apply(this,arguments)}function P(){return(P=u(l().mark((function e(t){return l().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",c.ensureAuthenticatedUser(t));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function A(){return _.apply(this,arguments)}function _(){return(_=u(l().mark((function e(){return l().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,c.hydrateAuthenticatedUser();case 2:(0,a.mk)(d);case 3:case"end":return e.stop()}}),e)})))).apply(this,arguments)}},6783:(e,t,n)=>{"use strict";n.d(t,{Nk:()=>s,R2:()=>u,ZI:()=>c,zj:()=>l});var r=n(4740),o=n(6454),a=n(5656),i={ACCESS_TOKEN_COOKIE_NAME:"edx-jwt-cookie-header-payload",ACCOUNT_PROFILE_URL:"MISSING_ENV_VAR".ACCOUNT_PROFILE_URL,ACCOUNT_SETTINGS_URL:"MISSING_ENV_VAR".ACCOUNT_SETTINGS_URL,BASE_URL:"http://localhost:2000",PUBLIC_PATH:"MISSING_ENV_VAR".PUBLIC_PATH||"/",CREDENTIALS_BASE_URL:"http://localhost:18150",CSRF_TOKEN_API_PATH:"/csrf/api/v1/token",DISCOVERY_API_BASE_URL:"http://localhost:18381",PUBLISHER_BASE_URL:"MISSING_ENV_VAR".PUBLISHER_BASE_URL,ECOMMERCE_BASE_URL:"http://localhost:18130",ENVIRONMENT:"production",IGNORED_ERROR_REGEX:function(e){if(""!=="".trim())return new RegExp("")}(),LANGUAGE_PREFERENCE_COOKIE_NAME:"openedx-language-preference",LEARNING_BASE_URL:"MISSING_ENV_VAR".LEARNING_BASE_URL,LMS_BASE_URL:"http://lms.mango.edunext.link:8000",LOGIN_URL:"http://lms.mango.edunext.link:8000/login",LOGOUT_URL:"http://lms.mango.edunext.link:8000/logout",STUDIO_BASE_URL:"http://localhost:18010",MARKETING_SITE_BASE_URL:"http://lms.mango.edunext.link:8000",ORDER_HISTORY_URL:"MISSING_ENV_VAR".ORDER_HISTORY_URL,REFRESH_ACCESS_TOKEN_ENDPOINT:"http://lms.mango.edunext.link:8000/login_refresh",SECURE_COOKIES:!0,SEGMENT_KEY:"",SITE_NAME:"edX",USER_INFO_COOKIE_NAME:"edx-user-info",LOGO_URL:"http://lms.mango.edunext.link:8000/theming/asset/images/logo.png",LOGO_TRADEMARK_URL:"http://lms.mango.edunext.link:8000/theming/asset/images/logo.png",LOGO_WHITE_URL:"https://edx-cdn.org/v3/default/logo-white.svg",FAVICON_URL:"https://edx-cdn.org/v3/default/favicon.ico",MFE_CONFIG_API_URL:"/eox-nelp/api/mfe_config/v1/",APP_ID:"MISSING_ENV_VAR".APP_ID,SUPPORT_URL:"https://support.edx.org",CUSTOM_PRIMARY_COLORS:"MISSING_ENV_VAR".CUSTOM_PRIMARY_COLORS||{}};function l(){return i}function s(e){(0,a.ce)(i,"config"),i=e,(0,o.mk)(r.Ah)}function u(e){(0,a.ce)(e,"ProcessEnvConfigService"),i=Object.assign(i,e),(0,o.mk)(r.Ah)}function c(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"unspecified application code";(0,o.B1)(r.i9,(function(){e.forEach((function(e){void 0===i[e]&&console.warn("App configuration error: ".concat(e," is required by ").concat(t,"."))}))}))}},4740:(e,t,n)=>{"use strict";n.d(t,{Ah:()=>p,Cg:()=>c,Co:()=>r,G2:()=>h,Jz:()=>s,MM:()=>f,Ys:()=>i,ae:()=>l,e9:()=>u,f4:()=>d,i9:()=>a,pp:()=>o});var r="APP",o="".concat(r,".PUBSUB_INITIALIZED"),a="".concat(r,".CONFIG_INITIALIZED"),i="".concat(r,".AUTH_INITIALIZED"),l="".concat(r,".I18N_INITIALIZED"),s="".concat(r,".LOGGING_INITIALIZED"),u="".concat(r,".ANALYTICS_INITIALIZED"),c="".concat(r,".READY"),f="".concat(r,".INIT_ERROR"),d="CONFIG",p="".concat(d,".CHANGED"),h={"pgn-color-primary-100":{"#FFFFFF":94},"pgn-color-primary-200":{"#FFFFFF":75},"pgn-color-primary-300":{"#FFFFFF":50},"pgn-color-primary-400":{"#FFFFFF":25},"pgn-color-primary-500":{"#FFFFFF":0},"pgn-color-primary-600":{"#000000":10},"pgn-color-primary-700":{"#000000":20},"pgn-color-primary-800":{"#000000":25},"pgn-color-primary-900":{"#000000":30},"pgn-color-link-base":{"#FFFFFF":35},"pgn-color-link-hover":{"#FFFFFF":0}}},1810:(e,t,n)=>{"use strict";n.r(t),n.d(t,{FormattedDate:()=>g.XU,FormattedMessage:()=>b.A,FormattedNumber:()=>g.Gr,FormattedPlural:()=>v,FormattedRelativeTime:()=>h,FormattedTime:()=>g.ib,IntlProvider:()=>y.A,LOCALE_CHANGED:()=>w.gT,LOCALE_TOPIC:()=>w.BV,configure:()=>w.jK,createIntl:()=>y.E,defineMessages:()=>g.YK,getCountryList:()=>j,getCountryMessages:()=>_,getLanguageList:()=>M,getLanguageMessages:()=>N,getLocale:()=>w.JK,getMessages:()=>w.VL,getPrimaryLanguageSubtag:()=>w.NP,handleRtl:()=>w.ri,injectIntl:()=>k,intlShape:()=>w.Hu,isRtl:()=>w.Pv,useIntl:()=>i.A});var r=n(1635),o=n(7810),a=n(7090),i=n(4692),l=3600;function s(e){var t=Math.abs(e);return t<60?"second":t-1}var d=function(e){var t=(0,i.A)(),n=t.formatRelativeTime,a=t.textComponent,l=e.children,s=n(e.value||0,e.unit,(0,r.__rest)(e,["children","value","unit"]));return"function"==typeof l?l(s):a?o.createElement(a,null,s):o.createElement(o.Fragment,null,s)},p=function(e){var t=e.value,n=e.unit,i=e.updateIntervalInSeconds,c=(0,r.__rest)(e,["value","unit","updateIntervalInSeconds"]);(0,a.V1)(!i||!(!i||!f(n)),"Cannot schedule update with unit longer than hour");var p,h=o.useState(),m=h[0],v=h[1],g=o.useState(0),y=g[0],b=g[1],w=o.useState(0),S=w[0],O=w[1];n===m&&t===y||(b(t||0),v(n),O(f(n)?function(e,t){if(!e)return 0;switch(t){case"second":return e;case"minute":return 60*e;default:return e*l}}(t,n):0)),o.useEffect((function(){function e(){clearTimeout(p)}if(e(),!i||!f(n))return e;var t=S-i,r=s(t);if("day"===r)return e;var o=u(r),a=t-t%o,l=a>=S?a-o:a,c=Math.abs(l-S);return S!==l&&(p=setTimeout((function(){return O(l)}),1e3*c)),e}),[S,i,n]);var E=t||0,x=n;if(f(n)&&"number"==typeof S&&i){var C=u(x=s(S));E=Math.round(S/C)}return o.createElement(d,(0,r.__assign)({value:E,unit:x},c))};p.displayName="FormattedRelativeTime",p.defaultProps={value:0,unit:"second"};const h=p;var m=function(e){var t=(0,i.A)(),n=t.formatPlural,r=t.textComponent,a=e.value,l=e.other,s=e.children,u=e[n(a,e)]||l;return"function"==typeof s?s(u):r?o.createElement(r,null,u):u};m.defaultProps={type:"cardinal"},m.displayName="FormattedPlural";const v=m;var g=n(6602),y=n(7120),b=n(1863),w=n(1205),S=n(4916);function O(e){return O="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},O(e)}function E(){return E=Object.assign?Object.assign.bind():function(e){for(var t=1;t1?o-1:0),i=1;ie.length)&&(t=e.length);for(var n=0,r=new Array(t);ne.length)&&(t=e.length);for(var n=0,r=new Array(t);n{"use strict";n.d(t,{BV:()=>g,Hu:()=>m,JK:()=>S,NP:()=>b,Pe:()=>v,Pv:()=>E,VL:()=>O,gT:()=>y,jK:()=>k,ri:()=>x});var r=n(5826),o=n.n(r),a=n(786),i=n(1124),l=n.n(i);function s(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n0&&void 0!==arguments[0]?arguments[0]:S();return h[e]}function E(e){return f.includes(e)}function x(){E(S())?n.g.document.getElementsByTagName("html")[0].setAttribute("dir","rtl"):n.g.document.getElementsByTagName("html")[0].setAttribute("dir","ltr")}var C={ar:o().objectOf(o().string),en:o().objectOf(o().string),"es-419":o().objectOf(o().string),fr:o().objectOf(o().string),"zh-cn":o().objectOf(o().string),ca:o().objectOf(o().string),he:o().objectOf(o().string),id:o().objectOf(o().string),"ko-kr":o().objectOf(o().string),pl:o().objectOf(o().string),"pt-br":o().objectOf(o().string),ru:o().objectOf(o().string),th:o().objectOf(o().string),uk:o().objectOf(o().string)},T={config:o().object.isRequired,loggingService:o().shape({logError:o().func.isRequired}).isRequired,messages:o().oneOfType([o().shape(C),o().arrayOf(o().shape(C))]).isRequired};function k(e){o().checkPropTypes(T,e,"property","i18n"),p=e.loggingService,d=e.config,h=Array.isArray(e.messages)?function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return Array.isArray(t)?l().apply(void 0,[{}].concat(function(e){if(Array.isArray(e))return s(e)}(e=t)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return s(e,t);var n=Object.prototype.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}}(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.")}())):{}}(e.messages):e.messages,"production"!==d.ENVIRONMENT&&(Object.keys(h).forEach((function(e){c.indexOf(e)<0&&console.warn("Unexpected locale: ".concat(e))})),c.forEach((function(e){void 0===h[e]&&console.warn("Missing locale: ".concat(e))}))),x()}},5283:(e,t,n)=>{"use strict";n.r(t),n.d(t,{APP_ANALYTICS_INITIALIZED:()=>o.e9,APP_AUTH_INITIALIZED:()=>o.Ys,APP_CONFIG_INITIALIZED:()=>o.i9,APP_I18N_INITIALIZED:()=>o.ae,APP_INIT_ERROR:()=>o.MM,APP_LOGGING_INITIALIZED:()=>o.Jz,APP_PUBSUB_INITIALIZED:()=>o.pp,APP_READY:()=>o.Cg,APP_TOPIC:()=>o.Co,CONFIG_CHANGED:()=>o.Ah,CONFIG_TOPIC:()=>o.f4,auth:()=>a.j2,camelCaseObject:()=>r.il,convertKeyNames:()=>r.Ro,ensureConfig:()=>l.ZI,ensureDefinedConfig:()=>r.ce,getConfig:()=>l.zj,getPath:()=>r.Yn,getQueryParameters:()=>r.LT,history:()=>a.b6,initError:()=>a.Bb,initialize:()=>a.n_,initializeMockApp:()=>j,mergeConfig:()=>l.R2,mix:()=>r.jh,mockMessages:()=>T,modifyObjectKeys:()=>r.oH,parseURL:()=>r.vx,publish:()=>i.mk,setConfig:()=>l.Nk,snakeCaseObject:()=>r.ue,subscribe:()=>i.B1,unsubscribe:()=>i.al});var r=n(5656),o=n(4740),a=n(4050),i=n(6454),l=n(6783),s=n(9541);function u(e){return u="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},u(e)}function c(e,t){for(var n=0;n0&&void 0!==arguments[0]?arguments[0]:{},t=e.messages,n=void 0===t?T:t,r=e.authenticatedUser,o=void 0===r?null:r,a=(0,g.jK)(E,{config:(0,l.zj)()}),i=(0,x.jK)(C.A,{config:A(A({},(0,l.zj)()),{},{authenticatedUser:o}),loggingService:a}),u=(0,s.jK)(m,{config:(0,l.zj)(),httpClient:i.getAuthenticatedHttpClient(),loggingService:a});return(0,v.jK)({config:(0,l.zj)(),loggingService:a,messages:n}),{analyticsService:u,authService:i,loggingService:a}}},4050:(e,t,n)=>{"use strict";n.d(t,{j2:()=>H,b6:()=>z,Bb:()=>G,n_:()=>Q});var r=n(4980),o=n(1680),a=n.n(o),i=n(5656),l=n(6454),s=n(6783),u=n(1440);function c(e){return c="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},c(e)}function f(e,t){for(var n=0;n1&&void 0!==arguments[1]?arguments[1]:{},n=e,r=t;"object"===c(e)&&"message"in e&&(r=p(p({},e.customAttributes||{}),t),n=e.message),g("INFO",n,r)}},{key:"logError",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=p(p({},e.customAttributes||{}),t);0===Object.keys(n).length&&(n=void 0);var r=e.message||("string"==typeof e?e:"");this.ignoredErrorRegexes&&r.match(this.ignoredErrorRegexes)?g("IGNORED_ERROR",r,n):function(e,t){window&&void 0!==window.newrelic&&window.newrelic.noticeError(function(e){if(e.message&&e.message.length>v){var t=Object.create(e);return t.message=t.message.substring(0,v),t}return"string"==typeof e&&e.length>v?e.substring(0,v):e}(e),t)}(e,n)}},{key:"setCustomAttribute",value:function(e,t){!function(e,t){window&&void 0!==window.newrelic&&window.newrelic.setCustomAttribute(e,t)}(e,t)}}],n&&f(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),e}(),b=n(9541),w=n(6994);function S(e){return S="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},S(e)}function O(e,t){for(var n=0;n=0;--o){var a=this.tryEntries[o],i=a.completion;if("root"===a.tryLoc)return r("end");if(a.tryLoc<=this.prev){var l=n.call(a,"catchLoc"),s=n.call(a,"finallyLoc");if(l&&s){if(this.prev=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),x(n),f}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var o=r.arg;x(n)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,n){return this.delegate={iterator:T(e),resultName:t,nextLoc:n},"next"===this.method&&(this.arg=void 0),f}},e}function L(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n{"use strict";n.d(t,{Pe:()=>f,fH:()=>u,jK:()=>s,vV:()=>c});var r=n(5826),o=n.n(r),a={config:o().object.isRequired},i={logInfo:o().func.isRequired,logError:o().func.isRequired},l=null;function s(e,t){return o().checkPropTypes(a,t,"property","Logging"),l=new e(t),o().checkPropTypes(i,l,"property","LoggingService"),l}function u(e,t){return l.logInfo(e,t)}function c(e,t){return l.logError(e,t)}function f(){if(!l)throw Error("You must first configure the logging service.");return l}},6454:(e,t,n)=>{"use strict";n.d(t,{B1:()=>a,al:()=>i,mk:()=>l});var r=n(7934),o=n.n(r);function a(e,t){return o().subscribe(e,t)}function i(e){return o().unsubscribe(e)}function l(e,t){return o().publish(e,t)}},5656:(e,t,n)=>{"use strict";n.d(t,{LT:()=>m,Ro:()=>d,Yn:()=>h,ce:()=>v,il:()=>c,jh:()=>g,oH:()=>u,ue:()=>f,vx:()=>p});var r=n(1422),o=n.n(r),a=n(8284),i=n.n(a);function l(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n0&&void 0!==arguments[0]?arguments[0]:n.g.location.search;return e.slice(e.indexOf("?")+1).split("&").filter((function(e){return""!==e})).reduce((function(e,t){var n=t.indexOf("="),r=t.slice(0,n),o=t.slice(n+1);return Object.assign(e,function(e,t,n){return(t=function(e){var t=function(e,t){if("object"!==s(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!==s(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"===s(t)?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}({},r,decodeURIComponent(o)))}),{})}function v(e,t){Object.keys(e).forEach((function(n){void 0===e[n]&&console.warn("Module configuration error: ".concat(n," is required by ").concat(t,"."))}))}function g(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:50,r="#";function o(e){return parseInt(e,16)}if(e.length<6||t.length<6)throw new Error("Parameter color does not have format #RRGGBB");for(var a=0;a<=5;a+=2){for(var i=o(e.replace("#","").substr(a,2)),l=o(t.replace("#","").substr(a,2)),s=Math.round(l+n/100*(i-l)).toString(16);s.length<2;)s="0".concat(s);r+=s}return r}},8889:(e,t,n)=>{"use strict";n.d(t,{e2:()=>x,_O:()=>C,Ay:()=>T});var r=n(7810),o=n(5826),a=n.n(o),i=n(9122),l=n.n(i),s=n(6461),u=n(7566),c=n(4180),f=n(6887),d=n(1125),p=["bsPrefix","className"],h=r.forwardRef((function(e,t){var n=e.bsPrefix,o=e.className,a=(0,f.A)(e,p),i=(0,d.oU)(n,"btn-toolbar");return r.createElement("div",(0,c.A)({},a,{ref:t,className:l()(o,i)}))}));h.displayName="ButtonToolbar",h.defaultProps={role:"toolbar"};const m=h;var v=n(7408);function g(e){return g="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},g(e)}var y=["children","iconAfter","iconBefore"];function b(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 w(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,y);return r.createElement(s.A,O({},i,{className:l()(i.className),ref:t}),a&&r.createElement(v.A,{className:"btn-icon-before",size:i.size,src:a}),n,o&&r.createElement(v.A,{className:"btn-icon-after",size:i.size,src:o}))}));function x(e){return r.createElement(u.A,e)}function C(e){return r.createElement(m,e)}E.propTypes=w(w({},E.propTypes),{},{className:a().string,disabled:a().bool,children:a().node.isRequired,onClick:a().func,onKeyDown:a().func,type:a().string,variant:a().string,iconBefore:a().oneOfType([a().elementType,a().node]),iconAfter:a().oneOfType([a().elementType,a().node])}),E.defaultProps=w(w({},E.defaultProps),{},{children:void 0,className:void 0,iconBefore:void 0,iconAfter:void 0,disabled:!1}),x.propTypes={as:a().elementType,role:a().string,size:a().oneOf(["sm","md","lg"]),toggle:a().bool,vertical:a().bool,bsPrefix:a().string},x.defaultProps={as:"div",role:"group",toggle:!1,vertical:!1,bsPrefix:"btn-group",size:"md"},C.propTypes={role:a().string,bsPrefix:a().string},C.defaultProps={role:"toolbar",bsPrefix:"btn-toolbar"};const T=E},6468:(e,t,n)=>{"use strict";n.d(t,{A:()=>O});var r=n(7810),o=n(9122),a=n.n(o),i=n(4180),l=n(6887),s=n(1125),u=["bsPrefix","fluid","as","className"],c=r.forwardRef((function(e,t){var n=e.bsPrefix,o=e.fluid,c=e.as,f=void 0===c?"div":c,d=e.className,p=(0,l.A)(e,u),h=(0,s.oU)(n,"container"),m="string"==typeof o?"-"+o:"-fluid";return r.createElement(f,(0,i.A)({ref:t},p,{className:a()(d,o?""+h+m:h)}))}));c.displayName="Container",c.defaultProps={fluid:!1};const f=c;var d=n(5826),p=n.n(d);function h(e){return h="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},h(e)}var m=["size","children"];function v(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 g(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,m);return r.createElement(f,b({},i,{ref:t,className:a()(i.className,w[n])}),o)}));S.propTypes=g(g({},f.propTypes),{},{as:p().elementType,children:p().node,fluid:p().bool,size:p().oneOf(Object.keys(w)),bsPrefix:p().string}),S.defaultProps={as:"div",children:void 0,fluid:!0,size:void 0,bsPrefix:"container"};const O=S},7408:(e,t,n)=>{"use strict";n.d(t,{A:()=>v});var r=n(7810),o=n(5826),a=n.n(o),i=n(9122),l=n.n(i),s=n(5113),u=n(9937);function c(e){return c="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},c(e)}var f=["src","id","className","hidden","screenReaderText","svgAttrs","size"];function d(){return d=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,f);if(i){var S=y["aria-label"]||y["aria-labelledby"],O=function(e){for(var t=1;t{var t=function(e){var t=document.createElement(e.tagName);return t.setAttribute("style","line-height: ".concat(1e3,"px; display: inline-block; word-break: break-word;")),t},n=function e(t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:[],o="".concat(arguments.length>1&&void 0!==arguments[1]&&arguments[1]?" ":"").concat(n);if(!r.length)return[document.createTextNode("".concat(t.trim()).concat(o))];var a=[];return r.forEach((function(o,i){var l=t.slice(o.start,o.end);if(l.length)if(i===r.length-1&&n&&(l=l.trimEnd()),o.type){var s=document.createElement(o.type);Array.isArray(o.children)?e(l,!1,"",o.children).forEach((function(e){s.appendChild(e)})):s.appendChild(document.createTextNode(l)),Object.keys(o.props||{}).forEach((function(e){"children"!==e&&s.setAttribute(e,o.props[e])})),a.push(s)}else a.push(document.createTextNode(l))})),o&&a.push(document.createTextNode(o)),a},r=function(e,t){var n=Math.floor(e.length*t);return e.slice(0,n)};function o(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n="";return e.forEach((function(e){var r,a="string"==typeof e,i="string"==typeof(null==e||null===(r=e.props)||void 0===r?void 0:r.children),l=a||i?null:[],s=n.length,u=(n+=a?e:i?e.props.children:o(e.props.children.constructor===Object?[e.props.children]:e.props.children,l)).length;t.push({type:a?null:e.type,props:null==e?void 0:e.props,start:s,end:u,children:l})})),n}e.exports={cropText:r,truncateLines:function(e,a,i){var l=i.lines,s=i.whiteSpace,u=i.ellipsis,c=1e3*Number(l),f=t(a),d=[],p="string"==typeof e?e:o(e,d),h=p,m=1;a.append(f);for(var v=n(p,!1,"",d),g=0;g=y)return f.parentNode.removeChild(f),[n(h,!1,"",d),p];for(;y>c;){h=r(p,m-=.01);var b=n(h,s,u,d);f.innerHTML="";for(var w=0;w{"use strict";n.r(t),n.d(t,{ALERT_CLOSE_LABEL_TEXT:()=>ht,ActionRow:()=>G,Alert:()=>wt,AlertModal:()=>qw,Annotation:()=>xt,Avatar:()=>At,AvatarButton:()=>Nt,Badge:()=>zt,Breadcrumb:()=>Xt,Bubble:()=>zx,BulkActions:()=>Ok,Button:()=>it.Ay,ButtonGroup:()=>it.e2,ButtonToolbar:()=>it._O,CARD_VARIANTS:()=>tr,CAROUSEL_NEXT_LABEL_TEXT:()=>Hi,CAROUSEL_PREV_LABEL_TEXT:()=>Vi,CHIP_PGN_CLASS:()=>Ji,Card:()=>or,CardCarousel:()=>Ai,CardColumns:()=>ar,CardDeck:()=>pr,CardGrid:()=>gr,CardGroup:()=>hr,CardImg:()=>rn,CardView:()=>VP,Carousel:()=>$i,CarouselItem:()=>qi,CheckboxControl:()=>zh,CheckboxFilter:()=>MP,Chip:()=>Qi,ChipCarousel:()=>sl,CloseButton:()=>Me,Col:()=>sr.A,Collapse:()=>Al,Collapsible:()=>Fs,ColorPicker:()=>nI,Container:()=>ul.A,DataTable:()=>jP,DataTableContext:()=>xT,Dropdown:()=>Xu,DropdownButton:()=>nc,DropdownFilter:()=>LP,DropdownToggle:()=>Ju,Dropzone:()=>Q_,FULLSCREEN_MODAL_CLOSE_LABEL:()=>Aw,Fade:()=>je,Figure:()=>Lm,Form:()=>am,FormAutosuggest:()=>ph,FormAutosuggestOption:()=>xh,FormCheck:()=>Sc,FormControl:()=>Hd,FormControlDecoratorGroup:()=>Id,FormControlFeedback:()=>xd,FormFile:()=>_c,FormGroup:()=>rp,FormLabel:()=>Yd,FormRadio:()=>wp,FormRadioSet:()=>_p,FormRadioSetContext:()=>fp,FormSwitchSet:()=>om,FormText:()=>wd,FullscreenModal:()=>jw,HYPER_LINK_EXTERNAL_LINK_ALT_TEXT:()=>Om,HYPER_LINK_EXTERNAL_LINK_TITLE:()=>Em,Hyperlink:()=>Cm,Icon:()=>Je.A,IconButton:()=>vi,IconButtonToggle:()=>km,IconButtonWithTooltip:()=>mi,Image:()=>jm,InputGroup:()=>vm,Layout:()=>wl,MAIL_TO_LINK_EXTERNAL_LINK_ALTERNATIVE_TEXT:()=>Wm,MAIL_TO_LINK_EXTERNAL_LINK_TITLE:()=>$m,MODAL_DIALOG_CLOSE_LABEL:()=>Cw,MailtoLink:()=>Ym,MarketingModal:()=>Bw,Media:()=>ev,MediaQuery:()=>Ye(),Menu:()=>lv,MenuItem:()=>wh,ModalCloseButton:()=>Sb,ModalContext:()=>eb,ModalDialog:()=>kw,ModalLayer:()=>Cb,ModalPopup:()=>ab,MultiSelectDropdownFilter:()=>FP,NAVBAR_LABEL:()=>FS,Nav:()=>SS,NavDropdown:()=>wS,NavItem:()=>yS,NavLink:()=>bS,Navbar:()=>VS,NavbarBrand:()=>GS,OverflowScroll:()=>Rr,OverflowScrollContext:()=>Pr,Overlay:()=>Ja,OverlayTrigger:()=>Za,PAGE_BANNER_DISMISS_ALT_TEXT:()=>WS,PAGINATION_BUTTON_ICON_BUTTON_NEXT_ALT:()=>bO,PAGINATION_BUTTON_ICON_BUTTON_PREV_ALT:()=>wO,PAGINATION_BUTTON_LABEL_CURRENT_PAGE:()=>gO,PAGINATION_BUTTON_LABEL_NEXT:()=>mO,PAGINATION_BUTTON_LABEL_PAGE:()=>vO,PAGINATION_BUTTON_LABEL_PAGE_OF_COUNT:()=>yO,PAGINATION_BUTTON_LABEL_PREV:()=>hO,PageBanner:()=>YS,Pagination:()=>kO,Popover:()=>KO,PopoverContent:()=>HO,PopoverTitle:()=>UO,PopperElement:()=>Jy,Portal:()=>Ly,ProductTour:()=>PE,ProgressBar:()=>cE,RadioControl:()=>yp,ResponsiveContext:()=>Ze.Context,ResponsiveEmbed:()=>jE,Row:()=>lr.A,SEARCH_FIELD_BUTTON_TEXT:()=>ox,SEARCH_FIELD_SCREEN_READER_TEXT_CLEAR_BUTTON:()=>rx,SEARCH_FIELD_SCREEN_READER_TEXT_LABEL:()=>tx,SEARCH_FIELD_SCREEN_READER_TEXT_SUBMIT_BUTTON:()=>nx,SELECT_MENU_DEFAULT_MESSAGE:()=>db,STANDARD_MODAL_CLOSE_LABEL:()=>zw,Scrollable:()=>Zs,SearchField:()=>ix,SelectMenu:()=>hb,SelectableBox:()=>yA,Sheet:()=>kx,Skeleton:()=>xn,SkeletonTheme:()=>Cn,Spinner:()=>Jp,SplitButton:()=>lc,Stack:()=>Kr,StandardModal:()=>Uw,StatefulButton:()=>lC,Stepper:()=>tC,Sticky:()=>rA,SwitchControl:()=>Jh,TABLE_FILTERS_BUTTON_TEXT:()=>Wk,TOAST_CLOSE_LABEL_TEXT:()=>rT,TOAST_DELAY:()=>oT,Tab:()=>xC,TabContainer:()=>sC,TabContent:()=>cC,TabPane:()=>hC,TableCell:()=>ET,TableControlBar:()=>Mk,TableFilters:()=>Zk,TableFooter:()=>Hk,TableHeader:()=>bT,TableHeaderCell:()=>vT,TablePagination:()=>zk,TablePaginationMinimal:()=>Gk,TableRow:()=>kT,Tabs:()=>DC,TextFilter:()=>RP,Toast:()=>iT,ToggleButton:()=>$P,ToggleButtonGroup:()=>JP,Tooltip:()=>si,TransitionReplace:()=>vs,Truncate:()=>wj,ValidationMessage:()=>w,Variant:()=>u,asInput:()=>N,breakpoints:()=>at,messages:()=>vj,useAbsoluteLayout:()=>lT.useAbsoluteLayout,useArrowKeyNavigation:()=>eh,useBlockLayout:()=>lT.useBlockLayout,useCheckboxSetValues:()=>cm,useColumnOrder:()=>lT.useColumnOrder,useExpanded:()=>lT.useExpanded,useFilters:()=>lT.useFilters,useFlexLayout:()=>lT.useFlexLayout,useGlobalFilter:()=>lT.useGlobalFilter,useGroupBy:()=>lT.useGroupBy,useIndexOfLastVisibleChild:()=>wC,useIsVisible:()=>Gs,useMediaQuery:()=>Ze.useMediaQuery,useOverflowScroll:()=>kr,useOverflowScrollItems:()=>cr,usePagination:()=>lT.usePagination,useResizeColumns:()=>lT.useResizeColumns,useRowSelect:()=>lT.useRowSelect,useRowState:()=>lT.useRowState,useSortBy:()=>lT.useSortBy,useTable:()=>lT.useTable,useToggle:()=>lb,useWindowSize:()=>Vx});var r=n(7810),o=n(5826),a=n.n(o),i=n(9122),l=n.n(i),s=n(5113);const u=Object.freeze({status:{DANGER:"DANGER",INFO:"INFO",SUCCESS:"SUCCESS",WARNING:"WARNING"}});function c(e){return c="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},c(e)}function f(e,t){for(var n=0;n1&&void 0!==arguments[1]?arguments[1]:void 0,n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],o=function(o){function a(e){var t;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a),(t=C(this,a,[e])).handleChange=t.handleChange.bind(P(t)),t.handleBlur=t.handleBlur.bind(P(t)),t.handleKeyPress=t.handleKeyPress.bind(P(t)),t.renderInput=t.renderInput.bind(P(t));var n=t.props.id?t.props.id:(0,s.A)("asInput"),r=!!t.props.validator||t.props.isValid,o=t.props.validator?"":t.props.validationMessage,i=t.props.validator?"":t.props.dangerIconDescription;return t.state={id:n,value:t.props.value,isValid:r,validationMessage:o,dangerIconDescription:i},t}var i,c;return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&A(e,t)}(a,o),i=a,(c=[{key:"componentDidUpdate",value:function(e){var t={};this.props.value!==e.value&&(t.value=this.props.value),this.props.isValid===e.isValid||this.props.validator||(t.isValid=this.props.isValid),this.props.validationMessage===e.validationMessage||this.props.validator||(t.validationMessage=this.props.validationMessage),this.props.dangerIconDescription===e.dangerIconDescription||this.props.validator||(t.dangerIconDescription=this.props.dangerIconDescription),this.props.validator===e.validator||this.props.validator||(t.isValid=this.props.isValid,t.validationMessage=this.props.validationMessage,t.dangerIconDescription=this.props.dangerIconDescription),Object.keys(t).length>0&&this.setState(t)}},{key:"handleChange",value:function(e){this.setState({value:e.target.value}),this.props.onChange("checkbox"===e.target.type?e.target.checked:e.target.value,this.props.name)}},{key:"handleKeyPress",value:function(e){this.props.onKeyPress(e,this.props.name)}},{key:"handleBlur",value:function(e){var t=e.target.value;this.props.validator&&this.setState(this.props.validator(t)),this.props.onBlur(t,this.props.name)}},{key:"getLabel",value:function(){return r.createElement("label",{id:"label-".concat(this.state.id),htmlFor:this.state.id,className:l()({"form-check-label":this.isGroupedInput()})},this.props.label)}},{key:"getDescriptions",value:function(){var e="error-".concat(this.state.id),t="description-".concat(this.state.id),n={};return n.error=r.createElement(w,{id:e,isValid:this.state.isValid,invalidMessage:this.state.validationMessage,variant:{status:this.hasDangerTheme()?u.status.DANGER:u.status.INFO},variantIconDescription:this.state.dangerIconDescription}),n.describedBy=e,this.props.description&&(n.description=r.createElement("small",{className:"form-text",id:t,key:"1"},this.props.description),n.describedBy="".concat(n.describedBy," ").concat(t).trim()),n}},{key:"getAddons",value:function(e){var t=this,n=e.addonElements,o=e.type;return Array.isArray(n)?n.map((function(e,n){return r.cloneElement(e,{key:t.generateInputGroupAddonKey({prefix:o,index:n})})})):n}},{key:"hasDangerTheme",value:function(){return this.props.themes.indexOf("danger")>=0}},{key:"isGroupedInput",value:function(){return"checkbox"===t}},{key:"generateInputGroupAddonKey",value:function(e){var t=e.prefix,n=e.index;return"".concat(this.state.id,"-").concat(t,"-").concat(n)}},{key:"renderInput",value:function(t){var n=this.props,o=n.className,a=n.inputRef,i=n.type,s=n.isValid,u=(n.validator,n.themes,n.inline,n.inputGroupPrepend,n.inputGroupAppend,n.label,n.dangerIconDescription,n.description,n.validationMessage,function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},a=Object.keys(e);for(r=0;r=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(n,_));return r.createElement(e,j({},u,{id:this.state.id,value:this.state.value,className:l()({"form-control":!this.isGroupedInput(),"form-check-input":this.isGroupedInput(),"is-invalid":!this.state.isValid,"is-invalid-nodanger":!this.hasDangerTheme()},o),"aria-describedby":t,"aria-invalid":!s,onChange:this.handleChange,onBlur:this.handleBlur,onKeyPress:this.handleKeyPress,type:i,inputRef:a}))}},{key:"renderInputGroupAppend",value:function(){return r.createElement("div",{className:"input-group-append"},this.getAddons({type:"append",addonElements:this.props.inputGroupAppend}))}},{key:"renderInputGroupPrepend",value:function(){return r.createElement("div",{className:"input-group-prepend"},this.getAddons({type:"prepend",addonElements:this.props.inputGroupPrepend}))}},{key:"render",value:function(){var e=this.getDescriptions(),t=e.description,o=e.error,a=e.describedBy;return r.createElement("div",{className:l()({"form-group":!this.isGroupedInput(),"form-inline":!this.isGroupedInput()&&this.props.inline,"form-check":this.isGroupedInput()})},n&&this.getLabel(),this.props.inputGroupPrepend||this.props.inputGroupAppend?r.createElement("div",{className:l()("input-group"),"data-testid":"input-group"},this.renderInputGroupPrepend(),this.renderInput(a),this.renderInputGroupAppend()):this.renderInput(a),!n&&this.getLabel(),o,t)}}])&&E(i.prototype,c),Object.defineProperty(i,"prototype",{writable:!1}),a}(r.Component);return o.displayName="asInput(".concat(function(e){return e.displayName||e.name||"Component"}(e),")"),o.propTypes=I,o.defaultProps=R,(0,S.A)(o,"asInput",{className:{deprType:S.J.FORMAT,expect:function(e){return"string"==typeof e},transform:function(e){return Array.isArray(e)?e.join(" "):e},message:"It should be a string."},ariaLabel:{deprType:S.J.MOVED,newName:"aria-label"}})};function M(e){return M="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},M(e)}var D=["as","isStacked","children"];function L(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 B(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,D);return r.createElement(t,B(B({},a),{},{className:l()(a.className,{"pgn__action-row":!n,"pgn__action-row-stacked":n})}),o)}z.propTypes={as:a().elementType,className:a().string,children:a().node,isStacked:a().bool},z.defaultProps={as:"div",className:void 0,children:null,isStacked:!1},z.Spacer=function(){return r.createElement("span",{className:"pgn__action-row-spacer"})};const G=z;var U=n(4180),H=n(6887),V=n(5705),K=n.n(V);function q(e){return"default"+e.charAt(0).toUpperCase()+e.substr(1)}function W(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:String(t)}function $(e,t,n){var o=(0,r.useRef)(void 0!==e),a=(0,r.useState)(t),i=a[0],l=a[1],s=void 0!==e,u=o.current;return o.current=s,!s&&u&&i!==t&&l(t),[s?e:i,(0,r.useCallback)((function(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),o=1;o{t.current=e}),[e]),t};function J(e){const t=Y(e);return(0,r.useCallback)((function(...e){return t.current&&t.current(...e)}),[t])}var X=n(1125),Q=n(2189),ee=n(2483);const te=r.createContext(null);var ne=function(e){return e.scrollTop},re="unmounted",oe="exited",ae="entering",ie="entered",le="exiting",se=function(e){function t(t,n){var r;r=e.call(this,t,n)||this;var o,a=n&&!n.isMounting?t.enter:t.appear;return r.appearStatus=null,t.in?a?(o=oe,r.appearStatus=ae):o=ie:o=t.unmountOnExit||t.mountOnEnter?re:oe,r.state={status:o},r.nextCallback=null,r}(0,Q.A)(t,e),t.getDerivedStateFromProps=function(e,t){return e.in&&t.status===re?{status:oe}:null};var n=t.prototype;return n.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},n.componentDidUpdate=function(e){var t=null;if(e!==this.props){var n=this.state.status;this.props.in?n!==ae&&n!==ie&&(t=ae):n!==ae&&n!==ie||(t=le)}this.updateStatus(!1,t)},n.componentWillUnmount=function(){this.cancelNextCallback()},n.getTimeouts=function(){var e,t,n,r=this.props.timeout;return e=t=n=r,null!=r&&"number"!=typeof r&&(e=r.exit,t=r.enter,n=void 0!==r.appear?r.appear:t),{exit:e,enter:t,appear:n}},n.updateStatus=function(e,t){if(void 0===e&&(e=!1),null!==t)if(this.cancelNextCallback(),t===ae){if(this.props.unmountOnExit||this.props.mountOnEnter){var n=this.props.nodeRef?this.props.nodeRef.current:ee.findDOMNode(this);n&&ne(n)}this.performEnter(e)}else this.performExit();else this.props.unmountOnExit&&this.state.status===oe&&this.setState({status:re})},n.performEnter=function(e){var t=this,n=this.props.enter,r=this.context?this.context.isMounting:e,o=this.props.nodeRef?[r]:[ee.findDOMNode(this),r],a=o[0],i=o[1],l=this.getTimeouts(),s=r?l.appear:l.enter;e||n?(this.props.onEnter(a,i),this.safeSetState({status:ae},(function(){t.props.onEntering(a,i),t.onTransitionEnd(s,(function(){t.safeSetState({status:ie},(function(){t.props.onEntered(a,i)}))}))}))):this.safeSetState({status:ie},(function(){t.props.onEntered(a)}))},n.performExit=function(){var e=this,t=this.props.exit,n=this.getTimeouts(),r=this.props.nodeRef?void 0:ee.findDOMNode(this);t?(this.props.onExit(r),this.safeSetState({status:le},(function(){e.props.onExiting(r),e.onTransitionEnd(n.exit,(function(){e.safeSetState({status:oe},(function(){e.props.onExited(r)}))}))}))):this.safeSetState({status:oe},(function(){e.props.onExited(r)}))},n.cancelNextCallback=function(){null!==this.nextCallback&&(this.nextCallback.cancel(),this.nextCallback=null)},n.safeSetState=function(e,t){t=this.setNextCallback(t),this.setState(e,t)},n.setNextCallback=function(e){var t=this,n=!0;return this.nextCallback=function(r){n&&(n=!1,t.nextCallback=null,e(r))},this.nextCallback.cancel=function(){n=!1},this.nextCallback},n.onTransitionEnd=function(e,t){this.setNextCallback(t);var n=this.props.nodeRef?this.props.nodeRef.current:ee.findDOMNode(this),r=null==e&&!this.props.addEndListener;if(n&&!r){if(this.props.addEndListener){var o=this.props.nodeRef?[this.nextCallback]:[n,this.nextCallback],a=o[0],i=o[1];this.props.addEndListener(a,i)}null!=e&&setTimeout(this.nextCallback,e)}else setTimeout(this.nextCallback,0)},n.render=function(){var e=this.state.status;if(e===re)return null;var t=this.props,n=t.children,o=(t.in,t.mountOnEnter,t.unmountOnExit,t.appear,t.enter,t.exit,t.timeout,t.addEndListener,t.onEnter,t.onEntering,t.onEntered,t.onExit,t.onExiting,t.onExited,t.nodeRef,(0,H.A)(t,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]));return r.createElement(te.Provider,{value:null},"function"==typeof n?n(e,o):r.cloneElement(r.Children.only(n),o))},t}(r.Component);function ue(){}se.contextType=te,se.propTypes={},se.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:ue,onEntering:ue,onEntered:ue,onExit:ue,onExiting:ue,onExited:ue},se.UNMOUNTED=re,se.EXITED=oe,se.ENTERING=ae,se.ENTERED=ie,se.EXITING=le;const ce=se;function fe(e){return e&&e.ownerDocument||document}var de=/([A-Z])/g,pe=/^ms-/;function he(e){return function(e){return e.replace(de,"-$1").toLowerCase()}(e).replace(pe,"-ms-")}var me=/^((translate|rotate|scale)(X|Y|Z|3d)?|matrix(3d)?|perspective|skew(X|Y)?)$/i;const ve=function(e,t){var n="",r="";if("string"==typeof t)return e.style.getPropertyValue(he(t))||function(e,t){return function(e){var t=fe(e);return t&&t.defaultView||window}(e).getComputedStyle(e,t)}(e).getPropertyValue(he(t));Object.keys(t).forEach((function(o){var a=t[o];a||0===a?function(e){return!(!e||!me.test(e))}(o)?r+=o+"("+a+") ":n+=he(o)+": "+a+";":e.style.removeProperty(he(o))})),r&&(n+="transform: "+r+";"),e.style.cssText+=";"+n},ge=!("undefined"==typeof window||!window.document||!window.document.createElement);var ye=!1,be=!1;try{var we={get passive(){return ye=!0},get once(){return be=ye=!0}};ge&&(window.addEventListener("test",we,we),window.removeEventListener("test",we,!0))}catch(e){}const Se=function(e,t,n,r){if(r&&"boolean"!=typeof r&&!be){var o=r.once,a=r.capture,i=n;!be&&o&&(i=n.__once||function e(r){this.removeEventListener(t,e,a),n.call(this,r)},n.__once=i),e.addEventListener(t,i,ye?r:a)}e.addEventListener(t,n,r)},Oe=function(e,t,n,r){return Se(e,t,n,r),function(){!function(e,t,n,r){var o=r&&"boolean"!=typeof r?r.capture:r;e.removeEventListener(t,n,o),n.__once&&e.removeEventListener(t,n.__once,o)}(e,t,n,r)}};function Ee(e,t,n,r){var o,a;null==n&&(a=-1===(o=ve(e,"transitionDuration")||"").indexOf("ms")?1e3:1,n=parseFloat(o)*a||0);var i=function(e,t,n){void 0===n&&(n=5);var r=!1,o=setTimeout((function(){r||function(e,t,n,r){if(void 0===n&&(n=!1),void 0===r&&(r=!0),e){var o=document.createEvent("HTMLEvents");o.initEvent("transitionend",n,r),e.dispatchEvent(o)}}(e,0,!0)}),t+n),a=Oe(e,"transitionend",(function(){r=!0}),{once:!0});return function(){clearTimeout(o),a()}}(e,n,r),l=Oe(e,"transitionend",t);return function(){i(),l()}}function xe(e,t){var n=ve(e,t)||"",r=-1===n.indexOf("ms")?1e3:1;return parseFloat(n)*r}function Ce(e,t){var n=xe(e,"transitionDuration"),r=xe(e,"transitionDelay"),o=Ee(e,(function(n){n.target===e&&(o(),t(n))}),n+r)}function Te(e){e.offsetHeight}var ke,Pe=["className","children"],Ae=((ke={})[ae]="show",ke[ie]="show",ke),_e=r.forwardRef((function(e,t){var n=e.className,o=e.children,a=(0,H.A)(e,Pe),i=(0,r.useCallback)((function(e){Te(e),a.onEnter&&a.onEnter(e)}),[a]);return r.createElement(ce,(0,U.A)({ref:t,addEndListener:Ce},a,{onEnter:i}),(function(e,t){return r.cloneElement(o,(0,U.A)({},t,{className:l()("fade",n,o.props.className,Ae[e])}))}))}));_e.defaultProps={in:!1,timeout:300,mountOnEnter:!1,unmountOnExit:!1,appear:!1},_e.displayName="Fade";const je=_e;var Ie=["label","onClick","className"],Re={label:a().string.isRequired,onClick:a().func},Ne=r.forwardRef((function(e,t){var n=e.label,o=e.onClick,a=e.className,i=(0,H.A)(e,Ie);return r.createElement("button",(0,U.A)({ref:t,type:"button",className:l()("close",a),onClick:o},i),r.createElement("span",{"aria-hidden":"true"},"×"),r.createElement("span",{className:"sr-only"},n))}));Ne.displayName="CloseButton",Ne.propTypes=Re,Ne.defaultProps={label:"Close"};const Me=Ne,De=function(e){return r.forwardRef((function(t,n){return r.createElement("div",(0,U.A)({},t,{ref:n,className:l()(t.className,e)}))}))};var Le=/-(.)/g,Be=["className","bsPrefix","as"];function Fe(e,t){var n,o,a=void 0===t?{}:t,i=a.displayName,s=void 0===i?(n=e)[0].toUpperCase()+(o=n,o.replace(Le,(function(e,t){return t.toUpperCase()}))).slice(1):i,u=a.Component,c=a.defaultProps,f=r.forwardRef((function(t,n){var o=t.className,a=t.bsPrefix,i=t.as,s=void 0===i?u||"div":i,c=(0,H.A)(t,Be),f=(0,X.oU)(a,e);return r.createElement(s,(0,U.A)({ref:n,className:l()(o,f)},c))}));return f.defaultProps=c,f.displayName=s,f}var ze=n(9257),Ge=["bsPrefix","show","closeLabel","className","children","variant","onClose","dismissible","transition"],Ue=De("h4");Ue.displayName="DivStyledAsH4";var He=Fe("alert-heading",{Component:Ue}),Ve=Fe("alert-link",{Component:ze.A}),Ke={show:!0,transition:je,closeLabel:"Close alert"},qe=r.forwardRef((function(e,t){var n=Z(e,{show:"onClose"}),o=n.bsPrefix,a=n.show,i=n.closeLabel,s=n.className,u=n.children,c=n.variant,f=n.onClose,d=n.dismissible,p=n.transition,h=(0,H.A)(n,Ge),m=(0,X.oU)(o,"alert"),v=J((function(e){f&&f(!1,e)})),g=!0===p?je:p,y=r.createElement("div",(0,U.A)({role:"alert"},g?void 0:h,{ref:t,className:l()(s,m,c&&m+"-"+c,d&&m+"-dismissible")}),d&&r.createElement(Me,{onClick:v,label:i}),u);return g?r.createElement(g,(0,U.A)({unmountOnExit:!0},h,{ref:void 0,in:a}),y):a?y:null}));qe.displayName="Alert",qe.defaultProps=Ke,qe.Link=Ve,qe.Heading=He;const We=qe;var $e=n(1863),Ze=n(570),Ye=n.n(Ze),Je=n(7408),Xe="576px",Qe="768px",et="992px",tt="1200px",nt="1400px",rt={extraSmall:{maxWidth:parseFloat(Xe)||575.98},small:{minWidth:parseFloat(Xe)||576,maxWidth:parseFloat(Qe)||767.98},medium:{minWidth:parseFloat(Qe)||768,maxWidth:parseFloat(et)||991.98},large:{minWidth:parseFloat(et)||992,maxWidth:parseFloat(tt)||1199.98},extraLarge:{minWidth:parseFloat(tt)||1200,maxWidth:parseFloat(nt)||1399.98},extraExtraLarge:{minWidth:parseFloat(nt)||1400}},ot=Object.freeze({xs:"extraSmall",sm:"small",md:"medium",lg:"large",xl:"extraLarge",xxl:"extraExtraLarge"});const at=rt;var it=n(8889);function lt(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,ut),d=function(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,a,i,l=[],s=!0,u=!1;try{if(a=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;s=!1}else for(;!(s=(r=a.call(n)).done)&&(l.push(r.value),l.length!==t);s=!0);}catch(e){u=!0,o=e}finally{try{if(!s&&null!=n.return&&(i=n.return(),Object(i)!==i))return}finally{if(u)throw o}}return l}}(e,t)||function(e,t){if(e){if("string"==typeof e)return lt(e,t);var n=Object.prototype.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)?lt(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.")}()}((0,r.useState)(c),2),p=d[0],h=d[1],m=(0,Ze.useMediaQuery)({maxWidth:at.extraSmall.maxWidth});(0,r.useEffect)((function(){h(!!m||c)}),[m,c]);var v=(0,r.useCallback)((function(e){var t={size:"sm",key:e.props.children};return r.cloneElement(e,t)}),[]);return r.createElement(We,pt({},f,{className:l()("alert-content",f.className),ref:t}),o&&r.createElement(Je.A,{src:o,className:"alert-icon"}),r.createElement("div",{className:l()({"pgn__alert-message-wrapper":!p,"pgn__alert-message-wrapper-stacked":p})},r.createElement("div",{className:"alert-message-content"},n),(i||(null==a?void 0:a.length)>0)&&r.createElement(G,{className:"pgn__alert-actions"},r.createElement(G.Spacer,null),i&&r.createElement(it.Ay,{size:"sm",variant:"tertiary",onClick:s},u||r.createElement($e.A,{id:"pgn.Alert.closeLabel",defaultMessage:"Dismiss",description:"Label of a close button on Alert component"})),a&&a.map(v))))})),vt=De("h4");function gt(e){return r.createElement(We.Heading,e)}function yt(e){return r.createElement(We.Link,e)}vt.displayName="DivStyledAsH4";var bt={as:a().elementType,bsPrefix:a().string};yt.propTypes=bt,gt.propTypes=bt,yt.defaultProps={as:"a",bsPrefix:"alert-link"},gt.defaultProps={as:vt,bsPrefix:"alert-heading"},mt.propTypes=ft(ft({},We.propTypes),{},{className:a().string,bsPrefix:a().string,variant:a().oneOf(["primary","secondary","success","danger","warning","info","dark","light"]),transition:a().oneOfType([a().bool,a().shape({in:a().bool,appear:a().bool,children:a().node,onEnter:a().func,onEntered:a().func,onEntering:a().func,onExit:a().func,onExited:a().func,onExiting:a().func})]),children:a().node,icon:a().func,show:a().bool,dismissible:a().bool,onClose:a().func,actions:a().arrayOf(a().element),stacked:a().bool,closeLabel:a().oneOfType([a().string,a().element])}),mt.defaultProps=ft(ft({},We.defaultProps),{},{children:void 0,icon:void 0,actions:void 0,dismissible:!1,onClose:function(){},closeLabel:void 0,show:!0,stacked:!1}),mt.Heading=gt,mt.Link=yt;const wt=mt;var St=["className","variant","children","arrowPlacement"];function Ot(){return Ot=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,St);return r.createElement("span",Ot({className:l()(n,"pgn__annotation","pgn__annotation-".concat(o,"-").concat(i)),ref:t},s),a)}));Et.defaultProps={className:void 0,variant:"success",arrowPlacement:"bottom"},Et.propTypes={children:a().node.isRequired,className:a().string,variant:a().oneOf(["error","success","warning","light","dark"]),arrowPlacement:a().oneOf(["top","right","bottom","left"])};const xt=Et,Ct=n.p+"95ec738c0b7faac5b5c9126794446bbd.svg";var Tt=["alt","size","src"];function kt(){return kt=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,Tt);return r.createElement("img",kt({},a,{className:l()("pgn__avatar","pgn__avatar-".concat(n),a.className),src:o||Ct,alt:t}))}Pt.propTypes={alt:a().string,size:a().oneOf(["xs","sm","md","lg","xl","xxl","huge"]),src:a().string},Pt.defaultProps={alt:"",size:"md",src:void 0};const At=Pt;var _t=["children","className","showLabel","size","src"];function jt(){return jt=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,_t),c=It[i]||"sm";return r.createElement(it.Ay,jt({},u,{className:l()("btn-avatar","pgn__avatar-button-avatar","pgn__avatar-button-avatar-".concat(i),o,{"pgn__avatar-button-hide-label":!a}),size:i,ref:t}),r.createElement(At,{src:s,alt:a?"":n,size:c}),a&&n)}));Rt.propTypes={children:a().string,className:a().string,showLabel:a().bool,size:a().oneOf(["sm","md","lg"]),src:a().string,variant:a().string},Rt.defaultProps={children:void 0,className:void 0,showLabel:!0,size:"md",src:void 0,variant:"tertiary"};const Nt=Rt;var Mt=["bsPrefix","variant","pill","className","as"],Dt=r.forwardRef((function(e,t){var n=e.bsPrefix,o=e.variant,a=e.pill,i=e.className,s=e.as,u=void 0===s?"span":s,c=(0,H.A)(e,Mt),f=(0,X.oU)(n,"badge");return r.createElement(u,(0,U.A)({ref:t},c,{className:l()(i,f,a&&f+"-pill",o&&f+"-"+o)}))}));Dt.displayName="Badge",Dt.defaultProps={pill:!1};const Lt=Dt;function Bt(){return Bt=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(o,Ut),c={};return"a"===t&&i&&(console.warn('[Deprecated]: using "url" parameter to specify link\'s destination in Breadcrumb component is deprecated. Please use "href" instead when rendering links as anchor tag.'),c.href=i),n&&(c.onClick=n),r.createElement(t,Vt(Vt(Vt({},u),c),{},{className:l()("link-muted",s)}),a)}function Wt(){return Wt=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,Zt),d=t.length,p=s?[t[d-1]]:t;return r.createElement("nav",Yt({"aria-label":u,className:l()("pgn__breadcrumb","pgn__breadcrumb-".concat(i))},f),r.createElement("ol",{className:l()("list-inline",{"is-mobile":s})},p.map((function(e,t){return r.createElement(r.Fragment,{key:e.label},r.createElement("li",{className:l()("list-inline-item")},r.createElement(qt,{as:c,clickHandler:a,linkProps:e})),(n||t+1e&&t===b-1){const t=null!==(c=n.width)&&void 0!==c?c:"100%",r=e%1,o="number"==typeof t?t*r:`calc(${t} * ${r})`;n={...n,width:o}}const o=r.createElement("span",{className:v,style:n,key:t},"‌");g?y.push(o):y.push(r.createElement(r.Fragment,{key:t},o,r.createElement("br",null)))}return r.createElement("span",{className:o,"data-testid":a,"aria-live":"polite","aria-busy":null!==(f=h.enableAnimation)&&void 0!==f?f:On},t?y.map(((e,n)=>r.createElement(t,{key:n},e))):y)}function Cn({children:e,...t}){return r.createElement(Sn.Provider,{value:t},e)}var Tn=r.forwardRef((function(e,t){var n=e.actions,o=e.className,a=e.size,i=e.subtitle,s=e.title,u=e.skeletonHeight,c=e.skeletonWidth,f=(0,r.useContext)(wn).isLoading,d=(0,r.useCallback)((function(e){if(r.isValidElement(e)){var t=e.props.children,n={size:a,children:Array.isArray(t)?t.map(d):d(t)};return r.cloneElement(e,n)}return e}),[a]);return f?r.createElement("div",{className:l()("pgn__card-header",o)},r.createElement(xn,{containerClassName:"pgn__card-header-loader",height:u,width:c})):r.createElement("div",{className:l()("pgn__card-header",o),ref:t},r.createElement("div",{className:"pgn__card-header-content"},s&&r.createElement("div",{className:"pgn__card-header-title-".concat(a)},s),i&&r.createElement("div",{className:"pgn__card-header-subtitle-".concat(a)},i)),n&&r.createElement("div",{className:"pgn__card-header-actions"},"md"!==a?d(n):n))}));Tn.propTypes={actions:a().node,className:a().string,title:a().node,size:a().oneOf(["sm","md"]),subtitle:a().node,skeletonHeight:a().number,skeletonWidth:a().number},Tn.defaultProps={actions:null,className:null,size:"md",title:null,subtitle:null,skeletonHeight:20,skeletonWidth:null};const kn=Tn;var Pn=["className"];function An(){return An=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,Pn);return r.createElement("div",An({className:l()("pgn__card-divider",n),ref:t},o))}));_n.propTypes={className:a().string},_n.defaultProps={className:void 0};const jn=_n;var In=r.forwardRef((function(e,t){var n=e.className,o=e.children,a=e.title,i=e.actions,s=e.muted,u=e.skeletonHeight,c=e.skeletonWidth;return(0,r.useContext)(wn).isLoading?r.createElement("div",{className:l()("pgn__card-section",n,{"is-muted":s})},r.createElement(xn,{containerClassName:"pgn__card-section-loader",height:u,width:c})):r.createElement("div",{className:l()("pgn__card-section",n,{"is-muted":s}),ref:t},a&&r.createElement("div",{className:"pgn__card-section-title"},a),o,i&&r.createElement("div",{className:"pgn__card-section-actions"},i))}));In.propTypes={className:a().string,children:a().node,title:a().node,actions:a().node,muted:a().bool,skeletonHeight:a().number,skeletonWidth:a().number},In.defaultProps={children:null,className:void 0,title:void 0,actions:void 0,muted:!1,skeletonHeight:100,skeletonWidth:void 0};const Rn=In;var Nn=r.forwardRef((function(e,t){var n=e.children,o=e.className,a=e.isStacked,i=e.textElement,s=e.skeletonHeight,u=e.skeletonWidth,c=e.orientation,f=(0,r.useContext)(wn),d=f.orientation,p=f.isLoading,h=c||d,m="pgn__card-footer ".concat(h).concat(a?"-stacked":""),v="pgn__card-footer-text ".concat(h).concat(a?"-stacked":"");return p?r.createElement("div",{className:l()(o,m)},r.createElement(xn,{containerClassName:"pgn__card-footer-loader",height:s,width:u})):r.createElement("div",{className:l()(o,m),ref:t},i&&r.createElement("div",{className:v},i),n)}));Nn.propTypes={children:a().node,className:a().string,textElement:a().node,isStacked:a().bool,orientation:a().oneOf(["horizontal","vertical"]),skeletonHeight:a().number,skeletonWidth:a().number},Nn.defaultProps={children:null,className:void 0,textElement:void 0,isStacked:!1,orientation:void 0,skeletonHeight:18,skeletonWidth:void 0};const Mn=Nn,Dn=n.p+"24068215015af53c8a67fa1c36d8f0a9.png";function Ln(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,a,i,l=[],s=!0,u=!1;try{if(a=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;s=!1}else for(;!(s=(r=a.call(n)).done)&&(l.push(r.value),l.length!==t);s=!0);}catch(e){u=!0,o=e}finally{try{if(!s&&null!=n.return&&(i=n.return(),Object(i)!==i))return}finally{if(u)throw o}}return l}}(e,t)||function(e,t){if(e){if("string"==typeof e)return Bn(e,t);var n=Object.prototype.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)?Bn(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.")}()}function Bn(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,Gn);return r.createElement("div",Un({className:l()("pgn__card-body",n),ref:t},a),o)}));Hn.propTypes={children:a().node,className:a().string},Hn.defaultProps={children:void 0,className:void 0};const Vn=Hn;var Kn=["className","children","variant","icon","title","actions"];function qn(){return qn=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,Kn);return(0,r.useContext)(wn).isLoading?r.createElement("div",{className:l()("pgn__card-status",n),"data-testid":"card-status-skeleton",ref:t},r.createElement(xn,null)):r.createElement("div",qn({className:l()("pgn__card-status","pgn__card-status__".concat(a),n),ref:t},c),r.createElement("div",{className:"pgn__card-status__content"},i&&r.createElement(Je.A,{className:"pgn__card-status__content-icon",src:i}),r.createElement("div",{className:"pgn__card-status__message-content"},s&&r.createElement("div",{className:"pgn__card-status__heading"},s),o)),!!u&&r.createElement("div",{className:"pgn__card-status__actions"},u))}));Wn.propTypes={children:a().node.isRequired,className:a().string,icon:a().func,variant:a().oneOf(["primary","success","danger","warning"]),title:a().oneOfType([a().element,a().string]),actions:a().node},Wn.defaultProps={className:void 0,icon:void 0,variant:"warning",title:void 0,actions:void 0};const $n=Wn;function Zn(e){return Zn="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},Zn(e)}var Yn=["orientation","isLoading","className","isClickable","muted","variant"];function Jn(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 Xn(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,Yn),h=f?"muted":d;return r.createElement(bn,{orientation:i,isLoading:s,variant:h},r.createElement(gn,er({},p,{className:l()(u,"pgn__card",(n={horizontal:"horizontal"===i,clickable:c},o="pgn__card-".concat(h),a=h,o=function(e){var t=function(e,t){if("object"!=Zn(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!=Zn(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Zn(t)?t:String(t)}(o),o in n?Object.defineProperty(n,o,{value:a,enumerable:!0,configurable:!0,writable:!0}):n[o]=a,n)),ref:t,tabIndex:c?0:-1})))}));nr.propTypes={className:a().string,orientation:a().oneOf(["vertical","horizontal"]),isClickable:a().bool,isLoading:a().bool,variant:a().oneOf(tr),muted:a().bool},nr.defaultProps=Xn(Xn({},gn.defaultProps),{},{className:void 0,orientation:"vertical",isClickable:!1,variant:"light",isLoading:!1});var rr=(0,S.A)(nr,"Card",{muted:{deprType:S.J.REMOVED,message:'Use "variant" prop instead, i.e. variant="muted"'}});rr.Status=$n,rr.Header=kn,rr.Divider=jn,rr.Section=Rn,rr.Footer=Mn,rr.ImageCap=zn,rr.Context=wn,rr.Body=Vn;const or=rr,ar=Fe("card-columns"),ir=Fe("card-deck");var lr=n(73),sr=n(8743),ur="pgn__overflow-scroll-item";const cr=function(e){return(0,r.useMemo)((function(){return r.Children.map(r.Children.toArray(e),(function(e){return(0,r.cloneElement)(e,{className:l()(ur,e.props.className)})}))}),[e])};function fr(){return fr=Object.assign?Object.assign.bind():function(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=new Array(t);ne.length)&&(t=e.length);for(var n=0,r=new Array(t);ne.length)&&(t=e.length);for(var n=0,r=new Array(t);nt.getBoundingClientRect().width||!1,l=a>=t.scrollWidth-t.clientWidth;T(!(i&&!l))}}),[t,o,O,C,P,_]);var j=Cr((0,r.useState)(0),2),I=j[0],R=j[1],N=(0,r.useCallback)((function(e){R(e)}),[]),M=(0,r.useCallback)((function(e){A(e)}),[]);(function(e){var t=e.overflowRef,n=e.childrenElements,o=e.activeChildElementIndex,a=e.onActiveChildElementIndexChange,i=e.disableScroll,l=e.onOverflowElementScrollLeftChange,s=Sr((0,r.useState)(!1),2),u=s[0],c=s[1],f=Sr((0,r.useState)(0),2),d=f[0],p=f[1],h=(0,r.useCallback)((function(e){for(var r,i=e.isScrollingLeft,l=0;lwr(t)){l!==o&&a(l);break}}),[o,n,t,a]),m=(0,r.useCallback)((function(e){if(null!=t&&t.current&&!i){var n=e.deltaX<0;h({isScrollingLeft:n})}}),[t,i,h]),v=(0,r.useCallback)((function(){if(t&&t!==document.activeElement)for(var e=0;e=e,l=a?o[e]:o[r],d=yr(l);if(f){var m=t.scrollWidth-t.clientWidth,v=h(f,p,m);d=c+v,u&&u(d>m?m:d)}t.scrollTo({left:d,behavior:i}),s&&s({currentActiveChildElementIndex:a?e:r})}}),[t,o,n,f,i,s,h,p,c,u])}}({overflowRef:t,activeChildElementIndex:I,childrenElements:_,scrollAnimationBehavior:h,onScrollPrevious:D,onScrollNext:L,onChangeOffset:w,currentOffset:b,offset:m,offsetType:g});return{scrollToPrevious:B.scrollToPrevious,scrollToNext:B.scrollToNext,isScrolledToStart:O,isScrolledToEnd:C,activeChildElementIndex:I}},Pr=(0,r.createContext)();function Ar(e){var t=e.children;return cr(t)}Ar.propTypes={children:a().node.isRequired};const _r=Ar;function jr(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,Ur);return r.createElement("div",Hr({ref:t,className:l()("horizontal"===n?"pgn__hstack":"pgn__vstack",o?"pgn__stack-gap--".concat(o):"",a?"pgn__stack-reversed":"",s)},u),i)}));Vr.propTypes={children:a().node.isRequired,direction:a().oneOf(["horizontal","vertical"]),gap:a().number,reversed:a().bool,className:a().string},Vr.defaultProps={direction:"vertical",gap:0,className:void 0,reversed:!1};const Kr=Vr;function qr(){return(0,r.useState)(null)}const Wr=e=>e&&"function"!=typeof e?t=>{e.current=t}:e,$r=function(e,t){return(0,r.useMemo)((()=>function(e,t){const n=Wr(e),r=Wr(t);return e=>{n&&n(e),r&&r(e)}}(e,t)),[e,t])};var Zr="top",Yr="bottom",Jr="right",Xr="left",Qr="auto",eo=[Zr,Yr,Jr,Xr],to="start",no="end",ro="viewport",oo="popper",ao=eo.reduce((function(e,t){return e.concat([t+"-"+to,t+"-"+no])}),[]),io=[].concat(eo,[Qr]).reduce((function(e,t){return e.concat([t,t+"-"+to,t+"-"+no])}),[]),lo=["beforeRead","read","afterRead","beforeMain","main","afterMain","beforeWrite","write","afterWrite"];function so(){const e=(0,r.useRef)(!0),t=(0,r.useRef)((()=>e.current));return(0,r.useEffect)((()=>(e.current=!0,()=>{e.current=!1})),[]),t.current}function uo(e){return e.split("-")[0]}function co(e){if(null==e)return window;if("[object Window]"!==e.toString()){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function fo(e){return e instanceof co(e).Element||e instanceof Element}function po(e){return e instanceof co(e).HTMLElement||e instanceof HTMLElement}function ho(e){return"undefined"!=typeof ShadowRoot&&(e instanceof co(e).ShadowRoot||e instanceof ShadowRoot)}var mo=Math.max,vo=Math.min,go=Math.round;function yo(){var e=navigator.userAgentData;return null!=e&&e.brands&&Array.isArray(e.brands)?e.brands.map((function(e){return e.brand+"/"+e.version})).join(" "):navigator.userAgent}function bo(){return!/^((?!chrome|android).)*safari/i.test(yo())}function wo(e,t,n){void 0===t&&(t=!1),void 0===n&&(n=!1);var r=e.getBoundingClientRect(),o=1,a=1;t&&po(e)&&(o=e.offsetWidth>0&&go(r.width)/e.offsetWidth||1,a=e.offsetHeight>0&&go(r.height)/e.offsetHeight||1);var i=(fo(e)?co(e):window).visualViewport,l=!bo()&&n,s=(r.left+(l&&i?i.offsetLeft:0))/o,u=(r.top+(l&&i?i.offsetTop:0))/a,c=r.width/o,f=r.height/a;return{width:c,height:f,top:u,right:s+c,bottom:u+f,left:s,x:s,y:u}}function So(e){var t=wo(e),n=e.offsetWidth,r=e.offsetHeight;return Math.abs(t.width-n)<=1&&(n=t.width),Math.abs(t.height-r)<=1&&(r=t.height),{x:e.offsetLeft,y:e.offsetTop,width:n,height:r}}function Oo(e,t){var n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&ho(n)){var r=t;do{if(r&&e.isSameNode(r))return!0;r=r.parentNode||r.host}while(r)}return!1}function Eo(e){return e?(e.nodeName||"").toLowerCase():null}function xo(e){return co(e).getComputedStyle(e)}function Co(e){return["table","td","th"].indexOf(Eo(e))>=0}function To(e){return((fo(e)?e.ownerDocument:e.document)||window.document).documentElement}function ko(e){return"html"===Eo(e)?e:e.assignedSlot||e.parentNode||(ho(e)?e.host:null)||To(e)}function Po(e){return po(e)&&"fixed"!==xo(e).position?e.offsetParent:null}function Ao(e){for(var t=co(e),n=Po(e);n&&Co(n)&&"static"===xo(n).position;)n=Po(n);return n&&("html"===Eo(n)||"body"===Eo(n)&&"static"===xo(n).position)?t:n||function(e){var t=/firefox/i.test(yo());if(/Trident/i.test(yo())&&po(e)&&"fixed"===xo(e).position)return null;var n=ko(e);for(ho(n)&&(n=n.host);po(n)&&["html","body"].indexOf(Eo(n))<0;){var r=xo(n);if("none"!==r.transform||"none"!==r.perspective||"paint"===r.contain||-1!==["transform","perspective"].indexOf(r.willChange)||t&&"filter"===r.willChange||t&&r.filter&&"none"!==r.filter)return n;n=n.parentNode}return null}(e)||t}function _o(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function jo(e,t,n){return mo(e,vo(t,n))}function Io(e){return Object.assign({},{top:0,right:0,bottom:0,left:0},e)}function Ro(e,t){return t.reduce((function(t,n){return t[n]=e,t}),{})}const No={name:"arrow",enabled:!0,phase:"main",fn:function(e){var t,n=e.state,r=e.name,o=e.options,a=n.elements.arrow,i=n.modifiersData.popperOffsets,l=uo(n.placement),s=_o(l),u=[Xr,Jr].indexOf(l)>=0?"height":"width";if(a&&i){var c=function(e,t){return Io("number"!=typeof(e="function"==typeof e?e(Object.assign({},t.rects,{placement:t.placement})):e)?e:Ro(e,eo))}(o.padding,n),f=So(a),d="y"===s?Zr:Xr,p="y"===s?Yr:Jr,h=n.rects.reference[u]+n.rects.reference[s]-i[s]-n.rects.popper[u],m=i[s]-n.rects.reference[s],v=Ao(a),g=v?"y"===s?v.clientHeight||0:v.clientWidth||0:0,y=h/2-m/2,b=c[d],w=g-f[u]-c[p],S=g/2-f[u]/2+y,O=jo(b,S,w),E=s;n.modifiersData[r]=((t={})[E]=O,t.centerOffset=O-S,t)}},effect:function(e){var t=e.state,n=e.options.element,r=void 0===n?"[data-popper-arrow]":n;null!=r&&("string"!=typeof r||(r=t.elements.popper.querySelector(r)))&&Oo(t.elements.popper,r)&&(t.elements.arrow=r)},requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function Mo(e){return e.split("-")[1]}var Do={top:"auto",right:"auto",bottom:"auto",left:"auto"};function Lo(e){var t,n=e.popper,r=e.popperRect,o=e.placement,a=e.variation,i=e.offsets,l=e.position,s=e.gpuAcceleration,u=e.adaptive,c=e.roundOffsets,f=e.isFixed,d=i.x,p=void 0===d?0:d,h=i.y,m=void 0===h?0:h,v="function"==typeof c?c({x:p,y:m}):{x:p,y:m};p=v.x,m=v.y;var g=i.hasOwnProperty("x"),y=i.hasOwnProperty("y"),b=Xr,w=Zr,S=window;if(u){var O=Ao(n),E="clientHeight",x="clientWidth";O===co(n)&&"static"!==xo(O=To(n)).position&&"absolute"===l&&(E="scrollHeight",x="scrollWidth"),(o===Zr||(o===Xr||o===Jr)&&a===no)&&(w=Yr,m-=(f&&O===S&&S.visualViewport?S.visualViewport.height:O[E])-r.height,m*=s?1:-1),o!==Xr&&(o!==Zr&&o!==Yr||a!==no)||(b=Jr,p-=(f&&O===S&&S.visualViewport?S.visualViewport.width:O[x])-r.width,p*=s?1:-1)}var C,T=Object.assign({position:l},u&&Do),k=!0===c?function(e,t){var n=e.x,r=e.y,o=t.devicePixelRatio||1;return{x:go(n*o)/o||0,y:go(r*o)/o||0}}({x:p,y:m},co(n)):{x:p,y:m};return p=k.x,m=k.y,s?Object.assign({},T,((C={})[w]=y?"0":"",C[b]=g?"0":"",C.transform=(S.devicePixelRatio||1)<=1?"translate("+p+"px, "+m+"px)":"translate3d("+p+"px, "+m+"px, 0)",C)):Object.assign({},T,((t={})[w]=y?m+"px":"",t[b]=g?p+"px":"",t.transform="",t))}const Bo={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:function(e){var t=e.state,n=e.options,r=n.gpuAcceleration,o=void 0===r||r,a=n.adaptive,i=void 0===a||a,l=n.roundOffsets,s=void 0===l||l,u={placement:uo(t.placement),variation:Mo(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:o,isFixed:"fixed"===t.options.strategy};null!=t.modifiersData.popperOffsets&&(t.styles.popper=Object.assign({},t.styles.popper,Lo(Object.assign({},u,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:i,roundOffsets:s})))),null!=t.modifiersData.arrow&&(t.styles.arrow=Object.assign({},t.styles.arrow,Lo(Object.assign({},u,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:s})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})},data:{}};var Fo={passive:!0};const zo={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:function(e){var t=e.state,n=e.instance,r=e.options,o=r.scroll,a=void 0===o||o,i=r.resize,l=void 0===i||i,s=co(t.elements.popper),u=[].concat(t.scrollParents.reference,t.scrollParents.popper);return a&&u.forEach((function(e){e.addEventListener("scroll",n.update,Fo)})),l&&s.addEventListener("resize",n.update,Fo),function(){a&&u.forEach((function(e){e.removeEventListener("scroll",n.update,Fo)})),l&&s.removeEventListener("resize",n.update,Fo)}},data:{}};var Go={left:"right",right:"left",bottom:"top",top:"bottom"};function Uo(e){return e.replace(/left|right|bottom|top/g,(function(e){return Go[e]}))}var Ho={start:"end",end:"start"};function Vo(e){return e.replace(/start|end/g,(function(e){return Ho[e]}))}function Ko(e){var t=co(e);return{scrollLeft:t.pageXOffset,scrollTop:t.pageYOffset}}function qo(e){return wo(To(e)).left+Ko(e).scrollLeft}function Wo(e){var t=xo(e),n=t.overflow,r=t.overflowX,o=t.overflowY;return/auto|scroll|overlay|hidden/.test(n+o+r)}function $o(e){return["html","body","#document"].indexOf(Eo(e))>=0?e.ownerDocument.body:po(e)&&Wo(e)?e:$o(ko(e))}function Zo(e,t){var n;void 0===t&&(t=[]);var r=$o(e),o=r===(null==(n=e.ownerDocument)?void 0:n.body),a=co(r),i=o?[a].concat(a.visualViewport||[],Wo(r)?r:[]):r,l=t.concat(i);return o?l:l.concat(Zo(ko(i)))}function Yo(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function Jo(e,t,n){return t===ro?Yo(function(e,t){var n=co(e),r=To(e),o=n.visualViewport,a=r.clientWidth,i=r.clientHeight,l=0,s=0;if(o){a=o.width,i=o.height;var u=bo();(u||!u&&"fixed"===t)&&(l=o.offsetLeft,s=o.offsetTop)}return{width:a,height:i,x:l+qo(e),y:s}}(e,n)):fo(t)?function(e,t){var n=wo(e,!1,"fixed"===t);return n.top=n.top+e.clientTop,n.left=n.left+e.clientLeft,n.bottom=n.top+e.clientHeight,n.right=n.left+e.clientWidth,n.width=e.clientWidth,n.height=e.clientHeight,n.x=n.left,n.y=n.top,n}(t,n):Yo(function(e){var t,n=To(e),r=Ko(e),o=null==(t=e.ownerDocument)?void 0:t.body,a=mo(n.scrollWidth,n.clientWidth,o?o.scrollWidth:0,o?o.clientWidth:0),i=mo(n.scrollHeight,n.clientHeight,o?o.scrollHeight:0,o?o.clientHeight:0),l=-r.scrollLeft+qo(e),s=-r.scrollTop;return"rtl"===xo(o||n).direction&&(l+=mo(n.clientWidth,o?o.clientWidth:0)-a),{width:a,height:i,x:l,y:s}}(To(e)))}function Xo(e){var t,n=e.reference,r=e.element,o=e.placement,a=o?uo(o):null,i=o?Mo(o):null,l=n.x+n.width/2-r.width/2,s=n.y+n.height/2-r.height/2;switch(a){case Zr:t={x:l,y:n.y-r.height};break;case Yr:t={x:l,y:n.y+n.height};break;case Jr:t={x:n.x+n.width,y:s};break;case Xr:t={x:n.x-r.width,y:s};break;default:t={x:n.x,y:n.y}}var u=a?_o(a):null;if(null!=u){var c="y"===u?"height":"width";switch(i){case to:t[u]=t[u]-(n[c]/2-r[c]/2);break;case no:t[u]=t[u]+(n[c]/2-r[c]/2)}}return t}function Qo(e,t){void 0===t&&(t={});var n=t,r=n.placement,o=void 0===r?e.placement:r,a=n.strategy,i=void 0===a?e.strategy:a,l=n.boundary,s=void 0===l?"clippingParents":l,u=n.rootBoundary,c=void 0===u?ro:u,f=n.elementContext,d=void 0===f?oo:f,p=n.altBoundary,h=void 0!==p&&p,m=n.padding,v=void 0===m?0:m,g=Io("number"!=typeof v?v:Ro(v,eo)),y=d===oo?"reference":oo,b=e.rects.popper,w=e.elements[h?y:d],S=function(e,t,n,r){var o="clippingParents"===t?function(e){var t=Zo(ko(e)),n=["absolute","fixed"].indexOf(xo(e).position)>=0&&po(e)?Ao(e):e;return fo(n)?t.filter((function(e){return fo(e)&&Oo(e,n)&&"body"!==Eo(e)})):[]}(e):[].concat(t),a=[].concat(o,[n]),i=a[0],l=a.reduce((function(t,n){var o=Jo(e,n,r);return t.top=mo(o.top,t.top),t.right=vo(o.right,t.right),t.bottom=vo(o.bottom,t.bottom),t.left=mo(o.left,t.left),t}),Jo(e,i,r));return l.width=l.right-l.left,l.height=l.bottom-l.top,l.x=l.left,l.y=l.top,l}(fo(w)?w:w.contextElement||To(e.elements.popper),s,c,i),O=wo(e.elements.reference),E=Xo({reference:O,element:b,strategy:"absolute",placement:o}),x=Yo(Object.assign({},b,E)),C=d===oo?x:O,T={top:S.top-C.top+g.top,bottom:C.bottom-S.bottom+g.bottom,left:S.left-C.left+g.left,right:C.right-S.right+g.right},k=e.modifiersData.offset;if(d===oo&&k){var P=k[o];Object.keys(T).forEach((function(e){var t=[Jr,Yr].indexOf(e)>=0?1:-1,n=[Zr,Yr].indexOf(e)>=0?"y":"x";T[e]+=P[n]*t}))}return T}const ea={name:"flip",enabled:!0,phase:"main",fn:function(e){var t=e.state,n=e.options,r=e.name;if(!t.modifiersData[r]._skip){for(var o=n.mainAxis,a=void 0===o||o,i=n.altAxis,l=void 0===i||i,s=n.fallbackPlacements,u=n.padding,c=n.boundary,f=n.rootBoundary,d=n.altBoundary,p=n.flipVariations,h=void 0===p||p,m=n.allowedAutoPlacements,v=t.options.placement,g=uo(v),y=s||(g!==v&&h?function(e){if(uo(e)===Qr)return[];var t=Uo(e);return[Vo(e),t,Vo(t)]}(v):[Uo(v)]),b=[v].concat(y).reduce((function(e,n){return e.concat(uo(n)===Qr?function(e,t){void 0===t&&(t={});var n=t,r=n.placement,o=n.boundary,a=n.rootBoundary,i=n.padding,l=n.flipVariations,s=n.allowedAutoPlacements,u=void 0===s?io:s,c=Mo(r),f=c?l?ao:ao.filter((function(e){return Mo(e)===c})):eo,d=f.filter((function(e){return u.indexOf(e)>=0}));0===d.length&&(d=f);var p=d.reduce((function(t,n){return t[n]=Qo(e,{placement:n,boundary:o,rootBoundary:a,padding:i})[uo(n)],t}),{});return Object.keys(p).sort((function(e,t){return p[e]-p[t]}))}(t,{placement:n,boundary:c,rootBoundary:f,padding:u,flipVariations:h,allowedAutoPlacements:m}):n)}),[]),w=t.rects.reference,S=t.rects.popper,O=new Map,E=!0,x=b[0],C=0;C=0,_=A?"width":"height",j=Qo(t,{placement:T,boundary:c,rootBoundary:f,altBoundary:d,padding:u}),I=A?P?Jr:Xr:P?Yr:Zr;w[_]>S[_]&&(I=Uo(I));var R=Uo(I),N=[];if(a&&N.push(j[k]<=0),l&&N.push(j[I]<=0,j[R]<=0),N.every((function(e){return e}))){x=T,E=!1;break}O.set(T,N)}if(E)for(var M=function(e){var t=b.find((function(t){var n=O.get(t);if(n)return n.slice(0,e).every((function(e){return e}))}));if(t)return x=t,"break"},D=h?3:1;D>0&&"break"!==M(D);D--);t.placement!==x&&(t.modifiersData[r]._skip=!0,t.placement=x,t.reset=!0)}},requiresIfExists:["offset"],data:{_skip:!1}};function ta(e,t,n){return void 0===n&&(n={x:0,y:0}),{top:e.top-t.height-n.y,right:e.right-t.width+n.x,bottom:e.bottom-t.height+n.y,left:e.left-t.width-n.x}}function na(e){return[Zr,Jr,Yr,Xr].some((function(t){return e[t]>=0}))}const ra={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:function(e){var t=e.state,n=e.name,r=t.rects.reference,o=t.rects.popper,a=t.modifiersData.preventOverflow,i=Qo(t,{elementContext:"reference"}),l=Qo(t,{altBoundary:!0}),s=ta(i,r),u=ta(l,o,a),c=na(s),f=na(u);t.modifiersData[n]={referenceClippingOffsets:s,popperEscapeOffsets:u,isReferenceHidden:c,hasPopperEscaped:f},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":c,"data-popper-escaped":f})}},oa={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:function(e){var t=e.state,n=e.options,r=e.name,o=n.offset,a=void 0===o?[0,0]:o,i=io.reduce((function(e,n){return e[n]=function(e,t,n){var r=uo(e),o=[Xr,Zr].indexOf(r)>=0?-1:1,a="function"==typeof n?n(Object.assign({},t,{placement:e})):n,i=a[0],l=a[1];return i=i||0,l=(l||0)*o,[Xr,Jr].indexOf(r)>=0?{x:l,y:i}:{x:i,y:l}}(n,t.rects,a),e}),{}),l=i[t.placement],s=l.x,u=l.y;null!=t.modifiersData.popperOffsets&&(t.modifiersData.popperOffsets.x+=s,t.modifiersData.popperOffsets.y+=u),t.modifiersData[r]=i}},aa={name:"popperOffsets",enabled:!0,phase:"read",fn:function(e){var t=e.state,n=e.name;t.modifiersData[n]=Xo({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})},data:{}},ia={name:"preventOverflow",enabled:!0,phase:"main",fn:function(e){var t=e.state,n=e.options,r=e.name,o=n.mainAxis,a=void 0===o||o,i=n.altAxis,l=void 0!==i&&i,s=n.boundary,u=n.rootBoundary,c=n.altBoundary,f=n.padding,d=n.tether,p=void 0===d||d,h=n.tetherOffset,m=void 0===h?0:h,v=Qo(t,{boundary:s,rootBoundary:u,padding:f,altBoundary:c}),g=uo(t.placement),y=Mo(t.placement),b=!y,w=_o(g),S="x"===w?"y":"x",O=t.modifiersData.popperOffsets,E=t.rects.reference,x=t.rects.popper,C="function"==typeof m?m(Object.assign({},t.rects,{placement:t.placement})):m,T="number"==typeof C?{mainAxis:C,altAxis:C}:Object.assign({mainAxis:0,altAxis:0},C),k=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,P={x:0,y:0};if(O){if(a){var A,_="y"===w?Zr:Xr,j="y"===w?Yr:Jr,I="y"===w?"height":"width",R=O[w],N=R+v[_],M=R-v[j],D=p?-x[I]/2:0,L=y===to?E[I]:x[I],B=y===to?-x[I]:-E[I],F=t.elements.arrow,z=p&&F?So(F):{width:0,height:0},G=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:{top:0,right:0,bottom:0,left:0},U=G[_],H=G[j],V=jo(0,E[I],z[I]),K=b?E[I]/2-D-V-U-T.mainAxis:L-V-U-T.mainAxis,q=b?-E[I]/2+D+V+H+T.mainAxis:B+V+H+T.mainAxis,W=t.elements.arrow&&Ao(t.elements.arrow),$=W?"y"===w?W.clientTop||0:W.clientLeft||0:0,Z=null!=(A=null==k?void 0:k[w])?A:0,Y=R+q-Z,J=jo(p?vo(N,R+K-Z-$):N,R,p?mo(M,Y):M);O[w]=J,P[w]=J-R}if(l){var X,Q="x"===w?Zr:Xr,ee="x"===w?Yr:Jr,te=O[S],ne="y"===S?"height":"width",re=te+v[Q],oe=te-v[ee],ae=-1!==[Zr,Xr].indexOf(g),ie=null!=(X=null==k?void 0:k[S])?X:0,le=ae?re:te-E[ne]-x[ne]-ie+T.altAxis,se=ae?te+E[ne]+x[ne]-ie-T.altAxis:oe,ue=p&&ae?function(e,t,n){var r=jo(e,t,n);return r>n?n:r}(le,te,se):jo(p?le:re,te,p?se:oe);O[S]=ue,P[S]=ue-te}t.modifiersData[r]=P}},requiresIfExists:["offset"]};function la(e,t,n){void 0===n&&(n=!1);var r,o,a=po(t),i=po(t)&&function(e){var t=e.getBoundingClientRect(),n=go(t.width)/e.offsetWidth||1,r=go(t.height)/e.offsetHeight||1;return 1!==n||1!==r}(t),l=To(t),s=wo(e,i,n),u={scrollLeft:0,scrollTop:0},c={x:0,y:0};return(a||!a&&!n)&&(("body"!==Eo(t)||Wo(l))&&(u=(r=t)!==co(r)&&po(r)?{scrollLeft:(o=r).scrollLeft,scrollTop:o.scrollTop}:Ko(r)),po(t)?((c=wo(t,!0)).x+=t.clientLeft,c.y+=t.clientTop):l&&(c.x=qo(l))),{x:s.left+u.scrollLeft-c.x,y:s.top+u.scrollTop-c.y,width:s.width,height:s.height}}function sa(e){var t=new Map,n=new Set,r=[];function o(e){n.add(e.name),[].concat(e.requires||[],e.requiresIfExists||[]).forEach((function(e){if(!n.has(e)){var r=t.get(e);r&&o(r)}})),r.push(e)}return e.forEach((function(e){t.set(e.name,e)})),e.forEach((function(e){n.has(e.name)||o(e)})),r}var ua={placement:"bottom",modifiers:[],strategy:"absolute"};function ca(){for(var e=arguments.length,t=new Array(e),n=0;n{if(t())return e[1](n)}),[t,e[1]])]}((0,r.useState)({placement:s,update:m,forceUpdate:v,attributes:{},styles:{popper:pa(c),arrow:{}}})),y=g[0],b=g[1],w=(0,r.useMemo)((function(){return{name:"updateStateModifier",enabled:!0,phase:"write",requires:["computeStyles"],fn:function(e){var t=e.state,n={},r={};Object.keys(t.elements).forEach((function(e){n[e]=t.styles[e],r[e]=t.attributes[e]})),b({state:t,styles:n,attributes:r,update:m,forceUpdate:v,placement:t.placement})}}}),[m,v,b]);return(0,r.useEffect)((function(){h.current&&i&&h.current.setOptions({placement:s,strategy:c,modifiers:[].concat(d,[w,ha])})}),[c,s,w,i]),(0,r.useEffect)((function(){if(i&&null!=e&&null!=t)return h.current=da(e,t,(0,U.A)({},p,{placement:s,strategy:c,modifiers:[].concat(d,[ma,w])})),function(){null!=h.current&&(h.current.destroy(),h.current=void 0,b((function(e){return(0,U.A)({},e,{attributes:{},styles:{popper:pa(c)}})})))}}),[i,e,t]),y};function ya(e,t){return e.contains?e.contains(t):e.compareDocumentPosition?e===t||!!(16&e.compareDocumentPosition(t)):void 0}var ba=n(6365),wa=n.n(ba);function Sa(e){return e&&"setState"in e?ee.findDOMNode(e):null!=e?e:null}var Oa=function(){},Ea=function(e){return e&&("current"in e?e.current:e)};const xa=function(e,t,n){var o=void 0===n?{}:n,a=o.disabled,i=o.clickTrigger,l=void 0===i?"click":i,s=(0,r.useRef)(!1),u=t||Oa,c=(0,r.useCallback)((function(t){var n,r,o=Ea(e);wa()(!!o,"RootClose captured a close event but does not have a ref to compare it to. useRootClose(), should be passed a ref that resolves to a DOM node"),s.current=!(o&&(r=t,!(r.metaKey||r.altKey||r.ctrlKey||r.shiftKey))&&function(e){return 0===e.button}(t)&&!ya(o,null!=(n=null==t.composedPath?void 0:t.composedPath()[0])?n:t.target))}),[e]),f=J((function(e){s.current||u(e)})),d=J((function(e){27===e.keyCode&&u(e)}));(0,r.useEffect)((function(){if(!a&&null!=e){var t=window.event,n=fe(Sa(Ea(e))),r=Oe(n,l,c,!0),o=Oe(n,l,(function(e){e!==t?f(e):t=void 0})),i=Oe(n,"keyup",(function(e){e!==t?d(e):t=void 0})),s=[];return"ontouchstart"in n.documentElement&&(s=[].slice.call(n.body.children).map((function(e){return Oe(e,"mousemove",Oa)}))),function(){r(),o(),i(),s.forEach((function(e){return e()}))}}}),[e,a,l,c,f,d])};var Ca=function(e){var t;return"undefined"==typeof document?null:null==e?fe().body:("function"==typeof e&&(e=e()),e&&"current"in e&&(e=e.current),null!=(t=e)&&t.nodeType&&e||null)};function Ta(e,t){var n=(0,r.useState)((function(){return Ca(e)})),o=n[0],a=n[1];if(!o){var i=Ca(e);i&&a(i)}return(0,r.useEffect)((function(){t&&o&&t(o)}),[t,o]),(0,r.useEffect)((function(){var t=Ca(e);t!==o&&a(t)}),[e,o]),o}function ka(e){return void 0===e&&(e={}),Array.isArray(e)?e:Object.keys(e).map((function(t){return e[t].name=t,e[t]}))}function Pa(e){var t,n,r,o,a=e.enabled,i=e.enableEvents,l=e.placement,s=e.flip,u=e.offset,c=e.fixed,f=e.containerPadding,d=e.arrowElement,p=e.popperConfig,h=void 0===p?{}:p,m=function(e){var t={};return Array.isArray(e)?(null==e||e.forEach((function(e){t[e.name]=e})),t):e||t}(h.modifiers);return(0,U.A)({},h,{placement:l,enabled:a,strategy:c?"fixed":h.strategy,modifiers:ka((0,U.A)({},m,{eventListeners:{enabled:i},preventOverflow:(0,U.A)({},m.preventOverflow,{options:f?(0,U.A)({padding:f},null==(t=m.preventOverflow)?void 0:t.options):null==(n=m.preventOverflow)?void 0:n.options}),offset:{options:(0,U.A)({offset:u},null==(r=m.offset)?void 0:r.options)},arrow:(0,U.A)({},m.arrow,{enabled:!!d,options:(0,U.A)({},null==(o=m.arrow)?void 0:o.options,{element:d})}),flip:(0,U.A)({enabled:!!s},m.flip)}))})}var Aa=r.forwardRef((function(e,t){var n=e.flip,o=e.offset,a=e.placement,i=e.containerPadding,l=void 0===i?5:i,s=e.popperConfig,u=void 0===s?{}:s,c=e.transition,f=qr(),d=f[0],p=f[1],h=qr(),m=h[0],v=h[1],g=$r(p,t),y=Ta(e.container),b=Ta(e.target),w=(0,r.useState)(!e.show),S=w[0],O=w[1],E=ga(b,d,Pa({placement:a,enableEvents:!!e.show,containerPadding:l||5,flip:n,offset:o,arrowElement:m,popperConfig:u})),x=E.styles,C=E.attributes,T=(0,H.A)(E,["styles","attributes"]);e.show?S&&O(!1):e.transition||S||O(!0);var k=e.show||c&&!S;if(xa(d,e.onHide,{disabled:!e.rootClose||e.rootCloseDisabled,clickTrigger:e.rootCloseEvent}),!k)return null;var P=e.children((0,U.A)({},T,{show:!!e.show,props:(0,U.A)({},C.popper,{style:x.popper,ref:g}),arrowProps:(0,U.A)({},C.arrow,{style:x.arrow,ref:v})}));if(c){var A=e.onExit,_=e.onExiting,j=e.onEnter,I=e.onEntering,R=e.onEntered;P=r.createElement(c,{in:e.show,appear:!0,onExit:A,onExiting:_,onExited:function(){O(!0),e.onExited&&e.onExited.apply(e,arguments)},onEnter:j,onEntering:I,onEntered:R},P)}return y?ee.createPortal(P,y):null}));Aa.displayName="Overlay",Aa.propTypes={show:a().bool,placement:a().oneOf(io),target:a().any,container:a().any,flip:a().bool,children:a().func.isRequired,containerPadding:a().number,popperConfig:a().object,rootClose:a().bool,rootCloseEvent:a().oneOf(["click","mousedown"]),rootCloseDisabled:a().bool,onHide:function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;rza(e,t,n)),Fa)}function Ga(){const e=so(),t=(0,r.useRef)();return function(e){const t=function(e){const t=(0,r.useRef)(e);return t.current=e,t}(e);(0,r.useEffect)((()=>()=>t.current()),[])}((()=>clearTimeout(t.current))),(0,r.useMemo)((()=>{const n=()=>clearTimeout(t.current);return{set:function(r,o=0){e()&&(n(),o<=Fa?t.current=setTimeout(r,o):za(t,r,Date.now()+o))},clear:n,handleRef:t}}),[])}var Ua=["trigger","overlay","children","popperConfig","show","defaultShow","onToggle","delay","placement","flip"],Ha=function(e){function t(){return e.apply(this,arguments)||this}return(0,Q.A)(t,e),t.prototype.render=function(){return this.props.children},t}(r.Component);function Va(e,t,n){var r=t[0],o=r.currentTarget,a=r.relatedTarget||r.nativeEvent[n];a&&a===o||ya(o,a)||e.apply(void 0,t)}function Ka(e){var t=e.trigger,n=e.overlay,o=e.children,a=e.popperConfig,i=void 0===a?{}:a,l=e.show,s=e.defaultShow,u=void 0!==s&&s,c=e.onToggle,f=e.delay,d=e.placement,p=e.flip,h=void 0===p?d&&-1!==d.indexOf("auto"):p,m=(0,H.A)(e,Ua),v=(0,r.useRef)(null),g=Ga(),y=(0,r.useRef)(""),b=$(l,u,c),w=b[0],S=b[1],O=function(e){return e&&"object"==typeof e?e:{show:e,hide:e}}(f),E="function"!=typeof o?r.Children.only(o).props:{},x=E.onFocus,C=E.onBlur,T=E.onClick,k=(0,r.useCallback)((function(){return Sa(v.current)}),[]),P=(0,r.useCallback)((function(){g.clear(),y.current="show",O.show?g.set((function(){"show"===y.current&&S(!0)}),O.show):S(!0)}),[O.show,S,g]),A=(0,r.useCallback)((function(){g.clear(),y.current="hide",O.hide?g.set((function(){"hide"===y.current&&S(!1)}),O.hide):S(!1)}),[O.hide,S,g]),_=(0,r.useCallback)((function(){P();for(var e=arguments.length,t=new Array(e),n=0;n=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,ni);return r.createElement(ei,ii({},a,{className:l()({"tooltip-light":"light"===o},a.className),ref:t}),n)}));li.propTypes=oi(oi({},ei.propTypes),{},{id:a().string.isRequired,placement:a().oneOf(["auto-start","auto","auto-end","top-start","top","top-end","right-start","right","right-end","bottom-end","bottom","bottom-start","left-end","left","left-start"]),arrowProps:a().shape({ref:a().oneOfType([a().func,a().shape({current:a().element})]),style:a().shape({})}),show:a().bool,popper:a().shape({}),bsPrefix:a().string,children:a().node,className:a().string,variant:a().string}),li.defaultProps=oi(oi({},li.defaultProps),{},{id:void 0,placement:"right",arrowProps:void 0,show:void 0,popper:void 0,children:void 0,className:void 0,variant:void 0,bsPrefix:"tooltip"});const si=li;function ui(e){return ui="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},ui(e)}var ci=["className","alt","invertColors","icon","src","iconClassNames","onClick","size","variant","iconAs","isActive"],fi=["tooltipPlacement","tooltipContent","variant","invertColors"];function di(){return di=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var hi=r.forwardRef((function(e,t){var n,o,a,i=e.className,s=e.alt,u=e.invertColors,c=e.icon,f=e.src,d=e.iconClassNames,p=e.onClick,h=e.size,m=e.variant,v=e.iconAs,g=e.isActive,y=pi(e,ci),b=u?"inverse-":"",w=g?"".concat(m,"-"):"",S=v;return r.createElement("button",di({"aria-label":s,className:l()("btn-icon","btn-icon-".concat(b).concat(m),"btn-icon-".concat(h),(n={},o="btn-icon-".concat(b).concat(w,"active"),a=g,o=function(e){var t=function(e,t){if("object"!=ui(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!=ui(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==ui(t)?t:String(t)}(o),o in n?Object.defineProperty(n,o,{value:a,enumerable:!0,configurable:!0,writable:!0}):n[o]=a,n),i),onClick:p,type:"button",ref:t},y),r.createElement("span",{className:"btn-icon__icon-container"},r.createElement(S,{className:l()("btn-icon__icon",d),icon:c,src:f})))}));function mi(e){var t=e.tooltipPlacement,n=e.tooltipContent,o=e.variant,a=e.invertColors,i=pi(e,fi),l=a?"inverse-":"";return r.createElement(Za,{placement:t,overlay:r.createElement(si,{id:"iconbutton-tooltip-".concat(t),variant:l?"light":""},n)},r.createElement(hi,di({variant:o,invertColors:a},i)))}hi.defaultProps={iconAs:Je.A,src:null,icon:void 0,iconClassNames:void 0,className:void 0,invertColors:!1,variant:"primary",size:"md",onClick:function(){},isActive:!1},hi.propTypes={className:a().string,iconAs:a().elementType,src:a().oneOfType([a().element,a().elementType]),alt:a().string.isRequired,invertColors:a().bool,icon:a().shape({prefix:a().string,iconName:a().string,icon:a().array}),iconClassNames:a().string,onClick:a().func,variant:a().oneOf(["primary","secondary","success","warning","danger","light","dark","black","brand"]),size:a().oneOf(["sm","md","inline"]),isActive:a().bool},mi.defaultProps={tooltipPlacement:"top",variant:"primary",invertColors:!1},mi.propTypes={tooltipPlacement:a().string,tooltipContent:a().node.isRequired,variant:a().oneOf(["primary","secondary","success","warning","danger","light","dark","black","brand"]),invertColors:a().bool},hi.IconButtonWithTooltip=mi;const vi=hi;function gi(){return gi=Object.assign?Object.assign.bind():function(e){for(var t=1;t$?"next":"prev"),s&&q(!0),Q(d||0)),(0,r.useEffect)((function(){M.current&&(M.current=null)}));var ee,te=0;Mi(I,(function(e,t){++te,t===d&&(ee=e.props.interval)}));var ne=Y(ee),re=(0,r.useCallback)((function(e){if(!K){var t=$-1;if(t<0){if(!O)return;t=te-1}M.current="prev",p&&p(t,e)}}),[K,$,p,O,te]),oe=J((function(e){if(!K){var t=$+1;if(t>=te){if(!O)return;t=0}M.current="next",p&&p(t,e)}})),ae=(0,r.useRef)();(0,r.useImperativeHandle)(t,(function(){return{element:ae.current,prev:re,next:oe}}));var ie=J((function(){!document.hidden&&function(e){if(!(e&&e.style&&e.parentNode&&e.parentNode.style))return!1;var t=getComputedStyle(e);return"none"!==t.display&&"hidden"!==t.visibility&&"none"!==getComputedStyle(e.parentNode).display}(ae.current)&&oe()})),le="next"===L?"left":"right";!function(e,t){const n=(0,r.useRef)(!0);(0,r.useEffect)((()=>{if(!n.current)return e();n.current=!1}),t)}((function(){s||(h&&h($,le),m&&m($,le))}),[$]);var se=N+"-item-"+L,ue=N+"-item-"+le,fe=(0,r.useCallback)((function(e){Te(e),h&&h($,le)}),[h,$,le]),de=(0,r.useCallback)((function(){q(!1),m&&m($,le)}),[m,$,le]),pe=(0,r.useCallback)((function(e){if(g&&!/input|textarea/i.test(e.target.tagName))switch(e.key){case"ArrowLeft":return e.preventDefault(),void re(e);case"ArrowRight":return e.preventDefault(),void oe(e)}y&&y(e)}),[g,y,re,oe]),he=(0,r.useCallback)((function(e){"hover"===b&&G(!0),w&&w(e)}),[b,w]),me=(0,r.useCallback)((function(e){G(!1),S&&S(e)}),[S]),ve=(0,r.useRef)(0),ge=(0,r.useRef)(0),ye=Ga(),be=(0,r.useCallback)((function(e){ve.current=e.touches[0].clientX,ge.current=0,"hover"===b&&G(!0),x&&x(e)}),[b,x]),we=(0,r.useCallback)((function(e){e.touches&&e.touches.length>1?ge.current=0:ge.current=e.touches[0].clientX-ve.current,C&&C(e)}),[C]),Se=(0,r.useCallback)((function(e){if(E){var t=ge.current;Math.abs(t)>40&&(t>0?re(e):oe(e))}"hover"===b&&ye.set((function(){G(!1)}),v||void 0),T&&T(e)}),[E,b,re,oe,ye,v,T]),Oe=null!=v&&!z&&!K,Ee=(0,r.useRef)();(0,r.useEffect)((function(){var e,t;if(Oe)return Ee.current=window.setInterval(document.visibilityState?ie:oe,null!=(e=null!=(t=ne.current)?t:v)?e:void 0),function(){null!==Ee.current&&clearInterval(Ee.current)}}),[Oe,oe,ne,v,ie]);var xe=(0,r.useMemo)((function(){return f&&Array.from({length:te},(function(e,t){return function(e){p&&p(t,e)}}))}),[f,te,p]);return r.createElement(a,(0,U.A)({ref:ae},R,{onKeyDown:pe,onMouseOver:he,onMouseOut:me,onTouchStart:be,onTouchMove:we,onTouchEnd:Se,className:l()(j,N,s&&"slide",u&&N+"-fade")}),f&&r.createElement("ol",{className:N+"-indicators"},Ni(I,(function(e,t){return r.createElement("li",{key:t,className:t===$?"active":void 0,onClick:xe?xe[t]:void 0})}))),r.createElement("div",{className:N+"-inner"},Ni(I,(function(e,t){var n=t===$;return s?r.createElement(ce,{in:n,onEnter:n?fe:void 0,onEntered:n?de:void 0,addEndListener:Ce},(function(t){return r.cloneElement(e,{className:l()(e.props.className,n&&"entered"!==t&&se,("entered"===t||"exiting"===t)&&"active",("entering"===t||"exiting"===t)&&ue)})})):r.cloneElement(e,{className:l()(e.props.className,n&&"active")})}))),c&&r.createElement(r.Fragment,null,(O||0!==d)&&r.createElement(ze.A,{className:N+"-control-prev",onClick:re},k,P&&r.createElement("span",{className:"sr-only"},P)),(O||d!==te-1)&&r.createElement(ze.A,{className:N+"-control-next",onClick:oe},A,_&&r.createElement("span",{className:"sr-only"},_))))}var zi=r.forwardRef(Fi);zi.displayName="Carousel",zi.propTypes=Li,zi.defaultProps=Bi,zi.Caption=_i,zi.Item=Ri;const Gi=zi;function Ui(){return Ui=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,Zi);return r.createElement("div",Yi({className:l()(Ji,"pgn__chip-".concat(a),o,{disabled:c}),ref:t},f),i&&r.createElement("div",{className:l()("pgn__chip__icon-before")},r.createElement(Je.A,{src:i})),r.createElement("div",{className:l()("pgn__chip__label",{"p-before":i,"p-after":s})},n),s&&r.createElement("div",{className:l()("pgn__chip__icon-after",{active:u}),role:"button",onClick:u,onKeyPress:u,tabIndex:c?-1:0,"data-testid":"icon-after"},r.createElement(Je.A,{src:s})))}));Xi.propTypes={children:a().node.isRequired,className:a().string,variant:a().oneOf(["light","dark"]),disabled:a().bool,iconBefore:a().oneOfType([a().element,a().func]),onIconBeforeClick:a().func,iconAfter:a().oneOfType([a().element,a().func]),onIconAfterClick:a().func},Xi.defaultProps={className:void 0,variant:"light",disabled:!1,iconBefore:void 0,iconAfter:void 0,onIconBeforeClick:void 0,onIconAfterClick:void 0};const Qi=Xi,el=(0,Si.YK)({scrollToPrevious:{id:"pgn.ChipCarousel.scrollToPrevious",defaultMessage:"Scroll to previous",description:"Accessibility text describing the action for navigating a scrollable carousel to the previous element"},scrollToNext:{id:"pgn.ChipCarousel.scrollToNext",defaultMessage:"Scroll to next",description:"Accessibility text describing the action for navigating a scrollable carousel to the next element"}});function tl(e){return tl="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},tl(e)}var nl=["className","items","ariaLabel","disableOpacityMasks","onScrollPrevious","onScrollNext","canScrollHorizontal","offset","offsetType","gap"];function rl(){return rl=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,nl),y=(0,Gr.A)();return r.createElement("div",rl({className:l()("pgn__chip-carousel",n,v?"pgn__chip-carousel-gap__".concat(v):"")},g,{ref:t}),r.createElement(Rr,{ariaLabel:a,hasInteractiveChildren:!0,disableScroll:!f,disableOpacityMasks:i,onScrollPrevious:s,onScrollNext:u,offset:p,offsetType:m},r.createElement(Pr.Consumer,null,(function(e){var t=e.setOverflowRef,n=e.isScrolledToStart,a=e.isScrolledToEnd,i=e.scrollToPrevious,l=e.scrollToNext;return r.createElement(r.Fragment,null,r.createElement(r.Fragment,null,!n&&r.createElement(vi,{size:"sm",className:"pgn__chip-carousel__left-control",src:yi,iconAs:Je.A,alt:y.formatMessage(el.scrollToPrevious),onClick:i}),!a&&r.createElement(vi,{size:"sm",className:"pgn__chip-carousel__right-control",src:wi,iconAs:Je.A,alt:y.formatMessage(el.scrollToNext),onClick:l})),r.createElement("div",{ref:t,className:"d-flex"},r.createElement(Rr.Items,null,null==o?void 0:o.map((function(e,t){return((null==e?void 0:e.props)||{}).children?r.createElement(Qi,al(al({},e.props),{},{key:t})):null})))))}))))}));ll.propTypes={ariaLabel:a().string.isRequired,className:a().string,items:a().arrayOf(a().element).isRequired,disableOpacityMasks:a().bool,onScrollPrevious:a().func,onScrollNext:a().func,canScrollHorizontal:a().bool,offset:a().oneOfType([a().number,a().string]),offsetType:a().oneOf(["percentage","fixed"]),gap:a().number},ll.defaultProps={className:void 0,disableOpacityMasks:void 0,onScrollPrevious:void 0,onScrollNext:void 0,canScrollHorizontal:!1,offset:120,offsetType:"fixed",gap:3};const sl=ll;var ul=n(6468);function cl(e){return cl="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},cl(e)}var fl=["children"];function dl(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 pl(e,t,n){return(t=function(e){var t=function(e,t){if("object"!==cl(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!==cl(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"===cl(t)?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function hl(){return hl=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,fl),a=n.length,i={},l=r.Children.map(n,(function(e,t){var n=function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,Ul);return delete a.defaultOpen,delete a.onToggle,delete a.onOpen,delete a.onClose,r.createElement("div",Hl({},a,{className:l()("pgn_collapsible",n,{"is-open":this.state.isOpen})}),r.createElement(Kl.Provider,{value:{isOpen:this.state.isOpen,open:this.open,close:this.close,toggle:this.toggle,unmountOnExit:o}},t))}}])&&Nl(n.prototype,o),a&&Nl(n,a),Object.defineProperty(n,"prototype",{writable:!1}),t}(r.Component);ql.propTypes={children:a().node,className:a().string,defaultOpen:a().bool,open:a().bool,onToggle:a().func,onOpen:a().func,onClose:a().func,unmountOnExit:a().bool},ql.defaultProps={children:void 0,className:void 0,defaultOpen:!1,open:void 0,onToggle:void 0,onOpen:void 0,onClose:void 0,unmountOnExit:!0};const Wl=ql;function $l(e,t){return e.replace(new RegExp("(^|\\s)"+t+"(?:\\s|$)","g"),"$1").replace(/\s+/g," ").replace(/^\s*|\s*$/g,"")}var Zl=function(e,t){return e&&t&&t.split(" ").forEach((function(t){return r=t,void((n=e).classList?n.classList.remove(r):"string"==typeof n.className?n.className=$l(n.className,r):n.setAttribute("class",$l(n.className&&n.className.baseVal||"",r)));var n,r}))},Yl=function(e){function t(){for(var t,n=arguments.length,r=new Array(n),o=0;o=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,ys),i=(0,r.useContext)(Kl),l=i.isOpen,s=i.unmountOnExit,u=r.createElement(o,function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,xs),u=(0,r.useContext)(Kl),c=u.isOpen,f=u.open,d=u.close,p=u.toggle,h=(0,r.useCallback)((function(e){o?f(e):a?d(e):p(e)}),[o,f,a,d,p]),m=(0,r.useCallback)((function(e){i&&i(e),h(e)}),[i,h]),v=(0,r.useCallback)((function(e){l&&l(e),"Enter"===e.key&&h(e)}),[l,h]);return r.createElement(t,Ts(Ts({},s),{},{onClick:m,onKeyDown:v,role:"button",tabIndex:0,"aria-expanded":c}),n)}Ps.propTypes={children:a().node,tag:a().oneOfType([a().string,a().elementType]),openOnly:a().bool,closeOnly:a().bool,onClick:a().func,onKeyDown:a().func},Ps.defaultProps={children:void 0,tag:"div",openOnly:!1,closeOnly:!1,onClick:void 0,onKeyDown:void 0};const As=Ps;function _s(e){var t=e.children,n=e.whenOpen,o=e.whenClosed,a=(0,r.useContext)(Kl).isOpen;return a&&n||!a&&o?r.createElement(r.Fragment,null,t):null}_s.propTypes={children:a().node,whenOpen:a().bool,whenClosed:a().bool},_s.defaultProps={children:void 0,whenOpen:!1,whenClosed:!1};const js=_s;function Is(e){return Is="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},Is(e)}var Rs=["children","className","title","styling","iconWhenClosed","iconWhenOpen"];function Ns(){return Ns=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,Rs),f=function(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=new Array(t);n0&&void 0!==arguments[0])||arguments[0],t=(0,r.useRef)(),n=function(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,a,i,l=[],s=!0,u=!1;try{if(a=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;s=!1}else for(;!(s=(r=a.call(n)).done)&&(l.push(r.value),l.length!==t);s=!0);}catch(e){u=!0,o=e}finally{try{if(!s&&null!=n.return&&(i=n.return(),Object(i)!==i))return}finally{if(u)throw o}}return l}}(e,t)||function(e,t){if(e){if("string"==typeof e)return zs(e,t);var n=Object.prototype.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)?zs(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.")}()}((0,r.useState)(e),2),o=n[0],a=n[1];return(0,r.useEffect)((function(){try{if(t.current){var e=new IntersectionObserver((function(e){e.forEach((function(e){var t=e.isIntersecting;a(t)}))}),{});return e.observe(t.current),function(){e.disconnect()}}}catch(e){if(!(e instanceof ReferenceError))throw e}return function(){}}),[]),[o,t]};function Us(e){return Us="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},Us(e)}function Hs(e,t,n){return t=function(e){var t=function(e,t){if("object"!=Us(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!=Us(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Us(t)?t:String(t)}(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Vs(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,a,i,l=[],s=!0,u=!1;try{if(a=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;s=!1}else for(;!(s=(r=a.call(n)).done)&&(l.push(r.value),l.length!==t);s=!0);}catch(e){u=!0,o=e}finally{try{if(!s&&null!=n.return&&(i=n.return(),Object(i)!==i))return}finally{if(u)throw o}}return l}}(e,t)||function(e,t){if(e){if("string"==typeof e)return Ks(e,t);var n=Object.prototype.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)?Ks(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.")}()}function Ks(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,qs),o=Vs(Gs(),2),a=o[0],i=o[1],s=Vs(Gs(),2),u=s[0],c=s[1],f=Vs((0,r.useState)(0),2),d=f[0],p=f[1],h=l()("pgn__scrollable-body",n.className,Hs(Hs({},"pgn__scrollable-body-scroll-top",a),"pgn__scrollable-body-scroll-bottom",u));return r.createElement("div",Ws({},n,{className:h,role:"scrollbar","aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":d,"aria-controls":"scrollbar",tabIndex:"0",onScroll:function(e){var t=e.currentTarget.scrollHeight-e.currentTarget.clientHeight;p(Math.ceil(100*e.currentTarget.scrollTop/t))}}),r.createElement("div",{ref:i}),r.createElement("div",{className:"pgn__scrollable-body-content"},t),r.createElement("div",{ref:c}))}$s.propTypes={children:a().node.isRequired,className:a().string},$s.defaultProps={className:void 0};const Zs=$s;var Ys,Js=Function.prototype.bind.call(Function.prototype.call,[].slice);function Xs(e,t){return Js(e.querySelectorAll(t))}function Qs(){const[,e]=(0,r.useReducer)((e=>!e),!1);return e}const eu=r.createContext(null);var tu=function(){};function nu(e){void 0===e&&(e={});var t=(0,r.useContext)(eu),n=qr(),o=n[0],a=n[1],i=(0,r.useRef)(!1),l=e,s=l.flip,u=l.offset,c=l.rootCloseEvent,f=l.fixed,d=void 0!==f&&f,p=l.popperConfig,h=void 0===p?{}:p,m=l.usePopper,v=void 0===m?!!t:m,g=null==(null==t?void 0:t.show)?!!e.show:t.show,y=null==(null==t?void 0:t.alignEnd)?e.alignEnd:t.alignEnd;g&&!i.current&&(i.current=!0);var b=t||{},w=b.drop,S=b.setMenu,O=b.menuElement,E=b.toggleElement,x=y?"bottom-end":"bottom-start";"up"===w?x=y?"top-end":"top-start":"right"===w?x=y?"right-end":"right-start":"left"===w&&(x=y?"left-end":"left-start");var C=ga(E,O,Pa({placement:x,enabled:!(!v||!g),enableEvents:g,offset:u,flip:s,fixed:d,arrowElement:o,popperConfig:h})),T=(0,U.A)({ref:S||tu,"aria-labelledby":null==E?void 0:E.id},C.attributes.popper,{style:C.styles.popper}),k={show:g,alignEnd:y,hasShown:i.current,toggle:null==t?void 0:t.toggle,popper:v?C:null,arrowProps:v?(0,U.A)({ref:a},C.attributes.arrow,{style:C.styles.arrow}):{}};return xa(O,(function(e){null==t||t.toggle(!1,e)}),{clickTrigger:c,disabled:!g}),[T,k]}var ru={children:a().func.isRequired,show:a().bool,alignEnd:a().bool,flip:a().bool,usePopper:a().oneOf([!0,!1]),popperConfig:a().object,rootCloseEvent:a().string};function ou(e){var t=e.children,n=nu((0,H.A)(e,["children"])),o=n[0],a=n[1];return r.createElement(r.Fragment,null,a.hasShown?t(o,a):null)}ou.displayName="ReactOverlaysDropdownMenu",ou.propTypes=ru,ou.defaultProps={usePopper:!0};const au=ou;var iu=function(){};function lu(){var e=(0,r.useContext)(eu)||{},t=e.show,n=void 0!==t&&t,o=e.toggle,a=void 0===o?iu:o,i=e.setToggle,l=(0,r.useCallback)((function(e){a(!n,e)}),[n,a]);return[{ref:i||iu,onClick:l,"aria-haspopup":!0,"aria-expanded":!!n},{show:n,toggle:a}]}var su={children:a().func.isRequired};function uu(e){var t=e.children,n=lu(),o=n[0],a=n[1];return r.createElement(r.Fragment,null,t(o,a))}uu.displayName="ReactOverlaysDropdownToggle",uu.propTypes=su;const cu=uu;var fu={children:a().node,drop:a().oneOf(["up","left","right","down"]),focusFirstItemOnShow:a().oneOf([!1,!0,"keyboard"]),itemSelector:a().string,alignEnd:a().bool,show:a().bool,defaultShow:a().bool,onToggle:a().func};function du(){var e=Qs(),t=(0,r.useRef)(null),n=(0,r.useCallback)((function(n){t.current=n,e()}),[e]);return[t,n]}function pu(e){var t=e.drop,n=e.alignEnd,o=e.defaultShow,a=e.show,i=e.onToggle,l=e.itemSelector,s=void 0===l?"* > *":l,u=e.focusFirstItemOnShow,c=e.children,f=$(a,o,i),d=f[0],p=f[1],h=du(),m=h[0],v=h[1],g=m.current,y=du(),b=y[0],w=y[1],S=b.current,O=function(e){const t=(0,r.useRef)(null);return(0,r.useEffect)((()=>{t.current=e})),t.current}(d),E=(0,r.useRef)(null),x=(0,r.useRef)(!1),C=(0,r.useCallback)((function(e,t){p(e,t)}),[p]),T=(0,r.useMemo)((function(){return{toggle:C,drop:t,show:d,alignEnd:n,menuElement:g,toggleElement:S,setMenu:v,setToggle:w}}),[C,t,d,n,g,S,v,w]);g&&O&&!d&&(x.current=g.contains(document.activeElement));var k=J((function(){S&&S.focus&&S.focus()})),P=J((function(){var e=E.current,t=u;if(null==t&&(t=!(!m.current||!function(e,t){if(!Ys){var n=document.body,r=n.matches||n.matchesSelector||n.webkitMatchesSelector||n.mozMatchesSelector||n.msMatchesSelector;Ys=function(e,t){return r.call(e,t)}}return Ys(e,"[role=menu]")}(m.current))&&"keyboard"),!1!==t&&("keyboard"!==t||/^key.+$/.test(e))){var n=Xs(m.current,s)[0];n&&n.focus&&n.focus()}}));(0,r.useEffect)((function(){d?P():x.current&&(x.current=!1,k())}),[d,x,k,P]),(0,r.useEffect)((function(){E.current=null}));var A=function(e,t){if(!m.current)return null;var n=Xs(m.current,s),r=n.indexOf(e)+t;return n[r=Math.max(0,Math.min(r,n.length))]};return function(e,t,n=!1){(function(e,t,n,o=!1){const a=J(n);(0,r.useEffect)((()=>{const n="function"==typeof e?e():e;return n.addEventListener(t,a,o),()=>n.removeEventListener(t,a,o)}),[e])})((0,r.useCallback)((()=>document),[]),e,t,n)}("keydown",(function(e){var t,n,r=e.key,o=e.target,a=null==(t=m.current)?void 0:t.contains(o),i=null==(n=b.current)?void 0:n.contains(o);if((!/input|textarea/i.test(o.tagName)||!(" "===r||"Escape"!==r&&a))&&(a||i)&&(m.current||"Tab"!==r))switch(E.current=e.type,r){case"ArrowUp":var l=A(o,-1);return l&&l.focus&&l.focus(),void e.preventDefault();case"ArrowDown":if(e.preventDefault(),d){var s=A(o,1);s&&s.focus&&s.focus()}else p(!0,e);return;case"Tab":Se(document,"keyup",(function(t){var n;("Tab"!==t.key||t.target)&&null!=(n=m.current)&&n.contains(t.target)||p(!1,e)}),{once:!0});break;case"Escape":e.preventDefault(),e.stopPropagation(),p(!1,e)}})),r.createElement(eu.Provider,{value:T},c)}pu.displayName="ReactOverlaysDropdown",pu.propTypes=fu,pu.Menu=au,pu.Toggle=cu;const hu=pu;var mu=function(e,t){return void 0===t&&(t=null),null!=e?String(e):t||null};const vu=r.createContext(null);var gu=r.createContext(null);gu.displayName="NavContext";const yu=gu;var bu=["bsPrefix","className","children","eventKey","disabled","href","onClick","onSelect","active","as"],wu={as:ze.A,disabled:!1},Su=r.forwardRef((function(e,t){var n=e.bsPrefix,o=e.className,a=e.children,i=e.eventKey,s=e.disabled,u=e.href,c=e.onClick,f=e.onSelect,d=e.active,p=e.as,h=(0,H.A)(e,bu),m=(0,X.oU)(n,"dropdown-item"),v=(0,r.useContext)(vu),g=((0,r.useContext)(yu)||{}).activeKey,y=mu(i,u),b=null==d&&null!=y?mu(g)===y:d,w=J((function(e){s||(c&&c(e),v&&v(y,e),f&&f(y,e))}));return r.createElement(p,(0,U.A)({},h,{ref:t,href:u,disabled:s,className:l()(o,m,b&&"active",s&&"disabled"),onClick:w}),a)}));Su.displayName="DropdownItem",Su.defaultProps=wu;const Ou=Su;var Eu=r.createContext(null);Eu.displayName="NavbarContext";const xu=Eu;function Cu(e,t){return e}var Tu=["bsPrefix","className","align","alignRight","rootCloseEvent","flip","show","renderOnMount","as","popperConfig"],ku=a().oneOf(["left","right"]),Pu=a().oneOfType([ku,a().shape({sm:ku}),a().shape({md:ku}),a().shape({lg:ku}),a().shape({xl:ku})]),Au=r.forwardRef((function(e,t){var n=e.bsPrefix,o=e.className,a=e.align,i=e.alignRight,s=e.rootCloseEvent,u=e.flip,c=e.show,f=e.renderOnMount,d=e.as,p=void 0===d?"div":d,h=e.popperConfig,m=(0,H.A)(e,Tu),v=(0,r.useContext)(xu),g=(0,X.oU)(n,"dropdown-menu"),y=Ra(),b=y[0],w=y[1],S=[];if(a)if("object"==typeof a){var O=Object.keys(a);if(O.length){var E=O[0],x=a[E];i="left"===x,S.push(g+"-"+E+"-"+x)}}else"right"===a&&(i=!0);var C=nu({flip:u,rootCloseEvent:s,show:c,alignEnd:i,usePopper:!v&&0===S.length,popperConfig:(0,U.A)({},h,{modifiers:w.concat((null==h?void 0:h.modifiers)||[])})}),T=C[0],k=C[1],P=k.hasShown,A=k.popper,_=k.show,j=k.alignEnd,I=k.toggle;if(T.ref=$r(b,$r(Cu(t),T.ref)),!P&&!f)return null;"string"!=typeof p&&(T.show=_,T.close=function(){return null==I?void 0:I(!1)},T.alignRight=j);var R=m.style;return null!=A&&A.placement&&(R=(0,U.A)({},m.style,T.style),m["x-placement"]=A.placement),r.createElement(p,(0,U.A)({},m,T,{style:R,className:l().apply(void 0,[o,g,_&&"show",j&&g+"-right"].concat(S))}))}));Au.displayName="DropdownMenu",Au.defaultProps={align:"left",alignRight:!1,flip:!0};const _u=Au;var ju=n(6461),Iu=["bsPrefix","split","className","childBsPrefix","as"],Ru=r.forwardRef((function(e,t){var n=e.bsPrefix,o=e.split,a=e.className,i=e.childBsPrefix,s=e.as,u=void 0===s?ju.A:s,c=(0,H.A)(e,Iu),f=(0,X.oU)(n,"dropdown-toggle");void 0!==i&&(c.bsPrefix=i);var d=lu()[0];return d.ref=$r(d.ref,Cu(t)),r.createElement(u,(0,U.A)({className:l()(a,f,o&&f+"-split")},d,c))}));Ru.displayName="DropdownToggle";const Nu=Ru;var Mu=["bsPrefix","drop","show","className","alignRight","onSelect","onToggle","focusFirstItemOnShow","as","navbar"],Du=Fe("dropdown-header",{defaultProps:{role:"heading"}}),Lu=Fe("dropdown-divider",{defaultProps:{role:"separator"}}),Bu=Fe("dropdown-item-text",{Component:"span"}),Fu=r.forwardRef((function(e,t){var n=Z(e,{show:"onToggle"}),o=n.bsPrefix,a=n.drop,i=n.show,s=n.className,u=n.alignRight,c=n.onSelect,f=n.onToggle,d=n.focusFirstItemOnShow,p=n.as,h=void 0===p?"div":p,m=(n.navbar,(0,H.A)(n,Mu)),v=(0,r.useContext)(vu),g=(0,X.oU)(o,"dropdown"),y=J((function(e,t,n){void 0===n&&(n=t.type),t.currentTarget!==document||"keydown"===n&&"Escape"!==t.key||(n="rootClose"),f&&f(e,t,{source:n})})),b=J((function(e,t){v&&v(e,t),c&&c(e,t),y(!1,t,"select")}));return r.createElement(vu.Provider,{value:b},r.createElement(hu,{drop:a,show:i,alignEnd:u,onToggle:y,focusFirstItemOnShow:d,itemSelector:"."+g+"-item:not(.disabled):not(:disabled)"},r.createElement(h,(0,U.A)({},m,{ref:t,className:l()(s,i&&"show",(!a||"down"===a)&&g,"up"===a&&"dropup","right"===a&&"dropright","left"===a&&"dropleft")}))))}));Fu.displayName="Dropdown",Fu.defaultProps={navbar:!1},Fu.Divider=Lu,Fu.Header=Du,Fu.Item=Ou,Fu.ItemText=Bu,Fu.Menu=_u,Fu.Toggle=Nu;const zu=Fu;function Gu(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var Yu=r.forwardRef((function(e,t){var n=e.show,o=e.autoClose,a=e.onToggle,i=e.variant,s=e.className,u=Zu(e,Hu),c=function(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,a,i,l=[],s=!0,u=!1;try{if(a=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;s=!1}else for(;!(s=(r=a.call(n)).done)&&(l.push(r.value),l.length!==t);s=!0);}catch(e){u=!0,o=e}finally{try{if(!s&&null!=n.return&&(i=n.return(),Object(i)!==i))return}finally{if(u)throw o}}return l}}(e,t)||function(e,t){if(e){if("string"==typeof e)return Gu(e,t);var n=Object.prototype.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)?Gu(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.")}()}(r.useState(n),2),f=c[0],d=c[1];return r.createElement(zu,qu({className:l()("pgn__dropdown","pgn__dropdown-".concat(i),s),"data-testid":"dropdown",onToggle:function(e,t,n){if(e)return d(!0),void(null==a||a(e,t,n));var r=function(e){for(var t=1;tt.includes(n))):Object.entries(e).reduce(((e,n)=>{let[r,o]=n;return t(o,r)&&(e[r]=o),e}),{})}const Xc="NONE",Qc="LEFT",ef="FORCE_LEFT",tf="RIGHT",nf="FORCE_RIGHT";function rf(e){return e.replace(/([.*+?^=!:${}()|[\]/\\])/g,"\\$1")}function of(e,t){if(t===e)return!0;const n=Array.isArray(t),r=Array.isArray(e);let o;if(n&&r){if(t.length!=e.length)return!1;for(o=0;o!t.startsWith("_"))),mask:t.constructor,_mask:e,...n}}}return Yc(e)?{...e}:{mask:e}}function cf(e){if(lf.Masked&&e instanceof lf.Masked)return e;const t=uf(e),n=sf(t.mask);if(!n)throw new Error("Masked class is not found for provided mask "+t.mask+", appropriate module needs to be imported manually before creating mask.");return t.mask===n&&delete t.mask,t._mask&&(t.mask=t._mask,delete t._mask),new n(t)}lf.createMask=cf;class ff{get selectionStart(){let e;try{e=this._unsafeSelectionStart}catch{}return null!=e?e:this.value.length}get selectionEnd(){let e;try{e=this._unsafeSelectionEnd}catch{}return null!=e?e:this.value.length}select(e,t){if(null!=e&&null!=t&&(e!==this.selectionStart||t!==this.selectionEnd))try{this._unsafeSelect(e,t)}catch{}}get isActive(){return!1}}lf.MaskElement=ff;class df extends ff{constructor(e){super(),this.input=e,this._onKeydown=this._onKeydown.bind(this),this._onInput=this._onInput.bind(this),this._onBeforeinput=this._onBeforeinput.bind(this),this._onCompositionEnd=this._onCompositionEnd.bind(this)}get rootElement(){var e,t,n;return null!=(e=null==(t=(n=this.input).getRootNode)?void 0:t.call(n))?e:document}get isActive(){return this.input===this.rootElement.activeElement}bindEvents(e){this.input.addEventListener("keydown",this._onKeydown),this.input.addEventListener("input",this._onInput),this.input.addEventListener("beforeinput",this._onBeforeinput),this.input.addEventListener("compositionend",this._onCompositionEnd),this.input.addEventListener("drop",e.drop),this.input.addEventListener("click",e.click),this.input.addEventListener("focus",e.focus),this.input.addEventListener("blur",e.commit),this._handlers=e}_onKeydown(e){return this._handlers.redo&&(90===e.keyCode&&e.shiftKey&&(e.metaKey||e.ctrlKey)||89===e.keyCode&&e.ctrlKey)?(e.preventDefault(),this._handlers.redo(e)):this._handlers.undo&&90===e.keyCode&&(e.metaKey||e.ctrlKey)?(e.preventDefault(),this._handlers.undo(e)):void(e.isComposing||this._handlers.selectionChange(e))}_onBeforeinput(e){return"historyUndo"===e.inputType&&this._handlers.undo?(e.preventDefault(),this._handlers.undo(e)):"historyRedo"===e.inputType&&this._handlers.redo?(e.preventDefault(),this._handlers.redo(e)):void 0}_onCompositionEnd(e){this._handlers.input(e)}_onInput(e){e.isComposing||this._handlers.input(e)}unbindEvents(){this.input.removeEventListener("keydown",this._onKeydown),this.input.removeEventListener("input",this._onInput),this.input.removeEventListener("beforeinput",this._onBeforeinput),this.input.removeEventListener("compositionend",this._onCompositionEnd),this.input.removeEventListener("drop",this._handlers.drop),this.input.removeEventListener("click",this._handlers.click),this.input.removeEventListener("focus",this._handlers.focus),this.input.removeEventListener("blur",this._handlers.commit),this._handlers={}}}lf.HTMLMaskElement=df;class pf extends df{constructor(e){super(e),this.input=e}get _unsafeSelectionStart(){return null!=this.input.selectionStart?this.input.selectionStart:this.value.length}get _unsafeSelectionEnd(){return this.input.selectionEnd}_unsafeSelect(e,t){this.input.setSelectionRange(e,t)}get value(){return this.input.value}set value(e){this.input.value=e}}lf.HTMLMaskElement=df;class hf extends df{get _unsafeSelectionStart(){const e=this.rootElement,t=e.getSelection&&e.getSelection(),n=t&&t.anchorOffset,r=t&&t.focusOffset;return null==r||null==n||nr?n:r}_unsafeSelect(e,t){if(!this.rootElement.createRange)return;const n=this.rootElement.createRange();n.setStart(this.input.firstChild||this.input,e),n.setEnd(this.input.lastChild||this.input,t);const r=this.rootElement,o=r.getSelection&&r.getSelection();o&&(o.removeAllRanges(),o.addRange(n))}get value(){return this.input.textContent||""}set value(e){this.input.textContent=e}}lf.HTMLContenteditableMaskElement=hf;class mf{constructor(){this.states=[],this.currentIndex=0}get currentState(){return this.states[this.currentIndex]}get isEmpty(){return 0===this.states.length}push(e){this.currentIndexmf.MAX_LENGTH&&this.states.shift(),this.currentIndex=this.states.length-1}go(e){return this.currentIndex=Math.min(Math.max(this.currentIndex+e,0),this.states.length-1),this.currentState}undo(){return this.go(-1)}redo(){return this.go(1)}clear(){this.states.length=0,this.currentIndex=0}}mf.MAX_LENGTH=100,lf.InputMask=class{constructor(e,t){this.el=e instanceof ff?e:e.isContentEditable&&"INPUT"!==e.tagName&&"TEXTAREA"!==e.tagName?new hf(e):new pf(e),this.masked=cf(t),this._listeners={},this._value="",this._unmaskedValue="",this._rawInputValue="",this.history=new mf,this._saveSelection=this._saveSelection.bind(this),this._onInput=this._onInput.bind(this),this._onChange=this._onChange.bind(this),this._onDrop=this._onDrop.bind(this),this._onFocus=this._onFocus.bind(this),this._onClick=this._onClick.bind(this),this._onUndo=this._onUndo.bind(this),this._onRedo=this._onRedo.bind(this),this.alignCursor=this.alignCursor.bind(this),this.alignCursorFriendly=this.alignCursorFriendly.bind(this),this._bindEvents(),this.updateValue(),this._onChange()}maskEquals(e){var t;return null==e||(null==(t=this.masked)?void 0:t.maskEquals(e))}get mask(){return this.masked.mask}set mask(e){if(this.maskEquals(e))return;if(!(e instanceof lf.Masked)&&this.masked.constructor===sf(e))return void this.masked.updateOptions({mask:e});const t=e instanceof lf.Masked?e:cf({mask:e});t.unmaskedValue=this.masked.unmaskedValue,this.masked=t}get value(){return this._value}set value(e){this.value!==e&&(this.masked.value=e,this.updateControl("auto"))}get unmaskedValue(){return this._unmaskedValue}set unmaskedValue(e){this.unmaskedValue!==e&&(this.masked.unmaskedValue=e,this.updateControl("auto"))}get rawInputValue(){return this._rawInputValue}set rawInputValue(e){this.rawInputValue!==e&&(this.masked.rawInputValue=e,this.updateControl(),this.alignCursor())}get typedValue(){return this.masked.typedValue}set typedValue(e){this.masked.typedValueEquals(e)||(this.masked.typedValue=e,this.updateControl("auto"))}get displayValue(){return this.masked.displayValue}_bindEvents(){this.el.bindEvents({selectionChange:this._saveSelection,input:this._onInput,drop:this._onDrop,click:this._onClick,focus:this._onFocus,commit:this._onChange,undo:this._onUndo,redo:this._onRedo})}_unbindEvents(){this.el&&this.el.unbindEvents()}_fireEvent(e,t){const n=this._listeners[e];n&&n.forEach((e=>e(t)))}get selectionStart(){return this._cursorChanging?this._changingCursorPos:this.el.selectionStart}get cursorPos(){return this._cursorChanging?this._changingCursorPos:this.el.selectionEnd}set cursorPos(e){this.el&&this.el.isActive&&(this.el.select(e,e),this._saveSelection())}_saveSelection(){this.displayValue!==this.el.value&&console.warn("Element value was changed outside of mask. Syncronize mask using `mask.updateValue()` to work properly."),this._selection={start:this.selectionStart,end:this.cursorPos}}updateValue(){this.masked.value=this.el.value,this._value=this.masked.value}updateControl(e){const t=this.masked.unmaskedValue,n=this.masked.value,r=this.masked.rawInputValue,o=this.displayValue,a=this.unmaskedValue!==t||this.value!==n||this._rawInputValue!==r;this._unmaskedValue=t,this._value=n,this._rawInputValue=r,this.el.value!==o&&(this.el.value=o),"auto"===e?this.alignCursor():null!=e&&(this.cursorPos=e),a&&this._fireChangeEvents(),this._historyChanging||!a&&!this.history.isEmpty||this.history.push({unmaskedValue:t,selection:{start:this.selectionStart,end:this.cursorPos}})}updateOptions(e){const{mask:t,...n}=e,r=!this.maskEquals(t),o=this.masked.optionsIsChanged(n);r&&(this.mask=t),o&&this.masked.updateOptions(n),(r||o)&&this.updateControl()}updateCursor(e){null!=e&&(this.cursorPos=e,this._delayUpdateCursor(e))}_delayUpdateCursor(e){this._abortUpdateCursor(),this._changingCursorPos=e,this._cursorChanging=setTimeout((()=>{this.el&&(this.cursorPos=this._changingCursorPos,this._abortUpdateCursor())}),10)}_fireChangeEvents(){this._fireEvent("accept",this._inputEvent),this.masked.isComplete&&this._fireEvent("complete",this._inputEvent)}_abortUpdateCursor(){this._cursorChanging&&(clearTimeout(this._cursorChanging),delete this._cursorChanging)}alignCursor(){this.cursorPos=this.masked.nearestInputPos(this.masked.nearestInputPos(this.cursorPos,Qc))}alignCursorFriendly(){this.selectionStart===this.cursorPos&&this.alignCursor()}on(e,t){return this._listeners[e]||(this._listeners[e]=[]),this._listeners[e].push(t),this}off(e,t){if(!this._listeners[e])return this;if(!t)return delete this._listeners[e],this;const n=this._listeners[e].indexOf(t);return n>=0&&this._listeners[e].splice(n,1),this}_onInput(e){this._inputEvent=e,this._abortUpdateCursor();const t=new af({value:this.el.value,cursorPos:this.cursorPos,oldValue:this.displayValue,oldSelection:this._selection}),n=this.masked.rawInputValue,r=this.masked.splice(t.startChangePos,t.removed.length,t.inserted,t.removeDirection,{input:!0,raw:!0}).offset,o=n===this.masked.rawInputValue?t.removeDirection:Xc;let a=this.masked.nearestInputPos(t.startChangePos+r,o);o!==Xc&&(a=this.masked.nearestInputPos(a,Xc)),this.updateControl(a),delete this._inputEvent}_onChange(){this.displayValue!==this.el.value&&this.updateValue(),this.masked.doCommit(),this.updateControl(),this._saveSelection()}_onDrop(e){e.preventDefault(),e.stopPropagation()}_onFocus(e){this.alignCursorFriendly()}_onClick(e){this.alignCursorFriendly()}_onUndo(){this._applyHistoryState(this.history.undo())}_onRedo(){this._applyHistoryState(this.history.redo())}_applyHistoryState(e){e&&(this._historyChanging=!0,this.unmaskedValue=e.unmaskedValue,this.el.select(e.selection.start,e.selection.end),this._saveSelection(),this._historyChanging=!1)}destroy(){this._unbindEvents(),this._listeners.length=0,delete this.el}};class vf{static normalize(e){return Array.isArray(e)?e:[e,new vf]}constructor(e){Object.assign(this,{inserted:"",rawInserted:"",tailShift:0,skip:!1},e)}aggregate(e){return this.inserted+=e.inserted,this.rawInserted+=e.rawInserted,this.tailShift+=e.tailShift,this.skip=this.skip||e.skip,this}get offset(){return this.tailShift+this.inserted.length}get consumed(){return Boolean(this.rawInserted)||this.skip}equals(e){return this.inserted===e.inserted&&this.tailShift===e.tailShift&&this.rawInserted===e.rawInserted&&this.skip===e.skip}}lf.ChangeDetails=vf;class gf{constructor(e,t,n){void 0===e&&(e=""),void 0===t&&(t=0),this.value=e,this.from=t,this.stop=n}toString(){return this.value}extend(e){this.value+=String(e)}appendTo(e){return e.append(this.toString(),{tail:!0}).aggregate(e._appendPlaceholder())}get state(){return{value:this.value,from:this.from,stop:this.stop}}set state(e){Object.assign(this,e)}unshift(e){if(!this.value.length||null!=e&&this.from>=e)return"";const t=this.value[0];return this.value=this.value.slice(1),t}shift(){if(!this.value.length)return"";const e=this.value[this.value.length-1];return this.value=this.value.slice(0,-1),e}}class yf{constructor(e){this._value="",this._update({...yf.DEFAULTS,...e}),this._initialized=!0}updateOptions(e){this.optionsIsChanged(e)&&this.withValueRefresh(this._update.bind(this,e))}_update(e){Object.assign(this,e)}get state(){return{_value:this.value,_rawInputValue:this.rawInputValue}}set state(e){this._value=e._value}reset(){this._value=""}get value(){return this._value}set value(e){this.resolve(e,{input:!0})}resolve(e,t){void 0===t&&(t={input:!0}),this.reset(),this.append(e,t,""),this.doCommit()}get unmaskedValue(){return this.value}set unmaskedValue(e){this.resolve(e,{})}get typedValue(){return this.parse?this.parse(this.value,this):this.unmaskedValue}set typedValue(e){this.format?this.value=this.format(e,this):this.unmaskedValue=String(e)}get rawInputValue(){return this.extractInput(0,this.displayValue.length,{raw:!0})}set rawInputValue(e){this.resolve(e,{raw:!0})}get displayValue(){return this.value}get isComplete(){return!0}get isFilled(){return this.isComplete}nearestInputPos(e,t){return e}totalInputPositions(e,t){return void 0===e&&(e=0),void 0===t&&(t=this.displayValue.length),Math.min(this.displayValue.length,t-e)}extractInput(e,t,n){return void 0===e&&(e=0),void 0===t&&(t=this.displayValue.length),this.displayValue.slice(e,t)}extractTail(e,t){return void 0===e&&(e=0),void 0===t&&(t=this.displayValue.length),new gf(this.extractInput(e,t),e)}appendTail(e){return Zc(e)&&(e=new gf(String(e))),e.appendTo(this)}_appendCharRaw(e,t){return e?(this._value+=e,new vf({inserted:e,rawInserted:e})):new vf}_appendChar(e,t,n){void 0===t&&(t={});const r=this.state;let o;if([e,o]=this.doPrepareChar(e,t),e&&(o=o.aggregate(this._appendCharRaw(e,t)),!o.rawInserted&&"pad"===this.autofix)){const n=this.state;this.state=r;let a=this.pad(t);const i=this._appendCharRaw(e,t);a=a.aggregate(i),i.rawInserted||a.equals(o)?o=a:this.state=n}if(o.inserted){let e,a=!1!==this.doValidate(t);if(a&&null!=n){const t=this.state;if(!0===this.overwrite){e=n.state;for(let e=0;e1&&0!==e&&!l?Xc:r),c.tailShift=u-e),c.aggregate(this.remove(u)),l&&r!==Xc&&s===this.rawInputValue)if(r===ef){let e;for(;s===this.rawInputValue&&(e=this.displayValue.length);)c.aggregate(new vf({tailShift:-1})).aggregate(this.remove(e-1))}else r===nf&&i.unshift();return c.aggregate(this.append(n,o,i))}maskEquals(e){return this.mask===e}optionsIsChanged(e){return!of(this,e)}typedValueEquals(e){const t=this.typedValue;return e===t||yf.EMPTY_VALUES.includes(e)&&yf.EMPTY_VALUES.includes(t)||!!this.format&&this.format(e,this)===this.format(this.typedValue,this)}pad(e){return new vf}}yf.DEFAULTS={skipInvalid:!0},yf.EMPTY_VALUES=[void 0,null,""],lf.Masked=yf;class bf{constructor(e,t){void 0===e&&(e=[]),void 0===t&&(t=0),this.chunks=e,this.from=t}toString(){return this.chunks.map(String).join("")}extend(e){if(!String(e))return;e=Zc(e)?new gf(String(e)):e;const t=this.chunks[this.chunks.length-1],n=t&&(t.stop===e.stop||null==e.stop)&&e.from===t.from+t.toString().length;if(e instanceof gf)n?t.extend(e.toString()):this.chunks.push(e);else if(e instanceof bf){if(null==e.stop){let t;for(;e.chunks.length&&null==e.chunks[0].stop;)t=e.chunks.shift(),t.from+=e.from,this.extend(t)}e.toString()&&(e.stop=e.blockIndex,this.chunks.push(e))}}appendTo(e){if(!(e instanceof lf.MaskedPattern))return new gf(this.toString()).appendTo(e);const t=new vf;for(let n=0;n=0)&&t.aggregate(e._appendPlaceholder(a)),i=r instanceof bf&&e._blocks[a]),i){const n=i.appendTail(r);t.aggregate(n);const o=r.toString().slice(n.rawInserted.length);o&&t.aggregate(e.append(o,{tail:!0}))}else t.aggregate(e.append(r.toString(),{tail:!0}))}return t}get state(){return{chunks:this.chunks.map((e=>e.state)),from:this.from,stop:this.stop,blockIndex:this.blockIndex}}set state(e){const{chunks:t,...n}=e;Object.assign(this,n),this.chunks=t.map((e=>{const t="chunks"in e?new bf:new gf;return t.state=e,t}))}unshift(e){if(!this.chunks.length||null!=e&&this.from>=e)return"";const t=null!=e?e-this.from:e;let n=0;for(;n=this.masked._blocks.length&&(this.index=this.masked._blocks.length-1,this.offset=this.block.displayValue.length))}_pushLeft(e){for(this.pushState(),this.bindBlock();0<=this.index;--this.index,this.offset=(null==(t=this.block)?void 0:t.displayValue.length)||0){var t;if(e())return this.ok=!0}return this.ok=!1}_pushRight(e){for(this.pushState(),this.bindBlock();this.index{if(!this.block.isFixed&&this.block.value)return this.offset=this.block.nearestInputPos(this.offset,ef),0!==this.offset||void 0}))}pushLeftBeforeInput(){return this._pushLeft((()=>{if(!this.block.isFixed)return this.offset=this.block.nearestInputPos(this.offset,Qc),!0}))}pushLeftBeforeRequired(){return this._pushLeft((()=>{if(!(this.block.isFixed||this.block.isOptional&&!this.block.value))return this.offset=this.block.nearestInputPos(this.offset,Qc),!0}))}pushRightBeforeFilled(){return this._pushRight((()=>{if(!this.block.isFixed&&this.block.value)return this.offset=this.block.nearestInputPos(this.offset,nf),this.offset!==this.block.value.length||void 0}))}pushRightBeforeInput(){return this._pushRight((()=>{if(!this.block.isFixed)return this.offset=this.block.nearestInputPos(this.offset,Xc),!0}))}pushRightBeforeRequired(){return this._pushRight((()=>{if(!(this.block.isFixed||this.block.isOptional&&!this.block.value))return this.offset=this.block.nearestInputPos(this.offset,Xc),!0}))}}class Sf{constructor(e){Object.assign(this,e),this._value="",this.isFixed=!0}get value(){return this._value}get unmaskedValue(){return this.isUnmasking?this.value:""}get rawInputValue(){return this._isRawInput?this.value:""}get displayValue(){return this.value}reset(){this._isRawInput=!1,this._value=""}remove(e,t){return void 0===e&&(e=0),void 0===t&&(t=this._value.length),this._value=this._value.slice(0,e)+this._value.slice(t),this._value||(this._isRawInput=!1),new vf}nearestInputPos(e,t){void 0===t&&(t=Xc);const n=this._value.length;switch(t){case Qc:case ef:return 0;default:return n}}totalInputPositions(e,t){return void 0===e&&(e=0),void 0===t&&(t=this._value.length),this._isRawInput?t-e:0}extractInput(e,t,n){return void 0===e&&(e=0),void 0===t&&(t=this._value.length),void 0===n&&(n={}),n.raw&&this._isRawInput&&this._value.slice(e,t)||""}get isComplete(){return!0}get isFilled(){return Boolean(this._value)}_appendChar(e,t){if(void 0===t&&(t={}),this.isFilled)return new vf;const n=!0===this.eager||"append"===this.eager,r=this.char===e&&(this.isUnmasking||t.input||t.raw)&&(!t.raw||!n)&&!t.tail,o=new vf({inserted:this.char,rawInserted:r?this.char:""});return this._value=this.char,this._isRawInput=r&&(t.raw||t.input),o}_appendEager(){return this._appendChar(this.char,{tail:!0})}_appendPlaceholder(){const e=new vf;return this.isFilled||(this._value=e.inserted=this.char),e}extractTail(){return new gf("")}appendTail(e){return Zc(e)&&(e=new gf(String(e))),e.appendTo(this)}append(e,t,n){const r=this._appendChar(e[0],t);return null!=n&&(r.tailShift+=this.appendTail(n).tailShift),r}doCommit(){}get state(){return{_value:this._value,_rawInputValue:this.rawInputValue}}set state(e){this._value=e._value,this._isRawInput=Boolean(e._rawInputValue)}pad(e){return this._appendPlaceholder()}}class Of{constructor(e){const{parent:t,isOptional:n,placeholderChar:r,displayChar:o,lazy:a,eager:i,...l}=e;this.masked=cf(l),Object.assign(this,{parent:t,isOptional:n,placeholderChar:r,displayChar:o,lazy:a,eager:i})}reset(){this.isFilled=!1,this.masked.reset()}remove(e,t){return void 0===e&&(e=0),void 0===t&&(t=this.value.length),0===e&&t>=1?(this.isFilled=!1,this.masked.remove(e,t)):new vf}get value(){return this.masked.value||(this.isFilled&&!this.isOptional?this.placeholderChar:"")}get unmaskedValue(){return this.masked.unmaskedValue}get rawInputValue(){return this.masked.rawInputValue}get displayValue(){return this.masked.value&&this.displayChar||this.value}get isComplete(){return Boolean(this.masked.value)||this.isOptional}_appendChar(e,t){if(void 0===t&&(t={}),this.isFilled)return new vf;const n=this.masked.state;let r=this.masked._appendChar(e,this.currentMaskFlags(t));return r.inserted&&!1===this.doValidate(t)&&(r=new vf,this.masked.state=n),r.inserted||this.isOptional||this.lazy||t.input||(r.inserted=this.placeholderChar),r.skip=!r.inserted&&!this.isOptional,this.isFilled=Boolean(r.inserted),r}append(e,t,n){return this.masked.append(e,this.currentMaskFlags(t),n)}_appendPlaceholder(){return this.isFilled||this.isOptional?new vf:(this.isFilled=!0,new vf({inserted:this.placeholderChar}))}_appendEager(){return new vf}extractTail(e,t){return this.masked.extractTail(e,t)}appendTail(e){return this.masked.appendTail(e)}extractInput(e,t,n){return void 0===e&&(e=0),void 0===t&&(t=this.value.length),this.masked.extractInput(e,t,n)}nearestInputPos(e,t){void 0===t&&(t=Xc);const n=this.value.length,r=Math.min(Math.max(e,0),n);switch(t){case Qc:case ef:return this.isComplete?r:0;case tf:case nf:return this.isComplete?r:n;default:return r}}totalInputPositions(e,t){return void 0===e&&(e=0),void 0===t&&(t=this.value.length),this.value.slice(e,t).length}doValidate(e){return this.masked.doValidate(this.currentMaskFlags(e))&&(!this.parent||this.parent.doValidate(this.currentMaskFlags(e)))}doCommit(){this.masked.doCommit()}get state(){return{_value:this.value,_rawInputValue:this.rawInputValue,masked:this.masked.state,isFilled:this.isFilled}}set state(e){this.masked.state=e.masked,this.isFilled=e.isFilled}currentMaskFlags(e){var t;return{...e,_beforeTailState:(null==e||null==(t=e._beforeTailState)?void 0:t.masked)||(null==e?void 0:e._beforeTailState)}}pad(e){return new vf}}Of.DEFAULT_DEFINITIONS={0:/\d/,a:/[\u0041-\u005A\u0061-\u007A\u00AA\u00B5\u00BA\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u0527\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0\u08A2-\u08AC\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0977\u0979-\u097F\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C33\u0C35-\u0C39\u0C3D\u0C58\u0C59\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D60\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F4\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191C\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19C1-\u19C7\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA697\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788\uA78B-\uA78E\uA790-\uA793\uA7A0-\uA7AA\uA7F8-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA80-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uABC0-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]/,"*":/./},lf.MaskedRegExp=class extends yf{updateOptions(e){super.updateOptions(e)}_update(e){const t=e.mask;t&&(e.validate=e=>e.search(t)>=0),super._update(e)}};class Ef extends yf{constructor(e){super({...Ef.DEFAULTS,...e,definitions:Object.assign({},Of.DEFAULT_DEFINITIONS,null==e?void 0:e.definitions)})}updateOptions(e){super.updateOptions(e)}_update(e){e.definitions=Object.assign({},this.definitions,e.definitions),super._update(e),this._rebuildMask()}_rebuildMask(){const e=this.definitions;this._blocks=[],this.exposeBlock=void 0,this._stops=[],this._maskedBlocks={};const t=this.mask;if(!t||!e)return;let n=!1,r=!1;for(let o=0;o0===e.indexOf(t)));n.sort(((e,t)=>t.length-e.length));const r=n[0];if(r){const{expose:e,repeat:t,...n}=uf(this.blocks[r]),a={lazy:this.lazy,eager:this.eager,placeholderChar:this.placeholderChar,displayChar:this.displayChar,overwrite:this.overwrite,autofix:this.autofix,...n,repeat:t,parent:this},i=null!=t?new lf.RepeatBlock(a):cf(a);i&&(this._blocks.push(i),e&&(this.exposeBlock=i),this._maskedBlocks[r]||(this._maskedBlocks[r]=[]),this._maskedBlocks[r].push(this._blocks.length-1)),o+=r.length-1;continue}}let a=t[o],i=a in e;if(a===Ef.STOP_CHAR){this._stops.push(this._blocks.length);continue}if("{"===a||"}"===a){n=!n;continue}if("["===a||"]"===a){r=!r;continue}if(a===Ef.ESCAPE_CHAR){if(++o,a=t[o],!a)break;i=!1}const l=i?new Of({isOptional:r,lazy:this.lazy,eager:this.eager,placeholderChar:this.placeholderChar,displayChar:this.displayChar,...uf(e[a]),parent:this}):new Sf({char:a,eager:this.eager,isUnmasking:n});this._blocks.push(l)}}get state(){return{...super.state,_blocks:this._blocks.map((e=>e.state))}}set state(e){if(!e)return void this.reset();const{_blocks:t,...n}=e;this._blocks.forEach(((e,n)=>e.state=t[n])),super.state=n}reset(){super.reset(),this._blocks.forEach((e=>e.reset()))}get isComplete(){return this.exposeBlock?this.exposeBlock.isComplete:this._blocks.every((e=>e.isComplete))}get isFilled(){return this._blocks.every((e=>e.isFilled))}get isFixed(){return this._blocks.every((e=>e.isFixed))}get isOptional(){return this._blocks.every((e=>e.isOptional))}doCommit(){this._blocks.forEach((e=>e.doCommit())),super.doCommit()}get unmaskedValue(){return this.exposeBlock?this.exposeBlock.unmaskedValue:this._blocks.reduce(((e,t)=>e+t.unmaskedValue),"")}set unmaskedValue(e){if(this.exposeBlock){const t=this.extractTail(this._blockStartPos(this._blocks.indexOf(this.exposeBlock))+this.exposeBlock.displayValue.length);this.exposeBlock.unmaskedValue=e,this.appendTail(t),this.doCommit()}else super.unmaskedValue=e}get value(){return this.exposeBlock?this.exposeBlock.value:this._blocks.reduce(((e,t)=>e+t.value),"")}set value(e){if(this.exposeBlock){const t=this.extractTail(this._blockStartPos(this._blocks.indexOf(this.exposeBlock))+this.exposeBlock.displayValue.length);this.exposeBlock.value=e,this.appendTail(t),this.doCommit()}else super.value=e}get typedValue(){return this.exposeBlock?this.exposeBlock.typedValue:super.typedValue}set typedValue(e){if(this.exposeBlock){const t=this.extractTail(this._blockStartPos(this._blocks.indexOf(this.exposeBlock))+this.exposeBlock.displayValue.length);this.exposeBlock.typedValue=e,this.appendTail(t),this.doCommit()}else super.typedValue=e}get displayValue(){return this._blocks.reduce(((e,t)=>e+t.displayValue),"")}appendTail(e){return super.appendTail(e).aggregate(this._appendPlaceholder())}_appendEager(){var e;const t=new vf;let n=null==(e=this._mapPosToBlock(this.displayValue.length))?void 0:e.index;if(null==n)return t;this._blocks[n].isFilled&&++n;for(let e=n;e{const a=e.extractTail(r,o);a.stop=this._findStopBefore(t),a.from=this._blockStartPos(t),a instanceof bf&&(a.blockIndex=t),n.extend(a)})),n}extractInput(e,t,n){if(void 0===e&&(e=0),void 0===t&&(t=this.displayValue.length),void 0===n&&(n={}),e===t)return"";let r="";return this._forEachBlocksInRange(e,t,((e,t,o,a)=>{r+=e.extractInput(o,a,n)})),r}_findStopBefore(e){let t;for(let n=0;n{var r;n.lazy&&null==e||t.aggregate(n._appendPlaceholder(null==(r=n._blocks)?void 0:r.length))})),t}_mapPosToBlock(e){let t="";for(let n=0;ne+t.displayValue.length),0)}_forEachBlocksInRange(e,t,n){void 0===t&&(t=this.displayValue.length);const r=this._mapPosToBlock(e);if(r){const e=this._mapPosToBlock(t),o=e&&r.index===e.index,a=r.offset,i=e&&o?e.offset:this._blocks[r.index].displayValue.length;if(n(this._blocks[r.index],r.index,a,i),e&&!o){for(let t=r.index+1;t{n.aggregate(e.remove(r,o))})),n}nearestInputPos(e,t){if(void 0===t&&(t=Xc),!this._blocks.length)return 0;const n=new wf(this,e);if(t===Xc)return n.pushRightBeforeInput()?n.pos:(n.popState(),n.pushLeftBeforeInput()?n.pos:this.displayValue.length);if(t===Qc||t===ef){if(t===Qc){if(n.pushRightBeforeFilled(),n.ok&&n.pos===e)return e;n.popState()}if(n.pushLeftBeforeInput(),n.pushLeftBeforeRequired(),n.pushLeftBeforeFilled(),t===Qc){if(n.pushRightBeforeInput(),n.pushRightBeforeRequired(),n.ok&&n.pos<=e)return n.pos;if(n.popState(),n.ok&&n.pos<=e)return n.pos;n.popState()}return n.ok?n.pos:t===ef?0:(n.popState(),n.ok?n.pos:(n.popState(),n.ok?n.pos:0))}return t===tf||t===nf?(n.pushRightBeforeInput(),n.pushRightBeforeRequired(),n.pushRightBeforeFilled()?n.pos:t===nf?this.displayValue.length:(n.popState(),n.ok?n.pos:(n.popState(),n.ok?n.pos:this.nearestInputPos(e,Qc)))):e}totalInputPositions(e,t){void 0===e&&(e=0),void 0===t&&(t=this.displayValue.length);let n=0;return this._forEachBlocksInRange(e,t,((e,t,r,o)=>{n+=e.totalInputPositions(r,o)})),n}maskedBlock(e){return this.maskedBlocks(e)[0]}maskedBlocks(e){const t=this._maskedBlocks[e];return t?t.map((e=>this._blocks[e])):[]}pad(e){const t=new vf;return this._forEachBlocksInRange(0,this.displayValue.length,(n=>t.aggregate(n.pad(e)))),t}}Ef.DEFAULTS={...yf.DEFAULTS,lazy:!0,placeholderChar:"_"},Ef.STOP_CHAR="`",Ef.ESCAPE_CHAR="\\",Ef.InputDefinition=Of,Ef.FixedDefinition=Sf,lf.MaskedPattern=Ef;class xf extends Ef{get _matchFrom(){return this.maxLength-String(this.from).length}constructor(e){super(e)}updateOptions(e){super.updateOptions(e)}_update(e){const{to:t=this.to||0,from:n=this.from||0,maxLength:r=this.maxLength||0,autofix:o=this.autofix,...a}=e;this.to=t,this.from=n,this.maxLength=Math.max(String(t).length,r),this.autofix=o;const i=String(this.from).padStart(this.maxLength,"0"),l=String(this.to).padStart(this.maxLength,"0");let s=0;for(;sthis.maxLength)return super._appendCharRaw(e,t);const n=String(this.from).padStart(this.maxLength,"0"),r=String(this.to).padStart(this.maxLength,"0"),[o,a]=this.boundaries(this.value+e);return Number(a)this.to?!t.tail&&"pad"===this.autofix&&this.value.length+1this._appendCharRaw(e)))}return t}}lf.MaskedRange=xf;class Cf extends Ef{static extractPatternOptions(e){const{mask:t,pattern:n,...r}=e;return{...r,mask:Zc(t)?t:n}}constructor(e){super(Cf.extractPatternOptions({...Cf.DEFAULTS,...e}))}updateOptions(e){super.updateOptions(e)}_update(e){const{mask:t,pattern:n,blocks:r,...o}={...Cf.DEFAULTS,...e},a=Object.assign({},Cf.GET_DEFAULT_BLOCKS());e.min&&(a.Y.from=e.min.getFullYear()),e.max&&(a.Y.to=e.max.getFullYear()),e.min&&e.max&&a.Y.from===a.Y.to&&(a.m.from=e.min.getMonth()+1,a.m.to=e.max.getMonth()+1,a.m.from===a.m.to&&(a.d.from=e.min.getDate(),a.d.to=e.max.getDate())),Object.assign(a,this.blocks,r),super._update({...o,mask:Zc(t)?t:n,blocks:a})}doValidate(e){const t=this.date;return super.doValidate(e)&&(!this.isComplete||this.isDateExist(this.value)&&null!=t&&(null==this.min||this.min<=t)&&(null==this.max||t<=this.max))}isDateExist(e){return this.format(this.parse(e,this),this).indexOf(e)>=0}get date(){return this.typedValue}set date(e){this.typedValue=e}get typedValue(){return this.isComplete?super.typedValue:null}set typedValue(e){super.typedValue=e}maskEquals(e){return e===Date||super.maskEquals(e)}optionsIsChanged(e){return super.optionsIsChanged(Cf.extractPatternOptions(e))}}Cf.GET_DEFAULT_BLOCKS=()=>({d:{mask:xf,from:1,to:31,maxLength:2},m:{mask:xf,from:1,to:12,maxLength:2},Y:{mask:xf,from:1900,to:9999}}),Cf.DEFAULTS={...Ef.DEFAULTS,mask:Date,pattern:"d{.}`m{.}`Y",format:(e,t)=>e?[String(e.getDate()).padStart(2,"0"),String(e.getMonth()+1).padStart(2,"0"),e.getFullYear()].join("."):"",parse:(e,t)=>{const[n,r,o]=e.split(".").map(Number);return new Date(o,r-1,n)}},lf.MaskedDate=Cf;class Tf extends yf{constructor(e){super({...Tf.DEFAULTS,...e}),this.currentMask=void 0}updateOptions(e){super.updateOptions(e)}_update(e){super._update(e),"mask"in e&&(this.exposeMask=void 0,this.compiledMasks=Array.isArray(e.mask)?e.mask.map((e=>{const{expose:t,...n}=uf(e),r=cf({overwrite:this._overwrite,eager:this._eager,skipInvalid:this._skipInvalid,...n});return t&&(this.exposeMask=r),r})):[])}_appendCharRaw(e,t){void 0===t&&(t={});const n=this._applyDispatch(e,t);return this.currentMask&&n.aggregate(this.currentMask._appendChar(e,this.currentMaskFlags(t))),n}_applyDispatch(e,t,n){void 0===e&&(e=""),void 0===t&&(t={}),void 0===n&&(n="");const r=t.tail&&null!=t._beforeTailState?t._beforeTailState._value:this.value,o=this.rawInputValue,a=t.tail&&null!=t._beforeTailState?t._beforeTailState._rawInputValue:o,i=o.slice(a.length),l=this.currentMask,s=new vf,u=null==l?void 0:l.state;return this.currentMask=this.doDispatch(e,{...t},n),this.currentMask&&(this.currentMask!==l?(this.currentMask.reset(),a&&(this.currentMask.append(a,{raw:!0}),s.tailShift=this.currentMask.value.length-r.length),i&&(s.tailShift+=this.currentMask.append(i,{raw:!0,tail:!0}).tailShift)):u&&(this.currentMask.state=u)),s}_appendPlaceholder(){const e=this._applyDispatch();return this.currentMask&&e.aggregate(this.currentMask._appendPlaceholder()),e}_appendEager(){const e=this._applyDispatch();return this.currentMask&&e.aggregate(this.currentMask._appendEager()),e}appendTail(e){const t=new vf;return e&&t.aggregate(this._applyDispatch("",{},e)),t.aggregate(this.currentMask?this.currentMask.appendTail(e):super.appendTail(e))}currentMaskFlags(e){var t,n;return{...e,_beforeTailState:(null==(t=e._beforeTailState)?void 0:t.currentMaskRef)===this.currentMask&&(null==(n=e._beforeTailState)?void 0:n.currentMask)||e._beforeTailState}}doDispatch(e,t,n){return void 0===t&&(t={}),void 0===n&&(n=""),this.dispatch(e,this,t,n)}doValidate(e){return super.doValidate(e)&&(!this.currentMask||this.currentMask.doValidate(this.currentMaskFlags(e)))}doPrepare(e,t){void 0===t&&(t={});let[n,r]=super.doPrepare(e,t);if(this.currentMask){let e;[n,e]=super.doPrepare(n,this.currentMaskFlags(t)),r=r.aggregate(e)}return[n,r]}doPrepareChar(e,t){void 0===t&&(t={});let[n,r]=super.doPrepareChar(e,t);if(this.currentMask){let e;[n,e]=super.doPrepareChar(n,this.currentMaskFlags(t)),r=r.aggregate(e)}return[n,r]}reset(){var e;null==(e=this.currentMask)||e.reset(),this.compiledMasks.forEach((e=>e.reset()))}get value(){return this.exposeMask?this.exposeMask.value:this.currentMask?this.currentMask.value:""}set value(e){this.exposeMask?(this.exposeMask.value=e,this.currentMask=this.exposeMask,this._applyDispatch()):super.value=e}get unmaskedValue(){return this.exposeMask?this.exposeMask.unmaskedValue:this.currentMask?this.currentMask.unmaskedValue:""}set unmaskedValue(e){this.exposeMask?(this.exposeMask.unmaskedValue=e,this.currentMask=this.exposeMask,this._applyDispatch()):super.unmaskedValue=e}get typedValue(){return this.exposeMask?this.exposeMask.typedValue:this.currentMask?this.currentMask.typedValue:""}set typedValue(e){if(this.exposeMask)return this.exposeMask.typedValue=e,this.currentMask=this.exposeMask,void this._applyDispatch();let t=String(e);this.currentMask&&(this.currentMask.typedValue=e,t=this.currentMask.unmaskedValue),this.unmaskedValue=t}get displayValue(){return this.currentMask?this.currentMask.displayValue:""}get isComplete(){var e;return Boolean(null==(e=this.currentMask)?void 0:e.isComplete)}get isFilled(){var e;return Boolean(null==(e=this.currentMask)?void 0:e.isFilled)}remove(e,t){const n=new vf;return this.currentMask&&n.aggregate(this.currentMask.remove(e,t)).aggregate(this._applyDispatch()),n}get state(){var e;return{...super.state,_rawInputValue:this.rawInputValue,compiledMasks:this.compiledMasks.map((e=>e.state)),currentMaskRef:this.currentMask,currentMask:null==(e=this.currentMask)?void 0:e.state}}set state(e){const{compiledMasks:t,currentMaskRef:n,currentMask:r,...o}=e;t&&this.compiledMasks.forEach(((e,n)=>e.state=t[n])),null!=n&&(this.currentMask=n,this.currentMask.state=r),super.state=o}extractInput(e,t,n){return this.currentMask?this.currentMask.extractInput(e,t,n):""}extractTail(e,t){return this.currentMask?this.currentMask.extractTail(e,t):super.extractTail(e,t)}doCommit(){this.currentMask&&this.currentMask.doCommit(),super.doCommit()}nearestInputPos(e,t){return this.currentMask?this.currentMask.nearestInputPos(e,t):super.nearestInputPos(e,t)}get overwrite(){return this.currentMask?this.currentMask.overwrite:this._overwrite}set overwrite(e){this._overwrite=e}get eager(){return this.currentMask?this.currentMask.eager:this._eager}set eager(e){this._eager=e}get skipInvalid(){return this.currentMask?this.currentMask.skipInvalid:this._skipInvalid}set skipInvalid(e){this._skipInvalid=e}get autofix(){return this.currentMask?this.currentMask.autofix:this._autofix}set autofix(e){this._autofix=e}maskEquals(e){return Array.isArray(e)?this.compiledMasks.every(((t,n)=>{if(!e[n])return;const{mask:r,...o}=e[n];return of(t,o)&&t.maskEquals(r)})):super.maskEquals(e)}typedValueEquals(e){var t;return Boolean(null==(t=this.currentMask)?void 0:t.typedValueEquals(e))}}Tf.DEFAULTS={...yf.DEFAULTS,dispatch:(e,t,n,r)=>{if(!t.compiledMasks.length)return;const o=t.rawInputValue,a=t.compiledMasks.map(((a,i)=>{const l=t.currentMask===a,s=l?a.displayValue.length:a.nearestInputPos(a.displayValue.length,ef);return a.rawInputValue!==o?(a.reset(),a.append(o,{raw:!0})):l||a.remove(s),a.append(e,t.currentMaskFlags(n)),a.appendTail(r),{index:i,weight:a.rawInputValue.length,totalInputPositions:a.totalInputPositions(0,Math.max(s,a.nearestInputPos(a.displayValue.length,ef)))}}));return a.sort(((e,t)=>t.weight-e.weight||t.totalInputPositions-e.totalInputPositions)),t.compiledMasks[a[0].index]}},lf.MaskedDynamic=Tf;class kf extends Ef{constructor(e){super({...kf.DEFAULTS,...e})}updateOptions(e){super.updateOptions(e)}_update(e){const{enum:t,...n}=e;if(t){const e=t.map((e=>e.length)),r=Math.min(...e),o=Math.max(...e)-r;n.mask="*".repeat(r),o&&(n.mask+="["+"*".repeat(o)+"]"),this.enum=t}super._update(n)}_appendCharRaw(e,t){void 0===t&&(t={});const n=Math.min(this.nearestInputPos(0,nf),this.value.length),r=this.enum.filter((t=>this.matchValue(t,this.unmaskedValue+e,n)));if(r.length){1===r.length&&this._forEachBlocksInRange(0,this.value.length,((e,n)=>{const o=r[0][n];n>=this.value.length||o===e.value||(e.reset(),e._appendChar(o,t))}));const e=super._appendCharRaw(r[0][this.value.length],t);return 1===r.length&&r[0].slice(this.unmaskedValue.length).split("").forEach((t=>e.aggregate(super._appendCharRaw(t)))),e}return new vf}extractTail(e,t){return void 0===e&&(e=0),void 0===t&&(t=this.displayValue.length),new gf("",e)}remove(e,t){if(void 0===e&&(e=0),void 0===t&&(t=this.displayValue.length),e===t)return new vf;const n=Math.min(super.nearestInputPos(0,nf),this.value.length);let r;for(r=e;r>=0&&!(this.enum.filter((e=>this.matchValue(e,this.value.slice(n,r),n))).length>1);--r);const o=super.remove(r,t);return o.tailShift+=r-e,o}}var Pf;kf.DEFAULTS={...Ef.DEFAULTS,matchValue:(e,t,n)=>e.indexOf(t,n)===n},lf.MaskedEnum=kf,lf.MaskedFunction=class extends yf{updateOptions(e){super.updateOptions(e)}_update(e){super._update({...e,validate:e.mask})}};class Af extends yf{constructor(e){super({...Af.DEFAULTS,...e})}updateOptions(e){super.updateOptions(e)}_update(e){super._update(e),this._updateRegExps()}_updateRegExps(){const e="^"+(this.allowNegative?"[+|\\-]?":""),t=(this.scale?"("+rf(this.radix)+"\\d{0,"+this.scale+"})?":"")+"$";this._numberRegExp=new RegExp(e+"\\d*"+t),this._mapToRadixRegExp=new RegExp("["+this.mapToRadix.map(rf).join("")+"]","g"),this._thousandsSeparatorRegExp=new RegExp(rf(this.thousandsSeparator),"g")}_removeThousandsSeparators(e){return e.replace(this._thousandsSeparatorRegExp,"")}_insertThousandsSeparators(e){const t=e.split(this.radix);return t[0]=t[0].replace(/\B(?=(\d{3})+(?!\d))/g,this.thousandsSeparator),t.join(this.radix)}doPrepareChar(e,t){void 0===t&&(t={});const[n,r]=super.doPrepareChar(this._removeThousandsSeparators(this.scale&&this.mapToRadix.length&&(t.input&&t.raw||!t.input&&!t.raw)?e.replace(this._mapToRadixRegExp,this.radix):e),t);return e&&!n&&(r.skip=!0),!n||this.allowPositive||this.value||"-"===n||r.aggregate(this._appendChar("-")),[n,r]}_separatorsCount(e,t){void 0===t&&(t=!1);let n=0;for(let r=0;r0&&this.number>this.max&&(e=this.max),null!=e&&(this.autofix?(this._value=this.format(e,this).replace(Af.UNMASKED_RADIX,this.radix),s||(s=o===this._value&&!t.tail)):l=!1),l&&(l=Boolean(this._value.match(this._numberRegExp)))}l?i=new vf({inserted:this._value.slice(o.length),rawInserted:s?"":e,skip:s}):(this._value=o,i=new vf),this._value=this._insertThousandsSeparators(this._value);const u=t.tail&&t._beforeTailState?t._beforeTailState._value:this._value,c=this._separatorsCountFromSlice(u);return i.tailShift+=(c-r)*this.thousandsSeparator.length,i}_findSeparatorAround(e){if(this.thousandsSeparator){const t=e-this.thousandsSeparator.length+1,n=this.value.indexOf(this.thousandsSeparator,t);if(n<=e)return n}return-1}_adjustRangeWithSeparators(e,t){const n=this._findSeparatorAround(e);n>=0&&(e=n);const r=this._findSeparatorAround(t);return r>=0&&(t=r+this.thousandsSeparator.length),[e,t]}remove(e,t){void 0===e&&(e=0),void 0===t&&(t=this.displayValue.length),[e,t]=this._adjustRangeWithSeparators(e,t);const n=this.value.slice(0,e),r=this.value.slice(t),o=this._separatorsCount(n.length);this._value=this._insertThousandsSeparators(this._removeThousandsSeparators(n+r));const a=this._separatorsCountFromSlice(n);return new vf({tailShift:(a-o)*this.thousandsSeparator.length})}nearestInputPos(e,t){if(!this.thousandsSeparator)return e;switch(t){case Xc:case Qc:case ef:{const n=this._findSeparatorAround(e-1);if(n>=0){const r=n+this.thousandsSeparator.length;if(e=0)return t+this.thousandsSeparator.length}}return e}doCommit(){if(this.value){const e=this.number;let t=e;null!=this.min&&(t=Math.max(t,this.min)),null!=this.max&&(t=Math.min(t,this.max)),t!==e&&(this.unmaskedValue=this.format(t,this));let n=this.value;this.normalizeZeros&&(n=this._normalizeZeros(n)),this.padFractionalZeros&&this.scale>0&&(n=this._padFractionalZeros(n)),this._value=n}super.doCommit()}_normalizeZeros(e){const t=this._removeThousandsSeparators(e).split(this.radix);return t[0]=t[0].replace(/^(\D*)(0*)(\d*)/,((e,t,n,r)=>t+r)),e.length&&!/\d$/.test(t[0])&&(t[0]=t[0]+"0"),t.length>1&&(t[1]=t[1].replace(/0*$/,""),t[1].length||(t.length=1)),this._insertThousandsSeparators(t.join(this.radix))}_padFractionalZeros(e){if(!e)return e;const t=e.split(this.radix);return t.length<2&&t.push(""),t[1]=t[1].padEnd(this.scale,"0"),t.join(this.radix)}doSkipInvalid(e,t,n){void 0===t&&(t={});const r=0===this.scale&&e!==this.thousandsSeparator&&(e===this.radix||e===Af.UNMASKED_RADIX||this.mapToRadix.includes(e));return super.doSkipInvalid(e,t,n)&&!r}get unmaskedValue(){return this._removeThousandsSeparators(this._normalizeZeros(this.value)).replace(this.radix,Af.UNMASKED_RADIX)}set unmaskedValue(e){super.unmaskedValue=e}get typedValue(){return this.parse(this.unmaskedValue,this)}set typedValue(e){this.rawInputValue=this.format(e,this).replace(Af.UNMASKED_RADIX,this.radix)}get number(){return this.typedValue}set number(e){this.typedValue=e}get allowNegative(){return null!=this.min&&this.min<0||null!=this.max&&this.max<0}get allowPositive(){return null!=this.min&&this.min>0||null!=this.max&&this.max>0}typedValueEquals(e){return(super.typedValueEquals(e)||Af.EMPTY_VALUES.includes(e)&&Af.EMPTY_VALUES.includes(this.typedValue))&&!(0===e&&""===this.value)}}Pf=Af,Af.UNMASKED_RADIX=".",Af.EMPTY_VALUES=[...yf.EMPTY_VALUES,0],Af.DEFAULTS={...yf.DEFAULTS,mask:Number,radix:",",thousandsSeparator:"",mapToRadix:[Pf.UNMASKED_RADIX],min:Number.MIN_SAFE_INTEGER,max:Number.MAX_SAFE_INTEGER,scale:2,normalizeZeros:!0,padFractionalZeros:!1,parse:Number,format:e=>e.toLocaleString("en-US",{useGrouping:!1,maximumFractionDigits:20})},lf.MaskedNumber=Af;const _f={MASKED:"value",UNMASKED:"unmaskedValue",TYPED:"typedValue"};function jf(e,t,n){void 0===t&&(t=_f.MASKED),void 0===n&&(n=_f.MASKED);const r=cf(e);return e=>r.runIsolated((r=>(r[t]=e,r[n])))}lf.PIPE_TYPE=_f,lf.createPipe=jf,lf.pipe=function(e,t,n,r){return jf(t,n,r)(e)},lf.RepeatBlock=class extends Ef{get repeatFrom(){var e;return null!=(e=Array.isArray(this.repeat)?this.repeat[0]:this.repeat===1/0?0:this.repeat)?e:0}get repeatTo(){var e;return null!=(e=Array.isArray(this.repeat)?this.repeat[1]:this.repeat)?e:1/0}constructor(e){super(e)}updateOptions(e){super.updateOptions(e)}_update(e){var t,n,r;const{repeat:o,...a}=uf(e);this._blockOpts=Object.assign({},this._blockOpts,a);const i=cf(this._blockOpts);this.repeat=null!=(t=null!=(n=null!=o?o:i.repeat)?n:this.repeat)?t:1/0,super._update({mask:"m".repeat(Math.max(this.repeatTo===1/0&&(null==(r=this._blocks)?void 0:r.length)||0,this.repeatFrom)),blocks:{m:i},eager:i.eager,overwrite:i.overwrite,skipInvalid:i.skipInvalid,lazy:i.lazy,placeholderChar:i.placeholderChar,displayChar:i.displayChar})}_allocateBlock(e){return e"value"!==e)),Nf=["value","unmask","onAccept","onComplete","inputRef"],Mf=Rf.filter((e=>Nf.indexOf(e)<0)),Df=function(e){var t;const n=((t=class extends r.Component{constructor(e){super(e),this._inputRef=this._inputRef.bind(this)}componentDidMount(){this.props.mask&&this.initMask()}componentDidUpdate(){const e=this.props,t=this._extractMaskOptionsFromProps(e);var n;t.mask?this.maskRef?(this.maskRef.updateOptions(t),"value"in e&&void 0!==e.value&&(this.maskValue=e.value)):this.initMask(t):(this.destroyMask(),"value"in e&&void 0!==e.value&&(null!=(n=this.element)&&n.isContentEditable&&"INPUT"!==this.element.tagName&&"TEXTAREA"!==this.element.tagName?this.element.textContent=e.value:this.element.value=e.value))}componentWillUnmount(){this.destroyMask()}_inputRef(e){this.element=e,this.props.inputRef&&(Object.prototype.hasOwnProperty.call(this.props.inputRef,"current")?this.props.inputRef.current=e:this.props.inputRef(e))}initMask(e){void 0===e&&(e=this._extractMaskOptionsFromProps(this.props)),this.maskRef=lf(this.element,e).on("accept",this._onAccept.bind(this)).on("complete",this._onComplete.bind(this)),"value"in this.props&&void 0!==this.props.value&&(this.maskValue=this.props.value)}destroyMask(){this.maskRef&&(this.maskRef.destroy(),delete this.maskRef)}_extractMaskOptionsFromProps(e){const{...t}=e;return Object.keys(t).filter((e=>Mf.indexOf(e)<0)).forEach((e=>{delete t[e]})),t}_extractNonMaskProps(e){const{...t}=e;return Rf.forEach((e=>{"maxLength"!==e&&delete t[e]})),"defaultValue"in t||(t.defaultValue=e.mask?"":t.value),delete t.value,t}get maskValue(){return this.maskRef?"typed"===this.props.unmask?this.maskRef.typedValue:this.props.unmask?this.maskRef.unmaskedValue:this.maskRef.value:""}set maskValue(e){this.maskRef&&(e=null==e&&"typed"!==this.props.unmask?"":e,"typed"===this.props.unmask?this.maskRef.typedValue=e:this.props.unmask?this.maskRef.unmaskedValue=e:this.maskRef.value=e)}_onAccept(e){this.props.onAccept&&this.maskRef&&this.props.onAccept(this.maskValue,this.maskRef,e)}_onComplete(e){this.props.onComplete&&this.maskRef&&this.props.onComplete(this.maskValue,this.maskRef,e)}render(){return r.createElement(e,{...this._extractNonMaskProps(this.props),inputRef:this._inputRef})}}).displayName=void 0,t.propTypes=void 0,t),o=e.displayName||e.name||"Component";return n.displayName="IMask("+o+")",n.propTypes=If,r.forwardRef(((e,t)=>r.createElement(n,{...e,ref:t})))}((e=>{let{inputRef:t,...n}=e;return r.createElement("input",{...n,ref:t})})),Lf=r.forwardRef(((e,t)=>r.createElement(Df,{...e,ref:t})));function Bf(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,a,i,l=[],s=!0,u=!1;try{if(a=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;s=!1}else for(;!(s=(r=a.call(n)).done)&&(l.push(r.value),l.length!==t);s=!0);}catch(e){u=!0,o=e}finally{try{if(!s&&null!=n.return&&(i=n.return(),Object(i)!==i))return}finally{if(u)throw o}}return l}}(e,t)||Ff(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 Ff(e,t){if(e){if("string"==typeof e)return zf(e,t);var n=Object.prototype.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)?zf(e,t):void 0}}function zf(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n0&&void 0!==arguments[0]?arguments[0]:{};return Object.entries(e).reduce((function(e,t){var n=Bf(t,2),r=n[0],o=n[1];return void 0!==o&&(e[r]=o),e}),{})},Uf=function(){for(var e=arguments.length,t=new Array(e),n=0;ne.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,md),u=l()(s.className,"pgn__form-text","pgn__form-text-".concat(n),{"text-muted":a});return r.createElement("div",vd({},s,{className:u}),i&&r.createElement(yd,{customIcon:o,type:n}),r.createElement("div",null,t))}yd.propTypes={type:a().oneOf(Object.values(qf)),customIcon:a().node},yd.defaultProps={type:void 0,customIcon:void 0},bd.propTypes={children:a().node.isRequired,className:a().string,hasIcon:a().bool,type:a().oneOf(["default","valid","invalid","warning","criteria-empty","criteria-valid","criteria-invalid"]),icon:a().node,muted:a().bool},bd.defaultProps={hasIcon:!0,type:"default",icon:void 0,className:void 0,muted:!1};const wd=bd;var Sd=["children"];function Od(){return Od=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,Sd),o=td(),a=o.getDescriptorProps,i=o.isInvalid,s=o.isValid,u=a(n),c=l()("pgn__form-control-description",n.className),f=n.type||function(e){return e.isValid?qf.VALID:e.isInvalid?qf.INVALID:qf.DEFAULT}({isInvalid:i,isValid:s});return r.createElement(wd,Od({},u,{className:c,type:f}),t)}Ed.propTypes={children:a().node.isRequired,className:a().string,hasIcon:a().bool,type:a().oneOf(["default","valid","invalid","warning","criteria-empty","criteria-valid","criteria-invalid"]),icon:a().node,muted:a().bool},Ed.defaultProps={hasIcon:!0,type:void 0,icon:void 0,className:void 0,muted:!1};const xd=Ed;function Cd(e){var t=e.children,n=td().controlId;return r.createElement("div",{className:"pgn__form-control-floating-label"},r.createElement("div",{className:"pgn__form-control-floating-label-content"},r.createElement("label",{className:"pgn__form-control-floating-label-text",htmlFor:n},t)))}Cd.propTypes={children:a().node.isRequired};const Td=Cd;function kd(e){var t=e.children,n=e.location;return r.createElement("div",{className:"pgn__form-control-decorator pgn__form-control-decorator-".concat(n)},t)}kd.propTypes={children:a().node.isRequired,location:a().oneOf(["leading","trailing"])},kd.defaultProps={location:"leading"};const Pd=kd;var Ad=["children","leadingElement","trailingElement","floatingLabel","className"];function _d(){return _d=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,Ad),u=td(),c=s.size||u.size;return r.createElement("div",_d({className:l()("pgn__form-control-decorator-group",{"has-prepended-node":!!n,"has-appended-node":!!o,"has-leading-element":!!n,"has-trailing-element":!!o,"has-floating-label":!!a,"pgn__form-control-decorator-group-lg":c===Kf,"pgn__form-control-decorator-group-sm":c===Vf},i)},s),t,n&&r.createElement(Pd,{location:"leading"},n),o&&r.createElement(Pd,{location:"trailing"},o),a&&r.createElement(Td,null,a))}jd.propTypes={children:a().node.isRequired,leadingElement:a().node,trailingElement:a().node,floatingLabel:a().node,className:a().string,size:a().oneOf([Vf,Kf])},jd.defaultProps={leadingElement:void 0,trailingElement:void 0,floatingLabel:void 0,className:void 0,size:void 0};const Id=jd;function Rd(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var Ud=r.forwardRef((function(e,t){var n,o,a,i,s,u,c=e.as,f=e.className,d=e.controlClassName,p=e.leadingElement,h=e.trailingElement,m=e.floatingLabel,v=e.autoResize,g=e.onChange,y=e.inputMask,b=Gd(e,Md),w=td(),S=w.isInvalid,O=w.isValid,E=w.getControlProps,x=Gd(w,Dd),C=r.useRef(),T=t||C,k=b.size||x.size,P=function(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,a,i,l=[],s=!0,u=!1;try{if(a=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;s=!1}else for(;!(s=(r=a.call(n)).done)&&(l.push(r.value),l.length!==t);s=!0);}catch(e){u=!0,o=e}finally{try{if(!s&&null!=n.return&&(i=n.return(),Object(i)!==i))return}finally{if(u)throw o}}return l}}(e,t)||function(e,t){if(e){if("string"==typeof e)return Rd(e,t);var n=Object.prototype.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)?Rd(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.")}()}((o=(n={defaultValue:b.defaultValue,value:b.value}).defaultValue,a=n.value,s=(i=Bf((0,r.useState)(!!o||0===o),2))[0],u=i[1],[!!a||0===a||s,function(e){return u(e.target.value)}]),2),A=P[0],_=P[1],j=(0,r.useCallback)((function(){"textarea"===c&&v&&(T.current.initialHeight||T.current.offsets||(T.current.initialHeight=T.current.offsetHeight,T.current.offsets=T.current.offsetHeight-T.current.clientHeight),T.current.style.height="".concat(T.current.initialHeight,"px"),T.current.style.height="".concat(T.current.scrollHeight+T.current.offsets,"px"))}),[c,v,T]);(0,r.useEffect)((function(){j()}),[j]);var I=E(Fd(Fd({},b),{},{onBlur:Uf(_,b.onBlur)}));return r.createElement(Id,{size:k,leadingElement:p,trailingElement:h,floatingLabel:m,className:f},r.createElement(Rc,Ld({as:y?Lf:c,ref:T,size:k,isInvalid:S,isValid:O,className:l()(d,{"has-value":A}),onChange:function(e){j(),g&&g(e)},mask:y},I)))}));Ud.Feedback=xd,Ud.Description=xd,Ud.propTypes={className:a().string,as:a().elementType,onChange:a().func,defaultValue:a().oneOfType([a().string,a().number]),value:a().oneOfType([a().string,a().number]),id:a().string,controlClassName:a().string,size:a().oneOf(["sm","lg"]),leadingElement:a().node,trailingElement:a().node,floatingLabel:a().node,plaintext:a().bool,isValid:a().bool,isInvalid:a().bool,autoResize:a().bool,inputMask:a().string},Ud.defaultProps={as:"input",className:void 0,id:void 0,controlClassName:void 0,onChange:void 0,defaultValue:void 0,value:void 0,size:void 0,leadingElement:void 0,trailingElement:void 0,floatingLabel:void 0,plaintext:!1,isValid:void 0,isInvalid:void 0,autoResize:!1,inputMask:void 0};const Hd=Ud;function Vd(e){return Vd="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},Vd(e)}var Kd=["children","isInline"];function qd(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 Wd(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,Kd),a=td(),i=a.size,s=a.isControlGroup,u=a.getLabelProps,c=l()("pgn__form-label",{"pgn__form-label-inline":n,"pgn__form-label-lg":i===Kf,"pgn__form-label-sm":i===Vf},o.className),f=u(Wd(Wd({},o),{},{className:c})),d=s?"p":"label";return r.createElement(d,f,t)}Zd.propTypes={className:a().string,children:a().node.isRequired,isInline:a().bool,size:a().oneOf(["sm","lg"])},Zd.defaultProps={isInline:!1,size:void 0,className:void 0};const Yd=Zd;function Jd(e){return Jd="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},Jd(e)}var Xd=["children","controlId","isInvalid","isValid","size","as"];function Qd(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 ep(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,Xd);return r.createElement(s,ep(ep({},u),{},{className:l()("pgn__form-group",u.className)}),r.createElement(rd,{controlId:n,isInvalid:o,isValid:a,size:i},t))}np.propTypes={children:a().node.isRequired,className:a().string,as:a().elementType,controlId:a().string,isInvalid:a().bool,isValid:a().bool,size:a().oneOf(["sm","lg"])},np.defaultProps={as:"div",className:void 0,controlId:void 0,isInvalid:!1,isValid:!1,size:void 0};const rp=np;function op(e){return op="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},op(e)}function ap(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 ip(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,pp);return r.createElement(rd,{controlId:f.id,isInvalid:u,isValid:c},r.createElement("div",{className:l()("pgn__form-radio",o,{"pgn__form-control-valid":c,"pgn__form-control-invalid":u,"pgn__form-control-disabled":f.disabled})},r.createElement(yp,hp({ref:t,className:a},f)),r.createElement("div",null,r.createElement(Yd,{className:i},n),s&&r.createElement(xd,{hasIcon:!1},s))))}));bp.propTypes={id:a().string,children:a().node.isRequired,className:a().string,controlClassName:a().string,labelClassName:a().string,description:a().node,isInvalid:a().bool,isValid:a().bool,disabled:a().bool},bp.defaultProps={id:void 0,className:void 0,controlClassName:void 0,labelClassName:void 0,description:void 0,isInvalid:!1,isValid:!1,disabled:!1};const wp=bp;function Sp(e){return Sp="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},Sp(e)}var Op=["as","className","isInline","children"];function Ep(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 xp(e,t,n){return(t=function(e){var t=function(e,t){if("object"!==Sp(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!==Sp(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"===Sp(t)?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Cp(e){var t=e.as,n=e.className,o=e.isInline,a=e.children,i=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},a=Object.keys(e);for(r=0;r=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,Op);return r.createElement(t,function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,kp),f=td(),d=f.getControlProps;(0,f.useSetIsControlGroupEffect)(!0);var p=d(c);return r.createElement(cp,{name:n,value:o,defaultValue:a,onFocus:s,onBlur:u,onChange:l},r.createElement(Tp,Pp({role:"radiogroup",isInline:i},p),t))}Ap.propTypes={children:a().node.isRequired,className:a().string,name:a().string.isRequired,value:a().string,defaultValue:a().string,isInline:a().bool,onChange:a().func,onFocus:a().func,onBlur:a().func},Ap.defaultProps={className:void 0,value:void 0,defaultValue:void 0,isInline:!1,onChange:void 0,onFocus:void 0,onBlur:void 0};const _p=Ap,jp={randomUUID:"undefined"!=typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};let Ip;const Rp=new Uint8Array(16);function Np(){if(!Ip&&(Ip="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!Ip))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Ip(Rp)}const Mp=[];for(let e=0;e<256;++e)Mp.push((e+256).toString(16).slice(1));const Dp=function(e,t,n){if(jp.randomUUID&&!t&&!e)return jp.randomUUID();const r=(e=e||{}).random||(e.rng||Np)();if(r[6]=15&r[6]|64,r[8]=63&r[8]|128,t){n=n||0;for(let e=0;e<16;++e)t[n+e]=r[e];return t}return function(e,t=0){return Mp[e[t+0]]+Mp[e[t+1]]+Mp[e[t+2]]+Mp[e[t+3]]+"-"+Mp[e[t+4]]+Mp[e[t+5]]+"-"+Mp[e[t+6]]+Mp[e[t+7]]+"-"+Mp[e[t+8]]+Mp[e[t+9]]+"-"+Mp[e[t+10]]+Mp[e[t+11]]+Mp[e[t+12]]+Mp[e[t+13]]+Mp[e[t+14]]+Mp[e[t+15]]}(r)};function Lp(){return Lp=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,Kp)),{},{className:l()("pgn__spinner",n),role:o?"status":void 0});return r.createElement(Hp,qp({},a,{ref:t}),o&&r.createElement("span",{className:"sr-only"},o))}));Yp.propTypes={className:a().string,screenReaderText:a().node},Yp.defaultProps={className:void 0,screenReaderText:void 0};const Jp=Yp;function Xp(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);ne.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function dh(e){var t=e.children,n=e.arrowKeyNavigationSelector,o=e.ignoredArrowKeysNames,a=e.screenReaderText,i=e.value,l=e.isLoading,s=e.errorMessageText,u=e.onChange,c=e.onSelected,f=e.helpMessage,d=fh(e,ah),p=(0,Gr.A)(),h=(0,r.useRef)(),m=eh({selectors:n,ignoredKeys:o}),v=nh((0,r.useState)(!0),2),g=v[0],y=v[1],b=nh((0,r.useState)(!1),2),w=b[0],S=b[1],O=nh((0,r.useState)({displayValue:i||"",errorMessage:"",dropDownItems:[]}),2),E=O[0],x=O[1],C=nh((0,r.useState)(null),2),T=C[0],k=C[1];function P(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",n=r.Children.map(t,(function(e){var t=e.props,n=t.children,o=t.onClick,a=fh(t,ih),l=Dp();return r.cloneElement(e,uh(uh({},a),{},{children:n,"data-value":n,onClick:function(e){return function(e,t){var n=e.currentTarget.getAttribute("data-value");c&&n!==i&&c(n),x((function(e){return uh(uh({},e),{},{dropDownItems:[],displayValue:n})})),y(!0),t&&t(e)}(e,o)},id:l,onFocus:function(){return function(e){k(e)}(l)}}))}));return e.length>0&&(n=n.filter((function(t){return t.props.children.toLowerCase().includes(e.toLowerCase())}))),n}var A=r.createElement(vi,{className:"pgn__form-autosuggest__icon-button","data-testid":"autosuggest-iconbutton",tabindex:"-1",src:g?Bp:zp,iconAs:Je.A,size:"sm",variant:"secondary",alt:g?p.formatMessage(th.iconButtonOpened):p.formatMessage(th.iconButtonClosed),onClick:function(e){return function(){y(!g);var e={dropDownItems:[]};g&&(S(!0),e.dropDownItems=P(E.displayValue),e.errorMessage=""),x((function(t){return uh(uh({},t),e)}))}()}}),_=function(){S(!1),x((function(e){return uh(uh({},e),{},{dropDownItems:[],errorMessage:E.displayValue?"":s})})),y(!0)},j=function(e){m.current&&!m.current.contains(e.target)&&w&&_()},I=function(e){"Escape"===e.key&&w&&(e.preventDefault(),h&&h.current.focus(),x((function(e){return uh(uh({},e),{},{dropDownItems:[]})})),y(!0)),"Tab"===e.key&&w&&_()};(0,r.useEffect)((function(){return document.addEventListener("keydown",I),document.addEventListener("click",j,!0),function(){document.removeEventListener("click",j,!0),document.removeEventListener("keydown",I)}})),(0,r.useEffect)((function(){(i||""===i)&&x((function(e){return uh(uh({},e),{},{displayValue:i})}))}),[i]);var R=(0,td().getControlProps)(d);return r.createElement("div",{className:"pgn__form-autosuggest__wrapper",ref:m},r.createElement("div",{"aria-live":"assertive",className:"sr-only","data-testid":"autosuggest-screen-reader-options-count"},"".concat(E.dropDownItems.length," options found")),r.createElement(rd,{controlId:R.id,isInvalid:!!E.errorMessage},r.createElement(Hd,lh({ref:h,"aria-expanded":(E.dropDownItems.length>0).toString(),"aria-owns":"pgn__form-autosuggest__dropdown-box",role:"combobox","aria-autocomplete":"list",autoComplete:"off",value:E.displayValue,"aria-invalid":E.errorMessage,"aria-activedescendant":T,onChange:function(e){var n=e.target.value;if(u&&u(n),n.length){var r=P(n);x((function(e){return uh(uh({},e),{},{dropDownItems:r,errorMessage:""})})),y(!1)}else x((function(e){return uh(uh({},e),{},{dropDownItems:[]})})),y(!0);!function(e){var n=[];t.forEach((function(e){n.push(e.props.children)}));var r=e.toLowerCase(),o=n.find((function(e){return e.toLowerCase()===r}));x((function(t){return uh(uh({},t),{},{displayValue:o||e})}))}(e.target.value)},onClick:function(e){S(!0);var t=P(e.target.value);t.length>1&&(x((function(e){return uh(uh({},e),{},{dropDownItems:t,errorMessage:""})})),y(!1))},trailingElement:A,"data-testid":"autosuggest-textbox-input"},R)),f&&!E.errorMessage&&r.createElement(xd,{type:"default"},f),E.errorMessage&&r.createElement(xd,{type:"invalid","feedback-for":R.name},s)),r.createElement("ul",{id:"pgn__form-autosuggest__dropdown-box",className:"pgn__form-autosuggest__dropdown",role:"listbox"},l?r.createElement("div",{className:"pgn__form-autosuggest__dropdown-loading"},r.createElement(Jp,{animation:"border",variant:"dark",screenReaderText:a,"data-testid":"autosuggest-loading-spinner"})):E.dropDownItems.length>0&&E.dropDownItems))}dh.defaultProps={arrowKeyNavigationSelector:"a:not(:disabled),li:not(:disabled, .btn-icon),input:not(:disabled)",ignoredArrowKeysNames:["ArrowRight","ArrowLeft"],isLoading:!1,className:null,floatingLabel:null,onChange:null,onSelected:null,helpMessage:"",placeholder:"",value:null,errorMessageText:null,readOnly:!1,children:null,name:"form-autosuggest",screenReaderText:"loading"},dh.propTypes={arrowKeyNavigationSelector:a().string,ignoredArrowKeysNames:a().arrayOf(a().string),isLoading:a().bool,className:a().string,floatingLabel:a().string,onChange:a().func,helpMessage:a().string,placeholder:a().string,value:a().string,errorMessageText:a().string,name:a().string,readOnly:a().bool,children:a().node,screenReaderText:a().string,onSelected:a().func};const ph=dh;function hh(e){return hh="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},hh(e)}var mh=["as","children","defaultSelected","iconAfter","iconBefore"];function vh(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 gh(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,mh),s=l()(i.className,"pgn__menu-item");return r.createElement(t,gh(gh({},i),{},{className:s}),r.createElement(r.Fragment,null,a&&r.createElement(Je.A,{className:"btn-icon-before",src:a}),r.createElement("span",{className:"pgn__menu-item-text"},n),r.createElement("span",{className:"pgn__menu-item-content-spacer"}),o&&r.createElement(Je.A,{className:"btn-icon-after",src:o})))}bh.propTypes={defaultSelected:a().bool,className:a().string,children:a().node,as:a().elementType,iconBefore:a().oneOfType([a().element,a().elementType]),iconAfter:a().oneOfType([a().element,a().elementType])},bh.defaultProps={defaultSelected:!1,as:"button",className:void 0,children:null,iconBefore:void 0,iconAfter:void 0};const wh=bh;var Sh=["children","className","onClick"];function Oh(){return Oh=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,Sh);return r.createElement(wh,Oh({as:"li","data-testid":"autosuggest-optionitem",role:"option",tabIndex:"-1",onClick:o,className:l()(n,"dropdown-item")},a),t)}Eh.defaultProps={className:null,children:null,onClick:null},Eh.propTypes={className:a().string,children:a().string,onClick:a().func};const xh=Eh;function Ch(e){return Ch="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},Ch(e)}function Th(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 kh(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var zh=r.forwardRef((function(e,t){var n=e.isIndeterminate,o=Fh(e,Rh),a=_h(),i=a.getCheckboxControlProps,s=a.hasCheckboxSetProvider,u=r.useRef(),c=t||u,f=(0,td().getControlProps)(Lh(Lh({},o),{},{className:l()("pgn__form-checkbox-input",o.className)}));return s&&(f=i(f)),r.useEffect((function(){c.current&&(c.current.indeterminate=n)}),[c,n]),r.createElement("input",Mh({type:"checkbox"},f,{ref:c}))}));zh.propTypes={isIndeterminate:a().bool,className:a().string},zh.defaultProps={isIndeterminate:!1,className:void 0};var Gh=r.forwardRef((function(e,t){var n=e.children,o=e.className,a=e.controlClassName,i=e.labelClassName,s=e.description,u=e.isInvalid,c=e.isValid,f=e.controlAs,d=e.floatLabelLeft,p=Fh(e,Nh),h=_h().hasCheckboxSetProvider,m=td(),v=m.hasFormGroupProvider,g=m.useSetIsControlGroupEffect,y=m.getControlProps;g(!0);var b=v&&!h?Lh(Lh({},y({})),{},{role:"group"}):{},w=r.createElement(f,Lh(Lh({},p),{},{className:a,ref:t}));return r.createElement(rd,{controlId:p.id,isInvalid:u,isValid:c},r.createElement("div",Mh({className:l()("pgn__form-checkbox",o,{"pgn__form-control-valid":c,"pgn__form-control-invalid":u,"pgn__form-control-disabled":p.disabled,"pgn__form-control-label-left":!!d})},b),w,r.createElement("div",null,r.createElement(Yd,{className:i},n),s&&r.createElement(xd,{hasIcon:!1},s))))}));Gh.propTypes={id:a().string,children:a().node.isRequired,className:a().string,controlClassName:a().string,labelClassName:a().string,description:a().node,isInvalid:a().bool,isValid:a().bool,controlAs:a().elementType,floatLabelLeft:a().bool,disabled:a().bool},Gh.defaultProps={id:void 0,className:void 0,controlClassName:void 0,labelClassName:void 0,description:void 0,isInvalid:!1,isValid:!1,controlAs:zh,floatLabelLeft:!1,disabled:!1};const Uh=Gh;function Hh(e){return Hh="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},Hh(e)}var Vh=["isIndeterminate"],Kh=["children","className","helperText"];function qh(){return qh=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var Jh=r.forwardRef((function(e,t){var n=e.isIndeterminate,o=Yh(e,Vh),a=r.useRef(),i=t||a,s=(0,td().getControlProps)($h($h({},o),{},{className:l()("pgn__form-switch-input",o.className)}));return r.useEffect((function(){i.current&&(i.current.indeterminate=n)}),[i,n]),r.createElement("input",qh({type:"checkbox"},s,{ref:i}))}));Jh.propTypes={isIndeterminate:a().bool,className:a().string},Jh.defaultProps={isIndeterminate:!1,className:void 0};var Xh=r.forwardRef((function(e,t){var n=e.children,o=e.className,a=e.helperText,i=Yh(e,Kh);return r.createElement("div",{className:"d-inline-flex flex-column"},r.createElement(Uh,qh({className:l()("pgn__form-switch",o)},i,{role:"switch",ref:t,controlAs:Jh,isValid:null,isInvalid:null,description:null}),n),a&&r.createElement("div",{className:"pgn__form-switch-helper-text"},a))}));Xh.propTypes={children:a().node.isRequired,className:a().string,labelClassName:a().string,helperText:a().node,floatLabelLeft:a().bool},Xh.defaultProps={className:void 0,labelClassName:void 0,helperText:void 0,floatLabelLeft:!1};const Qh=Xh;var em=["children","name","value","defaultValue","isInline","onChange","onFocus","onBlur"];function tm(){return tm=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,em),f=td(),d=f.getControlProps;(0,f.useSetIsControlGroupEffect)(!0);var p=d(c);return r.createElement(jh,{name:n,value:o,defaultValue:a,onFocus:s,onBlur:u,onChange:l},r.createElement(Tp,tm({role:"group",isInline:i},p),t))}nm.propTypes={children:a().node.isRequired,className:a().string,name:a().string.isRequired,value:a().arrayOf(a().string),defaultValue:a().arrayOf(a().string),isInline:a().bool,onChange:a().func,onFocus:a().func,onBlur:a().func},nm.defaultProps={className:void 0,value:void 0,defaultValue:void 0,isInline:!1,onChange:void 0,onFocus:void 0,onBlur:void 0};const rm=nm,om=rm;$c.Control=Hd,$c.Radio=wp,$c.RadioSet=_p,$c.Autosuggest=ph,$c.AutosuggestOption=xh,$c.Checkbox=Uh,$c.CheckboxSet=rm,$c.Switch=Qh,$c.SwitchSet=om,$c.Label=Yd,$c.Group=rp,$c.Text=wd;const am=$c;function im(e){return function(e){if(Array.isArray(e))return sm(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||lm(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 lm(e,t){if(e){if("string"==typeof e)return sm(e,t);var n=Object.prototype.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)?sm(e,t):void 0}}function sm(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n0&&void 0!==arguments[0]?arguments[0]:[],t=function(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,a,i,l=[],s=!0,u=!1;try{if(a=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;s=!1}else for(;!(s=(r=a.call(n)).done)&&(l.push(r.value),l.length!==t);s=!0);}catch(e){u=!0,o=e}finally{try{if(!s&&null!=n.return&&(i=n.return(),Object(i)!==i))return}finally{if(u)throw o}}return l}}(e,t)||lm(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.")}()}((0,r.useReducer)(um,e),2),n=t[0],o=t[1];return[n,{add:function(e){return o({type:"add",value:e})},remove:function(e){return o({type:"remove",value:e})},set:function(e){return o({type:"set",value:e})},clear:function(){return o({type:"clear"})}}]};var fm=["bsPrefix","size","hasValidation","className","as"],dm=Fe("input-group-append"),pm=Fe("input-group-prepend"),hm=Fe("input-group-text",{Component:"span"}),mm=r.forwardRef((function(e,t){var n=e.bsPrefix,o=e.size,a=e.hasValidation,i=e.className,s=e.as,u=void 0===s?"div":s,c=(0,H.A)(e,fm);return n=(0,X.oU)(n,"input-group"),r.createElement(u,(0,U.A)({ref:t},c,{className:l()(i,n,o&&n+"-"+o,a&&"has-validation")}))}));mm.displayName="InputGroup",mm.Text=hm,mm.Radio=function(e){return r.createElement(hm,null,r.createElement("input",(0,U.A)({type:"radio"},e)))},mm.Checkbox=function(e){return r.createElement(hm,null,r.createElement("input",(0,U.A)({type:"checkbox"},e)))},mm.Append=dm,mm.Prepend=pm;const vm=mm;var gm=n(7776);function ym(){return ym=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,wm);return"_blank"===u&&(v.rel=(o=v.rel)?(o.includes("noopener")||(o+=" noopener"),o.includes("noreferrer")||(o+=" noreferrer"),o):"noopener noreferrer",m&&(n=r.createElement("span",{className:"pgn__hyperlink__external-icon",title:d},r.createElement(Je.A,{src:bm,screenReaderText:f,style:{height:"1em",width:"1em"},"data-testid":"hyperlink-icon"})))),r.createElement("a",Sm({ref:t,className:l()("pgn__hyperlink","".concat(p,"-link"),{"standalone-link":!h,"inline-link":h},a),href:i,target:u,onClick:c},v),s,n)}));xm.defaultProps={className:void 0,target:"_self",onClick:function(){},externalLinkAlternativeText:Om,externalLinkTitle:Em,variant:"default",isInline:!1,showLaunchIcon:!0},xm.propTypes={destination:a().string.isRequired,children:a().node.isRequired,className:a().string,target:a().string,onClick:a().func,externalLinkAlternativeText:(0,gm.A)(a().string,(function(e){return"_blank"===e.target})),externalLinkTitle:(0,gm.A)(a().string,(function(e){return"_blank"===e.target})),variant:a().oneOf(["default","muted","brand"]),isInline:a().bool,showLaunchIcon:a().bool};const Cm=(0,S.A)(xm,"Hyperlink",{content:{deprType:S.J.MOVED,newName:"children"}});function Tm(e){var t=e.activeValue,n=e.onChange,o=e.children,a=(0,r.useMemo)((function(){return r.Children.map(o,(function(e){var o=e.props.value===t;return r.cloneElement(e,{onClick:function(){n(e.props.value)},isActive:o,"aria-selected":o,"data-testid":"icon-btn-val-".concat(e.props.value)})}))}),[o,t,n]);return r.createElement("div",{className:"pgn__icon-button-toggle__container"},a)}Tm.defaultProps={onChange:function(){},activeValue:void 0},Tm.propTypes={activeValue:a().string,onChange:a().func,children:a().node.isRequired};const km=Tm;var Pm=["bsPrefix","className","fluid","rounded","roundedCircle","thumbnail"],Am={bsPrefix:a().string,fluid:a().bool,rounded:a().bool,roundedCircle:a().bool,thumbnail:a().bool},_m=r.forwardRef((function(e,t){var n=e.bsPrefix,o=e.className,a=e.fluid,i=e.rounded,s=e.roundedCircle,u=e.thumbnail,c=(0,H.A)(e,Pm);n=(0,X.oU)(n,"img");var f=l()(a&&n+"-fluid",i&&"rounded",s&&"rounded-circle",u&&n+"-thumbnail");return r.createElement("img",(0,U.A)({ref:t},c,{className:l()(o,f)}))}));_m.displayName="Image",_m.defaultProps={fluid:!1,rounded:!1,roundedCircle:!1,thumbnail:!1};const jm=_m;var Im=["className"],Rm=r.forwardRef((function(e,t){var n=e.className,o=(0,H.A)(e,Im);return r.createElement(jm,(0,U.A)({ref:t},o,{className:l()(n,"figure-img")}))}));Rm.displayName="FigureImage",Rm.propTypes=Am,Rm.defaultProps={fluid:!0};const Nm=Rm,Mm=Fe("figure-caption",{Component:"figcaption"});var Dm=Fe("figure",{Component:"figure"});Dm.Image=Nm,Dm.Caption=Mm;const Lm=Dm;var Bm=n(9503),Fm=n.n(Bm),zm=n(2024),Gm=n.n(zm);function Um(e){return Um="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},Um(e)}var Hm=["to","cc","bcc","subject","body","children","target","onClick","externalLink","className"];function Vm(){return Vm=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,Hm),m=d.alternativeText,v=d.title,g=function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,nv),i=eh({selectors:n}),s=l()(a.className,"pgn__menu");return r.createElement(t,ov(ov({},a),{},{ref:i,className:s}),r.createElement(r.Fragment,null,o))}iv.propTypes={className:a().string,arrowKeyNavigationSelector:a().string,as:a().elementType,children:a().node},iv.defaultProps={className:void 0,arrowKeyNavigationSelector:"a:not(:disabled),button:not(:disabled),input:not(:disabled)",as:"div",children:null};const lv=iv;var sv=n(1635),uv="right-scroll-bar-position",cv="width-before-scroll-bar";function fv(e,t){return"function"==typeof e?e(t):e&&(e.current=t),e}var dv=new WeakMap;function pv(e,t){var n,o,a,i=(n=t||null,o=function(t){return e.forEach((function(e){return fv(e,t)}))},(a=(0,r.useState)((function(){return{value:n,callback:o,facade:{get current(){return a.value},set current(e){var t=a.value;t!==e&&(a.value=e,a.callback(e,t))}}}}))[0]).callback=o,a.facade);return r.useLayoutEffect((function(){var t=dv.get(i);if(t){var n=new Set(t),r=new Set(e),o=i.current;n.forEach((function(e){r.has(e)||fv(e,null)})),r.forEach((function(e){n.has(e)||fv(e,o)}))}dv.set(i,e)}),[e]),i}function hv(e){return e}function mv(e,t){void 0===t&&(t=hv);var n=[],r=!1,o={read:function(){if(r)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(e){var o=t(e,r);return n.push(o),function(){n=n.filter((function(e){return e!==o}))}},assignSyncMedium:function(e){for(r=!0;n.length;){var t=n;n=[],t.forEach(e)}n={push:function(t){return e(t)},filter:function(){return n}}},assignMedium:function(e){r=!0;var t=[];if(n.length){var o=n;n=[],o.forEach(e),t=n}var a=function(){var n=t;t=[],n.forEach(e)},i=function(){return Promise.resolve().then(a)};i(),n={push:function(e){t.push(e),i()},filter:function(e){return t=t.filter(e),n}}}};return o}function vv(e,t){return void 0===t&&(t=hv),mv(e,t)}function gv(e){void 0===e&&(e={});var t=mv(null);return t.options=(0,sv.__assign)({async:!0,ssr:!1},e),t}var yv=gv(),bv=function(){},wv=r.forwardRef((function(e,t){var n=r.useRef(null),o=r.useState({onScrollCapture:bv,onWheelCapture:bv,onTouchMoveCapture:bv}),a=o[0],i=o[1],l=e.forwardProps,s=e.children,u=e.className,c=e.removeScrollBar,f=e.enabled,d=e.shards,p=e.sideCar,h=e.noIsolation,m=e.inert,v=e.allowPinchZoom,g=e.as,y=void 0===g?"div":g,b=e.gapMode,w=(0,sv.__rest)(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as","gapMode"]),S=p,O=pv([n,t]),E=(0,sv.__assign)((0,sv.__assign)({},w),a);return r.createElement(r.Fragment,null,f&&r.createElement(S,{sideCar:yv,removeScrollBar:c,shards:d,noIsolation:h,inert:m,setCallbacks:i,allowPinchZoom:!!v,lockRef:n,gapMode:b}),l?r.cloneElement(r.Children.only(s),(0,sv.__assign)((0,sv.__assign)({},E),{ref:O})):r.createElement(y,(0,sv.__assign)({},E,{className:u,ref:O}),s))}));wv.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},wv.classNames={fullWidth:cv,zeroRight:uv};var Sv="data-focus-lock",Ov="data-focus-lock-disabled",Ev={width:"1px",height:"0px",padding:0,overflow:"hidden",position:"fixed",top:"1px",left:"1px"},xv=vv({},(function(e){return{target:e.target,currentTarget:e.currentTarget}})),Cv=vv(),Tv=vv(),kv=gv({async:!0,ssr:"undefined"!=typeof document}),Pv=(0,r.createContext)(void 0),Av=[],_v=r.forwardRef((function(e,t){var n,o=r.useState(),a=o[0],i=o[1],l=r.useRef(),s=r.useRef(!1),u=r.useRef(null),c=r.useState({})[1],f=e.children,d=e.disabled,p=void 0!==d&&d,h=e.noFocusGuards,m=void 0!==h&&h,v=e.persistentFocus,g=void 0!==v&&v,y=e.crossFrame,b=void 0===y||y,w=e.autoFocus,S=void 0===w||w,O=(e.allowTextSelection,e.group),E=e.className,x=e.whiteList,C=e.hasPositiveIndices,T=e.shards,k=void 0===T?Av:T,P=e.as,A=void 0===P?"div":P,_=e.lockProps,j=void 0===_?{}:_,I=e.sideCar,R=e.returnFocus,N=void 0!==R&&R,M=e.focusOptions,D=e.onActivation,L=e.onDeactivation,B=r.useState({})[0],F=r.useCallback((function(e){var t=e.captureFocusRestore;if(!u.current){var n,r=null==(n=document)?void 0:n.activeElement;u.current=r,r!==document.body&&(u.current=t(r))}l.current&&D&&D(l.current),s.current=!0,c()}),[D]),z=r.useCallback((function(){s.current=!1,L&&L(l.current),c()}),[L]),G=r.useCallback((function(e){var t=u.current;if(t){var n=("function"==typeof t?t():t)||document.body,r="function"==typeof N?N(n):N;if(r){var o="object"==typeof r?r:void 0;u.current=null,e?Promise.resolve().then((function(){return n.focus(o)})):n.focus(o)}}}),[N]),H=r.useCallback((function(e){s.current&&xv.useMedium(e)}),[]),V=Cv.useMedium,K=r.useCallback((function(e){l.current!==e&&(l.current=e,i(e))}),[]),q=(0,U.A)(((n={})[Ov]=p&&"disabled",n[Sv]=O,n),j),W=!0!==m,$=W&&"tail"!==m,Z=pv([t,K]),Y=r.useMemo((function(){return{observed:l,shards:k,enabled:!p,active:s.current}}),[p,s.current,k,a]);return r.createElement(r.Fragment,null,W&&[r.createElement("div",{key:"guard-first","data-focus-guard":!0,tabIndex:p?-1:0,style:Ev}),C?r.createElement("div",{key:"guard-nearest","data-focus-guard":!0,tabIndex:p?-1:1,style:Ev}):null],!p&&r.createElement(I,{id:B,sideCar:kv,observed:a,disabled:p,persistentFocus:g,crossFrame:b,autoFocus:S,whiteList:x,shards:k,onActivation:F,onDeactivation:z,returnFocus:G,focusOptions:M}),r.createElement(A,(0,U.A)({ref:Z},q,{className:E,onBlur:V,onFocus:H}),r.createElement(Pv.Provider,{value:Y},f)),$&&r.createElement("div",{"data-focus-guard":!0,tabIndex:p?-1:0,style:Ev}))}));_v.propTypes={};const jv=_v;var Iv=gv(),Rv="data-focus-on-hidden",Nv={preventScroll:!0},Mv=r.forwardRef((function(e,t){var n=r.useState(!1),o=n[0],a=n[1],i=e.children,l=e.autoFocus,s=e.shards,u=e.crossFrame,c=e.enabled,f=void 0===c||c,d=e.scrollLock,p=void 0===d||d,h=e.focusLock,m=void 0===h||h,v=e.returnFocus,g=void 0===v||v,y=e.inert,b=e.allowPinchZoom,w=e.sideCar,S=e.className,O=e.shouldIgnore,E=e.preventScrollOnFocus,x=e.style,C=e.as,T=e.gapMode,k=(0,sv.__rest)(e,["children","autoFocus","shards","crossFrame","enabled","scrollLock","focusLock","returnFocus","inert","allowPinchZoom","sideCar","className","shouldIgnore","preventScrollOnFocus","style","as","gapMode"]),P=w,A=o.onActivation,_=o.onDeactivation,j=(0,sv.__rest)(o,["onActivation","onDeactivation"]),I=(0,sv.__assign)((0,sv.__assign)({},j),{as:C,style:x,sideCar:w,shards:s,allowPinchZoom:b,gapMode:T,inert:y,enabled:f&&p});return r.createElement(r.Fragment,null,r.createElement(jv,{ref:t,sideCar:w,disabled:!(o&&f&&m),returnFocus:g,autoFocus:l,shards:s,crossFrame:u,onActivation:A,onDeactivation:_,className:S,whiteList:O,lockProps:I,focusOptions:E?Nv:void 0,as:wv},i),f&&r.createElement(P,(0,sv.__assign)({},k,{sideCar:Iv,setLockProps:a,shards:s})))})),Dv=function(e){var t=e.sideCar,n=(0,sv.__rest)(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var o=t.read();if(!o)throw new Error("Sidecar medium not found");return r.createElement(o,(0,sv.__assign)({},n))};function Lv(e,t){return e.useMedium(t),Dv}function Bv(e){return Bv="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},Bv(e)}Dv.isSideCarExport=!0;var Fv=function(e){for(var t=Array(e.length),n=0;n=0})).sort(Qv)},tg=["button:enabled","select:enabled","textarea:enabled","input:enabled","a[href]","area[href]","summary","iframe","object","embed","audio[controls]","video[controls]","[tabindex]","[contenteditable]","[autofocus]"].join(","),ng="".concat(tg,", [data-focus-guard]"),rg=function(e,t){return Fv((e.shadowRoot||e).children).reduce((function(e,n){return e.concat(n.matches(t?ng:tg)?[n]:[],rg(n))}),[])},og=function(e,t){return e.reduce((function(e,n){var r,o=rg(n,t),a=(r=[]).concat.apply(r,o.map((function(e){return function(e,t){var n;return e instanceof HTMLIFrameElement&&(null===(n=e.contentDocument)||void 0===n?void 0:n.body)?og([e.contentDocument.body],t):[e]}(e,t)})));return e.concat(a,n.parentNode?Fv(n.parentNode.querySelectorAll(tg)).filter((function(e){return e===n})):[])}),[])},ag=function(e,t){return Fv(e).filter((function(e){return Vv(t,e)})).filter((function(e){return function(e){return!((Wv(e)||function(e){return"BUTTON"===e.tagName}(e))&&("hidden"===e.type||e.disabled))}(e)}))},ig=function(e,t){return void 0===t&&(t=new Map),Fv(e).filter((function(e){return Kv(t,e)}))},lg=function(e,t,n){return eg(ag(og(e,n),t),!0,n)},sg=function(e,t){return eg(ag(og(e),t),!1)},ug=function(e,t){return e.shadowRoot?ug(e.shadowRoot,t):!(void 0===Object.getPrototypeOf(e).contains||!Object.getPrototypeOf(e).contains.call(e,t))||Fv(e.children).some((function(e){var n;if(e instanceof HTMLIFrameElement){var r=null===(n=e.contentDocument)||void 0===n?void 0:n.body;return!!r&&ug(r,t)}return ug(e,t)}))},cg=function(e){if(void 0===e&&(e=document),e&&e.activeElement){var t=e.activeElement;return t.shadowRoot?cg(t.shadowRoot):t instanceof HTMLIFrameElement&&function(e){try{return t.contentWindow.document}catch(e){return}}()?cg(t.contentWindow.document):t}},fg=function(e){return e.parentNode?fg(e.parentNode):e},dg=function(e){return zv(e).filter(Boolean).reduce((function(e,t){var n=t.getAttribute(Sv);return e.push.apply(e,n?function(e){for(var t=new Set,n=e.length,r=0;r0&&t.add(o),(a&Node.DOCUMENT_POSITION_CONTAINS)>0&&t.add(r)}return e.filter((function(e,n){return!t.has(n)}))}(Fv(fg(t).querySelectorAll("[".concat(Sv,'="').concat(n,'"]:not([').concat(Ov,'="disabled"])')))):[t]),e}),[])},pg=function(e,t){return void 0===t&&(t=cg(Gv(e).ownerDocument)),!(!t||t.dataset&&t.dataset.focusGuard)&&dg(e).some((function(e){return ug(e,t)||function(e,t){return Boolean(Fv(e.querySelectorAll("iframe")).some((function(e){return function(e,t){return e===t}(e,t)})))}(e,t)}))},hg=function(e,t){e&&("focus"in e&&e.focus(t),"contentWindow"in e&&e.contentWindow&&e.contentWindow.focus())},mg=function(e,t){return $v(e)&&e.name?function(e,t){return t.filter($v).filter((function(t){return t.name===e.name})).filter((function(e){return e.checked}))[0]||e}(e,t):e},vg=function(e){return e[0]&&e.length>1?mg(e[0],e):e[0]},gg=function(e,t){return e.indexOf(mg(t,e))},yg="NEW_FOCUS",bg=function(e,t,n){var r,o=e.map((function(e){return e.node})),a=ig(o.filter((r=n,function(e){var t,n=null===(t=qv(e))||void 0===t?void 0:t.autofocus;return e.autofocus||void 0!==n&&"false"!==n||r.indexOf(e)>=0})));return a&&a.length?vg(a):vg(ig(t))},wg=function(e,t){return void 0===t&&(t=[]),t.push(e),e.parentNode&&wg(e.parentNode.host||e.parentNode,t),t},Sg=function(e,t){for(var n=wg(e),r=wg(t),o=0;o=0)return a}return!1},Og=function(e,t,n){var r=zv(e),o=zv(t),a=r[0],i=!1;return o.filter(Boolean).forEach((function(e){i=Sg(i||e,e)||i,n.filter(Boolean).forEach((function(e){var t=Sg(a,e);t&&(i=!i||ug(t,i)?t:Sg(t,i))}))})),i},Eg=function(e,t){return e.reduce((function(e,n){return e.concat(function(e,t){return ag((n=e.querySelectorAll("[".concat("data-autofocus-inside","]")),Fv(n).map((function(e){return og([e])})).reduce((function(e,t){return e.concat(t)}),[])),t);var n}(n,t))}),[])},xg=function(e,t){var n=cg(zv(e).length>0?document:Gv(e).ownerDocument),r=dg(e).filter(Jv),o=Og(n||e,e,r),a=new Map,i=sg(r,a),l=i.filter((function(e){var t=e.node;return Jv(t)}));if(l[0]){var s,u,c,f=sg([o],a).map((function(e){return e.node})),d=(s=f,u=l,c=new Map,u.forEach((function(e){return c.set(e.node,e)})),s.map((function(e){return c.get(e)})).filter(Xv)),p=d.map((function(e){return e.node})),h=d.filter((function(e){return e.tabIndex>=0})).map((function(e){return e.node})),m=function(e,t,n,r,o){var a=e.length,i=e[0],l=e[a-1],s=Yv(r);if(!(r&&e.indexOf(r)>=0)){var u=void 0!==r?n.indexOf(r):-1,c=o?n.indexOf(o):u,f=o?e.indexOf(o):-1;if(-1===u)return-1!==f?f:yg;if(-1===f)return yg;var d,p,h=u-c,m=n.indexOf(i),v=n.indexOf(l),g=(d=n,p=new Set,d.forEach((function(e){return p.add(mg(e,d))})),d.filter((function(e){return p.has(e)}))),y=(void 0!==r?g.indexOf(r):-1)-(o?g.indexOf(o):u);if(!h&&f>=0)return f;if(0===t.length)return f;var b=gg(e,t[0]),w=gg(e,t[t.length-1]);return u<=m&&s&&Math.abs(h)>1?w:u>=v&&s&&Math.abs(h)>1?b:h&&Math.abs(y)>1?f:u<=m?w:u>v?b:h?Math.abs(h)>1?f:(a+f+h)%a:void 0}}(p,h,f,n,t);if(m===yg){var v=bg(i,h,Eg(r,a))||bg(i,p,Eg(r,a));return v?{node:v}:void console.warn("focus-lock: cannot find any node to move focus into")}return void 0===m?m:d[m]}},Cg=0,Tg=!1,kg=function(e,t,n){void 0===n&&(n={});var r=xg(e,t);if(!Tg&&r){if(Cg>2)return console.error("FocusLock: focus-fighting detected. Only one focus management system could be active. See https://github.com/theKashey/focus-lock/#focus-fighting"),Tg=!0,void setTimeout((function(){Tg=!1}),1);Cg++,hg(r.node,n.focusOptions),Cg--}},Pg=function(e,t,n){void 0===t&&(t={});var r=function(e){return Object.assign({scope:document.body,cycle:!0,onlyTabbable:!0},e)}(t),o=function(e,t,n){if(!e||!t)return console.error("no element or scope given"),{};var r=zv(t);if(r.every((function(t){return!ug(t,e)})))return console.error("Active element is not contained in the scope"),{};var o=n?lg(r,new Map):sg(r,new Map),a=o.findIndex((function(t){return t.node===e}));return-1!==a?{prev:o[a-1],next:o[a+1],first:o[0],last:o[o.length-1]}:void 0}(e,r.scope,r.onlyTabbable);if(o){var a=n(o,r.cycle);a&&hg(a.node,r.focusOptions)}},Ag=function(e,t,n){var r,o,a,i,l=(o=e,a=null===(r=t.onlyTabbable)||void 0===r||r,{first:(i=a?lg(zv(o),new Map):sg(zv(o),new Map))[0],last:i[i.length-1]})[n];l&&hg(l.node,t.focusOptions)};function _g(e){if(!e)return null;var t=e?new WeakRef(e):null;return function(){return(null==t?void 0:t.deref())||null}}function jg(e){setTimeout(e,1)}var Ig=function(e){return e&&"current"in e?e.current:e},Rg=null,Ng=null,Mg=null,Dg=!1,Lg=function(){return!0};function Bg(e,t,n,r){var o=null,a=e;do{var i=r[a];if(i.guard)i.node.dataset.focusAutoGuard&&(o=i);else{if(!i.lockItem)break;if(a!==e)return;o=null}}while((a+=n)!==t);o&&(o.node.tabIndex=0)}var Fg=function e(t,n,r){return n&&(n.host===t&&(!n.activeElement||r.contains(n.activeElement))||n.parentNode&&e(t,n.parentNode,r))},zg=function(){var e,t,n,r,o,a,i=!1;if(Rg){var l=Rg,s=l.observed,u=l.persistentFocus,c=l.autoFocus,f=l.shards,d=l.crossFrame,p=l.focusOptions,h=s||Mg&&Mg.portaledElement,m=document&&document.activeElement;if(h){var v=[h].concat(f.map(Ig).filter(Boolean));if(m&&!function(e){return(Rg.whiteList||Lg)(e)}(m)||(u||(d?Boolean(Dg):"meanwhile"===Dg)||!(document&&document.activeElement===document.body||function(e){void 0===e&&(e=document);var t=cg(e);return!!t&&Fv(e.querySelectorAll("[".concat("data-no-focus-lock","]"))).some((function(e){return ug(e,t)}))}())||!Ng&&c)&&(h&&!(pg(v)||m&&function(e,t){return t.some((function(t){return Fg(e,t,t)}))}(m,v)||(a=m,Mg&&Mg.portaledElement===a))&&(document&&!Ng&&m&&!c?(m.blur&&m.blur(),document.body.focus()):(i=kg(v,Ng,{focusOptions:p}),Mg={})),Dg=!1,Ng=document&&document.activeElement),document&&m!==document.activeElement&&document.querySelector("[data-focus-auto-guard]")){var g=document&&document.activeElement,y=(t=dg(e=v).filter(Jv),n=Og(e,e,t),r=eg(og([n],!0),!0,!0),o=og(t,!1),r.map((function(e){var t=e.node;return{node:t,index:e.index,lockItem:o.indexOf(t)>=0,guard:Yv(t)}}))),b=y.map((function(e){return e.node})).indexOf(g);b>-1&&(y.filter((function(e){var t=e.guard,n=e.node;return t&&n.dataset.focusAutoGuard})).forEach((function(e){return e.node.removeAttribute("tabIndex")})),Bg(b,y.length,1,y),Bg(b,-1,-1,y))}}}return i},Gg=function(e){zg()&&e&&(e.stopPropagation(),e.preventDefault())},Ug=function(){return jg(zg)},Hg=function(){Dg="just",jg((function(){Dg="meanwhile"}))},Vg={moveFocusInside:kg,focusInside:pg,focusNextElement:function(e,t){void 0===t&&(t={}),Pg(e,t,(function(e,t){var n=e.next,r=e.first;return n||t&&r}))},focusPrevElement:function(e,t){void 0===t&&(t={}),Pg(e,t,(function(e,t){var n=e.prev,r=e.last;return n||t&&r}))},focusFirstElement:function(e,t){void 0===t&&(t={}),Ag(e,t,"first")},focusLastElement:function(e,t){void 0===t&&(t={}),Ag(e,t,"last")},captureFocusRestore:function(e){var t=function(e){if(!e)return null;for(var t=[],n=e;n&&n!==document.body;)t.push({current:_g(n),parent:_g(n.parentElement),left:_g(n.previousElementSibling),right:_g(n.nextElementSibling)}),n=n.parentElement;return{element:_g(e),stack:t,ownerDocument:e.ownerDocument}}(e);return function(){return function(e){var t,n,r,o,a;if(e)for(var i=e.stack,l=e.ownerDocument,s=new Map,u=0,c=i;u