diff --git a/dist/assets/css/popup.css b/dist/assets/css/popup.css index 619cbde..0dc77cb 100644 --- a/dist/assets/css/popup.css +++ b/dist/assets/css/popup.css @@ -2011,1540 +2011,1540 @@ border-width: 0 .25em .25rem; } -.p-grid { - display: -webkit-box; - display: -ms-flexbox; - display: flex; - -ms-flex-wrap: wrap; - flex-wrap: wrap; - margin-right: -0.5rem; - margin-left: -0.5rem; - margin-top: -0.5rem; +@font-face { + font-family: 'primeicons'; + font-display: auto; + src: url('./fonts/primeicons.eot'); + src: url('./fonts/primeicons.eot?#iefix') format('embedded-opentype'), url('./fonts/primeicons.ttf') format('truetype'), url('./fonts/primeicons.woff') format('woff'), url('./fonts/primeicons.svg?#primeicons') format('svg'); + font-weight: normal; + font-style: normal; } -.p-grid > .p-col,.p-grid > [class*=p-col] { - -webkit-box-sizing: border-box; - -moz-box-sizing: border-box; - box-sizing: border-box; +.pi { + font-family: 'primeicons'; + speak: none; + font-style: normal; + font-weight: normal; + font-variant: normal; + text-transform: none; + line-height: 1; + display: inline-block; + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; } -.p-col { - -webkit-box-flex: 1; - -ms-flex-positive: 1; - flex-grow: 1; - -ms-flex-preferred-size: 0; - flex-basis: 0; - padding: 0.5rem; +.pi:before { + --webkit-backface-visibility: hidden; + backface-visibility: hidden; } -.p-col-1,.p-col-2,.p-col-3,.p-col-4,.p-col-5,.p-col-6,.p-col-7,.p-col-8,.p-col-9,.p-col-10,.p-col-11,.p-col-12 { - -webkit-box-flex: 0; - -ms-flex: 0 0 auto; - flex: 0 0 auto; - padding: 0.5rem; +.pi-spin { + -webkit-animation: fa-spin 2s infinite linear; + animation: fa-spin 2s infinite linear; } -.p-col-1 { - width: 8.3333%; -} +@-webkit-keyframes fa-spin { + 0% { + -webkit-transform: rotate(0deg); + transform: rotate(0deg); + } -.p-col-2 { - width: 16.6667%; + 100% { + -webkit-transform: rotate(359deg); + transform: rotate(359deg); + } } -.p-col-3 { - width: 25%; -} +@keyframes fa-spin { + 0% { + -webkit-transform: rotate(0deg); + transform: rotate(0deg); + } -.p-col-4 { - width: 33.3333%; + 100% { + -webkit-transform: rotate(359deg); + transform: rotate(359deg); + } } -.p-col-5 { - width: 41.6667%; +.pi-send:before { + content: "\e9ca"; } -.p-col-6 { - width: 50%; +.pi-slack:before { + content: "\e9c9"; } -.p-col-7 { - width: 58.3333%; +.pi-sun:before { + content: "\e9c8"; } -.p-col-8 { - width: 66.6667%; +.pi-moon:before { + content: "\e9c7"; } -.p-col-9 { - width: 75%; +.pi-vimeo:before { + content: "\e9c6"; } -.p-col-10 { - width: 83.3333%; +.pi-youtube:before { + content: "\e9c5"; } -.p-col-11 { - width: 91.6667%; +.pi-flag:before { + content: "\e9c4"; } -.p-col-12 { - width: 100%; +.pi-wallet:before { + content: "\e9c3"; } -.p-offset-12 { - margin-left: 100%; +.pi-map:before { + content: "\e9c2"; } -.p-offset-11 { - margin-left: 91.66666667%; +.pi-link:before { + content: "\e9c1"; } -.p-offset-10 { - margin-left: 83.33333333%; +.pi-credit-card:before { + content: "\e9bf"; } -.p-offset-9 { - margin-left: 75%; +.pi-discord:before { + content: "\e9c0"; } -.p-offset-8 { - margin-left: 66.66666667%; +.pi-percentage:before { + content: "\e9be"; } -.p-offset-7 { - margin-left: 58.33333333%; +.pi-book:before { + content: "\e9ba"; } -.p-offset-6 { - margin-left: 50%; +.pi-shield:before { + content: "\e9b9"; } -.p-offset-5 { - margin-left: 41.66666667%; +.pi-paypal:before { + content: "\e9bb"; } -.p-offset-4 { - margin-left: 33.33333333%; +.pi-amazon:before { + content: "\e9bc"; } -.p-offset-3 { - margin-left: 25%; +.pi-phone:before { + content: "\e9b8"; } -.p-offset-2 { - margin-left: 16.66666667%; +.pi-filter-slash:before { + content: "\e9b7"; } -.p-offset-1 { - margin-left: 8.33333333%; +.pi-facebook:before { + content: "\e9b4"; } -.p-offset-0 { - margin-left: 0%; +.pi-github:before { + content: "\e9b5"; } -.p-justify-start { - -webkit-box-pack: start; - -ms-flex-pack: start; - justify-content: flex-start; +.pi-twitter:before { + content: "\e9b6"; } -.p-justify-end { - -webkit-box-pack: end; - -ms-flex-pack: end; - justify-content: flex-end; +.pi-step-backward-alt:before { + content: "\e9ac"; } -.p-justify-center { - -webkit-box-pack: center; - -ms-flex-pack: center; - justify-content: center; +.pi-step-forward-alt:before { + content: "\e9ad"; } -.p-align-start { - -webkit-box-align: start; - -ms-flex-align: start; - align-items: flex-start; +.pi-forward:before { + content: "\e9ae"; } -.p-align-end { - -webkit-box-align: end; - -ms-flex-align: end; - align-items: flex-end; +.pi-backward:before { + content: "\e9af"; } -.p-align-center { - -webkit-box-align: center; - -ms-flex-align: center; - align-items: center; +.pi-fast-backward:before { + content: "\e9b0"; } -.p-align-baseline { - -webkit-box-align: baseline; - -ms-flex-align: baseline; - align-items: baseline; +.pi-fast-forward:before { + content: "\e9b1"; } -.p-col-align-start { - -ms-flex-item-align: start; - align-self: flex-start; +.pi-pause:before { + content: "\e9b2"; } -.p-col-align-end { - -ms-flex-item-align: end; - align-self: flex-end; +.pi-play:before { + content: "\e9b3"; } -.p-col-align-center { - -ms-flex-item-align: center; - -ms-grid-row-align: center; - align-self: center; +.pi-compass:before { + content: "\e9ab"; } -.p-col-align-baseline { - -ms-flex-item-align: baseline; - align-self: baseline; +.pi-id-card:before { + content: "\e9aa"; } -.p-col-order-0 { - -ms-flex-order: 0; - order: 0; +.pi-ticket:before { + content: "\e9a9"; } -.p-col-order-1 { - -ms-flex-order: 1; - order: 1; +.pi-file-o:before { + content: "\e9a8"; } -.p-col-order-2 { - -ms-flex-order: 2; - order: 2; +.pi-reply:before { + content: "\e9a7"; } -.p-col-order-3 { - -ms-flex-order: 3; - order: 3; +.pi-directions-alt:before { + content: "\e9a5"; } -.p-col-order-4 { - -ms-flex-order: 4; - order: 4; +.pi-directions:before { + content: "\e9a6"; } -.p-col-order-5 { - -ms-flex-order: 5; - order: 5; +.pi-thumbs-up:before { + content: "\e9a3"; } -.p-col-order-6 { - -ms-flex-order: 6; - order: 6; +.pi-thumbs-down:before { + content: "\e9a4"; } -.p-col-order-7 { - -ms-flex-order: 7; - order: 7; +.pi-sort-numeric-down-alt:before { + content: "\e996"; } -.p-col-order-8 { - -ms-flex-order: 8; - order: 8; +.pi-sort-numeric-up-alt:before { + content: "\e997"; } -.p-col-order-9 { - -ms-flex-order: 9; - order: 9; +.pi-sort-alpha-down-alt:before { + content: "\e998"; } -.p-col-order-10 { - -ms-flex-order: 10; - order: 10; +.pi-sort-alpha-up-alt:before { + content: "\e999"; } -.p-col-order-11 { - -ms-flex-order: 11; - order: 11; +.pi-sort-numeric-down:before { + content: "\e99a"; } -.p-col-order-12 { - -ms-flex-order: 12; - order: 12; +.pi-sort-numeric-up:before { + content: "\e99b"; } -.p-field { - margin-bottom: 1rem; +.pi-sort-alpha-down:before { + content: "\e99c"; } -.p-field > label { - display: inline-block; - margin-bottom: 0.5rem; +.pi-sort-alpha-up:before { + content: "\e99d"; } -.p-field.p-grid > label { - display: flex; - align-items: center; +.pi-sort-alt:before { + content: "\e99e"; } -.p-field.p-grid { - margin-top: 0; +.pi-sort-amount-up:before { + content: "\e99f"; } -.p-field.p-grid .p-col,.p-field.p-grid .p-col-1,.p-field.p-grid .p-col-2,.p-field.p-grid .p-col-3,.p-field.p-grid .p-col-4,.p-field.p-grid .p-col-5,.p-field.p-grid .p-col-6,.p-field.p-grid .p-col-7,.p-field.p-grid .p-col-8,.p-field.p-grid .p-col-9,.p-field.p-grid .p-col-10,.p-field.p-grid .p-col-11,.p-field.p-grid .p-col-12 { - padding-top: 0; - padding-bottom: 0; +.pi-sort-amount-down:before { + content: "\e9a0"; } -.p-d-none { - display: none !important; +.pi-sort-amount-down-alt:before { + content: "\e9a1"; } -.p-d-block { - display: block !important; +.pi-sort-amount-up-alt:before { + content: "\e9a2"; } -.p-d-flex { - display: flex !important; +.pi-palette:before { + content: "\e995"; } -@media print { - .p-d-print-none { - display: none !important; - } - - .p-d-print-block { - display: block !important; - } +.pi-undo:before { + content: "\e994"; +} - .p-d-print-flex { - display: flex !important; - } +.pi-desktop:before { + content: "\e993"; } -.p-text-justify { - text-align: justify !important; +.pi-sliders-v:before { + content: "\e991"; } -.p-text-left { - text-align: left !important; +.pi-sliders-h:before { + content: "\e992"; } -.p-text-right { - text-align: right !important; +.pi-search-plus:before { + content: "\e98f"; } -.p-text-center { - text-align: center !important; +.pi-search-minus:before { + content: "\e990"; } -.p-text-nowrap { - white-space: nowrap !important; +.pi-file-excel:before { + content: "\e98e"; } -.p-text-bold { - font-weight: 700 !important; +.pi-file-pdf:before { + content: "\e98d"; } -.p-text-normal { - font-weight: 400 !important; +.pi-check-square:before { + content: "\e98c"; } -.p-jc-start { - justify-content: flex-start; +.pi-chart-line:before { + content: "\e98b"; } -.p-jc-end { - justify-content: flex-end; +.pi-user-edit:before { + content: "\e98a"; } -.p-jc-center { - justify-content: center; +.pi-exclamation-circle:before { + content: "\e989"; } -.p-ai-start { - align-items: flex-start; +.pi-android:before { + content: "\e985"; } -.p-ai-end { - align-items: flex-end; +.pi-google:before { + content: "\e986"; } -.p-ai-center { - align-items: center; +.pi-apple:before { + content: "\e987"; } -.p-ai-baseline { - align-items: baseline; +.pi-microsoft:before { + content: "\e988"; } -.p-as-start { - align-self: start; +.pi-heart:before { + content: "\e984"; } -.p-as-end { - align-self: flex-end; +.pi-mobile:before { + content: "\e982"; } -.p-as-center { - align-self: center; +.pi-tablet:before { + content: "\e983"; } -.p-as-baseline { - align-self: baseline; +.pi-key:before { + content: "\e981"; } -.p-order-0 { - order: 0; +.pi-shopping-cart:before { + content: "\e980"; } -.p-order-1 { - order: 1; +.pi-comments:before { + content: "\e97e"; } -.p-order-2 { - order: 2; +.pi-comment:before { + content: "\e97f"; } -.p-order-3 { - order: 3; +.pi-briefcase:before { + content: "\e97d"; } -.p-order-4 { - order: 4; +.pi-bell:before { + content: "\e97c"; } -.p-order-5 { - order: 5; +.pi-paperclip:before { + content: "\e97b"; } -.p-order-6 { - order: 6; +.pi-share-alt:before { + content: "\e97a"; } -.p-flex-nowrap { - flex-wrap: nowrap; +.pi-envelope:before { + content: "\e979"; } -.p-pt-0 { - padding-top: 0 !important; +.pi-volume-down:before { + content: "\e976"; } -.p-pt-1 { - padding-top: 0.25rem !important; +.pi-volume-up:before { + content: "\e977"; } -.p-pt-2 { - padding-top: 0.5rem !important; +.pi-volume-off:before { + content: "\e978"; } -.p-pt-3 { - padding-top: 1rem !important; +.pi-eject:before { + content: "\e975"; } -.p-pt-4 { - padding-top: 1.5rem !important; +.pi-money-bill:before { + content: "\e974"; } -.p-pt-5 { - padding-top: 2rem !important; +.pi-images:before { + content: "\e973"; } -.p-pt-6 { - padding-top: 3rem !important; +.pi-image:before { + content: "\e972"; } -.p-pr-0 { - padding-right: 0 !important; +.pi-sign-in:before { + content: "\e970"; } -.p-pr-1 { - padding-right: 0.25rem !important; +.pi-sign-out:before { + content: "\e971"; } -.p-pr-2 { - padding-right: 0.5rem !important; +.pi-wifi:before { + content: "\e96f"; } -.p-pr-3 { - padding-right: 1rem !important; +.pi-sitemap:before { + content: "\e96e"; } -.p-pr-4 { - padding-right: 1.5rem !important; +.pi-chart-bar:before { + content: "\e96d"; } -.p-pr-5 { - padding-right: 2rem !important; +.pi-camera:before { + content: "\e96c"; } -.p-pr-6 { - padding-right: 3rem !important; +.pi-dollar:before { + content: "\e96b"; } -.p-px-0 { - padding-left: 0 !important; - padding-right: 0 !important; +.pi-lock-open:before { + content: "\e96a"; } -.p-px-1 { - padding-left: 0.25rem !important; - padding-right: 0.25rem !important; +.pi-table:before { + content: "\e969"; } -.p-px-2 { - padding-left: 0.5rem !important; - padding-right: 0.5rem !important; +.pi-map-marker:before { + content: "\e968"; } -.p-px-3 { - padding-left: 1rem !important; - padding-right: 1rem !important; +.pi-list:before { + content: "\e967"; } -.p-px-4 { - padding-left: 1.5rem !important; - padding-right: 1.5rem !important; +.pi-eye-slash:before { + content: "\e965"; } -.p-px-5 { - padding-left: 2rem !important; - padding-right: 2rem !important; +.pi-eye:before { + content: "\e966"; } -.p-px-6 { - padding-left: 3rem !important; - padding-right: 3rem !important; +.pi-folder-open:before { + content: "\e964"; } -.p-p-0 { - padding: 0 !important; +.pi-folder:before { + content: "\e963"; } -.p-p-1 { - padding: 0.25rem !important; +.pi-video:before { + content: "\e962"; } -.p-p-2 { - padding: 0.5rem !important; +.pi-inbox:before { + content: "\e961"; } -.p-p-3 { - padding: 1rem !important; +.pi-lock:before { + content: "\e95f"; } -.p-p-4 { - padding: 1.5rem !important; +.pi-unlock:before { + content: "\e960"; } -.p-p-5 { - padding: 2rem !important; +.pi-tags:before { + content: "\e95d"; } -.p-p-6 { - padding: 3rem !important; +.pi-tag:before { + content: "\e95e"; } -.p-mt-0 { - margin-top: 0 !important; +.pi-power-off:before { + content: "\e95c"; } -.p-mt-1 { - margin-top: 0.25rem !important; +.pi-save:before { + content: "\e95b"; } -.p-mt-2 { - margin-top: 0.5rem !important; +.pi-question-circle:before { + content: "\e959"; } -.p-mt-3 { - margin-top: 1rem !important; +.pi-question:before { + content: "\e95a"; } -.p-mt-4 { - margin-top: 1.5rem !important; +.pi-copy:before { + content: "\e957"; } -.p-mt-5 { - margin-top: 2rem !important; +.pi-file:before { + content: "\e958"; } -.p-mt-6 { - margin-top: 3rem !important; +.pi-clone:before { + content: "\e955"; } -.p-mt-auto { - margin-top: auto !important; +.pi-calendar-times:before { + content: "\e952"; } -.p-mr-0 { - margin-right: 0 !important; +.pi-calendar-minus:before { + content: "\e953"; } -.p-mr-1 { - margin-right: 0.25rem !important; +.pi-calendar-plus:before { + content: "\e954"; } -.p-mr-2 { - margin-right: 0.5rem !important; +.pi-ellipsis-v:before { + content: "\e950"; } -.p-mr-3 { - margin-right: 1rem !important; +.pi-ellipsis-h:before { + content: "\e951"; } -.p-mr-4 { - margin-right: 1.5rem !important; +.pi-bookmark:before { + content: "\e94e"; } -.p-mr-5 { - margin-right: 2rem !important; +.pi-globe:before { + content: "\e94f"; } -.p-mr-6 { - margin-right: 3rem !important; +.pi-replay:before { + content: "\e94d"; } -.p-mr-auto { - margin-right: auto !important; +.pi-filter:before { + content: "\e94c"; } -.p-my-0 { - margin-top: 0 !important; - margin-bottom: 0 !important; +.pi-print:before { + content: "\e94b"; } -.p-my-1 { - margin-top: 0.25rem !important; - margin-bottom: 0.25rem !important; +.pi-align-right:before { + content: "\e946"; } -.p-my-2 { - margin-top: 0.5rem !important; - margin-bottom: 0.5rem !important; +.pi-align-left:before { + content: "\e947"; } -.p-my-3 { - margin-top: 1rem !important; - margin-bottom: 1rem !important; +.pi-align-center:before { + content: "\e948"; } -.p-my-4 { - margin-top: 1.5rem !important; - margin-bottom: 1.5rem !important; +.pi-align-justify:before { + content: "\e949"; } -.p-my-5 { - margin-top: 2rem !important; - margin-bottom: 2rem !important; +.pi-cog:before { + content: "\e94a"; } -.p-my-6 { - margin-top: 3rem !important; - margin-bottom: 3rem !important; +.pi-cloud-download:before { + content: "\e943"; } -.p-my-auto { - margin-top: auto !important; - margin-bottom: auto !important; +.pi-cloud-upload:before { + content: "\e944"; } -.p-m-0 { - margin: 0 !important; +.pi-cloud:before { + content: "\e945"; } -.p-m-1 { - margin: 0.25rem !important; +.pi-pencil:before { + content: "\e942"; } -.p-m-2 { - margin: 0.5rem !important; +.pi-users:before { + content: "\e941"; } -.p-m-3 { - margin: 1rem !important; +.pi-clock:before { + content: "\e940"; } -.p-m-4 { - margin: 1.5rem !important; +.pi-user-minus:before { + content: "\e93e"; } -.p-m-5 { - margin: 2rem !important; +.pi-user-plus:before { + content: "\e93f"; } -.p-m-6 { - margin: 3rem !important; +.pi-trash:before { + content: "\e93d"; } -.p-m-auto { - margin: auto !important; +.pi-external-link:before { + content: "\e93c"; } -/*# sourceMappingURL=primeflex.css.map */ +.pi-window-maximize:before { + content: "\e93b"; +} -@font-face { - font-family: 'primeicons'; - font-display: auto; - src: url('./fonts/primeicons.eot'); - src: url('./fonts/primeicons.eot?#iefix') format('embedded-opentype'), url('./fonts/primeicons.ttf') format('truetype'), url('./fonts/primeicons.woff') format('woff'), url('./fonts/primeicons.svg?#primeicons') format('svg'); - font-weight: normal; - font-style: normal; +.pi-window-minimize:before { + content: "\e93a"; } -.pi { - font-family: 'primeicons'; - speak: none; - font-style: normal; - font-weight: normal; - font-variant: normal; - text-transform: none; - line-height: 1; - display: inline-block; - -webkit-font-smoothing: antialiased; - -moz-osx-font-smoothing: grayscale; +.pi-refresh:before { + content: "\e938"; } -.pi:before { - --webkit-backface-visibility: hidden; - backface-visibility: hidden; +.pi-user:before { + content: "\e939"; } -.pi-spin { - -webkit-animation: fa-spin 2s infinite linear; - animation: fa-spin 2s infinite linear; +.pi-exclamation-triangle:before { + content: "\e922"; } -@-webkit-keyframes fa-spin { - 0% { - -webkit-transform: rotate(0deg); - transform: rotate(0deg); - } +.pi-calendar:before { + content: "\e927"; +} - 100% { - -webkit-transform: rotate(359deg); - transform: rotate(359deg); - } +.pi-chevron-circle-left:before { + content: "\e928"; } -@keyframes fa-spin { - 0% { - -webkit-transform: rotate(0deg); - transform: rotate(0deg); - } +.pi-chevron-circle-down:before { + content: "\e929"; +} - 100% { - -webkit-transform: rotate(359deg); - transform: rotate(359deg); - } +.pi-chevron-circle-right:before { + content: "\e92a"; } -.pi-send:before { - content: "\e9ca"; +.pi-chevron-circle-up:before { + content: "\e92b"; } -.pi-slack:before { - content: "\e9c9"; +.pi-angle-double-down:before { + content: "\e92c"; } -.pi-sun:before { - content: "\e9c8"; +.pi-angle-double-left:before { + content: "\e92d"; } -.pi-moon:before { - content: "\e9c7"; +.pi-angle-double-right:before { + content: "\e92e"; } -.pi-vimeo:before { - content: "\e9c6"; +.pi-angle-double-up:before { + content: "\e92f"; } -.pi-youtube:before { - content: "\e9c5"; +.pi-angle-down:before { + content: "\e930"; } -.pi-flag:before { - content: "\e9c4"; +.pi-angle-left:before { + content: "\e931"; } -.pi-wallet:before { - content: "\e9c3"; +.pi-angle-right:before { + content: "\e932"; } -.pi-map:before { - content: "\e9c2"; +.pi-angle-up:before { + content: "\e933"; } -.pi-link:before { - content: "\e9c1"; +.pi-upload:before { + content: "\e934"; } -.pi-credit-card:before { - content: "\e9bf"; +.pi-download:before { + content: "\e956"; } -.pi-discord:before { - content: "\e9c0"; +.pi-ban:before { + content: "\e935"; } -.pi-percentage:before { - content: "\e9be"; +.pi-star-o:before { + content: "\e936"; } -.pi-book:before { - content: "\e9ba"; +.pi-star:before { + content: "\e937"; } -.pi-shield:before { - content: "\e9b9"; +.pi-chevron-left:before { + content: "\e900"; } -.pi-paypal:before { - content: "\e9bb"; +.pi-chevron-right:before { + content: "\e901"; } -.pi-amazon:before { - content: "\e9bc"; +.pi-chevron-down:before { + content: "\e902"; } -.pi-phone:before { - content: "\e9b8"; +.pi-chevron-up:before { + content: "\e903"; } -.pi-filter-slash:before { - content: "\e9b7"; +.pi-caret-left:before { + content: "\e904"; } -.pi-facebook:before { - content: "\e9b4"; +.pi-caret-right:before { + content: "\e905"; } -.pi-github:before { - content: "\e9b5"; +.pi-caret-down:before { + content: "\e906"; } -.pi-twitter:before { - content: "\e9b6"; +.pi-caret-up:before { + content: "\e907"; } -.pi-step-backward-alt:before { - content: "\e9ac"; +.pi-search:before { + content: "\e908"; } -.pi-step-forward-alt:before { - content: "\e9ad"; +.pi-check:before { + content: "\e909"; } -.pi-forward:before { - content: "\e9ae"; +.pi-check-circle:before { + content: "\e90a"; } -.pi-backward:before { - content: "\e9af"; +.pi-times:before { + content: "\e90b"; } -.pi-fast-backward:before { - content: "\e9b0"; +.pi-times-circle:before { + content: "\e90c"; } -.pi-fast-forward:before { - content: "\e9b1"; +.pi-plus:before { + content: "\e90d"; } -.pi-pause:before { - content: "\e9b2"; +.pi-plus-circle:before { + content: "\e90e"; } -.pi-play:before { - content: "\e9b3"; +.pi-minus:before { + content: "\e90f"; } -.pi-compass:before { - content: "\e9ab"; +.pi-minus-circle:before { + content: "\e910"; } -.pi-id-card:before { - content: "\e9aa"; +.pi-circle-on:before { + content: "\e911"; } -.pi-ticket:before { - content: "\e9a9"; +.pi-circle-off:before { + content: "\e912"; } -.pi-file-o:before { - content: "\e9a8"; +.pi-sort-down:before { + content: "\e913"; } -.pi-reply:before { - content: "\e9a7"; +.pi-sort-up:before { + content: "\e914"; } -.pi-directions-alt:before { - content: "\e9a5"; +.pi-sort:before { + content: "\e915"; } -.pi-directions:before { - content: "\e9a6"; +.pi-step-backward:before { + content: "\e916"; } -.pi-thumbs-up:before { - content: "\e9a3"; +.pi-step-forward:before { + content: "\e917"; } -.pi-thumbs-down:before { - content: "\e9a4"; +.pi-th-large:before { + content: "\e918"; } -.pi-sort-numeric-down-alt:before { - content: "\e996"; +.pi-arrow-down:before { + content: "\e919"; } -.pi-sort-numeric-up-alt:before { - content: "\e997"; +.pi-arrow-left:before { + content: "\e91a"; } -.pi-sort-alpha-down-alt:before { - content: "\e998"; +.pi-arrow-right:before { + content: "\e91b"; } -.pi-sort-alpha-up-alt:before { - content: "\e999"; +.pi-arrow-up:before { + content: "\e91c"; } -.pi-sort-numeric-down:before { - content: "\e99a"; +.pi-bars:before { + content: "\e91d"; } -.pi-sort-numeric-up:before { - content: "\e99b"; +.pi-arrow-circle-down:before { + content: "\e91e"; } -.pi-sort-alpha-down:before { - content: "\e99c"; +.pi-arrow-circle-left:before { + content: "\e91f"; } -.pi-sort-alpha-up:before { - content: "\e99d"; +.pi-arrow-circle-right:before { + content: "\e920"; } -.pi-sort-alt:before { - content: "\e99e"; +.pi-arrow-circle-up:before { + content: "\e921"; } -.pi-sort-amount-up:before { - content: "\e99f"; +.pi-info:before { + content: "\e923"; } -.pi-sort-amount-down:before { - content: "\e9a0"; +.pi-info-circle:before { + content: "\e924"; } -.pi-sort-amount-down-alt:before { - content: "\e9a1"; +.pi-home:before { + content: "\e925"; } -.pi-sort-amount-up-alt:before { - content: "\e9a2"; +.pi-spinner:before { + content: "\e926"; } -.pi-palette:before { - content: "\e995"; +.p-grid { + display: -webkit-box; + display: -ms-flexbox; + display: flex; + -ms-flex-wrap: wrap; + flex-wrap: wrap; + margin-right: -0.5rem; + margin-left: -0.5rem; + margin-top: -0.5rem; } -.pi-undo:before { - content: "\e994"; +.p-grid > .p-col,.p-grid > [class*=p-col] { + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; } -.pi-desktop:before { - content: "\e993"; +.p-col { + -webkit-box-flex: 1; + -ms-flex-positive: 1; + flex-grow: 1; + -ms-flex-preferred-size: 0; + flex-basis: 0; + padding: 0.5rem; } -.pi-sliders-v:before { - content: "\e991"; +.p-col-1,.p-col-2,.p-col-3,.p-col-4,.p-col-5,.p-col-6,.p-col-7,.p-col-8,.p-col-9,.p-col-10,.p-col-11,.p-col-12 { + -webkit-box-flex: 0; + -ms-flex: 0 0 auto; + flex: 0 0 auto; + padding: 0.5rem; } -.pi-sliders-h:before { - content: "\e992"; +.p-col-1 { + width: 8.3333%; } -.pi-search-plus:before { - content: "\e98f"; +.p-col-2 { + width: 16.6667%; } -.pi-search-minus:before { - content: "\e990"; +.p-col-3 { + width: 25%; } -.pi-file-excel:before { - content: "\e98e"; +.p-col-4 { + width: 33.3333%; } -.pi-file-pdf:before { - content: "\e98d"; +.p-col-5 { + width: 41.6667%; } -.pi-check-square:before { - content: "\e98c"; +.p-col-6 { + width: 50%; } -.pi-chart-line:before { - content: "\e98b"; +.p-col-7 { + width: 58.3333%; } -.pi-user-edit:before { - content: "\e98a"; +.p-col-8 { + width: 66.6667%; } -.pi-exclamation-circle:before { - content: "\e989"; +.p-col-9 { + width: 75%; } -.pi-android:before { - content: "\e985"; +.p-col-10 { + width: 83.3333%; } -.pi-google:before { - content: "\e986"; +.p-col-11 { + width: 91.6667%; } -.pi-apple:before { - content: "\e987"; +.p-col-12 { + width: 100%; } -.pi-microsoft:before { - content: "\e988"; +.p-offset-12 { + margin-left: 100%; } -.pi-heart:before { - content: "\e984"; +.p-offset-11 { + margin-left: 91.66666667%; } -.pi-mobile:before { - content: "\e982"; +.p-offset-10 { + margin-left: 83.33333333%; } -.pi-tablet:before { - content: "\e983"; +.p-offset-9 { + margin-left: 75%; } -.pi-key:before { - content: "\e981"; +.p-offset-8 { + margin-left: 66.66666667%; } -.pi-shopping-cart:before { - content: "\e980"; +.p-offset-7 { + margin-left: 58.33333333%; } -.pi-comments:before { - content: "\e97e"; +.p-offset-6 { + margin-left: 50%; } -.pi-comment:before { - content: "\e97f"; +.p-offset-5 { + margin-left: 41.66666667%; } -.pi-briefcase:before { - content: "\e97d"; +.p-offset-4 { + margin-left: 33.33333333%; } -.pi-bell:before { - content: "\e97c"; +.p-offset-3 { + margin-left: 25%; } -.pi-paperclip:before { - content: "\e97b"; +.p-offset-2 { + margin-left: 16.66666667%; } -.pi-share-alt:before { - content: "\e97a"; +.p-offset-1 { + margin-left: 8.33333333%; } -.pi-envelope:before { - content: "\e979"; +.p-offset-0 { + margin-left: 0%; } -.pi-volume-down:before { - content: "\e976"; +.p-justify-start { + -webkit-box-pack: start; + -ms-flex-pack: start; + justify-content: flex-start; } -.pi-volume-up:before { - content: "\e977"; +.p-justify-end { + -webkit-box-pack: end; + -ms-flex-pack: end; + justify-content: flex-end; } -.pi-volume-off:before { - content: "\e978"; +.p-justify-center { + -webkit-box-pack: center; + -ms-flex-pack: center; + justify-content: center; } -.pi-eject:before { - content: "\e975"; +.p-align-start { + -webkit-box-align: start; + -ms-flex-align: start; + align-items: flex-start; } -.pi-money-bill:before { - content: "\e974"; +.p-align-end { + -webkit-box-align: end; + -ms-flex-align: end; + align-items: flex-end; } -.pi-images:before { - content: "\e973"; +.p-align-center { + -webkit-box-align: center; + -ms-flex-align: center; + align-items: center; } -.pi-image:before { - content: "\e972"; +.p-align-baseline { + -webkit-box-align: baseline; + -ms-flex-align: baseline; + align-items: baseline; } -.pi-sign-in:before { - content: "\e970"; +.p-col-align-start { + -ms-flex-item-align: start; + align-self: flex-start; } -.pi-sign-out:before { - content: "\e971"; +.p-col-align-end { + -ms-flex-item-align: end; + align-self: flex-end; } -.pi-wifi:before { - content: "\e96f"; +.p-col-align-center { + -ms-flex-item-align: center; + -ms-grid-row-align: center; + align-self: center; } -.pi-sitemap:before { - content: "\e96e"; +.p-col-align-baseline { + -ms-flex-item-align: baseline; + align-self: baseline; } -.pi-chart-bar:before { - content: "\e96d"; +.p-col-order-0 { + -ms-flex-order: 0; + order: 0; } -.pi-camera:before { - content: "\e96c"; +.p-col-order-1 { + -ms-flex-order: 1; + order: 1; } -.pi-dollar:before { - content: "\e96b"; +.p-col-order-2 { + -ms-flex-order: 2; + order: 2; } -.pi-lock-open:before { - content: "\e96a"; +.p-col-order-3 { + -ms-flex-order: 3; + order: 3; } -.pi-table:before { - content: "\e969"; +.p-col-order-4 { + -ms-flex-order: 4; + order: 4; } -.pi-map-marker:before { - content: "\e968"; +.p-col-order-5 { + -ms-flex-order: 5; + order: 5; } -.pi-list:before { - content: "\e967"; +.p-col-order-6 { + -ms-flex-order: 6; + order: 6; } -.pi-eye-slash:before { - content: "\e965"; +.p-col-order-7 { + -ms-flex-order: 7; + order: 7; } -.pi-eye:before { - content: "\e966"; +.p-col-order-8 { + -ms-flex-order: 8; + order: 8; } -.pi-folder-open:before { - content: "\e964"; +.p-col-order-9 { + -ms-flex-order: 9; + order: 9; } -.pi-folder:before { - content: "\e963"; +.p-col-order-10 { + -ms-flex-order: 10; + order: 10; } -.pi-video:before { - content: "\e962"; +.p-col-order-11 { + -ms-flex-order: 11; + order: 11; } -.pi-inbox:before { - content: "\e961"; +.p-col-order-12 { + -ms-flex-order: 12; + order: 12; } -.pi-lock:before { - content: "\e95f"; +.p-field { + margin-bottom: 1rem; } -.pi-unlock:before { - content: "\e960"; +.p-field > label { + display: inline-block; + margin-bottom: 0.5rem; } -.pi-tags:before { - content: "\e95d"; +.p-field.p-grid > label { + display: flex; + align-items: center; } -.pi-tag:before { - content: "\e95e"; +.p-field.p-grid { + margin-top: 0; } -.pi-power-off:before { - content: "\e95c"; +.p-field.p-grid .p-col,.p-field.p-grid .p-col-1,.p-field.p-grid .p-col-2,.p-field.p-grid .p-col-3,.p-field.p-grid .p-col-4,.p-field.p-grid .p-col-5,.p-field.p-grid .p-col-6,.p-field.p-grid .p-col-7,.p-field.p-grid .p-col-8,.p-field.p-grid .p-col-9,.p-field.p-grid .p-col-10,.p-field.p-grid .p-col-11,.p-field.p-grid .p-col-12 { + padding-top: 0; + padding-bottom: 0; } -.pi-save:before { - content: "\e95b"; +.p-d-none { + display: none !important; } -.pi-question-circle:before { - content: "\e959"; +.p-d-block { + display: block !important; } -.pi-question:before { - content: "\e95a"; +.p-d-flex { + display: flex !important; } -.pi-copy:before { - content: "\e957"; -} +@media print { + .p-d-print-none { + display: none !important; + } -.pi-file:before { - content: "\e958"; + .p-d-print-block { + display: block !important; + } + + .p-d-print-flex { + display: flex !important; + } } -.pi-clone:before { - content: "\e955"; +.p-text-justify { + text-align: justify !important; } -.pi-calendar-times:before { - content: "\e952"; +.p-text-left { + text-align: left !important; } -.pi-calendar-minus:before { - content: "\e953"; +.p-text-right { + text-align: right !important; } -.pi-calendar-plus:before { - content: "\e954"; +.p-text-center { + text-align: center !important; } -.pi-ellipsis-v:before { - content: "\e950"; +.p-text-nowrap { + white-space: nowrap !important; } -.pi-ellipsis-h:before { - content: "\e951"; +.p-text-bold { + font-weight: 700 !important; } -.pi-bookmark:before { - content: "\e94e"; +.p-text-normal { + font-weight: 400 !important; } -.pi-globe:before { - content: "\e94f"; +.p-jc-start { + justify-content: flex-start; } -.pi-replay:before { - content: "\e94d"; +.p-jc-end { + justify-content: flex-end; } -.pi-filter:before { - content: "\e94c"; +.p-jc-center { + justify-content: center; } -.pi-print:before { - content: "\e94b"; +.p-ai-start { + align-items: flex-start; } -.pi-align-right:before { - content: "\e946"; +.p-ai-end { + align-items: flex-end; } -.pi-align-left:before { - content: "\e947"; +.p-ai-center { + align-items: center; } -.pi-align-center:before { - content: "\e948"; +.p-ai-baseline { + align-items: baseline; } -.pi-align-justify:before { - content: "\e949"; +.p-as-start { + align-self: start; } -.pi-cog:before { - content: "\e94a"; +.p-as-end { + align-self: flex-end; } -.pi-cloud-download:before { - content: "\e943"; +.p-as-center { + align-self: center; } -.pi-cloud-upload:before { - content: "\e944"; +.p-as-baseline { + align-self: baseline; } -.pi-cloud:before { - content: "\e945"; +.p-order-0 { + order: 0; } -.pi-pencil:before { - content: "\e942"; +.p-order-1 { + order: 1; } -.pi-users:before { - content: "\e941"; +.p-order-2 { + order: 2; } -.pi-clock:before { - content: "\e940"; +.p-order-3 { + order: 3; } -.pi-user-minus:before { - content: "\e93e"; +.p-order-4 { + order: 4; } -.pi-user-plus:before { - content: "\e93f"; +.p-order-5 { + order: 5; } -.pi-trash:before { - content: "\e93d"; +.p-order-6 { + order: 6; } -.pi-external-link:before { - content: "\e93c"; +.p-flex-nowrap { + flex-wrap: nowrap; } -.pi-window-maximize:before { - content: "\e93b"; +.p-pt-0 { + padding-top: 0 !important; } -.pi-window-minimize:before { - content: "\e93a"; +.p-pt-1 { + padding-top: 0.25rem !important; } -.pi-refresh:before { - content: "\e938"; +.p-pt-2 { + padding-top: 0.5rem !important; } -.pi-user:before { - content: "\e939"; +.p-pt-3 { + padding-top: 1rem !important; } -.pi-exclamation-triangle:before { - content: "\e922"; +.p-pt-4 { + padding-top: 1.5rem !important; } -.pi-calendar:before { - content: "\e927"; +.p-pt-5 { + padding-top: 2rem !important; } -.pi-chevron-circle-left:before { - content: "\e928"; +.p-pt-6 { + padding-top: 3rem !important; } -.pi-chevron-circle-down:before { - content: "\e929"; +.p-pr-0 { + padding-right: 0 !important; } -.pi-chevron-circle-right:before { - content: "\e92a"; +.p-pr-1 { + padding-right: 0.25rem !important; } -.pi-chevron-circle-up:before { - content: "\e92b"; +.p-pr-2 { + padding-right: 0.5rem !important; } -.pi-angle-double-down:before { - content: "\e92c"; +.p-pr-3 { + padding-right: 1rem !important; } -.pi-angle-double-left:before { - content: "\e92d"; +.p-pr-4 { + padding-right: 1.5rem !important; } -.pi-angle-double-right:before { - content: "\e92e"; +.p-pr-5 { + padding-right: 2rem !important; } -.pi-angle-double-up:before { - content: "\e92f"; +.p-pr-6 { + padding-right: 3rem !important; } -.pi-angle-down:before { - content: "\e930"; +.p-px-0 { + padding-left: 0 !important; + padding-right: 0 !important; } -.pi-angle-left:before { - content: "\e931"; +.p-px-1 { + padding-left: 0.25rem !important; + padding-right: 0.25rem !important; } -.pi-angle-right:before { - content: "\e932"; +.p-px-2 { + padding-left: 0.5rem !important; + padding-right: 0.5rem !important; } -.pi-angle-up:before { - content: "\e933"; +.p-px-3 { + padding-left: 1rem !important; + padding-right: 1rem !important; } -.pi-upload:before { - content: "\e934"; +.p-px-4 { + padding-left: 1.5rem !important; + padding-right: 1.5rem !important; } -.pi-download:before { - content: "\e956"; +.p-px-5 { + padding-left: 2rem !important; + padding-right: 2rem !important; } -.pi-ban:before { - content: "\e935"; +.p-px-6 { + padding-left: 3rem !important; + padding-right: 3rem !important; } -.pi-star-o:before { - content: "\e936"; +.p-p-0 { + padding: 0 !important; } -.pi-star:before { - content: "\e937"; +.p-p-1 { + padding: 0.25rem !important; } -.pi-chevron-left:before { - content: "\e900"; +.p-p-2 { + padding: 0.5rem !important; } -.pi-chevron-right:before { - content: "\e901"; +.p-p-3 { + padding: 1rem !important; } -.pi-chevron-down:before { - content: "\e902"; +.p-p-4 { + padding: 1.5rem !important; } -.pi-chevron-up:before { - content: "\e903"; +.p-p-5 { + padding: 2rem !important; } -.pi-caret-left:before { - content: "\e904"; +.p-p-6 { + padding: 3rem !important; } -.pi-caret-right:before { - content: "\e905"; +.p-mt-0 { + margin-top: 0 !important; } -.pi-caret-down:before { - content: "\e906"; +.p-mt-1 { + margin-top: 0.25rem !important; } -.pi-caret-up:before { - content: "\e907"; +.p-mt-2 { + margin-top: 0.5rem !important; } -.pi-search:before { - content: "\e908"; +.p-mt-3 { + margin-top: 1rem !important; } -.pi-check:before { - content: "\e909"; +.p-mt-4 { + margin-top: 1.5rem !important; } -.pi-check-circle:before { - content: "\e90a"; +.p-mt-5 { + margin-top: 2rem !important; } -.pi-times:before { - content: "\e90b"; +.p-mt-6 { + margin-top: 3rem !important; } -.pi-times-circle:before { - content: "\e90c"; +.p-mt-auto { + margin-top: auto !important; } -.pi-plus:before { - content: "\e90d"; +.p-mr-0 { + margin-right: 0 !important; } -.pi-plus-circle:before { - content: "\e90e"; +.p-mr-1 { + margin-right: 0.25rem !important; } -.pi-minus:before { - content: "\e90f"; +.p-mr-2 { + margin-right: 0.5rem !important; } -.pi-minus-circle:before { - content: "\e910"; +.p-mr-3 { + margin-right: 1rem !important; } -.pi-circle-on:before { - content: "\e911"; +.p-mr-4 { + margin-right: 1.5rem !important; } -.pi-circle-off:before { - content: "\e912"; +.p-mr-5 { + margin-right: 2rem !important; } -.pi-sort-down:before { - content: "\e913"; +.p-mr-6 { + margin-right: 3rem !important; } -.pi-sort-up:before { - content: "\e914"; +.p-mr-auto { + margin-right: auto !important; } -.pi-sort:before { - content: "\e915"; +.p-my-0 { + margin-top: 0 !important; + margin-bottom: 0 !important; } -.pi-step-backward:before { - content: "\e916"; +.p-my-1 { + margin-top: 0.25rem !important; + margin-bottom: 0.25rem !important; } -.pi-step-forward:before { - content: "\e917"; +.p-my-2 { + margin-top: 0.5rem !important; + margin-bottom: 0.5rem !important; } -.pi-th-large:before { - content: "\e918"; +.p-my-3 { + margin-top: 1rem !important; + margin-bottom: 1rem !important; } -.pi-arrow-down:before { - content: "\e919"; +.p-my-4 { + margin-top: 1.5rem !important; + margin-bottom: 1.5rem !important; } -.pi-arrow-left:before { - content: "\e91a"; +.p-my-5 { + margin-top: 2rem !important; + margin-bottom: 2rem !important; } -.pi-arrow-right:before { - content: "\e91b"; +.p-my-6 { + margin-top: 3rem !important; + margin-bottom: 3rem !important; } -.pi-arrow-up:before { - content: "\e91c"; +.p-my-auto { + margin-top: auto !important; + margin-bottom: auto !important; } -.pi-bars:before { - content: "\e91d"; +.p-m-0 { + margin: 0 !important; } -.pi-arrow-circle-down:before { - content: "\e91e"; +.p-m-1 { + margin: 0.25rem !important; } -.pi-arrow-circle-left:before { - content: "\e91f"; +.p-m-2 { + margin: 0.5rem !important; } -.pi-arrow-circle-right:before { - content: "\e920"; +.p-m-3 { + margin: 1rem !important; } -.pi-arrow-circle-up:before { - content: "\e921"; +.p-m-4 { + margin: 1.5rem !important; } -.pi-info:before { - content: "\e923"; +.p-m-5 { + margin: 2rem !important; } -.pi-info-circle:before { - content: "\e924"; +.p-m-6 { + margin: 3rem !important; } -.pi-home:before { - content: "\e925"; +.p-m-auto { + margin: auto !important; } -.pi-spinner:before { - content: "\e926"; -} +/*# sourceMappingURL=primeflex.css.map */ body { margin: 0; diff --git a/dist/manifest.json b/dist/manifest.json index 4569856..4572b42 100644 --- a/dist/manifest.json +++ b/dist/manifest.json @@ -1,6 +1,6 @@ { "name": "Duolingo Sound Controls", - "version": "1.5.1", + "version": "1.6.0", "description": "Provides fine-grained sound controls for Duolingo.", "permissions": [ "activeTab", diff --git a/dist/src/background.js b/dist/src/background.js index 85c60ed..7396001 100644 --- a/dist/src/background.js +++ b/dist/src/background.js @@ -1 +1 @@ -!function(){"use strict";const e=(e,t,...r)=>new Promise(((n,o)=>{r.push((e=>{chrome.runtime.lastError?o(chrome.runtime.lastError):n(e)})),e[t](...r)})),t={onChanged:e=>chrome.storage.sync.onChanged(e),clear:()=>e(chrome.storage.sync,"clear"),get:t=>e(chrome.storage.sync,"get",t),getBytesInUse:t=>e(chrome.storage.sync,"getBytesInUse",t),remove:t=>e(chrome.storage.sync,"remove",t),set:t=>e(chrome.storage.sync,"set",t)},r=()=>{},n=e=>"number"==typeof e&&Number.isFinite(e),o=Array.isArray,i=e=>"object"==typeof e&&!!e&&!o(e),a=e=>"function"==typeof e,u=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),c=()=>{chrome.runtime.lastError},s=e=>{null!=e&&e.id&&((e.url||"").match(/^https:\/\/.*duolingo\.com\//)?chrome.pageAction.show(e.id,c):chrome.pageAction.hide(e.id,c),chrome.runtime.lastError&&setTimeout((()=>s(e)),50))},l=(e,t)=>chrome.tabs.get(e,(r=>{var n;return"Tabs cannot be edited right now (user may be dragging a tab)."!==(null===(n=chrome.runtime.lastError)||void 0===n?void 0:n.message)?t(r):setTimeout((()=>l(e,t)),100)})),f=e=>`__duo-toolbox__-${e}`,d=f("global_variables"),v=(e,t,r)=>{const n=t(((e,t)=>(i(window[d])||(window[d]={}),u(window[d],e)?window[d][e]:t))(e,r));return((e,t)=>{i(window[d])||(window[d]={}),window[d][e]=t})(e,n),n},h=f("original_function"),p=f("override_version"),y=(e,t,n,o=1)=>((e,t,r,n,o=1)=>{u(window,e)&&t(window[e])?r(window[e]):v("pending_global_listeners",((i={})=>{var a;if(!i[e]){i[e]={};let r=window[e];Object.defineProperty(window,e,{get:()=>r,set:n=>{t(n)?(Object.defineProperty(window,e,{value:n,configurable:!0,enumerable:!0,writable:!0}),Object.values(i[e]).forEach((e=>e.callback(n)))):r=n},configurable:!0})}return o>(Number(null===(a=i[e][n])||void 0===a?void 0:a.version)||0)&&(i[e][n]={callback:r,version:o}),i}))})(e,a,(e=>((e,t,n,o=1)=>{var a;if(i(e)&&o>(Number(null===(a=e[t])||void 0===a?void 0:a[p])||0)){var u;const i=(null===(u=e[t])||void 0===u?void 0:u[h])||e[t]||r;e[t]=n(i),e[t][h]=i,e[t][p]=o}})(null==e?void 0:e.prototype,t,n,o)),`instance_method:${t}`,o),_=f("action_request"),b=f("background_event_notification");var g="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},m={exports:{}};!function(e,t){var r="__lodash_hash_undefined__",n=9007199254740991,o="[object Arguments]",i="[object Function]",a="[object Object]",u=/^\[object .+?Constructor\]$/,c=/^(?:0|[1-9]\d*)$/,s={};s["[object Float32Array]"]=s["[object Float64Array]"]=s["[object Int8Array]"]=s["[object Int16Array]"]=s["[object Int32Array]"]=s["[object Uint8Array]"]=s["[object Uint8ClampedArray]"]=s["[object Uint16Array]"]=s["[object Uint32Array]"]=!0,s[o]=s["[object Array]"]=s["[object ArrayBuffer]"]=s["[object Boolean]"]=s["[object DataView]"]=s["[object Date]"]=s["[object Error]"]=s[i]=s["[object Map]"]=s["[object Number]"]=s[a]=s["[object RegExp]"]=s["[object Set]"]=s["[object String]"]=s["[object WeakMap]"]=!1;var l="object"==typeof g&&g&&g.Object===Object&&g,f="object"==typeof self&&self&&self.Object===Object&&self,d=l||f||Function("return this")(),v=t&&!t.nodeType&&t,h=v&&e&&!e.nodeType&&e,p=h&&h.exports===v,y=p&&l.process,_=function(){try{var e=h&&h.require&&h.require("util").types;return e||y&&y.binding&&y.binding("util")}catch(e){}}(),b=_&&_.isTypedArray;function m(e,t,r){switch(r.length){case 0:return e.call(t);case 1:return e.call(t,r[0]);case 2:return e.call(t,r[0],r[1]);case 3:return e.call(t,r[0],r[1],r[2])}return e.apply(t,r)}var w,j,O,A=Array.prototype,z=Function.prototype,x=Object.prototype,E=d["__core-js_shared__"],K=z.toString,$=x.hasOwnProperty,V=(w=/[^.]+$/.exec(E&&E.keys&&E.keys.IE_PROTO||""))?"Symbol(src)_1."+w:"",q=x.toString,P=K.call(Object),U=RegExp("^"+K.call($).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),k=p?d.Buffer:void 0,T=d.Symbol,M=d.Uint8Array,R=k?k.allocUnsafe:void 0,S=(j=Object.getPrototypeOf,O=Object,function(e){return j(O(e))}),I=Object.create,F=x.propertyIsEnumerable,B=A.splice,L=T?T.toStringTag:void 0,N=function(){try{var e=pe(Object,"defineProperty");return e({},"",{}),e}catch(e){}}(),C=k?k.isBuffer:void 0,D=Math.max,H=Date.now,Q=pe(d,"Map"),G=pe(Object,"create"),W=function(){function e(){}return function(t){if(!Ee(t))return{};if(I)return I(t);e.prototype=t;var r=new e;return e.prototype=void 0,r}}();function J(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t-1},X.prototype.set=function(e,t){var r=this.__data__,n=ne(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this},Y.prototype.clear=function(){this.size=0,this.__data__={hash:new J,map:new(Q||X),string:new J}},Y.prototype.delete=function(e){var t=he(this,e).delete(e);return this.size-=t?1:0,t},Y.prototype.get=function(e){return he(this,e).get(e)},Y.prototype.has=function(e){return he(this,e).has(e)},Y.prototype.set=function(e,t){var r=he(this,e),n=r.size;return r.set(e,t),this.size+=r.size==n?0:1,this},Z.prototype.clear=function(){this.__data__=new X,this.size=0},Z.prototype.delete=function(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r},Z.prototype.get=function(e){return this.__data__.get(e)},Z.prototype.has=function(e){return this.__data__.has(e)},Z.prototype.set=function(e,t){var r=this.__data__;if(r instanceof X){var n=r.__data__;if(!Q||n.length<199)return n.push([e,t]),this.size=++r.size,this;r=this.__data__=new Y(n)}return r.set(e,t),this.size=r.size,this};var ie,ae=function(e,t,r){for(var n=-1,o=Object(e),i=r(e),a=i.length;a--;){var u=i[ie?a:++n];if(!1===t(o[u],u,o))break}return e};function ue(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":L&&L in Object(e)?function(e){var t=$.call(e,L),r=e[L];try{e[L]=void 0;var n=!0}catch(e){}var o=q.call(e);n&&(t?e[L]=r:delete e[L]);return o}(e):function(e){return q.call(e)}(e)}function ce(e){return Ke(e)&&ue(e)==o}function se(e){return!(!Ee(e)||function(e){return!!V&&V in e}(e))&&(ze(e)?U:u).test(function(e){if(null!=e){try{return K.call(e)}catch(e){}try{return e+""}catch(e){}}return""}(e))}function le(e){if(!Ee(e))return function(e){var t=[];if(null!=e)for(var r in Object(e))t.push(r);return t}(e);var t=_e(e),r=[];for(var n in e)("constructor"!=n||!t&&$.call(e,n))&&r.push(n);return r}function fe(e,t,r,n,o){e!==t&&ae(t,(function(i,u){if(o||(o=new Z),Ee(i))!function(e,t,r,n,o,i,u){var c=be(e,r),s=be(t,r),l=u.get(s);if(l)return void te(e,r,l);var f=i?i(c,s,r+"",e,t,u):void 0,d=void 0===f;if(d){var v=je(s),h=!v&&Ae(s),p=!v&&!h&&$e(s);f=s,v||h||p?je(c)?f=c:Ke(m=c)&&Oe(m)?f=function(e,t){var r=-1,n=e.length;t||(t=Array(n));for(;++r-1&&e%1==0&&e0){if(++t>=800)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}(ve);function me(e,t){return e===t||e!=e&&t!=t}var we=ce(function(){return arguments}())?ce:function(e){return Ke(e)&&$.call(e,"callee")&&!F.call(e,"callee")},je=Array.isArray;function Oe(e){return null!=e&&xe(e.length)&&!ze(e)}var Ae=C||function(){return!1};function ze(e){if(!Ee(e))return!1;var t=ue(e);return t==i||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t}function xe(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=n}function Ee(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function Ke(e){return null!=e&&"object"==typeof e}var $e=b?function(e){return function(t){return e(t)}}(b):function(e){return Ke(e)&&xe(e.length)&&!!s[ue(e)]};function Ve(e){return Oe(e)?ee(e,!0):le(e)}var qe,Pe=(qe=function(e,t,r){fe(e,t,r)},de((function(e,t){var r=-1,n=t.length,o=n>1?t[n-1]:void 0,i=n>2?t[2]:void 0;for(o=qe.length>3&&"function"==typeof o?(n--,o):void 0,i&&function(e,t,r){if(!Ee(r))return!1;var n=typeof t;return!!("number"==n?Oe(r)&&ye(t,r.length):"string"==n&&t in r)&&me(r[t],e)}(t[0],t[1],i)&&(o=n<3?void 0:o,n=1),e=Object(e);++ri(e)&&!!e[z],E=e=>e.value,K=e=>({[z]:!0,value:e}),$=(e,t)=>O===e&&n(t)||A===e&&t>=0&&t<=1,V=(e,t)=>((e,t,r,n=1)=>{if(!i(e))return;const o=f(`${t}_override_version`);n>(Number(e[o])||0)&&Object.defineProperty(e,t,r(Object.getOwnPropertyDescriptor(e,t)))})(HTMLMediaElement,t,(t=>({...t,set:function(r){const o=U[e];n(r)?(this[o.originalValueKey]=r,u(this,o.valueKey)&&(r=this[o.isRelativeKey]?T(e,r*this[o.valueKey]):this[o.valueKey])):x(r)&&(r=E(r)),n(r)&&(this[o.listenerValueKey]=r),t.set.call(this,r)}}))),q=(e,t)=>y("Howl",t,(r=>function(){const n=this,o=arguments,i=U[e];let a=!1;const c=n._queue.length;(1===o.length||2===o.length&&void 0===o[1])&&-1===n._getSoundIds().indexOf(o[0])&&(x(o[0])?(a=!0,o[0]=E(o[0])):$(e,o[0])&&(n[i.originalValueKey]=o[0],u(n,i.valueKey)&&(a=!0,n[i.isRelativeKey]?o[0]=T(e,o[0]*n[i.valueKey]):o[0]=n[i.valueKey])),a&&(n[i.listenerValueKey]=o[0]));const s=r.apply(n,arguments);return a&&c({...n,functions:{audio:{applyOverride:()=>V(e,r),getter:e=>e[t],setter:(e,r)=>e[t]=r,hasQueuedUpdate:()=>!1},howler:{applyOverride:()=>q(e,r),getter:e=>e[r](),setter:(e,t)=>e[r](t),hasQueuedUpdate:e=>e._queue.find((e=>e.event===r))}},priorityKey:f(`${e}_priority`),isRelativeKey:f(`${e}_is_relative`),valueKey:f(`forced_${e}_value`),originalValueKey:f(`original_${e}_value`),listenerValueKey:f(`${e}_value`)}),U={[O]:P(O,"playbackRate","rate",{minValue:.5,maxValue:4,defaultValue:1}),[A]:P(A,"volume","volume",{minValue:0,maxValue:1,defaultValue:1})},k=e=>(e=>{const t=U[e];if(!t)throw new Error(`Unknown sound setting: "${e}".`);return t})(e).defaultValue,T=(e,t)=>U[e]?Math.max(U[e].minValue,Math.min(t,U[e].maxValue)):t,M=["listening_challenge","other_challenge","story","forum_discussion","characters","unknown"],R="default",S="main",I=[A,O],F=e=>A===e,B=(e,t=null,r=null)=>({effect:{[j]:t},tts_sentence:{[j]:t,slow:t},tts_word:{[j]:t},tts_morpheme:{[j]:t},unknown:{[j]:t},...F(e)?{[S]:r}:{}}),L=(e,t)=>Object.fromEntries([[R,B(e,{value:t,isRelative:!0},{value:t})],...M.map((t=>[t,B(e)]))]),N=Object.fromEntries(I.map((e=>[e,L(e,k(e))]))),C=(e,t,r,n,o,a)=>{return u=r,c=n,i(N.volume.default[u][c])?w({},e,{[t]:{[null!=o?o:R]:{[r]:{[n]:a}}}}):e;var u,c},D=e=>I.includes(e.setting)&&u(e,"value")&&(!e.context||M.includes(e.context)),H=(e,t)=>{if(!D(t))return e;const{setting:r,context:n,value:o,soundType:i=null,soundSpeed:a=null}=t;return i&&a?C(e,r,i,a,n,o):((e,t,r,n)=>F(t)?w({},e,{[t]:{[null!=r?r:R]:{[S]:n}}}):e)(e,r,n,o)},Q="profiles",G=async(e,r)=>{if(i(e)&&i(e.updateRequest)&&D(e.updateRequest)){const i=(await t.get(Q)).profiles||{};i[0]=H(i[0]||N,e.updateRequest),await t.set({[Q]:i}),r(i[0]),n="current_profile_changed",o=i[0],chrome.runtime.sendMessage({type:b,event:n,value:o}),chrome.tabs.query({url:"https://*.duolingo.com/*"},(e=>e.forEach((e=>chrome.tabs.sendMessage(e.id,{type:b,event:n,value:o})))))}var n,o};var W;W=async(e,r,n,o)=>{switch(e){case"get_current_profile":await(async e=>{e(((await t.get(Q)).profiles||{})[0]||N)})(o);break;case"update_current_profile":await G(r,o)}},chrome.runtime.onMessage.addListener(((e,t,r)=>{if(_===e.type){let n=!1;const o=e=>{n=!0,r({type:"success",value:e})},i=e=>{n=!0,r({type:"failure",error:e})};try{Promise.resolve(W(e.action,e.value,t,o,i)).then((()=>{if(!n)throw new Error(`Could not handle action request: "${e.action}".`)})).catch((e=>{n||i(e)}))}catch(e){!n&&i(e)}return!0}})),chrome.tabs.onUpdated.addListener(((e,t)=>e&&(null!=t&&t.id?s(t):l(e,s)))),chrome.tabs.onActivated.addListener((({tabId:e})=>e&&l(e,s)))}(); +!function(){"use strict";const e=(e,t,...r)=>new Promise(((n,o)=>{r.push((e=>{chrome.runtime.lastError?o(chrome.runtime.lastError):n(e)})),e[t](...r)})),t={onChanged:e=>chrome.storage.sync.onChanged(e),clear:()=>e(chrome.storage.sync,"clear"),get:t=>e(chrome.storage.sync,"get",t),getBytesInUse:t=>e(chrome.storage.sync,"getBytesInUse",t),remove:t=>e(chrome.storage.sync,"remove",t),set:t=>e(chrome.storage.sync,"set",t)},r=()=>{},n=e=>"number"==typeof e&&Number.isFinite(e),o=Array.isArray,i=e=>"object"==typeof e&&!!e&&!o(e),a=e=>"function"==typeof e,u=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),c=()=>{chrome.runtime.lastError},l=e=>{var t,r;null!=e&&e.id&&((e.url||"").match(/^https:\/\/.*duolingo\.com\//)?((null===(t=chrome.pageAction)||void 0===t?void 0:t.show)||chrome.action.enable)(e.id,c):((null===(r=chrome.pageAction)||void 0===r?void 0:r.hide)||chrome.action.disable)(e.id,c),chrome.runtime.lastError&&setTimeout((()=>l(e)),50))},s=(e,t)=>chrome.tabs.get(e,(r=>{var n;return"Tabs cannot be edited right now (user may be dragging a tab)."!==(null===(n=chrome.runtime.lastError)||void 0===n?void 0:n.message)?t(r):setTimeout((()=>s(e,t)),100)})),f=e=>`__duo-toolbox__-${e}`,d=f("global_variables"),v=(e,t,r)=>{const n=t(((e,t)=>(i(window[d])||(window[d]={}),u(window[d],e)?window[d][e]:t))(e,r));return((e,t)=>{i(window[d])||(window[d]={}),window[d][e]=t})(e,n),n},h=f("original_function"),p=f("override_version"),y=(e,t,n,o=1)=>((e,t,r,n,o=1)=>{u(window,e)&&t(window[e])?r(window[e]):v("pending_global_listeners",((i={})=>{var a;if(!i[e]){i[e]={};let r=window[e];Object.defineProperty(window,e,{get:()=>r,set:n=>{t(n)?(Object.defineProperty(window,e,{value:n,configurable:!0,enumerable:!0,writable:!0}),Object.values(i[e]).forEach((e=>e.callback(n)))):r=n},configurable:!0})}return o>(Number(null===(a=i[e][n])||void 0===a?void 0:a.version)||0)&&(i[e][n]={callback:r,version:o}),i}))})(e,a,(e=>((e,t,n,o=1)=>{var a;if(i(e)&&o>(Number(null===(a=e[t])||void 0===a?void 0:a[p])||0)){var u;const i=(null===(u=e[t])||void 0===u?void 0:u[h])||e[t]||r;e[t]=n(i),e[t][h]=i,e[t][p]=o}})(null==e?void 0:e.prototype,t,n,o)),`instance_method:${t}`,o),_=f("action_request"),b=f("background_event_notification");var g="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},m={exports:{}};!function(e,t){var r="__lodash_hash_undefined__",n=9007199254740991,o="[object Arguments]",i="[object Function]",a="[object Object]",u=/^\[object .+?Constructor\]$/,c=/^(?:0|[1-9]\d*)$/,l={};l["[object Float32Array]"]=l["[object Float64Array]"]=l["[object Int8Array]"]=l["[object Int16Array]"]=l["[object Int32Array]"]=l["[object Uint8Array]"]=l["[object Uint8ClampedArray]"]=l["[object Uint16Array]"]=l["[object Uint32Array]"]=!0,l[o]=l["[object Array]"]=l["[object ArrayBuffer]"]=l["[object Boolean]"]=l["[object DataView]"]=l["[object Date]"]=l["[object Error]"]=l[i]=l["[object Map]"]=l["[object Number]"]=l[a]=l["[object RegExp]"]=l["[object Set]"]=l["[object String]"]=l["[object WeakMap]"]=!1;var s="object"==typeof g&&g&&g.Object===Object&&g,f="object"==typeof self&&self&&self.Object===Object&&self,d=s||f||Function("return this")(),v=t&&!t.nodeType&&t,h=v&&e&&!e.nodeType&&e,p=h&&h.exports===v,y=p&&s.process,_=function(){try{var e=h&&h.require&&h.require("util").types;return e||y&&y.binding&&y.binding("util")}catch(e){}}(),b=_&&_.isTypedArray;function m(e,t,r){switch(r.length){case 0:return e.call(t);case 1:return e.call(t,r[0]);case 2:return e.call(t,r[0],r[1]);case 3:return e.call(t,r[0],r[1],r[2])}return e.apply(t,r)}var w,j,O,A=Array.prototype,z=Function.prototype,x=Object.prototype,E=d["__core-js_shared__"],K=z.toString,$=x.hasOwnProperty,V=(w=/[^.]+$/.exec(E&&E.keys&&E.keys.IE_PROTO||""))?"Symbol(src)_1."+w:"",k=x.toString,q=K.call(Object),P=RegExp("^"+K.call($).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),U=p?d.Buffer:void 0,T=d.Symbol,M=d.Uint8Array,R=U?U.allocUnsafe:void 0,S=(j=Object.getPrototypeOf,O=Object,function(e){return j(O(e))}),I=Object.create,F=x.propertyIsEnumerable,B=A.splice,L=T?T.toStringTag:void 0,N=function(){try{var e=pe(Object,"defineProperty");return e({},"",{}),e}catch(e){}}(),C=U?U.isBuffer:void 0,D=Math.max,H=Date.now,Q=pe(d,"Map"),G=pe(Object,"create"),W=function(){function e(){}return function(t){if(!Ee(t))return{};if(I)return I(t);e.prototype=t;var r=new e;return e.prototype=void 0,r}}();function J(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t-1},X.prototype.set=function(e,t){var r=this.__data__,n=ne(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this},Y.prototype.clear=function(){this.size=0,this.__data__={hash:new J,map:new(Q||X),string:new J}},Y.prototype.delete=function(e){var t=he(this,e).delete(e);return this.size-=t?1:0,t},Y.prototype.get=function(e){return he(this,e).get(e)},Y.prototype.has=function(e){return he(this,e).has(e)},Y.prototype.set=function(e,t){var r=he(this,e),n=r.size;return r.set(e,t),this.size+=r.size==n?0:1,this},Z.prototype.clear=function(){this.__data__=new X,this.size=0},Z.prototype.delete=function(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r},Z.prototype.get=function(e){return this.__data__.get(e)},Z.prototype.has=function(e){return this.__data__.has(e)},Z.prototype.set=function(e,t){var r=this.__data__;if(r instanceof X){var n=r.__data__;if(!Q||n.length<199)return n.push([e,t]),this.size=++r.size,this;r=this.__data__=new Y(n)}return r.set(e,t),this.size=r.size,this};var ie,ae=function(e,t,r){for(var n=-1,o=Object(e),i=r(e),a=i.length;a--;){var u=i[ie?a:++n];if(!1===t(o[u],u,o))break}return e};function ue(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":L&&L in Object(e)?function(e){var t=$.call(e,L),r=e[L];try{e[L]=void 0;var n=!0}catch(e){}var o=k.call(e);n&&(t?e[L]=r:delete e[L]);return o}(e):function(e){return k.call(e)}(e)}function ce(e){return Ke(e)&&ue(e)==o}function le(e){return!(!Ee(e)||function(e){return!!V&&V in e}(e))&&(ze(e)?P:u).test(function(e){if(null!=e){try{return K.call(e)}catch(e){}try{return e+""}catch(e){}}return""}(e))}function se(e){if(!Ee(e))return function(e){var t=[];if(null!=e)for(var r in Object(e))t.push(r);return t}(e);var t=_e(e),r=[];for(var n in e)("constructor"!=n||!t&&$.call(e,n))&&r.push(n);return r}function fe(e,t,r,n,o){e!==t&&ae(t,(function(i,u){if(o||(o=new Z),Ee(i))!function(e,t,r,n,o,i,u){var c=be(e,r),l=be(t,r),s=u.get(l);if(s)return void te(e,r,s);var f=i?i(c,l,r+"",e,t,u):void 0,d=void 0===f;if(d){var v=je(l),h=!v&&Ae(l),p=!v&&!h&&$e(l);f=l,v||h||p?je(c)?f=c:Ke(m=c)&&Oe(m)?f=function(e,t){var r=-1,n=e.length;t||(t=Array(n));for(;++r-1&&e%1==0&&e0){if(++t>=800)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}(ve);function me(e,t){return e===t||e!=e&&t!=t}var we=ce(function(){return arguments}())?ce:function(e){return Ke(e)&&$.call(e,"callee")&&!F.call(e,"callee")},je=Array.isArray;function Oe(e){return null!=e&&xe(e.length)&&!ze(e)}var Ae=C||function(){return!1};function ze(e){if(!Ee(e))return!1;var t=ue(e);return t==i||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t}function xe(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=n}function Ee(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function Ke(e){return null!=e&&"object"==typeof e}var $e=b?function(e){return function(t){return e(t)}}(b):function(e){return Ke(e)&&xe(e.length)&&!!l[ue(e)]};function Ve(e){return Oe(e)?ee(e,!0):se(e)}var ke,qe=(ke=function(e,t,r){fe(e,t,r)},de((function(e,t){var r=-1,n=t.length,o=n>1?t[n-1]:void 0,i=n>2?t[2]:void 0;for(o=ke.length>3&&"function"==typeof o?(n--,o):void 0,i&&function(e,t,r){if(!Ee(r))return!1;var n=typeof t;return!!("number"==n?Oe(r)&&ye(t,r.length):"string"==n&&t in r)&&me(r[t],e)}(t[0],t[1],i)&&(o=n<3?void 0:o,n=1),e=Object(e);++ri(e)&&!!e[z],E=e=>e.value,K=e=>({[z]:!0,value:e}),$=(e,t)=>O===e&&n(t)||A===e&&t>=0&&t<=1,V=(e,t)=>((e,t,r,n=1)=>{if(!i(e))return;const o=f(`${t}_override_version`);n>(Number(e[o])||0)&&Object.defineProperty(e,t,r(Object.getOwnPropertyDescriptor(e,t)))})(HTMLMediaElement,t,(t=>({...t,set:function(r){const o=P[e];n(r)?(this[o.originalValueKey]=r,u(this,o.valueKey)&&(r=this[o.isRelativeKey]?T(e,r*this[o.valueKey]):this[o.valueKey])):x(r)&&(r=E(r)),n(r)&&(this[o.listenerValueKey]=r),t.set.call(this,r)}}))),k=(e,t)=>y("Howl",t,(r=>function(){const n=this,o=arguments,i=P[e];let a=!1;const c=n._queue.length;(1===o.length||2===o.length&&void 0===o[1])&&-1===n._getSoundIds().indexOf(o[0])&&(x(o[0])?(a=!0,o[0]=E(o[0])):$(e,o[0])&&(n[i.originalValueKey]=o[0],u(n,i.valueKey)&&(a=!0,n[i.isRelativeKey]?o[0]=T(e,o[0]*n[i.valueKey]):o[0]=n[i.valueKey])),a&&(n[i.listenerValueKey]=o[0]));const l=r.apply(n,arguments);return a&&c({...n,functions:{audio:{applyOverride:()=>V(e,r),getter:e=>e[t],setter:(e,r)=>e[t]=r,hasQueuedUpdate:()=>!1},howler:{applyOverride:()=>k(e,r),getter:e=>e[r](),setter:(e,t)=>e[r](t),hasQueuedUpdate:e=>e._queue.find((e=>e.event===r))}},priorityKey:f(`${e}_priority`),isRelativeKey:f(`${e}_is_relative`),valueKey:f(`forced_${e}_value`),originalValueKey:f(`original_${e}_value`),listenerValueKey:f(`${e}_value`)}),P={[O]:q(O,"playbackRate","rate",{minValue:.5,maxValue:4,defaultValue:1}),[A]:q(A,"volume","volume",{minValue:0,maxValue:1,defaultValue:1})},U=e=>(e=>{const t=P[e];if(!t)throw new Error(`Unknown sound setting: "${e}".`);return t})(e).defaultValue,T=(e,t)=>P[e]?Math.max(P[e].minValue,Math.min(t,P[e].maxValue)):t,M=["listening_challenge","other_challenge","guidebook","story","forum_discussion","characters","unknown"],R="default",S="main",I=[A,O],F=e=>A===e,B=(e,t=null,r=null)=>({effect:{[j]:t},tts_sentence:{[j]:t,slow:t},tts_word:{[j]:t},tts_morpheme:{[j]:t},unknown:{[j]:t},...F(e)?{[S]:r}:{}}),L=(e,t)=>Object.fromEntries([[R,B(e,{value:t,isRelative:!0},{value:t})],...M.map((t=>[t,B(e)]))]),N=Object.fromEntries(I.map((e=>[e,L(e,U(e))]))),C=(e,t,r,n,o,a)=>{return u=r,c=n,i(N.volume.default[u][c])?w({},e,{[t]:{[null!=o?o:R]:{[r]:{[n]:a}}}}):e;var u,c},D=e=>I.includes(e.setting)&&u(e,"value")&&(!e.context||M.includes(e.context)),H=(e,t)=>{if(!D(t))return e;const{setting:r,context:n,value:o,soundType:i=null,soundSpeed:a=null}=t;return i&&a?C(e,r,i,a,n,o):((e,t,r,n)=>F(t)?w({},e,{[t]:{[null!=r?r:R]:{[S]:n}}}):e)(e,r,n,o)},Q="profiles",G=async(e,r)=>{if(i(e)&&i(e.updateRequest)&&D(e.updateRequest)){const n=(await t.get(Q)).profiles||{};n[0]=H(n[0]||N,e.updateRequest),await t.set({[Q]:n}),r(n[0]),(async(e,t)=>{try{await chrome.runtime.sendMessage({type:b,event:e,value:t})}catch(e){}await chrome.tabs.query({url:"https://*.duolingo.com/*"},(r=>r.forEach((r=>chrome.tabs.sendMessage(r.id,{type:b,event:e,value:t}).catch((()=>{chrome.runtime.lastError}))))))})("current_profile_changed",n[0])}};var W;W=async(e,r,n,o)=>{switch(e){case"get_current_profile":await(async e=>{e(((await t.get(Q)).profiles||{})[0]||N)})(o);break;case"update_current_profile":await G(r,o)}},chrome.runtime.onMessage.addListener(((e,t,r)=>{if(_===e.type){let n=!1;const o=e=>{n=!0,r({type:"success",value:e})},i=e=>{n=!0,r({type:"failure",error:e})};try{Promise.resolve(W(e.action,e.value,t,o,i)).then((()=>{if(!n)throw new Error(`Could not handle action request: "${e.action}".`)})).catch((e=>{n||i(e)}))}catch(e){!n&&i(e)}return!0}})),chrome.tabs.onUpdated.addListener(((e,t)=>e&&(null!=t&&t.id?l(t):s(e,l)))),chrome.tabs.onActivated.addListener((({tabId:e})=>e&&s(e,l)))}(); diff --git a/dist/src/observer.js b/dist/src/observer.js index 32d7a65..a9259ef 100644 --- a/dist/src/observer.js +++ b/dist/src/observer.js @@ -1 +1 @@ -!function(){"use strict";const e=()=>{},t=e=>"number"==typeof e&&Number.isFinite(e),n=e=>"string"==typeof e,r=Array.isArray,o=e=>"object"==typeof e&&!!e&&!r(e),a=e=>"function"==typeof e,i=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),l=e=>{for(let t in e)if(i(e,t))return!1;return!0},u=e=>{let t=null;if("/"===e.charAt(0)&&("/"===e.charAt(1)?e=`https://${e}`:t=e),null===t)try{t=new URL(e).pathname}catch(n){t=e}return t},s=e=>`__duo-toolbox__-${e}`,c=s("global_variables"),d=(e,t)=>(o(window[c])||(window[c]={}),i(window[c],e)?window[c][e]:t),f=(e,t)=>{o(window[c])||(window[c]={}),window[c][e]=t},p=(e,t,n)=>{const r=t(d(e,n));return f(e,r),r},v=(e,t,n,r,o=1)=>{i(window,e)&&t(window[e])?n(window[e]):p("pending_global_listeners",((a={})=>{var i;if(!a[e]){a[e]={};let n=window[e];Object.defineProperty(window,e,{get:()=>n,set:r=>{t(r)?(Object.defineProperty(window,e,{value:r,configurable:!0,enumerable:!0,writable:!0}),Object.values(a[e]).forEach((e=>e.callback(r)))):n=r},configurable:!0})}return o>(Number(null===(i=a[e][r])||void 0===i?void 0:i.version)||0)&&(a[e][r]={callback:n,version:o}),a}))},h=s("original_function"),_=s("override_version"),y=(t,n,r,a=1)=>{var i;if(o(t)&&a>(Number(null===(i=t[n])||void 0===i?void 0:i[_])||0)){var l;const o=(null===(l=t[n])||void 0===l?void 0:l[h])||t[n]||e;t[n]=r(o),t[n][h]=o,t[n][_]=a}},g=(e,t,n,r=1)=>v(e,a,(e=>y(null==e?void 0:e.prototype,t,n,r)),`instance_method:${t}`,r),m=s("logging_iframe"),b=s("action_request"),w=s("action_result"),j=s("background_event_notification"),O=()=>(()=>{let e=document.getElementById(m);return e&&e.isConnected||(e=document.createElement("iframe"),e.id=m,e.style.display="none",document.body.appendChild(e)),e})().contentWindow.console,x=(...e)=>O().error(...e),k="assist",A="characterIntro",z="characterMatch",T="characterPuzzle",$="characterSelect",E="characterTrace",K="listen",S="listenComprehension",R="listenIsolation",C="listenMatch",L="listenTap",M="selectPronunciation",V="selectTranscription",I=[k,A,z,T,$,E,"completeReverseTranslation","definition","dialogue","form","freeResponse","gapFill","judge",K,S,R,C,"listenSpell",L,"match","name","partialReverseTranslate","readComprehension","select",M,V,"speak","tapCloze","tapClozeTable","tapComplete","tapCompleteTable","tapDescribe","translate","typeCloze","typeClozeTable","typeCompleteTable"],q=[A,z,T,$,E,M,V],N=[...[A,M,V],...[k,R,C],...[K,S,L]],P=e=>{var t,n;return(null===(t=e.metadata)||void 0===t?void 0:t.source_language)||e.sourceLanguage||(null===(n=e.metadata)||void 0===n?void 0:n.learning_language)},U=e=>{var t;return(null===(t=e.metadata)||void 0===t?void 0:t.target_language)||e.targetLanguage||P(e)},F="none",D=Number.MAX_SAFE_INTEGER,B=Math.round(D/4),H="effect",Q="tts_sentence",X="tts_word",G="tts_morpheme",W="unknown",J="normal",Y="slow",Z="audio",ee="howler",te=[Z,ee],ne="rate",re="volume",oe=s("forced_setting"),ae=e=>o(e)&&!!e[oe],ie=e=>e.value,le=e=>({[oe]:!0,value:e}),ue=(e,n)=>ne===e&&t(n)||re===e&&n>=0&&n<=1,se=(e,n)=>((e,t,n,r=1)=>{if(!o(e))return;const a=s(`${t}_override_version`);r>(Number(e[a])||0)&&Object.defineProperty(e,t,n(Object.getOwnPropertyDescriptor(e,t)))})(HTMLMediaElement,n,(n=>({...n,set:function(r){const o=fe[e];t(r)?(this[o.originalValueKey]=r,i(this,o.valueKey)&&(r=this[o.isRelativeKey]?he(e,r*this[o.valueKey]):this[o.valueKey])):ae(r)&&(r=ie(r)),t(r)&&(this[o.listenerValueKey]=r),n.set.call(this,r)}}))),ce=(e,t)=>g("Howl",t,(n=>function(){const r=this,o=arguments,a=fe[e];let l=!1;const u=r._queue.length;(1===o.length||2===o.length&&void 0===o[1])&&-1===r._getSoundIds().indexOf(o[0])&&(ae(o[0])?(l=!0,o[0]=ie(o[0])):ue(e,o[0])&&(r[a.originalValueKey]=o[0],i(r,a.valueKey)&&(l=!0,r[a.isRelativeKey]?o[0]=he(e,o[0]*r[a.valueKey]):o[0]=r[a.valueKey])),l&&(r[a.listenerValueKey]=o[0]));const s=n.apply(r,arguments);return l&&u({...r,functions:{[Z]:{applyOverride:()=>se(e,n),getter:e=>e[t],setter:(e,n)=>e[t]=n,hasQueuedUpdate:()=>!1},[ee]:{applyOverride:()=>ce(e,n),getter:e=>e[n](),setter:(e,t)=>e[n](t),hasQueuedUpdate:e=>e._queue.find((e=>e.event===n))}},priorityKey:s(`${e}_priority`),isRelativeKey:s(`${e}_is_relative`),valueKey:s(`forced_${e}_value`),originalValueKey:s(`original_${e}_value`),listenerValueKey:s(`${e}_value`)}),fe={[ne]:de(ne,"playbackRate","rate",{minValue:.5,maxValue:4,defaultValue:1}),[re]:de(re,"volume","volume",{minValue:0,maxValue:1,defaultValue:1})},pe=e=>{const t=fe[e];if(!t)throw new Error(`Unknown sound setting: "${e}".`);return t},ve=e=>pe(e).defaultValue,he=(e,t)=>fe[e]?Math.max(fe[e].minValue,Math.min(t,fe[e].maxValue)):t,_e=(e,t,n,r,o=!1,a=1)=>{const l=pe(e);if(a>=(Number(n[l.priorityKey])||0)){const u=he(e,t),s=((e,t)=>{if(-1===te.indexOf(t))throw new Error(`Unknown sound playback strategy: "${t}".`);return pe(e).functions[t]})(e,r);s.applyOverride(),n[l.valueKey]=u,n[l.priorityKey]=a,n[l.isRelativeKey]=o,i(n,l.originalValueKey)||(n[l.originalValueKey]=s.getter(n)),s.hasQueuedUpdate(n)||s.setter(n,le(he(e,u*(o?n[l.originalValueKey]:1))))}},ye="event_listeners",ge=()=>{return`__listener::${e="last_event_listener_id",p(`__counter::${e}__`,(e=>e+1),0)}__`;var e},me=e=>{var t;return(null===(t=d(ye,{}))||void 0===t?void 0:t[e])||{}},be=(e,t)=>{p(ye,(n=>Object.assign(n||{},{[e]:t})))},we=e=>!l(me(e)),je=(e,t)=>{const n=me(e);return l(n)?null:t(Object.values(n))},Oe=(e,t,n=ge())=>{const r=me(e);return r[n]=t,be(e,r),()=>ke(e,n)},xe=(e,t,n,o,a=Oe,i=ge())=>{const l=`__${t}::${e}__`;var u;u=l,me(t)[u]||a(t,((...t)=>{const n=o(...t);r(n)&&Ae(e,...n)}),l);const s=Oe(e,n,i);return()=>{s(),we(e)||ke(t,l)}},ke=(e,t)=>{const n=me(e);delete n[t],be(e,n)},Ae=(e,...t)=>je(e,(e=>e.flatMap((e=>{try{return[e(...t)]}catch(e){return[]}})))),ze="practice_session_loaded",Te="practice_challenges_loaded",$e="pre_fetched_session_loaded",Ee="story_loaded",Ke="alphabets_loaded",Se="forum_discussion_loaded",Re="dictionary_lexeme_loaded",Ce="sound_playback_requested",Le="sound_playback_confirmed",Me="sound_playback_cancelled",Ve={[Ke]:/\/[\d]{4}-[\d]{2}-[\d]{2}\/alphabets\/courses\/(?[^/]+)\/(?[^/?]+)\/?/g,[Re]:/\/api\/1\/dictionary_page/g,[Se]:/\/comments\/([\d]+)/g,[ze]:/\/[\d]{4}-[\d]{2}-[\d]{2}\/sessions/g,[Ee]:/\/api2\/stories/g,user_data_loaded:/\/[\d]{4}-[\d]{2}-[\d]{2}\/users\/[\d]+/g},Ie=(e,t,n=ge())=>(g("XMLHttpRequest","open",(e=>function(t,n,r,a,i){let l,u;for(const[e,t]of Object.entries(Ve))if(u=Array.from(n.matchAll(t))[0],u){l=e;break}return l&&je(l,(e=>{this.addEventListener("load",(()=>{try{const t=o(this.response)?this.response:JSON.parse(this.responseText);e.forEach((e=>e(t,u.groups||{})))}catch(e){x(e,`Could not handle the XHR result (event: ${l}): `)}}))})),e.call(this,t,n,r,a,i)}),2),((e,t,n=1)=>{v(e,a,(()=>y(window,e,t,n)),"global",n)})("fetch",(e=>function(t,n){const r=t instanceof Request?t.url:String(t);let o,a,i=null;for(const[e,t]of Object.entries(Ve))if(a=Array.from(r.matchAll(t))[0],a){o=e;break}return o&&(i=je(o,(e=>t=>{try{e.forEach((e=>e(t,a.groups||{})))}catch(e){x(e,`Could not handle the fetch result (event: ${o}): `)}}))),e.call(this,t,n).then((e=>{if(!i)return e;const t=e.clone();return e.json().then((e=>(i(e),t))).catch((()=>t))}))})),Oe(e,t,n)),qe=(e,t=ge())=>{const r=$e,o=e=>je(r,(t=>{e.addEventListener("success",(()=>{try{t.forEach((t=>t(e.result)))}catch(e){x(e,`Could not handle the IDBRequest result (event: ${r}): `)}}))}));return g("IDBIndex","get",(e=>function(t){const r=e.call(this,t);return n(t)&&t&&"prefetchedSessions"===this.objectStore.name&&o(r),r})),g("IDBObjectStore","get",(e=>function(t){const n=e.call(this,t);return"prefetchedSessions"===this.name&&o(n),n})),Oe(r,e,t)},Ne=e=>{const t=e=>{let t;if(o(e)){var n;t=[{challenges:[e.challenges,e.adaptiveChallenges,null===(n=e.adaptiveInterleavedChallenges)||void 0===n?void 0:n.challenges].filter(r).flat(),sessionMetaData:e.metadata||{}}]}return t},n=xe(Te,ze,e,t,Ie),a=xe(Te,$e,e,t,((e,t,n)=>qe(t,n)));return()=>{n(),a()}},Pe=(e,t)=>({url:e,type:Q,speed:J,language:t}),Ue=(e,t)=>({url:e,type:X,speed:J,language:t}),Fe=(e,t)=>({url:e,type:G,speed:J,language:t}),De=Object.fromEntries(["/sounds/7abe057dc8446ad325229edd6d8fd250.mp3","/sounds/2aae0ea735c8e9ed884107d6f0a09e35.mp3","/sounds/421d48c53ad6d52618dba715722278e0.mp3","/sounds/37d8f0b39dcfe63872192c89653a93f6.mp3","/sounds/0a27c1ee63dd220647e8410a0029aed2.mp3","/sounds/a28ff0a501ef5f33ca78c0afc45ee53e.mp3","/sounds/2e4669d8cf839272f0731f8afa488caf.mp3","/sounds/f0b6ab4396d5891241ef4ca73b4de13a.mp3"].map((e=>{return[e,(t=e,{url:t,type:H,speed:J,language:null})];var t}))),Be=/\/duolingo-data\/tts\/(?[a-z-_]+)\/token\//i,He="sound_type_map",Qe=()=>d(He,De),Xe=[W,Q,X,G,H],Ge=[J,Y],We=(e,t)=>((e,t,n)=>{for(const r of e){const e=Number(r(t,n));if(!isNaN(e)&&0!==e)return e}return 0})([(e,t)=>Xe.indexOf(e.type)-Xe.indexOf(t.type),(e,t)=>Ge.indexOf(e.speed)-Ge.indexOf(t.speed)],e,t),Je=e=>{const t=Qe()||{};for(const n of e){const e=u(n.url);(!t[e]||We(n,t[e])>0)&&(t[e]=n)}f(He,t)},Ye="sound_detection_listeners_version",Ze="sound_detection_unregistration_callbacks",et=(e,t,n)=>{var r;return{url:e.url,type:t,speed:(null===(r=e.speed)||void 0===r?void 0:r.value)||J,language:n}},tt=()=>{const e=2<=(Number(d(Ye))||0);var t,a,i,l,u;!!d(Ze)&&e||(e||nt(),f(Ye,2),f(Ze,[(u=e=>(e=>{const t=e.learningLanguage;r(null==e?void 0:e.elements)&&Je(e.elements.map((e=>{var t;return(null==e||null===(t=e.line)||void 0===t?void 0:t.content)||(null==e?void 0:e.learningLanguageTitleContent)})).flatMap((e=>[null==e?void 0:e.audio,null==e?void 0:e.audioPrefix,null==e?void 0:e.audioSuffix])).map((e=>null==e?void 0:e.url)).filter(n).map((e=>Pe(e,t))))})(e),Ie(Ee,u)),(i=(e,t)=>((e,t)=>{const o=t.toLanguage;r(null==e?void 0:e.alphabets)&&n(null==t?void 0:t.toLanguage)&&Je(e.alphabets.flatMap((e=>null==e?void 0:e.groups)).flatMap((e=>null==e?void 0:e.characters)).flat().map((e=>null==e?void 0:e.ttsUrl)).filter(n).map((e=>Fe(e,o))))})(e,t),Ie(Ke,i,l)),(a=e=>{var t;n(null==(t=e)?void 0:t.tts_url)&&Je([Pe(t.tts_url,t.sentence_language)])},Ie(Se,a)),(t=e=>(e=>{const t=[],o=e.learning_language;n(e.tts)&&t.push(Ue(e.tts,o)),r(e.alternative_forms)&&t.push(e.alternative_forms.map((e=>null==e?void 0:e.tts)).filter(n).map((e=>Pe(e,o)))),Je(t.flat())})(e),Ie(Re,t)),Ne((e=>(e=>{const t=[];for(const u of e){var a;const e=u.type,s=P(u),c=U(u);if(n(u.tts)){const n=q.indexOf(e)>=0?Fe:Pe;t.push(n(u.tts,s))}if(n(u.slowTts)&&t.push({url:u.slowTts,type:Q,speed:Y,language:s}),n(u.solutionTts)&&t.push(Pe(u.solutionTts,c)),r(u.choices)){const r=-1===q.indexOf(e)?Ue:Fe;t.push(u.choices.map((e=>null==e?void 0:e.tts)).filter(n).map((e=>r(e,c))))}if(r(u.tokens)&&t.push(u.tokens.map((e=>null==e?void 0:e.tts)).filter(n).map((e=>Ue(e,s)))),r(u.questionTokens)&&t.push(u.questionTokens.map((e=>null==e?void 0:e.tts)).filter(n).map((e=>Ue(e,c)))),r(null===(a=u.metadata)||void 0===a?void 0:a.speakers))for(const e of u.metadata.speakers){var i,l;o(null===(i=e.tts)||void 0===i?void 0:i.tokens)&&t.push(Object.values(e.tts.tokens).filter((e=>n(e.url))).map((e=>et(e,X,c)))),r(null===(l=e.tts)||void 0===l?void 0:l.sentence)&&t.push(e.tts.sentence.filter((e=>n(e.url))).map((e=>et(e,Q,c))))}if(r(u.pairs)){const r=-1===q.indexOf(e)?Ue:Fe;t.push(u.pairs.map((e=>null==e?void 0:e.tts)).filter(n).map((e=>r(e,c))))}r(u.options)&&t.push(u.options.map((e=>null==e?void 0:e.tts)).filter(n).map((e=>Ue(e,c))))}Je(t.flat())})(e.challenges)))]))},nt=()=>{const e=d(Ze);!r(e)||we("sound_initialized")||we(Ce)||we(Me)||we(Le)||(e.forEach((e=>e())),f(Ye,null),f(Ze,null))},rt=(e,t,n)=>{const r=(e=>{const t=Qe()[e];if(o(t))return t;const n=e.match(Be);return n?Ue(e,n.language):null})(u(t));return{url:t,type:(null==r?void 0:r.type)||W,speed:(null==r?void 0:r.speed)||J,language:null==r?void 0:r.language,playbackStrategy:n,sound:e}},ot=(e,t)=>{g("Howl","play",(e=>function(t){var n;f("is_howler_used",!0);const r=String(this._src||(null===(n=this._parent)||void 0===n?void 0:n._src)||"").trim();return""!==r?((e,t,n,r)=>{const o=rt(e,t,n);let a=!1;try{var i;a=null===(i=Ae(Ce,o))||void 0===i?void 0:i.some((e=>!1===e)),Ae(a?Me:Le,o)}catch(e){x(e,`Could not handle playback for sound "${t}" (using "${n}"): `)}return a?null:r()})(this,r,ee,(()=>e.call(this,t))):e.call(this,t)})),tt();const n=Oe(e,t);return()=>{n(),nt()}},at="challenge",it="story",lt="forum_discussion",ut="characters",st="unknown",ct=/duolingo\.com\/stories\/(?[^/]+)/,dt=/forum\.duolingo\.com\/comment\/(?[\d]+)/,ft=/duolingo\.com\/characters\/?/,pt=/duolingo\.com\/dictionary\/(?.+)\/(?.+)\/(?[\w]+)\/?/,vt="listening_challenge",ht="other_challenge",_t=[vt,ht,it,lt,ut,st],yt=()=>{const e=(()=>{const e=document.location.href;let t=e.match(dt);if(r(t))return{type:lt,commentId:Number(t.comment_id)||null};var n;if(t=e.match(ct),r(t)||document.querySelector('[data-test="stories-element"]'))return{type:it,storyKey:null===(n=t)||void 0===n?void 0:n.story_key};if(e.match(ft))return{type:ut};if(t=e.match(pt),r(t))return{type:"dictionary",languageName:t.language,lexeme:t.lexeme,lexemeId:t.lexeme_id};const o=document.querySelector('[data-test*="challenge"]');if(o){let e=null;for(const t of(null===(a=o.getAttribute("data-test"))||void 0===a?void 0:a.split(/\s+/))||[]){var a,i;const n=null===(i=t.match(/challenge-(?[a-z]+)/i))||void 0===i?void 0:i.groups.type.trim();if(I.indexOf(n)>=0){e=n;break}}let t=F;const n=document.querySelector("._2Fc1K ._1tuLI");return n&&(t=n.classList.contains("_3e9O1")?"correct":"incorrect"),{type:at,challengeType:e,result:t,isCompleted:F!==t}}return{type:st}})();let t=e.type;return at===t&&(t=-1===N.indexOf(e.challengeType)?ht:vt),t};var gt="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},mt={exports:{}};!function(e,t){var n="__lodash_hash_undefined__",r=9007199254740991,o="[object Arguments]",a="[object Function]",i="[object Object]",l=/^\[object .+?Constructor\]$/,u=/^(?:0|[1-9]\d*)$/,s={};s["[object Float32Array]"]=s["[object Float64Array]"]=s["[object Int8Array]"]=s["[object Int16Array]"]=s["[object Int32Array]"]=s["[object Uint8Array]"]=s["[object Uint8ClampedArray]"]=s["[object Uint16Array]"]=s["[object Uint32Array]"]=!0,s[o]=s["[object Array]"]=s["[object ArrayBuffer]"]=s["[object Boolean]"]=s["[object DataView]"]=s["[object Date]"]=s["[object Error]"]=s[a]=s["[object Map]"]=s["[object Number]"]=s[i]=s["[object RegExp]"]=s["[object Set]"]=s["[object String]"]=s["[object WeakMap]"]=!1;var c="object"==typeof gt&>&>.Object===Object&>,d="object"==typeof self&&self&&self.Object===Object&&self,f=c||d||Function("return this")(),p=t&&!t.nodeType&&t,v=p&&e&&!e.nodeType&&e,h=v&&v.exports===p,_=h&&c.process,y=function(){try{var e=v&&v.require&&v.require("util").types;return e||_&&_.binding&&_.binding("util")}catch(e){}}(),g=y&&y.isTypedArray;function m(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}var b,w,j,O=Array.prototype,x=Function.prototype,k=Object.prototype,A=f["__core-js_shared__"],z=x.toString,T=k.hasOwnProperty,$=(b=/[^.]+$/.exec(A&&A.keys&&A.keys.IE_PROTO||""))?"Symbol(src)_1."+b:"",E=k.toString,K=z.call(Object),S=RegExp("^"+z.call(T).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),R=h?f.Buffer:void 0,C=f.Symbol,L=f.Uint8Array,M=R?R.allocUnsafe:void 0,V=(w=Object.getPrototypeOf,j=Object,function(e){return w(j(e))}),I=Object.create,q=k.propertyIsEnumerable,N=O.splice,P=C?C.toStringTag:void 0,U=function(){try{var e=ve(Object,"defineProperty");return e({},"",{}),e}catch(e){}}(),F=R?R.isBuffer:void 0,D=Math.max,B=Date.now,H=ve(f,"Map"),Q=ve(Object,"create"),X=function(){function e(){}return function(t){if(!Ae(t))return{};if(I)return I(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}();function G(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t-1},W.prototype.set=function(e,t){var n=this.__data__,r=ne(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this},J.prototype.clear=function(){this.size=0,this.__data__={hash:new G,map:new(H||W),string:new G}},J.prototype.delete=function(e){var t=pe(this,e).delete(e);return this.size-=t?1:0,t},J.prototype.get=function(e){return pe(this,e).get(e)},J.prototype.has=function(e){return pe(this,e).has(e)},J.prototype.set=function(e,t){var n=pe(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this},Y.prototype.clear=function(){this.__data__=new W,this.size=0},Y.prototype.delete=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n},Y.prototype.get=function(e){return this.__data__.get(e)},Y.prototype.has=function(e){return this.__data__.has(e)},Y.prototype.set=function(e,t){var n=this.__data__;if(n instanceof W){var r=n.__data__;if(!H||r.length<199)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new J(r)}return n.set(e,t),this.size=n.size,this};var oe,ae=function(e,t,n){for(var r=-1,o=Object(e),a=n(e),i=a.length;i--;){var l=a[oe?i:++r];if(!1===t(o[l],l,o))break}return e};function ie(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":P&&P in Object(e)?function(e){var t=T.call(e,P),n=e[P];try{e[P]=void 0;var r=!0}catch(e){}var o=E.call(e);r&&(t?e[P]=n:delete e[P]);return o}(e):function(e){return E.call(e)}(e)}function le(e){return ze(e)&&ie(e)==o}function ue(e){return!(!Ae(e)||function(e){return!!$&&$ in e}(e))&&(xe(e)?S:l).test(function(e){if(null!=e){try{return z.call(e)}catch(e){}try{return e+""}catch(e){}}return""}(e))}function se(e){if(!Ae(e))return function(e){var t=[];if(null!=e)for(var n in Object(e))t.push(n);return t}(e);var t=_e(e),n=[];for(var r in e)("constructor"!=r||!t&&T.call(e,r))&&n.push(r);return n}function ce(e,t,n,r,o){e!==t&&ae(t,(function(a,l){if(o||(o=new Y),Ae(a))!function(e,t,n,r,o,a,l){var u=ye(e,n),s=ye(t,n),c=l.get(s);if(c)return void ee(e,n,c);var d=a?a(u,s,n+"",e,t,l):void 0,f=void 0===d;if(f){var p=we(s),v=!p&&Oe(s),h=!p&&!v&&Te(s);d=s,p||v||h?we(u)?d=u:ze(b=u)&&je(b)?d=function(e,t){var n=-1,r=e.length;t||(t=Array(r));for(;++n-1&&e%1==0&&e0){if(++t>=800)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}(fe);function me(e,t){return e===t||e!=e&&t!=t}var be=le(function(){return arguments}())?le:function(e){return ze(e)&&T.call(e,"callee")&&!q.call(e,"callee")},we=Array.isArray;function je(e){return null!=e&&ke(e.length)&&!xe(e)}var Oe=F||function(){return!1};function xe(e){if(!Ae(e))return!1;var t=ie(e);return t==a||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t}function ke(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=r}function Ae(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function ze(e){return null!=e&&"object"==typeof e}var Te=g?function(e){return function(t){return e(t)}}(g):function(e){return ze(e)&&ke(e.length)&&!!s[ie(e)]};function $e(e){return je(e)?Z(e,!0):se(e)}var Ee,Ke=(Ee=function(e,t,n){ce(e,t,n)},de((function(e,t){var n=-1,r=t.length,o=r>1?t[r-1]:void 0,a=r>2?t[2]:void 0;for(o=Ee.length>3&&"function"==typeof o?(r--,o):void 0,a&&function(e,t,n){if(!Ae(n))return!1;var r=typeof t;return!!("number"==r?je(n)&&he(t,n.length):"string"==r&&t in n)&&me(n[t],e)}(t[0],t[1],a)&&(o=r<3?void 0:o,r=1),e=Object(e);++nre===e,xt=(e,t=null,n=null)=>({[H]:{[J]:t},[Q]:{[J]:t,[Y]:t},[X]:{[J]:t},[G]:{[J]:t},[W]:{[J]:t},...Ot(e)?{[wt]:n}:{}}),kt=(e,t)=>Object.fromEntries([[bt,xt(e,{value:t,isRelative:!0},{value:t})],..._t.map((t=>[t,xt(e)]))]),At=Object.fromEntries(jt.map((e=>[e,kt(e,ve(e))]))),zt=(e,t)=>o(At.volume.default[e][t]),Tt=(e,t,n,r=!0)=>{var a,i;if(!Ot(t))return;const l=null==e||null===(a=e[t])||void 0===a||null===(i=a[null!=n?n:bt])||void 0===i?void 0:i.main;return o(l)?l:null===n?{value:ve(t)}:r?Tt(e,t,null):null},$t=(e,t,n,r,a,i=!0)=>{var l,u,s;if(!zt(n,r))return;const c=null==e||null===(l=e[t])||void 0===l||null===(u=l[null!=a?a:bt])||void 0===u||null===(s=u[n])||void 0===s?void 0:s[r];return o(c)?c:null===a?{isRelative:!0,value:ve(t)}:i?$t(e,t,n,r,null):null},Et=(e,t,n,r,o)=>{if(!zt(n,r))return;const a=$t(e,t,n,r,o);if(!Ot(t))return a;const i=Tt(e,t,o);return{isRelative:a.isRelative,value:i.value*a.value}};let Kt=null;const St=e=>Kt=e;((e,t)=>{var n;const a=r(t)?e=>t.indexOf(e)>=0:()=>!0,i=t=>{const n=o(t.data)?t.data:t;return n&&j===n.type&&a(n.event)&&e(n.event,n.value)};"undefined"!=typeof chrome&&null!==(n=chrome.runtime)&&void 0!==n&&n.onMessage?chrome.runtime.onMessage.addListener(i):window.addEventListener("message",i)})(((e,t)=>{"current_profile_changed"===e&&St(t)})),(async(e,t)=>new Promise(((n,r)=>{const a=t=>{t.source===window&&o(t.data)&&w===t.data.type&&e===t.data.action&&("success"===t.data.result?n(t.data.value):r(t.data.error),t.stopPropagation(),window.removeEventListener("message",a))};window.addEventListener("message",a),window.postMessage({type:b,action:e,value:t},"*")})))("get_current_profile").catch((()=>null)).then(St),ot(Le,(({sound:e,type:t,speed:n,playbackStrategy:r})=>{if(o(Kt)){const o=yt(),a=Et(Kt,ne,t,n,o),i=Et(Kt,re,t,n,o);a&&_e(ne,a.value,e,r,a.isRelative,B),i&&_e(re,i.value,e,r,i.isRelative,B)}}))}(); +!function(){"use strict";const e=()=>{},t=e=>"number"==typeof e&&Number.isFinite(e),n=e=>"string"==typeof e,r=Array.isArray,o=e=>"object"==typeof e&&!!e&&!r(e),a=e=>"function"==typeof e,l=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),i=e=>{for(let t in e)if(l(e,t))return!1;return!0},u=e=>{let t=null;if("/"===e.charAt(0)&&("/"===e.charAt(1)?e=`https://${e}`:t=e),null===t)try{t=new URL(e).pathname}catch(n){t=e}return t},s=e=>`__duo-toolbox__-${e}`,c=s("global_variables"),d=(e,t)=>(o(window[c])||(window[c]={}),l(window[c],e)?window[c][e]:t),f=(e,t)=>{o(window[c])||(window[c]={}),window[c][e]=t},p=(e,t,n)=>{const r=t(d(e,n));return f(e,r),r},v=(e,t,n,r,o=1)=>{l(window,e)&&t(window[e])?n(window[e]):p("pending_global_listeners",((a={})=>{var l;if(!a[e]){a[e]={};let n=window[e];Object.defineProperty(window,e,{get:()=>n,set:r=>{t(r)?(Object.defineProperty(window,e,{value:r,configurable:!0,enumerable:!0,writable:!0}),Object.values(a[e]).forEach((e=>e.callback(r)))):n=r},configurable:!0})}return o>(Number(null===(l=a[e][r])||void 0===l?void 0:l.version)||0)&&(a[e][r]={callback:n,version:o}),a}))},h=s("original_function"),g=s("override_version"),_=(t,n,r,a=1)=>{var l;if(o(t)&&a>(Number(null===(l=t[n])||void 0===l?void 0:l[g])||0)){var i;const o=(null===(i=t[n])||void 0===i?void 0:i[h])||t[n]||e;t[n]=r(o),t[n][h]=o,t[n][g]=a}},y=(e,t,n,r=1)=>v(e,a,(e=>_(null==e?void 0:e.prototype,t,n,r)),`instance_method:${t}`,r),m=s("logging_iframe"),b=s("action_request"),w=s("action_result"),j=s("background_event_notification"),O=()=>(()=>{let e=document.getElementById(m);return e&&e.isConnected||(e=document.createElement("iframe"),e.id=m,e.style.display="none",document.body.appendChild(e)),e})().contentWindow.console,T=(...e)=>O().error(...e),k="assist",x="characterIntro",S="characterMatch",E="characterPuzzle",L="characterSelect",A="characterTrace",R="listen",z="listenComprehension",M="listenIsolation",$="listenMatch",C="listenTap",K="selectPronunciation",q="selectTranscription",U=[k,x,S,E,L,A,"completeReverseTranslation","definition","dialogue","form","freeResponse","gapFill","judge",R,z,M,$,"listenSpell",C,"match","name","partialReverseTranslate","readComprehension","select",K,q,"speak","tapCloze","tapClozeTable","tapComplete","tapCompleteTable","tapDescribe","translate","typeCloze","typeClozeTable","typeCompleteTable"],V=[x,S,E,L,A,K,q],I=[...[x,K,q],...[k,M,$],...[R,z,C]],N=e=>{var t,n;return(null===(t=e.metadata)||void 0===t?void 0:t.source_language)||e.sourceLanguage||(null===(n=e.metadata)||void 0===n?void 0:n.learning_language)},P=e=>{var t;return(null===(t=e.metadata)||void 0===t?void 0:t.target_language)||e.targetLanguage||N(e)},D="none",F=Number.MAX_SAFE_INTEGER,B=Math.round(F/4),H="effect",Q="tts_sentence",X="tts_word",G="tts_morpheme",W="unknown",J="normal",Y="slow",Z="audio",ee="howler",te=[Z,ee],ne="rate",re="volume",oe=s("forced_setting"),ae=e=>o(e)&&!!e[oe],le=e=>e.value,ie=e=>({[oe]:!0,value:e}),ue=(e,n)=>ne===e&&t(n)||re===e&&n>=0&&n<=1,se=(e,n)=>((e,t,n,r=1)=>{if(!o(e))return;const a=s(`${t}_override_version`);r>(Number(e[a])||0)&&Object.defineProperty(e,t,n(Object.getOwnPropertyDescriptor(e,t)))})(HTMLMediaElement,n,(n=>({...n,set:function(r){const o=fe[e];t(r)?(this[o.originalValueKey]=r,l(this,o.valueKey)&&(r=this[o.isRelativeKey]?he(e,r*this[o.valueKey]):this[o.valueKey])):ae(r)&&(r=le(r)),t(r)&&(this[o.listenerValueKey]=r),n.set.call(this,r)}}))),ce=(e,t)=>y("Howl",t,(n=>function(){const r=this,o=arguments,a=fe[e];let i=!1;const u=r._queue.length;(1===o.length||2===o.length&&void 0===o[1])&&-1===r._getSoundIds().indexOf(o[0])&&(ae(o[0])?(i=!0,o[0]=le(o[0])):ue(e,o[0])&&(r[a.originalValueKey]=o[0],l(r,a.valueKey)&&(i=!0,r[a.isRelativeKey]?o[0]=he(e,o[0]*r[a.valueKey]):o[0]=r[a.valueKey])),i&&(r[a.listenerValueKey]=o[0]));const s=n.apply(r,arguments);return i&&u({...r,functions:{[Z]:{applyOverride:()=>se(e,n),getter:e=>e[t],setter:(e,n)=>e[t]=n,hasQueuedUpdate:()=>!1},[ee]:{applyOverride:()=>ce(e,n),getter:e=>e[n](),setter:(e,t)=>e[n](t),hasQueuedUpdate:e=>e._queue.find((e=>e.event===n))}},priorityKey:s(`${e}_priority`),isRelativeKey:s(`${e}_is_relative`),valueKey:s(`forced_${e}_value`),originalValueKey:s(`original_${e}_value`),listenerValueKey:s(`${e}_value`)}),fe={[ne]:de(ne,"playbackRate","rate",{minValue:.5,maxValue:4,defaultValue:1}),[re]:de(re,"volume","volume",{minValue:0,maxValue:1,defaultValue:1})},pe=e=>{const t=fe[e];if(!t)throw new Error(`Unknown sound setting: "${e}".`);return t},ve=e=>pe(e).defaultValue,he=(e,t)=>fe[e]?Math.max(fe[e].minValue,Math.min(t,fe[e].maxValue)):t,ge=(e,t,n,r,o=!1,a=1)=>{const i=pe(e);if(a>=(Number(n[i.priorityKey])||0)){const u=he(e,t),s=((e,t)=>{if(-1===te.indexOf(t))throw new Error(`Unknown sound playback strategy: "${t}".`);return pe(e).functions[t]})(e,r);s.applyOverride(),n[i.valueKey]=u,n[i.priorityKey]=a,n[i.isRelativeKey]=o,l(n,i.originalValueKey)||(n[i.originalValueKey]=s.getter(n)),s.hasQueuedUpdate(n)||s.setter(n,ie(he(e,u*(o?n[i.originalValueKey]:1))))}},_e="event_listeners",ye=()=>{return`__listener::${e="last_event_listener_id",p(`__counter::${e}__`,(e=>e+1),0)}__`;var e},me=e=>{var t;return(null===(t=d(_e,{}))||void 0===t?void 0:t[e])||{}},be=(e,t)=>{p(_e,(n=>Object.assign(n||{},{[e]:t})))},we=e=>!i(me(e)),je=(e,t)=>{const n=me(e);return i(n)?null:t(Object.values(n))},Oe=(e,t,n=ye())=>{const r=me(e);return r[n]=t,be(e,r),()=>ke(e,n)},Te=(e,t,n,o,a=Oe,l=ye())=>{const i=`__${t}::${e}__`;var u;u=i,me(t)[u]||a(t,((...t)=>{const n=o(...t);r(n)&&xe(e,...n)}),i);const s=Oe(e,n,l);return()=>{s(),we(e)||ke(t,i)}},ke=(e,t)=>{const n=me(e);delete n[t],be(e,n)},xe=(e,...t)=>je(e,(e=>e.flatMap((e=>{try{return[e(...t)]}catch(e){return[]}})))),Se="practice_session_loaded",Ee="practice_challenges_loaded",Le="pre_fetched_session_loaded",Ae="story_loaded",Re="alphabets_loaded",ze="alphabet_hints_loaded",Me="forum_discussion_loaded",$e="guidebook_loaded",Ce="sound_playback_requested",Ke="sound_playback_confirmed",qe="sound_playback_cancelled",Ue={[Re]:/\/[\d]{4}-[\d]{2}-[\d]{2}\/alphabets\/courses\/(?[^/]+)\/(?[^/?]+)\/?/g,[Me]:/\/comments\/([\d]+)/g,[$e]:/\/guidebook\/compiled\/(?[^/]+)\/(?[^/]+)\/?/g,[Se]:/\/[\d]{4}-[\d]{2}-[\d]{2}\/sessions/g,[Ae]:/\/api2\/stories/g,user_data_loaded:/\/[\d]{4}-[\d]{2}-[\d]{2}\/users\/[\d]+/g},Ve="http_request_url_event_map",Ie=()=>{let e=d(Ve);return e instanceof Map||(e=new Map,Object.entries(Ue).forEach((([t,n])=>{e.set(n,{eventType:t,urlRegExp:n,requestData:{}})})),f(Ve,e)),e},Ne=e=>{let t,n;const r=Ie();for(const o of r.values()){const r=Array.from(e.matchAll(o.urlRegExp))[0];if(r){t=o.eventType,n={...o.requestData,...r.groups||{}};break}}return t?{eventType:t,requestData:n}:null},Pe=(e,t,n=ye())=>(y("XMLHttpRequest","open",(e=>function(t,n,r,a,l){const i=Ne(n);return i&&je(i.eventType,(e=>{this.addEventListener("load",(()=>{try{const t=o(this.response)?this.response:JSON.parse(this.responseText);e.forEach((e=>e(t,i.requestData)))}catch(e){T(e,`Could not handle the XHR result (event: "${i.eventType}"): `)}}))})),e.call(this,t,n,r,a,l)}),3),((e,t,n=1)=>{v(e,a,(()=>_(window,e,t,n)),"global",n)})("fetch",(e=>function(t,n){const r=t instanceof Request?t.url:String(t);let o=null;const a=Ne(r);return a&&(o=je(a.eventType,(e=>t=>{try{e.forEach((e=>e(t,a.requestData)))}catch(e){T(e,`Could not handle the fetch result (event: "${a.eventType}"): `)}}))),e.call(this,t,n).then((e=>{if(!o)return e;const t=e.clone();return e.json().then((e=>(o(e),t))).catch((()=>t))}))}),2),Oe(e,t,n)),De=(e,t=ye())=>{const r=Le,o=e=>je(r,(t=>{e.addEventListener("success",(()=>{try{t.forEach((t=>t(e.result)))}catch(e){T(e,`Could not handle the IDBRequest result (event: ${r}): `)}}))}));return y("IDBIndex","get",(e=>function(t){const r=e.call(this,t);return n(t)&&t&&"prefetchedSessions"===this.objectStore.name&&o(r),r})),y("IDBObjectStore","get",(e=>function(t){const n=e.call(this,t);return"prefetchedSessions"===this.name&&o(n),n})),Oe(r,e,t)},Fe=e=>{const t=e=>{let t;if(o(e)){var n;t=[{challenges:[e.challenges,e.adaptiveChallenges,null===(n=e.adaptiveInterleavedChallenges)||void 0===n?void 0:n.challenges].filter(r).flat(),sessionMetaData:e.metadata||{}}]}return t},n=Te(Ee,Se,e,t,Pe),a=Te(Ee,Le,e,t,((e,t,n)=>De(t,n)));return()=>{n(),a()}},Be=(e,t)=>({url:e,type:Q,speed:J,language:t}),He=(e,t)=>({url:e,type:X,speed:J,language:t}),Qe=(e,t)=>({url:e,type:G,speed:J,language:t}),Xe=Object.fromEntries(["/sounds/7abe057dc8446ad325229edd6d8fd250.mp3","/sounds/2aae0ea735c8e9ed884107d6f0a09e35.mp3","/sounds/421d48c53ad6d52618dba715722278e0.mp3","/sounds/37d8f0b39dcfe63872192c89653a93f6.mp3","/sounds/0a27c1ee63dd220647e8410a0029aed2.mp3","/sounds/a28ff0a501ef5f33ca78c0afc45ee53e.mp3","/sounds/2e4669d8cf839272f0731f8afa488caf.mp3","/sounds/f0b6ab4396d5891241ef4ca73b4de13a.mp3"].map((e=>{return[e,(t=e,{url:t,type:H,speed:J,language:null})];var t}))),Ge=/\/duolingo-data\/tts\/(?[a-z-_]+)\/token\//i,We="sound_type_map",Je=()=>d(We,Xe),Ye=[W,Q,X,G,H],Ze=[J,Y],et=(e,t)=>((e,t,n)=>{for(const r of e){const e=Number(r(t,n));if(!isNaN(e)&&0!==e)return e}return 0})([(e,t)=>Ye.indexOf(e.type)-Ye.indexOf(t.type),(e,t)=>Ze.indexOf(e.speed)-Ze.indexOf(t.speed)],e,t),tt=e=>{const t=Je()||{};for(const n of e){const e=u(n.url);(!t[e]||et(n,t[e])>0)&&(t[e]=n)}f(We,t)},nt="sound_detection_listeners_version",rt="sound_detection_unregistration_callbacks",ot=(e,t,n)=>{var r;return{url:e.url,type:t,speed:(null===(r=e.speed)||void 0===r?void 0:r.value)||J,language:n}},at=(e,t)=>{if(r(null==e?void 0:e.alphabets)&&n(null==t?void 0:t.toLanguage)){const a=t.toLanguage;tt(e.alphabets.flatMap((e=>null==e?void 0:e.groups)).flatMap((e=>null==e?void 0:e.characters)).flat().map((e=>null==e?void 0:e.ttsUrl)).filter(n).map((e=>Qe(e,a))));const l=[];for(const t of e.alphabets){var o;n(t.explanationUrl)&&l.push(t.explanationUrl),r(null===(o=t.explanationListing)||void 0===o?void 0:o.groups)&&l.push(...t.explanationListing.groups.flatMap((e=>null==e?void 0:e.tips)).map((e=>null==e?void 0:e.url)).filter(n))}l.length>0&&((e,t,n={})=>{const r=Ie();for(const a of t)r.set(a,{eventType:e,requestData:n,urlRegExp:a instanceof RegExp?a:new RegExp((o=String(a),o.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")),"g")});var o})(ze,l,t)}},lt=(e,t)=>{if(r(null==e?void 0:e.elements)&&n(null==t?void 0:t.toLanguage)){const r=t.toLanguage;tt(e.elements.flatMap((({element:e})=>o(e)&&[e].concat(e.phrases||[]).concat(e.examples||[]))).filter(o).flatMap((e=>((e,t)=>{var r,a,l,i,u;const s=[],c=e.ttsURL;return n(c)&&s.push(Be(c,t)),s.concat([(null===(r=e.tokenTTS)||void 0===r?void 0:r.tokenTTSCollection)||[],(null===(a=e.text)||void 0===a||null===(l=a.tokenTTS)||void 0===l?void 0:l.tokenTTSCollection)||[],(null===(i=e.subtext)||void 0===i||null===(u=i.tokenTTS)||void 0===u?void 0:u.tokenTTSCollection)||[]].flat().filter(o).map((e=>null==e?void 0:e.ttsURL)).filter((e=>(e=>n(e))&&e!==c)).map((e=>He(e,t))))})(e,r))))}},it=()=>{const e=3<=(Number(d(nt))||0);var t,a,l,i,u,s;!!d(rt)&&e||(e||ut(),f(nt,3),f(rt,[(s=e=>(e=>{const t=e.learningLanguage;r(null==e?void 0:e.elements)&&tt(e.elements.map((e=>{var t;return(null==e||null===(t=e.line)||void 0===t?void 0:t.content)||(null==e?void 0:e.learningLanguageTitleContent)})).flatMap((e=>[null==e?void 0:e.audio,null==e?void 0:e.audioPrefix,null==e?void 0:e.audioSuffix])).map((e=>null==e?void 0:e.url)).filter(n).map((e=>Be(e,t))))})(e),Pe(Ae,s)),(i=(e,t)=>at(e,t),Pe(Re,i,u)),(l=(e,t)=>((e,t)=>{if(r(null==e?void 0:e.elements)&&n(null==t?void 0:t.toLanguage)){const r=e.elements.map((e=>null==e?void 0:e.element)).flatMap((e=>{var t;return null==e||null===(t=e.tokenTTS)||void 0===t?void 0:t.tokenTTSCollection}));r.push(...e.elements.map((e=>null==e?void 0:e.element)).flatMap((e=>null==e?void 0:e.cells)).flat().flatMap((e=>{var t;return null==e||null===(t=e.tokenTTS)||void 0===t?void 0:t.tokenTTSCollection})));const o=t.toLanguage;tt(r.map((e=>null==e?void 0:e.ttsURL)).filter(n).map((e=>Qe(e,o))))}})(e,t),Pe(ze,l)),(a=e=>{var t;n(null==(t=e)?void 0:t.tts_url)&&tt([Be(t.tts_url,t.sentence_language)])},Pe(Me,a)),(t=(e,t)=>lt(e,t),Pe($e,t)),Fe((e=>(e=>{const t=[];for(const u of e){var a;const e=u.type,s=N(u),c=P(u);if(n(u.tts)){const n=V.indexOf(e)>=0?Qe:Be;t.push(n(u.tts,s))}if(n(u.slowTts)&&t.push({url:u.slowTts,type:Q,speed:Y,language:s}),n(u.solutionTts)&&t.push(Be(u.solutionTts,c)),r(u.choices)){const r=-1===V.indexOf(e)?He:Qe;t.push(u.choices.map((e=>null==e?void 0:e.tts)).filter(n).map((e=>r(e,c))))}if(r(u.tokens)&&t.push(u.tokens.map((e=>null==e?void 0:e.tts)).filter(n).map((e=>He(e,s)))),r(u.questionTokens)&&t.push(u.questionTokens.map((e=>null==e?void 0:e.tts)).filter(n).map((e=>He(e,c)))),r(null===(a=u.metadata)||void 0===a?void 0:a.speakers))for(const e of u.metadata.speakers){var l,i;o(null===(l=e.tts)||void 0===l?void 0:l.tokens)&&t.push(Object.values(e.tts.tokens).filter((e=>n(e.url))).map((e=>ot(e,X,c)))),r(null===(i=e.tts)||void 0===i?void 0:i.sentence)&&t.push(e.tts.sentence.filter((e=>n(e.url))).map((e=>ot(e,Q,c))))}if(r(u.pairs)){const r=-1===V.indexOf(e)?He:Qe;t.push(u.pairs.map((e=>null==e?void 0:e.tts)).filter(n).map((e=>r(e,c))))}r(u.options)&&t.push(u.options.map((e=>null==e?void 0:e.tts)).filter(n).map((e=>He(e,c))))}tt(t.flat())})(e.challenges)))]))},ut=()=>{const e=d(rt);!r(e)||we("sound_initialized")||we(Ce)||we(qe)||we(Ke)||(e.forEach((e=>e())),f(nt,null),f(rt,null))},st=(e,t,n)=>{const r=(e=>{const t=Je()[e];if(o(t))return t;const n=e.match(Ge);return n?He(e,n.language):null})(u(t));return{url:t,type:(null==r?void 0:r.type)||W,speed:(null==r?void 0:r.speed)||J,language:null==r?void 0:r.language,playbackStrategy:n,sound:e}},ct=(e,t)=>{y("Howl","play",(e=>function(t){var n;f("is_howler_used",!0);const r=String(this._src||(null===(n=this._parent)||void 0===n?void 0:n._src)||"").trim();return""!==r?((e,t,n,r)=>{const o=st(e,t,n);let a=!1;try{var l;a=null===(l=xe(Ce,o))||void 0===l?void 0:l.some((e=>!1===e)),xe(a?qe:Ke,o)}catch(e){T(e,`Could not handle playback for sound "${t}" (using "${n}"): `)}return a?null:r()})(this,r,ee,(()=>e.call(this,t))):e.call(this,t)})),it();const n=Oe(e,t);return()=>{n(),ut()}},dt="challenge",ft="challenge_review",pt="story",vt="forum_discussion",ht="characters",gt="guidebook",_t="unknown",yt=/duolingo\.com\/stories\/(?[^/]+)/,mt=/forum\.duolingo\.com\/comment\/(?[\d]+)/,bt=/duolingo\.com\/characters\/?/,wt=/duolingo\.com\/alphabets\/?/,jt=/duolingo\.com\/guidebook\/(?.+)\/(?[\d]+)\/?/,Ot=/duolingo\.com\/(practice|lesson)\/?/,Tt="listening_challenge",kt="other_challenge",xt=[Tt,kt,gt,pt,vt,ht,_t],St=()=>{const e=(()=>{const e=document.location.href;let t=e.match(mt);if(r(t))return{type:vt,commentId:Number(t.comment_id)||null};var n;if(t=e.match(yt),r(t)||document.querySelector('[data-test="stories-element"]'))return{type:pt,storyKey:null===(n=t)||void 0===n?void 0:n.story_key};if(e.match(bt)||e.match(wt))return{type:ht};if(t=e.match(jt),r(t))return{type:gt,languageName:t.language,unitIndex:Number(t.index)};const o=document.querySelector('[data-test*="challenge"]');if(o){let e=null;for(const t of(null===(a=o.getAttribute("data-test"))||void 0===a?void 0:a.split(/\s+/))||[]){var a,l;const n=null===(l=t.match(/challenge-(?[a-z]+)/i))||void 0===l?void 0:l.groups.type.trim();if(U.indexOf(n)>=0){e=n;break}}let t=D;const n=document.querySelector("._2Fc1K ._1tuLI");return n&&(t=n.classList.contains("_3e9O1")?"correct":"incorrect"),{type:dt,challengeType:e,result:t,isCompleted:D!==t}}return e.match(Ot)?{type:ft}:{type:_t}})();let t=e.type;return dt===t?t=-1===I.indexOf(e.challengeType)?kt:Tt:ft===t&&(t=Tt),t};var Et="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},Lt={exports:{}};!function(e,t){var n="__lodash_hash_undefined__",r=9007199254740991,o="[object Arguments]",a="[object Function]",l="[object Object]",i=/^\[object .+?Constructor\]$/,u=/^(?:0|[1-9]\d*)$/,s={};s["[object Float32Array]"]=s["[object Float64Array]"]=s["[object Int8Array]"]=s["[object Int16Array]"]=s["[object Int32Array]"]=s["[object Uint8Array]"]=s["[object Uint8ClampedArray]"]=s["[object Uint16Array]"]=s["[object Uint32Array]"]=!0,s[o]=s["[object Array]"]=s["[object ArrayBuffer]"]=s["[object Boolean]"]=s["[object DataView]"]=s["[object Date]"]=s["[object Error]"]=s[a]=s["[object Map]"]=s["[object Number]"]=s[l]=s["[object RegExp]"]=s["[object Set]"]=s["[object String]"]=s["[object WeakMap]"]=!1;var c="object"==typeof Et&&Et&&Et.Object===Object&&Et,d="object"==typeof self&&self&&self.Object===Object&&self,f=c||d||Function("return this")(),p=t&&!t.nodeType&&t,v=p&&e&&!e.nodeType&&e,h=v&&v.exports===p,g=h&&c.process,_=function(){try{var e=v&&v.require&&v.require("util").types;return e||g&&g.binding&&g.binding("util")}catch(e){}}(),y=_&&_.isTypedArray;function m(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}var b,w,j,O=Array.prototype,T=Function.prototype,k=Object.prototype,x=f["__core-js_shared__"],S=T.toString,E=k.hasOwnProperty,L=(b=/[^.]+$/.exec(x&&x.keys&&x.keys.IE_PROTO||""))?"Symbol(src)_1."+b:"",A=k.toString,R=S.call(Object),z=RegExp("^"+S.call(E).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),M=h?f.Buffer:void 0,$=f.Symbol,C=f.Uint8Array,K=M?M.allocUnsafe:void 0,q=(w=Object.getPrototypeOf,j=Object,function(e){return w(j(e))}),U=Object.create,V=k.propertyIsEnumerable,I=O.splice,N=$?$.toStringTag:void 0,P=function(){try{var e=ve(Object,"defineProperty");return e({},"",{}),e}catch(e){}}(),D=M?M.isBuffer:void 0,F=Math.max,B=Date.now,H=ve(f,"Map"),Q=ve(Object,"create"),X=function(){function e(){}return function(t){if(!xe(t))return{};if(U)return U(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}();function G(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t-1},W.prototype.set=function(e,t){var n=this.__data__,r=ne(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this},J.prototype.clear=function(){this.size=0,this.__data__={hash:new G,map:new(H||W),string:new G}},J.prototype.delete=function(e){var t=pe(this,e).delete(e);return this.size-=t?1:0,t},J.prototype.get=function(e){return pe(this,e).get(e)},J.prototype.has=function(e){return pe(this,e).has(e)},J.prototype.set=function(e,t){var n=pe(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this},Y.prototype.clear=function(){this.__data__=new W,this.size=0},Y.prototype.delete=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n},Y.prototype.get=function(e){return this.__data__.get(e)},Y.prototype.has=function(e){return this.__data__.has(e)},Y.prototype.set=function(e,t){var n=this.__data__;if(n instanceof W){var r=n.__data__;if(!H||r.length<199)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new J(r)}return n.set(e,t),this.size=n.size,this};var oe,ae=function(e,t,n){for(var r=-1,o=Object(e),a=n(e),l=a.length;l--;){var i=a[oe?l:++r];if(!1===t(o[i],i,o))break}return e};function le(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":N&&N in Object(e)?function(e){var t=E.call(e,N),n=e[N];try{e[N]=void 0;var r=!0}catch(e){}var o=A.call(e);r&&(t?e[N]=n:delete e[N]);return o}(e):function(e){return A.call(e)}(e)}function ie(e){return Se(e)&&le(e)==o}function ue(e){return!(!xe(e)||function(e){return!!L&&L in e}(e))&&(Te(e)?z:i).test(function(e){if(null!=e){try{return S.call(e)}catch(e){}try{return e+""}catch(e){}}return""}(e))}function se(e){if(!xe(e))return function(e){var t=[];if(null!=e)for(var n in Object(e))t.push(n);return t}(e);var t=ge(e),n=[];for(var r in e)("constructor"!=r||!t&&E.call(e,r))&&n.push(r);return n}function ce(e,t,n,r,o){e!==t&&ae(t,(function(a,i){if(o||(o=new Y),xe(a))!function(e,t,n,r,o,a,i){var u=_e(e,n),s=_e(t,n),c=i.get(s);if(c)return void ee(e,n,c);var d=a?a(u,s,n+"",e,t,i):void 0,f=void 0===d;if(f){var p=we(s),v=!p&&Oe(s),h=!p&&!v&&Ee(s);d=s,p||v||h?we(u)?d=u:Se(b=u)&&je(b)?d=function(e,t){var n=-1,r=e.length;t||(t=Array(r));for(;++n-1&&e%1==0&&e0){if(++t>=800)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}(fe);function me(e,t){return e===t||e!=e&&t!=t}var be=ie(function(){return arguments}())?ie:function(e){return Se(e)&&E.call(e,"callee")&&!V.call(e,"callee")},we=Array.isArray;function je(e){return null!=e&&ke(e.length)&&!Te(e)}var Oe=D||function(){return!1};function Te(e){if(!xe(e))return!1;var t=le(e);return t==a||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t}function ke(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=r}function xe(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function Se(e){return null!=e&&"object"==typeof e}var Ee=y?function(e){return function(t){return e(t)}}(y):function(e){return Se(e)&&ke(e.length)&&!!s[le(e)]};function Le(e){return je(e)?Z(e,!0):se(e)}var Ae,Re=(Ae=function(e,t,n){ce(e,t,n)},de((function(e,t){var n=-1,r=t.length,o=r>1?t[r-1]:void 0,a=r>2?t[2]:void 0;for(o=Ae.length>3&&"function"==typeof o?(r--,o):void 0,a&&function(e,t,n){if(!xe(n))return!1;var r=typeof t;return!!("number"==r?je(n)&&he(t,n.length):"string"==r&&t in n)&&me(n[t],e)}(t[0],t[1],a)&&(o=r<3?void 0:o,r=1),e=Object(e);++nre===e,$t=(e,t=null,n=null)=>({[H]:{[J]:t},[Q]:{[J]:t,[Y]:t},[X]:{[J]:t},[G]:{[J]:t},[W]:{[J]:t},...Mt(e)?{[Rt]:n}:{}}),Ct=(e,t)=>Object.fromEntries([[At,$t(e,{value:t,isRelative:!0},{value:t})],...xt.map((t=>[t,$t(e)]))]),Kt=Object.fromEntries(zt.map((e=>[e,Ct(e,ve(e))]))),qt=(e,t)=>o(Kt.volume.default[e][t]),Ut=(e,t,n,r=!0)=>{var a,l;if(!Mt(t))return;const i=null==e||null===(a=e[t])||void 0===a||null===(l=a[null!=n?n:At])||void 0===l?void 0:l.main;return o(i)?i:null===n?{value:ve(t)}:r?Ut(e,t,null):null},Vt=(e,t,n,r,a,l=!0)=>{var i,u,s;if(!qt(n,r))return;const c=null==e||null===(i=e[t])||void 0===i||null===(u=i[null!=a?a:At])||void 0===u||null===(s=u[n])||void 0===s?void 0:s[r];return o(c)?c:null===a?{isRelative:!0,value:ve(t)}:l?Vt(e,t,n,r,null):null},It=(e,t,n,r,o)=>{if(!qt(n,r))return;const a=Vt(e,t,n,r,o);if(!Mt(t))return a;const l=Ut(e,t,o);return{isRelative:a.isRelative,value:l.value*a.value}};let Nt=null;const Pt=e=>Nt=e;((e,t)=>{var n;const a=r(t)?e=>t.indexOf(e)>=0:()=>!0,l=t=>{const n=o(t.data)?t.data:t;return n&&j===n.type&&a(n.event)&&e(n.event,n.value)};"undefined"!=typeof chrome&&null!==(n=chrome.runtime)&&void 0!==n&&n.onMessage?chrome.runtime.onMessage.addListener(l):window.addEventListener("message",l)})(((e,t)=>{"current_profile_changed"===e&&Pt(t)})),(async(e,t)=>new Promise(((n,r)=>{const a=t=>{t.source===window&&o(t.data)&&w===t.data.type&&e===t.data.action&&("success"===t.data.result?n(t.data.value):r(t.data.error),t.stopPropagation(),window.removeEventListener("message",a))};window.addEventListener("message",a),window.postMessage({type:b,action:e,value:t},"*")})))("get_current_profile").catch((()=>null)).then(Pt),ct(Ke,(({sound:e,type:t,speed:n,playbackStrategy:r})=>{if(o(Nt)){const o=St(),a=It(Nt,ne,t,n,o),l=It(Nt,re,t,n,o);a&&ge(ne,a.value,e,r,a.isRelative,B),l&&ge(re,l.value,e,r,l.isRelative,B)}}))}(); diff --git a/dist/src/popup.js b/dist/src/popup.js index de2c445..fa25960 100644 --- a/dist/src/popup.js +++ b/dist/src/popup.js @@ -1,7 +1,7 @@ -!function(){"use strict";var e,t,n,r,o,i,a,l,s={},u=[],c=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i;function p(e,t){for(var n in t)e[n]=t[n];return e}function f(e){var t=e.parentNode;t&&t.removeChild(e)}function d(t,n,r){var o,i,a,l={};for(a in n)"key"==a?o=n[a]:"ref"==a?i=n[a]:l[a]=n[a];if(arguments.length>2&&(l.children=arguments.length>3?e.call(arguments,2):r),"function"==typeof t&&null!=t.defaultProps)for(a in t.defaultProps)void 0===l[a]&&(l[a]=t.defaultProps[a]);return h(t,l,o,i,null)}function h(e,r,o,i,a){var l={type:e,props:r,key:o,ref:i,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:null==a?++n:a};return null==a&&null!=t.vnode&&t.vnode(l),l}function v(e){return e.children}function m(e,t){this.props=e,this.context=t}function y(e,t){if(null==t)return e.__?y(e.__,e.__.__k.indexOf(e)+1):null;for(var n;t0?h(_.type,_.props,_.key,null,_.__v):_)){if(_.__=n,_.__b=n.__b+1,null===(m=C[f])||m&&_.key==m.key&&_.type===m.type)C[f]=void 0;else for(d=0;d2&&(l.children=arguments.length>3?e.call(arguments,2):r),h(t.type,l,o||t.key,i||t.ref,null)},createContext:function(e,t){var n={__c:t="__cC"+l++,__:e,Consumer:function(e,t){return e.children(t)},Provider:function(e){var n,r;return this.getChildContext||(n=[],(r={})[t]=this,this.getChildContext=function(){return r},this.shouldComponentUpdate=function(e){this.props.value!==e.value&&n.some(b)},this.sub=function(e){n.push(e);var t=e.componentWillUnmount;e.componentWillUnmount=function(){n.splice(n.indexOf(e),1),t&&t.call(e)}}),e.children}};return n.Provider.__=n.Consumer.contextType=n},toChildArray:function e(t,n){return n=n||[],null==t||"boolean"==typeof t||(Array.isArray(t)?t.some((function(t){e(t,n)})):n.push(t)),n},get options(){return t}}),F=0,W=[],U=t.__b,B=t.__r,V=t.diffed,K=t.__c,z=t.unmount;function $(e,n){t.__h&&t.__h(j,e,F||n),F=0;var r=j.__H||(j.__H={__:[],__h:[]});return e>=r.__.length&&r.__.push({}),r.__[e]}function Y(e){return F=1,G(ie,e)}function G(e,t,n){var r=$(D++,2);return r.t=e,r.__c||(r.__=[n?n(t):ie(void 0,t),function(e){var t=r.t(r.__[0],e);r.__[0]!==t&&(r.__=[t,r.__[1]],r.__c.setState({}))}],r.__c=j),r.__}function X(e,n){var r=$(D++,3);!t.__s&&oe(r.__H,n)&&(r.__=e,r.__H=n,j.__H.__h.push(r))}function q(e,n){var r=$(D++,4);!t.__s&&oe(r.__H,n)&&(r.__=e,r.__H=n,j.__h.push(r))}function Z(e){return F=5,J((function(){return{current:e}}),[])}function J(e,t){var n=$(D++,7);return oe(n.__H,t)&&(n.__=e(),n.__H=t,n.__h=e),n.__}function Q(e,t){return F=8,J((function(){return e}),t)}function ee(){W.forEach((function(e){if(e.__P)try{e.__H.__h.forEach(ne),e.__H.__h.forEach(re),e.__H.__h=[]}catch(n){e.__H.__h=[],t.__e(n,e.__v)}})),W=[]}t.__b=function(e){j=null,U&&U(e)},t.__r=function(e){B&&B(e),D=0;var t=(j=e.__c).__H;t&&(t.__h.forEach(ne),t.__h.forEach(re),t.__h=[])},t.diffed=function(e){V&&V(e);var n=e.__c;n&&n.__H&&n.__H.__h.length&&(1!==W.push(n)&&H===t.requestAnimationFrame||((H=t.requestAnimationFrame)||function(e){var t,n=function(){clearTimeout(r),te&&cancelAnimationFrame(t),setTimeout(e)},r=setTimeout(n,100);te&&(t=requestAnimationFrame(n))})(ee)),j=null},t.__c=function(e,n){n.some((function(e){try{e.__h.forEach(ne),e.__h=e.__h.filter((function(e){return!e.__||re(e)}))}catch(r){n.some((function(e){e.__h&&(e.__h=[])})),n=[],t.__e(r,e.__v)}})),K&&K(e,n)},t.unmount=function(e){z&&z(e);var n=e.__c;if(n&&n.__H)try{n.__H.__.forEach(ne)}catch(e){t.__e(e,n.__v)}};var te="function"==typeof requestAnimationFrame;function ne(e){var t=j;"function"==typeof e.__c&&e.__c(),j=t}function re(e){var t=j;e.__c=e.__(),j=t}function oe(e,t){return!e||e.length!==t.length||t.some((function(t,n){return t!==e[n]}))}function ie(e,t){return"function"==typeof t?t(e):t}var ae=Object.freeze({__proto__:null,useState:Y,useReducer:G,useEffect:X,useLayoutEffect:q,useRef:Z,useImperativeHandle:function(e,t,n){F=6,q((function(){"function"==typeof e?e(t()):e&&(e.current=t())}),null==n?n:n.concat(e))},useMemo:J,useCallback:Q,useContext:function(e){var t=j.context[e.__c],n=$(D++,9);return n.c=e,t?(null==n.__&&(n.__=!0,t.sub(j)),t.props.value):e.__},useDebugValue:function(e,n){t.useDebugValue&&t.useDebugValue(n?n(e):e)},useErrorBoundary:function(e){var t=$(D++,10),n=Y();return t.__=e,j.componentDidCatch||(j.componentDidCatch=function(e){t.__&&t.__(e),n[1](e)}),[n[0],function(){n[1](void 0)}]}}),le="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function se(e){if(e.__esModule)return e;var t=Object.defineProperty({},"__esModule",{value:!0});return Object.keys(e).forEach((function(n){var r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:function(){return e[n]}})})),t}var ue={},ce=se(ae),pe=se(M);function fe(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}!function(e){var t=ce,n=pe;function r(e,t){for(var n in t)e[n]=t[n];return e}function o(e,t){for(var n in e)if("__source"!==n&&!(n in t))return!0;for(var r in t)if("__source"!==r&&e[r]!==t[r])return!0;return!1}function i(e){this.props=e}function a(e,t){function r(e){var n=this.props.ref,r=n==e.ref;return!r&&n&&(n.call?n(null):n.current=null),t?!t(this.props,e)||!r:o(this.props,e)}function i(t){return this.shouldComponentUpdate=r,n.createElement(e,t)}return i.displayName="Memo("+(e.displayName||e.name)+")",i.prototype.isReactComponent=!0,i.__f=!0,i}(i.prototype=new n.Component).isPureReactComponent=!0,i.prototype.shouldComponentUpdate=function(e,t){return o(this.props,e)||o(this.state,t)};var l=n.options.__b;n.options.__b=function(e){e.type&&e.type.__f&&e.ref&&(e.props.ref=e.ref,e.ref=null),l&&l(e)};var s="undefined"!=typeof Symbol&&Symbol.for&&Symbol.for("react.forward_ref")||3911;function u(e){function t(t,n){var o=r({},t);return delete o.ref,e(o,(n=t.ref||n)&&("object"!=typeof n||"current"in n)?n:null)}return t.$$typeof=s,t.render=t,t.prototype.isReactComponent=t.__f=!0,t.displayName="ForwardRef("+(e.displayName||e.name)+")",t}var c=function(e,t){return null==e?null:n.toChildArray(n.toChildArray(e).map(t))},p={map:c,forEach:c,count:function(e){return e?n.toChildArray(e).length:0},only:function(e){var t=n.toChildArray(e);if(1!==t.length)throw"Children.only";return t[0]},toArray:n.toChildArray},f=n.options.__e;n.options.__e=function(e,t,n){if(e.then)for(var r,o=t;o=o.__;)if((r=o.__c)&&r.__c)return null==t.__e&&(t.__e=n.__e,t.__k=n.__k),r.__c(e,t);f(e,t,n)};var d=n.options.unmount;function h(){this.__u=0,this.t=null,this.__b=null}function v(e){var t=e.__.__c;return t&&t.__e&&t.__e(e)}function m(e){var t,r,o;function i(i){if(t||(t=e()).then((function(e){r=e.default||e}),(function(e){o=e})),o)throw o;if(!r)throw t;return n.createElement(r,i)}return i.displayName="Lazy",i.__f=!0,i}function y(){this.o=null,this.u=null}n.options.unmount=function(e){var t=e.__c;t&&t.__R&&t.__R(),t&&!0===e.__h&&(e.type=null),d&&d(e)},(h.prototype=new n.Component).__c=function(e,t){var n=t.__c,r=this;null==r.t&&(r.t=[]),r.t.push(n);var o=v(r.__v),i=!1,a=function(){i||(i=!0,n.__R=null,o?o(l):l())};n.__R=a;var l=function(){if(!--r.__u){if(r.state.__e){var e=r.state.__e;r.__v.__k[0]=function e(t,n,r){return t&&(t.__v=null,t.__k=t.__k&&t.__k.map((function(t){return e(t,n,r)})),t.__c&&t.__c.__P===n&&(t.__e&&r.insertBefore(t.__e,t.__d),t.__c.__e=!0,t.__c.__P=r)),t}(e,e.__c.__P,e.__c.__O)}var t;for(r.setState({__e:r.__b=null});t=r.t.pop();)t.forceUpdate()}},s=!0===t.__h;r.__u++||s||r.setState({__e:r.__b=r.__v.__k[0]}),e.then(a,a)},h.prototype.componentWillUnmount=function(){this.t=[]},h.prototype.render=function(e,t){if(this.__b){if(this.__v.__k){var o=document.createElement("div"),i=this.__v.__k[0].__c;this.__v.__k[0]=function e(t,n,o){return t&&(t.__c&&t.__c.__H&&(t.__c.__H.__.forEach((function(e){"function"==typeof e.__c&&e.__c()})),t.__c.__H=null),null!=(t=r({},t)).__c&&(t.__c.__P===o&&(t.__c.__P=n),t.__c=null),t.__k=t.__k&&t.__k.map((function(t){return e(t,n,o)}))),t}(this.__b,o,i.__O=i.__P)}this.__b=null}var a=t.__e&&n.createElement(n.Fragment,null,e.fallback);return a&&(a.__h=null),[n.createElement(n.Fragment,null,t.__e?null:e.children),a]};var _=function(e,t,n){if(++n[1]===n[0]&&e.u.delete(t),e.props.revealOrder&&("t"!==e.props.revealOrder[0]||!e.u.size))for(n=e.o;n;){for(;n.length>3;)n.pop()();if(n[1]>>1,1),t.i.removeChild(e)}}),n.render(n.createElement(b,{context:t.context},e.__v),t.l)):t.l&&t.componentWillUnmount()}function E(e,t){return n.createElement(g,{__v:e,i:t})}(y.prototype=new n.Component).__e=function(e){var t=this,n=v(t.__v),r=t.u.get(e);return r[0]++,function(o){var i=function(){t.props.revealOrder?(r.push(o),_(t,e,r)):o()};n?n(i):i()}},y.prototype.render=function(e){this.o=null,this.u=new Map;var t=n.toChildArray(e.children);e.revealOrder&&"b"===e.revealOrder[0]&&t.reverse();for(var r=t.length;r--;)this.u.set(t[r],this.o=[1,0,this.o]);return e.children},y.prototype.componentDidUpdate=y.prototype.componentDidMount=function(){var e=this;this.u.forEach((function(t,n){_(e,n,t)}))};var O="undefined"!=typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103,w=/^(?:accent|alignment|arabic|baseline|cap|clip(?!PathU)|color|dominant|fill|flood|font|glyph(?!R)|horiz|marker(?!H|W|U)|overline|paint|stop|strikethrough|stroke|text(?!L)|underline|unicode|units|v|vector|vert|word|writing|x(?!C))[A-Z]/,C="undefined"!=typeof document,k=function(e){return("undefined"!=typeof Symbol&&"symbol"==typeof Symbol()?/fil|che|rad/i:/fil|che|ra/i).test(e)};function x(e,t,r){return null==t.__k&&(t.textContent=""),n.render(e,t),"function"==typeof r&&r(),e?e.__c:null}function S(e,t,r){return n.hydrate(e,t),"function"==typeof r&&r(),e?e.__c:null}n.Component.prototype.isReactComponent={},["componentWillMount","componentWillReceiveProps","componentWillUpdate"].forEach((function(e){Object.defineProperty(n.Component.prototype,e,{configurable:!0,get:function(){return this["UNSAFE_"+e]},set:function(t){Object.defineProperty(this,e,{configurable:!0,writable:!0,value:t})}})}));var T=n.options.event;function N(){}function R(){return this.cancelBubble}function P(){return this.defaultPrevented}n.options.event=function(e){return T&&(e=T(e)),e.persist=N,e.isPropagationStopped=R,e.isDefaultPrevented=P,e.nativeEvent=e};var L,A={configurable:!0,get:function(){return this.class}},I=n.options.vnode;n.options.vnode=function(e){var t=e.type,r=e.props,o=r;if("string"==typeof t){var i=-1===t.indexOf("-");for(var a in o={},r){var l=r[a];C&&"children"===a&&"noscript"===t||"value"===a&&"defaultValue"in r&&null==l||("defaultValue"===a&&"value"in r&&null==r.value?a="value":"download"===a&&!0===l?l="":/ondoubleclick/i.test(a)?a="ondblclick":/^onchange(textarea|input)/i.test(a+t)&&!k(r.type)?a="oninput":/^on(Ani|Tra|Tou|BeforeInp)/.test(a)?a=a.toLowerCase():i&&w.test(a)?a=a.replace(/[A-Z0-9]/,"-$&").toLowerCase():null===l&&(l=void 0),o[a]=l)}"select"==t&&o.multiple&&Array.isArray(o.value)&&(o.value=n.toChildArray(r.children).forEach((function(e){e.props.selected=-1!=o.value.indexOf(e.props.value)}))),"select"==t&&null!=o.defaultValue&&(o.value=n.toChildArray(r.children).forEach((function(e){e.props.selected=o.multiple?-1!=o.defaultValue.indexOf(e.props.value):o.defaultValue==e.props.value}))),e.props=o}t&&r.class!=r.className&&(A.enumerable="className"in r,null!=r.className&&(o.class=r.className),Object.defineProperty(o,"className",A)),e.$$typeof=O,I&&I(e)};var D=n.options.__r;n.options.__r=function(e){D&&D(e),L=e.__c};var j={ReactCurrentDispatcher:{current:{readContext:function(e){return L.__n[e.__c].props.value}}}};function H(e){return n.createElement.bind(null,e)}function M(e){return!!e&&e.$$typeof===O}function F(e){return M(e)?n.cloneElement.apply(null,arguments):e}function W(e){return!!e.__k&&(n.render(null,e),!0)}function U(e){return e&&(e.base||1===e.nodeType&&e)||null}var B=function(e,t){return e(t)},V=function(e,t){return e(t)},K=n.Fragment,z={useState:t.useState,useReducer:t.useReducer,useEffect:t.useEffect,useLayoutEffect:t.useLayoutEffect,useRef:t.useRef,useImperativeHandle:t.useImperativeHandle,useMemo:t.useMemo,useCallback:t.useCallback,useContext:t.useContext,useDebugValue:t.useDebugValue,version:"17.0.2",Children:p,render:x,hydrate:S,unmountComponentAtNode:W,createPortal:E,createElement:n.createElement,createContext:n.createContext,createFactory:H,cloneElement:F,createRef:n.createRef,Fragment:n.Fragment,isValidElement:M,findDOMNode:U,Component:n.Component,PureComponent:i,memo:a,forwardRef:u,flushSync:V,unstable_batchedUpdates:B,StrictMode:K,Suspense:h,SuspenseList:y,lazy:m,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:j};Object.keys(t).forEach((function(n){e[n]=t[n]})),e.createElement=n.createElement,e.createContext=n.createContext,e.createRef=n.createRef,e.Fragment=n.Fragment,e.Component=n.Component,e.version="17.0.2",e.Children=p,e.render=x,e.hydrate=S,e.unmountComponentAtNode=W,e.createPortal=E,e.createFactory=H,e.cloneElement=F,e.isValidElement=M,e.findDOMNode=U,e.PureComponent=i,e.memo=a,e.forwardRef=u,e.flushSync=V,e.unstable_batchedUpdates=B,e.StrictMode=K,e.Suspense=h,e.SuspenseList=y,e.lazy=m,e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=j,e.default=z}(ue);var de=function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)};fe(de,"ripple",!1),fe(de,"locale","en"),fe(de,"autoZIndex",!0),fe(de,"zIndex",{modal:1100,overlay:1e3,menu:1e3,tooltip:1100,toast:1200}),fe(de,"appendTo",null);var he=Object.freeze({ALIGN_CENTER:"pi pi-align-center",ALIGN_JUSTIFY:"pi pi-align-justify",ALIGN_LEFT:"pi pi-align-left",ALIGN_RIGHT:"pi pi-align-right",AMAZON:"pi pi-amazon",ANDROID:"pi pi-android",ANGLE_DOUBLE_DOWN:"pi pi-angle-double-down",ANGLE_DOUBLE_LEFT:"pi pi-angle-double-left",ANGLE_DOUBLE_RIGHT:"pi pi-angle-double-right",ANGLE_DOUBLE_UP:"pi pi-angle-double-up",ANGLE_DOWN:"pi pi-angle-down",ANGLE_LEFT:"pi pi-angle-left",ANGLE_RIGHT:"pi pi-angle-right",ANGLE_UP:"pi pi-angle-up",APPLE:"pi pi-apple",ARROW_CIRCLE_DOWN:"pi pi-arrow-circle-down",ARROW_CIRCLE_LEFT:"pi pi-arrow-circle-left",ARROW_CIRCLE_RIGHT:"pi pi-arrow-circle-right",ARROW_CIRCLE_UP:"pi pi-arrow-circle-up",ARROW_DOWN:"pi pi-arrow-down",ARROW_LEFT:"pi pi-arrow-left",ARROW_RIGHT:"pi pi-arrow-right",ARROW_UP:"pi pi-arrow-up",BACKWARD:"pi pi-backward",BAN:"pi pi-ban",BARS:"pi pi-bars",BELL:"pi pi-bell",BOOK:"pi pi-book",BOOKMARK:"pi pi-bookmark",BRIEFCASE:"pi pi-briefcase",CALENDAR_MINUS:"pi pi-calendar-minus",CALENDAR_PLUS:"pi pi-calendar-plus",CALENDAR_TIMES:"pi pi-calendar-times",CALENDAR:"pi pi-calendar",CAMERA:"pi pi-camera",CARET_DOWN:"pi pi-caret-down",CARET_LEFT:"pi pi-caret-left",CARET_RIGHT:"pi pi-caret-right",CARET_UP:"pi pi-caret-up",CHART_BAR:"pi pi-chart-bar",CHART_LINE:"pi pi-chart-line",CHECK_CIRCLE:"pi pi-check-circle",CHECK_SQUARE:"pi pi-check-square",CHECK:"pi pi-check",CHEVRON_CIRCLE_DOWN:"pi pi-chevron-circle-down",CHEVRON_CIRCLE_LEFT:"pi pi-chevron-circle-left",CHEVRON_CIRCLE_RIGHT:"pi pi-chevron-circle-right",CHEVRON_CIRCLE_UP:"pi pi-chevron-circle-up",CHEVRON_DOWN:"pi pi-chevron-down",CHEVRON_LEFT:"pi pi-chevron-left",CHEVRON_RIGHT:"pi pi-chevron-right",CHEVRON_UP:"pi pi-chevron-up",CLOCK:"pi pi-clock",CLONE:"pi pi-clone",CLOUD_DOWNLOAD:"pi pi-cloud-download",CLOUD_UPLOAD:"pi pi-cloud-upload",CLOUD:"pi pi-cloud",COG:"pi pi-cog",COMMENT:"pi pi-comment",COMMENTS:"pi pi-comments",COMPASS:"pi pi-compass",COPY:"pi pi-copy",CREDIT_CARD:"pi pi-credit-card",DESKTOP:"pi pi-desktop",DISCORD:"pi pi-discord",DIRECTIONS_ALT:"pi pi-directions-alt",DIRECTIONS:"pi pi-directions",DOLLAR:"pi pi-dollar",DOWNLOAD:"pi pi-download",EJECT:"pi pi-eject",ELLIPSIS_H:"pi pi-ellipsis-h",ELLIPSIS_V:"pi pi-ellipsis-v",ENVELOPE:"pi pi-envelope",EXCLAMATION_CIRCLE:"pi pi-exclamation-circle",EXCLAMATION_TRIANGLE:"pi pi-exclamation-triangle ",EXTERNAL_LINK:"pi pi-external-link",EYE_SLASH:"pi pi-eye-slash",EYE:"pi pi-eye",FACEBOOK:"pi pi-facebook",FAST_BACKWARD:"pi pi-fast-backward",FAST_FORWARD:"pi pi-fast-forward",FILE_EXCEL:"pi pi-file-excel",FILE_O:"pi pi-file-o",FILE_PDF:"pi pi-file-pdf",FILE:"pi pi-file",FILTER:"pi pi-filter",FILTER_SLASH:"pi pi-filter-slash",FLAG:"pi pi-flag",FOLDER_OPEN:"pi pi-folder-open",FOLDER:"pi pi-folder",FORWARD:"pi pi-forward",GITHUB:"pi pi-github",GLOBE:"pi pi-globe",GOOGLE:"pi pi-google",HEART:"pi pi-heart",HOME:"pi pi-home",ID_CARD:"pi pi-id-card",IMAGE:"pi pi-image",IMAGES:"pi pi-images",INBOX:"pi pi-inbox",INFO_CIRCLE:"pi pi-info-circle",INFO:"pi pi-info",KEY:"pi pi-key",LINK:"pi pi-link",LIST:"pi pi-list",LOCK_OPEN:"pi pi-lock-open",LOCK:"pi pi-lock",MAP:"pi pi-map",MAP_MARKER:"pi pi-map-marker",MICROSOFT:"pi pi-microsoft",MINUS_CIRCLE:"pi pi-minus-circle",MINUS:"pi pi-minus",MOBILE:"pi pi-mobile",MONEY_BILL:"pi pi-money-bill",MOON:"pi pi-moon",PALETTE:"pi pi-palette",PAPERCLIP:"pi pi-paperclip",PAUSE:"pi pi-pause",PAYPAL:"pi pi-paypal",PENCIL:"pi pi-pencil",PERCENTAGE:"pi pi-percentage",PHONE:"pi pi-phone",PLAY:"pi pi-play",PLUS_CIRCLE:"pi pi-plus-circle",PLUS:"pi pi-plus",POWER_OFF:"pi pi-power-off",PRINT:"pi pi-print",QUESTION_CIRCLE:"pi pi-question-circle",QUESTION:"pi pi-question",RADIO_OFF:"pi pi-radio-off",RADIO_ON:"pi pi-radio-on",REFRESH:"pi pi-refresh",REPLAY:"pi pi-replay",REPLY:"pi pi-reply",SAVE:"pi pi-save",SEARCH_MINUS:"pi pi-search-minus",SEARCH_PLUS:"pi pi-search-plus",SEARCH:"pi pi-search",SEND:"pi pi-send",SHARE_ALT:"pi pi-share-alt",SHIELD:"pi pi-shield",SHOPPING_CART:"pi pi-shopping-cart",SIGN_IN:"pi pi-sign-in",SIGN_OUT:"pi pi-sign-out",SITEMAP:"pi pi-sitemap",SLACK:"pi pi-slack",SLIDERS_H:"pi pi-sliders-h",SLIDERS_V:"pi pi-sliders-v",SORT_ALPHA_ALT_DOWN:"pi pi-sort-alpha-alt-down",SORT_ALPHA_ALT_UP:"pi pi-sort-alpha-alt-up",SORT_ALPHA_DOWN:"pi pi-sort-alpha-down",SORT_ALPHA_UP:"pi pi-sort-alpha-up",SORT_ALT:"pi pi-sort-alt",SORT_AMOUNT_DOWN_ALT:"pi pi-sort-amount-down-alt",SORT_AMOUNT_DOWN:"pi pi-sort-amount-down",SORT_AMOUNT_UP_ALT:"pi pi-sort-amount-up-alt",SORT_AMOUNT_UP:"pi pi-sort-amount-up",SORT_DOWN:"pi pi-sort-down",SORT_NUMERIC_ALT_DOWN:"pi pi-sort-numeric-alt-down",SORT_NUMERIC_ALT_UP:"pi pi-sort-numeric-alt-up",SORT_NUMERIC_DOWN:"pi pi-sort-numeric-down",SORT_NUMERIC_UP:"pi pi-sort-numeric-up",SORT_UP:"pi pi-sort-up",SORT:"pi pi-sort",SPINNER:"pi pi-spinner",STAR_O:"pi pi-star-o",STAR:"pi pi-star",STEP_BACKWARD_ALT:"pi pi-step-backward-alt",STEP_BACKWARD:"pi pi-step-backward",STEP_FORWARD_ALT:"pi pi-step-forward-alt",STEP_FORWARD:"pi pi-step-forward",SUN:"pi pi-sun",TABLE:"pi pi-table",TABLET:"pi pi-tablet",TAG:"pi pi-tag",TAGS:"pi pi-tags",TH_LARGE:"pi pi-th-large",THUMBS_DOWN:"pi pi-thumbs-down",THUMBS_UP:"pi pi-thumbs-up",TICKET:"pi pi-ticket",TIMES_CIRCLE:"pi pi-times-circle",TIMES:"pi pi-times",TRASH:"pi pi-trash",TWITTER:"pi pi-twitter",UNDO:"pi pi-undo",UNLOCK:"pi pi-unlock",UPLOAD:"pi pi-upload",USER_EDIT:"pi pi-user-edit",USER_MINUS:"pi pi-user-minus",USER_PLUS:"pi pi-user-plus",USER:"pi pi-user",USERS:"pi pi-users",VIDEO:"pi pi-video",VIMEO:"pi pi-vimeo",VOLUME_DOWN:"pi pi-volume-down",VOLUME_OFF:"pi pi-volume-off",VOLUME_UP:"pi pi-volume-up",YOUTUBE:"pi pi-youtube",WALLET:"pi pi-wallet",WIFI:"pi pi-wifi",WINDOW_MAXIMIZE:"pi pi-window-maximize",WINDOW_MINIMIZE:"pi pi-window-minimize"});function ve(){return ve=Object.assign||function(e){for(var t=1;t=0||(o[n]=e[n]);return o}function ye(e,t){return ye=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},ye(e,t)}function _e(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,ye(e,t)}Object.freeze({SUCCESS:"success",INFO:"info",WARN:"warn",ERROR:"error"});function be(){}function ge(){}ge.resetWarningCache=be;function Ee(e,t){return e.replace(new RegExp("(^|\\s)"+t+"(?:\\s|$)","g"),"$1").replace(/\s+/g," ").replace(/^\s*|\s*$/g,"")}!function(){function e(e,t,n,r,o,i){if("SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"!==i){var a=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw a.name="Invariant Violation",a}}function t(){return e}e.isRequired=e;var n={array:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:ge,resetWarningCache:be};n.PropTypes=n}();var Oe=!1,we=ue.createContext(null),Ce="unmounted",ke="exited",xe="entering",Se="entered",Te="exiting",Ne=function(e){function t(t,n){var r;r=e.call(this,t,n)||this;var o,i=n&&!n.isMounting?t.enter:t.appear;return r.appearStatus=null,t.in?i?(o=ke,r.appearStatus=xe):o=Se:o=t.unmountOnExit||t.mountOnEnter?Ce:ke,r.state={status:o},r.nextCallback=null,r}_e(t,e),t.getDerivedStateFromProps=function(e,t){return e.in&&t.status===Ce?{status:ke}: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!==xe&&n!==Se&&(t=xe):n!==xe&&n!==Se||(t=Te)}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){void 0===e&&(e=!1),null!==t?(this.cancelNextCallback(),t===xe?this.performEnter(e):this.performExit()):this.props.unmountOnExit&&this.state.status===ke&&this.setState({status:Ce})},n.performEnter=function(e){var t=this,n=this.props.enter,r=this.context?this.context.isMounting:e,o=this.props.nodeRef?[r]:[ue.findDOMNode(this),r],i=o[0],a=o[1],l=this.getTimeouts(),s=r?l.appear:l.enter;!e&&!n||Oe?this.safeSetState({status:Se},(function(){t.props.onEntered(i)})):(this.props.onEnter(i,a),this.safeSetState({status:xe},(function(){t.props.onEntering(i,a),t.onTransitionEnd(s,(function(){t.safeSetState({status:Se},(function(){t.props.onEntered(i,a)}))}))})))},n.performExit=function(){var e=this,t=this.props.exit,n=this.getTimeouts(),r=this.props.nodeRef?void 0:ue.findDOMNode(this);t&&!Oe?(this.props.onExit(r),this.safeSetState({status:Te},(function(){e.props.onExiting(r),e.onTransitionEnd(n.exit,(function(){e.safeSetState({status:ke},(function(){e.props.onExited(r)}))}))}))):this.safeSetState({status:ke},(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:ue.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],i=o[0],a=o[1];this.props.addEndListener(i,a)}null!=e&&setTimeout(this.nextCallback,e)}else setTimeout(this.nextCallback,0)},n.render=function(){var e=this.state.status;if(e===Ce)return null;var t=this.props,n=t.children;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;var r=me(t,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]);return ue.createElement(we.Provider,{value:null},"function"==typeof n?n(e,r):ue.cloneElement(ue.Children.only(n),r))},t}(ue.Component);function Re(){}Ne.contextType=we,Ne.propTypes={},Ne.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:Re,onEntering:Re,onEntered:Re,onExit:Re,onExiting:Re,onExited:Re},Ne.UNMOUNTED=Ce,Ne.EXITED=ke,Ne.ENTERING=xe,Ne.ENTERED=Se,Ne.EXITING=Te;var Pe=Ne,Le=function(e,t){return e&&t&&t.split(" ").forEach((function(t){return r=t,void((n=e).classList?n.classList.add(r):function(e,t){return e.classList?!!t&&e.classList.contains(t):-1!==(" "+(e.className.baseVal||e.className)+" ").indexOf(" "+t+" ")}(n,r)||("string"==typeof n.className?n.className=n.className+" "+r:n.setAttribute("class",(n.className&&n.className.baseVal||"")+" "+r)));var n,r}))},Ae=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=Ee(n.className,r):n.setAttribute("class",Ee(n.className&&n.className.baseVal||"",r)));var n,r}))},Ie=function(e){function t(){for(var t,n=arguments.length,r=new Array(n),o=0;oe.length)&&(t=e.length);for(var n=0,r=new Array(t);n=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,l=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){l=!0,i=e},f:function(){try{a||null==n.return||n.return()}finally{if(l)throw i}}}}function qe(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);nf.height?((n=u.top+c-i)<0&&(n=c),e.style.transformOrigin="bottom"):(n=l+u.top+c,e.style.transformOrigin="top"),r=u.left+s+a>f.width?Math.max(0,u.left+p+s-a):u.left+p,e.style.top=n+"px",e.style.left=r+"px"}}},{key:"relativePosition",value:function(e,t){if(e){var n,r,o=e.offsetParent?{width:e.offsetWidth,height:e.offsetHeight}:this.getHiddenElementDimensions(e),i=t.offsetHeight,a=t.getBoundingClientRect(),l=this.getViewport();a.top+i+o.height>l.height?(n=-1*o.height,a.top+n<0&&(n=-1*a.top),e.style.transformOrigin="bottom"):(n=i,e.style.transformOrigin="top"),r=o.width>l.width?-1*a.left:a.left+o.width>l.width?-1*(a.left+o.width-l.width):0,e.style.top=n+"px",e.style.left=r+"px"}}},{key:"flipfitCollision",value:function(t,n){var r=this,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"left top",i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"left bottom",a=arguments.length>4?arguments[4]:void 0,l=n.getBoundingClientRect(),s=this.getViewport(),u=o.split(" "),c=i.split(" "),p=function(e,t){return t?+e.substring(e.search(/(\+|-)/g))||0:e.substring(0,e.search(/(\+|-)/g))||e},f={my:{x:p(u[0]),y:p(u[1]||u[0]),offsetX:p(u[0],!0),offsetY:p(u[1]||u[0],!0)},at:{x:p(c[0]),y:p(c[1]||c[0]),offsetX:p(c[0],!0),offsetY:p(c[1]||c[0],!0)}},d={left:function(){return f.my.offsetX+f.at.offsetX+l.left+("left"===f.my.x?0:-1*("center"===f.my.x?r.getOuterWidth(t)/2:r.getOuterWidth(t)))},top:function(){return f.my.offsetY+f.at.offsetY+l.top+("top"===f.my.y?0:-1*("center"===f.my.y?r.getOuterHeight(t)/2:r.getOuterHeight(t)))}},h={count:{x:0,y:0},left:function(){var n=d.left(),r=e.getWindowScrollLeft();t.style.left=n+r+"px",2===this.count.x?(t.style.left=r+"px",this.count.x=0):n<0&&(this.count.x++,f.my.x="left",f.at.x="right",f.my.offsetX*=-1,f.at.offsetX*=-1,this.right())},right:function(){var r=d.left()+e.getOuterWidth(n),o=e.getWindowScrollLeft();t.style.left=r+o+"px",2===this.count.x?(t.style.left=s.width-e.getOuterWidth(t)+o+"px",this.count.x=0):r+e.getOuterWidth(t)>s.width&&(this.count.x++,f.my.x="right",f.at.x="left",f.my.offsetX*=-1,f.at.offsetX*=-1,this.left())},top:function(){var n=d.top(),r=e.getWindowScrollTop();t.style.top=n+r+"px",2===this.count.y?(t.style.left=r+"px",this.count.y=0):n<0&&(this.count.y++,f.my.y="top",f.at.y="bottom",f.my.offsetY*=-1,f.at.offsetY*=-1,this.bottom())},bottom:function(){var r=d.top()+e.getOuterHeight(n),o=e.getWindowScrollTop();t.style.top=r+o+"px",2===this.count.y?(t.style.left=s.height-e.getOuterHeight(t)+o+"px",this.count.y=0):r+e.getOuterHeight(n)>s.height&&(this.count.y++,f.my.y="bottom",f.at.y="top",f.my.offsetY*=-1,f.at.offsetY*=-1,this.top())},center:function(r){if("y"===r){var o=d.top()+e.getOuterHeight(n)/2;t.style.top=o+e.getWindowScrollTop()+"px",o<0?this.bottom():o+e.getOuterHeight(n)>s.height&&this.top()}else{var i=d.left()+e.getOuterWidth(n)/2;t.style.left=i+e.getWindowScrollLeft()+"px",i<0?this.left():i+e.getOuterWidth(t)>s.width&&this.right()}}};h[f.at.x]("x"),h[f.at.y]("y"),this.isFunction(a)&&a(f)}},{key:"findCollisionPosition",value:function(e){if(e){var t="left"===e?"right":"left";return"top"===e||"bottom"===e?{axis:"y",my:"center ".concat("top"===e?"bottom":"top"),at:"center ".concat(e)}:{axis:"x",my:"".concat(t," center"),at:"".concat(e," center")}}}},{key:"getParents",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return null===e.parentNode?t:this.getParents(e.parentNode,t.concat([e.parentNode]))}},{key:"getScrollableParents",value:function(e){var t=[];if(e){var n,r=this.getParents(e),o=/(auto|scroll)/,i=function(e){var t=window.getComputedStyle(e,null);return o.test(t.getPropertyValue("overflow"))||o.test(t.getPropertyValue("overflowX"))||o.test(t.getPropertyValue("overflowY"))},a=Xe(r);try{for(a.s();!(n=a.n()).done;){var l=n.value,s=1===l.nodeType&&l.dataset.scrollselectors;if(s){var u,c=Xe(s.split(","));try{for(c.s();!(u=c.n()).done;){var p=u.value,f=this.findSingle(l,p);f&&i(f)&&t.push(f)}}catch(e){c.e(e)}finally{c.f()}}9!==l.nodeType&&i(l)&&t.push(l)}}catch(e){a.e(e)}finally{a.f()}}return t}},{key:"getHiddenElementOuterHeight",value:function(e){if(e){e.style.visibility="hidden",e.style.display="block";var t=e.offsetHeight;return e.style.display="",e.style.visibility="",t}return 0}},{key:"getHiddenElementOuterWidth",value:function(e){if(e){e.style.visibility="hidden",e.style.display="block";var t=e.offsetWidth;return e.style.display="",e.style.visibility="",t}return 0}},{key:"getHiddenElementDimensions",value:function(e){var t={};return e&&(e.style.visibility="hidden",e.style.display="block",t.width=e.offsetWidth,t.height=e.offsetHeight,e.style.display="",e.style.visibility=""),t}},{key:"fadeIn",value:function(e,t){if(e){e.style.opacity=0;var n=+new Date,r=0;!function o(){r=+e.style.opacity+((new Date).getTime()-n)/t,e.style.opacity=r,n=+new Date,+r<1&&(window.requestAnimationFrame&&requestAnimationFrame(o)||setTimeout(o,16))}()}}},{key:"fadeOut",value:function(e,t){if(e)var n=1,r=50/t,o=setInterval((function(){(n-=r)<=0&&(n=0,clearInterval(o)),e.style.opacity=n}),50)}},{key:"getUserAgent",value:function(){return navigator.userAgent}},{key:"isIOS",value:function(){return/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream}},{key:"isAndroid",value:function(){return/(android)/i.test(navigator.userAgent)}},{key:"isTouchDevice",value:function(){return"ontouchstart"in window||navigator.maxTouchPoints>0||navigator.msMaxTouchPoints>0}},{key:"isFunction",value:function(e){return!!(e&&e.constructor&&e.call&&e.apply)}},{key:"appendChild",value:function(e,t){if(this.isElement(t))t.appendChild(e);else{if(!t.el||!t.el.nativeElement)throw new Error("Cannot append "+t+" to "+e);t.el.nativeElement.appendChild(e)}}},{key:"removeChild",value:function(e,t){if(this.isElement(t))t.removeChild(e);else{if(!t.el||!t.el.nativeElement)throw new Error("Cannot remove "+e+" from "+t);t.el.nativeElement.removeChild(e)}}},{key:"isElement",value:function(e){return"object"===("undefined"==typeof HTMLElement?"undefined":Ke(HTMLElement))?e instanceof HTMLElement:e&&"object"===Ke(e)&&null!==e&&1===e.nodeType&&"string"==typeof e.nodeName}},{key:"scrollInView",value:function(e,t){var n=getComputedStyle(e).getPropertyValue("borderTopWidth"),r=n?parseFloat(n):0,o=getComputedStyle(e).getPropertyValue("paddingTop"),i=o?parseFloat(o):0,a=e.getBoundingClientRect(),l=t.getBoundingClientRect().top+document.body.scrollTop-(a.top+document.body.scrollTop)-r-i,s=e.scrollTop,u=e.clientHeight,c=this.getOuterHeight(t);l<0?e.scrollTop=s+l:l+c>u&&(e.scrollTop=s+l-u+c)}},{key:"clearSelection",value:function(){if(window.getSelection)window.getSelection().empty?window.getSelection().empty():window.getSelection().removeAllRanges&&window.getSelection().rangeCount>0&&window.getSelection().getRangeAt(0).getClientRects().length>0&&window.getSelection().removeAllRanges();else if(document.selection&&document.selection.empty)try{document.selection.empty()}catch(e){}}},{key:"calculateScrollbarWidth",value:function(e){if(e){var t=getComputedStyle(e);return e.offsetWidth-e.clientWidth-parseFloat(t.borderLeftWidth)-parseFloat(t.borderRightWidth)}if(null!=this.calculatedScrollbarWidth)return this.calculatedScrollbarWidth;var n=document.createElement("div");n.className="p-scrollbar-measure",document.body.appendChild(n);var r=n.offsetWidth-n.clientWidth;return document.body.removeChild(n),this.calculatedScrollbarWidth=r,r}},{key:"getBrowser",value:function(){if(!this.browser){var e=this.resolveUserAgent();this.browser={},e.browser&&(this.browser[e.browser]=!0,this.browser.version=e.version),this.browser.chrome?this.browser.webkit=!0:this.browser.webkit&&(this.browser.safari=!0)}return this.browser}},{key:"resolveUserAgent",value:function(){var e=navigator.userAgent.toLowerCase(),t=/(chrome)[ ]([\w.]+)/.exec(e)||/(webkit)[ ]([\w.]+)/.exec(e)||/(opera)(?:.*version|)[ ]([\w.]+)/.exec(e)||/(msie) ([\w.]+)/.exec(e)||e.indexOf("compatible")<0&&/(mozilla)(?:.*? rv:([\w.]+)|)/.exec(e)||[];return{browser:t[1]||"",version:t[2]||"0"}}},{key:"isVisible",value:function(e){return e&&null!=e.offsetParent}},{key:"getFocusableElements",value:function(t){var n,r=[],o=Xe(e.find(t,'button:not([tabindex = "-1"]):not([disabled]):not([style*="display:none"]):not([hidden]),\n [href][clientHeight][clientWidth]:not([tabindex = "-1"]):not([disabled]):not([style*="display:none"]):not([hidden]),\n input:not([tabindex = "-1"]):not([disabled]):not([style*="display:none"]):not([hidden]), select:not([tabindex = "-1"]):not([disabled]):not([style*="display:none"]):not([hidden]),\n textarea:not([tabindex = "-1"]):not([disabled]):not([style*="display:none"]):not([hidden]), [tabIndex]:not([tabIndex = "-1"]):not([disabled]):not([style*="display:none"]):not([hidden]),\n [contenteditable]:not([tabIndex = "-1"]):not([disabled]):not([style*="display:none"]):not([hidden])'));try{for(o.s();!(n=o.n()).done;){var i=n.value;"none"!==getComputedStyle(i).display&&"hidden"!==getComputedStyle(i).visibility&&r.push(i)}}catch(e){o.e(e)}finally{o.f()}return r}},{key:"getFirstFocusableElement",value:function(t){var n=e.getFocusableElements(t);return n.length>0?n[0]:null}},{key:"getLastFocusableElement",value:function(t){var n=e.getFocusableElements(t);return n.length>0?n[n.length-1]:null}},{key:"getCursorOffset",value:function(e,t,n,r){if(e){var o=getComputedStyle(e),i=document.createElement("div");i.style.position="absolute",i.style.top="0px",i.style.left="0px",i.style.visibility="hidden",i.style.pointerEvents="none",i.style.overflow=o.overflow,i.style.width=o.width,i.style.height=o.height,i.style.padding=o.padding,i.style.border=o.border,i.style.overflowWrap=o.overflowWrap,i.style.whiteSpace=o.whiteSpace,i.style.lineHeight=o.lineHeight,i.innerHTML=t.replace(/\r\n|\r|\n/g,"
");var a=document.createElement("span");a.textContent=r,i.appendChild(a);var l=document.createTextNode(n);i.appendChild(l),document.body.appendChild(i);var s=a.offsetLeft,u=a.offsetTop,c=a.clientHeight;return document.body.removeChild(i),{left:Math.abs(s-e.scrollLeft),top:Math.abs(u-e.scrollTop)+c}}return{top:"auto",left:"auto"}}}]),e}(),Je=function(){function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(){};$e(this,e),this.element=t,this.listener=n}return Ge(e,[{key:"bindScrollListener",value:function(){this.scrollableParents=Ze.getScrollableParents(this.element);for(var e=0;e=e.length)for(r=n-e.length;1+r--;)e.push(void 0);e.splice(n,0,e.splice(t,1)[0])}}},{key:"findIndexInList",value:function(e,t,n){var r=this;return t?n?t.findIndex((function(t){return r.equals(t,e,n)})):t.findIndex((function(t){return t===e})):-1}},{key:"getJSXElement",value:function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r-1&&(e=e.replace(/[\xC0-\xC5]/g,"A").replace(/[\xC6]/g,"AE").replace(/[\xC7]/g,"C").replace(/[\xC8-\xCB]/g,"E").replace(/[\xCC-\xCF]/g,"I").replace(/[\xD0]/g,"D").replace(/[\xD1]/g,"N").replace(/[\xD2-\xD6\xD8]/g,"O").replace(/[\xD9-\xDC]/g,"U").replace(/[\xDD]/g,"Y").replace(/[\xDE]/g,"P").replace(/[\xE0-\xE5]/g,"a").replace(/[\xE6]/g,"ae").replace(/[\xE7]/g,"c").replace(/[\xE8-\xEB]/g,"e").replace(/[\xEC-\xEF]/g,"i").replace(/[\xF1]/g,"n").replace(/[\xF2-\xF6\xF8]/g,"o").replace(/[\xF9-\xFC]/g,"u").replace(/[\xFE]/g,"p").replace(/[\xFD\xFF]/g,"y")),e}},{key:"isEmpty",value:function(e){return null==e||""===e||Array.isArray(e)&&0===e.length||"object"===Ke(e)&&0===Object.keys(e).length}},{key:"isNotEmpty",value:function(e){return!this.isEmpty(e)}}]),e}();function et(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var tt=0;function nt(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"pr_id_";return tt++,"".concat(e).concat(tt)}var rt,ot,it,at=(rt=[],ot=function(e){return de.zIndex[e]||999},it=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return(rt||[]).reverse().find((function(t){return!!de.autoZIndex||t.key===e}))||{key:e,value:t}},{get:function(e){return e&&parseInt(e.style.zIndex,10)||0},set:function(e,t,n){t&&(t.style.zIndex=String(function(e,t){t=t||ot(e);var n=it(e,t),r=n.value+(n.key===e?0:t)+1;return rt.push({key:e,value:r}),r}(e,n)))},clear:function(e){var t;e&&(t=at.get(e),rt=rt.filter((function(e){return e.value!==t})),e.style.zIndex="")},getBase:function(e){return ot(e)},getCurrent:function(e){return function(e){return it(e).value}(e)}});function lt(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function st(e,t){return st=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},st(e,t)}function ut(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}}),t&&st(e,t)}function ct(e,t){return!t||"object"!==Ke(t)&&"function"!=typeof t?lt(e):t}function pt(e){return pt=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},pt(e)}function ft(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=pt(e);if(t){var o=pt(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return ct(this,n)}}var dt=function(e){ut(n,e);var t=ft(n);function n(e){var r;return $e(this,n),(r=t.call(this,e)).onMouseDown=r.onMouseDown.bind(lt(r)),r}return Ge(n,[{key:"getTarget",value:function(){return this.ink&&this.ink.parentElement}},{key:"bindEvents",value:function(){this.target&&this.target.addEventListener("mousedown",this.onMouseDown)}},{key:"unbindEvents",value:function(){this.target&&this.target.removeEventListener("mousedown",this.onMouseDown)}},{key:"onMouseDown",value:function(e){if(this.ink&&"none"!==getComputedStyle(this.ink,null).display){if(Ze.removeClass(this.ink,"p-ink-active"),!Ze.getHeight(this.ink)&&!Ze.getWidth(this.ink)){var t=Math.max(Ze.getOuterWidth(this.target),Ze.getOuterHeight(this.target));this.ink.style.height=t+"px",this.ink.style.width=t+"px"}var n=Ze.getOffset(this.target),r=e.pageX-n.left+document.body.scrollTop-Ze.getWidth(this.ink)/2,o=e.pageY-n.top+document.body.scrollLeft-Ze.getHeight(this.ink)/2;this.ink.style.top=o+"px",this.ink.style.left=r+"px",Ze.addClass(this.ink,"p-ink-active")}}},{key:"onAnimationEnd",value:function(e){Ze.removeClass(e.currentTarget,"p-ink-active")}},{key:"componentDidMount",value:function(){this.ink&&(this.target=this.getTarget(),this.bindEvents())}},{key:"componentDidUpdate",value:function(){this.ink&&!this.target&&(this.target=this.getTarget(),this.bindEvents())}},{key:"componentWillUnmount",value:function(){this.ink&&(this.target=null,this.unbindEvents())}},{key:"render",value:function(){var e=this;return de.ripple&&ue.createElement("span",{ref:function(t){return e.ink=t},className:"p-ink",onAnimationEnd:this.onAnimationEnd})}}]),n}(ue.Component),ht=function(){function e(){$e(this,e)}return Ge(e,null,[{key:"isNavKeyPress",value:function(t){var n=t.keyCode;return(n=Ze.getBrowser().safari&&e.SAFARI_KEYS[n]||n)>=33&&n<=40||n===e.KEYS.RETURN||n===e.KEYS.TAB||n===e.KEYS.ESC}},{key:"isSpecialKey",value:function(e){var t=e.keyCode;return 9===t||13===t||27===t||16===t||17===t||t>=18&&t<=20||Ze.getBrowser().opera&&!e.shiftKey&&(8===t||t>=33&&t<=35||t>=36&&t<=39||t>=44&&t<=45)}},{key:"getKey",value:function(t){var n=t.keyCode||t.charCode;return Ze.getBrowser().safari&&e.SAFARI_KEYS[n]||n}},{key:"getCharCode",value:function(e){return e.charCode||e.keyCode||e.which}},{key:"onKeyPress",value:function(t,n,r){if(!r){var o=e.DEFAULT_MASKS[n]?e.DEFAULT_MASKS[n]:n,i=Ze.getBrowser();if(!t.ctrlKey&&!t.altKey){var a=this.getKey(t);if(!i.mozilla||!(this.isNavKeyPress(t)||a===e.KEYS.BACKSPACE||a===e.KEYS.DELETE&&0===t.charCode)){var l=this.getCharCode(t),s=String.fromCharCode(l);(!i.mozilla||!this.isSpecialKey(t)&&s)&&(o.test(s)||t.preventDefault())}}}}},{key:"validate",value:function(e,t){var n=e.target.value,r=!0;return n&&!t.test(n)&&(r=!1),r}}]),e}();function vt(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=pt(e);if(t){var o=pt(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return ct(this,n)}}et(ht,"DEFAULT_MASKS",{pint:/[\d]/,int:/[\d\-]/,pnum:/[\d\.]/,money:/[\d\.\s,]/,num:/[\d\-\.]/,hex:/[0-9a-f]/i,email:/[a-z0-9_\.\-@]/i,alpha:/[a-z_]/i,alphanum:/[a-z0-9_]/i}),et(ht,"KEYS",{TAB:9,RETURN:13,ESC:27,BACKSPACE:8,DELETE:46}),et(ht,"SAFARI_KEYS",{63234:37,63235:39,63232:38,63233:40,63276:33,63277:34,63272:46,63273:36,63275:35});var mt=function(e){ut(n,e);var t=vt(n);function n(e){var r;return $e(this,n),(r=t.call(this,e)).state={mounted:e.visible},r}return Ge(n,[{key:"hasDOM",value:function(){return!("undefined"==typeof window||!window.document||!window.document.createElement)}},{key:"componentDidMount",value:function(){this.hasDOM()&&!this.state.mounted&&this.setState({mounted:!0},this.props.onMounted)}},{key:"componentWillUnmount",value:function(){this.props.onUnmounted&&this.props.onUnmounted()}},{key:"render",value:function(){if(this.props.element&&this.state.mounted){var e=this.props.appendTo||de.appendTo||document.body;return"self"===e?this.props.element:ue.createPortal(this.props.element,e)}return null}}]),n}(ue.Component);function yt(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=pt(e);if(t){var o=pt(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return ct(this,n)}}function _t(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function bt(e){for(var t=1;ti.width?(this.containerEl.style.left="0px",this.containerEl.style.right=window.innerWidth-i.width-r+"px"):(this.containerEl.style.right="",this.containerEl.style.left=r+"px"),this.containerEl.style.top=o+"px",Ze.addClass(this.containerEl,"p-tooltip-active")}else{var u=Ze.findCollisionPosition(this.state.position),c=this.getTargetOption(e,"my")||this.props.my||u.my,p=this.getTargetOption(e,"at")||this.props.at||u.at;this.containerEl.style.padding="0px",Ze.flipfitCollision(this.containerEl,e,c,p,(function(e){var t=e.at,r=t.x,o=t.y,i=e.my.x,a=n.props.at?"center"!==r&&r!==i?r:o:e.at["".concat(u.axis)];n.containerEl.style.padding="",n.setState({position:a},(function(){n.updateContainerPosition(),Ze.addClass(n.containerEl,"p-tooltip-active")}))}))}}},{key:"updateContainerPosition",value:function(){if(this.containerEl){var e=getComputedStyle(this.containerEl);"left"===this.state.position?this.containerEl.style.left=parseFloat(e.left)-2*parseFloat(e.paddingLeft)+"px":"top"===this.state.position&&(this.containerEl.style.top=parseFloat(e.top)-2*parseFloat(e.paddingTop)+"px")}}},{key:"onMouseEnter",value:function(){this.isAutoHide()||(this.allowHide=!1)}},{key:"onMouseLeave",value:function(e){this.isAutoHide()||(this.allowHide=!0,this.hide(e))}},{key:"bindDocumentResizeListener",value:function(){var e=this;this.documentResizeListener=function(t){Ze.isAndroid()||e.hide(t)},window.addEventListener("resize",this.documentResizeListener)}},{key:"unbindDocumentResizeListener",value:function(){this.documentResizeListener&&(window.removeEventListener("resize",this.documentResizeListener),this.documentResizeListener=null)}},{key:"bindScrollListener",value:function(){var e=this;this.scrollHandler||(this.scrollHandler=new Je(this.currentTarget,(function(t){e.state.visible&&e.hide(t)}))),this.scrollHandler.bindScrollListener()}},{key:"unbindScrollListener",value:function(){this.scrollHandler&&this.scrollHandler.unbindScrollListener()}},{key:"bindTargetEvent",value:function(e){if(e){var t=this.getEvents(e),n=t.showEvent,r=t.hideEvent;e.addEventListener(n,this.show),e.addEventListener(r,this.hide)}}},{key:"unbindTargetEvent",value:function(e){if(e){var t=this.getEvents(e),n=t.showEvent,r=t.hideEvent;e.removeEventListener(n,this.show),e.removeEventListener(r,this.hide)}}},{key:"applyDelay",value:function(e,t){this.clearTimeouts();var n=this.getTargetOption(this.currentTarget,e.toLowerCase())||this.props[e];n?this["".concat(e,"Timeout")]=setTimeout((function(){return t()}),n):t()}},{key:"sendCallback",value:function(e){if(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;re.length)&&(t=e.length);for(var n=0,r=new Array(t);n{},an=e=>"number"==typeof e&&Number.isFinite(e),ln=Array.isArray,sn=e=>"object"==typeof e&&!!e&&!ln(e),un=e=>"function"==typeof e,cn=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),pn=e=>`__duo-toolbox__-${e}`,fn=pn("global_variables"),dn=(e,t,n)=>{const r=t(((e,t)=>(sn(window[fn])||(window[fn]={}),cn(window[fn],e)?window[fn][e]:t))(e,n));return((e,t)=>{sn(window[fn])||(window[fn]={}),window[fn][e]=t})(e,r),r},hn=pn("original_function"),vn=pn("override_version"),mn=(e,t,n,r=1)=>((e,t,n,r,o=1)=>{cn(window,e)&&t(window[e])?n(window[e]):dn("pending_global_listeners",((i={})=>{var a;if(!i[e]){i[e]={};let n=window[e];Object.defineProperty(window,e,{get:()=>n,set:r=>{t(r)?(Object.defineProperty(window,e,{value:r,configurable:!0,enumerable:!0,writable:!0}),Object.values(i[e]).forEach((e=>e.callback(r)))):n=r},configurable:!0})}return o>(Number(null===(a=i[e][r])||void 0===a?void 0:a.version)||0)&&(i[e][r]={callback:n,version:o}),i}))})(e,un,(e=>((e,t,n,r=1)=>{var o;if(sn(e)&&r>(Number(null===(o=e[t])||void 0===o?void 0:o[vn])||0)){var i;const o=(null===(i=e[t])||void 0===i?void 0:i[hn])||e[t]||on;e[t]=n(o),e[t][hn]=o,e[t][vn]=r}})(null==e?void 0:e.prototype,t,n,r)),`instance_method:${t}`,r),yn=pn("logging_iframe"),_n=()=>(()=>{let e=document.getElementById(yn);return e&&e.isConnected||(e=document.createElement("iframe"),e.id=yn,e.style.display="none",document.body.appendChild(e)),e})().contentWindow.console,bn=(...e)=>_n().error(...e),gn=pn("action_request"),En=async(e,t)=>On({type:gn,action:e,value:t}).then((t=>{if("success"===(null==t?void 0:t.type))return t.value||null;throw new Error((null==t?void 0:t.error)||`An error occurred while processing a "${e}" action.`)})),On=async e=>new Promise(((t,n)=>{if("undefined"==typeof chrome)return browser.runtime.sendMessage(e);chrome.runtime.sendMessage(e,(e=>{chrome.runtime.lastError?n(chrome.runtime.lastError):t(e)}))}));var wn={exports:{}};!function(e,t){var n="__lodash_hash_undefined__",r=9007199254740991,o="[object Arguments]",i="[object Function]",a="[object Object]",l=/^\[object .+?Constructor\]$/,s=/^(?:0|[1-9]\d*)$/,u={};u["[object Float32Array]"]=u["[object Float64Array]"]=u["[object Int8Array]"]=u["[object Int16Array]"]=u["[object Int32Array]"]=u["[object Uint8Array]"]=u["[object Uint8ClampedArray]"]=u["[object Uint16Array]"]=u["[object Uint32Array]"]=!0,u[o]=u["[object Array]"]=u["[object ArrayBuffer]"]=u["[object Boolean]"]=u["[object DataView]"]=u["[object Date]"]=u["[object Error]"]=u[i]=u["[object Map]"]=u["[object Number]"]=u[a]=u["[object RegExp]"]=u["[object Set]"]=u["[object String]"]=u["[object WeakMap]"]=!1;var c="object"==typeof le&&le&&le.Object===Object&&le,p="object"==typeof self&&self&&self.Object===Object&&self,f=c||p||Function("return this")(),d=t&&!t.nodeType&&t,h=d&&e&&!e.nodeType&&e,v=h&&h.exports===d,m=v&&c.process,y=function(){try{var e=h&&h.require&&h.require("util").types;return e||m&&m.binding&&m.binding("util")}catch(e){}}(),_=y&&y.isTypedArray;function b(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}var g,E,O,w=Array.prototype,C=Function.prototype,k=Object.prototype,x=f["__core-js_shared__"],S=C.toString,T=k.hasOwnProperty,N=(g=/[^.]+$/.exec(x&&x.keys&&x.keys.IE_PROTO||""))?"Symbol(src)_1."+g:"",R=k.toString,P=S.call(Object),L=RegExp("^"+S.call(T).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),A=v?f.Buffer:void 0,I=f.Symbol,D=f.Uint8Array,j=A?A.allocUnsafe:void 0,H=(E=Object.getPrototypeOf,O=Object,function(e){return E(O(e))}),M=Object.create,F=k.propertyIsEnumerable,W=w.splice,U=I?I.toStringTag:void 0,B=function(){try{var e=ve(Object,"defineProperty");return e({},"",{}),e}catch(e){}}(),V=A?A.isBuffer:void 0,K=Math.max,z=Date.now,$=ve(f,"Map"),Y=ve(Object,"create"),G=function(){function e(){}return function(t){if(!Se(t))return{};if(M)return M(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}();function X(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t-1},q.prototype.set=function(e,t){var n=this.__data__,r=ne(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this},Z.prototype.clear=function(){this.size=0,this.__data__={hash:new X,map:new($||q),string:new X}},Z.prototype.delete=function(e){var t=he(this,e).delete(e);return this.size-=t?1:0,t},Z.prototype.get=function(e){return he(this,e).get(e)},Z.prototype.has=function(e){return he(this,e).has(e)},Z.prototype.set=function(e,t){var n=he(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this},J.prototype.clear=function(){this.__data__=new q,this.size=0},J.prototype.delete=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n},J.prototype.get=function(e){return this.__data__.get(e)},J.prototype.has=function(e){return this.__data__.has(e)},J.prototype.set=function(e,t){var n=this.__data__;if(n instanceof q){var r=n.__data__;if(!$||r.length<199)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new Z(r)}return n.set(e,t),this.size=n.size,this};var oe,ie=function(e,t,n){for(var r=-1,o=Object(e),i=n(e),a=i.length;a--;){var l=i[oe?a:++r];if(!1===t(o[l],l,o))break}return e};function ae(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":U&&U in Object(e)?function(e){var t=T.call(e,U),n=e[U];try{e[U]=void 0;var r=!0}catch(e){}var o=R.call(e);r&&(t?e[U]=n:delete e[U]);return o}(e):function(e){return R.call(e)}(e)}function se(e){return Te(e)&&ae(e)==o}function ue(e){return!(!Se(e)||function(e){return!!N&&N in e}(e))&&(ke(e)?L:l).test(function(e){if(null!=e){try{return S.call(e)}catch(e){}try{return e+""}catch(e){}}return""}(e))}function ce(e){if(!Se(e))return function(e){var t=[];if(null!=e)for(var n in Object(e))t.push(n);return t}(e);var t=ye(e),n=[];for(var r in e)("constructor"!=r||!t&&T.call(e,r))&&n.push(r);return n}function pe(e,t,n,r,o){e!==t&&ie(t,(function(i,l){if(o||(o=new J),Se(i))!function(e,t,n,r,o,i,l){var s=_e(e,n),u=_e(t,n),c=l.get(u);if(c)return void ee(e,n,c);var p=i?i(s,u,n+"",e,t,l):void 0,f=void 0===p;if(f){var d=Oe(u),h=!d&&Ce(u),v=!d&&!h&&Ne(u);p=u,d||h||v?Oe(s)?p=s:!function(e){return Te(e)&&we(e)}(s)?h?(f=!1,p=function(e,t){if(t)return e.slice();var n=e.length,r=j?j(n):new e.constructor(n);return e.copy(r),r}(u,!0)):v?(f=!1,m=u,y=!0?(_=m.buffer,b=new _.constructor(_.byteLength),new D(b).set(new D(_)),b):m.buffer,p=new m.constructor(y,m.byteOffset,m.length)):p=[]:p=function(e,t){var n=-1,r=e.length;t||(t=Array(r));for(;++n-1&&e%1==0&&e0){if(++t>=800)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}(de);function ge(e,t){return e===t||e!=e&&t!=t}var Ee=se(function(){return arguments}())?se:function(e){return Te(e)&&T.call(e,"callee")&&!F.call(e,"callee")},Oe=Array.isArray;function we(e){return null!=e&&xe(e.length)&&!ke(e)}var Ce=V||function(){return!1};function ke(e){if(!Se(e))return!1;var t=ae(e);return t==i||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t}function xe(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=r}function Se(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function Te(e){return null!=e&&"object"==typeof e}var Ne=_?function(e){return function(t){return e(t)}}(_):function(e){return Te(e)&&xe(e.length)&&!!u[ae(e)]};function Re(e){return we(e)?Q(e,!0):ce(e)}var Pe,Le=(Pe=function(e,t,n){pe(e,t,n)},fe((function(e,t){var n=-1,r=t.length,o=r>1?t[r-1]:void 0,i=r>2?t[2]:void 0;for(o=Pe.length>3&&"function"==typeof o?(r--,o):void 0,i&&function(e,t,n){if(!Se(n))return!1;var r=typeof t;return!!("number"==r?we(n)&&me(t,n.length):"string"==r&&t in n)&&ge(n[t],e)}(t[0],t[1],i)&&(o=r<3?void 0:o,r=1),e=Object(e);++nsn(e)&&!!e[jn],Mn=e=>e.value,Fn=e=>({[jn]:!0,value:e}),Wn=(e,t)=>In===e&&an(t)||Dn===e&&t>=0&&t<=1,Un=(e,t)=>((e,t,n,r=1)=>{if(!sn(e))return;const o=pn(`${t}_override_version`);r>(Number(e[o])||0)&&Object.defineProperty(e,t,n(Object.getOwnPropertyDescriptor(e,t)))})(HTMLMediaElement,t,(t=>({...t,set:function(n){const r=Kn[e];an(n)?(this[r.originalValueKey]=n,cn(this,r.valueKey)&&(n=this[r.isRelativeKey]?Xn(e,n*this[r.valueKey]):this[r.valueKey])):Hn(n)&&(n=Mn(n)),an(n)&&(this[r.listenerValueKey]=n),t.set.call(this,n)}}))),Bn=(e,t)=>mn("Howl",t,(n=>function(){const r=this,o=arguments,i=Kn[e];let a=!1;const l=r._queue.length;(1===o.length||2===o.length&&void 0===o[1])&&-1===r._getSoundIds().indexOf(o[0])&&(Hn(o[0])?(a=!0,o[0]=Mn(o[0])):Wn(e,o[0])&&(r[i.originalValueKey]=o[0],cn(r,i.valueKey)&&(a=!0,r[i.isRelativeKey]?o[0]=Xn(e,o[0]*r[i.valueKey]):o[0]=r[i.valueKey])),a&&(r[i.listenerValueKey]=o[0]));const s=n.apply(r,arguments);return a&&l({...r,functions:{audio:{applyOverride:()=>Un(e,n),getter:e=>e[t],setter:(e,n)=>e[t]=n,hasQueuedUpdate:()=>!1},howler:{applyOverride:()=>Bn(e,n),getter:e=>e[n](),setter:(e,t)=>e[n](t),hasQueuedUpdate:e=>e._queue.find((e=>e.event===n))}},priorityKey:pn(`${e}_priority`),isRelativeKey:pn(`${e}_is_relative`),valueKey:pn(`forced_${e}_value`),originalValueKey:pn(`original_${e}_value`),listenerValueKey:pn(`${e}_value`)}),Kn={[In]:Vn(In,"playbackRate","rate",{minValue:.5,maxValue:4,defaultValue:1}),[Dn]:Vn(Dn,"volume","volume",{minValue:0,maxValue:1,defaultValue:1})},zn=e=>{const t=Kn[e];if(!t)throw new Error(`Unknown sound setting: "${e}".`);return t},$n=e=>zn(e).minValue,Yn=e=>zn(e).maxValue,Gn=e=>zn(e).defaultValue,Xn=(e,t)=>Kn[e]?Math.max(Kn[e].minValue,Math.min(t,Kn[e].maxValue)):t,qn="story",Zn="forum_discussion",Jn="characters",Qn="unknown",er="listening_challenge",tr="other_challenge",nr=[er,tr,qn,Zn,Jn,Qn],rr="default",or="main",ir=[Dn,In],ar=e=>Dn===e,lr=(e,t=null,n=null)=>({[kn]:{[Pn]:t},[xn]:{[Pn]:t,[Ln]:t},[Sn]:{[Pn]:t},[Tn]:{[Pn]:t},[Nn]:{[Pn]:t},...ar(e)?{[or]:n}:{}}),sr=(e,t)=>Object.fromEntries([[rr,lr(e,{value:t,isRelative:!0},{value:t})],...nr.map((t=>[t,lr(e)]))]),ur=Object.fromEntries(ir.map((e=>[e,sr(e,Gn(e))]))),cr=(e,t)=>sn(ur.volume.default[e][t]),pr=(e,t,n,r=!0)=>{var o,i;if(!ar(t))return;const a=null==e||null===(o=e[t])||void 0===o||null===(i=o[null!=n?n:rr])||void 0===i?void 0:i.main;return sn(a)?a:null===n?{value:Gn(t)}:r?pr(e,t,null):null},fr=(e,t,n,r,o,i=!0)=>{var a,l,s;if(!cr(n,r))return;const u=null==e||null===(a=e[t])||void 0===a||null===(l=a[null!=o?o:rr])||void 0===l||null===(s=l[n])||void 0===s?void 0:s[r];return sn(u)?u:null===o?{isRelative:!0,value:Gn(t)}:i?fr(e,t,n,r,null):null},dr=(e,t)=>{if(!(e=>ir.includes(e.setting)&&cn(e,"value")&&(!e.context||nr.includes(e.context)))(t))return e;const{setting:n,context:r,value:o,soundType:i=null,soundSpeed:a=null}=t;return i&&a?((e,t,n,r,o,i)=>cr(n,r)?Cn({},e,{[t]:{[null!=o?o:rr]:{[n]:{[r]:i}}}}):e)(e,n,i,a,r,o):((e,t,n,r)=>ar(t)?Cn({},e,{[t]:{[null!=n?n:rr]:{[or]:r}}}):e)(e,n,r,o)};var hr=function(){},vr="undefined"!=typeof window;function mr(e,t,n){void 0===t&&(t=0),void 0===n&&(n=[]);var r=function(e,t,n){void 0===t&&(t=0),void 0===n&&(n=!0);var r=Z(!1),o=Z(),i=Z(e),a=Q((function(){return r.current}),[]),l=Q((function(){r.current=!1,o.current&&clearTimeout(o.current),o.current=setTimeout((function(){r.current=!0,i.current()}),t)}),[t]),s=Q((function(){r.current=null,o.current&&clearTimeout(o.current)}),[]);return X((function(){i.current=e}),[e]),X((function(){return n&&l(),s}),[t,n]),[a,s,l]}(e,t),o=r[0],i=r[1];return X(r[2],n),[o,i]}var yr,_r=function(e,t,n){if(!vr)return[t,hr,hr];if(!e)throw new Error("useLocalStorage key may not be falsy");var r=n?n.raw?function(e){return e}:n.deserializer:JSON.parse,o=Z((function(e){try{var o=n?n.raw?String:n.serializer:JSON.stringify,i=localStorage.getItem(e);return null!==i?r(i):(t&&localStorage.setItem(e,o(t)),t)}catch(e){return t}})),i=Y((function(){return o.current(e)})),a=i[0],l=i[1];q((function(){return l(o.current(e))}),[e]);var s=Q((function(t){try{var o="function"==typeof t?t(a):t;if(void 0===o)return;var i=void 0;i=n?n.raw?"string"==typeof o?o:JSON.stringify(o):n.serializer?n.serializer(o):JSON.stringify(o):JSON.stringify(o),localStorage.setItem(e,i),l(r(i))}catch(e){}}),[e,l]),u=Q((function(){try{localStorage.removeItem(e),l(void 0)}catch(e){}}),[e,l]);return[a,s,u]},br={exports:{}}; +!function(){"use strict";var e,t,n,r,o,i,a,l,s={},u=[],c=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i;function p(e,t){for(var n in t)e[n]=t[n];return e}function f(e){var t=e.parentNode;t&&t.removeChild(e)}function d(t,n,r){var o,i,a,l={};for(a in n)"key"==a?o=n[a]:"ref"==a?i=n[a]:l[a]=n[a];if(arguments.length>2&&(l.children=arguments.length>3?e.call(arguments,2):r),"function"==typeof t&&null!=t.defaultProps)for(a in t.defaultProps)void 0===l[a]&&(l[a]=t.defaultProps[a]);return h(t,l,o,i,null)}function h(e,r,o,i,a){var l={type:e,props:r,key:o,ref:i,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:null==a?++n:a};return null==a&&null!=t.vnode&&t.vnode(l),l}function v(e){return e.children}function m(e,t){this.props=e,this.context=t}function y(e,t){if(null==t)return e.__?y(e.__,e.__.__k.indexOf(e)+1):null;for(var n;t0?h(_.type,_.props,_.key,null,_.__v):_)){if(_.__=n,_.__b=n.__b+1,null===(m=C[f])||m&&_.key==m.key&&_.type===m.type)C[f]=void 0;else for(d=0;d2&&(l.children=arguments.length>3?e.call(arguments,2):r),h(t.type,l,o||t.key,i||t.ref,null)},createContext:function(e,t){var n={__c:t="__cC"+l++,__:e,Consumer:function(e,t){return e.children(t)},Provider:function(e){var n,r;return this.getChildContext||(n=[],(r={})[t]=this,this.getChildContext=function(){return r},this.shouldComponentUpdate=function(e){this.props.value!==e.value&&n.some(b)},this.sub=function(e){n.push(e);var t=e.componentWillUnmount;e.componentWillUnmount=function(){n.splice(n.indexOf(e),1),t&&t.call(e)}}),e.children}};return n.Provider.__=n.Consumer.contextType=n},toChildArray:function e(t,n){return n=n||[],null==t||"boolean"==typeof t||(Array.isArray(t)?t.some((function(t){e(t,n)})):n.push(t)),n},get options(){return t}}),F=0,W=[],U=t.__b,B=t.__r,V=t.diffed,K=t.__c,z=t.unmount;function $(e,n){t.__h&&t.__h(j,e,F||n),F=0;var r=j.__H||(j.__H={__:[],__h:[]});return e>=r.__.length&&r.__.push({}),r.__[e]}function G(e){return F=1,Y(ie,e)}function Y(e,t,n){var r=$(D++,2);return r.t=e,r.__c||(r.__=[n?n(t):ie(void 0,t),function(e){var t=r.t(r.__[0],e);r.__[0]!==t&&(r.__=[t,r.__[1]],r.__c.setState({}))}],r.__c=j),r.__}function X(e,n){var r=$(D++,3);!t.__s&&oe(r.__H,n)&&(r.__=e,r.__H=n,j.__H.__h.push(r))}function q(e,n){var r=$(D++,4);!t.__s&&oe(r.__H,n)&&(r.__=e,r.__H=n,j.__h.push(r))}function Z(e){return F=5,J((function(){return{current:e}}),[])}function J(e,t){var n=$(D++,7);return oe(n.__H,t)&&(n.__=e(),n.__H=t,n.__h=e),n.__}function Q(e,t){return F=8,J((function(){return e}),t)}function ee(){W.forEach((function(e){if(e.__P)try{e.__H.__h.forEach(ne),e.__H.__h.forEach(re),e.__H.__h=[]}catch(n){e.__H.__h=[],t.__e(n,e.__v)}})),W=[]}t.__b=function(e){j=null,U&&U(e)},t.__r=function(e){B&&B(e),D=0;var t=(j=e.__c).__H;t&&(t.__h.forEach(ne),t.__h.forEach(re),t.__h=[])},t.diffed=function(e){V&&V(e);var n=e.__c;n&&n.__H&&n.__H.__h.length&&(1!==W.push(n)&&H===t.requestAnimationFrame||((H=t.requestAnimationFrame)||function(e){var t,n=function(){clearTimeout(r),te&&cancelAnimationFrame(t),setTimeout(e)},r=setTimeout(n,100);te&&(t=requestAnimationFrame(n))})(ee)),j=null},t.__c=function(e,n){n.some((function(e){try{e.__h.forEach(ne),e.__h=e.__h.filter((function(e){return!e.__||re(e)}))}catch(r){n.some((function(e){e.__h&&(e.__h=[])})),n=[],t.__e(r,e.__v)}})),K&&K(e,n)},t.unmount=function(e){z&&z(e);var n=e.__c;if(n&&n.__H)try{n.__H.__.forEach(ne)}catch(e){t.__e(e,n.__v)}};var te="function"==typeof requestAnimationFrame;function ne(e){var t=j;"function"==typeof e.__c&&e.__c(),j=t}function re(e){var t=j;e.__c=e.__(),j=t}function oe(e,t){return!e||e.length!==t.length||t.some((function(t,n){return t!==e[n]}))}function ie(e,t){return"function"==typeof t?t(e):t}var ae=Object.freeze({__proto__:null,useState:G,useReducer:Y,useEffect:X,useLayoutEffect:q,useRef:Z,useImperativeHandle:function(e,t,n){F=6,q((function(){"function"==typeof e?e(t()):e&&(e.current=t())}),null==n?n:n.concat(e))},useMemo:J,useCallback:Q,useContext:function(e){var t=j.context[e.__c],n=$(D++,9);return n.c=e,t?(null==n.__&&(n.__=!0,t.sub(j)),t.props.value):e.__},useDebugValue:function(e,n){t.useDebugValue&&t.useDebugValue(n?n(e):e)},useErrorBoundary:function(e){var t=$(D++,10),n=G();return t.__=e,j.componentDidCatch||(j.componentDidCatch=function(e){t.__&&t.__(e),n[1](e)}),[n[0],function(){n[1](void 0)}]}}),le="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function se(e){if(e.__esModule)return e;var t=Object.defineProperty({},"__esModule",{value:!0});return Object.keys(e).forEach((function(n){var r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:function(){return e[n]}})})),t}var ue={},ce=se(ae),pe=se(M);function fe(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}!function(e){var t=ce,n=pe;function r(e,t){for(var n in t)e[n]=t[n];return e}function o(e,t){for(var n in e)if("__source"!==n&&!(n in t))return!0;for(var r in t)if("__source"!==r&&e[r]!==t[r])return!0;return!1}function i(e){this.props=e}function a(e,t){function r(e){var n=this.props.ref,r=n==e.ref;return!r&&n&&(n.call?n(null):n.current=null),t?!t(this.props,e)||!r:o(this.props,e)}function i(t){return this.shouldComponentUpdate=r,n.createElement(e,t)}return i.displayName="Memo("+(e.displayName||e.name)+")",i.prototype.isReactComponent=!0,i.__f=!0,i}(i.prototype=new n.Component).isPureReactComponent=!0,i.prototype.shouldComponentUpdate=function(e,t){return o(this.props,e)||o(this.state,t)};var l=n.options.__b;n.options.__b=function(e){e.type&&e.type.__f&&e.ref&&(e.props.ref=e.ref,e.ref=null),l&&l(e)};var s="undefined"!=typeof Symbol&&Symbol.for&&Symbol.for("react.forward_ref")||3911;function u(e){function t(t,n){var o=r({},t);return delete o.ref,e(o,(n=t.ref||n)&&("object"!=typeof n||"current"in n)?n:null)}return t.$$typeof=s,t.render=t,t.prototype.isReactComponent=t.__f=!0,t.displayName="ForwardRef("+(e.displayName||e.name)+")",t}var c=function(e,t){return null==e?null:n.toChildArray(n.toChildArray(e).map(t))},p={map:c,forEach:c,count:function(e){return e?n.toChildArray(e).length:0},only:function(e){var t=n.toChildArray(e);if(1!==t.length)throw"Children.only";return t[0]},toArray:n.toChildArray},f=n.options.__e;n.options.__e=function(e,t,n){if(e.then)for(var r,o=t;o=o.__;)if((r=o.__c)&&r.__c)return null==t.__e&&(t.__e=n.__e,t.__k=n.__k),r.__c(e,t);f(e,t,n)};var d=n.options.unmount;function h(){this.__u=0,this.t=null,this.__b=null}function v(e){var t=e.__.__c;return t&&t.__e&&t.__e(e)}function m(e){var t,r,o;function i(i){if(t||(t=e()).then((function(e){r=e.default||e}),(function(e){o=e})),o)throw o;if(!r)throw t;return n.createElement(r,i)}return i.displayName="Lazy",i.__f=!0,i}function y(){this.o=null,this.u=null}n.options.unmount=function(e){var t=e.__c;t&&t.__R&&t.__R(),t&&!0===e.__h&&(e.type=null),d&&d(e)},(h.prototype=new n.Component).__c=function(e,t){var n=t.__c,r=this;null==r.t&&(r.t=[]),r.t.push(n);var o=v(r.__v),i=!1,a=function(){i||(i=!0,n.__R=null,o?o(l):l())};n.__R=a;var l=function(){if(!--r.__u){if(r.state.__e){var e=r.state.__e;r.__v.__k[0]=function e(t,n,r){return t&&(t.__v=null,t.__k=t.__k&&t.__k.map((function(t){return e(t,n,r)})),t.__c&&t.__c.__P===n&&(t.__e&&r.insertBefore(t.__e,t.__d),t.__c.__e=!0,t.__c.__P=r)),t}(e,e.__c.__P,e.__c.__O)}var t;for(r.setState({__e:r.__b=null});t=r.t.pop();)t.forceUpdate()}},s=!0===t.__h;r.__u++||s||r.setState({__e:r.__b=r.__v.__k[0]}),e.then(a,a)},h.prototype.componentWillUnmount=function(){this.t=[]},h.prototype.render=function(e,t){if(this.__b){if(this.__v.__k){var o=document.createElement("div"),i=this.__v.__k[0].__c;this.__v.__k[0]=function e(t,n,o){return t&&(t.__c&&t.__c.__H&&(t.__c.__H.__.forEach((function(e){"function"==typeof e.__c&&e.__c()})),t.__c.__H=null),null!=(t=r({},t)).__c&&(t.__c.__P===o&&(t.__c.__P=n),t.__c=null),t.__k=t.__k&&t.__k.map((function(t){return e(t,n,o)}))),t}(this.__b,o,i.__O=i.__P)}this.__b=null}var a=t.__e&&n.createElement(n.Fragment,null,e.fallback);return a&&(a.__h=null),[n.createElement(n.Fragment,null,t.__e?null:e.children),a]};var _=function(e,t,n){if(++n[1]===n[0]&&e.u.delete(t),e.props.revealOrder&&("t"!==e.props.revealOrder[0]||!e.u.size))for(n=e.o;n;){for(;n.length>3;)n.pop()();if(n[1]>>1,1),t.i.removeChild(e)}}),n.render(n.createElement(b,{context:t.context},e.__v),t.l)):t.l&&t.componentWillUnmount()}function E(e,t){return n.createElement(g,{__v:e,i:t})}(y.prototype=new n.Component).__e=function(e){var t=this,n=v(t.__v),r=t.u.get(e);return r[0]++,function(o){var i=function(){t.props.revealOrder?(r.push(o),_(t,e,r)):o()};n?n(i):i()}},y.prototype.render=function(e){this.o=null,this.u=new Map;var t=n.toChildArray(e.children);e.revealOrder&&"b"===e.revealOrder[0]&&t.reverse();for(var r=t.length;r--;)this.u.set(t[r],this.o=[1,0,this.o]);return e.children},y.prototype.componentDidUpdate=y.prototype.componentDidMount=function(){var e=this;this.u.forEach((function(t,n){_(e,n,t)}))};var O="undefined"!=typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103,w=/^(?:accent|alignment|arabic|baseline|cap|clip(?!PathU)|color|dominant|fill|flood|font|glyph(?!R)|horiz|marker(?!H|W|U)|overline|paint|stop|strikethrough|stroke|text(?!L)|underline|unicode|units|v|vector|vert|word|writing|x(?!C))[A-Z]/,C="undefined"!=typeof document,k=function(e){return("undefined"!=typeof Symbol&&"symbol"==typeof Symbol()?/fil|che|rad/i:/fil|che|ra/i).test(e)};function x(e,t,r){return null==t.__k&&(t.textContent=""),n.render(e,t),"function"==typeof r&&r(),e?e.__c:null}function S(e,t,r){return n.hydrate(e,t),"function"==typeof r&&r(),e?e.__c:null}n.Component.prototype.isReactComponent={},["componentWillMount","componentWillReceiveProps","componentWillUpdate"].forEach((function(e){Object.defineProperty(n.Component.prototype,e,{configurable:!0,get:function(){return this["UNSAFE_"+e]},set:function(t){Object.defineProperty(this,e,{configurable:!0,writable:!0,value:t})}})}));var T=n.options.event;function N(){}function R(){return this.cancelBubble}function P(){return this.defaultPrevented}n.options.event=function(e){return T&&(e=T(e)),e.persist=N,e.isPropagationStopped=R,e.isDefaultPrevented=P,e.nativeEvent=e};var L,A={configurable:!0,get:function(){return this.class}},I=n.options.vnode;n.options.vnode=function(e){var t=e.type,r=e.props,o=r;if("string"==typeof t){var i=-1===t.indexOf("-");for(var a in o={},r){var l=r[a];C&&"children"===a&&"noscript"===t||"value"===a&&"defaultValue"in r&&null==l||("defaultValue"===a&&"value"in r&&null==r.value?a="value":"download"===a&&!0===l?l="":/ondoubleclick/i.test(a)?a="ondblclick":/^onchange(textarea|input)/i.test(a+t)&&!k(r.type)?a="oninput":/^on(Ani|Tra|Tou|BeforeInp)/.test(a)?a=a.toLowerCase():i&&w.test(a)?a=a.replace(/[A-Z0-9]/,"-$&").toLowerCase():null===l&&(l=void 0),o[a]=l)}"select"==t&&o.multiple&&Array.isArray(o.value)&&(o.value=n.toChildArray(r.children).forEach((function(e){e.props.selected=-1!=o.value.indexOf(e.props.value)}))),"select"==t&&null!=o.defaultValue&&(o.value=n.toChildArray(r.children).forEach((function(e){e.props.selected=o.multiple?-1!=o.defaultValue.indexOf(e.props.value):o.defaultValue==e.props.value}))),e.props=o}t&&r.class!=r.className&&(A.enumerable="className"in r,null!=r.className&&(o.class=r.className),Object.defineProperty(o,"className",A)),e.$$typeof=O,I&&I(e)};var D=n.options.__r;n.options.__r=function(e){D&&D(e),L=e.__c};var j={ReactCurrentDispatcher:{current:{readContext:function(e){return L.__n[e.__c].props.value}}}};function H(e){return n.createElement.bind(null,e)}function M(e){return!!e&&e.$$typeof===O}function F(e){return M(e)?n.cloneElement.apply(null,arguments):e}function W(e){return!!e.__k&&(n.render(null,e),!0)}function U(e){return e&&(e.base||1===e.nodeType&&e)||null}var B=function(e,t){return e(t)},V=function(e,t){return e(t)},K=n.Fragment,z={useState:t.useState,useReducer:t.useReducer,useEffect:t.useEffect,useLayoutEffect:t.useLayoutEffect,useRef:t.useRef,useImperativeHandle:t.useImperativeHandle,useMemo:t.useMemo,useCallback:t.useCallback,useContext:t.useContext,useDebugValue:t.useDebugValue,version:"17.0.2",Children:p,render:x,hydrate:S,unmountComponentAtNode:W,createPortal:E,createElement:n.createElement,createContext:n.createContext,createFactory:H,cloneElement:F,createRef:n.createRef,Fragment:n.Fragment,isValidElement:M,findDOMNode:U,Component:n.Component,PureComponent:i,memo:a,forwardRef:u,flushSync:V,unstable_batchedUpdates:B,StrictMode:K,Suspense:h,SuspenseList:y,lazy:m,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:j};Object.keys(t).forEach((function(n){e[n]=t[n]})),e.createElement=n.createElement,e.createContext=n.createContext,e.createRef=n.createRef,e.Fragment=n.Fragment,e.Component=n.Component,e.version="17.0.2",e.Children=p,e.render=x,e.hydrate=S,e.unmountComponentAtNode=W,e.createPortal=E,e.createFactory=H,e.cloneElement=F,e.isValidElement=M,e.findDOMNode=U,e.PureComponent=i,e.memo=a,e.forwardRef=u,e.flushSync=V,e.unstable_batchedUpdates=B,e.StrictMode=K,e.Suspense=h,e.SuspenseList=y,e.lazy=m,e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=j,e.default=z}(ue);var de=function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)};fe(de,"ripple",!1),fe(de,"locale","en"),fe(de,"autoZIndex",!0),fe(de,"zIndex",{modal:1100,overlay:1e3,menu:1e3,tooltip:1100,toast:1200}),fe(de,"appendTo",null);var he=Object.freeze({ALIGN_CENTER:"pi pi-align-center",ALIGN_JUSTIFY:"pi pi-align-justify",ALIGN_LEFT:"pi pi-align-left",ALIGN_RIGHT:"pi pi-align-right",AMAZON:"pi pi-amazon",ANDROID:"pi pi-android",ANGLE_DOUBLE_DOWN:"pi pi-angle-double-down",ANGLE_DOUBLE_LEFT:"pi pi-angle-double-left",ANGLE_DOUBLE_RIGHT:"pi pi-angle-double-right",ANGLE_DOUBLE_UP:"pi pi-angle-double-up",ANGLE_DOWN:"pi pi-angle-down",ANGLE_LEFT:"pi pi-angle-left",ANGLE_RIGHT:"pi pi-angle-right",ANGLE_UP:"pi pi-angle-up",APPLE:"pi pi-apple",ARROW_CIRCLE_DOWN:"pi pi-arrow-circle-down",ARROW_CIRCLE_LEFT:"pi pi-arrow-circle-left",ARROW_CIRCLE_RIGHT:"pi pi-arrow-circle-right",ARROW_CIRCLE_UP:"pi pi-arrow-circle-up",ARROW_DOWN:"pi pi-arrow-down",ARROW_LEFT:"pi pi-arrow-left",ARROW_RIGHT:"pi pi-arrow-right",ARROW_UP:"pi pi-arrow-up",BACKWARD:"pi pi-backward",BAN:"pi pi-ban",BARS:"pi pi-bars",BELL:"pi pi-bell",BOOK:"pi pi-book",BOOKMARK:"pi pi-bookmark",BRIEFCASE:"pi pi-briefcase",CALENDAR_MINUS:"pi pi-calendar-minus",CALENDAR_PLUS:"pi pi-calendar-plus",CALENDAR_TIMES:"pi pi-calendar-times",CALENDAR:"pi pi-calendar",CAMERA:"pi pi-camera",CARET_DOWN:"pi pi-caret-down",CARET_LEFT:"pi pi-caret-left",CARET_RIGHT:"pi pi-caret-right",CARET_UP:"pi pi-caret-up",CHART_BAR:"pi pi-chart-bar",CHART_LINE:"pi pi-chart-line",CHECK_CIRCLE:"pi pi-check-circle",CHECK_SQUARE:"pi pi-check-square",CHECK:"pi pi-check",CHEVRON_CIRCLE_DOWN:"pi pi-chevron-circle-down",CHEVRON_CIRCLE_LEFT:"pi pi-chevron-circle-left",CHEVRON_CIRCLE_RIGHT:"pi pi-chevron-circle-right",CHEVRON_CIRCLE_UP:"pi pi-chevron-circle-up",CHEVRON_DOWN:"pi pi-chevron-down",CHEVRON_LEFT:"pi pi-chevron-left",CHEVRON_RIGHT:"pi pi-chevron-right",CHEVRON_UP:"pi pi-chevron-up",CLOCK:"pi pi-clock",CLONE:"pi pi-clone",CLOUD_DOWNLOAD:"pi pi-cloud-download",CLOUD_UPLOAD:"pi pi-cloud-upload",CLOUD:"pi pi-cloud",COG:"pi pi-cog",COMMENT:"pi pi-comment",COMMENTS:"pi pi-comments",COMPASS:"pi pi-compass",COPY:"pi pi-copy",CREDIT_CARD:"pi pi-credit-card",DESKTOP:"pi pi-desktop",DISCORD:"pi pi-discord",DIRECTIONS_ALT:"pi pi-directions-alt",DIRECTIONS:"pi pi-directions",DOLLAR:"pi pi-dollar",DOWNLOAD:"pi pi-download",EJECT:"pi pi-eject",ELLIPSIS_H:"pi pi-ellipsis-h",ELLIPSIS_V:"pi pi-ellipsis-v",ENVELOPE:"pi pi-envelope",EXCLAMATION_CIRCLE:"pi pi-exclamation-circle",EXCLAMATION_TRIANGLE:"pi pi-exclamation-triangle ",EXTERNAL_LINK:"pi pi-external-link",EYE_SLASH:"pi pi-eye-slash",EYE:"pi pi-eye",FACEBOOK:"pi pi-facebook",FAST_BACKWARD:"pi pi-fast-backward",FAST_FORWARD:"pi pi-fast-forward",FILE_EXCEL:"pi pi-file-excel",FILE_O:"pi pi-file-o",FILE_PDF:"pi pi-file-pdf",FILE:"pi pi-file",FILTER:"pi pi-filter",FILTER_SLASH:"pi pi-filter-slash",FLAG:"pi pi-flag",FOLDER_OPEN:"pi pi-folder-open",FOLDER:"pi pi-folder",FORWARD:"pi pi-forward",GITHUB:"pi pi-github",GLOBE:"pi pi-globe",GOOGLE:"pi pi-google",HEART:"pi pi-heart",HOME:"pi pi-home",ID_CARD:"pi pi-id-card",IMAGE:"pi pi-image",IMAGES:"pi pi-images",INBOX:"pi pi-inbox",INFO_CIRCLE:"pi pi-info-circle",INFO:"pi pi-info",KEY:"pi pi-key",LINK:"pi pi-link",LIST:"pi pi-list",LOCK_OPEN:"pi pi-lock-open",LOCK:"pi pi-lock",MAP:"pi pi-map",MAP_MARKER:"pi pi-map-marker",MICROSOFT:"pi pi-microsoft",MINUS_CIRCLE:"pi pi-minus-circle",MINUS:"pi pi-minus",MOBILE:"pi pi-mobile",MONEY_BILL:"pi pi-money-bill",MOON:"pi pi-moon",PALETTE:"pi pi-palette",PAPERCLIP:"pi pi-paperclip",PAUSE:"pi pi-pause",PAYPAL:"pi pi-paypal",PENCIL:"pi pi-pencil",PERCENTAGE:"pi pi-percentage",PHONE:"pi pi-phone",PLAY:"pi pi-play",PLUS_CIRCLE:"pi pi-plus-circle",PLUS:"pi pi-plus",POWER_OFF:"pi pi-power-off",PRINT:"pi pi-print",QUESTION_CIRCLE:"pi pi-question-circle",QUESTION:"pi pi-question",RADIO_OFF:"pi pi-radio-off",RADIO_ON:"pi pi-radio-on",REFRESH:"pi pi-refresh",REPLAY:"pi pi-replay",REPLY:"pi pi-reply",SAVE:"pi pi-save",SEARCH_MINUS:"pi pi-search-minus",SEARCH_PLUS:"pi pi-search-plus",SEARCH:"pi pi-search",SEND:"pi pi-send",SHARE_ALT:"pi pi-share-alt",SHIELD:"pi pi-shield",SHOPPING_CART:"pi pi-shopping-cart",SIGN_IN:"pi pi-sign-in",SIGN_OUT:"pi pi-sign-out",SITEMAP:"pi pi-sitemap",SLACK:"pi pi-slack",SLIDERS_H:"pi pi-sliders-h",SLIDERS_V:"pi pi-sliders-v",SORT_ALPHA_ALT_DOWN:"pi pi-sort-alpha-alt-down",SORT_ALPHA_ALT_UP:"pi pi-sort-alpha-alt-up",SORT_ALPHA_DOWN:"pi pi-sort-alpha-down",SORT_ALPHA_UP:"pi pi-sort-alpha-up",SORT_ALT:"pi pi-sort-alt",SORT_AMOUNT_DOWN_ALT:"pi pi-sort-amount-down-alt",SORT_AMOUNT_DOWN:"pi pi-sort-amount-down",SORT_AMOUNT_UP_ALT:"pi pi-sort-amount-up-alt",SORT_AMOUNT_UP:"pi pi-sort-amount-up",SORT_DOWN:"pi pi-sort-down",SORT_NUMERIC_ALT_DOWN:"pi pi-sort-numeric-alt-down",SORT_NUMERIC_ALT_UP:"pi pi-sort-numeric-alt-up",SORT_NUMERIC_DOWN:"pi pi-sort-numeric-down",SORT_NUMERIC_UP:"pi pi-sort-numeric-up",SORT_UP:"pi pi-sort-up",SORT:"pi pi-sort",SPINNER:"pi pi-spinner",STAR_O:"pi pi-star-o",STAR:"pi pi-star",STEP_BACKWARD_ALT:"pi pi-step-backward-alt",STEP_BACKWARD:"pi pi-step-backward",STEP_FORWARD_ALT:"pi pi-step-forward-alt",STEP_FORWARD:"pi pi-step-forward",SUN:"pi pi-sun",TABLE:"pi pi-table",TABLET:"pi pi-tablet",TAG:"pi pi-tag",TAGS:"pi pi-tags",TH_LARGE:"pi pi-th-large",THUMBS_DOWN:"pi pi-thumbs-down",THUMBS_UP:"pi pi-thumbs-up",TICKET:"pi pi-ticket",TIMES_CIRCLE:"pi pi-times-circle",TIMES:"pi pi-times",TRASH:"pi pi-trash",TWITTER:"pi pi-twitter",UNDO:"pi pi-undo",UNLOCK:"pi pi-unlock",UPLOAD:"pi pi-upload",USER_EDIT:"pi pi-user-edit",USER_MINUS:"pi pi-user-minus",USER_PLUS:"pi pi-user-plus",USER:"pi pi-user",USERS:"pi pi-users",VIDEO:"pi pi-video",VIMEO:"pi pi-vimeo",VOLUME_DOWN:"pi pi-volume-down",VOLUME_OFF:"pi pi-volume-off",VOLUME_UP:"pi pi-volume-up",YOUTUBE:"pi pi-youtube",WALLET:"pi pi-wallet",WIFI:"pi pi-wifi",WINDOW_MAXIMIZE:"pi pi-window-maximize",WINDOW_MINIMIZE:"pi pi-window-minimize"});function ve(){return ve=Object.assign||function(e){for(var t=1;t=0||(o[n]=e[n]);return o}function ye(e,t){return ye=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},ye(e,t)}function _e(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,ye(e,t)}Object.freeze({SUCCESS:"success",INFO:"info",WARN:"warn",ERROR:"error"});function be(){}function ge(){}ge.resetWarningCache=be;function Ee(e,t){return e.replace(new RegExp("(^|\\s)"+t+"(?:\\s|$)","g"),"$1").replace(/\s+/g," ").replace(/^\s*|\s*$/g,"")}!function(){function e(e,t,n,r,o,i){if("SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"!==i){var a=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw a.name="Invariant Violation",a}}function t(){return e}e.isRequired=e;var n={array:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:ge,resetWarningCache:be};n.PropTypes=n}();var Oe=!1,we=ue.createContext(null),Ce="unmounted",ke="exited",xe="entering",Se="entered",Te="exiting",Ne=function(e){function t(t,n){var r;r=e.call(this,t,n)||this;var o,i=n&&!n.isMounting?t.enter:t.appear;return r.appearStatus=null,t.in?i?(o=ke,r.appearStatus=xe):o=Se:o=t.unmountOnExit||t.mountOnEnter?Ce:ke,r.state={status:o},r.nextCallback=null,r}_e(t,e),t.getDerivedStateFromProps=function(e,t){return e.in&&t.status===Ce?{status:ke}: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!==xe&&n!==Se&&(t=xe):n!==xe&&n!==Se||(t=Te)}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){void 0===e&&(e=!1),null!==t?(this.cancelNextCallback(),t===xe?this.performEnter(e):this.performExit()):this.props.unmountOnExit&&this.state.status===ke&&this.setState({status:Ce})},n.performEnter=function(e){var t=this,n=this.props.enter,r=this.context?this.context.isMounting:e,o=this.props.nodeRef?[r]:[ue.findDOMNode(this),r],i=o[0],a=o[1],l=this.getTimeouts(),s=r?l.appear:l.enter;!e&&!n||Oe?this.safeSetState({status:Se},(function(){t.props.onEntered(i)})):(this.props.onEnter(i,a),this.safeSetState({status:xe},(function(){t.props.onEntering(i,a),t.onTransitionEnd(s,(function(){t.safeSetState({status:Se},(function(){t.props.onEntered(i,a)}))}))})))},n.performExit=function(){var e=this,t=this.props.exit,n=this.getTimeouts(),r=this.props.nodeRef?void 0:ue.findDOMNode(this);t&&!Oe?(this.props.onExit(r),this.safeSetState({status:Te},(function(){e.props.onExiting(r),e.onTransitionEnd(n.exit,(function(){e.safeSetState({status:ke},(function(){e.props.onExited(r)}))}))}))):this.safeSetState({status:ke},(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:ue.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],i=o[0],a=o[1];this.props.addEndListener(i,a)}null!=e&&setTimeout(this.nextCallback,e)}else setTimeout(this.nextCallback,0)},n.render=function(){var e=this.state.status;if(e===Ce)return null;var t=this.props,n=t.children;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;var r=me(t,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]);return ue.createElement(we.Provider,{value:null},"function"==typeof n?n(e,r):ue.cloneElement(ue.Children.only(n),r))},t}(ue.Component);function Re(){}Ne.contextType=we,Ne.propTypes={},Ne.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:Re,onEntering:Re,onEntered:Re,onExit:Re,onExiting:Re,onExited:Re},Ne.UNMOUNTED=Ce,Ne.EXITED=ke,Ne.ENTERING=xe,Ne.ENTERED=Se,Ne.EXITING=Te;var Pe=Ne,Le=function(e,t){return e&&t&&t.split(" ").forEach((function(t){return r=t,void((n=e).classList?n.classList.add(r):function(e,t){return e.classList?!!t&&e.classList.contains(t):-1!==(" "+(e.className.baseVal||e.className)+" ").indexOf(" "+t+" ")}(n,r)||("string"==typeof n.className?n.className=n.className+" "+r:n.setAttribute("class",(n.className&&n.className.baseVal||"")+" "+r)));var n,r}))},Ae=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=Ee(n.className,r):n.setAttribute("class",Ee(n.className&&n.className.baseVal||"",r)));var n,r}))},Ie=function(e){function t(){for(var t,n=arguments.length,r=new Array(n),o=0;oe.length)&&(t=e.length);for(var n=0,r=new Array(t);n=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,l=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){l=!0,i=e},f:function(){try{a||null==n.return||n.return()}finally{if(l)throw i}}}}function qe(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);nf.height?((n=u.top+c-i)<0&&(n=c),e.style.transformOrigin="bottom"):(n=l+u.top+c,e.style.transformOrigin="top"),r=u.left+s+a>f.width?Math.max(0,u.left+p+s-a):u.left+p,e.style.top=n+"px",e.style.left=r+"px"}}},{key:"relativePosition",value:function(e,t){if(e){var n,r,o=e.offsetParent?{width:e.offsetWidth,height:e.offsetHeight}:this.getHiddenElementDimensions(e),i=t.offsetHeight,a=t.getBoundingClientRect(),l=this.getViewport();a.top+i+o.height>l.height?(n=-1*o.height,a.top+n<0&&(n=-1*a.top),e.style.transformOrigin="bottom"):(n=i,e.style.transformOrigin="top"),r=o.width>l.width?-1*a.left:a.left+o.width>l.width?-1*(a.left+o.width-l.width):0,e.style.top=n+"px",e.style.left=r+"px"}}},{key:"flipfitCollision",value:function(t,n){var r=this,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"left top",i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"left bottom",a=arguments.length>4?arguments[4]:void 0,l=n.getBoundingClientRect(),s=this.getViewport(),u=o.split(" "),c=i.split(" "),p=function(e,t){return t?+e.substring(e.search(/(\+|-)/g))||0:e.substring(0,e.search(/(\+|-)/g))||e},f={my:{x:p(u[0]),y:p(u[1]||u[0]),offsetX:p(u[0],!0),offsetY:p(u[1]||u[0],!0)},at:{x:p(c[0]),y:p(c[1]||c[0]),offsetX:p(c[0],!0),offsetY:p(c[1]||c[0],!0)}},d={left:function(){return f.my.offsetX+f.at.offsetX+l.left+("left"===f.my.x?0:-1*("center"===f.my.x?r.getOuterWidth(t)/2:r.getOuterWidth(t)))},top:function(){return f.my.offsetY+f.at.offsetY+l.top+("top"===f.my.y?0:-1*("center"===f.my.y?r.getOuterHeight(t)/2:r.getOuterHeight(t)))}},h={count:{x:0,y:0},left:function(){var n=d.left(),r=e.getWindowScrollLeft();t.style.left=n+r+"px",2===this.count.x?(t.style.left=r+"px",this.count.x=0):n<0&&(this.count.x++,f.my.x="left",f.at.x="right",f.my.offsetX*=-1,f.at.offsetX*=-1,this.right())},right:function(){var r=d.left()+e.getOuterWidth(n),o=e.getWindowScrollLeft();t.style.left=r+o+"px",2===this.count.x?(t.style.left=s.width-e.getOuterWidth(t)+o+"px",this.count.x=0):r+e.getOuterWidth(t)>s.width&&(this.count.x++,f.my.x="right",f.at.x="left",f.my.offsetX*=-1,f.at.offsetX*=-1,this.left())},top:function(){var n=d.top(),r=e.getWindowScrollTop();t.style.top=n+r+"px",2===this.count.y?(t.style.left=r+"px",this.count.y=0):n<0&&(this.count.y++,f.my.y="top",f.at.y="bottom",f.my.offsetY*=-1,f.at.offsetY*=-1,this.bottom())},bottom:function(){var r=d.top()+e.getOuterHeight(n),o=e.getWindowScrollTop();t.style.top=r+o+"px",2===this.count.y?(t.style.left=s.height-e.getOuterHeight(t)+o+"px",this.count.y=0):r+e.getOuterHeight(n)>s.height&&(this.count.y++,f.my.y="bottom",f.at.y="top",f.my.offsetY*=-1,f.at.offsetY*=-1,this.top())},center:function(r){if("y"===r){var o=d.top()+e.getOuterHeight(n)/2;t.style.top=o+e.getWindowScrollTop()+"px",o<0?this.bottom():o+e.getOuterHeight(n)>s.height&&this.top()}else{var i=d.left()+e.getOuterWidth(n)/2;t.style.left=i+e.getWindowScrollLeft()+"px",i<0?this.left():i+e.getOuterWidth(t)>s.width&&this.right()}}};h[f.at.x]("x"),h[f.at.y]("y"),this.isFunction(a)&&a(f)}},{key:"findCollisionPosition",value:function(e){if(e){var t="left"===e?"right":"left";return"top"===e||"bottom"===e?{axis:"y",my:"center ".concat("top"===e?"bottom":"top"),at:"center ".concat(e)}:{axis:"x",my:"".concat(t," center"),at:"".concat(e," center")}}}},{key:"getParents",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return null===e.parentNode?t:this.getParents(e.parentNode,t.concat([e.parentNode]))}},{key:"getScrollableParents",value:function(e){var t=[];if(e){var n,r=this.getParents(e),o=/(auto|scroll)/,i=function(e){var t=window.getComputedStyle(e,null);return o.test(t.getPropertyValue("overflow"))||o.test(t.getPropertyValue("overflowX"))||o.test(t.getPropertyValue("overflowY"))},a=Xe(r);try{for(a.s();!(n=a.n()).done;){var l=n.value,s=1===l.nodeType&&l.dataset.scrollselectors;if(s){var u,c=Xe(s.split(","));try{for(c.s();!(u=c.n()).done;){var p=u.value,f=this.findSingle(l,p);f&&i(f)&&t.push(f)}}catch(e){c.e(e)}finally{c.f()}}9!==l.nodeType&&i(l)&&t.push(l)}}catch(e){a.e(e)}finally{a.f()}}return t}},{key:"getHiddenElementOuterHeight",value:function(e){if(e){e.style.visibility="hidden",e.style.display="block";var t=e.offsetHeight;return e.style.display="",e.style.visibility="",t}return 0}},{key:"getHiddenElementOuterWidth",value:function(e){if(e){e.style.visibility="hidden",e.style.display="block";var t=e.offsetWidth;return e.style.display="",e.style.visibility="",t}return 0}},{key:"getHiddenElementDimensions",value:function(e){var t={};return e&&(e.style.visibility="hidden",e.style.display="block",t.width=e.offsetWidth,t.height=e.offsetHeight,e.style.display="",e.style.visibility=""),t}},{key:"fadeIn",value:function(e,t){if(e){e.style.opacity=0;var n=+new Date,r=0;!function o(){r=+e.style.opacity+((new Date).getTime()-n)/t,e.style.opacity=r,n=+new Date,+r<1&&(window.requestAnimationFrame&&requestAnimationFrame(o)||setTimeout(o,16))}()}}},{key:"fadeOut",value:function(e,t){if(e)var n=1,r=50/t,o=setInterval((function(){(n-=r)<=0&&(n=0,clearInterval(o)),e.style.opacity=n}),50)}},{key:"getUserAgent",value:function(){return navigator.userAgent}},{key:"isIOS",value:function(){return/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream}},{key:"isAndroid",value:function(){return/(android)/i.test(navigator.userAgent)}},{key:"isTouchDevice",value:function(){return"ontouchstart"in window||navigator.maxTouchPoints>0||navigator.msMaxTouchPoints>0}},{key:"isFunction",value:function(e){return!!(e&&e.constructor&&e.call&&e.apply)}},{key:"appendChild",value:function(e,t){if(this.isElement(t))t.appendChild(e);else{if(!t.el||!t.el.nativeElement)throw new Error("Cannot append "+t+" to "+e);t.el.nativeElement.appendChild(e)}}},{key:"removeChild",value:function(e,t){if(this.isElement(t))t.removeChild(e);else{if(!t.el||!t.el.nativeElement)throw new Error("Cannot remove "+e+" from "+t);t.el.nativeElement.removeChild(e)}}},{key:"isElement",value:function(e){return"object"===("undefined"==typeof HTMLElement?"undefined":Ke(HTMLElement))?e instanceof HTMLElement:e&&"object"===Ke(e)&&null!==e&&1===e.nodeType&&"string"==typeof e.nodeName}},{key:"scrollInView",value:function(e,t){var n=getComputedStyle(e).getPropertyValue("borderTopWidth"),r=n?parseFloat(n):0,o=getComputedStyle(e).getPropertyValue("paddingTop"),i=o?parseFloat(o):0,a=e.getBoundingClientRect(),l=t.getBoundingClientRect().top+document.body.scrollTop-(a.top+document.body.scrollTop)-r-i,s=e.scrollTop,u=e.clientHeight,c=this.getOuterHeight(t);l<0?e.scrollTop=s+l:l+c>u&&(e.scrollTop=s+l-u+c)}},{key:"clearSelection",value:function(){if(window.getSelection)window.getSelection().empty?window.getSelection().empty():window.getSelection().removeAllRanges&&window.getSelection().rangeCount>0&&window.getSelection().getRangeAt(0).getClientRects().length>0&&window.getSelection().removeAllRanges();else if(document.selection&&document.selection.empty)try{document.selection.empty()}catch(e){}}},{key:"calculateScrollbarWidth",value:function(e){if(e){var t=getComputedStyle(e);return e.offsetWidth-e.clientWidth-parseFloat(t.borderLeftWidth)-parseFloat(t.borderRightWidth)}if(null!=this.calculatedScrollbarWidth)return this.calculatedScrollbarWidth;var n=document.createElement("div");n.className="p-scrollbar-measure",document.body.appendChild(n);var r=n.offsetWidth-n.clientWidth;return document.body.removeChild(n),this.calculatedScrollbarWidth=r,r}},{key:"getBrowser",value:function(){if(!this.browser){var e=this.resolveUserAgent();this.browser={},e.browser&&(this.browser[e.browser]=!0,this.browser.version=e.version),this.browser.chrome?this.browser.webkit=!0:this.browser.webkit&&(this.browser.safari=!0)}return this.browser}},{key:"resolveUserAgent",value:function(){var e=navigator.userAgent.toLowerCase(),t=/(chrome)[ ]([\w.]+)/.exec(e)||/(webkit)[ ]([\w.]+)/.exec(e)||/(opera)(?:.*version|)[ ]([\w.]+)/.exec(e)||/(msie) ([\w.]+)/.exec(e)||e.indexOf("compatible")<0&&/(mozilla)(?:.*? rv:([\w.]+)|)/.exec(e)||[];return{browser:t[1]||"",version:t[2]||"0"}}},{key:"isVisible",value:function(e){return e&&null!=e.offsetParent}},{key:"getFocusableElements",value:function(t){var n,r=[],o=Xe(e.find(t,'button:not([tabindex = "-1"]):not([disabled]):not([style*="display:none"]):not([hidden]),\n [href][clientHeight][clientWidth]:not([tabindex = "-1"]):not([disabled]):not([style*="display:none"]):not([hidden]),\n input:not([tabindex = "-1"]):not([disabled]):not([style*="display:none"]):not([hidden]), select:not([tabindex = "-1"]):not([disabled]):not([style*="display:none"]):not([hidden]),\n textarea:not([tabindex = "-1"]):not([disabled]):not([style*="display:none"]):not([hidden]), [tabIndex]:not([tabIndex = "-1"]):not([disabled]):not([style*="display:none"]):not([hidden]),\n [contenteditable]:not([tabIndex = "-1"]):not([disabled]):not([style*="display:none"]):not([hidden])'));try{for(o.s();!(n=o.n()).done;){var i=n.value;"none"!==getComputedStyle(i).display&&"hidden"!==getComputedStyle(i).visibility&&r.push(i)}}catch(e){o.e(e)}finally{o.f()}return r}},{key:"getFirstFocusableElement",value:function(t){var n=e.getFocusableElements(t);return n.length>0?n[0]:null}},{key:"getLastFocusableElement",value:function(t){var n=e.getFocusableElements(t);return n.length>0?n[n.length-1]:null}},{key:"getCursorOffset",value:function(e,t,n,r){if(e){var o=getComputedStyle(e),i=document.createElement("div");i.style.position="absolute",i.style.top="0px",i.style.left="0px",i.style.visibility="hidden",i.style.pointerEvents="none",i.style.overflow=o.overflow,i.style.width=o.width,i.style.height=o.height,i.style.padding=o.padding,i.style.border=o.border,i.style.overflowWrap=o.overflowWrap,i.style.whiteSpace=o.whiteSpace,i.style.lineHeight=o.lineHeight,i.innerHTML=t.replace(/\r\n|\r|\n/g,"
");var a=document.createElement("span");a.textContent=r,i.appendChild(a);var l=document.createTextNode(n);i.appendChild(l),document.body.appendChild(i);var s=a.offsetLeft,u=a.offsetTop,c=a.clientHeight;return document.body.removeChild(i),{left:Math.abs(s-e.scrollLeft),top:Math.abs(u-e.scrollTop)+c}}return{top:"auto",left:"auto"}}}]),e}(),Je=function(){function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(){};$e(this,e),this.element=t,this.listener=n}return Ye(e,[{key:"bindScrollListener",value:function(){this.scrollableParents=Ze.getScrollableParents(this.element);for(var e=0;e=e.length)for(r=n-e.length;1+r--;)e.push(void 0);e.splice(n,0,e.splice(t,1)[0])}}},{key:"findIndexInList",value:function(e,t,n){var r=this;return t?n?t.findIndex((function(t){return r.equals(t,e,n)})):t.findIndex((function(t){return t===e})):-1}},{key:"getJSXElement",value:function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r-1&&(e=e.replace(/[\xC0-\xC5]/g,"A").replace(/[\xC6]/g,"AE").replace(/[\xC7]/g,"C").replace(/[\xC8-\xCB]/g,"E").replace(/[\xCC-\xCF]/g,"I").replace(/[\xD0]/g,"D").replace(/[\xD1]/g,"N").replace(/[\xD2-\xD6\xD8]/g,"O").replace(/[\xD9-\xDC]/g,"U").replace(/[\xDD]/g,"Y").replace(/[\xDE]/g,"P").replace(/[\xE0-\xE5]/g,"a").replace(/[\xE6]/g,"ae").replace(/[\xE7]/g,"c").replace(/[\xE8-\xEB]/g,"e").replace(/[\xEC-\xEF]/g,"i").replace(/[\xF1]/g,"n").replace(/[\xF2-\xF6\xF8]/g,"o").replace(/[\xF9-\xFC]/g,"u").replace(/[\xFE]/g,"p").replace(/[\xFD\xFF]/g,"y")),e}},{key:"isEmpty",value:function(e){return null==e||""===e||Array.isArray(e)&&0===e.length||"object"===Ke(e)&&0===Object.keys(e).length}},{key:"isNotEmpty",value:function(e){return!this.isEmpty(e)}}]),e}();function et(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var tt=0;function nt(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"pr_id_";return tt++,"".concat(e).concat(tt)}var rt,ot,it,at=(rt=[],ot=function(e){return de.zIndex[e]||999},it=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return(rt||[]).reverse().find((function(t){return!!de.autoZIndex||t.key===e}))||{key:e,value:t}},{get:function(e){return e&&parseInt(e.style.zIndex,10)||0},set:function(e,t,n){t&&(t.style.zIndex=String(function(e,t){t=t||ot(e);var n=it(e,t),r=n.value+(n.key===e?0:t)+1;return rt.push({key:e,value:r}),r}(e,n)))},clear:function(e){var t;e&&(t=at.get(e),rt=rt.filter((function(e){return e.value!==t})),e.style.zIndex="")},getBase:function(e){return ot(e)},getCurrent:function(e){return function(e){return it(e).value}(e)}});function lt(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function st(e,t){return st=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},st(e,t)}function ut(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}}),t&&st(e,t)}function ct(e,t){return!t||"object"!==Ke(t)&&"function"!=typeof t?lt(e):t}function pt(e){return pt=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},pt(e)}function ft(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=pt(e);if(t){var o=pt(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return ct(this,n)}}var dt=function(e){ut(n,e);var t=ft(n);function n(e){var r;return $e(this,n),(r=t.call(this,e)).onMouseDown=r.onMouseDown.bind(lt(r)),r}return Ye(n,[{key:"getTarget",value:function(){return this.ink&&this.ink.parentElement}},{key:"bindEvents",value:function(){this.target&&this.target.addEventListener("mousedown",this.onMouseDown)}},{key:"unbindEvents",value:function(){this.target&&this.target.removeEventListener("mousedown",this.onMouseDown)}},{key:"onMouseDown",value:function(e){if(this.ink&&"none"!==getComputedStyle(this.ink,null).display){if(Ze.removeClass(this.ink,"p-ink-active"),!Ze.getHeight(this.ink)&&!Ze.getWidth(this.ink)){var t=Math.max(Ze.getOuterWidth(this.target),Ze.getOuterHeight(this.target));this.ink.style.height=t+"px",this.ink.style.width=t+"px"}var n=Ze.getOffset(this.target),r=e.pageX-n.left+document.body.scrollTop-Ze.getWidth(this.ink)/2,o=e.pageY-n.top+document.body.scrollLeft-Ze.getHeight(this.ink)/2;this.ink.style.top=o+"px",this.ink.style.left=r+"px",Ze.addClass(this.ink,"p-ink-active")}}},{key:"onAnimationEnd",value:function(e){Ze.removeClass(e.currentTarget,"p-ink-active")}},{key:"componentDidMount",value:function(){this.ink&&(this.target=this.getTarget(),this.bindEvents())}},{key:"componentDidUpdate",value:function(){this.ink&&!this.target&&(this.target=this.getTarget(),this.bindEvents())}},{key:"componentWillUnmount",value:function(){this.ink&&(this.target=null,this.unbindEvents())}},{key:"render",value:function(){var e=this;return de.ripple&&ue.createElement("span",{ref:function(t){return e.ink=t},className:"p-ink",onAnimationEnd:this.onAnimationEnd})}}]),n}(ue.Component),ht=function(){function e(){$e(this,e)}return Ye(e,null,[{key:"isNavKeyPress",value:function(t){var n=t.keyCode;return(n=Ze.getBrowser().safari&&e.SAFARI_KEYS[n]||n)>=33&&n<=40||n===e.KEYS.RETURN||n===e.KEYS.TAB||n===e.KEYS.ESC}},{key:"isSpecialKey",value:function(e){var t=e.keyCode;return 9===t||13===t||27===t||16===t||17===t||t>=18&&t<=20||Ze.getBrowser().opera&&!e.shiftKey&&(8===t||t>=33&&t<=35||t>=36&&t<=39||t>=44&&t<=45)}},{key:"getKey",value:function(t){var n=t.keyCode||t.charCode;return Ze.getBrowser().safari&&e.SAFARI_KEYS[n]||n}},{key:"getCharCode",value:function(e){return e.charCode||e.keyCode||e.which}},{key:"onKeyPress",value:function(t,n,r){if(!r){var o=e.DEFAULT_MASKS[n]?e.DEFAULT_MASKS[n]:n,i=Ze.getBrowser();if(!t.ctrlKey&&!t.altKey){var a=this.getKey(t);if(!i.mozilla||!(this.isNavKeyPress(t)||a===e.KEYS.BACKSPACE||a===e.KEYS.DELETE&&0===t.charCode)){var l=this.getCharCode(t),s=String.fromCharCode(l);(!i.mozilla||!this.isSpecialKey(t)&&s)&&(o.test(s)||t.preventDefault())}}}}},{key:"validate",value:function(e,t){var n=e.target.value,r=!0;return n&&!t.test(n)&&(r=!1),r}}]),e}();function vt(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=pt(e);if(t){var o=pt(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return ct(this,n)}}et(ht,"DEFAULT_MASKS",{pint:/[\d]/,int:/[\d\-]/,pnum:/[\d\.]/,money:/[\d\.\s,]/,num:/[\d\-\.]/,hex:/[0-9a-f]/i,email:/[a-z0-9_\.\-@]/i,alpha:/[a-z_]/i,alphanum:/[a-z0-9_]/i}),et(ht,"KEYS",{TAB:9,RETURN:13,ESC:27,BACKSPACE:8,DELETE:46}),et(ht,"SAFARI_KEYS",{63234:37,63235:39,63232:38,63233:40,63276:33,63277:34,63272:46,63273:36,63275:35});var mt=function(e){ut(n,e);var t=vt(n);function n(e){var r;return $e(this,n),(r=t.call(this,e)).state={mounted:e.visible},r}return Ye(n,[{key:"hasDOM",value:function(){return!("undefined"==typeof window||!window.document||!window.document.createElement)}},{key:"componentDidMount",value:function(){this.hasDOM()&&!this.state.mounted&&this.setState({mounted:!0},this.props.onMounted)}},{key:"componentWillUnmount",value:function(){this.props.onUnmounted&&this.props.onUnmounted()}},{key:"render",value:function(){if(this.props.element&&this.state.mounted){var e=this.props.appendTo||de.appendTo||document.body;return"self"===e?this.props.element:ue.createPortal(this.props.element,e)}return null}}]),n}(ue.Component);function yt(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=pt(e);if(t){var o=pt(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return ct(this,n)}}function _t(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function bt(e){for(var t=1;ti.width?(this.containerEl.style.left="0px",this.containerEl.style.right=window.innerWidth-i.width-r+"px"):(this.containerEl.style.right="",this.containerEl.style.left=r+"px"),this.containerEl.style.top=o+"px",Ze.addClass(this.containerEl,"p-tooltip-active")}else{var u=Ze.findCollisionPosition(this.state.position),c=this.getTargetOption(e,"my")||this.props.my||u.my,p=this.getTargetOption(e,"at")||this.props.at||u.at;this.containerEl.style.padding="0px",Ze.flipfitCollision(this.containerEl,e,c,p,(function(e){var t=e.at,r=t.x,o=t.y,i=e.my.x,a=n.props.at?"center"!==r&&r!==i?r:o:e.at["".concat(u.axis)];n.containerEl.style.padding="",n.setState({position:a},(function(){n.updateContainerPosition(),Ze.addClass(n.containerEl,"p-tooltip-active")}))}))}}},{key:"updateContainerPosition",value:function(){if(this.containerEl){var e=getComputedStyle(this.containerEl);"left"===this.state.position?this.containerEl.style.left=parseFloat(e.left)-2*parseFloat(e.paddingLeft)+"px":"top"===this.state.position&&(this.containerEl.style.top=parseFloat(e.top)-2*parseFloat(e.paddingTop)+"px")}}},{key:"onMouseEnter",value:function(){this.isAutoHide()||(this.allowHide=!1)}},{key:"onMouseLeave",value:function(e){this.isAutoHide()||(this.allowHide=!0,this.hide(e))}},{key:"bindDocumentResizeListener",value:function(){var e=this;this.documentResizeListener=function(t){Ze.isAndroid()||e.hide(t)},window.addEventListener("resize",this.documentResizeListener)}},{key:"unbindDocumentResizeListener",value:function(){this.documentResizeListener&&(window.removeEventListener("resize",this.documentResizeListener),this.documentResizeListener=null)}},{key:"bindScrollListener",value:function(){var e=this;this.scrollHandler||(this.scrollHandler=new Je(this.currentTarget,(function(t){e.state.visible&&e.hide(t)}))),this.scrollHandler.bindScrollListener()}},{key:"unbindScrollListener",value:function(){this.scrollHandler&&this.scrollHandler.unbindScrollListener()}},{key:"bindTargetEvent",value:function(e){if(e){var t=this.getEvents(e),n=t.showEvent,r=t.hideEvent;e.addEventListener(n,this.show),e.addEventListener(r,this.hide)}}},{key:"unbindTargetEvent",value:function(e){if(e){var t=this.getEvents(e),n=t.showEvent,r=t.hideEvent;e.removeEventListener(n,this.show),e.removeEventListener(r,this.hide)}}},{key:"applyDelay",value:function(e,t){this.clearTimeouts();var n=this.getTargetOption(this.currentTarget,e.toLowerCase())||this.props[e];n?this["".concat(e,"Timeout")]=setTimeout((function(){return t()}),n):t()}},{key:"sendCallback",value:function(e){if(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;re.length)&&(t=e.length);for(var n=0,r=new Array(t);n{},an=e=>"number"==typeof e&&Number.isFinite(e),ln=Array.isArray,sn=e=>"object"==typeof e&&!!e&&!ln(e),un=e=>"function"==typeof e,cn=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),pn=e=>`__duo-toolbox__-${e}`,fn=pn("global_variables"),dn=(e,t,n)=>{const r=t(((e,t)=>(sn(window[fn])||(window[fn]={}),cn(window[fn],e)?window[fn][e]:t))(e,n));return((e,t)=>{sn(window[fn])||(window[fn]={}),window[fn][e]=t})(e,r),r},hn=pn("original_function"),vn=pn("override_version"),mn=(e,t,n,r=1)=>((e,t,n,r,o=1)=>{cn(window,e)&&t(window[e])?n(window[e]):dn("pending_global_listeners",((i={})=>{var a;if(!i[e]){i[e]={};let n=window[e];Object.defineProperty(window,e,{get:()=>n,set:r=>{t(r)?(Object.defineProperty(window,e,{value:r,configurable:!0,enumerable:!0,writable:!0}),Object.values(i[e]).forEach((e=>e.callback(r)))):n=r},configurable:!0})}return o>(Number(null===(a=i[e][r])||void 0===a?void 0:a.version)||0)&&(i[e][r]={callback:n,version:o}),i}))})(e,un,(e=>((e,t,n,r=1)=>{var o;if(sn(e)&&r>(Number(null===(o=e[t])||void 0===o?void 0:o[vn])||0)){var i;const o=(null===(i=e[t])||void 0===i?void 0:i[hn])||e[t]||on;e[t]=n(o),e[t][hn]=o,e[t][vn]=r}})(null==e?void 0:e.prototype,t,n,r)),`instance_method:${t}`,r),yn=pn("logging_iframe"),_n=()=>(()=>{let e=document.getElementById(yn);return e&&e.isConnected||(e=document.createElement("iframe"),e.id=yn,e.style.display="none",document.body.appendChild(e)),e})().contentWindow.console,bn=(...e)=>_n().error(...e),gn=pn("action_request"),En=async(e,t)=>On({type:gn,action:e,value:t}).then((t=>{if("success"===(null==t?void 0:t.type))return t.value||null;throw new Error((null==t?void 0:t.error)||`An error occurred while processing a "${e}" action.`)})),On=async e=>new Promise(((t,n)=>{if("undefined"==typeof chrome)return browser.runtime.sendMessage(e);chrome.runtime.sendMessage(e,(e=>{chrome.runtime.lastError?n(chrome.runtime.lastError):t(e)}))}));var wn={exports:{}};!function(e,t){var n="__lodash_hash_undefined__",r=9007199254740991,o="[object Arguments]",i="[object Function]",a="[object Object]",l=/^\[object .+?Constructor\]$/,s=/^(?:0|[1-9]\d*)$/,u={};u["[object Float32Array]"]=u["[object Float64Array]"]=u["[object Int8Array]"]=u["[object Int16Array]"]=u["[object Int32Array]"]=u["[object Uint8Array]"]=u["[object Uint8ClampedArray]"]=u["[object Uint16Array]"]=u["[object Uint32Array]"]=!0,u[o]=u["[object Array]"]=u["[object ArrayBuffer]"]=u["[object Boolean]"]=u["[object DataView]"]=u["[object Date]"]=u["[object Error]"]=u[i]=u["[object Map]"]=u["[object Number]"]=u[a]=u["[object RegExp]"]=u["[object Set]"]=u["[object String]"]=u["[object WeakMap]"]=!1;var c="object"==typeof le&&le&&le.Object===Object&&le,p="object"==typeof self&&self&&self.Object===Object&&self,f=c||p||Function("return this")(),d=t&&!t.nodeType&&t,h=d&&e&&!e.nodeType&&e,v=h&&h.exports===d,m=v&&c.process,y=function(){try{var e=h&&h.require&&h.require("util").types;return e||m&&m.binding&&m.binding("util")}catch(e){}}(),_=y&&y.isTypedArray;function b(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}var g,E,O,w=Array.prototype,C=Function.prototype,k=Object.prototype,x=f["__core-js_shared__"],S=C.toString,T=k.hasOwnProperty,N=(g=/[^.]+$/.exec(x&&x.keys&&x.keys.IE_PROTO||""))?"Symbol(src)_1."+g:"",R=k.toString,P=S.call(Object),L=RegExp("^"+S.call(T).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),A=v?f.Buffer:void 0,I=f.Symbol,D=f.Uint8Array,j=A?A.allocUnsafe:void 0,H=(E=Object.getPrototypeOf,O=Object,function(e){return E(O(e))}),M=Object.create,F=k.propertyIsEnumerable,W=w.splice,U=I?I.toStringTag:void 0,B=function(){try{var e=ve(Object,"defineProperty");return e({},"",{}),e}catch(e){}}(),V=A?A.isBuffer:void 0,K=Math.max,z=Date.now,$=ve(f,"Map"),G=ve(Object,"create"),Y=function(){function e(){}return function(t){if(!Se(t))return{};if(M)return M(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}();function X(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t-1},q.prototype.set=function(e,t){var n=this.__data__,r=ne(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this},Z.prototype.clear=function(){this.size=0,this.__data__={hash:new X,map:new($||q),string:new X}},Z.prototype.delete=function(e){var t=he(this,e).delete(e);return this.size-=t?1:0,t},Z.prototype.get=function(e){return he(this,e).get(e)},Z.prototype.has=function(e){return he(this,e).has(e)},Z.prototype.set=function(e,t){var n=he(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this},J.prototype.clear=function(){this.__data__=new q,this.size=0},J.prototype.delete=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n},J.prototype.get=function(e){return this.__data__.get(e)},J.prototype.has=function(e){return this.__data__.has(e)},J.prototype.set=function(e,t){var n=this.__data__;if(n instanceof q){var r=n.__data__;if(!$||r.length<199)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new Z(r)}return n.set(e,t),this.size=n.size,this};var oe,ie=function(e,t,n){for(var r=-1,o=Object(e),i=n(e),a=i.length;a--;){var l=i[oe?a:++r];if(!1===t(o[l],l,o))break}return e};function ae(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":U&&U in Object(e)?function(e){var t=T.call(e,U),n=e[U];try{e[U]=void 0;var r=!0}catch(e){}var o=R.call(e);r&&(t?e[U]=n:delete e[U]);return o}(e):function(e){return R.call(e)}(e)}function se(e){return Te(e)&&ae(e)==o}function ue(e){return!(!Se(e)||function(e){return!!N&&N in e}(e))&&(ke(e)?L:l).test(function(e){if(null!=e){try{return S.call(e)}catch(e){}try{return e+""}catch(e){}}return""}(e))}function ce(e){if(!Se(e))return function(e){var t=[];if(null!=e)for(var n in Object(e))t.push(n);return t}(e);var t=ye(e),n=[];for(var r in e)("constructor"!=r||!t&&T.call(e,r))&&n.push(r);return n}function pe(e,t,n,r,o){e!==t&&ie(t,(function(i,l){if(o||(o=new J),Se(i))!function(e,t,n,r,o,i,l){var s=_e(e,n),u=_e(t,n),c=l.get(u);if(c)return void ee(e,n,c);var p=i?i(s,u,n+"",e,t,l):void 0,f=void 0===p;if(f){var d=Oe(u),h=!d&&Ce(u),v=!d&&!h&&Ne(u);p=u,d||h||v?Oe(s)?p=s:!function(e){return Te(e)&&we(e)}(s)?h?(f=!1,p=function(e,t){if(t)return e.slice();var n=e.length,r=j?j(n):new e.constructor(n);return e.copy(r),r}(u,!0)):v?(f=!1,m=u,y=!0?(_=m.buffer,b=new _.constructor(_.byteLength),new D(b).set(new D(_)),b):m.buffer,p=new m.constructor(y,m.byteOffset,m.length)):p=[]:p=function(e,t){var n=-1,r=e.length;t||(t=Array(r));for(;++n-1&&e%1==0&&e0){if(++t>=800)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}(de);function ge(e,t){return e===t||e!=e&&t!=t}var Ee=se(function(){return arguments}())?se:function(e){return Te(e)&&T.call(e,"callee")&&!F.call(e,"callee")},Oe=Array.isArray;function we(e){return null!=e&&xe(e.length)&&!ke(e)}var Ce=V||function(){return!1};function ke(e){if(!Se(e))return!1;var t=ae(e);return t==i||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t}function xe(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=r}function Se(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function Te(e){return null!=e&&"object"==typeof e}var Ne=_?function(e){return function(t){return e(t)}}(_):function(e){return Te(e)&&xe(e.length)&&!!u[ae(e)]};function Re(e){return we(e)?Q(e,!0):ce(e)}var Pe,Le=(Pe=function(e,t,n){pe(e,t,n)},fe((function(e,t){var n=-1,r=t.length,o=r>1?t[r-1]:void 0,i=r>2?t[2]:void 0;for(o=Pe.length>3&&"function"==typeof o?(r--,o):void 0,i&&function(e,t,n){if(!Se(n))return!1;var r=typeof t;return!!("number"==r?we(n)&&me(t,n.length):"string"==r&&t in n)&&ge(n[t],e)}(t[0],t[1],i)&&(o=r<3?void 0:o,r=1),e=Object(e);++nsn(e)&&!!e[jn],Mn=e=>e.value,Fn=e=>({[jn]:!0,value:e}),Wn=(e,t)=>In===e&&an(t)||Dn===e&&t>=0&&t<=1,Un=(e,t)=>((e,t,n,r=1)=>{if(!sn(e))return;const o=pn(`${t}_override_version`);r>(Number(e[o])||0)&&Object.defineProperty(e,t,n(Object.getOwnPropertyDescriptor(e,t)))})(HTMLMediaElement,t,(t=>({...t,set:function(n){const r=Kn[e];an(n)?(this[r.originalValueKey]=n,cn(this,r.valueKey)&&(n=this[r.isRelativeKey]?Xn(e,n*this[r.valueKey]):this[r.valueKey])):Hn(n)&&(n=Mn(n)),an(n)&&(this[r.listenerValueKey]=n),t.set.call(this,n)}}))),Bn=(e,t)=>mn("Howl",t,(n=>function(){const r=this,o=arguments,i=Kn[e];let a=!1;const l=r._queue.length;(1===o.length||2===o.length&&void 0===o[1])&&-1===r._getSoundIds().indexOf(o[0])&&(Hn(o[0])?(a=!0,o[0]=Mn(o[0])):Wn(e,o[0])&&(r[i.originalValueKey]=o[0],cn(r,i.valueKey)&&(a=!0,r[i.isRelativeKey]?o[0]=Xn(e,o[0]*r[i.valueKey]):o[0]=r[i.valueKey])),a&&(r[i.listenerValueKey]=o[0]));const s=n.apply(r,arguments);return a&&l({...r,functions:{audio:{applyOverride:()=>Un(e,n),getter:e=>e[t],setter:(e,n)=>e[t]=n,hasQueuedUpdate:()=>!1},howler:{applyOverride:()=>Bn(e,n),getter:e=>e[n](),setter:(e,t)=>e[n](t),hasQueuedUpdate:e=>e._queue.find((e=>e.event===n))}},priorityKey:pn(`${e}_priority`),isRelativeKey:pn(`${e}_is_relative`),valueKey:pn(`forced_${e}_value`),originalValueKey:pn(`original_${e}_value`),listenerValueKey:pn(`${e}_value`)}),Kn={[In]:Vn(In,"playbackRate","rate",{minValue:.5,maxValue:4,defaultValue:1}),[Dn]:Vn(Dn,"volume","volume",{minValue:0,maxValue:1,defaultValue:1})},zn=e=>{const t=Kn[e];if(!t)throw new Error(`Unknown sound setting: "${e}".`);return t},$n=e=>zn(e).minValue,Gn=e=>zn(e).maxValue,Yn=e=>zn(e).defaultValue,Xn=(e,t)=>Kn[e]?Math.max(Kn[e].minValue,Math.min(t,Kn[e].maxValue)):t,qn="story",Zn="forum_discussion",Jn="characters",Qn="guidebook",er="unknown",tr="listening_challenge",nr="other_challenge",rr=[tr,nr,Qn,qn,Zn,Jn,er],or="default",ir="main",ar=[Dn,In],lr=e=>Dn===e,sr=(e,t=null,n=null)=>({[kn]:{[Pn]:t},[xn]:{[Pn]:t,[Ln]:t},[Sn]:{[Pn]:t},[Tn]:{[Pn]:t},[Nn]:{[Pn]:t},...lr(e)?{[ir]:n}:{}}),ur=(e,t)=>Object.fromEntries([[or,sr(e,{value:t,isRelative:!0},{value:t})],...rr.map((t=>[t,sr(e)]))]),cr=Object.fromEntries(ar.map((e=>[e,ur(e,Yn(e))]))),pr=(e,t)=>sn(cr.volume.default[e][t]),fr=(e,t,n,r=!0)=>{var o,i;if(!lr(t))return;const a=null==e||null===(o=e[t])||void 0===o||null===(i=o[null!=n?n:or])||void 0===i?void 0:i.main;return sn(a)?a:null===n?{value:Yn(t)}:r?fr(e,t,null):null},dr=(e,t,n,r,o,i=!0)=>{var a,l,s;if(!pr(n,r))return;const u=null==e||null===(a=e[t])||void 0===a||null===(l=a[null!=o?o:or])||void 0===l||null===(s=l[n])||void 0===s?void 0:s[r];return sn(u)?u:null===o?{isRelative:!0,value:Yn(t)}:i?dr(e,t,n,r,null):null},hr=(e,t)=>{if(!(e=>ar.includes(e.setting)&&cn(e,"value")&&(!e.context||rr.includes(e.context)))(t))return e;const{setting:n,context:r,value:o,soundType:i=null,soundSpeed:a=null}=t;return i&&a?((e,t,n,r,o,i)=>pr(n,r)?Cn({},e,{[t]:{[null!=o?o:or]:{[n]:{[r]:i}}}}):e)(e,n,i,a,r,o):((e,t,n,r)=>lr(t)?Cn({},e,{[t]:{[null!=n?n:or]:{[ir]:r}}}):e)(e,n,r,o)};var vr=function(){},mr="undefined"!=typeof window;function yr(e,t,n){void 0===t&&(t=0),void 0===n&&(n=[]);var r=function(e,t,n){void 0===t&&(t=0),void 0===n&&(n=!0);var r=Z(!1),o=Z(),i=Z(e),a=Q((function(){return r.current}),[]),l=Q((function(){r.current=!1,o.current&&clearTimeout(o.current),o.current=setTimeout((function(){r.current=!0,i.current()}),t)}),[t]),s=Q((function(){r.current=null,o.current&&clearTimeout(o.current)}),[]);return X((function(){i.current=e}),[e]),X((function(){return n&&l(),s}),[t,n]),[a,s,l]}(e,t),o=r[0],i=r[1];return X(r[2],n),[o,i]}var _r,br=function(e,t,n){if(!mr)return[t,vr,vr];if(!e)throw new Error("useLocalStorage key may not be falsy");var r=n?n.raw?function(e){return e}:n.deserializer:JSON.parse,o=Z((function(e){try{var o=n?n.raw?String:n.serializer:JSON.stringify,i=localStorage.getItem(e);return null!==i?r(i):(t&&localStorage.setItem(e,o(t)),t)}catch(e){return t}})),i=G((function(){return o.current(e)})),a=i[0],l=i[1];q((function(){return l(o.current(e))}),[e]);var s=Q((function(t){try{var o="function"==typeof t?t(a):t;if(void 0===o)return;var i=void 0;i=n?n.raw?"string"==typeof o?o:JSON.stringify(o):n.serializer?n.serializer(o):JSON.stringify(o):JSON.stringify(o),localStorage.setItem(e,i),l(r(i))}catch(e){}}),[e,l]),u=Q((function(){try{localStorage.removeItem(e),l(void 0)}catch(e){}}),[e,l]);return[a,s,u]},gr={exports:{}}; /*! Copyright (c) 2018 Jed Watson. Licensed under the MIT License (MIT), see http://jedwatson.github.io/classnames */ -yr=br,function(){var e={}.hasOwnProperty;function t(){for(var n=[],r=0;r=r?r:n}},{key:"componentDidMount",value:function(){this.state.id||this.setState({id:nt()}),this.updateInkBar()}},{key:"componentDidUpdate",value:function(e){this.updateInkBar(),e.activeIndex!==this.props.activeIndex&&this.updateScrollBar(this.props.activeIndex)}},{key:"renderTabHeader",value:function(e,t){var n=this,r=this.isSelected(t),o=ze("p-unselectable-text",{"p-tabview-selected p-highlight":r,"p-disabled":e.props.disabled},e.props.headerClassName),i=this.state.id+"_header_"+t,a=this.state.id+"_content_"+t,l=e.props.disabled?null:0,s=e.props.leftIcon&&ue.createElement("i",{className:e.props.leftIcon}),u=ue.createElement("span",{className:"p-tabview-title"},e.props.header),c=e.props.rightIcon&&ue.createElement("i",{className:e.props.rightIcon}),p=ue.createElement("a",{role:"tab",className:"p-tabview-nav-link",onClick:function(r){return n.onTabHeaderClick(r,e,t)},id:i,"aria-controls":a,"aria-selected":r,tabIndex:l},s,u,c,ue.createElement(dt,null));if(e.props.headerTemplate){var f={className:"p-tabview-nav-link",titleClassName:"p-tabview-title",onClick:function(r){return n.onTabHeaderClick(r,e,t)},leftIconElement:s,titleElement:u,rightIconElement:c,element:p,props:this.props,index:t,selected:r,ariaControls:a};p=Qe.getJSXElement(e.props.headerTemplate,f)}return ue.createElement("li",{ref:function(e){return n["tab_".concat(t)]=e},className:o,style:e.props.headerStyle,role:"presentation"},p)}},{key:"renderTabHeaders",value:function(){var e=this;return ue.Children.map(this.props.children,(function(t,n){return e.renderTabHeader(t,n)}))}},{key:"renderNavigator",value:function(){var e=this,t=this.renderTabHeaders();return ue.createElement("div",{ref:function(t){return e.content=t},id:this.props.id,className:"p-tabview-nav-content",style:this.props.style,onScroll:this.onScroll},ue.createElement("ul",{ref:function(t){return e.nav=t},className:"p-tabview-nav",role:"tablist"},t,ue.createElement("li",{ref:function(t){return e.inkbar=t},className:"p-tabview-ink-bar"})))}},{key:"renderContent",value:function(){var e=this,t=ue.Children.map(this.props.children,(function(t,n){if(!e.props.renderActiveOnly||e.isSelected(n))return e.createContent(t,n)}));return ue.createElement("div",{className:"p-tabview-panels"},t)}},{key:"createContent",value:function(e,t){var n=this.isSelected(t),r=ze(e.props.contentClassName,"p-tabview-panel",{"p-hidden":!n}),o=this.state.id+"_content_"+t,i=this.state.id+"_header_"+t;return ue.createElement("div",{id:o,"aria-labelledby":i,"aria-hidden":!n,className:r,style:e.props.contentStyle,role:"tabpanel"},this.props.renderActiveOnly?n&&e.props.children:e.props.children)}},{key:"renderPrevButton",value:function(){var e=this;return this.props.scrollable&&!this.state.backwardIsDisabled?ue.createElement("button",{ref:function(t){return e.prevBtn=t},className:"p-tabview-nav-prev p-tabview-nav-btn p-link",onClick:this.navBackward,type:"button"},ue.createElement("span",{className:"pi pi-chevron-left"}),ue.createElement(dt,null)):null}},{key:"renderNextButton",value:function(){var e=this;if(this.props.scrollable&&!this.state.forwardIsDisabled)return ue.createElement("button",{ref:function(t){return e.nextBtn=t},className:"p-tabview-nav-next p-tabview-nav-btn p-link",onClick:this.navForward,type:"button"},ue.createElement("span",{className:"pi pi-chevron-right"}),ue.createElement(dt,null))}},{key:"render",value:function(){var e=ze("p-tabview p-component",this.props.className,{"p-tabview-scrollable":this.props.scrollable}),t=this.renderNavigator(),n=this.renderContent(),r=this.renderPrevButton(),o=this.renderNextButton();return ue.createElement("div",{className:e},ue.createElement("div",{className:"p-tabview-nav-container"},r,t,o),n)}}])&&Lr(t.prototype,n),r&&Lr(t,r),i}(ue.Component);function $r(e,t){for(var n=0;n0&&this.props.offLabel&&this.props.offLabel.length>0}},{key:"hasIcon",value:function(){return this.props.onIcon&&this.props.onIcon.length>0&&this.props.offIcon&&this.props.offIcon.length>0}},{key:"getLabel",value:function(){return this.hasLabel()?this.props.checked?this.props.onLabel:this.props.offLabel:" "}},{key:"componentDidMount",value:function(){this.props.tooltip&&this.renderTooltip()}},{key:"componentDidUpdate",value:function(e){e.tooltip===this.props.tooltip&&e.tooltipOptions===this.props.tooltipOptions||(this.tooltip?this.tooltip.update(function(e){for(var t=1;t{const r=((e,t=10)=>{let n=e.parentElement;for(;n;){if(n.clientHeight>0&&n.scrollHeight-t>n.clientHeight&&(document.documentElement===n||-1===["hidden","visible"].indexOf(window.getComputedStyle(n).overflowY)))return n;n=n.parentElement}return null})(e);if(!r)return;const o=((e,t)=>{let n=0,r=0;if(t.contains(e)){let o=e.offsetParent;for(;o&&(n+=e.offsetLeft,r+=e.offsetTop,e=o,o=o.offsetParent,t.contains(o)););}return{x:n,y:r}})(e,r).y;(or.scrollTop+r.clientHeight)&&r.scrollTo({top:o-t,behavior:n})};function ro(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0:t===e}},{key:"componentDidMount",value:function(){this.state.id||this.setState({id:nt()})}},{key:"renderTabHeader",value:function(e,t,n){var r,o=this,i=ze("p-accordion-header",{"p-highlight":t,"p-disabled":e.props.disabled},e.props.headerClassName),a=ze("p-accordion-toggle-icon",(fo(r={},"".concat(this.props.expandIcon),!t),fo(r,"".concat(this.props.collapseIcon),t),r)),l=this.state.id+"_header_"+n,s=this.state.id+"_content_"+n,u=e.props.disabled?-1:null,c=e.props.headerTemplate?Qe.getJSXElement(e.props.headerTemplate,e.props):ue.createElement("span",{className:"p-accordion-header-text"},e.props.header);return ue.createElement("div",{className:i,style:e.props.headerStyle},ue.createElement("a",{href:"#"+s,id:l,className:"p-accordion-header-link","aria-controls":s,role:"tab","aria-expanded":t,onClick:function(t){return o.onTabHeaderClick(t,e,n)},tabIndex:u},ue.createElement("span",{className:a}),c))}},{key:"renderTabContent",value:function(e,t,n){var r=ze("p-toggleable-content",e.props.contentClassName),o=this.state.id+"_content_"+n,i=ue.createRef();return ue.createElement(kt,{nodeRef:i,classNames:"p-toggleable-content",timeout:{enter:1e3,exit:450},in:t,unmountOnExit:!0,options:this.props.transitionOptions},ue.createElement("div",{ref:i,id:o,className:r,style:e.props.contentStyle,role:"region","aria-labelledby":this.state.id+"_header_"+n},ue.createElement("div",{className:"p-accordion-content"},e.props.children)))}},{key:"renderTab",value:function(e,t){var n=this.isSelected(t),r=this.renderTabHeader(e,n,t),o=this.renderTabContent(e,n,t),i=ze("p-accordion-tab",{"p-accordion-tab-active":n});return ue.createElement("div",{key:e.props.header,className:i},r,o)}},{key:"renderTabs",value:function(){var e=this;return ue.Children.map(this.props.children,(function(t,n){if(t&&t.type===yo)return e.renderTab(t,n)}))}},{key:"render",value:function(){var e=this,t=ze("p-accordion p-component",this.props.className),n=this.renderTabs();return ue.createElement("div",{ref:function(t){return e.container=t},id:this.state.id,className:t,style:this.props.style},n)}}],n&&io(t.prototype,n),r&&io(t,r),i}(ue.Component);fo(_o,"defaultProps",{id:null,activeIndex:null,className:null,style:null,multiple:!1,expandIcon:"pi pi-chevron-right",collapseIcon:"pi pi-chevron-down",transitionOptions:null,onTabOpen:null,onTabClose:null,onTabChange:null});var bo="M:\\duo-vc\\src\\components\\Accordion.js";class go extends _o{onTabHeaderClick(e,t,n){if(!t.props.disabled){const t=this.isSelected(n);let r;if(this.props.multiple){let e=(this.props.onTabChange?this.props.activeIndex:this.state.activeIndex)||[];e=t?e.filter((e=>e!==n)):[...e,n],r=e}else r=t?null:n;let o=t?this.props.onTabClose:this.props.onTabOpen;o&&o({originalEvent:e,index:n}),this.props.onTabChange?this.props.onTabChange({originalEvent:e,index:r}):(this.setState({activeIndex:r}),this.props.onUncontrolledTabChange&&this.props.onUncontrolledTabChange({originalEvent:e,index:r}))}e.preventDefault()}renderTabContent(e,t,n){const r=e.props.contentClassName,o=`${this.state.id}_content_${n}`;return this.isSelected(n)&&d("div",{id:o,className:r,style:e.props.contentStyle,role:"region","aria-labelledby":`${this.state.id}_header_${n}`,__source:{fileName:bo,lineNumber:60,columnNumber:7}},d("div",{className:"p-accordion-content",__source:{fileName:bo,lineNumber:67,columnNumber:9}},e.props.children))}renderTab(e,t){const n=this.isSelected(t),r=this.renderTabHeader(e,n,t),o=this.renderTabContent(e,n,t),i=gr("p-accordion-tab",{"p-accordion-tab-active":n});return d("div",{ref:e.ref,key:e.key||e.props.header,className:i,__source:{fileName:bo,lineNumber:82,columnNumber:7}},r,o)}}function Eo(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n0&&(o=i+Math.floor(o/this.props.step-i/this.props.step)*this.props.step)}else o=Math.floor(o);this.updateValue(e,o)}},{key:"updateValue",value:function(e,t){var n=parseFloat(t.toFixed(10));if(this.props.range){0===this.handleIndex?nthis.props.value[1]&&(n=this.props.value[1]):n>this.props.max?n=this.props.max:nthis.props.max&&(n=this.props.max),this.props.onChange&&this.props.onChange({originalEvent:e,value:n})}},{key:"componentWillUnmount",value:function(){this.unbindDragListeners(),this.unbindTouchListeners()}},{key:"renderHandle",value:function(e,t,n){var r=this,o=ze("p-slider-handle",{"p-slider-handle-start":0===n,"p-slider-handle-end":1===n,"p-slider-handle-active":this.handleIndex===n});return ue.createElement("span",{onMouseDown:function(e){return r.onMouseDown(e,n)},onTouchStart:function(e){return r.onTouchStart(e,n)},onKeyDown:function(e){return r.onKeyDown(e,n)},tabIndex:this.props.tabIndex,className:o,style:{transition:this.dragging?"none":null,left:null!==e&&e+"%",bottom:t&&t+"%"},role:"slider","aria-valuemin":this.props.min,"aria-valuemax":this.props.max,"aria-valuenow":e||t,"aria-labelledby":this.props.ariaLabelledBy})}},{key:"renderRangeSlider",value:function(){var e=this.props.value||[0,0],t="horizontal"===this.props.orientation,n=100*(e[0]this.props.max?100:e[1]-this.props.min)/(this.props.max-this.props.min),o=t?this.renderHandle(n,null,0):this.renderHandle(null,n,0),i=t?this.renderHandle(r,null,1):this.renderHandle(null,r,1),a=t?{left:n+"%",width:r-n+"%"}:{bottom:n+"%",height:r-n+"%"};return ue.createElement(ue.Fragment,null,ue.createElement("span",{className:"p-slider-range",style:a}),o,i)}},{key:"renderSingleSlider",value:function(){var e,t=this.props.value||0;e=tthis.props.max?100:100*(t-this.props.min)/(this.props.max-this.props.min);var n="horizontal"===this.props.orientation?{width:e+"%"}:{height:e+"%"},r="horizontal"===this.props.orientation?this.renderHandle(e,null,null):this.renderHandle(null,e,null);return ue.createElement(ue.Fragment,null,ue.createElement("span",{className:"p-slider-range",style:n}),r)}},{key:"render",value:function(){var e=this,t=ze("p-slider p-component",this.props.className,{"p-disabled":this.props.disabled,"p-slider-horizontal":"horizontal"===this.props.orientation,"p-slider-vertical":"vertical"===this.props.orientation}),n=this.props.range?this.renderRangeSlider():this.renderSingleSlider();return ue.createElement("div",{id:this.props.id,ref:function(t){return e.el=t},style:this.props.style,className:t,onClick:this.onBarClick},n)}}],n&&wo(t.prototype,n),r&&wo(t,r),i}(ue.Component);!function(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n}(Ro,"defaultProps",{id:null,value:null,min:0,max:100,orientation:"horizontal",step:null,range:!1,style:null,className:null,disabled:!1,tabIndex:0,ariaLabelledBy:null,onChange:null,onSlideEnd:null});class Po extends Ro{onDrag(e){this.dragging&&(this.setValue(e),e.preventDefault(),this.props.onSlideStart&&this.props.onSlideStart({value:this.props.value}))}}var Lo="M:\\duo-vc\\src\\components\\SettingsForm.js";const Ao={[In]:{step:.1,label:"Speed",minValue:$n(In),minIcon:he.PLAY,minButtonValue:Gn(In),minButtonTitle:"Normal (default)",maxValue:Math.min(2.5,Yn(In)),maxIcon:he.FORWARD,maxButtonValue:Math.min(2,Yn(In)),maxButtonTitle:"Fast",displayScale:1,displaySuffix:"x"},[Dn]:{step:.05,label:"Volume",minValue:$n(Dn),minIcon:he.VOLUME_OFF,minButtonTitle:"Mute",maxValue:Yn(Dn),maxIcon:he.VOLUME_UP,maxButtonTitle:"Normal (default)",displayScale:100/Yn(Dn),displaySuffix:"%"}},Io={[kn]:"Effect",[Tn]:"Character/Syllable",[xn]:"Sentence",[Sn]:"Word",[Nn]:"Other"},Do={[Pn]:"Normal",[Ln]:"Slow"},jo=((e,t)=>{const n={};for(let r=0,o=e.length;rAn.map((t=>[e,t])))).filter((e=>cr(...e))),(e=>e[0])),Ho=(e,t)=>Io[e]+(jo[e].length>1?` - ${Do[t]}`:""),Mo={[null]:{icon:he.PAPERCLIP,label:"Defaults"},[er]:{icon:he.VOLUME_UP,label:"Challenge (listening)"},[tr]:{icon:he.PENCIL,label:"Challenge (other)"},[qn]:{icon:he.BOOK,label:"Story"},[Zn]:{icon:he.COMMENTS,label:"Forum"},[Jn]:{icon:he.INFO,label:"Characters"},[Qn]:{icon:he.QUESTION,label:"Other"}},Fo=({setting:e,label:t,value:n,defaultValue:r,disabled:o=!1,onChange:i=on})=>{var a,l;const[s,u]=Y(!1),[c,p]=Y(null),f=Ao[e],h=null!==r,v=h&&null===n,m=null!==(a=null!=c?c:null==n?void 0:n.value)&&void 0!==a?a:null==r?void 0:r.value,y=cn(n||r,"isRelative"),_=y&&(null!==(l=null==n?void 0:n.isRelative)&&void 0!==l?l:null==r?void 0:r.isRelative),b=e=>i(n&&{...n,value:e});return mr((()=>{!s&&null!==n&&an(c)&&c!==n.value&&(p(null),i({...n,value:c}))}),250,[n,i,s,c,p]),d("div",{className:gr(["p-field","p-grid","p-ai-center"]),__source:{fileName:Lo,lineNumber:208,columnNumber:7}},d("h5",{className:gr(["p-col-7","p-my-2","p-text-nowrap"]),__source:{fileName:Lo,lineNumber:209,columnNumber:9}},t),d("div",{className:gr(["p-col-5","p-my-2","p-d-flex","p-jc-end"]),__source:{fileName:Lo,lineNumber:212,columnNumber:9}},y&&d(to,{checked:_,disabled:o||v,onChange:e=>{return t=e.value,i(n&&{...n,isRelative:t});var t},onLabel:"",offLabel:"",onIcon:he.PERCENTAGE,offIcon:he.PERCENTAGE,tooltipOptions:{position:"left"},tooltip:_?"Click to ignore the original setting (generally not recommended).":"Click to combine the original setting with yours (generally recommended).",__source:{fileName:Lo,lineNumber:214,columnNumber:13}}),h&&d(to,{checked:v,disabled:o,onChange:e=>i(e.value?null:{...r}),onLabel:"",offLabel:"",onIcon:he.PAPERCLIP,offIcon:he.PAPERCLIP,tooltipOptions:{position:"left"},tooltip:v?"Click to use a custom setting for this context.":"Click to use the default setting for this context.",__source:{fileName:Lo,lineNumber:231,columnNumber:13}})),d("div",{className:gr(["p-col-10","p-d-flex","p-ai-center"]),__source:{fileName:Lo,lineNumber:248,columnNumber:9}},d(Pr,{disabled:o||v,title:f.minButtonTitle,icon:`pi ${f.minIcon}`,className:"p-button-rounded p-button-text p-button-plain",onClick:()=>b(f.minButtonValue||f.minValue),__source:{fileName:Lo,lineNumber:249,columnNumber:11}}),d(Po,{min:f.minValue,max:f.maxValue,step:f.step,value:m,disabled:o||v,onChange:e=>p(e.value),onSlideStart:()=>u(!0),onSlideEnd:()=>u(!1),__source:{fileName:Lo,lineNumber:256,columnNumber:11}}),d(Pr,{disabled:o||v,title:f.maxButtonTitle,icon:`pi ${f.maxIcon}`,className:"p-button-rounded p-button-text p-button-plain",onClick:()=>b(f.maxButtonValue||f.maxValue),__source:{fileName:Lo,lineNumber:266,columnNumber:11}})),d("div",{className:gr(["p-col-2","p-text-right"]),__source:{fileName:Lo,lineNumber:274,columnNumber:9}},(m*f.displayScale).toLocaleString(),f.displaySuffix))},Wo=({context:e=null,config:t,disabled:n=!1,activeSetting:r=null,onSettingValueChange:o=on,onActiveSettingChange:i=on})=>{const a=ir.map((r=>{const i=pr(t,r,e,!1),a=e&&pr(t,r,null),l=ar(r)&&d(Fo,{key:`${r}-_main_`,setting:r,value:i,defaultValue:a,disabled:n,onChange:t=>o({setting:r,context:e,value:t}),label:"Main",__source:{fileName:Lo,lineNumber:295,columnNumber:9}}),s=Rn.flatMap((i=>jo[i].map((([,a])=>{const l=fr(t,r,i,a,e,!1),s=e&&fr(t,r,i,a,null);if(void 0!==l)return d(Fo,{key:`${r}-${i}-${a}`,setting:r,value:l,defaultValue:s,disabled:n,onChange:t=>o({setting:r,context:e,soundType:i,soundSpeed:a,value:t}),label:d(v,{__source:{fileName:Lo,lineNumber:321,columnNumber:19}},d("span",{className:"p-text-normal",__source:{fileName:Lo,lineNumber:322,columnNumber:21}},"Sound: "),d("span",{__source:{fileName:Lo,lineNumber:323,columnNumber:21}},Ho(i,a))),__source:{fileName:Lo,lineNumber:313,columnNumber:15}})}))));return d(Kr,{key:`${r}-panel`,header:Ao[r].label,headerClassName:"p-setting-tab-header p-text-center",__source:{fileName:Lo,lineNumber:333,columnNumber:9}},[l,...s].filter(Boolean))}));return d("div",{className:"p-fluid",__source:{fileName:Lo,lineNumber:344,columnNumber:7}},d(zr,{activeIndex:ir.indexOf(r)||0,onTabChange:e=>i(ir[e.index]),__source:{fileName:Lo,lineNumber:345,columnNumber:9}},a))},Uo=({config:e,disabled:t=!1,onSettingValueChange:n=on})=>{const[r,o]=_r("popup-active-panel",0),[i,a]=_r("popup-active-setting",Dn),l=Z([]),s=Q((e=>{o(e.index),l[e.index]&&setTimeout((()=>no(l[e.index],10,"smooth")))}),[o,l]);q((()=>s({index:r})),[]);const u=e=>d(v,{__source:{fileName:Lo,lineNumber:371,columnNumber:5}},d("i",{className:Mo[e].icon,__source:{fileName:Lo,lineNumber:372,columnNumber:7}}),d("span",{className:"p-text-bold",__source:{fileName:Lo,lineNumber:373,columnNumber:7}},Mo[e].label));return d(go,{key:"settings-accordion",activeIndex:r,onUncontrolledTabChange:s,__source:{fileName:Lo,lineNumber:378,columnNumber:5}},[null,...nr].map(((r,o)=>d(yo,{key:`${r||"_default_"}-tab`,ref:e=>l[o]=e,header:u(r),__source:{fileName:Lo,lineNumber:384,columnNumber:9}},d(Wo,{context:r,config:e,disabled:t,activeSetting:i,onSettingValueChange:n,onActiveSettingChange:a,__source:{fileName:Lo,lineNumber:389,columnNumber:11}})))))};var Bo="M:\\duo-vc\\src\\components\\SettingsPopup.js";I(d((()=>{const e=Z(),[t,n]=Y(ur),[r,o]=Y(!0),i=(t,n)=>{e.current&&e.current.show({summary:t,severity:"error",detail:d(v,{__source:{fileName:Bo,lineNumber:24,columnNumber:11}},"Retry by clicking ",d("a",{href:"#",onClick:()=>n(),__source:{fileName:Bo,lineNumber:25,columnNumber:31}},"here"),".")})},a=async(e,t)=>{o(!0),n(dr(e,t));try{const[,e]=await Promise.all([(r=250,new Promise((e=>setTimeout(e,r)))),En("update_current_profile",{updateRequest:t})]);n(e)}catch(r){i("Failed to update configuration",(()=>a(e,t))),bn(r),n(e)}finally{o(!1)}var r};return X((()=>{const e=async()=>{try{o(!0);const e=await En("get_current_profile");n(e)}catch(t){i("Failed to load configuration",e),bn(t),n(ur)}finally{o(!1)}};e()}),[]),d(v,{__source:{fileName:Bo,lineNumber:71,columnNumber:5}},d(Uo,{config:t,disabled:r,onSettingValueChange:e=>a(t,e),__source:{fileName:Bo,lineNumber:72,columnNumber:7}}),r&&d("div",{className:"loader-overlay",__source:{fileName:Bo,lineNumber:78,columnNumber:9}},d("div",{className:"loader-wrapper",__source:{fileName:Bo,lineNumber:79,columnNumber:11}},d(rn,{strokeWidth:4,__source:{fileName:Bo,lineNumber:80,columnNumber:13}}))),d($t,{ref:e,__source:{fileName:Bo,lineNumber:84,columnNumber:7}}))}),{__source:{fileName:"M:\\duo-vc\\src\\popup.js",lineNumber:10,columnNumber:8}}),document.getElementById("container"))}(); +_r=gr,function(){var e={}.hasOwnProperty;function t(){for(var n=[],r=0;r=r?r:n}},{key:"componentDidMount",value:function(){this.state.id||this.setState({id:nt()}),this.updateInkBar()}},{key:"componentDidUpdate",value:function(e){this.updateInkBar(),e.activeIndex!==this.props.activeIndex&&this.updateScrollBar(this.props.activeIndex)}},{key:"renderTabHeader",value:function(e,t){var n=this,r=this.isSelected(t),o=ze("p-unselectable-text",{"p-tabview-selected p-highlight":r,"p-disabled":e.props.disabled},e.props.headerClassName),i=this.state.id+"_header_"+t,a=this.state.id+"_content_"+t,l=e.props.disabled?null:0,s=e.props.leftIcon&&ue.createElement("i",{className:e.props.leftIcon}),u=ue.createElement("span",{className:"p-tabview-title"},e.props.header),c=e.props.rightIcon&&ue.createElement("i",{className:e.props.rightIcon}),p=ue.createElement("a",{role:"tab",className:"p-tabview-nav-link",onClick:function(r){return n.onTabHeaderClick(r,e,t)},id:i,"aria-controls":a,"aria-selected":r,tabIndex:l},s,u,c,ue.createElement(dt,null));if(e.props.headerTemplate){var f={className:"p-tabview-nav-link",titleClassName:"p-tabview-title",onClick:function(r){return n.onTabHeaderClick(r,e,t)},leftIconElement:s,titleElement:u,rightIconElement:c,element:p,props:this.props,index:t,selected:r,ariaControls:a};p=Qe.getJSXElement(e.props.headerTemplate,f)}return ue.createElement("li",{ref:function(e){return n["tab_".concat(t)]=e},className:o,style:e.props.headerStyle,role:"presentation"},p)}},{key:"renderTabHeaders",value:function(){var e=this;return ue.Children.map(this.props.children,(function(t,n){return e.renderTabHeader(t,n)}))}},{key:"renderNavigator",value:function(){var e=this,t=this.renderTabHeaders();return ue.createElement("div",{ref:function(t){return e.content=t},id:this.props.id,className:"p-tabview-nav-content",style:this.props.style,onScroll:this.onScroll},ue.createElement("ul",{ref:function(t){return e.nav=t},className:"p-tabview-nav",role:"tablist"},t,ue.createElement("li",{ref:function(t){return e.inkbar=t},className:"p-tabview-ink-bar"})))}},{key:"renderContent",value:function(){var e=this,t=ue.Children.map(this.props.children,(function(t,n){if(!e.props.renderActiveOnly||e.isSelected(n))return e.createContent(t,n)}));return ue.createElement("div",{className:"p-tabview-panels"},t)}},{key:"createContent",value:function(e,t){var n=this.isSelected(t),r=ze(e.props.contentClassName,"p-tabview-panel",{"p-hidden":!n}),o=this.state.id+"_content_"+t,i=this.state.id+"_header_"+t;return ue.createElement("div",{id:o,"aria-labelledby":i,"aria-hidden":!n,className:r,style:e.props.contentStyle,role:"tabpanel"},this.props.renderActiveOnly?n&&e.props.children:e.props.children)}},{key:"renderPrevButton",value:function(){var e=this;return this.props.scrollable&&!this.state.backwardIsDisabled?ue.createElement("button",{ref:function(t){return e.prevBtn=t},className:"p-tabview-nav-prev p-tabview-nav-btn p-link",onClick:this.navBackward,type:"button"},ue.createElement("span",{className:"pi pi-chevron-left"}),ue.createElement(dt,null)):null}},{key:"renderNextButton",value:function(){var e=this;if(this.props.scrollable&&!this.state.forwardIsDisabled)return ue.createElement("button",{ref:function(t){return e.nextBtn=t},className:"p-tabview-nav-next p-tabview-nav-btn p-link",onClick:this.navForward,type:"button"},ue.createElement("span",{className:"pi pi-chevron-right"}),ue.createElement(dt,null))}},{key:"render",value:function(){var e=ze("p-tabview p-component",this.props.className,{"p-tabview-scrollable":this.props.scrollable}),t=this.renderNavigator(),n=this.renderContent(),r=this.renderPrevButton(),o=this.renderNextButton();return ue.createElement("div",{className:e},ue.createElement("div",{className:"p-tabview-nav-container"},r,t,o),n)}}])&&Ar(t.prototype,n),r&&Ar(t,r),i}(ue.Component);function Gr(e,t){for(var n=0;n0&&this.props.offLabel&&this.props.offLabel.length>0}},{key:"hasIcon",value:function(){return this.props.onIcon&&this.props.onIcon.length>0&&this.props.offIcon&&this.props.offIcon.length>0}},{key:"getLabel",value:function(){return this.hasLabel()?this.props.checked?this.props.onLabel:this.props.offLabel:" "}},{key:"componentDidMount",value:function(){this.props.tooltip&&this.renderTooltip()}},{key:"componentDidUpdate",value:function(e){e.tooltip===this.props.tooltip&&e.tooltipOptions===this.props.tooltipOptions||(this.tooltip?this.tooltip.update(function(e){for(var t=1;t{const r=((e,t=10)=>{let n=e.parentElement;for(;n;){if(n.clientHeight>0&&n.scrollHeight-t>n.clientHeight&&(document.documentElement===n||-1===["hidden","visible"].indexOf(window.getComputedStyle(n).overflowY)))return n;n=n.parentElement}return null})(e);if(!r)return;const o=((e,t)=>{let n=0,r=0;if(t.contains(e)){let o=e.offsetParent;for(;o&&(n+=e.offsetLeft,r+=e.offsetTop,e=o,o=o.offsetParent,t.contains(o)););}return{x:n,y:r}})(e,r).y;(or.scrollTop+r.clientHeight)&&r.scrollTo({top:o-t,behavior:n})};function oo(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0:t===e}},{key:"componentDidMount",value:function(){this.state.id||this.setState({id:nt()})}},{key:"renderTabHeader",value:function(e,t,n){var r,o=this,i=ze("p-accordion-header",{"p-highlight":t,"p-disabled":e.props.disabled},e.props.headerClassName),a=ze("p-accordion-toggle-icon",(ho(r={},"".concat(this.props.expandIcon),!t),ho(r,"".concat(this.props.collapseIcon),t),r)),l=this.state.id+"_header_"+n,s=this.state.id+"_content_"+n,u=e.props.disabled?-1:null,c=e.props.headerTemplate?Qe.getJSXElement(e.props.headerTemplate,e.props):ue.createElement("span",{className:"p-accordion-header-text"},e.props.header);return ue.createElement("div",{className:i,style:e.props.headerStyle},ue.createElement("a",{href:"#"+s,id:l,className:"p-accordion-header-link","aria-controls":s,role:"tab","aria-expanded":t,onClick:function(t){return o.onTabHeaderClick(t,e,n)},tabIndex:u},ue.createElement("span",{className:a}),c))}},{key:"renderTabContent",value:function(e,t,n){var r=ze("p-toggleable-content",e.props.contentClassName),o=this.state.id+"_content_"+n,i=ue.createRef();return ue.createElement(kt,{nodeRef:i,classNames:"p-toggleable-content",timeout:{enter:1e3,exit:450},in:t,unmountOnExit:!0,options:this.props.transitionOptions},ue.createElement("div",{ref:i,id:o,className:r,style:e.props.contentStyle,role:"region","aria-labelledby":this.state.id+"_header_"+n},ue.createElement("div",{className:"p-accordion-content"},e.props.children)))}},{key:"renderTab",value:function(e,t){var n=this.isSelected(t),r=this.renderTabHeader(e,n,t),o=this.renderTabContent(e,n,t),i=ze("p-accordion-tab",{"p-accordion-tab-active":n});return ue.createElement("div",{key:e.props.header,className:i},r,o)}},{key:"renderTabs",value:function(){var e=this;return ue.Children.map(this.props.children,(function(t,n){if(t&&t.type===_o)return e.renderTab(t,n)}))}},{key:"render",value:function(){var e=this,t=ze("p-accordion p-component",this.props.className),n=this.renderTabs();return ue.createElement("div",{ref:function(t){return e.container=t},id:this.state.id,className:t,style:this.props.style},n)}}],n&&ao(t.prototype,n),r&&ao(t,r),i}(ue.Component);ho(bo,"defaultProps",{id:null,activeIndex:null,className:null,style:null,multiple:!1,expandIcon:"pi pi-chevron-right",collapseIcon:"pi pi-chevron-down",transitionOptions:null,onTabOpen:null,onTabClose:null,onTabChange:null});var go="M:\\duo-vc\\src\\components\\Accordion.js";class Eo extends bo{onTabHeaderClick(e,t,n){if(!t.props.disabled){const t=this.isSelected(n);let r;if(this.props.multiple){let e=(this.props.onTabChange?this.props.activeIndex:this.state.activeIndex)||[];e=t?e.filter((e=>e!==n)):[...e,n],r=e}else r=t?null:n;let o=t?this.props.onTabClose:this.props.onTabOpen;o&&o({originalEvent:e,index:n}),this.props.onTabChange?this.props.onTabChange({originalEvent:e,index:r}):(this.setState({activeIndex:r}),this.props.onUncontrolledTabChange&&this.props.onUncontrolledTabChange({originalEvent:e,index:r}))}e.preventDefault()}renderTabContent(e,t,n){const r=e.props.contentClassName,o=`${this.state.id}_content_${n}`;return this.isSelected(n)&&d("div",{id:o,className:r,style:e.props.contentStyle,role:"region","aria-labelledby":`${this.state.id}_header_${n}`,__source:{fileName:go,lineNumber:60,columnNumber:7}},d("div",{className:"p-accordion-content",__source:{fileName:go,lineNumber:67,columnNumber:9}},e.props.children))}renderTab(e,t){const n=this.isSelected(t),r=this.renderTabHeader(e,n,t),o=this.renderTabContent(e,n,t),i=Er("p-accordion-tab",{"p-accordion-tab-active":n});return d("div",{ref:e.ref,key:e.key||e.props.header,className:i,__source:{fileName:go,lineNumber:82,columnNumber:7}},r,o)}}function Oo(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n0&&(o=i+Math.floor(o/this.props.step-i/this.props.step)*this.props.step)}else o=Math.floor(o);this.updateValue(e,o)}},{key:"updateValue",value:function(e,t){var n=parseFloat(t.toFixed(10));if(this.props.range){0===this.handleIndex?nthis.props.value[1]&&(n=this.props.value[1]):n>this.props.max?n=this.props.max:nthis.props.max&&(n=this.props.max),this.props.onChange&&this.props.onChange({originalEvent:e,value:n})}},{key:"componentWillUnmount",value:function(){this.unbindDragListeners(),this.unbindTouchListeners()}},{key:"renderHandle",value:function(e,t,n){var r=this,o=ze("p-slider-handle",{"p-slider-handle-start":0===n,"p-slider-handle-end":1===n,"p-slider-handle-active":this.handleIndex===n});return ue.createElement("span",{onMouseDown:function(e){return r.onMouseDown(e,n)},onTouchStart:function(e){return r.onTouchStart(e,n)},onKeyDown:function(e){return r.onKeyDown(e,n)},tabIndex:this.props.tabIndex,className:o,style:{transition:this.dragging?"none":null,left:null!==e&&e+"%",bottom:t&&t+"%"},role:"slider","aria-valuemin":this.props.min,"aria-valuemax":this.props.max,"aria-valuenow":e||t,"aria-labelledby":this.props.ariaLabelledBy})}},{key:"renderRangeSlider",value:function(){var e=this.props.value||[0,0],t="horizontal"===this.props.orientation,n=100*(e[0]this.props.max?100:e[1]-this.props.min)/(this.props.max-this.props.min),o=t?this.renderHandle(n,null,0):this.renderHandle(null,n,0),i=t?this.renderHandle(r,null,1):this.renderHandle(null,r,1),a=t?{left:n+"%",width:r-n+"%"}:{bottom:n+"%",height:r-n+"%"};return ue.createElement(ue.Fragment,null,ue.createElement("span",{className:"p-slider-range",style:a}),o,i)}},{key:"renderSingleSlider",value:function(){var e,t=this.props.value||0;e=tthis.props.max?100:100*(t-this.props.min)/(this.props.max-this.props.min);var n="horizontal"===this.props.orientation?{width:e+"%"}:{height:e+"%"},r="horizontal"===this.props.orientation?this.renderHandle(e,null,null):this.renderHandle(null,e,null);return ue.createElement(ue.Fragment,null,ue.createElement("span",{className:"p-slider-range",style:n}),r)}},{key:"render",value:function(){var e=this,t=ze("p-slider p-component",this.props.className,{"p-disabled":this.props.disabled,"p-slider-horizontal":"horizontal"===this.props.orientation,"p-slider-vertical":"vertical"===this.props.orientation}),n=this.props.range?this.renderRangeSlider():this.renderSingleSlider();return ue.createElement("div",{id:this.props.id,ref:function(t){return e.el=t},style:this.props.style,className:t,onClick:this.onBarClick},n)}}],n&&Co(t.prototype,n),r&&Co(t,r),i}(ue.Component);!function(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n}(Po,"defaultProps",{id:null,value:null,min:0,max:100,orientation:"horizontal",step:null,range:!1,style:null,className:null,disabled:!1,tabIndex:0,ariaLabelledBy:null,onChange:null,onSlideEnd:null});class Lo extends Po{onDrag(e){this.dragging&&(this.setValue(e),e.preventDefault(),this.props.onSlideStart&&this.props.onSlideStart({value:this.props.value}))}}var Ao="M:\\duo-vc\\src\\components\\SettingsForm.js";const Io={[In]:{step:.1,label:"Speed",minValue:$n(In),minIcon:he.PLAY,minButtonValue:Yn(In),minButtonTitle:"Normal (default)",maxValue:Math.min(2.5,Gn(In)),maxIcon:he.FORWARD,maxButtonValue:Math.min(2,Gn(In)),maxButtonTitle:"Fast",displayScale:1,displaySuffix:"x"},[Dn]:{step:.05,label:"Volume",minValue:$n(Dn),minIcon:he.VOLUME_OFF,minButtonTitle:"Mute",maxValue:Gn(Dn),maxIcon:he.VOLUME_UP,maxButtonTitle:"Normal (default)",displayScale:100/Gn(Dn),displaySuffix:"%"}},Do={[kn]:"Effect",[Tn]:"Character/Syllable",[xn]:"Sentence",[Sn]:"Word",[Nn]:"Other"},jo={[Pn]:"Normal",[Ln]:"Slow"},Ho=((e,t)=>{const n={};for(let r=0,o=e.length;rAn.map((t=>[e,t])))).filter((e=>pr(...e))),(e=>e[0])),Mo=(e,t)=>Do[e]+(Ho[e].length>1?` - ${jo[t]}`:""),Fo={[null]:{icon:he.PAPERCLIP,label:"Defaults"},[tr]:{icon:he.VOLUME_UP,label:"Challenge (listening)"},[nr]:{icon:he.PENCIL,label:"Challenge (other)"},[Qn]:{icon:he.MAP,label:"Guidebook"},[qn]:{icon:he.BOOK,label:"Story"},[Zn]:{icon:he.COMMENTS,label:"Forum"},[Jn]:{icon:he.INFO,label:"Characters"},[er]:{icon:he.QUESTION,label:"Other"}},Wo=({setting:e,label:t,value:n,defaultValue:r,disabled:o=!1,onChange:i=on})=>{var a,l;const[s,u]=G(!1),[c,p]=G(null),f=Io[e],h=null!==r,v=h&&null===n,m=null!==(a=null!=c?c:null==n?void 0:n.value)&&void 0!==a?a:null==r?void 0:r.value,y=cn(n||r,"isRelative"),_=y&&(null!==(l=null==n?void 0:n.isRelative)&&void 0!==l?l:null==r?void 0:r.isRelative),b=e=>i(n&&{...n,value:e});return yr((()=>{!s&&null!==n&&an(c)&&c!==n.value&&(p(null),i({...n,value:c}))}),250,[n,i,s,c,p]),d("div",{className:Er(["p-field","p-grid","p-ai-center"]),__source:{fileName:Ao,lineNumber:213,columnNumber:7}},d("h5",{className:Er(["p-col-7","p-my-2","p-text-nowrap"]),__source:{fileName:Ao,lineNumber:214,columnNumber:9}},t),d("div",{className:Er(["p-col-5","p-my-2","p-d-flex","p-jc-end"]),__source:{fileName:Ao,lineNumber:217,columnNumber:9}},y&&d(no,{checked:_,disabled:o||v,onChange:e=>{return t=e.value,i(n&&{...n,isRelative:t});var t},onLabel:"",offLabel:"",onIcon:he.PERCENTAGE,offIcon:he.PERCENTAGE,tooltipOptions:{position:"left"},tooltip:_?"Click to ignore the original setting (generally not recommended).":"Click to combine the original setting with yours (generally recommended).",__source:{fileName:Ao,lineNumber:219,columnNumber:13}}),h&&d(no,{checked:v,disabled:o,onChange:e=>i(e.value?null:{...r}),onLabel:"",offLabel:"",onIcon:he.PAPERCLIP,offIcon:he.PAPERCLIP,tooltipOptions:{position:"left"},tooltip:v?"Click to use a custom setting for this context.":"Click to use the default setting for this context.",__source:{fileName:Ao,lineNumber:236,columnNumber:13}})),d("div",{className:Er(["p-col-10","p-d-flex","p-ai-center"]),__source:{fileName:Ao,lineNumber:253,columnNumber:9}},d(Lr,{disabled:o||v,title:f.minButtonTitle,icon:`pi ${f.minIcon}`,className:"p-button-rounded p-button-text p-button-plain",onClick:()=>b(f.minButtonValue||f.minValue),__source:{fileName:Ao,lineNumber:254,columnNumber:11}}),d(Lo,{min:f.minValue,max:f.maxValue,step:f.step,value:m,disabled:o||v,onChange:e=>p(e.value),onSlideStart:()=>u(!0),onSlideEnd:()=>u(!1),__source:{fileName:Ao,lineNumber:261,columnNumber:11}}),d(Lr,{disabled:o||v,title:f.maxButtonTitle,icon:`pi ${f.maxIcon}`,className:"p-button-rounded p-button-text p-button-plain",onClick:()=>b(f.maxButtonValue||f.maxValue),__source:{fileName:Ao,lineNumber:271,columnNumber:11}})),d("div",{className:Er(["p-col-2","p-text-right"]),__source:{fileName:Ao,lineNumber:279,columnNumber:9}},(m*f.displayScale).toLocaleString(),f.displaySuffix))},Uo=({context:e=null,config:t,disabled:n=!1,activeSetting:r=null,onSettingValueChange:o=on,onActiveSettingChange:i=on})=>{const a=ar.map((r=>{const i=fr(t,r,e,!1),a=e&&fr(t,r,null),l=lr(r)&&d(Wo,{key:`${r}-_main_`,setting:r,value:i,defaultValue:a,disabled:n,onChange:t=>o({setting:r,context:e,value:t}),label:"Main",__source:{fileName:Ao,lineNumber:300,columnNumber:9}}),s=Rn.flatMap((i=>Ho[i].map((([,a])=>{const l=dr(t,r,i,a,e,!1),s=e&&dr(t,r,i,a,null);if(void 0!==l)return d(Wo,{key:`${r}-${i}-${a}`,setting:r,value:l,defaultValue:s,disabled:n,onChange:t=>o({setting:r,context:e,soundType:i,soundSpeed:a,value:t}),label:d(v,{__source:{fileName:Ao,lineNumber:326,columnNumber:19}},d("span",{className:"p-text-normal",__source:{fileName:Ao,lineNumber:327,columnNumber:21}},"Sound: "),d("span",{__source:{fileName:Ao,lineNumber:328,columnNumber:21}},Mo(i,a))),__source:{fileName:Ao,lineNumber:318,columnNumber:15}})}))));return d(zr,{key:`${r}-panel`,header:Io[r].label,headerClassName:"p-setting-tab-header p-text-center",__source:{fileName:Ao,lineNumber:338,columnNumber:9}},[l,...s].filter(Boolean))}));return d("div",{className:"p-fluid",__source:{fileName:Ao,lineNumber:349,columnNumber:7}},d($r,{activeIndex:ar.indexOf(r)||0,onTabChange:e=>i(ar[e.index]),__source:{fileName:Ao,lineNumber:350,columnNumber:9}},a))},Bo=({config:e,disabled:t=!1,onSettingValueChange:n=on})=>{const[r,o]=br("popup-active-panel",0),[i,a]=br("popup-active-setting",Dn),l=Z([]),s=Q((e=>{o(e.index),l[e.index]&&setTimeout((()=>ro(l[e.index],10,"smooth")))}),[o,l]);q((()=>s({index:r})),[]);const u=e=>d(v,{__source:{fileName:Ao,lineNumber:376,columnNumber:5}},d("i",{className:Fo[e].icon,__source:{fileName:Ao,lineNumber:377,columnNumber:7}}),d("span",{className:"p-text-bold",__source:{fileName:Ao,lineNumber:378,columnNumber:7}},Fo[e].label));return d(Eo,{key:"settings-accordion",activeIndex:r,onUncontrolledTabChange:s,__source:{fileName:Ao,lineNumber:383,columnNumber:5}},[null,...rr].map(((r,o)=>d(_o,{key:`${r||"_default_"}-tab`,ref:e=>l[o]=e,header:u(r),__source:{fileName:Ao,lineNumber:389,columnNumber:9}},d(Uo,{context:r,config:e,disabled:t,activeSetting:i,onSettingValueChange:n,onActiveSettingChange:a,__source:{fileName:Ao,lineNumber:394,columnNumber:11}})))))};var Vo="M:\\duo-vc\\src\\components\\SettingsPopup.js";I(d((()=>{const e=Z(),[t,n]=G(cr),[r,o]=G(!0),i=(t,n)=>{e.current&&e.current.show({summary:t,severity:"error",detail:d(v,{__source:{fileName:Vo,lineNumber:24,columnNumber:11}},"Retry by clicking ",d("a",{href:"#",onClick:()=>n(),__source:{fileName:Vo,lineNumber:25,columnNumber:31}},"here"),".")})},a=async(e,t)=>{o(!0),n(hr(e,t));try{const[,e]=await Promise.all([(r=250,new Promise((e=>setTimeout(e,r)))),En("update_current_profile",{updateRequest:t})]);n(e)}catch(r){i("Failed to update configuration",(()=>a(e,t))),bn(r),n(e)}finally{o(!1)}var r};return X((()=>{const e=async()=>{try{o(!0);const e=await En("get_current_profile");n(e)}catch(t){i("Failed to load configuration",e),bn(t),n(cr)}finally{o(!1)}};e()}),[]),d(v,{__source:{fileName:Vo,lineNumber:71,columnNumber:5}},d(Bo,{config:t,disabled:r,onSettingValueChange:e=>a(t,e),__source:{fileName:Vo,lineNumber:72,columnNumber:7}}),r&&d("div",{className:"loader-overlay",__source:{fileName:Vo,lineNumber:78,columnNumber:9}},d("div",{className:"loader-wrapper",__source:{fileName:Vo,lineNumber:79,columnNumber:11}},d(rn,{strokeWidth:4,__source:{fileName:Vo,lineNumber:80,columnNumber:13}}))),d($t,{ref:e,__source:{fileName:Vo,lineNumber:84,columnNumber:7}}))}),{__source:{fileName:"M:\\duo-vc\\src\\popup.js",lineNumber:10,columnNumber:8}}),document.getElementById("container"))}(); diff --git a/package.json b/package.json index ddaf28d..ae4b68e 100644 --- a/package.json +++ b/package.json @@ -3,7 +3,7 @@ "description": "A browser extension providing fine-grained sound controls for Duolingo.", "license": "MIT", "author": "blmage", - "version": "1.5.1", + "version": "1.6.0", "homepage": "https://github.com/blmage/duolingo-sound-controls", "scripts": { "build": "rollup -c --environment production",