diff --git a/src/static/app/dist/assets/index.css b/src/static/app/dist/assets/index.css index 7c42a06..e4594b8 100644 --- a/src/static/app/dist/assets/index.css +++ b/src/static/app/dist/assets/index.css @@ -1,4 +1,4 @@ -@charset "UTF-8";*{font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol}.dp__input{font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol!important}::-webkit-scrollbar{display:none}.codeFont{font-family:SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace}.feather{width:16px;height:16px;vertical-align:text-bottom}.btn-primary{font-weight:700}@property --brandColor1{syntax: ""; initial-value: #009dff; inherits: false;}@property --brandColor2{syntax: ""; initial-value: #ff4a00; inherits: false;}@property --distance2{syntax: ""; initial-value: 0%; inherits: false;}@property --degree{syntax: ""; initial-value: 234deg; inherits: false;}.dashboardLogo{background:#178bff;background:linear-gradient(234deg,var(--brandColor1) var(--distance2),var(--brandColor2) 100%);-webkit-background-clip:text;-webkit-text-fill-color:transparent;transition:--brandColor1 1s,--brandColor2 .3s,--distance2 1s!important}.btn-brand{background:linear-gradient(var(--degree),var(--brandColor1) var(--distance2),var(--brandColor2) 100%);border:0!important;transition:--brandColor1 1s,--brandColor2 1s,--distance2 .5s!important}.btn-brand.loading{animation:spin infinite forwards 3s linear}.btn-brand:hover,.dashboardLogo:hover{--brandColor1: #009dff;--brandColor2: #ff875b;--distance2: 30%}.signInBtn.signedIn{--distance2: 100%}@keyframes spin{0%{--degree: 234deg}to{--degree: 594deg}}[data-bs-theme=dark].main,#app:has(.main[data-bs-theme=dark]),[data-bs-theme=dark].navbar-container{background-color:#1b1e21}.sidebar .nav-link,.bottomNavContainer .nav-link{font-weight:500;color:#333;transition:.2s cubic-bezier(.82,-.07,0,1.01)}[data-bs-theme=dark] .sidebar .nav-link{color:#fff}[data-bs-theme=dark] .sidebar .nav-link.active{color:#74b7ff}[data-bs-theme=dark] .nav-link:hover{background-color:#323844}.nav-link:hover{background-color:#e8e8e8}.sidebar .nav-link .feather{margin-right:4px;color:#999}.sidebar .nav-link.active,.bottomNavContainer .nav-link.active{color:#007bff}.sidebar .nav-link:hover .feather,.sidebar .nav-link.active .feather{color:inherit}.sidebar-heading{font-size:.75rem;text-transform:uppercase}.navbar-brand{padding-top:.75rem;padding-bottom:.75rem;font-size:1rem}.navbar .navbar-toggler{top:.25rem;right:1rem}.form-control{transition:all .2s ease-in-out}.form-control:disabled{cursor:not-allowed}.navbar .form-control{padding:.75rem 1rem;border-width:0;border-radius:0}.form-control-dark{color:#fff;background-color:#ffffff1a;border-color:#ffffff1a}.form-control-dark:focus{border-color:transparent;box-shadow:0 0 0 3px #ffffff40}.dot{width:10px;height:10px;border-radius:50px;display:inline-block;margin-left:auto!important;background-color:#6c757d}.dot.active{background-color:#28a745!important;box-shadow:0 0 0 .2rem #28a74545}.h6-dot-running{margin-left:.3rem}.card-running{border-color:#28a745}.info h6{line-break:anywhere;transition:all .4s cubic-bezier(.96,-.07,.34,1.01);opacity:1}.info .row .col-sm{display:flex;flex-direction:column}.info .row .col-sm small{display:flex}.info .row .col-sm small strong:last-child(1){margin-left:auto!important}.btn-control{border:none!important;padding:0;margin:0 1rem 0 0}.btn-control:hover{background-color:transparent!important}.btn-control:active,.btn-control:focus{background-color:transparent!important;border:none!important;box-shadow:none}.btn-qrcode-peer{padding:0!important}.btn-qrcode-peer:active,.btn-qrcode-peer:hover{transform:scale(.9) rotate(180deg);border:0!important}.btn-download-peer:active,.btn-download-peer:hover{color:#17a2b8!important;transform:translateY(5px)}.share_peer_btn_group .btn-control{margin:0 0 0 1rem;padding:0!important;transition:all .4s cubic-bezier(1,-.43,0,1.37)}.btn-control:hover{background:#fff}.btn-delete-peer:hover{color:#dc3545}.btn-lock-peer:hover{color:#28a745}.btn-lock-peer.lock,.btn-lock-peer.lock:hover{color:#6c757d}.btn-control.btn-outline-primary:hover{color:#007bff}.btn-download-peer:hover{color:#17a2b8}.login-container{padding:2rem}@media (max-width: 992px){.card-col{margin-bottom:1rem}}.switch{font-size:2rem}.switch:hover{text-decoration:none}.btn-group-label:hover{color:#007bff;border-color:#007bff;background:#fff}.peer_data_group{text-align:right;display:flex;margin-bottom:.5rem}.peer_data_group p{text-transform:uppercase;margin-bottom:0;margin-right:1rem}@media (max-width: 768px){.peer_data_group{text-align:left}}.index-switch{display:flex;align-items:center;justify-content:flex-end}main{margin-bottom:3rem}.peer_list{margin-bottom:7rem}@media (max-width: 768px){.add_btn{bottom:1.5rem!important}.peer_list{margin-bottom:7rem!important}}.btn-manage-group{z-index:99;position:fixed;bottom:3rem;right:2rem;display:flex}.btn-manage-group .setting_btn_menu{position:absolute;top:-124px;background-color:#fff;padding:1rem 0;right:0;box-shadow:0 10px 20px #00000030,0 6px 6px #0000003b;border-radius:10px;min-width:250px;display:none;transform:translateY(-30px);opacity:0;transition:all .3s cubic-bezier(.58,.03,.05,1.28)}.btn-manage-group .setting_btn_menu.show{display:block}.setting_btn_menu.showing{transform:translateY(0);opacity:1}.setting_btn_menu a{display:flex;padding:.5rem 1rem;transition:all .1s ease-in-out;font-size:1rem;align-items:center;cursor:pointer}.setting_btn_menu a:hover{background-color:#efefef;text-decoration:none}.setting_btn_menu a i{margin-right:auto!important}.add_btn{height:54px;z-index:99;border-radius:100px!important;padding:0 14px;box-shadow:0 10px 20px #00000030,0 6px 6px #0000003b;margin-right:1rem;font-size:1.5rem}.setting_btn{height:54px;z-index:99;border-radius:100px!important;padding:0 14px;box-shadow:0 10px 20px #00000030,0 6px 6px #0000003b;font-size:1.5rem}@-webkit-keyframes rotating{0%{-webkit-transform:rotate(0deg);-o-transform:rotate(0deg);transform:rotate(0)}to{-webkit-transform:rotate(360deg);-o-transform:rotate(360deg);transform:rotate(360deg)}}@keyframes rotating{0%{-ms-transform:rotate(0deg);-moz-transform:rotate(0deg);-webkit-transform:rotate(0deg);-o-transform:rotate(0deg);transform:rotate(0)}to{-ms-transform:rotate(360deg);-moz-transform:rotate(360deg);-webkit-transform:rotate(360deg);-o-transform:rotate(360deg);transform:rotate(360deg)}}.rotating:before{-webkit-animation:rotating .75s linear infinite;-moz-animation:rotating .75s linear infinite;-ms-animation:rotating .75s linear infinite;-o-animation:rotating .75s linear infinite;animation:rotating .75s linear infinite}.peer_private_key_textbox_switch{position:absolute;right:2rem;transform:translateY(-28px);font-size:1.2rem;cursor:pointer}#peer_private_key_textbox,#private_key,#public_key,#peer_preshared_key_textbox{font-family:SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace}.progress-bar{transition:.3s ease-in-out}.key{transition:.2s ease-in-out;cursor:pointer}.key:hover{color:#007bff}.card{border-radius:10px}.peer_list .card .button-group{height:22px}.form-control{border-radius:10px}.btn{border-radius:8px}.login-box #username,.login-box #password,.login-box #totp{padding:.6rem calc(.9rem + 32px);height:inherit}.login-box label[for=username],.login-box label[for=password],.login-box label[for=totp]{font-size:1rem;margin:0!important;transform:translateY(2.1rem) translate(1rem);padding:0}.modal-content{border-radius:10px}.tooltip-inner{font-size:.8rem}@-webkit-keyframes loading{0%{background-color:#dfdfdf}50%{background-color:#adadad}to{background-color:#dfdfdf}}@-moz-keyframes loading{0%{background-color:#dfdfdf}50%{background-color:#adadad}to{background-color:#dfdfdf}}.conf_card{transition:.2s ease-in-out}.conf_card:hover{border-color:#007bff}.info_loading{height:19.19px;opacity:0!important}#conf_status_btn{transition:.2s ease-in-out}#conf_status_btn.info_loading{height:38px;border-radius:5px;animation:loading 3s infinite ease-in-out}#qrcode_img img{width:100%}#selected_ip_list .badge,#selected_peer_list .badge{margin:.1rem}#add_modal.ip_modal_open{transition:filter .2s ease-in-out;filter:brightness(.5)}#delete_bulk_modal .list-group a.active{background-color:#dc3545;border-color:#dc3545}#selected_peer_list{max-height:80px;overflow-y:scroll;overflow-x:hidden}.no-response{width:100%;height:100%;position:fixed;background:#000000ba;z-index:10000;display:none;flex-direction:column;align-items:center;justify-content:center;opacity:0;transition:all 1s ease-in-out}.no-response.active{display:flex}.no-response.active.show{opacity:100}.no-response .container>*{text-align:center}.no-responding{transition:all 1s ease-in-out;filter:blur(10px)}pre.index-alert{margin-bottom:0;padding:1rem;background-color:#343a40;border:1px solid rgba(0,0,0,.125);border-radius:.25rem;margin-top:1rem;color:#fff}.peerNameCol{display:flex;align-items:center;margin-bottom:.2rem}.peerName{margin:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.peerLightContainer{text-transform:uppercase;margin:0;margin-left:auto!important}#config_body{transition:.3s ease-in-out}#config_body.firstLoading{opacity:.2}.chartTitle{display:flex}.chartControl{margin-bottom:1rem;display:flex;align-items:center}.chartTitle h6{margin-bottom:0;line-height:1;margin-right:.5rem}.chartContainer.fullScreen{position:fixed;z-index:9999;background-color:#fff;top:0;left:0;width:calc(100% + 15px);height:100%;padding:32px}.chartContainer.fullScreen .col-sm{padding-right:0;height:100%}.chartContainer.fullScreen .chartCanvasContainer{width:100%;height:calc(100% - 47px)!important;max-height:calc(100% - 47px)!important}#switch{transition:all .2s ease-in}.toggle--switch{display:none}.toggleLabel{width:64px;height:32px;background-color:#6c757d17;display:flex;position:relative;border:2px solid #6c757d8c;border-radius:100px;transition:all .2s ease-in;cursor:pointer;margin:0}.toggle--switch.waiting+.toggleLabel{opacity:.5}.toggleLabel:before{background-color:#6c757d;height:26px;width:26px;content:"";border-radius:100px;margin:1px;position:absolute;animation-name:off;animation-duration:.35s;animation-fill-mode:forwards;transition:all .2s ease-in;cursor:pointer}.toggleLabel:hover:before{filter:brightness(1.2)}.toggle--switch:checked+.toggleLabel{background-color:#007bff17!important;border:2px solid #007bff8c}.toggle--switch:checked+.toggleLabel:before{background-color:#007bff;animation-name:on;animation-duration:.35s;animation-fill-mode:forwards}@keyframes on{0%{left:0}60%{left:0;width:40px}to{left:32px;width:26px}}@keyframes off{0%{left:32px}60%{left:18px;width:40px}to{left:0;width:26px}}.toastContainer{z-index:99999!important}.toast{min-width:300px;background-color:#fff;z-index:99999}.toast-header{background-color:#fff}.toast-progressbar{width:100%;height:4px;background-color:#007bff;border-bottom-left-radius:.25rem}.addConfigurationAvailableIPs{margin-bottom:0}.input-feedback{display:none}#addConfigurationModal label{display:flex;width:100%;align-items:center}#addConfigurationModal label a{margin-left:auto!important}#reGeneratePrivateKey{border-top-right-radius:10px;border-bottom-right-radius:10px}.addConfigurationToggleStatus.waiting{opacity:.5}.peerDataUsageChartContainer{min-height:50vh;width:100%}.peerDataUsageChartControl{display:block!important;margin:0}.peerDataUsageChartControl .switchUnit{width:33.3%}.peerDataUsageChartControl .switchTimePeriod{width:25%}@media (min-width: 1200px){#peerDataUsage .modal-xl{max-width:95vw}}.bottom{display:none}@media (max-width: 768px){.bottom{display:block}.btn-manage-group{bottom:calc(3rem + 40px + env(safe-area-inset-bottom,5px))}main{padding-bottom:calc(3rem + 40px + env(safe-area-inset-bottom,5px))}}.bottomNavContainer{display:flex;color:#333;padding-bottom:env(safe-area-inset-bottom,5px);box-shadow:inset 0 1px #0000001a}.bottomNavButton{width:25vw;display:flex;flex-direction:column;align-items:center;margin:.7rem 0;color:#33333380;cursor:pointer;transition:all ease-in .2s}.bottomNavButton.active{color:#333}.bottomNavButton i{font-size:1.2rem}.bottomNavButton .subNav{width:100vw;position:absolute;z-index:10000;bottom:0;left:0;background-color:#272b30;display:none;animation-duration:.4s;padding-bottom:env(safe-area-inset-bottom,5px)}.bottomNavButton .subNav.active{display:block}.bottomNavButton .subNav .nav .nav-item .nav-link{padding:.7rem 1rem}.bottomNavWrapper{height:100%;width:100%;background-color:#000000a1;position:fixed;z-index:1030;display:none;left:0}.bottomNavWrapper.active{display:block}.sb-update-url .dot-running{transform:translate(10px)}.list-group-item{transition:all .1s ease-in}.theme-switch-btn{width:100%}.fade-enter-active,.fade-leave-active{transition:all .3s ease-in-out}.fade-enter-from,.fade-leave-to{transform:translateY(30px);opacity:0}.fade2-enter-active,.fade2-leave-active{transition:all .15s ease-in-out}.fade2-enter-from{transform:translate(20px);opacity:0}.fade2-leave-to{transform:translate(-20px);opacity:0}.login-container-fluid{height:calc(100% - 50px)!important}.totp{font-family:var(--bs-font-monospace)}.message-move,.message-enter-active,.message-leave-active{transition:all .5s ease}.message-enter-from,.message-leave-to{filter:blur(2px);opacity:0}.message-enter-from{transform:translateY(-30px) scale(.7)}.message-leave-to{transform:translateY(30px)}.message-leave-active{position:absolute}.fade3-enter-active,.fade3-leave-active{transition:all .15s ease-in-out}.fade3-enter-from{transform:scale(1);opacity:0}.fade3-leave-to{transform:scale(.8);opacity:0}.list-move,.list-enter-active,.list-leave-active{transition:all .5s ease-in-out}.list-enter-from,.list-leave-to{opacity:0;transform:scale(1.1)}.list-leave-active{position:absolute}.peerSettingContainer{background-color:#00000060;z-index:9999;backdrop-filter:blur(1px);-webkit-backdrop-filter:blur(1px)}.dashboardModal{min-height:calc(100% - 3.5rem);width:700px}.dashboardModal>.card{margin:1.75rem}.zoom-enter-active,.zoom-leave-active,.zoomReversed-enter-active,.zoomReversed-leave-active{transition:all .3s cubic-bezier(.82,.58,.17,.9)}.zoom-enter-from,.zoom-leave-to{transform:scale(1.1);filter:blur(3px);opacity:0}.zoomReversed-enter-from,.zoomReversed-leave-to{transform:scale(.9);filter:blur(3px);opacity:0}.messageCentre{z-index:9999}/*! +@charset "UTF-8";*{font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol}.dp__input{font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol!important}::-webkit-scrollbar{display:none}.codeFont{font-family:SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace}.feather{width:16px;height:16px;vertical-align:text-bottom}.btn-primary{font-weight:700}@property --brandColor1{syntax: ""; initial-value: #009dff; inherits: false;}@property --brandColor2{syntax: ""; initial-value: #ff4a00; inherits: false;}@property --distance2{syntax: ""; initial-value: 0%; inherits: false;}@property --degree{syntax: ""; initial-value: 234deg; inherits: false;}.dashboardLogo{background:#178bff;background:linear-gradient(234deg,var(--brandColor1) var(--distance2),var(--brandColor2) 100%);-webkit-background-clip:text;-webkit-text-fill-color:transparent;transition:--brandColor1 1s,--brandColor2 .3s,--distance2 1s!important}.btn-brand{background:linear-gradient(var(--degree),var(--brandColor1) var(--distance2),var(--brandColor2) 100%);border:0!important;transition:--brandColor1 1s,--brandColor2 1s,--distance2 .5s!important}.btn-brand.loading{animation:spin infinite forwards 3s linear}.btn-brand:hover,.dashboardLogo:hover{--brandColor1: #009dff;--brandColor2: #ff875b;--distance2: 30%}.signInBtn.signedIn{--distance2: 100%}@keyframes spin{0%{--degree: 234deg}to{--degree: 594deg}}[data-bs-theme=dark].main,#app:has(.main[data-bs-theme=dark]),[data-bs-theme=dark].navbar-container{background-color:#1b1e21}.sidebar .nav-link,.bottomNavContainer .nav-link{font-weight:500;color:#333;transition:.2s cubic-bezier(.82,-.07,0,1.01)}[data-bs-theme=dark] .sidebar .nav-link{color:#fff}[data-bs-theme=dark] .sidebar .nav-link.active{color:#74b7ff}[data-bs-theme=dark] .nav-link:hover{background-color:#323844}.nav-link:hover{background-color:#e8e8e8}.sidebar .nav-link .feather{margin-right:4px;color:#999}.sidebar .nav-link.active,.bottomNavContainer .nav-link.active{color:#007bff}.sidebar .nav-link:hover .feather,.sidebar .nav-link.active .feather{color:inherit}.sidebar-heading{font-size:.75rem;text-transform:uppercase}.navbar-brand{padding-top:.75rem;padding-bottom:.75rem;font-size:1rem}.navbar .navbar-toggler{top:.25rem;right:1rem}.form-control{transition:all .2s ease-in-out}.form-control:disabled{cursor:not-allowed}.navbar .form-control{padding:.75rem 1rem;border-width:0;border-radius:0}.form-control-dark{color:#fff;background-color:#ffffff1a;border-color:#ffffff1a}.form-control-dark:focus{border-color:transparent;box-shadow:0 0 0 3px #ffffff40}.dot{width:10px;height:10px;border-radius:50px;display:inline-block;margin-left:auto!important;background-color:#6c757d}.dot.active{background-color:#28a745!important;box-shadow:0 0 0 .2rem #28a74545}.h6-dot-running{margin-left:.3rem}.card-running{border-color:#28a745}.info h6{line-break:anywhere;transition:all .4s cubic-bezier(.96,-.07,.34,1.01);opacity:1}.info .row .col-sm{display:flex;flex-direction:column}.info .row .col-sm small{display:flex}.info .row .col-sm small strong:last-child(1){margin-left:auto!important}.btn-control{border:none!important;padding:0;margin:0 1rem 0 0}.btn-control:hover{background-color:transparent!important}.btn-control:active,.btn-control:focus{background-color:transparent!important;border:none!important;box-shadow:none}.btn-qrcode-peer{padding:0!important}.btn-qrcode-peer:active,.btn-qrcode-peer:hover{transform:scale(.9) rotate(180deg);border:0!important}.btn-download-peer:active,.btn-download-peer:hover{color:#17a2b8!important;transform:translateY(5px)}.share_peer_btn_group .btn-control{margin:0 0 0 1rem;padding:0!important;transition:all .4s cubic-bezier(1,-.43,0,1.37)}.btn-control:hover{background:#fff}.btn-delete-peer:hover{color:#dc3545}.btn-lock-peer:hover{color:#28a745}.btn-lock-peer.lock,.btn-lock-peer.lock:hover{color:#6c757d}.btn-control.btn-outline-primary:hover{color:#007bff}.btn-download-peer:hover{color:#17a2b8}.login-container{padding:2rem}@media (max-width: 992px){.card-col{margin-bottom:1rem}}.switch{font-size:2rem}.switch:hover{text-decoration:none}.btn-group-label:hover{color:#007bff;border-color:#007bff;background:#fff}.peer_data_group{text-align:right;display:flex;margin-bottom:.5rem}.peer_data_group p{text-transform:uppercase;margin-bottom:0;margin-right:1rem}@media (max-width: 768px){.peer_data_group{text-align:left}}.index-switch{display:flex;align-items:center;justify-content:flex-end}main{margin-bottom:3rem}.peer_list{margin-bottom:7rem}@media (max-width: 768px){.add_btn{bottom:1.5rem!important}.peer_list{margin-bottom:7rem!important}}.btn-manage-group{z-index:99;position:fixed;bottom:3rem;right:2rem;display:flex}.btn-manage-group .setting_btn_menu{position:absolute;top:-124px;background-color:#fff;padding:1rem 0;right:0;box-shadow:0 10px 20px #00000030,0 6px 6px #0000003b;border-radius:10px;min-width:250px;display:none;transform:translateY(-30px);opacity:0;transition:all .3s cubic-bezier(.58,.03,.05,1.28)}.btn-manage-group .setting_btn_menu.show{display:block}.setting_btn_menu.showing{transform:translateY(0);opacity:1}.setting_btn_menu a{display:flex;padding:.5rem 1rem;transition:all .1s ease-in-out;font-size:1rem;align-items:center;cursor:pointer}.setting_btn_menu a:hover{background-color:#efefef;text-decoration:none}.setting_btn_menu a i{margin-right:auto!important}.add_btn{height:54px;z-index:99;border-radius:100px!important;padding:0 14px;box-shadow:0 10px 20px #00000030,0 6px 6px #0000003b;margin-right:1rem;font-size:1.5rem}.setting_btn{height:54px;z-index:99;border-radius:100px!important;padding:0 14px;box-shadow:0 10px 20px #00000030,0 6px 6px #0000003b;font-size:1.5rem}@-webkit-keyframes rotating{0%{-webkit-transform:rotate(0deg);-o-transform:rotate(0deg);transform:rotate(0)}to{-webkit-transform:rotate(360deg);-o-transform:rotate(360deg);transform:rotate(360deg)}}@keyframes rotating{0%{-ms-transform:rotate(0deg);-moz-transform:rotate(0deg);-webkit-transform:rotate(0deg);-o-transform:rotate(0deg);transform:rotate(0)}to{-ms-transform:rotate(360deg);-moz-transform:rotate(360deg);-webkit-transform:rotate(360deg);-o-transform:rotate(360deg);transform:rotate(360deg)}}.rotating:before{-webkit-animation:rotating .75s linear infinite;-moz-animation:rotating .75s linear infinite;-ms-animation:rotating .75s linear infinite;-o-animation:rotating .75s linear infinite;animation:rotating .75s linear infinite}.peer_private_key_textbox_switch{position:absolute;right:2rem;transform:translateY(-28px);font-size:1.2rem;cursor:pointer}#peer_private_key_textbox,#private_key,#public_key,#peer_preshared_key_textbox{font-family:SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace}.progress-bar{transition:.3s ease-in-out}.key{transition:.2s ease-in-out;cursor:pointer}.key:hover{color:#007bff}.card{border-radius:10px}.peer_list .card .button-group{height:22px}.form-control{border-radius:10px}.btn{border-radius:8px}.login-box #username,.login-box #password,.login-box #totp{padding:.6rem calc(.9rem + 32px);height:inherit}.login-box label[for=username],.login-box label[for=password],.login-box label[for=totp]{font-size:1rem;margin:0!important;transform:translateY(2.1rem) translate(1rem);padding:0}.modal-content{border-radius:10px}.tooltip-inner{font-size:.8rem}@-webkit-keyframes loading{0%{background-color:#dfdfdf}50%{background-color:#adadad}to{background-color:#dfdfdf}}@-moz-keyframes loading{0%{background-color:#dfdfdf}50%{background-color:#adadad}to{background-color:#dfdfdf}}.conf_card{transition:.2s ease-in-out}.conf_card:hover{border-color:#007bff}.info_loading{height:19.19px;opacity:0!important}#conf_status_btn{transition:.2s ease-in-out}#conf_status_btn.info_loading{height:38px;border-radius:5px;animation:loading 3s infinite ease-in-out}#qrcode_img img{width:100%}#selected_ip_list .badge,#selected_peer_list .badge{margin:.1rem}#add_modal.ip_modal_open{transition:filter .2s ease-in-out;filter:brightness(.5)}#delete_bulk_modal .list-group a.active{background-color:#dc3545;border-color:#dc3545}#selected_peer_list{max-height:80px;overflow-y:scroll;overflow-x:hidden}.no-response{width:100%;height:100%;position:fixed;background:#000000ba;z-index:10000;display:none;flex-direction:column;align-items:center;justify-content:center;opacity:0;transition:all 1s ease-in-out}.no-response.active{display:flex}.no-response.active.show{opacity:100}.no-response .container>*{text-align:center}.no-responding{transition:all 1s ease-in-out;filter:blur(10px)}pre.index-alert{margin-bottom:0;padding:1rem;background-color:#343a40;border:1px solid rgba(0,0,0,.125);border-radius:.25rem;margin-top:1rem;color:#fff}.peerNameCol{display:flex;align-items:center;margin-bottom:.2rem}.peerName{margin:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.peerLightContainer{text-transform:uppercase;margin:0;margin-left:auto!important}#config_body{transition:.3s ease-in-out}#config_body.firstLoading{opacity:.2}.chartTitle{display:flex}.chartControl{margin-bottom:1rem;display:flex;align-items:center}.chartTitle h6{margin-bottom:0;line-height:1;margin-right:.5rem}.chartContainer.fullScreen{position:fixed;z-index:9999;background-color:#fff;top:0;left:0;width:calc(100% + 15px);height:100%;padding:32px}.chartContainer.fullScreen .col-sm{padding-right:0;height:100%}.chartContainer.fullScreen .chartCanvasContainer{width:100%;height:calc(100% - 47px)!important;max-height:calc(100% - 47px)!important}#switch{transition:all .2s ease-in}.toggle--switch{display:none}.toggleLabel{width:64px;height:32px;background-color:#6c757d17;display:flex;position:relative;border:2px solid #6c757d8c;border-radius:100px;transition:all .2s ease-in;cursor:pointer;margin:0}.toggle--switch.waiting+.toggleLabel{opacity:.5}.toggleLabel:before{background-color:#6c757d;height:26px;width:26px;content:"";border-radius:100px;margin:1px;position:absolute;animation-name:off;animation-duration:.35s;animation-fill-mode:forwards;transition:all .2s ease-in;cursor:pointer}.toggleLabel:hover:before{filter:brightness(1.2)}.toggle--switch:checked+.toggleLabel{background-color:#007bff17!important;border:2px solid #007bff8c}.toggle--switch:checked+.toggleLabel:before{background-color:#007bff;animation-name:on;animation-duration:.35s;animation-fill-mode:forwards}@keyframes on{0%{left:0}60%{left:0;width:40px}to{left:32px;width:26px}}@keyframes off{0%{left:32px}60%{left:18px;width:40px}to{left:0;width:26px}}.toastContainer{z-index:99999!important}.toast{min-width:300px;background-color:#fff;z-index:99999}.toast-header{background-color:#fff}.toast-progressbar{width:100%;height:4px;background-color:#007bff;border-bottom-left-radius:.25rem}.addConfigurationAvailableIPs{margin-bottom:0}.input-feedback{display:none}#addConfigurationModal label{display:flex;width:100%;align-items:center}#addConfigurationModal label a{margin-left:auto!important}#reGeneratePrivateKey{border-top-right-radius:10px;border-bottom-right-radius:10px}.addConfigurationToggleStatus.waiting{opacity:.5}.peerDataUsageChartContainer{min-height:50vh;width:100%}.peerDataUsageChartControl{display:block!important;margin:0}.peerDataUsageChartControl .switchUnit{width:33.3%}.peerDataUsageChartControl .switchTimePeriod{width:25%}@media (min-width: 1200px){#peerDataUsage .modal-xl{max-width:95vw}}.bottom{display:none}@media (max-width: 768px){.bottom{display:block}.btn-manage-group{bottom:calc(3rem + 40px + env(safe-area-inset-bottom,5px))}main{padding-bottom:calc(3rem + 40px + env(safe-area-inset-bottom,5px))}}.bottomNavContainer{display:flex;color:#333;padding-bottom:env(safe-area-inset-bottom,5px);box-shadow:inset 0 1px #0000001a}.bottomNavButton{width:25vw;display:flex;flex-direction:column;align-items:center;margin:.7rem 0;color:#33333380;cursor:pointer;transition:all ease-in .2s}.bottomNavButton.active{color:#333}.bottomNavButton i{font-size:1.2rem}.bottomNavButton .subNav{width:100vw;position:absolute;z-index:10000;bottom:0;left:0;background-color:#272b30;display:none;animation-duration:.4s;padding-bottom:env(safe-area-inset-bottom,5px)}.bottomNavButton .subNav.active{display:block}.bottomNavButton .subNav .nav .nav-item .nav-link{padding:.7rem 1rem}.bottomNavWrapper{height:100%;width:100%;background-color:#000000a1;position:fixed;z-index:1030;display:none;left:0}.bottomNavWrapper.active{display:block}.sb-update-url .dot-running{transform:translate(10px)}.list-group-item{transition:all .1s ease-in}.theme-switch-btn{width:100%}.fade-enter-active,.fade-leave-active{transition:all .3s ease-in-out}.fade-enter-from,.fade-leave-to{transform:translateY(30px);opacity:0}.fade2-enter-active,.fade2-leave-active{transition:all .15s ease-in-out}.fade2-enter-from{transform:translate(20px);opacity:0}.fade2-leave-to{transform:translate(-20px);opacity:0}.login-container-fluid{height:calc(100% - 50px)!important}.totp{font-family:var(--bs-font-monospace)}.message-move,.message-enter-active,.message-leave-active{transition:all .5s ease}.message-enter-from,.message-leave-to{filter:blur(2px);opacity:0}.message-enter-from{transform:translateY(-30px) scale(.7)}.message-leave-to{transform:translateY(30px)}.message-leave-active{position:absolute}.fade3-enter-active,.fade3-leave-active{transition:all .15s ease-in-out}.fade3-enter-from{transform:scale(1);opacity:0}.fade3-leave-to{transform:scale(.8);opacity:0}.list-move,.list-enter-active,.list-leave-active{transition:all .5s ease-in-out}.list-enter-from,.list-leave-to{opacity:0;transform:scale(1.1)}.list-leave-active{position:absolute}.peerSettingContainer{background-color:#00000060;z-index:9999;backdrop-filter:blur(1px);-webkit-backdrop-filter:blur(1px)}.dashboardModal{min-height:calc(100% - 3.5rem);width:700px}.dashboardModal>.card{margin:1.75rem}.zoom-enter-active,.zoom-leave-active,.zoomReversed-enter-active,.zoomReversed-leave-active{transition:all .3s cubic-bezier(.82,.58,.17,.9)}.zoom-enter-from,.zoom-leave-to{transform:scale(1.1);filter:blur(3px);opacity:0}.zoomReversed-enter-from,.zoomReversed-leave-to{transform:scale(.9);filter:blur(3px);opacity:0}.messageCentre{z-index:9999}.slide-move,.slide-enter-active,.slide-leave-active{transition:all .4s cubic-bezier(.82,.58,.17,.9)}.slide-leave-active{position:absolute;width:100%}.slide-enter-from{opacity:0;transform:translate(-50px)!important}.slide-leave-to{opacity:0;transform:translate(50px)!important}/*! * Bootstrap v5.3.2 (https://getbootstrap.com/) * Copyright 2011-2023 The Bootstrap Authors * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) @@ -12,4 +12,4 @@ * Licensed under the MIT license - http://opensource.org/licenses/MIT * * Copyright (c) 2020 Animate.css - */:root{--animate-duration: 1s;--animate-delay: 1s;--animate-repeat: 1}.animate__animated{-webkit-animation-duration:1s;animation-duration:1s;-webkit-animation-duration:var(--animate-duration);animation-duration:var(--animate-duration);-webkit-animation-fill-mode:both;animation-fill-mode:both}.animate__animated.animate__infinite{-webkit-animation-iteration-count:infinite;animation-iteration-count:infinite}.animate__animated.animate__repeat-1{-webkit-animation-iteration-count:1;animation-iteration-count:1;-webkit-animation-iteration-count:var(--animate-repeat);animation-iteration-count:var(--animate-repeat)}.animate__animated.animate__repeat-2{-webkit-animation-iteration-count:2;animation-iteration-count:2;-webkit-animation-iteration-count:calc(var(--animate-repeat) * 2);animation-iteration-count:calc(var(--animate-repeat) * 2)}.animate__animated.animate__repeat-3{-webkit-animation-iteration-count:3;animation-iteration-count:3;-webkit-animation-iteration-count:calc(var(--animate-repeat) * 3);animation-iteration-count:calc(var(--animate-repeat) * 3)}.animate__animated.animate__delay-1s{-webkit-animation-delay:1s;animation-delay:1s;-webkit-animation-delay:var(--animate-delay);animation-delay:var(--animate-delay)}.animate__animated.animate__delay-2s{-webkit-animation-delay:2s;animation-delay:2s;-webkit-animation-delay:calc(var(--animate-delay) * 2);animation-delay:calc(var(--animate-delay) * 2)}.animate__animated.animate__delay-3s{-webkit-animation-delay:3s;animation-delay:3s;-webkit-animation-delay:calc(var(--animate-delay) * 3);animation-delay:calc(var(--animate-delay) * 3)}.animate__animated.animate__delay-4s{-webkit-animation-delay:4s;animation-delay:4s;-webkit-animation-delay:calc(var(--animate-delay) * 4);animation-delay:calc(var(--animate-delay) * 4)}.animate__animated.animate__delay-5s{-webkit-animation-delay:5s;animation-delay:5s;-webkit-animation-delay:calc(var(--animate-delay) * 5);animation-delay:calc(var(--animate-delay) * 5)}.animate__animated.animate__faster{-webkit-animation-duration:.5s;animation-duration:.5s;-webkit-animation-duration:calc(var(--animate-duration) / 2);animation-duration:calc(var(--animate-duration) / 2)}.animate__animated.animate__fast{-webkit-animation-duration:.8s;animation-duration:.8s;-webkit-animation-duration:calc(var(--animate-duration) * .8);animation-duration:calc(var(--animate-duration) * .8)}.animate__animated.animate__slow{-webkit-animation-duration:2s;animation-duration:2s;-webkit-animation-duration:calc(var(--animate-duration) * 2);animation-duration:calc(var(--animate-duration) * 2)}.animate__animated.animate__slower{-webkit-animation-duration:3s;animation-duration:3s;-webkit-animation-duration:calc(var(--animate-duration) * 3);animation-duration:calc(var(--animate-duration) * 3)}@media print,(prefers-reduced-motion: reduce){.animate__animated{-webkit-animation-duration:1ms!important;animation-duration:1ms!important;-webkit-transition-duration:1ms!important;transition-duration:1ms!important;-webkit-animation-iteration-count:1!important;animation-iteration-count:1!important}.animate__animated[class*=Out]{opacity:0}}@-webkit-keyframes bounce{0%,20%,53%,to{-webkit-animation-timing-function:cubic-bezier(.215,.61,.355,1);animation-timing-function:cubic-bezier(.215,.61,.355,1);-webkit-transform:translate3d(0,0,0);transform:translateZ(0)}40%,43%{-webkit-animation-timing-function:cubic-bezier(.755,.05,.855,.06);animation-timing-function:cubic-bezier(.755,.05,.855,.06);-webkit-transform:translate3d(0,-30px,0) scaleY(1.1);transform:translate3d(0,-30px,0) scaleY(1.1)}70%{-webkit-animation-timing-function:cubic-bezier(.755,.05,.855,.06);animation-timing-function:cubic-bezier(.755,.05,.855,.06);-webkit-transform:translate3d(0,-15px,0) scaleY(1.05);transform:translate3d(0,-15px,0) scaleY(1.05)}80%{-webkit-transition-timing-function:cubic-bezier(.215,.61,.355,1);transition-timing-function:cubic-bezier(.215,.61,.355,1);-webkit-transform:translate3d(0,0,0) scaleY(.95);transform:translateZ(0) scaleY(.95)}90%{-webkit-transform:translate3d(0,-4px,0) scaleY(1.02);transform:translate3d(0,-4px,0) scaleY(1.02)}}@keyframes bounce{0%,20%,53%,to{-webkit-animation-timing-function:cubic-bezier(.215,.61,.355,1);animation-timing-function:cubic-bezier(.215,.61,.355,1);-webkit-transform:translate3d(0,0,0);transform:translateZ(0)}40%,43%{-webkit-animation-timing-function:cubic-bezier(.755,.05,.855,.06);animation-timing-function:cubic-bezier(.755,.05,.855,.06);-webkit-transform:translate3d(0,-30px,0) scaleY(1.1);transform:translate3d(0,-30px,0) scaleY(1.1)}70%{-webkit-animation-timing-function:cubic-bezier(.755,.05,.855,.06);animation-timing-function:cubic-bezier(.755,.05,.855,.06);-webkit-transform:translate3d(0,-15px,0) scaleY(1.05);transform:translate3d(0,-15px,0) scaleY(1.05)}80%{-webkit-transition-timing-function:cubic-bezier(.215,.61,.355,1);transition-timing-function:cubic-bezier(.215,.61,.355,1);-webkit-transform:translate3d(0,0,0) scaleY(.95);transform:translateZ(0) scaleY(.95)}90%{-webkit-transform:translate3d(0,-4px,0) scaleY(1.02);transform:translate3d(0,-4px,0) scaleY(1.02)}}.animate__bounce{-webkit-animation-name:bounce;animation-name:bounce;-webkit-transform-origin:center bottom;transform-origin:center bottom}@-webkit-keyframes flash{0%,50%,to{opacity:1}25%,75%{opacity:0}}@keyframes flash{0%,50%,to{opacity:1}25%,75%{opacity:0}}.animate__flash{-webkit-animation-name:flash;animation-name:flash}@-webkit-keyframes pulse{0%{-webkit-transform:scale3d(1,1,1);transform:scaleZ(1)}50%{-webkit-transform:scale3d(1.05,1.05,1.05);transform:scale3d(1.05,1.05,1.05)}to{-webkit-transform:scale3d(1,1,1);transform:scaleZ(1)}}@keyframes pulse{0%{-webkit-transform:scale3d(1,1,1);transform:scaleZ(1)}50%{-webkit-transform:scale3d(1.05,1.05,1.05);transform:scale3d(1.05,1.05,1.05)}to{-webkit-transform:scale3d(1,1,1);transform:scaleZ(1)}}.animate__pulse{-webkit-animation-name:pulse;animation-name:pulse;-webkit-animation-timing-function:ease-in-out;animation-timing-function:ease-in-out}@-webkit-keyframes rubberBand{0%{-webkit-transform:scale3d(1,1,1);transform:scaleZ(1)}30%{-webkit-transform:scale3d(1.25,.75,1);transform:scale3d(1.25,.75,1)}40%{-webkit-transform:scale3d(.75,1.25,1);transform:scale3d(.75,1.25,1)}50%{-webkit-transform:scale3d(1.15,.85,1);transform:scale3d(1.15,.85,1)}65%{-webkit-transform:scale3d(.95,1.05,1);transform:scale3d(.95,1.05,1)}75%{-webkit-transform:scale3d(1.05,.95,1);transform:scale3d(1.05,.95,1)}to{-webkit-transform:scale3d(1,1,1);transform:scaleZ(1)}}@keyframes rubberBand{0%{-webkit-transform:scale3d(1,1,1);transform:scaleZ(1)}30%{-webkit-transform:scale3d(1.25,.75,1);transform:scale3d(1.25,.75,1)}40%{-webkit-transform:scale3d(.75,1.25,1);transform:scale3d(.75,1.25,1)}50%{-webkit-transform:scale3d(1.15,.85,1);transform:scale3d(1.15,.85,1)}65%{-webkit-transform:scale3d(.95,1.05,1);transform:scale3d(.95,1.05,1)}75%{-webkit-transform:scale3d(1.05,.95,1);transform:scale3d(1.05,.95,1)}to{-webkit-transform:scale3d(1,1,1);transform:scaleZ(1)}}.animate__rubberBand{-webkit-animation-name:rubberBand;animation-name:rubberBand}@-webkit-keyframes shakeX{0%,to{-webkit-transform:translate3d(0,0,0);transform:translateZ(0)}10%,30%,50%,70%,90%{-webkit-transform:translate3d(-10px,0,0);transform:translate3d(-10px,0,0)}20%,40%,60%,80%{-webkit-transform:translate3d(10px,0,0);transform:translate3d(10px,0,0)}}@keyframes shakeX{0%,to{-webkit-transform:translate3d(0,0,0);transform:translateZ(0)}10%,30%,50%,70%,90%{-webkit-transform:translate3d(-10px,0,0);transform:translate3d(-10px,0,0)}20%,40%,60%,80%{-webkit-transform:translate3d(10px,0,0);transform:translate3d(10px,0,0)}}.animate__shakeX{-webkit-animation-name:shakeX;animation-name:shakeX}@-webkit-keyframes shakeY{0%,to{-webkit-transform:translate3d(0,0,0);transform:translateZ(0)}10%,30%,50%,70%,90%{-webkit-transform:translate3d(0,-10px,0);transform:translate3d(0,-10px,0)}20%,40%,60%,80%{-webkit-transform:translate3d(0,10px,0);transform:translate3d(0,10px,0)}}@keyframes shakeY{0%,to{-webkit-transform:translate3d(0,0,0);transform:translateZ(0)}10%,30%,50%,70%,90%{-webkit-transform:translate3d(0,-10px,0);transform:translate3d(0,-10px,0)}20%,40%,60%,80%{-webkit-transform:translate3d(0,10px,0);transform:translate3d(0,10px,0)}}.animate__shakeY{-webkit-animation-name:shakeY;animation-name:shakeY}@-webkit-keyframes headShake{0%{-webkit-transform:translateX(0);transform:translate(0)}6.5%{-webkit-transform:translateX(-6px) rotateY(-9deg);transform:translate(-6px) rotateY(-9deg)}18.5%{-webkit-transform:translateX(5px) rotateY(7deg);transform:translate(5px) rotateY(7deg)}31.5%{-webkit-transform:translateX(-3px) rotateY(-5deg);transform:translate(-3px) rotateY(-5deg)}43.5%{-webkit-transform:translateX(2px) rotateY(3deg);transform:translate(2px) rotateY(3deg)}50%{-webkit-transform:translateX(0);transform:translate(0)}}@keyframes headShake{0%{-webkit-transform:translateX(0);transform:translate(0)}6.5%{-webkit-transform:translateX(-6px) rotateY(-9deg);transform:translate(-6px) rotateY(-9deg)}18.5%{-webkit-transform:translateX(5px) rotateY(7deg);transform:translate(5px) rotateY(7deg)}31.5%{-webkit-transform:translateX(-3px) rotateY(-5deg);transform:translate(-3px) rotateY(-5deg)}43.5%{-webkit-transform:translateX(2px) rotateY(3deg);transform:translate(2px) rotateY(3deg)}50%{-webkit-transform:translateX(0);transform:translate(0)}}.animate__headShake{-webkit-animation-timing-function:ease-in-out;animation-timing-function:ease-in-out;-webkit-animation-name:headShake;animation-name:headShake}@-webkit-keyframes swing{20%{-webkit-transform:rotate3d(0,0,1,15deg);transform:rotate3d(0,0,1,15deg)}40%{-webkit-transform:rotate3d(0,0,1,-10deg);transform:rotate3d(0,0,1,-10deg)}60%{-webkit-transform:rotate3d(0,0,1,5deg);transform:rotate3d(0,0,1,5deg)}80%{-webkit-transform:rotate3d(0,0,1,-5deg);transform:rotate3d(0,0,1,-5deg)}to{-webkit-transform:rotate3d(0,0,1,0deg);transform:rotate3d(0,0,1,0)}}@keyframes swing{20%{-webkit-transform:rotate3d(0,0,1,15deg);transform:rotate3d(0,0,1,15deg)}40%{-webkit-transform:rotate3d(0,0,1,-10deg);transform:rotate3d(0,0,1,-10deg)}60%{-webkit-transform:rotate3d(0,0,1,5deg);transform:rotate3d(0,0,1,5deg)}80%{-webkit-transform:rotate3d(0,0,1,-5deg);transform:rotate3d(0,0,1,-5deg)}to{-webkit-transform:rotate3d(0,0,1,0deg);transform:rotate3d(0,0,1,0)}}.animate__swing{-webkit-transform-origin:top center;transform-origin:top center;-webkit-animation-name:swing;animation-name:swing}@-webkit-keyframes tada{0%{-webkit-transform:scale3d(1,1,1);transform:scaleZ(1)}10%,20%{-webkit-transform:scale3d(.9,.9,.9) rotate3d(0,0,1,-3deg);transform:scale3d(.9,.9,.9) rotate3d(0,0,1,-3deg)}30%,50%,70%,90%{-webkit-transform:scale3d(1.1,1.1,1.1) rotate3d(0,0,1,3deg);transform:scale3d(1.1,1.1,1.1) rotate3d(0,0,1,3deg)}40%,60%,80%{-webkit-transform:scale3d(1.1,1.1,1.1) rotate3d(0,0,1,-3deg);transform:scale3d(1.1,1.1,1.1) rotate3d(0,0,1,-3deg)}to{-webkit-transform:scale3d(1,1,1);transform:scaleZ(1)}}@keyframes tada{0%{-webkit-transform:scale3d(1,1,1);transform:scaleZ(1)}10%,20%{-webkit-transform:scale3d(.9,.9,.9) rotate3d(0,0,1,-3deg);transform:scale3d(.9,.9,.9) rotate3d(0,0,1,-3deg)}30%,50%,70%,90%{-webkit-transform:scale3d(1.1,1.1,1.1) rotate3d(0,0,1,3deg);transform:scale3d(1.1,1.1,1.1) rotate3d(0,0,1,3deg)}40%,60%,80%{-webkit-transform:scale3d(1.1,1.1,1.1) rotate3d(0,0,1,-3deg);transform:scale3d(1.1,1.1,1.1) rotate3d(0,0,1,-3deg)}to{-webkit-transform:scale3d(1,1,1);transform:scaleZ(1)}}.animate__tada{-webkit-animation-name:tada;animation-name:tada}@-webkit-keyframes wobble{0%{-webkit-transform:translate3d(0,0,0);transform:translateZ(0)}15%{-webkit-transform:translate3d(-25%,0,0) rotate3d(0,0,1,-5deg);transform:translate3d(-25%,0,0) rotate3d(0,0,1,-5deg)}30%{-webkit-transform:translate3d(20%,0,0) rotate3d(0,0,1,3deg);transform:translate3d(20%,0,0) rotate3d(0,0,1,3deg)}45%{-webkit-transform:translate3d(-15%,0,0) rotate3d(0,0,1,-3deg);transform:translate3d(-15%,0,0) rotate3d(0,0,1,-3deg)}60%{-webkit-transform:translate3d(10%,0,0) rotate3d(0,0,1,2deg);transform:translate3d(10%,0,0) rotate3d(0,0,1,2deg)}75%{-webkit-transform:translate3d(-5%,0,0) rotate3d(0,0,1,-1deg);transform:translate3d(-5%,0,0) rotate3d(0,0,1,-1deg)}to{-webkit-transform:translate3d(0,0,0);transform:translateZ(0)}}@keyframes wobble{0%{-webkit-transform:translate3d(0,0,0);transform:translateZ(0)}15%{-webkit-transform:translate3d(-25%,0,0) rotate3d(0,0,1,-5deg);transform:translate3d(-25%,0,0) rotate3d(0,0,1,-5deg)}30%{-webkit-transform:translate3d(20%,0,0) rotate3d(0,0,1,3deg);transform:translate3d(20%,0,0) rotate3d(0,0,1,3deg)}45%{-webkit-transform:translate3d(-15%,0,0) rotate3d(0,0,1,-3deg);transform:translate3d(-15%,0,0) rotate3d(0,0,1,-3deg)}60%{-webkit-transform:translate3d(10%,0,0) rotate3d(0,0,1,2deg);transform:translate3d(10%,0,0) rotate3d(0,0,1,2deg)}75%{-webkit-transform:translate3d(-5%,0,0) rotate3d(0,0,1,-1deg);transform:translate3d(-5%,0,0) rotate3d(0,0,1,-1deg)}to{-webkit-transform:translate3d(0,0,0);transform:translateZ(0)}}.animate__wobble{-webkit-animation-name:wobble;animation-name:wobble}@-webkit-keyframes jello{0%,11.1%,to{-webkit-transform:translate3d(0,0,0);transform:translateZ(0)}22.2%{-webkit-transform:skewX(-12.5deg) skewY(-12.5deg);transform:skew(-12.5deg) skewY(-12.5deg)}33.3%{-webkit-transform:skewX(6.25deg) skewY(6.25deg);transform:skew(6.25deg) skewY(6.25deg)}44.4%{-webkit-transform:skewX(-3.125deg) skewY(-3.125deg);transform:skew(-3.125deg) skewY(-3.125deg)}55.5%{-webkit-transform:skewX(1.5625deg) skewY(1.5625deg);transform:skew(1.5625deg) skewY(1.5625deg)}66.6%{-webkit-transform:skewX(-.78125deg) skewY(-.78125deg);transform:skew(-.78125deg) skewY(-.78125deg)}77.7%{-webkit-transform:skewX(.390625deg) skewY(.390625deg);transform:skew(.390625deg) skewY(.390625deg)}88.8%{-webkit-transform:skewX(-.1953125deg) skewY(-.1953125deg);transform:skew(-.1953125deg) skewY(-.1953125deg)}}@keyframes jello{0%,11.1%,to{-webkit-transform:translate3d(0,0,0);transform:translateZ(0)}22.2%{-webkit-transform:skewX(-12.5deg) skewY(-12.5deg);transform:skew(-12.5deg) skewY(-12.5deg)}33.3%{-webkit-transform:skewX(6.25deg) skewY(6.25deg);transform:skew(6.25deg) skewY(6.25deg)}44.4%{-webkit-transform:skewX(-3.125deg) skewY(-3.125deg);transform:skew(-3.125deg) skewY(-3.125deg)}55.5%{-webkit-transform:skewX(1.5625deg) skewY(1.5625deg);transform:skew(1.5625deg) skewY(1.5625deg)}66.6%{-webkit-transform:skewX(-.78125deg) skewY(-.78125deg);transform:skew(-.78125deg) skewY(-.78125deg)}77.7%{-webkit-transform:skewX(.390625deg) skewY(.390625deg);transform:skew(.390625deg) skewY(.390625deg)}88.8%{-webkit-transform:skewX(-.1953125deg) skewY(-.1953125deg);transform:skew(-.1953125deg) skewY(-.1953125deg)}}.animate__jello{-webkit-animation-name:jello;animation-name:jello;-webkit-transform-origin:center;transform-origin:center}@-webkit-keyframes heartBeat{0%{-webkit-transform:scale(1);transform:scale(1)}14%{-webkit-transform:scale(1.3);transform:scale(1.3)}28%{-webkit-transform:scale(1);transform:scale(1)}42%{-webkit-transform:scale(1.3);transform:scale(1.3)}70%{-webkit-transform:scale(1);transform:scale(1)}}@keyframes heartBeat{0%{-webkit-transform:scale(1);transform:scale(1)}14%{-webkit-transform:scale(1.3);transform:scale(1.3)}28%{-webkit-transform:scale(1);transform:scale(1)}42%{-webkit-transform:scale(1.3);transform:scale(1.3)}70%{-webkit-transform:scale(1);transform:scale(1)}}.animate__heartBeat{-webkit-animation-name:heartBeat;animation-name:heartBeat;-webkit-animation-duration:1.3s;animation-duration:1.3s;-webkit-animation-duration:calc(var(--animate-duration) * 1.3);animation-duration:calc(var(--animate-duration) * 1.3);-webkit-animation-timing-function:ease-in-out;animation-timing-function:ease-in-out}@-webkit-keyframes backInDown{0%{-webkit-transform:translateY(-1200px) scale(.7);transform:translateY(-1200px) scale(.7);opacity:.7}80%{-webkit-transform:translateY(0px) scale(.7);transform:translateY(0) scale(.7);opacity:.7}to{-webkit-transform:scale(1);transform:scale(1);opacity:1}}@keyframes backInDown{0%{-webkit-transform:translateY(-1200px) scale(.7);transform:translateY(-1200px) scale(.7);opacity:.7}80%{-webkit-transform:translateY(0px) scale(.7);transform:translateY(0) scale(.7);opacity:.7}to{-webkit-transform:scale(1);transform:scale(1);opacity:1}}.animate__backInDown{-webkit-animation-name:backInDown;animation-name:backInDown}@-webkit-keyframes backInLeft{0%{-webkit-transform:translateX(-2000px) scale(.7);transform:translate(-2000px) scale(.7);opacity:.7}80%{-webkit-transform:translateX(0px) scale(.7);transform:translate(0) scale(.7);opacity:.7}to{-webkit-transform:scale(1);transform:scale(1);opacity:1}}@keyframes backInLeft{0%{-webkit-transform:translateX(-2000px) scale(.7);transform:translate(-2000px) scale(.7);opacity:.7}80%{-webkit-transform:translateX(0px) scale(.7);transform:translate(0) scale(.7);opacity:.7}to{-webkit-transform:scale(1);transform:scale(1);opacity:1}}.animate__backInLeft{-webkit-animation-name:backInLeft;animation-name:backInLeft}@-webkit-keyframes backInRight{0%{-webkit-transform:translateX(2000px) scale(.7);transform:translate(2000px) scale(.7);opacity:.7}80%{-webkit-transform:translateX(0px) scale(.7);transform:translate(0) scale(.7);opacity:.7}to{-webkit-transform:scale(1);transform:scale(1);opacity:1}}@keyframes backInRight{0%{-webkit-transform:translateX(2000px) scale(.7);transform:translate(2000px) scale(.7);opacity:.7}80%{-webkit-transform:translateX(0px) scale(.7);transform:translate(0) scale(.7);opacity:.7}to{-webkit-transform:scale(1);transform:scale(1);opacity:1}}.animate__backInRight{-webkit-animation-name:backInRight;animation-name:backInRight}@-webkit-keyframes backInUp{0%{-webkit-transform:translateY(1200px) scale(.7);transform:translateY(1200px) scale(.7);opacity:.7}80%{-webkit-transform:translateY(0px) scale(.7);transform:translateY(0) scale(.7);opacity:.7}to{-webkit-transform:scale(1);transform:scale(1);opacity:1}}@keyframes backInUp{0%{-webkit-transform:translateY(1200px) scale(.7);transform:translateY(1200px) scale(.7);opacity:.7}80%{-webkit-transform:translateY(0px) scale(.7);transform:translateY(0) scale(.7);opacity:.7}to{-webkit-transform:scale(1);transform:scale(1);opacity:1}}.animate__backInUp{-webkit-animation-name:backInUp;animation-name:backInUp}@-webkit-keyframes backOutDown{0%{-webkit-transform:scale(1);transform:scale(1);opacity:1}20%{-webkit-transform:translateY(0px) scale(.7);transform:translateY(0) scale(.7);opacity:.7}to{-webkit-transform:translateY(700px) scale(.7);transform:translateY(700px) scale(.7);opacity:.7}}@keyframes backOutDown{0%{-webkit-transform:scale(1);transform:scale(1);opacity:1}20%{-webkit-transform:translateY(0px) scale(.7);transform:translateY(0) scale(.7);opacity:.7}to{-webkit-transform:translateY(700px) scale(.7);transform:translateY(700px) scale(.7);opacity:.7}}.animate__backOutDown{-webkit-animation-name:backOutDown;animation-name:backOutDown}@-webkit-keyframes backOutLeft{0%{-webkit-transform:scale(1);transform:scale(1);opacity:1}20%{-webkit-transform:translateX(0px) scale(.7);transform:translate(0) scale(.7);opacity:.7}to{-webkit-transform:translateX(-2000px) scale(.7);transform:translate(-2000px) scale(.7);opacity:.7}}@keyframes backOutLeft{0%{-webkit-transform:scale(1);transform:scale(1);opacity:1}20%{-webkit-transform:translateX(0px) scale(.7);transform:translate(0) scale(.7);opacity:.7}to{-webkit-transform:translateX(-2000px) scale(.7);transform:translate(-2000px) scale(.7);opacity:.7}}.animate__backOutLeft{-webkit-animation-name:backOutLeft;animation-name:backOutLeft}@-webkit-keyframes backOutRight{0%{-webkit-transform:scale(1);transform:scale(1);opacity:1}20%{-webkit-transform:translateX(0px) scale(.7);transform:translate(0) scale(.7);opacity:.7}to{-webkit-transform:translateX(2000px) scale(.7);transform:translate(2000px) scale(.7);opacity:.7}}@keyframes backOutRight{0%{-webkit-transform:scale(1);transform:scale(1);opacity:1}20%{-webkit-transform:translateX(0px) scale(.7);transform:translate(0) scale(.7);opacity:.7}to{-webkit-transform:translateX(2000px) scale(.7);transform:translate(2000px) scale(.7);opacity:.7}}.animate__backOutRight{-webkit-animation-name:backOutRight;animation-name:backOutRight}@-webkit-keyframes backOutUp{0%{-webkit-transform:scale(1);transform:scale(1);opacity:1}20%{-webkit-transform:translateY(0px) scale(.7);transform:translateY(0) scale(.7);opacity:.7}to{-webkit-transform:translateY(-700px) scale(.7);transform:translateY(-700px) scale(.7);opacity:.7}}@keyframes backOutUp{0%{-webkit-transform:scale(1);transform:scale(1);opacity:1}20%{-webkit-transform:translateY(0px) scale(.7);transform:translateY(0) scale(.7);opacity:.7}to{-webkit-transform:translateY(-700px) scale(.7);transform:translateY(-700px) scale(.7);opacity:.7}}.animate__backOutUp{-webkit-animation-name:backOutUp;animation-name:backOutUp}@-webkit-keyframes bounceIn{0%,20%,40%,60%,80%,to{-webkit-animation-timing-function:cubic-bezier(.215,.61,.355,1);animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{opacity:0;-webkit-transform:scale3d(.3,.3,.3);transform:scale3d(.3,.3,.3)}20%{-webkit-transform:scale3d(1.1,1.1,1.1);transform:scale3d(1.1,1.1,1.1)}40%{-webkit-transform:scale3d(.9,.9,.9);transform:scale3d(.9,.9,.9)}60%{opacity:1;-webkit-transform:scale3d(1.03,1.03,1.03);transform:scale3d(1.03,1.03,1.03)}80%{-webkit-transform:scale3d(.97,.97,.97);transform:scale3d(.97,.97,.97)}to{opacity:1;-webkit-transform:scale3d(1,1,1);transform:scaleZ(1)}}@keyframes bounceIn{0%,20%,40%,60%,80%,to{-webkit-animation-timing-function:cubic-bezier(.215,.61,.355,1);animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{opacity:0;-webkit-transform:scale3d(.3,.3,.3);transform:scale3d(.3,.3,.3)}20%{-webkit-transform:scale3d(1.1,1.1,1.1);transform:scale3d(1.1,1.1,1.1)}40%{-webkit-transform:scale3d(.9,.9,.9);transform:scale3d(.9,.9,.9)}60%{opacity:1;-webkit-transform:scale3d(1.03,1.03,1.03);transform:scale3d(1.03,1.03,1.03)}80%{-webkit-transform:scale3d(.97,.97,.97);transform:scale3d(.97,.97,.97)}to{opacity:1;-webkit-transform:scale3d(1,1,1);transform:scaleZ(1)}}.animate__bounceIn{-webkit-animation-duration:.75s;animation-duration:.75s;-webkit-animation-duration:calc(var(--animate-duration) * .75);animation-duration:calc(var(--animate-duration) * .75);-webkit-animation-name:bounceIn;animation-name:bounceIn}@-webkit-keyframes bounceInDown{0%,60%,75%,90%,to{-webkit-animation-timing-function:cubic-bezier(.215,.61,.355,1);animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{opacity:0;-webkit-transform:translate3d(0,-3000px,0) scaleY(3);transform:translate3d(0,-3000px,0) scaleY(3)}60%{opacity:1;-webkit-transform:translate3d(0,25px,0) scaleY(.9);transform:translate3d(0,25px,0) scaleY(.9)}75%{-webkit-transform:translate3d(0,-10px,0) scaleY(.95);transform:translate3d(0,-10px,0) scaleY(.95)}90%{-webkit-transform:translate3d(0,5px,0) scaleY(.985);transform:translate3d(0,5px,0) scaleY(.985)}to{-webkit-transform:translate3d(0,0,0);transform:translateZ(0)}}@keyframes bounceInDown{0%,60%,75%,90%,to{-webkit-animation-timing-function:cubic-bezier(.215,.61,.355,1);animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{opacity:0;-webkit-transform:translate3d(0,-3000px,0) scaleY(3);transform:translate3d(0,-3000px,0) scaleY(3)}60%{opacity:1;-webkit-transform:translate3d(0,25px,0) scaleY(.9);transform:translate3d(0,25px,0) scaleY(.9)}75%{-webkit-transform:translate3d(0,-10px,0) scaleY(.95);transform:translate3d(0,-10px,0) scaleY(.95)}90%{-webkit-transform:translate3d(0,5px,0) scaleY(.985);transform:translate3d(0,5px,0) scaleY(.985)}to{-webkit-transform:translate3d(0,0,0);transform:translateZ(0)}}.animate__bounceInDown{-webkit-animation-name:bounceInDown;animation-name:bounceInDown}@-webkit-keyframes bounceInLeft{0%,60%,75%,90%,to{-webkit-animation-timing-function:cubic-bezier(.215,.61,.355,1);animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{opacity:0;-webkit-transform:translate3d(-3000px,0,0) scaleX(3);transform:translate3d(-3000px,0,0) scaleX(3)}60%{opacity:1;-webkit-transform:translate3d(25px,0,0) scaleX(1);transform:translate3d(25px,0,0) scaleX(1)}75%{-webkit-transform:translate3d(-10px,0,0) scaleX(.98);transform:translate3d(-10px,0,0) scaleX(.98)}90%{-webkit-transform:translate3d(5px,0,0) scaleX(.995);transform:translate3d(5px,0,0) scaleX(.995)}to{-webkit-transform:translate3d(0,0,0);transform:translateZ(0)}}@keyframes bounceInLeft{0%,60%,75%,90%,to{-webkit-animation-timing-function:cubic-bezier(.215,.61,.355,1);animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{opacity:0;-webkit-transform:translate3d(-3000px,0,0) scaleX(3);transform:translate3d(-3000px,0,0) scaleX(3)}60%{opacity:1;-webkit-transform:translate3d(25px,0,0) scaleX(1);transform:translate3d(25px,0,0) scaleX(1)}75%{-webkit-transform:translate3d(-10px,0,0) scaleX(.98);transform:translate3d(-10px,0,0) scaleX(.98)}90%{-webkit-transform:translate3d(5px,0,0) scaleX(.995);transform:translate3d(5px,0,0) scaleX(.995)}to{-webkit-transform:translate3d(0,0,0);transform:translateZ(0)}}.animate__bounceInLeft{-webkit-animation-name:bounceInLeft;animation-name:bounceInLeft}@-webkit-keyframes bounceInRight{0%,60%,75%,90%,to{-webkit-animation-timing-function:cubic-bezier(.215,.61,.355,1);animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{opacity:0;-webkit-transform:translate3d(3000px,0,0) scaleX(3);transform:translate3d(3000px,0,0) scaleX(3)}60%{opacity:1;-webkit-transform:translate3d(-25px,0,0) scaleX(1);transform:translate3d(-25px,0,0) scaleX(1)}75%{-webkit-transform:translate3d(10px,0,0) scaleX(.98);transform:translate3d(10px,0,0) scaleX(.98)}90%{-webkit-transform:translate3d(-5px,0,0) scaleX(.995);transform:translate3d(-5px,0,0) scaleX(.995)}to{-webkit-transform:translate3d(0,0,0);transform:translateZ(0)}}@keyframes bounceInRight{0%,60%,75%,90%,to{-webkit-animation-timing-function:cubic-bezier(.215,.61,.355,1);animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{opacity:0;-webkit-transform:translate3d(3000px,0,0) scaleX(3);transform:translate3d(3000px,0,0) scaleX(3)}60%{opacity:1;-webkit-transform:translate3d(-25px,0,0) scaleX(1);transform:translate3d(-25px,0,0) scaleX(1)}75%{-webkit-transform:translate3d(10px,0,0) scaleX(.98);transform:translate3d(10px,0,0) scaleX(.98)}90%{-webkit-transform:translate3d(-5px,0,0) scaleX(.995);transform:translate3d(-5px,0,0) scaleX(.995)}to{-webkit-transform:translate3d(0,0,0);transform:translateZ(0)}}.animate__bounceInRight{-webkit-animation-name:bounceInRight;animation-name:bounceInRight}@-webkit-keyframes bounceInUp{0%,60%,75%,90%,to{-webkit-animation-timing-function:cubic-bezier(.215,.61,.355,1);animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{opacity:0;-webkit-transform:translate3d(0,3000px,0) scaleY(5);transform:translate3d(0,3000px,0) scaleY(5)}60%{opacity:1;-webkit-transform:translate3d(0,-20px,0) scaleY(.9);transform:translate3d(0,-20px,0) scaleY(.9)}75%{-webkit-transform:translate3d(0,10px,0) scaleY(.95);transform:translate3d(0,10px,0) scaleY(.95)}90%{-webkit-transform:translate3d(0,-5px,0) scaleY(.985);transform:translate3d(0,-5px,0) scaleY(.985)}to{-webkit-transform:translate3d(0,0,0);transform:translateZ(0)}}@keyframes bounceInUp{0%,60%,75%,90%,to{-webkit-animation-timing-function:cubic-bezier(.215,.61,.355,1);animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{opacity:0;-webkit-transform:translate3d(0,3000px,0) scaleY(5);transform:translate3d(0,3000px,0) scaleY(5)}60%{opacity:1;-webkit-transform:translate3d(0,-20px,0) scaleY(.9);transform:translate3d(0,-20px,0) scaleY(.9)}75%{-webkit-transform:translate3d(0,10px,0) scaleY(.95);transform:translate3d(0,10px,0) scaleY(.95)}90%{-webkit-transform:translate3d(0,-5px,0) scaleY(.985);transform:translate3d(0,-5px,0) scaleY(.985)}to{-webkit-transform:translate3d(0,0,0);transform:translateZ(0)}}.animate__bounceInUp{-webkit-animation-name:bounceInUp;animation-name:bounceInUp}@-webkit-keyframes bounceOut{20%{-webkit-transform:scale3d(.9,.9,.9);transform:scale3d(.9,.9,.9)}50%,55%{opacity:1;-webkit-transform:scale3d(1.1,1.1,1.1);transform:scale3d(1.1,1.1,1.1)}to{opacity:0;-webkit-transform:scale3d(.3,.3,.3);transform:scale3d(.3,.3,.3)}}@keyframes bounceOut{20%{-webkit-transform:scale3d(.9,.9,.9);transform:scale3d(.9,.9,.9)}50%,55%{opacity:1;-webkit-transform:scale3d(1.1,1.1,1.1);transform:scale3d(1.1,1.1,1.1)}to{opacity:0;-webkit-transform:scale3d(.3,.3,.3);transform:scale3d(.3,.3,.3)}}.animate__bounceOut{-webkit-animation-duration:.75s;animation-duration:.75s;-webkit-animation-duration:calc(var(--animate-duration) * .75);animation-duration:calc(var(--animate-duration) * .75);-webkit-animation-name:bounceOut;animation-name:bounceOut}@-webkit-keyframes bounceOutDown{20%{-webkit-transform:translate3d(0,10px,0) scaleY(.985);transform:translate3d(0,10px,0) scaleY(.985)}40%,45%{opacity:1;-webkit-transform:translate3d(0,-20px,0) scaleY(.9);transform:translate3d(0,-20px,0) scaleY(.9)}to{opacity:0;-webkit-transform:translate3d(0,2000px,0) scaleY(3);transform:translate3d(0,2000px,0) scaleY(3)}}@keyframes bounceOutDown{20%{-webkit-transform:translate3d(0,10px,0) scaleY(.985);transform:translate3d(0,10px,0) scaleY(.985)}40%,45%{opacity:1;-webkit-transform:translate3d(0,-20px,0) scaleY(.9);transform:translate3d(0,-20px,0) scaleY(.9)}to{opacity:0;-webkit-transform:translate3d(0,2000px,0) scaleY(3);transform:translate3d(0,2000px,0) scaleY(3)}}.animate__bounceOutDown{-webkit-animation-name:bounceOutDown;animation-name:bounceOutDown}@-webkit-keyframes bounceOutLeft{20%{opacity:1;-webkit-transform:translate3d(20px,0,0) scaleX(.9);transform:translate3d(20px,0,0) scaleX(.9)}to{opacity:0;-webkit-transform:translate3d(-2000px,0,0) scaleX(2);transform:translate3d(-2000px,0,0) scaleX(2)}}@keyframes bounceOutLeft{20%{opacity:1;-webkit-transform:translate3d(20px,0,0) scaleX(.9);transform:translate3d(20px,0,0) scaleX(.9)}to{opacity:0;-webkit-transform:translate3d(-2000px,0,0) scaleX(2);transform:translate3d(-2000px,0,0) scaleX(2)}}.animate__bounceOutLeft{-webkit-animation-name:bounceOutLeft;animation-name:bounceOutLeft}@-webkit-keyframes bounceOutRight{20%{opacity:1;-webkit-transform:translate3d(-20px,0,0) scaleX(.9);transform:translate3d(-20px,0,0) scaleX(.9)}to{opacity:0;-webkit-transform:translate3d(2000px,0,0) scaleX(2);transform:translate3d(2000px,0,0) scaleX(2)}}@keyframes bounceOutRight{20%{opacity:1;-webkit-transform:translate3d(-20px,0,0) scaleX(.9);transform:translate3d(-20px,0,0) scaleX(.9)}to{opacity:0;-webkit-transform:translate3d(2000px,0,0) scaleX(2);transform:translate3d(2000px,0,0) scaleX(2)}}.animate__bounceOutRight{-webkit-animation-name:bounceOutRight;animation-name:bounceOutRight}@-webkit-keyframes bounceOutUp{20%{-webkit-transform:translate3d(0,-10px,0) scaleY(.985);transform:translate3d(0,-10px,0) scaleY(.985)}40%,45%{opacity:1;-webkit-transform:translate3d(0,20px,0) scaleY(.9);transform:translate3d(0,20px,0) scaleY(.9)}to{opacity:0;-webkit-transform:translate3d(0,-2000px,0) scaleY(3);transform:translate3d(0,-2000px,0) scaleY(3)}}@keyframes bounceOutUp{20%{-webkit-transform:translate3d(0,-10px,0) scaleY(.985);transform:translate3d(0,-10px,0) scaleY(.985)}40%,45%{opacity:1;-webkit-transform:translate3d(0,20px,0) scaleY(.9);transform:translate3d(0,20px,0) scaleY(.9)}to{opacity:0;-webkit-transform:translate3d(0,-2000px,0) scaleY(3);transform:translate3d(0,-2000px,0) scaleY(3)}}.animate__bounceOutUp{-webkit-animation-name:bounceOutUp;animation-name:bounceOutUp}@-webkit-keyframes fadeIn{0%{opacity:0}to{opacity:1}}@keyframes fadeIn{0%{opacity:0}to{opacity:1}}.animate__fadeIn{-webkit-animation-name:fadeIn;animation-name:fadeIn}@-webkit-keyframes fadeInDown{0%{opacity:0;-webkit-transform:translate3d(0,-100%,0);transform:translate3d(0,-100%,0)}to{opacity:1;-webkit-transform:translate3d(0,0,0);transform:translateZ(0)}}@keyframes fadeInDown{0%{opacity:0;-webkit-transform:translate3d(0,-100%,0);transform:translate3d(0,-100%,0)}to{opacity:1;-webkit-transform:translate3d(0,0,0);transform:translateZ(0)}}.animate__fadeInDown{-webkit-animation-name:fadeInDown;animation-name:fadeInDown}@-webkit-keyframes fadeInDownBig{0%{opacity:0;-webkit-transform:translate3d(0,-2000px,0);transform:translate3d(0,-2000px,0)}to{opacity:1;-webkit-transform:translate3d(0,0,0);transform:translateZ(0)}}@keyframes fadeInDownBig{0%{opacity:0;-webkit-transform:translate3d(0,-2000px,0);transform:translate3d(0,-2000px,0)}to{opacity:1;-webkit-transform:translate3d(0,0,0);transform:translateZ(0)}}.animate__fadeInDownBig{-webkit-animation-name:fadeInDownBig;animation-name:fadeInDownBig}@-webkit-keyframes fadeInLeft{0%{opacity:0;-webkit-transform:translate3d(-100%,0,0);transform:translate3d(-100%,0,0)}to{opacity:1;-webkit-transform:translate3d(0,0,0);transform:translateZ(0)}}@keyframes fadeInLeft{0%{opacity:0;-webkit-transform:translate3d(-100%,0,0);transform:translate3d(-100%,0,0)}to{opacity:1;-webkit-transform:translate3d(0,0,0);transform:translateZ(0)}}.animate__fadeInLeft{-webkit-animation-name:fadeInLeft;animation-name:fadeInLeft}@-webkit-keyframes fadeInLeftBig{0%{opacity:0;-webkit-transform:translate3d(-2000px,0,0);transform:translate3d(-2000px,0,0)}to{opacity:1;-webkit-transform:translate3d(0,0,0);transform:translateZ(0)}}@keyframes fadeInLeftBig{0%{opacity:0;-webkit-transform:translate3d(-2000px,0,0);transform:translate3d(-2000px,0,0)}to{opacity:1;-webkit-transform:translate3d(0,0,0);transform:translateZ(0)}}.animate__fadeInLeftBig{-webkit-animation-name:fadeInLeftBig;animation-name:fadeInLeftBig}@-webkit-keyframes fadeInRight{0%{opacity:0;-webkit-transform:translate3d(100%,0,0);transform:translate3d(100%,0,0)}to{opacity:1;-webkit-transform:translate3d(0,0,0);transform:translateZ(0)}}@keyframes fadeInRight{0%{opacity:0;-webkit-transform:translate3d(100%,0,0);transform:translate3d(100%,0,0)}to{opacity:1;-webkit-transform:translate3d(0,0,0);transform:translateZ(0)}}.animate__fadeInRight{-webkit-animation-name:fadeInRight;animation-name:fadeInRight}@-webkit-keyframes fadeInRightBig{0%{opacity:0;-webkit-transform:translate3d(2000px,0,0);transform:translate3d(2000px,0,0)}to{opacity:1;-webkit-transform:translate3d(0,0,0);transform:translateZ(0)}}@keyframes fadeInRightBig{0%{opacity:0;-webkit-transform:translate3d(2000px,0,0);transform:translate3d(2000px,0,0)}to{opacity:1;-webkit-transform:translate3d(0,0,0);transform:translateZ(0)}}.animate__fadeInRightBig{-webkit-animation-name:fadeInRightBig;animation-name:fadeInRightBig}@-webkit-keyframes fadeInUp{0%{opacity:0;-webkit-transform:translate3d(0,100%,0);transform:translate3d(0,100%,0)}to{opacity:1;-webkit-transform:translate3d(0,0,0);transform:translateZ(0)}}@keyframes fadeInUp{0%{opacity:0;-webkit-transform:translate3d(0,100%,0);transform:translate3d(0,100%,0)}to{opacity:1;-webkit-transform:translate3d(0,0,0);transform:translateZ(0)}}.animate__fadeInUp{-webkit-animation-name:fadeInUp;animation-name:fadeInUp}@-webkit-keyframes fadeInUpBig{0%{opacity:0;-webkit-transform:translate3d(0,2000px,0);transform:translate3d(0,2000px,0)}to{opacity:1;-webkit-transform:translate3d(0,0,0);transform:translateZ(0)}}@keyframes fadeInUpBig{0%{opacity:0;-webkit-transform:translate3d(0,2000px,0);transform:translate3d(0,2000px,0)}to{opacity:1;-webkit-transform:translate3d(0,0,0);transform:translateZ(0)}}.animate__fadeInUpBig{-webkit-animation-name:fadeInUpBig;animation-name:fadeInUpBig}@-webkit-keyframes fadeInTopLeft{0%{opacity:0;-webkit-transform:translate3d(-100%,-100%,0);transform:translate3d(-100%,-100%,0)}to{opacity:1;-webkit-transform:translate3d(0,0,0);transform:translateZ(0)}}@keyframes fadeInTopLeft{0%{opacity:0;-webkit-transform:translate3d(-100%,-100%,0);transform:translate3d(-100%,-100%,0)}to{opacity:1;-webkit-transform:translate3d(0,0,0);transform:translateZ(0)}}.animate__fadeInTopLeft{-webkit-animation-name:fadeInTopLeft;animation-name:fadeInTopLeft}@-webkit-keyframes fadeInTopRight{0%{opacity:0;-webkit-transform:translate3d(100%,-100%,0);transform:translate3d(100%,-100%,0)}to{opacity:1;-webkit-transform:translate3d(0,0,0);transform:translateZ(0)}}@keyframes fadeInTopRight{0%{opacity:0;-webkit-transform:translate3d(100%,-100%,0);transform:translate3d(100%,-100%,0)}to{opacity:1;-webkit-transform:translate3d(0,0,0);transform:translateZ(0)}}.animate__fadeInTopRight{-webkit-animation-name:fadeInTopRight;animation-name:fadeInTopRight}@-webkit-keyframes fadeInBottomLeft{0%{opacity:0;-webkit-transform:translate3d(-100%,100%,0);transform:translate3d(-100%,100%,0)}to{opacity:1;-webkit-transform:translate3d(0,0,0);transform:translateZ(0)}}@keyframes fadeInBottomLeft{0%{opacity:0;-webkit-transform:translate3d(-100%,100%,0);transform:translate3d(-100%,100%,0)}to{opacity:1;-webkit-transform:translate3d(0,0,0);transform:translateZ(0)}}.animate__fadeInBottomLeft{-webkit-animation-name:fadeInBottomLeft;animation-name:fadeInBottomLeft}@-webkit-keyframes fadeInBottomRight{0%{opacity:0;-webkit-transform:translate3d(100%,100%,0);transform:translate3d(100%,100%,0)}to{opacity:1;-webkit-transform:translate3d(0,0,0);transform:translateZ(0)}}@keyframes fadeInBottomRight{0%{opacity:0;-webkit-transform:translate3d(100%,100%,0);transform:translate3d(100%,100%,0)}to{opacity:1;-webkit-transform:translate3d(0,0,0);transform:translateZ(0)}}.animate__fadeInBottomRight{-webkit-animation-name:fadeInBottomRight;animation-name:fadeInBottomRight}@-webkit-keyframes fadeOut{0%{opacity:1}to{opacity:0}}@keyframes fadeOut{0%{opacity:1}to{opacity:0}}.animate__fadeOut{-webkit-animation-name:fadeOut;animation-name:fadeOut}@-webkit-keyframes fadeOutDown{0%{opacity:1}to{opacity:0;-webkit-transform:translate3d(0,100%,0);transform:translate3d(0,100%,0)}}@keyframes fadeOutDown{0%{opacity:1}to{opacity:0;-webkit-transform:translate3d(0,100%,0);transform:translate3d(0,100%,0)}}.animate__fadeOutDown{-webkit-animation-name:fadeOutDown;animation-name:fadeOutDown}@-webkit-keyframes fadeOutDownBig{0%{opacity:1}to{opacity:0;-webkit-transform:translate3d(0,2000px,0);transform:translate3d(0,2000px,0)}}@keyframes fadeOutDownBig{0%{opacity:1}to{opacity:0;-webkit-transform:translate3d(0,2000px,0);transform:translate3d(0,2000px,0)}}.animate__fadeOutDownBig{-webkit-animation-name:fadeOutDownBig;animation-name:fadeOutDownBig}@-webkit-keyframes fadeOutLeft{0%{opacity:1}to{opacity:0;-webkit-transform:translate3d(-100%,0,0);transform:translate3d(-100%,0,0)}}@keyframes fadeOutLeft{0%{opacity:1}to{opacity:0;-webkit-transform:translate3d(-100%,0,0);transform:translate3d(-100%,0,0)}}.animate__fadeOutLeft{-webkit-animation-name:fadeOutLeft;animation-name:fadeOutLeft}@-webkit-keyframes fadeOutLeftBig{0%{opacity:1}to{opacity:0;-webkit-transform:translate3d(-2000px,0,0);transform:translate3d(-2000px,0,0)}}@keyframes fadeOutLeftBig{0%{opacity:1}to{opacity:0;-webkit-transform:translate3d(-2000px,0,0);transform:translate3d(-2000px,0,0)}}.animate__fadeOutLeftBig{-webkit-animation-name:fadeOutLeftBig;animation-name:fadeOutLeftBig}@-webkit-keyframes fadeOutRight{0%{opacity:1}to{opacity:0;-webkit-transform:translate3d(100%,0,0);transform:translate3d(100%,0,0)}}@keyframes fadeOutRight{0%{opacity:1}to{opacity:0;-webkit-transform:translate3d(100%,0,0);transform:translate3d(100%,0,0)}}.animate__fadeOutRight{-webkit-animation-name:fadeOutRight;animation-name:fadeOutRight}@-webkit-keyframes fadeOutRightBig{0%{opacity:1}to{opacity:0;-webkit-transform:translate3d(2000px,0,0);transform:translate3d(2000px,0,0)}}@keyframes fadeOutRightBig{0%{opacity:1}to{opacity:0;-webkit-transform:translate3d(2000px,0,0);transform:translate3d(2000px,0,0)}}.animate__fadeOutRightBig{-webkit-animation-name:fadeOutRightBig;animation-name:fadeOutRightBig}@-webkit-keyframes fadeOutUp{0%{opacity:1}to{opacity:0;-webkit-transform:translate3d(0,-100%,0);transform:translate3d(0,-100%,0)}}@keyframes fadeOutUp{0%{opacity:1}to{opacity:0;-webkit-transform:translate3d(0,-100%,0);transform:translate3d(0,-100%,0)}}.animate__fadeOutUp{-webkit-animation-name:fadeOutUp;animation-name:fadeOutUp}@-webkit-keyframes fadeOutUpBig{0%{opacity:1}to{opacity:0;-webkit-transform:translate3d(0,-2000px,0);transform:translate3d(0,-2000px,0)}}@keyframes fadeOutUpBig{0%{opacity:1}to{opacity:0;-webkit-transform:translate3d(0,-2000px,0);transform:translate3d(0,-2000px,0)}}.animate__fadeOutUpBig{-webkit-animation-name:fadeOutUpBig;animation-name:fadeOutUpBig}@-webkit-keyframes fadeOutTopLeft{0%{opacity:1;-webkit-transform:translate3d(0,0,0);transform:translateZ(0)}to{opacity:0;-webkit-transform:translate3d(-100%,-100%,0);transform:translate3d(-100%,-100%,0)}}@keyframes fadeOutTopLeft{0%{opacity:1;-webkit-transform:translate3d(0,0,0);transform:translateZ(0)}to{opacity:0;-webkit-transform:translate3d(-100%,-100%,0);transform:translate3d(-100%,-100%,0)}}.animate__fadeOutTopLeft{-webkit-animation-name:fadeOutTopLeft;animation-name:fadeOutTopLeft}@-webkit-keyframes fadeOutTopRight{0%{opacity:1;-webkit-transform:translate3d(0,0,0);transform:translateZ(0)}to{opacity:0;-webkit-transform:translate3d(100%,-100%,0);transform:translate3d(100%,-100%,0)}}@keyframes fadeOutTopRight{0%{opacity:1;-webkit-transform:translate3d(0,0,0);transform:translateZ(0)}to{opacity:0;-webkit-transform:translate3d(100%,-100%,0);transform:translate3d(100%,-100%,0)}}.animate__fadeOutTopRight{-webkit-animation-name:fadeOutTopRight;animation-name:fadeOutTopRight}@-webkit-keyframes fadeOutBottomRight{0%{opacity:1;-webkit-transform:translate3d(0,0,0);transform:translateZ(0)}to{opacity:0;-webkit-transform:translate3d(100%,100%,0);transform:translate3d(100%,100%,0)}}@keyframes fadeOutBottomRight{0%{opacity:1;-webkit-transform:translate3d(0,0,0);transform:translateZ(0)}to{opacity:0;-webkit-transform:translate3d(100%,100%,0);transform:translate3d(100%,100%,0)}}.animate__fadeOutBottomRight{-webkit-animation-name:fadeOutBottomRight;animation-name:fadeOutBottomRight}@-webkit-keyframes fadeOutBottomLeft{0%{opacity:1;-webkit-transform:translate3d(0,0,0);transform:translateZ(0)}to{opacity:0;-webkit-transform:translate3d(-100%,100%,0);transform:translate3d(-100%,100%,0)}}@keyframes fadeOutBottomLeft{0%{opacity:1;-webkit-transform:translate3d(0,0,0);transform:translateZ(0)}to{opacity:0;-webkit-transform:translate3d(-100%,100%,0);transform:translate3d(-100%,100%,0)}}.animate__fadeOutBottomLeft{-webkit-animation-name:fadeOutBottomLeft;animation-name:fadeOutBottomLeft}@-webkit-keyframes flip{0%{-webkit-transform:perspective(400px) scale3d(1,1,1) translate3d(0,0,0) rotate3d(0,1,0,-360deg);transform:perspective(400px) scaleZ(1) translateZ(0) rotateY(-360deg);-webkit-animation-timing-function:ease-out;animation-timing-function:ease-out}40%{-webkit-transform:perspective(400px) scale3d(1,1,1) translate3d(0,0,150px) rotate3d(0,1,0,-190deg);transform:perspective(400px) scaleZ(1) translateZ(150px) rotateY(-190deg);-webkit-animation-timing-function:ease-out;animation-timing-function:ease-out}50%{-webkit-transform:perspective(400px) scale3d(1,1,1) translate3d(0,0,150px) rotate3d(0,1,0,-170deg);transform:perspective(400px) scaleZ(1) translateZ(150px) rotateY(-170deg);-webkit-animation-timing-function:ease-in;animation-timing-function:ease-in}80%{-webkit-transform:perspective(400px) scale3d(.95,.95,.95) translate3d(0,0,0) rotate3d(0,1,0,0deg);transform:perspective(400px) scale3d(.95,.95,.95) translateZ(0) rotateY(0);-webkit-animation-timing-function:ease-in;animation-timing-function:ease-in}to{-webkit-transform:perspective(400px) scale3d(1,1,1) translate3d(0,0,0) rotate3d(0,1,0,0deg);transform:perspective(400px) scaleZ(1) translateZ(0) rotateY(0);-webkit-animation-timing-function:ease-in;animation-timing-function:ease-in}}@keyframes flip{0%{-webkit-transform:perspective(400px) scale3d(1,1,1) translate3d(0,0,0) rotate3d(0,1,0,-360deg);transform:perspective(400px) scaleZ(1) translateZ(0) rotateY(-360deg);-webkit-animation-timing-function:ease-out;animation-timing-function:ease-out}40%{-webkit-transform:perspective(400px) scale3d(1,1,1) translate3d(0,0,150px) rotate3d(0,1,0,-190deg);transform:perspective(400px) scaleZ(1) translateZ(150px) rotateY(-190deg);-webkit-animation-timing-function:ease-out;animation-timing-function:ease-out}50%{-webkit-transform:perspective(400px) scale3d(1,1,1) translate3d(0,0,150px) rotate3d(0,1,0,-170deg);transform:perspective(400px) scaleZ(1) translateZ(150px) rotateY(-170deg);-webkit-animation-timing-function:ease-in;animation-timing-function:ease-in}80%{-webkit-transform:perspective(400px) scale3d(.95,.95,.95) translate3d(0,0,0) rotate3d(0,1,0,0deg);transform:perspective(400px) scale3d(.95,.95,.95) translateZ(0) rotateY(0);-webkit-animation-timing-function:ease-in;animation-timing-function:ease-in}to{-webkit-transform:perspective(400px) scale3d(1,1,1) translate3d(0,0,0) rotate3d(0,1,0,0deg);transform:perspective(400px) scaleZ(1) translateZ(0) rotateY(0);-webkit-animation-timing-function:ease-in;animation-timing-function:ease-in}}.animate__animated.animate__flip{-webkit-backface-visibility:visible;backface-visibility:visible;-webkit-animation-name:flip;animation-name:flip}@-webkit-keyframes flipInX{0%{-webkit-transform:perspective(400px) rotate3d(1,0,0,90deg);transform:perspective(400px) rotateX(90deg);-webkit-animation-timing-function:ease-in;animation-timing-function:ease-in;opacity:0}40%{-webkit-transform:perspective(400px) rotate3d(1,0,0,-20deg);transform:perspective(400px) rotateX(-20deg);-webkit-animation-timing-function:ease-in;animation-timing-function:ease-in}60%{-webkit-transform:perspective(400px) rotate3d(1,0,0,10deg);transform:perspective(400px) rotateX(10deg);opacity:1}80%{-webkit-transform:perspective(400px) rotate3d(1,0,0,-5deg);transform:perspective(400px) rotateX(-5deg)}to{-webkit-transform:perspective(400px);transform:perspective(400px)}}@keyframes flipInX{0%{-webkit-transform:perspective(400px) rotate3d(1,0,0,90deg);transform:perspective(400px) rotateX(90deg);-webkit-animation-timing-function:ease-in;animation-timing-function:ease-in;opacity:0}40%{-webkit-transform:perspective(400px) rotate3d(1,0,0,-20deg);transform:perspective(400px) rotateX(-20deg);-webkit-animation-timing-function:ease-in;animation-timing-function:ease-in}60%{-webkit-transform:perspective(400px) rotate3d(1,0,0,10deg);transform:perspective(400px) rotateX(10deg);opacity:1}80%{-webkit-transform:perspective(400px) rotate3d(1,0,0,-5deg);transform:perspective(400px) rotateX(-5deg)}to{-webkit-transform:perspective(400px);transform:perspective(400px)}}.animate__flipInX{-webkit-backface-visibility:visible!important;backface-visibility:visible!important;-webkit-animation-name:flipInX;animation-name:flipInX}@-webkit-keyframes flipInY{0%{-webkit-transform:perspective(400px) rotate3d(0,1,0,90deg);transform:perspective(400px) rotateY(90deg);-webkit-animation-timing-function:ease-in;animation-timing-function:ease-in;opacity:0}40%{-webkit-transform:perspective(400px) rotate3d(0,1,0,-20deg);transform:perspective(400px) rotateY(-20deg);-webkit-animation-timing-function:ease-in;animation-timing-function:ease-in}60%{-webkit-transform:perspective(400px) rotate3d(0,1,0,10deg);transform:perspective(400px) rotateY(10deg);opacity:1}80%{-webkit-transform:perspective(400px) rotate3d(0,1,0,-5deg);transform:perspective(400px) rotateY(-5deg)}to{-webkit-transform:perspective(400px);transform:perspective(400px)}}@keyframes flipInY{0%{-webkit-transform:perspective(400px) rotate3d(0,1,0,90deg);transform:perspective(400px) rotateY(90deg);-webkit-animation-timing-function:ease-in;animation-timing-function:ease-in;opacity:0}40%{-webkit-transform:perspective(400px) rotate3d(0,1,0,-20deg);transform:perspective(400px) rotateY(-20deg);-webkit-animation-timing-function:ease-in;animation-timing-function:ease-in}60%{-webkit-transform:perspective(400px) rotate3d(0,1,0,10deg);transform:perspective(400px) rotateY(10deg);opacity:1}80%{-webkit-transform:perspective(400px) rotate3d(0,1,0,-5deg);transform:perspective(400px) rotateY(-5deg)}to{-webkit-transform:perspective(400px);transform:perspective(400px)}}.animate__flipInY{-webkit-backface-visibility:visible!important;backface-visibility:visible!important;-webkit-animation-name:flipInY;animation-name:flipInY}@-webkit-keyframes flipOutX{0%{-webkit-transform:perspective(400px);transform:perspective(400px)}30%{-webkit-transform:perspective(400px) rotate3d(1,0,0,-20deg);transform:perspective(400px) rotateX(-20deg);opacity:1}to{-webkit-transform:perspective(400px) rotate3d(1,0,0,90deg);transform:perspective(400px) rotateX(90deg);opacity:0}}@keyframes flipOutX{0%{-webkit-transform:perspective(400px);transform:perspective(400px)}30%{-webkit-transform:perspective(400px) rotate3d(1,0,0,-20deg);transform:perspective(400px) rotateX(-20deg);opacity:1}to{-webkit-transform:perspective(400px) rotate3d(1,0,0,90deg);transform:perspective(400px) rotateX(90deg);opacity:0}}.animate__flipOutX{-webkit-animation-duration:.75s;animation-duration:.75s;-webkit-animation-duration:calc(var(--animate-duration) * .75);animation-duration:calc(var(--animate-duration) * .75);-webkit-animation-name:flipOutX;animation-name:flipOutX;-webkit-backface-visibility:visible!important;backface-visibility:visible!important}@-webkit-keyframes flipOutY{0%{-webkit-transform:perspective(400px);transform:perspective(400px)}30%{-webkit-transform:perspective(400px) rotate3d(0,1,0,-15deg);transform:perspective(400px) rotateY(-15deg);opacity:1}to{-webkit-transform:perspective(400px) rotate3d(0,1,0,90deg);transform:perspective(400px) rotateY(90deg);opacity:0}}@keyframes flipOutY{0%{-webkit-transform:perspective(400px);transform:perspective(400px)}30%{-webkit-transform:perspective(400px) rotate3d(0,1,0,-15deg);transform:perspective(400px) rotateY(-15deg);opacity:1}to{-webkit-transform:perspective(400px) rotate3d(0,1,0,90deg);transform:perspective(400px) rotateY(90deg);opacity:0}}.animate__flipOutY{-webkit-animation-duration:.75s;animation-duration:.75s;-webkit-animation-duration:calc(var(--animate-duration) * .75);animation-duration:calc(var(--animate-duration) * .75);-webkit-backface-visibility:visible!important;backface-visibility:visible!important;-webkit-animation-name:flipOutY;animation-name:flipOutY}@-webkit-keyframes lightSpeedInRight{0%{-webkit-transform:translate3d(100%,0,0) skewX(-30deg);transform:translate3d(100%,0,0) skew(-30deg);opacity:0}60%{-webkit-transform:skewX(20deg);transform:skew(20deg);opacity:1}80%{-webkit-transform:skewX(-5deg);transform:skew(-5deg)}to{-webkit-transform:translate3d(0,0,0);transform:translateZ(0)}}@keyframes lightSpeedInRight{0%{-webkit-transform:translate3d(100%,0,0) skewX(-30deg);transform:translate3d(100%,0,0) skew(-30deg);opacity:0}60%{-webkit-transform:skewX(20deg);transform:skew(20deg);opacity:1}80%{-webkit-transform:skewX(-5deg);transform:skew(-5deg)}to{-webkit-transform:translate3d(0,0,0);transform:translateZ(0)}}.animate__lightSpeedInRight{-webkit-animation-name:lightSpeedInRight;animation-name:lightSpeedInRight;-webkit-animation-timing-function:ease-out;animation-timing-function:ease-out}@-webkit-keyframes lightSpeedInLeft{0%{-webkit-transform:translate3d(-100%,0,0) skewX(30deg);transform:translate3d(-100%,0,0) skew(30deg);opacity:0}60%{-webkit-transform:skewX(-20deg);transform:skew(-20deg);opacity:1}80%{-webkit-transform:skewX(5deg);transform:skew(5deg)}to{-webkit-transform:translate3d(0,0,0);transform:translateZ(0)}}@keyframes lightSpeedInLeft{0%{-webkit-transform:translate3d(-100%,0,0) skewX(30deg);transform:translate3d(-100%,0,0) skew(30deg);opacity:0}60%{-webkit-transform:skewX(-20deg);transform:skew(-20deg);opacity:1}80%{-webkit-transform:skewX(5deg);transform:skew(5deg)}to{-webkit-transform:translate3d(0,0,0);transform:translateZ(0)}}.animate__lightSpeedInLeft{-webkit-animation-name:lightSpeedInLeft;animation-name:lightSpeedInLeft;-webkit-animation-timing-function:ease-out;animation-timing-function:ease-out}@-webkit-keyframes lightSpeedOutRight{0%{opacity:1}to{-webkit-transform:translate3d(100%,0,0) skewX(30deg);transform:translate3d(100%,0,0) skew(30deg);opacity:0}}@keyframes lightSpeedOutRight{0%{opacity:1}to{-webkit-transform:translate3d(100%,0,0) skewX(30deg);transform:translate3d(100%,0,0) skew(30deg);opacity:0}}.animate__lightSpeedOutRight{-webkit-animation-name:lightSpeedOutRight;animation-name:lightSpeedOutRight;-webkit-animation-timing-function:ease-in;animation-timing-function:ease-in}@-webkit-keyframes lightSpeedOutLeft{0%{opacity:1}to{-webkit-transform:translate3d(-100%,0,0) skewX(-30deg);transform:translate3d(-100%,0,0) skew(-30deg);opacity:0}}@keyframes lightSpeedOutLeft{0%{opacity:1}to{-webkit-transform:translate3d(-100%,0,0) skewX(-30deg);transform:translate3d(-100%,0,0) skew(-30deg);opacity:0}}.animate__lightSpeedOutLeft{-webkit-animation-name:lightSpeedOutLeft;animation-name:lightSpeedOutLeft;-webkit-animation-timing-function:ease-in;animation-timing-function:ease-in}@-webkit-keyframes rotateIn{0%{-webkit-transform:rotate3d(0,0,1,-200deg);transform:rotate3d(0,0,1,-200deg);opacity:0}to{-webkit-transform:translate3d(0,0,0);transform:translateZ(0);opacity:1}}@keyframes rotateIn{0%{-webkit-transform:rotate3d(0,0,1,-200deg);transform:rotate3d(0,0,1,-200deg);opacity:0}to{-webkit-transform:translate3d(0,0,0);transform:translateZ(0);opacity:1}}.animate__rotateIn{-webkit-animation-name:rotateIn;animation-name:rotateIn;-webkit-transform-origin:center;transform-origin:center}@-webkit-keyframes rotateInDownLeft{0%{-webkit-transform:rotate3d(0,0,1,-45deg);transform:rotate3d(0,0,1,-45deg);opacity:0}to{-webkit-transform:translate3d(0,0,0);transform:translateZ(0);opacity:1}}@keyframes rotateInDownLeft{0%{-webkit-transform:rotate3d(0,0,1,-45deg);transform:rotate3d(0,0,1,-45deg);opacity:0}to{-webkit-transform:translate3d(0,0,0);transform:translateZ(0);opacity:1}}.animate__rotateInDownLeft{-webkit-animation-name:rotateInDownLeft;animation-name:rotateInDownLeft;-webkit-transform-origin:left bottom;transform-origin:left bottom}@-webkit-keyframes rotateInDownRight{0%{-webkit-transform:rotate3d(0,0,1,45deg);transform:rotate3d(0,0,1,45deg);opacity:0}to{-webkit-transform:translate3d(0,0,0);transform:translateZ(0);opacity:1}}@keyframes rotateInDownRight{0%{-webkit-transform:rotate3d(0,0,1,45deg);transform:rotate3d(0,0,1,45deg);opacity:0}to{-webkit-transform:translate3d(0,0,0);transform:translateZ(0);opacity:1}}.animate__rotateInDownRight{-webkit-animation-name:rotateInDownRight;animation-name:rotateInDownRight;-webkit-transform-origin:right bottom;transform-origin:right bottom}@-webkit-keyframes rotateInUpLeft{0%{-webkit-transform:rotate3d(0,0,1,45deg);transform:rotate3d(0,0,1,45deg);opacity:0}to{-webkit-transform:translate3d(0,0,0);transform:translateZ(0);opacity:1}}@keyframes rotateInUpLeft{0%{-webkit-transform:rotate3d(0,0,1,45deg);transform:rotate3d(0,0,1,45deg);opacity:0}to{-webkit-transform:translate3d(0,0,0);transform:translateZ(0);opacity:1}}.animate__rotateInUpLeft{-webkit-animation-name:rotateInUpLeft;animation-name:rotateInUpLeft;-webkit-transform-origin:left bottom;transform-origin:left bottom}@-webkit-keyframes rotateInUpRight{0%{-webkit-transform:rotate3d(0,0,1,-90deg);transform:rotate3d(0,0,1,-90deg);opacity:0}to{-webkit-transform:translate3d(0,0,0);transform:translateZ(0);opacity:1}}@keyframes rotateInUpRight{0%{-webkit-transform:rotate3d(0,0,1,-90deg);transform:rotate3d(0,0,1,-90deg);opacity:0}to{-webkit-transform:translate3d(0,0,0);transform:translateZ(0);opacity:1}}.animate__rotateInUpRight{-webkit-animation-name:rotateInUpRight;animation-name:rotateInUpRight;-webkit-transform-origin:right bottom;transform-origin:right bottom}@-webkit-keyframes rotateOut{0%{opacity:1}to{-webkit-transform:rotate3d(0,0,1,200deg);transform:rotate3d(0,0,1,200deg);opacity:0}}@keyframes rotateOut{0%{opacity:1}to{-webkit-transform:rotate3d(0,0,1,200deg);transform:rotate3d(0,0,1,200deg);opacity:0}}.animate__rotateOut{-webkit-animation-name:rotateOut;animation-name:rotateOut;-webkit-transform-origin:center;transform-origin:center}@-webkit-keyframes rotateOutDownLeft{0%{opacity:1}to{-webkit-transform:rotate3d(0,0,1,45deg);transform:rotate3d(0,0,1,45deg);opacity:0}}@keyframes rotateOutDownLeft{0%{opacity:1}to{-webkit-transform:rotate3d(0,0,1,45deg);transform:rotate3d(0,0,1,45deg);opacity:0}}.animate__rotateOutDownLeft{-webkit-animation-name:rotateOutDownLeft;animation-name:rotateOutDownLeft;-webkit-transform-origin:left bottom;transform-origin:left bottom}@-webkit-keyframes rotateOutDownRight{0%{opacity:1}to{-webkit-transform:rotate3d(0,0,1,-45deg);transform:rotate3d(0,0,1,-45deg);opacity:0}}@keyframes rotateOutDownRight{0%{opacity:1}to{-webkit-transform:rotate3d(0,0,1,-45deg);transform:rotate3d(0,0,1,-45deg);opacity:0}}.animate__rotateOutDownRight{-webkit-animation-name:rotateOutDownRight;animation-name:rotateOutDownRight;-webkit-transform-origin:right bottom;transform-origin:right bottom}@-webkit-keyframes rotateOutUpLeft{0%{opacity:1}to{-webkit-transform:rotate3d(0,0,1,-45deg);transform:rotate3d(0,0,1,-45deg);opacity:0}}@keyframes rotateOutUpLeft{0%{opacity:1}to{-webkit-transform:rotate3d(0,0,1,-45deg);transform:rotate3d(0,0,1,-45deg);opacity:0}}.animate__rotateOutUpLeft{-webkit-animation-name:rotateOutUpLeft;animation-name:rotateOutUpLeft;-webkit-transform-origin:left bottom;transform-origin:left bottom}@-webkit-keyframes rotateOutUpRight{0%{opacity:1}to{-webkit-transform:rotate3d(0,0,1,90deg);transform:rotate3d(0,0,1,90deg);opacity:0}}@keyframes rotateOutUpRight{0%{opacity:1}to{-webkit-transform:rotate3d(0,0,1,90deg);transform:rotate3d(0,0,1,90deg);opacity:0}}.animate__rotateOutUpRight{-webkit-animation-name:rotateOutUpRight;animation-name:rotateOutUpRight;-webkit-transform-origin:right bottom;transform-origin:right bottom}@-webkit-keyframes hinge{0%{-webkit-animation-timing-function:ease-in-out;animation-timing-function:ease-in-out}20%,60%{-webkit-transform:rotate3d(0,0,1,80deg);transform:rotate3d(0,0,1,80deg);-webkit-animation-timing-function:ease-in-out;animation-timing-function:ease-in-out}40%,80%{-webkit-transform:rotate3d(0,0,1,60deg);transform:rotate3d(0,0,1,60deg);-webkit-animation-timing-function:ease-in-out;animation-timing-function:ease-in-out;opacity:1}to{-webkit-transform:translate3d(0,700px,0);transform:translate3d(0,700px,0);opacity:0}}@keyframes hinge{0%{-webkit-animation-timing-function:ease-in-out;animation-timing-function:ease-in-out}20%,60%{-webkit-transform:rotate3d(0,0,1,80deg);transform:rotate3d(0,0,1,80deg);-webkit-animation-timing-function:ease-in-out;animation-timing-function:ease-in-out}40%,80%{-webkit-transform:rotate3d(0,0,1,60deg);transform:rotate3d(0,0,1,60deg);-webkit-animation-timing-function:ease-in-out;animation-timing-function:ease-in-out;opacity:1}to{-webkit-transform:translate3d(0,700px,0);transform:translate3d(0,700px,0);opacity:0}}.animate__hinge{-webkit-animation-duration:2s;animation-duration:2s;-webkit-animation-duration:calc(var(--animate-duration) * 2);animation-duration:calc(var(--animate-duration) * 2);-webkit-animation-name:hinge;animation-name:hinge;-webkit-transform-origin:top left;transform-origin:top left}@-webkit-keyframes jackInTheBox{0%{opacity:0;-webkit-transform:scale(.1) rotate(30deg);transform:scale(.1) rotate(30deg);-webkit-transform-origin:center bottom;transform-origin:center bottom}50%{-webkit-transform:rotate(-10deg);transform:rotate(-10deg)}70%{-webkit-transform:rotate(3deg);transform:rotate(3deg)}to{opacity:1;-webkit-transform:scale(1);transform:scale(1)}}@keyframes jackInTheBox{0%{opacity:0;-webkit-transform:scale(.1) rotate(30deg);transform:scale(.1) rotate(30deg);-webkit-transform-origin:center bottom;transform-origin:center bottom}50%{-webkit-transform:rotate(-10deg);transform:rotate(-10deg)}70%{-webkit-transform:rotate(3deg);transform:rotate(3deg)}to{opacity:1;-webkit-transform:scale(1);transform:scale(1)}}.animate__jackInTheBox{-webkit-animation-name:jackInTheBox;animation-name:jackInTheBox}@-webkit-keyframes rollIn{0%{opacity:0;-webkit-transform:translate3d(-100%,0,0) rotate3d(0,0,1,-120deg);transform:translate3d(-100%,0,0) rotate3d(0,0,1,-120deg)}to{opacity:1;-webkit-transform:translate3d(0,0,0);transform:translateZ(0)}}@keyframes rollIn{0%{opacity:0;-webkit-transform:translate3d(-100%,0,0) rotate3d(0,0,1,-120deg);transform:translate3d(-100%,0,0) rotate3d(0,0,1,-120deg)}to{opacity:1;-webkit-transform:translate3d(0,0,0);transform:translateZ(0)}}.animate__rollIn{-webkit-animation-name:rollIn;animation-name:rollIn}@-webkit-keyframes rollOut{0%{opacity:1}to{opacity:0;-webkit-transform:translate3d(100%,0,0) rotate3d(0,0,1,120deg);transform:translate3d(100%,0,0) rotate3d(0,0,1,120deg)}}@keyframes rollOut{0%{opacity:1}to{opacity:0;-webkit-transform:translate3d(100%,0,0) rotate3d(0,0,1,120deg);transform:translate3d(100%,0,0) rotate3d(0,0,1,120deg)}}.animate__rollOut{-webkit-animation-name:rollOut;animation-name:rollOut}@-webkit-keyframes zoomIn{0%{opacity:0;-webkit-transform:scale3d(.3,.3,.3);transform:scale3d(.3,.3,.3)}50%{opacity:1}}@keyframes zoomIn{0%{opacity:0;-webkit-transform:scale3d(.3,.3,.3);transform:scale3d(.3,.3,.3)}50%{opacity:1}}.animate__zoomIn{-webkit-animation-name:zoomIn;animation-name:zoomIn}@-webkit-keyframes zoomInDown{0%{opacity:0;-webkit-transform:scale3d(.1,.1,.1) translate3d(0,-1000px,0);transform:scale3d(.1,.1,.1) translate3d(0,-1000px,0);-webkit-animation-timing-function:cubic-bezier(.55,.055,.675,.19);animation-timing-function:cubic-bezier(.55,.055,.675,.19)}60%{opacity:1;-webkit-transform:scale3d(.475,.475,.475) translate3d(0,60px,0);transform:scale3d(.475,.475,.475) translate3d(0,60px,0);-webkit-animation-timing-function:cubic-bezier(.175,.885,.32,1);animation-timing-function:cubic-bezier(.175,.885,.32,1)}}@keyframes zoomInDown{0%{opacity:0;-webkit-transform:scale3d(.1,.1,.1) translate3d(0,-1000px,0);transform:scale3d(.1,.1,.1) translate3d(0,-1000px,0);-webkit-animation-timing-function:cubic-bezier(.55,.055,.675,.19);animation-timing-function:cubic-bezier(.55,.055,.675,.19)}60%{opacity:1;-webkit-transform:scale3d(.475,.475,.475) translate3d(0,60px,0);transform:scale3d(.475,.475,.475) translate3d(0,60px,0);-webkit-animation-timing-function:cubic-bezier(.175,.885,.32,1);animation-timing-function:cubic-bezier(.175,.885,.32,1)}}.animate__zoomInDown{-webkit-animation-name:zoomInDown;animation-name:zoomInDown}@-webkit-keyframes zoomInLeft{0%{opacity:0;-webkit-transform:scale3d(.1,.1,.1) translate3d(-1000px,0,0);transform:scale3d(.1,.1,.1) translate3d(-1000px,0,0);-webkit-animation-timing-function:cubic-bezier(.55,.055,.675,.19);animation-timing-function:cubic-bezier(.55,.055,.675,.19)}60%{opacity:1;-webkit-transform:scale3d(.475,.475,.475) translate3d(10px,0,0);transform:scale3d(.475,.475,.475) translate3d(10px,0,0);-webkit-animation-timing-function:cubic-bezier(.175,.885,.32,1);animation-timing-function:cubic-bezier(.175,.885,.32,1)}}@keyframes zoomInLeft{0%{opacity:0;-webkit-transform:scale3d(.1,.1,.1) translate3d(-1000px,0,0);transform:scale3d(.1,.1,.1) translate3d(-1000px,0,0);-webkit-animation-timing-function:cubic-bezier(.55,.055,.675,.19);animation-timing-function:cubic-bezier(.55,.055,.675,.19)}60%{opacity:1;-webkit-transform:scale3d(.475,.475,.475) translate3d(10px,0,0);transform:scale3d(.475,.475,.475) translate3d(10px,0,0);-webkit-animation-timing-function:cubic-bezier(.175,.885,.32,1);animation-timing-function:cubic-bezier(.175,.885,.32,1)}}.animate__zoomInLeft{-webkit-animation-name:zoomInLeft;animation-name:zoomInLeft}@-webkit-keyframes zoomInRight{0%{opacity:0;-webkit-transform:scale3d(.1,.1,.1) translate3d(1000px,0,0);transform:scale3d(.1,.1,.1) translate3d(1000px,0,0);-webkit-animation-timing-function:cubic-bezier(.55,.055,.675,.19);animation-timing-function:cubic-bezier(.55,.055,.675,.19)}60%{opacity:1;-webkit-transform:scale3d(.475,.475,.475) translate3d(-10px,0,0);transform:scale3d(.475,.475,.475) translate3d(-10px,0,0);-webkit-animation-timing-function:cubic-bezier(.175,.885,.32,1);animation-timing-function:cubic-bezier(.175,.885,.32,1)}}@keyframes zoomInRight{0%{opacity:0;-webkit-transform:scale3d(.1,.1,.1) translate3d(1000px,0,0);transform:scale3d(.1,.1,.1) translate3d(1000px,0,0);-webkit-animation-timing-function:cubic-bezier(.55,.055,.675,.19);animation-timing-function:cubic-bezier(.55,.055,.675,.19)}60%{opacity:1;-webkit-transform:scale3d(.475,.475,.475) translate3d(-10px,0,0);transform:scale3d(.475,.475,.475) translate3d(-10px,0,0);-webkit-animation-timing-function:cubic-bezier(.175,.885,.32,1);animation-timing-function:cubic-bezier(.175,.885,.32,1)}}.animate__zoomInRight{-webkit-animation-name:zoomInRight;animation-name:zoomInRight}@-webkit-keyframes zoomInUp{0%{opacity:0;-webkit-transform:scale3d(.1,.1,.1) translate3d(0,1000px,0);transform:scale3d(.1,.1,.1) translate3d(0,1000px,0);-webkit-animation-timing-function:cubic-bezier(.55,.055,.675,.19);animation-timing-function:cubic-bezier(.55,.055,.675,.19)}60%{opacity:1;-webkit-transform:scale3d(.475,.475,.475) translate3d(0,-60px,0);transform:scale3d(.475,.475,.475) translate3d(0,-60px,0);-webkit-animation-timing-function:cubic-bezier(.175,.885,.32,1);animation-timing-function:cubic-bezier(.175,.885,.32,1)}}@keyframes zoomInUp{0%{opacity:0;-webkit-transform:scale3d(.1,.1,.1) translate3d(0,1000px,0);transform:scale3d(.1,.1,.1) translate3d(0,1000px,0);-webkit-animation-timing-function:cubic-bezier(.55,.055,.675,.19);animation-timing-function:cubic-bezier(.55,.055,.675,.19)}60%{opacity:1;-webkit-transform:scale3d(.475,.475,.475) translate3d(0,-60px,0);transform:scale3d(.475,.475,.475) translate3d(0,-60px,0);-webkit-animation-timing-function:cubic-bezier(.175,.885,.32,1);animation-timing-function:cubic-bezier(.175,.885,.32,1)}}.animate__zoomInUp{-webkit-animation-name:zoomInUp;animation-name:zoomInUp}@-webkit-keyframes zoomOut{0%{opacity:1}50%{opacity:0;-webkit-transform:scale3d(.3,.3,.3);transform:scale3d(.3,.3,.3)}to{opacity:0}}@keyframes zoomOut{0%{opacity:1}50%{opacity:0;-webkit-transform:scale3d(.3,.3,.3);transform:scale3d(.3,.3,.3)}to{opacity:0}}.animate__zoomOut{-webkit-animation-name:zoomOut;animation-name:zoomOut}@-webkit-keyframes zoomOutDown{40%{opacity:1;-webkit-transform:scale3d(.475,.475,.475) translate3d(0,-60px,0);transform:scale3d(.475,.475,.475) translate3d(0,-60px,0);-webkit-animation-timing-function:cubic-bezier(.55,.055,.675,.19);animation-timing-function:cubic-bezier(.55,.055,.675,.19)}to{opacity:0;-webkit-transform:scale3d(.1,.1,.1) translate3d(0,2000px,0);transform:scale3d(.1,.1,.1) translate3d(0,2000px,0);-webkit-animation-timing-function:cubic-bezier(.175,.885,.32,1);animation-timing-function:cubic-bezier(.175,.885,.32,1)}}@keyframes zoomOutDown{40%{opacity:1;-webkit-transform:scale3d(.475,.475,.475) translate3d(0,-60px,0);transform:scale3d(.475,.475,.475) translate3d(0,-60px,0);-webkit-animation-timing-function:cubic-bezier(.55,.055,.675,.19);animation-timing-function:cubic-bezier(.55,.055,.675,.19)}to{opacity:0;-webkit-transform:scale3d(.1,.1,.1) translate3d(0,2000px,0);transform:scale3d(.1,.1,.1) translate3d(0,2000px,0);-webkit-animation-timing-function:cubic-bezier(.175,.885,.32,1);animation-timing-function:cubic-bezier(.175,.885,.32,1)}}.animate__zoomOutDown{-webkit-animation-name:zoomOutDown;animation-name:zoomOutDown;-webkit-transform-origin:center bottom;transform-origin:center bottom}@-webkit-keyframes zoomOutLeft{40%{opacity:1;-webkit-transform:scale3d(.475,.475,.475) translate3d(42px,0,0);transform:scale3d(.475,.475,.475) translate3d(42px,0,0)}to{opacity:0;-webkit-transform:scale(.1) translate3d(-2000px,0,0);transform:scale(.1) translate3d(-2000px,0,0)}}@keyframes zoomOutLeft{40%{opacity:1;-webkit-transform:scale3d(.475,.475,.475) translate3d(42px,0,0);transform:scale3d(.475,.475,.475) translate3d(42px,0,0)}to{opacity:0;-webkit-transform:scale(.1) translate3d(-2000px,0,0);transform:scale(.1) translate3d(-2000px,0,0)}}.animate__zoomOutLeft{-webkit-animation-name:zoomOutLeft;animation-name:zoomOutLeft;-webkit-transform-origin:left center;transform-origin:left center}@-webkit-keyframes zoomOutRight{40%{opacity:1;-webkit-transform:scale3d(.475,.475,.475) translate3d(-42px,0,0);transform:scale3d(.475,.475,.475) translate3d(-42px,0,0)}to{opacity:0;-webkit-transform:scale(.1) translate3d(2000px,0,0);transform:scale(.1) translate3d(2000px,0,0)}}@keyframes zoomOutRight{40%{opacity:1;-webkit-transform:scale3d(.475,.475,.475) translate3d(-42px,0,0);transform:scale3d(.475,.475,.475) translate3d(-42px,0,0)}to{opacity:0;-webkit-transform:scale(.1) translate3d(2000px,0,0);transform:scale(.1) translate3d(2000px,0,0)}}.animate__zoomOutRight{-webkit-animation-name:zoomOutRight;animation-name:zoomOutRight;-webkit-transform-origin:right center;transform-origin:right center}@-webkit-keyframes zoomOutUp{40%{opacity:1;-webkit-transform:scale3d(.475,.475,.475) translate3d(0,60px,0);transform:scale3d(.475,.475,.475) translate3d(0,60px,0);-webkit-animation-timing-function:cubic-bezier(.55,.055,.675,.19);animation-timing-function:cubic-bezier(.55,.055,.675,.19)}to{opacity:0;-webkit-transform:scale3d(.1,.1,.1) translate3d(0,-2000px,0);transform:scale3d(.1,.1,.1) translate3d(0,-2000px,0);-webkit-animation-timing-function:cubic-bezier(.175,.885,.32,1);animation-timing-function:cubic-bezier(.175,.885,.32,1)}}@keyframes zoomOutUp{40%{opacity:1;-webkit-transform:scale3d(.475,.475,.475) translate3d(0,60px,0);transform:scale3d(.475,.475,.475) translate3d(0,60px,0);-webkit-animation-timing-function:cubic-bezier(.55,.055,.675,.19);animation-timing-function:cubic-bezier(.55,.055,.675,.19)}to{opacity:0;-webkit-transform:scale3d(.1,.1,.1) translate3d(0,-2000px,0);transform:scale3d(.1,.1,.1) translate3d(0,-2000px,0);-webkit-animation-timing-function:cubic-bezier(.175,.885,.32,1);animation-timing-function:cubic-bezier(.175,.885,.32,1)}}.animate__zoomOutUp{-webkit-animation-name:zoomOutUp;animation-name:zoomOutUp;-webkit-transform-origin:center bottom;transform-origin:center bottom}@-webkit-keyframes slideInDown{0%{-webkit-transform:translate3d(0,-100%,0);transform:translate3d(0,-100%,0);visibility:visible}to{-webkit-transform:translate3d(0,0,0);transform:translateZ(0)}}@keyframes slideInDown{0%{-webkit-transform:translate3d(0,-100%,0);transform:translate3d(0,-100%,0);visibility:visible}to{-webkit-transform:translate3d(0,0,0);transform:translateZ(0)}}.animate__slideInDown{-webkit-animation-name:slideInDown;animation-name:slideInDown}@-webkit-keyframes slideInLeft{0%{-webkit-transform:translate3d(-100%,0,0);transform:translate3d(-100%,0,0);visibility:visible}to{-webkit-transform:translate3d(0,0,0);transform:translateZ(0)}}@keyframes slideInLeft{0%{-webkit-transform:translate3d(-100%,0,0);transform:translate3d(-100%,0,0);visibility:visible}to{-webkit-transform:translate3d(0,0,0);transform:translateZ(0)}}.animate__slideInLeft{-webkit-animation-name:slideInLeft;animation-name:slideInLeft}@-webkit-keyframes slideInRight{0%{-webkit-transform:translate3d(100%,0,0);transform:translate3d(100%,0,0);visibility:visible}to{-webkit-transform:translate3d(0,0,0);transform:translateZ(0)}}@keyframes slideInRight{0%{-webkit-transform:translate3d(100%,0,0);transform:translate3d(100%,0,0);visibility:visible}to{-webkit-transform:translate3d(0,0,0);transform:translateZ(0)}}.animate__slideInRight{-webkit-animation-name:slideInRight;animation-name:slideInRight}@-webkit-keyframes slideInUp{0%{-webkit-transform:translate3d(0,100%,0);transform:translate3d(0,100%,0);visibility:visible}to{-webkit-transform:translate3d(0,0,0);transform:translateZ(0)}}@keyframes slideInUp{0%{-webkit-transform:translate3d(0,100%,0);transform:translate3d(0,100%,0);visibility:visible}to{-webkit-transform:translate3d(0,0,0);transform:translateZ(0)}}.animate__slideInUp{-webkit-animation-name:slideInUp;animation-name:slideInUp}@-webkit-keyframes slideOutDown{0%{-webkit-transform:translate3d(0,0,0);transform:translateZ(0)}to{visibility:hidden;-webkit-transform:translate3d(0,100%,0);transform:translate3d(0,100%,0)}}@keyframes slideOutDown{0%{-webkit-transform:translate3d(0,0,0);transform:translateZ(0)}to{visibility:hidden;-webkit-transform:translate3d(0,100%,0);transform:translate3d(0,100%,0)}}.animate__slideOutDown{-webkit-animation-name:slideOutDown;animation-name:slideOutDown}@-webkit-keyframes slideOutLeft{0%{-webkit-transform:translate3d(0,0,0);transform:translateZ(0)}to{visibility:hidden;-webkit-transform:translate3d(-100%,0,0);transform:translate3d(-100%,0,0)}}@keyframes slideOutLeft{0%{-webkit-transform:translate3d(0,0,0);transform:translateZ(0)}to{visibility:hidden;-webkit-transform:translate3d(-100%,0,0);transform:translate3d(-100%,0,0)}}.animate__slideOutLeft{-webkit-animation-name:slideOutLeft;animation-name:slideOutLeft}@-webkit-keyframes slideOutRight{0%{-webkit-transform:translate3d(0,0,0);transform:translateZ(0)}to{visibility:hidden;-webkit-transform:translate3d(100%,0,0);transform:translate3d(100%,0,0)}}@keyframes slideOutRight{0%{-webkit-transform:translate3d(0,0,0);transform:translateZ(0)}to{visibility:hidden;-webkit-transform:translate3d(100%,0,0);transform:translate3d(100%,0,0)}}.animate__slideOutRight{-webkit-animation-name:slideOutRight;animation-name:slideOutRight}@-webkit-keyframes slideOutUp{0%{-webkit-transform:translate3d(0,0,0);transform:translateZ(0)}to{visibility:hidden;-webkit-transform:translate3d(0,-100%,0);transform:translate3d(0,-100%,0)}}@keyframes slideOutUp{0%{-webkit-transform:translate3d(0,0,0);transform:translateZ(0)}to{visibility:hidden;-webkit-transform:translate3d(0,-100%,0);transform:translate3d(0,-100%,0)}}.animate__slideOutUp{-webkit-animation-name:slideOutUp;animation-name:slideOutUp}.dropdown-menu[data-v-e53c14b2]{right:1rem;min-width:200px}.dropdown-item.disabled[data-v-e53c14b2],.dropdown-item[data-v-e53c14b2]:disabled{opacity:.7}.slide-fade-leave-active[data-v-4a343fe2],.slide-fade-enter-active[data-v-4a343fe2]{transition:all .2s cubic-bezier(.82,.58,.17,.9)}.slide-fade-enter-from[data-v-4a343fe2],.slide-fade-leave-to[data-v-4a343fe2]{transform:translateY(20px);opacity:0;filter:blur(3px)}.subMenuBtn.active[data-v-4a343fe2]{background-color:#ffffff20}.peerCard[data-v-4a343fe2]{transition:box-shadow .1s cubic-bezier(.82,.58,.17,.9)}.peerCard[data-v-4a343fe2]:hover{box-shadow:var(--bs-box-shadow)!important}.toggleShowKey[data-v-2c571abb]{position:absolute;top:35px;right:12px}.list-move[data-v-6d5fc831],.list-enter-active[data-v-6d5fc831],.list-leave-active[data-v-6d5fc831]{transition:all .3s ease}.list-enter-from[data-v-6d5fc831],.list-leave-to[data-v-6d5fc831]{opacity:0;transform:translateY(10px)}.list-leave-active[data-v-6d5fc831]{position:absolute}.peerSettingContainer[data-v-9235694d]{background-color:#00000060;z-index:9998}div[data-v-9235694d]{transition:.2s ease-in-out}.inactiveField[data-v-9235694d]{opacity:.4}.card[data-v-9235694d]{max-height:100%}.btn.disabled[data-v-6a5aba2a]{opacity:1;background-color:#0d6efd17;border-color:transparent}[data-v-8f3f1b93]{font-size:.875rem}input[data-v-8f3f1b93]{padding:.1rem .4rem}input[data-v-8f3f1b93]:disabled{border-color:transparent;background-color:#0d6efd17;color:#0d6efd}.dp__main[data-v-8f3f1b93]{width:auto;flex-grow:1;--dp-input-padding: 2.5px 30px 2.5px 12px;--dp-border-radius: .5rem}.schedulePeerJobTransition-move[data-v-5bbdd42b],.schedulePeerJobTransition-enter-active[data-v-5bbdd42b],.schedulePeerJobTransition-leave-active[data-v-5bbdd42b]{transition:all .4s cubic-bezier(.82,.58,.17,.9)}.schedulePeerJobTransition-enter-from[data-v-5bbdd42b],.schedulePeerJobTransition-leave-to[data-v-5bbdd42b]{opacity:0;transform:scale(.9)}.schedulePeerJobTransition-leave-active[data-v-5bbdd42b]{position:absolute;width:100%}.peerNav .nav-link[data-v-dc7f794a]{&.active[data-v-dc7f794a]{//background: linear-gradient(var(--degree),var(--brandColor1) var(--distance2),var(--brandColor2) 100%);//color: white;background-color:#efefef}}.pingPlaceholder[data-v-7b32cdf7]{width:100%;height:79.98px}.ping-move[data-v-7b32cdf7],.ping-enter-active[data-v-7b32cdf7],.ping-leave-active[data-v-7b32cdf7]{transition:all .4s cubic-bezier(.82,.58,.17,.9)}.ping-enter-from[data-v-7b32cdf7],.ping-leave-to[data-v-7b32cdf7]{opacity:0;//transform: scale(.9)}.ping-leave-active[data-v-7b32cdf7]{position:absolute}.pingPlaceholder[data-v-606c2c93]{width:100%;height:40px}.ping-move[data-v-606c2c93],.ping-enter-active[data-v-606c2c93],.ping-leave-active[data-v-606c2c93]{transition:all .4s cubic-bezier(.82,.58,.17,.9)}.ping-enter-from[data-v-606c2c93],.ping-leave-to[data-v-606c2c93]{opacity:0;//transform: scale(.9)}.ping-leave-active[data-v-606c2c93]{position:absolute}table th[data-v-606c2c93],table td[data-v-606c2c93]{padding:.9rem}table tbody[data-v-606c2c93]{border-top:1em solid transparent}.table[data-v-606c2c93]>:not(caption)>*>*{background-color:transparent!important}.animate__fadeInUp[data-v-1b44aacd]{animation-timing-function:cubic-bezier(.42,0,.22,1)}.app-enter-active[data-v-822f113b],.app-leave-active[data-v-822f113b]{transition:all .3s cubic-bezier(.82,.58,.17,.9)}.app-enter-from[data-v-822f113b]{transform:translateY(20px);opacity:0}.app-leave-to[data-v-822f113b]{transform:translateY(-20px);opacity:0}@media screen and (min-width: 768px){.navbarBtn[data-v-822f113b]{display:none}} + */:root{--animate-duration: 1s;--animate-delay: 1s;--animate-repeat: 1}.animate__animated{-webkit-animation-duration:1s;animation-duration:1s;-webkit-animation-duration:var(--animate-duration);animation-duration:var(--animate-duration);-webkit-animation-fill-mode:both;animation-fill-mode:both}.animate__animated.animate__infinite{-webkit-animation-iteration-count:infinite;animation-iteration-count:infinite}.animate__animated.animate__repeat-1{-webkit-animation-iteration-count:1;animation-iteration-count:1;-webkit-animation-iteration-count:var(--animate-repeat);animation-iteration-count:var(--animate-repeat)}.animate__animated.animate__repeat-2{-webkit-animation-iteration-count:2;animation-iteration-count:2;-webkit-animation-iteration-count:calc(var(--animate-repeat) * 2);animation-iteration-count:calc(var(--animate-repeat) * 2)}.animate__animated.animate__repeat-3{-webkit-animation-iteration-count:3;animation-iteration-count:3;-webkit-animation-iteration-count:calc(var(--animate-repeat) * 3);animation-iteration-count:calc(var(--animate-repeat) * 3)}.animate__animated.animate__delay-1s{-webkit-animation-delay:1s;animation-delay:1s;-webkit-animation-delay:var(--animate-delay);animation-delay:var(--animate-delay)}.animate__animated.animate__delay-2s{-webkit-animation-delay:2s;animation-delay:2s;-webkit-animation-delay:calc(var(--animate-delay) * 2);animation-delay:calc(var(--animate-delay) * 2)}.animate__animated.animate__delay-3s{-webkit-animation-delay:3s;animation-delay:3s;-webkit-animation-delay:calc(var(--animate-delay) * 3);animation-delay:calc(var(--animate-delay) * 3)}.animate__animated.animate__delay-4s{-webkit-animation-delay:4s;animation-delay:4s;-webkit-animation-delay:calc(var(--animate-delay) * 4);animation-delay:calc(var(--animate-delay) * 4)}.animate__animated.animate__delay-5s{-webkit-animation-delay:5s;animation-delay:5s;-webkit-animation-delay:calc(var(--animate-delay) * 5);animation-delay:calc(var(--animate-delay) * 5)}.animate__animated.animate__faster{-webkit-animation-duration:.5s;animation-duration:.5s;-webkit-animation-duration:calc(var(--animate-duration) / 2);animation-duration:calc(var(--animate-duration) / 2)}.animate__animated.animate__fast{-webkit-animation-duration:.8s;animation-duration:.8s;-webkit-animation-duration:calc(var(--animate-duration) * .8);animation-duration:calc(var(--animate-duration) * .8)}.animate__animated.animate__slow{-webkit-animation-duration:2s;animation-duration:2s;-webkit-animation-duration:calc(var(--animate-duration) * 2);animation-duration:calc(var(--animate-duration) * 2)}.animate__animated.animate__slower{-webkit-animation-duration:3s;animation-duration:3s;-webkit-animation-duration:calc(var(--animate-duration) * 3);animation-duration:calc(var(--animate-duration) * 3)}@media print,(prefers-reduced-motion: reduce){.animate__animated{-webkit-animation-duration:1ms!important;animation-duration:1ms!important;-webkit-transition-duration:1ms!important;transition-duration:1ms!important;-webkit-animation-iteration-count:1!important;animation-iteration-count:1!important}.animate__animated[class*=Out]{opacity:0}}@-webkit-keyframes bounce{0%,20%,53%,to{-webkit-animation-timing-function:cubic-bezier(.215,.61,.355,1);animation-timing-function:cubic-bezier(.215,.61,.355,1);-webkit-transform:translate3d(0,0,0);transform:translateZ(0)}40%,43%{-webkit-animation-timing-function:cubic-bezier(.755,.05,.855,.06);animation-timing-function:cubic-bezier(.755,.05,.855,.06);-webkit-transform:translate3d(0,-30px,0) scaleY(1.1);transform:translate3d(0,-30px,0) scaleY(1.1)}70%{-webkit-animation-timing-function:cubic-bezier(.755,.05,.855,.06);animation-timing-function:cubic-bezier(.755,.05,.855,.06);-webkit-transform:translate3d(0,-15px,0) scaleY(1.05);transform:translate3d(0,-15px,0) scaleY(1.05)}80%{-webkit-transition-timing-function:cubic-bezier(.215,.61,.355,1);transition-timing-function:cubic-bezier(.215,.61,.355,1);-webkit-transform:translate3d(0,0,0) scaleY(.95);transform:translateZ(0) scaleY(.95)}90%{-webkit-transform:translate3d(0,-4px,0) scaleY(1.02);transform:translate3d(0,-4px,0) scaleY(1.02)}}@keyframes bounce{0%,20%,53%,to{-webkit-animation-timing-function:cubic-bezier(.215,.61,.355,1);animation-timing-function:cubic-bezier(.215,.61,.355,1);-webkit-transform:translate3d(0,0,0);transform:translateZ(0)}40%,43%{-webkit-animation-timing-function:cubic-bezier(.755,.05,.855,.06);animation-timing-function:cubic-bezier(.755,.05,.855,.06);-webkit-transform:translate3d(0,-30px,0) scaleY(1.1);transform:translate3d(0,-30px,0) scaleY(1.1)}70%{-webkit-animation-timing-function:cubic-bezier(.755,.05,.855,.06);animation-timing-function:cubic-bezier(.755,.05,.855,.06);-webkit-transform:translate3d(0,-15px,0) scaleY(1.05);transform:translate3d(0,-15px,0) scaleY(1.05)}80%{-webkit-transition-timing-function:cubic-bezier(.215,.61,.355,1);transition-timing-function:cubic-bezier(.215,.61,.355,1);-webkit-transform:translate3d(0,0,0) scaleY(.95);transform:translateZ(0) scaleY(.95)}90%{-webkit-transform:translate3d(0,-4px,0) scaleY(1.02);transform:translate3d(0,-4px,0) scaleY(1.02)}}.animate__bounce{-webkit-animation-name:bounce;animation-name:bounce;-webkit-transform-origin:center bottom;transform-origin:center bottom}@-webkit-keyframes flash{0%,50%,to{opacity:1}25%,75%{opacity:0}}@keyframes flash{0%,50%,to{opacity:1}25%,75%{opacity:0}}.animate__flash{-webkit-animation-name:flash;animation-name:flash}@-webkit-keyframes pulse{0%{-webkit-transform:scale3d(1,1,1);transform:scaleZ(1)}50%{-webkit-transform:scale3d(1.05,1.05,1.05);transform:scale3d(1.05,1.05,1.05)}to{-webkit-transform:scale3d(1,1,1);transform:scaleZ(1)}}@keyframes pulse{0%{-webkit-transform:scale3d(1,1,1);transform:scaleZ(1)}50%{-webkit-transform:scale3d(1.05,1.05,1.05);transform:scale3d(1.05,1.05,1.05)}to{-webkit-transform:scale3d(1,1,1);transform:scaleZ(1)}}.animate__pulse{-webkit-animation-name:pulse;animation-name:pulse;-webkit-animation-timing-function:ease-in-out;animation-timing-function:ease-in-out}@-webkit-keyframes rubberBand{0%{-webkit-transform:scale3d(1,1,1);transform:scaleZ(1)}30%{-webkit-transform:scale3d(1.25,.75,1);transform:scale3d(1.25,.75,1)}40%{-webkit-transform:scale3d(.75,1.25,1);transform:scale3d(.75,1.25,1)}50%{-webkit-transform:scale3d(1.15,.85,1);transform:scale3d(1.15,.85,1)}65%{-webkit-transform:scale3d(.95,1.05,1);transform:scale3d(.95,1.05,1)}75%{-webkit-transform:scale3d(1.05,.95,1);transform:scale3d(1.05,.95,1)}to{-webkit-transform:scale3d(1,1,1);transform:scaleZ(1)}}@keyframes rubberBand{0%{-webkit-transform:scale3d(1,1,1);transform:scaleZ(1)}30%{-webkit-transform:scale3d(1.25,.75,1);transform:scale3d(1.25,.75,1)}40%{-webkit-transform:scale3d(.75,1.25,1);transform:scale3d(.75,1.25,1)}50%{-webkit-transform:scale3d(1.15,.85,1);transform:scale3d(1.15,.85,1)}65%{-webkit-transform:scale3d(.95,1.05,1);transform:scale3d(.95,1.05,1)}75%{-webkit-transform:scale3d(1.05,.95,1);transform:scale3d(1.05,.95,1)}to{-webkit-transform:scale3d(1,1,1);transform:scaleZ(1)}}.animate__rubberBand{-webkit-animation-name:rubberBand;animation-name:rubberBand}@-webkit-keyframes shakeX{0%,to{-webkit-transform:translate3d(0,0,0);transform:translateZ(0)}10%,30%,50%,70%,90%{-webkit-transform:translate3d(-10px,0,0);transform:translate3d(-10px,0,0)}20%,40%,60%,80%{-webkit-transform:translate3d(10px,0,0);transform:translate3d(10px,0,0)}}@keyframes shakeX{0%,to{-webkit-transform:translate3d(0,0,0);transform:translateZ(0)}10%,30%,50%,70%,90%{-webkit-transform:translate3d(-10px,0,0);transform:translate3d(-10px,0,0)}20%,40%,60%,80%{-webkit-transform:translate3d(10px,0,0);transform:translate3d(10px,0,0)}}.animate__shakeX{-webkit-animation-name:shakeX;animation-name:shakeX}@-webkit-keyframes shakeY{0%,to{-webkit-transform:translate3d(0,0,0);transform:translateZ(0)}10%,30%,50%,70%,90%{-webkit-transform:translate3d(0,-10px,0);transform:translate3d(0,-10px,0)}20%,40%,60%,80%{-webkit-transform:translate3d(0,10px,0);transform:translate3d(0,10px,0)}}@keyframes shakeY{0%,to{-webkit-transform:translate3d(0,0,0);transform:translateZ(0)}10%,30%,50%,70%,90%{-webkit-transform:translate3d(0,-10px,0);transform:translate3d(0,-10px,0)}20%,40%,60%,80%{-webkit-transform:translate3d(0,10px,0);transform:translate3d(0,10px,0)}}.animate__shakeY{-webkit-animation-name:shakeY;animation-name:shakeY}@-webkit-keyframes headShake{0%{-webkit-transform:translateX(0);transform:translate(0)}6.5%{-webkit-transform:translateX(-6px) rotateY(-9deg);transform:translate(-6px) rotateY(-9deg)}18.5%{-webkit-transform:translateX(5px) rotateY(7deg);transform:translate(5px) rotateY(7deg)}31.5%{-webkit-transform:translateX(-3px) rotateY(-5deg);transform:translate(-3px) rotateY(-5deg)}43.5%{-webkit-transform:translateX(2px) rotateY(3deg);transform:translate(2px) rotateY(3deg)}50%{-webkit-transform:translateX(0);transform:translate(0)}}@keyframes headShake{0%{-webkit-transform:translateX(0);transform:translate(0)}6.5%{-webkit-transform:translateX(-6px) rotateY(-9deg);transform:translate(-6px) rotateY(-9deg)}18.5%{-webkit-transform:translateX(5px) rotateY(7deg);transform:translate(5px) rotateY(7deg)}31.5%{-webkit-transform:translateX(-3px) rotateY(-5deg);transform:translate(-3px) rotateY(-5deg)}43.5%{-webkit-transform:translateX(2px) rotateY(3deg);transform:translate(2px) rotateY(3deg)}50%{-webkit-transform:translateX(0);transform:translate(0)}}.animate__headShake{-webkit-animation-timing-function:ease-in-out;animation-timing-function:ease-in-out;-webkit-animation-name:headShake;animation-name:headShake}@-webkit-keyframes swing{20%{-webkit-transform:rotate3d(0,0,1,15deg);transform:rotate3d(0,0,1,15deg)}40%{-webkit-transform:rotate3d(0,0,1,-10deg);transform:rotate3d(0,0,1,-10deg)}60%{-webkit-transform:rotate3d(0,0,1,5deg);transform:rotate3d(0,0,1,5deg)}80%{-webkit-transform:rotate3d(0,0,1,-5deg);transform:rotate3d(0,0,1,-5deg)}to{-webkit-transform:rotate3d(0,0,1,0deg);transform:rotate3d(0,0,1,0)}}@keyframes swing{20%{-webkit-transform:rotate3d(0,0,1,15deg);transform:rotate3d(0,0,1,15deg)}40%{-webkit-transform:rotate3d(0,0,1,-10deg);transform:rotate3d(0,0,1,-10deg)}60%{-webkit-transform:rotate3d(0,0,1,5deg);transform:rotate3d(0,0,1,5deg)}80%{-webkit-transform:rotate3d(0,0,1,-5deg);transform:rotate3d(0,0,1,-5deg)}to{-webkit-transform:rotate3d(0,0,1,0deg);transform:rotate3d(0,0,1,0)}}.animate__swing{-webkit-transform-origin:top center;transform-origin:top center;-webkit-animation-name:swing;animation-name:swing}@-webkit-keyframes tada{0%{-webkit-transform:scale3d(1,1,1);transform:scaleZ(1)}10%,20%{-webkit-transform:scale3d(.9,.9,.9) rotate3d(0,0,1,-3deg);transform:scale3d(.9,.9,.9) rotate3d(0,0,1,-3deg)}30%,50%,70%,90%{-webkit-transform:scale3d(1.1,1.1,1.1) rotate3d(0,0,1,3deg);transform:scale3d(1.1,1.1,1.1) rotate3d(0,0,1,3deg)}40%,60%,80%{-webkit-transform:scale3d(1.1,1.1,1.1) rotate3d(0,0,1,-3deg);transform:scale3d(1.1,1.1,1.1) rotate3d(0,0,1,-3deg)}to{-webkit-transform:scale3d(1,1,1);transform:scaleZ(1)}}@keyframes tada{0%{-webkit-transform:scale3d(1,1,1);transform:scaleZ(1)}10%,20%{-webkit-transform:scale3d(.9,.9,.9) rotate3d(0,0,1,-3deg);transform:scale3d(.9,.9,.9) rotate3d(0,0,1,-3deg)}30%,50%,70%,90%{-webkit-transform:scale3d(1.1,1.1,1.1) rotate3d(0,0,1,3deg);transform:scale3d(1.1,1.1,1.1) rotate3d(0,0,1,3deg)}40%,60%,80%{-webkit-transform:scale3d(1.1,1.1,1.1) rotate3d(0,0,1,-3deg);transform:scale3d(1.1,1.1,1.1) rotate3d(0,0,1,-3deg)}to{-webkit-transform:scale3d(1,1,1);transform:scaleZ(1)}}.animate__tada{-webkit-animation-name:tada;animation-name:tada}@-webkit-keyframes wobble{0%{-webkit-transform:translate3d(0,0,0);transform:translateZ(0)}15%{-webkit-transform:translate3d(-25%,0,0) rotate3d(0,0,1,-5deg);transform:translate3d(-25%,0,0) rotate3d(0,0,1,-5deg)}30%{-webkit-transform:translate3d(20%,0,0) rotate3d(0,0,1,3deg);transform:translate3d(20%,0,0) rotate3d(0,0,1,3deg)}45%{-webkit-transform:translate3d(-15%,0,0) rotate3d(0,0,1,-3deg);transform:translate3d(-15%,0,0) rotate3d(0,0,1,-3deg)}60%{-webkit-transform:translate3d(10%,0,0) rotate3d(0,0,1,2deg);transform:translate3d(10%,0,0) rotate3d(0,0,1,2deg)}75%{-webkit-transform:translate3d(-5%,0,0) rotate3d(0,0,1,-1deg);transform:translate3d(-5%,0,0) rotate3d(0,0,1,-1deg)}to{-webkit-transform:translate3d(0,0,0);transform:translateZ(0)}}@keyframes wobble{0%{-webkit-transform:translate3d(0,0,0);transform:translateZ(0)}15%{-webkit-transform:translate3d(-25%,0,0) rotate3d(0,0,1,-5deg);transform:translate3d(-25%,0,0) rotate3d(0,0,1,-5deg)}30%{-webkit-transform:translate3d(20%,0,0) rotate3d(0,0,1,3deg);transform:translate3d(20%,0,0) rotate3d(0,0,1,3deg)}45%{-webkit-transform:translate3d(-15%,0,0) rotate3d(0,0,1,-3deg);transform:translate3d(-15%,0,0) rotate3d(0,0,1,-3deg)}60%{-webkit-transform:translate3d(10%,0,0) rotate3d(0,0,1,2deg);transform:translate3d(10%,0,0) rotate3d(0,0,1,2deg)}75%{-webkit-transform:translate3d(-5%,0,0) rotate3d(0,0,1,-1deg);transform:translate3d(-5%,0,0) rotate3d(0,0,1,-1deg)}to{-webkit-transform:translate3d(0,0,0);transform:translateZ(0)}}.animate__wobble{-webkit-animation-name:wobble;animation-name:wobble}@-webkit-keyframes jello{0%,11.1%,to{-webkit-transform:translate3d(0,0,0);transform:translateZ(0)}22.2%{-webkit-transform:skewX(-12.5deg) skewY(-12.5deg);transform:skew(-12.5deg) skewY(-12.5deg)}33.3%{-webkit-transform:skewX(6.25deg) skewY(6.25deg);transform:skew(6.25deg) skewY(6.25deg)}44.4%{-webkit-transform:skewX(-3.125deg) skewY(-3.125deg);transform:skew(-3.125deg) skewY(-3.125deg)}55.5%{-webkit-transform:skewX(1.5625deg) skewY(1.5625deg);transform:skew(1.5625deg) skewY(1.5625deg)}66.6%{-webkit-transform:skewX(-.78125deg) skewY(-.78125deg);transform:skew(-.78125deg) skewY(-.78125deg)}77.7%{-webkit-transform:skewX(.390625deg) skewY(.390625deg);transform:skew(.390625deg) skewY(.390625deg)}88.8%{-webkit-transform:skewX(-.1953125deg) skewY(-.1953125deg);transform:skew(-.1953125deg) skewY(-.1953125deg)}}@keyframes jello{0%,11.1%,to{-webkit-transform:translate3d(0,0,0);transform:translateZ(0)}22.2%{-webkit-transform:skewX(-12.5deg) skewY(-12.5deg);transform:skew(-12.5deg) skewY(-12.5deg)}33.3%{-webkit-transform:skewX(6.25deg) skewY(6.25deg);transform:skew(6.25deg) skewY(6.25deg)}44.4%{-webkit-transform:skewX(-3.125deg) skewY(-3.125deg);transform:skew(-3.125deg) skewY(-3.125deg)}55.5%{-webkit-transform:skewX(1.5625deg) skewY(1.5625deg);transform:skew(1.5625deg) skewY(1.5625deg)}66.6%{-webkit-transform:skewX(-.78125deg) skewY(-.78125deg);transform:skew(-.78125deg) skewY(-.78125deg)}77.7%{-webkit-transform:skewX(.390625deg) skewY(.390625deg);transform:skew(.390625deg) skewY(.390625deg)}88.8%{-webkit-transform:skewX(-.1953125deg) skewY(-.1953125deg);transform:skew(-.1953125deg) skewY(-.1953125deg)}}.animate__jello{-webkit-animation-name:jello;animation-name:jello;-webkit-transform-origin:center;transform-origin:center}@-webkit-keyframes heartBeat{0%{-webkit-transform:scale(1);transform:scale(1)}14%{-webkit-transform:scale(1.3);transform:scale(1.3)}28%{-webkit-transform:scale(1);transform:scale(1)}42%{-webkit-transform:scale(1.3);transform:scale(1.3)}70%{-webkit-transform:scale(1);transform:scale(1)}}@keyframes heartBeat{0%{-webkit-transform:scale(1);transform:scale(1)}14%{-webkit-transform:scale(1.3);transform:scale(1.3)}28%{-webkit-transform:scale(1);transform:scale(1)}42%{-webkit-transform:scale(1.3);transform:scale(1.3)}70%{-webkit-transform:scale(1);transform:scale(1)}}.animate__heartBeat{-webkit-animation-name:heartBeat;animation-name:heartBeat;-webkit-animation-duration:1.3s;animation-duration:1.3s;-webkit-animation-duration:calc(var(--animate-duration) * 1.3);animation-duration:calc(var(--animate-duration) * 1.3);-webkit-animation-timing-function:ease-in-out;animation-timing-function:ease-in-out}@-webkit-keyframes backInDown{0%{-webkit-transform:translateY(-1200px) scale(.7);transform:translateY(-1200px) scale(.7);opacity:.7}80%{-webkit-transform:translateY(0px) scale(.7);transform:translateY(0) scale(.7);opacity:.7}to{-webkit-transform:scale(1);transform:scale(1);opacity:1}}@keyframes backInDown{0%{-webkit-transform:translateY(-1200px) scale(.7);transform:translateY(-1200px) scale(.7);opacity:.7}80%{-webkit-transform:translateY(0px) scale(.7);transform:translateY(0) scale(.7);opacity:.7}to{-webkit-transform:scale(1);transform:scale(1);opacity:1}}.animate__backInDown{-webkit-animation-name:backInDown;animation-name:backInDown}@-webkit-keyframes backInLeft{0%{-webkit-transform:translateX(-2000px) scale(.7);transform:translate(-2000px) scale(.7);opacity:.7}80%{-webkit-transform:translateX(0px) scale(.7);transform:translate(0) scale(.7);opacity:.7}to{-webkit-transform:scale(1);transform:scale(1);opacity:1}}@keyframes backInLeft{0%{-webkit-transform:translateX(-2000px) scale(.7);transform:translate(-2000px) scale(.7);opacity:.7}80%{-webkit-transform:translateX(0px) scale(.7);transform:translate(0) scale(.7);opacity:.7}to{-webkit-transform:scale(1);transform:scale(1);opacity:1}}.animate__backInLeft{-webkit-animation-name:backInLeft;animation-name:backInLeft}@-webkit-keyframes backInRight{0%{-webkit-transform:translateX(2000px) scale(.7);transform:translate(2000px) scale(.7);opacity:.7}80%{-webkit-transform:translateX(0px) scale(.7);transform:translate(0) scale(.7);opacity:.7}to{-webkit-transform:scale(1);transform:scale(1);opacity:1}}@keyframes backInRight{0%{-webkit-transform:translateX(2000px) scale(.7);transform:translate(2000px) scale(.7);opacity:.7}80%{-webkit-transform:translateX(0px) scale(.7);transform:translate(0) scale(.7);opacity:.7}to{-webkit-transform:scale(1);transform:scale(1);opacity:1}}.animate__backInRight{-webkit-animation-name:backInRight;animation-name:backInRight}@-webkit-keyframes backInUp{0%{-webkit-transform:translateY(1200px) scale(.7);transform:translateY(1200px) scale(.7);opacity:.7}80%{-webkit-transform:translateY(0px) scale(.7);transform:translateY(0) scale(.7);opacity:.7}to{-webkit-transform:scale(1);transform:scale(1);opacity:1}}@keyframes backInUp{0%{-webkit-transform:translateY(1200px) scale(.7);transform:translateY(1200px) scale(.7);opacity:.7}80%{-webkit-transform:translateY(0px) scale(.7);transform:translateY(0) scale(.7);opacity:.7}to{-webkit-transform:scale(1);transform:scale(1);opacity:1}}.animate__backInUp{-webkit-animation-name:backInUp;animation-name:backInUp}@-webkit-keyframes backOutDown{0%{-webkit-transform:scale(1);transform:scale(1);opacity:1}20%{-webkit-transform:translateY(0px) scale(.7);transform:translateY(0) scale(.7);opacity:.7}to{-webkit-transform:translateY(700px) scale(.7);transform:translateY(700px) scale(.7);opacity:.7}}@keyframes backOutDown{0%{-webkit-transform:scale(1);transform:scale(1);opacity:1}20%{-webkit-transform:translateY(0px) scale(.7);transform:translateY(0) scale(.7);opacity:.7}to{-webkit-transform:translateY(700px) scale(.7);transform:translateY(700px) scale(.7);opacity:.7}}.animate__backOutDown{-webkit-animation-name:backOutDown;animation-name:backOutDown}@-webkit-keyframes backOutLeft{0%{-webkit-transform:scale(1);transform:scale(1);opacity:1}20%{-webkit-transform:translateX(0px) scale(.7);transform:translate(0) scale(.7);opacity:.7}to{-webkit-transform:translateX(-2000px) scale(.7);transform:translate(-2000px) scale(.7);opacity:.7}}@keyframes backOutLeft{0%{-webkit-transform:scale(1);transform:scale(1);opacity:1}20%{-webkit-transform:translateX(0px) scale(.7);transform:translate(0) scale(.7);opacity:.7}to{-webkit-transform:translateX(-2000px) scale(.7);transform:translate(-2000px) scale(.7);opacity:.7}}.animate__backOutLeft{-webkit-animation-name:backOutLeft;animation-name:backOutLeft}@-webkit-keyframes backOutRight{0%{-webkit-transform:scale(1);transform:scale(1);opacity:1}20%{-webkit-transform:translateX(0px) scale(.7);transform:translate(0) scale(.7);opacity:.7}to{-webkit-transform:translateX(2000px) scale(.7);transform:translate(2000px) scale(.7);opacity:.7}}@keyframes backOutRight{0%{-webkit-transform:scale(1);transform:scale(1);opacity:1}20%{-webkit-transform:translateX(0px) scale(.7);transform:translate(0) scale(.7);opacity:.7}to{-webkit-transform:translateX(2000px) scale(.7);transform:translate(2000px) scale(.7);opacity:.7}}.animate__backOutRight{-webkit-animation-name:backOutRight;animation-name:backOutRight}@-webkit-keyframes backOutUp{0%{-webkit-transform:scale(1);transform:scale(1);opacity:1}20%{-webkit-transform:translateY(0px) scale(.7);transform:translateY(0) scale(.7);opacity:.7}to{-webkit-transform:translateY(-700px) scale(.7);transform:translateY(-700px) scale(.7);opacity:.7}}@keyframes backOutUp{0%{-webkit-transform:scale(1);transform:scale(1);opacity:1}20%{-webkit-transform:translateY(0px) scale(.7);transform:translateY(0) scale(.7);opacity:.7}to{-webkit-transform:translateY(-700px) scale(.7);transform:translateY(-700px) scale(.7);opacity:.7}}.animate__backOutUp{-webkit-animation-name:backOutUp;animation-name:backOutUp}@-webkit-keyframes bounceIn{0%,20%,40%,60%,80%,to{-webkit-animation-timing-function:cubic-bezier(.215,.61,.355,1);animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{opacity:0;-webkit-transform:scale3d(.3,.3,.3);transform:scale3d(.3,.3,.3)}20%{-webkit-transform:scale3d(1.1,1.1,1.1);transform:scale3d(1.1,1.1,1.1)}40%{-webkit-transform:scale3d(.9,.9,.9);transform:scale3d(.9,.9,.9)}60%{opacity:1;-webkit-transform:scale3d(1.03,1.03,1.03);transform:scale3d(1.03,1.03,1.03)}80%{-webkit-transform:scale3d(.97,.97,.97);transform:scale3d(.97,.97,.97)}to{opacity:1;-webkit-transform:scale3d(1,1,1);transform:scaleZ(1)}}@keyframes bounceIn{0%,20%,40%,60%,80%,to{-webkit-animation-timing-function:cubic-bezier(.215,.61,.355,1);animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{opacity:0;-webkit-transform:scale3d(.3,.3,.3);transform:scale3d(.3,.3,.3)}20%{-webkit-transform:scale3d(1.1,1.1,1.1);transform:scale3d(1.1,1.1,1.1)}40%{-webkit-transform:scale3d(.9,.9,.9);transform:scale3d(.9,.9,.9)}60%{opacity:1;-webkit-transform:scale3d(1.03,1.03,1.03);transform:scale3d(1.03,1.03,1.03)}80%{-webkit-transform:scale3d(.97,.97,.97);transform:scale3d(.97,.97,.97)}to{opacity:1;-webkit-transform:scale3d(1,1,1);transform:scaleZ(1)}}.animate__bounceIn{-webkit-animation-duration:.75s;animation-duration:.75s;-webkit-animation-duration:calc(var(--animate-duration) * .75);animation-duration:calc(var(--animate-duration) * .75);-webkit-animation-name:bounceIn;animation-name:bounceIn}@-webkit-keyframes bounceInDown{0%,60%,75%,90%,to{-webkit-animation-timing-function:cubic-bezier(.215,.61,.355,1);animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{opacity:0;-webkit-transform:translate3d(0,-3000px,0) scaleY(3);transform:translate3d(0,-3000px,0) scaleY(3)}60%{opacity:1;-webkit-transform:translate3d(0,25px,0) scaleY(.9);transform:translate3d(0,25px,0) scaleY(.9)}75%{-webkit-transform:translate3d(0,-10px,0) scaleY(.95);transform:translate3d(0,-10px,0) scaleY(.95)}90%{-webkit-transform:translate3d(0,5px,0) scaleY(.985);transform:translate3d(0,5px,0) scaleY(.985)}to{-webkit-transform:translate3d(0,0,0);transform:translateZ(0)}}@keyframes bounceInDown{0%,60%,75%,90%,to{-webkit-animation-timing-function:cubic-bezier(.215,.61,.355,1);animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{opacity:0;-webkit-transform:translate3d(0,-3000px,0) scaleY(3);transform:translate3d(0,-3000px,0) scaleY(3)}60%{opacity:1;-webkit-transform:translate3d(0,25px,0) scaleY(.9);transform:translate3d(0,25px,0) scaleY(.9)}75%{-webkit-transform:translate3d(0,-10px,0) scaleY(.95);transform:translate3d(0,-10px,0) scaleY(.95)}90%{-webkit-transform:translate3d(0,5px,0) scaleY(.985);transform:translate3d(0,5px,0) scaleY(.985)}to{-webkit-transform:translate3d(0,0,0);transform:translateZ(0)}}.animate__bounceInDown{-webkit-animation-name:bounceInDown;animation-name:bounceInDown}@-webkit-keyframes bounceInLeft{0%,60%,75%,90%,to{-webkit-animation-timing-function:cubic-bezier(.215,.61,.355,1);animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{opacity:0;-webkit-transform:translate3d(-3000px,0,0) scaleX(3);transform:translate3d(-3000px,0,0) scaleX(3)}60%{opacity:1;-webkit-transform:translate3d(25px,0,0) scaleX(1);transform:translate3d(25px,0,0) scaleX(1)}75%{-webkit-transform:translate3d(-10px,0,0) scaleX(.98);transform:translate3d(-10px,0,0) scaleX(.98)}90%{-webkit-transform:translate3d(5px,0,0) scaleX(.995);transform:translate3d(5px,0,0) scaleX(.995)}to{-webkit-transform:translate3d(0,0,0);transform:translateZ(0)}}@keyframes bounceInLeft{0%,60%,75%,90%,to{-webkit-animation-timing-function:cubic-bezier(.215,.61,.355,1);animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{opacity:0;-webkit-transform:translate3d(-3000px,0,0) scaleX(3);transform:translate3d(-3000px,0,0) scaleX(3)}60%{opacity:1;-webkit-transform:translate3d(25px,0,0) scaleX(1);transform:translate3d(25px,0,0) scaleX(1)}75%{-webkit-transform:translate3d(-10px,0,0) scaleX(.98);transform:translate3d(-10px,0,0) scaleX(.98)}90%{-webkit-transform:translate3d(5px,0,0) scaleX(.995);transform:translate3d(5px,0,0) scaleX(.995)}to{-webkit-transform:translate3d(0,0,0);transform:translateZ(0)}}.animate__bounceInLeft{-webkit-animation-name:bounceInLeft;animation-name:bounceInLeft}@-webkit-keyframes bounceInRight{0%,60%,75%,90%,to{-webkit-animation-timing-function:cubic-bezier(.215,.61,.355,1);animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{opacity:0;-webkit-transform:translate3d(3000px,0,0) scaleX(3);transform:translate3d(3000px,0,0) scaleX(3)}60%{opacity:1;-webkit-transform:translate3d(-25px,0,0) scaleX(1);transform:translate3d(-25px,0,0) scaleX(1)}75%{-webkit-transform:translate3d(10px,0,0) scaleX(.98);transform:translate3d(10px,0,0) scaleX(.98)}90%{-webkit-transform:translate3d(-5px,0,0) scaleX(.995);transform:translate3d(-5px,0,0) scaleX(.995)}to{-webkit-transform:translate3d(0,0,0);transform:translateZ(0)}}@keyframes bounceInRight{0%,60%,75%,90%,to{-webkit-animation-timing-function:cubic-bezier(.215,.61,.355,1);animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{opacity:0;-webkit-transform:translate3d(3000px,0,0) scaleX(3);transform:translate3d(3000px,0,0) scaleX(3)}60%{opacity:1;-webkit-transform:translate3d(-25px,0,0) scaleX(1);transform:translate3d(-25px,0,0) scaleX(1)}75%{-webkit-transform:translate3d(10px,0,0) scaleX(.98);transform:translate3d(10px,0,0) scaleX(.98)}90%{-webkit-transform:translate3d(-5px,0,0) scaleX(.995);transform:translate3d(-5px,0,0) scaleX(.995)}to{-webkit-transform:translate3d(0,0,0);transform:translateZ(0)}}.animate__bounceInRight{-webkit-animation-name:bounceInRight;animation-name:bounceInRight}@-webkit-keyframes bounceInUp{0%,60%,75%,90%,to{-webkit-animation-timing-function:cubic-bezier(.215,.61,.355,1);animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{opacity:0;-webkit-transform:translate3d(0,3000px,0) scaleY(5);transform:translate3d(0,3000px,0) scaleY(5)}60%{opacity:1;-webkit-transform:translate3d(0,-20px,0) scaleY(.9);transform:translate3d(0,-20px,0) scaleY(.9)}75%{-webkit-transform:translate3d(0,10px,0) scaleY(.95);transform:translate3d(0,10px,0) scaleY(.95)}90%{-webkit-transform:translate3d(0,-5px,0) scaleY(.985);transform:translate3d(0,-5px,0) scaleY(.985)}to{-webkit-transform:translate3d(0,0,0);transform:translateZ(0)}}@keyframes bounceInUp{0%,60%,75%,90%,to{-webkit-animation-timing-function:cubic-bezier(.215,.61,.355,1);animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{opacity:0;-webkit-transform:translate3d(0,3000px,0) scaleY(5);transform:translate3d(0,3000px,0) scaleY(5)}60%{opacity:1;-webkit-transform:translate3d(0,-20px,0) scaleY(.9);transform:translate3d(0,-20px,0) scaleY(.9)}75%{-webkit-transform:translate3d(0,10px,0) scaleY(.95);transform:translate3d(0,10px,0) scaleY(.95)}90%{-webkit-transform:translate3d(0,-5px,0) scaleY(.985);transform:translate3d(0,-5px,0) scaleY(.985)}to{-webkit-transform:translate3d(0,0,0);transform:translateZ(0)}}.animate__bounceInUp{-webkit-animation-name:bounceInUp;animation-name:bounceInUp}@-webkit-keyframes bounceOut{20%{-webkit-transform:scale3d(.9,.9,.9);transform:scale3d(.9,.9,.9)}50%,55%{opacity:1;-webkit-transform:scale3d(1.1,1.1,1.1);transform:scale3d(1.1,1.1,1.1)}to{opacity:0;-webkit-transform:scale3d(.3,.3,.3);transform:scale3d(.3,.3,.3)}}@keyframes bounceOut{20%{-webkit-transform:scale3d(.9,.9,.9);transform:scale3d(.9,.9,.9)}50%,55%{opacity:1;-webkit-transform:scale3d(1.1,1.1,1.1);transform:scale3d(1.1,1.1,1.1)}to{opacity:0;-webkit-transform:scale3d(.3,.3,.3);transform:scale3d(.3,.3,.3)}}.animate__bounceOut{-webkit-animation-duration:.75s;animation-duration:.75s;-webkit-animation-duration:calc(var(--animate-duration) * .75);animation-duration:calc(var(--animate-duration) * .75);-webkit-animation-name:bounceOut;animation-name:bounceOut}@-webkit-keyframes bounceOutDown{20%{-webkit-transform:translate3d(0,10px,0) scaleY(.985);transform:translate3d(0,10px,0) scaleY(.985)}40%,45%{opacity:1;-webkit-transform:translate3d(0,-20px,0) scaleY(.9);transform:translate3d(0,-20px,0) scaleY(.9)}to{opacity:0;-webkit-transform:translate3d(0,2000px,0) scaleY(3);transform:translate3d(0,2000px,0) scaleY(3)}}@keyframes bounceOutDown{20%{-webkit-transform:translate3d(0,10px,0) scaleY(.985);transform:translate3d(0,10px,0) scaleY(.985)}40%,45%{opacity:1;-webkit-transform:translate3d(0,-20px,0) scaleY(.9);transform:translate3d(0,-20px,0) scaleY(.9)}to{opacity:0;-webkit-transform:translate3d(0,2000px,0) scaleY(3);transform:translate3d(0,2000px,0) scaleY(3)}}.animate__bounceOutDown{-webkit-animation-name:bounceOutDown;animation-name:bounceOutDown}@-webkit-keyframes bounceOutLeft{20%{opacity:1;-webkit-transform:translate3d(20px,0,0) scaleX(.9);transform:translate3d(20px,0,0) scaleX(.9)}to{opacity:0;-webkit-transform:translate3d(-2000px,0,0) scaleX(2);transform:translate3d(-2000px,0,0) scaleX(2)}}@keyframes bounceOutLeft{20%{opacity:1;-webkit-transform:translate3d(20px,0,0) scaleX(.9);transform:translate3d(20px,0,0) scaleX(.9)}to{opacity:0;-webkit-transform:translate3d(-2000px,0,0) scaleX(2);transform:translate3d(-2000px,0,0) scaleX(2)}}.animate__bounceOutLeft{-webkit-animation-name:bounceOutLeft;animation-name:bounceOutLeft}@-webkit-keyframes bounceOutRight{20%{opacity:1;-webkit-transform:translate3d(-20px,0,0) scaleX(.9);transform:translate3d(-20px,0,0) scaleX(.9)}to{opacity:0;-webkit-transform:translate3d(2000px,0,0) scaleX(2);transform:translate3d(2000px,0,0) scaleX(2)}}@keyframes bounceOutRight{20%{opacity:1;-webkit-transform:translate3d(-20px,0,0) scaleX(.9);transform:translate3d(-20px,0,0) scaleX(.9)}to{opacity:0;-webkit-transform:translate3d(2000px,0,0) scaleX(2);transform:translate3d(2000px,0,0) scaleX(2)}}.animate__bounceOutRight{-webkit-animation-name:bounceOutRight;animation-name:bounceOutRight}@-webkit-keyframes bounceOutUp{20%{-webkit-transform:translate3d(0,-10px,0) scaleY(.985);transform:translate3d(0,-10px,0) scaleY(.985)}40%,45%{opacity:1;-webkit-transform:translate3d(0,20px,0) scaleY(.9);transform:translate3d(0,20px,0) scaleY(.9)}to{opacity:0;-webkit-transform:translate3d(0,-2000px,0) scaleY(3);transform:translate3d(0,-2000px,0) scaleY(3)}}@keyframes bounceOutUp{20%{-webkit-transform:translate3d(0,-10px,0) scaleY(.985);transform:translate3d(0,-10px,0) scaleY(.985)}40%,45%{opacity:1;-webkit-transform:translate3d(0,20px,0) scaleY(.9);transform:translate3d(0,20px,0) scaleY(.9)}to{opacity:0;-webkit-transform:translate3d(0,-2000px,0) scaleY(3);transform:translate3d(0,-2000px,0) scaleY(3)}}.animate__bounceOutUp{-webkit-animation-name:bounceOutUp;animation-name:bounceOutUp}@-webkit-keyframes fadeIn{0%{opacity:0}to{opacity:1}}@keyframes fadeIn{0%{opacity:0}to{opacity:1}}.animate__fadeIn{-webkit-animation-name:fadeIn;animation-name:fadeIn}@-webkit-keyframes fadeInDown{0%{opacity:0;-webkit-transform:translate3d(0,-100%,0);transform:translate3d(0,-100%,0)}to{opacity:1;-webkit-transform:translate3d(0,0,0);transform:translateZ(0)}}@keyframes fadeInDown{0%{opacity:0;-webkit-transform:translate3d(0,-100%,0);transform:translate3d(0,-100%,0)}to{opacity:1;-webkit-transform:translate3d(0,0,0);transform:translateZ(0)}}.animate__fadeInDown{-webkit-animation-name:fadeInDown;animation-name:fadeInDown}@-webkit-keyframes fadeInDownBig{0%{opacity:0;-webkit-transform:translate3d(0,-2000px,0);transform:translate3d(0,-2000px,0)}to{opacity:1;-webkit-transform:translate3d(0,0,0);transform:translateZ(0)}}@keyframes fadeInDownBig{0%{opacity:0;-webkit-transform:translate3d(0,-2000px,0);transform:translate3d(0,-2000px,0)}to{opacity:1;-webkit-transform:translate3d(0,0,0);transform:translateZ(0)}}.animate__fadeInDownBig{-webkit-animation-name:fadeInDownBig;animation-name:fadeInDownBig}@-webkit-keyframes fadeInLeft{0%{opacity:0;-webkit-transform:translate3d(-100%,0,0);transform:translate3d(-100%,0,0)}to{opacity:1;-webkit-transform:translate3d(0,0,0);transform:translateZ(0)}}@keyframes fadeInLeft{0%{opacity:0;-webkit-transform:translate3d(-100%,0,0);transform:translate3d(-100%,0,0)}to{opacity:1;-webkit-transform:translate3d(0,0,0);transform:translateZ(0)}}.animate__fadeInLeft{-webkit-animation-name:fadeInLeft;animation-name:fadeInLeft}@-webkit-keyframes fadeInLeftBig{0%{opacity:0;-webkit-transform:translate3d(-2000px,0,0);transform:translate3d(-2000px,0,0)}to{opacity:1;-webkit-transform:translate3d(0,0,0);transform:translateZ(0)}}@keyframes fadeInLeftBig{0%{opacity:0;-webkit-transform:translate3d(-2000px,0,0);transform:translate3d(-2000px,0,0)}to{opacity:1;-webkit-transform:translate3d(0,0,0);transform:translateZ(0)}}.animate__fadeInLeftBig{-webkit-animation-name:fadeInLeftBig;animation-name:fadeInLeftBig}@-webkit-keyframes fadeInRight{0%{opacity:0;-webkit-transform:translate3d(100%,0,0);transform:translate3d(100%,0,0)}to{opacity:1;-webkit-transform:translate3d(0,0,0);transform:translateZ(0)}}@keyframes fadeInRight{0%{opacity:0;-webkit-transform:translate3d(100%,0,0);transform:translate3d(100%,0,0)}to{opacity:1;-webkit-transform:translate3d(0,0,0);transform:translateZ(0)}}.animate__fadeInRight{-webkit-animation-name:fadeInRight;animation-name:fadeInRight}@-webkit-keyframes fadeInRightBig{0%{opacity:0;-webkit-transform:translate3d(2000px,0,0);transform:translate3d(2000px,0,0)}to{opacity:1;-webkit-transform:translate3d(0,0,0);transform:translateZ(0)}}@keyframes fadeInRightBig{0%{opacity:0;-webkit-transform:translate3d(2000px,0,0);transform:translate3d(2000px,0,0)}to{opacity:1;-webkit-transform:translate3d(0,0,0);transform:translateZ(0)}}.animate__fadeInRightBig{-webkit-animation-name:fadeInRightBig;animation-name:fadeInRightBig}@-webkit-keyframes fadeInUp{0%{opacity:0;-webkit-transform:translate3d(0,100%,0);transform:translate3d(0,100%,0)}to{opacity:1;-webkit-transform:translate3d(0,0,0);transform:translateZ(0)}}@keyframes fadeInUp{0%{opacity:0;-webkit-transform:translate3d(0,100%,0);transform:translate3d(0,100%,0)}to{opacity:1;-webkit-transform:translate3d(0,0,0);transform:translateZ(0)}}.animate__fadeInUp{-webkit-animation-name:fadeInUp;animation-name:fadeInUp}@-webkit-keyframes fadeInUpBig{0%{opacity:0;-webkit-transform:translate3d(0,2000px,0);transform:translate3d(0,2000px,0)}to{opacity:1;-webkit-transform:translate3d(0,0,0);transform:translateZ(0)}}@keyframes fadeInUpBig{0%{opacity:0;-webkit-transform:translate3d(0,2000px,0);transform:translate3d(0,2000px,0)}to{opacity:1;-webkit-transform:translate3d(0,0,0);transform:translateZ(0)}}.animate__fadeInUpBig{-webkit-animation-name:fadeInUpBig;animation-name:fadeInUpBig}@-webkit-keyframes fadeInTopLeft{0%{opacity:0;-webkit-transform:translate3d(-100%,-100%,0);transform:translate3d(-100%,-100%,0)}to{opacity:1;-webkit-transform:translate3d(0,0,0);transform:translateZ(0)}}@keyframes fadeInTopLeft{0%{opacity:0;-webkit-transform:translate3d(-100%,-100%,0);transform:translate3d(-100%,-100%,0)}to{opacity:1;-webkit-transform:translate3d(0,0,0);transform:translateZ(0)}}.animate__fadeInTopLeft{-webkit-animation-name:fadeInTopLeft;animation-name:fadeInTopLeft}@-webkit-keyframes fadeInTopRight{0%{opacity:0;-webkit-transform:translate3d(100%,-100%,0);transform:translate3d(100%,-100%,0)}to{opacity:1;-webkit-transform:translate3d(0,0,0);transform:translateZ(0)}}@keyframes fadeInTopRight{0%{opacity:0;-webkit-transform:translate3d(100%,-100%,0);transform:translate3d(100%,-100%,0)}to{opacity:1;-webkit-transform:translate3d(0,0,0);transform:translateZ(0)}}.animate__fadeInTopRight{-webkit-animation-name:fadeInTopRight;animation-name:fadeInTopRight}@-webkit-keyframes fadeInBottomLeft{0%{opacity:0;-webkit-transform:translate3d(-100%,100%,0);transform:translate3d(-100%,100%,0)}to{opacity:1;-webkit-transform:translate3d(0,0,0);transform:translateZ(0)}}@keyframes fadeInBottomLeft{0%{opacity:0;-webkit-transform:translate3d(-100%,100%,0);transform:translate3d(-100%,100%,0)}to{opacity:1;-webkit-transform:translate3d(0,0,0);transform:translateZ(0)}}.animate__fadeInBottomLeft{-webkit-animation-name:fadeInBottomLeft;animation-name:fadeInBottomLeft}@-webkit-keyframes fadeInBottomRight{0%{opacity:0;-webkit-transform:translate3d(100%,100%,0);transform:translate3d(100%,100%,0)}to{opacity:1;-webkit-transform:translate3d(0,0,0);transform:translateZ(0)}}@keyframes fadeInBottomRight{0%{opacity:0;-webkit-transform:translate3d(100%,100%,0);transform:translate3d(100%,100%,0)}to{opacity:1;-webkit-transform:translate3d(0,0,0);transform:translateZ(0)}}.animate__fadeInBottomRight{-webkit-animation-name:fadeInBottomRight;animation-name:fadeInBottomRight}@-webkit-keyframes fadeOut{0%{opacity:1}to{opacity:0}}@keyframes fadeOut{0%{opacity:1}to{opacity:0}}.animate__fadeOut{-webkit-animation-name:fadeOut;animation-name:fadeOut}@-webkit-keyframes fadeOutDown{0%{opacity:1}to{opacity:0;-webkit-transform:translate3d(0,100%,0);transform:translate3d(0,100%,0)}}@keyframes fadeOutDown{0%{opacity:1}to{opacity:0;-webkit-transform:translate3d(0,100%,0);transform:translate3d(0,100%,0)}}.animate__fadeOutDown{-webkit-animation-name:fadeOutDown;animation-name:fadeOutDown}@-webkit-keyframes fadeOutDownBig{0%{opacity:1}to{opacity:0;-webkit-transform:translate3d(0,2000px,0);transform:translate3d(0,2000px,0)}}@keyframes fadeOutDownBig{0%{opacity:1}to{opacity:0;-webkit-transform:translate3d(0,2000px,0);transform:translate3d(0,2000px,0)}}.animate__fadeOutDownBig{-webkit-animation-name:fadeOutDownBig;animation-name:fadeOutDownBig}@-webkit-keyframes fadeOutLeft{0%{opacity:1}to{opacity:0;-webkit-transform:translate3d(-100%,0,0);transform:translate3d(-100%,0,0)}}@keyframes fadeOutLeft{0%{opacity:1}to{opacity:0;-webkit-transform:translate3d(-100%,0,0);transform:translate3d(-100%,0,0)}}.animate__fadeOutLeft{-webkit-animation-name:fadeOutLeft;animation-name:fadeOutLeft}@-webkit-keyframes fadeOutLeftBig{0%{opacity:1}to{opacity:0;-webkit-transform:translate3d(-2000px,0,0);transform:translate3d(-2000px,0,0)}}@keyframes fadeOutLeftBig{0%{opacity:1}to{opacity:0;-webkit-transform:translate3d(-2000px,0,0);transform:translate3d(-2000px,0,0)}}.animate__fadeOutLeftBig{-webkit-animation-name:fadeOutLeftBig;animation-name:fadeOutLeftBig}@-webkit-keyframes fadeOutRight{0%{opacity:1}to{opacity:0;-webkit-transform:translate3d(100%,0,0);transform:translate3d(100%,0,0)}}@keyframes fadeOutRight{0%{opacity:1}to{opacity:0;-webkit-transform:translate3d(100%,0,0);transform:translate3d(100%,0,0)}}.animate__fadeOutRight{-webkit-animation-name:fadeOutRight;animation-name:fadeOutRight}@-webkit-keyframes fadeOutRightBig{0%{opacity:1}to{opacity:0;-webkit-transform:translate3d(2000px,0,0);transform:translate3d(2000px,0,0)}}@keyframes fadeOutRightBig{0%{opacity:1}to{opacity:0;-webkit-transform:translate3d(2000px,0,0);transform:translate3d(2000px,0,0)}}.animate__fadeOutRightBig{-webkit-animation-name:fadeOutRightBig;animation-name:fadeOutRightBig}@-webkit-keyframes fadeOutUp{0%{opacity:1}to{opacity:0;-webkit-transform:translate3d(0,-100%,0);transform:translate3d(0,-100%,0)}}@keyframes fadeOutUp{0%{opacity:1}to{opacity:0;-webkit-transform:translate3d(0,-100%,0);transform:translate3d(0,-100%,0)}}.animate__fadeOutUp{-webkit-animation-name:fadeOutUp;animation-name:fadeOutUp}@-webkit-keyframes fadeOutUpBig{0%{opacity:1}to{opacity:0;-webkit-transform:translate3d(0,-2000px,0);transform:translate3d(0,-2000px,0)}}@keyframes fadeOutUpBig{0%{opacity:1}to{opacity:0;-webkit-transform:translate3d(0,-2000px,0);transform:translate3d(0,-2000px,0)}}.animate__fadeOutUpBig{-webkit-animation-name:fadeOutUpBig;animation-name:fadeOutUpBig}@-webkit-keyframes fadeOutTopLeft{0%{opacity:1;-webkit-transform:translate3d(0,0,0);transform:translateZ(0)}to{opacity:0;-webkit-transform:translate3d(-100%,-100%,0);transform:translate3d(-100%,-100%,0)}}@keyframes fadeOutTopLeft{0%{opacity:1;-webkit-transform:translate3d(0,0,0);transform:translateZ(0)}to{opacity:0;-webkit-transform:translate3d(-100%,-100%,0);transform:translate3d(-100%,-100%,0)}}.animate__fadeOutTopLeft{-webkit-animation-name:fadeOutTopLeft;animation-name:fadeOutTopLeft}@-webkit-keyframes fadeOutTopRight{0%{opacity:1;-webkit-transform:translate3d(0,0,0);transform:translateZ(0)}to{opacity:0;-webkit-transform:translate3d(100%,-100%,0);transform:translate3d(100%,-100%,0)}}@keyframes fadeOutTopRight{0%{opacity:1;-webkit-transform:translate3d(0,0,0);transform:translateZ(0)}to{opacity:0;-webkit-transform:translate3d(100%,-100%,0);transform:translate3d(100%,-100%,0)}}.animate__fadeOutTopRight{-webkit-animation-name:fadeOutTopRight;animation-name:fadeOutTopRight}@-webkit-keyframes fadeOutBottomRight{0%{opacity:1;-webkit-transform:translate3d(0,0,0);transform:translateZ(0)}to{opacity:0;-webkit-transform:translate3d(100%,100%,0);transform:translate3d(100%,100%,0)}}@keyframes fadeOutBottomRight{0%{opacity:1;-webkit-transform:translate3d(0,0,0);transform:translateZ(0)}to{opacity:0;-webkit-transform:translate3d(100%,100%,0);transform:translate3d(100%,100%,0)}}.animate__fadeOutBottomRight{-webkit-animation-name:fadeOutBottomRight;animation-name:fadeOutBottomRight}@-webkit-keyframes fadeOutBottomLeft{0%{opacity:1;-webkit-transform:translate3d(0,0,0);transform:translateZ(0)}to{opacity:0;-webkit-transform:translate3d(-100%,100%,0);transform:translate3d(-100%,100%,0)}}@keyframes fadeOutBottomLeft{0%{opacity:1;-webkit-transform:translate3d(0,0,0);transform:translateZ(0)}to{opacity:0;-webkit-transform:translate3d(-100%,100%,0);transform:translate3d(-100%,100%,0)}}.animate__fadeOutBottomLeft{-webkit-animation-name:fadeOutBottomLeft;animation-name:fadeOutBottomLeft}@-webkit-keyframes flip{0%{-webkit-transform:perspective(400px) scale3d(1,1,1) translate3d(0,0,0) rotate3d(0,1,0,-360deg);transform:perspective(400px) scaleZ(1) translateZ(0) rotateY(-360deg);-webkit-animation-timing-function:ease-out;animation-timing-function:ease-out}40%{-webkit-transform:perspective(400px) scale3d(1,1,1) translate3d(0,0,150px) rotate3d(0,1,0,-190deg);transform:perspective(400px) scaleZ(1) translateZ(150px) rotateY(-190deg);-webkit-animation-timing-function:ease-out;animation-timing-function:ease-out}50%{-webkit-transform:perspective(400px) scale3d(1,1,1) translate3d(0,0,150px) rotate3d(0,1,0,-170deg);transform:perspective(400px) scaleZ(1) translateZ(150px) rotateY(-170deg);-webkit-animation-timing-function:ease-in;animation-timing-function:ease-in}80%{-webkit-transform:perspective(400px) scale3d(.95,.95,.95) translate3d(0,0,0) rotate3d(0,1,0,0deg);transform:perspective(400px) scale3d(.95,.95,.95) translateZ(0) rotateY(0);-webkit-animation-timing-function:ease-in;animation-timing-function:ease-in}to{-webkit-transform:perspective(400px) scale3d(1,1,1) translate3d(0,0,0) rotate3d(0,1,0,0deg);transform:perspective(400px) scaleZ(1) translateZ(0) rotateY(0);-webkit-animation-timing-function:ease-in;animation-timing-function:ease-in}}@keyframes flip{0%{-webkit-transform:perspective(400px) scale3d(1,1,1) translate3d(0,0,0) rotate3d(0,1,0,-360deg);transform:perspective(400px) scaleZ(1) translateZ(0) rotateY(-360deg);-webkit-animation-timing-function:ease-out;animation-timing-function:ease-out}40%{-webkit-transform:perspective(400px) scale3d(1,1,1) translate3d(0,0,150px) rotate3d(0,1,0,-190deg);transform:perspective(400px) scaleZ(1) translateZ(150px) rotateY(-190deg);-webkit-animation-timing-function:ease-out;animation-timing-function:ease-out}50%{-webkit-transform:perspective(400px) scale3d(1,1,1) translate3d(0,0,150px) rotate3d(0,1,0,-170deg);transform:perspective(400px) scaleZ(1) translateZ(150px) rotateY(-170deg);-webkit-animation-timing-function:ease-in;animation-timing-function:ease-in}80%{-webkit-transform:perspective(400px) scale3d(.95,.95,.95) translate3d(0,0,0) rotate3d(0,1,0,0deg);transform:perspective(400px) scale3d(.95,.95,.95) translateZ(0) rotateY(0);-webkit-animation-timing-function:ease-in;animation-timing-function:ease-in}to{-webkit-transform:perspective(400px) scale3d(1,1,1) translate3d(0,0,0) rotate3d(0,1,0,0deg);transform:perspective(400px) scaleZ(1) translateZ(0) rotateY(0);-webkit-animation-timing-function:ease-in;animation-timing-function:ease-in}}.animate__animated.animate__flip{-webkit-backface-visibility:visible;backface-visibility:visible;-webkit-animation-name:flip;animation-name:flip}@-webkit-keyframes flipInX{0%{-webkit-transform:perspective(400px) rotate3d(1,0,0,90deg);transform:perspective(400px) rotateX(90deg);-webkit-animation-timing-function:ease-in;animation-timing-function:ease-in;opacity:0}40%{-webkit-transform:perspective(400px) rotate3d(1,0,0,-20deg);transform:perspective(400px) rotateX(-20deg);-webkit-animation-timing-function:ease-in;animation-timing-function:ease-in}60%{-webkit-transform:perspective(400px) rotate3d(1,0,0,10deg);transform:perspective(400px) rotateX(10deg);opacity:1}80%{-webkit-transform:perspective(400px) rotate3d(1,0,0,-5deg);transform:perspective(400px) rotateX(-5deg)}to{-webkit-transform:perspective(400px);transform:perspective(400px)}}@keyframes flipInX{0%{-webkit-transform:perspective(400px) rotate3d(1,0,0,90deg);transform:perspective(400px) rotateX(90deg);-webkit-animation-timing-function:ease-in;animation-timing-function:ease-in;opacity:0}40%{-webkit-transform:perspective(400px) rotate3d(1,0,0,-20deg);transform:perspective(400px) rotateX(-20deg);-webkit-animation-timing-function:ease-in;animation-timing-function:ease-in}60%{-webkit-transform:perspective(400px) rotate3d(1,0,0,10deg);transform:perspective(400px) rotateX(10deg);opacity:1}80%{-webkit-transform:perspective(400px) rotate3d(1,0,0,-5deg);transform:perspective(400px) rotateX(-5deg)}to{-webkit-transform:perspective(400px);transform:perspective(400px)}}.animate__flipInX{-webkit-backface-visibility:visible!important;backface-visibility:visible!important;-webkit-animation-name:flipInX;animation-name:flipInX}@-webkit-keyframes flipInY{0%{-webkit-transform:perspective(400px) rotate3d(0,1,0,90deg);transform:perspective(400px) rotateY(90deg);-webkit-animation-timing-function:ease-in;animation-timing-function:ease-in;opacity:0}40%{-webkit-transform:perspective(400px) rotate3d(0,1,0,-20deg);transform:perspective(400px) rotateY(-20deg);-webkit-animation-timing-function:ease-in;animation-timing-function:ease-in}60%{-webkit-transform:perspective(400px) rotate3d(0,1,0,10deg);transform:perspective(400px) rotateY(10deg);opacity:1}80%{-webkit-transform:perspective(400px) rotate3d(0,1,0,-5deg);transform:perspective(400px) rotateY(-5deg)}to{-webkit-transform:perspective(400px);transform:perspective(400px)}}@keyframes flipInY{0%{-webkit-transform:perspective(400px) rotate3d(0,1,0,90deg);transform:perspective(400px) rotateY(90deg);-webkit-animation-timing-function:ease-in;animation-timing-function:ease-in;opacity:0}40%{-webkit-transform:perspective(400px) rotate3d(0,1,0,-20deg);transform:perspective(400px) rotateY(-20deg);-webkit-animation-timing-function:ease-in;animation-timing-function:ease-in}60%{-webkit-transform:perspective(400px) rotate3d(0,1,0,10deg);transform:perspective(400px) rotateY(10deg);opacity:1}80%{-webkit-transform:perspective(400px) rotate3d(0,1,0,-5deg);transform:perspective(400px) rotateY(-5deg)}to{-webkit-transform:perspective(400px);transform:perspective(400px)}}.animate__flipInY{-webkit-backface-visibility:visible!important;backface-visibility:visible!important;-webkit-animation-name:flipInY;animation-name:flipInY}@-webkit-keyframes flipOutX{0%{-webkit-transform:perspective(400px);transform:perspective(400px)}30%{-webkit-transform:perspective(400px) rotate3d(1,0,0,-20deg);transform:perspective(400px) rotateX(-20deg);opacity:1}to{-webkit-transform:perspective(400px) rotate3d(1,0,0,90deg);transform:perspective(400px) rotateX(90deg);opacity:0}}@keyframes flipOutX{0%{-webkit-transform:perspective(400px);transform:perspective(400px)}30%{-webkit-transform:perspective(400px) rotate3d(1,0,0,-20deg);transform:perspective(400px) rotateX(-20deg);opacity:1}to{-webkit-transform:perspective(400px) rotate3d(1,0,0,90deg);transform:perspective(400px) rotateX(90deg);opacity:0}}.animate__flipOutX{-webkit-animation-duration:.75s;animation-duration:.75s;-webkit-animation-duration:calc(var(--animate-duration) * .75);animation-duration:calc(var(--animate-duration) * .75);-webkit-animation-name:flipOutX;animation-name:flipOutX;-webkit-backface-visibility:visible!important;backface-visibility:visible!important}@-webkit-keyframes flipOutY{0%{-webkit-transform:perspective(400px);transform:perspective(400px)}30%{-webkit-transform:perspective(400px) rotate3d(0,1,0,-15deg);transform:perspective(400px) rotateY(-15deg);opacity:1}to{-webkit-transform:perspective(400px) rotate3d(0,1,0,90deg);transform:perspective(400px) rotateY(90deg);opacity:0}}@keyframes flipOutY{0%{-webkit-transform:perspective(400px);transform:perspective(400px)}30%{-webkit-transform:perspective(400px) rotate3d(0,1,0,-15deg);transform:perspective(400px) rotateY(-15deg);opacity:1}to{-webkit-transform:perspective(400px) rotate3d(0,1,0,90deg);transform:perspective(400px) rotateY(90deg);opacity:0}}.animate__flipOutY{-webkit-animation-duration:.75s;animation-duration:.75s;-webkit-animation-duration:calc(var(--animate-duration) * .75);animation-duration:calc(var(--animate-duration) * .75);-webkit-backface-visibility:visible!important;backface-visibility:visible!important;-webkit-animation-name:flipOutY;animation-name:flipOutY}@-webkit-keyframes lightSpeedInRight{0%{-webkit-transform:translate3d(100%,0,0) skewX(-30deg);transform:translate3d(100%,0,0) skew(-30deg);opacity:0}60%{-webkit-transform:skewX(20deg);transform:skew(20deg);opacity:1}80%{-webkit-transform:skewX(-5deg);transform:skew(-5deg)}to{-webkit-transform:translate3d(0,0,0);transform:translateZ(0)}}@keyframes lightSpeedInRight{0%{-webkit-transform:translate3d(100%,0,0) skewX(-30deg);transform:translate3d(100%,0,0) skew(-30deg);opacity:0}60%{-webkit-transform:skewX(20deg);transform:skew(20deg);opacity:1}80%{-webkit-transform:skewX(-5deg);transform:skew(-5deg)}to{-webkit-transform:translate3d(0,0,0);transform:translateZ(0)}}.animate__lightSpeedInRight{-webkit-animation-name:lightSpeedInRight;animation-name:lightSpeedInRight;-webkit-animation-timing-function:ease-out;animation-timing-function:ease-out}@-webkit-keyframes lightSpeedInLeft{0%{-webkit-transform:translate3d(-100%,0,0) skewX(30deg);transform:translate3d(-100%,0,0) skew(30deg);opacity:0}60%{-webkit-transform:skewX(-20deg);transform:skew(-20deg);opacity:1}80%{-webkit-transform:skewX(5deg);transform:skew(5deg)}to{-webkit-transform:translate3d(0,0,0);transform:translateZ(0)}}@keyframes lightSpeedInLeft{0%{-webkit-transform:translate3d(-100%,0,0) skewX(30deg);transform:translate3d(-100%,0,0) skew(30deg);opacity:0}60%{-webkit-transform:skewX(-20deg);transform:skew(-20deg);opacity:1}80%{-webkit-transform:skewX(5deg);transform:skew(5deg)}to{-webkit-transform:translate3d(0,0,0);transform:translateZ(0)}}.animate__lightSpeedInLeft{-webkit-animation-name:lightSpeedInLeft;animation-name:lightSpeedInLeft;-webkit-animation-timing-function:ease-out;animation-timing-function:ease-out}@-webkit-keyframes lightSpeedOutRight{0%{opacity:1}to{-webkit-transform:translate3d(100%,0,0) skewX(30deg);transform:translate3d(100%,0,0) skew(30deg);opacity:0}}@keyframes lightSpeedOutRight{0%{opacity:1}to{-webkit-transform:translate3d(100%,0,0) skewX(30deg);transform:translate3d(100%,0,0) skew(30deg);opacity:0}}.animate__lightSpeedOutRight{-webkit-animation-name:lightSpeedOutRight;animation-name:lightSpeedOutRight;-webkit-animation-timing-function:ease-in;animation-timing-function:ease-in}@-webkit-keyframes lightSpeedOutLeft{0%{opacity:1}to{-webkit-transform:translate3d(-100%,0,0) skewX(-30deg);transform:translate3d(-100%,0,0) skew(-30deg);opacity:0}}@keyframes lightSpeedOutLeft{0%{opacity:1}to{-webkit-transform:translate3d(-100%,0,0) skewX(-30deg);transform:translate3d(-100%,0,0) skew(-30deg);opacity:0}}.animate__lightSpeedOutLeft{-webkit-animation-name:lightSpeedOutLeft;animation-name:lightSpeedOutLeft;-webkit-animation-timing-function:ease-in;animation-timing-function:ease-in}@-webkit-keyframes rotateIn{0%{-webkit-transform:rotate3d(0,0,1,-200deg);transform:rotate3d(0,0,1,-200deg);opacity:0}to{-webkit-transform:translate3d(0,0,0);transform:translateZ(0);opacity:1}}@keyframes rotateIn{0%{-webkit-transform:rotate3d(0,0,1,-200deg);transform:rotate3d(0,0,1,-200deg);opacity:0}to{-webkit-transform:translate3d(0,0,0);transform:translateZ(0);opacity:1}}.animate__rotateIn{-webkit-animation-name:rotateIn;animation-name:rotateIn;-webkit-transform-origin:center;transform-origin:center}@-webkit-keyframes rotateInDownLeft{0%{-webkit-transform:rotate3d(0,0,1,-45deg);transform:rotate3d(0,0,1,-45deg);opacity:0}to{-webkit-transform:translate3d(0,0,0);transform:translateZ(0);opacity:1}}@keyframes rotateInDownLeft{0%{-webkit-transform:rotate3d(0,0,1,-45deg);transform:rotate3d(0,0,1,-45deg);opacity:0}to{-webkit-transform:translate3d(0,0,0);transform:translateZ(0);opacity:1}}.animate__rotateInDownLeft{-webkit-animation-name:rotateInDownLeft;animation-name:rotateInDownLeft;-webkit-transform-origin:left bottom;transform-origin:left bottom}@-webkit-keyframes rotateInDownRight{0%{-webkit-transform:rotate3d(0,0,1,45deg);transform:rotate3d(0,0,1,45deg);opacity:0}to{-webkit-transform:translate3d(0,0,0);transform:translateZ(0);opacity:1}}@keyframes rotateInDownRight{0%{-webkit-transform:rotate3d(0,0,1,45deg);transform:rotate3d(0,0,1,45deg);opacity:0}to{-webkit-transform:translate3d(0,0,0);transform:translateZ(0);opacity:1}}.animate__rotateInDownRight{-webkit-animation-name:rotateInDownRight;animation-name:rotateInDownRight;-webkit-transform-origin:right bottom;transform-origin:right bottom}@-webkit-keyframes rotateInUpLeft{0%{-webkit-transform:rotate3d(0,0,1,45deg);transform:rotate3d(0,0,1,45deg);opacity:0}to{-webkit-transform:translate3d(0,0,0);transform:translateZ(0);opacity:1}}@keyframes rotateInUpLeft{0%{-webkit-transform:rotate3d(0,0,1,45deg);transform:rotate3d(0,0,1,45deg);opacity:0}to{-webkit-transform:translate3d(0,0,0);transform:translateZ(0);opacity:1}}.animate__rotateInUpLeft{-webkit-animation-name:rotateInUpLeft;animation-name:rotateInUpLeft;-webkit-transform-origin:left bottom;transform-origin:left bottom}@-webkit-keyframes rotateInUpRight{0%{-webkit-transform:rotate3d(0,0,1,-90deg);transform:rotate3d(0,0,1,-90deg);opacity:0}to{-webkit-transform:translate3d(0,0,0);transform:translateZ(0);opacity:1}}@keyframes rotateInUpRight{0%{-webkit-transform:rotate3d(0,0,1,-90deg);transform:rotate3d(0,0,1,-90deg);opacity:0}to{-webkit-transform:translate3d(0,0,0);transform:translateZ(0);opacity:1}}.animate__rotateInUpRight{-webkit-animation-name:rotateInUpRight;animation-name:rotateInUpRight;-webkit-transform-origin:right bottom;transform-origin:right bottom}@-webkit-keyframes rotateOut{0%{opacity:1}to{-webkit-transform:rotate3d(0,0,1,200deg);transform:rotate3d(0,0,1,200deg);opacity:0}}@keyframes rotateOut{0%{opacity:1}to{-webkit-transform:rotate3d(0,0,1,200deg);transform:rotate3d(0,0,1,200deg);opacity:0}}.animate__rotateOut{-webkit-animation-name:rotateOut;animation-name:rotateOut;-webkit-transform-origin:center;transform-origin:center}@-webkit-keyframes rotateOutDownLeft{0%{opacity:1}to{-webkit-transform:rotate3d(0,0,1,45deg);transform:rotate3d(0,0,1,45deg);opacity:0}}@keyframes rotateOutDownLeft{0%{opacity:1}to{-webkit-transform:rotate3d(0,0,1,45deg);transform:rotate3d(0,0,1,45deg);opacity:0}}.animate__rotateOutDownLeft{-webkit-animation-name:rotateOutDownLeft;animation-name:rotateOutDownLeft;-webkit-transform-origin:left bottom;transform-origin:left bottom}@-webkit-keyframes rotateOutDownRight{0%{opacity:1}to{-webkit-transform:rotate3d(0,0,1,-45deg);transform:rotate3d(0,0,1,-45deg);opacity:0}}@keyframes rotateOutDownRight{0%{opacity:1}to{-webkit-transform:rotate3d(0,0,1,-45deg);transform:rotate3d(0,0,1,-45deg);opacity:0}}.animate__rotateOutDownRight{-webkit-animation-name:rotateOutDownRight;animation-name:rotateOutDownRight;-webkit-transform-origin:right bottom;transform-origin:right bottom}@-webkit-keyframes rotateOutUpLeft{0%{opacity:1}to{-webkit-transform:rotate3d(0,0,1,-45deg);transform:rotate3d(0,0,1,-45deg);opacity:0}}@keyframes rotateOutUpLeft{0%{opacity:1}to{-webkit-transform:rotate3d(0,0,1,-45deg);transform:rotate3d(0,0,1,-45deg);opacity:0}}.animate__rotateOutUpLeft{-webkit-animation-name:rotateOutUpLeft;animation-name:rotateOutUpLeft;-webkit-transform-origin:left bottom;transform-origin:left bottom}@-webkit-keyframes rotateOutUpRight{0%{opacity:1}to{-webkit-transform:rotate3d(0,0,1,90deg);transform:rotate3d(0,0,1,90deg);opacity:0}}@keyframes rotateOutUpRight{0%{opacity:1}to{-webkit-transform:rotate3d(0,0,1,90deg);transform:rotate3d(0,0,1,90deg);opacity:0}}.animate__rotateOutUpRight{-webkit-animation-name:rotateOutUpRight;animation-name:rotateOutUpRight;-webkit-transform-origin:right bottom;transform-origin:right bottom}@-webkit-keyframes hinge{0%{-webkit-animation-timing-function:ease-in-out;animation-timing-function:ease-in-out}20%,60%{-webkit-transform:rotate3d(0,0,1,80deg);transform:rotate3d(0,0,1,80deg);-webkit-animation-timing-function:ease-in-out;animation-timing-function:ease-in-out}40%,80%{-webkit-transform:rotate3d(0,0,1,60deg);transform:rotate3d(0,0,1,60deg);-webkit-animation-timing-function:ease-in-out;animation-timing-function:ease-in-out;opacity:1}to{-webkit-transform:translate3d(0,700px,0);transform:translate3d(0,700px,0);opacity:0}}@keyframes hinge{0%{-webkit-animation-timing-function:ease-in-out;animation-timing-function:ease-in-out}20%,60%{-webkit-transform:rotate3d(0,0,1,80deg);transform:rotate3d(0,0,1,80deg);-webkit-animation-timing-function:ease-in-out;animation-timing-function:ease-in-out}40%,80%{-webkit-transform:rotate3d(0,0,1,60deg);transform:rotate3d(0,0,1,60deg);-webkit-animation-timing-function:ease-in-out;animation-timing-function:ease-in-out;opacity:1}to{-webkit-transform:translate3d(0,700px,0);transform:translate3d(0,700px,0);opacity:0}}.animate__hinge{-webkit-animation-duration:2s;animation-duration:2s;-webkit-animation-duration:calc(var(--animate-duration) * 2);animation-duration:calc(var(--animate-duration) * 2);-webkit-animation-name:hinge;animation-name:hinge;-webkit-transform-origin:top left;transform-origin:top left}@-webkit-keyframes jackInTheBox{0%{opacity:0;-webkit-transform:scale(.1) rotate(30deg);transform:scale(.1) rotate(30deg);-webkit-transform-origin:center bottom;transform-origin:center bottom}50%{-webkit-transform:rotate(-10deg);transform:rotate(-10deg)}70%{-webkit-transform:rotate(3deg);transform:rotate(3deg)}to{opacity:1;-webkit-transform:scale(1);transform:scale(1)}}@keyframes jackInTheBox{0%{opacity:0;-webkit-transform:scale(.1) rotate(30deg);transform:scale(.1) rotate(30deg);-webkit-transform-origin:center bottom;transform-origin:center bottom}50%{-webkit-transform:rotate(-10deg);transform:rotate(-10deg)}70%{-webkit-transform:rotate(3deg);transform:rotate(3deg)}to{opacity:1;-webkit-transform:scale(1);transform:scale(1)}}.animate__jackInTheBox{-webkit-animation-name:jackInTheBox;animation-name:jackInTheBox}@-webkit-keyframes rollIn{0%{opacity:0;-webkit-transform:translate3d(-100%,0,0) rotate3d(0,0,1,-120deg);transform:translate3d(-100%,0,0) rotate3d(0,0,1,-120deg)}to{opacity:1;-webkit-transform:translate3d(0,0,0);transform:translateZ(0)}}@keyframes rollIn{0%{opacity:0;-webkit-transform:translate3d(-100%,0,0) rotate3d(0,0,1,-120deg);transform:translate3d(-100%,0,0) rotate3d(0,0,1,-120deg)}to{opacity:1;-webkit-transform:translate3d(0,0,0);transform:translateZ(0)}}.animate__rollIn{-webkit-animation-name:rollIn;animation-name:rollIn}@-webkit-keyframes rollOut{0%{opacity:1}to{opacity:0;-webkit-transform:translate3d(100%,0,0) rotate3d(0,0,1,120deg);transform:translate3d(100%,0,0) rotate3d(0,0,1,120deg)}}@keyframes rollOut{0%{opacity:1}to{opacity:0;-webkit-transform:translate3d(100%,0,0) rotate3d(0,0,1,120deg);transform:translate3d(100%,0,0) rotate3d(0,0,1,120deg)}}.animate__rollOut{-webkit-animation-name:rollOut;animation-name:rollOut}@-webkit-keyframes zoomIn{0%{opacity:0;-webkit-transform:scale3d(.3,.3,.3);transform:scale3d(.3,.3,.3)}50%{opacity:1}}@keyframes zoomIn{0%{opacity:0;-webkit-transform:scale3d(.3,.3,.3);transform:scale3d(.3,.3,.3)}50%{opacity:1}}.animate__zoomIn{-webkit-animation-name:zoomIn;animation-name:zoomIn}@-webkit-keyframes zoomInDown{0%{opacity:0;-webkit-transform:scale3d(.1,.1,.1) translate3d(0,-1000px,0);transform:scale3d(.1,.1,.1) translate3d(0,-1000px,0);-webkit-animation-timing-function:cubic-bezier(.55,.055,.675,.19);animation-timing-function:cubic-bezier(.55,.055,.675,.19)}60%{opacity:1;-webkit-transform:scale3d(.475,.475,.475) translate3d(0,60px,0);transform:scale3d(.475,.475,.475) translate3d(0,60px,0);-webkit-animation-timing-function:cubic-bezier(.175,.885,.32,1);animation-timing-function:cubic-bezier(.175,.885,.32,1)}}@keyframes zoomInDown{0%{opacity:0;-webkit-transform:scale3d(.1,.1,.1) translate3d(0,-1000px,0);transform:scale3d(.1,.1,.1) translate3d(0,-1000px,0);-webkit-animation-timing-function:cubic-bezier(.55,.055,.675,.19);animation-timing-function:cubic-bezier(.55,.055,.675,.19)}60%{opacity:1;-webkit-transform:scale3d(.475,.475,.475) translate3d(0,60px,0);transform:scale3d(.475,.475,.475) translate3d(0,60px,0);-webkit-animation-timing-function:cubic-bezier(.175,.885,.32,1);animation-timing-function:cubic-bezier(.175,.885,.32,1)}}.animate__zoomInDown{-webkit-animation-name:zoomInDown;animation-name:zoomInDown}@-webkit-keyframes zoomInLeft{0%{opacity:0;-webkit-transform:scale3d(.1,.1,.1) translate3d(-1000px,0,0);transform:scale3d(.1,.1,.1) translate3d(-1000px,0,0);-webkit-animation-timing-function:cubic-bezier(.55,.055,.675,.19);animation-timing-function:cubic-bezier(.55,.055,.675,.19)}60%{opacity:1;-webkit-transform:scale3d(.475,.475,.475) translate3d(10px,0,0);transform:scale3d(.475,.475,.475) translate3d(10px,0,0);-webkit-animation-timing-function:cubic-bezier(.175,.885,.32,1);animation-timing-function:cubic-bezier(.175,.885,.32,1)}}@keyframes zoomInLeft{0%{opacity:0;-webkit-transform:scale3d(.1,.1,.1) translate3d(-1000px,0,0);transform:scale3d(.1,.1,.1) translate3d(-1000px,0,0);-webkit-animation-timing-function:cubic-bezier(.55,.055,.675,.19);animation-timing-function:cubic-bezier(.55,.055,.675,.19)}60%{opacity:1;-webkit-transform:scale3d(.475,.475,.475) translate3d(10px,0,0);transform:scale3d(.475,.475,.475) translate3d(10px,0,0);-webkit-animation-timing-function:cubic-bezier(.175,.885,.32,1);animation-timing-function:cubic-bezier(.175,.885,.32,1)}}.animate__zoomInLeft{-webkit-animation-name:zoomInLeft;animation-name:zoomInLeft}@-webkit-keyframes zoomInRight{0%{opacity:0;-webkit-transform:scale3d(.1,.1,.1) translate3d(1000px,0,0);transform:scale3d(.1,.1,.1) translate3d(1000px,0,0);-webkit-animation-timing-function:cubic-bezier(.55,.055,.675,.19);animation-timing-function:cubic-bezier(.55,.055,.675,.19)}60%{opacity:1;-webkit-transform:scale3d(.475,.475,.475) translate3d(-10px,0,0);transform:scale3d(.475,.475,.475) translate3d(-10px,0,0);-webkit-animation-timing-function:cubic-bezier(.175,.885,.32,1);animation-timing-function:cubic-bezier(.175,.885,.32,1)}}@keyframes zoomInRight{0%{opacity:0;-webkit-transform:scale3d(.1,.1,.1) translate3d(1000px,0,0);transform:scale3d(.1,.1,.1) translate3d(1000px,0,0);-webkit-animation-timing-function:cubic-bezier(.55,.055,.675,.19);animation-timing-function:cubic-bezier(.55,.055,.675,.19)}60%{opacity:1;-webkit-transform:scale3d(.475,.475,.475) translate3d(-10px,0,0);transform:scale3d(.475,.475,.475) translate3d(-10px,0,0);-webkit-animation-timing-function:cubic-bezier(.175,.885,.32,1);animation-timing-function:cubic-bezier(.175,.885,.32,1)}}.animate__zoomInRight{-webkit-animation-name:zoomInRight;animation-name:zoomInRight}@-webkit-keyframes zoomInUp{0%{opacity:0;-webkit-transform:scale3d(.1,.1,.1) translate3d(0,1000px,0);transform:scale3d(.1,.1,.1) translate3d(0,1000px,0);-webkit-animation-timing-function:cubic-bezier(.55,.055,.675,.19);animation-timing-function:cubic-bezier(.55,.055,.675,.19)}60%{opacity:1;-webkit-transform:scale3d(.475,.475,.475) translate3d(0,-60px,0);transform:scale3d(.475,.475,.475) translate3d(0,-60px,0);-webkit-animation-timing-function:cubic-bezier(.175,.885,.32,1);animation-timing-function:cubic-bezier(.175,.885,.32,1)}}@keyframes zoomInUp{0%{opacity:0;-webkit-transform:scale3d(.1,.1,.1) translate3d(0,1000px,0);transform:scale3d(.1,.1,.1) translate3d(0,1000px,0);-webkit-animation-timing-function:cubic-bezier(.55,.055,.675,.19);animation-timing-function:cubic-bezier(.55,.055,.675,.19)}60%{opacity:1;-webkit-transform:scale3d(.475,.475,.475) translate3d(0,-60px,0);transform:scale3d(.475,.475,.475) translate3d(0,-60px,0);-webkit-animation-timing-function:cubic-bezier(.175,.885,.32,1);animation-timing-function:cubic-bezier(.175,.885,.32,1)}}.animate__zoomInUp{-webkit-animation-name:zoomInUp;animation-name:zoomInUp}@-webkit-keyframes zoomOut{0%{opacity:1}50%{opacity:0;-webkit-transform:scale3d(.3,.3,.3);transform:scale3d(.3,.3,.3)}to{opacity:0}}@keyframes zoomOut{0%{opacity:1}50%{opacity:0;-webkit-transform:scale3d(.3,.3,.3);transform:scale3d(.3,.3,.3)}to{opacity:0}}.animate__zoomOut{-webkit-animation-name:zoomOut;animation-name:zoomOut}@-webkit-keyframes zoomOutDown{40%{opacity:1;-webkit-transform:scale3d(.475,.475,.475) translate3d(0,-60px,0);transform:scale3d(.475,.475,.475) translate3d(0,-60px,0);-webkit-animation-timing-function:cubic-bezier(.55,.055,.675,.19);animation-timing-function:cubic-bezier(.55,.055,.675,.19)}to{opacity:0;-webkit-transform:scale3d(.1,.1,.1) translate3d(0,2000px,0);transform:scale3d(.1,.1,.1) translate3d(0,2000px,0);-webkit-animation-timing-function:cubic-bezier(.175,.885,.32,1);animation-timing-function:cubic-bezier(.175,.885,.32,1)}}@keyframes zoomOutDown{40%{opacity:1;-webkit-transform:scale3d(.475,.475,.475) translate3d(0,-60px,0);transform:scale3d(.475,.475,.475) translate3d(0,-60px,0);-webkit-animation-timing-function:cubic-bezier(.55,.055,.675,.19);animation-timing-function:cubic-bezier(.55,.055,.675,.19)}to{opacity:0;-webkit-transform:scale3d(.1,.1,.1) translate3d(0,2000px,0);transform:scale3d(.1,.1,.1) translate3d(0,2000px,0);-webkit-animation-timing-function:cubic-bezier(.175,.885,.32,1);animation-timing-function:cubic-bezier(.175,.885,.32,1)}}.animate__zoomOutDown{-webkit-animation-name:zoomOutDown;animation-name:zoomOutDown;-webkit-transform-origin:center bottom;transform-origin:center bottom}@-webkit-keyframes zoomOutLeft{40%{opacity:1;-webkit-transform:scale3d(.475,.475,.475) translate3d(42px,0,0);transform:scale3d(.475,.475,.475) translate3d(42px,0,0)}to{opacity:0;-webkit-transform:scale(.1) translate3d(-2000px,0,0);transform:scale(.1) translate3d(-2000px,0,0)}}@keyframes zoomOutLeft{40%{opacity:1;-webkit-transform:scale3d(.475,.475,.475) translate3d(42px,0,0);transform:scale3d(.475,.475,.475) translate3d(42px,0,0)}to{opacity:0;-webkit-transform:scale(.1) translate3d(-2000px,0,0);transform:scale(.1) translate3d(-2000px,0,0)}}.animate__zoomOutLeft{-webkit-animation-name:zoomOutLeft;animation-name:zoomOutLeft;-webkit-transform-origin:left center;transform-origin:left center}@-webkit-keyframes zoomOutRight{40%{opacity:1;-webkit-transform:scale3d(.475,.475,.475) translate3d(-42px,0,0);transform:scale3d(.475,.475,.475) translate3d(-42px,0,0)}to{opacity:0;-webkit-transform:scale(.1) translate3d(2000px,0,0);transform:scale(.1) translate3d(2000px,0,0)}}@keyframes zoomOutRight{40%{opacity:1;-webkit-transform:scale3d(.475,.475,.475) translate3d(-42px,0,0);transform:scale3d(.475,.475,.475) translate3d(-42px,0,0)}to{opacity:0;-webkit-transform:scale(.1) translate3d(2000px,0,0);transform:scale(.1) translate3d(2000px,0,0)}}.animate__zoomOutRight{-webkit-animation-name:zoomOutRight;animation-name:zoomOutRight;-webkit-transform-origin:right center;transform-origin:right center}@-webkit-keyframes zoomOutUp{40%{opacity:1;-webkit-transform:scale3d(.475,.475,.475) translate3d(0,60px,0);transform:scale3d(.475,.475,.475) translate3d(0,60px,0);-webkit-animation-timing-function:cubic-bezier(.55,.055,.675,.19);animation-timing-function:cubic-bezier(.55,.055,.675,.19)}to{opacity:0;-webkit-transform:scale3d(.1,.1,.1) translate3d(0,-2000px,0);transform:scale3d(.1,.1,.1) translate3d(0,-2000px,0);-webkit-animation-timing-function:cubic-bezier(.175,.885,.32,1);animation-timing-function:cubic-bezier(.175,.885,.32,1)}}@keyframes zoomOutUp{40%{opacity:1;-webkit-transform:scale3d(.475,.475,.475) translate3d(0,60px,0);transform:scale3d(.475,.475,.475) translate3d(0,60px,0);-webkit-animation-timing-function:cubic-bezier(.55,.055,.675,.19);animation-timing-function:cubic-bezier(.55,.055,.675,.19)}to{opacity:0;-webkit-transform:scale3d(.1,.1,.1) translate3d(0,-2000px,0);transform:scale3d(.1,.1,.1) translate3d(0,-2000px,0);-webkit-animation-timing-function:cubic-bezier(.175,.885,.32,1);animation-timing-function:cubic-bezier(.175,.885,.32,1)}}.animate__zoomOutUp{-webkit-animation-name:zoomOutUp;animation-name:zoomOutUp;-webkit-transform-origin:center bottom;transform-origin:center bottom}@-webkit-keyframes slideInDown{0%{-webkit-transform:translate3d(0,-100%,0);transform:translate3d(0,-100%,0);visibility:visible}to{-webkit-transform:translate3d(0,0,0);transform:translateZ(0)}}@keyframes slideInDown{0%{-webkit-transform:translate3d(0,-100%,0);transform:translate3d(0,-100%,0);visibility:visible}to{-webkit-transform:translate3d(0,0,0);transform:translateZ(0)}}.animate__slideInDown{-webkit-animation-name:slideInDown;animation-name:slideInDown}@-webkit-keyframes slideInLeft{0%{-webkit-transform:translate3d(-100%,0,0);transform:translate3d(-100%,0,0);visibility:visible}to{-webkit-transform:translate3d(0,0,0);transform:translateZ(0)}}@keyframes slideInLeft{0%{-webkit-transform:translate3d(-100%,0,0);transform:translate3d(-100%,0,0);visibility:visible}to{-webkit-transform:translate3d(0,0,0);transform:translateZ(0)}}.animate__slideInLeft{-webkit-animation-name:slideInLeft;animation-name:slideInLeft}@-webkit-keyframes slideInRight{0%{-webkit-transform:translate3d(100%,0,0);transform:translate3d(100%,0,0);visibility:visible}to{-webkit-transform:translate3d(0,0,0);transform:translateZ(0)}}@keyframes slideInRight{0%{-webkit-transform:translate3d(100%,0,0);transform:translate3d(100%,0,0);visibility:visible}to{-webkit-transform:translate3d(0,0,0);transform:translateZ(0)}}.animate__slideInRight{-webkit-animation-name:slideInRight;animation-name:slideInRight}@-webkit-keyframes slideInUp{0%{-webkit-transform:translate3d(0,100%,0);transform:translate3d(0,100%,0);visibility:visible}to{-webkit-transform:translate3d(0,0,0);transform:translateZ(0)}}@keyframes slideInUp{0%{-webkit-transform:translate3d(0,100%,0);transform:translate3d(0,100%,0);visibility:visible}to{-webkit-transform:translate3d(0,0,0);transform:translateZ(0)}}.animate__slideInUp{-webkit-animation-name:slideInUp;animation-name:slideInUp}@-webkit-keyframes slideOutDown{0%{-webkit-transform:translate3d(0,0,0);transform:translateZ(0)}to{visibility:hidden;-webkit-transform:translate3d(0,100%,0);transform:translate3d(0,100%,0)}}@keyframes slideOutDown{0%{-webkit-transform:translate3d(0,0,0);transform:translateZ(0)}to{visibility:hidden;-webkit-transform:translate3d(0,100%,0);transform:translate3d(0,100%,0)}}.animate__slideOutDown{-webkit-animation-name:slideOutDown;animation-name:slideOutDown}@-webkit-keyframes slideOutLeft{0%{-webkit-transform:translate3d(0,0,0);transform:translateZ(0)}to{visibility:hidden;-webkit-transform:translate3d(-100%,0,0);transform:translate3d(-100%,0,0)}}@keyframes slideOutLeft{0%{-webkit-transform:translate3d(0,0,0);transform:translateZ(0)}to{visibility:hidden;-webkit-transform:translate3d(-100%,0,0);transform:translate3d(-100%,0,0)}}.animate__slideOutLeft{-webkit-animation-name:slideOutLeft;animation-name:slideOutLeft}@-webkit-keyframes slideOutRight{0%{-webkit-transform:translate3d(0,0,0);transform:translateZ(0)}to{visibility:hidden;-webkit-transform:translate3d(100%,0,0);transform:translate3d(100%,0,0)}}@keyframes slideOutRight{0%{-webkit-transform:translate3d(0,0,0);transform:translateZ(0)}to{visibility:hidden;-webkit-transform:translate3d(100%,0,0);transform:translate3d(100%,0,0)}}.animate__slideOutRight{-webkit-animation-name:slideOutRight;animation-name:slideOutRight}@-webkit-keyframes slideOutUp{0%{-webkit-transform:translate3d(0,0,0);transform:translateZ(0)}to{visibility:hidden;-webkit-transform:translate3d(0,-100%,0);transform:translate3d(0,-100%,0)}}@keyframes slideOutUp{0%{-webkit-transform:translate3d(0,0,0);transform:translateZ(0)}to{visibility:hidden;-webkit-transform:translate3d(0,-100%,0);transform:translate3d(0,-100%,0)}}.animate__slideOutUp{-webkit-animation-name:slideOutUp;animation-name:slideOutUp}.dropdown-menu[data-v-e53c14b2]{right:1rem;min-width:200px}.dropdown-item.disabled[data-v-e53c14b2],.dropdown-item[data-v-e53c14b2]:disabled{opacity:.7}.slide-fade-leave-active[data-v-4a343fe2],.slide-fade-enter-active[data-v-4a343fe2]{transition:all .2s cubic-bezier(.82,.58,.17,.9)}.slide-fade-enter-from[data-v-4a343fe2],.slide-fade-leave-to[data-v-4a343fe2]{transform:translateY(20px);opacity:0;filter:blur(3px)}.subMenuBtn.active[data-v-4a343fe2]{background-color:#ffffff20}.peerCard[data-v-4a343fe2]{transition:box-shadow .1s cubic-bezier(.82,.58,.17,.9)}.peerCard[data-v-4a343fe2]:hover{box-shadow:var(--bs-box-shadow)!important}.toggleShowKey[data-v-2c571abb]{position:absolute;top:35px;right:12px}.list-move[data-v-6d5fc831],.list-enter-active[data-v-6d5fc831],.list-leave-active[data-v-6d5fc831]{transition:all .3s ease}.list-enter-from[data-v-6d5fc831],.list-leave-to[data-v-6d5fc831]{opacity:0;transform:translateY(10px)}.list-leave-active[data-v-6d5fc831]{position:absolute}.peerSettingContainer[data-v-3f34f584]{background-color:#00000060;z-index:9998}div[data-v-3f34f584]{transition:.2s ease-in-out}.inactiveField[data-v-3f34f584]{opacity:.4}.card[data-v-3f34f584]{max-height:100%}.btn.disabled[data-v-6a5aba2a]{opacity:1;background-color:#0d6efd17;border-color:transparent}[data-v-8f3f1b93]{font-size:.875rem}input[data-v-8f3f1b93]{padding:.1rem .4rem}input[data-v-8f3f1b93]:disabled{border-color:transparent;background-color:#0d6efd17;color:#0d6efd}.dp__main[data-v-8f3f1b93]{width:auto;flex-grow:1;--dp-input-padding: 2.5px 30px 2.5px 12px;--dp-border-radius: .5rem}.schedulePeerJobTransition-move[data-v-5bbdd42b],.schedulePeerJobTransition-enter-active[data-v-5bbdd42b],.schedulePeerJobTransition-leave-active[data-v-5bbdd42b]{transition:all .4s cubic-bezier(.82,.58,.17,.9)}.schedulePeerJobTransition-enter-from[data-v-5bbdd42b],.schedulePeerJobTransition-leave-to[data-v-5bbdd42b]{opacity:0;transform:scale(.9)}.schedulePeerJobTransition-leave-active[data-v-5bbdd42b]{position:absolute;width:100%}.peerNav .nav-link[data-v-dc7f794a]{&.active[data-v-dc7f794a]{//background: linear-gradient(var(--degree),var(--brandColor1) var(--distance2),var(--brandColor2) 100%);//color: white;background-color:#efefef}}:root,:host{--ol-background-color: white;--ol-accent-background-color: #F5F5F5;--ol-subtle-background-color: rgba(128, 128, 128, .25);--ol-partial-background-color: rgba(255, 255, 255, .75);--ol-foreground-color: #333333;--ol-subtle-foreground-color: #666666;--ol-brand-color: #00AAFF}.ol-box{box-sizing:border-box;border-radius:2px;border:1.5px solid var(--ol-background-color);background-color:var(--ol-partial-background-color)}.ol-mouse-position{top:8px;right:8px;position:absolute}.ol-scale-line{background:var(--ol-partial-background-color);border-radius:4px;bottom:8px;left:8px;padding:2px;position:absolute}.ol-scale-line-inner{border:1px solid var(--ol-subtle-foreground-color);border-top:none;color:var(--ol-foreground-color);font-size:10px;text-align:center;margin:1px;will-change:contents,width;transition:all .25s}.ol-scale-bar{position:absolute;bottom:8px;left:8px}.ol-scale-bar-inner{display:flex}.ol-scale-step-marker{width:1px;height:15px;background-color:var(--ol-foreground-color);float:right;z-index:10}.ol-scale-step-text{position:absolute;bottom:-5px;font-size:10px;z-index:11;color:var(--ol-foreground-color);text-shadow:-1.5px 0 var(--ol-partial-background-color),0 1.5px var(--ol-partial-background-color),1.5px 0 var(--ol-partial-background-color),0 -1.5px var(--ol-partial-background-color)}.ol-scale-text{position:absolute;font-size:12px;text-align:center;bottom:25px;color:var(--ol-foreground-color);text-shadow:-1.5px 0 var(--ol-partial-background-color),0 1.5px var(--ol-partial-background-color),1.5px 0 var(--ol-partial-background-color),0 -1.5px var(--ol-partial-background-color)}.ol-scale-singlebar{position:relative;height:10px;z-index:9;box-sizing:border-box;border:1px solid var(--ol-foreground-color)}.ol-scale-singlebar-even{background-color:var(--ol-subtle-foreground-color)}.ol-scale-singlebar-odd{background-color:var(--ol-background-color)}.ol-unsupported{display:none}.ol-viewport,.ol-unselectable{-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;user-select:none;-webkit-tap-highlight-color:transparent}.ol-viewport canvas{all:unset;overflow:hidden}.ol-viewport{touch-action:pan-x pan-y}.ol-selectable{-webkit-touch-callout:default;-webkit-user-select:text;-moz-user-select:text;user-select:text}.ol-grabbing{cursor:-webkit-grabbing;cursor:-moz-grabbing;cursor:grabbing}.ol-grab{cursor:move;cursor:-webkit-grab;cursor:-moz-grab;cursor:grab}.ol-control{position:absolute;background-color:var(--ol-subtle-background-color);border-radius:4px}.ol-zoom{top:.5em;left:.5em}.ol-rotate{top:.5em;right:.5em;transition:opacity .25s linear,visibility 0s linear}.ol-rotate.ol-hidden{opacity:0;visibility:hidden;transition:opacity .25s linear,visibility 0s linear .25s}.ol-zoom-extent{top:4.643em;left:.5em}.ol-full-screen{right:.5em;top:.5em}.ol-control button{display:block;margin:1px;padding:0;color:var(--ol-subtle-foreground-color);font-weight:700;text-decoration:none;font-size:inherit;text-align:center;height:1.375em;width:1.375em;line-height:.4em;background-color:var(--ol-background-color);border:none;border-radius:2px}.ol-control button::-moz-focus-inner{border:none;padding:0}.ol-zoom-extent button{line-height:1.4em}.ol-compass{display:block;font-weight:400;will-change:transform}.ol-touch .ol-control button{font-size:1.5em}.ol-touch .ol-zoom-extent{top:5.5em}.ol-control button:hover,.ol-control button:focus{text-decoration:none;outline:1px solid var(--ol-subtle-foreground-color);color:var(--ol-foreground-color)}.ol-zoom .ol-zoom-in{border-radius:2px 2px 0 0}.ol-zoom .ol-zoom-out{border-radius:0 0 2px 2px}.ol-attribution{text-align:right;bottom:.5em;right:.5em;max-width:calc(100% - 1.3em);display:flex;flex-flow:row-reverse;align-items:center}.ol-attribution a{color:var(--ol-subtle-foreground-color);text-decoration:none}.ol-attribution ul{margin:0;padding:1px .5em;color:var(--ol-foreground-color);text-shadow:0 0 2px var(--ol-background-color);font-size:12px}.ol-attribution li{display:inline;list-style:none}.ol-attribution li:not(:last-child):after{content:" "}.ol-attribution img{max-height:2em;max-width:inherit;vertical-align:middle}.ol-attribution button{flex-shrink:0}.ol-attribution.ol-collapsed ul{display:none}.ol-attribution:not(.ol-collapsed){background:var(--ol-partial-background-color)}.ol-attribution.ol-uncollapsible{bottom:0;right:0;border-radius:4px 0 0}.ol-attribution.ol-uncollapsible img{margin-top:-.2em;max-height:1.6em}.ol-attribution.ol-uncollapsible button{display:none}.ol-zoomslider{top:4.5em;left:.5em;height:200px}.ol-zoomslider button{position:relative;height:10px}.ol-touch .ol-zoomslider{top:5.5em}.ol-overviewmap{left:.5em;bottom:.5em}.ol-overviewmap.ol-uncollapsible{bottom:0;left:0;border-radius:0 4px 0 0}.ol-overviewmap .ol-overviewmap-map,.ol-overviewmap button{display:block}.ol-overviewmap .ol-overviewmap-map{border:1px solid var(--ol-subtle-foreground-color);height:150px;width:150px}.ol-overviewmap:not(.ol-collapsed) button{bottom:0;left:0;position:absolute}.ol-overviewmap.ol-collapsed .ol-overviewmap-map,.ol-overviewmap.ol-uncollapsible button{display:none}.ol-overviewmap:not(.ol-collapsed){background:var(--ol-subtle-background-color)}.ol-overviewmap-box{border:1.5px dotted var(--ol-subtle-foreground-color)}.ol-overviewmap .ol-overviewmap-box:hover{cursor:move}.ol-overviewmap .ol-viewport:hover{cursor:pointer}.ol-layer canvas{border-radius:var(--bs-border-radius-lg)!important}#map{height:300px}.pingPlaceholder[data-v-f5cd36ce]{width:100%;height:79.98px}.ping-move[data-v-f5cd36ce],.ping-enter-active[data-v-f5cd36ce],.ping-leave-active[data-v-f5cd36ce]{transition:all .4s cubic-bezier(.82,.58,.17,.9)}.ping-leave-active[data-v-f5cd36ce]{position:absolute;width:100%}.ping-enter-from[data-v-f5cd36ce],.ping-leave-to[data-v-f5cd36ce]{opacity:0;//transform: scale(1.1);filter:blur(3px)}.pingPlaceholder[data-v-d80ce3c9]{width:100%;height:40px}.ping-leave-active[data-v-d80ce3c9]{position:absolute}table th[data-v-d80ce3c9],table td[data-v-d80ce3c9]{padding:.5rem}.table[data-v-d80ce3c9]>:not(caption)>*>*{background-color:transparent!important}.ping-move[data-v-d80ce3c9],.ping-enter-active[data-v-d80ce3c9],.ping-leave-active[data-v-d80ce3c9]{transition:all .4s cubic-bezier(.82,.58,.17,.9)}.ping-leave-active[data-v-d80ce3c9]{position:absolute;width:100%}.ping-enter-from[data-v-d80ce3c9],.ping-leave-to[data-v-d80ce3c9]{opacity:0;//transform: scale(1.1);filter:blur(3px)}.animate__fadeInUp[data-v-1b44aacd]{animation-timing-function:cubic-bezier(.42,0,.22,1)}.app-enter-active[data-v-822f113b],.app-leave-active[data-v-822f113b]{transition:all .3s cubic-bezier(.82,.58,.17,.9)}.app-enter-from[data-v-822f113b]{transform:translateY(20px);opacity:0}.app-leave-to[data-v-822f113b]{transform:translateY(-20px);opacity:0}@media screen and (min-width: 768px){.navbarBtn[data-v-822f113b]{display:none}} diff --git a/src/static/app/dist/assets/index.js b/src/static/app/dist/assets/index.js index 2c8de25..bbb5490 100644 --- a/src/static/app/dist/assets/index.js +++ b/src/static/app/dist/assets/index.js @@ -1,67 +1,76 @@ -(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))s(i);new MutationObserver(i=>{for(const o of i)if(o.type==="childList")for(const r of o.addedNodes)r.tagName==="LINK"&&r.rel==="modulepreload"&&s(r)}).observe(document,{childList:!0,subtree:!0});function n(i){const o={};return i.integrity&&(o.integrity=i.integrity),i.referrerPolicy&&(o.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?o.credentials="include":i.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function s(i){if(i.ep)return;i.ep=!0;const o=n(i);fetch(i.href,o)}})();var Q_=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function iS(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function oS(t){if(t.__esModule)return t;var e=t.default;if(typeof e=="function"){var n=function s(){return this instanceof s?Reflect.construct(e,arguments,this.constructor):e.apply(this,arguments)};n.prototype=e.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(t).forEach(function(s){var i=Object.getOwnPropertyDescriptor(t,s);Object.defineProperty(n,s,i.get?i:{enumerable:!0,get:function(){return t[s]}})}),n}var rS={exports:{}},vn="top",Rn="bottom",Nn="right",yn="left",Ac="auto",Pr=[vn,Rn,Nn,yn],xo="start",rr="end",Z_="clippingParents",fh="viewport",Jo="popper",eb="reference",vd=Pr.reduce(function(t,e){return t.concat([e+"-"+xo,e+"-"+rr])},[]),ph=[].concat(Pr,[Ac]).reduce(function(t,e){return t.concat([e,e+"-"+xo,e+"-"+rr])},[]),tb="beforeRead",nb="read",sb="afterRead",ib="beforeMain",ob="main",rb="afterMain",ab="beforeWrite",lb="write",cb="afterWrite",ub=[tb,nb,sb,ib,ob,rb,ab,lb,cb];function As(t){return t?(t.nodeName||"").toLowerCase():null}function Fn(t){if(t==null)return window;if(t.toString()!=="[object Window]"){var e=t.ownerDocument;return e&&e.defaultView||window}return t}function ko(t){var e=Fn(t).Element;return t instanceof e||t instanceof Element}function Gn(t){var e=Fn(t).HTMLElement;return t instanceof e||t instanceof HTMLElement}function gh(t){if(typeof ShadowRoot>"u")return!1;var e=Fn(t).ShadowRoot;return t instanceof e||t instanceof ShadowRoot}function aS(t){var e=t.state;Object.keys(e.elements).forEach(function(n){var s=e.styles[n]||{},i=e.attributes[n]||{},o=e.elements[n];!Gn(o)||!As(o)||(Object.assign(o.style,s),Object.keys(i).forEach(function(r){var a=i[r];a===!1?o.removeAttribute(r):o.setAttribute(r,a===!0?"":a)}))})}function lS(t){var e=t.state,n={popper:{position:e.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(e.elements.popper.style,n.popper),e.styles=n,e.elements.arrow&&Object.assign(e.elements.arrow.style,n.arrow),function(){Object.keys(e.elements).forEach(function(s){var i=e.elements[s],o=e.attributes[s]||{},r=Object.keys(e.styles.hasOwnProperty(s)?e.styles[s]:n[s]),a=r.reduce(function(l,c){return l[c]="",l},{});!Gn(i)||!As(i)||(Object.assign(i.style,a),Object.keys(o).forEach(function(l){i.removeAttribute(l)}))})}}const mh={name:"applyStyles",enabled:!0,phase:"write",fn:aS,effect:lS,requires:["computeStyles"]};function ks(t){return t.split("-")[0]}var po=Math.max,nc=Math.min,ar=Math.round;function yd(){var t=navigator.userAgentData;return t!=null&&t.brands&&Array.isArray(t.brands)?t.brands.map(function(e){return e.brand+"/"+e.version}).join(" "):navigator.userAgent}function db(){return!/^((?!chrome|android).)*safari/i.test(yd())}function lr(t,e,n){e===void 0&&(e=!1),n===void 0&&(n=!1);var s=t.getBoundingClientRect(),i=1,o=1;e&&Gn(t)&&(i=t.offsetWidth>0&&ar(s.width)/t.offsetWidth||1,o=t.offsetHeight>0&&ar(s.height)/t.offsetHeight||1);var r=ko(t)?Fn(t):window,a=r.visualViewport,l=!db()&&n,c=(s.left+(l&&a?a.offsetLeft:0))/i,u=(s.top+(l&&a?a.offsetTop:0))/o,d=s.width/i,f=s.height/o;return{width:d,height:f,top:u,right:c+d,bottom:u+f,left:c,x:c,y:u}}function _h(t){var e=lr(t),n=t.offsetWidth,s=t.offsetHeight;return Math.abs(e.width-n)<=1&&(n=e.width),Math.abs(e.height-s)<=1&&(s=e.height),{x:t.offsetLeft,y:t.offsetTop,width:n,height:s}}function hb(t,e){var n=e.getRootNode&&e.getRootNode();if(t.contains(e))return!0;if(n&&gh(n)){var s=e;do{if(s&&t.isSameNode(s))return!0;s=s.parentNode||s.host}while(s)}return!1}function Js(t){return Fn(t).getComputedStyle(t)}function cS(t){return["table","td","th"].indexOf(As(t))>=0}function Ii(t){return((ko(t)?t.ownerDocument:t.document)||window.document).documentElement}function Cc(t){return As(t)==="html"?t:t.assignedSlot||t.parentNode||(gh(t)?t.host:null)||Ii(t)}function Rp(t){return!Gn(t)||Js(t).position==="fixed"?null:t.offsetParent}function uS(t){var e=/firefox/i.test(yd()),n=/Trident/i.test(yd());if(n&&Gn(t)){var s=Js(t);if(s.position==="fixed")return null}var i=Cc(t);for(gh(i)&&(i=i.host);Gn(i)&&["html","body"].indexOf(As(i))<0;){var o=Js(i);if(o.transform!=="none"||o.perspective!=="none"||o.contain==="paint"||["transform","perspective"].indexOf(o.willChange)!==-1||e&&o.willChange==="filter"||e&&o.filter&&o.filter!=="none")return i;i=i.parentNode}return null}function za(t){for(var e=Fn(t),n=Rp(t);n&&cS(n)&&Js(n).position==="static";)n=Rp(n);return n&&(As(n)==="html"||As(n)==="body"&&Js(n).position==="static")?e:n||uS(t)||e}function bh(t){return["top","bottom"].indexOf(t)>=0?"x":"y"}function ra(t,e,n){return po(t,nc(e,n))}function dS(t,e,n){var s=ra(t,e,n);return s>n?n:s}function fb(){return{top:0,right:0,bottom:0,left:0}}function pb(t){return Object.assign({},fb(),t)}function gb(t,e){return e.reduce(function(n,s){return n[s]=t,n},{})}var hS=function(e,n){return e=typeof e=="function"?e(Object.assign({},n.rects,{placement:n.placement})):e,pb(typeof e!="number"?e:gb(e,Pr))};function fS(t){var e,n=t.state,s=t.name,i=t.options,o=n.elements.arrow,r=n.modifiersData.popperOffsets,a=ks(n.placement),l=bh(a),c=[yn,Nn].indexOf(a)>=0,u=c?"height":"width";if(!(!o||!r)){var d=hS(i.padding,n),f=_h(o),g=l==="y"?vn:yn,_=l==="y"?Rn:Nn,m=n.rects.reference[u]+n.rects.reference[l]-r[l]-n.rects.popper[u],y=r[l]-n.rects.reference[l],v=za(o),$=v?l==="y"?v.clientHeight||0:v.clientWidth||0:0,A=m/2-y/2,D=d[g],x=$-f[u]-d[_],w=$/2-f[u]/2+A,S=ra(D,w,x),T=l;n.modifiersData[s]=(e={},e[T]=S,e.centerOffset=S-w,e)}}function pS(t){var e=t.state,n=t.options,s=n.element,i=s===void 0?"[data-popper-arrow]":s;i!=null&&(typeof i=="string"&&(i=e.elements.popper.querySelector(i),!i)||hb(e.elements.popper,i)&&(e.elements.arrow=i))}const mb={name:"arrow",enabled:!0,phase:"main",fn:fS,effect:pS,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function cr(t){return t.split("-")[1]}var gS={top:"auto",right:"auto",bottom:"auto",left:"auto"};function mS(t,e){var n=t.x,s=t.y,i=e.devicePixelRatio||1;return{x:ar(n*i)/i||0,y:ar(s*i)/i||0}}function Np(t){var e,n=t.popper,s=t.popperRect,i=t.placement,o=t.variation,r=t.offsets,a=t.position,l=t.gpuAcceleration,c=t.adaptive,u=t.roundOffsets,d=t.isFixed,f=r.x,g=f===void 0?0:f,_=r.y,m=_===void 0?0:_,y=typeof u=="function"?u({x:g,y:m}):{x:g,y:m};g=y.x,m=y.y;var v=r.hasOwnProperty("x"),$=r.hasOwnProperty("y"),A=yn,D=vn,x=window;if(c){var w=za(n),S="clientHeight",T="clientWidth";if(w===Fn(n)&&(w=Ii(n),Js(w).position!=="static"&&a==="absolute"&&(S="scrollHeight",T="scrollWidth")),w=w,i===vn||(i===yn||i===Nn)&&o===rr){D=Rn;var M=d&&w===x&&x.visualViewport?x.visualViewport.height:w[S];m-=M-s.height,m*=l?1:-1}if(i===yn||(i===vn||i===Rn)&&o===rr){A=Nn;var E=d&&w===x&&x.visualViewport?x.visualViewport.width:w[T];g-=E-s.width,g*=l?1:-1}}var V=Object.assign({position:a},c&&gS),X=u===!0?mS({x:g,y:m},Fn(n)):{x:g,y:m};if(g=X.x,m=X.y,l){var le;return Object.assign({},V,(le={},le[D]=$?"0":"",le[A]=v?"0":"",le.transform=(x.devicePixelRatio||1)<=1?"translate("+g+"px, "+m+"px)":"translate3d("+g+"px, "+m+"px, 0)",le))}return Object.assign({},V,(e={},e[D]=$?m+"px":"",e[A]=v?g+"px":"",e.transform="",e))}function _S(t){var e=t.state,n=t.options,s=n.gpuAcceleration,i=s===void 0?!0:s,o=n.adaptive,r=o===void 0?!0:o,a=n.roundOffsets,l=a===void 0?!0:a,c={placement:ks(e.placement),variation:cr(e.placement),popper:e.elements.popper,popperRect:e.rects.popper,gpuAcceleration:i,isFixed:e.options.strategy==="fixed"};e.modifiersData.popperOffsets!=null&&(e.styles.popper=Object.assign({},e.styles.popper,Np(Object.assign({},c,{offsets:e.modifiersData.popperOffsets,position:e.options.strategy,adaptive:r,roundOffsets:l})))),e.modifiersData.arrow!=null&&(e.styles.arrow=Object.assign({},e.styles.arrow,Np(Object.assign({},c,{offsets:e.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:l})))),e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-placement":e.placement})}const vh={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:_S,data:{}};var ml={passive:!0};function bS(t){var e=t.state,n=t.instance,s=t.options,i=s.scroll,o=i===void 0?!0:i,r=s.resize,a=r===void 0?!0:r,l=Fn(e.elements.popper),c=[].concat(e.scrollParents.reference,e.scrollParents.popper);return o&&c.forEach(function(u){u.addEventListener("scroll",n.update,ml)}),a&&l.addEventListener("resize",n.update,ml),function(){o&&c.forEach(function(u){u.removeEventListener("scroll",n.update,ml)}),a&&l.removeEventListener("resize",n.update,ml)}}const yh={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:bS,data:{}};var vS={left:"right",right:"left",bottom:"top",top:"bottom"};function Kl(t){return t.replace(/left|right|bottom|top/g,function(e){return vS[e]})}var yS={start:"end",end:"start"};function Fp(t){return t.replace(/start|end/g,function(e){return yS[e]})}function wh(t){var e=Fn(t),n=e.pageXOffset,s=e.pageYOffset;return{scrollLeft:n,scrollTop:s}}function xh(t){return lr(Ii(t)).left+wh(t).scrollLeft}function wS(t,e){var n=Fn(t),s=Ii(t),i=n.visualViewport,o=s.clientWidth,r=s.clientHeight,a=0,l=0;if(i){o=i.width,r=i.height;var c=db();(c||!c&&e==="fixed")&&(a=i.offsetLeft,l=i.offsetTop)}return{width:o,height:r,x:a+xh(t),y:l}}function xS(t){var e,n=Ii(t),s=wh(t),i=(e=t.ownerDocument)==null?void 0:e.body,o=po(n.scrollWidth,n.clientWidth,i?i.scrollWidth:0,i?i.clientWidth:0),r=po(n.scrollHeight,n.clientHeight,i?i.scrollHeight:0,i?i.clientHeight:0),a=-s.scrollLeft+xh(t),l=-s.scrollTop;return Js(i||n).direction==="rtl"&&(a+=po(n.clientWidth,i?i.clientWidth:0)-o),{width:o,height:r,x:a,y:l}}function kh(t){var e=Js(t),n=e.overflow,s=e.overflowX,i=e.overflowY;return/auto|scroll|overlay|hidden/.test(n+i+s)}function _b(t){return["html","body","#document"].indexOf(As(t))>=0?t.ownerDocument.body:Gn(t)&&kh(t)?t:_b(Cc(t))}function aa(t,e){var n;e===void 0&&(e=[]);var s=_b(t),i=s===((n=t.ownerDocument)==null?void 0:n.body),o=Fn(s),r=i?[o].concat(o.visualViewport||[],kh(s)?s:[]):s,a=e.concat(r);return i?a:a.concat(aa(Cc(r)))}function wd(t){return Object.assign({},t,{left:t.x,top:t.y,right:t.x+t.width,bottom:t.y+t.height})}function kS(t,e){var n=lr(t,!1,e==="fixed");return n.top=n.top+t.clientTop,n.left=n.left+t.clientLeft,n.bottom=n.top+t.clientHeight,n.right=n.left+t.clientWidth,n.width=t.clientWidth,n.height=t.clientHeight,n.x=n.left,n.y=n.top,n}function Bp(t,e,n){return e===fh?wd(wS(t,n)):ko(e)?kS(e,n):wd(xS(Ii(t)))}function SS(t){var e=aa(Cc(t)),n=["absolute","fixed"].indexOf(Js(t).position)>=0,s=n&&Gn(t)?za(t):t;return ko(s)?e.filter(function(i){return ko(i)&&hb(i,s)&&As(i)!=="body"}):[]}function $S(t,e,n,s){var i=e==="clippingParents"?SS(t):[].concat(e),o=[].concat(i,[n]),r=o[0],a=o.reduce(function(l,c){var u=Bp(t,c,s);return l.top=po(u.top,l.top),l.right=nc(u.right,l.right),l.bottom=nc(u.bottom,l.bottom),l.left=po(u.left,l.left),l},Bp(t,r,s));return a.width=a.right-a.left,a.height=a.bottom-a.top,a.x=a.left,a.y=a.top,a}function bb(t){var e=t.reference,n=t.element,s=t.placement,i=s?ks(s):null,o=s?cr(s):null,r=e.x+e.width/2-n.width/2,a=e.y+e.height/2-n.height/2,l;switch(i){case vn:l={x:r,y:e.y-n.height};break;case Rn:l={x:r,y:e.y+e.height};break;case Nn:l={x:e.x+e.width,y:a};break;case yn:l={x:e.x-n.width,y:a};break;default:l={x:e.x,y:e.y}}var c=i?bh(i):null;if(c!=null){var u=c==="y"?"height":"width";switch(o){case xo:l[c]=l[c]-(e[u]/2-n[u]/2);break;case rr:l[c]=l[c]+(e[u]/2-n[u]/2);break}}return l}function ur(t,e){e===void 0&&(e={});var n=e,s=n.placement,i=s===void 0?t.placement:s,o=n.strategy,r=o===void 0?t.strategy:o,a=n.boundary,l=a===void 0?Z_:a,c=n.rootBoundary,u=c===void 0?fh:c,d=n.elementContext,f=d===void 0?Jo:d,g=n.altBoundary,_=g===void 0?!1:g,m=n.padding,y=m===void 0?0:m,v=pb(typeof y!="number"?y:gb(y,Pr)),$=f===Jo?eb:Jo,A=t.rects.popper,D=t.elements[_?$:f],x=$S(ko(D)?D:D.contextElement||Ii(t.elements.popper),l,u,r),w=lr(t.elements.reference),S=bb({reference:w,element:A,strategy:"absolute",placement:i}),T=wd(Object.assign({},A,S)),M=f===Jo?T:w,E={top:x.top-M.top+v.top,bottom:M.bottom-x.bottom+v.bottom,left:x.left-M.left+v.left,right:M.right-x.right+v.right},V=t.modifiersData.offset;if(f===Jo&&V){var X=V[i];Object.keys(E).forEach(function(le){var Y=[Nn,Rn].indexOf(le)>=0?1:-1,R=[vn,Rn].indexOf(le)>=0?"y":"x";E[le]+=X[R]*Y})}return E}function AS(t,e){e===void 0&&(e={});var n=e,s=n.placement,i=n.boundary,o=n.rootBoundary,r=n.padding,a=n.flipVariations,l=n.allowedAutoPlacements,c=l===void 0?ph:l,u=cr(s),d=u?a?vd:vd.filter(function(_){return cr(_)===u}):Pr,f=d.filter(function(_){return c.indexOf(_)>=0});f.length===0&&(f=d);var g=f.reduce(function(_,m){return _[m]=ur(t,{placement:m,boundary:i,rootBoundary:o,padding:r})[ks(m)],_},{});return Object.keys(g).sort(function(_,m){return g[_]-g[m]})}function CS(t){if(ks(t)===Ac)return[];var e=Kl(t);return[Fp(t),e,Fp(e)]}function ES(t){var e=t.state,n=t.options,s=t.name;if(!e.modifiersData[s]._skip){for(var i=n.mainAxis,o=i===void 0?!0:i,r=n.altAxis,a=r===void 0?!0:r,l=n.fallbackPlacements,c=n.padding,u=n.boundary,d=n.rootBoundary,f=n.altBoundary,g=n.flipVariations,_=g===void 0?!0:g,m=n.allowedAutoPlacements,y=e.options.placement,v=ks(y),$=v===y,A=l||($||!_?[Kl(y)]:CS(y)),D=[y].concat(A).reduce(function(L,te){return L.concat(ks(te)===Ac?AS(e,{placement:te,boundary:u,rootBoundary:d,padding:c,flipVariations:_,allowedAutoPlacements:m}):te)},[]),x=e.rects.reference,w=e.rects.popper,S=new Map,T=!0,M=D[0],E=0;E=0,R=Y?"width":"height",I=ur(e,{placement:V,boundary:u,rootBoundary:d,altBoundary:f,padding:c}),H=Y?le?Nn:yn:le?Rn:vn;x[R]>w[R]&&(H=Kl(H));var Z=Kl(H),ee=[];if(o&&ee.push(I[X]<=0),a&&ee.push(I[H]<=0,I[Z]<=0),ee.every(function(L){return L})){M=V,T=!1;break}S.set(V,ee)}if(T)for(var ce=_?3:1,ve=function(te){var ae=D.find(function(P){var ie=S.get(P);if(ie)return ie.slice(0,te).every(function(de){return de})});if(ae)return M=ae,"break"},U=ce;U>0;U--){var Q=ve(U);if(Q==="break")break}e.placement!==M&&(e.modifiersData[s]._skip=!0,e.placement=M,e.reset=!0)}}const vb={name:"flip",enabled:!0,phase:"main",fn:ES,requiresIfExists:["offset"],data:{_skip:!1}};function Vp(t,e,n){return n===void 0&&(n={x:0,y:0}),{top:t.top-e.height-n.y,right:t.right-e.width+n.x,bottom:t.bottom-e.height+n.y,left:t.left-e.width-n.x}}function Hp(t){return[vn,Nn,Rn,yn].some(function(e){return t[e]>=0})}function TS(t){var e=t.state,n=t.name,s=e.rects.reference,i=e.rects.popper,o=e.modifiersData.preventOverflow,r=ur(e,{elementContext:"reference"}),a=ur(e,{altBoundary:!0}),l=Vp(r,s),c=Vp(a,i,o),u=Hp(l),d=Hp(c);e.modifiersData[n]={referenceClippingOffsets:l,popperEscapeOffsets:c,isReferenceHidden:u,hasPopperEscaped:d},e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-reference-hidden":u,"data-popper-escaped":d})}const yb={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:TS};function PS(t,e,n){var s=ks(t),i=[yn,vn].indexOf(s)>=0?-1:1,o=typeof n=="function"?n(Object.assign({},e,{placement:t})):n,r=o[0],a=o[1];return r=r||0,a=(a||0)*i,[yn,Nn].indexOf(s)>=0?{x:a,y:r}:{x:r,y:a}}function MS(t){var e=t.state,n=t.options,s=t.name,i=n.offset,o=i===void 0?[0,0]:i,r=ph.reduce(function(u,d){return u[d]=PS(d,e.rects,o),u},{}),a=r[e.placement],l=a.x,c=a.y;e.modifiersData.popperOffsets!=null&&(e.modifiersData.popperOffsets.x+=l,e.modifiersData.popperOffsets.y+=c),e.modifiersData[s]=r}const wb={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:MS};function DS(t){var e=t.state,n=t.name;e.modifiersData[n]=bb({reference:e.rects.reference,element:e.rects.popper,strategy:"absolute",placement:e.placement})}const Sh={name:"popperOffsets",enabled:!0,phase:"read",fn:DS,data:{}};function OS(t){return t==="x"?"y":"x"}function IS(t){var e=t.state,n=t.options,s=t.name,i=n.mainAxis,o=i===void 0?!0:i,r=n.altAxis,a=r===void 0?!1:r,l=n.boundary,c=n.rootBoundary,u=n.altBoundary,d=n.padding,f=n.tether,g=f===void 0?!0:f,_=n.tetherOffset,m=_===void 0?0:_,y=ur(e,{boundary:l,rootBoundary:c,padding:d,altBoundary:u}),v=ks(e.placement),$=cr(e.placement),A=!$,D=bh(v),x=OS(D),w=e.modifiersData.popperOffsets,S=e.rects.reference,T=e.rects.popper,M=typeof m=="function"?m(Object.assign({},e.rects,{placement:e.placement})):m,E=typeof M=="number"?{mainAxis:M,altAxis:M}:Object.assign({mainAxis:0,altAxis:0},M),V=e.modifiersData.offset?e.modifiersData.offset[e.placement]:null,X={x:0,y:0};if(w){if(o){var le,Y=D==="y"?vn:yn,R=D==="y"?Rn:Nn,I=D==="y"?"height":"width",H=w[D],Z=H+y[Y],ee=H-y[R],ce=g?-T[I]/2:0,ve=$===xo?S[I]:T[I],U=$===xo?-T[I]:-S[I],Q=e.elements.arrow,L=g&&Q?_h(Q):{width:0,height:0},te=e.modifiersData["arrow#persistent"]?e.modifiersData["arrow#persistent"].padding:fb(),ae=te[Y],P=te[R],ie=ra(0,S[I],L[I]),de=A?S[I]/2-ce-ie-ae-E.mainAxis:ve-ie-ae-E.mainAxis,we=A?-S[I]/2+ce+ie+P+E.mainAxis:U+ie+P+E.mainAxis,B=e.elements.arrow&&za(e.elements.arrow),fe=B?D==="y"?B.clientTop||0:B.clientLeft||0:0,b=(le=V?.[D])!=null?le:0,O=H+de-b-fe,j=H+we-b,z=ra(g?nc(Z,O):Z,H,g?po(ee,j):ee);w[D]=z,X[D]=z-H}if(a){var oe,W=D==="x"?vn:yn,ne=D==="x"?Rn:Nn,J=w[x],he=x==="y"?"height":"width",me=J+y[W],pe=J-y[ne],Re=[vn,yn].indexOf(v)!==-1,Oe=(oe=V?.[x])!=null?oe:0,Ve=Re?me:J-S[he]-T[he]-Oe+E.altAxis,Be=Re?J+S[he]+T[he]-Oe-E.altAxis:pe,tt=g&&Re?dS(Ve,J,Be):ra(g?Ve:me,J,g?Be:pe);w[x]=tt,X[x]=tt-J}e.modifiersData[s]=X}}const xb={name:"preventOverflow",enabled:!0,phase:"main",fn:IS,requiresIfExists:["offset"]};function LS(t){return{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}}function RS(t){return t===Fn(t)||!Gn(t)?wh(t):LS(t)}function NS(t){var e=t.getBoundingClientRect(),n=ar(e.width)/t.offsetWidth||1,s=ar(e.height)/t.offsetHeight||1;return n!==1||s!==1}function FS(t,e,n){n===void 0&&(n=!1);var s=Gn(e),i=Gn(e)&&NS(e),o=Ii(e),r=lr(t,i,n),a={scrollLeft:0,scrollTop:0},l={x:0,y:0};return(s||!s&&!n)&&((As(e)!=="body"||kh(o))&&(a=RS(e)),Gn(e)?(l=lr(e,!0),l.x+=e.clientLeft,l.y+=e.clientTop):o&&(l.x=xh(o))),{x:r.left+a.scrollLeft-l.x,y:r.top+a.scrollTop-l.y,width:r.width,height:r.height}}function BS(t){var e=new Map,n=new Set,s=[];t.forEach(function(o){e.set(o.name,o)});function i(o){n.add(o.name);var r=[].concat(o.requires||[],o.requiresIfExists||[]);r.forEach(function(a){if(!n.has(a)){var l=e.get(a);l&&i(l)}}),s.push(o)}return t.forEach(function(o){n.has(o.name)||i(o)}),s}function VS(t){var e=BS(t);return ub.reduce(function(n,s){return n.concat(e.filter(function(i){return i.phase===s}))},[])}function HS(t){var e;return function(){return e||(e=new Promise(function(n){Promise.resolve().then(function(){e=void 0,n(t())})})),e}}function jS(t){var e=t.reduce(function(n,s){var i=n[s.name];return n[s.name]=i?Object.assign({},i,s,{options:Object.assign({},i.options,s.options),data:Object.assign({},i.data,s.data)}):s,n},{});return Object.keys(e).map(function(n){return e[n]})}var jp={placement:"bottom",modifiers:[],strategy:"absolute"};function Wp(){for(var t=arguments.length,e=new Array(t),n=0;n{for(const r of s)if(r.type==="childList")for(const o of r.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&i(o)}).observe(document,{childList:!0,subtree:!0});function n(s){const r={};return s.integrity&&(r.integrity=s.integrity),s.referrerPolicy&&(r.referrerPolicy=s.referrerPolicy),s.crossOrigin==="use-credentials"?r.credentials="include":s.crossOrigin==="anonymous"?r.credentials="omit":r.credentials="same-origin",r}function i(s){if(s.ep)return;s.ep=!0;const r=n(s);fetch(s.href,r)}})();var lx=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function TP(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function kP(t){if(t.__esModule)return t;var e=t.default;if(typeof e=="function"){var n=function i(){return this instanceof i?Reflect.construct(e,arguments,this.constructor):e.apply(this,arguments)};n.prototype=e.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(t).forEach(function(i){var s=Object.getOwnPropertyDescriptor(t,i);Object.defineProperty(n,i,s.get?s:{enumerable:!0,get:function(){return t[i]}})}),n}var AP={exports:{}},ei="top",Ai="bottom",Mi="right",ti="left",Gh="auto",Wl=[ei,Ai,Mi,ti],ra="start",dl="end",cx="clippingParents",Nm="viewport",Ya="popper",ux="reference",Mp=Wl.reduce(function(t,e){return t.concat([e+"-"+ra,e+"-"+dl])},[]),Fm=[].concat(Wl,[Gh]).reduce(function(t,e){return t.concat([e,e+"-"+ra,e+"-"+dl])},[]),dx="beforeRead",hx="read",fx="afterRead",gx="beforeMain",px="main",mx="afterMain",_x="beforeWrite",yx="write",vx="afterWrite",bx=[dx,hx,fx,gx,px,mx,_x,yx,vx];function $s(t){return t?(t.nodeName||"").toLowerCase():null}function Ii(t){if(t==null)return window;if(t.toString()!=="[object Window]"){var e=t.ownerDocument;return e&&e.defaultView||window}return t}function oa(t){var e=Ii(t).Element;return t instanceof e||t instanceof Element}function Yi(t){var e=Ii(t).HTMLElement;return t instanceof e||t instanceof HTMLElement}function Bm(t){if(typeof ShadowRoot>"u")return!1;var e=Ii(t).ShadowRoot;return t instanceof e||t instanceof ShadowRoot}function MP(t){var e=t.state;Object.keys(e.elements).forEach(function(n){var i=e.styles[n]||{},s=e.attributes[n]||{},r=e.elements[n];!Yi(r)||!$s(r)||(Object.assign(r.style,i),Object.keys(s).forEach(function(o){var a=s[o];a===!1?r.removeAttribute(o):r.setAttribute(o,a===!0?"":a)}))})}function IP(t){var e=t.state,n={popper:{position:e.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(e.elements.popper.style,n.popper),e.styles=n,e.elements.arrow&&Object.assign(e.elements.arrow.style,n.arrow),function(){Object.keys(e.elements).forEach(function(i){var s=e.elements[i],r=e.attributes[i]||{},o=Object.keys(e.styles.hasOwnProperty(i)?e.styles[i]:n[i]),a=o.reduce(function(l,c){return l[c]="",l},{});!Yi(s)||!$s(s)||(Object.assign(s.style,a),Object.keys(r).forEach(function(l){s.removeAttribute(l)}))})}}const Vm={name:"applyStyles",enabled:!0,phase:"write",fn:MP,effect:IP,requires:["computeStyles"]};function Ps(t){return t.split("-")[0]}var Zo=Math.max,lh=Math.min,hl=Math.round;function Ip(){var t=navigator.userAgentData;return t!=null&&t.brands&&Array.isArray(t.brands)?t.brands.map(function(e){return e.brand+"/"+e.version}).join(" "):navigator.userAgent}function wx(){return!/^((?!chrome|android).)*safari/i.test(Ip())}function fl(t,e,n){e===void 0&&(e=!1),n===void 0&&(n=!1);var i=t.getBoundingClientRect(),s=1,r=1;e&&Yi(t)&&(s=t.offsetWidth>0&&hl(i.width)/t.offsetWidth||1,r=t.offsetHeight>0&&hl(i.height)/t.offsetHeight||1);var o=oa(t)?Ii(t):window,a=o.visualViewport,l=!wx()&&n,c=(i.left+(l&&a?a.offsetLeft:0))/s,u=(i.top+(l&&a?a.offsetTop:0))/r,d=i.width/s,h=i.height/r;return{width:d,height:h,top:u,right:c+d,bottom:u+h,left:c,x:c,y:u}}function zm(t){var e=fl(t),n=t.offsetWidth,i=t.offsetHeight;return Math.abs(e.width-n)<=1&&(n=e.width),Math.abs(e.height-i)<=1&&(i=e.height),{x:t.offsetLeft,y:t.offsetTop,width:n,height:i}}function xx(t,e){var n=e.getRootNode&&e.getRootNode();if(t.contains(e))return!0;if(n&&Bm(n)){var i=e;do{if(i&&t.isSameNode(i))return!0;i=i.parentNode||i.host}while(i)}return!1}function fr(t){return Ii(t).getComputedStyle(t)}function PP(t){return["table","td","th"].indexOf($s(t))>=0}function ho(t){return((oa(t)?t.ownerDocument:t.document)||window.document).documentElement}function Xh(t){return $s(t)==="html"?t:t.assignedSlot||t.parentNode||(Bm(t)?t.host:null)||ho(t)}function K0(t){return!Yi(t)||fr(t).position==="fixed"?null:t.offsetParent}function RP(t){var e=/firefox/i.test(Ip()),n=/Trident/i.test(Ip());if(n&&Yi(t)){var i=fr(t);if(i.position==="fixed")return null}var s=Xh(t);for(Bm(s)&&(s=s.host);Yi(s)&&["html","body"].indexOf($s(s))<0;){var r=fr(s);if(r.transform!=="none"||r.perspective!=="none"||r.contain==="paint"||["transform","perspective"].indexOf(r.willChange)!==-1||e&&r.willChange==="filter"||e&&r.filter&&r.filter!=="none")return s;s=s.parentNode}return null}function Ru(t){for(var e=Ii(t),n=K0(t);n&&PP(n)&&fr(n).position==="static";)n=K0(n);return n&&($s(n)==="html"||$s(n)==="body"&&fr(n).position==="static")?e:n||RP(t)||e}function Wm(t){return["top","bottom"].indexOf(t)>=0?"x":"y"}function Pc(t,e,n){return Zo(t,lh(e,n))}function DP(t,e,n){var i=Pc(t,e,n);return i>n?n:i}function Ex(){return{top:0,right:0,bottom:0,left:0}}function Sx(t){return Object.assign({},Ex(),t)}function Cx(t,e){return e.reduce(function(n,i){return n[i]=t,n},{})}var $P=function(e,n){return e=typeof e=="function"?e(Object.assign({},n.rects,{placement:n.placement})):e,Sx(typeof e!="number"?e:Cx(e,Wl))};function LP(t){var e,n=t.state,i=t.name,s=t.options,r=n.elements.arrow,o=n.modifiersData.popperOffsets,a=Ps(n.placement),l=Wm(a),c=[ti,Mi].indexOf(a)>=0,u=c?"height":"width";if(!(!r||!o)){var d=$P(s.padding,n),h=zm(r),f=l==="y"?ei:ti,p=l==="y"?Ai:Mi,m=n.rects.reference[u]+n.rects.reference[l]-o[l]-n.rects.popper[u],y=o[l]-n.rects.reference[l],v=Ru(r),b=v?l==="y"?v.clientHeight||0:v.clientWidth||0:0,E=m/2-y/2,C=d[f],w=b-h[u]-d[p],x=b/2-h[u]/2+E,T=Pc(C,x,w),k=l;n.modifiersData[i]=(e={},e[k]=T,e.centerOffset=T-x,e)}}function OP(t){var e=t.state,n=t.options,i=n.element,s=i===void 0?"[data-popper-arrow]":i;s!=null&&(typeof s=="string"&&(s=e.elements.popper.querySelector(s),!s)||xx(e.elements.popper,s)&&(e.elements.arrow=s))}const Tx={name:"arrow",enabled:!0,phase:"main",fn:LP,effect:OP,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function gl(t){return t.split("-")[1]}var NP={top:"auto",right:"auto",bottom:"auto",left:"auto"};function FP(t,e){var n=t.x,i=t.y,s=e.devicePixelRatio||1;return{x:hl(n*s)/s||0,y:hl(i*s)/s||0}}function U0(t){var e,n=t.popper,i=t.popperRect,s=t.placement,r=t.variation,o=t.offsets,a=t.position,l=t.gpuAcceleration,c=t.adaptive,u=t.roundOffsets,d=t.isFixed,h=o.x,f=h===void 0?0:h,p=o.y,m=p===void 0?0:p,y=typeof u=="function"?u({x:f,y:m}):{x:f,y:m};f=y.x,m=y.y;var v=o.hasOwnProperty("x"),b=o.hasOwnProperty("y"),E=ti,C=ei,w=window;if(c){var x=Ru(n),T="clientHeight",k="clientWidth";if(x===Ii(n)&&(x=ho(n),fr(x).position!=="static"&&a==="absolute"&&(T="scrollHeight",k="scrollWidth")),x=x,s===ei||(s===ti||s===Mi)&&r===dl){C=Ai;var A=d&&x===w&&w.visualViewport?w.visualViewport.height:x[T];m-=A-i.height,m*=l?1:-1}if(s===ti||(s===ei||s===Ai)&&r===dl){E=Mi;var P=d&&x===w&&w.visualViewport?w.visualViewport.width:x[k];f-=P-i.width,f*=l?1:-1}}var F=Object.assign({position:a},c&&NP),H=u===!0?FP({x:f,y:m},Ii(n)):{x:f,y:m};if(f=H.x,m=H.y,l){var te;return Object.assign({},F,(te={},te[C]=b?"0":"",te[E]=v?"0":"",te.transform=(w.devicePixelRatio||1)<=1?"translate("+f+"px, "+m+"px)":"translate3d("+f+"px, "+m+"px, 0)",te))}return Object.assign({},F,(e={},e[C]=b?m+"px":"",e[E]=v?f+"px":"",e.transform="",e))}function BP(t){var e=t.state,n=t.options,i=n.gpuAcceleration,s=i===void 0?!0:i,r=n.adaptive,o=r===void 0?!0:r,a=n.roundOffsets,l=a===void 0?!0:a,c={placement:Ps(e.placement),variation:gl(e.placement),popper:e.elements.popper,popperRect:e.rects.popper,gpuAcceleration:s,isFixed:e.options.strategy==="fixed"};e.modifiersData.popperOffsets!=null&&(e.styles.popper=Object.assign({},e.styles.popper,U0(Object.assign({},c,{offsets:e.modifiersData.popperOffsets,position:e.options.strategy,adaptive:o,roundOffsets:l})))),e.modifiersData.arrow!=null&&(e.styles.arrow=Object.assign({},e.styles.arrow,U0(Object.assign({},c,{offsets:e.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:l})))),e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-placement":e.placement})}const Hm={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:BP,data:{}};var ud={passive:!0};function VP(t){var e=t.state,n=t.instance,i=t.options,s=i.scroll,r=s===void 0?!0:s,o=i.resize,a=o===void 0?!0:o,l=Ii(e.elements.popper),c=[].concat(e.scrollParents.reference,e.scrollParents.popper);return r&&c.forEach(function(u){u.addEventListener("scroll",n.update,ud)}),a&&l.addEventListener("resize",n.update,ud),function(){r&&c.forEach(function(u){u.removeEventListener("scroll",n.update,ud)}),a&&l.removeEventListener("resize",n.update,ud)}}const Ym={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:VP,data:{}};var zP={left:"right",right:"left",bottom:"top",top:"bottom"};function qd(t){return t.replace(/left|right|bottom|top/g,function(e){return zP[e]})}var WP={start:"end",end:"start"};function G0(t){return t.replace(/start|end/g,function(e){return WP[e]})}function jm(t){var e=Ii(t),n=e.pageXOffset,i=e.pageYOffset;return{scrollLeft:n,scrollTop:i}}function Km(t){return fl(ho(t)).left+jm(t).scrollLeft}function HP(t,e){var n=Ii(t),i=ho(t),s=n.visualViewport,r=i.clientWidth,o=i.clientHeight,a=0,l=0;if(s){r=s.width,o=s.height;var c=wx();(c||!c&&e==="fixed")&&(a=s.offsetLeft,l=s.offsetTop)}return{width:r,height:o,x:a+Km(t),y:l}}function YP(t){var e,n=ho(t),i=jm(t),s=(e=t.ownerDocument)==null?void 0:e.body,r=Zo(n.scrollWidth,n.clientWidth,s?s.scrollWidth:0,s?s.clientWidth:0),o=Zo(n.scrollHeight,n.clientHeight,s?s.scrollHeight:0,s?s.clientHeight:0),a=-i.scrollLeft+Km(t),l=-i.scrollTop;return fr(s||n).direction==="rtl"&&(a+=Zo(n.clientWidth,s?s.clientWidth:0)-r),{width:r,height:o,x:a,y:l}}function Um(t){var e=fr(t),n=e.overflow,i=e.overflowX,s=e.overflowY;return/auto|scroll|overlay|hidden/.test(n+s+i)}function kx(t){return["html","body","#document"].indexOf($s(t))>=0?t.ownerDocument.body:Yi(t)&&Um(t)?t:kx(Xh(t))}function Rc(t,e){var n;e===void 0&&(e=[]);var i=kx(t),s=i===((n=t.ownerDocument)==null?void 0:n.body),r=Ii(i),o=s?[r].concat(r.visualViewport||[],Um(i)?i:[]):i,a=e.concat(o);return s?a:a.concat(Rc(Xh(o)))}function Pp(t){return Object.assign({},t,{left:t.x,top:t.y,right:t.x+t.width,bottom:t.y+t.height})}function jP(t,e){var n=fl(t,!1,e==="fixed");return n.top=n.top+t.clientTop,n.left=n.left+t.clientLeft,n.bottom=n.top+t.clientHeight,n.right=n.left+t.clientWidth,n.width=t.clientWidth,n.height=t.clientHeight,n.x=n.left,n.y=n.top,n}function X0(t,e,n){return e===Nm?Pp(HP(t,n)):oa(e)?jP(e,n):Pp(YP(ho(t)))}function KP(t){var e=Rc(Xh(t)),n=["absolute","fixed"].indexOf(fr(t).position)>=0,i=n&&Yi(t)?Ru(t):t;return oa(i)?e.filter(function(s){return oa(s)&&xx(s,i)&&$s(s)!=="body"}):[]}function UP(t,e,n,i){var s=e==="clippingParents"?KP(t):[].concat(e),r=[].concat(s,[n]),o=r[0],a=r.reduce(function(l,c){var u=X0(t,c,i);return l.top=Zo(u.top,l.top),l.right=lh(u.right,l.right),l.bottom=lh(u.bottom,l.bottom),l.left=Zo(u.left,l.left),l},X0(t,o,i));return a.width=a.right-a.left,a.height=a.bottom-a.top,a.x=a.left,a.y=a.top,a}function Ax(t){var e=t.reference,n=t.element,i=t.placement,s=i?Ps(i):null,r=i?gl(i):null,o=e.x+e.width/2-n.width/2,a=e.y+e.height/2-n.height/2,l;switch(s){case ei:l={x:o,y:e.y-n.height};break;case Ai:l={x:o,y:e.y+e.height};break;case Mi:l={x:e.x+e.width,y:a};break;case ti:l={x:e.x-n.width,y:a};break;default:l={x:e.x,y:e.y}}var c=s?Wm(s):null;if(c!=null){var u=c==="y"?"height":"width";switch(r){case ra:l[c]=l[c]-(e[u]/2-n[u]/2);break;case dl:l[c]=l[c]+(e[u]/2-n[u]/2);break}}return l}function pl(t,e){e===void 0&&(e={});var n=e,i=n.placement,s=i===void 0?t.placement:i,r=n.strategy,o=r===void 0?t.strategy:r,a=n.boundary,l=a===void 0?cx:a,c=n.rootBoundary,u=c===void 0?Nm:c,d=n.elementContext,h=d===void 0?Ya:d,f=n.altBoundary,p=f===void 0?!1:f,m=n.padding,y=m===void 0?0:m,v=Sx(typeof y!="number"?y:Cx(y,Wl)),b=h===Ya?ux:Ya,E=t.rects.popper,C=t.elements[p?b:h],w=UP(oa(C)?C:C.contextElement||ho(t.elements.popper),l,u,o),x=fl(t.elements.reference),T=Ax({reference:x,element:E,strategy:"absolute",placement:s}),k=Pp(Object.assign({},E,T)),A=h===Ya?k:x,P={top:w.top-A.top+v.top,bottom:A.bottom-w.bottom+v.bottom,left:w.left-A.left+v.left,right:A.right-w.right+v.right},F=t.modifiersData.offset;if(h===Ya&&F){var H=F[s];Object.keys(P).forEach(function(te){var N=[Mi,Ai].indexOf(te)>=0?1:-1,L=[ei,Ai].indexOf(te)>=0?"y":"x";P[te]+=H[L]*N})}return P}function GP(t,e){e===void 0&&(e={});var n=e,i=n.placement,s=n.boundary,r=n.rootBoundary,o=n.padding,a=n.flipVariations,l=n.allowedAutoPlacements,c=l===void 0?Fm:l,u=gl(i),d=u?a?Mp:Mp.filter(function(p){return gl(p)===u}):Wl,h=d.filter(function(p){return c.indexOf(p)>=0});h.length===0&&(h=d);var f=h.reduce(function(p,m){return p[m]=pl(t,{placement:m,boundary:s,rootBoundary:r,padding:o})[Ps(m)],p},{});return Object.keys(f).sort(function(p,m){return f[p]-f[m]})}function XP(t){if(Ps(t)===Gh)return[];var e=qd(t);return[G0(t),e,G0(e)]}function qP(t){var e=t.state,n=t.options,i=t.name;if(!e.modifiersData[i]._skip){for(var s=n.mainAxis,r=s===void 0?!0:s,o=n.altAxis,a=o===void 0?!0:o,l=n.fallbackPlacements,c=n.padding,u=n.boundary,d=n.rootBoundary,h=n.altBoundary,f=n.flipVariations,p=f===void 0?!0:f,m=n.allowedAutoPlacements,y=e.options.placement,v=Ps(y),b=v===y,E=l||(b||!p?[qd(y)]:XP(y)),C=[y].concat(E).reduce(function(M,ie){return M.concat(Ps(ie)===Gh?GP(e,{placement:ie,boundary:u,rootBoundary:d,padding:c,flipVariations:p,allowedAutoPlacements:m}):ie)},[]),w=e.rects.reference,x=e.rects.popper,T=new Map,k=!0,A=C[0],P=0;P=0,L=N?"width":"height",I=pl(e,{placement:F,boundary:u,rootBoundary:d,altBoundary:h,padding:c}),W=N?te?Mi:ti:te?Ai:ei;w[L]>x[L]&&(W=qd(W));var X=qd(W),J=[];if(r&&J.push(I[H]<=0),a&&J.push(I[W]<=0,I[X]<=0),J.every(function(M){return M})){A=F,k=!1;break}T.set(F,J)}if(k)for(var ne=p?3:1,ue=function(ie){var le=C.find(function($){var oe=T.get($);if(oe)return oe.slice(0,ie).every(function(de){return de})});if(le)return A=le,"break"},Y=ne;Y>0;Y--){var Z=ue(Y);if(Z==="break")break}e.placement!==A&&(e.modifiersData[i]._skip=!0,e.placement=A,e.reset=!0)}}const Mx={name:"flip",enabled:!0,phase:"main",fn:qP,requiresIfExists:["offset"],data:{_skip:!1}};function q0(t,e,n){return n===void 0&&(n={x:0,y:0}),{top:t.top-e.height-n.y,right:t.right-e.width+n.x,bottom:t.bottom-e.height+n.y,left:t.left-e.width-n.x}}function Z0(t){return[ei,Mi,Ai,ti].some(function(e){return t[e]>=0})}function ZP(t){var e=t.state,n=t.name,i=e.rects.reference,s=e.rects.popper,r=e.modifiersData.preventOverflow,o=pl(e,{elementContext:"reference"}),a=pl(e,{altBoundary:!0}),l=q0(o,i),c=q0(a,s,r),u=Z0(l),d=Z0(c);e.modifiersData[n]={referenceClippingOffsets:l,popperEscapeOffsets:c,isReferenceHidden:u,hasPopperEscaped:d},e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-reference-hidden":u,"data-popper-escaped":d})}const Ix={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:ZP};function JP(t,e,n){var i=Ps(t),s=[ti,ei].indexOf(i)>=0?-1:1,r=typeof n=="function"?n(Object.assign({},e,{placement:t})):n,o=r[0],a=r[1];return o=o||0,a=(a||0)*s,[ti,Mi].indexOf(i)>=0?{x:a,y:o}:{x:o,y:a}}function QP(t){var e=t.state,n=t.options,i=t.name,s=n.offset,r=s===void 0?[0,0]:s,o=Fm.reduce(function(u,d){return u[d]=JP(d,e.rects,r),u},{}),a=o[e.placement],l=a.x,c=a.y;e.modifiersData.popperOffsets!=null&&(e.modifiersData.popperOffsets.x+=l,e.modifiersData.popperOffsets.y+=c),e.modifiersData[i]=o}const Px={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:QP};function e2(t){var e=t.state,n=t.name;e.modifiersData[n]=Ax({reference:e.rects.reference,element:e.rects.popper,strategy:"absolute",placement:e.placement})}const Gm={name:"popperOffsets",enabled:!0,phase:"read",fn:e2,data:{}};function t2(t){return t==="x"?"y":"x"}function n2(t){var e=t.state,n=t.options,i=t.name,s=n.mainAxis,r=s===void 0?!0:s,o=n.altAxis,a=o===void 0?!1:o,l=n.boundary,c=n.rootBoundary,u=n.altBoundary,d=n.padding,h=n.tether,f=h===void 0?!0:h,p=n.tetherOffset,m=p===void 0?0:p,y=pl(e,{boundary:l,rootBoundary:c,padding:d,altBoundary:u}),v=Ps(e.placement),b=gl(e.placement),E=!b,C=Wm(v),w=t2(C),x=e.modifiersData.popperOffsets,T=e.rects.reference,k=e.rects.popper,A=typeof m=="function"?m(Object.assign({},e.rects,{placement:e.placement})):m,P=typeof A=="number"?{mainAxis:A,altAxis:A}:Object.assign({mainAxis:0,altAxis:0},A),F=e.modifiersData.offset?e.modifiersData.offset[e.placement]:null,H={x:0,y:0};if(x){if(r){var te,N=C==="y"?ei:ti,L=C==="y"?Ai:Mi,I=C==="y"?"height":"width",W=x[C],X=W+y[N],J=W-y[L],ne=f?-k[I]/2:0,ue=b===ra?T[I]:k[I],Y=b===ra?-k[I]:-T[I],Z=e.elements.arrow,M=f&&Z?zm(Z):{width:0,height:0},ie=e.modifiersData["arrow#persistent"]?e.modifiersData["arrow#persistent"].padding:Ex(),le=ie[N],$=ie[L],oe=Pc(0,T[I],M[I]),de=E?T[I]/2-ne-oe-le-P.mainAxis:ue-oe-le-P.mainAxis,ve=E?-T[I]/2+ne+oe+$+P.mainAxis:Y+oe+$+P.mainAxis,z=e.elements.arrow&&Ru(e.elements.arrow),ge=z?C==="y"?z.clientTop||0:z.clientLeft||0:0,S=(te=F?.[C])!=null?te:0,O=W+de-S-ge,K=W+ve-S,U=Pc(f?lh(X,O):X,W,f?Zo(J,K):J);x[C]=U,H[C]=U-W}if(a){var re,j=C==="x"?ei:ti,se=C==="x"?Ai:Mi,ee=x[w],fe=w==="y"?"height":"width",me=ee+y[j],pe=ee-y[se],Le=[ei,ti].indexOf(v)!==-1,Ae=(re=F?.[w])!=null?re:0,ze=Le?me:ee-T[fe]-k[fe]-Ae+P.altAxis,Be=Le?ee+T[fe]+k[fe]-Ae-P.altAxis:pe,nt=f&&Le?DP(ze,ee,Be):Pc(f?ze:me,ee,f?Be:pe);x[w]=nt,H[w]=nt-ee}e.modifiersData[i]=H}}const Rx={name:"preventOverflow",enabled:!0,phase:"main",fn:n2,requiresIfExists:["offset"]};function i2(t){return{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}}function s2(t){return t===Ii(t)||!Yi(t)?jm(t):i2(t)}function r2(t){var e=t.getBoundingClientRect(),n=hl(e.width)/t.offsetWidth||1,i=hl(e.height)/t.offsetHeight||1;return n!==1||i!==1}function o2(t,e,n){n===void 0&&(n=!1);var i=Yi(e),s=Yi(e)&&r2(e),r=ho(e),o=fl(t,s,n),a={scrollLeft:0,scrollTop:0},l={x:0,y:0};return(i||!i&&!n)&&(($s(e)!=="body"||Um(r))&&(a=s2(e)),Yi(e)?(l=fl(e,!0),l.x+=e.clientLeft,l.y+=e.clientTop):r&&(l.x=Km(r))),{x:o.left+a.scrollLeft-l.x,y:o.top+a.scrollTop-l.y,width:o.width,height:o.height}}function a2(t){var e=new Map,n=new Set,i=[];t.forEach(function(r){e.set(r.name,r)});function s(r){n.add(r.name);var o=[].concat(r.requires||[],r.requiresIfExists||[]);o.forEach(function(a){if(!n.has(a)){var l=e.get(a);l&&s(l)}}),i.push(r)}return t.forEach(function(r){n.has(r.name)||s(r)}),i}function l2(t){var e=a2(t);return bx.reduce(function(n,i){return n.concat(e.filter(function(s){return s.phase===i}))},[])}function c2(t){var e;return function(){return e||(e=new Promise(function(n){Promise.resolve().then(function(){e=void 0,n(t())})})),e}}function u2(t){var e=t.reduce(function(n,i){var s=n[i.name];return n[i.name]=s?Object.assign({},s,i,{options:Object.assign({},s.options,i.options),data:Object.assign({},s.data,i.data)}):i,n},{});return Object.keys(e).map(function(n){return e[n]})}var J0={placement:"bottom",modifiers:[],strategy:"absolute"};function Q0(){for(var t=arguments.length,e=new Array(t),n=0;nK[k]})}}return p.default=K,Object.freeze(p)}const i=s(n),o=new Map,r={set(K,p,k){o.has(K)||o.set(K,new Map);const q=o.get(K);if(!q.has(p)&&q.size!==0){console.error(`Bootstrap doesn't allow more than one instance per element. Bound instance: ${Array.from(q.keys())[0]}.`);return}q.set(p,k)},get(K,p){return o.has(K)&&o.get(K).get(p)||null},remove(K,p){if(!o.has(K))return;const k=o.get(K);k.delete(p),k.size===0&&o.delete(K)}},a=1e6,l=1e3,c="transitionend",u=K=>(K&&window.CSS&&window.CSS.escape&&(K=K.replace(/#([^\s"#']+)/g,(p,k)=>`#${CSS.escape(k)}`)),K),d=K=>K==null?`${K}`:Object.prototype.toString.call(K).match(/\s([a-z]+)/i)[1].toLowerCase(),f=K=>{do K+=Math.floor(Math.random()*a);while(document.getElementById(K));return K},g=K=>{if(!K)return 0;let{transitionDuration:p,transitionDelay:k}=window.getComputedStyle(K);const q=Number.parseFloat(p),ge=Number.parseFloat(k);return!q&&!ge?0:(p=p.split(",")[0],k=k.split(",")[0],(Number.parseFloat(p)+Number.parseFloat(k))*l)},_=K=>{K.dispatchEvent(new Event(c))},m=K=>!K||typeof K!="object"?!1:(typeof K.jquery<"u"&&(K=K[0]),typeof K.nodeType<"u"),y=K=>m(K)?K.jquery?K[0]:K:typeof K=="string"&&K.length>0?document.querySelector(u(K)):null,v=K=>{if(!m(K)||K.getClientRects().length===0)return!1;const p=getComputedStyle(K).getPropertyValue("visibility")==="visible",k=K.closest("details:not([open])");if(!k)return p;if(k!==K){const q=K.closest("summary");if(q&&q.parentNode!==k||q===null)return!1}return p},$=K=>!K||K.nodeType!==Node.ELEMENT_NODE||K.classList.contains("disabled")?!0:typeof K.disabled<"u"?K.disabled:K.hasAttribute("disabled")&&K.getAttribute("disabled")!=="false",A=K=>{if(!document.documentElement.attachShadow)return null;if(typeof K.getRootNode=="function"){const p=K.getRootNode();return p instanceof ShadowRoot?p:null}return K instanceof ShadowRoot?K:K.parentNode?A(K.parentNode):null},D=()=>{},x=K=>{K.offsetHeight},w=()=>window.jQuery&&!document.body.hasAttribute("data-bs-no-jquery")?window.jQuery:null,S=[],T=K=>{document.readyState==="loading"?(S.length||document.addEventListener("DOMContentLoaded",()=>{for(const p of S)p()}),S.push(K)):K()},M=()=>document.documentElement.dir==="rtl",E=K=>{T(()=>{const p=w();if(p){const k=K.NAME,q=p.fn[k];p.fn[k]=K.jQueryInterface,p.fn[k].Constructor=K,p.fn[k].noConflict=()=>(p.fn[k]=q,K.jQueryInterface)}})},V=(K,p=[],k=K)=>typeof K=="function"?K(...p):k,X=(K,p,k=!0)=>{if(!k){V(K);return}const ge=g(p)+5;let Te=!1;const Ce=({target:Qe})=>{Qe===p&&(Te=!0,p.removeEventListener(c,Ce),V(K))};p.addEventListener(c,Ce),setTimeout(()=>{Te||_(p)},ge)},le=(K,p,k,q)=>{const ge=K.length;let Te=K.indexOf(p);return Te===-1?!k&&q?K[ge-1]:K[0]:(Te+=k?1:-1,q&&(Te=(Te+ge)%ge),K[Math.max(0,Math.min(Te,ge-1))])},Y=/[^.]*(?=\..*)\.|.*/,R=/\..*/,I=/::\d+$/,H={};let Z=1;const ee={mouseenter:"mouseover",mouseleave:"mouseout"},ce=new Set(["click","dblclick","mouseup","mousedown","contextmenu","mousewheel","DOMMouseScroll","mouseover","mouseout","mousemove","selectstart","selectend","keydown","keypress","keyup","orientationchange","touchstart","touchmove","touchend","touchcancel","pointerdown","pointermove","pointerup","pointerleave","pointercancel","gesturestart","gesturechange","gestureend","focus","blur","change","reset","select","submit","focusin","focusout","load","unload","beforeunload","resize","move","DOMContentLoaded","readystatechange","error","abort","scroll"]);function ve(K,p){return p&&`${p}::${Z++}`||K.uidEvent||Z++}function U(K){const p=ve(K);return K.uidEvent=p,H[p]=H[p]||{},H[p]}function Q(K,p){return function k(q){return fe(q,{delegateTarget:K}),k.oneOff&&B.off(K,q.type,p),p.apply(K,[q])}}function L(K,p,k){return function q(ge){const Te=K.querySelectorAll(p);for(let{target:Ce}=ge;Ce&&Ce!==this;Ce=Ce.parentNode)for(const Qe of Te)if(Qe===Ce)return fe(ge,{delegateTarget:Ce}),q.oneOff&&B.off(K,ge.type,p,k),k.apply(Ce,[ge])}}function te(K,p,k=null){return Object.values(K).find(q=>q.callable===p&&q.delegationSelector===k)}function ae(K,p,k){const q=typeof p=="string",ge=q?k:p||k;let Te=we(K);return ce.has(Te)||(Te=K),[q,ge,Te]}function P(K,p,k,q,ge){if(typeof p!="string"||!K)return;let[Te,Ce,Qe]=ae(p,k,q);p in ee&&(Ce=(sS=>function(Wo){if(!Wo.relatedTarget||Wo.relatedTarget!==Wo.delegateTarget&&!Wo.delegateTarget.contains(Wo.relatedTarget))return sS.call(this,Wo)})(Ce));const kn=U(K),Wn=kn[Qe]||(kn[Qe]={}),Xt=te(Wn,Ce,Te?k:null);if(Xt){Xt.oneOff=Xt.oneOff&≥return}const fs=ve(Ce,p.replace(Y,"")),es=Te?L(K,k,Ce):Q(K,Ce);es.delegationSelector=Te?k:null,es.callable=Ce,es.oneOff=ge,es.uidEvent=fs,Wn[fs]=es,K.addEventListener(Qe,es,Te)}function ie(K,p,k,q,ge){const Te=te(p[k],q,ge);Te&&(K.removeEventListener(k,Te,!!ge),delete p[k][Te.uidEvent])}function de(K,p,k,q){const ge=p[k]||{};for(const[Te,Ce]of Object.entries(ge))Te.includes(q)&&ie(K,p,k,Ce.callable,Ce.delegationSelector)}function we(K){return K=K.replace(R,""),ee[K]||K}const B={on(K,p,k,q){P(K,p,k,q,!1)},one(K,p,k,q){P(K,p,k,q,!0)},off(K,p,k,q){if(typeof p!="string"||!K)return;const[ge,Te,Ce]=ae(p,k,q),Qe=Ce!==p,kn=U(K),Wn=kn[Ce]||{},Xt=p.startsWith(".");if(typeof Te<"u"){if(!Object.keys(Wn).length)return;ie(K,kn,Ce,Te,ge?k:null);return}if(Xt)for(const fs of Object.keys(kn))de(K,kn,fs,p.slice(1));for(const[fs,es]of Object.entries(Wn)){const gl=fs.replace(I,"");(!Qe||p.includes(gl))&&ie(K,kn,Ce,es.callable,es.delegationSelector)}},trigger(K,p,k){if(typeof p!="string"||!K)return null;const q=w(),ge=we(p),Te=p!==ge;let Ce=null,Qe=!0,kn=!0,Wn=!1;Te&&q&&(Ce=q.Event(p,k),q(K).trigger(Ce),Qe=!Ce.isPropagationStopped(),kn=!Ce.isImmediatePropagationStopped(),Wn=Ce.isDefaultPrevented());const Xt=fe(new Event(p,{bubbles:Qe,cancelable:!0}),k);return Wn&&Xt.preventDefault(),kn&&K.dispatchEvent(Xt),Xt.defaultPrevented&&Ce&&Ce.preventDefault(),Xt}};function fe(K,p={}){for(const[k,q]of Object.entries(p))try{K[k]=q}catch{Object.defineProperty(K,k,{configurable:!0,get(){return q}})}return K}function b(K){if(K==="true")return!0;if(K==="false")return!1;if(K===Number(K).toString())return Number(K);if(K===""||K==="null")return null;if(typeof K!="string")return K;try{return JSON.parse(decodeURIComponent(K))}catch{return K}}function O(K){return K.replace(/[A-Z]/g,p=>`-${p.toLowerCase()}`)}const j={setDataAttribute(K,p,k){K.setAttribute(`data-bs-${O(p)}`,k)},removeDataAttribute(K,p){K.removeAttribute(`data-bs-${O(p)}`)},getDataAttributes(K){if(!K)return{};const p={},k=Object.keys(K.dataset).filter(q=>q.startsWith("bs")&&!q.startsWith("bsConfig"));for(const q of k){let ge=q.replace(/^bs/,"");ge=ge.charAt(0).toLowerCase()+ge.slice(1,ge.length),p[ge]=b(K.dataset[q])}return p},getDataAttribute(K,p){return b(K.getAttribute(`data-bs-${O(p)}`))}};class z{static get Default(){return{}}static get DefaultType(){return{}}static get NAME(){throw new Error('You have to implement the static method "NAME", for each component!')}_getConfig(p){return p=this._mergeConfigObj(p),p=this._configAfterMerge(p),this._typeCheckConfig(p),p}_configAfterMerge(p){return p}_mergeConfigObj(p,k){const q=m(k)?j.getDataAttribute(k,"config"):{};return{...this.constructor.Default,...typeof q=="object"?q:{},...m(k)?j.getDataAttributes(k):{},...typeof p=="object"?p:{}}}_typeCheckConfig(p,k=this.constructor.DefaultType){for(const[q,ge]of Object.entries(k)){const Te=p[q],Ce=m(Te)?"element":d(Te);if(!new RegExp(ge).test(Ce))throw new TypeError(`${this.constructor.NAME.toUpperCase()}: Option "${q}" provided type "${Ce}" but expected type "${ge}".`)}}}const oe="5.3.2";class W extends z{constructor(p,k){super(),p=y(p),p&&(this._element=p,this._config=this._getConfig(k),r.set(this._element,this.constructor.DATA_KEY,this))}dispose(){r.remove(this._element,this.constructor.DATA_KEY),B.off(this._element,this.constructor.EVENT_KEY);for(const p of Object.getOwnPropertyNames(this))this[p]=null}_queueCallback(p,k,q=!0){X(p,k,q)}_getConfig(p){return p=this._mergeConfigObj(p,this._element),p=this._configAfterMerge(p),this._typeCheckConfig(p),p}static getInstance(p){return r.get(y(p),this.DATA_KEY)}static getOrCreateInstance(p,k={}){return this.getInstance(p)||new this(p,typeof k=="object"?k:null)}static get VERSION(){return oe}static get DATA_KEY(){return`bs.${this.NAME}`}static get EVENT_KEY(){return`.${this.DATA_KEY}`}static eventName(p){return`${p}${this.EVENT_KEY}`}}const ne=K=>{let p=K.getAttribute("data-bs-target");if(!p||p==="#"){let k=K.getAttribute("href");if(!k||!k.includes("#")&&!k.startsWith("."))return null;k.includes("#")&&!k.startsWith("#")&&(k=`#${k.split("#")[1]}`),p=k&&k!=="#"?u(k.trim()):null}return p},J={find(K,p=document.documentElement){return[].concat(...Element.prototype.querySelectorAll.call(p,K))},findOne(K,p=document.documentElement){return Element.prototype.querySelector.call(p,K)},children(K,p){return[].concat(...K.children).filter(k=>k.matches(p))},parents(K,p){const k=[];let q=K.parentNode.closest(p);for(;q;)k.push(q),q=q.parentNode.closest(p);return k},prev(K,p){let k=K.previousElementSibling;for(;k;){if(k.matches(p))return[k];k=k.previousElementSibling}return[]},next(K,p){let k=K.nextElementSibling;for(;k;){if(k.matches(p))return[k];k=k.nextElementSibling}return[]},focusableChildren(K){const p=["a","button","input","textarea","select","details","[tabindex]",'[contenteditable="true"]'].map(k=>`${k}:not([tabindex^="-"])`).join(",");return this.find(p,K).filter(k=>!$(k)&&v(k))},getSelectorFromElement(K){const p=ne(K);return p&&J.findOne(p)?p:null},getElementFromSelector(K){const p=ne(K);return p?J.findOne(p):null},getMultipleElementsFromSelector(K){const p=ne(K);return p?J.find(p):[]}},he=(K,p="hide")=>{const k=`click.dismiss${K.EVENT_KEY}`,q=K.NAME;B.on(document,k,`[data-bs-dismiss="${q}"]`,function(ge){if(["A","AREA"].includes(this.tagName)&&ge.preventDefault(),$(this))return;const Te=J.getElementFromSelector(this)||this.closest(`.${q}`);K.getOrCreateInstance(Te)[p]()})},me="alert",Re=".bs.alert",Oe=`close${Re}`,Ve=`closed${Re}`,Be="fade",tt="show";class Je extends W{static get NAME(){return me}close(){if(B.trigger(this._element,Oe).defaultPrevented)return;this._element.classList.remove(tt);const k=this._element.classList.contains(Be);this._queueCallback(()=>this._destroyElement(),this._element,k)}_destroyElement(){this._element.remove(),B.trigger(this._element,Ve),this.dispose()}static jQueryInterface(p){return this.each(function(){const k=Je.getOrCreateInstance(this);if(typeof p=="string"){if(k[p]===void 0||p.startsWith("_")||p==="constructor")throw new TypeError(`No method named "${p}"`);k[p](this)}})}}he(Je,"close"),E(Je);const mt="button",Hn=".bs.button",ni=".data-api",Qn="active",Ds='[data-bs-toggle="button"]',jt=`click${Hn}${ni}`;class se extends W{static get NAME(){return mt}toggle(){this._element.setAttribute("aria-pressed",this._element.classList.toggle(Qn))}static jQueryInterface(p){return this.each(function(){const k=se.getOrCreateInstance(this);p==="toggle"&&k[p]()})}}B.on(document,jt,Ds,K=>{K.preventDefault();const p=K.target.closest(Ds);se.getOrCreateInstance(p).toggle()}),E(se);const $e="swipe",ue=".bs.swipe",Ae=`touchstart${ue}`,De=`touchmove${ue}`,sn=`touchend${ue}`,xn=`pointerdown${ue}`,Os=`pointerup${ue}`,Lo="touch",Ki="pen",hs="pointer-event",Nr=40,pu={endCallback:null,leftCallback:null,rightCallback:null},F1={endCallback:"(function|null)",leftCallback:"(function|null)",rightCallback:"(function|null)"};class il extends z{constructor(p,k){super(),this._element=p,!(!p||!il.isSupported())&&(this._config=this._getConfig(k),this._deltaX=0,this._supportPointerEvents=!!window.PointerEvent,this._initEvents())}static get Default(){return pu}static get DefaultType(){return F1}static get NAME(){return $e}dispose(){B.off(this._element,ue)}_start(p){if(!this._supportPointerEvents){this._deltaX=p.touches[0].clientX;return}this._eventIsPointerPenTouch(p)&&(this._deltaX=p.clientX)}_end(p){this._eventIsPointerPenTouch(p)&&(this._deltaX=p.clientX-this._deltaX),this._handleSwipe(),V(this._config.endCallback)}_move(p){this._deltaX=p.touches&&p.touches.length>1?0:p.touches[0].clientX-this._deltaX}_handleSwipe(){const p=Math.abs(this._deltaX);if(p<=Nr)return;const k=p/this._deltaX;this._deltaX=0,k&&V(k>0?this._config.rightCallback:this._config.leftCallback)}_initEvents(){this._supportPointerEvents?(B.on(this._element,xn,p=>this._start(p)),B.on(this._element,Os,p=>this._end(p)),this._element.classList.add(hs)):(B.on(this._element,Ae,p=>this._start(p)),B.on(this._element,De,p=>this._move(p)),B.on(this._element,sn,p=>this._end(p)))}_eventIsPointerPenTouch(p){return this._supportPointerEvents&&(p.pointerType===Ki||p.pointerType===Lo)}static isSupported(){return"ontouchstart"in document.documentElement||navigator.maxTouchPoints>0}}const B1="carousel",si=".bs.carousel",Gf=".data-api",V1="ArrowLeft",H1="ArrowRight",j1=500,Fr="next",Ro="prev",No="left",ol="right",W1=`slide${si}`,gu=`slid${si}`,z1=`keydown${si}`,K1=`mouseenter${si}`,Y1=`mouseleave${si}`,U1=`dragstart${si}`,q1=`load${si}${Gf}`,G1=`click${si}${Gf}`,Jf="carousel",rl="active",J1="slide",X1="carousel-item-end",Q1="carousel-item-start",Z1="carousel-item-next",ew="carousel-item-prev",Xf=".active",Qf=".carousel-item",tw=Xf+Qf,nw=".carousel-item img",sw=".carousel-indicators",iw="[data-bs-slide], [data-bs-slide-to]",ow='[data-bs-ride="carousel"]',rw={[V1]:ol,[H1]:No},aw={interval:5e3,keyboard:!0,pause:"hover",ride:!1,touch:!0,wrap:!0},lw={interval:"(number|boolean)",keyboard:"boolean",pause:"(string|boolean)",ride:"(boolean|string)",touch:"boolean",wrap:"boolean"};class Fo extends W{constructor(p,k){super(p,k),this._interval=null,this._activeElement=null,this._isSliding=!1,this.touchTimeout=null,this._swipeHelper=null,this._indicatorsElement=J.findOne(sw,this._element),this._addEventListeners(),this._config.ride===Jf&&this.cycle()}static get Default(){return aw}static get DefaultType(){return lw}static get NAME(){return B1}next(){this._slide(Fr)}nextWhenVisible(){!document.hidden&&v(this._element)&&this.next()}prev(){this._slide(Ro)}pause(){this._isSliding&&_(this._element),this._clearInterval()}cycle(){this._clearInterval(),this._updateInterval(),this._interval=setInterval(()=>this.nextWhenVisible(),this._config.interval)}_maybeEnableCycle(){if(this._config.ride){if(this._isSliding){B.one(this._element,gu,()=>this.cycle());return}this.cycle()}}to(p){const k=this._getItems();if(p>k.length-1||p<0)return;if(this._isSliding){B.one(this._element,gu,()=>this.to(p));return}const q=this._getItemIndex(this._getActive());if(q===p)return;const ge=p>q?Fr:Ro;this._slide(ge,k[p])}dispose(){this._swipeHelper&&this._swipeHelper.dispose(),super.dispose()}_configAfterMerge(p){return p.defaultInterval=p.interval,p}_addEventListeners(){this._config.keyboard&&B.on(this._element,z1,p=>this._keydown(p)),this._config.pause==="hover"&&(B.on(this._element,K1,()=>this.pause()),B.on(this._element,Y1,()=>this._maybeEnableCycle())),this._config.touch&&il.isSupported()&&this._addTouchEventListeners()}_addTouchEventListeners(){for(const q of J.find(nw,this._element))B.on(q,U1,ge=>ge.preventDefault());const k={leftCallback:()=>this._slide(this._directionToOrder(No)),rightCallback:()=>this._slide(this._directionToOrder(ol)),endCallback:()=>{this._config.pause==="hover"&&(this.pause(),this.touchTimeout&&clearTimeout(this.touchTimeout),this.touchTimeout=setTimeout(()=>this._maybeEnableCycle(),j1+this._config.interval))}};this._swipeHelper=new il(this._element,k)}_keydown(p){if(/input|textarea/i.test(p.target.tagName))return;const k=rw[p.key];k&&(p.preventDefault(),this._slide(this._directionToOrder(k)))}_getItemIndex(p){return this._getItems().indexOf(p)}_setActiveIndicatorElement(p){if(!this._indicatorsElement)return;const k=J.findOne(Xf,this._indicatorsElement);k.classList.remove(rl),k.removeAttribute("aria-current");const q=J.findOne(`[data-bs-slide-to="${p}"]`,this._indicatorsElement);q&&(q.classList.add(rl),q.setAttribute("aria-current","true"))}_updateInterval(){const p=this._activeElement||this._getActive();if(!p)return;const k=Number.parseInt(p.getAttribute("data-bs-interval"),10);this._config.interval=k||this._config.defaultInterval}_slide(p,k=null){if(this._isSliding)return;const q=this._getActive(),ge=p===Fr,Te=k||le(this._getItems(),q,ge,this._config.wrap);if(Te===q)return;const Ce=this._getItemIndex(Te),Qe=gl=>B.trigger(this._element,gl,{relatedTarget:Te,direction:this._orderToDirection(p),from:this._getItemIndex(q),to:Ce});if(Qe(W1).defaultPrevented||!q||!Te)return;const Wn=!!this._interval;this.pause(),this._isSliding=!0,this._setActiveIndicatorElement(Ce),this._activeElement=Te;const Xt=ge?Q1:X1,fs=ge?Z1:ew;Te.classList.add(fs),x(Te),q.classList.add(Xt),Te.classList.add(Xt);const es=()=>{Te.classList.remove(Xt,fs),Te.classList.add(rl),q.classList.remove(rl,fs,Xt),this._isSliding=!1,Qe(gu)};this._queueCallback(es,q,this._isAnimated()),Wn&&this.cycle()}_isAnimated(){return this._element.classList.contains(J1)}_getActive(){return J.findOne(tw,this._element)}_getItems(){return J.find(Qf,this._element)}_clearInterval(){this._interval&&(clearInterval(this._interval),this._interval=null)}_directionToOrder(p){return M()?p===No?Ro:Fr:p===No?Fr:Ro}_orderToDirection(p){return M()?p===Ro?No:ol:p===Ro?ol:No}static jQueryInterface(p){return this.each(function(){const k=Fo.getOrCreateInstance(this,p);if(typeof p=="number"){k.to(p);return}if(typeof p=="string"){if(k[p]===void 0||p.startsWith("_")||p==="constructor")throw new TypeError(`No method named "${p}"`);k[p]()}})}}B.on(document,G1,iw,function(K){const p=J.getElementFromSelector(this);if(!p||!p.classList.contains(Jf))return;K.preventDefault();const k=Fo.getOrCreateInstance(p),q=this.getAttribute("data-bs-slide-to");if(q){k.to(q),k._maybeEnableCycle();return}if(j.getDataAttribute(this,"slide")==="next"){k.next(),k._maybeEnableCycle();return}k.prev(),k._maybeEnableCycle()}),B.on(window,q1,()=>{const K=J.find(ow);for(const p of K)Fo.getOrCreateInstance(p)}),E(Fo);const cw="collapse",Br=".bs.collapse",uw=".data-api",dw=`show${Br}`,hw=`shown${Br}`,fw=`hide${Br}`,pw=`hidden${Br}`,gw=`click${Br}${uw}`,mu="show",Bo="collapse",al="collapsing",mw="collapsed",_w=`:scope .${Bo} .${Bo}`,bw="collapse-horizontal",vw="width",yw="height",ww=".collapse.show, .collapse.collapsing",_u='[data-bs-toggle="collapse"]',xw={parent:null,toggle:!0},kw={parent:"(null|element)",toggle:"boolean"};class Vo extends W{constructor(p,k){super(p,k),this._isTransitioning=!1,this._triggerArray=[];const q=J.find(_u);for(const ge of q){const Te=J.getSelectorFromElement(ge),Ce=J.find(Te).filter(Qe=>Qe===this._element);Te!==null&&Ce.length&&this._triggerArray.push(ge)}this._initializeChildren(),this._config.parent||this._addAriaAndCollapsedClass(this._triggerArray,this._isShown()),this._config.toggle&&this.toggle()}static get Default(){return xw}static get DefaultType(){return kw}static get NAME(){return cw}toggle(){this._isShown()?this.hide():this.show()}show(){if(this._isTransitioning||this._isShown())return;let p=[];if(this._config.parent&&(p=this._getFirstLevelChildren(ww).filter(Qe=>Qe!==this._element).map(Qe=>Vo.getOrCreateInstance(Qe,{toggle:!1}))),p.length&&p[0]._isTransitioning||B.trigger(this._element,dw).defaultPrevented)return;for(const Qe of p)Qe.hide();const q=this._getDimension();this._element.classList.remove(Bo),this._element.classList.add(al),this._element.style[q]=0,this._addAriaAndCollapsedClass(this._triggerArray,!0),this._isTransitioning=!0;const ge=()=>{this._isTransitioning=!1,this._element.classList.remove(al),this._element.classList.add(Bo,mu),this._element.style[q]="",B.trigger(this._element,hw)},Ce=`scroll${q[0].toUpperCase()+q.slice(1)}`;this._queueCallback(ge,this._element,!0),this._element.style[q]=`${this._element[Ce]}px`}hide(){if(this._isTransitioning||!this._isShown()||B.trigger(this._element,fw).defaultPrevented)return;const k=this._getDimension();this._element.style[k]=`${this._element.getBoundingClientRect()[k]}px`,x(this._element),this._element.classList.add(al),this._element.classList.remove(Bo,mu);for(const ge of this._triggerArray){const Te=J.getElementFromSelector(ge);Te&&!this._isShown(Te)&&this._addAriaAndCollapsedClass([ge],!1)}this._isTransitioning=!0;const q=()=>{this._isTransitioning=!1,this._element.classList.remove(al),this._element.classList.add(Bo),B.trigger(this._element,pw)};this._element.style[k]="",this._queueCallback(q,this._element,!0)}_isShown(p=this._element){return p.classList.contains(mu)}_configAfterMerge(p){return p.toggle=!!p.toggle,p.parent=y(p.parent),p}_getDimension(){return this._element.classList.contains(bw)?vw:yw}_initializeChildren(){if(!this._config.parent)return;const p=this._getFirstLevelChildren(_u);for(const k of p){const q=J.getElementFromSelector(k);q&&this._addAriaAndCollapsedClass([k],this._isShown(q))}}_getFirstLevelChildren(p){const k=J.find(_w,this._config.parent);return J.find(p,this._config.parent).filter(q=>!k.includes(q))}_addAriaAndCollapsedClass(p,k){if(p.length)for(const q of p)q.classList.toggle(mw,!k),q.setAttribute("aria-expanded",k)}static jQueryInterface(p){const k={};return typeof p=="string"&&/show|hide/.test(p)&&(k.toggle=!1),this.each(function(){const q=Vo.getOrCreateInstance(this,k);if(typeof p=="string"){if(typeof q[p]>"u")throw new TypeError(`No method named "${p}"`);q[p]()}})}}B.on(document,gw,_u,function(K){(K.target.tagName==="A"||K.delegateTarget&&K.delegateTarget.tagName==="A")&&K.preventDefault();for(const p of J.getMultipleElementsFromSelector(this))Vo.getOrCreateInstance(p,{toggle:!1}).toggle()}),E(Vo);const Zf="dropdown",Yi=".bs.dropdown",bu=".data-api",Sw="Escape",ep="Tab",$w="ArrowUp",tp="ArrowDown",Aw=2,Cw=`hide${Yi}`,Ew=`hidden${Yi}`,Tw=`show${Yi}`,Pw=`shown${Yi}`,np=`click${Yi}${bu}`,sp=`keydown${Yi}${bu}`,Mw=`keyup${Yi}${bu}`,Ho="show",Dw="dropup",Ow="dropend",Iw="dropstart",Lw="dropup-center",Rw="dropdown-center",Ui='[data-bs-toggle="dropdown"]:not(.disabled):not(:disabled)',Nw=`${Ui}.${Ho}`,ll=".dropdown-menu",Fw=".navbar",Bw=".navbar-nav",Vw=".dropdown-menu .dropdown-item:not(.disabled):not(:disabled)",Hw=M()?"top-end":"top-start",jw=M()?"top-start":"top-end",Ww=M()?"bottom-end":"bottom-start",zw=M()?"bottom-start":"bottom-end",Kw=M()?"left-start":"right-start",Yw=M()?"right-start":"left-start",Uw="top",qw="bottom",Gw={autoClose:!0,boundary:"clippingParents",display:"dynamic",offset:[0,2],popperConfig:null,reference:"toggle"},Jw={autoClose:"(boolean|string)",boundary:"(string|element)",display:"string",offset:"(array|string|function)",popperConfig:"(null|object|function)",reference:"(string|element|object)"};class Zn extends W{constructor(p,k){super(p,k),this._popper=null,this._parent=this._element.parentNode,this._menu=J.next(this._element,ll)[0]||J.prev(this._element,ll)[0]||J.findOne(ll,this._parent),this._inNavbar=this._detectNavbar()}static get Default(){return Gw}static get DefaultType(){return Jw}static get NAME(){return Zf}toggle(){return this._isShown()?this.hide():this.show()}show(){if($(this._element)||this._isShown())return;const p={relatedTarget:this._element};if(!B.trigger(this._element,Tw,p).defaultPrevented){if(this._createPopper(),"ontouchstart"in document.documentElement&&!this._parent.closest(Bw))for(const q of[].concat(...document.body.children))B.on(q,"mouseover",D);this._element.focus(),this._element.setAttribute("aria-expanded",!0),this._menu.classList.add(Ho),this._element.classList.add(Ho),B.trigger(this._element,Pw,p)}}hide(){if($(this._element)||!this._isShown())return;const p={relatedTarget:this._element};this._completeHide(p)}dispose(){this._popper&&this._popper.destroy(),super.dispose()}update(){this._inNavbar=this._detectNavbar(),this._popper&&this._popper.update()}_completeHide(p){if(!B.trigger(this._element,Cw,p).defaultPrevented){if("ontouchstart"in document.documentElement)for(const q of[].concat(...document.body.children))B.off(q,"mouseover",D);this._popper&&this._popper.destroy(),this._menu.classList.remove(Ho),this._element.classList.remove(Ho),this._element.setAttribute("aria-expanded","false"),j.removeDataAttribute(this._menu,"popper"),B.trigger(this._element,Ew,p)}}_getConfig(p){if(p=super._getConfig(p),typeof p.reference=="object"&&!m(p.reference)&&typeof p.reference.getBoundingClientRect!="function")throw new TypeError(`${Zf.toUpperCase()}: Option "reference" provided type "object" without a required "getBoundingClientRect" method.`);return p}_createPopper(){if(typeof i>"u")throw new TypeError("Bootstrap's dropdowns require Popper (https://popper.js.org)");let p=this._element;this._config.reference==="parent"?p=this._parent:m(this._config.reference)?p=y(this._config.reference):typeof this._config.reference=="object"&&(p=this._config.reference);const k=this._getPopperConfig();this._popper=i.createPopper(p,this._menu,k)}_isShown(){return this._menu.classList.contains(Ho)}_getPlacement(){const p=this._parent;if(p.classList.contains(Ow))return Kw;if(p.classList.contains(Iw))return Yw;if(p.classList.contains(Lw))return Uw;if(p.classList.contains(Rw))return qw;const k=getComputedStyle(this._menu).getPropertyValue("--bs-position").trim()==="end";return p.classList.contains(Dw)?k?jw:Hw:k?zw:Ww}_detectNavbar(){return this._element.closest(Fw)!==null}_getOffset(){const{offset:p}=this._config;return typeof p=="string"?p.split(",").map(k=>Number.parseInt(k,10)):typeof p=="function"?k=>p(k,this._element):p}_getPopperConfig(){const p={placement:this._getPlacement(),modifiers:[{name:"preventOverflow",options:{boundary:this._config.boundary}},{name:"offset",options:{offset:this._getOffset()}}]};return(this._inNavbar||this._config.display==="static")&&(j.setDataAttribute(this._menu,"popper","static"),p.modifiers=[{name:"applyStyles",enabled:!1}]),{...p,...V(this._config.popperConfig,[p])}}_selectMenuItem({key:p,target:k}){const q=J.find(Vw,this._menu).filter(ge=>v(ge));q.length&&le(q,k,p===tp,!q.includes(k)).focus()}static jQueryInterface(p){return this.each(function(){const k=Zn.getOrCreateInstance(this,p);if(typeof p=="string"){if(typeof k[p]>"u")throw new TypeError(`No method named "${p}"`);k[p]()}})}static clearMenus(p){if(p.button===Aw||p.type==="keyup"&&p.key!==ep)return;const k=J.find(Nw);for(const q of k){const ge=Zn.getInstance(q);if(!ge||ge._config.autoClose===!1)continue;const Te=p.composedPath(),Ce=Te.includes(ge._menu);if(Te.includes(ge._element)||ge._config.autoClose==="inside"&&!Ce||ge._config.autoClose==="outside"&&Ce||ge._menu.contains(p.target)&&(p.type==="keyup"&&p.key===ep||/input|select|option|textarea|form/i.test(p.target.tagName)))continue;const Qe={relatedTarget:ge._element};p.type==="click"&&(Qe.clickEvent=p),ge._completeHide(Qe)}}static dataApiKeydownHandler(p){const k=/input|textarea/i.test(p.target.tagName),q=p.key===Sw,ge=[$w,tp].includes(p.key);if(!ge&&!q||k&&!q)return;p.preventDefault();const Te=this.matches(Ui)?this:J.prev(this,Ui)[0]||J.next(this,Ui)[0]||J.findOne(Ui,p.delegateTarget.parentNode),Ce=Zn.getOrCreateInstance(Te);if(ge){p.stopPropagation(),Ce.show(),Ce._selectMenuItem(p);return}Ce._isShown()&&(p.stopPropagation(),Ce.hide(),Te.focus())}}B.on(document,sp,Ui,Zn.dataApiKeydownHandler),B.on(document,sp,ll,Zn.dataApiKeydownHandler),B.on(document,np,Zn.clearMenus),B.on(document,Mw,Zn.clearMenus),B.on(document,np,Ui,function(K){K.preventDefault(),Zn.getOrCreateInstance(this).toggle()}),E(Zn);const ip="backdrop",Xw="fade",op="show",rp=`mousedown.bs.${ip}`,Qw={className:"modal-backdrop",clickCallback:null,isAnimated:!1,isVisible:!0,rootElement:"body"},Zw={className:"string",clickCallback:"(function|null)",isAnimated:"boolean",isVisible:"boolean",rootElement:"(element|string)"};class ap extends z{constructor(p){super(),this._config=this._getConfig(p),this._isAppended=!1,this._element=null}static get Default(){return Qw}static get DefaultType(){return Zw}static get NAME(){return ip}show(p){if(!this._config.isVisible){V(p);return}this._append();const k=this._getElement();this._config.isAnimated&&x(k),k.classList.add(op),this._emulateAnimation(()=>{V(p)})}hide(p){if(!this._config.isVisible){V(p);return}this._getElement().classList.remove(op),this._emulateAnimation(()=>{this.dispose(),V(p)})}dispose(){this._isAppended&&(B.off(this._element,rp),this._element.remove(),this._isAppended=!1)}_getElement(){if(!this._element){const p=document.createElement("div");p.className=this._config.className,this._config.isAnimated&&p.classList.add(Xw),this._element=p}return this._element}_configAfterMerge(p){return p.rootElement=y(p.rootElement),p}_append(){if(this._isAppended)return;const p=this._getElement();this._config.rootElement.append(p),B.on(p,rp,()=>{V(this._config.clickCallback)}),this._isAppended=!0}_emulateAnimation(p){X(p,this._getElement(),this._config.isAnimated)}}const ex="focustrap",cl=".bs.focustrap",tx=`focusin${cl}`,nx=`keydown.tab${cl}`,sx="Tab",ix="forward",lp="backward",ox={autofocus:!0,trapElement:null},rx={autofocus:"boolean",trapElement:"element"};class cp extends z{constructor(p){super(),this._config=this._getConfig(p),this._isActive=!1,this._lastTabNavDirection=null}static get Default(){return ox}static get DefaultType(){return rx}static get NAME(){return ex}activate(){this._isActive||(this._config.autofocus&&this._config.trapElement.focus(),B.off(document,cl),B.on(document,tx,p=>this._handleFocusin(p)),B.on(document,nx,p=>this._handleKeydown(p)),this._isActive=!0)}deactivate(){this._isActive&&(this._isActive=!1,B.off(document,cl))}_handleFocusin(p){const{trapElement:k}=this._config;if(p.target===document||p.target===k||k.contains(p.target))return;const q=J.focusableChildren(k);q.length===0?k.focus():this._lastTabNavDirection===lp?q[q.length-1].focus():q[0].focus()}_handleKeydown(p){p.key===sx&&(this._lastTabNavDirection=p.shiftKey?lp:ix)}}const up=".fixed-top, .fixed-bottom, .is-fixed, .sticky-top",dp=".sticky-top",ul="padding-right",hp="margin-right";class vu{constructor(){this._element=document.body}getWidth(){const p=document.documentElement.clientWidth;return Math.abs(window.innerWidth-p)}hide(){const p=this.getWidth();this._disableOverFlow(),this._setElementAttributes(this._element,ul,k=>k+p),this._setElementAttributes(up,ul,k=>k+p),this._setElementAttributes(dp,hp,k=>k-p)}reset(){this._resetElementAttributes(this._element,"overflow"),this._resetElementAttributes(this._element,ul),this._resetElementAttributes(up,ul),this._resetElementAttributes(dp,hp)}isOverflowing(){return this.getWidth()>0}_disableOverFlow(){this._saveInitialAttribute(this._element,"overflow"),this._element.style.overflow="hidden"}_setElementAttributes(p,k,q){const ge=this.getWidth(),Te=Ce=>{if(Ce!==this._element&&window.innerWidth>Ce.clientWidth+ge)return;this._saveInitialAttribute(Ce,k);const Qe=window.getComputedStyle(Ce).getPropertyValue(k);Ce.style.setProperty(k,`${q(Number.parseFloat(Qe))}px`)};this._applyManipulationCallback(p,Te)}_saveInitialAttribute(p,k){const q=p.style.getPropertyValue(k);q&&j.setDataAttribute(p,k,q)}_resetElementAttributes(p,k){const q=ge=>{const Te=j.getDataAttribute(ge,k);if(Te===null){ge.style.removeProperty(k);return}j.removeDataAttribute(ge,k),ge.style.setProperty(k,Te)};this._applyManipulationCallback(p,q)}_applyManipulationCallback(p,k){if(m(p)){k(p);return}for(const q of J.find(p,this._element))k(q)}}const ax="modal",jn=".bs.modal",lx=".data-api",cx="Escape",ux=`hide${jn}`,dx=`hidePrevented${jn}`,fp=`hidden${jn}`,pp=`show${jn}`,hx=`shown${jn}`,fx=`resize${jn}`,px=`click.dismiss${jn}`,gx=`mousedown.dismiss${jn}`,mx=`keydown.dismiss${jn}`,_x=`click${jn}${lx}`,gp="modal-open",bx="fade",mp="show",yu="modal-static",vx=".modal.show",yx=".modal-dialog",wx=".modal-body",xx='[data-bs-toggle="modal"]',kx={backdrop:!0,focus:!0,keyboard:!0},Sx={backdrop:"(boolean|string)",focus:"boolean",keyboard:"boolean"};class qi extends W{constructor(p,k){super(p,k),this._dialog=J.findOne(yx,this._element),this._backdrop=this._initializeBackDrop(),this._focustrap=this._initializeFocusTrap(),this._isShown=!1,this._isTransitioning=!1,this._scrollBar=new vu,this._addEventListeners()}static get Default(){return kx}static get DefaultType(){return Sx}static get NAME(){return ax}toggle(p){return this._isShown?this.hide():this.show(p)}show(p){this._isShown||this._isTransitioning||B.trigger(this._element,pp,{relatedTarget:p}).defaultPrevented||(this._isShown=!0,this._isTransitioning=!0,this._scrollBar.hide(),document.body.classList.add(gp),this._adjustDialog(),this._backdrop.show(()=>this._showElement(p)))}hide(){!this._isShown||this._isTransitioning||B.trigger(this._element,ux).defaultPrevented||(this._isShown=!1,this._isTransitioning=!0,this._focustrap.deactivate(),this._element.classList.remove(mp),this._queueCallback(()=>this._hideModal(),this._element,this._isAnimated()))}dispose(){B.off(window,jn),B.off(this._dialog,jn),this._backdrop.dispose(),this._focustrap.deactivate(),super.dispose()}handleUpdate(){this._adjustDialog()}_initializeBackDrop(){return new ap({isVisible:!!this._config.backdrop,isAnimated:this._isAnimated()})}_initializeFocusTrap(){return new cp({trapElement:this._element})}_showElement(p){document.body.contains(this._element)||document.body.append(this._element),this._element.style.display="block",this._element.removeAttribute("aria-hidden"),this._element.setAttribute("aria-modal",!0),this._element.setAttribute("role","dialog"),this._element.scrollTop=0;const k=J.findOne(wx,this._dialog);k&&(k.scrollTop=0),x(this._element),this._element.classList.add(mp);const q=()=>{this._config.focus&&this._focustrap.activate(),this._isTransitioning=!1,B.trigger(this._element,hx,{relatedTarget:p})};this._queueCallback(q,this._dialog,this._isAnimated())}_addEventListeners(){B.on(this._element,mx,p=>{if(p.key===cx){if(this._config.keyboard){this.hide();return}this._triggerBackdropTransition()}}),B.on(window,fx,()=>{this._isShown&&!this._isTransitioning&&this._adjustDialog()}),B.on(this._element,gx,p=>{B.one(this._element,px,k=>{if(!(this._element!==p.target||this._element!==k.target)){if(this._config.backdrop==="static"){this._triggerBackdropTransition();return}this._config.backdrop&&this.hide()}})})}_hideModal(){this._element.style.display="none",this._element.setAttribute("aria-hidden",!0),this._element.removeAttribute("aria-modal"),this._element.removeAttribute("role"),this._isTransitioning=!1,this._backdrop.hide(()=>{document.body.classList.remove(gp),this._resetAdjustments(),this._scrollBar.reset(),B.trigger(this._element,fp)})}_isAnimated(){return this._element.classList.contains(bx)}_triggerBackdropTransition(){if(B.trigger(this._element,dx).defaultPrevented)return;const k=this._element.scrollHeight>document.documentElement.clientHeight,q=this._element.style.overflowY;q==="hidden"||this._element.classList.contains(yu)||(k||(this._element.style.overflowY="hidden"),this._element.classList.add(yu),this._queueCallback(()=>{this._element.classList.remove(yu),this._queueCallback(()=>{this._element.style.overflowY=q},this._dialog)},this._dialog),this._element.focus())}_adjustDialog(){const p=this._element.scrollHeight>document.documentElement.clientHeight,k=this._scrollBar.getWidth(),q=k>0;if(q&&!p){const ge=M()?"paddingLeft":"paddingRight";this._element.style[ge]=`${k}px`}if(!q&&p){const ge=M()?"paddingRight":"paddingLeft";this._element.style[ge]=`${k}px`}}_resetAdjustments(){this._element.style.paddingLeft="",this._element.style.paddingRight=""}static jQueryInterface(p,k){return this.each(function(){const q=qi.getOrCreateInstance(this,p);if(typeof p=="string"){if(typeof q[p]>"u")throw new TypeError(`No method named "${p}"`);q[p](k)}})}}B.on(document,_x,xx,function(K){const p=J.getElementFromSelector(this);["A","AREA"].includes(this.tagName)&&K.preventDefault(),B.one(p,pp,ge=>{ge.defaultPrevented||B.one(p,fp,()=>{v(this)&&this.focus()})});const k=J.findOne(vx);k&&qi.getInstance(k).hide(),qi.getOrCreateInstance(p).toggle(this)}),he(qi),E(qi);const $x="offcanvas",Is=".bs.offcanvas",_p=".data-api",Ax=`load${Is}${_p}`,Cx="Escape",bp="show",vp="showing",yp="hiding",Ex="offcanvas-backdrop",wp=".offcanvas.show",Tx=`show${Is}`,Px=`shown${Is}`,Mx=`hide${Is}`,xp=`hidePrevented${Is}`,kp=`hidden${Is}`,Dx=`resize${Is}`,Ox=`click${Is}${_p}`,Ix=`keydown.dismiss${Is}`,Lx='[data-bs-toggle="offcanvas"]',Rx={backdrop:!0,keyboard:!0,scroll:!1},Nx={backdrop:"(boolean|string)",keyboard:"boolean",scroll:"boolean"};class Ls extends W{constructor(p,k){super(p,k),this._isShown=!1,this._backdrop=this._initializeBackDrop(),this._focustrap=this._initializeFocusTrap(),this._addEventListeners()}static get Default(){return Rx}static get DefaultType(){return Nx}static get NAME(){return $x}toggle(p){return this._isShown?this.hide():this.show(p)}show(p){if(this._isShown||B.trigger(this._element,Tx,{relatedTarget:p}).defaultPrevented)return;this._isShown=!0,this._backdrop.show(),this._config.scroll||new vu().hide(),this._element.setAttribute("aria-modal",!0),this._element.setAttribute("role","dialog"),this._element.classList.add(vp);const q=()=>{(!this._config.scroll||this._config.backdrop)&&this._focustrap.activate(),this._element.classList.add(bp),this._element.classList.remove(vp),B.trigger(this._element,Px,{relatedTarget:p})};this._queueCallback(q,this._element,!0)}hide(){if(!this._isShown||B.trigger(this._element,Mx).defaultPrevented)return;this._focustrap.deactivate(),this._element.blur(),this._isShown=!1,this._element.classList.add(yp),this._backdrop.hide();const k=()=>{this._element.classList.remove(bp,yp),this._element.removeAttribute("aria-modal"),this._element.removeAttribute("role"),this._config.scroll||new vu().reset(),B.trigger(this._element,kp)};this._queueCallback(k,this._element,!0)}dispose(){this._backdrop.dispose(),this._focustrap.deactivate(),super.dispose()}_initializeBackDrop(){const p=()=>{if(this._config.backdrop==="static"){B.trigger(this._element,xp);return}this.hide()},k=!!this._config.backdrop;return new ap({className:Ex,isVisible:k,isAnimated:!0,rootElement:this._element.parentNode,clickCallback:k?p:null})}_initializeFocusTrap(){return new cp({trapElement:this._element})}_addEventListeners(){B.on(this._element,Ix,p=>{if(p.key===Cx){if(this._config.keyboard){this.hide();return}B.trigger(this._element,xp)}})}static jQueryInterface(p){return this.each(function(){const k=Ls.getOrCreateInstance(this,p);if(typeof p=="string"){if(k[p]===void 0||p.startsWith("_")||p==="constructor")throw new TypeError(`No method named "${p}"`);k[p](this)}})}}B.on(document,Ox,Lx,function(K){const p=J.getElementFromSelector(this);if(["A","AREA"].includes(this.tagName)&&K.preventDefault(),$(this))return;B.one(p,kp,()=>{v(this)&&this.focus()});const k=J.findOne(wp);k&&k!==p&&Ls.getInstance(k).hide(),Ls.getOrCreateInstance(p).toggle(this)}),B.on(window,Ax,()=>{for(const K of J.find(wp))Ls.getOrCreateInstance(K).show()}),B.on(window,Dx,()=>{for(const K of J.find("[aria-modal][class*=show][class*=offcanvas-]"))getComputedStyle(K).position!=="fixed"&&Ls.getOrCreateInstance(K).hide()}),he(Ls),E(Ls);const Sp={"*":["class","dir","id","lang","role",/^aria-[\w-]*$/i],a:["target","href","title","rel"],area:[],b:[],br:[],col:[],code:[],div:[],em:[],hr:[],h1:[],h2:[],h3:[],h4:[],h5:[],h6:[],i:[],img:["src","srcset","alt","title","width","height"],li:[],ol:[],p:[],pre:[],s:[],small:[],span:[],sub:[],sup:[],strong:[],u:[],ul:[]},Fx=new Set(["background","cite","href","itemtype","longdesc","poster","src","xlink:href"]),Bx=/^(?!javascript:)(?:[a-z0-9+.-]+:|[^&:/?#]*(?:[/?#]|$))/i,Vx=(K,p)=>{const k=K.nodeName.toLowerCase();return p.includes(k)?Fx.has(k)?!!Bx.test(K.nodeValue):!0:p.filter(q=>q instanceof RegExp).some(q=>q.test(k))};function Hx(K,p,k){if(!K.length)return K;if(k&&typeof k=="function")return k(K);const ge=new window.DOMParser().parseFromString(K,"text/html"),Te=[].concat(...ge.body.querySelectorAll("*"));for(const Ce of Te){const Qe=Ce.nodeName.toLowerCase();if(!Object.keys(p).includes(Qe)){Ce.remove();continue}const kn=[].concat(...Ce.attributes),Wn=[].concat(p["*"]||[],p[Qe]||[]);for(const Xt of kn)Vx(Xt,Wn)||Ce.removeAttribute(Xt.nodeName)}return ge.body.innerHTML}const jx="TemplateFactory",Wx={allowList:Sp,content:{},extraClass:"",html:!1,sanitize:!0,sanitizeFn:null,template:"
"},zx={allowList:"object",content:"object",extraClass:"(string|function)",html:"boolean",sanitize:"boolean",sanitizeFn:"(null|function)",template:"string"},Kx={entry:"(string|element|function|null)",selector:"(string|element)"};class Yx extends z{constructor(p){super(),this._config=this._getConfig(p)}static get Default(){return Wx}static get DefaultType(){return zx}static get NAME(){return jx}getContent(){return Object.values(this._config.content).map(p=>this._resolvePossibleFunction(p)).filter(Boolean)}hasContent(){return this.getContent().length>0}changeContent(p){return this._checkContent(p),this._config.content={...this._config.content,...p},this}toHtml(){const p=document.createElement("div");p.innerHTML=this._maybeSanitize(this._config.template);for(const[ge,Te]of Object.entries(this._config.content))this._setContent(p,Te,ge);const k=p.children[0],q=this._resolvePossibleFunction(this._config.extraClass);return q&&k.classList.add(...q.split(" ")),k}_typeCheckConfig(p){super._typeCheckConfig(p),this._checkContent(p.content)}_checkContent(p){for(const[k,q]of Object.entries(p))super._typeCheckConfig({selector:k,entry:q},Kx)}_setContent(p,k,q){const ge=J.findOne(q,p);if(ge){if(k=this._resolvePossibleFunction(k),!k){ge.remove();return}if(m(k)){this._putElementInTemplate(y(k),ge);return}if(this._config.html){ge.innerHTML=this._maybeSanitize(k);return}ge.textContent=k}}_maybeSanitize(p){return this._config.sanitize?Hx(p,this._config.allowList,this._config.sanitizeFn):p}_resolvePossibleFunction(p){return V(p,[this])}_putElementInTemplate(p,k){if(this._config.html){k.innerHTML="",k.append(p);return}k.textContent=p.textContent}}const Ux="tooltip",qx=new Set(["sanitize","allowList","sanitizeFn"]),wu="fade",Gx="modal",dl="show",Jx=".tooltip-inner",$p=`.${Gx}`,Ap="hide.bs.modal",Vr="hover",xu="focus",Xx="click",Qx="manual",Zx="hide",ek="hidden",tk="show",nk="shown",sk="inserted",ik="click",ok="focusin",rk="focusout",ak="mouseenter",lk="mouseleave",ck={AUTO:"auto",TOP:"top",RIGHT:M()?"left":"right",BOTTOM:"bottom",LEFT:M()?"right":"left"},uk={allowList:Sp,animation:!0,boundary:"clippingParents",container:!1,customClass:"",delay:0,fallbackPlacements:["top","right","bottom","left"],html:!1,offset:[0,6],placement:"top",popperConfig:null,sanitize:!0,sanitizeFn:null,selector:!1,template:'',title:"",trigger:"hover focus"},dk={allowList:"object",animation:"boolean",boundary:"(string|element)",container:"(string|element|boolean)",customClass:"(string|function)",delay:"(number|object)",fallbackPlacements:"array",html:"boolean",offset:"(array|string|function)",placement:"(string|function)",popperConfig:"(null|object|function)",sanitize:"boolean",sanitizeFn:"(null|function)",selector:"(string|boolean)",template:"string",title:"(string|element|function)",trigger:"string"};class Gi extends W{constructor(p,k){if(typeof i>"u")throw new TypeError("Bootstrap's tooltips require Popper (https://popper.js.org)");super(p,k),this._isEnabled=!0,this._timeout=0,this._isHovered=null,this._activeTrigger={},this._popper=null,this._templateFactory=null,this._newContent=null,this.tip=null,this._setListeners(),this._config.selector||this._fixTitle()}static get Default(){return uk}static get DefaultType(){return dk}static get NAME(){return Ux}enable(){this._isEnabled=!0}disable(){this._isEnabled=!1}toggleEnabled(){this._isEnabled=!this._isEnabled}toggle(){if(this._isEnabled){if(this._activeTrigger.click=!this._activeTrigger.click,this._isShown()){this._leave();return}this._enter()}}dispose(){clearTimeout(this._timeout),B.off(this._element.closest($p),Ap,this._hideModalHandler),this._element.getAttribute("data-bs-original-title")&&this._element.setAttribute("title",this._element.getAttribute("data-bs-original-title")),this._disposePopper(),super.dispose()}show(){if(this._element.style.display==="none")throw new Error("Please use show on visible elements");if(!(this._isWithContent()&&this._isEnabled))return;const p=B.trigger(this._element,this.constructor.eventName(tk)),q=(A(this._element)||this._element.ownerDocument.documentElement).contains(this._element);if(p.defaultPrevented||!q)return;this._disposePopper();const ge=this._getTipElement();this._element.setAttribute("aria-describedby",ge.getAttribute("id"));const{container:Te}=this._config;if(this._element.ownerDocument.documentElement.contains(this.tip)||(Te.append(ge),B.trigger(this._element,this.constructor.eventName(sk))),this._popper=this._createPopper(ge),ge.classList.add(dl),"ontouchstart"in document.documentElement)for(const Qe of[].concat(...document.body.children))B.on(Qe,"mouseover",D);const Ce=()=>{B.trigger(this._element,this.constructor.eventName(nk)),this._isHovered===!1&&this._leave(),this._isHovered=!1};this._queueCallback(Ce,this.tip,this._isAnimated())}hide(){if(!this._isShown()||B.trigger(this._element,this.constructor.eventName(Zx)).defaultPrevented)return;if(this._getTipElement().classList.remove(dl),"ontouchstart"in document.documentElement)for(const ge of[].concat(...document.body.children))B.off(ge,"mouseover",D);this._activeTrigger[Xx]=!1,this._activeTrigger[xu]=!1,this._activeTrigger[Vr]=!1,this._isHovered=null;const q=()=>{this._isWithActiveTrigger()||(this._isHovered||this._disposePopper(),this._element.removeAttribute("aria-describedby"),B.trigger(this._element,this.constructor.eventName(ek)))};this._queueCallback(q,this.tip,this._isAnimated())}update(){this._popper&&this._popper.update()}_isWithContent(){return!!this._getTitle()}_getTipElement(){return this.tip||(this.tip=this._createTipElement(this._newContent||this._getContentForTemplate())),this.tip}_createTipElement(p){const k=this._getTemplateFactory(p).toHtml();if(!k)return null;k.classList.remove(wu,dl),k.classList.add(`bs-${this.constructor.NAME}-auto`);const q=f(this.constructor.NAME).toString();return k.setAttribute("id",q),this._isAnimated()&&k.classList.add(wu),k}setContent(p){this._newContent=p,this._isShown()&&(this._disposePopper(),this.show())}_getTemplateFactory(p){return this._templateFactory?this._templateFactory.changeContent(p):this._templateFactory=new Yx({...this._config,content:p,extraClass:this._resolvePossibleFunction(this._config.customClass)}),this._templateFactory}_getContentForTemplate(){return{[Jx]:this._getTitle()}}_getTitle(){return this._resolvePossibleFunction(this._config.title)||this._element.getAttribute("data-bs-original-title")}_initializeOnDelegatedTarget(p){return this.constructor.getOrCreateInstance(p.delegateTarget,this._getDelegateConfig())}_isAnimated(){return this._config.animation||this.tip&&this.tip.classList.contains(wu)}_isShown(){return this.tip&&this.tip.classList.contains(dl)}_createPopper(p){const k=V(this._config.placement,[this,p,this._element]),q=ck[k.toUpperCase()];return i.createPopper(this._element,p,this._getPopperConfig(q))}_getOffset(){const{offset:p}=this._config;return typeof p=="string"?p.split(",").map(k=>Number.parseInt(k,10)):typeof p=="function"?k=>p(k,this._element):p}_resolvePossibleFunction(p){return V(p,[this._element])}_getPopperConfig(p){const k={placement:p,modifiers:[{name:"flip",options:{fallbackPlacements:this._config.fallbackPlacements}},{name:"offset",options:{offset:this._getOffset()}},{name:"preventOverflow",options:{boundary:this._config.boundary}},{name:"arrow",options:{element:`.${this.constructor.NAME}-arrow`}},{name:"preSetPlacement",enabled:!0,phase:"beforeMain",fn:q=>{this._getTipElement().setAttribute("data-popper-placement",q.state.placement)}}]};return{...k,...V(this._config.popperConfig,[k])}}_setListeners(){const p=this._config.trigger.split(" ");for(const k of p)if(k==="click")B.on(this._element,this.constructor.eventName(ik),this._config.selector,q=>{this._initializeOnDelegatedTarget(q).toggle()});else if(k!==Qx){const q=k===Vr?this.constructor.eventName(ak):this.constructor.eventName(ok),ge=k===Vr?this.constructor.eventName(lk):this.constructor.eventName(rk);B.on(this._element,q,this._config.selector,Te=>{const Ce=this._initializeOnDelegatedTarget(Te);Ce._activeTrigger[Te.type==="focusin"?xu:Vr]=!0,Ce._enter()}),B.on(this._element,ge,this._config.selector,Te=>{const Ce=this._initializeOnDelegatedTarget(Te);Ce._activeTrigger[Te.type==="focusout"?xu:Vr]=Ce._element.contains(Te.relatedTarget),Ce._leave()})}this._hideModalHandler=()=>{this._element&&this.hide()},B.on(this._element.closest($p),Ap,this._hideModalHandler)}_fixTitle(){const p=this._element.getAttribute("title");p&&(!this._element.getAttribute("aria-label")&&!this._element.textContent.trim()&&this._element.setAttribute("aria-label",p),this._element.setAttribute("data-bs-original-title",p),this._element.removeAttribute("title"))}_enter(){if(this._isShown()||this._isHovered){this._isHovered=!0;return}this._isHovered=!0,this._setTimeout(()=>{this._isHovered&&this.show()},this._config.delay.show)}_leave(){this._isWithActiveTrigger()||(this._isHovered=!1,this._setTimeout(()=>{this._isHovered||this.hide()},this._config.delay.hide))}_setTimeout(p,k){clearTimeout(this._timeout),this._timeout=setTimeout(p,k)}_isWithActiveTrigger(){return Object.values(this._activeTrigger).includes(!0)}_getConfig(p){const k=j.getDataAttributes(this._element);for(const q of Object.keys(k))qx.has(q)&&delete k[q];return p={...k,...typeof p=="object"&&p?p:{}},p=this._mergeConfigObj(p),p=this._configAfterMerge(p),this._typeCheckConfig(p),p}_configAfterMerge(p){return p.container=p.container===!1?document.body:y(p.container),typeof p.delay=="number"&&(p.delay={show:p.delay,hide:p.delay}),typeof p.title=="number"&&(p.title=p.title.toString()),typeof p.content=="number"&&(p.content=p.content.toString()),p}_getDelegateConfig(){const p={};for(const[k,q]of Object.entries(this._config))this.constructor.Default[k]!==q&&(p[k]=q);return p.selector=!1,p.trigger="manual",p}_disposePopper(){this._popper&&(this._popper.destroy(),this._popper=null),this.tip&&(this.tip.remove(),this.tip=null)}static jQueryInterface(p){return this.each(function(){const k=Gi.getOrCreateInstance(this,p);if(typeof p=="string"){if(typeof k[p]>"u")throw new TypeError(`No method named "${p}"`);k[p]()}})}}E(Gi);const hk="popover",fk=".popover-header",pk=".popover-body",gk={...Gi.Default,content:"",offset:[0,8],placement:"right",template:'',trigger:"click"},mk={...Gi.DefaultType,content:"(null|string|element|function)"};class hl extends Gi{static get Default(){return gk}static get DefaultType(){return mk}static get NAME(){return hk}_isWithContent(){return this._getTitle()||this._getContent()}_getContentForTemplate(){return{[fk]:this._getTitle(),[pk]:this._getContent()}}_getContent(){return this._resolvePossibleFunction(this._config.content)}static jQueryInterface(p){return this.each(function(){const k=hl.getOrCreateInstance(this,p);if(typeof p=="string"){if(typeof k[p]>"u")throw new TypeError(`No method named "${p}"`);k[p]()}})}}E(hl);const _k="scrollspy",ku=".bs.scrollspy",bk=".data-api",vk=`activate${ku}`,Cp=`click${ku}`,yk=`load${ku}${bk}`,wk="dropdown-item",jo="active",xk='[data-bs-spy="scroll"]',Su="[href]",kk=".nav, .list-group",Ep=".nav-link",Sk=`${Ep}, .nav-item > ${Ep}, .list-group-item`,$k=".dropdown",Ak=".dropdown-toggle",Ck={offset:null,rootMargin:"0px 0px -25%",smoothScroll:!1,target:null,threshold:[.1,.5,1]},Ek={offset:"(number|null)",rootMargin:"string",smoothScroll:"boolean",target:"element",threshold:"array"};class Hr extends W{constructor(p,k){super(p,k),this._targetLinks=new Map,this._observableSections=new Map,this._rootElement=getComputedStyle(this._element).overflowY==="visible"?null:this._element,this._activeTarget=null,this._observer=null,this._previousScrollData={visibleEntryTop:0,parentScrollTop:0},this.refresh()}static get Default(){return Ck}static get DefaultType(){return Ek}static get NAME(){return _k}refresh(){this._initializeTargetsAndObservables(),this._maybeEnableSmoothScroll(),this._observer?this._observer.disconnect():this._observer=this._getNewObserver();for(const p of this._observableSections.values())this._observer.observe(p)}dispose(){this._observer.disconnect(),super.dispose()}_configAfterMerge(p){return p.target=y(p.target)||document.body,p.rootMargin=p.offset?`${p.offset}px 0px -30%`:p.rootMargin,typeof p.threshold=="string"&&(p.threshold=p.threshold.split(",").map(k=>Number.parseFloat(k))),p}_maybeEnableSmoothScroll(){this._config.smoothScroll&&(B.off(this._config.target,Cp),B.on(this._config.target,Cp,Su,p=>{const k=this._observableSections.get(p.target.hash);if(k){p.preventDefault();const q=this._rootElement||window,ge=k.offsetTop-this._element.offsetTop;if(q.scrollTo){q.scrollTo({top:ge,behavior:"smooth"});return}q.scrollTop=ge}}))}_getNewObserver(){const p={root:this._rootElement,threshold:this._config.threshold,rootMargin:this._config.rootMargin};return new IntersectionObserver(k=>this._observerCallback(k),p)}_observerCallback(p){const k=Ce=>this._targetLinks.get(`#${Ce.target.id}`),q=Ce=>{this._previousScrollData.visibleEntryTop=Ce.target.offsetTop,this._process(k(Ce))},ge=(this._rootElement||document.documentElement).scrollTop,Te=ge>=this._previousScrollData.parentScrollTop;this._previousScrollData.parentScrollTop=ge;for(const Ce of p){if(!Ce.isIntersecting){this._activeTarget=null,this._clearActiveClass(k(Ce));continue}const Qe=Ce.target.offsetTop>=this._previousScrollData.visibleEntryTop;if(Te&&Qe){if(q(Ce),!ge)return;continue}!Te&&!Qe&&q(Ce)}}_initializeTargetsAndObservables(){this._targetLinks=new Map,this._observableSections=new Map;const p=J.find(Su,this._config.target);for(const k of p){if(!k.hash||$(k))continue;const q=J.findOne(decodeURI(k.hash),this._element);v(q)&&(this._targetLinks.set(decodeURI(k.hash),k),this._observableSections.set(k.hash,q))}}_process(p){this._activeTarget!==p&&(this._clearActiveClass(this._config.target),this._activeTarget=p,p.classList.add(jo),this._activateParents(p),B.trigger(this._element,vk,{relatedTarget:p}))}_activateParents(p){if(p.classList.contains(wk)){J.findOne(Ak,p.closest($k)).classList.add(jo);return}for(const k of J.parents(p,kk))for(const q of J.prev(k,Sk))q.classList.add(jo)}_clearActiveClass(p){p.classList.remove(jo);const k=J.find(`${Su}.${jo}`,p);for(const q of k)q.classList.remove(jo)}static jQueryInterface(p){return this.each(function(){const k=Hr.getOrCreateInstance(this,p);if(typeof p=="string"){if(k[p]===void 0||p.startsWith("_")||p==="constructor")throw new TypeError(`No method named "${p}"`);k[p]()}})}}B.on(window,yk,()=>{for(const K of J.find(xk))Hr.getOrCreateInstance(K)}),E(Hr);const Tk="tab",Ji=".bs.tab",Pk=`hide${Ji}`,Mk=`hidden${Ji}`,Dk=`show${Ji}`,Ok=`shown${Ji}`,Ik=`click${Ji}`,Lk=`keydown${Ji}`,Rk=`load${Ji}`,Nk="ArrowLeft",Tp="ArrowRight",Fk="ArrowUp",Pp="ArrowDown",$u="Home",Mp="End",Xi="active",Dp="fade",Au="show",Bk="dropdown",Op=".dropdown-toggle",Vk=".dropdown-menu",Cu=`:not(${Op})`,Hk='.list-group, .nav, [role="tablist"]',jk=".nav-item, .list-group-item",Wk=`.nav-link${Cu}, .list-group-item${Cu}, [role="tab"]${Cu}`,Ip='[data-bs-toggle="tab"], [data-bs-toggle="pill"], [data-bs-toggle="list"]',Eu=`${Wk}, ${Ip}`,zk=`.${Xi}[data-bs-toggle="tab"], .${Xi}[data-bs-toggle="pill"], .${Xi}[data-bs-toggle="list"]`;class Qi extends W{constructor(p){super(p),this._parent=this._element.closest(Hk),this._parent&&(this._setInitialAttributes(this._parent,this._getChildren()),B.on(this._element,Lk,k=>this._keydown(k)))}static get NAME(){return Tk}show(){const p=this._element;if(this._elemIsActive(p))return;const k=this._getActiveElem(),q=k?B.trigger(k,Pk,{relatedTarget:p}):null;B.trigger(p,Dk,{relatedTarget:k}).defaultPrevented||q&&q.defaultPrevented||(this._deactivate(k,p),this._activate(p,k))}_activate(p,k){if(!p)return;p.classList.add(Xi),this._activate(J.getElementFromSelector(p));const q=()=>{if(p.getAttribute("role")!=="tab"){p.classList.add(Au);return}p.removeAttribute("tabindex"),p.setAttribute("aria-selected",!0),this._toggleDropDown(p,!0),B.trigger(p,Ok,{relatedTarget:k})};this._queueCallback(q,p,p.classList.contains(Dp))}_deactivate(p,k){if(!p)return;p.classList.remove(Xi),p.blur(),this._deactivate(J.getElementFromSelector(p));const q=()=>{if(p.getAttribute("role")!=="tab"){p.classList.remove(Au);return}p.setAttribute("aria-selected",!1),p.setAttribute("tabindex","-1"),this._toggleDropDown(p,!1),B.trigger(p,Mk,{relatedTarget:k})};this._queueCallback(q,p,p.classList.contains(Dp))}_keydown(p){if(![Nk,Tp,Fk,Pp,$u,Mp].includes(p.key))return;p.stopPropagation(),p.preventDefault();const k=this._getChildren().filter(ge=>!$(ge));let q;if([$u,Mp].includes(p.key))q=k[p.key===$u?0:k.length-1];else{const ge=[Tp,Pp].includes(p.key);q=le(k,p.target,ge,!0)}q&&(q.focus({preventScroll:!0}),Qi.getOrCreateInstance(q).show())}_getChildren(){return J.find(Eu,this._parent)}_getActiveElem(){return this._getChildren().find(p=>this._elemIsActive(p))||null}_setInitialAttributes(p,k){this._setAttributeIfNotExists(p,"role","tablist");for(const q of k)this._setInitialAttributesOnChild(q)}_setInitialAttributesOnChild(p){p=this._getInnerElement(p);const k=this._elemIsActive(p),q=this._getOuterElement(p);p.setAttribute("aria-selected",k),q!==p&&this._setAttributeIfNotExists(q,"role","presentation"),k||p.setAttribute("tabindex","-1"),this._setAttributeIfNotExists(p,"role","tab"),this._setInitialAttributesOnTargetPanel(p)}_setInitialAttributesOnTargetPanel(p){const k=J.getElementFromSelector(p);k&&(this._setAttributeIfNotExists(k,"role","tabpanel"),p.id&&this._setAttributeIfNotExists(k,"aria-labelledby",`${p.id}`))}_toggleDropDown(p,k){const q=this._getOuterElement(p);if(!q.classList.contains(Bk))return;const ge=(Te,Ce)=>{const Qe=J.findOne(Te,q);Qe&&Qe.classList.toggle(Ce,k)};ge(Op,Xi),ge(Vk,Au),q.setAttribute("aria-expanded",k)}_setAttributeIfNotExists(p,k,q){p.hasAttribute(k)||p.setAttribute(k,q)}_elemIsActive(p){return p.classList.contains(Xi)}_getInnerElement(p){return p.matches(Eu)?p:J.findOne(Eu,p)}_getOuterElement(p){return p.closest(jk)||p}static jQueryInterface(p){return this.each(function(){const k=Qi.getOrCreateInstance(this);if(typeof p=="string"){if(k[p]===void 0||p.startsWith("_")||p==="constructor")throw new TypeError(`No method named "${p}"`);k[p]()}})}}B.on(document,Ik,Ip,function(K){["A","AREA"].includes(this.tagName)&&K.preventDefault(),!$(this)&&Qi.getOrCreateInstance(this).show()}),B.on(window,Rk,()=>{for(const K of J.find(zk))Qi.getOrCreateInstance(K)}),E(Qi);const Kk="toast",ii=".bs.toast",Yk=`mouseover${ii}`,Uk=`mouseout${ii}`,qk=`focusin${ii}`,Gk=`focusout${ii}`,Jk=`hide${ii}`,Xk=`hidden${ii}`,Qk=`show${ii}`,Zk=`shown${ii}`,eS="fade",Lp="hide",fl="show",pl="showing",tS={animation:"boolean",autohide:"boolean",delay:"number"},nS={animation:!0,autohide:!0,delay:5e3};class jr extends W{constructor(p,k){super(p,k),this._timeout=null,this._hasMouseInteraction=!1,this._hasKeyboardInteraction=!1,this._setListeners()}static get Default(){return nS}static get DefaultType(){return tS}static get NAME(){return Kk}show(){if(B.trigger(this._element,Qk).defaultPrevented)return;this._clearTimeout(),this._config.animation&&this._element.classList.add(eS);const k=()=>{this._element.classList.remove(pl),B.trigger(this._element,Zk),this._maybeScheduleHide()};this._element.classList.remove(Lp),x(this._element),this._element.classList.add(fl,pl),this._queueCallback(k,this._element,this._config.animation)}hide(){if(!this.isShown()||B.trigger(this._element,Jk).defaultPrevented)return;const k=()=>{this._element.classList.add(Lp),this._element.classList.remove(pl,fl),B.trigger(this._element,Xk)};this._element.classList.add(pl),this._queueCallback(k,this._element,this._config.animation)}dispose(){this._clearTimeout(),this.isShown()&&this._element.classList.remove(fl),super.dispose()}isShown(){return this._element.classList.contains(fl)}_maybeScheduleHide(){this._config.autohide&&(this._hasMouseInteraction||this._hasKeyboardInteraction||(this._timeout=setTimeout(()=>{this.hide()},this._config.delay)))}_onInteraction(p,k){switch(p.type){case"mouseover":case"mouseout":{this._hasMouseInteraction=k;break}case"focusin":case"focusout":{this._hasKeyboardInteraction=k;break}}if(k){this._clearTimeout();return}const q=p.relatedTarget;this._element===q||this._element.contains(q)||this._maybeScheduleHide()}_setListeners(){B.on(this._element,Yk,p=>this._onInteraction(p,!0)),B.on(this._element,Uk,p=>this._onInteraction(p,!1)),B.on(this._element,qk,p=>this._onInteraction(p,!0)),B.on(this._element,Gk,p=>this._onInteraction(p,!1))}_clearTimeout(){clearTimeout(this._timeout),this._timeout=null}static jQueryInterface(p){return this.each(function(){const k=jr.getOrCreateInstance(this,p);if(typeof p=="string"){if(typeof k[p]>"u")throw new TypeError(`No method named "${p}"`);k[p](this)}})}}return he(jr),E(jr),{Alert:Je,Button:se,Carousel:Fo,Collapse:Vo,Dropdown:Zn,Modal:qi,Offcanvas:Ls,Popover:hl,ScrollSpy:Hr,Tab:Qi,Toast:jr,Tooltip:Gi}})})(rS);/** + */(function(t,e){(function(n,i){t.exports=i(_2)})(lx,function(n){function i(G){const _=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(G){for(const R in G)if(R!=="default"){const q=Object.getOwnPropertyDescriptor(G,R);Object.defineProperty(_,R,q.get?q:{enumerable:!0,get:()=>G[R]})}}return _.default=G,Object.freeze(_)}const s=i(n),r=new Map,o={set(G,_,R){r.has(G)||r.set(G,new Map);const q=r.get(G);if(!q.has(_)&&q.size!==0){console.error(`Bootstrap doesn't allow more than one instance per element. Bound instance: ${Array.from(q.keys())[0]}.`);return}q.set(_,R)},get(G,_){return r.has(G)&&r.get(G).get(_)||null},remove(G,_){if(!r.has(G))return;const R=r.get(G);R.delete(_),R.size===0&&r.delete(G)}},a=1e6,l=1e3,c="transitionend",u=G=>(G&&window.CSS&&window.CSS.escape&&(G=G.replace(/#([^\s"#']+)/g,(_,R)=>`#${CSS.escape(R)}`)),G),d=G=>G==null?`${G}`:Object.prototype.toString.call(G).match(/\s([a-z]+)/i)[1].toLowerCase(),h=G=>{do G+=Math.floor(Math.random()*a);while(document.getElementById(G));return G},f=G=>{if(!G)return 0;let{transitionDuration:_,transitionDelay:R}=window.getComputedStyle(G);const q=Number.parseFloat(_),ye=Number.parseFloat(R);return!q&&!ye?0:(_=_.split(",")[0],R=R.split(",")[0],(Number.parseFloat(_)+Number.parseFloat(R))*l)},p=G=>{G.dispatchEvent(new Event(c))},m=G=>!G||typeof G!="object"?!1:(typeof G.jquery<"u"&&(G=G[0]),typeof G.nodeType<"u"),y=G=>m(G)?G.jquery?G[0]:G:typeof G=="string"&&G.length>0?document.querySelector(u(G)):null,v=G=>{if(!m(G)||G.getClientRects().length===0)return!1;const _=getComputedStyle(G).getPropertyValue("visibility")==="visible",R=G.closest("details:not([open])");if(!R)return _;if(R!==G){const q=G.closest("summary");if(q&&q.parentNode!==R||q===null)return!1}return _},b=G=>!G||G.nodeType!==Node.ELEMENT_NODE||G.classList.contains("disabled")?!0:typeof G.disabled<"u"?G.disabled:G.hasAttribute("disabled")&&G.getAttribute("disabled")!=="false",E=G=>{if(!document.documentElement.attachShadow)return null;if(typeof G.getRootNode=="function"){const _=G.getRootNode();return _ instanceof ShadowRoot?_:null}return G instanceof ShadowRoot?G:G.parentNode?E(G.parentNode):null},C=()=>{},w=G=>{G.offsetHeight},x=()=>window.jQuery&&!document.body.hasAttribute("data-bs-no-jquery")?window.jQuery:null,T=[],k=G=>{document.readyState==="loading"?(T.length||document.addEventListener("DOMContentLoaded",()=>{for(const _ of T)_()}),T.push(G)):G()},A=()=>document.documentElement.dir==="rtl",P=G=>{k(()=>{const _=x();if(_){const R=G.NAME,q=_.fn[R];_.fn[R]=G.jQueryInterface,_.fn[R].Constructor=G,_.fn[R].noConflict=()=>(_.fn[R]=q,G.jQueryInterface)}})},F=(G,_=[],R=G)=>typeof G=="function"?G(..._):R,H=(G,_,R=!0)=>{if(!R){F(G);return}const ye=f(_)+5;let Pe=!1;const Me=({target:rt})=>{rt===_&&(Pe=!0,_.removeEventListener(c,Me),F(G))};_.addEventListener(c,Me),setTimeout(()=>{Pe||p(_)},ye)},te=(G,_,R,q)=>{const ye=G.length;let Pe=G.indexOf(_);return Pe===-1?!R&&q?G[ye-1]:G[0]:(Pe+=R?1:-1,q&&(Pe=(Pe+ye)%ye),G[Math.max(0,Math.min(Pe,ye-1))])},N=/[^.]*(?=\..*)\.|.*/,L=/\..*/,I=/::\d+$/,W={};let X=1;const J={mouseenter:"mouseover",mouseleave:"mouseout"},ne=new Set(["click","dblclick","mouseup","mousedown","contextmenu","mousewheel","DOMMouseScroll","mouseover","mouseout","mousemove","selectstart","selectend","keydown","keypress","keyup","orientationchange","touchstart","touchmove","touchend","touchcancel","pointerdown","pointermove","pointerup","pointerleave","pointercancel","gesturestart","gesturechange","gestureend","focus","blur","change","reset","select","submit","focusin","focusout","load","unload","beforeunload","resize","move","DOMContentLoaded","readystatechange","error","abort","scroll"]);function ue(G,_){return _&&`${_}::${X++}`||G.uidEvent||X++}function Y(G){const _=ue(G);return G.uidEvent=_,W[_]=W[_]||{},W[_]}function Z(G,_){return function R(q){return ge(q,{delegateTarget:G}),R.oneOff&&z.off(G,q.type,_),_.apply(G,[q])}}function M(G,_,R){return function q(ye){const Pe=G.querySelectorAll(_);for(let{target:Me}=ye;Me&&Me!==this;Me=Me.parentNode)for(const rt of Pe)if(rt===Me)return ge(ye,{delegateTarget:Me}),q.oneOff&&z.off(G,ye.type,_,R),R.apply(Me,[ye])}}function ie(G,_,R=null){return Object.values(G).find(q=>q.callable===_&&q.delegationSelector===R)}function le(G,_,R){const q=typeof _=="string",ye=q?R:_||R;let Pe=ve(G);return ne.has(Pe)||(Pe=G),[q,ye,Pe]}function $(G,_,R,q,ye){if(typeof _!="string"||!G)return;let[Pe,Me,rt]=le(_,R,q);_ in J&&(Me=(CP=>function(Ma){if(!Ma.relatedTarget||Ma.relatedTarget!==Ma.delegateTarget&&!Ma.delegateTarget.contains(Ma.relatedTarget))return CP.call(this,Ma)})(Me));const oi=Y(G),Oi=oi[rt]||(oi[rt]={}),Cn=ie(Oi,Me,Pe?R:null);if(Cn){Cn.oneOff=Cn.oneOff&&ye;return}const ms=ue(Me,_.replace(N,"")),Ji=Pe?M(G,R,Me):Z(G,Me);Ji.delegationSelector=Pe?R:null,Ji.callable=Me,Ji.oneOff=ye,Ji.uidEvent=ms,Oi[ms]=Ji,G.addEventListener(rt,Ji,Pe)}function oe(G,_,R,q,ye){const Pe=ie(_[R],q,ye);Pe&&(G.removeEventListener(R,Pe,!!ye),delete _[R][Pe.uidEvent])}function de(G,_,R,q){const ye=_[R]||{};for(const[Pe,Me]of Object.entries(ye))Pe.includes(q)&&oe(G,_,R,Me.callable,Me.delegationSelector)}function ve(G){return G=G.replace(L,""),J[G]||G}const z={on(G,_,R,q){$(G,_,R,q,!1)},one(G,_,R,q){$(G,_,R,q,!0)},off(G,_,R,q){if(typeof _!="string"||!G)return;const[ye,Pe,Me]=le(_,R,q),rt=Me!==_,oi=Y(G),Oi=oi[Me]||{},Cn=_.startsWith(".");if(typeof Pe<"u"){if(!Object.keys(Oi).length)return;oe(G,oi,Me,Pe,ye?R:null);return}if(Cn)for(const ms of Object.keys(oi))de(G,oi,ms,_.slice(1));for(const[ms,Ji]of Object.entries(Oi)){const cd=ms.replace(I,"");(!rt||_.includes(cd))&&oe(G,oi,Me,Ji.callable,Ji.delegationSelector)}},trigger(G,_,R){if(typeof _!="string"||!G)return null;const q=x(),ye=ve(_),Pe=_!==ye;let Me=null,rt=!0,oi=!0,Oi=!1;Pe&&q&&(Me=q.Event(_,R),q(G).trigger(Me),rt=!Me.isPropagationStopped(),oi=!Me.isImmediatePropagationStopped(),Oi=Me.isDefaultPrevented());const Cn=ge(new Event(_,{bubbles:rt,cancelable:!0}),R);return Oi&&Cn.preventDefault(),oi&&G.dispatchEvent(Cn),Cn.defaultPrevented&&Me&&Me.preventDefault(),Cn}};function ge(G,_={}){for(const[R,q]of Object.entries(_))try{G[R]=q}catch{Object.defineProperty(G,R,{configurable:!0,get(){return q}})}return G}function S(G){if(G==="true")return!0;if(G==="false")return!1;if(G===Number(G).toString())return Number(G);if(G===""||G==="null")return null;if(typeof G!="string")return G;try{return JSON.parse(decodeURIComponent(G))}catch{return G}}function O(G){return G.replace(/[A-Z]/g,_=>`-${_.toLowerCase()}`)}const K={setDataAttribute(G,_,R){G.setAttribute(`data-bs-${O(_)}`,R)},removeDataAttribute(G,_){G.removeAttribute(`data-bs-${O(_)}`)},getDataAttributes(G){if(!G)return{};const _={},R=Object.keys(G.dataset).filter(q=>q.startsWith("bs")&&!q.startsWith("bsConfig"));for(const q of R){let ye=q.replace(/^bs/,"");ye=ye.charAt(0).toLowerCase()+ye.slice(1,ye.length),_[ye]=S(G.dataset[q])}return _},getDataAttribute(G,_){return S(G.getAttribute(`data-bs-${O(_)}`))}};class U{static get Default(){return{}}static get DefaultType(){return{}}static get NAME(){throw new Error('You have to implement the static method "NAME", for each component!')}_getConfig(_){return _=this._mergeConfigObj(_),_=this._configAfterMerge(_),this._typeCheckConfig(_),_}_configAfterMerge(_){return _}_mergeConfigObj(_,R){const q=m(R)?K.getDataAttribute(R,"config"):{};return{...this.constructor.Default,...typeof q=="object"?q:{},...m(R)?K.getDataAttributes(R):{},...typeof _=="object"?_:{}}}_typeCheckConfig(_,R=this.constructor.DefaultType){for(const[q,ye]of Object.entries(R)){const Pe=_[q],Me=m(Pe)?"element":d(Pe);if(!new RegExp(ye).test(Me))throw new TypeError(`${this.constructor.NAME.toUpperCase()}: Option "${q}" provided type "${Me}" but expected type "${ye}".`)}}}const re="5.3.2";class j extends U{constructor(_,R){super(),_=y(_),_&&(this._element=_,this._config=this._getConfig(R),o.set(this._element,this.constructor.DATA_KEY,this))}dispose(){o.remove(this._element,this.constructor.DATA_KEY),z.off(this._element,this.constructor.EVENT_KEY);for(const _ of Object.getOwnPropertyNames(this))this[_]=null}_queueCallback(_,R,q=!0){H(_,R,q)}_getConfig(_){return _=this._mergeConfigObj(_,this._element),_=this._configAfterMerge(_),this._typeCheckConfig(_),_}static getInstance(_){return o.get(y(_),this.DATA_KEY)}static getOrCreateInstance(_,R={}){return this.getInstance(_)||new this(_,typeof R=="object"?R:null)}static get VERSION(){return re}static get DATA_KEY(){return`bs.${this.NAME}`}static get EVENT_KEY(){return`.${this.DATA_KEY}`}static eventName(_){return`${_}${this.EVENT_KEY}`}}const se=G=>{let _=G.getAttribute("data-bs-target");if(!_||_==="#"){let R=G.getAttribute("href");if(!R||!R.includes("#")&&!R.startsWith("."))return null;R.includes("#")&&!R.startsWith("#")&&(R=`#${R.split("#")[1]}`),_=R&&R!=="#"?u(R.trim()):null}return _},ee={find(G,_=document.documentElement){return[].concat(...Element.prototype.querySelectorAll.call(_,G))},findOne(G,_=document.documentElement){return Element.prototype.querySelector.call(_,G)},children(G,_){return[].concat(...G.children).filter(R=>R.matches(_))},parents(G,_){const R=[];let q=G.parentNode.closest(_);for(;q;)R.push(q),q=q.parentNode.closest(_);return R},prev(G,_){let R=G.previousElementSibling;for(;R;){if(R.matches(_))return[R];R=R.previousElementSibling}return[]},next(G,_){let R=G.nextElementSibling;for(;R;){if(R.matches(_))return[R];R=R.nextElementSibling}return[]},focusableChildren(G){const _=["a","button","input","textarea","select","details","[tabindex]",'[contenteditable="true"]'].map(R=>`${R}:not([tabindex^="-"])`).join(",");return this.find(_,G).filter(R=>!b(R)&&v(R))},getSelectorFromElement(G){const _=se(G);return _&&ee.findOne(_)?_:null},getElementFromSelector(G){const _=se(G);return _?ee.findOne(_):null},getMultipleElementsFromSelector(G){const _=se(G);return _?ee.find(_):[]}},fe=(G,_="hide")=>{const R=`click.dismiss${G.EVENT_KEY}`,q=G.NAME;z.on(document,R,`[data-bs-dismiss="${q}"]`,function(ye){if(["A","AREA"].includes(this.tagName)&&ye.preventDefault(),b(this))return;const Pe=ee.getElementFromSelector(this)||this.closest(`.${q}`);G.getOrCreateInstance(Pe)[_]()})},me="alert",Le=".bs.alert",Ae=`close${Le}`,ze=`closed${Le}`,Be="fade",nt="show";class Ze extends j{static get NAME(){return me}close(){if(z.trigger(this._element,Ae).defaultPrevented)return;this._element.classList.remove(nt);const R=this._element.classList.contains(Be);this._queueCallback(()=>this._destroyElement(),this._element,R)}_destroyElement(){this._element.remove(),z.trigger(this._element,ze),this.dispose()}static jQueryInterface(_){return this.each(function(){const R=Ze.getOrCreateInstance(this);if(typeof _=="string"){if(R[_]===void 0||_.startsWith("_")||_==="constructor")throw new TypeError(`No method named "${_}"`);R[_](this)}})}}fe(Ze,"close"),P(Ze);const Mt="button",Un=".bs.button",Ri=".data-api",wi="active",Xi='[data-bs-toggle="button"]',Ut=`click${Un}${Ri}`;class ae extends j{static get NAME(){return Mt}toggle(){this._element.setAttribute("aria-pressed",this._element.classList.toggle(wi))}static jQueryInterface(_){return this.each(function(){const R=ae.getOrCreateInstance(this);_==="toggle"&&R[_]()})}}z.on(document,Ut,Xi,G=>{G.preventDefault();const _=G.target.closest(Xi);ae.getOrCreateInstance(_).toggle()}),P(ae);const Te="swipe",he=".bs.swipe",ke=`touchstart${he}`,De=`touchmove${he}`,Ht=`touchend${he}`,un=`pointerdown${he}`,Di=`pointerup${he}`,zs="touch",dn="pen",En="pointer-event",Sn=40,ii={endCallback:null,leftCallback:null,rightCallback:null},si={endCallback:"(function|null)",leftCallback:"(function|null)",rightCallback:"(function|null)"};class ri extends U{constructor(_,R){super(),this._element=_,!(!_||!ri.isSupported())&&(this._config=this._getConfig(R),this._deltaX=0,this._supportPointerEvents=!!window.PointerEvent,this._initEvents())}static get Default(){return ii}static get DefaultType(){return si}static get NAME(){return Te}dispose(){z.off(this._element,he)}_start(_){if(!this._supportPointerEvents){this._deltaX=_.touches[0].clientX;return}this._eventIsPointerPenTouch(_)&&(this._deltaX=_.clientX)}_end(_){this._eventIsPointerPenTouch(_)&&(this._deltaX=_.clientX-this._deltaX),this._handleSwipe(),F(this._config.endCallback)}_move(_){this._deltaX=_.touches&&_.touches.length>1?0:_.touches[0].clientX-this._deltaX}_handleSwipe(){const _=Math.abs(this._deltaX);if(_<=Sn)return;const R=_/this._deltaX;this._deltaX=0,R&&F(R>0?this._config.rightCallback:this._config.leftCallback)}_initEvents(){this._supportPointerEvents?(z.on(this._element,un,_=>this._start(_)),z.on(this._element,Di,_=>this._end(_)),this._element.classList.add(En)):(z.on(this._element,ke,_=>this._start(_)),z.on(this._element,De,_=>this._move(_)),z.on(this._element,Ht,_=>this._end(_)))}_eventIsPointerPenTouch(_){return this._supportPointerEvents&&(_.pointerType===dn||_.pointerType===zs)}static isSupported(){return"ontouchstart"in document.documentElement||navigator.maxTouchPoints>0}}const qi="carousel",zt=".bs.carousel",$i=".data-api",ig="ArrowLeft",cA="ArrowRight",uA=500,Ql="next",xa="prev",Ea="left",Qu="right",dA=`slide${zt}`,sg=`slid${zt}`,hA=`keydown${zt}`,fA=`mouseenter${zt}`,gA=`mouseleave${zt}`,pA=`dragstart${zt}`,mA=`load${zt}${$i}`,_A=`click${zt}${$i}`,o0="carousel",ed="active",yA="slide",vA="carousel-item-end",bA="carousel-item-start",wA="carousel-item-next",xA="carousel-item-prev",a0=".active",l0=".carousel-item",EA=a0+l0,SA=".carousel-item img",CA=".carousel-indicators",TA="[data-bs-slide], [data-bs-slide-to]",kA='[data-bs-ride="carousel"]',AA={[ig]:Qu,[cA]:Ea},MA={interval:5e3,keyboard:!0,pause:"hover",ride:!1,touch:!0,wrap:!0},IA={interval:"(number|boolean)",keyboard:"boolean",pause:"(string|boolean)",ride:"(boolean|string)",touch:"boolean",wrap:"boolean"};class Sa extends j{constructor(_,R){super(_,R),this._interval=null,this._activeElement=null,this._isSliding=!1,this.touchTimeout=null,this._swipeHelper=null,this._indicatorsElement=ee.findOne(CA,this._element),this._addEventListeners(),this._config.ride===o0&&this.cycle()}static get Default(){return MA}static get DefaultType(){return IA}static get NAME(){return qi}next(){this._slide(Ql)}nextWhenVisible(){!document.hidden&&v(this._element)&&this.next()}prev(){this._slide(xa)}pause(){this._isSliding&&p(this._element),this._clearInterval()}cycle(){this._clearInterval(),this._updateInterval(),this._interval=setInterval(()=>this.nextWhenVisible(),this._config.interval)}_maybeEnableCycle(){if(this._config.ride){if(this._isSliding){z.one(this._element,sg,()=>this.cycle());return}this.cycle()}}to(_){const R=this._getItems();if(_>R.length-1||_<0)return;if(this._isSliding){z.one(this._element,sg,()=>this.to(_));return}const q=this._getItemIndex(this._getActive());if(q===_)return;const ye=_>q?Ql:xa;this._slide(ye,R[_])}dispose(){this._swipeHelper&&this._swipeHelper.dispose(),super.dispose()}_configAfterMerge(_){return _.defaultInterval=_.interval,_}_addEventListeners(){this._config.keyboard&&z.on(this._element,hA,_=>this._keydown(_)),this._config.pause==="hover"&&(z.on(this._element,fA,()=>this.pause()),z.on(this._element,gA,()=>this._maybeEnableCycle())),this._config.touch&&ri.isSupported()&&this._addTouchEventListeners()}_addTouchEventListeners(){for(const q of ee.find(SA,this._element))z.on(q,pA,ye=>ye.preventDefault());const R={leftCallback:()=>this._slide(this._directionToOrder(Ea)),rightCallback:()=>this._slide(this._directionToOrder(Qu)),endCallback:()=>{this._config.pause==="hover"&&(this.pause(),this.touchTimeout&&clearTimeout(this.touchTimeout),this.touchTimeout=setTimeout(()=>this._maybeEnableCycle(),uA+this._config.interval))}};this._swipeHelper=new ri(this._element,R)}_keydown(_){if(/input|textarea/i.test(_.target.tagName))return;const R=AA[_.key];R&&(_.preventDefault(),this._slide(this._directionToOrder(R)))}_getItemIndex(_){return this._getItems().indexOf(_)}_setActiveIndicatorElement(_){if(!this._indicatorsElement)return;const R=ee.findOne(a0,this._indicatorsElement);R.classList.remove(ed),R.removeAttribute("aria-current");const q=ee.findOne(`[data-bs-slide-to="${_}"]`,this._indicatorsElement);q&&(q.classList.add(ed),q.setAttribute("aria-current","true"))}_updateInterval(){const _=this._activeElement||this._getActive();if(!_)return;const R=Number.parseInt(_.getAttribute("data-bs-interval"),10);this._config.interval=R||this._config.defaultInterval}_slide(_,R=null){if(this._isSliding)return;const q=this._getActive(),ye=_===Ql,Pe=R||te(this._getItems(),q,ye,this._config.wrap);if(Pe===q)return;const Me=this._getItemIndex(Pe),rt=cd=>z.trigger(this._element,cd,{relatedTarget:Pe,direction:this._orderToDirection(_),from:this._getItemIndex(q),to:Me});if(rt(dA).defaultPrevented||!q||!Pe)return;const Oi=!!this._interval;this.pause(),this._isSliding=!0,this._setActiveIndicatorElement(Me),this._activeElement=Pe;const Cn=ye?bA:vA,ms=ye?wA:xA;Pe.classList.add(ms),w(Pe),q.classList.add(Cn),Pe.classList.add(Cn);const Ji=()=>{Pe.classList.remove(Cn,ms),Pe.classList.add(ed),q.classList.remove(ed,ms,Cn),this._isSliding=!1,rt(sg)};this._queueCallback(Ji,q,this._isAnimated()),Oi&&this.cycle()}_isAnimated(){return this._element.classList.contains(yA)}_getActive(){return ee.findOne(EA,this._element)}_getItems(){return ee.find(l0,this._element)}_clearInterval(){this._interval&&(clearInterval(this._interval),this._interval=null)}_directionToOrder(_){return A()?_===Ea?xa:Ql:_===Ea?Ql:xa}_orderToDirection(_){return A()?_===xa?Ea:Qu:_===xa?Qu:Ea}static jQueryInterface(_){return this.each(function(){const R=Sa.getOrCreateInstance(this,_);if(typeof _=="number"){R.to(_);return}if(typeof _=="string"){if(R[_]===void 0||_.startsWith("_")||_==="constructor")throw new TypeError(`No method named "${_}"`);R[_]()}})}}z.on(document,_A,TA,function(G){const _=ee.getElementFromSelector(this);if(!_||!_.classList.contains(o0))return;G.preventDefault();const R=Sa.getOrCreateInstance(_),q=this.getAttribute("data-bs-slide-to");if(q){R.to(q),R._maybeEnableCycle();return}if(K.getDataAttribute(this,"slide")==="next"){R.next(),R._maybeEnableCycle();return}R.prev(),R._maybeEnableCycle()}),z.on(window,mA,()=>{const G=ee.find(kA);for(const _ of G)Sa.getOrCreateInstance(_)}),P(Sa);const PA="collapse",ec=".bs.collapse",RA=".data-api",DA=`show${ec}`,$A=`shown${ec}`,LA=`hide${ec}`,OA=`hidden${ec}`,NA=`click${ec}${RA}`,rg="show",Ca="collapse",td="collapsing",FA="collapsed",BA=`:scope .${Ca} .${Ca}`,VA="collapse-horizontal",zA="width",WA="height",HA=".collapse.show, .collapse.collapsing",og='[data-bs-toggle="collapse"]',YA={parent:null,toggle:!0},jA={parent:"(null|element)",toggle:"boolean"};class Ta extends j{constructor(_,R){super(_,R),this._isTransitioning=!1,this._triggerArray=[];const q=ee.find(og);for(const ye of q){const Pe=ee.getSelectorFromElement(ye),Me=ee.find(Pe).filter(rt=>rt===this._element);Pe!==null&&Me.length&&this._triggerArray.push(ye)}this._initializeChildren(),this._config.parent||this._addAriaAndCollapsedClass(this._triggerArray,this._isShown()),this._config.toggle&&this.toggle()}static get Default(){return YA}static get DefaultType(){return jA}static get NAME(){return PA}toggle(){this._isShown()?this.hide():this.show()}show(){if(this._isTransitioning||this._isShown())return;let _=[];if(this._config.parent&&(_=this._getFirstLevelChildren(HA).filter(rt=>rt!==this._element).map(rt=>Ta.getOrCreateInstance(rt,{toggle:!1}))),_.length&&_[0]._isTransitioning||z.trigger(this._element,DA).defaultPrevented)return;for(const rt of _)rt.hide();const q=this._getDimension();this._element.classList.remove(Ca),this._element.classList.add(td),this._element.style[q]=0,this._addAriaAndCollapsedClass(this._triggerArray,!0),this._isTransitioning=!0;const ye=()=>{this._isTransitioning=!1,this._element.classList.remove(td),this._element.classList.add(Ca,rg),this._element.style[q]="",z.trigger(this._element,$A)},Me=`scroll${q[0].toUpperCase()+q.slice(1)}`;this._queueCallback(ye,this._element,!0),this._element.style[q]=`${this._element[Me]}px`}hide(){if(this._isTransitioning||!this._isShown()||z.trigger(this._element,LA).defaultPrevented)return;const R=this._getDimension();this._element.style[R]=`${this._element.getBoundingClientRect()[R]}px`,w(this._element),this._element.classList.add(td),this._element.classList.remove(Ca,rg);for(const ye of this._triggerArray){const Pe=ee.getElementFromSelector(ye);Pe&&!this._isShown(Pe)&&this._addAriaAndCollapsedClass([ye],!1)}this._isTransitioning=!0;const q=()=>{this._isTransitioning=!1,this._element.classList.remove(td),this._element.classList.add(Ca),z.trigger(this._element,OA)};this._element.style[R]="",this._queueCallback(q,this._element,!0)}_isShown(_=this._element){return _.classList.contains(rg)}_configAfterMerge(_){return _.toggle=!!_.toggle,_.parent=y(_.parent),_}_getDimension(){return this._element.classList.contains(VA)?zA:WA}_initializeChildren(){if(!this._config.parent)return;const _=this._getFirstLevelChildren(og);for(const R of _){const q=ee.getElementFromSelector(R);q&&this._addAriaAndCollapsedClass([R],this._isShown(q))}}_getFirstLevelChildren(_){const R=ee.find(BA,this._config.parent);return ee.find(_,this._config.parent).filter(q=>!R.includes(q))}_addAriaAndCollapsedClass(_,R){if(_.length)for(const q of _)q.classList.toggle(FA,!R),q.setAttribute("aria-expanded",R)}static jQueryInterface(_){const R={};return typeof _=="string"&&/show|hide/.test(_)&&(R.toggle=!1),this.each(function(){const q=Ta.getOrCreateInstance(this,R);if(typeof _=="string"){if(typeof q[_]>"u")throw new TypeError(`No method named "${_}"`);q[_]()}})}}z.on(document,NA,og,function(G){(G.target.tagName==="A"||G.delegateTarget&&G.delegateTarget.tagName==="A")&&G.preventDefault();for(const _ of ee.getMultipleElementsFromSelector(this))Ta.getOrCreateInstance(_,{toggle:!1}).toggle()}),P(Ta);const c0="dropdown",Eo=".bs.dropdown",ag=".data-api",KA="Escape",u0="Tab",UA="ArrowUp",d0="ArrowDown",GA=2,XA=`hide${Eo}`,qA=`hidden${Eo}`,ZA=`show${Eo}`,JA=`shown${Eo}`,h0=`click${Eo}${ag}`,f0=`keydown${Eo}${ag}`,QA=`keyup${Eo}${ag}`,ka="show",eM="dropup",tM="dropend",nM="dropstart",iM="dropup-center",sM="dropdown-center",So='[data-bs-toggle="dropdown"]:not(.disabled):not(:disabled)',rM=`${So}.${ka}`,nd=".dropdown-menu",oM=".navbar",aM=".navbar-nav",lM=".dropdown-menu .dropdown-item:not(.disabled):not(:disabled)",cM=A()?"top-end":"top-start",uM=A()?"top-start":"top-end",dM=A()?"bottom-end":"bottom-start",hM=A()?"bottom-start":"bottom-end",fM=A()?"left-start":"right-start",gM=A()?"right-start":"left-start",pM="top",mM="bottom",_M={autoClose:!0,boundary:"clippingParents",display:"dynamic",offset:[0,2],popperConfig:null,reference:"toggle"},yM={autoClose:"(boolean|string)",boundary:"(string|element)",display:"string",offset:"(array|string|function)",popperConfig:"(null|object|function)",reference:"(string|element|object)"};class Zi extends j{constructor(_,R){super(_,R),this._popper=null,this._parent=this._element.parentNode,this._menu=ee.next(this._element,nd)[0]||ee.prev(this._element,nd)[0]||ee.findOne(nd,this._parent),this._inNavbar=this._detectNavbar()}static get Default(){return _M}static get DefaultType(){return yM}static get NAME(){return c0}toggle(){return this._isShown()?this.hide():this.show()}show(){if(b(this._element)||this._isShown())return;const _={relatedTarget:this._element};if(!z.trigger(this._element,ZA,_).defaultPrevented){if(this._createPopper(),"ontouchstart"in document.documentElement&&!this._parent.closest(aM))for(const q of[].concat(...document.body.children))z.on(q,"mouseover",C);this._element.focus(),this._element.setAttribute("aria-expanded",!0),this._menu.classList.add(ka),this._element.classList.add(ka),z.trigger(this._element,JA,_)}}hide(){if(b(this._element)||!this._isShown())return;const _={relatedTarget:this._element};this._completeHide(_)}dispose(){this._popper&&this._popper.destroy(),super.dispose()}update(){this._inNavbar=this._detectNavbar(),this._popper&&this._popper.update()}_completeHide(_){if(!z.trigger(this._element,XA,_).defaultPrevented){if("ontouchstart"in document.documentElement)for(const q of[].concat(...document.body.children))z.off(q,"mouseover",C);this._popper&&this._popper.destroy(),this._menu.classList.remove(ka),this._element.classList.remove(ka),this._element.setAttribute("aria-expanded","false"),K.removeDataAttribute(this._menu,"popper"),z.trigger(this._element,qA,_)}}_getConfig(_){if(_=super._getConfig(_),typeof _.reference=="object"&&!m(_.reference)&&typeof _.reference.getBoundingClientRect!="function")throw new TypeError(`${c0.toUpperCase()}: Option "reference" provided type "object" without a required "getBoundingClientRect" method.`);return _}_createPopper(){if(typeof s>"u")throw new TypeError("Bootstrap's dropdowns require Popper (https://popper.js.org)");let _=this._element;this._config.reference==="parent"?_=this._parent:m(this._config.reference)?_=y(this._config.reference):typeof this._config.reference=="object"&&(_=this._config.reference);const R=this._getPopperConfig();this._popper=s.createPopper(_,this._menu,R)}_isShown(){return this._menu.classList.contains(ka)}_getPlacement(){const _=this._parent;if(_.classList.contains(tM))return fM;if(_.classList.contains(nM))return gM;if(_.classList.contains(iM))return pM;if(_.classList.contains(sM))return mM;const R=getComputedStyle(this._menu).getPropertyValue("--bs-position").trim()==="end";return _.classList.contains(eM)?R?uM:cM:R?hM:dM}_detectNavbar(){return this._element.closest(oM)!==null}_getOffset(){const{offset:_}=this._config;return typeof _=="string"?_.split(",").map(R=>Number.parseInt(R,10)):typeof _=="function"?R=>_(R,this._element):_}_getPopperConfig(){const _={placement:this._getPlacement(),modifiers:[{name:"preventOverflow",options:{boundary:this._config.boundary}},{name:"offset",options:{offset:this._getOffset()}}]};return(this._inNavbar||this._config.display==="static")&&(K.setDataAttribute(this._menu,"popper","static"),_.modifiers=[{name:"applyStyles",enabled:!1}]),{..._,...F(this._config.popperConfig,[_])}}_selectMenuItem({key:_,target:R}){const q=ee.find(lM,this._menu).filter(ye=>v(ye));q.length&&te(q,R,_===d0,!q.includes(R)).focus()}static jQueryInterface(_){return this.each(function(){const R=Zi.getOrCreateInstance(this,_);if(typeof _=="string"){if(typeof R[_]>"u")throw new TypeError(`No method named "${_}"`);R[_]()}})}static clearMenus(_){if(_.button===GA||_.type==="keyup"&&_.key!==u0)return;const R=ee.find(rM);for(const q of R){const ye=Zi.getInstance(q);if(!ye||ye._config.autoClose===!1)continue;const Pe=_.composedPath(),Me=Pe.includes(ye._menu);if(Pe.includes(ye._element)||ye._config.autoClose==="inside"&&!Me||ye._config.autoClose==="outside"&&Me||ye._menu.contains(_.target)&&(_.type==="keyup"&&_.key===u0||/input|select|option|textarea|form/i.test(_.target.tagName)))continue;const rt={relatedTarget:ye._element};_.type==="click"&&(rt.clickEvent=_),ye._completeHide(rt)}}static dataApiKeydownHandler(_){const R=/input|textarea/i.test(_.target.tagName),q=_.key===KA,ye=[UA,d0].includes(_.key);if(!ye&&!q||R&&!q)return;_.preventDefault();const Pe=this.matches(So)?this:ee.prev(this,So)[0]||ee.next(this,So)[0]||ee.findOne(So,_.delegateTarget.parentNode),Me=Zi.getOrCreateInstance(Pe);if(ye){_.stopPropagation(),Me.show(),Me._selectMenuItem(_);return}Me._isShown()&&(_.stopPropagation(),Me.hide(),Pe.focus())}}z.on(document,f0,So,Zi.dataApiKeydownHandler),z.on(document,f0,nd,Zi.dataApiKeydownHandler),z.on(document,h0,Zi.clearMenus),z.on(document,QA,Zi.clearMenus),z.on(document,h0,So,function(G){G.preventDefault(),Zi.getOrCreateInstance(this).toggle()}),P(Zi);const g0="backdrop",vM="fade",p0="show",m0=`mousedown.bs.${g0}`,bM={className:"modal-backdrop",clickCallback:null,isAnimated:!1,isVisible:!0,rootElement:"body"},wM={className:"string",clickCallback:"(function|null)",isAnimated:"boolean",isVisible:"boolean",rootElement:"(element|string)"};class _0 extends U{constructor(_){super(),this._config=this._getConfig(_),this._isAppended=!1,this._element=null}static get Default(){return bM}static get DefaultType(){return wM}static get NAME(){return g0}show(_){if(!this._config.isVisible){F(_);return}this._append();const R=this._getElement();this._config.isAnimated&&w(R),R.classList.add(p0),this._emulateAnimation(()=>{F(_)})}hide(_){if(!this._config.isVisible){F(_);return}this._getElement().classList.remove(p0),this._emulateAnimation(()=>{this.dispose(),F(_)})}dispose(){this._isAppended&&(z.off(this._element,m0),this._element.remove(),this._isAppended=!1)}_getElement(){if(!this._element){const _=document.createElement("div");_.className=this._config.className,this._config.isAnimated&&_.classList.add(vM),this._element=_}return this._element}_configAfterMerge(_){return _.rootElement=y(_.rootElement),_}_append(){if(this._isAppended)return;const _=this._getElement();this._config.rootElement.append(_),z.on(_,m0,()=>{F(this._config.clickCallback)}),this._isAppended=!0}_emulateAnimation(_){H(_,this._getElement(),this._config.isAnimated)}}const xM="focustrap",id=".bs.focustrap",EM=`focusin${id}`,SM=`keydown.tab${id}`,CM="Tab",TM="forward",y0="backward",kM={autofocus:!0,trapElement:null},AM={autofocus:"boolean",trapElement:"element"};class v0 extends U{constructor(_){super(),this._config=this._getConfig(_),this._isActive=!1,this._lastTabNavDirection=null}static get Default(){return kM}static get DefaultType(){return AM}static get NAME(){return xM}activate(){this._isActive||(this._config.autofocus&&this._config.trapElement.focus(),z.off(document,id),z.on(document,EM,_=>this._handleFocusin(_)),z.on(document,SM,_=>this._handleKeydown(_)),this._isActive=!0)}deactivate(){this._isActive&&(this._isActive=!1,z.off(document,id))}_handleFocusin(_){const{trapElement:R}=this._config;if(_.target===document||_.target===R||R.contains(_.target))return;const q=ee.focusableChildren(R);q.length===0?R.focus():this._lastTabNavDirection===y0?q[q.length-1].focus():q[0].focus()}_handleKeydown(_){_.key===CM&&(this._lastTabNavDirection=_.shiftKey?y0:TM)}}const b0=".fixed-top, .fixed-bottom, .is-fixed, .sticky-top",w0=".sticky-top",sd="padding-right",x0="margin-right";class lg{constructor(){this._element=document.body}getWidth(){const _=document.documentElement.clientWidth;return Math.abs(window.innerWidth-_)}hide(){const _=this.getWidth();this._disableOverFlow(),this._setElementAttributes(this._element,sd,R=>R+_),this._setElementAttributes(b0,sd,R=>R+_),this._setElementAttributes(w0,x0,R=>R-_)}reset(){this._resetElementAttributes(this._element,"overflow"),this._resetElementAttributes(this._element,sd),this._resetElementAttributes(b0,sd),this._resetElementAttributes(w0,x0)}isOverflowing(){return this.getWidth()>0}_disableOverFlow(){this._saveInitialAttribute(this._element,"overflow"),this._element.style.overflow="hidden"}_setElementAttributes(_,R,q){const ye=this.getWidth(),Pe=Me=>{if(Me!==this._element&&window.innerWidth>Me.clientWidth+ye)return;this._saveInitialAttribute(Me,R);const rt=window.getComputedStyle(Me).getPropertyValue(R);Me.style.setProperty(R,`${q(Number.parseFloat(rt))}px`)};this._applyManipulationCallback(_,Pe)}_saveInitialAttribute(_,R){const q=_.style.getPropertyValue(R);q&&K.setDataAttribute(_,R,q)}_resetElementAttributes(_,R){const q=ye=>{const Pe=K.getDataAttribute(ye,R);if(Pe===null){ye.style.removeProperty(R);return}K.removeDataAttribute(ye,R),ye.style.setProperty(R,Pe)};this._applyManipulationCallback(_,q)}_applyManipulationCallback(_,R){if(m(_)){R(_);return}for(const q of ee.find(_,this._element))R(q)}}const MM="modal",Li=".bs.modal",IM=".data-api",PM="Escape",RM=`hide${Li}`,DM=`hidePrevented${Li}`,E0=`hidden${Li}`,S0=`show${Li}`,$M=`shown${Li}`,LM=`resize${Li}`,OM=`click.dismiss${Li}`,NM=`mousedown.dismiss${Li}`,FM=`keydown.dismiss${Li}`,BM=`click${Li}${IM}`,C0="modal-open",VM="fade",T0="show",cg="modal-static",zM=".modal.show",WM=".modal-dialog",HM=".modal-body",YM='[data-bs-toggle="modal"]',jM={backdrop:!0,focus:!0,keyboard:!0},KM={backdrop:"(boolean|string)",focus:"boolean",keyboard:"boolean"};class Co extends j{constructor(_,R){super(_,R),this._dialog=ee.findOne(WM,this._element),this._backdrop=this._initializeBackDrop(),this._focustrap=this._initializeFocusTrap(),this._isShown=!1,this._isTransitioning=!1,this._scrollBar=new lg,this._addEventListeners()}static get Default(){return jM}static get DefaultType(){return KM}static get NAME(){return MM}toggle(_){return this._isShown?this.hide():this.show(_)}show(_){this._isShown||this._isTransitioning||z.trigger(this._element,S0,{relatedTarget:_}).defaultPrevented||(this._isShown=!0,this._isTransitioning=!0,this._scrollBar.hide(),document.body.classList.add(C0),this._adjustDialog(),this._backdrop.show(()=>this._showElement(_)))}hide(){!this._isShown||this._isTransitioning||z.trigger(this._element,RM).defaultPrevented||(this._isShown=!1,this._isTransitioning=!0,this._focustrap.deactivate(),this._element.classList.remove(T0),this._queueCallback(()=>this._hideModal(),this._element,this._isAnimated()))}dispose(){z.off(window,Li),z.off(this._dialog,Li),this._backdrop.dispose(),this._focustrap.deactivate(),super.dispose()}handleUpdate(){this._adjustDialog()}_initializeBackDrop(){return new _0({isVisible:!!this._config.backdrop,isAnimated:this._isAnimated()})}_initializeFocusTrap(){return new v0({trapElement:this._element})}_showElement(_){document.body.contains(this._element)||document.body.append(this._element),this._element.style.display="block",this._element.removeAttribute("aria-hidden"),this._element.setAttribute("aria-modal",!0),this._element.setAttribute("role","dialog"),this._element.scrollTop=0;const R=ee.findOne(HM,this._dialog);R&&(R.scrollTop=0),w(this._element),this._element.classList.add(T0);const q=()=>{this._config.focus&&this._focustrap.activate(),this._isTransitioning=!1,z.trigger(this._element,$M,{relatedTarget:_})};this._queueCallback(q,this._dialog,this._isAnimated())}_addEventListeners(){z.on(this._element,FM,_=>{if(_.key===PM){if(this._config.keyboard){this.hide();return}this._triggerBackdropTransition()}}),z.on(window,LM,()=>{this._isShown&&!this._isTransitioning&&this._adjustDialog()}),z.on(this._element,NM,_=>{z.one(this._element,OM,R=>{if(!(this._element!==_.target||this._element!==R.target)){if(this._config.backdrop==="static"){this._triggerBackdropTransition();return}this._config.backdrop&&this.hide()}})})}_hideModal(){this._element.style.display="none",this._element.setAttribute("aria-hidden",!0),this._element.removeAttribute("aria-modal"),this._element.removeAttribute("role"),this._isTransitioning=!1,this._backdrop.hide(()=>{document.body.classList.remove(C0),this._resetAdjustments(),this._scrollBar.reset(),z.trigger(this._element,E0)})}_isAnimated(){return this._element.classList.contains(VM)}_triggerBackdropTransition(){if(z.trigger(this._element,DM).defaultPrevented)return;const R=this._element.scrollHeight>document.documentElement.clientHeight,q=this._element.style.overflowY;q==="hidden"||this._element.classList.contains(cg)||(R||(this._element.style.overflowY="hidden"),this._element.classList.add(cg),this._queueCallback(()=>{this._element.classList.remove(cg),this._queueCallback(()=>{this._element.style.overflowY=q},this._dialog)},this._dialog),this._element.focus())}_adjustDialog(){const _=this._element.scrollHeight>document.documentElement.clientHeight,R=this._scrollBar.getWidth(),q=R>0;if(q&&!_){const ye=A()?"paddingLeft":"paddingRight";this._element.style[ye]=`${R}px`}if(!q&&_){const ye=A()?"paddingRight":"paddingLeft";this._element.style[ye]=`${R}px`}}_resetAdjustments(){this._element.style.paddingLeft="",this._element.style.paddingRight=""}static jQueryInterface(_,R){return this.each(function(){const q=Co.getOrCreateInstance(this,_);if(typeof _=="string"){if(typeof q[_]>"u")throw new TypeError(`No method named "${_}"`);q[_](R)}})}}z.on(document,BM,YM,function(G){const _=ee.getElementFromSelector(this);["A","AREA"].includes(this.tagName)&&G.preventDefault(),z.one(_,S0,ye=>{ye.defaultPrevented||z.one(_,E0,()=>{v(this)&&this.focus()})});const R=ee.findOne(zM);R&&Co.getInstance(R).hide(),Co.getOrCreateInstance(_).toggle(this)}),fe(Co),P(Co);const UM="offcanvas",Ws=".bs.offcanvas",k0=".data-api",GM=`load${Ws}${k0}`,XM="Escape",A0="show",M0="showing",I0="hiding",qM="offcanvas-backdrop",P0=".offcanvas.show",ZM=`show${Ws}`,JM=`shown${Ws}`,QM=`hide${Ws}`,R0=`hidePrevented${Ws}`,D0=`hidden${Ws}`,eI=`resize${Ws}`,tI=`click${Ws}${k0}`,nI=`keydown.dismiss${Ws}`,iI='[data-bs-toggle="offcanvas"]',sI={backdrop:!0,keyboard:!0,scroll:!1},rI={backdrop:"(boolean|string)",keyboard:"boolean",scroll:"boolean"};class Hs extends j{constructor(_,R){super(_,R),this._isShown=!1,this._backdrop=this._initializeBackDrop(),this._focustrap=this._initializeFocusTrap(),this._addEventListeners()}static get Default(){return sI}static get DefaultType(){return rI}static get NAME(){return UM}toggle(_){return this._isShown?this.hide():this.show(_)}show(_){if(this._isShown||z.trigger(this._element,ZM,{relatedTarget:_}).defaultPrevented)return;this._isShown=!0,this._backdrop.show(),this._config.scroll||new lg().hide(),this._element.setAttribute("aria-modal",!0),this._element.setAttribute("role","dialog"),this._element.classList.add(M0);const q=()=>{(!this._config.scroll||this._config.backdrop)&&this._focustrap.activate(),this._element.classList.add(A0),this._element.classList.remove(M0),z.trigger(this._element,JM,{relatedTarget:_})};this._queueCallback(q,this._element,!0)}hide(){if(!this._isShown||z.trigger(this._element,QM).defaultPrevented)return;this._focustrap.deactivate(),this._element.blur(),this._isShown=!1,this._element.classList.add(I0),this._backdrop.hide();const R=()=>{this._element.classList.remove(A0,I0),this._element.removeAttribute("aria-modal"),this._element.removeAttribute("role"),this._config.scroll||new lg().reset(),z.trigger(this._element,D0)};this._queueCallback(R,this._element,!0)}dispose(){this._backdrop.dispose(),this._focustrap.deactivate(),super.dispose()}_initializeBackDrop(){const _=()=>{if(this._config.backdrop==="static"){z.trigger(this._element,R0);return}this.hide()},R=!!this._config.backdrop;return new _0({className:qM,isVisible:R,isAnimated:!0,rootElement:this._element.parentNode,clickCallback:R?_:null})}_initializeFocusTrap(){return new v0({trapElement:this._element})}_addEventListeners(){z.on(this._element,nI,_=>{if(_.key===XM){if(this._config.keyboard){this.hide();return}z.trigger(this._element,R0)}})}static jQueryInterface(_){return this.each(function(){const R=Hs.getOrCreateInstance(this,_);if(typeof _=="string"){if(R[_]===void 0||_.startsWith("_")||_==="constructor")throw new TypeError(`No method named "${_}"`);R[_](this)}})}}z.on(document,tI,iI,function(G){const _=ee.getElementFromSelector(this);if(["A","AREA"].includes(this.tagName)&&G.preventDefault(),b(this))return;z.one(_,D0,()=>{v(this)&&this.focus()});const R=ee.findOne(P0);R&&R!==_&&Hs.getInstance(R).hide(),Hs.getOrCreateInstance(_).toggle(this)}),z.on(window,GM,()=>{for(const G of ee.find(P0))Hs.getOrCreateInstance(G).show()}),z.on(window,eI,()=>{for(const G of ee.find("[aria-modal][class*=show][class*=offcanvas-]"))getComputedStyle(G).position!=="fixed"&&Hs.getOrCreateInstance(G).hide()}),fe(Hs),P(Hs);const $0={"*":["class","dir","id","lang","role",/^aria-[\w-]*$/i],a:["target","href","title","rel"],area:[],b:[],br:[],col:[],code:[],div:[],em:[],hr:[],h1:[],h2:[],h3:[],h4:[],h5:[],h6:[],i:[],img:["src","srcset","alt","title","width","height"],li:[],ol:[],p:[],pre:[],s:[],small:[],span:[],sub:[],sup:[],strong:[],u:[],ul:[]},oI=new Set(["background","cite","href","itemtype","longdesc","poster","src","xlink:href"]),aI=/^(?!javascript:)(?:[a-z0-9+.-]+:|[^&:/?#]*(?:[/?#]|$))/i,lI=(G,_)=>{const R=G.nodeName.toLowerCase();return _.includes(R)?oI.has(R)?!!aI.test(G.nodeValue):!0:_.filter(q=>q instanceof RegExp).some(q=>q.test(R))};function cI(G,_,R){if(!G.length)return G;if(R&&typeof R=="function")return R(G);const ye=new window.DOMParser().parseFromString(G,"text/html"),Pe=[].concat(...ye.body.querySelectorAll("*"));for(const Me of Pe){const rt=Me.nodeName.toLowerCase();if(!Object.keys(_).includes(rt)){Me.remove();continue}const oi=[].concat(...Me.attributes),Oi=[].concat(_["*"]||[],_[rt]||[]);for(const Cn of oi)lI(Cn,Oi)||Me.removeAttribute(Cn.nodeName)}return ye.body.innerHTML}const uI="TemplateFactory",dI={allowList:$0,content:{},extraClass:"",html:!1,sanitize:!0,sanitizeFn:null,template:"
"},hI={allowList:"object",content:"object",extraClass:"(string|function)",html:"boolean",sanitize:"boolean",sanitizeFn:"(null|function)",template:"string"},fI={entry:"(string|element|function|null)",selector:"(string|element)"};class gI extends U{constructor(_){super(),this._config=this._getConfig(_)}static get Default(){return dI}static get DefaultType(){return hI}static get NAME(){return uI}getContent(){return Object.values(this._config.content).map(_=>this._resolvePossibleFunction(_)).filter(Boolean)}hasContent(){return this.getContent().length>0}changeContent(_){return this._checkContent(_),this._config.content={...this._config.content,..._},this}toHtml(){const _=document.createElement("div");_.innerHTML=this._maybeSanitize(this._config.template);for(const[ye,Pe]of Object.entries(this._config.content))this._setContent(_,Pe,ye);const R=_.children[0],q=this._resolvePossibleFunction(this._config.extraClass);return q&&R.classList.add(...q.split(" ")),R}_typeCheckConfig(_){super._typeCheckConfig(_),this._checkContent(_.content)}_checkContent(_){for(const[R,q]of Object.entries(_))super._typeCheckConfig({selector:R,entry:q},fI)}_setContent(_,R,q){const ye=ee.findOne(q,_);if(ye){if(R=this._resolvePossibleFunction(R),!R){ye.remove();return}if(m(R)){this._putElementInTemplate(y(R),ye);return}if(this._config.html){ye.innerHTML=this._maybeSanitize(R);return}ye.textContent=R}}_maybeSanitize(_){return this._config.sanitize?cI(_,this._config.allowList,this._config.sanitizeFn):_}_resolvePossibleFunction(_){return F(_,[this])}_putElementInTemplate(_,R){if(this._config.html){R.innerHTML="",R.append(_);return}R.textContent=_.textContent}}const pI="tooltip",mI=new Set(["sanitize","allowList","sanitizeFn"]),ug="fade",_I="modal",rd="show",yI=".tooltip-inner",L0=`.${_I}`,O0="hide.bs.modal",tc="hover",dg="focus",vI="click",bI="manual",wI="hide",xI="hidden",EI="show",SI="shown",CI="inserted",TI="click",kI="focusin",AI="focusout",MI="mouseenter",II="mouseleave",PI={AUTO:"auto",TOP:"top",RIGHT:A()?"left":"right",BOTTOM:"bottom",LEFT:A()?"right":"left"},RI={allowList:$0,animation:!0,boundary:"clippingParents",container:!1,customClass:"",delay:0,fallbackPlacements:["top","right","bottom","left"],html:!1,offset:[0,6],placement:"top",popperConfig:null,sanitize:!0,sanitizeFn:null,selector:!1,template:'',title:"",trigger:"hover focus"},DI={allowList:"object",animation:"boolean",boundary:"(string|element)",container:"(string|element|boolean)",customClass:"(string|function)",delay:"(number|object)",fallbackPlacements:"array",html:"boolean",offset:"(array|string|function)",placement:"(string|function)",popperConfig:"(null|object|function)",sanitize:"boolean",sanitizeFn:"(null|function)",selector:"(string|boolean)",template:"string",title:"(string|element|function)",trigger:"string"};class To extends j{constructor(_,R){if(typeof s>"u")throw new TypeError("Bootstrap's tooltips require Popper (https://popper.js.org)");super(_,R),this._isEnabled=!0,this._timeout=0,this._isHovered=null,this._activeTrigger={},this._popper=null,this._templateFactory=null,this._newContent=null,this.tip=null,this._setListeners(),this._config.selector||this._fixTitle()}static get Default(){return RI}static get DefaultType(){return DI}static get NAME(){return pI}enable(){this._isEnabled=!0}disable(){this._isEnabled=!1}toggleEnabled(){this._isEnabled=!this._isEnabled}toggle(){if(this._isEnabled){if(this._activeTrigger.click=!this._activeTrigger.click,this._isShown()){this._leave();return}this._enter()}}dispose(){clearTimeout(this._timeout),z.off(this._element.closest(L0),O0,this._hideModalHandler),this._element.getAttribute("data-bs-original-title")&&this._element.setAttribute("title",this._element.getAttribute("data-bs-original-title")),this._disposePopper(),super.dispose()}show(){if(this._element.style.display==="none")throw new Error("Please use show on visible elements");if(!(this._isWithContent()&&this._isEnabled))return;const _=z.trigger(this._element,this.constructor.eventName(EI)),q=(E(this._element)||this._element.ownerDocument.documentElement).contains(this._element);if(_.defaultPrevented||!q)return;this._disposePopper();const ye=this._getTipElement();this._element.setAttribute("aria-describedby",ye.getAttribute("id"));const{container:Pe}=this._config;if(this._element.ownerDocument.documentElement.contains(this.tip)||(Pe.append(ye),z.trigger(this._element,this.constructor.eventName(CI))),this._popper=this._createPopper(ye),ye.classList.add(rd),"ontouchstart"in document.documentElement)for(const rt of[].concat(...document.body.children))z.on(rt,"mouseover",C);const Me=()=>{z.trigger(this._element,this.constructor.eventName(SI)),this._isHovered===!1&&this._leave(),this._isHovered=!1};this._queueCallback(Me,this.tip,this._isAnimated())}hide(){if(!this._isShown()||z.trigger(this._element,this.constructor.eventName(wI)).defaultPrevented)return;if(this._getTipElement().classList.remove(rd),"ontouchstart"in document.documentElement)for(const ye of[].concat(...document.body.children))z.off(ye,"mouseover",C);this._activeTrigger[vI]=!1,this._activeTrigger[dg]=!1,this._activeTrigger[tc]=!1,this._isHovered=null;const q=()=>{this._isWithActiveTrigger()||(this._isHovered||this._disposePopper(),this._element.removeAttribute("aria-describedby"),z.trigger(this._element,this.constructor.eventName(xI)))};this._queueCallback(q,this.tip,this._isAnimated())}update(){this._popper&&this._popper.update()}_isWithContent(){return!!this._getTitle()}_getTipElement(){return this.tip||(this.tip=this._createTipElement(this._newContent||this._getContentForTemplate())),this.tip}_createTipElement(_){const R=this._getTemplateFactory(_).toHtml();if(!R)return null;R.classList.remove(ug,rd),R.classList.add(`bs-${this.constructor.NAME}-auto`);const q=h(this.constructor.NAME).toString();return R.setAttribute("id",q),this._isAnimated()&&R.classList.add(ug),R}setContent(_){this._newContent=_,this._isShown()&&(this._disposePopper(),this.show())}_getTemplateFactory(_){return this._templateFactory?this._templateFactory.changeContent(_):this._templateFactory=new gI({...this._config,content:_,extraClass:this._resolvePossibleFunction(this._config.customClass)}),this._templateFactory}_getContentForTemplate(){return{[yI]:this._getTitle()}}_getTitle(){return this._resolvePossibleFunction(this._config.title)||this._element.getAttribute("data-bs-original-title")}_initializeOnDelegatedTarget(_){return this.constructor.getOrCreateInstance(_.delegateTarget,this._getDelegateConfig())}_isAnimated(){return this._config.animation||this.tip&&this.tip.classList.contains(ug)}_isShown(){return this.tip&&this.tip.classList.contains(rd)}_createPopper(_){const R=F(this._config.placement,[this,_,this._element]),q=PI[R.toUpperCase()];return s.createPopper(this._element,_,this._getPopperConfig(q))}_getOffset(){const{offset:_}=this._config;return typeof _=="string"?_.split(",").map(R=>Number.parseInt(R,10)):typeof _=="function"?R=>_(R,this._element):_}_resolvePossibleFunction(_){return F(_,[this._element])}_getPopperConfig(_){const R={placement:_,modifiers:[{name:"flip",options:{fallbackPlacements:this._config.fallbackPlacements}},{name:"offset",options:{offset:this._getOffset()}},{name:"preventOverflow",options:{boundary:this._config.boundary}},{name:"arrow",options:{element:`.${this.constructor.NAME}-arrow`}},{name:"preSetPlacement",enabled:!0,phase:"beforeMain",fn:q=>{this._getTipElement().setAttribute("data-popper-placement",q.state.placement)}}]};return{...R,...F(this._config.popperConfig,[R])}}_setListeners(){const _=this._config.trigger.split(" ");for(const R of _)if(R==="click")z.on(this._element,this.constructor.eventName(TI),this._config.selector,q=>{this._initializeOnDelegatedTarget(q).toggle()});else if(R!==bI){const q=R===tc?this.constructor.eventName(MI):this.constructor.eventName(kI),ye=R===tc?this.constructor.eventName(II):this.constructor.eventName(AI);z.on(this._element,q,this._config.selector,Pe=>{const Me=this._initializeOnDelegatedTarget(Pe);Me._activeTrigger[Pe.type==="focusin"?dg:tc]=!0,Me._enter()}),z.on(this._element,ye,this._config.selector,Pe=>{const Me=this._initializeOnDelegatedTarget(Pe);Me._activeTrigger[Pe.type==="focusout"?dg:tc]=Me._element.contains(Pe.relatedTarget),Me._leave()})}this._hideModalHandler=()=>{this._element&&this.hide()},z.on(this._element.closest(L0),O0,this._hideModalHandler)}_fixTitle(){const _=this._element.getAttribute("title");_&&(!this._element.getAttribute("aria-label")&&!this._element.textContent.trim()&&this._element.setAttribute("aria-label",_),this._element.setAttribute("data-bs-original-title",_),this._element.removeAttribute("title"))}_enter(){if(this._isShown()||this._isHovered){this._isHovered=!0;return}this._isHovered=!0,this._setTimeout(()=>{this._isHovered&&this.show()},this._config.delay.show)}_leave(){this._isWithActiveTrigger()||(this._isHovered=!1,this._setTimeout(()=>{this._isHovered||this.hide()},this._config.delay.hide))}_setTimeout(_,R){clearTimeout(this._timeout),this._timeout=setTimeout(_,R)}_isWithActiveTrigger(){return Object.values(this._activeTrigger).includes(!0)}_getConfig(_){const R=K.getDataAttributes(this._element);for(const q of Object.keys(R))mI.has(q)&&delete R[q];return _={...R,...typeof _=="object"&&_?_:{}},_=this._mergeConfigObj(_),_=this._configAfterMerge(_),this._typeCheckConfig(_),_}_configAfterMerge(_){return _.container=_.container===!1?document.body:y(_.container),typeof _.delay=="number"&&(_.delay={show:_.delay,hide:_.delay}),typeof _.title=="number"&&(_.title=_.title.toString()),typeof _.content=="number"&&(_.content=_.content.toString()),_}_getDelegateConfig(){const _={};for(const[R,q]of Object.entries(this._config))this.constructor.Default[R]!==q&&(_[R]=q);return _.selector=!1,_.trigger="manual",_}_disposePopper(){this._popper&&(this._popper.destroy(),this._popper=null),this.tip&&(this.tip.remove(),this.tip=null)}static jQueryInterface(_){return this.each(function(){const R=To.getOrCreateInstance(this,_);if(typeof _=="string"){if(typeof R[_]>"u")throw new TypeError(`No method named "${_}"`);R[_]()}})}}P(To);const $I="popover",LI=".popover-header",OI=".popover-body",NI={...To.Default,content:"",offset:[0,8],placement:"right",template:'',trigger:"click"},FI={...To.DefaultType,content:"(null|string|element|function)"};class od extends To{static get Default(){return NI}static get DefaultType(){return FI}static get NAME(){return $I}_isWithContent(){return this._getTitle()||this._getContent()}_getContentForTemplate(){return{[LI]:this._getTitle(),[OI]:this._getContent()}}_getContent(){return this._resolvePossibleFunction(this._config.content)}static jQueryInterface(_){return this.each(function(){const R=od.getOrCreateInstance(this,_);if(typeof _=="string"){if(typeof R[_]>"u")throw new TypeError(`No method named "${_}"`);R[_]()}})}}P(od);const BI="scrollspy",hg=".bs.scrollspy",VI=".data-api",zI=`activate${hg}`,N0=`click${hg}`,WI=`load${hg}${VI}`,HI="dropdown-item",Aa="active",YI='[data-bs-spy="scroll"]',fg="[href]",jI=".nav, .list-group",F0=".nav-link",KI=`${F0}, .nav-item > ${F0}, .list-group-item`,UI=".dropdown",GI=".dropdown-toggle",XI={offset:null,rootMargin:"0px 0px -25%",smoothScroll:!1,target:null,threshold:[.1,.5,1]},qI={offset:"(number|null)",rootMargin:"string",smoothScroll:"boolean",target:"element",threshold:"array"};class nc extends j{constructor(_,R){super(_,R),this._targetLinks=new Map,this._observableSections=new Map,this._rootElement=getComputedStyle(this._element).overflowY==="visible"?null:this._element,this._activeTarget=null,this._observer=null,this._previousScrollData={visibleEntryTop:0,parentScrollTop:0},this.refresh()}static get Default(){return XI}static get DefaultType(){return qI}static get NAME(){return BI}refresh(){this._initializeTargetsAndObservables(),this._maybeEnableSmoothScroll(),this._observer?this._observer.disconnect():this._observer=this._getNewObserver();for(const _ of this._observableSections.values())this._observer.observe(_)}dispose(){this._observer.disconnect(),super.dispose()}_configAfterMerge(_){return _.target=y(_.target)||document.body,_.rootMargin=_.offset?`${_.offset}px 0px -30%`:_.rootMargin,typeof _.threshold=="string"&&(_.threshold=_.threshold.split(",").map(R=>Number.parseFloat(R))),_}_maybeEnableSmoothScroll(){this._config.smoothScroll&&(z.off(this._config.target,N0),z.on(this._config.target,N0,fg,_=>{const R=this._observableSections.get(_.target.hash);if(R){_.preventDefault();const q=this._rootElement||window,ye=R.offsetTop-this._element.offsetTop;if(q.scrollTo){q.scrollTo({top:ye,behavior:"smooth"});return}q.scrollTop=ye}}))}_getNewObserver(){const _={root:this._rootElement,threshold:this._config.threshold,rootMargin:this._config.rootMargin};return new IntersectionObserver(R=>this._observerCallback(R),_)}_observerCallback(_){const R=Me=>this._targetLinks.get(`#${Me.target.id}`),q=Me=>{this._previousScrollData.visibleEntryTop=Me.target.offsetTop,this._process(R(Me))},ye=(this._rootElement||document.documentElement).scrollTop,Pe=ye>=this._previousScrollData.parentScrollTop;this._previousScrollData.parentScrollTop=ye;for(const Me of _){if(!Me.isIntersecting){this._activeTarget=null,this._clearActiveClass(R(Me));continue}const rt=Me.target.offsetTop>=this._previousScrollData.visibleEntryTop;if(Pe&&rt){if(q(Me),!ye)return;continue}!Pe&&!rt&&q(Me)}}_initializeTargetsAndObservables(){this._targetLinks=new Map,this._observableSections=new Map;const _=ee.find(fg,this._config.target);for(const R of _){if(!R.hash||b(R))continue;const q=ee.findOne(decodeURI(R.hash),this._element);v(q)&&(this._targetLinks.set(decodeURI(R.hash),R),this._observableSections.set(R.hash,q))}}_process(_){this._activeTarget!==_&&(this._clearActiveClass(this._config.target),this._activeTarget=_,_.classList.add(Aa),this._activateParents(_),z.trigger(this._element,zI,{relatedTarget:_}))}_activateParents(_){if(_.classList.contains(HI)){ee.findOne(GI,_.closest(UI)).classList.add(Aa);return}for(const R of ee.parents(_,jI))for(const q of ee.prev(R,KI))q.classList.add(Aa)}_clearActiveClass(_){_.classList.remove(Aa);const R=ee.find(`${fg}.${Aa}`,_);for(const q of R)q.classList.remove(Aa)}static jQueryInterface(_){return this.each(function(){const R=nc.getOrCreateInstance(this,_);if(typeof _=="string"){if(R[_]===void 0||_.startsWith("_")||_==="constructor")throw new TypeError(`No method named "${_}"`);R[_]()}})}}z.on(window,WI,()=>{for(const G of ee.find(YI))nc.getOrCreateInstance(G)}),P(nc);const ZI="tab",ko=".bs.tab",JI=`hide${ko}`,QI=`hidden${ko}`,eP=`show${ko}`,tP=`shown${ko}`,nP=`click${ko}`,iP=`keydown${ko}`,sP=`load${ko}`,rP="ArrowLeft",B0="ArrowRight",oP="ArrowUp",V0="ArrowDown",gg="Home",z0="End",Ao="active",W0="fade",pg="show",aP="dropdown",H0=".dropdown-toggle",lP=".dropdown-menu",mg=`:not(${H0})`,cP='.list-group, .nav, [role="tablist"]',uP=".nav-item, .list-group-item",dP=`.nav-link${mg}, .list-group-item${mg}, [role="tab"]${mg}`,Y0='[data-bs-toggle="tab"], [data-bs-toggle="pill"], [data-bs-toggle="list"]',_g=`${dP}, ${Y0}`,hP=`.${Ao}[data-bs-toggle="tab"], .${Ao}[data-bs-toggle="pill"], .${Ao}[data-bs-toggle="list"]`;class Mo extends j{constructor(_){super(_),this._parent=this._element.closest(cP),this._parent&&(this._setInitialAttributes(this._parent,this._getChildren()),z.on(this._element,iP,R=>this._keydown(R)))}static get NAME(){return ZI}show(){const _=this._element;if(this._elemIsActive(_))return;const R=this._getActiveElem(),q=R?z.trigger(R,JI,{relatedTarget:_}):null;z.trigger(_,eP,{relatedTarget:R}).defaultPrevented||q&&q.defaultPrevented||(this._deactivate(R,_),this._activate(_,R))}_activate(_,R){if(!_)return;_.classList.add(Ao),this._activate(ee.getElementFromSelector(_));const q=()=>{if(_.getAttribute("role")!=="tab"){_.classList.add(pg);return}_.removeAttribute("tabindex"),_.setAttribute("aria-selected",!0),this._toggleDropDown(_,!0),z.trigger(_,tP,{relatedTarget:R})};this._queueCallback(q,_,_.classList.contains(W0))}_deactivate(_,R){if(!_)return;_.classList.remove(Ao),_.blur(),this._deactivate(ee.getElementFromSelector(_));const q=()=>{if(_.getAttribute("role")!=="tab"){_.classList.remove(pg);return}_.setAttribute("aria-selected",!1),_.setAttribute("tabindex","-1"),this._toggleDropDown(_,!1),z.trigger(_,QI,{relatedTarget:R})};this._queueCallback(q,_,_.classList.contains(W0))}_keydown(_){if(![rP,B0,oP,V0,gg,z0].includes(_.key))return;_.stopPropagation(),_.preventDefault();const R=this._getChildren().filter(ye=>!b(ye));let q;if([gg,z0].includes(_.key))q=R[_.key===gg?0:R.length-1];else{const ye=[B0,V0].includes(_.key);q=te(R,_.target,ye,!0)}q&&(q.focus({preventScroll:!0}),Mo.getOrCreateInstance(q).show())}_getChildren(){return ee.find(_g,this._parent)}_getActiveElem(){return this._getChildren().find(_=>this._elemIsActive(_))||null}_setInitialAttributes(_,R){this._setAttributeIfNotExists(_,"role","tablist");for(const q of R)this._setInitialAttributesOnChild(q)}_setInitialAttributesOnChild(_){_=this._getInnerElement(_);const R=this._elemIsActive(_),q=this._getOuterElement(_);_.setAttribute("aria-selected",R),q!==_&&this._setAttributeIfNotExists(q,"role","presentation"),R||_.setAttribute("tabindex","-1"),this._setAttributeIfNotExists(_,"role","tab"),this._setInitialAttributesOnTargetPanel(_)}_setInitialAttributesOnTargetPanel(_){const R=ee.getElementFromSelector(_);R&&(this._setAttributeIfNotExists(R,"role","tabpanel"),_.id&&this._setAttributeIfNotExists(R,"aria-labelledby",`${_.id}`))}_toggleDropDown(_,R){const q=this._getOuterElement(_);if(!q.classList.contains(aP))return;const ye=(Pe,Me)=>{const rt=ee.findOne(Pe,q);rt&&rt.classList.toggle(Me,R)};ye(H0,Ao),ye(lP,pg),q.setAttribute("aria-expanded",R)}_setAttributeIfNotExists(_,R,q){_.hasAttribute(R)||_.setAttribute(R,q)}_elemIsActive(_){return _.classList.contains(Ao)}_getInnerElement(_){return _.matches(_g)?_:ee.findOne(_g,_)}_getOuterElement(_){return _.closest(uP)||_}static jQueryInterface(_){return this.each(function(){const R=Mo.getOrCreateInstance(this);if(typeof _=="string"){if(R[_]===void 0||_.startsWith("_")||_==="constructor")throw new TypeError(`No method named "${_}"`);R[_]()}})}}z.on(document,nP,Y0,function(G){["A","AREA"].includes(this.tagName)&&G.preventDefault(),!b(this)&&Mo.getOrCreateInstance(this).show()}),z.on(window,sP,()=>{for(const G of ee.find(hP))Mo.getOrCreateInstance(G)}),P(Mo);const fP="toast",xr=".bs.toast",gP=`mouseover${xr}`,pP=`mouseout${xr}`,mP=`focusin${xr}`,_P=`focusout${xr}`,yP=`hide${xr}`,vP=`hidden${xr}`,bP=`show${xr}`,wP=`shown${xr}`,xP="fade",j0="hide",ad="show",ld="showing",EP={animation:"boolean",autohide:"boolean",delay:"number"},SP={animation:!0,autohide:!0,delay:5e3};class ic extends j{constructor(_,R){super(_,R),this._timeout=null,this._hasMouseInteraction=!1,this._hasKeyboardInteraction=!1,this._setListeners()}static get Default(){return SP}static get DefaultType(){return EP}static get NAME(){return fP}show(){if(z.trigger(this._element,bP).defaultPrevented)return;this._clearTimeout(),this._config.animation&&this._element.classList.add(xP);const R=()=>{this._element.classList.remove(ld),z.trigger(this._element,wP),this._maybeScheduleHide()};this._element.classList.remove(j0),w(this._element),this._element.classList.add(ad,ld),this._queueCallback(R,this._element,this._config.animation)}hide(){if(!this.isShown()||z.trigger(this._element,yP).defaultPrevented)return;const R=()=>{this._element.classList.add(j0),this._element.classList.remove(ld,ad),z.trigger(this._element,vP)};this._element.classList.add(ld),this._queueCallback(R,this._element,this._config.animation)}dispose(){this._clearTimeout(),this.isShown()&&this._element.classList.remove(ad),super.dispose()}isShown(){return this._element.classList.contains(ad)}_maybeScheduleHide(){this._config.autohide&&(this._hasMouseInteraction||this._hasKeyboardInteraction||(this._timeout=setTimeout(()=>{this.hide()},this._config.delay)))}_onInteraction(_,R){switch(_.type){case"mouseover":case"mouseout":{this._hasMouseInteraction=R;break}case"focusin":case"focusout":{this._hasKeyboardInteraction=R;break}}if(R){this._clearTimeout();return}const q=_.relatedTarget;this._element===q||this._element.contains(q)||this._maybeScheduleHide()}_setListeners(){z.on(this._element,gP,_=>this._onInteraction(_,!0)),z.on(this._element,pP,_=>this._onInteraction(_,!1)),z.on(this._element,mP,_=>this._onInteraction(_,!0)),z.on(this._element,_P,_=>this._onInteraction(_,!1))}_clearTimeout(){clearTimeout(this._timeout),this._timeout=null}static jQueryInterface(_){return this.each(function(){const R=ic.getOrCreateInstance(this,_);if(typeof _=="string"){if(typeof R[_]>"u")throw new TypeError(`No method named "${_}"`);R[_](this)}})}}return fe(ic),P(ic),{Alert:Ze,Button:ae,Carousel:Sa,Collapse:Ta,Dropdown:Zi,Modal:Co,Offcanvas:Hs,Popover:od,ScrollSpy:nc,Tab:Mo,Toast:ic,Tooltip:To}})})(AP);/** * @vue/shared v3.4.29 * (c) 2018-present Yuxi (Evan) You and Vue contributors * @license MIT -**//*! #__NO_SIDE_EFFECTS__ */function $h(t,e){const n=new Set(t.split(","));return e?s=>n.has(s.toLowerCase()):s=>n.has(s)}const vt={},er=[],Yn=()=>{},JS=()=>!1,Tc=t=>t.charCodeAt(0)===111&&t.charCodeAt(1)===110&&(t.charCodeAt(2)>122||t.charCodeAt(2)<97),Ah=t=>t.startsWith("onUpdate:"),Ft=Object.assign,Ch=(t,e)=>{const n=t.indexOf(e);n>-1&&t.splice(n,1)},XS=Object.prototype.hasOwnProperty,it=(t,e)=>XS.call(t,e),Fe=Array.isArray,tr=t=>Ka(t)==="[object Map]",Mr=t=>Ka(t)==="[object Set]",zp=t=>Ka(t)==="[object Date]",Ye=t=>typeof t=="function",At=t=>typeof t=="string",Xs=t=>typeof t=="symbol",ft=t=>t!==null&&typeof t=="object",kb=t=>(ft(t)||Ye(t))&&Ye(t.then)&&Ye(t.catch),Sb=Object.prototype.toString,Ka=t=>Sb.call(t),QS=t=>Ka(t).slice(8,-1),$b=t=>Ka(t)==="[object Object]",Eh=t=>At(t)&&t!=="NaN"&&t[0]!=="-"&&""+parseInt(t,10)===t,la=$h(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),Pc=t=>{const e=Object.create(null);return n=>e[n]||(e[n]=t(n))},ZS=/-(\w)/g,Cs=Pc(t=>t.replace(ZS,(e,n)=>n?n.toUpperCase():"")),e$=/\B([A-Z])/g,Eo=Pc(t=>t.replace(e$,"-$1").toLowerCase()),Mc=Pc(t=>t.charAt(0).toUpperCase()+t.slice(1)),Tu=Pc(t=>t?`on${Mc(t)}`:""),Ei=(t,e)=>!Object.is(t,e),Yl=(t,...e)=>{for(let n=0;n{Object.defineProperty(t,e,{configurable:!0,enumerable:!1,writable:s,value:n})},sc=t=>{const e=parseFloat(t);return isNaN(e)?t:e},Cb=t=>{const e=At(t)?Number(t):NaN;return isNaN(e)?t:e};let Kp;const Eb=()=>Kp||(Kp=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});function zt(t){if(Fe(t)){const e={};for(let n=0;n{if(n){const s=n.split(n$);s.length>1&&(e[s[0].trim()]=s[1].trim())}}),e}function Ee(t){let e="";if(At(t))e=t;else if(Fe(t))for(let n=0;nSo(n,e))}const xe=t=>At(t)?t:t==null?"":Fe(t)||ft(t)&&(t.toString===Sb||!Ye(t.toString))?JSON.stringify(t,Pb,2):String(t),Pb=(t,e)=>e&&e.__v_isRef?Pb(t,e.value):tr(e)?{[`Map(${e.size})`]:[...e.entries()].reduce((n,[s,i],o)=>(n[Pu(s,o)+" =>"]=i,n),{})}:Mr(e)?{[`Set(${e.size})`]:[...e.values()].map(n=>Pu(n))}:Xs(e)?Pu(e):ft(e)&&!Fe(e)&&!$b(e)?String(e):e,Pu=(t,e="")=>{var n;return Xs(t)?`Symbol(${(n=t.description)!=null?n:e})`:t};/** +**//*! #__NO_SIDE_EFFECTS__ */function Xm(t,e){const n=new Set(t.split(","));return e?i=>n.has(i.toLowerCase()):i=>n.has(i)}const Ot={},tl=[],Vi=()=>{},y2=()=>!1,Zh=t=>t.charCodeAt(0)===111&&t.charCodeAt(1)===110&&(t.charCodeAt(2)>122||t.charCodeAt(2)<97),qm=t=>t.startsWith("onUpdate:"),ln=Object.assign,Zm=(t,e)=>{const n=t.indexOf(e);n>-1&&t.splice(n,1)},v2=Object.prototype.hasOwnProperty,ht=(t,e)=>v2.call(t,e),We=Array.isArray,nl=t=>Du(t)==="[object Map]",Hl=t=>Du(t)==="[object Set]",ev=t=>Du(t)==="[object Date]",qe=t=>typeof t=="function",Kt=t=>typeof t=="string",gr=t=>typeof t=="symbol",At=t=>t!==null&&typeof t=="object",Dx=t=>(At(t)||qe(t))&&qe(t.then)&&qe(t.catch),$x=Object.prototype.toString,Du=t=>$x.call(t),b2=t=>Du(t).slice(8,-1),Lx=t=>Du(t)==="[object Object]",Jm=t=>Kt(t)&&t!=="NaN"&&t[0]!=="-"&&""+parseInt(t,10)===t,Dc=Xm(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),Jh=t=>{const e=Object.create(null);return n=>e[n]||(e[n]=t(n))},w2=/-(\w)/g,Ls=Jh(t=>t.replace(w2,(e,n)=>n?n.toUpperCase():"")),x2=/\B([A-Z])/g,fa=Jh(t=>t.replace(x2,"-$1").toLowerCase()),Qh=Jh(t=>t.charAt(0).toUpperCase()+t.slice(1)),yg=Jh(t=>t?`on${Qh(t)}`:""),io=(t,e)=>!Object.is(t,e),Zd=(t,...e)=>{for(let n=0;n{Object.defineProperty(t,e,{configurable:!0,enumerable:!1,writable:i,value:n})},ch=t=>{const e=parseFloat(t);return isNaN(e)?t:e},Nx=t=>{const e=Kt(t)?Number(t):NaN;return isNaN(e)?t:e};let tv;const Fx=()=>tv||(tv=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});function Mn(t){if(We(t)){const e={};for(let n=0;n{if(n){const i=n.split(S2);i.length>1&&(e[i[0].trim()]=i[1].trim())}}),e}function Ie(t){let e="";if(Kt(t))e=t;else if(We(t))for(let n=0;naa(n,e))}const Ee=t=>Kt(t)?t:t==null?"":We(t)||At(t)&&(t.toString===$x||!qe(t.toString))?JSON.stringify(t,Vx,2):String(t),Vx=(t,e)=>e&&e.__v_isRef?Vx(t,e.value):nl(e)?{[`Map(${e.size})`]:[...e.entries()].reduce((n,[i,s],r)=>(n[vg(i,r)+" =>"]=s,n),{})}:Hl(e)?{[`Set(${e.size})`]:[...e.values()].map(n=>vg(n))}:gr(e)?vg(e):At(e)&&!We(e)&&!Lx(e)?String(e):e,vg=(t,e="")=>{var n;return gr(t)?`Symbol(${(n=t.description)!=null?n:e})`:t};/** * @vue/reactivity v3.4.29 * (c) 2018-present Yuxi (Evan) You and Vue contributors * @license MIT -**/let Dn;class Mb{constructor(e=!1){this.detached=e,this._active=!0,this.effects=[],this.cleanups=[],this.parent=Dn,!e&&Dn&&(this.index=(Dn.scopes||(Dn.scopes=[])).push(this)-1)}get active(){return this._active}run(e){if(this._active){const n=Dn;try{return Dn=this,e()}finally{Dn=n}}}on(){Dn=this}off(){Dn=this.parent}stop(e){if(this._active){let n,s;for(n=0,s=this.effects.length;n=5)break}}this._dirtyLevel===1&&(this._dirtyLevel=0),Ri()}return this._dirtyLevel>=5}set dirty(e){this._dirtyLevel=e?5:0}run(){if(this._dirtyLevel=0,!this.active)return this.fn();let e=ki,n=go;try{return ki=!0,go=this,this._runnings++,Yp(this),this.fn()}finally{Up(this),this._runnings--,go=n,ki=e}}stop(){this.active&&(Yp(this),Up(this),this.onStop&&this.onStop(),this.active=!1)}}function c$(t){return t.value}function Yp(t){t._trackId++,t._depsLength=0}function Up(t){if(t.deps.length>t._depsLength){for(let e=t._depsLength;e0){s._dirtyLevel=2;continue}let i;s._dirtyLevel{const n=new Map;return n.cleanup=t,n.computed=e,n},ic=new WeakMap,mo=Symbol(""),Sd=Symbol("");function Tn(t,e,n){if(ki&&go){let s=ic.get(t);s||ic.set(t,s=new Map);let i=s.get(n);i||s.set(n,i=Nb(()=>s.delete(n))),Lb(go,i)}}function Gs(t,e,n,s,i,o){const r=ic.get(t);if(!r)return;let a=[];if(e==="clear")a=[...r.values()];else if(n==="length"&&Fe(t)){const l=Number(s);r.forEach((c,u)=>{(u==="length"||!Xs(u)&&u>=l)&&a.push(c)})}else switch(n!==void 0&&a.push(r.get(n)),e){case"add":Fe(t)?Eh(n)&&a.push(r.get("length")):(a.push(r.get(mo)),tr(t)&&a.push(r.get(Sd)));break;case"delete":Fe(t)||(a.push(r.get(mo)),tr(t)&&a.push(r.get(Sd)));break;case"set":tr(t)&&a.push(r.get(mo));break}Dh();for(const l of a)l&&Rb(l,5);Oh()}function u$(t,e){const n=ic.get(t);return n&&n.get(e)}const d$=$h("__proto__,__v_isRef,__isVue"),Fb=new Set(Object.getOwnPropertyNames(Symbol).filter(t=>t!=="arguments"&&t!=="caller").map(t=>Symbol[t]).filter(Xs)),qp=h$();function h$(){const t={};return["includes","indexOf","lastIndexOf"].forEach(e=>{t[e]=function(...n){const s=et(this);for(let o=0,r=this.length;o{t[e]=function(...n){Li(),Dh();const s=et(this)[e].apply(this,n);return Oh(),Ri(),s}}),t}function f$(t){Xs(t)||(t=String(t));const e=et(this);return Tn(e,"has",t),e.hasOwnProperty(t)}class Bb{constructor(e=!1,n=!1){this._isReadonly=e,this._isShallow=n}get(e,n,s){const i=this._isReadonly,o=this._isShallow;if(n==="__v_isReactive")return!i;if(n==="__v_isReadonly")return i;if(n==="__v_isShallow")return o;if(n==="__v_raw")return s===(i?o?A$:Wb:o?jb:Hb).get(e)||Object.getPrototypeOf(e)===Object.getPrototypeOf(s)?e:void 0;const r=Fe(e);if(!i){if(r&&it(qp,n))return Reflect.get(qp,n,s);if(n==="hasOwnProperty")return f$}const a=Reflect.get(e,n,s);return(Xs(n)?Fb.has(n):d$(n))||(i||Tn(e,"get",n),o)?a:Mt(a)?r&&Eh(n)?a:a.value:ft(a)?i?Kb(a):Ts(a):a}}class Vb extends Bb{constructor(e=!1){super(!1,e)}set(e,n,s,i){let o=e[n];if(!this._isShallow){const l=ka(o);if(!oc(s)&&!ka(s)&&(o=et(o),s=et(s)),!Fe(e)&&Mt(o)&&!Mt(s))return l?!1:(o.value=s,!0)}const r=Fe(e)&&Eh(n)?Number(n)t,Oc=t=>Reflect.getPrototypeOf(t);function _l(t,e,n=!1,s=!1){t=t.__v_raw;const i=et(t),o=et(e);n||(Ei(e,o)&&Tn(i,"get",e),Tn(i,"get",o));const{has:r}=Oc(i),a=s?Ih:n?Nh:Sa;if(r.call(i,e))return a(t.get(e));if(r.call(i,o))return a(t.get(o));t!==i&&t.get(e)}function bl(t,e=!1){const n=this.__v_raw,s=et(n),i=et(t);return e||(Ei(t,i)&&Tn(s,"has",t),Tn(s,"has",i)),t===i?n.has(t):n.has(t)||n.has(i)}function vl(t,e=!1){return t=t.__v_raw,!e&&Tn(et(t),"iterate",mo),Reflect.get(t,"size",t)}function Gp(t){t=et(t);const e=et(this);return Oc(e).has.call(e,t)||(e.add(t),Gs(e,"add",t,t)),this}function Jp(t,e){e=et(e);const n=et(this),{has:s,get:i}=Oc(n);let o=s.call(n,t);o||(t=et(t),o=s.call(n,t));const r=i.call(n,t);return n.set(t,e),o?Ei(e,r)&&Gs(n,"set",t,e):Gs(n,"add",t,e),this}function Xp(t){const e=et(this),{has:n,get:s}=Oc(e);let i=n.call(e,t);i||(t=et(t),i=n.call(e,t)),s&&s.call(e,t);const o=e.delete(t);return i&&Gs(e,"delete",t,void 0),o}function Qp(){const t=et(this),e=t.size!==0,n=t.clear();return e&&Gs(t,"clear",void 0,void 0),n}function yl(t,e){return function(s,i){const o=this,r=o.__v_raw,a=et(r),l=e?Ih:t?Nh:Sa;return!t&&Tn(a,"iterate",mo),r.forEach((c,u)=>s.call(i,l(c),l(u),o))}}function wl(t,e,n){return function(...s){const i=this.__v_raw,o=et(i),r=tr(o),a=t==="entries"||t===Symbol.iterator&&r,l=t==="keys"&&r,c=i[t](...s),u=n?Ih:e?Nh:Sa;return!e&&Tn(o,"iterate",l?Sd:mo),{next(){const{value:d,done:f}=c.next();return f?{value:d,done:f}:{value:a?[u(d[0]),u(d[1])]:u(d),done:f}},[Symbol.iterator](){return this}}}}function oi(t){return function(...e){return t==="delete"?!1:t==="clear"?void 0:this}}function b$(){const t={get(o){return _l(this,o)},get size(){return vl(this)},has:bl,add:Gp,set:Jp,delete:Xp,clear:Qp,forEach:yl(!1,!1)},e={get(o){return _l(this,o,!1,!0)},get size(){return vl(this)},has:bl,add:Gp,set:Jp,delete:Xp,clear:Qp,forEach:yl(!1,!0)},n={get(o){return _l(this,o,!0)},get size(){return vl(this,!0)},has(o){return bl.call(this,o,!0)},add:oi("add"),set:oi("set"),delete:oi("delete"),clear:oi("clear"),forEach:yl(!0,!1)},s={get(o){return _l(this,o,!0,!0)},get size(){return vl(this,!0)},has(o){return bl.call(this,o,!0)},add:oi("add"),set:oi("set"),delete:oi("delete"),clear:oi("clear"),forEach:yl(!0,!0)};return["keys","values","entries",Symbol.iterator].forEach(o=>{t[o]=wl(o,!1,!1),n[o]=wl(o,!0,!1),e[o]=wl(o,!1,!0),s[o]=wl(o,!0,!0)}),[t,n,e,s]}const[v$,y$,w$,x$]=b$();function Lh(t,e){const n=e?t?x$:w$:t?y$:v$;return(s,i,o)=>i==="__v_isReactive"?!t:i==="__v_isReadonly"?t:i==="__v_raw"?s:Reflect.get(it(n,i)&&i in s?n:s,i,o)}const k$={get:Lh(!1,!1)},S$={get:Lh(!1,!0)},$$={get:Lh(!0,!1)};const Hb=new WeakMap,jb=new WeakMap,Wb=new WeakMap,A$=new WeakMap;function C$(t){switch(t){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function E$(t){return t.__v_skip||!Object.isExtensible(t)?0:C$(QS(t))}function Ts(t){return ka(t)?t:Rh(t,!1,g$,k$,Hb)}function zb(t){return Rh(t,!1,_$,S$,jb)}function Kb(t){return Rh(t,!0,m$,$$,Wb)}function Rh(t,e,n,s,i){if(!ft(t)||t.__v_raw&&!(e&&t.__v_isReactive))return t;const o=i.get(t);if(o)return o;const r=E$(t);if(r===0)return t;const a=new Proxy(t,r===2?s:n);return i.set(t,a),a}function _o(t){return ka(t)?_o(t.__v_raw):!!(t&&t.__v_isReactive)}function ka(t){return!!(t&&t.__v_isReadonly)}function oc(t){return!!(t&&t.__v_isShallow)}function Ic(t){return t?!!t.__v_raw:!1}function et(t){const e=t&&t.__v_raw;return e?et(e):t}function Lc(t){return Object.isExtensible(t)&&Ab(t,"__v_skip",!0),t}const Sa=t=>ft(t)?Ts(t):t,Nh=t=>ft(t)?Kb(t):t;class Yb{constructor(e,n,s,i){this.getter=e,this._setter=n,this.dep=void 0,this.__v_isRef=!0,this.__v_isReadonly=!1,this.effect=new Mh(()=>e(this._value),()=>Ul(this,this.effect._dirtyLevel===3?3:4)),this.effect.computed=this,this.effect.active=this._cacheable=!i,this.__v_isReadonly=s}get value(){const e=et(this);return(!e._cacheable||e.effect.dirty)&&Ei(e._value,e._value=e.effect.run())&&Ul(e,5),Ub(e),e.effect._dirtyLevel>=2&&Ul(e,3),e._value}set value(e){this._setter(e)}get _dirty(){return this.effect.dirty}set _dirty(e){this.effect.dirty=e}}function T$(t,e,n=!1){let s,i;const o=Ye(t);return o?(s=t,i=Yn):(s=t.get,i=t.set),new Yb(s,i,o||!i,n)}function Ub(t){var e;ki&&go&&(t=et(t),Lb(go,(e=t.dep)!=null?e:t.dep=Nb(()=>t.dep=void 0,t instanceof Yb?t:void 0)))}function Ul(t,e=5,n,s){t=et(t);const i=t.dep;i&&Rb(i,e)}function Mt(t){return!!(t&&t.__v_isRef===!0)}function be(t){return qb(t,!1)}function Fh(t){return qb(t,!0)}function qb(t,e){return Mt(t)?t:new P$(t,e)}class P${constructor(e,n){this.__v_isShallow=n,this.dep=void 0,this.__v_isRef=!0,this._rawValue=n?e:et(e),this._value=n?e:Sa(e)}get value(){return Ub(this),this._value}set value(e){const n=this.__v_isShallow||oc(e)||ka(e);e=n?e:et(e),Ei(e,this._rawValue)&&(this._rawValue,this._rawValue=e,this._value=n?e:Sa(e),Ul(this,5))}}function G(t){return Mt(t)?t.value:t}const M$={get:(t,e,n)=>G(Reflect.get(t,e,n)),set:(t,e,n,s)=>{const i=t[e];return Mt(i)&&!Mt(n)?(i.value=n,!0):Reflect.set(t,e,n,s)}};function Gb(t){return _o(t)?t:new Proxy(t,M$)}function D$(t){const e=Fe(t)?new Array(t.length):{};for(const n in t)e[n]=Jb(t,n);return e}class O${constructor(e,n,s){this._object=e,this._key=n,this._defaultValue=s,this.__v_isRef=!0}get value(){const e=this._object[this._key];return e===void 0?this._defaultValue:e}set value(e){this._object[this._key]=e}get dep(){return u$(et(this._object),this._key)}}class I${constructor(e){this._getter=e,this.__v_isRef=!0,this.__v_isReadonly=!0}get value(){return this._getter()}}function $a(t,e,n){return Mt(t)?t:Ye(t)?new I$(t):ft(t)&&arguments.length>1?Jb(t,e,n):be(t)}function Jb(t,e,n){const s=t[e];return Mt(s)?s:new O$(t,e,n)}/** +**/let Ei;class zx{constructor(e=!1){this.detached=e,this._active=!0,this.effects=[],this.cleanups=[],this.parent=Ei,!e&&Ei&&(this.index=(Ei.scopes||(Ei.scopes=[])).push(this)-1)}get active(){return this._active}run(e){if(this._active){const n=Ei;try{return Ei=this,e()}finally{Ei=n}}}on(){Ei=this}off(){Ei=this.parent}stop(e){if(this._active){let n,i;for(n=0,i=this.effects.length;n=5)break}}this._dirtyLevel===1&&(this._dirtyLevel=0),go()}return this._dirtyLevel>=5}set dirty(e){this._dirtyLevel=e?5:0}run(){if(this._dirtyLevel=0,!this.active)return this.fn();let e=Zr,n=Jo;try{return Zr=!0,Jo=this,this._runnings++,nv(this),this.fn()}finally{iv(this),this._runnings--,Jo=n,Zr=e}}stop(){this.active&&(nv(this),iv(this),this.onStop&&this.onStop(),this.active=!1)}}function P2(t){return t.value}function nv(t){t._trackId++,t._depsLength=0}function iv(t){if(t.deps.length>t._depsLength){for(let e=t._depsLength;e0){i._dirtyLevel=2;continue}let s;i._dirtyLevel{const n=new Map;return n.cleanup=t,n.computed=e,n},uh=new WeakMap,Qo=Symbol(""),$p=Symbol("");function yi(t,e,n){if(Zr&&Jo){let i=uh.get(t);i||uh.set(t,i=new Map);let s=i.get(n);s||i.set(n,s=Ux(()=>i.delete(n))),jx(Jo,s)}}function lr(t,e,n,i,s,r){const o=uh.get(t);if(!o)return;let a=[];if(e==="clear")a=[...o.values()];else if(n==="length"&&We(t)){const l=Number(i);o.forEach((c,u)=>{(u==="length"||!gr(u)&&u>=l)&&a.push(c)})}else switch(n!==void 0&&a.push(o.get(n)),e){case"add":We(t)?Jm(n)&&a.push(o.get("length")):(a.push(o.get(Qo)),nl(t)&&a.push(o.get($p)));break;case"delete":We(t)||(a.push(o.get(Qo)),nl(t)&&a.push(o.get($p)));break;case"set":nl(t)&&a.push(o.get(Qo));break}n_();for(const l of a)l&&Kx(l,5);i_()}function R2(t,e){const n=uh.get(t);return n&&n.get(e)}const D2=Xm("__proto__,__v_isRef,__isVue"),Gx=new Set(Object.getOwnPropertyNames(Symbol).filter(t=>t!=="arguments"&&t!=="caller").map(t=>Symbol[t]).filter(gr)),sv=$2();function $2(){const t={};return["includes","indexOf","lastIndexOf"].forEach(e=>{t[e]=function(...n){const i=lt(this);for(let r=0,o=this.length;r{t[e]=function(...n){fo(),n_();const i=lt(this)[e].apply(this,n);return i_(),go(),i}}),t}function L2(t){gr(t)||(t=String(t));const e=lt(this);return yi(e,"has",t),e.hasOwnProperty(t)}class Xx{constructor(e=!1,n=!1){this._isReadonly=e,this._isShallow=n}get(e,n,i){const s=this._isReadonly,r=this._isShallow;if(n==="__v_isReactive")return!s;if(n==="__v_isReadonly")return s;if(n==="__v_isShallow")return r;if(n==="__v_raw")return i===(s?r?G2:Qx:r?Jx:Zx).get(e)||Object.getPrototypeOf(e)===Object.getPrototypeOf(i)?e:void 0;const o=We(e);if(!s){if(o&&ht(sv,n))return Reflect.get(sv,n,i);if(n==="hasOwnProperty")return L2}const a=Reflect.get(e,n,i);return(gr(n)?Gx.has(n):D2(n))||(s||yi(e,"get",n),r)?a:Qt(a)?o&&Jm(n)?a:a.value:At(a)?s?tE(a):Ns(a):a}}class qx extends Xx{constructor(e=!1){super(!1,e)}set(e,n,i,s){let r=e[n];if(!this._isShallow){const l=Xc(r);if(!dh(i)&&!Xc(i)&&(r=lt(r),i=lt(i)),!We(e)&&Qt(r)&&!Qt(i))return l?!1:(r.value=i,!0)}const o=We(e)&&Jm(n)?Number(n)t,tf=t=>Reflect.getPrototypeOf(t);function dd(t,e,n=!1,i=!1){t=t.__v_raw;const s=lt(t),r=lt(e);n||(io(e,r)&&yi(s,"get",e),yi(s,"get",r));const{has:o}=tf(s),a=i?s_:n?a_:qc;if(o.call(s,e))return a(t.get(e));if(o.call(s,r))return a(t.get(r));t!==s&&t.get(e)}function hd(t,e=!1){const n=this.__v_raw,i=lt(n),s=lt(t);return e||(io(t,s)&&yi(i,"has",t),yi(i,"has",s)),t===s?n.has(t):n.has(t)||n.has(s)}function fd(t,e=!1){return t=t.__v_raw,!e&&yi(lt(t),"iterate",Qo),Reflect.get(t,"size",t)}function rv(t){t=lt(t);const e=lt(this);return tf(e).has.call(e,t)||(e.add(t),lr(e,"add",t,t)),this}function ov(t,e){e=lt(e);const n=lt(this),{has:i,get:s}=tf(n);let r=i.call(n,t);r||(t=lt(t),r=i.call(n,t));const o=s.call(n,t);return n.set(t,e),r?io(e,o)&&lr(n,"set",t,e):lr(n,"add",t,e),this}function av(t){const e=lt(this),{has:n,get:i}=tf(e);let s=n.call(e,t);s||(t=lt(t),s=n.call(e,t)),i&&i.call(e,t);const r=e.delete(t);return s&&lr(e,"delete",t,void 0),r}function lv(){const t=lt(this),e=t.size!==0,n=t.clear();return e&&lr(t,"clear",void 0,void 0),n}function gd(t,e){return function(i,s){const r=this,o=r.__v_raw,a=lt(o),l=e?s_:t?a_:qc;return!t&&yi(a,"iterate",Qo),o.forEach((c,u)=>i.call(s,l(c),l(u),r))}}function pd(t,e,n){return function(...i){const s=this.__v_raw,r=lt(s),o=nl(r),a=t==="entries"||t===Symbol.iterator&&o,l=t==="keys"&&o,c=s[t](...i),u=n?s_:e?a_:qc;return!e&&yi(r,"iterate",l?$p:Qo),{next(){const{value:d,done:h}=c.next();return h?{value:d,done:h}:{value:a?[u(d[0]),u(d[1])]:u(d),done:h}},[Symbol.iterator](){return this}}}}function Er(t){return function(...e){return t==="delete"?!1:t==="clear"?void 0:this}}function V2(){const t={get(r){return dd(this,r)},get size(){return fd(this)},has:hd,add:rv,set:ov,delete:av,clear:lv,forEach:gd(!1,!1)},e={get(r){return dd(this,r,!1,!0)},get size(){return fd(this)},has:hd,add:rv,set:ov,delete:av,clear:lv,forEach:gd(!1,!0)},n={get(r){return dd(this,r,!0)},get size(){return fd(this,!0)},has(r){return hd.call(this,r,!0)},add:Er("add"),set:Er("set"),delete:Er("delete"),clear:Er("clear"),forEach:gd(!0,!1)},i={get(r){return dd(this,r,!0,!0)},get size(){return fd(this,!0)},has(r){return hd.call(this,r,!0)},add:Er("add"),set:Er("set"),delete:Er("delete"),clear:Er("clear"),forEach:gd(!0,!0)};return["keys","values","entries",Symbol.iterator].forEach(r=>{t[r]=pd(r,!1,!1),n[r]=pd(r,!0,!1),e[r]=pd(r,!1,!0),i[r]=pd(r,!0,!0)}),[t,n,e,i]}const[z2,W2,H2,Y2]=V2();function r_(t,e){const n=e?t?Y2:H2:t?W2:z2;return(i,s,r)=>s==="__v_isReactive"?!t:s==="__v_isReadonly"?t:s==="__v_raw"?i:Reflect.get(ht(n,s)&&s in i?n:i,s,r)}const j2={get:r_(!1,!1)},K2={get:r_(!1,!0)},U2={get:r_(!0,!1)};const Zx=new WeakMap,Jx=new WeakMap,Qx=new WeakMap,G2=new WeakMap;function X2(t){switch(t){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function q2(t){return t.__v_skip||!Object.isExtensible(t)?0:X2(b2(t))}function Ns(t){return Xc(t)?t:o_(t,!1,N2,j2,Zx)}function eE(t){return o_(t,!1,B2,K2,Jx)}function tE(t){return o_(t,!0,F2,U2,Qx)}function o_(t,e,n,i,s){if(!At(t)||t.__v_raw&&!(e&&t.__v_isReactive))return t;const r=s.get(t);if(r)return r;const o=q2(t);if(o===0)return t;const a=new Proxy(t,o===2?i:n);return s.set(t,a),a}function ea(t){return Xc(t)?ea(t.__v_raw):!!(t&&t.__v_isReactive)}function Xc(t){return!!(t&&t.__v_isReadonly)}function dh(t){return!!(t&&t.__v_isShallow)}function nf(t){return t?!!t.__v_raw:!1}function lt(t){const e=t&&t.__v_raw;return e?lt(e):t}function sf(t){return Object.isExtensible(t)&&Ox(t,"__v_skip",!0),t}const qc=t=>At(t)?Ns(t):t,a_=t=>At(t)?tE(t):t;class nE{constructor(e,n,i,s){this.getter=e,this._setter=n,this.dep=void 0,this.__v_isRef=!0,this.__v_isReadonly=!1,this.effect=new t_(()=>e(this._value),()=>Jd(this,this.effect._dirtyLevel===3?3:4)),this.effect.computed=this,this.effect.active=this._cacheable=!s,this.__v_isReadonly=i}get value(){const e=lt(this);return(!e._cacheable||e.effect.dirty)&&io(e._value,e._value=e.effect.run())&&Jd(e,5),iE(e),e.effect._dirtyLevel>=2&&Jd(e,3),e._value}set value(e){this._setter(e)}get _dirty(){return this.effect.dirty}set _dirty(e){this.effect.dirty=e}}function Z2(t,e,n=!1){let i,s;const r=qe(t);return r?(i=t,s=Vi):(i=t.get,s=t.set),new nE(i,s,r||!s,n)}function iE(t){var e;Zr&&Jo&&(t=lt(t),jx(Jo,(e=t.dep)!=null?e:t.dep=Ux(()=>t.dep=void 0,t instanceof nE?t:void 0)))}function Jd(t,e=5,n,i){t=lt(t);const s=t.dep;s&&Kx(s,e)}function Qt(t){return!!(t&&t.__v_isRef===!0)}function we(t){return sE(t,!1)}function l_(t){return sE(t,!0)}function sE(t,e){return Qt(t)?t:new J2(t,e)}class J2{constructor(e,n){this.__v_isShallow=n,this.dep=void 0,this.__v_isRef=!0,this._rawValue=n?e:lt(e),this._value=n?e:qc(e)}get value(){return iE(this),this._value}set value(e){const n=this.__v_isShallow||dh(e)||Xc(e);e=n?e:lt(e),io(e,this._rawValue)&&(this._rawValue,this._rawValue=e,this._value=n?e:qc(e),Jd(this,5))}}function Q(t){return Qt(t)?t.value:t}const Q2={get:(t,e,n)=>Q(Reflect.get(t,e,n)),set:(t,e,n,i)=>{const s=t[e];return Qt(s)&&!Qt(n)?(s.value=n,!0):Reflect.set(t,e,n,i)}};function rE(t){return ea(t)?t:new Proxy(t,Q2)}function eR(t){const e=We(t)?new Array(t.length):{};for(const n in t)e[n]=oE(t,n);return e}class tR{constructor(e,n,i){this._object=e,this._key=n,this._defaultValue=i,this.__v_isRef=!0}get value(){const e=this._object[this._key];return e===void 0?this._defaultValue:e}set value(e){this._object[this._key]=e}get dep(){return R2(lt(this._object),this._key)}}class nR{constructor(e){this._getter=e,this.__v_isRef=!0,this.__v_isReadonly=!0}get value(){return this._getter()}}function Zc(t,e,n){return Qt(t)?t:qe(t)?new nR(t):At(t)&&arguments.length>1?oE(t,e,n):we(t)}function oE(t,e,n){const i=t[e];return Qt(i)?i:new tR(t,e,n)}/** * @vue/runtime-core v3.4.29 * (c) 2018-present Yuxi (Evan) You and Vue contributors * @license MIT -**/function Si(t,e,n,s){try{return s?t(...s):t()}catch(i){Ya(i,e,n)}}function Jn(t,e,n,s){if(Ye(t)){const i=Si(t,e,n,s);return i&&kb(i)&&i.catch(o=>{Ya(o,e,n)}),i}if(Fe(t)){const i=[];for(let o=0;o>>1,i=un[s],o=Ca(i);o_s&&un.splice(e,1)}function Ad(t){Fe(t)?nr.push(...t):(!hi||!hi.includes(t,t.allowRecurse?uo+1:uo))&&nr.push(t),Qb()}function Zp(t,e,n=Aa?_s+1:0){for(;nCa(n)-Ca(s));if(nr.length=0,hi){hi.push(...e);return}for(hi=e,uo=0;uot.id==null?1/0:t.id,F$=(t,e)=>{const n=Ca(t)-Ca(e);if(n===0){if(t.pre&&!e.pre)return-1;if(e.pre&&!t.pre)return 1}return n};function ev(t){$d=!1,Aa=!0,un.sort(F$);try{for(_s=0;_sAt(g)?g.trim():g)),d&&(i=n.map(sc))}let a,l=s[a=Tu(e)]||s[a=Tu(Cs(e))];!l&&o&&(l=s[a=Tu(Eo(e))]),l&&Jn(l,t,6,i);const c=s[a+"Once"];if(c){if(!t.emitted)t.emitted={};else if(t.emitted[a])return;t.emitted[a]=!0,Jn(c,t,6,i)}}function tv(t,e,n=!1){const s=e.emitsCache,i=s.get(t);if(i!==void 0)return i;const o=t.emits;let r={},a=!1;if(!Ye(t)){const l=c=>{const u=tv(c,e,!0);u&&(a=!0,Ft(r,u))};!n&&e.mixins.length&&e.mixins.forEach(l),t.extends&&l(t.extends),t.mixins&&t.mixins.forEach(l)}return!o&&!a?(ft(t)&&s.set(t,null),null):(Fe(o)?o.forEach(l=>r[l]=null):Ft(r,o),ft(t)&&s.set(t,r),r)}function Rc(t,e){return!t||!Tc(e)?!1:(e=e.slice(2).replace(/Once$/,""),it(t,e[0].toLowerCase()+e.slice(1))||it(t,Eo(e))||it(t,e))}let Kt=null,Nc=null;function rc(t){const e=Kt;return Kt=t,Nc=t&&t.type.__scopeId||null,e}function qt(t){Nc=t}function Gt(){Nc=null}function Pe(t,e=Kt,n){if(!e||t._n)return t;const s=(...i)=>{s._d&&gg(-1);const o=rc(e);let r;try{r=t(...i)}finally{rc(o),s._d&&gg(1)}return r};return s._n=!0,s._c=!0,s._d=!0,s}function Mu(t){const{type:e,vnode:n,proxy:s,withProxy:i,propsOptions:[o],slots:r,attrs:a,emit:l,render:c,renderCache:u,props:d,data:f,setupState:g,ctx:_,inheritAttrs:m}=t,y=rc(t);let v,$;try{if(n.shapeFlag&4){const D=i||s,x=D;v=ss(c.call(x,D,u,d,g,f,_)),$=a}else{const D=e;v=ss(D.length>1?D(d,{attrs:a,slots:r,emit:l}):D(d,null)),$=e.props?a:H$(a)}}catch(D){ha.length=0,Ya(D,t,1),v=N(dn)}let A=v;if($&&m!==!1){const D=Object.keys($),{shapeFlag:x}=A;D.length&&x&7&&(o&&D.some(Ah)&&($=j$($,o)),A=Ti(A,$,!1,!0))}return n.dirs&&(A=Ti(A,null,!1,!0),A.dirs=A.dirs?A.dirs.concat(n.dirs):n.dirs),n.transition&&(A.transition=n.transition),v=A,rc(y),v}function V$(t,e=!0){let n;for(let s=0;s{let e;for(const n in t)(n==="class"||n==="style"||Tc(n))&&((e||(e={}))[n]=t[n]);return e},j$=(t,e)=>{const n={};for(const s in t)(!Ah(s)||!(s.slice(9)in e))&&(n[s]=t[s]);return n};function W$(t,e,n){const{props:s,children:i,component:o}=t,{props:r,children:a,patchFlag:l}=e,c=o.emitsOptions;if(e.dirs||e.transition)return!0;if(n&&l>=0){if(l&1024)return!0;if(l&16)return s?eg(s,r,c):!!r;if(l&8){const u=e.dynamicProps;for(let d=0;dt.__isSuspense;let Cd=0;const K$={name:"Suspense",__isSuspense:!0,process(t,e,n,s,i,o,r,a,l,c){if(t==null)Y$(e,n,s,i,o,r,a,l,c);else{if(o&&o.deps>0&&!t.suspense.isInFallback){e.suspense=t.suspense,e.suspense.vnode=e,e.el=t.el;return}U$(t,e,n,s,i,r,a,l,c)}},hydrate:q$,create:zh,normalize:G$},Wh=K$;function Ea(t,e){const n=t.props&&t.props[e];Ye(n)&&n()}function Y$(t,e,n,s,i,o,r,a,l){const{p:c,o:{createElement:u}}=l,d=u("div"),f=t.suspense=zh(t,i,s,e,d,n,o,r,a,l);c(null,f.pendingBranch=t.ssContent,d,null,s,f,o,r),f.deps>0?(Ea(t,"onPending"),Ea(t,"onFallback"),c(null,t.ssFallback,e,n,s,null,o,r),sr(f,t.ssFallback)):f.resolve(!1,!0)}function U$(t,e,n,s,i,o,r,a,{p:l,um:c,o:{createElement:u}}){const d=e.suspense=t.suspense;d.vnode=e,e.el=t.el;const f=e.ssContent,g=e.ssFallback,{activeBranch:_,pendingBranch:m,isInFallback:y,isHydrating:v}=d;if(m)d.pendingBranch=f,bs(f,m)?(l(m,f,d.hiddenContainer,null,i,d,o,r,a),d.deps<=0?d.resolve():y&&(v||(l(_,g,n,s,i,null,o,r,a),sr(d,g)))):(d.pendingId=Cd++,v?(d.isHydrating=!1,d.activeBranch=m):c(m,i,d),d.deps=0,d.effects.length=0,d.hiddenContainer=u("div"),y?(l(null,f,d.hiddenContainer,null,i,d,o,r,a),d.deps<=0?d.resolve():(l(_,g,n,s,i,null,o,r,a),sr(d,g))):_&&bs(f,_)?(l(_,f,n,s,i,d,o,r,a),d.resolve(!0)):(l(null,f,d.hiddenContainer,null,i,d,o,r,a),d.deps<=0&&d.resolve()));else if(_&&bs(f,_))l(_,f,n,s,i,d,o,r,a),sr(d,f);else if(Ea(e,"onPending"),d.pendingBranch=f,f.shapeFlag&512?d.pendingId=f.component.suspenseId:d.pendingId=Cd++,l(null,f,d.hiddenContainer,null,i,d,o,r,a),d.deps<=0)d.resolve();else{const{timeout:$,pendingId:A}=d;$>0?setTimeout(()=>{d.pendingId===A&&d.fallback(g)},$):$===0&&d.fallback(g)}}function zh(t,e,n,s,i,o,r,a,l,c,u=!1){const{p:d,m:f,um:g,n:_,o:{parentNode:m,remove:y}}=c;let v;const $=X$(t);$&&e&&e.pendingBranch&&(v=e.pendingId,e.deps++);const A=t.props?Cb(t.props.timeout):void 0,D=o,x={vnode:t,parent:e,parentComponent:n,namespace:r,container:s,hiddenContainer:i,deps:0,pendingId:Cd++,timeout:typeof A=="number"?A:-1,activeBranch:null,pendingBranch:null,isInFallback:!u,isHydrating:u,isUnmounted:!1,effects:[],resolve(w=!1,S=!1){const{vnode:T,activeBranch:M,pendingBranch:E,pendingId:V,effects:X,parentComponent:le,container:Y}=x;let R=!1;x.isHydrating?x.isHydrating=!1:w||(R=M&&E.transition&&E.transition.mode==="out-in",R&&(M.transition.afterLeave=()=>{V===x.pendingId&&(f(E,Y,o===D?_(M):o,0),Ad(X))}),M&&(m(M.el)!==x.hiddenContainer&&(o=_(M)),g(M,le,x,!0)),R||f(E,Y,o,0)),sr(x,E),x.pendingBranch=null,x.isInFallback=!1;let I=x.parent,H=!1;for(;I;){if(I.pendingBranch){I.effects.push(...X),H=!0;break}I=I.parent}!H&&!R&&Ad(X),x.effects=[],$&&e&&e.pendingBranch&&v===e.pendingId&&(e.deps--,e.deps===0&&!S&&e.resolve()),Ea(T,"onResolve")},fallback(w){if(!x.pendingBranch)return;const{vnode:S,activeBranch:T,parentComponent:M,container:E,namespace:V}=x;Ea(S,"onFallback");const X=_(T),le=()=>{x.isInFallback&&(d(null,w,E,X,M,null,V,a,l),sr(x,w))},Y=w.transition&&w.transition.mode==="out-in";Y&&(T.transition.afterLeave=le),x.isInFallback=!0,g(T,M,null,!0),Y||le()},move(w,S,T){x.activeBranch&&f(x.activeBranch,w,S,T),x.container=w},next(){return x.activeBranch&&_(x.activeBranch)},registerDep(w,S,T){const M=!!x.pendingBranch;M&&x.deps++;const E=w.vnode.el;w.asyncDep.catch(V=>{Ya(V,w,0)}).then(V=>{if(w.isUnmounted||x.isUnmounted||x.pendingId!==w.suspenseId)return;w.asyncResolved=!0;const{vnode:X}=w;Ld(w,V,!1),E&&(X.el=E);const le=!E&&w.subTree.el;S(w,X,m(E||w.subTree.el),E?null:_(w.subTree),x,r,T),le&&y(le),Hh(w,X.el),M&&--x.deps===0&&x.resolve()})},unmount(w,S){x.isUnmounted=!0,x.activeBranch&&g(x.activeBranch,n,w,S),x.pendingBranch&&g(x.pendingBranch,n,w,S)}};return x}function q$(t,e,n,s,i,o,r,a,l){const c=e.suspense=zh(e,s,n,t.parentNode,document.createElement("div"),null,i,o,r,a,!0),u=l(t,c.pendingBranch=e.ssContent,n,c,o,r);return c.deps===0&&c.resolve(!1,!0),u}function G$(t){const{shapeFlag:e,children:n}=t,s=e&32;t.ssContent=ng(s?n.default:n),t.ssFallback=s?ng(n.fallback):N(dn)}function ng(t){let e;if(Ye(t)){const n=hr&&t._c;n&&(t._d=!1,C()),t=t(),n&&(t._d=!0,e=Un,Cv())}return Fe(t)&&(t=V$(t)),t=ss(t),e&&!t.dynamicChildren&&(t.dynamicChildren=e.filter(n=>n!==t)),t}function J$(t,e){e&&e.pendingBranch?Fe(t)?e.effects.push(...t):e.effects.push(t):Ad(t)}function sr(t,e){t.activeBranch=e;const{vnode:n,parentComponent:s}=t;let i=e.el;for(;!i&&e.component;)e=e.component.subTree,i=e.el;n.el=i,s&&s.subTree===n&&(s.vnode.el=i,Hh(s,i))}function X$(t){const e=t.props&&t.props.suspensible;return e!=null&&e!==!1}function Fc(t,e,n=Zt,s=!1){if(n){const i=n[t]||(n[t]=[]),o=e.__weh||(e.__weh=(...r)=>{Li();const a=Ua(n),l=Jn(e,n,t,r);return a(),Ri(),l});return s?i.unshift(o):i.push(o),o}}const ei=t=>(e,n=Zt)=>{(!Hc||t==="sp")&&Fc(t,(...s)=>e(...s),n)},Q$=ei("bm"),Jt=ei("m"),iv=ei("bu"),ov=ei("u"),Kh=ei("bum"),Dr=ei("um"),Z$=ei("sp"),eA=ei("rtg"),tA=ei("rtc");function nA(t,e=Zt){Fc("ec",t,e)}function Le(t,e){if(Kt===null)return t;const n=jc(Kt),s=t.dirs||(t.dirs=[]);for(let i=0;ie(r,a,void 0,o&&o[a]));else{const r=Object.keys(t);i=new Array(r.length);for(let a=0,l=r.length;a{const o=s.fn(...i);return o&&(o.key=s.key),o}:s.fn)}return t}/*! #__NO_SIDE_EFFECTS__ */function Bt(t,e){return Ye(t)?Ft({name:t.name},e,{setup:t}):t}const ca=t=>!!t.type.__asyncLoader;function Ie(t,e,n={},s,i){if(Kt.isCE||Kt.parent&&ca(Kt.parent)&&Kt.parent.isCE)return e!=="default"&&(n.name=e),N("slot",n,s&&s());let o=t[e];o&&o._c&&(o._d=!1),C();const r=o&&rv(o(n)),a=Se(Me,{key:n.key||r&&r.key||`_${e}`},r||(s?s():[]),r&&t._===1?64:-2);return!i&&a.scopeId&&(a.slotScopeIds=[a.scopeId+"-s"]),o&&o._c&&(o._d=!0),a}function rv(t){return t.some(e=>Pa(e)?!(e.type===dn||e.type===Me&&!rv(e.children)):!0)?t:null}const Ed=t=>t?Pv(t)?jc(t):Ed(t.parent):null,ua=Ft(Object.create(null),{$:t=>t,$el:t=>t.vnode.el,$data:t=>t.data,$props:t=>t.props,$attrs:t=>t.attrs,$slots:t=>t.slots,$refs:t=>t.refs,$parent:t=>Ed(t.parent),$root:t=>Ed(t.root),$emit:t=>t.emit,$options:t=>Yh(t),$forceUpdate:t=>t.f||(t.f=()=>{t.effect.dirty=!0,Vh(t.update)}),$nextTick:t=>t.n||(t.n=nn.bind(t.proxy)),$watch:t=>SA.bind(t)}),Du=(t,e)=>t!==vt&&!t.__isScriptSetup&&it(t,e),sA={get({_:t},e){if(e==="__v_skip")return!0;const{ctx:n,setupState:s,data:i,props:o,accessCache:r,type:a,appContext:l}=t;let c;if(e[0]!=="$"){const g=r[e];if(g!==void 0)switch(g){case 1:return s[e];case 2:return i[e];case 4:return n[e];case 3:return o[e]}else{if(Du(s,e))return r[e]=1,s[e];if(i!==vt&&it(i,e))return r[e]=2,i[e];if((c=t.propsOptions[0])&&it(c,e))return r[e]=3,o[e];if(n!==vt&&it(n,e))return r[e]=4,n[e];Td&&(r[e]=0)}}const u=ua[e];let d,f;if(u)return e==="$attrs"&&Tn(t.attrs,"get",""),u(t);if((d=a.__cssModules)&&(d=d[e]))return d;if(n!==vt&&it(n,e))return r[e]=4,n[e];if(f=l.config.globalProperties,it(f,e))return f[e]},set({_:t},e,n){const{data:s,setupState:i,ctx:o}=t;return Du(i,e)?(i[e]=n,!0):s!==vt&&it(s,e)?(s[e]=n,!0):it(t.props,e)||e[0]==="$"&&e.slice(1)in t?!1:(o[e]=n,!0)},has({_:{data:t,setupState:e,accessCache:n,ctx:s,appContext:i,propsOptions:o}},r){let a;return!!n[r]||t!==vt&&it(t,r)||Du(e,r)||(a=o[0])&&it(a,r)||it(s,r)||it(ua,r)||it(i.config.globalProperties,r)},defineProperty(t,e,n){return n.get!=null?t._.accessCache[e]=0:it(n,"value")&&this.set(t,e,n.value,null),Reflect.defineProperty(t,e,n)}};function Po(){return av().slots}function iA(){return av().attrs}function av(){const t=Xh();return t.setupContext||(t.setupContext=Dv(t))}function sg(t){return Fe(t)?t.reduce((e,n)=>(e[n]=null,e),{}):t}let Td=!0;function oA(t){const e=Yh(t),n=t.proxy,s=t.ctx;Td=!1,e.beforeCreate&&ig(e.beforeCreate,t,"bc");const{data:i,computed:o,methods:r,watch:a,provide:l,inject:c,created:u,beforeMount:d,mounted:f,beforeUpdate:g,updated:_,activated:m,deactivated:y,beforeDestroy:v,beforeUnmount:$,destroyed:A,unmounted:D,render:x,renderTracked:w,renderTriggered:S,errorCaptured:T,serverPrefetch:M,expose:E,inheritAttrs:V,components:X,directives:le,filters:Y}=e;if(c&&rA(c,s,null),r)for(const H in r){const Z=r[H];Ye(Z)&&(s[H]=Z.bind(n))}if(i){const H=i.call(n,n);ft(H)&&(t.data=Ts(H))}if(Td=!0,o)for(const H in o){const Z=o[H],ee=Ye(Z)?Z.bind(n,n):Ye(Z.get)?Z.get.bind(n,n):Yn,ce=!Ye(Z)&&Ye(Z.set)?Z.set.bind(n):Yn,ve=_e({get:ee,set:ce});Object.defineProperty(s,H,{enumerable:!0,configurable:!0,get:()=>ve.value,set:U=>ve.value=U})}if(a)for(const H in a)lv(a[H],s,n,H);if(l){const H=Ye(l)?l.call(n):l;Reflect.ownKeys(H).forEach(Z=>{ql(Z,H[Z])})}u&&ig(u,t,"c");function I(H,Z){Fe(Z)?Z.forEach(ee=>H(ee.bind(n))):Z&&H(Z.bind(n))}if(I(Q$,d),I(Jt,f),I(iv,g),I(ov,_),I($A,m),I(AA,y),I(nA,T),I(tA,w),I(eA,S),I(Kh,$),I(Dr,D),I(Z$,M),Fe(E))if(E.length){const H=t.exposed||(t.exposed={});E.forEach(Z=>{Object.defineProperty(H,Z,{get:()=>n[Z],set:ee=>n[Z]=ee})})}else t.exposed||(t.exposed={});x&&t.render===Yn&&(t.render=x),V!=null&&(t.inheritAttrs=V),X&&(t.components=X),le&&(t.directives=le)}function rA(t,e,n=Yn){Fe(t)&&(t=Pd(t));for(const s in t){const i=t[s];let o;ft(i)?"default"in i?o=as(i.from||s,i.default,!0):o=as(i.from||s):o=as(i),Mt(o)?Object.defineProperty(e,s,{enumerable:!0,configurable:!0,get:()=>o.value,set:r=>o.value=r}):e[s]=o}}function ig(t,e,n){Jn(Fe(t)?t.map(s=>s.bind(e.proxy)):t.bind(e.proxy),e,n)}function lv(t,e,n,s){const i=s.includes(".")?yv(n,s):()=>n[s];if(At(t)){const o=e[t];Ye(o)&&Ht(i,o)}else if(Ye(t))Ht(i,t.bind(n));else if(ft(t))if(Fe(t))t.forEach(o=>lv(o,e,n,s));else{const o=Ye(t.handler)?t.handler.bind(n):e[t.handler];Ye(o)&&Ht(i,o,t)}}function Yh(t){const e=t.type,{mixins:n,extends:s}=e,{mixins:i,optionsCache:o,config:{optionMergeStrategies:r}}=t.appContext,a=o.get(e);let l;return a?l=a:!i.length&&!n&&!s?l=e:(l={},i.length&&i.forEach(c=>ac(l,c,r,!0)),ac(l,e,r)),ft(e)&&o.set(e,l),l}function ac(t,e,n,s=!1){const{mixins:i,extends:o}=e;o&&ac(t,o,n,!0),i&&i.forEach(r=>ac(t,r,n,!0));for(const r in e)if(!(s&&r==="expose")){const a=aA[r]||n&&n[r];t[r]=a?a(t[r],e[r]):e[r]}return t}const aA={data:og,props:rg,emits:rg,methods:ea,computed:ea,beforeCreate:pn,created:pn,beforeMount:pn,mounted:pn,beforeUpdate:pn,updated:pn,beforeDestroy:pn,beforeUnmount:pn,destroyed:pn,unmounted:pn,activated:pn,deactivated:pn,errorCaptured:pn,serverPrefetch:pn,components:ea,directives:ea,watch:cA,provide:og,inject:lA};function og(t,e){return e?t?function(){return Ft(Ye(t)?t.call(this,this):t,Ye(e)?e.call(this,this):e)}:e:t}function lA(t,e){return ea(Pd(t),Pd(e))}function Pd(t){if(Fe(t)){const e={};for(let n=0;n1)return n&&Ye(e)?e.call(s&&s.proxy):e}}function hA(){return!!(Zt||Kt||ir)}const uv={},dv=()=>Object.create(uv),hv=t=>Object.getPrototypeOf(t)===uv;function fA(t,e,n,s=!1){const i={},o=dv();t.propsDefaults=Object.create(null),fv(t,e,i,o);for(const r in t.propsOptions[0])r in i||(i[r]=void 0);n?t.props=s?i:zb(i):t.type.props?t.props=i:t.props=o,t.attrs=o}function pA(t,e,n,s){const{props:i,attrs:o,vnode:{patchFlag:r}}=t,a=et(i),[l]=t.propsOptions;let c=!1;if((s||r>0)&&!(r&16)){if(r&8){const u=t.vnode.dynamicProps;for(let d=0;d{l=!0;const[f,g]=pv(d,e,!0);Ft(r,f),g&&a.push(...g)};!n&&e.mixins.length&&e.mixins.forEach(u),t.extends&&u(t.extends),t.mixins&&t.mixins.forEach(u)}if(!o&&!l)return ft(t)&&s.set(t,er),er;if(Fe(o))for(let u=0;u-1,g[1]=m<0||_-1||it(g,"default"))&&a.push(d)}}}const c=[r,a];return ft(t)&&s.set(t,c),c}function ag(t){return t[0]!=="$"&&!la(t)}function lg(t){return t===null?"null":typeof t=="function"?t.name||"":typeof t=="object"&&t.constructor&&t.constructor.name||""}function cg(t,e){return lg(t)===lg(e)}function ug(t,e){return Fe(e)?e.findIndex(n=>cg(n,t)):Ye(e)&&cg(e,t)?0:-1}const gv=t=>t[0]==="_"||t==="$stable",Uh=t=>Fe(t)?t.map(ss):[ss(t)],gA=(t,e,n)=>{if(e._n)return e;const s=Pe((...i)=>Uh(e(...i)),n);return s._c=!1,s},mv=(t,e,n)=>{const s=t._ctx;for(const i in t){if(gv(i))continue;const o=t[i];if(Ye(o))e[i]=gA(i,o,s);else if(o!=null){const r=Uh(o);e[i]=()=>r}}},_v=(t,e)=>{const n=Uh(e);t.slots.default=()=>n},mA=(t,e)=>{const n=t.slots=dv();if(t.vnode.shapeFlag&32){const s=e._;s?(Ft(n,e),Ab(n,"_",s,!0)):mv(e,n)}else e&&_v(t,e)},_A=(t,e,n)=>{const{vnode:s,slots:i}=t;let o=!0,r=vt;if(s.shapeFlag&32){const a=e._;a?n&&a===1?o=!1:(Ft(i,e),!n&&a===1&&delete i._):(o=!e.$stable,mv(e,i)),r=e}else e&&(_v(t,e),r={default:1});if(o)for(const a in i)!gv(a)&&r[a]==null&&delete i[a]};function Dd(t,e,n,s,i=!1){if(Fe(t)){t.forEach((f,g)=>Dd(f,e&&(Fe(e)?e[g]:e),n,s,i));return}if(ca(s)&&!i)return;const o=s.shapeFlag&4?jc(s.component):s.el,r=i?null:o,{i:a,r:l}=t,c=e&&e.r,u=a.refs===vt?a.refs={}:a.refs,d=a.setupState;if(c!=null&&c!==l&&(At(c)?(u[c]=null,it(d,c)&&(d[c]=null)):Mt(c)&&(c.value=null)),Ye(l))Si(l,a,12,[r,u]);else{const f=At(l),g=Mt(l);if(f||g){const _=()=>{if(t.f){const m=f?it(d,l)?d[l]:u[l]:l.value;i?Fe(m)&&Ch(m,o):Fe(m)?m.includes(o)||m.push(o):f?(u[l]=[o],it(d,l)&&(d[l]=u[l])):(l.value=[o],t.k&&(u[t.k]=l.value))}else f?(u[l]=r,it(d,l)&&(d[l]=r)):g&&(l.value=r,t.k&&(u[t.k]=r))};r?(_.id=-1,$n(_,n)):_()}}}const $n=J$;function bA(t){return vA(t)}function vA(t,e){const n=Eb();n.__VUE__=!0;const{insert:s,remove:i,patchProp:o,createElement:r,createText:a,createComment:l,setText:c,setElementText:u,parentNode:d,nextSibling:f,setScopeId:g=Yn,insertStaticContent:_}=t,m=(b,O,j,z=null,oe=null,W=null,ne=void 0,J=null,he=!!O.dynamicChildren)=>{if(b===O)return;b&&!bs(b,O)&&(z=P(b),U(b,oe,W,!0),b=null),O.patchFlag===-2&&(he=!1,O.dynamicChildren=null);const{type:me,ref:pe,shapeFlag:Re}=O;switch(me){case Vc:y(b,O,j,z);break;case dn:v(b,O,j,z);break;case Lu:b==null&&$(O,j,z,ne);break;case Me:X(b,O,j,z,oe,W,ne,J,he);break;default:Re&1?x(b,O,j,z,oe,W,ne,J,he):Re&6?le(b,O,j,z,oe,W,ne,J,he):(Re&64||Re&128)&&me.process(b,O,j,z,oe,W,ne,J,he,we)}pe!=null&&oe&&Dd(pe,b&&b.ref,W,O||b,!O)},y=(b,O,j,z)=>{if(b==null)s(O.el=a(O.children),j,z);else{const oe=O.el=b.el;O.children!==b.children&&c(oe,O.children)}},v=(b,O,j,z)=>{b==null?s(O.el=l(O.children||""),j,z):O.el=b.el},$=(b,O,j,z)=>{[b.el,b.anchor]=_(b.children,O,j,z,b.el,b.anchor)},A=({el:b,anchor:O},j,z)=>{let oe;for(;b&&b!==O;)oe=f(b),s(b,j,z),b=oe;s(O,j,z)},D=({el:b,anchor:O})=>{let j;for(;b&&b!==O;)j=f(b),i(b),b=j;i(O)},x=(b,O,j,z,oe,W,ne,J,he)=>{O.type==="svg"?ne="svg":O.type==="math"&&(ne="mathml"),b==null?w(O,j,z,oe,W,ne,J,he):M(b,O,oe,W,ne,J,he)},w=(b,O,j,z,oe,W,ne,J)=>{let he,me;const{props:pe,shapeFlag:Re,transition:Oe,dirs:Ve}=b;if(he=b.el=r(b.type,W,pe&&pe.is,pe),Re&8?u(he,b.children):Re&16&&T(b.children,he,null,z,oe,Ou(b,W),ne,J),Ve&&Zi(b,null,z,"created"),S(he,b,b.scopeId,ne,z),pe){for(const tt in pe)tt!=="value"&&!la(tt)&&o(he,tt,null,pe[tt],W,b.children,z,oe,ae);"value"in pe&&o(he,"value",null,pe.value,W),(me=pe.onVnodeBeforeMount)&&ps(me,z,b)}Ve&&Zi(b,null,z,"beforeMount");const Be=yA(oe,Oe);Be&&Oe.beforeEnter(he),s(he,O,j),((me=pe&&pe.onVnodeMounted)||Be||Ve)&&$n(()=>{me&&ps(me,z,b),Be&&Oe.enter(he),Ve&&Zi(b,null,z,"mounted")},oe)},S=(b,O,j,z,oe)=>{if(j&&g(b,j),z)for(let W=0;W{for(let me=he;me{const J=O.el=b.el;let{patchFlag:he,dynamicChildren:me,dirs:pe}=O;he|=b.patchFlag&16;const Re=b.props||vt,Oe=O.props||vt;let Ve;if(j&&eo(j,!1),(Ve=Oe.onVnodeBeforeUpdate)&&ps(Ve,j,O,b),pe&&Zi(O,b,j,"beforeUpdate"),j&&eo(j,!0),me?E(b.dynamicChildren,me,J,j,z,Ou(O,oe),W):ne||Z(b,O,J,null,j,z,Ou(O,oe),W,!1),he>0){if(he&16)V(J,O,Re,Oe,j,z,oe);else if(he&2&&Re.class!==Oe.class&&o(J,"class",null,Oe.class,oe),he&4&&o(J,"style",Re.style,Oe.style,oe),he&8){const Be=O.dynamicProps;for(let tt=0;tt{Ve&&ps(Ve,j,O,b),pe&&Zi(O,b,j,"updated")},z)},E=(b,O,j,z,oe,W,ne)=>{for(let J=0;J{if(j!==z){if(j!==vt)for(const J in j)!la(J)&&!(J in z)&&o(b,J,j[J],null,ne,O.children,oe,W,ae);for(const J in z){if(la(J))continue;const he=z[J],me=j[J];he!==me&&J!=="value"&&o(b,J,me,he,ne,O.children,oe,W,ae)}"value"in z&&o(b,"value",j.value,z.value,ne)}},X=(b,O,j,z,oe,W,ne,J,he)=>{const me=O.el=b?b.el:a(""),pe=O.anchor=b?b.anchor:a("");let{patchFlag:Re,dynamicChildren:Oe,slotScopeIds:Ve}=O;Ve&&(J=J?J.concat(Ve):Ve),b==null?(s(me,j,z),s(pe,j,z),T(O.children||[],j,pe,oe,W,ne,J,he)):Re>0&&Re&64&&Oe&&b.dynamicChildren?(E(b.dynamicChildren,Oe,j,oe,W,ne,J),(O.key!=null||oe&&O===oe.subTree)&&qh(b,O,!0)):Z(b,O,j,pe,oe,W,ne,J,he)},le=(b,O,j,z,oe,W,ne,J,he)=>{O.slotScopeIds=J,b==null?O.shapeFlag&512?oe.ctx.activate(O,j,z,ne,he):Y(O,j,z,oe,W,ne,he):R(b,O,he)},Y=(b,O,j,z,oe,W,ne)=>{const J=b.component=NA(b,z,oe);if(Bc(b)&&(J.ctx.renderer=we),FA(J),J.asyncDep){if(oe&&oe.registerDep(J,I,ne),!b.el){const he=J.subTree=N(dn);v(null,he,O,j)}}else I(J,b,O,j,oe,W,ne)},R=(b,O,j)=>{const z=O.component=b.component;if(W$(b,O,j))if(z.asyncDep&&!z.asyncResolved){H(z,O,j);return}else z.next=O,N$(z.update),z.effect.dirty=!0,z.update();else O.el=b.el,z.vnode=O},I=(b,O,j,z,oe,W,ne)=>{const J=()=>{if(b.isMounted){let{next:pe,bu:Re,u:Oe,parent:Ve,vnode:Be}=b;{const Hn=bv(b);if(Hn){pe&&(pe.el=Be.el,H(b,pe,ne)),Hn.asyncDep.then(()=>{b.isUnmounted||J()});return}}let tt=pe,Je;eo(b,!1),pe?(pe.el=Be.el,H(b,pe,ne)):pe=Be,Re&&Yl(Re),(Je=pe.props&&pe.props.onVnodeBeforeUpdate)&&ps(Je,Ve,pe,Be),eo(b,!0);const mt=Mu(b),rn=b.subTree;b.subTree=mt,m(rn,mt,d(rn.el),P(rn),b,oe,W),pe.el=mt.el,tt===null&&Hh(b,mt.el),Oe&&$n(Oe,oe),(Je=pe.props&&pe.props.onVnodeUpdated)&&$n(()=>ps(Je,Ve,pe,Be),oe)}else{let pe;const{el:Re,props:Oe}=O,{bm:Ve,m:Be,parent:tt}=b,Je=ca(O);if(eo(b,!1),Ve&&Yl(Ve),!Je&&(pe=Oe&&Oe.onVnodeBeforeMount)&&ps(pe,tt,O),eo(b,!0),Re&&fe){const mt=()=>{b.subTree=Mu(b),fe(Re,b.subTree,b,oe,null)};Je?O.type.__asyncLoader().then(()=>!b.isUnmounted&&mt()):mt()}else{const mt=b.subTree=Mu(b);m(null,mt,j,z,b,oe,W),O.el=mt.el}if(Be&&$n(Be,oe),!Je&&(pe=Oe&&Oe.onVnodeMounted)){const mt=O;$n(()=>ps(pe,tt,mt),oe)}(O.shapeFlag&256||tt&&ca(tt.vnode)&&tt.vnode.shapeFlag&256)&&b.a&&$n(b.a,oe),b.isMounted=!0,O=j=z=null}},he=b.effect=new Mh(J,Yn,()=>Vh(me),b.scope),me=b.update=()=>{he.dirty&&he.run()};me.id=b.uid,eo(b,!0),me()},H=(b,O,j)=>{O.component=b;const z=b.vnode.props;b.vnode=O,b.next=null,pA(b,O.props,z,j),_A(b,O.children,j),Li(),Zp(b),Ri()},Z=(b,O,j,z,oe,W,ne,J,he=!1)=>{const me=b&&b.children,pe=b?b.shapeFlag:0,Re=O.children,{patchFlag:Oe,shapeFlag:Ve}=O;if(Oe>0){if(Oe&128){ce(me,Re,j,z,oe,W,ne,J,he);return}else if(Oe&256){ee(me,Re,j,z,oe,W,ne,J,he);return}}Ve&8?(pe&16&&ae(me,oe,W),Re!==me&&u(j,Re)):pe&16?Ve&16?ce(me,Re,j,z,oe,W,ne,J,he):ae(me,oe,W,!0):(pe&8&&u(j,""),Ve&16&&T(Re,j,z,oe,W,ne,J,he))},ee=(b,O,j,z,oe,W,ne,J,he)=>{b=b||er,O=O||er;const me=b.length,pe=O.length,Re=Math.min(me,pe);let Oe;for(Oe=0;Oepe?ae(b,oe,W,!0,!1,Re):T(O,j,z,oe,W,ne,J,he,Re)},ce=(b,O,j,z,oe,W,ne,J,he)=>{let me=0;const pe=O.length;let Re=b.length-1,Oe=pe-1;for(;me<=Re&&me<=Oe;){const Ve=b[me],Be=O[me]=he?pi(O[me]):ss(O[me]);if(bs(Ve,Be))m(Ve,Be,j,null,oe,W,ne,J,he);else break;me++}for(;me<=Re&&me<=Oe;){const Ve=b[Re],Be=O[Oe]=he?pi(O[Oe]):ss(O[Oe]);if(bs(Ve,Be))m(Ve,Be,j,null,oe,W,ne,J,he);else break;Re--,Oe--}if(me>Re){if(me<=Oe){const Ve=Oe+1,Be=VeOe)for(;me<=Re;)U(b[me],oe,W,!0),me++;else{const Ve=me,Be=me,tt=new Map;for(me=Be;me<=Oe;me++){const jt=O[me]=he?pi(O[me]):ss(O[me]);jt.key!=null&&tt.set(jt.key,me)}let Je,mt=0;const rn=Oe-Be+1;let Hn=!1,ni=0;const Qn=new Array(rn);for(me=0;me=rn){U(jt,oe,W,!0);continue}let se;if(jt.key!=null)se=tt.get(jt.key);else for(Je=Be;Je<=Oe;Je++)if(Qn[Je-Be]===0&&bs(jt,O[Je])){se=Je;break}se===void 0?U(jt,oe,W,!0):(Qn[se-Be]=me+1,se>=ni?ni=se:Hn=!0,m(jt,O[se],j,null,oe,W,ne,J,he),mt++)}const Ds=Hn?wA(Qn):er;for(Je=Ds.length-1,me=rn-1;me>=0;me--){const jt=Be+me,se=O[jt],$e=jt+1{const{el:W,type:ne,transition:J,children:he,shapeFlag:me}=b;if(me&6){ve(b.component.subTree,O,j,z);return}if(me&128){b.suspense.move(O,j,z);return}if(me&64){ne.move(b,O,j,we);return}if(ne===Me){s(W,O,j);for(let Re=0;ReJ.enter(W),oe);else{const{leave:Re,delayLeave:Oe,afterLeave:Ve}=J,Be=()=>s(W,O,j),tt=()=>{Re(W,()=>{Be(),Ve&&Ve()})};Oe?Oe(W,Be,tt):tt()}else s(W,O,j)},U=(b,O,j,z=!1,oe=!1)=>{const{type:W,props:ne,ref:J,children:he,dynamicChildren:me,shapeFlag:pe,patchFlag:Re,dirs:Oe,memoIndex:Ve}=b;if(J!=null&&Dd(J,null,j,b,!0),Ve!=null&&(O.renderCache[Ve]=void 0),pe&256){O.ctx.deactivate(b);return}const Be=pe&1&&Oe,tt=!ca(b);let Je;if(tt&&(Je=ne&&ne.onVnodeBeforeUnmount)&&ps(Je,O,b),pe&6)te(b.component,j,z);else{if(pe&128){b.suspense.unmount(j,z);return}Be&&Zi(b,null,O,"beforeUnmount"),pe&64?b.type.remove(b,O,j,oe,we,z):me&&(W!==Me||Re>0&&Re&64)?ae(me,O,j,!1,!0):(W===Me&&Re&384||!oe&&pe&16)&&ae(he,O,j),z&&Q(b)}(tt&&(Je=ne&&ne.onVnodeUnmounted)||Be)&&$n(()=>{Je&&ps(Je,O,b),Be&&Zi(b,null,O,"unmounted")},j)},Q=b=>{const{type:O,el:j,anchor:z,transition:oe}=b;if(O===Me){L(j,z);return}if(O===Lu){D(b);return}const W=()=>{i(j),oe&&!oe.persisted&&oe.afterLeave&&oe.afterLeave()};if(b.shapeFlag&1&&oe&&!oe.persisted){const{leave:ne,delayLeave:J}=oe,he=()=>ne(j,W);J?J(b.el,W,he):he()}else W()},L=(b,O)=>{let j;for(;b!==O;)j=f(b),i(b),b=j;i(O)},te=(b,O,j)=>{const{bum:z,scope:oe,update:W,subTree:ne,um:J,m:he,a:me}=b;dg(he),dg(me),z&&Yl(z),oe.stop(),W&&(W.active=!1,U(ne,b,O,j)),J&&$n(J,O),$n(()=>{b.isUnmounted=!0},O),O&&O.pendingBranch&&!O.isUnmounted&&b.asyncDep&&!b.asyncResolved&&b.suspenseId===O.pendingId&&(O.deps--,O.deps===0&&O.resolve())},ae=(b,O,j,z=!1,oe=!1,W=0)=>{for(let ne=W;neb.shapeFlag&6?P(b.component.subTree):b.shapeFlag&128?b.suspense.next():f(b.anchor||b.el);let ie=!1;const de=(b,O,j)=>{b==null?O._vnode&&U(O._vnode,null,null,!0):m(O._vnode||null,b,O,null,null,null,j),ie||(ie=!0,Zp(),Zb(),ie=!1),O._vnode=b},we={p:m,um:U,m:ve,r:Q,mt:Y,mc:T,pc:Z,pbc:E,n:P,o:t};let B,fe;return e&&([B,fe]=e(we)),{render:de,hydrate:B,createApp:dA(de,B)}}function Ou({type:t,props:e},n){return n==="svg"&&t==="foreignObject"||n==="mathml"&&t==="annotation-xml"&&e&&e.encoding&&e.encoding.includes("html")?void 0:n}function eo({effect:t,update:e},n){t.allowRecurse=e.allowRecurse=n}function yA(t,e){return(!t||t&&!t.pendingBranch)&&e&&!e.persisted}function qh(t,e,n=!1){const s=t.children,i=e.children;if(Fe(s)&&Fe(i))for(let o=0;o>1,t[n[a]]0&&(e[s]=n[o-1]),n[o]=s)}}for(o=n.length,r=n[o-1];o-- >0;)n[o]=r,r=e[r];return n}function bv(t){const e=t.subTree.component;if(e)return e.asyncDep&&!e.asyncResolved?e:bv(e)}function dg(t){if(t)for(let e=0;eas(xA),xl={};function Ht(t,e,n){return vv(t,e,n)}function vv(t,e,{immediate:n,deep:s,flush:i,once:o,onTrack:r,onTrigger:a}=vt){if(e&&o){const w=e;e=(...S)=>{w(...S),x()}}const l=Zt,c=w=>s===!0?w:mi(w,s===!1?1:void 0);let u,d=!1,f=!1;if(Mt(t)?(u=()=>t.value,d=oc(t)):_o(t)?(u=()=>c(t),d=!0):Fe(t)?(f=!0,d=t.some(w=>_o(w)||oc(w)),u=()=>t.map(w=>{if(Mt(w))return w.value;if(_o(w))return c(w);if(Ye(w))return Si(w,l,2)})):Ye(t)?e?u=()=>Si(t,l,2):u=()=>(g&&g(),Jn(t,l,3,[_])):u=Yn,e&&s){const w=u;u=()=>mi(w())}let g,_=w=>{g=A.onStop=()=>{Si(w,l,4),g=A.onStop=void 0}},m;if(Hc)if(_=Yn,e?n&&Jn(e,l,3,[u(),f?[]:void 0,_]):u(),i==="sync"){const w=kA();m=w.__watcherHandles||(w.__watcherHandles=[])}else return Yn;let y=f?new Array(t.length).fill(xl):xl;const v=()=>{if(!(!A.active||!A.dirty))if(e){const w=A.run();(s||d||(f?w.some((S,T)=>Ei(S,y[T])):Ei(w,y)))&&(g&&g(),Jn(e,l,3,[w,y===xl?void 0:f&&y[0]===xl?[]:y,_]),y=w)}else A.run()};v.allowRecurse=!!e;let $;i==="sync"?$=v:i==="post"?$=()=>$n(v,l&&l.suspense):(v.pre=!0,l&&(v.id=l.uid),$=()=>Vh(v));const A=new Mh(u,Yn,$),D=Dc(),x=()=>{A.stop(),D&&Ch(D.effects,A)};return e?n?v():y=A.run():i==="post"?$n(A.run.bind(A),l&&l.suspense):A.run(),m&&m.push(x),x}function SA(t,e,n){const s=this.proxy,i=At(t)?t.includes(".")?yv(s,t):()=>s[t]:t.bind(s,s);let o;Ye(e)?o=e:(o=e.handler,n=e);const r=Ua(this),a=vv(i,o.bind(s),n);return r(),a}function yv(t,e){const n=e.split(".");return()=>{let s=t;for(let i=0;i{mi(s,e,n)});else if($b(t)){for(const s in t)mi(t[s],e,n);for(const s of Object.getOwnPropertySymbols(t))Object.prototype.propertyIsEnumerable.call(t,s)&&mi(t[s],e,n)}return t}const Bc=t=>t.type.__isKeepAlive;function $A(t,e){wv(t,"a",e)}function AA(t,e){wv(t,"da",e)}function wv(t,e,n=Zt){const s=t.__wdc||(t.__wdc=()=>{let i=n;for(;i;){if(i.isDeactivated)return;i=i.parent}return t()});if(Fc(e,s,n),n){let i=n.parent;for(;i&&i.parent;)Bc(i.parent.vnode)&&CA(s,e,n,i),i=i.parent}}function CA(t,e,n,s){const i=Fc(e,t,s,!0);Dr(()=>{Ch(s[e],i)},n)}const fi=Symbol("_leaveCb"),kl=Symbol("_enterCb");function xv(){const t={isMounted:!1,isLeaving:!1,isUnmounting:!1,leavingVNodes:new Map};return Jt(()=>{t.isMounted=!0}),Kh(()=>{t.isUnmounting=!0}),t}const zn=[Function,Array],kv={mode:String,appear:Boolean,persisted:Boolean,onBeforeEnter:zn,onEnter:zn,onAfterEnter:zn,onEnterCancelled:zn,onBeforeLeave:zn,onLeave:zn,onAfterLeave:zn,onLeaveCancelled:zn,onBeforeAppear:zn,onAppear:zn,onAfterAppear:zn,onAppearCancelled:zn},Sv=t=>{const e=t.subTree;return e.component?Sv(e.component):e},EA={name:"BaseTransition",props:kv,setup(t,{slots:e}){const n=Xh(),s=xv();return()=>{const i=e.default&&Gh(e.default(),!0);if(!i||!i.length)return;let o=i[0];if(i.length>1){for(const f of i)if(f.type!==dn){o=f;break}}const r=et(t),{mode:a}=r;if(s.isLeaving)return Iu(o);const l=hg(o);if(!l)return Iu(o);let c=Ta(l,r,s,n,f=>c=f);dr(l,c);const u=n.subTree,d=u&&hg(u);if(d&&d.type!==dn&&!bs(l,d)&&Sv(n).type!==dn){const f=Ta(d,r,s,n);if(dr(d,f),a==="out-in"&&l.type!==dn)return s.isLeaving=!0,f.afterLeave=()=>{s.isLeaving=!1,n.update.active!==!1&&(n.effect.dirty=!0,n.update())},Iu(o);a==="in-out"&&l.type!==dn&&(f.delayLeave=(g,_,m)=>{const y=$v(s,d);y[String(d.key)]=d,g[fi]=()=>{_(),g[fi]=void 0,delete c.delayedLeave},c.delayedLeave=m})}return o}}},TA=EA;function $v(t,e){const{leavingVNodes:n}=t;let s=n.get(e.type);return s||(s=Object.create(null),n.set(e.type,s)),s}function Ta(t,e,n,s,i){const{appear:o,mode:r,persisted:a=!1,onBeforeEnter:l,onEnter:c,onAfterEnter:u,onEnterCancelled:d,onBeforeLeave:f,onLeave:g,onAfterLeave:_,onLeaveCancelled:m,onBeforeAppear:y,onAppear:v,onAfterAppear:$,onAppearCancelled:A}=e,D=String(t.key),x=$v(n,t),w=(M,E)=>{M&&Jn(M,s,9,E)},S=(M,E)=>{const V=E[1];w(M,E),Fe(M)?M.every(X=>X.length<=1)&&V():M.length<=1&&V()},T={mode:r,persisted:a,beforeEnter(M){let E=l;if(!n.isMounted)if(o)E=y||l;else return;M[fi]&&M[fi](!0);const V=x[D];V&&bs(t,V)&&V.el[fi]&&V.el[fi](),w(E,[M])},enter(M){let E=c,V=u,X=d;if(!n.isMounted)if(o)E=v||c,V=$||u,X=A||d;else return;let le=!1;const Y=M[kl]=R=>{le||(le=!0,R?w(X,[M]):w(V,[M]),T.delayedLeave&&T.delayedLeave(),M[kl]=void 0)};E?S(E,[M,Y]):Y()},leave(M,E){const V=String(t.key);if(M[kl]&&M[kl](!0),n.isUnmounting)return E();w(f,[M]);let X=!1;const le=M[fi]=Y=>{X||(X=!0,E(),Y?w(m,[M]):w(_,[M]),M[fi]=void 0,x[V]===t&&delete x[V])};x[V]=t,g?S(g,[M,le]):le()},clone(M){const E=Ta(M,e,n,s,i);return i&&i(E),E}};return T}function Iu(t){if(Bc(t))return t=Ti(t),t.children=null,t}function hg(t){if(!Bc(t))return t;const{shapeFlag:e,children:n}=t;if(n){if(e&16)return n[0];if(e&32&&Ye(n.default))return n.default()}}function dr(t,e){t.shapeFlag&6&&t.component?dr(t.component.subTree,e):t.shapeFlag&128?(t.ssContent.transition=e.clone(t.ssContent),t.ssFallback.transition=e.clone(t.ssFallback)):t.transition=e}function Gh(t,e=!1,n){let s=[],i=0;for(let o=0;o1)for(let o=0;ot.__isTeleport,da=t=>t&&(t.disabled||t.disabled===""),fg=t=>typeof SVGElement<"u"&&t instanceof SVGElement,pg=t=>typeof MathMLElement=="function"&&t instanceof MathMLElement,Od=(t,e)=>{const n=t&&t.to;return At(n)?e?e(n):null:n},MA={name:"Teleport",__isTeleport:!0,process(t,e,n,s,i,o,r,a,l,c){const{mc:u,pc:d,pbc:f,o:{insert:g,querySelector:_,createText:m,createComment:y}}=c,v=da(e.props);let{shapeFlag:$,children:A,dynamicChildren:D}=e;if(t==null){const x=e.el=m(""),w=e.anchor=m("");g(x,n,s),g(w,n,s);const S=e.target=Od(e.props,_),T=e.targetAnchor=m("");S&&(g(T,S),r==="svg"||fg(S)?r="svg":(r==="mathml"||pg(S))&&(r="mathml"));const M=(E,V)=>{$&16&&u(A,E,V,i,o,r,a,l)};v?M(n,w):S&&M(S,T)}else{e.el=t.el;const x=e.anchor=t.anchor,w=e.target=t.target,S=e.targetAnchor=t.targetAnchor,T=da(t.props),M=T?n:w,E=T?x:S;if(r==="svg"||fg(w)?r="svg":(r==="mathml"||pg(w))&&(r="mathml"),D?(f(t.dynamicChildren,D,M,i,o,r,a),qh(t,e,!0)):l||d(t,e,M,E,i,o,r,a,!1),v)T?e.props&&t.props&&e.props.to!==t.props.to&&(e.props.to=t.props.to):Sl(e,n,x,c,1);else if((e.props&&e.props.to)!==(t.props&&t.props.to)){const V=e.target=Od(e.props,_);V&&Sl(e,V,null,c,0)}else T&&Sl(e,w,S,c,1)}Av(e)},remove(t,e,n,s,{um:i,o:{remove:o}},r){const{shapeFlag:a,children:l,anchor:c,targetAnchor:u,target:d,props:f}=t;if(d&&o(u),r&&o(c),a&16){const g=r||!da(f);for(let _=0;_0?Un||er:null,Cv(),hr>0&&Un&&Un.push(t),t}function F(t,e,n,s,i,o){return Ev(h(t,e,n,s,i,o,!0))}function Se(t,e,n,s,i){return Ev(N(t,e,n,s,i,!0))}function Pa(t){return t?t.__v_isVNode===!0:!1}function bs(t,e){return t.type===e.type&&t.key===e.key}const Tv=({key:t})=>t??null,Gl=({ref:t,ref_key:e,ref_for:n})=>(typeof t=="number"&&(t=""+t),t!=null?At(t)||Mt(t)||Ye(t)?{i:Kt,r:t,k:e,f:!!n}:t:null);function h(t,e=null,n=null,s=0,i=null,o=t===Me?0:1,r=!1,a=!1){const l={__v_isVNode:!0,__v_skip:!0,type:t,props:e,key:e&&Tv(e),ref:e&&Gl(e),scopeId:Nc,slotScopeIds:null,children:n,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetAnchor:null,staticCount:0,shapeFlag:o,patchFlag:s,dynamicProps:i,dynamicChildren:null,appContext:null,ctx:Kt};return a?(Jh(l,n),o&128&&t.normalize(l)):n&&(l.shapeFlag|=At(n)?8:16),hr>0&&!r&&Un&&(l.patchFlag>0||o&6)&&l.patchFlag!==32&&Un.push(l),l}const N=IA;function IA(t,e=null,n=null,s=0,i=null,o=!1){if((!t||t===nv)&&(t=dn),Pa(t)){const a=Ti(t,e,!0);return n&&Jh(a,n),hr>0&&!o&&Un&&(a.shapeFlag&6?Un[Un.indexOf(t)]=a:Un.push(a)),a.patchFlag=-2,a}if(jA(t)&&(t=t.__vccOpts),e){e=mn(e);let{class:a,style:l}=e;a&&!At(a)&&(e.class=Ee(a)),ft(l)&&(Ic(l)&&!Fe(l)&&(l=Ft({},l)),e.style=zt(l))}const r=At(t)?1:z$(t)?128:PA(t)?64:ft(t)?4:Ye(t)?2:0;return h(t,e,n,s,i,r,o,!0)}function mn(t){return t?Ic(t)||hv(t)?Ft({},t):t:null}function Ti(t,e,n=!1,s=!1){const{props:i,ref:o,patchFlag:r,children:a,transition:l}=t,c=e?Yt(i||{},e):i,u={__v_isVNode:!0,__v_skip:!0,type:t.type,props:c,key:c&&Tv(c),ref:e&&e.ref?n&&o?Fe(o)?o.concat(Gl(e)):[o,Gl(e)]:Gl(e):o,scopeId:t.scopeId,slotScopeIds:t.slotScopeIds,children:a,target:t.target,targetAnchor:t.targetAnchor,staticCount:t.staticCount,shapeFlag:t.shapeFlag,patchFlag:e&&t.type!==Me?r===-1?16:r|16:r,dynamicProps:t.dynamicProps,dynamicChildren:t.dynamicChildren,appContext:t.appContext,dirs:t.dirs,transition:l,component:t.component,suspense:t.suspense,ssContent:t.ssContent&&Ti(t.ssContent),ssFallback:t.ssFallback&&Ti(t.ssFallback),el:t.el,anchor:t.anchor,ctx:t.ctx,ce:t.ce};return l&&s&&dr(u,l.clone(u)),u}function He(t=" ",e=0){return N(Vc,null,t,e)}function re(t="",e=!1){return e?(C(),Se(dn,null,t)):N(dn,null,t)}function ss(t){return t==null||typeof t=="boolean"?N(dn):Fe(t)?N(Me,null,t.slice()):typeof t=="object"?pi(t):N(Vc,null,String(t))}function pi(t){return t.el===null&&t.patchFlag!==-1||t.memo?t:Ti(t)}function Jh(t,e){let n=0;const{shapeFlag:s}=t;if(e==null)e=null;else if(Fe(e))n=16;else if(typeof e=="object")if(s&65){const i=e.default;i&&(i._c&&(i._d=!1),Jh(t,i()),i._c&&(i._d=!0));return}else{n=32;const i=e._;!i&&!hv(e)?e._ctx=Kt:i===3&&Kt&&(Kt.slots._===1?e._=1:(e._=2,t.patchFlag|=1024))}else Ye(e)?(e={default:e,_ctx:Kt},n=32):(e=String(e),s&64?(n=16,e=[He(e)]):n=8);t.children=e,t.shapeFlag|=n}function Yt(...t){const e={};for(let n=0;nZt||Kt;let lc,Id;{const t=Eb(),e=(n,s)=>{let i;return(i=t[n])||(i=t[n]=[]),i.push(s),o=>{i.length>1?i.forEach(r=>r(o)):i[0](o)}};lc=e("__VUE_INSTANCE_SETTERS__",n=>Zt=n),Id=e("__VUE_SSR_SETTERS__",n=>Hc=n)}const Ua=t=>{const e=Zt;return lc(t),t.scope.on(),()=>{t.scope.off(),lc(e)}},mg=()=>{Zt&&Zt.scope.off(),lc(null)};function Pv(t){return t.vnode.shapeFlag&4}let Hc=!1;function FA(t,e=!1){e&&Id(e);const{props:n,children:s}=t.vnode,i=Pv(t);fA(t,n,i,e),mA(t,s);const o=i?BA(t,e):void 0;return e&&Id(!1),o}function BA(t,e){const n=t.type;t.accessCache=Object.create(null),t.proxy=new Proxy(t.ctx,sA);const{setup:s}=n;if(s){const i=t.setupContext=s.length>1?Dv(t):null,o=Ua(t);Li();const r=Si(s,t,0,[t.props,i]);if(Ri(),o(),kb(r)){if(r.then(mg,mg),e)return r.then(a=>{Ld(t,a,e)}).catch(a=>{Ya(a,t,0)});t.asyncDep=r}else Ld(t,r,e)}else Mv(t,e)}function Ld(t,e,n){Ye(e)?t.type.__ssrInlineRender?t.ssrRender=e:t.render=e:ft(e)&&(t.setupState=Gb(e)),Mv(t,n)}let _g;function Mv(t,e,n){const s=t.type;if(!t.render){if(!e&&_g&&!s.render){const i=s.template||Yh(t).template;if(i){const{isCustomElement:o,compilerOptions:r}=t.appContext.config,{delimiters:a,compilerOptions:l}=s,c=Ft(Ft({isCustomElement:o,delimiters:a},r),l);s.render=_g(i,c)}}t.render=s.render||Yn}{const i=Ua(t);Li();try{oA(t)}finally{Ri(),i()}}}const VA={get(t,e){return Tn(t,"get",""),t[e]}};function Dv(t){const e=n=>{t.exposed=n||{}};return{attrs:new Proxy(t.attrs,VA),slots:t.slots,emit:t.emit,expose:e}}function jc(t){return t.exposed?t.exposeProxy||(t.exposeProxy=new Proxy(Gb(Lc(t.exposed)),{get(e,n){if(n in e)return e[n];if(n in ua)return ua[n](t)},has(e,n){return n in e||n in ua}})):t.proxy}function HA(t,e=!0){return Ye(t)?t.displayName||t.name:t.name||e&&t.__name}function jA(t){return Ye(t)&&"__vccOpts"in t}const _e=(t,e)=>T$(t,e,Hc);function $o(t,e,n){const s=arguments.length;return s===2?ft(e)&&!Fe(e)?Pa(e)?N(t,null,[e]):N(t,e):N(t,null,e):(s>3?n=Array.prototype.slice.call(arguments,2):s===3&&Pa(n)&&(n=[n]),N(t,e,n))}const Ov="3.4.29";/** +**/function Jr(t,e,n,i){try{return i?t(...i):t()}catch(s){$u(s,e,n)}}function ji(t,e,n,i){if(qe(t)){const s=Jr(t,e,n,i);return s&&Dx(s)&&s.catch(r=>{$u(r,e,n)}),s}if(We(t)){const s=[];for(let r=0;r>>1,s=Wn[i],r=Qc(s);rbs&&Wn.splice(e,1)}function Op(t){We(t)?il.push(...t):(!Nr||!Nr.includes(t,t.allowRecurse?Yo+1:Yo))&&il.push(t),lE()}function cv(t,e,n=Jc?bs+1:0){for(;nQc(n)-Qc(i));if(il.length=0,Nr){Nr.push(...e);return}for(Nr=e,Yo=0;Yot.id==null?1/0:t.id,oR=(t,e)=>{const n=Qc(t)-Qc(e);if(n===0){if(t.pre&&!e.pre)return-1;if(e.pre&&!t.pre)return 1}return n};function uE(t){Lp=!1,Jc=!0,Wn.sort(oR);try{for(bs=0;bsKt(f)?f.trim():f)),d&&(s=n.map(ch))}let a,l=i[a=yg(e)]||i[a=yg(Ls(e))];!l&&r&&(l=i[a=yg(fa(e))]),l&&ji(l,t,6,s);const c=i[a+"Once"];if(c){if(!t.emitted)t.emitted={};else if(t.emitted[a])return;t.emitted[a]=!0,ji(c,t,6,s)}}function dE(t,e,n=!1){const i=e.emitsCache,s=i.get(t);if(s!==void 0)return s;const r=t.emits;let o={},a=!1;if(!qe(t)){const l=c=>{const u=dE(c,e,!0);u&&(a=!0,ln(o,u))};!n&&e.mixins.length&&e.mixins.forEach(l),t.extends&&l(t.extends),t.mixins&&t.mixins.forEach(l)}return!r&&!a?(At(t)&&i.set(t,null),null):(We(r)?r.forEach(l=>o[l]=null):ln(o,r),At(t)&&i.set(t,o),o)}function rf(t,e){return!t||!Zh(e)?!1:(e=e.slice(2).replace(/Once$/,""),ht(t,e[0].toLowerCase()+e.slice(1))||ht(t,fa(e))||ht(t,e))}let _n=null,of=null;function hh(t){const e=_n;return _n=t,of=t&&t.type.__scopeId||null,e}function bn(t){of=t}function wn(){of=null}function Re(t,e=_n,n){if(!e||t._n)return t;const i=(...s)=>{i._d&&Cv(-1);const r=hh(e);let o;try{o=t(...s)}finally{hh(r),i._d&&Cv(1)}return o};return i._n=!0,i._c=!0,i._d=!0,i}function bg(t){const{type:e,vnode:n,proxy:i,withProxy:s,propsOptions:[r],slots:o,attrs:a,emit:l,render:c,renderCache:u,props:d,data:h,setupState:f,ctx:p,inheritAttrs:m}=t,y=hh(t);let v,b;try{if(n.shapeFlag&4){const C=s||i,w=C;v=ns(c.call(w,C,u,d,f,h,p)),b=a}else{const C=e;v=ns(C.length>1?C(d,{attrs:a,slots:o,emit:l}):C(d,null)),b=e.props?a:cR(a)}}catch(C){Nc.length=0,$u(C,t,1),v=B(Hn)}let E=v;if(b&&m!==!1){const C=Object.keys(b),{shapeFlag:w}=E;C.length&&w&7&&(r&&C.some(qm)&&(b=uR(b,r)),E=so(E,b,!1,!0))}return n.dirs&&(E=so(E,null,!1,!0),E.dirs=E.dirs?E.dirs.concat(n.dirs):n.dirs),n.transition&&(E.transition=n.transition),v=E,hh(y),v}function lR(t,e=!0){let n;for(let i=0;i{let e;for(const n in t)(n==="class"||n==="style"||Zh(n))&&((e||(e={}))[n]=t[n]);return e},uR=(t,e)=>{const n={};for(const i in t)(!qm(i)||!(i.slice(9)in e))&&(n[i]=t[i]);return n};function dR(t,e,n){const{props:i,children:s,component:r}=t,{props:o,children:a,patchFlag:l}=e,c=r.emitsOptions;if(e.dirs||e.transition)return!0;if(n&&l>=0){if(l&1024)return!0;if(l&16)return i?uv(i,o,c):!!o;if(l&8){const u=e.dynamicProps;for(let d=0;dt.__isSuspense;let Np=0;const fR={name:"Suspense",__isSuspense:!0,process(t,e,n,i,s,r,o,a,l,c){if(t==null)gR(e,n,i,s,r,o,a,l,c);else{if(r&&r.deps>0&&!t.suspense.isInFallback){e.suspense=t.suspense,e.suspense.vnode=e,e.el=t.el;return}pR(t,e,n,i,s,o,a,l,c)}},hydrate:mR,create:g_,normalize:_R},f_=fR;function eu(t,e){const n=t.props&&t.props[e];qe(n)&&n()}function gR(t,e,n,i,s,r,o,a,l){const{p:c,o:{createElement:u}}=l,d=u("div"),h=t.suspense=g_(t,s,i,e,d,n,r,o,a,l);c(null,h.pendingBranch=t.ssContent,d,null,i,h,r,o),h.deps>0?(eu(t,"onPending"),eu(t,"onFallback"),c(null,t.ssFallback,e,n,i,null,r,o),sl(h,t.ssFallback)):h.resolve(!1,!0)}function pR(t,e,n,i,s,r,o,a,{p:l,um:c,o:{createElement:u}}){const d=e.suspense=t.suspense;d.vnode=e,e.el=t.el;const h=e.ssContent,f=e.ssFallback,{activeBranch:p,pendingBranch:m,isInFallback:y,isHydrating:v}=d;if(m)d.pendingBranch=h,ws(h,m)?(l(m,h,d.hiddenContainer,null,s,d,r,o,a),d.deps<=0?d.resolve():y&&(v||(l(p,f,n,i,s,null,r,o,a),sl(d,f)))):(d.pendingId=Np++,v?(d.isHydrating=!1,d.activeBranch=m):c(m,s,d),d.deps=0,d.effects.length=0,d.hiddenContainer=u("div"),y?(l(null,h,d.hiddenContainer,null,s,d,r,o,a),d.deps<=0?d.resolve():(l(p,f,n,i,s,null,r,o,a),sl(d,f))):p&&ws(h,p)?(l(p,h,n,i,s,d,r,o,a),d.resolve(!0)):(l(null,h,d.hiddenContainer,null,s,d,r,o,a),d.deps<=0&&d.resolve()));else if(p&&ws(h,p))l(p,h,n,i,s,d,r,o,a),sl(d,h);else if(eu(e,"onPending"),d.pendingBranch=h,h.shapeFlag&512?d.pendingId=h.component.suspenseId:d.pendingId=Np++,l(null,h,d.hiddenContainer,null,s,d,r,o,a),d.deps<=0)d.resolve();else{const{timeout:b,pendingId:E}=d;b>0?setTimeout(()=>{d.pendingId===E&&d.fallback(f)},b):b===0&&d.fallback(f)}}function g_(t,e,n,i,s,r,o,a,l,c,u=!1){const{p:d,m:h,um:f,n:p,o:{parentNode:m,remove:y}}=c;let v;const b=vR(t);b&&e&&e.pendingBranch&&(v=e.pendingId,e.deps++);const E=t.props?Nx(t.props.timeout):void 0,C=r,w={vnode:t,parent:e,parentComponent:n,namespace:o,container:i,hiddenContainer:s,deps:0,pendingId:Np++,timeout:typeof E=="number"?E:-1,activeBranch:null,pendingBranch:null,isInFallback:!u,isHydrating:u,isUnmounted:!1,effects:[],resolve(x=!1,T=!1){const{vnode:k,activeBranch:A,pendingBranch:P,pendingId:F,effects:H,parentComponent:te,container:N}=w;let L=!1;w.isHydrating?w.isHydrating=!1:x||(L=A&&P.transition&&P.transition.mode==="out-in",L&&(A.transition.afterLeave=()=>{F===w.pendingId&&(h(P,N,r===C?p(A):r,0),Op(H))}),A&&(m(A.el)!==w.hiddenContainer&&(r=p(A)),f(A,te,w,!0)),L||h(P,N,r,0)),sl(w,P),w.pendingBranch=null,w.isInFallback=!1;let I=w.parent,W=!1;for(;I;){if(I.pendingBranch){I.effects.push(...H),W=!0;break}I=I.parent}!W&&!L&&Op(H),w.effects=[],b&&e&&e.pendingBranch&&v===e.pendingId&&(e.deps--,e.deps===0&&!T&&e.resolve()),eu(k,"onResolve")},fallback(x){if(!w.pendingBranch)return;const{vnode:T,activeBranch:k,parentComponent:A,container:P,namespace:F}=w;eu(T,"onFallback");const H=p(k),te=()=>{w.isInFallback&&(d(null,x,P,H,A,null,F,a,l),sl(w,x))},N=x.transition&&x.transition.mode==="out-in";N&&(k.transition.afterLeave=te),w.isInFallback=!0,f(k,A,null,!0),N||te()},move(x,T,k){w.activeBranch&&h(w.activeBranch,x,T,k),w.container=x},next(){return w.activeBranch&&p(w.activeBranch)},registerDep(x,T,k){const A=!!w.pendingBranch;A&&w.deps++;const P=x.vnode.el;x.asyncDep.catch(F=>{$u(F,x,0)}).then(F=>{if(x.isUnmounted||w.isUnmounted||w.pendingId!==x.suspenseId)return;x.asyncResolved=!0;const{vnode:H}=x;jp(x,F,!1),P&&(H.el=P);const te=!P&&x.subTree.el;T(x,H,m(P||x.subTree.el),P?null:p(x.subTree),w,o,k),te&&y(te),d_(x,H.el),A&&--w.deps===0&&w.resolve()})},unmount(x,T){w.isUnmounted=!0,w.activeBranch&&f(w.activeBranch,n,x,T),w.pendingBranch&&f(w.pendingBranch,n,x,T)}};return w}function mR(t,e,n,i,s,r,o,a,l){const c=e.suspense=g_(e,i,n,t.parentNode,document.createElement("div"),null,s,r,o,a,!0),u=l(t,c.pendingBranch=e.ssContent,n,c,r,o);return c.deps===0&&c.resolve(!1,!0),u}function _R(t){const{shapeFlag:e,children:n}=t,i=e&32;t.ssContent=hv(i?n.default:n),t.ssFallback=i?hv(n.fallback):B(Hn)}function hv(t){let e;if(qe(t)){const n=_l&&t._c;n&&(t._d=!1,D()),t=t(),n&&(t._d=!0,e=zi,NE())}return We(t)&&(t=lR(t)),t=ns(t),e&&!t.dynamicChildren&&(t.dynamicChildren=e.filter(n=>n!==t)),t}function yR(t,e){e&&e.pendingBranch?We(t)?e.effects.push(...t):e.effects.push(t):Op(t)}function sl(t,e){t.activeBranch=e;const{vnode:n,parentComponent:i}=t;let s=e.el;for(;!s&&e.component;)e=e.component.subTree,s=e.el;n.el=s,i&&i.subTree===n&&(i.vnode.el=s,d_(i,s))}function vR(t){const e=t.props&&t.props.suspensible;return e!=null&&e!==!1}function af(t,e,n=An,i=!1){if(n){const s=n[t]||(n[t]=[]),r=e.__weh||(e.__weh=(...o)=>{fo();const a=Lu(n),l=ji(e,n,t,o);return a(),go(),l});return i?s.unshift(r):s.push(r),r}}const yr=t=>(e,n=An)=>{(!uf||t==="sp")&&af(t,(...i)=>e(...i),n)},bR=yr("bm"),xn=yr("m"),gE=yr("bu"),pE=yr("u"),p_=yr("bum"),Yl=yr("um"),wR=yr("sp"),xR=yr("rtg"),ER=yr("rtc");function SR(t,e=An){af("ec",t,e)}function Ne(t,e){if(_n===null)return t;const n=df(_n),i=t.dirs||(t.dirs=[]);for(let s=0;se(o,a,void 0,r&&r[a]));else{const o=Object.keys(t);s=new Array(o.length);for(let a=0,l=o.length;a{const r=i.fn(...s);return r&&(r.key=i.key),r}:i.fn)}return t}/*! #__NO_SIDE_EFFECTS__ */function cn(t,e){return qe(t)?ln({name:t.name},e,{setup:t}):t}const $c=t=>!!t.type.__asyncLoader;function Oe(t,e,n={},i,s){if(_n.isCE||_n.parent&&$c(_n.parent)&&_n.parent.isCE)return e!=="default"&&(n.name=e),B("slot",n,i&&i());let r=t[e];r&&r._c&&(r._d=!1),D();const o=r&&mE(r(n)),a=Ce($e,{key:n.key||o&&o.key||`_${e}`},o||(i?i():[]),o&&t._===1?64:-2);return!s&&a.scopeId&&(a.slotScopeIds=[a.scopeId+"-s"]),r&&r._c&&(r._d=!0),a}function mE(t){return t.some(e=>nu(e)?!(e.type===Hn||e.type===$e&&!mE(e.children)):!0)?t:null}const Fp=t=>t?VE(t)?df(t):Fp(t.parent):null,Lc=ln(Object.create(null),{$:t=>t,$el:t=>t.vnode.el,$data:t=>t.data,$props:t=>t.props,$attrs:t=>t.attrs,$slots:t=>t.slots,$refs:t=>t.refs,$parent:t=>Fp(t.parent),$root:t=>Fp(t.root),$emit:t=>t.emit,$options:t=>m_(t),$forceUpdate:t=>t.f||(t.f=()=>{t.effect.dirty=!0,u_(t.update)}),$nextTick:t=>t.n||(t.n=Rn.bind(t.proxy)),$watch:t=>KR.bind(t)}),wg=(t,e)=>t!==Ot&&!t.__isScriptSetup&&ht(t,e),CR={get({_:t},e){if(e==="__v_skip")return!0;const{ctx:n,setupState:i,data:s,props:r,accessCache:o,type:a,appContext:l}=t;let c;if(e[0]!=="$"){const f=o[e];if(f!==void 0)switch(f){case 1:return i[e];case 2:return s[e];case 4:return n[e];case 3:return r[e]}else{if(wg(i,e))return o[e]=1,i[e];if(s!==Ot&&ht(s,e))return o[e]=2,s[e];if((c=t.propsOptions[0])&&ht(c,e))return o[e]=3,r[e];if(n!==Ot&&ht(n,e))return o[e]=4,n[e];Bp&&(o[e]=0)}}const u=Lc[e];let d,h;if(u)return e==="$attrs"&&yi(t.attrs,"get",""),u(t);if((d=a.__cssModules)&&(d=d[e]))return d;if(n!==Ot&&ht(n,e))return o[e]=4,n[e];if(h=l.config.globalProperties,ht(h,e))return h[e]},set({_:t},e,n){const{data:i,setupState:s,ctx:r}=t;return wg(s,e)?(s[e]=n,!0):i!==Ot&&ht(i,e)?(i[e]=n,!0):ht(t.props,e)||e[0]==="$"&&e.slice(1)in t?!1:(r[e]=n,!0)},has({_:{data:t,setupState:e,accessCache:n,ctx:i,appContext:s,propsOptions:r}},o){let a;return!!n[o]||t!==Ot&&ht(t,o)||wg(e,o)||(a=r[0])&&ht(a,o)||ht(i,o)||ht(Lc,o)||ht(s.config.globalProperties,o)},defineProperty(t,e,n){return n.get!=null?t._.accessCache[e]=0:ht(n,"value")&&this.set(t,e,n.value,null),Reflect.defineProperty(t,e,n)}};function pa(){return _E().slots}function TR(){return _E().attrs}function _E(){const t=w_();return t.setupContext||(t.setupContext=WE(t))}function fv(t){return We(t)?t.reduce((e,n)=>(e[n]=null,e),{}):t}let Bp=!0;function kR(t){const e=m_(t),n=t.proxy,i=t.ctx;Bp=!1,e.beforeCreate&&gv(e.beforeCreate,t,"bc");const{data:s,computed:r,methods:o,watch:a,provide:l,inject:c,created:u,beforeMount:d,mounted:h,beforeUpdate:f,updated:p,activated:m,deactivated:y,beforeDestroy:v,beforeUnmount:b,destroyed:E,unmounted:C,render:w,renderTracked:x,renderTriggered:T,errorCaptured:k,serverPrefetch:A,expose:P,inheritAttrs:F,components:H,directives:te,filters:N}=e;if(c&&AR(c,i,null),o)for(const W in o){const X=o[W];qe(X)&&(i[W]=X.bind(n))}if(s){const W=s.call(n,n);At(W)&&(t.data=Ns(W))}if(Bp=!0,r)for(const W in r){const X=r[W],J=qe(X)?X.bind(n,n):qe(X.get)?X.get.bind(n,n):Vi,ne=!qe(X)&&qe(X.set)?X.set.bind(n):Vi,ue=be({get:J,set:ne});Object.defineProperty(i,W,{enumerable:!0,configurable:!0,get:()=>ue.value,set:Y=>ue.value=Y})}if(a)for(const W in a)yE(a[W],i,n,W);if(l){const W=qe(l)?l.call(n):l;Reflect.ownKeys(W).forEach(X=>{Qd(X,W[X])})}u&&gv(u,t,"c");function I(W,X){We(X)?X.forEach(J=>W(J.bind(n))):X&&W(X.bind(n))}if(I(bR,d),I(xn,h),I(gE,f),I(pE,p),I(UR,m),I(GR,y),I(SR,k),I(ER,x),I(xR,T),I(p_,b),I(Yl,C),I(wR,A),We(P))if(P.length){const W=t.exposed||(t.exposed={});P.forEach(X=>{Object.defineProperty(W,X,{get:()=>n[X],set:J=>n[X]=J})})}else t.exposed||(t.exposed={});w&&t.render===Vi&&(t.render=w),F!=null&&(t.inheritAttrs=F),H&&(t.components=H),te&&(t.directives=te)}function AR(t,e,n=Vi){We(t)&&(t=Vp(t));for(const i in t){const s=t[i];let r;At(s)?"default"in s?r=cs(s.from||i,s.default,!0):r=cs(s.from||i):r=cs(s),Qt(r)?Object.defineProperty(e,i,{enumerable:!0,configurable:!0,get:()=>r.value,set:o=>r.value=o}):e[i]=r}}function gv(t,e,n){ji(We(t)?t.map(i=>i.bind(e.proxy)):t.bind(e.proxy),e,n)}function yE(t,e,n,i){const s=i.includes(".")?IE(n,i):()=>n[i];if(Kt(t)){const r=e[t];qe(r)&&fn(s,r)}else if(qe(t))fn(s,t.bind(n));else if(At(t))if(We(t))t.forEach(r=>yE(r,e,n,i));else{const r=qe(t.handler)?t.handler.bind(n):e[t.handler];qe(r)&&fn(s,r,t)}}function m_(t){const e=t.type,{mixins:n,extends:i}=e,{mixins:s,optionsCache:r,config:{optionMergeStrategies:o}}=t.appContext,a=r.get(e);let l;return a?l=a:!s.length&&!n&&!i?l=e:(l={},s.length&&s.forEach(c=>fh(l,c,o,!0)),fh(l,e,o)),At(e)&&r.set(e,l),l}function fh(t,e,n,i=!1){const{mixins:s,extends:r}=e;r&&fh(t,r,n,!0),s&&s.forEach(o=>fh(t,o,n,!0));for(const o in e)if(!(i&&o==="expose")){const a=MR[o]||n&&n[o];t[o]=a?a(t[o],e[o]):e[o]}return t}const MR={data:pv,props:mv,emits:mv,methods:vc,computed:vc,beforeCreate:Gn,created:Gn,beforeMount:Gn,mounted:Gn,beforeUpdate:Gn,updated:Gn,beforeDestroy:Gn,beforeUnmount:Gn,destroyed:Gn,unmounted:Gn,activated:Gn,deactivated:Gn,errorCaptured:Gn,serverPrefetch:Gn,components:vc,directives:vc,watch:PR,provide:pv,inject:IR};function pv(t,e){return e?t?function(){return ln(qe(t)?t.call(this,this):t,qe(e)?e.call(this,this):e)}:e:t}function IR(t,e){return vc(Vp(t),Vp(e))}function Vp(t){if(We(t)){const e={};for(let n=0;n1)return n&&qe(e)?e.call(i&&i.proxy):e}}function $R(){return!!(An||_n||rl)}const bE={},wE=()=>Object.create(bE),xE=t=>Object.getPrototypeOf(t)===bE;function LR(t,e,n,i=!1){const s={},r=wE();t.propsDefaults=Object.create(null),EE(t,e,s,r);for(const o in t.propsOptions[0])o in s||(s[o]=void 0);n?t.props=i?s:eE(s):t.type.props?t.props=s:t.props=r,t.attrs=r}function OR(t,e,n,i){const{props:s,attrs:r,vnode:{patchFlag:o}}=t,a=lt(s),[l]=t.propsOptions;let c=!1;if((i||o>0)&&!(o&16)){if(o&8){const u=t.vnode.dynamicProps;for(let d=0;d{l=!0;const[h,f]=SE(d,e,!0);ln(o,h),f&&a.push(...f)};!n&&e.mixins.length&&e.mixins.forEach(u),t.extends&&u(t.extends),t.mixins&&t.mixins.forEach(u)}if(!r&&!l)return At(t)&&i.set(t,tl),tl;if(We(r))for(let u=0;u-1,f[1]=m<0||p-1||ht(f,"default"))&&a.push(d)}}}const c=[o,a];return At(t)&&i.set(t,c),c}function _v(t){return t[0]!=="$"&&!Dc(t)}function yv(t){return t===null?"null":typeof t=="function"?t.name||"":typeof t=="object"&&t.constructor&&t.constructor.name||""}function vv(t,e){return yv(t)===yv(e)}function bv(t,e){return We(e)?e.findIndex(n=>vv(n,t)):qe(e)&&vv(e,t)?0:-1}const CE=t=>t[0]==="_"||t==="$stable",__=t=>We(t)?t.map(ns):[ns(t)],NR=(t,e,n)=>{if(e._n)return e;const i=Re((...s)=>__(e(...s)),n);return i._c=!1,i},TE=(t,e,n)=>{const i=t._ctx;for(const s in t){if(CE(s))continue;const r=t[s];if(qe(r))e[s]=NR(s,r,i);else if(r!=null){const o=__(r);e[s]=()=>o}}},kE=(t,e)=>{const n=__(e);t.slots.default=()=>n},FR=(t,e)=>{const n=t.slots=wE();if(t.vnode.shapeFlag&32){const i=e._;i?(ln(n,e),Ox(n,"_",i,!0)):TE(e,n)}else e&&kE(t,e)},BR=(t,e,n)=>{const{vnode:i,slots:s}=t;let r=!0,o=Ot;if(i.shapeFlag&32){const a=e._;a?n&&a===1?r=!1:(ln(s,e),!n&&a===1&&delete s._):(r=!e.$stable,TE(e,s)),o=e}else e&&(kE(t,e),o={default:1});if(r)for(const a in s)!CE(a)&&o[a]==null&&delete s[a]};function Wp(t,e,n,i,s=!1){if(We(t)){t.forEach((h,f)=>Wp(h,e&&(We(e)?e[f]:e),n,i,s));return}if($c(i)&&!s)return;const r=i.shapeFlag&4?df(i.component):i.el,o=s?null:r,{i:a,r:l}=t,c=e&&e.r,u=a.refs===Ot?a.refs={}:a.refs,d=a.setupState;if(c!=null&&c!==l&&(Kt(c)?(u[c]=null,ht(d,c)&&(d[c]=null)):Qt(c)&&(c.value=null)),qe(l))Jr(l,a,12,[o,u]);else{const h=Kt(l),f=Qt(l);if(h||f){const p=()=>{if(t.f){const m=h?ht(d,l)?d[l]:u[l]:l.value;s?We(m)&&Zm(m,r):We(m)?m.includes(r)||m.push(r):h?(u[l]=[r],ht(d,l)&&(d[l]=u[l])):(l.value=[r],t.k&&(u[t.k]=l.value))}else h?(u[l]=o,ht(d,l)&&(d[l]=o)):f&&(l.value=o,t.k&&(u[t.k]=o))};o?(p.id=-1,li(p,n)):p()}}}const li=yR;function VR(t){return zR(t)}function zR(t,e){const n=Fx();n.__VUE__=!0;const{insert:i,remove:s,patchProp:r,createElement:o,createText:a,createComment:l,setText:c,setElementText:u,parentNode:d,nextSibling:h,setScopeId:f=Vi,insertStaticContent:p}=t,m=(S,O,K,U=null,re=null,j=null,se=void 0,ee=null,fe=!!O.dynamicChildren)=>{if(S===O)return;S&&!ws(S,O)&&(U=$(S),Y(S,re,j,!0),S=null),O.patchFlag===-2&&(fe=!1,O.dynamicChildren=null);const{type:me,ref:pe,shapeFlag:Le}=O;switch(me){case cf:y(S,O,K,U);break;case Hn:v(S,O,K,U);break;case Sg:S==null&&b(O,K,U,se);break;case $e:H(S,O,K,U,re,j,se,ee,fe);break;default:Le&1?w(S,O,K,U,re,j,se,ee,fe):Le&6?te(S,O,K,U,re,j,se,ee,fe):(Le&64||Le&128)&&me.process(S,O,K,U,re,j,se,ee,fe,ve)}pe!=null&&re&&Wp(pe,S&&S.ref,j,O||S,!O)},y=(S,O,K,U)=>{if(S==null)i(O.el=a(O.children),K,U);else{const re=O.el=S.el;O.children!==S.children&&c(re,O.children)}},v=(S,O,K,U)=>{S==null?i(O.el=l(O.children||""),K,U):O.el=S.el},b=(S,O,K,U)=>{[S.el,S.anchor]=p(S.children,O,K,U,S.el,S.anchor)},E=({el:S,anchor:O},K,U)=>{let re;for(;S&&S!==O;)re=h(S),i(S,K,U),S=re;i(O,K,U)},C=({el:S,anchor:O})=>{let K;for(;S&&S!==O;)K=h(S),s(S),S=K;s(O)},w=(S,O,K,U,re,j,se,ee,fe)=>{O.type==="svg"?se="svg":O.type==="math"&&(se="mathml"),S==null?x(O,K,U,re,j,se,ee,fe):A(S,O,re,j,se,ee,fe)},x=(S,O,K,U,re,j,se,ee)=>{let fe,me;const{props:pe,shapeFlag:Le,transition:Ae,dirs:ze}=S;if(fe=S.el=o(S.type,j,pe&&pe.is,pe),Le&8?u(fe,S.children):Le&16&&k(S.children,fe,null,U,re,xg(S,j),se,ee),ze&&Io(S,null,U,"created"),T(fe,S,S.scopeId,se,U),pe){for(const nt in pe)nt!=="value"&&!Dc(nt)&&r(fe,nt,null,pe[nt],j,S.children,U,re,le);"value"in pe&&r(fe,"value",null,pe.value,j),(me=pe.onVnodeBeforeMount)&&_s(me,U,S)}ze&&Io(S,null,U,"beforeMount");const Be=WR(re,Ae);Be&&Ae.beforeEnter(fe),i(fe,O,K),((me=pe&&pe.onVnodeMounted)||Be||ze)&&li(()=>{me&&_s(me,U,S),Be&&Ae.enter(fe),ze&&Io(S,null,U,"mounted")},re)},T=(S,O,K,U,re)=>{if(K&&f(S,K),U)for(let j=0;j{for(let me=fe;me{const ee=O.el=S.el;let{patchFlag:fe,dynamicChildren:me,dirs:pe}=O;fe|=S.patchFlag&16;const Le=S.props||Ot,Ae=O.props||Ot;let ze;if(K&&Po(K,!1),(ze=Ae.onVnodeBeforeUpdate)&&_s(ze,K,O,S),pe&&Io(O,S,K,"beforeUpdate"),K&&Po(K,!0),me?P(S.dynamicChildren,me,ee,K,U,xg(O,re),j):se||X(S,O,ee,null,K,U,xg(O,re),j,!1),fe>0){if(fe&16)F(ee,O,Le,Ae,K,U,re);else if(fe&2&&Le.class!==Ae.class&&r(ee,"class",null,Ae.class,re),fe&4&&r(ee,"style",Le.style,Ae.style,re),fe&8){const Be=O.dynamicProps;for(let nt=0;nt{ze&&_s(ze,K,O,S),pe&&Io(O,S,K,"updated")},U)},P=(S,O,K,U,re,j,se)=>{for(let ee=0;ee{if(K!==U){if(K!==Ot)for(const ee in K)!Dc(ee)&&!(ee in U)&&r(S,ee,K[ee],null,se,O.children,re,j,le);for(const ee in U){if(Dc(ee))continue;const fe=U[ee],me=K[ee];fe!==me&&ee!=="value"&&r(S,ee,me,fe,se,O.children,re,j,le)}"value"in U&&r(S,"value",K.value,U.value,se)}},H=(S,O,K,U,re,j,se,ee,fe)=>{const me=O.el=S?S.el:a(""),pe=O.anchor=S?S.anchor:a("");let{patchFlag:Le,dynamicChildren:Ae,slotScopeIds:ze}=O;ze&&(ee=ee?ee.concat(ze):ze),S==null?(i(me,K,U),i(pe,K,U),k(O.children||[],K,pe,re,j,se,ee,fe)):Le>0&&Le&64&&Ae&&S.dynamicChildren?(P(S.dynamicChildren,Ae,K,re,j,se,ee),(O.key!=null||re&&O===re.subTree)&&y_(S,O,!0)):X(S,O,K,pe,re,j,se,ee,fe)},te=(S,O,K,U,re,j,se,ee,fe)=>{O.slotScopeIds=ee,S==null?O.shapeFlag&512?re.ctx.activate(O,K,U,se,fe):N(O,K,U,re,j,se,fe):L(S,O,fe)},N=(S,O,K,U,re,j,se)=>{const ee=S.component=rD(S,U,re);if(lf(S)&&(ee.ctx.renderer=ve),oD(ee),ee.asyncDep){if(re&&re.registerDep(ee,I,se),!S.el){const fe=ee.subTree=B(Hn);v(null,fe,O,K)}}else I(ee,S,O,K,re,j,se)},L=(S,O,K)=>{const U=O.component=S.component;if(dR(S,O,K))if(U.asyncDep&&!U.asyncResolved){W(U,O,K);return}else U.next=O,rR(U.update),U.effect.dirty=!0,U.update();else O.el=S.el,U.vnode=O},I=(S,O,K,U,re,j,se)=>{const ee=()=>{if(S.isMounted){let{next:pe,bu:Le,u:Ae,parent:ze,vnode:Be}=S;{const Un=AE(S);if(Un){pe&&(pe.el=Be.el,W(S,pe,se)),Un.asyncDep.then(()=>{S.isUnmounted||ee()});return}}let nt=pe,Ze;Po(S,!1),pe?(pe.el=Be.el,W(S,pe,se)):pe=Be,Le&&Zd(Le),(Ze=pe.props&&pe.props.onVnodeBeforeUpdate)&&_s(Ze,ze,pe,Be),Po(S,!0);const Mt=bg(S),gn=S.subTree;S.subTree=Mt,m(gn,Mt,d(gn.el),$(gn),S,re,j),pe.el=Mt.el,nt===null&&d_(S,Mt.el),Ae&&li(Ae,re),(Ze=pe.props&&pe.props.onVnodeUpdated)&&li(()=>_s(Ze,ze,pe,Be),re)}else{let pe;const{el:Le,props:Ae}=O,{bm:ze,m:Be,parent:nt}=S,Ze=$c(O);if(Po(S,!1),ze&&Zd(ze),!Ze&&(pe=Ae&&Ae.onVnodeBeforeMount)&&_s(pe,nt,O),Po(S,!0),Le&&ge){const Mt=()=>{S.subTree=bg(S),ge(Le,S.subTree,S,re,null)};Ze?O.type.__asyncLoader().then(()=>!S.isUnmounted&&Mt()):Mt()}else{const Mt=S.subTree=bg(S);m(null,Mt,K,U,S,re,j),O.el=Mt.el}if(Be&&li(Be,re),!Ze&&(pe=Ae&&Ae.onVnodeMounted)){const Mt=O;li(()=>_s(pe,nt,Mt),re)}(O.shapeFlag&256||nt&&$c(nt.vnode)&&nt.vnode.shapeFlag&256)&&S.a&&li(S.a,re),S.isMounted=!0,O=K=U=null}},fe=S.effect=new t_(ee,Vi,()=>u_(me),S.scope),me=S.update=()=>{fe.dirty&&fe.run()};me.id=S.uid,Po(S,!0),me()},W=(S,O,K)=>{O.component=S;const U=S.vnode.props;S.vnode=O,S.next=null,OR(S,O.props,U,K),BR(S,O.children,K),fo(),cv(S),go()},X=(S,O,K,U,re,j,se,ee,fe=!1)=>{const me=S&&S.children,pe=S?S.shapeFlag:0,Le=O.children,{patchFlag:Ae,shapeFlag:ze}=O;if(Ae>0){if(Ae&128){ne(me,Le,K,U,re,j,se,ee,fe);return}else if(Ae&256){J(me,Le,K,U,re,j,se,ee,fe);return}}ze&8?(pe&16&&le(me,re,j),Le!==me&&u(K,Le)):pe&16?ze&16?ne(me,Le,K,U,re,j,se,ee,fe):le(me,re,j,!0):(pe&8&&u(K,""),ze&16&&k(Le,K,U,re,j,se,ee,fe))},J=(S,O,K,U,re,j,se,ee,fe)=>{S=S||tl,O=O||tl;const me=S.length,pe=O.length,Le=Math.min(me,pe);let Ae;for(Ae=0;Aepe?le(S,re,j,!0,!1,Le):k(O,K,U,re,j,se,ee,fe,Le)},ne=(S,O,K,U,re,j,se,ee,fe)=>{let me=0;const pe=O.length;let Le=S.length-1,Ae=pe-1;for(;me<=Le&&me<=Ae;){const ze=S[me],Be=O[me]=fe?Br(O[me]):ns(O[me]);if(ws(ze,Be))m(ze,Be,K,null,re,j,se,ee,fe);else break;me++}for(;me<=Le&&me<=Ae;){const ze=S[Le],Be=O[Ae]=fe?Br(O[Ae]):ns(O[Ae]);if(ws(ze,Be))m(ze,Be,K,null,re,j,se,ee,fe);else break;Le--,Ae--}if(me>Le){if(me<=Ae){const ze=Ae+1,Be=zeAe)for(;me<=Le;)Y(S[me],re,j,!0),me++;else{const ze=me,Be=me,nt=new Map;for(me=Be;me<=Ae;me++){const Ut=O[me]=fe?Br(O[me]):ns(O[me]);Ut.key!=null&&nt.set(Ut.key,me)}let Ze,Mt=0;const gn=Ae-Be+1;let Un=!1,Ri=0;const wi=new Array(gn);for(me=0;me=gn){Y(Ut,re,j,!0);continue}let ae;if(Ut.key!=null)ae=nt.get(Ut.key);else for(Ze=Be;Ze<=Ae;Ze++)if(wi[Ze-Be]===0&&ws(Ut,O[Ze])){ae=Ze;break}ae===void 0?Y(Ut,re,j,!0):(wi[ae-Be]=me+1,ae>=Ri?Ri=ae:Un=!0,m(Ut,O[ae],K,null,re,j,se,ee,fe),Mt++)}const Xi=Un?HR(wi):tl;for(Ze=Xi.length-1,me=gn-1;me>=0;me--){const Ut=Be+me,ae=O[Ut],Te=Ut+1{const{el:j,type:se,transition:ee,children:fe,shapeFlag:me}=S;if(me&6){ue(S.component.subTree,O,K,U);return}if(me&128){S.suspense.move(O,K,U);return}if(me&64){se.move(S,O,K,ve);return}if(se===$e){i(j,O,K);for(let Le=0;Leee.enter(j),re);else{const{leave:Le,delayLeave:Ae,afterLeave:ze}=ee,Be=()=>i(j,O,K),nt=()=>{Le(j,()=>{Be(),ze&&ze()})};Ae?Ae(j,Be,nt):nt()}else i(j,O,K)},Y=(S,O,K,U=!1,re=!1)=>{const{type:j,props:se,ref:ee,children:fe,dynamicChildren:me,shapeFlag:pe,patchFlag:Le,dirs:Ae,memoIndex:ze}=S;if(ee!=null&&Wp(ee,null,K,S,!0),ze!=null&&(O.renderCache[ze]=void 0),pe&256){O.ctx.deactivate(S);return}const Be=pe&1&&Ae,nt=!$c(S);let Ze;if(nt&&(Ze=se&&se.onVnodeBeforeUnmount)&&_s(Ze,O,S),pe&6)ie(S.component,K,U);else{if(pe&128){S.suspense.unmount(K,U);return}Be&&Io(S,null,O,"beforeUnmount"),pe&64?S.type.remove(S,O,K,re,ve,U):me&&(j!==$e||Le>0&&Le&64)?le(me,O,K,!1,!0):(j===$e&&Le&384||!re&&pe&16)&&le(fe,O,K),U&&Z(S)}(nt&&(Ze=se&&se.onVnodeUnmounted)||Be)&&li(()=>{Ze&&_s(Ze,O,S),Be&&Io(S,null,O,"unmounted")},K)},Z=S=>{const{type:O,el:K,anchor:U,transition:re}=S;if(O===$e){M(K,U);return}if(O===Sg){C(S);return}const j=()=>{s(K),re&&!re.persisted&&re.afterLeave&&re.afterLeave()};if(S.shapeFlag&1&&re&&!re.persisted){const{leave:se,delayLeave:ee}=re,fe=()=>se(K,j);ee?ee(S.el,j,fe):fe()}else j()},M=(S,O)=>{let K;for(;S!==O;)K=h(S),s(S),S=K;s(O)},ie=(S,O,K)=>{const{bum:U,scope:re,update:j,subTree:se,um:ee,m:fe,a:me}=S;wv(fe),wv(me),U&&Zd(U),re.stop(),j&&(j.active=!1,Y(se,S,O,K)),ee&&li(ee,O),li(()=>{S.isUnmounted=!0},O),O&&O.pendingBranch&&!O.isUnmounted&&S.asyncDep&&!S.asyncResolved&&S.suspenseId===O.pendingId&&(O.deps--,O.deps===0&&O.resolve())},le=(S,O,K,U=!1,re=!1,j=0)=>{for(let se=j;seS.shapeFlag&6?$(S.component.subTree):S.shapeFlag&128?S.suspense.next():h(S.anchor||S.el);let oe=!1;const de=(S,O,K)=>{S==null?O._vnode&&Y(O._vnode,null,null,!0):m(O._vnode||null,S,O,null,null,null,K),oe||(oe=!0,cv(),cE(),oe=!1),O._vnode=S},ve={p:m,um:Y,m:ue,r:Z,mt:N,mc:k,pc:X,pbc:P,n:$,o:t};let z,ge;return e&&([z,ge]=e(ve)),{render:de,hydrate:z,createApp:DR(de,z)}}function xg({type:t,props:e},n){return n==="svg"&&t==="foreignObject"||n==="mathml"&&t==="annotation-xml"&&e&&e.encoding&&e.encoding.includes("html")?void 0:n}function Po({effect:t,update:e},n){t.allowRecurse=e.allowRecurse=n}function WR(t,e){return(!t||t&&!t.pendingBranch)&&e&&!e.persisted}function y_(t,e,n=!1){const i=t.children,s=e.children;if(We(i)&&We(s))for(let r=0;r>1,t[n[a]]0&&(e[i]=n[r-1]),n[r]=i)}}for(r=n.length,o=n[r-1];r-- >0;)n[r]=o,o=e[o];return n}function AE(t){const e=t.subTree.component;if(e)return e.asyncDep&&!e.asyncResolved?e:AE(e)}function wv(t){if(t)for(let e=0;ecs(YR),md={};function fn(t,e,n){return ME(t,e,n)}function ME(t,e,{immediate:n,deep:i,flush:s,once:r,onTrack:o,onTrigger:a}=Ot){if(e&&r){const x=e;e=(...T)=>{x(...T),w()}}const l=An,c=x=>i===!0?x:Wr(x,i===!1?1:void 0);let u,d=!1,h=!1;if(Qt(t)?(u=()=>t.value,d=dh(t)):ea(t)?(u=()=>c(t),d=!0):We(t)?(h=!0,d=t.some(x=>ea(x)||dh(x)),u=()=>t.map(x=>{if(Qt(x))return x.value;if(ea(x))return c(x);if(qe(x))return Jr(x,l,2)})):qe(t)?e?u=()=>Jr(t,l,2):u=()=>(f&&f(),ji(t,l,3,[p])):u=Vi,e&&i){const x=u;u=()=>Wr(x())}let f,p=x=>{f=E.onStop=()=>{Jr(x,l,4),f=E.onStop=void 0}},m;if(uf)if(p=Vi,e?n&&ji(e,l,3,[u(),h?[]:void 0,p]):u(),s==="sync"){const x=jR();m=x.__watcherHandles||(x.__watcherHandles=[])}else return Vi;let y=h?new Array(t.length).fill(md):md;const v=()=>{if(!(!E.active||!E.dirty))if(e){const x=E.run();(i||d||(h?x.some((T,k)=>io(T,y[k])):io(x,y)))&&(f&&f(),ji(e,l,3,[x,y===md?void 0:h&&y[0]===md?[]:y,p]),y=x)}else E.run()};v.allowRecurse=!!e;let b;s==="sync"?b=v:s==="post"?b=()=>li(v,l&&l.suspense):(v.pre=!0,l&&(v.id=l.uid),b=()=>u_(v));const E=new t_(u,Vi,b),C=ef(),w=()=>{E.stop(),C&&Zm(C.effects,E)};return e?n?v():y=E.run():s==="post"?li(E.run.bind(E),l&&l.suspense):E.run(),m&&m.push(w),w}function KR(t,e,n){const i=this.proxy,s=Kt(t)?t.includes(".")?IE(i,t):()=>i[t]:t.bind(i,i);let r;qe(e)?r=e:(r=e.handler,n=e);const o=Lu(this),a=ME(s,r.bind(i),n);return o(),a}function IE(t,e){const n=e.split(".");return()=>{let i=t;for(let s=0;s{Wr(i,e,n)});else if(Lx(t)){for(const i in t)Wr(t[i],e,n);for(const i of Object.getOwnPropertySymbols(t))Object.prototype.propertyIsEnumerable.call(t,i)&&Wr(t[i],e,n)}return t}const lf=t=>t.type.__isKeepAlive;function UR(t,e){PE(t,"a",e)}function GR(t,e){PE(t,"da",e)}function PE(t,e,n=An){const i=t.__wdc||(t.__wdc=()=>{let s=n;for(;s;){if(s.isDeactivated)return;s=s.parent}return t()});if(af(e,i,n),n){let s=n.parent;for(;s&&s.parent;)lf(s.parent.vnode)&&XR(i,e,n,s),s=s.parent}}function XR(t,e,n,i){const s=af(e,t,i,!0);Yl(()=>{Zm(i[e],s)},n)}const Fr=Symbol("_leaveCb"),_d=Symbol("_enterCb");function RE(){const t={isMounted:!1,isLeaving:!1,isUnmounting:!1,leavingVNodes:new Map};return xn(()=>{t.isMounted=!0}),p_(()=>{t.isUnmounting=!0}),t}const Ni=[Function,Array],DE={mode:String,appear:Boolean,persisted:Boolean,onBeforeEnter:Ni,onEnter:Ni,onAfterEnter:Ni,onEnterCancelled:Ni,onBeforeLeave:Ni,onLeave:Ni,onAfterLeave:Ni,onLeaveCancelled:Ni,onBeforeAppear:Ni,onAppear:Ni,onAfterAppear:Ni,onAppearCancelled:Ni},$E=t=>{const e=t.subTree;return e.component?$E(e.component):e},qR={name:"BaseTransition",props:DE,setup(t,{slots:e}){const n=w_(),i=RE();return()=>{const s=e.default&&v_(e.default(),!0);if(!s||!s.length)return;let r=s[0];if(s.length>1){for(const h of s)if(h.type!==Hn){r=h;break}}const o=lt(t),{mode:a}=o;if(i.isLeaving)return Eg(r);const l=xv(r);if(!l)return Eg(r);let c=tu(l,o,i,n,h=>c=h);ml(l,c);const u=n.subTree,d=u&&xv(u);if(d&&d.type!==Hn&&!ws(l,d)&&$E(n).type!==Hn){const h=tu(d,o,i,n);if(ml(d,h),a==="out-in"&&l.type!==Hn)return i.isLeaving=!0,h.afterLeave=()=>{i.isLeaving=!1,n.update.active!==!1&&(n.effect.dirty=!0,n.update())},Eg(r);a==="in-out"&&l.type!==Hn&&(h.delayLeave=(f,p,m)=>{const y=LE(i,d);y[String(d.key)]=d,f[Fr]=()=>{p(),f[Fr]=void 0,delete c.delayedLeave},c.delayedLeave=m})}return r}}},ZR=qR;function LE(t,e){const{leavingVNodes:n}=t;let i=n.get(e.type);return i||(i=Object.create(null),n.set(e.type,i)),i}function tu(t,e,n,i,s){const{appear:r,mode:o,persisted:a=!1,onBeforeEnter:l,onEnter:c,onAfterEnter:u,onEnterCancelled:d,onBeforeLeave:h,onLeave:f,onAfterLeave:p,onLeaveCancelled:m,onBeforeAppear:y,onAppear:v,onAfterAppear:b,onAppearCancelled:E}=e,C=String(t.key),w=LE(n,t),x=(A,P)=>{A&&ji(A,i,9,P)},T=(A,P)=>{const F=P[1];x(A,P),We(A)?A.every(H=>H.length<=1)&&F():A.length<=1&&F()},k={mode:o,persisted:a,beforeEnter(A){let P=l;if(!n.isMounted)if(r)P=y||l;else return;A[Fr]&&A[Fr](!0);const F=w[C];F&&ws(t,F)&&F.el[Fr]&&F.el[Fr](),x(P,[A])},enter(A){let P=c,F=u,H=d;if(!n.isMounted)if(r)P=v||c,F=b||u,H=E||d;else return;let te=!1;const N=A[_d]=L=>{te||(te=!0,L?x(H,[A]):x(F,[A]),k.delayedLeave&&k.delayedLeave(),A[_d]=void 0)};P?T(P,[A,N]):N()},leave(A,P){const F=String(t.key);if(A[_d]&&A[_d](!0),n.isUnmounting)return P();x(h,[A]);let H=!1;const te=A[Fr]=N=>{H||(H=!0,P(),N?x(m,[A]):x(p,[A]),A[Fr]=void 0,w[F]===t&&delete w[F])};w[F]=t,f?T(f,[A,te]):te()},clone(A){const P=tu(A,e,n,i,s);return s&&s(P),P}};return k}function Eg(t){if(lf(t))return t=so(t),t.children=null,t}function xv(t){if(!lf(t))return t;const{shapeFlag:e,children:n}=t;if(n){if(e&16)return n[0];if(e&32&&qe(n.default))return n.default()}}function ml(t,e){t.shapeFlag&6&&t.component?ml(t.component.subTree,e):t.shapeFlag&128?(t.ssContent.transition=e.clone(t.ssContent),t.ssFallback.transition=e.clone(t.ssFallback)):t.transition=e}function v_(t,e=!1,n){let i=[],s=0;for(let r=0;r1)for(let r=0;rt.__isTeleport,Oc=t=>t&&(t.disabled||t.disabled===""),Ev=t=>typeof SVGElement<"u"&&t instanceof SVGElement,Sv=t=>typeof MathMLElement=="function"&&t instanceof MathMLElement,Hp=(t,e)=>{const n=t&&t.to;return Kt(n)?e?e(n):null:n},QR={name:"Teleport",__isTeleport:!0,process(t,e,n,i,s,r,o,a,l,c){const{mc:u,pc:d,pbc:h,o:{insert:f,querySelector:p,createText:m,createComment:y}}=c,v=Oc(e.props);let{shapeFlag:b,children:E,dynamicChildren:C}=e;if(t==null){const w=e.el=m(""),x=e.anchor=m("");f(w,n,i),f(x,n,i);const T=e.target=Hp(e.props,p),k=e.targetAnchor=m("");T&&(f(k,T),o==="svg"||Ev(T)?o="svg":(o==="mathml"||Sv(T))&&(o="mathml"));const A=(P,F)=>{b&16&&u(E,P,F,s,r,o,a,l)};v?A(n,x):T&&A(T,k)}else{e.el=t.el;const w=e.anchor=t.anchor,x=e.target=t.target,T=e.targetAnchor=t.targetAnchor,k=Oc(t.props),A=k?n:x,P=k?w:T;if(o==="svg"||Ev(x)?o="svg":(o==="mathml"||Sv(x))&&(o="mathml"),C?(h(t.dynamicChildren,C,A,s,r,o,a),y_(t,e,!0)):l||d(t,e,A,P,s,r,o,a,!1),v)k?e.props&&t.props&&e.props.to!==t.props.to&&(e.props.to=t.props.to):yd(e,n,w,c,1);else if((e.props&&e.props.to)!==(t.props&&t.props.to)){const F=e.target=Hp(e.props,p);F&&yd(e,F,null,c,0)}else k&&yd(e,x,T,c,1)}OE(e)},remove(t,e,n,i,{um:s,o:{remove:r}},o){const{shapeFlag:a,children:l,anchor:c,targetAnchor:u,target:d,props:h}=t;if(d&&r(u),o&&r(c),a&16){const f=o||!Oc(h);for(let p=0;p0?zi||tl:null,NE(),_l>0&&zi&&zi.push(t),t}function V(t,e,n,i,s,r){return FE(g(t,e,n,i,s,r,!0))}function Ce(t,e,n,i,s){return FE(B(t,e,n,i,s,!0))}function nu(t){return t?t.__v_isVNode===!0:!1}function ws(t,e){return t.type===e.type&&t.key===e.key}const BE=({key:t})=>t??null,eh=({ref:t,ref_key:e,ref_for:n})=>(typeof t=="number"&&(t=""+t),t!=null?Kt(t)||Qt(t)||qe(t)?{i:_n,r:t,k:e,f:!!n}:t:null);function g(t,e=null,n=null,i=0,s=null,r=t===$e?0:1,o=!1,a=!1){const l={__v_isVNode:!0,__v_skip:!0,type:t,props:e,key:e&&BE(e),ref:e&&eh(e),scopeId:of,slotScopeIds:null,children:n,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetAnchor:null,staticCount:0,shapeFlag:r,patchFlag:i,dynamicProps:s,dynamicChildren:null,appContext:null,ctx:_n};return a?(b_(l,n),r&128&&t.normalize(l)):n&&(l.shapeFlag|=Kt(n)?8:16),_l>0&&!o&&zi&&(l.patchFlag>0||r&6)&&l.patchFlag!==32&&zi.push(l),l}const B=nD;function nD(t,e=null,n=null,i=0,s=null,r=!1){if((!t||t===hE)&&(t=Hn),nu(t)){const a=so(t,e,!0);return n&&b_(a,n),_l>0&&!r&&zi&&(a.shapeFlag&6?zi[zi.indexOf(t)]=a:zi.push(a)),a.patchFlag=-2,a}if(uD(t)&&(t=t.__vccOpts),e){e=Zn(e);let{class:a,style:l}=e;a&&!Kt(a)&&(e.class=Ie(a)),At(l)&&(nf(l)&&!We(l)&&(l=ln({},l)),e.style=Mn(l))}const o=Kt(t)?1:hR(t)?128:JR(t)?64:At(t)?4:qe(t)?2:0;return g(t,e,n,i,s,o,r,!0)}function Zn(t){return t?nf(t)||xE(t)?ln({},t):t:null}function so(t,e,n=!1,i=!1){const{props:s,ref:r,patchFlag:o,children:a,transition:l}=t,c=e?yn(s||{},e):s,u={__v_isVNode:!0,__v_skip:!0,type:t.type,props:c,key:c&&BE(c),ref:e&&e.ref?n&&r?We(r)?r.concat(eh(e)):[r,eh(e)]:eh(e):r,scopeId:t.scopeId,slotScopeIds:t.slotScopeIds,children:a,target:t.target,targetAnchor:t.targetAnchor,staticCount:t.staticCount,shapeFlag:t.shapeFlag,patchFlag:e&&t.type!==$e?o===-1?16:o|16:o,dynamicProps:t.dynamicProps,dynamicChildren:t.dynamicChildren,appContext:t.appContext,dirs:t.dirs,transition:l,component:t.component,suspense:t.suspense,ssContent:t.ssContent&&so(t.ssContent),ssFallback:t.ssFallback&&so(t.ssFallback),el:t.el,anchor:t.anchor,ctx:t.ctx,ce:t.ce};return l&&i&&ml(u,l.clone(u)),u}function He(t=" ",e=0){return B(cf,null,t,e)}function ce(t="",e=!1){return e?(D(),Ce(Hn,null,t)):B(Hn,null,t)}function ns(t){return t==null||typeof t=="boolean"?B(Hn):We(t)?B($e,null,t.slice()):typeof t=="object"?Br(t):B(cf,null,String(t))}function Br(t){return t.el===null&&t.patchFlag!==-1||t.memo?t:so(t)}function b_(t,e){let n=0;const{shapeFlag:i}=t;if(e==null)e=null;else if(We(e))n=16;else if(typeof e=="object")if(i&65){const s=e.default;s&&(s._c&&(s._d=!1),b_(t,s()),s._c&&(s._d=!0));return}else{n=32;const s=e._;!s&&!xE(e)?e._ctx=_n:s===3&&_n&&(_n.slots._===1?e._=1:(e._=2,t.patchFlag|=1024))}else qe(e)?(e={default:e,_ctx:_n},n=32):(e=String(e),i&64?(n=16,e=[He(e)]):n=8);t.children=e,t.shapeFlag|=n}function yn(...t){const e={};for(let n=0;nAn||_n;let gh,Yp;{const t=Fx(),e=(n,i)=>{let s;return(s=t[n])||(s=t[n]=[]),s.push(i),r=>{s.length>1?s.forEach(o=>o(r)):s[0](r)}};gh=e("__VUE_INSTANCE_SETTERS__",n=>An=n),Yp=e("__VUE_SSR_SETTERS__",n=>uf=n)}const Lu=t=>{const e=An;return gh(t),t.scope.on(),()=>{t.scope.off(),gh(e)}},Tv=()=>{An&&An.scope.off(),gh(null)};function VE(t){return t.vnode.shapeFlag&4}let uf=!1;function oD(t,e=!1){e&&Yp(e);const{props:n,children:i}=t.vnode,s=VE(t);LR(t,n,s,e),FR(t,i);const r=s?aD(t,e):void 0;return e&&Yp(!1),r}function aD(t,e){const n=t.type;t.accessCache=Object.create(null),t.proxy=new Proxy(t.ctx,CR);const{setup:i}=n;if(i){const s=t.setupContext=i.length>1?WE(t):null,r=Lu(t);fo();const o=Jr(i,t,0,[t.props,s]);if(go(),r(),Dx(o)){if(o.then(Tv,Tv),e)return o.then(a=>{jp(t,a,e)}).catch(a=>{$u(a,t,0)});t.asyncDep=o}else jp(t,o,e)}else zE(t,e)}function jp(t,e,n){qe(e)?t.type.__ssrInlineRender?t.ssrRender=e:t.render=e:At(e)&&(t.setupState=rE(e)),zE(t,n)}let kv;function zE(t,e,n){const i=t.type;if(!t.render){if(!e&&kv&&!i.render){const s=i.template||m_(t).template;if(s){const{isCustomElement:r,compilerOptions:o}=t.appContext.config,{delimiters:a,compilerOptions:l}=i,c=ln(ln({isCustomElement:r,delimiters:a},o),l);i.render=kv(s,c)}}t.render=i.render||Vi}{const s=Lu(t);fo();try{kR(t)}finally{go(),s()}}}const lD={get(t,e){return yi(t,"get",""),t[e]}};function WE(t){const e=n=>{t.exposed=n||{}};return{attrs:new Proxy(t.attrs,lD),slots:t.slots,emit:t.emit,expose:e}}function df(t){return t.exposed?t.exposeProxy||(t.exposeProxy=new Proxy(rE(sf(t.exposed)),{get(e,n){if(n in e)return e[n];if(n in Lc)return Lc[n](t)},has(e,n){return n in e||n in Lc}})):t.proxy}function cD(t,e=!0){return qe(t)?t.displayName||t.name:t.name||e&&t.__name}function uD(t){return qe(t)&&"__vccOpts"in t}const be=(t,e)=>Z2(t,e,uf);function la(t,e,n){const i=arguments.length;return i===2?At(e)&&!We(e)?nu(e)?B(t,null,[e]):B(t,e):B(t,null,e):(i>3?n=Array.prototype.slice.call(arguments,2):i===3&&nu(n)&&(n=[n]),B(t,e,n))}const HE="3.4.29";/** * @vue/runtime-dom v3.4.29 * (c) 2018-present Yuxi (Evan) You and Vue contributors * @license MIT -**/const WA="http://www.w3.org/2000/svg",zA="http://www.w3.org/1998/Math/MathML",Hs=typeof document<"u"?document:null,bg=Hs&&Hs.createElement("template"),KA={insert:(t,e,n)=>{e.insertBefore(t,n||null)},remove:t=>{const e=t.parentNode;e&&e.removeChild(t)},createElement:(t,e,n,s)=>{const i=e==="svg"?Hs.createElementNS(WA,t):e==="mathml"?Hs.createElementNS(zA,t):n?Hs.createElement(t,{is:n}):Hs.createElement(t);return t==="select"&&s&&s.multiple!=null&&i.setAttribute("multiple",s.multiple),i},createText:t=>Hs.createTextNode(t),createComment:t=>Hs.createComment(t),setText:(t,e)=>{t.nodeValue=e},setElementText:(t,e)=>{t.textContent=e},parentNode:t=>t.parentNode,nextSibling:t=>t.nextSibling,querySelector:t=>Hs.querySelector(t),setScopeId(t,e){t.setAttribute(e,"")},insertStaticContent(t,e,n,s,i,o){const r=n?n.previousSibling:e.lastChild;if(i&&(i===o||i.nextSibling))for(;e.insertBefore(i.cloneNode(!0),n),!(i===o||!(i=i.nextSibling)););else{bg.innerHTML=s==="svg"?`${t}`:s==="mathml"?`${t}`:t;const a=bg.content;if(s==="svg"||s==="mathml"){const l=a.firstChild;for(;l.firstChild;)a.appendChild(l.firstChild);a.removeChild(l)}e.insertBefore(a,n)}return[r?r.nextSibling:e.firstChild,n?n.previousSibling:e.lastChild]}},ri="transition",Wr="animation",fr=Symbol("_vtc"),Et=(t,{slots:e})=>$o(TA,Lv(t),e);Et.displayName="Transition";const Iv={name:String,type:String,css:{type:Boolean,default:!0},duration:[String,Number,Object],enterFromClass:String,enterActiveClass:String,enterToClass:String,appearFromClass:String,appearActiveClass:String,appearToClass:String,leaveFromClass:String,leaveActiveClass:String,leaveToClass:String},YA=Et.props=Ft({},kv,Iv),to=(t,e=[])=>{Fe(t)?t.forEach(n=>n(...e)):t&&t(...e)},vg=t=>t?Fe(t)?t.some(e=>e.length>1):t.length>1:!1;function Lv(t){const e={};for(const X in t)X in Iv||(e[X]=t[X]);if(t.css===!1)return e;const{name:n="v",type:s,duration:i,enterFromClass:o=`${n}-enter-from`,enterActiveClass:r=`${n}-enter-active`,enterToClass:a=`${n}-enter-to`,appearFromClass:l=o,appearActiveClass:c=r,appearToClass:u=a,leaveFromClass:d=`${n}-leave-from`,leaveActiveClass:f=`${n}-leave-active`,leaveToClass:g=`${n}-leave-to`}=t,_=UA(i),m=_&&_[0],y=_&&_[1],{onBeforeEnter:v,onEnter:$,onEnterCancelled:A,onLeave:D,onLeaveCancelled:x,onBeforeAppear:w=v,onAppear:S=$,onAppearCancelled:T=A}=e,M=(X,le,Y)=>{ui(X,le?u:a),ui(X,le?c:r),Y&&Y()},E=(X,le)=>{X._isLeaving=!1,ui(X,d),ui(X,g),ui(X,f),le&&le()},V=X=>(le,Y)=>{const R=X?S:$,I=()=>M(le,X,Y);to(R,[le,I]),yg(()=>{ui(le,X?l:o),Fs(le,X?u:a),vg(R)||wg(le,s,m,I)})};return Ft(e,{onBeforeEnter(X){to(v,[X]),Fs(X,o),Fs(X,r)},onBeforeAppear(X){to(w,[X]),Fs(X,l),Fs(X,c)},onEnter:V(!1),onAppear:V(!0),onLeave(X,le){X._isLeaving=!0;const Y=()=>E(X,le);Fs(X,d),Fs(X,f),Nv(),yg(()=>{X._isLeaving&&(ui(X,d),Fs(X,g),vg(D)||wg(X,s,y,Y))}),to(D,[X,Y])},onEnterCancelled(X){M(X,!1),to(A,[X])},onAppearCancelled(X){M(X,!0),to(T,[X])},onLeaveCancelled(X){E(X),to(x,[X])}})}function UA(t){if(t==null)return null;if(ft(t))return[Ru(t.enter),Ru(t.leave)];{const e=Ru(t);return[e,e]}}function Ru(t){return Cb(t)}function Fs(t,e){e.split(/\s+/).forEach(n=>n&&t.classList.add(n)),(t[fr]||(t[fr]=new Set)).add(e)}function ui(t,e){e.split(/\s+/).forEach(s=>s&&t.classList.remove(s));const n=t[fr];n&&(n.delete(e),n.size||(t[fr]=void 0))}function yg(t){requestAnimationFrame(()=>{requestAnimationFrame(t)})}let qA=0;function wg(t,e,n,s){const i=t._endId=++qA,o=()=>{i===t._endId&&s()};if(n)return setTimeout(o,n);const{type:r,timeout:a,propCount:l}=Rv(t,e);if(!r)return s();const c=r+"end";let u=0;const d=()=>{t.removeEventListener(c,f),o()},f=g=>{g.target===t&&++u>=l&&d()};setTimeout(()=>{u(n[_]||"").split(", "),i=s(`${ri}Delay`),o=s(`${ri}Duration`),r=xg(i,o),a=s(`${Wr}Delay`),l=s(`${Wr}Duration`),c=xg(a,l);let u=null,d=0,f=0;e===ri?r>0&&(u=ri,d=r,f=o.length):e===Wr?c>0&&(u=Wr,d=c,f=l.length):(d=Math.max(r,c),u=d>0?r>c?ri:Wr:null,f=u?u===ri?o.length:l.length:0);const g=u===ri&&/\b(transform|all)(,|$)/.test(s(`${ri}Property`).toString());return{type:u,timeout:d,propCount:f,hasTransform:g}}function xg(t,e){for(;t.lengthkg(n)+kg(t[s])))}function kg(t){return t==="auto"?0:Number(t.slice(0,-1).replace(",","."))*1e3}function Nv(){return document.body.offsetHeight}function GA(t,e,n){const s=t[fr];s&&(e=(e?[e,...s]:[...s]).join(" ")),e==null?t.removeAttribute("class"):n?t.setAttribute("class",e):t.className=e}const cc=Symbol("_vod"),Fv=Symbol("_vsh"),Jl={beforeMount(t,{value:e},{transition:n}){t[cc]=t.style.display==="none"?"":t.style.display,n&&e?n.beforeEnter(t):zr(t,e)},mounted(t,{value:e},{transition:n}){n&&e&&n.enter(t)},updated(t,{value:e,oldValue:n},{transition:s}){!e!=!n&&(s?e?(s.beforeEnter(t),zr(t,!0),s.enter(t)):s.leave(t,()=>{zr(t,!1)}):zr(t,e))},beforeUnmount(t,{value:e}){zr(t,e)}};function zr(t,e){t.style.display=e?t[cc]:"none",t[Fv]=!e}const JA=Symbol(""),XA=/(^|;)\s*display\s*:/;function QA(t,e,n){const s=t.style,i=At(n);let o=!1;if(n&&!i){if(e)if(At(e))for(const r of e.split(";")){const a=r.slice(0,r.indexOf(":")).trim();n[a]==null&&Xl(s,a,"")}else for(const r in e)n[r]==null&&Xl(s,r,"");for(const r in n)r==="display"&&(o=!0),Xl(s,r,n[r])}else if(i){if(e!==n){const r=s[JA];r&&(n+=";"+r),s.cssText=n,o=XA.test(n)}}else e&&t.removeAttribute("style");cc in t&&(t[cc]=o?s.display:"",t[Fv]&&(s.display="none"))}const Sg=/\s*!important$/;function Xl(t,e,n){if(Fe(n))n.forEach(s=>Xl(t,e,s));else if(n==null&&(n=""),e.startsWith("--"))t.setProperty(e,n);else{const s=ZA(t,e);Sg.test(n)?t.setProperty(Eo(s),n.replace(Sg,""),"important"):t[s]=n}}const $g=["Webkit","Moz","ms"],Nu={};function ZA(t,e){const n=Nu[e];if(n)return n;let s=Cs(e);if(s!=="filter"&&s in t)return Nu[e]=s;s=Mc(s);for(let i=0;i<$g.length;i++){const o=$g[i]+s;if(o in t)return Nu[e]=o}return e}const Ag="http://www.w3.org/1999/xlink";function Cg(t,e,n,s,i,o=r$(e)){s&&e.startsWith("xlink:")?n==null?t.removeAttributeNS(Ag,e.slice(6,e.length)):t.setAttributeNS(Ag,e,n):n==null||o&&!Tb(n)?t.removeAttribute(e):t.setAttribute(e,o?"":String(n))}function eC(t,e,n,s,i,o,r){if(e==="innerHTML"||e==="textContent"){s&&r(s,i,o),t[e]=n??"";return}const a=t.tagName;if(e==="value"&&a!=="PROGRESS"&&!a.includes("-")){const c=a==="OPTION"?t.getAttribute("value")||"":t.value,u=n==null?"":String(n);(c!==u||!("_value"in t))&&(t.value=u),n==null&&t.removeAttribute(e),t._value=n;return}let l=!1;if(n===""||n==null){const c=typeof t[e];c==="boolean"?n=Tb(n):n==null&&c==="string"?(n="",l=!0):c==="number"&&(n=0,l=!0)}try{t[e]=n}catch{}l&&t.removeAttribute(e)}function zs(t,e,n,s){t.addEventListener(e,n,s)}function tC(t,e,n,s){t.removeEventListener(e,n,s)}const Eg=Symbol("_vei");function nC(t,e,n,s,i=null){const o=t[Eg]||(t[Eg]={}),r=o[e];if(s&&r)r.value=s;else{const[a,l]=sC(e);if(s){const c=o[e]=rC(s,i);zs(t,a,c,l)}else r&&(tC(t,a,r,l),o[e]=void 0)}}const Tg=/(?:Once|Passive|Capture)$/;function sC(t){let e;if(Tg.test(t)){e={};let s;for(;s=t.match(Tg);)t=t.slice(0,t.length-s[0].length),e[s[0].toLowerCase()]=!0}return[t[2]===":"?t.slice(3):Eo(t.slice(2)),e]}let Fu=0;const iC=Promise.resolve(),oC=()=>Fu||(iC.then(()=>Fu=0),Fu=Date.now());function rC(t,e){const n=s=>{if(!s._vts)s._vts=Date.now();else if(s._vts<=n.attached)return;Jn(aC(s,n.value),e,5,[s])};return n.value=t,n.attached=oC(),n}function aC(t,e){if(Fe(e)){const n=t.stopImmediatePropagation;return t.stopImmediatePropagation=()=>{n.call(t),t._stopped=!0},e.map(s=>i=>!i._stopped&&s&&s(i))}else return e}const Pg=t=>t.charCodeAt(0)===111&&t.charCodeAt(1)===110&&t.charCodeAt(2)>96&&t.charCodeAt(2)<123,lC=(t,e,n,s,i,o,r,a,l)=>{const c=i==="svg";e==="class"?GA(t,s,c):e==="style"?QA(t,n,s):Tc(e)?Ah(e)||nC(t,e,n,s,r):(e[0]==="."?(e=e.slice(1),!0):e[0]==="^"?(e=e.slice(1),!1):cC(t,e,s,c))?(eC(t,e,s,o,r,a,l),(e==="value"||e==="checked"||e==="selected")&&Cg(t,e,s,c,r,e!=="value")):(e==="true-value"?t._trueValue=s:e==="false-value"&&(t._falseValue=s),Cg(t,e,s,c))};function cC(t,e,n,s){if(s)return!!(e==="innerHTML"||e==="textContent"||e in t&&Pg(e)&&Ye(n));if(e==="spellcheck"||e==="draggable"||e==="translate"||e==="form"||e==="list"&&t.tagName==="INPUT"||e==="type"&&t.tagName==="TEXTAREA")return!1;if(e==="width"||e==="height"){const i=t.tagName;if(i==="IMG"||i==="VIDEO"||i==="CANVAS"||i==="SOURCE")return!1}return Pg(e)&&At(n)?!1:e in t}const Bv=new WeakMap,Vv=new WeakMap,uc=Symbol("_moveCb"),Mg=Symbol("_enterCb"),Hv={name:"TransitionGroup",props:Ft({},YA,{tag:String,moveClass:String}),setup(t,{slots:e}){const n=Xh(),s=xv();let i,o;return ov(()=>{if(!i.length)return;const r=t.moveClass||`${t.name||"v"}-move`;if(!pC(i[0].el,n.vnode.el,r))return;i.forEach(dC),i.forEach(hC);const a=i.filter(fC);Nv(),a.forEach(l=>{const c=l.el,u=c.style;Fs(c,r),u.transform=u.webkitTransform=u.transitionDuration="";const d=c[uc]=f=>{f&&f.target!==c||(!f||/transform$/.test(f.propertyName))&&(c.removeEventListener("transitionend",d),c[uc]=null,ui(c,r))};c.addEventListener("transitionend",d)})}),()=>{const r=et(t),a=Lv(r);let l=r.tag||Me;if(i=[],o)for(let c=0;cdelete t.mode;Hv.props;const Ni=Hv;function dC(t){const e=t.el;e[uc]&&e[uc](),e[Mg]&&e[Mg]()}function hC(t){Vv.set(t,t.el.getBoundingClientRect())}function fC(t){const e=Bv.get(t),n=Vv.get(t),s=e.left-n.left,i=e.top-n.top;if(s||i){const o=t.el.style;return o.transform=o.webkitTransform=`translate(${s}px,${i}px)`,o.transitionDuration="0s",t}}function pC(t,e,n){const s=t.cloneNode(),i=t[fr];i&&i.forEach(a=>{a.split(/\s+/).forEach(l=>l&&s.classList.remove(l))}),n.split(/\s+/).forEach(a=>a&&s.classList.add(a)),s.style.display="none";const o=e.nodeType===1?e:e.parentNode;o.appendChild(s);const{hasTransform:r}=Rv(s);return o.removeChild(s),r}const Pi=t=>{const e=t.props["onUpdate:modelValue"]||!1;return Fe(e)?n=>Yl(e,n):e};function gC(t){t.target.composing=!0}function Dg(t){const e=t.target;e.composing&&(e.composing=!1,e.dispatchEvent(new Event("input")))}const Xn=Symbol("_assign"),We={created(t,{modifiers:{lazy:e,trim:n,number:s}},i){t[Xn]=Pi(i);const o=s||i.props&&i.props.type==="number";zs(t,e?"change":"input",r=>{if(r.target.composing)return;let a=t.value;n&&(a=a.trim()),o&&(a=sc(a)),t[Xn](a)}),n&&zs(t,"change",()=>{t.value=t.value.trim()}),e||(zs(t,"compositionstart",gC),zs(t,"compositionend",Dg),zs(t,"change",Dg))},mounted(t,{value:e}){t.value=e??""},beforeUpdate(t,{value:e,oldValue:n,modifiers:{lazy:s,trim:i,number:o}},r){if(t[Xn]=Pi(r),t.composing)return;const a=(o||t.type==="number")&&!/^0\d/.test(t.value)?sc(t.value):t.value,l=e??"";a!==l&&(document.activeElement===t&&t.type!=="range"&&(s&&e===n||i&&t.value.trim()===l)||(t.value=l))}},_n={deep:!0,created(t,e,n){t[Xn]=Pi(n),zs(t,"change",()=>{const s=t._modelValue,i=pr(t),o=t.checked,r=t[Xn];if(Fe(s)){const a=Th(s,i),l=a!==-1;if(o&&!l)r(s.concat(i));else if(!o&&l){const c=[...s];c.splice(a,1),r(c)}}else if(Mr(s)){const a=new Set(s);o?a.add(i):a.delete(i),r(a)}else r(jv(t,o))})},mounted:Og,beforeUpdate(t,e,n){t[Xn]=Pi(n),Og(t,e,n)}};function Og(t,{value:e,oldValue:n},s){t._modelValue=e,Fe(e)?t.checked=Th(e,s.props.value)>-1:Mr(e)?t.checked=e.has(s.props.value):e!==n&&(t.checked=So(e,jv(t,!0)))}const mC={created(t,{value:e},n){t.checked=So(e,n.props.value),t[Xn]=Pi(n),zs(t,"change",()=>{t[Xn](pr(t))})},beforeUpdate(t,{value:e,oldValue:n},s){t[Xn]=Pi(s),e!==n&&(t.checked=So(e,s.props.value))}},Ql={deep:!0,created(t,{value:e,modifiers:{number:n}},s){const i=Mr(e);zs(t,"change",()=>{const o=Array.prototype.filter.call(t.options,r=>r.selected).map(r=>n?sc(pr(r)):pr(r));t[Xn](t.multiple?i?new Set(o):o:o[0]),t._assigning=!0,nn(()=>{t._assigning=!1})}),t[Xn]=Pi(s)},mounted(t,{value:e,modifiers:{number:n}}){Ig(t,e)},beforeUpdate(t,e,n){t[Xn]=Pi(n)},updated(t,{value:e,modifiers:{number:n}}){t._assigning||Ig(t,e)}};function Ig(t,e,n){const s=t.multiple,i=Fe(e);if(!(s&&!i&&!Mr(e))){for(let o=0,r=t.options.length;oString(u)===String(l)):a.selected=Th(e,l)>-1}else a.selected=e.has(l);else if(So(pr(a),e)){t.selectedIndex!==o&&(t.selectedIndex=o);return}}!s&&t.selectedIndex!==-1&&(t.selectedIndex=-1)}}function pr(t){return"_value"in t?t._value:t.value}function jv(t,e){const n=e?"_trueValue":"_falseValue";return n in t?t[n]:e}const Wv={created(t,e,n){$l(t,e,n,null,"created")},mounted(t,e,n){$l(t,e,n,null,"mounted")},beforeUpdate(t,e,n,s){$l(t,e,n,s,"beforeUpdate")},updated(t,e,n,s){$l(t,e,n,s,"updated")}};function _C(t,e){switch(t){case"SELECT":return Ql;case"TEXTAREA":return We;default:switch(e){case"checkbox":return _n;case"radio":return mC;default:return We}}}function $l(t,e,n,s,i){const r=_C(t.tagName,n.props&&n.props.type)[i];r&&r(t,e,n,s)}const bC=["ctrl","shift","alt","meta"],vC={stop:t=>t.stopPropagation(),prevent:t=>t.preventDefault(),self:t=>t.target!==t.currentTarget,ctrl:t=>!t.ctrlKey,shift:t=>!t.shiftKey,alt:t=>!t.altKey,meta:t=>!t.metaKey,left:t=>"button"in t&&t.button!==0,middle:t=>"button"in t&&t.button!==1,right:t=>"button"in t&&t.button!==2,exact:(t,e)=>bC.some(n=>t[`${n}Key`]&&!e.includes(n))},Ma=(t,e)=>{const n=t._withMods||(t._withMods={}),s=e.join(".");return n[s]||(n[s]=(i,...o)=>{for(let r=0;r{const n=t._withKeys||(t._withKeys={}),s=e.join(".");return n[s]||(n[s]=i=>{if(!("key"in i))return;const o=Eo(i.key);if(e.some(r=>r===o||yC[r]===o))return t(i)})},xC=Ft({patchProp:lC},KA);let Lg;function zv(){return Lg||(Lg=bA(xC))}const Rg=(...t)=>{zv().render(...t)},kC=(...t)=>{const e=zv().createApp(...t),{mount:n}=e;return e.mount=s=>{const i=$C(s);if(!i)return;const o=e._component;!Ye(o)&&!o.render&&!o.template&&(o.template=i.innerHTML),i.innerHTML="";const r=n(i,!1,SC(i));return i instanceof Element&&(i.removeAttribute("v-cloak"),i.setAttribute("data-v-app","")),r},e};function SC(t){if(t instanceof SVGElement)return"svg";if(typeof MathMLElement=="function"&&t instanceof MathMLElement)return"mathml"}function $C(t){return At(t)?document.querySelector(t):t}var AC=!1;/*! +**/const dD="http://www.w3.org/2000/svg",hD="http://www.w3.org/1998/Math/MathML",Qs=typeof document<"u"?document:null,Av=Qs&&Qs.createElement("template"),fD={insert:(t,e,n)=>{e.insertBefore(t,n||null)},remove:t=>{const e=t.parentNode;e&&e.removeChild(t)},createElement:(t,e,n,i)=>{const s=e==="svg"?Qs.createElementNS(dD,t):e==="mathml"?Qs.createElementNS(hD,t):n?Qs.createElement(t,{is:n}):Qs.createElement(t);return t==="select"&&i&&i.multiple!=null&&s.setAttribute("multiple",i.multiple),s},createText:t=>Qs.createTextNode(t),createComment:t=>Qs.createComment(t),setText:(t,e)=>{t.nodeValue=e},setElementText:(t,e)=>{t.textContent=e},parentNode:t=>t.parentNode,nextSibling:t=>t.nextSibling,querySelector:t=>Qs.querySelector(t),setScopeId(t,e){t.setAttribute(e,"")},insertStaticContent(t,e,n,i,s,r){const o=n?n.previousSibling:e.lastChild;if(s&&(s===r||s.nextSibling))for(;e.insertBefore(s.cloneNode(!0),n),!(s===r||!(s=s.nextSibling)););else{Av.innerHTML=i==="svg"?`${t}`:i==="mathml"?`${t}`:t;const a=Av.content;if(i==="svg"||i==="mathml"){const l=a.firstChild;for(;l.firstChild;)a.appendChild(l.firstChild);a.removeChild(l)}e.insertBefore(a,n)}return[o?o.nextSibling:e.firstChild,n?n.previousSibling:e.lastChild]}},Sr="transition",sc="animation",yl=Symbol("_vtc"),Rt=(t,{slots:e})=>la(ZR,jE(t),e);Rt.displayName="Transition";const YE={name:String,type:String,css:{type:Boolean,default:!0},duration:[String,Number,Object],enterFromClass:String,enterActiveClass:String,enterToClass:String,appearFromClass:String,appearActiveClass:String,appearToClass:String,leaveFromClass:String,leaveActiveClass:String,leaveToClass:String},gD=Rt.props=ln({},DE,YE),Ro=(t,e=[])=>{We(t)?t.forEach(n=>n(...e)):t&&t(...e)},Mv=t=>t?We(t)?t.some(e=>e.length>1):t.length>1:!1;function jE(t){const e={};for(const H in t)H in YE||(e[H]=t[H]);if(t.css===!1)return e;const{name:n="v",type:i,duration:s,enterFromClass:r=`${n}-enter-from`,enterActiveClass:o=`${n}-enter-active`,enterToClass:a=`${n}-enter-to`,appearFromClass:l=r,appearActiveClass:c=o,appearToClass:u=a,leaveFromClass:d=`${n}-leave-from`,leaveActiveClass:h=`${n}-leave-active`,leaveToClass:f=`${n}-leave-to`}=t,p=pD(s),m=p&&p[0],y=p&&p[1],{onBeforeEnter:v,onEnter:b,onEnterCancelled:E,onLeave:C,onLeaveCancelled:w,onBeforeAppear:x=v,onAppear:T=b,onAppearCancelled:k=E}=e,A=(H,te,N)=>{Dr(H,te?u:a),Dr(H,te?c:o),N&&N()},P=(H,te)=>{H._isLeaving=!1,Dr(H,d),Dr(H,f),Dr(H,h),te&&te()},F=H=>(te,N)=>{const L=H?T:b,I=()=>A(te,H,N);Ro(L,[te,I]),Iv(()=>{Dr(te,H?l:r),Gs(te,H?u:a),Mv(L)||Pv(te,i,m,I)})};return ln(e,{onBeforeEnter(H){Ro(v,[H]),Gs(H,r),Gs(H,o)},onBeforeAppear(H){Ro(x,[H]),Gs(H,l),Gs(H,c)},onEnter:F(!1),onAppear:F(!0),onLeave(H,te){H._isLeaving=!0;const N=()=>P(H,te);Gs(H,d),Gs(H,h),UE(),Iv(()=>{H._isLeaving&&(Dr(H,d),Gs(H,f),Mv(C)||Pv(H,i,y,N))}),Ro(C,[H,N])},onEnterCancelled(H){A(H,!1),Ro(E,[H])},onAppearCancelled(H){A(H,!0),Ro(k,[H])},onLeaveCancelled(H){P(H),Ro(w,[H])}})}function pD(t){if(t==null)return null;if(At(t))return[Cg(t.enter),Cg(t.leave)];{const e=Cg(t);return[e,e]}}function Cg(t){return Nx(t)}function Gs(t,e){e.split(/\s+/).forEach(n=>n&&t.classList.add(n)),(t[yl]||(t[yl]=new Set)).add(e)}function Dr(t,e){e.split(/\s+/).forEach(i=>i&&t.classList.remove(i));const n=t[yl];n&&(n.delete(e),n.size||(t[yl]=void 0))}function Iv(t){requestAnimationFrame(()=>{requestAnimationFrame(t)})}let mD=0;function Pv(t,e,n,i){const s=t._endId=++mD,r=()=>{s===t._endId&&i()};if(n)return setTimeout(r,n);const{type:o,timeout:a,propCount:l}=KE(t,e);if(!o)return i();const c=o+"end";let u=0;const d=()=>{t.removeEventListener(c,h),r()},h=f=>{f.target===t&&++u>=l&&d()};setTimeout(()=>{u(n[p]||"").split(", "),s=i(`${Sr}Delay`),r=i(`${Sr}Duration`),o=Rv(s,r),a=i(`${sc}Delay`),l=i(`${sc}Duration`),c=Rv(a,l);let u=null,d=0,h=0;e===Sr?o>0&&(u=Sr,d=o,h=r.length):e===sc?c>0&&(u=sc,d=c,h=l.length):(d=Math.max(o,c),u=d>0?o>c?Sr:sc:null,h=u?u===Sr?r.length:l.length:0);const f=u===Sr&&/\b(transform|all)(,|$)/.test(i(`${Sr}Property`).toString());return{type:u,timeout:d,propCount:h,hasTransform:f}}function Rv(t,e){for(;t.lengthDv(n)+Dv(t[i])))}function Dv(t){return t==="auto"?0:Number(t.slice(0,-1).replace(",","."))*1e3}function UE(){return document.body.offsetHeight}function _D(t,e,n){const i=t[yl];i&&(e=(e?[e,...i]:[...i]).join(" ")),e==null?t.removeAttribute("class"):n?t.setAttribute("class",e):t.className=e}const ph=Symbol("_vod"),GE=Symbol("_vsh"),th={beforeMount(t,{value:e},{transition:n}){t[ph]=t.style.display==="none"?"":t.style.display,n&&e?n.beforeEnter(t):rc(t,e)},mounted(t,{value:e},{transition:n}){n&&e&&n.enter(t)},updated(t,{value:e,oldValue:n},{transition:i}){!e!=!n&&(i?e?(i.beforeEnter(t),rc(t,!0),i.enter(t)):i.leave(t,()=>{rc(t,!1)}):rc(t,e))},beforeUnmount(t,{value:e}){rc(t,e)}};function rc(t,e){t.style.display=e?t[ph]:"none",t[GE]=!e}const yD=Symbol(""),vD=/(^|;)\s*display\s*:/;function bD(t,e,n){const i=t.style,s=Kt(n);let r=!1;if(n&&!s){if(e)if(Kt(e))for(const o of e.split(";")){const a=o.slice(0,o.indexOf(":")).trim();n[a]==null&&nh(i,a,"")}else for(const o in e)n[o]==null&&nh(i,o,"");for(const o in n)o==="display"&&(r=!0),nh(i,o,n[o])}else if(s){if(e!==n){const o=i[yD];o&&(n+=";"+o),i.cssText=n,r=vD.test(n)}}else e&&t.removeAttribute("style");ph in t&&(t[ph]=r?i.display:"",t[GE]&&(i.display="none"))}const $v=/\s*!important$/;function nh(t,e,n){if(We(n))n.forEach(i=>nh(t,e,i));else if(n==null&&(n=""),e.startsWith("--"))t.setProperty(e,n);else{const i=wD(t,e);$v.test(n)?t.setProperty(fa(i),n.replace($v,""),"important"):t[i]=n}}const Lv=["Webkit","Moz","ms"],Tg={};function wD(t,e){const n=Tg[e];if(n)return n;let i=Ls(e);if(i!=="filter"&&i in t)return Tg[e]=i;i=Qh(i);for(let s=0;skg||(TD.then(()=>kg=0),kg=Date.now());function AD(t,e){const n=i=>{if(!i._vts)i._vts=Date.now();else if(i._vts<=n.attached)return;ji(MD(i,n.value),e,5,[i])};return n.value=t,n.attached=kD(),n}function MD(t,e){if(We(e)){const n=t.stopImmediatePropagation;return t.stopImmediatePropagation=()=>{n.call(t),t._stopped=!0},e.map(i=>s=>!s._stopped&&i&&i(s))}else return e}const Vv=t=>t.charCodeAt(0)===111&&t.charCodeAt(1)===110&&t.charCodeAt(2)>96&&t.charCodeAt(2)<123,ID=(t,e,n,i,s,r,o,a,l)=>{const c=s==="svg";e==="class"?_D(t,i,c):e==="style"?bD(t,n,i):Zh(e)?qm(e)||SD(t,e,n,i,o):(e[0]==="."?(e=e.slice(1),!0):e[0]==="^"?(e=e.slice(1),!1):PD(t,e,i,c))?(xD(t,e,i,r,o,a,l),(e==="value"||e==="checked"||e==="selected")&&Nv(t,e,i,c,o,e!=="value")):(e==="true-value"?t._trueValue=i:e==="false-value"&&(t._falseValue=i),Nv(t,e,i,c))};function PD(t,e,n,i){if(i)return!!(e==="innerHTML"||e==="textContent"||e in t&&Vv(e)&&qe(n));if(e==="spellcheck"||e==="draggable"||e==="translate"||e==="form"||e==="list"&&t.tagName==="INPUT"||e==="type"&&t.tagName==="TEXTAREA")return!1;if(e==="width"||e==="height"){const s=t.tagName;if(s==="IMG"||s==="VIDEO"||s==="CANVAS"||s==="SOURCE")return!1}return Vv(e)&&Kt(n)?!1:e in t}const XE=new WeakMap,qE=new WeakMap,mh=Symbol("_moveCb"),zv=Symbol("_enterCb"),ZE={name:"TransitionGroup",props:ln({},gD,{tag:String,moveClass:String}),setup(t,{slots:e}){const n=w_(),i=RE();let s,r;return pE(()=>{if(!s.length)return;const o=t.moveClass||`${t.name||"v"}-move`;if(!OD(s[0].el,n.vnode.el,o))return;s.forEach(DD),s.forEach($D);const a=s.filter(LD);UE(),a.forEach(l=>{const c=l.el,u=c.style;Gs(c,o),u.transform=u.webkitTransform=u.transitionDuration="";const d=c[mh]=h=>{h&&h.target!==c||(!h||/transform$/.test(h.propertyName))&&(c.removeEventListener("transitionend",d),c[mh]=null,Dr(c,o))};c.addEventListener("transitionend",d)})}),()=>{const o=lt(t),a=jE(o);let l=o.tag||$e;if(s=[],r)for(let c=0;cdelete t.mode;ZE.props;const jl=ZE;function DD(t){const e=t.el;e[mh]&&e[mh](),e[zv]&&e[zv]()}function $D(t){qE.set(t,t.el.getBoundingClientRect())}function LD(t){const e=XE.get(t),n=qE.get(t),i=e.left-n.left,s=e.top-n.top;if(i||s){const r=t.el.style;return r.transform=r.webkitTransform=`translate(${i}px,${s}px)`,r.transitionDuration="0s",t}}function OD(t,e,n){const i=t.cloneNode(),s=t[yl];s&&s.forEach(a=>{a.split(/\s+/).forEach(l=>l&&i.classList.remove(l))}),n.split(/\s+/).forEach(a=>a&&i.classList.add(a)),i.style.display="none";const r=e.nodeType===1?e:e.parentNode;r.appendChild(i);const{hasTransform:o}=KE(i);return r.removeChild(i),o}const ro=t=>{const e=t.props["onUpdate:modelValue"]||!1;return We(e)?n=>Zd(e,n):e};function ND(t){t.target.composing=!0}function Wv(t){const e=t.target;e.composing&&(e.composing=!1,e.dispatchEvent(new Event("input")))}const Ki=Symbol("_assign"),Ke={created(t,{modifiers:{lazy:e,trim:n,number:i}},s){t[Ki]=ro(s);const r=i||s.props&&s.props.type==="number";ir(t,e?"change":"input",o=>{if(o.target.composing)return;let a=t.value;n&&(a=a.trim()),r&&(a=ch(a)),t[Ki](a)}),n&&ir(t,"change",()=>{t.value=t.value.trim()}),e||(ir(t,"compositionstart",ND),ir(t,"compositionend",Wv),ir(t,"change",Wv))},mounted(t,{value:e}){t.value=e??""},beforeUpdate(t,{value:e,oldValue:n,modifiers:{lazy:i,trim:s,number:r}},o){if(t[Ki]=ro(o),t.composing)return;const a=(r||t.type==="number")&&!/^0\d/.test(t.value)?ch(t.value):t.value,l=e??"";a!==l&&(document.activeElement===t&&t.type!=="range"&&(i&&e===n||s&&t.value.trim()===l)||(t.value=l))}},Jn={deep:!0,created(t,e,n){t[Ki]=ro(n),ir(t,"change",()=>{const i=t._modelValue,s=vl(t),r=t.checked,o=t[Ki];if(We(i)){const a=Qm(i,s),l=a!==-1;if(r&&!l)o(i.concat(s));else if(!r&&l){const c=[...i];c.splice(a,1),o(c)}}else if(Hl(i)){const a=new Set(i);r?a.add(s):a.delete(s),o(a)}else o(JE(t,r))})},mounted:Hv,beforeUpdate(t,e,n){t[Ki]=ro(n),Hv(t,e,n)}};function Hv(t,{value:e,oldValue:n},i){t._modelValue=e,We(e)?t.checked=Qm(e,i.props.value)>-1:Hl(e)?t.checked=e.has(i.props.value):e!==n&&(t.checked=aa(e,JE(t,!0)))}const FD={created(t,{value:e},n){t.checked=aa(e,n.props.value),t[Ki]=ro(n),ir(t,"change",()=>{t[Ki](vl(t))})},beforeUpdate(t,{value:e,oldValue:n},i){t[Ki]=ro(i),e!==n&&(t.checked=aa(e,i.props.value))}},ih={deep:!0,created(t,{value:e,modifiers:{number:n}},i){const s=Hl(e);ir(t,"change",()=>{const r=Array.prototype.filter.call(t.options,o=>o.selected).map(o=>n?ch(vl(o)):vl(o));t[Ki](t.multiple?s?new Set(r):r:r[0]),t._assigning=!0,Rn(()=>{t._assigning=!1})}),t[Ki]=ro(i)},mounted(t,{value:e,modifiers:{number:n}}){Yv(t,e)},beforeUpdate(t,e,n){t[Ki]=ro(n)},updated(t,{value:e,modifiers:{number:n}}){t._assigning||Yv(t,e)}};function Yv(t,e,n){const i=t.multiple,s=We(e);if(!(i&&!s&&!Hl(e))){for(let r=0,o=t.options.length;rString(u)===String(l)):a.selected=Qm(e,l)>-1}else a.selected=e.has(l);else if(aa(vl(a),e)){t.selectedIndex!==r&&(t.selectedIndex=r);return}}!i&&t.selectedIndex!==-1&&(t.selectedIndex=-1)}}function vl(t){return"_value"in t?t._value:t.value}function JE(t,e){const n=e?"_trueValue":"_falseValue";return n in t?t[n]:e}const QE={created(t,e,n){vd(t,e,n,null,"created")},mounted(t,e,n){vd(t,e,n,null,"mounted")},beforeUpdate(t,e,n,i){vd(t,e,n,i,"beforeUpdate")},updated(t,e,n,i){vd(t,e,n,i,"updated")}};function BD(t,e){switch(t){case"SELECT":return ih;case"TEXTAREA":return Ke;default:switch(e){case"checkbox":return Jn;case"radio":return FD;default:return Ke}}}function vd(t,e,n,i,s){const o=BD(t.tagName,n.props&&n.props.type)[s];o&&o(t,e,n,i)}const VD=["ctrl","shift","alt","meta"],zD={stop:t=>t.stopPropagation(),prevent:t=>t.preventDefault(),self:t=>t.target!==t.currentTarget,ctrl:t=>!t.ctrlKey,shift:t=>!t.shiftKey,alt:t=>!t.altKey,meta:t=>!t.metaKey,left:t=>"button"in t&&t.button!==0,middle:t=>"button"in t&&t.button!==1,right:t=>"button"in t&&t.button!==2,exact:(t,e)=>VD.some(n=>t[`${n}Key`]&&!e.includes(n))},iu=(t,e)=>{const n=t._withMods||(t._withMods={}),i=e.join(".");return n[i]||(n[i]=(s,...r)=>{for(let o=0;o{const n=t._withKeys||(t._withKeys={}),i=e.join(".");return n[i]||(n[i]=s=>{if(!("key"in s))return;const r=fa(s.key);if(e.some(o=>o===r||WD[o]===r))return t(s)})},HD=ln({patchProp:ID},fD);let jv;function tS(){return jv||(jv=VR(HD))}const Kv=(...t)=>{tS().render(...t)},YD=(...t)=>{const e=tS().createApp(...t),{mount:n}=e;return e.mount=i=>{const s=KD(i);if(!s)return;const r=e._component;!qe(r)&&!r.render&&!r.template&&(r.template=s.innerHTML),s.innerHTML="";const o=n(s,!1,jD(s));return s instanceof Element&&(s.removeAttribute("v-cloak"),s.setAttribute("data-v-app","")),o},e};function jD(t){if(t instanceof SVGElement)return"svg";if(typeof MathMLElement=="function"&&t instanceof MathMLElement)return"mathml"}function KD(t){return Kt(t)?document.querySelector(t):t}var UD=!1;/*! * pinia v2.1.7 * (c) 2023 Eduardo San Martin Morote * @license MIT - */let Kv;const Wc=t=>Kv=t,Yv=Symbol();function Rd(t){return t&&typeof t=="object"&&Object.prototype.toString.call(t)==="[object Object]"&&typeof t.toJSON!="function"}var fa;(function(t){t.direct="direct",t.patchObject="patch object",t.patchFunction="patch function"})(fa||(fa={}));function CC(){const t=Db(!0),e=t.run(()=>be({}));let n=[],s=[];const i=Lc({install(o){Wc(i),i._a=o,o.provide(Yv,i),o.config.globalProperties.$pinia=i,s.forEach(r=>n.push(r)),s=[]},use(o){return!this._a&&!AC?s.push(o):n.push(o),this},_p:n,_a:null,_e:t,_s:new Map,state:e});return i}const Uv=()=>{};function Ng(t,e,n,s=Uv){t.push(e);const i=()=>{const o=t.indexOf(e);o>-1&&(t.splice(o,1),s())};return!n&&Dc()&&Ph(i),i}function zo(t,...e){t.slice().forEach(n=>{n(...e)})}const EC=t=>t();function Nd(t,e){t instanceof Map&&e instanceof Map&&e.forEach((n,s)=>t.set(s,n)),t instanceof Set&&e instanceof Set&&e.forEach(t.add,t);for(const n in e){if(!e.hasOwnProperty(n))continue;const s=e[n],i=t[n];Rd(i)&&Rd(s)&&t.hasOwnProperty(n)&&!Mt(s)&&!_o(s)?t[n]=Nd(i,s):t[n]=s}return t}const TC=Symbol();function PC(t){return!Rd(t)||!t.hasOwnProperty(TC)}const{assign:di}=Object;function MC(t){return!!(Mt(t)&&t.effect)}function DC(t,e,n,s){const{state:i,actions:o,getters:r}=e,a=n.state.value[t];let l;function c(){a||(n.state.value[t]=i?i():{});const u=D$(n.state.value[t]);return di(u,o,Object.keys(r||{}).reduce((d,f)=>(d[f]=Lc(_e(()=>{Wc(n);const g=n._s.get(t);return r[f].call(g,g)})),d),{}))}return l=qv(t,c,e,n,s,!0),l}function qv(t,e,n={},s,i,o){let r;const a=di({actions:{}},n),l={deep:!0};let c,u,d=[],f=[],g;const _=s.state.value[t];!o&&!_&&(s.state.value[t]={}),be({});let m;function y(T){let M;c=u=!1,typeof T=="function"?(T(s.state.value[t]),M={type:fa.patchFunction,storeId:t,events:g}):(Nd(s.state.value[t],T),M={type:fa.patchObject,payload:T,storeId:t,events:g});const E=m=Symbol();nn().then(()=>{m===E&&(c=!0)}),u=!0,zo(d,M,s.state.value[t])}const v=o?function(){const{state:M}=n,E=M?M():{};this.$patch(V=>{di(V,E)})}:Uv;function $(){r.stop(),d=[],f=[],s._s.delete(t)}function A(T,M){return function(){Wc(s);const E=Array.from(arguments),V=[],X=[];function le(I){V.push(I)}function Y(I){X.push(I)}zo(f,{args:E,name:T,store:x,after:le,onError:Y});let R;try{R=M.apply(this&&this.$id===t?this:x,E)}catch(I){throw zo(X,I),I}return R instanceof Promise?R.then(I=>(zo(V,I),I)).catch(I=>(zo(X,I),Promise.reject(I))):(zo(V,R),R)}}const D={_p:s,$id:t,$onAction:Ng.bind(null,f),$patch:y,$reset:v,$subscribe(T,M={}){const E=Ng(d,T,M.detached,()=>V()),V=r.run(()=>Ht(()=>s.state.value[t],X=>{(M.flush==="sync"?u:c)&&T({storeId:t,type:fa.direct,events:g},X)},di({},l,M)));return E},$dispose:$},x=Ts(D);s._s.set(t,x);const S=(s._a&&s._a.runWithContext||EC)(()=>s._e.run(()=>(r=Db()).run(e)));for(const T in S){const M=S[T];if(Mt(M)&&!MC(M)||_o(M))o||(_&&PC(M)&&(Mt(M)?M.value=_[T]:Nd(M,_[T])),s.state.value[t][T]=M);else if(typeof M=="function"){const E=A(T,M);S[T]=E,a.actions[T]=M}}return di(x,S),di(et(x),S),Object.defineProperty(x,"$state",{get:()=>s.state.value[t],set:T=>{y(M=>{di(M,T)})}}),s._p.forEach(T=>{di(x,r.run(()=>T({store:x,app:s._a,pinia:s,options:a})))}),_&&o&&n.hydrate&&n.hydrate(x.$state,_),c=!0,u=!0,x}function Qh(t,e,n){let s,i;const o=typeof e=="function";typeof t=="string"?(s=t,i=o?n:e):(i=t,s=t.id);function r(a,l){const c=hA();return a=a||(c?as(Yv,null):null),a&&Wc(a),a=Kv,a._s.has(s)||(o?qv(s,e,i,a):DC(s,i,a)),a._s.get(s)}return r.$id=s,r}/*! + */let nS;const hf=t=>nS=t,iS=Symbol();function Kp(t){return t&&typeof t=="object"&&Object.prototype.toString.call(t)==="[object Object]"&&typeof t.toJSON!="function"}var Fc;(function(t){t.direct="direct",t.patchObject="patch object",t.patchFunction="patch function"})(Fc||(Fc={}));function GD(){const t=Wx(!0),e=t.run(()=>we({}));let n=[],i=[];const s=sf({install(r){hf(s),s._a=r,r.provide(iS,s),r.config.globalProperties.$pinia=s,i.forEach(o=>n.push(o)),i=[]},use(r){return!this._a&&!UD?i.push(r):n.push(r),this},_p:n,_a:null,_e:t,_s:new Map,state:e});return s}const sS=()=>{};function Uv(t,e,n,i=sS){t.push(e);const s=()=>{const r=t.indexOf(e);r>-1&&(t.splice(r,1),i())};return!n&&ef()&&e_(s),s}function Ia(t,...e){t.slice().forEach(n=>{n(...e)})}const XD=t=>t();function Up(t,e){t instanceof Map&&e instanceof Map&&e.forEach((n,i)=>t.set(i,n)),t instanceof Set&&e instanceof Set&&e.forEach(t.add,t);for(const n in e){if(!e.hasOwnProperty(n))continue;const i=e[n],s=t[n];Kp(s)&&Kp(i)&&t.hasOwnProperty(n)&&!Qt(i)&&!ea(i)?t[n]=Up(s,i):t[n]=i}return t}const qD=Symbol();function ZD(t){return!Kp(t)||!t.hasOwnProperty(qD)}const{assign:$r}=Object;function JD(t){return!!(Qt(t)&&t.effect)}function QD(t,e,n,i){const{state:s,actions:r,getters:o}=e,a=n.state.value[t];let l;function c(){a||(n.state.value[t]=s?s():{});const u=eR(n.state.value[t]);return $r(u,r,Object.keys(o||{}).reduce((d,h)=>(d[h]=sf(be(()=>{hf(n);const f=n._s.get(t);return o[h].call(f,f)})),d),{}))}return l=rS(t,c,e,n,i,!0),l}function rS(t,e,n={},i,s,r){let o;const a=$r({actions:{}},n),l={deep:!0};let c,u,d=[],h=[],f;const p=i.state.value[t];!r&&!p&&(i.state.value[t]={}),we({});let m;function y(k){let A;c=u=!1,typeof k=="function"?(k(i.state.value[t]),A={type:Fc.patchFunction,storeId:t,events:f}):(Up(i.state.value[t],k),A={type:Fc.patchObject,payload:k,storeId:t,events:f});const P=m=Symbol();Rn().then(()=>{m===P&&(c=!0)}),u=!0,Ia(d,A,i.state.value[t])}const v=r?function(){const{state:A}=n,P=A?A():{};this.$patch(F=>{$r(F,P)})}:sS;function b(){o.stop(),d=[],h=[],i._s.delete(t)}function E(k,A){return function(){hf(i);const P=Array.from(arguments),F=[],H=[];function te(I){F.push(I)}function N(I){H.push(I)}Ia(h,{args:P,name:k,store:w,after:te,onError:N});let L;try{L=A.apply(this&&this.$id===t?this:w,P)}catch(I){throw Ia(H,I),I}return L instanceof Promise?L.then(I=>(Ia(F,I),I)).catch(I=>(Ia(H,I),Promise.reject(I))):(Ia(F,L),L)}}const C={_p:i,$id:t,$onAction:Uv.bind(null,h),$patch:y,$reset:v,$subscribe(k,A={}){const P=Uv(d,k,A.detached,()=>F()),F=o.run(()=>fn(()=>i.state.value[t],H=>{(A.flush==="sync"?u:c)&&k({storeId:t,type:Fc.direct,events:f},H)},$r({},l,A)));return P},$dispose:b},w=Ns(C);i._s.set(t,w);const T=(i._a&&i._a.runWithContext||XD)(()=>i._e.run(()=>(o=Wx()).run(e)));for(const k in T){const A=T[k];if(Qt(A)&&!JD(A)||ea(A))r||(p&&ZD(A)&&(Qt(A)?A.value=p[k]:Up(A,p[k])),i.state.value[t][k]=A);else if(typeof A=="function"){const P=E(k,A);T[k]=P,a.actions[k]=A}}return $r(w,T),$r(lt(w),T),Object.defineProperty(w,"$state",{get:()=>i.state.value[t],set:k=>{y(A=>{$r(A,k)})}}),i._p.forEach(k=>{$r(w,o.run(()=>k({store:w,app:i._a,pinia:i,options:a})))}),p&&r&&n.hydrate&&n.hydrate(w.$state,p),c=!0,u=!0,w}function x_(t,e,n){let i,s;const r=typeof e=="function";typeof t=="string"?(i=t,s=r?n:e):(s=t,i=t.id);function o(a,l){const c=$R();return a=a||(c?cs(iS,null):null),a&&hf(a),a=nS,a._s.has(i)||(r?rS(i,e,s,a):QD(i,s,a)),a._s.get(i)}return o.$id=i,o}/*! * vue-router v4.2.5 * (c) 2023 Eduardo San Martin Morote * @license MIT - */const Xo=typeof window<"u";function OC(t){return t.__esModule||t[Symbol.toStringTag]==="Module"}const ct=Object.assign;function Bu(t,e){const n={};for(const s in e){const i=e[s];n[s]=cs(i)?i.map(t):t(i)}return n}const pa=()=>{},cs=Array.isArray,IC=/\/$/,LC=t=>t.replace(IC,"");function Vu(t,e,n="/"){let s,i={},o="",r="";const a=e.indexOf("#");let l=e.indexOf("?");return a=0&&(l=-1),l>-1&&(s=e.slice(0,l),o=e.slice(l+1,a>-1?a:e.length),i=t(o)),a>-1&&(s=s||e.slice(0,a),r=e.slice(a,e.length)),s=BC(s??e,n),{fullPath:s+(o&&"?")+o+r,path:s,query:i,hash:r}}function RC(t,e){const n=e.query?t(e.query):"";return e.path+(n&&"?")+n+(e.hash||"")}function Fg(t,e){return!e||!t.toLowerCase().startsWith(e.toLowerCase())?t:t.slice(e.length)||"/"}function NC(t,e,n){const s=e.matched.length-1,i=n.matched.length-1;return s>-1&&s===i&&gr(e.matched[s],n.matched[i])&&Gv(e.params,n.params)&&t(e.query)===t(n.query)&&e.hash===n.hash}function gr(t,e){return(t.aliasOf||t)===(e.aliasOf||e)}function Gv(t,e){if(Object.keys(t).length!==Object.keys(e).length)return!1;for(const n in t)if(!FC(t[n],e[n]))return!1;return!0}function FC(t,e){return cs(t)?Bg(t,e):cs(e)?Bg(e,t):t===e}function Bg(t,e){return cs(e)?t.length===e.length&&t.every((n,s)=>n===e[s]):t.length===1&&t[0]===e}function BC(t,e){if(t.startsWith("/"))return t;if(!t)return e;const n=e.split("/"),s=t.split("/"),i=s[s.length-1];(i===".."||i===".")&&s.push("");let o=n.length-1,r,a;for(r=0;r1&&o--;else break;return n.slice(0,o).join("/")+"/"+s.slice(r-(r===s.length?1:0)).join("/")}var Da;(function(t){t.pop="pop",t.push="push"})(Da||(Da={}));var ga;(function(t){t.back="back",t.forward="forward",t.unknown=""})(ga||(ga={}));function VC(t){if(!t)if(Xo){const e=document.querySelector("base");t=e&&e.getAttribute("href")||"/",t=t.replace(/^\w+:\/\/[^\/]+/,"")}else t="/";return t[0]!=="/"&&t[0]!=="#"&&(t="/"+t),LC(t)}const HC=/^[^#]+#/;function jC(t,e){return t.replace(HC,"#")+e}function WC(t,e){const n=document.documentElement.getBoundingClientRect(),s=t.getBoundingClientRect();return{behavior:e.behavior,left:s.left-n.left-(e.left||0),top:s.top-n.top-(e.top||0)}}const zc=()=>({left:window.pageXOffset,top:window.pageYOffset});function zC(t){let e;if("el"in t){const n=t.el,s=typeof n=="string"&&n.startsWith("#"),i=typeof n=="string"?s?document.getElementById(n.slice(1)):document.querySelector(n):n;if(!i)return;e=WC(i,t)}else e=t;"scrollBehavior"in document.documentElement.style?window.scrollTo(e):window.scrollTo(e.left!=null?e.left:window.pageXOffset,e.top!=null?e.top:window.pageYOffset)}function Vg(t,e){return(history.state?history.state.position-e:-1)+t}const Fd=new Map;function KC(t,e){Fd.set(t,e)}function YC(t){const e=Fd.get(t);return Fd.delete(t),e}let UC=()=>location.protocol+"//"+location.host;function Jv(t,e){const{pathname:n,search:s,hash:i}=e,o=t.indexOf("#");if(o>-1){let a=i.includes(t.slice(o))?t.slice(o).length:1,l=i.slice(a);return l[0]!=="/"&&(l="/"+l),Fg(l,"")}return Fg(n,t)+s+i}function qC(t,e,n,s){let i=[],o=[],r=null;const a=({state:f})=>{const g=Jv(t,location),_=n.value,m=e.value;let y=0;if(f){if(n.value=g,e.value=f,r&&r===_){r=null;return}y=m?f.position-m.position:0}else s(g);i.forEach(v=>{v(n.value,_,{delta:y,type:Da.pop,direction:y?y>0?ga.forward:ga.back:ga.unknown})})};function l(){r=n.value}function c(f){i.push(f);const g=()=>{const _=i.indexOf(f);_>-1&&i.splice(_,1)};return o.push(g),g}function u(){const{history:f}=window;f.state&&f.replaceState(ct({},f.state,{scroll:zc()}),"")}function d(){for(const f of o)f();o=[],window.removeEventListener("popstate",a),window.removeEventListener("beforeunload",u)}return window.addEventListener("popstate",a),window.addEventListener("beforeunload",u,{passive:!0}),{pauseListeners:l,listen:c,destroy:d}}function Hg(t,e,n,s=!1,i=!1){return{back:t,current:e,forward:n,replaced:s,position:window.history.length,scroll:i?zc():null}}function GC(t){const{history:e,location:n}=window,s={value:Jv(t,n)},i={value:e.state};i.value||o(s.value,{back:null,current:s.value,forward:null,position:e.length-1,replaced:!0,scroll:null},!0);function o(l,c,u){const d=t.indexOf("#"),f=d>-1?(n.host&&document.querySelector("base")?t:t.slice(d))+l:UC()+t+l;try{e[u?"replaceState":"pushState"](c,"",f),i.value=c}catch(g){console.error(g),n[u?"replace":"assign"](f)}}function r(l,c){const u=ct({},e.state,Hg(i.value.back,l,i.value.forward,!0),c,{position:i.value.position});o(l,u,!0),s.value=l}function a(l,c){const u=ct({},i.value,e.state,{forward:l,scroll:zc()});o(u.current,u,!0);const d=ct({},Hg(s.value,l,null),{position:u.position+1},c);o(l,d,!1),s.value=l}return{location:s,state:i,push:a,replace:r}}function JC(t){t=VC(t);const e=GC(t),n=qC(t,e.state,e.location,e.replace);function s(o,r=!0){r||n.pauseListeners(),history.go(o)}const i=ct({location:"",base:t,go:s,createHref:jC.bind(null,t)},e,n);return Object.defineProperty(i,"location",{enumerable:!0,get:()=>e.location.value}),Object.defineProperty(i,"state",{enumerable:!0,get:()=>e.state.value}),i}function XC(t){return t=location.host?t||location.pathname+location.search:"",t.includes("#")||(t+="#"),JC(t)}function QC(t){return typeof t=="string"||t&&typeof t=="object"}function Xv(t){return typeof t=="string"||typeof t=="symbol"}const ai={path:"/",name:void 0,params:{},query:{},hash:"",fullPath:"/",matched:[],meta:{},redirectedFrom:void 0},Qv=Symbol("");var jg;(function(t){t[t.aborted=4]="aborted",t[t.cancelled=8]="cancelled",t[t.duplicated=16]="duplicated"})(jg||(jg={}));function mr(t,e){return ct(new Error,{type:t,[Qv]:!0},e)}function Rs(t,e){return t instanceof Error&&Qv in t&&(e==null||!!(t.type&e))}const Wg="[^/]+?",ZC={sensitive:!1,strict:!1,start:!0,end:!0},eE=/[.+*?^${}()[\]/\\]/g;function tE(t,e){const n=ct({},ZC,e),s=[];let i=n.start?"^":"";const o=[];for(const c of t){const u=c.length?[]:[90];n.strict&&!c.length&&(i+="/");for(let d=0;de.length?e.length===1&&e[0]===80?1:-1:0}function sE(t,e){let n=0;const s=t.score,i=e.score;for(;n0&&e[e.length-1]<0}const iE={type:0,value:""},oE=/[a-zA-Z0-9_]/;function rE(t){if(!t)return[[]];if(t==="/")return[[iE]];if(!t.startsWith("/"))throw new Error(`Invalid path "${t}"`);function e(g){throw new Error(`ERR (${n})/"${c}": ${g}`)}let n=0,s=n;const i=[];let o;function r(){o&&i.push(o),o=[]}let a=0,l,c="",u="";function d(){c&&(n===0?o.push({type:0,value:c}):n===1||n===2||n===3?(o.length>1&&(l==="*"||l==="+")&&e(`A repeatable param (${c}) must be alone in its segment. eg: '/:ids+.`),o.push({type:1,value:c,regexp:u,repeatable:l==="*"||l==="+",optional:l==="*"||l==="?"})):e("Invalid state to consume buffer"),c="")}function f(){c+=l}for(;a{r($)}:pa}function r(u){if(Xv(u)){const d=s.get(u);d&&(s.delete(u),n.splice(n.indexOf(d),1),d.children.forEach(r),d.alias.forEach(r))}else{const d=n.indexOf(u);d>-1&&(n.splice(d,1),u.record.name&&s.delete(u.record.name),u.children.forEach(r),u.alias.forEach(r))}}function a(){return n}function l(u){let d=0;for(;d=0&&(u.record.path!==n[d].record.path||!Zv(u,n[d]));)d++;n.splice(d,0,u),u.record.name&&!Yg(u)&&s.set(u.record.name,u)}function c(u,d){let f,g={},_,m;if("name"in u&&u.name){if(f=s.get(u.name),!f)throw mr(1,{location:u});m=f.record.name,g=ct(Kg(d.params,f.keys.filter($=>!$.optional).map($=>$.name)),u.params&&Kg(u.params,f.keys.map($=>$.name))),_=f.stringify(g)}else if("path"in u)_=u.path,f=n.find($=>$.re.test(_)),f&&(g=f.parse(_),m=f.record.name);else{if(f=d.name?s.get(d.name):n.find($=>$.re.test(d.path)),!f)throw mr(1,{location:u,currentLocation:d});m=f.record.name,g=ct({},d.params,u.params),_=f.stringify(g)}const y=[];let v=f;for(;v;)y.unshift(v.record),v=v.parent;return{name:m,path:_,params:g,matched:y,meta:dE(y)}}return t.forEach(u=>o(u)),{addRoute:o,resolve:c,removeRoute:r,getRoutes:a,getRecordMatcher:i}}function Kg(t,e){const n={};for(const s of e)s in t&&(n[s]=t[s]);return n}function cE(t){return{path:t.path,redirect:t.redirect,name:t.name,meta:t.meta||{},aliasOf:void 0,beforeEnter:t.beforeEnter,props:uE(t),children:t.children||[],instances:{},leaveGuards:new Set,updateGuards:new Set,enterCallbacks:{},components:"components"in t?t.components||null:t.component&&{default:t.component}}}function uE(t){const e={},n=t.props||!1;if("component"in t)e.default=n;else for(const s in t.components)e[s]=typeof n=="object"?n[s]:n;return e}function Yg(t){for(;t;){if(t.record.aliasOf)return!0;t=t.parent}return!1}function dE(t){return t.reduce((e,n)=>ct(e,n.meta),{})}function Ug(t,e){const n={};for(const s in t)n[s]=s in e?e[s]:t[s];return n}function Zv(t,e){return e.children.some(n=>n===t||Zv(t,n))}const ey=/#/g,hE=/&/g,fE=/\//g,pE=/=/g,gE=/\?/g,ty=/\+/g,mE=/%5B/g,_E=/%5D/g,ny=/%5E/g,bE=/%60/g,sy=/%7B/g,vE=/%7C/g,iy=/%7D/g,yE=/%20/g;function Zh(t){return encodeURI(""+t).replace(vE,"|").replace(mE,"[").replace(_E,"]")}function wE(t){return Zh(t).replace(sy,"{").replace(iy,"}").replace(ny,"^")}function Bd(t){return Zh(t).replace(ty,"%2B").replace(yE,"+").replace(ey,"%23").replace(hE,"%26").replace(bE,"`").replace(sy,"{").replace(iy,"}").replace(ny,"^")}function xE(t){return Bd(t).replace(pE,"%3D")}function kE(t){return Zh(t).replace(ey,"%23").replace(gE,"%3F")}function SE(t){return t==null?"":kE(t).replace(fE,"%2F")}function dc(t){try{return decodeURIComponent(""+t)}catch{}return""+t}function $E(t){const e={};if(t===""||t==="?")return e;const s=(t[0]==="?"?t.slice(1):t).split("&");for(let i=0;io&&Bd(o)):[s&&Bd(s)]).forEach(o=>{o!==void 0&&(e+=(e.length?"&":"")+n,o!=null&&(e+="="+o))})}return e}function AE(t){const e={};for(const n in t){const s=t[n];s!==void 0&&(e[n]=cs(s)?s.map(i=>i==null?null:""+i):s==null?s:""+s)}return e}const CE=Symbol(""),Gg=Symbol(""),ef=Symbol(""),tf=Symbol(""),Vd=Symbol("");function Kr(){let t=[];function e(s){return t.push(s),()=>{const i=t.indexOf(s);i>-1&&t.splice(i,1)}}function n(){t=[]}return{add:e,list:()=>t.slice(),reset:n}}function gi(t,e,n,s,i){const o=s&&(s.enterCallbacks[i]=s.enterCallbacks[i]||[]);return()=>new Promise((r,a)=>{const l=d=>{d===!1?a(mr(4,{from:n,to:e})):d instanceof Error?a(d):QC(d)?a(mr(2,{from:e,to:d})):(o&&s.enterCallbacks[i]===o&&typeof d=="function"&&o.push(d),r())},c=t.call(s&&s.instances[i],e,n,l);let u=Promise.resolve(c);t.length<3&&(u=u.then(l)),u.catch(d=>a(d))})}function Hu(t,e,n,s){const i=[];for(const o of t)for(const r in o.components){let a=o.components[r];if(!(e!=="beforeRouteEnter"&&!o.instances[r]))if(EE(a)){const c=(a.__vccOpts||a)[e];c&&i.push(gi(c,n,s,o,r))}else{let l=a();i.push(()=>l.then(c=>{if(!c)return Promise.reject(new Error(`Couldn't resolve component "${r}" at "${o.path}"`));const u=OC(c)?c.default:c;o.components[r]=u;const f=(u.__vccOpts||u)[e];return f&&gi(f,n,s,o,r)()}))}}return i}function EE(t){return typeof t=="object"||"displayName"in t||"props"in t||"__vccOpts"in t}function Jg(t){const e=as(ef),n=as(tf),s=_e(()=>e.resolve(G(t.to))),i=_e(()=>{const{matched:l}=s.value,{length:c}=l,u=l[c-1],d=n.matched;if(!u||!d.length)return-1;const f=d.findIndex(gr.bind(null,u));if(f>-1)return f;const g=Xg(l[c-2]);return c>1&&Xg(u)===g&&d[d.length-1].path!==g?d.findIndex(gr.bind(null,l[c-2])):f}),o=_e(()=>i.value>-1&&DE(n.params,s.value.params)),r=_e(()=>i.value>-1&&i.value===n.matched.length-1&&Gv(n.params,s.value.params));function a(l={}){return ME(l)?e[G(t.replace)?"replace":"push"](G(t.to)).catch(pa):Promise.resolve()}return{route:s,href:_e(()=>s.value.href),isActive:o,isExactActive:r,navigate:a}}const TE=Bt({name:"RouterLink",compatConfig:{MODE:3},props:{to:{type:[String,Object],required:!0},replace:Boolean,activeClass:String,exactActiveClass:String,custom:Boolean,ariaCurrentValue:{type:String,default:"page"}},useLink:Jg,setup(t,{slots:e}){const n=Ts(Jg(t)),{options:s}=as(ef),i=_e(()=>({[Qg(t.activeClass,s.linkActiveClass,"router-link-active")]:n.isActive,[Qg(t.exactActiveClass,s.linkExactActiveClass,"router-link-exact-active")]:n.isExactActive}));return()=>{const o=e.default&&e.default(n);return t.custom?o:$o("a",{"aria-current":n.isExactActive?t.ariaCurrentValue:null,href:n.href,onClick:n.navigate,class:i.value},o)}}}),PE=TE;function ME(t){if(!(t.metaKey||t.altKey||t.ctrlKey||t.shiftKey)&&!t.defaultPrevented&&!(t.button!==void 0&&t.button!==0)){if(t.currentTarget&&t.currentTarget.getAttribute){const e=t.currentTarget.getAttribute("target");if(/\b_blank\b/i.test(e))return}return t.preventDefault&&t.preventDefault(),!0}}function DE(t,e){for(const n in e){const s=e[n],i=t[n];if(typeof s=="string"){if(s!==i)return!1}else if(!cs(i)||i.length!==s.length||s.some((o,r)=>o!==i[r]))return!1}return!0}function Xg(t){return t?t.aliasOf?t.aliasOf.path:t.path:""}const Qg=(t,e,n)=>t??e??n,OE=Bt({name:"RouterView",inheritAttrs:!1,props:{name:{type:String,default:"default"},route:Object},compatConfig:{MODE:3},setup(t,{attrs:e,slots:n}){const s=as(Vd),i=_e(()=>t.route||s.value),o=as(Gg,0),r=_e(()=>{let c=G(o);const{matched:u}=i.value;let d;for(;(d=u[c])&&!d.components;)c++;return c}),a=_e(()=>i.value.matched[r.value]);ql(Gg,_e(()=>r.value+1)),ql(CE,a),ql(Vd,i);const l=be();return Ht(()=>[l.value,a.value,t.name],([c,u,d],[f,g,_])=>{u&&(u.instances[d]=c,g&&g!==u&&c&&c===f&&(u.leaveGuards.size||(u.leaveGuards=g.leaveGuards),u.updateGuards.size||(u.updateGuards=g.updateGuards))),c&&u&&(!g||!gr(u,g)||!f)&&(u.enterCallbacks[d]||[]).forEach(m=>m(c))},{flush:"post"}),()=>{const c=i.value,u=t.name,d=a.value,f=d&&d.components[u];if(!f)return Zg(n.default,{Component:f,route:c});const g=d.props[u],_=g?g===!0?c.params:typeof g=="function"?g(c):g:null,y=$o(f,ct({},_,e,{onVnodeUnmounted:v=>{v.component.isUnmounted&&(d.instances[u]=null)},ref:l}));return Zg(n.default,{Component:y,route:c})||y}}});function Zg(t,e){if(!t)return null;const n=t(e);return n.length===1?n[0]:n}const oy=OE;function IE(t){const e=lE(t.routes,t),n=t.parseQuery||$E,s=t.stringifyQuery||qg,i=t.history,o=Kr(),r=Kr(),a=Kr(),l=Fh(ai);let c=ai;Xo&&t.scrollBehavior&&"scrollRestoration"in history&&(history.scrollRestoration="manual");const u=Bu.bind(null,P=>""+P),d=Bu.bind(null,SE),f=Bu.bind(null,dc);function g(P,ie){let de,we;return Xv(P)?(de=e.getRecordMatcher(P),we=ie):we=P,e.addRoute(we,de)}function _(P){const ie=e.getRecordMatcher(P);ie&&e.removeRoute(ie)}function m(){return e.getRoutes().map(P=>P.record)}function y(P){return!!e.getRecordMatcher(P)}function v(P,ie){if(ie=ct({},ie||l.value),typeof P=="string"){const O=Vu(n,P,ie.path),j=e.resolve({path:O.path},ie),z=i.createHref(O.fullPath);return ct(O,j,{params:f(j.params),hash:dc(O.hash),redirectedFrom:void 0,href:z})}let de;if("path"in P)de=ct({},P,{path:Vu(n,P.path,ie.path).path});else{const O=ct({},P.params);for(const j in O)O[j]==null&&delete O[j];de=ct({},P,{params:d(O)}),ie.params=d(ie.params)}const we=e.resolve(de,ie),B=P.hash||"";we.params=u(f(we.params));const fe=RC(s,ct({},P,{hash:wE(B),path:we.path})),b=i.createHref(fe);return ct({fullPath:fe,hash:B,query:s===qg?AE(P.query):P.query||{}},we,{redirectedFrom:void 0,href:b})}function $(P){return typeof P=="string"?Vu(n,P,l.value.path):ct({},P)}function A(P,ie){if(c!==P)return mr(8,{from:ie,to:P})}function D(P){return S(P)}function x(P){return D(ct($(P),{replace:!0}))}function w(P){const ie=P.matched[P.matched.length-1];if(ie&&ie.redirect){const{redirect:de}=ie;let we=typeof de=="function"?de(P):de;return typeof we=="string"&&(we=we.includes("?")||we.includes("#")?we=$(we):{path:we},we.params={}),ct({query:P.query,hash:P.hash,params:"path"in we?{}:P.params},we)}}function S(P,ie){const de=c=v(P),we=l.value,B=P.state,fe=P.force,b=P.replace===!0,O=w(de);if(O)return S(ct($(O),{state:typeof O=="object"?ct({},B,O.state):B,force:fe,replace:b}),ie||de);const j=de;j.redirectedFrom=ie;let z;return!fe&&NC(s,we,de)&&(z=mr(16,{to:j,from:we}),ve(we,we,!0,!1)),(z?Promise.resolve(z):E(j,we)).catch(oe=>Rs(oe)?Rs(oe,2)?oe:ce(oe):Z(oe,j,we)).then(oe=>{if(oe){if(Rs(oe,2))return S(ct({replace:b},$(oe.to),{state:typeof oe.to=="object"?ct({},B,oe.to.state):B,force:fe}),ie||j)}else oe=X(j,we,!0,b,B);return V(j,we,oe),oe})}function T(P,ie){const de=A(P,ie);return de?Promise.reject(de):Promise.resolve()}function M(P){const ie=L.values().next().value;return ie&&typeof ie.runWithContext=="function"?ie.runWithContext(P):P()}function E(P,ie){let de;const[we,B,fe]=LE(P,ie);de=Hu(we.reverse(),"beforeRouteLeave",P,ie);for(const O of we)O.leaveGuards.forEach(j=>{de.push(gi(j,P,ie))});const b=T.bind(null,P,ie);return de.push(b),ae(de).then(()=>{de=[];for(const O of o.list())de.push(gi(O,P,ie));return de.push(b),ae(de)}).then(()=>{de=Hu(B,"beforeRouteUpdate",P,ie);for(const O of B)O.updateGuards.forEach(j=>{de.push(gi(j,P,ie))});return de.push(b),ae(de)}).then(()=>{de=[];for(const O of fe)if(O.beforeEnter)if(cs(O.beforeEnter))for(const j of O.beforeEnter)de.push(gi(j,P,ie));else de.push(gi(O.beforeEnter,P,ie));return de.push(b),ae(de)}).then(()=>(P.matched.forEach(O=>O.enterCallbacks={}),de=Hu(fe,"beforeRouteEnter",P,ie),de.push(b),ae(de))).then(()=>{de=[];for(const O of r.list())de.push(gi(O,P,ie));return de.push(b),ae(de)}).catch(O=>Rs(O,8)?O:Promise.reject(O))}function V(P,ie,de){a.list().forEach(we=>M(()=>we(P,ie,de)))}function X(P,ie,de,we,B){const fe=A(P,ie);if(fe)return fe;const b=ie===ai,O=Xo?history.state:{};de&&(we||b?i.replace(P.fullPath,ct({scroll:b&&O&&O.scroll},B)):i.push(P.fullPath,B)),l.value=P,ve(P,ie,de,b),ce()}let le;function Y(){le||(le=i.listen((P,ie,de)=>{if(!te.listening)return;const we=v(P),B=w(we);if(B){S(ct(B,{replace:!0}),we).catch(pa);return}c=we;const fe=l.value;Xo&&KC(Vg(fe.fullPath,de.delta),zc()),E(we,fe).catch(b=>Rs(b,12)?b:Rs(b,2)?(S(b.to,we).then(O=>{Rs(O,20)&&!de.delta&&de.type===Da.pop&&i.go(-1,!1)}).catch(pa),Promise.reject()):(de.delta&&i.go(-de.delta,!1),Z(b,we,fe))).then(b=>{b=b||X(we,fe,!1),b&&(de.delta&&!Rs(b,8)?i.go(-de.delta,!1):de.type===Da.pop&&Rs(b,20)&&i.go(-1,!1)),V(we,fe,b)}).catch(pa)}))}let R=Kr(),I=Kr(),H;function Z(P,ie,de){ce(P);const we=I.list();return we.length?we.forEach(B=>B(P,ie,de)):console.error(P),Promise.reject(P)}function ee(){return H&&l.value!==ai?Promise.resolve():new Promise((P,ie)=>{R.add([P,ie])})}function ce(P){return H||(H=!P,Y(),R.list().forEach(([ie,de])=>P?de(P):ie()),R.reset()),P}function ve(P,ie,de,we){const{scrollBehavior:B}=t;if(!Xo||!B)return Promise.resolve();const fe=!de&&YC(Vg(P.fullPath,0))||(we||!de)&&history.state&&history.state.scroll||null;return nn().then(()=>B(P,ie,fe)).then(b=>b&&zC(b)).catch(b=>Z(b,P,ie))}const U=P=>i.go(P);let Q;const L=new Set,te={currentRoute:l,listening:!0,addRoute:g,removeRoute:_,hasRoute:y,getRoutes:m,resolve:v,options:t,push:D,replace:x,go:U,back:()=>U(-1),forward:()=>U(1),beforeEach:o.add,beforeResolve:r.add,afterEach:a.add,onError:I.add,isReady:ee,install(P){const ie=this;P.component("RouterLink",PE),P.component("RouterView",oy),P.config.globalProperties.$router=ie,Object.defineProperty(P.config.globalProperties,"$route",{enumerable:!0,get:()=>G(l)}),Xo&&!Q&&l.value===ai&&(Q=!0,D(i.location).catch(B=>{}));const de={};for(const B in ai)Object.defineProperty(de,B,{get:()=>l.value[B],enumerable:!0});P.provide(ef,ie),P.provide(tf,zb(de)),P.provide(Vd,l);const we=P.unmount;L.add(P),P.unmount=function(){L.delete(P),L.size<1&&(c=ai,le&&le(),le=null,l.value=ai,Q=!1,H=!1),we()}}};function ae(P){return P.reduce((ie,de)=>ie.then(()=>M(de)),Promise.resolve())}return te}function LE(t,e){const n=[],s=[],i=[],o=Math.max(e.matched.length,t.matched.length);for(let r=0;rgr(c,a))?s.push(a):n.push(a));const l=t.matched[r];l&&(e.matched.find(c=>gr(c,l))||i.push(l))}return[n,s,i]}function RE(){return as(tf)}const NE={getCookie(t){const n=`; ${document.cookie}`.split(`; ${t}=`);if(n.length===2)return n.pop().split(";").shift()}};Qh("WGDashboardStore",{state:()=>({WireguardConfigurations:void 0,DashboardConfiguration:void 0}),actions:{async getDashboardConfiguration(){await kt("/api/getDashboardConfiguration",{},t=>{console.log(t.status),t.status&&(this.DashboardConfiguration=t.data)})}}});const em="[a-fA-F\\d:]",_i=t=>t&&t.includeBoundaries?`(?:(?<=\\s|^)(?=${em})|(?<=${em})(?=\\s|$))`:"",ns="(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)(?:\\.(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)){3}",Vt="[a-fA-F\\d]{1,4}",Kc=` + */const ja=typeof window<"u";function e$(t){return t.__esModule||t[Symbol.toStringTag]==="Module"}const St=Object.assign;function Ag(t,e){const n={};for(const i in e){const s=e[i];n[i]=hs(s)?s.map(t):t(s)}return n}const Bc=()=>{},hs=Array.isArray,t$=/\/$/,n$=t=>t.replace(t$,"");function Mg(t,e,n="/"){let i,s={},r="",o="";const a=e.indexOf("#");let l=e.indexOf("?");return a=0&&(l=-1),l>-1&&(i=e.slice(0,l),r=e.slice(l+1,a>-1?a:e.length),s=t(r)),a>-1&&(i=i||e.slice(0,a),o=e.slice(a,e.length)),i=o$(i??e,n),{fullPath:i+(r&&"?")+r+o,path:i,query:s,hash:o}}function i$(t,e){const n=e.query?t(e.query):"";return e.path+(n&&"?")+n+(e.hash||"")}function Gv(t,e){return!e||!t.toLowerCase().startsWith(e.toLowerCase())?t:t.slice(e.length)||"/"}function s$(t,e,n){const i=e.matched.length-1,s=n.matched.length-1;return i>-1&&i===s&&bl(e.matched[i],n.matched[s])&&oS(e.params,n.params)&&t(e.query)===t(n.query)&&e.hash===n.hash}function bl(t,e){return(t.aliasOf||t)===(e.aliasOf||e)}function oS(t,e){if(Object.keys(t).length!==Object.keys(e).length)return!1;for(const n in t)if(!r$(t[n],e[n]))return!1;return!0}function r$(t,e){return hs(t)?Xv(t,e):hs(e)?Xv(e,t):t===e}function Xv(t,e){return hs(e)?t.length===e.length&&t.every((n,i)=>n===e[i]):t.length===1&&t[0]===e}function o$(t,e){if(t.startsWith("/"))return t;if(!t)return e;const n=e.split("/"),i=t.split("/"),s=i[i.length-1];(s===".."||s===".")&&i.push("");let r=n.length-1,o,a;for(o=0;o1&&r--;else break;return n.slice(0,r).join("/")+"/"+i.slice(o-(o===i.length?1:0)).join("/")}var su;(function(t){t.pop="pop",t.push="push"})(su||(su={}));var Vc;(function(t){t.back="back",t.forward="forward",t.unknown=""})(Vc||(Vc={}));function a$(t){if(!t)if(ja){const e=document.querySelector("base");t=e&&e.getAttribute("href")||"/",t=t.replace(/^\w+:\/\/[^\/]+/,"")}else t="/";return t[0]!=="/"&&t[0]!=="#"&&(t="/"+t),n$(t)}const l$=/^[^#]+#/;function c$(t,e){return t.replace(l$,"#")+e}function u$(t,e){const n=document.documentElement.getBoundingClientRect(),i=t.getBoundingClientRect();return{behavior:e.behavior,left:i.left-n.left-(e.left||0),top:i.top-n.top-(e.top||0)}}const ff=()=>({left:window.pageXOffset,top:window.pageYOffset});function d$(t){let e;if("el"in t){const n=t.el,i=typeof n=="string"&&n.startsWith("#"),s=typeof n=="string"?i?document.getElementById(n.slice(1)):document.querySelector(n):n;if(!s)return;e=u$(s,t)}else e=t;"scrollBehavior"in document.documentElement.style?window.scrollTo(e):window.scrollTo(e.left!=null?e.left:window.pageXOffset,e.top!=null?e.top:window.pageYOffset)}function qv(t,e){return(history.state?history.state.position-e:-1)+t}const Gp=new Map;function h$(t,e){Gp.set(t,e)}function f$(t){const e=Gp.get(t);return Gp.delete(t),e}let g$=()=>location.protocol+"//"+location.host;function aS(t,e){const{pathname:n,search:i,hash:s}=e,r=t.indexOf("#");if(r>-1){let a=s.includes(t.slice(r))?t.slice(r).length:1,l=s.slice(a);return l[0]!=="/"&&(l="/"+l),Gv(l,"")}return Gv(n,t)+i+s}function p$(t,e,n,i){let s=[],r=[],o=null;const a=({state:h})=>{const f=aS(t,location),p=n.value,m=e.value;let y=0;if(h){if(n.value=f,e.value=h,o&&o===p){o=null;return}y=m?h.position-m.position:0}else i(f);s.forEach(v=>{v(n.value,p,{delta:y,type:su.pop,direction:y?y>0?Vc.forward:Vc.back:Vc.unknown})})};function l(){o=n.value}function c(h){s.push(h);const f=()=>{const p=s.indexOf(h);p>-1&&s.splice(p,1)};return r.push(f),f}function u(){const{history:h}=window;h.state&&h.replaceState(St({},h.state,{scroll:ff()}),"")}function d(){for(const h of r)h();r=[],window.removeEventListener("popstate",a),window.removeEventListener("beforeunload",u)}return window.addEventListener("popstate",a),window.addEventListener("beforeunload",u,{passive:!0}),{pauseListeners:l,listen:c,destroy:d}}function Zv(t,e,n,i=!1,s=!1){return{back:t,current:e,forward:n,replaced:i,position:window.history.length,scroll:s?ff():null}}function m$(t){const{history:e,location:n}=window,i={value:aS(t,n)},s={value:e.state};s.value||r(i.value,{back:null,current:i.value,forward:null,position:e.length-1,replaced:!0,scroll:null},!0);function r(l,c,u){const d=t.indexOf("#"),h=d>-1?(n.host&&document.querySelector("base")?t:t.slice(d))+l:g$()+t+l;try{e[u?"replaceState":"pushState"](c,"",h),s.value=c}catch(f){console.error(f),n[u?"replace":"assign"](h)}}function o(l,c){const u=St({},e.state,Zv(s.value.back,l,s.value.forward,!0),c,{position:s.value.position});r(l,u,!0),i.value=l}function a(l,c){const u=St({},s.value,e.state,{forward:l,scroll:ff()});r(u.current,u,!0);const d=St({},Zv(i.value,l,null),{position:u.position+1},c);r(l,d,!1),i.value=l}return{location:i,state:s,push:a,replace:o}}function _$(t){t=a$(t);const e=m$(t),n=p$(t,e.state,e.location,e.replace);function i(r,o=!0){o||n.pauseListeners(),history.go(r)}const s=St({location:"",base:t,go:i,createHref:c$.bind(null,t)},e,n);return Object.defineProperty(s,"location",{enumerable:!0,get:()=>e.location.value}),Object.defineProperty(s,"state",{enumerable:!0,get:()=>e.state.value}),s}function y$(t){return t=location.host?t||location.pathname+location.search:"",t.includes("#")||(t+="#"),_$(t)}function v$(t){return typeof t=="string"||t&&typeof t=="object"}function lS(t){return typeof t=="string"||typeof t=="symbol"}const Cr={path:"/",name:void 0,params:{},query:{},hash:"",fullPath:"/",matched:[],meta:{},redirectedFrom:void 0},cS=Symbol("");var Jv;(function(t){t[t.aborted=4]="aborted",t[t.cancelled=8]="cancelled",t[t.duplicated=16]="duplicated"})(Jv||(Jv={}));function wl(t,e){return St(new Error,{type:t,[cS]:!0},e)}function Ys(t,e){return t instanceof Error&&cS in t&&(e==null||!!(t.type&e))}const Qv="[^/]+?",b$={sensitive:!1,strict:!1,start:!0,end:!0},w$=/[.+*?^${}()[\]/\\]/g;function x$(t,e){const n=St({},b$,e),i=[];let s=n.start?"^":"";const r=[];for(const c of t){const u=c.length?[]:[90];n.strict&&!c.length&&(s+="/");for(let d=0;de.length?e.length===1&&e[0]===80?1:-1:0}function S$(t,e){let n=0;const i=t.score,s=e.score;for(;n0&&e[e.length-1]<0}const C$={type:0,value:""},T$=/[a-zA-Z0-9_]/;function k$(t){if(!t)return[[]];if(t==="/")return[[C$]];if(!t.startsWith("/"))throw new Error(`Invalid path "${t}"`);function e(f){throw new Error(`ERR (${n})/"${c}": ${f}`)}let n=0,i=n;const s=[];let r;function o(){r&&s.push(r),r=[]}let a=0,l,c="",u="";function d(){c&&(n===0?r.push({type:0,value:c}):n===1||n===2||n===3?(r.length>1&&(l==="*"||l==="+")&&e(`A repeatable param (${c}) must be alone in its segment. eg: '/:ids+.`),r.push({type:1,value:c,regexp:u,repeatable:l==="*"||l==="+",optional:l==="*"||l==="?"})):e("Invalid state to consume buffer"),c="")}function h(){c+=l}for(;a{o(b)}:Bc}function o(u){if(lS(u)){const d=i.get(u);d&&(i.delete(u),n.splice(n.indexOf(d),1),d.children.forEach(o),d.alias.forEach(o))}else{const d=n.indexOf(u);d>-1&&(n.splice(d,1),u.record.name&&i.delete(u.record.name),u.children.forEach(o),u.alias.forEach(o))}}function a(){return n}function l(u){let d=0;for(;d=0&&(u.record.path!==n[d].record.path||!uS(u,n[d]));)d++;n.splice(d,0,u),u.record.name&&!nb(u)&&i.set(u.record.name,u)}function c(u,d){let h,f={},p,m;if("name"in u&&u.name){if(h=i.get(u.name),!h)throw wl(1,{location:u});m=h.record.name,f=St(tb(d.params,h.keys.filter(b=>!b.optional).map(b=>b.name)),u.params&&tb(u.params,h.keys.map(b=>b.name))),p=h.stringify(f)}else if("path"in u)p=u.path,h=n.find(b=>b.re.test(p)),h&&(f=h.parse(p),m=h.record.name);else{if(h=d.name?i.get(d.name):n.find(b=>b.re.test(d.path)),!h)throw wl(1,{location:u,currentLocation:d});m=h.record.name,f=St({},d.params,u.params),p=h.stringify(f)}const y=[];let v=h;for(;v;)y.unshift(v.record),v=v.parent;return{name:m,path:p,params:f,matched:y,meta:R$(y)}}return t.forEach(u=>r(u)),{addRoute:r,resolve:c,removeRoute:o,getRoutes:a,getRecordMatcher:s}}function tb(t,e){const n={};for(const i of e)i in t&&(n[i]=t[i]);return n}function I$(t){return{path:t.path,redirect:t.redirect,name:t.name,meta:t.meta||{},aliasOf:void 0,beforeEnter:t.beforeEnter,props:P$(t),children:t.children||[],instances:{},leaveGuards:new Set,updateGuards:new Set,enterCallbacks:{},components:"components"in t?t.components||null:t.component&&{default:t.component}}}function P$(t){const e={},n=t.props||!1;if("component"in t)e.default=n;else for(const i in t.components)e[i]=typeof n=="object"?n[i]:n;return e}function nb(t){for(;t;){if(t.record.aliasOf)return!0;t=t.parent}return!1}function R$(t){return t.reduce((e,n)=>St(e,n.meta),{})}function ib(t,e){const n={};for(const i in t)n[i]=i in e?e[i]:t[i];return n}function uS(t,e){return e.children.some(n=>n===t||uS(t,n))}const dS=/#/g,D$=/&/g,$$=/\//g,L$=/=/g,O$=/\?/g,hS=/\+/g,N$=/%5B/g,F$=/%5D/g,fS=/%5E/g,B$=/%60/g,gS=/%7B/g,V$=/%7C/g,pS=/%7D/g,z$=/%20/g;function E_(t){return encodeURI(""+t).replace(V$,"|").replace(N$,"[").replace(F$,"]")}function W$(t){return E_(t).replace(gS,"{").replace(pS,"}").replace(fS,"^")}function Xp(t){return E_(t).replace(hS,"%2B").replace(z$,"+").replace(dS,"%23").replace(D$,"%26").replace(B$,"`").replace(gS,"{").replace(pS,"}").replace(fS,"^")}function H$(t){return Xp(t).replace(L$,"%3D")}function Y$(t){return E_(t).replace(dS,"%23").replace(O$,"%3F")}function j$(t){return t==null?"":Y$(t).replace($$,"%2F")}function _h(t){try{return decodeURIComponent(""+t)}catch{}return""+t}function K$(t){const e={};if(t===""||t==="?")return e;const i=(t[0]==="?"?t.slice(1):t).split("&");for(let s=0;sr&&Xp(r)):[i&&Xp(i)]).forEach(r=>{r!==void 0&&(e+=(e.length?"&":"")+n,r!=null&&(e+="="+r))})}return e}function U$(t){const e={};for(const n in t){const i=t[n];i!==void 0&&(e[n]=hs(i)?i.map(s=>s==null?null:""+s):i==null?i:""+i)}return e}const G$=Symbol(""),rb=Symbol(""),S_=Symbol(""),C_=Symbol(""),qp=Symbol("");function oc(){let t=[];function e(i){return t.push(i),()=>{const s=t.indexOf(i);s>-1&&t.splice(s,1)}}function n(){t=[]}return{add:e,list:()=>t.slice(),reset:n}}function Vr(t,e,n,i,s){const r=i&&(i.enterCallbacks[s]=i.enterCallbacks[s]||[]);return()=>new Promise((o,a)=>{const l=d=>{d===!1?a(wl(4,{from:n,to:e})):d instanceof Error?a(d):v$(d)?a(wl(2,{from:e,to:d})):(r&&i.enterCallbacks[s]===r&&typeof d=="function"&&r.push(d),o())},c=t.call(i&&i.instances[s],e,n,l);let u=Promise.resolve(c);t.length<3&&(u=u.then(l)),u.catch(d=>a(d))})}function Ig(t,e,n,i){const s=[];for(const r of t)for(const o in r.components){let a=r.components[o];if(!(e!=="beforeRouteEnter"&&!r.instances[o]))if(X$(a)){const c=(a.__vccOpts||a)[e];c&&s.push(Vr(c,n,i,r,o))}else{let l=a();s.push(()=>l.then(c=>{if(!c)return Promise.reject(new Error(`Couldn't resolve component "${o}" at "${r.path}"`));const u=e$(c)?c.default:c;r.components[o]=u;const h=(u.__vccOpts||u)[e];return h&&Vr(h,n,i,r,o)()}))}}return s}function X$(t){return typeof t=="object"||"displayName"in t||"props"in t||"__vccOpts"in t}function ob(t){const e=cs(S_),n=cs(C_),i=be(()=>e.resolve(Q(t.to))),s=be(()=>{const{matched:l}=i.value,{length:c}=l,u=l[c-1],d=n.matched;if(!u||!d.length)return-1;const h=d.findIndex(bl.bind(null,u));if(h>-1)return h;const f=ab(l[c-2]);return c>1&&ab(u)===f&&d[d.length-1].path!==f?d.findIndex(bl.bind(null,l[c-2])):h}),r=be(()=>s.value>-1&&Q$(n.params,i.value.params)),o=be(()=>s.value>-1&&s.value===n.matched.length-1&&oS(n.params,i.value.params));function a(l={}){return J$(l)?e[Q(t.replace)?"replace":"push"](Q(t.to)).catch(Bc):Promise.resolve()}return{route:i,href:be(()=>i.value.href),isActive:r,isExactActive:o,navigate:a}}const q$=cn({name:"RouterLink",compatConfig:{MODE:3},props:{to:{type:[String,Object],required:!0},replace:Boolean,activeClass:String,exactActiveClass:String,custom:Boolean,ariaCurrentValue:{type:String,default:"page"}},useLink:ob,setup(t,{slots:e}){const n=Ns(ob(t)),{options:i}=cs(S_),s=be(()=>({[lb(t.activeClass,i.linkActiveClass,"router-link-active")]:n.isActive,[lb(t.exactActiveClass,i.linkExactActiveClass,"router-link-exact-active")]:n.isExactActive}));return()=>{const r=e.default&&e.default(n);return t.custom?r:la("a",{"aria-current":n.isExactActive?t.ariaCurrentValue:null,href:n.href,onClick:n.navigate,class:s.value},r)}}}),Z$=q$;function J$(t){if(!(t.metaKey||t.altKey||t.ctrlKey||t.shiftKey)&&!t.defaultPrevented&&!(t.button!==void 0&&t.button!==0)){if(t.currentTarget&&t.currentTarget.getAttribute){const e=t.currentTarget.getAttribute("target");if(/\b_blank\b/i.test(e))return}return t.preventDefault&&t.preventDefault(),!0}}function Q$(t,e){for(const n in e){const i=e[n],s=t[n];if(typeof i=="string"){if(i!==s)return!1}else if(!hs(s)||s.length!==i.length||i.some((r,o)=>r!==s[o]))return!1}return!0}function ab(t){return t?t.aliasOf?t.aliasOf.path:t.path:""}const lb=(t,e,n)=>t??e??n,eL=cn({name:"RouterView",inheritAttrs:!1,props:{name:{type:String,default:"default"},route:Object},compatConfig:{MODE:3},setup(t,{attrs:e,slots:n}){const i=cs(qp),s=be(()=>t.route||i.value),r=cs(rb,0),o=be(()=>{let c=Q(r);const{matched:u}=s.value;let d;for(;(d=u[c])&&!d.components;)c++;return c}),a=be(()=>s.value.matched[o.value]);Qd(rb,be(()=>o.value+1)),Qd(G$,a),Qd(qp,s);const l=we();return fn(()=>[l.value,a.value,t.name],([c,u,d],[h,f,p])=>{u&&(u.instances[d]=c,f&&f!==u&&c&&c===h&&(u.leaveGuards.size||(u.leaveGuards=f.leaveGuards),u.updateGuards.size||(u.updateGuards=f.updateGuards))),c&&u&&(!f||!bl(u,f)||!h)&&(u.enterCallbacks[d]||[]).forEach(m=>m(c))},{flush:"post"}),()=>{const c=s.value,u=t.name,d=a.value,h=d&&d.components[u];if(!h)return cb(n.default,{Component:h,route:c});const f=d.props[u],p=f?f===!0?c.params:typeof f=="function"?f(c):f:null,y=la(h,St({},p,e,{onVnodeUnmounted:v=>{v.component.isUnmounted&&(d.instances[u]=null)},ref:l}));return cb(n.default,{Component:y,route:c})||y}}});function cb(t,e){if(!t)return null;const n=t(e);return n.length===1?n[0]:n}const mS=eL;function tL(t){const e=M$(t.routes,t),n=t.parseQuery||K$,i=t.stringifyQuery||sb,s=t.history,r=oc(),o=oc(),a=oc(),l=l_(Cr);let c=Cr;ja&&t.scrollBehavior&&"scrollRestoration"in history&&(history.scrollRestoration="manual");const u=Ag.bind(null,$=>""+$),d=Ag.bind(null,j$),h=Ag.bind(null,_h);function f($,oe){let de,ve;return lS($)?(de=e.getRecordMatcher($),ve=oe):ve=$,e.addRoute(ve,de)}function p($){const oe=e.getRecordMatcher($);oe&&e.removeRoute(oe)}function m(){return e.getRoutes().map($=>$.record)}function y($){return!!e.getRecordMatcher($)}function v($,oe){if(oe=St({},oe||l.value),typeof $=="string"){const O=Mg(n,$,oe.path),K=e.resolve({path:O.path},oe),U=s.createHref(O.fullPath);return St(O,K,{params:h(K.params),hash:_h(O.hash),redirectedFrom:void 0,href:U})}let de;if("path"in $)de=St({},$,{path:Mg(n,$.path,oe.path).path});else{const O=St({},$.params);for(const K in O)O[K]==null&&delete O[K];de=St({},$,{params:d(O)}),oe.params=d(oe.params)}const ve=e.resolve(de,oe),z=$.hash||"";ve.params=u(h(ve.params));const ge=i$(i,St({},$,{hash:W$(z),path:ve.path})),S=s.createHref(ge);return St({fullPath:ge,hash:z,query:i===sb?U$($.query):$.query||{}},ve,{redirectedFrom:void 0,href:S})}function b($){return typeof $=="string"?Mg(n,$,l.value.path):St({},$)}function E($,oe){if(c!==$)return wl(8,{from:oe,to:$})}function C($){return T($)}function w($){return C(St(b($),{replace:!0}))}function x($){const oe=$.matched[$.matched.length-1];if(oe&&oe.redirect){const{redirect:de}=oe;let ve=typeof de=="function"?de($):de;return typeof ve=="string"&&(ve=ve.includes("?")||ve.includes("#")?ve=b(ve):{path:ve},ve.params={}),St({query:$.query,hash:$.hash,params:"path"in ve?{}:$.params},ve)}}function T($,oe){const de=c=v($),ve=l.value,z=$.state,ge=$.force,S=$.replace===!0,O=x(de);if(O)return T(St(b(O),{state:typeof O=="object"?St({},z,O.state):z,force:ge,replace:S}),oe||de);const K=de;K.redirectedFrom=oe;let U;return!ge&&s$(i,ve,de)&&(U=wl(16,{to:K,from:ve}),ue(ve,ve,!0,!1)),(U?Promise.resolve(U):P(K,ve)).catch(re=>Ys(re)?Ys(re,2)?re:ne(re):X(re,K,ve)).then(re=>{if(re){if(Ys(re,2))return T(St({replace:S},b(re.to),{state:typeof re.to=="object"?St({},z,re.to.state):z,force:ge}),oe||K)}else re=H(K,ve,!0,S,z);return F(K,ve,re),re})}function k($,oe){const de=E($,oe);return de?Promise.reject(de):Promise.resolve()}function A($){const oe=M.values().next().value;return oe&&typeof oe.runWithContext=="function"?oe.runWithContext($):$()}function P($,oe){let de;const[ve,z,ge]=nL($,oe);de=Ig(ve.reverse(),"beforeRouteLeave",$,oe);for(const O of ve)O.leaveGuards.forEach(K=>{de.push(Vr(K,$,oe))});const S=k.bind(null,$,oe);return de.push(S),le(de).then(()=>{de=[];for(const O of r.list())de.push(Vr(O,$,oe));return de.push(S),le(de)}).then(()=>{de=Ig(z,"beforeRouteUpdate",$,oe);for(const O of z)O.updateGuards.forEach(K=>{de.push(Vr(K,$,oe))});return de.push(S),le(de)}).then(()=>{de=[];for(const O of ge)if(O.beforeEnter)if(hs(O.beforeEnter))for(const K of O.beforeEnter)de.push(Vr(K,$,oe));else de.push(Vr(O.beforeEnter,$,oe));return de.push(S),le(de)}).then(()=>($.matched.forEach(O=>O.enterCallbacks={}),de=Ig(ge,"beforeRouteEnter",$,oe),de.push(S),le(de))).then(()=>{de=[];for(const O of o.list())de.push(Vr(O,$,oe));return de.push(S),le(de)}).catch(O=>Ys(O,8)?O:Promise.reject(O))}function F($,oe,de){a.list().forEach(ve=>A(()=>ve($,oe,de)))}function H($,oe,de,ve,z){const ge=E($,oe);if(ge)return ge;const S=oe===Cr,O=ja?history.state:{};de&&(ve||S?s.replace($.fullPath,St({scroll:S&&O&&O.scroll},z)):s.push($.fullPath,z)),l.value=$,ue($,oe,de,S),ne()}let te;function N(){te||(te=s.listen(($,oe,de)=>{if(!ie.listening)return;const ve=v($),z=x(ve);if(z){T(St(z,{replace:!0}),ve).catch(Bc);return}c=ve;const ge=l.value;ja&&h$(qv(ge.fullPath,de.delta),ff()),P(ve,ge).catch(S=>Ys(S,12)?S:Ys(S,2)?(T(S.to,ve).then(O=>{Ys(O,20)&&!de.delta&&de.type===su.pop&&s.go(-1,!1)}).catch(Bc),Promise.reject()):(de.delta&&s.go(-de.delta,!1),X(S,ve,ge))).then(S=>{S=S||H(ve,ge,!1),S&&(de.delta&&!Ys(S,8)?s.go(-de.delta,!1):de.type===su.pop&&Ys(S,20)&&s.go(-1,!1)),F(ve,ge,S)}).catch(Bc)}))}let L=oc(),I=oc(),W;function X($,oe,de){ne($);const ve=I.list();return ve.length?ve.forEach(z=>z($,oe,de)):console.error($),Promise.reject($)}function J(){return W&&l.value!==Cr?Promise.resolve():new Promise(($,oe)=>{L.add([$,oe])})}function ne($){return W||(W=!$,N(),L.list().forEach(([oe,de])=>$?de($):oe()),L.reset()),$}function ue($,oe,de,ve){const{scrollBehavior:z}=t;if(!ja||!z)return Promise.resolve();const ge=!de&&f$(qv($.fullPath,0))||(ve||!de)&&history.state&&history.state.scroll||null;return Rn().then(()=>z($,oe,ge)).then(S=>S&&d$(S)).catch(S=>X(S,$,oe))}const Y=$=>s.go($);let Z;const M=new Set,ie={currentRoute:l,listening:!0,addRoute:f,removeRoute:p,hasRoute:y,getRoutes:m,resolve:v,options:t,push:C,replace:w,go:Y,back:()=>Y(-1),forward:()=>Y(1),beforeEach:r.add,beforeResolve:o.add,afterEach:a.add,onError:I.add,isReady:J,install($){const oe=this;$.component("RouterLink",Z$),$.component("RouterView",mS),$.config.globalProperties.$router=oe,Object.defineProperty($.config.globalProperties,"$route",{enumerable:!0,get:()=>Q(l)}),ja&&!Z&&l.value===Cr&&(Z=!0,C(s.location).catch(z=>{}));const de={};for(const z in Cr)Object.defineProperty(de,z,{get:()=>l.value[z],enumerable:!0});$.provide(S_,oe),$.provide(C_,eE(de)),$.provide(qp,l);const ve=$.unmount;M.add($),$.unmount=function(){M.delete($),M.size<1&&(c=Cr,te&&te(),te=null,l.value=Cr,Z=!1,W=!1),ve()}}};function le($){return $.reduce((oe,de)=>oe.then(()=>A(de)),Promise.resolve())}return ie}function nL(t,e){const n=[],i=[],s=[],r=Math.max(e.matched.length,t.matched.length);for(let o=0;obl(c,a))?i.push(a):n.push(a));const l=t.matched[o];l&&(e.matched.find(c=>bl(c,l))||s.push(l))}return[n,i,s]}function iL(){return cs(C_)}const sL={getCookie(t){const n=`; ${document.cookie}`.split(`; ${t}=`);if(n.length===2)return n.pop().split(";").shift()}};x_("WGDashboardStore",{state:()=>({WireguardConfigurations:void 0,DashboardConfiguration:void 0}),actions:{async getDashboardConfiguration(){await Vt("/api/getDashboardConfiguration",{},t=>{console.log(t.status),t.status&&(this.DashboardConfiguration=t.data)})}}});const ub="[a-fA-F\\d:]",Hr=t=>t&&t.includeBoundaries?`(?:(?<=\\s|^)(?=${ub})|(?<=${ub})(?=\\s|$))`:"",ts="(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)(?:\\.(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)){3}",hn="[a-fA-F\\d]{1,4}",gf=` (?: -(?:${Vt}:){7}(?:${Vt}|:)| // 1:2:3:4:5:6:7:: 1:2:3:4:5:6:7:8 -(?:${Vt}:){6}(?:${ns}|:${Vt}|:)| // 1:2:3:4:5:6:: 1:2:3:4:5:6::8 1:2:3:4:5:6::8 1:2:3:4:5:6::1.2.3.4 -(?:${Vt}:){5}(?::${ns}|(?::${Vt}){1,2}|:)| // 1:2:3:4:5:: 1:2:3:4:5::7:8 1:2:3:4:5::8 1:2:3:4:5::7:1.2.3.4 -(?:${Vt}:){4}(?:(?::${Vt}){0,1}:${ns}|(?::${Vt}){1,3}|:)| // 1:2:3:4:: 1:2:3:4::6:7:8 1:2:3:4::8 1:2:3:4::6:7:1.2.3.4 -(?:${Vt}:){3}(?:(?::${Vt}){0,2}:${ns}|(?::${Vt}){1,4}|:)| // 1:2:3:: 1:2:3::5:6:7:8 1:2:3::8 1:2:3::5:6:7:1.2.3.4 -(?:${Vt}:){2}(?:(?::${Vt}){0,3}:${ns}|(?::${Vt}){1,5}|:)| // 1:2:: 1:2::4:5:6:7:8 1:2::8 1:2::4:5:6:7:1.2.3.4 -(?:${Vt}:){1}(?:(?::${Vt}){0,4}:${ns}|(?::${Vt}){1,6}|:)| // 1:: 1::3:4:5:6:7:8 1::8 1::3:4:5:6:7:1.2.3.4 -(?::(?:(?::${Vt}){0,5}:${ns}|(?::${Vt}){1,7}|:)) // ::2:3:4:5:6:7:8 ::2:3:4:5:6:7:8 ::8 ::1.2.3.4 +(?:${hn}:){7}(?:${hn}|:)| // 1:2:3:4:5:6:7:: 1:2:3:4:5:6:7:8 +(?:${hn}:){6}(?:${ts}|:${hn}|:)| // 1:2:3:4:5:6:: 1:2:3:4:5:6::8 1:2:3:4:5:6::8 1:2:3:4:5:6::1.2.3.4 +(?:${hn}:){5}(?::${ts}|(?::${hn}){1,2}|:)| // 1:2:3:4:5:: 1:2:3:4:5::7:8 1:2:3:4:5::8 1:2:3:4:5::7:1.2.3.4 +(?:${hn}:){4}(?:(?::${hn}){0,1}:${ts}|(?::${hn}){1,3}|:)| // 1:2:3:4:: 1:2:3:4::6:7:8 1:2:3:4::8 1:2:3:4::6:7:1.2.3.4 +(?:${hn}:){3}(?:(?::${hn}){0,2}:${ts}|(?::${hn}){1,4}|:)| // 1:2:3:: 1:2:3::5:6:7:8 1:2:3::8 1:2:3::5:6:7:1.2.3.4 +(?:${hn}:){2}(?:(?::${hn}){0,3}:${ts}|(?::${hn}){1,5}|:)| // 1:2:: 1:2::4:5:6:7:8 1:2::8 1:2::4:5:6:7:1.2.3.4 +(?:${hn}:){1}(?:(?::${hn}){0,4}:${ts}|(?::${hn}){1,6}|:)| // 1:: 1::3:4:5:6:7:8 1::8 1::3:4:5:6:7:1.2.3.4 +(?::(?:(?::${hn}){0,5}:${ts}|(?::${hn}){1,7}|:)) // ::2:3:4:5:6:7:8 ::2:3:4:5:6:7:8 ::8 ::1.2.3.4 )(?:%[0-9a-zA-Z]{1,})? // %eth0 %1 -`.replace(/\s*\/\/.*$/gm,"").replace(/\n/g,"").trim(),FE=new RegExp(`(?:^${ns}$)|(?:^${Kc}$)`),BE=new RegExp(`^${ns}$`),VE=new RegExp(`^${Kc}$`),Yc=t=>t&&t.exact?FE:new RegExp(`(?:${_i(t)}${ns}${_i(t)})|(?:${_i(t)}${Kc}${_i(t)})`,"g");Yc.v4=t=>t&&t.exact?BE:new RegExp(`${_i(t)}${ns}${_i(t)}`,"g");Yc.v6=t=>t&&t.exact?VE:new RegExp(`${_i(t)}${Kc}${_i(t)}`,"g");const ry={exact:!1},ay=`${Yc.v4().source}\\/(3[0-2]|[12]?[0-9])`,ly=`${Yc.v6().source}\\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])`,HE=new RegExp(`^${ay}$`),jE=new RegExp(`^${ly}$`),WE=({exact:t}=ry)=>t?HE:new RegExp(ay,"g"),zE=({exact:t}=ry)=>t?jE:new RegExp(ly,"g"),cy=WE({exact:!0}),uy=zE({exact:!0}),nf=t=>cy.test(t)?4:uy.test(t)?6:0;nf.v4=t=>cy.test(t);nf.v6=t=>uy.test(t);const dt=t=>{const e=Xe();if(e.Locale===null)return t;const s=Object.keys(e.Locale).filter(i=>t.match(new RegExp("^"+i+"$","gi"))!==null);return s.length===0||s.length>1?t:t.replace(new RegExp(s[0],"gi"),e.Locale[s[0]])},Pn=Qh("WireguardConfigurationsStore",{state:()=>({Configurations:void 0,searchString:"",ConfigurationListInterval:void 0,PeerScheduleJobs:{dropdowns:{Field:[{display:dt("Total Received"),value:"total_receive",unit:"GB",type:"number"},{display:dt("Total Sent"),value:"total_sent",unit:"GB",type:"number"},{display:dt("Total Usage"),value:"total_data",unit:"GB",type:"number"},{display:dt("Date"),value:"date",type:"date"}],Operator:[{display:dt("larger than"),value:"lgt"}],Action:[{display:dt("Restrict Peer"),value:"restrict"},{display:dt("Delete Peer"),value:"delete"}]}}}),actions:{async getConfigurations(){await kt("/api/getWireguardConfigurations",{},t=>{t.status&&(this.Configurations=t.data)})},regexCheckIP(t){return/((^\s*((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5]))\s*$)|(^\s*((([0-9A-Fa-f]{1,4}:){7}([0-9A-Fa-f]{1,4}|:))|(([0-9A-Fa-f]{1,4}:){6}(:[0-9A-Fa-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9A-Fa-f]{1,4}:){5}(((:[0-9A-Fa-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9A-Fa-f]{1,4}:){4}(((:[0-9A-Fa-f]{1,4}){1,3})|((:[0-9A-Fa-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){3}(((:[0-9A-Fa-f]{1,4}){1,4})|((:[0-9A-Fa-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){2}(((:[0-9A-Fa-f]{1,4}){1,5})|((:[0-9A-Fa-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){1}(((:[0-9A-Fa-f]{1,4}){1,6})|((:[0-9A-Fa-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9A-Fa-f]{1,4}){1,7})|((:[0-9A-Fa-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))(%.+)?\s*$))/.test(t)},checkCIDR(t){return nf(t)!==0}}}),je=(t,e)=>{const n=t.__vccOpts||t;for(const[s,i]of e)n[s]=i;return n},KE={name:"localeText",props:{t:""},computed:{getLocaleText(){return dt(this.t)}}};function YE(t,e,n,s,i,o){return xe(this.getLocaleText)}const Ge=je(KE,[["render",YE]]),UE={name:"navbar",components:{LocaleText:Ge},setup(){const t=Pn(),e=Xe();return{wireguardConfigurationsStore:t,dashboardConfigurationStore:e}},data(){return{updateAvailable:!1,updateMessage:"Checking for update...",updateUrl:""}},mounted(){kt("/api/getDashboardUpdate",{},t=>{t.status?(t.data&&(this.updateAvailable=!0,this.updateUrl=t.data),this.updateMessage=t.message):(this.updateMessage=dt("Failed to check available update"),console.log(`Failed to get update: ${t.message}`))})}},Fi=t=>(qt("data-v-c16dfe93"),t=t(),Gt(),t),qE=["data-bs-theme"],GE={id:"sidebarMenu",class:"bg-body-tertiary sidebar border h-100 rounded-3 shadow overflow-y-scroll"},JE={class:"sidebar-sticky pt-3"},XE={class:"nav flex-column px-2"},QE={class:"nav-item"},ZE=Fi(()=>h("i",{class:"bi bi-house me-2"},null,-1)),eT={class:"nav-item"},tT=Fi(()=>h("i",{class:"bi bi-gear me-2"},null,-1)),nT=Fi(()=>h("hr",{class:"text-body"},null,-1)),sT={class:"sidebar-heading px-3 mt-4 mb-1 text-muted text-center"},iT=Fi(()=>h("i",{class:"bi bi-body-text me-2"},null,-1)),oT={class:"nav flex-column px-2"},rT={class:"nav-item"},aT=Fi(()=>h("hr",{class:"text-body"},null,-1)),lT={class:"sidebar-heading px-3 mt-4 mb-1 text-muted text-center"},cT=Fi(()=>h("i",{class:"bi bi-tools me-2"},null,-1)),uT={class:"nav flex-column px-2"},dT={class:"nav-item"},hT={class:"nav-item"},fT=Fi(()=>h("hr",{class:"text-body"},null,-1)),pT={class:"nav flex-column px-2"},gT={class:"nav-item"},mT=Fi(()=>h("i",{class:"bi bi-box-arrow-left me-2"},null,-1)),_T={class:"nav-item",style:{"font-size":"0.8rem"}},bT=["href"],vT={class:"nav-link text-muted rounded-3"},yT={key:1,class:"nav-link text-muted rounded-3"};function wT(t,e,n,s,i,o){const r=ke("LocaleText"),a=ke("RouterLink");return C(),F("div",{class:Ee(["col-md-3 col-lg-2 d-md-block p-3 navbar-container",{active:this.dashboardConfigurationStore.ShowNavBar}]),"data-bs-theme":s.dashboardConfigurationStore.Configuration.Server.dashboard_theme,style:{height:"calc(-50px + 100vh)"}},[h("nav",GE,[h("div",JE,[h("ul",XE,[h("li",QE,[N(a,{class:"nav-link rounded-3",to:"/","exact-active-class":"active"},{default:Pe(()=>[ZE,N(r,{t:"Home"})]),_:1})]),h("li",eT,[N(a,{class:"nav-link rounded-3",to:"/settings","exact-active-class":"active"},{default:Pe(()=>[tT,N(r,{t:"Settings"})]),_:1})])]),nT,h("h6",sT,[iT,N(r,{t:"WireGuard Configurations"})]),h("ul",oT,[h("li",rT,[(C(!0),F(Me,null,Ke(this.wireguardConfigurationsStore.Configurations,l=>(C(),Se(a,{to:"/configuration/"+l.Name+"/peers",class:"nav-link nav-conf-link rounded-3","active-class":"active"},{default:Pe(()=>[h("span",{class:Ee(["dot me-2",{active:l.Status}])},null,2),He(" "+xe(l.Name),1)]),_:2},1032,["to"]))),256))])]),aT,h("h6",lT,[cT,N(r,{t:"Tools"})]),h("ul",uT,[h("li",dT,[N(a,{to:"/ping",class:"nav-link rounded-3","active-class":"active"},{default:Pe(()=>[He("Ping")]),_:1})]),h("li",hT,[N(a,{to:"/traceroute",class:"nav-link rounded-3","active-class":"active"},{default:Pe(()=>[He("Traceroute")]),_:1})])]),fT,h("ul",pT,[h("li",gT,[h("a",{class:"nav-link text-danger rounded-3",onClick:e[0]||(e[0]=l=>this.dashboardConfigurationStore.signOut()),role:"button",style:{"font-weight":"bold"}},[mT,N(r,{t:"Sign Out"})])]),h("li",_T,[this.updateAvailable?(C(),F("a",{key:0,href:this.updateUrl,class:"text-decoration-none rounded-3",target:"_blank"},[h("small",vT,[N(r,{t:this.updateMessage},null,8,["t"]),He(" ("),N(r,{t:"Current Version:"}),He(" "+xe(s.dashboardConfigurationStore.Configuration.Server.version)+") ",1)])],8,bT)):(C(),F("small",yT,[N(r,{t:this.updateMessage},null,8,["t"]),He(" ("+xe(s.dashboardConfigurationStore.Configuration.Server.version)+") ",1)]))])])])])],10,qE)}const xT=je(UE,[["render",wT],["__scopeId","data-v-c16dfe93"]]),kT={name:"message",components:{LocaleText:Ge},props:{message:Object},mounted(){setTimeout(()=>{this.message.show=!1},5e3)}},ST=["id"],$T={class:"card-body"},AT={class:"fw-bold d-block",style:{"text-transform":"uppercase"}};function CT(t,e,n,s,i,o){const r=ke("LocaleText");return C(),F("div",{class:Ee(["card shadow rounded-3 position-relative mb-2",{"text-bg-danger":this.message.type==="danger","text-bg-success":this.message.type==="success","text-bg-warning":this.message.type==="warning"}]),id:this.message.id,style:{width:"400px"}},[h("div",$T,[h("small",AT,[N(r,{t:"FROM "}),He(" "+xe(this.message.from),1)]),He(" "+xe(this.message.content),1)])],10,ST)}const dy=je(kT,[["render",CT]]),ET={name:"index",components:{Message:dy,Navbar:xT},async setup(){return{dashboardConfigurationStore:Xe()}},computed:{getMessages(){return this.dashboardConfigurationStore.Messages.filter(t=>t.show)}}},TT=["data-bs-theme"],PT={class:"row h-100"},MT={class:"col-md-9 ml-sm-auto col-lg-10 px-md-4 overflow-y-scroll mb-0",style:{height:"calc(100vh - 50px)"}},DT={class:"messageCentre text-body position-fixed"};function OT(t,e,n,s,i,o){const r=ke("Navbar"),a=ke("RouterView"),l=ke("Message");return C(),F("div",{class:"container-fluid flex-grow-1 main","data-bs-theme":this.dashboardConfigurationStore.Configuration.Server.dashboard_theme},[h("div",PT,[N(r),h("main",MT,[(C(),Se(Wh,null,{default:Pe(()=>[N(a,null,{default:Pe(({Component:c})=>[N(Et,{name:"fade2",mode:"out-in"},{default:Pe(()=>[(C(),Se(To(c)))]),_:2},1024)]),_:1})]),_:1})),h("div",DT,[N(Ni,{name:"message",tag:"div",class:"position-relative"},{default:Pe(()=>[(C(!0),F(Me,null,Ke(o.getMessages.slice().reverse(),c=>(C(),Se(l,{message:c,key:c.id},null,8,["message"]))),128))]),_:1})])])])],8,TT)}const IT=je(ET,[["render",OT],["__scopeId","data-v-b776d181"]]);var hy={exports:{}};(function(t,e){(function(n,s){t.exports=s()})(Q_,function(){var n=1e3,s=6e4,i=36e5,o="millisecond",r="second",a="minute",l="hour",c="day",u="week",d="month",f="quarter",g="year",_="date",m="Invalid Date",y=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,v=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,$={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(Y){var R=["th","st","nd","rd"],I=Y%100;return"["+Y+(R[(I-20)%10]||R[I]||R[0])+"]"}},A=function(Y,R,I){var H=String(Y);return!H||H.length>=R?Y:""+Array(R+1-H.length).join(I)+Y},D={s:A,z:function(Y){var R=-Y.utcOffset(),I=Math.abs(R),H=Math.floor(I/60),Z=I%60;return(R<=0?"+":"-")+A(H,2,"0")+":"+A(Z,2,"0")},m:function Y(R,I){if(R.date()1)return Y(ce[0])}else{var ve=R.name;w[ve]=R,Z=ve}return!H&&Z&&(x=Z),Z||!H&&x},E=function(Y,R){if(T(Y))return Y.clone();var I=typeof R=="object"?R:{};return I.date=Y,I.args=arguments,new X(I)},V=D;V.l=M,V.i=T,V.w=function(Y,R){return E(Y,{locale:R.$L,utc:R.$u,x:R.$x,$offset:R.$offset})};var X=function(){function Y(I){this.$L=M(I.locale,null,!0),this.parse(I),this.$x=this.$x||I.x||{},this[S]=!0}var R=Y.prototype;return R.parse=function(I){this.$d=function(H){var Z=H.date,ee=H.utc;if(Z===null)return new Date(NaN);if(V.u(Z))return new Date;if(Z instanceof Date)return new Date(Z);if(typeof Z=="string"&&!/Z$/i.test(Z)){var ce=Z.match(y);if(ce){var ve=ce[2]-1||0,U=(ce[7]||"0").substring(0,3);return ee?new Date(Date.UTC(ce[1],ve,ce[3]||1,ce[4]||0,ce[5]||0,ce[6]||0,U)):new Date(ce[1],ve,ce[3]||1,ce[4]||0,ce[5]||0,ce[6]||0,U)}}return new Date(Z)}(I),this.init()},R.init=function(){var I=this.$d;this.$y=I.getFullYear(),this.$M=I.getMonth(),this.$D=I.getDate(),this.$W=I.getDay(),this.$H=I.getHours(),this.$m=I.getMinutes(),this.$s=I.getSeconds(),this.$ms=I.getMilliseconds()},R.$utils=function(){return V},R.isValid=function(){return this.$d.toString()!==m},R.isSame=function(I,H){var Z=E(I);return this.startOf(H)<=Z&&Z<=this.endOf(H)},R.isAfter=function(I,H){return E(I){if(t.status===200)return t.json();throw new Error(t.statusText)}).then(()=>{this.endTime=Cn(),this.active=!0}).catch(t=>{this.active=!1,this.errorMsg=t}),this.refreshing=!1)},async connect(){await fetch(`${this.server.host}/api/authenticate`,{headers:{"content-type":"application/json","wg-dashboard-apikey":this.server.apiKey},body:JSON.stringify({host:window.location.hostname}),method:"POST",signal:AbortSignal.timeout(5e3)}).then(t=>t.json()).then(t=>{this.$emit("setActiveServer"),this.$router.push("/")})}},mounted(){this.handshake()},computed:{getHandshakeTime(){return this.startTime&&this.endTime?`${Cn().subtract(this.startTime).millisecond()}ms`:this.refreshing?dt("Pinging..."):this.errorMsg?this.errorMsg:"N/A"}}},Or=t=>(qt("data-v-ed7817c7"),t=t(),Gt(),t),NT={class:"card rounded-3"},FT={class:"card-body"},BT={class:"d-flex gap-3 w-100 remoteServerContainer"},VT={class:"d-flex gap-3 align-items-center flex-grow-1"},HT=Or(()=>h("i",{class:"bi bi-server"},null,-1)),jT={class:"d-flex gap-3 align-items-center flex-grow-1"},WT=Or(()=>h("i",{class:"bi bi-key-fill"},null,-1)),zT={class:"d-flex gap-2 button-group"},KT=Or(()=>h("i",{class:"bi bi-trash"},null,-1)),YT=[KT],UT=Or(()=>h("i",{class:"bi bi-arrow-right-circle"},null,-1)),qT=[UT],GT={class:"card-footer gap-2 d-flex align-items-center"},JT={key:0,class:"spin ms-auto text-primary-emphasis"},XT=Or(()=>h("i",{class:"bi bi-arrow-clockwise"},null,-1)),QT=[XT],ZT=Or(()=>h("i",{class:"bi bi-arrow-clockwise me"},null,-1)),eP=[ZT];function tP(t,e,n,s,i,o){return C(),F("div",NT,[h("div",FT,[h("div",BT,[h("div",VT,[HT,Le(h("input",{class:"form-control form-control-sm",onBlur:e[0]||(e[0]=r=>this.handshake()),"onUpdate:modelValue":e[1]||(e[1]=r=>this.server.host=r),type:"url"},null,544),[[We,this.server.host]])]),h("div",jT,[WT,Le(h("input",{class:"form-control form-control-sm",onBlur:e[2]||(e[2]=r=>this.handshake()),"onUpdate:modelValue":e[3]||(e[3]=r=>this.server.apiKey=r),type:"text"},null,544),[[We,this.server.apiKey]])]),h("div",zT,[h("button",{onClick:e[4]||(e[4]=r=>this.$emit("delete")),class:"ms-auto btn btn-sm bg-danger-subtle text-danger-emphasis border-1 border-danger-subtle"},YT),h("button",{onClick:e[5]||(e[5]=r=>this.connect()),class:Ee([{disabled:!this.active},"ms-auto btn btn-sm bg-success-subtle text-success-emphasis border-1 border-success-subtle"])},qT,2)])])]),h("div",GT,[h("span",{class:Ee(["dot ms-0 me-2",[this.active?"active":"inactive"]])},null,2),h("small",null,xe(this.getHandshakeTime),1),this.refreshing?(C(),F("div",JT,QT)):(C(),F("a",{key:1,role:"button",onClick:e[6]||(e[6]=r=>this.handshake()),class:"text-primary-emphasis text-decoration-none ms-auto disabled"},eP))])])}const nP=je(RT,[["render",tP],["__scopeId","data-v-ed7817c7"]]),sP={name:"RemoteServerList",setup(){return{store:Xe()}},components:{LocaleText:Ge,RemoteServer:nP}},iP={class:"w-100 mt-3"},oP={class:"d-flex align-items-center mb-3"},rP={class:"mb-0"},aP=h("i",{class:"bi bi-plus-circle-fill me-2"},null,-1),lP={class:"w-100 d-flex gap-3 flex-column p-3 border border-1 border-secondary-subtle rounded-3",style:{height:"400px","overflow-y":"scroll"}},cP={key:0,class:"text-muted m-auto"},uP=h("i",{class:"bi bi-plus-circle-fill mx-1"},null,-1);function dP(t,e,n,s,i,o){const r=ke("LocaleText"),a=ke("RemoteServer");return C(),F("div",iP,[h("div",oP,[h("h5",rP,[N(r,{t:"Server List"})]),h("button",{onClick:e[0]||(e[0]=l=>this.store.addCrossServerConfiguration()),class:"btn bg-primary-subtle text-primary-emphasis border-1 border-primary-subtle shadow-sm ms-auto"},[aP,N(r,{t:"Server"})])]),h("div",lP,[(C(!0),F(Me,null,Ke(this.store.CrossServerConfiguration.ServerList,(l,c)=>(C(),Se(a,{onSetActiveServer:u=>this.store.setActiveCrossServer(c),onDelete:u=>this.store.deleteCrossServerConfiguration(c),key:c,server:l},null,8,["onSetActiveServer","onDelete","server"]))),128)),Object.keys(this.store.CrossServerConfiguration.ServerList).length===0?(C(),F("h6",cP,[N(r,{t:"Click"}),uP,N(r,{t:"to add your server"})])):re("",!0)])])}const hP=je(sP,[["render",dP]]),fP={name:"signInInput",methods:{GetLocale:dt},props:{id:"",data:"",type:"",placeholder:""},computed:{getLocaleText(){return dt(this.placeholder)}}},pP=["type","id","name","placeholder"];function gP(t,e,n,s,i,o){return Le((C(),F("input",{type:n.type,"onUpdate:modelValue":e[0]||(e[0]=r=>this.data[this.id]=r),class:"form-control",id:this.id,name:this.id,autocomplete:"on",placeholder:this.getLocaleText,required:""},null,8,pP)),[[Wv,this.data[this.id]]])}const mP=je(fP,[["render",gP]]),_P={name:"signInTOTP",methods:{GetLocale:dt},props:{data:""},computed:{getLocaleText(){return dt("OTP from your authenticator")}}},bP=["placeholder"];function vP(t,e,n,s,i,o){return Le((C(),F("input",{class:"form-control totp",required:"",id:"totp",maxlength:"6",type:"text",inputmode:"numeric",autocomplete:"one-time-code",placeholder:this.getLocaleText,"onUpdate:modelValue":e[0]||(e[0]=r=>this.data.totp=r)},null,8,bP)),[[We,this.data.totp]])}const yP=je(_P,[["render",vP]]),wP={name:"signin",components:{SignInTOTP:yP,SignInInput:mP,LocaleText:Ge,RemoteServerList:hP,Message:dy},async setup(){const t=Xe();let e="dark",n=!1,s;return t.IsElectronApp||await Promise.all([kt("/api/getDashboardTheme",{},i=>{e=i.data}),kt("/api/isTotpEnabled",{},i=>{n=i.data}),kt("/api/getDashboardVersion",{},i=>{s=i.data})]),t.removeActiveCrossServer(),{store:t,theme:e,totpEnabled:n,version:s}},data(){return{data:{username:"",password:"",totp:""},loginError:!1,loginErrorMessage:"",loading:!1}},computed:{getMessages(){return this.store.Messages.filter(t=>t.show)},applyLocale(t){return dt(t)}},methods:{GetLocale:dt,async auth(){this.data.username&&this.data.password&&(this.totpEnabled&&this.data.totp||!this.totpEnabled)?(this.loading=!0,await ht("/api/authenticate",this.data,t=>{t.status?(this.loginError=!1,this.$refs.signInBtn.classList.add("signedIn"),t.message?this.$router.push("/welcome"):this.store.Redirect!==void 0?this.$router.push(this.store.Redirect):this.$router.push("/")):(this.loginError=!0,this.loginErrorMessage=t.message,document.querySelectorAll("input[required]").forEach(e=>{e.classList.remove("is-valid"),e.classList.add("is-invalid")}),this.loading=!1)})):document.querySelectorAll("input[required]").forEach(t=>{t.value.length===0?(t.classList.remove("is-valid"),t.classList.add("is-invalid")):(t.classList.remove("is-invalid"),t.classList.add("is-valid"))})}}},Mo=t=>(qt("data-v-2fa13e60"),t=t(),Gt(),t),xP=["data-bs-theme"],kP={class:"login-box m-auto"},SP={class:"m-auto",style:{width:"700px"}},$P={class:"mb-0 text-body"},AP=Mo(()=>h("span",{class:"dashboardLogo display-3"},[h("strong",null,"WGDashboard")],-1)),CP={key:0,class:"alert alert-danger mt-2 mb-0",role:"alert"},EP={class:"form-group text-body"},TP=Mo(()=>h("label",{for:"username",class:"text-left",style:{"font-size":"1rem"}},[h("i",{class:"bi bi-person-circle"})],-1)),PP={class:"form-group text-body"},MP=Mo(()=>h("label",{for:"password",class:"text-left",style:{"font-size":"1rem"}},[h("i",{class:"bi bi-key-fill"})],-1)),DP={key:0,class:"form-group text-body"},OP=Mo(()=>h("label",{for:"totp",class:"text-left",style:{"font-size":"1rem"}},[h("i",{class:"bi bi-lock-fill"})],-1)),IP={class:"btn btn-lg btn-dark ms-auto mt-4 w-100 d-flex btn-brand signInBtn",ref:"signInBtn"},LP={key:0,class:"d-flex w-100"},RP=Mo(()=>h("i",{class:"ms-auto bi bi-chevron-right"},null,-1)),NP={key:1,class:"d-flex w-100 align-items-center"},FP=Mo(()=>h("span",{class:"spinner-border ms-auto spinner-border-sm",role:"status"},null,-1)),BP={key:3,class:"d-flex mt-3"},VP={class:"form-check form-switch ms-auto"},HP={class:"form-check-label",for:"flexSwitchCheckChecked"},jP={class:"text-muted pb-3 d-block w-100 text-center mt-3"},WP=Mo(()=>h("a",{href:"https://github.com/donaldzou",target:"_blank"},[h("strong",null,"Donald Zou")],-1)),zP={class:"messageCentre text-body position-absolute end-0 m-3"};function KP(t,e,n,s,i,o){const r=ke("LocaleText"),a=ke("SignInInput"),l=ke("SignInTOTP"),c=ke("RemoteServerList"),u=ke("Message");return C(),F("div",{class:"container-fluid login-container-fluid d-flex main flex-column py-4 text-body",style:{"overflow-y":"scroll"},"data-bs-theme":this.theme},[h("div",kP,[h("div",SP,[h("h4",$P,[N(r,{t:"Welcome to"})]),AP,i.loginError?(C(),F("div",CP,[N(r,{t:this.loginErrorMessage},null,8,["t"])])):re("",!0),this.store.CrossServerConfiguration.Enable?(C(),Se(c,{key:2})):(C(),F("form",{key:1,onSubmit:e[0]||(e[0]=d=>{d.preventDefault(),this.auth()})},[h("div",EP,[TP,N(a,{id:"username",data:this.data,type:"text",placeholder:"Username"},null,8,["data"])]),h("div",PP,[MP,N(a,{id:"password",data:this.data,type:"password",placeholder:"Password"},null,8,["data"])]),s.totpEnabled?(C(),F("div",DP,[OP,N(l,{data:this.data},null,8,["data"])])):re("",!0),h("button",IP,[this.loading?(C(),F("span",NP,[N(r,{t:"Signing In..."}),FP])):(C(),F("span",LP,[N(r,{t:"Sign In"}),RP]))],512)],32)),this.store.IsElectronApp?re("",!0):(C(),F("div",BP,[h("div",VP,[Le(h("input",{"onUpdate:modelValue":e[1]||(e[1]=d=>this.store.CrossServerConfiguration.Enable=d),class:"form-check-input",type:"checkbox",role:"switch",id:"flexSwitchCheckChecked"},null,512),[[_n,this.store.CrossServerConfiguration.Enable]]),h("label",HP,[N(r,{t:"Access Remote Server"})])])]))])]),h("small",jP,[He(" WGDashboard "+xe(this.version)+" | Developed with ❤️ by ",1),WP]),h("div",zP,[N(Ni,{name:"message",tag:"div",class:"position-relative"},{default:Pe(()=>[(C(!0),F(Me,null,Ke(o.getMessages.slice().reverse(),d=>(C(),Se(u,{message:d,key:d.id},null,8,["message"]))),128))]),_:1})])],8,xP)}const YP=je(wP,[["render",KP],["__scopeId","data-v-2fa13e60"]]),UP={name:"configurationCard",components:{LocaleText:Ge},props:{c:{Name:String,Status:Boolean,PublicKey:String,PrivateKey:String}},data(){return{configurationToggling:!1}},setup(){return{dashboardConfigurationStore:Xe()}},methods:{toggle(){this.configurationToggling=!0,kt("/api/toggleWireguardConfiguration/",{configurationName:this.c.Name},t=>{t.status?this.dashboardConfigurationStore.newMessage("Server",`${this.c.Name} ${t.data?"is on":"is off"}`):this.dashboardConfigurationStore.newMessage("Server",t.message,"danger"),this.c.Status=t.data,this.configurationToggling=!1})}}},qP={class:"card conf_card rounded-3 shadow text-decoration-none"},GP={class:"mb-0"},JP={class:"card-title mb-0"},XP=h("h6",{class:"mb-0 ms-auto"},[h("i",{class:"bi bi-chevron-right"})],-1),QP={class:"card-footer d-flex gap-2 flex-column"},ZP={class:"row"},eM={class:"col-6 col-md-3"},tM=h("i",{class:"bi bi-arrow-down-up me-2"},null,-1),nM={class:"text-primary-emphasis col-6 col-md-3"},sM=h("i",{class:"bi bi-arrow-down me-2"},null,-1),iM={class:"text-success-emphasis col-6 col-md-3"},oM=h("i",{class:"bi bi-arrow-up me-2"},null,-1),rM={class:"text-md-end col-6 col-md-3"},aM={class:"d-flex align-items-center gap-2"},lM={class:"text-muted"},cM={style:{"word-break":"keep-all"}},uM={class:"mb-0 d-block d-lg-inline-block"},dM={style:{"line-break":"anywhere"}},hM={class:"form-check form-switch ms-auto"},fM=["for"],pM={key:4,class:"spinner-border spinner-border-sm ms-2","aria-hidden":"true"},gM=["disabled","id"];function mM(t,e,n,s,i,o){const r=ke("RouterLink"),a=ke("LocaleText");return C(),F("div",qP,[N(r,{to:"/configuration/"+n.c.Name+"/peers",class:"card-body d-flex align-items-center gap-3 flex-wrap text-decoration-none"},{default:Pe(()=>[h("h6",GP,[h("span",{class:Ee(["dot",{active:n.c.Status}])},null,2)]),h("h6",JP,[h("samp",null,xe(n.c.Name),1)]),XP]),_:1},8,["to"]),h("div",QP,[h("div",ZP,[h("small",eM,[tM,He(xe(n.c.DataUsage.Total>0?n.c.DataUsage.Total.toFixed(4):0)+" GB ",1)]),h("small",nM,[sM,He(xe(n.c.DataUsage.Receive>0?n.c.DataUsage.Receive.toFixed(4):0)+" GB ",1)]),h("small",iM,[oM,He(xe(n.c.DataUsage.Sent>0?n.c.DataUsage.Sent.toFixed(4):0)+" GB ",1)]),h("small",rM,[h("span",{class:Ee(["dot me-2",{active:n.c.ConnectedPeers>0}])},null,2),He(xe(n.c.ConnectedPeers)+" ",1),N(a,{t:"Peers"})])]),h("div",aM,[h("small",lM,[h("strong",cM,[N(a,{t:"Public Key"})])]),h("small",uM,[h("samp",dM,xe(n.c.PublicKey),1)]),h("div",hM,[h("label",{class:"form-check-label",style:{cursor:"pointer"},for:"switch"+n.c.PrivateKey},[!n.c.Status&&this.configurationToggling?(C(),Se(a,{key:0,t:"Turning Off..."})):n.c.Status&&this.configurationToggling?(C(),Se(a,{key:1,t:"Turning On..."})):n.c.Status&&!this.configurationToggling?(C(),Se(a,{key:2,t:"On"})):!n.c.Status&&!this.configurationToggling?(C(),Se(a,{key:3,t:"Off"})):re("",!0),this.configurationToggling?(C(),F("span",pM)):re("",!0)],8,fM),Le(h("input",{class:"form-check-input",style:{cursor:"pointer"},disabled:this.configurationToggling,type:"checkbox",role:"switch",id:"switch"+n.c.PrivateKey,onChange:e[0]||(e[0]=l=>this.toggle()),"onUpdate:modelValue":e[1]||(e[1]=l=>n.c.Status=l)},null,40,gM),[[_n,n.c.Status]])])])])])}const _M=je(UP,[["render",mM]]),bM={name:"configurationList",components:{LocaleText:Ge,ConfigurationCard:_M},async setup(){return{wireguardConfigurationsStore:Pn()}},data(){return{configurationLoaded:!1}},async mounted(){await this.wireguardConfigurationsStore.getConfigurations(),this.configurationLoaded=!0,this.wireguardConfigurationsStore.ConfigurationListInterval=setInterval(()=>{this.wireguardConfigurationsStore.getConfigurations()},1e4)},beforeUnmount(){clearInterval(this.wireguardConfigurationsStore.ConfigurationListInterval)}},fy=t=>(qt("data-v-106e7dee"),t=t(),Gt(),t),vM={class:"mt-md-5 mt-3"},yM={class:"container-md"},wM={class:"d-flex mb-4 configurationListTitle"},xM={class:"text-body d-flex"},kM=fy(()=>h("i",{class:"bi bi-body-text me-2"},null,-1)),SM=fy(()=>h("i",{class:"bi bi-plus-circle-fill me-2"},null,-1)),$M={key:0},AM={key:0,class:"text-muted"},CM={key:1,class:"d-flex gap-3 flex-column mb-3"};function EM(t,e,n,s,i,o){const r=ke("LocaleText"),a=ke("RouterLink"),l=ke("ConfigurationCard");return C(),F("div",vM,[h("div",yM,[h("div",wM,[h("h3",xM,[kM,h("span",null,[N(r,{t:"WireGuard Configurations"})])]),N(a,{to:"/new_configuration",class:"btn btn-dark btn-brand rounded-3 px-3 py-2 shadow ms-auto rounded-3"},{default:Pe(()=>[SM,N(r,{t:"Configuration"})]),_:1})]),N(Et,{name:"fade",mode:"out-in"},{default:Pe(()=>[this.configurationLoaded?(C(),F("div",$M,[this.wireguardConfigurationsStore.Configurations.length===0?(C(),F("p",AM,[N(r,{t:"You don't have any WireGuard configurations yet. Please check the configuration folder or change it in Settings. By default the folder is /etc/wireguard."})])):(C(),F("div",CM,[(C(!0),F(Me,null,Ke(this.wireguardConfigurationsStore.Configurations,c=>(C(),Se(l,{key:c.Name,c},null,8,["c"]))),128))]))])):re("",!0)]),_:1})])])}const TM=je(bM,[["render",EM],["__scopeId","data-v-106e7dee"]]);let Al;const PM=new Uint8Array(16);function MM(){if(!Al&&(Al=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!Al))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Al(PM)}const on=[];for(let t=0;t<256;++t)on.push((t+256).toString(16).slice(1));function DM(t,e=0){return on[t[e+0]]+on[t[e+1]]+on[t[e+2]]+on[t[e+3]]+"-"+on[t[e+4]]+on[t[e+5]]+"-"+on[t[e+6]]+on[t[e+7]]+"-"+on[t[e+8]]+on[t[e+9]]+"-"+on[t[e+10]]+on[t[e+11]]+on[t[e+12]]+on[t[e+13]]+on[t[e+14]]+on[t[e+15]]}const OM=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),tm={randomUUID:OM};function Es(t,e,n){if(tm.randomUUID&&!e&&!t)return tm.randomUUID();t=t||{};const s=t.random||(t.rng||MM)();if(s[6]=s[6]&15|64,s[8]=s[8]&63|128,e){n=n||0;for(let i=0;i<16;++i)e[n+i]=s[i];return e}return DM(s)}const IM={components:{LocaleText:Ge},props:{targetData:String,title:String,warning:!1,warningText:""},setup(){const t=Xe(),e=`input_${Es()}`;return{store:t,uuid:e}},data(){return{value:"",invalidFeedback:"",showInvalidFeedback:!1,isValid:!1,timeout:void 0,changed:!1,updating:!1}},mounted(){this.value=this.store.Configuration.Peers[this.targetData]},methods:{async useValidation(){this.changed&&await ht("/api/updateDashboardConfigurationItem",{section:"Peers",key:this.targetData,value:this.value},t=>{t.status?(this.isValid=!0,this.showInvalidFeedback=!1,this.store.Configuration.Peers[this.targetData]=this.value,clearTimeout(this.timeout),this.timeout=setTimeout(()=>this.isValid=!1,5e3)):(this.isValid=!1,this.showInvalidFeedback=!0,this.invalidFeedback=t.message),this.changed=!1,this.updating=!1})}}},LM={class:"form-group mb-2"},RM=["for"],NM=["id","disabled"],FM={class:"invalid-feedback"},BM={key:0,class:"px-2 py-1 text-warning-emphasis bg-warning-subtle border border-warning-subtle rounded-2 d-inline-block mt-1"},VM=h("i",{class:"bi bi-exclamation-triangle-fill me-2"},null,-1);function HM(t,e,n,s,i,o){const r=ke("LocaleText");return C(),F("div",LM,[h("label",{for:this.uuid,class:"text-muted mb-1"},[h("strong",null,[h("small",null,[N(r,{t:this.title},null,8,["t"])])])],8,RM),Le(h("input",{type:"text",class:Ee(["form-control",{"is-invalid":i.showInvalidFeedback,"is-valid":i.isValid}]),id:this.uuid,"onUpdate:modelValue":e[0]||(e[0]=a=>this.value=a),onKeydown:e[1]||(e[1]=a=>this.changed=!0),onBlur:e[2]||(e[2]=a=>o.useValidation()),disabled:this.updating},null,42,NM),[[We,this.value]]),h("div",FM,xe(this.invalidFeedback),1),n.warning?(C(),F("div",BM,[h("small",null,[VM,N(r,{t:n.warningText},null,8,["t"])])])):re("",!0)])}const jM=je(IM,[["render",HM]]),WM=t=>{},zM={name:"accountSettingsInputUsername",components:{LocaleText:Ge},props:{targetData:String,title:String},setup(){const t=Xe(),e=`input_${Es()}`;return{store:t,uuid:e}},data(){return{value:"",invalidFeedback:"",showInvalidFeedback:!1,isValid:!1,timeout:void 0,changed:!1,updating:!1}},mounted(){this.value=this.store.Configuration.Account[this.targetData]},methods:{async useValidation(){this.changed&&(this.updating=!0,await ht("/api/updateDashboardConfigurationItem",{section:"Account",key:this.targetData,value:this.value},t=>{t.status?(this.isValid=!0,this.showInvalidFeedback=!1,this.store.Configuration.Account[this.targetData]=this.value,clearTimeout(this.timeout),this.timeout=setTimeout(()=>this.isValid=!1,5e3)):(this.isValid=!1,this.showInvalidFeedback=!0,this.invalidFeedback=t.message),this.changed=!1,this.updating=!1}))}}},KM={class:"form-group mb-2"},YM=["for"],UM=["id","disabled"],qM={class:"invalid-feedback"};function GM(t,e,n,s,i,o){const r=ke("LocaleText");return C(),F("div",KM,[h("label",{for:this.uuid,class:"text-muted mb-1"},[h("strong",null,[h("small",null,[N(r,{t:this.title},null,8,["t"])])])],8,YM),Le(h("input",{type:"text",class:Ee(["form-control",{"is-invalid":i.showInvalidFeedback,"is-valid":i.isValid}]),id:this.uuid,"onUpdate:modelValue":e[0]||(e[0]=a=>this.value=a),onKeydown:e[1]||(e[1]=a=>this.changed=!0),onBlur:e[2]||(e[2]=a=>o.useValidation()),disabled:this.updating},null,42,UM),[[We,this.value]]),h("div",qM,xe(this.invalidFeedback),1)])}const JM=je(zM,[["render",GM]]),XM={name:"accountSettingsInputPassword",components:{LocaleText:Ge},props:{targetData:String,warning:!1,warningText:""},setup(){const t=Xe(),e=`input_${Es()}`;return{store:t,uuid:e}},data(){return{value:{currentPassword:"",newPassword:"",repeatNewPassword:""},invalidFeedback:"",showInvalidFeedback:!1,isValid:!1,timeout:void 0}},methods:{async useValidation(){Object.values(this.value).find(t=>t.length===0)===void 0?this.value.newPassword===this.value.repeatNewPassword?await ht("/api/updateDashboardConfigurationItem",{section:"Account",key:this.targetData,value:this.value},t=>{t.status?(this.isValid=!0,this.showInvalidFeedback=!1,this.store.Configuration.Account[this.targetData]=this.value,clearTimeout(this.timeout),this.timeout=setTimeout(()=>{this.isValid=!1,this.value={currentPassword:"",newPassword:"",repeatNewPassword:""}},5e3)):(this.isValid=!1,this.showInvalidFeedback=!0,this.invalidFeedback=t.message)}):(this.showInvalidFeedback=!0,this.invalidFeedback="New passwords does not match"):(this.showInvalidFeedback=!0,this.invalidFeedback="Please fill in all required fields.")}},computed:{passwordValid(){return Object.values(this.value).find(t=>t.length===0)===void 0&&this.value.newPassword===this.value.repeatNewPassword}}},QM={class:"d-flex flex-column"},ZM={class:"row"},eD={class:"col-sm"},tD={class:"form-group mb-2"},nD=["for"],sD=["id"],iD={key:0,class:"invalid-feedback d-block"},oD={class:"col-sm"},rD={class:"form-group mb-2"},aD=["for"],lD=["id"],cD={class:"col-sm"},uD={class:"form-group mb-2"},dD=["for"],hD=["id"],fD=["disabled"],pD=h("i",{class:"bi bi-save2-fill me-2"},null,-1);function gD(t,e,n,s,i,o){const r=ke("LocaleText");return C(),F("div",QM,[h("div",ZM,[h("div",eD,[h("div",tD,[h("label",{for:"currentPassword_"+this.uuid,class:"text-muted mb-1"},[h("strong",null,[h("small",null,[N(r,{t:"Current Password"})])])],8,nD),Le(h("input",{type:"password",class:Ee(["form-control mb-2",{"is-invalid":i.showInvalidFeedback,"is-valid":i.isValid}]),"onUpdate:modelValue":e[0]||(e[0]=a=>this.value.currentPassword=a),id:"currentPassword_"+this.uuid},null,10,sD),[[We,this.value.currentPassword]]),i.showInvalidFeedback?(C(),F("div",iD,xe(this.invalidFeedback),1)):re("",!0)])]),h("div",oD,[h("div",rD,[h("label",{for:"newPassword_"+this.uuid,class:"text-muted mb-1"},[h("strong",null,[h("small",null,[N(r,{t:"New Password"})])])],8,aD),Le(h("input",{type:"password",class:Ee(["form-control mb-2",{"is-invalid":i.showInvalidFeedback,"is-valid":i.isValid}]),"onUpdate:modelValue":e[1]||(e[1]=a=>this.value.newPassword=a),id:"newPassword_"+this.uuid},null,10,lD),[[We,this.value.newPassword]])])]),h("div",cD,[h("div",uD,[h("label",{for:"repeatNewPassword_"+this.uuid,class:"text-muted mb-1"},[h("strong",null,[h("small",null,[N(r,{t:"Repeat New Password"})])])],8,dD),Le(h("input",{type:"password",class:Ee(["form-control mb-2",{"is-invalid":i.showInvalidFeedback,"is-valid":i.isValid}]),"onUpdate:modelValue":e[2]||(e[2]=a=>this.value.repeatNewPassword=a),id:"repeatNewPassword_"+this.uuid},null,10,hD),[[We,this.value.repeatNewPassword]])])])]),h("button",{disabled:!this.passwordValid,class:"ms-auto btn bg-success-subtle text-success-emphasis border-1 border-success-subtle rounded-3 shadow-sm",onClick:e[3]||(e[3]=a=>this.useValidation())},[pD,N(r,{t:"Update Password"})],8,fD)])}const mD=je(XM,[["render",gD]]),_D={name:"dashboardSettingsInputWireguardConfigurationPath",components:{LocaleText:Ge},props:{targetData:String,title:String,warning:!1,warningText:""},setup(){const t=Xe(),e=Pn(),n=`input_${Es()}`;return{store:t,uuid:n,WireguardConfigurationStore:e}},data(){return{value:"",invalidFeedback:"",showInvalidFeedback:!1,isValid:!1,timeout:void 0,changed:!1,updating:!1}},mounted(){this.value=this.store.Configuration.Server[this.targetData]},methods:{async useValidation(){this.changed&&(this.updating=!0,await ht("/api/updateDashboardConfigurationItem",{section:"Server",key:this.targetData,value:this.value},t=>{t.status?(this.isValid=!0,this.showInvalidFeedback=!1,this.store.Configuration.Account[this.targetData]=this.value,clearTimeout(this.timeout),this.timeout=setTimeout(()=>this.isValid=!1,5e3),this.WireguardConfigurationStore.getConfigurations(),this.store.newMessage("Server","WireGuard configuration path saved","success")):(this.isValid=!1,this.showInvalidFeedback=!0,this.invalidFeedback=t.message),this.changed=!1,this.updating=!1}))}}},bD={class:"form-group"},vD=["for"],yD={class:"d-flex gap-2 align-items-start"},wD={class:"flex-grow-1"},xD=["id","disabled"],kD={class:"invalid-feedback fw-bold"},SD=["disabled"],$D={key:0,class:"bi bi-save2-fill"},AD={key:1,class:"spinner-border spinner-border-sm"},CD={key:0,class:"px-2 py-1 text-warning-emphasis bg-warning-subtle border border-warning-subtle rounded-2 d-inline-block mt-1 mb-2"},ED=h("i",{class:"bi bi-exclamation-triangle-fill me-2"},null,-1);function TD(t,e,n,s,i,o){const r=ke("LocaleText");return C(),F("div",bD,[h("label",{for:this.uuid,class:"text-muted mb-1"},[h("strong",null,[h("small",null,[N(r,{t:this.title},null,8,["t"])])])],8,vD),h("div",yD,[h("div",wD,[Le(h("input",{type:"text",class:Ee(["form-control rounded-3",{"is-invalid":this.showInvalidFeedback,"is-valid":this.isValid}]),id:this.uuid,"onUpdate:modelValue":e[0]||(e[0]=a=>this.value=a),onKeydown:e[1]||(e[1]=a=>this.changed=!0),disabled:this.updating},null,42,xD),[[We,this.value]]),h("div",kD,xe(this.invalidFeedback),1)]),h("button",{onClick:e[2]||(e[2]=a=>this.useValidation()),disabled:!this.changed,class:"ms-auto btn rounded-3 border-success-subtle bg-success-subtle text-success-emphasis"},[this.updating?(C(),F("span",AD)):(C(),F("i",$D))],8,SD)]),n.warning?(C(),F("div",CD,[h("small",null,[ED,N(r,{t:n.warningText},null,8,["t"])])])):re("",!0)])}const PD=je(_D,[["render",TD]]),MD={name:"dashboardTheme",components:{LocaleText:Ge},setup(){return{dashboardConfigurationStore:Xe()}},methods:{async switchTheme(t){await ht("/api/updateDashboardConfigurationItem",{section:"Server",key:"dashboard_theme",value:t},e=>{e.status&&(this.dashboardConfigurationStore.Configuration.Server.dashboard_theme=t)})}}},DD={class:"card mb-4 shadow rounded-3"},OD={class:"card-header"},ID={class:"card-body d-flex gap-2"},LD=h("i",{class:"bi bi-sun-fill me-2"},null,-1),RD=h("i",{class:"bi bi-moon-fill me-2"},null,-1);function ND(t,e,n,s,i,o){const r=ke("LocaleText");return C(),F("div",DD,[h("p",OD,[N(r,{t:"Dashboard Theme"})]),h("div",ID,[h("button",{class:Ee(["btn bg-primary-subtle text-primary-emphasis flex-grow-1",{active:this.dashboardConfigurationStore.Configuration.Server.dashboard_theme==="light"}]),onClick:e[0]||(e[0]=a=>this.switchTheme("light"))},[LD,N(r,{t:"Light"})],2),h("button",{class:Ee(["btn bg-primary-subtle text-primary-emphasis flex-grow-1",{active:this.dashboardConfigurationStore.Configuration.Server.dashboard_theme==="dark"}]),onClick:e[1]||(e[1]=a=>this.switchTheme("dark"))},[RD,N(r,{t:"Dark"})],2)])])}const FD=je(MD,[["render",ND]]),BD={name:"dashboardSettingsInputIPAddressAndPort",props:{},setup(){const t=Xe(),e=`input_${Es()}`;return{store:t,uuid:e}},data(){return{app_ip:"",app_port:"",invalidFeedback:"",showInvalidFeedback:!1,isValid:!1,timeout:void 0,changed:!1,updating:!1}},mounted(){this.app_ip=this.store.Configuration.Server.app_ip,this.app_port=this.store.Configuration.Server.app_port},methods:{async useValidation(){this.changed&&await ht("/api/updateDashboardConfigurationItem",{section:"Server",key:this.targetData,value:this.value},t=>{t.status?(this.isValid=!0,this.showInvalidFeedback=!1,this.store.Configuration.Account[this.targetData]=this.value,clearTimeout(this.timeout),this.timeout=setTimeout(()=>this.isValid=!1,5e3)):(this.isValid=!1,this.showInvalidFeedback=!0,this.invalidFeedback=t.message)})}}},VD={class:"invalid-feedback d-block mt-0"},HD={class:"row"},jD={class:"form-group mb-2 col-sm"},WD=["for"],zD=h("strong",null,[h("small",null,"Dashboard IP Address")],-1),KD=[zD],YD=["id"],UD=h("div",{class:"px-2 py-1 text-warning-emphasis bg-warning-subtle border border-warning-subtle rounded-2 d-inline-block"},[h("small",null,[h("i",{class:"bi bi-exclamation-triangle-fill me-2"}),h("code",null,"0.0.0.0"),He(" means it can be access by anyone with your server IP Address.")])],-1),qD={class:"form-group col-sm"},GD=["for"],JD=h("strong",null,[h("small",null,"Dashboard Port")],-1),XD=[JD],QD=["id"],ZD=h("button",{class:"btn btn-success btn-sm fw-bold rounded-3"},[h("i",{class:"bi bi-floppy-fill me-2"}),He("Update Dashboard Settings & Restart ")],-1);function e2(t,e,n,s,i,o){return C(),F("div",null,[h("div",VD,xe(this.invalidFeedback),1),h("div",HD,[h("div",jD,[h("label",{for:"app_ip_"+this.uuid,class:"text-muted mb-1"},KD,8,WD),Le(h("input",{type:"text",class:"form-control mb-2",id:"app_ip_"+this.uuid,"onUpdate:modelValue":e[0]||(e[0]=r=>this.app_ip=r)},null,8,YD),[[We,this.app_ip]]),UD]),h("div",qD,[h("label",{for:"app_port_"+this.uuid,class:"text-muted mb-1"},XD,8,GD),Le(h("input",{type:"text",class:"form-control mb-2",id:"app_port_"+this.uuid,"onUpdate:modelValue":e[1]||(e[1]=r=>this.app_port=r)},null,8,QD),[[We,this.app_port]])])]),ZD])}const t2=je(BD,[["render",e2]]);function Ne(t){const e=Object.prototype.toString.call(t);return t instanceof Date||typeof t=="object"&&e==="[object Date]"?new t.constructor(+t):typeof t=="number"||e==="[object Number]"||typeof t=="string"||e==="[object String]"?new Date(t):new Date(NaN)}function rt(t,e){return t instanceof Date?new t.constructor(e):new Date(e)}function is(t,e){const n=Ne(t);return isNaN(e)?rt(t,NaN):(e&&n.setDate(n.getDate()+e),n)}function ls(t,e){const n=Ne(t);if(isNaN(e))return rt(t,NaN);if(!e)return n;const s=n.getDate(),i=rt(t,n.getTime());i.setMonth(n.getMonth()+e+1,0);const o=i.getDate();return s>=o?i:(n.setFullYear(i.getFullYear(),i.getMonth(),s),n)}function py(t,e){const{years:n=0,months:s=0,weeks:i=0,days:o=0,hours:r=0,minutes:a=0,seconds:l=0}=e,c=Ne(t),u=s||n?ls(c,s+n*12):c,d=o||i?is(u,o+i*7):u,f=a+r*60,_=(l+f*60)*1e3;return rt(t,d.getTime()+_)}function n2(t,e){const n=+Ne(t);return rt(t,n+e)}const gy=6048e5,s2=864e5,i2=6e4,my=36e5,o2=1e3;function r2(t,e){return n2(t,e*my)}let a2={};function Do(){return a2}function us(t,e){const n=Do(),s=e?.weekStartsOn??e?.locale?.options?.weekStartsOn??n.weekStartsOn??n.locale?.options?.weekStartsOn??0,i=Ne(t),o=i.getDay(),r=(o=i.getTime()?n+1:e.getTime()>=r.getTime()?n:n-1}function nm(t){const e=Ne(t);return e.setHours(0,0,0,0),e}function hc(t){const e=Ne(t),n=new Date(Date.UTC(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()));return n.setUTCFullYear(e.getFullYear()),+t-+n}function by(t,e){const n=nm(t),s=nm(e),i=+n-hc(n),o=+s-hc(s);return Math.round((i-o)/s2)}function l2(t){const e=_y(t),n=rt(t,0);return n.setFullYear(e,0,4),n.setHours(0,0,0,0),_r(n)}function c2(t,e){const n=e*3;return ls(t,n)}function sf(t,e){return ls(t,e*12)}function sm(t,e){const n=Ne(t),s=Ne(e),i=n.getTime()-s.getTime();return i<0?-1:i>0?1:i}function vy(t){return t instanceof Date||typeof t=="object"&&Object.prototype.toString.call(t)==="[object Date]"}function ma(t){if(!vy(t)&&typeof t!="number")return!1;const e=Ne(t);return!isNaN(Number(e))}function im(t){const e=Ne(t);return Math.trunc(e.getMonth()/3)+1}function u2(t,e){const n=Ne(t),s=Ne(e);return n.getFullYear()-s.getFullYear()}function d2(t,e){const n=Ne(t),s=Ne(e),i=sm(n,s),o=Math.abs(u2(n,s));n.setFullYear(1584),s.setFullYear(1584);const r=sm(n,s)===-i,a=i*(o-+r);return a===0?0:a}function yy(t,e){const n=Ne(t.start),s=Ne(t.end);let i=+n>+s;const o=i?+n:+s,r=i?s:n;r.setHours(0,0,0,0);let a=e?.step??1;if(!a)return[];a<0&&(a=-a,i=!i);const l=[];for(;+r<=o;)l.push(Ne(r)),r.setDate(r.getDate()+a),r.setHours(0,0,0,0);return i?l.reverse():l}function fo(t){const e=Ne(t),n=e.getMonth(),s=n-n%3;return e.setMonth(s,1),e.setHours(0,0,0,0),e}function h2(t,e){const n=Ne(t.start),s=Ne(t.end);let i=+n>+s;const o=i?+fo(n):+fo(s);let r=fo(i?s:n),a=e?.step??1;if(!a)return[];a<0&&(a=-a,i=!i);const l=[];for(;+r<=o;)l.push(Ne(r)),r=c2(r,a);return i?l.reverse():l}function f2(t){const e=Ne(t);return e.setDate(1),e.setHours(0,0,0,0),e}function wy(t){const e=Ne(t),n=e.getFullYear();return e.setFullYear(n+1,0,0),e.setHours(23,59,59,999),e}function Oa(t){const e=Ne(t),n=rt(t,0);return n.setFullYear(e.getFullYear(),0,1),n.setHours(0,0,0,0),n}function xy(t,e){const n=Do(),s=e?.weekStartsOn??e?.locale?.options?.weekStartsOn??n.weekStartsOn??n.locale?.options?.weekStartsOn??0,i=Ne(t),o=i.getDay(),r=(o{let s;const i=p2[t];return typeof i=="string"?s=i:e===1?s=i.one:s=i.other.replace("{{count}}",e.toString()),n?.addSuffix?n.comparison&&n.comparison>0?"in "+s:s+" ago":s};function ju(t){return(e={})=>{const n=e.width?String(e.width):t.defaultWidth;return t.formats[n]||t.formats[t.defaultWidth]}}const m2={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},_2={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},b2={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},v2={date:ju({formats:m2,defaultWidth:"full"}),time:ju({formats:_2,defaultWidth:"full"}),dateTime:ju({formats:b2,defaultWidth:"full"})},y2={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},w2=(t,e,n,s)=>y2[t];function Yr(t){return(e,n)=>{const s=n?.context?String(n.context):"standalone";let i;if(s==="formatting"&&t.formattingValues){const r=t.defaultFormattingWidth||t.defaultWidth,a=n?.width?String(n.width):r;i=t.formattingValues[a]||t.formattingValues[r]}else{const r=t.defaultWidth,a=n?.width?String(n.width):t.defaultWidth;i=t.values[a]||t.values[r]}const o=t.argumentCallback?t.argumentCallback(e):e;return i[o]}}const x2={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},k2={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},S2={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},$2={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},A2={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},C2={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},E2=(t,e)=>{const n=Number(t),s=n%100;if(s>20||s<10)switch(s%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},T2={ordinalNumber:E2,era:Yr({values:x2,defaultWidth:"wide"}),quarter:Yr({values:k2,defaultWidth:"wide",argumentCallback:t=>t-1}),month:Yr({values:S2,defaultWidth:"wide"}),day:Yr({values:$2,defaultWidth:"wide"}),dayPeriod:Yr({values:A2,defaultWidth:"wide",formattingValues:C2,defaultFormattingWidth:"wide"})};function Ur(t){return(e,n={})=>{const s=n.width,i=s&&t.matchPatterns[s]||t.matchPatterns[t.defaultMatchWidth],o=e.match(i);if(!o)return null;const r=o[0],a=s&&t.parsePatterns[s]||t.parsePatterns[t.defaultParseWidth],l=Array.isArray(a)?M2(a,d=>d.test(r)):P2(a,d=>d.test(r));let c;c=t.valueCallback?t.valueCallback(l):l,c=n.valueCallback?n.valueCallback(c):c;const u=e.slice(r.length);return{value:c,rest:u}}}function P2(t,e){for(const n in t)if(Object.prototype.hasOwnProperty.call(t,n)&&e(t[n]))return n}function M2(t,e){for(let n=0;n{const s=e.match(t.matchPattern);if(!s)return null;const i=s[0],o=e.match(t.parsePattern);if(!o)return null;let r=t.valueCallback?t.valueCallback(o[0]):o[0];r=n.valueCallback?n.valueCallback(r):r;const a=e.slice(i.length);return{value:r,rest:a}}}const O2=/^(\d+)(th|st|nd|rd)?/i,I2=/\d+/i,L2={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},R2={any:[/^b/i,/^(a|c)/i]},N2={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},F2={any:[/1/i,/2/i,/3/i,/4/i]},B2={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},V2={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},H2={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},j2={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},W2={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},z2={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},K2={ordinalNumber:D2({matchPattern:O2,parsePattern:I2,valueCallback:t=>parseInt(t,10)}),era:Ur({matchPatterns:L2,defaultMatchWidth:"wide",parsePatterns:R2,defaultParseWidth:"any"}),quarter:Ur({matchPatterns:N2,defaultMatchWidth:"wide",parsePatterns:F2,defaultParseWidth:"any",valueCallback:t=>t+1}),month:Ur({matchPatterns:B2,defaultMatchWidth:"wide",parsePatterns:V2,defaultParseWidth:"any"}),day:Ur({matchPatterns:H2,defaultMatchWidth:"wide",parsePatterns:j2,defaultParseWidth:"any"}),dayPeriod:Ur({matchPatterns:W2,defaultMatchWidth:"any",parsePatterns:z2,defaultParseWidth:"any"})},ky={code:"en-US",formatDistance:g2,formatLong:v2,formatRelative:w2,localize:T2,match:K2,options:{weekStartsOn:0,firstWeekContainsDate:1}};function Y2(t){const e=Ne(t);return by(e,Oa(e))+1}function of(t){const e=Ne(t),n=+_r(e)-+l2(e);return Math.round(n/gy)+1}function rf(t,e){const n=Ne(t),s=n.getFullYear(),i=Do(),o=e?.firstWeekContainsDate??e?.locale?.options?.firstWeekContainsDate??i.firstWeekContainsDate??i.locale?.options?.firstWeekContainsDate??1,r=rt(t,0);r.setFullYear(s+1,0,o),r.setHours(0,0,0,0);const a=us(r,e),l=rt(t,0);l.setFullYear(s,0,o),l.setHours(0,0,0,0);const c=us(l,e);return n.getTime()>=a.getTime()?s+1:n.getTime()>=c.getTime()?s:s-1}function U2(t,e){const n=Do(),s=e?.firstWeekContainsDate??e?.locale?.options?.firstWeekContainsDate??n.firstWeekContainsDate??n.locale?.options?.firstWeekContainsDate??1,i=rf(t,e),o=rt(t,0);return o.setFullYear(i,0,s),o.setHours(0,0,0,0),us(o,e)}function af(t,e){const n=Ne(t),s=+us(n,e)-+U2(n,e);return Math.round(s/gy)+1}function lt(t,e){const n=t<0?"-":"",s=Math.abs(t).toString().padStart(e,"0");return n+s}const li={y(t,e){const n=t.getFullYear(),s=n>0?n:1-n;return lt(e==="yy"?s%100:s,e.length)},M(t,e){const n=t.getMonth();return e==="M"?String(n+1):lt(n+1,2)},d(t,e){return lt(t.getDate(),e.length)},a(t,e){const n=t.getHours()/12>=1?"pm":"am";switch(e){case"a":case"aa":return n.toUpperCase();case"aaa":return n;case"aaaaa":return n[0];case"aaaa":default:return n==="am"?"a.m.":"p.m."}},h(t,e){return lt(t.getHours()%12||12,e.length)},H(t,e){return lt(t.getHours(),e.length)},m(t,e){return lt(t.getMinutes(),e.length)},s(t,e){return lt(t.getSeconds(),e.length)},S(t,e){const n=e.length,s=t.getMilliseconds(),i=Math.trunc(s*Math.pow(10,n-3));return lt(i,e.length)}},Ko={am:"am",pm:"pm",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},rm={G:function(t,e,n){const s=t.getFullYear()>0?1:0;switch(e){case"G":case"GG":case"GGG":return n.era(s,{width:"abbreviated"});case"GGGGG":return n.era(s,{width:"narrow"});case"GGGG":default:return n.era(s,{width:"wide"})}},y:function(t,e,n){if(e==="yo"){const s=t.getFullYear(),i=s>0?s:1-s;return n.ordinalNumber(i,{unit:"year"})}return li.y(t,e)},Y:function(t,e,n,s){const i=rf(t,s),o=i>0?i:1-i;if(e==="YY"){const r=o%100;return lt(r,2)}return e==="Yo"?n.ordinalNumber(o,{unit:"year"}):lt(o,e.length)},R:function(t,e){const n=_y(t);return lt(n,e.length)},u:function(t,e){const n=t.getFullYear();return lt(n,e.length)},Q:function(t,e,n){const s=Math.ceil((t.getMonth()+1)/3);switch(e){case"Q":return String(s);case"QQ":return lt(s,2);case"Qo":return n.ordinalNumber(s,{unit:"quarter"});case"QQQ":return n.quarter(s,{width:"abbreviated",context:"formatting"});case"QQQQQ":return n.quarter(s,{width:"narrow",context:"formatting"});case"QQQQ":default:return n.quarter(s,{width:"wide",context:"formatting"})}},q:function(t,e,n){const s=Math.ceil((t.getMonth()+1)/3);switch(e){case"q":return String(s);case"qq":return lt(s,2);case"qo":return n.ordinalNumber(s,{unit:"quarter"});case"qqq":return n.quarter(s,{width:"abbreviated",context:"standalone"});case"qqqqq":return n.quarter(s,{width:"narrow",context:"standalone"});case"qqqq":default:return n.quarter(s,{width:"wide",context:"standalone"})}},M:function(t,e,n){const s=t.getMonth();switch(e){case"M":case"MM":return li.M(t,e);case"Mo":return n.ordinalNumber(s+1,{unit:"month"});case"MMM":return n.month(s,{width:"abbreviated",context:"formatting"});case"MMMMM":return n.month(s,{width:"narrow",context:"formatting"});case"MMMM":default:return n.month(s,{width:"wide",context:"formatting"})}},L:function(t,e,n){const s=t.getMonth();switch(e){case"L":return String(s+1);case"LL":return lt(s+1,2);case"Lo":return n.ordinalNumber(s+1,{unit:"month"});case"LLL":return n.month(s,{width:"abbreviated",context:"standalone"});case"LLLLL":return n.month(s,{width:"narrow",context:"standalone"});case"LLLL":default:return n.month(s,{width:"wide",context:"standalone"})}},w:function(t,e,n,s){const i=af(t,s);return e==="wo"?n.ordinalNumber(i,{unit:"week"}):lt(i,e.length)},I:function(t,e,n){const s=of(t);return e==="Io"?n.ordinalNumber(s,{unit:"week"}):lt(s,e.length)},d:function(t,e,n){return e==="do"?n.ordinalNumber(t.getDate(),{unit:"date"}):li.d(t,e)},D:function(t,e,n){const s=Y2(t);return e==="Do"?n.ordinalNumber(s,{unit:"dayOfYear"}):lt(s,e.length)},E:function(t,e,n){const s=t.getDay();switch(e){case"E":case"EE":case"EEE":return n.day(s,{width:"abbreviated",context:"formatting"});case"EEEEE":return n.day(s,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(s,{width:"short",context:"formatting"});case"EEEE":default:return n.day(s,{width:"wide",context:"formatting"})}},e:function(t,e,n,s){const i=t.getDay(),o=(i-s.weekStartsOn+8)%7||7;switch(e){case"e":return String(o);case"ee":return lt(o,2);case"eo":return n.ordinalNumber(o,{unit:"day"});case"eee":return n.day(i,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(i,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(i,{width:"short",context:"formatting"});case"eeee":default:return n.day(i,{width:"wide",context:"formatting"})}},c:function(t,e,n,s){const i=t.getDay(),o=(i-s.weekStartsOn+8)%7||7;switch(e){case"c":return String(o);case"cc":return lt(o,e.length);case"co":return n.ordinalNumber(o,{unit:"day"});case"ccc":return n.day(i,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(i,{width:"narrow",context:"standalone"});case"cccccc":return n.day(i,{width:"short",context:"standalone"});case"cccc":default:return n.day(i,{width:"wide",context:"standalone"})}},i:function(t,e,n){const s=t.getDay(),i=s===0?7:s;switch(e){case"i":return String(i);case"ii":return lt(i,e.length);case"io":return n.ordinalNumber(i,{unit:"day"});case"iii":return n.day(s,{width:"abbreviated",context:"formatting"});case"iiiii":return n.day(s,{width:"narrow",context:"formatting"});case"iiiiii":return n.day(s,{width:"short",context:"formatting"});case"iiii":default:return n.day(s,{width:"wide",context:"formatting"})}},a:function(t,e,n){const i=t.getHours()/12>=1?"pm":"am";switch(e){case"a":case"aa":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"aaa":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return n.dayPeriod(i,{width:"narrow",context:"formatting"});case"aaaa":default:return n.dayPeriod(i,{width:"wide",context:"formatting"})}},b:function(t,e,n){const s=t.getHours();let i;switch(s===12?i=Ko.noon:s===0?i=Ko.midnight:i=s/12>=1?"pm":"am",e){case"b":case"bb":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"bbb":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return n.dayPeriod(i,{width:"narrow",context:"formatting"});case"bbbb":default:return n.dayPeriod(i,{width:"wide",context:"formatting"})}},B:function(t,e,n){const s=t.getHours();let i;switch(s>=17?i=Ko.evening:s>=12?i=Ko.afternoon:s>=4?i=Ko.morning:i=Ko.night,e){case"B":case"BB":case"BBB":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"BBBBB":return n.dayPeriod(i,{width:"narrow",context:"formatting"});case"BBBB":default:return n.dayPeriod(i,{width:"wide",context:"formatting"})}},h:function(t,e,n){if(e==="ho"){let s=t.getHours()%12;return s===0&&(s=12),n.ordinalNumber(s,{unit:"hour"})}return li.h(t,e)},H:function(t,e,n){return e==="Ho"?n.ordinalNumber(t.getHours(),{unit:"hour"}):li.H(t,e)},K:function(t,e,n){const s=t.getHours()%12;return e==="Ko"?n.ordinalNumber(s,{unit:"hour"}):lt(s,e.length)},k:function(t,e,n){let s=t.getHours();return s===0&&(s=24),e==="ko"?n.ordinalNumber(s,{unit:"hour"}):lt(s,e.length)},m:function(t,e,n){return e==="mo"?n.ordinalNumber(t.getMinutes(),{unit:"minute"}):li.m(t,e)},s:function(t,e,n){return e==="so"?n.ordinalNumber(t.getSeconds(),{unit:"second"}):li.s(t,e)},S:function(t,e){return li.S(t,e)},X:function(t,e,n){const s=t.getTimezoneOffset();if(s===0)return"Z";switch(e){case"X":return lm(s);case"XXXX":case"XX":return ro(s);case"XXXXX":case"XXX":default:return ro(s,":")}},x:function(t,e,n){const s=t.getTimezoneOffset();switch(e){case"x":return lm(s);case"xxxx":case"xx":return ro(s);case"xxxxx":case"xxx":default:return ro(s,":")}},O:function(t,e,n){const s=t.getTimezoneOffset();switch(e){case"O":case"OO":case"OOO":return"GMT"+am(s,":");case"OOOO":default:return"GMT"+ro(s,":")}},z:function(t,e,n){const s=t.getTimezoneOffset();switch(e){case"z":case"zz":case"zzz":return"GMT"+am(s,":");case"zzzz":default:return"GMT"+ro(s,":")}},t:function(t,e,n){const s=Math.trunc(t.getTime()/1e3);return lt(s,e.length)},T:function(t,e,n){const s=t.getTime();return lt(s,e.length)}};function am(t,e=""){const n=t>0?"-":"+",s=Math.abs(t),i=Math.trunc(s/60),o=s%60;return o===0?n+String(i):n+String(i)+e+lt(o,2)}function lm(t,e){return t%60===0?(t>0?"-":"+")+lt(Math.abs(t)/60,2):ro(t,e)}function ro(t,e=""){const n=t>0?"-":"+",s=Math.abs(t),i=lt(Math.trunc(s/60),2),o=lt(s%60,2);return n+i+e+o}const cm=(t,e)=>{switch(t){case"P":return e.date({width:"short"});case"PP":return e.date({width:"medium"});case"PPP":return e.date({width:"long"});case"PPPP":default:return e.date({width:"full"})}},Sy=(t,e)=>{switch(t){case"p":return e.time({width:"short"});case"pp":return e.time({width:"medium"});case"ppp":return e.time({width:"long"});case"pppp":default:return e.time({width:"full"})}},q2=(t,e)=>{const n=t.match(/(P+)(p+)?/)||[],s=n[1],i=n[2];if(!i)return cm(t,e);let o;switch(s){case"P":o=e.dateTime({width:"short"});break;case"PP":o=e.dateTime({width:"medium"});break;case"PPP":o=e.dateTime({width:"long"});break;case"PPPP":default:o=e.dateTime({width:"full"});break}return o.replace("{{date}}",cm(s,e)).replace("{{time}}",Sy(i,e))},Hd={p:Sy,P:q2},G2=/^D+$/,J2=/^Y+$/,X2=["D","DD","YY","YYYY"];function $y(t){return G2.test(t)}function Ay(t){return J2.test(t)}function jd(t,e,n){const s=Q2(t,e,n);if(console.warn(s),X2.includes(t))throw new RangeError(s)}function Q2(t,e,n){const s=t[0]==="Y"?"years":"days of the month";return`Use \`${t.toLowerCase()}\` instead of \`${t}\` (in \`${e}\`) for formatting ${s} to the input \`${n}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}const Z2=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,eO=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,tO=/^'([^]*?)'?$/,nO=/''/g,sO=/[a-zA-Z]/;function Ss(t,e,n){const s=Do(),i=n?.locale??s.locale??ky,o=n?.firstWeekContainsDate??n?.locale?.options?.firstWeekContainsDate??s.firstWeekContainsDate??s.locale?.options?.firstWeekContainsDate??1,r=n?.weekStartsOn??n?.locale?.options?.weekStartsOn??s.weekStartsOn??s.locale?.options?.weekStartsOn??0,a=Ne(t);if(!ma(a))throw new RangeError("Invalid time value");let l=e.match(eO).map(u=>{const d=u[0];if(d==="p"||d==="P"){const f=Hd[d];return f(u,i.formatLong)}return u}).join("").match(Z2).map(u=>{if(u==="''")return{isToken:!1,value:"'"};const d=u[0];if(d==="'")return{isToken:!1,value:iO(u)};if(rm[d])return{isToken:!0,value:u};if(d.match(sO))throw new RangeError("Format string contains an unescaped latin alphabet character `"+d+"`");return{isToken:!1,value:u}});i.localize.preprocessor&&(l=i.localize.preprocessor(a,l));const c={firstWeekContainsDate:o,weekStartsOn:r,locale:i};return l.map(u=>{if(!u.isToken)return u.value;const d=u.value;(!n?.useAdditionalWeekYearTokens&&Ay(d)||!n?.useAdditionalDayOfYearTokens&&$y(d))&&jd(d,e,String(t));const f=rm[d[0]];return f(a,d,i.localize,c)}).join("")}function iO(t){const e=t.match(tO);return e?e[1].replace(nO,"'"):t}function oO(t){return Ne(t).getDay()}function rO(t){const e=Ne(t),n=e.getFullYear(),s=e.getMonth(),i=rt(t,0);return i.setFullYear(n,s+1,0),i.setHours(0,0,0,0),i.getDate()}function aO(){return Object.assign({},Do())}function Qs(t){return Ne(t).getHours()}function lO(t){let n=Ne(t).getDay();return n===0&&(n=7),n}function Mi(t){return Ne(t).getMinutes()}function Ze(t){return Ne(t).getMonth()}function br(t){return Ne(t).getSeconds()}function ze(t){return Ne(t).getFullYear()}function vr(t,e){const n=Ne(t),s=Ne(e);return n.getTime()>s.getTime()}function Ia(t,e){const n=Ne(t),s=Ne(e);return+n<+s}function Zo(t,e){const n=Ne(t),s=Ne(e);return+n==+s}function cO(t,e){const n=e instanceof Date?rt(e,0):new e(0);return n.setFullYear(t.getFullYear(),t.getMonth(),t.getDate()),n.setHours(t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()),n}const uO=10;class Cy{subPriority=0;validate(e,n){return!0}}class dO extends Cy{constructor(e,n,s,i,o){super(),this.value=e,this.validateValue=n,this.setValue=s,this.priority=i,o&&(this.subPriority=o)}validate(e,n){return this.validateValue(e,this.value,n)}set(e,n,s){return this.setValue(e,n,this.value,s)}}class hO extends Cy{priority=uO;subPriority=-1;set(e,n){return n.timestampIsSet?e:rt(e,cO(e,Date))}}class at{run(e,n,s,i){const o=this.parse(e,n,s,i);return o?{setter:new dO(o.value,this.validate,this.set,this.priority,this.subPriority),rest:o.rest}:null}validate(e,n,s){return!0}}class fO extends at{priority=140;parse(e,n,s){switch(n){case"G":case"GG":case"GGG":return s.era(e,{width:"abbreviated"})||s.era(e,{width:"narrow"});case"GGGGG":return s.era(e,{width:"narrow"});case"GGGG":default:return s.era(e,{width:"wide"})||s.era(e,{width:"abbreviated"})||s.era(e,{width:"narrow"})}}set(e,n,s){return n.era=s,e.setFullYear(s,0,1),e.setHours(0,0,0,0),e}incompatibleTokens=["R","u","t","T"]}const Lt={month:/^(1[0-2]|0?\d)/,date:/^(3[0-1]|[0-2]?\d)/,dayOfYear:/^(36[0-6]|3[0-5]\d|[0-2]?\d?\d)/,week:/^(5[0-3]|[0-4]?\d)/,hour23h:/^(2[0-3]|[0-1]?\d)/,hour24h:/^(2[0-4]|[0-1]?\d)/,hour11h:/^(1[0-1]|0?\d)/,hour12h:/^(1[0-2]|0?\d)/,minute:/^[0-5]?\d/,second:/^[0-5]?\d/,singleDigit:/^\d/,twoDigits:/^\d{1,2}/,threeDigits:/^\d{1,3}/,fourDigits:/^\d{1,4}/,anyDigitsSigned:/^-?\d+/,singleDigitSigned:/^-?\d/,twoDigitsSigned:/^-?\d{1,2}/,threeDigitsSigned:/^-?\d{1,3}/,fourDigitsSigned:/^-?\d{1,4}/},vs={basicOptionalMinutes:/^([+-])(\d{2})(\d{2})?|Z/,basic:/^([+-])(\d{2})(\d{2})|Z/,basicOptionalSeconds:/^([+-])(\d{2})(\d{2})((\d{2}))?|Z/,extended:/^([+-])(\d{2}):(\d{2})|Z/,extendedOptionalSeconds:/^([+-])(\d{2}):(\d{2})(:(\d{2}))?|Z/};function Rt(t,e){return t&&{value:e(t.value),rest:t.rest}}function $t(t,e){const n=e.match(t);return n?{value:parseInt(n[0],10),rest:e.slice(n[0].length)}:null}function ys(t,e){const n=e.match(t);if(!n)return null;if(n[0]==="Z")return{value:0,rest:e.slice(1)};const s=n[1]==="+"?1:-1,i=n[2]?parseInt(n[2],10):0,o=n[3]?parseInt(n[3],10):0,r=n[5]?parseInt(n[5],10):0;return{value:s*(i*my+o*i2+r*o2),rest:e.slice(n[0].length)}}function Ey(t){return $t(Lt.anyDigitsSigned,t)}function Dt(t,e){switch(t){case 1:return $t(Lt.singleDigit,e);case 2:return $t(Lt.twoDigits,e);case 3:return $t(Lt.threeDigits,e);case 4:return $t(Lt.fourDigits,e);default:return $t(new RegExp("^\\d{1,"+t+"}"),e)}}function fc(t,e){switch(t){case 1:return $t(Lt.singleDigitSigned,e);case 2:return $t(Lt.twoDigitsSigned,e);case 3:return $t(Lt.threeDigitsSigned,e);case 4:return $t(Lt.fourDigitsSigned,e);default:return $t(new RegExp("^-?\\d{1,"+t+"}"),e)}}function lf(t){switch(t){case"morning":return 4;case"evening":return 17;case"pm":case"noon":case"afternoon":return 12;case"am":case"midnight":case"night":default:return 0}}function Ty(t,e){const n=e>0,s=n?e:1-e;let i;if(s<=50)i=t||100;else{const o=s+50,r=Math.trunc(o/100)*100,a=t>=o%100;i=t+r-(a?100:0)}return n?i:1-i}function Py(t){return t%400===0||t%4===0&&t%100!==0}class pO extends at{priority=130;incompatibleTokens=["Y","R","u","w","I","i","e","c","t","T"];parse(e,n,s){const i=o=>({year:o,isTwoDigitYear:n==="yy"});switch(n){case"y":return Rt(Dt(4,e),i);case"yo":return Rt(s.ordinalNumber(e,{unit:"year"}),i);default:return Rt(Dt(n.length,e),i)}}validate(e,n){return n.isTwoDigitYear||n.year>0}set(e,n,s){const i=e.getFullYear();if(s.isTwoDigitYear){const r=Ty(s.year,i);return e.setFullYear(r,0,1),e.setHours(0,0,0,0),e}const o=!("era"in n)||n.era===1?s.year:1-s.year;return e.setFullYear(o,0,1),e.setHours(0,0,0,0),e}}class gO extends at{priority=130;parse(e,n,s){const i=o=>({year:o,isTwoDigitYear:n==="YY"});switch(n){case"Y":return Rt(Dt(4,e),i);case"Yo":return Rt(s.ordinalNumber(e,{unit:"year"}),i);default:return Rt(Dt(n.length,e),i)}}validate(e,n){return n.isTwoDigitYear||n.year>0}set(e,n,s,i){const o=rf(e,i);if(s.isTwoDigitYear){const a=Ty(s.year,o);return e.setFullYear(a,0,i.firstWeekContainsDate),e.setHours(0,0,0,0),us(e,i)}const r=!("era"in n)||n.era===1?s.year:1-s.year;return e.setFullYear(r,0,i.firstWeekContainsDate),e.setHours(0,0,0,0),us(e,i)}incompatibleTokens=["y","R","u","Q","q","M","L","I","d","D","i","t","T"]}class mO extends at{priority=130;parse(e,n){return fc(n==="R"?4:n.length,e)}set(e,n,s){const i=rt(e,0);return i.setFullYear(s,0,4),i.setHours(0,0,0,0),_r(i)}incompatibleTokens=["G","y","Y","u","Q","q","M","L","w","d","D","e","c","t","T"]}class _O extends at{priority=130;parse(e,n){return fc(n==="u"?4:n.length,e)}set(e,n,s){return e.setFullYear(s,0,1),e.setHours(0,0,0,0),e}incompatibleTokens=["G","y","Y","R","w","I","i","e","c","t","T"]}class bO extends at{priority=120;parse(e,n,s){switch(n){case"Q":case"QQ":return Dt(n.length,e);case"Qo":return s.ordinalNumber(e,{unit:"quarter"});case"QQQ":return s.quarter(e,{width:"abbreviated",context:"formatting"})||s.quarter(e,{width:"narrow",context:"formatting"});case"QQQQQ":return s.quarter(e,{width:"narrow",context:"formatting"});case"QQQQ":default:return s.quarter(e,{width:"wide",context:"formatting"})||s.quarter(e,{width:"abbreviated",context:"formatting"})||s.quarter(e,{width:"narrow",context:"formatting"})}}validate(e,n){return n>=1&&n<=4}set(e,n,s){return e.setMonth((s-1)*3,1),e.setHours(0,0,0,0),e}incompatibleTokens=["Y","R","q","M","L","w","I","d","D","i","e","c","t","T"]}class vO extends at{priority=120;parse(e,n,s){switch(n){case"q":case"qq":return Dt(n.length,e);case"qo":return s.ordinalNumber(e,{unit:"quarter"});case"qqq":return s.quarter(e,{width:"abbreviated",context:"standalone"})||s.quarter(e,{width:"narrow",context:"standalone"});case"qqqqq":return s.quarter(e,{width:"narrow",context:"standalone"});case"qqqq":default:return s.quarter(e,{width:"wide",context:"standalone"})||s.quarter(e,{width:"abbreviated",context:"standalone"})||s.quarter(e,{width:"narrow",context:"standalone"})}}validate(e,n){return n>=1&&n<=4}set(e,n,s){return e.setMonth((s-1)*3,1),e.setHours(0,0,0,0),e}incompatibleTokens=["Y","R","Q","M","L","w","I","d","D","i","e","c","t","T"]}class yO extends at{incompatibleTokens=["Y","R","q","Q","L","w","I","D","i","e","c","t","T"];priority=110;parse(e,n,s){const i=o=>o-1;switch(n){case"M":return Rt($t(Lt.month,e),i);case"MM":return Rt(Dt(2,e),i);case"Mo":return Rt(s.ordinalNumber(e,{unit:"month"}),i);case"MMM":return s.month(e,{width:"abbreviated",context:"formatting"})||s.month(e,{width:"narrow",context:"formatting"});case"MMMMM":return s.month(e,{width:"narrow",context:"formatting"});case"MMMM":default:return s.month(e,{width:"wide",context:"formatting"})||s.month(e,{width:"abbreviated",context:"formatting"})||s.month(e,{width:"narrow",context:"formatting"})}}validate(e,n){return n>=0&&n<=11}set(e,n,s){return e.setMonth(s,1),e.setHours(0,0,0,0),e}}class wO extends at{priority=110;parse(e,n,s){const i=o=>o-1;switch(n){case"L":return Rt($t(Lt.month,e),i);case"LL":return Rt(Dt(2,e),i);case"Lo":return Rt(s.ordinalNumber(e,{unit:"month"}),i);case"LLL":return s.month(e,{width:"abbreviated",context:"standalone"})||s.month(e,{width:"narrow",context:"standalone"});case"LLLLL":return s.month(e,{width:"narrow",context:"standalone"});case"LLLL":default:return s.month(e,{width:"wide",context:"standalone"})||s.month(e,{width:"abbreviated",context:"standalone"})||s.month(e,{width:"narrow",context:"standalone"})}}validate(e,n){return n>=0&&n<=11}set(e,n,s){return e.setMonth(s,1),e.setHours(0,0,0,0),e}incompatibleTokens=["Y","R","q","Q","M","w","I","D","i","e","c","t","T"]}function xO(t,e,n){const s=Ne(t),i=af(s,n)-e;return s.setDate(s.getDate()-i*7),s}class kO extends at{priority=100;parse(e,n,s){switch(n){case"w":return $t(Lt.week,e);case"wo":return s.ordinalNumber(e,{unit:"week"});default:return Dt(n.length,e)}}validate(e,n){return n>=1&&n<=53}set(e,n,s,i){return us(xO(e,s,i),i)}incompatibleTokens=["y","R","u","q","Q","M","L","I","d","D","i","t","T"]}function SO(t,e){const n=Ne(t),s=of(n)-e;return n.setDate(n.getDate()-s*7),n}class $O extends at{priority=100;parse(e,n,s){switch(n){case"I":return $t(Lt.week,e);case"Io":return s.ordinalNumber(e,{unit:"week"});default:return Dt(n.length,e)}}validate(e,n){return n>=1&&n<=53}set(e,n,s){return _r(SO(e,s))}incompatibleTokens=["y","Y","u","q","Q","M","L","w","d","D","e","c","t","T"]}const AO=[31,28,31,30,31,30,31,31,30,31,30,31],CO=[31,29,31,30,31,30,31,31,30,31,30,31];class EO extends at{priority=90;subPriority=1;parse(e,n,s){switch(n){case"d":return $t(Lt.date,e);case"do":return s.ordinalNumber(e,{unit:"date"});default:return Dt(n.length,e)}}validate(e,n){const s=e.getFullYear(),i=Py(s),o=e.getMonth();return i?n>=1&&n<=CO[o]:n>=1&&n<=AO[o]}set(e,n,s){return e.setDate(s),e.setHours(0,0,0,0),e}incompatibleTokens=["Y","R","q","Q","w","I","D","i","e","c","t","T"]}class TO extends at{priority=90;subpriority=1;parse(e,n,s){switch(n){case"D":case"DD":return $t(Lt.dayOfYear,e);case"Do":return s.ordinalNumber(e,{unit:"date"});default:return Dt(n.length,e)}}validate(e,n){const s=e.getFullYear();return Py(s)?n>=1&&n<=366:n>=1&&n<=365}set(e,n,s){return e.setMonth(0,s),e.setHours(0,0,0,0),e}incompatibleTokens=["Y","R","q","Q","M","L","w","I","d","E","i","e","c","t","T"]}function cf(t,e,n){const s=Do(),i=n?.weekStartsOn??n?.locale?.options?.weekStartsOn??s.weekStartsOn??s.locale?.options?.weekStartsOn??0,o=Ne(t),r=o.getDay(),l=(e%7+7)%7,c=7-i,u=e<0||e>6?e-(r+c)%7:(l+c)%7-(r+c)%7;return is(o,u)}class PO extends at{priority=90;parse(e,n,s){switch(n){case"E":case"EE":case"EEE":return s.day(e,{width:"abbreviated",context:"formatting"})||s.day(e,{width:"short",context:"formatting"})||s.day(e,{width:"narrow",context:"formatting"});case"EEEEE":return s.day(e,{width:"narrow",context:"formatting"});case"EEEEEE":return s.day(e,{width:"short",context:"formatting"})||s.day(e,{width:"narrow",context:"formatting"});case"EEEE":default:return s.day(e,{width:"wide",context:"formatting"})||s.day(e,{width:"abbreviated",context:"formatting"})||s.day(e,{width:"short",context:"formatting"})||s.day(e,{width:"narrow",context:"formatting"})}}validate(e,n){return n>=0&&n<=6}set(e,n,s,i){return e=cf(e,s,i),e.setHours(0,0,0,0),e}incompatibleTokens=["D","i","e","c","t","T"]}class MO extends at{priority=90;parse(e,n,s,i){const o=r=>{const a=Math.floor((r-1)/7)*7;return(r+i.weekStartsOn+6)%7+a};switch(n){case"e":case"ee":return Rt(Dt(n.length,e),o);case"eo":return Rt(s.ordinalNumber(e,{unit:"day"}),o);case"eee":return s.day(e,{width:"abbreviated",context:"formatting"})||s.day(e,{width:"short",context:"formatting"})||s.day(e,{width:"narrow",context:"formatting"});case"eeeee":return s.day(e,{width:"narrow",context:"formatting"});case"eeeeee":return s.day(e,{width:"short",context:"formatting"})||s.day(e,{width:"narrow",context:"formatting"});case"eeee":default:return s.day(e,{width:"wide",context:"formatting"})||s.day(e,{width:"abbreviated",context:"formatting"})||s.day(e,{width:"short",context:"formatting"})||s.day(e,{width:"narrow",context:"formatting"})}}validate(e,n){return n>=0&&n<=6}set(e,n,s,i){return e=cf(e,s,i),e.setHours(0,0,0,0),e}incompatibleTokens=["y","R","u","q","Q","M","L","I","d","D","E","i","c","t","T"]}class DO extends at{priority=90;parse(e,n,s,i){const o=r=>{const a=Math.floor((r-1)/7)*7;return(r+i.weekStartsOn+6)%7+a};switch(n){case"c":case"cc":return Rt(Dt(n.length,e),o);case"co":return Rt(s.ordinalNumber(e,{unit:"day"}),o);case"ccc":return s.day(e,{width:"abbreviated",context:"standalone"})||s.day(e,{width:"short",context:"standalone"})||s.day(e,{width:"narrow",context:"standalone"});case"ccccc":return s.day(e,{width:"narrow",context:"standalone"});case"cccccc":return s.day(e,{width:"short",context:"standalone"})||s.day(e,{width:"narrow",context:"standalone"});case"cccc":default:return s.day(e,{width:"wide",context:"standalone"})||s.day(e,{width:"abbreviated",context:"standalone"})||s.day(e,{width:"short",context:"standalone"})||s.day(e,{width:"narrow",context:"standalone"})}}validate(e,n){return n>=0&&n<=6}set(e,n,s,i){return e=cf(e,s,i),e.setHours(0,0,0,0),e}incompatibleTokens=["y","R","u","q","Q","M","L","I","d","D","E","i","e","t","T"]}function OO(t,e){const n=Ne(t),s=lO(n),i=e-s;return is(n,i)}class IO extends at{priority=90;parse(e,n,s){const i=o=>o===0?7:o;switch(n){case"i":case"ii":return Dt(n.length,e);case"io":return s.ordinalNumber(e,{unit:"day"});case"iii":return Rt(s.day(e,{width:"abbreviated",context:"formatting"})||s.day(e,{width:"short",context:"formatting"})||s.day(e,{width:"narrow",context:"formatting"}),i);case"iiiii":return Rt(s.day(e,{width:"narrow",context:"formatting"}),i);case"iiiiii":return Rt(s.day(e,{width:"short",context:"formatting"})||s.day(e,{width:"narrow",context:"formatting"}),i);case"iiii":default:return Rt(s.day(e,{width:"wide",context:"formatting"})||s.day(e,{width:"abbreviated",context:"formatting"})||s.day(e,{width:"short",context:"formatting"})||s.day(e,{width:"narrow",context:"formatting"}),i)}}validate(e,n){return n>=1&&n<=7}set(e,n,s){return e=OO(e,s),e.setHours(0,0,0,0),e}incompatibleTokens=["y","Y","u","q","Q","M","L","w","d","D","E","e","c","t","T"]}class LO extends at{priority=80;parse(e,n,s){switch(n){case"a":case"aa":case"aaa":return s.dayPeriod(e,{width:"abbreviated",context:"formatting"})||s.dayPeriod(e,{width:"narrow",context:"formatting"});case"aaaaa":return s.dayPeriod(e,{width:"narrow",context:"formatting"});case"aaaa":default:return s.dayPeriod(e,{width:"wide",context:"formatting"})||s.dayPeriod(e,{width:"abbreviated",context:"formatting"})||s.dayPeriod(e,{width:"narrow",context:"formatting"})}}set(e,n,s){return e.setHours(lf(s),0,0,0),e}incompatibleTokens=["b","B","H","k","t","T"]}class RO extends at{priority=80;parse(e,n,s){switch(n){case"b":case"bb":case"bbb":return s.dayPeriod(e,{width:"abbreviated",context:"formatting"})||s.dayPeriod(e,{width:"narrow",context:"formatting"});case"bbbbb":return s.dayPeriod(e,{width:"narrow",context:"formatting"});case"bbbb":default:return s.dayPeriod(e,{width:"wide",context:"formatting"})||s.dayPeriod(e,{width:"abbreviated",context:"formatting"})||s.dayPeriod(e,{width:"narrow",context:"formatting"})}}set(e,n,s){return e.setHours(lf(s),0,0,0),e}incompatibleTokens=["a","B","H","k","t","T"]}class NO extends at{priority=80;parse(e,n,s){switch(n){case"B":case"BB":case"BBB":return s.dayPeriod(e,{width:"abbreviated",context:"formatting"})||s.dayPeriod(e,{width:"narrow",context:"formatting"});case"BBBBB":return s.dayPeriod(e,{width:"narrow",context:"formatting"});case"BBBB":default:return s.dayPeriod(e,{width:"wide",context:"formatting"})||s.dayPeriod(e,{width:"abbreviated",context:"formatting"})||s.dayPeriod(e,{width:"narrow",context:"formatting"})}}set(e,n,s){return e.setHours(lf(s),0,0,0),e}incompatibleTokens=["a","b","t","T"]}class FO extends at{priority=70;parse(e,n,s){switch(n){case"h":return $t(Lt.hour12h,e);case"ho":return s.ordinalNumber(e,{unit:"hour"});default:return Dt(n.length,e)}}validate(e,n){return n>=1&&n<=12}set(e,n,s){const i=e.getHours()>=12;return i&&s<12?e.setHours(s+12,0,0,0):!i&&s===12?e.setHours(0,0,0,0):e.setHours(s,0,0,0),e}incompatibleTokens=["H","K","k","t","T"]}class BO extends at{priority=70;parse(e,n,s){switch(n){case"H":return $t(Lt.hour23h,e);case"Ho":return s.ordinalNumber(e,{unit:"hour"});default:return Dt(n.length,e)}}validate(e,n){return n>=0&&n<=23}set(e,n,s){return e.setHours(s,0,0,0),e}incompatibleTokens=["a","b","h","K","k","t","T"]}class VO extends at{priority=70;parse(e,n,s){switch(n){case"K":return $t(Lt.hour11h,e);case"Ko":return s.ordinalNumber(e,{unit:"hour"});default:return Dt(n.length,e)}}validate(e,n){return n>=0&&n<=11}set(e,n,s){return e.getHours()>=12&&s<12?e.setHours(s+12,0,0,0):e.setHours(s,0,0,0),e}incompatibleTokens=["h","H","k","t","T"]}class HO extends at{priority=70;parse(e,n,s){switch(n){case"k":return $t(Lt.hour24h,e);case"ko":return s.ordinalNumber(e,{unit:"hour"});default:return Dt(n.length,e)}}validate(e,n){return n>=1&&n<=24}set(e,n,s){const i=s<=24?s%24:s;return e.setHours(i,0,0,0),e}incompatibleTokens=["a","b","h","H","K","t","T"]}class jO extends at{priority=60;parse(e,n,s){switch(n){case"m":return $t(Lt.minute,e);case"mo":return s.ordinalNumber(e,{unit:"minute"});default:return Dt(n.length,e)}}validate(e,n){return n>=0&&n<=59}set(e,n,s){return e.setMinutes(s,0,0),e}incompatibleTokens=["t","T"]}class WO extends at{priority=50;parse(e,n,s){switch(n){case"s":return $t(Lt.second,e);case"so":return s.ordinalNumber(e,{unit:"second"});default:return Dt(n.length,e)}}validate(e,n){return n>=0&&n<=59}set(e,n,s){return e.setSeconds(s,0),e}incompatibleTokens=["t","T"]}class zO extends at{priority=30;parse(e,n){const s=i=>Math.trunc(i*Math.pow(10,-n.length+3));return Rt(Dt(n.length,e),s)}set(e,n,s){return e.setMilliseconds(s),e}incompatibleTokens=["t","T"]}class KO extends at{priority=10;parse(e,n){switch(n){case"X":return ys(vs.basicOptionalMinutes,e);case"XX":return ys(vs.basic,e);case"XXXX":return ys(vs.basicOptionalSeconds,e);case"XXXXX":return ys(vs.extendedOptionalSeconds,e);case"XXX":default:return ys(vs.extended,e)}}set(e,n,s){return n.timestampIsSet?e:rt(e,e.getTime()-hc(e)-s)}incompatibleTokens=["t","T","x"]}class YO extends at{priority=10;parse(e,n){switch(n){case"x":return ys(vs.basicOptionalMinutes,e);case"xx":return ys(vs.basic,e);case"xxxx":return ys(vs.basicOptionalSeconds,e);case"xxxxx":return ys(vs.extendedOptionalSeconds,e);case"xxx":default:return ys(vs.extended,e)}}set(e,n,s){return n.timestampIsSet?e:rt(e,e.getTime()-hc(e)-s)}incompatibleTokens=["t","T","X"]}class UO extends at{priority=40;parse(e){return Ey(e)}set(e,n,s){return[rt(e,s*1e3),{timestampIsSet:!0}]}incompatibleTokens="*"}class qO extends at{priority=20;parse(e){return Ey(e)}set(e,n,s){return[rt(e,s),{timestampIsSet:!0}]}incompatibleTokens="*"}const GO={G:new fO,y:new pO,Y:new gO,R:new mO,u:new _O,Q:new bO,q:new vO,M:new yO,L:new wO,w:new kO,I:new $O,d:new EO,D:new TO,E:new PO,e:new MO,c:new DO,i:new IO,a:new LO,b:new RO,B:new NO,h:new FO,H:new BO,K:new VO,k:new HO,m:new jO,s:new WO,S:new zO,X:new KO,x:new YO,t:new UO,T:new qO},JO=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,XO=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,QO=/^'([^]*?)'?$/,ZO=/''/g,eI=/\S/,tI=/[a-zA-Z]/;function Wd(t,e,n,s){const i=aO(),o=s?.locale??i.locale??ky,r=s?.firstWeekContainsDate??s?.locale?.options?.firstWeekContainsDate??i.firstWeekContainsDate??i.locale?.options?.firstWeekContainsDate??1,a=s?.weekStartsOn??s?.locale?.options?.weekStartsOn??i.weekStartsOn??i.locale?.options?.weekStartsOn??0;if(e==="")return t===""?Ne(n):rt(n,NaN);const l={firstWeekContainsDate:r,weekStartsOn:a,locale:o},c=[new hO],u=e.match(XO).map(m=>{const y=m[0];if(y in Hd){const v=Hd[y];return v(m,o.formatLong)}return m}).join("").match(JO),d=[];for(let m of u){!s?.useAdditionalWeekYearTokens&&Ay(m)&&jd(m,e,t),!s?.useAdditionalDayOfYearTokens&&$y(m)&&jd(m,e,t);const y=m[0],v=GO[y];if(v){const{incompatibleTokens:$}=v;if(Array.isArray($)){const D=d.find(x=>$.includes(x.token)||x.token===y);if(D)throw new RangeError(`The format string mustn't contain \`${D.fullToken}\` and \`${m}\` at the same time`)}else if(v.incompatibleTokens==="*"&&d.length>0)throw new RangeError(`The format string mustn't contain \`${m}\` and any other token at the same time`);d.push({token:y,fullToken:m});const A=v.run(t,m,o.match,l);if(!A)return rt(n,NaN);c.push(A.setter),t=A.rest}else{if(y.match(tI))throw new RangeError("Format string contains an unescaped latin alphabet character `"+y+"`");if(m==="''"?m="'":y==="'"&&(m=nI(m)),t.indexOf(m)===0)t=t.slice(m.length);else return rt(n,NaN)}}if(t.length>0&&eI.test(t))return rt(n,NaN);const f=c.map(m=>m.priority).sort((m,y)=>y-m).filter((m,y,v)=>v.indexOf(m)===y).map(m=>c.filter(y=>y.priority===m).sort((y,v)=>v.subPriority-y.subPriority)).map(m=>m[0]);let g=Ne(n);if(isNaN(g.getTime()))return rt(n,NaN);const _={};for(const m of f){if(!m.validate(g,l))return rt(n,NaN);const y=m.set(g,_,l);Array.isArray(y)?(g=y[0],Object.assign(_,y[1])):g=y}return rt(n,g)}function nI(t){return t.match(QO)[1].replace(ZO,"'")}function um(t,e){const n=fo(t),s=fo(e);return+n==+s}function sI(t,e){return is(t,-e)}function My(t,e){const n=Ne(t),s=n.getFullYear(),i=n.getDate(),o=rt(t,0);o.setFullYear(s,e,15),o.setHours(0,0,0,0);const r=rO(o);return n.setMonth(e,Math.min(i,r)),n}function pt(t,e){let n=Ne(t);return isNaN(+n)?rt(t,NaN):(e.year!=null&&n.setFullYear(e.year),e.month!=null&&(n=My(n,e.month)),e.date!=null&&n.setDate(e.date),e.hours!=null&&n.setHours(e.hours),e.minutes!=null&&n.setMinutes(e.minutes),e.seconds!=null&&n.setSeconds(e.seconds),e.milliseconds!=null&&n.setMilliseconds(e.milliseconds),n)}function iI(t,e){const n=Ne(t);return n.setHours(e),n}function Dy(t,e){const n=Ne(t);return n.setMilliseconds(e),n}function oI(t,e){const n=Ne(t);return n.setMinutes(e),n}function Oy(t,e){const n=Ne(t);return n.setSeconds(e),n}function ws(t,e){const n=Ne(t);return isNaN(+n)?rt(t,NaN):(n.setFullYear(e),n)}function yr(t,e){return ls(t,-e)}function rI(t,e){const{years:n=0,months:s=0,weeks:i=0,days:o=0,hours:r=0,minutes:a=0,seconds:l=0}=e,c=yr(t,s+n*12),u=sI(c,o+i*7),d=a+r*60,g=(l+d*60)*1e3;return rt(t,u.getTime()-g)}function Iy(t,e){return sf(t,-e)}function Ir(){const t=iA();return C(),F("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor","aria-hidden":"true",class:"dp__icon",role:"img",...t},[h("path",{d:"M29.333 8c0-2.208-1.792-4-4-4h-18.667c-2.208 0-4 1.792-4 4v18.667c0 2.208 1.792 4 4 4h18.667c2.208 0 4-1.792 4-4v-18.667zM26.667 8v18.667c0 0.736-0.597 1.333-1.333 1.333 0 0-18.667 0-18.667 0-0.736 0-1.333-0.597-1.333-1.333 0 0 0-18.667 0-18.667 0-0.736 0.597-1.333 1.333-1.333 0 0 18.667 0 18.667 0 0.736 0 1.333 0.597 1.333 1.333z"}),h("path",{d:"M20 2.667v5.333c0 0.736 0.597 1.333 1.333 1.333s1.333-0.597 1.333-1.333v-5.333c0-0.736-0.597-1.333-1.333-1.333s-1.333 0.597-1.333 1.333z"}),h("path",{d:"M9.333 2.667v5.333c0 0.736 0.597 1.333 1.333 1.333s1.333-0.597 1.333-1.333v-5.333c0-0.736-0.597-1.333-1.333-1.333s-1.333 0.597-1.333 1.333z"}),h("path",{d:"M4 14.667h24c0.736 0 1.333-0.597 1.333-1.333s-0.597-1.333-1.333-1.333h-24c-0.736 0-1.333 0.597-1.333 1.333s0.597 1.333 1.333 1.333z"})])}Ir.compatConfig={MODE:3};function Ly(){return C(),F("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor","aria-hidden":"true",class:"dp__icon",role:"img"},[h("path",{d:"M23.057 7.057l-16 16c-0.52 0.52-0.52 1.365 0 1.885s1.365 0.52 1.885 0l16-16c0.52-0.52 0.52-1.365 0-1.885s-1.365-0.52-1.885 0z"}),h("path",{d:"M7.057 8.943l16 16c0.52 0.52 1.365 0.52 1.885 0s0.52-1.365 0-1.885l-16-16c-0.52-0.52-1.365-0.52-1.885 0s-0.52 1.365 0 1.885z"})])}Ly.compatConfig={MODE:3};function uf(){return C(),F("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor","aria-hidden":"true",class:"dp__icon",role:"img"},[h("path",{d:"M20.943 23.057l-7.057-7.057c0 0 7.057-7.057 7.057-7.057 0.52-0.52 0.52-1.365 0-1.885s-1.365-0.52-1.885 0l-8 8c-0.521 0.521-0.521 1.365 0 1.885l8 8c0.52 0.52 1.365 0.52 1.885 0s0.52-1.365 0-1.885z"})])}uf.compatConfig={MODE:3};function df(){return C(),F("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor","aria-hidden":"true",class:"dp__icon",role:"img"},[h("path",{d:"M12.943 24.943l8-8c0.521-0.521 0.521-1.365 0-1.885l-8-8c-0.52-0.52-1.365-0.52-1.885 0s-0.52 1.365 0 1.885l7.057 7.057c0 0-7.057 7.057-7.057 7.057-0.52 0.52-0.52 1.365 0 1.885s1.365 0.52 1.885 0z"})])}df.compatConfig={MODE:3};function hf(){return C(),F("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor","aria-hidden":"true",class:"dp__icon",role:"img"},[h("path",{d:"M16 1.333c-8.095 0-14.667 6.572-14.667 14.667s6.572 14.667 14.667 14.667c8.095 0 14.667-6.572 14.667-14.667s-6.572-14.667-14.667-14.667zM16 4c6.623 0 12 5.377 12 12s-5.377 12-12 12c-6.623 0-12-5.377-12-12s5.377-12 12-12z"}),h("path",{d:"M14.667 8v8c0 0.505 0.285 0.967 0.737 1.193l5.333 2.667c0.658 0.329 1.46 0.062 1.789-0.596s0.062-1.46-0.596-1.789l-4.596-2.298c0 0 0-7.176 0-7.176 0-0.736-0.597-1.333-1.333-1.333s-1.333 0.597-1.333 1.333z"})])}hf.compatConfig={MODE:3};function ff(){return C(),F("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor","aria-hidden":"true",class:"dp__icon",role:"img"},[h("path",{d:"M24.943 19.057l-8-8c-0.521-0.521-1.365-0.521-1.885 0l-8 8c-0.52 0.52-0.52 1.365 0 1.885s1.365 0.52 1.885 0l7.057-7.057c0 0 7.057 7.057 7.057 7.057 0.52 0.52 1.365 0.52 1.885 0s0.52-1.365 0-1.885z"})])}ff.compatConfig={MODE:3};function pf(){return C(),F("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor","aria-hidden":"true",class:"dp__icon",role:"img"},[h("path",{d:"M7.057 12.943l8 8c0.521 0.521 1.365 0.521 1.885 0l8-8c0.52-0.52 0.52-1.365 0-1.885s-1.365-0.52-1.885 0l-7.057 7.057c0 0-7.057-7.057-7.057-7.057-0.52-0.52-1.365-0.52-1.885 0s-0.52 1.365 0 1.885z"})])}pf.compatConfig={MODE:3};const En=(t,e)=>e?new Date(t.toLocaleString("en-US",{timeZone:e})):new Date(t),gf=(t,e,n)=>zd(t,e,n)||ye(),aI=(t,e,n)=>{const s=e.dateInTz?En(new Date(t),e.dateInTz):ye(t);return n?wn(s,!0):s},zd=(t,e,n)=>{if(!t)return null;const s=n?wn(ye(t),!0):ye(t);return e?e.exactMatch?aI(t,e,n):En(s,e.timezone):s},lI=t=>{if(!t)return 0;const e=new Date,n=new Date(e.toLocaleString("en-US",{timeZone:"UTC"})),s=new Date(e.toLocaleString("en-US",{timeZone:t})),i=s.getTimezoneOffset()/60;return(+n-+s)/(1e3*60*60)-i};var ts=(t=>(t.month="month",t.year="year",t))(ts||{}),ao=(t=>(t.top="top",t.bottom="bottom",t))(ao||{}),bo=(t=>(t.header="header",t.calendar="calendar",t.timePicker="timePicker",t))(bo||{}),cn=(t=>(t.month="month",t.year="year",t.calendar="calendar",t.time="time",t.minutes="minutes",t.hours="hours",t.seconds="seconds",t))(cn||{});const cI=["timestamp","date","iso"];var gn=(t=>(t.up="up",t.down="down",t.left="left",t.right="right",t))(gn||{}),bt=(t=>(t.arrowUp="ArrowUp",t.arrowDown="ArrowDown",t.arrowLeft="ArrowLeft",t.arrowRight="ArrowRight",t.enter="Enter",t.space=" ",t.esc="Escape",t.tab="Tab",t.home="Home",t.end="End",t.pageUp="PageUp",t.pageDown="PageDown",t))(bt||{});function dm(t){return e=>new Intl.DateTimeFormat(t,{weekday:"short",timeZone:"UTC"}).format(new Date(`2017-01-0${e}T00:00:00+00:00`)).slice(0,2)}function uI(t){return e=>Ss(En(new Date(`2017-01-0${e}T00:00:00+00:00`),"UTC"),"EEEEEE",{locale:t})}const dI=(t,e,n)=>{const s=[1,2,3,4,5,6,7];let i;if(t!==null)try{i=s.map(uI(t))}catch{i=s.map(dm(e))}else i=s.map(dm(e));const o=i.slice(0,n),r=i.slice(n+1,i.length);return[i[n]].concat(...r).concat(...o)},mf=(t,e,n)=>{const s=[];for(let i=+t[0];i<=+t[1];i++)s.push({value:+i,text:By(i,e)});return n?s.reverse():s},Ry=(t,e,n)=>{const s=[1,2,3,4,5,6,7,8,9,10,11,12].map(o=>{const r=o<10?`0${o}`:o;return new Date(`2017-${r}-01T00:00:00+00:00`)});if(t!==null)try{const o=n==="long"?"LLLL":"LLL";return s.map((r,a)=>{const l=Ss(En(r,"UTC"),o,{locale:t});return{text:l.charAt(0).toUpperCase()+l.substring(1),value:a}})}catch{}const i=new Intl.DateTimeFormat(e,{month:n,timeZone:"UTC"});return s.map((o,r)=>{const a=i.format(o);return{text:a.charAt(0).toUpperCase()+a.substring(1),value:r}})},hI=t=>[12,1,2,3,4,5,6,7,8,9,10,11,12,1,2,3,4,5,6,7,8,9,10,11][t],Wt=t=>{const e=G(t);return e!=null&&e.$el?e?.$el:e},fI=t=>({type:"dot",...t??{}}),Ny=t=>Array.isArray(t)?!!t[0]&&!!t[1]:!1,_f={prop:t=>`"${t}" prop must be enabled!`,dateArr:t=>`You need to use array as "model-value" binding in order to support "${t}"`},Qt=t=>t,hm=t=>t===0?t:!t||isNaN(+t)?null:+t,fm=t=>t===null,Fy=t=>{if(t)return[...t.querySelectorAll("input, button, select, textarea, a[href]")][0]},pI=t=>{const e=[],n=s=>s.filter(i=>i);for(let s=0;s{const s=n!=null,i=e!=null;if(!s&&!i)return!1;const o=+n,r=+e;return s&&i?+t>o||+to:i?+tpI(t).map(n=>n.map(s=>{const{active:i,disabled:o,isBetween:r,highlighted:a}=e(s);return{...s,active:i,disabled:o,className:{dp__overlay_cell_active:i,dp__overlay_cell:!i,dp__overlay_cell_disabled:o,dp__overlay_cell_pad:!0,dp__overlay_cell_active_disabled:o&&i,dp__cell_in_between:r,"dp--highlighted":a}}})),$i=(t,e,n=!1)=>{t&&e.allowStopPropagation&&(n&&t.stopImmediatePropagation(),t.stopPropagation())},gI=()=>["a[href]","area[href]","input:not([disabled]):not([type='hidden'])","select:not([disabled])","textarea:not([disabled])","button:not([disabled])","[tabindex]:not([tabindex='-1'])","[data-datepicker-instance]"].join(", ");function mI(t,e){let n=[...document.querySelectorAll(gI())];n=n.filter(i=>!t.contains(i)||i.hasAttribute("data-datepicker-instance"));const s=n.indexOf(t);if(s>=0&&(e?s-1>=0:s+1<=n.length))return n[s+(e?-1:1)]}const Kd=(t,e)=>t?.querySelector(`[data-dp-element="${e}"]`),By=(t,e)=>new Intl.NumberFormat(e,{useGrouping:!1,style:"decimal"}).format(t),bf=t=>Ss(t,"dd-MM-yyyy"),Wu=t=>Array.isArray(t),pc=(t,e)=>e.get(bf(t)),_I=(t,e)=>t?e?e instanceof Map?!!pc(t,e):e(ye(t)):!1:!0,bn=(t,e,n=!1,s)=>{if(t.key===bt.enter||t.key===bt.space)return n&&t.preventDefault(),e();if(s)return s(t)},bI=()=>["iPad Simulator","iPhone Simulator","iPod Simulator","iPad","iPhone","iPod"].some(t=>navigator.userAgent.includes(t))||navigator.userAgent.includes("Mac")&&"ontouchend"in document,pm=(t,e,n,s,i,o)=>{const r=Wd(t,e.slice(0,t.length),new Date,{locale:o});return ma(r)&&vy(r)?s||i?r:pt(r,{hours:+n.hours,minutes:+n?.minutes,seconds:+n?.seconds,milliseconds:0}):null},vI=(t,e,n,s,i,o)=>{const r=Array.isArray(n)?n[0]:n;if(typeof e=="string")return pm(t,e,r,s,i,o);if(Array.isArray(e)){let a=null;for(const l of e)if(a=pm(t,l,r,s,i,o),a)break;return a}return typeof e=="function"?e(t):null},ye=t=>t?new Date(t):new Date,yI=(t,e,n)=>{if(e){const i=(t.getMonth()+1).toString().padStart(2,"0"),o=t.getDate().toString().padStart(2,"0"),r=t.getHours().toString().padStart(2,"0"),a=t.getMinutes().toString().padStart(2,"0"),l=n?t.getSeconds().toString().padStart(2,"0"):"00";return`${t.getFullYear()}-${i}-${o}T${r}:${a}:${l}.000Z`}const s=Date.UTC(t.getUTCFullYear(),t.getUTCMonth(),t.getUTCDate(),t.getUTCHours(),t.getUTCMinutes(),t.getUTCSeconds());return new Date(s).toISOString()},wn=(t,e)=>{const n=ye(JSON.parse(JSON.stringify(t))),s=pt(n,{hours:0,minutes:0,seconds:0,milliseconds:0});return e?f2(s):s},Ai=(t,e,n,s)=>{let i=t?ye(t):ye();return(e||e===0)&&(i=iI(i,+e)),(n||n===0)&&(i=oI(i,+n)),(s||s===0)&&(i=Oy(i,+s)),Dy(i,0)},Ct=(t,e)=>!t||!e?!1:Ia(wn(t),wn(e)),nt=(t,e)=>!t||!e?!1:Zo(wn(t),wn(e)),It=(t,e)=>!t||!e?!1:vr(wn(t),wn(e)),Uc=(t,e,n)=>t!=null&&t[0]&&t!=null&&t[1]?It(n,t[0])&&Ct(n,t[1]):t!=null&&t[0]&&e?It(n,t[0])&&Ct(n,e)||Ct(n,t[0])&&It(n,e):!1,os=t=>{const e=pt(new Date(t),{date:1});return wn(e)},zu=(t,e,n)=>e&&(n||n===0)?Object.fromEntries(["hours","minutes","seconds"].map(s=>s===e?[s,n]:[s,isNaN(+t[s])?void 0:+t[s]])):{hours:isNaN(+t.hours)?void 0:+t.hours,minutes:isNaN(+t.minutes)?void 0:+t.minutes,seconds:isNaN(+t.seconds)?void 0:+t.seconds},vo=t=>({hours:Qs(t),minutes:Mi(t),seconds:br(t)}),Vy=(t,e)=>{if(e){const n=ze(ye(e));if(n>t)return 12;if(n===t)return Ze(ye(e))}},Hy=(t,e)=>{if(e){const n=ze(ye(e));return n{if(t)return ze(ye(t))},jy=(t,e)=>{const n=It(t,e)?e:t,s=It(e,t)?e:t;return yy({start:n,end:s})},wI=t=>{const e=ls(t,1);return{month:Ze(e),year:ze(e)}},js=(t,e)=>{const n=us(t,{weekStartsOn:+e}),s=xy(t,{weekStartsOn:+e});return[n,s]},Wy=(t,e)=>{const n={hours:Qs(ye()),minutes:Mi(ye()),seconds:e?br(ye()):0};return Object.assign(n,t)},bi=(t,e,n)=>[pt(ye(t),{date:1}),pt(ye(),{month:e,year:n,date:1})],Ks=(t,e,n)=>{let s=t?ye(t):ye();return(e||e===0)&&(s=My(s,e)),n&&(s=ws(s,n)),s},zy=(t,e,n,s,i)=>{if(!s||i&&!e||!i&&!n)return!1;const o=i?ls(t,1):yr(t,1),r=[Ze(o),ze(o)];return i?!kI(...r,e):!xI(...r,n)},xI=(t,e,n)=>Ct(...bi(n,t,e))||nt(...bi(n,t,e)),kI=(t,e,n)=>It(...bi(n,t,e))||nt(...bi(n,t,e)),Ky=(t,e,n,s,i,o,r)=>{if(typeof e=="function"&&!r)return e(t);const a=n?{locale:n}:void 0;return Array.isArray(t)?`${Ss(t[0],o,a)}${i&&!t[1]?"":s}${t[1]?Ss(t[1],o,a):""}`:Ss(t,o,a)},Yo=t=>{if(t)return null;throw new Error(_f.prop("partial-range"))},Cl=(t,e)=>{if(e)return t();throw new Error(_f.prop("range"))},Yd=t=>Array.isArray(t)?ma(t[0])&&(t[1]?ma(t[1]):!0):t?ma(t):!1,SI=(t,e)=>pt(e??ye(),{hours:+t.hours||0,minutes:+t.minutes||0,seconds:+t.seconds||0}),Ku=(t,e,n,s)=>{if(!t)return!0;if(s){const i=n==="max"?Ia(t,e):vr(t,e),o={seconds:0,milliseconds:0};return i||Zo(pt(t,o),pt(e,o))}return n==="max"?t.getTime()<=e.getTime():t.getTime()>=e.getTime()},Yu=(t,e,n)=>t?SI(t,e):ye(n??e),gm=(t,e,n,s,i)=>{if(Array.isArray(s)){const r=Yu(t,s[0],e),a=Yu(t,s[1],e);return Ku(s[0],r,n,!!e)&&Ku(s[1],a,n,!!e)&&i}const o=Yu(t,s,e);return Ku(s,o,n,!!e)&&i},Uu=t=>pt(ye(),vo(t)),$I=(t,e)=>t instanceof Map?Array.from(t.values()).filter(n=>ze(ye(n))===e).map(n=>Ze(n)):[],Yy=(t,e,n)=>typeof t=="function"?t({month:e,year:n}):!!t.months.find(s=>s.month===e&&s.year===n),vf=(t,e)=>typeof t=="function"?t(e):t.years.includes(e),Uy=t=>Ss(t,"yyyy-MM-dd"),qr=Ts({menuFocused:!1,shiftKeyInMenu:!1}),qy=()=>{const t=n=>{qr.menuFocused=n},e=n=>{qr.shiftKeyInMenu!==n&&(qr.shiftKeyInMenu=n)};return{control:_e(()=>({shiftKeyInMenu:qr.shiftKeyInMenu,menuFocused:qr.menuFocused})),setMenuFocused:t,setShiftKey:e}},_t=Ts({monthYear:[],calendar:[],time:[],actionRow:[],selectionGrid:[],timePicker:{0:[],1:[]},monthPicker:[]}),qu=be(null),El=be(!1),Gu=be(!1),Ju=be(!1),Xu=be(!1),an=be(0),Ot=be(0),Bi=()=>{const t=_e(()=>El.value?[..._t.selectionGrid,_t.actionRow].filter(d=>d.length):Gu.value?[..._t.timePicker[0],..._t.timePicker[1],Xu.value?[]:[qu.value],_t.actionRow].filter(d=>d.length):Ju.value?[..._t.monthPicker,_t.actionRow]:[_t.monthYear,..._t.calendar,_t.time,_t.actionRow].filter(d=>d.length)),e=d=>{an.value=d?an.value+1:an.value-1;let f=null;t.value[Ot.value]&&(f=t.value[Ot.value][an.value]),!f&&t.value[Ot.value+(d?1:-1)]?(Ot.value=Ot.value+(d?1:-1),an.value=d?0:t.value[Ot.value].length-1):f||(an.value=d?an.value-1:an.value+1)},n=d=>{Ot.value===0&&!d||Ot.value===t.value.length&&d||(Ot.value=d?Ot.value+1:Ot.value-1,t.value[Ot.value]?t.value[Ot.value]&&!t.value[Ot.value][an.value]&&an.value!==0&&(an.value=t.value[Ot.value].length-1):Ot.value=d?Ot.value-1:Ot.value+1)},s=d=>{let f=null;t.value[Ot.value]&&(f=t.value[Ot.value][an.value]),f?f.focus({preventScroll:!El.value}):an.value=d?an.value-1:an.value+1},i=()=>{e(!0),s(!0)},o=()=>{e(!1),s(!1)},r=()=>{n(!1),s(!0)},a=()=>{n(!0),s(!0)},l=(d,f)=>{_t[f]=d},c=(d,f)=>{_t[f]=d},u=()=>{an.value=0,Ot.value=0};return{buildMatrix:l,buildMultiLevelMatrix:c,setTimePickerBackRef:d=>{qu.value=d},setSelectionGrid:d=>{El.value=d,u(),d||(_t.selectionGrid=[])},setTimePicker:(d,f=!1)=>{Gu.value=d,Xu.value=f,u(),d||(_t.timePicker[0]=[],_t.timePicker[1]=[])},setTimePickerElements:(d,f=0)=>{_t.timePicker[f]=d},arrowRight:i,arrowLeft:o,arrowUp:r,arrowDown:a,clearArrowNav:()=>{_t.monthYear=[],_t.calendar=[],_t.time=[],_t.actionRow=[],_t.selectionGrid=[],_t.timePicker[0]=[],_t.timePicker[1]=[],El.value=!1,Gu.value=!1,Xu.value=!1,Ju.value=!1,u(),qu.value=null},setMonthPicker:d=>{Ju.value=d,u()},refSets:_t}},mm=t=>({menuAppearTop:"dp-menu-appear-top",menuAppearBottom:"dp-menu-appear-bottom",open:"dp-slide-down",close:"dp-slide-up",next:"calendar-next",previous:"calendar-prev",vNext:"dp-slide-up",vPrevious:"dp-slide-down",...t??{}}),AI=t=>({toggleOverlay:"Toggle overlay",menu:"Datepicker menu",input:"Datepicker input",openTimePicker:"Open time picker",closeTimePicker:"Close time Picker",incrementValue:e=>`Increment ${e}`,decrementValue:e=>`Decrement ${e}`,openTpOverlay:e=>`Open ${e} overlay`,amPmButton:"Switch AM/PM mode",openYearsOverlay:"Open years overlay",openMonthsOverlay:"Open months overlay",nextMonth:"Next month",prevMonth:"Previous month",nextYear:"Next year",prevYear:"Previous year",day:void 0,weekDay:void 0,clearInput:"Clear value",calendarIcon:"Calendar icon",timePicker:"Time picker",monthPicker:e=>`Month picker${e?" overlay":""}`,yearPicker:e=>`Year picker${e?" overlay":""}`,timeOverlay:e=>`${e} overlay`,...t??{}}),_m=t=>t?typeof t=="boolean"?t?2:0:+t>=2?+t:2:0,CI=t=>{const e=typeof t=="object"&&t,n={static:!0,solo:!1};if(!t)return{...n,count:_m(!1)};const s=e?t:{},i=e?s.count??!0:t,o=_m(i);return Object.assign(n,s,{count:o})},EI=(t,e,n)=>t||(typeof n=="string"?n:e),TI=t=>typeof t=="boolean"?t?mm({}):!1:mm(t),PI=t=>{const e={enterSubmit:!0,tabSubmit:!0,openMenu:"open",selectOnFocus:!1,rangeSeparator:" - "};return typeof t=="object"?{...e,...t??{},enabled:!0}:{...e,enabled:t}},MI=t=>({months:[],years:[],times:{hours:[],minutes:[],seconds:[]},...t??{}}),DI=t=>({showSelect:!0,showCancel:!0,showNow:!1,showPreview:!0,...t??{}}),OI=t=>{const e={input:!1};return typeof t=="object"?{...e,...t??{},enabled:!0}:{enabled:t,...e}},II=t=>({allowStopPropagation:!0,closeOnScroll:!1,modeHeight:255,allowPreventDefault:!1,closeOnClearValue:!0,closeOnAutoApply:!0,noSwipe:!1,keepActionRow:!1,onClickOutside:void 0,tabOutClosesMenu:!0,arrowLeft:void 0,keepViewOnOffsetClick:!1,timeArrowHoldThreshold:0,shadowDom:!1,...t??{}}),LI=t=>{const e={dates:Array.isArray(t)?t.map(n=>ye(n)):[],years:[],months:[],quarters:[],weeks:[],weekdays:[],options:{highlightDisabled:!1}};return typeof t=="function"?t:{...e,...t??{}}},RI=t=>typeof t=="object"?{type:t?.type??"local",hideOnOffsetDates:t?.hideOnOffsetDates??!1}:{type:t,hideOnOffsetDates:!1},NI=t=>{const e={noDisabledRange:!1,showLastInRange:!0,minMaxRawRange:!1,partialRange:!0,disableTimeRangeValidation:!1,maxRange:void 0,minRange:void 0,autoRange:void 0,fixedStart:!1,fixedEnd:!1};return typeof t=="object"?{enabled:!0,...e,...t}:{enabled:t,...e}},FI=t=>t?typeof t=="string"?{timezone:t,exactMatch:!1,dateInTz:void 0,emitTimezone:void 0,convertModel:!0}:{timezone:t.timezone,exactMatch:t.exactMatch??!1,dateInTz:t.dateInTz??void 0,emitTimezone:t.emitTimezone??void 0,convertModel:t.convertModel??!0}:{timezone:void 0,exactMatch:!1,emitTimezone:void 0},Qu=(t,e,n)=>new Map(t.map(s=>{const i=gf(s,e,n);return[bf(i),i]})),BI=(t,e)=>t.length?new Map(t.map(n=>{const s=gf(n.date,e);return[bf(s),n]})):null,VI=t=>{var e;return{minDate:zd(t.minDate,t.timezone,t.isSpecific),maxDate:zd(t.maxDate,t.timezone,t.isSpecific),disabledDates:Wu(t.disabledDates)?Qu(t.disabledDates,t.timezone,t.isSpecific):t.disabledDates,allowedDates:Wu(t.allowedDates)?Qu(t.allowedDates,t.timezone,t.isSpecific):null,highlight:typeof t.highlight=="object"&&Wu((e=t.highlight)==null?void 0:e.dates)?Qu(t.highlight.dates,t.timezone):t.highlight,markers:BI(t.markers,t.timezone)}},HI=t=>typeof t=="boolean"?{enabled:t,dragSelect:!0,limit:null}:{enabled:!!t,limit:t.limit?+t.limit:null,dragSelect:t.dragSelect??!0},jI=t=>({...Object.fromEntries(Object.keys(t).map(e=>{const n=e,s=t[n],i=typeof t[n]=="string"?{[s]:!0}:Object.fromEntries(s.map(o=>[o,!0]));return[e,i]}))}),St=t=>{const e=()=>{const w=t.enableSeconds?":ss":"",S=t.enableMinutes?":mm":"";return t.is24?`HH${S}${w}`:`hh${S}${w} aa`},n=()=>{var w;return t.format?t.format:t.monthPicker?"MM/yyyy":t.timePicker?e():t.weekPicker?`${((w=y.value)==null?void 0:w.type)==="iso"?"RR":"ww"}-yyyy`:t.yearPicker?"yyyy":t.quarterPicker?"QQQ/yyyy":t.enableTimePicker?`MM/dd/yyyy, ${e()}`:"MM/dd/yyyy"},s=w=>Wy(w,t.enableSeconds),i=()=>D.value.enabled?t.startTime&&Array.isArray(t.startTime)?[s(t.startTime[0]),s(t.startTime[1])]:null:t.startTime&&!Array.isArray(t.startTime)?s(t.startTime):null,o=_e(()=>CI(t.multiCalendars)),r=_e(()=>i()),a=_e(()=>AI(t.ariaLabels)),l=_e(()=>MI(t.filters)),c=_e(()=>TI(t.transitions)),u=_e(()=>DI(t.actionRow)),d=_e(()=>EI(t.previewFormat,t.format,n())),f=_e(()=>PI(t.textInput)),g=_e(()=>OI(t.inline)),_=_e(()=>II(t.config)),m=_e(()=>LI(t.highlight)),y=_e(()=>RI(t.weekNumbers)),v=_e(()=>FI(t.timezone)),$=_e(()=>HI(t.multiDates)),A=_e(()=>VI({minDate:t.minDate,maxDate:t.maxDate,disabledDates:t.disabledDates,allowedDates:t.allowedDates,highlight:m.value,markers:t.markers,timezone:v.value,isSpecific:t.monthPicker||t.yearPicker||t.quarterPicker})),D=_e(()=>NI(t.range)),x=_e(()=>jI(t.ui));return{defaultedTransitions:c,defaultedMultiCalendars:o,defaultedStartTime:r,defaultedAriaLabels:a,defaultedFilters:l,defaultedActionRow:u,defaultedPreviewFormat:d,defaultedTextInput:f,defaultedInline:g,defaultedConfig:_,defaultedHighlight:m,defaultedWeekNumbers:y,defaultedRange:D,propDates:A,defaultedTz:v,defaultedMultiDates:$,defaultedUI:x,getDefaultPattern:n,getDefaultStartTime:i}},WI=(t,e,n)=>{const s=be(),{defaultedTextInput:i,defaultedRange:o,defaultedTz:r,defaultedMultiDates:a,getDefaultPattern:l}=St(e),c=be(""),u=$a(e,"format"),d=$a(e,"formatLocale");Ht(s,()=>{typeof e.onInternalModelChange=="function"&&t("internal-model-change",s.value,ae(!0))},{deep:!0}),Ht(o,(P,ie)=>{P.enabled!==ie.enabled&&(s.value=null)}),Ht(u,()=>{Z()});const f=P=>r.value.timezone&&r.value.convertModel?En(P,r.value.timezone):P,g=P=>{if(r.value.timezone&&r.value.convertModel){const ie=lI(r.value.timezone);return r2(P,ie)}return P},_=(P,ie,de=!1)=>Ky(P,e.format,e.formatLocale,i.value.rangeSeparator,e.modelAuto,ie??l(),de),m=P=>P?e.modelType?ce(P):{hours:Qs(P),minutes:Mi(P),seconds:e.enableSeconds?br(P):0}:null,y=P=>e.modelType?ce(P):{month:Ze(P),year:ze(P)},v=P=>Array.isArray(P)?a.value.enabled?P.map(ie=>$(ie,ws(ye(),ie))):Cl(()=>[ws(ye(),P[0]),P[1]?ws(ye(),P[1]):Yo(o.value.partialRange)],o.value.enabled):ws(ye(),+P),$=(P,ie)=>(typeof P=="string"||typeof P=="number")&&e.modelType?ee(P):ie,A=P=>Array.isArray(P)?[$(P[0],Ai(null,+P[0].hours,+P[0].minutes,P[0].seconds)),$(P[1],Ai(null,+P[1].hours,+P[1].minutes,P[1].seconds))]:$(P,Ai(null,P.hours,P.minutes,P.seconds)),D=P=>{const ie=pt(ye(),{date:1});return Array.isArray(P)?a.value.enabled?P.map(de=>$(de,Ks(ie,+de.month,+de.year))):Cl(()=>[$(P[0],Ks(ie,+P[0].month,+P[0].year)),$(P[1],P[1]?Ks(ie,+P[1].month,+P[1].year):Yo(o.value.partialRange))],o.value.enabled):$(P,Ks(ie,+P.month,+P.year))},x=P=>{if(Array.isArray(P))return P.map(ie=>ee(ie));throw new Error(_f.dateArr("multi-dates"))},w=P=>{if(Array.isArray(P)&&o.value.enabled){const ie=P[0],de=P[1];return[ye(Array.isArray(ie)?ie[0]:null),ye(Array.isArray(de)?de[0]:null)]}return ye(P[0])},S=P=>e.modelAuto?Array.isArray(P)?[ee(P[0]),ee(P[1])]:e.autoApply?[ee(P)]:[ee(P),null]:Array.isArray(P)?Cl(()=>P[1]?[ee(P[0]),P[1]?ee(P[1]):Yo(o.value.partialRange)]:[ee(P[0])],o.value.enabled):ee(P),T=()=>{Array.isArray(s.value)&&o.value.enabled&&s.value.length===1&&s.value.push(Yo(o.value.partialRange))},M=()=>{const P=s.value;return[ce(P[0]),P[1]?ce(P[1]):Yo(o.value.partialRange)]},E=()=>s.value[1]?M():ce(Qt(s.value[0])),V=()=>(s.value||[]).map(P=>ce(P)),X=(P=!1)=>(P||T(),e.modelAuto?E():a.value.enabled?V():Array.isArray(s.value)?Cl(()=>M(),o.value.enabled):ce(Qt(s.value))),le=P=>!P||Array.isArray(P)&&!P.length?null:e.timePicker?A(Qt(P)):e.monthPicker?D(Qt(P)):e.yearPicker?v(Qt(P)):a.value.enabled?x(Qt(P)):e.weekPicker?w(Qt(P)):S(Qt(P)),Y=P=>{const ie=le(P);Yd(Qt(ie))?(s.value=Qt(ie),Z()):(s.value=null,c.value="")},R=()=>{const P=ie=>Ss(ie,i.value.format);return`${P(s.value[0])} ${i.value.rangeSeparator} ${s.value[1]?P(s.value[1]):""}`},I=()=>n.value&&s.value?Array.isArray(s.value)?R():Ss(s.value,i.value.format):_(s.value),H=()=>s.value?a.value.enabled?s.value.map(P=>_(P)).join("; "):i.value.enabled&&typeof i.value.format=="string"?I():_(s.value):"",Z=()=>{!e.format||typeof e.format=="string"||i.value.enabled&&typeof i.value.format=="string"?c.value=H():c.value=e.format(s.value)},ee=P=>{if(e.utc){const ie=new Date(P);return e.utc==="preserve"?new Date(ie.getTime()+ie.getTimezoneOffset()*6e4):ie}return e.modelType?cI.includes(e.modelType)?f(new Date(P)):e.modelType==="format"&&(typeof e.format=="string"||!e.format)?f(Wd(P,l(),new Date,{locale:d.value})):f(Wd(P,e.modelType,new Date,{locale:d.value})):f(new Date(P))},ce=P=>P?e.utc?yI(P,e.utc==="preserve",e.enableSeconds):e.modelType?e.modelType==="timestamp"?+g(P):e.modelType==="iso"?g(P).toISOString():e.modelType==="format"&&(typeof e.format=="string"||!e.format)?_(g(P)):_(g(P),e.modelType,!0):g(P):"",ve=(P,ie=!1,de=!1)=>{if(de)return P;if(t("update:model-value",P),r.value.emitTimezone&&ie){const we=Array.isArray(P)?P.map(B=>En(Qt(B),r.value.emitTimezone)):En(Qt(P),r.value.emitTimezone);t("update:model-timezone-value",we)}},U=P=>Array.isArray(s.value)?a.value.enabled?s.value.map(ie=>P(ie)):[P(s.value[0]),s.value[1]?P(s.value[1]):Yo(o.value.partialRange)]:P(Qt(s.value)),Q=()=>{if(Array.isArray(s.value)){const P=js(s.value[0],e.weekStart),ie=s.value[1]?js(s.value[1],e.weekStart):[];return[P.map(de=>ye(de)),ie.map(de=>ye(de))]}return js(s.value,e.weekStart).map(P=>ye(P))},L=(P,ie)=>ve(Qt(U(P)),!1,ie),te=P=>{const ie=Q();return P?ie:t("update:model-value",Q())},ae=(P=!1)=>(P||Z(),e.monthPicker?L(y,P):e.timePicker?L(m,P):e.yearPicker?L(ze,P):e.weekPicker?te(P):ve(X(P),!0,P));return{inputValue:c,internalModelValue:s,checkBeforeEmit:()=>s.value?o.value.enabled?o.value.partialRange?s.value.length>=1:s.value.length===2:!!s.value:!1,parseExternalModelValue:Y,formatInputValue:Z,emitModelValue:ae}},zI=(t,e)=>{const{defaultedFilters:n,propDates:s}=St(t),{validateMonthYearInRange:i}=Vi(t),o=(u,d)=>{let f=u;return n.value.months.includes(Ze(f))?(f=d?ls(u,1):yr(u,1),o(f,d)):f},r=(u,d)=>{let f=u;return n.value.years.includes(ze(f))?(f=d?sf(u,1):Iy(u,1),r(f,d)):f},a=(u,d=!1)=>{const f=pt(ye(),{month:t.month,year:t.year});let g=u?ls(f,1):yr(f,1);t.disableYearSelect&&(g=ws(g,t.year));let _=Ze(g),m=ze(g);n.value.months.includes(_)&&(g=o(g,u),_=Ze(g),m=ze(g)),n.value.years.includes(m)&&(g=r(g,u),m=ze(g)),i(_,m,u,t.preventMinMaxNavigation)&&l(_,m,d)},l=(u,d,f)=>{e("update-month-year",{month:u,year:d,fromNav:f})},c=_e(()=>u=>zy(pt(ye(),{month:t.month,year:t.year}),s.value.maxDate,s.value.minDate,t.preventMinMaxNavigation,u));return{handleMonthYearChange:a,isDisabled:c,updateMonthYear:l}},qc={multiCalendars:{type:[Boolean,Number,String,Object],default:void 0},modelValue:{type:[String,Date,Array,Object,Number],default:null},modelType:{type:String,default:null},position:{type:String,default:"center"},dark:{type:Boolean,default:!1},format:{type:[String,Function],default:()=>null},autoPosition:{type:Boolean,default:!0},altPosition:{type:Function,default:null},transitions:{type:[Boolean,Object],default:!0},formatLocale:{type:Object,default:null},utc:{type:[Boolean,String],default:!1},ariaLabels:{type:Object,default:()=>({})},offset:{type:[Number,String],default:10},hideNavigation:{type:Array,default:()=>[]},timezone:{type:[String,Object],default:null},vertical:{type:Boolean,default:!1},disableMonthYearSelect:{type:Boolean,default:!1},disableYearSelect:{type:Boolean,default:!1},dayClass:{type:Function,default:null},yearRange:{type:Array,default:()=>[1900,2100]},enableTimePicker:{type:Boolean,default:!0},autoApply:{type:Boolean,default:!1},disabledDates:{type:[Array,Function],default:()=>[]},monthNameFormat:{type:String,default:"short"},startDate:{type:[Date,String],default:null},startTime:{type:[Object,Array],default:null},hideOffsetDates:{type:Boolean,default:!1},noToday:{type:Boolean,default:!1},disabledWeekDays:{type:Array,default:()=>[]},allowedDates:{type:Array,default:null},nowButtonLabel:{type:String,default:"Now"},markers:{type:Array,default:()=>[]},escClose:{type:Boolean,default:!0},spaceConfirm:{type:Boolean,default:!0},monthChangeOnArrows:{type:Boolean,default:!0},presetDates:{type:Array,default:()=>[]},flow:{type:Array,default:()=>[]},partialFlow:{type:Boolean,default:!1},preventMinMaxNavigation:{type:Boolean,default:!1},reverseYears:{type:Boolean,default:!1},weekPicker:{type:Boolean,default:!1},filters:{type:Object,default:()=>({})},arrowNavigation:{type:Boolean,default:!1},highlight:{type:[Function,Object],default:null},teleport:{type:[Boolean,String,Object],default:null},teleportCenter:{type:Boolean,default:!1},locale:{type:String,default:"en-Us"},weekNumName:{type:String,default:"W"},weekStart:{type:[Number,String],default:1},weekNumbers:{type:[String,Function,Object],default:null},monthChangeOnScroll:{type:[Boolean,String],default:!0},dayNames:{type:[Function,Array],default:null},monthPicker:{type:Boolean,default:!1},customProps:{type:Object,default:null},yearPicker:{type:Boolean,default:!1},modelAuto:{type:Boolean,default:!1},selectText:{type:String,default:"Select"},cancelText:{type:String,default:"Cancel"},previewFormat:{type:[String,Function],default:()=>""},multiDates:{type:[Object,Boolean],default:!1},ignoreTimeValidation:{type:Boolean,default:!1},minDate:{type:[Date,String],default:null},maxDate:{type:[Date,String],default:null},minTime:{type:Object,default:null},maxTime:{type:Object,default:null},name:{type:String,default:null},placeholder:{type:String,default:""},hideInputIcon:{type:Boolean,default:!1},clearable:{type:Boolean,default:!0},state:{type:Boolean,default:null},required:{type:Boolean,default:!1},autocomplete:{type:String,default:"off"},timePicker:{type:Boolean,default:!1},enableSeconds:{type:Boolean,default:!1},is24:{type:Boolean,default:!0},noHoursOverlay:{type:Boolean,default:!1},noMinutesOverlay:{type:Boolean,default:!1},noSecondsOverlay:{type:Boolean,default:!1},hoursGridIncrement:{type:[String,Number],default:1},minutesGridIncrement:{type:[String,Number],default:5},secondsGridIncrement:{type:[String,Number],default:5},hoursIncrement:{type:[Number,String],default:1},minutesIncrement:{type:[Number,String],default:1},secondsIncrement:{type:[Number,String],default:1},range:{type:[Boolean,Object],default:!1},uid:{type:String,default:null},disabled:{type:Boolean,default:!1},readonly:{type:Boolean,default:!1},inline:{type:[Boolean,Object],default:!1},textInput:{type:[Boolean,Object],default:!1},sixWeeks:{type:[Boolean,String],default:!1},actionRow:{type:Object,default:()=>({})},focusStartDate:{type:Boolean,default:!1},disabledTimes:{type:[Function,Array],default:void 0},timePickerInline:{type:Boolean,default:!1},calendar:{type:Function,default:null},config:{type:Object,default:void 0},quarterPicker:{type:Boolean,default:!1},yearFirst:{type:Boolean,default:!1},loading:{type:Boolean,default:!1},onInternalModelChange:{type:[Function,Object],default:null},enableMinutes:{type:Boolean,default:!0},ui:{type:Object,default:()=>({})}},ds={...qc,shadow:{type:Boolean,default:!1},flowStep:{type:Number,default:0},internalModelValue:{type:[Date,Array],default:null},noOverlayFocus:{type:Boolean,default:!1},collapse:{type:Boolean,default:!1},menuWrapRef:{type:Object,default:null},getInputRect:{type:Function,default:()=>({})},isTextInputDate:{type:Boolean,default:!1}},KI=["title"],YI=["disabled"],UI=Bt({compatConfig:{MODE:3},__name:"ActionRow",props:{menuMount:{type:Boolean,default:!1},calendarWidth:{type:Number,default:0},...ds},emits:["close-picker","select-date","select-now","invalid-select"],setup(t,{emit:e}){const n=e,s=t,{defaultedActionRow:i,defaultedPreviewFormat:o,defaultedMultiCalendars:r,defaultedTextInput:a,defaultedInline:l,defaultedRange:c,defaultedMultiDates:u,getDefaultPattern:d}=St(s),{isTimeValid:f,isMonthValid:g}=Vi(s),{buildMatrix:_}=Bi(),m=be(null),y=be(null),v=be(!1),$=be({}),A=be(null),D=be(null);Jt(()=>{s.arrowNavigation&&_([Wt(m),Wt(y)],"actionRow"),x(),window.addEventListener("resize",x)}),Dr(()=>{window.removeEventListener("resize",x)});const x=()=>{v.value=!1,setTimeout(()=>{var R,I;const H=(R=A.value)==null?void 0:R.getBoundingClientRect(),Z=(I=D.value)==null?void 0:I.getBoundingClientRect();H&&Z&&($.value.maxWidth=`${Z.width-H.width-20}px`),v.value=!0},0)},w=_e(()=>c.value.enabled&&!c.value.partialRange&&s.internalModelValue?s.internalModelValue.length===2:!0),S=_e(()=>!f.value(s.internalModelValue)||!g.value(s.internalModelValue)||!w.value),T=()=>{const R=o.value;return s.timePicker||s.monthPicker,R(Qt(s.internalModelValue))},M=()=>{const R=s.internalModelValue;return r.value.count>0?`${E(R[0])} - ${E(R[1])}`:[E(R[0]),E(R[1])]},E=R=>Ky(R,o.value,s.formatLocale,a.value.rangeSeparator,s.modelAuto,d()),V=_e(()=>!s.internalModelValue||!s.menuMount?"":typeof o.value=="string"?Array.isArray(s.internalModelValue)?s.internalModelValue.length===2&&s.internalModelValue[1]?M():u.value.enabled?s.internalModelValue.map(R=>`${E(R)}`):s.modelAuto?`${E(s.internalModelValue[0])}`:`${E(s.internalModelValue[0])} -`:E(s.internalModelValue):T()),X=()=>u.value.enabled?"; ":" - ",le=_e(()=>Array.isArray(V.value)?V.value.join(X()):V.value),Y=()=>{f.value(s.internalModelValue)&&g.value(s.internalModelValue)&&w.value?n("select-date"):n("invalid-select")};return(R,I)=>(C(),F("div",{ref_key:"actionRowRef",ref:D,class:"dp__action_row"},[R.$slots["action-row"]?Ie(R.$slots,"action-row",en(Yt({key:0},{internalModelValue:R.internalModelValue,disabled:S.value,selectDate:()=>R.$emit("select-date"),closePicker:()=>R.$emit("close-picker")}))):(C(),F(Me,{key:1},[G(i).showPreview?(C(),F("div",{key:0,class:"dp__selection_preview",title:le.value,style:zt($.value)},[R.$slots["action-preview"]&&v.value?Ie(R.$slots,"action-preview",{key:0,value:R.internalModelValue}):re("",!0),!R.$slots["action-preview"]&&v.value?(C(),F(Me,{key:1},[He(xe(le.value),1)],64)):re("",!0)],12,KI)):re("",!0),h("div",{ref_key:"actionBtnContainer",ref:A,class:"dp__action_buttons","data-dp-element":"action-row"},[R.$slots["action-buttons"]?Ie(R.$slots,"action-buttons",{key:0,value:R.internalModelValue}):re("",!0),R.$slots["action-buttons"]?re("",!0):(C(),F(Me,{key:1},[!G(l).enabled&&G(i).showCancel?(C(),F("button",{key:0,ref_key:"cancelButtonRef",ref:m,type:"button",class:"dp__action_button dp__action_cancel",onClick:I[0]||(I[0]=H=>R.$emit("close-picker")),onKeydown:I[1]||(I[1]=H=>G(bn)(H,()=>R.$emit("close-picker")))},xe(R.cancelText),545)):re("",!0),G(i).showNow?(C(),F("button",{key:1,type:"button",class:"dp__action_button dp__action_cancel",onClick:I[2]||(I[2]=H=>R.$emit("select-now")),onKeydown:I[3]||(I[3]=H=>G(bn)(H,()=>R.$emit("select-now")))},xe(R.nowButtonLabel),33)):re("",!0),G(i).showSelect?(C(),F("button",{key:2,ref_key:"selectButtonRef",ref:y,type:"button",class:"dp__action_button dp__action_select",disabled:S.value,"data-test":"select-button",onKeydown:I[4]||(I[4]=H=>G(bn)(H,()=>Y())),onClick:Y},xe(R.selectText),41,YI)):re("",!0)],64))],512)],64))],512))}}),qI=["role","aria-label","tabindex"],GI={class:"dp__selection_grid_header"},JI=["aria-selected","aria-disabled","data-test","onClick","onKeydown","onMouseover"],XI=["aria-label"],qa=Bt({__name:"SelectionOverlay",props:{items:{},type:{},isLast:{type:Boolean},arrowNavigation:{type:Boolean},skipButtonRef:{type:Boolean},headerRefs:{},hideNavigation:{},escClose:{type:Boolean},useRelative:{type:Boolean},height:{},textInput:{type:[Boolean,Object]},config:{},noOverlayFocus:{type:Boolean},focusValue:{},menuWrapRef:{},ariaLabels:{},overlayLabel:{}},emits:["selected","toggle","reset-flow","hover-value"],setup(t,{expose:e,emit:n}){const{setSelectionGrid:s,buildMultiLevelMatrix:i,setMonthPicker:o}=Bi(),r=n,a=t,{defaultedAriaLabels:l,defaultedTextInput:c,defaultedConfig:u}=St(a),{hideNavigationButtons:d}=Xc(),f=be(!1),g=be(null),_=be(null),m=be([]),y=be(),v=be(null),$=be(0),A=be(null);iv(()=>{g.value=null}),Jt(()=>{nn().then(()=>V()),a.noOverlayFocus||x(),D(!0)}),Dr(()=>D(!1));const D=U=>{var Q;a.arrowNavigation&&((Q=a.headerRefs)!=null&&Q.length?o(U):s(U))},x=()=>{var U;const Q=Wt(_);Q&&(c.value.enabled||(g.value?(U=g.value)==null||U.focus({preventScroll:!0}):Q.focus({preventScroll:!0})),f.value=Q.clientHeight({dp__overlay:!0,"dp--overlay-absolute":!a.useRelative,"dp--overlay-relative":a.useRelative})),S=_e(()=>a.useRelative?{height:`${a.height}px`,width:"260px"}:void 0),T=_e(()=>({dp__overlay_col:!0})),M=_e(()=>({dp__btn:!0,dp__button:!0,dp__overlay_action:!0,dp__over_action_scroll:f.value,dp__button_bottom:a.isLast})),E=_e(()=>{var U,Q;return{dp__overlay_container:!0,dp__container_flex:((U=a.items)==null?void 0:U.length)<=6,dp__container_block:((Q=a.items)==null?void 0:Q.length)>6}});Ht(()=>a.items,()=>V(!1),{deep:!0});const V=(U=!0)=>{nn().then(()=>{const Q=Wt(g),L=Wt(_),te=Wt(v),ae=Wt(A),P=te?te.getBoundingClientRect().height:0;L&&(L.getBoundingClientRect().height?$.value=L.getBoundingClientRect().height-P:$.value=u.value.modeHeight-P),Q&&ae&&U&&(ae.scrollTop=Q.offsetTop-ae.offsetTop-($.value/2-Q.getBoundingClientRect().height)-P)})},X=U=>{U.disabled||r("selected",U.value)},le=()=>{r("toggle"),r("reset-flow")},Y=()=>{a.escClose&&le()},R=(U,Q,L,te)=>{U&&((Q.active||Q.value===a.focusValue)&&(g.value=U),a.arrowNavigation&&(Array.isArray(m.value[L])?m.value[L][te]=U:m.value[L]=[U],I()))},I=()=>{var U,Q;const L=(U=a.headerRefs)!=null&&U.length?[a.headerRefs].concat(m.value):m.value.concat([a.skipButtonRef?[]:[v.value]]);i(Qt(L),(Q=a.headerRefs)!=null&&Q.length?"monthPicker":"selectionGrid")},H=U=>{a.arrowNavigation||$i(U,u.value,!0)},Z=U=>{y.value=U,r("hover-value",U)},ee=()=>{if(le(),!a.isLast){const U=Kd(a.menuWrapRef??null,"action-row");if(U){const Q=Fy(U);Q?.focus()}}},ce=U=>{switch(U.key){case bt.esc:return Y();case bt.arrowLeft:return H(U);case bt.arrowRight:return H(U);case bt.arrowUp:return H(U);case bt.arrowDown:return H(U);default:return}},ve=U=>{if(U.key===bt.enter)return le();if(U.key===bt.tab)return ee()};return e({focusGrid:x}),(U,Q)=>{var L;return C(),F("div",{ref_key:"gridWrapRef",ref:_,class:Ee(w.value),style:zt(S.value),role:U.useRelative?void 0:"dialog","aria-label":U.overlayLabel,tabindex:U.useRelative?void 0:"0",onKeydown:ce,onClick:Q[0]||(Q[0]=Ma(()=>{},["prevent"]))},[h("div",{ref_key:"containerRef",ref:A,class:Ee(E.value),style:zt({"--dp-overlay-height":`${$.value}px`}),role:"grid"},[h("div",GI,[Ie(U.$slots,"header")]),U.$slots.overlay?Ie(U.$slots,"overlay",{key:0}):(C(!0),F(Me,{key:1},Ke(U.items,(te,ae)=>(C(),F("div",{key:ae,class:Ee(["dp__overlay_row",{dp__flex_row:U.items.length>=3}]),role:"row"},[(C(!0),F(Me,null,Ke(te,(P,ie)=>(C(),F("div",{key:P.value,ref_for:!0,ref:de=>R(de,P,ae,ie),role:"gridcell",class:Ee(T.value),"aria-selected":P.active||void 0,"aria-disabled":P.disabled||void 0,tabindex:"0","data-test":P.text,onClick:Ma(de=>X(P),["prevent"]),onKeydown:de=>G(bn)(de,()=>X(P),!0),onMouseover:de=>Z(P.value)},[h("div",{class:Ee(P.className)},[U.$slots.item?Ie(U.$slots,"item",{key:0,item:P}):re("",!0),U.$slots.item?re("",!0):(C(),F(Me,{key:1},[He(xe(P.text),1)],64))],2)],42,JI))),128))],2))),128))],6),U.$slots["button-icon"]?Le((C(),F("button",{key:0,ref_key:"toggleButton",ref:v,type:"button","aria-label":(L=G(l))==null?void 0:L.toggleOverlay,class:Ee(M.value),tabindex:"0",onClick:le,onKeydown:ve},[Ie(U.$slots,"button-icon")],42,XI)),[[Jl,!G(d)(U.hideNavigation,U.type)]]):re("",!0)],46,qI)}}}),Gc=Bt({__name:"InstanceWrap",props:{multiCalendars:{},stretch:{type:Boolean},collapse:{type:Boolean}},setup(t){const e=t,n=_e(()=>e.multiCalendars>0?[...Array(e.multiCalendars).keys()]:[0]),s=_e(()=>({dp__instance_calendar:e.multiCalendars>0}));return(i,o)=>(C(),F("div",{class:Ee({dp__menu_inner:!i.stretch,"dp--menu--inner-stretched":i.stretch,dp__flex_display:i.multiCalendars>0,"dp--flex-display-collapsed":i.collapse})},[(C(!0),F(Me,null,Ke(n.value,(r,a)=>(C(),F("div",{key:r,class:Ee(s.value)},[Ie(i.$slots,"default",{instance:r,index:a})],2))),128))],2))}}),QI=["data-dp-element","aria-label","aria-disabled"],_a=Bt({compatConfig:{MODE:3},__name:"ArrowBtn",props:{ariaLabel:{},elName:{},disabled:{type:Boolean}},emits:["activate","set-ref"],setup(t,{emit:e}){const n=e,s=be(null);return Jt(()=>n("set-ref",s)),(i,o)=>(C(),F("button",{ref_key:"elRef",ref:s,type:"button","data-dp-element":i.elName,class:"dp__btn dp--arrow-btn-nav",tabindex:"0","aria-label":i.ariaLabel,"aria-disabled":i.disabled||void 0,onClick:o[0]||(o[0]=r=>i.$emit("activate")),onKeydown:o[1]||(o[1]=r=>G(bn)(r,()=>i.$emit("activate"),!0))},[h("span",{class:Ee(["dp__inner_nav",{dp__inner_nav_disabled:i.disabled}])},[Ie(i.$slots,"default")],2)],40,QI))}}),ZI=["aria-label","data-test"],Gy=Bt({__name:"YearModePicker",props:{...ds,showYearPicker:{type:Boolean,default:!1},items:{type:Array,default:()=>[]},instance:{type:Number,default:0},year:{type:Number,default:0},isDisabled:{type:Function,default:()=>!1}},emits:["toggle-year-picker","year-select","handle-year"],setup(t,{emit:e}){const n=e,s=t,{showRightIcon:i,showLeftIcon:o}=Xc(),{defaultedConfig:r,defaultedMultiCalendars:a,defaultedAriaLabels:l,defaultedTransitions:c,defaultedUI:u}=St(s),{showTransition:d,transitionName:f}=Ga(c),g=be(!1),_=(v=!1,$)=>{g.value=!g.value,n("toggle-year-picker",{flow:v,show:$})},m=v=>{g.value=!1,n("year-select",v)},y=(v=!1)=>{n("handle-year",v)};return(v,$)=>{var A,D,x,w,S;return C(),F(Me,null,[h("div",{class:Ee(["dp--year-mode-picker",{"dp--hidden-el":g.value}])},[G(o)(G(a),t.instance)?(C(),Se(_a,{key:0,ref:"mpPrevIconRef","aria-label":(A=G(l))==null?void 0:A.prevYear,disabled:t.isDisabled(!1),class:Ee((D=G(u))==null?void 0:D.navBtnPrev),onActivate:$[0]||($[0]=T=>y(!1))},{default:Pe(()=>[v.$slots["arrow-left"]?Ie(v.$slots,"arrow-left",{key:0}):re("",!0),v.$slots["arrow-left"]?re("",!0):(C(),Se(G(uf),{key:1}))]),_:3},8,["aria-label","disabled","class"])):re("",!0),h("button",{ref:"mpYearButtonRef",class:"dp__btn dp--year-select",type:"button","aria-label":`${t.year}-${(x=G(l))==null?void 0:x.openYearsOverlay}`,"data-test":`year-mode-btn-${t.instance}`,onClick:$[1]||($[1]=()=>_(!1)),onKeydown:$[2]||($[2]=wC(()=>_(!1),["enter"]))},[v.$slots.year?Ie(v.$slots,"year",{key:0,year:t.year}):re("",!0),v.$slots.year?re("",!0):(C(),F(Me,{key:1},[He(xe(t.year),1)],64))],40,ZI),G(i)(G(a),t.instance)?(C(),Se(_a,{key:1,ref:"mpNextIconRef","aria-label":(w=G(l))==null?void 0:w.nextYear,disabled:t.isDisabled(!0),class:Ee((S=G(u))==null?void 0:S.navBtnNext),onActivate:$[3]||($[3]=T=>y(!0))},{default:Pe(()=>[v.$slots["arrow-right"]?Ie(v.$slots,"arrow-right",{key:0}):re("",!0),v.$slots["arrow-right"]?re("",!0):(C(),Se(G(df),{key:1}))]),_:3},8,["aria-label","disabled","class"])):re("",!0)],2),N(Et,{name:G(f)(t.showYearPicker),css:G(d)},{default:Pe(()=>{var T,M;return[t.showYearPicker?(C(),Se(qa,{key:0,items:t.items,"text-input":v.textInput,"esc-close":v.escClose,config:v.config,"is-last":v.autoApply&&!G(r).keepActionRow,"hide-navigation":v.hideNavigation,"aria-labels":v.ariaLabels,"overlay-label":(M=(T=G(l))==null?void 0:T.yearPicker)==null?void 0:M.call(T,!0),type:"year",onToggle:_,onSelected:$[4]||($[4]=E=>m(E))},hn({"button-icon":Pe(()=>[v.$slots["calendar-icon"]?Ie(v.$slots,"calendar-icon",{key:0}):re("",!0),v.$slots["calendar-icon"]?re("",!0):(C(),Se(G(Ir),{key:1}))]),_:2},[v.$slots["year-overlay-value"]?{name:"item",fn:Pe(({item:E})=>[Ie(v.$slots,"year-overlay-value",{text:E.text,value:E.value})]),key:"0"}:void 0]),1032,["items","text-input","esc-close","config","is-last","hide-navigation","aria-labels","overlay-label"])):re("",!0)]}),_:3},8,["name","css"])],64)}}}),yf=(t,e,n)=>{if(e.value&&Array.isArray(e.value))if(e.value.some(s=>nt(t,s))){const s=e.value.filter(i=>!nt(i,t));e.value=s.length?s:null}else(n&&+n>e.value.length||!n)&&e.value.push(t);else e.value=[t]},wf=(t,e,n)=>{let s=t.value?t.value.slice():[];return s.length===2&&s[1]!==null&&(s=[]),s.length?Ct(e,s[0])?(s.unshift(e),n("range-start",s[0]),n("range-start",s[1])):(s[1]=e,n("range-end",e)):(s=[e],n("range-start",e)),s},Jc=(t,e,n,s)=>{t&&(t[0]&&t[1]&&n&&e("auto-apply"),t[0]&&!t[1]&&s&&n&&e("auto-apply"))},Jy=t=>{Array.isArray(t.value)&&t.value.length<=2&&t.range?t.modelValue.value=t.value.map(e=>En(ye(e),t.timezone)):Array.isArray(t.value)||(t.modelValue.value=En(ye(t.value),t.timezone))},Xy=(t,e,n,s)=>Array.isArray(e.value)&&(e.value.length===2||e.value.length===1&&s.value.partialRange)?s.value.fixedStart&&(It(t,e.value[0])||nt(t,e.value[0]))?[e.value[0],t]:s.value.fixedEnd&&(Ct(t,e.value[1])||nt(t,e.value[1]))?[t,e.value[1]]:(n("invalid-fixed-range",t),e.value):[],Qy=({multiCalendars:t,range:e,highlight:n,propDates:s,calendars:i,modelValue:o,props:r,filters:a,year:l,month:c,emit:u})=>{const d=_e(()=>mf(r.yearRange,r.locale,r.reverseYears)),f=be([!1]),g=_e(()=>(E,V)=>{const X=pt(os(new Date),{month:c.value(E),year:l.value(E)}),le=V?wy(X):Oa(X);return zy(le,s.value.maxDate,s.value.minDate,r.preventMinMaxNavigation,V)}),_=()=>Array.isArray(o.value)&&t.value.solo&&o.value[1],m=()=>{for(let E=0;E{if(!E)return m();const V=pt(ye(),i.value[E]);return i.value[0].year=ze(Iy(V,t.value.count-1)),m()},v=(E,V)=>{const X=d2(V,E);return e.value.showLastInRange&&X>1?V:E},$=E=>r.focusStartDate||t.value.solo?E[0]:E[1]?v(E[0],E[1]):E[0],A=()=>{if(o.value){const E=Array.isArray(o.value)?$(o.value):o.value;i.value[0]={month:Ze(E),year:ze(E)}}},D=()=>{A(),t.value.count&&m()};Ht(o,(E,V)=>{r.isTextInputDate&&JSON.stringify(E??{})!==JSON.stringify(V??{})&&D()}),Jt(()=>{D()});const x=(E,V)=>{i.value[V].year=E,u("update-month-year",{instance:V,year:E,month:i.value[V].month}),t.value.count&&!t.value.solo&&y(V)},w=_e(()=>E=>wr(d.value,V=>{var X;const le=l.value(E)===V.value,Y=La(V.value,xr(s.value.minDate),xr(s.value.maxDate))||((X=a.value.years)==null?void 0:X.includes(l.value(E))),R=vf(n.value,V.value);return{active:le,disabled:Y,highlighted:R}})),S=(E,V)=>{x(E,V),M(V)},T=(E,V=!1)=>{if(!g.value(E,V)){const X=V?l.value(E)+1:l.value(E)-1;x(X,E)}},M=(E,V=!1,X)=>{V||u("reset-flow"),X!==void 0?f.value[E]=X:f.value[E]=!f.value[E],f.value[E]?u("overlay-toggle",{open:!0,overlay:cn.year}):(u("overlay-closed"),u("overlay-toggle",{open:!1,overlay:cn.year}))};return{isDisabled:g,groupedYears:w,showYearPicker:f,selectYear:x,toggleYearPicker:M,handleYearSelect:S,handleYear:T}},eL=(t,e)=>{const{defaultedMultiCalendars:n,defaultedAriaLabels:s,defaultedTransitions:i,defaultedConfig:o,defaultedRange:r,defaultedHighlight:a,propDates:l,defaultedTz:c,defaultedFilters:u,defaultedMultiDates:d}=St(t),f=()=>{t.isTextInputDate&&D(ze(ye(t.startDate)),0)},{modelValue:g,year:_,month:m,calendars:y}=Ja(t,e,f),v=_e(()=>Ry(t.formatLocale,t.locale,t.monthNameFormat)),$=be(null),{checkMinMaxRange:A}=Vi(t),{selectYear:D,groupedYears:x,showYearPicker:w,toggleYearPicker:S,handleYearSelect:T,handleYear:M,isDisabled:E}=Qy({modelValue:g,multiCalendars:n,range:r,highlight:a,calendars:y,year:_,propDates:l,month:m,filters:u,props:t,emit:e});Jt(()=>{t.startDate&&(g.value&&t.focusStartDate||!g.value)&&D(ze(ye(t.startDate)),0)});const V=L=>L?{month:Ze(L),year:ze(L)}:{month:null,year:null},X=()=>g.value?Array.isArray(g.value)?g.value.map(L=>V(L)):V(g.value):V(),le=(L,te)=>{const ae=y.value[L],P=X();return Array.isArray(P)?P.some(ie=>ie.year===ae?.year&&ie.month===te):ae?.year===P.year&&te===P.month},Y=(L,te,ae)=>{var P,ie;const de=X();return Array.isArray(de)?_.value(te)===((P=de[ae])==null?void 0:P.year)&&L===((ie=de[ae])==null?void 0:ie.month):!1},R=(L,te)=>{if(r.value.enabled){const ae=X();if(Array.isArray(g.value)&&Array.isArray(ae)){const P=Y(L,te,0)||Y(L,te,1),ie=Ks(os(ye()),L,_.value(te));return Uc(g.value,$.value,ie)&&!P}return!1}return!1},I=_e(()=>L=>wr(v.value,te=>{var ae;const P=le(L,te.value),ie=La(te.value,Vy(_.value(L),l.value.minDate),Hy(_.value(L),l.value.maxDate))||$I(l.value.disabledDates,_.value(L)).includes(te.value)||((ae=u.value.months)==null?void 0:ae.includes(te.value)),de=R(te.value,L),we=Yy(a.value,te.value,_.value(L));return{active:P,disabled:ie,isBetween:de,highlighted:we}})),H=(L,te)=>Ks(os(ye()),L,_.value(te)),Z=(L,te)=>{const ae=g.value?g.value:os(new Date);g.value=Ks(ae,L,_.value(te)),e("auto-apply"),e("update-flow-step")},ee=(L,te)=>{const ae=H(L,te);r.value.fixedEnd||r.value.fixedStart?g.value=Xy(ae,g,e,r):g.value?A(ae,g.value)&&(g.value=wf(g,H(L,te),e)):g.value=[H(L,te)],nn().then(()=>{Jc(g.value,e,t.autoApply,t.modelAuto)})},ce=(L,te)=>{yf(H(L,te),g,d.value.limit),e("auto-apply",!0)},ve=(L,te)=>(y.value[te].month=L,Q(te,y.value[te].year,L),d.value.enabled?ce(L,te):r.value.enabled?ee(L,te):Z(L,te)),U=(L,te)=>{D(L,te),Q(te,L,null)},Q=(L,te,ae)=>{let P=ae;if(!P&&P!==0){const ie=X();P=Array.isArray(ie)?ie[L].month:ie.month}e("update-month-year",{instance:L,year:te,month:P})};return{groupedMonths:I,groupedYears:x,year:_,isDisabled:E,defaultedMultiCalendars:n,defaultedAriaLabels:s,defaultedTransitions:i,defaultedConfig:o,showYearPicker:w,modelValue:g,presetDate:(L,te)=>{Jy({value:L,modelValue:g,range:r.value.enabled,timezone:te?void 0:c.value.timezone}),e("auto-apply")},setHoverDate:(L,te)=>{$.value=H(L,te)},selectMonth:ve,selectYear:U,toggleYearPicker:S,handleYearSelect:T,handleYear:M,getModelMonthYear:X}},tL=Bt({compatConfig:{MODE:3},__name:"MonthPicker",props:{...ds},emits:["update:internal-model-value","overlay-closed","reset-flow","range-start","range-end","auto-apply","update-month-year","update-flow-step","mount","invalid-fixed-range","overlay-toggle"],setup(t,{expose:e,emit:n}){const s=n,i=Po(),o=Ln(i,"yearMode"),r=t;Jt(()=>{r.shadow||s("mount",null)});const{groupedMonths:a,groupedYears:l,year:c,isDisabled:u,defaultedMultiCalendars:d,defaultedConfig:f,showYearPicker:g,modelValue:_,presetDate:m,setHoverDate:y,selectMonth:v,selectYear:$,toggleYearPicker:A,handleYearSelect:D,handleYear:x,getModelMonthYear:w}=eL(r,s);return e({getSidebarProps:()=>({modelValue:_,year:c,getModelMonthYear:w,selectMonth:v,selectYear:$,handleYear:x}),presetDate:m,toggleYearPicker:S=>A(0,S)}),(S,T)=>(C(),Se(Gc,{"multi-calendars":G(d).count,collapse:S.collapse,stretch:""},{default:Pe(({instance:M})=>[S.$slots["top-extra"]?Ie(S.$slots,"top-extra",{key:0,value:S.internalModelValue}):re("",!0),S.$slots["month-year"]?Ie(S.$slots,"month-year",en(Yt({key:1},{year:G(c),months:G(a)(M),years:G(l)(M),selectMonth:G(v),selectYear:G($),instance:M}))):(C(),Se(qa,{key:2,items:G(a)(M),"arrow-navigation":S.arrowNavigation,"is-last":S.autoApply&&!G(f).keepActionRow,"esc-close":S.escClose,height:G(f).modeHeight,config:S.config,"no-overlay-focus":!!(S.noOverlayFocus||S.textInput),"use-relative":"",type:"month",onSelected:E=>G(v)(E,M),onHoverValue:E=>G(y)(E,M)},hn({header:Pe(()=>[N(Gy,Yt(S.$props,{items:G(l)(M),instance:M,"show-year-picker":G(g)[M],year:G(c)(M),"is-disabled":E=>G(u)(M,E),onHandleYear:E=>G(x)(M,E),onYearSelect:E=>G(D)(E,M),onToggleYearPicker:E=>G(A)(M,E?.flow,E?.show)}),hn({_:2},[Ke(G(o),(E,V)=>({name:E,fn:Pe(X=>[Ie(S.$slots,E,en(mn(X)))])}))]),1040,["items","instance","show-year-picker","year","is-disabled","onHandleYear","onYearSelect","onToggleYearPicker"])]),_:2},[S.$slots["month-overlay-value"]?{name:"item",fn:Pe(({item:E})=>[Ie(S.$slots,"month-overlay-value",{text:E.text,value:E.value})]),key:"0"}:void 0]),1032,["items","arrow-navigation","is-last","esc-close","height","config","no-overlay-focus","onSelected","onHoverValue"]))]),_:3},8,["multi-calendars","collapse"]))}}),nL=(t,e)=>{const n=()=>{t.isTextInputDate&&(u.value=ze(ye(t.startDate)))},{modelValue:s}=Ja(t,e,n),i=be(null),{defaultedHighlight:o,defaultedMultiDates:r,defaultedFilters:a,defaultedRange:l,propDates:c}=St(t),u=be();Jt(()=>{t.startDate&&(s.value&&t.focusStartDate||!s.value)&&(u.value=ze(ye(t.startDate)))});const d=m=>Array.isArray(s.value)?s.value.some(y=>ze(y)===m):s.value?ze(s.value)===m:!1,f=m=>l.value.enabled&&Array.isArray(s.value)?Uc(s.value,i.value,_(m)):!1,g=_e(()=>wr(mf(t.yearRange,t.locale,t.reverseYears),m=>{const y=d(m.value),v=La(m.value,xr(c.value.minDate),xr(c.value.maxDate))||a.value.years.includes(m.value),$=f(m.value)&&!y,A=vf(o.value,m.value);return{active:y,disabled:v,isBetween:$,highlighted:A}})),_=m=>ws(os(Oa(new Date)),m);return{groupedYears:g,modelValue:s,focusYear:u,setHoverValue:m=>{i.value=ws(os(new Date),m)},selectYear:m=>{var y;if(e("update-month-year",{instance:0,year:m}),r.value.enabled)return s.value?Array.isArray(s.value)&&(((y=s.value)==null?void 0:y.map(v=>ze(v))).includes(m)?s.value=s.value.filter(v=>ze(v)!==m):s.value.push(ws(wn(ye()),m))):s.value=[ws(wn(Oa(ye())),m)],e("auto-apply",!0);l.value.enabled?(s.value=wf(s,_(m),e),nn().then(()=>{Jc(s.value,e,t.autoApply,t.modelAuto)})):(s.value=_(m),e("auto-apply"))}}},sL=Bt({compatConfig:{MODE:3},__name:"YearPicker",props:{...ds},emits:["update:internal-model-value","reset-flow","range-start","range-end","auto-apply","update-month-year"],setup(t,{expose:e,emit:n}){const s=n,i=t,{groupedYears:o,modelValue:r,focusYear:a,selectYear:l,setHoverValue:c}=nL(i,s),{defaultedConfig:u}=St(i);return e({getSidebarProps:()=>({modelValue:r,selectYear:l})}),(d,f)=>(C(),F("div",null,[d.$slots["top-extra"]?Ie(d.$slots,"top-extra",{key:0,value:d.internalModelValue}):re("",!0),d.$slots["month-year"]?Ie(d.$slots,"month-year",en(Yt({key:1},{years:G(o),selectYear:G(l)}))):(C(),Se(qa,{key:2,items:G(o),"is-last":d.autoApply&&!G(u).keepActionRow,height:G(u).modeHeight,config:d.config,"no-overlay-focus":!!(d.noOverlayFocus||d.textInput),"focus-value":G(a),type:"year","use-relative":"",onSelected:G(l),onHoverValue:G(c)},hn({_:2},[d.$slots["year-overlay-value"]?{name:"item",fn:Pe(({item:g})=>[Ie(d.$slots,"year-overlay-value",{text:g.text,value:g.value})]),key:"0"}:void 0]),1032,["items","is-last","height","config","no-overlay-focus","focus-value","onSelected","onHoverValue"]))]))}}),iL={key:0,class:"dp__time_input"},oL=["data-test","aria-label","onKeydown","onClick","onMousedown"],rL=h("span",{class:"dp__tp_inline_btn_bar dp__tp_btn_in_l"},null,-1),aL=h("span",{class:"dp__tp_inline_btn_bar dp__tp_btn_in_r"},null,-1),lL=["aria-label","disabled","data-test","onKeydown","onClick"],cL=["data-test","aria-label","onKeydown","onClick","onMousedown"],uL=h("span",{class:"dp__tp_inline_btn_bar dp__tp_btn_in_l"},null,-1),dL=h("span",{class:"dp__tp_inline_btn_bar dp__tp_btn_in_r"},null,-1),hL={key:0},fL=["aria-label"],pL=Bt({compatConfig:{MODE:3},__name:"TimeInput",props:{hours:{type:Number,default:0},minutes:{type:Number,default:0},seconds:{type:Number,default:0},closeTimePickerBtn:{type:Object,default:null},order:{type:Number,default:0},disabledTimesConfig:{type:Function,default:null},validateTime:{type:Function,default:()=>!1},...ds},emits:["set-hours","set-minutes","update:hours","update:minutes","update:seconds","reset-flow","mounted","overlay-closed","overlay-opened","am-pm-change"],setup(t,{expose:e,emit:n}){const s=n,i=t,{setTimePickerElements:o,setTimePickerBackRef:r}=Bi(),{defaultedAriaLabels:a,defaultedTransitions:l,defaultedFilters:c,defaultedConfig:u,defaultedRange:d}=St(i),{transitionName:f,showTransition:g}=Ga(l),_=Ts({hours:!1,minutes:!1,seconds:!1}),m=be("AM"),y=be(null),v=be([]),$=be(),A=be(!1);Jt(()=>{s("mounted")});const D=b=>pt(new Date,{hours:b.hours,minutes:b.minutes,seconds:i.enableSeconds?b.seconds:0,milliseconds:0}),x=_e(()=>b=>H(b,i[b])||S(b,i[b])),w=_e(()=>({hours:i.hours,minutes:i.minutes,seconds:i.seconds})),S=(b,O)=>d.value.enabled&&!d.value.disableTimeRangeValidation?!i.validateTime(b,O):!1,T=(b,O)=>{if(d.value.enabled&&!d.value.disableTimeRangeValidation){const j=O?+i[`${b}Increment`]:-+i[`${b}Increment`],z=i[b]+j;return!i.validateTime(b,z)}return!1},M=_e(()=>b=>!U(+i[b]+ +i[`${b}Increment`],b)||T(b,!0)),E=_e(()=>b=>!U(+i[b]-+i[`${b}Increment`],b)||T(b,!1)),V=(b,O)=>py(pt(ye(),b),O),X=(b,O)=>rI(pt(ye(),b),O),le=_e(()=>({dp__time_col:!0,dp__time_col_block:!i.timePickerInline,dp__time_col_reg_block:!i.enableSeconds&&i.is24&&!i.timePickerInline,dp__time_col_reg_inline:!i.enableSeconds&&i.is24&&i.timePickerInline,dp__time_col_reg_with_button:!i.enableSeconds&&!i.is24,dp__time_col_sec:i.enableSeconds&&i.is24,dp__time_col_sec_with_button:i.enableSeconds&&!i.is24})),Y=_e(()=>{const b=[{type:"hours"}];return i.enableMinutes&&b.push({type:"",separator:!0},{type:"minutes"}),i.enableSeconds&&b.push({type:"",separator:!0},{type:"seconds"}),b}),R=_e(()=>Y.value.filter(b=>!b.separator)),I=_e(()=>b=>{if(b==="hours"){const O=ie(+i.hours);return{text:O<10?`0${O}`:`${O}`,value:O}}return{text:i[b]<10?`0${i[b]}`:`${i[b]}`,value:i[b]}}),H=(b,O)=>{var j;if(!i.disabledTimesConfig)return!1;const z=i.disabledTimesConfig(i.order,b==="hours"?O:void 0);return z[b]?!!((j=z[b])!=null&&j.includes(O)):!0},Z=(b,O)=>O!=="hours"||m.value==="AM"?b:b+12,ee=b=>{const O=i.is24?24:12,j=b==="hours"?O:60,z=+i[`${b}GridIncrement`],oe=b==="hours"&&!i.is24?z:0,W=[];for(let ne=oe;ne({active:!1,disabled:c.value.times[b].includes(ne.value)||!U(ne.value,b)||H(b,ne.value)||S(b,ne.value)}))},ce=b=>b>=0?b:59,ve=b=>b>=0?b:23,U=(b,O)=>{const j=i.minTime?D(zu(i.minTime)):null,z=i.maxTime?D(zu(i.maxTime)):null,oe=D(zu(w.value,O,O==="minutes"||O==="seconds"?ce(b):ve(b)));return j&&z?(Ia(oe,z)||Zo(oe,z))&&(vr(oe,j)||Zo(oe,j)):j?vr(oe,j)||Zo(oe,j):z?Ia(oe,z)||Zo(oe,z):!0},Q=b=>i[`no${b[0].toUpperCase()+b.slice(1)}Overlay`],L=b=>{Q(b)||(_[b]=!_[b],_[b]?(A.value=!0,s("overlay-opened",b)):(A.value=!1,s("overlay-closed",b)))},te=b=>b==="hours"?Qs:b==="minutes"?Mi:br,ae=()=>{$.value&&clearTimeout($.value)},P=(b,O=!0,j)=>{const z=O?V:X,oe=O?+i[`${b}Increment`]:-+i[`${b}Increment`];U(+i[b]+oe,b)&&s(`update:${b}`,te(b)(z({[b]:+i[b]},{[b]:+i[`${b}Increment`]}))),!(j!=null&&j.keyboard)&&u.value.timeArrowHoldThreshold&&($.value=setTimeout(()=>{P(b,O)},u.value.timeArrowHoldThreshold))},ie=b=>i.is24?b:(b>=12?m.value="PM":m.value="AM",hI(b)),de=()=>{m.value==="PM"?(m.value="AM",s("update:hours",i.hours-12)):(m.value="PM",s("update:hours",i.hours+12)),s("am-pm-change",m.value)},we=b=>{_[b]=!0},B=(b,O,j)=>{if(b&&i.arrowNavigation){Array.isArray(v.value[O])?v.value[O][j]=b:v.value[O]=[b];const z=v.value.reduce((oe,W)=>W.map((ne,J)=>[...oe[J]||[],W[J]]),[]);r(i.closeTimePickerBtn),y.value&&(z[1]=z[1].concat(y.value)),o(z,i.order)}},fe=(b,O)=>(L(b),s(`update:${b}`,O));return e({openChildCmp:we}),(b,O)=>{var j;return b.disabled?re("",!0):(C(),F("div",iL,[(C(!0),F(Me,null,Ke(Y.value,(z,oe)=>{var W,ne,J;return C(),F("div",{key:oe,class:Ee(le.value)},[z.separator?(C(),F(Me,{key:0},[A.value?re("",!0):(C(),F(Me,{key:0},[He(":")],64))],64)):(C(),F(Me,{key:1},[h("button",{ref_for:!0,ref:he=>B(he,oe,0),type:"button",class:Ee({dp__btn:!0,dp__inc_dec_button:!b.timePickerInline,dp__inc_dec_button_inline:b.timePickerInline,dp__tp_inline_btn_top:b.timePickerInline,dp__inc_dec_button_disabled:M.value(z.type),"dp--hidden-el":A.value}),"data-test":`${z.type}-time-inc-btn-${i.order}`,"aria-label":(W=G(a))==null?void 0:W.incrementValue(z.type),tabindex:"0",onKeydown:he=>G(bn)(he,()=>P(z.type,!0,{keyboard:!0}),!0),onClick:he=>G(u).timeArrowHoldThreshold?void 0:P(z.type,!0),onMousedown:he=>G(u).timeArrowHoldThreshold?P(z.type,!0):void 0,onMouseup:ae},[i.timePickerInline?(C(),F(Me,{key:1},[b.$slots["tp-inline-arrow-up"]?Ie(b.$slots,"tp-inline-arrow-up",{key:0}):(C(),F(Me,{key:1},[rL,aL],64))],64)):(C(),F(Me,{key:0},[b.$slots["arrow-up"]?Ie(b.$slots,"arrow-up",{key:0}):re("",!0),b.$slots["arrow-up"]?re("",!0):(C(),Se(G(ff),{key:1}))],64))],42,oL),h("button",{ref_for:!0,ref:he=>B(he,oe,1),type:"button","aria-label":`${I.value(z.type).text}-${(ne=G(a))==null?void 0:ne.openTpOverlay(z.type)}`,class:Ee({dp__time_display:!0,dp__time_display_block:!b.timePickerInline,dp__time_display_inline:b.timePickerInline,"dp--time-invalid":x.value(z.type),"dp--time-overlay-btn":!x.value(z.type),"dp--hidden-el":A.value}),disabled:Q(z.type),tabindex:"0","data-test":`${z.type}-toggle-overlay-btn-${i.order}`,onKeydown:he=>G(bn)(he,()=>L(z.type),!0),onClick:he=>L(z.type)},[b.$slots[z.type]?Ie(b.$slots,z.type,{key:0,text:I.value(z.type).text,value:I.value(z.type).value}):re("",!0),b.$slots[z.type]?re("",!0):(C(),F(Me,{key:1},[He(xe(I.value(z.type).text),1)],64))],42,lL),h("button",{ref_for:!0,ref:he=>B(he,oe,2),type:"button",class:Ee({dp__btn:!0,dp__inc_dec_button:!b.timePickerInline,dp__inc_dec_button_inline:b.timePickerInline,dp__tp_inline_btn_bottom:b.timePickerInline,dp__inc_dec_button_disabled:E.value(z.type),"dp--hidden-el":A.value}),"data-test":`${z.type}-time-dec-btn-${i.order}`,"aria-label":(J=G(a))==null?void 0:J.decrementValue(z.type),tabindex:"0",onKeydown:he=>G(bn)(he,()=>P(z.type,!1,{keyboard:!0}),!0),onClick:he=>G(u).timeArrowHoldThreshold?void 0:P(z.type,!1),onMousedown:he=>G(u).timeArrowHoldThreshold?P(z.type,!1):void 0,onMouseup:ae},[i.timePickerInline?(C(),F(Me,{key:1},[b.$slots["tp-inline-arrow-down"]?Ie(b.$slots,"tp-inline-arrow-down",{key:0}):(C(),F(Me,{key:1},[uL,dL],64))],64)):(C(),F(Me,{key:0},[b.$slots["arrow-down"]?Ie(b.$slots,"arrow-down",{key:0}):re("",!0),b.$slots["arrow-down"]?re("",!0):(C(),Se(G(pf),{key:1}))],64))],42,cL)],64))],2)}),128)),b.is24?re("",!0):(C(),F("div",hL,[b.$slots["am-pm-button"]?Ie(b.$slots,"am-pm-button",{key:0,toggle:de,value:m.value}):re("",!0),b.$slots["am-pm-button"]?re("",!0):(C(),F("button",{key:1,ref_key:"amPmButton",ref:y,type:"button",class:"dp__pm_am_button",role:"button","aria-label":(j=G(a))==null?void 0:j.amPmButton,tabindex:"0",onClick:de,onKeydown:O[0]||(O[0]=z=>G(bn)(z,()=>de(),!0))},xe(m.value),41,fL))])),(C(!0),F(Me,null,Ke(R.value,(z,oe)=>(C(),Se(Et,{key:oe,name:G(f)(_[z.type]),css:G(g)},{default:Pe(()=>{var W,ne;return[_[z.type]?(C(),Se(qa,{key:0,items:ee(z.type),"is-last":b.autoApply&&!G(u).keepActionRow,"esc-close":b.escClose,type:z.type,"text-input":b.textInput,config:b.config,"arrow-navigation":b.arrowNavigation,"aria-labels":b.ariaLabels,"overlay-label":(ne=(W=G(a)).timeOverlay)==null?void 0:ne.call(W,z.type),onSelected:J=>fe(z.type,J),onToggle:J=>L(z.type),onResetFlow:O[1]||(O[1]=J=>b.$emit("reset-flow"))},hn({"button-icon":Pe(()=>[b.$slots["clock-icon"]?Ie(b.$slots,"clock-icon",{key:0}):re("",!0),b.$slots["clock-icon"]?re("",!0):(C(),Se(To(b.timePickerInline?G(Ir):G(hf)),{key:1}))]),_:2},[b.$slots[`${z.type}-overlay-value`]?{name:"item",fn:Pe(({item:J})=>[Ie(b.$slots,`${z.type}-overlay-value`,{text:J.text,value:J.value})]),key:"0"}:void 0,b.$slots[`${z.type}-overlay-header`]?{name:"header",fn:Pe(()=>[Ie(b.$slots,`${z.type}-overlay-header`,{toggle:()=>L(z.type)})]),key:"1"}:void 0]),1032,["items","is-last","esc-close","type","text-input","config","arrow-navigation","aria-labels","overlay-label","onSelected","onToggle"])):re("",!0)]}),_:2},1032,["name","css"]))),128))]))}}}),gL={class:"dp--tp-wrap"},mL=["aria-label","tabindex"],_L=["role","aria-label","tabindex"],bL=["aria-label"],Zy=Bt({compatConfig:{MODE:3},__name:"TimePicker",props:{hours:{type:[Number,Array],default:0},minutes:{type:[Number,Array],default:0},seconds:{type:[Number,Array],default:0},disabledTimesConfig:{type:Function,default:null},validateTime:{type:Function,default:()=>!1},...ds},emits:["update:hours","update:minutes","update:seconds","mount","reset-flow","overlay-opened","overlay-closed","am-pm-change"],setup(t,{expose:e,emit:n}){const s=n,i=t,{buildMatrix:o,setTimePicker:r}=Bi(),a=Po(),{defaultedTransitions:l,defaultedAriaLabels:c,defaultedTextInput:u,defaultedConfig:d,defaultedRange:f}=St(i),{transitionName:g,showTransition:_}=Ga(l),{hideNavigationButtons:m}=Xc(),y=be(null),v=be(null),$=be([]),A=be(null),D=be(!1);Jt(()=>{s("mount"),!i.timePicker&&i.arrowNavigation?o([Wt(y.value)],"time"):r(!0,i.timePicker)});const x=_e(()=>f.value.enabled&&i.modelAuto?Ny(i.internalModelValue):!0),w=be(!1),S=ee=>({hours:Array.isArray(i.hours)?i.hours[ee]:i.hours,minutes:Array.isArray(i.minutes)?i.minutes[ee]:i.minutes,seconds:Array.isArray(i.seconds)?i.seconds[ee]:i.seconds}),T=_e(()=>{const ee=[];if(f.value.enabled)for(let ce=0;ce<2;ce++)ee.push(S(ce));else ee.push(S(0));return ee}),M=(ee,ce=!1,ve="")=>{ce||s("reset-flow"),w.value=ee,s(ee?"overlay-opened":"overlay-closed",cn.time),i.arrowNavigation&&r(ee),nn(()=>{ve!==""&&$.value[0]&&$.value[0].openChildCmp(ve)})},E=_e(()=>({dp__btn:!0,dp__button:!0,dp__button_bottom:i.autoApply&&!d.value.keepActionRow})),V=Ln(a,"timePicker"),X=(ee,ce,ve)=>f.value.enabled?ce===0?[ee,T.value[1][ve]]:[T.value[0][ve],ee]:ee,le=ee=>{s("update:hours",ee)},Y=ee=>{s("update:minutes",ee)},R=ee=>{s("update:seconds",ee)},I=()=>{if(A.value&&!u.value.enabled&&!i.noOverlayFocus){const ee=Fy(A.value);ee&&ee.focus({preventScroll:!0})}},H=ee=>{D.value=!1,s("overlay-closed",ee)},Z=ee=>{D.value=!0,s("overlay-opened",ee)};return e({toggleTimePicker:M}),(ee,ce)=>{var ve;return C(),F("div",gL,[!ee.timePicker&&!ee.timePickerInline?Le((C(),F("button",{key:0,ref_key:"openTimePickerBtn",ref:y,type:"button",class:Ee({...E.value,"dp--hidden-el":w.value}),"aria-label":(ve=G(c))==null?void 0:ve.openTimePicker,tabindex:ee.noOverlayFocus?void 0:0,"data-test":"open-time-picker-btn",onKeydown:ce[0]||(ce[0]=U=>G(bn)(U,()=>M(!0))),onClick:ce[1]||(ce[1]=U=>M(!0))},[ee.$slots["clock-icon"]?Ie(ee.$slots,"clock-icon",{key:0}):re("",!0),ee.$slots["clock-icon"]?re("",!0):(C(),Se(G(hf),{key:1}))],42,mL)),[[Jl,!G(m)(ee.hideNavigation,"time")]]):re("",!0),N(Et,{name:G(g)(w.value),css:G(_)&&!ee.timePickerInline},{default:Pe(()=>{var U,Q;return[w.value||ee.timePicker||ee.timePickerInline?(C(),F("div",{key:0,ref_key:"overlayRef",ref:A,role:ee.timePickerInline?void 0:"dialog",class:Ee({dp__overlay:!ee.timePickerInline,"dp--overlay-absolute":!i.timePicker&&!ee.timePickerInline,"dp--overlay-relative":i.timePicker}),style:zt(ee.timePicker?{height:`${G(d).modeHeight}px`}:void 0),"aria-label":(U=G(c))==null?void 0:U.timePicker,tabindex:ee.timePickerInline?void 0:0},[h("div",{class:Ee(ee.timePickerInline?"dp__time_picker_inline_container":"dp__overlay_container dp__container_flex dp__time_picker_overlay_container"),style:{display:"flex"}},[ee.$slots["time-picker-overlay"]?Ie(ee.$slots,"time-picker-overlay",{key:0,hours:t.hours,minutes:t.minutes,seconds:t.seconds,setHours:le,setMinutes:Y,setSeconds:R}):re("",!0),ee.$slots["time-picker-overlay"]?re("",!0):(C(),F("div",{key:1,class:Ee(ee.timePickerInline?"dp__flex":"dp__overlay_row dp__flex_row")},[(C(!0),F(Me,null,Ke(T.value,(L,te)=>Le((C(),Se(pL,Yt({key:te,ref_for:!0},{...ee.$props,order:te,hours:L.hours,minutes:L.minutes,seconds:L.seconds,closeTimePickerBtn:v.value,disabledTimesConfig:t.disabledTimesConfig,disabled:te===0?G(f).fixedStart:G(f).fixedEnd},{ref_for:!0,ref_key:"timeInputRefs",ref:$,"validate-time":(ae,P)=>t.validateTime(ae,X(P,te,ae)),"onUpdate:hours":ae=>le(X(ae,te,"hours")),"onUpdate:minutes":ae=>Y(X(ae,te,"minutes")),"onUpdate:seconds":ae=>R(X(ae,te,"seconds")),onMounted:I,onOverlayClosed:H,onOverlayOpened:Z,onAmPmChange:ce[2]||(ce[2]=ae=>ee.$emit("am-pm-change",ae))}),hn({_:2},[Ke(G(V),(ae,P)=>({name:ae,fn:Pe(ie=>[Ie(ee.$slots,ae,Yt({ref_for:!0},ie))])}))]),1040,["validate-time","onUpdate:hours","onUpdate:minutes","onUpdate:seconds"])),[[Jl,te===0?!0:x.value]])),128))],2)),!ee.timePicker&&!ee.timePickerInline?Le((C(),F("button",{key:2,ref_key:"closeTimePickerBtn",ref:v,type:"button",class:Ee({...E.value,"dp--hidden-el":D.value}),"aria-label":(Q=G(c))==null?void 0:Q.closeTimePicker,tabindex:"0",onKeydown:ce[3]||(ce[3]=L=>G(bn)(L,()=>M(!1))),onClick:ce[4]||(ce[4]=L=>M(!1))},[ee.$slots["calendar-icon"]?Ie(ee.$slots,"calendar-icon",{key:0}):re("",!0),ee.$slots["calendar-icon"]?re("",!0):(C(),Se(G(Ir),{key:1}))],42,bL)),[[Jl,!G(m)(ee.hideNavigation,"time")]]):re("",!0)],2)],14,_L)):re("",!0)]}),_:3},8,["name","css"])])}}}),e0=(t,e,n,s)=>{const{defaultedRange:i}=St(t),o=(A,D)=>Array.isArray(e[A])?e[A][D]:e[A],r=A=>t.enableSeconds?Array.isArray(e.seconds)?e.seconds[A]:e.seconds:0,a=(A,D)=>A?D!==void 0?Ai(A,o("hours",D),o("minutes",D),r(D)):Ai(A,e.hours,e.minutes,r()):Oy(ye(),r(D)),l=(A,D)=>{e[A]=D},c=_e(()=>t.modelAuto&&i.value.enabled?Array.isArray(n.value)?n.value.length>1:!1:i.value.enabled),u=(A,D)=>{const x=Object.fromEntries(Object.keys(e).map(w=>w===A?[w,D]:[w,e[w]].slice()));if(c.value&&!i.value.disableTimeRangeValidation){const w=T=>n.value?Ai(n.value[T],x.hours[T],x.minutes[T],x.seconds[T]):null,S=T=>Dy(n.value[T],0);return!(nt(w(0),w(1))&&(vr(w(0),S(1))||Ia(w(1),S(0))))}return!0},d=(A,D)=>{u(A,D)&&(l(A,D),s&&s())},f=A=>{d("hours",A)},g=A=>{d("minutes",A)},_=A=>{d("seconds",A)},m=(A,D,x,w)=>{D&&f(A),!D&&!x&&g(A),x&&_(A),n.value&&w(n.value)},y=A=>{if(A){const D=Array.isArray(A),x=D?[+A[0].hours,+A[1].hours]:+A.hours,w=D?[+A[0].minutes,+A[1].minutes]:+A.minutes,S=D?[+A[0].seconds,+A[1].seconds]:+A.seconds;l("hours",x),l("minutes",w),t.enableSeconds&&l("seconds",S)}},v=(A,D)=>{const x={hours:Array.isArray(e.hours)?e.hours[A]:e.hours,disabledArr:[]};return(D||D===0)&&(x.hours=D),Array.isArray(t.disabledTimes)&&(x.disabledArr=i.value.enabled&&Array.isArray(t.disabledTimes[A])?t.disabledTimes[A]:t.disabledTimes),x},$=_e(()=>(A,D)=>{var x;if(Array.isArray(t.disabledTimes)){const{disabledArr:w,hours:S}=v(A,D),T=w.filter(M=>+M.hours===S);return((x=T[0])==null?void 0:x.minutes)==="*"?{hours:[S],minutes:void 0,seconds:void 0}:{hours:[],minutes:T?.map(M=>+M.minutes)??[],seconds:T?.map(M=>M.seconds?+M.seconds:void 0)??[]}}return{hours:[],minutes:[],seconds:[]}});return{setTime:l,updateHours:f,updateMinutes:g,updateSeconds:_,getSetDateTime:a,updateTimeValues:m,getSecondsValue:r,assignStartTime:y,validateTime:u,disabledTimesConfig:$}},vL=(t,e)=>{const n=()=>{t.isTextInputDate&&D()},{modelValue:s,time:i}=Ja(t,e,n),{defaultedStartTime:o,defaultedRange:r,defaultedTz:a}=St(t),{updateTimeValues:l,getSetDateTime:c,setTime:u,assignStartTime:d,disabledTimesConfig:f,validateTime:g}=e0(t,i,s,_);function _(){e("update-flow-step")}const m=w=>{const{hours:S,minutes:T,seconds:M}=w;return{hours:+S,minutes:+T,seconds:M?+M:0}},y=()=>{if(t.startTime){if(Array.isArray(t.startTime)){const S=m(t.startTime[0]),T=m(t.startTime[1]);return[pt(ye(),S),pt(ye(),T)]}const w=m(t.startTime);return pt(ye(),w)}return r.value.enabled?[null,null]:null},v=()=>{if(r.value.enabled){const[w,S]=y();s.value=[En(c(w,0),a.value.timezone),En(c(S,1),a.value.timezone)]}else s.value=En(c(y()),a.value.timezone)},$=w=>Array.isArray(w)?[vo(ye(w[0])),vo(ye(w[1]))]:[vo(w??ye())],A=(w,S,T)=>{u("hours",w),u("minutes",S),u("seconds",t.enableSeconds?T:0)},D=()=>{const[w,S]=$(s.value);return r.value.enabled?A([w.hours,S.hours],[w.minutes,S.minutes],[w.seconds,S.seconds]):A(w.hours,w.minutes,w.seconds)};Jt(()=>{if(!t.shadow)return d(o.value),s.value?D():v()});const x=()=>{Array.isArray(s.value)?s.value=s.value.map((w,S)=>w&&c(w,S)):s.value=c(s.value),e("time-update")};return{modelValue:s,time:i,disabledTimesConfig:f,updateTime:(w,S=!0,T=!1)=>{l(w,S,T,x)},validateTime:g}},yL=Bt({compatConfig:{MODE:3},__name:"TimePickerSolo",props:{...ds},emits:["update:internal-model-value","time-update","am-pm-change","mount","reset-flow","update-flow-step","overlay-toggle"],setup(t,{expose:e,emit:n}){const s=n,i=t,o=Po(),r=Ln(o,"timePicker"),a=be(null),{time:l,modelValue:c,disabledTimesConfig:u,updateTime:d,validateTime:f}=vL(i,s);return Jt(()=>{i.shadow||s("mount",null)}),e({getSidebarProps:()=>({modelValue:c,time:l,updateTime:d}),toggleTimePicker:(g,_=!1,m="")=>{var y;(y=a.value)==null||y.toggleTimePicker(g,_,m)}}),(g,_)=>(C(),Se(Gc,{"multi-calendars":0,stretch:""},{default:Pe(()=>[N(Zy,Yt({ref_key:"tpRef",ref:a},g.$props,{hours:G(l).hours,minutes:G(l).minutes,seconds:G(l).seconds,"internal-model-value":g.internalModelValue,"disabled-times-config":G(u),"validate-time":G(f),"onUpdate:hours":_[0]||(_[0]=m=>G(d)(m)),"onUpdate:minutes":_[1]||(_[1]=m=>G(d)(m,!1)),"onUpdate:seconds":_[2]||(_[2]=m=>G(d)(m,!1,!0)),onAmPmChange:_[3]||(_[3]=m=>g.$emit("am-pm-change",m)),onResetFlow:_[4]||(_[4]=m=>g.$emit("reset-flow")),onOverlayClosed:_[5]||(_[5]=m=>g.$emit("overlay-toggle",{open:!1,overlay:m})),onOverlayOpened:_[6]||(_[6]=m=>g.$emit("overlay-toggle",{open:!0,overlay:m}))}),hn({_:2},[Ke(G(r),(m,y)=>({name:m,fn:Pe(v=>[Ie(g.$slots,m,en(mn(v)))])}))]),1040,["hours","minutes","seconds","internal-model-value","disabled-times-config","validate-time"])]),_:3}))}}),wL={class:"dp--header-wrap"},xL={key:0,class:"dp__month_year_wrap"},kL={key:0},SL={class:"dp__month_year_wrap"},$L=["data-dp-element","aria-label","data-test","onClick","onKeydown"],AL=Bt({compatConfig:{MODE:3},__name:"DpHeader",props:{month:{type:Number,default:0},year:{type:Number,default:0},instance:{type:Number,default:0},years:{type:Array,default:()=>[]},months:{type:Array,default:()=>[]},...ds},emits:["update-month-year","mount","reset-flow","overlay-closed","overlay-opened"],setup(t,{expose:e,emit:n}){const s=n,i=t,{defaultedTransitions:o,defaultedAriaLabels:r,defaultedMultiCalendars:a,defaultedFilters:l,defaultedConfig:c,defaultedHighlight:u,propDates:d,defaultedUI:f}=St(i),{transitionName:g,showTransition:_}=Ga(o),{buildMatrix:m}=Bi(),{handleMonthYearChange:y,isDisabled:v,updateMonthYear:$}=zI(i,s),{showLeftIcon:A,showRightIcon:D}=Xc(),x=be(!1),w=be(!1),S=be(!1),T=be([null,null,null,null]);Jt(()=>{s("mount")});const M=Q=>({get:()=>i[Q],set:L=>{const te=Q===ts.month?ts.year:ts.month;s("update-month-year",{[Q]:L,[te]:i[te]}),Q===ts.month?H(!0):Z(!0)}}),E=_e(M(ts.month)),V=_e(M(ts.year)),X=_e(()=>Q=>({month:i.month,year:i.year,items:Q===ts.month?i.months:i.years,instance:i.instance,updateMonthYear:$,toggle:Q===ts.month?H:Z})),le=_e(()=>i.months.find(L=>L.value===i.month)||{text:"",value:0}),Y=_e(()=>wr(i.months,Q=>{const L=i.month===Q.value,te=La(Q.value,Vy(i.year,d.value.minDate),Hy(i.year,d.value.maxDate))||l.value.months.includes(Q.value),ae=Yy(u.value,Q.value,i.year);return{active:L,disabled:te,highlighted:ae}})),R=_e(()=>wr(i.years,Q=>{const L=i.year===Q.value,te=La(Q.value,xr(d.value.minDate),xr(d.value.maxDate))||l.value.years.includes(Q.value),ae=vf(u.value,Q.value);return{active:L,disabled:te,highlighted:ae}})),I=(Q,L,te)=>{te!==void 0?Q.value=te:Q.value=!Q.value,Q.value?(S.value=!0,s("overlay-opened",L)):(S.value=!1,s("overlay-closed",L))},H=(Q=!1,L)=>{ee(Q),I(x,cn.month,L)},Z=(Q=!1,L)=>{ee(Q),I(w,cn.year,L)},ee=Q=>{Q||s("reset-flow")},ce=(Q,L)=>{i.arrowNavigation&&(T.value[L]=Wt(Q),m(T.value,"monthYear"))},ve=_e(()=>{var Q,L,te,ae,P,ie;return[{type:ts.month,index:1,toggle:H,modelValue:E.value,updateModelValue:de=>E.value=de,text:le.value.text,showSelectionGrid:x.value,items:Y.value,ariaLabel:(Q=r.value)==null?void 0:Q.openMonthsOverlay,overlayLabel:((te=(L=r.value).monthPicker)==null?void 0:te.call(L,!0))??void 0},{type:ts.year,index:2,toggle:Z,modelValue:V.value,updateModelValue:de=>V.value=de,text:By(i.year,i.locale),showSelectionGrid:w.value,items:R.value,ariaLabel:(ae=r.value)==null?void 0:ae.openYearsOverlay,overlayLabel:((ie=(P=r.value).yearPicker)==null?void 0:ie.call(P,!0))??void 0}]}),U=_e(()=>i.disableYearSelect?[ve.value[0]]:i.yearFirst?[...ve.value].reverse():ve.value);return e({toggleMonthPicker:H,toggleYearPicker:Z,handleMonthYearChange:y}),(Q,L)=>{var te,ae,P,ie,de,we;return C(),F("div",wL,[Q.$slots["month-year"]?(C(),F("div",xL,[Ie(Q.$slots,"month-year",en(mn({month:t.month,year:t.year,months:t.months,years:t.years,updateMonthYear:G($),handleMonthYearChange:G(y),instance:t.instance})))])):(C(),F(Me,{key:1},[Q.$slots["top-extra"]?(C(),F("div",kL,[Ie(Q.$slots,"top-extra",{value:Q.internalModelValue})])):re("",!0),h("div",SL,[G(A)(G(a),t.instance)&&!Q.vertical?(C(),Se(_a,{key:0,"aria-label":(te=G(r))==null?void 0:te.prevMonth,disabled:G(v)(!1),class:Ee((ae=G(f))==null?void 0:ae.navBtnPrev),"el-name":"action-prev",onActivate:L[0]||(L[0]=B=>G(y)(!1,!0)),onSetRef:L[1]||(L[1]=B=>ce(B,0))},{default:Pe(()=>[Q.$slots["arrow-left"]?Ie(Q.$slots,"arrow-left",{key:0}):re("",!0),Q.$slots["arrow-left"]?re("",!0):(C(),Se(G(uf),{key:1}))]),_:3},8,["aria-label","disabled","class"])):re("",!0),h("div",{class:Ee(["dp__month_year_wrap",{dp__year_disable_select:Q.disableYearSelect}])},[(C(!0),F(Me,null,Ke(U.value,(B,fe)=>(C(),F(Me,{key:B.type},[h("button",{ref_for:!0,ref:b=>ce(b,fe+1),type:"button","data-dp-element":`overlay-${B.type}`,class:Ee(["dp__btn dp__month_year_select",{"dp--hidden-el":S.value}]),"aria-label":`${B.text}-${B.ariaLabel}`,"data-test":`${B.type}-toggle-overlay-${t.instance}`,onClick:B.toggle,onKeydown:b=>G(bn)(b,()=>B.toggle(),!0)},[Q.$slots[B.type]?Ie(Q.$slots,B.type,{key:0,text:B.text,value:i[B.type]}):re("",!0),Q.$slots[B.type]?re("",!0):(C(),F(Me,{key:1},[He(xe(B.text),1)],64))],42,$L),N(Et,{name:G(g)(B.showSelectionGrid),css:G(_)},{default:Pe(()=>[B.showSelectionGrid?(C(),Se(qa,{key:0,items:B.items,"arrow-navigation":Q.arrowNavigation,"hide-navigation":Q.hideNavigation,"is-last":Q.autoApply&&!G(c).keepActionRow,"skip-button-ref":!1,config:Q.config,type:B.type,"header-refs":[],"esc-close":Q.escClose,"menu-wrap-ref":Q.menuWrapRef,"text-input":Q.textInput,"aria-labels":Q.ariaLabels,"overlay-label":B.overlayLabel,onSelected:B.updateModelValue,onToggle:B.toggle},hn({"button-icon":Pe(()=>[Q.$slots["calendar-icon"]?Ie(Q.$slots,"calendar-icon",{key:0}):re("",!0),Q.$slots["calendar-icon"]?re("",!0):(C(),Se(G(Ir),{key:1}))]),_:2},[Q.$slots[`${B.type}-overlay-value`]?{name:"item",fn:Pe(({item:b})=>[Ie(Q.$slots,`${B.type}-overlay-value`,{text:b.text,value:b.value})]),key:"0"}:void 0,Q.$slots[`${B.type}-overlay`]?{name:"overlay",fn:Pe(()=>[Ie(Q.$slots,`${B.type}-overlay`,Yt({ref_for:!0},X.value(B.type)))]),key:"1"}:void 0,Q.$slots[`${B.type}-overlay-header`]?{name:"header",fn:Pe(()=>[Ie(Q.$slots,`${B.type}-overlay-header`,{toggle:B.toggle})]),key:"2"}:void 0]),1032,["items","arrow-navigation","hide-navigation","is-last","config","type","esc-close","menu-wrap-ref","text-input","aria-labels","overlay-label","onSelected","onToggle"])):re("",!0)]),_:2},1032,["name","css"])],64))),128))],2),G(A)(G(a),t.instance)&&Q.vertical?(C(),Se(_a,{key:1,"aria-label":(P=G(r))==null?void 0:P.prevMonth,"el-name":"action-prev",disabled:G(v)(!1),class:Ee((ie=G(f))==null?void 0:ie.navBtnPrev),onActivate:L[2]||(L[2]=B=>G(y)(!1,!0))},{default:Pe(()=>[Q.$slots["arrow-up"]?Ie(Q.$slots,"arrow-up",{key:0}):re("",!0),Q.$slots["arrow-up"]?re("",!0):(C(),Se(G(ff),{key:1}))]),_:3},8,["aria-label","disabled","class"])):re("",!0),G(D)(G(a),t.instance)?(C(),Se(_a,{key:2,ref:"rightIcon","el-name":"action-next",disabled:G(v)(!0),"aria-label":(de=G(r))==null?void 0:de.nextMonth,class:Ee((we=G(f))==null?void 0:we.navBtnNext),onActivate:L[3]||(L[3]=B=>G(y)(!0,!0)),onSetRef:L[4]||(L[4]=B=>ce(B,Q.disableYearSelect?2:3))},{default:Pe(()=>[Q.$slots[Q.vertical?"arrow-down":"arrow-right"]?Ie(Q.$slots,Q.vertical?"arrow-down":"arrow-right",{key:0}):re("",!0),Q.$slots[Q.vertical?"arrow-down":"arrow-right"]?re("",!0):(C(),Se(To(Q.vertical?G(pf):G(df)),{key:1}))]),_:3},8,["disabled","aria-label","class"])):re("",!0)])],64))])}}}),CL={class:"dp__calendar_header",role:"row"},EL={key:0,class:"dp__calendar_header_item",role:"gridcell"},TL=["aria-label"],PL=h("div",{class:"dp__calendar_header_separator"},null,-1),ML={key:0,class:"dp__calendar_item dp__week_num",role:"gridcell"},DL={class:"dp__cell_inner"},OL=["id","aria-pressed","aria-disabled","aria-label","data-test","onClick","onTouchend","onKeydown","onMouseenter","onMouseleave","onMousedown"],IL=Bt({compatConfig:{MODE:3},__name:"DpCalendar",props:{mappedDates:{type:Array,default:()=>[]},instance:{type:Number,default:0},month:{type:Number,default:0},year:{type:Number,default:0},...ds},emits:["select-date","set-hover-date","handle-scroll","mount","handle-swipe","handle-space","tooltip-open","tooltip-close"],setup(t,{expose:e,emit:n}){const s=n,i=t,{buildMultiLevelMatrix:o}=Bi(),{defaultedTransitions:r,defaultedConfig:a,defaultedAriaLabels:l,defaultedMultiCalendars:c,defaultedWeekNumbers:u,defaultedMultiDates:d,defaultedUI:f}=St(i),g=be(null),_=be({bottom:"",left:"",transform:""}),m=be([]),y=be(null),v=be(!0),$=be(""),A=be({startX:0,endX:0,startY:0,endY:0}),D=be([]),x=be({left:"50%"}),w=be(!1),S=_e(()=>i.calendar?i.calendar(i.mappedDates):i.mappedDates),T=_e(()=>i.dayNames?Array.isArray(i.dayNames)?i.dayNames:i.dayNames(i.locale,+i.weekStart):dI(i.formatLocale,i.locale,+i.weekStart));Jt(()=>{s("mount",{cmp:"calendar",refs:m}),a.value.noSwipe||y.value&&(y.value.addEventListener("touchstart",ce,{passive:!1}),y.value.addEventListener("touchend",ve,{passive:!1}),y.value.addEventListener("touchmove",U,{passive:!1})),i.monthChangeOnScroll&&y.value&&y.value.addEventListener("wheel",te,{passive:!1})});const M=B=>B?i.vertical?"vNext":"next":i.vertical?"vPrevious":"previous",E=(B,fe)=>{if(i.transitions){const b=wn(Ks(ye(),i.month,i.year));$.value=It(wn(Ks(ye(),B,fe)),b)?r.value[M(!0)]:r.value[M(!1)],v.value=!1,nn(()=>{v.value=!0})}},V=_e(()=>({...f.value.calendar??{}})),X=_e(()=>B=>{const fe=fI(B);return{dp__marker_dot:fe.type==="dot",dp__marker_line:fe.type==="line"}}),le=_e(()=>B=>nt(B,g.value)),Y=_e(()=>({dp__calendar:!0,dp__calendar_next:c.value.count>0&&i.instance!==0})),R=_e(()=>B=>i.hideOffsetDates?B.current:!0),I=async(B,fe)=>{const{width:b,height:O}=B.getBoundingClientRect();g.value=fe.value;let j={left:`${b/2}px`},z=-50;if(await nn(),D.value[0]){const{left:oe,width:W}=D.value[0].getBoundingClientRect();oe<0&&(j={left:"0"},z=0,x.value.left=`${b/2}px`),window.innerWidth{var O,j,z;const oe=Wt(m.value[fe][b]);oe&&((O=B.marker)!=null&&O.customPosition&&(z=(j=B.marker)==null?void 0:j.tooltip)!=null&&z.length?_.value=B.marker.customPosition(oe):await I(oe,B),s("tooltip-open",B.marker))},Z=async(B,fe,b)=>{var O,j;if(w.value&&d.value.enabled&&d.value.dragSelect)return s("select-date",B);s("set-hover-date",B),(j=(O=B.marker)==null?void 0:O.tooltip)!=null&&j.length&&await H(B,fe,b)},ee=B=>{g.value&&(g.value=null,_.value=JSON.parse(JSON.stringify({bottom:"",left:"",transform:""})),s("tooltip-close",B.marker))},ce=B=>{A.value.startX=B.changedTouches[0].screenX,A.value.startY=B.changedTouches[0].screenY},ve=B=>{A.value.endX=B.changedTouches[0].screenX,A.value.endY=B.changedTouches[0].screenY,Q()},U=B=>{i.vertical&&!i.inline&&B.preventDefault()},Q=()=>{const B=i.vertical?"Y":"X";Math.abs(A.value[`start${B}`]-A.value[`end${B}`])>10&&s("handle-swipe",A.value[`start${B}`]>A.value[`end${B}`]?"right":"left")},L=(B,fe,b)=>{B&&(Array.isArray(m.value[fe])?m.value[fe][b]=B:m.value[fe]=[B]),i.arrowNavigation&&o(m.value,"calendar")},te=B=>{i.monthChangeOnScroll&&(B.preventDefault(),s("handle-scroll",B))},ae=B=>u.value.type==="local"?af(B.value,{weekStartsOn:+i.weekStart}):u.value.type==="iso"?of(B.value):typeof u.value.type=="function"?u.value.type(B.value):"",P=B=>{const fe=B[0];return u.value.hideOnOffsetDates?B.some(b=>b.current)?ae(fe):"":ae(fe)},ie=(B,fe,b=!0)=>{b&&bI()||d.value.enabled||($i(B,a.value),s("select-date",fe))},de=B=>{$i(B,a.value)},we=B=>{d.value.enabled&&d.value.dragSelect?(w.value=!0,s("select-date",B)):d.value.enabled&&s("select-date",B)};return e({triggerTransition:E}),(B,fe)=>(C(),F("div",{class:Ee(Y.value)},[h("div",{ref_key:"calendarWrapRef",ref:y,class:Ee(V.value),role:"grid"},[h("div",CL,[B.weekNumbers?(C(),F("div",EL,xe(B.weekNumName),1)):re("",!0),(C(!0),F(Me,null,Ke(T.value,(b,O)=>{var j,z;return C(),F("div",{key:O,class:"dp__calendar_header_item",role:"gridcell","data-test":"calendar-header","aria-label":(z=(j=G(l))==null?void 0:j.weekDay)==null?void 0:z.call(j,O)},[B.$slots["calendar-header"]?Ie(B.$slots,"calendar-header",{key:0,day:b,index:O}):re("",!0),B.$slots["calendar-header"]?re("",!0):(C(),F(Me,{key:1},[He(xe(b),1)],64))],8,TL)}),128))]),PL,N(Et,{name:$.value,css:!!B.transitions},{default:Pe(()=>[v.value?(C(),F("div",{key:0,class:"dp__calendar",role:"rowgroup",onMouseleave:fe[1]||(fe[1]=b=>w.value=!1)},[(C(!0),F(Me,null,Ke(S.value,(b,O)=>(C(),F("div",{key:O,class:"dp__calendar_row",role:"row"},[B.weekNumbers?(C(),F("div",ML,[h("div",DL,xe(P(b.days)),1)])):re("",!0),(C(!0),F(Me,null,Ke(b.days,(j,z)=>{var oe,W,ne;return C(),F("div",{id:G(Uy)(j.value),ref_for:!0,ref:J=>L(J,O,z),key:z+O,role:"gridcell",class:"dp__calendar_item","aria-pressed":(j.classData.dp__active_date||j.classData.dp__range_start||j.classData.dp__range_start)??void 0,"aria-disabled":j.classData.dp__cell_disabled||void 0,"aria-label":(W=(oe=G(l))==null?void 0:oe.day)==null?void 0:W.call(oe,j),tabindex:"0","data-test":j.value,onClick:Ma(J=>ie(J,j),["prevent"]),onTouchend:J=>ie(J,j,!1),onKeydown:J=>G(bn)(J,()=>B.$emit("select-date",j)),onMouseenter:J=>Z(j,O,z),onMouseleave:J=>ee(j),onMousedown:J=>we(j),onMouseup:fe[0]||(fe[0]=J=>w.value=!1)},[h("div",{class:Ee(["dp__cell_inner",j.classData])},[B.$slots.day&&R.value(j)?Ie(B.$slots,"day",{key:0,day:+j.text,date:j.value}):re("",!0),B.$slots.day?re("",!0):(C(),F(Me,{key:1},[He(xe(j.text),1)],64)),j.marker&&R.value(j)?(C(),F(Me,{key:2},[B.$slots.marker?Ie(B.$slots,"marker",{key:0,marker:j.marker,day:+j.text,date:j.value}):(C(),F("div",{key:1,class:Ee(X.value(j.marker)),style:zt(j.marker.color?{backgroundColor:j.marker.color}:{})},null,6))],64)):re("",!0),le.value(j.value)?(C(),F("div",{key:3,ref_for:!0,ref_key:"activeTooltip",ref:D,class:"dp__marker_tooltip",style:zt(_.value)},[(ne=j.marker)!=null&&ne.tooltip?(C(),F("div",{key:0,class:"dp__tooltip_content",onClick:de},[(C(!0),F(Me,null,Ke(j.marker.tooltip,(J,he)=>(C(),F("div",{key:he,class:"dp__tooltip_text"},[B.$slots["marker-tooltip"]?Ie(B.$slots,"marker-tooltip",{key:0,tooltip:J,day:j.value}):re("",!0),B.$slots["marker-tooltip"]?re("",!0):(C(),F(Me,{key:1},[h("div",{class:"dp__tooltip_mark",style:zt(J.color?{backgroundColor:J.color}:{})},null,4),h("div",null,xe(J.text),1)],64))]))),128)),h("div",{class:"dp__arrow_bottom_tp",style:zt(x.value)},null,4)])):re("",!0)],4)):re("",!0)],2)],40,OL)}),128))]))),128))],32)):re("",!0)]),_:3},8,["name","css"])],2)],2))}}),bm=t=>Array.isArray(t),LL=(t,e,n,s)=>{const i=be([]),o=be(new Date),r=be(),a=()=>ce(t.isTextInputDate),{modelValue:l,calendars:c,time:u,today:d}=Ja(t,e,a),{defaultedMultiCalendars:f,defaultedStartTime:g,defaultedRange:_,defaultedConfig:m,defaultedTz:y,propDates:v,defaultedMultiDates:$}=St(t),{validateMonthYearInRange:A,isDisabled:D,isDateRangeAllowed:x,checkMinMaxRange:w}=Vi(t),{updateTimeValues:S,getSetDateTime:T,setTime:M,assignStartTime:E,validateTime:V,disabledTimesConfig:X}=e0(t,u,l,s),le=_e(()=>se=>c.value[se]?c.value[se].month:0),Y=_e(()=>se=>c.value[se]?c.value[se].year:0),R=se=>!m.value.keepViewOnOffsetClick||se?!0:!r.value,I=(se,$e,ue,Ae=!1)=>{var De,sn;R(Ae)&&(c.value[se]||(c.value[se]={month:0,year:0}),c.value[se].month=fm($e)?(De=c.value[se])==null?void 0:De.month:$e,c.value[se].year=fm(ue)?(sn=c.value[se])==null?void 0:sn.year:ue)},H=()=>{t.autoApply&&e("select-date")};Jt(()=>{t.shadow||(l.value||(B(),g.value&&E(g.value)),ce(!0),t.focusStartDate&&t.startDate&&B())});const Z=_e(()=>{var se;return(se=t.flow)!=null&&se.length&&!t.partialFlow?t.flowStep===t.flow.length:!0}),ee=()=>{t.autoApply&&Z.value&&e("auto-apply",t.partialFlow?t.flowStep!==t.flow.length:!1)},ce=(se=!1)=>{if(l.value)return Array.isArray(l.value)?(i.value=l.value,P(se)):Q(l.value,se);if(f.value.count&&se&&!t.startDate)return U(ye(),se)},ve=()=>Array.isArray(l.value)&&_.value.enabled?Ze(l.value[0])===Ze(l.value[1]??l.value[0]):!1,U=(se=new Date,$e=!1)=>{if((!f.value.count||!f.value.static||$e)&&I(0,Ze(se),ze(se)),f.value.count&&(!f.value.solo||!l.value||ve()))for(let ue=1;ue{U(se),M("hours",Qs(se)),M("minutes",Mi(se)),M("seconds",br(se)),f.value.count&&$e&&we()},L=se=>{if(f.value.count){if(f.value.solo)return 0;const $e=Ze(se[0]),ue=Ze(se[1]);return Math.abs(ue-$e){se[1]&&_.value.showLastInRange?U(se[L(se)],$e):U(se[0],$e);const ue=(Ae,De)=>[Ae(se[0]),se[1]?Ae(se[1]):u[De][1]];M("hours",ue(Qs,"hours")),M("minutes",ue(Mi,"minutes")),M("seconds",ue(br,"seconds"))},ae=(se,$e)=>{if((_.value.enabled||t.weekPicker)&&!$.value.enabled)return te(se,$e);if($.value.enabled&&$e){const ue=se[se.length-1];return Q(ue,$e)}},P=se=>{const $e=l.value;ae($e,se),f.value.count&&f.value.solo&&we()},ie=(se,$e)=>{const ue=pt(ye(),{month:le.value($e),year:Y.value($e)}),Ae=se<0?ls(ue,1):yr(ue,1);A(Ze(Ae),ze(Ae),se<0,t.preventMinMaxNavigation)&&(I($e,Ze(Ae),ze(Ae)),e("update-month-year",{instance:$e,month:Ze(Ae),year:ze(Ae)}),f.value.count&&!f.value.solo&&de($e),n())},de=se=>{for(let $e=se-1;$e>=0;$e--){const ue=yr(pt(ye(),{month:le.value($e+1),year:Y.value($e+1)}),1);I($e,Ze(ue),ze(ue))}for(let $e=se+1;$e<=f.value.count-1;$e++){const ue=ls(pt(ye(),{month:le.value($e-1),year:Y.value($e-1)}),1);I($e,Ze(ue),ze(ue))}},we=()=>{if(Array.isArray(l.value)&&l.value.length===2){const se=ye(ye(l.value[1]?l.value[1]:ls(l.value[0],1))),[$e,ue]=[Ze(l.value[0]),ze(l.value[0])],[Ae,De]=[Ze(l.value[1]),ze(l.value[1])];($e!==Ae||$e===Ae&&ue!==De)&&f.value.solo&&I(1,Ze(se),ze(se))}else l.value&&!Array.isArray(l.value)&&(I(0,Ze(l.value),ze(l.value)),U(ye()))},B=()=>{t.startDate&&(I(0,Ze(ye(t.startDate)),ze(ye(t.startDate))),f.value.count&&de(0))},fe=(se,$e)=>{if(t.monthChangeOnScroll){const ue=new Date().getTime()-o.value.getTime(),Ae=Math.abs(se.deltaY);let De=500;Ae>1&&(De=100),Ae>100&&(De=0),ue>De&&(o.value=new Date,ie(t.monthChangeOnScroll!=="inverse"?-se.deltaY:se.deltaY,$e))}},b=(se,$e,ue=!1)=>{t.monthChangeOnArrows&&t.vertical===ue&&O(se,$e)},O=(se,$e)=>{ie(se==="right"?-1:1,$e)},j=se=>{if(v.value.markers)return pc(se.value,v.value.markers)},z=(se,$e)=>{switch(t.sixWeeks===!0?"append":t.sixWeeks){case"prepend":return[!0,!1];case"center":return[se==0,!0];case"fair":return[se==0||$e>se,!0];case"append":return[!1,!1];default:return[!1,!1]}},oe=(se,$e,ue,Ae)=>{if(t.sixWeeks&&se.length<6){const De=6-se.length,sn=($e.getDay()+7-Ae)%7,xn=6-(ue.getDay()+7-Ae)%7,[Os,Lo]=z(sn,xn);for(let Ki=1;Ki<=De;Ki++)if(Lo?!!(Ki%2)==Os:Os){const hs=se[0].days[0],Nr=W(is(hs.value,-7),Ze($e));se.unshift({days:Nr})}else{const hs=se[se.length-1],Nr=hs.days[hs.days.length-1],pu=W(is(Nr.value,1),Ze($e));se.push({days:pu})}}return se},W=(se,$e)=>{const ue=ye(se),Ae=[];for(let De=0;De<7;De++){const sn=is(ue,De),xn=Ze(sn)!==$e;Ae.push({text:t.hideOffsetDates&&xn?"":sn.getDate(),value:sn,current:!xn,classData:{}})}return Ae},ne=(se,$e)=>{const ue=[],Ae=new Date($e,se),De=new Date($e,se+1,0),sn=t.weekStart,xn=us(Ae,{weekStartsOn:sn}),Os=Lo=>{const Ki=W(Lo,se);if(ue.push({days:Ki}),!ue[ue.length-1].days.some(hs=>nt(wn(hs.value),wn(De)))){const hs=is(Lo,7);Os(hs)}};return Os(xn),oe(ue,Ae,De,sn)},J=se=>{const $e=Ai(ye(se.value),u.hours,u.minutes,Be());e("date-update",$e),$.value.enabled?yf($e,l,$.value.limit):l.value=$e,s(),nn().then(()=>{ee()})},he=se=>_.value.noDisabledRange?jy(i.value[0],se).some($e=>D($e)):!1,me=()=>{i.value=l.value?l.value.slice():[],i.value.length===2&&!(_.value.fixedStart||_.value.fixedEnd)&&(i.value=[])},pe=(se,$e)=>{const ue=[ye(se.value),is(ye(se.value),+_.value.autoRange)];x(ue)?($e&&Re(se.value),i.value=ue):e("invalid-date",se.value)},Re=se=>{const $e=Ze(ye(se)),ue=ze(ye(se));if(I(0,$e,ue),f.value.count>0)for(let Ae=1;Ae{if(he(se.value)||!w(se.value,l.value,_.value.fixedStart?0:1))return e("invalid-date",se.value);i.value=Xy(ye(se.value),l,e,_)},Ve=(se,$e)=>{if(me(),_.value.autoRange)return pe(se,$e);if(_.value.fixedStart||_.value.fixedEnd)return Oe(se);i.value[0]?w(ye(se.value),l.value)&&!he(se.value)?Ct(ye(se.value),ye(i.value[0]))?(i.value.unshift(ye(se.value)),e("range-end",i.value[0])):(i.value[1]=ye(se.value),e("range-end",i.value[1])):(t.autoApply&&e("auto-apply-invalid",se.value),e("invalid-date",se.value)):(i.value[0]=ye(se.value),e("range-start",i.value[0]))},Be=(se=!0)=>t.enableSeconds?Array.isArray(u.seconds)?se?u.seconds[0]:u.seconds[1]:u.seconds:0,tt=se=>{i.value[se]=Ai(i.value[se],u.hours[se],u.minutes[se],Be(se!==1))},Je=()=>{var se,$e;i.value[0]&&i.value[1]&&+((se=i.value)==null?void 0:se[0])>+(($e=i.value)==null?void 0:$e[1])&&(i.value.reverse(),e("range-start",i.value[0]),e("range-end",i.value[1]))},mt=()=>{i.value.length&&(i.value[0]&&!i.value[1]?tt(0):(tt(0),tt(1),s()),Je(),l.value=i.value.slice(),Jc(i.value,e,t.autoApply,t.modelAuto))},rn=(se,$e=!1)=>{if(D(se.value)||!se.current&&t.hideOffsetDates)return e("invalid-date",se.value);if(r.value=JSON.parse(JSON.stringify(se)),!_.value.enabled)return J(se);bm(u.hours)&&bm(u.minutes)&&!$.value.enabled&&(Ve(se,$e),mt())},Hn=(se,$e)=>{var ue;I(se,$e.month,$e.year,!0),f.value.count&&!f.value.solo&&de(se),e("update-month-year",{instance:se,month:$e.month,year:$e.year}),n(f.value.solo?se:void 0);const Ae=(ue=t.flow)!=null&&ue.length?t.flow[t.flowStep]:void 0;!$e.fromNav&&(Ae===cn.month||Ae===cn.year)&&s()},ni=(se,$e)=>{Jy({value:se,modelValue:l,range:_.value.enabled,timezone:$e?void 0:y.value.timezone}),H(),t.multiCalendars&&nn().then(()=>ce(!0))},Qn=()=>{const se=gf(ye(),y.value);_.value.enabled?l.value&&Array.isArray(l.value)&&l.value[0]?l.value=Ct(se,l.value[0])?[se,l.value[0]]:[l.value[0],se]:l.value=[se]:l.value=se,H()},Ds=()=>{if(Array.isArray(l.value))if($.value.enabled){const se=jt();l.value[l.value.length-1]=T(se)}else l.value=l.value.map((se,$e)=>se&&T(se,$e));else l.value=T(l.value);e("time-update")},jt=()=>Array.isArray(l.value)&&l.value.length?l.value[l.value.length-1]:null;return{calendars:c,modelValue:l,month:le,year:Y,time:u,disabledTimesConfig:X,today:d,validateTime:V,getCalendarDays:ne,getMarker:j,handleScroll:fe,handleSwipe:O,handleArrow:b,selectDate:rn,updateMonthYear:Hn,presetDate:ni,selectCurrentDate:Qn,updateTime:(se,$e=!0,ue=!1)=>{S(se,$e,ue,Ds)},assignMonthAndYear:U}},RL={key:0},NL=Bt({__name:"DatePicker",props:{...ds},emits:["tooltip-open","tooltip-close","mount","update:internal-model-value","update-flow-step","reset-flow","auto-apply","focus-menu","select-date","range-start","range-end","invalid-fixed-range","time-update","am-pm-change","time-picker-open","time-picker-close","recalculate-position","update-month-year","auto-apply-invalid","date-update","invalid-date","overlay-toggle"],setup(t,{expose:e,emit:n}){const s=n,i=t,{calendars:o,month:r,year:a,modelValue:l,time:c,disabledTimesConfig:u,today:d,validateTime:f,getCalendarDays:g,getMarker:_,handleArrow:m,handleScroll:y,handleSwipe:v,selectDate:$,updateMonthYear:A,presetDate:D,selectCurrentDate:x,updateTime:w,assignMonthAndYear:S}=LL(i,s,ve,U),T=Po(),{setHoverDate:M,getDayClassData:E,clearHoverDate:V}=eR(l,i),{defaultedMultiCalendars:X}=St(i),le=be([]),Y=be([]),R=be(null),I=Ln(T,"calendar"),H=Ln(T,"monthYear"),Z=Ln(T,"timePicker"),ee=fe=>{i.shadow||s("mount",fe)};Ht(o,()=>{i.shadow||setTimeout(()=>{s("recalculate-position")},0)},{deep:!0}),Ht(X,(fe,b)=>{fe.count-b.count>0&&S()},{deep:!0});const ce=_e(()=>fe=>g(r.value(fe),a.value(fe)).map(b=>({...b,days:b.days.map(O=>(O.marker=_(O),O.classData=E(O),O))})));function ve(fe){var b;fe||fe===0?(b=Y.value[fe])==null||b.triggerTransition(r.value(fe),a.value(fe)):Y.value.forEach((O,j)=>O.triggerTransition(r.value(j),a.value(j)))}function U(){s("update-flow-step")}const Q=(fe,b=!1)=>{$(fe,b),i.spaceConfirm&&s("select-date")},L=(fe,b,O=0)=>{var j;(j=le.value[O])==null||j.toggleMonthPicker(fe,b)},te=(fe,b,O=0)=>{var j;(j=le.value[O])==null||j.toggleYearPicker(fe,b)},ae=(fe,b,O)=>{var j;(j=R.value)==null||j.toggleTimePicker(fe,b,O)},P=(fe,b)=>{var O;if(!i.range){const j=l.value?l.value:d,z=b?new Date(b):j,oe=fe?us(z,{weekStartsOn:1}):xy(z,{weekStartsOn:1});$({value:oe,current:Ze(z)===r.value(0),text:"",classData:{}}),(O=document.getElementById(Uy(oe)))==null||O.focus()}},ie=fe=>{var b;(b=le.value[0])==null||b.handleMonthYearChange(fe,!0)},de=fe=>{A(0,{month:r.value(0),year:a.value(0)+(fe?1:-1),fromNav:!0})},we=(fe,b)=>{fe===cn.time&&s(`time-picker-${b?"open":"close"}`),s("overlay-toggle",{open:b,overlay:fe})},B=fe=>{s("overlay-toggle",{open:!1,overlay:fe}),s("focus-menu")};return e({clearHoverDate:V,presetDate:D,selectCurrentDate:x,toggleMonthPicker:L,toggleYearPicker:te,toggleTimePicker:ae,handleArrow:m,updateMonthYear:A,getSidebarProps:()=>({modelValue:l,month:r,year:a,time:c,updateTime:w,updateMonthYear:A,selectDate:$,presetDate:D}),changeMonth:ie,changeYear:de,selectWeekDate:P}),(fe,b)=>(C(),F(Me,null,[N(Gc,{"multi-calendars":G(X).count,collapse:fe.collapse},{default:Pe(({instance:O,index:j})=>[fe.disableMonthYearSelect?re("",!0):(C(),Se(AL,Yt({key:0,ref:z=>{z&&(le.value[j]=z)},months:G(Ry)(fe.formatLocale,fe.locale,fe.monthNameFormat),years:G(mf)(fe.yearRange,fe.locale,fe.reverseYears),month:G(r)(O),year:G(a)(O),instance:O},fe.$props,{onMount:b[0]||(b[0]=z=>ee(G(bo).header)),onResetFlow:b[1]||(b[1]=z=>fe.$emit("reset-flow")),onUpdateMonthYear:z=>G(A)(O,z),onOverlayClosed:B,onOverlayOpened:b[2]||(b[2]=z=>fe.$emit("overlay-toggle",{open:!0,overlay:z}))}),hn({_:2},[Ke(G(H),(z,oe)=>({name:z,fn:Pe(W=>[Ie(fe.$slots,z,en(mn(W)))])}))]),1040,["months","years","month","year","instance","onUpdateMonthYear"])),N(IL,Yt({ref:z=>{z&&(Y.value[j]=z)},"mapped-dates":ce.value(O),month:G(r)(O),year:G(a)(O),instance:O},fe.$props,{onSelectDate:z=>G($)(z,O!==1),onHandleSpace:z=>Q(z,O!==1),onSetHoverDate:b[3]||(b[3]=z=>G(M)(z)),onHandleScroll:z=>G(y)(z,O),onHandleSwipe:z=>G(v)(z,O),onMount:b[4]||(b[4]=z=>ee(G(bo).calendar)),onResetFlow:b[5]||(b[5]=z=>fe.$emit("reset-flow")),onTooltipOpen:b[6]||(b[6]=z=>fe.$emit("tooltip-open",z)),onTooltipClose:b[7]||(b[7]=z=>fe.$emit("tooltip-close",z))}),hn({_:2},[Ke(G(I),(z,oe)=>({name:z,fn:Pe(W=>[Ie(fe.$slots,z,en(mn({...W})))])}))]),1040,["mapped-dates","month","year","instance","onSelectDate","onHandleSpace","onHandleScroll","onHandleSwipe"])]),_:3},8,["multi-calendars","collapse"]),fe.enableTimePicker?(C(),F("div",RL,[fe.$slots["time-picker"]?Ie(fe.$slots,"time-picker",en(Yt({key:0},{time:G(c),updateTime:G(w)}))):(C(),Se(Zy,Yt({key:1,ref_key:"timePickerRef",ref:R},fe.$props,{hours:G(c).hours,minutes:G(c).minutes,seconds:G(c).seconds,"internal-model-value":fe.internalModelValue,"disabled-times-config":G(u),"validate-time":G(f),onMount:b[8]||(b[8]=O=>ee(G(bo).timePicker)),"onUpdate:hours":b[9]||(b[9]=O=>G(w)(O)),"onUpdate:minutes":b[10]||(b[10]=O=>G(w)(O,!1)),"onUpdate:seconds":b[11]||(b[11]=O=>G(w)(O,!1,!0)),onResetFlow:b[12]||(b[12]=O=>fe.$emit("reset-flow")),onOverlayClosed:b[13]||(b[13]=O=>we(O,!1)),onOverlayOpened:b[14]||(b[14]=O=>we(O,!0)),onAmPmChange:b[15]||(b[15]=O=>fe.$emit("am-pm-change",O))}),hn({_:2},[Ke(G(Z),(O,j)=>({name:O,fn:Pe(z=>[Ie(fe.$slots,O,en(mn(z)))])}))]),1040,["hours","minutes","seconds","internal-model-value","disabled-times-config","validate-time"]))])):re("",!0)],64))}}),FL=(t,e)=>{const n=be(),{defaultedMultiCalendars:s,defaultedConfig:i,defaultedHighlight:o,defaultedRange:r,propDates:a,defaultedFilters:l,defaultedMultiDates:c}=St(t),{modelValue:u,year:d,month:f,calendars:g}=Ja(t,e),{isDisabled:_}=Vi(t),{selectYear:m,groupedYears:y,showYearPicker:v,isDisabled:$,toggleYearPicker:A,handleYearSelect:D,handleYear:x}=Qy({modelValue:u,multiCalendars:s,range:r,highlight:o,calendars:g,propDates:a,month:f,year:d,filters:l,props:t,emit:e}),w=(R,I)=>[R,I].map(H=>Ss(H,"MMMM",{locale:t.formatLocale})).join("-"),S=_e(()=>R=>u.value?Array.isArray(u.value)?u.value.some(I=>um(R,I)):um(u.value,R):!1),T=R=>{if(r.value.enabled){if(Array.isArray(u.value)){const I=nt(R,u.value[0])||nt(R,u.value[1]);return Uc(u.value,n.value,R)&&!I}return!1}return!1},M=(R,I)=>R.quarter===im(I)&&R.year===ze(I),E=R=>typeof o.value=="function"?o.value({quarter:im(R),year:ze(R)}):!!o.value.quarters.find(I=>M(I,R)),V=_e(()=>R=>{const I=pt(new Date,{year:d.value(R)});return h2({start:Oa(I),end:wy(I)}).map(H=>{const Z=fo(H),ee=om(H),ce=_(H),ve=T(Z),U=E(Z);return{text:w(Z,ee),value:Z,active:S.value(Z),highlighted:U,disabled:ce,isBetween:ve}})}),X=R=>{yf(R,u,c.value.limit),e("auto-apply",!0)},le=R=>{u.value=wf(u,R,e),Jc(u.value,e,t.autoApply,t.modelAuto)},Y=R=>{u.value=R,e("auto-apply")};return{defaultedConfig:i,defaultedMultiCalendars:s,groupedYears:y,year:d,isDisabled:$,quarters:V,showYearPicker:v,modelValue:u,setHoverDate:R=>{n.value=R},selectYear:m,selectQuarter:(R,I,H)=>{if(!H)return g.value[I].month=Ze(om(R)),c.value.enabled?X(R):r.value.enabled?le(R):Y(R)},toggleYearPicker:A,handleYearSelect:D,handleYear:x}},BL={class:"dp--quarter-items"},VL=["data-test","disabled","onClick","onMouseover"],HL=Bt({compatConfig:{MODE:3},__name:"QuarterPicker",props:{...ds},emits:["update:internal-model-value","reset-flow","overlay-closed","auto-apply","range-start","range-end","overlay-toggle","update-month-year"],setup(t,{expose:e,emit:n}){const s=n,i=t,o=Po(),r=Ln(o,"yearMode"),{defaultedMultiCalendars:a,defaultedConfig:l,groupedYears:c,year:u,isDisabled:d,quarters:f,modelValue:g,showYearPicker:_,setHoverDate:m,selectQuarter:y,toggleYearPicker:v,handleYearSelect:$,handleYear:A}=FL(i,s);return e({getSidebarProps:()=>({modelValue:g,year:u,selectQuarter:y,handleYearSelect:$,handleYear:A})}),(D,x)=>(C(),Se(Gc,{"multi-calendars":G(a).count,collapse:D.collapse,stretch:""},{default:Pe(({instance:w})=>[h("div",{class:"dp-quarter-picker-wrap",style:zt({minHeight:`${G(l).modeHeight}px`})},[D.$slots["top-extra"]?Ie(D.$slots,"top-extra",{key:0,value:D.internalModelValue}):re("",!0),h("div",null,[N(Gy,Yt(D.$props,{items:G(c)(w),instance:w,"show-year-picker":G(_)[w],year:G(u)(w),"is-disabled":S=>G(d)(w,S),onHandleYear:S=>G(A)(w,S),onYearSelect:S=>G($)(S,w),onToggleYearPicker:S=>G(v)(w,S?.flow,S?.show)}),hn({_:2},[Ke(G(r),(S,T)=>({name:S,fn:Pe(M=>[Ie(D.$slots,S,en(mn(M)))])}))]),1040,["items","instance","show-year-picker","year","is-disabled","onHandleYear","onYearSelect","onToggleYearPicker"])]),h("div",BL,[(C(!0),F(Me,null,Ke(G(f)(w),(S,T)=>(C(),F("div",{key:T},[h("button",{type:"button",class:Ee(["dp--qr-btn",{"dp--qr-btn-active":S.active,"dp--qr-btn-between":S.isBetween,"dp--qr-btn-disabled":S.disabled,"dp--highlighted":S.highlighted}]),"data-test":S.value,disabled:S.disabled,onClick:M=>G(y)(S.value,w,S.disabled),onMouseover:M=>G(m)(S.value)},[D.$slots.quarter?Ie(D.$slots,"quarter",{key:0,value:S.value,text:S.text}):(C(),F(Me,{key:1},[He(xe(S.text),1)],64))],42,VL)]))),128))])],4)]),_:3},8,["multi-calendars","collapse"]))}}),jL=["id","tabindex","role","aria-label"],WL={key:0,class:"dp--menu-load-container"},zL=h("span",{class:"dp--menu-loader"},null,-1),KL=[zL],YL={key:1,class:"dp--menu-header"},UL={key:0,class:"dp__sidebar_left"},qL=["data-test","onClick","onKeydown"],GL={key:2,class:"dp__sidebar_right"},JL={key:3,class:"dp__action_extra"},vm=Bt({compatConfig:{MODE:3},__name:"DatepickerMenu",props:{...qc,shadow:{type:Boolean,default:!1},openOnTop:{type:Boolean,default:!1},internalModelValue:{type:[Date,Array],default:null},noOverlayFocus:{type:Boolean,default:!1},collapse:{type:Boolean,default:!1},getInputRect:{type:Function,default:()=>({})},isTextInputDate:{type:Boolean,default:!1}},emits:["close-picker","select-date","auto-apply","time-update","flow-step","update-month-year","invalid-select","update:internal-model-value","recalculate-position","invalid-fixed-range","tooltip-open","tooltip-close","time-picker-open","time-picker-close","am-pm-change","range-start","range-end","auto-apply-invalid","date-update","invalid-date","overlay-toggle"],setup(t,{expose:e,emit:n}){const s=n,i=t,o=be(null),r=_e(()=>{const{openOnTop:W,...ne}=i;return{...ne,flowStep:M.value,collapse:i.collapse,noOverlayFocus:i.noOverlayFocus,menuWrapRef:o.value}}),{setMenuFocused:a,setShiftKey:l,control:c}=qy(),u=Po(),{defaultedTextInput:d,defaultedInline:f,defaultedConfig:g,defaultedUI:_}=St(i),m=be(null),y=be(0),v=be(null),$=be(!1),A=be(null);Jt(()=>{if(!i.shadow){$.value=!0,D(),window.addEventListener("resize",D);const W=Wt(o);if(W&&!d.value.enabled&&!f.value.enabled&&(a(!0),I()),W){const ne=J=>{g.value.allowPreventDefault&&J.preventDefault(),$i(J,g.value,!0)};W.addEventListener("pointerdown",ne),W.addEventListener("mousedown",ne)}}}),Dr(()=>{window.removeEventListener("resize",D)});const D=()=>{const W=Wt(v);W&&(y.value=W.getBoundingClientRect().width)},{arrowRight:x,arrowLeft:w,arrowDown:S,arrowUp:T}=Bi(),{flowStep:M,updateFlowStep:E,childMount:V,resetFlow:X,handleFlow:le}=tR(i,s,A),Y=_e(()=>i.monthPicker?tL:i.yearPicker?sL:i.timePicker?yL:i.quarterPicker?HL:NL),R=_e(()=>{var W;if(g.value.arrowLeft)return g.value.arrowLeft;const ne=(W=o.value)==null?void 0:W.getBoundingClientRect(),J=i.getInputRect();return J?.width=(ne?.right??0)&&J?.width{const W=Wt(o);W&&W.focus({preventScroll:!0})},H=_e(()=>{var W;return((W=A.value)==null?void 0:W.getSidebarProps())||{}}),Z=()=>{i.openOnTop&&s("recalculate-position")},ee=Ln(u,"action"),ce=_e(()=>i.monthPicker||i.yearPicker?Ln(u,"monthYear"):i.timePicker?Ln(u,"timePicker"):Ln(u,"shared")),ve=_e(()=>i.openOnTop?"dp__arrow_bottom":"dp__arrow_top"),U=_e(()=>({dp__menu_disabled:i.disabled,dp__menu_readonly:i.readonly,"dp-menu-loading":i.loading})),Q=_e(()=>({dp__menu:!0,dp__menu_index:!f.value.enabled,dp__relative:f.value.enabled,..._.value.menu??{}})),L=W=>{$i(W,g.value,!0)},te=()=>{i.escClose&&s("close-picker")},ae=W=>{if(i.arrowNavigation){if(W===gn.up)return T();if(W===gn.down)return S();if(W===gn.left)return w();if(W===gn.right)return x()}else W===gn.left||W===gn.up?B("handleArrow",gn.left,0,W===gn.up):B("handleArrow",gn.right,0,W===gn.down)},P=W=>{l(W.shiftKey),!i.disableMonthYearSelect&&W.code===bt.tab&&W.target.classList.contains("dp__menu")&&c.value.shiftKeyInMenu&&(W.preventDefault(),$i(W,g.value,!0),s("close-picker"))},ie=()=>{I(),s("time-picker-close")},de=W=>{var ne,J,he;(ne=A.value)==null||ne.toggleTimePicker(!1,!1),(J=A.value)==null||J.toggleMonthPicker(!1,!1,W),(he=A.value)==null||he.toggleYearPicker(!1,!1,W)},we=(W,ne=0)=>{var J,he,me;return W==="month"?(J=A.value)==null?void 0:J.toggleMonthPicker(!1,!0,ne):W==="year"?(he=A.value)==null?void 0:he.toggleYearPicker(!1,!0,ne):W==="time"?(me=A.value)==null?void 0:me.toggleTimePicker(!0,!1):de(ne)},B=(W,...ne)=>{var J,he;(J=A.value)!=null&&J[W]&&((he=A.value)==null||he[W](...ne))},fe=()=>{B("selectCurrentDate")},b=(W,ne)=>{B("presetDate",W,ne)},O=()=>{B("clearHoverDate")},j=(W,ne)=>{B("updateMonthYear",W,ne)},z=(W,ne)=>{W.preventDefault(),ae(ne)},oe=W=>{var ne,J,he;if(P(W),W.key===bt.home||W.key===bt.end)return B("selectWeekDate",W.key===bt.home,W.target.getAttribute("id"));switch((W.key===bt.pageUp||W.key===bt.pageDown)&&(W.shiftKey?(B("changeYear",W.key===bt.pageUp),(ne=Kd(o.value,"overlay-year"))==null||ne.focus()):(B("changeMonth",W.key===bt.pageUp),(J=Kd(o.value,W.key===bt.pageUp?"action-prev":"action-next"))==null||J.focus()),W.target.getAttribute("id")&&((he=o.value)==null||he.focus({preventScroll:!0}))),W.key){case bt.esc:return te();case bt.arrowLeft:return z(W,gn.left);case bt.arrowRight:return z(W,gn.right);case bt.arrowUp:return z(W,gn.up);case bt.arrowDown:return z(W,gn.down);default:return}};return e({updateMonthYear:j,switchView:we,handleFlow:le}),(W,ne)=>{var J,he,me;return C(),F("div",{id:W.uid?`dp-menu-${W.uid}`:void 0,ref_key:"dpMenuRef",ref:o,tabindex:G(f).enabled?void 0:"0",role:G(f).enabled?void 0:"dialog","aria-label":(J=W.ariaLabels)==null?void 0:J.menu,class:Ee(Q.value),style:zt({"--dp-arrow-left":R.value}),onMouseleave:O,onClick:L,onKeydown:oe},[(W.disabled||W.readonly)&&G(f).enabled||W.loading?(C(),F("div",{key:0,class:Ee(U.value)},[W.loading?(C(),F("div",WL,KL)):re("",!0)],2)):re("",!0),W.$slots["menu-header"]?(C(),F("div",YL,[Ie(W.$slots,"menu-header")])):re("",!0),!G(f).enabled&&!W.teleportCenter?(C(),F("div",{key:2,class:Ee(ve.value)},null,2)):re("",!0),h("div",{ref_key:"innerMenuRef",ref:v,class:Ee({dp__menu_content_wrapper:((he=W.presetDates)==null?void 0:he.length)||!!W.$slots["left-sidebar"]||!!W.$slots["right-sidebar"],"dp--menu-content-wrapper-collapsed":t.collapse&&(((me=W.presetDates)==null?void 0:me.length)||!!W.$slots["left-sidebar"]||!!W.$slots["right-sidebar"])}),style:zt({"--dp-menu-width":`${y.value}px`})},[W.$slots["left-sidebar"]?(C(),F("div",UL,[Ie(W.$slots,"left-sidebar",en(mn(H.value)))])):re("",!0),W.presetDates.length?(C(),F("div",{key:1,class:Ee({"dp--preset-dates-collapsed":t.collapse,"dp--preset-dates":!0})},[(C(!0),F(Me,null,Ke(W.presetDates,(pe,Re)=>(C(),F(Me,{key:Re},[pe.slot?Ie(W.$slots,pe.slot,{key:0,presetDate:b,label:pe.label,value:pe.value}):(C(),F("button",{key:1,type:"button",style:zt(pe.style||{}),class:Ee(["dp__btn dp--preset-range",{"dp--preset-range-collapsed":t.collapse}]),"data-test":pe.testId??void 0,onClick:Ma(Oe=>b(pe.value,pe.noTz),["prevent"]),onKeydown:Oe=>G(bn)(Oe,()=>b(pe.value,pe.noTz),!0)},xe(pe.label),47,qL))],64))),128))],2)):re("",!0),h("div",{ref_key:"calendarWrapperRef",ref:m,class:"dp__instance_calendar",role:"document"},[(C(),Se(To(Y.value),Yt({ref_key:"dynCmpRef",ref:A},r.value,{"flow-step":G(M),onMount:G(V),onUpdateFlowStep:G(E),onResetFlow:G(X),onFocusMenu:I,onSelectDate:ne[0]||(ne[0]=pe=>W.$emit("select-date")),onDateUpdate:ne[1]||(ne[1]=pe=>W.$emit("date-update",pe)),onTooltipOpen:ne[2]||(ne[2]=pe=>W.$emit("tooltip-open",pe)),onTooltipClose:ne[3]||(ne[3]=pe=>W.$emit("tooltip-close",pe)),onAutoApply:ne[4]||(ne[4]=pe=>W.$emit("auto-apply",pe)),onRangeStart:ne[5]||(ne[5]=pe=>W.$emit("range-start",pe)),onRangeEnd:ne[6]||(ne[6]=pe=>W.$emit("range-end",pe)),onInvalidFixedRange:ne[7]||(ne[7]=pe=>W.$emit("invalid-fixed-range",pe)),onTimeUpdate:ne[8]||(ne[8]=pe=>W.$emit("time-update")),onAmPmChange:ne[9]||(ne[9]=pe=>W.$emit("am-pm-change",pe)),onTimePickerOpen:ne[10]||(ne[10]=pe=>W.$emit("time-picker-open",pe)),onTimePickerClose:ie,onRecalculatePosition:Z,onUpdateMonthYear:ne[11]||(ne[11]=pe=>W.$emit("update-month-year",pe)),onAutoApplyInvalid:ne[12]||(ne[12]=pe=>W.$emit("auto-apply-invalid",pe)),onInvalidDate:ne[13]||(ne[13]=pe=>W.$emit("invalid-date",pe)),onOverlayToggle:ne[14]||(ne[14]=pe=>W.$emit("overlay-toggle",pe)),"onUpdate:internalModelValue":ne[15]||(ne[15]=pe=>W.$emit("update:internal-model-value",pe))}),hn({_:2},[Ke(ce.value,(pe,Re)=>({name:pe,fn:Pe(Oe=>[Ie(W.$slots,pe,en(mn({...Oe})))])}))]),1040,["flow-step","onMount","onUpdateFlowStep","onResetFlow"]))],512),W.$slots["right-sidebar"]?(C(),F("div",GL,[Ie(W.$slots,"right-sidebar",en(mn(H.value)))])):re("",!0),W.$slots["action-extra"]?(C(),F("div",JL,[W.$slots["action-extra"]?Ie(W.$slots,"action-extra",{key:0,selectCurrentDate:fe}):re("",!0)])):re("",!0)],6),!W.autoApply||G(g).keepActionRow?(C(),Se(UI,Yt({key:3,"menu-mount":$.value},r.value,{"calendar-width":y.value,onClosePicker:ne[16]||(ne[16]=pe=>W.$emit("close-picker")),onSelectDate:ne[17]||(ne[17]=pe=>W.$emit("select-date")),onInvalidSelect:ne[18]||(ne[18]=pe=>W.$emit("invalid-select")),onSelectNow:fe}),hn({_:2},[Ke(G(ee),(pe,Re)=>({name:pe,fn:Pe(Oe=>[Ie(W.$slots,pe,en(mn({...Oe})))])}))]),1040,["menu-mount","calendar-width"])):re("",!0)],46,jL)}}});var Qo=(t=>(t.center="center",t.left="left",t.right="right",t))(Qo||{});const XL=({menuRef:t,menuRefInner:e,inputRef:n,pickerWrapperRef:s,inline:i,emit:o,props:r,slots:a})=>{const{defaultedConfig:l}=St(r),c=be({}),u=be(!1),d=be({top:"0",left:"0"}),f=be(!1),g=$a(r,"teleportCenter");Ht(g,()=>{d.value=JSON.parse(JSON.stringify({})),x()});const _=I=>{if(r.teleport){const H=I.getBoundingClientRect();return{left:H.left+window.scrollX,top:H.top+window.scrollY}}return{top:0,left:0}},m=(I,H)=>{d.value.left=`${I+H-c.value.width}px`},y=I=>{d.value.left=`${I}px`},v=(I,H)=>{r.position===Qo.left&&y(I),r.position===Qo.right&&m(I,H),r.position===Qo.center&&(d.value.left=`${I+H/2-c.value.width/2}px`)},$=I=>{const{width:H,height:Z}=I.getBoundingClientRect(),{top:ee,left:ce}=r.altPosition?r.altPosition(I):_(I);return{top:+ee,left:+ce,width:H,height:Z}},A=()=>{d.value.left="50%",d.value.top="50%",d.value.transform="translate(-50%, -50%)",d.value.position="fixed",delete d.value.opacity},D=()=>{const I=Wt(n),{top:H,left:Z,transform:ee}=r.altPosition(I);d.value={top:`${H}px`,left:`${Z}px`,transform:ee??""}},x=(I=!0)=>{var H;if(!i.value.enabled){if(g.value)return A();if(r.altPosition!==null)return D();if(I){const Z=r.teleport?(H=e.value)==null?void 0:H.$el:t.value;Z&&(c.value=Z.getBoundingClientRect()),o("recalculate-position")}return X()}},w=({inputEl:I,left:H,width:Z})=>{window.screen.width>768&&!u.value&&v(H,Z),M(I)},S=I=>{const{top:H,left:Z,height:ee,width:ce}=$(I);d.value.top=`${ee+H+ +r.offset}px`,f.value=!1,u.value||(d.value.left=`${Z+ce/2-c.value.width/2}px`),w({inputEl:I,left:Z,width:ce})},T=I=>{const{top:H,left:Z,width:ee}=$(I);d.value.top=`${H-+r.offset-c.value.height}px`,f.value=!0,w({inputEl:I,left:Z,width:ee})},M=I=>{if(r.autoPosition){const{left:H,width:Z}=$(I),{left:ee,right:ce}=c.value;if(!u.value){if(Math.abs(ee)!==Math.abs(ce)){if(ee<=0)return u.value=!0,y(H);if(ce>=document.documentElement.clientWidth)return u.value=!0,m(H,Z)}return v(H,Z)}}},E=()=>{const I=Wt(n);if(I){const{height:H}=c.value,{top:Z,height:ee}=I.getBoundingClientRect(),ce=window.innerHeight-Z-ee,ve=Z;return H<=ce?ao.bottom:H>ce&&H<=ve?ao.top:ce>=ve?ao.bottom:ao.top}return ao.bottom},V=I=>E()===ao.bottom?S(I):T(I),X=()=>{const I=Wt(n);if(I)return r.autoPosition?V(I):S(I)},le=function(I){if(I){const H=I.scrollHeight>I.clientHeight,Z=window.getComputedStyle(I).overflowY.indexOf("hidden")!==-1;return H&&!Z}return!0},Y=function(I){return!I||I===document.body||I.nodeType===Node.DOCUMENT_FRAGMENT_NODE?window:le(I)?I:Y(I.assignedSlot&&l.value.shadowDom?I.assignedSlot.parentNode:I.parentNode)},R=I=>{if(I)switch(r.position){case Qo.left:return{left:0,transform:"translateX(0)"};case Qo.right:return{left:`${I.width}px`,transform:"translateX(-100%)"};default:return{left:`${I.width/2}px`,transform:"translateX(-50%)"}}return{}};return{openOnTop:f,menuStyle:d,xCorrect:u,setMenuPosition:x,getScrollableParent:Y,shadowRender:(I,H)=>{var Z,ee,ce;const ve=document.createElement("div"),U=(Z=Wt(n))==null?void 0:Z.getBoundingClientRect();ve.setAttribute("id","dp--temp-container");const Q=(ee=s.value)!=null&&ee.clientWidth?s.value:document.body;Q.append(ve);const L=R(U),te=l.value.shadowDom?Object.keys(a).filter(P=>["right-sidebar","left-sidebar","top-extra","action-extra"].includes(P)):Object.keys(a),ae=$o(I,{...H,shadow:!0,style:{opacity:0,position:"absolute",...L}},Object.fromEntries(te.map(P=>[P,a[P]])));Rg(ae,ve),c.value=(ce=ae.el)==null?void 0:ce.getBoundingClientRect(),Rg(null,ve),Q.removeChild(ve)}}},ci=[{name:"clock-icon",use:["time","calendar","shared"]},{name:"arrow-left",use:["month-year","calendar","shared","year-mode"]},{name:"arrow-right",use:["month-year","calendar","shared","year-mode"]},{name:"arrow-up",use:["time","calendar","month-year","shared"]},{name:"arrow-down",use:["time","calendar","month-year","shared"]},{name:"calendar-icon",use:["month-year","time","calendar","shared","year-mode"]},{name:"day",use:["calendar","shared"]},{name:"month-overlay-value",use:["calendar","month-year","shared"]},{name:"year-overlay-value",use:["calendar","month-year","shared","year-mode"]},{name:"year-overlay",use:["month-year","shared"]},{name:"month-overlay",use:["month-year","shared"]},{name:"month-overlay-header",use:["month-year","shared"]},{name:"year-overlay-header",use:["month-year","shared"]},{name:"hours-overlay-value",use:["calendar","time","shared"]},{name:"hours-overlay-header",use:["calendar","time","shared"]},{name:"minutes-overlay-value",use:["calendar","time","shared"]},{name:"minutes-overlay-header",use:["calendar","time","shared"]},{name:"seconds-overlay-value",use:["calendar","time","shared"]},{name:"seconds-overlay-header",use:["calendar","time","shared"]},{name:"hours",use:["calendar","time","shared"]},{name:"minutes",use:["calendar","time","shared"]},{name:"month",use:["calendar","month-year","shared"]},{name:"year",use:["calendar","month-year","shared","year-mode"]},{name:"action-buttons",use:["action"]},{name:"action-preview",use:["action"]},{name:"calendar-header",use:["calendar","shared"]},{name:"marker-tooltip",use:["calendar","shared"]},{name:"action-extra",use:["menu"]},{name:"time-picker-overlay",use:["calendar","time","shared"]},{name:"am-pm-button",use:["calendar","time","shared"]},{name:"left-sidebar",use:["menu"]},{name:"right-sidebar",use:["menu"]},{name:"month-year",use:["month-year","shared"]},{name:"time-picker",use:["menu","shared"]},{name:"action-row",use:["action"]},{name:"marker",use:["calendar","shared"]},{name:"quarter",use:["shared"]},{name:"top-extra",use:["shared","month-year"]},{name:"tp-inline-arrow-up",use:["shared","time"]},{name:"tp-inline-arrow-down",use:["shared","time"]},{name:"menu-header",use:["menu"]}],QL=[{name:"trigger"},{name:"input-icon"},{name:"clear-icon"},{name:"dp-input"}],ZL={all:()=>ci,monthYear:()=>ci.filter(t=>t.use.includes("month-year")),input:()=>QL,timePicker:()=>ci.filter(t=>t.use.includes("time")),action:()=>ci.filter(t=>t.use.includes("action")),calendar:()=>ci.filter(t=>t.use.includes("calendar")),menu:()=>ci.filter(t=>t.use.includes("menu")),shared:()=>ci.filter(t=>t.use.includes("shared")),yearMode:()=>ci.filter(t=>t.use.includes("year-mode"))},Ln=(t,e,n)=>{const s=[];return ZL[e]().forEach(i=>{t[i.name]&&s.push(i.name)}),n!=null&&n.length&&n.forEach(i=>{i.slot&&s.push(i.slot)}),s},Ga=t=>{const e=_e(()=>s=>t.value?s?t.value.open:t.value.close:""),n=_e(()=>s=>t.value?s?t.value.menuAppearTop:t.value.menuAppearBottom:"");return{transitionName:e,showTransition:!!t.value,menuTransition:n}},Ja=(t,e,n)=>{const{defaultedRange:s,defaultedTz:i}=St(t),o=ye(En(ye(),i.value.timezone)),r=be([{month:Ze(o),year:ze(o)}]),a=f=>{const g={hours:Qs(o),minutes:Mi(o),seconds:0};return s.value.enabled?[g[f],g[f]]:g[f]},l=Ts({hours:a("hours"),minutes:a("minutes"),seconds:a("seconds")});Ht(s,(f,g)=>{f.enabled!==g.enabled&&(l.hours=a("hours"),l.minutes=a("minutes"),l.seconds=a("seconds"))},{deep:!0});const c=_e({get:()=>t.internalModelValue,set:f=>{!t.readonly&&!t.disabled&&e("update:internal-model-value",f)}}),u=_e(()=>f=>r.value[f]?r.value[f].month:0),d=_e(()=>f=>r.value[f]?r.value[f].year:0);return Ht(c,(f,g)=>{n&&JSON.stringify(f??{})!==JSON.stringify(g??{})&&n()},{deep:!0}),{calendars:r,time:l,modelValue:c,month:u,year:d,today:o}},eR=(t,e)=>{const{defaultedMultiCalendars:n,defaultedMultiDates:s,defaultedUI:i,defaultedHighlight:o,defaultedTz:r,propDates:a,defaultedRange:l}=St(e),{isDisabled:c}=Vi(e),u=be(null),d=be(En(new Date,r.value.timezone)),f=L=>{!L.current&&e.hideOffsetDates||(u.value=L.value)},g=()=>{u.value=null},_=L=>Array.isArray(t.value)&&l.value.enabled&&t.value[0]&&u.value?L?It(u.value,t.value[0]):Ct(u.value,t.value[0]):!0,m=(L,te)=>{const ae=()=>t.value?te?t.value[0]||null:t.value[1]:null,P=t.value&&Array.isArray(t.value)?ae():null;return nt(ye(L.value),P)},y=L=>{const te=Array.isArray(t.value)?t.value[0]:null;return L?!Ct(u.value??null,te):!0},v=(L,te=!0)=>(l.value.enabled||e.weekPicker)&&Array.isArray(t.value)&&t.value.length===2?e.hideOffsetDates&&!L.current?!1:nt(ye(L.value),t.value[te?0:1]):l.value.enabled?m(L,te)&&y(te)||nt(L.value,Array.isArray(t.value)?t.value[0]:null)&&_(te):!1,$=(L,te)=>{if(Array.isArray(t.value)&&t.value[0]&&t.value.length===1){const ae=nt(L.value,u.value);return te?It(t.value[0],L.value)&&ae:Ct(t.value[0],L.value)&&ae}return!1},A=L=>!t.value||e.hideOffsetDates&&!L.current?!1:l.value.enabled?e.modelAuto&&Array.isArray(t.value)?nt(L.value,t.value[0]?t.value[0]:d.value):!1:s.value.enabled&&Array.isArray(t.value)?t.value.some(te=>nt(te,L.value)):nt(L.value,t.value?t.value:d.value),D=L=>{if(l.value.autoRange||e.weekPicker){if(u.value){if(e.hideOffsetDates&&!L.current)return!1;const te=is(u.value,+l.value.autoRange),ae=js(ye(u.value),e.weekStart);return e.weekPicker?nt(ae[1],ye(L.value)):nt(te,ye(L.value))}return!1}return!1},x=L=>{if(l.value.autoRange||e.weekPicker){if(u.value){const te=is(u.value,+l.value.autoRange);if(e.hideOffsetDates&&!L.current)return!1;const ae=js(ye(u.value),e.weekStart);return e.weekPicker?It(L.value,ae[0])&&Ct(L.value,ae[1]):It(L.value,u.value)&&Ct(L.value,te)}return!1}return!1},w=L=>{if(l.value.autoRange||e.weekPicker){if(u.value){if(e.hideOffsetDates&&!L.current)return!1;const te=js(ye(u.value),e.weekStart);return e.weekPicker?nt(te[0],L.value):nt(u.value,L.value)}return!1}return!1},S=L=>Uc(t.value,u.value,L.value),T=()=>e.modelAuto&&Array.isArray(e.internalModelValue)?!!e.internalModelValue[0]:!1,M=()=>e.modelAuto?Ny(e.internalModelValue):!0,E=L=>{if(e.weekPicker)return!1;const te=l.value.enabled?!v(L)&&!v(L,!1):!0;return!c(L.value)&&!A(L)&&!(!L.current&&e.hideOffsetDates)&&te},V=L=>l.value.enabled?e.modelAuto?T()&&A(L):!1:A(L),X=L=>o.value?_I(L.value,a.value.highlight):!1,le=L=>{const te=c(L.value);return te&&(typeof o.value=="function"?!o.value(L.value,te):!o.value.options.highlightDisabled)},Y=L=>{var te;return typeof o.value=="function"?o.value(L.value):(te=o.value.weekdays)==null?void 0:te.includes(L.value.getDay())},R=L=>(l.value.enabled||e.weekPicker)&&(!(n.value.count>0)||L.current)&&M()&&!(!L.current&&e.hideOffsetDates)&&!A(L)?S(L):!1,I=L=>{const{isRangeStart:te,isRangeEnd:ae}=ce(L),P=l.value.enabled?te||ae:!1;return{dp__cell_offset:!L.current,dp__pointer:!e.disabled&&!(!L.current&&e.hideOffsetDates)&&!c(L.value),dp__cell_disabled:c(L.value),dp__cell_highlight:!le(L)&&(X(L)||Y(L))&&!V(L)&&!P&&!w(L)&&!(R(L)&&e.weekPicker)&&!ae,dp__cell_highlight_active:!le(L)&&(X(L)||Y(L))&&V(L),dp__today:!e.noToday&&nt(L.value,d.value)&&L.current,"dp--past":Ct(L.value,d.value),"dp--future":It(L.value,d.value)}},H=L=>({dp__active_date:V(L),dp__date_hover:E(L)}),Z=L=>{if(t.value&&!Array.isArray(t.value)){const te=js(t.value,e.weekStart);return{...U(L),dp__range_start:nt(te[0],L.value),dp__range_end:nt(te[1],L.value),dp__range_between_week:It(L.value,te[0])&&Ct(L.value,te[1])}}return{...U(L)}},ee=L=>{if(t.value&&Array.isArray(t.value)){const te=js(t.value[0],e.weekStart),ae=t.value[1]?js(t.value[1],e.weekStart):[];return{...U(L),dp__range_start:nt(te[0],L.value)||nt(ae[0],L.value),dp__range_end:nt(te[1],L.value)||nt(ae[1],L.value),dp__range_between_week:It(L.value,te[0])&&Ct(L.value,te[1])||It(L.value,ae[0])&&Ct(L.value,ae[1]),dp__range_between:It(L.value,te[1])&&Ct(L.value,ae[0])}}return{...U(L)}},ce=L=>{const te=n.value.count>0?L.current&&v(L)&&M():v(L)&&M(),ae=n.value.count>0?L.current&&v(L,!1)&&M():v(L,!1)&&M();return{isRangeStart:te,isRangeEnd:ae}},ve=L=>{const{isRangeStart:te,isRangeEnd:ae}=ce(L);return{dp__range_start:te,dp__range_end:ae,dp__range_between:R(L),dp__date_hover:nt(L.value,u.value)&&!te&&!ae&&!e.weekPicker,dp__date_hover_start:$(L,!0),dp__date_hover_end:$(L,!1)}},U=L=>({...ve(L),dp__cell_auto_range:x(L),dp__cell_auto_range_start:w(L),dp__cell_auto_range_end:D(L)}),Q=L=>l.value.enabled?l.value.autoRange?U(L):e.modelAuto?{...H(L),...ve(L)}:e.weekPicker?ee(L):ve(L):e.weekPicker?Z(L):H(L);return{setHoverDate:f,clearHoverDate:g,getDayClassData:L=>e.hideOffsetDates&&!L.current?{}:{...I(L),...Q(L),[e.dayClass?e.dayClass(L.value,e.internalModelValue):""]:!0,...i.value.calendarCell??{}}}},Vi=t=>{const{defaultedFilters:e,defaultedRange:n,propDates:s,defaultedMultiDates:i}=St(t),o=Y=>s.value.disabledDates?typeof s.value.disabledDates=="function"?s.value.disabledDates(ye(Y)):!!pc(Y,s.value.disabledDates):!1,r=Y=>s.value.maxDate?t.yearPicker?ze(Y)>ze(s.value.maxDate):It(Y,s.value.maxDate):!1,a=Y=>s.value.minDate?t.yearPicker?ze(Y){const R=r(Y),I=a(Y),H=o(Y),Z=e.value.months.map(Q=>+Q).includes(Ze(Y)),ee=t.disabledWeekDays.length?t.disabledWeekDays.some(Q=>+Q===oO(Y)):!1,ce=g(Y),ve=ze(Y),U=ve<+t.yearRange[0]||ve>+t.yearRange[1];return!(R||I||H||Z||U||ee||ce)},c=(Y,R)=>Ct(...bi(s.value.minDate,Y,R))||nt(...bi(s.value.minDate,Y,R)),u=(Y,R)=>It(...bi(s.value.maxDate,Y,R))||nt(...bi(s.value.maxDate,Y,R)),d=(Y,R,I)=>{let H=!1;return s.value.maxDate&&I&&u(Y,R)&&(H=!0),s.value.minDate&&!I&&c(Y,R)&&(H=!0),H},f=(Y,R,I,H)=>{let Z=!1;return H?s.value.minDate&&s.value.maxDate?Z=d(Y,R,I):(s.value.minDate&&c(Y,R)||s.value.maxDate&&u(Y,R))&&(Z=!0):Z=!0,Z},g=Y=>Array.isArray(s.value.allowedDates)&&!s.value.allowedDates.length?!0:s.value.allowedDates?!pc(Y,s.value.allowedDates):!1,_=Y=>!l(Y),m=Y=>n.value.noDisabledRange?!yy({start:Y[0],end:Y[1]}).some(R=>_(R)):!0,y=Y=>{if(Y){const R=ze(Y);return R>=+t.yearRange[0]&&R<=t.yearRange[1]}return!0},v=(Y,R)=>!!(Array.isArray(Y)&&Y[R]&&(n.value.maxRange||n.value.minRange)&&y(Y[R])),$=(Y,R,I=0)=>{if(v(R,I)&&y(Y)){const H=by(Y,R[I]),Z=jy(R[I],Y),ee=Z.length===1?0:Z.filter(ve=>_(ve)).length,ce=Math.abs(H)-(n.value.minMaxRawRange?0:ee);if(n.value.minRange&&n.value.maxRange)return ce>=+n.value.minRange&&ce<=+n.value.maxRange;if(n.value.minRange)return ce>=+n.value.minRange;if(n.value.maxRange)return ce<=+n.value.maxRange}return!0},A=()=>!t.enableTimePicker||t.monthPicker||t.yearPicker||t.ignoreTimeValidation,D=Y=>Array.isArray(Y)?[Y[0]?Uu(Y[0]):null,Y[1]?Uu(Y[1]):null]:Uu(Y),x=(Y,R,I)=>Y.find(H=>+H.hours===Qs(R)&&H.minutes==="*"?!0:+H.minutes===Mi(R)&&+H.hours===Qs(R))&&I,w=(Y,R,I)=>{const[H,Z]=Y,[ee,ce]=R;return!x(H,ee,I)&&!x(Z,ce,I)&&I},S=(Y,R)=>{const I=Array.isArray(R)?R:[R];return Array.isArray(t.disabledTimes)?Array.isArray(t.disabledTimes[0])?w(t.disabledTimes,I,Y):!I.some(H=>x(t.disabledTimes,H,Y)):Y},T=(Y,R)=>{const I=Array.isArray(R)?[vo(R[0]),R[1]?vo(R[1]):void 0]:vo(R),H=!t.disabledTimes(I);return Y&&H},M=(Y,R)=>t.disabledTimes?Array.isArray(t.disabledTimes)?S(R,Y):T(R,Y):R,E=Y=>{let R=!0;if(!Y||A())return!0;const I=!s.value.minDate&&!s.value.maxDate?D(Y):Y;return(t.maxTime||s.value.maxDate)&&(R=gm(t.maxTime,s.value.maxDate,"max",Qt(I),R)),(t.minTime||s.value.minDate)&&(R=gm(t.minTime,s.value.minDate,"min",Qt(I),R)),M(Y,R)},V=Y=>{if(!t.monthPicker)return!0;let R=!0;const I=ye(os(Y));if(s.value.minDate&&s.value.maxDate){const H=ye(os(s.value.minDate)),Z=ye(os(s.value.maxDate));return It(I,H)&&Ct(I,Z)||nt(I,H)||nt(I,Z)}if(s.value.minDate){const H=ye(os(s.value.minDate));R=It(I,H)||nt(I,H)}if(s.value.maxDate){const H=ye(os(s.value.maxDate));R=Ct(I,H)||nt(I,H)}return R},X=_e(()=>Y=>!t.enableTimePicker||t.ignoreTimeValidation?!0:E(Y)),le=_e(()=>Y=>t.monthPicker?Array.isArray(Y)&&(n.value.enabled||i.value.enabled)?!Y.filter(R=>!V(R)).length:V(Y):!0);return{isDisabled:_,validateDate:l,validateMonthYearInRange:f,isDateRangeAllowed:m,checkMinMaxRange:$,isValidTime:E,isTimeValid:X,isMonthValid:le}},Xc=()=>{const t=_e(()=>(s,i)=>s?.includes(i)),e=_e(()=>(s,i)=>s.count?s.solo?!0:i===0:!0),n=_e(()=>(s,i)=>s.count?s.solo?!0:i===s.count-1:!0);return{hideNavigationButtons:t,showLeftIcon:e,showRightIcon:n}},tR=(t,e,n)=>{const s=be(0),i=Ts({[bo.timePicker]:!t.enableTimePicker||t.timePicker||t.monthPicker,[bo.calendar]:!1,[bo.header]:!1}),o=_e(()=>t.monthPicker||t.timePicker),r=d=>{var f;if((f=t.flow)!=null&&f.length){if(!d&&o.value)return u();i[d]=!0,Object.keys(i).filter(g=>!i[g]).length||u()}},a=()=>{var d,f;(d=t.flow)!=null&&d.length&&s.value!==-1&&(s.value+=1,e("flow-step",s.value),u()),((f=t.flow)==null?void 0:f.length)===s.value&&nn().then(()=>l())},l=()=>{s.value=-1},c=(d,f,...g)=>{var _,m;t.flow[s.value]===d&&n.value&&((m=(_=n.value)[f])==null||m.call(_,...g))},u=(d=0)=>{d&&(s.value+=d),c(cn.month,"toggleMonthPicker",!0),c(cn.year,"toggleYearPicker",!0),c(cn.calendar,"toggleTimePicker",!1,!0),c(cn.time,"toggleTimePicker",!0,!0);const f=t.flow[s.value];(f===cn.hours||f===cn.minutes||f===cn.seconds)&&c(f,"toggleTimePicker",!0,!0,f)};return{childMount:r,updateFlowStep:a,resetFlow:l,handleFlow:u,flowStep:s}},nR={key:1,class:"dp__input_wrap"},sR=["id","name","inputmode","placeholder","disabled","readonly","required","value","autocomplete","aria-disabled","aria-invalid"],iR={key:2,class:"dp--clear-btn"},oR=["aria-label"],rR=Bt({compatConfig:{MODE:3},__name:"DatepickerInput",props:{isMenuOpen:{type:Boolean,default:!1},inputValue:{type:String,default:""},...qc},emits:["clear","open","update:input-value","set-input-date","close","select-date","set-empty-date","toggle","focus-prev","focus","blur","real-blur","text-input"],setup(t,{expose:e,emit:n}){const s=n,i=t,{defaultedTextInput:o,defaultedAriaLabels:r,defaultedInline:a,defaultedConfig:l,defaultedRange:c,defaultedMultiDates:u,defaultedUI:d,getDefaultPattern:f,getDefaultStartTime:g}=St(i),{checkMinMaxRange:_}=Vi(i),m=be(),y=be(null),v=be(!1),$=be(!1),A=be(!1),D=be(null),x=_e(()=>({dp__pointer:!i.disabled&&!i.readonly&&!o.value.enabled,dp__disabled:i.disabled,dp__input_readonly:!o.value.enabled,dp__input:!0,dp__input_icon_pad:!i.hideInputIcon,dp__input_valid:typeof i.state=="boolean"?i.state:!1,dp__input_invalid:typeof i.state=="boolean"?!i.state:!1,dp__input_focus:v.value||i.isMenuOpen,dp__input_reg:!o.value.enabled,...d.value.input??{}})),w=()=>{s("set-input-date",null),i.clearable&&i.autoApply&&(s("set-empty-date"),m.value=null)},S=U=>{const Q=g();return vI(U,o.value.format??f(),Q??Wy({},i.enableSeconds),i.inputValue,A.value,i.formatLocale)},T=U=>{const{rangeSeparator:Q}=o.value,[L,te]=U.split(`${Q}`);if(L){const ae=S(L.trim()),P=te?S(te.trim()):null;if(vr(ae,P))return;const ie=ae&&P?[ae,P]:[ae];_(P,ie,0)&&(m.value=ae?ie:null)}},M=()=>{A.value=!0},E=U=>{if(c.value.enabled)T(U);else if(u.value.enabled){const Q=U.split(";");m.value=Q.map(L=>S(L.trim())).filter(L=>L)}else m.value=S(U)},V=U=>{var Q;const L=typeof U=="string"?U:(Q=U.target)==null?void 0:Q.value;L!==""?(o.value.openMenu&&!i.isMenuOpen&&s("open"),E(L),s("set-input-date",m.value)):w(),A.value=!1,s("update:input-value",L),s("text-input",U,m.value)},X=U=>{o.value.enabled?(E(U.target.value),o.value.enterSubmit&&Yd(m.value)&&i.inputValue!==""?(s("set-input-date",m.value,!0),m.value=null):o.value.enterSubmit&&i.inputValue===""&&(m.value=null,s("clear"))):R(U)},le=(U,Q)=>{var L;if(D.value&&Q&&!$.value)return U.preventDefault(),$.value=!0,(L=D.value)==null?void 0:L.focus();o.value.enabled&&o.value.tabSubmit&&E(U.target.value),o.value.tabSubmit&&Yd(m.value)&&i.inputValue!==""?(s("set-input-date",m.value,!0,!0),m.value=null):o.value.tabSubmit&&i.inputValue===""&&(m.value=null,s("clear",!0))},Y=()=>{v.value=!0,s("focus"),nn().then(()=>{var U;o.value.enabled&&o.value.selectOnFocus&&((U=y.value)==null||U.select())})},R=U=>{if(U.preventDefault(),$i(U,l.value,!0),o.value.enabled&&o.value.openMenu&&!a.value.input){if(o.value.openMenu==="open"&&!i.isMenuOpen)return s("open");if(o.value.openMenu==="toggle")return s("toggle")}else o.value.enabled||s("toggle")},I=()=>{s("real-blur"),v.value=!1,(!i.isMenuOpen||a.value.enabled&&a.value.input)&&s("blur"),i.autoApply&&o.value.enabled&&m.value&&!i.isMenuOpen&&(s("set-input-date",m.value),s("select-date"),m.value=null)},H=U=>{$i(U,l.value,!0),s("clear")},Z=(U,Q)=>{if(U.key==="Tab"&&le(U,Q),U.key==="Enter"&&X(U),!o.value.enabled){if(U.code==="Tab")return;U.preventDefault()}},ee=()=>{var U;(U=y.value)==null||U.focus({preventScroll:!0})},ce=U=>{m.value=U},ve=U=>{U.key===bt.tab&&($.value=!1,le(U))};return e({focusInput:ee,setParsedDate:ce}),(U,Q)=>{var L,te;return C(),F("div",{onClick:R},[U.$slots.trigger&&!U.$slots["dp-input"]&&!G(a).enabled?Ie(U.$slots,"trigger",{key:0}):re("",!0),!U.$slots.trigger&&(!G(a).enabled||G(a).input)?(C(),F("div",nR,[U.$slots["dp-input"]&&!U.$slots.trigger&&(!G(a).enabled||G(a).enabled&&G(a).input)?Ie(U.$slots,"dp-input",{key:0,value:t.inputValue,isMenuOpen:t.isMenuOpen,onInput:V,onEnter:X,onTab:le,onClear:H,onBlur:I,onKeypress:Z,onPaste:M,onFocus:Y,openMenu:()=>U.$emit("open"),closeMenu:()=>U.$emit("close"),toggleMenu:()=>U.$emit("toggle")}):re("",!0),U.$slots["dp-input"]?re("",!0):(C(),F("input",{key:1,id:U.uid?`dp-input-${U.uid}`:void 0,ref_key:"inputRef",ref:y,"data-test":"dp-input",name:U.name,class:Ee(x.value),inputmode:G(o).enabled?"text":"none",placeholder:U.placeholder,disabled:U.disabled,readonly:U.readonly,required:U.required,value:t.inputValue,autocomplete:U.autocomplete,"aria-disabled":U.disabled||void 0,"aria-invalid":U.state===!1?!0:void 0,onInput:V,onBlur:I,onFocus:Y,onKeypress:Z,onKeydown:Q[0]||(Q[0]=ae=>Z(ae,!0)),onPaste:M},null,42,sR)),h("div",{onClick:Q[3]||(Q[3]=ae=>s("toggle"))},[U.$slots["input-icon"]&&!U.hideInputIcon?(C(),F("span",{key:0,class:"dp__input_icon",onClick:Q[1]||(Q[1]=ae=>s("toggle"))},[Ie(U.$slots,"input-icon")])):re("",!0),!U.$slots["input-icon"]&&!U.hideInputIcon&&!U.$slots["dp-input"]?(C(),Se(G(Ir),{key:1,"aria-label":(L=G(r))==null?void 0:L.calendarIcon,class:"dp__input_icon dp__input_icons",onClick:Q[2]||(Q[2]=ae=>s("toggle"))},null,8,["aria-label"])):re("",!0)]),U.$slots["clear-icon"]&&t.inputValue&&U.clearable&&!U.disabled&&!U.readonly?(C(),F("span",iR,[Ie(U.$slots,"clear-icon",{clear:H})])):re("",!0),U.clearable&&!U.$slots["clear-icon"]&&t.inputValue&&!U.disabled&&!U.readonly?(C(),F("button",{key:3,ref_key:"clearBtnRef",ref:D,"aria-label":(te=G(r))==null?void 0:te.clearInput,class:"dp--clear-btn",type:"button",onBlur:Q[4]||(Q[4]=ae=>$.value=!1),onKeydown:Q[5]||(Q[5]=ae=>G(bn)(ae,()=>H(ae),!0,ve)),onClick:Q[6]||(Q[6]=Ma(ae=>H(ae),["prevent"]))},[N(G(Ly),{class:"dp__input_icons","data-test":"clear-icon"})],40,oR)):re("",!0)])):re("",!0)])}}}),aR=typeof window<"u"?window:void 0,Zu=()=>{},lR=t=>Dc()?(Ph(t),!0):!1,cR=(t,e,n,s)=>{if(!t)return Zu;let i=Zu;const o=Ht(()=>G(t),a=>{i(),a&&(a.addEventListener(e,n,s),i=()=>{a.removeEventListener(e,n,s),i=Zu})},{immediate:!0,flush:"post"}),r=()=>{o(),i()};return lR(r),r},uR=(t,e,n,s={})=>{const{window:i=aR,event:o="pointerdown"}=s;return i?cR(i,o,r=>{const a=Wt(t),l=Wt(e);!a||!l||a===r.target||r.composedPath().includes(a)||r.composedPath().includes(l)||n(r)},{passive:!0}):void 0},dR=Bt({compatConfig:{MODE:3},__name:"VueDatePicker",props:{...qc},emits:["update:model-value","update:model-timezone-value","text-submit","closed","cleared","open","focus","blur","internal-model-change","recalculate-position","flow-step","update-month-year","invalid-select","invalid-fixed-range","tooltip-open","tooltip-close","time-picker-open","time-picker-close","am-pm-change","range-start","range-end","date-update","invalid-date","overlay-toggle","text-input"],setup(t,{expose:e,emit:n}){const s=n,i=t,o=Po(),r=be(!1),a=$a(i,"modelValue"),l=$a(i,"timezone"),c=be(null),u=be(null),d=be(null),f=be(!1),g=be(null),_=be(!1),m=be(!1),y=be(!1),v=be(!1),{setMenuFocused:$,setShiftKey:A}=qy(),{clearArrowNav:D}=Bi(),{validateDate:x,isValidTime:w}=Vi(i),{defaultedTransitions:S,defaultedTextInput:T,defaultedInline:M,defaultedConfig:E,defaultedRange:V,defaultedMultiDates:X}=St(i),{menuTransition:le,showTransition:Y}=Ga(S);Jt(()=>{te(i.modelValue),nn().then(()=>{if(!M.value.enabled){const ue=ve(g.value);ue?.addEventListener("scroll",j),window?.addEventListener("resize",z)}}),M.value.enabled&&(r.value=!0),window?.addEventListener("keyup",oe),window?.addEventListener("keydown",W)}),Dr(()=>{if(!M.value.enabled){const ue=ve(g.value);ue?.removeEventListener("scroll",j),window?.removeEventListener("resize",z)}window?.removeEventListener("keyup",oe),window?.removeEventListener("keydown",W)});const R=Ln(o,"all",i.presetDates),I=Ln(o,"input");Ht([a,l],()=>{te(a.value)},{deep:!0});const{openOnTop:H,menuStyle:Z,xCorrect:ee,setMenuPosition:ce,getScrollableParent:ve,shadowRender:U}=XL({menuRef:c,menuRefInner:u,inputRef:d,pickerWrapperRef:g,inline:M,emit:s,props:i,slots:o}),{inputValue:Q,internalModelValue:L,parseExternalModelValue:te,emitModelValue:ae,formatInputValue:P,checkBeforeEmit:ie}=WI(s,i,f),de=_e(()=>({dp__main:!0,dp__theme_dark:i.dark,dp__theme_light:!i.dark,dp__flex_display:M.value.enabled,"dp--flex-display-collapsed":y.value,dp__flex_display_with_input:M.value.input})),we=_e(()=>i.dark?"dp__theme_dark":"dp__theme_light"),B=_e(()=>i.teleport?{to:typeof i.teleport=="boolean"?"body":i.teleport,disabled:!i.teleport||M.value.enabled}:{}),fe=_e(()=>({class:"dp__outer_menu_wrap"})),b=_e(()=>M.value.enabled&&(i.timePicker||i.monthPicker||i.yearPicker||i.quarterPicker)),O=()=>{var ue,Ae;return(Ae=(ue=d.value)==null?void 0:ue.$el)==null?void 0:Ae.getBoundingClientRect()},j=()=>{r.value&&(E.value.closeOnScroll?Be():ce())},z=()=>{var ue;r.value&&ce();const Ae=(ue=u.value)==null?void 0:ue.$el.getBoundingClientRect().width;y.value=document.body.offsetWidth<=Ae},oe=ue=>{ue.key==="Tab"&&!M.value.enabled&&!i.teleport&&E.value.tabOutClosesMenu&&(g.value.contains(document.activeElement)||Be()),m.value=ue.shiftKey},W=ue=>{m.value=ue.shiftKey},ne=()=>{!i.disabled&&!i.readonly&&(U(vm,i),ce(!1),r.value=!0,r.value&&s("open"),r.value||Ve(),te(i.modelValue))},J=()=>{var ue;Q.value="",Ve(),(ue=d.value)==null||ue.setParsedDate(null),s("update:model-value",null),s("update:model-timezone-value",null),s("cleared"),E.value.closeOnClearValue&&Be()},he=()=>{const ue=L.value;return!ue||!Array.isArray(ue)&&x(ue)?!0:Array.isArray(ue)?X.value.enabled||ue.length===2&&x(ue[0])&&x(ue[1])?!0:V.value.partialRange&&!i.timePicker?x(ue[0]):!1:!1},me=()=>{ie()&&he()?(ae(),Be()):s("invalid-select",L.value)},pe=ue=>{Re(),ae(),E.value.closeOnAutoApply&&!ue&&Be()},Re=()=>{d.value&&T.value.enabled&&d.value.setParsedDate(L.value)},Oe=(ue=!1)=>{i.autoApply&&w(L.value)&&he()&&(V.value.enabled&&Array.isArray(L.value)?(V.value.partialRange||L.value.length===2)&&pe(ue):pe(ue))},Ve=()=>{T.value.enabled||(L.value=null)},Be=()=>{M.value.enabled||(r.value&&(r.value=!1,ee.value=!1,$(!1),A(!1),D(),s("closed"),Q.value&&te(a.value)),Ve(),s("blur"))},tt=(ue,Ae,De=!1)=>{if(!ue){L.value=null;return}const sn=Array.isArray(ue)?!ue.some(Os=>!x(Os)):x(ue),xn=w(ue);sn&&xn&&(v.value=!0,L.value=ue,Ae&&(_.value=De,me(),s("text-submit")),nn().then(()=>{v.value=!1}))},Je=()=>{i.autoApply&&w(L.value)&&ae(),Re()},mt=()=>r.value?Be():ne(),rn=ue=>{L.value=ue},Hn=()=>{T.value.enabled&&(f.value=!0,P()),s("focus")},ni=()=>{if(T.value.enabled&&(f.value=!1,te(i.modelValue),_.value)){const ue=mI(g.value,m.value);ue?.focus()}s("blur")},Qn=ue=>{u.value&&u.value.updateMonthYear(0,{month:hm(ue.month),year:hm(ue.year)})},Ds=ue=>{te(ue??i.modelValue)},jt=(ue,Ae)=>{var De;(De=u.value)==null||De.switchView(ue,Ae)},se=ue=>E.value.onClickOutside?E.value.onClickOutside(ue):Be(),$e=(ue=0)=>{var Ae;(Ae=u.value)==null||Ae.handleFlow(ue)};return uR(c,d,()=>se(he)),e({closeMenu:Be,selectDate:me,clearValue:J,openMenu:ne,onScroll:j,formatInputValue:P,updateInternalModelValue:rn,setMonthYear:Qn,parseModel:Ds,switchView:jt,toggleMenu:mt,handleFlow:$e,dpWrapMenuRef:c}),(ue,Ae)=>(C(),F("div",{ref_key:"pickerWrapperRef",ref:g,class:Ee(de.value),"data-datepicker-instance":""},[N(rR,Yt({ref_key:"inputRef",ref:d,"input-value":G(Q),"onUpdate:inputValue":Ae[0]||(Ae[0]=De=>Mt(Q)?Q.value=De:null),"is-menu-open":r.value},ue.$props,{onClear:J,onOpen:ne,onSetInputDate:tt,onSetEmptyDate:G(ae),onSelectDate:me,onToggle:mt,onClose:Be,onFocus:Hn,onBlur:ni,onRealBlur:Ae[1]||(Ae[1]=De=>f.value=!1),onTextInput:Ae[2]||(Ae[2]=De=>ue.$emit("text-input",De))}),hn({_:2},[Ke(G(I),(De,sn)=>({name:De,fn:Pe(xn=>[Ie(ue.$slots,De,en(mn(xn)))])}))]),1040,["input-value","is-menu-open","onSetEmptyDate"]),(C(),Se(To(ue.teleport?OA:"div"),en(mn(B.value)),{default:Pe(()=>[N(Et,{name:G(le)(G(H)),css:G(Y)&&!G(M).enabled},{default:Pe(()=>[r.value?(C(),F("div",Yt({key:0,ref_key:"dpWrapMenuRef",ref:c},fe.value,{class:{"dp--menu-wrapper":!G(M).enabled},style:G(M).enabled?void 0:G(Z)}),[N(vm,Yt({ref_key:"dpMenuRef",ref:u},ue.$props,{"internal-model-value":G(L),"onUpdate:internalModelValue":Ae[3]||(Ae[3]=De=>Mt(L)?L.value=De:null),class:{[we.value]:!0,"dp--menu-wrapper":ue.teleport},"open-on-top":G(H),"no-overlay-focus":b.value,collapse:y.value,"get-input-rect":O,"is-text-input-date":v.value,onClosePicker:Be,onSelectDate:me,onAutoApply:Oe,onTimeUpdate:Je,onFlowStep:Ae[4]||(Ae[4]=De=>ue.$emit("flow-step",De)),onUpdateMonthYear:Ae[5]||(Ae[5]=De=>ue.$emit("update-month-year",De)),onInvalidSelect:Ae[6]||(Ae[6]=De=>ue.$emit("invalid-select",G(L))),onAutoApplyInvalid:Ae[7]||(Ae[7]=De=>ue.$emit("invalid-select",De)),onInvalidFixedRange:Ae[8]||(Ae[8]=De=>ue.$emit("invalid-fixed-range",De)),onRecalculatePosition:G(ce),onTooltipOpen:Ae[9]||(Ae[9]=De=>ue.$emit("tooltip-open",De)),onTooltipClose:Ae[10]||(Ae[10]=De=>ue.$emit("tooltip-close",De)),onTimePickerOpen:Ae[11]||(Ae[11]=De=>ue.$emit("time-picker-open",De)),onTimePickerClose:Ae[12]||(Ae[12]=De=>ue.$emit("time-picker-close",De)),onAmPmChange:Ae[13]||(Ae[13]=De=>ue.$emit("am-pm-change",De)),onRangeStart:Ae[14]||(Ae[14]=De=>ue.$emit("range-start",De)),onRangeEnd:Ae[15]||(Ae[15]=De=>ue.$emit("range-end",De)),onDateUpdate:Ae[16]||(Ae[16]=De=>ue.$emit("date-update",De)),onInvalidDate:Ae[17]||(Ae[17]=De=>ue.$emit("invalid-date",De)),onOverlayToggle:Ae[18]||(Ae[18]=De=>ue.$emit("overlay-toggle",De))}),hn({_:2},[Ke(G(R),(De,sn)=>({name:De,fn:Pe(xn=>[Ie(ue.$slots,De,en(mn({...xn})))])}))]),1040,["internal-model-value","class","open-on-top","no-overlay-focus","collapse","is-text-input-date","onRecalculatePosition"])],16)):re("",!0)]),_:3},8,["name","css"])]),_:3},16))],2))}}),Xa=(()=>{const t=dR;return t.install=e=>{e.component("Vue3DatePicker",t)},t})(),hR=Object.freeze(Object.defineProperty({__proto__:null,default:Xa},Symbol.toStringTag,{value:"Module"}));Object.entries(hR).forEach(([t,e])=>{t!=="default"&&(Xa[t]=e)});const fR={name:"newDashboardAPIKey",components:{LocaleText:Ge,VueDatePicker:Xa},data(){return{newKeyData:{ExpiredAt:Cn().add(7,"d").format("YYYY-MM-DD HH:mm:ss"),neverExpire:!1},submitting:!1}},setup(){return{store:Xe()}},mounted(){console.log(this.newKeyData.ExpiredAt)},methods:{submitNewAPIKey(){this.submitting=!0,ht("/api/newDashboardAPIKey",this.newKeyData,t=>{t.status?(this.$emit("created",t.data),this.store.newMessage("Server","API Key created","success"),this.$emit("close")):this.store.newMessage("Server",t.message,"danger"),this.submitting=!1})},fixDate(t){return console.log(Cn(t).format("YYYY-MM-DDTHH:mm:ss")),Cn(t).format("YYYY-MM-DDTHH:mm:ss")},parseTime(t){t?this.newKeyData.ExpiredAt=Cn(t).format("YYYY-MM-DD HH:mm:ss"):this.newKeyData.ExpiredAt=void 0}}},pR={class:"position-absolute w-100 h-100 top-0 start-0 rounded-bottom-3 p-3 d-flex",style:{"background-color":"#00000060","backdrop-filter":"blur(3px)"}},gR={class:"card m-auto rounded-3 mt-5"},mR={class:"card-header bg-transparent d-flex align-items-center gap-2 border-0 p-4 pb-0"},_R={class:"mb-0"},bR={class:"card-body d-flex gap-2 p-4 flex-column"},vR={class:"text-muted"},yR={class:"d-flex align-items-center gap-2"},wR={class:"form-check"},xR=["disabled"],kR={class:"form-check-label",for:"neverExpire"},SR=h("i",{class:"bi bi-emoji-grimace-fill me-2"},null,-1),$R={key:0,class:"bi bi-check-lg me-2"};function AR(t,e,n,s,i,o){const r=ke("LocaleText"),a=ke("VueDatePicker");return C(),F("div",pR,[h("div",gR,[h("div",mR,[h("h6",_R,[N(r,{t:"Create API Key"})]),h("button",{type:"button",class:"btn-close ms-auto",onClick:e[0]||(e[0]=l=>this.$emit("close"))})]),h("div",bR,[h("small",vR,[N(r,{t:"When should this API Key expire?"})]),h("div",yR,[N(a,{is24:!0,"min-date":new Date,"model-value":this.newKeyData.ExpiredAt,"onUpdate:modelValue":this.parseTime,"time-picker-inline":"",format:"yyyy-MM-dd HH:mm:ss","preview-format":"yyyy-MM-dd HH:mm:ss",clearable:!1,disabled:this.newKeyData.neverExpire||this.submitting,dark:this.store.Configuration.Server.dashboard_theme==="dark"},null,8,["min-date","model-value","onUpdate:modelValue","disabled","dark"])]),h("div",wR,[Le(h("input",{class:"form-check-input",type:"checkbox","onUpdate:modelValue":e[1]||(e[1]=l=>this.newKeyData.neverExpire=l),id:"neverExpire",disabled:this.submitting},null,8,xR),[[_n,this.newKeyData.neverExpire]]),h("label",kR,[N(r,{t:"Never Expire"}),He(" ("),SR,N(r,{t:"Don't think that's a good idea"}),He(") ")])]),h("button",{class:Ee(["ms-auto btn bg-success-subtle text-success-emphasis border-1 border-success-subtle rounded-3 shadow-sm",{disabled:this.submitting}]),onClick:e[2]||(e[2]=l=>this.submitNewAPIKey())},[this.submitting?re("",!0):(C(),F("i",$R)),this.submitting?(C(),Se(r,{key:1,t:"Creating..."})):(C(),Se(r,{key:2,t:"Create"}))],2)])])])}const CR=je(fR,[["render",AR]]),ER={name:"dashboardAPIKey",components:{LocaleText:Ge},props:{apiKey:Object},setup(){return{store:Xe()}},data(){return{confirmDelete:!1}},methods:{deleteAPIKey(){ht("/api/deleteDashboardAPIKey",{Key:this.apiKey.Key},t=>{t.status?(this.$emit("deleted",t.data),this.store.newMessage("Server","API Key deleted","success")):this.store.newMessage("Server",t.message,"danger")})}}},xf=t=>(qt("data-v-a76253c8"),t=t(),Gt(),t),TR={class:"card rounded-3 shadow-sm"},PR={key:0,class:"card-body d-flex gap-3 align-items-center apiKey-card-body"},MR={class:"d-flex align-items-center gap-2"},DR={class:"text-muted"},OR={style:{"word-break":"break-all"}},IR={class:"d-flex align-items-center gap-2 ms-auto"},LR={class:"text-muted"},RR=xf(()=>h("i",{class:"bi bi-trash-fill"},null,-1)),NR=[RR],FR={key:0,class:"card-body d-flex gap-3 align-items-center justify-content-end"},BR=xf(()=>h("i",{class:"bi bi-check-lg"},null,-1)),VR=[BR],HR=xf(()=>h("i",{class:"bi bi-x-lg"},null,-1)),jR=[HR];function WR(t,e,n,s,i,o){const r=ke("LocaleText");return C(),F("div",TR,[this.confirmDelete?(C(),F(Me,{key:1},[this.store.getActiveCrossServer()?re("",!0):(C(),F("div",FR,[N(r,{t:"Are you sure to delete this API key?"}),h("a",{role:"button",class:"btn btn-sm bg-success-subtle text-success-emphasis rounded-3",onClick:e[1]||(e[1]=a=>this.deleteAPIKey())},VR),h("a",{role:"button",class:"btn btn-sm bg-secondary-subtle text-secondary-emphasis rounded-3",onClick:e[2]||(e[2]=a=>this.confirmDelete=!1)},jR)]))],64)):(C(),F("div",PR,[h("div",MR,[h("small",DR,[N(r,{t:"Key"})]),h("span",OR,xe(this.apiKey.Key),1)]),h("div",IR,[h("small",LR,[N(r,{t:"Expire At"})]),this.apiKey.ExpiredAt?re("",!0):(C(),Se(r,{key:0,t:"Never Expire"})),h("span",null,xe(this.apiKey.ExpiredAt),1)]),this.store.getActiveCrossServer()?re("",!0):(C(),F("a",{key:0,role:"button",class:"btn btn-sm bg-danger-subtle text-danger-emphasis rounded-3",onClick:e[0]||(e[0]=a=>this.confirmDelete=!0)},NR))]))])}const zR=je(ER,[["render",WR],["__scopeId","data-v-a76253c8"]]),KR={name:"dashboardAPIKeys",components:{LocaleText:Ge,DashboardAPIKey:zR,NewDashboardAPIKey:CR},setup(){return{store:Xe()}},data(){return{value:this.store.Configuration.Server.dashboard_api_key,apiKeys:[],newDashboardAPIKey:!1}},methods:{async toggleDashboardAPIKeys(){await ht("/api/updateDashboardConfigurationItem",{section:"Server",key:"dashboard_api_key",value:this.value},t=>{t.status?(this.store.Configuration.Peers[this.targetData]=this.value,this.store.newMessage("Server",`API Keys function is successfully ${this.value?"enabled":"disabled"}`,"success")):(this.value=this.store.Configuration.Peers[this.targetData],this.store.newMessage("Server",`API Keys function is failed to ${this.value?"enabled":"disabled"}`,"danger"))})}},watch:{value:{immediate:!0,handler(t){t?kt("/api/getDashboardAPIKeys",{},e=>{console.log(e),e.status?this.apiKeys=e.data:(this.apiKeys=[],this.store.newMessage("Server",e.message,"danger"))}):this.apiKeys=[]}}}},YR=t=>(qt("data-v-167c06a6"),t=t(),Gt(),t),UR={class:"card mb-4 shadow rounded-3"},qR={class:"card-header d-flex"},GR={key:0,class:"form-check form-switch ms-auto"},JR={class:"form-check-label",for:"allowAPIKeysSwitch"},XR={key:0,class:"card-body position-relative d-flex flex-column gap-2"},QR=YR(()=>h("i",{class:"bi bi-plus-circle-fill me-2"},null,-1)),ZR={key:1,class:"card",style:{height:"300px"}},e3={class:"card-body d-flex text-muted"},t3={class:"m-auto"},n3={key:2,class:"d-flex flex-column gap-2 position-relative",style:{"min-height":"300px"}};function s3(t,e,n,s,i,o){const r=ke("LocaleText"),a=ke("DashboardAPIKey"),l=ke("NewDashboardAPIKey");return C(),F("div",UR,[h("div",qR,[N(r,{t:"API Keys"}),this.store.getActiveCrossServer()?re("",!0):(C(),F("div",GR,[Le(h("input",{class:"form-check-input",type:"checkbox","onUpdate:modelValue":e[0]||(e[0]=c=>this.value=c),onChange:e[1]||(e[1]=c=>this.toggleDashboardAPIKeys()),role:"switch",id:"allowAPIKeysSwitch"},null,544),[[_n,this.value]]),h("label",JR,[this.value?(C(),Se(r,{key:0,t:"Enabled"})):(C(),Se(r,{key:1,t:"Disabled"}))])]))]),this.value?(C(),F("div",XR,[this.store.getActiveCrossServer()?re("",!0):(C(),F("button",{key:0,class:"ms-auto btn bg-primary-subtle text-primary-emphasis border-1 border-primary-subtle rounded-3 shadow-sm",onClick:e[2]||(e[2]=c=>this.newDashboardAPIKey=!0)},[QR,N(r,{t:"API Key"})])),this.apiKeys.length===0?(C(),F("div",ZR,[h("div",e3,[h("span",t3,[N(r,{t:"No WGDashboard API Key"})])])])):(C(),F("div",n3,[N(Ni,{name:"apiKey"},{default:Pe(()=>[(C(!0),F(Me,null,Ke(this.apiKeys,c=>(C(),Se(a,{apiKey:c,key:c.Key,onDeleted:e[3]||(e[3]=u=>this.apiKeys=u)},null,8,["apiKey"]))),128))]),_:1})])),N(Et,{name:"zoomReversed"},{default:Pe(()=>[this.newDashboardAPIKey?(C(),Se(l,{key:0,onCreated:e[4]||(e[4]=c=>this.apiKeys=c),onClose:e[5]||(e[5]=c=>this.newDashboardAPIKey=!1)})):re("",!0)]),_:1})])):re("",!0)])}const i3=je(KR,[["render",s3],["__scopeId","data-v-167c06a6"]]),o3={name:"accountSettingsMFA",components:{LocaleText:Ge},setup(){const t=Xe(),e=`input_${Es()}`;return{store:t,uuid:e}},data(){return{status:!1}},mounted(){this.status=this.store.Configuration.Account.enable_totp},methods:{async resetMFA(){await ht("/api/updateDashboardConfigurationItem",{section:"Account",key:"totp_verified",value:"false"},async t=>{await ht("/api/updateDashboardConfigurationItem",{section:"Account",key:"enable_totp",value:"false"},e=>{e.status&&this.$router.push("/2FASetup")})})}}},r3={class:"d-flex align-items-center"},a3={class:"form-check form-switch ms-3"},l3=h("i",{class:"bi bi-shield-lock-fill me-2"},null,-1);function c3(t,e,n,s,i,o){const r=ke("LocaleText");return C(),F("div",null,[h("div",r3,[h("strong",null,[N(r,{t:"Multi-Factor Authentication (MFA)"})]),h("div",a3,[Le(h("input",{class:"form-check-input",type:"checkbox","onUpdate:modelValue":e[0]||(e[0]=a=>this.status=a),role:"switch",id:"allowMFAKeysSwitch"},null,512),[[_n,this.status]])]),this.status?(C(),F("button",{key:0,class:"btn bg-warning-subtle text-warning-emphasis border-1 border-warning-subtle ms-auto rounded-3 shadow-sm",onClick:e[1]||(e[1]=a=>this.resetMFA())},[l3,this.store.Configuration.Account.totp_verified?(C(),Se(r,{key:0,t:"Reset"})):(C(),Se(r,{key:1,t:"Setup"})),He(" MFA ")])):re("",!0)])])}const u3=je(o3,[["render",c3]]),d3={name:"dashboardLanguage",components:{LocaleText:Ge},setup(){return{store:Xe()}},data(){return{languages:void 0}},mounted(){kt("/api/locale/available",{},t=>{this.languages=t.data})},methods:{changeLanguage(t){ht("/api/locale/update",{lang_id:t},e=>{e.status?(this.store.Configuration.Server.dashboard_language=t,this.store.Locale=e.data):this.store.newMessage("Server","Dashboard language update failed","danger")})}},computed:{currentLanguage(){let t=this.store.Configuration.Server.dashboard_language;return this.languages.find(e=>e.lang_id===t)}}},h3={class:"card mb-4 shadow rounded-3"},f3={class:"card-header"},p3={class:"card-body d-flex gap-2"},g3={class:"dropdown w-100"},m3=["disabled"],_3={key:1},b3={class:"dropdown-menu rounded-3 shadow",style:{width:"500px"}},v3=["onClick"],y3={class:"me-auto mb-0"},w3={class:"d-block",style:{"font-size":"0.8rem"}},x3={key:0,class:"bi bi-check text-primary fs-5"};function k3(t,e,n,s,i,o){const r=ke("LocaleText");return C(),F("div",h3,[h("p",f3,[N(r,{t:"Dashboard Language"})]),h("div",p3,[h("div",g3,[h("button",{class:"btn bg-primary-subtle text-primary-emphasis dropdown-toggle w-100 rounded-3",disabled:!this.languages,type:"button","data-bs-toggle":"dropdown","aria-expanded":"false"},[this.languages?(C(),F("span",_3,xe(o.currentLanguage?.lang_name_localized),1)):(C(),Se(r,{key:0,t:"Loading..."}))],8,m3),h("ul",b3,[(C(!0),F(Me,null,Ke(this.languages,a=>(C(),F("li",null,[h("a",{class:"dropdown-item d-flex align-items-center",role:"button",onClick:l=>this.changeLanguage(a.lang_id)},[h("p",y3,[He(xe(a.lang_name_localized)+" ",1),h("small",w3,xe(a.lang_name),1)]),o.currentLanguage?.lang_id===a.lang_id?(C(),F("i",x3)):re("",!0)],8,v3)]))),256))])])])])}const S3=je(d3,[["render",k3]]),$3={name:"settings",methods:{ipV46RegexCheck:WM},components:{DashboardLanguage:S3,LocaleText:Ge,AccountSettingsMFA:u3,DashboardAPIKeys:i3,DashboardSettingsInputIPAddressAndPort:t2,DashboardTheme:FD,DashboardSettingsInputWireguardConfigurationPath:PD,AccountSettingsInputPassword:mD,AccountSettingsInputUsername:JM,PeersDefaultSettingsInput:jM},setup(){return{dashboardConfigurationStore:Xe()}}},A3={class:"mt-md-5 mt-3"},C3={class:"container-md"},E3={class:"mb-3 text-body"},T3={class:"card mb-4 shadow rounded-3"},P3={class:"card-header"},M3={class:"card-body"},D3={class:"card mb-4 shadow rounded-3"},O3={class:"card-header"},I3={class:"card-body"},L3={class:"card mb-4 shadow rounded-3"},R3={class:"card-header"},N3={class:"card-body d-flex gap-4 flex-column"},F3=h("hr",{class:"m-0"},null,-1),B3={key:0,class:"m-0"};function V3(t,e,n,s,i,o){const r=ke("LocaleText"),a=ke("DashboardTheme"),l=ke("DashboardLanguage"),c=ke("PeersDefaultSettingsInput"),u=ke("DashboardSettingsInputWireguardConfigurationPath"),d=ke("AccountSettingsInputUsername"),f=ke("AccountSettingsInputPassword"),g=ke("AccountSettingsMFA"),_=ke("DashboardAPIKeys");return C(),F("div",A3,[h("div",C3,[h("h3",E3,[N(r,{t:"Settings"})]),N(a),N(l),h("div",T3,[h("p",P3,[N(r,{t:"Peers Default Settings"})]),h("div",M3,[N(c,{targetData:"peer_global_dns",title:"DNS"}),N(c,{targetData:"peer_endpoint_allowed_ip",title:"Endpoint Allowed IPs"}),N(c,{targetData:"peer_mtu",title:"MTU"}),N(c,{targetData:"peer_keep_alive",title:"Persistent Keepalive"}),N(c,{targetData:"remote_endpoint",title:"Peer Remote Endpoint",warning:!0,warningText:"This will be changed globally, and will be apply to all peer's QR code and configuration file."})])]),h("div",D3,[h("p",O3,[N(r,{t:"WireGuard Configurations Settings"})]),h("div",I3,[N(u,{targetData:"wg_conf_path",title:"Configurations Directory",warning:!0,"warning-text":"Remember to remove / at the end of your path. e.g /etc/wireguard"})])]),h("div",L3,[h("p",R3,[N(r,{t:"WGDashboard Account Settings"})]),h("div",N3,[N(d,{targetData:"username",title:"Username"}),F3,N(f,{targetData:"password"}),this.dashboardConfigurationStore.getActiveCrossServer()?re("",!0):(C(),F("hr",B3)),this.dashboardConfigurationStore.getActiveCrossServer()?re("",!0):(C(),Se(g,{key:1}))])]),N(_)])])}const H3=je($3,[["render",V3]]),j3={name:"setup",components:{LocaleText:Ge},setup(){return{store:Xe()}},data(){return{setup:{username:"",newPassword:"",repeatNewPassword:"",enable_totp:!0},loading:!1,errorMessage:"",done:!1}},computed:{goodToSubmit(){return this.setup.username&&this.setup.newPassword.length>=8&&this.setup.repeatNewPassword.length>=8&&this.setup.newPassword===this.setup.repeatNewPassword}},methods:{submit(){this.loading=!0,ht("/api/Welcome_Finish",this.setup,t=>{t.status?(this.done=!0,this.$router.push("/2FASetup")):(document.querySelectorAll("#createAccount input").forEach(e=>e.classList.add("is-invalid")),this.errorMessage=t.message,document.querySelector(".login-container-fluid").scrollTo({top:0,left:0,behavior:"smooth"})),this.loading=!1})}}},W3=["data-bs-theme"],z3={class:"m-auto text-body",style:{width:"500px"}},K3={class:"dashboardLogo display-4"},Y3={class:"mb-5"},U3={key:0,class:"alert alert-danger"},q3={class:"d-flex flex-column gap-3"},G3={id:"createAccount",class:"d-flex flex-column gap-2"},J3={class:"form-group text-body"},X3={for:"username",class:"mb-1 text-muted"},Q3={class:"form-group text-body"},Z3={for:"password",class:"mb-1 text-muted"},eN={class:"form-group text-body"},tN={for:"confirmPassword",class:"mb-1 text-muted"},nN=["disabled"],sN={key:0,class:"d-flex align-items-center w-100"},iN=h("i",{class:"bi bi-chevron-right ms-auto"},null,-1),oN={key:1,class:"d-flex align-items-center w-100"},rN=h("span",{class:"spinner-border ms-auto spinner-border-sm",role:"status"},[h("span",{class:"visually-hidden"},"Loading...")],-1);function aN(t,e,n,s,i,o){const r=ke("LocaleText");return C(),F("div",{class:"container-fluid login-container-fluid d-flex main pt-5 overflow-scroll","data-bs-theme":this.store.Configuration.Server.dashboard_theme},[h("div",z3,[h("span",K3,[N(r,{t:"Nice to meet you!"})]),h("p",Y3,[N(r,{t:"Please fill in the following fields to finish setup"}),He(" 😊")]),h("div",null,[h("h3",null,[N(r,{t:"Create an account"})]),this.errorMessage?(C(),F("div",U3,xe(this.errorMessage),1)):re("",!0),h("div",q3,[h("form",G3,[h("div",J3,[h("label",X3,[h("small",null,[N(r,{t:"Enter an username you like"})])]),Le(h("input",{type:"text",autocomplete:"username","onUpdate:modelValue":e[0]||(e[0]=a=>this.setup.username=a),class:"form-control",id:"username",name:"username",required:""},null,512),[[We,this.setup.username]])]),h("div",Q3,[h("label",Z3,[h("small",null,[N(r,{t:"Enter a password"}),h("code",null,[N(r,{t:"(At least 8 characters and make sure is strong enough!)"})])])]),Le(h("input",{type:"password",autocomplete:"new-password","onUpdate:modelValue":e[1]||(e[1]=a=>this.setup.newPassword=a),class:"form-control",id:"password",name:"password",required:""},null,512),[[We,this.setup.newPassword]])]),h("div",eN,[h("label",tN,[h("small",null,[N(r,{t:"Confirm password"})])]),Le(h("input",{type:"password",autocomplete:"confirm-new-password","onUpdate:modelValue":e[2]||(e[2]=a=>this.setup.repeatNewPassword=a),class:"form-control",id:"confirmPassword",name:"confirmPassword",required:""},null,512),[[We,this.setup.repeatNewPassword]])])]),h("button",{class:"btn btn-dark btn-lg mb-5 d-flex btn-brand shadow align-items-center",ref:"signInBtn",disabled:!this.goodToSubmit||this.loading||this.done,onClick:e[3]||(e[3]=a=>this.submit())},[!this.loading&&!this.done?(C(),F("span",sN,[N(r,{t:"Next"}),iN])):(C(),F("span",oN,[N(r,{t:"Saving..."}),rN]))],8,nN)])])])],8,W3)}const lN=je(j3,[["render",aN]]);function kf(t){return t.includes(":")?6:t.includes(".")?4:0}function cN(t){const e=kf(t);if(!e)throw new Error(`Invalid IP address: ${t}`);let n=0n,s=0n;const i=Object.create(null);if(e===4)for(const o of t.split(".").map(BigInt).reverse())n+=o*2n**s,s+=8n;else{if(t.includes(".")&&(i.ipv4mapped=!0,t=t.split(":").map(a=>{if(a.includes(".")){const[l,c,u,d]=a.split(".").map(f=>Number(f).toString(16).padStart(2,"0"));return`${l}${c}:${u}${d}`}else return a}).join(":")),t.includes("%")){let a;[,t,a]=/(.+)%(.+)/.exec(t),i.scopeid=a}const o=t.split(":"),r=o.indexOf("");if(r!==-1)for(;o.length<8;)o.splice(r,0,"");for(const a of o.map(l=>BigInt(parseInt(l||0,16))).reverse())n+=a*2n**s,s+=16n}return i.number=n,i.version=e,i}const ym={4:32,6:128},uN=t=>t.includes("/")?kf(t):0;function dN(t){const e=uN(t),n=Object.create(null);if(n.single=!1,e)n.cidr=t,n.version=e;else{const d=kf(t);if(d)n.cidr=`${t}/${ym[d]}`,n.version=d,n.single=!0;else throw new Error(`Network is not a CIDR or IP: ${t}`)}const[s,i]=n.cidr.split("/");n.prefix=i;const{number:o,version:r}=cN(s),a=ym[r],l=o.toString(2).padStart(a,"0"),c=Number(a-i),u=l.substring(0,a-c);return n.start=BigInt(`0b${u}${"0".repeat(c)}`),n.end=BigInt(`0b${u}${"1".repeat(c)}`),n}/*! SPDX-License-Identifier: GPL-2.0 +`.replace(/\s*\/\/.*$/gm,"").replace(/\n/g,"").trim(),rL=new RegExp(`(?:^${ts}$)|(?:^${gf}$)`),oL=new RegExp(`^${ts}$`),aL=new RegExp(`^${gf}$`),pf=t=>t&&t.exact?rL:new RegExp(`(?:${Hr(t)}${ts}${Hr(t)})|(?:${Hr(t)}${gf}${Hr(t)})`,"g");pf.v4=t=>t&&t.exact?oL:new RegExp(`${Hr(t)}${ts}${Hr(t)}`,"g");pf.v6=t=>t&&t.exact?aL:new RegExp(`${Hr(t)}${gf}${Hr(t)}`,"g");const _S={exact:!1},yS=`${pf.v4().source}\\/(3[0-2]|[12]?[0-9])`,vS=`${pf.v6().source}\\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])`,lL=new RegExp(`^${yS}$`),cL=new RegExp(`^${vS}$`),uL=({exact:t}=_S)=>t?lL:new RegExp(yS,"g"),dL=({exact:t}=_S)=>t?cL:new RegExp(vS,"g"),bS=uL({exact:!0}),wS=dL({exact:!0}),T_=t=>bS.test(t)?4:wS.test(t)?6:0;T_.v4=t=>bS.test(t);T_.v6=t=>wS.test(t);const Tt=t=>{const e=st();if(e.Locale===null)return t;const i=Object.keys(e.Locale).filter(s=>t.match(new RegExp("^"+s+"$","gi"))!==null);return i.length===0||i.length>1?t:t.replace(new RegExp(i[0],"gi"),e.Locale[i[0]])},vi=x_("WireguardConfigurationsStore",{state:()=>({Configurations:void 0,searchString:"",ConfigurationListInterval:void 0,PeerScheduleJobs:{dropdowns:{Field:[{display:Tt("Total Received"),value:"total_receive",unit:"GB",type:"number"},{display:Tt("Total Sent"),value:"total_sent",unit:"GB",type:"number"},{display:Tt("Total Usage"),value:"total_data",unit:"GB",type:"number"},{display:Tt("Date"),value:"date",type:"date"}],Operator:[{display:Tt("larger than"),value:"lgt"}],Action:[{display:Tt("Restrict Peer"),value:"restrict"},{display:Tt("Delete Peer"),value:"delete"}]}}}),actions:{async getConfigurations(){await Vt("/api/getWireguardConfigurations",{},t=>{t.status&&(this.Configurations=t.data)})},regexCheckIP(t){return/((^\s*((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5]))\s*$)|(^\s*((([0-9A-Fa-f]{1,4}:){7}([0-9A-Fa-f]{1,4}|:))|(([0-9A-Fa-f]{1,4}:){6}(:[0-9A-Fa-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9A-Fa-f]{1,4}:){5}(((:[0-9A-Fa-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9A-Fa-f]{1,4}:){4}(((:[0-9A-Fa-f]{1,4}){1,3})|((:[0-9A-Fa-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){3}(((:[0-9A-Fa-f]{1,4}){1,4})|((:[0-9A-Fa-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){2}(((:[0-9A-Fa-f]{1,4}){1,5})|((:[0-9A-Fa-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){1}(((:[0-9A-Fa-f]{1,4}){1,6})|((:[0-9A-Fa-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9A-Fa-f]{1,4}){1,7})|((:[0-9A-Fa-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))(%.+)?\s*$))/.test(t)},checkCIDR(t){return T_(t)!==0}}}),Ye=(t,e)=>{const n=t.__vccOpts||t;for(const[i,s]of e)n[i]=s;return n},hL={name:"localeText",props:{t:""},computed:{getLocaleText(){return Tt(this.t)}}};function fL(t,e,n,i,s,r){return Ee(this.getLocaleText)}const Qe=Ye(hL,[["render",fL]]),gL={name:"navbar",components:{LocaleText:Qe},setup(){const t=vi(),e=st();return{wireguardConfigurationsStore:t,dashboardConfigurationStore:e}},data(){return{updateAvailable:!1,updateMessage:"Checking for update...",updateUrl:""}},mounted(){Vt("/api/getDashboardUpdate",{},t=>{t.status?(t.data&&(this.updateAvailable=!0,this.updateUrl=t.data),this.updateMessage=t.message):(this.updateMessage=Tt("Failed to check available update"),console.log(`Failed to get update: ${t.message}`))})}},po=t=>(bn("data-v-c16dfe93"),t=t(),wn(),t),pL=["data-bs-theme"],mL={id:"sidebarMenu",class:"bg-body-tertiary sidebar border h-100 rounded-3 shadow overflow-y-scroll"},_L={class:"sidebar-sticky pt-3"},yL={class:"nav flex-column px-2"},vL={class:"nav-item"},bL=po(()=>g("i",{class:"bi bi-house me-2"},null,-1)),wL={class:"nav-item"},xL=po(()=>g("i",{class:"bi bi-gear me-2"},null,-1)),EL=po(()=>g("hr",{class:"text-body"},null,-1)),SL={class:"sidebar-heading px-3 mt-4 mb-1 text-muted text-center"},CL=po(()=>g("i",{class:"bi bi-body-text me-2"},null,-1)),TL={class:"nav flex-column px-2"},kL={class:"nav-item"},AL=po(()=>g("hr",{class:"text-body"},null,-1)),ML={class:"sidebar-heading px-3 mt-4 mb-1 text-muted text-center"},IL=po(()=>g("i",{class:"bi bi-tools me-2"},null,-1)),PL={class:"nav flex-column px-2"},RL={class:"nav-item"},DL={class:"nav-item"},$L=po(()=>g("hr",{class:"text-body"},null,-1)),LL={class:"nav flex-column px-2"},OL={class:"nav-item"},NL=po(()=>g("i",{class:"bi bi-box-arrow-left me-2"},null,-1)),FL={class:"nav-item",style:{"font-size":"0.8rem"}},BL=["href"],VL={class:"nav-link text-muted rounded-3"},zL={key:1,class:"nav-link text-muted rounded-3"};function WL(t,e,n,i,s,r){const o=Se("LocaleText"),a=Se("RouterLink");return D(),V("div",{class:Ie(["col-md-3 col-lg-2 d-md-block p-3 navbar-container",{active:this.dashboardConfigurationStore.ShowNavBar}]),"data-bs-theme":i.dashboardConfigurationStore.Configuration.Server.dashboard_theme,style:{height:"calc(-50px + 100vh)"}},[g("nav",mL,[g("div",_L,[g("ul",yL,[g("li",vL,[B(a,{class:"nav-link rounded-3",to:"/","exact-active-class":"active"},{default:Re(()=>[bL,B(o,{t:"Home"})]),_:1})]),g("li",wL,[B(a,{class:"nav-link rounded-3",to:"/settings","exact-active-class":"active"},{default:Re(()=>[xL,B(o,{t:"Settings"})]),_:1})])]),EL,g("h6",SL,[CL,B(o,{t:"WireGuard Configurations"})]),g("ul",TL,[g("li",kL,[(D(!0),V($e,null,Xe(this.wireguardConfigurationsStore.Configurations,l=>(D(),Ce(a,{to:"/configuration/"+l.Name+"/peers",class:"nav-link nav-conf-link rounded-3","active-class":"active"},{default:Re(()=>[g("span",{class:Ie(["dot me-2",{active:l.Status}])},null,2),He(" "+Ee(l.Name),1)]),_:2},1032,["to"]))),256))])]),AL,g("h6",ML,[IL,B(o,{t:"Tools"})]),g("ul",PL,[g("li",RL,[B(a,{to:"/ping",class:"nav-link rounded-3","active-class":"active"},{default:Re(()=>[He("Ping")]),_:1})]),g("li",DL,[B(a,{to:"/traceroute",class:"nav-link rounded-3","active-class":"active"},{default:Re(()=>[He("Traceroute")]),_:1})])]),$L,g("ul",LL,[g("li",OL,[g("a",{class:"nav-link text-danger rounded-3",onClick:e[0]||(e[0]=l=>this.dashboardConfigurationStore.signOut()),role:"button",style:{"font-weight":"bold"}},[NL,B(o,{t:"Sign Out"})])]),g("li",FL,[this.updateAvailable?(D(),V("a",{key:0,href:this.updateUrl,class:"text-decoration-none rounded-3",target:"_blank"},[g("small",VL,[B(o,{t:this.updateMessage},null,8,["t"]),He(" ("),B(o,{t:"Current Version:"}),He(" "+Ee(i.dashboardConfigurationStore.Configuration.Server.version)+") ",1)])],8,BL)):(D(),V("small",zL,[B(o,{t:this.updateMessage},null,8,["t"]),He(" ("+Ee(i.dashboardConfigurationStore.Configuration.Server.version)+") ",1)]))])])])])],10,pL)}const HL=Ye(gL,[["render",WL],["__scopeId","data-v-c16dfe93"]]),YL={name:"message",components:{LocaleText:Qe},props:{message:Object},mounted(){setTimeout(()=>{this.message.show=!1},5e3)}},jL=["id"],KL={class:"card-body"},UL={class:"fw-bold d-block",style:{"text-transform":"uppercase"}};function GL(t,e,n,i,s,r){const o=Se("LocaleText");return D(),V("div",{class:Ie(["card shadow rounded-3 position-relative mb-2",{"text-bg-danger":this.message.type==="danger","text-bg-success":this.message.type==="success","text-bg-warning":this.message.type==="warning"}]),id:this.message.id,style:{width:"400px"}},[g("div",KL,[g("small",UL,[B(o,{t:"FROM "}),He(" "+Ee(this.message.from),1)]),He(" "+Ee(this.message.content),1)])],10,jL)}const xS=Ye(YL,[["render",GL]]),XL={name:"index",components:{Message:xS,Navbar:HL},async setup(){return{dashboardConfigurationStore:st()}},computed:{getMessages(){return this.dashboardConfigurationStore.Messages.filter(t=>t.show)}}},qL=["data-bs-theme"],ZL={class:"row h-100"},JL={class:"col-md-9 ml-sm-auto col-lg-10 px-md-4 overflow-y-scroll mb-0",style:{height:"calc(100vh - 50px)"}},QL={class:"messageCentre text-body position-fixed"};function eO(t,e,n,i,s,r){const o=Se("Navbar"),a=Se("RouterView"),l=Se("Message");return D(),V("div",{class:"container-fluid flex-grow-1 main","data-bs-theme":this.dashboardConfigurationStore.Configuration.Server.dashboard_theme},[g("div",ZL,[B(o),g("main",JL,[(D(),Ce(f_,null,{default:Re(()=>[B(a,null,{default:Re(({Component:c})=>[B(Rt,{name:"fade2",mode:"out-in"},{default:Re(()=>[(D(),Ce(ga(c)))]),_:2},1024)]),_:1})]),_:1})),g("div",QL,[B(jl,{name:"message",tag:"div",class:"position-relative"},{default:Re(()=>[(D(!0),V($e,null,Xe(r.getMessages.slice().reverse(),c=>(D(),Ce(l,{message:c,key:c.id},null,8,["message"]))),128))]),_:1})])])])],8,qL)}const tO=Ye(XL,[["render",eO],["__scopeId","data-v-b776d181"]]);var ES={exports:{}};(function(t,e){(function(n,i){t.exports=i()})(lx,function(){var n=1e3,i=6e4,s=36e5,r="millisecond",o="second",a="minute",l="hour",c="day",u="week",d="month",h="quarter",f="year",p="date",m="Invalid Date",y=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,v=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,b={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(N){var L=["th","st","nd","rd"],I=N%100;return"["+N+(L[(I-20)%10]||L[I]||L[0])+"]"}},E=function(N,L,I){var W=String(N);return!W||W.length>=L?N:""+Array(L+1-W.length).join(I)+N},C={s:E,z:function(N){var L=-N.utcOffset(),I=Math.abs(L),W=Math.floor(I/60),X=I%60;return(L<=0?"+":"-")+E(W,2,"0")+":"+E(X,2,"0")},m:function N(L,I){if(L.date()1)return N(ne[0])}else{var ue=L.name;x[ue]=L,X=ue}return!W&&X&&(w=X),X||!W&&w},P=function(N,L){if(k(N))return N.clone();var I=typeof L=="object"?L:{};return I.date=N,I.args=arguments,new H(I)},F=C;F.l=A,F.i=k,F.w=function(N,L){return P(N,{locale:L.$L,utc:L.$u,x:L.$x,$offset:L.$offset})};var H=function(){function N(I){this.$L=A(I.locale,null,!0),this.parse(I),this.$x=this.$x||I.x||{},this[T]=!0}var L=N.prototype;return L.parse=function(I){this.$d=function(W){var X=W.date,J=W.utc;if(X===null)return new Date(NaN);if(F.u(X))return new Date;if(X instanceof Date)return new Date(X);if(typeof X=="string"&&!/Z$/i.test(X)){var ne=X.match(y);if(ne){var ue=ne[2]-1||0,Y=(ne[7]||"0").substring(0,3);return J?new Date(Date.UTC(ne[1],ue,ne[3]||1,ne[4]||0,ne[5]||0,ne[6]||0,Y)):new Date(ne[1],ue,ne[3]||1,ne[4]||0,ne[5]||0,ne[6]||0,Y)}}return new Date(X)}(I),this.init()},L.init=function(){var I=this.$d;this.$y=I.getFullYear(),this.$M=I.getMonth(),this.$D=I.getDate(),this.$W=I.getDay(),this.$H=I.getHours(),this.$m=I.getMinutes(),this.$s=I.getSeconds(),this.$ms=I.getMilliseconds()},L.$utils=function(){return F},L.isValid=function(){return this.$d.toString()!==m},L.isSame=function(I,W){var X=P(I);return this.startOf(W)<=X&&X<=this.endOf(W)},L.isAfter=function(I,W){return P(I){if(t.status===200)return t.json();throw new Error(t.statusText)}).then(()=>{this.endTime=pi(),this.active=!0}).catch(t=>{this.active=!1,this.errorMsg=t}),this.refreshing=!1)},async connect(){await fetch(`${this.server.host}/api/authenticate`,{headers:{"content-type":"application/json","wg-dashboard-apikey":this.server.apiKey},body:JSON.stringify({host:window.location.hostname}),method:"POST",signal:AbortSignal.timeout(5e3)}).then(t=>t.json()).then(t=>{this.$emit("setActiveServer"),this.$router.push("/")})}},mounted(){this.handshake()},computed:{getHandshakeTime(){return this.startTime&&this.endTime?`${pi().subtract(this.startTime).millisecond()}ms`:this.refreshing?Tt("Pinging..."):this.errorMsg?this.errorMsg:"N/A"}}},Kl=t=>(bn("data-v-ed7817c7"),t=t(),wn(),t),sO={class:"card rounded-3"},rO={class:"card-body"},oO={class:"d-flex gap-3 w-100 remoteServerContainer"},aO={class:"d-flex gap-3 align-items-center flex-grow-1"},lO=Kl(()=>g("i",{class:"bi bi-server"},null,-1)),cO={class:"d-flex gap-3 align-items-center flex-grow-1"},uO=Kl(()=>g("i",{class:"bi bi-key-fill"},null,-1)),dO={class:"d-flex gap-2 button-group"},hO=Kl(()=>g("i",{class:"bi bi-trash"},null,-1)),fO=[hO],gO=Kl(()=>g("i",{class:"bi bi-arrow-right-circle"},null,-1)),pO=[gO],mO={class:"card-footer gap-2 d-flex align-items-center"},_O={key:0,class:"spin ms-auto text-primary-emphasis"},yO=Kl(()=>g("i",{class:"bi bi-arrow-clockwise"},null,-1)),vO=[yO],bO=Kl(()=>g("i",{class:"bi bi-arrow-clockwise me"},null,-1)),wO=[bO];function xO(t,e,n,i,s,r){return D(),V("div",sO,[g("div",rO,[g("div",oO,[g("div",aO,[lO,Ne(g("input",{class:"form-control form-control-sm",onBlur:e[0]||(e[0]=o=>this.handshake()),"onUpdate:modelValue":e[1]||(e[1]=o=>this.server.host=o),type:"url"},null,544),[[Ke,this.server.host]])]),g("div",cO,[uO,Ne(g("input",{class:"form-control form-control-sm",onBlur:e[2]||(e[2]=o=>this.handshake()),"onUpdate:modelValue":e[3]||(e[3]=o=>this.server.apiKey=o),type:"text"},null,544),[[Ke,this.server.apiKey]])]),g("div",dO,[g("button",{onClick:e[4]||(e[4]=o=>this.$emit("delete")),class:"ms-auto btn btn-sm bg-danger-subtle text-danger-emphasis border-1 border-danger-subtle"},fO),g("button",{onClick:e[5]||(e[5]=o=>this.connect()),class:Ie([{disabled:!this.active},"ms-auto btn btn-sm bg-success-subtle text-success-emphasis border-1 border-success-subtle"])},pO,2)])])]),g("div",mO,[g("span",{class:Ie(["dot ms-0 me-2",[this.active?"active":"inactive"]])},null,2),g("small",null,Ee(this.getHandshakeTime),1),this.refreshing?(D(),V("div",_O,vO)):(D(),V("a",{key:1,role:"button",onClick:e[6]||(e[6]=o=>this.handshake()),class:"text-primary-emphasis text-decoration-none ms-auto disabled"},wO))])])}const EO=Ye(iO,[["render",xO],["__scopeId","data-v-ed7817c7"]]),SO={name:"RemoteServerList",setup(){return{store:st()}},components:{LocaleText:Qe,RemoteServer:EO}},CO={class:"w-100 mt-3"},TO={class:"d-flex align-items-center mb-3"},kO={class:"mb-0"},AO=g("i",{class:"bi bi-plus-circle-fill me-2"},null,-1),MO={class:"w-100 d-flex gap-3 flex-column p-3 border border-1 border-secondary-subtle rounded-3",style:{height:"400px","overflow-y":"scroll"}},IO={key:0,class:"text-muted m-auto"},PO=g("i",{class:"bi bi-plus-circle-fill mx-1"},null,-1);function RO(t,e,n,i,s,r){const o=Se("LocaleText"),a=Se("RemoteServer");return D(),V("div",CO,[g("div",TO,[g("h5",kO,[B(o,{t:"Server List"})]),g("button",{onClick:e[0]||(e[0]=l=>this.store.addCrossServerConfiguration()),class:"btn bg-primary-subtle text-primary-emphasis border-1 border-primary-subtle shadow-sm ms-auto"},[AO,B(o,{t:"Server"})])]),g("div",MO,[(D(!0),V($e,null,Xe(this.store.CrossServerConfiguration.ServerList,(l,c)=>(D(),Ce(a,{onSetActiveServer:u=>this.store.setActiveCrossServer(c),onDelete:u=>this.store.deleteCrossServerConfiguration(c),key:c,server:l},null,8,["onSetActiveServer","onDelete","server"]))),128)),Object.keys(this.store.CrossServerConfiguration.ServerList).length===0?(D(),V("h6",IO,[B(o,{t:"Click"}),PO,B(o,{t:"to add your server"})])):ce("",!0)])])}const DO=Ye(SO,[["render",RO]]),$O={name:"signInInput",methods:{GetLocale:Tt},props:{id:"",data:"",type:"",placeholder:""},computed:{getLocaleText(){return Tt(this.placeholder)}}},LO=["type","id","name","placeholder"];function OO(t,e,n,i,s,r){return Ne((D(),V("input",{type:n.type,"onUpdate:modelValue":e[0]||(e[0]=o=>this.data[this.id]=o),class:"form-control",id:this.id,name:this.id,autocomplete:"on",placeholder:this.getLocaleText,required:""},null,8,LO)),[[QE,this.data[this.id]]])}const NO=Ye($O,[["render",OO]]),FO={name:"signInTOTP",methods:{GetLocale:Tt},props:{data:""},computed:{getLocaleText(){return Tt("OTP from your authenticator")}}},BO=["placeholder"];function VO(t,e,n,i,s,r){return Ne((D(),V("input",{class:"form-control totp",required:"",id:"totp",maxlength:"6",type:"text",inputmode:"numeric",autocomplete:"one-time-code",placeholder:this.getLocaleText,"onUpdate:modelValue":e[0]||(e[0]=o=>this.data.totp=o)},null,8,BO)),[[Ke,this.data.totp]])}const zO=Ye(FO,[["render",VO]]),WO={name:"signin",components:{SignInTOTP:zO,SignInInput:NO,LocaleText:Qe,RemoteServerList:DO,Message:xS},async setup(){const t=st();let e="dark",n=!1,i;return t.IsElectronApp||await Promise.all([Vt("/api/getDashboardTheme",{},s=>{e=s.data}),Vt("/api/isTotpEnabled",{},s=>{n=s.data}),Vt("/api/getDashboardVersion",{},s=>{i=s.data})]),t.removeActiveCrossServer(),{store:t,theme:e,totpEnabled:n,version:i}},data(){return{data:{username:"",password:"",totp:""},loginError:!1,loginErrorMessage:"",loading:!1}},computed:{getMessages(){return this.store.Messages.filter(t=>t.show)},applyLocale(t){return Tt(t)}},methods:{GetLocale:Tt,async auth(){this.data.username&&this.data.password&&(this.totpEnabled&&this.data.totp||!this.totpEnabled)?(this.loading=!0,await kt("/api/authenticate",this.data,t=>{t.status?(this.loginError=!1,this.$refs.signInBtn.classList.add("signedIn"),t.message?this.$router.push("/welcome"):this.store.Redirect!==void 0?this.$router.push(this.store.Redirect):this.$router.push("/")):(this.loginError=!0,this.loginErrorMessage=t.message,document.querySelectorAll("input[required]").forEach(e=>{e.classList.remove("is-valid"),e.classList.add("is-invalid")}),this.loading=!1)})):document.querySelectorAll("input[required]").forEach(t=>{t.value.length===0?(t.classList.remove("is-valid"),t.classList.add("is-invalid")):(t.classList.remove("is-invalid"),t.classList.add("is-valid"))})}}},ma=t=>(bn("data-v-2fa13e60"),t=t(),wn(),t),HO=["data-bs-theme"],YO={class:"login-box m-auto"},jO={class:"m-auto",style:{width:"700px"}},KO={class:"mb-0 text-body"},UO=ma(()=>g("span",{class:"dashboardLogo display-3"},[g("strong",null,"WGDashboard")],-1)),GO={key:0,class:"alert alert-danger mt-2 mb-0",role:"alert"},XO={class:"form-group text-body"},qO=ma(()=>g("label",{for:"username",class:"text-left",style:{"font-size":"1rem"}},[g("i",{class:"bi bi-person-circle"})],-1)),ZO={class:"form-group text-body"},JO=ma(()=>g("label",{for:"password",class:"text-left",style:{"font-size":"1rem"}},[g("i",{class:"bi bi-key-fill"})],-1)),QO={key:0,class:"form-group text-body"},eN=ma(()=>g("label",{for:"totp",class:"text-left",style:{"font-size":"1rem"}},[g("i",{class:"bi bi-lock-fill"})],-1)),tN={class:"btn btn-lg btn-dark ms-auto mt-4 w-100 d-flex btn-brand signInBtn",ref:"signInBtn"},nN={key:0,class:"d-flex w-100"},iN=ma(()=>g("i",{class:"ms-auto bi bi-chevron-right"},null,-1)),sN={key:1,class:"d-flex w-100 align-items-center"},rN=ma(()=>g("span",{class:"spinner-border ms-auto spinner-border-sm",role:"status"},null,-1)),oN={key:3,class:"d-flex mt-3"},aN={class:"form-check form-switch ms-auto"},lN={class:"form-check-label",for:"flexSwitchCheckChecked"},cN={class:"text-muted pb-3 d-block w-100 text-center mt-3"},uN=ma(()=>g("a",{href:"https://github.com/donaldzou",target:"_blank"},[g("strong",null,"Donald Zou")],-1)),dN={class:"messageCentre text-body position-absolute end-0 m-3"};function hN(t,e,n,i,s,r){const o=Se("LocaleText"),a=Se("SignInInput"),l=Se("SignInTOTP"),c=Se("RemoteServerList"),u=Se("Message");return D(),V("div",{class:"container-fluid login-container-fluid d-flex main flex-column py-4 text-body",style:{"overflow-y":"scroll"},"data-bs-theme":this.theme},[g("div",YO,[g("div",jO,[g("h4",KO,[B(o,{t:"Welcome to"})]),UO,s.loginError?(D(),V("div",GO,[B(o,{t:this.loginErrorMessage},null,8,["t"])])):ce("",!0),this.store.CrossServerConfiguration.Enable?(D(),Ce(c,{key:2})):(D(),V("form",{key:1,onSubmit:e[0]||(e[0]=d=>{d.preventDefault(),this.auth()})},[g("div",XO,[qO,B(a,{id:"username",data:this.data,type:"text",placeholder:"Username"},null,8,["data"])]),g("div",ZO,[JO,B(a,{id:"password",data:this.data,type:"password",placeholder:"Password"},null,8,["data"])]),i.totpEnabled?(D(),V("div",QO,[eN,B(l,{data:this.data},null,8,["data"])])):ce("",!0),g("button",tN,[this.loading?(D(),V("span",sN,[B(o,{t:"Signing In..."}),rN])):(D(),V("span",nN,[B(o,{t:"Sign In"}),iN]))],512)],32)),this.store.IsElectronApp?ce("",!0):(D(),V("div",oN,[g("div",aN,[Ne(g("input",{"onUpdate:modelValue":e[1]||(e[1]=d=>this.store.CrossServerConfiguration.Enable=d),class:"form-check-input",type:"checkbox",role:"switch",id:"flexSwitchCheckChecked"},null,512),[[Jn,this.store.CrossServerConfiguration.Enable]]),g("label",lN,[B(o,{t:"Access Remote Server"})])])]))])]),g("small",cN,[He(" WGDashboard "+Ee(this.version)+" | Developed with ❤️ by ",1),uN]),g("div",dN,[B(jl,{name:"message",tag:"div",class:"position-relative"},{default:Re(()=>[(D(!0),V($e,null,Xe(r.getMessages.slice().reverse(),d=>(D(),Ce(u,{message:d,key:d.id},null,8,["message"]))),128))]),_:1})])],8,HO)}const fN=Ye(WO,[["render",hN],["__scopeId","data-v-2fa13e60"]]),gN={name:"configurationCard",components:{LocaleText:Qe},props:{c:{Name:String,Status:Boolean,PublicKey:String,PrivateKey:String}},data(){return{configurationToggling:!1}},setup(){return{dashboardConfigurationStore:st()}},methods:{toggle(){this.configurationToggling=!0,Vt("/api/toggleWireguardConfiguration/",{configurationName:this.c.Name},t=>{t.status?this.dashboardConfigurationStore.newMessage("Server",`${this.c.Name} ${t.data?"is on":"is off"}`):this.dashboardConfigurationStore.newMessage("Server",t.message,"danger"),this.c.Status=t.data,this.configurationToggling=!1})}}},pN={class:"card conf_card rounded-3 shadow text-decoration-none"},mN={class:"mb-0"},_N={class:"card-title mb-0"},yN=g("h6",{class:"mb-0 ms-auto"},[g("i",{class:"bi bi-chevron-right"})],-1),vN={class:"card-footer d-flex gap-2 flex-column"},bN={class:"row"},wN={class:"col-6 col-md-3"},xN=g("i",{class:"bi bi-arrow-down-up me-2"},null,-1),EN={class:"text-primary-emphasis col-6 col-md-3"},SN=g("i",{class:"bi bi-arrow-down me-2"},null,-1),CN={class:"text-success-emphasis col-6 col-md-3"},TN=g("i",{class:"bi bi-arrow-up me-2"},null,-1),kN={class:"text-md-end col-6 col-md-3"},AN={class:"d-flex align-items-center gap-2"},MN={class:"text-muted"},IN={style:{"word-break":"keep-all"}},PN={class:"mb-0 d-block d-lg-inline-block"},RN={style:{"line-break":"anywhere"}},DN={class:"form-check form-switch ms-auto"},$N=["for"],LN={key:4,class:"spinner-border spinner-border-sm ms-2","aria-hidden":"true"},ON=["disabled","id"];function NN(t,e,n,i,s,r){const o=Se("RouterLink"),a=Se("LocaleText");return D(),V("div",pN,[B(o,{to:"/configuration/"+n.c.Name+"/peers",class:"card-body d-flex align-items-center gap-3 flex-wrap text-decoration-none"},{default:Re(()=>[g("h6",mN,[g("span",{class:Ie(["dot",{active:n.c.Status}])},null,2)]),g("h6",_N,[g("samp",null,Ee(n.c.Name),1)]),yN]),_:1},8,["to"]),g("div",vN,[g("div",bN,[g("small",wN,[xN,He(Ee(n.c.DataUsage.Total>0?n.c.DataUsage.Total.toFixed(4):0)+" GB ",1)]),g("small",EN,[SN,He(Ee(n.c.DataUsage.Receive>0?n.c.DataUsage.Receive.toFixed(4):0)+" GB ",1)]),g("small",CN,[TN,He(Ee(n.c.DataUsage.Sent>0?n.c.DataUsage.Sent.toFixed(4):0)+" GB ",1)]),g("small",kN,[g("span",{class:Ie(["dot me-2",{active:n.c.ConnectedPeers>0}])},null,2),He(Ee(n.c.ConnectedPeers)+" ",1),B(a,{t:"Peers"})])]),g("div",AN,[g("small",MN,[g("strong",IN,[B(a,{t:"Public Key"})])]),g("small",PN,[g("samp",RN,Ee(n.c.PublicKey),1)]),g("div",DN,[g("label",{class:"form-check-label",style:{cursor:"pointer"},for:"switch"+n.c.PrivateKey},[!n.c.Status&&this.configurationToggling?(D(),Ce(a,{key:0,t:"Turning Off..."})):n.c.Status&&this.configurationToggling?(D(),Ce(a,{key:1,t:"Turning On..."})):n.c.Status&&!this.configurationToggling?(D(),Ce(a,{key:2,t:"On"})):!n.c.Status&&!this.configurationToggling?(D(),Ce(a,{key:3,t:"Off"})):ce("",!0),this.configurationToggling?(D(),V("span",LN)):ce("",!0)],8,$N),Ne(g("input",{class:"form-check-input",style:{cursor:"pointer"},disabled:this.configurationToggling,type:"checkbox",role:"switch",id:"switch"+n.c.PrivateKey,onChange:e[0]||(e[0]=l=>this.toggle()),"onUpdate:modelValue":e[1]||(e[1]=l=>n.c.Status=l)},null,40,ON),[[Jn,n.c.Status]])])])])])}const FN=Ye(gN,[["render",NN]]),BN={name:"configurationList",components:{LocaleText:Qe,ConfigurationCard:FN},async setup(){return{wireguardConfigurationsStore:vi()}},data(){return{configurationLoaded:!1}},async mounted(){await this.wireguardConfigurationsStore.getConfigurations(),this.configurationLoaded=!0,this.wireguardConfigurationsStore.ConfigurationListInterval=setInterval(()=>{this.wireguardConfigurationsStore.getConfigurations()},1e4)},beforeUnmount(){clearInterval(this.wireguardConfigurationsStore.ConfigurationListInterval)}},SS=t=>(bn("data-v-106e7dee"),t=t(),wn(),t),VN={class:"mt-md-5 mt-3"},zN={class:"container-md"},WN={class:"d-flex mb-4 configurationListTitle"},HN={class:"text-body d-flex"},YN=SS(()=>g("i",{class:"bi bi-body-text me-2"},null,-1)),jN=SS(()=>g("i",{class:"bi bi-plus-circle-fill me-2"},null,-1)),KN={key:0},UN={key:0,class:"text-muted"},GN={key:1,class:"d-flex gap-3 flex-column mb-3"};function XN(t,e,n,i,s,r){const o=Se("LocaleText"),a=Se("RouterLink"),l=Se("ConfigurationCard");return D(),V("div",VN,[g("div",zN,[g("div",WN,[g("h3",HN,[YN,g("span",null,[B(o,{t:"WireGuard Configurations"})])]),B(a,{to:"/new_configuration",class:"btn btn-dark btn-brand rounded-3 px-3 py-2 shadow ms-auto rounded-3"},{default:Re(()=>[jN,B(o,{t:"Configuration"})]),_:1})]),B(Rt,{name:"fade",mode:"out-in"},{default:Re(()=>[this.configurationLoaded?(D(),V("div",KN,[this.wireguardConfigurationsStore.Configurations.length===0?(D(),V("p",UN,[B(o,{t:"You don't have any WireGuard configurations yet. Please check the configuration folder or change it in Settings. By default the folder is /etc/wireguard."})])):(D(),V("div",GN,[(D(!0),V($e,null,Xe(this.wireguardConfigurationsStore.Configurations,c=>(D(),Ce(l,{key:c.Name,c},null,8,["c"]))),128))]))])):ce("",!0)]),_:1})])])}const qN=Ye(BN,[["render",XN],["__scopeId","data-v-106e7dee"]]);let bd;const ZN=new Uint8Array(16);function JN(){if(!bd&&(bd=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!bd))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return bd(ZN)}const Dn=[];for(let t=0;t<256;++t)Dn.push((t+256).toString(16).slice(1));function QN(t,e=0){return Dn[t[e+0]]+Dn[t[e+1]]+Dn[t[e+2]]+Dn[t[e+3]]+"-"+Dn[t[e+4]]+Dn[t[e+5]]+"-"+Dn[t[e+6]]+Dn[t[e+7]]+"-"+Dn[t[e+8]]+Dn[t[e+9]]+"-"+Dn[t[e+10]]+Dn[t[e+11]]+Dn[t[e+12]]+Dn[t[e+13]]+Dn[t[e+14]]+Dn[t[e+15]]}const e3=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),db={randomUUID:e3};function Os(t,e,n){if(db.randomUUID&&!e&&!t)return db.randomUUID();t=t||{};const i=t.random||(t.rng||JN)();if(i[6]=i[6]&15|64,i[8]=i[8]&63|128,e){n=n||0;for(let s=0;s<16;++s)e[n+s]=i[s];return e}return QN(i)}const t3={components:{LocaleText:Qe},props:{targetData:String,title:String,warning:!1,warningText:""},setup(){const t=st(),e=`input_${Os()}`;return{store:t,uuid:e}},data(){return{value:"",invalidFeedback:"",showInvalidFeedback:!1,isValid:!1,timeout:void 0,changed:!1,updating:!1}},mounted(){this.value=this.store.Configuration.Peers[this.targetData]},methods:{async useValidation(){this.changed&&await kt("/api/updateDashboardConfigurationItem",{section:"Peers",key:this.targetData,value:this.value},t=>{t.status?(this.isValid=!0,this.showInvalidFeedback=!1,this.store.Configuration.Peers[this.targetData]=this.value,clearTimeout(this.timeout),this.timeout=setTimeout(()=>this.isValid=!1,5e3)):(this.isValid=!1,this.showInvalidFeedback=!0,this.invalidFeedback=t.message),this.changed=!1,this.updating=!1})}}},n3={class:"form-group mb-2"},i3=["for"],s3=["id","disabled"],r3={class:"invalid-feedback"},o3={key:0,class:"px-2 py-1 text-warning-emphasis bg-warning-subtle border border-warning-subtle rounded-2 d-inline-block mt-1"},a3=g("i",{class:"bi bi-exclamation-triangle-fill me-2"},null,-1);function l3(t,e,n,i,s,r){const o=Se("LocaleText");return D(),V("div",n3,[g("label",{for:this.uuid,class:"text-muted mb-1"},[g("strong",null,[g("small",null,[B(o,{t:this.title},null,8,["t"])])])],8,i3),Ne(g("input",{type:"text",class:Ie(["form-control",{"is-invalid":s.showInvalidFeedback,"is-valid":s.isValid}]),id:this.uuid,"onUpdate:modelValue":e[0]||(e[0]=a=>this.value=a),onKeydown:e[1]||(e[1]=a=>this.changed=!0),onBlur:e[2]||(e[2]=a=>r.useValidation()),disabled:this.updating},null,42,s3),[[Ke,this.value]]),g("div",r3,Ee(this.invalidFeedback),1),n.warning?(D(),V("div",o3,[g("small",null,[a3,B(o,{t:n.warningText},null,8,["t"])])])):ce("",!0)])}const c3=Ye(t3,[["render",l3]]),u3=t=>{},d3={name:"accountSettingsInputUsername",components:{LocaleText:Qe},props:{targetData:String,title:String},setup(){const t=st(),e=`input_${Os()}`;return{store:t,uuid:e}},data(){return{value:"",invalidFeedback:"",showInvalidFeedback:!1,isValid:!1,timeout:void 0,changed:!1,updating:!1}},mounted(){this.value=this.store.Configuration.Account[this.targetData]},methods:{async useValidation(){this.changed&&(this.updating=!0,await kt("/api/updateDashboardConfigurationItem",{section:"Account",key:this.targetData,value:this.value},t=>{t.status?(this.isValid=!0,this.showInvalidFeedback=!1,this.store.Configuration.Account[this.targetData]=this.value,clearTimeout(this.timeout),this.timeout=setTimeout(()=>this.isValid=!1,5e3)):(this.isValid=!1,this.showInvalidFeedback=!0,this.invalidFeedback=t.message),this.changed=!1,this.updating=!1}))}}},h3={class:"form-group mb-2"},f3=["for"],g3=["id","disabled"],p3={class:"invalid-feedback"};function m3(t,e,n,i,s,r){const o=Se("LocaleText");return D(),V("div",h3,[g("label",{for:this.uuid,class:"text-muted mb-1"},[g("strong",null,[g("small",null,[B(o,{t:this.title},null,8,["t"])])])],8,f3),Ne(g("input",{type:"text",class:Ie(["form-control",{"is-invalid":s.showInvalidFeedback,"is-valid":s.isValid}]),id:this.uuid,"onUpdate:modelValue":e[0]||(e[0]=a=>this.value=a),onKeydown:e[1]||(e[1]=a=>this.changed=!0),onBlur:e[2]||(e[2]=a=>r.useValidation()),disabled:this.updating},null,42,g3),[[Ke,this.value]]),g("div",p3,Ee(this.invalidFeedback),1)])}const _3=Ye(d3,[["render",m3]]),y3={name:"accountSettingsInputPassword",components:{LocaleText:Qe},props:{targetData:String,warning:!1,warningText:""},setup(){const t=st(),e=`input_${Os()}`;return{store:t,uuid:e}},data(){return{value:{currentPassword:"",newPassword:"",repeatNewPassword:""},invalidFeedback:"",showInvalidFeedback:!1,isValid:!1,timeout:void 0}},methods:{async useValidation(){Object.values(this.value).find(t=>t.length===0)===void 0?this.value.newPassword===this.value.repeatNewPassword?await kt("/api/updateDashboardConfigurationItem",{section:"Account",key:this.targetData,value:this.value},t=>{t.status?(this.isValid=!0,this.showInvalidFeedback=!1,this.store.Configuration.Account[this.targetData]=this.value,clearTimeout(this.timeout),this.timeout=setTimeout(()=>{this.isValid=!1,this.value={currentPassword:"",newPassword:"",repeatNewPassword:""}},5e3)):(this.isValid=!1,this.showInvalidFeedback=!0,this.invalidFeedback=t.message)}):(this.showInvalidFeedback=!0,this.invalidFeedback="New passwords does not match"):(this.showInvalidFeedback=!0,this.invalidFeedback="Please fill in all required fields.")}},computed:{passwordValid(){return Object.values(this.value).find(t=>t.length===0)===void 0&&this.value.newPassword===this.value.repeatNewPassword}}},v3={class:"d-flex flex-column"},b3={class:"row"},w3={class:"col-sm"},x3={class:"form-group mb-2"},E3=["for"],S3=["id"],C3={key:0,class:"invalid-feedback d-block"},T3={class:"col-sm"},k3={class:"form-group mb-2"},A3=["for"],M3=["id"],I3={class:"col-sm"},P3={class:"form-group mb-2"},R3=["for"],D3=["id"],$3=["disabled"],L3=g("i",{class:"bi bi-save2-fill me-2"},null,-1);function O3(t,e,n,i,s,r){const o=Se("LocaleText");return D(),V("div",v3,[g("div",b3,[g("div",w3,[g("div",x3,[g("label",{for:"currentPassword_"+this.uuid,class:"text-muted mb-1"},[g("strong",null,[g("small",null,[B(o,{t:"Current Password"})])])],8,E3),Ne(g("input",{type:"password",class:Ie(["form-control mb-2",{"is-invalid":s.showInvalidFeedback,"is-valid":s.isValid}]),"onUpdate:modelValue":e[0]||(e[0]=a=>this.value.currentPassword=a),id:"currentPassword_"+this.uuid},null,10,S3),[[Ke,this.value.currentPassword]]),s.showInvalidFeedback?(D(),V("div",C3,Ee(this.invalidFeedback),1)):ce("",!0)])]),g("div",T3,[g("div",k3,[g("label",{for:"newPassword_"+this.uuid,class:"text-muted mb-1"},[g("strong",null,[g("small",null,[B(o,{t:"New Password"})])])],8,A3),Ne(g("input",{type:"password",class:Ie(["form-control mb-2",{"is-invalid":s.showInvalidFeedback,"is-valid":s.isValid}]),"onUpdate:modelValue":e[1]||(e[1]=a=>this.value.newPassword=a),id:"newPassword_"+this.uuid},null,10,M3),[[Ke,this.value.newPassword]])])]),g("div",I3,[g("div",P3,[g("label",{for:"repeatNewPassword_"+this.uuid,class:"text-muted mb-1"},[g("strong",null,[g("small",null,[B(o,{t:"Repeat New Password"})])])],8,R3),Ne(g("input",{type:"password",class:Ie(["form-control mb-2",{"is-invalid":s.showInvalidFeedback,"is-valid":s.isValid}]),"onUpdate:modelValue":e[2]||(e[2]=a=>this.value.repeatNewPassword=a),id:"repeatNewPassword_"+this.uuid},null,10,D3),[[Ke,this.value.repeatNewPassword]])])])]),g("button",{disabled:!this.passwordValid,class:"ms-auto btn bg-success-subtle text-success-emphasis border-1 border-success-subtle rounded-3 shadow-sm",onClick:e[3]||(e[3]=a=>this.useValidation())},[L3,B(o,{t:"Update Password"})],8,$3)])}const N3=Ye(y3,[["render",O3]]),F3={name:"dashboardSettingsInputWireguardConfigurationPath",components:{LocaleText:Qe},props:{targetData:String,title:String,warning:!1,warningText:""},setup(){const t=st(),e=vi(),n=`input_${Os()}`;return{store:t,uuid:n,WireguardConfigurationStore:e}},data(){return{value:"",invalidFeedback:"",showInvalidFeedback:!1,isValid:!1,timeout:void 0,changed:!1,updating:!1}},mounted(){this.value=this.store.Configuration.Server[this.targetData]},methods:{async useValidation(){this.changed&&(this.updating=!0,await kt("/api/updateDashboardConfigurationItem",{section:"Server",key:this.targetData,value:this.value},t=>{t.status?(this.isValid=!0,this.showInvalidFeedback=!1,this.store.Configuration.Account[this.targetData]=this.value,clearTimeout(this.timeout),this.timeout=setTimeout(()=>this.isValid=!1,5e3),this.WireguardConfigurationStore.getConfigurations(),this.store.newMessage("Server","WireGuard configuration path saved","success")):(this.isValid=!1,this.showInvalidFeedback=!0,this.invalidFeedback=t.message),this.changed=!1,this.updating=!1}))}}},B3={class:"form-group"},V3=["for"],z3={class:"d-flex gap-2 align-items-start"},W3={class:"flex-grow-1"},H3=["id","disabled"],Y3={class:"invalid-feedback fw-bold"},j3=["disabled"],K3={key:0,class:"bi bi-save2-fill"},U3={key:1,class:"spinner-border spinner-border-sm"},G3={key:0,class:"px-2 py-1 text-warning-emphasis bg-warning-subtle border border-warning-subtle rounded-2 d-inline-block mt-1 mb-2"},X3=g("i",{class:"bi bi-exclamation-triangle-fill me-2"},null,-1);function q3(t,e,n,i,s,r){const o=Se("LocaleText");return D(),V("div",B3,[g("label",{for:this.uuid,class:"text-muted mb-1"},[g("strong",null,[g("small",null,[B(o,{t:this.title},null,8,["t"])])])],8,V3),g("div",z3,[g("div",W3,[Ne(g("input",{type:"text",class:Ie(["form-control rounded-3",{"is-invalid":this.showInvalidFeedback,"is-valid":this.isValid}]),id:this.uuid,"onUpdate:modelValue":e[0]||(e[0]=a=>this.value=a),onKeydown:e[1]||(e[1]=a=>this.changed=!0),disabled:this.updating},null,42,H3),[[Ke,this.value]]),g("div",Y3,Ee(this.invalidFeedback),1)]),g("button",{onClick:e[2]||(e[2]=a=>this.useValidation()),disabled:!this.changed,class:"ms-auto btn rounded-3 border-success-subtle bg-success-subtle text-success-emphasis"},[this.updating?(D(),V("span",U3)):(D(),V("i",K3))],8,j3)]),n.warning?(D(),V("div",G3,[g("small",null,[X3,B(o,{t:n.warningText},null,8,["t"])])])):ce("",!0)])}const Z3=Ye(F3,[["render",q3]]),J3={name:"dashboardTheme",components:{LocaleText:Qe},setup(){return{dashboardConfigurationStore:st()}},methods:{async switchTheme(t){await kt("/api/updateDashboardConfigurationItem",{section:"Server",key:"dashboard_theme",value:t},e=>{e.status&&(this.dashboardConfigurationStore.Configuration.Server.dashboard_theme=t)})}}},Q3={class:"card mb-4 shadow rounded-3"},eF={class:"card-header"},tF={class:"card-body d-flex gap-2"},nF=g("i",{class:"bi bi-sun-fill me-2"},null,-1),iF=g("i",{class:"bi bi-moon-fill me-2"},null,-1);function sF(t,e,n,i,s,r){const o=Se("LocaleText");return D(),V("div",Q3,[g("p",eF,[B(o,{t:"Dashboard Theme"})]),g("div",tF,[g("button",{class:Ie(["btn bg-primary-subtle text-primary-emphasis flex-grow-1",{active:this.dashboardConfigurationStore.Configuration.Server.dashboard_theme==="light"}]),onClick:e[0]||(e[0]=a=>this.switchTheme("light"))},[nF,B(o,{t:"Light"})],2),g("button",{class:Ie(["btn bg-primary-subtle text-primary-emphasis flex-grow-1",{active:this.dashboardConfigurationStore.Configuration.Server.dashboard_theme==="dark"}]),onClick:e[1]||(e[1]=a=>this.switchTheme("dark"))},[iF,B(o,{t:"Dark"})],2)])])}const rF=Ye(J3,[["render",sF]]),oF={name:"dashboardSettingsInputIPAddressAndPort",props:{},setup(){const t=st(),e=`input_${Os()}`;return{store:t,uuid:e}},data(){return{app_ip:"",app_port:"",invalidFeedback:"",showInvalidFeedback:!1,isValid:!1,timeout:void 0,changed:!1,updating:!1}},mounted(){this.app_ip=this.store.Configuration.Server.app_ip,this.app_port=this.store.Configuration.Server.app_port},methods:{async useValidation(){this.changed&&await kt("/api/updateDashboardConfigurationItem",{section:"Server",key:this.targetData,value:this.value},t=>{t.status?(this.isValid=!0,this.showInvalidFeedback=!1,this.store.Configuration.Account[this.targetData]=this.value,clearTimeout(this.timeout),this.timeout=setTimeout(()=>this.isValid=!1,5e3)):(this.isValid=!1,this.showInvalidFeedback=!0,this.invalidFeedback=t.message)})}}},aF={class:"invalid-feedback d-block mt-0"},lF={class:"row"},cF={class:"form-group mb-2 col-sm"},uF=["for"],dF=g("strong",null,[g("small",null,"Dashboard IP Address")],-1),hF=[dF],fF=["id"],gF=g("div",{class:"px-2 py-1 text-warning-emphasis bg-warning-subtle border border-warning-subtle rounded-2 d-inline-block"},[g("small",null,[g("i",{class:"bi bi-exclamation-triangle-fill me-2"}),g("code",null,"0.0.0.0"),He(" means it can be access by anyone with your server IP Address.")])],-1),pF={class:"form-group col-sm"},mF=["for"],_F=g("strong",null,[g("small",null,"Dashboard Port")],-1),yF=[_F],vF=["id"],bF=g("button",{class:"btn btn-success btn-sm fw-bold rounded-3"},[g("i",{class:"bi bi-floppy-fill me-2"}),He("Update Dashboard Settings & Restart ")],-1);function wF(t,e,n,i,s,r){return D(),V("div",null,[g("div",aF,Ee(this.invalidFeedback),1),g("div",lF,[g("div",cF,[g("label",{for:"app_ip_"+this.uuid,class:"text-muted mb-1"},hF,8,uF),Ne(g("input",{type:"text",class:"form-control mb-2",id:"app_ip_"+this.uuid,"onUpdate:modelValue":e[0]||(e[0]=o=>this.app_ip=o)},null,8,fF),[[Ke,this.app_ip]]),gF]),g("div",pF,[g("label",{for:"app_port_"+this.uuid,class:"text-muted mb-1"},yF,8,mF),Ne(g("input",{type:"text",class:"form-control mb-2",id:"app_port_"+this.uuid,"onUpdate:modelValue":e[1]||(e[1]=o=>this.app_port=o)},null,8,vF),[[Ke,this.app_port]])])]),bF])}const xF=Ye(oF,[["render",wF]]);function Ve(t){const e=Object.prototype.toString.call(t);return t instanceof Date||typeof t=="object"&&e==="[object Date]"?new t.constructor(+t):typeof t=="number"||e==="[object Number]"||typeof t=="string"||e==="[object String]"?new Date(t):new Date(NaN)}function yt(t,e){return t instanceof Date?new t.constructor(e):new Date(e)}function ss(t,e){const n=Ve(t);return isNaN(e)?yt(t,NaN):(e&&n.setDate(n.getDate()+e),n)}function us(t,e){const n=Ve(t);if(isNaN(e))return yt(t,NaN);if(!e)return n;const i=n.getDate(),s=yt(t,n.getTime());s.setMonth(n.getMonth()+e+1,0);const r=s.getDate();return i>=r?s:(n.setFullYear(s.getFullYear(),s.getMonth(),i),n)}function CS(t,e){const{years:n=0,months:i=0,weeks:s=0,days:r=0,hours:o=0,minutes:a=0,seconds:l=0}=e,c=Ve(t),u=i||n?us(c,i+n*12):c,d=r||s?ss(u,r+s*7):u,h=a+o*60,p=(l+h*60)*1e3;return yt(t,d.getTime()+p)}function EF(t,e){const n=+Ve(t);return yt(t,n+e)}const TS=6048e5,SF=864e5,CF=6e4,kS=36e5,TF=1e3;function kF(t,e){return EF(t,e*kS)}let AF={};function _a(){return AF}function fs(t,e){const n=_a(),i=e?.weekStartsOn??e?.locale?.options?.weekStartsOn??n.weekStartsOn??n.locale?.options?.weekStartsOn??0,s=Ve(t),r=s.getDay(),o=(r=s.getTime()?n+1:e.getTime()>=o.getTime()?n:n-1}function hb(t){const e=Ve(t);return e.setHours(0,0,0,0),e}function yh(t){const e=Ve(t),n=new Date(Date.UTC(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()));return n.setUTCFullYear(e.getFullYear()),+t-+n}function MS(t,e){const n=hb(t),i=hb(e),s=+n-yh(n),r=+i-yh(i);return Math.round((s-r)/SF)}function MF(t){const e=AS(t),n=yt(t,0);return n.setFullYear(e,0,4),n.setHours(0,0,0,0),xl(n)}function IF(t,e){const n=e*3;return us(t,n)}function k_(t,e){return us(t,e*12)}function fb(t,e){const n=Ve(t),i=Ve(e),s=n.getTime()-i.getTime();return s<0?-1:s>0?1:s}function IS(t){return t instanceof Date||typeof t=="object"&&Object.prototype.toString.call(t)==="[object Date]"}function zc(t){if(!IS(t)&&typeof t!="number")return!1;const e=Ve(t);return!isNaN(Number(e))}function gb(t){const e=Ve(t);return Math.trunc(e.getMonth()/3)+1}function PF(t,e){const n=Ve(t),i=Ve(e);return n.getFullYear()-i.getFullYear()}function RF(t,e){const n=Ve(t),i=Ve(e),s=fb(n,i),r=Math.abs(PF(n,i));n.setFullYear(1584),i.setFullYear(1584);const o=fb(n,i)===-s,a=s*(r-+o);return a===0?0:a}function PS(t,e){const n=Ve(t.start),i=Ve(t.end);let s=+n>+i;const r=s?+n:+i,o=s?i:n;o.setHours(0,0,0,0);let a=e?.step??1;if(!a)return[];a<0&&(a=-a,s=!s);const l=[];for(;+o<=r;)l.push(Ve(o)),o.setDate(o.getDate()+a),o.setHours(0,0,0,0);return s?l.reverse():l}function Ko(t){const e=Ve(t),n=e.getMonth(),i=n-n%3;return e.setMonth(i,1),e.setHours(0,0,0,0),e}function DF(t,e){const n=Ve(t.start),i=Ve(t.end);let s=+n>+i;const r=s?+Ko(n):+Ko(i);let o=Ko(s?i:n),a=e?.step??1;if(!a)return[];a<0&&(a=-a,s=!s);const l=[];for(;+o<=r;)l.push(Ve(o)),o=IF(o,a);return s?l.reverse():l}function $F(t){const e=Ve(t);return e.setDate(1),e.setHours(0,0,0,0),e}function RS(t){const e=Ve(t),n=e.getFullYear();return e.setFullYear(n+1,0,0),e.setHours(23,59,59,999),e}function ru(t){const e=Ve(t),n=yt(t,0);return n.setFullYear(e.getFullYear(),0,1),n.setHours(0,0,0,0),n}function DS(t,e){const n=_a(),i=e?.weekStartsOn??e?.locale?.options?.weekStartsOn??n.weekStartsOn??n.locale?.options?.weekStartsOn??0,s=Ve(t),r=s.getDay(),o=(r{let i;const s=LF[t];return typeof s=="string"?i=s:e===1?i=s.one:i=s.other.replace("{{count}}",e.toString()),n?.addSuffix?n.comparison&&n.comparison>0?"in "+i:i+" ago":i};function Pg(t){return(e={})=>{const n=e.width?String(e.width):t.defaultWidth;return t.formats[n]||t.formats[t.defaultWidth]}}const NF={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},FF={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},BF={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},VF={date:Pg({formats:NF,defaultWidth:"full"}),time:Pg({formats:FF,defaultWidth:"full"}),dateTime:Pg({formats:BF,defaultWidth:"full"})},zF={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},WF=(t,e,n,i)=>zF[t];function ac(t){return(e,n)=>{const i=n?.context?String(n.context):"standalone";let s;if(i==="formatting"&&t.formattingValues){const o=t.defaultFormattingWidth||t.defaultWidth,a=n?.width?String(n.width):o;s=t.formattingValues[a]||t.formattingValues[o]}else{const o=t.defaultWidth,a=n?.width?String(n.width):t.defaultWidth;s=t.values[a]||t.values[o]}const r=t.argumentCallback?t.argumentCallback(e):e;return s[r]}}const HF={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},YF={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},jF={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},KF={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},UF={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},GF={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},XF=(t,e)=>{const n=Number(t),i=n%100;if(i>20||i<10)switch(i%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},qF={ordinalNumber:XF,era:ac({values:HF,defaultWidth:"wide"}),quarter:ac({values:YF,defaultWidth:"wide",argumentCallback:t=>t-1}),month:ac({values:jF,defaultWidth:"wide"}),day:ac({values:KF,defaultWidth:"wide"}),dayPeriod:ac({values:UF,defaultWidth:"wide",formattingValues:GF,defaultFormattingWidth:"wide"})};function lc(t){return(e,n={})=>{const i=n.width,s=i&&t.matchPatterns[i]||t.matchPatterns[t.defaultMatchWidth],r=e.match(s);if(!r)return null;const o=r[0],a=i&&t.parsePatterns[i]||t.parsePatterns[t.defaultParseWidth],l=Array.isArray(a)?JF(a,d=>d.test(o)):ZF(a,d=>d.test(o));let c;c=t.valueCallback?t.valueCallback(l):l,c=n.valueCallback?n.valueCallback(c):c;const u=e.slice(o.length);return{value:c,rest:u}}}function ZF(t,e){for(const n in t)if(Object.prototype.hasOwnProperty.call(t,n)&&e(t[n]))return n}function JF(t,e){for(let n=0;n{const i=e.match(t.matchPattern);if(!i)return null;const s=i[0],r=e.match(t.parsePattern);if(!r)return null;let o=t.valueCallback?t.valueCallback(r[0]):r[0];o=n.valueCallback?n.valueCallback(o):o;const a=e.slice(s.length);return{value:o,rest:a}}}const e5=/^(\d+)(th|st|nd|rd)?/i,t5=/\d+/i,n5={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},i5={any:[/^b/i,/^(a|c)/i]},s5={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},r5={any:[/1/i,/2/i,/3/i,/4/i]},o5={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},a5={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},l5={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},c5={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},u5={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},d5={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},h5={ordinalNumber:QF({matchPattern:e5,parsePattern:t5,valueCallback:t=>parseInt(t,10)}),era:lc({matchPatterns:n5,defaultMatchWidth:"wide",parsePatterns:i5,defaultParseWidth:"any"}),quarter:lc({matchPatterns:s5,defaultMatchWidth:"wide",parsePatterns:r5,defaultParseWidth:"any",valueCallback:t=>t+1}),month:lc({matchPatterns:o5,defaultMatchWidth:"wide",parsePatterns:a5,defaultParseWidth:"any"}),day:lc({matchPatterns:l5,defaultMatchWidth:"wide",parsePatterns:c5,defaultParseWidth:"any"}),dayPeriod:lc({matchPatterns:u5,defaultMatchWidth:"any",parsePatterns:d5,defaultParseWidth:"any"})},$S={code:"en-US",formatDistance:OF,formatLong:VF,formatRelative:WF,localize:qF,match:h5,options:{weekStartsOn:0,firstWeekContainsDate:1}};function f5(t){const e=Ve(t);return MS(e,ru(e))+1}function A_(t){const e=Ve(t),n=+xl(e)-+MF(e);return Math.round(n/TS)+1}function M_(t,e){const n=Ve(t),i=n.getFullYear(),s=_a(),r=e?.firstWeekContainsDate??e?.locale?.options?.firstWeekContainsDate??s.firstWeekContainsDate??s.locale?.options?.firstWeekContainsDate??1,o=yt(t,0);o.setFullYear(i+1,0,r),o.setHours(0,0,0,0);const a=fs(o,e),l=yt(t,0);l.setFullYear(i,0,r),l.setHours(0,0,0,0);const c=fs(l,e);return n.getTime()>=a.getTime()?i+1:n.getTime()>=c.getTime()?i:i-1}function g5(t,e){const n=_a(),i=e?.firstWeekContainsDate??e?.locale?.options?.firstWeekContainsDate??n.firstWeekContainsDate??n.locale?.options?.firstWeekContainsDate??1,s=M_(t,e),r=yt(t,0);return r.setFullYear(s,0,i),r.setHours(0,0,0,0),fs(r,e)}function I_(t,e){const n=Ve(t),i=+fs(n,e)-+g5(n,e);return Math.round(i/TS)+1}function Et(t,e){const n=t<0?"-":"",i=Math.abs(t).toString().padStart(e,"0");return n+i}const Tr={y(t,e){const n=t.getFullYear(),i=n>0?n:1-n;return Et(e==="yy"?i%100:i,e.length)},M(t,e){const n=t.getMonth();return e==="M"?String(n+1):Et(n+1,2)},d(t,e){return Et(t.getDate(),e.length)},a(t,e){const n=t.getHours()/12>=1?"pm":"am";switch(e){case"a":case"aa":return n.toUpperCase();case"aaa":return n;case"aaaaa":return n[0];case"aaaa":default:return n==="am"?"a.m.":"p.m."}},h(t,e){return Et(t.getHours()%12||12,e.length)},H(t,e){return Et(t.getHours(),e.length)},m(t,e){return Et(t.getMinutes(),e.length)},s(t,e){return Et(t.getSeconds(),e.length)},S(t,e){const n=e.length,i=t.getMilliseconds(),s=Math.trunc(i*Math.pow(10,n-3));return Et(s,e.length)}},Pa={am:"am",pm:"pm",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},mb={G:function(t,e,n){const i=t.getFullYear()>0?1:0;switch(e){case"G":case"GG":case"GGG":return n.era(i,{width:"abbreviated"});case"GGGGG":return n.era(i,{width:"narrow"});case"GGGG":default:return n.era(i,{width:"wide"})}},y:function(t,e,n){if(e==="yo"){const i=t.getFullYear(),s=i>0?i:1-i;return n.ordinalNumber(s,{unit:"year"})}return Tr.y(t,e)},Y:function(t,e,n,i){const s=M_(t,i),r=s>0?s:1-s;if(e==="YY"){const o=r%100;return Et(o,2)}return e==="Yo"?n.ordinalNumber(r,{unit:"year"}):Et(r,e.length)},R:function(t,e){const n=AS(t);return Et(n,e.length)},u:function(t,e){const n=t.getFullYear();return Et(n,e.length)},Q:function(t,e,n){const i=Math.ceil((t.getMonth()+1)/3);switch(e){case"Q":return String(i);case"QQ":return Et(i,2);case"Qo":return n.ordinalNumber(i,{unit:"quarter"});case"QQQ":return n.quarter(i,{width:"abbreviated",context:"formatting"});case"QQQQQ":return n.quarter(i,{width:"narrow",context:"formatting"});case"QQQQ":default:return n.quarter(i,{width:"wide",context:"formatting"})}},q:function(t,e,n){const i=Math.ceil((t.getMonth()+1)/3);switch(e){case"q":return String(i);case"qq":return Et(i,2);case"qo":return n.ordinalNumber(i,{unit:"quarter"});case"qqq":return n.quarter(i,{width:"abbreviated",context:"standalone"});case"qqqqq":return n.quarter(i,{width:"narrow",context:"standalone"});case"qqqq":default:return n.quarter(i,{width:"wide",context:"standalone"})}},M:function(t,e,n){const i=t.getMonth();switch(e){case"M":case"MM":return Tr.M(t,e);case"Mo":return n.ordinalNumber(i+1,{unit:"month"});case"MMM":return n.month(i,{width:"abbreviated",context:"formatting"});case"MMMMM":return n.month(i,{width:"narrow",context:"formatting"});case"MMMM":default:return n.month(i,{width:"wide",context:"formatting"})}},L:function(t,e,n){const i=t.getMonth();switch(e){case"L":return String(i+1);case"LL":return Et(i+1,2);case"Lo":return n.ordinalNumber(i+1,{unit:"month"});case"LLL":return n.month(i,{width:"abbreviated",context:"standalone"});case"LLLLL":return n.month(i,{width:"narrow",context:"standalone"});case"LLLL":default:return n.month(i,{width:"wide",context:"standalone"})}},w:function(t,e,n,i){const s=I_(t,i);return e==="wo"?n.ordinalNumber(s,{unit:"week"}):Et(s,e.length)},I:function(t,e,n){const i=A_(t);return e==="Io"?n.ordinalNumber(i,{unit:"week"}):Et(i,e.length)},d:function(t,e,n){return e==="do"?n.ordinalNumber(t.getDate(),{unit:"date"}):Tr.d(t,e)},D:function(t,e,n){const i=f5(t);return e==="Do"?n.ordinalNumber(i,{unit:"dayOfYear"}):Et(i,e.length)},E:function(t,e,n){const i=t.getDay();switch(e){case"E":case"EE":case"EEE":return n.day(i,{width:"abbreviated",context:"formatting"});case"EEEEE":return n.day(i,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(i,{width:"short",context:"formatting"});case"EEEE":default:return n.day(i,{width:"wide",context:"formatting"})}},e:function(t,e,n,i){const s=t.getDay(),r=(s-i.weekStartsOn+8)%7||7;switch(e){case"e":return String(r);case"ee":return Et(r,2);case"eo":return n.ordinalNumber(r,{unit:"day"});case"eee":return n.day(s,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(s,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(s,{width:"short",context:"formatting"});case"eeee":default:return n.day(s,{width:"wide",context:"formatting"})}},c:function(t,e,n,i){const s=t.getDay(),r=(s-i.weekStartsOn+8)%7||7;switch(e){case"c":return String(r);case"cc":return Et(r,e.length);case"co":return n.ordinalNumber(r,{unit:"day"});case"ccc":return n.day(s,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(s,{width:"narrow",context:"standalone"});case"cccccc":return n.day(s,{width:"short",context:"standalone"});case"cccc":default:return n.day(s,{width:"wide",context:"standalone"})}},i:function(t,e,n){const i=t.getDay(),s=i===0?7:i;switch(e){case"i":return String(s);case"ii":return Et(s,e.length);case"io":return n.ordinalNumber(s,{unit:"day"});case"iii":return n.day(i,{width:"abbreviated",context:"formatting"});case"iiiii":return n.day(i,{width:"narrow",context:"formatting"});case"iiiiii":return n.day(i,{width:"short",context:"formatting"});case"iiii":default:return n.day(i,{width:"wide",context:"formatting"})}},a:function(t,e,n){const s=t.getHours()/12>=1?"pm":"am";switch(e){case"a":case"aa":return n.dayPeriod(s,{width:"abbreviated",context:"formatting"});case"aaa":return n.dayPeriod(s,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return n.dayPeriod(s,{width:"narrow",context:"formatting"});case"aaaa":default:return n.dayPeriod(s,{width:"wide",context:"formatting"})}},b:function(t,e,n){const i=t.getHours();let s;switch(i===12?s=Pa.noon:i===0?s=Pa.midnight:s=i/12>=1?"pm":"am",e){case"b":case"bb":return n.dayPeriod(s,{width:"abbreviated",context:"formatting"});case"bbb":return n.dayPeriod(s,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return n.dayPeriod(s,{width:"narrow",context:"formatting"});case"bbbb":default:return n.dayPeriod(s,{width:"wide",context:"formatting"})}},B:function(t,e,n){const i=t.getHours();let s;switch(i>=17?s=Pa.evening:i>=12?s=Pa.afternoon:i>=4?s=Pa.morning:s=Pa.night,e){case"B":case"BB":case"BBB":return n.dayPeriod(s,{width:"abbreviated",context:"formatting"});case"BBBBB":return n.dayPeriod(s,{width:"narrow",context:"formatting"});case"BBBB":default:return n.dayPeriod(s,{width:"wide",context:"formatting"})}},h:function(t,e,n){if(e==="ho"){let i=t.getHours()%12;return i===0&&(i=12),n.ordinalNumber(i,{unit:"hour"})}return Tr.h(t,e)},H:function(t,e,n){return e==="Ho"?n.ordinalNumber(t.getHours(),{unit:"hour"}):Tr.H(t,e)},K:function(t,e,n){const i=t.getHours()%12;return e==="Ko"?n.ordinalNumber(i,{unit:"hour"}):Et(i,e.length)},k:function(t,e,n){let i=t.getHours();return i===0&&(i=24),e==="ko"?n.ordinalNumber(i,{unit:"hour"}):Et(i,e.length)},m:function(t,e,n){return e==="mo"?n.ordinalNumber(t.getMinutes(),{unit:"minute"}):Tr.m(t,e)},s:function(t,e,n){return e==="so"?n.ordinalNumber(t.getSeconds(),{unit:"second"}):Tr.s(t,e)},S:function(t,e){return Tr.S(t,e)},X:function(t,e,n){const i=t.getTimezoneOffset();if(i===0)return"Z";switch(e){case"X":return yb(i);case"XXXX":case"XX":return Bo(i);case"XXXXX":case"XXX":default:return Bo(i,":")}},x:function(t,e,n){const i=t.getTimezoneOffset();switch(e){case"x":return yb(i);case"xxxx":case"xx":return Bo(i);case"xxxxx":case"xxx":default:return Bo(i,":")}},O:function(t,e,n){const i=t.getTimezoneOffset();switch(e){case"O":case"OO":case"OOO":return"GMT"+_b(i,":");case"OOOO":default:return"GMT"+Bo(i,":")}},z:function(t,e,n){const i=t.getTimezoneOffset();switch(e){case"z":case"zz":case"zzz":return"GMT"+_b(i,":");case"zzzz":default:return"GMT"+Bo(i,":")}},t:function(t,e,n){const i=Math.trunc(t.getTime()/1e3);return Et(i,e.length)},T:function(t,e,n){const i=t.getTime();return Et(i,e.length)}};function _b(t,e=""){const n=t>0?"-":"+",i=Math.abs(t),s=Math.trunc(i/60),r=i%60;return r===0?n+String(s):n+String(s)+e+Et(r,2)}function yb(t,e){return t%60===0?(t>0?"-":"+")+Et(Math.abs(t)/60,2):Bo(t,e)}function Bo(t,e=""){const n=t>0?"-":"+",i=Math.abs(t),s=Et(Math.trunc(i/60),2),r=Et(i%60,2);return n+s+e+r}const vb=(t,e)=>{switch(t){case"P":return e.date({width:"short"});case"PP":return e.date({width:"medium"});case"PPP":return e.date({width:"long"});case"PPPP":default:return e.date({width:"full"})}},LS=(t,e)=>{switch(t){case"p":return e.time({width:"short"});case"pp":return e.time({width:"medium"});case"ppp":return e.time({width:"long"});case"pppp":default:return e.time({width:"full"})}},p5=(t,e)=>{const n=t.match(/(P+)(p+)?/)||[],i=n[1],s=n[2];if(!s)return vb(t,e);let r;switch(i){case"P":r=e.dateTime({width:"short"});break;case"PP":r=e.dateTime({width:"medium"});break;case"PPP":r=e.dateTime({width:"long"});break;case"PPPP":default:r=e.dateTime({width:"full"});break}return r.replace("{{date}}",vb(i,e)).replace("{{time}}",LS(s,e))},Zp={p:LS,P:p5},m5=/^D+$/,_5=/^Y+$/,y5=["D","DD","YY","YYYY"];function OS(t){return m5.test(t)}function NS(t){return _5.test(t)}function Jp(t,e,n){const i=v5(t,e,n);if(console.warn(i),y5.includes(t))throw new RangeError(i)}function v5(t,e,n){const i=t[0]==="Y"?"years":"days of the month";return`Use \`${t.toLowerCase()}\` instead of \`${t}\` (in \`${e}\`) for formatting ${i} to the input \`${n}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}const b5=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,w5=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,x5=/^'([^]*?)'?$/,E5=/''/g,S5=/[a-zA-Z]/;function Rs(t,e,n){const i=_a(),s=n?.locale??i.locale??$S,r=n?.firstWeekContainsDate??n?.locale?.options?.firstWeekContainsDate??i.firstWeekContainsDate??i.locale?.options?.firstWeekContainsDate??1,o=n?.weekStartsOn??n?.locale?.options?.weekStartsOn??i.weekStartsOn??i.locale?.options?.weekStartsOn??0,a=Ve(t);if(!zc(a))throw new RangeError("Invalid time value");let l=e.match(w5).map(u=>{const d=u[0];if(d==="p"||d==="P"){const h=Zp[d];return h(u,s.formatLong)}return u}).join("").match(b5).map(u=>{if(u==="''")return{isToken:!1,value:"'"};const d=u[0];if(d==="'")return{isToken:!1,value:C5(u)};if(mb[d])return{isToken:!0,value:u};if(d.match(S5))throw new RangeError("Format string contains an unescaped latin alphabet character `"+d+"`");return{isToken:!1,value:u}});s.localize.preprocessor&&(l=s.localize.preprocessor(a,l));const c={firstWeekContainsDate:r,weekStartsOn:o,locale:s};return l.map(u=>{if(!u.isToken)return u.value;const d=u.value;(!n?.useAdditionalWeekYearTokens&&NS(d)||!n?.useAdditionalDayOfYearTokens&&OS(d))&&Jp(d,e,String(t));const h=mb[d[0]];return h(a,d,s.localize,c)}).join("")}function C5(t){const e=t.match(x5);return e?e[1].replace(E5,"'"):t}function T5(t){return Ve(t).getDay()}function k5(t){const e=Ve(t),n=e.getFullYear(),i=e.getMonth(),s=yt(t,0);return s.setFullYear(n,i+1,0),s.setHours(0,0,0,0),s.getDate()}function A5(){return Object.assign({},_a())}function pr(t){return Ve(t).getHours()}function M5(t){let n=Ve(t).getDay();return n===0&&(n=7),n}function oo(t){return Ve(t).getMinutes()}function at(t){return Ve(t).getMonth()}function El(t){return Ve(t).getSeconds()}function Ge(t){return Ve(t).getFullYear()}function Sl(t,e){const n=Ve(t),i=Ve(e);return n.getTime()>i.getTime()}function ou(t,e){const n=Ve(t),i=Ve(e);return+n<+i}function Za(t,e){const n=Ve(t),i=Ve(e);return+n==+i}function I5(t,e){const n=e instanceof Date?yt(e,0):new e(0);return n.setFullYear(t.getFullYear(),t.getMonth(),t.getDate()),n.setHours(t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()),n}const P5=10;class FS{subPriority=0;validate(e,n){return!0}}class R5 extends FS{constructor(e,n,i,s,r){super(),this.value=e,this.validateValue=n,this.setValue=i,this.priority=s,r&&(this.subPriority=r)}validate(e,n){return this.validateValue(e,this.value,n)}set(e,n,i){return this.setValue(e,n,this.value,i)}}class D5 extends FS{priority=P5;subPriority=-1;set(e,n){return n.timestampIsSet?e:yt(e,I5(e,Date))}}class bt{run(e,n,i,s){const r=this.parse(e,n,i,s);return r?{setter:new R5(r.value,this.validate,this.set,this.priority,this.subPriority),rest:r.rest}:null}validate(e,n,i){return!0}}class $5 extends bt{priority=140;parse(e,n,i){switch(n){case"G":case"GG":case"GGG":return i.era(e,{width:"abbreviated"})||i.era(e,{width:"narrow"});case"GGGGG":return i.era(e,{width:"narrow"});case"GGGG":default:return i.era(e,{width:"wide"})||i.era(e,{width:"abbreviated"})||i.era(e,{width:"narrow"})}}set(e,n,i){return n.era=i,e.setFullYear(i,0,1),e.setHours(0,0,0,0),e}incompatibleTokens=["R","u","t","T"]}const sn={month:/^(1[0-2]|0?\d)/,date:/^(3[0-1]|[0-2]?\d)/,dayOfYear:/^(36[0-6]|3[0-5]\d|[0-2]?\d?\d)/,week:/^(5[0-3]|[0-4]?\d)/,hour23h:/^(2[0-3]|[0-1]?\d)/,hour24h:/^(2[0-4]|[0-1]?\d)/,hour11h:/^(1[0-1]|0?\d)/,hour12h:/^(1[0-2]|0?\d)/,minute:/^[0-5]?\d/,second:/^[0-5]?\d/,singleDigit:/^\d/,twoDigits:/^\d{1,2}/,threeDigits:/^\d{1,3}/,fourDigits:/^\d{1,4}/,anyDigitsSigned:/^-?\d+/,singleDigitSigned:/^-?\d/,twoDigitsSigned:/^-?\d{1,2}/,threeDigitsSigned:/^-?\d{1,3}/,fourDigitsSigned:/^-?\d{1,4}/},xs={basicOptionalMinutes:/^([+-])(\d{2})(\d{2})?|Z/,basic:/^([+-])(\d{2})(\d{2})|Z/,basicOptionalSeconds:/^([+-])(\d{2})(\d{2})((\d{2}))?|Z/,extended:/^([+-])(\d{2}):(\d{2})|Z/,extendedOptionalSeconds:/^([+-])(\d{2}):(\d{2})(:(\d{2}))?|Z/};function rn(t,e){return t&&{value:e(t.value),rest:t.rest}}function jt(t,e){const n=e.match(t);return n?{value:parseInt(n[0],10),rest:e.slice(n[0].length)}:null}function Es(t,e){const n=e.match(t);if(!n)return null;if(n[0]==="Z")return{value:0,rest:e.slice(1)};const i=n[1]==="+"?1:-1,s=n[2]?parseInt(n[2],10):0,r=n[3]?parseInt(n[3],10):0,o=n[5]?parseInt(n[5],10):0;return{value:i*(s*kS+r*CF+o*TF),rest:e.slice(n[0].length)}}function BS(t){return jt(sn.anyDigitsSigned,t)}function en(t,e){switch(t){case 1:return jt(sn.singleDigit,e);case 2:return jt(sn.twoDigits,e);case 3:return jt(sn.threeDigits,e);case 4:return jt(sn.fourDigits,e);default:return jt(new RegExp("^\\d{1,"+t+"}"),e)}}function vh(t,e){switch(t){case 1:return jt(sn.singleDigitSigned,e);case 2:return jt(sn.twoDigitsSigned,e);case 3:return jt(sn.threeDigitsSigned,e);case 4:return jt(sn.fourDigitsSigned,e);default:return jt(new RegExp("^-?\\d{1,"+t+"}"),e)}}function P_(t){switch(t){case"morning":return 4;case"evening":return 17;case"pm":case"noon":case"afternoon":return 12;case"am":case"midnight":case"night":default:return 0}}function VS(t,e){const n=e>0,i=n?e:1-e;let s;if(i<=50)s=t||100;else{const r=i+50,o=Math.trunc(r/100)*100,a=t>=r%100;s=t+o-(a?100:0)}return n?s:1-s}function zS(t){return t%400===0||t%4===0&&t%100!==0}class L5 extends bt{priority=130;incompatibleTokens=["Y","R","u","w","I","i","e","c","t","T"];parse(e,n,i){const s=r=>({year:r,isTwoDigitYear:n==="yy"});switch(n){case"y":return rn(en(4,e),s);case"yo":return rn(i.ordinalNumber(e,{unit:"year"}),s);default:return rn(en(n.length,e),s)}}validate(e,n){return n.isTwoDigitYear||n.year>0}set(e,n,i){const s=e.getFullYear();if(i.isTwoDigitYear){const o=VS(i.year,s);return e.setFullYear(o,0,1),e.setHours(0,0,0,0),e}const r=!("era"in n)||n.era===1?i.year:1-i.year;return e.setFullYear(r,0,1),e.setHours(0,0,0,0),e}}class O5 extends bt{priority=130;parse(e,n,i){const s=r=>({year:r,isTwoDigitYear:n==="YY"});switch(n){case"Y":return rn(en(4,e),s);case"Yo":return rn(i.ordinalNumber(e,{unit:"year"}),s);default:return rn(en(n.length,e),s)}}validate(e,n){return n.isTwoDigitYear||n.year>0}set(e,n,i,s){const r=M_(e,s);if(i.isTwoDigitYear){const a=VS(i.year,r);return e.setFullYear(a,0,s.firstWeekContainsDate),e.setHours(0,0,0,0),fs(e,s)}const o=!("era"in n)||n.era===1?i.year:1-i.year;return e.setFullYear(o,0,s.firstWeekContainsDate),e.setHours(0,0,0,0),fs(e,s)}incompatibleTokens=["y","R","u","Q","q","M","L","I","d","D","i","t","T"]}class N5 extends bt{priority=130;parse(e,n){return vh(n==="R"?4:n.length,e)}set(e,n,i){const s=yt(e,0);return s.setFullYear(i,0,4),s.setHours(0,0,0,0),xl(s)}incompatibleTokens=["G","y","Y","u","Q","q","M","L","w","d","D","e","c","t","T"]}class F5 extends bt{priority=130;parse(e,n){return vh(n==="u"?4:n.length,e)}set(e,n,i){return e.setFullYear(i,0,1),e.setHours(0,0,0,0),e}incompatibleTokens=["G","y","Y","R","w","I","i","e","c","t","T"]}class B5 extends bt{priority=120;parse(e,n,i){switch(n){case"Q":case"QQ":return en(n.length,e);case"Qo":return i.ordinalNumber(e,{unit:"quarter"});case"QQQ":return i.quarter(e,{width:"abbreviated",context:"formatting"})||i.quarter(e,{width:"narrow",context:"formatting"});case"QQQQQ":return i.quarter(e,{width:"narrow",context:"formatting"});case"QQQQ":default:return i.quarter(e,{width:"wide",context:"formatting"})||i.quarter(e,{width:"abbreviated",context:"formatting"})||i.quarter(e,{width:"narrow",context:"formatting"})}}validate(e,n){return n>=1&&n<=4}set(e,n,i){return e.setMonth((i-1)*3,1),e.setHours(0,0,0,0),e}incompatibleTokens=["Y","R","q","M","L","w","I","d","D","i","e","c","t","T"]}class V5 extends bt{priority=120;parse(e,n,i){switch(n){case"q":case"qq":return en(n.length,e);case"qo":return i.ordinalNumber(e,{unit:"quarter"});case"qqq":return i.quarter(e,{width:"abbreviated",context:"standalone"})||i.quarter(e,{width:"narrow",context:"standalone"});case"qqqqq":return i.quarter(e,{width:"narrow",context:"standalone"});case"qqqq":default:return i.quarter(e,{width:"wide",context:"standalone"})||i.quarter(e,{width:"abbreviated",context:"standalone"})||i.quarter(e,{width:"narrow",context:"standalone"})}}validate(e,n){return n>=1&&n<=4}set(e,n,i){return e.setMonth((i-1)*3,1),e.setHours(0,0,0,0),e}incompatibleTokens=["Y","R","Q","M","L","w","I","d","D","i","e","c","t","T"]}class z5 extends bt{incompatibleTokens=["Y","R","q","Q","L","w","I","D","i","e","c","t","T"];priority=110;parse(e,n,i){const s=r=>r-1;switch(n){case"M":return rn(jt(sn.month,e),s);case"MM":return rn(en(2,e),s);case"Mo":return rn(i.ordinalNumber(e,{unit:"month"}),s);case"MMM":return i.month(e,{width:"abbreviated",context:"formatting"})||i.month(e,{width:"narrow",context:"formatting"});case"MMMMM":return i.month(e,{width:"narrow",context:"formatting"});case"MMMM":default:return i.month(e,{width:"wide",context:"formatting"})||i.month(e,{width:"abbreviated",context:"formatting"})||i.month(e,{width:"narrow",context:"formatting"})}}validate(e,n){return n>=0&&n<=11}set(e,n,i){return e.setMonth(i,1),e.setHours(0,0,0,0),e}}class W5 extends bt{priority=110;parse(e,n,i){const s=r=>r-1;switch(n){case"L":return rn(jt(sn.month,e),s);case"LL":return rn(en(2,e),s);case"Lo":return rn(i.ordinalNumber(e,{unit:"month"}),s);case"LLL":return i.month(e,{width:"abbreviated",context:"standalone"})||i.month(e,{width:"narrow",context:"standalone"});case"LLLLL":return i.month(e,{width:"narrow",context:"standalone"});case"LLLL":default:return i.month(e,{width:"wide",context:"standalone"})||i.month(e,{width:"abbreviated",context:"standalone"})||i.month(e,{width:"narrow",context:"standalone"})}}validate(e,n){return n>=0&&n<=11}set(e,n,i){return e.setMonth(i,1),e.setHours(0,0,0,0),e}incompatibleTokens=["Y","R","q","Q","M","w","I","D","i","e","c","t","T"]}function H5(t,e,n){const i=Ve(t),s=I_(i,n)-e;return i.setDate(i.getDate()-s*7),i}class Y5 extends bt{priority=100;parse(e,n,i){switch(n){case"w":return jt(sn.week,e);case"wo":return i.ordinalNumber(e,{unit:"week"});default:return en(n.length,e)}}validate(e,n){return n>=1&&n<=53}set(e,n,i,s){return fs(H5(e,i,s),s)}incompatibleTokens=["y","R","u","q","Q","M","L","I","d","D","i","t","T"]}function j5(t,e){const n=Ve(t),i=A_(n)-e;return n.setDate(n.getDate()-i*7),n}class K5 extends bt{priority=100;parse(e,n,i){switch(n){case"I":return jt(sn.week,e);case"Io":return i.ordinalNumber(e,{unit:"week"});default:return en(n.length,e)}}validate(e,n){return n>=1&&n<=53}set(e,n,i){return xl(j5(e,i))}incompatibleTokens=["y","Y","u","q","Q","M","L","w","d","D","e","c","t","T"]}const U5=[31,28,31,30,31,30,31,31,30,31,30,31],G5=[31,29,31,30,31,30,31,31,30,31,30,31];class X5 extends bt{priority=90;subPriority=1;parse(e,n,i){switch(n){case"d":return jt(sn.date,e);case"do":return i.ordinalNumber(e,{unit:"date"});default:return en(n.length,e)}}validate(e,n){const i=e.getFullYear(),s=zS(i),r=e.getMonth();return s?n>=1&&n<=G5[r]:n>=1&&n<=U5[r]}set(e,n,i){return e.setDate(i),e.setHours(0,0,0,0),e}incompatibleTokens=["Y","R","q","Q","w","I","D","i","e","c","t","T"]}class q5 extends bt{priority=90;subpriority=1;parse(e,n,i){switch(n){case"D":case"DD":return jt(sn.dayOfYear,e);case"Do":return i.ordinalNumber(e,{unit:"date"});default:return en(n.length,e)}}validate(e,n){const i=e.getFullYear();return zS(i)?n>=1&&n<=366:n>=1&&n<=365}set(e,n,i){return e.setMonth(0,i),e.setHours(0,0,0,0),e}incompatibleTokens=["Y","R","q","Q","M","L","w","I","d","E","i","e","c","t","T"]}function R_(t,e,n){const i=_a(),s=n?.weekStartsOn??n?.locale?.options?.weekStartsOn??i.weekStartsOn??i.locale?.options?.weekStartsOn??0,r=Ve(t),o=r.getDay(),l=(e%7+7)%7,c=7-s,u=e<0||e>6?e-(o+c)%7:(l+c)%7-(o+c)%7;return ss(r,u)}class Z5 extends bt{priority=90;parse(e,n,i){switch(n){case"E":case"EE":case"EEE":return i.day(e,{width:"abbreviated",context:"formatting"})||i.day(e,{width:"short",context:"formatting"})||i.day(e,{width:"narrow",context:"formatting"});case"EEEEE":return i.day(e,{width:"narrow",context:"formatting"});case"EEEEEE":return i.day(e,{width:"short",context:"formatting"})||i.day(e,{width:"narrow",context:"formatting"});case"EEEE":default:return i.day(e,{width:"wide",context:"formatting"})||i.day(e,{width:"abbreviated",context:"formatting"})||i.day(e,{width:"short",context:"formatting"})||i.day(e,{width:"narrow",context:"formatting"})}}validate(e,n){return n>=0&&n<=6}set(e,n,i,s){return e=R_(e,i,s),e.setHours(0,0,0,0),e}incompatibleTokens=["D","i","e","c","t","T"]}class J5 extends bt{priority=90;parse(e,n,i,s){const r=o=>{const a=Math.floor((o-1)/7)*7;return(o+s.weekStartsOn+6)%7+a};switch(n){case"e":case"ee":return rn(en(n.length,e),r);case"eo":return rn(i.ordinalNumber(e,{unit:"day"}),r);case"eee":return i.day(e,{width:"abbreviated",context:"formatting"})||i.day(e,{width:"short",context:"formatting"})||i.day(e,{width:"narrow",context:"formatting"});case"eeeee":return i.day(e,{width:"narrow",context:"formatting"});case"eeeeee":return i.day(e,{width:"short",context:"formatting"})||i.day(e,{width:"narrow",context:"formatting"});case"eeee":default:return i.day(e,{width:"wide",context:"formatting"})||i.day(e,{width:"abbreviated",context:"formatting"})||i.day(e,{width:"short",context:"formatting"})||i.day(e,{width:"narrow",context:"formatting"})}}validate(e,n){return n>=0&&n<=6}set(e,n,i,s){return e=R_(e,i,s),e.setHours(0,0,0,0),e}incompatibleTokens=["y","R","u","q","Q","M","L","I","d","D","E","i","c","t","T"]}class Q5 extends bt{priority=90;parse(e,n,i,s){const r=o=>{const a=Math.floor((o-1)/7)*7;return(o+s.weekStartsOn+6)%7+a};switch(n){case"c":case"cc":return rn(en(n.length,e),r);case"co":return rn(i.ordinalNumber(e,{unit:"day"}),r);case"ccc":return i.day(e,{width:"abbreviated",context:"standalone"})||i.day(e,{width:"short",context:"standalone"})||i.day(e,{width:"narrow",context:"standalone"});case"ccccc":return i.day(e,{width:"narrow",context:"standalone"});case"cccccc":return i.day(e,{width:"short",context:"standalone"})||i.day(e,{width:"narrow",context:"standalone"});case"cccc":default:return i.day(e,{width:"wide",context:"standalone"})||i.day(e,{width:"abbreviated",context:"standalone"})||i.day(e,{width:"short",context:"standalone"})||i.day(e,{width:"narrow",context:"standalone"})}}validate(e,n){return n>=0&&n<=6}set(e,n,i,s){return e=R_(e,i,s),e.setHours(0,0,0,0),e}incompatibleTokens=["y","R","u","q","Q","M","L","I","d","D","E","i","e","t","T"]}function eB(t,e){const n=Ve(t),i=M5(n),s=e-i;return ss(n,s)}class tB extends bt{priority=90;parse(e,n,i){const s=r=>r===0?7:r;switch(n){case"i":case"ii":return en(n.length,e);case"io":return i.ordinalNumber(e,{unit:"day"});case"iii":return rn(i.day(e,{width:"abbreviated",context:"formatting"})||i.day(e,{width:"short",context:"formatting"})||i.day(e,{width:"narrow",context:"formatting"}),s);case"iiiii":return rn(i.day(e,{width:"narrow",context:"formatting"}),s);case"iiiiii":return rn(i.day(e,{width:"short",context:"formatting"})||i.day(e,{width:"narrow",context:"formatting"}),s);case"iiii":default:return rn(i.day(e,{width:"wide",context:"formatting"})||i.day(e,{width:"abbreviated",context:"formatting"})||i.day(e,{width:"short",context:"formatting"})||i.day(e,{width:"narrow",context:"formatting"}),s)}}validate(e,n){return n>=1&&n<=7}set(e,n,i){return e=eB(e,i),e.setHours(0,0,0,0),e}incompatibleTokens=["y","Y","u","q","Q","M","L","w","d","D","E","e","c","t","T"]}class nB extends bt{priority=80;parse(e,n,i){switch(n){case"a":case"aa":case"aaa":return i.dayPeriod(e,{width:"abbreviated",context:"formatting"})||i.dayPeriod(e,{width:"narrow",context:"formatting"});case"aaaaa":return i.dayPeriod(e,{width:"narrow",context:"formatting"});case"aaaa":default:return i.dayPeriod(e,{width:"wide",context:"formatting"})||i.dayPeriod(e,{width:"abbreviated",context:"formatting"})||i.dayPeriod(e,{width:"narrow",context:"formatting"})}}set(e,n,i){return e.setHours(P_(i),0,0,0),e}incompatibleTokens=["b","B","H","k","t","T"]}class iB extends bt{priority=80;parse(e,n,i){switch(n){case"b":case"bb":case"bbb":return i.dayPeriod(e,{width:"abbreviated",context:"formatting"})||i.dayPeriod(e,{width:"narrow",context:"formatting"});case"bbbbb":return i.dayPeriod(e,{width:"narrow",context:"formatting"});case"bbbb":default:return i.dayPeriod(e,{width:"wide",context:"formatting"})||i.dayPeriod(e,{width:"abbreviated",context:"formatting"})||i.dayPeriod(e,{width:"narrow",context:"formatting"})}}set(e,n,i){return e.setHours(P_(i),0,0,0),e}incompatibleTokens=["a","B","H","k","t","T"]}class sB extends bt{priority=80;parse(e,n,i){switch(n){case"B":case"BB":case"BBB":return i.dayPeriod(e,{width:"abbreviated",context:"formatting"})||i.dayPeriod(e,{width:"narrow",context:"formatting"});case"BBBBB":return i.dayPeriod(e,{width:"narrow",context:"formatting"});case"BBBB":default:return i.dayPeriod(e,{width:"wide",context:"formatting"})||i.dayPeriod(e,{width:"abbreviated",context:"formatting"})||i.dayPeriod(e,{width:"narrow",context:"formatting"})}}set(e,n,i){return e.setHours(P_(i),0,0,0),e}incompatibleTokens=["a","b","t","T"]}class rB extends bt{priority=70;parse(e,n,i){switch(n){case"h":return jt(sn.hour12h,e);case"ho":return i.ordinalNumber(e,{unit:"hour"});default:return en(n.length,e)}}validate(e,n){return n>=1&&n<=12}set(e,n,i){const s=e.getHours()>=12;return s&&i<12?e.setHours(i+12,0,0,0):!s&&i===12?e.setHours(0,0,0,0):e.setHours(i,0,0,0),e}incompatibleTokens=["H","K","k","t","T"]}class oB extends bt{priority=70;parse(e,n,i){switch(n){case"H":return jt(sn.hour23h,e);case"Ho":return i.ordinalNumber(e,{unit:"hour"});default:return en(n.length,e)}}validate(e,n){return n>=0&&n<=23}set(e,n,i){return e.setHours(i,0,0,0),e}incompatibleTokens=["a","b","h","K","k","t","T"]}class aB extends bt{priority=70;parse(e,n,i){switch(n){case"K":return jt(sn.hour11h,e);case"Ko":return i.ordinalNumber(e,{unit:"hour"});default:return en(n.length,e)}}validate(e,n){return n>=0&&n<=11}set(e,n,i){return e.getHours()>=12&&i<12?e.setHours(i+12,0,0,0):e.setHours(i,0,0,0),e}incompatibleTokens=["h","H","k","t","T"]}class lB extends bt{priority=70;parse(e,n,i){switch(n){case"k":return jt(sn.hour24h,e);case"ko":return i.ordinalNumber(e,{unit:"hour"});default:return en(n.length,e)}}validate(e,n){return n>=1&&n<=24}set(e,n,i){const s=i<=24?i%24:i;return e.setHours(s,0,0,0),e}incompatibleTokens=["a","b","h","H","K","t","T"]}class cB extends bt{priority=60;parse(e,n,i){switch(n){case"m":return jt(sn.minute,e);case"mo":return i.ordinalNumber(e,{unit:"minute"});default:return en(n.length,e)}}validate(e,n){return n>=0&&n<=59}set(e,n,i){return e.setMinutes(i,0,0),e}incompatibleTokens=["t","T"]}class uB extends bt{priority=50;parse(e,n,i){switch(n){case"s":return jt(sn.second,e);case"so":return i.ordinalNumber(e,{unit:"second"});default:return en(n.length,e)}}validate(e,n){return n>=0&&n<=59}set(e,n,i){return e.setSeconds(i,0),e}incompatibleTokens=["t","T"]}class dB extends bt{priority=30;parse(e,n){const i=s=>Math.trunc(s*Math.pow(10,-n.length+3));return rn(en(n.length,e),i)}set(e,n,i){return e.setMilliseconds(i),e}incompatibleTokens=["t","T"]}class hB extends bt{priority=10;parse(e,n){switch(n){case"X":return Es(xs.basicOptionalMinutes,e);case"XX":return Es(xs.basic,e);case"XXXX":return Es(xs.basicOptionalSeconds,e);case"XXXXX":return Es(xs.extendedOptionalSeconds,e);case"XXX":default:return Es(xs.extended,e)}}set(e,n,i){return n.timestampIsSet?e:yt(e,e.getTime()-yh(e)-i)}incompatibleTokens=["t","T","x"]}class fB extends bt{priority=10;parse(e,n){switch(n){case"x":return Es(xs.basicOptionalMinutes,e);case"xx":return Es(xs.basic,e);case"xxxx":return Es(xs.basicOptionalSeconds,e);case"xxxxx":return Es(xs.extendedOptionalSeconds,e);case"xxx":default:return Es(xs.extended,e)}}set(e,n,i){return n.timestampIsSet?e:yt(e,e.getTime()-yh(e)-i)}incompatibleTokens=["t","T","X"]}class gB extends bt{priority=40;parse(e){return BS(e)}set(e,n,i){return[yt(e,i*1e3),{timestampIsSet:!0}]}incompatibleTokens="*"}class pB extends bt{priority=20;parse(e){return BS(e)}set(e,n,i){return[yt(e,i),{timestampIsSet:!0}]}incompatibleTokens="*"}const mB={G:new $5,y:new L5,Y:new O5,R:new N5,u:new F5,Q:new B5,q:new V5,M:new z5,L:new W5,w:new Y5,I:new K5,d:new X5,D:new q5,E:new Z5,e:new J5,c:new Q5,i:new tB,a:new nB,b:new iB,B:new sB,h:new rB,H:new oB,K:new aB,k:new lB,m:new cB,s:new uB,S:new dB,X:new hB,x:new fB,t:new gB,T:new pB},_B=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,yB=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,vB=/^'([^]*?)'?$/,bB=/''/g,wB=/\S/,xB=/[a-zA-Z]/;function Qp(t,e,n,i){const s=A5(),r=i?.locale??s.locale??$S,o=i?.firstWeekContainsDate??i?.locale?.options?.firstWeekContainsDate??s.firstWeekContainsDate??s.locale?.options?.firstWeekContainsDate??1,a=i?.weekStartsOn??i?.locale?.options?.weekStartsOn??s.weekStartsOn??s.locale?.options?.weekStartsOn??0;if(e==="")return t===""?Ve(n):yt(n,NaN);const l={firstWeekContainsDate:o,weekStartsOn:a,locale:r},c=[new D5],u=e.match(yB).map(m=>{const y=m[0];if(y in Zp){const v=Zp[y];return v(m,r.formatLong)}return m}).join("").match(_B),d=[];for(let m of u){!i?.useAdditionalWeekYearTokens&&NS(m)&&Jp(m,e,t),!i?.useAdditionalDayOfYearTokens&&OS(m)&&Jp(m,e,t);const y=m[0],v=mB[y];if(v){const{incompatibleTokens:b}=v;if(Array.isArray(b)){const C=d.find(w=>b.includes(w.token)||w.token===y);if(C)throw new RangeError(`The format string mustn't contain \`${C.fullToken}\` and \`${m}\` at the same time`)}else if(v.incompatibleTokens==="*"&&d.length>0)throw new RangeError(`The format string mustn't contain \`${m}\` and any other token at the same time`);d.push({token:y,fullToken:m});const E=v.run(t,m,r.match,l);if(!E)return yt(n,NaN);c.push(E.setter),t=E.rest}else{if(y.match(xB))throw new RangeError("Format string contains an unescaped latin alphabet character `"+y+"`");if(m==="''"?m="'":y==="'"&&(m=EB(m)),t.indexOf(m)===0)t=t.slice(m.length);else return yt(n,NaN)}}if(t.length>0&&wB.test(t))return yt(n,NaN);const h=c.map(m=>m.priority).sort((m,y)=>y-m).filter((m,y,v)=>v.indexOf(m)===y).map(m=>c.filter(y=>y.priority===m).sort((y,v)=>v.subPriority-y.subPriority)).map(m=>m[0]);let f=Ve(n);if(isNaN(f.getTime()))return yt(n,NaN);const p={};for(const m of h){if(!m.validate(f,l))return yt(n,NaN);const y=m.set(f,p,l);Array.isArray(y)?(f=y[0],Object.assign(p,y[1])):f=y}return yt(n,f)}function EB(t){return t.match(vB)[1].replace(bB,"'")}function bb(t,e){const n=Ko(t),i=Ko(e);return+n==+i}function SB(t,e){return ss(t,-e)}function WS(t,e){const n=Ve(t),i=n.getFullYear(),s=n.getDate(),r=yt(t,0);r.setFullYear(i,e,15),r.setHours(0,0,0,0);const o=k5(r);return n.setMonth(e,Math.min(s,o)),n}function It(t,e){let n=Ve(t);return isNaN(+n)?yt(t,NaN):(e.year!=null&&n.setFullYear(e.year),e.month!=null&&(n=WS(n,e.month)),e.date!=null&&n.setDate(e.date),e.hours!=null&&n.setHours(e.hours),e.minutes!=null&&n.setMinutes(e.minutes),e.seconds!=null&&n.setSeconds(e.seconds),e.milliseconds!=null&&n.setMilliseconds(e.milliseconds),n)}function CB(t,e){const n=Ve(t);return n.setHours(e),n}function HS(t,e){const n=Ve(t);return n.setMilliseconds(e),n}function TB(t,e){const n=Ve(t);return n.setMinutes(e),n}function YS(t,e){const n=Ve(t);return n.setSeconds(e),n}function Ts(t,e){const n=Ve(t);return isNaN(+n)?yt(t,NaN):(n.setFullYear(e),n)}function Cl(t,e){return us(t,-e)}function kB(t,e){const{years:n=0,months:i=0,weeks:s=0,days:r=0,hours:o=0,minutes:a=0,seconds:l=0}=e,c=Cl(t,i+n*12),u=SB(c,r+s*7),d=a+o*60,f=(l+d*60)*1e3;return yt(t,u.getTime()-f)}function jS(t,e){return k_(t,-e)}function Ul(){const t=TR();return D(),V("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor","aria-hidden":"true",class:"dp__icon",role:"img",...t},[g("path",{d:"M29.333 8c0-2.208-1.792-4-4-4h-18.667c-2.208 0-4 1.792-4 4v18.667c0 2.208 1.792 4 4 4h18.667c2.208 0 4-1.792 4-4v-18.667zM26.667 8v18.667c0 0.736-0.597 1.333-1.333 1.333 0 0-18.667 0-18.667 0-0.736 0-1.333-0.597-1.333-1.333 0 0 0-18.667 0-18.667 0-0.736 0.597-1.333 1.333-1.333 0 0 18.667 0 18.667 0 0.736 0 1.333 0.597 1.333 1.333z"}),g("path",{d:"M20 2.667v5.333c0 0.736 0.597 1.333 1.333 1.333s1.333-0.597 1.333-1.333v-5.333c0-0.736-0.597-1.333-1.333-1.333s-1.333 0.597-1.333 1.333z"}),g("path",{d:"M9.333 2.667v5.333c0 0.736 0.597 1.333 1.333 1.333s1.333-0.597 1.333-1.333v-5.333c0-0.736-0.597-1.333-1.333-1.333s-1.333 0.597-1.333 1.333z"}),g("path",{d:"M4 14.667h24c0.736 0 1.333-0.597 1.333-1.333s-0.597-1.333-1.333-1.333h-24c-0.736 0-1.333 0.597-1.333 1.333s0.597 1.333 1.333 1.333z"})])}Ul.compatConfig={MODE:3};function KS(){return D(),V("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor","aria-hidden":"true",class:"dp__icon",role:"img"},[g("path",{d:"M23.057 7.057l-16 16c-0.52 0.52-0.52 1.365 0 1.885s1.365 0.52 1.885 0l16-16c0.52-0.52 0.52-1.365 0-1.885s-1.365-0.52-1.885 0z"}),g("path",{d:"M7.057 8.943l16 16c0.52 0.52 1.365 0.52 1.885 0s0.52-1.365 0-1.885l-16-16c-0.52-0.52-1.365-0.52-1.885 0s-0.52 1.365 0 1.885z"})])}KS.compatConfig={MODE:3};function D_(){return D(),V("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor","aria-hidden":"true",class:"dp__icon",role:"img"},[g("path",{d:"M20.943 23.057l-7.057-7.057c0 0 7.057-7.057 7.057-7.057 0.52-0.52 0.52-1.365 0-1.885s-1.365-0.52-1.885 0l-8 8c-0.521 0.521-0.521 1.365 0 1.885l8 8c0.52 0.52 1.365 0.52 1.885 0s0.52-1.365 0-1.885z"})])}D_.compatConfig={MODE:3};function $_(){return D(),V("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor","aria-hidden":"true",class:"dp__icon",role:"img"},[g("path",{d:"M12.943 24.943l8-8c0.521-0.521 0.521-1.365 0-1.885l-8-8c-0.52-0.52-1.365-0.52-1.885 0s-0.52 1.365 0 1.885l7.057 7.057c0 0-7.057 7.057-7.057 7.057-0.52 0.52-0.52 1.365 0 1.885s1.365 0.52 1.885 0z"})])}$_.compatConfig={MODE:3};function L_(){return D(),V("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor","aria-hidden":"true",class:"dp__icon",role:"img"},[g("path",{d:"M16 1.333c-8.095 0-14.667 6.572-14.667 14.667s6.572 14.667 14.667 14.667c8.095 0 14.667-6.572 14.667-14.667s-6.572-14.667-14.667-14.667zM16 4c6.623 0 12 5.377 12 12s-5.377 12-12 12c-6.623 0-12-5.377-12-12s5.377-12 12-12z"}),g("path",{d:"M14.667 8v8c0 0.505 0.285 0.967 0.737 1.193l5.333 2.667c0.658 0.329 1.46 0.062 1.789-0.596s0.062-1.46-0.596-1.789l-4.596-2.298c0 0 0-7.176 0-7.176 0-0.736-0.597-1.333-1.333-1.333s-1.333 0.597-1.333 1.333z"})])}L_.compatConfig={MODE:3};function O_(){return D(),V("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor","aria-hidden":"true",class:"dp__icon",role:"img"},[g("path",{d:"M24.943 19.057l-8-8c-0.521-0.521-1.365-0.521-1.885 0l-8 8c-0.52 0.52-0.52 1.365 0 1.885s1.365 0.52 1.885 0l7.057-7.057c0 0 7.057 7.057 7.057 7.057 0.52 0.52 1.365 0.52 1.885 0s0.52-1.365 0-1.885z"})])}O_.compatConfig={MODE:3};function N_(){return D(),V("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor","aria-hidden":"true",class:"dp__icon",role:"img"},[g("path",{d:"M7.057 12.943l8 8c0.521 0.521 1.365 0.521 1.885 0l8-8c0.52-0.52 0.52-1.365 0-1.885s-1.365-0.52-1.885 0l-7.057 7.057c0 0-7.057-7.057-7.057-7.057-0.52-0.52-1.365-0.52-1.885 0s-0.52 1.365 0 1.885z"})])}N_.compatConfig={MODE:3};const _i=(t,e)=>e?new Date(t.toLocaleString("en-US",{timeZone:e})):new Date(t),F_=(t,e,n)=>em(t,e,n)||xe(),AB=(t,e,n)=>{const i=e.dateInTz?_i(new Date(t),e.dateInTz):xe(t);return n?ni(i,!0):i},em=(t,e,n)=>{if(!t)return null;const i=n?ni(xe(t),!0):xe(t);return e?e.exactMatch?AB(t,e,n):_i(i,e.timezone):i},MB=t=>{if(!t)return 0;const e=new Date,n=new Date(e.toLocaleString("en-US",{timeZone:"UTC"})),i=new Date(e.toLocaleString("en-US",{timeZone:t})),s=i.getTimezoneOffset()/60;return(+n-+i)/(1e3*60*60)-s};var es=(t=>(t.month="month",t.year="year",t))(es||{}),Vo=(t=>(t.top="top",t.bottom="bottom",t))(Vo||{}),ta=(t=>(t.header="header",t.calendar="calendar",t.timePicker="timePicker",t))(ta||{}),zn=(t=>(t.month="month",t.year="year",t.calendar="calendar",t.time="time",t.minutes="minutes",t.hours="hours",t.seconds="seconds",t))(zn||{});const IB=["timestamp","date","iso"];var Xn=(t=>(t.up="up",t.down="down",t.left="left",t.right="right",t))(Xn||{}),Lt=(t=>(t.arrowUp="ArrowUp",t.arrowDown="ArrowDown",t.arrowLeft="ArrowLeft",t.arrowRight="ArrowRight",t.enter="Enter",t.space=" ",t.esc="Escape",t.tab="Tab",t.home="Home",t.end="End",t.pageUp="PageUp",t.pageDown="PageDown",t))(Lt||{});function wb(t){return e=>new Intl.DateTimeFormat(t,{weekday:"short",timeZone:"UTC"}).format(new Date(`2017-01-0${e}T00:00:00+00:00`)).slice(0,2)}function PB(t){return e=>Rs(_i(new Date(`2017-01-0${e}T00:00:00+00:00`),"UTC"),"EEEEEE",{locale:t})}const RB=(t,e,n)=>{const i=[1,2,3,4,5,6,7];let s;if(t!==null)try{s=i.map(PB(t))}catch{s=i.map(wb(e))}else s=i.map(wb(e));const r=s.slice(0,n),o=s.slice(n+1,s.length);return[s[n]].concat(...o).concat(...r)},B_=(t,e,n)=>{const i=[];for(let s=+t[0];s<=+t[1];s++)i.push({value:+s,text:qS(s,e)});return n?i.reverse():i},US=(t,e,n)=>{const i=[1,2,3,4,5,6,7,8,9,10,11,12].map(r=>{const o=r<10?`0${r}`:r;return new Date(`2017-${o}-01T00:00:00+00:00`)});if(t!==null)try{const r=n==="long"?"LLLL":"LLL";return i.map((o,a)=>{const l=Rs(_i(o,"UTC"),r,{locale:t});return{text:l.charAt(0).toUpperCase()+l.substring(1),value:a}})}catch{}const s=new Intl.DateTimeFormat(e,{month:n,timeZone:"UTC"});return i.map((r,o)=>{const a=s.format(r);return{text:a.charAt(0).toUpperCase()+a.substring(1),value:o}})},DB=t=>[12,1,2,3,4,5,6,7,8,9,10,11,12,1,2,3,4,5,6,7,8,9,10,11][t],mn=t=>{const e=Q(t);return e!=null&&e.$el?e?.$el:e},$B=t=>({type:"dot",...t??{}}),GS=t=>Array.isArray(t)?!!t[0]&&!!t[1]:!1,V_={prop:t=>`"${t}" prop must be enabled!`,dateArr:t=>`You need to use array as "model-value" binding in order to support "${t}"`},Tn=t=>t,xb=t=>t===0?t:!t||isNaN(+t)?null:+t,Eb=t=>t===null,XS=t=>{if(t)return[...t.querySelectorAll("input, button, select, textarea, a[href]")][0]},LB=t=>{const e=[],n=i=>i.filter(s=>s);for(let i=0;i{const i=n!=null,s=e!=null;if(!i&&!s)return!1;const r=+n,o=+e;return i&&s?+t>r||+tr:s?+tLB(t).map(n=>n.map(i=>{const{active:s,disabled:r,isBetween:o,highlighted:a}=e(i);return{...i,active:s,disabled:r,className:{dp__overlay_cell_active:s,dp__overlay_cell:!s,dp__overlay_cell_disabled:r,dp__overlay_cell_pad:!0,dp__overlay_cell_active_disabled:r&&s,dp__cell_in_between:o,"dp--highlighted":a}}})),Qr=(t,e,n=!1)=>{t&&e.allowStopPropagation&&(n&&t.stopImmediatePropagation(),t.stopPropagation())},OB=()=>["a[href]","area[href]","input:not([disabled]):not([type='hidden'])","select:not([disabled])","textarea:not([disabled])","button:not([disabled])","[tabindex]:not([tabindex='-1'])","[data-datepicker-instance]"].join(", ");function NB(t,e){let n=[...document.querySelectorAll(OB())];n=n.filter(s=>!t.contains(s)||s.hasAttribute("data-datepicker-instance"));const i=n.indexOf(t);if(i>=0&&(e?i-1>=0:i+1<=n.length))return n[i+(e?-1:1)]}const tm=(t,e)=>t?.querySelector(`[data-dp-element="${e}"]`),qS=(t,e)=>new Intl.NumberFormat(e,{useGrouping:!1,style:"decimal"}).format(t),z_=t=>Rs(t,"dd-MM-yyyy"),Rg=t=>Array.isArray(t),bh=(t,e)=>e.get(z_(t)),FB=(t,e)=>t?e?e instanceof Map?!!bh(t,e):e(xe(t)):!1:!0,Qn=(t,e,n=!1,i)=>{if(t.key===Lt.enter||t.key===Lt.space)return n&&t.preventDefault(),e();if(i)return i(t)},BB=()=>["iPad Simulator","iPhone Simulator","iPod Simulator","iPad","iPhone","iPod"].some(t=>navigator.userAgent.includes(t))||navigator.userAgent.includes("Mac")&&"ontouchend"in document,Sb=(t,e,n,i,s,r)=>{const o=Qp(t,e.slice(0,t.length),new Date,{locale:r});return zc(o)&&IS(o)?i||s?o:It(o,{hours:+n.hours,minutes:+n?.minutes,seconds:+n?.seconds,milliseconds:0}):null},VB=(t,e,n,i,s,r)=>{const o=Array.isArray(n)?n[0]:n;if(typeof e=="string")return Sb(t,e,o,i,s,r);if(Array.isArray(e)){let a=null;for(const l of e)if(a=Sb(t,l,o,i,s,r),a)break;return a}return typeof e=="function"?e(t):null},xe=t=>t?new Date(t):new Date,zB=(t,e,n)=>{if(e){const s=(t.getMonth()+1).toString().padStart(2,"0"),r=t.getDate().toString().padStart(2,"0"),o=t.getHours().toString().padStart(2,"0"),a=t.getMinutes().toString().padStart(2,"0"),l=n?t.getSeconds().toString().padStart(2,"0"):"00";return`${t.getFullYear()}-${s}-${r}T${o}:${a}:${l}.000Z`}const i=Date.UTC(t.getUTCFullYear(),t.getUTCMonth(),t.getUTCDate(),t.getUTCHours(),t.getUTCMinutes(),t.getUTCSeconds());return new Date(i).toISOString()},ni=(t,e)=>{const n=xe(JSON.parse(JSON.stringify(t))),i=It(n,{hours:0,minutes:0,seconds:0,milliseconds:0});return e?$F(i):i},eo=(t,e,n,i)=>{let s=t?xe(t):xe();return(e||e===0)&&(s=CB(s,+e)),(n||n===0)&&(s=TB(s,+n)),(i||i===0)&&(s=YS(s,+i)),HS(s,0)},Xt=(t,e)=>!t||!e?!1:ou(ni(t),ni(e)),ct=(t,e)=>!t||!e?!1:Za(ni(t),ni(e)),nn=(t,e)=>!t||!e?!1:Sl(ni(t),ni(e)),mf=(t,e,n)=>t!=null&&t[0]&&t!=null&&t[1]?nn(n,t[0])&&Xt(n,t[1]):t!=null&&t[0]&&e?nn(n,t[0])&&Xt(n,e)||Xt(n,t[0])&&nn(n,e):!1,rs=t=>{const e=It(new Date(t),{date:1});return ni(e)},Dg=(t,e,n)=>e&&(n||n===0)?Object.fromEntries(["hours","minutes","seconds"].map(i=>i===e?[i,n]:[i,isNaN(+t[i])?void 0:+t[i]])):{hours:isNaN(+t.hours)?void 0:+t.hours,minutes:isNaN(+t.minutes)?void 0:+t.minutes,seconds:isNaN(+t.seconds)?void 0:+t.seconds},na=t=>({hours:pr(t),minutes:oo(t),seconds:El(t)}),ZS=(t,e)=>{if(e){const n=Ge(xe(e));if(n>t)return 12;if(n===t)return at(xe(e))}},JS=(t,e)=>{if(e){const n=Ge(xe(e));return n{if(t)return Ge(xe(t))},QS=(t,e)=>{const n=nn(t,e)?e:t,i=nn(e,t)?e:t;return PS({start:n,end:i})},WB=t=>{const e=us(t,1);return{month:at(e),year:Ge(e)}},er=(t,e)=>{const n=fs(t,{weekStartsOn:+e}),i=DS(t,{weekStartsOn:+e});return[n,i]},eC=(t,e)=>{const n={hours:pr(xe()),minutes:oo(xe()),seconds:e?El(xe()):0};return Object.assign(n,t)},Yr=(t,e,n)=>[It(xe(t),{date:1}),It(xe(),{month:e,year:n,date:1})],sr=(t,e,n)=>{let i=t?xe(t):xe();return(e||e===0)&&(i=WS(i,e)),n&&(i=Ts(i,n)),i},tC=(t,e,n,i,s)=>{if(!i||s&&!e||!s&&!n)return!1;const r=s?us(t,1):Cl(t,1),o=[at(r),Ge(r)];return s?!YB(...o,e):!HB(...o,n)},HB=(t,e,n)=>Xt(...Yr(n,t,e))||ct(...Yr(n,t,e)),YB=(t,e,n)=>nn(...Yr(n,t,e))||ct(...Yr(n,t,e)),nC=(t,e,n,i,s,r,o)=>{if(typeof e=="function"&&!o)return e(t);const a=n?{locale:n}:void 0;return Array.isArray(t)?`${Rs(t[0],r,a)}${s&&!t[1]?"":i}${t[1]?Rs(t[1],r,a):""}`:Rs(t,r,a)},Ra=t=>{if(t)return null;throw new Error(V_.prop("partial-range"))},wd=(t,e)=>{if(e)return t();throw new Error(V_.prop("range"))},nm=t=>Array.isArray(t)?zc(t[0])&&(t[1]?zc(t[1]):!0):t?zc(t):!1,jB=(t,e)=>It(e??xe(),{hours:+t.hours||0,minutes:+t.minutes||0,seconds:+t.seconds||0}),$g=(t,e,n,i)=>{if(!t)return!0;if(i){const s=n==="max"?ou(t,e):Sl(t,e),r={seconds:0,milliseconds:0};return s||Za(It(t,r),It(e,r))}return n==="max"?t.getTime()<=e.getTime():t.getTime()>=e.getTime()},Lg=(t,e,n)=>t?jB(t,e):xe(n??e),Cb=(t,e,n,i,s)=>{if(Array.isArray(i)){const o=Lg(t,i[0],e),a=Lg(t,i[1],e);return $g(i[0],o,n,!!e)&&$g(i[1],a,n,!!e)&&s}const r=Lg(t,i,e);return $g(i,r,n,!!e)&&s},Og=t=>It(xe(),na(t)),KB=(t,e)=>t instanceof Map?Array.from(t.values()).filter(n=>Ge(xe(n))===e).map(n=>at(n)):[],iC=(t,e,n)=>typeof t=="function"?t({month:e,year:n}):!!t.months.find(i=>i.month===e&&i.year===n),W_=(t,e)=>typeof t=="function"?t(e):t.years.includes(e),sC=t=>Rs(t,"yyyy-MM-dd"),cc=Ns({menuFocused:!1,shiftKeyInMenu:!1}),rC=()=>{const t=n=>{cc.menuFocused=n},e=n=>{cc.shiftKeyInMenu!==n&&(cc.shiftKeyInMenu=n)};return{control:be(()=>({shiftKeyInMenu:cc.shiftKeyInMenu,menuFocused:cc.menuFocused})),setMenuFocused:t,setShiftKey:e}},$t=Ns({monthYear:[],calendar:[],time:[],actionRow:[],selectionGrid:[],timePicker:{0:[],1:[]},monthPicker:[]}),Ng=we(null),xd=we(!1),Fg=we(!1),Bg=we(!1),Vg=we(!1),Nn=we(0),tn=we(0),mo=()=>{const t=be(()=>xd.value?[...$t.selectionGrid,$t.actionRow].filter(d=>d.length):Fg.value?[...$t.timePicker[0],...$t.timePicker[1],Vg.value?[]:[Ng.value],$t.actionRow].filter(d=>d.length):Bg.value?[...$t.monthPicker,$t.actionRow]:[$t.monthYear,...$t.calendar,$t.time,$t.actionRow].filter(d=>d.length)),e=d=>{Nn.value=d?Nn.value+1:Nn.value-1;let h=null;t.value[tn.value]&&(h=t.value[tn.value][Nn.value]),!h&&t.value[tn.value+(d?1:-1)]?(tn.value=tn.value+(d?1:-1),Nn.value=d?0:t.value[tn.value].length-1):h||(Nn.value=d?Nn.value-1:Nn.value+1)},n=d=>{tn.value===0&&!d||tn.value===t.value.length&&d||(tn.value=d?tn.value+1:tn.value-1,t.value[tn.value]?t.value[tn.value]&&!t.value[tn.value][Nn.value]&&Nn.value!==0&&(Nn.value=t.value[tn.value].length-1):tn.value=d?tn.value-1:tn.value+1)},i=d=>{let h=null;t.value[tn.value]&&(h=t.value[tn.value][Nn.value]),h?h.focus({preventScroll:!xd.value}):Nn.value=d?Nn.value-1:Nn.value+1},s=()=>{e(!0),i(!0)},r=()=>{e(!1),i(!1)},o=()=>{n(!1),i(!0)},a=()=>{n(!0),i(!0)},l=(d,h)=>{$t[h]=d},c=(d,h)=>{$t[h]=d},u=()=>{Nn.value=0,tn.value=0};return{buildMatrix:l,buildMultiLevelMatrix:c,setTimePickerBackRef:d=>{Ng.value=d},setSelectionGrid:d=>{xd.value=d,u(),d||($t.selectionGrid=[])},setTimePicker:(d,h=!1)=>{Fg.value=d,Vg.value=h,u(),d||($t.timePicker[0]=[],$t.timePicker[1]=[])},setTimePickerElements:(d,h=0)=>{$t.timePicker[h]=d},arrowRight:s,arrowLeft:r,arrowUp:o,arrowDown:a,clearArrowNav:()=>{$t.monthYear=[],$t.calendar=[],$t.time=[],$t.actionRow=[],$t.selectionGrid=[],$t.timePicker[0]=[],$t.timePicker[1]=[],xd.value=!1,Fg.value=!1,Vg.value=!1,Bg.value=!1,u(),Ng.value=null},setMonthPicker:d=>{Bg.value=d,u()},refSets:$t}},Tb=t=>({menuAppearTop:"dp-menu-appear-top",menuAppearBottom:"dp-menu-appear-bottom",open:"dp-slide-down",close:"dp-slide-up",next:"calendar-next",previous:"calendar-prev",vNext:"dp-slide-up",vPrevious:"dp-slide-down",...t??{}}),UB=t=>({toggleOverlay:"Toggle overlay",menu:"Datepicker menu",input:"Datepicker input",openTimePicker:"Open time picker",closeTimePicker:"Close time Picker",incrementValue:e=>`Increment ${e}`,decrementValue:e=>`Decrement ${e}`,openTpOverlay:e=>`Open ${e} overlay`,amPmButton:"Switch AM/PM mode",openYearsOverlay:"Open years overlay",openMonthsOverlay:"Open months overlay",nextMonth:"Next month",prevMonth:"Previous month",nextYear:"Next year",prevYear:"Previous year",day:void 0,weekDay:void 0,clearInput:"Clear value",calendarIcon:"Calendar icon",timePicker:"Time picker",monthPicker:e=>`Month picker${e?" overlay":""}`,yearPicker:e=>`Year picker${e?" overlay":""}`,timeOverlay:e=>`${e} overlay`,...t??{}}),kb=t=>t?typeof t=="boolean"?t?2:0:+t>=2?+t:2:0,GB=t=>{const e=typeof t=="object"&&t,n={static:!0,solo:!1};if(!t)return{...n,count:kb(!1)};const i=e?t:{},s=e?i.count??!0:t,r=kb(s);return Object.assign(n,i,{count:r})},XB=(t,e,n)=>t||(typeof n=="string"?n:e),qB=t=>typeof t=="boolean"?t?Tb({}):!1:Tb(t),ZB=t=>{const e={enterSubmit:!0,tabSubmit:!0,openMenu:"open",selectOnFocus:!1,rangeSeparator:" - "};return typeof t=="object"?{...e,...t??{},enabled:!0}:{...e,enabled:t}},JB=t=>({months:[],years:[],times:{hours:[],minutes:[],seconds:[]},...t??{}}),QB=t=>({showSelect:!0,showCancel:!0,showNow:!1,showPreview:!0,...t??{}}),e4=t=>{const e={input:!1};return typeof t=="object"?{...e,...t??{},enabled:!0}:{enabled:t,...e}},t4=t=>({allowStopPropagation:!0,closeOnScroll:!1,modeHeight:255,allowPreventDefault:!1,closeOnClearValue:!0,closeOnAutoApply:!0,noSwipe:!1,keepActionRow:!1,onClickOutside:void 0,tabOutClosesMenu:!0,arrowLeft:void 0,keepViewOnOffsetClick:!1,timeArrowHoldThreshold:0,shadowDom:!1,...t??{}}),n4=t=>{const e={dates:Array.isArray(t)?t.map(n=>xe(n)):[],years:[],months:[],quarters:[],weeks:[],weekdays:[],options:{highlightDisabled:!1}};return typeof t=="function"?t:{...e,...t??{}}},i4=t=>typeof t=="object"?{type:t?.type??"local",hideOnOffsetDates:t?.hideOnOffsetDates??!1}:{type:t,hideOnOffsetDates:!1},s4=t=>{const e={noDisabledRange:!1,showLastInRange:!0,minMaxRawRange:!1,partialRange:!0,disableTimeRangeValidation:!1,maxRange:void 0,minRange:void 0,autoRange:void 0,fixedStart:!1,fixedEnd:!1};return typeof t=="object"?{enabled:!0,...e,...t}:{enabled:t,...e}},r4=t=>t?typeof t=="string"?{timezone:t,exactMatch:!1,dateInTz:void 0,emitTimezone:void 0,convertModel:!0}:{timezone:t.timezone,exactMatch:t.exactMatch??!1,dateInTz:t.dateInTz??void 0,emitTimezone:t.emitTimezone??void 0,convertModel:t.convertModel??!0}:{timezone:void 0,exactMatch:!1,emitTimezone:void 0},zg=(t,e,n)=>new Map(t.map(i=>{const s=F_(i,e,n);return[z_(s),s]})),o4=(t,e)=>t.length?new Map(t.map(n=>{const i=F_(n.date,e);return[z_(i),n]})):null,a4=t=>{var e;return{minDate:em(t.minDate,t.timezone,t.isSpecific),maxDate:em(t.maxDate,t.timezone,t.isSpecific),disabledDates:Rg(t.disabledDates)?zg(t.disabledDates,t.timezone,t.isSpecific):t.disabledDates,allowedDates:Rg(t.allowedDates)?zg(t.allowedDates,t.timezone,t.isSpecific):null,highlight:typeof t.highlight=="object"&&Rg((e=t.highlight)==null?void 0:e.dates)?zg(t.highlight.dates,t.timezone):t.highlight,markers:o4(t.markers,t.timezone)}},l4=t=>typeof t=="boolean"?{enabled:t,dragSelect:!0,limit:null}:{enabled:!!t,limit:t.limit?+t.limit:null,dragSelect:t.dragSelect??!0},c4=t=>({...Object.fromEntries(Object.keys(t).map(e=>{const n=e,i=t[n],s=typeof t[n]=="string"?{[i]:!0}:Object.fromEntries(i.map(r=>[r,!0]));return[e,s]}))}),Wt=t=>{const e=()=>{const x=t.enableSeconds?":ss":"",T=t.enableMinutes?":mm":"";return t.is24?`HH${T}${x}`:`hh${T}${x} aa`},n=()=>{var x;return t.format?t.format:t.monthPicker?"MM/yyyy":t.timePicker?e():t.weekPicker?`${((x=y.value)==null?void 0:x.type)==="iso"?"RR":"ww"}-yyyy`:t.yearPicker?"yyyy":t.quarterPicker?"QQQ/yyyy":t.enableTimePicker?`MM/dd/yyyy, ${e()}`:"MM/dd/yyyy"},i=x=>eC(x,t.enableSeconds),s=()=>C.value.enabled?t.startTime&&Array.isArray(t.startTime)?[i(t.startTime[0]),i(t.startTime[1])]:null:t.startTime&&!Array.isArray(t.startTime)?i(t.startTime):null,r=be(()=>GB(t.multiCalendars)),o=be(()=>s()),a=be(()=>UB(t.ariaLabels)),l=be(()=>JB(t.filters)),c=be(()=>qB(t.transitions)),u=be(()=>QB(t.actionRow)),d=be(()=>XB(t.previewFormat,t.format,n())),h=be(()=>ZB(t.textInput)),f=be(()=>e4(t.inline)),p=be(()=>t4(t.config)),m=be(()=>n4(t.highlight)),y=be(()=>i4(t.weekNumbers)),v=be(()=>r4(t.timezone)),b=be(()=>l4(t.multiDates)),E=be(()=>a4({minDate:t.minDate,maxDate:t.maxDate,disabledDates:t.disabledDates,allowedDates:t.allowedDates,highlight:m.value,markers:t.markers,timezone:v.value,isSpecific:t.monthPicker||t.yearPicker||t.quarterPicker})),C=be(()=>s4(t.range)),w=be(()=>c4(t.ui));return{defaultedTransitions:c,defaultedMultiCalendars:r,defaultedStartTime:o,defaultedAriaLabels:a,defaultedFilters:l,defaultedActionRow:u,defaultedPreviewFormat:d,defaultedTextInput:h,defaultedInline:f,defaultedConfig:p,defaultedHighlight:m,defaultedWeekNumbers:y,defaultedRange:C,propDates:E,defaultedTz:v,defaultedMultiDates:b,defaultedUI:w,getDefaultPattern:n,getDefaultStartTime:s}},u4=(t,e,n)=>{const i=we(),{defaultedTextInput:s,defaultedRange:r,defaultedTz:o,defaultedMultiDates:a,getDefaultPattern:l}=Wt(e),c=we(""),u=Zc(e,"format"),d=Zc(e,"formatLocale");fn(i,()=>{typeof e.onInternalModelChange=="function"&&t("internal-model-change",i.value,le(!0))},{deep:!0}),fn(r,($,oe)=>{$.enabled!==oe.enabled&&(i.value=null)}),fn(u,()=>{X()});const h=$=>o.value.timezone&&o.value.convertModel?_i($,o.value.timezone):$,f=$=>{if(o.value.timezone&&o.value.convertModel){const oe=MB(o.value.timezone);return kF($,oe)}return $},p=($,oe,de=!1)=>nC($,e.format,e.formatLocale,s.value.rangeSeparator,e.modelAuto,oe??l(),de),m=$=>$?e.modelType?ne($):{hours:pr($),minutes:oo($),seconds:e.enableSeconds?El($):0}:null,y=$=>e.modelType?ne($):{month:at($),year:Ge($)},v=$=>Array.isArray($)?a.value.enabled?$.map(oe=>b(oe,Ts(xe(),oe))):wd(()=>[Ts(xe(),$[0]),$[1]?Ts(xe(),$[1]):Ra(r.value.partialRange)],r.value.enabled):Ts(xe(),+$),b=($,oe)=>(typeof $=="string"||typeof $=="number")&&e.modelType?J($):oe,E=$=>Array.isArray($)?[b($[0],eo(null,+$[0].hours,+$[0].minutes,$[0].seconds)),b($[1],eo(null,+$[1].hours,+$[1].minutes,$[1].seconds))]:b($,eo(null,$.hours,$.minutes,$.seconds)),C=$=>{const oe=It(xe(),{date:1});return Array.isArray($)?a.value.enabled?$.map(de=>b(de,sr(oe,+de.month,+de.year))):wd(()=>[b($[0],sr(oe,+$[0].month,+$[0].year)),b($[1],$[1]?sr(oe,+$[1].month,+$[1].year):Ra(r.value.partialRange))],r.value.enabled):b($,sr(oe,+$.month,+$.year))},w=$=>{if(Array.isArray($))return $.map(oe=>J(oe));throw new Error(V_.dateArr("multi-dates"))},x=$=>{if(Array.isArray($)&&r.value.enabled){const oe=$[0],de=$[1];return[xe(Array.isArray(oe)?oe[0]:null),xe(Array.isArray(de)?de[0]:null)]}return xe($[0])},T=$=>e.modelAuto?Array.isArray($)?[J($[0]),J($[1])]:e.autoApply?[J($)]:[J($),null]:Array.isArray($)?wd(()=>$[1]?[J($[0]),$[1]?J($[1]):Ra(r.value.partialRange)]:[J($[0])],r.value.enabled):J($),k=()=>{Array.isArray(i.value)&&r.value.enabled&&i.value.length===1&&i.value.push(Ra(r.value.partialRange))},A=()=>{const $=i.value;return[ne($[0]),$[1]?ne($[1]):Ra(r.value.partialRange)]},P=()=>i.value[1]?A():ne(Tn(i.value[0])),F=()=>(i.value||[]).map($=>ne($)),H=($=!1)=>($||k(),e.modelAuto?P():a.value.enabled?F():Array.isArray(i.value)?wd(()=>A(),r.value.enabled):ne(Tn(i.value))),te=$=>!$||Array.isArray($)&&!$.length?null:e.timePicker?E(Tn($)):e.monthPicker?C(Tn($)):e.yearPicker?v(Tn($)):a.value.enabled?w(Tn($)):e.weekPicker?x(Tn($)):T(Tn($)),N=$=>{const oe=te($);nm(Tn(oe))?(i.value=Tn(oe),X()):(i.value=null,c.value="")},L=()=>{const $=oe=>Rs(oe,s.value.format);return`${$(i.value[0])} ${s.value.rangeSeparator} ${i.value[1]?$(i.value[1]):""}`},I=()=>n.value&&i.value?Array.isArray(i.value)?L():Rs(i.value,s.value.format):p(i.value),W=()=>i.value?a.value.enabled?i.value.map($=>p($)).join("; "):s.value.enabled&&typeof s.value.format=="string"?I():p(i.value):"",X=()=>{!e.format||typeof e.format=="string"||s.value.enabled&&typeof s.value.format=="string"?c.value=W():c.value=e.format(i.value)},J=$=>{if(e.utc){const oe=new Date($);return e.utc==="preserve"?new Date(oe.getTime()+oe.getTimezoneOffset()*6e4):oe}return e.modelType?IB.includes(e.modelType)?h(new Date($)):e.modelType==="format"&&(typeof e.format=="string"||!e.format)?h(Qp($,l(),new Date,{locale:d.value})):h(Qp($,e.modelType,new Date,{locale:d.value})):h(new Date($))},ne=$=>$?e.utc?zB($,e.utc==="preserve",e.enableSeconds):e.modelType?e.modelType==="timestamp"?+f($):e.modelType==="iso"?f($).toISOString():e.modelType==="format"&&(typeof e.format=="string"||!e.format)?p(f($)):p(f($),e.modelType,!0):f($):"",ue=($,oe=!1,de=!1)=>{if(de)return $;if(t("update:model-value",$),o.value.emitTimezone&&oe){const ve=Array.isArray($)?$.map(z=>_i(Tn(z),o.value.emitTimezone)):_i(Tn($),o.value.emitTimezone);t("update:model-timezone-value",ve)}},Y=$=>Array.isArray(i.value)?a.value.enabled?i.value.map(oe=>$(oe)):[$(i.value[0]),i.value[1]?$(i.value[1]):Ra(r.value.partialRange)]:$(Tn(i.value)),Z=()=>{if(Array.isArray(i.value)){const $=er(i.value[0],e.weekStart),oe=i.value[1]?er(i.value[1],e.weekStart):[];return[$.map(de=>xe(de)),oe.map(de=>xe(de))]}return er(i.value,e.weekStart).map($=>xe($))},M=($,oe)=>ue(Tn(Y($)),!1,oe),ie=$=>{const oe=Z();return $?oe:t("update:model-value",Z())},le=($=!1)=>($||X(),e.monthPicker?M(y,$):e.timePicker?M(m,$):e.yearPicker?M(Ge,$):e.weekPicker?ie($):ue(H($),!0,$));return{inputValue:c,internalModelValue:i,checkBeforeEmit:()=>i.value?r.value.enabled?r.value.partialRange?i.value.length>=1:i.value.length===2:!!i.value:!1,parseExternalModelValue:N,formatInputValue:X,emitModelValue:le}},d4=(t,e)=>{const{defaultedFilters:n,propDates:i}=Wt(t),{validateMonthYearInRange:s}=_o(t),r=(u,d)=>{let h=u;return n.value.months.includes(at(h))?(h=d?us(u,1):Cl(u,1),r(h,d)):h},o=(u,d)=>{let h=u;return n.value.years.includes(Ge(h))?(h=d?k_(u,1):jS(u,1),o(h,d)):h},a=(u,d=!1)=>{const h=It(xe(),{month:t.month,year:t.year});let f=u?us(h,1):Cl(h,1);t.disableYearSelect&&(f=Ts(f,t.year));let p=at(f),m=Ge(f);n.value.months.includes(p)&&(f=r(f,u),p=at(f),m=Ge(f)),n.value.years.includes(m)&&(f=o(f,u),m=Ge(f)),s(p,m,u,t.preventMinMaxNavigation)&&l(p,m,d)},l=(u,d,h)=>{e("update-month-year",{month:u,year:d,fromNav:h})},c=be(()=>u=>tC(It(xe(),{month:t.month,year:t.year}),i.value.maxDate,i.value.minDate,t.preventMinMaxNavigation,u));return{handleMonthYearChange:a,isDisabled:c,updateMonthYear:l}},_f={multiCalendars:{type:[Boolean,Number,String,Object],default:void 0},modelValue:{type:[String,Date,Array,Object,Number],default:null},modelType:{type:String,default:null},position:{type:String,default:"center"},dark:{type:Boolean,default:!1},format:{type:[String,Function],default:()=>null},autoPosition:{type:Boolean,default:!0},altPosition:{type:Function,default:null},transitions:{type:[Boolean,Object],default:!0},formatLocale:{type:Object,default:null},utc:{type:[Boolean,String],default:!1},ariaLabels:{type:Object,default:()=>({})},offset:{type:[Number,String],default:10},hideNavigation:{type:Array,default:()=>[]},timezone:{type:[String,Object],default:null},vertical:{type:Boolean,default:!1},disableMonthYearSelect:{type:Boolean,default:!1},disableYearSelect:{type:Boolean,default:!1},dayClass:{type:Function,default:null},yearRange:{type:Array,default:()=>[1900,2100]},enableTimePicker:{type:Boolean,default:!0},autoApply:{type:Boolean,default:!1},disabledDates:{type:[Array,Function],default:()=>[]},monthNameFormat:{type:String,default:"short"},startDate:{type:[Date,String],default:null},startTime:{type:[Object,Array],default:null},hideOffsetDates:{type:Boolean,default:!1},noToday:{type:Boolean,default:!1},disabledWeekDays:{type:Array,default:()=>[]},allowedDates:{type:Array,default:null},nowButtonLabel:{type:String,default:"Now"},markers:{type:Array,default:()=>[]},escClose:{type:Boolean,default:!0},spaceConfirm:{type:Boolean,default:!0},monthChangeOnArrows:{type:Boolean,default:!0},presetDates:{type:Array,default:()=>[]},flow:{type:Array,default:()=>[]},partialFlow:{type:Boolean,default:!1},preventMinMaxNavigation:{type:Boolean,default:!1},reverseYears:{type:Boolean,default:!1},weekPicker:{type:Boolean,default:!1},filters:{type:Object,default:()=>({})},arrowNavigation:{type:Boolean,default:!1},highlight:{type:[Function,Object],default:null},teleport:{type:[Boolean,String,Object],default:null},teleportCenter:{type:Boolean,default:!1},locale:{type:String,default:"en-Us"},weekNumName:{type:String,default:"W"},weekStart:{type:[Number,String],default:1},weekNumbers:{type:[String,Function,Object],default:null},monthChangeOnScroll:{type:[Boolean,String],default:!0},dayNames:{type:[Function,Array],default:null},monthPicker:{type:Boolean,default:!1},customProps:{type:Object,default:null},yearPicker:{type:Boolean,default:!1},modelAuto:{type:Boolean,default:!1},selectText:{type:String,default:"Select"},cancelText:{type:String,default:"Cancel"},previewFormat:{type:[String,Function],default:()=>""},multiDates:{type:[Object,Boolean],default:!1},ignoreTimeValidation:{type:Boolean,default:!1},minDate:{type:[Date,String],default:null},maxDate:{type:[Date,String],default:null},minTime:{type:Object,default:null},maxTime:{type:Object,default:null},name:{type:String,default:null},placeholder:{type:String,default:""},hideInputIcon:{type:Boolean,default:!1},clearable:{type:Boolean,default:!0},state:{type:Boolean,default:null},required:{type:Boolean,default:!1},autocomplete:{type:String,default:"off"},timePicker:{type:Boolean,default:!1},enableSeconds:{type:Boolean,default:!1},is24:{type:Boolean,default:!0},noHoursOverlay:{type:Boolean,default:!1},noMinutesOverlay:{type:Boolean,default:!1},noSecondsOverlay:{type:Boolean,default:!1},hoursGridIncrement:{type:[String,Number],default:1},minutesGridIncrement:{type:[String,Number],default:5},secondsGridIncrement:{type:[String,Number],default:5},hoursIncrement:{type:[Number,String],default:1},minutesIncrement:{type:[Number,String],default:1},secondsIncrement:{type:[Number,String],default:1},range:{type:[Boolean,Object],default:!1},uid:{type:String,default:null},disabled:{type:Boolean,default:!1},readonly:{type:Boolean,default:!1},inline:{type:[Boolean,Object],default:!1},textInput:{type:[Boolean,Object],default:!1},sixWeeks:{type:[Boolean,String],default:!1},actionRow:{type:Object,default:()=>({})},focusStartDate:{type:Boolean,default:!1},disabledTimes:{type:[Function,Array],default:void 0},timePickerInline:{type:Boolean,default:!1},calendar:{type:Function,default:null},config:{type:Object,default:void 0},quarterPicker:{type:Boolean,default:!1},yearFirst:{type:Boolean,default:!1},loading:{type:Boolean,default:!1},onInternalModelChange:{type:[Function,Object],default:null},enableMinutes:{type:Boolean,default:!0},ui:{type:Object,default:()=>({})}},ps={..._f,shadow:{type:Boolean,default:!1},flowStep:{type:Number,default:0},internalModelValue:{type:[Date,Array],default:null},noOverlayFocus:{type:Boolean,default:!1},collapse:{type:Boolean,default:!1},menuWrapRef:{type:Object,default:null},getInputRect:{type:Function,default:()=>({})},isTextInputDate:{type:Boolean,default:!1}},h4=["title"],f4=["disabled"],g4=cn({compatConfig:{MODE:3},__name:"ActionRow",props:{menuMount:{type:Boolean,default:!1},calendarWidth:{type:Number,default:0},...ps},emits:["close-picker","select-date","select-now","invalid-select"],setup(t,{emit:e}){const n=e,i=t,{defaultedActionRow:s,defaultedPreviewFormat:r,defaultedMultiCalendars:o,defaultedTextInput:a,defaultedInline:l,defaultedRange:c,defaultedMultiDates:u,getDefaultPattern:d}=Wt(i),{isTimeValid:h,isMonthValid:f}=_o(i),{buildMatrix:p}=mo(),m=we(null),y=we(null),v=we(!1),b=we({}),E=we(null),C=we(null);xn(()=>{i.arrowNavigation&&p([mn(m),mn(y)],"actionRow"),w(),window.addEventListener("resize",w)}),Yl(()=>{window.removeEventListener("resize",w)});const w=()=>{v.value=!1,setTimeout(()=>{var L,I;const W=(L=E.value)==null?void 0:L.getBoundingClientRect(),X=(I=C.value)==null?void 0:I.getBoundingClientRect();W&&X&&(b.value.maxWidth=`${X.width-W.width-20}px`),v.value=!0},0)},x=be(()=>c.value.enabled&&!c.value.partialRange&&i.internalModelValue?i.internalModelValue.length===2:!0),T=be(()=>!h.value(i.internalModelValue)||!f.value(i.internalModelValue)||!x.value),k=()=>{const L=r.value;return i.timePicker||i.monthPicker,L(Tn(i.internalModelValue))},A=()=>{const L=i.internalModelValue;return o.value.count>0?`${P(L[0])} - ${P(L[1])}`:[P(L[0]),P(L[1])]},P=L=>nC(L,r.value,i.formatLocale,a.value.rangeSeparator,i.modelAuto,d()),F=be(()=>!i.internalModelValue||!i.menuMount?"":typeof r.value=="string"?Array.isArray(i.internalModelValue)?i.internalModelValue.length===2&&i.internalModelValue[1]?A():u.value.enabled?i.internalModelValue.map(L=>`${P(L)}`):i.modelAuto?`${P(i.internalModelValue[0])}`:`${P(i.internalModelValue[0])} -`:P(i.internalModelValue):k()),H=()=>u.value.enabled?"; ":" - ",te=be(()=>Array.isArray(F.value)?F.value.join(H()):F.value),N=()=>{h.value(i.internalModelValue)&&f.value(i.internalModelValue)&&x.value?n("select-date"):n("invalid-select")};return(L,I)=>(D(),V("div",{ref_key:"actionRowRef",ref:C,class:"dp__action_row"},[L.$slots["action-row"]?Oe(L.$slots,"action-row",In(yn({key:0},{internalModelValue:L.internalModelValue,disabled:T.value,selectDate:()=>L.$emit("select-date"),closePicker:()=>L.$emit("close-picker")}))):(D(),V($e,{key:1},[Q(s).showPreview?(D(),V("div",{key:0,class:"dp__selection_preview",title:te.value,style:Mn(b.value)},[L.$slots["action-preview"]&&v.value?Oe(L.$slots,"action-preview",{key:0,value:L.internalModelValue}):ce("",!0),!L.$slots["action-preview"]&&v.value?(D(),V($e,{key:1},[He(Ee(te.value),1)],64)):ce("",!0)],12,h4)):ce("",!0),g("div",{ref_key:"actionBtnContainer",ref:E,class:"dp__action_buttons","data-dp-element":"action-row"},[L.$slots["action-buttons"]?Oe(L.$slots,"action-buttons",{key:0,value:L.internalModelValue}):ce("",!0),L.$slots["action-buttons"]?ce("",!0):(D(),V($e,{key:1},[!Q(l).enabled&&Q(s).showCancel?(D(),V("button",{key:0,ref_key:"cancelButtonRef",ref:m,type:"button",class:"dp__action_button dp__action_cancel",onClick:I[0]||(I[0]=W=>L.$emit("close-picker")),onKeydown:I[1]||(I[1]=W=>Q(Qn)(W,()=>L.$emit("close-picker")))},Ee(L.cancelText),545)):ce("",!0),Q(s).showNow?(D(),V("button",{key:1,type:"button",class:"dp__action_button dp__action_cancel",onClick:I[2]||(I[2]=W=>L.$emit("select-now")),onKeydown:I[3]||(I[3]=W=>Q(Qn)(W,()=>L.$emit("select-now")))},Ee(L.nowButtonLabel),33)):ce("",!0),Q(s).showSelect?(D(),V("button",{key:2,ref_key:"selectButtonRef",ref:y,type:"button",class:"dp__action_button dp__action_select",disabled:T.value,"data-test":"select-button",onKeydown:I[4]||(I[4]=W=>Q(Qn)(W,()=>N())),onClick:N},Ee(L.selectText),41,f4)):ce("",!0)],64))],512)],64))],512))}}),p4=["role","aria-label","tabindex"],m4={class:"dp__selection_grid_header"},_4=["aria-selected","aria-disabled","data-test","onClick","onKeydown","onMouseover"],y4=["aria-label"],Ou=cn({__name:"SelectionOverlay",props:{items:{},type:{},isLast:{type:Boolean},arrowNavigation:{type:Boolean},skipButtonRef:{type:Boolean},headerRefs:{},hideNavigation:{},escClose:{type:Boolean},useRelative:{type:Boolean},height:{},textInput:{type:[Boolean,Object]},config:{},noOverlayFocus:{type:Boolean},focusValue:{},menuWrapRef:{},ariaLabels:{},overlayLabel:{}},emits:["selected","toggle","reset-flow","hover-value"],setup(t,{expose:e,emit:n}){const{setSelectionGrid:i,buildMultiLevelMatrix:s,setMonthPicker:r}=mo(),o=n,a=t,{defaultedAriaLabels:l,defaultedTextInput:c,defaultedConfig:u}=Wt(a),{hideNavigationButtons:d}=bf(),h=we(!1),f=we(null),p=we(null),m=we([]),y=we(),v=we(null),b=we(0),E=we(null);gE(()=>{f.value=null}),xn(()=>{Rn().then(()=>F()),a.noOverlayFocus||w(),C(!0)}),Yl(()=>C(!1));const C=Y=>{var Z;a.arrowNavigation&&((Z=a.headerRefs)!=null&&Z.length?r(Y):i(Y))},w=()=>{var Y;const Z=mn(p);Z&&(c.value.enabled||(f.value?(Y=f.value)==null||Y.focus({preventScroll:!0}):Z.focus({preventScroll:!0})),h.value=Z.clientHeight({dp__overlay:!0,"dp--overlay-absolute":!a.useRelative,"dp--overlay-relative":a.useRelative})),T=be(()=>a.useRelative?{height:`${a.height}px`,width:"260px"}:void 0),k=be(()=>({dp__overlay_col:!0})),A=be(()=>({dp__btn:!0,dp__button:!0,dp__overlay_action:!0,dp__over_action_scroll:h.value,dp__button_bottom:a.isLast})),P=be(()=>{var Y,Z;return{dp__overlay_container:!0,dp__container_flex:((Y=a.items)==null?void 0:Y.length)<=6,dp__container_block:((Z=a.items)==null?void 0:Z.length)>6}});fn(()=>a.items,()=>F(!1),{deep:!0});const F=(Y=!0)=>{Rn().then(()=>{const Z=mn(f),M=mn(p),ie=mn(v),le=mn(E),$=ie?ie.getBoundingClientRect().height:0;M&&(M.getBoundingClientRect().height?b.value=M.getBoundingClientRect().height-$:b.value=u.value.modeHeight-$),Z&&le&&Y&&(le.scrollTop=Z.offsetTop-le.offsetTop-(b.value/2-Z.getBoundingClientRect().height)-$)})},H=Y=>{Y.disabled||o("selected",Y.value)},te=()=>{o("toggle"),o("reset-flow")},N=()=>{a.escClose&&te()},L=(Y,Z,M,ie)=>{Y&&((Z.active||Z.value===a.focusValue)&&(f.value=Y),a.arrowNavigation&&(Array.isArray(m.value[M])?m.value[M][ie]=Y:m.value[M]=[Y],I()))},I=()=>{var Y,Z;const M=(Y=a.headerRefs)!=null&&Y.length?[a.headerRefs].concat(m.value):m.value.concat([a.skipButtonRef?[]:[v.value]]);s(Tn(M),(Z=a.headerRefs)!=null&&Z.length?"monthPicker":"selectionGrid")},W=Y=>{a.arrowNavigation||Qr(Y,u.value,!0)},X=Y=>{y.value=Y,o("hover-value",Y)},J=()=>{if(te(),!a.isLast){const Y=tm(a.menuWrapRef??null,"action-row");if(Y){const Z=XS(Y);Z?.focus()}}},ne=Y=>{switch(Y.key){case Lt.esc:return N();case Lt.arrowLeft:return W(Y);case Lt.arrowRight:return W(Y);case Lt.arrowUp:return W(Y);case Lt.arrowDown:return W(Y);default:return}},ue=Y=>{if(Y.key===Lt.enter)return te();if(Y.key===Lt.tab)return J()};return e({focusGrid:w}),(Y,Z)=>{var M;return D(),V("div",{ref_key:"gridWrapRef",ref:p,class:Ie(x.value),style:Mn(T.value),role:Y.useRelative?void 0:"dialog","aria-label":Y.overlayLabel,tabindex:Y.useRelative?void 0:"0",onKeydown:ne,onClick:Z[0]||(Z[0]=iu(()=>{},["prevent"]))},[g("div",{ref_key:"containerRef",ref:E,class:Ie(P.value),style:Mn({"--dp-overlay-height":`${b.value}px`}),role:"grid"},[g("div",m4,[Oe(Y.$slots,"header")]),Y.$slots.overlay?Oe(Y.$slots,"overlay",{key:0}):(D(!0),V($e,{key:1},Xe(Y.items,(ie,le)=>(D(),V("div",{key:le,class:Ie(["dp__overlay_row",{dp__flex_row:Y.items.length>=3}]),role:"row"},[(D(!0),V($e,null,Xe(ie,($,oe)=>(D(),V("div",{key:$.value,ref_for:!0,ref:de=>L(de,$,le,oe),role:"gridcell",class:Ie(k.value),"aria-selected":$.active||void 0,"aria-disabled":$.disabled||void 0,tabindex:"0","data-test":$.text,onClick:iu(de=>H($),["prevent"]),onKeydown:de=>Q(Qn)(de,()=>H($),!0),onMouseover:de=>X($.value)},[g("div",{class:Ie($.className)},[Y.$slots.item?Oe(Y.$slots,"item",{key:0,item:$}):ce("",!0),Y.$slots.item?ce("",!0):(D(),V($e,{key:1},[He(Ee($.text),1)],64))],2)],42,_4))),128))],2))),128))],6),Y.$slots["button-icon"]?Ne((D(),V("button",{key:0,ref_key:"toggleButton",ref:v,type:"button","aria-label":(M=Q(l))==null?void 0:M.toggleOverlay,class:Ie(A.value),tabindex:"0",onClick:te,onKeydown:ue},[Oe(Y.$slots,"button-icon")],42,y4)),[[th,!Q(d)(Y.hideNavigation,Y.type)]]):ce("",!0)],46,p4)}}}),yf=cn({__name:"InstanceWrap",props:{multiCalendars:{},stretch:{type:Boolean},collapse:{type:Boolean}},setup(t){const e=t,n=be(()=>e.multiCalendars>0?[...Array(e.multiCalendars).keys()]:[0]),i=be(()=>({dp__instance_calendar:e.multiCalendars>0}));return(s,r)=>(D(),V("div",{class:Ie({dp__menu_inner:!s.stretch,"dp--menu--inner-stretched":s.stretch,dp__flex_display:s.multiCalendars>0,"dp--flex-display-collapsed":s.collapse})},[(D(!0),V($e,null,Xe(n.value,(o,a)=>(D(),V("div",{key:o,class:Ie(i.value)},[Oe(s.$slots,"default",{instance:o,index:a})],2))),128))],2))}}),v4=["data-dp-element","aria-label","aria-disabled"],Wc=cn({compatConfig:{MODE:3},__name:"ArrowBtn",props:{ariaLabel:{},elName:{},disabled:{type:Boolean}},emits:["activate","set-ref"],setup(t,{emit:e}){const n=e,i=we(null);return xn(()=>n("set-ref",i)),(s,r)=>(D(),V("button",{ref_key:"elRef",ref:i,type:"button","data-dp-element":s.elName,class:"dp__btn dp--arrow-btn-nav",tabindex:"0","aria-label":s.ariaLabel,"aria-disabled":s.disabled||void 0,onClick:r[0]||(r[0]=o=>s.$emit("activate")),onKeydown:r[1]||(r[1]=o=>Q(Qn)(o,()=>s.$emit("activate"),!0))},[g("span",{class:Ie(["dp__inner_nav",{dp__inner_nav_disabled:s.disabled}])},[Oe(s.$slots,"default")],2)],40,v4))}}),b4=["aria-label","data-test"],oC=cn({__name:"YearModePicker",props:{...ps,showYearPicker:{type:Boolean,default:!1},items:{type:Array,default:()=>[]},instance:{type:Number,default:0},year:{type:Number,default:0},isDisabled:{type:Function,default:()=>!1}},emits:["toggle-year-picker","year-select","handle-year"],setup(t,{emit:e}){const n=e,i=t,{showRightIcon:s,showLeftIcon:r}=bf(),{defaultedConfig:o,defaultedMultiCalendars:a,defaultedAriaLabels:l,defaultedTransitions:c,defaultedUI:u}=Wt(i),{showTransition:d,transitionName:h}=Nu(c),f=we(!1),p=(v=!1,b)=>{f.value=!f.value,n("toggle-year-picker",{flow:v,show:b})},m=v=>{f.value=!1,n("year-select",v)},y=(v=!1)=>{n("handle-year",v)};return(v,b)=>{var E,C,w,x,T;return D(),V($e,null,[g("div",{class:Ie(["dp--year-mode-picker",{"dp--hidden-el":f.value}])},[Q(r)(Q(a),t.instance)?(D(),Ce(Wc,{key:0,ref:"mpPrevIconRef","aria-label":(E=Q(l))==null?void 0:E.prevYear,disabled:t.isDisabled(!1),class:Ie((C=Q(u))==null?void 0:C.navBtnPrev),onActivate:b[0]||(b[0]=k=>y(!1))},{default:Re(()=>[v.$slots["arrow-left"]?Oe(v.$slots,"arrow-left",{key:0}):ce("",!0),v.$slots["arrow-left"]?ce("",!0):(D(),Ce(Q(D_),{key:1}))]),_:3},8,["aria-label","disabled","class"])):ce("",!0),g("button",{ref:"mpYearButtonRef",class:"dp__btn dp--year-select",type:"button","aria-label":`${t.year}-${(w=Q(l))==null?void 0:w.openYearsOverlay}`,"data-test":`year-mode-btn-${t.instance}`,onClick:b[1]||(b[1]=()=>p(!1)),onKeydown:b[2]||(b[2]=eS(()=>p(!1),["enter"]))},[v.$slots.year?Oe(v.$slots,"year",{key:0,year:t.year}):ce("",!0),v.$slots.year?ce("",!0):(D(),V($e,{key:1},[He(Ee(t.year),1)],64))],40,b4),Q(s)(Q(a),t.instance)?(D(),Ce(Wc,{key:1,ref:"mpNextIconRef","aria-label":(x=Q(l))==null?void 0:x.nextYear,disabled:t.isDisabled(!0),class:Ie((T=Q(u))==null?void 0:T.navBtnNext),onActivate:b[3]||(b[3]=k=>y(!0))},{default:Re(()=>[v.$slots["arrow-right"]?Oe(v.$slots,"arrow-right",{key:0}):ce("",!0),v.$slots["arrow-right"]?ce("",!0):(D(),Ce(Q($_),{key:1}))]),_:3},8,["aria-label","disabled","class"])):ce("",!0)],2),B(Rt,{name:Q(h)(t.showYearPicker),css:Q(d)},{default:Re(()=>{var k,A;return[t.showYearPicker?(D(),Ce(Ou,{key:0,items:t.items,"text-input":v.textInput,"esc-close":v.escClose,config:v.config,"is-last":v.autoApply&&!Q(o).keepActionRow,"hide-navigation":v.hideNavigation,"aria-labels":v.ariaLabels,"overlay-label":(A=(k=Q(l))==null?void 0:k.yearPicker)==null?void 0:A.call(k,!0),type:"year",onToggle:p,onSelected:b[4]||(b[4]=P=>m(P))},jn({"button-icon":Re(()=>[v.$slots["calendar-icon"]?Oe(v.$slots,"calendar-icon",{key:0}):ce("",!0),v.$slots["calendar-icon"]?ce("",!0):(D(),Ce(Q(Ul),{key:1}))]),_:2},[v.$slots["year-overlay-value"]?{name:"item",fn:Re(({item:P})=>[Oe(v.$slots,"year-overlay-value",{text:P.text,value:P.value})]),key:"0"}:void 0]),1032,["items","text-input","esc-close","config","is-last","hide-navigation","aria-labels","overlay-label"])):ce("",!0)]}),_:3},8,["name","css"])],64)}}}),H_=(t,e,n)=>{if(e.value&&Array.isArray(e.value))if(e.value.some(i=>ct(t,i))){const i=e.value.filter(s=>!ct(s,t));e.value=i.length?i:null}else(n&&+n>e.value.length||!n)&&e.value.push(t);else e.value=[t]},Y_=(t,e,n)=>{let i=t.value?t.value.slice():[];return i.length===2&&i[1]!==null&&(i=[]),i.length?Xt(e,i[0])?(i.unshift(e),n("range-start",i[0]),n("range-start",i[1])):(i[1]=e,n("range-end",e)):(i=[e],n("range-start",e)),i},vf=(t,e,n,i)=>{t&&(t[0]&&t[1]&&n&&e("auto-apply"),t[0]&&!t[1]&&i&&n&&e("auto-apply"))},aC=t=>{Array.isArray(t.value)&&t.value.length<=2&&t.range?t.modelValue.value=t.value.map(e=>_i(xe(e),t.timezone)):Array.isArray(t.value)||(t.modelValue.value=_i(xe(t.value),t.timezone))},lC=(t,e,n,i)=>Array.isArray(e.value)&&(e.value.length===2||e.value.length===1&&i.value.partialRange)?i.value.fixedStart&&(nn(t,e.value[0])||ct(t,e.value[0]))?[e.value[0],t]:i.value.fixedEnd&&(Xt(t,e.value[1])||ct(t,e.value[1]))?[t,e.value[1]]:(n("invalid-fixed-range",t),e.value):[],cC=({multiCalendars:t,range:e,highlight:n,propDates:i,calendars:s,modelValue:r,props:o,filters:a,year:l,month:c,emit:u})=>{const d=be(()=>B_(o.yearRange,o.locale,o.reverseYears)),h=we([!1]),f=be(()=>(P,F)=>{const H=It(rs(new Date),{month:c.value(P),year:l.value(P)}),te=F?RS(H):ru(H);return tC(te,i.value.maxDate,i.value.minDate,o.preventMinMaxNavigation,F)}),p=()=>Array.isArray(r.value)&&t.value.solo&&r.value[1],m=()=>{for(let P=0;P{if(!P)return m();const F=It(xe(),s.value[P]);return s.value[0].year=Ge(jS(F,t.value.count-1)),m()},v=(P,F)=>{const H=RF(F,P);return e.value.showLastInRange&&H>1?F:P},b=P=>o.focusStartDate||t.value.solo?P[0]:P[1]?v(P[0],P[1]):P[0],E=()=>{if(r.value){const P=Array.isArray(r.value)?b(r.value):r.value;s.value[0]={month:at(P),year:Ge(P)}}},C=()=>{E(),t.value.count&&m()};fn(r,(P,F)=>{o.isTextInputDate&&JSON.stringify(P??{})!==JSON.stringify(F??{})&&C()}),xn(()=>{C()});const w=(P,F)=>{s.value[F].year=P,u("update-month-year",{instance:F,year:P,month:s.value[F].month}),t.value.count&&!t.value.solo&&y(F)},x=be(()=>P=>Tl(d.value,F=>{var H;const te=l.value(P)===F.value,N=au(F.value,kl(i.value.minDate),kl(i.value.maxDate))||((H=a.value.years)==null?void 0:H.includes(l.value(P))),L=W_(n.value,F.value);return{active:te,disabled:N,highlighted:L}})),T=(P,F)=>{w(P,F),A(F)},k=(P,F=!1)=>{if(!f.value(P,F)){const H=F?l.value(P)+1:l.value(P)-1;w(H,P)}},A=(P,F=!1,H)=>{F||u("reset-flow"),H!==void 0?h.value[P]=H:h.value[P]=!h.value[P],h.value[P]?u("overlay-toggle",{open:!0,overlay:zn.year}):(u("overlay-closed"),u("overlay-toggle",{open:!1,overlay:zn.year}))};return{isDisabled:f,groupedYears:x,showYearPicker:h,selectYear:w,toggleYearPicker:A,handleYearSelect:T,handleYear:k}},w4=(t,e)=>{const{defaultedMultiCalendars:n,defaultedAriaLabels:i,defaultedTransitions:s,defaultedConfig:r,defaultedRange:o,defaultedHighlight:a,propDates:l,defaultedTz:c,defaultedFilters:u,defaultedMultiDates:d}=Wt(t),h=()=>{t.isTextInputDate&&C(Ge(xe(t.startDate)),0)},{modelValue:f,year:p,month:m,calendars:y}=Fu(t,e,h),v=be(()=>US(t.formatLocale,t.locale,t.monthNameFormat)),b=we(null),{checkMinMaxRange:E}=_o(t),{selectYear:C,groupedYears:w,showYearPicker:x,toggleYearPicker:T,handleYearSelect:k,handleYear:A,isDisabled:P}=cC({modelValue:f,multiCalendars:n,range:o,highlight:a,calendars:y,year:p,propDates:l,month:m,filters:u,props:t,emit:e});xn(()=>{t.startDate&&(f.value&&t.focusStartDate||!f.value)&&C(Ge(xe(t.startDate)),0)});const F=M=>M?{month:at(M),year:Ge(M)}:{month:null,year:null},H=()=>f.value?Array.isArray(f.value)?f.value.map(M=>F(M)):F(f.value):F(),te=(M,ie)=>{const le=y.value[M],$=H();return Array.isArray($)?$.some(oe=>oe.year===le?.year&&oe.month===ie):le?.year===$.year&&ie===$.month},N=(M,ie,le)=>{var $,oe;const de=H();return Array.isArray(de)?p.value(ie)===(($=de[le])==null?void 0:$.year)&&M===((oe=de[le])==null?void 0:oe.month):!1},L=(M,ie)=>{if(o.value.enabled){const le=H();if(Array.isArray(f.value)&&Array.isArray(le)){const $=N(M,ie,0)||N(M,ie,1),oe=sr(rs(xe()),M,p.value(ie));return mf(f.value,b.value,oe)&&!$}return!1}return!1},I=be(()=>M=>Tl(v.value,ie=>{var le;const $=te(M,ie.value),oe=au(ie.value,ZS(p.value(M),l.value.minDate),JS(p.value(M),l.value.maxDate))||KB(l.value.disabledDates,p.value(M)).includes(ie.value)||((le=u.value.months)==null?void 0:le.includes(ie.value)),de=L(ie.value,M),ve=iC(a.value,ie.value,p.value(M));return{active:$,disabled:oe,isBetween:de,highlighted:ve}})),W=(M,ie)=>sr(rs(xe()),M,p.value(ie)),X=(M,ie)=>{const le=f.value?f.value:rs(new Date);f.value=sr(le,M,p.value(ie)),e("auto-apply"),e("update-flow-step")},J=(M,ie)=>{const le=W(M,ie);o.value.fixedEnd||o.value.fixedStart?f.value=lC(le,f,e,o):f.value?E(le,f.value)&&(f.value=Y_(f,W(M,ie),e)):f.value=[W(M,ie)],Rn().then(()=>{vf(f.value,e,t.autoApply,t.modelAuto)})},ne=(M,ie)=>{H_(W(M,ie),f,d.value.limit),e("auto-apply",!0)},ue=(M,ie)=>(y.value[ie].month=M,Z(ie,y.value[ie].year,M),d.value.enabled?ne(M,ie):o.value.enabled?J(M,ie):X(M,ie)),Y=(M,ie)=>{C(M,ie),Z(ie,M,null)},Z=(M,ie,le)=>{let $=le;if(!$&&$!==0){const oe=H();$=Array.isArray(oe)?oe[M].month:oe.month}e("update-month-year",{instance:M,year:ie,month:$})};return{groupedMonths:I,groupedYears:w,year:p,isDisabled:P,defaultedMultiCalendars:n,defaultedAriaLabels:i,defaultedTransitions:s,defaultedConfig:r,showYearPicker:x,modelValue:f,presetDate:(M,ie)=>{aC({value:M,modelValue:f,range:o.value.enabled,timezone:ie?void 0:c.value.timezone}),e("auto-apply")},setHoverDate:(M,ie)=>{b.value=W(M,ie)},selectMonth:ue,selectYear:Y,toggleYearPicker:T,handleYearSelect:k,handleYear:A,getModelMonthYear:H}},x4=cn({compatConfig:{MODE:3},__name:"MonthPicker",props:{...ps},emits:["update:internal-model-value","overlay-closed","reset-flow","range-start","range-end","auto-apply","update-month-year","update-flow-step","mount","invalid-fixed-range","overlay-toggle"],setup(t,{expose:e,emit:n}){const i=n,s=pa(),r=ki(s,"yearMode"),o=t;xn(()=>{o.shadow||i("mount",null)});const{groupedMonths:a,groupedYears:l,year:c,isDisabled:u,defaultedMultiCalendars:d,defaultedConfig:h,showYearPicker:f,modelValue:p,presetDate:m,setHoverDate:y,selectMonth:v,selectYear:b,toggleYearPicker:E,handleYearSelect:C,handleYear:w,getModelMonthYear:x}=w4(o,i);return e({getSidebarProps:()=>({modelValue:p,year:c,getModelMonthYear:x,selectMonth:v,selectYear:b,handleYear:w}),presetDate:m,toggleYearPicker:T=>E(0,T)}),(T,k)=>(D(),Ce(yf,{"multi-calendars":Q(d).count,collapse:T.collapse,stretch:""},{default:Re(({instance:A})=>[T.$slots["top-extra"]?Oe(T.$slots,"top-extra",{key:0,value:T.internalModelValue}):ce("",!0),T.$slots["month-year"]?Oe(T.$slots,"month-year",In(yn({key:1},{year:Q(c),months:Q(a)(A),years:Q(l)(A),selectMonth:Q(v),selectYear:Q(b),instance:A}))):(D(),Ce(Ou,{key:2,items:Q(a)(A),"arrow-navigation":T.arrowNavigation,"is-last":T.autoApply&&!Q(h).keepActionRow,"esc-close":T.escClose,height:Q(h).modeHeight,config:T.config,"no-overlay-focus":!!(T.noOverlayFocus||T.textInput),"use-relative":"",type:"month",onSelected:P=>Q(v)(P,A),onHoverValue:P=>Q(y)(P,A)},jn({header:Re(()=>[B(oC,yn(T.$props,{items:Q(l)(A),instance:A,"show-year-picker":Q(f)[A],year:Q(c)(A),"is-disabled":P=>Q(u)(A,P),onHandleYear:P=>Q(w)(A,P),onYearSelect:P=>Q(C)(P,A),onToggleYearPicker:P=>Q(E)(A,P?.flow,P?.show)}),jn({_:2},[Xe(Q(r),(P,F)=>({name:P,fn:Re(H=>[Oe(T.$slots,P,In(Zn(H)))])}))]),1040,["items","instance","show-year-picker","year","is-disabled","onHandleYear","onYearSelect","onToggleYearPicker"])]),_:2},[T.$slots["month-overlay-value"]?{name:"item",fn:Re(({item:P})=>[Oe(T.$slots,"month-overlay-value",{text:P.text,value:P.value})]),key:"0"}:void 0]),1032,["items","arrow-navigation","is-last","esc-close","height","config","no-overlay-focus","onSelected","onHoverValue"]))]),_:3},8,["multi-calendars","collapse"]))}}),E4=(t,e)=>{const n=()=>{t.isTextInputDate&&(u.value=Ge(xe(t.startDate)))},{modelValue:i}=Fu(t,e,n),s=we(null),{defaultedHighlight:r,defaultedMultiDates:o,defaultedFilters:a,defaultedRange:l,propDates:c}=Wt(t),u=we();xn(()=>{t.startDate&&(i.value&&t.focusStartDate||!i.value)&&(u.value=Ge(xe(t.startDate)))});const d=m=>Array.isArray(i.value)?i.value.some(y=>Ge(y)===m):i.value?Ge(i.value)===m:!1,h=m=>l.value.enabled&&Array.isArray(i.value)?mf(i.value,s.value,p(m)):!1,f=be(()=>Tl(B_(t.yearRange,t.locale,t.reverseYears),m=>{const y=d(m.value),v=au(m.value,kl(c.value.minDate),kl(c.value.maxDate))||a.value.years.includes(m.value),b=h(m.value)&&!y,E=W_(r.value,m.value);return{active:y,disabled:v,isBetween:b,highlighted:E}})),p=m=>Ts(rs(ru(new Date)),m);return{groupedYears:f,modelValue:i,focusYear:u,setHoverValue:m=>{s.value=Ts(rs(new Date),m)},selectYear:m=>{var y;if(e("update-month-year",{instance:0,year:m}),o.value.enabled)return i.value?Array.isArray(i.value)&&(((y=i.value)==null?void 0:y.map(v=>Ge(v))).includes(m)?i.value=i.value.filter(v=>Ge(v)!==m):i.value.push(Ts(ni(xe()),m))):i.value=[Ts(ni(ru(xe())),m)],e("auto-apply",!0);l.value.enabled?(i.value=Y_(i,p(m),e),Rn().then(()=>{vf(i.value,e,t.autoApply,t.modelAuto)})):(i.value=p(m),e("auto-apply"))}}},S4=cn({compatConfig:{MODE:3},__name:"YearPicker",props:{...ps},emits:["update:internal-model-value","reset-flow","range-start","range-end","auto-apply","update-month-year"],setup(t,{expose:e,emit:n}){const i=n,s=t,{groupedYears:r,modelValue:o,focusYear:a,selectYear:l,setHoverValue:c}=E4(s,i),{defaultedConfig:u}=Wt(s);return e({getSidebarProps:()=>({modelValue:o,selectYear:l})}),(d,h)=>(D(),V("div",null,[d.$slots["top-extra"]?Oe(d.$slots,"top-extra",{key:0,value:d.internalModelValue}):ce("",!0),d.$slots["month-year"]?Oe(d.$slots,"month-year",In(yn({key:1},{years:Q(r),selectYear:Q(l)}))):(D(),Ce(Ou,{key:2,items:Q(r),"is-last":d.autoApply&&!Q(u).keepActionRow,height:Q(u).modeHeight,config:d.config,"no-overlay-focus":!!(d.noOverlayFocus||d.textInput),"focus-value":Q(a),type:"year","use-relative":"",onSelected:Q(l),onHoverValue:Q(c)},jn({_:2},[d.$slots["year-overlay-value"]?{name:"item",fn:Re(({item:f})=>[Oe(d.$slots,"year-overlay-value",{text:f.text,value:f.value})]),key:"0"}:void 0]),1032,["items","is-last","height","config","no-overlay-focus","focus-value","onSelected","onHoverValue"]))]))}}),C4={key:0,class:"dp__time_input"},T4=["data-test","aria-label","onKeydown","onClick","onMousedown"],k4=g("span",{class:"dp__tp_inline_btn_bar dp__tp_btn_in_l"},null,-1),A4=g("span",{class:"dp__tp_inline_btn_bar dp__tp_btn_in_r"},null,-1),M4=["aria-label","disabled","data-test","onKeydown","onClick"],I4=["data-test","aria-label","onKeydown","onClick","onMousedown"],P4=g("span",{class:"dp__tp_inline_btn_bar dp__tp_btn_in_l"},null,-1),R4=g("span",{class:"dp__tp_inline_btn_bar dp__tp_btn_in_r"},null,-1),D4={key:0},$4=["aria-label"],L4=cn({compatConfig:{MODE:3},__name:"TimeInput",props:{hours:{type:Number,default:0},minutes:{type:Number,default:0},seconds:{type:Number,default:0},closeTimePickerBtn:{type:Object,default:null},order:{type:Number,default:0},disabledTimesConfig:{type:Function,default:null},validateTime:{type:Function,default:()=>!1},...ps},emits:["set-hours","set-minutes","update:hours","update:minutes","update:seconds","reset-flow","mounted","overlay-closed","overlay-opened","am-pm-change"],setup(t,{expose:e,emit:n}){const i=n,s=t,{setTimePickerElements:r,setTimePickerBackRef:o}=mo(),{defaultedAriaLabels:a,defaultedTransitions:l,defaultedFilters:c,defaultedConfig:u,defaultedRange:d}=Wt(s),{transitionName:h,showTransition:f}=Nu(l),p=Ns({hours:!1,minutes:!1,seconds:!1}),m=we("AM"),y=we(null),v=we([]),b=we(),E=we(!1);xn(()=>{i("mounted")});const C=S=>It(new Date,{hours:S.hours,minutes:S.minutes,seconds:s.enableSeconds?S.seconds:0,milliseconds:0}),w=be(()=>S=>W(S,s[S])||T(S,s[S])),x=be(()=>({hours:s.hours,minutes:s.minutes,seconds:s.seconds})),T=(S,O)=>d.value.enabled&&!d.value.disableTimeRangeValidation?!s.validateTime(S,O):!1,k=(S,O)=>{if(d.value.enabled&&!d.value.disableTimeRangeValidation){const K=O?+s[`${S}Increment`]:-+s[`${S}Increment`],U=s[S]+K;return!s.validateTime(S,U)}return!1},A=be(()=>S=>!Y(+s[S]+ +s[`${S}Increment`],S)||k(S,!0)),P=be(()=>S=>!Y(+s[S]-+s[`${S}Increment`],S)||k(S,!1)),F=(S,O)=>CS(It(xe(),S),O),H=(S,O)=>kB(It(xe(),S),O),te=be(()=>({dp__time_col:!0,dp__time_col_block:!s.timePickerInline,dp__time_col_reg_block:!s.enableSeconds&&s.is24&&!s.timePickerInline,dp__time_col_reg_inline:!s.enableSeconds&&s.is24&&s.timePickerInline,dp__time_col_reg_with_button:!s.enableSeconds&&!s.is24,dp__time_col_sec:s.enableSeconds&&s.is24,dp__time_col_sec_with_button:s.enableSeconds&&!s.is24})),N=be(()=>{const S=[{type:"hours"}];return s.enableMinutes&&S.push({type:"",separator:!0},{type:"minutes"}),s.enableSeconds&&S.push({type:"",separator:!0},{type:"seconds"}),S}),L=be(()=>N.value.filter(S=>!S.separator)),I=be(()=>S=>{if(S==="hours"){const O=oe(+s.hours);return{text:O<10?`0${O}`:`${O}`,value:O}}return{text:s[S]<10?`0${s[S]}`:`${s[S]}`,value:s[S]}}),W=(S,O)=>{var K;if(!s.disabledTimesConfig)return!1;const U=s.disabledTimesConfig(s.order,S==="hours"?O:void 0);return U[S]?!!((K=U[S])!=null&&K.includes(O)):!0},X=(S,O)=>O!=="hours"||m.value==="AM"?S:S+12,J=S=>{const O=s.is24?24:12,K=S==="hours"?O:60,U=+s[`${S}GridIncrement`],re=S==="hours"&&!s.is24?U:0,j=[];for(let se=re;se({active:!1,disabled:c.value.times[S].includes(se.value)||!Y(se.value,S)||W(S,se.value)||T(S,se.value)}))},ne=S=>S>=0?S:59,ue=S=>S>=0?S:23,Y=(S,O)=>{const K=s.minTime?C(Dg(s.minTime)):null,U=s.maxTime?C(Dg(s.maxTime)):null,re=C(Dg(x.value,O,O==="minutes"||O==="seconds"?ne(S):ue(S)));return K&&U?(ou(re,U)||Za(re,U))&&(Sl(re,K)||Za(re,K)):K?Sl(re,K)||Za(re,K):U?ou(re,U)||Za(re,U):!0},Z=S=>s[`no${S[0].toUpperCase()+S.slice(1)}Overlay`],M=S=>{Z(S)||(p[S]=!p[S],p[S]?(E.value=!0,i("overlay-opened",S)):(E.value=!1,i("overlay-closed",S)))},ie=S=>S==="hours"?pr:S==="minutes"?oo:El,le=()=>{b.value&&clearTimeout(b.value)},$=(S,O=!0,K)=>{const U=O?F:H,re=O?+s[`${S}Increment`]:-+s[`${S}Increment`];Y(+s[S]+re,S)&&i(`update:${S}`,ie(S)(U({[S]:+s[S]},{[S]:+s[`${S}Increment`]}))),!(K!=null&&K.keyboard)&&u.value.timeArrowHoldThreshold&&(b.value=setTimeout(()=>{$(S,O)},u.value.timeArrowHoldThreshold))},oe=S=>s.is24?S:(S>=12?m.value="PM":m.value="AM",DB(S)),de=()=>{m.value==="PM"?(m.value="AM",i("update:hours",s.hours-12)):(m.value="PM",i("update:hours",s.hours+12)),i("am-pm-change",m.value)},ve=S=>{p[S]=!0},z=(S,O,K)=>{if(S&&s.arrowNavigation){Array.isArray(v.value[O])?v.value[O][K]=S:v.value[O]=[S];const U=v.value.reduce((re,j)=>j.map((se,ee)=>[...re[ee]||[],j[ee]]),[]);o(s.closeTimePickerBtn),y.value&&(U[1]=U[1].concat(y.value)),r(U,s.order)}},ge=(S,O)=>(M(S),i(`update:${S}`,O));return e({openChildCmp:ve}),(S,O)=>{var K;return S.disabled?ce("",!0):(D(),V("div",C4,[(D(!0),V($e,null,Xe(N.value,(U,re)=>{var j,se,ee;return D(),V("div",{key:re,class:Ie(te.value)},[U.separator?(D(),V($e,{key:0},[E.value?ce("",!0):(D(),V($e,{key:0},[He(":")],64))],64)):(D(),V($e,{key:1},[g("button",{ref_for:!0,ref:fe=>z(fe,re,0),type:"button",class:Ie({dp__btn:!0,dp__inc_dec_button:!S.timePickerInline,dp__inc_dec_button_inline:S.timePickerInline,dp__tp_inline_btn_top:S.timePickerInline,dp__inc_dec_button_disabled:A.value(U.type),"dp--hidden-el":E.value}),"data-test":`${U.type}-time-inc-btn-${s.order}`,"aria-label":(j=Q(a))==null?void 0:j.incrementValue(U.type),tabindex:"0",onKeydown:fe=>Q(Qn)(fe,()=>$(U.type,!0,{keyboard:!0}),!0),onClick:fe=>Q(u).timeArrowHoldThreshold?void 0:$(U.type,!0),onMousedown:fe=>Q(u).timeArrowHoldThreshold?$(U.type,!0):void 0,onMouseup:le},[s.timePickerInline?(D(),V($e,{key:1},[S.$slots["tp-inline-arrow-up"]?Oe(S.$slots,"tp-inline-arrow-up",{key:0}):(D(),V($e,{key:1},[k4,A4],64))],64)):(D(),V($e,{key:0},[S.$slots["arrow-up"]?Oe(S.$slots,"arrow-up",{key:0}):ce("",!0),S.$slots["arrow-up"]?ce("",!0):(D(),Ce(Q(O_),{key:1}))],64))],42,T4),g("button",{ref_for:!0,ref:fe=>z(fe,re,1),type:"button","aria-label":`${I.value(U.type).text}-${(se=Q(a))==null?void 0:se.openTpOverlay(U.type)}`,class:Ie({dp__time_display:!0,dp__time_display_block:!S.timePickerInline,dp__time_display_inline:S.timePickerInline,"dp--time-invalid":w.value(U.type),"dp--time-overlay-btn":!w.value(U.type),"dp--hidden-el":E.value}),disabled:Z(U.type),tabindex:"0","data-test":`${U.type}-toggle-overlay-btn-${s.order}`,onKeydown:fe=>Q(Qn)(fe,()=>M(U.type),!0),onClick:fe=>M(U.type)},[S.$slots[U.type]?Oe(S.$slots,U.type,{key:0,text:I.value(U.type).text,value:I.value(U.type).value}):ce("",!0),S.$slots[U.type]?ce("",!0):(D(),V($e,{key:1},[He(Ee(I.value(U.type).text),1)],64))],42,M4),g("button",{ref_for:!0,ref:fe=>z(fe,re,2),type:"button",class:Ie({dp__btn:!0,dp__inc_dec_button:!S.timePickerInline,dp__inc_dec_button_inline:S.timePickerInline,dp__tp_inline_btn_bottom:S.timePickerInline,dp__inc_dec_button_disabled:P.value(U.type),"dp--hidden-el":E.value}),"data-test":`${U.type}-time-dec-btn-${s.order}`,"aria-label":(ee=Q(a))==null?void 0:ee.decrementValue(U.type),tabindex:"0",onKeydown:fe=>Q(Qn)(fe,()=>$(U.type,!1,{keyboard:!0}),!0),onClick:fe=>Q(u).timeArrowHoldThreshold?void 0:$(U.type,!1),onMousedown:fe=>Q(u).timeArrowHoldThreshold?$(U.type,!1):void 0,onMouseup:le},[s.timePickerInline?(D(),V($e,{key:1},[S.$slots["tp-inline-arrow-down"]?Oe(S.$slots,"tp-inline-arrow-down",{key:0}):(D(),V($e,{key:1},[P4,R4],64))],64)):(D(),V($e,{key:0},[S.$slots["arrow-down"]?Oe(S.$slots,"arrow-down",{key:0}):ce("",!0),S.$slots["arrow-down"]?ce("",!0):(D(),Ce(Q(N_),{key:1}))],64))],42,I4)],64))],2)}),128)),S.is24?ce("",!0):(D(),V("div",D4,[S.$slots["am-pm-button"]?Oe(S.$slots,"am-pm-button",{key:0,toggle:de,value:m.value}):ce("",!0),S.$slots["am-pm-button"]?ce("",!0):(D(),V("button",{key:1,ref_key:"amPmButton",ref:y,type:"button",class:"dp__pm_am_button",role:"button","aria-label":(K=Q(a))==null?void 0:K.amPmButton,tabindex:"0",onClick:de,onKeydown:O[0]||(O[0]=U=>Q(Qn)(U,()=>de(),!0))},Ee(m.value),41,$4))])),(D(!0),V($e,null,Xe(L.value,(U,re)=>(D(),Ce(Rt,{key:re,name:Q(h)(p[U.type]),css:Q(f)},{default:Re(()=>{var j,se;return[p[U.type]?(D(),Ce(Ou,{key:0,items:J(U.type),"is-last":S.autoApply&&!Q(u).keepActionRow,"esc-close":S.escClose,type:U.type,"text-input":S.textInput,config:S.config,"arrow-navigation":S.arrowNavigation,"aria-labels":S.ariaLabels,"overlay-label":(se=(j=Q(a)).timeOverlay)==null?void 0:se.call(j,U.type),onSelected:ee=>ge(U.type,ee),onToggle:ee=>M(U.type),onResetFlow:O[1]||(O[1]=ee=>S.$emit("reset-flow"))},jn({"button-icon":Re(()=>[S.$slots["clock-icon"]?Oe(S.$slots,"clock-icon",{key:0}):ce("",!0),S.$slots["clock-icon"]?ce("",!0):(D(),Ce(ga(S.timePickerInline?Q(Ul):Q(L_)),{key:1}))]),_:2},[S.$slots[`${U.type}-overlay-value`]?{name:"item",fn:Re(({item:ee})=>[Oe(S.$slots,`${U.type}-overlay-value`,{text:ee.text,value:ee.value})]),key:"0"}:void 0,S.$slots[`${U.type}-overlay-header`]?{name:"header",fn:Re(()=>[Oe(S.$slots,`${U.type}-overlay-header`,{toggle:()=>M(U.type)})]),key:"1"}:void 0]),1032,["items","is-last","esc-close","type","text-input","config","arrow-navigation","aria-labels","overlay-label","onSelected","onToggle"])):ce("",!0)]}),_:2},1032,["name","css"]))),128))]))}}}),O4={class:"dp--tp-wrap"},N4=["aria-label","tabindex"],F4=["role","aria-label","tabindex"],B4=["aria-label"],uC=cn({compatConfig:{MODE:3},__name:"TimePicker",props:{hours:{type:[Number,Array],default:0},minutes:{type:[Number,Array],default:0},seconds:{type:[Number,Array],default:0},disabledTimesConfig:{type:Function,default:null},validateTime:{type:Function,default:()=>!1},...ps},emits:["update:hours","update:minutes","update:seconds","mount","reset-flow","overlay-opened","overlay-closed","am-pm-change"],setup(t,{expose:e,emit:n}){const i=n,s=t,{buildMatrix:r,setTimePicker:o}=mo(),a=pa(),{defaultedTransitions:l,defaultedAriaLabels:c,defaultedTextInput:u,defaultedConfig:d,defaultedRange:h}=Wt(s),{transitionName:f,showTransition:p}=Nu(l),{hideNavigationButtons:m}=bf(),y=we(null),v=we(null),b=we([]),E=we(null),C=we(!1);xn(()=>{i("mount"),!s.timePicker&&s.arrowNavigation?r([mn(y.value)],"time"):o(!0,s.timePicker)});const w=be(()=>h.value.enabled&&s.modelAuto?GS(s.internalModelValue):!0),x=we(!1),T=J=>({hours:Array.isArray(s.hours)?s.hours[J]:s.hours,minutes:Array.isArray(s.minutes)?s.minutes[J]:s.minutes,seconds:Array.isArray(s.seconds)?s.seconds[J]:s.seconds}),k=be(()=>{const J=[];if(h.value.enabled)for(let ne=0;ne<2;ne++)J.push(T(ne));else J.push(T(0));return J}),A=(J,ne=!1,ue="")=>{ne||i("reset-flow"),x.value=J,i(J?"overlay-opened":"overlay-closed",zn.time),s.arrowNavigation&&o(J),Rn(()=>{ue!==""&&b.value[0]&&b.value[0].openChildCmp(ue)})},P=be(()=>({dp__btn:!0,dp__button:!0,dp__button_bottom:s.autoApply&&!d.value.keepActionRow})),F=ki(a,"timePicker"),H=(J,ne,ue)=>h.value.enabled?ne===0?[J,k.value[1][ue]]:[k.value[0][ue],J]:J,te=J=>{i("update:hours",J)},N=J=>{i("update:minutes",J)},L=J=>{i("update:seconds",J)},I=()=>{if(E.value&&!u.value.enabled&&!s.noOverlayFocus){const J=XS(E.value);J&&J.focus({preventScroll:!0})}},W=J=>{C.value=!1,i("overlay-closed",J)},X=J=>{C.value=!0,i("overlay-opened",J)};return e({toggleTimePicker:A}),(J,ne)=>{var ue;return D(),V("div",O4,[!J.timePicker&&!J.timePickerInline?Ne((D(),V("button",{key:0,ref_key:"openTimePickerBtn",ref:y,type:"button",class:Ie({...P.value,"dp--hidden-el":x.value}),"aria-label":(ue=Q(c))==null?void 0:ue.openTimePicker,tabindex:J.noOverlayFocus?void 0:0,"data-test":"open-time-picker-btn",onKeydown:ne[0]||(ne[0]=Y=>Q(Qn)(Y,()=>A(!0))),onClick:ne[1]||(ne[1]=Y=>A(!0))},[J.$slots["clock-icon"]?Oe(J.$slots,"clock-icon",{key:0}):ce("",!0),J.$slots["clock-icon"]?ce("",!0):(D(),Ce(Q(L_),{key:1}))],42,N4)),[[th,!Q(m)(J.hideNavigation,"time")]]):ce("",!0),B(Rt,{name:Q(f)(x.value),css:Q(p)&&!J.timePickerInline},{default:Re(()=>{var Y,Z;return[x.value||J.timePicker||J.timePickerInline?(D(),V("div",{key:0,ref_key:"overlayRef",ref:E,role:J.timePickerInline?void 0:"dialog",class:Ie({dp__overlay:!J.timePickerInline,"dp--overlay-absolute":!s.timePicker&&!J.timePickerInline,"dp--overlay-relative":s.timePicker}),style:Mn(J.timePicker?{height:`${Q(d).modeHeight}px`}:void 0),"aria-label":(Y=Q(c))==null?void 0:Y.timePicker,tabindex:J.timePickerInline?void 0:0},[g("div",{class:Ie(J.timePickerInline?"dp__time_picker_inline_container":"dp__overlay_container dp__container_flex dp__time_picker_overlay_container"),style:{display:"flex"}},[J.$slots["time-picker-overlay"]?Oe(J.$slots,"time-picker-overlay",{key:0,hours:t.hours,minutes:t.minutes,seconds:t.seconds,setHours:te,setMinutes:N,setSeconds:L}):ce("",!0),J.$slots["time-picker-overlay"]?ce("",!0):(D(),V("div",{key:1,class:Ie(J.timePickerInline?"dp__flex":"dp__overlay_row dp__flex_row")},[(D(!0),V($e,null,Xe(k.value,(M,ie)=>Ne((D(),Ce(L4,yn({key:ie,ref_for:!0},{...J.$props,order:ie,hours:M.hours,minutes:M.minutes,seconds:M.seconds,closeTimePickerBtn:v.value,disabledTimesConfig:t.disabledTimesConfig,disabled:ie===0?Q(h).fixedStart:Q(h).fixedEnd},{ref_for:!0,ref_key:"timeInputRefs",ref:b,"validate-time":(le,$)=>t.validateTime(le,H($,ie,le)),"onUpdate:hours":le=>te(H(le,ie,"hours")),"onUpdate:minutes":le=>N(H(le,ie,"minutes")),"onUpdate:seconds":le=>L(H(le,ie,"seconds")),onMounted:I,onOverlayClosed:W,onOverlayOpened:X,onAmPmChange:ne[2]||(ne[2]=le=>J.$emit("am-pm-change",le))}),jn({_:2},[Xe(Q(F),(le,$)=>({name:le,fn:Re(oe=>[Oe(J.$slots,le,yn({ref_for:!0},oe))])}))]),1040,["validate-time","onUpdate:hours","onUpdate:minutes","onUpdate:seconds"])),[[th,ie===0?!0:w.value]])),128))],2)),!J.timePicker&&!J.timePickerInline?Ne((D(),V("button",{key:2,ref_key:"closeTimePickerBtn",ref:v,type:"button",class:Ie({...P.value,"dp--hidden-el":C.value}),"aria-label":(Z=Q(c))==null?void 0:Z.closeTimePicker,tabindex:"0",onKeydown:ne[3]||(ne[3]=M=>Q(Qn)(M,()=>A(!1))),onClick:ne[4]||(ne[4]=M=>A(!1))},[J.$slots["calendar-icon"]?Oe(J.$slots,"calendar-icon",{key:0}):ce("",!0),J.$slots["calendar-icon"]?ce("",!0):(D(),Ce(Q(Ul),{key:1}))],42,B4)),[[th,!Q(m)(J.hideNavigation,"time")]]):ce("",!0)],2)],14,F4)):ce("",!0)]}),_:3},8,["name","css"])])}}}),dC=(t,e,n,i)=>{const{defaultedRange:s}=Wt(t),r=(E,C)=>Array.isArray(e[E])?e[E][C]:e[E],o=E=>t.enableSeconds?Array.isArray(e.seconds)?e.seconds[E]:e.seconds:0,a=(E,C)=>E?C!==void 0?eo(E,r("hours",C),r("minutes",C),o(C)):eo(E,e.hours,e.minutes,o()):YS(xe(),o(C)),l=(E,C)=>{e[E]=C},c=be(()=>t.modelAuto&&s.value.enabled?Array.isArray(n.value)?n.value.length>1:!1:s.value.enabled),u=(E,C)=>{const w=Object.fromEntries(Object.keys(e).map(x=>x===E?[x,C]:[x,e[x]].slice()));if(c.value&&!s.value.disableTimeRangeValidation){const x=k=>n.value?eo(n.value[k],w.hours[k],w.minutes[k],w.seconds[k]):null,T=k=>HS(n.value[k],0);return!(ct(x(0),x(1))&&(Sl(x(0),T(1))||ou(x(1),T(0))))}return!0},d=(E,C)=>{u(E,C)&&(l(E,C),i&&i())},h=E=>{d("hours",E)},f=E=>{d("minutes",E)},p=E=>{d("seconds",E)},m=(E,C,w,x)=>{C&&h(E),!C&&!w&&f(E),w&&p(E),n.value&&x(n.value)},y=E=>{if(E){const C=Array.isArray(E),w=C?[+E[0].hours,+E[1].hours]:+E.hours,x=C?[+E[0].minutes,+E[1].minutes]:+E.minutes,T=C?[+E[0].seconds,+E[1].seconds]:+E.seconds;l("hours",w),l("minutes",x),t.enableSeconds&&l("seconds",T)}},v=(E,C)=>{const w={hours:Array.isArray(e.hours)?e.hours[E]:e.hours,disabledArr:[]};return(C||C===0)&&(w.hours=C),Array.isArray(t.disabledTimes)&&(w.disabledArr=s.value.enabled&&Array.isArray(t.disabledTimes[E])?t.disabledTimes[E]:t.disabledTimes),w},b=be(()=>(E,C)=>{var w;if(Array.isArray(t.disabledTimes)){const{disabledArr:x,hours:T}=v(E,C),k=x.filter(A=>+A.hours===T);return((w=k[0])==null?void 0:w.minutes)==="*"?{hours:[T],minutes:void 0,seconds:void 0}:{hours:[],minutes:k?.map(A=>+A.minutes)??[],seconds:k?.map(A=>A.seconds?+A.seconds:void 0)??[]}}return{hours:[],minutes:[],seconds:[]}});return{setTime:l,updateHours:h,updateMinutes:f,updateSeconds:p,getSetDateTime:a,updateTimeValues:m,getSecondsValue:o,assignStartTime:y,validateTime:u,disabledTimesConfig:b}},V4=(t,e)=>{const n=()=>{t.isTextInputDate&&C()},{modelValue:i,time:s}=Fu(t,e,n),{defaultedStartTime:r,defaultedRange:o,defaultedTz:a}=Wt(t),{updateTimeValues:l,getSetDateTime:c,setTime:u,assignStartTime:d,disabledTimesConfig:h,validateTime:f}=dC(t,s,i,p);function p(){e("update-flow-step")}const m=x=>{const{hours:T,minutes:k,seconds:A}=x;return{hours:+T,minutes:+k,seconds:A?+A:0}},y=()=>{if(t.startTime){if(Array.isArray(t.startTime)){const T=m(t.startTime[0]),k=m(t.startTime[1]);return[It(xe(),T),It(xe(),k)]}const x=m(t.startTime);return It(xe(),x)}return o.value.enabled?[null,null]:null},v=()=>{if(o.value.enabled){const[x,T]=y();i.value=[_i(c(x,0),a.value.timezone),_i(c(T,1),a.value.timezone)]}else i.value=_i(c(y()),a.value.timezone)},b=x=>Array.isArray(x)?[na(xe(x[0])),na(xe(x[1]))]:[na(x??xe())],E=(x,T,k)=>{u("hours",x),u("minutes",T),u("seconds",t.enableSeconds?k:0)},C=()=>{const[x,T]=b(i.value);return o.value.enabled?E([x.hours,T.hours],[x.minutes,T.minutes],[x.seconds,T.seconds]):E(x.hours,x.minutes,x.seconds)};xn(()=>{if(!t.shadow)return d(r.value),i.value?C():v()});const w=()=>{Array.isArray(i.value)?i.value=i.value.map((x,T)=>x&&c(x,T)):i.value=c(i.value),e("time-update")};return{modelValue:i,time:s,disabledTimesConfig:h,updateTime:(x,T=!0,k=!1)=>{l(x,T,k,w)},validateTime:f}},z4=cn({compatConfig:{MODE:3},__name:"TimePickerSolo",props:{...ps},emits:["update:internal-model-value","time-update","am-pm-change","mount","reset-flow","update-flow-step","overlay-toggle"],setup(t,{expose:e,emit:n}){const i=n,s=t,r=pa(),o=ki(r,"timePicker"),a=we(null),{time:l,modelValue:c,disabledTimesConfig:u,updateTime:d,validateTime:h}=V4(s,i);return xn(()=>{s.shadow||i("mount",null)}),e({getSidebarProps:()=>({modelValue:c,time:l,updateTime:d}),toggleTimePicker:(f,p=!1,m="")=>{var y;(y=a.value)==null||y.toggleTimePicker(f,p,m)}}),(f,p)=>(D(),Ce(yf,{"multi-calendars":0,stretch:""},{default:Re(()=>[B(uC,yn({ref_key:"tpRef",ref:a},f.$props,{hours:Q(l).hours,minutes:Q(l).minutes,seconds:Q(l).seconds,"internal-model-value":f.internalModelValue,"disabled-times-config":Q(u),"validate-time":Q(h),"onUpdate:hours":p[0]||(p[0]=m=>Q(d)(m)),"onUpdate:minutes":p[1]||(p[1]=m=>Q(d)(m,!1)),"onUpdate:seconds":p[2]||(p[2]=m=>Q(d)(m,!1,!0)),onAmPmChange:p[3]||(p[3]=m=>f.$emit("am-pm-change",m)),onResetFlow:p[4]||(p[4]=m=>f.$emit("reset-flow")),onOverlayClosed:p[5]||(p[5]=m=>f.$emit("overlay-toggle",{open:!1,overlay:m})),onOverlayOpened:p[6]||(p[6]=m=>f.$emit("overlay-toggle",{open:!0,overlay:m}))}),jn({_:2},[Xe(Q(o),(m,y)=>({name:m,fn:Re(v=>[Oe(f.$slots,m,In(Zn(v)))])}))]),1040,["hours","minutes","seconds","internal-model-value","disabled-times-config","validate-time"])]),_:3}))}}),W4={class:"dp--header-wrap"},H4={key:0,class:"dp__month_year_wrap"},Y4={key:0},j4={class:"dp__month_year_wrap"},K4=["data-dp-element","aria-label","data-test","onClick","onKeydown"],U4=cn({compatConfig:{MODE:3},__name:"DpHeader",props:{month:{type:Number,default:0},year:{type:Number,default:0},instance:{type:Number,default:0},years:{type:Array,default:()=>[]},months:{type:Array,default:()=>[]},...ps},emits:["update-month-year","mount","reset-flow","overlay-closed","overlay-opened"],setup(t,{expose:e,emit:n}){const i=n,s=t,{defaultedTransitions:r,defaultedAriaLabels:o,defaultedMultiCalendars:a,defaultedFilters:l,defaultedConfig:c,defaultedHighlight:u,propDates:d,defaultedUI:h}=Wt(s),{transitionName:f,showTransition:p}=Nu(r),{buildMatrix:m}=mo(),{handleMonthYearChange:y,isDisabled:v,updateMonthYear:b}=d4(s,i),{showLeftIcon:E,showRightIcon:C}=bf(),w=we(!1),x=we(!1),T=we(!1),k=we([null,null,null,null]);xn(()=>{i("mount")});const A=Z=>({get:()=>s[Z],set:M=>{const ie=Z===es.month?es.year:es.month;i("update-month-year",{[Z]:M,[ie]:s[ie]}),Z===es.month?W(!0):X(!0)}}),P=be(A(es.month)),F=be(A(es.year)),H=be(()=>Z=>({month:s.month,year:s.year,items:Z===es.month?s.months:s.years,instance:s.instance,updateMonthYear:b,toggle:Z===es.month?W:X})),te=be(()=>s.months.find(M=>M.value===s.month)||{text:"",value:0}),N=be(()=>Tl(s.months,Z=>{const M=s.month===Z.value,ie=au(Z.value,ZS(s.year,d.value.minDate),JS(s.year,d.value.maxDate))||l.value.months.includes(Z.value),le=iC(u.value,Z.value,s.year);return{active:M,disabled:ie,highlighted:le}})),L=be(()=>Tl(s.years,Z=>{const M=s.year===Z.value,ie=au(Z.value,kl(d.value.minDate),kl(d.value.maxDate))||l.value.years.includes(Z.value),le=W_(u.value,Z.value);return{active:M,disabled:ie,highlighted:le}})),I=(Z,M,ie)=>{ie!==void 0?Z.value=ie:Z.value=!Z.value,Z.value?(T.value=!0,i("overlay-opened",M)):(T.value=!1,i("overlay-closed",M))},W=(Z=!1,M)=>{J(Z),I(w,zn.month,M)},X=(Z=!1,M)=>{J(Z),I(x,zn.year,M)},J=Z=>{Z||i("reset-flow")},ne=(Z,M)=>{s.arrowNavigation&&(k.value[M]=mn(Z),m(k.value,"monthYear"))},ue=be(()=>{var Z,M,ie,le,$,oe;return[{type:es.month,index:1,toggle:W,modelValue:P.value,updateModelValue:de=>P.value=de,text:te.value.text,showSelectionGrid:w.value,items:N.value,ariaLabel:(Z=o.value)==null?void 0:Z.openMonthsOverlay,overlayLabel:((ie=(M=o.value).monthPicker)==null?void 0:ie.call(M,!0))??void 0},{type:es.year,index:2,toggle:X,modelValue:F.value,updateModelValue:de=>F.value=de,text:qS(s.year,s.locale),showSelectionGrid:x.value,items:L.value,ariaLabel:(le=o.value)==null?void 0:le.openYearsOverlay,overlayLabel:((oe=($=o.value).yearPicker)==null?void 0:oe.call($,!0))??void 0}]}),Y=be(()=>s.disableYearSelect?[ue.value[0]]:s.yearFirst?[...ue.value].reverse():ue.value);return e({toggleMonthPicker:W,toggleYearPicker:X,handleMonthYearChange:y}),(Z,M)=>{var ie,le,$,oe,de,ve;return D(),V("div",W4,[Z.$slots["month-year"]?(D(),V("div",H4,[Oe(Z.$slots,"month-year",In(Zn({month:t.month,year:t.year,months:t.months,years:t.years,updateMonthYear:Q(b),handleMonthYearChange:Q(y),instance:t.instance})))])):(D(),V($e,{key:1},[Z.$slots["top-extra"]?(D(),V("div",Y4,[Oe(Z.$slots,"top-extra",{value:Z.internalModelValue})])):ce("",!0),g("div",j4,[Q(E)(Q(a),t.instance)&&!Z.vertical?(D(),Ce(Wc,{key:0,"aria-label":(ie=Q(o))==null?void 0:ie.prevMonth,disabled:Q(v)(!1),class:Ie((le=Q(h))==null?void 0:le.navBtnPrev),"el-name":"action-prev",onActivate:M[0]||(M[0]=z=>Q(y)(!1,!0)),onSetRef:M[1]||(M[1]=z=>ne(z,0))},{default:Re(()=>[Z.$slots["arrow-left"]?Oe(Z.$slots,"arrow-left",{key:0}):ce("",!0),Z.$slots["arrow-left"]?ce("",!0):(D(),Ce(Q(D_),{key:1}))]),_:3},8,["aria-label","disabled","class"])):ce("",!0),g("div",{class:Ie(["dp__month_year_wrap",{dp__year_disable_select:Z.disableYearSelect}])},[(D(!0),V($e,null,Xe(Y.value,(z,ge)=>(D(),V($e,{key:z.type},[g("button",{ref_for:!0,ref:S=>ne(S,ge+1),type:"button","data-dp-element":`overlay-${z.type}`,class:Ie(["dp__btn dp__month_year_select",{"dp--hidden-el":T.value}]),"aria-label":`${z.text}-${z.ariaLabel}`,"data-test":`${z.type}-toggle-overlay-${t.instance}`,onClick:z.toggle,onKeydown:S=>Q(Qn)(S,()=>z.toggle(),!0)},[Z.$slots[z.type]?Oe(Z.$slots,z.type,{key:0,text:z.text,value:s[z.type]}):ce("",!0),Z.$slots[z.type]?ce("",!0):(D(),V($e,{key:1},[He(Ee(z.text),1)],64))],42,K4),B(Rt,{name:Q(f)(z.showSelectionGrid),css:Q(p)},{default:Re(()=>[z.showSelectionGrid?(D(),Ce(Ou,{key:0,items:z.items,"arrow-navigation":Z.arrowNavigation,"hide-navigation":Z.hideNavigation,"is-last":Z.autoApply&&!Q(c).keepActionRow,"skip-button-ref":!1,config:Z.config,type:z.type,"header-refs":[],"esc-close":Z.escClose,"menu-wrap-ref":Z.menuWrapRef,"text-input":Z.textInput,"aria-labels":Z.ariaLabels,"overlay-label":z.overlayLabel,onSelected:z.updateModelValue,onToggle:z.toggle},jn({"button-icon":Re(()=>[Z.$slots["calendar-icon"]?Oe(Z.$slots,"calendar-icon",{key:0}):ce("",!0),Z.$slots["calendar-icon"]?ce("",!0):(D(),Ce(Q(Ul),{key:1}))]),_:2},[Z.$slots[`${z.type}-overlay-value`]?{name:"item",fn:Re(({item:S})=>[Oe(Z.$slots,`${z.type}-overlay-value`,{text:S.text,value:S.value})]),key:"0"}:void 0,Z.$slots[`${z.type}-overlay`]?{name:"overlay",fn:Re(()=>[Oe(Z.$slots,`${z.type}-overlay`,yn({ref_for:!0},H.value(z.type)))]),key:"1"}:void 0,Z.$slots[`${z.type}-overlay-header`]?{name:"header",fn:Re(()=>[Oe(Z.$slots,`${z.type}-overlay-header`,{toggle:z.toggle})]),key:"2"}:void 0]),1032,["items","arrow-navigation","hide-navigation","is-last","config","type","esc-close","menu-wrap-ref","text-input","aria-labels","overlay-label","onSelected","onToggle"])):ce("",!0)]),_:2},1032,["name","css"])],64))),128))],2),Q(E)(Q(a),t.instance)&&Z.vertical?(D(),Ce(Wc,{key:1,"aria-label":($=Q(o))==null?void 0:$.prevMonth,"el-name":"action-prev",disabled:Q(v)(!1),class:Ie((oe=Q(h))==null?void 0:oe.navBtnPrev),onActivate:M[2]||(M[2]=z=>Q(y)(!1,!0))},{default:Re(()=>[Z.$slots["arrow-up"]?Oe(Z.$slots,"arrow-up",{key:0}):ce("",!0),Z.$slots["arrow-up"]?ce("",!0):(D(),Ce(Q(O_),{key:1}))]),_:3},8,["aria-label","disabled","class"])):ce("",!0),Q(C)(Q(a),t.instance)?(D(),Ce(Wc,{key:2,ref:"rightIcon","el-name":"action-next",disabled:Q(v)(!0),"aria-label":(de=Q(o))==null?void 0:de.nextMonth,class:Ie((ve=Q(h))==null?void 0:ve.navBtnNext),onActivate:M[3]||(M[3]=z=>Q(y)(!0,!0)),onSetRef:M[4]||(M[4]=z=>ne(z,Z.disableYearSelect?2:3))},{default:Re(()=>[Z.$slots[Z.vertical?"arrow-down":"arrow-right"]?Oe(Z.$slots,Z.vertical?"arrow-down":"arrow-right",{key:0}):ce("",!0),Z.$slots[Z.vertical?"arrow-down":"arrow-right"]?ce("",!0):(D(),Ce(ga(Z.vertical?Q(N_):Q($_)),{key:1}))]),_:3},8,["disabled","aria-label","class"])):ce("",!0)])],64))])}}}),G4={class:"dp__calendar_header",role:"row"},X4={key:0,class:"dp__calendar_header_item",role:"gridcell"},q4=["aria-label"],Z4=g("div",{class:"dp__calendar_header_separator"},null,-1),J4={key:0,class:"dp__calendar_item dp__week_num",role:"gridcell"},Q4={class:"dp__cell_inner"},eV=["id","aria-pressed","aria-disabled","aria-label","data-test","onClick","onTouchend","onKeydown","onMouseenter","onMouseleave","onMousedown"],tV=cn({compatConfig:{MODE:3},__name:"DpCalendar",props:{mappedDates:{type:Array,default:()=>[]},instance:{type:Number,default:0},month:{type:Number,default:0},year:{type:Number,default:0},...ps},emits:["select-date","set-hover-date","handle-scroll","mount","handle-swipe","handle-space","tooltip-open","tooltip-close"],setup(t,{expose:e,emit:n}){const i=n,s=t,{buildMultiLevelMatrix:r}=mo(),{defaultedTransitions:o,defaultedConfig:a,defaultedAriaLabels:l,defaultedMultiCalendars:c,defaultedWeekNumbers:u,defaultedMultiDates:d,defaultedUI:h}=Wt(s),f=we(null),p=we({bottom:"",left:"",transform:""}),m=we([]),y=we(null),v=we(!0),b=we(""),E=we({startX:0,endX:0,startY:0,endY:0}),C=we([]),w=we({left:"50%"}),x=we(!1),T=be(()=>s.calendar?s.calendar(s.mappedDates):s.mappedDates),k=be(()=>s.dayNames?Array.isArray(s.dayNames)?s.dayNames:s.dayNames(s.locale,+s.weekStart):RB(s.formatLocale,s.locale,+s.weekStart));xn(()=>{i("mount",{cmp:"calendar",refs:m}),a.value.noSwipe||y.value&&(y.value.addEventListener("touchstart",ne,{passive:!1}),y.value.addEventListener("touchend",ue,{passive:!1}),y.value.addEventListener("touchmove",Y,{passive:!1})),s.monthChangeOnScroll&&y.value&&y.value.addEventListener("wheel",ie,{passive:!1})});const A=z=>z?s.vertical?"vNext":"next":s.vertical?"vPrevious":"previous",P=(z,ge)=>{if(s.transitions){const S=ni(sr(xe(),s.month,s.year));b.value=nn(ni(sr(xe(),z,ge)),S)?o.value[A(!0)]:o.value[A(!1)],v.value=!1,Rn(()=>{v.value=!0})}},F=be(()=>({...h.value.calendar??{}})),H=be(()=>z=>{const ge=$B(z);return{dp__marker_dot:ge.type==="dot",dp__marker_line:ge.type==="line"}}),te=be(()=>z=>ct(z,f.value)),N=be(()=>({dp__calendar:!0,dp__calendar_next:c.value.count>0&&s.instance!==0})),L=be(()=>z=>s.hideOffsetDates?z.current:!0),I=async(z,ge)=>{const{width:S,height:O}=z.getBoundingClientRect();f.value=ge.value;let K={left:`${S/2}px`},U=-50;if(await Rn(),C.value[0]){const{left:re,width:j}=C.value[0].getBoundingClientRect();re<0&&(K={left:"0"},U=0,w.value.left=`${S/2}px`),window.innerWidth{var O,K,U;const re=mn(m.value[ge][S]);re&&((O=z.marker)!=null&&O.customPosition&&(U=(K=z.marker)==null?void 0:K.tooltip)!=null&&U.length?p.value=z.marker.customPosition(re):await I(re,z),i("tooltip-open",z.marker))},X=async(z,ge,S)=>{var O,K;if(x.value&&d.value.enabled&&d.value.dragSelect)return i("select-date",z);i("set-hover-date",z),(K=(O=z.marker)==null?void 0:O.tooltip)!=null&&K.length&&await W(z,ge,S)},J=z=>{f.value&&(f.value=null,p.value=JSON.parse(JSON.stringify({bottom:"",left:"",transform:""})),i("tooltip-close",z.marker))},ne=z=>{E.value.startX=z.changedTouches[0].screenX,E.value.startY=z.changedTouches[0].screenY},ue=z=>{E.value.endX=z.changedTouches[0].screenX,E.value.endY=z.changedTouches[0].screenY,Z()},Y=z=>{s.vertical&&!s.inline&&z.preventDefault()},Z=()=>{const z=s.vertical?"Y":"X";Math.abs(E.value[`start${z}`]-E.value[`end${z}`])>10&&i("handle-swipe",E.value[`start${z}`]>E.value[`end${z}`]?"right":"left")},M=(z,ge,S)=>{z&&(Array.isArray(m.value[ge])?m.value[ge][S]=z:m.value[ge]=[z]),s.arrowNavigation&&r(m.value,"calendar")},ie=z=>{s.monthChangeOnScroll&&(z.preventDefault(),i("handle-scroll",z))},le=z=>u.value.type==="local"?I_(z.value,{weekStartsOn:+s.weekStart}):u.value.type==="iso"?A_(z.value):typeof u.value.type=="function"?u.value.type(z.value):"",$=z=>{const ge=z[0];return u.value.hideOnOffsetDates?z.some(S=>S.current)?le(ge):"":le(ge)},oe=(z,ge,S=!0)=>{S&&BB()||d.value.enabled||(Qr(z,a.value),i("select-date",ge))},de=z=>{Qr(z,a.value)},ve=z=>{d.value.enabled&&d.value.dragSelect?(x.value=!0,i("select-date",z)):d.value.enabled&&i("select-date",z)};return e({triggerTransition:P}),(z,ge)=>(D(),V("div",{class:Ie(N.value)},[g("div",{ref_key:"calendarWrapRef",ref:y,class:Ie(F.value),role:"grid"},[g("div",G4,[z.weekNumbers?(D(),V("div",X4,Ee(z.weekNumName),1)):ce("",!0),(D(!0),V($e,null,Xe(k.value,(S,O)=>{var K,U;return D(),V("div",{key:O,class:"dp__calendar_header_item",role:"gridcell","data-test":"calendar-header","aria-label":(U=(K=Q(l))==null?void 0:K.weekDay)==null?void 0:U.call(K,O)},[z.$slots["calendar-header"]?Oe(z.$slots,"calendar-header",{key:0,day:S,index:O}):ce("",!0),z.$slots["calendar-header"]?ce("",!0):(D(),V($e,{key:1},[He(Ee(S),1)],64))],8,q4)}),128))]),Z4,B(Rt,{name:b.value,css:!!z.transitions},{default:Re(()=>[v.value?(D(),V("div",{key:0,class:"dp__calendar",role:"rowgroup",onMouseleave:ge[1]||(ge[1]=S=>x.value=!1)},[(D(!0),V($e,null,Xe(T.value,(S,O)=>(D(),V("div",{key:O,class:"dp__calendar_row",role:"row"},[z.weekNumbers?(D(),V("div",J4,[g("div",Q4,Ee($(S.days)),1)])):ce("",!0),(D(!0),V($e,null,Xe(S.days,(K,U)=>{var re,j,se;return D(),V("div",{id:Q(sC)(K.value),ref_for:!0,ref:ee=>M(ee,O,U),key:U+O,role:"gridcell",class:"dp__calendar_item","aria-pressed":(K.classData.dp__active_date||K.classData.dp__range_start||K.classData.dp__range_start)??void 0,"aria-disabled":K.classData.dp__cell_disabled||void 0,"aria-label":(j=(re=Q(l))==null?void 0:re.day)==null?void 0:j.call(re,K),tabindex:"0","data-test":K.value,onClick:iu(ee=>oe(ee,K),["prevent"]),onTouchend:ee=>oe(ee,K,!1),onKeydown:ee=>Q(Qn)(ee,()=>z.$emit("select-date",K)),onMouseenter:ee=>X(K,O,U),onMouseleave:ee=>J(K),onMousedown:ee=>ve(K),onMouseup:ge[0]||(ge[0]=ee=>x.value=!1)},[g("div",{class:Ie(["dp__cell_inner",K.classData])},[z.$slots.day&&L.value(K)?Oe(z.$slots,"day",{key:0,day:+K.text,date:K.value}):ce("",!0),z.$slots.day?ce("",!0):(D(),V($e,{key:1},[He(Ee(K.text),1)],64)),K.marker&&L.value(K)?(D(),V($e,{key:2},[z.$slots.marker?Oe(z.$slots,"marker",{key:0,marker:K.marker,day:+K.text,date:K.value}):(D(),V("div",{key:1,class:Ie(H.value(K.marker)),style:Mn(K.marker.color?{backgroundColor:K.marker.color}:{})},null,6))],64)):ce("",!0),te.value(K.value)?(D(),V("div",{key:3,ref_for:!0,ref_key:"activeTooltip",ref:C,class:"dp__marker_tooltip",style:Mn(p.value)},[(se=K.marker)!=null&&se.tooltip?(D(),V("div",{key:0,class:"dp__tooltip_content",onClick:de},[(D(!0),V($e,null,Xe(K.marker.tooltip,(ee,fe)=>(D(),V("div",{key:fe,class:"dp__tooltip_text"},[z.$slots["marker-tooltip"]?Oe(z.$slots,"marker-tooltip",{key:0,tooltip:ee,day:K.value}):ce("",!0),z.$slots["marker-tooltip"]?ce("",!0):(D(),V($e,{key:1},[g("div",{class:"dp__tooltip_mark",style:Mn(ee.color?{backgroundColor:ee.color}:{})},null,4),g("div",null,Ee(ee.text),1)],64))]))),128)),g("div",{class:"dp__arrow_bottom_tp",style:Mn(w.value)},null,4)])):ce("",!0)],4)):ce("",!0)],2)],40,eV)}),128))]))),128))],32)):ce("",!0)]),_:3},8,["name","css"])],2)],2))}}),Ab=t=>Array.isArray(t),nV=(t,e,n,i)=>{const s=we([]),r=we(new Date),o=we(),a=()=>ne(t.isTextInputDate),{modelValue:l,calendars:c,time:u,today:d}=Fu(t,e,a),{defaultedMultiCalendars:h,defaultedStartTime:f,defaultedRange:p,defaultedConfig:m,defaultedTz:y,propDates:v,defaultedMultiDates:b}=Wt(t),{validateMonthYearInRange:E,isDisabled:C,isDateRangeAllowed:w,checkMinMaxRange:x}=_o(t),{updateTimeValues:T,getSetDateTime:k,setTime:A,assignStartTime:P,validateTime:F,disabledTimesConfig:H}=dC(t,u,l,i),te=be(()=>ae=>c.value[ae]?c.value[ae].month:0),N=be(()=>ae=>c.value[ae]?c.value[ae].year:0),L=ae=>!m.value.keepViewOnOffsetClick||ae?!0:!o.value,I=(ae,Te,he,ke=!1)=>{var De,Ht;L(ke)&&(c.value[ae]||(c.value[ae]={month:0,year:0}),c.value[ae].month=Eb(Te)?(De=c.value[ae])==null?void 0:De.month:Te,c.value[ae].year=Eb(he)?(Ht=c.value[ae])==null?void 0:Ht.year:he)},W=()=>{t.autoApply&&e("select-date")};xn(()=>{t.shadow||(l.value||(z(),f.value&&P(f.value)),ne(!0),t.focusStartDate&&t.startDate&&z())});const X=be(()=>{var ae;return(ae=t.flow)!=null&&ae.length&&!t.partialFlow?t.flowStep===t.flow.length:!0}),J=()=>{t.autoApply&&X.value&&e("auto-apply",t.partialFlow?t.flowStep!==t.flow.length:!1)},ne=(ae=!1)=>{if(l.value)return Array.isArray(l.value)?(s.value=l.value,$(ae)):Z(l.value,ae);if(h.value.count&&ae&&!t.startDate)return Y(xe(),ae)},ue=()=>Array.isArray(l.value)&&p.value.enabled?at(l.value[0])===at(l.value[1]??l.value[0]):!1,Y=(ae=new Date,Te=!1)=>{if((!h.value.count||!h.value.static||Te)&&I(0,at(ae),Ge(ae)),h.value.count&&(!h.value.solo||!l.value||ue()))for(let he=1;he{Y(ae),A("hours",pr(ae)),A("minutes",oo(ae)),A("seconds",El(ae)),h.value.count&&Te&&ve()},M=ae=>{if(h.value.count){if(h.value.solo)return 0;const Te=at(ae[0]),he=at(ae[1]);return Math.abs(he-Te){ae[1]&&p.value.showLastInRange?Y(ae[M(ae)],Te):Y(ae[0],Te);const he=(ke,De)=>[ke(ae[0]),ae[1]?ke(ae[1]):u[De][1]];A("hours",he(pr,"hours")),A("minutes",he(oo,"minutes")),A("seconds",he(El,"seconds"))},le=(ae,Te)=>{if((p.value.enabled||t.weekPicker)&&!b.value.enabled)return ie(ae,Te);if(b.value.enabled&&Te){const he=ae[ae.length-1];return Z(he,Te)}},$=ae=>{const Te=l.value;le(Te,ae),h.value.count&&h.value.solo&&ve()},oe=(ae,Te)=>{const he=It(xe(),{month:te.value(Te),year:N.value(Te)}),ke=ae<0?us(he,1):Cl(he,1);E(at(ke),Ge(ke),ae<0,t.preventMinMaxNavigation)&&(I(Te,at(ke),Ge(ke)),e("update-month-year",{instance:Te,month:at(ke),year:Ge(ke)}),h.value.count&&!h.value.solo&&de(Te),n())},de=ae=>{for(let Te=ae-1;Te>=0;Te--){const he=Cl(It(xe(),{month:te.value(Te+1),year:N.value(Te+1)}),1);I(Te,at(he),Ge(he))}for(let Te=ae+1;Te<=h.value.count-1;Te++){const he=us(It(xe(),{month:te.value(Te-1),year:N.value(Te-1)}),1);I(Te,at(he),Ge(he))}},ve=()=>{if(Array.isArray(l.value)&&l.value.length===2){const ae=xe(xe(l.value[1]?l.value[1]:us(l.value[0],1))),[Te,he]=[at(l.value[0]),Ge(l.value[0])],[ke,De]=[at(l.value[1]),Ge(l.value[1])];(Te!==ke||Te===ke&&he!==De)&&h.value.solo&&I(1,at(ae),Ge(ae))}else l.value&&!Array.isArray(l.value)&&(I(0,at(l.value),Ge(l.value)),Y(xe()))},z=()=>{t.startDate&&(I(0,at(xe(t.startDate)),Ge(xe(t.startDate))),h.value.count&&de(0))},ge=(ae,Te)=>{if(t.monthChangeOnScroll){const he=new Date().getTime()-r.value.getTime(),ke=Math.abs(ae.deltaY);let De=500;ke>1&&(De=100),ke>100&&(De=0),he>De&&(r.value=new Date,oe(t.monthChangeOnScroll!=="inverse"?-ae.deltaY:ae.deltaY,Te))}},S=(ae,Te,he=!1)=>{t.monthChangeOnArrows&&t.vertical===he&&O(ae,Te)},O=(ae,Te)=>{oe(ae==="right"?-1:1,Te)},K=ae=>{if(v.value.markers)return bh(ae.value,v.value.markers)},U=(ae,Te)=>{switch(t.sixWeeks===!0?"append":t.sixWeeks){case"prepend":return[!0,!1];case"center":return[ae==0,!0];case"fair":return[ae==0||Te>ae,!0];case"append":return[!1,!1];default:return[!1,!1]}},re=(ae,Te,he,ke)=>{if(t.sixWeeks&&ae.length<6){const De=6-ae.length,Ht=(Te.getDay()+7-ke)%7,un=6-(he.getDay()+7-ke)%7,[Di,zs]=U(Ht,un);for(let dn=1;dn<=De;dn++)if(zs?!!(dn%2)==Di:Di){const En=ae[0].days[0],Sn=j(ss(En.value,-7),at(Te));ae.unshift({days:Sn})}else{const En=ae[ae.length-1],Sn=En.days[En.days.length-1],ii=j(ss(Sn.value,1),at(Te));ae.push({days:ii})}}return ae},j=(ae,Te)=>{const he=xe(ae),ke=[];for(let De=0;De<7;De++){const Ht=ss(he,De),un=at(Ht)!==Te;ke.push({text:t.hideOffsetDates&&un?"":Ht.getDate(),value:Ht,current:!un,classData:{}})}return ke},se=(ae,Te)=>{const he=[],ke=new Date(Te,ae),De=new Date(Te,ae+1,0),Ht=t.weekStart,un=fs(ke,{weekStartsOn:Ht}),Di=zs=>{const dn=j(zs,ae);if(he.push({days:dn}),!he[he.length-1].days.some(En=>ct(ni(En.value),ni(De)))){const En=ss(zs,7);Di(En)}};return Di(un),re(he,ke,De,Ht)},ee=ae=>{const Te=eo(xe(ae.value),u.hours,u.minutes,Be());e("date-update",Te),b.value.enabled?H_(Te,l,b.value.limit):l.value=Te,i(),Rn().then(()=>{J()})},fe=ae=>p.value.noDisabledRange?QS(s.value[0],ae).some(Te=>C(Te)):!1,me=()=>{s.value=l.value?l.value.slice():[],s.value.length===2&&!(p.value.fixedStart||p.value.fixedEnd)&&(s.value=[])},pe=(ae,Te)=>{const he=[xe(ae.value),ss(xe(ae.value),+p.value.autoRange)];w(he)?(Te&&Le(ae.value),s.value=he):e("invalid-date",ae.value)},Le=ae=>{const Te=at(xe(ae)),he=Ge(xe(ae));if(I(0,Te,he),h.value.count>0)for(let ke=1;ke{if(fe(ae.value)||!x(ae.value,l.value,p.value.fixedStart?0:1))return e("invalid-date",ae.value);s.value=lC(xe(ae.value),l,e,p)},ze=(ae,Te)=>{if(me(),p.value.autoRange)return pe(ae,Te);if(p.value.fixedStart||p.value.fixedEnd)return Ae(ae);s.value[0]?x(xe(ae.value),l.value)&&!fe(ae.value)?Xt(xe(ae.value),xe(s.value[0]))?(s.value.unshift(xe(ae.value)),e("range-end",s.value[0])):(s.value[1]=xe(ae.value),e("range-end",s.value[1])):(t.autoApply&&e("auto-apply-invalid",ae.value),e("invalid-date",ae.value)):(s.value[0]=xe(ae.value),e("range-start",s.value[0]))},Be=(ae=!0)=>t.enableSeconds?Array.isArray(u.seconds)?ae?u.seconds[0]:u.seconds[1]:u.seconds:0,nt=ae=>{s.value[ae]=eo(s.value[ae],u.hours[ae],u.minutes[ae],Be(ae!==1))},Ze=()=>{var ae,Te;s.value[0]&&s.value[1]&&+((ae=s.value)==null?void 0:ae[0])>+((Te=s.value)==null?void 0:Te[1])&&(s.value.reverse(),e("range-start",s.value[0]),e("range-end",s.value[1]))},Mt=()=>{s.value.length&&(s.value[0]&&!s.value[1]?nt(0):(nt(0),nt(1),i()),Ze(),l.value=s.value.slice(),vf(s.value,e,t.autoApply,t.modelAuto))},gn=(ae,Te=!1)=>{if(C(ae.value)||!ae.current&&t.hideOffsetDates)return e("invalid-date",ae.value);if(o.value=JSON.parse(JSON.stringify(ae)),!p.value.enabled)return ee(ae);Ab(u.hours)&&Ab(u.minutes)&&!b.value.enabled&&(ze(ae,Te),Mt())},Un=(ae,Te)=>{var he;I(ae,Te.month,Te.year,!0),h.value.count&&!h.value.solo&&de(ae),e("update-month-year",{instance:ae,month:Te.month,year:Te.year}),n(h.value.solo?ae:void 0);const ke=(he=t.flow)!=null&&he.length?t.flow[t.flowStep]:void 0;!Te.fromNav&&(ke===zn.month||ke===zn.year)&&i()},Ri=(ae,Te)=>{aC({value:ae,modelValue:l,range:p.value.enabled,timezone:Te?void 0:y.value.timezone}),W(),t.multiCalendars&&Rn().then(()=>ne(!0))},wi=()=>{const ae=F_(xe(),y.value);p.value.enabled?l.value&&Array.isArray(l.value)&&l.value[0]?l.value=Xt(ae,l.value[0])?[ae,l.value[0]]:[l.value[0],ae]:l.value=[ae]:l.value=ae,W()},Xi=()=>{if(Array.isArray(l.value))if(b.value.enabled){const ae=Ut();l.value[l.value.length-1]=k(ae)}else l.value=l.value.map((ae,Te)=>ae&&k(ae,Te));else l.value=k(l.value);e("time-update")},Ut=()=>Array.isArray(l.value)&&l.value.length?l.value[l.value.length-1]:null;return{calendars:c,modelValue:l,month:te,year:N,time:u,disabledTimesConfig:H,today:d,validateTime:F,getCalendarDays:se,getMarker:K,handleScroll:ge,handleSwipe:O,handleArrow:S,selectDate:gn,updateMonthYear:Un,presetDate:Ri,selectCurrentDate:wi,updateTime:(ae,Te=!0,he=!1)=>{T(ae,Te,he,Xi)},assignMonthAndYear:Y}},iV={key:0},sV=cn({__name:"DatePicker",props:{...ps},emits:["tooltip-open","tooltip-close","mount","update:internal-model-value","update-flow-step","reset-flow","auto-apply","focus-menu","select-date","range-start","range-end","invalid-fixed-range","time-update","am-pm-change","time-picker-open","time-picker-close","recalculate-position","update-month-year","auto-apply-invalid","date-update","invalid-date","overlay-toggle"],setup(t,{expose:e,emit:n}){const i=n,s=t,{calendars:r,month:o,year:a,modelValue:l,time:c,disabledTimesConfig:u,today:d,validateTime:h,getCalendarDays:f,getMarker:p,handleArrow:m,handleScroll:y,handleSwipe:v,selectDate:b,updateMonthYear:E,presetDate:C,selectCurrentDate:w,updateTime:x,assignMonthAndYear:T}=nV(s,i,ue,Y),k=pa(),{setHoverDate:A,getDayClassData:P,clearHoverDate:F}=wV(l,s),{defaultedMultiCalendars:H}=Wt(s),te=we([]),N=we([]),L=we(null),I=ki(k,"calendar"),W=ki(k,"monthYear"),X=ki(k,"timePicker"),J=ge=>{s.shadow||i("mount",ge)};fn(r,()=>{s.shadow||setTimeout(()=>{i("recalculate-position")},0)},{deep:!0}),fn(H,(ge,S)=>{ge.count-S.count>0&&T()},{deep:!0});const ne=be(()=>ge=>f(o.value(ge),a.value(ge)).map(S=>({...S,days:S.days.map(O=>(O.marker=p(O),O.classData=P(O),O))})));function ue(ge){var S;ge||ge===0?(S=N.value[ge])==null||S.triggerTransition(o.value(ge),a.value(ge)):N.value.forEach((O,K)=>O.triggerTransition(o.value(K),a.value(K)))}function Y(){i("update-flow-step")}const Z=(ge,S=!1)=>{b(ge,S),s.spaceConfirm&&i("select-date")},M=(ge,S,O=0)=>{var K;(K=te.value[O])==null||K.toggleMonthPicker(ge,S)},ie=(ge,S,O=0)=>{var K;(K=te.value[O])==null||K.toggleYearPicker(ge,S)},le=(ge,S,O)=>{var K;(K=L.value)==null||K.toggleTimePicker(ge,S,O)},$=(ge,S)=>{var O;if(!s.range){const K=l.value?l.value:d,U=S?new Date(S):K,re=ge?fs(U,{weekStartsOn:1}):DS(U,{weekStartsOn:1});b({value:re,current:at(U)===o.value(0),text:"",classData:{}}),(O=document.getElementById(sC(re)))==null||O.focus()}},oe=ge=>{var S;(S=te.value[0])==null||S.handleMonthYearChange(ge,!0)},de=ge=>{E(0,{month:o.value(0),year:a.value(0)+(ge?1:-1),fromNav:!0})},ve=(ge,S)=>{ge===zn.time&&i(`time-picker-${S?"open":"close"}`),i("overlay-toggle",{open:S,overlay:ge})},z=ge=>{i("overlay-toggle",{open:!1,overlay:ge}),i("focus-menu")};return e({clearHoverDate:F,presetDate:C,selectCurrentDate:w,toggleMonthPicker:M,toggleYearPicker:ie,toggleTimePicker:le,handleArrow:m,updateMonthYear:E,getSidebarProps:()=>({modelValue:l,month:o,year:a,time:c,updateTime:x,updateMonthYear:E,selectDate:b,presetDate:C}),changeMonth:oe,changeYear:de,selectWeekDate:$}),(ge,S)=>(D(),V($e,null,[B(yf,{"multi-calendars":Q(H).count,collapse:ge.collapse},{default:Re(({instance:O,index:K})=>[ge.disableMonthYearSelect?ce("",!0):(D(),Ce(U4,yn({key:0,ref:U=>{U&&(te.value[K]=U)},months:Q(US)(ge.formatLocale,ge.locale,ge.monthNameFormat),years:Q(B_)(ge.yearRange,ge.locale,ge.reverseYears),month:Q(o)(O),year:Q(a)(O),instance:O},ge.$props,{onMount:S[0]||(S[0]=U=>J(Q(ta).header)),onResetFlow:S[1]||(S[1]=U=>ge.$emit("reset-flow")),onUpdateMonthYear:U=>Q(E)(O,U),onOverlayClosed:z,onOverlayOpened:S[2]||(S[2]=U=>ge.$emit("overlay-toggle",{open:!0,overlay:U}))}),jn({_:2},[Xe(Q(W),(U,re)=>({name:U,fn:Re(j=>[Oe(ge.$slots,U,In(Zn(j)))])}))]),1040,["months","years","month","year","instance","onUpdateMonthYear"])),B(tV,yn({ref:U=>{U&&(N.value[K]=U)},"mapped-dates":ne.value(O),month:Q(o)(O),year:Q(a)(O),instance:O},ge.$props,{onSelectDate:U=>Q(b)(U,O!==1),onHandleSpace:U=>Z(U,O!==1),onSetHoverDate:S[3]||(S[3]=U=>Q(A)(U)),onHandleScroll:U=>Q(y)(U,O),onHandleSwipe:U=>Q(v)(U,O),onMount:S[4]||(S[4]=U=>J(Q(ta).calendar)),onResetFlow:S[5]||(S[5]=U=>ge.$emit("reset-flow")),onTooltipOpen:S[6]||(S[6]=U=>ge.$emit("tooltip-open",U)),onTooltipClose:S[7]||(S[7]=U=>ge.$emit("tooltip-close",U))}),jn({_:2},[Xe(Q(I),(U,re)=>({name:U,fn:Re(j=>[Oe(ge.$slots,U,In(Zn({...j})))])}))]),1040,["mapped-dates","month","year","instance","onSelectDate","onHandleSpace","onHandleScroll","onHandleSwipe"])]),_:3},8,["multi-calendars","collapse"]),ge.enableTimePicker?(D(),V("div",iV,[ge.$slots["time-picker"]?Oe(ge.$slots,"time-picker",In(yn({key:0},{time:Q(c),updateTime:Q(x)}))):(D(),Ce(uC,yn({key:1,ref_key:"timePickerRef",ref:L},ge.$props,{hours:Q(c).hours,minutes:Q(c).minutes,seconds:Q(c).seconds,"internal-model-value":ge.internalModelValue,"disabled-times-config":Q(u),"validate-time":Q(h),onMount:S[8]||(S[8]=O=>J(Q(ta).timePicker)),"onUpdate:hours":S[9]||(S[9]=O=>Q(x)(O)),"onUpdate:minutes":S[10]||(S[10]=O=>Q(x)(O,!1)),"onUpdate:seconds":S[11]||(S[11]=O=>Q(x)(O,!1,!0)),onResetFlow:S[12]||(S[12]=O=>ge.$emit("reset-flow")),onOverlayClosed:S[13]||(S[13]=O=>ve(O,!1)),onOverlayOpened:S[14]||(S[14]=O=>ve(O,!0)),onAmPmChange:S[15]||(S[15]=O=>ge.$emit("am-pm-change",O))}),jn({_:2},[Xe(Q(X),(O,K)=>({name:O,fn:Re(U=>[Oe(ge.$slots,O,In(Zn(U)))])}))]),1040,["hours","minutes","seconds","internal-model-value","disabled-times-config","validate-time"]))])):ce("",!0)],64))}}),rV=(t,e)=>{const n=we(),{defaultedMultiCalendars:i,defaultedConfig:s,defaultedHighlight:r,defaultedRange:o,propDates:a,defaultedFilters:l,defaultedMultiDates:c}=Wt(t),{modelValue:u,year:d,month:h,calendars:f}=Fu(t,e),{isDisabled:p}=_o(t),{selectYear:m,groupedYears:y,showYearPicker:v,isDisabled:b,toggleYearPicker:E,handleYearSelect:C,handleYear:w}=cC({modelValue:u,multiCalendars:i,range:o,highlight:r,calendars:f,propDates:a,month:h,year:d,filters:l,props:t,emit:e}),x=(L,I)=>[L,I].map(W=>Rs(W,"MMMM",{locale:t.formatLocale})).join("-"),T=be(()=>L=>u.value?Array.isArray(u.value)?u.value.some(I=>bb(L,I)):bb(u.value,L):!1),k=L=>{if(o.value.enabled){if(Array.isArray(u.value)){const I=ct(L,u.value[0])||ct(L,u.value[1]);return mf(u.value,n.value,L)&&!I}return!1}return!1},A=(L,I)=>L.quarter===gb(I)&&L.year===Ge(I),P=L=>typeof r.value=="function"?r.value({quarter:gb(L),year:Ge(L)}):!!r.value.quarters.find(I=>A(I,L)),F=be(()=>L=>{const I=It(new Date,{year:d.value(L)});return DF({start:ru(I),end:RS(I)}).map(W=>{const X=Ko(W),J=pb(W),ne=p(W),ue=k(X),Y=P(X);return{text:x(X,J),value:X,active:T.value(X),highlighted:Y,disabled:ne,isBetween:ue}})}),H=L=>{H_(L,u,c.value.limit),e("auto-apply",!0)},te=L=>{u.value=Y_(u,L,e),vf(u.value,e,t.autoApply,t.modelAuto)},N=L=>{u.value=L,e("auto-apply")};return{defaultedConfig:s,defaultedMultiCalendars:i,groupedYears:y,year:d,isDisabled:b,quarters:F,showYearPicker:v,modelValue:u,setHoverDate:L=>{n.value=L},selectYear:m,selectQuarter:(L,I,W)=>{if(!W)return f.value[I].month=at(pb(L)),c.value.enabled?H(L):o.value.enabled?te(L):N(L)},toggleYearPicker:E,handleYearSelect:C,handleYear:w}},oV={class:"dp--quarter-items"},aV=["data-test","disabled","onClick","onMouseover"],lV=cn({compatConfig:{MODE:3},__name:"QuarterPicker",props:{...ps},emits:["update:internal-model-value","reset-flow","overlay-closed","auto-apply","range-start","range-end","overlay-toggle","update-month-year"],setup(t,{expose:e,emit:n}){const i=n,s=t,r=pa(),o=ki(r,"yearMode"),{defaultedMultiCalendars:a,defaultedConfig:l,groupedYears:c,year:u,isDisabled:d,quarters:h,modelValue:f,showYearPicker:p,setHoverDate:m,selectQuarter:y,toggleYearPicker:v,handleYearSelect:b,handleYear:E}=rV(s,i);return e({getSidebarProps:()=>({modelValue:f,year:u,selectQuarter:y,handleYearSelect:b,handleYear:E})}),(C,w)=>(D(),Ce(yf,{"multi-calendars":Q(a).count,collapse:C.collapse,stretch:""},{default:Re(({instance:x})=>[g("div",{class:"dp-quarter-picker-wrap",style:Mn({minHeight:`${Q(l).modeHeight}px`})},[C.$slots["top-extra"]?Oe(C.$slots,"top-extra",{key:0,value:C.internalModelValue}):ce("",!0),g("div",null,[B(oC,yn(C.$props,{items:Q(c)(x),instance:x,"show-year-picker":Q(p)[x],year:Q(u)(x),"is-disabled":T=>Q(d)(x,T),onHandleYear:T=>Q(E)(x,T),onYearSelect:T=>Q(b)(T,x),onToggleYearPicker:T=>Q(v)(x,T?.flow,T?.show)}),jn({_:2},[Xe(Q(o),(T,k)=>({name:T,fn:Re(A=>[Oe(C.$slots,T,In(Zn(A)))])}))]),1040,["items","instance","show-year-picker","year","is-disabled","onHandleYear","onYearSelect","onToggleYearPicker"])]),g("div",oV,[(D(!0),V($e,null,Xe(Q(h)(x),(T,k)=>(D(),V("div",{key:k},[g("button",{type:"button",class:Ie(["dp--qr-btn",{"dp--qr-btn-active":T.active,"dp--qr-btn-between":T.isBetween,"dp--qr-btn-disabled":T.disabled,"dp--highlighted":T.highlighted}]),"data-test":T.value,disabled:T.disabled,onClick:A=>Q(y)(T.value,x,T.disabled),onMouseover:A=>Q(m)(T.value)},[C.$slots.quarter?Oe(C.$slots,"quarter",{key:0,value:T.value,text:T.text}):(D(),V($e,{key:1},[He(Ee(T.text),1)],64))],42,aV)]))),128))])],4)]),_:3},8,["multi-calendars","collapse"]))}}),cV=["id","tabindex","role","aria-label"],uV={key:0,class:"dp--menu-load-container"},dV=g("span",{class:"dp--menu-loader"},null,-1),hV=[dV],fV={key:1,class:"dp--menu-header"},gV={key:0,class:"dp__sidebar_left"},pV=["data-test","onClick","onKeydown"],mV={key:2,class:"dp__sidebar_right"},_V={key:3,class:"dp__action_extra"},Mb=cn({compatConfig:{MODE:3},__name:"DatepickerMenu",props:{..._f,shadow:{type:Boolean,default:!1},openOnTop:{type:Boolean,default:!1},internalModelValue:{type:[Date,Array],default:null},noOverlayFocus:{type:Boolean,default:!1},collapse:{type:Boolean,default:!1},getInputRect:{type:Function,default:()=>({})},isTextInputDate:{type:Boolean,default:!1}},emits:["close-picker","select-date","auto-apply","time-update","flow-step","update-month-year","invalid-select","update:internal-model-value","recalculate-position","invalid-fixed-range","tooltip-open","tooltip-close","time-picker-open","time-picker-close","am-pm-change","range-start","range-end","auto-apply-invalid","date-update","invalid-date","overlay-toggle"],setup(t,{expose:e,emit:n}){const i=n,s=t,r=we(null),o=be(()=>{const{openOnTop:j,...se}=s;return{...se,flowStep:A.value,collapse:s.collapse,noOverlayFocus:s.noOverlayFocus,menuWrapRef:r.value}}),{setMenuFocused:a,setShiftKey:l,control:c}=rC(),u=pa(),{defaultedTextInput:d,defaultedInline:h,defaultedConfig:f,defaultedUI:p}=Wt(s),m=we(null),y=we(0),v=we(null),b=we(!1),E=we(null);xn(()=>{if(!s.shadow){b.value=!0,C(),window.addEventListener("resize",C);const j=mn(r);if(j&&!d.value.enabled&&!h.value.enabled&&(a(!0),I()),j){const se=ee=>{f.value.allowPreventDefault&&ee.preventDefault(),Qr(ee,f.value,!0)};j.addEventListener("pointerdown",se),j.addEventListener("mousedown",se)}}}),Yl(()=>{window.removeEventListener("resize",C)});const C=()=>{const j=mn(v);j&&(y.value=j.getBoundingClientRect().width)},{arrowRight:w,arrowLeft:x,arrowDown:T,arrowUp:k}=mo(),{flowStep:A,updateFlowStep:P,childMount:F,resetFlow:H,handleFlow:te}=xV(s,i,E),N=be(()=>s.monthPicker?x4:s.yearPicker?S4:s.timePicker?z4:s.quarterPicker?lV:sV),L=be(()=>{var j;if(f.value.arrowLeft)return f.value.arrowLeft;const se=(j=r.value)==null?void 0:j.getBoundingClientRect(),ee=s.getInputRect();return ee?.width=(se?.right??0)&&ee?.width{const j=mn(r);j&&j.focus({preventScroll:!0})},W=be(()=>{var j;return((j=E.value)==null?void 0:j.getSidebarProps())||{}}),X=()=>{s.openOnTop&&i("recalculate-position")},J=ki(u,"action"),ne=be(()=>s.monthPicker||s.yearPicker?ki(u,"monthYear"):s.timePicker?ki(u,"timePicker"):ki(u,"shared")),ue=be(()=>s.openOnTop?"dp__arrow_bottom":"dp__arrow_top"),Y=be(()=>({dp__menu_disabled:s.disabled,dp__menu_readonly:s.readonly,"dp-menu-loading":s.loading})),Z=be(()=>({dp__menu:!0,dp__menu_index:!h.value.enabled,dp__relative:h.value.enabled,...p.value.menu??{}})),M=j=>{Qr(j,f.value,!0)},ie=()=>{s.escClose&&i("close-picker")},le=j=>{if(s.arrowNavigation){if(j===Xn.up)return k();if(j===Xn.down)return T();if(j===Xn.left)return x();if(j===Xn.right)return w()}else j===Xn.left||j===Xn.up?z("handleArrow",Xn.left,0,j===Xn.up):z("handleArrow",Xn.right,0,j===Xn.down)},$=j=>{l(j.shiftKey),!s.disableMonthYearSelect&&j.code===Lt.tab&&j.target.classList.contains("dp__menu")&&c.value.shiftKeyInMenu&&(j.preventDefault(),Qr(j,f.value,!0),i("close-picker"))},oe=()=>{I(),i("time-picker-close")},de=j=>{var se,ee,fe;(se=E.value)==null||se.toggleTimePicker(!1,!1),(ee=E.value)==null||ee.toggleMonthPicker(!1,!1,j),(fe=E.value)==null||fe.toggleYearPicker(!1,!1,j)},ve=(j,se=0)=>{var ee,fe,me;return j==="month"?(ee=E.value)==null?void 0:ee.toggleMonthPicker(!1,!0,se):j==="year"?(fe=E.value)==null?void 0:fe.toggleYearPicker(!1,!0,se):j==="time"?(me=E.value)==null?void 0:me.toggleTimePicker(!0,!1):de(se)},z=(j,...se)=>{var ee,fe;(ee=E.value)!=null&&ee[j]&&((fe=E.value)==null||fe[j](...se))},ge=()=>{z("selectCurrentDate")},S=(j,se)=>{z("presetDate",j,se)},O=()=>{z("clearHoverDate")},K=(j,se)=>{z("updateMonthYear",j,se)},U=(j,se)=>{j.preventDefault(),le(se)},re=j=>{var se,ee,fe;if($(j),j.key===Lt.home||j.key===Lt.end)return z("selectWeekDate",j.key===Lt.home,j.target.getAttribute("id"));switch((j.key===Lt.pageUp||j.key===Lt.pageDown)&&(j.shiftKey?(z("changeYear",j.key===Lt.pageUp),(se=tm(r.value,"overlay-year"))==null||se.focus()):(z("changeMonth",j.key===Lt.pageUp),(ee=tm(r.value,j.key===Lt.pageUp?"action-prev":"action-next"))==null||ee.focus()),j.target.getAttribute("id")&&((fe=r.value)==null||fe.focus({preventScroll:!0}))),j.key){case Lt.esc:return ie();case Lt.arrowLeft:return U(j,Xn.left);case Lt.arrowRight:return U(j,Xn.right);case Lt.arrowUp:return U(j,Xn.up);case Lt.arrowDown:return U(j,Xn.down);default:return}};return e({updateMonthYear:K,switchView:ve,handleFlow:te}),(j,se)=>{var ee,fe,me;return D(),V("div",{id:j.uid?`dp-menu-${j.uid}`:void 0,ref_key:"dpMenuRef",ref:r,tabindex:Q(h).enabled?void 0:"0",role:Q(h).enabled?void 0:"dialog","aria-label":(ee=j.ariaLabels)==null?void 0:ee.menu,class:Ie(Z.value),style:Mn({"--dp-arrow-left":L.value}),onMouseleave:O,onClick:M,onKeydown:re},[(j.disabled||j.readonly)&&Q(h).enabled||j.loading?(D(),V("div",{key:0,class:Ie(Y.value)},[j.loading?(D(),V("div",uV,hV)):ce("",!0)],2)):ce("",!0),j.$slots["menu-header"]?(D(),V("div",fV,[Oe(j.$slots,"menu-header")])):ce("",!0),!Q(h).enabled&&!j.teleportCenter?(D(),V("div",{key:2,class:Ie(ue.value)},null,2)):ce("",!0),g("div",{ref_key:"innerMenuRef",ref:v,class:Ie({dp__menu_content_wrapper:((fe=j.presetDates)==null?void 0:fe.length)||!!j.$slots["left-sidebar"]||!!j.$slots["right-sidebar"],"dp--menu-content-wrapper-collapsed":t.collapse&&(((me=j.presetDates)==null?void 0:me.length)||!!j.$slots["left-sidebar"]||!!j.$slots["right-sidebar"])}),style:Mn({"--dp-menu-width":`${y.value}px`})},[j.$slots["left-sidebar"]?(D(),V("div",gV,[Oe(j.$slots,"left-sidebar",In(Zn(W.value)))])):ce("",!0),j.presetDates.length?(D(),V("div",{key:1,class:Ie({"dp--preset-dates-collapsed":t.collapse,"dp--preset-dates":!0})},[(D(!0),V($e,null,Xe(j.presetDates,(pe,Le)=>(D(),V($e,{key:Le},[pe.slot?Oe(j.$slots,pe.slot,{key:0,presetDate:S,label:pe.label,value:pe.value}):(D(),V("button",{key:1,type:"button",style:Mn(pe.style||{}),class:Ie(["dp__btn dp--preset-range",{"dp--preset-range-collapsed":t.collapse}]),"data-test":pe.testId??void 0,onClick:iu(Ae=>S(pe.value,pe.noTz),["prevent"]),onKeydown:Ae=>Q(Qn)(Ae,()=>S(pe.value,pe.noTz),!0)},Ee(pe.label),47,pV))],64))),128))],2)):ce("",!0),g("div",{ref_key:"calendarWrapperRef",ref:m,class:"dp__instance_calendar",role:"document"},[(D(),Ce(ga(N.value),yn({ref_key:"dynCmpRef",ref:E},o.value,{"flow-step":Q(A),onMount:Q(F),onUpdateFlowStep:Q(P),onResetFlow:Q(H),onFocusMenu:I,onSelectDate:se[0]||(se[0]=pe=>j.$emit("select-date")),onDateUpdate:se[1]||(se[1]=pe=>j.$emit("date-update",pe)),onTooltipOpen:se[2]||(se[2]=pe=>j.$emit("tooltip-open",pe)),onTooltipClose:se[3]||(se[3]=pe=>j.$emit("tooltip-close",pe)),onAutoApply:se[4]||(se[4]=pe=>j.$emit("auto-apply",pe)),onRangeStart:se[5]||(se[5]=pe=>j.$emit("range-start",pe)),onRangeEnd:se[6]||(se[6]=pe=>j.$emit("range-end",pe)),onInvalidFixedRange:se[7]||(se[7]=pe=>j.$emit("invalid-fixed-range",pe)),onTimeUpdate:se[8]||(se[8]=pe=>j.$emit("time-update")),onAmPmChange:se[9]||(se[9]=pe=>j.$emit("am-pm-change",pe)),onTimePickerOpen:se[10]||(se[10]=pe=>j.$emit("time-picker-open",pe)),onTimePickerClose:oe,onRecalculatePosition:X,onUpdateMonthYear:se[11]||(se[11]=pe=>j.$emit("update-month-year",pe)),onAutoApplyInvalid:se[12]||(se[12]=pe=>j.$emit("auto-apply-invalid",pe)),onInvalidDate:se[13]||(se[13]=pe=>j.$emit("invalid-date",pe)),onOverlayToggle:se[14]||(se[14]=pe=>j.$emit("overlay-toggle",pe)),"onUpdate:internalModelValue":se[15]||(se[15]=pe=>j.$emit("update:internal-model-value",pe))}),jn({_:2},[Xe(ne.value,(pe,Le)=>({name:pe,fn:Re(Ae=>[Oe(j.$slots,pe,In(Zn({...Ae})))])}))]),1040,["flow-step","onMount","onUpdateFlowStep","onResetFlow"]))],512),j.$slots["right-sidebar"]?(D(),V("div",mV,[Oe(j.$slots,"right-sidebar",In(Zn(W.value)))])):ce("",!0),j.$slots["action-extra"]?(D(),V("div",_V,[j.$slots["action-extra"]?Oe(j.$slots,"action-extra",{key:0,selectCurrentDate:ge}):ce("",!0)])):ce("",!0)],6),!j.autoApply||Q(f).keepActionRow?(D(),Ce(g4,yn({key:3,"menu-mount":b.value},o.value,{"calendar-width":y.value,onClosePicker:se[16]||(se[16]=pe=>j.$emit("close-picker")),onSelectDate:se[17]||(se[17]=pe=>j.$emit("select-date")),onInvalidSelect:se[18]||(se[18]=pe=>j.$emit("invalid-select")),onSelectNow:ge}),jn({_:2},[Xe(Q(J),(pe,Le)=>({name:pe,fn:Re(Ae=>[Oe(j.$slots,pe,In(Zn({...Ae})))])}))]),1040,["menu-mount","calendar-width"])):ce("",!0)],46,cV)}}});var Ka=(t=>(t.center="center",t.left="left",t.right="right",t))(Ka||{});const yV=({menuRef:t,menuRefInner:e,inputRef:n,pickerWrapperRef:i,inline:s,emit:r,props:o,slots:a})=>{const{defaultedConfig:l}=Wt(o),c=we({}),u=we(!1),d=we({top:"0",left:"0"}),h=we(!1),f=Zc(o,"teleportCenter");fn(f,()=>{d.value=JSON.parse(JSON.stringify({})),w()});const p=I=>{if(o.teleport){const W=I.getBoundingClientRect();return{left:W.left+window.scrollX,top:W.top+window.scrollY}}return{top:0,left:0}},m=(I,W)=>{d.value.left=`${I+W-c.value.width}px`},y=I=>{d.value.left=`${I}px`},v=(I,W)=>{o.position===Ka.left&&y(I),o.position===Ka.right&&m(I,W),o.position===Ka.center&&(d.value.left=`${I+W/2-c.value.width/2}px`)},b=I=>{const{width:W,height:X}=I.getBoundingClientRect(),{top:J,left:ne}=o.altPosition?o.altPosition(I):p(I);return{top:+J,left:+ne,width:W,height:X}},E=()=>{d.value.left="50%",d.value.top="50%",d.value.transform="translate(-50%, -50%)",d.value.position="fixed",delete d.value.opacity},C=()=>{const I=mn(n),{top:W,left:X,transform:J}=o.altPosition(I);d.value={top:`${W}px`,left:`${X}px`,transform:J??""}},w=(I=!0)=>{var W;if(!s.value.enabled){if(f.value)return E();if(o.altPosition!==null)return C();if(I){const X=o.teleport?(W=e.value)==null?void 0:W.$el:t.value;X&&(c.value=X.getBoundingClientRect()),r("recalculate-position")}return H()}},x=({inputEl:I,left:W,width:X})=>{window.screen.width>768&&!u.value&&v(W,X),A(I)},T=I=>{const{top:W,left:X,height:J,width:ne}=b(I);d.value.top=`${J+W+ +o.offset}px`,h.value=!1,u.value||(d.value.left=`${X+ne/2-c.value.width/2}px`),x({inputEl:I,left:X,width:ne})},k=I=>{const{top:W,left:X,width:J}=b(I);d.value.top=`${W-+o.offset-c.value.height}px`,h.value=!0,x({inputEl:I,left:X,width:J})},A=I=>{if(o.autoPosition){const{left:W,width:X}=b(I),{left:J,right:ne}=c.value;if(!u.value){if(Math.abs(J)!==Math.abs(ne)){if(J<=0)return u.value=!0,y(W);if(ne>=document.documentElement.clientWidth)return u.value=!0,m(W,X)}return v(W,X)}}},P=()=>{const I=mn(n);if(I){const{height:W}=c.value,{top:X,height:J}=I.getBoundingClientRect(),ne=window.innerHeight-X-J,ue=X;return W<=ne?Vo.bottom:W>ne&&W<=ue?Vo.top:ne>=ue?Vo.bottom:Vo.top}return Vo.bottom},F=I=>P()===Vo.bottom?T(I):k(I),H=()=>{const I=mn(n);if(I)return o.autoPosition?F(I):T(I)},te=function(I){if(I){const W=I.scrollHeight>I.clientHeight,X=window.getComputedStyle(I).overflowY.indexOf("hidden")!==-1;return W&&!X}return!0},N=function(I){return!I||I===document.body||I.nodeType===Node.DOCUMENT_FRAGMENT_NODE?window:te(I)?I:N(I.assignedSlot&&l.value.shadowDom?I.assignedSlot.parentNode:I.parentNode)},L=I=>{if(I)switch(o.position){case Ka.left:return{left:0,transform:"translateX(0)"};case Ka.right:return{left:`${I.width}px`,transform:"translateX(-100%)"};default:return{left:`${I.width/2}px`,transform:"translateX(-50%)"}}return{}};return{openOnTop:h,menuStyle:d,xCorrect:u,setMenuPosition:w,getScrollableParent:N,shadowRender:(I,W)=>{var X,J,ne;const ue=document.createElement("div"),Y=(X=mn(n))==null?void 0:X.getBoundingClientRect();ue.setAttribute("id","dp--temp-container");const Z=(J=i.value)!=null&&J.clientWidth?i.value:document.body;Z.append(ue);const M=L(Y),ie=l.value.shadowDom?Object.keys(a).filter($=>["right-sidebar","left-sidebar","top-extra","action-extra"].includes($)):Object.keys(a),le=la(I,{...W,shadow:!0,style:{opacity:0,position:"absolute",...M}},Object.fromEntries(ie.map($=>[$,a[$]])));Kv(le,ue),c.value=(ne=le.el)==null?void 0:ne.getBoundingClientRect(),Kv(null,ue),Z.removeChild(ue)}}},kr=[{name:"clock-icon",use:["time","calendar","shared"]},{name:"arrow-left",use:["month-year","calendar","shared","year-mode"]},{name:"arrow-right",use:["month-year","calendar","shared","year-mode"]},{name:"arrow-up",use:["time","calendar","month-year","shared"]},{name:"arrow-down",use:["time","calendar","month-year","shared"]},{name:"calendar-icon",use:["month-year","time","calendar","shared","year-mode"]},{name:"day",use:["calendar","shared"]},{name:"month-overlay-value",use:["calendar","month-year","shared"]},{name:"year-overlay-value",use:["calendar","month-year","shared","year-mode"]},{name:"year-overlay",use:["month-year","shared"]},{name:"month-overlay",use:["month-year","shared"]},{name:"month-overlay-header",use:["month-year","shared"]},{name:"year-overlay-header",use:["month-year","shared"]},{name:"hours-overlay-value",use:["calendar","time","shared"]},{name:"hours-overlay-header",use:["calendar","time","shared"]},{name:"minutes-overlay-value",use:["calendar","time","shared"]},{name:"minutes-overlay-header",use:["calendar","time","shared"]},{name:"seconds-overlay-value",use:["calendar","time","shared"]},{name:"seconds-overlay-header",use:["calendar","time","shared"]},{name:"hours",use:["calendar","time","shared"]},{name:"minutes",use:["calendar","time","shared"]},{name:"month",use:["calendar","month-year","shared"]},{name:"year",use:["calendar","month-year","shared","year-mode"]},{name:"action-buttons",use:["action"]},{name:"action-preview",use:["action"]},{name:"calendar-header",use:["calendar","shared"]},{name:"marker-tooltip",use:["calendar","shared"]},{name:"action-extra",use:["menu"]},{name:"time-picker-overlay",use:["calendar","time","shared"]},{name:"am-pm-button",use:["calendar","time","shared"]},{name:"left-sidebar",use:["menu"]},{name:"right-sidebar",use:["menu"]},{name:"month-year",use:["month-year","shared"]},{name:"time-picker",use:["menu","shared"]},{name:"action-row",use:["action"]},{name:"marker",use:["calendar","shared"]},{name:"quarter",use:["shared"]},{name:"top-extra",use:["shared","month-year"]},{name:"tp-inline-arrow-up",use:["shared","time"]},{name:"tp-inline-arrow-down",use:["shared","time"]},{name:"menu-header",use:["menu"]}],vV=[{name:"trigger"},{name:"input-icon"},{name:"clear-icon"},{name:"dp-input"}],bV={all:()=>kr,monthYear:()=>kr.filter(t=>t.use.includes("month-year")),input:()=>vV,timePicker:()=>kr.filter(t=>t.use.includes("time")),action:()=>kr.filter(t=>t.use.includes("action")),calendar:()=>kr.filter(t=>t.use.includes("calendar")),menu:()=>kr.filter(t=>t.use.includes("menu")),shared:()=>kr.filter(t=>t.use.includes("shared")),yearMode:()=>kr.filter(t=>t.use.includes("year-mode"))},ki=(t,e,n)=>{const i=[];return bV[e]().forEach(s=>{t[s.name]&&i.push(s.name)}),n!=null&&n.length&&n.forEach(s=>{s.slot&&i.push(s.slot)}),i},Nu=t=>{const e=be(()=>i=>t.value?i?t.value.open:t.value.close:""),n=be(()=>i=>t.value?i?t.value.menuAppearTop:t.value.menuAppearBottom:"");return{transitionName:e,showTransition:!!t.value,menuTransition:n}},Fu=(t,e,n)=>{const{defaultedRange:i,defaultedTz:s}=Wt(t),r=xe(_i(xe(),s.value.timezone)),o=we([{month:at(r),year:Ge(r)}]),a=h=>{const f={hours:pr(r),minutes:oo(r),seconds:0};return i.value.enabled?[f[h],f[h]]:f[h]},l=Ns({hours:a("hours"),minutes:a("minutes"),seconds:a("seconds")});fn(i,(h,f)=>{h.enabled!==f.enabled&&(l.hours=a("hours"),l.minutes=a("minutes"),l.seconds=a("seconds"))},{deep:!0});const c=be({get:()=>t.internalModelValue,set:h=>{!t.readonly&&!t.disabled&&e("update:internal-model-value",h)}}),u=be(()=>h=>o.value[h]?o.value[h].month:0),d=be(()=>h=>o.value[h]?o.value[h].year:0);return fn(c,(h,f)=>{n&&JSON.stringify(h??{})!==JSON.stringify(f??{})&&n()},{deep:!0}),{calendars:o,time:l,modelValue:c,month:u,year:d,today:r}},wV=(t,e)=>{const{defaultedMultiCalendars:n,defaultedMultiDates:i,defaultedUI:s,defaultedHighlight:r,defaultedTz:o,propDates:a,defaultedRange:l}=Wt(e),{isDisabled:c}=_o(e),u=we(null),d=we(_i(new Date,o.value.timezone)),h=M=>{!M.current&&e.hideOffsetDates||(u.value=M.value)},f=()=>{u.value=null},p=M=>Array.isArray(t.value)&&l.value.enabled&&t.value[0]&&u.value?M?nn(u.value,t.value[0]):Xt(u.value,t.value[0]):!0,m=(M,ie)=>{const le=()=>t.value?ie?t.value[0]||null:t.value[1]:null,$=t.value&&Array.isArray(t.value)?le():null;return ct(xe(M.value),$)},y=M=>{const ie=Array.isArray(t.value)?t.value[0]:null;return M?!Xt(u.value??null,ie):!0},v=(M,ie=!0)=>(l.value.enabled||e.weekPicker)&&Array.isArray(t.value)&&t.value.length===2?e.hideOffsetDates&&!M.current?!1:ct(xe(M.value),t.value[ie?0:1]):l.value.enabled?m(M,ie)&&y(ie)||ct(M.value,Array.isArray(t.value)?t.value[0]:null)&&p(ie):!1,b=(M,ie)=>{if(Array.isArray(t.value)&&t.value[0]&&t.value.length===1){const le=ct(M.value,u.value);return ie?nn(t.value[0],M.value)&&le:Xt(t.value[0],M.value)&&le}return!1},E=M=>!t.value||e.hideOffsetDates&&!M.current?!1:l.value.enabled?e.modelAuto&&Array.isArray(t.value)?ct(M.value,t.value[0]?t.value[0]:d.value):!1:i.value.enabled&&Array.isArray(t.value)?t.value.some(ie=>ct(ie,M.value)):ct(M.value,t.value?t.value:d.value),C=M=>{if(l.value.autoRange||e.weekPicker){if(u.value){if(e.hideOffsetDates&&!M.current)return!1;const ie=ss(u.value,+l.value.autoRange),le=er(xe(u.value),e.weekStart);return e.weekPicker?ct(le[1],xe(M.value)):ct(ie,xe(M.value))}return!1}return!1},w=M=>{if(l.value.autoRange||e.weekPicker){if(u.value){const ie=ss(u.value,+l.value.autoRange);if(e.hideOffsetDates&&!M.current)return!1;const le=er(xe(u.value),e.weekStart);return e.weekPicker?nn(M.value,le[0])&&Xt(M.value,le[1]):nn(M.value,u.value)&&Xt(M.value,ie)}return!1}return!1},x=M=>{if(l.value.autoRange||e.weekPicker){if(u.value){if(e.hideOffsetDates&&!M.current)return!1;const ie=er(xe(u.value),e.weekStart);return e.weekPicker?ct(ie[0],M.value):ct(u.value,M.value)}return!1}return!1},T=M=>mf(t.value,u.value,M.value),k=()=>e.modelAuto&&Array.isArray(e.internalModelValue)?!!e.internalModelValue[0]:!1,A=()=>e.modelAuto?GS(e.internalModelValue):!0,P=M=>{if(e.weekPicker)return!1;const ie=l.value.enabled?!v(M)&&!v(M,!1):!0;return!c(M.value)&&!E(M)&&!(!M.current&&e.hideOffsetDates)&&ie},F=M=>l.value.enabled?e.modelAuto?k()&&E(M):!1:E(M),H=M=>r.value?FB(M.value,a.value.highlight):!1,te=M=>{const ie=c(M.value);return ie&&(typeof r.value=="function"?!r.value(M.value,ie):!r.value.options.highlightDisabled)},N=M=>{var ie;return typeof r.value=="function"?r.value(M.value):(ie=r.value.weekdays)==null?void 0:ie.includes(M.value.getDay())},L=M=>(l.value.enabled||e.weekPicker)&&(!(n.value.count>0)||M.current)&&A()&&!(!M.current&&e.hideOffsetDates)&&!E(M)?T(M):!1,I=M=>{const{isRangeStart:ie,isRangeEnd:le}=ne(M),$=l.value.enabled?ie||le:!1;return{dp__cell_offset:!M.current,dp__pointer:!e.disabled&&!(!M.current&&e.hideOffsetDates)&&!c(M.value),dp__cell_disabled:c(M.value),dp__cell_highlight:!te(M)&&(H(M)||N(M))&&!F(M)&&!$&&!x(M)&&!(L(M)&&e.weekPicker)&&!le,dp__cell_highlight_active:!te(M)&&(H(M)||N(M))&&F(M),dp__today:!e.noToday&&ct(M.value,d.value)&&M.current,"dp--past":Xt(M.value,d.value),"dp--future":nn(M.value,d.value)}},W=M=>({dp__active_date:F(M),dp__date_hover:P(M)}),X=M=>{if(t.value&&!Array.isArray(t.value)){const ie=er(t.value,e.weekStart);return{...Y(M),dp__range_start:ct(ie[0],M.value),dp__range_end:ct(ie[1],M.value),dp__range_between_week:nn(M.value,ie[0])&&Xt(M.value,ie[1])}}return{...Y(M)}},J=M=>{if(t.value&&Array.isArray(t.value)){const ie=er(t.value[0],e.weekStart),le=t.value[1]?er(t.value[1],e.weekStart):[];return{...Y(M),dp__range_start:ct(ie[0],M.value)||ct(le[0],M.value),dp__range_end:ct(ie[1],M.value)||ct(le[1],M.value),dp__range_between_week:nn(M.value,ie[0])&&Xt(M.value,ie[1])||nn(M.value,le[0])&&Xt(M.value,le[1]),dp__range_between:nn(M.value,ie[1])&&Xt(M.value,le[0])}}return{...Y(M)}},ne=M=>{const ie=n.value.count>0?M.current&&v(M)&&A():v(M)&&A(),le=n.value.count>0?M.current&&v(M,!1)&&A():v(M,!1)&&A();return{isRangeStart:ie,isRangeEnd:le}},ue=M=>{const{isRangeStart:ie,isRangeEnd:le}=ne(M);return{dp__range_start:ie,dp__range_end:le,dp__range_between:L(M),dp__date_hover:ct(M.value,u.value)&&!ie&&!le&&!e.weekPicker,dp__date_hover_start:b(M,!0),dp__date_hover_end:b(M,!1)}},Y=M=>({...ue(M),dp__cell_auto_range:w(M),dp__cell_auto_range_start:x(M),dp__cell_auto_range_end:C(M)}),Z=M=>l.value.enabled?l.value.autoRange?Y(M):e.modelAuto?{...W(M),...ue(M)}:e.weekPicker?J(M):ue(M):e.weekPicker?X(M):W(M);return{setHoverDate:h,clearHoverDate:f,getDayClassData:M=>e.hideOffsetDates&&!M.current?{}:{...I(M),...Z(M),[e.dayClass?e.dayClass(M.value,e.internalModelValue):""]:!0,...s.value.calendarCell??{}}}},_o=t=>{const{defaultedFilters:e,defaultedRange:n,propDates:i,defaultedMultiDates:s}=Wt(t),r=N=>i.value.disabledDates?typeof i.value.disabledDates=="function"?i.value.disabledDates(xe(N)):!!bh(N,i.value.disabledDates):!1,o=N=>i.value.maxDate?t.yearPicker?Ge(N)>Ge(i.value.maxDate):nn(N,i.value.maxDate):!1,a=N=>i.value.minDate?t.yearPicker?Ge(N){const L=o(N),I=a(N),W=r(N),X=e.value.months.map(Z=>+Z).includes(at(N)),J=t.disabledWeekDays.length?t.disabledWeekDays.some(Z=>+Z===T5(N)):!1,ne=f(N),ue=Ge(N),Y=ue<+t.yearRange[0]||ue>+t.yearRange[1];return!(L||I||W||X||Y||J||ne)},c=(N,L)=>Xt(...Yr(i.value.minDate,N,L))||ct(...Yr(i.value.minDate,N,L)),u=(N,L)=>nn(...Yr(i.value.maxDate,N,L))||ct(...Yr(i.value.maxDate,N,L)),d=(N,L,I)=>{let W=!1;return i.value.maxDate&&I&&u(N,L)&&(W=!0),i.value.minDate&&!I&&c(N,L)&&(W=!0),W},h=(N,L,I,W)=>{let X=!1;return W?i.value.minDate&&i.value.maxDate?X=d(N,L,I):(i.value.minDate&&c(N,L)||i.value.maxDate&&u(N,L))&&(X=!0):X=!0,X},f=N=>Array.isArray(i.value.allowedDates)&&!i.value.allowedDates.length?!0:i.value.allowedDates?!bh(N,i.value.allowedDates):!1,p=N=>!l(N),m=N=>n.value.noDisabledRange?!PS({start:N[0],end:N[1]}).some(L=>p(L)):!0,y=N=>{if(N){const L=Ge(N);return L>=+t.yearRange[0]&&L<=t.yearRange[1]}return!0},v=(N,L)=>!!(Array.isArray(N)&&N[L]&&(n.value.maxRange||n.value.minRange)&&y(N[L])),b=(N,L,I=0)=>{if(v(L,I)&&y(N)){const W=MS(N,L[I]),X=QS(L[I],N),J=X.length===1?0:X.filter(ue=>p(ue)).length,ne=Math.abs(W)-(n.value.minMaxRawRange?0:J);if(n.value.minRange&&n.value.maxRange)return ne>=+n.value.minRange&&ne<=+n.value.maxRange;if(n.value.minRange)return ne>=+n.value.minRange;if(n.value.maxRange)return ne<=+n.value.maxRange}return!0},E=()=>!t.enableTimePicker||t.monthPicker||t.yearPicker||t.ignoreTimeValidation,C=N=>Array.isArray(N)?[N[0]?Og(N[0]):null,N[1]?Og(N[1]):null]:Og(N),w=(N,L,I)=>N.find(W=>+W.hours===pr(L)&&W.minutes==="*"?!0:+W.minutes===oo(L)&&+W.hours===pr(L))&&I,x=(N,L,I)=>{const[W,X]=N,[J,ne]=L;return!w(W,J,I)&&!w(X,ne,I)&&I},T=(N,L)=>{const I=Array.isArray(L)?L:[L];return Array.isArray(t.disabledTimes)?Array.isArray(t.disabledTimes[0])?x(t.disabledTimes,I,N):!I.some(W=>w(t.disabledTimes,W,N)):N},k=(N,L)=>{const I=Array.isArray(L)?[na(L[0]),L[1]?na(L[1]):void 0]:na(L),W=!t.disabledTimes(I);return N&&W},A=(N,L)=>t.disabledTimes?Array.isArray(t.disabledTimes)?T(L,N):k(L,N):L,P=N=>{let L=!0;if(!N||E())return!0;const I=!i.value.minDate&&!i.value.maxDate?C(N):N;return(t.maxTime||i.value.maxDate)&&(L=Cb(t.maxTime,i.value.maxDate,"max",Tn(I),L)),(t.minTime||i.value.minDate)&&(L=Cb(t.minTime,i.value.minDate,"min",Tn(I),L)),A(N,L)},F=N=>{if(!t.monthPicker)return!0;let L=!0;const I=xe(rs(N));if(i.value.minDate&&i.value.maxDate){const W=xe(rs(i.value.minDate)),X=xe(rs(i.value.maxDate));return nn(I,W)&&Xt(I,X)||ct(I,W)||ct(I,X)}if(i.value.minDate){const W=xe(rs(i.value.minDate));L=nn(I,W)||ct(I,W)}if(i.value.maxDate){const W=xe(rs(i.value.maxDate));L=Xt(I,W)||ct(I,W)}return L},H=be(()=>N=>!t.enableTimePicker||t.ignoreTimeValidation?!0:P(N)),te=be(()=>N=>t.monthPicker?Array.isArray(N)&&(n.value.enabled||s.value.enabled)?!N.filter(L=>!F(L)).length:F(N):!0);return{isDisabled:p,validateDate:l,validateMonthYearInRange:h,isDateRangeAllowed:m,checkMinMaxRange:b,isValidTime:P,isTimeValid:H,isMonthValid:te}},bf=()=>{const t=be(()=>(i,s)=>i?.includes(s)),e=be(()=>(i,s)=>i.count?i.solo?!0:s===0:!0),n=be(()=>(i,s)=>i.count?i.solo?!0:s===i.count-1:!0);return{hideNavigationButtons:t,showLeftIcon:e,showRightIcon:n}},xV=(t,e,n)=>{const i=we(0),s=Ns({[ta.timePicker]:!t.enableTimePicker||t.timePicker||t.monthPicker,[ta.calendar]:!1,[ta.header]:!1}),r=be(()=>t.monthPicker||t.timePicker),o=d=>{var h;if((h=t.flow)!=null&&h.length){if(!d&&r.value)return u();s[d]=!0,Object.keys(s).filter(f=>!s[f]).length||u()}},a=()=>{var d,h;(d=t.flow)!=null&&d.length&&i.value!==-1&&(i.value+=1,e("flow-step",i.value),u()),((h=t.flow)==null?void 0:h.length)===i.value&&Rn().then(()=>l())},l=()=>{i.value=-1},c=(d,h,...f)=>{var p,m;t.flow[i.value]===d&&n.value&&((m=(p=n.value)[h])==null||m.call(p,...f))},u=(d=0)=>{d&&(i.value+=d),c(zn.month,"toggleMonthPicker",!0),c(zn.year,"toggleYearPicker",!0),c(zn.calendar,"toggleTimePicker",!1,!0),c(zn.time,"toggleTimePicker",!0,!0);const h=t.flow[i.value];(h===zn.hours||h===zn.minutes||h===zn.seconds)&&c(h,"toggleTimePicker",!0,!0,h)};return{childMount:o,updateFlowStep:a,resetFlow:l,handleFlow:u,flowStep:i}},EV={key:1,class:"dp__input_wrap"},SV=["id","name","inputmode","placeholder","disabled","readonly","required","value","autocomplete","aria-disabled","aria-invalid"],CV={key:2,class:"dp--clear-btn"},TV=["aria-label"],kV=cn({compatConfig:{MODE:3},__name:"DatepickerInput",props:{isMenuOpen:{type:Boolean,default:!1},inputValue:{type:String,default:""},..._f},emits:["clear","open","update:input-value","set-input-date","close","select-date","set-empty-date","toggle","focus-prev","focus","blur","real-blur","text-input"],setup(t,{expose:e,emit:n}){const i=n,s=t,{defaultedTextInput:r,defaultedAriaLabels:o,defaultedInline:a,defaultedConfig:l,defaultedRange:c,defaultedMultiDates:u,defaultedUI:d,getDefaultPattern:h,getDefaultStartTime:f}=Wt(s),{checkMinMaxRange:p}=_o(s),m=we(),y=we(null),v=we(!1),b=we(!1),E=we(!1),C=we(null),w=be(()=>({dp__pointer:!s.disabled&&!s.readonly&&!r.value.enabled,dp__disabled:s.disabled,dp__input_readonly:!r.value.enabled,dp__input:!0,dp__input_icon_pad:!s.hideInputIcon,dp__input_valid:typeof s.state=="boolean"?s.state:!1,dp__input_invalid:typeof s.state=="boolean"?!s.state:!1,dp__input_focus:v.value||s.isMenuOpen,dp__input_reg:!r.value.enabled,...d.value.input??{}})),x=()=>{i("set-input-date",null),s.clearable&&s.autoApply&&(i("set-empty-date"),m.value=null)},T=Y=>{const Z=f();return VB(Y,r.value.format??h(),Z??eC({},s.enableSeconds),s.inputValue,E.value,s.formatLocale)},k=Y=>{const{rangeSeparator:Z}=r.value,[M,ie]=Y.split(`${Z}`);if(M){const le=T(M.trim()),$=ie?T(ie.trim()):null;if(Sl(le,$))return;const oe=le&&$?[le,$]:[le];p($,oe,0)&&(m.value=le?oe:null)}},A=()=>{E.value=!0},P=Y=>{if(c.value.enabled)k(Y);else if(u.value.enabled){const Z=Y.split(";");m.value=Z.map(M=>T(M.trim())).filter(M=>M)}else m.value=T(Y)},F=Y=>{var Z;const M=typeof Y=="string"?Y:(Z=Y.target)==null?void 0:Z.value;M!==""?(r.value.openMenu&&!s.isMenuOpen&&i("open"),P(M),i("set-input-date",m.value)):x(),E.value=!1,i("update:input-value",M),i("text-input",Y,m.value)},H=Y=>{r.value.enabled?(P(Y.target.value),r.value.enterSubmit&&nm(m.value)&&s.inputValue!==""?(i("set-input-date",m.value,!0),m.value=null):r.value.enterSubmit&&s.inputValue===""&&(m.value=null,i("clear"))):L(Y)},te=(Y,Z)=>{var M;if(C.value&&Z&&!b.value)return Y.preventDefault(),b.value=!0,(M=C.value)==null?void 0:M.focus();r.value.enabled&&r.value.tabSubmit&&P(Y.target.value),r.value.tabSubmit&&nm(m.value)&&s.inputValue!==""?(i("set-input-date",m.value,!0,!0),m.value=null):r.value.tabSubmit&&s.inputValue===""&&(m.value=null,i("clear",!0))},N=()=>{v.value=!0,i("focus"),Rn().then(()=>{var Y;r.value.enabled&&r.value.selectOnFocus&&((Y=y.value)==null||Y.select())})},L=Y=>{if(Y.preventDefault(),Qr(Y,l.value,!0),r.value.enabled&&r.value.openMenu&&!a.value.input){if(r.value.openMenu==="open"&&!s.isMenuOpen)return i("open");if(r.value.openMenu==="toggle")return i("toggle")}else r.value.enabled||i("toggle")},I=()=>{i("real-blur"),v.value=!1,(!s.isMenuOpen||a.value.enabled&&a.value.input)&&i("blur"),s.autoApply&&r.value.enabled&&m.value&&!s.isMenuOpen&&(i("set-input-date",m.value),i("select-date"),m.value=null)},W=Y=>{Qr(Y,l.value,!0),i("clear")},X=(Y,Z)=>{if(Y.key==="Tab"&&te(Y,Z),Y.key==="Enter"&&H(Y),!r.value.enabled){if(Y.code==="Tab")return;Y.preventDefault()}},J=()=>{var Y;(Y=y.value)==null||Y.focus({preventScroll:!0})},ne=Y=>{m.value=Y},ue=Y=>{Y.key===Lt.tab&&(b.value=!1,te(Y))};return e({focusInput:J,setParsedDate:ne}),(Y,Z)=>{var M,ie;return D(),V("div",{onClick:L},[Y.$slots.trigger&&!Y.$slots["dp-input"]&&!Q(a).enabled?Oe(Y.$slots,"trigger",{key:0}):ce("",!0),!Y.$slots.trigger&&(!Q(a).enabled||Q(a).input)?(D(),V("div",EV,[Y.$slots["dp-input"]&&!Y.$slots.trigger&&(!Q(a).enabled||Q(a).enabled&&Q(a).input)?Oe(Y.$slots,"dp-input",{key:0,value:t.inputValue,isMenuOpen:t.isMenuOpen,onInput:F,onEnter:H,onTab:te,onClear:W,onBlur:I,onKeypress:X,onPaste:A,onFocus:N,openMenu:()=>Y.$emit("open"),closeMenu:()=>Y.$emit("close"),toggleMenu:()=>Y.$emit("toggle")}):ce("",!0),Y.$slots["dp-input"]?ce("",!0):(D(),V("input",{key:1,id:Y.uid?`dp-input-${Y.uid}`:void 0,ref_key:"inputRef",ref:y,"data-test":"dp-input",name:Y.name,class:Ie(w.value),inputmode:Q(r).enabled?"text":"none",placeholder:Y.placeholder,disabled:Y.disabled,readonly:Y.readonly,required:Y.required,value:t.inputValue,autocomplete:Y.autocomplete,"aria-disabled":Y.disabled||void 0,"aria-invalid":Y.state===!1?!0:void 0,onInput:F,onBlur:I,onFocus:N,onKeypress:X,onKeydown:Z[0]||(Z[0]=le=>X(le,!0)),onPaste:A},null,42,SV)),g("div",{onClick:Z[3]||(Z[3]=le=>i("toggle"))},[Y.$slots["input-icon"]&&!Y.hideInputIcon?(D(),V("span",{key:0,class:"dp__input_icon",onClick:Z[1]||(Z[1]=le=>i("toggle"))},[Oe(Y.$slots,"input-icon")])):ce("",!0),!Y.$slots["input-icon"]&&!Y.hideInputIcon&&!Y.$slots["dp-input"]?(D(),Ce(Q(Ul),{key:1,"aria-label":(M=Q(o))==null?void 0:M.calendarIcon,class:"dp__input_icon dp__input_icons",onClick:Z[2]||(Z[2]=le=>i("toggle"))},null,8,["aria-label"])):ce("",!0)]),Y.$slots["clear-icon"]&&t.inputValue&&Y.clearable&&!Y.disabled&&!Y.readonly?(D(),V("span",CV,[Oe(Y.$slots,"clear-icon",{clear:W})])):ce("",!0),Y.clearable&&!Y.$slots["clear-icon"]&&t.inputValue&&!Y.disabled&&!Y.readonly?(D(),V("button",{key:3,ref_key:"clearBtnRef",ref:C,"aria-label":(ie=Q(o))==null?void 0:ie.clearInput,class:"dp--clear-btn",type:"button",onBlur:Z[4]||(Z[4]=le=>b.value=!1),onKeydown:Z[5]||(Z[5]=le=>Q(Qn)(le,()=>W(le),!0,ue)),onClick:Z[6]||(Z[6]=iu(le=>W(le),["prevent"]))},[B(Q(KS),{class:"dp__input_icons","data-test":"clear-icon"})],40,TV)):ce("",!0)])):ce("",!0)])}}}),AV=typeof window<"u"?window:void 0,Wg=()=>{},MV=t=>ef()?(e_(t),!0):!1,IV=(t,e,n,i)=>{if(!t)return Wg;let s=Wg;const r=fn(()=>Q(t),a=>{s(),a&&(a.addEventListener(e,n,i),s=()=>{a.removeEventListener(e,n,i),s=Wg})},{immediate:!0,flush:"post"}),o=()=>{r(),s()};return MV(o),o},PV=(t,e,n,i={})=>{const{window:s=AV,event:r="pointerdown"}=i;return s?IV(s,r,o=>{const a=mn(t),l=mn(e);!a||!l||a===o.target||o.composedPath().includes(a)||o.composedPath().includes(l)||n(o)},{passive:!0}):void 0},RV=cn({compatConfig:{MODE:3},__name:"VueDatePicker",props:{..._f},emits:["update:model-value","update:model-timezone-value","text-submit","closed","cleared","open","focus","blur","internal-model-change","recalculate-position","flow-step","update-month-year","invalid-select","invalid-fixed-range","tooltip-open","tooltip-close","time-picker-open","time-picker-close","am-pm-change","range-start","range-end","date-update","invalid-date","overlay-toggle","text-input"],setup(t,{expose:e,emit:n}){const i=n,s=t,r=pa(),o=we(!1),a=Zc(s,"modelValue"),l=Zc(s,"timezone"),c=we(null),u=we(null),d=we(null),h=we(!1),f=we(null),p=we(!1),m=we(!1),y=we(!1),v=we(!1),{setMenuFocused:b,setShiftKey:E}=rC(),{clearArrowNav:C}=mo(),{validateDate:w,isValidTime:x}=_o(s),{defaultedTransitions:T,defaultedTextInput:k,defaultedInline:A,defaultedConfig:P,defaultedRange:F,defaultedMultiDates:H}=Wt(s),{menuTransition:te,showTransition:N}=Nu(T);xn(()=>{ie(s.modelValue),Rn().then(()=>{if(!A.value.enabled){const he=ue(f.value);he?.addEventListener("scroll",K),window?.addEventListener("resize",U)}}),A.value.enabled&&(o.value=!0),window?.addEventListener("keyup",re),window?.addEventListener("keydown",j)}),Yl(()=>{if(!A.value.enabled){const he=ue(f.value);he?.removeEventListener("scroll",K),window?.removeEventListener("resize",U)}window?.removeEventListener("keyup",re),window?.removeEventListener("keydown",j)});const L=ki(r,"all",s.presetDates),I=ki(r,"input");fn([a,l],()=>{ie(a.value)},{deep:!0});const{openOnTop:W,menuStyle:X,xCorrect:J,setMenuPosition:ne,getScrollableParent:ue,shadowRender:Y}=yV({menuRef:c,menuRefInner:u,inputRef:d,pickerWrapperRef:f,inline:A,emit:i,props:s,slots:r}),{inputValue:Z,internalModelValue:M,parseExternalModelValue:ie,emitModelValue:le,formatInputValue:$,checkBeforeEmit:oe}=u4(i,s,h),de=be(()=>({dp__main:!0,dp__theme_dark:s.dark,dp__theme_light:!s.dark,dp__flex_display:A.value.enabled,"dp--flex-display-collapsed":y.value,dp__flex_display_with_input:A.value.input})),ve=be(()=>s.dark?"dp__theme_dark":"dp__theme_light"),z=be(()=>s.teleport?{to:typeof s.teleport=="boolean"?"body":s.teleport,disabled:!s.teleport||A.value.enabled}:{}),ge=be(()=>({class:"dp__outer_menu_wrap"})),S=be(()=>A.value.enabled&&(s.timePicker||s.monthPicker||s.yearPicker||s.quarterPicker)),O=()=>{var he,ke;return(ke=(he=d.value)==null?void 0:he.$el)==null?void 0:ke.getBoundingClientRect()},K=()=>{o.value&&(P.value.closeOnScroll?Be():ne())},U=()=>{var he;o.value&&ne();const ke=(he=u.value)==null?void 0:he.$el.getBoundingClientRect().width;y.value=document.body.offsetWidth<=ke},re=he=>{he.key==="Tab"&&!A.value.enabled&&!s.teleport&&P.value.tabOutClosesMenu&&(f.value.contains(document.activeElement)||Be()),m.value=he.shiftKey},j=he=>{m.value=he.shiftKey},se=()=>{!s.disabled&&!s.readonly&&(Y(Mb,s),ne(!1),o.value=!0,o.value&&i("open"),o.value||ze(),ie(s.modelValue))},ee=()=>{var he;Z.value="",ze(),(he=d.value)==null||he.setParsedDate(null),i("update:model-value",null),i("update:model-timezone-value",null),i("cleared"),P.value.closeOnClearValue&&Be()},fe=()=>{const he=M.value;return!he||!Array.isArray(he)&&w(he)?!0:Array.isArray(he)?H.value.enabled||he.length===2&&w(he[0])&&w(he[1])?!0:F.value.partialRange&&!s.timePicker?w(he[0]):!1:!1},me=()=>{oe()&&fe()?(le(),Be()):i("invalid-select",M.value)},pe=he=>{Le(),le(),P.value.closeOnAutoApply&&!he&&Be()},Le=()=>{d.value&&k.value.enabled&&d.value.setParsedDate(M.value)},Ae=(he=!1)=>{s.autoApply&&x(M.value)&&fe()&&(F.value.enabled&&Array.isArray(M.value)?(F.value.partialRange||M.value.length===2)&&pe(he):pe(he))},ze=()=>{k.value.enabled||(M.value=null)},Be=()=>{A.value.enabled||(o.value&&(o.value=!1,J.value=!1,b(!1),E(!1),C(),i("closed"),Z.value&&ie(a.value)),ze(),i("blur"))},nt=(he,ke,De=!1)=>{if(!he){M.value=null;return}const Ht=Array.isArray(he)?!he.some(Di=>!w(Di)):w(he),un=x(he);Ht&&un&&(v.value=!0,M.value=he,ke&&(p.value=De,me(),i("text-submit")),Rn().then(()=>{v.value=!1}))},Ze=()=>{s.autoApply&&x(M.value)&&le(),Le()},Mt=()=>o.value?Be():se(),gn=he=>{M.value=he},Un=()=>{k.value.enabled&&(h.value=!0,$()),i("focus")},Ri=()=>{if(k.value.enabled&&(h.value=!1,ie(s.modelValue),p.value)){const he=NB(f.value,m.value);he?.focus()}i("blur")},wi=he=>{u.value&&u.value.updateMonthYear(0,{month:xb(he.month),year:xb(he.year)})},Xi=he=>{ie(he??s.modelValue)},Ut=(he,ke)=>{var De;(De=u.value)==null||De.switchView(he,ke)},ae=he=>P.value.onClickOutside?P.value.onClickOutside(he):Be(),Te=(he=0)=>{var ke;(ke=u.value)==null||ke.handleFlow(he)};return PV(c,d,()=>ae(fe)),e({closeMenu:Be,selectDate:me,clearValue:ee,openMenu:se,onScroll:K,formatInputValue:$,updateInternalModelValue:gn,setMonthYear:wi,parseModel:Xi,switchView:Ut,toggleMenu:Mt,handleFlow:Te,dpWrapMenuRef:c}),(he,ke)=>(D(),V("div",{ref_key:"pickerWrapperRef",ref:f,class:Ie(de.value),"data-datepicker-instance":""},[B(kV,yn({ref_key:"inputRef",ref:d,"input-value":Q(Z),"onUpdate:inputValue":ke[0]||(ke[0]=De=>Qt(Z)?Z.value=De:null),"is-menu-open":o.value},he.$props,{onClear:ee,onOpen:se,onSetInputDate:nt,onSetEmptyDate:Q(le),onSelectDate:me,onToggle:Mt,onClose:Be,onFocus:Un,onBlur:Ri,onRealBlur:ke[1]||(ke[1]=De=>h.value=!1),onTextInput:ke[2]||(ke[2]=De=>he.$emit("text-input",De))}),jn({_:2},[Xe(Q(I),(De,Ht)=>({name:De,fn:Re(un=>[Oe(he.$slots,De,In(Zn(un)))])}))]),1040,["input-value","is-menu-open","onSetEmptyDate"]),(D(),Ce(ga(he.teleport?tD:"div"),In(Zn(z.value)),{default:Re(()=>[B(Rt,{name:Q(te)(Q(W)),css:Q(N)&&!Q(A).enabled},{default:Re(()=>[o.value?(D(),V("div",yn({key:0,ref_key:"dpWrapMenuRef",ref:c},ge.value,{class:{"dp--menu-wrapper":!Q(A).enabled},style:Q(A).enabled?void 0:Q(X)}),[B(Mb,yn({ref_key:"dpMenuRef",ref:u},he.$props,{"internal-model-value":Q(M),"onUpdate:internalModelValue":ke[3]||(ke[3]=De=>Qt(M)?M.value=De:null),class:{[ve.value]:!0,"dp--menu-wrapper":he.teleport},"open-on-top":Q(W),"no-overlay-focus":S.value,collapse:y.value,"get-input-rect":O,"is-text-input-date":v.value,onClosePicker:Be,onSelectDate:me,onAutoApply:Ae,onTimeUpdate:Ze,onFlowStep:ke[4]||(ke[4]=De=>he.$emit("flow-step",De)),onUpdateMonthYear:ke[5]||(ke[5]=De=>he.$emit("update-month-year",De)),onInvalidSelect:ke[6]||(ke[6]=De=>he.$emit("invalid-select",Q(M))),onAutoApplyInvalid:ke[7]||(ke[7]=De=>he.$emit("invalid-select",De)),onInvalidFixedRange:ke[8]||(ke[8]=De=>he.$emit("invalid-fixed-range",De)),onRecalculatePosition:Q(ne),onTooltipOpen:ke[9]||(ke[9]=De=>he.$emit("tooltip-open",De)),onTooltipClose:ke[10]||(ke[10]=De=>he.$emit("tooltip-close",De)),onTimePickerOpen:ke[11]||(ke[11]=De=>he.$emit("time-picker-open",De)),onTimePickerClose:ke[12]||(ke[12]=De=>he.$emit("time-picker-close",De)),onAmPmChange:ke[13]||(ke[13]=De=>he.$emit("am-pm-change",De)),onRangeStart:ke[14]||(ke[14]=De=>he.$emit("range-start",De)),onRangeEnd:ke[15]||(ke[15]=De=>he.$emit("range-end",De)),onDateUpdate:ke[16]||(ke[16]=De=>he.$emit("date-update",De)),onInvalidDate:ke[17]||(ke[17]=De=>he.$emit("invalid-date",De)),onOverlayToggle:ke[18]||(ke[18]=De=>he.$emit("overlay-toggle",De))}),jn({_:2},[Xe(Q(L),(De,Ht)=>({name:De,fn:Re(un=>[Oe(he.$slots,De,In(Zn({...un})))])}))]),1040,["internal-model-value","class","open-on-top","no-overlay-focus","collapse","is-text-input-date","onRecalculatePosition"])],16)):ce("",!0)]),_:3},8,["name","css"])]),_:3},16))],2))}}),Bu=(()=>{const t=RV;return t.install=e=>{e.component("Vue3DatePicker",t)},t})(),DV=Object.freeze(Object.defineProperty({__proto__:null,default:Bu},Symbol.toStringTag,{value:"Module"}));Object.entries(DV).forEach(([t,e])=>{t!=="default"&&(Bu[t]=e)});const $V={name:"newDashboardAPIKey",components:{LocaleText:Qe,VueDatePicker:Bu},data(){return{newKeyData:{ExpiredAt:pi().add(7,"d").format("YYYY-MM-DD HH:mm:ss"),neverExpire:!1},submitting:!1}},setup(){return{store:st()}},mounted(){console.log(this.newKeyData.ExpiredAt)},methods:{submitNewAPIKey(){this.submitting=!0,kt("/api/newDashboardAPIKey",this.newKeyData,t=>{t.status?(this.$emit("created",t.data),this.store.newMessage("Server","API Key created","success"),this.$emit("close")):this.store.newMessage("Server",t.message,"danger"),this.submitting=!1})},fixDate(t){return console.log(pi(t).format("YYYY-MM-DDTHH:mm:ss")),pi(t).format("YYYY-MM-DDTHH:mm:ss")},parseTime(t){t?this.newKeyData.ExpiredAt=pi(t).format("YYYY-MM-DD HH:mm:ss"):this.newKeyData.ExpiredAt=void 0}}},LV={class:"position-absolute w-100 h-100 top-0 start-0 rounded-bottom-3 p-3 d-flex",style:{"background-color":"#00000060","backdrop-filter":"blur(3px)"}},OV={class:"card m-auto rounded-3 mt-5"},NV={class:"card-header bg-transparent d-flex align-items-center gap-2 border-0 p-4 pb-0"},FV={class:"mb-0"},BV={class:"card-body d-flex gap-2 p-4 flex-column"},VV={class:"text-muted"},zV={class:"d-flex align-items-center gap-2"},WV={class:"form-check"},HV=["disabled"],YV={class:"form-check-label",for:"neverExpire"},jV=g("i",{class:"bi bi-emoji-grimace-fill me-2"},null,-1),KV={key:0,class:"bi bi-check-lg me-2"};function UV(t,e,n,i,s,r){const o=Se("LocaleText"),a=Se("VueDatePicker");return D(),V("div",LV,[g("div",OV,[g("div",NV,[g("h6",FV,[B(o,{t:"Create API Key"})]),g("button",{type:"button",class:"btn-close ms-auto",onClick:e[0]||(e[0]=l=>this.$emit("close"))})]),g("div",BV,[g("small",VV,[B(o,{t:"When should this API Key expire?"})]),g("div",zV,[B(a,{is24:!0,"min-date":new Date,"model-value":this.newKeyData.ExpiredAt,"onUpdate:modelValue":this.parseTime,"time-picker-inline":"",format:"yyyy-MM-dd HH:mm:ss","preview-format":"yyyy-MM-dd HH:mm:ss",clearable:!1,disabled:this.newKeyData.neverExpire||this.submitting,dark:this.store.Configuration.Server.dashboard_theme==="dark"},null,8,["min-date","model-value","onUpdate:modelValue","disabled","dark"])]),g("div",WV,[Ne(g("input",{class:"form-check-input",type:"checkbox","onUpdate:modelValue":e[1]||(e[1]=l=>this.newKeyData.neverExpire=l),id:"neverExpire",disabled:this.submitting},null,8,HV),[[Jn,this.newKeyData.neverExpire]]),g("label",YV,[B(o,{t:"Never Expire"}),He(" ("),jV,B(o,{t:"Don't think that's a good idea"}),He(") ")])]),g("button",{class:Ie(["ms-auto btn bg-success-subtle text-success-emphasis border-1 border-success-subtle rounded-3 shadow-sm",{disabled:this.submitting}]),onClick:e[2]||(e[2]=l=>this.submitNewAPIKey())},[this.submitting?ce("",!0):(D(),V("i",KV)),this.submitting?(D(),Ce(o,{key:1,t:"Creating..."})):(D(),Ce(o,{key:2,t:"Create"}))],2)])])])}const GV=Ye($V,[["render",UV]]),XV={name:"dashboardAPIKey",components:{LocaleText:Qe},props:{apiKey:Object},setup(){return{store:st()}},data(){return{confirmDelete:!1}},methods:{deleteAPIKey(){kt("/api/deleteDashboardAPIKey",{Key:this.apiKey.Key},t=>{t.status?(this.$emit("deleted",t.data),this.store.newMessage("Server","API Key deleted","success")):this.store.newMessage("Server",t.message,"danger")})}}},j_=t=>(bn("data-v-a76253c8"),t=t(),wn(),t),qV={class:"card rounded-3 shadow-sm"},ZV={key:0,class:"card-body d-flex gap-3 align-items-center apiKey-card-body"},JV={class:"d-flex align-items-center gap-2"},QV={class:"text-muted"},e6={style:{"word-break":"break-all"}},t6={class:"d-flex align-items-center gap-2 ms-auto"},n6={class:"text-muted"},i6=j_(()=>g("i",{class:"bi bi-trash-fill"},null,-1)),s6=[i6],r6={key:0,class:"card-body d-flex gap-3 align-items-center justify-content-end"},o6=j_(()=>g("i",{class:"bi bi-check-lg"},null,-1)),a6=[o6],l6=j_(()=>g("i",{class:"bi bi-x-lg"},null,-1)),c6=[l6];function u6(t,e,n,i,s,r){const o=Se("LocaleText");return D(),V("div",qV,[this.confirmDelete?(D(),V($e,{key:1},[this.store.getActiveCrossServer()?ce("",!0):(D(),V("div",r6,[B(o,{t:"Are you sure to delete this API key?"}),g("a",{role:"button",class:"btn btn-sm bg-success-subtle text-success-emphasis rounded-3",onClick:e[1]||(e[1]=a=>this.deleteAPIKey())},a6),g("a",{role:"button",class:"btn btn-sm bg-secondary-subtle text-secondary-emphasis rounded-3",onClick:e[2]||(e[2]=a=>this.confirmDelete=!1)},c6)]))],64)):(D(),V("div",ZV,[g("div",JV,[g("small",QV,[B(o,{t:"Key"})]),g("span",e6,Ee(this.apiKey.Key),1)]),g("div",t6,[g("small",n6,[B(o,{t:"Expire At"})]),this.apiKey.ExpiredAt?ce("",!0):(D(),Ce(o,{key:0,t:"Never Expire"})),g("span",null,Ee(this.apiKey.ExpiredAt),1)]),this.store.getActiveCrossServer()?ce("",!0):(D(),V("a",{key:0,role:"button",class:"btn btn-sm bg-danger-subtle text-danger-emphasis rounded-3",onClick:e[0]||(e[0]=a=>this.confirmDelete=!0)},s6))]))])}const d6=Ye(XV,[["render",u6],["__scopeId","data-v-a76253c8"]]),h6={name:"dashboardAPIKeys",components:{LocaleText:Qe,DashboardAPIKey:d6,NewDashboardAPIKey:GV},setup(){return{store:st()}},data(){return{value:this.store.Configuration.Server.dashboard_api_key,apiKeys:[],newDashboardAPIKey:!1}},methods:{async toggleDashboardAPIKeys(){await kt("/api/updateDashboardConfigurationItem",{section:"Server",key:"dashboard_api_key",value:this.value},t=>{t.status?(this.store.Configuration.Peers[this.targetData]=this.value,this.store.newMessage("Server",`API Keys function is successfully ${this.value?"enabled":"disabled"}`,"success")):(this.value=this.store.Configuration.Peers[this.targetData],this.store.newMessage("Server",`API Keys function is failed to ${this.value?"enabled":"disabled"}`,"danger"))})}},watch:{value:{immediate:!0,handler(t){t?Vt("/api/getDashboardAPIKeys",{},e=>{console.log(e),e.status?this.apiKeys=e.data:(this.apiKeys=[],this.store.newMessage("Server",e.message,"danger"))}):this.apiKeys=[]}}}},f6=t=>(bn("data-v-167c06a6"),t=t(),wn(),t),g6={class:"card mb-4 shadow rounded-3"},p6={class:"card-header d-flex"},m6={key:0,class:"form-check form-switch ms-auto"},_6={class:"form-check-label",for:"allowAPIKeysSwitch"},y6={key:0,class:"card-body position-relative d-flex flex-column gap-2"},v6=f6(()=>g("i",{class:"bi bi-plus-circle-fill me-2"},null,-1)),b6={key:1,class:"card",style:{height:"300px"}},w6={class:"card-body d-flex text-muted"},x6={class:"m-auto"},E6={key:2,class:"d-flex flex-column gap-2 position-relative",style:{"min-height":"300px"}};function S6(t,e,n,i,s,r){const o=Se("LocaleText"),a=Se("DashboardAPIKey"),l=Se("NewDashboardAPIKey");return D(),V("div",g6,[g("div",p6,[B(o,{t:"API Keys"}),this.store.getActiveCrossServer()?ce("",!0):(D(),V("div",m6,[Ne(g("input",{class:"form-check-input",type:"checkbox","onUpdate:modelValue":e[0]||(e[0]=c=>this.value=c),onChange:e[1]||(e[1]=c=>this.toggleDashboardAPIKeys()),role:"switch",id:"allowAPIKeysSwitch"},null,544),[[Jn,this.value]]),g("label",_6,[this.value?(D(),Ce(o,{key:0,t:"Enabled"})):(D(),Ce(o,{key:1,t:"Disabled"}))])]))]),this.value?(D(),V("div",y6,[this.store.getActiveCrossServer()?ce("",!0):(D(),V("button",{key:0,class:"ms-auto btn bg-primary-subtle text-primary-emphasis border-1 border-primary-subtle rounded-3 shadow-sm",onClick:e[2]||(e[2]=c=>this.newDashboardAPIKey=!0)},[v6,B(o,{t:"API Key"})])),this.apiKeys.length===0?(D(),V("div",b6,[g("div",w6,[g("span",x6,[B(o,{t:"No WGDashboard API Key"})])])])):(D(),V("div",E6,[B(jl,{name:"apiKey"},{default:Re(()=>[(D(!0),V($e,null,Xe(this.apiKeys,c=>(D(),Ce(a,{apiKey:c,key:c.Key,onDeleted:e[3]||(e[3]=u=>this.apiKeys=u)},null,8,["apiKey"]))),128))]),_:1})])),B(Rt,{name:"zoomReversed"},{default:Re(()=>[this.newDashboardAPIKey?(D(),Ce(l,{key:0,onCreated:e[4]||(e[4]=c=>this.apiKeys=c),onClose:e[5]||(e[5]=c=>this.newDashboardAPIKey=!1)})):ce("",!0)]),_:1})])):ce("",!0)])}const C6=Ye(h6,[["render",S6],["__scopeId","data-v-167c06a6"]]),T6={name:"accountSettingsMFA",components:{LocaleText:Qe},setup(){const t=st(),e=`input_${Os()}`;return{store:t,uuid:e}},data(){return{status:!1}},mounted(){this.status=this.store.Configuration.Account.enable_totp},methods:{async resetMFA(){await kt("/api/updateDashboardConfigurationItem",{section:"Account",key:"totp_verified",value:"false"},async t=>{await kt("/api/updateDashboardConfigurationItem",{section:"Account",key:"enable_totp",value:"false"},e=>{e.status&&this.$router.push("/2FASetup")})})}}},k6={class:"d-flex align-items-center"},A6={class:"form-check form-switch ms-3"},M6=g("i",{class:"bi bi-shield-lock-fill me-2"},null,-1);function I6(t,e,n,i,s,r){const o=Se("LocaleText");return D(),V("div",null,[g("div",k6,[g("strong",null,[B(o,{t:"Multi-Factor Authentication (MFA)"})]),g("div",A6,[Ne(g("input",{class:"form-check-input",type:"checkbox","onUpdate:modelValue":e[0]||(e[0]=a=>this.status=a),role:"switch",id:"allowMFAKeysSwitch"},null,512),[[Jn,this.status]])]),this.status?(D(),V("button",{key:0,class:"btn bg-warning-subtle text-warning-emphasis border-1 border-warning-subtle ms-auto rounded-3 shadow-sm",onClick:e[1]||(e[1]=a=>this.resetMFA())},[M6,this.store.Configuration.Account.totp_verified?(D(),Ce(o,{key:0,t:"Reset"})):(D(),Ce(o,{key:1,t:"Setup"})),He(" MFA ")])):ce("",!0)])])}const P6=Ye(T6,[["render",I6]]),R6={name:"dashboardLanguage",components:{LocaleText:Qe},setup(){return{store:st()}},data(){return{languages:void 0}},mounted(){Vt("/api/locale/available",{},t=>{this.languages=t.data})},methods:{changeLanguage(t){kt("/api/locale/update",{lang_id:t},e=>{e.status?(this.store.Configuration.Server.dashboard_language=t,this.store.Locale=e.data):this.store.newMessage("Server","Dashboard language update failed","danger")})}},computed:{currentLanguage(){let t=this.store.Configuration.Server.dashboard_language;return this.languages.find(e=>e.lang_id===t)}}},D6={class:"card mb-4 shadow rounded-3"},$6={class:"card-header"},L6={class:"card-body d-flex gap-2"},O6={class:"dropdown w-100"},N6=["disabled"],F6={key:1},B6={class:"dropdown-menu rounded-3 shadow",style:{width:"500px"}},V6=["onClick"],z6={class:"me-auto mb-0"},W6={class:"d-block",style:{"font-size":"0.8rem"}},H6={key:0,class:"bi bi-check text-primary fs-5"};function Y6(t,e,n,i,s,r){const o=Se("LocaleText");return D(),V("div",D6,[g("p",$6,[B(o,{t:"Dashboard Language"})]),g("div",L6,[g("div",O6,[g("button",{class:"btn bg-primary-subtle text-primary-emphasis dropdown-toggle w-100 rounded-3",disabled:!this.languages,type:"button","data-bs-toggle":"dropdown","aria-expanded":"false"},[this.languages?(D(),V("span",F6,Ee(r.currentLanguage?.lang_name_localized),1)):(D(),Ce(o,{key:0,t:"Loading..."}))],8,N6),g("ul",B6,[(D(!0),V($e,null,Xe(this.languages,a=>(D(),V("li",null,[g("a",{class:"dropdown-item d-flex align-items-center",role:"button",onClick:l=>this.changeLanguage(a.lang_id)},[g("p",z6,[He(Ee(a.lang_name_localized)+" ",1),g("small",W6,Ee(a.lang_name),1)]),r.currentLanguage?.lang_id===a.lang_id?(D(),V("i",H6)):ce("",!0)],8,V6)]))),256))])])])])}const j6=Ye(R6,[["render",Y6]]),K6={name:"settings",methods:{ipV46RegexCheck:u3},components:{DashboardLanguage:j6,LocaleText:Qe,AccountSettingsMFA:P6,DashboardAPIKeys:C6,DashboardSettingsInputIPAddressAndPort:xF,DashboardTheme:rF,DashboardSettingsInputWireguardConfigurationPath:Z3,AccountSettingsInputPassword:N3,AccountSettingsInputUsername:_3,PeersDefaultSettingsInput:c3},setup(){return{dashboardConfigurationStore:st()}}},U6={class:"mt-md-5 mt-3"},G6={class:"container-md"},X6={class:"mb-3 text-body"},q6={class:"card mb-4 shadow rounded-3"},Z6={class:"card-header"},J6={class:"card-body"},Q6={class:"card mb-4 shadow rounded-3"},ez={class:"card-header"},tz={class:"card-body"},nz={class:"card mb-4 shadow rounded-3"},iz={class:"card-header"},sz={class:"card-body d-flex gap-4 flex-column"},rz=g("hr",{class:"m-0"},null,-1),oz={key:0,class:"m-0"};function az(t,e,n,i,s,r){const o=Se("LocaleText"),a=Se("DashboardTheme"),l=Se("DashboardLanguage"),c=Se("PeersDefaultSettingsInput"),u=Se("DashboardSettingsInputWireguardConfigurationPath"),d=Se("AccountSettingsInputUsername"),h=Se("AccountSettingsInputPassword"),f=Se("AccountSettingsMFA"),p=Se("DashboardAPIKeys");return D(),V("div",U6,[g("div",G6,[g("h3",X6,[B(o,{t:"Settings"})]),B(a),B(l),g("div",q6,[g("p",Z6,[B(o,{t:"Peers Default Settings"})]),g("div",J6,[B(c,{targetData:"peer_global_dns",title:"DNS"}),B(c,{targetData:"peer_endpoint_allowed_ip",title:"Endpoint Allowed IPs"}),B(c,{targetData:"peer_mtu",title:"MTU"}),B(c,{targetData:"peer_keep_alive",title:"Persistent Keepalive"}),B(c,{targetData:"remote_endpoint",title:"Peer Remote Endpoint",warning:!0,warningText:"This will be changed globally, and will be apply to all peer's QR code and configuration file."})])]),g("div",Q6,[g("p",ez,[B(o,{t:"WireGuard Configurations Settings"})]),g("div",tz,[B(u,{targetData:"wg_conf_path",title:"Configurations Directory",warning:!0,"warning-text":"Remember to remove / at the end of your path. e.g /etc/wireguard"})])]),g("div",nz,[g("p",iz,[B(o,{t:"WGDashboard Account Settings"})]),g("div",sz,[B(d,{targetData:"username",title:"Username"}),rz,B(h,{targetData:"password"}),this.dashboardConfigurationStore.getActiveCrossServer()?ce("",!0):(D(),V("hr",oz)),this.dashboardConfigurationStore.getActiveCrossServer()?ce("",!0):(D(),Ce(f,{key:1}))])]),B(p)])])}const lz=Ye(K6,[["render",az]]),cz={name:"setup",components:{LocaleText:Qe},setup(){return{store:st()}},data(){return{setup:{username:"",newPassword:"",repeatNewPassword:"",enable_totp:!0},loading:!1,errorMessage:"",done:!1}},computed:{goodToSubmit(){return this.setup.username&&this.setup.newPassword.length>=8&&this.setup.repeatNewPassword.length>=8&&this.setup.newPassword===this.setup.repeatNewPassword}},methods:{submit(){this.loading=!0,kt("/api/Welcome_Finish",this.setup,t=>{t.status?(this.done=!0,this.$router.push("/2FASetup")):(document.querySelectorAll("#createAccount input").forEach(e=>e.classList.add("is-invalid")),this.errorMessage=t.message,document.querySelector(".login-container-fluid").scrollTo({top:0,left:0,behavior:"smooth"})),this.loading=!1})}}},uz=["data-bs-theme"],dz={class:"m-auto text-body",style:{width:"500px"}},hz={class:"dashboardLogo display-4"},fz={class:"mb-5"},gz={key:0,class:"alert alert-danger"},pz={class:"d-flex flex-column gap-3"},mz={id:"createAccount",class:"d-flex flex-column gap-2"},_z={class:"form-group text-body"},yz={for:"username",class:"mb-1 text-muted"},vz={class:"form-group text-body"},bz={for:"password",class:"mb-1 text-muted"},wz={class:"form-group text-body"},xz={for:"confirmPassword",class:"mb-1 text-muted"},Ez=["disabled"],Sz={key:0,class:"d-flex align-items-center w-100"},Cz=g("i",{class:"bi bi-chevron-right ms-auto"},null,-1),Tz={key:1,class:"d-flex align-items-center w-100"},kz=g("span",{class:"spinner-border ms-auto spinner-border-sm",role:"status"},[g("span",{class:"visually-hidden"},"Loading...")],-1);function Az(t,e,n,i,s,r){const o=Se("LocaleText");return D(),V("div",{class:"container-fluid login-container-fluid d-flex main pt-5 overflow-scroll","data-bs-theme":this.store.Configuration.Server.dashboard_theme},[g("div",dz,[g("span",hz,[B(o,{t:"Nice to meet you!"})]),g("p",fz,[B(o,{t:"Please fill in the following fields to finish setup"}),He(" 😊")]),g("div",null,[g("h3",null,[B(o,{t:"Create an account"})]),this.errorMessage?(D(),V("div",gz,Ee(this.errorMessage),1)):ce("",!0),g("div",pz,[g("form",mz,[g("div",_z,[g("label",yz,[g("small",null,[B(o,{t:"Enter an username you like"})])]),Ne(g("input",{type:"text",autocomplete:"username","onUpdate:modelValue":e[0]||(e[0]=a=>this.setup.username=a),class:"form-control",id:"username",name:"username",required:""},null,512),[[Ke,this.setup.username]])]),g("div",vz,[g("label",bz,[g("small",null,[B(o,{t:"Enter a password"}),g("code",null,[B(o,{t:"(At least 8 characters and make sure is strong enough!)"})])])]),Ne(g("input",{type:"password",autocomplete:"new-password","onUpdate:modelValue":e[1]||(e[1]=a=>this.setup.newPassword=a),class:"form-control",id:"password",name:"password",required:""},null,512),[[Ke,this.setup.newPassword]])]),g("div",wz,[g("label",xz,[g("small",null,[B(o,{t:"Confirm password"})])]),Ne(g("input",{type:"password",autocomplete:"confirm-new-password","onUpdate:modelValue":e[2]||(e[2]=a=>this.setup.repeatNewPassword=a),class:"form-control",id:"confirmPassword",name:"confirmPassword",required:""},null,512),[[Ke,this.setup.repeatNewPassword]])])]),g("button",{class:"btn btn-dark btn-lg mb-5 d-flex btn-brand shadow align-items-center",ref:"signInBtn",disabled:!this.goodToSubmit||this.loading||this.done,onClick:e[3]||(e[3]=a=>this.submit())},[!this.loading&&!this.done?(D(),V("span",Sz,[B(o,{t:"Next"}),Cz])):(D(),V("span",Tz,[B(o,{t:"Saving..."}),kz]))],8,Ez)])])])],8,uz)}const Mz=Ye(cz,[["render",Az]]);function K_(t){return t.includes(":")?6:t.includes(".")?4:0}function Iz(t){const e=K_(t);if(!e)throw new Error(`Invalid IP address: ${t}`);let n=0n,i=0n;const s=Object.create(null);if(e===4)for(const r of t.split(".").map(BigInt).reverse())n+=r*2n**i,i+=8n;else{if(t.includes(".")&&(s.ipv4mapped=!0,t=t.split(":").map(a=>{if(a.includes(".")){const[l,c,u,d]=a.split(".").map(h=>Number(h).toString(16).padStart(2,"0"));return`${l}${c}:${u}${d}`}else return a}).join(":")),t.includes("%")){let a;[,t,a]=/(.+)%(.+)/.exec(t),s.scopeid=a}const r=t.split(":"),o=r.indexOf("");if(o!==-1)for(;r.length<8;)r.splice(o,0,"");for(const a of r.map(l=>BigInt(parseInt(l||0,16))).reverse())n+=a*2n**i,i+=16n}return s.number=n,s.version=e,s}const Ib={4:32,6:128},Pz=t=>t.includes("/")?K_(t):0;function Rz(t){const e=Pz(t),n=Object.create(null);if(n.single=!1,e)n.cidr=t,n.version=e;else{const d=K_(t);if(d)n.cidr=`${t}/${Ib[d]}`,n.version=d,n.single=!0;else throw new Error(`Network is not a CIDR or IP: ${t}`)}const[i,s]=n.cidr.split("/");n.prefix=s;const{number:r,version:o}=Iz(i),a=Ib[o],l=r.toString(2).padStart(a,"0"),c=Number(a-s),u=l.substring(0,a-c);return n.start=BigInt(`0b${u}${"0".repeat(c)}`),n.end=BigInt(`0b${u}${"1".repeat(c)}`),n}/*! SPDX-License-Identifier: GPL-2.0 * * Copyright (C) 2015-2020 Jason A. Donenfeld . All Rights Reserved. - */(function(){function t(x){var w=new Float64Array(16);if(x)for(var S=0;S>16&1),T[E-1]&=65535;T[15]=M[15]-32767-(T[14]>>16&1),S=T[15]>>16&1,T[14]&=65535,s(M,T,1-S)}for(var E=0;E<16;++E)x[2*E]=M[E]&255,x[2*E+1]=M[E]>>8}function n(x){for(var w=0;w<16;++w)x[(w+1)%16]+=(w<15?1:38)*Math.floor(x[w]/65536),x[w]&=65535}function s(x,w,S){for(var T,M=~(S-1),E=0;E<16;++E)T=M&(x[E]^w[E]),x[E]^=T,w[E]^=T}function i(x,w,S){for(var T=0;T<16;++T)x[T]=w[T]+S[T]|0}function o(x,w,S){for(var T=0;T<16;++T)x[T]=w[T]-S[T]|0}function r(x,w,S){for(var T=new Float64Array(31),M=0;M<16;++M)for(var E=0;E<16;++E)T[M+E]+=w[M]*S[E];for(var M=0;M<15;++M)T[M]+=38*T[M+16];for(var M=0;M<16;++M)x[M]=T[M];n(x),n(x)}function a(x,w){for(var S=t(),T=0;T<16;++T)S[T]=w[T];for(var T=253;T>=0;--T)r(S,S,S),T!==2&&T!==4&&r(S,S,w);for(var T=0;T<16;++T)x[T]=S[T]}function l(x){x[31]=x[31]&127|64,x[0]&=248}function c(x){for(var w,S=new Uint8Array(32),T=t([1]),M=t([9]),E=t(),V=t([1]),X=t(),le=t(),Y=t([56129,1]),R=t([9]),I=0;I<32;++I)S[I]=x[I];l(S);for(var I=254;I>=0;--I)w=S[I>>>3]>>>(I&7)&1,s(T,M,w),s(E,V,w),i(X,T,E),o(T,T,E),i(E,M,V),o(M,M,V),r(V,X,X),r(le,T,T),r(T,E,T),r(E,M,X),i(X,T,E),o(T,T,E),r(M,T,T),o(E,V,le),r(T,E,Y),i(T,T,V),r(E,E,T),r(T,V,le),r(V,M,R),r(M,X,X),s(T,M,w),s(E,V,w);return a(E,E),r(T,T,E),e(S,T),S}function u(){var x=new Uint8Array(32);return window.crypto.getRandomValues(x),x}function d(){var x=u();return l(x),x}function f(x,w){for(var S=Uint8Array.from([w[0]>>2&63,(w[0]<<4|w[1]>>4)&63,(w[1]<<2|w[2]>>6)&63,w[2]&63]),T=0;T<4;++T)x[T]=S[T]+65+(25-S[T]>>8&6)-(51-S[T]>>8&75)-(61-S[T]>>8&15)+(62-S[T]>>8&3)}function g(x){var w,S=new Uint8Array(44);for(w=0;w<32/3;++w)f(S.subarray(w*4),x.subarray(w*3));return f(S.subarray(w*4),Uint8Array.from([x[w*3+0],x[w*3+1],0])),S[43]=61,String.fromCharCode.apply(null,S)}function _(x){let w=window.atob(x),S=w.length,T=new Uint8Array(S);for(let E=0;E>>8&255,w>>>16&255,w>>>24&255)}function y(x,w){x.push(w&255,w>>>8&255)}function v(x,w){for(var S=0;S>>1:w>>>1;A.table[S]=w}}for(var M=-1,E=0;E>>8^A.table[(M^x[E])&255];return(M^-1)>>>0}function D(x){for(var w=[],S=[],T=0,M=0;M{t.status?(this.success=!0,await this.store.getConfigurations(),this.$router.push(`/configuration/${this.newConfiguration.ConfigurationName}/peers`)):(this.error=!0,this.errorMessage=t.message,document.querySelector(`#${t.data}`).classList.remove("is-valid"),document.querySelector(`#${t.data}`).classList.add("is-invalid"),this.loading=!1)}))}},computed:{goodToSubmit(){let t=["ConfigurationName","Address","ListenPort","PrivateKey"],e=[...document.querySelectorAll("input[required]")];return t.find(n=>this.newConfiguration[n].length===0)===void 0&&e.find(n=>n.classList.contains("is-invalid"))===void 0}},watch:{"newConfiguration.Address"(t){let e=document.querySelector("#Address");e.classList.remove("is-invalid","is-valid");try{if(t.trim().split("/").filter(i=>i.length>0).length!==2)throw Error();let n=dN(t),s=n.end-n.start;this.numberOfAvailableIPs=s.toLocaleString(),e.classList.add("is-valid")}catch{this.numberOfAvailableIPs="0",e.classList.add("is-invalid")}},"newConfiguration.ListenPort"(t){let e=document.querySelector("#ListenPort");e.classList.remove("is-invalid","is-valid"),t<0||t>65353||!Number.isInteger(t)?e.classList.add("is-invalid"):e.classList.add("is-valid")},"newConfiguration.ConfigurationName"(t){let e=document.querySelector("#ConfigurationName");e.classList.remove("is-invalid","is-valid"),!/^[a-zA-Z0-9_=+.-]{1,15}$/.test(t)||t.length===0||this.store.Configurations.find(n=>n.Name===t)?e.classList.add("is-invalid"):e.classList.add("is-valid")},"newConfiguration.PrivateKey"(t){let e=document.querySelector("#PrivateKey");e.classList.remove("is-invalid","is-valid");try{wireguard.generatePublicKey(t),e.classList.add("is-valid")}catch{e.classList.add("is-invalid")}}}},fN={class:"mt-5"},pN={class:"container mb-4"},gN={class:"mb-4 d-flex align-items-center gap-4"},mN={class:"mb-0 text-body"},_N=h("i",{class:"bi bi-chevron-left me-4"},null,-1),bN={class:"card rounded-3 shadow"},vN={class:"card-header"},yN={class:"card-body"},wN=["disabled"],xN={class:"invalid-feedback"},kN={key:0},SN={key:1},$N={class:"mb-0"},AN={class:"card rounded-3 shadow"},CN={class:"card-header"},EN={class:"card-body",style:{"font-family":"var(--bs-font-monospace)"}},TN={class:"mb-2"},PN={class:"text-muted fw-bold mb-1"},MN={class:"input-group"},DN=["disabled"],ON=h("i",{class:"bi bi-arrow-repeat"},null,-1),IN=[ON],LN={class:"text-muted fw-bold mb-1"},RN={class:"card rounded-3 shadow"},NN={class:"card-header"},FN={class:"card-body"},BN=["disabled"],VN={class:"invalid-feedback"},HN={key:0},jN={key:1},WN={class:"card rounded-3 shadow"},zN={class:"card-header d-flex align-items-center"},KN={class:"badge rounded-pill text-bg-success ms-auto"},YN={class:"card-body"},UN=["disabled"],qN={class:"invalid-feedback"},GN={key:0},JN={key:1},XN=h("hr",null,null,-1),QN={class:"accordion",id:"newConfigurationOptionalAccordion"},ZN={class:"accordion-item"},e5={class:"accordion-header"},t5={class:"accordion-button collapsed",type:"button","data-bs-toggle":"collapse","data-bs-target":"#newConfigurationOptionalAccordionCollapse"},n5={id:"newConfigurationOptionalAccordionCollapse",class:"accordion-collapse collapse","data-bs-parent":"#newConfigurationOptionalAccordion"},s5={class:"accordion-body d-flex flex-column gap-3"},i5={class:"card rounded-3"},o5=h("div",{class:"card-header"},"PreUp",-1),r5={class:"card-body"},a5={class:"card rounded-3"},l5=h("div",{class:"card-header"},"PreDown",-1),c5={class:"card-body"},u5={class:"card rounded-3"},d5=h("div",{class:"card-header"},"PostUp",-1),h5={class:"card-body"},f5={class:"card rounded-3"},p5=h("div",{class:"card-header"},"PostDown",-1),g5={class:"card-body"},m5=["disabled"],_5={key:0,class:"d-flex w-100"},b5=h("i",{class:"bi bi-check-circle-fill ms-2"},null,-1),v5={key:1,class:"d-flex w-100"},y5=h("i",{class:"bi bi-save-fill ms-2"},null,-1),w5={key:2,class:"d-flex w-100 align-items-center"},x5=h("span",{class:"ms-2 spinner-border spinner-border-sm",role:"status"},null,-1);function k5(t,e,n,s,i,o){const r=ke("LocaleText"),a=ke("RouterLink");return C(),F("div",fN,[h("div",pN,[h("div",gN,[N(a,{to:"/",class:"text-decoration-none"},{default:Pe(()=>[h("h3",mN,[_N,N(r,{t:"New Configuration"})])]),_:1})]),h("form",{class:"text-body d-flex flex-column gap-3",onSubmit:e[10]||(e[10]=l=>{l.preventDefault(),this.saveNewConfiguration()})},[h("div",bN,[h("div",vN,[N(r,{t:"Configuration Name"})]),h("div",yN,[Le(h("input",{type:"text",class:"form-control",placeholder:"ex. wg1",id:"ConfigurationName","onUpdate:modelValue":e[0]||(e[0]=l=>this.newConfiguration.ConfigurationName=l),disabled:this.loading,required:""},null,8,wN),[[We,this.newConfiguration.ConfigurationName]]),h("div",xN,[this.error?(C(),F("div",kN,xe(this.errorMessage),1)):(C(),F("div",SN,[N(r,{t:"Configuration name is invalid. Possible reasons:"}),h("ul",$N,[h("li",null,[N(r,{t:"Configuration name already exist."})]),h("li",null,[N(r,{t:"Configuration name can only contain 15 lower/uppercase alphabet, numbers, underscore, equal sign, plus sign, period and hyphen."})])])]))])])]),h("div",AN,[h("div",CN,[N(r,{t:"Private Key"}),He(" & "),N(r,{t:"Public Key"})]),h("div",EN,[h("div",TN,[h("label",PN,[h("small",null,[N(r,{t:"Private Key"})])]),h("div",MN,[Le(h("input",{type:"text",class:"form-control",id:"PrivateKey",required:"",disabled:this.loading,"onUpdate:modelValue":e[1]||(e[1]=l=>this.newConfiguration.PrivateKey=l)},null,8,DN),[[We,this.newConfiguration.PrivateKey]]),h("button",{class:"btn btn-outline-primary",type:"button",title:"Regenerate Private Key",onClick:e[2]||(e[2]=l=>o.wireguardGenerateKeypair())},IN)])]),h("div",null,[h("label",LN,[h("small",null,[N(r,{t:"Public Key"})])]),Le(h("input",{type:"text",class:"form-control",id:"PublicKey","onUpdate:modelValue":e[3]||(e[3]=l=>this.newConfiguration.PublicKey=l),disabled:""},null,512),[[We,this.newConfiguration.PublicKey]])])])]),h("div",RN,[h("div",NN,[N(r,{t:"Listen Port"})]),h("div",FN,[Le(h("input",{type:"number",class:"form-control",placeholder:"0-65353",id:"ListenPort",min:"1",max:"65353","onUpdate:modelValue":e[4]||(e[4]=l=>this.newConfiguration.ListenPort=l),disabled:this.loading,required:""},null,8,BN),[[We,this.newConfiguration.ListenPort]]),h("div",VN,[this.error?(C(),F("div",HN,xe(this.errorMessage),1)):(C(),F("div",jN,[N(r,{t:"Invalid port"})]))])])]),h("div",WN,[h("div",zN,[N(r,{t:"IP Address/CIDR"}),h("span",KN,xe(i.numberOfAvailableIPs)+" Available IPs",1)]),h("div",YN,[Le(h("input",{type:"text",class:"form-control",placeholder:"Ex: 10.0.0.1/24",id:"Address","onUpdate:modelValue":e[5]||(e[5]=l=>this.newConfiguration.Address=l),disabled:this.loading,required:""},null,8,UN),[[We,this.newConfiguration.Address]]),h("div",qN,[this.error?(C(),F("div",GN,xe(this.errorMessage),1)):(C(),F("div",JN," IP Address/CIDR is invalid "))])])]),XN,h("div",QN,[h("div",ZN,[h("h2",e5,[h("button",t5,[N(r,{t:"Optional Settings"})])]),h("div",n5,[h("div",s5,[h("div",i5,[o5,h("div",r5,[Le(h("input",{type:"text",class:"form-control",id:"preUp","onUpdate:modelValue":e[6]||(e[6]=l=>this.newConfiguration.PreUp=l)},null,512),[[We,this.newConfiguration.PreUp]])])]),h("div",a5,[l5,h("div",c5,[Le(h("input",{type:"text",class:"form-control",id:"preDown","onUpdate:modelValue":e[7]||(e[7]=l=>this.newConfiguration.PreDown=l)},null,512),[[We,this.newConfiguration.PreDown]])])]),h("div",u5,[d5,h("div",h5,[Le(h("input",{type:"text",class:"form-control",id:"postUp","onUpdate:modelValue":e[8]||(e[8]=l=>this.newConfiguration.PostUp=l)},null,512),[[We,this.newConfiguration.PostUp]])])]),h("div",f5,[p5,h("div",g5,[Le(h("input",{type:"text",class:"form-control",id:"postDown","onUpdate:modelValue":e[9]||(e[9]=l=>this.newConfiguration.PostDown=l)},null,512),[[We,this.newConfiguration.PostDown]])])])])])])]),h("button",{class:"btn btn-dark btn-brand rounded-3 px-3 py-2 shadow ms-auto",disabled:!this.goodToSubmit||this.loading||this.success},[this.success?(C(),F("span",_5,[N(r,{t:"Success"}),He("! "),b5])):this.loading?(C(),F("span",w5,[N(r,{t:"Saving..."}),x5])):(C(),F("span",v5,[N(r,{t:"Save Configuration"}),y5]))],8,m5)],32)])])}const S5=je(hN,[["render",k5]]),$5={name:"configuration"},A5={class:"mt-md-5 mt-3 text-body"};function C5(t,e,n,s,i,o){const r=ke("RouterView");return C(),F("div",A5,[N(r,null,{default:Pe(({Component:a,route:l})=>[N(Et,{name:"fade2",mode:"out-in"},{default:Pe(()=>[(C(),Se(Wh,null,{default:Pe(()=>[(C(),Se(To(a),{key:l.path}))]),_:2},1024))]),_:2},1024)]),_:1})])}const E5=je($5,[["render",C5]]),T5={name:"peerSearch",components:{LocaleText:Ge},setup(){const t=Xe(),e=Pn();return{store:t,wireguardConfigurationStore:e}},props:{configuration:Object},data(){return{sort:{status:dt("Status"),name:dt("Name"),allowed_ip:dt("Allowed IPs"),restricted:dt("Restricted")},interval:{5e3:dt("5 Seconds"),1e4:dt("10 Seconds"),3e4:dt("30 Seconds"),6e4:dt("1 Minutes")},searchString:"",searchStringTimeout:void 0,showDisplaySettings:!1,showMoreSettings:!1}},methods:{debounce(){this.searchStringTimeout?(clearTimeout(this.searchStringTimeout),this.searchStringTimeout=setTimeout(()=>{this.wireguardConfigurationStore.searchString=this.searchString},300)):this.searchStringTimeout=setTimeout(()=>{this.wireguardConfigurationStore.searchString=this.searchString},300)},updateSort(t){ht("/api/updateDashboardConfigurationItem",{section:"Server",key:"dashboard_sort",value:t},e=>{e.status&&this.store.getConfiguration()})},updateRefreshInterval(t){ht("/api/updateDashboardConfigurationItem",{section:"Server",key:"dashboard_refresh_interval",value:t},e=>{e.status&&this.store.getConfiguration()})},downloadAllPeer(){kt(`/api/downloadAllPeers/${this.configuration.Name}`,{},t=>{console.log(t),window.wireguard.generateZipFiles(t,this.configuration.Name)})}},computed:{searchBarPlaceholder(){return dt("Search Peers...")}}},Qc=t=>(qt("data-v-c8fa0b7d"),t=t(),Gt(),t),P5={class:"mb-3"},M5={class:"d-flex gap-2 z-3 peerSearchContainer"},D5=Qc(()=>h("i",{class:"bi bi-plus-lg me-2"},null,-1)),O5=Qc(()=>h("i",{class:"bi bi-download me-2"},null,-1)),I5={class:"mt-3 mt-md-0 flex-grow-1"},L5=["placeholder"],R5=Qc(()=>h("i",{class:"bi bi-filter-circle me-2"},null,-1)),N5=Qc(()=>h("i",{class:"bi bi-three-dots"},null,-1)),F5=[N5],B5={key:0,class:"peerSettingContainer w-100 h-100 position-absolute top-0 start-0 overflow-y-scroll displayModal"},V5={class:"container-md d-flex h-100 w-100"},H5={class:"m-auto modal-dialog-centered dashboardModal"},j5={class:"card rounded-3 shadow w-100"},W5={class:"card-header bg-transparent d-flex align-items-center gap-2 border-0 p-4 pb-2"},z5={class:"mb-0 fw-normal"},K5={class:"card-body px-4 pb-4 d-flex gap-3 flex-column"},Y5={class:"text-muted fw-bold mb-2"},U5={class:"list-group"},q5=["onClick"],G5={class:"me-auto"},J5={key:0,class:"bi bi-check text-primary"},X5={class:"text-muted fw-bold mb-2"},Q5={class:"list-group"},Z5=["onClick"],eF={class:"me-auto"},tF={key:0,class:"bi bi-check text-primary"},nF={key:0,class:"peerSettingContainer w-100 h-100 position-absolute top-0 start-0 overflow-y-scroll displayModal"},sF={class:"container-md d-flex h-100 w-100"},iF={class:"m-auto modal-dialog-centered dashboardModal"},oF={class:"card rounded-3 shadow w-100"},rF={class:"card-header bg-transparent d-flex align-items-center gap-2 border-0 p-4 pb-2"},aF={class:"mb-0 fw-normal"},lF={class:"card-body px-4 pb-4 d-flex gap-3 flex-column"},cF={class:"text-muted fw-bold mb-2"},uF={class:"list-group"};function dF(t,e,n,s,i,o){const r=ke("LocaleText"),a=ke("RouterLink");return C(),F("div",P5,[h("div",M5,[N(a,{to:"create",class:"text-decoration-none btn text-primary-emphasis bg-primary-subtle rounded-3 border-1 border-primary-subtle shadow-sm"},{default:Pe(()=>[D5,N(r,{t:"Peer"})]),_:1}),h("button",{class:"btn text-primary-emphasis bg-primary-subtle rounded-3 border-1 border-primary-subtle shadow-sm",onClick:e[0]||(e[0]=l=>this.downloadAllPeer())},[O5,N(r,{t:"Download All"})]),h("div",I5,[Le(h("input",{class:"form-control rounded-3 bg-secondary-subtle border-1 border-secondary-subtle shadow-sm w-100",placeholder:o.searchBarPlaceholder,id:"searchPeers",onKeyup:e[1]||(e[1]=l=>this.debounce()),"onUpdate:modelValue":e[2]||(e[2]=l=>this.searchString=l)},null,40,L5),[[We,this.searchString]])]),h("button",{onClick:e[3]||(e[3]=l=>this.showDisplaySettings=!0),class:"btn text-secondary-emphasis bg-secondary-subtle rounded-3 border-1 border-secondary-subtle shadow-sm",type:"button","aria-expanded":"false"},[R5,N(r,{t:"Display"})]),h("button",{class:"btn text-secondary-emphasis bg-secondary-subtle rounded-3 border-1 border-secondary-subtle shadow-sm",onClick:e[4]||(e[4]=l=>this.showMoreSettings=!0),type:"button","aria-expanded":"false"},F5),N(Et,{name:"zoom"},{default:Pe(()=>[this.showDisplaySettings?(C(),F("div",B5,[h("div",V5,[h("div",H5,[h("div",j5,[h("div",W5,[h("h4",z5,[N(r,{t:"Display"})]),h("button",{type:"button",class:"btn-close ms-auto",onClick:e[5]||(e[5]=l=>this.showDisplaySettings=!1)})]),h("div",K5,[h("div",null,[h("p",Y5,[h("small",null,[N(r,{t:"Sort by"})])]),h("div",U5,[(C(!0),F(Me,null,Ke(this.sort,(l,c)=>(C(),F("a",{class:"list-group-item list-group-item-action d-flex",role:"button",onClick:u=>this.updateSort(c)},[h("span",G5,xe(l),1),s.store.Configuration.Server.dashboard_sort===c?(C(),F("i",J5)):re("",!0)],8,q5))),256))])]),h("div",null,[h("p",X5,[h("small",null,[N(r,{t:"Refresh Interval"})])]),h("div",Q5,[(C(!0),F(Me,null,Ke(this.interval,(l,c)=>(C(),F("a",{class:"list-group-item list-group-item-action d-flex",role:"button",onClick:u=>this.updateRefreshInterval(c)},[h("span",eF,xe(l),1),s.store.Configuration.Server.dashboard_refresh_interval===c?(C(),F("i",tF)):re("",!0)],8,Z5))),256))])])])])])])])):re("",!0)]),_:1}),N(Et,{name:"zoom"},{default:Pe(()=>[this.showMoreSettings?(C(),F("div",nF,[h("div",sF,[h("div",iF,[h("div",oF,[h("div",rF,[h("h4",aF,[N(r,{t:"Configuration Settings"})]),h("button",{type:"button",class:"btn-close ms-auto",onClick:e[6]||(e[6]=l=>this.showMoreSettings=!1)})]),h("div",lF,[h("div",null,[h("p",cF,[h("small",null,[N(r,{t:"Peer Jobs"})])]),h("div",uF,[h("a",{class:"list-group-item list-group-item-action d-flex",role:"button",onClick:e[7]||(e[7]=l=>this.$emit("jobsAll"))},[N(r,{t:"Active Jobs"})]),h("a",{class:"list-group-item list-group-item-action d-flex",role:"button",onClick:e[8]||(e[8]=l=>this.$emit("jobLogs"))},[N(r,{t:"Logs"})])])])])])])])])):re("",!0)]),_:1})])])}const hF=je(T5,[["render",dF],["__scopeId","data-v-c8fa0b7d"]]);function fF(t){return Dc()?(Ph(t),!0):!1}function t0(t){return typeof t=="function"?t():G(t)}const n0=typeof window<"u"&&typeof document<"u";typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const pF=Object.prototype.toString,gF=t=>pF.call(t)==="[object Object]",Zl=()=>{},mF=_F();function _F(){var t,e;return n0&&((t=window?.navigator)==null?void 0:t.userAgent)&&(/iP(ad|hone|od)/.test(window.navigator.userAgent)||((e=window?.navigator)==null?void 0:e.maxTouchPoints)>2&&/iPad|Macintosh/.test(window?.navigator.userAgent))}function ta(t){var e;const n=t0(t);return(e=n?.$el)!=null?e:n}const s0=n0?window:void 0;function ed(...t){let e,n,s,i;if(typeof t[0]=="string"||Array.isArray(t[0])?([n,s,i]=t,e=s0):[e,n,s,i]=t,!e)return Zl;Array.isArray(n)||(n=[n]),Array.isArray(s)||(s=[s]);const o=[],r=()=>{o.forEach(u=>u()),o.length=0},a=(u,d,f,g)=>(u.addEventListener(d,f,g),()=>u.removeEventListener(d,f,g)),l=Ht(()=>[ta(e),t0(i)],([u,d])=>{if(r(),!u)return;const f=gF(d)?{...d}:d;o.push(...n.flatMap(g=>s.map(_=>a(u,g,_,f))))},{immediate:!0,flush:"post"}),c=()=>{l(),r()};return fF(c),c}let wm=!1;function bF(t,e,n={}){const{window:s=s0,ignore:i=[],capture:o=!0,detectIframe:r=!1}=n;if(!s)return Zl;mF&&!wm&&(wm=!0,Array.from(s.document.body.children).forEach(f=>f.addEventListener("click",Zl)),s.document.documentElement.addEventListener("click",Zl));let a=!0;const l=f=>i.some(g=>{if(typeof g=="string")return Array.from(s.document.querySelectorAll(g)).some(_=>_===f.target||f.composedPath().includes(_));{const _=ta(g);return _&&(f.target===_||f.composedPath().includes(_))}}),u=[ed(s,"click",f=>{const g=ta(t);if(!(!g||g===f.target||f.composedPath().includes(g))){if(f.detail===0&&(a=!l(f)),!a){a=!0;return}e(f)}},{passive:!0,capture:o}),ed(s,"pointerdown",f=>{const g=ta(t);a=!l(f)&&!!(g&&!f.composedPath().includes(g))},{passive:!0}),r&&ed(s,"blur",f=>{setTimeout(()=>{var g;const _=ta(t);((g=s.document.activeElement)==null?void 0:g.tagName)==="IFRAME"&&!_?.contains(s.document.activeElement)&&e(f)},0)})].filter(Boolean);return()=>u.forEach(f=>f())}const vF={name:"peerSettingsDropdown",components:{LocaleText:Ge},setup(){return{dashboardStore:Xe()}},props:{Peer:Object},data(){return{deleteBtnDisabled:!1,restrictBtnDisabled:!1,allowAccessBtnDisabled:!1}},methods:{downloadPeer(){kt("/api/downloadPeer/"+this.$route.params.id,{id:this.Peer.id},t=>{if(t.status){const e=new Blob([t.data.file],{type:"text/plain"}),n=URL.createObjectURL(e),s=`${t.data.fileName}.conf`,i=document.createElement("a");i.href=n,i.download=s,i.click(),this.dashboardStore.newMessage("WGDashboard","Peer download started","success")}else this.dashboardStore.newMessage("Server",t.message,"danger")})},downloadQRCode(){kt("/api/downloadPeer/"+this.$route.params.id,{id:this.Peer.id},t=>{t.status?this.$emit("qrcode",t.data.file):this.dashboardStore.newMessage("Server",t.message,"danger")})},deletePeer(){this.deleteBtnDisabled=!0,ht(`/api/deletePeers/${this.$route.params.id}`,{peers:[this.Peer.id]},t=>{this.dashboardStore.newMessage("Server",t.message,t.status?"success":"danger"),this.$emit("refresh"),this.deleteBtnDisabled=!1})},restrictPeer(){this.restrictBtnDisabled=!0,ht(`/api/restrictPeers/${this.$route.params.id}`,{peers:[this.Peer.id]},t=>{this.dashboardStore.newMessage("Server",t.message,t.status?"success":"danger"),this.$emit("refresh"),this.restrictBtnDisabled=!1})},allowAccessPeer(){this.allowAccessBtnDisabled=!0,ht(`/api/allowAccessPeers/${this.$route.params.id}`,{peers:[this.Peer.id]},t=>{this.dashboardStore.newMessage("Server",t.message,t.status?"success":"danger"),this.$emit("refresh"),this.allowAccessBtnDisabled=!1})}}},Ps=t=>(qt("data-v-e53c14b2"),t=t(),Gt(),t),yF={class:"dropdown-menu mt-2 shadow-lg d-block rounded-3",style:{"max-width":"200px"}},wF={key:0},xF={class:"w-100 dropdown-item text-muted",style:{"white-space":"break-spaces","font-size":"0.7rem"}},kF={key:1,class:"d-flex",style:{"padding-left":"var(--bs-dropdown-item-padding-x)","padding-right":"var(--bs-dropdown-item-padding-x)"}},SF=Ps(()=>h("i",{class:"me-auto bi bi-download"},null,-1)),$F=[SF],AF=Ps(()=>h("i",{class:"me-auto bi bi-qr-code"},null,-1)),CF=[AF],EF=Ps(()=>h("i",{class:"me-auto bi bi-share"},null,-1)),TF=[EF],PF=Ps(()=>h("li",null,[h("hr",{class:"dropdown-divider"})],-1)),MF=Ps(()=>h("i",{class:"me-auto bi bi-pen"},null,-1)),DF=Ps(()=>h("i",{class:"me-auto bi bi-app-indicator"},null,-1)),OF=Ps(()=>h("li",null,[h("hr",{class:"dropdown-divider"})],-1)),IF=Ps(()=>h("i",{class:"me-auto bi bi-lock"},null,-1)),LF=Ps(()=>h("i",{class:"me-auto bi bi-trash"},null,-1)),RF={key:1},NF=Ps(()=>h("i",{class:"me-auto bi bi-unlock"},null,-1));function FF(t,e,n,s,i,o){const r=ke("LocaleText");return C(),F("ul",yF,[this.Peer.restricted?(C(),F("li",RF,[h("a",{class:Ee(["dropdown-item d-flex text-warning",{disabled:this.allowAccessBtnDisabled}]),onClick:e[7]||(e[7]=a=>this.allowAccessPeer()),role:"button"},[NF,this.allowAccessBtnDisabled?(C(),Se(r,{key:1,t:"Allowing Access..."})):(C(),Se(r,{key:0,t:"Allow Access"}))],2)])):(C(),F(Me,{key:0},[this.Peer.private_key?(C(),F("li",kF,[h("a",{class:"dropdown-item text-center px-0 rounded-3",role:"button",onClick:e[0]||(e[0]=a=>this.downloadPeer())},$F),h("a",{class:"dropdown-item text-center px-0 rounded-3",role:"button",onClick:e[1]||(e[1]=a=>this.downloadQRCode())},CF),h("a",{class:"dropdown-item text-center px-0 rounded-3",role:"button",onClick:e[2]||(e[2]=a=>this.$emit("share"))},TF)])):(C(),F("li",wF,[h("small",xF,[N(r,{t:"Download & QR Code is not available due to no private key set for this peer"})])])),PF,h("li",null,[h("a",{class:"dropdown-item d-flex",role:"button",onClick:e[3]||(e[3]=a=>this.$emit("setting"))},[MF,He(),N(r,{t:"Peer Settings"})])]),h("li",null,[h("a",{class:"dropdown-item d-flex",role:"button",onClick:e[4]||(e[4]=a=>this.$emit("jobs"))},[DF,He(),N(r,{t:"Schedule Jobs"})])]),OF,h("li",null,[h("a",{class:Ee(["dropdown-item d-flex text-warning",{disabled:this.restrictBtnDisabled}]),onClick:e[5]||(e[5]=a=>this.restrictPeer()),role:"button"},[IF,this.restrictBtnDisabled?(C(),Se(r,{key:1,t:"Restricting..."})):(C(),Se(r,{key:0,t:"Restrict Access"}))],2)]),h("li",null,[h("a",{class:Ee(["dropdown-item d-flex fw-bold text-danger",{disabled:this.deleteBtnDisabled}]),onClick:e[6]||(e[6]=a=>this.deletePeer()),role:"button"},[LF,this.deleteBtnDisabled?(C(),Se(r,{key:1,t:"Deleting..."})):(C(),Se(r,{key:0,t:"Delete"}))],2)])],64))])}const BF=je(vF,[["render",FF],["__scopeId","data-v-e53c14b2"]]),VF={name:"peer",components:{LocaleText:Ge,PeerSettingsDropdown:BF},props:{Peer:Object},data(){return{}},setup(){const t=be(null),e=be(!1);return bF(t,n=>{e.value=!1}),{target:t,subMenuOpened:e}},computed:{getLatestHandshake(){return this.Peer.latest_handshake.includes(",")?this.Peer.latest_handshake.split(",")[0]:this.Peer.latest_handshake}}},Qa=t=>(qt("data-v-4a343fe2"),t=t(),Gt(),t),HF={key:0,class:"card-header bg-transparent d-flex align-items-center gap-2 border-0"},jF={style:{"font-size":"0.8rem"},class:"ms-auto d-flex gap-2"},WF={class:"text-primary"},zF=Qa(()=>h("i",{class:"bi bi-arrow-down"},null,-1)),KF={class:"text-success"},YF=Qa(()=>h("i",{class:"bi bi-arrow-up"},null,-1)),UF={key:0,class:"text-secondary"},qF=Qa(()=>h("i",{class:"bi bi-arrows-angle-contract"},null,-1)),GF={key:1,class:"border-0 card-header bg-transparent text-warning fw-bold",style:{"font-size":"0.8rem"}},JF=Qa(()=>h("i",{class:"bi-lock-fill me-2"},null,-1)),XF={class:"card-body pt-1",style:{"font-size":"0.9rem"}},QF={class:"mb-2"},ZF={class:"text-muted"},eB={class:"mb-0"},tB={class:"d-flex align-items-end"},nB={class:"text-muted"},sB={class:"mb-0"},iB=Qa(()=>h("h5",{class:"mb-0"},[h("i",{class:"bi bi-three-dots"})],-1)),oB=[iB];function rB(t,e,n,s,i,o){const r=ke("LocaleText"),a=ke("PeerSettingsDropdown");return C(),F("div",{class:Ee(["card shadow-sm rounded-3 peerCard bg-transparent",{"border-warning":n.Peer.restricted}])},[h("div",null,[n.Peer.restricted?(C(),F("div",GF,[JF,N(r,{t:"Access Restricted"})])):(C(),F("div",HF,[h("div",{class:Ee(["dot ms-0",{active:n.Peer.status==="running"}])},null,2),h("div",jF,[h("span",WF,[zF,h("strong",null,xe((n.Peer.cumu_receive+n.Peer.total_receive).toFixed(4)),1),He(" GB ")]),h("span",KF,[YF,h("strong",null,xe((n.Peer.cumu_sent+n.Peer.total_sent).toFixed(4)),1),He(" GB ")]),n.Peer.latest_handshake!=="No Handshake"?(C(),F("span",UF,[qF,He(" "+xe(o.getLatestHandshake)+" ago ",1)])):re("",!0)])]))]),h("div",XF,[h("h6",null,xe(n.Peer.name?n.Peer.name:"Untitled Peer"),1),h("div",QF,[h("small",ZF,[N(r,{t:"Public Key"})]),h("p",eB,[h("samp",null,xe(n.Peer.id),1)])]),h("div",tB,[h("div",null,[h("small",nB,[N(r,{t:"Allowed IPs"})]),h("p",sB,[h("samp",null,xe(n.Peer.allowed_ip),1)])]),h("div",{class:Ee(["ms-auto px-2 rounded-3 subMenuBtn",{active:this.subMenuOpened}])},[h("a",{role:"button",class:"text-body",onClick:e[0]||(e[0]=l=>this.subMenuOpened=!0)},oB),N(Et,{name:"slide-fade"},{default:Pe(()=>[this.subMenuOpened?(C(),Se(a,{key:0,onQrcode:e[1]||(e[1]=l=>this.$emit("qrcode",l)),onSetting:e[2]||(e[2]=l=>this.$emit("setting")),onJobs:e[3]||(e[3]=l=>this.$emit("jobs")),onRefresh:e[4]||(e[4]=l=>this.$emit("refresh")),onShare:e[5]||(e[5]=l=>this.$emit("share")),Peer:n.Peer,ref:"target"},null,8,["Peer"])):re("",!0)]),_:1})],2)])])],2)}const aB=je(VF,[["render",rB],["__scopeId","data-v-4a343fe2"]]);/*! + */(function(){function t(w){var x=new Float64Array(16);if(w)for(var T=0;T>16&1),k[P-1]&=65535;k[15]=A[15]-32767-(k[14]>>16&1),T=k[15]>>16&1,k[14]&=65535,i(A,k,1-T)}for(var P=0;P<16;++P)w[2*P]=A[P]&255,w[2*P+1]=A[P]>>8}function n(w){for(var x=0;x<16;++x)w[(x+1)%16]+=(x<15?1:38)*Math.floor(w[x]/65536),w[x]&=65535}function i(w,x,T){for(var k,A=~(T-1),P=0;P<16;++P)k=A&(w[P]^x[P]),w[P]^=k,x[P]^=k}function s(w,x,T){for(var k=0;k<16;++k)w[k]=x[k]+T[k]|0}function r(w,x,T){for(var k=0;k<16;++k)w[k]=x[k]-T[k]|0}function o(w,x,T){for(var k=new Float64Array(31),A=0;A<16;++A)for(var P=0;P<16;++P)k[A+P]+=x[A]*T[P];for(var A=0;A<15;++A)k[A]+=38*k[A+16];for(var A=0;A<16;++A)w[A]=k[A];n(w),n(w)}function a(w,x){for(var T=t(),k=0;k<16;++k)T[k]=x[k];for(var k=253;k>=0;--k)o(T,T,T),k!==2&&k!==4&&o(T,T,x);for(var k=0;k<16;++k)w[k]=T[k]}function l(w){w[31]=w[31]&127|64,w[0]&=248}function c(w){for(var x,T=new Uint8Array(32),k=t([1]),A=t([9]),P=t(),F=t([1]),H=t(),te=t(),N=t([56129,1]),L=t([9]),I=0;I<32;++I)T[I]=w[I];l(T);for(var I=254;I>=0;--I)x=T[I>>>3]>>>(I&7)&1,i(k,A,x),i(P,F,x),s(H,k,P),r(k,k,P),s(P,A,F),r(A,A,F),o(F,H,H),o(te,k,k),o(k,P,k),o(P,A,H),s(H,k,P),r(k,k,P),o(A,k,k),r(P,F,te),o(k,P,N),s(k,k,F),o(P,P,k),o(k,F,te),o(F,A,L),o(A,H,H),i(k,A,x),i(P,F,x);return a(P,P),o(k,k,P),e(T,k),T}function u(){var w=new Uint8Array(32);return window.crypto.getRandomValues(w),w}function d(){var w=u();return l(w),w}function h(w,x){for(var T=Uint8Array.from([x[0]>>2&63,(x[0]<<4|x[1]>>4)&63,(x[1]<<2|x[2]>>6)&63,x[2]&63]),k=0;k<4;++k)w[k]=T[k]+65+(25-T[k]>>8&6)-(51-T[k]>>8&75)-(61-T[k]>>8&15)+(62-T[k]>>8&3)}function f(w){var x,T=new Uint8Array(44);for(x=0;x<32/3;++x)h(T.subarray(x*4),w.subarray(x*3));return h(T.subarray(x*4),Uint8Array.from([w[x*3+0],w[x*3+1],0])),T[43]=61,String.fromCharCode.apply(null,T)}function p(w){let x=window.atob(w),T=x.length,k=new Uint8Array(T);for(let P=0;P>>8&255,x>>>16&255,x>>>24&255)}function y(w,x){w.push(x&255,x>>>8&255)}function v(w,x){for(var T=0;T>>1:x>>>1;E.table[T]=x}}for(var A=-1,P=0;P>>8^E.table[(A^w[P])&255];return(A^-1)>>>0}function C(w){for(var x=[],T=[],k=0,A=0;A{t.status?(this.success=!0,await this.store.getConfigurations(),this.$router.push(`/configuration/${this.newConfiguration.ConfigurationName}/peers`)):(this.error=!0,this.errorMessage=t.message,document.querySelector(`#${t.data}`).classList.remove("is-valid"),document.querySelector(`#${t.data}`).classList.add("is-invalid"),this.loading=!1)}))}},computed:{goodToSubmit(){let t=["ConfigurationName","Address","ListenPort","PrivateKey"],e=[...document.querySelectorAll("input[required]")];return t.find(n=>this.newConfiguration[n].length===0)===void 0&&e.find(n=>n.classList.contains("is-invalid"))===void 0}},watch:{"newConfiguration.Address"(t){let e=document.querySelector("#Address");e.classList.remove("is-invalid","is-valid");try{if(t.trim().split("/").filter(s=>s.length>0).length!==2)throw Error();let n=Rz(t),i=n.end-n.start;this.numberOfAvailableIPs=i.toLocaleString(),e.classList.add("is-valid")}catch{this.numberOfAvailableIPs="0",e.classList.add("is-invalid")}},"newConfiguration.ListenPort"(t){let e=document.querySelector("#ListenPort");e.classList.remove("is-invalid","is-valid"),t<0||t>65353||!Number.isInteger(t)?e.classList.add("is-invalid"):e.classList.add("is-valid")},"newConfiguration.ConfigurationName"(t){let e=document.querySelector("#ConfigurationName");e.classList.remove("is-invalid","is-valid"),!/^[a-zA-Z0-9_=+.-]{1,15}$/.test(t)||t.length===0||this.store.Configurations.find(n=>n.Name===t)?e.classList.add("is-invalid"):e.classList.add("is-valid")},"newConfiguration.PrivateKey"(t){let e=document.querySelector("#PrivateKey");e.classList.remove("is-invalid","is-valid");try{wireguard.generatePublicKey(t),e.classList.add("is-valid")}catch{e.classList.add("is-invalid")}}}},$z={class:"mt-5"},Lz={class:"container mb-4"},Oz={class:"mb-4 d-flex align-items-center gap-4"},Nz={class:"mb-0 text-body"},Fz=g("i",{class:"bi bi-chevron-left me-4"},null,-1),Bz={class:"card rounded-3 shadow"},Vz={class:"card-header"},zz={class:"card-body"},Wz=["disabled"],Hz={class:"invalid-feedback"},Yz={key:0},jz={key:1},Kz={class:"mb-0"},Uz={class:"card rounded-3 shadow"},Gz={class:"card-header"},Xz={class:"card-body",style:{"font-family":"var(--bs-font-monospace)"}},qz={class:"mb-2"},Zz={class:"text-muted fw-bold mb-1"},Jz={class:"input-group"},Qz=["disabled"],eW=g("i",{class:"bi bi-arrow-repeat"},null,-1),tW=[eW],nW={class:"text-muted fw-bold mb-1"},iW={class:"card rounded-3 shadow"},sW={class:"card-header"},rW={class:"card-body"},oW=["disabled"],aW={class:"invalid-feedback"},lW={key:0},cW={key:1},uW={class:"card rounded-3 shadow"},dW={class:"card-header d-flex align-items-center"},hW={class:"badge rounded-pill text-bg-success ms-auto"},fW={class:"card-body"},gW=["disabled"],pW={class:"invalid-feedback"},mW={key:0},_W={key:1},yW=g("hr",null,null,-1),vW={class:"accordion",id:"newConfigurationOptionalAccordion"},bW={class:"accordion-item"},wW={class:"accordion-header"},xW={class:"accordion-button collapsed",type:"button","data-bs-toggle":"collapse","data-bs-target":"#newConfigurationOptionalAccordionCollapse"},EW={id:"newConfigurationOptionalAccordionCollapse",class:"accordion-collapse collapse","data-bs-parent":"#newConfigurationOptionalAccordion"},SW={class:"accordion-body d-flex flex-column gap-3"},CW={class:"card rounded-3"},TW=g("div",{class:"card-header"},"PreUp",-1),kW={class:"card-body"},AW={class:"card rounded-3"},MW=g("div",{class:"card-header"},"PreDown",-1),IW={class:"card-body"},PW={class:"card rounded-3"},RW=g("div",{class:"card-header"},"PostUp",-1),DW={class:"card-body"},$W={class:"card rounded-3"},LW=g("div",{class:"card-header"},"PostDown",-1),OW={class:"card-body"},NW=["disabled"],FW={key:0,class:"d-flex w-100"},BW=g("i",{class:"bi bi-check-circle-fill ms-2"},null,-1),VW={key:1,class:"d-flex w-100"},zW=g("i",{class:"bi bi-save-fill ms-2"},null,-1),WW={key:2,class:"d-flex w-100 align-items-center"},HW=g("span",{class:"ms-2 spinner-border spinner-border-sm",role:"status"},null,-1);function YW(t,e,n,i,s,r){const o=Se("LocaleText"),a=Se("RouterLink");return D(),V("div",$z,[g("div",Lz,[g("div",Oz,[B(a,{to:"/",class:"text-decoration-none"},{default:Re(()=>[g("h3",Nz,[Fz,B(o,{t:"New Configuration"})])]),_:1})]),g("form",{class:"text-body d-flex flex-column gap-3",onSubmit:e[10]||(e[10]=l=>{l.preventDefault(),this.saveNewConfiguration()})},[g("div",Bz,[g("div",Vz,[B(o,{t:"Configuration Name"})]),g("div",zz,[Ne(g("input",{type:"text",class:"form-control",placeholder:"ex. wg1",id:"ConfigurationName","onUpdate:modelValue":e[0]||(e[0]=l=>this.newConfiguration.ConfigurationName=l),disabled:this.loading,required:""},null,8,Wz),[[Ke,this.newConfiguration.ConfigurationName]]),g("div",Hz,[this.error?(D(),V("div",Yz,Ee(this.errorMessage),1)):(D(),V("div",jz,[B(o,{t:"Configuration name is invalid. Possible reasons:"}),g("ul",Kz,[g("li",null,[B(o,{t:"Configuration name already exist."})]),g("li",null,[B(o,{t:"Configuration name can only contain 15 lower/uppercase alphabet, numbers, underscore, equal sign, plus sign, period and hyphen."})])])]))])])]),g("div",Uz,[g("div",Gz,[B(o,{t:"Private Key"}),He(" & "),B(o,{t:"Public Key"})]),g("div",Xz,[g("div",qz,[g("label",Zz,[g("small",null,[B(o,{t:"Private Key"})])]),g("div",Jz,[Ne(g("input",{type:"text",class:"form-control",id:"PrivateKey",required:"",disabled:this.loading,"onUpdate:modelValue":e[1]||(e[1]=l=>this.newConfiguration.PrivateKey=l)},null,8,Qz),[[Ke,this.newConfiguration.PrivateKey]]),g("button",{class:"btn btn-outline-primary",type:"button",title:"Regenerate Private Key",onClick:e[2]||(e[2]=l=>r.wireguardGenerateKeypair())},tW)])]),g("div",null,[g("label",nW,[g("small",null,[B(o,{t:"Public Key"})])]),Ne(g("input",{type:"text",class:"form-control",id:"PublicKey","onUpdate:modelValue":e[3]||(e[3]=l=>this.newConfiguration.PublicKey=l),disabled:""},null,512),[[Ke,this.newConfiguration.PublicKey]])])])]),g("div",iW,[g("div",sW,[B(o,{t:"Listen Port"})]),g("div",rW,[Ne(g("input",{type:"number",class:"form-control",placeholder:"0-65353",id:"ListenPort",min:"1",max:"65353","onUpdate:modelValue":e[4]||(e[4]=l=>this.newConfiguration.ListenPort=l),disabled:this.loading,required:""},null,8,oW),[[Ke,this.newConfiguration.ListenPort]]),g("div",aW,[this.error?(D(),V("div",lW,Ee(this.errorMessage),1)):(D(),V("div",cW,[B(o,{t:"Invalid port"})]))])])]),g("div",uW,[g("div",dW,[B(o,{t:"IP Address/CIDR"}),g("span",hW,Ee(s.numberOfAvailableIPs)+" Available IPs",1)]),g("div",fW,[Ne(g("input",{type:"text",class:"form-control",placeholder:"Ex: 10.0.0.1/24",id:"Address","onUpdate:modelValue":e[5]||(e[5]=l=>this.newConfiguration.Address=l),disabled:this.loading,required:""},null,8,gW),[[Ke,this.newConfiguration.Address]]),g("div",pW,[this.error?(D(),V("div",mW,Ee(this.errorMessage),1)):(D(),V("div",_W," IP Address/CIDR is invalid "))])])]),yW,g("div",vW,[g("div",bW,[g("h2",wW,[g("button",xW,[B(o,{t:"Optional Settings"})])]),g("div",EW,[g("div",SW,[g("div",CW,[TW,g("div",kW,[Ne(g("input",{type:"text",class:"form-control",id:"preUp","onUpdate:modelValue":e[6]||(e[6]=l=>this.newConfiguration.PreUp=l)},null,512),[[Ke,this.newConfiguration.PreUp]])])]),g("div",AW,[MW,g("div",IW,[Ne(g("input",{type:"text",class:"form-control",id:"preDown","onUpdate:modelValue":e[7]||(e[7]=l=>this.newConfiguration.PreDown=l)},null,512),[[Ke,this.newConfiguration.PreDown]])])]),g("div",PW,[RW,g("div",DW,[Ne(g("input",{type:"text",class:"form-control",id:"postUp","onUpdate:modelValue":e[8]||(e[8]=l=>this.newConfiguration.PostUp=l)},null,512),[[Ke,this.newConfiguration.PostUp]])])]),g("div",$W,[LW,g("div",OW,[Ne(g("input",{type:"text",class:"form-control",id:"postDown","onUpdate:modelValue":e[9]||(e[9]=l=>this.newConfiguration.PostDown=l)},null,512),[[Ke,this.newConfiguration.PostDown]])])])])])])]),g("button",{class:"btn btn-dark btn-brand rounded-3 px-3 py-2 shadow ms-auto",disabled:!this.goodToSubmit||this.loading||this.success},[this.success?(D(),V("span",FW,[B(o,{t:"Success"}),He("! "),BW])):this.loading?(D(),V("span",WW,[B(o,{t:"Saving..."}),HW])):(D(),V("span",VW,[B(o,{t:"Save Configuration"}),zW]))],8,NW)],32)])])}const jW=Ye(Dz,[["render",YW]]),KW={name:"configuration"},UW={class:"mt-md-5 mt-3 text-body"};function GW(t,e,n,i,s,r){const o=Se("RouterView");return D(),V("div",UW,[B(o,null,{default:Re(({Component:a,route:l})=>[B(Rt,{name:"fade2",mode:"out-in"},{default:Re(()=>[(D(),Ce(f_,null,{default:Re(()=>[(D(),Ce(ga(a),{key:l.path}))]),_:2},1024))]),_:2},1024)]),_:1})])}const XW=Ye(KW,[["render",GW]]),qW={name:"peerSearch",components:{LocaleText:Qe},setup(){const t=st(),e=vi();return{store:t,wireguardConfigurationStore:e}},props:{configuration:Object},data(){return{sort:{status:Tt("Status"),name:Tt("Name"),allowed_ip:Tt("Allowed IPs"),restricted:Tt("Restricted")},interval:{5e3:Tt("5 Seconds"),1e4:Tt("10 Seconds"),3e4:Tt("30 Seconds"),6e4:Tt("1 Minutes")},searchString:"",searchStringTimeout:void 0,showDisplaySettings:!1,showMoreSettings:!1}},methods:{debounce(){this.searchStringTimeout?(clearTimeout(this.searchStringTimeout),this.searchStringTimeout=setTimeout(()=>{this.wireguardConfigurationStore.searchString=this.searchString},300)):this.searchStringTimeout=setTimeout(()=>{this.wireguardConfigurationStore.searchString=this.searchString},300)},updateSort(t){kt("/api/updateDashboardConfigurationItem",{section:"Server",key:"dashboard_sort",value:t},e=>{e.status&&this.store.getConfiguration()})},updateRefreshInterval(t){kt("/api/updateDashboardConfigurationItem",{section:"Server",key:"dashboard_refresh_interval",value:t},e=>{e.status&&this.store.getConfiguration()})},downloadAllPeer(){Vt(`/api/downloadAllPeers/${this.configuration.Name}`,{},t=>{console.log(t),window.wireguard.generateZipFiles(t,this.configuration.Name)})}},computed:{searchBarPlaceholder(){return Tt("Search Peers...")}}},wf=t=>(bn("data-v-c8fa0b7d"),t=t(),wn(),t),ZW={class:"mb-3"},JW={class:"d-flex gap-2 z-3 peerSearchContainer"},QW=wf(()=>g("i",{class:"bi bi-plus-lg me-2"},null,-1)),e8=wf(()=>g("i",{class:"bi bi-download me-2"},null,-1)),t8={class:"mt-3 mt-md-0 flex-grow-1"},n8=["placeholder"],i8=wf(()=>g("i",{class:"bi bi-filter-circle me-2"},null,-1)),s8=wf(()=>g("i",{class:"bi bi-three-dots"},null,-1)),r8=[s8],o8={key:0,class:"peerSettingContainer w-100 h-100 position-absolute top-0 start-0 overflow-y-scroll displayModal"},a8={class:"container-md d-flex h-100 w-100"},l8={class:"m-auto modal-dialog-centered dashboardModal"},c8={class:"card rounded-3 shadow w-100"},u8={class:"card-header bg-transparent d-flex align-items-center gap-2 border-0 p-4 pb-2"},d8={class:"mb-0 fw-normal"},h8={class:"card-body px-4 pb-4 d-flex gap-3 flex-column"},f8={class:"text-muted fw-bold mb-2"},g8={class:"list-group"},p8=["onClick"],m8={class:"me-auto"},_8={key:0,class:"bi bi-check text-primary"},y8={class:"text-muted fw-bold mb-2"},v8={class:"list-group"},b8=["onClick"],w8={class:"me-auto"},x8={key:0,class:"bi bi-check text-primary"},E8={key:0,class:"peerSettingContainer w-100 h-100 position-absolute top-0 start-0 overflow-y-scroll displayModal"},S8={class:"container-md d-flex h-100 w-100"},C8={class:"m-auto modal-dialog-centered dashboardModal"},T8={class:"card rounded-3 shadow w-100"},k8={class:"card-header bg-transparent d-flex align-items-center gap-2 border-0 p-4 pb-2"},A8={class:"mb-0 fw-normal"},M8={class:"card-body px-4 pb-4 d-flex gap-3 flex-column"},I8={class:"text-muted fw-bold mb-2"},P8={class:"list-group"};function R8(t,e,n,i,s,r){const o=Se("LocaleText"),a=Se("RouterLink");return D(),V("div",ZW,[g("div",JW,[B(a,{to:"create",class:"text-decoration-none btn text-primary-emphasis bg-primary-subtle rounded-3 border-1 border-primary-subtle shadow-sm"},{default:Re(()=>[QW,B(o,{t:"Peer"})]),_:1}),g("button",{class:"btn text-primary-emphasis bg-primary-subtle rounded-3 border-1 border-primary-subtle shadow-sm",onClick:e[0]||(e[0]=l=>this.downloadAllPeer())},[e8,B(o,{t:"Download All"})]),g("div",t8,[Ne(g("input",{class:"form-control rounded-3 bg-secondary-subtle border-1 border-secondary-subtle shadow-sm w-100",placeholder:r.searchBarPlaceholder,id:"searchPeers",onKeyup:e[1]||(e[1]=l=>this.debounce()),"onUpdate:modelValue":e[2]||(e[2]=l=>this.searchString=l)},null,40,n8),[[Ke,this.searchString]])]),g("button",{onClick:e[3]||(e[3]=l=>this.showDisplaySettings=!0),class:"btn text-secondary-emphasis bg-secondary-subtle rounded-3 border-1 border-secondary-subtle shadow-sm",type:"button","aria-expanded":"false"},[i8,B(o,{t:"Display"})]),g("button",{class:"btn text-secondary-emphasis bg-secondary-subtle rounded-3 border-1 border-secondary-subtle shadow-sm",onClick:e[4]||(e[4]=l=>this.showMoreSettings=!0),type:"button","aria-expanded":"false"},r8),B(Rt,{name:"zoom"},{default:Re(()=>[this.showDisplaySettings?(D(),V("div",o8,[g("div",a8,[g("div",l8,[g("div",c8,[g("div",u8,[g("h4",d8,[B(o,{t:"Display"})]),g("button",{type:"button",class:"btn-close ms-auto",onClick:e[5]||(e[5]=l=>this.showDisplaySettings=!1)})]),g("div",h8,[g("div",null,[g("p",f8,[g("small",null,[B(o,{t:"Sort by"})])]),g("div",g8,[(D(!0),V($e,null,Xe(this.sort,(l,c)=>(D(),V("a",{class:"list-group-item list-group-item-action d-flex",role:"button",onClick:u=>this.updateSort(c)},[g("span",m8,Ee(l),1),i.store.Configuration.Server.dashboard_sort===c?(D(),V("i",_8)):ce("",!0)],8,p8))),256))])]),g("div",null,[g("p",y8,[g("small",null,[B(o,{t:"Refresh Interval"})])]),g("div",v8,[(D(!0),V($e,null,Xe(this.interval,(l,c)=>(D(),V("a",{class:"list-group-item list-group-item-action d-flex",role:"button",onClick:u=>this.updateRefreshInterval(c)},[g("span",w8,Ee(l),1),i.store.Configuration.Server.dashboard_refresh_interval===c?(D(),V("i",x8)):ce("",!0)],8,b8))),256))])])])])])])])):ce("",!0)]),_:1}),B(Rt,{name:"zoom"},{default:Re(()=>[this.showMoreSettings?(D(),V("div",E8,[g("div",S8,[g("div",C8,[g("div",T8,[g("div",k8,[g("h4",A8,[B(o,{t:"Configuration Settings"})]),g("button",{type:"button",class:"btn-close ms-auto",onClick:e[6]||(e[6]=l=>this.showMoreSettings=!1)})]),g("div",M8,[g("div",null,[g("p",I8,[g("small",null,[B(o,{t:"Peer Jobs"})])]),g("div",P8,[g("a",{class:"list-group-item list-group-item-action d-flex",role:"button",onClick:e[7]||(e[7]=l=>this.$emit("jobsAll"))},[B(o,{t:"Active Jobs"})]),g("a",{class:"list-group-item list-group-item-action d-flex",role:"button",onClick:e[8]||(e[8]=l=>this.$emit("jobLogs"))},[B(o,{t:"Logs"})])])])])])])])])):ce("",!0)]),_:1})])])}const D8=Ye(qW,[["render",R8],["__scopeId","data-v-c8fa0b7d"]]);function $8(t){return ef()?(e_(t),!0):!1}function hC(t){return typeof t=="function"?t():Q(t)}const fC=typeof window<"u"&&typeof document<"u";typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const L8=Object.prototype.toString,O8=t=>L8.call(t)==="[object Object]",sh=()=>{},N8=F8();function F8(){var t,e;return fC&&((t=window?.navigator)==null?void 0:t.userAgent)&&(/iP(ad|hone|od)/.test(window.navigator.userAgent)||((e=window?.navigator)==null?void 0:e.maxTouchPoints)>2&&/iPad|Macintosh/.test(window?.navigator.userAgent))}function bc(t){var e;const n=hC(t);return(e=n?.$el)!=null?e:n}const gC=fC?window:void 0;function Hg(...t){let e,n,i,s;if(typeof t[0]=="string"||Array.isArray(t[0])?([n,i,s]=t,e=gC):[e,n,i,s]=t,!e)return sh;Array.isArray(n)||(n=[n]),Array.isArray(i)||(i=[i]);const r=[],o=()=>{r.forEach(u=>u()),r.length=0},a=(u,d,h,f)=>(u.addEventListener(d,h,f),()=>u.removeEventListener(d,h,f)),l=fn(()=>[bc(e),hC(s)],([u,d])=>{if(o(),!u)return;const h=O8(d)?{...d}:d;r.push(...n.flatMap(f=>i.map(p=>a(u,f,p,h))))},{immediate:!0,flush:"post"}),c=()=>{l(),o()};return $8(c),c}let Pb=!1;function B8(t,e,n={}){const{window:i=gC,ignore:s=[],capture:r=!0,detectIframe:o=!1}=n;if(!i)return sh;N8&&!Pb&&(Pb=!0,Array.from(i.document.body.children).forEach(h=>h.addEventListener("click",sh)),i.document.documentElement.addEventListener("click",sh));let a=!0;const l=h=>s.some(f=>{if(typeof f=="string")return Array.from(i.document.querySelectorAll(f)).some(p=>p===h.target||h.composedPath().includes(p));{const p=bc(f);return p&&(h.target===p||h.composedPath().includes(p))}}),u=[Hg(i,"click",h=>{const f=bc(t);if(!(!f||f===h.target||h.composedPath().includes(f))){if(h.detail===0&&(a=!l(h)),!a){a=!0;return}e(h)}},{passive:!0,capture:r}),Hg(i,"pointerdown",h=>{const f=bc(t);a=!l(h)&&!!(f&&!h.composedPath().includes(f))},{passive:!0}),o&&Hg(i,"blur",h=>{setTimeout(()=>{var f;const p=bc(t);((f=i.document.activeElement)==null?void 0:f.tagName)==="IFRAME"&&!p?.contains(i.document.activeElement)&&e(h)},0)})].filter(Boolean);return()=>u.forEach(h=>h())}const V8={name:"peerSettingsDropdown",components:{LocaleText:Qe},setup(){return{dashboardStore:st()}},props:{Peer:Object},data(){return{deleteBtnDisabled:!1,restrictBtnDisabled:!1,allowAccessBtnDisabled:!1}},methods:{downloadPeer(){Vt("/api/downloadPeer/"+this.$route.params.id,{id:this.Peer.id},t=>{if(t.status){const e=new Blob([t.data.file],{type:"text/plain"}),n=URL.createObjectURL(e),i=`${t.data.fileName}.conf`,s=document.createElement("a");s.href=n,s.download=i,s.click(),this.dashboardStore.newMessage("WGDashboard","Peer download started","success")}else this.dashboardStore.newMessage("Server",t.message,"danger")})},downloadQRCode(){Vt("/api/downloadPeer/"+this.$route.params.id,{id:this.Peer.id},t=>{t.status?this.$emit("qrcode",t.data.file):this.dashboardStore.newMessage("Server",t.message,"danger")})},deletePeer(){this.deleteBtnDisabled=!0,kt(`/api/deletePeers/${this.$route.params.id}`,{peers:[this.Peer.id]},t=>{this.dashboardStore.newMessage("Server",t.message,t.status?"success":"danger"),this.$emit("refresh"),this.deleteBtnDisabled=!1})},restrictPeer(){this.restrictBtnDisabled=!0,kt(`/api/restrictPeers/${this.$route.params.id}`,{peers:[this.Peer.id]},t=>{this.dashboardStore.newMessage("Server",t.message,t.status?"success":"danger"),this.$emit("refresh"),this.restrictBtnDisabled=!1})},allowAccessPeer(){this.allowAccessBtnDisabled=!0,kt(`/api/allowAccessPeers/${this.$route.params.id}`,{peers:[this.Peer.id]},t=>{this.dashboardStore.newMessage("Server",t.message,t.status?"success":"danger"),this.$emit("refresh"),this.allowAccessBtnDisabled=!1})}}},Fs=t=>(bn("data-v-e53c14b2"),t=t(),wn(),t),z8={class:"dropdown-menu mt-2 shadow-lg d-block rounded-3",style:{"max-width":"200px"}},W8={key:0},H8={class:"w-100 dropdown-item text-muted",style:{"white-space":"break-spaces","font-size":"0.7rem"}},Y8={key:1,class:"d-flex",style:{"padding-left":"var(--bs-dropdown-item-padding-x)","padding-right":"var(--bs-dropdown-item-padding-x)"}},j8=Fs(()=>g("i",{class:"me-auto bi bi-download"},null,-1)),K8=[j8],U8=Fs(()=>g("i",{class:"me-auto bi bi-qr-code"},null,-1)),G8=[U8],X8=Fs(()=>g("i",{class:"me-auto bi bi-share"},null,-1)),q8=[X8],Z8=Fs(()=>g("li",null,[g("hr",{class:"dropdown-divider"})],-1)),J8=Fs(()=>g("i",{class:"me-auto bi bi-pen"},null,-1)),Q8=Fs(()=>g("i",{class:"me-auto bi bi-app-indicator"},null,-1)),eH=Fs(()=>g("li",null,[g("hr",{class:"dropdown-divider"})],-1)),tH=Fs(()=>g("i",{class:"me-auto bi bi-lock"},null,-1)),nH=Fs(()=>g("i",{class:"me-auto bi bi-trash"},null,-1)),iH={key:1},sH=Fs(()=>g("i",{class:"me-auto bi bi-unlock"},null,-1));function rH(t,e,n,i,s,r){const o=Se("LocaleText");return D(),V("ul",z8,[this.Peer.restricted?(D(),V("li",iH,[g("a",{class:Ie(["dropdown-item d-flex text-warning",{disabled:this.allowAccessBtnDisabled}]),onClick:e[7]||(e[7]=a=>this.allowAccessPeer()),role:"button"},[sH,this.allowAccessBtnDisabled?(D(),Ce(o,{key:1,t:"Allowing Access..."})):(D(),Ce(o,{key:0,t:"Allow Access"}))],2)])):(D(),V($e,{key:0},[this.Peer.private_key?(D(),V("li",Y8,[g("a",{class:"dropdown-item text-center px-0 rounded-3",role:"button",onClick:e[0]||(e[0]=a=>this.downloadPeer())},K8),g("a",{class:"dropdown-item text-center px-0 rounded-3",role:"button",onClick:e[1]||(e[1]=a=>this.downloadQRCode())},G8),g("a",{class:"dropdown-item text-center px-0 rounded-3",role:"button",onClick:e[2]||(e[2]=a=>this.$emit("share"))},q8)])):(D(),V("li",W8,[g("small",H8,[B(o,{t:"Download & QR Code is not available due to no private key set for this peer"})])])),Z8,g("li",null,[g("a",{class:"dropdown-item d-flex",role:"button",onClick:e[3]||(e[3]=a=>this.$emit("setting"))},[J8,He(),B(o,{t:"Peer Settings"})])]),g("li",null,[g("a",{class:"dropdown-item d-flex",role:"button",onClick:e[4]||(e[4]=a=>this.$emit("jobs"))},[Q8,He(),B(o,{t:"Schedule Jobs"})])]),eH,g("li",null,[g("a",{class:Ie(["dropdown-item d-flex text-warning",{disabled:this.restrictBtnDisabled}]),onClick:e[5]||(e[5]=a=>this.restrictPeer()),role:"button"},[tH,this.restrictBtnDisabled?(D(),Ce(o,{key:1,t:"Restricting..."})):(D(),Ce(o,{key:0,t:"Restrict Access"}))],2)]),g("li",null,[g("a",{class:Ie(["dropdown-item d-flex fw-bold text-danger",{disabled:this.deleteBtnDisabled}]),onClick:e[6]||(e[6]=a=>this.deletePeer()),role:"button"},[nH,this.deleteBtnDisabled?(D(),Ce(o,{key:1,t:"Deleting..."})):(D(),Ce(o,{key:0,t:"Delete"}))],2)])],64))])}const oH=Ye(V8,[["render",rH],["__scopeId","data-v-e53c14b2"]]),aH={name:"peer",components:{LocaleText:Qe,PeerSettingsDropdown:oH},props:{Peer:Object},data(){return{}},setup(){const t=we(null),e=we(!1);return B8(t,n=>{e.value=!1}),{target:t,subMenuOpened:e}},computed:{getLatestHandshake(){return this.Peer.latest_handshake.includes(",")?this.Peer.latest_handshake.split(",")[0]:this.Peer.latest_handshake}}},Vu=t=>(bn("data-v-4a343fe2"),t=t(),wn(),t),lH={key:0,class:"card-header bg-transparent d-flex align-items-center gap-2 border-0"},cH={style:{"font-size":"0.8rem"},class:"ms-auto d-flex gap-2"},uH={class:"text-primary"},dH=Vu(()=>g("i",{class:"bi bi-arrow-down"},null,-1)),hH={class:"text-success"},fH=Vu(()=>g("i",{class:"bi bi-arrow-up"},null,-1)),gH={key:0,class:"text-secondary"},pH=Vu(()=>g("i",{class:"bi bi-arrows-angle-contract"},null,-1)),mH={key:1,class:"border-0 card-header bg-transparent text-warning fw-bold",style:{"font-size":"0.8rem"}},_H=Vu(()=>g("i",{class:"bi-lock-fill me-2"},null,-1)),yH={class:"card-body pt-1",style:{"font-size":"0.9rem"}},vH={class:"mb-2"},bH={class:"text-muted"},wH={class:"mb-0"},xH={class:"d-flex align-items-end"},EH={class:"text-muted"},SH={class:"mb-0"},CH=Vu(()=>g("h5",{class:"mb-0"},[g("i",{class:"bi bi-three-dots"})],-1)),TH=[CH];function kH(t,e,n,i,s,r){const o=Se("LocaleText"),a=Se("PeerSettingsDropdown");return D(),V("div",{class:Ie(["card shadow-sm rounded-3 peerCard bg-transparent",{"border-warning":n.Peer.restricted}])},[g("div",null,[n.Peer.restricted?(D(),V("div",mH,[_H,B(o,{t:"Access Restricted"})])):(D(),V("div",lH,[g("div",{class:Ie(["dot ms-0",{active:n.Peer.status==="running"}])},null,2),g("div",cH,[g("span",uH,[dH,g("strong",null,Ee((n.Peer.cumu_receive+n.Peer.total_receive).toFixed(4)),1),He(" GB ")]),g("span",hH,[fH,g("strong",null,Ee((n.Peer.cumu_sent+n.Peer.total_sent).toFixed(4)),1),He(" GB ")]),n.Peer.latest_handshake!=="No Handshake"?(D(),V("span",gH,[pH,He(" "+Ee(r.getLatestHandshake)+" ago ",1)])):ce("",!0)])]))]),g("div",yH,[g("h6",null,Ee(n.Peer.name?n.Peer.name:"Untitled Peer"),1),g("div",vH,[g("small",bH,[B(o,{t:"Public Key"})]),g("p",wH,[g("samp",null,Ee(n.Peer.id),1)])]),g("div",xH,[g("div",null,[g("small",EH,[B(o,{t:"Allowed IPs"})]),g("p",SH,[g("samp",null,Ee(n.Peer.allowed_ip),1)])]),g("div",{class:Ie(["ms-auto px-2 rounded-3 subMenuBtn",{active:this.subMenuOpened}])},[g("a",{role:"button",class:"text-body",onClick:e[0]||(e[0]=l=>this.subMenuOpened=!0)},TH),B(Rt,{name:"slide-fade"},{default:Re(()=>[this.subMenuOpened?(D(),Ce(a,{key:0,onQrcode:e[1]||(e[1]=l=>this.$emit("qrcode",l)),onSetting:e[2]||(e[2]=l=>this.$emit("setting")),onJobs:e[3]||(e[3]=l=>this.$emit("jobs")),onRefresh:e[4]||(e[4]=l=>this.$emit("refresh")),onShare:e[5]||(e[5]=l=>this.$emit("share")),Peer:n.Peer,ref:"target"},null,8,["Peer"])):ce("",!0)]),_:1})],2)])])],2)}const AH=Ye(aH,[["render",kH],["__scopeId","data-v-4a343fe2"]]);/*! * @kurkle/color v0.3.2 * https://github.com/kurkle/color#readme * (c) 2023 Jukka Kurkela * Released under the MIT License - */function Za(t){return t+.5|0}const vi=(t,e,n)=>Math.max(Math.min(t,n),e);function na(t){return vi(Za(t*2.55),0,255)}function Ci(t){return vi(Za(t*255),0,255)}function Ws(t){return vi(Za(t/2.55)/100,0,1)}function xm(t){return vi(Za(t*100),0,100)}const Kn={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,A:10,B:11,C:12,D:13,E:14,F:15,a:10,b:11,c:12,d:13,e:14,f:15},Ud=[..."0123456789ABCDEF"],lB=t=>Ud[t&15],cB=t=>Ud[(t&240)>>4]+Ud[t&15],Tl=t=>(t&240)>>4===(t&15),uB=t=>Tl(t.r)&&Tl(t.g)&&Tl(t.b)&&Tl(t.a);function dB(t){var e=t.length,n;return t[0]==="#"&&(e===4||e===5?n={r:255&Kn[t[1]]*17,g:255&Kn[t[2]]*17,b:255&Kn[t[3]]*17,a:e===5?Kn[t[4]]*17:255}:(e===7||e===9)&&(n={r:Kn[t[1]]<<4|Kn[t[2]],g:Kn[t[3]]<<4|Kn[t[4]],b:Kn[t[5]]<<4|Kn[t[6]],a:e===9?Kn[t[7]]<<4|Kn[t[8]]:255})),n}const hB=(t,e)=>t<255?e(t):"";function fB(t){var e=uB(t)?lB:cB;return t?"#"+e(t.r)+e(t.g)+e(t.b)+hB(t.a,e):void 0}const pB=/^(hsla?|hwb|hsv)\(\s*([-+.e\d]+)(?:deg)?[\s,]+([-+.e\d]+)%[\s,]+([-+.e\d]+)%(?:[\s,]+([-+.e\d]+)(%)?)?\s*\)$/;function i0(t,e,n){const s=e*Math.min(n,1-n),i=(o,r=(o+t/30)%12)=>n-s*Math.max(Math.min(r-3,9-r,1),-1);return[i(0),i(8),i(4)]}function gB(t,e,n){const s=(i,o=(i+t/60)%6)=>n-n*e*Math.max(Math.min(o,4-o,1),0);return[s(5),s(3),s(1)]}function mB(t,e,n){const s=i0(t,1,.5);let i;for(e+n>1&&(i=1/(e+n),e*=i,n*=i),i=0;i<3;i++)s[i]*=1-e-n,s[i]+=e;return s}function _B(t,e,n,s,i){return t===i?(e-n)/s+(e.5?u/(2-o-r):u/(o+r),l=_B(n,s,i,u,o),l=l*60+.5),[l|0,c||0,a]}function $f(t,e,n,s){return(Array.isArray(e)?t(e[0],e[1],e[2]):t(e,n,s)).map(Ci)}function Af(t,e,n){return $f(i0,t,e,n)}function bB(t,e,n){return $f(mB,t,e,n)}function vB(t,e,n){return $f(gB,t,e,n)}function o0(t){return(t%360+360)%360}function yB(t){const e=pB.exec(t);let n=255,s;if(!e)return;e[5]!==s&&(n=e[6]?na(+e[5]):Ci(+e[5]));const i=o0(+e[2]),o=+e[3]/100,r=+e[4]/100;return e[1]==="hwb"?s=bB(i,o,r):e[1]==="hsv"?s=vB(i,o,r):s=Af(i,o,r),{r:s[0],g:s[1],b:s[2],a:n}}function wB(t,e){var n=Sf(t);n[0]=o0(n[0]+e),n=Af(n),t.r=n[0],t.g=n[1],t.b=n[2]}function xB(t){if(!t)return;const e=Sf(t),n=e[0],s=xm(e[1]),i=xm(e[2]);return t.a<255?`hsla(${n}, ${s}%, ${i}%, ${Ws(t.a)})`:`hsl(${n}, ${s}%, ${i}%)`}const km={x:"dark",Z:"light",Y:"re",X:"blu",W:"gr",V:"medium",U:"slate",A:"ee",T:"ol",S:"or",B:"ra",C:"lateg",D:"ights",R:"in",Q:"turquois",E:"hi",P:"ro",O:"al",N:"le",M:"de",L:"yello",F:"en",K:"ch",G:"arks",H:"ea",I:"ightg",J:"wh"},Sm={OiceXe:"f0f8ff",antiquewEte:"faebd7",aqua:"ffff",aquamarRe:"7fffd4",azuY:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"0",blanKedOmond:"ffebcd",Xe:"ff",XeviTet:"8a2be2",bPwn:"a52a2a",burlywood:"deb887",caMtXe:"5f9ea0",KartYuse:"7fff00",KocTate:"d2691e",cSO:"ff7f50",cSnflowerXe:"6495ed",cSnsilk:"fff8dc",crimson:"dc143c",cyan:"ffff",xXe:"8b",xcyan:"8b8b",xgTMnPd:"b8860b",xWay:"a9a9a9",xgYF:"6400",xgYy:"a9a9a9",xkhaki:"bdb76b",xmagFta:"8b008b",xTivegYF:"556b2f",xSange:"ff8c00",xScEd:"9932cc",xYd:"8b0000",xsOmon:"e9967a",xsHgYF:"8fbc8f",xUXe:"483d8b",xUWay:"2f4f4f",xUgYy:"2f4f4f",xQe:"ced1",xviTet:"9400d3",dAppRk:"ff1493",dApskyXe:"bfff",dimWay:"696969",dimgYy:"696969",dodgerXe:"1e90ff",fiYbrick:"b22222",flSOwEte:"fffaf0",foYstWAn:"228b22",fuKsia:"ff00ff",gaRsbSo:"dcdcdc",ghostwEte:"f8f8ff",gTd:"ffd700",gTMnPd:"daa520",Way:"808080",gYF:"8000",gYFLw:"adff2f",gYy:"808080",honeyMw:"f0fff0",hotpRk:"ff69b4",RdianYd:"cd5c5c",Rdigo:"4b0082",ivSy:"fffff0",khaki:"f0e68c",lavFMr:"e6e6fa",lavFMrXsh:"fff0f5",lawngYF:"7cfc00",NmoncEffon:"fffacd",ZXe:"add8e6",ZcSO:"f08080",Zcyan:"e0ffff",ZgTMnPdLw:"fafad2",ZWay:"d3d3d3",ZgYF:"90ee90",ZgYy:"d3d3d3",ZpRk:"ffb6c1",ZsOmon:"ffa07a",ZsHgYF:"20b2aa",ZskyXe:"87cefa",ZUWay:"778899",ZUgYy:"778899",ZstAlXe:"b0c4de",ZLw:"ffffe0",lime:"ff00",limegYF:"32cd32",lRF:"faf0e6",magFta:"ff00ff",maPon:"800000",VaquamarRe:"66cdaa",VXe:"cd",VScEd:"ba55d3",VpurpN:"9370db",VsHgYF:"3cb371",VUXe:"7b68ee",VsprRggYF:"fa9a",VQe:"48d1cc",VviTetYd:"c71585",midnightXe:"191970",mRtcYam:"f5fffa",mistyPse:"ffe4e1",moccasR:"ffe4b5",navajowEte:"ffdead",navy:"80",Tdlace:"fdf5e6",Tive:"808000",TivedBb:"6b8e23",Sange:"ffa500",SangeYd:"ff4500",ScEd:"da70d6",pOegTMnPd:"eee8aa",pOegYF:"98fb98",pOeQe:"afeeee",pOeviTetYd:"db7093",papayawEp:"ffefd5",pHKpuff:"ffdab9",peru:"cd853f",pRk:"ffc0cb",plum:"dda0dd",powMrXe:"b0e0e6",purpN:"800080",YbeccapurpN:"663399",Yd:"ff0000",Psybrown:"bc8f8f",PyOXe:"4169e1",saddNbPwn:"8b4513",sOmon:"fa8072",sandybPwn:"f4a460",sHgYF:"2e8b57",sHshell:"fff5ee",siFna:"a0522d",silver:"c0c0c0",skyXe:"87ceeb",UXe:"6a5acd",UWay:"708090",UgYy:"708090",snow:"fffafa",sprRggYF:"ff7f",stAlXe:"4682b4",tan:"d2b48c",teO:"8080",tEstN:"d8bfd8",tomato:"ff6347",Qe:"40e0d0",viTet:"ee82ee",JHt:"f5deb3",wEte:"ffffff",wEtesmoke:"f5f5f5",Lw:"ffff00",LwgYF:"9acd32"};function kB(){const t={},e=Object.keys(Sm),n=Object.keys(km);let s,i,o,r,a;for(s=0;s>16&255,o>>8&255,o&255]}return t}let Pl;function SB(t){Pl||(Pl=kB(),Pl.transparent=[0,0,0,0]);const e=Pl[t.toLowerCase()];return e&&{r:e[0],g:e[1],b:e[2],a:e.length===4?e[3]:255}}const $B=/^rgba?\(\s*([-+.\d]+)(%)?[\s,]+([-+.e\d]+)(%)?[\s,]+([-+.e\d]+)(%)?(?:[\s,/]+([-+.e\d]+)(%)?)?\s*\)$/;function AB(t){const e=$B.exec(t);let n=255,s,i,o;if(e){if(e[7]!==s){const r=+e[7];n=e[8]?na(r):vi(r*255,0,255)}return s=+e[1],i=+e[3],o=+e[5],s=255&(e[2]?na(s):vi(s,0,255)),i=255&(e[4]?na(i):vi(i,0,255)),o=255&(e[6]?na(o):vi(o,0,255)),{r:s,g:i,b:o,a:n}}}function CB(t){return t&&(t.a<255?`rgba(${t.r}, ${t.g}, ${t.b}, ${Ws(t.a)})`:`rgb(${t.r}, ${t.g}, ${t.b})`)}const td=t=>t<=.0031308?t*12.92:Math.pow(t,1/2.4)*1.055-.055,Uo=t=>t<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4);function EB(t,e,n){const s=Uo(Ws(t.r)),i=Uo(Ws(t.g)),o=Uo(Ws(t.b));return{r:Ci(td(s+n*(Uo(Ws(e.r))-s))),g:Ci(td(i+n*(Uo(Ws(e.g))-i))),b:Ci(td(o+n*(Uo(Ws(e.b))-o))),a:t.a+n*(e.a-t.a)}}function Ml(t,e,n){if(t){let s=Sf(t);s[e]=Math.max(0,Math.min(s[e]+s[e]*n,e===0?360:1)),s=Af(s),t.r=s[0],t.g=s[1],t.b=s[2]}}function r0(t,e){return t&&Object.assign(e||{},t)}function $m(t){var e={r:0,g:0,b:0,a:255};return Array.isArray(t)?t.length>=3&&(e={r:t[0],g:t[1],b:t[2],a:255},t.length>3&&(e.a=Ci(t[3]))):(e=r0(t,{r:0,g:0,b:0,a:1}),e.a=Ci(e.a)),e}function TB(t){return t.charAt(0)==="r"?AB(t):yB(t)}class Ra{constructor(e){if(e instanceof Ra)return e;const n=typeof e;let s;n==="object"?s=$m(e):n==="string"&&(s=dB(e)||SB(e)||TB(e)),this._rgb=s,this._valid=!!s}get valid(){return this._valid}get rgb(){var e=r0(this._rgb);return e&&(e.a=Ws(e.a)),e}set rgb(e){this._rgb=$m(e)}rgbString(){return this._valid?CB(this._rgb):void 0}hexString(){return this._valid?fB(this._rgb):void 0}hslString(){return this._valid?xB(this._rgb):void 0}mix(e,n){if(e){const s=this.rgb,i=e.rgb;let o;const r=n===o?.5:n,a=2*r-1,l=s.a-i.a,c=((a*l===-1?a:(a+l)/(1+a*l))+1)/2;o=1-c,s.r=255&c*s.r+o*i.r+.5,s.g=255&c*s.g+o*i.g+.5,s.b=255&c*s.b+o*i.b+.5,s.a=r*s.a+(1-r)*i.a,this.rgb=s}return this}interpolate(e,n){return e&&(this._rgb=EB(this._rgb,e._rgb,n)),this}clone(){return new Ra(this.rgb)}alpha(e){return this._rgb.a=Ci(e),this}clearer(e){const n=this._rgb;return n.a*=1-e,this}greyscale(){const e=this._rgb,n=Za(e.r*.3+e.g*.59+e.b*.11);return e.r=e.g=e.b=n,this}opaquer(e){const n=this._rgb;return n.a*=1+e,this}negate(){const e=this._rgb;return e.r=255-e.r,e.g=255-e.g,e.b=255-e.b,this}lighten(e){return Ml(this._rgb,2,e),this}darken(e){return Ml(this._rgb,2,-e),this}saturate(e){return Ml(this._rgb,1,e),this}desaturate(e){return Ml(this._rgb,1,-e),this}rotate(e){return wB(this._rgb,e),this}}/*! + */function zu(t){return t+.5|0}const jr=(t,e,n)=>Math.max(Math.min(t,n),e);function wc(t){return jr(zu(t*2.55),0,255)}function to(t){return jr(zu(t*255),0,255)}function tr(t){return jr(zu(t/2.55)/100,0,1)}function Rb(t){return jr(zu(t*100),0,100)}const Fi={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,A:10,B:11,C:12,D:13,E:14,F:15,a:10,b:11,c:12,d:13,e:14,f:15},im=[..."0123456789ABCDEF"],MH=t=>im[t&15],IH=t=>im[(t&240)>>4]+im[t&15],Ed=t=>(t&240)>>4===(t&15),PH=t=>Ed(t.r)&&Ed(t.g)&&Ed(t.b)&&Ed(t.a);function RH(t){var e=t.length,n;return t[0]==="#"&&(e===4||e===5?n={r:255&Fi[t[1]]*17,g:255&Fi[t[2]]*17,b:255&Fi[t[3]]*17,a:e===5?Fi[t[4]]*17:255}:(e===7||e===9)&&(n={r:Fi[t[1]]<<4|Fi[t[2]],g:Fi[t[3]]<<4|Fi[t[4]],b:Fi[t[5]]<<4|Fi[t[6]],a:e===9?Fi[t[7]]<<4|Fi[t[8]]:255})),n}const DH=(t,e)=>t<255?e(t):"";function $H(t){var e=PH(t)?MH:IH;return t?"#"+e(t.r)+e(t.g)+e(t.b)+DH(t.a,e):void 0}const LH=/^(hsla?|hwb|hsv)\(\s*([-+.e\d]+)(?:deg)?[\s,]+([-+.e\d]+)%[\s,]+([-+.e\d]+)%(?:[\s,]+([-+.e\d]+)(%)?)?\s*\)$/;function pC(t,e,n){const i=e*Math.min(n,1-n),s=(r,o=(r+t/30)%12)=>n-i*Math.max(Math.min(o-3,9-o,1),-1);return[s(0),s(8),s(4)]}function OH(t,e,n){const i=(s,r=(s+t/60)%6)=>n-n*e*Math.max(Math.min(r,4-r,1),0);return[i(5),i(3),i(1)]}function NH(t,e,n){const i=pC(t,1,.5);let s;for(e+n>1&&(s=1/(e+n),e*=s,n*=s),s=0;s<3;s++)i[s]*=1-e-n,i[s]+=e;return i}function FH(t,e,n,i,s){return t===s?(e-n)/i+(e.5?u/(2-r-o):u/(r+o),l=FH(n,i,s,u,r),l=l*60+.5),[l|0,c||0,a]}function G_(t,e,n,i){return(Array.isArray(e)?t(e[0],e[1],e[2]):t(e,n,i)).map(to)}function X_(t,e,n){return G_(pC,t,e,n)}function BH(t,e,n){return G_(NH,t,e,n)}function VH(t,e,n){return G_(OH,t,e,n)}function mC(t){return(t%360+360)%360}function zH(t){const e=LH.exec(t);let n=255,i;if(!e)return;e[5]!==i&&(n=e[6]?wc(+e[5]):to(+e[5]));const s=mC(+e[2]),r=+e[3]/100,o=+e[4]/100;return e[1]==="hwb"?i=BH(s,r,o):e[1]==="hsv"?i=VH(s,r,o):i=X_(s,r,o),{r:i[0],g:i[1],b:i[2],a:n}}function WH(t,e){var n=U_(t);n[0]=mC(n[0]+e),n=X_(n),t.r=n[0],t.g=n[1],t.b=n[2]}function HH(t){if(!t)return;const e=U_(t),n=e[0],i=Rb(e[1]),s=Rb(e[2]);return t.a<255?`hsla(${n}, ${i}%, ${s}%, ${tr(t.a)})`:`hsl(${n}, ${i}%, ${s}%)`}const Db={x:"dark",Z:"light",Y:"re",X:"blu",W:"gr",V:"medium",U:"slate",A:"ee",T:"ol",S:"or",B:"ra",C:"lateg",D:"ights",R:"in",Q:"turquois",E:"hi",P:"ro",O:"al",N:"le",M:"de",L:"yello",F:"en",K:"ch",G:"arks",H:"ea",I:"ightg",J:"wh"},$b={OiceXe:"f0f8ff",antiquewEte:"faebd7",aqua:"ffff",aquamarRe:"7fffd4",azuY:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"0",blanKedOmond:"ffebcd",Xe:"ff",XeviTet:"8a2be2",bPwn:"a52a2a",burlywood:"deb887",caMtXe:"5f9ea0",KartYuse:"7fff00",KocTate:"d2691e",cSO:"ff7f50",cSnflowerXe:"6495ed",cSnsilk:"fff8dc",crimson:"dc143c",cyan:"ffff",xXe:"8b",xcyan:"8b8b",xgTMnPd:"b8860b",xWay:"a9a9a9",xgYF:"6400",xgYy:"a9a9a9",xkhaki:"bdb76b",xmagFta:"8b008b",xTivegYF:"556b2f",xSange:"ff8c00",xScEd:"9932cc",xYd:"8b0000",xsOmon:"e9967a",xsHgYF:"8fbc8f",xUXe:"483d8b",xUWay:"2f4f4f",xUgYy:"2f4f4f",xQe:"ced1",xviTet:"9400d3",dAppRk:"ff1493",dApskyXe:"bfff",dimWay:"696969",dimgYy:"696969",dodgerXe:"1e90ff",fiYbrick:"b22222",flSOwEte:"fffaf0",foYstWAn:"228b22",fuKsia:"ff00ff",gaRsbSo:"dcdcdc",ghostwEte:"f8f8ff",gTd:"ffd700",gTMnPd:"daa520",Way:"808080",gYF:"8000",gYFLw:"adff2f",gYy:"808080",honeyMw:"f0fff0",hotpRk:"ff69b4",RdianYd:"cd5c5c",Rdigo:"4b0082",ivSy:"fffff0",khaki:"f0e68c",lavFMr:"e6e6fa",lavFMrXsh:"fff0f5",lawngYF:"7cfc00",NmoncEffon:"fffacd",ZXe:"add8e6",ZcSO:"f08080",Zcyan:"e0ffff",ZgTMnPdLw:"fafad2",ZWay:"d3d3d3",ZgYF:"90ee90",ZgYy:"d3d3d3",ZpRk:"ffb6c1",ZsOmon:"ffa07a",ZsHgYF:"20b2aa",ZskyXe:"87cefa",ZUWay:"778899",ZUgYy:"778899",ZstAlXe:"b0c4de",ZLw:"ffffe0",lime:"ff00",limegYF:"32cd32",lRF:"faf0e6",magFta:"ff00ff",maPon:"800000",VaquamarRe:"66cdaa",VXe:"cd",VScEd:"ba55d3",VpurpN:"9370db",VsHgYF:"3cb371",VUXe:"7b68ee",VsprRggYF:"fa9a",VQe:"48d1cc",VviTetYd:"c71585",midnightXe:"191970",mRtcYam:"f5fffa",mistyPse:"ffe4e1",moccasR:"ffe4b5",navajowEte:"ffdead",navy:"80",Tdlace:"fdf5e6",Tive:"808000",TivedBb:"6b8e23",Sange:"ffa500",SangeYd:"ff4500",ScEd:"da70d6",pOegTMnPd:"eee8aa",pOegYF:"98fb98",pOeQe:"afeeee",pOeviTetYd:"db7093",papayawEp:"ffefd5",pHKpuff:"ffdab9",peru:"cd853f",pRk:"ffc0cb",plum:"dda0dd",powMrXe:"b0e0e6",purpN:"800080",YbeccapurpN:"663399",Yd:"ff0000",Psybrown:"bc8f8f",PyOXe:"4169e1",saddNbPwn:"8b4513",sOmon:"fa8072",sandybPwn:"f4a460",sHgYF:"2e8b57",sHshell:"fff5ee",siFna:"a0522d",silver:"c0c0c0",skyXe:"87ceeb",UXe:"6a5acd",UWay:"708090",UgYy:"708090",snow:"fffafa",sprRggYF:"ff7f",stAlXe:"4682b4",tan:"d2b48c",teO:"8080",tEstN:"d8bfd8",tomato:"ff6347",Qe:"40e0d0",viTet:"ee82ee",JHt:"f5deb3",wEte:"ffffff",wEtesmoke:"f5f5f5",Lw:"ffff00",LwgYF:"9acd32"};function YH(){const t={},e=Object.keys($b),n=Object.keys(Db);let i,s,r,o,a;for(i=0;i>16&255,r>>8&255,r&255]}return t}let Sd;function jH(t){Sd||(Sd=YH(),Sd.transparent=[0,0,0,0]);const e=Sd[t.toLowerCase()];return e&&{r:e[0],g:e[1],b:e[2],a:e.length===4?e[3]:255}}const KH=/^rgba?\(\s*([-+.\d]+)(%)?[\s,]+([-+.e\d]+)(%)?[\s,]+([-+.e\d]+)(%)?(?:[\s,/]+([-+.e\d]+)(%)?)?\s*\)$/;function UH(t){const e=KH.exec(t);let n=255,i,s,r;if(e){if(e[7]!==i){const o=+e[7];n=e[8]?wc(o):jr(o*255,0,255)}return i=+e[1],s=+e[3],r=+e[5],i=255&(e[2]?wc(i):jr(i,0,255)),s=255&(e[4]?wc(s):jr(s,0,255)),r=255&(e[6]?wc(r):jr(r,0,255)),{r:i,g:s,b:r,a:n}}}function GH(t){return t&&(t.a<255?`rgba(${t.r}, ${t.g}, ${t.b}, ${tr(t.a)})`:`rgb(${t.r}, ${t.g}, ${t.b})`)}const Yg=t=>t<=.0031308?t*12.92:Math.pow(t,1/2.4)*1.055-.055,Da=t=>t<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4);function XH(t,e,n){const i=Da(tr(t.r)),s=Da(tr(t.g)),r=Da(tr(t.b));return{r:to(Yg(i+n*(Da(tr(e.r))-i))),g:to(Yg(s+n*(Da(tr(e.g))-s))),b:to(Yg(r+n*(Da(tr(e.b))-r))),a:t.a+n*(e.a-t.a)}}function Cd(t,e,n){if(t){let i=U_(t);i[e]=Math.max(0,Math.min(i[e]+i[e]*n,e===0?360:1)),i=X_(i),t.r=i[0],t.g=i[1],t.b=i[2]}}function _C(t,e){return t&&Object.assign(e||{},t)}function Lb(t){var e={r:0,g:0,b:0,a:255};return Array.isArray(t)?t.length>=3&&(e={r:t[0],g:t[1],b:t[2],a:255},t.length>3&&(e.a=to(t[3]))):(e=_C(t,{r:0,g:0,b:0,a:1}),e.a=to(e.a)),e}function qH(t){return t.charAt(0)==="r"?UH(t):zH(t)}class lu{constructor(e){if(e instanceof lu)return e;const n=typeof e;let i;n==="object"?i=Lb(e):n==="string"&&(i=RH(e)||jH(e)||qH(e)),this._rgb=i,this._valid=!!i}get valid(){return this._valid}get rgb(){var e=_C(this._rgb);return e&&(e.a=tr(e.a)),e}set rgb(e){this._rgb=Lb(e)}rgbString(){return this._valid?GH(this._rgb):void 0}hexString(){return this._valid?$H(this._rgb):void 0}hslString(){return this._valid?HH(this._rgb):void 0}mix(e,n){if(e){const i=this.rgb,s=e.rgb;let r;const o=n===r?.5:n,a=2*o-1,l=i.a-s.a,c=((a*l===-1?a:(a+l)/(1+a*l))+1)/2;r=1-c,i.r=255&c*i.r+r*s.r+.5,i.g=255&c*i.g+r*s.g+.5,i.b=255&c*i.b+r*s.b+.5,i.a=o*i.a+(1-o)*s.a,this.rgb=i}return this}interpolate(e,n){return e&&(this._rgb=XH(this._rgb,e._rgb,n)),this}clone(){return new lu(this.rgb)}alpha(e){return this._rgb.a=to(e),this}clearer(e){const n=this._rgb;return n.a*=1-e,this}greyscale(){const e=this._rgb,n=zu(e.r*.3+e.g*.59+e.b*.11);return e.r=e.g=e.b=n,this}opaquer(e){const n=this._rgb;return n.a*=1+e,this}negate(){const e=this._rgb;return e.r=255-e.r,e.g=255-e.g,e.b=255-e.b,this}lighten(e){return Cd(this._rgb,2,e),this}darken(e){return Cd(this._rgb,2,-e),this}saturate(e){return Cd(this._rgb,1,e),this}desaturate(e){return Cd(this._rgb,1,-e),this}rotate(e){return WH(this._rgb,e),this}}/*! * Chart.js v4.4.1 * https://www.chartjs.org * (c) 2023 Chart.js Contributors * Released under the MIT License - */function Ns(){}const PB=(()=>{let t=0;return()=>t++})();function ot(t){return t===null||typeof t>"u"}function yt(t){if(Array.isArray&&Array.isArray(t))return!0;const e=Object.prototype.toString.call(t);return e.slice(0,7)==="[object"&&e.slice(-6)==="Array]"}function st(t){return t!==null&&Object.prototype.toString.call(t)==="[object Object]"}function Tt(t){return(typeof t=="number"||t instanceof Number)&&isFinite(+t)}function Mn(t,e){return Tt(t)?t:e}function qe(t,e){return typeof t>"u"?e:t}const MB=(t,e)=>typeof t=="string"&&t.endsWith("%")?parseFloat(t)/100:+t/e,a0=(t,e)=>typeof t=="string"&&t.endsWith("%")?parseFloat(t)/100*e:+t;function gt(t,e,n){if(t&&typeof t.call=="function")return t.apply(n,e)}function ut(t,e,n,s){let i,o,r;if(yt(t))if(o=t.length,s)for(i=o-1;i>=0;i--)e.call(n,t[i],i);else for(i=0;it,x:t=>t.x,y:t=>t.y};function IB(t){const e=t.split("."),n=[];let s="";for(const i of e)s+=i,s.endsWith("\\")?s=s.slice(0,-1)+".":(n.push(s),s="");return n}function LB(t){const e=IB(t);return n=>{for(const s of e){if(s==="")break;n=n&&n[s]}return n}}function Di(t,e){return(Am[e]||(Am[e]=LB(e)))(t)}function Cf(t){return t.charAt(0).toUpperCase()+t.slice(1)}const Fa=t=>typeof t<"u",Oi=t=>typeof t=="function",Cm=(t,e)=>{if(t.size!==e.size)return!1;for(const n of t)if(!e.has(n))return!1;return!0};function RB(t){return t.type==="mouseup"||t.type==="click"||t.type==="contextmenu"}const xt=Math.PI,wt=2*xt,NB=wt+xt,_c=Number.POSITIVE_INFINITY,FB=xt/180,Nt=xt/2,no=xt/4,Em=xt*2/3,yi=Math.log10,$s=Math.sign;function va(t,e,n){return Math.abs(t-e)i-o).pop(),e}function kr(t){return!isNaN(parseFloat(t))&&isFinite(t)}function VB(t,e){const n=Math.round(t);return n-e<=t&&n+e>=t}function c0(t,e,n){let s,i,o;for(s=0,i=t.length;sl&&c=Math.min(e,n)-s&&t<=Math.max(e,n)+s}function Tf(t,e,n){n=n||(r=>t[r]1;)o=i+s>>1,n(o)?i=o:s=o;return{lo:i,hi:s}}const Us=(t,e,n,s)=>Tf(t,n,s?i=>{const o=t[i][e];return ot[i][e]Tf(t,n,s=>t[s][e]>=n);function zB(t,e,n){let s=0,i=t.length;for(;ss&&t[i-1]>n;)i--;return s>0||i{const s="_onData"+Cf(n),i=t[n];Object.defineProperty(t,n,{configurable:!0,enumerable:!1,value(...o){const r=i.apply(this,o);return t._chartjs.listeners.forEach(a=>{typeof a[s]=="function"&&a[s](...o)}),r}})})}function Mm(t,e){const n=t._chartjs;if(!n)return;const s=n.listeners,i=s.indexOf(e);i!==-1&&s.splice(i,1),!(s.length>0)&&(d0.forEach(o=>{delete t[o]}),delete t._chartjs)}function h0(t){const e=new Set(t);return e.size===t.length?t:Array.from(e)}const f0=function(){return typeof window>"u"?function(t){return t()}:window.requestAnimationFrame}();function p0(t,e){let n=[],s=!1;return function(...i){n=i,s||(s=!0,f0.call(window,()=>{s=!1,t.apply(e,n)}))}}function YB(t,e){let n;return function(...s){return e?(clearTimeout(n),n=setTimeout(t,e,s)):t.apply(this,s),e}}const Pf=t=>t==="start"?"left":t==="end"?"right":"center",ln=(t,e,n)=>t==="start"?e:t==="end"?n:(e+n)/2,UB=(t,e,n,s)=>t===(s?"left":"right")?n:t==="center"?(e+n)/2:e;function g0(t,e,n){const s=e.length;let i=0,o=s;if(t._sorted){const{iScale:r,_parsed:a}=t,l=r.axis,{min:c,max:u,minDefined:d,maxDefined:f}=r.getUserBounds();d&&(i=tn(Math.min(Us(a,l,c).lo,n?s:Us(e,l,r.getPixelForValue(c)).lo),0,s-1)),f?o=tn(Math.max(Us(a,r.axis,u,!0).hi+1,n?0:Us(e,l,r.getPixelForValue(u),!0).hi+1),i,s)-i:o=s-i}return{start:i,count:o}}function m0(t){const{xScale:e,yScale:n,_scaleRanges:s}=t,i={xmin:e.min,xmax:e.max,ymin:n.min,ymax:n.max};if(!s)return t._scaleRanges=i,!0;const o=s.xmin!==e.min||s.xmax!==e.max||s.ymin!==n.min||s.ymax!==n.max;return Object.assign(s,i),o}const Dl=t=>t===0||t===1,Dm=(t,e,n)=>-(Math.pow(2,10*(t-=1))*Math.sin((t-e)*wt/n)),Om=(t,e,n)=>Math.pow(2,-10*t)*Math.sin((t-e)*wt/n)+1,ya={linear:t=>t,easeInQuad:t=>t*t,easeOutQuad:t=>-t*(t-2),easeInOutQuad:t=>(t/=.5)<1?.5*t*t:-.5*(--t*(t-2)-1),easeInCubic:t=>t*t*t,easeOutCubic:t=>(t-=1)*t*t+1,easeInOutCubic:t=>(t/=.5)<1?.5*t*t*t:.5*((t-=2)*t*t+2),easeInQuart:t=>t*t*t*t,easeOutQuart:t=>-((t-=1)*t*t*t-1),easeInOutQuart:t=>(t/=.5)<1?.5*t*t*t*t:-.5*((t-=2)*t*t*t-2),easeInQuint:t=>t*t*t*t*t,easeOutQuint:t=>(t-=1)*t*t*t*t+1,easeInOutQuint:t=>(t/=.5)<1?.5*t*t*t*t*t:.5*((t-=2)*t*t*t*t+2),easeInSine:t=>-Math.cos(t*Nt)+1,easeOutSine:t=>Math.sin(t*Nt),easeInOutSine:t=>-.5*(Math.cos(xt*t)-1),easeInExpo:t=>t===0?0:Math.pow(2,10*(t-1)),easeOutExpo:t=>t===1?1:-Math.pow(2,-10*t)+1,easeInOutExpo:t=>Dl(t)?t:t<.5?.5*Math.pow(2,10*(t*2-1)):.5*(-Math.pow(2,-10*(t*2-1))+2),easeInCirc:t=>t>=1?t:-(Math.sqrt(1-t*t)-1),easeOutCirc:t=>Math.sqrt(1-(t-=1)*t),easeInOutCirc:t=>(t/=.5)<1?-.5*(Math.sqrt(1-t*t)-1):.5*(Math.sqrt(1-(t-=2)*t)+1),easeInElastic:t=>Dl(t)?t:Dm(t,.075,.3),easeOutElastic:t=>Dl(t)?t:Om(t,.075,.3),easeInOutElastic(t){return Dl(t)?t:t<.5?.5*Dm(t*2,.1125,.45):.5+.5*Om(t*2-1,.1125,.45)},easeInBack(t){return t*t*((1.70158+1)*t-1.70158)},easeOutBack(t){return(t-=1)*t*((1.70158+1)*t+1.70158)+1},easeInOutBack(t){let e=1.70158;return(t/=.5)<1?.5*(t*t*(((e*=1.525)+1)*t-e)):.5*((t-=2)*t*(((e*=1.525)+1)*t+e)+2)},easeInBounce:t=>1-ya.easeOutBounce(1-t),easeOutBounce(t){return t<1/2.75?7.5625*t*t:t<2/2.75?7.5625*(t-=1.5/2.75)*t+.75:t<2.5/2.75?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375},easeInOutBounce:t=>t<.5?ya.easeInBounce(t*2)*.5:ya.easeOutBounce(t*2-1)*.5+.5};function Mf(t){if(t&&typeof t=="object"){const e=t.toString();return e==="[object CanvasPattern]"||e==="[object CanvasGradient]"}return!1}function Im(t){return Mf(t)?t:new Ra(t)}function nd(t){return Mf(t)?t:new Ra(t).saturate(.5).darken(.1).hexString()}const qB=["x","y","borderWidth","radius","tension"],GB=["color","borderColor","backgroundColor"];function JB(t){t.set("animation",{delay:void 0,duration:1e3,easing:"easeOutQuart",fn:void 0,from:void 0,loop:void 0,to:void 0,type:void 0}),t.describe("animation",{_fallback:!1,_indexable:!1,_scriptable:e=>e!=="onProgress"&&e!=="onComplete"&&e!=="fn"}),t.set("animations",{colors:{type:"color",properties:GB},numbers:{type:"number",properties:qB}}),t.describe("animations",{_fallback:"animation"}),t.set("transitions",{active:{animation:{duration:400}},resize:{animation:{duration:0}},show:{animations:{colors:{from:"transparent"},visible:{type:"boolean",duration:0}}},hide:{animations:{colors:{to:"transparent"},visible:{type:"boolean",easing:"linear",fn:e=>e|0}}}})}function XB(t){t.set("layout",{autoPadding:!0,padding:{top:0,right:0,bottom:0,left:0}})}const Lm=new Map;function QB(t,e){e=e||{};const n=t+JSON.stringify(e);let s=Lm.get(n);return s||(s=new Intl.NumberFormat(t,e),Lm.set(n,s)),s}function el(t,e,n){return QB(e,n).format(t)}const _0={values(t){return yt(t)?t:""+t},numeric(t,e,n){if(t===0)return"0";const s=this.chart.options.locale;let i,o=t;if(n.length>1){const c=Math.max(Math.abs(n[0].value),Math.abs(n[n.length-1].value));(c<1e-4||c>1e15)&&(i="scientific"),o=ZB(t,n)}const r=yi(Math.abs(o)),a=isNaN(r)?1:Math.max(Math.min(-1*Math.floor(r),20),0),l={notation:i,minimumFractionDigits:a,maximumFractionDigits:a};return Object.assign(l,this.options.ticks.format),el(t,s,l)},logarithmic(t,e,n){if(t===0)return"0";const s=n[e].significand||t/Math.pow(10,Math.floor(yi(t)));return[1,2,3,5,10,15].includes(s)||e>.8*n.length?_0.numeric.call(this,t,e,n):""}};function ZB(t,e){let n=e.length>3?e[2].value-e[1].value:e[1].value-e[0].value;return Math.abs(n)>=1&&t!==Math.floor(t)&&(n=t-Math.floor(t)),n}var Zc={formatters:_0};function e4(t){t.set("scale",{display:!0,offset:!1,reverse:!1,beginAtZero:!1,bounds:"ticks",clip:!0,grace:0,grid:{display:!0,lineWidth:1,drawOnChartArea:!0,drawTicks:!0,tickLength:8,tickWidth:(e,n)=>n.lineWidth,tickColor:(e,n)=>n.color,offset:!1},border:{display:!0,dash:[],dashOffset:0,width:1},title:{display:!1,text:"",padding:{top:4,bottom:4}},ticks:{minRotation:0,maxRotation:50,mirror:!1,textStrokeWidth:0,textStrokeColor:"",padding:3,display:!0,autoSkip:!0,autoSkipPadding:3,labelOffset:0,callback:Zc.formatters.values,minor:{},major:{},align:"center",crossAlign:"near",showLabelBackdrop:!1,backdropColor:"rgba(255, 255, 255, 0.75)",backdropPadding:2}}),t.route("scale.ticks","color","","color"),t.route("scale.grid","color","","borderColor"),t.route("scale.border","color","","borderColor"),t.route("scale.title","color","","color"),t.describe("scale",{_fallback:!1,_scriptable:e=>!e.startsWith("before")&&!e.startsWith("after")&&e!=="callback"&&e!=="parser",_indexable:e=>e!=="borderDash"&&e!=="tickBorderDash"&&e!=="dash"}),t.describe("scales",{_fallback:"scale"}),t.describe("scale.ticks",{_scriptable:e=>e!=="backdropPadding"&&e!=="callback",_indexable:e=>e!=="backdropPadding"})}const Ao=Object.create(null),Gd=Object.create(null);function wa(t,e){if(!e)return t;const n=e.split(".");for(let s=0,i=n.length;ss.chart.platform.getDevicePixelRatio(),this.elements={},this.events=["mousemove","mouseout","click","touchstart","touchmove"],this.font={family:"'Helvetica Neue', 'Helvetica', 'Arial', sans-serif",size:12,style:"normal",lineHeight:1.2,weight:null},this.hover={},this.hoverBackgroundColor=(s,i)=>nd(i.backgroundColor),this.hoverBorderColor=(s,i)=>nd(i.borderColor),this.hoverColor=(s,i)=>nd(i.color),this.indexAxis="x",this.interaction={mode:"nearest",intersect:!0,includeInvisible:!1},this.maintainAspectRatio=!0,this.onHover=null,this.onClick=null,this.parsing=!0,this.plugins={},this.responsive=!0,this.scale=void 0,this.scales={},this.showLine=!0,this.drawActiveElementsOnTop=!0,this.describe(e),this.apply(n)}set(e,n){return sd(this,e,n)}get(e){return wa(this,e)}describe(e,n){return sd(Gd,e,n)}override(e,n){return sd(Ao,e,n)}route(e,n,s,i){const o=wa(this,e),r=wa(this,s),a="_"+n;Object.defineProperties(o,{[a]:{value:o[n],writable:!0},[n]:{enumerable:!0,get(){const l=this[a],c=r[i];return st(l)?Object.assign({},c,l):qe(l,c)},set(l){this[a]=l}}})}apply(e){e.forEach(n=>n(this))}}var Pt=new t4({_scriptable:t=>!t.startsWith("on"),_indexable:t=>t!=="events",hover:{_fallback:"interaction"},interaction:{_scriptable:!1,_indexable:!1}},[JB,XB,e4]);function n4(t){return!t||ot(t.size)||ot(t.family)?null:(t.style?t.style+" ":"")+(t.weight?t.weight+" ":"")+t.size+"px "+t.family}function bc(t,e,n,s,i){let o=e[i];return o||(o=e[i]=t.measureText(i).width,n.push(i)),o>s&&(s=o),s}function s4(t,e,n,s){s=s||{};let i=s.data=s.data||{},o=s.garbageCollect=s.garbageCollect||[];s.font!==e&&(i=s.data={},o=s.garbageCollect=[],s.font=e),t.save(),t.font=e;let r=0;const a=n.length;let l,c,u,d,f;for(l=0;ln.length){for(l=0;l0&&t.stroke()}}function qs(t,e,n){return n=n||.5,!e||t&&t.x>e.left-n&&t.xe.top-n&&t.y0&&o.strokeColor!=="";let l,c;for(t.save(),t.font=i.string,r4(t,o),l=0;l+t||0;function Df(t,e){const n={},s=st(e),i=s?Object.keys(e):e,o=st(t)?s?r=>qe(t[r],t[e[r]]):r=>t[r]:()=>t;for(const r of i)n[r]=h4(o(r));return n}function v0(t){return Df(t,{top:"y",right:"x",bottom:"y",left:"x"})}function yo(t){return Df(t,["topLeft","topRight","bottomLeft","bottomRight"])}function fn(t){const e=v0(t);return e.width=e.left+e.right,e.height=e.top+e.bottom,e}function Ut(t,e){t=t||{},e=e||Pt.font;let n=qe(t.size,e.size);typeof n=="string"&&(n=parseInt(n,10));let s=qe(t.style,e.style);s&&!(""+s).match(u4)&&(console.warn('Invalid font style specified: "'+s+'"'),s=void 0);const i={family:qe(t.family,e.family),lineHeight:d4(qe(t.lineHeight,e.lineHeight),n),size:n,style:s,weight:qe(t.weight,e.weight),string:""};return i.string=n4(i),i}function sa(t,e,n,s){let i=!0,o,r,a;for(o=0,r=t.length;on&&a===0?0:a+l;return{min:r(s,-Math.abs(o)),max:r(i,o)}}function Hi(t,e){return Object.assign(Object.create(t),e)}function Of(t,e=[""],n,s,i=()=>t[0]){const o=n||t;typeof s>"u"&&(s=k0("_fallback",t));const r={[Symbol.toStringTag]:"Object",_cacheable:!0,_scopes:t,_rootScopes:o,_fallback:s,_getTarget:i,override:a=>Of([a,...t],e,o,s)};return new Proxy(r,{deleteProperty(a,l){return delete a[l],delete a._keys,delete t[0][l],!0},get(a,l){return w0(a,l,()=>w4(l,e,t,a))},getOwnPropertyDescriptor(a,l){return Reflect.getOwnPropertyDescriptor(a._scopes[0],l)},getPrototypeOf(){return Reflect.getPrototypeOf(t[0])},has(a,l){return Fm(a).includes(l)},ownKeys(a){return Fm(a)},set(a,l,c){const u=a._storage||(a._storage=i());return a[l]=u[l]=c,delete a._keys,!0}})}function Sr(t,e,n,s){const i={_cacheable:!1,_proxy:t,_context:e,_subProxy:n,_stack:new Set,_descriptors:y0(t,s),setContext:o=>Sr(t,o,n,s),override:o=>Sr(t.override(o),e,n,s)};return new Proxy(i,{deleteProperty(o,r){return delete o[r],delete t[r],!0},get(o,r,a){return w0(o,r,()=>g4(o,r,a))},getOwnPropertyDescriptor(o,r){return o._descriptors.allKeys?Reflect.has(t,r)?{enumerable:!0,configurable:!0}:void 0:Reflect.getOwnPropertyDescriptor(t,r)},getPrototypeOf(){return Reflect.getPrototypeOf(t)},has(o,r){return Reflect.has(t,r)},ownKeys(){return Reflect.ownKeys(t)},set(o,r,a){return t[r]=a,delete o[r],!0}})}function y0(t,e={scriptable:!0,indexable:!0}){const{_scriptable:n=e.scriptable,_indexable:s=e.indexable,_allKeys:i=e.allKeys}=t;return{allKeys:i,scriptable:n,indexable:s,isScriptable:Oi(n)?n:()=>n,isIndexable:Oi(s)?s:()=>s}}const p4=(t,e)=>t?t+Cf(e):e,If=(t,e)=>st(e)&&t!=="adapters"&&(Object.getPrototypeOf(e)===null||e.constructor===Object);function w0(t,e,n){if(Object.prototype.hasOwnProperty.call(t,e))return t[e];const s=n();return t[e]=s,s}function g4(t,e,n){const{_proxy:s,_context:i,_subProxy:o,_descriptors:r}=t;let a=s[e];return Oi(a)&&r.isScriptable(e)&&(a=m4(e,a,t,n)),yt(a)&&a.length&&(a=_4(e,a,t,r.isIndexable)),If(e,a)&&(a=Sr(a,i,o&&o[e],r)),a}function m4(t,e,n,s){const{_proxy:i,_context:o,_subProxy:r,_stack:a}=n;if(a.has(t))throw new Error("Recursion detected: "+Array.from(a).join("->")+"->"+t);a.add(t);let l=e(o,r||s);return a.delete(t),If(t,l)&&(l=Lf(i._scopes,i,t,l)),l}function _4(t,e,n,s){const{_proxy:i,_context:o,_subProxy:r,_descriptors:a}=n;if(typeof o.index<"u"&&s(t))return e[o.index%e.length];if(st(e[0])){const l=e,c=i._scopes.filter(u=>u!==l);e=[];for(const u of l){const d=Lf(c,i,t,u);e.push(Sr(d,o,r&&r[t],a))}}return e}function x0(t,e,n){return Oi(t)?t(e,n):t}const b4=(t,e)=>t===!0?e:typeof t=="string"?Di(e,t):void 0;function v4(t,e,n,s,i){for(const o of e){const r=b4(n,o);if(r){t.add(r);const a=x0(r._fallback,n,i);if(typeof a<"u"&&a!==n&&a!==s)return a}else if(r===!1&&typeof s<"u"&&n!==s)return null}return!1}function Lf(t,e,n,s){const i=e._rootScopes,o=x0(e._fallback,n,s),r=[...t,...i],a=new Set;a.add(s);let l=Nm(a,r,n,o||n,s);return l===null||typeof o<"u"&&o!==n&&(l=Nm(a,r,o,l,s),l===null)?!1:Of(Array.from(a),[""],i,o,()=>y4(e,n,s))}function Nm(t,e,n,s,i){for(;n;)n=v4(t,e,n,s,i);return n}function y4(t,e,n){const s=t._getTarget();e in s||(s[e]={});const i=s[e];return yt(i)&&st(n)?n:i||{}}function w4(t,e,n,s){let i;for(const o of e)if(i=k0(p4(o,t),n),typeof i<"u")return If(t,i)?Lf(n,s,t,i):i}function k0(t,e){for(const n of e){if(!n)continue;const s=n[t];if(typeof s<"u")return s}}function Fm(t){let e=t._keys;return e||(e=t._keys=x4(t._scopes)),e}function x4(t){const e=new Set;for(const n of t)for(const s of Object.keys(n).filter(i=>!i.startsWith("_")))e.add(s);return Array.from(e)}function S0(t,e,n,s){const{iScale:i}=t,{key:o="r"}=this._parsing,r=new Array(s);let a,l,c,u;for(a=0,l=s;aet==="x"?"y":"x";function S4(t,e,n,s){const i=t.skip?e:t,o=e,r=n.skip?e:n,a=qd(o,i),l=qd(r,o);let c=a/(a+l),u=l/(a+l);c=isNaN(c)?0:c,u=isNaN(u)?0:u;const d=s*c,f=s*u;return{previous:{x:o.x-d*(r.x-i.x),y:o.y-d*(r.y-i.y)},next:{x:o.x+f*(r.x-i.x),y:o.y+f*(r.y-i.y)}}}function $4(t,e,n){const s=t.length;let i,o,r,a,l,c=$r(t,0);for(let u=0;u!c.skip)),e.cubicInterpolationMode==="monotone")C4(t,i);else{let c=s?t[t.length-1]:t[0];for(o=0,r=t.length;ot.ownerDocument.defaultView.getComputedStyle(t,null);function P4(t,e){return nu(t).getPropertyValue(e)}const M4=["top","right","bottom","left"];function wo(t,e,n){const s={};n=n?"-"+n:"";for(let i=0;i<4;i++){const o=M4[i];s[o]=parseFloat(t[e+"-"+o+n])||0}return s.width=s.left+s.right,s.height=s.top+s.bottom,s}const D4=(t,e,n)=>(t>0||e>0)&&(!n||!n.shadowRoot);function O4(t,e){const n=t.touches,s=n&&n.length?n[0]:t,{offsetX:i,offsetY:o}=s;let r=!1,a,l;if(D4(i,o,t.target))a=i,l=o;else{const c=e.getBoundingClientRect();a=s.clientX-c.left,l=s.clientY-c.top,r=!0}return{x:a,y:l,box:r}}function lo(t,e){if("native"in t)return t;const{canvas:n,currentDevicePixelRatio:s}=e,i=nu(n),o=i.boxSizing==="border-box",r=wo(i,"padding"),a=wo(i,"border","width"),{x:l,y:c,box:u}=O4(t,n),d=r.left+(u&&a.left),f=r.top+(u&&a.top);let{width:g,height:_}=e;return o&&(g-=r.width+a.width,_-=r.height+a.height),{x:Math.round((l-d)/g*n.width/s),y:Math.round((c-f)/_*n.height/s)}}function I4(t,e,n){let s,i;if(e===void 0||n===void 0){const o=Nf(t);if(!o)e=t.clientWidth,n=t.clientHeight;else{const r=o.getBoundingClientRect(),a=nu(o),l=wo(a,"border","width"),c=wo(a,"padding");e=r.width-c.width-l.width,n=r.height-c.height-l.height,s=vc(a.maxWidth,o,"clientWidth"),i=vc(a.maxHeight,o,"clientHeight")}}return{width:e,height:n,maxWidth:s||_c,maxHeight:i||_c}}const Il=t=>Math.round(t*10)/10;function L4(t,e,n,s){const i=nu(t),o=wo(i,"margin"),r=vc(i.maxWidth,t,"clientWidth")||_c,a=vc(i.maxHeight,t,"clientHeight")||_c,l=I4(t,e,n);let{width:c,height:u}=l;if(i.boxSizing==="content-box"){const f=wo(i,"border","width"),g=wo(i,"padding");c-=g.width+f.width,u-=g.height+f.height}return c=Math.max(0,c-o.width),u=Math.max(0,s?c/s:u-o.height),c=Il(Math.min(c,r,l.maxWidth)),u=Il(Math.min(u,a,l.maxHeight)),c&&!u&&(u=Il(c/2)),(e!==void 0||n!==void 0)&&s&&l.height&&u>l.height&&(u=l.height,c=Il(Math.floor(u*s))),{width:c,height:u}}function Bm(t,e,n){const s=e||1,i=Math.floor(t.height*s),o=Math.floor(t.width*s);t.height=Math.floor(t.height),t.width=Math.floor(t.width);const r=t.canvas;return r.style&&(n||!r.style.height&&!r.style.width)&&(r.style.height=`${t.height}px`,r.style.width=`${t.width}px`),t.currentDevicePixelRatio!==s||r.height!==i||r.width!==o?(t.currentDevicePixelRatio=s,r.height=i,r.width=o,t.ctx.setTransform(s,0,0,s,0,0),!0):!1}const R4=function(){let t=!1;try{const e={get passive(){return t=!0,!1}};Rf()&&(window.addEventListener("test",null,e),window.removeEventListener("test",null,e))}catch{}return t}();function Vm(t,e){const n=P4(t,e),s=n&&n.match(/^(\d+)(\.\d+)?px$/);return s?+s[1]:void 0}function co(t,e,n,s){return{x:t.x+n*(e.x-t.x),y:t.y+n*(e.y-t.y)}}function N4(t,e,n,s){return{x:t.x+n*(e.x-t.x),y:s==="middle"?n<.5?t.y:e.y:s==="after"?n<1?t.y:e.y:n>0?e.y:t.y}}function F4(t,e,n,s){const i={x:t.cp2x,y:t.cp2y},o={x:e.cp1x,y:e.cp1y},r=co(t,i,n),a=co(i,o,n),l=co(o,e,n),c=co(r,a,n),u=co(a,l,n);return co(c,u,n)}const B4=function(t,e){return{x(n){return t+t+e-n},setWidth(n){e=n},textAlign(n){return n==="center"?n:n==="right"?"left":"right"},xPlus(n,s){return n-s},leftForLtr(n,s){return n-s}}},V4=function(){return{x(t){return t},setWidth(t){},textAlign(t){return t},xPlus(t,e){return t+e},leftForLtr(t,e){return t}}};function or(t,e,n){return t?B4(e,n):V4()}function A0(t,e){let n,s;(e==="ltr"||e==="rtl")&&(n=t.canvas.style,s=[n.getPropertyValue("direction"),n.getPropertyPriority("direction")],n.setProperty("direction",e,"important"),t.prevTextDirection=s)}function C0(t,e){e!==void 0&&(delete t.prevTextDirection,t.canvas.style.setProperty("direction",e[0],e[1]))}function E0(t){return t==="angle"?{between:Ba,compare:HB,normalize:On}:{between:Ys,compare:(e,n)=>e-n,normalize:e=>e}}function Hm({start:t,end:e,count:n,loop:s,style:i}){return{start:t%n,end:e%n,loop:s&&(e-t+1)%n===0,style:i}}function H4(t,e,n){const{property:s,start:i,end:o}=n,{between:r,normalize:a}=E0(s),l=e.length;let{start:c,end:u,loop:d}=t,f,g;if(d){for(c+=l,u+=l,f=0,g=l;fl(i,A,v)&&a(i,A)!==0,x=()=>a(o,v)===0||l(o,A,v),w=()=>m||D(),S=()=>!m||x();for(let T=u,M=u;T<=d;++T)$=e[T%r],!$.skip&&(v=c($[s]),v!==A&&(m=l(v,i,o),y===null&&w()&&(y=a(v,i)===0?T:M),y!==null&&S()&&(_.push(Hm({start:y,end:T,loop:f,count:r,style:g})),y=null),M=T,A=v));return y!==null&&_.push(Hm({start:y,end:d,loop:f,count:r,style:g})),_}function P0(t,e){const n=[],s=t.segments;for(let i=0;ii&&t[o%e].skip;)o--;return o%=e,{start:i,end:o}}function W4(t,e,n,s){const i=t.length,o=[];let r=e,a=t[e],l;for(l=e+1;l<=n;++l){const c=t[l%i];c.skip||c.stop?a.skip||(s=!1,o.push({start:e%i,end:(l-1)%i,loop:s}),e=r=c.stop?l:null):(r=l,a.skip&&(e=l)),a=c}return r!==null&&o.push({start:e%i,end:r%i,loop:s}),o}function z4(t,e){const n=t.points,s=t.options.spanGaps,i=n.length;if(!i)return[];const o=!!t._loop,{start:r,end:a}=j4(n,i,o,s);if(s===!0)return jm(t,[{start:r,end:a,loop:o}],n,e);const l=a{let t=0;return()=>t++})();function gt(t){return t===null||typeof t>"u"}function Nt(t){if(Array.isArray&&Array.isArray(t))return!0;const e=Object.prototype.toString.call(t);return e.slice(0,7)==="[object"&&e.slice(-6)==="Array]"}function ut(t){return t!==null&&Object.prototype.toString.call(t)==="[object Object]"}function qt(t){return(typeof t=="number"||t instanceof Number)&&isFinite(+t)}function xi(t,e){return qt(t)?t:e}function tt(t,e){return typeof t>"u"?e:t}const JH=(t,e)=>typeof t=="string"&&t.endsWith("%")?parseFloat(t)/100:+t/e,yC=(t,e)=>typeof t=="string"&&t.endsWith("%")?parseFloat(t)/100*e:+t;function Pt(t,e,n){if(t&&typeof t.call=="function")return t.apply(n,e)}function Ct(t,e,n,i){let s,r,o;if(Nt(t))if(r=t.length,i)for(s=r-1;s>=0;s--)e.call(n,t[s],s);else for(s=0;st,x:t=>t.x,y:t=>t.y};function tY(t){const e=t.split("."),n=[];let i="";for(const s of e)i+=s,i.endsWith("\\")?i=i.slice(0,-1)+".":(n.push(i),i="");return n}function nY(t){const e=tY(t);return n=>{for(const i of e){if(i==="")break;n=n&&n[i]}return n}}function ao(t,e){return(Ob[e]||(Ob[e]=nY(e)))(t)}function q_(t){return t.charAt(0).toUpperCase()+t.slice(1)}const uu=t=>typeof t<"u",lo=t=>typeof t=="function",Nb=(t,e)=>{if(t.size!==e.size)return!1;for(const n of t)if(!e.has(n))return!1;return!0};function iY(t){return t.type==="mouseup"||t.type==="click"||t.type==="contextmenu"}const Bt=Math.PI,Ft=2*Bt,sY=Ft+Bt,Eh=Number.POSITIVE_INFINITY,rY=Bt/180,on=Bt/2,Do=Bt/4,Fb=Bt*2/3,Kr=Math.log10,Ds=Math.sign;function Yc(t,e,n){return Math.abs(t-e)s-r).pop(),e}function Al(t){return!isNaN(parseFloat(t))&&isFinite(t)}function aY(t,e){const n=Math.round(t);return n-e<=t&&n+e>=t}function bC(t,e,n){let i,s,r;for(i=0,s=t.length;il&&c=Math.min(e,n)-i&&t<=Math.max(e,n)+i}function J_(t,e,n){n=n||(o=>t[o]1;)r=s+i>>1,n(r)?s=r:i=r;return{lo:s,hi:i}}const or=(t,e,n,i)=>J_(t,n,i?s=>{const r=t[s][e];return rt[s][e]J_(t,n,i=>t[i][e]>=n);function dY(t,e,n){let i=0,s=t.length;for(;ii&&t[s-1]>n;)s--;return i>0||s{const i="_onData"+q_(n),s=t[n];Object.defineProperty(t,n,{configurable:!0,enumerable:!1,value(...r){const o=s.apply(this,r);return t._chartjs.listeners.forEach(a=>{typeof a[i]=="function"&&a[i](...r)}),o}})})}function zb(t,e){const n=t._chartjs;if(!n)return;const i=n.listeners,s=i.indexOf(e);s!==-1&&i.splice(s,1),!(i.length>0)&&(xC.forEach(r=>{delete t[r]}),delete t._chartjs)}function EC(t){const e=new Set(t);return e.size===t.length?t:Array.from(e)}const SC=function(){return typeof window>"u"?function(t){return t()}:window.requestAnimationFrame}();function CC(t,e){let n=[],i=!1;return function(...s){n=s,i||(i=!0,SC.call(window,()=>{i=!1,t.apply(e,n)}))}}function fY(t,e){let n;return function(...i){return e?(clearTimeout(n),n=setTimeout(t,e,i)):t.apply(this,i),e}}const Q_=t=>t==="start"?"left":t==="end"?"right":"center",Bn=(t,e,n)=>t==="start"?e:t==="end"?n:(e+n)/2,gY=(t,e,n,i)=>t===(i?"left":"right")?n:t==="center"?(e+n)/2:e;function TC(t,e,n){const i=e.length;let s=0,r=i;if(t._sorted){const{iScale:o,_parsed:a}=t,l=o.axis,{min:c,max:u,minDefined:d,maxDefined:h}=o.getUserBounds();d&&(s=Pn(Math.min(or(a,l,c).lo,n?i:or(e,l,o.getPixelForValue(c)).lo),0,i-1)),h?r=Pn(Math.max(or(a,o.axis,u,!0).hi+1,n?0:or(e,l,o.getPixelForValue(u),!0).hi+1),s,i)-s:r=i-s}return{start:s,count:r}}function kC(t){const{xScale:e,yScale:n,_scaleRanges:i}=t,s={xmin:e.min,xmax:e.max,ymin:n.min,ymax:n.max};if(!i)return t._scaleRanges=s,!0;const r=i.xmin!==e.min||i.xmax!==e.max||i.ymin!==n.min||i.ymax!==n.max;return Object.assign(i,s),r}const Td=t=>t===0||t===1,Wb=(t,e,n)=>-(Math.pow(2,10*(t-=1))*Math.sin((t-e)*Ft/n)),Hb=(t,e,n)=>Math.pow(2,-10*t)*Math.sin((t-e)*Ft/n)+1,jc={linear:t=>t,easeInQuad:t=>t*t,easeOutQuad:t=>-t*(t-2),easeInOutQuad:t=>(t/=.5)<1?.5*t*t:-.5*(--t*(t-2)-1),easeInCubic:t=>t*t*t,easeOutCubic:t=>(t-=1)*t*t+1,easeInOutCubic:t=>(t/=.5)<1?.5*t*t*t:.5*((t-=2)*t*t+2),easeInQuart:t=>t*t*t*t,easeOutQuart:t=>-((t-=1)*t*t*t-1),easeInOutQuart:t=>(t/=.5)<1?.5*t*t*t*t:-.5*((t-=2)*t*t*t-2),easeInQuint:t=>t*t*t*t*t,easeOutQuint:t=>(t-=1)*t*t*t*t+1,easeInOutQuint:t=>(t/=.5)<1?.5*t*t*t*t*t:.5*((t-=2)*t*t*t*t+2),easeInSine:t=>-Math.cos(t*on)+1,easeOutSine:t=>Math.sin(t*on),easeInOutSine:t=>-.5*(Math.cos(Bt*t)-1),easeInExpo:t=>t===0?0:Math.pow(2,10*(t-1)),easeOutExpo:t=>t===1?1:-Math.pow(2,-10*t)+1,easeInOutExpo:t=>Td(t)?t:t<.5?.5*Math.pow(2,10*(t*2-1)):.5*(-Math.pow(2,-10*(t*2-1))+2),easeInCirc:t=>t>=1?t:-(Math.sqrt(1-t*t)-1),easeOutCirc:t=>Math.sqrt(1-(t-=1)*t),easeInOutCirc:t=>(t/=.5)<1?-.5*(Math.sqrt(1-t*t)-1):.5*(Math.sqrt(1-(t-=2)*t)+1),easeInElastic:t=>Td(t)?t:Wb(t,.075,.3),easeOutElastic:t=>Td(t)?t:Hb(t,.075,.3),easeInOutElastic(t){return Td(t)?t:t<.5?.5*Wb(t*2,.1125,.45):.5+.5*Hb(t*2-1,.1125,.45)},easeInBack(t){return t*t*((1.70158+1)*t-1.70158)},easeOutBack(t){return(t-=1)*t*((1.70158+1)*t+1.70158)+1},easeInOutBack(t){let e=1.70158;return(t/=.5)<1?.5*(t*t*(((e*=1.525)+1)*t-e)):.5*((t-=2)*t*(((e*=1.525)+1)*t+e)+2)},easeInBounce:t=>1-jc.easeOutBounce(1-t),easeOutBounce(t){return t<1/2.75?7.5625*t*t:t<2/2.75?7.5625*(t-=1.5/2.75)*t+.75:t<2.5/2.75?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375},easeInOutBounce:t=>t<.5?jc.easeInBounce(t*2)*.5:jc.easeOutBounce(t*2-1)*.5+.5};function ey(t){if(t&&typeof t=="object"){const e=t.toString();return e==="[object CanvasPattern]"||e==="[object CanvasGradient]"}return!1}function Yb(t){return ey(t)?t:new lu(t)}function jg(t){return ey(t)?t:new lu(t).saturate(.5).darken(.1).hexString()}const pY=["x","y","borderWidth","radius","tension"],mY=["color","borderColor","backgroundColor"];function _Y(t){t.set("animation",{delay:void 0,duration:1e3,easing:"easeOutQuart",fn:void 0,from:void 0,loop:void 0,to:void 0,type:void 0}),t.describe("animation",{_fallback:!1,_indexable:!1,_scriptable:e=>e!=="onProgress"&&e!=="onComplete"&&e!=="fn"}),t.set("animations",{colors:{type:"color",properties:mY},numbers:{type:"number",properties:pY}}),t.describe("animations",{_fallback:"animation"}),t.set("transitions",{active:{animation:{duration:400}},resize:{animation:{duration:0}},show:{animations:{colors:{from:"transparent"},visible:{type:"boolean",duration:0}}},hide:{animations:{colors:{to:"transparent"},visible:{type:"boolean",easing:"linear",fn:e=>e|0}}}})}function yY(t){t.set("layout",{autoPadding:!0,padding:{top:0,right:0,bottom:0,left:0}})}const jb=new Map;function vY(t,e){e=e||{};const n=t+JSON.stringify(e);let i=jb.get(n);return i||(i=new Intl.NumberFormat(t,e),jb.set(n,i)),i}function Wu(t,e,n){return vY(e,n).format(t)}const AC={values(t){return Nt(t)?t:""+t},numeric(t,e,n){if(t===0)return"0";const i=this.chart.options.locale;let s,r=t;if(n.length>1){const c=Math.max(Math.abs(n[0].value),Math.abs(n[n.length-1].value));(c<1e-4||c>1e15)&&(s="scientific"),r=bY(t,n)}const o=Kr(Math.abs(r)),a=isNaN(o)?1:Math.max(Math.min(-1*Math.floor(o),20),0),l={notation:s,minimumFractionDigits:a,maximumFractionDigits:a};return Object.assign(l,this.options.ticks.format),Wu(t,i,l)},logarithmic(t,e,n){if(t===0)return"0";const i=n[e].significand||t/Math.pow(10,Math.floor(Kr(t)));return[1,2,3,5,10,15].includes(i)||e>.8*n.length?AC.numeric.call(this,t,e,n):""}};function bY(t,e){let n=e.length>3?e[2].value-e[1].value:e[1].value-e[0].value;return Math.abs(n)>=1&&t!==Math.floor(t)&&(n=t-Math.floor(t)),n}var xf={formatters:AC};function wY(t){t.set("scale",{display:!0,offset:!1,reverse:!1,beginAtZero:!1,bounds:"ticks",clip:!0,grace:0,grid:{display:!0,lineWidth:1,drawOnChartArea:!0,drawTicks:!0,tickLength:8,tickWidth:(e,n)=>n.lineWidth,tickColor:(e,n)=>n.color,offset:!1},border:{display:!0,dash:[],dashOffset:0,width:1},title:{display:!1,text:"",padding:{top:4,bottom:4}},ticks:{minRotation:0,maxRotation:50,mirror:!1,textStrokeWidth:0,textStrokeColor:"",padding:3,display:!0,autoSkip:!0,autoSkipPadding:3,labelOffset:0,callback:xf.formatters.values,minor:{},major:{},align:"center",crossAlign:"near",showLabelBackdrop:!1,backdropColor:"rgba(255, 255, 255, 0.75)",backdropPadding:2}}),t.route("scale.ticks","color","","color"),t.route("scale.grid","color","","borderColor"),t.route("scale.border","color","","borderColor"),t.route("scale.title","color","","color"),t.describe("scale",{_fallback:!1,_scriptable:e=>!e.startsWith("before")&&!e.startsWith("after")&&e!=="callback"&&e!=="parser",_indexable:e=>e!=="borderDash"&&e!=="tickBorderDash"&&e!=="dash"}),t.describe("scales",{_fallback:"scale"}),t.describe("scale.ticks",{_scriptable:e=>e!=="backdropPadding"&&e!=="callback",_indexable:e=>e!=="backdropPadding"})}const ca=Object.create(null),rm=Object.create(null);function Kc(t,e){if(!e)return t;const n=e.split(".");for(let i=0,s=n.length;ii.chart.platform.getDevicePixelRatio(),this.elements={},this.events=["mousemove","mouseout","click","touchstart","touchmove"],this.font={family:"'Helvetica Neue', 'Helvetica', 'Arial', sans-serif",size:12,style:"normal",lineHeight:1.2,weight:null},this.hover={},this.hoverBackgroundColor=(i,s)=>jg(s.backgroundColor),this.hoverBorderColor=(i,s)=>jg(s.borderColor),this.hoverColor=(i,s)=>jg(s.color),this.indexAxis="x",this.interaction={mode:"nearest",intersect:!0,includeInvisible:!1},this.maintainAspectRatio=!0,this.onHover=null,this.onClick=null,this.parsing=!0,this.plugins={},this.responsive=!0,this.scale=void 0,this.scales={},this.showLine=!0,this.drawActiveElementsOnTop=!0,this.describe(e),this.apply(n)}set(e,n){return Kg(this,e,n)}get(e){return Kc(this,e)}describe(e,n){return Kg(rm,e,n)}override(e,n){return Kg(ca,e,n)}route(e,n,i,s){const r=Kc(this,e),o=Kc(this,i),a="_"+n;Object.defineProperties(r,{[a]:{value:r[n],writable:!0},[n]:{enumerable:!0,get(){const l=this[a],c=o[s];return ut(l)?Object.assign({},c,l):tt(l,c)},set(l){this[a]=l}}})}apply(e){e.forEach(n=>n(this))}}var Zt=new xY({_scriptable:t=>!t.startsWith("on"),_indexable:t=>t!=="events",hover:{_fallback:"interaction"},interaction:{_scriptable:!1,_indexable:!1}},[_Y,yY,wY]);function EY(t){return!t||gt(t.size)||gt(t.family)?null:(t.style?t.style+" ":"")+(t.weight?t.weight+" ":"")+t.size+"px "+t.family}function Sh(t,e,n,i,s){let r=e[s];return r||(r=e[s]=t.measureText(s).width,n.push(s)),r>i&&(i=r),i}function SY(t,e,n,i){i=i||{};let s=i.data=i.data||{},r=i.garbageCollect=i.garbageCollect||[];i.font!==e&&(s=i.data={},r=i.garbageCollect=[],i.font=e),t.save(),t.font=e;let o=0;const a=n.length;let l,c,u,d,h;for(l=0;ln.length){for(l=0;l0&&t.stroke()}}function ar(t,e,n){return n=n||.5,!e||t&&t.x>e.left-n&&t.xe.top-n&&t.y0&&r.strokeColor!=="";let l,c;for(t.save(),t.font=s.string,kY(t,r),l=0;l+t||0;function ty(t,e){const n={},i=ut(e),s=i?Object.keys(e):e,r=ut(t)?i?o=>tt(t[o],t[e[o]]):o=>t[o]:()=>t;for(const o of s)n[o]=DY(r(o));return n}function IC(t){return ty(t,{top:"y",right:"x",bottom:"y",left:"x"})}function ia(t){return ty(t,["topLeft","topRight","bottomLeft","bottomRight"])}function Kn(t){const e=IC(t);return e.width=e.left+e.right,e.height=e.top+e.bottom,e}function vn(t,e){t=t||{},e=e||Zt.font;let n=tt(t.size,e.size);typeof n=="string"&&(n=parseInt(n,10));let i=tt(t.style,e.style);i&&!(""+i).match(PY)&&(console.warn('Invalid font style specified: "'+i+'"'),i=void 0);const s={family:tt(t.family,e.family),lineHeight:RY(tt(t.lineHeight,e.lineHeight),n),size:n,style:i,weight:tt(t.weight,e.weight),string:""};return s.string=EY(s),s}function xc(t,e,n,i){let s=!0,r,o,a;for(r=0,o=t.length;rn&&a===0?0:a+l;return{min:o(i,-Math.abs(r)),max:o(s,r)}}function yo(t,e){return Object.assign(Object.create(t),e)}function ny(t,e=[""],n,i,s=()=>t[0]){const r=n||t;typeof i>"u"&&(i=$C("_fallback",t));const o={[Symbol.toStringTag]:"Object",_cacheable:!0,_scopes:t,_rootScopes:r,_fallback:i,_getTarget:s,override:a=>ny([a,...t],e,r,i)};return new Proxy(o,{deleteProperty(a,l){return delete a[l],delete a._keys,delete t[0][l],!0},get(a,l){return RC(a,l,()=>WY(l,e,t,a))},getOwnPropertyDescriptor(a,l){return Reflect.getOwnPropertyDescriptor(a._scopes[0],l)},getPrototypeOf(){return Reflect.getPrototypeOf(t[0])},has(a,l){return Gb(a).includes(l)},ownKeys(a){return Gb(a)},set(a,l,c){const u=a._storage||(a._storage=s());return a[l]=u[l]=c,delete a._keys,!0}})}function Ml(t,e,n,i){const s={_cacheable:!1,_proxy:t,_context:e,_subProxy:n,_stack:new Set,_descriptors:PC(t,i),setContext:r=>Ml(t,r,n,i),override:r=>Ml(t.override(r),e,n,i)};return new Proxy(s,{deleteProperty(r,o){return delete r[o],delete t[o],!0},get(r,o,a){return RC(r,o,()=>OY(r,o,a))},getOwnPropertyDescriptor(r,o){return r._descriptors.allKeys?Reflect.has(t,o)?{enumerable:!0,configurable:!0}:void 0:Reflect.getOwnPropertyDescriptor(t,o)},getPrototypeOf(){return Reflect.getPrototypeOf(t)},has(r,o){return Reflect.has(t,o)},ownKeys(){return Reflect.ownKeys(t)},set(r,o,a){return t[o]=a,delete r[o],!0}})}function PC(t,e={scriptable:!0,indexable:!0}){const{_scriptable:n=e.scriptable,_indexable:i=e.indexable,_allKeys:s=e.allKeys}=t;return{allKeys:s,scriptable:n,indexable:i,isScriptable:lo(n)?n:()=>n,isIndexable:lo(i)?i:()=>i}}const LY=(t,e)=>t?t+q_(e):e,iy=(t,e)=>ut(e)&&t!=="adapters"&&(Object.getPrototypeOf(e)===null||e.constructor===Object);function RC(t,e,n){if(Object.prototype.hasOwnProperty.call(t,e))return t[e];const i=n();return t[e]=i,i}function OY(t,e,n){const{_proxy:i,_context:s,_subProxy:r,_descriptors:o}=t;let a=i[e];return lo(a)&&o.isScriptable(e)&&(a=NY(e,a,t,n)),Nt(a)&&a.length&&(a=FY(e,a,t,o.isIndexable)),iy(e,a)&&(a=Ml(a,s,r&&r[e],o)),a}function NY(t,e,n,i){const{_proxy:s,_context:r,_subProxy:o,_stack:a}=n;if(a.has(t))throw new Error("Recursion detected: "+Array.from(a).join("->")+"->"+t);a.add(t);let l=e(r,o||i);return a.delete(t),iy(t,l)&&(l=sy(s._scopes,s,t,l)),l}function FY(t,e,n,i){const{_proxy:s,_context:r,_subProxy:o,_descriptors:a}=n;if(typeof r.index<"u"&&i(t))return e[r.index%e.length];if(ut(e[0])){const l=e,c=s._scopes.filter(u=>u!==l);e=[];for(const u of l){const d=sy(c,s,t,u);e.push(Ml(d,r,o&&o[t],a))}}return e}function DC(t,e,n){return lo(t)?t(e,n):t}const BY=(t,e)=>t===!0?e:typeof t=="string"?ao(e,t):void 0;function VY(t,e,n,i,s){for(const r of e){const o=BY(n,r);if(o){t.add(o);const a=DC(o._fallback,n,s);if(typeof a<"u"&&a!==n&&a!==i)return a}else if(o===!1&&typeof i<"u"&&n!==i)return null}return!1}function sy(t,e,n,i){const s=e._rootScopes,r=DC(e._fallback,n,i),o=[...t,...s],a=new Set;a.add(i);let l=Ub(a,o,n,r||n,i);return l===null||typeof r<"u"&&r!==n&&(l=Ub(a,o,r,l,i),l===null)?!1:ny(Array.from(a),[""],s,r,()=>zY(e,n,i))}function Ub(t,e,n,i,s){for(;n;)n=VY(t,e,n,i,s);return n}function zY(t,e,n){const i=t._getTarget();e in i||(i[e]={});const s=i[e];return Nt(s)&&ut(n)?n:s||{}}function WY(t,e,n,i){let s;for(const r of e)if(s=$C(LY(r,t),n),typeof s<"u")return iy(t,s)?sy(n,i,t,s):s}function $C(t,e){for(const n of e){if(!n)continue;const i=n[t];if(typeof i<"u")return i}}function Gb(t){let e=t._keys;return e||(e=t._keys=HY(t._scopes)),e}function HY(t){const e=new Set;for(const n of t)for(const i of Object.keys(n).filter(s=>!s.startsWith("_")))e.add(i);return Array.from(e)}function LC(t,e,n,i){const{iScale:s}=t,{key:r="r"}=this._parsing,o=new Array(i);let a,l,c,u;for(a=0,l=i;aet==="x"?"y":"x";function jY(t,e,n,i){const s=t.skip?e:t,r=e,o=n.skip?e:n,a=sm(r,s),l=sm(o,r);let c=a/(a+l),u=l/(a+l);c=isNaN(c)?0:c,u=isNaN(u)?0:u;const d=i*c,h=i*u;return{previous:{x:r.x-d*(o.x-s.x),y:r.y-d*(o.y-s.y)},next:{x:r.x+h*(o.x-s.x),y:r.y+h*(o.y-s.y)}}}function KY(t,e,n){const i=t.length;let s,r,o,a,l,c=Il(t,0);for(let u=0;u!c.skip)),e.cubicInterpolationMode==="monotone")GY(t,s);else{let c=i?t[t.length-1]:t[0];for(r=0,o=t.length;rt.ownerDocument.defaultView.getComputedStyle(t,null);function ZY(t,e){return Cf(t).getPropertyValue(e)}const JY=["top","right","bottom","left"];function sa(t,e,n){const i={};n=n?"-"+n:"";for(let s=0;s<4;s++){const r=JY[s];i[r]=parseFloat(t[e+"-"+r+n])||0}return i.width=i.left+i.right,i.height=i.top+i.bottom,i}const QY=(t,e,n)=>(t>0||e>0)&&(!n||!n.shadowRoot);function ej(t,e){const n=t.touches,i=n&&n.length?n[0]:t,{offsetX:s,offsetY:r}=i;let o=!1,a,l;if(QY(s,r,t.target))a=s,l=r;else{const c=e.getBoundingClientRect();a=i.clientX-c.left,l=i.clientY-c.top,o=!0}return{x:a,y:l,box:o}}function zo(t,e){if("native"in t)return t;const{canvas:n,currentDevicePixelRatio:i}=e,s=Cf(n),r=s.boxSizing==="border-box",o=sa(s,"padding"),a=sa(s,"border","width"),{x:l,y:c,box:u}=ej(t,n),d=o.left+(u&&a.left),h=o.top+(u&&a.top);let{width:f,height:p}=e;return r&&(f-=o.width+a.width,p-=o.height+a.height),{x:Math.round((l-d)/f*n.width/i),y:Math.round((c-h)/p*n.height/i)}}function tj(t,e,n){let i,s;if(e===void 0||n===void 0){const r=oy(t);if(!r)e=t.clientWidth,n=t.clientHeight;else{const o=r.getBoundingClientRect(),a=Cf(r),l=sa(a,"border","width"),c=sa(a,"padding");e=o.width-c.width-l.width,n=o.height-c.height-l.height,i=Ch(a.maxWidth,r,"clientWidth"),s=Ch(a.maxHeight,r,"clientHeight")}}return{width:e,height:n,maxWidth:i||Eh,maxHeight:s||Eh}}const Ad=t=>Math.round(t*10)/10;function nj(t,e,n,i){const s=Cf(t),r=sa(s,"margin"),o=Ch(s.maxWidth,t,"clientWidth")||Eh,a=Ch(s.maxHeight,t,"clientHeight")||Eh,l=tj(t,e,n);let{width:c,height:u}=l;if(s.boxSizing==="content-box"){const h=sa(s,"border","width"),f=sa(s,"padding");c-=f.width+h.width,u-=f.height+h.height}return c=Math.max(0,c-r.width),u=Math.max(0,i?c/i:u-r.height),c=Ad(Math.min(c,o,l.maxWidth)),u=Ad(Math.min(u,a,l.maxHeight)),c&&!u&&(u=Ad(c/2)),(e!==void 0||n!==void 0)&&i&&l.height&&u>l.height&&(u=l.height,c=Ad(Math.floor(u*i))),{width:c,height:u}}function Xb(t,e,n){const i=e||1,s=Math.floor(t.height*i),r=Math.floor(t.width*i);t.height=Math.floor(t.height),t.width=Math.floor(t.width);const o=t.canvas;return o.style&&(n||!o.style.height&&!o.style.width)&&(o.style.height=`${t.height}px`,o.style.width=`${t.width}px`),t.currentDevicePixelRatio!==i||o.height!==s||o.width!==r?(t.currentDevicePixelRatio=i,o.height=s,o.width=r,t.ctx.setTransform(i,0,0,i,0,0),!0):!1}const ij=function(){let t=!1;try{const e={get passive(){return t=!0,!1}};ry()&&(window.addEventListener("test",null,e),window.removeEventListener("test",null,e))}catch{}return t}();function qb(t,e){const n=ZY(t,e),i=n&&n.match(/^(\d+)(\.\d+)?px$/);return i?+i[1]:void 0}function Wo(t,e,n,i){return{x:t.x+n*(e.x-t.x),y:t.y+n*(e.y-t.y)}}function sj(t,e,n,i){return{x:t.x+n*(e.x-t.x),y:i==="middle"?n<.5?t.y:e.y:i==="after"?n<1?t.y:e.y:n>0?e.y:t.y}}function rj(t,e,n,i){const s={x:t.cp2x,y:t.cp2y},r={x:e.cp1x,y:e.cp1y},o=Wo(t,s,n),a=Wo(s,r,n),l=Wo(r,e,n),c=Wo(o,a,n),u=Wo(a,l,n);return Wo(c,u,n)}const oj=function(t,e){return{x(n){return t+t+e-n},setWidth(n){e=n},textAlign(n){return n==="center"?n:n==="right"?"left":"right"},xPlus(n,i){return n-i},leftForLtr(n,i){return n-i}}},aj=function(){return{x(t){return t},setWidth(t){},textAlign(t){return t},xPlus(t,e){return t+e},leftForLtr(t,e){return t}}};function ol(t,e,n){return t?oj(e,n):aj()}function NC(t,e){let n,i;(e==="ltr"||e==="rtl")&&(n=t.canvas.style,i=[n.getPropertyValue("direction"),n.getPropertyPriority("direction")],n.setProperty("direction",e,"important"),t.prevTextDirection=i)}function FC(t,e){e!==void 0&&(delete t.prevTextDirection,t.canvas.style.setProperty("direction",e[0],e[1]))}function BC(t){return t==="angle"?{between:du,compare:lY,normalize:Si}:{between:rr,compare:(e,n)=>e-n,normalize:e=>e}}function Zb({start:t,end:e,count:n,loop:i,style:s}){return{start:t%n,end:e%n,loop:i&&(e-t+1)%n===0,style:s}}function lj(t,e,n){const{property:i,start:s,end:r}=n,{between:o,normalize:a}=BC(i),l=e.length;let{start:c,end:u,loop:d}=t,h,f;if(d){for(c+=l,u+=l,h=0,f=l;hl(s,E,v)&&a(s,E)!==0,w=()=>a(r,v)===0||l(r,E,v),x=()=>m||C(),T=()=>!m||w();for(let k=u,A=u;k<=d;++k)b=e[k%o],!b.skip&&(v=c(b[i]),v!==E&&(m=l(v,s,r),y===null&&x()&&(y=a(v,s)===0?k:A),y!==null&&T()&&(p.push(Zb({start:y,end:k,loop:h,count:o,style:f})),y=null),A=k,E=v));return y!==null&&p.push(Zb({start:y,end:d,loop:h,count:o,style:f})),p}function zC(t,e){const n=[],i=t.segments;for(let s=0;ss&&t[r%e].skip;)r--;return r%=e,{start:s,end:r}}function uj(t,e,n,i){const s=t.length,r=[];let o=e,a=t[e],l;for(l=e+1;l<=n;++l){const c=t[l%s];c.skip||c.stop?a.skip||(i=!1,r.push({start:e%s,end:(l-1)%s,loop:i}),e=o=c.stop?l:null):(o=l,a.skip&&(e=l)),a=c}return o!==null&&r.push({start:e%s,end:o%s,loop:i}),r}function dj(t,e){const n=t.points,i=t.options.spanGaps,s=n.length;if(!s)return[];const r=!!t._loop,{start:o,end:a}=cj(n,s,r,i);if(i===!0)return Jb(t,[{start:o,end:a,loop:r}],n,e);const l=aa({chart:e,initial:n.initial,numSteps:r,currentStep:Math.min(s-n.start,r)}))}_refresh(){this._request||(this._running=!0,this._request=f0.call(window,()=>{this._update(),this._request=null,this._running&&this._refresh()}))}_update(e=Date.now()){let n=0;this._charts.forEach((s,i)=>{if(!s.running||!s.items.length)return;const o=s.items;let r=o.length-1,a=!1,l;for(;r>=0;--r)l=o[r],l._active?(l._total>s.duration&&(s.duration=l._total),l.tick(e),a=!0):(o[r]=o[o.length-1],o.pop());a&&(i.draw(),this._notify(i,s,e,"progress")),o.length||(s.running=!1,this._notify(i,s,e,"complete"),s.initial=!1),n+=o.length}),this._lastDate=e,n===0&&(this._running=!1)}_getAnims(e){const n=this._charts;let s=n.get(e);return s||(s={running:!1,initial:!0,items:[],listeners:{complete:[],progress:[]}},n.set(e,s)),s}listen(e,n,s){this._getAnims(e).listeners[n].push(s)}add(e,n){!n||!n.length||this._getAnims(e).items.push(...n)}has(e){return this._getAnims(e).items.length>0}start(e){const n=this._charts.get(e);n&&(n.running=!0,n.start=Date.now(),n.duration=n.items.reduce((s,i)=>Math.max(s,i._duration),0),this._refresh())}running(e){if(!this._running)return!1;const n=this._charts.get(e);return!(!n||!n.running||!n.items.length)}stop(e){const n=this._charts.get(e);if(!n||!n.items.length)return;const s=n.items;let i=s.length-1;for(;i>=0;--i)s[i].cancel();n.items=[],this._notify(e,n,Date.now(),"complete")}remove(e){return this._charts.delete(e)}}var Bs=new U4;const zm="transparent",q4={boolean(t,e,n){return n>.5?e:t},color(t,e,n){const s=Im(t||zm),i=s.valid&&Im(e||zm);return i&&i.valid?i.mix(s,n).hexString():e},number(t,e,n){return t+(e-t)*n}};class G4{constructor(e,n,s,i){const o=n[s];i=sa([e.to,i,o,e.from]);const r=sa([e.from,o,i]);this._active=!0,this._fn=e.fn||q4[e.type||typeof r],this._easing=ya[e.easing]||ya.linear,this._start=Math.floor(Date.now()+(e.delay||0)),this._duration=this._total=Math.floor(e.duration),this._loop=!!e.loop,this._target=n,this._prop=s,this._from=r,this._to=i,this._promises=void 0}active(){return this._active}update(e,n,s){if(this._active){this._notify(!1);const i=this._target[this._prop],o=s-this._start,r=this._duration-o;this._start=s,this._duration=Math.floor(Math.max(r,e.duration)),this._total+=o,this._loop=!!e.loop,this._to=sa([e.to,n,i,e.from]),this._from=sa([e.from,i,n])}}cancel(){this._active&&(this.tick(Date.now()),this._active=!1,this._notify(!1))}tick(e){const n=e-this._start,s=this._duration,i=this._prop,o=this._from,r=this._loop,a=this._to;let l;if(this._active=o!==a&&(r||n1?2-l:l,l=this._easing(Math.min(1,Math.max(0,l))),this._target[i]=this._fn(o,a,l)}wait(){const e=this._promises||(this._promises=[]);return new Promise((n,s)=>{e.push({res:n,rej:s})})}_notify(e){const n=e?"res":"rej",s=this._promises||[];for(let i=0;i{const o=e[i];if(!st(o))return;const r={};for(const a of n)r[a]=o[a];(yt(o.properties)&&o.properties||[i]).forEach(a=>{(a===i||!s.has(a))&&s.set(a,r)})})}_animateOptions(e,n){const s=n.options,i=X4(e,s);if(!i)return[];const o=this._createAnimations(i,s);return s.$shared&&J4(e.options.$animations,s).then(()=>{e.options=s},()=>{}),o}_createAnimations(e,n){const s=this._properties,i=[],o=e.$animations||(e.$animations={}),r=Object.keys(n),a=Date.now();let l;for(l=r.length-1;l>=0;--l){const c=r[l];if(c.charAt(0)==="$")continue;if(c==="options"){i.push(...this._animateOptions(e,n));continue}const u=n[c];let d=o[c];const f=s.get(c);if(d)if(f&&d.active()){d.update(f,u,a);continue}else d.cancel();if(!f||!f.duration){e[c]=u;continue}o[c]=d=new G4(f,e,c,u),i.push(d)}return i}update(e,n){if(this._properties.size===0){Object.assign(e,n);return}const s=this._createAnimations(e,n);if(s.length)return Bs.add(this._chart,s),!0}}function J4(t,e){const n=[],s=Object.keys(e);for(let i=0;i0||!n&&o<0)return i.index}return null}function Gm(t,e){const{chart:n,_cachedMeta:s}=t,i=n._stacks||(n._stacks={}),{iScale:o,vScale:r,index:a}=s,l=o.axis,c=r.axis,u=tV(o,r,s),d=e.length;let f;for(let g=0;gn[s].axis===e).shift()}function iV(t,e){return Hi(t,{active:!1,dataset:void 0,datasetIndex:e,index:e,mode:"default",type:"dataset"})}function oV(t,e,n){return Hi(t,{active:!1,dataIndex:e,parsed:void 0,raw:void 0,element:n,index:e,mode:"default",type:"data"})}function Gr(t,e){const n=t.controller.index,s=t.vScale&&t.vScale.axis;if(s){e=e||t._parsed;for(const i of e){const o=i._stacks;if(!o||o[s]===void 0||o[s][n]===void 0)return;delete o[s][n],o[s]._visualValues!==void 0&&o[s]._visualValues[n]!==void 0&&delete o[s]._visualValues[n]}}}const od=t=>t==="reset"||t==="none",Jm=(t,e)=>e?t:Object.assign({},t),rV=(t,e,n)=>t&&!e.hidden&&e._stacked&&{keys:D0(n,!0),values:null};class ji{static defaults={};static datasetElementType=null;static dataElementType=null;constructor(e,n){this.chart=e,this._ctx=e.ctx,this.index=n,this._cachedDataOpts={},this._cachedMeta=this.getMeta(),this._type=this._cachedMeta.type,this.options=void 0,this._parsing=!1,this._data=void 0,this._objectData=void 0,this._sharedOptions=void 0,this._drawStart=void 0,this._drawCount=void 0,this.enableOptionSharing=!1,this.supportsDecimation=!1,this.$context=void 0,this._syncList=[],this.datasetElementType=new.target.datasetElementType,this.dataElementType=new.target.dataElementType,this.initialize()}initialize(){const e=this._cachedMeta;this.configure(),this.linkScales(),e._stacked=Um(e.vScale,e),this.addElements(),this.options.fill&&!this.chart.isPluginEnabled("filler")&&console.warn("Tried to use the 'fill' option without the 'Filler' plugin enabled. Please import and register the 'Filler' plugin and make sure it is not disabled in the options")}updateIndex(e){this.index!==e&&Gr(this._cachedMeta),this.index=e}linkScales(){const e=this.chart,n=this._cachedMeta,s=this.getDataset(),i=(d,f,g,_)=>d==="x"?f:d==="r"?_:g,o=n.xAxisID=qe(s.xAxisID,id(e,"x")),r=n.yAxisID=qe(s.yAxisID,id(e,"y")),a=n.rAxisID=qe(s.rAxisID,id(e,"r")),l=n.indexAxis,c=n.iAxisID=i(l,o,r,a),u=n.vAxisID=i(l,r,o,a);n.xScale=this.getScaleForId(o),n.yScale=this.getScaleForId(r),n.rScale=this.getScaleForId(a),n.iScale=this.getScaleForId(c),n.vScale=this.getScaleForId(u)}getDataset(){return this.chart.data.datasets[this.index]}getMeta(){return this.chart.getDatasetMeta(this.index)}getScaleForId(e){return this.chart.scales[e]}_getOtherScale(e){const n=this._cachedMeta;return e===n.iScale?n.vScale:n.iScale}reset(){this._update("reset")}_destroy(){const e=this._cachedMeta;this._data&&Mm(this._data,this),e._stacked&&Gr(e)}_dataCheck(){const e=this.getDataset(),n=e.data||(e.data=[]),s=this._data;if(st(n))this._data=eV(n);else if(s!==n){if(s){Mm(s,this);const i=this._cachedMeta;Gr(i),i._parsed=[]}n&&Object.isExtensible(n)&&KB(n,this),this._syncList=[],this._data=n}}addElements(){const e=this._cachedMeta;this._dataCheck(),this.datasetElementType&&(e.dataset=new this.datasetElementType)}buildOrUpdateElements(e){const n=this._cachedMeta,s=this.getDataset();let i=!1;this._dataCheck();const o=n._stacked;n._stacked=Um(n.vScale,n),n.stack!==s.stack&&(i=!0,Gr(n),n.stack=s.stack),this._resyncElements(e),(i||o!==n._stacked)&&Gm(this,n._parsed)}configure(){const e=this.chart.config,n=e.datasetScopeKeys(this._type),s=e.getOptionScopes(this.getDataset(),n,!0);this.options=e.createResolver(s,this.getContext()),this._parsing=this.options.parsing,this._cachedDataOpts={}}parse(e,n){const{_cachedMeta:s,_data:i}=this,{iScale:o,_stacked:r}=s,a=o.axis;let l=e===0&&n===i.length?!0:s._sorted,c=e>0&&s._parsed[e-1],u,d,f;if(this._parsing===!1)s._parsed=i,s._sorted=!0,f=i;else{yt(i[e])?f=this.parseArrayData(s,i,e,n):st(i[e])?f=this.parseObjectData(s,i,e,n):f=this.parsePrimitiveData(s,i,e,n);const g=()=>d[a]===null||c&&d[a]m||d=0;--f)if(!_()){this.updateRangeFromParsed(c,e,g,l);break}}return c}getAllParsedValues(e){const n=this._cachedMeta._parsed,s=[];let i,o,r;for(i=0,o=n.length;i=0&&ethis.getContext(s,i,n),m=c.resolveNamedOptions(f,g,_,d);return m.$shared&&(m.$shared=l,o[r]=Object.freeze(Jm(m,l))),m}_resolveAnimations(e,n,s){const i=this.chart,o=this._cachedDataOpts,r=`animation-${n}`,a=o[r];if(a)return a;let l;if(i.options.animation!==!1){const u=this.chart.config,d=u.datasetAnimationScopeKeys(this._type,n),f=u.getOptionScopes(this.getDataset(),d);l=u.createResolver(f,this.getContext(e,s,n))}const c=new M0(i,l&&l.animations);return l&&l._cacheable&&(o[r]=Object.freeze(c)),c}getSharedOptions(e){if(e.$shared)return this._sharedOptions||(this._sharedOptions=Object.assign({},e))}includeOptions(e,n){return!n||od(e)||this.chart._animationsDisabled}_getSharedOptions(e,n){const s=this.resolveDataElementOptions(e,n),i=this._sharedOptions,o=this.getSharedOptions(s),r=this.includeOptions(n,o)||o!==i;return this.updateSharedOptions(o,n,s),{sharedOptions:o,includeOptions:r}}updateElement(e,n,s,i){od(i)?Object.assign(e,s):this._resolveAnimations(n,i).update(e,s)}updateSharedOptions(e,n,s){e&&!od(n)&&this._resolveAnimations(void 0,n).update(e,s)}_setStyle(e,n,s,i){e.active=i;const o=this.getStyle(n,i);this._resolveAnimations(n,s,i).update(e,{options:!i&&this.getSharedOptions(o)||o})}removeHoverStyle(e,n,s){this._setStyle(e,s,"active",!1)}setHoverStyle(e,n,s){this._setStyle(e,s,"active",!0)}_removeDatasetHoverStyle(){const e=this._cachedMeta.dataset;e&&this._setStyle(e,void 0,"active",!1)}_setDatasetHoverStyle(){const e=this._cachedMeta.dataset;e&&this._setStyle(e,void 0,"active",!0)}_resyncElements(e){const n=this._data,s=this._cachedMeta.data;for(const[a,l,c]of this._syncList)this[a](l,c);this._syncList=[];const i=s.length,o=n.length,r=Math.min(o,i);r&&this.parse(0,r),o>i?this._insertElements(i,o-i,e):o{for(c.length+=n,a=c.length-1;a>=r;a--)c[a]=c[a-n]};for(l(o),a=e;ai-o))}return t._cache.$bar}function lV(t){const e=t.iScale,n=aV(e,t.type);let s=e._length,i,o,r,a;const l=()=>{r===32767||r===-32768||(Fa(a)&&(s=Math.min(s,Math.abs(r-a)||s)),a=r)};for(i=0,o=n.length;i0?i[t-1]:null,a=tMath.abs(a)&&(l=a,c=r),e[n.axis]=c,e._custom={barStart:l,barEnd:c,start:i,end:o,min:r,max:a}}function O0(t,e,n,s){return yt(t)?dV(t,e,n,s):e[n.axis]=n.parse(t,s),e}function Xm(t,e,n,s){const i=t.iScale,o=t.vScale,r=i.getLabels(),a=i===o,l=[];let c,u,d,f;for(c=n,u=n+s;c=n?1:-1)}function fV(t){let e,n,s,i,o;return t.horizontal?(e=t.base>t.x,n="left",s="right"):(e=t.basel.controller.options.grouped),o=s.options.stacked,r=[],a=l=>{const c=l.controller.getParsed(n),u=c&&c[l.vScale.axis];if(ot(u)||isNaN(u))return!0};for(const l of i)if(!(n!==void 0&&a(l))&&((o===!1||r.indexOf(l.stack)===-1||o===void 0&&l.stack===void 0)&&r.push(l.stack),l.index===e))break;return r.length||r.push(void 0),r}_getStackCount(e){return this._getStacks(void 0,e).length}_getStackIndex(e,n,s){const i=this._getStacks(e,s),o=n!==void 0?i.indexOf(n):-1;return o===-1?i.length-1:o}_getRuler(){const e=this.options,n=this._cachedMeta,s=n.iScale,i=[];let o,r;for(o=0,r=n.data.length;o=0;--s)n=Math.max(n,e[s].size(this.resolveDataElementOptions(s))/2);return n>0&&n}getLabelAndValue(e){const n=this._cachedMeta,s=this.chart.data.labels||[],{xScale:i,yScale:o}=n,r=this.getParsed(e),a=i.getLabelForValue(r.x),l=o.getLabelForValue(r.y),c=r._custom;return{label:s[e]||"",value:"("+a+", "+l+(c?", "+c:"")+")"}}update(e){const n=this._cachedMeta.data;this.updateElements(n,0,n.length,e)}updateElements(e,n,s,i){const o=i==="reset",{iScale:r,vScale:a}=this._cachedMeta,{sharedOptions:l,includeOptions:c}=this._getSharedOptions(n,i),u=r.axis,d=a.axis;for(let f=n;fBa(A,a,l,!0)?1:Math.max(D,D*n,x,x*n),_=(A,D,x)=>Ba(A,a,l,!0)?-1:Math.min(D,D*n,x,x*n),m=g(0,c,d),y=g(Nt,u,f),v=_(xt,c,d),$=_(xt+Nt,u,f);s=(m-v)/2,i=(y-$)/2,o=-(m+v)/2,r=-(y+$)/2}return{ratioX:s,ratioY:i,offsetX:o,offsetY:r}}class L0 extends ji{static id="doughnut";static defaults={datasetElementType:!1,dataElementType:"arc",animation:{animateRotate:!0,animateScale:!1},animations:{numbers:{type:"number",properties:["circumference","endAngle","innerRadius","outerRadius","startAngle","x","y","offset","borderWidth","spacing"]}},cutout:"50%",rotation:0,circumference:360,radius:"100%",spacing:0,indexAxis:"r"};static descriptors={_scriptable:e=>e!=="spacing",_indexable:e=>e!=="spacing"&&!e.startsWith("borderDash")&&!e.startsWith("hoverBorderDash")};static overrides={aspectRatio:1,plugins:{legend:{labels:{generateLabels(e){const n=e.data;if(n.labels.length&&n.datasets.length){const{labels:{pointStyle:s,color:i}}=e.legend.options;return n.labels.map((o,r)=>{const l=e.getDatasetMeta(0).controller.getStyle(r);return{text:o,fillStyle:l.backgroundColor,strokeStyle:l.borderColor,fontColor:i,lineWidth:l.borderWidth,pointStyle:s,hidden:!e.getDataVisibility(r),index:r}})}return[]}},onClick(e,n,s){s.chart.toggleDataVisibility(n.index),s.chart.update()}}}};constructor(e,n){super(e,n),this.enableOptionSharing=!0,this.innerRadius=void 0,this.outerRadius=void 0,this.offsetX=void 0,this.offsetY=void 0}linkScales(){}parse(e,n){const s=this.getDataset().data,i=this._cachedMeta;if(this._parsing===!1)i._parsed=s;else{let o=l=>+s[l];if(st(s[e])){const{key:l="value"}=this._parsing;o=c=>+Di(s[c],l)}let r,a;for(r=e,a=e+n;r0&&!isNaN(e)?wt*(Math.abs(e)/n):0}getLabelAndValue(e){const n=this._cachedMeta,s=this.chart,i=s.data.labels||[],o=el(n._parsed[e],s.options.locale);return{label:i[e]||"",value:o}}getMaxBorderWidth(e){let n=0;const s=this.chart;let i,o,r,a,l;if(!e){for(i=0,o=s.data.datasets.length;i0&&this.getParsed(n-1);for(let x=0;x=$){S.skip=!0;continue}const T=this.getParsed(x),M=ot(T[g]),E=S[f]=r.getPixelForValue(T[f],x),V=S[g]=o||M?a.getBasePixel():a.getPixelForValue(l?this.applyStack(a,T,l):T[g],x);S.skip=isNaN(E)||isNaN(V)||M,S.stop=x>0&&Math.abs(T[f]-D[f])>y,m&&(S.parsed=T,S.raw=c.data[x]),d&&(S.options=u||this.resolveDataElementOptions(x,w.active?"active":i)),v||this.updateElement(w,x,S,i),D=T}}getMaxOverflow(){const e=this._cachedMeta,n=e.dataset,s=n.options&&n.options.borderWidth||0,i=e.data||[];if(!i.length)return s;const o=i[0].size(this.resolveDataElementOptions(0)),r=i[i.length-1].size(this.resolveDataElementOptions(i.length-1));return Math.max(s,o,r)/2}draw(){const e=this._cachedMeta;e.dataset.updateControlPoints(this.chart.chartArea,e.iScale.axis),super.draw()}}class vV extends ji{static id="polarArea";static defaults={dataElementType:"arc",animation:{animateRotate:!0,animateScale:!0},animations:{numbers:{type:"number",properties:["x","y","startAngle","endAngle","innerRadius","outerRadius"]}},indexAxis:"r",startAngle:0};static overrides={aspectRatio:1,plugins:{legend:{labels:{generateLabels(e){const n=e.data;if(n.labels.length&&n.datasets.length){const{labels:{pointStyle:s,color:i}}=e.legend.options;return n.labels.map((o,r)=>{const l=e.getDatasetMeta(0).controller.getStyle(r);return{text:o,fillStyle:l.backgroundColor,strokeStyle:l.borderColor,fontColor:i,lineWidth:l.borderWidth,pointStyle:s,hidden:!e.getDataVisibility(r),index:r}})}return[]}},onClick(e,n,s){s.chart.toggleDataVisibility(n.index),s.chart.update()}}},scales:{r:{type:"radialLinear",angleLines:{display:!1},beginAtZero:!0,grid:{circular:!0},pointLabels:{display:!1},startAngle:0}}};constructor(e,n){super(e,n),this.innerRadius=void 0,this.outerRadius=void 0}getLabelAndValue(e){const n=this._cachedMeta,s=this.chart,i=s.data.labels||[],o=el(n._parsed[e].r,s.options.locale);return{label:i[e]||"",value:o}}parseObjectData(e,n,s,i){return S0.bind(this)(e,n,s,i)}update(e){const n=this._cachedMeta.data;this._updateRadius(),this.updateElements(n,0,n.length,e)}getMinMax(){const e=this._cachedMeta,n={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY};return e.data.forEach((s,i)=>{const o=this.getParsed(i).r;!isNaN(o)&&this.chart.getDataVisibility(i)&&(on.max&&(n.max=o))}),n}_updateRadius(){const e=this.chart,n=e.chartArea,s=e.options,i=Math.min(n.right-n.left,n.bottom-n.top),o=Math.max(i/2,0),r=Math.max(s.cutoutPercentage?o/100*s.cutoutPercentage:1,0),a=(o-r)/e.getVisibleDatasetCount();this.outerRadius=o-a*this.index,this.innerRadius=this.outerRadius-a}updateElements(e,n,s,i){const o=i==="reset",r=this.chart,l=r.options.animation,c=this._cachedMeta.rScale,u=c.xCenter,d=c.yCenter,f=c.getIndexAngle(0)-.5*xt;let g=f,_;const m=360/this.countVisibleElements();for(_=0;_{!isNaN(this.getParsed(i).r)&&this.chart.getDataVisibility(i)&&n++}),n}_computeAngle(e,n,s){return this.chart.getDataVisibility(e)?rs(this.resolveDataElementOptions(e,n).angle||s):0}}class yV extends L0{static id="pie";static defaults={cutout:0,rotation:0,circumference:360,radius:"100%"}}class wV extends ji{static id="radar";static defaults={datasetElementType:"line",dataElementType:"point",indexAxis:"r",showLine:!0,elements:{line:{fill:"start"}}};static overrides={aspectRatio:1,scales:{r:{type:"radialLinear"}}};getLabelAndValue(e){const n=this._cachedMeta.vScale,s=this.getParsed(e);return{label:n.getLabels()[e],value:""+n.getLabelForValue(s[n.axis])}}parseObjectData(e,n,s,i){return S0.bind(this)(e,n,s,i)}update(e){const n=this._cachedMeta,s=n.dataset,i=n.data||[],o=n.iScale.getLabels();if(s.points=i,e!=="resize"){const r=this.resolveDatasetElementOptions(e);this.options.showLine||(r.borderWidth=0);const a={_loop:!0,_fullLoop:o.length===i.length,options:r};this.updateElement(s,void 0,a,e)}this.updateElements(i,0,i.length,e)}updateElements(e,n,s,i){const o=this._cachedMeta.rScale,r=i==="reset";for(let a=n;a0&&this.getParsed(n-1);for(let D=n;D0&&Math.abs(w[g]-A[g])>v,y&&(S.parsed=w,S.raw=c.data[D]),f&&(S.options=d||this.resolveDataElementOptions(D,x.active?"active":i)),$||this.updateElement(x,D,S,i),A=w}this.updateSharedOptions(d,i,u)}getMaxOverflow(){const e=this._cachedMeta,n=e.data||[];if(!this.options.showLine){let a=0;for(let l=n.length-1;l>=0;--l)a=Math.max(a,n[l].size(this.resolveDataElementOptions(l))/2);return a>0&&a}const s=e.dataset,i=s.options&&s.options.borderWidth||0;if(!n.length)return i;const o=n[0].size(this.resolveDataElementOptions(0)),r=n[n.length-1].size(this.resolveDataElementOptions(n.length-1));return Math.max(i,o,r)/2}}function io(){throw new Error("This method is not implemented: Check that a complete date adapter is provided.")}class Ff{static override(e){Object.assign(Ff.prototype,e)}options;constructor(e){this.options=e||{}}init(){}formats(){return io()}parse(){return io()}format(){return io()}add(){return io()}diff(){return io()}startOf(){return io()}endOf(){return io()}}var kV={_date:Ff};function SV(t,e,n,s){const{controller:i,data:o,_sorted:r}=t,a=i._cachedMeta.iScale;if(a&&e===a.axis&&e!=="r"&&r&&o.length){const l=a._reversePixels?WB:Us;if(s){if(i._sharedOptions){const c=o[0],u=typeof c.getRange=="function"&&c.getRange(e);if(u){const d=l(o,e,n-u),f=l(o,e,n+u);return{lo:d.lo,hi:f.hi}}}}else return l(o,e,n)}return{lo:0,hi:o.length-1}}function tl(t,e,n,s,i){const o=t.getSortedVisibleDatasetMetas(),r=n[e];for(let a=0,l=o.length;a{l[r](e[n],i)&&(o.push({element:l,datasetIndex:c,index:u}),a=a||l.inRange(e.x,e.y,i))}),s&&!a?[]:o}var EV={evaluateInteractionItems:tl,modes:{index(t,e,n,s){const i=lo(e,t),o=n.axis||"x",r=n.includeInvisible||!1,a=n.intersect?ad(t,i,o,s,r):ld(t,i,o,!1,s,r),l=[];return a.length?(t.getSortedVisibleDatasetMetas().forEach(c=>{const u=a[0].index,d=c.data[u];d&&!d.skip&&l.push({element:d,datasetIndex:c.index,index:u})}),l):[]},dataset(t,e,n,s){const i=lo(e,t),o=n.axis||"xy",r=n.includeInvisible||!1;let a=n.intersect?ad(t,i,o,s,r):ld(t,i,o,!1,s,r);if(a.length>0){const l=a[0].datasetIndex,c=t.getDatasetMeta(l).data;a=[];for(let u=0;un.pos===e)}function t_(t,e){return t.filter(n=>N0.indexOf(n.pos)===-1&&n.box.axis===e)}function Xr(t,e){return t.sort((n,s)=>{const i=e?s:n,o=e?n:s;return i.weight===o.weight?i.index-o.index:i.weight-o.weight})}function TV(t){const e=[];let n,s,i,o,r,a;for(n=0,s=(t||[]).length;nc.box.fullSize),!0),s=Xr(Jr(e,"left"),!0),i=Xr(Jr(e,"right")),o=Xr(Jr(e,"top"),!0),r=Xr(Jr(e,"bottom")),a=t_(e,"x"),l=t_(e,"y");return{fullSize:n,leftAndTop:s.concat(o),rightAndBottom:i.concat(l).concat(r).concat(a),chartArea:Jr(e,"chartArea"),vertical:s.concat(i).concat(l),horizontal:o.concat(r).concat(a)}}function n_(t,e,n,s){return Math.max(t[n],e[n])+Math.max(t[s],e[s])}function F0(t,e){t.top=Math.max(t.top,e.top),t.left=Math.max(t.left,e.left),t.bottom=Math.max(t.bottom,e.bottom),t.right=Math.max(t.right,e.right)}function OV(t,e,n,s){const{pos:i,box:o}=n,r=t.maxPadding;if(!st(i)){n.size&&(t[i]-=n.size);const d=s[n.stack]||{size:0,count:1};d.size=Math.max(d.size,n.horizontal?o.height:o.width),n.size=d.size/d.count,t[i]+=n.size}o.getPadding&&F0(r,o.getPadding());const a=Math.max(0,e.outerWidth-n_(r,t,"left","right")),l=Math.max(0,e.outerHeight-n_(r,t,"top","bottom")),c=a!==t.w,u=l!==t.h;return t.w=a,t.h=l,n.horizontal?{same:c,other:u}:{same:u,other:c}}function IV(t){const e=t.maxPadding;function n(s){const i=Math.max(e[s]-t[s],0);return t[s]+=i,i}t.y+=n("top"),t.x+=n("left"),n("right"),n("bottom")}function LV(t,e){const n=e.maxPadding;function s(i){const o={left:0,top:0,right:0,bottom:0};return i.forEach(r=>{o[r]=Math.max(e[r],n[r])}),o}return s(t?["left","right"]:["top","bottom"])}function ia(t,e,n,s){const i=[];let o,r,a,l,c,u;for(o=0,r=t.length,c=0;o{typeof m.beforeLayout=="function"&&m.beforeLayout()});const u=l.reduce((m,y)=>y.box.options&&y.box.options.display===!1?m:m+1,0)||1,d=Object.freeze({outerWidth:e,outerHeight:n,padding:i,availableWidth:o,availableHeight:r,vBoxMaxWidth:o/2/u,hBoxMaxHeight:r/2}),f=Object.assign({},i);F0(f,fn(s));const g=Object.assign({maxPadding:f,w:o,h:r,x:i.left,y:i.top},i),_=MV(l.concat(c),d);ia(a.fullSize,g,d,_),ia(l,g,d,_),ia(c,g,d,_)&&ia(l,g,d,_),IV(g),s_(a.leftAndTop,g,d,_),g.x+=g.w,g.y+=g.h,s_(a.rightAndBottom,g,d,_),t.chartArea={left:g.left,top:g.top,right:g.left+g.w,bottom:g.top+g.h,height:g.h,width:g.w},ut(a.chartArea,m=>{const y=m.box;Object.assign(y,t.chartArea),y.update(g.w,g.h,{left:0,top:0,right:0,bottom:0})})}};class B0{acquireContext(e,n){}releaseContext(e){return!1}addEventListener(e,n,s){}removeEventListener(e,n,s){}getDevicePixelRatio(){return 1}getMaximumSize(e,n,s,i){return n=Math.max(0,n||e.width),s=s||e.height,{width:n,height:Math.max(0,i?Math.floor(n/i):s)}}isAttached(e){return!0}updateConfig(e){}}class RV extends B0{acquireContext(e){return e&&e.getContext&&e.getContext("2d")||null}updateConfig(e){e.options.animation=!1}}const ec="$chartjs",NV={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"},i_=t=>t===null||t==="";function FV(t,e){const n=t.style,s=t.getAttribute("height"),i=t.getAttribute("width");if(t[ec]={initial:{height:s,width:i,style:{display:n.display,height:n.height,width:n.width}}},n.display=n.display||"block",n.boxSizing=n.boxSizing||"border-box",i_(i)){const o=Vm(t,"width");o!==void 0&&(t.width=o)}if(i_(s))if(t.style.height==="")t.height=t.width/(e||2);else{const o=Vm(t,"height");o!==void 0&&(t.height=o)}return t}const V0=R4?{passive:!0}:!1;function BV(t,e,n){t.addEventListener(e,n,V0)}function VV(t,e,n){t.canvas.removeEventListener(e,n,V0)}function HV(t,e){const n=NV[t.type]||t.type,{x:s,y:i}=lo(t,e);return{type:n,chart:e,native:t,x:s!==void 0?s:null,y:i!==void 0?i:null}}function yc(t,e){for(const n of t)if(n===e||n.contains(e))return!0}function jV(t,e,n){const s=t.canvas,i=new MutationObserver(o=>{let r=!1;for(const a of o)r=r||yc(a.addedNodes,s),r=r&&!yc(a.removedNodes,s);r&&n()});return i.observe(document,{childList:!0,subtree:!0}),i}function WV(t,e,n){const s=t.canvas,i=new MutationObserver(o=>{let r=!1;for(const a of o)r=r||yc(a.removedNodes,s),r=r&&!yc(a.addedNodes,s);r&&n()});return i.observe(document,{childList:!0,subtree:!0}),i}const Ha=new Map;let o_=0;function H0(){const t=window.devicePixelRatio;t!==o_&&(o_=t,Ha.forEach((e,n)=>{n.currentDevicePixelRatio!==t&&e()}))}function zV(t,e){Ha.size||window.addEventListener("resize",H0),Ha.set(t,e)}function KV(t){Ha.delete(t),Ha.size||window.removeEventListener("resize",H0)}function YV(t,e,n){const s=t.canvas,i=s&&Nf(s);if(!i)return;const o=p0((a,l)=>{const c=i.clientWidth;n(a,l),c{const l=a[0],c=l.contentRect.width,u=l.contentRect.height;c===0&&u===0||o(c,u)});return r.observe(i),zV(t,o),r}function cd(t,e,n){n&&n.disconnect(),e==="resize"&&KV(t)}function UV(t,e,n){const s=t.canvas,i=p0(o=>{t.ctx!==null&&n(HV(o,t))},t);return BV(s,e,i),i}class qV extends B0{acquireContext(e,n){const s=e&&e.getContext&&e.getContext("2d");return s&&s.canvas===e?(FV(e,n),s):null}releaseContext(e){const n=e.canvas;if(!n[ec])return!1;const s=n[ec].initial;["height","width"].forEach(o=>{const r=s[o];ot(r)?n.removeAttribute(o):n.setAttribute(o,r)});const i=s.style||{};return Object.keys(i).forEach(o=>{n.style[o]=i[o]}),n.width=n.width,delete n[ec],!0}addEventListener(e,n,s){this.removeEventListener(e,n);const i=e.$proxies||(e.$proxies={}),r={attach:jV,detach:WV,resize:YV}[n]||UV;i[n]=r(e,n,s)}removeEventListener(e,n){const s=e.$proxies||(e.$proxies={}),i=s[n];if(!i)return;({attach:cd,detach:cd,resize:cd}[n]||VV)(e,n,i),s[n]=void 0}getDevicePixelRatio(){return window.devicePixelRatio}getMaximumSize(e,n,s,i){return L4(e,n,s,i)}isAttached(e){const n=Nf(e);return!!(n&&n.isConnected)}}function GV(t){return!Rf()||typeof OffscreenCanvas<"u"&&t instanceof OffscreenCanvas?RV:qV}let ti=class{static defaults={};static defaultRoutes=void 0;x;y;active=!1;options;$animations;tooltipPosition(e){const{x:n,y:s}=this.getProps(["x","y"],e);return{x:n,y:s}}hasValue(){return kr(this.x)&&kr(this.y)}getProps(e,n){const s=this.$animations;if(!n||!s)return this;const i={};return e.forEach(o=>{i[o]=s[o]&&s[o].active()?s[o]._to:this[o]}),i}};function JV(t,e){const n=t.options.ticks,s=XV(t),i=Math.min(n.maxTicksLimit||s,s),o=n.major.enabled?ZV(e):[],r=o.length,a=o[0],l=o[r-1],c=[];if(r>i)return e6(e,c,o,r/i),c;const u=QV(o,e,i);if(r>0){let d,f;const g=r>1?Math.round((l-a)/(r-1)):null;for(Rl(e,c,u,ot(g)?0:a-g,a),d=0,f=r-1;di)return l}return Math.max(i,1)}function ZV(t){const e=[];let n,s;for(n=0,s=t.length;nt==="left"?"right":t==="right"?"left":t,r_=(t,e,n)=>e==="top"||e==="left"?t[e]+n:t[e]-n,a_=(t,e)=>Math.min(e||t,t);function l_(t,e){const n=[],s=t.length/e,i=t.length;let o=0;for(;or+a)))return l}function i6(t,e){ut(t,n=>{const s=n.gc,i=s.length/2;let o;if(i>e){for(o=0;os?s:n,s=i&&n>s?n:s,{min:Mn(n,Mn(s,n)),max:Mn(s,Mn(n,s))}}getPadding(){return{left:this.paddingLeft||0,top:this.paddingTop||0,right:this.paddingRight||0,bottom:this.paddingBottom||0}}getTicks(){return this.ticks}getLabels(){const e=this.chart.data;return this.options.labels||(this.isHorizontal()?e.xLabels:e.yLabels)||e.labels||[]}getLabelItems(e=this.chart.chartArea){return this._labelItems||(this._labelItems=this._computeLabelItems(e))}beforeLayout(){this._cache={},this._dataLimitsCached=!1}beforeUpdate(){gt(this.options.beforeUpdate,[this])}update(e,n,s){const{beginAtZero:i,grace:o,ticks:r}=this.options,a=r.sampleSize;this.beforeUpdate(),this.maxWidth=e,this.maxHeight=n,this._margins=s=Object.assign({left:0,right:0,top:0,bottom:0},s),this.ticks=null,this._labelSizes=null,this._gridLineItems=null,this._labelItems=null,this.beforeSetDimensions(),this.setDimensions(),this.afterSetDimensions(),this._maxLength=this.isHorizontal()?this.width+s.left+s.right:this.height+s.top+s.bottom,this._dataLimitsCached||(this.beforeDataLimits(),this.determineDataLimits(),this.afterDataLimits(),this._range=f4(this,o,i),this._dataLimitsCached=!0),this.beforeBuildTicks(),this.ticks=this.buildTicks()||[],this.afterBuildTicks();const l=a=o||s<=1||!this.isHorizontal()){this.labelRotation=i;return}const u=this._getLabelSizes(),d=u.widest.width,f=u.highest.height,g=tn(this.chart.width-d,0,this.maxWidth);a=e.offset?this.maxWidth/s:g/(s-1),d+6>a&&(a=g/(s-(e.offset?.5:1)),l=this.maxHeight-Qr(e.grid)-n.padding-c_(e.title,this.chart.options.font),c=Math.sqrt(d*d+f*f),r=Ef(Math.min(Math.asin(tn((u.highest.height+6)/a,-1,1)),Math.asin(tn(l/c,-1,1))-Math.asin(tn(f/c,-1,1)))),r=Math.max(i,Math.min(o,r))),this.labelRotation=r}afterCalculateLabelRotation(){gt(this.options.afterCalculateLabelRotation,[this])}afterAutoSkip(){}beforeFit(){gt(this.options.beforeFit,[this])}fit(){const e={width:0,height:0},{chart:n,options:{ticks:s,title:i,grid:o}}=this,r=this._isVisible(),a=this.isHorizontal();if(r){const l=c_(i,n.options.font);if(a?(e.width=this.maxWidth,e.height=Qr(o)+l):(e.height=this.maxHeight,e.width=Qr(o)+l),s.display&&this.ticks.length){const{first:c,last:u,widest:d,highest:f}=this._getLabelSizes(),g=s.padding*2,_=rs(this.labelRotation),m=Math.cos(_),y=Math.sin(_);if(a){const v=s.mirror?0:y*d.width+m*f.height;e.height=Math.min(this.maxHeight,e.height+v+g)}else{const v=s.mirror?0:m*d.width+y*f.height;e.width=Math.min(this.maxWidth,e.width+v+g)}this._calculatePadding(c,u,y,m)}}this._handleMargins(),a?(this.width=this._length=n.width-this._margins.left-this._margins.right,this.height=e.height):(this.width=e.width,this.height=this._length=n.height-this._margins.top-this._margins.bottom)}_calculatePadding(e,n,s,i){const{ticks:{align:o,padding:r},position:a}=this.options,l=this.labelRotation!==0,c=a!=="top"&&this.axis==="x";if(this.isHorizontal()){const u=this.getPixelForTick(0)-this.left,d=this.right-this.getPixelForTick(this.ticks.length-1);let f=0,g=0;l?c?(f=i*e.width,g=s*n.height):(f=s*e.height,g=i*n.width):o==="start"?g=n.width:o==="end"?f=e.width:o!=="inner"&&(f=e.width/2,g=n.width/2),this.paddingLeft=Math.max((f-u+r)*this.width/(this.width-u),0),this.paddingRight=Math.max((g-d+r)*this.width/(this.width-d),0)}else{let u=n.height/2,d=e.height/2;o==="start"?(u=0,d=e.height):o==="end"&&(u=n.height,d=0),this.paddingTop=u+r,this.paddingBottom=d+r}}_handleMargins(){this._margins&&(this._margins.left=Math.max(this.paddingLeft,this._margins.left),this._margins.top=Math.max(this.paddingTop,this._margins.top),this._margins.right=Math.max(this.paddingRight,this._margins.right),this._margins.bottom=Math.max(this.paddingBottom,this._margins.bottom))}afterFit(){gt(this.options.afterFit,[this])}isHorizontal(){const{axis:e,position:n}=this.options;return n==="top"||n==="bottom"||e==="x"}isFullSize(){return this.options.fullSize}_convertTicksToLabels(e){this.beforeTickToLabelConversion(),this.generateTickLabels(e);let n,s;for(n=0,s=e.length;n({width:r[M]||0,height:a[M]||0});return{first:T(0),last:T(n-1),widest:T(w),highest:T(S),widths:r,heights:a}}getLabelForValue(e){return e}getPixelForValue(e,n){return NaN}getValueForPixel(e){}getPixelForTick(e){const n=this.ticks;return e<0||e>n.length-1?null:this.getPixelForValue(n[e].value)}getPixelForDecimal(e){this._reversePixels&&(e=1-e);const n=this._startPixel+e*this._length;return jB(this._alignToPixels?so(this.chart,n,0):n)}getDecimalForPixel(e){const n=(e-this._startPixel)/this._length;return this._reversePixels?1-n:n}getBasePixel(){return this.getPixelForValue(this.getBaseValue())}getBaseValue(){const{min:e,max:n}=this;return e<0&&n<0?n:e>0&&n>0?e:0}getContext(e){const n=this.ticks||[];if(e>=0&&ea*i?a/s:l/i:l*i0}_computeGridLineItems(e){const n=this.axis,s=this.chart,i=this.options,{grid:o,position:r,border:a}=i,l=o.offset,c=this.isHorizontal(),d=this.ticks.length+(l?1:0),f=Qr(o),g=[],_=a.setContext(this.getContext()),m=_.display?_.width:0,y=m/2,v=function(I){return so(s,I,m)};let $,A,D,x,w,S,T,M,E,V,X,le;if(r==="top")$=v(this.bottom),S=this.bottom-f,M=$-y,V=v(e.top)+y,le=e.bottom;else if(r==="bottom")$=v(this.top),V=e.top,le=v(e.bottom)-y,S=$+y,M=this.top+f;else if(r==="left")$=v(this.right),w=this.right-f,T=$-y,E=v(e.left)+y,X=e.right;else if(r==="right")$=v(this.left),E=e.left,X=v(e.right)-y,w=$+y,T=this.left+f;else if(n==="x"){if(r==="center")$=v((e.top+e.bottom)/2+.5);else if(st(r)){const I=Object.keys(r)[0],H=r[I];$=v(this.chart.scales[I].getPixelForValue(H))}V=e.top,le=e.bottom,S=$+y,M=S+f}else if(n==="y"){if(r==="center")$=v((e.left+e.right)/2);else if(st(r)){const I=Object.keys(r)[0],H=r[I];$=v(this.chart.scales[I].getPixelForValue(H))}w=$-y,T=w-f,E=e.left,X=e.right}const Y=qe(i.ticks.maxTicksLimit,d),R=Math.max(1,Math.ceil(d/Y));for(A=0;A0&&(ae-=L/2);break}ve={left:ae,top:te,width:L+U.width,height:Q+U.height,color:R.backdropColor}}y.push({label:D,font:M,textOffset:X,options:{rotation:m,color:H,strokeColor:Z,strokeWidth:ee,textAlign:ce,textBaseline:le,translation:[x,w],backdrop:ve}})}return y}_getXAxisLabelAlignment(){const{position:e,ticks:n}=this.options;if(-rs(this.labelRotation))return e==="top"?"left":"right";let i="center";return n.align==="start"?i="left":n.align==="end"?i="right":n.align==="inner"&&(i="inner"),i}_getYAxisLabelAlignment(e){const{position:n,ticks:{crossAlign:s,mirror:i,padding:o}}=this.options,r=this._getLabelSizes(),a=e+o,l=r.widest.width;let c,u;return n==="left"?i?(u=this.right+o,s==="near"?c="left":s==="center"?(c="center",u+=l/2):(c="right",u+=l)):(u=this.right-a,s==="near"?c="right":s==="center"?(c="center",u-=l/2):(c="left",u=this.left)):n==="right"?i?(u=this.left+o,s==="near"?c="right":s==="center"?(c="center",u-=l/2):(c="left",u-=l)):(u=this.left+a,s==="near"?c="left":s==="center"?(c="center",u+=l/2):(c="right",u=this.right)):c="right",{textAlign:c,x:u}}_computeLabelArea(){if(this.options.ticks.mirror)return;const e=this.chart,n=this.options.position;if(n==="left"||n==="right")return{top:0,left:this.left,bottom:e.height,right:this.right};if(n==="top"||n==="bottom")return{top:this.top,left:0,bottom:this.bottom,right:e.width}}drawBackground(){const{ctx:e,options:{backgroundColor:n},left:s,top:i,width:o,height:r}=this;n&&(e.save(),e.fillStyle=n,e.fillRect(s,i,o,r),e.restore())}getLineWidthForValue(e){const n=this.options.grid;if(!this._isVisible()||!n.display)return 0;const i=this.ticks.findIndex(o=>o.value===e);return i>=0?n.setContext(this.getContext(i)).lineWidth:0}drawGrid(e){const n=this.options.grid,s=this.ctx,i=this._gridLineItems||(this._gridLineItems=this._computeGridLineItems(e));let o,r;const a=(l,c,u)=>{!u.width||!u.color||(s.save(),s.lineWidth=u.width,s.strokeStyle=u.color,s.setLineDash(u.borderDash||[]),s.lineDashOffset=u.borderDashOffset,s.beginPath(),s.moveTo(l.x,l.y),s.lineTo(c.x,c.y),s.stroke(),s.restore())};if(n.display)for(o=0,r=i.length;o{this.draw(o)}}]:[{z:s,draw:o=>{this.drawBackground(),this.drawGrid(o),this.drawTitle()}},{z:i,draw:()=>{this.drawBorder()}},{z:n,draw:o=>{this.drawLabels(o)}}]}getMatchingVisibleMetas(e){const n=this.chart.getSortedVisibleDatasetMetas(),s=this.axis+"AxisID",i=[];let o,r;for(o=0,r=n.length;o{const s=n.split("."),i=s.pop(),o=[t].concat(s).join("."),r=e[n].split("."),a=r.pop(),l=r.join(".");Pt.route(o,i,l,a)})}function d6(t){return"id"in t&&"defaults"in t}class h6{constructor(){this.controllers=new Nl(ji,"datasets",!0),this.elements=new Nl(ti,"elements"),this.plugins=new Nl(Object,"plugins"),this.scales=new Nl(Oo,"scales"),this._typedRegistries=[this.controllers,this.scales,this.elements]}add(...e){this._each("register",e)}remove(...e){this._each("unregister",e)}addControllers(...e){this._each("register",e,this.controllers)}addElements(...e){this._each("register",e,this.elements)}addPlugins(...e){this._each("register",e,this.plugins)}addScales(...e){this._each("register",e,this.scales)}getController(e){return this._get(e,this.controllers,"controller")}getElement(e){return this._get(e,this.elements,"element")}getPlugin(e){return this._get(e,this.plugins,"plugin")}getScale(e){return this._get(e,this.scales,"scale")}removeControllers(...e){this._each("unregister",e,this.controllers)}removeElements(...e){this._each("unregister",e,this.elements)}removePlugins(...e){this._each("unregister",e,this.plugins)}removeScales(...e){this._each("unregister",e,this.scales)}_each(e,n,s){[...n].forEach(i=>{const o=s||this._getRegistryForType(i);s||o.isForType(i)||o===this.plugins&&i.id?this._exec(e,o,i):ut(i,r=>{const a=s||this._getRegistryForType(r);this._exec(e,a,r)})})}_exec(e,n,s){const i=Cf(e);gt(s["before"+i],[],s),n[e](s),gt(s["after"+i],[],s)}_getRegistryForType(e){for(let n=0;no.filter(a=>!r.some(l=>a.plugin.id===l.plugin.id));this._notify(i(n,s),e,"stop"),this._notify(i(s,n),e,"start")}}function p6(t){const e={},n=[],s=Object.keys(ms.plugins.items);for(let o=0;o1&&u_(t[0].toLowerCase());if(s)return s}throw new Error(`Cannot determine type of '${t}' axis. Please provide 'axis' or 'position' option.`)}function d_(t,e,n){if(n[e+"AxisID"]===t)return{axis:e}}function w6(t,e){if(e.data&&e.data.datasets){const n=e.data.datasets.filter(s=>s.xAxisID===t||s.yAxisID===t);if(n.length)return d_(t,"x",n[0])||d_(t,"y",n[0])}return{}}function x6(t,e){const n=Ao[t.type]||{scales:{}},s=e.scales||{},i=Xd(t.type,e),o=Object.create(null);return Object.keys(s).forEach(r=>{const a=s[r];if(!st(a))return console.error(`Invalid scale configuration for scale: ${r}`);if(a._proxy)return console.warn(`Ignoring resolver passed as options for scale: ${r}`);const l=Qd(r,a,w6(r,t),Pt.scales[a.type]),c=v6(l,i),u=n.scales||{};o[r]=ba(Object.create(null),[{axis:l},a,u[l],u[c]])}),t.data.datasets.forEach(r=>{const a=r.type||t.type,l=r.indexAxis||Xd(a,e),u=(Ao[a]||{}).scales||{};Object.keys(u).forEach(d=>{const f=b6(d,l),g=r[f+"AxisID"]||f;o[g]=o[g]||Object.create(null),ba(o[g],[{axis:f},s[g],u[d]])})}),Object.keys(o).forEach(r=>{const a=o[r];ba(a,[Pt.scales[a.type],Pt.scale])}),o}function j0(t){const e=t.options||(t.options={});e.plugins=qe(e.plugins,{}),e.scales=x6(t,e)}function W0(t){return t=t||{},t.datasets=t.datasets||[],t.labels=t.labels||[],t}function k6(t){return t=t||{},t.data=W0(t.data),j0(t),t}const h_=new Map,z0=new Set;function Fl(t,e){let n=h_.get(t);return n||(n=e(),h_.set(t,n),z0.add(n)),n}const Zr=(t,e,n)=>{const s=Di(e,n);s!==void 0&&t.add(s)};let S6=class{constructor(e){this._config=k6(e),this._scopeCache=new Map,this._resolverCache=new Map}get platform(){return this._config.platform}get type(){return this._config.type}set type(e){this._config.type=e}get data(){return this._config.data}set data(e){this._config.data=W0(e)}get options(){return this._config.options}set options(e){this._config.options=e}get plugins(){return this._config.plugins}update(){const e=this._config;this.clearCache(),j0(e)}clearCache(){this._scopeCache.clear(),this._resolverCache.clear()}datasetScopeKeys(e){return Fl(e,()=>[[`datasets.${e}`,""]])}datasetAnimationScopeKeys(e,n){return Fl(`${e}.transition.${n}`,()=>[[`datasets.${e}.transitions.${n}`,`transitions.${n}`],[`datasets.${e}`,""]])}datasetElementScopeKeys(e,n){return Fl(`${e}-${n}`,()=>[[`datasets.${e}.elements.${n}`,`datasets.${e}`,`elements.${n}`,""]])}pluginScopeKeys(e){const n=e.id,s=this.type;return Fl(`${s}-plugin-${n}`,()=>[[`plugins.${n}`,...e.additionalOptionScopes||[]]])}_cachedScopes(e,n){const s=this._scopeCache;let i=s.get(e);return(!i||n)&&(i=new Map,s.set(e,i)),i}getOptionScopes(e,n,s){const{options:i,type:o}=this,r=this._cachedScopes(e,s),a=r.get(n);if(a)return a;const l=new Set;n.forEach(u=>{e&&(l.add(e),u.forEach(d=>Zr(l,e,d))),u.forEach(d=>Zr(l,i,d)),u.forEach(d=>Zr(l,Ao[o]||{},d)),u.forEach(d=>Zr(l,Pt,d)),u.forEach(d=>Zr(l,Gd,d))});const c=Array.from(l);return c.length===0&&c.push(Object.create(null)),z0.has(n)&&r.set(n,c),c}chartOptionScopes(){const{options:e,type:n}=this;return[e,Ao[n]||{},Pt.datasets[n]||{},{type:n},Pt,Gd]}resolveNamedOptions(e,n,s,i=[""]){const o={$shared:!0},{resolver:r,subPrefixes:a}=f_(this._resolverCache,e,i);let l=r;if(A6(r,n)){o.$shared=!1,s=Oi(s)?s():s;const c=this.createResolver(e,s,a);l=Sr(r,s,c)}for(const c of n)o[c]=l[c];return o}createResolver(e,n,s=[""],i){const{resolver:o}=f_(this._resolverCache,e,s);return st(n)?Sr(o,n,void 0,i):o}};function f_(t,e,n){let s=t.get(e);s||(s=new Map,t.set(e,s));const i=n.join();let o=s.get(i);return o||(o={resolver:Of(e,n),subPrefixes:n.filter(a=>!a.toLowerCase().includes("hover"))},s.set(i,o)),o}const $6=t=>st(t)&&Object.getOwnPropertyNames(t).some(e=>Oi(t[e]));function A6(t,e){const{isScriptable:n,isIndexable:s}=y0(t);for(const i of e){const o=n(i),r=s(i),a=(r||o)&&t[i];if(o&&(Oi(a)||$6(a))||r&&yt(a))return!0}return!1}var C6="4.4.1";const E6=["top","bottom","left","right","chartArea"];function p_(t,e){return t==="top"||t==="bottom"||E6.indexOf(t)===-1&&e==="x"}function g_(t,e){return function(n,s){return n[t]===s[t]?n[e]-s[e]:n[t]-s[t]}}function m_(t){const e=t.chart,n=e.options.animation;e.notifyPlugins("afterRender"),gt(n&&n.onComplete,[t],e)}function T6(t){const e=t.chart,n=e.options.animation;gt(n&&n.onProgress,[t],e)}function K0(t){return Rf()&&typeof t=="string"?t=document.getElementById(t):t&&t.length&&(t=t[0]),t&&t.canvas&&(t=t.canvas),t}const tc={},__=t=>{const e=K0(t);return Object.values(tc).filter(n=>n.canvas===e).pop()};function P6(t,e,n){const s=Object.keys(t);for(const i of s){const o=+i;if(o>=e){const r=t[i];delete t[i],(n>0||o>e)&&(t[o+n]=r)}}}function M6(t,e,n,s){return!n||t.type==="mouseout"?null:s?e:t}function Bl(t,e,n){return t.options.clip?t[n]:e[n]}function D6(t,e){const{xScale:n,yScale:s}=t;return n&&s?{left:Bl(n,e,"left"),right:Bl(n,e,"right"),top:Bl(s,e,"top"),bottom:Bl(s,e,"bottom")}:e}let su=class{static defaults=Pt;static instances=tc;static overrides=Ao;static registry=ms;static version=C6;static getChart=__;static register(...e){ms.add(...e),b_()}static unregister(...e){ms.remove(...e),b_()}constructor(e,n){const s=this.config=new S6(n),i=K0(e),o=__(i);if(o)throw new Error("Canvas is already in use. Chart with ID '"+o.id+"' must be destroyed before the canvas with ID '"+o.canvas.id+"' can be reused.");const r=s.createResolver(s.chartOptionScopes(),this.getContext());this.platform=new(s.platform||GV(i)),this.platform.updateConfig(s);const a=this.platform.acquireContext(i,r.aspectRatio),l=a&&a.canvas,c=l&&l.height,u=l&&l.width;if(this.id=PB(),this.ctx=a,this.canvas=l,this.width=u,this.height=c,this._options=r,this._aspectRatio=this.aspectRatio,this._layers=[],this._metasets=[],this._stacks=void 0,this.boxes=[],this.currentDevicePixelRatio=void 0,this.chartArea=void 0,this._active=[],this._lastEvent=void 0,this._listeners={},this._responsiveListeners=void 0,this._sortedMetasets=[],this.scales={},this._plugins=new f6,this.$proxies={},this._hiddenIndices={},this.attached=!1,this._animationsDisabled=void 0,this.$context=void 0,this._doResize=YB(d=>this.update(d),r.resizeDelay||0),this._dataChanges=[],tc[this.id]=this,!a||!l){console.error("Failed to create chart: can't acquire context from the given item");return}Bs.listen(this,"complete",m_),Bs.listen(this,"progress",T6),this._initialize(),this.attached&&this.update()}get aspectRatio(){const{options:{aspectRatio:e,maintainAspectRatio:n},width:s,height:i,_aspectRatio:o}=this;return ot(e)?n&&o?o:i?s/i:null:e}get data(){return this.config.data}set data(e){this.config.data=e}get options(){return this._options}set options(e){this.config.options=e}get registry(){return ms}_initialize(){return this.notifyPlugins("beforeInit"),this.options.responsive?this.resize():Bm(this,this.options.devicePixelRatio),this.bindEvents(),this.notifyPlugins("afterInit"),this}clear(){return Rm(this.canvas,this.ctx),this}stop(){return Bs.stop(this),this}resize(e,n){Bs.running(this)?this._resizeBeforeDraw={width:e,height:n}:this._resize(e,n)}_resize(e,n){const s=this.options,i=this.canvas,o=s.maintainAspectRatio&&this.aspectRatio,r=this.platform.getMaximumSize(i,e,n,o),a=s.devicePixelRatio||this.platform.getDevicePixelRatio(),l=this.width?"resize":"attach";this.width=r.width,this.height=r.height,this._aspectRatio=this.aspectRatio,Bm(this,a,!0)&&(this.notifyPlugins("resize",{size:r}),gt(s.onResize,[this,r],this),this.attached&&this._doResize(l)&&this.render())}ensureScalesHaveIDs(){const n=this.options.scales||{};ut(n,(s,i)=>{s.id=i})}buildOrUpdateScales(){const e=this.options,n=e.scales,s=this.scales,i=Object.keys(s).reduce((r,a)=>(r[a]=!1,r),{});let o=[];n&&(o=o.concat(Object.keys(n).map(r=>{const a=n[r],l=Qd(r,a),c=l==="r",u=l==="x";return{options:a,dposition:c?"chartArea":u?"bottom":"left",dtype:c?"radialLinear":u?"category":"linear"}}))),ut(o,r=>{const a=r.options,l=a.id,c=Qd(l,a),u=qe(a.type,r.dtype);(a.position===void 0||p_(a.position,c)!==p_(r.dposition))&&(a.position=r.dposition),i[l]=!0;let d=null;if(l in s&&s[l].type===u)d=s[l];else{const f=ms.getScale(u);d=new f({id:l,type:u,ctx:this.ctx,chart:this}),s[d.id]=d}d.init(a,e)}),ut(i,(r,a)=>{r||delete s[a]}),ut(s,r=>{qn.configure(this,r,r.options),qn.addBox(this,r)})}_updateMetasets(){const e=this._metasets,n=this.data.datasets.length,s=e.length;if(e.sort((i,o)=>i.index-o.index),s>n){for(let i=n;in.length&&delete this._stacks,e.forEach((s,i)=>{n.filter(o=>o===s._dataset).length===0&&this._destroyDatasetMeta(i)})}buildOrUpdateControllers(){const e=[],n=this.data.datasets;let s,i;for(this._removeUnreferencedMetasets(),s=0,i=n.length;s{this.getDatasetMeta(n).controller.reset()},this)}reset(){this._resetElements(),this.notifyPlugins("reset")}update(e){const n=this.config;n.update();const s=this._options=n.createResolver(n.chartOptionScopes(),this.getContext()),i=this._animationsDisabled=!s.animation;if(this._updateScales(),this._checkEventBindings(),this._updateHiddenIndices(),this._plugins.invalidate(),this.notifyPlugins("beforeUpdate",{mode:e,cancelable:!0})===!1)return;const o=this.buildOrUpdateControllers();this.notifyPlugins("beforeElementsUpdate");let r=0;for(let c=0,u=this.data.datasets.length;c{c.reset()}),this._updateDatasets(e),this.notifyPlugins("afterUpdate",{mode:e}),this._layers.sort(g_("z","_idx"));const{_active:a,_lastEvent:l}=this;l?this._eventHandler(l,!0):a.length&&this._updateHoverStyles(a,a,!0),this.render()}_updateScales(){ut(this.scales,e=>{qn.removeBox(this,e)}),this.ensureScalesHaveIDs(),this.buildOrUpdateScales()}_checkEventBindings(){const e=this.options,n=new Set(Object.keys(this._listeners)),s=new Set(e.events);(!Cm(n,s)||!!this._responsiveListeners!==e.responsive)&&(this.unbindEvents(),this.bindEvents())}_updateHiddenIndices(){const{_hiddenIndices:e}=this,n=this._getUniformDataChanges()||[];for(const{method:s,start:i,count:o}of n){const r=s==="_removeElements"?-o:o;P6(e,i,r)}}_getUniformDataChanges(){const e=this._dataChanges;if(!e||!e.length)return;this._dataChanges=[];const n=this.data.datasets.length,s=o=>new Set(e.filter(r=>r[0]===o).map((r,a)=>a+","+r.splice(1).join(","))),i=s(0);for(let o=1;oo.split(",")).map(o=>({method:o[1],start:+o[2],count:+o[3]}))}_updateLayout(e){if(this.notifyPlugins("beforeLayout",{cancelable:!0})===!1)return;qn.update(this,this.width,this.height,e);const n=this.chartArea,s=n.width<=0||n.height<=0;this._layers=[],ut(this.boxes,i=>{s&&i.position==="chartArea"||(i.configure&&i.configure(),this._layers.push(...i._layers()))},this),this._layers.forEach((i,o)=>{i._idx=o}),this.notifyPlugins("afterLayout")}_updateDatasets(e){if(this.notifyPlugins("beforeDatasetsUpdate",{mode:e,cancelable:!0})!==!1){for(let n=0,s=this.data.datasets.length;n=0;--n)this._drawDataset(e[n]);this.notifyPlugins("afterDatasetsDraw")}_drawDataset(e){const n=this.ctx,s=e._clip,i=!s.disabled,o=D6(e,this.chartArea),r={meta:e,index:e.index,cancelable:!0};this.notifyPlugins("beforeDatasetDraw",r)!==!1&&(i&&eu(n,{left:s.left===!1?0:o.left-s.left,right:s.right===!1?this.width:o.right+s.right,top:s.top===!1?0:o.top-s.top,bottom:s.bottom===!1?this.height:o.bottom+s.bottom}),e.controller.draw(),i&&tu(n),r.cancelable=!1,this.notifyPlugins("afterDatasetDraw",r))}isPointInArea(e){return qs(e,this.chartArea,this._minPadding)}getElementsAtEventForMode(e,n,s,i){const o=EV.modes[n];return typeof o=="function"?o(this,e,s,i):[]}getDatasetMeta(e){const n=this.data.datasets[e],s=this._metasets;let i=s.filter(o=>o&&o._dataset===n).pop();return i||(i={type:null,data:[],dataset:null,controller:null,hidden:null,xAxisID:null,yAxisID:null,order:n&&n.order||0,index:e,_dataset:n,_parsed:[],_sorted:!1},s.push(i)),i}getContext(){return this.$context||(this.$context=Hi(null,{chart:this,type:"chart"}))}getVisibleDatasetCount(){return this.getSortedVisibleDatasetMetas().length}isDatasetVisible(e){const n=this.data.datasets[e];if(!n)return!1;const s=this.getDatasetMeta(e);return typeof s.hidden=="boolean"?!s.hidden:!n.hidden}setDatasetVisibility(e,n){const s=this.getDatasetMeta(e);s.hidden=!n}toggleDataVisibility(e){this._hiddenIndices[e]=!this._hiddenIndices[e]}getDataVisibility(e){return!this._hiddenIndices[e]}_updateVisibility(e,n,s){const i=s?"show":"hide",o=this.getDatasetMeta(e),r=o.controller._resolveAnimations(void 0,i);Fa(n)?(o.data[n].hidden=!s,this.update()):(this.setDatasetVisibility(e,s),r.update(o,{visible:s}),this.update(a=>a.datasetIndex===e?i:void 0))}hide(e,n){this._updateVisibility(e,n,!1)}show(e,n){this._updateVisibility(e,n,!0)}_destroyDatasetMeta(e){const n=this._metasets[e];n&&n.controller&&n.controller._destroy(),delete this._metasets[e]}_stop(){let e,n;for(this.stop(),Bs.remove(this),e=0,n=this.data.datasets.length;e{n.addEventListener(this,o,r),e[o]=r},i=(o,r,a)=>{o.offsetX=r,o.offsetY=a,this._eventHandler(o)};ut(this.options.events,o=>s(o,i))}bindResponsiveEvents(){this._responsiveListeners||(this._responsiveListeners={});const e=this._responsiveListeners,n=this.platform,s=(l,c)=>{n.addEventListener(this,l,c),e[l]=c},i=(l,c)=>{e[l]&&(n.removeEventListener(this,l,c),delete e[l])},o=(l,c)=>{this.canvas&&this.resize(l,c)};let r;const a=()=>{i("attach",a),this.attached=!0,this.resize(),s("resize",o),s("detach",r)};r=()=>{this.attached=!1,i("resize",o),this._stop(),this._resize(0,0),s("attach",a)},n.isAttached(this.canvas)?a():r()}unbindEvents(){ut(this._listeners,(e,n)=>{this.platform.removeEventListener(this,n,e)}),this._listeners={},ut(this._responsiveListeners,(e,n)=>{this.platform.removeEventListener(this,n,e)}),this._responsiveListeners=void 0}updateHoverStyle(e,n,s){const i=s?"set":"remove";let o,r,a,l;for(n==="dataset"&&(o=this.getDatasetMeta(e[0].datasetIndex),o.controller["_"+i+"DatasetHoverStyle"]()),a=0,l=e.length;a{const a=this.getDatasetMeta(o);if(!a)throw new Error("No dataset found at index "+o);return{datasetIndex:o,element:a.data[r],index:r}});!gc(s,n)&&(this._active=s,this._lastEvent=null,this._updateHoverStyles(s,n))}notifyPlugins(e,n,s){return this._plugins.notify(this,e,n,s)}isPluginEnabled(e){return this._plugins._cache.filter(n=>n.plugin.id===e).length===1}_updateHoverStyles(e,n,s){const i=this.options.hover,o=(l,c)=>l.filter(u=>!c.some(d=>u.datasetIndex===d.datasetIndex&&u.index===d.index)),r=o(n,e),a=s?e:o(e,n);r.length&&this.updateHoverStyle(r,i.mode,!1),a.length&&i.mode&&this.updateHoverStyle(a,i.mode,!0)}_eventHandler(e,n){const s={event:e,replay:n,cancelable:!0,inChartArea:this.isPointInArea(e)},i=r=>(r.options.events||this.options.events).includes(e.native.type);if(this.notifyPlugins("beforeEvent",s,i)===!1)return;const o=this._handleEvent(e,n,s.inChartArea);return s.cancelable=!1,this.notifyPlugins("afterEvent",s,i),(o||s.changed)&&this.render(),this}_handleEvent(e,n,s){const{_active:i=[],options:o}=this,r=n,a=this._getActiveElements(e,i,s,r),l=RB(e),c=M6(e,this._lastEvent,s,l);s&&(this._lastEvent=null,gt(o.onHover,[e,a,this],this),l&>(o.onClick,[e,a,this],this));const u=!gc(a,i);return(u||n)&&(this._active=a,this._updateHoverStyles(a,i,n)),this._lastEvent=c,u}_getActiveElements(e,n,s,i){if(e.type==="mouseout")return[];if(!s)return n;const o=this.options.hover;return this.getElementsAtEventForMode(e,o.mode,o,i)}};function b_(){return ut(su.instances,t=>t._plugins.invalidate())}function O6(t,e,n){const{startAngle:s,pixelMargin:i,x:o,y:r,outerRadius:a,innerRadius:l}=e;let c=i/a;t.beginPath(),t.arc(o,r,a,s-c,n+c),l>i?(c=i/l,t.arc(o,r,l,n+c,s-c,!0)):t.arc(o,r,i,n+Nt,s-Nt),t.closePath(),t.clip()}function I6(t){return Df(t,["outerStart","outerEnd","innerStart","innerEnd"])}function L6(t,e,n,s){const i=I6(t.options.borderRadius),o=(n-e)/2,r=Math.min(o,s*e/2),a=l=>{const c=(n-Math.min(o,l))*s/2;return tn(l,0,Math.min(o,c))};return{outerStart:a(i.outerStart),outerEnd:a(i.outerEnd),innerStart:tn(i.innerStart,0,r),innerEnd:tn(i.innerEnd,0,r)}}function qo(t,e,n,s){return{x:n+t*Math.cos(e),y:s+t*Math.sin(e)}}function wc(t,e,n,s,i,o){const{x:r,y:a,startAngle:l,pixelMargin:c,innerRadius:u}=e,d=Math.max(e.outerRadius+s+n-c,0),f=u>0?u+s+n+c:0;let g=0;const _=i-l;if(s){const R=u>0?u-s:0,I=d>0?d-s:0,H=(R+I)/2,Z=H!==0?_*H/(H+s):_;g=(_-Z)/2}const m=Math.max(.001,_*d-n/xt)/d,y=(_-m)/2,v=l+y+g,$=i-y-g,{outerStart:A,outerEnd:D,innerStart:x,innerEnd:w}=L6(e,f,d,$-v),S=d-A,T=d-D,M=v+A/S,E=$-D/T,V=f+x,X=f+w,le=v+x/V,Y=$-w/X;if(t.beginPath(),o){const R=(M+E)/2;if(t.arc(r,a,d,M,R),t.arc(r,a,d,R,E),D>0){const ee=qo(T,E,r,a);t.arc(ee.x,ee.y,D,E,$+Nt)}const I=qo(X,$,r,a);if(t.lineTo(I.x,I.y),w>0){const ee=qo(X,Y,r,a);t.arc(ee.x,ee.y,w,$+Nt,Y+Math.PI)}const H=($-w/f+(v+x/f))/2;if(t.arc(r,a,f,$-w/f,H,!0),t.arc(r,a,f,H,v+x/f,!0),x>0){const ee=qo(V,le,r,a);t.arc(ee.x,ee.y,x,le+Math.PI,v-Nt)}const Z=qo(S,v,r,a);if(t.lineTo(Z.x,Z.y),A>0){const ee=qo(S,M,r,a);t.arc(ee.x,ee.y,A,v-Nt,M)}}else{t.moveTo(r,a);const R=Math.cos(M)*d+r,I=Math.sin(M)*d+a;t.lineTo(R,I);const H=Math.cos(E)*d+r,Z=Math.sin(E)*d+a;t.lineTo(H,Z)}t.closePath()}function R6(t,e,n,s,i){const{fullCircles:o,startAngle:r,circumference:a}=e;let l=e.endAngle;if(o){wc(t,e,n,s,l,i);for(let c=0;ce!=="borderDash"};circumference;endAngle;fullCircles;innerRadius;outerRadius;pixelMargin;startAngle;constructor(e){super(),this.options=void 0,this.circumference=void 0,this.startAngle=void 0,this.endAngle=void 0,this.innerRadius=void 0,this.outerRadius=void 0,this.pixelMargin=0,this.fullCircles=0,e&&Object.assign(this,e)}inRange(e,n,s){const i=this.getProps(["x","y"],s),{angle:o,distance:r}=u0(i,{x:e,y:n}),{startAngle:a,endAngle:l,innerRadius:c,outerRadius:u,circumference:d}=this.getProps(["startAngle","endAngle","innerRadius","outerRadius","circumference"],s),f=(this.options.spacing+this.options.borderWidth)/2,_=qe(d,l-a)>=wt||Ba(o,a,l),m=Ys(r,c+f,u+f);return _&&m}getCenterPoint(e){const{x:n,y:s,startAngle:i,endAngle:o,innerRadius:r,outerRadius:a}=this.getProps(["x","y","startAngle","endAngle","innerRadius","outerRadius"],e),{offset:l,spacing:c}=this.options,u=(i+o)/2,d=(r+a+c+l)/2;return{x:n+Math.cos(u)*d,y:s+Math.sin(u)*d}}tooltipPosition(e){return this.getCenterPoint(e)}draw(e){const{options:n,circumference:s}=this,i=(n.offset||0)/4,o=(n.spacing||0)/2,r=n.circular;if(this.pixelMargin=n.borderAlign==="inner"?.33:0,this.fullCircles=s>wt?Math.floor(s/wt):0,s===0||this.innerRadius<0||this.outerRadius<0)return;e.save();const a=(this.startAngle+this.endAngle)/2;e.translate(Math.cos(a)*i,Math.sin(a)*i);const l=1-Math.sin(Math.min(xt,s||0)),c=i*l;e.fillStyle=n.backgroundColor,e.strokeStyle=n.borderColor,R6(e,this,c,o,r),N6(e,this,c,o,r),e.restore()}}function Y0(t,e,n=e){t.lineCap=qe(n.borderCapStyle,e.borderCapStyle),t.setLineDash(qe(n.borderDash,e.borderDash)),t.lineDashOffset=qe(n.borderDashOffset,e.borderDashOffset),t.lineJoin=qe(n.borderJoinStyle,e.borderJoinStyle),t.lineWidth=qe(n.borderWidth,e.borderWidth),t.strokeStyle=qe(n.borderColor,e.borderColor)}function B6(t,e,n){t.lineTo(n.x,n.y)}function V6(t){return t.stepped?i4:t.tension||t.cubicInterpolationMode==="monotone"?o4:B6}function U0(t,e,n={}){const s=t.length,{start:i=0,end:o=s-1}=n,{start:r,end:a}=e,l=Math.max(i,r),c=Math.min(o,a),u=ia&&o>a;return{count:s,start:l,loop:e.loop,ilen:c(r+(c?a-D:D))%o,A=()=>{m!==y&&(t.lineTo(u,y),t.lineTo(u,m),t.lineTo(u,v))};for(l&&(g=i[$(0)],t.moveTo(g.x,g.y)),f=0;f<=a;++f){if(g=i[$(f)],g.skip)continue;const D=g.x,x=g.y,w=D|0;w===_?(xy&&(y=x),u=(d*u+D)/++d):(A(),t.lineTo(D,x),_=w,d=0,m=y=x),v=x}A()}function Zd(t){const e=t.options,n=e.borderDash&&e.borderDash.length;return!t._decimated&&!t._loop&&!e.tension&&e.cubicInterpolationMode!=="monotone"&&!e.stepped&&!n?j6:H6}function W6(t){return t.stepped?N4:t.tension||t.cubicInterpolationMode==="monotone"?F4:co}function z6(t,e,n,s){let i=e._path;i||(i=e._path=new Path2D,e.path(i,n,s)&&i.closePath()),Y0(t,e.options),t.stroke(i)}function K6(t,e,n,s){const{segments:i,options:o}=e,r=Zd(e);for(const a of i)Y0(t,o,a.style),t.beginPath(),r(t,e,a,{start:n,end:n+s-1})&&t.closePath(),t.stroke()}const Y6=typeof Path2D=="function";function U6(t,e,n,s){Y6&&!e.options.segment?z6(t,e,n,s):K6(t,e,n,s)}class iu extends ti{static id="line";static defaults={borderCapStyle:"butt",borderDash:[],borderDashOffset:0,borderJoinStyle:"miter",borderWidth:3,capBezierPoints:!0,cubicInterpolationMode:"default",fill:!1,spanGaps:!1,stepped:!1,tension:0};static defaultRoutes={backgroundColor:"backgroundColor",borderColor:"borderColor"};static descriptors={_scriptable:!0,_indexable:e=>e!=="borderDash"&&e!=="fill"};constructor(e){super(),this.animated=!0,this.options=void 0,this._chart=void 0,this._loop=void 0,this._fullLoop=void 0,this._path=void 0,this._points=void 0,this._segments=void 0,this._decimated=!1,this._pointsUpdated=!1,this._datasetIndex=void 0,e&&Object.assign(this,e)}updateControlPoints(e,n){const s=this.options;if((s.tension||s.cubicInterpolationMode==="monotone")&&!s.stepped&&!this._pointsUpdated){const i=s.spanGaps?this._loop:this._fullLoop;T4(this._points,s,e,i,n),this._pointsUpdated=!0}}set points(e){this._points=e,delete this._segments,delete this._path,this._pointsUpdated=!1}get points(){return this._points}get segments(){return this._segments||(this._segments=z4(this,this.options.segment))}first(){const e=this.segments,n=this.points;return e.length&&n[e[0].start]}last(){const e=this.segments,n=this.points,s=e.length;return s&&n[e[s-1].end]}interpolate(e,n){const s=this.options,i=e[n],o=this.points,r=P0(this,{property:n,start:i,end:i});if(!r.length)return;const a=[],l=W6(s);let c,u;for(c=0,u=r.length;c=n)return t.slice(e,e+n);const r=[],a=(n-2)/(o-2);let l=0;const c=e+n-1;let u=e,d,f,g,_,m;for(r[l++]=t[u],d=0;dg&&(g=_,f=t[$],m=$);r[l++]=f,u=m}return r[l++]=t[c],r}function n8(t,e,n,s){let i=0,o=0,r,a,l,c,u,d,f,g,_,m;const y=[],v=e+n-1,$=t[e].x,D=t[v].x-$;for(r=e;rm&&(m=c,f=r),i=(o*i+a.x)/++o;else{const w=r-1;if(!ot(d)&&!ot(f)){const S=Math.min(d,f),T=Math.max(d,f);S!==g&&S!==w&&y.push({...t[S],x:i}),T!==g&&T!==w&&y.push({...t[T],x:i})}r>0&&w!==g&&y.push(t[w]),y.push(a),u=x,o=0,_=m=c,d=f=g=r}}return y}function G0(t){if(t._decimated){const e=t._data;delete t._decimated,delete t._data,Object.defineProperty(t,"data",{configurable:!0,enumerable:!0,writable:!0,value:e})}}function y_(t){t.data.datasets.forEach(e=>{G0(e)})}function s8(t,e){const n=e.length;let s=0,i;const{iScale:o}=t,{min:r,max:a,minDefined:l,maxDefined:c}=o.getUserBounds();return l&&(s=tn(Us(e,o.axis,r).lo,0,n-1)),c?i=tn(Us(e,o.axis,a).hi+1,s,n)-s:i=n-s,{start:s,count:i}}var i8={id:"decimation",defaults:{algorithm:"min-max",enabled:!1},beforeElementsUpdate:(t,e,n)=>{if(!n.enabled){y_(t);return}const s=t.width;t.data.datasets.forEach((i,o)=>{const{_data:r,indexAxis:a}=i,l=t.getDatasetMeta(o),c=r||i.data;if(sa([a,t.options.indexAxis])==="y"||!l.controller.supportsDecimation)return;const u=t.scales[l.xAxisID];if(u.type!=="linear"&&u.type!=="time"||t.options.parsing)return;let{start:d,count:f}=s8(l,c);const g=n.threshold||4*s;if(f<=g){G0(i);return}ot(r)&&(i._data=c,delete i.data,Object.defineProperty(i,"data",{configurable:!0,enumerable:!0,get:function(){return this._decimated},set:function(m){this._data=m}}));let _;switch(n.algorithm){case"lttb":_=t8(c,d,f,s,n);break;case"min-max":_=n8(c,d,f,s);break;default:throw new Error(`Unsupported decimation algorithm '${n.algorithm}'`)}i._decimated=_})},destroy(t){y_(t)}};function o8(t,e,n){const s=t.segments,i=t.points,o=e.points,r=[];for(const a of s){let{start:l,end:c}=a;c=Bf(l,c,i);const u=eh(n,i[l],i[c],a.loop);if(!e.segments){r.push({source:a,target:u,start:i[l],end:i[c]});continue}const d=P0(e,u);for(const f of d){const g=eh(n,o[f.start],o[f.end],f.loop),_=T0(a,i,g);for(const m of _)r.push({source:m,target:f,start:{[n]:w_(u,g,"start",Math.max)},end:{[n]:w_(u,g,"end",Math.min)}})}}return r}function eh(t,e,n,s){if(s)return;let i=e[t],o=n[t];return t==="angle"&&(i=On(i),o=On(o)),{property:t,start:i,end:o}}function r8(t,e){const{x:n=null,y:s=null}=t||{},i=e.points,o=[];return e.segments.forEach(({start:r,end:a})=>{a=Bf(r,a,i);const l=i[r],c=i[a];s!==null?(o.push({x:l.x,y:s}),o.push({x:c.x,y:s})):n!==null&&(o.push({x:n,y:l.y}),o.push({x:n,y:c.y}))}),o}function Bf(t,e,n){for(;e>t;e--){const s=n[e];if(!isNaN(s.x)&&!isNaN(s.y))break}return e}function w_(t,e,n,s){return t&&e?s(t[n],e[n]):t?t[n]:e?e[n]:0}function J0(t,e){let n=[],s=!1;return yt(t)?(s=!0,n=t):n=r8(t,e),n.length?new iu({points:n,options:{tension:0},_loop:s,_fullLoop:s}):null}function x_(t){return t&&t.fill!==!1}function a8(t,e,n){let i=t[e].fill;const o=[e];let r;if(!n)return i;for(;i!==!1&&o.indexOf(i)===-1;){if(!Tt(i))return i;if(r=t[i],!r)return!1;if(r.visible)return i;o.push(i),i=r.fill}return!1}function l8(t,e,n){const s=h8(t);if(st(s))return isNaN(s.value)?!1:s;let i=parseFloat(s);return Tt(i)&&Math.floor(i)===i?c8(s[0],e,i,n):["origin","start","end","stack","shape"].indexOf(s)>=0&&s}function c8(t,e,n,s){return(t==="-"||t==="+")&&(n=e+n),n===e||n<0||n>=s?!1:n}function u8(t,e){let n=null;return t==="start"?n=e.bottom:t==="end"?n=e.top:st(t)?n=e.getPixelForValue(t.value):e.getBasePixel&&(n=e.getBasePixel()),n}function d8(t,e,n){let s;return t==="start"?s=n:t==="end"?s=e.options.reverse?e.min:e.max:st(t)?s=t.value:s=e.getBaseValue(),s}function h8(t){const e=t.options,n=e.fill;let s=qe(n&&n.target,n);return s===void 0&&(s=!!e.backgroundColor),s===!1||s===null?!1:s===!0?"origin":s}function f8(t){const{scale:e,index:n,line:s}=t,i=[],o=s.segments,r=s.points,a=p8(e,n);a.push(J0({x:null,y:e.bottom},s));for(let l=0;l=0;--r){const a=i[r].$filler;a&&(a.line.updateControlPoints(o,a.axis),s&&a.fill&&hd(t.ctx,a,o))}},beforeDatasetsDraw(t,e,n){if(n.drawTime!=="beforeDatasetsDraw")return;const s=t.getSortedVisibleDatasetMetas();for(let i=s.length-1;i>=0;--i){const o=s[i].$filler;x_(o)&&hd(t.ctx,o,t.chartArea)}},beforeDatasetDraw(t,e,n){const s=e.meta.$filler;!x_(s)||n.drawTime!=="beforeDatasetDraw"||hd(t.ctx,s,t.chartArea)},defaults:{propagate:!0,drawTime:"beforeDatasetDraw"}};const A_=(t,e)=>{let{boxHeight:n=e,boxWidth:s=e}=t;return t.usePointStyle&&(n=Math.min(n,e),s=t.pointStyleWidth||Math.min(s,e)),{boxWidth:s,boxHeight:n,itemHeight:Math.max(e,n)}},$8=(t,e)=>t!==null&&e!==null&&t.datasetIndex===e.datasetIndex&&t.index===e.index;class C_ extends ti{constructor(e){super(),this._added=!1,this.legendHitBoxes=[],this._hoveredItem=null,this.doughnutMode=!1,this.chart=e.chart,this.options=e.options,this.ctx=e.ctx,this.legendItems=void 0,this.columnSizes=void 0,this.lineWidths=void 0,this.maxHeight=void 0,this.maxWidth=void 0,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.height=void 0,this.width=void 0,this._margins=void 0,this.position=void 0,this.weight=void 0,this.fullSize=void 0}update(e,n,s){this.maxWidth=e,this.maxHeight=n,this._margins=s,this.setDimensions(),this.buildLabels(),this.fit()}setDimensions(){this.isHorizontal()?(this.width=this.maxWidth,this.left=this._margins.left,this.right=this.width):(this.height=this.maxHeight,this.top=this._margins.top,this.bottom=this.height)}buildLabels(){const e=this.options.labels||{};let n=gt(e.generateLabels,[this.chart],this)||[];e.filter&&(n=n.filter(s=>e.filter(s,this.chart.data))),e.sort&&(n=n.sort((s,i)=>e.sort(s,i,this.chart.data))),this.options.reverse&&n.reverse(),this.legendItems=n}fit(){const{options:e,ctx:n}=this;if(!e.display){this.width=this.height=0;return}const s=e.labels,i=Ut(s.font),o=i.size,r=this._computeTitleHeight(),{boxWidth:a,itemHeight:l}=A_(s,o);let c,u;n.font=i.string,this.isHorizontal()?(c=this.maxWidth,u=this._fitRows(r,o,a,l)+10):(u=this.maxHeight,c=this._fitCols(r,i,a,l)+10),this.width=Math.min(c,e.maxWidth||this.maxWidth),this.height=Math.min(u,e.maxHeight||this.maxHeight)}_fitRows(e,n,s,i){const{ctx:o,maxWidth:r,options:{labels:{padding:a}}}=this,l=this.legendHitBoxes=[],c=this.lineWidths=[0],u=i+a;let d=e;o.textAlign="left",o.textBaseline="middle";let f=-1,g=-u;return this.legendItems.forEach((_,m)=>{const y=s+n/2+o.measureText(_.text).width;(m===0||c[c.length-1]+y+2*a>r)&&(d+=u,c[c.length-(m>0?0:1)]=0,g+=u,f++),l[m]={left:0,top:g,row:f,width:y,height:i},c[c.length-1]+=y+a}),d}_fitCols(e,n,s,i){const{ctx:o,maxHeight:r,options:{labels:{padding:a}}}=this,l=this.legendHitBoxes=[],c=this.columnSizes=[],u=r-e;let d=a,f=0,g=0,_=0,m=0;return this.legendItems.forEach((y,v)=>{const{itemWidth:$,itemHeight:A}=A8(s,n,o,y,i);v>0&&g+A+2*a>u&&(d+=f+a,c.push({width:f,height:g}),_+=f+a,m++,f=g=0),l[v]={left:_,top:g,col:m,width:$,height:A},f=Math.max(f,$),g+=A+a}),d+=f,c.push({width:f,height:g}),d}adjustHitBoxes(){if(!this.options.display)return;const e=this._computeTitleHeight(),{legendHitBoxes:n,options:{align:s,labels:{padding:i},rtl:o}}=this,r=or(o,this.left,this.width);if(this.isHorizontal()){let a=0,l=ln(s,this.left+i,this.right-this.lineWidths[a]);for(const c of n)a!==c.row&&(a=c.row,l=ln(s,this.left+i,this.right-this.lineWidths[a])),c.top+=this.top+e+i,c.left=r.leftForLtr(r.x(l),c.width),l+=c.width+i}else{let a=0,l=ln(s,this.top+e+i,this.bottom-this.columnSizes[a].height);for(const c of n)c.col!==a&&(a=c.col,l=ln(s,this.top+e+i,this.bottom-this.columnSizes[a].height)),c.top=l,c.left+=this.left+i,c.left=r.leftForLtr(r.x(c.left),c.width),l+=c.height+i}}isHorizontal(){return this.options.position==="top"||this.options.position==="bottom"}draw(){if(this.options.display){const e=this.ctx;eu(e,this),this._draw(),tu(e)}}_draw(){const{options:e,columnSizes:n,lineWidths:s,ctx:i}=this,{align:o,labels:r}=e,a=Pt.color,l=or(e.rtl,this.left,this.width),c=Ut(r.font),{padding:u}=r,d=c.size,f=d/2;let g;this.drawTitle(),i.textAlign=l.textAlign("left"),i.textBaseline="middle",i.lineWidth=.5,i.font=c.string;const{boxWidth:_,boxHeight:m,itemHeight:y}=A_(r,d),v=function(w,S,T){if(isNaN(_)||_<=0||isNaN(m)||m<0)return;i.save();const M=qe(T.lineWidth,1);if(i.fillStyle=qe(T.fillStyle,a),i.lineCap=qe(T.lineCap,"butt"),i.lineDashOffset=qe(T.lineDashOffset,0),i.lineJoin=qe(T.lineJoin,"miter"),i.lineWidth=M,i.strokeStyle=qe(T.strokeStyle,a),i.setLineDash(qe(T.lineDash,[])),r.usePointStyle){const E={radius:m*Math.SQRT2/2,pointStyle:T.pointStyle,rotation:T.rotation,borderWidth:M},V=l.xPlus(w,_/2),X=S+f;b0(i,E,V,X,r.pointStyleWidth&&_)}else{const E=S+Math.max((d-m)/2,0),V=l.leftForLtr(w,_),X=yo(T.borderRadius);i.beginPath(),Object.values(X).some(le=>le!==0)?Va(i,{x:V,y:E,w:_,h:m,radius:X}):i.rect(V,E,_,m),i.fill(),M!==0&&i.stroke()}i.restore()},$=function(w,S,T){Co(i,T.text,w,S+y/2,c,{strikethrough:T.hidden,textAlign:l.textAlign(T.textAlign)})},A=this.isHorizontal(),D=this._computeTitleHeight();A?g={x:ln(o,this.left+u,this.right-s[0]),y:this.top+u+D,line:0}:g={x:this.left+u,y:ln(o,this.top+D+u,this.bottom-n[0].height),line:0},A0(this.ctx,e.textDirection);const x=y+u;this.legendItems.forEach((w,S)=>{i.strokeStyle=w.fontColor,i.fillStyle=w.fontColor;const T=i.measureText(w.text).width,M=l.textAlign(w.textAlign||(w.textAlign=r.textAlign)),E=_+f+T;let V=g.x,X=g.y;l.setWidth(this.width),A?S>0&&V+E+u>this.right&&(X=g.y+=x,g.line++,V=g.x=ln(o,this.left+u,this.right-s[g.line])):S>0&&X+x>this.bottom&&(V=g.x=V+n[g.line].width+u,g.line++,X=g.y=ln(o,this.top+D+u,this.bottom-n[g.line].height));const le=l.x(V);if(v(le,X,w),V=UB(M,V+_+f,A?V+E:this.right,e.rtl),$(l.x(V),X,w),A)g.x+=E+u;else if(typeof w.text!="string"){const Y=c.lineHeight;g.y+=Q0(w,Y)+u}else g.y+=x}),C0(this.ctx,e.textDirection)}drawTitle(){const e=this.options,n=e.title,s=Ut(n.font),i=fn(n.padding);if(!n.display)return;const o=or(e.rtl,this.left,this.width),r=this.ctx,a=n.position,l=s.size/2,c=i.top+l;let u,d=this.left,f=this.width;if(this.isHorizontal())f=Math.max(...this.lineWidths),u=this.top+c,d=ln(e.align,d,this.right-f);else{const _=this.columnSizes.reduce((m,y)=>Math.max(m,y.height),0);u=c+ln(e.align,this.top,this.bottom-_-e.labels.padding-this._computeTitleHeight())}const g=ln(a,d,d+f);r.textAlign=o.textAlign(Pf(a)),r.textBaseline="middle",r.strokeStyle=n.color,r.fillStyle=n.color,r.font=s.string,Co(r,n.text,g,u,s)}_computeTitleHeight(){const e=this.options.title,n=Ut(e.font),s=fn(e.padding);return e.display?n.lineHeight+s.height:0}_getLegendItemAt(e,n){let s,i,o;if(Ys(e,this.left,this.right)&&Ys(n,this.top,this.bottom)){for(o=this.legendHitBoxes,s=0;so.length>r.length?o:r)),e+n.size/2+s.measureText(i).width}function E8(t,e,n){let s=t;return typeof e.text!="string"&&(s=Q0(e,n)),s}function Q0(t,e){const n=t.text?t.text.length:0;return e*n}function T8(t,e){return!!((t==="mousemove"||t==="mouseout")&&(e.onHover||e.onLeave)||e.onClick&&(t==="click"||t==="mouseup"))}var P8={id:"legend",_element:C_,start(t,e,n){const s=t.legend=new C_({ctx:t.ctx,options:n,chart:t});qn.configure(t,s,n),qn.addBox(t,s)},stop(t){qn.removeBox(t,t.legend),delete t.legend},beforeUpdate(t,e,n){const s=t.legend;qn.configure(t,s,n),s.options=n},afterUpdate(t){const e=t.legend;e.buildLabels(),e.adjustHitBoxes()},afterEvent(t,e){e.replay||t.legend.handleEvent(e.event)},defaults:{display:!0,position:"top",align:"center",fullSize:!0,reverse:!1,weight:1e3,onClick(t,e,n){const s=e.datasetIndex,i=n.chart;i.isDatasetVisible(s)?(i.hide(s),e.hidden=!0):(i.show(s),e.hidden=!1)},onHover:null,onLeave:null,labels:{color:t=>t.chart.options.color,boxWidth:40,padding:10,generateLabels(t){const e=t.data.datasets,{labels:{usePointStyle:n,pointStyle:s,textAlign:i,color:o,useBorderRadius:r,borderRadius:a}}=t.legend.options;return t._getSortedDatasetMetas().map(l=>{const c=l.controller.getStyle(n?0:void 0),u=fn(c.borderWidth);return{text:e[l.index].label,fillStyle:c.backgroundColor,fontColor:o,hidden:!l.visible,lineCap:c.borderCapStyle,lineDash:c.borderDash,lineDashOffset:c.borderDashOffset,lineJoin:c.borderJoinStyle,lineWidth:(u.width+u.height)/4,strokeStyle:c.borderColor,pointStyle:s||c.pointStyle,rotation:c.rotation,textAlign:i||c.textAlign,borderRadius:r&&(a||c.borderRadius),datasetIndex:l.index}},this)}},title:{color:t=>t.chart.options.color,display:!1,position:"center",text:""}},descriptors:{_scriptable:t=>!t.startsWith("on"),labels:{_scriptable:t=>!["generateLabels","filter","sort"].includes(t)}}};class Z0 extends ti{constructor(e){super(),this.chart=e.chart,this.options=e.options,this.ctx=e.ctx,this._padding=void 0,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.width=void 0,this.height=void 0,this.position=void 0,this.weight=void 0,this.fullSize=void 0}update(e,n){const s=this.options;if(this.left=0,this.top=0,!s.display){this.width=this.height=this.right=this.bottom=0;return}this.width=this.right=e,this.height=this.bottom=n;const i=yt(s.text)?s.text.length:1;this._padding=fn(s.padding);const o=i*Ut(s.font).lineHeight+this._padding.height;this.isHorizontal()?this.height=o:this.width=o}isHorizontal(){const e=this.options.position;return e==="top"||e==="bottom"}_drawArgs(e){const{top:n,left:s,bottom:i,right:o,options:r}=this,a=r.align;let l=0,c,u,d;return this.isHorizontal()?(u=ln(a,s,o),d=n+e,c=o-s):(r.position==="left"?(u=s+e,d=ln(a,i,n),l=xt*-.5):(u=o-e,d=ln(a,n,i),l=xt*.5),c=i-n),{titleX:u,titleY:d,maxWidth:c,rotation:l}}draw(){const e=this.ctx,n=this.options;if(!n.display)return;const s=Ut(n.font),o=s.lineHeight/2+this._padding.top,{titleX:r,titleY:a,maxWidth:l,rotation:c}=this._drawArgs(o);Co(e,n.text,0,0,s,{color:n.color,maxWidth:l,rotation:c,textAlign:Pf(n.align),textBaseline:"middle",translation:[r,a]})}}function M8(t,e){const n=new Z0({ctx:t.ctx,options:e,chart:t});qn.configure(t,n,e),qn.addBox(t,n),t.titleBlock=n}var D8={id:"title",_element:Z0,start(t,e,n){M8(t,n)},stop(t){const e=t.titleBlock;qn.removeBox(t,e),delete t.titleBlock},beforeUpdate(t,e,n){const s=t.titleBlock;qn.configure(t,s,n),s.options=n},defaults:{align:"center",display:!1,font:{weight:"bold"},fullSize:!0,padding:10,position:"top",text:"",weight:2e3},defaultRoutes:{color:"color"},descriptors:{_scriptable:!0,_indexable:!1}};const oa={average(t){if(!t.length)return!1;let e,n,s=0,i=0,o=0;for(e=0,n=t.length;ea({chart:e,initial:n.initial,numSteps:o,currentStep:Math.min(i-n.start,o)}))}_refresh(){this._request||(this._running=!0,this._request=SC.call(window,()=>{this._update(),this._request=null,this._running&&this._refresh()}))}_update(e=Date.now()){let n=0;this._charts.forEach((i,s)=>{if(!i.running||!i.items.length)return;const r=i.items;let o=r.length-1,a=!1,l;for(;o>=0;--o)l=r[o],l._active?(l._total>i.duration&&(i.duration=l._total),l.tick(e),a=!0):(r[o]=r[r.length-1],r.pop());a&&(s.draw(),this._notify(s,i,e,"progress")),r.length||(i.running=!1,this._notify(s,i,e,"complete"),i.initial=!1),n+=r.length}),this._lastDate=e,n===0&&(this._running=!1)}_getAnims(e){const n=this._charts;let i=n.get(e);return i||(i={running:!1,initial:!0,items:[],listeners:{complete:[],progress:[]}},n.set(e,i)),i}listen(e,n,i){this._getAnims(e).listeners[n].push(i)}add(e,n){!n||!n.length||this._getAnims(e).items.push(...n)}has(e){return this._getAnims(e).items.length>0}start(e){const n=this._charts.get(e);n&&(n.running=!0,n.start=Date.now(),n.duration=n.items.reduce((i,s)=>Math.max(i,s._duration),0),this._refresh())}running(e){if(!this._running)return!1;const n=this._charts.get(e);return!(!n||!n.running||!n.items.length)}stop(e){const n=this._charts.get(e);if(!n||!n.items.length)return;const i=n.items;let s=i.length-1;for(;s>=0;--s)i[s].cancel();n.items=[],this._notify(e,n,Date.now(),"complete")}remove(e){return this._charts.delete(e)}}var Xs=new gj;const e1="transparent",pj={boolean(t,e,n){return n>.5?e:t},color(t,e,n){const i=Yb(t||e1),s=i.valid&&Yb(e||e1);return s&&s.valid?s.mix(i,n).hexString():e},number(t,e,n){return t+(e-t)*n}};class mj{constructor(e,n,i,s){const r=n[i];s=xc([e.to,s,r,e.from]);const o=xc([e.from,r,s]);this._active=!0,this._fn=e.fn||pj[e.type||typeof o],this._easing=jc[e.easing]||jc.linear,this._start=Math.floor(Date.now()+(e.delay||0)),this._duration=this._total=Math.floor(e.duration),this._loop=!!e.loop,this._target=n,this._prop=i,this._from=o,this._to=s,this._promises=void 0}active(){return this._active}update(e,n,i){if(this._active){this._notify(!1);const s=this._target[this._prop],r=i-this._start,o=this._duration-r;this._start=i,this._duration=Math.floor(Math.max(o,e.duration)),this._total+=r,this._loop=!!e.loop,this._to=xc([e.to,n,s,e.from]),this._from=xc([e.from,s,n])}}cancel(){this._active&&(this.tick(Date.now()),this._active=!1,this._notify(!1))}tick(e){const n=e-this._start,i=this._duration,s=this._prop,r=this._from,o=this._loop,a=this._to;let l;if(this._active=r!==a&&(o||n1?2-l:l,l=this._easing(Math.min(1,Math.max(0,l))),this._target[s]=this._fn(r,a,l)}wait(){const e=this._promises||(this._promises=[]);return new Promise((n,i)=>{e.push({res:n,rej:i})})}_notify(e){const n=e?"res":"rej",i=this._promises||[];for(let s=0;s{const r=e[s];if(!ut(r))return;const o={};for(const a of n)o[a]=r[a];(Nt(r.properties)&&r.properties||[s]).forEach(a=>{(a===s||!i.has(a))&&i.set(a,o)})})}_animateOptions(e,n){const i=n.options,s=yj(e,i);if(!s)return[];const r=this._createAnimations(s,i);return i.$shared&&_j(e.options.$animations,i).then(()=>{e.options=i},()=>{}),r}_createAnimations(e,n){const i=this._properties,s=[],r=e.$animations||(e.$animations={}),o=Object.keys(n),a=Date.now();let l;for(l=o.length-1;l>=0;--l){const c=o[l];if(c.charAt(0)==="$")continue;if(c==="options"){s.push(...this._animateOptions(e,n));continue}const u=n[c];let d=r[c];const h=i.get(c);if(d)if(h&&d.active()){d.update(h,u,a);continue}else d.cancel();if(!h||!h.duration){e[c]=u;continue}r[c]=d=new mj(h,e,c,u),s.push(d)}return s}update(e,n){if(this._properties.size===0){Object.assign(e,n);return}const i=this._createAnimations(e,n);if(i.length)return Xs.add(this._chart,i),!0}}function _j(t,e){const n=[],i=Object.keys(e);for(let s=0;s0||!n&&r<0)return s.index}return null}function r1(t,e){const{chart:n,_cachedMeta:i}=t,s=n._stacks||(n._stacks={}),{iScale:r,vScale:o,index:a}=i,l=r.axis,c=o.axis,u=xj(r,o,i),d=e.length;let h;for(let f=0;fn[i].axis===e).shift()}function Cj(t,e){return yo(t,{active:!1,dataset:void 0,datasetIndex:e,index:e,mode:"default",type:"dataset"})}function Tj(t,e,n){return yo(t,{active:!1,dataIndex:e,parsed:void 0,raw:void 0,element:n,index:e,mode:"default",type:"data"})}function uc(t,e){const n=t.controller.index,i=t.vScale&&t.vScale.axis;if(i){e=e||t._parsed;for(const s of e){const r=s._stacks;if(!r||r[i]===void 0||r[i][n]===void 0)return;delete r[i][n],r[i]._visualValues!==void 0&&r[i]._visualValues[n]!==void 0&&delete r[i]._visualValues[n]}}}const Gg=t=>t==="reset"||t==="none",o1=(t,e)=>e?t:Object.assign({},t),kj=(t,e,n)=>t&&!e.hidden&&e._stacked&&{keys:HC(n,!0),values:null};class vo{static defaults={};static datasetElementType=null;static dataElementType=null;constructor(e,n){this.chart=e,this._ctx=e.ctx,this.index=n,this._cachedDataOpts={},this._cachedMeta=this.getMeta(),this._type=this._cachedMeta.type,this.options=void 0,this._parsing=!1,this._data=void 0,this._objectData=void 0,this._sharedOptions=void 0,this._drawStart=void 0,this._drawCount=void 0,this.enableOptionSharing=!1,this.supportsDecimation=!1,this.$context=void 0,this._syncList=[],this.datasetElementType=new.target.datasetElementType,this.dataElementType=new.target.dataElementType,this.initialize()}initialize(){const e=this._cachedMeta;this.configure(),this.linkScales(),e._stacked=i1(e.vScale,e),this.addElements(),this.options.fill&&!this.chart.isPluginEnabled("filler")&&console.warn("Tried to use the 'fill' option without the 'Filler' plugin enabled. Please import and register the 'Filler' plugin and make sure it is not disabled in the options")}updateIndex(e){this.index!==e&&uc(this._cachedMeta),this.index=e}linkScales(){const e=this.chart,n=this._cachedMeta,i=this.getDataset(),s=(d,h,f,p)=>d==="x"?h:d==="r"?p:f,r=n.xAxisID=tt(i.xAxisID,Ug(e,"x")),o=n.yAxisID=tt(i.yAxisID,Ug(e,"y")),a=n.rAxisID=tt(i.rAxisID,Ug(e,"r")),l=n.indexAxis,c=n.iAxisID=s(l,r,o,a),u=n.vAxisID=s(l,o,r,a);n.xScale=this.getScaleForId(r),n.yScale=this.getScaleForId(o),n.rScale=this.getScaleForId(a),n.iScale=this.getScaleForId(c),n.vScale=this.getScaleForId(u)}getDataset(){return this.chart.data.datasets[this.index]}getMeta(){return this.chart.getDatasetMeta(this.index)}getScaleForId(e){return this.chart.scales[e]}_getOtherScale(e){const n=this._cachedMeta;return e===n.iScale?n.vScale:n.iScale}reset(){this._update("reset")}_destroy(){const e=this._cachedMeta;this._data&&zb(this._data,this),e._stacked&&uc(e)}_dataCheck(){const e=this.getDataset(),n=e.data||(e.data=[]),i=this._data;if(ut(n))this._data=wj(n);else if(i!==n){if(i){zb(i,this);const s=this._cachedMeta;uc(s),s._parsed=[]}n&&Object.isExtensible(n)&&hY(n,this),this._syncList=[],this._data=n}}addElements(){const e=this._cachedMeta;this._dataCheck(),this.datasetElementType&&(e.dataset=new this.datasetElementType)}buildOrUpdateElements(e){const n=this._cachedMeta,i=this.getDataset();let s=!1;this._dataCheck();const r=n._stacked;n._stacked=i1(n.vScale,n),n.stack!==i.stack&&(s=!0,uc(n),n.stack=i.stack),this._resyncElements(e),(s||r!==n._stacked)&&r1(this,n._parsed)}configure(){const e=this.chart.config,n=e.datasetScopeKeys(this._type),i=e.getOptionScopes(this.getDataset(),n,!0);this.options=e.createResolver(i,this.getContext()),this._parsing=this.options.parsing,this._cachedDataOpts={}}parse(e,n){const{_cachedMeta:i,_data:s}=this,{iScale:r,_stacked:o}=i,a=r.axis;let l=e===0&&n===s.length?!0:i._sorted,c=e>0&&i._parsed[e-1],u,d,h;if(this._parsing===!1)i._parsed=s,i._sorted=!0,h=s;else{Nt(s[e])?h=this.parseArrayData(i,s,e,n):ut(s[e])?h=this.parseObjectData(i,s,e,n):h=this.parsePrimitiveData(i,s,e,n);const f=()=>d[a]===null||c&&d[a]m||d=0;--h)if(!p()){this.updateRangeFromParsed(c,e,f,l);break}}return c}getAllParsedValues(e){const n=this._cachedMeta._parsed,i=[];let s,r,o;for(s=0,r=n.length;s=0&&ethis.getContext(i,s,n),m=c.resolveNamedOptions(h,f,p,d);return m.$shared&&(m.$shared=l,r[o]=Object.freeze(o1(m,l))),m}_resolveAnimations(e,n,i){const s=this.chart,r=this._cachedDataOpts,o=`animation-${n}`,a=r[o];if(a)return a;let l;if(s.options.animation!==!1){const u=this.chart.config,d=u.datasetAnimationScopeKeys(this._type,n),h=u.getOptionScopes(this.getDataset(),d);l=u.createResolver(h,this.getContext(e,i,n))}const c=new WC(s,l&&l.animations);return l&&l._cacheable&&(r[o]=Object.freeze(c)),c}getSharedOptions(e){if(e.$shared)return this._sharedOptions||(this._sharedOptions=Object.assign({},e))}includeOptions(e,n){return!n||Gg(e)||this.chart._animationsDisabled}_getSharedOptions(e,n){const i=this.resolveDataElementOptions(e,n),s=this._sharedOptions,r=this.getSharedOptions(i),o=this.includeOptions(n,r)||r!==s;return this.updateSharedOptions(r,n,i),{sharedOptions:r,includeOptions:o}}updateElement(e,n,i,s){Gg(s)?Object.assign(e,i):this._resolveAnimations(n,s).update(e,i)}updateSharedOptions(e,n,i){e&&!Gg(n)&&this._resolveAnimations(void 0,n).update(e,i)}_setStyle(e,n,i,s){e.active=s;const r=this.getStyle(n,s);this._resolveAnimations(n,i,s).update(e,{options:!s&&this.getSharedOptions(r)||r})}removeHoverStyle(e,n,i){this._setStyle(e,i,"active",!1)}setHoverStyle(e,n,i){this._setStyle(e,i,"active",!0)}_removeDatasetHoverStyle(){const e=this._cachedMeta.dataset;e&&this._setStyle(e,void 0,"active",!1)}_setDatasetHoverStyle(){const e=this._cachedMeta.dataset;e&&this._setStyle(e,void 0,"active",!0)}_resyncElements(e){const n=this._data,i=this._cachedMeta.data;for(const[a,l,c]of this._syncList)this[a](l,c);this._syncList=[];const s=i.length,r=n.length,o=Math.min(r,s);o&&this.parse(0,o),r>s?this._insertElements(s,r-s,e):r{for(c.length+=n,a=c.length-1;a>=o;a--)c[a]=c[a-n]};for(l(r),a=e;as-r))}return t._cache.$bar}function Mj(t){const e=t.iScale,n=Aj(e,t.type);let i=e._length,s,r,o,a;const l=()=>{o===32767||o===-32768||(uu(a)&&(i=Math.min(i,Math.abs(o-a)||i)),a=o)};for(s=0,r=n.length;s0?s[t-1]:null,a=tMath.abs(a)&&(l=a,c=o),e[n.axis]=c,e._custom={barStart:l,barEnd:c,start:s,end:r,min:o,max:a}}function YC(t,e,n,i){return Nt(t)?Rj(t,e,n,i):e[n.axis]=n.parse(t,i),e}function a1(t,e,n,i){const s=t.iScale,r=t.vScale,o=s.getLabels(),a=s===r,l=[];let c,u,d,h;for(c=n,u=n+i;c=n?1:-1)}function $j(t){let e,n,i,s,r;return t.horizontal?(e=t.base>t.x,n="left",i="right"):(e=t.basel.controller.options.grouped),r=i.options.stacked,o=[],a=l=>{const c=l.controller.getParsed(n),u=c&&c[l.vScale.axis];if(gt(u)||isNaN(u))return!0};for(const l of s)if(!(n!==void 0&&a(l))&&((r===!1||o.indexOf(l.stack)===-1||r===void 0&&l.stack===void 0)&&o.push(l.stack),l.index===e))break;return o.length||o.push(void 0),o}_getStackCount(e){return this._getStacks(void 0,e).length}_getStackIndex(e,n,i){const s=this._getStacks(e,i),r=n!==void 0?s.indexOf(n):-1;return r===-1?s.length-1:r}_getRuler(){const e=this.options,n=this._cachedMeta,i=n.iScale,s=[];let r,o;for(r=0,o=n.data.length;r=0;--i)n=Math.max(n,e[i].size(this.resolveDataElementOptions(i))/2);return n>0&&n}getLabelAndValue(e){const n=this._cachedMeta,i=this.chart.data.labels||[],{xScale:s,yScale:r}=n,o=this.getParsed(e),a=s.getLabelForValue(o.x),l=r.getLabelForValue(o.y),c=o._custom;return{label:i[e]||"",value:"("+a+", "+l+(c?", "+c:"")+")"}}update(e){const n=this._cachedMeta.data;this.updateElements(n,0,n.length,e)}updateElements(e,n,i,s){const r=s==="reset",{iScale:o,vScale:a}=this._cachedMeta,{sharedOptions:l,includeOptions:c}=this._getSharedOptions(n,s),u=o.axis,d=a.axis;for(let h=n;hdu(E,a,l,!0)?1:Math.max(C,C*n,w,w*n),p=(E,C,w)=>du(E,a,l,!0)?-1:Math.min(C,C*n,w,w*n),m=f(0,c,d),y=f(on,u,h),v=p(Bt,c,d),b=p(Bt+on,u,h);i=(m-v)/2,s=(y-b)/2,r=-(m+v)/2,o=-(y+b)/2}return{ratioX:i,ratioY:s,offsetX:r,offsetY:o}}class KC extends vo{static id="doughnut";static defaults={datasetElementType:!1,dataElementType:"arc",animation:{animateRotate:!0,animateScale:!1},animations:{numbers:{type:"number",properties:["circumference","endAngle","innerRadius","outerRadius","startAngle","x","y","offset","borderWidth","spacing"]}},cutout:"50%",rotation:0,circumference:360,radius:"100%",spacing:0,indexAxis:"r"};static descriptors={_scriptable:e=>e!=="spacing",_indexable:e=>e!=="spacing"&&!e.startsWith("borderDash")&&!e.startsWith("hoverBorderDash")};static overrides={aspectRatio:1,plugins:{legend:{labels:{generateLabels(e){const n=e.data;if(n.labels.length&&n.datasets.length){const{labels:{pointStyle:i,color:s}}=e.legend.options;return n.labels.map((r,o)=>{const l=e.getDatasetMeta(0).controller.getStyle(o);return{text:r,fillStyle:l.backgroundColor,strokeStyle:l.borderColor,fontColor:s,lineWidth:l.borderWidth,pointStyle:i,hidden:!e.getDataVisibility(o),index:o}})}return[]}},onClick(e,n,i){i.chart.toggleDataVisibility(n.index),i.chart.update()}}}};constructor(e,n){super(e,n),this.enableOptionSharing=!0,this.innerRadius=void 0,this.outerRadius=void 0,this.offsetX=void 0,this.offsetY=void 0}linkScales(){}parse(e,n){const i=this.getDataset().data,s=this._cachedMeta;if(this._parsing===!1)s._parsed=i;else{let r=l=>+i[l];if(ut(i[e])){const{key:l="value"}=this._parsing;r=c=>+ao(i[c],l)}let o,a;for(o=e,a=e+n;o0&&!isNaN(e)?Ft*(Math.abs(e)/n):0}getLabelAndValue(e){const n=this._cachedMeta,i=this.chart,s=i.data.labels||[],r=Wu(n._parsed[e],i.options.locale);return{label:s[e]||"",value:r}}getMaxBorderWidth(e){let n=0;const i=this.chart;let s,r,o,a,l;if(!e){for(s=0,r=i.data.datasets.length;s0&&this.getParsed(n-1);for(let w=0;w=b){T.skip=!0;continue}const k=this.getParsed(w),A=gt(k[f]),P=T[h]=o.getPixelForValue(k[h],w),F=T[f]=r||A?a.getBasePixel():a.getPixelForValue(l?this.applyStack(a,k,l):k[f],w);T.skip=isNaN(P)||isNaN(F)||A,T.stop=w>0&&Math.abs(k[h]-C[h])>y,m&&(T.parsed=k,T.raw=c.data[w]),d&&(T.options=u||this.resolveDataElementOptions(w,x.active?"active":s)),v||this.updateElement(x,w,T,s),C=k}}getMaxOverflow(){const e=this._cachedMeta,n=e.dataset,i=n.options&&n.options.borderWidth||0,s=e.data||[];if(!s.length)return i;const r=s[0].size(this.resolveDataElementOptions(0)),o=s[s.length-1].size(this.resolveDataElementOptions(s.length-1));return Math.max(i,r,o)/2}draw(){const e=this._cachedMeta;e.dataset.updateControlPoints(this.chart.chartArea,e.iScale.axis),super.draw()}}class Vj extends vo{static id="polarArea";static defaults={dataElementType:"arc",animation:{animateRotate:!0,animateScale:!0},animations:{numbers:{type:"number",properties:["x","y","startAngle","endAngle","innerRadius","outerRadius"]}},indexAxis:"r",startAngle:0};static overrides={aspectRatio:1,plugins:{legend:{labels:{generateLabels(e){const n=e.data;if(n.labels.length&&n.datasets.length){const{labels:{pointStyle:i,color:s}}=e.legend.options;return n.labels.map((r,o)=>{const l=e.getDatasetMeta(0).controller.getStyle(o);return{text:r,fillStyle:l.backgroundColor,strokeStyle:l.borderColor,fontColor:s,lineWidth:l.borderWidth,pointStyle:i,hidden:!e.getDataVisibility(o),index:o}})}return[]}},onClick(e,n,i){i.chart.toggleDataVisibility(n.index),i.chart.update()}}},scales:{r:{type:"radialLinear",angleLines:{display:!1},beginAtZero:!0,grid:{circular:!0},pointLabels:{display:!1},startAngle:0}}};constructor(e,n){super(e,n),this.innerRadius=void 0,this.outerRadius=void 0}getLabelAndValue(e){const n=this._cachedMeta,i=this.chart,s=i.data.labels||[],r=Wu(n._parsed[e].r,i.options.locale);return{label:s[e]||"",value:r}}parseObjectData(e,n,i,s){return LC.bind(this)(e,n,i,s)}update(e){const n=this._cachedMeta.data;this._updateRadius(),this.updateElements(n,0,n.length,e)}getMinMax(){const e=this._cachedMeta,n={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY};return e.data.forEach((i,s)=>{const r=this.getParsed(s).r;!isNaN(r)&&this.chart.getDataVisibility(s)&&(rn.max&&(n.max=r))}),n}_updateRadius(){const e=this.chart,n=e.chartArea,i=e.options,s=Math.min(n.right-n.left,n.bottom-n.top),r=Math.max(s/2,0),o=Math.max(i.cutoutPercentage?r/100*i.cutoutPercentage:1,0),a=(r-o)/e.getVisibleDatasetCount();this.outerRadius=r-a*this.index,this.innerRadius=this.outerRadius-a}updateElements(e,n,i,s){const r=s==="reset",o=this.chart,l=o.options.animation,c=this._cachedMeta.rScale,u=c.xCenter,d=c.yCenter,h=c.getIndexAngle(0)-.5*Bt;let f=h,p;const m=360/this.countVisibleElements();for(p=0;p{!isNaN(this.getParsed(s).r)&&this.chart.getDataVisibility(s)&&n++}),n}_computeAngle(e,n,i){return this.chart.getDataVisibility(e)?as(this.resolveDataElementOptions(e,n).angle||i):0}}class zj extends KC{static id="pie";static defaults={cutout:0,rotation:0,circumference:360,radius:"100%"}}class Wj extends vo{static id="radar";static defaults={datasetElementType:"line",dataElementType:"point",indexAxis:"r",showLine:!0,elements:{line:{fill:"start"}}};static overrides={aspectRatio:1,scales:{r:{type:"radialLinear"}}};getLabelAndValue(e){const n=this._cachedMeta.vScale,i=this.getParsed(e);return{label:n.getLabels()[e],value:""+n.getLabelForValue(i[n.axis])}}parseObjectData(e,n,i,s){return LC.bind(this)(e,n,i,s)}update(e){const n=this._cachedMeta,i=n.dataset,s=n.data||[],r=n.iScale.getLabels();if(i.points=s,e!=="resize"){const o=this.resolveDatasetElementOptions(e);this.options.showLine||(o.borderWidth=0);const a={_loop:!0,_fullLoop:r.length===s.length,options:o};this.updateElement(i,void 0,a,e)}this.updateElements(s,0,s.length,e)}updateElements(e,n,i,s){const r=this._cachedMeta.rScale,o=s==="reset";for(let a=n;a0&&this.getParsed(n-1);for(let C=n;C0&&Math.abs(x[f]-E[f])>v,y&&(T.parsed=x,T.raw=c.data[C]),h&&(T.options=d||this.resolveDataElementOptions(C,w.active?"active":s)),b||this.updateElement(w,C,T,s),E=x}this.updateSharedOptions(d,s,u)}getMaxOverflow(){const e=this._cachedMeta,n=e.data||[];if(!this.options.showLine){let a=0;for(let l=n.length-1;l>=0;--l)a=Math.max(a,n[l].size(this.resolveDataElementOptions(l))/2);return a>0&&a}const i=e.dataset,s=i.options&&i.options.borderWidth||0;if(!n.length)return s;const r=n[0].size(this.resolveDataElementOptions(0)),o=n[n.length-1].size(this.resolveDataElementOptions(n.length-1));return Math.max(s,r,o)/2}}function Lo(){throw new Error("This method is not implemented: Check that a complete date adapter is provided.")}class ay{static override(e){Object.assign(ay.prototype,e)}options;constructor(e){this.options=e||{}}init(){}formats(){return Lo()}parse(){return Lo()}format(){return Lo()}add(){return Lo()}diff(){return Lo()}startOf(){return Lo()}endOf(){return Lo()}}var Yj={_date:ay};function jj(t,e,n,i){const{controller:s,data:r,_sorted:o}=t,a=s._cachedMeta.iScale;if(a&&e===a.axis&&e!=="r"&&o&&r.length){const l=a._reversePixels?uY:or;if(i){if(s._sharedOptions){const c=r[0],u=typeof c.getRange=="function"&&c.getRange(e);if(u){const d=l(r,e,n-u),h=l(r,e,n+u);return{lo:d.lo,hi:h.hi}}}}else return l(r,e,n)}return{lo:0,hi:r.length-1}}function Hu(t,e,n,i,s){const r=t.getSortedVisibleDatasetMetas(),o=n[e];for(let a=0,l=r.length;a{l[o](e[n],s)&&(r.push({element:l,datasetIndex:c,index:u}),a=a||l.inRange(e.x,e.y,s))}),i&&!a?[]:r}var Xj={evaluateInteractionItems:Hu,modes:{index(t,e,n,i){const s=zo(e,t),r=n.axis||"x",o=n.includeInvisible||!1,a=n.intersect?qg(t,s,r,i,o):Zg(t,s,r,!1,i,o),l=[];return a.length?(t.getSortedVisibleDatasetMetas().forEach(c=>{const u=a[0].index,d=c.data[u];d&&!d.skip&&l.push({element:d,datasetIndex:c.index,index:u})}),l):[]},dataset(t,e,n,i){const s=zo(e,t),r=n.axis||"xy",o=n.includeInvisible||!1;let a=n.intersect?qg(t,s,r,i,o):Zg(t,s,r,!1,i,o);if(a.length>0){const l=a[0].datasetIndex,c=t.getDatasetMeta(l).data;a=[];for(let u=0;un.pos===e)}function d1(t,e){return t.filter(n=>GC.indexOf(n.pos)===-1&&n.box.axis===e)}function hc(t,e){return t.sort((n,i)=>{const s=e?i:n,r=e?n:i;return s.weight===r.weight?s.index-r.index:s.weight-r.weight})}function qj(t){const e=[];let n,i,s,r,o,a;for(n=0,i=(t||[]).length;nc.box.fullSize),!0),i=hc(dc(e,"left"),!0),s=hc(dc(e,"right")),r=hc(dc(e,"top"),!0),o=hc(dc(e,"bottom")),a=d1(e,"x"),l=d1(e,"y");return{fullSize:n,leftAndTop:i.concat(r),rightAndBottom:s.concat(l).concat(o).concat(a),chartArea:dc(e,"chartArea"),vertical:i.concat(s).concat(l),horizontal:r.concat(o).concat(a)}}function h1(t,e,n,i){return Math.max(t[n],e[n])+Math.max(t[i],e[i])}function XC(t,e){t.top=Math.max(t.top,e.top),t.left=Math.max(t.left,e.left),t.bottom=Math.max(t.bottom,e.bottom),t.right=Math.max(t.right,e.right)}function eK(t,e,n,i){const{pos:s,box:r}=n,o=t.maxPadding;if(!ut(s)){n.size&&(t[s]-=n.size);const d=i[n.stack]||{size:0,count:1};d.size=Math.max(d.size,n.horizontal?r.height:r.width),n.size=d.size/d.count,t[s]+=n.size}r.getPadding&&XC(o,r.getPadding());const a=Math.max(0,e.outerWidth-h1(o,t,"left","right")),l=Math.max(0,e.outerHeight-h1(o,t,"top","bottom")),c=a!==t.w,u=l!==t.h;return t.w=a,t.h=l,n.horizontal?{same:c,other:u}:{same:u,other:c}}function tK(t){const e=t.maxPadding;function n(i){const s=Math.max(e[i]-t[i],0);return t[i]+=s,s}t.y+=n("top"),t.x+=n("left"),n("right"),n("bottom")}function nK(t,e){const n=e.maxPadding;function i(s){const r={left:0,top:0,right:0,bottom:0};return s.forEach(o=>{r[o]=Math.max(e[o],n[o])}),r}return i(t?["left","right"]:["top","bottom"])}function Ec(t,e,n,i){const s=[];let r,o,a,l,c,u;for(r=0,o=t.length,c=0;r{typeof m.beforeLayout=="function"&&m.beforeLayout()});const u=l.reduce((m,y)=>y.box.options&&y.box.options.display===!1?m:m+1,0)||1,d=Object.freeze({outerWidth:e,outerHeight:n,padding:s,availableWidth:r,availableHeight:o,vBoxMaxWidth:r/2/u,hBoxMaxHeight:o/2}),h=Object.assign({},s);XC(h,Kn(i));const f=Object.assign({maxPadding:h,w:r,h:o,x:s.left,y:s.top},s),p=Jj(l.concat(c),d);Ec(a.fullSize,f,d,p),Ec(l,f,d,p),Ec(c,f,d,p)&&Ec(l,f,d,p),tK(f),f1(a.leftAndTop,f,d,p),f.x+=f.w,f.y+=f.h,f1(a.rightAndBottom,f,d,p),t.chartArea={left:f.left,top:f.top,right:f.left+f.w,bottom:f.top+f.h,height:f.h,width:f.w},Ct(a.chartArea,m=>{const y=m.box;Object.assign(y,t.chartArea),y.update(f.w,f.h,{left:0,top:0,right:0,bottom:0})})}};class qC{acquireContext(e,n){}releaseContext(e){return!1}addEventListener(e,n,i){}removeEventListener(e,n,i){}getDevicePixelRatio(){return 1}getMaximumSize(e,n,i,s){return n=Math.max(0,n||e.width),i=i||e.height,{width:n,height:Math.max(0,s?Math.floor(n/s):i)}}isAttached(e){return!0}updateConfig(e){}}class iK extends qC{acquireContext(e){return e&&e.getContext&&e.getContext("2d")||null}updateConfig(e){e.options.animation=!1}}const rh="$chartjs",sK={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"},g1=t=>t===null||t==="";function rK(t,e){const n=t.style,i=t.getAttribute("height"),s=t.getAttribute("width");if(t[rh]={initial:{height:i,width:s,style:{display:n.display,height:n.height,width:n.width}}},n.display=n.display||"block",n.boxSizing=n.boxSizing||"border-box",g1(s)){const r=qb(t,"width");r!==void 0&&(t.width=r)}if(g1(i))if(t.style.height==="")t.height=t.width/(e||2);else{const r=qb(t,"height");r!==void 0&&(t.height=r)}return t}const ZC=ij?{passive:!0}:!1;function oK(t,e,n){t.addEventListener(e,n,ZC)}function aK(t,e,n){t.canvas.removeEventListener(e,n,ZC)}function lK(t,e){const n=sK[t.type]||t.type,{x:i,y:s}=zo(t,e);return{type:n,chart:e,native:t,x:i!==void 0?i:null,y:s!==void 0?s:null}}function Th(t,e){for(const n of t)if(n===e||n.contains(e))return!0}function cK(t,e,n){const i=t.canvas,s=new MutationObserver(r=>{let o=!1;for(const a of r)o=o||Th(a.addedNodes,i),o=o&&!Th(a.removedNodes,i);o&&n()});return s.observe(document,{childList:!0,subtree:!0}),s}function uK(t,e,n){const i=t.canvas,s=new MutationObserver(r=>{let o=!1;for(const a of r)o=o||Th(a.removedNodes,i),o=o&&!Th(a.addedNodes,i);o&&n()});return s.observe(document,{childList:!0,subtree:!0}),s}const fu=new Map;let p1=0;function JC(){const t=window.devicePixelRatio;t!==p1&&(p1=t,fu.forEach((e,n)=>{n.currentDevicePixelRatio!==t&&e()}))}function dK(t,e){fu.size||window.addEventListener("resize",JC),fu.set(t,e)}function hK(t){fu.delete(t),fu.size||window.removeEventListener("resize",JC)}function fK(t,e,n){const i=t.canvas,s=i&&oy(i);if(!s)return;const r=CC((a,l)=>{const c=s.clientWidth;n(a,l),c{const l=a[0],c=l.contentRect.width,u=l.contentRect.height;c===0&&u===0||r(c,u)});return o.observe(s),dK(t,r),o}function Jg(t,e,n){n&&n.disconnect(),e==="resize"&&hK(t)}function gK(t,e,n){const i=t.canvas,s=CC(r=>{t.ctx!==null&&n(lK(r,t))},t);return oK(i,e,s),s}class pK extends qC{acquireContext(e,n){const i=e&&e.getContext&&e.getContext("2d");return i&&i.canvas===e?(rK(e,n),i):null}releaseContext(e){const n=e.canvas;if(!n[rh])return!1;const i=n[rh].initial;["height","width"].forEach(r=>{const o=i[r];gt(o)?n.removeAttribute(r):n.setAttribute(r,o)});const s=i.style||{};return Object.keys(s).forEach(r=>{n.style[r]=s[r]}),n.width=n.width,delete n[rh],!0}addEventListener(e,n,i){this.removeEventListener(e,n);const s=e.$proxies||(e.$proxies={}),o={attach:cK,detach:uK,resize:fK}[n]||gK;s[n]=o(e,n,i)}removeEventListener(e,n){const i=e.$proxies||(e.$proxies={}),s=i[n];if(!s)return;({attach:Jg,detach:Jg,resize:Jg}[n]||aK)(e,n,s),i[n]=void 0}getDevicePixelRatio(){return window.devicePixelRatio}getMaximumSize(e,n,i,s){return nj(e,n,i,s)}isAttached(e){const n=oy(e);return!!(n&&n.isConnected)}}function mK(t){return!ry()||typeof OffscreenCanvas<"u"&&t instanceof OffscreenCanvas?iK:pK}let vr=class{static defaults={};static defaultRoutes=void 0;x;y;active=!1;options;$animations;tooltipPosition(e){const{x:n,y:i}=this.getProps(["x","y"],e);return{x:n,y:i}}hasValue(){return Al(this.x)&&Al(this.y)}getProps(e,n){const i=this.$animations;if(!n||!i)return this;const s={};return e.forEach(r=>{s[r]=i[r]&&i[r].active()?i[r]._to:this[r]}),s}};function _K(t,e){const n=t.options.ticks,i=yK(t),s=Math.min(n.maxTicksLimit||i,i),r=n.major.enabled?bK(e):[],o=r.length,a=r[0],l=r[o-1],c=[];if(o>s)return wK(e,c,r,o/s),c;const u=vK(r,e,s);if(o>0){let d,h;const f=o>1?Math.round((l-a)/(o-1)):null;for(Id(e,c,u,gt(f)?0:a-f,a),d=0,h=o-1;ds)return l}return Math.max(s,1)}function bK(t){const e=[];let n,i;for(n=0,i=t.length;nt==="left"?"right":t==="right"?"left":t,m1=(t,e,n)=>e==="top"||e==="left"?t[e]+n:t[e]-n,_1=(t,e)=>Math.min(e||t,t);function y1(t,e){const n=[],i=t.length/e,s=t.length;let r=0;for(;ro+a)))return l}function CK(t,e){Ct(t,n=>{const i=n.gc,s=i.length/2;let r;if(s>e){for(r=0;ri?i:n,i=s&&n>i?n:i,{min:xi(n,xi(i,n)),max:xi(i,xi(n,i))}}getPadding(){return{left:this.paddingLeft||0,top:this.paddingTop||0,right:this.paddingRight||0,bottom:this.paddingBottom||0}}getTicks(){return this.ticks}getLabels(){const e=this.chart.data;return this.options.labels||(this.isHorizontal()?e.xLabels:e.yLabels)||e.labels||[]}getLabelItems(e=this.chart.chartArea){return this._labelItems||(this._labelItems=this._computeLabelItems(e))}beforeLayout(){this._cache={},this._dataLimitsCached=!1}beforeUpdate(){Pt(this.options.beforeUpdate,[this])}update(e,n,i){const{beginAtZero:s,grace:r,ticks:o}=this.options,a=o.sampleSize;this.beforeUpdate(),this.maxWidth=e,this.maxHeight=n,this._margins=i=Object.assign({left:0,right:0,top:0,bottom:0},i),this.ticks=null,this._labelSizes=null,this._gridLineItems=null,this._labelItems=null,this.beforeSetDimensions(),this.setDimensions(),this.afterSetDimensions(),this._maxLength=this.isHorizontal()?this.width+i.left+i.right:this.height+i.top+i.bottom,this._dataLimitsCached||(this.beforeDataLimits(),this.determineDataLimits(),this.afterDataLimits(),this._range=$Y(this,r,s),this._dataLimitsCached=!0),this.beforeBuildTicks(),this.ticks=this.buildTicks()||[],this.afterBuildTicks();const l=a=r||i<=1||!this.isHorizontal()){this.labelRotation=s;return}const u=this._getLabelSizes(),d=u.widest.width,h=u.highest.height,f=Pn(this.chart.width-d,0,this.maxWidth);a=e.offset?this.maxWidth/i:f/(i-1),d+6>a&&(a=f/(i-(e.offset?.5:1)),l=this.maxHeight-fc(e.grid)-n.padding-v1(e.title,this.chart.options.font),c=Math.sqrt(d*d+h*h),o=Z_(Math.min(Math.asin(Pn((u.highest.height+6)/a,-1,1)),Math.asin(Pn(l/c,-1,1))-Math.asin(Pn(h/c,-1,1)))),o=Math.max(s,Math.min(r,o))),this.labelRotation=o}afterCalculateLabelRotation(){Pt(this.options.afterCalculateLabelRotation,[this])}afterAutoSkip(){}beforeFit(){Pt(this.options.beforeFit,[this])}fit(){const e={width:0,height:0},{chart:n,options:{ticks:i,title:s,grid:r}}=this,o=this._isVisible(),a=this.isHorizontal();if(o){const l=v1(s,n.options.font);if(a?(e.width=this.maxWidth,e.height=fc(r)+l):(e.height=this.maxHeight,e.width=fc(r)+l),i.display&&this.ticks.length){const{first:c,last:u,widest:d,highest:h}=this._getLabelSizes(),f=i.padding*2,p=as(this.labelRotation),m=Math.cos(p),y=Math.sin(p);if(a){const v=i.mirror?0:y*d.width+m*h.height;e.height=Math.min(this.maxHeight,e.height+v+f)}else{const v=i.mirror?0:m*d.width+y*h.height;e.width=Math.min(this.maxWidth,e.width+v+f)}this._calculatePadding(c,u,y,m)}}this._handleMargins(),a?(this.width=this._length=n.width-this._margins.left-this._margins.right,this.height=e.height):(this.width=e.width,this.height=this._length=n.height-this._margins.top-this._margins.bottom)}_calculatePadding(e,n,i,s){const{ticks:{align:r,padding:o},position:a}=this.options,l=this.labelRotation!==0,c=a!=="top"&&this.axis==="x";if(this.isHorizontal()){const u=this.getPixelForTick(0)-this.left,d=this.right-this.getPixelForTick(this.ticks.length-1);let h=0,f=0;l?c?(h=s*e.width,f=i*n.height):(h=i*e.height,f=s*n.width):r==="start"?f=n.width:r==="end"?h=e.width:r!=="inner"&&(h=e.width/2,f=n.width/2),this.paddingLeft=Math.max((h-u+o)*this.width/(this.width-u),0),this.paddingRight=Math.max((f-d+o)*this.width/(this.width-d),0)}else{let u=n.height/2,d=e.height/2;r==="start"?(u=0,d=e.height):r==="end"&&(u=n.height,d=0),this.paddingTop=u+o,this.paddingBottom=d+o}}_handleMargins(){this._margins&&(this._margins.left=Math.max(this.paddingLeft,this._margins.left),this._margins.top=Math.max(this.paddingTop,this._margins.top),this._margins.right=Math.max(this.paddingRight,this._margins.right),this._margins.bottom=Math.max(this.paddingBottom,this._margins.bottom))}afterFit(){Pt(this.options.afterFit,[this])}isHorizontal(){const{axis:e,position:n}=this.options;return n==="top"||n==="bottom"||e==="x"}isFullSize(){return this.options.fullSize}_convertTicksToLabels(e){this.beforeTickToLabelConversion(),this.generateTickLabels(e);let n,i;for(n=0,i=e.length;n({width:o[A]||0,height:a[A]||0});return{first:k(0),last:k(n-1),widest:k(x),highest:k(T),widths:o,heights:a}}getLabelForValue(e){return e}getPixelForValue(e,n){return NaN}getValueForPixel(e){}getPixelForTick(e){const n=this.ticks;return e<0||e>n.length-1?null:this.getPixelForValue(n[e].value)}getPixelForDecimal(e){this._reversePixels&&(e=1-e);const n=this._startPixel+e*this._length;return cY(this._alignToPixels?$o(this.chart,n,0):n)}getDecimalForPixel(e){const n=(e-this._startPixel)/this._length;return this._reversePixels?1-n:n}getBasePixel(){return this.getPixelForValue(this.getBaseValue())}getBaseValue(){const{min:e,max:n}=this;return e<0&&n<0?n:e>0&&n>0?e:0}getContext(e){const n=this.ticks||[];if(e>=0&&ea*s?a/i:l/s:l*s0}_computeGridLineItems(e){const n=this.axis,i=this.chart,s=this.options,{grid:r,position:o,border:a}=s,l=r.offset,c=this.isHorizontal(),d=this.ticks.length+(l?1:0),h=fc(r),f=[],p=a.setContext(this.getContext()),m=p.display?p.width:0,y=m/2,v=function(I){return $o(i,I,m)};let b,E,C,w,x,T,k,A,P,F,H,te;if(o==="top")b=v(this.bottom),T=this.bottom-h,A=b-y,F=v(e.top)+y,te=e.bottom;else if(o==="bottom")b=v(this.top),F=e.top,te=v(e.bottom)-y,T=b+y,A=this.top+h;else if(o==="left")b=v(this.right),x=this.right-h,k=b-y,P=v(e.left)+y,H=e.right;else if(o==="right")b=v(this.left),P=e.left,H=v(e.right)-y,x=b+y,k=this.left+h;else if(n==="x"){if(o==="center")b=v((e.top+e.bottom)/2+.5);else if(ut(o)){const I=Object.keys(o)[0],W=o[I];b=v(this.chart.scales[I].getPixelForValue(W))}F=e.top,te=e.bottom,T=b+y,A=T+h}else if(n==="y"){if(o==="center")b=v((e.left+e.right)/2);else if(ut(o)){const I=Object.keys(o)[0],W=o[I];b=v(this.chart.scales[I].getPixelForValue(W))}x=b-y,k=x-h,P=e.left,H=e.right}const N=tt(s.ticks.maxTicksLimit,d),L=Math.max(1,Math.ceil(d/N));for(E=0;E0&&(le-=M/2);break}ue={left:le,top:ie,width:M+Y.width,height:Z+Y.height,color:L.backdropColor}}y.push({label:C,font:A,textOffset:H,options:{rotation:m,color:W,strokeColor:X,strokeWidth:J,textAlign:ne,textBaseline:te,translation:[w,x],backdrop:ue}})}return y}_getXAxisLabelAlignment(){const{position:e,ticks:n}=this.options;if(-as(this.labelRotation))return e==="top"?"left":"right";let s="center";return n.align==="start"?s="left":n.align==="end"?s="right":n.align==="inner"&&(s="inner"),s}_getYAxisLabelAlignment(e){const{position:n,ticks:{crossAlign:i,mirror:s,padding:r}}=this.options,o=this._getLabelSizes(),a=e+r,l=o.widest.width;let c,u;return n==="left"?s?(u=this.right+r,i==="near"?c="left":i==="center"?(c="center",u+=l/2):(c="right",u+=l)):(u=this.right-a,i==="near"?c="right":i==="center"?(c="center",u-=l/2):(c="left",u=this.left)):n==="right"?s?(u=this.left+r,i==="near"?c="right":i==="center"?(c="center",u-=l/2):(c="left",u-=l)):(u=this.left+a,i==="near"?c="left":i==="center"?(c="center",u+=l/2):(c="right",u=this.right)):c="right",{textAlign:c,x:u}}_computeLabelArea(){if(this.options.ticks.mirror)return;const e=this.chart,n=this.options.position;if(n==="left"||n==="right")return{top:0,left:this.left,bottom:e.height,right:this.right};if(n==="top"||n==="bottom")return{top:this.top,left:0,bottom:this.bottom,right:e.width}}drawBackground(){const{ctx:e,options:{backgroundColor:n},left:i,top:s,width:r,height:o}=this;n&&(e.save(),e.fillStyle=n,e.fillRect(i,s,r,o),e.restore())}getLineWidthForValue(e){const n=this.options.grid;if(!this._isVisible()||!n.display)return 0;const s=this.ticks.findIndex(r=>r.value===e);return s>=0?n.setContext(this.getContext(s)).lineWidth:0}drawGrid(e){const n=this.options.grid,i=this.ctx,s=this._gridLineItems||(this._gridLineItems=this._computeGridLineItems(e));let r,o;const a=(l,c,u)=>{!u.width||!u.color||(i.save(),i.lineWidth=u.width,i.strokeStyle=u.color,i.setLineDash(u.borderDash||[]),i.lineDashOffset=u.borderDashOffset,i.beginPath(),i.moveTo(l.x,l.y),i.lineTo(c.x,c.y),i.stroke(),i.restore())};if(n.display)for(r=0,o=s.length;r{this.draw(r)}}]:[{z:i,draw:r=>{this.drawBackground(),this.drawGrid(r),this.drawTitle()}},{z:s,draw:()=>{this.drawBorder()}},{z:n,draw:r=>{this.drawLabels(r)}}]}getMatchingVisibleMetas(e){const n=this.chart.getSortedVisibleDatasetMetas(),i=this.axis+"AxisID",s=[];let r,o;for(r=0,o=n.length;r{const i=n.split("."),s=i.pop(),r=[t].concat(i).join("."),o=e[n].split("."),a=o.pop(),l=o.join(".");Zt.route(r,s,l,a)})}function RK(t){return"id"in t&&"defaults"in t}class DK{constructor(){this.controllers=new Pd(vo,"datasets",!0),this.elements=new Pd(vr,"elements"),this.plugins=new Pd(Object,"plugins"),this.scales=new Pd(ya,"scales"),this._typedRegistries=[this.controllers,this.scales,this.elements]}add(...e){this._each("register",e)}remove(...e){this._each("unregister",e)}addControllers(...e){this._each("register",e,this.controllers)}addElements(...e){this._each("register",e,this.elements)}addPlugins(...e){this._each("register",e,this.plugins)}addScales(...e){this._each("register",e,this.scales)}getController(e){return this._get(e,this.controllers,"controller")}getElement(e){return this._get(e,this.elements,"element")}getPlugin(e){return this._get(e,this.plugins,"plugin")}getScale(e){return this._get(e,this.scales,"scale")}removeControllers(...e){this._each("unregister",e,this.controllers)}removeElements(...e){this._each("unregister",e,this.elements)}removePlugins(...e){this._each("unregister",e,this.plugins)}removeScales(...e){this._each("unregister",e,this.scales)}_each(e,n,i){[...n].forEach(s=>{const r=i||this._getRegistryForType(s);i||r.isForType(s)||r===this.plugins&&s.id?this._exec(e,r,s):Ct(s,o=>{const a=i||this._getRegistryForType(o);this._exec(e,a,o)})})}_exec(e,n,i){const s=q_(e);Pt(i["before"+s],[],i),n[e](i),Pt(i["after"+s],[],i)}_getRegistryForType(e){for(let n=0;nr.filter(a=>!o.some(l=>a.plugin.id===l.plugin.id));this._notify(s(n,i),e,"stop"),this._notify(s(i,n),e,"start")}}function LK(t){const e={},n=[],i=Object.keys(vs.plugins.items);for(let r=0;r1&&b1(t[0].toLowerCase());if(i)return i}throw new Error(`Cannot determine type of '${t}' axis. Please provide 'axis' or 'position' option.`)}function w1(t,e,n){if(n[e+"AxisID"]===t)return{axis:e}}function WK(t,e){if(e.data&&e.data.datasets){const n=e.data.datasets.filter(i=>i.xAxisID===t||i.yAxisID===t);if(n.length)return w1(t,"x",n[0])||w1(t,"y",n[0])}return{}}function HK(t,e){const n=ca[t.type]||{scales:{}},i=e.scales||{},s=am(t.type,e),r=Object.create(null);return Object.keys(i).forEach(o=>{const a=i[o];if(!ut(a))return console.error(`Invalid scale configuration for scale: ${o}`);if(a._proxy)return console.warn(`Ignoring resolver passed as options for scale: ${o}`);const l=lm(o,a,WK(o,t),Zt.scales[a.type]),c=VK(l,s),u=n.scales||{};r[o]=Hc(Object.create(null),[{axis:l},a,u[l],u[c]])}),t.data.datasets.forEach(o=>{const a=o.type||t.type,l=o.indexAxis||am(a,e),u=(ca[a]||{}).scales||{};Object.keys(u).forEach(d=>{const h=BK(d,l),f=o[h+"AxisID"]||h;r[f]=r[f]||Object.create(null),Hc(r[f],[{axis:h},i[f],u[d]])})}),Object.keys(r).forEach(o=>{const a=r[o];Hc(a,[Zt.scales[a.type],Zt.scale])}),r}function QC(t){const e=t.options||(t.options={});e.plugins=tt(e.plugins,{}),e.scales=HK(t,e)}function eT(t){return t=t||{},t.datasets=t.datasets||[],t.labels=t.labels||[],t}function YK(t){return t=t||{},t.data=eT(t.data),QC(t),t}const x1=new Map,tT=new Set;function Rd(t,e){let n=x1.get(t);return n||(n=e(),x1.set(t,n),tT.add(n)),n}const gc=(t,e,n)=>{const i=ao(e,n);i!==void 0&&t.add(i)};let jK=class{constructor(e){this._config=YK(e),this._scopeCache=new Map,this._resolverCache=new Map}get platform(){return this._config.platform}get type(){return this._config.type}set type(e){this._config.type=e}get data(){return this._config.data}set data(e){this._config.data=eT(e)}get options(){return this._config.options}set options(e){this._config.options=e}get plugins(){return this._config.plugins}update(){const e=this._config;this.clearCache(),QC(e)}clearCache(){this._scopeCache.clear(),this._resolverCache.clear()}datasetScopeKeys(e){return Rd(e,()=>[[`datasets.${e}`,""]])}datasetAnimationScopeKeys(e,n){return Rd(`${e}.transition.${n}`,()=>[[`datasets.${e}.transitions.${n}`,`transitions.${n}`],[`datasets.${e}`,""]])}datasetElementScopeKeys(e,n){return Rd(`${e}-${n}`,()=>[[`datasets.${e}.elements.${n}`,`datasets.${e}`,`elements.${n}`,""]])}pluginScopeKeys(e){const n=e.id,i=this.type;return Rd(`${i}-plugin-${n}`,()=>[[`plugins.${n}`,...e.additionalOptionScopes||[]]])}_cachedScopes(e,n){const i=this._scopeCache;let s=i.get(e);return(!s||n)&&(s=new Map,i.set(e,s)),s}getOptionScopes(e,n,i){const{options:s,type:r}=this,o=this._cachedScopes(e,i),a=o.get(n);if(a)return a;const l=new Set;n.forEach(u=>{e&&(l.add(e),u.forEach(d=>gc(l,e,d))),u.forEach(d=>gc(l,s,d)),u.forEach(d=>gc(l,ca[r]||{},d)),u.forEach(d=>gc(l,Zt,d)),u.forEach(d=>gc(l,rm,d))});const c=Array.from(l);return c.length===0&&c.push(Object.create(null)),tT.has(n)&&o.set(n,c),c}chartOptionScopes(){const{options:e,type:n}=this;return[e,ca[n]||{},Zt.datasets[n]||{},{type:n},Zt,rm]}resolveNamedOptions(e,n,i,s=[""]){const r={$shared:!0},{resolver:o,subPrefixes:a}=E1(this._resolverCache,e,s);let l=o;if(UK(o,n)){r.$shared=!1,i=lo(i)?i():i;const c=this.createResolver(e,i,a);l=Ml(o,i,c)}for(const c of n)r[c]=l[c];return r}createResolver(e,n,i=[""],s){const{resolver:r}=E1(this._resolverCache,e,i);return ut(n)?Ml(r,n,void 0,s):r}};function E1(t,e,n){let i=t.get(e);i||(i=new Map,t.set(e,i));const s=n.join();let r=i.get(s);return r||(r={resolver:ny(e,n),subPrefixes:n.filter(a=>!a.toLowerCase().includes("hover"))},i.set(s,r)),r}const KK=t=>ut(t)&&Object.getOwnPropertyNames(t).some(e=>lo(t[e]));function UK(t,e){const{isScriptable:n,isIndexable:i}=PC(t);for(const s of e){const r=n(s),o=i(s),a=(o||r)&&t[s];if(r&&(lo(a)||KK(a))||o&&Nt(a))return!0}return!1}var GK="4.4.1";const XK=["top","bottom","left","right","chartArea"];function S1(t,e){return t==="top"||t==="bottom"||XK.indexOf(t)===-1&&e==="x"}function C1(t,e){return function(n,i){return n[t]===i[t]?n[e]-i[e]:n[t]-i[t]}}function T1(t){const e=t.chart,n=e.options.animation;e.notifyPlugins("afterRender"),Pt(n&&n.onComplete,[t],e)}function qK(t){const e=t.chart,n=e.options.animation;Pt(n&&n.onProgress,[t],e)}function nT(t){return ry()&&typeof t=="string"?t=document.getElementById(t):t&&t.length&&(t=t[0]),t&&t.canvas&&(t=t.canvas),t}const oh={},k1=t=>{const e=nT(t);return Object.values(oh).filter(n=>n.canvas===e).pop()};function ZK(t,e,n){const i=Object.keys(t);for(const s of i){const r=+s;if(r>=e){const o=t[s];delete t[s],(n>0||r>e)&&(t[r+n]=o)}}}function JK(t,e,n,i){return!n||t.type==="mouseout"?null:i?e:t}function Dd(t,e,n){return t.options.clip?t[n]:e[n]}function QK(t,e){const{xScale:n,yScale:i}=t;return n&&i?{left:Dd(n,e,"left"),right:Dd(n,e,"right"),top:Dd(i,e,"top"),bottom:Dd(i,e,"bottom")}:e}let Tf=class{static defaults=Zt;static instances=oh;static overrides=ca;static registry=vs;static version=GK;static getChart=k1;static register(...e){vs.add(...e),A1()}static unregister(...e){vs.remove(...e),A1()}constructor(e,n){const i=this.config=new jK(n),s=nT(e),r=k1(s);if(r)throw new Error("Canvas is already in use. Chart with ID '"+r.id+"' must be destroyed before the canvas with ID '"+r.canvas.id+"' can be reused.");const o=i.createResolver(i.chartOptionScopes(),this.getContext());this.platform=new(i.platform||mK(s)),this.platform.updateConfig(i);const a=this.platform.acquireContext(s,o.aspectRatio),l=a&&a.canvas,c=l&&l.height,u=l&&l.width;if(this.id=ZH(),this.ctx=a,this.canvas=l,this.width=u,this.height=c,this._options=o,this._aspectRatio=this.aspectRatio,this._layers=[],this._metasets=[],this._stacks=void 0,this.boxes=[],this.currentDevicePixelRatio=void 0,this.chartArea=void 0,this._active=[],this._lastEvent=void 0,this._listeners={},this._responsiveListeners=void 0,this._sortedMetasets=[],this.scales={},this._plugins=new $K,this.$proxies={},this._hiddenIndices={},this.attached=!1,this._animationsDisabled=void 0,this.$context=void 0,this._doResize=fY(d=>this.update(d),o.resizeDelay||0),this._dataChanges=[],oh[this.id]=this,!a||!l){console.error("Failed to create chart: can't acquire context from the given item");return}Xs.listen(this,"complete",T1),Xs.listen(this,"progress",qK),this._initialize(),this.attached&&this.update()}get aspectRatio(){const{options:{aspectRatio:e,maintainAspectRatio:n},width:i,height:s,_aspectRatio:r}=this;return gt(e)?n&&r?r:s?i/s:null:e}get data(){return this.config.data}set data(e){this.config.data=e}get options(){return this._options}set options(e){this.config.options=e}get registry(){return vs}_initialize(){return this.notifyPlugins("beforeInit"),this.options.responsive?this.resize():Xb(this,this.options.devicePixelRatio),this.bindEvents(),this.notifyPlugins("afterInit"),this}clear(){return Kb(this.canvas,this.ctx),this}stop(){return Xs.stop(this),this}resize(e,n){Xs.running(this)?this._resizeBeforeDraw={width:e,height:n}:this._resize(e,n)}_resize(e,n){const i=this.options,s=this.canvas,r=i.maintainAspectRatio&&this.aspectRatio,o=this.platform.getMaximumSize(s,e,n,r),a=i.devicePixelRatio||this.platform.getDevicePixelRatio(),l=this.width?"resize":"attach";this.width=o.width,this.height=o.height,this._aspectRatio=this.aspectRatio,Xb(this,a,!0)&&(this.notifyPlugins("resize",{size:o}),Pt(i.onResize,[this,o],this),this.attached&&this._doResize(l)&&this.render())}ensureScalesHaveIDs(){const n=this.options.scales||{};Ct(n,(i,s)=>{i.id=s})}buildOrUpdateScales(){const e=this.options,n=e.scales,i=this.scales,s=Object.keys(i).reduce((o,a)=>(o[a]=!1,o),{});let r=[];n&&(r=r.concat(Object.keys(n).map(o=>{const a=n[o],l=lm(o,a),c=l==="r",u=l==="x";return{options:a,dposition:c?"chartArea":u?"bottom":"left",dtype:c?"radialLinear":u?"category":"linear"}}))),Ct(r,o=>{const a=o.options,l=a.id,c=lm(l,a),u=tt(a.type,o.dtype);(a.position===void 0||S1(a.position,c)!==S1(o.dposition))&&(a.position=o.dposition),s[l]=!0;let d=null;if(l in i&&i[l].type===u)d=i[l];else{const h=vs.getScale(u);d=new h({id:l,type:u,ctx:this.ctx,chart:this}),i[d.id]=d}d.init(a,e)}),Ct(s,(o,a)=>{o||delete i[a]}),Ct(i,o=>{Wi.configure(this,o,o.options),Wi.addBox(this,o)})}_updateMetasets(){const e=this._metasets,n=this.data.datasets.length,i=e.length;if(e.sort((s,r)=>s.index-r.index),i>n){for(let s=n;sn.length&&delete this._stacks,e.forEach((i,s)=>{n.filter(r=>r===i._dataset).length===0&&this._destroyDatasetMeta(s)})}buildOrUpdateControllers(){const e=[],n=this.data.datasets;let i,s;for(this._removeUnreferencedMetasets(),i=0,s=n.length;i{this.getDatasetMeta(n).controller.reset()},this)}reset(){this._resetElements(),this.notifyPlugins("reset")}update(e){const n=this.config;n.update();const i=this._options=n.createResolver(n.chartOptionScopes(),this.getContext()),s=this._animationsDisabled=!i.animation;if(this._updateScales(),this._checkEventBindings(),this._updateHiddenIndices(),this._plugins.invalidate(),this.notifyPlugins("beforeUpdate",{mode:e,cancelable:!0})===!1)return;const r=this.buildOrUpdateControllers();this.notifyPlugins("beforeElementsUpdate");let o=0;for(let c=0,u=this.data.datasets.length;c{c.reset()}),this._updateDatasets(e),this.notifyPlugins("afterUpdate",{mode:e}),this._layers.sort(C1("z","_idx"));const{_active:a,_lastEvent:l}=this;l?this._eventHandler(l,!0):a.length&&this._updateHoverStyles(a,a,!0),this.render()}_updateScales(){Ct(this.scales,e=>{Wi.removeBox(this,e)}),this.ensureScalesHaveIDs(),this.buildOrUpdateScales()}_checkEventBindings(){const e=this.options,n=new Set(Object.keys(this._listeners)),i=new Set(e.events);(!Nb(n,i)||!!this._responsiveListeners!==e.responsive)&&(this.unbindEvents(),this.bindEvents())}_updateHiddenIndices(){const{_hiddenIndices:e}=this,n=this._getUniformDataChanges()||[];for(const{method:i,start:s,count:r}of n){const o=i==="_removeElements"?-r:r;ZK(e,s,o)}}_getUniformDataChanges(){const e=this._dataChanges;if(!e||!e.length)return;this._dataChanges=[];const n=this.data.datasets.length,i=r=>new Set(e.filter(o=>o[0]===r).map((o,a)=>a+","+o.splice(1).join(","))),s=i(0);for(let r=1;rr.split(",")).map(r=>({method:r[1],start:+r[2],count:+r[3]}))}_updateLayout(e){if(this.notifyPlugins("beforeLayout",{cancelable:!0})===!1)return;Wi.update(this,this.width,this.height,e);const n=this.chartArea,i=n.width<=0||n.height<=0;this._layers=[],Ct(this.boxes,s=>{i&&s.position==="chartArea"||(s.configure&&s.configure(),this._layers.push(...s._layers()))},this),this._layers.forEach((s,r)=>{s._idx=r}),this.notifyPlugins("afterLayout")}_updateDatasets(e){if(this.notifyPlugins("beforeDatasetsUpdate",{mode:e,cancelable:!0})!==!1){for(let n=0,i=this.data.datasets.length;n=0;--n)this._drawDataset(e[n]);this.notifyPlugins("afterDatasetsDraw")}_drawDataset(e){const n=this.ctx,i=e._clip,s=!i.disabled,r=QK(e,this.chartArea),o={meta:e,index:e.index,cancelable:!0};this.notifyPlugins("beforeDatasetDraw",o)!==!1&&(s&&Ef(n,{left:i.left===!1?0:r.left-i.left,right:i.right===!1?this.width:r.right+i.right,top:i.top===!1?0:r.top-i.top,bottom:i.bottom===!1?this.height:r.bottom+i.bottom}),e.controller.draw(),s&&Sf(n),o.cancelable=!1,this.notifyPlugins("afterDatasetDraw",o))}isPointInArea(e){return ar(e,this.chartArea,this._minPadding)}getElementsAtEventForMode(e,n,i,s){const r=Xj.modes[n];return typeof r=="function"?r(this,e,i,s):[]}getDatasetMeta(e){const n=this.data.datasets[e],i=this._metasets;let s=i.filter(r=>r&&r._dataset===n).pop();return s||(s={type:null,data:[],dataset:null,controller:null,hidden:null,xAxisID:null,yAxisID:null,order:n&&n.order||0,index:e,_dataset:n,_parsed:[],_sorted:!1},i.push(s)),s}getContext(){return this.$context||(this.$context=yo(null,{chart:this,type:"chart"}))}getVisibleDatasetCount(){return this.getSortedVisibleDatasetMetas().length}isDatasetVisible(e){const n=this.data.datasets[e];if(!n)return!1;const i=this.getDatasetMeta(e);return typeof i.hidden=="boolean"?!i.hidden:!n.hidden}setDatasetVisibility(e,n){const i=this.getDatasetMeta(e);i.hidden=!n}toggleDataVisibility(e){this._hiddenIndices[e]=!this._hiddenIndices[e]}getDataVisibility(e){return!this._hiddenIndices[e]}_updateVisibility(e,n,i){const s=i?"show":"hide",r=this.getDatasetMeta(e),o=r.controller._resolveAnimations(void 0,s);uu(n)?(r.data[n].hidden=!i,this.update()):(this.setDatasetVisibility(e,i),o.update(r,{visible:i}),this.update(a=>a.datasetIndex===e?s:void 0))}hide(e,n){this._updateVisibility(e,n,!1)}show(e,n){this._updateVisibility(e,n,!0)}_destroyDatasetMeta(e){const n=this._metasets[e];n&&n.controller&&n.controller._destroy(),delete this._metasets[e]}_stop(){let e,n;for(this.stop(),Xs.remove(this),e=0,n=this.data.datasets.length;e{n.addEventListener(this,r,o),e[r]=o},s=(r,o,a)=>{r.offsetX=o,r.offsetY=a,this._eventHandler(r)};Ct(this.options.events,r=>i(r,s))}bindResponsiveEvents(){this._responsiveListeners||(this._responsiveListeners={});const e=this._responsiveListeners,n=this.platform,i=(l,c)=>{n.addEventListener(this,l,c),e[l]=c},s=(l,c)=>{e[l]&&(n.removeEventListener(this,l,c),delete e[l])},r=(l,c)=>{this.canvas&&this.resize(l,c)};let o;const a=()=>{s("attach",a),this.attached=!0,this.resize(),i("resize",r),i("detach",o)};o=()=>{this.attached=!1,s("resize",r),this._stop(),this._resize(0,0),i("attach",a)},n.isAttached(this.canvas)?a():o()}unbindEvents(){Ct(this._listeners,(e,n)=>{this.platform.removeEventListener(this,n,e)}),this._listeners={},Ct(this._responsiveListeners,(e,n)=>{this.platform.removeEventListener(this,n,e)}),this._responsiveListeners=void 0}updateHoverStyle(e,n,i){const s=i?"set":"remove";let r,o,a,l;for(n==="dataset"&&(r=this.getDatasetMeta(e[0].datasetIndex),r.controller["_"+s+"DatasetHoverStyle"]()),a=0,l=e.length;a{const a=this.getDatasetMeta(r);if(!a)throw new Error("No dataset found at index "+r);return{datasetIndex:r,element:a.data[o],index:o}});!wh(i,n)&&(this._active=i,this._lastEvent=null,this._updateHoverStyles(i,n))}notifyPlugins(e,n,i){return this._plugins.notify(this,e,n,i)}isPluginEnabled(e){return this._plugins._cache.filter(n=>n.plugin.id===e).length===1}_updateHoverStyles(e,n,i){const s=this.options.hover,r=(l,c)=>l.filter(u=>!c.some(d=>u.datasetIndex===d.datasetIndex&&u.index===d.index)),o=r(n,e),a=i?e:r(e,n);o.length&&this.updateHoverStyle(o,s.mode,!1),a.length&&s.mode&&this.updateHoverStyle(a,s.mode,!0)}_eventHandler(e,n){const i={event:e,replay:n,cancelable:!0,inChartArea:this.isPointInArea(e)},s=o=>(o.options.events||this.options.events).includes(e.native.type);if(this.notifyPlugins("beforeEvent",i,s)===!1)return;const r=this._handleEvent(e,n,i.inChartArea);return i.cancelable=!1,this.notifyPlugins("afterEvent",i,s),(r||i.changed)&&this.render(),this}_handleEvent(e,n,i){const{_active:s=[],options:r}=this,o=n,a=this._getActiveElements(e,s,i,o),l=iY(e),c=JK(e,this._lastEvent,i,l);i&&(this._lastEvent=null,Pt(r.onHover,[e,a,this],this),l&&Pt(r.onClick,[e,a,this],this));const u=!wh(a,s);return(u||n)&&(this._active=a,this._updateHoverStyles(a,s,n)),this._lastEvent=c,u}_getActiveElements(e,n,i,s){if(e.type==="mouseout")return[];if(!i)return n;const r=this.options.hover;return this.getElementsAtEventForMode(e,r.mode,r,s)}};function A1(){return Ct(Tf.instances,t=>t._plugins.invalidate())}function eU(t,e,n){const{startAngle:i,pixelMargin:s,x:r,y:o,outerRadius:a,innerRadius:l}=e;let c=s/a;t.beginPath(),t.arc(r,o,a,i-c,n+c),l>s?(c=s/l,t.arc(r,o,l,n+c,i-c,!0)):t.arc(r,o,s,n+on,i-on),t.closePath(),t.clip()}function tU(t){return ty(t,["outerStart","outerEnd","innerStart","innerEnd"])}function nU(t,e,n,i){const s=tU(t.options.borderRadius),r=(n-e)/2,o=Math.min(r,i*e/2),a=l=>{const c=(n-Math.min(r,l))*i/2;return Pn(l,0,Math.min(r,c))};return{outerStart:a(s.outerStart),outerEnd:a(s.outerEnd),innerStart:Pn(s.innerStart,0,o),innerEnd:Pn(s.innerEnd,0,o)}}function $a(t,e,n,i){return{x:n+t*Math.cos(e),y:i+t*Math.sin(e)}}function kh(t,e,n,i,s,r){const{x:o,y:a,startAngle:l,pixelMargin:c,innerRadius:u}=e,d=Math.max(e.outerRadius+i+n-c,0),h=u>0?u+i+n+c:0;let f=0;const p=s-l;if(i){const L=u>0?u-i:0,I=d>0?d-i:0,W=(L+I)/2,X=W!==0?p*W/(W+i):p;f=(p-X)/2}const m=Math.max(.001,p*d-n/Bt)/d,y=(p-m)/2,v=l+y+f,b=s-y-f,{outerStart:E,outerEnd:C,innerStart:w,innerEnd:x}=nU(e,h,d,b-v),T=d-E,k=d-C,A=v+E/T,P=b-C/k,F=h+w,H=h+x,te=v+w/F,N=b-x/H;if(t.beginPath(),r){const L=(A+P)/2;if(t.arc(o,a,d,A,L),t.arc(o,a,d,L,P),C>0){const J=$a(k,P,o,a);t.arc(J.x,J.y,C,P,b+on)}const I=$a(H,b,o,a);if(t.lineTo(I.x,I.y),x>0){const J=$a(H,N,o,a);t.arc(J.x,J.y,x,b+on,N+Math.PI)}const W=(b-x/h+(v+w/h))/2;if(t.arc(o,a,h,b-x/h,W,!0),t.arc(o,a,h,W,v+w/h,!0),w>0){const J=$a(F,te,o,a);t.arc(J.x,J.y,w,te+Math.PI,v-on)}const X=$a(T,v,o,a);if(t.lineTo(X.x,X.y),E>0){const J=$a(T,A,o,a);t.arc(J.x,J.y,E,v-on,A)}}else{t.moveTo(o,a);const L=Math.cos(A)*d+o,I=Math.sin(A)*d+a;t.lineTo(L,I);const W=Math.cos(P)*d+o,X=Math.sin(P)*d+a;t.lineTo(W,X)}t.closePath()}function iU(t,e,n,i,s){const{fullCircles:r,startAngle:o,circumference:a}=e;let l=e.endAngle;if(r){kh(t,e,n,i,l,s);for(let c=0;ce!=="borderDash"};circumference;endAngle;fullCircles;innerRadius;outerRadius;pixelMargin;startAngle;constructor(e){super(),this.options=void 0,this.circumference=void 0,this.startAngle=void 0,this.endAngle=void 0,this.innerRadius=void 0,this.outerRadius=void 0,this.pixelMargin=0,this.fullCircles=0,e&&Object.assign(this,e)}inRange(e,n,i){const s=this.getProps(["x","y"],i),{angle:r,distance:o}=wC(s,{x:e,y:n}),{startAngle:a,endAngle:l,innerRadius:c,outerRadius:u,circumference:d}=this.getProps(["startAngle","endAngle","innerRadius","outerRadius","circumference"],i),h=(this.options.spacing+this.options.borderWidth)/2,p=tt(d,l-a)>=Ft||du(r,a,l),m=rr(o,c+h,u+h);return p&&m}getCenterPoint(e){const{x:n,y:i,startAngle:s,endAngle:r,innerRadius:o,outerRadius:a}=this.getProps(["x","y","startAngle","endAngle","innerRadius","outerRadius"],e),{offset:l,spacing:c}=this.options,u=(s+r)/2,d=(o+a+c+l)/2;return{x:n+Math.cos(u)*d,y:i+Math.sin(u)*d}}tooltipPosition(e){return this.getCenterPoint(e)}draw(e){const{options:n,circumference:i}=this,s=(n.offset||0)/4,r=(n.spacing||0)/2,o=n.circular;if(this.pixelMargin=n.borderAlign==="inner"?.33:0,this.fullCircles=i>Ft?Math.floor(i/Ft):0,i===0||this.innerRadius<0||this.outerRadius<0)return;e.save();const a=(this.startAngle+this.endAngle)/2;e.translate(Math.cos(a)*s,Math.sin(a)*s);const l=1-Math.sin(Math.min(Bt,i||0)),c=s*l;e.fillStyle=n.backgroundColor,e.strokeStyle=n.borderColor,iU(e,this,c,r,o),sU(e,this,c,r,o),e.restore()}}function iT(t,e,n=e){t.lineCap=tt(n.borderCapStyle,e.borderCapStyle),t.setLineDash(tt(n.borderDash,e.borderDash)),t.lineDashOffset=tt(n.borderDashOffset,e.borderDashOffset),t.lineJoin=tt(n.borderJoinStyle,e.borderJoinStyle),t.lineWidth=tt(n.borderWidth,e.borderWidth),t.strokeStyle=tt(n.borderColor,e.borderColor)}function oU(t,e,n){t.lineTo(n.x,n.y)}function aU(t){return t.stepped?CY:t.tension||t.cubicInterpolationMode==="monotone"?TY:oU}function sT(t,e,n={}){const i=t.length,{start:s=0,end:r=i-1}=n,{start:o,end:a}=e,l=Math.max(s,o),c=Math.min(r,a),u=sa&&r>a;return{count:i,start:l,loop:e.loop,ilen:c(o+(c?a-C:C))%r,E=()=>{m!==y&&(t.lineTo(u,y),t.lineTo(u,m),t.lineTo(u,v))};for(l&&(f=s[b(0)],t.moveTo(f.x,f.y)),h=0;h<=a;++h){if(f=s[b(h)],f.skip)continue;const C=f.x,w=f.y,x=C|0;x===p?(wy&&(y=w),u=(d*u+C)/++d):(E(),t.lineTo(C,w),p=x,d=0,m=y=w),v=w}E()}function cm(t){const e=t.options,n=e.borderDash&&e.borderDash.length;return!t._decimated&&!t._loop&&!e.tension&&e.cubicInterpolationMode!=="monotone"&&!e.stepped&&!n?cU:lU}function uU(t){return t.stepped?sj:t.tension||t.cubicInterpolationMode==="monotone"?rj:Wo}function dU(t,e,n,i){let s=e._path;s||(s=e._path=new Path2D,e.path(s,n,i)&&s.closePath()),iT(t,e.options),t.stroke(s)}function hU(t,e,n,i){const{segments:s,options:r}=e,o=cm(e);for(const a of s)iT(t,r,a.style),t.beginPath(),o(t,e,a,{start:n,end:n+i-1})&&t.closePath(),t.stroke()}const fU=typeof Path2D=="function";function gU(t,e,n,i){fU&&!e.options.segment?dU(t,e,n,i):hU(t,e,n,i)}class kf extends vr{static id="line";static defaults={borderCapStyle:"butt",borderDash:[],borderDashOffset:0,borderJoinStyle:"miter",borderWidth:3,capBezierPoints:!0,cubicInterpolationMode:"default",fill:!1,spanGaps:!1,stepped:!1,tension:0};static defaultRoutes={backgroundColor:"backgroundColor",borderColor:"borderColor"};static descriptors={_scriptable:!0,_indexable:e=>e!=="borderDash"&&e!=="fill"};constructor(e){super(),this.animated=!0,this.options=void 0,this._chart=void 0,this._loop=void 0,this._fullLoop=void 0,this._path=void 0,this._points=void 0,this._segments=void 0,this._decimated=!1,this._pointsUpdated=!1,this._datasetIndex=void 0,e&&Object.assign(this,e)}updateControlPoints(e,n){const i=this.options;if((i.tension||i.cubicInterpolationMode==="monotone")&&!i.stepped&&!this._pointsUpdated){const s=i.spanGaps?this._loop:this._fullLoop;qY(this._points,i,e,s,n),this._pointsUpdated=!0}}set points(e){this._points=e,delete this._segments,delete this._path,this._pointsUpdated=!1}get points(){return this._points}get segments(){return this._segments||(this._segments=dj(this,this.options.segment))}first(){const e=this.segments,n=this.points;return e.length&&n[e[0].start]}last(){const e=this.segments,n=this.points,i=e.length;return i&&n[e[i-1].end]}interpolate(e,n){const i=this.options,s=e[n],r=this.points,o=zC(this,{property:n,start:s,end:s});if(!o.length)return;const a=[],l=uU(i);let c,u;for(c=0,u=o.length;c=n)return t.slice(e,e+n);const o=[],a=(n-2)/(r-2);let l=0;const c=e+n-1;let u=e,d,h,f,p,m;for(o[l++]=t[u],d=0;df&&(f=p,h=t[b],m=b);o[l++]=h,u=m}return o[l++]=t[c],o}function EU(t,e,n,i){let s=0,r=0,o,a,l,c,u,d,h,f,p,m;const y=[],v=e+n-1,b=t[e].x,C=t[v].x-b;for(o=e;om&&(m=c,h=o),s=(r*s+a.x)/++r;else{const x=o-1;if(!gt(d)&&!gt(h)){const T=Math.min(d,h),k=Math.max(d,h);T!==f&&T!==x&&y.push({...t[T],x:s}),k!==f&&k!==x&&y.push({...t[k],x:s})}o>0&&x!==f&&y.push(t[x]),y.push(a),u=w,r=0,p=m=c,d=h=f=o}}return y}function oT(t){if(t._decimated){const e=t._data;delete t._decimated,delete t._data,Object.defineProperty(t,"data",{configurable:!0,enumerable:!0,writable:!0,value:e})}}function I1(t){t.data.datasets.forEach(e=>{oT(e)})}function SU(t,e){const n=e.length;let i=0,s;const{iScale:r}=t,{min:o,max:a,minDefined:l,maxDefined:c}=r.getUserBounds();return l&&(i=Pn(or(e,r.axis,o).lo,0,n-1)),c?s=Pn(or(e,r.axis,a).hi+1,i,n)-i:s=n-i,{start:i,count:s}}var CU={id:"decimation",defaults:{algorithm:"min-max",enabled:!1},beforeElementsUpdate:(t,e,n)=>{if(!n.enabled){I1(t);return}const i=t.width;t.data.datasets.forEach((s,r)=>{const{_data:o,indexAxis:a}=s,l=t.getDatasetMeta(r),c=o||s.data;if(xc([a,t.options.indexAxis])==="y"||!l.controller.supportsDecimation)return;const u=t.scales[l.xAxisID];if(u.type!=="linear"&&u.type!=="time"||t.options.parsing)return;let{start:d,count:h}=SU(l,c);const f=n.threshold||4*i;if(h<=f){oT(s);return}gt(o)&&(s._data=c,delete s.data,Object.defineProperty(s,"data",{configurable:!0,enumerable:!0,get:function(){return this._decimated},set:function(m){this._data=m}}));let p;switch(n.algorithm){case"lttb":p=xU(c,d,h,i,n);break;case"min-max":p=EU(c,d,h,i);break;default:throw new Error(`Unsupported decimation algorithm '${n.algorithm}'`)}s._decimated=p})},destroy(t){I1(t)}};function TU(t,e,n){const i=t.segments,s=t.points,r=e.points,o=[];for(const a of i){let{start:l,end:c}=a;c=ly(l,c,s);const u=um(n,s[l],s[c],a.loop);if(!e.segments){o.push({source:a,target:u,start:s[l],end:s[c]});continue}const d=zC(e,u);for(const h of d){const f=um(n,r[h.start],r[h.end],h.loop),p=VC(a,s,f);for(const m of p)o.push({source:m,target:h,start:{[n]:P1(u,f,"start",Math.max)},end:{[n]:P1(u,f,"end",Math.min)}})}}return o}function um(t,e,n,i){if(i)return;let s=e[t],r=n[t];return t==="angle"&&(s=Si(s),r=Si(r)),{property:t,start:s,end:r}}function kU(t,e){const{x:n=null,y:i=null}=t||{},s=e.points,r=[];return e.segments.forEach(({start:o,end:a})=>{a=ly(o,a,s);const l=s[o],c=s[a];i!==null?(r.push({x:l.x,y:i}),r.push({x:c.x,y:i})):n!==null&&(r.push({x:n,y:l.y}),r.push({x:n,y:c.y}))}),r}function ly(t,e,n){for(;e>t;e--){const i=n[e];if(!isNaN(i.x)&&!isNaN(i.y))break}return e}function P1(t,e,n,i){return t&&e?i(t[n],e[n]):t?t[n]:e?e[n]:0}function aT(t,e){let n=[],i=!1;return Nt(t)?(i=!0,n=t):n=kU(t,e),n.length?new kf({points:n,options:{tension:0},_loop:i,_fullLoop:i}):null}function R1(t){return t&&t.fill!==!1}function AU(t,e,n){let s=t[e].fill;const r=[e];let o;if(!n)return s;for(;s!==!1&&r.indexOf(s)===-1;){if(!qt(s))return s;if(o=t[s],!o)return!1;if(o.visible)return s;r.push(s),s=o.fill}return!1}function MU(t,e,n){const i=DU(t);if(ut(i))return isNaN(i.value)?!1:i;let s=parseFloat(i);return qt(s)&&Math.floor(s)===s?IU(i[0],e,s,n):["origin","start","end","stack","shape"].indexOf(i)>=0&&i}function IU(t,e,n,i){return(t==="-"||t==="+")&&(n=e+n),n===e||n<0||n>=i?!1:n}function PU(t,e){let n=null;return t==="start"?n=e.bottom:t==="end"?n=e.top:ut(t)?n=e.getPixelForValue(t.value):e.getBasePixel&&(n=e.getBasePixel()),n}function RU(t,e,n){let i;return t==="start"?i=n:t==="end"?i=e.options.reverse?e.min:e.max:ut(t)?i=t.value:i=e.getBaseValue(),i}function DU(t){const e=t.options,n=e.fill;let i=tt(n&&n.target,n);return i===void 0&&(i=!!e.backgroundColor),i===!1||i===null?!1:i===!0?"origin":i}function $U(t){const{scale:e,index:n,line:i}=t,s=[],r=i.segments,o=i.points,a=LU(e,n);a.push(aT({x:null,y:e.bottom},i));for(let l=0;l=0;--o){const a=s[o].$filler;a&&(a.line.updateControlPoints(r,a.axis),i&&a.fill&&tp(t.ctx,a,r))}},beforeDatasetsDraw(t,e,n){if(n.drawTime!=="beforeDatasetsDraw")return;const i=t.getSortedVisibleDatasetMetas();for(let s=i.length-1;s>=0;--s){const r=i[s].$filler;R1(r)&&tp(t.ctx,r,t.chartArea)}},beforeDatasetDraw(t,e,n){const i=e.meta.$filler;!R1(i)||n.drawTime!=="beforeDatasetDraw"||tp(t.ctx,i,t.chartArea)},defaults:{propagate:!0,drawTime:"beforeDatasetDraw"}};const O1=(t,e)=>{let{boxHeight:n=e,boxWidth:i=e}=t;return t.usePointStyle&&(n=Math.min(n,e),i=t.pointStyleWidth||Math.min(i,e)),{boxWidth:i,boxHeight:n,itemHeight:Math.max(e,n)}},KU=(t,e)=>t!==null&&e!==null&&t.datasetIndex===e.datasetIndex&&t.index===e.index;class N1 extends vr{constructor(e){super(),this._added=!1,this.legendHitBoxes=[],this._hoveredItem=null,this.doughnutMode=!1,this.chart=e.chart,this.options=e.options,this.ctx=e.ctx,this.legendItems=void 0,this.columnSizes=void 0,this.lineWidths=void 0,this.maxHeight=void 0,this.maxWidth=void 0,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.height=void 0,this.width=void 0,this._margins=void 0,this.position=void 0,this.weight=void 0,this.fullSize=void 0}update(e,n,i){this.maxWidth=e,this.maxHeight=n,this._margins=i,this.setDimensions(),this.buildLabels(),this.fit()}setDimensions(){this.isHorizontal()?(this.width=this.maxWidth,this.left=this._margins.left,this.right=this.width):(this.height=this.maxHeight,this.top=this._margins.top,this.bottom=this.height)}buildLabels(){const e=this.options.labels||{};let n=Pt(e.generateLabels,[this.chart],this)||[];e.filter&&(n=n.filter(i=>e.filter(i,this.chart.data))),e.sort&&(n=n.sort((i,s)=>e.sort(i,s,this.chart.data))),this.options.reverse&&n.reverse(),this.legendItems=n}fit(){const{options:e,ctx:n}=this;if(!e.display){this.width=this.height=0;return}const i=e.labels,s=vn(i.font),r=s.size,o=this._computeTitleHeight(),{boxWidth:a,itemHeight:l}=O1(i,r);let c,u;n.font=s.string,this.isHorizontal()?(c=this.maxWidth,u=this._fitRows(o,r,a,l)+10):(u=this.maxHeight,c=this._fitCols(o,s,a,l)+10),this.width=Math.min(c,e.maxWidth||this.maxWidth),this.height=Math.min(u,e.maxHeight||this.maxHeight)}_fitRows(e,n,i,s){const{ctx:r,maxWidth:o,options:{labels:{padding:a}}}=this,l=this.legendHitBoxes=[],c=this.lineWidths=[0],u=s+a;let d=e;r.textAlign="left",r.textBaseline="middle";let h=-1,f=-u;return this.legendItems.forEach((p,m)=>{const y=i+n/2+r.measureText(p.text).width;(m===0||c[c.length-1]+y+2*a>o)&&(d+=u,c[c.length-(m>0?0:1)]=0,f+=u,h++),l[m]={left:0,top:f,row:h,width:y,height:s},c[c.length-1]+=y+a}),d}_fitCols(e,n,i,s){const{ctx:r,maxHeight:o,options:{labels:{padding:a}}}=this,l=this.legendHitBoxes=[],c=this.columnSizes=[],u=o-e;let d=a,h=0,f=0,p=0,m=0;return this.legendItems.forEach((y,v)=>{const{itemWidth:b,itemHeight:E}=UU(i,n,r,y,s);v>0&&f+E+2*a>u&&(d+=h+a,c.push({width:h,height:f}),p+=h+a,m++,h=f=0),l[v]={left:p,top:f,col:m,width:b,height:E},h=Math.max(h,b),f+=E+a}),d+=h,c.push({width:h,height:f}),d}adjustHitBoxes(){if(!this.options.display)return;const e=this._computeTitleHeight(),{legendHitBoxes:n,options:{align:i,labels:{padding:s},rtl:r}}=this,o=ol(r,this.left,this.width);if(this.isHorizontal()){let a=0,l=Bn(i,this.left+s,this.right-this.lineWidths[a]);for(const c of n)a!==c.row&&(a=c.row,l=Bn(i,this.left+s,this.right-this.lineWidths[a])),c.top+=this.top+e+s,c.left=o.leftForLtr(o.x(l),c.width),l+=c.width+s}else{let a=0,l=Bn(i,this.top+e+s,this.bottom-this.columnSizes[a].height);for(const c of n)c.col!==a&&(a=c.col,l=Bn(i,this.top+e+s,this.bottom-this.columnSizes[a].height)),c.top=l,c.left+=this.left+s,c.left=o.leftForLtr(o.x(c.left),c.width),l+=c.height+s}}isHorizontal(){return this.options.position==="top"||this.options.position==="bottom"}draw(){if(this.options.display){const e=this.ctx;Ef(e,this),this._draw(),Sf(e)}}_draw(){const{options:e,columnSizes:n,lineWidths:i,ctx:s}=this,{align:r,labels:o}=e,a=Zt.color,l=ol(e.rtl,this.left,this.width),c=vn(o.font),{padding:u}=o,d=c.size,h=d/2;let f;this.drawTitle(),s.textAlign=l.textAlign("left"),s.textBaseline="middle",s.lineWidth=.5,s.font=c.string;const{boxWidth:p,boxHeight:m,itemHeight:y}=O1(o,d),v=function(x,T,k){if(isNaN(p)||p<=0||isNaN(m)||m<0)return;s.save();const A=tt(k.lineWidth,1);if(s.fillStyle=tt(k.fillStyle,a),s.lineCap=tt(k.lineCap,"butt"),s.lineDashOffset=tt(k.lineDashOffset,0),s.lineJoin=tt(k.lineJoin,"miter"),s.lineWidth=A,s.strokeStyle=tt(k.strokeStyle,a),s.setLineDash(tt(k.lineDash,[])),o.usePointStyle){const P={radius:m*Math.SQRT2/2,pointStyle:k.pointStyle,rotation:k.rotation,borderWidth:A},F=l.xPlus(x,p/2),H=T+h;MC(s,P,F,H,o.pointStyleWidth&&p)}else{const P=T+Math.max((d-m)/2,0),F=l.leftForLtr(x,p),H=ia(k.borderRadius);s.beginPath(),Object.values(H).some(te=>te!==0)?hu(s,{x:F,y:P,w:p,h:m,radius:H}):s.rect(F,P,p,m),s.fill(),A!==0&&s.stroke()}s.restore()},b=function(x,T,k){ua(s,k.text,x,T+y/2,c,{strikethrough:k.hidden,textAlign:l.textAlign(k.textAlign)})},E=this.isHorizontal(),C=this._computeTitleHeight();E?f={x:Bn(r,this.left+u,this.right-i[0]),y:this.top+u+C,line:0}:f={x:this.left+u,y:Bn(r,this.top+C+u,this.bottom-n[0].height),line:0},NC(this.ctx,e.textDirection);const w=y+u;this.legendItems.forEach((x,T)=>{s.strokeStyle=x.fontColor,s.fillStyle=x.fontColor;const k=s.measureText(x.text).width,A=l.textAlign(x.textAlign||(x.textAlign=o.textAlign)),P=p+h+k;let F=f.x,H=f.y;l.setWidth(this.width),E?T>0&&F+P+u>this.right&&(H=f.y+=w,f.line++,F=f.x=Bn(r,this.left+u,this.right-i[f.line])):T>0&&H+w>this.bottom&&(F=f.x=F+n[f.line].width+u,f.line++,H=f.y=Bn(r,this.top+C+u,this.bottom-n[f.line].height));const te=l.x(F);if(v(te,H,x),F=gY(A,F+p+h,E?F+P:this.right,e.rtl),b(l.x(F),H,x),E)f.x+=P+u;else if(typeof x.text!="string"){const N=c.lineHeight;f.y+=cT(x,N)+u}else f.y+=w}),FC(this.ctx,e.textDirection)}drawTitle(){const e=this.options,n=e.title,i=vn(n.font),s=Kn(n.padding);if(!n.display)return;const r=ol(e.rtl,this.left,this.width),o=this.ctx,a=n.position,l=i.size/2,c=s.top+l;let u,d=this.left,h=this.width;if(this.isHorizontal())h=Math.max(...this.lineWidths),u=this.top+c,d=Bn(e.align,d,this.right-h);else{const p=this.columnSizes.reduce((m,y)=>Math.max(m,y.height),0);u=c+Bn(e.align,this.top,this.bottom-p-e.labels.padding-this._computeTitleHeight())}const f=Bn(a,d,d+h);o.textAlign=r.textAlign(Q_(a)),o.textBaseline="middle",o.strokeStyle=n.color,o.fillStyle=n.color,o.font=i.string,ua(o,n.text,f,u,i)}_computeTitleHeight(){const e=this.options.title,n=vn(e.font),i=Kn(e.padding);return e.display?n.lineHeight+i.height:0}_getLegendItemAt(e,n){let i,s,r;if(rr(e,this.left,this.right)&&rr(n,this.top,this.bottom)){for(r=this.legendHitBoxes,i=0;ir.length>o.length?r:o)),e+n.size/2+i.measureText(s).width}function XU(t,e,n){let i=t;return typeof e.text!="string"&&(i=cT(e,n)),i}function cT(t,e){const n=t.text?t.text.length:0;return e*n}function qU(t,e){return!!((t==="mousemove"||t==="mouseout")&&(e.onHover||e.onLeave)||e.onClick&&(t==="click"||t==="mouseup"))}var ZU={id:"legend",_element:N1,start(t,e,n){const i=t.legend=new N1({ctx:t.ctx,options:n,chart:t});Wi.configure(t,i,n),Wi.addBox(t,i)},stop(t){Wi.removeBox(t,t.legend),delete t.legend},beforeUpdate(t,e,n){const i=t.legend;Wi.configure(t,i,n),i.options=n},afterUpdate(t){const e=t.legend;e.buildLabels(),e.adjustHitBoxes()},afterEvent(t,e){e.replay||t.legend.handleEvent(e.event)},defaults:{display:!0,position:"top",align:"center",fullSize:!0,reverse:!1,weight:1e3,onClick(t,e,n){const i=e.datasetIndex,s=n.chart;s.isDatasetVisible(i)?(s.hide(i),e.hidden=!0):(s.show(i),e.hidden=!1)},onHover:null,onLeave:null,labels:{color:t=>t.chart.options.color,boxWidth:40,padding:10,generateLabels(t){const e=t.data.datasets,{labels:{usePointStyle:n,pointStyle:i,textAlign:s,color:r,useBorderRadius:o,borderRadius:a}}=t.legend.options;return t._getSortedDatasetMetas().map(l=>{const c=l.controller.getStyle(n?0:void 0),u=Kn(c.borderWidth);return{text:e[l.index].label,fillStyle:c.backgroundColor,fontColor:r,hidden:!l.visible,lineCap:c.borderCapStyle,lineDash:c.borderDash,lineDashOffset:c.borderDashOffset,lineJoin:c.borderJoinStyle,lineWidth:(u.width+u.height)/4,strokeStyle:c.borderColor,pointStyle:i||c.pointStyle,rotation:c.rotation,textAlign:s||c.textAlign,borderRadius:o&&(a||c.borderRadius),datasetIndex:l.index}},this)}},title:{color:t=>t.chart.options.color,display:!1,position:"center",text:""}},descriptors:{_scriptable:t=>!t.startsWith("on"),labels:{_scriptable:t=>!["generateLabels","filter","sort"].includes(t)}}};class uT extends vr{constructor(e){super(),this.chart=e.chart,this.options=e.options,this.ctx=e.ctx,this._padding=void 0,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.width=void 0,this.height=void 0,this.position=void 0,this.weight=void 0,this.fullSize=void 0}update(e,n){const i=this.options;if(this.left=0,this.top=0,!i.display){this.width=this.height=this.right=this.bottom=0;return}this.width=this.right=e,this.height=this.bottom=n;const s=Nt(i.text)?i.text.length:1;this._padding=Kn(i.padding);const r=s*vn(i.font).lineHeight+this._padding.height;this.isHorizontal()?this.height=r:this.width=r}isHorizontal(){const e=this.options.position;return e==="top"||e==="bottom"}_drawArgs(e){const{top:n,left:i,bottom:s,right:r,options:o}=this,a=o.align;let l=0,c,u,d;return this.isHorizontal()?(u=Bn(a,i,r),d=n+e,c=r-i):(o.position==="left"?(u=i+e,d=Bn(a,s,n),l=Bt*-.5):(u=r-e,d=Bn(a,n,s),l=Bt*.5),c=s-n),{titleX:u,titleY:d,maxWidth:c,rotation:l}}draw(){const e=this.ctx,n=this.options;if(!n.display)return;const i=vn(n.font),r=i.lineHeight/2+this._padding.top,{titleX:o,titleY:a,maxWidth:l,rotation:c}=this._drawArgs(r);ua(e,n.text,0,0,i,{color:n.color,maxWidth:l,rotation:c,textAlign:Q_(n.align),textBaseline:"middle",translation:[o,a]})}}function JU(t,e){const n=new uT({ctx:t.ctx,options:e,chart:t});Wi.configure(t,n,e),Wi.addBox(t,n),t.titleBlock=n}var QU={id:"title",_element:uT,start(t,e,n){JU(t,n)},stop(t){const e=t.titleBlock;Wi.removeBox(t,e),delete t.titleBlock},beforeUpdate(t,e,n){const i=t.titleBlock;Wi.configure(t,i,n),i.options=n},defaults:{align:"center",display:!1,font:{weight:"bold"},fullSize:!0,padding:10,position:"top",text:"",weight:2e3},defaultRoutes:{color:"color"},descriptors:{_scriptable:!0,_indexable:!1}};const Sc={average(t){if(!t.length)return!1;let e,n,i=0,s=0,r=0;for(e=0,n=t.length;e-1?t.split(` -`):t}function O8(t,e){const{element:n,datasetIndex:s,index:i}=e,o=t.getDatasetMeta(s).controller,{label:r,value:a}=o.getLabelAndValue(i);return{chart:t,label:r,parsed:o.getParsed(i),raw:t.data.datasets[s].data[i],formattedValue:a,dataset:o.getDataset(),dataIndex:i,datasetIndex:s,element:n}}function E_(t,e){const n=t.chart.ctx,{body:s,footer:i,title:o}=t,{boxWidth:r,boxHeight:a}=e,l=Ut(e.bodyFont),c=Ut(e.titleFont),u=Ut(e.footerFont),d=o.length,f=i.length,g=s.length,_=fn(e.padding);let m=_.height,y=0,v=s.reduce((D,x)=>D+x.before.length+x.lines.length+x.after.length,0);if(v+=t.beforeBody.length+t.afterBody.length,d&&(m+=d*c.lineHeight+(d-1)*e.titleSpacing+e.titleMarginBottom),v){const D=e.displayColors?Math.max(a,l.lineHeight):l.lineHeight;m+=g*D+(v-g)*l.lineHeight+(v-1)*e.bodySpacing}f&&(m+=e.footerMarginTop+f*u.lineHeight+(f-1)*e.footerSpacing);let $=0;const A=function(D){y=Math.max(y,n.measureText(D).width+$)};return n.save(),n.font=c.string,ut(t.title,A),n.font=l.string,ut(t.beforeBody.concat(t.afterBody),A),$=e.displayColors?r+2+e.boxPadding:0,ut(s,D=>{ut(D.before,A),ut(D.lines,A),ut(D.after,A)}),$=0,n.font=u.string,ut(t.footer,A),n.restore(),y+=_.width,{width:y,height:m}}function I8(t,e){const{y:n,height:s}=e;return nt.height-s/2?"bottom":"center"}function L8(t,e,n,s){const{x:i,width:o}=s,r=n.caretSize+n.caretPadding;if(t==="left"&&i+o+r>e.width||t==="right"&&i-o-r<0)return!0}function R8(t,e,n,s){const{x:i,width:o}=n,{width:r,chartArea:{left:a,right:l}}=t;let c="center";return s==="center"?c=i<=(a+l)/2?"left":"right":i<=o/2?c="left":i>=r-o/2&&(c="right"),L8(c,t,e,n)&&(c="center"),c}function T_(t,e,n){const s=n.yAlign||e.yAlign||I8(t,n);return{xAlign:n.xAlign||e.xAlign||R8(t,e,n,s),yAlign:s}}function N8(t,e){let{x:n,width:s}=t;return e==="right"?n-=s:e==="center"&&(n-=s/2),n}function F8(t,e,n){let{y:s,height:i}=t;return e==="top"?s+=n:e==="bottom"?s-=i+n:s-=i/2,s}function P_(t,e,n,s){const{caretSize:i,caretPadding:o,cornerRadius:r}=t,{xAlign:a,yAlign:l}=n,c=i+o,{topLeft:u,topRight:d,bottomLeft:f,bottomRight:g}=yo(r);let _=N8(e,a);const m=F8(e,l,c);return l==="center"?a==="left"?_+=c:a==="right"&&(_-=c):a==="left"?_-=Math.max(u,f)+i:a==="right"&&(_+=Math.max(d,g)+i),{x:tn(_,0,s.width-e.width),y:tn(m,0,s.height-e.height)}}function Vl(t,e,n){const s=fn(n.padding);return e==="center"?t.x+t.width/2:e==="right"?t.x+t.width-s.right:t.x+s.left}function M_(t){return gs([],Vs(t))}function B8(t,e,n){return Hi(t,{tooltip:e,tooltipItems:n,type:"tooltip"})}function D_(t,e){const n=e&&e.dataset&&e.dataset.tooltip&&e.dataset.tooltip.callbacks;return n?t.override(n):t}const e1={beforeTitle:Ns,title(t){if(t.length>0){const e=t[0],n=e.chart.data.labels,s=n?n.length:0;if(this&&this.options&&this.options.mode==="dataset")return e.dataset.label||"";if(e.label)return e.label;if(s>0&&e.dataIndex"u"?e1[e].call(n,s):i}class O_ extends ti{static positioners=oa;constructor(e){super(),this.opacity=0,this._active=[],this._eventPosition=void 0,this._size=void 0,this._cachedAnimations=void 0,this._tooltipItems=[],this.$animations=void 0,this.$context=void 0,this.chart=e.chart,this.options=e.options,this.dataPoints=void 0,this.title=void 0,this.beforeBody=void 0,this.body=void 0,this.afterBody=void 0,this.footer=void 0,this.xAlign=void 0,this.yAlign=void 0,this.x=void 0,this.y=void 0,this.height=void 0,this.width=void 0,this.caretX=void 0,this.caretY=void 0,this.labelColors=void 0,this.labelPointStyles=void 0,this.labelTextColors=void 0}initialize(e){this.options=e,this._cachedAnimations=void 0,this.$context=void 0}_resolveAnimations(){const e=this._cachedAnimations;if(e)return e;const n=this.chart,s=this.options.setContext(this.getContext()),i=s.enabled&&n.options.animation&&s.animations,o=new M0(this.chart,i);return i._cacheable&&(this._cachedAnimations=Object.freeze(o)),o}getContext(){return this.$context||(this.$context=B8(this.chart.getContext(),this,this._tooltipItems))}getTitle(e,n){const{callbacks:s}=n,i=Sn(s,"beforeTitle",this,e),o=Sn(s,"title",this,e),r=Sn(s,"afterTitle",this,e);let a=[];return a=gs(a,Vs(i)),a=gs(a,Vs(o)),a=gs(a,Vs(r)),a}getBeforeBody(e,n){return M_(Sn(n.callbacks,"beforeBody",this,e))}getBody(e,n){const{callbacks:s}=n,i=[];return ut(e,o=>{const r={before:[],lines:[],after:[]},a=D_(s,o);gs(r.before,Vs(Sn(a,"beforeLabel",this,o))),gs(r.lines,Sn(a,"label",this,o)),gs(r.after,Vs(Sn(a,"afterLabel",this,o))),i.push(r)}),i}getAfterBody(e,n){return M_(Sn(n.callbacks,"afterBody",this,e))}getFooter(e,n){const{callbacks:s}=n,i=Sn(s,"beforeFooter",this,e),o=Sn(s,"footer",this,e),r=Sn(s,"afterFooter",this,e);let a=[];return a=gs(a,Vs(i)),a=gs(a,Vs(o)),a=gs(a,Vs(r)),a}_createItems(e){const n=this._active,s=this.chart.data,i=[],o=[],r=[];let a=[],l,c;for(l=0,c=n.length;le.filter(u,d,f,s))),e.itemSort&&(a=a.sort((u,d)=>e.itemSort(u,d,s))),ut(a,u=>{const d=D_(e.callbacks,u);i.push(Sn(d,"labelColor",this,u)),o.push(Sn(d,"labelPointStyle",this,u)),r.push(Sn(d,"labelTextColor",this,u))}),this.labelColors=i,this.labelPointStyles=o,this.labelTextColors=r,this.dataPoints=a,a}update(e,n){const s=this.options.setContext(this.getContext()),i=this._active;let o,r=[];if(!i.length)this.opacity!==0&&(o={opacity:0});else{const a=oa[s.position].call(this,i,this._eventPosition);r=this._createItems(s),this.title=this.getTitle(r,s),this.beforeBody=this.getBeforeBody(r,s),this.body=this.getBody(r,s),this.afterBody=this.getAfterBody(r,s),this.footer=this.getFooter(r,s);const l=this._size=E_(this,s),c=Object.assign({},a,l),u=T_(this.chart,s,c),d=P_(s,c,u,this.chart);this.xAlign=u.xAlign,this.yAlign=u.yAlign,o={opacity:1,x:d.x,y:d.y,width:l.width,height:l.height,caretX:a.x,caretY:a.y}}this._tooltipItems=r,this.$context=void 0,o&&this._resolveAnimations().update(this,o),e&&s.external&&s.external.call(this,{chart:this.chart,tooltip:this,replay:n})}drawCaret(e,n,s,i){const o=this.getCaretPosition(e,s,i);n.lineTo(o.x1,o.y1),n.lineTo(o.x2,o.y2),n.lineTo(o.x3,o.y3)}getCaretPosition(e,n,s){const{xAlign:i,yAlign:o}=this,{caretSize:r,cornerRadius:a}=s,{topLeft:l,topRight:c,bottomLeft:u,bottomRight:d}=yo(a),{x:f,y:g}=e,{width:_,height:m}=n;let y,v,$,A,D,x;return o==="center"?(D=g+m/2,i==="left"?(y=f,v=y-r,A=D+r,x=D-r):(y=f+_,v=y+r,A=D-r,x=D+r),$=y):(i==="left"?v=f+Math.max(l,u)+r:i==="right"?v=f+_-Math.max(c,d)-r:v=this.caretX,o==="top"?(A=g,D=A-r,y=v-r,$=v+r):(A=g+m,D=A+r,y=v+r,$=v-r),x=A),{x1:y,x2:v,x3:$,y1:A,y2:D,y3:x}}drawTitle(e,n,s){const i=this.title,o=i.length;let r,a,l;if(o){const c=or(s.rtl,this.x,this.width);for(e.x=Vl(this,s.titleAlign,s),n.textAlign=c.textAlign(s.titleAlign),n.textBaseline="middle",r=Ut(s.titleFont),a=s.titleSpacing,n.fillStyle=s.titleColor,n.font=r.string,l=0;l$!==0)?(e.beginPath(),e.fillStyle=o.multiKeyBackground,Va(e,{x:m,y:_,w:c,h:l,radius:v}),e.fill(),e.stroke(),e.fillStyle=r.backgroundColor,e.beginPath(),Va(e,{x:y,y:_+1,w:c-2,h:l-2,radius:v}),e.fill()):(e.fillStyle=o.multiKeyBackground,e.fillRect(m,_,c,l),e.strokeRect(m,_,c,l),e.fillStyle=r.backgroundColor,e.fillRect(y,_+1,c-2,l-2))}e.fillStyle=this.labelTextColors[s]}drawBody(e,n,s){const{body:i}=this,{bodySpacing:o,bodyAlign:r,displayColors:a,boxHeight:l,boxWidth:c,boxPadding:u}=s,d=Ut(s.bodyFont);let f=d.lineHeight,g=0;const _=or(s.rtl,this.x,this.width),m=function(T){n.fillText(T,_.x(e.x+g),e.y+f/2),e.y+=f+o},y=_.textAlign(r);let v,$,A,D,x,w,S;for(n.textAlign=r,n.textBaseline="middle",n.font=d.string,e.x=Vl(this,y,s),n.fillStyle=s.bodyColor,ut(this.beforeBody,m),g=a&&y!=="right"?r==="center"?c/2+u:c+2+u:0,D=0,w=i.length;D0&&n.stroke()}_updateAnimationTarget(e){const n=this.chart,s=this.$animations,i=s&&s.x,o=s&&s.y;if(i||o){const r=oa[e.position].call(this,this._active,this._eventPosition);if(!r)return;const a=this._size=E_(this,e),l=Object.assign({},r,this._size),c=T_(n,e,l),u=P_(e,l,c,n);(i._to!==u.x||o._to!==u.y)&&(this.xAlign=c.xAlign,this.yAlign=c.yAlign,this.width=a.width,this.height=a.height,this.caretX=r.x,this.caretY=r.y,this._resolveAnimations().update(this,u))}}_willRender(){return!!this.opacity}draw(e){const n=this.options.setContext(this.getContext());let s=this.opacity;if(!s)return;this._updateAnimationTarget(n);const i={width:this.width,height:this.height},o={x:this.x,y:this.y};s=Math.abs(s)<.001?0:s;const r=fn(n.padding),a=this.title.length||this.beforeBody.length||this.body.length||this.afterBody.length||this.footer.length;n.enabled&&a&&(e.save(),e.globalAlpha=s,this.drawBackground(o,e,i,n),A0(e,n.textDirection),o.y+=r.top,this.drawTitle(o,e,n),this.drawBody(o,e,n),this.drawFooter(o,e,n),C0(e,n.textDirection),e.restore())}getActiveElements(){return this._active||[]}setActiveElements(e,n){const s=this._active,i=e.map(({datasetIndex:a,index:l})=>{const c=this.chart.getDatasetMeta(a);if(!c)throw new Error("Cannot find a dataset at index "+a);return{datasetIndex:a,element:c.data[l],index:l}}),o=!gc(s,i),r=this._positionChanged(i,n);(o||r)&&(this._active=i,this._eventPosition=n,this._ignoreReplayEvents=!0,this.update(!0))}handleEvent(e,n,s=!0){if(n&&this._ignoreReplayEvents)return!1;this._ignoreReplayEvents=!1;const i=this.options,o=this._active||[],r=this._getActiveElements(e,o,n,s),a=this._positionChanged(r,e),l=n||!gc(r,o)||a;return l&&(this._active=r,(i.enabled||i.external)&&(this._eventPosition={x:e.x,y:e.y},this.update(!0,n))),l}_getActiveElements(e,n,s,i){const o=this.options;if(e.type==="mouseout")return[];if(!i)return n.filter(a=>this.chart.data.datasets[a.datasetIndex]&&this.chart.getDatasetMeta(a.datasetIndex).controller.getParsed(a.index)!==void 0);const r=this.chart.getElementsAtEventForMode(e,o.mode,o,s);return o.reverse&&r.reverse(),r}_positionChanged(e,n){const{caretX:s,caretY:i,options:o}=this,r=oa[o.position].call(this,e,n);return r!==!1&&(s!==r.x||i!==r.y)}}var V8={id:"tooltip",_element:O_,positioners:oa,afterInit(t,e,n){n&&(t.tooltip=new O_({chart:t,options:n}))},beforeUpdate(t,e,n){t.tooltip&&t.tooltip.initialize(n)},reset(t,e,n){t.tooltip&&t.tooltip.initialize(n)},afterDraw(t){const e=t.tooltip;if(e&&e._willRender()){const n={tooltip:e};if(t.notifyPlugins("beforeTooltipDraw",{...n,cancelable:!0})===!1)return;e.draw(t.ctx),t.notifyPlugins("afterTooltipDraw",n)}},afterEvent(t,e){if(t.tooltip){const n=e.replay;t.tooltip.handleEvent(e.event,n,e.inChartArea)&&(e.changed=!0)}},defaults:{enabled:!0,external:null,position:"average",backgroundColor:"rgba(0,0,0,0.8)",titleColor:"#fff",titleFont:{weight:"bold"},titleSpacing:2,titleMarginBottom:6,titleAlign:"left",bodyColor:"#fff",bodySpacing:2,bodyFont:{},bodyAlign:"left",footerColor:"#fff",footerSpacing:2,footerMarginTop:6,footerFont:{weight:"bold"},footerAlign:"left",padding:6,caretPadding:2,caretSize:5,cornerRadius:6,boxHeight:(t,e)=>e.bodyFont.size,boxWidth:(t,e)=>e.bodyFont.size,multiKeyBackground:"#fff",displayColors:!0,boxPadding:0,borderColor:"rgba(0,0,0,0)",borderWidth:0,animation:{duration:400,easing:"easeOutQuart"},animations:{numbers:{type:"number",properties:["x","y","width","height","caretX","caretY"]},opacity:{easing:"linear",duration:200}},callbacks:e1},defaultRoutes:{bodyFont:"font",footerFont:"font",titleFont:"font"},descriptors:{_scriptable:t=>t!=="filter"&&t!=="itemSort"&&t!=="external",_indexable:!1,callbacks:{_scriptable:!1,_indexable:!1},animation:{_fallback:!1},animations:{_fallback:"animation"}},additionalOptionScopes:["interaction"]};const H8=(t,e,n,s)=>(typeof e=="string"?(n=t.push(e)-1,s.unshift({index:n,label:e})):isNaN(e)&&(n=null),n);function j8(t,e,n,s){const i=t.indexOf(e);if(i===-1)return H8(t,e,n,s);const o=t.lastIndexOf(e);return i!==o?n:i}const W8=(t,e)=>t===null?null:tn(Math.round(t),0,e);function I_(t){const e=this.getLabels();return t>=0&&tn.length-1?null:this.getPixelForValue(n[e].value)}getValueForPixel(e){return Math.round(this._startValue+this.getDecimalForPixel(e)*this._valueRange)}getBasePixel(){return this.bottom}}function K8(t,e){const n=[],{bounds:i,step:o,min:r,max:a,precision:l,count:c,maxTicks:u,maxDigits:d,includeBounds:f}=t,g=o||1,_=u-1,{min:m,max:y}=e,v=!ot(r),$=!ot(a),A=!ot(c),D=(y-m)/(d+1);let x=Tm((y-m)/_/g)*g,w,S,T,M;if(x<1e-14&&!v&&!$)return[{value:m},{value:y}];M=Math.ceil(y/x)-Math.floor(m/x),M>_&&(x=Tm(M*x/_/g)*g),ot(l)||(w=Math.pow(10,l),x=Math.ceil(x*w)/w),i==="ticks"?(S=Math.floor(m/x)*x,T=Math.ceil(y/x)*x):(S=m,T=y),v&&$&&o&&VB((a-r)/o,x/1e3)?(M=Math.round(Math.min((a-r)/x,u)),x=(a-r)/M,S=r,T=a):A?(S=v?r:S,T=$?a:T,M=c-1,x=(T-S)/M):(M=(T-S)/x,va(M,Math.round(M),x/1e3)?M=Math.round(M):M=Math.ceil(M));const E=Math.max(Pm(x),Pm(S));w=Math.pow(10,ot(l)?E:l),S=Math.round(S*w)/w,T=Math.round(T*w)/w;let V=0;for(v&&(f&&S!==r?(n.push({value:r}),Sa)break;n.push({value:X})}return $&&f&&T!==a?n.length&&va(n[n.length-1].value,a,L_(a,D,t))?n[n.length-1].value=a:n.push({value:a}):(!$||T===a)&&n.push({value:T}),n}function L_(t,e,{horizontal:n,minRotation:s}){const i=rs(s),o=(n?Math.sin(i):Math.cos(i))||.001,r=.75*e*(""+t).length;return Math.min(e/o,r)}class xc extends Oo{constructor(e){super(e),this.start=void 0,this.end=void 0,this._startValue=void 0,this._endValue=void 0,this._valueRange=0}parse(e,n){return ot(e)||(typeof e=="number"||e instanceof Number)&&!isFinite(+e)?null:+e}handleTickRangeOptions(){const{beginAtZero:e}=this.options,{minDefined:n,maxDefined:s}=this.getUserBounds();let{min:i,max:o}=this;const r=l=>i=n?i:l,a=l=>o=s?o:l;if(e){const l=$s(i),c=$s(o);l<0&&c<0?a(0):l>0&&c>0&&r(0)}if(i===o){let l=o===0?1:Math.abs(o*.05);a(o+l),e||r(i-l)}this.min=i,this.max=o}getTickLimit(){const e=this.options.ticks;let{maxTicksLimit:n,stepSize:s}=e,i;return s?(i=Math.ceil(this.max/s)-Math.floor(this.min/s)+1,i>1e3&&(console.warn(`scales.${this.id}.ticks.stepSize: ${s} would result generating up to ${i} ticks. Limiting to 1000.`),i=1e3)):(i=this.computeTickLimit(),n=n||11),n&&(i=Math.min(n,i)),i}computeTickLimit(){return Number.POSITIVE_INFINITY}buildTicks(){const e=this.options,n=e.ticks;let s=this.getTickLimit();s=Math.max(2,s);const i={maxTicks:s,bounds:e.bounds,min:e.min,max:e.max,precision:n.precision,step:n.stepSize,count:n.count,maxDigits:this._maxDigits(),horizontal:this.isHorizontal(),minRotation:n.minRotation||0,includeBounds:n.includeBounds!==!1},o=this._range||this,r=K8(i,o);return e.bounds==="ticks"&&c0(r,this,"value"),e.reverse?(r.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),r}configure(){const e=this.ticks;let n=this.min,s=this.max;if(super.configure(),this.options.offset&&e.length){const i=(s-n)/Math.max(e.length-1,1)/2;n-=i,s+=i}this._startValue=n,this._endValue=s,this._valueRange=s-n}getLabelForValue(e){return el(e,this.chart.options.locale,this.options.ticks.format)}}class Y8 extends xc{static id="linear";static defaults={ticks:{callback:Zc.formatters.numeric}};determineDataLimits(){const{min:e,max:n}=this.getMinMax(!0);this.min=Tt(e)?e:0,this.max=Tt(n)?n:1,this.handleTickRangeOptions()}computeTickLimit(){const e=this.isHorizontal(),n=e?this.width:this.height,s=rs(this.options.ticks.minRotation),i=(e?Math.sin(s):Math.cos(s))||.001,o=this._resolveTickFontOptions(0);return Math.ceil(n/Math.min(40,o.lineHeight/i))}getPixelForValue(e){return e===null?NaN:this.getPixelForDecimal((e-this._startValue)/this._valueRange)}getValueForPixel(e){return this._startValue+this.getDecimalForPixel(e)*this._valueRange}}const ja=t=>Math.floor(yi(t)),oo=(t,e)=>Math.pow(10,ja(t)+e);function R_(t){return t/Math.pow(10,ja(t))===1}function N_(t,e,n){const s=Math.pow(10,n),i=Math.floor(t/s);return Math.ceil(e/s)-i}function U8(t,e){const n=e-t;let s=ja(n);for(;N_(t,e,s)>10;)s++;for(;N_(t,e,s)<10;)s--;return Math.min(s,ja(t))}function q8(t,{min:e,max:n}){e=Mn(t.min,e);const s=[],i=ja(e);let o=U8(e,n),r=o<0?Math.pow(10,Math.abs(o)):1;const a=Math.pow(10,o),l=i>o?Math.pow(10,i):0,c=Math.round((e-l)*r)/r,u=Math.floor((e-l)/a/10)*a*10;let d=Math.floor((c-u)/Math.pow(10,o)),f=Mn(t.min,Math.round((l+u+d*Math.pow(10,o))*r)/r);for(;f=10?d=d<15?15:20:d++,d>=20&&(o++,d=2,r=o>=0?1:r),f=Math.round((l+u+d*Math.pow(10,o))*r)/r;const g=Mn(t.max,f);return s.push({value:g,major:R_(g),significand:d}),s}class G8 extends Oo{static id="logarithmic";static defaults={ticks:{callback:Zc.formatters.logarithmic,major:{enabled:!0}}};constructor(e){super(e),this.start=void 0,this.end=void 0,this._startValue=void 0,this._valueRange=0}parse(e,n){const s=xc.prototype.parse.apply(this,[e,n]);if(s===0){this._zero=!0;return}return Tt(s)&&s>0?s:null}determineDataLimits(){const{min:e,max:n}=this.getMinMax(!0);this.min=Tt(e)?Math.max(0,e):null,this.max=Tt(n)?Math.max(0,n):null,this.options.beginAtZero&&(this._zero=!0),this._zero&&this.min!==this._suggestedMin&&!Tt(this._userMin)&&(this.min=e===oo(this.min,0)?oo(this.min,-1):oo(this.min,0)),this.handleTickRangeOptions()}handleTickRangeOptions(){const{minDefined:e,maxDefined:n}=this.getUserBounds();let s=this.min,i=this.max;const o=a=>s=e?s:a,r=a=>i=n?i:a;s===i&&(s<=0?(o(1),r(10)):(o(oo(s,-1)),r(oo(i,1)))),s<=0&&o(oo(i,-1)),i<=0&&r(oo(s,1)),this.min=s,this.max=i}buildTicks(){const e=this.options,n={min:this._userMin,max:this._userMax},s=q8(n,this);return e.bounds==="ticks"&&c0(s,this,"value"),e.reverse?(s.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),s}getLabelForValue(e){return e===void 0?"0":el(e,this.chart.options.locale,this.options.ticks.format)}configure(){const e=this.min;super.configure(),this._startValue=yi(e),this._valueRange=yi(this.max)-yi(e)}getPixelForValue(e){return(e===void 0||e===0)&&(e=this.min),e===null||isNaN(e)?NaN:this.getPixelForDecimal(e===this.min?0:(yi(e)-this._startValue)/this._valueRange)}getValueForPixel(e){const n=this.getDecimalForPixel(e);return Math.pow(10,this._startValue+n*this._valueRange)}}function th(t){const e=t.ticks;if(e.display&&t.display){const n=fn(e.backdropPadding);return qe(e.font&&e.font.size,Pt.font.size)+n.height}return 0}function J8(t,e,n){return n=yt(n)?n:[n],{w:s4(t,e.string,n),h:n.length*e.lineHeight}}function F_(t,e,n,s,i){return t===s||t===i?{start:e-n/2,end:e+n/2}:ti?{start:e-n,end:e}:{start:e,end:e+n}}function X8(t){const e={l:t.left+t._padding.left,r:t.right-t._padding.right,t:t.top+t._padding.top,b:t.bottom-t._padding.bottom},n=Object.assign({},e),s=[],i=[],o=t._pointLabels.length,r=t.options.pointLabels,a=r.centerPointLabels?xt/o:0;for(let l=0;le.r&&(a=(s.end-e.r)/o,t.r=Math.max(t.r,e.r+a)),i.starte.b&&(l=(i.end-e.b)/r,t.b=Math.max(t.b,e.b+l))}function Z8(t,e,n){const s=t.drawingArea,{extra:i,additionalAngle:o,padding:r,size:a}=n,l=t.getPointPosition(e,s+i+r,o),c=Math.round(Ef(On(l.angle+Nt))),u=iH(l.y,a.h,c),d=nH(c),f=sH(l.x,a.w,d);return{visible:!0,x:l.x,y:u,textAlign:d,left:f,top:u,right:f+a.w,bottom:u+a.h}}function eH(t,e){if(!e)return!0;const{left:n,top:s,right:i,bottom:o}=t;return!(qs({x:n,y:s},e)||qs({x:n,y:o},e)||qs({x:i,y:s},e)||qs({x:i,y:o},e))}function tH(t,e,n){const s=[],i=t._pointLabels.length,o=t.options,{centerPointLabels:r,display:a}=o.pointLabels,l={extra:th(o)/2,additionalAngle:r?xt/i:0};let c;for(let u=0;u270||n<90)&&(t-=e),t}function oH(t,e,n){const{left:s,top:i,right:o,bottom:r}=n,{backdropColor:a}=e;if(!ot(a)){const l=yo(e.borderRadius),c=fn(e.backdropPadding);t.fillStyle=a;const u=s-c.left,d=i-c.top,f=o-s+c.width,g=r-i+c.height;Object.values(l).some(_=>_!==0)?(t.beginPath(),Va(t,{x:u,y:d,w:f,h:g,radius:l}),t.fill()):t.fillRect(u,d,f,g)}}function rH(t,e){const{ctx:n,options:{pointLabels:s}}=t;for(let i=e-1;i>=0;i--){const o=t._pointLabelItems[i];if(!o.visible)continue;const r=s.setContext(t.getPointLabelContext(i));oH(n,r,o);const a=Ut(r.font),{x:l,y:c,textAlign:u}=o;Co(n,t._pointLabels[i],l,c+a.lineHeight/2,a,{color:r.color,textAlign:u,textBaseline:"middle"})}}function t1(t,e,n,s){const{ctx:i}=t;if(n)i.arc(t.xCenter,t.yCenter,e,0,wt);else{let o=t.getPointPosition(0,e);i.moveTo(o.x,o.y);for(let r=1;r{const i=gt(this.options.pointLabels.callback,[n,s],this);return i||i===0?i:""}).filter((n,s)=>this.chart.getDataVisibility(s))}fit(){const e=this.options;e.display&&e.pointLabels.display?X8(this):this.setCenterPoint(0,0,0,0)}setCenterPoint(e,n,s,i){this.xCenter+=Math.floor((e-n)/2),this.yCenter+=Math.floor((s-i)/2),this.drawingArea-=Math.min(this.drawingArea/2,Math.max(e,n,s,i))}getIndexAngle(e){const n=wt/(this._pointLabels.length||1),s=this.options.startAngle||0;return On(e*n+rs(s))}getDistanceFromCenterForValue(e){if(ot(e))return NaN;const n=this.drawingArea/(this.max-this.min);return this.options.reverse?(this.max-e)*n:(e-this.min)*n}getValueForDistanceFromCenter(e){if(ot(e))return NaN;const n=e/(this.drawingArea/(this.max-this.min));return this.options.reverse?this.max-n:this.min+n}getPointLabelContext(e){const n=this._pointLabels||[];if(e>=0&&e{if(d!==0){l=this.getDistanceFromCenterForValue(u.value);const f=this.getContext(d),g=i.setContext(f),_=o.setContext(f);aH(this,g,l,r,_)}}),s.display){for(e.save(),a=r-1;a>=0;a--){const u=s.setContext(this.getPointLabelContext(a)),{color:d,lineWidth:f}=u;!f||!d||(e.lineWidth=f,e.strokeStyle=d,e.setLineDash(u.borderDash),e.lineDashOffset=u.borderDashOffset,l=this.getDistanceFromCenterForValue(n.ticks.reverse?this.min:this.max),c=this.getPointPosition(a,l),e.beginPath(),e.moveTo(this.xCenter,this.yCenter),e.lineTo(c.x,c.y),e.stroke())}e.restore()}}drawBorder(){}drawLabels(){const e=this.ctx,n=this.options,s=n.ticks;if(!s.display)return;const i=this.getIndexAngle(0);let o,r;e.save(),e.translate(this.xCenter,this.yCenter),e.rotate(i),e.textAlign="center",e.textBaseline="middle",this.ticks.forEach((a,l)=>{if(l===0&&!n.reverse)return;const c=s.setContext(this.getContext(l)),u=Ut(c.font);if(o=this.getDistanceFromCenterForValue(this.ticks[l].value),c.showLabelBackdrop){e.font=u.string,r=e.measureText(a.label).width,e.fillStyle=c.backdropColor;const d=fn(c.backdropPadding);e.fillRect(-r/2-d.left,-o-u.size/2-d.top,r+d.width,u.size+d.height)}Co(e,a.label,0,-o,u,{color:c.color,strokeColor:c.textStrokeColor,strokeWidth:c.textStrokeWidth})}),e.restore()}drawTitle(){}}const ou={millisecond:{common:!0,size:1,steps:1e3},second:{common:!0,size:1e3,steps:60},minute:{common:!0,size:6e4,steps:60},hour:{common:!0,size:36e5,steps:24},day:{common:!0,size:864e5,steps:30},week:{common:!1,size:6048e5,steps:4},month:{common:!0,size:2628e6,steps:12},quarter:{common:!1,size:7884e6,steps:4},year:{common:!0,size:3154e7}},An=Object.keys(ou);function B_(t,e){return t-e}function V_(t,e){if(ot(e))return null;const n=t._adapter,{parser:s,round:i,isoWeekday:o}=t._parseOpts;let r=e;return typeof s=="function"&&(r=s(r)),Tt(r)||(r=typeof s=="string"?n.parse(r,s):n.parse(r)),r===null?null:(i&&(r=i==="week"&&(kr(o)||o===!0)?n.startOf(r,"isoWeek",o):n.startOf(r,i)),+r)}function H_(t,e,n,s){const i=An.length;for(let o=An.indexOf(t);o=An.indexOf(n);o--){const r=An[o];if(ou[r].common&&t._adapter.diff(i,s,r)>=e-1)return r}return An[n?An.indexOf(n):0]}function dH(t){for(let e=An.indexOf(t)+1,n=An.length;e=e?n[s]:n[i];t[o]=!0}}function hH(t,e,n,s){const i=t._adapter,o=+i.startOf(e[0].value,s),r=e[e.length-1].value;let a,l;for(a=o;a<=r;a=+i.add(a,1,s))l=n[a],l>=0&&(e[l].major=!0);return e}function W_(t,e,n){const s=[],i={},o=e.length;let r,a;for(r=0;r+e.value))}initOffsets(e=[]){let n=0,s=0,i,o;this.options.offset&&e.length&&(i=this.getDecimalForValue(e[0]),e.length===1?n=1-i:n=(this.getDecimalForValue(e[1])-i)/2,o=this.getDecimalForValue(e[e.length-1]),e.length===1?s=o:s=(o-this.getDecimalForValue(e[e.length-2]))/2);const r=e.length<3?.5:.25;n=tn(n,0,r),s=tn(s,0,r),this._offsets={start:n,end:s,factor:1/(n+1+s)}}_generate(){const e=this._adapter,n=this.min,s=this.max,i=this.options,o=i.time,r=o.unit||H_(o.minUnit,n,s,this._getLabelCapacity(n)),a=qe(i.ticks.stepSize,1),l=r==="week"?o.isoWeekday:!1,c=kr(l)||l===!0,u={};let d=n,f,g;if(c&&(d=+e.startOf(d,"isoWeek",l)),d=+e.startOf(d,c?"day":r),e.diff(s,n,r)>1e5*a)throw new Error(n+" and "+s+" are too far apart with stepSize of "+a+" "+r);const _=i.ticks.source==="data"&&this.getDataTimestamps();for(f=d,g=0;f+m)}getLabelForValue(e){const n=this._adapter,s=this.options.time;return s.tooltipFormat?n.format(e,s.tooltipFormat):n.format(e,s.displayFormats.datetime)}format(e,n){const i=this.options.time.displayFormats,o=this._unit,r=n||i[o];return this._adapter.format(e,r)}_tickFormatFunction(e,n,s,i){const o=this.options,r=o.ticks.callback;if(r)return gt(r,[e,n,s],this);const a=o.time.displayFormats,l=this._unit,c=this._majorUnit,u=l&&a[l],d=c&&a[c],f=s[n],g=c&&d&&f&&f.major;return this._adapter.format(e,i||(g?d:u))}generateTickLabels(e){let n,s,i;for(n=0,s=e.length;n0?a:1}getDataTimestamps(){let e=this._cache.data||[],n,s;if(e.length)return e;const i=this.getMatchingVisibleMetas();if(this._normalized&&i.length)return this._cache.data=i[0].controller.getAllParsedValues(this);for(n=0,s=i.length;n=t[s].pos&&e<=t[i].pos&&({lo:s,hi:i}=Us(t,"pos",e)),{pos:o,time:a}=t[s],{pos:r,time:l}=t[i]):(e>=t[s].time&&e<=t[i].time&&({lo:s,hi:i}=Us(t,"time",e)),{time:o,pos:a}=t[s],{time:r,pos:l}=t[i]);const c=r-o;return c?a+(l-a)*(e-o)/c:a}class fH extends nh{static id="timeseries";static defaults=nh.defaults;constructor(e){super(e),this._table=[],this._minPos=void 0,this._tableRange=void 0}initOffsets(){const e=this._getTimestampsForTable(),n=this._table=this.buildLookupTable(e);this._minPos=Hl(n,this.min),this._tableRange=Hl(n,this.max)-this._minPos,super.initOffsets(e)}buildLookupTable(e){const{min:n,max:s}=this,i=[],o=[];let r,a,l,c,u;for(r=0,a=e.length;r=n&&c<=s&&i.push(c);if(i.length<2)return[{time:n,pos:0},{time:s,pos:1}];for(r=0,a=i.length;ri-o)}_getTimestampsForTable(){let e=this._cache.all||[];if(e.length)return e;const n=this.getDataTimestamps(),s=this.getLabelTimestamps();return n.length&&s.length?e=this.normalize(n.concat(s)):e=n.length?n:s,e=this._cache.all=e,e}getDecimalForValue(e){return(Hl(this._table,e)-this._minPos)/this._tableRange}getValueForPixel(e){const n=this._offsets,s=this.getDecimalForPixel(e)/n.factor-n.end;return Hl(this._table,s*this._tableRange+this._minPos,!0)}}const n1={data:{type:Object,required:!0},options:{type:Object,default:()=>({})},plugins:{type:Array,default:()=>[]},datasetIdKey:{type:String,default:"label"},updateMode:{type:String,default:void 0}},pH={ariaLabel:{type:String},ariaDescribedby:{type:String}},gH={type:{type:String,required:!0},...n1,...pH},mH=Ov[0]==="2"?(t,e)=>Object.assign(t,{attrs:e}):(t,e)=>Object.assign(t,e);function Go(t){return Ic(t)?et(t):t}function _H(t){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:t;return Ic(e)?new Proxy(t,{}):t}function bH(t,e){const n=t.options;n&&e&&Object.assign(n,e)}function s1(t,e){t.labels=e}function i1(t,e,n){const s=[];t.datasets=e.map(i=>{const o=t.datasets.find(r=>r[n]===i[n]);return!o||!i.data||s.includes(o)?{...i}:(s.push(o),Object.assign(o,i),o)})}function vH(t,e){const n={labels:[],datasets:[]};return s1(n,t.labels),i1(n,t.datasets,e),n}const yH=Bt({props:gH,setup(t,e){let{expose:n,slots:s}=e;const i=be(null),o=Fh(null);n({chart:o});const r=()=>{if(!i.value)return;const{type:c,data:u,options:d,plugins:f,datasetIdKey:g}=t,_=vH(u,g),m=_H(_,u);o.value=new su(i.value,{type:c,data:m,options:{...d},plugins:f})},a=()=>{const c=et(o.value);c&&(c.destroy(),o.value=null)},l=c=>{c.update(t.updateMode)};return Jt(r),Kh(a),Ht([()=>t.options,()=>t.data],(c,u)=>{let[d,f]=c,[g,_]=u;const m=et(o.value);if(!m)return;let y=!1;if(d){const v=Go(d),$=Go(g);v&&v!==$&&(bH(m,v),y=!0)}if(f){const v=Go(f.labels),$=Go(_.labels),A=Go(f.datasets),D=Go(_.datasets);v!==$&&(s1(m.config.data,v),y=!0),A&&A!==D&&(i1(m.config.data,A,t.datasetIdKey),y=!0)}y&&nn(()=>{l(m)})},{deep:!0}),()=>$o("canvas",{role:"img",ariaLabel:t.ariaLabel,ariaDescribedby:t.ariaDescribedby,ref:i},[$o("p",{},[s.default?s.default():""])])}});function o1(t,e){return su.register(e),Bt({props:n1,setup(n,s){let{expose:i}=s;const o=Fh(null),r=a=>{o.value=a?.chart};return i({chart:o}),()=>$o(yH,mH({ref:r},{type:t,...n}))}})}const wH=o1("bar",I0),xH=o1("line",R0);function Zs(t){return Array.isArray?Array.isArray(t):l1(t)==="[object Array]"}const kH=1/0;function SH(t){if(typeof t=="string")return t;let e=t+"";return e=="0"&&1/t==-kH?"-0":e}function $H(t){return t==null?"":SH(t)}function xs(t){return typeof t=="string"}function r1(t){return typeof t=="number"}function AH(t){return t===!0||t===!1||CH(t)&&l1(t)=="[object Boolean]"}function a1(t){return typeof t=="object"}function CH(t){return a1(t)&&t!==null}function In(t){return t!=null}function fd(t){return!t.trim().length}function l1(t){return t==null?t===void 0?"[object Undefined]":"[object Null]":Object.prototype.toString.call(t)}const EH="Incorrect 'index' type",TH=t=>`Invalid value for key ${t}`,PH=t=>`Pattern length exceeds max of ${t}.`,MH=t=>`Missing ${t} property in key`,DH=t=>`Property 'weight' in key '${t}' must be a positive integer`,z_=Object.prototype.hasOwnProperty;class OH{constructor(e){this._keys=[],this._keyMap={};let n=0;e.forEach(s=>{let i=c1(s);this._keys.push(i),this._keyMap[i.id]=i,n+=i.weight}),this._keys.forEach(s=>{s.weight/=n})}get(e){return this._keyMap[e]}keys(){return this._keys}toJSON(){return JSON.stringify(this._keys)}}function c1(t){let e=null,n=null,s=null,i=1,o=null;if(xs(t)||Zs(t))s=t,e=K_(t),n=sh(t);else{if(!z_.call(t,"name"))throw new Error(MH("name"));const r=t.name;if(s=r,z_.call(t,"weight")&&(i=t.weight,i<=0))throw new Error(DH(r));e=K_(r),n=sh(r),o=t.getFn}return{path:e,id:n,weight:i,src:s,getFn:o}}function K_(t){return Zs(t)?t:t.split(".")}function sh(t){return Zs(t)?t.join("."):t}function IH(t,e){let n=[],s=!1;const i=(o,r,a)=>{if(In(o))if(!r[a])n.push(o);else{let l=r[a];const c=o[l];if(!In(c))return;if(a===r.length-1&&(xs(c)||r1(c)||AH(c)))n.push($H(c));else if(Zs(c)){s=!0;for(let u=0,d=c.length;ut.score===e.score?t.idx{this._keysMap[n.id]=s})}create(){this.isCreated||!this.docs.length||(this.isCreated=!0,xs(this.docs[0])?this.docs.forEach((e,n)=>{this._addString(e,n)}):this.docs.forEach((e,n)=>{this._addObject(e,n)}),this.norm.clear())}add(e){const n=this.size();xs(e)?this._addString(e,n):this._addObject(e,n)}removeAt(e){this.records.splice(e,1);for(let n=e,s=this.size();n{let r=i.getFn?i.getFn(e):this.getFn(e,i.path);if(In(r)){if(Zs(r)){let a=[];const l=[{nestedArrIndex:-1,value:r}];for(;l.length;){const{nestedArrIndex:c,value:u}=l.pop();if(In(u))if(xs(u)&&!fd(u)){let d={v:u,i:c,n:this.norm.get(u)};a.push(d)}else Zs(u)&&u.forEach((d,f)=>{l.push({nestedArrIndex:f,value:d})})}s.$[o]=a}else if(xs(r)&&!fd(r)){let a={v:r,n:this.norm.get(r)};s.$[o]=a}}}),this.records.push(s)}toJSON(){return{keys:this.keys,records:this.records}}}function u1(t,e,{getFn:n=Ue.getFn,fieldNormWeight:s=Ue.fieldNormWeight}={}){const i=new Vf({getFn:n,fieldNormWeight:s});return i.setKeys(t.map(c1)),i.setSources(e),i.create(),i}function HH(t,{getFn:e=Ue.getFn,fieldNormWeight:n=Ue.fieldNormWeight}={}){const{keys:s,records:i}=t,o=new Vf({getFn:e,fieldNormWeight:n});return o.setKeys(s),o.setIndexRecords(i),o}function jl(t,{errors:e=0,currentLocation:n=0,expectedLocation:s=0,distance:i=Ue.distance,ignoreLocation:o=Ue.ignoreLocation}={}){const r=e/t.length;if(o)return r;const a=Math.abs(s-n);return i?r+a/i:a?1:r}function jH(t=[],e=Ue.minMatchCharLength){let n=[],s=-1,i=-1,o=0;for(let r=t.length;o=e&&n.push([s,i]),s=-1)}return t[o-1]&&o-s>=e&&n.push([s,o-1]),n}const ho=32;function WH(t,e,n,{location:s=Ue.location,distance:i=Ue.distance,threshold:o=Ue.threshold,findAllMatches:r=Ue.findAllMatches,minMatchCharLength:a=Ue.minMatchCharLength,includeMatches:l=Ue.includeMatches,ignoreLocation:c=Ue.ignoreLocation}={}){if(e.length>ho)throw new Error(PH(ho));const u=e.length,d=t.length,f=Math.max(0,Math.min(s,d));let g=o,_=f;const m=a>1||l,y=m?Array(d):[];let v;for(;(v=t.indexOf(e,_))>-1;){let S=jl(e,{currentLocation:v,expectedLocation:f,distance:i,ignoreLocation:c});if(g=Math.min(S,g),_=v+u,m){let T=0;for(;T=E;Y-=1){let R=Y-1,I=n[t.charAt(R)];if(m&&(y[R]=+!!I),X[Y]=(X[Y+1]<<1|1)&I,S&&(X[Y]|=($[Y+1]|$[Y])<<1|1|$[Y+1]),X[Y]&x&&(A=jl(e,{errors:S,currentLocation:R,expectedLocation:f,distance:i,ignoreLocation:c}),A<=g)){if(g=A,_=R,_<=f)break;E=Math.max(1,2*f-_)}}if(jl(e,{errors:S+1,currentLocation:f,expectedLocation:f,distance:i,ignoreLocation:c})>g)break;$=X}const w={isMatch:_>=0,score:Math.max(.001,A)};if(m){const S=jH(y,a);S.length?l&&(w.indices=S):w.isMatch=!1}return w}function zH(t){let e={};for(let n=0,s=t.length;n{this.chunks.push({pattern:f,alphabet:zH(f),startIndex:g})},d=this.pattern.length;if(d>ho){let f=0;const g=d%ho,_=d-g;for(;f<_;)u(this.pattern.substr(f,ho),f),f+=ho;if(g){const m=d-ho;u(this.pattern.substr(m),m)}}else u(this.pattern,0)}searchIn(e){const{isCaseSensitive:n,includeMatches:s}=this.options;if(n||(e=e.toLowerCase()),this.pattern===e){let _={isMatch:!0,score:0};return s&&(_.indices=[[0,e.length-1]]),_}const{location:i,distance:o,threshold:r,findAllMatches:a,minMatchCharLength:l,ignoreLocation:c}=this.options;let u=[],d=0,f=!1;this.chunks.forEach(({pattern:_,alphabet:m,startIndex:y})=>{const{isMatch:v,score:$,indices:A}=WH(e,_,m,{location:i+y,distance:o,threshold:r,findAllMatches:a,minMatchCharLength:l,includeMatches:s,ignoreLocation:c});v&&(f=!0),d+=$,v&&A&&(u=[...u,...A])});let g={isMatch:f,score:f?d/this.chunks.length:1};return f&&s&&(g.indices=u),g}}class Wi{constructor(e){this.pattern=e}static isMultiMatch(e){return Y_(e,this.multiRegex)}static isSingleMatch(e){return Y_(e,this.singleRegex)}search(){}}function Y_(t,e){const n=t.match(e);return n?n[1]:null}class KH extends Wi{constructor(e){super(e)}static get type(){return"exact"}static get multiRegex(){return/^="(.*)"$/}static get singleRegex(){return/^=(.*)$/}search(e){const n=e===this.pattern;return{isMatch:n,score:n?0:1,indices:[0,this.pattern.length-1]}}}class YH extends Wi{constructor(e){super(e)}static get type(){return"inverse-exact"}static get multiRegex(){return/^!"(.*)"$/}static get singleRegex(){return/^!(.*)$/}search(e){const s=e.indexOf(this.pattern)===-1;return{isMatch:s,score:s?0:1,indices:[0,e.length-1]}}}class UH extends Wi{constructor(e){super(e)}static get type(){return"prefix-exact"}static get multiRegex(){return/^\^"(.*)"$/}static get singleRegex(){return/^\^(.*)$/}search(e){const n=e.startsWith(this.pattern);return{isMatch:n,score:n?0:1,indices:[0,this.pattern.length-1]}}}class qH extends Wi{constructor(e){super(e)}static get type(){return"inverse-prefix-exact"}static get multiRegex(){return/^!\^"(.*)"$/}static get singleRegex(){return/^!\^(.*)$/}search(e){const n=!e.startsWith(this.pattern);return{isMatch:n,score:n?0:1,indices:[0,e.length-1]}}}class GH extends Wi{constructor(e){super(e)}static get type(){return"suffix-exact"}static get multiRegex(){return/^"(.*)"\$$/}static get singleRegex(){return/^(.*)\$$/}search(e){const n=e.endsWith(this.pattern);return{isMatch:n,score:n?0:1,indices:[e.length-this.pattern.length,e.length-1]}}}class JH extends Wi{constructor(e){super(e)}static get type(){return"inverse-suffix-exact"}static get multiRegex(){return/^!"(.*)"\$$/}static get singleRegex(){return/^!(.*)\$$/}search(e){const n=!e.endsWith(this.pattern);return{isMatch:n,score:n?0:1,indices:[0,e.length-1]}}}class h1 extends Wi{constructor(e,{location:n=Ue.location,threshold:s=Ue.threshold,distance:i=Ue.distance,includeMatches:o=Ue.includeMatches,findAllMatches:r=Ue.findAllMatches,minMatchCharLength:a=Ue.minMatchCharLength,isCaseSensitive:l=Ue.isCaseSensitive,ignoreLocation:c=Ue.ignoreLocation}={}){super(e),this._bitapSearch=new d1(e,{location:n,threshold:s,distance:i,includeMatches:o,findAllMatches:r,minMatchCharLength:a,isCaseSensitive:l,ignoreLocation:c})}static get type(){return"fuzzy"}static get multiRegex(){return/^"(.*)"$/}static get singleRegex(){return/^(.*)$/}search(e){return this._bitapSearch.searchIn(e)}}class f1 extends Wi{constructor(e){super(e)}static get type(){return"include"}static get multiRegex(){return/^'"(.*)"$/}static get singleRegex(){return/^'(.*)$/}search(e){let n=0,s;const i=[],o=this.pattern.length;for(;(s=e.indexOf(this.pattern,n))>-1;)n=s+o,i.push([s,n-1]);const r=!!i.length;return{isMatch:r,score:r?0:1,indices:i}}}const ih=[KH,f1,UH,qH,JH,GH,YH,h1],U_=ih.length,XH=/ +(?=(?:[^\"]*\"[^\"]*\")*[^\"]*$)/,QH="|";function ZH(t,e={}){return t.split(QH).map(n=>{let s=n.trim().split(XH).filter(o=>o&&!!o.trim()),i=[];for(let o=0,r=s.length;o!!(t[kc.AND]||t[kc.OR]),sj=t=>!!t[ah.PATH],ij=t=>!Zs(t)&&a1(t)&&!lh(t),q_=t=>({[kc.AND]:Object.keys(t).map(e=>({[e]:t[e]}))});function p1(t,e,{auto:n=!0}={}){const s=i=>{let o=Object.keys(i);const r=sj(i);if(!r&&o.length>1&&!lh(i))return s(q_(i));if(ij(i)){const l=r?i[ah.PATH]:o[0],c=r?i[ah.PATTERN]:i[l];if(!xs(c))throw new Error(TH(l));const u={keyId:sh(l),pattern:c};return n&&(u.searcher=rh(c,e)),u}let a={children:[],operator:o[0]};return o.forEach(l=>{const c=i[l];Zs(c)&&c.forEach(u=>{a.children.push(s(u))})}),a};return lh(t)||(t=q_(t)),s(t)}function oj(t,{ignoreFieldNorm:e=Ue.ignoreFieldNorm}){t.forEach(n=>{let s=1;n.matches.forEach(({key:i,norm:o,score:r})=>{const a=i?i.weight:null;s*=Math.pow(r===0&&a?Number.EPSILON:r,(a||1)*(e?1:o))}),n.score=s})}function rj(t,e){const n=t.matches;e.matches=[],In(n)&&n.forEach(s=>{if(!In(s.indices)||!s.indices.length)return;const{indices:i,value:o}=s;let r={indices:i,value:o};s.key&&(r.key=s.key.src),s.idx>-1&&(r.refIndex=s.idx),e.matches.push(r)})}function aj(t,e){e.score=t.score}function lj(t,e,{includeMatches:n=Ue.includeMatches,includeScore:s=Ue.includeScore}={}){const i=[];return n&&i.push(rj),s&&i.push(aj),t.map(o=>{const{idx:r}=o,a={item:e[r],refIndex:r};return i.length&&i.forEach(l=>{l(o,a)}),a})}class Lr{constructor(e,n={},s){this.options={...Ue,...n},this.options.useExtendedSearch,this._keyStore=new OH(this.options.keys),this.setCollection(e,s)}setCollection(e,n){if(this._docs=e,n&&!(n instanceof Vf))throw new Error(EH);this._myIndex=n||u1(this.options.keys,this._docs,{getFn:this.options.getFn,fieldNormWeight:this.options.fieldNormWeight})}add(e){In(e)&&(this._docs.push(e),this._myIndex.add(e))}remove(e=()=>!1){const n=[];for(let s=0,i=this._docs.length;s-1&&(l=l.slice(0,n)),lj(l,this._docs,{includeMatches:s,includeScore:i})}_searchStringList(e){const n=rh(e,this.options),{records:s}=this._myIndex,i=[];return s.forEach(({v:o,i:r,n:a})=>{if(!In(o))return;const{isMatch:l,score:c,indices:u}=n.searchIn(o);l&&i.push({item:o,idx:r,matches:[{score:c,value:o,norm:a,indices:u}]})}),i}_searchLogical(e){const n=p1(e,this.options),s=(a,l,c)=>{if(!a.children){const{keyId:d,searcher:f}=a,g=this._findMatches({key:this._keyStore.get(d),value:this._myIndex.getValueForItemAtKeyId(l,d),searcher:f});return g&&g.length?[{idx:c,item:l,matches:g}]:[]}const u=[];for(let d=0,f=a.children.length;d{if(In(a)){let c=s(n,a,l);c.length&&(o[l]||(o[l]={idx:l,item:a,matches:[]},r.push(o[l])),c.forEach(({matches:u})=>{o[l].matches.push(...u)}))}}),r}_searchObjectList(e){const n=rh(e,this.options),{keys:s,records:i}=this._myIndex,o=[];return i.forEach(({$:r,i:a})=>{if(!In(r))return;let l=[];s.forEach((c,u)=>{l.push(...this._findMatches({key:c,value:r[u],searcher:n}))}),l.length&&o.push({idx:a,item:r,matches:l})}),o}_findMatches({key:e,value:n,searcher:s}){if(!In(n))return[];let i=[];if(Zs(n))n.forEach(({v:o,i:r,n:a})=>{if(!In(o))return;const{isMatch:l,score:c,indices:u}=s.searchIn(o);l&&i.push({score:c,key:e,value:o,idx:r,norm:a,indices:u})});else{const{v:o,n:r}=n,{isMatch:a,score:l,indices:c}=s.searchIn(o);a&&i.push({score:l,key:e,value:o,norm:r,indices:c})}return i}}Lr.version="7.0.0";Lr.createIndex=u1;Lr.parseIndex=HH;Lr.config=Ue;Lr.parseQuery=p1;nj(tj);const cj={name:"peerSettings",components:{LocaleText:Ge},props:{selectedPeer:Object},data(){return{data:void 0,dataChanged:!1,showKey:!1,saving:!1}},setup(){return{dashboardConfigurationStore:Xe()}},methods:{reset(){this.selectedPeer&&(this.data=JSON.parse(JSON.stringify(this.selectedPeer)),this.dataChanged=!1)},savePeer(){this.saving=!0,ht(`/api/updatePeerSettings/${this.$route.params.id}`,this.data,t=>{this.saving=!1,t.status?this.dashboardConfigurationStore.newMessage("Server","Peer saved","success"):this.dashboardConfigurationStore.newMessage("Server",t.message,"danger"),this.$emit("refresh")})},resetPeerData(t){this.saving=!0,ht(`/api/resetPeerData/${this.$route.params.id}`,{id:this.data.id,type:t},e=>{this.saving=!1,e.status?this.dashboardConfigurationStore.newMessage("Server","Peer data usage reset successfully","success"):this.dashboardConfigurationStore.newMessage("Server",e.message,"danger"),this.$emit("refresh")})}},beforeMount(){this.reset()},mounted(){this.$el.querySelectorAll("input").forEach(t=>{t.addEventListener("keyup",()=>{this.dataChanged=!0})})}},Rr=t=>(qt("data-v-2c571abb"),t=t(),Gt(),t),uj={class:"peerSettingContainer w-100 h-100 position-absolute top-0 start-0 overflow-y-scroll"},dj={class:"container d-flex h-100 w-100"},hj={class:"m-auto modal-dialog-centered dashboardModal"},fj={class:"card rounded-3 shadow flex-grow-1"},pj={class:"card-header bg-transparent d-flex align-items-center gap-2 border-0 p-4 pb-2"},gj={class:"mb-0"},mj={key:0,class:"card-body px-4 pb-4"},_j={class:"d-flex flex-column gap-2 mb-4"},bj={class:"d-flex align-items-center"},vj={class:"text-muted"},yj={class:"ms-auto"},wj={for:"peer_name_textbox",class:"form-label"},xj={class:"text-muted"},kj=["disabled"],Sj={class:"d-flex position-relative"},$j={for:"peer_private_key_textbox",class:"form-label"},Aj={class:"text-muted"},Cj=["type","disabled"],Ej={for:"peer_allowed_ip_textbox",class:"form-label"},Tj={class:"text-muted"},Pj=["disabled"],Mj={for:"peer_endpoint_allowed_ips",class:"form-label"},Dj={class:"text-muted"},Oj=["disabled"],Ij={for:"peer_DNS_textbox",class:"form-label"},Lj={class:"text-muted"},Rj=["disabled"],Nj={class:"accordion mt-3",id:"peerSettingsAccordion"},Fj={class:"accordion-item"},Bj={class:"accordion-header"},Vj={class:"accordion-button rounded-3 collapsed",type:"button","data-bs-toggle":"collapse","data-bs-target":"#peerSettingsAccordionOptional"},Hj={id:"peerSettingsAccordionOptional",class:"accordion-collapse collapse","data-bs-parent":"#peerSettingsAccordion"},jj={class:"accordion-body d-flex flex-column gap-2 mb-2"},Wj={for:"peer_preshared_key_textbox",class:"form-label"},zj={class:"text-muted"},Kj=["disabled"],Yj={for:"peer_mtu",class:"form-label"},Uj={class:"text-muted"},qj=["disabled"],Gj={for:"peer_keep_alive",class:"form-label"},Jj={class:"text-muted"},Xj=["disabled"],Qj=Rr(()=>h("hr",null,null,-1)),Zj={class:"d-flex gap-2 align-items-center"},eW={class:"d-flex gap-2 ms-auto"},tW=Rr(()=>h("i",{class:"bi bi-arrow-down-up me-2"},null,-1)),nW=Rr(()=>h("i",{class:"bi bi-arrow-down me-2"},null,-1)),sW=Rr(()=>h("i",{class:"bi bi-arrow-up me-2"},null,-1)),iW={class:"d-flex align-items-center gap-2"},oW=["disabled"],rW=Rr(()=>h("i",{class:"bi bi-arrow-clockwise ms-2"},null,-1)),aW=["disabled"],lW=Rr(()=>h("i",{class:"bi bi-save-fill ms-2"},null,-1));function cW(t,e,n,s,i,o){const r=ke("LocaleText");return C(),F("div",uj,[h("div",dj,[h("div",hj,[h("div",fj,[h("div",pj,[h("h4",gj,[N(r,{t:"Peer Settings"})]),h("button",{type:"button",class:"btn-close ms-auto",onClick:e[0]||(e[0]=a=>this.$emit("close"))})]),this.data?(C(),F("div",mj,[h("div",_j,[h("div",bj,[h("small",vj,[N(r,{t:"Public Key"})]),h("small",yj,[h("samp",null,xe(this.data.id),1)])]),h("div",null,[h("label",wj,[h("small",xj,[N(r,{t:"Name"})])]),Le(h("input",{type:"text",class:"form-control form-control-sm rounded-3",disabled:this.saving,"onUpdate:modelValue":e[1]||(e[1]=a=>this.data.name=a),id:"peer_name_textbox",placeholder:""},null,8,kj),[[We,this.data.name]])]),h("div",null,[h("div",Sj,[h("label",$j,[h("small",Aj,[N(r,{t:"Private Key"}),h("code",null,[N(r,{t:"(Required for QR Code and Download)"})])])]),h("a",{role:"button",class:"ms-auto text-decoration-none toggleShowKey",onClick:e[2]||(e[2]=a=>this.showKey=!this.showKey)},[h("i",{class:Ee(["bi",[this.showKey?"bi-eye-slash-fill":"bi-eye-fill"]])},null,2)])]),Le(h("input",{type:[this.showKey?"text":"password"],class:"form-control form-control-sm rounded-3",disabled:this.saving,"onUpdate:modelValue":e[3]||(e[3]=a=>this.data.private_key=a),id:"peer_private_key_textbox",style:{"padding-right":"40px"}},null,8,Cj),[[Wv,this.data.private_key]])]),h("div",null,[h("label",Ej,[h("small",Tj,[N(r,{t:"Allowed IPs"}),h("code",null,[N(r,{t:"(Required)"})])])]),Le(h("input",{type:"text",class:"form-control form-control-sm rounded-3",disabled:this.saving,"onUpdate:modelValue":e[4]||(e[4]=a=>this.data.allowed_ip=a),id:"peer_allowed_ip_textbox"},null,8,Pj),[[We,this.data.allowed_ip]])]),h("div",null,[h("label",Mj,[h("small",Dj,[N(r,{t:"Endpoint Allowed IPs"}),h("code",null,[N(r,{t:"(Required)"})])])]),Le(h("input",{type:"text",class:"form-control form-control-sm rounded-3",disabled:this.saving,"onUpdate:modelValue":e[5]||(e[5]=a=>this.data.endpoint_allowed_ip=a),id:"peer_endpoint_allowed_ips"},null,8,Oj),[[We,this.data.endpoint_allowed_ip]])]),h("div",null,[h("label",Ij,[h("small",Lj,[N(r,{t:"DNS"})])]),Le(h("input",{type:"text",class:"form-control form-control-sm rounded-3",disabled:this.saving,"onUpdate:modelValue":e[6]||(e[6]=a=>this.data.DNS=a),id:"peer_DNS_textbox"},null,8,Rj),[[We,this.data.DNS]])]),h("div",Nj,[h("div",Fj,[h("h2",Bj,[h("button",Vj,[N(r,{t:"Optional Settings"})])]),h("div",Hj,[h("div",jj,[h("div",null,[h("label",Wj,[h("small",zj,[N(r,{t:"Pre-Shared Key"})])]),Le(h("input",{type:"text",class:"form-control form-control-sm rounded-3",disabled:this.saving,"onUpdate:modelValue":e[7]||(e[7]=a=>this.data.preshared_key=a),id:"peer_preshared_key_textbox"},null,8,Kj),[[We,this.data.preshared_key]])]),h("div",null,[h("label",Yj,[h("small",Uj,[N(r,{t:"MTU"})])]),Le(h("input",{type:"number",class:"form-control form-control-sm rounded-3",disabled:this.saving,"onUpdate:modelValue":e[8]||(e[8]=a=>this.data.mtu=a),id:"peer_mtu"},null,8,qj),[[We,this.data.mtu]])]),h("div",null,[h("label",Gj,[h("small",Jj,[N(r,{t:"Persistent Keepalive"})])]),Le(h("input",{type:"number",class:"form-control form-control-sm rounded-3",disabled:this.saving,"onUpdate:modelValue":e[9]||(e[9]=a=>this.data.keepalive=a),id:"peer_keep_alive"},null,8,Xj),[[We,this.data.keepalive]])])])])])]),Qj,h("div",Zj,[h("strong",null,[N(r,{t:"Reset Data Usage"})]),h("div",eW,[h("button",{class:"btn bg-primary-subtle text-primary-emphasis rounded-3 flex-grow-1 shadow-sm",onClick:e[10]||(e[10]=a=>this.resetPeerData("total"))},[tW,N(r,{t:"Total"})]),h("button",{class:"btn bg-primary-subtle text-primary-emphasis rounded-3 flex-grow-1 shadow-sm",onClick:e[11]||(e[11]=a=>this.resetPeerData("receive"))},[nW,N(r,{t:"Received"})]),h("button",{class:"btn bg-primary-subtle text-primary-emphasis rounded-3 flex-grow-1 shadow-sm",onClick:e[12]||(e[12]=a=>this.resetPeerData("sent"))},[sW,N(r,{t:"Sent"})])])])]),h("div",iW,[h("button",{class:"btn btn-secondary rounded-3 shadow",onClick:e[13]||(e[13]=a=>this.reset()),disabled:!this.dataChanged||this.saving},[N(r,{t:"Revert"}),rW],8,oW),h("button",{class:"ms-auto btn btn-dark btn-brand rounded-3 px-3 py-2 shadow",disabled:!this.dataChanged||this.saving,onClick:e[14]||(e[14]=a=>this.savePeer())},[N(r,{t:"Save Peer"}),lW],8,aW)])])):re("",!0)])])])])}const uW=je(cj,[["render",cW],["__scopeId","data-v-2c571abb"]]);var Io={},dW=function(){return typeof Promise=="function"&&Promise.prototype&&Promise.prototype.then},g1={},Bn={};let Hf;const hW=[0,26,44,70,100,134,172,196,242,292,346,404,466,532,581,655,733,815,901,991,1085,1156,1258,1364,1474,1588,1706,1828,1921,2051,2185,2323,2465,2611,2761,2876,3034,3196,3362,3532,3706];Bn.getSymbolSize=function(e){if(!e)throw new Error('"version" cannot be null or undefined');if(e<1||e>40)throw new Error('"version" should be in range from 1 to 40');return e*4+17};Bn.getSymbolTotalCodewords=function(e){return hW[e]};Bn.getBCHDigit=function(t){let e=0;for(;t!==0;)e++,t>>>=1;return e};Bn.setToSJISFunction=function(e){if(typeof e!="function")throw new Error('"toSJISFunc" is not a valid function.');Hf=e};Bn.isKanjiModeEnabled=function(){return typeof Hf<"u"};Bn.toSJIS=function(e){return Hf(e)};var ru={};(function(t){t.L={bit:1},t.M={bit:0},t.Q={bit:3},t.H={bit:2};function e(n){if(typeof n!="string")throw new Error("Param is not a string");switch(n.toLowerCase()){case"l":case"low":return t.L;case"m":case"medium":return t.M;case"q":case"quartile":return t.Q;case"h":case"high":return t.H;default:throw new Error("Unknown EC Level: "+n)}}t.isValid=function(s){return s&&typeof s.bit<"u"&&s.bit>=0&&s.bit<4},t.from=function(s,i){if(t.isValid(s))return s;try{return e(s)}catch{return i}}})(ru);function m1(){this.buffer=[],this.length=0}m1.prototype={get:function(t){const e=Math.floor(t/8);return(this.buffer[e]>>>7-t%8&1)===1},put:function(t,e){for(let n=0;n>>e-n-1&1)===1)},getLengthInBits:function(){return this.length},putBit:function(t){const e=Math.floor(this.length/8);this.buffer.length<=e&&this.buffer.push(0),t&&(this.buffer[e]|=128>>>this.length%8),this.length++}};var fW=m1;function nl(t){if(!t||t<1)throw new Error("BitMatrix size must be defined and greater than 0");this.size=t,this.data=new Uint8Array(t*t),this.reservedBit=new Uint8Array(t*t)}nl.prototype.set=function(t,e,n,s){const i=t*this.size+e;this.data[i]=n,s&&(this.reservedBit[i]=!0)};nl.prototype.get=function(t,e){return this.data[t*this.size+e]};nl.prototype.xor=function(t,e,n){this.data[t*this.size+e]^=n};nl.prototype.isReserved=function(t,e){return this.reservedBit[t*this.size+e]};var pW=nl,_1={};(function(t){const e=Bn.getSymbolSize;t.getRowColCoords=function(s){if(s===1)return[];const i=Math.floor(s/7)+2,o=e(s),r=o===145?26:Math.ceil((o-13)/(2*i-2))*2,a=[o-7];for(let l=1;l=0&&i<=7},t.from=function(i){return t.isValid(i)?parseInt(i,10):void 0},t.getPenaltyN1=function(i){const o=i.size;let r=0,a=0,l=0,c=null,u=null;for(let d=0;d=5&&(r+=e.N1+(a-5)),c=g,a=1),g=i.get(f,d),g===u?l++:(l>=5&&(r+=e.N1+(l-5)),u=g,l=1)}a>=5&&(r+=e.N1+(a-5)),l>=5&&(r+=e.N1+(l-5))}return r},t.getPenaltyN2=function(i){const o=i.size;let r=0;for(let a=0;a=10&&(a===1488||a===93)&&r++,l=l<<1&2047|i.get(u,c),u>=10&&(l===1488||l===93)&&r++}return r*e.N3},t.getPenaltyN4=function(i){let o=0;const r=i.data.length;for(let l=0;l=0;){const r=o[0];for(let l=0;l0){const o=new Uint8Array(this.degree);return o.set(s,i),o}return s};var mW=jf,x1={},zi={},Wf={};Wf.isValid=function(e){return!isNaN(e)&&e>=1&&e<=40};var Ms={};const k1="[0-9]+",_W="[A-Z $%*+\\-./:]+";let Wa="(?:[u3000-u303F]|[u3040-u309F]|[u30A0-u30FF]|[uFF00-uFFEF]|[u4E00-u9FAF]|[u2605-u2606]|[u2190-u2195]|u203B|[u2010u2015u2018u2019u2025u2026u201Cu201Du2225u2260]|[u0391-u0451]|[u00A7u00A8u00B1u00B4u00D7u00F7])+";Wa=Wa.replace(/u/g,"\\u");const bW="(?:(?![A-Z0-9 $%*+\\-./:]|"+Wa+`)(?:.|[\r -]))+`;Ms.KANJI=new RegExp(Wa,"g");Ms.BYTE_KANJI=new RegExp("[^A-Z0-9 $%*+\\-./:]+","g");Ms.BYTE=new RegExp(bW,"g");Ms.NUMERIC=new RegExp(k1,"g");Ms.ALPHANUMERIC=new RegExp(_W,"g");const vW=new RegExp("^"+Wa+"$"),yW=new RegExp("^"+k1+"$"),wW=new RegExp("^[A-Z0-9 $%*+\\-./:]+$");Ms.testKanji=function(e){return vW.test(e)};Ms.testNumeric=function(e){return yW.test(e)};Ms.testAlphanumeric=function(e){return wW.test(e)};(function(t){const e=Wf,n=Ms;t.NUMERIC={id:"Numeric",bit:1,ccBits:[10,12,14]},t.ALPHANUMERIC={id:"Alphanumeric",bit:2,ccBits:[9,11,13]},t.BYTE={id:"Byte",bit:4,ccBits:[8,16,16]},t.KANJI={id:"Kanji",bit:8,ccBits:[8,10,12]},t.MIXED={bit:-1},t.getCharCountIndicator=function(o,r){if(!o.ccBits)throw new Error("Invalid mode: "+o);if(!e.isValid(r))throw new Error("Invalid version: "+r);return r>=1&&r<10?o.ccBits[0]:r<27?o.ccBits[1]:o.ccBits[2]},t.getBestModeForData=function(o){return n.testNumeric(o)?t.NUMERIC:n.testAlphanumeric(o)?t.ALPHANUMERIC:n.testKanji(o)?t.KANJI:t.BYTE},t.toString=function(o){if(o&&o.id)return o.id;throw new Error("Invalid mode")},t.isValid=function(o){return o&&o.bit&&o.ccBits};function s(i){if(typeof i!="string")throw new Error("Param is not a string");switch(i.toLowerCase()){case"numeric":return t.NUMERIC;case"alphanumeric":return t.ALPHANUMERIC;case"kanji":return t.KANJI;case"byte":return t.BYTE;default:throw new Error("Unknown mode: "+i)}}t.from=function(o,r){if(t.isValid(o))return o;try{return s(o)}catch{return r}}})(zi);(function(t){const e=Bn,n=au,s=ru,i=zi,o=Wf,r=7973,a=e.getBCHDigit(r);function l(f,g,_){for(let m=1;m<=40;m++)if(g<=t.getCapacity(m,_,f))return m}function c(f,g){return i.getCharCountIndicator(f,g)+4}function u(f,g){let _=0;return f.forEach(function(m){const y=c(m.mode,g);_+=y+m.getBitsLength()}),_}function d(f,g){for(let _=1;_<=40;_++)if(u(f,_)<=t.getCapacity(_,g,i.MIXED))return _}t.from=function(g,_){return o.isValid(g)?parseInt(g,10):_},t.getCapacity=function(g,_,m){if(!o.isValid(g))throw new Error("Invalid QR Code version");typeof m>"u"&&(m=i.BYTE);const y=e.getSymbolTotalCodewords(g),v=n.getTotalCodewordsCount(g,_),$=(y-v)*8;if(m===i.MIXED)return $;const A=$-c(m,g);switch(m){case i.NUMERIC:return Math.floor(A/10*3);case i.ALPHANUMERIC:return Math.floor(A/11*2);case i.KANJI:return Math.floor(A/13);case i.BYTE:default:return Math.floor(A/8)}},t.getBestVersionForData=function(g,_){let m;const y=s.from(_,s.M);if(Array.isArray(g)){if(g.length>1)return d(g,y);if(g.length===0)return 1;m=g[0]}else m=g;return l(m.mode,m.getLength(),y)},t.getEncodedBits=function(g){if(!o.isValid(g)||g<7)throw new Error("Invalid QR Code version");let _=g<<12;for(;e.getBCHDigit(_)-a>=0;)_^=r<=0;)i^=$1<0&&(s=this.data.substr(n),i=parseInt(s,10),e.put(i,o*3+1))};var SW=Ar;const $W=zi,pd=["0","1","2","3","4","5","6","7","8","9","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"," ","$","%","*","+","-",".","/",":"];function Cr(t){this.mode=$W.ALPHANUMERIC,this.data=t}Cr.getBitsLength=function(e){return 11*Math.floor(e/2)+6*(e%2)};Cr.prototype.getLength=function(){return this.data.length};Cr.prototype.getBitsLength=function(){return Cr.getBitsLength(this.data.length)};Cr.prototype.write=function(e){let n;for(n=0;n+2<=this.data.length;n+=2){let s=pd.indexOf(this.data[n])*45;s+=pd.indexOf(this.data[n+1]),e.put(s,11)}this.data.length%2&&e.put(pd.indexOf(this.data[n]),6)};var AW=Cr,CW=function(e){for(var n=[],s=e.length,i=0;i=55296&&o<=56319&&s>i+1){var r=e.charCodeAt(i+1);r>=56320&&r<=57343&&(o=(o-55296)*1024+r-56320+65536,i+=1)}if(o<128){n.push(o);continue}if(o<2048){n.push(o>>6|192),n.push(o&63|128);continue}if(o<55296||o>=57344&&o<65536){n.push(o>>12|224),n.push(o>>6&63|128),n.push(o&63|128);continue}if(o>=65536&&o<=1114111){n.push(o>>18|240),n.push(o>>12&63|128),n.push(o>>6&63|128),n.push(o&63|128);continue}n.push(239,191,189)}return new Uint8Array(n).buffer};const EW=CW,TW=zi;function Er(t){this.mode=TW.BYTE,typeof t=="string"&&(t=EW(t)),this.data=new Uint8Array(t)}Er.getBitsLength=function(e){return e*8};Er.prototype.getLength=function(){return this.data.length};Er.prototype.getBitsLength=function(){return Er.getBitsLength(this.data.length)};Er.prototype.write=function(t){for(let e=0,n=this.data.length;e=33088&&n<=40956)n-=33088;else if(n>=57408&&n<=60351)n-=49472;else throw new Error("Invalid SJIS character: "+this.data[e]+` -Make sure your charset is UTF-8`);n=(n>>>8&255)*192+(n&255),t.put(n,13)}};var OW=Tr,C1={exports:{}};(function(t){var e={single_source_shortest_paths:function(n,s,i){var o={},r={};r[s]=0;var a=e.PriorityQueue.make();a.push(s,0);for(var l,c,u,d,f,g,_,m,y;!a.empty();){l=a.pop(),c=l.value,d=l.cost,f=n[c]||{};for(u in f)f.hasOwnProperty(u)&&(g=f[u],_=d+g,m=r[u],y=typeof r[u]>"u",(y||m>_)&&(r[u]=_,a.push(u,_),o[u]=c))}if(typeof i<"u"&&typeof r[i]>"u"){var v=["Could not find a path from ",s," to ",i,"."].join("");throw new Error(v)}return o},extract_shortest_path_from_predecessor_list:function(n,s){for(var i=[],o=s;o;)i.push(o),n[o],o=n[o];return i.reverse(),i},find_path:function(n,s,i){var o=e.single_source_shortest_paths(n,s,i);return e.extract_shortest_path_from_predecessor_list(o,i)},PriorityQueue:{make:function(n){var s=e.PriorityQueue,i={},o;n=n||{};for(o in s)s.hasOwnProperty(o)&&(i[o]=s[o]);return i.queue=[],i.sorter=n.sorter||s.default_sorter,i},default_sorter:function(n,s){return n.cost-s.cost},push:function(n,s){var i={value:n,cost:s};this.queue.push(i),this.queue.sort(this.sorter)},pop:function(){return this.queue.shift()},empty:function(){return this.queue.length===0}}};t.exports=e})(C1);var IW=C1.exports;(function(t){const e=zi,n=SW,s=AW,i=PW,o=OW,r=Ms,a=Bn,l=IW;function c(v){return unescape(encodeURIComponent(v)).length}function u(v,$,A){const D=[];let x;for(;(x=v.exec(A))!==null;)D.push({data:x[0],index:x.index,mode:$,length:x[0].length});return D}function d(v){const $=u(r.NUMERIC,e.NUMERIC,v),A=u(r.ALPHANUMERIC,e.ALPHANUMERIC,v);let D,x;return a.isKanjiModeEnabled()?(D=u(r.BYTE,e.BYTE,v),x=u(r.KANJI,e.KANJI,v)):(D=u(r.BYTE_KANJI,e.BYTE,v),x=[]),$.concat(A,D,x).sort(function(S,T){return S.index-T.index}).map(function(S){return{data:S.data,mode:S.mode,length:S.length}})}function f(v,$){switch($){case e.NUMERIC:return n.getBitsLength(v);case e.ALPHANUMERIC:return s.getBitsLength(v);case e.KANJI:return o.getBitsLength(v);case e.BYTE:return i.getBitsLength(v)}}function g(v){return v.reduce(function($,A){const D=$.length-1>=0?$[$.length-1]:null;return D&&D.mode===A.mode?($[$.length-1].data+=A.data,$):($.push(A),$)},[])}function _(v){const $=[];for(let A=0;A=0&&a<=6&&(l===0||l===6)||l>=0&&l<=6&&(a===0||a===6)||a>=2&&a<=4&&l>=2&&l<=4?t.set(o+a,r+l,!0,!0):t.set(o+a,r+l,!1,!0))}}function WW(t){const e=t.size;for(let n=8;n>a&1)===1,t.set(i,o,r,!0),t.set(o,i,r,!0)}function _d(t,e,n){const s=t.size,i=VW.getEncodedBits(e,n);let o,r;for(o=0;o<15;o++)r=(i>>o&1)===1,o<6?t.set(o,8,r,!0):o<8?t.set(o+1,8,r,!0):t.set(s-15+o,8,r,!0),o<8?t.set(8,s-o-1,r,!0):o<9?t.set(8,15-o-1+1,r,!0):t.set(8,15-o-1,r,!0);t.set(s-8,8,1,!0)}function YW(t,e){const n=t.size;let s=-1,i=n-1,o=7,r=0;for(let a=n-1;a>0;a-=2)for(a===6&&a--;;){for(let l=0;l<2;l++)if(!t.isReserved(i,a-l)){let c=!1;r>>o&1)===1),t.set(i,a-l,c),o--,o===-1&&(r++,o=7)}if(i+=s,i<0||n<=i){i-=s,s=-s;break}}}function UW(t,e,n){const s=new LW;n.forEach(function(l){s.put(l.mode.bit,4),s.put(l.getLength(),HW.getCharCountIndicator(l.mode,t)),l.write(s)});const i=cu.getSymbolTotalCodewords(t),o=dh.getTotalCodewordsCount(t,e),r=(i-o)*8;for(s.getLengthInBits()+4<=r&&s.put(0,4);s.getLengthInBits()%8!==0;)s.putBit(0);const a=(r-s.getLengthInBits())/8;for(let l=0;lC+w.before.length+w.lines.length+w.after.length,0);if(v+=t.beforeBody.length+t.afterBody.length,d&&(m+=d*c.lineHeight+(d-1)*e.titleSpacing+e.titleMarginBottom),v){const C=e.displayColors?Math.max(a,l.lineHeight):l.lineHeight;m+=f*C+(v-f)*l.lineHeight+(v-1)*e.bodySpacing}h&&(m+=e.footerMarginTop+h*u.lineHeight+(h-1)*e.footerSpacing);let b=0;const E=function(C){y=Math.max(y,n.measureText(C).width+b)};return n.save(),n.font=c.string,Ct(t.title,E),n.font=l.string,Ct(t.beforeBody.concat(t.afterBody),E),b=e.displayColors?o+2+e.boxPadding:0,Ct(i,C=>{Ct(C.before,E),Ct(C.lines,E),Ct(C.after,E)}),b=0,n.font=u.string,Ct(t.footer,E),n.restore(),y+=p.width,{width:y,height:m}}function tG(t,e){const{y:n,height:i}=e;return nt.height-i/2?"bottom":"center"}function nG(t,e,n,i){const{x:s,width:r}=i,o=n.caretSize+n.caretPadding;if(t==="left"&&s+r+o>e.width||t==="right"&&s-r-o<0)return!0}function iG(t,e,n,i){const{x:s,width:r}=n,{width:o,chartArea:{left:a,right:l}}=t;let c="center";return i==="center"?c=s<=(a+l)/2?"left":"right":s<=r/2?c="left":s>=o-r/2&&(c="right"),nG(c,t,e,n)&&(c="center"),c}function B1(t,e,n){const i=n.yAlign||e.yAlign||tG(t,n);return{xAlign:n.xAlign||e.xAlign||iG(t,e,n,i),yAlign:i}}function sG(t,e){let{x:n,width:i}=t;return e==="right"?n-=i:e==="center"&&(n-=i/2),n}function rG(t,e,n){let{y:i,height:s}=t;return e==="top"?i+=n:e==="bottom"?i-=s+n:i-=s/2,i}function V1(t,e,n,i){const{caretSize:s,caretPadding:r,cornerRadius:o}=t,{xAlign:a,yAlign:l}=n,c=s+r,{topLeft:u,topRight:d,bottomLeft:h,bottomRight:f}=ia(o);let p=sG(e,a);const m=rG(e,l,c);return l==="center"?a==="left"?p+=c:a==="right"&&(p-=c):a==="left"?p-=Math.max(u,h)+s:a==="right"&&(p+=Math.max(d,f)+s),{x:Pn(p,0,i.width-e.width),y:Pn(m,0,i.height-e.height)}}function $d(t,e,n){const i=Kn(n.padding);return e==="center"?t.x+t.width/2:e==="right"?t.x+t.width-i.right:t.x+i.left}function z1(t){return ys([],qs(t))}function oG(t,e,n){return yo(t,{tooltip:e,tooltipItems:n,type:"tooltip"})}function W1(t,e){const n=e&&e.dataset&&e.dataset.tooltip&&e.dataset.tooltip.callbacks;return n?t.override(n):t}const dT={beforeTitle:js,title(t){if(t.length>0){const e=t[0],n=e.chart.data.labels,i=n?n.length:0;if(this&&this.options&&this.options.mode==="dataset")return e.dataset.label||"";if(e.label)return e.label;if(i>0&&e.dataIndex"u"?dT[e].call(n,i):s}class H1 extends vr{static positioners=Sc;constructor(e){super(),this.opacity=0,this._active=[],this._eventPosition=void 0,this._size=void 0,this._cachedAnimations=void 0,this._tooltipItems=[],this.$animations=void 0,this.$context=void 0,this.chart=e.chart,this.options=e.options,this.dataPoints=void 0,this.title=void 0,this.beforeBody=void 0,this.body=void 0,this.afterBody=void 0,this.footer=void 0,this.xAlign=void 0,this.yAlign=void 0,this.x=void 0,this.y=void 0,this.height=void 0,this.width=void 0,this.caretX=void 0,this.caretY=void 0,this.labelColors=void 0,this.labelPointStyles=void 0,this.labelTextColors=void 0}initialize(e){this.options=e,this._cachedAnimations=void 0,this.$context=void 0}_resolveAnimations(){const e=this._cachedAnimations;if(e)return e;const n=this.chart,i=this.options.setContext(this.getContext()),s=i.enabled&&n.options.animation&&i.animations,r=new WC(this.chart,s);return s._cacheable&&(this._cachedAnimations=Object.freeze(r)),r}getContext(){return this.$context||(this.$context=oG(this.chart.getContext(),this,this._tooltipItems))}getTitle(e,n){const{callbacks:i}=n,s=ai(i,"beforeTitle",this,e),r=ai(i,"title",this,e),o=ai(i,"afterTitle",this,e);let a=[];return a=ys(a,qs(s)),a=ys(a,qs(r)),a=ys(a,qs(o)),a}getBeforeBody(e,n){return z1(ai(n.callbacks,"beforeBody",this,e))}getBody(e,n){const{callbacks:i}=n,s=[];return Ct(e,r=>{const o={before:[],lines:[],after:[]},a=W1(i,r);ys(o.before,qs(ai(a,"beforeLabel",this,r))),ys(o.lines,ai(a,"label",this,r)),ys(o.after,qs(ai(a,"afterLabel",this,r))),s.push(o)}),s}getAfterBody(e,n){return z1(ai(n.callbacks,"afterBody",this,e))}getFooter(e,n){const{callbacks:i}=n,s=ai(i,"beforeFooter",this,e),r=ai(i,"footer",this,e),o=ai(i,"afterFooter",this,e);let a=[];return a=ys(a,qs(s)),a=ys(a,qs(r)),a=ys(a,qs(o)),a}_createItems(e){const n=this._active,i=this.chart.data,s=[],r=[],o=[];let a=[],l,c;for(l=0,c=n.length;le.filter(u,d,h,i))),e.itemSort&&(a=a.sort((u,d)=>e.itemSort(u,d,i))),Ct(a,u=>{const d=W1(e.callbacks,u);s.push(ai(d,"labelColor",this,u)),r.push(ai(d,"labelPointStyle",this,u)),o.push(ai(d,"labelTextColor",this,u))}),this.labelColors=s,this.labelPointStyles=r,this.labelTextColors=o,this.dataPoints=a,a}update(e,n){const i=this.options.setContext(this.getContext()),s=this._active;let r,o=[];if(!s.length)this.opacity!==0&&(r={opacity:0});else{const a=Sc[i.position].call(this,s,this._eventPosition);o=this._createItems(i),this.title=this.getTitle(o,i),this.beforeBody=this.getBeforeBody(o,i),this.body=this.getBody(o,i),this.afterBody=this.getAfterBody(o,i),this.footer=this.getFooter(o,i);const l=this._size=F1(this,i),c=Object.assign({},a,l),u=B1(this.chart,i,c),d=V1(i,c,u,this.chart);this.xAlign=u.xAlign,this.yAlign=u.yAlign,r={opacity:1,x:d.x,y:d.y,width:l.width,height:l.height,caretX:a.x,caretY:a.y}}this._tooltipItems=o,this.$context=void 0,r&&this._resolveAnimations().update(this,r),e&&i.external&&i.external.call(this,{chart:this.chart,tooltip:this,replay:n})}drawCaret(e,n,i,s){const r=this.getCaretPosition(e,i,s);n.lineTo(r.x1,r.y1),n.lineTo(r.x2,r.y2),n.lineTo(r.x3,r.y3)}getCaretPosition(e,n,i){const{xAlign:s,yAlign:r}=this,{caretSize:o,cornerRadius:a}=i,{topLeft:l,topRight:c,bottomLeft:u,bottomRight:d}=ia(a),{x:h,y:f}=e,{width:p,height:m}=n;let y,v,b,E,C,w;return r==="center"?(C=f+m/2,s==="left"?(y=h,v=y-o,E=C+o,w=C-o):(y=h+p,v=y+o,E=C-o,w=C+o),b=y):(s==="left"?v=h+Math.max(l,u)+o:s==="right"?v=h+p-Math.max(c,d)-o:v=this.caretX,r==="top"?(E=f,C=E-o,y=v-o,b=v+o):(E=f+m,C=E+o,y=v+o,b=v-o),w=E),{x1:y,x2:v,x3:b,y1:E,y2:C,y3:w}}drawTitle(e,n,i){const s=this.title,r=s.length;let o,a,l;if(r){const c=ol(i.rtl,this.x,this.width);for(e.x=$d(this,i.titleAlign,i),n.textAlign=c.textAlign(i.titleAlign),n.textBaseline="middle",o=vn(i.titleFont),a=i.titleSpacing,n.fillStyle=i.titleColor,n.font=o.string,l=0;lb!==0)?(e.beginPath(),e.fillStyle=r.multiKeyBackground,hu(e,{x:m,y:p,w:c,h:l,radius:v}),e.fill(),e.stroke(),e.fillStyle=o.backgroundColor,e.beginPath(),hu(e,{x:y,y:p+1,w:c-2,h:l-2,radius:v}),e.fill()):(e.fillStyle=r.multiKeyBackground,e.fillRect(m,p,c,l),e.strokeRect(m,p,c,l),e.fillStyle=o.backgroundColor,e.fillRect(y,p+1,c-2,l-2))}e.fillStyle=this.labelTextColors[i]}drawBody(e,n,i){const{body:s}=this,{bodySpacing:r,bodyAlign:o,displayColors:a,boxHeight:l,boxWidth:c,boxPadding:u}=i,d=vn(i.bodyFont);let h=d.lineHeight,f=0;const p=ol(i.rtl,this.x,this.width),m=function(k){n.fillText(k,p.x(e.x+f),e.y+h/2),e.y+=h+r},y=p.textAlign(o);let v,b,E,C,w,x,T;for(n.textAlign=o,n.textBaseline="middle",n.font=d.string,e.x=$d(this,y,i),n.fillStyle=i.bodyColor,Ct(this.beforeBody,m),f=a&&y!=="right"?o==="center"?c/2+u:c+2+u:0,C=0,x=s.length;C0&&n.stroke()}_updateAnimationTarget(e){const n=this.chart,i=this.$animations,s=i&&i.x,r=i&&i.y;if(s||r){const o=Sc[e.position].call(this,this._active,this._eventPosition);if(!o)return;const a=this._size=F1(this,e),l=Object.assign({},o,this._size),c=B1(n,e,l),u=V1(e,l,c,n);(s._to!==u.x||r._to!==u.y)&&(this.xAlign=c.xAlign,this.yAlign=c.yAlign,this.width=a.width,this.height=a.height,this.caretX=o.x,this.caretY=o.y,this._resolveAnimations().update(this,u))}}_willRender(){return!!this.opacity}draw(e){const n=this.options.setContext(this.getContext());let i=this.opacity;if(!i)return;this._updateAnimationTarget(n);const s={width:this.width,height:this.height},r={x:this.x,y:this.y};i=Math.abs(i)<.001?0:i;const o=Kn(n.padding),a=this.title.length||this.beforeBody.length||this.body.length||this.afterBody.length||this.footer.length;n.enabled&&a&&(e.save(),e.globalAlpha=i,this.drawBackground(r,e,s,n),NC(e,n.textDirection),r.y+=o.top,this.drawTitle(r,e,n),this.drawBody(r,e,n),this.drawFooter(r,e,n),FC(e,n.textDirection),e.restore())}getActiveElements(){return this._active||[]}setActiveElements(e,n){const i=this._active,s=e.map(({datasetIndex:a,index:l})=>{const c=this.chart.getDatasetMeta(a);if(!c)throw new Error("Cannot find a dataset at index "+a);return{datasetIndex:a,element:c.data[l],index:l}}),r=!wh(i,s),o=this._positionChanged(s,n);(r||o)&&(this._active=s,this._eventPosition=n,this._ignoreReplayEvents=!0,this.update(!0))}handleEvent(e,n,i=!0){if(n&&this._ignoreReplayEvents)return!1;this._ignoreReplayEvents=!1;const s=this.options,r=this._active||[],o=this._getActiveElements(e,r,n,i),a=this._positionChanged(o,e),l=n||!wh(o,r)||a;return l&&(this._active=o,(s.enabled||s.external)&&(this._eventPosition={x:e.x,y:e.y},this.update(!0,n))),l}_getActiveElements(e,n,i,s){const r=this.options;if(e.type==="mouseout")return[];if(!s)return n.filter(a=>this.chart.data.datasets[a.datasetIndex]&&this.chart.getDatasetMeta(a.datasetIndex).controller.getParsed(a.index)!==void 0);const o=this.chart.getElementsAtEventForMode(e,r.mode,r,i);return r.reverse&&o.reverse(),o}_positionChanged(e,n){const{caretX:i,caretY:s,options:r}=this,o=Sc[r.position].call(this,e,n);return o!==!1&&(i!==o.x||s!==o.y)}}var aG={id:"tooltip",_element:H1,positioners:Sc,afterInit(t,e,n){n&&(t.tooltip=new H1({chart:t,options:n}))},beforeUpdate(t,e,n){t.tooltip&&t.tooltip.initialize(n)},reset(t,e,n){t.tooltip&&t.tooltip.initialize(n)},afterDraw(t){const e=t.tooltip;if(e&&e._willRender()){const n={tooltip:e};if(t.notifyPlugins("beforeTooltipDraw",{...n,cancelable:!0})===!1)return;e.draw(t.ctx),t.notifyPlugins("afterTooltipDraw",n)}},afterEvent(t,e){if(t.tooltip){const n=e.replay;t.tooltip.handleEvent(e.event,n,e.inChartArea)&&(e.changed=!0)}},defaults:{enabled:!0,external:null,position:"average",backgroundColor:"rgba(0,0,0,0.8)",titleColor:"#fff",titleFont:{weight:"bold"},titleSpacing:2,titleMarginBottom:6,titleAlign:"left",bodyColor:"#fff",bodySpacing:2,bodyFont:{},bodyAlign:"left",footerColor:"#fff",footerSpacing:2,footerMarginTop:6,footerFont:{weight:"bold"},footerAlign:"left",padding:6,caretPadding:2,caretSize:5,cornerRadius:6,boxHeight:(t,e)=>e.bodyFont.size,boxWidth:(t,e)=>e.bodyFont.size,multiKeyBackground:"#fff",displayColors:!0,boxPadding:0,borderColor:"rgba(0,0,0,0)",borderWidth:0,animation:{duration:400,easing:"easeOutQuart"},animations:{numbers:{type:"number",properties:["x","y","width","height","caretX","caretY"]},opacity:{easing:"linear",duration:200}},callbacks:dT},defaultRoutes:{bodyFont:"font",footerFont:"font",titleFont:"font"},descriptors:{_scriptable:t=>t!=="filter"&&t!=="itemSort"&&t!=="external",_indexable:!1,callbacks:{_scriptable:!1,_indexable:!1},animation:{_fallback:!1},animations:{_fallback:"animation"}},additionalOptionScopes:["interaction"]};const lG=(t,e,n,i)=>(typeof e=="string"?(n=t.push(e)-1,i.unshift({index:n,label:e})):isNaN(e)&&(n=null),n);function cG(t,e,n,i){const s=t.indexOf(e);if(s===-1)return lG(t,e,n,i);const r=t.lastIndexOf(e);return s!==r?n:s}const uG=(t,e)=>t===null?null:Pn(Math.round(t),0,e);function Y1(t){const e=this.getLabels();return t>=0&&tn.length-1?null:this.getPixelForValue(n[e].value)}getValueForPixel(e){return Math.round(this._startValue+this.getDecimalForPixel(e)*this._valueRange)}getBasePixel(){return this.bottom}}function hG(t,e){const n=[],{bounds:s,step:r,min:o,max:a,precision:l,count:c,maxTicks:u,maxDigits:d,includeBounds:h}=t,f=r||1,p=u-1,{min:m,max:y}=e,v=!gt(o),b=!gt(a),E=!gt(c),C=(y-m)/(d+1);let w=Bb((y-m)/p/f)*f,x,T,k,A;if(w<1e-14&&!v&&!b)return[{value:m},{value:y}];A=Math.ceil(y/w)-Math.floor(m/w),A>p&&(w=Bb(A*w/p/f)*f),gt(l)||(x=Math.pow(10,l),w=Math.ceil(w*x)/x),s==="ticks"?(T=Math.floor(m/w)*w,k=Math.ceil(y/w)*w):(T=m,k=y),v&&b&&r&&aY((a-o)/r,w/1e3)?(A=Math.round(Math.min((a-o)/w,u)),w=(a-o)/A,T=o,k=a):E?(T=v?o:T,k=b?a:k,A=c-1,w=(k-T)/A):(A=(k-T)/w,Yc(A,Math.round(A),w/1e3)?A=Math.round(A):A=Math.ceil(A));const P=Math.max(Vb(w),Vb(T));x=Math.pow(10,gt(l)?P:l),T=Math.round(T*x)/x,k=Math.round(k*x)/x;let F=0;for(v&&(h&&T!==o?(n.push({value:o}),Ta)break;n.push({value:H})}return b&&h&&k!==a?n.length&&Yc(n[n.length-1].value,a,j1(a,C,t))?n[n.length-1].value=a:n.push({value:a}):(!b||k===a)&&n.push({value:k}),n}function j1(t,e,{horizontal:n,minRotation:i}){const s=as(i),r=(n?Math.sin(s):Math.cos(s))||.001,o=.75*e*(""+t).length;return Math.min(e/r,o)}class Ah extends ya{constructor(e){super(e),this.start=void 0,this.end=void 0,this._startValue=void 0,this._endValue=void 0,this._valueRange=0}parse(e,n){return gt(e)||(typeof e=="number"||e instanceof Number)&&!isFinite(+e)?null:+e}handleTickRangeOptions(){const{beginAtZero:e}=this.options,{minDefined:n,maxDefined:i}=this.getUserBounds();let{min:s,max:r}=this;const o=l=>s=n?s:l,a=l=>r=i?r:l;if(e){const l=Ds(s),c=Ds(r);l<0&&c<0?a(0):l>0&&c>0&&o(0)}if(s===r){let l=r===0?1:Math.abs(r*.05);a(r+l),e||o(s-l)}this.min=s,this.max=r}getTickLimit(){const e=this.options.ticks;let{maxTicksLimit:n,stepSize:i}=e,s;return i?(s=Math.ceil(this.max/i)-Math.floor(this.min/i)+1,s>1e3&&(console.warn(`scales.${this.id}.ticks.stepSize: ${i} would result generating up to ${s} ticks. Limiting to 1000.`),s=1e3)):(s=this.computeTickLimit(),n=n||11),n&&(s=Math.min(n,s)),s}computeTickLimit(){return Number.POSITIVE_INFINITY}buildTicks(){const e=this.options,n=e.ticks;let i=this.getTickLimit();i=Math.max(2,i);const s={maxTicks:i,bounds:e.bounds,min:e.min,max:e.max,precision:n.precision,step:n.stepSize,count:n.count,maxDigits:this._maxDigits(),horizontal:this.isHorizontal(),minRotation:n.minRotation||0,includeBounds:n.includeBounds!==!1},r=this._range||this,o=hG(s,r);return e.bounds==="ticks"&&bC(o,this,"value"),e.reverse?(o.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),o}configure(){const e=this.ticks;let n=this.min,i=this.max;if(super.configure(),this.options.offset&&e.length){const s=(i-n)/Math.max(e.length-1,1)/2;n-=s,i+=s}this._startValue=n,this._endValue=i,this._valueRange=i-n}getLabelForValue(e){return Wu(e,this.chart.options.locale,this.options.ticks.format)}}class fG extends Ah{static id="linear";static defaults={ticks:{callback:xf.formatters.numeric}};determineDataLimits(){const{min:e,max:n}=this.getMinMax(!0);this.min=qt(e)?e:0,this.max=qt(n)?n:1,this.handleTickRangeOptions()}computeTickLimit(){const e=this.isHorizontal(),n=e?this.width:this.height,i=as(this.options.ticks.minRotation),s=(e?Math.sin(i):Math.cos(i))||.001,r=this._resolveTickFontOptions(0);return Math.ceil(n/Math.min(40,r.lineHeight/s))}getPixelForValue(e){return e===null?NaN:this.getPixelForDecimal((e-this._startValue)/this._valueRange)}getValueForPixel(e){return this._startValue+this.getDecimalForPixel(e)*this._valueRange}}const gu=t=>Math.floor(Kr(t)),Oo=(t,e)=>Math.pow(10,gu(t)+e);function K1(t){return t/Math.pow(10,gu(t))===1}function U1(t,e,n){const i=Math.pow(10,n),s=Math.floor(t/i);return Math.ceil(e/i)-s}function gG(t,e){const n=e-t;let i=gu(n);for(;U1(t,e,i)>10;)i++;for(;U1(t,e,i)<10;)i--;return Math.min(i,gu(t))}function pG(t,{min:e,max:n}){e=xi(t.min,e);const i=[],s=gu(e);let r=gG(e,n),o=r<0?Math.pow(10,Math.abs(r)):1;const a=Math.pow(10,r),l=s>r?Math.pow(10,s):0,c=Math.round((e-l)*o)/o,u=Math.floor((e-l)/a/10)*a*10;let d=Math.floor((c-u)/Math.pow(10,r)),h=xi(t.min,Math.round((l+u+d*Math.pow(10,r))*o)/o);for(;h=10?d=d<15?15:20:d++,d>=20&&(r++,d=2,o=r>=0?1:o),h=Math.round((l+u+d*Math.pow(10,r))*o)/o;const f=xi(t.max,h);return i.push({value:f,major:K1(f),significand:d}),i}class mG extends ya{static id="logarithmic";static defaults={ticks:{callback:xf.formatters.logarithmic,major:{enabled:!0}}};constructor(e){super(e),this.start=void 0,this.end=void 0,this._startValue=void 0,this._valueRange=0}parse(e,n){const i=Ah.prototype.parse.apply(this,[e,n]);if(i===0){this._zero=!0;return}return qt(i)&&i>0?i:null}determineDataLimits(){const{min:e,max:n}=this.getMinMax(!0);this.min=qt(e)?Math.max(0,e):null,this.max=qt(n)?Math.max(0,n):null,this.options.beginAtZero&&(this._zero=!0),this._zero&&this.min!==this._suggestedMin&&!qt(this._userMin)&&(this.min=e===Oo(this.min,0)?Oo(this.min,-1):Oo(this.min,0)),this.handleTickRangeOptions()}handleTickRangeOptions(){const{minDefined:e,maxDefined:n}=this.getUserBounds();let i=this.min,s=this.max;const r=a=>i=e?i:a,o=a=>s=n?s:a;i===s&&(i<=0?(r(1),o(10)):(r(Oo(i,-1)),o(Oo(s,1)))),i<=0&&r(Oo(s,-1)),s<=0&&o(Oo(i,1)),this.min=i,this.max=s}buildTicks(){const e=this.options,n={min:this._userMin,max:this._userMax},i=pG(n,this);return e.bounds==="ticks"&&bC(i,this,"value"),e.reverse?(i.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),i}getLabelForValue(e){return e===void 0?"0":Wu(e,this.chart.options.locale,this.options.ticks.format)}configure(){const e=this.min;super.configure(),this._startValue=Kr(e),this._valueRange=Kr(this.max)-Kr(e)}getPixelForValue(e){return(e===void 0||e===0)&&(e=this.min),e===null||isNaN(e)?NaN:this.getPixelForDecimal(e===this.min?0:(Kr(e)-this._startValue)/this._valueRange)}getValueForPixel(e){const n=this.getDecimalForPixel(e);return Math.pow(10,this._startValue+n*this._valueRange)}}function dm(t){const e=t.ticks;if(e.display&&t.display){const n=Kn(e.backdropPadding);return tt(e.font&&e.font.size,Zt.font.size)+n.height}return 0}function _G(t,e,n){return n=Nt(n)?n:[n],{w:SY(t,e.string,n),h:n.length*e.lineHeight}}function G1(t,e,n,i,s){return t===i||t===s?{start:e-n/2,end:e+n/2}:ts?{start:e-n,end:e}:{start:e,end:e+n}}function yG(t){const e={l:t.left+t._padding.left,r:t.right-t._padding.right,t:t.top+t._padding.top,b:t.bottom-t._padding.bottom},n=Object.assign({},e),i=[],s=[],r=t._pointLabels.length,o=t.options.pointLabels,a=o.centerPointLabels?Bt/r:0;for(let l=0;le.r&&(a=(i.end-e.r)/r,t.r=Math.max(t.r,e.r+a)),s.starte.b&&(l=(s.end-e.b)/o,t.b=Math.max(t.b,e.b+l))}function bG(t,e,n){const i=t.drawingArea,{extra:s,additionalAngle:r,padding:o,size:a}=n,l=t.getPointPosition(e,i+s+o,r),c=Math.round(Z_(Si(l.angle+on))),u=CG(l.y,a.h,c),d=EG(c),h=SG(l.x,a.w,d);return{visible:!0,x:l.x,y:u,textAlign:d,left:h,top:u,right:h+a.w,bottom:u+a.h}}function wG(t,e){if(!e)return!0;const{left:n,top:i,right:s,bottom:r}=t;return!(ar({x:n,y:i},e)||ar({x:n,y:r},e)||ar({x:s,y:i},e)||ar({x:s,y:r},e))}function xG(t,e,n){const i=[],s=t._pointLabels.length,r=t.options,{centerPointLabels:o,display:a}=r.pointLabels,l={extra:dm(r)/2,additionalAngle:o?Bt/s:0};let c;for(let u=0;u270||n<90)&&(t-=e),t}function TG(t,e,n){const{left:i,top:s,right:r,bottom:o}=n,{backdropColor:a}=e;if(!gt(a)){const l=ia(e.borderRadius),c=Kn(e.backdropPadding);t.fillStyle=a;const u=i-c.left,d=s-c.top,h=r-i+c.width,f=o-s+c.height;Object.values(l).some(p=>p!==0)?(t.beginPath(),hu(t,{x:u,y:d,w:h,h:f,radius:l}),t.fill()):t.fillRect(u,d,h,f)}}function kG(t,e){const{ctx:n,options:{pointLabels:i}}=t;for(let s=e-1;s>=0;s--){const r=t._pointLabelItems[s];if(!r.visible)continue;const o=i.setContext(t.getPointLabelContext(s));TG(n,o,r);const a=vn(o.font),{x:l,y:c,textAlign:u}=r;ua(n,t._pointLabels[s],l,c+a.lineHeight/2,a,{color:o.color,textAlign:u,textBaseline:"middle"})}}function hT(t,e,n,i){const{ctx:s}=t;if(n)s.arc(t.xCenter,t.yCenter,e,0,Ft);else{let r=t.getPointPosition(0,e);s.moveTo(r.x,r.y);for(let o=1;o{const s=Pt(this.options.pointLabels.callback,[n,i],this);return s||s===0?s:""}).filter((n,i)=>this.chart.getDataVisibility(i))}fit(){const e=this.options;e.display&&e.pointLabels.display?yG(this):this.setCenterPoint(0,0,0,0)}setCenterPoint(e,n,i,s){this.xCenter+=Math.floor((e-n)/2),this.yCenter+=Math.floor((i-s)/2),this.drawingArea-=Math.min(this.drawingArea/2,Math.max(e,n,i,s))}getIndexAngle(e){const n=Ft/(this._pointLabels.length||1),i=this.options.startAngle||0;return Si(e*n+as(i))}getDistanceFromCenterForValue(e){if(gt(e))return NaN;const n=this.drawingArea/(this.max-this.min);return this.options.reverse?(this.max-e)*n:(e-this.min)*n}getValueForDistanceFromCenter(e){if(gt(e))return NaN;const n=e/(this.drawingArea/(this.max-this.min));return this.options.reverse?this.max-n:this.min+n}getPointLabelContext(e){const n=this._pointLabels||[];if(e>=0&&e{if(d!==0){l=this.getDistanceFromCenterForValue(u.value);const h=this.getContext(d),f=s.setContext(h),p=r.setContext(h);AG(this,f,l,o,p)}}),i.display){for(e.save(),a=o-1;a>=0;a--){const u=i.setContext(this.getPointLabelContext(a)),{color:d,lineWidth:h}=u;!h||!d||(e.lineWidth=h,e.strokeStyle=d,e.setLineDash(u.borderDash),e.lineDashOffset=u.borderDashOffset,l=this.getDistanceFromCenterForValue(n.ticks.reverse?this.min:this.max),c=this.getPointPosition(a,l),e.beginPath(),e.moveTo(this.xCenter,this.yCenter),e.lineTo(c.x,c.y),e.stroke())}e.restore()}}drawBorder(){}drawLabels(){const e=this.ctx,n=this.options,i=n.ticks;if(!i.display)return;const s=this.getIndexAngle(0);let r,o;e.save(),e.translate(this.xCenter,this.yCenter),e.rotate(s),e.textAlign="center",e.textBaseline="middle",this.ticks.forEach((a,l)=>{if(l===0&&!n.reverse)return;const c=i.setContext(this.getContext(l)),u=vn(c.font);if(r=this.getDistanceFromCenterForValue(this.ticks[l].value),c.showLabelBackdrop){e.font=u.string,o=e.measureText(a.label).width,e.fillStyle=c.backdropColor;const d=Kn(c.backdropPadding);e.fillRect(-o/2-d.left,-r-u.size/2-d.top,o+d.width,u.size+d.height)}ua(e,a.label,0,-r,u,{color:c.color,strokeColor:c.textStrokeColor,strokeWidth:c.textStrokeWidth})}),e.restore()}drawTitle(){}}const Af={millisecond:{common:!0,size:1,steps:1e3},second:{common:!0,size:1e3,steps:60},minute:{common:!0,size:6e4,steps:60},hour:{common:!0,size:36e5,steps:24},day:{common:!0,size:864e5,steps:30},week:{common:!1,size:6048e5,steps:4},month:{common:!0,size:2628e6,steps:12},quarter:{common:!1,size:7884e6,steps:4},year:{common:!0,size:3154e7}},hi=Object.keys(Af);function X1(t,e){return t-e}function q1(t,e){if(gt(e))return null;const n=t._adapter,{parser:i,round:s,isoWeekday:r}=t._parseOpts;let o=e;return typeof i=="function"&&(o=i(o)),qt(o)||(o=typeof i=="string"?n.parse(o,i):n.parse(o)),o===null?null:(s&&(o=s==="week"&&(Al(r)||r===!0)?n.startOf(o,"isoWeek",r):n.startOf(o,s)),+o)}function Z1(t,e,n,i){const s=hi.length;for(let r=hi.indexOf(t);r=hi.indexOf(n);r--){const o=hi[r];if(Af[o].common&&t._adapter.diff(s,i,o)>=e-1)return o}return hi[n?hi.indexOf(n):0]}function RG(t){for(let e=hi.indexOf(t)+1,n=hi.length;e=e?n[i]:n[s];t[r]=!0}}function DG(t,e,n,i){const s=t._adapter,r=+s.startOf(e[0].value,i),o=e[e.length-1].value;let a,l;for(a=r;a<=o;a=+s.add(a,1,i))l=n[a],l>=0&&(e[l].major=!0);return e}function Q1(t,e,n){const i=[],s={},r=e.length;let o,a;for(o=0;o+e.value))}initOffsets(e=[]){let n=0,i=0,s,r;this.options.offset&&e.length&&(s=this.getDecimalForValue(e[0]),e.length===1?n=1-s:n=(this.getDecimalForValue(e[1])-s)/2,r=this.getDecimalForValue(e[e.length-1]),e.length===1?i=r:i=(r-this.getDecimalForValue(e[e.length-2]))/2);const o=e.length<3?.5:.25;n=Pn(n,0,o),i=Pn(i,0,o),this._offsets={start:n,end:i,factor:1/(n+1+i)}}_generate(){const e=this._adapter,n=this.min,i=this.max,s=this.options,r=s.time,o=r.unit||Z1(r.minUnit,n,i,this._getLabelCapacity(n)),a=tt(s.ticks.stepSize,1),l=o==="week"?r.isoWeekday:!1,c=Al(l)||l===!0,u={};let d=n,h,f;if(c&&(d=+e.startOf(d,"isoWeek",l)),d=+e.startOf(d,c?"day":o),e.diff(i,n,o)>1e5*a)throw new Error(n+" and "+i+" are too far apart with stepSize of "+a+" "+o);const p=s.ticks.source==="data"&&this.getDataTimestamps();for(h=d,f=0;h+m)}getLabelForValue(e){const n=this._adapter,i=this.options.time;return i.tooltipFormat?n.format(e,i.tooltipFormat):n.format(e,i.displayFormats.datetime)}format(e,n){const s=this.options.time.displayFormats,r=this._unit,o=n||s[r];return this._adapter.format(e,o)}_tickFormatFunction(e,n,i,s){const r=this.options,o=r.ticks.callback;if(o)return Pt(o,[e,n,i],this);const a=r.time.displayFormats,l=this._unit,c=this._majorUnit,u=l&&a[l],d=c&&a[c],h=i[n],f=c&&d&&h&&h.major;return this._adapter.format(e,s||(f?d:u))}generateTickLabels(e){let n,i,s;for(n=0,i=e.length;n0?a:1}getDataTimestamps(){let e=this._cache.data||[],n,i;if(e.length)return e;const s=this.getMatchingVisibleMetas();if(this._normalized&&s.length)return this._cache.data=s[0].controller.getAllParsedValues(this);for(n=0,i=s.length;n=t[i].pos&&e<=t[s].pos&&({lo:i,hi:s}=or(t,"pos",e)),{pos:r,time:a}=t[i],{pos:o,time:l}=t[s]):(e>=t[i].time&&e<=t[s].time&&({lo:i,hi:s}=or(t,"time",e)),{time:r,pos:a}=t[i],{time:o,pos:l}=t[s]);const c=o-r;return c?a+(l-a)*(e-r)/c:a}class $G extends hm{static id="timeseries";static defaults=hm.defaults;constructor(e){super(e),this._table=[],this._minPos=void 0,this._tableRange=void 0}initOffsets(){const e=this._getTimestampsForTable(),n=this._table=this.buildLookupTable(e);this._minPos=Ld(n,this.min),this._tableRange=Ld(n,this.max)-this._minPos,super.initOffsets(e)}buildLookupTable(e){const{min:n,max:i}=this,s=[],r=[];let o,a,l,c,u;for(o=0,a=e.length;o=n&&c<=i&&s.push(c);if(s.length<2)return[{time:n,pos:0},{time:i,pos:1}];for(o=0,a=s.length;os-r)}_getTimestampsForTable(){let e=this._cache.all||[];if(e.length)return e;const n=this.getDataTimestamps(),i=this.getLabelTimestamps();return n.length&&i.length?e=this.normalize(n.concat(i)):e=n.length?n:i,e=this._cache.all=e,e}getDecimalForValue(e){return(Ld(this._table,e)-this._minPos)/this._tableRange}getValueForPixel(e){const n=this._offsets,i=this.getDecimalForPixel(e)/n.factor-n.end;return Ld(this._table,i*this._tableRange+this._minPos,!0)}}const fT={data:{type:Object,required:!0},options:{type:Object,default:()=>({})},plugins:{type:Array,default:()=>[]},datasetIdKey:{type:String,default:"label"},updateMode:{type:String,default:void 0}},LG={ariaLabel:{type:String},ariaDescribedby:{type:String}},OG={type:{type:String,required:!0},...fT,...LG},NG=HE[0]==="2"?(t,e)=>Object.assign(t,{attrs:e}):(t,e)=>Object.assign(t,e);function La(t){return nf(t)?lt(t):t}function FG(t){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:t;return nf(e)?new Proxy(t,{}):t}function BG(t,e){const n=t.options;n&&e&&Object.assign(n,e)}function gT(t,e){t.labels=e}function pT(t,e,n){const i=[];t.datasets=e.map(s=>{const r=t.datasets.find(o=>o[n]===s[n]);return!r||!s.data||i.includes(r)?{...s}:(i.push(r),Object.assign(r,s),r)})}function VG(t,e){const n={labels:[],datasets:[]};return gT(n,t.labels),pT(n,t.datasets,e),n}const zG=cn({props:OG,setup(t,e){let{expose:n,slots:i}=e;const s=we(null),r=l_(null);n({chart:r});const o=()=>{if(!s.value)return;const{type:c,data:u,options:d,plugins:h,datasetIdKey:f}=t,p=VG(u,f),m=FG(p,u);r.value=new Tf(s.value,{type:c,data:m,options:{...d},plugins:h})},a=()=>{const c=lt(r.value);c&&(c.destroy(),r.value=null)},l=c=>{c.update(t.updateMode)};return xn(o),p_(a),fn([()=>t.options,()=>t.data],(c,u)=>{let[d,h]=c,[f,p]=u;const m=lt(r.value);if(!m)return;let y=!1;if(d){const v=La(d),b=La(f);v&&v!==b&&(BG(m,v),y=!0)}if(h){const v=La(h.labels),b=La(p.labels),E=La(h.datasets),C=La(p.datasets);v!==b&&(gT(m.config.data,v),y=!0),E&&E!==C&&(pT(m.config.data,E,t.datasetIdKey),y=!0)}y&&Rn(()=>{l(m)})},{deep:!0}),()=>la("canvas",{role:"img",ariaLabel:t.ariaLabel,ariaDescribedby:t.ariaDescribedby,ref:s},[la("p",{},[i.default?i.default():""])])}});function mT(t,e){return Tf.register(e),cn({props:fT,setup(n,i){let{expose:s}=i;const r=l_(null),o=a=>{r.value=a?.chart};return s({chart:r}),()=>la(zG,NG({ref:o},{type:t,...n}))}})}const WG=mT("bar",jC),HG=mT("line",UC);function mr(t){return Array.isArray?Array.isArray(t):vT(t)==="[object Array]"}const YG=1/0;function jG(t){if(typeof t=="string")return t;let e=t+"";return e=="0"&&1/t==-YG?"-0":e}function KG(t){return t==null?"":jG(t)}function ks(t){return typeof t=="string"}function _T(t){return typeof t=="number"}function UG(t){return t===!0||t===!1||GG(t)&&vT(t)=="[object Boolean]"}function yT(t){return typeof t=="object"}function GG(t){return yT(t)&&t!==null}function Ci(t){return t!=null}function np(t){return!t.trim().length}function vT(t){return t==null?t===void 0?"[object Undefined]":"[object Null]":Object.prototype.toString.call(t)}const XG="Incorrect 'index' type",qG=t=>`Invalid value for key ${t}`,ZG=t=>`Pattern length exceeds max of ${t}.`,JG=t=>`Missing ${t} property in key`,QG=t=>`Property 'weight' in key '${t}' must be a positive integer`,ew=Object.prototype.hasOwnProperty;class e7{constructor(e){this._keys=[],this._keyMap={};let n=0;e.forEach(i=>{let s=bT(i);this._keys.push(s),this._keyMap[s.id]=s,n+=s.weight}),this._keys.forEach(i=>{i.weight/=n})}get(e){return this._keyMap[e]}keys(){return this._keys}toJSON(){return JSON.stringify(this._keys)}}function bT(t){let e=null,n=null,i=null,s=1,r=null;if(ks(t)||mr(t))i=t,e=tw(t),n=fm(t);else{if(!ew.call(t,"name"))throw new Error(JG("name"));const o=t.name;if(i=o,ew.call(t,"weight")&&(s=t.weight,s<=0))throw new Error(QG(o));e=tw(o),n=fm(o),r=t.getFn}return{path:e,id:n,weight:s,src:i,getFn:r}}function tw(t){return mr(t)?t:t.split(".")}function fm(t){return mr(t)?t.join("."):t}function t7(t,e){let n=[],i=!1;const s=(r,o,a)=>{if(Ci(r))if(!o[a])n.push(r);else{let l=o[a];const c=r[l];if(!Ci(c))return;if(a===o.length-1&&(ks(c)||_T(c)||UG(c)))n.push(KG(c));else if(mr(c)){i=!0;for(let u=0,d=c.length;ut.score===e.score?t.idx{this._keysMap[n.id]=i})}create(){this.isCreated||!this.docs.length||(this.isCreated=!0,ks(this.docs[0])?this.docs.forEach((e,n)=>{this._addString(e,n)}):this.docs.forEach((e,n)=>{this._addObject(e,n)}),this.norm.clear())}add(e){const n=this.size();ks(e)?this._addString(e,n):this._addObject(e,n)}removeAt(e){this.records.splice(e,1);for(let n=e,i=this.size();n{let o=s.getFn?s.getFn(e):this.getFn(e,s.path);if(Ci(o)){if(mr(o)){let a=[];const l=[{nestedArrIndex:-1,value:o}];for(;l.length;){const{nestedArrIndex:c,value:u}=l.pop();if(Ci(u))if(ks(u)&&!np(u)){let d={v:u,i:c,n:this.norm.get(u)};a.push(d)}else mr(u)&&u.forEach((d,h)=>{l.push({nestedArrIndex:h,value:d})})}i.$[r]=a}else if(ks(o)&&!np(o)){let a={v:o,n:this.norm.get(o)};i.$[r]=a}}}),this.records.push(i)}toJSON(){return{keys:this.keys,records:this.records}}}function wT(t,e,{getFn:n=Je.getFn,fieldNormWeight:i=Je.fieldNormWeight}={}){const s=new cy({getFn:n,fieldNormWeight:i});return s.setKeys(t.map(bT)),s.setSources(e),s.create(),s}function l7(t,{getFn:e=Je.getFn,fieldNormWeight:n=Je.fieldNormWeight}={}){const{keys:i,records:s}=t,r=new cy({getFn:e,fieldNormWeight:n});return r.setKeys(i),r.setIndexRecords(s),r}function Od(t,{errors:e=0,currentLocation:n=0,expectedLocation:i=0,distance:s=Je.distance,ignoreLocation:r=Je.ignoreLocation}={}){const o=e/t.length;if(r)return o;const a=Math.abs(i-n);return s?o+a/s:a?1:o}function c7(t=[],e=Je.minMatchCharLength){let n=[],i=-1,s=-1,r=0;for(let o=t.length;r=e&&n.push([i,s]),i=-1)}return t[r-1]&&r-i>=e&&n.push([i,r-1]),n}const jo=32;function u7(t,e,n,{location:i=Je.location,distance:s=Je.distance,threshold:r=Je.threshold,findAllMatches:o=Je.findAllMatches,minMatchCharLength:a=Je.minMatchCharLength,includeMatches:l=Je.includeMatches,ignoreLocation:c=Je.ignoreLocation}={}){if(e.length>jo)throw new Error(ZG(jo));const u=e.length,d=t.length,h=Math.max(0,Math.min(i,d));let f=r,p=h;const m=a>1||l,y=m?Array(d):[];let v;for(;(v=t.indexOf(e,p))>-1;){let T=Od(e,{currentLocation:v,expectedLocation:h,distance:s,ignoreLocation:c});if(f=Math.min(T,f),p=v+u,m){let k=0;for(;k=P;N-=1){let L=N-1,I=n[t.charAt(L)];if(m&&(y[L]=+!!I),H[N]=(H[N+1]<<1|1)&I,T&&(H[N]|=(b[N+1]|b[N])<<1|1|b[N+1]),H[N]&w&&(E=Od(e,{errors:T,currentLocation:L,expectedLocation:h,distance:s,ignoreLocation:c}),E<=f)){if(f=E,p=L,p<=h)break;P=Math.max(1,2*h-p)}}if(Od(e,{errors:T+1,currentLocation:h,expectedLocation:h,distance:s,ignoreLocation:c})>f)break;b=H}const x={isMatch:p>=0,score:Math.max(.001,E)};if(m){const T=c7(y,a);T.length?l&&(x.indices=T):x.isMatch=!1}return x}function d7(t){let e={};for(let n=0,i=t.length;n{this.chunks.push({pattern:h,alphabet:d7(h),startIndex:f})},d=this.pattern.length;if(d>jo){let h=0;const f=d%jo,p=d-f;for(;h{const{isMatch:v,score:b,indices:E}=u7(e,p,m,{location:s+y,distance:r,threshold:o,findAllMatches:a,minMatchCharLength:l,includeMatches:i,ignoreLocation:c});v&&(h=!0),d+=b,v&&E&&(u=[...u,...E])});let f={isMatch:h,score:h?d/this.chunks.length:1};return h&&i&&(f.indices=u),f}}class bo{constructor(e){this.pattern=e}static isMultiMatch(e){return nw(e,this.multiRegex)}static isSingleMatch(e){return nw(e,this.singleRegex)}search(){}}function nw(t,e){const n=t.match(e);return n?n[1]:null}class h7 extends bo{constructor(e){super(e)}static get type(){return"exact"}static get multiRegex(){return/^="(.*)"$/}static get singleRegex(){return/^=(.*)$/}search(e){const n=e===this.pattern;return{isMatch:n,score:n?0:1,indices:[0,this.pattern.length-1]}}}class f7 extends bo{constructor(e){super(e)}static get type(){return"inverse-exact"}static get multiRegex(){return/^!"(.*)"$/}static get singleRegex(){return/^!(.*)$/}search(e){const i=e.indexOf(this.pattern)===-1;return{isMatch:i,score:i?0:1,indices:[0,e.length-1]}}}class g7 extends bo{constructor(e){super(e)}static get type(){return"prefix-exact"}static get multiRegex(){return/^\^"(.*)"$/}static get singleRegex(){return/^\^(.*)$/}search(e){const n=e.startsWith(this.pattern);return{isMatch:n,score:n?0:1,indices:[0,this.pattern.length-1]}}}class p7 extends bo{constructor(e){super(e)}static get type(){return"inverse-prefix-exact"}static get multiRegex(){return/^!\^"(.*)"$/}static get singleRegex(){return/^!\^(.*)$/}search(e){const n=!e.startsWith(this.pattern);return{isMatch:n,score:n?0:1,indices:[0,e.length-1]}}}class m7 extends bo{constructor(e){super(e)}static get type(){return"suffix-exact"}static get multiRegex(){return/^"(.*)"\$$/}static get singleRegex(){return/^(.*)\$$/}search(e){const n=e.endsWith(this.pattern);return{isMatch:n,score:n?0:1,indices:[e.length-this.pattern.length,e.length-1]}}}class _7 extends bo{constructor(e){super(e)}static get type(){return"inverse-suffix-exact"}static get multiRegex(){return/^!"(.*)"\$$/}static get singleRegex(){return/^!(.*)\$$/}search(e){const n=!e.endsWith(this.pattern);return{isMatch:n,score:n?0:1,indices:[0,e.length-1]}}}class ET extends bo{constructor(e,{location:n=Je.location,threshold:i=Je.threshold,distance:s=Je.distance,includeMatches:r=Je.includeMatches,findAllMatches:o=Je.findAllMatches,minMatchCharLength:a=Je.minMatchCharLength,isCaseSensitive:l=Je.isCaseSensitive,ignoreLocation:c=Je.ignoreLocation}={}){super(e),this._bitapSearch=new xT(e,{location:n,threshold:i,distance:s,includeMatches:r,findAllMatches:o,minMatchCharLength:a,isCaseSensitive:l,ignoreLocation:c})}static get type(){return"fuzzy"}static get multiRegex(){return/^"(.*)"$/}static get singleRegex(){return/^(.*)$/}search(e){return this._bitapSearch.searchIn(e)}}class ST extends bo{constructor(e){super(e)}static get type(){return"include"}static get multiRegex(){return/^'"(.*)"$/}static get singleRegex(){return/^'(.*)$/}search(e){let n=0,i;const s=[],r=this.pattern.length;for(;(i=e.indexOf(this.pattern,n))>-1;)n=i+r,s.push([i,n-1]);const o=!!s.length;return{isMatch:o,score:o?0:1,indices:s}}}const gm=[h7,ST,g7,p7,_7,m7,f7,ET],iw=gm.length,y7=/ +(?=(?:[^\"]*\"[^\"]*\")*[^\"]*$)/,v7="|";function b7(t,e={}){return t.split(v7).map(n=>{let i=n.trim().split(y7).filter(r=>r&&!!r.trim()),s=[];for(let r=0,o=i.length;r!!(t[Mh.AND]||t[Mh.OR]),S7=t=>!!t[_m.PATH],C7=t=>!mr(t)&&yT(t)&&!ym(t),sw=t=>({[Mh.AND]:Object.keys(t).map(e=>({[e]:t[e]}))});function CT(t,e,{auto:n=!0}={}){const i=s=>{let r=Object.keys(s);const o=S7(s);if(!o&&r.length>1&&!ym(s))return i(sw(s));if(C7(s)){const l=o?s[_m.PATH]:r[0],c=o?s[_m.PATTERN]:s[l];if(!ks(c))throw new Error(qG(l));const u={keyId:fm(l),pattern:c};return n&&(u.searcher=mm(c,e)),u}let a={children:[],operator:r[0]};return r.forEach(l=>{const c=s[l];mr(c)&&c.forEach(u=>{a.children.push(i(u))})}),a};return ym(t)||(t=sw(t)),i(t)}function T7(t,{ignoreFieldNorm:e=Je.ignoreFieldNorm}){t.forEach(n=>{let i=1;n.matches.forEach(({key:s,norm:r,score:o})=>{const a=s?s.weight:null;i*=Math.pow(o===0&&a?Number.EPSILON:o,(a||1)*(e?1:r))}),n.score=i})}function k7(t,e){const n=t.matches;e.matches=[],Ci(n)&&n.forEach(i=>{if(!Ci(i.indices)||!i.indices.length)return;const{indices:s,value:r}=i;let o={indices:s,value:r};i.key&&(o.key=i.key.src),i.idx>-1&&(o.refIndex=i.idx),e.matches.push(o)})}function A7(t,e){e.score=t.score}function M7(t,e,{includeMatches:n=Je.includeMatches,includeScore:i=Je.includeScore}={}){const s=[];return n&&s.push(k7),i&&s.push(A7),t.map(r=>{const{idx:o}=r,a={item:e[o],refIndex:o};return s.length&&s.forEach(l=>{l(r,a)}),a})}class Gl{constructor(e,n={},i){this.options={...Je,...n},this.options.useExtendedSearch,this._keyStore=new e7(this.options.keys),this.setCollection(e,i)}setCollection(e,n){if(this._docs=e,n&&!(n instanceof cy))throw new Error(XG);this._myIndex=n||wT(this.options.keys,this._docs,{getFn:this.options.getFn,fieldNormWeight:this.options.fieldNormWeight})}add(e){Ci(e)&&(this._docs.push(e),this._myIndex.add(e))}remove(e=()=>!1){const n=[];for(let i=0,s=this._docs.length;i-1&&(l=l.slice(0,n)),M7(l,this._docs,{includeMatches:i,includeScore:s})}_searchStringList(e){const n=mm(e,this.options),{records:i}=this._myIndex,s=[];return i.forEach(({v:r,i:o,n:a})=>{if(!Ci(r))return;const{isMatch:l,score:c,indices:u}=n.searchIn(r);l&&s.push({item:r,idx:o,matches:[{score:c,value:r,norm:a,indices:u}]})}),s}_searchLogical(e){const n=CT(e,this.options),i=(a,l,c)=>{if(!a.children){const{keyId:d,searcher:h}=a,f=this._findMatches({key:this._keyStore.get(d),value:this._myIndex.getValueForItemAtKeyId(l,d),searcher:h});return f&&f.length?[{idx:c,item:l,matches:f}]:[]}const u=[];for(let d=0,h=a.children.length;d{if(Ci(a)){let c=i(n,a,l);c.length&&(r[l]||(r[l]={idx:l,item:a,matches:[]},o.push(r[l])),c.forEach(({matches:u})=>{r[l].matches.push(...u)}))}}),o}_searchObjectList(e){const n=mm(e,this.options),{keys:i,records:s}=this._myIndex,r=[];return s.forEach(({$:o,i:a})=>{if(!Ci(o))return;let l=[];i.forEach((c,u)=>{l.push(...this._findMatches({key:c,value:o[u],searcher:n}))}),l.length&&r.push({idx:a,item:o,matches:l})}),r}_findMatches({key:e,value:n,searcher:i}){if(!Ci(n))return[];let s=[];if(mr(n))n.forEach(({v:r,i:o,n:a})=>{if(!Ci(r))return;const{isMatch:l,score:c,indices:u}=i.searchIn(r);l&&s.push({score:c,key:e,value:r,idx:o,norm:a,indices:u})});else{const{v:r,n:o}=n,{isMatch:a,score:l,indices:c}=i.searchIn(r);a&&s.push({score:l,key:e,value:r,norm:o,indices:c})}return s}}Gl.version="7.0.0";Gl.createIndex=wT;Gl.parseIndex=l7;Gl.config=Je;Gl.parseQuery=CT;E7(x7);const I7={name:"peerSettings",components:{LocaleText:Qe},props:{selectedPeer:Object},data(){return{data:void 0,dataChanged:!1,showKey:!1,saving:!1}},setup(){return{dashboardConfigurationStore:st()}},methods:{reset(){this.selectedPeer&&(this.data=JSON.parse(JSON.stringify(this.selectedPeer)),this.dataChanged=!1)},savePeer(){this.saving=!0,kt(`/api/updatePeerSettings/${this.$route.params.id}`,this.data,t=>{this.saving=!1,t.status?this.dashboardConfigurationStore.newMessage("Server","Peer saved","success"):this.dashboardConfigurationStore.newMessage("Server",t.message,"danger"),this.$emit("refresh")})},resetPeerData(t){this.saving=!0,kt(`/api/resetPeerData/${this.$route.params.id}`,{id:this.data.id,type:t},e=>{this.saving=!1,e.status?this.dashboardConfigurationStore.newMessage("Server","Peer data usage reset successfully","success"):this.dashboardConfigurationStore.newMessage("Server",e.message,"danger"),this.$emit("refresh")})}},beforeMount(){this.reset()},mounted(){this.$el.querySelectorAll("input").forEach(t=>{t.addEventListener("keyup",()=>{this.dataChanged=!0})})}},Xl=t=>(bn("data-v-2c571abb"),t=t(),wn(),t),P7={class:"peerSettingContainer w-100 h-100 position-absolute top-0 start-0 overflow-y-scroll"},R7={class:"container d-flex h-100 w-100"},D7={class:"m-auto modal-dialog-centered dashboardModal"},$7={class:"card rounded-3 shadow flex-grow-1"},L7={class:"card-header bg-transparent d-flex align-items-center gap-2 border-0 p-4 pb-2"},O7={class:"mb-0"},N7={key:0,class:"card-body px-4 pb-4"},F7={class:"d-flex flex-column gap-2 mb-4"},B7={class:"d-flex align-items-center"},V7={class:"text-muted"},z7={class:"ms-auto"},W7={for:"peer_name_textbox",class:"form-label"},H7={class:"text-muted"},Y7=["disabled"],j7={class:"d-flex position-relative"},K7={for:"peer_private_key_textbox",class:"form-label"},U7={class:"text-muted"},G7=["type","disabled"],X7={for:"peer_allowed_ip_textbox",class:"form-label"},q7={class:"text-muted"},Z7=["disabled"],J7={for:"peer_endpoint_allowed_ips",class:"form-label"},Q7={class:"text-muted"},eX=["disabled"],tX={for:"peer_DNS_textbox",class:"form-label"},nX={class:"text-muted"},iX=["disabled"],sX={class:"accordion mt-3",id:"peerSettingsAccordion"},rX={class:"accordion-item"},oX={class:"accordion-header"},aX={class:"accordion-button rounded-3 collapsed",type:"button","data-bs-toggle":"collapse","data-bs-target":"#peerSettingsAccordionOptional"},lX={id:"peerSettingsAccordionOptional",class:"accordion-collapse collapse","data-bs-parent":"#peerSettingsAccordion"},cX={class:"accordion-body d-flex flex-column gap-2 mb-2"},uX={for:"peer_preshared_key_textbox",class:"form-label"},dX={class:"text-muted"},hX=["disabled"],fX={for:"peer_mtu",class:"form-label"},gX={class:"text-muted"},pX=["disabled"],mX={for:"peer_keep_alive",class:"form-label"},_X={class:"text-muted"},yX=["disabled"],vX=Xl(()=>g("hr",null,null,-1)),bX={class:"d-flex gap-2 align-items-center"},wX={class:"d-flex gap-2 ms-auto"},xX=Xl(()=>g("i",{class:"bi bi-arrow-down-up me-2"},null,-1)),EX=Xl(()=>g("i",{class:"bi bi-arrow-down me-2"},null,-1)),SX=Xl(()=>g("i",{class:"bi bi-arrow-up me-2"},null,-1)),CX={class:"d-flex align-items-center gap-2"},TX=["disabled"],kX=Xl(()=>g("i",{class:"bi bi-arrow-clockwise ms-2"},null,-1)),AX=["disabled"],MX=Xl(()=>g("i",{class:"bi bi-save-fill ms-2"},null,-1));function IX(t,e,n,i,s,r){const o=Se("LocaleText");return D(),V("div",P7,[g("div",R7,[g("div",D7,[g("div",$7,[g("div",L7,[g("h4",O7,[B(o,{t:"Peer Settings"})]),g("button",{type:"button",class:"btn-close ms-auto",onClick:e[0]||(e[0]=a=>this.$emit("close"))})]),this.data?(D(),V("div",N7,[g("div",F7,[g("div",B7,[g("small",V7,[B(o,{t:"Public Key"})]),g("small",z7,[g("samp",null,Ee(this.data.id),1)])]),g("div",null,[g("label",W7,[g("small",H7,[B(o,{t:"Name"})])]),Ne(g("input",{type:"text",class:"form-control form-control-sm rounded-3",disabled:this.saving,"onUpdate:modelValue":e[1]||(e[1]=a=>this.data.name=a),id:"peer_name_textbox",placeholder:""},null,8,Y7),[[Ke,this.data.name]])]),g("div",null,[g("div",j7,[g("label",K7,[g("small",U7,[B(o,{t:"Private Key"}),g("code",null,[B(o,{t:"(Required for QR Code and Download)"})])])]),g("a",{role:"button",class:"ms-auto text-decoration-none toggleShowKey",onClick:e[2]||(e[2]=a=>this.showKey=!this.showKey)},[g("i",{class:Ie(["bi",[this.showKey?"bi-eye-slash-fill":"bi-eye-fill"]])},null,2)])]),Ne(g("input",{type:[this.showKey?"text":"password"],class:"form-control form-control-sm rounded-3",disabled:this.saving,"onUpdate:modelValue":e[3]||(e[3]=a=>this.data.private_key=a),id:"peer_private_key_textbox",style:{"padding-right":"40px"}},null,8,G7),[[QE,this.data.private_key]])]),g("div",null,[g("label",X7,[g("small",q7,[B(o,{t:"Allowed IPs"}),g("code",null,[B(o,{t:"(Required)"})])])]),Ne(g("input",{type:"text",class:"form-control form-control-sm rounded-3",disabled:this.saving,"onUpdate:modelValue":e[4]||(e[4]=a=>this.data.allowed_ip=a),id:"peer_allowed_ip_textbox"},null,8,Z7),[[Ke,this.data.allowed_ip]])]),g("div",null,[g("label",J7,[g("small",Q7,[B(o,{t:"Endpoint Allowed IPs"}),g("code",null,[B(o,{t:"(Required)"})])])]),Ne(g("input",{type:"text",class:"form-control form-control-sm rounded-3",disabled:this.saving,"onUpdate:modelValue":e[5]||(e[5]=a=>this.data.endpoint_allowed_ip=a),id:"peer_endpoint_allowed_ips"},null,8,eX),[[Ke,this.data.endpoint_allowed_ip]])]),g("div",null,[g("label",tX,[g("small",nX,[B(o,{t:"DNS"})])]),Ne(g("input",{type:"text",class:"form-control form-control-sm rounded-3",disabled:this.saving,"onUpdate:modelValue":e[6]||(e[6]=a=>this.data.DNS=a),id:"peer_DNS_textbox"},null,8,iX),[[Ke,this.data.DNS]])]),g("div",sX,[g("div",rX,[g("h2",oX,[g("button",aX,[B(o,{t:"Optional Settings"})])]),g("div",lX,[g("div",cX,[g("div",null,[g("label",uX,[g("small",dX,[B(o,{t:"Pre-Shared Key"})])]),Ne(g("input",{type:"text",class:"form-control form-control-sm rounded-3",disabled:this.saving,"onUpdate:modelValue":e[7]||(e[7]=a=>this.data.preshared_key=a),id:"peer_preshared_key_textbox"},null,8,hX),[[Ke,this.data.preshared_key]])]),g("div",null,[g("label",fX,[g("small",gX,[B(o,{t:"MTU"})])]),Ne(g("input",{type:"number",class:"form-control form-control-sm rounded-3",disabled:this.saving,"onUpdate:modelValue":e[8]||(e[8]=a=>this.data.mtu=a),id:"peer_mtu"},null,8,pX),[[Ke,this.data.mtu]])]),g("div",null,[g("label",mX,[g("small",_X,[B(o,{t:"Persistent Keepalive"})])]),Ne(g("input",{type:"number",class:"form-control form-control-sm rounded-3",disabled:this.saving,"onUpdate:modelValue":e[9]||(e[9]=a=>this.data.keepalive=a),id:"peer_keep_alive"},null,8,yX),[[Ke,this.data.keepalive]])])])])])]),vX,g("div",bX,[g("strong",null,[B(o,{t:"Reset Data Usage"})]),g("div",wX,[g("button",{class:"btn bg-primary-subtle text-primary-emphasis rounded-3 flex-grow-1 shadow-sm",onClick:e[10]||(e[10]=a=>this.resetPeerData("total"))},[xX,B(o,{t:"Total"})]),g("button",{class:"btn bg-primary-subtle text-primary-emphasis rounded-3 flex-grow-1 shadow-sm",onClick:e[11]||(e[11]=a=>this.resetPeerData("receive"))},[EX,B(o,{t:"Received"})]),g("button",{class:"btn bg-primary-subtle text-primary-emphasis rounded-3 flex-grow-1 shadow-sm",onClick:e[12]||(e[12]=a=>this.resetPeerData("sent"))},[SX,B(o,{t:"Sent"})])])])]),g("div",CX,[g("button",{class:"btn btn-secondary rounded-3 shadow",onClick:e[13]||(e[13]=a=>this.reset()),disabled:!this.dataChanged||this.saving},[B(o,{t:"Revert"}),kX],8,TX),g("button",{class:"ms-auto btn btn-dark btn-brand rounded-3 px-3 py-2 shadow",disabled:!this.dataChanged||this.saving,onClick:e[14]||(e[14]=a=>this.savePeer())},[B(o,{t:"Save Peer"}),MX],8,AX)])])):ce("",!0)])])])])}const PX=Ye(I7,[["render",IX],["__scopeId","data-v-2c571abb"]]);var va={},RX=function(){return typeof Promise=="function"&&Promise.prototype&&Promise.prototype.then},TT={},Pi={};let uy;const DX=[0,26,44,70,100,134,172,196,242,292,346,404,466,532,581,655,733,815,901,991,1085,1156,1258,1364,1474,1588,1706,1828,1921,2051,2185,2323,2465,2611,2761,2876,3034,3196,3362,3532,3706];Pi.getSymbolSize=function(e){if(!e)throw new Error('"version" cannot be null or undefined');if(e<1||e>40)throw new Error('"version" should be in range from 1 to 40');return e*4+17};Pi.getSymbolTotalCodewords=function(e){return DX[e]};Pi.getBCHDigit=function(t){let e=0;for(;t!==0;)e++,t>>>=1;return e};Pi.setToSJISFunction=function(e){if(typeof e!="function")throw new Error('"toSJISFunc" is not a valid function.');uy=e};Pi.isKanjiModeEnabled=function(){return typeof uy<"u"};Pi.toSJIS=function(e){return uy(e)};var Mf={};(function(t){t.L={bit:1},t.M={bit:0},t.Q={bit:3},t.H={bit:2};function e(n){if(typeof n!="string")throw new Error("Param is not a string");switch(n.toLowerCase()){case"l":case"low":return t.L;case"m":case"medium":return t.M;case"q":case"quartile":return t.Q;case"h":case"high":return t.H;default:throw new Error("Unknown EC Level: "+n)}}t.isValid=function(i){return i&&typeof i.bit<"u"&&i.bit>=0&&i.bit<4},t.from=function(i,s){if(t.isValid(i))return i;try{return e(i)}catch{return s}}})(Mf);function kT(){this.buffer=[],this.length=0}kT.prototype={get:function(t){const e=Math.floor(t/8);return(this.buffer[e]>>>7-t%8&1)===1},put:function(t,e){for(let n=0;n>>e-n-1&1)===1)},getLengthInBits:function(){return this.length},putBit:function(t){const e=Math.floor(this.length/8);this.buffer.length<=e&&this.buffer.push(0),t&&(this.buffer[e]|=128>>>this.length%8),this.length++}};var $X=kT;function Yu(t){if(!t||t<1)throw new Error("BitMatrix size must be defined and greater than 0");this.size=t,this.data=new Uint8Array(t*t),this.reservedBit=new Uint8Array(t*t)}Yu.prototype.set=function(t,e,n,i){const s=t*this.size+e;this.data[s]=n,i&&(this.reservedBit[s]=!0)};Yu.prototype.get=function(t,e){return this.data[t*this.size+e]};Yu.prototype.xor=function(t,e,n){this.data[t*this.size+e]^=n};Yu.prototype.isReserved=function(t,e){return this.reservedBit[t*this.size+e]};var LX=Yu,AT={};(function(t){const e=Pi.getSymbolSize;t.getRowColCoords=function(i){if(i===1)return[];const s=Math.floor(i/7)+2,r=e(i),o=r===145?26:Math.ceil((r-13)/(2*s-2))*2,a=[r-7];for(let l=1;l=0&&s<=7},t.from=function(s){return t.isValid(s)?parseInt(s,10):void 0},t.getPenaltyN1=function(s){const r=s.size;let o=0,a=0,l=0,c=null,u=null;for(let d=0;d=5&&(o+=e.N1+(a-5)),c=f,a=1),f=s.get(h,d),f===u?l++:(l>=5&&(o+=e.N1+(l-5)),u=f,l=1)}a>=5&&(o+=e.N1+(a-5)),l>=5&&(o+=e.N1+(l-5))}return o},t.getPenaltyN2=function(s){const r=s.size;let o=0;for(let a=0;a=10&&(a===1488||a===93)&&o++,l=l<<1&2047|s.get(u,c),u>=10&&(l===1488||l===93)&&o++}return o*e.N3},t.getPenaltyN4=function(s){let r=0;const o=s.data.length;for(let l=0;l=0;){const o=r[0];for(let l=0;l0){const r=new Uint8Array(this.degree);return r.set(i,s),r}return i};var NX=dy,DT={},wo={},hy={};hy.isValid=function(e){return!isNaN(e)&&e>=1&&e<=40};var Bs={};const $T="[0-9]+",FX="[A-Z $%*+\\-./:]+";let pu="(?:[u3000-u303F]|[u3040-u309F]|[u30A0-u30FF]|[uFF00-uFFEF]|[u4E00-u9FAF]|[u2605-u2606]|[u2190-u2195]|u203B|[u2010u2015u2018u2019u2025u2026u201Cu201Du2225u2260]|[u0391-u0451]|[u00A7u00A8u00B1u00B4u00D7u00F7])+";pu=pu.replace(/u/g,"\\u");const BX="(?:(?![A-Z0-9 $%*+\\-./:]|"+pu+`)(?:.|[\r +]))+`;Bs.KANJI=new RegExp(pu,"g");Bs.BYTE_KANJI=new RegExp("[^A-Z0-9 $%*+\\-./:]+","g");Bs.BYTE=new RegExp(BX,"g");Bs.NUMERIC=new RegExp($T,"g");Bs.ALPHANUMERIC=new RegExp(FX,"g");const VX=new RegExp("^"+pu+"$"),zX=new RegExp("^"+$T+"$"),WX=new RegExp("^[A-Z0-9 $%*+\\-./:]+$");Bs.testKanji=function(e){return VX.test(e)};Bs.testNumeric=function(e){return zX.test(e)};Bs.testAlphanumeric=function(e){return WX.test(e)};(function(t){const e=hy,n=Bs;t.NUMERIC={id:"Numeric",bit:1,ccBits:[10,12,14]},t.ALPHANUMERIC={id:"Alphanumeric",bit:2,ccBits:[9,11,13]},t.BYTE={id:"Byte",bit:4,ccBits:[8,16,16]},t.KANJI={id:"Kanji",bit:8,ccBits:[8,10,12]},t.MIXED={bit:-1},t.getCharCountIndicator=function(r,o){if(!r.ccBits)throw new Error("Invalid mode: "+r);if(!e.isValid(o))throw new Error("Invalid version: "+o);return o>=1&&o<10?r.ccBits[0]:o<27?r.ccBits[1]:r.ccBits[2]},t.getBestModeForData=function(r){return n.testNumeric(r)?t.NUMERIC:n.testAlphanumeric(r)?t.ALPHANUMERIC:n.testKanji(r)?t.KANJI:t.BYTE},t.toString=function(r){if(r&&r.id)return r.id;throw new Error("Invalid mode")},t.isValid=function(r){return r&&r.bit&&r.ccBits};function i(s){if(typeof s!="string")throw new Error("Param is not a string");switch(s.toLowerCase()){case"numeric":return t.NUMERIC;case"alphanumeric":return t.ALPHANUMERIC;case"kanji":return t.KANJI;case"byte":return t.BYTE;default:throw new Error("Unknown mode: "+s)}}t.from=function(r,o){if(t.isValid(r))return r;try{return i(r)}catch{return o}}})(wo);(function(t){const e=Pi,n=If,i=Mf,s=wo,r=hy,o=7973,a=e.getBCHDigit(o);function l(h,f,p){for(let m=1;m<=40;m++)if(f<=t.getCapacity(m,p,h))return m}function c(h,f){return s.getCharCountIndicator(h,f)+4}function u(h,f){let p=0;return h.forEach(function(m){const y=c(m.mode,f);p+=y+m.getBitsLength()}),p}function d(h,f){for(let p=1;p<=40;p++)if(u(h,p)<=t.getCapacity(p,f,s.MIXED))return p}t.from=function(f,p){return r.isValid(f)?parseInt(f,10):p},t.getCapacity=function(f,p,m){if(!r.isValid(f))throw new Error("Invalid QR Code version");typeof m>"u"&&(m=s.BYTE);const y=e.getSymbolTotalCodewords(f),v=n.getTotalCodewordsCount(f,p),b=(y-v)*8;if(m===s.MIXED)return b;const E=b-c(m,f);switch(m){case s.NUMERIC:return Math.floor(E/10*3);case s.ALPHANUMERIC:return Math.floor(E/11*2);case s.KANJI:return Math.floor(E/13);case s.BYTE:default:return Math.floor(E/8)}},t.getBestVersionForData=function(f,p){let m;const y=i.from(p,i.M);if(Array.isArray(f)){if(f.length>1)return d(f,y);if(f.length===0)return 1;m=f[0]}else m=f;return l(m.mode,m.getLength(),y)},t.getEncodedBits=function(f){if(!r.isValid(f)||f<7)throw new Error("Invalid QR Code version");let p=f<<12;for(;e.getBCHDigit(p)-a>=0;)p^=o<=0;)s^=OT<0&&(i=this.data.substr(n),s=parseInt(i,10),e.put(s,r*3+1))};var jX=Pl;const KX=wo,ip=["0","1","2","3","4","5","6","7","8","9","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"," ","$","%","*","+","-",".","/",":"];function Rl(t){this.mode=KX.ALPHANUMERIC,this.data=t}Rl.getBitsLength=function(e){return 11*Math.floor(e/2)+6*(e%2)};Rl.prototype.getLength=function(){return this.data.length};Rl.prototype.getBitsLength=function(){return Rl.getBitsLength(this.data.length)};Rl.prototype.write=function(e){let n;for(n=0;n+2<=this.data.length;n+=2){let i=ip.indexOf(this.data[n])*45;i+=ip.indexOf(this.data[n+1]),e.put(i,11)}this.data.length%2&&e.put(ip.indexOf(this.data[n]),6)};var UX=Rl,GX=function(e){for(var n=[],i=e.length,s=0;s=55296&&r<=56319&&i>s+1){var o=e.charCodeAt(s+1);o>=56320&&o<=57343&&(r=(r-55296)*1024+o-56320+65536,s+=1)}if(r<128){n.push(r);continue}if(r<2048){n.push(r>>6|192),n.push(r&63|128);continue}if(r<55296||r>=57344&&r<65536){n.push(r>>12|224),n.push(r>>6&63|128),n.push(r&63|128);continue}if(r>=65536&&r<=1114111){n.push(r>>18|240),n.push(r>>12&63|128),n.push(r>>6&63|128),n.push(r&63|128);continue}n.push(239,191,189)}return new Uint8Array(n).buffer};const XX=GX,qX=wo;function Dl(t){this.mode=qX.BYTE,typeof t=="string"&&(t=XX(t)),this.data=new Uint8Array(t)}Dl.getBitsLength=function(e){return e*8};Dl.prototype.getLength=function(){return this.data.length};Dl.prototype.getBitsLength=function(){return Dl.getBitsLength(this.data.length)};Dl.prototype.write=function(t){for(let e=0,n=this.data.length;e=33088&&n<=40956)n-=33088;else if(n>=57408&&n<=60351)n-=49472;else throw new Error("Invalid SJIS character: "+this.data[e]+` +Make sure your charset is UTF-8`);n=(n>>>8&255)*192+(n&255),t.put(n,13)}};var e9=$l,FT={exports:{}};(function(t){var e={single_source_shortest_paths:function(n,i,s){var r={},o={};o[i]=0;var a=e.PriorityQueue.make();a.push(i,0);for(var l,c,u,d,h,f,p,m,y;!a.empty();){l=a.pop(),c=l.value,d=l.cost,h=n[c]||{};for(u in h)h.hasOwnProperty(u)&&(f=h[u],p=d+f,m=o[u],y=typeof o[u]>"u",(y||m>p)&&(o[u]=p,a.push(u,p),r[u]=c))}if(typeof s<"u"&&typeof o[s]>"u"){var v=["Could not find a path from ",i," to ",s,"."].join("");throw new Error(v)}return r},extract_shortest_path_from_predecessor_list:function(n,i){for(var s=[],r=i;r;)s.push(r),n[r],r=n[r];return s.reverse(),s},find_path:function(n,i,s){var r=e.single_source_shortest_paths(n,i,s);return e.extract_shortest_path_from_predecessor_list(r,s)},PriorityQueue:{make:function(n){var i=e.PriorityQueue,s={},r;n=n||{};for(r in i)i.hasOwnProperty(r)&&(s[r]=i[r]);return s.queue=[],s.sorter=n.sorter||i.default_sorter,s},default_sorter:function(n,i){return n.cost-i.cost},push:function(n,i){var s={value:n,cost:i};this.queue.push(s),this.queue.sort(this.sorter)},pop:function(){return this.queue.shift()},empty:function(){return this.queue.length===0}}};t.exports=e})(FT);var t9=FT.exports;(function(t){const e=wo,n=jX,i=UX,s=ZX,r=e9,o=Bs,a=Pi,l=t9;function c(v){return unescape(encodeURIComponent(v)).length}function u(v,b,E){const C=[];let w;for(;(w=v.exec(E))!==null;)C.push({data:w[0],index:w.index,mode:b,length:w[0].length});return C}function d(v){const b=u(o.NUMERIC,e.NUMERIC,v),E=u(o.ALPHANUMERIC,e.ALPHANUMERIC,v);let C,w;return a.isKanjiModeEnabled()?(C=u(o.BYTE,e.BYTE,v),w=u(o.KANJI,e.KANJI,v)):(C=u(o.BYTE_KANJI,e.BYTE,v),w=[]),b.concat(E,C,w).sort(function(T,k){return T.index-k.index}).map(function(T){return{data:T.data,mode:T.mode,length:T.length}})}function h(v,b){switch(b){case e.NUMERIC:return n.getBitsLength(v);case e.ALPHANUMERIC:return i.getBitsLength(v);case e.KANJI:return r.getBitsLength(v);case e.BYTE:return s.getBitsLength(v)}}function f(v){return v.reduce(function(b,E){const C=b.length-1>=0?b[b.length-1]:null;return C&&C.mode===E.mode?(b[b.length-1].data+=E.data,b):(b.push(E),b)},[])}function p(v){const b=[];for(let E=0;E=0&&a<=6&&(l===0||l===6)||l>=0&&l<=6&&(a===0||a===6)||a>=2&&a<=4&&l>=2&&l<=4?t.set(r+a,o+l,!0,!0):t.set(r+a,o+l,!1,!0))}}function u9(t){const e=t.size;for(let n=8;n>a&1)===1,t.set(s,r,o,!0),t.set(r,s,o,!0)}function op(t,e,n){const i=t.size,s=a9.getEncodedBits(e,n);let r,o;for(r=0;r<15;r++)o=(s>>r&1)===1,r<6?t.set(r,8,o,!0):r<8?t.set(r+1,8,o,!0):t.set(i-15+r,8,o,!0),r<8?t.set(8,i-r-1,o,!0):r<9?t.set(8,15-r-1+1,o,!0):t.set(8,15-r-1,o,!0);t.set(i-8,8,1,!0)}function f9(t,e){const n=t.size;let i=-1,s=n-1,r=7,o=0;for(let a=n-1;a>0;a-=2)for(a===6&&a--;;){for(let l=0;l<2;l++)if(!t.isReserved(s,a-l)){let c=!1;o>>r&1)===1),t.set(s,a-l,c),r--,r===-1&&(o++,r=7)}if(s+=i,s<0||n<=s){s-=i,i=-i;break}}}function g9(t,e,n){const i=new n9;n.forEach(function(l){i.put(l.mode.bit,4),i.put(l.getLength(),l9.getCharCountIndicator(l.mode,t)),l.write(i)});const s=Rf.getSymbolTotalCodewords(t),r=wm.getTotalCodewordsCount(t,e),o=(s-r)*8;for(i.getLengthInBits()+4<=o&&i.put(0,4);i.getLengthInBits()%8!==0;)i.putBit(0);const a=(o-i.getLengthInBits())/8;for(let l=0;l=7&&KW(l,e),YW(l,r),isNaN(s)&&(s=uh.getBestMask(l,_d.bind(null,l,n))),uh.applyMask(s,l),_d(l,n,s),{modules:l,version:e,errorCorrectionLevel:n,maskPattern:s,segments:i}}g1.create=function(e,n){if(typeof e>"u"||e==="")throw new Error("No input text");let s=gd.M,i,o;return typeof n<"u"&&(s=gd.from(n.errorCorrectionLevel,gd.M),i=$c.from(n.version),o=uh.from(n.maskPattern),n.toSJISFunc&&cu.setToSJISFunction(n.toSJISFunc)),GW(e,i,s,o)};var E1={},zf={};(function(t){function e(n){if(typeof n=="number"&&(n=n.toString()),typeof n!="string")throw new Error("Color should be defined as hex string");let s=n.slice().replace("#","").split("");if(s.length<3||s.length===5||s.length>8)throw new Error("Invalid hex color: "+n);(s.length===3||s.length===4)&&(s=Array.prototype.concat.apply([],s.map(function(o){return[o,o]}))),s.length===6&&s.push("F","F");const i=parseInt(s.join(""),16);return{r:i>>24&255,g:i>>16&255,b:i>>8&255,a:i&255,hex:"#"+s.slice(0,6).join("")}}t.getOptions=function(s){s||(s={}),s.color||(s.color={});const i=typeof s.margin>"u"||s.margin===null||s.margin<0?4:s.margin,o=s.width&&s.width>=21?s.width:void 0,r=s.scale||4;return{width:o,scale:o?4:r,margin:i,color:{dark:e(s.color.dark||"#000000ff"),light:e(s.color.light||"#ffffffff")},type:s.type,rendererOpts:s.rendererOpts||{}}},t.getScale=function(s,i){return i.width&&i.width>=s+i.margin*2?i.width/(s+i.margin*2):i.scale},t.getImageWidth=function(s,i){const o=t.getScale(s,i);return Math.floor((s+i.margin*2)*o)},t.qrToImageData=function(s,i,o){const r=i.modules.size,a=i.modules.data,l=t.getScale(r,o),c=Math.floor((r+o.margin*2)*l),u=o.margin*l,d=[o.color.light,o.color.dark];for(let f=0;f=u&&g>=u&&f"u"&&(!r||!r.getContext)&&(l=r,r=void 0),r||(c=s()),l=e.getOptions(l);const u=e.getImageWidth(o.modules.size,l),d=c.getContext("2d"),f=d.createImageData(u,u);return e.qrToImageData(f.data,o,l),n(d,c,u),d.putImageData(f,0,0),c},t.renderToDataURL=function(o,r,a){let l=a;typeof l>"u"&&(!r||!r.getContext)&&(l=r,r=void 0),l||(l={});const c=t.render(o,r,l),u=l.type||"image/png",d=l.rendererOpts||{};return c.toDataURL(u,d.quality)}})(E1);var T1={};const JW=zf;function X_(t,e){const n=t.a/255,s=e+'="'+t.hex+'"';return n<1?s+" "+e+'-opacity="'+n.toFixed(2).slice(1)+'"':s}function bd(t,e,n){let s=t+e;return typeof n<"u"&&(s+=" "+n),s}function XW(t,e,n){let s="",i=0,o=!1,r=0;for(let a=0;a0&&l>0&&t[a-1]||(s+=o?bd("M",l+n,.5+c+n):bd("m",i,0),i=0,o=!1),l+1':"",c="',u='viewBox="0 0 '+a+" "+a+'"',f=''+l+c+` -`;return typeof s=="function"&&s(null,f),f};const QW=dW,hh=g1,P1=E1,ZW=T1;function Kf(t,e,n,s,i){const o=[].slice.call(arguments,1),r=o.length,a=typeof o[r-1]=="function";if(!a&&!QW())throw new Error("Callback required as last argument");if(a){if(r<2)throw new Error("Too few arguments provided");r===2?(i=n,n=e,e=s=void 0):r===3&&(e.getContext&&typeof i>"u"?(i=s,s=void 0):(i=s,s=n,n=e,e=void 0))}else{if(r<1)throw new Error("Too few arguments provided");return r===1?(n=e,e=s=void 0):r===2&&!e.getContext&&(s=n,n=e,e=void 0),new Promise(function(l,c){try{const u=hh.create(n,s);l(t(u,e,s))}catch(u){c(u)}})}try{const l=hh.create(n,s);i(null,t(l,e,s))}catch(l){i(l)}}Io.create=hh.create;Io.toCanvas=Kf.bind(null,P1.render);Io.toDataURL=Kf.bind(null,P1.renderToDataURL);Io.toString=Kf.bind(null,function(t,e,n){return ZW.render(t,n)});const ez={name:"peerQRCode",components:{LocaleText:Ge},props:{peerConfigData:String},mounted(){Io.toCanvas(document.querySelector("#qrcode"),this.peerConfigData,t=>{t&&console.error(t)})}},tz={class:"peerSettingContainer w-100 h-100 position-absolute top-0 start-0"},nz={class:"container d-flex h-100 w-100"},sz={class:"m-auto modal-dialog-centered dashboardModal justify-content-center"},iz={class:"card rounded-3 shadow"},oz={class:"card-header bg-transparent d-flex align-items-center gap-2 border-0 p-4 pb-0"},rz={class:"mb-0"},az={class:"card-body"},lz={id:"qrcode",class:"rounded-3 shadow",ref:"qrcode"};function cz(t,e,n,s,i,o){const r=ke("LocaleText");return C(),F("div",tz,[h("div",nz,[h("div",sz,[h("div",iz,[h("div",oz,[h("h4",rz,[N(r,{t:"QR Code"})]),h("button",{type:"button",class:"btn-close ms-auto",onClick:e[0]||(e[0]=a=>this.$emit("close"))})]),h("div",az,[h("canvas",lz,null,512)])])])])])}const uz=je(ez,[["render",cz]]),dz={name:"nameInput",components:{LocaleText:Ge},props:{bulk:Boolean,data:Object,saving:Boolean}},hz={for:"peer_name_textbox",class:"form-label"},fz={class:"text-muted"},pz=["disabled"];function gz(t,e,n,s,i,o){const r=ke("LocaleText");return C(),F("div",{class:Ee({inactiveField:this.bulk})},[h("label",hz,[h("small",fz,[N(r,{t:"Name"})])]),Le(h("input",{type:"text",class:"form-control form-control-sm rounded-3",disabled:this.saving||this.bulk,"onUpdate:modelValue":e[0]||(e[0]=a=>this.data.name=a),id:"peer_name_textbox",placeholder:""},null,8,pz),[[We,this.data.name]])],2)}const mz=je(dz,[["render",gz]]),_z={name:"privatePublicKeyInput",components:{LocaleText:Ge},props:{data:Object,saving:Boolean,bulk:Boolean},setup(){return{dashboardStore:Xe()}},data(){return{keypair:{publicKey:"",privateKey:"",presharedKey:""},editKey:!1,error:!1}},methods:{genKeyPair(){this.editKey=!1,this.keypair=window.wireguard.generateKeypair(),this.data.private_key=this.keypair.privateKey,this.data.public_key=this.keypair.publicKey},testKey(t){return/^[A-Za-z0-9+/]{43}=?=?$/.test(t)},checkMatching(){try{this.keypair.privateKey&&this.testKey(this.keypair.privateKey)&&(this.keypair.publicKey=window.wireguard.generatePublicKey(this.keypair.privateKey),window.wireguard.generatePublicKey(this.keypair.privateKey)!==this.keypair.publicKey?(this.error=!0,this.dashboardStore.newMessage("WGDashboard","Private key does not match with the public key","danger")):(this.data.private_key=this.keypair.privateKey,this.data.public_key=this.keypair.publicKey))}catch{this.error=!0,this.data.private_key="",this.data.public_key=""}}},mounted(){this.genKeyPair()},watch:{keypair:{deep:!0,handler(){this.error=!1,this.checkMatching()}}}},bz={for:"peer_private_key_textbox",class:"form-label"},vz={class:"text-muted"},yz={class:"input-group"},wz=["disabled"],xz=["disabled"],kz=h("i",{class:"bi bi-arrow-repeat"},null,-1),Sz=[kz],$z={class:"d-flex"},Az={for:"public_key",class:"form-label"},Cz={class:"text-muted"},Ez={class:"form-check form-switch ms-auto"},Tz=["disabled"],Pz={class:"form-check-label",for:"enablePublicKeyEdit"},Mz=["disabled"];function Dz(t,e,n,s,i,o){const r=ke("LocaleText");return C(),F("div",{class:Ee(["d-flex gap-2 flex-column",{inactiveField:this.bulk}])},[h("div",null,[h("label",bz,[h("small",vz,[N(r,{t:"Private Key"}),h("code",null,[N(r,{t:"(Required for QR Code and Download)"})])])]),h("div",yz,[Le(h("input",{type:"text",class:Ee(["form-control form-control-sm rounded-start-3",{"is-invalid":this.error}]),"onUpdate:modelValue":e[0]||(e[0]=a=>this.keypair.privateKey=a),disabled:!this.editKey||this.bulk,onBlur:e[1]||(e[1]=a=>this.checkMatching()),id:"peer_private_key_textbox"},null,42,wz),[[We,this.keypair.privateKey]]),h("button",{class:"btn btn-outline-info btn-sm rounded-end-3",onClick:e[2]||(e[2]=a=>this.genKeyPair()),disabled:this.bulk,type:"button",id:"button-addon2"},Sz,8,xz)])]),h("div",null,[h("div",$z,[h("label",Az,[h("small",Cz,[N(r,{t:"Public Key"}),h("code",null,[N(r,{t:"(Required)"})])])]),h("div",Ez,[Le(h("input",{class:"form-check-input",type:"checkbox",role:"switch",disabled:this.bulk,id:"enablePublicKeyEdit","onUpdate:modelValue":e[3]||(e[3]=a=>this.editKey=a)},null,8,Tz),[[_n,this.editKey]]),h("label",Pz,[h("small",null,[N(r,{t:"Use your own Private and Public Key"})])])])]),Le(h("input",{class:Ee(["form-control-sm form-control rounded-3",{"is-invalid":this.error}]),"onUpdate:modelValue":e[4]||(e[4]=a=>this.keypair.publicKey=a),onBlur:e[5]||(e[5]=a=>this.checkMatching()),disabled:!this.editKey||this.bulk,type:"text",id:"public_key"},null,42,Mz),[[We,this.keypair.publicKey]])])],2)}const Oz=je(_z,[["render",Dz]]),Iz={name:"allowedIPsInput",components:{LocaleText:Ge},props:{data:Object,saving:Boolean,bulk:Boolean,availableIp:void 0},data(){return{allowedIp:[],availableIpSearchString:"",customAvailableIp:"",allowedIpFormatError:!1}},setup(){const t=Pn(),e=Xe();return{store:t,dashboardStore:e}},computed:{searchAvailableIps(){return this.availableIpSearchString?this.availableIp.filter(t=>t.includes(this.availableIpSearchString)&&!this.data.allowed_ips.includes(t)):this.availableIp.filter(t=>!this.data.allowed_ips.includes(t))},inputGetLocale(){return dt("Enter IP Address/CIDR")}},methods:{addAllowedIp(t){return this.store.checkCIDR(t)?(this.data.allowed_ips.push(t),this.customAvailableIp="",!0):(this.allowedIpFormatError=!0,this.dashboardStore.newMessage("WGDashboard","Allowed IPs is invalid","danger"),!1)}},watch:{customAvailableIp(){this.allowedIpFormatError=!1},availableIp(){this.availableIp!==void 0&&this.availableIp.length>0&&this.addAllowedIp(this.availableIp[0])}},mounted(){}},uu=t=>(qt("data-v-6d5fc831"),t=t(),Gt(),t),Lz={for:"peer_allowed_ip_textbox",class:"form-label"},Rz={class:"text-muted"},Nz=["onClick"],Fz=uu(()=>h("i",{class:"bi bi-x-circle-fill ms-1"},null,-1)),Bz=[Fz],Vz={class:"d-flex gap-2 align-items-center"},Hz={class:"input-group"},jz=["placeholder","disabled"],Wz=["disabled"],zz=uu(()=>h("i",{class:"bi bi-plus-lg"},null,-1)),Kz=[zz],Yz={class:"text-muted"},Uz={class:"dropdown flex-grow-1"},qz=["disabled"],Gz=uu(()=>h("i",{class:"bi bi-filter-circle me-2"},null,-1)),Jz={key:0,class:"dropdown-menu mt-2 shadow w-100 dropdown-menu-end rounded-3",style:{"overflow-y":"scroll","max-height":"270px",width:"300px !important"}},Xz={class:"px-3 pb-2 pt-1 d-flex gap-3 align-items-center"},Qz=uu(()=>h("label",{for:"availableIpSearchString",class:"text-muted"},[h("i",{class:"bi bi-search"})],-1)),Zz=["onClick"],eK={class:"me-auto"},tK={key:0},nK={class:"px-3 text-muted"};function sK(t,e,n,s,i,o){const r=ke("LocaleText");return C(),F("div",{class:Ee({inactiveField:this.bulk})},[h("label",Lz,[h("small",Rz,[N(r,{t:"Allowed IPs"}),h("code",null,[N(r,{t:"(Required)"})])])]),h("div",{class:Ee(["d-flex gap-2 flex-wrap",{"mb-2":this.data.allowed_ips.length>0}])},[N(Ni,{name:"list"},{default:Pe(()=>[(C(!0),F(Me,null,Ke(this.data.allowed_ips,(a,l)=>(C(),F("span",{class:"badge rounded-pill text-bg-success",key:a},[He(xe(a)+" ",1),h("a",{role:"button",onClick:c=>this.data.allowed_ips.splice(l,1)},Bz,8,Nz)]))),128))]),_:1})],2),h("div",Vz,[h("div",Hz,[Le(h("input",{type:"text",class:Ee(["form-control form-control-sm rounded-start-3",{"is-invalid":this.allowedIpFormatError}]),placeholder:this.inputGetLocale,"onUpdate:modelValue":e[0]||(e[0]=a=>i.customAvailableIp=a),disabled:n.bulk},null,10,jz),[[We,i.customAvailableIp]]),h("button",{class:"btn btn-outline-success btn-sm rounded-end-3",disabled:n.bulk||!this.customAvailableIp,onClick:e[1]||(e[1]=a=>this.addAllowedIp(this.customAvailableIp)),type:"button",id:"button-addon2"},Kz,8,Wz)]),h("small",Yz,[N(r,{t:"or"})]),h("div",Uz,[h("button",{class:"btn btn-outline-secondary btn-sm dropdown-toggle rounded-3 w-100",disabled:!n.availableIp||n.bulk,"data-bs-auto-close":"outside",type:"button","data-bs-toggle":"dropdown","aria-expanded":"false"},[Gz,N(r,{t:"Pick Available IP"})],8,qz),this.availableIp?(C(),F("ul",Jz,[h("li",null,[h("div",Xz,[Qz,Le(h("input",{id:"availableIpSearchString",class:"form-control form-control-sm rounded-3","onUpdate:modelValue":e[2]||(e[2]=a=>this.availableIpSearchString=a)},null,512),[[We,this.availableIpSearchString]])])]),(C(!0),F(Me,null,Ke(this.searchAvailableIps,a=>(C(),F("li",null,[h("a",{class:"dropdown-item d-flex",role:"button",onClick:l=>this.addAllowedIp(a)},[h("span",eK,[h("small",null,xe(a),1)])],8,Zz)]))),256)),this.searchAvailableIps.length===0?(C(),F("li",tK,[h("small",nK,[N(r,{t:"No available IP containing"}),He(' "'+xe(this.availableIpSearchString)+'"',1)])])):re("",!0)])):re("",!0)])])],2)}const iK=je(Iz,[["render",sK],["__scopeId","data-v-6d5fc831"]]),oK={name:"dnsInput",components:{LocaleText:Ge},props:{data:Object,saving:Boolean},data(){return{error:!1,dns:JSON.parse(JSON.stringify(this.data.DNS))}},setup(){const t=Pn(),e=Xe();return{store:t,dashboardStore:e}},methods:{checkDNS(){if(this.dns){let t=this.dns.split(",").map(e=>e.replaceAll(" ",""));for(let e in t)if(!this.store.regexCheckIP(t[e])){this.error||this.dashboardStore.newMessage("WGDashboard","DNS format is incorrect","danger"),this.error=!0,this.data.DNS="";return}this.error=!1,this.data.DNS=this.dns}}},watch:{dns(){this.checkDNS()}}},rK={for:"peer_DNS_textbox",class:"form-label"},aK={class:"text-muted"},lK=["disabled"];function cK(t,e,n,s,i,o){const r=ke("LocaleText");return C(),F("div",null,[h("label",rK,[h("small",aK,[N(r,{t:"DNS"})])]),Le(h("input",{type:"text",class:Ee(["form-control form-control-sm rounded-3",{"is-invalid":this.error}]),disabled:this.saving,"onUpdate:modelValue":e[0]||(e[0]=a=>this.dns=a),id:"peer_DNS_textbox"},null,10,lK),[[We,this.dns]])])}const uK=je(oK,[["render",cK]]),dK={name:"endpointAllowedIps",components:{LocaleText:Ge},props:{data:Object,saving:Boolean},setup(){const t=Pn(),e=Xe();return{store:t,dashboardStore:e}},data(){return{endpointAllowedIps:JSON.parse(JSON.stringify(this.data.endpoint_allowed_ip)),error:!1}},methods:{checkAllowedIP(){let t=this.endpointAllowedIps.split(",").map(e=>e.replaceAll(" ",""));for(let e in t)if(!this.store.checkCIDR(t[e])){this.error||this.dashboardStore.newMessage("WGDashboard","Endpoint Allowed IPs format is incorrect","danger"),this.data.endpoint_allowed_ip="",this.error=!0;return}this.error=!1,this.data.endpoint_allowed_ip=this.endpointAllowedIps}},watch:{endpointAllowedIps(){this.checkAllowedIP()}}},hK={for:"peer_endpoint_allowed_ips",class:"form-label"},fK={class:"text-muted"},pK=["disabled"];function gK(t,e,n,s,i,o){const r=ke("LocaleText");return C(),F("div",null,[h("label",hK,[h("small",fK,[N(r,{t:"Endpoint Allowed IPs"}),h("code",null,[N(r,{t:"(Required)"})])])]),Le(h("input",{type:"text",class:Ee(["form-control form-control-sm rounded-3",{"is-invalid":i.error}]),disabled:this.saving,"onUpdate:modelValue":e[0]||(e[0]=a=>this.endpointAllowedIps=a),onBlur:e[1]||(e[1]=a=>this.checkAllowedIP()),id:"peer_endpoint_allowed_ips"},null,42,pK),[[We,this.endpointAllowedIps]])])}const mK=je(dK,[["render",gK]]),_K={name:"presharedKeyInput",components:{LocaleText:Ge},props:{data:Object,saving:Boolean},data(){return{enable:!1}},watch:{enable(){this.enable?this.data.preshared_key=window.wireguard.generateKeypair().presharedKey:this.data.preshared_key=""}}},bK={class:"d-flex align-items-start"},vK={for:"peer_preshared_key_textbox",class:"form-label"},yK={class:"text-muted"},wK={class:"form-check form-switch ms-auto"},xK=["disabled"];function kK(t,e,n,s,i,o){const r=ke("LocaleText");return C(),F("div",null,[h("div",bK,[h("label",vK,[h("small",yK,[N(r,{t:"Pre-Shared Key"})])]),h("div",wK,[Le(h("input",{class:"form-check-input",type:"checkbox",role:"switch","onUpdate:modelValue":e[0]||(e[0]=a=>this.enable=a),id:"peer_preshared_key_switch"},null,512),[[_n,this.enable]])])]),Le(h("input",{type:"text",class:"form-control form-control-sm rounded-3",disabled:this.saving||!this.enable,"onUpdate:modelValue":e[1]||(e[1]=a=>this.data.preshared_key=a),id:"peer_preshared_key_textbox"},null,8,xK),[[We,this.data.preshared_key]])])}const SK=je(_K,[["render",kK]]),$K={name:"mtuInput",components:{LocaleText:Ge},props:{data:Object,saving:Boolean}},AK={for:"peer_mtu",class:"form-label"},CK={class:"text-muted"},EK=["disabled"];function TK(t,e,n,s,i,o){const r=ke("LocaleText");return C(),F("div",null,[h("label",AK,[h("small",CK,[N(r,{t:"MTU"})])]),Le(h("input",{type:"number",class:"form-control form-control-sm rounded-3",disabled:this.saving,"onUpdate:modelValue":e[0]||(e[0]=a=>this.data.mtu=a),id:"peer_mtu"},null,8,EK),[[We,this.data.mtu]])])}const PK=je($K,[["render",TK]]),MK={name:"persistentKeepAliveInput",components:{LocaleText:Ge},props:{data:Object,saving:Boolean}},DK={for:"peer_keep_alive",class:"form-label"},OK={class:"text-muted"},IK=["disabled"];function LK(t,e,n,s,i,o){const r=ke("LocaleText");return C(),F("div",null,[h("label",DK,[h("small",OK,[N(r,{t:"Persistent Keepalive"})])]),Le(h("input",{type:"number",class:"form-control form-control-sm rounded-3",disabled:this.saving,"onUpdate:modelValue":e[0]||(e[0]=a=>this.data.keepalive=a),id:"peer_keep_alive"},null,8,IK),[[We,this.data.keepalive]])])}const RK=je(MK,[["render",LK]]),NK={name:"bulkAdd",components:{LocaleText:Ge},props:{saving:Boolean,data:Object,availableIp:void 0},computed:{bulkAddGetLocale(){return dt("How many peers you want to add?")}}},FK={class:"form-check form-switch"},BK=["disabled"],VK={class:"form-check-label me-2",for:"bulk_add"},HK={class:"text-muted d-block"},jK={key:0,class:"form-group"},WK=["max","placeholder"],zK={class:"text-muted"};function KK(t,e,n,s,i,o){const r=ke("LocaleText");return C(),F("div",null,[h("div",FK,[Le(h("input",{class:"form-check-input",type:"checkbox",role:"switch",disabled:!this.availableIp,id:"bulk_add","onUpdate:modelValue":e[0]||(e[0]=a=>this.data.bulkAdd=a)},null,8,BK),[[_n,this.data.bulkAdd]]),h("label",VK,[h("small",null,[h("strong",null,[N(r,{t:"Bulk Add"})])])])]),h("p",{class:Ee({"mb-0":!this.data.bulkAdd})},[h("small",HK,[N(r,{t:"By adding peers by bulk, each peer's name will be auto generated, and Allowed IP will be assign to the next available IP."})])],2),this.data.bulkAdd?(C(),F("div",jK,[Le(h("input",{class:"form-control form-control-sm rounded-3 mb-1",type:"number",min:"1",max:this.availableIp.length,"onUpdate:modelValue":e[1]||(e[1]=a=>this.data.bulkAddAmount=a),placeholder:this.bulkAddGetLocale},null,8,WK),[[We,this.data.bulkAddAmount]]),h("small",zK,[N(r,{t:"You can add up to "+this.availableIp.length+" peers"},null,8,["t"])])])):re("",!0)])}const YK=je(NK,[["render",KK]]),UK={name:"peerCreate",components:{LocaleText:Ge,BulkAdd:YK,PersistentKeepAliveInput:RK,MtuInput:PK,PresharedKeyInput:SK,EndpointAllowedIps:mK,DnsInput:uK,AllowedIPsInput:iK,PrivatePublicKeyInput:Oz,NameInput:mz},data(){return{data:{bulkAdd:!1,bulkAddAmount:"",name:"",allowed_ips:[],private_key:"",public_key:"",DNS:this.dashboardStore.Configuration.Peers.peer_global_dns,endpoint_allowed_ip:this.dashboardStore.Configuration.Peers.peer_endpoint_allowed_ip,keepalive:parseInt(this.dashboardStore.Configuration.Peers.peer_keep_alive),mtu:parseInt(this.dashboardStore.Configuration.Peers.peer_mtu),preshared_key:"",preshared_key_bulkAdd:!1},availableIp:void 0,availableIpSearchString:"",saving:!1,allowedIpDropdown:void 0}},mounted(){kt("/api/getAvailableIPs/"+this.$route.params.id,{},t=>{t.status&&(this.availableIp=t.data)})},setup(){const t=Pn(),e=Xe();return{store:t,dashboardStore:e}},methods:{peerCreate(){this.saving=!0,ht("/api/addPeers/"+this.$route.params.id,this.data,t=>{t.status?(this.$router.push(`/configuration/${this.$route.params.id}/peers`),this.dashboardStore.newMessage("Server","Peer created successfully","success")):this.dashboardStore.newMessage("Server",t.message,"danger"),this.saving=!1})}},computed:{allRequireFieldsFilled(){let t=!0;return this.data.bulkAdd?(this.data.bulkAddAmount.length===0||this.data.bulkAddAmount>this.availableIp.length)&&(t=!1):["allowed_ips","private_key","public_key","endpoint_allowed_ip","keepalive","mtu"].forEach(n=>{this.data[n].length===0&&(t=!1)}),t}},watch:{bulkAdd(t){t||(this.data.bulkAddAmount="")},"data.bulkAddAmount"(){this.data.bulkAddAmount>this.availableIp.length&&(this.data.bulkAddAmount=this.availableIp.length)}}},Yf=t=>(qt("data-v-9235694d"),t=t(),Gt(),t),qK={class:"container"},GK={class:"mb-4"},JK=Yf(()=>h("h3",{class:"mb-0 text-body"},[h("i",{class:"bi bi-chevron-left"})],-1)),XK={class:"text-body mb-0"},QK={class:"d-flex flex-column gap-2"},ZK=Yf(()=>h("hr",{class:"mb-0 mt-2"},null,-1)),eY=Yf(()=>h("hr",{class:"mb-0 mt-2"},null,-1)),tY={class:"row gy-3"},nY={key:0,class:"col-sm"},sY={class:"col-sm"},iY={class:"col-sm"},oY={key:1,class:"col-12"},rY={class:"form-check form-switch"},aY={class:"form-check-label",for:"bullAdd_PresharedKey_Switch"},lY={class:"fw-bold"},cY={class:"d-flex mt-2"},uY=["disabled"],dY={key:0,class:"bi bi-plus-circle-fill me-2"};function hY(t,e,n,s,i,o){const r=ke("LocaleText"),a=ke("RouterLink"),l=ke("BulkAdd"),c=ke("NameInput"),u=ke("PrivatePublicKeyInput"),d=ke("AllowedIPsInput"),f=ke("EndpointAllowedIps"),g=ke("DnsInput"),_=ke("PresharedKeyInput"),m=ke("MtuInput"),y=ke("PersistentKeepAliveInput");return C(),F("div",qK,[h("div",GK,[N(a,{to:"peers",is:"div",class:"d-flex align-items-center gap-4 text-decoration-none"},{default:Pe(()=>[JK,h("h3",XK,[N(r,{t:"Add Peers"})])]),_:1})]),h("div",QK,[N(l,{saving:i.saving,data:this.data,availableIp:this.availableIp},null,8,["saving","data","availableIp"]),ZK,this.data.bulkAdd?re("",!0):(C(),Se(c,{key:0,saving:i.saving,data:this.data},null,8,["saving","data"])),this.data.bulkAdd?re("",!0):(C(),Se(u,{key:1,saving:i.saving,data:i.data},null,8,["saving","data"])),this.data.bulkAdd?re("",!0):(C(),Se(d,{key:2,availableIp:this.availableIp,saving:i.saving,data:i.data},null,8,["availableIp","saving","data"])),N(f,{saving:i.saving,data:i.data},null,8,["saving","data"]),N(g,{saving:i.saving,data:i.data},null,8,["saving","data"]),eY,h("div",tY,[this.data.bulkAdd?re("",!0):(C(),F("div",nY,[N(_,{saving:i.saving,data:i.data,bulk:this.data.bulkAdd},null,8,["saving","data","bulk"])])),h("div",sY,[N(m,{saving:i.saving,data:i.data},null,8,["saving","data"])]),h("div",iY,[N(y,{saving:i.saving,data:i.data},null,8,["saving","data"])]),this.data.bulkAdd?(C(),F("div",oY,[h("div",rY,[Le(h("input",{class:"form-check-input",type:"checkbox",role:"switch","onUpdate:modelValue":e[0]||(e[0]=v=>this.data.preshared_key_bulkAdd=v),id:"bullAdd_PresharedKey_Switch",checked:""},null,512),[[_n,this.data.preshared_key_bulkAdd]]),h("label",aY,[h("small",lY,[N(r,{t:"Pre-Shared Key"}),this.data.preshared_key_bulkAdd?(C(),Se(r,{key:0,t:"Enabled"})):(C(),Se(r,{key:1,t:"Disabled"}))])])])])):re("",!0)]),h("div",cY,[h("button",{class:"ms-auto btn btn-dark btn-brand rounded-3 px-3 py-2 shadow",disabled:!this.allRequireFieldsFilled||this.saving,onClick:e[1]||(e[1]=v=>this.peerCreate())},[this.saving?re("",!0):(C(),F("i",dY)),this.saving?(C(),Se(r,{key:1,t:"Adding..."})):(C(),Se(r,{key:2,t:"Add"}))],8,uY)])])])}const M1=je(UK,[["render",hY],["__scopeId","data-v-9235694d"]]),fY={name:"scheduleDropdown",props:{options:Array,data:String,edit:!1},setup(t){t.data===void 0&&this.$emit("update",this.options[0].value)},computed:{currentSelection(){return this.options.find(t=>t.value===this.data)}}},pY={class:"dropdown scheduleDropdown"},gY={class:"dropdown-menu rounded-3 shadow",style:{"font-size":"0.875rem",width:"200px"}},mY=["onClick"],_Y={key:0,class:"bi bi-check ms-auto"};function bY(t,e,n,s,i,o){return C(),F("div",pY,[h("button",{class:Ee(["btn btn-sm btn-outline-primary rounded-3",{"disabled border-transparent":!n.edit}]),type:"button","data-bs-toggle":"dropdown","aria-expanded":"false"},[h("samp",null,xe(this.currentSelection.display),1)],2),h("ul",gY,[n.edit?(C(!0),F(Me,{key:0},Ke(this.options,r=>(C(),F("li",null,[h("a",{class:"dropdown-item d-flex align-items-center",role:"button",onClick:a=>t.$emit("update",r.value)},[h("samp",null,xe(r.display),1),r.value===this.currentSelection.value?(C(),F("i",_Y)):re("",!0)],8,mY)]))),256)):re("",!0)])])}const D1=je(fY,[["render",bY],["__scopeId","data-v-6a5aba2a"]]),vY={name:"schedulePeerJob",components:{LocaleText:Ge,VueDatePicker:Xa,ScheduleDropdown:D1},props:{dropdowns:Array[Object],pjob:Object,viewOnly:!1},setup(t){const e=be({}),n=be(!1),s=be(!1);e.value=JSON.parse(JSON.stringify(t.pjob)),e.value.CreationDate||(n.value=!0,s.value=!0);const i=Xe();return{job:e,edit:n,newJob:s,store:i}},data(){return{inputType:void 0}},watch:{pjob:{deep:!0,immediate:!0,handler(t){this.edit||(this.job=JSON.parse(JSON.stringify(t)))}}},methods:{save(){this.job.Field&&this.job.Operator&&this.job.Action&&this.job.Value?ht("/api/savePeerScheduleJob/",{Job:this.job},t=>{t.status?(this.edit=!1,this.store.newMessage("Server","Peer job saved","success"),console.log(t.data),this.$emit("refresh",t.data[0]),this.newJob=!1):this.store.newMessage("Server",t.message,"danger")}):this.alert()},alert(){let t="animate__flash",e=this.$el.querySelectorAll(".scheduleDropdown"),n=this.$el.querySelectorAll("input");e.forEach(s=>s.classList.add("animate__animated",t)),n.forEach(s=>s.classList.add("animate__animated",t)),setTimeout(()=>{e.forEach(s=>s.classList.remove("animate__animated",t)),n.forEach(s=>s.classList.remove("animate__animated",t))},2e3)},reset(){this.job.CreationDate?(this.job=JSON.parse(JSON.stringify(this.pjob)),this.edit=!1):this.$emit("delete")},delete(){this.job.CreationDate&&ht("/api/deletePeerScheduleJob/",{Job:this.job},t=>{t.status?this.store.newMessage("Server","Peer job deleted","success"):(this.store.newMessage("Server",t.message,"danger"),this.$emit("delete"))}),this.$emit("delete")},parseTime(t){t&&(this.job.Value=Cn(t).format("YYYY-MM-DD HH:mm:ss"))}}},yY=t=>(qt("data-v-8f3f1b93"),t=t(),Gt(),t),wY={class:"card-header bg-transparent text-muted border-0"},xY={key:0,class:"d-flex"},kY={class:"me-auto"},SY={key:1},$Y={class:"badge text-bg-warning"},AY={class:"card-body pt-1",style:{"font-family":"var(--bs-font-monospace)"}},CY={class:"d-flex gap-2 align-items-center mb-2"},EY=["disabled"],TY={class:"px-5 d-flex gap-2 align-items-center"},PY={class:"d-flex gap-3"},MY=yY(()=>h("samp",null,"}",-1)),DY={key:0,class:"ms-auto d-flex gap-3"},OY={key:1,class:"ms-auto d-flex gap-3"};function IY(t,e,n,s,i,o){const r=ke("LocaleText"),a=ke("ScheduleDropdown"),l=ke("VueDatePicker");return C(),F("div",{class:Ee(["card shadow-sm rounded-3 mb-2",{"border-warning-subtle":this.newJob}])},[h("div",wY,[this.newJob?(C(),F("small",SY,[h("span",$Y,[N(r,{t:"Unsaved Job"})])])):(C(),F("small",xY,[h("strong",kY,[N(r,{t:"Job ID"})]),h("samp",null,xe(this.job.JobID),1)]))]),h("div",AY,[h("div",CY,[h("samp",null,[N(r,{t:"if"})]),N(a,{edit:s.edit,options:this.dropdowns.Field,data:this.job.Field,onUpdate:e[0]||(e[0]=c=>{this.job.Field=c})},null,8,["edit","options","data"]),h("samp",null,[N(r,{t:"is"})]),N(a,{edit:s.edit,options:this.dropdowns.Operator,data:this.job.Operator,onUpdate:e[1]||(e[1]=c=>this.job.Operator=c)},null,8,["edit","options","data"]),this.job.Field==="date"?(C(),Se(l,{key:0,is24:!0,"min-date":new Date,"model-value":this.job.Value,"onUpdate:modelValue":this.parseTime,"time-picker-inline":"",format:"yyyy-MM-dd HH:mm:ss","preview-format":"yyyy-MM-dd HH:mm:ss",clearable:!1,disabled:!s.edit,dark:this.store.Configuration.Server.dashboard_theme==="dark"},null,8,["min-date","model-value","onUpdate:modelValue","disabled","dark"])):Le((C(),F("input",{key:1,class:"form-control form-control-sm form-control-dark rounded-3 flex-grow-1",disabled:!s.edit,"onUpdate:modelValue":e[2]||(e[2]=c=>this.job.Value=c),style:{width:"auto"}},null,8,EY)),[[We,this.job.Value]]),h("samp",null,xe(this.dropdowns.Field.find(c=>c.value===this.job.Field)?.unit)+" { ",1)]),h("div",TY,[h("samp",null,[N(r,{t:"then"})]),N(a,{edit:s.edit,options:this.dropdowns.Action,data:this.job.Action,onUpdate:e[3]||(e[3]=c=>this.job.Action=c)},null,8,["edit","options","data"])]),h("div",PY,[MY,this.edit?(C(),F("div",OY,[h("a",{role:"button",class:"text-secondary text-decoration-none",onClick:e[6]||(e[6]=c=>this.reset())},[He("[C] "),N(r,{t:"Cancel"})]),h("a",{role:"button",class:"text-primary ms-auto text-decoration-none",onClick:e[7]||(e[7]=c=>this.save())},[He("[S] "),N(r,{t:"Save"})])])):(C(),F("div",DY,[h("a",{role:"button",class:"ms-auto text-decoration-none",onClick:e[4]||(e[4]=c=>this.edit=!0)},[He("[E] "),N(r,{t:"Edit"})]),h("a",{role:"button",onClick:e[5]||(e[5]=c=>this.delete()),class:"text-danger text-decoration-none"},[He("[D] "),N(r,{t:"Delete"})])]))])])],2)}const O1=je(vY,[["render",IY],["__scopeId","data-v-8f3f1b93"]]),LY={name:"peerJobs",setup(){return{store:Pn()}},props:{selectedPeer:Object},components:{LocaleText:Ge,SchedulePeerJob:O1,ScheduleDropdown:D1},data(){return{}},methods:{deleteJob(t){this.selectedPeer.jobs=this.selectedPeer.jobs.filter(e=>e.JobID!==t.JobID)},addJob(){this.selectedPeer.jobs.unshift(JSON.parse(JSON.stringify({JobID:Es().toString(),Configuration:this.selectedPeer.configuration.Name,Peer:this.selectedPeer.id,Field:this.store.PeerScheduleJobs.dropdowns.Field[0].value,Operator:this.store.PeerScheduleJobs.dropdowns.Operator[0].value,Value:"",CreationDate:"",ExpireDate:"",Action:this.store.PeerScheduleJobs.dropdowns.Action[0].value})))}}},RY=t=>(qt("data-v-5bbdd42b"),t=t(),Gt(),t),NY={class:"peerSettingContainer w-100 h-100 position-absolute top-0 start-0 overflow-y-scroll"},FY={class:"container d-flex h-100 w-100"},BY={class:"m-auto modal-dialog-centered dashboardModal"},VY={class:"card rounded-3 shadow",style:{width:"700px"}},HY={class:"card-header bg-transparent d-flex align-items-center gap-2 border-0 p-4 pb-2"},jY={class:"mb-0 fw-normal"},WY={class:"card-body px-4 pb-4 pt-2 position-relative"},zY={class:"d-flex align-items-center mb-3"},KY=RY(()=>h("i",{class:"bi bi-plus-lg me-2"},null,-1)),YY={class:"card shadow-sm",key:"none",style:{height:"153px"}},UY={class:"card-body text-muted text-center d-flex"},qY={class:"m-auto"};function GY(t,e,n,s,i,o){const r=ke("LocaleText"),a=ke("SchedulePeerJob");return C(),F("div",NY,[h("div",FY,[h("div",BY,[h("div",VY,[h("div",HY,[h("h4",jY,[N(r,{t:"Schedule Jobs"})]),h("button",{type:"button",class:"btn-close ms-auto",onClick:e[0]||(e[0]=l=>this.$emit("close"))})]),h("div",WY,[h("div",zY,[h("button",{class:"btn bg-primary-subtle border-1 border-primary-subtle text-primary-emphasis rounded-3 shadow",onClick:e[1]||(e[1]=l=>this.addJob())},[KY,N(r,{t:"Job"})])]),N(Ni,{name:"schedulePeerJobTransition",tag:"div",class:"position-relative"},{default:Pe(()=>[(C(!0),F(Me,null,Ke(this.selectedPeer.jobs,(l,c)=>(C(),Se(a,{onRefresh:e[2]||(e[2]=u=>this.$emit("refresh")),onDelete:u=>this.deleteJob(l),dropdowns:this.store.PeerScheduleJobs.dropdowns,key:l.JobID,pjob:l},null,8,["onDelete","dropdowns","pjob"]))),128)),this.selectedPeer.jobs.length===0?(C(),F("div",YY,[h("div",UY,[h("h6",qY,[N(r,{t:"This peer does not have any job yet."})])])])):re("",!0)]),_:1})])])])])])}const JY=je(LY,[["render",GY],["__scopeId","data-v-5bbdd42b"]]),XY={name:"peerJobsAllModal",setup(){return{store:Pn()}},components:{LocaleText:Ge,SchedulePeerJob:O1},props:{configurationPeers:Array[Object]},methods:{getuuid(){return Es()}},computed:{getAllJobs(){return this.configurationPeers.filter(t=>t.jobs.length>0)}}},QY={class:"peerSettingContainer w-100 h-100 position-absolute top-0 start-0 overflow-y-scroll"},ZY={class:"container d-flex h-100 w-100"},eU={class:"m-auto modal-dialog-centered dashboardModal"},tU={class:"card rounded-3 shadow",style:{width:"700px"}},nU={class:"card-header bg-transparent d-flex align-items-center gap-2 border-0 p-4 pb-2"},sU={class:"mb-0 fw-normal"},iU={class:"card-body px-4 pb-4 pt-2"},oU={key:0,class:"accordion",id:"peerJobsLogsModalAccordion"},rU={class:"accordion-header"},aU=["data-bs-target"],lU={key:0},cU={class:"text-muted"},uU=["id"],dU={class:"accordion-body"},hU={key:1,class:"card shadow-sm",style:{height:"153px"}},fU={class:"card-body text-muted text-center d-flex"},pU={class:"m-auto"};function gU(t,e,n,s,i,o){const r=ke("LocaleText"),a=ke("SchedulePeerJob");return C(),F("div",QY,[h("div",ZY,[h("div",eU,[h("div",tU,[h("div",nU,[h("h4",sU,[N(r,{t:"All Active Jobs"})]),h("button",{type:"button",class:"btn-close ms-auto",onClick:e[0]||(e[0]=l=>this.$emit("close"))})]),h("div",iU,[this.getAllJobs.length>0?(C(),F("div",oU,[(C(!0),F(Me,null,Ke(this.getAllJobs,(l,c)=>(C(),F("div",{class:"accordion-item",key:l.id},[h("h2",rU,[h("button",{class:"accordion-button collapsed",type:"button","data-bs-toggle":"collapse","data-bs-target":"#collapse_"+c},[h("small",null,[h("strong",null,[l.name?(C(),F("span",lU,xe(l.name)+" • ",1)):re("",!0),h("samp",cU,xe(l.id),1)])])],8,aU)]),h("div",{id:"collapse_"+c,class:"accordion-collapse collapse","data-bs-parent":"#peerJobsLogsModalAccordion"},[h("div",dU,[(C(!0),F(Me,null,Ke(l.jobs,u=>(C(),Se(a,{onDelete:e[1]||(e[1]=d=>this.$emit("refresh")),onRefresh:e[2]||(e[2]=d=>this.$emit("refresh")),dropdowns:this.store.PeerScheduleJobs.dropdowns,viewOnly:!0,key:u.JobID,pjob:u},null,8,["dropdowns","pjob"]))),128))])],8,uU)]))),128))])):(C(),F("div",hU,[h("div",fU,[h("span",pU,[N(r,{t:"No active job at the moment."})])])]))])])])])])}const mU=je(XY,[["render",gU]]),_U={name:"peerJobsLogsModal",components:{LocaleText:Ge},props:{configurationInfo:Object},data(){return{dataLoading:!0,data:[],logFetchTime:void 0,showLogID:!1,showJobID:!0,showSuccessJob:!0,showFailedJob:!0,showLogAmount:10}},async mounted(){await this.fetchLog()},methods:{async fetchLog(){this.dataLoading=!0,await kt(`/api/getPeerScheduleJobLogs/${this.configurationInfo.Name}`,{},t=>{this.data=t.data,this.logFetchTime=Cn().format("YYYY-MM-DD HH:mm:ss"),this.dataLoading=!1})}},computed:{getLogs(){return this.data.filter(t=>this.showSuccessJob&&t.Status==="1"||this.showFailedJob&&t.Status==="0")},showLogs(){return this.getLogs.slice(0,this.showLogAmount)}}},bU={class:"peerSettingContainer w-100 h-100 position-absolute top-0 start-0 overflow-y-scroll"},vU={class:"container-fluid d-flex h-100 w-100"},yU={class:"m-auto mt-0 modal-dialog-centered dashboardModal",style:{width:"100%"}},wU={class:"card rounded-3 shadow w-100"},xU={class:"card-header bg-transparent d-flex align-items-center gap-2 border-0 p-4 pb-0"},kU={class:"mb-0"},SU={class:"card-body px-4 pb-4 pt-2"},$U={key:0},AU={class:"mb-2 d-flex gap-3"},CU=h("i",{class:"bi bi-arrow-clockwise me-2"},null,-1),EU={class:"d-flex gap-3 align-items-center"},TU={class:"text-muted"},PU={class:"form-check"},MU={class:"form-check-label",for:"jobLogsShowSuccessCheck"},DU={class:"badge text-success-emphasis bg-success-subtle"},OU={class:"form-check"},IU={class:"form-check-label",for:"jobLogsShowFailedCheck"},LU={class:"badge text-danger-emphasis bg-danger-subtle"},RU={class:"d-flex gap-3 align-items-center ms-auto"},NU={class:"text-muted"},FU={class:"form-check"},BU={class:"form-check-label",for:"jobLogsShowJobIDCheck"},VU={class:"form-check"},HU={class:"form-check-label",for:"jobLogsShowLogIDCheck"},jU={class:"table"},WU={scope:"col"},zU={key:0,scope:"col"},KU={key:1,scope:"col"},YU={scope:"col"},UU={scope:"col"},qU={style:{"font-size":"0.875rem"}},GU={scope:"row"},JU={key:0},XU={class:"text-muted"},QU={key:1},ZU={class:"text-muted"},e7={class:"d-flex gap-2"},t7=h("i",{class:"bi bi-chevron-down me-2"},null,-1),n7=h("i",{class:"bi bi-chevron-up me-2"},null,-1),s7={key:1,class:"d-flex align-items-center flex-column"},i7=h("div",{class:"spinner-border text-body",role:"status"},[h("span",{class:"visually-hidden"},"Loading...")],-1),o7=[i7];function r7(t,e,n,s,i,o){const r=ke("LocaleText");return C(),F("div",bU,[h("div",vU,[h("div",yU,[h("div",wU,[h("div",xU,[h("h4",kU,[N(r,{t:"Jobs Logs"})]),h("button",{type:"button",class:"btn-close ms-auto",onClick:e[0]||(e[0]=a=>this.$emit("close"))})]),h("div",SU,[this.dataLoading?(C(),F("div",s7,o7)):(C(),F("div",$U,[h("p",null,[N(r,{t:"Updated at"}),He(" : "+xe(this.logFetchTime),1)]),h("div",AU,[h("button",{onClick:e[1]||(e[1]=a=>this.fetchLog()),class:"btn btn-sm rounded-3 shadow-sm text-info-emphasis bg-info-subtle border-1 border-info-subtle me-1"},[CU,N(r,{t:"Refresh"})]),h("div",EU,[h("span",TU,[N(r,{t:"Filter"})]),h("div",PU,[Le(h("input",{class:"form-check-input",type:"checkbox","onUpdate:modelValue":e[2]||(e[2]=a=>this.showSuccessJob=a),id:"jobLogsShowSuccessCheck"},null,512),[[_n,this.showSuccessJob]]),h("label",MU,[h("span",DU,[N(r,{t:"Success"})])])]),h("div",OU,[Le(h("input",{class:"form-check-input",type:"checkbox","onUpdate:modelValue":e[3]||(e[3]=a=>this.showFailedJob=a),id:"jobLogsShowFailedCheck"},null,512),[[_n,this.showFailedJob]]),h("label",IU,[h("span",LU,[N(r,{t:"Failed"})])])])]),h("div",RU,[h("span",NU,[N(r,{t:"Display"})]),h("div",FU,[Le(h("input",{class:"form-check-input",type:"checkbox","onUpdate:modelValue":e[4]||(e[4]=a=>i.showJobID=a),id:"jobLogsShowJobIDCheck"},null,512),[[_n,i.showJobID]]),h("label",BU,[N(r,{t:"Job ID"})])]),h("div",VU,[Le(h("input",{class:"form-check-input",type:"checkbox","onUpdate:modelValue":e[5]||(e[5]=a=>i.showLogID=a),id:"jobLogsShowLogIDCheck"},null,512),[[_n,i.showLogID]]),h("label",HU,[N(r,{t:"Log ID"})])])])]),h("table",jU,[h("thead",null,[h("tr",null,[h("th",WU,[N(r,{t:"Date"})]),i.showLogID?(C(),F("th",zU,[N(r,{t:"Log ID"})])):re("",!0),i.showJobID?(C(),F("th",KU,[N(r,{t:"Job ID"})])):re("",!0),h("th",YU,[N(r,{t:"Status"})]),h("th",UU,[N(r,{t:"Message"})])])]),h("tbody",null,[(C(!0),F(Me,null,Ke(this.showLogs,a=>(C(),F("tr",qU,[h("th",GU,xe(a.LogDate),1),i.showLogID?(C(),F("td",JU,[h("samp",XU,xe(a.LogID),1)])):re("",!0),i.showJobID?(C(),F("td",QU,[h("samp",ZU,xe(a.JobID),1)])):re("",!0),h("td",null,[h("span",{class:Ee(["badge",[a.Status==="1"?"text-success-emphasis bg-success-subtle":"text-danger-emphasis bg-danger-subtle"]])},xe(a.Status==="1"?"Success":"Failed"),3)]),h("td",null,xe(a.Message),1)]))),256))])]),h("div",e7,[this.getLogs.length>this.showLogAmount?(C(),F("button",{key:0,onClick:e[6]||(e[6]=a=>this.showLogAmount+=20),class:"btn btn-sm rounded-3 shadow-sm text-primary-emphasis bg-primary-subtle border-1 border-primary-subtle"},[t7,He(" Show More ")])):re("",!0),this.showLogAmount>20?(C(),F("button",{key:1,onClick:e[7]||(e[7]=a=>this.showLogAmount=20),class:"btn btn-sm rounded-3 shadow-sm text-primary-emphasis bg-primary-subtle border-1 border-primary-subtle"},[n7,He(" Collapse ")])):re("",!0)])]))])])])])])}const a7=je(_U,[["render",r7]]),l7={name:"peerShareLinkModal",props:{peer:Object},components:{LocaleText:Ge,VueDatePicker:Xa},data(){return{dataCopy:void 0,loading:!1}},setup(){return{store:Xe()}},mounted(){this.dataCopy=JSON.parse(JSON.stringify(this.peer.ShareLink)).at(0)},watch:{"peer.ShareLink":{deep:!0,handler(t,e){e.length!==t.length&&(this.dataCopy=JSON.parse(JSON.stringify(this.peer.ShareLink)).at(0))}}},methods:{startSharing(){this.loading=!0,ht("/api/sharePeer/create",{Configuration:this.peer.configuration.Name,Peer:this.peer.id,ExpireDate:Cn().add(7,"d").format("YYYY-MM-DD HH:mm:ss")},t=>{t.status?(this.peer.ShareLink=t.data,this.dataCopy=t.data.at(0)):this.store.newMessage("Server","Share link failed to create. Reason: "+t.message,"danger"),this.loading=!1})},updateLinkExpireDate(){ht("/api/sharePeer/update",this.dataCopy,t=>{t.status?(this.dataCopy=t.data.at(0),this.peer.ShareLink=t.data,this.store.newMessage("Server","Link expire date updated","success")):this.store.newMessage("Server","Link expire date failed to update. Reason: "+t.message,"danger"),this.loading=!1})},stopSharing(){this.loading=!0,this.dataCopy.ExpireDate=Cn().format("YYYY-MM-DD HH:mm:ss"),this.updateLinkExpireDate()},parseTime(t){t?this.dataCopy.ExpireDate=Cn(t).format("YYYY-MM-DD HH:mm:ss"):this.dataCopy.ExpireDate=void 0,this.updateLinkExpireDate()}},computed:{getUrl(){const t=this.store.getActiveCrossServer();return t?`${t.host}/${this.$router.resolve({path:"/share",query:{ShareID:this.dataCopy.ShareID}}).href}`:window.location.origin+window.location.pathname+this.$router.resolve({path:"/share",query:{ShareID:this.dataCopy.ShareID}}).href}}},c7={class:"peerSettingContainer w-100 h-100 position-absolute top-0 start-0 overflow-y-scroll"},u7={class:"container d-flex h-100 w-100"},d7={class:"m-auto modal-dialog-centered dashboardModal",style:{width:"500px"}},h7={class:"card rounded-3 shadow flex-grow-1"},f7={class:"card-header bg-transparent d-flex align-items-center gap-2 border-0 p-4"},p7={class:"mb-0"},g7={key:0,class:"card-body px-4 pb-4"},m7={key:0},_7={class:"mb-3 text-muted"},b7=["disabled"],v7=h("i",{class:"bi bi-send-fill me-2"},null,-1),y7=[v7],w7={key:1},x7={class:"d-flex gap-2 mb-4"},k7=h("i",{class:"bi bi-link-45deg"},null,-1),S7=["href"],$7={class:"d-flex flex-column gap-2 mb-3"},A7=h("i",{class:"bi bi-calendar me-2"},null,-1),C7=["disabled"],E7=h("i",{class:"bi bi-send-slash-fill me-2"},null,-1),T7=[E7];function P7(t,e,n,s,i,o){const r=ke("LocaleText"),a=ke("VueDatePicker");return C(),F("div",c7,[h("div",u7,[h("div",d7,[h("div",h7,[h("div",f7,[h("h4",p7,[N(r,{t:"Share Peer"})]),h("button",{type:"button",class:"btn-close ms-auto",onClick:e[0]||(e[0]=l=>this.$emit("close"))})]),this.peer.ShareLink?(C(),F("div",g7,[this.dataCopy?(C(),F("div",w7,[h("div",x7,[k7,h("a",{href:this.getUrl,class:"text-decoration-none",target:"_blank"},xe(o.getUrl),9,S7)]),h("div",$7,[h("small",null,[A7,N(r,{t:"Expire At"})]),N(a,{is24:!0,"min-date":new Date,"model-value":this.dataCopy.ExpireDate,"onUpdate:modelValue":this.parseTime,"time-picker-inline":"",format:"yyyy-MM-dd HH:mm:ss","preview-format":"yyyy-MM-dd HH:mm:ss",dark:this.store.Configuration.Server.dashboard_theme==="dark"},null,8,["min-date","model-value","onUpdate:modelValue","dark"])]),h("button",{onClick:e[2]||(e[2]=l=>this.stopSharing()),disabled:this.loading,class:"w-100 btn bg-danger-subtle text-danger-emphasis border-1 border-danger-subtle rounded-3 shadow-sm"},[h("span",{class:Ee({"animate__animated animate__flash animate__infinite animate__slower":this.loading})},T7,2),this.loading?(C(),Se(r,{key:0,t:"Stop Sharing..."})):(C(),Se(r,{key:1,t:"Stop Sharing"}))],8,C7)])):(C(),F("div",m7,[h("h6",_7,[N(r,{t:"Currently the peer is not sharing"})]),h("button",{onClick:e[1]||(e[1]=l=>this.startSharing()),disabled:this.loading,class:"w-100 btn bg-success-subtle text-success-emphasis border-1 border-success-subtle rounded-3 shadow-sm"},[h("span",{class:Ee({"animate__animated animate__flash animate__infinite animate__slower":this.loading})},y7,2),this.loading?(C(),Se(r,{key:0,t:"Sharing..."})):(C(),Se(r,{key:1,t:"Start Sharing"}))],8,b7)]))])):re("",!0)])])])])}const M7=je(l7,[["render",P7]]);su.register(F6,iu,e8,q6,I0,_V,L0,R0,yV,vV,wV,xV,z8,Y8,G8,cH,nh,fH,i8,S8,P8,D8,V8);const D7={name:"peerList",components:{LocaleText:Ge,PeerShareLinkModal:M7,PeerJobsLogsModal:a7,PeerJobsAllModal:mU,PeerJobs:JY,PeerCreate:M1,PeerQRCode:uz,PeerSettings:uW,PeerSearch:hF,Peer:aB,Line:xH,Bar:wH},setup(){const t=Xe(),e=Pn(),n=be(void 0);return{dashboardConfigurationStore:t,wireguardConfigurationStore:e,interval:n}},data(){return{configurationToggling:!1,loading:!1,error:null,configurationInfo:[],configurationPeers:[],historyDataSentDifference:[],historyDataReceivedDifference:[],historySentData:{labels:[],datasets:[{label:"Data Sent",data:[],fill:!1,borderColor:"#198754",tension:0}]},historyReceiveData:{labels:[],datasets:[{label:"Data Received",data:[],fill:!1,borderColor:"#0d6efd",tension:0}]},peerSetting:{modalOpen:!1,selectedPeer:void 0},peerScheduleJobs:{modalOpen:!1,selectedPeer:void 0},peerQRCode:{modalOpen:!1,peerConfigData:void 0},peerCreate:{modalOpen:!1},peerScheduleJobsAll:{modalOpen:!1},peerScheduleJobsLogs:{modalOpen:!1},peerShare:{modalOpen:!1,selectedPeer:void 0}}},mounted(){},watch:{$route:{immediate:!0,handler(){clearInterval(this.dashboardConfigurationStore.Peers.RefreshInterval),this.loading=!0;let t=this.$route.params.id;this.configurationInfo=[],this.configurationPeers=[],t&&(this.getPeers(t),this.setPeerInterval())}},"dashboardConfigurationStore.Configuration.Server.dashboard_refresh_interval"(){clearInterval(this.dashboardConfigurationStore.Peers.RefreshInterval),this.setPeerInterval()}},beforeRouteLeave(){clearInterval(this.dashboardConfigurationStore.Peers.RefreshInterval)},methods:{toggle(){this.configurationToggling=!0,kt("/api/toggleWireguardConfiguration/",{configurationName:this.configurationInfo.Name},t=>{t.status?this.dashboardConfigurationStore.newMessage("Server",`${this.configurationInfo.Name} ${t.data?"is on":"is off"}`,"success"):this.dashboardConfigurationStore.newMessage("Server",t.message,"danger"),this.configurationInfo.Status=t.data,this.configurationToggling=!1})},getPeers(t=this.$route.params.id){kt("/api/getWireguardConfigurationInfo",{configurationName:t},e=>{if(this.configurationInfo=e.data.configurationInfo,this.configurationPeers=e.data.configurationPeers,this.configurationPeers.forEach(n=>{n.restricted=!1}),e.data.configurationRestrictedPeers.forEach(n=>{n.restricted=!0,this.configurationPeers.push(n)}),this.loading=!1,this.configurationPeers.length>0){const n=this.configurationPeers.map(i=>i.total_sent+i.cumu_sent).reduce((i,o)=>i+o).toFixed(4),s=this.configurationPeers.map(i=>i.total_receive+i.cumu_receive).reduce((i,o)=>i+o).toFixed(4);this.historyDataSentDifference[this.historyDataSentDifference.length-1]!==n&&(this.historyDataSentDifference.length>0&&(this.historySentData={labels:[...this.historySentData.labels,Cn().format("HH:mm:ss A")],datasets:[{label:"Data Sent",data:[...this.historySentData.datasets[0].data,((n-this.historyDataSentDifference[this.historyDataSentDifference.length-1])*1e3).toFixed(4)],fill:!1,borderColor:"#198754",tension:0}]}),this.historyDataSentDifference.push(n)),this.historyDataReceivedDifference[this.historyDataReceivedDifference.length-1]!==s&&(this.historyDataReceivedDifference.length>0&&(this.historyReceiveData={labels:[...this.historyReceiveData.labels,Cn().format("HH:mm:ss A")],datasets:[{label:"Data Received",data:[...this.historyReceiveData.datasets[0].data,((s-this.historyDataReceivedDifference[this.historyDataReceivedDifference.length-1])*1e3).toFixed(4)],fill:!1,borderColor:"#0d6efd",tension:0}]}),this.historyDataReceivedDifference.push(s))}})},setPeerInterval(){this.dashboardConfigurationStore.Peers.RefreshInterval=setInterval(()=>{this.getPeers()},parseInt(this.dashboardConfigurationStore.Configuration.Server.dashboard_refresh_interval))}},computed:{configurationSummary(){return{connectedPeers:this.configurationPeers.filter(e=>e.status==="running").length,totalUsage:this.configurationPeers.length>0?this.configurationPeers.filter(e=>!e.restricted).map(e=>e.total_data+e.cumu_data).reduce((e,n)=>e+n,0).toFixed(4):0,totalReceive:this.configurationPeers.length>0?this.configurationPeers.filter(e=>!e.restricted).map(e=>e.total_receive+e.cumu_receive).reduce((e,n)=>e+n,0).toFixed(4):0,totalSent:this.configurationPeers.length>0?this.configurationPeers.filter(e=>!e.restricted).map(e=>e.total_sent+e.cumu_sent).reduce((e,n)=>e+n,0).toFixed(4):0}},receiveData(){return this.historyReceiveData},sentData(){return this.historySentData},individualDataUsage(){return{labels:this.configurationPeers.map(t=>t.name?t.name:`Untitled Peer - ${t.id}`),datasets:[{label:"Total Data Usage",data:this.configurationPeers.map(t=>t.cumu_data+t.total_data),backgroundColor:this.configurationPeers.map(t=>"#0dcaf0"),tooltip:{callbacks:{label:t=>`${t.formattedValue} GB`}}}]}},individualDataUsageChartOption(){return{responsive:!0,plugins:{legend:{display:!1}},scales:{x:{ticks:{display:!1},grid:{display:!1}},y:{ticks:{callback:(t,e)=>`${t} GB`},grid:{display:!1}}}}},chartOptions(){return{responsive:!0,plugins:{legend:{display:!1},tooltip:{callbacks:{label:t=>`${t.formattedValue} MB/s`}}},scales:{x:{ticks:{display:!1},grid:{display:!1}},y:{ticks:{callback:(t,e)=>`${t} MB/s`},grid:{display:!1}}}}},searchPeers(){new Lr(this.configurationPeers,{keys:["name","id","allowed_ip"]});const t=this.wireguardConfigurationStore.searchString?this.configurationPeers.filter(e=>e.name.includes(this.wireguardConfigurationStore.searchString)||e.id.includes(this.wireguardConfigurationStore.searchString)||e.allowed_ip.includes(this.wireguardConfigurationStore.searchString)):this.configurationPeers;return this.dashboardConfigurationStore.Configuration.Server.dashboard_sort==="restricted"?t.slice().sort((e,n)=>e[this.dashboardConfigurationStore.Configuration.Server.dashboard_sort]n[this.dashboardConfigurationStore.Configuration.Server.dashboard_sort]?-1:0):t.slice().sort((e,n)=>e[this.dashboardConfigurationStore.Configuration.Server.dashboard_sort]n[this.dashboardConfigurationStore.Configuration.Server.dashboard_sort]?1:0)}}},du=t=>(qt("data-v-dc7f794a"),t=t(),Gt(),t),O7={key:0,class:"container-md"},I7={class:"d-flex align-items-center"},L7={CLASS:"text-muted"},R7={class:"d-flex align-items-center gap-3"},N7={class:"mb-0"},F7={class:"card rounded-3 bg-transparent shadow-sm ms-auto"},B7={class:"card-body py-2 d-flex align-items-center"},V7={class:"mb-0 text-muted"},H7={class:"form-check form-switch ms-auto"},j7=["for"],W7={key:4,class:"spinner-border spinner-border-sm ms-2","aria-hidden":"true"},z7=["disabled","id"],K7={class:"row mt-3 gy-2 gx-2 mb-2"},Y7={class:"col-6 col-lg-3"},U7={class:"card rounded-3 bg-transparent shadow-sm"},q7={class:"card-body py-2"},G7={class:"mb-0 text-muted"},J7={class:"col-6 col-lg-3"},X7={class:"card rounded-3 bg-transparent shadow-sm"},Q7={class:"card-body py-2"},Z7={class:"mb-0 text-muted"},e9={style:{"word-break":"break-all"},class:"col-12 col-lg-6"},t9={class:"card rounded-3 bg-transparent shadow-sm"},n9={class:"card-body py-2"},s9={class:"mb-0 text-muted"},i9={class:"row gx-2 gy-2 mb-2"},o9={class:"col-6 col-lg-3"},r9={class:"card rounded-3 bg-transparent shadow-sm"},a9={class:"card-body d-flex"},l9={class:"mb-0 text-muted"},c9={class:"h4"},u9=du(()=>h("i",{class:"bi bi-ethernet ms-auto h2 text-muted"},null,-1)),d9={class:"col-6 col-lg-3"},h9={class:"card rounded-3 bg-transparent shadow-sm"},f9={class:"card-body d-flex"},p9={class:"mb-0 text-muted"},g9={class:"h4"},m9=du(()=>h("i",{class:"bi bi-arrow-down-up ms-auto h2 text-muted"},null,-1)),_9={class:"col-6 col-lg-3"},b9={class:"card rounded-3 bg-transparent shadow-sm"},v9={class:"card-body d-flex"},y9={class:"mb-0 text-muted"},w9={class:"h4 text-primary"},x9=du(()=>h("i",{class:"bi bi-arrow-down ms-auto h2 text-muted"},null,-1)),k9={class:"col-6 col-lg-3"},S9={class:"card rounded-3 bg-transparent shadow-sm"},$9={class:"card-body d-flex"},A9={class:"mb-0 text-muted"},C9={class:"h4 text-success"},E9=du(()=>h("i",{class:"bi bi-arrow-up ms-auto h2 text-muted"},null,-1)),T9={class:"row gx-2 gy-2 mb-3"},P9={class:"col-12 col-lg-6"},M9={class:"card rounded-3 bg-transparent shadow-sm",style:{height:"270px"}},D9={class:"card-header bg-transparent border-0"},O9={class:"text-muted"},I9={class:"card-body pt-1"},L9={class:"col-sm col-lg-3"},R9={class:"card rounded-3 bg-transparent shadow-sm",style:{height:"270px"}},N9={class:"card-header bg-transparent border-0"},F9={class:"text-muted"},B9={class:"card-body pt-1"},V9={class:"col-sm col-lg-3"},H9={class:"card rounded-3 bg-transparent shadow-sm",style:{height:"270px"}},j9={class:"card-header bg-transparent border-0"},W9={class:"text-muted"},z9={class:"card-body pt-1"},K9={class:"mb-3"};function Y9(t,e,n,s,i,o){const r=ke("LocaleText"),a=ke("Bar"),l=ke("Line"),c=ke("PeerSearch"),u=ke("Peer"),d=ke("PeerSettings"),f=ke("PeerQRCode"),g=ke("PeerJobs"),_=ke("PeerJobsAllModal"),m=ke("PeerJobsLogsModal"),y=ke("PeerShareLinkModal");return this.loading?re("",!0):(C(),F("div",O7,[h("div",I7,[h("div",null,[h("small",L7,[N(r,{t:"CONFIGURATION"})]),h("div",R7,[h("h1",N7,[h("samp",null,xe(this.configurationInfo.Name),1)])])]),h("div",F7,[h("div",B7,[h("div",null,[h("p",V7,[h("small",null,[N(r,{t:"Status"})])]),h("div",H7,[h("label",{class:"form-check-label",style:{cursor:"pointer"},for:"switch"+this.configurationInfo.id},[!this.configurationInfo.Status&&this.configurationToggling?(C(),Se(r,{key:0,t:"Turning Off..."})):this.configurationInfo.Status&&this.configurationToggling?(C(),Se(r,{key:1,t:"Turning On..."})):this.configurationInfo.Status&&!this.configurationToggling?(C(),Se(r,{key:2,t:"On"})):!this.configurationInfo.Status&&!this.configurationToggling?(C(),Se(r,{key:3,t:"Off"})):re("",!0),this.configurationToggling?(C(),F("span",W7)):re("",!0)],8,j7),Le(h("input",{class:"form-check-input",style:{cursor:"pointer"},disabled:this.configurationToggling,type:"checkbox",role:"switch",id:"switch"+this.configurationInfo.id,onChange:e[0]||(e[0]=v=>this.toggle()),"onUpdate:modelValue":e[1]||(e[1]=v=>this.configurationInfo.Status=v)},null,40,z7),[[_n,this.configurationInfo.Status]])])]),h("div",{class:Ee(["dot ms-5",{active:this.configurationInfo.Status}])},null,2)])])]),h("div",K7,[h("div",Y7,[h("div",U7,[h("div",q7,[h("p",G7,[h("small",null,[N(r,{t:"Address"})])]),He(" "+xe(this.configurationInfo.Address),1)])])]),h("div",J7,[h("div",X7,[h("div",Q7,[h("p",Z7,[h("small",null,[N(r,{t:"Listen Port"})])]),He(" "+xe(this.configurationInfo.ListenPort),1)])])]),h("div",e9,[h("div",t9,[h("div",n9,[h("p",s9,[h("small",null,[N(r,{t:"Public Key"})])]),h("samp",null,xe(this.configurationInfo.PublicKey),1)])])])]),h("div",i9,[h("div",o9,[h("div",r9,[h("div",a9,[h("div",null,[h("p",l9,[h("small",null,[N(r,{t:"Connected Peers"})])]),h("strong",c9,xe(o.configurationSummary.connectedPeers),1)]),u9])])]),h("div",d9,[h("div",h9,[h("div",f9,[h("div",null,[h("p",p9,[h("small",null,[N(r,{t:"Total Usage"})])]),h("strong",g9,xe(o.configurationSummary.totalUsage)+" GB",1)]),m9])])]),h("div",_9,[h("div",b9,[h("div",v9,[h("div",null,[h("p",y9,[h("small",null,[N(r,{t:"Total Received"})])]),h("strong",w9,xe(o.configurationSummary.totalReceive)+" GB",1)]),x9])])]),h("div",k9,[h("div",S9,[h("div",$9,[h("div",null,[h("p",A9,[h("small",null,[N(r,{t:"Total Sent"})])]),h("strong",C9,xe(o.configurationSummary.totalSent)+" GB",1)]),E9])])])]),h("div",T9,[h("div",P9,[h("div",M9,[h("div",D9,[h("small",O9,[N(r,{t:"Peers Data Usage"})])]),h("div",I9,[N(a,{data:o.individualDataUsage,options:o.individualDataUsageChartOption,style:{width:"100%",height:"200px","max-height":"200px"}},null,8,["data","options"])])])]),h("div",L9,[h("div",R9,[h("div",N9,[h("small",F9,[N(r,{t:"Real Time Received Data Usage"})])]),h("div",B9,[N(l,{options:o.chartOptions,data:o.receiveData,style:{width:"100%",height:"200px","max-height":"200px"}},null,8,["options","data"])])])]),h("div",V9,[h("div",H9,[h("div",j9,[h("small",W9,[N(r,{t:"Real Time Sent Data Usage"})])]),h("div",z9,[N(l,{options:o.chartOptions,data:o.sentData,style:{width:"100%",height:"200px","max-height":"200px"}},null,8,["options","data"])])])])]),h("div",K9,[N(c,{onJobsAll:e[2]||(e[2]=v=>this.peerScheduleJobsAll.modalOpen=!0),onJobLogs:e[3]||(e[3]=v=>this.peerScheduleJobsLogs.modalOpen=!0),configuration:this.configurationInfo},null,8,["configuration"]),N(Ni,{name:"list",tag:"div",class:"row gx-2 gy-2 z-0"},{default:Pe(()=>[(C(!0),F(Me,null,Ke(this.searchPeers,v=>(C(),F("div",{class:"col-12 col-lg-6 col-xl-4",key:v.id},[N(u,{Peer:v,onShare:$=>{this.peerShare.selectedPeer=v.id,this.peerShare.modalOpen=!0},onRefresh:e[4]||(e[4]=$=>this.getPeers()),onJobs:$=>{i.peerScheduleJobs.modalOpen=!0,i.peerScheduleJobs.selectedPeer=this.configurationPeers.find(A=>A.id===v.id)},onSetting:$=>{i.peerSetting.modalOpen=!0,i.peerSetting.selectedPeer=this.configurationPeers.find(A=>A.id===v.id)},onQrcode:e[5]||(e[5]=$=>{this.peerQRCode.peerConfigData=$,this.peerQRCode.modalOpen=!0})},null,8,["Peer","onShare","onJobs","onSetting"])]))),128))]),_:1})]),N(Et,{name:"zoom"},{default:Pe(()=>[this.peerSetting.modalOpen?(C(),Se(d,{key:"settings",selectedPeer:this.peerSetting.selectedPeer,onRefresh:e[6]||(e[6]=v=>this.getPeers()),onClose:e[7]||(e[7]=v=>this.peerSetting.modalOpen=!1)},null,8,["selectedPeer"])):re("",!0)]),_:1}),N(Et,{name:"zoom"},{default:Pe(()=>[i.peerQRCode.modalOpen?(C(),Se(f,{peerConfigData:this.peerQRCode.peerConfigData,key:"qrcode",onClose:e[8]||(e[8]=v=>this.peerQRCode.modalOpen=!1)},null,8,["peerConfigData"])):re("",!0)]),_:1}),N(Et,{name:"zoom"},{default:Pe(()=>[this.peerScheduleJobs.modalOpen?(C(),Se(g,{key:0,onRefresh:e[9]||(e[9]=v=>this.getPeers()),selectedPeer:this.peerScheduleJobs.selectedPeer,onClose:e[10]||(e[10]=v=>this.peerScheduleJobs.modalOpen=!1)},null,8,["selectedPeer"])):re("",!0)]),_:1}),N(Et,{name:"zoom"},{default:Pe(()=>[this.peerScheduleJobsAll.modalOpen?(C(),Se(_,{key:0,onRefresh:e[11]||(e[11]=v=>this.getPeers()),onClose:e[12]||(e[12]=v=>this.peerScheduleJobsAll.modalOpen=!1),configurationPeers:this.configurationPeers},null,8,["configurationPeers"])):re("",!0)]),_:1}),N(Et,{name:"zoom"},{default:Pe(()=>[this.peerScheduleJobsLogs.modalOpen?(C(),Se(m,{key:0,onClose:e[13]||(e[13]=v=>this.peerScheduleJobsLogs.modalOpen=!1),configurationInfo:this.configurationInfo},null,8,["configurationInfo"])):re("",!0)]),_:1}),N(Et,{name:"zoom"},{default:Pe(()=>[this.peerShare.modalOpen?(C(),Se(y,{key:0,onClose:e[14]||(e[14]=v=>{this.peerShare.modalOpen=!1,this.peerShare.selectedPeer=void 0}),peer:this.configurationPeers.find(v=>v.id===this.peerShare.selectedPeer)},null,8,["peer"])):re("",!0)]),_:1})]))}const U9=je(D7,[["render",Y9],["__scopeId","data-v-dc7f794a"]]),q9={name:"ping",data(){return{loading:!1,cips:{},selectedConfiguration:void 0,selectedPeer:void 0,selectedIp:void 0,count:4,pingResult:void 0,pinging:!1}},setup(){return{store:Xe()}},mounted(){kt("/api/ping/getAllPeersIpAddress",{},t=>{t.status&&(this.loading=!0,this.cips=t.data,console.log(this.cips))})},methods:{execute(){this.selectedIp&&(this.pinging=!0,this.pingResult=void 0,kt("/api/ping/execute",{ipAddress:this.selectedIp,count:this.count},t=>{t.status?this.pingResult=t.data:this.store.newMessage("Server",t.message,"danger")}))}},watch:{selectedConfiguration(){this.selectedPeer=void 0,this.selectedIp=void 0},selectedPeer(){this.selectedIp=void 0}}},Vn=t=>(qt("data-v-7b32cdf7"),t=t(),Gt(),t),G9={class:"mt-md-5 mt-3 text-body"},J9={class:"container"},X9=Vn(()=>h("h3",{class:"mb-3 text-body"},"Ping",-1)),Q9={class:"row"},Z9={class:"col-sm-4 d-flex gap-2 flex-column"},eq=Vn(()=>h("label",{class:"mb-1 text-muted",for:"configuration"},[h("small",null,"Configuration")],-1)),tq=Vn(()=>h("option",{disabled:"",selected:"",value:void 0},"Select a Configuration...",-1)),nq=["value"],sq=Vn(()=>h("label",{class:"mb-1 text-muted",for:"peer"},[h("small",null,"Peer")],-1)),iq=["disabled"],oq=Vn(()=>h("option",{disabled:"",selected:"",value:void 0},"Select a Peer...",-1)),rq=["value"],aq=Vn(()=>h("label",{class:"mb-1 text-muted",for:"ip"},[h("small",null,"IP Address")],-1)),lq=["disabled"],cq=Vn(()=>h("option",{disabled:"",selected:"",value:void 0},"Select a IP...",-1)),uq=Vn(()=>h("label",{class:"mb-1 text-muted",for:"count"},[h("small",null,"Ping Count")],-1)),dq=["disabled"],hq=Vn(()=>h("i",{class:"bi bi-person-walking me-2"},null,-1)),fq={class:"col-sm-8"},pq={key:"pingPlaceholder"},gq={key:"pingResult",class:"d-flex flex-column gap-2 w-100"},mq={class:"card rounded-3 bg-transparent shadow-sm animate__animated animate__fadeIn",style:{"animation-delay":"0.15s"}},_q={class:"card-body"},bq=Vn(()=>h("p",{class:"mb-0 text-muted"},[h("small",null,"Address")],-1)),vq={class:"card rounded-3 bg-transparent shadow-sm animate__animated animate__fadeIn",style:{"animation-delay":"0.3s"}},yq={class:"card-body"},wq=Vn(()=>h("p",{class:"mb-0 text-muted"},[h("small",null,"Is Alive")],-1)),xq={class:"card rounded-3 bg-transparent shadow-sm animate__animated animate__fadeIn",style:{"animation-delay":"0.45s"}},kq={class:"card-body"},Sq=Vn(()=>h("p",{class:"mb-0 text-muted"},[h("small",null,"Average / Min / Max Round Trip Time")],-1)),$q={class:"card rounded-3 bg-transparent shadow-sm animate__animated animate__fadeIn",style:{"animation-delay":"0.6s"}},Aq={class:"card-body"},Cq=Vn(()=>h("p",{class:"mb-0 text-muted"},[h("small",null,"Sent / Received / Lost Package")],-1));function Eq(t,e,n,s,i,o){return C(),F("div",G9,[h("div",J9,[X9,h("div",Q9,[h("div",Z9,[h("div",null,[eq,Le(h("select",{class:"form-select","onUpdate:modelValue":e[0]||(e[0]=r=>this.selectedConfiguration=r)},[tq,(C(!0),F(Me,null,Ke(this.cips,(r,a)=>(C(),F("option",{value:a},xe(a),9,nq))),256))],512),[[Ql,this.selectedConfiguration]])]),h("div",null,[sq,Le(h("select",{id:"peer",class:"form-select","onUpdate:modelValue":e[1]||(e[1]=r=>this.selectedPeer=r),disabled:this.selectedConfiguration===void 0},[oq,this.selectedConfiguration!==void 0?(C(!0),F(Me,{key:0},Ke(this.cips[this.selectedConfiguration],(r,a)=>(C(),F("option",{value:a},xe(a),9,rq))),256)):re("",!0)],8,iq),[[Ql,this.selectedPeer]])]),h("div",null,[aq,Le(h("select",{id:"ip",class:"form-select","onUpdate:modelValue":e[2]||(e[2]=r=>this.selectedIp=r),disabled:this.selectedPeer===void 0},[cq,this.selectedPeer!==void 0?(C(!0),F(Me,{key:0},Ke(this.cips[this.selectedConfiguration][this.selectedPeer].allowed_ips,r=>(C(),F("option",null,xe(r),1))),256)):re("",!0)],8,lq),[[Ql,this.selectedIp]])]),h("div",null,[uq,Le(h("input",{class:"form-control",type:"number","onUpdate:modelValue":e[3]||(e[3]=r=>this.count=r),min:"1",id:"count",placeholder:"How many times you want to ping?"},null,512),[[We,this.count]])]),h("button",{class:"btn btn-primary rounded-3 mt-3",disabled:!this.selectedIp,onClick:e[4]||(e[4]=r=>this.execute())},[hq,He("Go! ")],8,dq)]),h("div",fq,[N(Ni,{name:"ping"},{default:Pe(()=>[this.pingResult?(C(),F("div",gq,[h("div",mq,[h("div",_q,[bq,He(" "+xe(this.pingResult.address),1)])]),h("div",vq,[h("div",yq,[wq,h("span",{class:Ee([this.pingResult.is_alive?"text-success":"text-danger"])},[h("i",{class:Ee(["bi me-1",[this.pingResult.is_alive?"bi-check-circle-fill":"bi-x-circle-fill"]])},null,2),He(" "+xe(this.pingResult.is_alive?"Yes":"No"),1)],2)])]),h("div",xq,[h("div",kq,[Sq,h("samp",null,xe(this.pingResult.avg_rtt)+"ms / "+xe(this.pingResult.min_rtt)+"ms / "+xe(this.pingResult.max_rtt)+"ms ",1)])]),h("div",$q,[h("div",Aq,[Cq,h("samp",null,xe(this.pingResult.package_sent)+" / "+xe(this.pingResult.package_received)+" / "+xe(this.pingResult.package_loss),1)])])])):(C(),F("div",pq,[(C(),F(Me,null,Ke(4,r=>h("div",{class:Ee(["pingPlaceholder bg-body-secondary rounded-3 mb-3",{"animate__animated animate__flash animate__slower animate__infinite":this.pinging}]),style:zt({"animation-delay":`${r*.15}s`})},null,6)),64))]))]),_:1})])])])])}const Tq=je(q9,[["render",Eq],["__scopeId","data-v-7b32cdf7"]]),Pq={name:"traceroute",data(){return{tracing:!1,ipAddress:void 0,tracerouteResult:void 0}},setup(){return{store:Pn()}},methods:{execute(){this.ipAddress&&(this.tracing=!0,this.tracerouteResult=void 0,kt("/api/traceroute/execute",{ipAddress:this.ipAddress},t=>{t.status?this.tracerouteResult=t.data:this.store.newMessage("Server",t.message,"danger"),this.tracing=!1}))}}},hu=t=>(qt("data-v-606c2c93"),t=t(),Gt(),t),Mq={class:"mt-md-5 mt-3 text-body"},Dq={class:"container-md"},Oq=hu(()=>h("h3",{class:"mb-3 text-body"},"Traceroute",-1)),Iq={class:"row"},Lq={class:"col-sm-4 d-flex gap-2 flex-column"},Rq=hu(()=>h("label",{class:"mb-1 text-muted",for:"ipAddress"},[h("small",null,"IP Address")],-1)),Nq=["disabled"],Fq=hu(()=>h("i",{class:"bi bi-bullseye me-2"},null,-1)),Bq={class:"col-sm-8 position-relative"},Vq={key:"pingPlaceholder"},Hq={key:"table",class:"w-100"},jq={class:"table table-borderless rounded-3 w-100"},Wq=hu(()=>h("thead",null,[h("tr",null,[h("th",{scope:"col"},"Hop"),h("th",{scope:"col"},"IP Address"),h("th",{scope:"col"},"Average / Min / Max Round Trip Time")])],-1));function zq(t,e,n,s,i,o){return C(),F("div",Mq,[h("div",Dq,[Oq,h("div",Iq,[h("div",Lq,[h("div",null,[Rq,Le(h("input",{id:"ipAddress",class:"form-control","onUpdate:modelValue":e[0]||(e[0]=r=>this.ipAddress=r),type:"text",placeholder:"Enter an IP Address you want to trace :)"},null,512),[[We,this.ipAddress]])]),h("button",{class:"btn btn-primary rounded-3 mt-3",disabled:!this.store.regexCheckIP(this.ipAddress)||this.tracing,onClick:e[1]||(e[1]=r=>this.execute())},[Fq,He(" "+xe(this.tracing?"Tracing...":"Trace It!"),1)],8,Nq)]),h("div",Bq,[N(Ni,{name:"ping"},{default:Pe(()=>[this.tracerouteResult?(C(),F("div",Hq,[h("table",jq,[Wq,h("tbody",null,[(C(!0),F(Me,null,Ke(this.tracerouteResult,(r,a)=>(C(),F("tr",{class:"animate__fadeInUp animate__animated",style:zt({"animation-delay":`${a*.05}s`})},[h("td",null,xe(r.hop),1),h("td",null,xe(r.ip),1),h("td",null,xe(r.avg_rtt)+" / "+xe(r.min_rtt)+" / "+xe(r.max_rtt),1)],4))),256))])])])):(C(),F("div",Vq,[(C(),F(Me,null,Ke(10,r=>h("div",{class:Ee(["pingPlaceholder bg-body-secondary rounded-3 mb-3",{"animate__animated animate__flash animate__slower animate__infinite":this.tracing}]),style:zt({"animation-delay":`${r*.05}s`})},null,6)),64))]))]),_:1})])])])])}const Kq=je(Pq,[["render",zq],["__scopeId","data-v-606c2c93"]]),Yq={name:"totp",components:{LocaleText:Ge},async setup(){const t=Xe();let e="";return await kt("/api/Welcome_GetTotpLink",{},n=>{n.status&&(e=n.data)}),{l:e,store:t}},mounted(){this.l&&Io.toCanvas(document.getElementById("qrcode"),this.l,function(t){})},data(){return{totp:"",totpInvalidMessage:"",verified:!1}},methods:{validateTotp(){}},watch:{totp(t){const e=document.querySelector("#totp");e.classList.remove("is-invalid","is-valid"),t.length===6&&(console.log(t),/[0-9]{6}/.test(t)?ht("/api/Welcome_VerifyTotpLink",{totp:t},n=>{n.status?(this.verified=!0,e.classList.add("is-valid"),this.$emit("verified")):(e.classList.add("is-invalid"),this.totpInvalidMessage="TOTP does not match.")}):(e.classList.add("is-invalid"),this.totpInvalidMessage="TOTP can only contain numbers"))}}},Uq=["data-bs-theme"],qq={class:"m-auto text-body",style:{width:"500px"}},Gq={class:"d-flex flex-column"},Jq={class:"dashboardLogo display-4"},Xq={class:"mb-2"},Qq={class:"text-muted"},Zq=h("canvas",{id:"qrcode",class:"rounded-3 mb-2"},null,-1),eG={class:"p-3 bg-body-secondary rounded-3 border mb-3"},tG={class:"text-muted mb-0"},nG=["href"],sG={style:{"line-break":"anywhere"}},iG={for:"totp",class:"mb-2"},oG={class:"text-muted"},rG={class:"form-group mb-2"},aG=["disabled"],lG={class:"invalid-feedback"},cG={class:"valid-feedback"},uG=h("hr",null,null,-1),dG={class:"d-flex gap-3 mt-5 flex-column"},hG=h("i",{class:"bi bi-chevron-right ms-auto"},null,-1),fG=h("i",{class:"bi bi-chevron-right ms-auto"},null,-1);function pG(t,e,n,s,i,o){const r=ke("LocaleText"),a=ke("RouterLink");return C(),F("div",{class:"container-fluid login-container-fluid d-flex main pt-5 overflow-scroll","data-bs-theme":this.store.Configuration.Server.dashboard_theme},[h("div",qq,[h("div",Gq,[h("div",null,[h("h1",Jq,[N(r,{t:"Multi-Factor Authentication (MFA)"})]),h("p",Xq,[h("small",Qq,[N(r,{t:"1. Please scan the following QR Code to generate TOTP with your choice of authenticator"})])]),Zq,h("div",eG,[h("p",tG,[h("small",null,[N(r,{t:"Or you can click the link below:"})])]),h("a",{href:this.l},[h("code",sG,xe(this.l),1)],8,nG)]),h("label",iG,[h("small",oG,[N(r,{t:"2. Enter the TOTP generated by your authenticator to verify"})])]),h("div",rG,[Le(h("input",{class:"form-control text-center totp",id:"totp",maxlength:"6",type:"text",inputmode:"numeric",autocomplete:"one-time-code","onUpdate:modelValue":e[0]||(e[0]=l=>this.totp=l),disabled:this.verified},null,8,aG),[[We,this.totp]]),h("div",lG,[N(r,{t:this.totpInvalidMessage},null,8,["t"])]),h("div",cG,[N(r,{t:"TOTP verified!"})])])]),uG,h("div",dG,[this.verified?(C(),Se(a,{key:1,to:"/",class:"btn btn-dark btn-lg d-flex btn-brand shadow align-items-center flex-grow-1 rounded-3"},{default:Pe(()=>[N(r,{t:"Complete"}),fG]),_:1})):(C(),Se(a,{key:0,to:"/",class:"btn bg-secondary-subtle text-secondary-emphasis rounded-3 flex-grow-1 btn-lg border-1 border-secondary-subtle shadow d-flex"},{default:Pe(()=>[N(r,{t:"I don't need MFA"}),hG]),_:1}))])])])],8,Uq)}const gG=je(Yq,[["render",pG]]),mG={name:"share",components:{LocaleText:Ge},async setup(){const t=RE(),e=be(!1),n=Xe(),s=be(""),i=be(void 0),o=be(new Blob);await kt("/api/getDashboardTheme",{},a=>{s.value=a.data});const r=t.query.ShareID;return r===void 0||r.length===0?(i.value=void 0,e.value=!0):await kt("/api/sharePeer/get",{ShareID:r},a=>{a.status?(i.value=a.data,o.value=new Blob([i.value.file],{type:"text/plain"})):i.value=void 0,e.value=!0}),{store:n,theme:s,peerConfiguration:i,blob:o}},mounted(){this.peerConfiguration&&Io.toCanvas(document.querySelector("#qrcode"),this.peerConfiguration.file,t=>{t&&console.error(t)})},methods:{download(){const t=new Blob([this.peerConfiguration.file],{type:"text/plain"}),e=URL.createObjectURL(t),n=`${this.peerConfiguration.fileName}.conf`,s=document.createElement("a");s.href=e,s.download=n,s.click()}},computed:{getBlob(){return URL.createObjectURL(this.blob)}}},fu=t=>(qt("data-v-1b44aacd"),t=t(),Gt(),t),_G=["data-bs-theme"],bG={class:"m-auto text-body",style:{width:"500px"}},vG={key:0,class:"text-center position-relative",style:{}},yG=fu(()=>h("div",{class:"animate__animated animate__fadeInUp"},[h("h1",{style:{"font-size":"20rem",filter:"blur(1rem)","animation-duration":"7s"},class:"animate__animated animate__flash animate__infinite"},[h("i",{class:"bi bi-file-binary"})])],-1)),wG={class:"position-absolute w-100 h-100 top-0 start-0 d-flex animate__animated animate__fadeInUp",style:{"animation-delay":"0.1s"}},xG={class:"m-auto"},kG={key:1,class:"d-flex align-items-center flex-column gap-3"},SG={class:"h1 dashboardLogo text-center animate__animated animate__fadeInUp"},$G=fu(()=>h("h6",null,"WGDashboard",-1)),AG={id:"qrcode",class:"rounded-3 shadow animate__animated animate__fadeInUp mb-3",ref:"qrcode"},CG={class:"text-muted animate__animated animate__fadeInUp mb-1",style:{"animation-delay":"0.2s"}},EG=fu(()=>h("samp",null,".conf",-1)),TG=["download","href"],PG=fu(()=>h("i",{class:"bi bi-download"},null,-1)),MG=[PG];function DG(t,e,n,s,i,o){const r=ke("LocaleText");return C(),F("div",{class:"container-fluid login-container-fluid d-flex main pt-5 overflow-scroll","data-bs-theme":this.theme},[h("div",bG,[this.peerConfiguration?(C(),F("div",kG,[h("div",SG,[$G,N(r,{t:"Scan QR Code with the WireGuard App to add peer"})]),h("canvas",AG,null,512),h("p",CG,[N(r,{t:"or click the button below to download the "}),EG,N(r,{t:" file"})]),h("a",{download:this.peerConfiguration.fileName+".conf",href:o.getBlob,class:"btn btn-lg bg-primary-subtle text-primary-emphasis border-1 border-primary-subtle animate__animated animate__fadeInUp shadow-sm",style:{"animation-delay":"0.25s"}},MG,8,TG)])):(C(),F("div",vG,[yG,h("div",wG,[h("h3",xG,[N(r,{t:"Oh no... This link is either expired or invalid."})])])]))])],8,_G)}const OG=je(mG,[["render",DG],["__scopeId","data-v-1b44aacd"]]),IG=async()=>{let t=!1;return await kt("/api/validateAuthentication",{},e=>{t=e.status}),t},sl=IE({history:XC(),routes:[{name:"Index",path:"/",component:IT,meta:{requiresAuth:!0},children:[{name:"Configuration List",path:"",component:TM,meta:{title:"WireGuard Configurations"}},{name:"Settings",path:"/settings",component:H3,meta:{title:"Settings"}},{path:"/ping",name:"Ping",component:Tq},{path:"/traceroute",name:"Traceroute",component:Kq},{name:"New Configuration",path:"/new_configuration",component:S5,meta:{title:"New Configuration"}},{name:"Configuration",path:"/configuration/:id",component:E5,meta:{title:"Configuration"},children:[{name:"Peers List",path:"peers",component:U9},{name:"Peers Create",path:"create",component:M1}]}]},{path:"/signin",component:YP,meta:{title:"Sign In"}},{path:"/welcome",component:lN,meta:{requiresAuth:!0,title:"Welcome to WGDashboard"}},{path:"/2FASetup",component:gG,meta:{requiresAuth:!0,title:"Multi-Factor Authentication Setup"}},{path:"/share",component:OG,meta:{title:"Share"}}]});sl.beforeEach(async(t,e,n)=>{const s=Pn(),i=Xe();t.meta.title?t.params.id?document.title=t.params.id+" | WGDashboard":document.title=t.meta.title+" | WGDashboard":document.title="WGDashboard",i.ShowNavBar=!1,t.meta.requiresAuth?i.getActiveCrossServer()?(await i.getConfiguration(),!s.Configurations&&t.name!=="Configuration List"&&await s.getConfigurations(),n()):NE.getCookie("authToken")&&await IG()?(await i.getConfiguration(),!s.Configurations&&t.name!=="Configuration List"&&await s.getConfigurations(),i.Redirect=void 0,n()):(i.Redirect=t,n("/signin"),i.newMessage("WGDashboard","Sign in session ended, please sign in again","warning")):n()});const I1=()=>{let t={"content-type":"application/json"};const n=Xe().getActiveCrossServer();return n&&(t["wg-dashboard-apikey"]=n.apiKey),t},L1=t=>{const n=Xe().getActiveCrossServer();return n?`${n.host}${t}`:`${window.location.protocol}//${(window.location.host+window.location.pathname+t).replace(/\/\//g,"/")}`},kt=async(t,e=void 0,n=void 0)=>{const s=new URLSearchParams(e);await fetch(`${L1(t)}?${s.toString()}`,{headers:I1()}).then(i=>{const o=Xe();if(i.ok)return i.json();if(i.status!==200)throw i.status===401&&o.newMessage("WGDashboard","Sign in session ended, please sign in again","warning"),new Error(i.statusText)}).then(i=>n?n(i):void 0).catch(i=>{console.log(i),sl.push({path:"/signin"})})},ht=async(t,e,n)=>{await fetch(`${L1(t)}`,{headers:I1(),method:"POST",body:JSON.stringify(e)}).then(s=>{const i=Xe();if(s.ok)return s.json();if(s.status!==200)throw s.status===401&&i.newMessage("WGDashboard","Sign in session ended, please sign in again","warning"),new Error(s.statusText)}).then(s=>n?n(s):void 0).catch(s=>{console.log(s),sl.push({path:"/signin"})})},Xe=Qh("DashboardConfigurationStore",{state:()=>({Redirect:void 0,Configuration:void 0,Messages:[],Peers:{Selecting:!1,RefreshInterval:void 0},CrossServerConfiguration:{Enable:!1,ServerList:{}},ActiveServerConfiguration:void 0,IsElectronApp:!1,ShowNavBar:!1,Locale:void 0}),actions:{initCrossServerConfiguration(){const t=localStorage.getItem("CrossServerConfiguration");localStorage.getItem("ActiveCrossServerConfiguration")!==null&&(this.ActiveServerConfiguration=localStorage.getItem("ActiveCrossServerConfiguration")),t===null?window.localStorage.setItem("CrossServerConfiguration",JSON.stringify(this.CrossServerConfiguration)):this.CrossServerConfiguration=JSON.parse(t)},syncCrossServerConfiguration(){window.localStorage.setItem("CrossServerConfiguration",JSON.stringify(this.CrossServerConfiguration))},addCrossServerConfiguration(){this.CrossServerConfiguration.ServerList[Es().toString()]={host:"",apiKey:"",active:!1}},deleteCrossServerConfiguration(t){delete this.CrossServerConfiguration.ServerList[t]},getActiveCrossServer(){const t=localStorage.getItem("ActiveCrossServerConfiguration");if(t!==null)return this.CrossServerConfiguration.ServerList[t]},setActiveCrossServer(t){this.ActiveServerConfiguration=t,localStorage.setItem("ActiveCrossServerConfiguration",t)},removeActiveCrossServer(){this.ActiveServerConfiguration=void 0,localStorage.removeItem("ActiveCrossServerConfiguration")},async getConfiguration(){await kt("/api/getDashboardConfiguration",{},t=>{t.status&&(this.Configuration=t.data)})},async signOut(){await kt("/api/signout",{},t=>{this.removeActiveCrossServer(),this.$router.go("/signin")})},newMessage(t,e,n){this.Messages.push({id:Es(),from:dt(t),content:dt(e),type:n,show:!0})},applyLocale(t){if(this.Locale===null)return t;const n=Object.keys(this.Locale).filter(s=>t.match(new RegExp("^"+s+"$","g"))!==null);return console.log(n),n.length===0||n.length>1?t:this.Locale[n[0]]}}}),Uf=t=>(qt("data-v-822f113b"),t=t(),Gt(),t),LG={class:"navbar bg-dark sticky-top","data-bs-theme":"dark"},RG={class:"container-fluid d-flex text-body align-items-center"},NG=Uf(()=>h("span",{class:"navbar-brand mb-0 h1"},"WGDashboard",-1)),FG={key:0,class:"ms-auto text-muted"},BG=Uf(()=>h("i",{class:"bi bi-server me-2"},null,-1)),VG=Uf(()=>h("i",{class:"bi bi-list"},null,-1)),HG=[VG],jG={__name:"App",setup(t){const e=Xe();e.initCrossServerConfiguration(),window.IS_WGDASHBOARD_DESKTOP&&(e.IsElectronApp=!0,e.CrossServerConfiguration.Enable=!0),Ht(e.CrossServerConfiguration,()=>{e.syncCrossServerConfiguration()},{deep:!0});const n=_e(()=>{if(e.ActiveServerConfiguration)return e.CrossServerConfiguration.ServerList[e.ActiveServerConfiguration]});return(s,i)=>(C(),F(Me,null,[h("nav",LG,[h("div",RG,[NG,n.value!==void 0?(C(),F("small",FG,[BG,He(xe(n.value.host),1)])):re("",!0),h("a",{role:"button",class:"navbarBtn text-body",onClick:i[0]||(i[0]=o=>G(e).ShowNavBar=!G(e).ShowNavBar),style:{"line-height":"0","font-size":"2rem"}},HG)])]),(C(),Se(Wh,null,{default:Pe(()=>[N(G(oy),null,{default:Pe(({Component:o})=>[N(Et,{name:"app",mode:"out-in"},{default:Pe(()=>[(C(),Se(To(o)))]),_:2},1024)]),_:1})]),_:1}))],64))}},WG=je(jG,[["__scopeId","data-v-822f113b"]]);let R1;await fetch("/api/locale").then(t=>t.json()).then(t=>R1=t.data);const qf=kC(WG);qf.use(sl);const N1=CC();N1.use(({store:t})=>{t.$router=Lc(sl)});qf.use(N1);const zG=Xe();zG.Locale=R1;qf.mount("#app"); +Minimum version required to store current data is: `+r+`. +`);const o=g9(e,n,s),a=Rf.getSymbolSize(e),l=new i9(a);return c9(l,e),u9(l),d9(l,e),op(l,n,0),e>=7&&h9(l,e),f9(l,o),isNaN(i)&&(i=bm.getBestMask(l,op.bind(null,l,n))),bm.applyMask(i,l),op(l,n,i),{modules:l,version:e,errorCorrectionLevel:n,maskPattern:i,segments:s}}TT.create=function(e,n){if(typeof e>"u"||e==="")throw new Error("No input text");let i=sp.M,s,r;return typeof n<"u"&&(i=sp.from(n.errorCorrectionLevel,sp.M),s=Ph.from(n.version),r=bm.from(n.maskPattern),n.toSJISFunc&&Rf.setToSJISFunction(n.toSJISFunc)),m9(e,s,i,r)};var BT={},fy={};(function(t){function e(n){if(typeof n=="number"&&(n=n.toString()),typeof n!="string")throw new Error("Color should be defined as hex string");let i=n.slice().replace("#","").split("");if(i.length<3||i.length===5||i.length>8)throw new Error("Invalid hex color: "+n);(i.length===3||i.length===4)&&(i=Array.prototype.concat.apply([],i.map(function(r){return[r,r]}))),i.length===6&&i.push("F","F");const s=parseInt(i.join(""),16);return{r:s>>24&255,g:s>>16&255,b:s>>8&255,a:s&255,hex:"#"+i.slice(0,6).join("")}}t.getOptions=function(i){i||(i={}),i.color||(i.color={});const s=typeof i.margin>"u"||i.margin===null||i.margin<0?4:i.margin,r=i.width&&i.width>=21?i.width:void 0,o=i.scale||4;return{width:r,scale:r?4:o,margin:s,color:{dark:e(i.color.dark||"#000000ff"),light:e(i.color.light||"#ffffffff")},type:i.type,rendererOpts:i.rendererOpts||{}}},t.getScale=function(i,s){return s.width&&s.width>=i+s.margin*2?s.width/(i+s.margin*2):s.scale},t.getImageWidth=function(i,s){const r=t.getScale(i,s);return Math.floor((i+s.margin*2)*r)},t.qrToImageData=function(i,s,r){const o=s.modules.size,a=s.modules.data,l=t.getScale(o,r),c=Math.floor((o+r.margin*2)*l),u=r.margin*l,d=[r.color.light,r.color.dark];for(let h=0;h=u&&f>=u&&h"u"&&(!o||!o.getContext)&&(l=o,o=void 0),o||(c=i()),l=e.getOptions(l);const u=e.getImageWidth(r.modules.size,l),d=c.getContext("2d"),h=d.createImageData(u,u);return e.qrToImageData(h.data,r,l),n(d,c,u),d.putImageData(h,0,0),c},t.renderToDataURL=function(r,o,a){let l=a;typeof l>"u"&&(!o||!o.getContext)&&(l=o,o=void 0),l||(l={});const c=t.render(r,o,l),u=l.type||"image/png",d=l.rendererOpts||{};return c.toDataURL(u,d.quality)}})(BT);var VT={};const _9=fy;function aw(t,e){const n=t.a/255,i=e+'="'+t.hex+'"';return n<1?i+" "+e+'-opacity="'+n.toFixed(2).slice(1)+'"':i}function ap(t,e,n){let i=t+e;return typeof n<"u"&&(i+=" "+n),i}function y9(t,e,n){let i="",s=0,r=!1,o=0;for(let a=0;a0&&l>0&&t[a-1]||(i+=r?ap("M",l+n,.5+c+n):ap("m",s,0),s=0,r=!1),l+1':"",c="',u='viewBox="0 0 '+a+" "+a+'"',h=''+l+c+` +`;return typeof i=="function"&&i(null,h),h};const v9=RX,xm=TT,zT=BT,b9=VT;function gy(t,e,n,i,s){const r=[].slice.call(arguments,1),o=r.length,a=typeof r[o-1]=="function";if(!a&&!v9())throw new Error("Callback required as last argument");if(a){if(o<2)throw new Error("Too few arguments provided");o===2?(s=n,n=e,e=i=void 0):o===3&&(e.getContext&&typeof s>"u"?(s=i,i=void 0):(s=i,i=n,n=e,e=void 0))}else{if(o<1)throw new Error("Too few arguments provided");return o===1?(n=e,e=i=void 0):o===2&&!e.getContext&&(i=n,n=e,e=void 0),new Promise(function(l,c){try{const u=xm.create(n,i);l(t(u,e,i))}catch(u){c(u)}})}try{const l=xm.create(n,i);s(null,t(l,e,i))}catch(l){s(l)}}va.create=xm.create;va.toCanvas=gy.bind(null,zT.render);va.toDataURL=gy.bind(null,zT.renderToDataURL);va.toString=gy.bind(null,function(t,e,n){return b9.render(t,n)});const w9={name:"peerQRCode",components:{LocaleText:Qe},props:{peerConfigData:String},mounted(){va.toCanvas(document.querySelector("#qrcode"),this.peerConfigData,t=>{t&&console.error(t)})}},x9={class:"peerSettingContainer w-100 h-100 position-absolute top-0 start-0"},E9={class:"container d-flex h-100 w-100"},S9={class:"m-auto modal-dialog-centered dashboardModal justify-content-center"},C9={class:"card rounded-3 shadow"},T9={class:"card-header bg-transparent d-flex align-items-center gap-2 border-0 p-4 pb-0"},k9={class:"mb-0"},A9={class:"card-body"},M9={id:"qrcode",class:"rounded-3 shadow",ref:"qrcode"};function I9(t,e,n,i,s,r){const o=Se("LocaleText");return D(),V("div",x9,[g("div",E9,[g("div",S9,[g("div",C9,[g("div",T9,[g("h4",k9,[B(o,{t:"QR Code"})]),g("button",{type:"button",class:"btn-close ms-auto",onClick:e[0]||(e[0]=a=>this.$emit("close"))})]),g("div",A9,[g("canvas",M9,null,512)])])])])])}const P9=Ye(w9,[["render",I9]]),R9={name:"nameInput",components:{LocaleText:Qe},props:{bulk:Boolean,data:Object,saving:Boolean}},D9={for:"peer_name_textbox",class:"form-label"},$9={class:"text-muted"},L9=["disabled"];function O9(t,e,n,i,s,r){const o=Se("LocaleText");return D(),V("div",{class:Ie({inactiveField:this.bulk})},[g("label",D9,[g("small",$9,[B(o,{t:"Name"})])]),Ne(g("input",{type:"text",class:"form-control form-control-sm rounded-3",disabled:this.saving||this.bulk,"onUpdate:modelValue":e[0]||(e[0]=a=>this.data.name=a),id:"peer_name_textbox",placeholder:""},null,8,L9),[[Ke,this.data.name]])],2)}const N9=Ye(R9,[["render",O9]]),F9={name:"privatePublicKeyInput",components:{LocaleText:Qe},props:{data:Object,saving:Boolean,bulk:Boolean},setup(){return{dashboardStore:st()}},data(){return{keypair:{publicKey:"",privateKey:"",presharedKey:""},editKey:!1,error:!1}},methods:{genKeyPair(){this.editKey=!1,this.keypair=window.wireguard.generateKeypair(),this.data.private_key=this.keypair.privateKey,this.data.public_key=this.keypair.publicKey},testKey(t){return/^[A-Za-z0-9+/]{43}=?=?$/.test(t)},checkMatching(){try{this.keypair.privateKey&&this.testKey(this.keypair.privateKey)&&(this.keypair.publicKey=window.wireguard.generatePublicKey(this.keypair.privateKey),window.wireguard.generatePublicKey(this.keypair.privateKey)!==this.keypair.publicKey?(this.error=!0,this.dashboardStore.newMessage("WGDashboard","Private key does not match with the public key","danger")):(this.data.private_key=this.keypair.privateKey,this.data.public_key=this.keypair.publicKey))}catch{this.error=!0,this.data.private_key="",this.data.public_key=""}}},mounted(){this.genKeyPair()},watch:{keypair:{deep:!0,handler(){this.error=!1,this.checkMatching()}}}},B9={for:"peer_private_key_textbox",class:"form-label"},V9={class:"text-muted"},z9={class:"input-group"},W9=["disabled"],H9=["disabled"],Y9=g("i",{class:"bi bi-arrow-repeat"},null,-1),j9=[Y9],K9={class:"d-flex"},U9={for:"public_key",class:"form-label"},G9={class:"text-muted"},X9={class:"form-check form-switch ms-auto"},q9=["disabled"],Z9={class:"form-check-label",for:"enablePublicKeyEdit"},J9=["disabled"];function Q9(t,e,n,i,s,r){const o=Se("LocaleText");return D(),V("div",{class:Ie(["d-flex gap-2 flex-column",{inactiveField:this.bulk}])},[g("div",null,[g("label",B9,[g("small",V9,[B(o,{t:"Private Key"}),g("code",null,[B(o,{t:"(Required for QR Code and Download)"})])])]),g("div",z9,[Ne(g("input",{type:"text",class:Ie(["form-control form-control-sm rounded-start-3",{"is-invalid":this.error}]),"onUpdate:modelValue":e[0]||(e[0]=a=>this.keypair.privateKey=a),disabled:!this.editKey||this.bulk,onBlur:e[1]||(e[1]=a=>this.checkMatching()),id:"peer_private_key_textbox"},null,42,W9),[[Ke,this.keypair.privateKey]]),g("button",{class:"btn btn-outline-info btn-sm rounded-end-3",onClick:e[2]||(e[2]=a=>this.genKeyPair()),disabled:this.bulk,type:"button",id:"button-addon2"},j9,8,H9)])]),g("div",null,[g("div",K9,[g("label",U9,[g("small",G9,[B(o,{t:"Public Key"}),g("code",null,[B(o,{t:"(Required)"})])])]),g("div",X9,[Ne(g("input",{class:"form-check-input",type:"checkbox",role:"switch",disabled:this.bulk,id:"enablePublicKeyEdit","onUpdate:modelValue":e[3]||(e[3]=a=>this.editKey=a)},null,8,q9),[[Jn,this.editKey]]),g("label",Z9,[g("small",null,[B(o,{t:"Use your own Private and Public Key"})])])])]),Ne(g("input",{class:Ie(["form-control-sm form-control rounded-3",{"is-invalid":this.error}]),"onUpdate:modelValue":e[4]||(e[4]=a=>this.keypair.publicKey=a),onBlur:e[5]||(e[5]=a=>this.checkMatching()),disabled:!this.editKey||this.bulk,type:"text",id:"public_key"},null,42,J9),[[Ke,this.keypair.publicKey]])])],2)}const eq=Ye(F9,[["render",Q9]]),tq={name:"allowedIPsInput",components:{LocaleText:Qe},props:{data:Object,saving:Boolean,bulk:Boolean,availableIp:void 0},data(){return{allowedIp:[],availableIpSearchString:"",customAvailableIp:"",allowedIpFormatError:!1}},setup(){const t=vi(),e=st();return{store:t,dashboardStore:e}},computed:{searchAvailableIps(){return this.availableIpSearchString?this.availableIp.filter(t=>t.includes(this.availableIpSearchString)&&!this.data.allowed_ips.includes(t)):this.availableIp.filter(t=>!this.data.allowed_ips.includes(t))},inputGetLocale(){return Tt("Enter IP Address/CIDR")}},methods:{addAllowedIp(t){return this.store.checkCIDR(t)?(this.data.allowed_ips.push(t),this.customAvailableIp="",!0):(this.allowedIpFormatError=!0,this.dashboardStore.newMessage("WGDashboard","Allowed IPs is invalid","danger"),!1)}},watch:{customAvailableIp(){this.allowedIpFormatError=!1},availableIp(){this.availableIp!==void 0&&this.availableIp.length>0&&this.addAllowedIp(this.availableIp[0])}},mounted(){}},Df=t=>(bn("data-v-6d5fc831"),t=t(),wn(),t),nq={for:"peer_allowed_ip_textbox",class:"form-label"},iq={class:"text-muted"},sq=["onClick"],rq=Df(()=>g("i",{class:"bi bi-x-circle-fill ms-1"},null,-1)),oq=[rq],aq={class:"d-flex gap-2 align-items-center"},lq={class:"input-group"},cq=["placeholder","disabled"],uq=["disabled"],dq=Df(()=>g("i",{class:"bi bi-plus-lg"},null,-1)),hq=[dq],fq={class:"text-muted"},gq={class:"dropdown flex-grow-1"},pq=["disabled"],mq=Df(()=>g("i",{class:"bi bi-filter-circle me-2"},null,-1)),_q={key:0,class:"dropdown-menu mt-2 shadow w-100 dropdown-menu-end rounded-3",style:{"overflow-y":"scroll","max-height":"270px",width:"300px !important"}},yq={class:"px-3 pb-2 pt-1 d-flex gap-3 align-items-center"},vq=Df(()=>g("label",{for:"availableIpSearchString",class:"text-muted"},[g("i",{class:"bi bi-search"})],-1)),bq=["onClick"],wq={class:"me-auto"},xq={key:0},Eq={class:"px-3 text-muted"};function Sq(t,e,n,i,s,r){const o=Se("LocaleText");return D(),V("div",{class:Ie({inactiveField:this.bulk})},[g("label",nq,[g("small",iq,[B(o,{t:"Allowed IPs"}),g("code",null,[B(o,{t:"(Required)"})])])]),g("div",{class:Ie(["d-flex gap-2 flex-wrap",{"mb-2":this.data.allowed_ips.length>0}])},[B(jl,{name:"list"},{default:Re(()=>[(D(!0),V($e,null,Xe(this.data.allowed_ips,(a,l)=>(D(),V("span",{class:"badge rounded-pill text-bg-success",key:a},[He(Ee(a)+" ",1),g("a",{role:"button",onClick:c=>this.data.allowed_ips.splice(l,1)},oq,8,sq)]))),128))]),_:1})],2),g("div",aq,[g("div",lq,[Ne(g("input",{type:"text",class:Ie(["form-control form-control-sm rounded-start-3",{"is-invalid":this.allowedIpFormatError}]),placeholder:this.inputGetLocale,"onUpdate:modelValue":e[0]||(e[0]=a=>s.customAvailableIp=a),disabled:n.bulk},null,10,cq),[[Ke,s.customAvailableIp]]),g("button",{class:"btn btn-outline-success btn-sm rounded-end-3",disabled:n.bulk||!this.customAvailableIp,onClick:e[1]||(e[1]=a=>this.addAllowedIp(this.customAvailableIp)),type:"button",id:"button-addon2"},hq,8,uq)]),g("small",fq,[B(o,{t:"or"})]),g("div",gq,[g("button",{class:"btn btn-outline-secondary btn-sm dropdown-toggle rounded-3 w-100",disabled:!n.availableIp||n.bulk,"data-bs-auto-close":"outside",type:"button","data-bs-toggle":"dropdown","aria-expanded":"false"},[mq,B(o,{t:"Pick Available IP"})],8,pq),this.availableIp?(D(),V("ul",_q,[g("li",null,[g("div",yq,[vq,Ne(g("input",{id:"availableIpSearchString",class:"form-control form-control-sm rounded-3","onUpdate:modelValue":e[2]||(e[2]=a=>this.availableIpSearchString=a)},null,512),[[Ke,this.availableIpSearchString]])])]),(D(!0),V($e,null,Xe(this.searchAvailableIps,a=>(D(),V("li",null,[g("a",{class:"dropdown-item d-flex",role:"button",onClick:l=>this.addAllowedIp(a)},[g("span",wq,[g("small",null,Ee(a),1)])],8,bq)]))),256)),this.searchAvailableIps.length===0?(D(),V("li",xq,[g("small",Eq,[B(o,{t:"No available IP containing"}),He(' "'+Ee(this.availableIpSearchString)+'"',1)])])):ce("",!0)])):ce("",!0)])])],2)}const Cq=Ye(tq,[["render",Sq],["__scopeId","data-v-6d5fc831"]]),Tq={name:"dnsInput",components:{LocaleText:Qe},props:{data:Object,saving:Boolean},data(){return{error:!1,dns:JSON.parse(JSON.stringify(this.data.DNS))}},setup(){const t=vi(),e=st();return{store:t,dashboardStore:e}},methods:{checkDNS(){if(this.dns){let t=this.dns.split(",").map(e=>e.replaceAll(" ",""));for(let e in t)if(!this.store.regexCheckIP(t[e])){this.error||this.dashboardStore.newMessage("WGDashboard","DNS format is incorrect","danger"),this.error=!0,this.data.DNS="";return}this.error=!1,this.data.DNS=this.dns}}},watch:{dns(){this.checkDNS()}}},kq={for:"peer_DNS_textbox",class:"form-label"},Aq={class:"text-muted"},Mq=["disabled"];function Iq(t,e,n,i,s,r){const o=Se("LocaleText");return D(),V("div",null,[g("label",kq,[g("small",Aq,[B(o,{t:"DNS"})])]),Ne(g("input",{type:"text",class:Ie(["form-control form-control-sm rounded-3",{"is-invalid":this.error}]),disabled:this.saving,"onUpdate:modelValue":e[0]||(e[0]=a=>this.dns=a),id:"peer_DNS_textbox"},null,10,Mq),[[Ke,this.dns]])])}const Pq=Ye(Tq,[["render",Iq]]),Rq={name:"endpointAllowedIps",components:{LocaleText:Qe},props:{data:Object,saving:Boolean},setup(){const t=vi(),e=st();return{store:t,dashboardStore:e}},data(){return{endpointAllowedIps:JSON.parse(JSON.stringify(this.data.endpoint_allowed_ip)),error:!1}},methods:{checkAllowedIP(){let t=this.endpointAllowedIps.split(",").map(e=>e.replaceAll(" ",""));for(let e in t)if(!this.store.checkCIDR(t[e])){this.error||this.dashboardStore.newMessage("WGDashboard","Endpoint Allowed IPs format is incorrect","danger"),this.data.endpoint_allowed_ip="",this.error=!0;return}this.error=!1,this.data.endpoint_allowed_ip=this.endpointAllowedIps}},watch:{endpointAllowedIps(){this.checkAllowedIP()}}},Dq={for:"peer_endpoint_allowed_ips",class:"form-label"},$q={class:"text-muted"},Lq=["disabled"];function Oq(t,e,n,i,s,r){const o=Se("LocaleText");return D(),V("div",null,[g("label",Dq,[g("small",$q,[B(o,{t:"Endpoint Allowed IPs"}),g("code",null,[B(o,{t:"(Required)"})])])]),Ne(g("input",{type:"text",class:Ie(["form-control form-control-sm rounded-3",{"is-invalid":s.error}]),disabled:this.saving,"onUpdate:modelValue":e[0]||(e[0]=a=>this.endpointAllowedIps=a),onBlur:e[1]||(e[1]=a=>this.checkAllowedIP()),id:"peer_endpoint_allowed_ips"},null,42,Lq),[[Ke,this.endpointAllowedIps]])])}const Nq=Ye(Rq,[["render",Oq]]),Fq={name:"presharedKeyInput",components:{LocaleText:Qe},props:{data:Object,saving:Boolean},data(){return{enable:!1}},watch:{enable(){this.enable?this.data.preshared_key=window.wireguard.generateKeypair().presharedKey:this.data.preshared_key=""}}},Bq={class:"d-flex align-items-start"},Vq={for:"peer_preshared_key_textbox",class:"form-label"},zq={class:"text-muted"},Wq={class:"form-check form-switch ms-auto"},Hq=["disabled"];function Yq(t,e,n,i,s,r){const o=Se("LocaleText");return D(),V("div",null,[g("div",Bq,[g("label",Vq,[g("small",zq,[B(o,{t:"Pre-Shared Key"})])]),g("div",Wq,[Ne(g("input",{class:"form-check-input",type:"checkbox",role:"switch","onUpdate:modelValue":e[0]||(e[0]=a=>this.enable=a),id:"peer_preshared_key_switch"},null,512),[[Jn,this.enable]])])]),Ne(g("input",{type:"text",class:"form-control form-control-sm rounded-3",disabled:this.saving||!this.enable,"onUpdate:modelValue":e[1]||(e[1]=a=>this.data.preshared_key=a),id:"peer_preshared_key_textbox"},null,8,Hq),[[Ke,this.data.preshared_key]])])}const jq=Ye(Fq,[["render",Yq]]),Kq={name:"mtuInput",components:{LocaleText:Qe},props:{data:Object,saving:Boolean}},Uq={for:"peer_mtu",class:"form-label"},Gq={class:"text-muted"},Xq=["disabled"];function qq(t,e,n,i,s,r){const o=Se("LocaleText");return D(),V("div",null,[g("label",Uq,[g("small",Gq,[B(o,{t:"MTU"})])]),Ne(g("input",{type:"number",class:"form-control form-control-sm rounded-3",disabled:this.saving,"onUpdate:modelValue":e[0]||(e[0]=a=>this.data.mtu=a),min:"0",id:"peer_mtu"},null,8,Xq),[[Ke,this.data.mtu]])])}const Zq=Ye(Kq,[["render",qq]]),Jq={name:"persistentKeepAliveInput",components:{LocaleText:Qe},props:{data:Object,saving:Boolean}},Qq={for:"peer_keep_alive",class:"form-label"},eZ={class:"text-muted"},tZ=["disabled"];function nZ(t,e,n,i,s,r){const o=Se("LocaleText");return D(),V("div",null,[g("label",Qq,[g("small",eZ,[B(o,{t:"Persistent Keepalive"})])]),Ne(g("input",{type:"number",class:"form-control form-control-sm rounded-3",disabled:this.saving,"onUpdate:modelValue":e[0]||(e[0]=a=>this.data.keepalive=a),id:"peer_keep_alive"},null,8,tZ),[[Ke,this.data.keepalive]])])}const iZ=Ye(Jq,[["render",nZ]]),sZ={name:"bulkAdd",components:{LocaleText:Qe},props:{saving:Boolean,data:Object,availableIp:void 0},computed:{bulkAddGetLocale(){return Tt("How many peers you want to add?")}}},rZ={class:"form-check form-switch"},oZ=["disabled"],aZ={class:"form-check-label me-2",for:"bulk_add"},lZ={class:"text-muted d-block"},cZ={key:0,class:"form-group"},uZ=["max","placeholder"],dZ={class:"text-muted"};function hZ(t,e,n,i,s,r){const o=Se("LocaleText");return D(),V("div",null,[g("div",rZ,[Ne(g("input",{class:"form-check-input",type:"checkbox",role:"switch",disabled:!this.availableIp,id:"bulk_add","onUpdate:modelValue":e[0]||(e[0]=a=>this.data.bulkAdd=a)},null,8,oZ),[[Jn,this.data.bulkAdd]]),g("label",aZ,[g("small",null,[g("strong",null,[B(o,{t:"Bulk Add"})])])])]),g("p",{class:Ie({"mb-0":!this.data.bulkAdd})},[g("small",lZ,[B(o,{t:"By adding peers by bulk, each peer's name will be auto generated, and Allowed IP will be assign to the next available IP."})])],2),this.data.bulkAdd?(D(),V("div",cZ,[Ne(g("input",{class:"form-control form-control-sm rounded-3 mb-1",type:"number",min:"1",max:this.availableIp.length,"onUpdate:modelValue":e[1]||(e[1]=a=>this.data.bulkAddAmount=a),placeholder:this.bulkAddGetLocale},null,8,uZ),[[Ke,this.data.bulkAddAmount]]),g("small",dZ,[B(o,{t:"You can add up to "+this.availableIp.length+" peers"},null,8,["t"])])])):ce("",!0)])}const fZ=Ye(sZ,[["render",hZ]]),gZ={name:"peerCreate",components:{LocaleText:Qe,BulkAdd:fZ,PersistentKeepAliveInput:iZ,MtuInput:Zq,PresharedKeyInput:jq,EndpointAllowedIps:Nq,DnsInput:Pq,AllowedIPsInput:Cq,PrivatePublicKeyInput:eq,NameInput:N9},data(){return{data:{bulkAdd:!1,bulkAddAmount:0,name:"",allowed_ips:[],private_key:"",public_key:"",DNS:this.dashboardStore.Configuration.Peers.peer_global_dns,endpoint_allowed_ip:this.dashboardStore.Configuration.Peers.peer_endpoint_allowed_ip,keepalive:parseInt(this.dashboardStore.Configuration.Peers.peer_keep_alive),mtu:parseInt(this.dashboardStore.Configuration.Peers.peer_mtu),preshared_key:"",preshared_key_bulkAdd:!1},availableIp:void 0,availableIpSearchString:"",saving:!1,allowedIpDropdown:void 0}},mounted(){Vt("/api/getAvailableIPs/"+this.$route.params.id,{},t=>{t.status&&(this.availableIp=t.data)})},setup(){const t=vi(),e=st();return{store:t,dashboardStore:e}},methods:{peerCreate(){this.saving=!0,kt("/api/addPeers/"+this.$route.params.id,this.data,t=>{t.status?(this.$router.push(`/configuration/${this.$route.params.id}/peers`),this.dashboardStore.newMessage("Server","Peer created successfully","success")):this.dashboardStore.newMessage("Server",t.message,"danger"),this.saving=!1})}},computed:{allRequireFieldsFilled(){let t=!0;return this.data.bulkAdd?(this.data.bulkAddAmount.length===0||this.data.bulkAddAmount>this.availableIp.length)&&(t=!1):["allowed_ips","private_key","public_key","endpoint_allowed_ip","keepalive","mtu"].forEach(n=>{this.data[n].length===0&&(t=!1)}),t}},watch:{bulkAdd(t){t||(this.data.bulkAddAmount="")},"data.bulkAddAmount"(){this.data.bulkAddAmount>this.availableIp.length&&(this.data.bulkAddAmount=this.availableIp.length)}}},py=t=>(bn("data-v-3f34f584"),t=t(),wn(),t),pZ={class:"container"},mZ={class:"mb-4"},_Z=py(()=>g("h3",{class:"mb-0 text-body"},[g("i",{class:"bi bi-chevron-left"})],-1)),yZ={class:"text-body mb-0"},vZ={class:"d-flex flex-column gap-2"},bZ=py(()=>g("hr",{class:"mb-0 mt-2"},null,-1)),wZ=py(()=>g("hr",{class:"mb-0 mt-2"},null,-1)),xZ={class:"row gy-3"},EZ={key:0,class:"col-sm"},SZ={class:"col-sm"},CZ={class:"col-sm"},TZ={key:1,class:"col-12"},kZ={class:"form-check form-switch"},AZ={class:"form-check-label",for:"bullAdd_PresharedKey_Switch"},MZ={class:"fw-bold"},IZ={class:"d-flex mt-2"},PZ=["disabled"],RZ={key:0,class:"bi bi-plus-circle-fill me-2"};function DZ(t,e,n,i,s,r){const o=Se("LocaleText"),a=Se("RouterLink"),l=Se("BulkAdd"),c=Se("NameInput"),u=Se("PrivatePublicKeyInput"),d=Se("AllowedIPsInput"),h=Se("EndpointAllowedIps"),f=Se("DnsInput"),p=Se("PresharedKeyInput"),m=Se("MtuInput"),y=Se("PersistentKeepAliveInput");return D(),V("div",pZ,[g("div",mZ,[B(a,{to:"peers",is:"div",class:"d-flex align-items-center gap-4 text-decoration-none"},{default:Re(()=>[_Z,g("h3",yZ,[B(o,{t:"Add Peers"})])]),_:1})]),g("div",vZ,[B(l,{saving:s.saving,data:this.data,availableIp:this.availableIp},null,8,["saving","data","availableIp"]),bZ,this.data.bulkAdd?ce("",!0):(D(),Ce(c,{key:0,saving:s.saving,data:this.data},null,8,["saving","data"])),this.data.bulkAdd?ce("",!0):(D(),Ce(u,{key:1,saving:s.saving,data:s.data},null,8,["saving","data"])),this.data.bulkAdd?ce("",!0):(D(),Ce(d,{key:2,availableIp:this.availableIp,saving:s.saving,data:s.data},null,8,["availableIp","saving","data"])),B(h,{saving:s.saving,data:s.data},null,8,["saving","data"]),B(f,{saving:s.saving,data:s.data},null,8,["saving","data"]),wZ,g("div",xZ,[this.data.bulkAdd?ce("",!0):(D(),V("div",EZ,[B(p,{saving:s.saving,data:s.data,bulk:this.data.bulkAdd},null,8,["saving","data","bulk"])])),g("div",SZ,[B(m,{saving:s.saving,data:s.data},null,8,["saving","data"])]),g("div",CZ,[B(y,{saving:s.saving,data:s.data},null,8,["saving","data"])]),this.data.bulkAdd?(D(),V("div",TZ,[g("div",kZ,[Ne(g("input",{class:"form-check-input",type:"checkbox",role:"switch","onUpdate:modelValue":e[0]||(e[0]=v=>this.data.preshared_key_bulkAdd=v),id:"bullAdd_PresharedKey_Switch",checked:""},null,512),[[Jn,this.data.preshared_key_bulkAdd]]),g("label",AZ,[g("small",MZ,[B(o,{t:"Pre-Shared Key"}),this.data.preshared_key_bulkAdd?(D(),Ce(o,{key:0,t:"Enabled"})):(D(),Ce(o,{key:1,t:"Disabled"}))])])])])):ce("",!0)]),g("div",IZ,[g("button",{class:"ms-auto btn btn-dark btn-brand rounded-3 px-3 py-2 shadow",disabled:!this.allRequireFieldsFilled||this.saving,onClick:e[1]||(e[1]=v=>this.peerCreate())},[this.saving?ce("",!0):(D(),V("i",RZ)),this.saving?(D(),Ce(o,{key:1,t:"Adding..."})):(D(),Ce(o,{key:2,t:"Add"}))],8,PZ)])])])}const WT=Ye(gZ,[["render",DZ],["__scopeId","data-v-3f34f584"]]),$Z={name:"scheduleDropdown",props:{options:Array,data:String,edit:!1},setup(t){t.data===void 0&&this.$emit("update",this.options[0].value)},computed:{currentSelection(){return this.options.find(t=>t.value===this.data)}}},LZ={class:"dropdown scheduleDropdown"},OZ={class:"dropdown-menu rounded-3 shadow",style:{"font-size":"0.875rem",width:"200px"}},NZ=["onClick"],FZ={key:0,class:"bi bi-check ms-auto"};function BZ(t,e,n,i,s,r){return D(),V("div",LZ,[g("button",{class:Ie(["btn btn-sm btn-outline-primary rounded-3",{"disabled border-transparent":!n.edit}]),type:"button","data-bs-toggle":"dropdown","aria-expanded":"false"},[g("samp",null,Ee(this.currentSelection.display),1)],2),g("ul",OZ,[n.edit?(D(!0),V($e,{key:0},Xe(this.options,o=>(D(),V("li",null,[g("a",{class:"dropdown-item d-flex align-items-center",role:"button",onClick:a=>t.$emit("update",o.value)},[g("samp",null,Ee(o.display),1),o.value===this.currentSelection.value?(D(),V("i",FZ)):ce("",!0)],8,NZ)]))),256)):ce("",!0)])])}const HT=Ye($Z,[["render",BZ],["__scopeId","data-v-6a5aba2a"]]),VZ={name:"schedulePeerJob",components:{LocaleText:Qe,VueDatePicker:Bu,ScheduleDropdown:HT},props:{dropdowns:Array[Object],pjob:Object,viewOnly:!1},setup(t){const e=we({}),n=we(!1),i=we(!1);e.value=JSON.parse(JSON.stringify(t.pjob)),e.value.CreationDate||(n.value=!0,i.value=!0);const s=st();return{job:e,edit:n,newJob:i,store:s}},data(){return{inputType:void 0}},watch:{pjob:{deep:!0,immediate:!0,handler(t){this.edit||(this.job=JSON.parse(JSON.stringify(t)))}}},methods:{save(){this.job.Field&&this.job.Operator&&this.job.Action&&this.job.Value?kt("/api/savePeerScheduleJob/",{Job:this.job},t=>{t.status?(this.edit=!1,this.store.newMessage("Server","Peer job saved","success"),console.log(t.data),this.$emit("refresh",t.data[0]),this.newJob=!1):this.store.newMessage("Server",t.message,"danger")}):this.alert()},alert(){let t="animate__flash",e=this.$el.querySelectorAll(".scheduleDropdown"),n=this.$el.querySelectorAll("input");e.forEach(i=>i.classList.add("animate__animated",t)),n.forEach(i=>i.classList.add("animate__animated",t)),setTimeout(()=>{e.forEach(i=>i.classList.remove("animate__animated",t)),n.forEach(i=>i.classList.remove("animate__animated",t))},2e3)},reset(){this.job.CreationDate?(this.job=JSON.parse(JSON.stringify(this.pjob)),this.edit=!1):this.$emit("delete")},delete(){this.job.CreationDate&&kt("/api/deletePeerScheduleJob/",{Job:this.job},t=>{t.status?this.store.newMessage("Server","Peer job deleted","success"):(this.store.newMessage("Server",t.message,"danger"),this.$emit("delete"))}),this.$emit("delete")},parseTime(t){t&&(this.job.Value=pi(t).format("YYYY-MM-DD HH:mm:ss"))}}},zZ=t=>(bn("data-v-8f3f1b93"),t=t(),wn(),t),WZ={class:"card-header bg-transparent text-muted border-0"},HZ={key:0,class:"d-flex"},YZ={class:"me-auto"},jZ={key:1},KZ={class:"badge text-bg-warning"},UZ={class:"card-body pt-1",style:{"font-family":"var(--bs-font-monospace)"}},GZ={class:"d-flex gap-2 align-items-center mb-2"},XZ=["disabled"],qZ={class:"px-5 d-flex gap-2 align-items-center"},ZZ={class:"d-flex gap-3"},JZ=zZ(()=>g("samp",null,"}",-1)),QZ={key:0,class:"ms-auto d-flex gap-3"},eJ={key:1,class:"ms-auto d-flex gap-3"};function tJ(t,e,n,i,s,r){const o=Se("LocaleText"),a=Se("ScheduleDropdown"),l=Se("VueDatePicker");return D(),V("div",{class:Ie(["card shadow-sm rounded-3 mb-2",{"border-warning-subtle":this.newJob}])},[g("div",WZ,[this.newJob?(D(),V("small",jZ,[g("span",KZ,[B(o,{t:"Unsaved Job"})])])):(D(),V("small",HZ,[g("strong",YZ,[B(o,{t:"Job ID"})]),g("samp",null,Ee(this.job.JobID),1)]))]),g("div",UZ,[g("div",GZ,[g("samp",null,[B(o,{t:"if"})]),B(a,{edit:i.edit,options:this.dropdowns.Field,data:this.job.Field,onUpdate:e[0]||(e[0]=c=>{this.job.Field=c})},null,8,["edit","options","data"]),g("samp",null,[B(o,{t:"is"})]),B(a,{edit:i.edit,options:this.dropdowns.Operator,data:this.job.Operator,onUpdate:e[1]||(e[1]=c=>this.job.Operator=c)},null,8,["edit","options","data"]),this.job.Field==="date"?(D(),Ce(l,{key:0,is24:!0,"min-date":new Date,"model-value":this.job.Value,"onUpdate:modelValue":this.parseTime,"time-picker-inline":"",format:"yyyy-MM-dd HH:mm:ss","preview-format":"yyyy-MM-dd HH:mm:ss",clearable:!1,disabled:!i.edit,dark:this.store.Configuration.Server.dashboard_theme==="dark"},null,8,["min-date","model-value","onUpdate:modelValue","disabled","dark"])):Ne((D(),V("input",{key:1,class:"form-control form-control-sm form-control-dark rounded-3 flex-grow-1",disabled:!i.edit,"onUpdate:modelValue":e[2]||(e[2]=c=>this.job.Value=c),style:{width:"auto"}},null,8,XZ)),[[Ke,this.job.Value]]),g("samp",null,Ee(this.dropdowns.Field.find(c=>c.value===this.job.Field)?.unit)+" { ",1)]),g("div",qZ,[g("samp",null,[B(o,{t:"then"})]),B(a,{edit:i.edit,options:this.dropdowns.Action,data:this.job.Action,onUpdate:e[3]||(e[3]=c=>this.job.Action=c)},null,8,["edit","options","data"])]),g("div",ZZ,[JZ,this.edit?(D(),V("div",eJ,[g("a",{role:"button",class:"text-secondary text-decoration-none",onClick:e[6]||(e[6]=c=>this.reset())},[He("[C] "),B(o,{t:"Cancel"})]),g("a",{role:"button",class:"text-primary ms-auto text-decoration-none",onClick:e[7]||(e[7]=c=>this.save())},[He("[S] "),B(o,{t:"Save"})])])):(D(),V("div",QZ,[g("a",{role:"button",class:"ms-auto text-decoration-none",onClick:e[4]||(e[4]=c=>this.edit=!0)},[He("[E] "),B(o,{t:"Edit"})]),g("a",{role:"button",onClick:e[5]||(e[5]=c=>this.delete()),class:"text-danger text-decoration-none"},[He("[D] "),B(o,{t:"Delete"})])]))])])],2)}const YT=Ye(VZ,[["render",tJ],["__scopeId","data-v-8f3f1b93"]]),nJ={name:"peerJobs",setup(){return{store:vi()}},props:{selectedPeer:Object},components:{LocaleText:Qe,SchedulePeerJob:YT,ScheduleDropdown:HT},data(){return{}},methods:{deleteJob(t){this.selectedPeer.jobs=this.selectedPeer.jobs.filter(e=>e.JobID!==t.JobID)},addJob(){this.selectedPeer.jobs.unshift(JSON.parse(JSON.stringify({JobID:Os().toString(),Configuration:this.selectedPeer.configuration.Name,Peer:this.selectedPeer.id,Field:this.store.PeerScheduleJobs.dropdowns.Field[0].value,Operator:this.store.PeerScheduleJobs.dropdowns.Operator[0].value,Value:"",CreationDate:"",ExpireDate:"",Action:this.store.PeerScheduleJobs.dropdowns.Action[0].value})))}}},iJ=t=>(bn("data-v-5bbdd42b"),t=t(),wn(),t),sJ={class:"peerSettingContainer w-100 h-100 position-absolute top-0 start-0 overflow-y-scroll"},rJ={class:"container d-flex h-100 w-100"},oJ={class:"m-auto modal-dialog-centered dashboardModal"},aJ={class:"card rounded-3 shadow",style:{width:"700px"}},lJ={class:"card-header bg-transparent d-flex align-items-center gap-2 border-0 p-4 pb-2"},cJ={class:"mb-0 fw-normal"},uJ={class:"card-body px-4 pb-4 pt-2 position-relative"},dJ={class:"d-flex align-items-center mb-3"},hJ=iJ(()=>g("i",{class:"bi bi-plus-lg me-2"},null,-1)),fJ={class:"card shadow-sm",key:"none",style:{height:"153px"}},gJ={class:"card-body text-muted text-center d-flex"},pJ={class:"m-auto"};function mJ(t,e,n,i,s,r){const o=Se("LocaleText"),a=Se("SchedulePeerJob");return D(),V("div",sJ,[g("div",rJ,[g("div",oJ,[g("div",aJ,[g("div",lJ,[g("h4",cJ,[B(o,{t:"Schedule Jobs"})]),g("button",{type:"button",class:"btn-close ms-auto",onClick:e[0]||(e[0]=l=>this.$emit("close"))})]),g("div",uJ,[g("div",dJ,[g("button",{class:"btn bg-primary-subtle border-1 border-primary-subtle text-primary-emphasis rounded-3 shadow",onClick:e[1]||(e[1]=l=>this.addJob())},[hJ,B(o,{t:"Job"})])]),B(jl,{name:"schedulePeerJobTransition",tag:"div",class:"position-relative"},{default:Re(()=>[(D(!0),V($e,null,Xe(this.selectedPeer.jobs,(l,c)=>(D(),Ce(a,{onRefresh:e[2]||(e[2]=u=>this.$emit("refresh")),onDelete:u=>this.deleteJob(l),dropdowns:this.store.PeerScheduleJobs.dropdowns,key:l.JobID,pjob:l},null,8,["onDelete","dropdowns","pjob"]))),128)),this.selectedPeer.jobs.length===0?(D(),V("div",fJ,[g("div",gJ,[g("h6",pJ,[B(o,{t:"This peer does not have any job yet."})])])])):ce("",!0)]),_:1})])])])])])}const _J=Ye(nJ,[["render",mJ],["__scopeId","data-v-5bbdd42b"]]),yJ={name:"peerJobsAllModal",setup(){return{store:vi()}},components:{LocaleText:Qe,SchedulePeerJob:YT},props:{configurationPeers:Array[Object]},methods:{getuuid(){return Os()}},computed:{getAllJobs(){return this.configurationPeers.filter(t=>t.jobs.length>0)}}},vJ={class:"peerSettingContainer w-100 h-100 position-absolute top-0 start-0 overflow-y-scroll"},bJ={class:"container d-flex h-100 w-100"},wJ={class:"m-auto modal-dialog-centered dashboardModal"},xJ={class:"card rounded-3 shadow",style:{width:"700px"}},EJ={class:"card-header bg-transparent d-flex align-items-center gap-2 border-0 p-4 pb-2"},SJ={class:"mb-0 fw-normal"},CJ={class:"card-body px-4 pb-4 pt-2"},TJ={key:0,class:"accordion",id:"peerJobsLogsModalAccordion"},kJ={class:"accordion-header"},AJ=["data-bs-target"],MJ={key:0},IJ={class:"text-muted"},PJ=["id"],RJ={class:"accordion-body"},DJ={key:1,class:"card shadow-sm",style:{height:"153px"}},$J={class:"card-body text-muted text-center d-flex"},LJ={class:"m-auto"};function OJ(t,e,n,i,s,r){const o=Se("LocaleText"),a=Se("SchedulePeerJob");return D(),V("div",vJ,[g("div",bJ,[g("div",wJ,[g("div",xJ,[g("div",EJ,[g("h4",SJ,[B(o,{t:"All Active Jobs"})]),g("button",{type:"button",class:"btn-close ms-auto",onClick:e[0]||(e[0]=l=>this.$emit("close"))})]),g("div",CJ,[this.getAllJobs.length>0?(D(),V("div",TJ,[(D(!0),V($e,null,Xe(this.getAllJobs,(l,c)=>(D(),V("div",{class:"accordion-item",key:l.id},[g("h2",kJ,[g("button",{class:"accordion-button collapsed",type:"button","data-bs-toggle":"collapse","data-bs-target":"#collapse_"+c},[g("small",null,[g("strong",null,[l.name?(D(),V("span",MJ,Ee(l.name)+" • ",1)):ce("",!0),g("samp",IJ,Ee(l.id),1)])])],8,AJ)]),g("div",{id:"collapse_"+c,class:"accordion-collapse collapse","data-bs-parent":"#peerJobsLogsModalAccordion"},[g("div",RJ,[(D(!0),V($e,null,Xe(l.jobs,u=>(D(),Ce(a,{onDelete:e[1]||(e[1]=d=>this.$emit("refresh")),onRefresh:e[2]||(e[2]=d=>this.$emit("refresh")),dropdowns:this.store.PeerScheduleJobs.dropdowns,viewOnly:!0,key:u.JobID,pjob:u},null,8,["dropdowns","pjob"]))),128))])],8,PJ)]))),128))])):(D(),V("div",DJ,[g("div",$J,[g("span",LJ,[B(o,{t:"No active job at the moment."})])])]))])])])])])}const NJ=Ye(yJ,[["render",OJ]]),FJ={name:"peerJobsLogsModal",components:{LocaleText:Qe},props:{configurationInfo:Object},data(){return{dataLoading:!0,data:[],logFetchTime:void 0,showLogID:!1,showJobID:!0,showSuccessJob:!0,showFailedJob:!0,showLogAmount:10}},async mounted(){await this.fetchLog()},methods:{async fetchLog(){this.dataLoading=!0,await Vt(`/api/getPeerScheduleJobLogs/${this.configurationInfo.Name}`,{},t=>{this.data=t.data,this.logFetchTime=pi().format("YYYY-MM-DD HH:mm:ss"),this.dataLoading=!1})}},computed:{getLogs(){return this.data.filter(t=>this.showSuccessJob&&t.Status==="1"||this.showFailedJob&&t.Status==="0")},showLogs(){return this.getLogs.slice(0,this.showLogAmount)}}},BJ={class:"peerSettingContainer w-100 h-100 position-absolute top-0 start-0 overflow-y-scroll"},VJ={class:"container-fluid d-flex h-100 w-100"},zJ={class:"m-auto mt-0 modal-dialog-centered dashboardModal",style:{width:"100%"}},WJ={class:"card rounded-3 shadow w-100"},HJ={class:"card-header bg-transparent d-flex align-items-center gap-2 border-0 p-4 pb-0"},YJ={class:"mb-0"},jJ={class:"card-body px-4 pb-4 pt-2"},KJ={key:0},UJ={class:"mb-2 d-flex gap-3"},GJ=g("i",{class:"bi bi-arrow-clockwise me-2"},null,-1),XJ={class:"d-flex gap-3 align-items-center"},qJ={class:"text-muted"},ZJ={class:"form-check"},JJ={class:"form-check-label",for:"jobLogsShowSuccessCheck"},QJ={class:"badge text-success-emphasis bg-success-subtle"},eQ={class:"form-check"},tQ={class:"form-check-label",for:"jobLogsShowFailedCheck"},nQ={class:"badge text-danger-emphasis bg-danger-subtle"},iQ={class:"d-flex gap-3 align-items-center ms-auto"},sQ={class:"text-muted"},rQ={class:"form-check"},oQ={class:"form-check-label",for:"jobLogsShowJobIDCheck"},aQ={class:"form-check"},lQ={class:"form-check-label",for:"jobLogsShowLogIDCheck"},cQ={class:"table"},uQ={scope:"col"},dQ={key:0,scope:"col"},hQ={key:1,scope:"col"},fQ={scope:"col"},gQ={scope:"col"},pQ={style:{"font-size":"0.875rem"}},mQ={scope:"row"},_Q={key:0},yQ={class:"text-muted"},vQ={key:1},bQ={class:"text-muted"},wQ={class:"d-flex gap-2"},xQ=g("i",{class:"bi bi-chevron-down me-2"},null,-1),EQ=g("i",{class:"bi bi-chevron-up me-2"},null,-1),SQ={key:1,class:"d-flex align-items-center flex-column"},CQ=g("div",{class:"spinner-border text-body",role:"status"},[g("span",{class:"visually-hidden"},"Loading...")],-1),TQ=[CQ];function kQ(t,e,n,i,s,r){const o=Se("LocaleText");return D(),V("div",BJ,[g("div",VJ,[g("div",zJ,[g("div",WJ,[g("div",HJ,[g("h4",YJ,[B(o,{t:"Jobs Logs"})]),g("button",{type:"button",class:"btn-close ms-auto",onClick:e[0]||(e[0]=a=>this.$emit("close"))})]),g("div",jJ,[this.dataLoading?(D(),V("div",SQ,TQ)):(D(),V("div",KJ,[g("p",null,[B(o,{t:"Updated at"}),He(" : "+Ee(this.logFetchTime),1)]),g("div",UJ,[g("button",{onClick:e[1]||(e[1]=a=>this.fetchLog()),class:"btn btn-sm rounded-3 shadow-sm text-info-emphasis bg-info-subtle border-1 border-info-subtle me-1"},[GJ,B(o,{t:"Refresh"})]),g("div",XJ,[g("span",qJ,[B(o,{t:"Filter"})]),g("div",ZJ,[Ne(g("input",{class:"form-check-input",type:"checkbox","onUpdate:modelValue":e[2]||(e[2]=a=>this.showSuccessJob=a),id:"jobLogsShowSuccessCheck"},null,512),[[Jn,this.showSuccessJob]]),g("label",JJ,[g("span",QJ,[B(o,{t:"Success"})])])]),g("div",eQ,[Ne(g("input",{class:"form-check-input",type:"checkbox","onUpdate:modelValue":e[3]||(e[3]=a=>this.showFailedJob=a),id:"jobLogsShowFailedCheck"},null,512),[[Jn,this.showFailedJob]]),g("label",tQ,[g("span",nQ,[B(o,{t:"Failed"})])])])]),g("div",iQ,[g("span",sQ,[B(o,{t:"Display"})]),g("div",rQ,[Ne(g("input",{class:"form-check-input",type:"checkbox","onUpdate:modelValue":e[4]||(e[4]=a=>s.showJobID=a),id:"jobLogsShowJobIDCheck"},null,512),[[Jn,s.showJobID]]),g("label",oQ,[B(o,{t:"Job ID"})])]),g("div",aQ,[Ne(g("input",{class:"form-check-input",type:"checkbox","onUpdate:modelValue":e[5]||(e[5]=a=>s.showLogID=a),id:"jobLogsShowLogIDCheck"},null,512),[[Jn,s.showLogID]]),g("label",lQ,[B(o,{t:"Log ID"})])])])]),g("table",cQ,[g("thead",null,[g("tr",null,[g("th",uQ,[B(o,{t:"Date"})]),s.showLogID?(D(),V("th",dQ,[B(o,{t:"Log ID"})])):ce("",!0),s.showJobID?(D(),V("th",hQ,[B(o,{t:"Job ID"})])):ce("",!0),g("th",fQ,[B(o,{t:"Status"})]),g("th",gQ,[B(o,{t:"Message"})])])]),g("tbody",null,[(D(!0),V($e,null,Xe(this.showLogs,a=>(D(),V("tr",pQ,[g("th",mQ,Ee(a.LogDate),1),s.showLogID?(D(),V("td",_Q,[g("samp",yQ,Ee(a.LogID),1)])):ce("",!0),s.showJobID?(D(),V("td",vQ,[g("samp",bQ,Ee(a.JobID),1)])):ce("",!0),g("td",null,[g("span",{class:Ie(["badge",[a.Status==="1"?"text-success-emphasis bg-success-subtle":"text-danger-emphasis bg-danger-subtle"]])},Ee(a.Status==="1"?"Success":"Failed"),3)]),g("td",null,Ee(a.Message),1)]))),256))])]),g("div",wQ,[this.getLogs.length>this.showLogAmount?(D(),V("button",{key:0,onClick:e[6]||(e[6]=a=>this.showLogAmount+=20),class:"btn btn-sm rounded-3 shadow-sm text-primary-emphasis bg-primary-subtle border-1 border-primary-subtle"},[xQ,He(" Show More ")])):ce("",!0),this.showLogAmount>20?(D(),V("button",{key:1,onClick:e[7]||(e[7]=a=>this.showLogAmount=20),class:"btn btn-sm rounded-3 shadow-sm text-primary-emphasis bg-primary-subtle border-1 border-primary-subtle"},[EQ,He(" Collapse ")])):ce("",!0)])]))])])])])])}const AQ=Ye(FJ,[["render",kQ]]),MQ={name:"peerShareLinkModal",props:{peer:Object},components:{LocaleText:Qe,VueDatePicker:Bu},data(){return{dataCopy:void 0,loading:!1}},setup(){return{store:st()}},mounted(){this.dataCopy=JSON.parse(JSON.stringify(this.peer.ShareLink)).at(0)},watch:{"peer.ShareLink":{deep:!0,handler(t,e){e.length!==t.length&&(this.dataCopy=JSON.parse(JSON.stringify(this.peer.ShareLink)).at(0))}}},methods:{startSharing(){this.loading=!0,kt("/api/sharePeer/create",{Configuration:this.peer.configuration.Name,Peer:this.peer.id,ExpireDate:pi().add(7,"d").format("YYYY-MM-DD HH:mm:ss")},t=>{t.status?(this.peer.ShareLink=t.data,this.dataCopy=t.data.at(0)):this.store.newMessage("Server","Share link failed to create. Reason: "+t.message,"danger"),this.loading=!1})},updateLinkExpireDate(){kt("/api/sharePeer/update",this.dataCopy,t=>{t.status?(this.dataCopy=t.data.at(0),this.peer.ShareLink=t.data,this.store.newMessage("Server","Link expire date updated","success")):this.store.newMessage("Server","Link expire date failed to update. Reason: "+t.message,"danger"),this.loading=!1})},stopSharing(){this.loading=!0,this.dataCopy.ExpireDate=pi().format("YYYY-MM-DD HH:mm:ss"),this.updateLinkExpireDate()},parseTime(t){t?this.dataCopy.ExpireDate=pi(t).format("YYYY-MM-DD HH:mm:ss"):this.dataCopy.ExpireDate=void 0,this.updateLinkExpireDate()}},computed:{getUrl(){const t=this.store.getActiveCrossServer();return t?`${t.host}/${this.$router.resolve({path:"/share",query:{ShareID:this.dataCopy.ShareID}}).href}`:window.location.origin+window.location.pathname+this.$router.resolve({path:"/share",query:{ShareID:this.dataCopy.ShareID}}).href}}},IQ={class:"peerSettingContainer w-100 h-100 position-absolute top-0 start-0 overflow-y-scroll"},PQ={class:"container d-flex h-100 w-100"},RQ={class:"m-auto modal-dialog-centered dashboardModal",style:{width:"500px"}},DQ={class:"card rounded-3 shadow flex-grow-1"},$Q={class:"card-header bg-transparent d-flex align-items-center gap-2 border-0 p-4"},LQ={class:"mb-0"},OQ={key:0,class:"card-body px-4 pb-4"},NQ={key:0},FQ={class:"mb-3 text-muted"},BQ=["disabled"],VQ=g("i",{class:"bi bi-send-fill me-2"},null,-1),zQ=[VQ],WQ={key:1},HQ={class:"d-flex gap-2 mb-4"},YQ=g("i",{class:"bi bi-link-45deg"},null,-1),jQ=["href"],KQ={class:"d-flex flex-column gap-2 mb-3"},UQ=g("i",{class:"bi bi-calendar me-2"},null,-1),GQ=["disabled"],XQ=g("i",{class:"bi bi-send-slash-fill me-2"},null,-1),qQ=[XQ];function ZQ(t,e,n,i,s,r){const o=Se("LocaleText"),a=Se("VueDatePicker");return D(),V("div",IQ,[g("div",PQ,[g("div",RQ,[g("div",DQ,[g("div",$Q,[g("h4",LQ,[B(o,{t:"Share Peer"})]),g("button",{type:"button",class:"btn-close ms-auto",onClick:e[0]||(e[0]=l=>this.$emit("close"))})]),this.peer.ShareLink?(D(),V("div",OQ,[this.dataCopy?(D(),V("div",WQ,[g("div",HQ,[YQ,g("a",{href:this.getUrl,class:"text-decoration-none",target:"_blank"},Ee(r.getUrl),9,jQ)]),g("div",KQ,[g("small",null,[UQ,B(o,{t:"Expire At"})]),B(a,{is24:!0,"min-date":new Date,"model-value":this.dataCopy.ExpireDate,"onUpdate:modelValue":this.parseTime,"time-picker-inline":"",format:"yyyy-MM-dd HH:mm:ss","preview-format":"yyyy-MM-dd HH:mm:ss",dark:this.store.Configuration.Server.dashboard_theme==="dark"},null,8,["min-date","model-value","onUpdate:modelValue","dark"])]),g("button",{onClick:e[2]||(e[2]=l=>this.stopSharing()),disabled:this.loading,class:"w-100 btn bg-danger-subtle text-danger-emphasis border-1 border-danger-subtle rounded-3 shadow-sm"},[g("span",{class:Ie({"animate__animated animate__flash animate__infinite animate__slower":this.loading})},qQ,2),this.loading?(D(),Ce(o,{key:0,t:"Stop Sharing..."})):(D(),Ce(o,{key:1,t:"Stop Sharing"}))],8,GQ)])):(D(),V("div",NQ,[g("h6",FQ,[B(o,{t:"Currently the peer is not sharing"})]),g("button",{onClick:e[1]||(e[1]=l=>this.startSharing()),disabled:this.loading,class:"w-100 btn bg-success-subtle text-success-emphasis border-1 border-success-subtle rounded-3 shadow-sm"},[g("span",{class:Ie({"animate__animated animate__flash animate__infinite animate__slower":this.loading})},zQ,2),this.loading?(D(),Ce(o,{key:0,t:"Sharing..."})):(D(),Ce(o,{key:1,t:"Start Sharing"}))],8,BQ)]))])):ce("",!0)])])])])}const JQ=Ye(MQ,[["render",ZQ]]);Tf.register(rU,kf,wU,pU,jC,Fj,KC,UC,zj,Vj,Wj,Hj,dG,fG,mG,IG,hm,$G,CU,jU,ZU,QU,aG);const QQ={name:"peerList",components:{LocaleText:Qe,PeerShareLinkModal:JQ,PeerJobsLogsModal:AQ,PeerJobsAllModal:NJ,PeerJobs:_J,PeerCreate:WT,PeerQRCode:P9,PeerSettings:PX,PeerSearch:D8,Peer:AH,Line:HG,Bar:WG},setup(){const t=st(),e=vi(),n=we(void 0);return{dashboardConfigurationStore:t,wireguardConfigurationStore:e,interval:n}},data(){return{configurationToggling:!1,loading:!1,error:null,configurationInfo:[],configurationPeers:[],historyDataSentDifference:[],historyDataReceivedDifference:[],historySentData:{labels:[],datasets:[{label:"Data Sent",data:[],fill:!1,borderColor:"#198754",tension:0}]},historyReceiveData:{labels:[],datasets:[{label:"Data Received",data:[],fill:!1,borderColor:"#0d6efd",tension:0}]},peerSetting:{modalOpen:!1,selectedPeer:void 0},peerScheduleJobs:{modalOpen:!1,selectedPeer:void 0},peerQRCode:{modalOpen:!1,peerConfigData:void 0},peerCreate:{modalOpen:!1},peerScheduleJobsAll:{modalOpen:!1},peerScheduleJobsLogs:{modalOpen:!1},peerShare:{modalOpen:!1,selectedPeer:void 0}}},mounted(){},watch:{$route:{immediate:!0,handler(){clearInterval(this.dashboardConfigurationStore.Peers.RefreshInterval),this.loading=!0;let t=this.$route.params.id;this.configurationInfo=[],this.configurationPeers=[],t&&(this.getPeers(t),this.setPeerInterval())}},"dashboardConfigurationStore.Configuration.Server.dashboard_refresh_interval"(){clearInterval(this.dashboardConfigurationStore.Peers.RefreshInterval),this.setPeerInterval()}},beforeRouteLeave(){clearInterval(this.dashboardConfigurationStore.Peers.RefreshInterval)},methods:{toggle(){this.configurationToggling=!0,Vt("/api/toggleWireguardConfiguration/",{configurationName:this.configurationInfo.Name},t=>{t.status?this.dashboardConfigurationStore.newMessage("Server",`${this.configurationInfo.Name} ${t.data?"is on":"is off"}`,"success"):this.dashboardConfigurationStore.newMessage("Server",t.message,"danger"),this.configurationInfo.Status=t.data,this.configurationToggling=!1})},getPeers(t=this.$route.params.id){Vt("/api/getWireguardConfigurationInfo",{configurationName:t},e=>{if(this.configurationInfo=e.data.configurationInfo,this.configurationPeers=e.data.configurationPeers,this.configurationPeers.forEach(n=>{n.restricted=!1}),e.data.configurationRestrictedPeers.forEach(n=>{n.restricted=!0,this.configurationPeers.push(n)}),this.loading=!1,this.configurationPeers.length>0){const n=this.configurationPeers.map(s=>s.total_sent+s.cumu_sent).reduce((s,r)=>s+r).toFixed(4),i=this.configurationPeers.map(s=>s.total_receive+s.cumu_receive).reduce((s,r)=>s+r).toFixed(4);this.historyDataSentDifference[this.historyDataSentDifference.length-1]!==n&&(this.historyDataSentDifference.length>0&&(this.historySentData={labels:[...this.historySentData.labels,pi().format("HH:mm:ss A")],datasets:[{label:"Data Sent",data:[...this.historySentData.datasets[0].data,((n-this.historyDataSentDifference[this.historyDataSentDifference.length-1])*1e3).toFixed(4)],fill:!1,borderColor:"#198754",tension:0}]}),this.historyDataSentDifference.push(n)),this.historyDataReceivedDifference[this.historyDataReceivedDifference.length-1]!==i&&(this.historyDataReceivedDifference.length>0&&(this.historyReceiveData={labels:[...this.historyReceiveData.labels,pi().format("HH:mm:ss A")],datasets:[{label:"Data Received",data:[...this.historyReceiveData.datasets[0].data,((i-this.historyDataReceivedDifference[this.historyDataReceivedDifference.length-1])*1e3).toFixed(4)],fill:!1,borderColor:"#0d6efd",tension:0}]}),this.historyDataReceivedDifference.push(i))}})},setPeerInterval(){this.dashboardConfigurationStore.Peers.RefreshInterval=setInterval(()=>{this.getPeers()},parseInt(this.dashboardConfigurationStore.Configuration.Server.dashboard_refresh_interval))}},computed:{configurationSummary(){return{connectedPeers:this.configurationPeers.filter(e=>e.status==="running").length,totalUsage:this.configurationPeers.length>0?this.configurationPeers.filter(e=>!e.restricted).map(e=>e.total_data+e.cumu_data).reduce((e,n)=>e+n,0).toFixed(4):0,totalReceive:this.configurationPeers.length>0?this.configurationPeers.filter(e=>!e.restricted).map(e=>e.total_receive+e.cumu_receive).reduce((e,n)=>e+n,0).toFixed(4):0,totalSent:this.configurationPeers.length>0?this.configurationPeers.filter(e=>!e.restricted).map(e=>e.total_sent+e.cumu_sent).reduce((e,n)=>e+n,0).toFixed(4):0}},receiveData(){return this.historyReceiveData},sentData(){return this.historySentData},individualDataUsage(){return{labels:this.configurationPeers.map(t=>t.name?t.name:`Untitled Peer - ${t.id}`),datasets:[{label:"Total Data Usage",data:this.configurationPeers.map(t=>t.cumu_data+t.total_data),backgroundColor:this.configurationPeers.map(t=>"#0dcaf0"),tooltip:{callbacks:{label:t=>`${t.formattedValue} GB`}}}]}},individualDataUsageChartOption(){return{responsive:!0,plugins:{legend:{display:!1}},scales:{x:{ticks:{display:!1},grid:{display:!1}},y:{ticks:{callback:(t,e)=>`${t} GB`},grid:{display:!1}}}}},chartOptions(){return{responsive:!0,plugins:{legend:{display:!1},tooltip:{callbacks:{label:t=>`${t.formattedValue} MB/s`}}},scales:{x:{ticks:{display:!1},grid:{display:!1}},y:{ticks:{callback:(t,e)=>`${t} MB/s`},grid:{display:!1}}}}},searchPeers(){new Gl(this.configurationPeers,{keys:["name","id","allowed_ip"]});const t=this.wireguardConfigurationStore.searchString?this.configurationPeers.filter(e=>e.name.includes(this.wireguardConfigurationStore.searchString)||e.id.includes(this.wireguardConfigurationStore.searchString)||e.allowed_ip.includes(this.wireguardConfigurationStore.searchString)):this.configurationPeers;return this.dashboardConfigurationStore.Configuration.Server.dashboard_sort==="restricted"?t.slice().sort((e,n)=>e[this.dashboardConfigurationStore.Configuration.Server.dashboard_sort]n[this.dashboardConfigurationStore.Configuration.Server.dashboard_sort]?-1:0):t.slice().sort((e,n)=>e[this.dashboardConfigurationStore.Configuration.Server.dashboard_sort]n[this.dashboardConfigurationStore.Configuration.Server.dashboard_sort]?1:0)}}},$f=t=>(bn("data-v-dc7f794a"),t=t(),wn(),t),eee={key:0,class:"container-md"},tee={class:"d-flex align-items-center"},nee={CLASS:"text-muted"},iee={class:"d-flex align-items-center gap-3"},see={class:"mb-0"},ree={class:"card rounded-3 bg-transparent shadow-sm ms-auto"},oee={class:"card-body py-2 d-flex align-items-center"},aee={class:"mb-0 text-muted"},lee={class:"form-check form-switch ms-auto"},cee=["for"],uee={key:4,class:"spinner-border spinner-border-sm ms-2","aria-hidden":"true"},dee=["disabled","id"],hee={class:"row mt-3 gy-2 gx-2 mb-2"},fee={class:"col-6 col-lg-3"},gee={class:"card rounded-3 bg-transparent shadow-sm"},pee={class:"card-body py-2"},mee={class:"mb-0 text-muted"},_ee={class:"col-6 col-lg-3"},yee={class:"card rounded-3 bg-transparent shadow-sm"},vee={class:"card-body py-2"},bee={class:"mb-0 text-muted"},wee={style:{"word-break":"break-all"},class:"col-12 col-lg-6"},xee={class:"card rounded-3 bg-transparent shadow-sm"},Eee={class:"card-body py-2"},See={class:"mb-0 text-muted"},Cee={class:"row gx-2 gy-2 mb-2"},Tee={class:"col-6 col-lg-3"},kee={class:"card rounded-3 bg-transparent shadow-sm"},Aee={class:"card-body d-flex"},Mee={class:"mb-0 text-muted"},Iee={class:"h4"},Pee=$f(()=>g("i",{class:"bi bi-ethernet ms-auto h2 text-muted"},null,-1)),Ree={class:"col-6 col-lg-3"},Dee={class:"card rounded-3 bg-transparent shadow-sm"},$ee={class:"card-body d-flex"},Lee={class:"mb-0 text-muted"},Oee={class:"h4"},Nee=$f(()=>g("i",{class:"bi bi-arrow-down-up ms-auto h2 text-muted"},null,-1)),Fee={class:"col-6 col-lg-3"},Bee={class:"card rounded-3 bg-transparent shadow-sm"},Vee={class:"card-body d-flex"},zee={class:"mb-0 text-muted"},Wee={class:"h4 text-primary"},Hee=$f(()=>g("i",{class:"bi bi-arrow-down ms-auto h2 text-muted"},null,-1)),Yee={class:"col-6 col-lg-3"},jee={class:"card rounded-3 bg-transparent shadow-sm"},Kee={class:"card-body d-flex"},Uee={class:"mb-0 text-muted"},Gee={class:"h4 text-success"},Xee=$f(()=>g("i",{class:"bi bi-arrow-up ms-auto h2 text-muted"},null,-1)),qee={class:"row gx-2 gy-2 mb-3"},Zee={class:"col-12 col-lg-6"},Jee={class:"card rounded-3 bg-transparent shadow-sm",style:{height:"270px"}},Qee={class:"card-header bg-transparent border-0"},ete={class:"text-muted"},tte={class:"card-body pt-1"},nte={class:"col-sm col-lg-3"},ite={class:"card rounded-3 bg-transparent shadow-sm",style:{height:"270px"}},ste={class:"card-header bg-transparent border-0"},rte={class:"text-muted"},ote={class:"card-body pt-1"},ate={class:"col-sm col-lg-3"},lte={class:"card rounded-3 bg-transparent shadow-sm",style:{height:"270px"}},cte={class:"card-header bg-transparent border-0"},ute={class:"text-muted"},dte={class:"card-body pt-1"},hte={class:"mb-3"};function fte(t,e,n,i,s,r){const o=Se("LocaleText"),a=Se("Bar"),l=Se("Line"),c=Se("PeerSearch"),u=Se("Peer"),d=Se("PeerSettings"),h=Se("PeerQRCode"),f=Se("PeerJobs"),p=Se("PeerJobsAllModal"),m=Se("PeerJobsLogsModal"),y=Se("PeerShareLinkModal");return this.loading?ce("",!0):(D(),V("div",eee,[g("div",tee,[g("div",null,[g("small",nee,[B(o,{t:"CONFIGURATION"})]),g("div",iee,[g("h1",see,[g("samp",null,Ee(this.configurationInfo.Name),1)])])]),g("div",ree,[g("div",oee,[g("div",null,[g("p",aee,[g("small",null,[B(o,{t:"Status"})])]),g("div",lee,[g("label",{class:"form-check-label",style:{cursor:"pointer"},for:"switch"+this.configurationInfo.id},[!this.configurationInfo.Status&&this.configurationToggling?(D(),Ce(o,{key:0,t:"Turning Off..."})):this.configurationInfo.Status&&this.configurationToggling?(D(),Ce(o,{key:1,t:"Turning On..."})):this.configurationInfo.Status&&!this.configurationToggling?(D(),Ce(o,{key:2,t:"On"})):!this.configurationInfo.Status&&!this.configurationToggling?(D(),Ce(o,{key:3,t:"Off"})):ce("",!0),this.configurationToggling?(D(),V("span",uee)):ce("",!0)],8,cee),Ne(g("input",{class:"form-check-input",style:{cursor:"pointer"},disabled:this.configurationToggling,type:"checkbox",role:"switch",id:"switch"+this.configurationInfo.id,onChange:e[0]||(e[0]=v=>this.toggle()),"onUpdate:modelValue":e[1]||(e[1]=v=>this.configurationInfo.Status=v)},null,40,dee),[[Jn,this.configurationInfo.Status]])])]),g("div",{class:Ie(["dot ms-5",{active:this.configurationInfo.Status}])},null,2)])])]),g("div",hee,[g("div",fee,[g("div",gee,[g("div",pee,[g("p",mee,[g("small",null,[B(o,{t:"Address"})])]),He(" "+Ee(this.configurationInfo.Address),1)])])]),g("div",_ee,[g("div",yee,[g("div",vee,[g("p",bee,[g("small",null,[B(o,{t:"Listen Port"})])]),He(" "+Ee(this.configurationInfo.ListenPort),1)])])]),g("div",wee,[g("div",xee,[g("div",Eee,[g("p",See,[g("small",null,[B(o,{t:"Public Key"})])]),g("samp",null,Ee(this.configurationInfo.PublicKey),1)])])])]),g("div",Cee,[g("div",Tee,[g("div",kee,[g("div",Aee,[g("div",null,[g("p",Mee,[g("small",null,[B(o,{t:"Connected Peers"})])]),g("strong",Iee,Ee(r.configurationSummary.connectedPeers),1)]),Pee])])]),g("div",Ree,[g("div",Dee,[g("div",$ee,[g("div",null,[g("p",Lee,[g("small",null,[B(o,{t:"Total Usage"})])]),g("strong",Oee,Ee(r.configurationSummary.totalUsage)+" GB",1)]),Nee])])]),g("div",Fee,[g("div",Bee,[g("div",Vee,[g("div",null,[g("p",zee,[g("small",null,[B(o,{t:"Total Received"})])]),g("strong",Wee,Ee(r.configurationSummary.totalReceive)+" GB",1)]),Hee])])]),g("div",Yee,[g("div",jee,[g("div",Kee,[g("div",null,[g("p",Uee,[g("small",null,[B(o,{t:"Total Sent"})])]),g("strong",Gee,Ee(r.configurationSummary.totalSent)+" GB",1)]),Xee])])])]),g("div",qee,[g("div",Zee,[g("div",Jee,[g("div",Qee,[g("small",ete,[B(o,{t:"Peers Data Usage"})])]),g("div",tte,[B(a,{data:r.individualDataUsage,options:r.individualDataUsageChartOption,style:{width:"100%",height:"200px","max-height":"200px"}},null,8,["data","options"])])])]),g("div",nte,[g("div",ite,[g("div",ste,[g("small",rte,[B(o,{t:"Real Time Received Data Usage"})])]),g("div",ote,[B(l,{options:r.chartOptions,data:r.receiveData,style:{width:"100%",height:"200px","max-height":"200px"}},null,8,["options","data"])])])]),g("div",ate,[g("div",lte,[g("div",cte,[g("small",ute,[B(o,{t:"Real Time Sent Data Usage"})])]),g("div",dte,[B(l,{options:r.chartOptions,data:r.sentData,style:{width:"100%",height:"200px","max-height":"200px"}},null,8,["options","data"])])])])]),g("div",hte,[B(c,{onJobsAll:e[2]||(e[2]=v=>this.peerScheduleJobsAll.modalOpen=!0),onJobLogs:e[3]||(e[3]=v=>this.peerScheduleJobsLogs.modalOpen=!0),configuration:this.configurationInfo},null,8,["configuration"]),B(jl,{name:"list",tag:"div",class:"row gx-2 gy-2 z-0"},{default:Re(()=>[(D(!0),V($e,null,Xe(this.searchPeers,v=>(D(),V("div",{class:"col-12 col-lg-6 col-xl-4",key:v.id},[B(u,{Peer:v,onShare:b=>{this.peerShare.selectedPeer=v.id,this.peerShare.modalOpen=!0},onRefresh:e[4]||(e[4]=b=>this.getPeers()),onJobs:b=>{s.peerScheduleJobs.modalOpen=!0,s.peerScheduleJobs.selectedPeer=this.configurationPeers.find(E=>E.id===v.id)},onSetting:b=>{s.peerSetting.modalOpen=!0,s.peerSetting.selectedPeer=this.configurationPeers.find(E=>E.id===v.id)},onQrcode:e[5]||(e[5]=b=>{this.peerQRCode.peerConfigData=b,this.peerQRCode.modalOpen=!0})},null,8,["Peer","onShare","onJobs","onSetting"])]))),128))]),_:1})]),B(Rt,{name:"zoom"},{default:Re(()=>[this.peerSetting.modalOpen?(D(),Ce(d,{key:"settings",selectedPeer:this.peerSetting.selectedPeer,onRefresh:e[6]||(e[6]=v=>this.getPeers()),onClose:e[7]||(e[7]=v=>this.peerSetting.modalOpen=!1)},null,8,["selectedPeer"])):ce("",!0)]),_:1}),B(Rt,{name:"zoom"},{default:Re(()=>[s.peerQRCode.modalOpen?(D(),Ce(h,{peerConfigData:this.peerQRCode.peerConfigData,key:"qrcode",onClose:e[8]||(e[8]=v=>this.peerQRCode.modalOpen=!1)},null,8,["peerConfigData"])):ce("",!0)]),_:1}),B(Rt,{name:"zoom"},{default:Re(()=>[this.peerScheduleJobs.modalOpen?(D(),Ce(f,{key:0,onRefresh:e[9]||(e[9]=v=>this.getPeers()),selectedPeer:this.peerScheduleJobs.selectedPeer,onClose:e[10]||(e[10]=v=>this.peerScheduleJobs.modalOpen=!1)},null,8,["selectedPeer"])):ce("",!0)]),_:1}),B(Rt,{name:"zoom"},{default:Re(()=>[this.peerScheduleJobsAll.modalOpen?(D(),Ce(p,{key:0,onRefresh:e[11]||(e[11]=v=>this.getPeers()),onClose:e[12]||(e[12]=v=>this.peerScheduleJobsAll.modalOpen=!1),configurationPeers:this.configurationPeers},null,8,["configurationPeers"])):ce("",!0)]),_:1}),B(Rt,{name:"zoom"},{default:Re(()=>[this.peerScheduleJobsLogs.modalOpen?(D(),Ce(m,{key:0,onClose:e[13]||(e[13]=v=>this.peerScheduleJobsLogs.modalOpen=!1),configurationInfo:this.configurationInfo},null,8,["configurationInfo"])):ce("",!0)]),_:1}),B(Rt,{name:"zoom"},{default:Re(()=>[this.peerShare.modalOpen?(D(),Ce(y,{key:0,onClose:e[14]||(e[14]=v=>{this.peerShare.modalOpen=!1,this.peerShare.selectedPeer=void 0}),peer:this.configurationPeers.find(v=>v.id===this.peerShare.selectedPeer)},null,8,["peer"])):ce("",!0)]),_:1})]))}const gte=Ye(QQ,[["render",fte],["__scopeId","data-v-dc7f794a"]]);class br{constructor(e){this.propagationStopped,this.defaultPrevented,this.type=e,this.target=null}preventDefault(){this.defaultPrevented=!0}stopPropagation(){this.propagationStopped=!0}}const Ll={PROPERTYCHANGE:"propertychange"};class Lf{constructor(){this.disposed=!1}dispose(){this.disposed||(this.disposed=!0,this.disposeInternal())}disposeInternal(){}}function pte(t,e,n){let i,s;n=n||cr;let r=0,o=t.length,a=!1;for(;r>1),s=+n(t[i],e),s<0?r=i+1:(o=i,a=!s);return a?r:~r}function cr(t,e){return t>e?1:t0?s-1:s}return i-1}if(n>0){for(let s=1;s0||n&&o===0)})}function mu(){return!0}function Nf(){return!1}function Ol(){}function jT(t){let e,n,i;return function(){const s=Array.prototype.slice.call(arguments);return(!n||this!==i||!xo(s,n))&&(i=this,n=s,e=t.apply(this,arguments)),e}}function yte(t){function e(){let n;try{n=t()}catch(i){return Promise.reject(i)}return n instanceof Promise?n:Promise.resolve(n)}return e()}function ju(t){for(const e in t)delete t[e]}function Nl(t){let e;for(e in t)return!1;return!e}class Ff extends Lf{constructor(e){super(),this.eventTarget_=e,this.pendingRemovals_=null,this.dispatching_=null,this.listeners_=null}addEventListener(e,n){if(!e||!n)return;const i=this.listeners_||(this.listeners_={}),s=i[e]||(i[e]=[]);s.includes(n)||s.push(n)}dispatchEvent(e){const n=typeof e=="string",i=n?e:e.type,s=this.listeners_&&this.listeners_[i];if(!s)return;const r=n?new br(e):e;r.target||(r.target=this.eventTarget_||this);const o=this.dispatching_||(this.dispatching_={}),a=this.pendingRemovals_||(this.pendingRemovals_={});i in o||(o[i]=0,a[i]=0),++o[i];let l;for(let c=0,u=s.length;c0:!1}removeEventListener(e,n){if(!this.listeners_)return;const i=this.listeners_[e];if(!i)return;const s=i.indexOf(n);s!==-1&&(this.pendingRemovals_&&e in this.pendingRemovals_?(i[s]=Ol,++this.pendingRemovals_[e]):(i.splice(s,1),i.length===0&&delete this.listeners_[e]))}}const et={CHANGE:"change",ERROR:"error",BLUR:"blur",CLEAR:"clear",CONTEXTMENU:"contextmenu",CLICK:"click",DBLCLICK:"dblclick",DRAGENTER:"dragenter",DRAGOVER:"dragover",DROP:"drop",FOCUS:"focus",KEYDOWN:"keydown",KEYPRESS:"keypress",LOAD:"load",RESIZE:"resize",TOUCHMOVE:"touchmove",WHEEL:"wheel"};function ft(t,e,n,i,s){if(s){const o=n;n=function(){t.removeEventListener(e,n),o.apply(i??this,arguments)}}else i&&i!==t&&(n=n.bind(i));const r={target:t,type:e,listener:n};return t.addEventListener(e,n),r}function Rh(t,e,n,i){return ft(t,e,n,i,!0)}function Dt(t){t&&t.target&&(t.target.removeEventListener(t.type,t.listener),ju(t))}class Ku extends Ff{constructor(){super(),this.on=this.onInternal,this.once=this.onceInternal,this.un=this.unInternal,this.revision_=0}changed(){++this.revision_,this.dispatchEvent(et.CHANGE)}getRevision(){return this.revision_}onInternal(e,n){if(Array.isArray(e)){const i=e.length,s=new Array(i);for(let r=0;r0;)this.pop()}extend(e){for(let n=0,i=e.length;nthis.getLength())throw new Error("Index out of bounds: "+e);this.unique_&&this.assertUnique_(n),this.array_.splice(e,0,n),this.updateLength_(),this.dispatchEvent(new Bd(ci.ADD,n,e))}pop(){return this.removeAt(this.getLength()-1)}push(e){this.unique_&&this.assertUnique_(e);const n=this.getLength();return this.insertAt(n,e),this.getLength()}remove(e){const n=this.array_;for(let i=0,s=n.length;i=this.getLength())return;const n=this.array_[e];return this.array_.splice(e,1),this.updateLength_(),this.dispatchEvent(new Bd(ci.REMOVE,n,e)),n}setAt(e,n){const i=this.getLength();if(e>=i){this.insertAt(e,n);return}if(e<0)throw new Error("Index out of bounds: "+e);this.unique_&&this.assertUnique_(n,e);const s=this.array_[e];this.array_[e]=n,this.dispatchEvent(new Bd(ci.REMOVE,s,e)),this.dispatchEvent(new Bd(ci.ADD,n,e))}updateLength_(){this.set(cw.LENGTH,this.array_.length)}assertUnique_(e,n){for(let i=0,s=this.array_.length;i1?(n=s,i=r):l>0&&(n+=o*l,i+=a*l)}return al(t,e,n,i)}function al(t,e,n,i){const s=n-t,r=i-e;return s*s+r*r}function xte(t){const e=t.length;for(let i=0;ir&&(r=l,s=a)}if(r===0)return null;const o=t[s];t[s]=t[i],t[i]=o;for(let a=i+1;a=0;i--){n[i]=t[i][e]/t[i][i];for(let s=i-1;s>=0;s--)t[s][e]-=t[s][i]*n[i]}return n}function ah(t){return t*Math.PI/180}function ll(t,e){const n=t%e;return n*e<0?n+e:n}function Ti(t,e,n){return t+n*(e-t)}function _y(t,e){const n=Math.pow(10,e);return Math.round(t*n)/n}function Vd(t,e){return Math.floor(_y(t,e))}function zd(t,e){return Math.ceil(_y(t,e))}class KT extends Vs{constructor(e){super(),this.on,this.once,this.un,this.background_=e.background;const n=Object.assign({},e);typeof e.properties=="object"&&(delete n.properties,Object.assign(n,e.properties)),n[xt.OPACITY]=e.opacity!==void 0?e.opacity:1,mt(typeof n[xt.OPACITY]=="number","Layer opacity must be a number"),n[xt.VISIBLE]=e.visible!==void 0?e.visible:!0,n[xt.Z_INDEX]=e.zIndex,n[xt.MAX_RESOLUTION]=e.maxResolution!==void 0?e.maxResolution:1/0,n[xt.MIN_RESOLUTION]=e.minResolution!==void 0?e.minResolution:0,n[xt.MIN_ZOOM]=e.minZoom!==void 0?e.minZoom:-1/0,n[xt.MAX_ZOOM]=e.maxZoom!==void 0?e.maxZoom:1/0,this.className_=n.className!==void 0?n.className:"ol-layer",delete n.className,this.setProperties(n),this.state_=null}getBackground(){return this.background_}getClassName(){return this.className_}getLayerState(e){const n=this.state_||{layer:this,managed:e===void 0?!0:e},i=this.getZIndex();return n.opacity=Jt(Math.round(this.getOpacity()*100)/100,0,1),n.visible=this.getVisible(),n.extent=this.getExtent(),n.zIndex=i===void 0&&!n.managed?1/0:i,n.maxResolution=this.getMaxResolution(),n.minResolution=Math.max(this.getMinResolution(),0),n.minZoom=this.getMinZoom(),n.maxZoom=this.getMaxZoom(),this.state_=n,n}getLayersArray(e){return pt()}getLayerStatesArray(e){return pt()}getExtent(){return this.get(xt.EXTENT)}getMaxResolution(){return this.get(xt.MAX_RESOLUTION)}getMinResolution(){return this.get(xt.MIN_RESOLUTION)}getMinZoom(){return this.get(xt.MIN_ZOOM)}getMaxZoom(){return this.get(xt.MAX_ZOOM)}getOpacity(){return this.get(xt.OPACITY)}getSourceState(){return pt()}getVisible(){return this.get(xt.VISIBLE)}getZIndex(){return this.get(xt.Z_INDEX)}setBackground(e){this.background_=e,this.changed()}setExtent(e){this.set(xt.EXTENT,e)}setMaxResolution(e){this.set(xt.MAX_RESOLUTION,e)}setMinResolution(e){this.set(xt.MIN_RESOLUTION,e)}setMaxZoom(e){this.set(xt.MAX_ZOOM,e)}setMinZoom(e){this.set(xt.MIN_ZOOM,e)}setOpacity(e){mt(typeof e=="number","Layer opacity must be a number"),this.set(xt.OPACITY,e)}setVisible(e){this.set(xt.VISIBLE,e)}setZIndex(e){this.set(xt.Z_INDEX,e)}disposeInternal(){this.state_&&(this.state_.layer=null,this.state_=null),super.disposeInternal()}}const Hi={PRERENDER:"prerender",POSTRENDER:"postrender",PRECOMPOSE:"precompose",POSTCOMPOSE:"postcompose",RENDERCOMPLETE:"rendercomplete"},Vn={ANIMATING:0,INTERACTING:1},Qi={CENTER:"center",RESOLUTION:"resolution",ROTATION:"rotation"},Ete=42,yy=256,_u={radians:6370997/(2*Math.PI),degrees:2*Math.PI*6370997/360,ft:.3048,m:1,"us-ft":1200/3937};class UT{constructor(e){this.code_=e.code,this.units_=e.units,this.extent_=e.extent!==void 0?e.extent:null,this.worldExtent_=e.worldExtent!==void 0?e.worldExtent:null,this.axisOrientation_=e.axisOrientation!==void 0?e.axisOrientation:"enu",this.global_=e.global!==void 0?e.global:!1,this.canWrapX_=!!(this.global_&&this.extent_),this.getPointResolutionFunc_=e.getPointResolution,this.defaultTileGrid_=null,this.metersPerUnit_=e.metersPerUnit}canWrapX(){return this.canWrapX_}getCode(){return this.code_}getExtent(){return this.extent_}getUnits(){return this.units_}getMetersPerUnit(){return this.metersPerUnit_||_u[this.units_]}getWorldExtent(){return this.worldExtent_}getAxisOrientation(){return this.axisOrientation_}isGlobal(){return this.global_}setGlobal(e){this.global_=e,this.canWrapX_=!!(e&&this.extent_)}getDefaultTileGrid(){return this.defaultTileGrid_}setDefaultTileGrid(e){this.defaultTileGrid_=e}setExtent(e){this.extent_=e,this.canWrapX_=!!(this.global_&&e)}setWorldExtent(e){this.worldExtent_=e}setGetPointResolution(e){this.getPointResolutionFunc_=e}getPointResolutionFunc(){return this.getPointResolutionFunc_}}const Uu=6378137,Ja=Math.PI*Uu,Ste=[-Ja,-Ja,Ja,Ja],Cte=[-180,-85,180,85],Wd=Uu*Math.log(Math.tan(Math.PI/2));class Oa extends UT{constructor(e){super({code:e,units:"m",extent:Ste,global:!0,worldExtent:Cte,getPointResolution:function(n,i){return n/Math.cosh(i[1]/Uu)}})}}const uw=[new Oa("EPSG:3857"),new Oa("EPSG:102100"),new Oa("EPSG:102113"),new Oa("EPSG:900913"),new Oa("http://www.opengis.net/def/crs/EPSG/0/3857"),new Oa("http://www.opengis.net/gml/srs/epsg.xml#3857")];function Tte(t,e,n,i){const s=t.length;n=n>1?n:2,i=i??n,e===void 0&&(n>2?e=t.slice():e=new Array(s));for(let r=0;rWd?o=Wd:o<-Wd&&(o=-Wd),e[r+1]=o}return e}function kte(t,e,n,i){const s=t.length;n=n>1?n:2,i=i??n,e===void 0&&(n>2?e=t.slice():e=new Array(s));for(let r=0;rs&&(l=l|kn.RIGHT),ar&&(l=l|kn.ABOVE),l===kn.UNKNOWN&&(l=kn.INTERSECTING),l}function Ui(){return[1/0,1/0,-1/0,-1/0]}function co(t,e,n,i,s){return s?(s[0]=t,s[1]=e,s[2]=n,s[3]=i,s):[t,e,n,i]}function Bf(t){return co(1/0,1/0,-1/0,-1/0,t)}function qT(t,e){const n=t[0],i=t[1];return co(n,i,n,i,e)}function wy(t,e,n,i,s){const r=Bf(s);return ZT(r,t,e,n,i)}function yu(t,e){return t[0]==e[0]&&t[2]==e[2]&&t[1]==e[1]&&t[3]==e[3]}function Dte(t,e){return e[0]t[2]&&(t[2]=e[2]),e[1]t[3]&&(t[3]=e[3]),t}function Gc(t,e){e[0]t[2]&&(t[2]=e[0]),e[1]t[3]&&(t[3]=e[1])}function ZT(t,e,n,i,s){for(;ne[0]?i[0]=t[0]:i[0]=e[0],t[1]>e[1]?i[1]=t[1]:i[1]=e[1],t[2]=e[0]&&t[1]<=e[3]&&t[3]>=e[1]}function Hf(t){return t[2]=o&&m<=l),!i&&r&kn.RIGHT&&!(s&kn.RIGHT)&&(y=f-(h-l)*p,i=y>=a&&y<=c),!i&&r&kn.BELOW&&!(s&kn.BELOW)&&(m=h-(f-a)/p,i=m>=o&&m<=l),!i&&r&kn.LEFT&&!(s&kn.LEFT)&&(y=f-(h-o)*p,i=y>=a&&y<=c)}return i}function QT(t,e){const n=e.getExtent(),i=da(t);if(e.canWrapX()&&(i[0]=n[2])){const s=vt(n),o=Math.floor((i[0]-n[0])/s)*s;t[0]-=o,t[2]-=o}return t}function xy(t,e,n){if(e.canWrapX()){const i=e.getExtent();if(!isFinite(t[0])||!isFinite(t[2]))return[[i[0],t[1],i[2],t[3]]];QT(t,e);const s=vt(i);if(vt(t)>s&&!n)return[[i[0],t[1],i[2],t[3]]];if(t[0]i[2])return[[t[0],t[1],i[2],t[3]],[i[0],t[1],t[2]-s,t[3]]]}return[t]}function Bte(t,e){return t[0]+=+e[0],t[1]+=+e[1],t}function $h(t,e){let n=!0;for(let i=t.length-1;i>=0;--i)if(t[i]!=e[i]){n=!1;break}return n}function Ey(t,e){const n=Math.cos(e),i=Math.sin(e),s=t[0]*n-t[1]*i,r=t[1]*n+t[0]*i;return t[0]=s,t[1]=r,t}function Vte(t,e){return t[0]*=e,t[1]*=e,t}function ek(t,e){if(e.canWrapX()){const n=vt(e.getExtent()),i=zte(t,e,n);i&&(t[0]-=i*n)}return t}function zte(t,e,n){const i=e.getExtent();let s=0;return e.canWrapX()&&(t[0]i[2])&&(n=n||vt(i),s=Math.floor((t[0]-i[0])/n)),s}const Wte=63710088e-1;function gw(t,e,n){n=n||Wte;const i=ah(t[1]),s=ah(e[1]),r=(s-i)/2,o=ah(e[0]-t[0])/2,a=Math.sin(r)*Math.sin(r)+Math.sin(o)*Math.sin(o)*Math.cos(i)*Math.cos(s);return 2*n*Math.atan2(Math.sqrt(a),Math.sqrt(1-a))}function tk(...t){console.warn(...t)}let Tm=!0;function nk(t){Tm=!(t===void 0?!0:t)}function Sy(t,e){if(e!==void 0){for(let n=0,i=t.length;n=-180&&t[0]<=180&&t[1]>=-90&&t[1]<=90&&(Tm=!1,tk("Call useGeographic() from ol/proj once to work with [longitude, latitude] coordinates.")),t}function Ty(t,e){return t}function Xr(t,e){return t}function Gte(){mw(uw),mw(hw),jte(hw,uw,Tte,kte)}Gte();function _w(t,e,n){return function(i,s,r,o,a){if(!i)return;if(!s&&!e)return i;const l=e?0:r[0]*s,c=e?0:r[1]*s,u=a?a[0]:0,d=a?a[1]:0;let h=t[0]+l/2+u,f=t[2]-l/2+u,p=t[1]+c/2+d,m=t[3]-c/2+d;h>f&&(h=(f+h)/2,f=h),p>m&&(p=(m+p)/2,m=p);let y=Jt(i[0],h,f),v=Jt(i[1],p,m);if(o&&n&&s){const b=30*s;y+=-b*Math.log(1+Math.max(0,h-i[0])/b)+b*Math.log(1+Math.max(0,i[0]-f)/b),v+=-b*Math.log(1+Math.max(0,p-i[1])/b)+b*Math.log(1+Math.max(0,i[1]-m)/b)}return[y,v]}}function Xte(t){return t}function ky(t,e,n,i){const s=vt(e)/n[0],r=Yn(e)/n[1];return i?Math.min(t,Math.max(s,r)):Math.min(t,Math.min(s,r))}function Ay(t,e,n){let i=Math.min(t,e);const s=50;return i*=Math.log(1+s*Math.max(0,t/e-1))/s+1,n&&(i=Math.max(i,n),i/=Math.log(1+s*Math.max(0,n/t-1))/s+1),Jt(i,n/2,e*2)}function qte(t,e,n,i){return e=e!==void 0?e:!0,function(s,r,o,a){if(s!==void 0){const l=t[0],c=t[t.length-1],u=n?ky(l,n,o,i):l;if(a)return e?Ay(s,u,c):Jt(s,c,u);const d=Math.min(u,s),h=Math.floor(my(t,d,r));return t[h]>u&&hMath.round(n*bw[i])/bw[i]).join(", ")+")"}function no(t,e,n,i,s,r,o){r=r||[],o=o||2;let a=0;for(let l=e;l{if(!i)return this.getSimplifiedGeometry(n);const s=this.clone();return s.applyTransform(i),s.getSimplifiedGeometry(n)})}simplifyTransformed(e,n){return this.simplifyTransformedInternal(this.getRevision(),e,n)}clone(){return pt()}closestPointXY(e,n,i,s){return pt()}containsXY(e,n){const i=this.getClosestPoint([e,n]);return i[0]===e&&i[1]===n}getClosestPoint(e,n){return n=n||[NaN,NaN],this.closestPointXY(e[0],e[1],n,1/0),n}intersectsCoordinate(e){return this.containsXY(e[0],e[1])}computeExtent(e){return pt()}getExtent(e){if(this.extentRevision_!=this.getRevision()){const n=this.computeExtent(this.extent_);(isNaN(n[0])||isNaN(n[1]))&&Bf(n),this.extentRevision_=this.getRevision()}return Nte(this.extent_,e)}rotate(e,n){pt()}scale(e,n,i){pt()}simplify(e){return this.getSimplifiedGeometry(e*e)}getSimplifiedGeometry(e){return pt()}getType(){return pt()}applyTransform(e){pt()}intersectsExtent(e){return pt()}translate(e,n){pt()}transform(e,n){const i=Gi(e),s=i.getUnits()=="tile-pixels"?function(r,o,a){const l=i.getExtent(),c=i.getWorldExtent(),u=Yn(c)/Yn(l);return _r(ww,c[0],c[3],u,-u,0,0,0),no(r,0,r.length,a,ww,o),Lh(i,n)(r,o,a)}:Lh(i,n);return this.applyTransform(s),this}}class jf extends ane{constructor(){super(),this.layout="XY",this.stride=2,this.flatCoordinates}computeExtent(e){return wy(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,e)}getCoordinates(){return pt()}getFirstCoordinate(){return this.flatCoordinates.slice(0,this.stride)}getFlatCoordinates(){return this.flatCoordinates}getLastCoordinate(){return this.flatCoordinates.slice(this.flatCoordinates.length-this.stride)}getLayout(){return this.layout}getSimplifiedGeometry(e){if(this.simplifiedGeometryRevision!==this.getRevision()&&(this.simplifiedGeometryMaxMinSquaredTolerance=0,this.simplifiedGeometryRevision=this.getRevision()),e<0||this.simplifiedGeometryMaxMinSquaredTolerance!==0&&e<=this.simplifiedGeometryMaxMinSquaredTolerance)return this;const n=this.getSimplifiedGeometryInternal(e);return n.getFlatCoordinates().length1)d=n;else if(h>0){for(let f=0;fs&&(s=c),r=a,o=l}return s}function une(t,e,n,i,s){for(let r=0,o=n.length;r0;){const d=c.pop(),h=c.pop();let f=0;const p=t[h],m=t[h+1],y=t[d],v=t[d+1];for(let b=h+i;bf&&(u=b,f=w)}f>s&&(l[(u-e)/i]=1,h+i0&&m>f)&&(p<0&&y0&&y>p)){c=d,u=h;continue}r[o++]=c,r[o++]=u,a=c,l=u,c=d,u=h}return r[o++]=c,r[o++]=u,o}function lk(t,e,n,i,s,r,o,a){for(let l=0,c=n.length;lr&&(c-a)*(r-l)-(s-a)*(u-l)>0&&o++:u<=r&&(c-a)*(r-l)-(s-a)*(u-l)<0&&o--,a=c,l=u}return o!==0}function uk(t,e,n,i,s,r){if(n.length===0||!Go(t,e,n[0],i,s,r))return!1;for(let o=1,a=n.length;ov&&(c=(u+d)/2,uk(t,e,n,i,c,p)&&(y=c,v=b)),u=d}return isNaN(y)&&(y=s[r]),o?(o.push(y,p,v),o):[y,p,v]}function yne(t,e,n,i,s){let r=[];for(let o=0,a=n.length;o=s[0]&&r[2]<=s[2]||r[1]>=s[1]&&r[3]<=s[3]?!0:dk(t,e,n,i,function(o,a){return Fte(s,o,a)}):!1}function hk(t,e,n,i,s){return!!($y(t,e,n,i,s)||Go(t,e,n,i,s[0],s[1])||Go(t,e,n,i,s[0],s[3])||Go(t,e,n,i,s[2],s[1])||Go(t,e,n,i,s[2],s[3]))}function vne(t,e,n,i,s){if(!hk(t,e,n[0],i,s))return!1;if(n.length===1)return!0;for(let r=1,o=n.length;r0}function wne(t,e,n,i,s){s=s!==void 0?s:!1;for(let r=0,o=n.length;r1&&typeof arguments[n-1]=="function"&&(i=arguments[n-1],--n);let s=0;for(;s0}getInteracting(){return this.hints_[Vn.INTERACTING]>0}cancelAnimations(){this.setHint(Vn.ANIMATING,-this.hints_[Vn.ANIMATING]);let e;for(let n=0,i=this.animations_.length;n=0;--i){const s=this.animations_[i];let r=!0;for(let o=0,a=s.length;o0?c/l.duration:1;u>=1?(l.complete=!0,u=1):r=!1;const d=l.easing(u);if(l.sourceCenter){const h=l.sourceCenter[0],f=l.sourceCenter[1],p=l.targetCenter[0],m=l.targetCenter[1];this.nextCenter_=l.targetCenter;const y=h+d*(p-h),v=f+d*(m-f);this.targetCenter_=[y,v]}if(l.sourceResolution&&l.targetResolution){const h=d===1?l.targetResolution:l.sourceResolution+d*(l.targetResolution-l.sourceResolution);if(l.anchor){const f=this.getViewportSize_(this.getRotation()),p=this.constraints_.resolution(h,0,f,!0);this.targetCenter_=this.calculateCenterZoom(p,l.anchor)}this.nextResolution_=l.targetResolution,this.targetResolution_=h,this.applyTargetState_(!0)}if(l.sourceRotation!==void 0&&l.targetRotation!==void 0){const h=d===1?ll(l.targetRotation+Math.PI,2*Math.PI)-Math.PI:l.sourceRotation+d*(l.targetRotation-l.sourceRotation);if(l.anchor){const f=this.constraints_.rotation(h,!0);this.targetCenter_=this.calculateCenterRotate(f,l.anchor)}this.nextRotation_=l.targetRotation,this.targetRotation_=h}if(this.applyTargetState_(!0),n=!0,!l.complete)break}if(r){this.animations_[i]=null,this.setHint(Vn.ANIMATING,-1),this.nextCenter_=null,this.nextResolution_=NaN,this.nextRotation_=NaN;const o=s[0].callback;o&&Hd(o,!0)}}this.animations_=this.animations_.filter(Boolean),n&&this.updateAnimationKey_===void 0&&(this.updateAnimationKey_=requestAnimationFrame(this.updateAnimations_.bind(this)))}calculateCenterRotate(e,n){let i;const s=this.getCenterInternal();return s!==void 0&&(i=[s[0]-n[0],s[1]-n[1]],Ey(i,e-this.getRotation()),Bte(i,n)),i}calculateCenterZoom(e,n){let i;const s=this.getCenterInternal(),r=this.getResolution();if(s!==void 0&&r!==void 0){const o=n[0]-e*(n[0]-s[0])/r,a=n[1]-e*(n[1]-s[1])/r;i=[o,a]}return i}getViewportSize_(e){const n=this.viewportSize_;if(e){const i=n[0],s=n[1];return[Math.abs(i*Math.cos(e))+Math.abs(s*Math.sin(e)),Math.abs(i*Math.sin(e))+Math.abs(s*Math.cos(e))]}return n}setViewportSize(e){this.viewportSize_=Array.isArray(e)?e.slice():[100,100],this.getAnimating()||this.resolveConstraints(0)}getCenter(){const e=this.getCenterInternal();return e&&km(e,this.getProjection())}getCenterInternal(){return this.get(Qi.CENTER)}getConstraints(){return this.constraints_}getConstrainResolution(){return this.get("constrainResolution")}getHints(e){return e!==void 0?(e[0]=this.hints_[0],e[1]=this.hints_[1],e):this.hints_.slice()}calculateExtent(e){const n=this.calculateExtentInternal(e);return Ty(n,this.getProjection())}calculateExtentInternal(e){e=e||this.getViewportSizeMinusPadding_();const n=this.getCenterInternal();mt(n,"The view center is not defined");const i=this.getResolution();mt(i!==void 0,"The view resolution is not defined");const s=this.getRotation();return mt(s!==void 0,"The view rotation is not defined"),Cm(n,i,s,e)}getMaxResolution(){return this.maxResolution_}getMinResolution(){return this.minResolution_}getMaxZoom(){return this.getZoomForResolution(this.minResolution_)}setMaxZoom(e){this.applyOptions_(this.getUpdatedOptions_({maxZoom:e}))}getMinZoom(){return this.getZoomForResolution(this.maxResolution_)}setMinZoom(e){this.applyOptions_(this.getUpdatedOptions_({minZoom:e}))}setConstrainResolution(e){this.applyOptions_(this.getUpdatedOptions_({constrainResolution:e}))}getProjection(){return this.projection_}getResolution(){return this.get(Qi.RESOLUTION)}getResolutions(){return this.resolutions_}getResolutionForExtent(e,n){return this.getResolutionForExtentInternal(Xr(e,this.getProjection()),n)}getResolutionForExtentInternal(e,n){n=n||this.getViewportSizeMinusPadding_();const i=vt(e)/n[0],s=Yn(e)/n[1];return Math.max(i,s)}getResolutionForValueFunction(e){e=e||2;const n=this.getConstrainedResolution(this.maxResolution_),i=this.minResolution_,s=Math.log(n/i)/Math.log(e);return function(r){return n/Math.pow(e,r*s)}}getRotation(){return this.get(Qi.ROTATION)}getValueForResolutionFunction(e){const n=Math.log(e||2),i=this.getConstrainedResolution(this.maxResolution_),s=this.minResolution_,r=Math.log(i/s)/n;return function(o){return Math.log(i/o)/n/r}}getViewportSizeMinusPadding_(e){let n=this.getViewportSize_(e);const i=this.padding_;return i&&(n=[n[0]-i[1]-i[3],n[1]-i[0]-i[2]]),n}getState(){const e=this.getProjection(),n=this.getResolution(),i=this.getRotation();let s=this.getCenterInternal();const r=this.padding_;if(r){const o=this.getViewportSizeMinusPadding_();s=dp(s,this.getViewportSize_(),[o[0]/2+r[3],o[1]/2+r[0]],n,i)}return{center:s.slice(0),projection:e!==void 0?e:null,resolution:n,nextCenter:this.nextCenter_,nextResolution:this.nextResolution_,nextRotation:this.nextRotation_,rotation:i,zoom:this.getZoom()}}getViewStateAndExtent(){return{viewState:this.getState(),extent:this.calculateExtent()}}getZoom(){let e;const n=this.getResolution();return n!==void 0&&(e=this.getZoomForResolution(n)),e}getZoomForResolution(e){let n=this.minZoom_||0,i,s;if(this.resolutions_){const r=my(this.resolutions_,e,1);n=r,i=this.resolutions_[r],r==this.resolutions_.length-1?s=2:s=i/this.resolutions_[r+1]}else i=this.maxResolution_,s=this.zoomFactor_;return n+Math.log(i/e)/Math.log(s)}getResolutionForZoom(e){if(this.resolutions_?.length){if(this.resolutions_.length===1)return this.resolutions_[0];const n=Jt(Math.floor(e),0,this.resolutions_.length-2),i=this.resolutions_[n]/this.resolutions_[n+1];return this.resolutions_[n]/Math.pow(i,Jt(e-n,0,1))}return this.maxResolution_/Math.pow(this.zoomFactor_,e-this.minZoom_)}fit(e,n){let i;if(mt(Array.isArray(e)||typeof e.getSimplifiedGeometry=="function","Invalid extent or geometry provided as `geometry`"),Array.isArray(e)){mt(!Hf(e),"Cannot fit empty extent provided as `geometry`");const s=Xr(e,this.getProjection());i=Tw(s)}else if(e.getType()==="Circle"){const s=Xr(e.getExtent(),this.getProjection());i=Tw(s),i.rotate(this.getRotation(),da(s))}else i=e;this.fitInternal(i,n)}rotatedExtentForGeometry(e){const n=this.getRotation(),i=Math.cos(n),s=Math.sin(-n),r=e.getFlatCoordinates(),o=e.getStride();let a=1/0,l=1/0,c=-1/0,u=-1/0;for(let d=0,h=r.length;d{this.dispatchEvent("sourceready")},0))),this.changed()}getFeatures(e){return this.renderer_?this.renderer_.getFeatures(e):Promise.resolve([])}getData(e){return!this.renderer_||!this.rendered?null:this.renderer_.getData(e)}isVisible(e){let n;const i=this.getMapInternal();!e&&i&&(e=i.getView()),e instanceof Ss?n={viewState:e.getState(),extent:e.calculateExtent()}:n=e,!n.layerStatesArray&&i&&(n.layerStatesArray=i.getLayerGroup().getLayerStatesArray());let s;n.layerStatesArray?s=n.layerStatesArray.find(o=>o.layer===this):s=this.getLayerState();const r=this.getExtent();return Oy(s,n.viewState)&&(!r||fi(r,n.extent))}getAttributions(e){if(!this.isVisible(e))return[];const n=this.getSource()?.getAttributions();if(!n)return[];const i=e instanceof Ss?e.getViewStateAndExtent():e;let s=n(i);return Array.isArray(s)||(s=[s]),s}render(e,n){const i=this.getRenderer();return i.prepareFrame(e)?(this.rendered=!0,i.renderFrame(e,n)):null}unrender(){this.rendered=!1}getDeclutter(){}renderDeclutter(e,n){}renderDeferred(e){const n=this.getRenderer();n&&n.renderDeferred(e)}setMapInternal(e){e||this.unrender(),this.set(xt.MAP,e)}getMapInternal(){return this.get(xt.MAP)}setMap(e){this.mapPrecomposeKey_&&(Dt(this.mapPrecomposeKey_),this.mapPrecomposeKey_=null),e||this.changed(),this.mapRenderKey_&&(Dt(this.mapRenderKey_),this.mapRenderKey_=null),e&&(this.mapPrecomposeKey_=ft(e,Hi.PRECOMPOSE,this.handlePrecompose_,this),this.mapRenderKey_=ft(this,et.CHANGE,e.render,e),this.changed())}handlePrecompose_(e){const n=e.frameState.layerStatesArray,i=this.getLayerState(!1);mt(!n.some(s=>s.layer===i.layer),"A layer can only be added to the map once. Use either `layer.setMap()` or `map.addLayer()`, not both."),n.push(i)}setSource(e){this.set(xt.SOURCE,e)}getRenderer(){return this.renderer_||(this.renderer_=this.createRenderer()),this.renderer_}hasRenderer(){return!!this.renderer_}createRenderer(){return null}disposeInternal(){this.renderer_&&(this.renderer_.dispose(),delete this.renderer_),this.setSource(null),super.disposeInternal()}}function Oy(t,e){if(!t.visible)return!1;const n=e.resolution;if(n=t.maxResolution)return!1;const i=e.zoom;return i>t.minZoom&&i<=t.maxZoom}function fk(t,e,n=0,i=t.length-1,s=Ane){for(;i>n;){if(i-n>600){const l=i-n+1,c=e-n+1,u=Math.log(l),d=.5*Math.exp(2*u/3),h=.5*Math.sqrt(u*d*(l-d)/l)*(c-l/2<0?-1:1),f=Math.max(n,Math.floor(e-c*d/l+h)),p=Math.min(i,Math.floor(e+(l-c)*d/l+h));fk(t,e,f,p,s)}const r=t[e];let o=n,a=i;for(pc(t,n,e),s(t[i],r)>0&&pc(t,n,i);o0;)a--}s(t[n],r)===0?pc(t,n,a):(a++,pc(t,a,i)),a<=e&&(n=a+1),e<=a&&(i=a-1)}}function pc(t,e,n){const i=t[e];t[e]=t[n],t[n]=i}function Ane(t,e){return te?1:0}let gk=class{constructor(e=9){this._maxEntries=Math.max(4,e),this._minEntries=Math.max(2,Math.ceil(this._maxEntries*.4)),this.clear()}all(){return this._all(this.data,[])}search(e){let n=this.data;const i=[];if(!jd(e,n))return i;const s=this.toBBox,r=[];for(;n;){for(let o=0;o=0&&r[n].children.length>this._maxEntries;)this._split(r,n),n--;this._adjustParentBBoxes(s,r,n)}_split(e,n){const i=e[n],s=i.children.length,r=this._minEntries;this._chooseSplitAxis(i,r,s);const o=this._chooseSplitIndex(i,r,s),a=Ua(i.children.splice(o,i.children.length-o));a.height=i.height,a.leaf=i.leaf,Na(i,this.toBBox),Na(a,this.toBBox),n?e[n-1].children.push(a):this._splitRoot(i,a)}_splitRoot(e,n){this.data=Ua([e,n]),this.data.height=e.height+1,this.data.leaf=!1,Na(this.data,this.toBBox)}_chooseSplitIndex(e,n,i){let s,r=1/0,o=1/0;for(let a=n;a<=i-n;a++){const l=Cc(e,0,a,this.toBBox),c=Cc(e,a,i,this.toBBox),u=Dne(l,c),d=hp(l)+hp(c);u=n;c--){const u=e.children[c];Tc(a,e.leaf?r(u):u),l+=Yd(a)}return l}_adjustParentBBoxes(e,n,i){for(let s=i;s>=0;s--)Tc(n[s],e)}_condense(e){for(let n=e.length-1,i;n>=0;n--)e[n].children.length===0?n>0?(i=e[n-1].children,i.splice(i.indexOf(e[n]),1)):this.clear():Na(e[n],this.toBBox)}};function Mne(t,e,n){if(!n)return e.indexOf(t);for(let i=0;i=t.minX&&e.maxY>=t.minY}function Ua(t){return{children:t,height:1,leaf:!0,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0}}function kw(t,e,n,i,s){const r=[e,n];for(;r.length;){if(n=r.pop(),e=r.pop(),n-e<=i)continue;const o=e+Math.ceil((n-e)/i/2)*i;fk(t,o,e,n,s),r.push(e,o,o,n)}}const ot={IDLE:0,LOADING:1,LOADED:2,ERROR:3,EMPTY:4};function Aw(t){return t[0]>0&&t[1]>0}function $ne(t,e,n){return n===void 0&&(n=[0,0]),n[0]=t[0]*e+.5|0,n[1]=t[1]*e+.5|0,n}function mi(t,e){return Array.isArray(t)?t:(e===void 0?e=[t,t]:(e[0]=t,e[1]=t),e)}class Gf{constructor(e){this.opacity_=e.opacity,this.rotateWithView_=e.rotateWithView,this.rotation_=e.rotation,this.scale_=e.scale,this.scaleArray_=mi(e.scale),this.displacement_=e.displacement,this.declutterMode_=e.declutterMode}clone(){const e=this.getScale();return new Gf({opacity:this.getOpacity(),scale:Array.isArray(e)?e.slice():e,rotation:this.getRotation(),rotateWithView:this.getRotateWithView(),displacement:this.getDisplacement().slice(),declutterMode:this.getDeclutterMode()})}getOpacity(){return this.opacity_}getRotateWithView(){return this.rotateWithView_}getRotation(){return this.rotation_}getScale(){return this.scale_}getScaleArray(){return this.scaleArray_}getDisplacement(){return this.displacement_}getDeclutterMode(){return this.declutterMode_}getAnchor(){return pt()}getImage(e){return pt()}getHitDetectionImage(){return pt()}getPixelRatio(e){return 1}getImageState(){return pt()}getImageSize(){return pt()}getOrigin(){return pt()}getSize(){return pt()}setDisplacement(e){this.displacement_=e}setOpacity(e){this.opacity_=e}setRotateWithView(e){this.rotateWithView_=e}setRotation(e){this.rotation_=e}setScale(e){this.scale_=e,this.scaleArray_=mi(e)}listenImageChange(e){pt()}load(){pt()}unlistenImageChange(e){pt()}ready(){return Promise.resolve()}}const Eu={name:"rgb",min:[0,0,0],max:[255,255,255],channel:["red","green","blue"],alias:["RGB"]};var Ln={name:"xyz",min:[0,0,0],channel:["X","Y","Z"],alias:["XYZ","ciexyz","cie1931"]};Ln.whitepoint={2:{A:[109.85,100,35.585],C:[98.074,100,118.232],D50:[96.422,100,82.521],D55:[95.682,100,92.149],D65:[95.045592705167,100,108.9057750759878],D75:[94.972,100,122.638],F2:[99.187,100,67.395],F7:[95.044,100,108.755],F11:[100.966,100,64.37],E:[100,100,100]},10:{A:[111.144,100,35.2],C:[97.285,100,116.145],D50:[96.72,100,81.427],D55:[95.799,100,90.926],D65:[94.811,100,107.304],D75:[94.416,100,120.641],F2:[103.28,100,69.026],F7:[95.792,100,107.687],F11:[103.866,100,65.627],E:[100,100,100]}};Ln.max=Ln.whitepoint[2].D65;Ln.rgb=function(t,e){e=e||Ln.whitepoint[2].E;var n=t[0]/e[0],i=t[1]/e[1],s=t[2]/e[2],r,o,a;return r=n*3.240969941904521+i*-1.537383177570093+s*-.498610760293,o=n*-.96924363628087+i*1.87596750150772+s*.041555057407175,a=n*.055630079696993+i*-.20397695888897+s*1.056971514242878,r=r>.0031308?1.055*Math.pow(r,1/2.4)-.055:r=r*12.92,o=o>.0031308?1.055*Math.pow(o,1/2.4)-.055:o=o*12.92,a=a>.0031308?1.055*Math.pow(a,1/2.4)-.055:a=a*12.92,r=Math.min(Math.max(0,r),1),o=Math.min(Math.max(0,o),1),a=Math.min(Math.max(0,a),1),[r*255,o*255,a*255]};Eu.xyz=function(t,e){var n=t[0]/255,i=t[1]/255,s=t[2]/255;n=n>.04045?Math.pow((n+.055)/1.055,2.4):n/12.92,i=i>.04045?Math.pow((i+.055)/1.055,2.4):i/12.92,s=s>.04045?Math.pow((s+.055)/1.055,2.4):s/12.92;var r=n*.41239079926595+i*.35758433938387+s*.18048078840183,o=n*.21263900587151+i*.71516867876775+s*.072192315360733,a=n*.019330818715591+i*.11919477979462+s*.95053215224966;return e=e||Ln.whitepoint[2].E,[r*e[0],o*e[1],a*e[2]]};const Ny={name:"luv",min:[0,-134,-140],max:[100,224,122],channel:["lightness","u","v"],alias:["LUV","cieluv","cie1976"],xyz:function(t,e,n){var i,s,r,o,a,l,c,u,d,h,f,p,m;if(r=t[0],o=t[1],a=t[2],r===0)return[0,0,0];var y=.0011070564598794539;return e=e||"D65",n=n||2,d=Ln.whitepoint[n][e][0],h=Ln.whitepoint[n][e][1],f=Ln.whitepoint[n][e][2],p=4*d/(d+15*h+3*f),m=9*h/(d+15*h+3*f),i=o/(13*r)+p||0,s=a/(13*r)+m||0,c=r>8?h*Math.pow((r+16)/116,3):h*r*y,l=c*9*i/(4*s)||0,u=c*(12-3*i-20*s)/(4*s)||0,[l,c,u]}};Ln.luv=function(t,e,n){var i,s,r,o,a,l,c,u,d,h,f,p,m,y=.008856451679035631,v=903.2962962962961;e=e||"D65",n=n||2,d=Ln.whitepoint[n][e][0],h=Ln.whitepoint[n][e][1],f=Ln.whitepoint[n][e][2],p=4*d/(d+15*h+3*f),m=9*h/(d+15*h+3*f),l=t[0],c=t[1],u=t[2],i=4*l/(l+15*c+3*u)||0,s=9*c/(l+15*c+3*u)||0;var b=c/h;return r=b<=y?v*b:116*Math.pow(b,1/3)-16,o=13*r*(i-p),a=13*r*(s-m),[r,o,a]};var pk={name:"lchuv",channel:["lightness","chroma","hue"],alias:["LCHuv","cielchuv"],min:[0,0,0],max:[100,100,360],luv:function(t){var e=t[0],n=t[1],i=t[2],s,r,o;return o=i/360*2*Math.PI,s=n*Math.cos(o),r=n*Math.sin(o),[e,s,r]},xyz:function(t){return Ny.xyz(pk.luv(t))}};Ny.lchuv=function(t){var e=t[0],n=t[1],i=t[2],s=Math.sqrt(n*n+i*i),r=Math.atan2(i,n),o=r*360/2/Math.PI;return o<0&&(o+=360),[e,s,o]};Ln.lchuv=function(t){return Ny.lchuv(Ln.luv(t))};const Mw={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]};var Iw={red:0,orange:60,yellow:120,green:180,blue:240,purple:300};function Lne(t){var e,n=[],i=1,s;if(typeof t=="number")return{space:"rgb",values:[t>>>16,(t&65280)>>>8,t&255],alpha:1};if(typeof t=="number")return{space:"rgb",values:[t>>>16,(t&65280)>>>8,t&255],alpha:1};if(t=String(t).toLowerCase(),Mw[t])n=Mw[t].slice(),s="rgb";else if(t==="transparent")i=0,s="rgb",n=[0,0,0];else if(t[0]==="#"){var r=t.slice(1),o=r.length,a=o<=4;i=1,a?(n=[parseInt(r[0]+r[0],16),parseInt(r[1]+r[1],16),parseInt(r[2]+r[2],16)],o===4&&(i=parseInt(r[3]+r[3],16)/255)):(n=[parseInt(r[0]+r[1],16),parseInt(r[2]+r[3],16),parseInt(r[4]+r[5],16)],o===8&&(i=parseInt(r[6]+r[7],16)/255)),n[0]||(n[0]=0),n[1]||(n[1]=0),n[2]||(n[2]=0),s="rgb"}else if(e=/^((?:rgba?|hs[lvb]a?|hwba?|cmyk?|xy[zy]|gray|lab|lchu?v?|[ly]uv|lms|oklch|oklab|color))\s*\(([^\)]*)\)/.exec(t)){var l=e[1];s=l.replace(/a$/,"");var c=s==="cmyk"?4:s==="gray"?1:3;n=e[2].trim().split(/\s*[,\/]\s*|\s+/),s==="color"&&(s=n.shift()),n=n.map(function(u,d){if(u[u.length-1]==="%")return u=parseFloat(u)/100,d===3?u:s==="rgb"?u*255:s[0]==="h"||s[0]==="l"&&!d?u*100:s==="lab"?u*125:s==="lch"?d<2?u*150:u*360:s[0]==="o"&&!d?u:s==="oklab"?u*.4:s==="oklch"?d<2?u*.4:u*360:u;if(s[d]==="h"||d===2&&s[s.length-1]==="h"){if(Iw[u]!==void 0)return Iw[u];if(u.endsWith("deg"))return parseFloat(u);if(u.endsWith("turn"))return parseFloat(u)*360;if(u.endsWith("grad"))return parseFloat(u)*360/400;if(u.endsWith("rad"))return parseFloat(u)*180/Math.PI}return u==="none"?0:parseFloat(u)}),i=n.length>c?n.pop():1}else/[0-9](?:\s|\/|,)/.test(t)&&(n=t.match(/([0-9]+)/g).map(function(u){return parseFloat(u)}),s=t.match(/([a-z])/ig)?.join("")?.toLowerCase()||"rgb");return{space:s,values:n,alpha:i}}const gp={name:"hsl",min:[0,0,0],max:[360,100,100],channel:["hue","saturation","lightness"],alias:["HSL"],rgb:function(t){var e=t[0]/360,n=t[1]/100,i=t[2]/100,s,r,o,a,l,c=0;if(n===0)return l=i*255,[l,l,l];for(r=i<.5?i*(1+n):i+n-i*n,s=2*i-r,a=[0,0,0];c<3;)o=e+1/3*-(c-1),o<0?o++:o>1&&o--,l=6*o<1?s+(r-s)*6*o:2*o<1?r:3*o<2?s+(r-s)*(2/3-o)*6:s,a[c++]=l*255;return a}};Eu.hsl=function(t){var e=t[0]/255,n=t[1]/255,i=t[2]/255,s=Math.min(e,n,i),r=Math.max(e,n,i),o=r-s,a,l,c;return r===s?a=0:e===r?a=(n-i)/o:n===r?a=2+(i-e)/o:i===r&&(a=4+(e-n)/o),a=Math.min(a*60,360),a<0&&(a+=360),c=(s+r)/2,r===s?l=0:c<=.5?l=o/(r+s):l=o/(2-r-s),[a,l*100,c*100]};function One(t){Array.isArray(t)&&t.raw&&(t=String.raw(...arguments)),t instanceof Number&&(t=+t);var e,n=Lne(t);if(!n.space)return[];const i=n.space[0]==="h"?gp.min:Eu.min,s=n.space[0]==="h"?gp.max:Eu.max;return e=Array(3),e[0]=Math.min(Math.max(n.values[0],i[0]),s[0]),e[1]=Math.min(Math.max(n.values[1],i[1]),s[1]),e[2]=Math.min(Math.max(n.values[2],i[2]),s[2]),n.space[0]==="h"&&(e=gp.rgb(e)),e.push(Math.min(Math.max(n.alpha,0),1)),e}const Fy=[NaN,NaN,NaN,0];function Nne(t){return typeof t=="string"?t:Vy(t)}const Fne=1024,mc={};let pp=0;function Bne(t){if(t.length===4)return t;const e=t.slice();return e[3]=1,e}function Pw(t){const e=Ln.lchuv(Eu.xyz(t));return e[3]=t[3],e}function Vne(t){const e=Ln.rgb(pk.xyz(t));return e[3]=t[3],e}function By(t){if(t==="none")return Fy;if(mc.hasOwnProperty(t))return mc[t];if(pp>=Fne){let n=0;for(const i in mc)n++&3||(delete mc[i],--pp)}const e=One(t);if(e.length!==4)throw new Error('failed to parse "'+t+'" as color');for(const n of e)if(isNaN(n))throw new Error('failed to parse "'+t+'" as color');return mk(e),mc[t]=e,++pp,e}function Su(t){return Array.isArray(t)?t:By(t)}function mk(t){return t[0]=Jt(t[0]+.5|0,0,255),t[1]=Jt(t[1]+.5|0,0,255),t[2]=Jt(t[2]+.5|0,0,255),t[3]=Jt(t[3],0,1),t}function Vy(t){let e=t[0];e!=(e|0)&&(e=e+.5|0);let n=t[1];n!=(n|0)&&(n=n+.5|0);let i=t[2];i!=(i|0)&&(i=i+.5|0);const s=t[3]===void 0?1:Math.round(t[3]*1e3)/1e3;return"rgba("+e+","+n+","+i+","+s+")"}const uo=typeof navigator<"u"&&typeof navigator.userAgent<"u"?navigator.userAgent.toLowerCase():"",zne=uo.includes("firefox"),Wne=uo.includes("safari")&&!uo.includes("chrom");Wne&&(uo.includes("version/15.4")||/cpu (os|iphone os) 15_4 like mac os x/.test(uo));const Hne=uo.includes("webkit")&&!uo.includes("edge"),_k=uo.includes("macintosh"),yk=typeof devicePixelRatio<"u"?devicePixelRatio:1,vk=typeof WorkerGlobalScope<"u"&&typeof OffscreenCanvas<"u"&&self instanceof WorkerGlobalScope,bk=typeof Image<"u"&&Image.prototype.decode,wk=function(){let t=!1;try{const e=Object.defineProperty({},"passive",{get:function(){t=!0}});window.addEventListener("_",null,e),window.removeEventListener("_",null,e)}catch{}return t}();function an(t,e,n,i){let s;return n&&n.length?s=n.shift():vk?s=new OffscreenCanvas(t||300,e||300):s=document.createElement("canvas"),t&&(s.width=t),e&&(s.height=e),s.getContext("2d",i)}let mp;function Nh(){return mp||(mp=an(1,1)),mp}function Bl(t){const e=t.canvas;e.width=1,e.height=1,t.clearRect(0,0,1,1)}function Rw(t,e){const n=e.parentNode;n&&n.replaceChild(t,e)}function Yne(t){for(;t.lastChild;)t.lastChild.remove()}function jne(t,e){const n=t.childNodes;for(let i=0;;++i){const s=n[i],r=e[i];if(!s&&!r)break;if(s!==r){if(!s){t.appendChild(r);continue}if(!r){t.removeChild(s),--i;continue}t.insertBefore(r,s)}}}function Kne(t,e,n){const i=t;let s=!0,r=!1,o=!1;const a=[Rh(i,et.LOAD,function(){o=!0,r||e()})];return i.src&&bk?(r=!0,i.decode().then(function(){s&&e()}).catch(function(l){s&&(o?e():n())})):a.push(Rh(i,et.ERROR,n)),function(){s=!1,a.forEach(Dt)}}function Une(t,e){return new Promise((n,i)=>{function s(){o(),n(t)}function r(){o(),i(new Error("Image load error"))}function o(){t.removeEventListener("load",s),t.removeEventListener("error",r)}t.addEventListener("load",s),t.addEventListener("error",r),e&&(t.src=e)})}function Gne(t,e){return e&&(t.src=e),t.src&&bk?new Promise((n,i)=>t.decode().then(()=>n(t)).catch(s=>t.complete&&t.width?n(t):i(s))):Une(t)}class Xne{constructor(){this.cache_={},this.patternCache_={},this.cacheSize_=0,this.maxCacheSize_=32}clear(){this.cache_={},this.patternCache_={},this.cacheSize_=0}canExpireCache(){return this.cacheSize_>this.maxCacheSize_}expire(){if(this.canExpireCache()){let e=0;for(const n in this.cache_){const i=this.cache_[n];!(e++&3)&&!i.hasListener()&&(delete this.cache_[n],delete this.patternCache_[n],--this.cacheSize_)}}}get(e,n,i){const s=_p(e,n,i);return s in this.cache_?this.cache_[s]:null}getPattern(e,n,i){const s=_p(e,n,i);return s in this.patternCache_?this.patternCache_[s]:null}set(e,n,i,s,r){const o=_p(e,n,i),a=o in this.cache_;this.cache_[o]=s,r&&(s.getImageState()===ot.IDLE&&s.load(),s.getImageState()===ot.LOADING?s.ready().then(()=>{this.patternCache_[o]=Nh().createPattern(s.getImage(1),"repeat")}):this.patternCache_[o]=Nh().createPattern(s.getImage(1),"repeat")),a||++this.cacheSize_}setSize(e){this.maxCacheSize_=e,this.expire()}}function _p(t,e,n){const i=n?Su(n):"null";return e+":"+t+":"+i}const Ms=new Xne;let _c=null;class qne extends Ff{constructor(e,n,i,s,r){super(),this.hitDetectionImage_=null,this.image_=e,this.crossOrigin_=i,this.canvas_={},this.color_=r,this.imageState_=s===void 0?ot.IDLE:s,this.size_=e&&e.width&&e.height?[e.width,e.height]:null,this.src_=n,this.tainted_,this.ready_=null}initializeImage_(){this.image_=new Image,this.crossOrigin_!==null&&(this.image_.crossOrigin=this.crossOrigin_)}isTainted_(){if(this.tainted_===void 0&&this.imageState_===ot.LOADED){_c||(_c=an(1,1,void 0,{willReadFrequently:!0})),_c.drawImage(this.image_,0,0);try{_c.getImageData(0,0,1,1),this.tainted_=!1}catch{_c=null,this.tainted_=!0}}return this.tainted_===!0}dispatchChangeEvent_(){this.dispatchEvent(et.CHANGE)}handleImageError_(){this.imageState_=ot.ERROR,this.dispatchChangeEvent_()}handleImageLoad_(){this.imageState_=ot.LOADED,this.size_=[this.image_.width,this.image_.height],this.dispatchChangeEvent_()}getImage(e){return this.image_||this.initializeImage_(),this.replaceColor_(e),this.canvas_[e]?this.canvas_[e]:this.image_}getPixelRatio(e){return this.replaceColor_(e),this.canvas_[e]?e:1}getImageState(){return this.imageState_}getHitDetectionImage(){if(this.image_||this.initializeImage_(),!this.hitDetectionImage_)if(this.isTainted_()){const e=this.size_[0],n=this.size_[1],i=an(e,n);i.fillRect(0,0,e,n),this.hitDetectionImage_=i.canvas}else this.hitDetectionImage_=this.image_;return this.hitDetectionImage_}getSize(){return this.size_}getSrc(){return this.src_}load(){if(this.imageState_===ot.IDLE){this.image_||this.initializeImage_(),this.imageState_=ot.LOADING;try{this.src_!==void 0&&(this.image_.src=this.src_)}catch{this.handleImageError_()}this.image_ instanceof HTMLImageElement&&Gne(this.image_,this.src_).then(e=>{this.image_=e,this.handleImageLoad_()}).catch(this.handleImageError_.bind(this))}}replaceColor_(e){if(!this.color_||this.canvas_[e]||this.imageState_!==ot.LOADED)return;const n=this.image_,i=an(Math.ceil(n.width*e),Math.ceil(n.height*e)),s=i.canvas;i.scale(e,e),i.drawImage(n,0,0),i.globalCompositeOperation="multiply",i.fillStyle=Nne(this.color_),i.fillRect(0,0,s.width/e,s.height/e),i.globalCompositeOperation="destination-in",i.drawImage(n,0,0),this.canvas_[e]=s}ready(){return this.ready_||(this.ready_=new Promise(e=>{if(this.imageState_===ot.LOADED||this.imageState_===ot.ERROR)e();else{const n=()=>{(this.imageState_===ot.LOADED||this.imageState_===ot.ERROR)&&(this.removeEventListener(et.CHANGE,n),e())};this.addEventListener(et.CHANGE,n)}})),this.ready_}}function zy(t,e,n,i,s,r){let o=e===void 0?void 0:Ms.get(e,n,s);return o||(o=new qne(t,t&&"src"in t?t.src||void 0:e,n,i,s),Ms.set(e,n,s,o,r)),r&&o&&!Ms.getPattern(e,n,s)&&Ms.set(e,n,s,o,r),o}function Is(t){return t?Array.isArray(t)?Vy(t):typeof t=="object"&&"src"in t?Zne(t):t:null}function Zne(t){if(!t.offset||!t.size)return Ms.getPattern(t.src,"anonymous",t.color);const e=t.src+":"+t.offset,n=Ms.getPattern(e,void 0,t.color);if(n)return n;const i=Ms.get(t.src,"anonymous",null);if(i.getImageState()!==ot.LOADED)return null;const s=an(t.size[0],t.size[1]);return s.drawImage(i.getImage(1),t.offset[0],t.offset[1],t.size[0],t.size[1],0,0,t.size[0],t.size[1]),zy(s.canvas,e,void 0,ot.LOADED,t.color,!0),Ms.getPattern(e,void 0,t.color)}const Kd="ol-hidden",Xf="ol-unselectable",Wy="ol-control",Dw="ol-collapsed",Jne=new RegExp(["^\\s*(?=(?:(?:[-a-z]+\\s*){0,2}(italic|oblique))?)","(?=(?:(?:[-a-z]+\\s*){0,2}(small-caps))?)","(?=(?:(?:[-a-z]+\\s*){0,2}(bold(?:er)?|lighter|[1-9]00 ))?)","(?:(?:normal|\\1|\\2|\\3)\\s*){0,3}((?:xx?-)?","(?:small|large)|medium|smaller|larger|[\\.\\d]+(?:\\%|in|[cem]m|ex|p[ctx]))","(?:\\s*\\/\\s*(normal|[\\.\\d]+(?:\\%|in|[cem]m|ex|p[ctx])?))",`?\\s*([-,\\"\\'\\sa-z]+?)\\s*$`].join(""),"i"),$w=["style","variant","weight","size","lineHeight","family"],xk=function(t){const e=t.match(Jne);if(!e)return null;const n={lineHeight:"normal",size:"1.2em",style:"normal",weight:"normal",variant:"normal"};for(let i=0,s=$w.length;iMath.max(s,Bh(t,r)),0);return n[e]=i,i}function tie(t,e){const n=[],i=[],s=[];let r=0,o=0,a=0,l=0;for(let c=0,u=e.length;c<=u;c+=2){const d=e[c];if(d===` +`||c===u){r=Math.max(r,o),s.push(o),o=0,a+=l,l=0;continue}const h=e[c+1]||t.font,f=Bh(h,d);n.push(f),o+=f;const p=eie(h);i.push(p),l=Math.max(l,p)}return{width:r,height:a,widths:n,heights:i,lineWidths:s}}function nie(t,e,n,i,s,r,o,a,l,c,u){t.save(),n!==1&&(t.globalAlpha===void 0?t.globalAlpha=d=>d.globalAlpha*=n:t.globalAlpha*=n),e&&t.transform.apply(t,e),i.contextInstructions?(t.translate(l,c),t.scale(u[0],u[1]),iie(i,t)):u[0]<0||u[1]<0?(t.translate(l,c),t.scale(u[0],u[1]),t.drawImage(i,s,r,o,a,0,0,o,a)):t.drawImage(i,s,r,o,a,l,c,o*u[0],a*u[1]),t.restore()}function iie(t,e){const n=t.contextInstructions;for(let i=0,s=n.length;ithis.imageState_=ot.LOADED),this.render()}clone(){const e=this.getScale(),n=new qf({fill:this.getFill()?this.getFill().clone():void 0,points:this.getPoints(),radius:this.getRadius(),radius2:this.getRadius2(),angle:this.getAngle(),stroke:this.getStroke()?this.getStroke().clone():void 0,rotation:this.getRotation(),rotateWithView:this.getRotateWithView(),scale:Array.isArray(e)?e.slice():e,displacement:this.getDisplacement().slice(),declutterMode:this.getDeclutterMode()});return n.setOpacity(this.getOpacity()),n}getAnchor(){const e=this.size_,n=this.getDisplacement(),i=this.getScaleArray();return[e[0]/2-n[0]/i[0],e[1]/2+n[1]/i[1]]}getAngle(){return this.angle_}getFill(){return this.fill_}setFill(e){this.fill_=e,this.render()}getHitDetectionImage(){return this.hitDetectionCanvas_||(this.hitDetectionCanvas_=this.createHitDetectionCanvas_(this.renderOptions_)),this.hitDetectionCanvas_}getImage(e){let n=this.canvases_[e];if(!n){const i=this.renderOptions_,s=an(i.size*e,i.size*e);this.draw_(i,s,e),n=s.canvas,this.canvases_[e]=n}return n}getPixelRatio(e){return e}getImageSize(){return this.size_}getImageState(){return this.imageState_}getOrigin(){return this.origin_}getPoints(){return this.points_}getRadius(){return this.radius}getRadius2(){return this.radius2_}getSize(){return this.size_}getStroke(){return this.stroke_}setStroke(e){this.stroke_=e,this.render()}listenImageChange(e){}load(){}unlistenImageChange(e){}calculateLineJoinSize_(e,n,i){if(n===0||this.points_===1/0||e!=="bevel"&&e!=="miter")return n;let s=this.radius,r=this.radius2_===void 0?s:this.radius2_;if(s{this.patternImage_=null}),n.getImageState()===ot.IDLE&&n.load(),n.getImageState()===ot.LOADING&&(this.patternImage_=n)}this.color_=e}loading(){return!!this.patternImage_}ready(){return this.patternImage_?this.patternImage_.ready():Promise.resolve()}}const Zf=jy;class Ky{constructor(e){e=e||{},this.color_=e.color!==void 0?e.color:null,this.lineCap_=e.lineCap,this.lineDash_=e.lineDash!==void 0?e.lineDash:null,this.lineDashOffset_=e.lineDashOffset,this.lineJoin_=e.lineJoin,this.miterLimit_=e.miterLimit,this.width_=e.width}clone(){const e=this.getColor();return new Ky({color:Array.isArray(e)?e.slice():e||void 0,lineCap:this.getLineCap(),lineDash:this.getLineDash()?this.getLineDash().slice():void 0,lineDashOffset:this.getLineDashOffset(),lineJoin:this.getLineJoin(),miterLimit:this.getMiterLimit(),width:this.getWidth()})}getColor(){return this.color_}getLineCap(){return this.lineCap_}getLineDash(){return this.lineDash_}getLineDashOffset(){return this.lineDashOffset_}getLineJoin(){return this.lineJoin_}getMiterLimit(){return this.miterLimit_}getWidth(){return this.width_}setColor(e){this.color_=e}setLineCap(e){this.lineCap_=e}setLineDash(e){this.lineDash_=e}setLineDashOffset(e){this.lineDashOffset_=e}setLineJoin(e){this.lineJoin_=e}setMiterLimit(e){this.miterLimit_=e}setWidth(e){this.width_=e}}const Vh=Ky;class Jf{constructor(e){e=e||{},this.geometry_=null,this.geometryFunction_=Ow,e.geometry!==void 0&&this.setGeometry(e.geometry),this.fill_=e.fill!==void 0?e.fill:null,this.image_=e.image!==void 0?e.image:null,this.renderer_=e.renderer!==void 0?e.renderer:null,this.hitDetectionRenderer_=e.hitDetectionRenderer!==void 0?e.hitDetectionRenderer:null,this.stroke_=e.stroke!==void 0?e.stroke:null,this.text_=e.text!==void 0?e.text:null,this.zIndex_=e.zIndex}clone(){let e=this.getGeometry();return e&&typeof e=="object"&&(e=e.clone()),new Jf({geometry:e??void 0,fill:this.getFill()?this.getFill().clone():void 0,image:this.getImage()?this.getImage().clone():void 0,renderer:this.getRenderer()??void 0,stroke:this.getStroke()?this.getStroke().clone():void 0,text:this.getText()?this.getText().clone():void 0,zIndex:this.getZIndex()})}getRenderer(){return this.renderer_}setRenderer(e){this.renderer_=e}setHitDetectionRenderer(e){this.hitDetectionRenderer_=e}getHitDetectionRenderer(){return this.hitDetectionRenderer_}getGeometry(){return this.geometry_}getGeometryFunction(){return this.geometryFunction_}getFill(){return this.fill_}setFill(e){this.fill_=e}getImage(){return this.image_}setImage(e){this.image_=e}getStroke(){return this.stroke_}setStroke(e){this.stroke_=e}getText(){return this.text_}setText(e){this.text_=e}getZIndex(){return this.zIndex_}setGeometry(e){typeof e=="function"?this.geometryFunction_=e:typeof e=="string"?this.geometryFunction_=function(n){return n.get(e)}:e?e!==void 0&&(this.geometryFunction_=function(){return e}):this.geometryFunction_=Ow,this.geometry_=e}setZIndex(e){this.zIndex_=e}}function sie(t){let e;if(typeof t=="function")e=t;else{let n;Array.isArray(t)?n=t:(mt(typeof t.getZIndex=="function","Expected an `Style` or an array of `Style`"),n=[t]),e=function(){return n}}return e}let yp=null;function Ck(t,e){if(!yp){const n=new Zf({color:"rgba(255,255,255,0.4)"}),i=new Vh({color:"#3399CC",width:1.25});yp=[new Jf({image:new Yy({fill:n,stroke:i,radius:5}),fill:n,stroke:i})]}return yp}function Ow(t){return t.getGeometry()}const ul=Jf;function Nw(t,e,n,i){return n!==void 0&&i!==void 0?[n/t,i/e]:n!==void 0?n/t:i!==void 0?i/e:1}class Qf extends Gf{constructor(e){e=e||{};const n=e.opacity!==void 0?e.opacity:1,i=e.rotation!==void 0?e.rotation:0,s=e.scale!==void 0?e.scale:1,r=e.rotateWithView!==void 0?e.rotateWithView:!1;super({opacity:n,rotation:i,scale:s,displacement:e.displacement!==void 0?e.displacement:[0,0],rotateWithView:r,declutterMode:e.declutterMode}),this.anchor_=e.anchor!==void 0?e.anchor:[.5,.5],this.normalizedAnchor_=null,this.anchorOrigin_=e.anchorOrigin!==void 0?e.anchorOrigin:"top-left",this.anchorXUnits_=e.anchorXUnits!==void 0?e.anchorXUnits:"fraction",this.anchorYUnits_=e.anchorYUnits!==void 0?e.anchorYUnits:"fraction",this.crossOrigin_=e.crossOrigin!==void 0?e.crossOrigin:null;const o=e.img!==void 0?e.img:null;let a=e.src;mt(!(a!==void 0&&o),"`image` and `src` cannot be provided at the same time"),(a===void 0||a.length===0)&&o&&(a=o.src||wt(o)),mt(a!==void 0&&a.length>0,"A defined and non-empty `src` or `image` must be provided"),mt(!((e.width!==void 0||e.height!==void 0)&&e.scale!==void 0),"`width` or `height` cannot be provided together with `scale`");let l;if(e.src!==void 0?l=ot.IDLE:o!==void 0&&("complete"in o?o.complete?l=o.src?ot.LOADED:ot.IDLE:l=ot.LOADING:l=ot.LOADED),this.color_=e.color!==void 0?Su(e.color):null,this.iconImage_=zy(o,a,this.crossOrigin_,l,this.color_),this.offset_=e.offset!==void 0?e.offset:[0,0],this.offsetOrigin_=e.offsetOrigin!==void 0?e.offsetOrigin:"top-left",this.origin_=null,this.size_=e.size!==void 0?e.size:null,this.initialOptions_,e.width!==void 0||e.height!==void 0){let c,u;if(e.size)[c,u]=e.size;else{const d=this.getImage(1);if(d.width&&d.height)c=d.width,u=d.height;else if(d instanceof HTMLImageElement){this.initialOptions_=e;const h=()=>{if(this.unlistenImageChange(h),!this.initialOptions_)return;const f=this.iconImage_.getSize();this.setScale(Nw(f[0],f[1],e.width,e.height))};this.listenImageChange(h);return}}c!==void 0&&this.setScale(Nw(c,u,e.width,e.height))}}clone(){let e,n,i;return this.initialOptions_?(n=this.initialOptions_.width,i=this.initialOptions_.height):(e=this.getScale(),e=Array.isArray(e)?e.slice():e),new Qf({anchor:this.anchor_.slice(),anchorOrigin:this.anchorOrigin_,anchorXUnits:this.anchorXUnits_,anchorYUnits:this.anchorYUnits_,color:this.color_&&this.color_.slice?this.color_.slice():this.color_||void 0,crossOrigin:this.crossOrigin_,offset:this.offset_.slice(),offsetOrigin:this.offsetOrigin_,opacity:this.getOpacity(),rotateWithView:this.getRotateWithView(),rotation:this.getRotation(),scale:e,width:n,height:i,size:this.size_!==null?this.size_.slice():void 0,src:this.getSrc(),displacement:this.getDisplacement().slice(),declutterMode:this.getDeclutterMode()})}getAnchor(){let e=this.normalizedAnchor_;if(!e){e=this.anchor_;const s=this.getSize();if(this.anchorXUnits_=="fraction"||this.anchorYUnits_=="fraction"){if(!s)return null;e=this.anchor_.slice(),this.anchorXUnits_=="fraction"&&(e[0]*=s[0]),this.anchorYUnits_=="fraction"&&(e[1]*=s[1])}if(this.anchorOrigin_!="top-left"){if(!s)return null;e===this.anchor_&&(e=this.anchor_.slice()),(this.anchorOrigin_=="top-right"||this.anchorOrigin_=="bottom-right")&&(e[0]=-e[0]+s[0]),(this.anchorOrigin_=="bottom-left"||this.anchorOrigin_=="bottom-right")&&(e[1]=-e[1]+s[1])}this.normalizedAnchor_=e}const n=this.getDisplacement(),i=this.getScaleArray();return[e[0]-n[0]/i[0],e[1]+n[1]/i[1]]}setAnchor(e){this.anchor_=e,this.normalizedAnchor_=null}getColor(){return this.color_}getImage(e){return this.iconImage_.getImage(e)}getPixelRatio(e){return this.iconImage_.getPixelRatio(e)}getImageSize(){return this.iconImage_.getSize()}getImageState(){return this.iconImage_.getImageState()}getHitDetectionImage(){return this.iconImage_.getHitDetectionImage()}getOrigin(){if(this.origin_)return this.origin_;let e=this.offset_;if(this.offsetOrigin_!="top-left"){const n=this.getSize(),i=this.iconImage_.getSize();if(!n||!i)return null;e=e.slice(),(this.offsetOrigin_=="top-right"||this.offsetOrigin_=="bottom-right")&&(e[0]=i[0]-n[0]-e[0]),(this.offsetOrigin_=="bottom-left"||this.offsetOrigin_=="bottom-right")&&(e[1]=i[1]-n[1]-e[1])}return this.origin_=e,this.origin_}getSrc(){return this.iconImage_.getSrc()}getSize(){return this.size_?this.size_:this.iconImage_.getSize()}getWidth(){const e=this.getScaleArray();if(this.size_)return this.size_[0]*e[0];if(this.iconImage_.getImageState()==ot.LOADED)return this.iconImage_.getSize()[0]*e[0]}getHeight(){const e=this.getScaleArray();if(this.size_)return this.size_[1]*e[1];if(this.iconImage_.getImageState()==ot.LOADED)return this.iconImage_.getSize()[1]*e[1]}setScale(e){delete this.initialOptions_,super.setScale(e)}listenImageChange(e){this.iconImage_.addEventListener(et.CHANGE,e)}load(){this.iconImage_.load()}unlistenImageChange(e){this.iconImage_.removeEventListener(et.CHANGE,e)}ready(){return this.iconImage_.ready()}}const rie="#333";class Uy{constructor(e){e=e||{},this.font_=e.font,this.rotation_=e.rotation,this.rotateWithView_=e.rotateWithView,this.scale_=e.scale,this.scaleArray_=mi(e.scale!==void 0?e.scale:1),this.text_=e.text,this.textAlign_=e.textAlign,this.justify_=e.justify,this.repeat_=e.repeat,this.textBaseline_=e.textBaseline,this.fill_=e.fill!==void 0?e.fill:new Zf({color:rie}),this.maxAngle_=e.maxAngle!==void 0?e.maxAngle:Math.PI/4,this.placement_=e.placement!==void 0?e.placement:"point",this.overflow_=!!e.overflow,this.stroke_=e.stroke!==void 0?e.stroke:null,this.offsetX_=e.offsetX!==void 0?e.offsetX:0,this.offsetY_=e.offsetY!==void 0?e.offsetY:0,this.backgroundFill_=e.backgroundFill?e.backgroundFill:null,this.backgroundStroke_=e.backgroundStroke?e.backgroundStroke:null,this.padding_=e.padding===void 0?null:e.padding,this.declutterMode_=e.declutterMode}clone(){const e=this.getScale();return new Uy({font:this.getFont(),placement:this.getPlacement(),repeat:this.getRepeat(),maxAngle:this.getMaxAngle(),overflow:this.getOverflow(),rotation:this.getRotation(),rotateWithView:this.getRotateWithView(),scale:Array.isArray(e)?e.slice():e,text:this.getText(),textAlign:this.getTextAlign(),justify:this.getJustify(),textBaseline:this.getTextBaseline(),fill:this.getFill()?this.getFill().clone():void 0,stroke:this.getStroke()?this.getStroke().clone():void 0,offsetX:this.getOffsetX(),offsetY:this.getOffsetY(),backgroundFill:this.getBackgroundFill()?this.getBackgroundFill().clone():void 0,backgroundStroke:this.getBackgroundStroke()?this.getBackgroundStroke().clone():void 0,padding:this.getPadding()||void 0,declutterMode:this.getDeclutterMode()})}getOverflow(){return this.overflow_}getFont(){return this.font_}getMaxAngle(){return this.maxAngle_}getPlacement(){return this.placement_}getRepeat(){return this.repeat_}getOffsetX(){return this.offsetX_}getOffsetY(){return this.offsetY_}getFill(){return this.fill_}getRotateWithView(){return this.rotateWithView_}getRotation(){return this.rotation_}getScale(){return this.scale_}getScaleArray(){return this.scaleArray_}getStroke(){return this.stroke_}getText(){return this.text_}getTextAlign(){return this.textAlign_}getJustify(){return this.justify_}getTextBaseline(){return this.textBaseline_}getBackgroundFill(){return this.backgroundFill_}getBackgroundStroke(){return this.backgroundStroke_}getPadding(){return this.padding_}getDeclutterMode(){return this.declutterMode_}setOverflow(e){this.overflow_=e}setFont(e){this.font_=e}setMaxAngle(e){this.maxAngle_=e}setOffsetX(e){this.offsetX_=e}setOffsetY(e){this.offsetY_=e}setPlacement(e){this.placement_=e}setRepeat(e){this.repeat_=e}setRotateWithView(e){this.rotateWithView_=e}setFill(e){this.fill_=e}setRotation(e){this.rotation_=e}setScale(e){this.scale_=e,this.scaleArray_=mi(e!==void 0?e:1)}setStroke(e){this.stroke_=e}setText(e){this.text_=e}setTextAlign(e){this.textAlign_=e}setJustify(e){this.justify_=e}setTextBaseline(e){this.textBaseline_=e}setBackgroundFill(e){this.backgroundFill_=e}setBackgroundStroke(e){this.backgroundStroke_=e}setPadding(e){this.padding_=e}}let wa=0;const qn=1<",GreaterThanOrEqualTo:">=",LessThan:"<",LessThanOrEqualTo:"<=",Multiply:"*",Divide:"/",Add:"+",Subtract:"-",Clamp:"clamp",Mod:"%",Pow:"^",Abs:"abs",Floor:"floor",Ceil:"ceil",Round:"round",Sin:"sin",Cos:"cos",Atan:"atan",Sqrt:"sqrt",Match:"match",Between:"between",Interpolate:"interpolate",Coalesce:"coalesce",Case:"case",In:"in",Number:"number",String:"string",Array:"array",Color:"color",Id:"id",Band:"band",Palette:"palette",ToString:"to-string",Has:"has"},cie={[_e.Get]:Ue(it(1,1/0),Fw),[_e.Var]:Ue(it(1,1),uie),[_e.Has]:Ue(it(1,1/0),Fw),[_e.Id]:Ue(die,Fa),[_e.Concat]:Ue(it(2,1/0),_t(di)),[_e.GeometryType]:Ue(hie,Fa),[_e.LineMetric]:Ue(Fa),[_e.Resolution]:Ue(Fa),[_e.Zoom]:Ue(Fa),[_e.Time]:Ue(Fa),[_e.Any]:Ue(it(2,1/0),_t(qn)),[_e.All]:Ue(it(2,1/0),_t(qn)),[_e.Not]:Ue(it(1,1),_t(qn)),[_e.Equal]:Ue(it(2,2),_t(Ud)),[_e.NotEqual]:Ue(it(2,2),_t(Ud)),[_e.GreaterThan]:Ue(it(2,2),_t(dt)),[_e.GreaterThanOrEqualTo]:Ue(it(2,2),_t(dt)),[_e.LessThan]:Ue(it(2,2),_t(dt)),[_e.LessThanOrEqualTo]:Ue(it(2,2),_t(dt)),[_e.Multiply]:Ue(it(2,1/0),Bw),[_e.Coalesce]:Ue(it(2,1/0),Bw),[_e.Divide]:Ue(it(2,2),_t(dt)),[_e.Add]:Ue(it(2,1/0),_t(dt)),[_e.Subtract]:Ue(it(2,2),_t(dt)),[_e.Clamp]:Ue(it(3,3),_t(dt)),[_e.Mod]:Ue(it(2,2),_t(dt)),[_e.Pow]:Ue(it(2,2),_t(dt)),[_e.Abs]:Ue(it(1,1),_t(dt)),[_e.Floor]:Ue(it(1,1),_t(dt)),[_e.Ceil]:Ue(it(1,1),_t(dt)),[_e.Round]:Ue(it(1,1),_t(dt)),[_e.Sin]:Ue(it(1,1),_t(dt)),[_e.Cos]:Ue(it(1,1),_t(dt)),[_e.Atan]:Ue(it(1,2),_t(dt)),[_e.Sqrt]:Ue(it(1,1),_t(dt)),[_e.Match]:Ue(it(4,1/0),Vw,gie),[_e.Between]:Ue(it(3,3),_t(dt)),[_e.Interpolate]:Ue(it(6,1/0),Vw,pie),[_e.Case]:Ue(it(3,1/0),fie,mie),[_e.In]:Ue(it(2,2),_ie),[_e.Number]:Ue(it(1,1/0),_t(Ud)),[_e.String]:Ue(it(1,1/0),_t(Ud)),[_e.Array]:Ue(it(1,1/0),_t(dt)),[_e.Color]:Ue(it(1,4),_t(dt)),[_e.Band]:Ue(it(1,3),_t(dt)),[_e.Palette]:Ue(it(2,2),yie),[_e.ToString]:Ue(it(1,1),_t(qn|dt|di|os))};function Fw(t,e,n){const i=t.length-1,s=new Array(i);for(let r=0;re){const a=e===1/0?`${t} or more`:`${t} to ${e}`;throw new Error(`expected ${a} arguments for ${r}, got ${o}`)}}}function Bw(t,e,n){const i=t.length-1,s=new Array(i);for(let r=0;ri.featureId;case _e.GeometryType:return i=>i.geometryType;case _e.Concat:{const i=t.args.map(s=>gs(s));return s=>"".concat(...i.map(r=>r(s).toString()))}case _e.Resolution:return i=>i.resolution;case _e.Any:case _e.All:case _e.Between:case _e.In:case _e.Not:return Eie(t);case _e.Equal:case _e.NotEqual:case _e.LessThan:case _e.LessThanOrEqualTo:case _e.GreaterThan:case _e.GreaterThanOrEqualTo:return xie(t);case _e.Multiply:case _e.Divide:case _e.Add:case _e.Subtract:case _e.Clamp:case _e.Mod:case _e.Pow:case _e.Abs:case _e.Floor:case _e.Ceil:case _e.Round:case _e.Sin:case _e.Cos:case _e.Atan:case _e.Sqrt:return Sie(t);case _e.Case:return Cie(t);case _e.Match:return Tie(t);case _e.Interpolate:return kie(t);case _e.ToString:return Aie(t);default:throw new Error(`Unsupported operator ${n}`)}}function bie(t,e){const n=t.operator,i=t.args.length,s=new Array(i);for(let r=0;r{for(let o=0;o{for(let o=0;o{const r=t.args;let o=s.properties[i];for(let a=1,l=r.length;as.variables[i];case _e.Has:return s=>{const r=t.args;if(!(i in s.properties))return!1;let o=s.properties[i];for(let a=1,l=r.length;ai(r)===s(r);case _e.NotEqual:return r=>i(r)!==s(r);case _e.LessThan:return r=>i(r)i(r)<=s(r);case _e.GreaterThan:return r=>i(r)>s(r);case _e.GreaterThanOrEqualTo:return r=>i(r)>=s(r);default:throw new Error(`Unsupported comparison operator ${n}`)}}function Eie(t,e){const n=t.operator,i=t.args.length,s=new Array(i);for(let r=0;r{for(let o=0;o{for(let o=0;o{const o=s[0](r),a=s[1](r),l=s[2](r);return o>=a&&o<=l};case _e.In:return r=>{const o=s[0](r);for(let a=1;a!s[0](r);default:throw new Error(`Unsupported logical operator ${n}`)}}function Sie(t,e){const n=t.operator,i=t.args.length,s=new Array(i);for(let r=0;r{let o=1;for(let a=0;as[0](r)/s[1](r);case _e.Add:return r=>{let o=0;for(let a=0;as[0](r)-s[1](r);case _e.Clamp:return r=>{const o=s[0](r),a=s[1](r);if(ol?l:o};case _e.Mod:return r=>s[0](r)%s[1](r);case _e.Pow:return r=>Math.pow(s[0](r),s[1](r));case _e.Abs:return r=>Math.abs(s[0](r));case _e.Floor:return r=>Math.floor(s[0](r));case _e.Ceil:return r=>Math.ceil(s[0](r));case _e.Round:return r=>Math.round(s[0](r));case _e.Sin:return r=>Math.sin(s[0](r));case _e.Cos:return r=>Math.cos(s[0](r));case _e.Atan:return i===2?r=>Math.atan2(s[0](r),s[1](r)):r=>Math.atan(s[0](r));case _e.Sqrt:return r=>Math.sqrt(s[0](r));default:throw new Error(`Unsupported numeric operator ${n}`)}}function Cie(t,e){const n=t.args.length,i=new Array(n);for(let s=0;s{for(let r=0;r{const r=i[0](s);for(let o=1;o{const r=i[0](s),o=i[1](s);let a,l;for(let c=2;c=o)return c===2?d:h?Mie(r,o,a,l,u,d):Ic(r,o,a,l,u,d);a=u,l=d}return l}}function Aie(t,e){const n=t.operator,i=t.args.length,s=new Array(i);for(let r=0;r{const o=s[0](r);return t.args[0].type===os?Vy(o):o.toString()};default:throw new Error(`Unsupported convert operator ${n}`)}}function Ic(t,e,n,i,s,r){const o=s-n;if(o===0)return i;const a=e-n,l=t===1?a/o:(Math.pow(t,a)-1)/(Math.pow(t,o)-1);return i+l*(r-i)}function Mie(t,e,n,i,s,r){if(s-n===0)return i;const a=Pw(i),l=Pw(r);let c=l[2]-a[2];c>180?c-=360:c<-180&&(c+=360);const u=[Ic(t,e,n,a[0],s,l[0]),Ic(t,e,n,a[1],s,l[1]),a[2]+Ic(t,e,n,0,s,c),Ic(t,e,n,i[3],s,r[3])];return mk(Vne(u))}function Iie(t){return!0}function Pie(t){const e=Tk(),n=Rie(t,e),i=Ak();return function(s,r){if(i.properties=s.getPropertiesInternal(),i.resolution=r,e.featureId){const o=s.getId();o!==void 0?i.featureId=o:i.featureId=null}return e.geometryType&&(i.geometryType=kk(s.getGeometry())),n(i)}}function zw(t){const e=Tk(),n=t.length,i=new Array(n);for(let o=0;onull;i=Xy(t,e+"fill-color",n)}if(!i)return null;const s=new Zf;return function(r){const o=i(r);return o===Fy?null:(s.setColor(o),s)}}function Iu(t,e,n){const i=gi(t,e+"stroke-width",n),s=Xy(t,e+"stroke-color",n);if(!i&&!s)return null;const r=nr(t,e+"stroke-line-cap",n),o=nr(t,e+"stroke-line-join",n),a=Mk(t,e+"stroke-line-dash",n),l=gi(t,e+"stroke-line-dash-offset",n),c=gi(t,e+"stroke-miter-limit",n),u=new Vh;return function(d){if(s){const h=s(d);if(h===Fy)return null;u.setColor(h)}if(i&&u.setWidth(i(d)),r){const h=r(d);if(h!=="butt"&&h!=="round"&&h!=="square")throw new Error("Expected butt, round, or square line cap");u.setLineCap(h)}if(o){const h=o(d);if(h!=="bevel"&&h!=="round"&&h!=="miter")throw new Error("Expected bevel, round, or miter line join");u.setLineJoin(h)}return a&&u.setLineDash(a(d)),l&&u.setLineDashOffset(l(d)),c&&u.setMiterLimit(c(d)),u}}function Die(t,e){const n="text-",i=nr(t,n+"value",e);if(!i)return null;const s=Mu(t,n,e),r=Mu(t,n+"background-",e),o=Iu(t,n,e),a=Iu(t,n+"background-",e),l=nr(t,n+"font",e),c=gi(t,n+"max-angle",e),u=gi(t,n+"offset-x",e),d=gi(t,n+"offset-y",e),h=Pu(t,n+"overflow",e),f=nr(t,n+"placement",e),p=gi(t,n+"repeat",e),m=eg(t,n+"scale",e),y=Pu(t,n+"rotate-with-view",e),v=gi(t,n+"rotation",e),b=nr(t,n+"align",e),E=nr(t,n+"justify",e),C=nr(t,n+"baseline",e),w=Mk(t,n+"padding",e),x=tg(t,n+"declutter-mode"),T=new Uy({declutterMode:x});return function(k){if(T.setText(i(k)),s&&T.setFill(s(k)),r&&T.setBackgroundFill(r(k)),o&&T.setStroke(o(k)),a&&T.setBackgroundStroke(a(k)),l&&T.setFont(l(k)),c&&T.setMaxAngle(c(k)),u&&T.setOffsetX(u(k)),d&&T.setOffsetY(d(k)),h&&T.setOverflow(h(k)),f){const A=f(k);if(A!=="point"&&A!=="line")throw new Error("Expected point or line for text-placement");T.setPlacement(A)}if(p&&T.setRepeat(p(k)),m&&T.setScale(m(k)),y&&T.setRotateWithView(y(k)),v&&T.setRotation(v(k)),b){const A=b(k);if(A!=="left"&&A!=="center"&&A!=="right"&&A!=="end"&&A!=="start")throw new Error("Expected left, right, center, start, or end for text-align");T.setTextAlign(A)}if(E){const A=E(k);if(A!=="left"&&A!=="right"&&A!=="center")throw new Error("Expected left, right, or center for text-justify");T.setJustify(A)}if(C){const A=C(k);if(A!=="bottom"&&A!=="top"&&A!=="middle"&&A!=="alphabetic"&&A!=="hanging")throw new Error("Expected bottom, top, middle, alphabetic, or hanging for text-baseline");T.setTextBaseline(A)}return w&&T.setPadding(w(k)),T}}function $ie(t,e){return"icon-src"in t?Lie(t,e):"shape-points"in t?Oie(t,e):"circle-radius"in t?Nie(t,e):null}function Lie(t,e){const n="icon-",i=n+"src",s=Ik(t[i],i),r=zh(t,n+"anchor",e),o=eg(t,n+"scale",e),a=gi(t,n+"opacity",e),l=zh(t,n+"displacement",e),c=gi(t,n+"rotation",e),u=Pu(t,n+"rotate-with-view",e),d=Hw(t,n+"anchor-origin"),h=Yw(t,n+"anchor-x-units"),f=Yw(t,n+"anchor-y-units"),p=Wie(t,n+"color"),m=Vie(t,n+"cross-origin"),y=zie(t,n+"offset"),v=Hw(t,n+"offset-origin"),b=Wh(t,n+"width"),E=Wh(t,n+"height"),C=Bie(t,n+"size"),w=tg(t,n+"declutter-mode"),x=new Qf({src:s,anchorOrigin:d,anchorXUnits:h,anchorYUnits:f,color:p,crossOrigin:m,offset:y,offsetOrigin:v,height:E,width:b,size:C,declutterMode:w});return function(T){return a&&x.setOpacity(a(T)),l&&x.setDisplacement(l(T)),c&&x.setRotation(c(T)),u&&x.setRotateWithView(u(T)),o&&x.setScale(o(T)),r&&x.setAnchor(r(T)),x}}function Oie(t,e){const n="shape-",i=n+"points",s=n+"radius",r=Pm(t[i],i),o=Pm(t[s],s),a=Mu(t,n,e),l=Iu(t,n,e),c=eg(t,n+"scale",e),u=zh(t,n+"displacement",e),d=gi(t,n+"rotation",e),h=Pu(t,n+"rotate-with-view",e),f=Wh(t,n+"radius2"),p=Wh(t,n+"angle"),m=tg(t,n+"declutter-mode"),y=new qf({points:r,radius:o,radius2:f,angle:p,declutterMode:m});return function(v){return a&&y.setFill(a(v)),l&&y.setStroke(l(v)),u&&y.setDisplacement(u(v)),d&&y.setRotation(d(v)),h&&y.setRotateWithView(h(v)),c&&y.setScale(c(v)),y}}function Nie(t,e){const n="circle-",i=Mu(t,n,e),s=Iu(t,n,e),r=gi(t,n+"radius",e),o=eg(t,n+"scale",e),a=zh(t,n+"displacement",e),l=gi(t,n+"rotation",e),c=Pu(t,n+"rotate-with-view",e),u=tg(t,n+"declutter-mode"),d=new Yy({radius:5,declutterMode:u});return function(h){return r&&d.setRadius(r(h)),i&&d.setFill(i(h)),s&&d.setStroke(s(h)),a&&d.setDisplacement(a(h)),l&&d.setRotation(l(h)),c&&d.setRotateWithView(c(h)),o&&d.setScale(o(h)),d}}function gi(t,e,n){if(!(e in t))return;const i=wr(t[e],dt,n);return function(s){return Pm(i(s),e)}}function nr(t,e,n){if(!(e in t))return null;const i=wr(t[e],di,n);return function(s){return Ik(i(s),e)}}function Fie(t,e,n){const i=nr(t,e+"pattern-src",n),s=Ww(t,e+"pattern-offset",n),r=Ww(t,e+"pattern-size",n),o=Xy(t,e+"color",n);return function(a){return{src:i(a),offset:s&&s(a),size:r&&r(a),color:o&&o(a)}}}function Pu(t,e,n){if(!(e in t))return null;const i=wr(t[e],qn,n);return function(s){const r=i(s);if(typeof r!="boolean")throw new Error(`Expected a boolean for ${e}`);return r}}function Xy(t,e,n){if(!(e in t))return null;const i=wr(t[e],os,n);return function(s){return Pk(i(s),e)}}function Mk(t,e,n){if(!(e in t))return null;const i=wr(t[e],ha,n);return function(s){return Gu(i(s),e)}}function zh(t,e,n){if(!(e in t))return null;const i=wr(t[e],ha,n);return function(s){const r=Gu(i(s),e);if(r.length!==2)throw new Error(`Expected two numbers for ${e}`);return r}}function Ww(t,e,n){if(!(e in t))return null;const i=wr(t[e],ha,n);return function(s){return Rk(i(s),e)}}function eg(t,e,n){if(!(e in t))return null;const i=wr(t[e],ha|dt,n);return function(s){return Hie(i(s),e)}}function Wh(t,e){const n=t[e];if(n!==void 0){if(typeof n!="number")throw new Error(`Expected a number for ${e}`);return n}}function Bie(t,e){const n=t[e];if(n!==void 0){if(typeof n=="number")return mi(n);if(!Array.isArray(n))throw new Error(`Expected a number or size array for ${e}`);if(n.length!==2||typeof n[0]!="number"||typeof n[1]!="number")throw new Error(`Expected a number or size array for ${e}`);return n}}function Vie(t,e){const n=t[e];if(n!==void 0){if(typeof n!="string")throw new Error(`Expected a string for ${e}`);return n}}function Hw(t,e){const n=t[e];if(n!==void 0){if(n!=="bottom-left"&&n!=="bottom-right"&&n!=="top-left"&&n!=="top-right")throw new Error(`Expected bottom-left, bottom-right, top-left, or top-right for ${e}`);return n}}function Yw(t,e){const n=t[e];if(n!==void 0){if(n!=="pixels"&&n!=="fraction")throw new Error(`Expected pixels or fraction for ${e}`);return n}}function zie(t,e){const n=t[e];if(n!==void 0)return Gu(n,e)}function tg(t,e){const n=t[e];if(n!==void 0){if(typeof n!="string")throw new Error(`Expected a string for ${e}`);if(n!=="declutter"&&n!=="obstacle"&&n!=="none")throw new Error(`Expected declutter, obstacle, or none for ${e}`);return n}}function Wie(t,e){const n=t[e];if(n!==void 0)return Pk(n,e)}function Gu(t,e){if(!Array.isArray(t))throw new Error(`Expected an array for ${e}`);const n=t.length;for(let i=0;i4)throw new Error(`Expected a color with 3 or 4 values for ${e}`);return n}function Rk(t,e){const n=Gu(t,e);if(n.length!==2)throw new Error(`Expected an array of two numbers for ${e}`);return n}function Hie(t,e){return typeof t=="number"?t:Rk(t,e)}const jw={RENDER_ORDER:"renderOrder"};class Dk extends Uf{constructor(e){e=e||{};const n=Object.assign({},e);delete n.style,delete n.renderBuffer,delete n.updateWhileAnimating,delete n.updateWhileInteracting,super(n),this.declutter_=e.declutter?String(e.declutter):void 0,this.renderBuffer_=e.renderBuffer!==void 0?e.renderBuffer:100,this.style_=null,this.styleFunction_=void 0,this.setStyle(e.style),this.updateWhileAnimating_=e.updateWhileAnimating!==void 0?e.updateWhileAnimating:!1,this.updateWhileInteracting_=e.updateWhileInteracting!==void 0?e.updateWhileInteracting:!1}getDeclutter(){return this.declutter_}getFeatures(e){return super.getFeatures(e)}getRenderBuffer(){return this.renderBuffer_}getRenderOrder(){return this.get(jw.RENDER_ORDER)}getStyle(){return this.style_}getStyleFunction(){return this.styleFunction_}getUpdateWhileAnimating(){return this.updateWhileAnimating_}getUpdateWhileInteracting(){return this.updateWhileInteracting_}renderDeclutter(e,n){const i=this.getDeclutter();i in e.declutter||(e.declutter[i]=new gk(9)),this.getRenderer().renderDeclutter(e,n)}setRenderOrder(e){this.set(jw.RENDER_ORDER,e)}setStyle(e){this.style_=e===void 0?Ck:e;const n=Yie(e);this.styleFunction_=e===null?void 0:sie(n),this.changed()}}function Yie(t){if(t===void 0)return Ck;if(!t)return null;if(typeof t=="function"||t instanceof ul)return t;if(!Array.isArray(t))return zw([t]);if(t.length===0)return[];const e=t.length,n=t[0];if(n instanceof ul){const s=new Array(e);for(let r=0;r=0;--w){const x=m[w],T=x.layer;if(T.hasRenderer()&&Oy(x,u)&&a.call(l,T)){const k=T.getRenderer(),A=T.getSource();if(k&&A){const P=A.getWrapX()?f:e,F=d.bind(null,x.managed);b[0]=P[0]+p[C][0],b[1]=P[1]+p[C][1],c=k.forEachFeatureAtCoordinate(b,n,i,F,v)}if(c)return c}}if(v.length===0)return;const E=1/v.length;return v.forEach((C,w)=>C.distanceSq+=w*E),v.sort((C,w)=>C.distanceSq-w.distanceSq),v.some(C=>c=C.callback(C.feature,C.layer,C.geometry)),c}hasFeatureAtCoordinate(e,n,i,s,r,o){return this.forEachFeatureAtCoordinate(e,n,i,s,mu,this,r,o)!==void 0}getMap(){return this.map_}renderFrame(e){pt()}scheduleExpireIconCache(e){Ms.canExpireCache()&&e.postRenderFunctions.push(Kie)}}function Kie(t,e){Ms.expire()}class $k extends br{constructor(e,n,i,s){super(e),this.inversePixelTransform=n,this.frameState=i,this.context=s}}class Uie extends jie{constructor(e){super(e),this.fontChangeListenerKey_=ft(Js,Ll.PROPERTYCHANGE,e.redrawText,e),this.element_=document.createElement("div");const n=this.element_.style;n.position="absolute",n.width="100%",n.height="100%",n.zIndex="0",this.element_.className=Xf+" ol-layers";const i=e.getViewport();i.insertBefore(this.element_,i.firstChild||null),this.children_=[],this.renderedVisible_=!0}dispatchRenderEvent(e,n){const i=this.getMap();if(i.hasListener(e)){const s=new $k(e,void 0,n);i.dispatchEvent(s)}}disposeInternal(){Dt(this.fontChangeListenerKey_),this.element_.remove(),super.disposeInternal()}renderFrame(e){if(!e){this.renderedVisible_&&(this.element_.style.display="none",this.renderedVisible_=!1);return}this.calculateMatrices2D(e),this.dispatchRenderEvent(Hi.PRECOMPOSE,e);const n=e.layerStatesArray.sort((a,l)=>a.zIndex-l.zIndex);n.some(a=>a.layer instanceof Dk&&a.layer.getDeclutter())&&(e.declutter={});const s=e.viewState;this.children_.length=0;const r=[];let o=null;for(let a=0,l=n.length;a=0;--i){const s=n[i],r=s.layer;r.getDeclutter()&&r.renderDeclutter(e,s)}n.forEach(i=>i.layer.renderDeferred(e))}}}class zr extends br{constructor(e,n){super(e),this.layer=n}}const vp={LAYERS:"layers"};class Zl extends KT{constructor(e){e=e||{};const n=Object.assign({},e);delete n.layers;let i=e.layers;super(n),this.on,this.once,this.un,this.layersListenerKeys_=[],this.listenerKeys_={},this.addChangeListener(vp.LAYERS,this.handleLayersChanged_),i?Array.isArray(i)?i=new As(i.slice(),{unique:!0}):mt(typeof i.getArray=="function","Expected `layers` to be an array or a `Collection`"):i=new As(void 0,{unique:!0}),this.setLayers(i)}handleLayerChange_(){this.changed()}handleLayersChanged_(){this.layersListenerKeys_.forEach(Dt),this.layersListenerKeys_.length=0;const e=this.getLayers();this.layersListenerKeys_.push(ft(e,ci.ADD,this.handleLayersAdd_,this),ft(e,ci.REMOVE,this.handleLayersRemove_,this));for(const i in this.listenerKeys_)this.listenerKeys_[i].forEach(Dt);ju(this.listenerKeys_);const n=e.getArray();for(let i=0,s=n.length;i{this.clickTimeoutId_=void 0;const i=new Lr(Gt.SINGLECLICK,this.map_,e);this.dispatchEvent(i)},250)}updateActivePointers_(e){const n=e,i=n.pointerId;if(n.type==Gt.POINTERUP||n.type==Gt.POINTERCANCEL){delete this.trackedTouches_[i];for(const s in this.trackedTouches_)if(this.trackedTouches_[s].target!==n.target){delete this.trackedTouches_[s];break}}else(n.type==Gt.POINTERDOWN||n.type==Gt.POINTERMOVE)&&(this.trackedTouches_[i]=n);this.activePointers_=Object.values(this.trackedTouches_)}handlePointerUp_(e){this.updateActivePointers_(e);const n=new Lr(Gt.POINTERUP,this.map_,e,void 0,void 0,this.activePointers_);this.dispatchEvent(n),this.emulateClicks_&&!n.defaultPrevented&&!this.dragging_&&this.isMouseActionButton_(e)&&this.emulateClick_(this.down_),this.activePointers_.length===0&&(this.dragListenerKeys_.forEach(Dt),this.dragListenerKeys_.length=0,this.dragging_=!1,this.down_=null)}isMouseActionButton_(e){return e.button===0}handlePointerDown_(e){this.emulateClicks_=this.activePointers_.length===0,this.updateActivePointers_(e);const n=new Lr(Gt.POINTERDOWN,this.map_,e,void 0,void 0,this.activePointers_);if(this.dispatchEvent(n),this.down_=new PointerEvent(e.type,e),Object.defineProperty(this.down_,"target",{writable:!1,value:e.target}),this.dragListenerKeys_.length===0){const i=this.map_.getOwnerDocument();this.dragListenerKeys_.push(ft(i,Gt.POINTERMOVE,this.handlePointerMove_,this),ft(i,Gt.POINTERUP,this.handlePointerUp_,this),ft(this.element_,Gt.POINTERCANCEL,this.handlePointerUp_,this)),this.element_.getRootNode&&this.element_.getRootNode()!==i&&this.dragListenerKeys_.push(ft(this.element_.getRootNode(),Gt.POINTERUP,this.handlePointerUp_,this))}}handlePointerMove_(e){if(this.isMoving_(e)){this.updateActivePointers_(e),this.dragging_=!0;const n=new Lr(Gt.POINTERDRAG,this.map_,e,this.dragging_,void 0,this.activePointers_);this.dispatchEvent(n)}}relayMoveEvent_(e){this.originalPointerMoveEvent_=e;const n=!!(this.down_&&this.isMoving_(e));this.dispatchEvent(new Lr(Gt.POINTERMOVE,this.map_,e,n))}handleTouchMove_(e){const n=this.originalPointerMoveEvent_;(!n||n.defaultPrevented)&&(typeof e.cancelable!="boolean"||e.cancelable===!0)&&e.preventDefault()}isMoving_(e){return this.dragging_||Math.abs(e.clientX-this.down_.clientX)>this.moveTolerance_||Math.abs(e.clientY-this.down_.clientY)>this.moveTolerance_}disposeInternal(){this.relayedListenerKey_&&(Dt(this.relayedListenerKey_),this.relayedListenerKey_=null),this.element_.removeEventListener(et.TOUCHMOVE,this.boundHandleTouchMove_),this.pointerdownListenerKey_&&(Dt(this.pointerdownListenerKey_),this.pointerdownListenerKey_=null),this.dragListenerKeys_.forEach(Dt),this.dragListenerKeys_.length=0,this.element_=null,super.disposeInternal()}}const Or={POSTRENDER:"postrender",MOVESTART:"movestart",MOVEEND:"moveend",LOADSTART:"loadstart",LOADEND:"loadend"},Fn={LAYERGROUP:"layergroup",SIZE:"size",TARGET:"target",VIEW:"view"},Hh=1/0;class Xie{constructor(e,n){this.priorityFunction_=e,this.keyFunction_=n,this.elements_=[],this.priorities_=[],this.queuedElements_={}}clear(){this.elements_.length=0,this.priorities_.length=0,ju(this.queuedElements_)}dequeue(){const e=this.elements_,n=this.priorities_,i=e[0];e.length==1?(e.length=0,n.length=0):(e[0]=e.pop(),n[0]=n.pop(),this.siftUp_(0));const s=this.keyFunction_(i);return delete this.queuedElements_[s],i}enqueue(e){mt(!(this.keyFunction_(e)in this.queuedElements_),"Tried to enqueue an `element` that was already added to the queue");const n=this.priorityFunction_(e);return n!=Hh?(this.elements_.push(e),this.priorities_.push(n),this.queuedElements_[this.keyFunction_(e)]=!0,this.siftDown_(0,this.elements_.length-1),!0):!1}getCount(){return this.elements_.length}getLeftChildIndex_(e){return e*2+1}getRightChildIndex_(e){return e*2+2}getParentIndex_(e){return e-1>>1}heapify_(){let e;for(e=(this.elements_.length>>1)-1;e>=0;e--)this.siftUp_(e)}isEmpty(){return this.elements_.length===0}isKeyQueued(e){return e in this.queuedElements_}isQueued(e){return this.isKeyQueued(this.keyFunction_(e))}siftUp_(e){const n=this.elements_,i=this.priorities_,s=n.length,r=n[e],o=i[e],a=e;for(;e>1;){const l=this.getLeftChildIndex_(e),c=this.getRightChildIndex_(e),u=ce;){const a=this.getParentIndex_(n);if(s[a]>o)i[n]=i[a],s[n]=s[a],n=a;else break}i[n]=r,s[n]=o}reprioritize(){const e=this.priorityFunction_,n=this.elements_,i=this.priorities_;let s=0;const r=n.length;let o,a,l;for(a=0;a0;){const s=this.dequeue()[0],r=s.getKey();s.getState()===Fe.IDLE&&!(r in this.tilesLoadingKeys_)&&(this.tilesLoadingKeys_[r]=!0,++this.tilesLoading_,++i,s.load())}}}function Zie(t,e,n,i,s){if(!t||!(n in t.wantedTiles)||!t.wantedTiles[n][e.getKey()])return Hh;const r=t.viewState.center,o=i[0]-r[0],a=i[1]-r[1];return 65536*Math.log(s)+Math.sqrt(o*o+a*a)/s}class qy extends Vs{constructor(e){super();const n=e.element;n&&!e.target&&!n.style.pointerEvents&&(n.style.pointerEvents="auto"),this.element=n||null,this.target_=null,this.map_=null,this.listenerKeys=[],e.render&&(this.render=e.render),e.target&&this.setTarget(e.target)}disposeInternal(){this.element?.remove(),super.disposeInternal()}getMap(){return this.map_}setMap(e){this.map_&&this.element?.remove();for(let n=0,i=this.listenerKeys.length;ns.getAttributions(e)));if(this.attributions_!==void 0&&(Array.isArray(this.attributions_)?this.attributions_.forEach(s=>i.add(s)):i.add(this.attributions_)),!this.overrideCollapsible_){const s=!n.some(r=>r.getSource()?.getAttributionsCollapsible()===!1);this.setCollapsible(s)}return Array.from(i)}async updateElement_(e){if(!e){this.renderedVisible_&&(this.element.style.display="none",this.renderedVisible_=!1);return}const n=await Promise.all(this.collectSourceAttributions_(e).map(s=>yte(()=>s))),i=n.length>0;if(this.renderedVisible_!=i&&(this.element.style.display=i?"":"none",this.renderedVisible_=i),!xo(n,this.renderedAttributions_)){Yne(this.ulElement_);for(let s=0,r=n.length;s0&&i%(2*Math.PI)!==0?n.animate({rotation:0,duration:this.duration_,easing:ql}):n.setRotation(0))}render(e){const n=e.frameState;if(!n)return;const i=n.viewState.rotation;if(i!=this.rotation_){const s="rotate("+i+"rad)";if(this.autoHide_){const r=this.element.classList.contains(Kd);!r&&i===0?this.element.classList.add(Kd):r&&i!==0&&this.element.classList.remove(Kd)}this.label_.style.transform=s}this.rotation_=i}}const tse=ese;class nse extends qy{constructor(e){e=e||{},super({element:document.createElement("div"),target:e.target});const n=e.className!==void 0?e.className:"ol-zoom",i=e.delta!==void 0?e.delta:1,s=e.zoomInClassName!==void 0?e.zoomInClassName:n+"-in",r=e.zoomOutClassName!==void 0?e.zoomOutClassName:n+"-out",o=e.zoomInLabel!==void 0?e.zoomInLabel:"+",a=e.zoomOutLabel!==void 0?e.zoomOutLabel:"–",l=e.zoomInTipLabel!==void 0?e.zoomInTipLabel:"Zoom in",c=e.zoomOutTipLabel!==void 0?e.zoomOutTipLabel:"Zoom out",u=document.createElement("button");u.className=s,u.setAttribute("type","button"),u.title=l,u.appendChild(typeof o=="string"?document.createTextNode(o):o),u.addEventListener(et.CLICK,this.handleClick_.bind(this,i),!1);const d=document.createElement("button");d.className=r,d.setAttribute("type","button"),d.title=c,d.appendChild(typeof a=="string"?document.createTextNode(a):a),d.addEventListener(et.CLICK,this.handleClick_.bind(this,-i),!1);const h=n+" "+Xf+" "+Wy,f=this.element;f.className=h,f.appendChild(u),f.appendChild(d),this.duration_=e.duration!==void 0?e.duration:250}handleClick_(e,n){n.preventDefault(),this.zoomByDelta_(e)}zoomByDelta_(e){const i=this.getMap().getView();if(!i)return;const s=i.getZoom();if(s!==void 0){const r=i.getConstrainedZoom(s+e);this.duration_>0?(i.getAnimating()&&i.cancelAnimations(),i.animate({zoom:r,duration:this.duration_,easing:ql})):i.setZoom(r)}}}const ise=nse;function sse(t){t=t||{};const e=new As;return(t.zoom!==void 0?t.zoom:!0)&&e.push(new ise(t.zoomOptions)),(t.rotate!==void 0?t.rotate:!0)&&e.push(new tse(t.rotateOptions)),(t.attribution!==void 0?t.attribution:!0)&&e.push(new Qie(t.attributionOptions)),e}const Kw={ACTIVE:"active"};class Xu extends Vs{constructor(e){super(),this.on,this.once,this.un,e&&e.handleEvent&&(this.handleEvent=e.handleEvent),this.map_=null,this.setActive(!0)}getActive(){return this.get(Kw.ACTIVE)}getMap(){return this.map_}handleEvent(e){return!0}setActive(e){this.set(Kw.ACTIVE,e)}setMap(e){this.map_=e}}function rse(t,e,n){const i=t.getCenterInternal();if(i){const s=[i[0]+e[0],i[1]+e[1]];t.animateInternal({duration:n!==void 0?n:250,easing:tne,center:t.getConstrainedCenter(s)})}}function Zy(t,e,n,i){const s=t.getZoom();if(s===void 0)return;const r=t.getConstrainedZoom(s+e),o=t.getResolutionForZoom(r);t.getAnimating()&&t.cancelAnimations(),t.animate({resolution:o,anchor:n,duration:i!==void 0?i:250,easing:ql})}class ose extends Xu{constructor(e){super(),e=e||{},this.delta_=e.delta?e.delta:1,this.duration_=e.duration!==void 0?e.duration:250}handleEvent(e){let n=!1;if(e.type==Gt.DBLCLICK){const i=e.originalEvent,s=e.map,r=e.coordinate,o=i.shiftKey?-this.delta_:this.delta_,a=s.getView();Zy(a,o,r,this.duration_),i.preventDefault(),n=!0}return!n}}const ase=ose;class qu extends Xu{constructor(e){e=e||{},super(e),e.handleDownEvent&&(this.handleDownEvent=e.handleDownEvent),e.handleDragEvent&&(this.handleDragEvent=e.handleDragEvent),e.handleMoveEvent&&(this.handleMoveEvent=e.handleMoveEvent),e.handleUpEvent&&(this.handleUpEvent=e.handleUpEvent),e.stopDown&&(this.stopDown=e.stopDown),this.handlingDownUpSequence=!1,this.targetPointers=[]}getPointerCount(){return this.targetPointers.length}handleDownEvent(e){return!1}handleDragEvent(e){}handleEvent(e){if(!e.originalEvent)return!0;let n=!1;if(this.updateTrackedPointers_(e),this.handlingDownUpSequence){if(e.type==Gt.POINTERDRAG)this.handleDragEvent(e),e.originalEvent.preventDefault();else if(e.type==Gt.POINTERUP){const i=this.handleUpEvent(e);this.handlingDownUpSequence=i&&this.targetPointers.length>0}}else if(e.type==Gt.POINTERDOWN){const i=this.handleDownEvent(e);this.handlingDownUpSequence=i,n=this.stopDown(i)}else e.type==Gt.POINTERMOVE&&this.handleMoveEvent(e);return!n}handleMoveEvent(e){}handleUpEvent(e){return!1}stopDown(e){return e}updateTrackedPointers_(e){e.activePointers&&(this.targetPointers=e.activePointers)}}function Jy(t){const e=t.length;let n=0,i=0;for(let s=0;s0&&this.condition_(e)){const i=e.map.getView();return this.lastCentroid=null,i.getAnimating()&&i.cancelAnimations(),this.kinetic_&&this.kinetic_.begin(),this.noKinetic_=this.targetPointers.length>1,!0}return!1}}const pse=gse;class mse extends qu{constructor(e){e=e||{},super({stopDown:Nf}),this.condition_=e.condition?e.condition:lse,this.lastAngle_=void 0,this.duration_=e.duration!==void 0?e.duration:250}handleDragEvent(e){if(!bp(e))return;const n=e.map,i=n.getView();if(i.getConstraints().rotation===My)return;const s=n.getSize(),r=e.pixel,o=Math.atan2(s[1]/2-r[1],r[0]-s[0]/2);if(this.lastAngle_!==void 0){const a=o-this.lastAngle_;i.adjustRotationInternal(-a)}this.lastAngle_=o}handleUpEvent(e){return bp(e)?(e.map.getView().endInteraction(this.duration_),!1):!0}handleDownEvent(e){return bp(e)&&Ok(e)&&this.condition_(e)?(e.map.getView().beginInteraction(),this.lastAngle_=void 0,!0):!1}}class _se extends Lf{constructor(e){super(),this.geometry_=null,this.element_=document.createElement("div"),this.element_.style.position="absolute",this.element_.style.pointerEvents="auto",this.element_.className="ol-box "+e,this.map_=null,this.startPixel_=null,this.endPixel_=null}disposeInternal(){this.setMap(null)}render_(){const e=this.startPixel_,n=this.endPixel_,i="px",s=this.element_.style;s.left=Math.min(e[0],n[0])+i,s.top=Math.min(e[1],n[1])+i,s.width=Math.abs(n[0]-e[0])+i,s.height=Math.abs(n[1]-e[1])+i}setMap(e){if(this.map_){this.map_.getOverlayContainer().removeChild(this.element_);const n=this.element_.style;n.left="inherit",n.top="inherit",n.width="inherit",n.height="inherit"}this.map_=e,this.map_&&this.map_.getOverlayContainer().appendChild(this.element_)}setPixels(e,n){this.startPixel_=e,this.endPixel_=n,this.createOrUpdateGeometry(),this.render_()}createOrUpdateGeometry(){if(!this.map_)return;const e=this.startPixel_,n=this.endPixel_,s=[e,[e[0],n[1]],n,[n[0],e[1]]].map(this.map_.getCoordinateFromPixelInternal,this.map_);s[4]=s[0].slice(),this.geometry_?this.geometry_.setCoordinates([s]):this.geometry_=new xu([s])}getGeometry(){return this.geometry_}}const Ba={BOXSTART:"boxstart",BOXDRAG:"boxdrag",BOXEND:"boxend",BOXCANCEL:"boxcancel"};class yc extends br{constructor(e,n,i){super(e),this.coordinate=n,this.mapBrowserEvent=i}}class yse extends qu{constructor(e){super(),this.on,this.once,this.un,e=e??{},this.box_=new _se(e.className||"ol-dragbox"),this.minArea_=e.minArea??64,e.onBoxEnd&&(this.onBoxEnd=e.onBoxEnd),this.startPixel_=null,this.condition_=e.condition??Ok,this.boxEndCondition_=e.boxEndCondition??this.defaultBoxEndCondition}defaultBoxEndCondition(e,n,i){const s=i[0]-n[0],r=i[1]-n[1];return s*s+r*r>=this.minArea_}getGeometry(){return this.box_.getGeometry()}handleDragEvent(e){this.startPixel_&&(this.box_.setPixels(this.startPixel_,e.pixel),this.dispatchEvent(new yc(Ba.BOXDRAG,e.coordinate,e)))}handleUpEvent(e){if(!this.startPixel_)return!1;const n=this.boxEndCondition_(e,this.startPixel_,e.pixel);return n&&this.onBoxEnd(e),this.dispatchEvent(new yc(n?Ba.BOXEND:Ba.BOXCANCEL,e.coordinate,e)),this.box_.setMap(null),this.startPixel_=null,!1}handleDownEvent(e){return this.condition_(e)?(this.startPixel_=e.pixel,this.box_.setMap(e.map),this.box_.setPixels(this.startPixel_,this.startPixel_),this.dispatchEvent(new yc(Ba.BOXSTART,e.coordinate,e)),!0):!1}onBoxEnd(e){}setActive(e){e||(this.box_.setMap(null),this.startPixel_&&(this.dispatchEvent(new yc(Ba.BOXCANCEL,this.startPixel_,null)),this.startPixel_=null)),super.setActive(e)}setMap(e){this.getMap()&&(this.box_.setMap(null),this.startPixel_&&(this.dispatchEvent(new yc(Ba.BOXCANCEL,this.startPixel_,null)),this.startPixel_=null)),super.setMap(e)}}class vse extends yse{constructor(e){e=e||{};const n=e.condition?e.condition:hse;super({condition:n,className:e.className||"ol-dragzoom",minArea:e.minArea}),this.duration_=e.duration!==void 0?e.duration:200,this.out_=e.out!==void 0?e.out:!1}onBoxEnd(e){const i=this.getMap().getView();let s=this.getGeometry();if(this.out_){const r=i.rotatedExtentForGeometry(s),o=i.getResolutionForExtentInternal(r),a=i.getResolution()/o;s=s.clone(),s.scale(a*a)}i.fitInternal(s,{duration:this.duration_,easing:ql})}}const bse=vse,Fo={LEFT:"ArrowLeft",UP:"ArrowUp",RIGHT:"ArrowRight",DOWN:"ArrowDown"};class wse extends Xu{constructor(e){super(),e=e||{},this.defaultCondition_=function(n){return Nk(n)&&Fk(n)},this.condition_=e.condition!==void 0?e.condition:this.defaultCondition_,this.duration_=e.duration!==void 0?e.duration:100,this.pixelDelta_=e.pixelDelta!==void 0?e.pixelDelta:128}handleEvent(e){let n=!1;if(e.type==et.KEYDOWN){const i=e.originalEvent,s=i.key;if(this.condition_(e)&&(s==Fo.DOWN||s==Fo.LEFT||s==Fo.RIGHT||s==Fo.UP)){const o=e.map.getView(),a=o.getResolution()*this.pixelDelta_;let l=0,c=0;s==Fo.DOWN?c=-a:s==Fo.LEFT?l=-a:s==Fo.RIGHT?l=a:c=a;const u=[l,c];Ey(u,o.getRotation()),rse(o,u,this.duration_),i.preventDefault(),n=!0}}return!n}}class xse extends Xu{constructor(e){super(),e=e||{},this.condition_=e.condition?e.condition:function(n){return!dse(n)&&Fk(n)},this.delta_=e.delta?e.delta:1,this.duration_=e.duration!==void 0?e.duration:100}handleEvent(e){let n=!1;if(e.type==et.KEYDOWN||e.type==et.KEYPRESS){const i=e.originalEvent,s=i.key;if(this.condition_(e)&&(s==="+"||s==="-")){const r=e.map,o=s==="+"?this.delta_:-this.delta_,a=r.getView();Zy(a,o,void 0,this.duration_),i.preventDefault(),n=!0}}return!n}}const Ese=xse;class Sse{constructor(e,n,i){this.decay_=e,this.minVelocity_=n,this.delay_=i,this.points_=[],this.angle_=0,this.initialVelocity_=0}begin(){this.points_.length=0,this.angle_=0,this.initialVelocity_=0}update(e,n){this.points_.push(e,n,Date.now())}end(){if(this.points_.length<6)return!1;const e=Date.now()-this.delay_,n=this.points_.length-3;if(this.points_[n+2]0&&this.points_[i+2]>e;)i-=3;const s=this.points_[n+2]-this.points_[i+2];if(s<1e3/60)return!1;const r=this.points_[n]-this.points_[i],o=this.points_[n+1]-this.points_[i+1];return this.angle_=Math.atan2(o,r),this.initialVelocity_=Math.sqrt(r*r+o*o)/s,this.initialVelocity_>this.minVelocity_}getDistance(){return(this.minVelocity_-this.initialVelocity_)/this.decay_}getAngle(){return this.angle_}}class Cse extends Xu{constructor(e){e=e||{},super(e),this.totalDelta_=0,this.lastDelta_=0,this.maxDelta_=e.maxDelta!==void 0?e.maxDelta:1,this.duration_=e.duration!==void 0?e.duration:250,this.timeout_=e.timeout!==void 0?e.timeout:80,this.useAnchor_=e.useAnchor!==void 0?e.useAnchor:!0,this.constrainResolution_=e.constrainResolution!==void 0?e.constrainResolution:!1;const n=e.condition?e.condition:use;this.condition_=e.onFocusOnly?Dm(Lk,n):n,this.lastAnchor_=null,this.startTime_=void 0,this.timeoutId_,this.mode_=void 0,this.trackpadEventGap_=400,this.trackpadTimeoutId_,this.deltaPerZoom_=300}endInteraction_(){this.trackpadTimeoutId_=void 0;const e=this.getMap();if(!e)return;e.getView().endInteraction(void 0,this.lastDelta_?this.lastDelta_>0?1:-1:0,this.lastAnchor_?e.getCoordinateFromPixel(this.lastAnchor_):null)}handleEvent(e){if(!this.condition_(e)||e.type!==et.WHEEL)return!0;const i=e.map,s=e.originalEvent;s.preventDefault(),this.useAnchor_&&(this.lastAnchor_=e.pixel);let r;if(e.type==et.WHEEL&&(r=s.deltaY,zne&&s.deltaMode===WheelEvent.DOM_DELTA_PIXEL&&(r/=yk),s.deltaMode===WheelEvent.DOM_DELTA_LINE&&(r*=40)),r===0)return!1;this.lastDelta_=r;const o=Date.now();this.startTime_===void 0&&(this.startTime_=o),(!this.mode_||o-this.startTime_>this.trackpadEventGap_)&&(this.mode_=Math.abs(r)<4?"trackpad":"wheel");const a=i.getView();if(this.mode_==="trackpad"&&!(a.getConstrainResolution()||this.constrainResolution_))return this.trackpadTimeoutId_?clearTimeout(this.trackpadTimeoutId_):(a.getAnimating()&&a.cancelAnimations(),a.beginInteraction()),this.trackpadTimeoutId_=setTimeout(this.endInteraction_.bind(this),this.timeout_),a.adjustZoom(-r/this.deltaPerZoom_,this.lastAnchor_?i.getCoordinateFromPixel(this.lastAnchor_):null),this.startTime_=o,!1;this.totalDelta_+=r;const l=Math.max(this.timeout_-(o-this.startTime_),0);return clearTimeout(this.timeoutId_),this.timeoutId_=setTimeout(this.handleWheelZoom_.bind(this,i),l),!1}handleWheelZoom_(e){const n=e.getView();n.getAnimating()&&n.cancelAnimations();let i=-Jt(this.totalDelta_,-this.maxDelta_*this.deltaPerZoom_,this.maxDelta_*this.deltaPerZoom_)/this.deltaPerZoom_;(n.getConstrainResolution()||this.constrainResolution_)&&(i=i?i>0?1:-1:0),Zy(n,i,this.lastAnchor_?e.getCoordinateFromPixel(this.lastAnchor_):null,this.duration_),this.mode_=void 0,this.totalDelta_=0,this.lastAnchor_=null,this.startTime_=void 0,this.timeoutId_=void 0}setMouseAnchor(e){this.useAnchor_=e,e||(this.lastAnchor_=null)}}const Tse=Cse;class kse extends qu{constructor(e){e=e||{};const n=e;n.stopDown||(n.stopDown=Nf),super(n),this.anchor_=null,this.lastAngle_=void 0,this.rotating_=!1,this.rotationDelta_=0,this.threshold_=e.threshold!==void 0?e.threshold:.3,this.duration_=e.duration!==void 0?e.duration:250}handleDragEvent(e){let n=0;const i=this.targetPointers[0],s=this.targetPointers[1],r=Math.atan2(s.clientY-i.clientY,s.clientX-i.clientX);if(this.lastAngle_!==void 0){const l=r-this.lastAngle_;this.rotationDelta_+=l,!this.rotating_&&Math.abs(this.rotationDelta_)>this.threshold_&&(this.rotating_=!0),n=l}this.lastAngle_=r;const o=e.map,a=o.getView();a.getConstraints().rotation!==My&&(this.anchor_=o.getCoordinateFromPixelInternal(o.getEventPixel(Jy(this.targetPointers))),this.rotating_&&(o.render(),a.adjustRotationInternal(n,this.anchor_)))}handleUpEvent(e){return this.targetPointers.length<2?(e.map.getView().endInteraction(this.duration_),!1):!0}handleDownEvent(e){if(this.targetPointers.length>=2){const n=e.map;return this.anchor_=null,this.lastAngle_=void 0,this.rotating_=!1,this.rotationDelta_=0,this.handlingDownUpSequence||n.getView().beginInteraction(),!0}return!1}}class Ase extends qu{constructor(e){e=e||{};const n=e;n.stopDown||(n.stopDown=Nf),super(n),this.anchor_=null,this.duration_=e.duration!==void 0?e.duration:400,this.lastDistance_=void 0,this.lastScaleDelta_=1}handleDragEvent(e){let n=1;const i=this.targetPointers[0],s=this.targetPointers[1],r=i.clientX-s.clientX,o=i.clientY-s.clientY,a=Math.sqrt(r*r+o*o);this.lastDistance_!==void 0&&(n=this.lastDistance_/a),this.lastDistance_=a;const l=e.map,c=l.getView();n!=1&&(this.lastScaleDelta_=n),this.anchor_=l.getCoordinateFromPixelInternal(l.getEventPixel(Jy(this.targetPointers))),l.render(),c.adjustResolutionInternal(n,this.anchor_)}handleUpEvent(e){if(this.targetPointers.length<2){const i=e.map.getView(),s=this.lastScaleDelta_>1?1:-1;return i.endInteraction(this.duration_,s),!1}return!0}handleDownEvent(e){if(this.targetPointers.length>=2){const n=e.map;return this.anchor_=null,this.lastDistance_=void 0,this.lastScaleDelta_=1,this.handlingDownUpSequence||n.getView().beginInteraction(),!0}return!1}}const Mse=Ase;function Ise(t){t=t||{};const e=new As,n=new Sse(-.005,.05,100);return(t.altShiftDragRotate!==void 0?t.altShiftDragRotate:!0)&&e.push(new mse),(t.doubleClickZoom!==void 0?t.doubleClickZoom:!0)&&e.push(new ase({delta:t.zoomDelta,duration:t.zoomDuration})),(t.dragPan!==void 0?t.dragPan:!0)&&e.push(new pse({onFocusOnly:t.onFocusOnly,kinetic:n})),(t.pinchRotate!==void 0?t.pinchRotate:!0)&&e.push(new kse),(t.pinchZoom!==void 0?t.pinchZoom:!0)&&e.push(new Mse({duration:t.zoomDuration})),(t.keyboard!==void 0?t.keyboard:!0)&&(e.push(new wse),e.push(new Ese({delta:t.zoomDelta,duration:t.zoomDuration}))),(t.mouseWheelZoom!==void 0?t.mouseWheelZoom:!0)&&e.push(new Tse({onFocusOnly:t.onFocusOnly,duration:t.zoomDuration})),(t.shiftDragZoom!==void 0?t.shiftDragZoom:!0)&&e.push(new bse({duration:t.zoomDuration})),e}function Bk(t){if(t instanceof Uf){t.setMapInternal(null);return}t instanceof Zl&&t.getLayers().forEach(Bk)}function Vk(t,e){if(t instanceof Uf){t.setMapInternal(e);return}if(t instanceof Zl){const n=t.getLayers().getArray();for(let i=0,s=n.length;ithis.updateSize()),this.controls=n.controls||sse(),this.interactions=n.interactions||Ise({onFocusOnly:!0}),this.overlays_=n.overlays,this.overlayIdIndex_={},this.renderer_=null,this.postRenderFunctions_=[],this.tileQueue_=new qie(this.getTilePriority.bind(this),this.handleTileChange_.bind(this)),this.addChangeListener(Fn.LAYERGROUP,this.handleLayerGroupChanged_),this.addChangeListener(Fn.VIEW,this.handleViewChanged_),this.addChangeListener(Fn.SIZE,this.handleSizeChanged_),this.addChangeListener(Fn.TARGET,this.handleTargetChanged_),this.setProperties(n.values);const i=this;e.view&&!(e.view instanceof Ss)&&e.view.then(function(s){i.setView(new Ss(s))}),this.controls.addEventListener(ci.ADD,s=>{s.element.setMap(this)}),this.controls.addEventListener(ci.REMOVE,s=>{s.element.setMap(null)}),this.interactions.addEventListener(ci.ADD,s=>{s.element.setMap(this)}),this.interactions.addEventListener(ci.REMOVE,s=>{s.element.setMap(null)}),this.overlays_.addEventListener(ci.ADD,s=>{this.addOverlayInternal_(s.element)}),this.overlays_.addEventListener(ci.REMOVE,s=>{const r=s.element.getId();r!==void 0&&delete this.overlayIdIndex_[r.toString()],s.element.setMap(null)}),this.controls.forEach(s=>{s.setMap(this)}),this.interactions.forEach(s=>{s.setMap(this)}),this.overlays_.forEach(this.addOverlayInternal_.bind(this))}addControl(e){this.getControls().push(e)}addInteraction(e){this.getInteractions().push(e)}addLayer(e){this.getLayerGroup().getLayers().push(e)}handleLayerAdd_(e){Vk(e.layer,this)}addOverlay(e){this.getOverlays().push(e)}addOverlayInternal_(e){const n=e.getId();n!==void 0&&(this.overlayIdIndex_[n.toString()]=e),e.setMap(this)}disposeInternal(){this.controls.clear(),this.interactions.clear(),this.overlays_.clear(),this.resizeObserver_.disconnect(),this.setTarget(null),super.disposeInternal()}forEachFeatureAtPixel(e,n,i){if(!this.frameState_||!this.renderer_)return;const s=this.getCoordinateFromPixelInternal(e);i=i!==void 0?i:{};const r=i.hitTolerance!==void 0?i.hitTolerance:0,o=i.layerFilter!==void 0?i.layerFilter:mu,a=i.checkWrapped!==!1;return this.renderer_.forEachFeatureAtCoordinate(s,this.frameState_,r,a,n,null,o,null)}getFeaturesAtPixel(e,n){const i=[];return this.forEachFeatureAtPixel(e,function(s){i.push(s)},n),i}getAllLayers(){const e=[];function n(i){i.forEach(function(s){s instanceof Zl?n(s.getLayers()):e.push(s)})}return n(this.getLayers()),e}hasFeatureAtPixel(e,n){if(!this.frameState_||!this.renderer_)return!1;const i=this.getCoordinateFromPixelInternal(e);n=n!==void 0?n:{};const s=n.layerFilter!==void 0?n.layerFilter:mu,r=n.hitTolerance!==void 0?n.hitTolerance:0,o=n.checkWrapped!==!1;return this.renderer_.hasFeatureAtCoordinate(i,this.frameState_,r,o,s,null)}getEventCoordinate(e){return this.getCoordinateFromPixel(this.getEventPixel(e))}getEventCoordinateInternal(e){return this.getCoordinateFromPixelInternal(this.getEventPixel(e))}getEventPixel(e){const i=this.viewport_.getBoundingClientRect(),s=this.getSize(),r=i.width/s[0],o=i.height/s[1],a="changedTouches"in e?e.changedTouches[0]:e;return[(a.clientX-i.left)/r,(a.clientY-i.top)/o]}getTarget(){return this.get(Fn.TARGET)}getTargetElement(){return this.targetElement_}getCoordinateFromPixel(e){return km(this.getCoordinateFromPixelInternal(e),this.getView().getProjection())}getCoordinateFromPixelInternal(e){const n=this.frameState_;return n?$n(n.pixelToCoordinateTransform,e.slice()):null}getControls(){return this.controls}getOverlays(){return this.overlays_}getOverlayById(e){const n=this.overlayIdIndex_[e.toString()];return n!==void 0?n:null}getInteractions(){return this.interactions}getLayerGroup(){return this.get(Fn.LAYERGROUP)}setLayers(e){const n=this.getLayerGroup();if(e instanceof As){n.setLayers(e);return}const i=n.getLayers();i.clear(),i.extend(e)}getLayers(){return this.getLayerGroup().getLayers()}getLoadingOrNotReady(){const e=this.getLayerGroup().getLayerStatesArray();for(let n=0,i=e.length;n=0;r--){const o=s[r];if(o.getMap()!==this||!o.getActive()||!this.getTargetElement())continue;if(!o.handleEvent(e)||e.propagationStopped)break}}}handlePostRender(){const e=this.frameState_,n=this.tileQueue_;if(!n.isEmpty()){let s=this.maxTilesLoading_,r=s;if(e){const o=e.viewHints;if(o[Vn.ANIMATING]||o[Vn.INTERACTING]){const a=Date.now()-e.time>8;s=a?0:8,r=a?0:2}}n.getTilesLoading(){this.postRenderTimeoutHandle_=void 0,this.handlePostRender()},0))}setLayerGroup(e){const n=this.getLayerGroup();n&&this.handleLayerRemove_(new zr("removelayer",n)),this.set(Fn.LAYERGROUP,e)}setSize(e){this.set(Fn.SIZE,e)}setTarget(e){this.set(Fn.TARGET,e)}setView(e){if(!e||e instanceof Ss){this.set(Fn.VIEW,e);return}this.set(Fn.VIEW,new Ss);const n=this;e.then(function(i){n.setView(new Ss(i))})}updateSize(){const e=this.getTargetElement();let n;if(e){const s=getComputedStyle(e),r=e.offsetWidth-parseFloat(s.borderLeftWidth)-parseFloat(s.paddingLeft)-parseFloat(s.paddingRight)-parseFloat(s.borderRightWidth),o=e.offsetHeight-parseFloat(s.borderTopWidth)-parseFloat(s.paddingTop)-parseFloat(s.paddingBottom)-parseFloat(s.borderBottomWidth);!isNaN(r)&&!isNaN(o)&&(n=[Math.max(0,r),Math.max(0,o)],!Aw(n)&&(e.offsetWidth||e.offsetHeight||e.getClientRects().length)&&tk("No map visible because the map container's width or height are 0."))}const i=this.getSize();n&&(!i||!xo(n,i))&&(this.setSize(n),this.updateViewportSize_(n))}updateViewportSize_(e){const n=this.getView();n&&n.setViewportSize(e)}};function Rse(t){let e=null;t.keyboardEventTarget!==void 0&&(e=typeof t.keyboardEventTarget=="string"?document.getElementById(t.keyboardEventTarget):t.keyboardEventTarget);const n={},i=t.layers&&typeof t.layers.getLayers=="function"?t.layers:new Zl({layers:t.layers});n[Fn.LAYERGROUP]=i,n[Fn.TARGET]=t.target,n[Fn.VIEW]=t.view instanceof Ss?t.view:new Ss;let s;t.controls!==void 0&&(Array.isArray(t.controls)?s=new As(t.controls.slice()):(mt(typeof t.controls.getArray=="function","Expected `controls` to be an array or an `ol/Collection.js`"),s=t.controls));let r;t.interactions!==void 0&&(Array.isArray(t.interactions)?r=new As(t.interactions.slice()):(mt(typeof t.interactions.getArray=="function","Expected `interactions` to be an array or an `ol/Collection.js`"),r=t.interactions));let o;return t.overlays!==void 0?Array.isArray(t.overlays)?o=new As(t.overlays.slice()):(mt(typeof t.overlays.getArray=="function","Expected `overlays` to be an array or an `ol/Collection.js`"),o=t.overlays):o=new As,{controls:s,interactions:r,keyboardEventTarget:e,overlays:o,values:n}}const Dse=Pse;class Qy extends Ff{constructor(e,n,i){super(),i=i||{},this.tileCoord=e,this.state=n,this.key="",this.transition_=i.transition===void 0?250:i.transition,this.transitionStarts_={},this.interpolate=!!i.interpolate}changed(){this.dispatchEvent(et.CHANGE)}release(){this.state===Fe.ERROR&&this.setState(Fe.EMPTY)}getKey(){return this.key+"/"+this.tileCoord}getTileCoord(){return this.tileCoord}getState(){return this.state}setState(e){if(this.state!==Fe.ERROR&&this.state>e)throw new Error("Tile load sequence violation");this.state=e,this.changed()}load(){pt()}getAlpha(e,n){if(!this.transition_)return 1;let i=this.transitionStarts_[e];if(!i)i=n,this.transitionStarts_[e]=i;else if(i===-1)return 1;const s=n-i+1e3/60;return s>=this.transition_?1:rk(s/this.transition_)}inTransition(e){return this.transition_?this.transitionStarts_[e]!==-1:!1}endTransition(e){this.transition_&&(this.transitionStarts_[e]=-1)}disposeInternal(){this.release(),super.disposeInternal()}}class zk extends Qy{constructor(e,n,i,s,r,o){super(e,n,o),this.crossOrigin_=s,this.src_=i,this.key=i,this.image_=new Image,s!==null&&(this.image_.crossOrigin=s),this.unlisten_=null,this.tileLoadFunction_=r}getImage(){return this.image_}setImage(e){this.image_=e,this.state=Fe.LOADED,this.unlistenImage_(),this.changed()}handleImageError_(){this.state=Fe.ERROR,this.unlistenImage_(),this.image_=$se(),this.changed()}handleImageLoad_(){const e=this.image_;e.naturalWidth&&e.naturalHeight?this.state=Fe.LOADED:this.state=Fe.EMPTY,this.unlistenImage_(),this.changed()}load(){this.state==Fe.ERROR&&(this.state=Fe.IDLE,this.image_=new Image,this.crossOrigin_!==null&&(this.image_.crossOrigin=this.crossOrigin_)),this.state==Fe.IDLE&&(this.state=Fe.LOADING,this.changed(),this.tileLoadFunction_(this,this.src_),this.unlisten_=Kne(this.image_,this.handleImageLoad_.bind(this),this.handleImageError_.bind(this)))}unlistenImage_(){this.unlisten_&&(this.unlisten_(),this.unlisten_=null)}disposeInternal(){this.unlistenImage_(),this.image_=null,super.disposeInternal()}}function $se(){const t=an(1,1);return t.fillStyle="rgba(0,0,0,0)",t.fillRect(0,0,1,1),t.canvas}const Wk=.5,Lse=10,Uw=.25;class Hk{constructor(e,n,i,s,r,o){this.sourceProj_=e,this.targetProj_=n;let a={};const l=Lh(this.targetProj_,this.sourceProj_);this.transformInv_=function(b){const E=b[0]+"/"+b[1];return a[E]||(a[E]=l(b)),a[E]},this.maxSourceExtent_=s,this.errorThresholdSquared_=r*r,this.triangles_=[],this.wrapsXInSource_=!1,this.canWrapXInSource_=this.sourceProj_.canWrapX()&&!!s&&!!this.sourceProj_.getExtent()&&vt(s)>=vt(this.sourceProj_.getExtent()),this.sourceWorldWidth_=this.sourceProj_.getExtent()?vt(this.sourceProj_.getExtent()):null,this.targetWorldWidth_=this.targetProj_.getExtent()?vt(this.targetProj_.getExtent()):null;const c=ba(i),u=Wf(i),d=zf(i),h=Vf(i),f=this.transformInv_(c),p=this.transformInv_(u),m=this.transformInv_(d),y=this.transformInv_(h),v=Lse+(o?Math.max(0,Math.ceil(Math.log2(vu(i)/(o*o*256*256)))):0);if(this.addQuad_(c,u,d,h,f,p,m,y,v),this.wrapsXInSource_){let b=1/0;this.triangles_.forEach(function(E,C,w){b=Math.min(b,E.source[0][0],E.source[1][0],E.source[2][0])}),this.triangles_.forEach(E=>{if(Math.max(E.source[0][0],E.source[1][0],E.source[2][0])-b>this.sourceWorldWidth_/2){const C=[[E.source[0][0],E.source[0][1]],[E.source[1][0],E.source[1][1]],[E.source[2][0],E.source[2][1]]];C[0][0]-b>this.sourceWorldWidth_/2&&(C[0][0]-=this.sourceWorldWidth_),C[1][0]-b>this.sourceWorldWidth_/2&&(C[1][0]-=this.sourceWorldWidth_),C[2][0]-b>this.sourceWorldWidth_/2&&(C[2][0]-=this.sourceWorldWidth_);const w=Math.min(C[0][0],C[1][0],C[2][0]);Math.max(C[0][0],C[1][0],C[2][0])-w.5&&d<1;let p=!1;if(c>0){if(this.targetProj_.isGlobal()&&this.targetWorldWidth_){const y=fw([e,n,i,s]);p=vt(y)/this.targetWorldWidth_>Uw||p}!f&&this.sourceProj_.isGlobal()&&d&&(p=d>Uw||p)}if(!p&&this.maxSourceExtent_&&isFinite(u[0])&&isFinite(u[1])&&isFinite(u[2])&&isFinite(u[3])&&!fi(u,this.maxSourceExtent_))return;let m=0;if(!p&&(!isFinite(r[0])||!isFinite(r[1])||!isFinite(o[0])||!isFinite(o[1])||!isFinite(a[0])||!isFinite(a[1])||!isFinite(l[0])||!isFinite(l[1]))){if(c>0)p=!0;else if(m=(!isFinite(r[0])||!isFinite(r[1])?8:0)+(!isFinite(o[0])||!isFinite(o[1])?4:0)+(!isFinite(a[0])||!isFinite(a[1])?2:0)+(!isFinite(l[0])||!isFinite(l[1])?1:0),m!=1&&m!=2&&m!=4&&m!=8)return}if(c>0){if(!p){const y=[(e[0]+i[0])/2,(e[1]+i[1])/2],v=this.transformInv_(y);let b;f?b=(ll(r[0],h)+ll(a[0],h))/2-ll(v[0],h):b=(r[0]+a[0])/2-v[0];const E=(r[1]+a[1])/2-v[1];p=b*b+E*E>this.errorThresholdSquared_}if(p){if(Math.abs(e[0]-i[0])<=Math.abs(e[1]-i[1])){const y=[(n[0]+i[0])/2,(n[1]+i[1])/2],v=this.transformInv_(y),b=[(s[0]+e[0])/2,(s[1]+e[1])/2],E=this.transformInv_(b);this.addQuad_(e,n,y,b,r,o,v,E,c-1),this.addQuad_(b,y,i,s,E,v,a,l,c-1)}else{const y=[(e[0]+n[0])/2,(e[1]+n[1])/2],v=this.transformInv_(y),b=[(i[0]+s[0])/2,(i[1]+s[1])/2],E=this.transformInv_(b);this.addQuad_(e,y,b,s,r,v,E,l,c-1),this.addQuad_(y,n,i,b,v,o,a,E,c-1)}return}}if(f){if(!this.canWrapXInSource_)return;this.wrapsXInSource_=!0}m&11||this.addTriangle_(e,i,s,r,a,l),m&14||this.addTriangle_(e,i,n,r,a,o),m&&(m&13||this.addTriangle_(n,s,e,o,l,r),m&7||this.addTriangle_(n,s,i,o,l,a))}calculateSourceExtent(){const e=Ui();return this.triangles_.forEach(function(n,i,s){const r=n.source;Gc(e,r[0]),Gc(e,r[1]),Gc(e,r[2])}),e}getTriangles(){return this.triangles_}}let wp;const hr=[];function Gw(t,e,n,i,s){t.beginPath(),t.moveTo(0,0),t.lineTo(e,n),t.lineTo(i,s),t.closePath(),t.save(),t.clip(),t.fillRect(0,0,Math.max(e,i)+1,Math.max(n,s)),t.restore()}function xp(t,e){return Math.abs(t[e*4]-210)>2||Math.abs(t[e*4+3]-.75*255)>2}function Ose(){if(wp===void 0){const t=an(6,6,hr);t.globalCompositeOperation="lighter",t.fillStyle="rgba(210, 0, 0, 0.75)",Gw(t,4,5,4,0),Gw(t,4,5,0,5);const e=t.getImageData(0,0,3,3).data;wp=xp(e,0)||xp(e,4)||xp(e,8),Bl(t),hr.push(t.canvas)}return wp}function Xw(t,e,n,i){const s=sk(n,e,t);let r=pw(e,i,n);const o=e.getMetersPerUnit();o!==void 0&&(r*=o);const a=t.getMetersPerUnit();a!==void 0&&(r/=a);const l=t.getExtent();if(!l||Fl(l,s)){const c=pw(t,r,s)/r;isFinite(c)&&c>0&&(r/=c)}return r}function Yk(t,e,n,i){const s=da(n);let r=Xw(t,e,s,i);return(!isFinite(r)||r<=0)&&JT(n,function(o){return r=Xw(t,e,o,i),isFinite(r)&&r>0}),r}function jk(t,e,n,i,s,r,o,a,l,c,u,d,h,f){const p=an(Math.round(n*t),Math.round(n*e),hr);if(d||(p.imageSmoothingEnabled=!1),l.length===0)return p.canvas;p.scale(n,n);function m(w){return Math.round(w*n)/n}p.globalCompositeOperation="lighter";const y=Ui();l.forEach(function(w,x,T){Dte(y,w.extent)});let v;const b=n/i,E=(d?1:1+Math.pow(2,-24))/b;if(!h||l.length!==1||c!==0){if(v=an(Math.round(vt(y)*b),Math.round(Yn(y)*b),hr),d||(v.imageSmoothingEnabled=!1),s&&f){const w=(s[0]-y[0])*b,x=-(s[3]-y[3])*b,T=vt(s)*b,k=Yn(s)*b;v.rect(w,x,T,k),v.clip()}l.forEach(function(w,x,T){if(w.image.width>0&&w.image.height>0){if(w.clipExtent){v.save();const H=(w.clipExtent[0]-y[0])*b,te=-(w.clipExtent[3]-y[3])*b,N=vt(w.clipExtent)*b,L=Yn(w.clipExtent)*b;v.rect(d?H:Math.round(H),d?te:Math.round(te),d?N:Math.round(H+N)-Math.round(H),d?L:Math.round(te+L)-Math.round(te)),v.clip()}const k=(w.extent[0]-y[0])*b,A=-(w.extent[3]-y[3])*b,P=vt(w.extent)*b,F=Yn(w.extent)*b;v.drawImage(w.image,c,c,w.image.width-2*c,w.image.height-2*c,d?k:Math.round(k),d?A:Math.round(A),d?P:Math.round(k+P)-Math.round(k),d?F:Math.round(A+F)-Math.round(A)),w.clipExtent&&v.restore()}})}const C=ba(o);return a.getTriangles().forEach(function(w,x,T){const k=w.source,A=w.target;let P=k[0][0],F=k[0][1],H=k[1][0],te=k[1][1],N=k[2][0],L=k[2][1];const I=m((A[0][0]-C[0])/r),W=m(-(A[0][1]-C[1])/r),X=m((A[1][0]-C[0])/r),J=m(-(A[1][1]-C[1])/r),ne=m((A[2][0]-C[0])/r),ue=m(-(A[2][1]-C[1])/r),Y=P,Z=F;P=0,F=0,H-=Y,te-=Z,N-=Y,L-=Z;const M=[[H,te,0,0,X-I],[N,L,0,0,ne-I],[0,0,H,te,J-W],[0,0,N,L,ue-W]],ie=xte(M);if(!ie)return;if(p.save(),p.beginPath(),Ose()||!d){p.moveTo(X,J);const $=4,oe=I-X,de=W-J;for(let ve=0;ve<$;ve++)p.lineTo(X+m((ve+1)*oe/$),J+m(ve*de/($-1))),ve!=$-1&&p.lineTo(X+m((ve+1)*oe/$),J+m((ve+1)*de/($-1)));p.lineTo(ne,ue)}else p.moveTo(X,J),p.lineTo(I,W),p.lineTo(ne,ue);p.clip(),p.transform(ie[0],ie[2],ie[1],ie[3],I,W),p.translate(y[0]-Y,y[3]-Z);let le;if(v)le=v.canvas,p.scale(E,-E);else{const $=l[0],oe=$.extent;le=$.image,p.scale(vt(oe)/le.width,-Yn(oe)/le.height)}p.drawImage(le,0,0),p.restore()}),v&&(Bl(v),hr.push(v.canvas)),u&&(p.save(),p.globalCompositeOperation="source-over",p.strokeStyle="black",p.lineWidth=1,a.getTriangles().forEach(function(w,x,T){const k=w.target,A=(k[0][0]-C[0])/r,P=-(k[0][1]-C[1])/r,F=(k[1][0]-C[0])/r,H=-(k[1][1]-C[1])/r,te=(k[2][0]-C[0])/r,N=-(k[2][1]-C[1])/r;p.beginPath(),p.moveTo(F,H),p.lineTo(A,P),p.lineTo(te,N),p.closePath(),p.stroke()}),p.restore()),p.canvas}class $m extends Qy{constructor(e,n,i,s,r,o,a,l,c,u,d,h){super(r,Fe.IDLE,h),this.renderEdges_=d!==void 0?d:!1,this.pixelRatio_=a,this.gutter_=l,this.canvas_=null,this.sourceTileGrid_=n,this.targetTileGrid_=s,this.wrappedTileCoord_=o||r,this.sourceTiles_=[],this.sourcesListenerKeys_=null,this.sourceZ_=0,this.clipExtent_=e.canWrapX()?e.getExtent():void 0;const f=s.getTileCoordExtent(this.wrappedTileCoord_),p=this.targetTileGrid_.getExtent();let m=this.sourceTileGrid_.getExtent();const y=p?ls(f,p):f;if(vu(y)===0){this.state=Fe.EMPTY;return}const v=e.getExtent();v&&(m?m=ls(m,v):m=v);const b=s.getResolution(this.wrappedTileCoord_[0]),E=Yk(e,i,y,b);if(!isFinite(E)||E<=0){this.state=Fe.EMPTY;return}const C=u!==void 0?u:Wk;if(this.triangulation_=new Hk(e,i,y,m,E*C,b),this.triangulation_.getTriangles().length===0){this.state=Fe.EMPTY;return}this.sourceZ_=n.getZForResolution(E);let w=this.triangulation_.calculateSourceExtent();if(m&&(e.canWrapX()?(w[1]=Jt(w[1],m[1],m[3]),w[3]=Jt(w[3],m[1],m[3])):w=ls(w,m)),!vu(w))this.state=Fe.EMPTY;else{let x=0,T=0;e.canWrapX()&&(x=vt(v),T=Math.floor((w[0]-v[0])/x)),xy(w.slice(),e,!0).forEach(A=>{const P=n.getTileRangeForExtentAndZ(A,this.sourceZ_);for(let F=P.minX;F<=P.maxX;F++)for(let H=P.minY;H<=P.maxY;H++){const te=c(this.sourceZ_,F,H,a);if(te){const N=T*x;this.sourceTiles_.push({tile:te,offset:N})}}++T}),this.sourceTiles_.length===0&&(this.state=Fe.EMPTY)}}getImage(){return this.canvas_}reproject_(){const e=[];if(this.sourceTiles_.forEach(n=>{const i=n.tile;if(i&&i.getState()==Fe.LOADED){const s=this.sourceTileGrid_.getTileCoordExtent(i.tileCoord);s[0]+=n.offset,s[2]+=n.offset;const r=this.clipExtent_?.slice();r&&(r[0]+=n.offset,r[2]+=n.offset),e.push({extent:s,clipExtent:r,image:i.getImage()})}}),this.sourceTiles_.length=0,e.length===0)this.state=Fe.ERROR;else{const n=this.wrappedTileCoord_[0],i=this.targetTileGrid_.getTileSize(n),s=typeof i=="number"?i:i[0],r=typeof i=="number"?i:i[1],o=this.targetTileGrid_.getResolution(n),a=this.sourceTileGrid_.getResolution(this.sourceZ_),l=this.targetTileGrid_.getTileCoordExtent(this.wrappedTileCoord_);this.canvas_=jk(s,r,this.pixelRatio_,a,this.sourceTileGrid_.getExtent(),o,l,this.triangulation_,e,this.gutter_,this.renderEdges_,this.interpolate),this.state=Fe.LOADED}this.changed()}load(){if(this.state==Fe.IDLE){this.state=Fe.LOADING,this.changed();let e=0;this.sourcesListenerKeys_=[],this.sourceTiles_.forEach(({tile:n})=>{const i=n.getState();if(i==Fe.IDLE||i==Fe.LOADING){e++;const s=ft(n,et.CHANGE,r=>{const o=n.getState();(o==Fe.LOADED||o==Fe.ERROR||o==Fe.EMPTY)&&(Dt(s),e--,e===0&&(this.unlistenSources_(),this.reproject_()))});this.sourcesListenerKeys_.push(s)}}),e===0?setTimeout(this.reproject_.bind(this),0):this.sourceTiles_.forEach(function({tile:n},i,s){n.getState()==Fe.IDLE&&n.load()})}}unlistenSources_(){this.sourcesListenerKeys_.forEach(Dt),this.sourcesListenerKeys_=null}release(){this.canvas_&&(Bl(this.canvas_.getContext("2d")),hr.push(this.canvas_),this.canvas_=null),super.release()}}const Ep={TILELOADSTART:"tileloadstart",TILELOADEND:"tileloadend",TILELOADERROR:"tileloaderror"};class Kk extends Vs{constructor(e){super(),this.projection=Gi(e.projection),this.attributions_=qw(e.attributions),this.attributionsCollapsible_=e.attributionsCollapsible??!0,this.loading=!1,this.state_=e.state!==void 0?e.state:"ready",this.wrapX_=e.wrapX!==void 0?e.wrapX:!1,this.interpolate_=!!e.interpolate,this.viewResolver=null,this.viewRejector=null;const n=this;this.viewPromise_=new Promise(function(i,s){n.viewResolver=i,n.viewRejector=s})}getAttributions(){return this.attributions_}getAttributionsCollapsible(){return this.attributionsCollapsible_}getProjection(){return this.projection}getResolutions(e){return null}getView(){return this.viewPromise_}getState(){return this.state_}getWrapX(){return this.wrapX_}getInterpolate(){return this.interpolate_}refresh(){this.changed()}setAttributions(e){this.attributions_=qw(e),this.changed()}setState(e){this.state_=e,this.changed()}}function qw(t){return t?typeof t=="function"?t:(Array.isArray(t)||(t=[t]),e=>t):null}class e0{constructor(e,n,i,s){this.minX=e,this.maxX=n,this.minY=i,this.maxY=s}contains(e){return this.containsXY(e[1],e[2])}containsTileRange(e){return this.minX<=e.minX&&e.maxX<=this.maxX&&this.minY<=e.minY&&e.maxY<=this.maxY}containsXY(e,n){return this.minX<=e&&e<=this.maxX&&this.minY<=n&&n<=this.maxY}equals(e){return this.minX==e.minX&&this.minY==e.minY&&this.maxX==e.maxX&&this.maxY==e.maxY}extend(e){e.minXthis.maxX&&(this.maxX=e.maxX),e.minYthis.maxY&&(this.maxY=e.maxY)}getHeight(){return this.maxY-this.minY+1}getSize(){return[this.getWidth(),this.getHeight()]}getWidth(){return this.maxX-this.minX+1}intersects(e){return this.minX<=e.maxX&&this.maxX>=e.minX&&this.minY<=e.maxY&&this.maxY>=e.minY}}function Va(t,e,n,i,s){return s!==void 0?(s.minX=t,s.maxX=e,s.minY=n,s.maxY=i,s):new e0(t,e,n,i)}function Yh(t,e,n,i){return i!==void 0?(i[0]=t,i[1]=e,i[2]=n,i):[t,e,n]}function Nse(t,e,n){return t+"/"+e+"/"+n}function Fse(t){return Bse(t[0],t[1],t[2])}function Bse(t,e,n){return(e<n||n>e.getMaxZoom())return!1;const r=e.getFullTileRange(n);return r?r.containsXY(i,s):!0}const za=[0,0,0],Mr=5;class zse{constructor(e){this.minZoom=e.minZoom!==void 0?e.minZoom:0,this.resolutions_=e.resolutions,mt(_te(this.resolutions_,(s,r)=>r-s,!0),"`resolutions` must be sorted in descending order");let n;if(!e.origins){for(let s=0,r=this.resolutions_.length-1;s{const o=new e0(Math.min(0,s[0]),Math.max(s[0]-1,-1),Math.min(0,s[1]),Math.max(s[1]-1,-1));if(i){const a=this.getTileRangeForExtentAndZ(i,r);o.minX=Math.max(a.minX,o.minX),o.maxX=Math.min(a.maxX,o.maxX),o.minY=Math.max(a.minY,o.minY),o.maxY=Math.min(a.maxY,o.maxY)}return o}):i&&this.calculateTileRanges_(i)}forEachTileCoord(e,n,i){const s=this.getTileRangeForExtentAndZ(e,n);for(let r=s.minX,o=s.maxX;r<=o;++r)for(let a=s.minY,l=s.maxY;a<=l;++a)i([n,r,a])}forEachTileCoordParentTileRange(e,n,i,s){let r,o,a,l=null,c=e[0]-1;for(this.zoomFactor_===2?(o=e[1],a=e[2]):l=this.getTileCoordExtent(e,s);c>=this.minZoom;){if(o!==void 0&&a!==void 0?(o=Math.floor(o/2),a=Math.floor(a/2),r=Va(o,o,a,a,i)):r=this.getTileRangeForExtentAndZ(l,c,i),n(c,r))return!0;--c}return!1}getExtent(){return this.extent_}getMaxZoom(){return this.maxZoom}getMinZoom(){return this.minZoom}getOrigin(e){return this.origin_?this.origin_:this.origins_[e]}getResolution(e){return this.resolutions_[e]}getResolutions(){return this.resolutions_}getTileCoordChildTileRange(e,n,i){if(e[0]this.maxZoom||n0?i:Math.max(r/n[0],s/n[1]);const o=e+1,a=new Array(o);for(let l=0;lthis.getTileInternal(f,p,m,y,o),this.reprojectionErrorThreshold_,this.renderReprojectionEdges_,this.tileOptions);return h.key=l,h}getTileInternal(e,n,i,s,r){const o=this.getKey();return this.createTile_(e,n,i,s,r,o)}setRenderReprojectionEdges(e){this.renderReprojectionEdges_!=e&&(this.renderReprojectionEdges_=e,this.changed())}setTileGridForProjection(e,n){const i=Gi(e);if(i){const s=wt(i);s in this.tileGridForProjection||(this.tileGridForProjection[s]=n)}}}function sre(t,e){t.getImage().src=e}class rre extends ire{constructor(e){e=e||{};const n=e.projection!==void 0?e.projection:"EPSG:3857",i=e.tileGrid!==void 0?e.tileGrid:Yse({extent:t0(n),maxResolution:e.maxResolution,maxZoom:e.maxZoom,minZoom:e.minZoom,tileSize:e.tileSize});super({attributions:e.attributions,cacheSize:e.cacheSize,crossOrigin:e.crossOrigin,interpolate:e.interpolate,projection:n,reprojectionErrorThreshold:e.reprojectionErrorThreshold,tileGrid:i,tileLoadFunction:e.tileLoadFunction,tilePixelRatio:e.tilePixelRatio,tileUrlFunction:e.tileUrlFunction,url:e.url,urls:e.urls,wrapX:e.wrapX!==void 0?e.wrapX:!0,transition:e.transition,attributionsCollapsible:e.attributionsCollapsible,zDirection:e.zDirection}),this.gutter_=e.gutter!==void 0?e.gutter:0}getGutter(){return this.gutter_}}const ore='© OpenStreetMap contributors.';class are extends rre{constructor(e){e=e||{};let n;e.attributions!==void 0?n=e.attributions:n=[ore];const i=e.crossOrigin!==void 0?e.crossOrigin:"anonymous",s=e.url!==void 0?e.url:"https://tile.openstreetmap.org/{z}/{x}/{y}.png";super({attributions:n,attributionsCollapsible:!1,cacheSize:e.cacheSize,crossOrigin:i,interpolate:e.interpolate,maxZoom:e.maxZoom!==void 0?e.maxZoom:19,reprojectionErrorThreshold:e.reprojectionErrorThreshold,tileLoadFunction:e.tileLoadFunction,transition:e.transition,url:s,wrapX:e.wrapX,zDirection:e.zDirection})}}const Gd={PRELOAD:"preload",USE_INTERIM_TILES_ON_ERROR:"useInterimTilesOnError"};class lre extends Uf{constructor(e){e=e||{};const n=Object.assign({},e),i=e.cacheSize;delete e.cacheSize,delete n.preload,delete n.useInterimTilesOnError,super(n),this.on,this.once,this.un,this.cacheSize_=i,this.setPreload(e.preload!==void 0?e.preload:0),this.setUseInterimTilesOnError(e.useInterimTilesOnError!==void 0?e.useInterimTilesOnError:!0)}getCacheSize(){return this.cacheSize_}getPreload(){return this.get(Gd.PRELOAD)}setPreload(e){this.set(Gd.PRELOAD,e)}getUseInterimTilesOnError(){return this.get(Gd.USE_INTERIM_TILES_ON_ERROR)}setUseInterimTilesOnError(e){this.set(Gd.USE_INTERIM_TILES_ON_ERROR,e)}getData(e){return super.getData(e)}}const cre=5;class ure extends Ku{constructor(e){super(),this.ready=!0,this.boundHandleImageChange_=this.handleImageChange_.bind(this),this.layer_=e,this.staleKeys_=new Array,this.maxStaleKeys=cre}getStaleKeys(){return this.staleKeys_}prependStaleKey(e){this.staleKeys_.unshift(e),this.staleKeys_.length>this.maxStaleKeys&&(this.staleKeys_.length=this.maxStaleKeys)}getFeatures(e){return pt()}getData(e){return null}prepareFrame(e){return pt()}renderFrame(e,n){return pt()}forEachFeatureAtCoordinate(e,n,i,s,r){}getLayer(){return this.layer_}handleFontsChanged(){}handleImageChange_(e){const n=e.target;(n.getState()===ot.LOADED||n.getState()===ot.ERROR)&&this.renderIfReadyAndVisible()}loadImage(e){let n=e.getState();return n!=ot.LOADED&&n!=ot.ERROR&&e.addEventListener(et.CHANGE,this.boundHandleImageChange_),n==ot.IDLE&&(e.load(),n=e.getState()),n==ot.LOADED}renderIfReadyAndVisible(){const e=this.getLayer();e&&e.getVisible()&&e.getSourceState()==="ready"&&e.changed()}renderDeferred(e){}disposeInternal(){delete this.layer_,super.disposeInternal()}}class qk{constructor(){this.instructions_=[],this.zIndex=0,this.offset_=0,this.context_=new Proxy(Nh(),{get:(e,n)=>{if(typeof Nh()[n]=="function")return this.instructions_[this.zIndex+this.offset_]||(this.instructions_[this.zIndex+this.offset_]=[]),this.instructions_[this.zIndex+this.offset_].push(n),this.pushMethodArgs_},set:(e,n,i)=>(this.instructions_[this.zIndex+this.offset_]||(this.instructions_[this.zIndex+this.offset_]=[]),this.instructions_[this.zIndex+this.offset_].push(n,i),!0)})}pushMethodArgs_=(...e)=>(this.instructions_[this.zIndex+this.offset_].push(e),this);pushFunction(e){this.instructions_[this.zIndex+this.offset_].push(e)}getContext(){return this.context_}draw(e){this.instructions_.forEach(n=>{for(let i=0,s=n.length;i0&&this.getCount()>this.highWaterMark}expireCache(e){for(;this.canExpireCache();){const n=this.pop();n instanceof Lf&&n.dispose()}}clear(){this.count_=0,this.entries_={},this.oldest_=null,this.newest_=null}containsKey(e){return this.entries_.hasOwnProperty(e)}forEach(e){let n=this.oldest_;for(;n;)e(n.value_,n.key_,this),n=n.newer}get(e,n){const i=this.entries_[e];return mt(i!==void 0,"Tried to get a value for a key that does not exist in the cache"),i===this.newest_||(i===this.oldest_?(this.oldest_=this.oldest_.newer,this.oldest_.older=null):(i.newer.older=i.older,i.older.newer=i.newer),i.newer=null,i.older=this.newest_,this.newest_.newer=i,this.newest_=i),i.value_}remove(e){const n=this.entries_[e];return mt(n!==void 0,"Tried to get a value for a key that does not exist in the cache"),n===this.newest_?(this.newest_=n.older,this.newest_&&(this.newest_.newer=null)):n===this.oldest_?(this.oldest_=n.newer,this.oldest_&&(this.oldest_.older=null)):(n.newer.older=n.older,n.older.newer=n.newer),delete this.entries_[e],--this.count_,n.value_}getCount(){return this.count_}getKeys(){const e=new Array(this.count_);let n=0,i;for(i=this.newest_;i;i=i.older)e[n++]=i.key_;return e}getValues(){const e=new Array(this.count_);let n=0,i;for(i=this.newest_;i;i=i.older)e[n++]=i.value_;return e}peekLast(){return this.oldest_.value_}peekLastKey(){return this.oldest_.key_}peekFirstKey(){return this.newest_.key_}peek(e){return this.entries_[e]?.value_}pop(){const e=this.oldest_;return delete this.entries_[e.key_],e.newer&&(e.newer.older=null),this.oldest_=e.newer,this.oldest_||(this.newest_=null),--this.count_,e.value_}replace(e,n){this.get(e),this.entries_[e].value_=n}set(e,n){mt(!(e in this.entries_),"Tried to set a value for a key that is used already");const i={key_:e,newer:null,older:this.newest_,value_:n};this.newest_?this.newest_.newer=i:this.oldest_=i,this.newest_=i,this.entries_[e]=i,++this.count_}setSize(e){this.highWaterMark=e}}class _re extends Lm{constructor(e){super({tileCoord:e.tileCoord,loader:()=>Promise.resolve(new Uint8ClampedArray(4)),interpolate:e.interpolate,transition:e.transition}),this.pixelRatio_=e.pixelRatio,this.gutter_=e.gutter,this.reprojData_=null,this.reprojError_=null,this.reprojSize_=void 0,this.sourceTileGrid_=e.sourceTileGrid,this.targetTileGrid_=e.targetTileGrid,this.wrappedTileCoord_=e.wrappedTileCoord||e.tileCoord,this.sourceTiles_=[],this.sourcesListenerKeys_=null,this.sourceZ_=0;const n=e.sourceProj,i=n.getExtent(),s=e.sourceTileGrid.getExtent();this.clipExtent_=n.canWrapX()?s?ls(i,s):i:s;const r=this.targetTileGrid_.getTileCoordExtent(this.wrappedTileCoord_),o=this.targetTileGrid_.getExtent();let a=this.sourceTileGrid_.getExtent();const l=o?ls(r,o):r;if(vu(l)===0){this.state=Fe.EMPTY;return}i&&(a?a=ls(a,i):a=i);const c=this.targetTileGrid_.getResolution(this.wrappedTileCoord_[0]),u=e.targetProj,d=Yk(n,u,l,c);if(!isFinite(d)||d<=0){this.state=Fe.EMPTY;return}const h=e.errorThreshold!==void 0?e.errorThreshold:Wk;if(this.triangulation_=new Hk(n,u,l,a,d*h,c),this.triangulation_.getTriangles().length===0){this.state=Fe.EMPTY;return}this.sourceZ_=this.sourceTileGrid_.getZForResolution(d);let f=this.triangulation_.calculateSourceExtent();if(a&&(n.canWrapX()?(f[1]=Jt(f[1],a[1],a[3]),f[3]=Jt(f[3],a[1],a[3])):f=ls(f,a)),!vu(f))this.state=Fe.EMPTY;else{let p=0,m=0;n.canWrapX()&&(p=vt(i),m=Math.floor((f[0]-i[0])/p)),xy(f.slice(),n,!0).forEach(v=>{const b=this.sourceTileGrid_.getTileRangeForExtentAndZ(v,this.sourceZ_),E=e.getTileFunction;for(let C=b.minX;C<=b.maxX;C++)for(let w=b.minY;w<=b.maxY;w++){const x=E(this.sourceZ_,C,w,this.pixelRatio_);if(x){const T=m*p;this.sourceTiles_.push({tile:x,offset:T})}}++m}),this.sourceTiles_.length===0&&(this.state=Fe.EMPTY)}}getSize(){return this.reprojSize_}getData(){return this.reprojData_}getError(){return this.reprojError_}reproject_(){const e=[];let n=!1;if(this.sourceTiles_.forEach(p=>{const m=p.tile;if(!m||m.getState()!==Fe.LOADED)return;const y=m.getSize(),v=this.gutter_;let b;const E=hre(m.getData());E?b=E:(n=!0,b=gre(jh(m.getData())));const C=[y[0]+2*v,y[1]+2*v],w=b instanceof Float32Array,x=C[0]*C[1],T=w?Float32Array:Uint8ClampedArray,k=new T(b.buffer),A=T.BYTES_PER_ELEMENT,P=A*k.length/x,F=k.byteLength/C[1],H=Math.floor(F/A/C[0]),te=x*H;let N=k;if(k.length!==te){N=new T(te);let W=0,X=0;const J=C[0]*H;for(let ne=0;ne=0;--p){const m=[];for(let w=0,x=e.length;w{const i=n.getState();if(i!==Fe.IDLE&&i!==Fe.LOADING)return;e++;const s=ft(n,et.CHANGE,()=>{const r=n.getState();(r==Fe.LOADED||r==Fe.ERROR||r==Fe.EMPTY)&&(Dt(s),e--,e===0&&(this.unlistenSources_(),this.reproject_()))});this.sourcesListenerKeys_.push(s)}),e===0?setTimeout(this.reproject_.bind(this),0):this.sourceTiles_.forEach(function({tile:n}){n.getState()==Fe.IDLE&&n.load()})}unlistenSources_(){this.sourcesListenerKeys_.forEach(Dt),this.sourcesListenerKeys_=null}}function Sp(t,e,n,i){return`${t},${Nse(e,n,i)}`}function Cp(t,e,n){if(!(n in t))return t[n]=new Set([e]),!0;const i=t[n],s=i.has(e);return s||i.add(e),!s}function yre(t,e,n){const i=t[n];return i?i.delete(e):!1}function Jw(t,e){const n=t.layerStatesArray[t.layerIndex];n.extent&&(e=ls(e,Xr(n.extent,t.viewState.projection)));const i=n.layer.getRenderSource();if(!i.getWrapX()){const s=i.getTileGridForProjection(t.viewState.projection).getExtent();s&&(e=ls(e,s))}return e}class vre extends Zk{constructor(e,n){super(e),n=n||{},this.extentChanged=!0,this.renderComplete=!1,this.renderedExtent_=null,this.renderedPixelRatio,this.renderedProjection=null,this.renderedRevision,this.renderedTiles=[],this.renderedSourceKey_,this.renderedSourceRevision_,this.tempExtent=Ui(),this.tempTileRange_=new e0(0,0,0,0),this.tempTileCoord_=Yh(0,0,0);const i=n.cacheSize!==void 0?n.cacheSize:512;this.tileCache_=new mre(i),this.renderedProjection_=void 0,this.maxStaleKeys=i*.5}getTileCache(){return this.tileCache_}getOrCreateTile(e,n,i,s){const r=this.tileCache_,a=this.getLayer().getSource(),l=Sp(a.getKey(),e,n,i);let c;if(r.containsKey(l))c=r.get(l);else{if(c=a.getTile(e,n,i,s.pixelRatio,s.viewState.projection),!c)return null;r.set(l,c)}return c}getTile(e,n,i,s){const r=this.getOrCreateTile(e,n,i,s);return r||null}getData(e){const n=this.frameState;if(!n)return null;const i=this.getLayer(),s=$n(n.pixelToCoordinateTransform,e.slice()),r=i.getExtent();if(r&&!Fl(r,s))return null;const o=n.viewState,a=i.getRenderSource(),l=a.getTileGridForProjection(o.projection),c=a.getTilePixelRatio(n.pixelRatio);for(let u=l.getZForResolution(o.resolution);u>=l.getMinZoom();--u){const d=l.getTileCoordForCoordAndZ(s,u),h=this.getTile(u,d[1],d[2],n);if(!h||h.getState()!==Fe.LOADED)continue;const f=l.getOrigin(u),p=mi(l.getTileSize(u)),m=l.getResolution(u);let y;if(h instanceof zk||h instanceof $m)y=h.getImage();else if(h instanceof Lm){if(y=jh(h.getData()),!y)continue}else continue;const v=Math.floor(c*((s[0]-f[0])/m-d[1]*p[0])),b=Math.floor(c*((f[1]-s[1])/m-d[2]*p[1])),E=Math.round(c*a.getGutterForProjection(o.projection));return this.getImageData(y,v+E,b+E)}return null}prepareFrame(e){this.renderedProjection_?e.viewState.projection!==this.renderedProjection_&&(this.tileCache_.clear(),this.renderedProjection_=e.viewState.projection):this.renderedProjection_=e.viewState.projection;const n=this.getLayer().getSource();if(!n)return!1;const i=n.getRevision();return this.renderedRevision_?this.renderedRevision_!==i&&(this.renderedRevision_=i,this.renderedSourceKey_===n.getKey()&&this.tileCache_.clear()):this.renderedRevision_=i,!0}enqueueTiles(e,n,i,s,r){const o=e.viewState,a=this.getLayer(),l=a.getRenderSource(),c=l.getTileGridForProjection(o.projection),u=wt(l);u in e.wantedTiles||(e.wantedTiles[u]={});const d=e.wantedTiles[u],h=a.getMapInternal(),f=Math.max(i-r,c.getMinZoom(),c.getZForResolution(Math.min(a.getMaxResolution(),h?h.getView().getResolutionForZoom(Math.max(a.getMinZoom(),0)):c.getResolution(0)),l.zDirection));for(let p=i;p>=f;--p){const m=c.getTileRangeForExtentAndZ(n,p,this.tempTileRange_),y=c.getResolution(p);for(let v=m.minX;v<=m.maxX;++v)for(let b=m.minY;b<=m.maxY;++b){const E=this.getTile(p,v,b,e);if(!E||!Cp(s,E,p))continue;const w=E.getKey();if(d[w]=!0,E.getState()===Fe.IDLE&&!e.tileQueue.isKeyQueued(w)){const x=Yh(p,v,b,this.tempTileCoord_);e.tileQueue.enqueue([E,u,c.getTileCoordCenter(x),y])}}}}findStaleTile_(e,n){const i=this.tileCache_,s=e[0],r=e[1],o=e[2],a=this.getStaleKeys();for(let l=0;l0&&setTimeout(()=>{this.enqueueTiles(e,P,f-1,k,A-1)},0),!(f in k))return this.container;const F=wt(this),H=e.time;for(const ne of k[f]){const ue=ne.getState();if((ne instanceof $m||ne instanceof _re)&&ue===Fe.EMPTY)continue;const Y=ne.tileCoord;if(ue===Fe.LOADED&&ne.getAlpha(F,H)===1){ne.endTransition(F);continue}if(this.renderComplete=!1,this.findStaleTile_(Y,k)){yre(k,ne,f),e.animate=!0;continue}if(this.findAltTiles_(h,Y,f+1,k))continue;const ie=h.getMinZoom();for(let le=f-1;le>=ie&&!this.findAltTiles_(h,Y,le,k);--le);}const te=p/o*l/v,N=this.getRenderContext(e);_r(this.tempTransform,b/2,E/2,te,te,0,-b/2,-E/2),i.extent&&this.clipUnrotated(N,e,C),u.getInterpolate()||(N.imageSmoothingEnabled=!1),this.preRender(N,e);const L=Object.keys(k).map(Number);L.sort(cr);let I;const W=[],X=[];for(let ne=L.length-1;ne>=0;--ne){const ue=L[ne],Y=u.getTilePixelSize(ue,l,r),M=h.getResolution(ue)/p,ie=Y[0]*M*te,le=Y[1]*M*te,$=h.getTileCoordForCoordAndZ(ba(T),ue),oe=h.getTileCoordExtent($),de=$n(this.tempTransform,[v*(oe[0]-T[0])/p,v*(T[3]-oe[3])/p]),ve=v*u.getGutterForProjection(r);for(const z of k[ue]){if(z.getState()!==Fe.LOADED)continue;const ge=z.tileCoord,S=$[1]-ge[1],O=Math.round(de[0]-(S-1)*ie),K=$[2]-ge[2],U=Math.round(de[1]-(K-1)*le),re=Math.round(de[0]-S*ie),j=Math.round(de[1]-K*le),se=O-re,ee=U-j,fe=L.length===1;let me=!1;I=[re,j,re+se,j,re+se,j+ee,re,j+ee];for(let pe=0,Le=W.length;pe{const Y=wt(u),Z=ue.wantedTiles[Y],M=Z?Object.keys(Z).length:0;this.updateCacheSize(M),this.tileCache_.expireCache()};return e.postRenderFunctions.push(J),this.container}updateCacheSize(e){this.tileCache_.highWaterMark=Math.max(this.tileCache_.highWaterMark,e*2)}drawTile(e,n,i,s,r,o,a,l){let c;if(e instanceof Lm){if(c=jh(e.getData()),!c)throw new Error("Rendering array data is not yet supported")}else c=this.getTileImage(e);if(!c)return;const u=this.getRenderContext(n),d=wt(this),h=n.layerStatesArray[n.layerIndex],f=h.opacity*(l?e.getAlpha(d,n.time):1),p=f!==u.globalAlpha;p&&(u.save(),u.globalAlpha=f),u.drawImage(c,a,a,c.width-2*a,c.height-2*a,i,s,r,o),p&&u.restore(),f!==h.opacity?n.animate=!0:l&&e.endTransition(d)}getImage(){const e=this.context;return e?e.canvas:null}getTileImage(e){return e.getImage()}updateUsedTiles(e,n,i){const s=wt(n);s in e||(e[s]={}),e[s][i.getKey()]=!0}}class bre extends lre{constructor(e){super(e)}createRenderer(){return new vre(this,{cacheSize:this.getCacheSize()})}}const wre=bre;class i0 extends Vs{constructor(e){if(super(),this.on,this.once,this.un,this.id_=void 0,this.geometryName_="geometry",this.style_=null,this.styleFunction_=void 0,this.geometryChangeKey_=null,this.addChangeListener(this.geometryName_,this.handleGeometryChanged_),e)if(typeof e.getSimplifiedGeometry=="function"){const n=e;this.setGeometry(n)}else{const n=e;this.setProperties(n)}}clone(){const e=new i0(this.hasProperties()?this.getProperties():null);e.setGeometryName(this.getGeometryName());const n=this.getGeometry();n&&e.setGeometry(n.clone());const i=this.getStyle();return i&&e.setStyle(i),e}getGeometry(){return this.get(this.geometryName_)}getId(){return this.id_}getGeometryName(){return this.geometryName_}getStyle(){return this.style_}getStyleFunction(){return this.styleFunction_}handleGeometryChange_(){this.changed()}handleGeometryChanged_(){this.geometryChangeKey_&&(Dt(this.geometryChangeKey_),this.geometryChangeKey_=null);const e=this.getGeometry();e&&(this.geometryChangeKey_=ft(e,et.CHANGE,this.handleGeometryChange_,this)),this.changed()}setGeometry(e){this.set(this.geometryName_,e)}setStyle(e){this.style_=e,this.styleFunction_=e?xre(e):void 0,this.changed()}setId(e){this.id_=e,this.changed()}setGeometryName(e){this.removeChangeListener(this.geometryName_,this.handleGeometryChanged_),this.geometryName_=e,this.addChangeListener(this.geometryName_,this.handleGeometryChanged_),this.handleGeometryChanged_()}}function xre(t){if(typeof t=="function")return t;let e;return Array.isArray(t)?e=t:(mt(typeof t.getZIndex=="function","Expected an `ol/style/Style` or an array of `ol/style/Style.js`"),e=[t]),function(){return e}}const Tp=i0;function Om(t,e,n,i,s,r,o){let a,l;const c=(n-e)/i;if(c===1)a=e;else if(c===2)a=e,l=s;else if(c!==0){let u=t[e],d=t[e+1],h=0;const f=[0];for(let y=e+i;y1?o:2,r=r||new Array(o);for(let u=0;u>1;sl&&(this.instructions.push([je.CUSTOM,l,u,e,i,Uo,r]),this.hitDetectionInstructions.push([je.CUSTOM,l,u,e,s||i,Uo,r]));break;case"Point":c=e.getFlatCoordinates(),this.coordinates.push(c[0],c[1]),u=this.coordinates.length,this.instructions.push([je.CUSTOM,l,u,e,i,void 0,r]),this.hitDetectionInstructions.push([je.CUSTOM,l,u,e,s||i,void 0,r]);break}this.endGeometry(n)}beginGeometry(e,n,i){this.beginGeometryInstruction1_=[je.BEGIN_GEOMETRY,n,0,e,i],this.instructions.push(this.beginGeometryInstruction1_),this.beginGeometryInstruction2_=[je.BEGIN_GEOMETRY,n,0,e,i],this.hitDetectionInstructions.push(this.beginGeometryInstruction2_)}finish(){return{instructions:this.instructions,hitDetectionInstructions:this.hitDetectionInstructions,coordinates:this.coordinates}}reverseHitDetectionInstructions(){const e=this.hitDetectionInstructions;e.reverse();let n;const i=e.length;let s,r,o=-1;for(n=0;nthis.maxLineWidth&&(this.maxLineWidth=i.lineWidth,this.bufferedMaxExtent_=null)}else i.strokeStyle=void 0,i.lineCap=void 0,i.lineDash=null,i.lineDashOffset=void 0,i.lineJoin=void 0,i.lineWidth=void 0,i.miterLimit=void 0}createFill(e){const n=e.fillStyle,i=[je.SET_FILL_STYLE,n];return typeof n!="string"&&i.push(e.fillPatternScale),i}applyStroke(e){this.instructions.push(this.createStroke(e))}createStroke(e){return[je.SET_STROKE_STYLE,e.strokeStyle,e.lineWidth*this.pixelRatio,e.lineCap,e.lineJoin,e.miterLimit,this.applyPixelRatio(e.lineDash),e.lineDashOffset*this.pixelRatio]}updateFillStyle(e,n){const i=e.fillStyle;(typeof i!="string"||e.currentFillStyle!=i)&&(i!==void 0&&this.instructions.push(n.call(this,e)),e.currentFillStyle=i)}updateStrokeStyle(e,n){const i=e.strokeStyle,s=e.lineCap,r=e.lineDash,o=e.lineDashOffset,a=e.lineJoin,l=e.lineWidth,c=e.miterLimit;(e.currentStrokeStyle!=i||e.currentLineCap!=s||r!=e.currentLineDash&&!xo(e.currentLineDash,r)||e.currentLineDashOffset!=o||e.currentLineJoin!=a||e.currentLineWidth!=l||e.currentMiterLimit!=c)&&(i!==void 0&&n.call(this,e),e.currentStrokeStyle=i,e.currentLineCap=s,e.currentLineDash=r,e.currentLineDashOffset=o,e.currentLineJoin=a,e.currentLineWidth=l,e.currentMiterLimit=c)}endGeometry(e){this.beginGeometryInstruction1_[2]=this.instructions.length,this.beginGeometryInstruction1_=null,this.beginGeometryInstruction2_[2]=this.hitDetectionInstructions.length,this.beginGeometryInstruction2_=null;const n=[je.END_GEOMETRY,e];this.instructions.push(n),this.hitDetectionInstructions.push(n)}getBufferedMaxExtent(){if(!this.bufferedMaxExtent_&&(this.bufferedMaxExtent_=GT(this.maxExtent),this.maxLineWidth>0)){const e=this.resolution*(this.maxLineWidth+1)/2;vy(this.bufferedMaxExtent_,e,this.bufferedMaxExtent_)}return this.bufferedMaxExtent_}}class Sre extends Zu{constructor(e,n,i,s){super(e,n,i,s),this.hitDetectionImage_=null,this.image_=null,this.imagePixelRatio_=void 0,this.anchorX_=void 0,this.anchorY_=void 0,this.height_=void 0,this.opacity_=void 0,this.originX_=void 0,this.originY_=void 0,this.rotateWithView_=void 0,this.rotation_=void 0,this.scale_=void 0,this.width_=void 0,this.declutterMode_=void 0,this.declutterImageWithText_=void 0}drawPoint(e,n,i){if(!this.image_||this.maxExtent&&!Fl(this.maxExtent,e.getFlatCoordinates()))return;this.beginGeometry(e,n,i);const s=e.getFlatCoordinates(),r=e.getStride(),o=this.coordinates.length,a=this.appendFlatPointCoordinates(s,r);this.instructions.push([je.DRAW_IMAGE,o,a,this.image_,this.anchorX_*this.imagePixelRatio_,this.anchorY_*this.imagePixelRatio_,Math.ceil(this.height_*this.imagePixelRatio_),this.opacity_,this.originX_*this.imagePixelRatio_,this.originY_*this.imagePixelRatio_,this.rotateWithView_,this.rotation_,[this.scale_[0]*this.pixelRatio/this.imagePixelRatio_,this.scale_[1]*this.pixelRatio/this.imagePixelRatio_],Math.ceil(this.width_*this.imagePixelRatio_),this.declutterMode_,this.declutterImageWithText_]),this.hitDetectionInstructions.push([je.DRAW_IMAGE,o,a,this.hitDetectionImage_,this.anchorX_,this.anchorY_,this.height_,1,this.originX_,this.originY_,this.rotateWithView_,this.rotation_,this.scale_,this.width_,this.declutterMode_,this.declutterImageWithText_]),this.endGeometry(n)}drawMultiPoint(e,n,i){if(!this.image_)return;this.beginGeometry(e,n,i);const s=e.getFlatCoordinates(),r=[];for(let l=0,c=s.length;l=t){const p=(t-a+f)/f,m=Ti(c,d,p),y=Ti(u,h,p);l.push(m,y),r.push(l),l=[m,y],a==t&&(o+=s),a=0}else if(a0&&r.push(l),r}function Ire(t,e,n,i,s){let r=n,o=n,a=0,l=0,c=n,u,d,h,f,p,m,y,v,b,E;for(d=n;dt&&(l>a&&(a=l,r=c,o=d),l=0,c=d-s)),h=f,y=b,v=E),p=C,m=w}return l+=f,l>a?[c,d]:[r,o]}const Uh={left:0,center:.5,right:1,top:0,middle:.5,hanging:.2,alphabetic:.8,ideographic:.8,bottom:1};class Pre extends Zu{constructor(e,n,i,s){super(e,n,i,s),this.labels_=null,this.text_="",this.textOffsetX_=0,this.textOffsetY_=0,this.textRotateWithView_=void 0,this.textRotation_=0,this.textFillState_=null,this.fillStates={},this.fillStates[ui]={fillStyle:ui},this.textStrokeState_=null,this.strokeStates={},this.textState_={},this.textStates={},this.textKey_="",this.fillKey_="",this.strokeKey_="",this.declutterMode_=void 0,this.declutterImageWithText_=void 0}finish(){const e=super.finish();return e.textStates=this.textStates,e.fillStates=this.fillStates,e.strokeStates=this.strokeStates,e}drawText(e,n,i){const s=this.textFillState_,r=this.textStrokeState_,o=this.textState_;if(this.text_===""||!o||!s&&!r)return;const a=this.coordinates;let l=a.length;const c=e.getType();let u=null,d=e.getStride();if(o.placement==="line"&&(c=="LineString"||c=="MultiLineString"||c=="Polygon"||c=="MultiPolygon")){if(!fi(this.maxExtent,e.getExtent()))return;let h;if(u=e.getFlatCoordinates(),c=="LineString")h=[u.length];else if(c=="MultiLineString")h=e.getEnds();else if(c=="Polygon")h=e.getEnds().slice(0,1);else if(c=="MultiPolygon"){const y=e.getEndss();h=[];for(let v=0,b=y.length;v{const w=a[(b+C)*2]===u[C*d]&&a[(b+C)*2+1]===u[C*d+1];return w||--b,w})}this.saveTextStates_(),(o.backgroundFill||o.backgroundStroke)&&(this.setFillStrokeStyle(o.backgroundFill,o.backgroundStroke),o.backgroundFill&&this.updateFillStyle(this.state,this.createFill),o.backgroundStroke&&(this.updateStrokeStyle(this.state,this.applyStroke),this.hitDetectionInstructions.push(this.createStroke(this.state)))),this.beginGeometry(e,n,i);let p=o.padding;if(p!=Xo&&(o.scale[0]<0||o.scale[1]<0)){let b=o.padding[0],E=o.padding[1],C=o.padding[2],w=o.padding[3];o.scale[0]<0&&(E=-E,w=-w),o.scale[1]<0&&(b=-b,C=-C),p=[b,E,C,w]}const m=this.pixelRatio;this.instructions.push([je.DRAW_IMAGE,l,f,null,NaN,NaN,NaN,1,0,0,this.textRotateWithView_,this.textRotation_,[1,1],NaN,this.declutterMode_,this.declutterImageWithText_,p==Xo?Xo:p.map(function(b){return b*m}),!!o.backgroundFill,!!o.backgroundStroke,this.text_,this.textKey_,this.strokeKey_,this.fillKey_,this.textOffsetX_,this.textOffsetY_,h]);const y=1/m,v=this.state.fillStyle;o.backgroundFill&&(this.state.fillStyle=ui,this.hitDetectionInstructions.push(this.createFill(this.state))),this.hitDetectionInstructions.push([je.DRAW_IMAGE,l,f,null,NaN,NaN,NaN,1,0,0,this.textRotateWithView_,this.textRotation_,[y,y],NaN,this.declutterMode_,this.declutterImageWithText_,p,!!o.backgroundFill,!!o.backgroundStroke,this.text_,this.textKey_,this.strokeKey_,this.fillKey_?ui:this.fillKey_,this.textOffsetX_,this.textOffsetY_,h]),o.backgroundFill&&(this.state.fillStyle=v,this.hitDetectionInstructions.push(this.createFill(this.state))),this.endGeometry(n)}}saveTextStates_(){const e=this.textStrokeState_,n=this.textState_,i=this.textFillState_,s=this.strokeKey_;e&&(s in this.strokeStates||(this.strokeStates[s]={strokeStyle:e.strokeStyle,lineCap:e.lineCap,lineDashOffset:e.lineDashOffset,lineWidth:e.lineWidth,lineJoin:e.lineJoin,miterLimit:e.miterLimit,lineDash:e.lineDash}));const r=this.textKey_;r in this.textStates||(this.textStates[r]={font:n.font,textAlign:n.textAlign||ku,justify:n.justify,textBaseline:n.textBaseline||Fh,scale:n.scale});const o=this.fillKey_;i&&(o in this.fillStates||(this.fillStates[o]={fillStyle:i.fillStyle}))}drawChars_(e,n){const i=this.textStrokeState_,s=this.textState_,r=this.strokeKey_,o=this.textKey_,a=this.fillKey_;this.saveTextStates_();const l=this.pixelRatio,c=Uh[s.textBaseline],u=this.textOffsetY_*l,d=this.text_,h=i?i.lineWidth*Math.abs(s.scale[0])/2:0;this.instructions.push([je.DRAW_CHARS,e,n,c,s.overflow,a,s.maxAngle,l,u,r,h*l,d,o,1,this.declutterMode_]),this.hitDetectionInstructions.push([je.DRAW_CHARS,e,n,c,s.overflow,a&&ui,s.maxAngle,l,u,r,h*l,d,o,1/l,this.declutterMode_])}setTextStyle(e,n){let i,s,r;if(!e)this.text_="";else{const o=e.getFill();o?(s=this.textFillState_,s||(s={},this.textFillState_=s),s.fillStyle=Is(o.getColor()||ui)):(s=null,this.textFillState_=s);const a=e.getStroke();if(!a)r=null,this.textStrokeState_=r;else{r=this.textStrokeState_,r||(r={},this.textStrokeState_=r);const p=a.getLineDash(),m=a.getLineDashOffset(),y=a.getWidth(),v=a.getMiterLimit();r.lineCap=a.getLineCap()||Vl,r.lineDash=p?p.slice():ur,r.lineDashOffset=m===void 0?dr:m,r.lineJoin=a.getLineJoin()||zl,r.lineWidth=y===void 0?Au:y,r.miterLimit=v===void 0?Cu:v,r.strokeStyle=Is(a.getColor()||Tu)}i=this.textState_;const l=e.getFont()||Ek;Qne(l);const c=e.getScaleArray();i.overflow=e.getOverflow(),i.font=l,i.maxAngle=e.getMaxAngle(),i.placement=e.getPlacement(),i.textAlign=e.getTextAlign(),i.repeat=e.getRepeat(),i.justify=e.getJustify(),i.textBaseline=e.getTextBaseline()||Fh,i.backgroundFill=e.getBackgroundFill(),i.backgroundStroke=e.getBackgroundStroke(),i.padding=e.getPadding()||Xo,i.scale=c===void 0?[1,1]:c;const u=e.getOffsetX(),d=e.getOffsetY(),h=e.getRotateWithView(),f=e.getRotation();this.text_=e.getText()||"",this.textOffsetX_=u===void 0?0:u,this.textOffsetY_=d===void 0?0:d,this.textRotateWithView_=h===void 0?!1:h,this.textRotation_=f===void 0?0:f,this.strokeKey_=r?(typeof r.strokeStyle=="string"?r.strokeStyle:wt(r.strokeStyle))+r.lineCap+r.lineDashOffset+"|"+r.lineWidth+r.lineJoin+r.miterLimit+"["+r.lineDash.join()+"]":"",this.textKey_=i.font+i.scale+(i.textAlign||"?")+(i.repeat||"?")+(i.justify||"?")+(i.textBaseline||"?"),this.fillKey_=s&&s.fillStyle?typeof s.fillStyle=="string"?s.fillStyle:"|"+wt(s.fillStyle):""}this.declutterMode_=e.getDeclutterMode(),this.declutterImageWithText_=n}}const Rre={Circle:ex,Default:Zu,Image:Cre,LineString:kre,Polygon:ex,Text:Pre};class Dre{constructor(e,n,i,s){this.tolerance_=e,this.maxExtent_=n,this.pixelRatio_=s,this.resolution_=i,this.buildersByZIndex_={}}finish(){const e={};for(const n in this.buildersByZIndex_){e[n]=e[n]||{};const i=this.buildersByZIndex_[n];for(const s in i){const r=i[s].finish();e[n][s]=r}}return e}getBuilder(e,n){const i=e!==void 0?e.toString():"0";let s=this.buildersByZIndex_[i];s===void 0&&(s={},this.buildersByZIndex_[i]=s);let r=s[n];if(r===void 0){const o=Rre[n];r=new o(this.tolerance_,this.maxExtent_,this.resolution_,this.pixelRatio_),s[n]=r}return r}}function $re(t,e,n,i,s,r,o,a,l,c,u,d){let h=t[e],f=t[e+1],p=0,m=0,y=0,v=0;function b(){p=h,m=f,e+=i,h=t[e],f=t[e+1],v+=y,y=Math.sqrt((h-p)*(h-p)+(f-m)*(f-m))}do b();while(eI[2]}else F=C>A;const H=Math.PI,te=[],N=x+i===e;e=x,y=0,v=T,h=t[e],f=t[e+1];let L;if(N){b(),L=Math.atan2(f-m,h-p),F&&(L+=L>0?-H:H);const I=(A+C)/2,W=(P+w)/2;return te[0]=[I,W,(k-r)/2,L,s],te}s=s.replace(/\n/g," ");for(let I=0,W=s.length;I0?-H:H),L!==void 0){let M=X-L;if(M+=M>H?-2*H:M<-H?2*H:0,Math.abs(M)>o)return null}L=X;const J=I;let ne=0;for(;I0&&t.push(` +`,""),t.push(e,""),t}class Ore{constructor(e,n,i,s,r){this.overlaps=i,this.pixelRatio=n,this.resolution=e,this.alignAndScaleFill_,this.instructions=s.instructions,this.coordinates=s.coordinates,this.coordinateCache_={},this.renderedTransform_=ds(),this.hitDetectionInstructions=s.hitDetectionInstructions,this.pixelCoordinates_=null,this.viewRotation_=0,this.fillStates=s.fillStates||{},this.strokeStates=s.strokeStates||{},this.textStates=s.textStates||{},this.widths_={},this.labels_={},this.zIndexContext_=r?new qk:null}getZIndexContext(){return this.zIndexContext_}createLabel(e,n,i,s){const r=e+n+i+s;if(this.labels_[r])return this.labels_[r];const o=s?this.strokeStates[s]:null,a=i?this.fillStates[i]:null,l=this.textStates[n],c=this.pixelRatio,u=[l.scale[0]*c,l.scale[1]*c],d=l.justify?Uh[l.justify]:kp(Array.isArray(e)?e[0]:e,l.textAlign||ku),h=s&&o.lineWidth?o.lineWidth:0,f=Array.isArray(e)?e:String(e).split(` +`).reduce(Lre,[]),{width:p,height:m,widths:y,heights:v,lineWidths:b}=tie(l,f),E=p+h,C=[],w=(E+2)*u[0],x=(m+h)*u[1],T={width:w<0?Math.floor(w):Math.ceil(w),height:x<0?Math.floor(x):Math.ceil(x),contextInstructions:C};(u[0]!=1||u[1]!=1)&&C.push("scale",u),s&&(C.push("strokeStyle",o.strokeStyle),C.push("lineWidth",h),C.push("lineCap",o.lineCap),C.push("lineJoin",o.lineJoin),C.push("miterLimit",o.miterLimit),C.push("setLineDash",[o.lineDash]),C.push("lineDashOffset",o.lineDashOffset)),i&&C.push("fillStyle",a.fillStyle),C.push("textBaseline","middle"),C.push("textAlign","center");const k=.5-d;let A=d*E+k*h;const P=[],F=[];let H=0,te=0,N=0,L=0,I;for(let W=0,X=f.length;We?e-c:r,C=o+u>n?n-u:o,w=p[3]+E*h[0]+p[1],x=p[0]+C*h[1]+p[2],T=v-p[3],k=b-p[0];(m||d!==0)&&(Ir[0]=T,Pr[0]=T,Ir[1]=k,Ks[1]=k,Ks[0]=T+w,Us[0]=Ks[0],Us[1]=k+x,Pr[1]=Us[1]);let A;return d!==0?(A=_r(ds(),i,s,1,1,d,-i,-s),$n(A,Ir),$n(A,Ks),$n(A,Us),$n(A,Pr),co(Math.min(Ir[0],Ks[0],Us[0],Pr[0]),Math.min(Ir[1],Ks[1],Us[1],Pr[1]),Math.max(Ir[0],Ks[0],Us[0],Pr[0]),Math.max(Ir[1],Ks[1],Us[1],Pr[1]),Ha)):co(Math.min(T,T+w),Math.min(k,k+x),Math.max(T,T+w),Math.max(k,k+x),Ha),f&&(v=Math.round(v),b=Math.round(b)),{drawImageX:v,drawImageY:b,drawImageW:E,drawImageH:C,originX:c,originY:u,declutterBox:{minX:Ha[0],minY:Ha[1],maxX:Ha[2],maxY:Ha[3],value:y},canvasTransform:A,scale:h}}replayImageOrLabel_(e,n,i,s,r,o,a){const l=!!(o||a),c=s.declutterBox,u=a?a[2]*s.scale[0]/2:0;return c.minX-u<=n[0]&&c.maxX+u>=0&&c.minY-u<=n[1]&&c.maxY+u>=0&&(l&&this.replayTextBackground_(e,Ir,Ks,Us,Pr,o,a),nie(e,s.canvasTransform,r,i,s.originX,s.originY,s.drawImageW,s.drawImageH,s.drawImageX,s.drawImageY,s.scale)),!0}fill_(e){const n=this.alignAndScaleFill_;if(n){const i=$n(this.renderedTransform_,[0,0]),s=512*this.pixelRatio;e.save(),e.translate(i[0]%s,i[1]%s),n!==1&&e.scale(n,n),e.rotate(this.viewRotation_)}e.fill(),n&&e.restore()}setStrokeStyle_(e,n){e.strokeStyle=n[1],e.lineWidth=n[2],e.lineCap=n[3],e.lineJoin=n[4],e.miterLimit=n[5],e.lineDashOffset=n[7],e.setLineDash(n[6])}drawLabelWithPointPlacement_(e,n,i,s){const r=this.textStates[n],o=this.createLabel(e,n,s,i),a=this.strokeStates[i],l=this.pixelRatio,c=kp(Array.isArray(e)?e[0]:e,r.textAlign||ku),u=Uh[r.textBaseline||Fh],d=a&&a.lineWidth?a.lineWidth:0,h=o.width/l-2*r.scale[0],f=c*h+2*(.5-c)*d,p=u*o.height/l+2*(.5-u)*d;return{label:o,anchorX:f,anchorY:p}}execute_(e,n,i,s,r,o,a,l){const c=this.zIndexContext_;let u;this.pixelCoordinates_&&xo(i,this.renderedTransform_)?u=this.pixelCoordinates_:(this.pixelCoordinates_||(this.pixelCoordinates_=[]),u=no(this.coordinates,0,this.coordinates.length,2,i,this.pixelCoordinates_),nne(this.renderedTransform_,i));let d=0;const h=s.length;let f=0,p,m,y,v,b,E,C,w,x,T,k,A,P,F=0,H=0,te=null,N=null;const L=this.coordinateCache_,I=this.viewRotation_,W=Math.round(Math.atan2(-i[1],i[0])*1e12)/1e12,X={context:e,pixelRatio:this.pixelRatio,resolution:this.resolution,rotation:I},J=this.instructions!=s||this.overlaps?0:200;let ne,ue,Y,Z;for(;dJ&&(this.fill_(e),F=0),H>J&&(e.stroke(),H=0),!F&&!H&&(e.beginPath(),b=NaN,E=NaN),++d;break;case je.CIRCLE:f=M[1];const le=u[f],$=u[f+1],oe=u[f+2],de=u[f+3],ve=oe-le,z=de-$,ge=Math.sqrt(ve*ve+z*z);e.moveTo(le+ge,$),e.arc(le,$,ge,0,2*Math.PI,!0),++d;break;case je.CLOSE_PATH:e.closePath(),++d;break;case je.CUSTOM:f=M[1],p=M[2];const S=M[3],O=M[4],K=M[5];X.geometry=S,X.feature=ne,d in L||(L[d]=[]);const U=L[d];K?K(u,f,p,2,U):(U[0]=u[f],U[1]=u[f+1],U.length=2),c&&(c.zIndex=M[6]),O(U,X),++d;break;case je.DRAW_IMAGE:f=M[1],p=M[2],x=M[3],m=M[4],y=M[5];let re=M[6];const j=M[7],se=M[8],ee=M[9],fe=M[10];let me=M[11];const pe=M[12];let Le=M[13];v=M[14]||"declutter";const Ae=M[15];if(!x&&M.length>=20){T=M[19],k=M[20],A=M[21],P=M[22];const dn=this.drawLabelWithPointPlacement_(T,k,A,P);x=dn.label,M[3]=x;const En=M[23];m=(dn.anchorX-En)*this.pixelRatio,M[4]=m;const Sn=M[24];y=(dn.anchorY-Sn)*this.pixelRatio,M[5]=y,re=x.height,M[6]=re,Le=x.width,M[13]=Le}let ze;M.length>25&&(ze=M[25]);let Be,nt,Ze;M.length>17?(Be=M[16],nt=M[17],Ze=M[18]):(Be=Xo,nt=!1,Ze=!1),fe&&W?me+=I:!fe&&!W&&(me-=I);let Mt=0;for(;f!eA.includes(t));class Fre{constructor(e,n,i,s,r,o,a){this.maxExtent_=e,this.overlaps_=s,this.pixelRatio_=i,this.resolution_=n,this.renderBuffer_=o,this.executorsByZIndex_={},this.hitDetectionContext_=null,this.hitDetectionTransform_=ds(),this.renderedContext_=null,this.deferredZIndexContexts_={},this.createExecutors_(r,a)}clip(e,n){const i=this.getClipCoords(n);e.beginPath(),e.moveTo(i[0],i[1]),e.lineTo(i[2],i[3]),e.lineTo(i[4],i[5]),e.lineTo(i[6],i[7]),e.clip()}createExecutors_(e,n){for(const i in e){let s=this.executorsByZIndex_[i];s===void 0&&(s={},this.executorsByZIndex_[i]=s);const r=e[i];for(const o in r){const a=r[o];s[o]=new Ore(this.resolution_,this.pixelRatio_,this.overlaps_,a,n)}}}hasExecutors(e){for(const n in this.executorsByZIndex_){const i=this.executorsByZIndex_[n];for(let s=0,r=e.length;s0){if(!o||T==="none"||f!=="Image"&&f!=="Text"||o.includes(w)){const F=(h[A]-3)/4,H=s-F%a,te=s-(F/a|0),N=r(w,x,H*H+te*te);if(N)return N}u.clearRect(0,0,a,a);break}}const m=Object.keys(this.executorsByZIndex_).map(Number);m.sort(cr);let y,v,b,E,C;for(y=m.length-1;y>=0;--y){const w=m[y].toString();for(b=this.executorsByZIndex_[w],v=el.length-1;v>=0;--v)if(f=el[v],E=b[f],E!==void 0&&(C=E.executeHitDetection(u,l,i,p,d),C))return C}}getClipCoords(e){const n=this.maxExtent_;if(!n)return null;const i=n[0],s=n[1],r=n[2],o=n[3],a=[i,s,i,o,r,o,r,s];return no(a,0,8,2,e,a),a}isEmpty(){return Nl(this.executorsByZIndex_)}execute(e,n,i,s,r,o,a){const l=Object.keys(this.executorsByZIndex_).map(Number);l.sort(cr),o=o||el;const c=el.length;let u,d,h,f,p;for(a&&l.reverse(),u=0,d=l.length;uv.execute(w,n,i,s,r,a)),C&&E.restore(),b){b.offset();const w=l[u]*c+h;this.deferredZIndexContexts_[w]||(this.deferredZIndexContexts_[w]=[]),this.deferredZIndexContexts_[w].push(b)}}}}this.renderedContext_=e}getDeferredZIndexContexts(){return this.deferredZIndexContexts_}getRenderedContext(){return this.renderedContext_}renderDeferred(){const e=this.deferredZIndexContexts_,n=Object.keys(e).map(Number).sort(cr);for(let i=0,s=n.length;i{r.draw(this.renderedContext_),r.clear()}),e[n[i]].length=0}}const Ap={};function Bre(t){if(Ap[t]!==void 0)return Ap[t];const e=t*2+1,n=t*t,i=new Array(n+1);for(let r=0;r<=t;++r)for(let o=0;o<=t;++o){const a=r*r+o*o;if(a>n)break;let l=i[a];l||(l=[],i[a]=l),l.push(((t+r)*e+(t+o))*4+3),r>0&&l.push(((t-r)*e+(t+o))*4+3),o>0&&(l.push(((t+r)*e+(t-o))*4+3),r>0&&l.push(((t-r)*e+(t-o))*4+3))}const s=[];for(let r=0,o=i.length;rd*this.pixelRatio_),lineDashOffset:(o||dr)*this.pixelRatio_,lineJoin:a!==void 0?a:zl,lineWidth:(l!==void 0?l:Au)*this.pixelRatio_,miterLimit:c!==void 0?c:Cu,strokeStyle:Is(i||Tu)}}}setImageStyle(e){let n;if(!e||!(n=e.getSize())){this.image_=null;return}const i=e.getPixelRatio(this.pixelRatio_),s=e.getAnchor(),r=e.getOrigin();this.image_=e.getImage(this.pixelRatio_),this.imageAnchorX_=s[0]*i,this.imageAnchorY_=s[1]*i,this.imageHeight_=n[1]*i,this.imageOpacity_=e.getOpacity(),this.imageOriginX_=r[0],this.imageOriginY_=r[1],this.imageRotateWithView_=e.getRotateWithView(),this.imageRotation_=e.getRotation();const o=e.getScaleArray();this.imageScale_=[o[0]*this.pixelRatio_/i,o[1]*this.pixelRatio_/i],this.imageWidth_=n[0]*i}setTextStyle(e){if(!e)this.text_="";else{const n=e.getFill();if(!n)this.textFillState_=null;else{const f=n.getColor();this.textFillState_={fillStyle:Is(f||ui)}}const i=e.getStroke();if(!i)this.textStrokeState_=null;else{const f=i.getColor(),p=i.getLineCap(),m=i.getLineDash(),y=i.getLineDashOffset(),v=i.getLineJoin(),b=i.getWidth(),E=i.getMiterLimit();this.textStrokeState_={lineCap:p!==void 0?p:Vl,lineDash:m||ur,lineDashOffset:y||dr,lineJoin:v!==void 0?v:zl,lineWidth:b!==void 0?b:Au,miterLimit:E!==void 0?E:Cu,strokeStyle:Is(f||Tu)}}const s=e.getFont(),r=e.getOffsetX(),o=e.getOffsetY(),a=e.getRotateWithView(),l=e.getRotation(),c=e.getScaleArray(),u=e.getText(),d=e.getTextAlign(),h=e.getTextBaseline();this.textState_={font:s!==void 0?s:Ek,textAlign:d!==void 0?d:ku,textBaseline:h!==void 0?h:Fh},this.text_=u!==void 0?Array.isArray(u)?u.reduce((f,p,m)=>f+=m%2?" ":p,""):u:"",this.textOffsetX_=r!==void 0?this.pixelRatio_*r:0,this.textOffsetY_=o!==void 0?this.pixelRatio_*o:0,this.textRotateWithView_=a!==void 0?a:!1,this.textRotation_=l!==void 0?l:0,this.textScale_=[this.pixelRatio_*c[0],this.pixelRatio_*c[1]]}}}const zre=Vre,Cs=.5;function Wre(t,e,n,i,s,r,o,a,l){const c=l?Ty(s):s,u=t[0]*Cs,d=t[1]*Cs,h=an(u,d);h.imageSmoothingEnabled=!1;const f=h.canvas,p=new zre(h,Cs,s,null,o,a,l?Yf(Ute(),l):null),m=n.length,y=Math.floor((256*256*256-1)/m),v={};for(let E=1;E<=m;++E){const C=n[E-1],w=C.getStyleFunction()||i;if(!w)continue;let x=w(C,r);if(!x)continue;Array.isArray(x)||(x=[x]);const k=(E*y).toString(16).padStart(7,"#00000");for(let A=0,P=x.length;A0;return d&&Promise.all(l).then(()=>s(null)),Ure(t,e,n,i,r,o,a),d}function Ure(t,e,n,i,s,r,o){const a=n.getGeometryFunction()(e);if(!a)return;const l=a.simplifyTransformed(i,s);if(n.getRenderer())iA(t,l,n,e,o);else{const u=tA[l.getType()];u(t,l,n,e,o,r)}}function iA(t,e,n,i,s){if(e.getType()=="GeometryCollection"){const o=e.getGeometries();for(let a=0,l=o.length;a{if(this.frameState&&!this.hitDetectionImageData_&&!this.animatingOrInteracting_){const i=this.frameState.size.slice(),s=this.renderedCenter_,r=this.renderedResolution_,o=this.renderedRotation_,a=this.renderedProjection_,l=this.wrappedRenderedExtent_,c=this.getLayer(),u=[],d=i[0]*Cs,h=i[1]*Cs;u.push(this.getRenderTransform(s,r,o,Cs,d,h,0).slice());const f=c.getSource(),p=a.getExtent();if(f.getWrapX()&&a.canWrapX()&&!Qa(p,l)){let m=l[0];const y=vt(p);let v=0,b;for(;mp[2];)++v,b=y*v,u.push(this.getRenderTransform(s,r,o,Cs,d,h,b).slice()),m-=y}this.hitDetectionImageData_=Wre(i,u,this.renderedFeatures_,c.getStyleFunction(),l,r,o,ix(r,this.renderedPixelRatio_),null)}n(Hre(e,this.renderedFeatures_,this.hitDetectionImageData_))})}forEachFeatureAtCoordinate(e,n,i,s,r){if(!this.replayGroup_)return;const o=n.viewState.resolution,a=n.viewState.rotation,l=this.getLayer(),c={},u=function(p,m,y){const v=wt(p),b=c[v];if(b){if(b!==!0&&yd=p.forEachFeatureAtCoordinate(e,o,a,i,u,f&&n.declutter[f]?n.declutter[f].all().map(m=>m.value):null)),d}handleFontsChanged(){const e=this.getLayer();e.getVisible()&&this.replayGroup_&&e.changed()}handleStyleImageChange_(e){this.renderIfReadyAndVisible()}prepareFrame(e){const n=this.getLayer(),i=n.getSource();if(!i)return!1;const s=e.viewHints[Vn.ANIMATING],r=e.viewHints[Vn.INTERACTING],o=n.getUpdateWhileAnimating(),a=n.getUpdateWhileInteracting();if(this.ready&&!o&&s||!a&&r)return this.animatingOrInteracting_=!0,!0;this.animatingOrInteracting_=!1;const l=e.extent,c=e.viewState,u=c.projection,d=c.resolution,h=e.pixelRatio,f=n.getRevision(),p=n.getRenderBuffer();let m=n.getRenderOrder();m===void 0&&(m=jre);const y=c.center.slice(),v=vy(l,p*d),b=v.slice(),E=[v.slice()],C=u.getExtent();if(i.getWrapX()&&u.canWrapX()&&!Qa(C,e.extent)){const N=vt(C),L=Math.max(vt(v)/2,N);v[0]=C[0]-L,v[2]=C[2]+L,ek(y,u);const I=QT(E[0],u);I[0]C[0]&&I[2]>C[2]&&E.push([I[0]-N,I[1],I[2]-N,I[3]])}if(this.ready&&this.renderedResolution_==d&&this.renderedRevision_==f&&this.renderedRenderOrder_==m&&this.renderedFrameDeclutter_===!!e.declutter&&Qa(this.wrappedRenderedExtent_,v))return xo(this.renderedExtent_,b)||(this.hitDetectionImageData_=null,this.renderedExtent_=b),this.renderedCenter_=y,this.replayGroupChanged=!1,!0;this.replayGroup_=null;const w=new Dre(nA(d,h),v,d,h);let x;for(let N=0,L=E.length;N{let I;const W=N.getStyleFunction()||n.getStyleFunction();if(W&&(I=W(N,d)),I){const X=this.renderFeature(N,T,I,w,x,this.getLayer().getDeclutter(),L);k=k&&!X}},P=Ty(v),F=i.getFeaturesInExtent(P);m&&F.sort(m);for(let N=0,L=F.length;N{if(e===this.squaredTolerance_)return this.simplifiedGeometry_;this.simplifiedGeometry_=this.clone(),n&&this.simplifiedGeometry_.applyTransform(n);const i=this.simplifiedGeometry_.getFlatCoordinates();let s;switch(this.type_){case"LineString":i.length=Kf(i,0,this.simplifiedGeometry_.flatCoordinates_.length,this.simplifiedGeometry_.stride_,e,i,0),s=[i.length];break;case"MultiLineString":s=[],i.length=gne(i,0,this.simplifiedGeometry_.ends_,this.simplifiedGeometry_.stride_,e,i,0,s);break;case"Polygon":s=[],i.length=lk(i,0,this.simplifiedGeometry_.ends_,this.simplifiedGeometry_.stride_,Math.sqrt(e),i,0,s);break}return s&&(this.simplifiedGeometry_=new is(this.type_,i,s,2,this.properties_,this.id_)),this.squaredTolerance_=e,this.simplifiedGeometry_}),this}}is.prototype.getFlatCoordinates=is.prototype.getOrientedFlatCoordinates;const Bi={ADDFEATURE:"addfeature",CHANGEFEATURE:"changefeature",CLEAR:"clear",REMOVEFEATURE:"removefeature",FEATURESLOADSTART:"featuresloadstart",FEATURESLOADEND:"featuresloadend",FEATURESLOADERROR:"featuresloaderror"};function soe(t,e){return[[-1/0,-1/0,1/0,1/0]]}let roe=!1;function ooe(t,e,n,i,s,r,o){const a=new XMLHttpRequest;a.open("GET",typeof t=="function"?t(n,i,s):t,!0),e.getType()=="arraybuffer"&&(a.responseType="arraybuffer"),a.withCredentials=roe,a.onload=function(l){if(!a.status||a.status>=200&&a.status<300){const c=e.getType();try{let u;c=="text"||c=="json"?u=a.responseText:c=="xml"?u=a.responseXML||a.responseText:c=="arraybuffer"&&(u=a.response),u?r(e.readFeatures(u,{extent:n,featureProjection:s}),e.readProjection(u)):o()}catch{o()}}else o()},a.onerror=o,a.send()}function ax(t,e){return function(n,i,s,r,o){const a=this;ooe(t,e,n,i,s,function(l,c){a.addFeatures(l),r!==void 0&&r(l)},o||Ol)}}class Rr extends br{constructor(e,n,i){super(e),this.feature=n,this.features=i}}class aoe extends Kk{constructor(e){e=e||{},super({attributions:e.attributions,interpolate:!0,projection:void 0,state:"ready",wrapX:e.wrapX!==void 0?e.wrapX:!0}),this.on,this.once,this.un,this.loader_=Ol,this.format_=e.format||null,this.overlaps_=e.overlaps===void 0?!0:e.overlaps,this.url_=e.url,e.loader!==void 0?this.loader_=e.loader:this.url_!==void 0&&(mt(this.format_,"`format` must be set when `url` is set"),this.loader_=ax(this.url_,this.format_)),this.strategy_=e.strategy!==void 0?e.strategy:soe;const n=e.useSpatialIndex!==void 0?e.useSpatialIndex:!0;this.featuresRtree_=n?new rx:null,this.loadedExtentsRtree_=new rx,this.loadingExtentsCount_=0,this.nullGeometryFeatures_={},this.idIndex_={},this.uidIndex_={},this.featureChangeKeys_={},this.featuresCollection_=null;let i,s;Array.isArray(e.features)?s=e.features:e.features&&(i=e.features,s=i.getArray()),!n&&i===void 0&&(i=new As(s)),s!==void 0&&this.addFeaturesInternal(s),i!==void 0&&this.bindFeaturesCollection_(i)}addFeature(e){this.addFeatureInternal(e),this.changed()}addFeatureInternal(e){const n=wt(e);if(!this.addToIndex_(n,e)){this.featuresCollection_&&this.featuresCollection_.remove(e);return}this.setupChangeEvents_(n,e);const i=e.getGeometry();if(i){const s=i.getExtent();this.featuresRtree_&&this.featuresRtree_.insert(s,e)}else this.nullGeometryFeatures_[n]=e;this.dispatchEvent(new Rr(Bi.ADDFEATURE,e))}setupChangeEvents_(e,n){n instanceof is||(this.featureChangeKeys_[e]=[ft(n,et.CHANGE,this.handleFeatureChange_,this),ft(n,Ll.PROPERTYCHANGE,this.handleFeatureChange_,this)])}addToIndex_(e,n){let i=!0;if(n.getId()!==void 0){const s=String(n.getId());if(!(s in this.idIndex_))this.idIndex_[s]=n;else if(n instanceof is){const r=this.idIndex_[s];r instanceof is?Array.isArray(r)?r.push(n):this.idIndex_[s]=[r,n]:i=!1}else i=!1}return i&&(mt(!(e in this.uidIndex_),"The passed `feature` was already added to the source"),this.uidIndex_[e]=n),i}addFeatures(e){this.addFeaturesInternal(e),this.changed()}addFeaturesInternal(e){const n=[],i=[],s=[];for(let r=0,o=e.length;r{n||(n=!0,this.addFeature(i.element),n=!1)}),e.addEventListener(ci.REMOVE,i=>{n||(n=!0,this.removeFeature(i.element),n=!1)}),this.featuresCollection_=e}clear(e){if(e){for(const i in this.featureChangeKeys_)this.featureChangeKeys_[i].forEach(Dt);this.featuresCollection_||(this.featureChangeKeys_={},this.idIndex_={},this.uidIndex_={})}else if(this.featuresRtree_){const i=s=>{this.removeFeatureInternal(s)};this.featuresRtree_.forEach(i);for(const s in this.nullGeometryFeatures_)this.removeFeatureInternal(this.nullGeometryFeatures_[s])}this.featuresCollection_&&this.featuresCollection_.clear(),this.featuresRtree_&&this.featuresRtree_.clear(),this.nullGeometryFeatures_={};const n=new Rr(Bi.CLEAR);this.dispatchEvent(n),this.changed()}forEachFeature(e){if(this.featuresRtree_)return this.featuresRtree_.forEach(e);this.featuresCollection_&&this.featuresCollection_.forEach(e)}forEachFeatureAtCoordinateDirect(e,n){const i=[e[0],e[1],e[0],e[1]];return this.forEachFeatureInExtent(i,function(s){const r=s.getGeometry();if(r instanceof is||r.intersectsCoordinate(e))return n(s)})}forEachFeatureInExtent(e,n){if(this.featuresRtree_)return this.featuresRtree_.forEachInExtent(e,n);this.featuresCollection_&&this.featuresCollection_.forEach(n)}forEachFeatureIntersectingExtent(e,n){return this.forEachFeatureInExtent(e,function(i){const s=i.getGeometry();if(s instanceof is||s.intersectsExtent(e)){const r=n(i);if(r)return r}})}getFeaturesCollection(){return this.featuresCollection_}getFeatures(){let e;return this.featuresCollection_?e=this.featuresCollection_.getArray().slice(0):this.featuresRtree_&&(e=this.featuresRtree_.getAll(),Nl(this.nullGeometryFeatures_)||Of(e,Object.values(this.nullGeometryFeatures_))),e}getFeaturesAtCoordinate(e){const n=[];return this.forEachFeatureAtCoordinateDirect(e,function(i){n.push(i)}),n}getFeaturesInExtent(e,n){if(this.featuresRtree_){if(!(n&&n.canWrapX()&&this.getWrapX()))return this.featuresRtree_.getInExtent(e);const s=xy(e,n);return[].concat(...s.map(r=>this.featuresRtree_.getInExtent(r)))}return this.featuresCollection_?this.featuresCollection_.getArray().slice(0):[]}getClosestFeatureToCoordinate(e,n){const i=e[0],s=e[1];let r=null;const o=[NaN,NaN];let a=1/0;const l=[-1/0,-1/0,1/0,1/0];return n=n||mu,this.featuresRtree_.forEachInExtent(l,function(c){if(n(c)){const u=c.getGeometry(),d=a;if(a=u instanceof is?0:u.closestPointXY(i,s,o,a),a{--this.loadingExtentsCount_,this.dispatchEvent(new Rr(Bi.FEATURESLOADEND,void 0,u))},()=>{--this.loadingExtentsCount_,this.dispatchEvent(new Rr(Bi.FEATURESLOADERROR))}),s.insert(l,{extent:l.slice()}))}this.loading=this.loader_.length<4?!1:this.loadingExtentsCount_>0}refresh(){this.clear(!0),this.loadedExtentsRtree_.clear(),super.refresh()}removeLoadedExtent(e){const n=this.loadedExtentsRtree_;let i;n.forEachInExtent(e,function(s){if(yu(s.extent,e))return i=s,!0}),i&&n.remove(i)}removeFeatures(e){let n=!1;for(let i=0,s=e.length;ie.geo&&e.geo.lat&&e.geo.lon);return t?[t.geo.lon,t.geo.lat]:[0,0]}return[this.d.geo.lon,this.d.geo.lat]}},mounted(){const t=new Dse({target:"map",layers:[new wre({source:new are})],view:new Ss({center:lp(this.getLastLonLat()),zoom:this.type==="traceroute"?3:10})}),e=[],n=new aoe;if(this.type==="traceroute")console.log(this.getLastLonLat()),this.d.forEach(o=>{if(o.geo&&o.geo.lat&&o.geo.lon){const a=lp([o.geo.lon,o.geo.lat]);e.push(a);const l=this.getLastLonLat();console.log(o.geo.lon,o.geo.lat),console.log(o.geo.lon===l[0]&&o.geo.lat===l[1]);const c=new Tp({geometry:new wu(a),last:o.geo.lon===l[0]&&o.geo.lat===l[1]});n.addFeature(c)}});else{const o=lp([this.d.geo.lon,this.d.geo.lat]);e.push(o);const a=new Tp({geometry:new wu(o)});n.addFeature(a)}const i=new Kh(e),s=new Tp({geometry:i});n.addFeature(s);const r=new noe({source:n,style:function(o){if(o.getGeometry().getType()==="Point")return new ul({image:new Yy({radius:10,fill:new Zf({color:o.get("last")?"#dc3545":"#0d6efd"}),stroke:new Vh({color:"white",width:5})})});if(o.getGeometry().getType()==="LineString")return new ul({stroke:new Vh({color:"#0d6efd",width:2})})}});t.addLayer(r)}},coe={id:"map",class:"w-100 rounded-3"};function uoe(t,e,n,i,s,r){return D(),V("div",coe)}const sA=Ye(loe,[["render",uoe]]),doe={name:"ping",components:{OSMap:sA,LocaleText:Qe},data(){return{loading:!1,cips:{},selectedConfiguration:void 0,selectedPeer:void 0,selectedIp:void 0,count:4,pingResult:void 0,pinging:!1}},setup(){return{store:st()}},mounted(){Vt("/api/ping/getAllPeersIpAddress",{},t=>{t.status&&(this.loading=!0,this.cips=t.data,console.log(this.cips))})},methods:{execute(){this.selectedIp&&(this.pinging=!0,this.pingResult=void 0,Vt("/api/ping/execute",{ipAddress:this.selectedIp,count:this.count},t=>{t.status?this.pingResult=t.data:this.store.newMessage("Server",t.message,"danger"),this.pinging=!1}))}},watch:{selectedConfiguration(){this.selectedPeer=void 0,this.selectedIp=void 0},selectedPeer(){this.selectedIp=void 0}}},bi=t=>(bn("data-v-f5cd36ce"),t=t(),wn(),t),hoe={class:"mt-md-5 mt-3 text-body"},foe={class:"container"},goe=bi(()=>g("h3",{class:"mb-3 text-body"},"Ping",-1)),poe={class:"row"},moe={class:"col-sm-4 d-flex gap-2 flex-column"},_oe={class:"mb-1 text-muted",for:"configuration"},yoe=["disabled"],voe=bi(()=>g("option",{disabled:"",selected:"",value:void 0},null,-1)),boe=["value"],woe={class:"mb-1 text-muted",for:"peer"},xoe=["disabled"],Eoe=bi(()=>g("option",{disabled:"",selected:"",value:void 0},null,-1)),Soe=["value"],Coe={class:"mb-1 text-muted",for:"ip"},Toe=["disabled"],koe=bi(()=>g("option",{disabled:"",selected:"",value:void 0},null,-1)),Aoe={class:"d-flex align-items-center gap-2"},Moe=bi(()=>g("div",{class:"flex-grow-1 border-top"},null,-1)),Ioe={class:"text-muted"},Poe=bi(()=>g("div",{class:"flex-grow-1 border-top"},null,-1)),Roe={class:"mb-1 text-muted",for:"ipAddress"},Doe=["disabled"],$oe=bi(()=>g("div",{class:"w-100 border-top my-2"},null,-1)),Loe={class:"mb-1 text-muted",for:"count"},Ooe={class:"d-flex gap-3 align-items-center"},Noe=["disabled"],Foe=bi(()=>g("i",{class:"bi bi-dash-lg"},null,-1)),Boe=[Foe],Voe=bi(()=>g("i",{class:"bi bi-plus-lg"},null,-1)),zoe=[Voe],Woe=["disabled"],Hoe={key:0,class:"d-block"},Yoe=bi(()=>g("i",{class:"bi bi-person-walking me-2"},null,-1)),joe={key:1,class:"d-block"},Koe=bi(()=>g("span",{class:"spinner-border spinner-border-sm","aria-hidden":"true"},null,-1)),Uoe=bi(()=>g("span",{class:"visually-hidden",role:"status"},"Loading...",-1)),Goe=[Koe,Uoe],Xoe={class:"col-sm-8 position-relative"},qoe={key:"pingPlaceholder"},Zoe=bi(()=>g("div",{class:"pingPlaceholder bg-body-secondary rounded-3 mb-3",style:{height:"300px"}},null,-1)),Joe={key:"pingResult",class:"d-flex flex-column gap-2 w-100"},Qoe={class:"card rounded-3 bg-transparent shadow-sm animate__animated animate__fadeIn",style:{"animation-delay":"0.15s"}},eae={class:"card-body row"},tae={class:"col-sm"},nae={class:"mb-0 text-muted"},iae={key:0,class:"col-sm"},sae={class:"mb-0 text-muted"},rae={class:"card rounded-3 bg-transparent shadow-sm animate__animated animate__fadeIn",style:{"animation-delay":"0.3s"}},oae={class:"card-body"},aae=bi(()=>g("p",{class:"mb-0 text-muted"},[g("small",null,"Is Alive")],-1)),lae={class:"card rounded-3 bg-transparent shadow-sm animate__animated animate__fadeIn",style:{"animation-delay":"0.45s"}},cae={class:"card-body"},uae={class:"mb-0 text-muted"},dae={class:"card rounded-3 bg-transparent shadow-sm animate__animated animate__fadeIn",style:{"animation-delay":"0.6s"}},hae={class:"card-body"},fae={class:"mb-0 text-muted"};function gae(t,e,n,i,s,r){const o=Se("LocaleText"),a=Se("OSMap");return D(),V("div",hoe,[g("div",foe,[goe,g("div",poe,[g("div",moe,[g("div",null,[g("label",_oe,[g("small",null,[B(o,{t:"Configuration"})])]),Ne(g("select",{class:"form-select","onUpdate:modelValue":e[0]||(e[0]=l=>this.selectedConfiguration=l),disabled:this.pinging},[voe,(D(!0),V($e,null,Xe(this.cips,(l,c)=>(D(),V("option",{value:c},Ee(c),9,boe))),256))],8,yoe),[[ih,this.selectedConfiguration]])]),g("div",null,[g("label",woe,[g("small",null,[B(o,{t:"Peer"})])]),Ne(g("select",{id:"peer",class:"form-select","onUpdate:modelValue":e[1]||(e[1]=l=>this.selectedPeer=l),disabled:this.selectedConfiguration===void 0||this.pinging},[Eoe,this.selectedConfiguration!==void 0?(D(!0),V($e,{key:0},Xe(this.cips[this.selectedConfiguration],(l,c)=>(D(),V("option",{value:c},Ee(c),9,Soe))),256)):ce("",!0)],8,xoe),[[ih,this.selectedPeer]])]),g("div",null,[g("label",Coe,[g("small",null,[B(o,{t:"IP Address"})])]),Ne(g("select",{id:"ip",class:"form-select","onUpdate:modelValue":e[2]||(e[2]=l=>this.selectedIp=l),disabled:this.selectedPeer===void 0||this.pinging},[koe,this.selectedPeer!==void 0?(D(!0),V($e,{key:0},Xe(this.cips[this.selectedConfiguration][this.selectedPeer].allowed_ips,l=>(D(),V("option",null,Ee(l),1))),256)):ce("",!0)],8,Toe),[[ih,this.selectedIp]])]),g("div",Aoe,[Moe,g("small",Ioe,[B(o,{t:"OR"})]),Poe]),g("div",null,[g("label",Roe,[g("small",null,[B(o,{t:"Enter IP Address / Hostname"})])]),Ne(g("input",{class:"form-control",type:"text",id:"ipAddress",disabled:this.pinging,"onUpdate:modelValue":e[3]||(e[3]=l=>this.selectedIp=l)},null,8,Doe),[[Ke,this.selectedIp]])]),$oe,g("div",null,[g("label",Loe,[g("small",null,[B(o,{t:"Count"})])]),g("div",Ooe,[g("button",{onClick:e[4]||(e[4]=l=>this.count--),disabled:this.count===1,class:"btn btn-sm bg-secondary-subtle text-secondary-emphasis"},Boe,8,Noe),g("strong",null,Ee(this.count),1),g("button",{role:"button",onClick:e[5]||(e[5]=l=>this.count++),class:"btn btn-sm bg-secondary-subtle text-secondary-emphasis"},zoe)])]),g("button",{class:"btn btn-primary rounded-3 mt-3 position-relative",disabled:!this.selectedIp||this.pinging,onClick:e[6]||(e[6]=l=>this.execute())},[B(Rt,{name:"slide"},{default:Re(()=>[this.pinging?(D(),V("span",joe,Goe)):(D(),V("span",Hoe,[Yoe,He("Ping! ")]))]),_:1})],8,Woe)]),g("div",Xoe,[B(Rt,{name:"ping"},{default:Re(()=>[this.pingResult?(D(),V("div",Joe,[this.pingResult.geo&&this.pingResult.geo.status==="success"?(D(),Ce(a,{key:0,d:this.pingResult},null,8,["d"])):ce("",!0),g("div",Qoe,[g("div",eae,[g("div",tae,[g("p",nae,[g("small",null,[B(o,{t:"IP Address"})])]),He(" "+Ee(this.pingResult.address),1)]),this.pingResult.geo&&this.pingResult.geo.status==="success"?(D(),V("div",iae,[g("p",sae,[g("small",null,[B(o,{t:"Geolocation"})])]),He(" "+Ee(this.pingResult.geo.city)+", "+Ee(this.pingResult.geo.country),1)])):ce("",!0)])]),g("div",rae,[g("div",oae,[aae,g("span",{class:Ie([this.pingResult.is_alive?"text-success":"text-danger"])},[g("i",{class:Ie(["bi me-1",[this.pingResult.is_alive?"bi-check-circle-fill":"bi-x-circle-fill"]])},null,2),He(" "+Ee(this.pingResult.is_alive?"Yes":"No"),1)],2)])]),g("div",lae,[g("div",cae,[g("p",uae,[g("small",null,[B(o,{t:"Average / Min / Max Round Trip Time"})])]),g("samp",null,Ee(this.pingResult.avg_rtt)+"ms / "+Ee(this.pingResult.min_rtt)+"ms / "+Ee(this.pingResult.max_rtt)+"ms ",1)])]),g("div",dae,[g("div",hae,[g("p",fae,[g("small",null,[B(o,{t:"Sent / Received / Lost Package"})])]),g("samp",null,Ee(this.pingResult.package_sent)+" / "+Ee(this.pingResult.package_received)+" / "+Ee(this.pingResult.package_loss),1)])])])):(D(),V("div",qoe,[Zoe,(D(),V($e,null,Xe(4,l=>g("div",{class:Ie(["pingPlaceholder bg-body-secondary rounded-3 mb-3",{"animate__animated animate__flash animate__slower animate__infinite":this.pinging}]),style:Mn({"animation-delay":`${l*.15}s`})},null,6)),64))]))]),_:1})])])])])}const pae=Ye(doe,[["render",gae],["__scopeId","data-v-f5cd36ce"]]),mae={name:"traceroute",components:{LocaleText:Qe,OSMap:sA},data(){return{tracing:!1,ipAddress:void 0,tracerouteResult:void 0}},setup(){return{store:vi()}},methods:{execute(){this.ipAddress&&(this.tracing=!0,this.tracerouteResult=void 0,Vt("/api/traceroute/execute",{ipAddress:this.ipAddress},t=>{t.status?this.tracerouteResult=t.data:this.store.newMessage("Server",t.message,"danger"),this.tracing=!1}))}}},Jl=t=>(bn("data-v-d80ce3c9"),t=t(),wn(),t),_ae={class:"mt-md-5 mt-3 text-body"},yae={class:"container-md"},vae=Jl(()=>g("h3",{class:"mb-3 text-body"},"Traceroute",-1)),bae={class:"d-flex gap-2 flex-column mb-5"},wae={class:"mb-1 text-muted",for:"ipAddress"},xae=["disabled"],Eae=["disabled"],Sae={key:0,class:"d-block"},Cae=Jl(()=>g("i",{class:"bi bi-person-walking me-2"},null,-1)),Tae={key:1,class:"d-block"},kae=Jl(()=>g("span",{class:"spinner-border spinner-border-sm","aria-hidden":"true"},null,-1)),Aae=Jl(()=>g("span",{class:"visually-hidden",role:"status"},"Loading...",-1)),Mae=[kae,Aae],Iae={class:"position-relative"},Pae={key:"pingPlaceholder"},Rae=Jl(()=>g("div",{class:"pingPlaceholder bg-body-secondary rounded-3 mb-3",style:{height:"300px !important"}},null,-1)),Dae={key:1},$ae={key:"table",class:"w-100 mt-2"},Lae={class:"table table-sm rounded-3 w-100"},Oae=Jl(()=>g("thead",null,[g("tr",null,[g("th",{scope:"col"},"Hop"),g("th",{scope:"col"},"IP Address"),g("th",{scope:"col"},"Average RTT (ms)"),g("th",{scope:"col"},"Min RTT (ms)"),g("th",{scope:"col"},"Max RTT (ms)"),g("th",{scope:"col"},"Geolocation")])],-1)),Nae={key:0};function Fae(t,e,n,i,s,r){const o=Se("LocaleText"),a=Se("OSMap");return D(),V("div",_ae,[g("div",yae,[vae,g("div",bae,[g("div",null,[g("label",wae,[g("small",null,[B(o,{t:"Enter IP Address / Hostname"})])]),Ne(g("input",{disabled:this.tracing,id:"ipAddress",class:"form-control","onUpdate:modelValue":e[0]||(e[0]=l=>this.ipAddress=l),onKeyup:e[1]||(e[1]=eS(l=>this.execute(),["enter"])),type:"text"},null,40,xae),[[Ke,this.ipAddress]])]),g("button",{class:"btn btn-primary rounded-3 mt-3 position-relative",disabled:this.tracing||!this.ipAddress,onClick:e[2]||(e[2]=l=>this.execute())},[B(Rt,{name:"slide"},{default:Re(()=>[this.tracing?(D(),V("span",Tae,Mae)):(D(),V("span",Sae,[Cae,He("Trace! ")]))]),_:1})],8,Eae)]),g("div",Iae,[B(Rt,{name:"ping"},{default:Re(()=>[this.tracerouteResult?(D(),V("div",Dae,[B(a,{d:this.tracerouteResult,type:"traceroute"},null,8,["d"]),g("div",$ae,[g("table",Lae,[Oae,g("tbody",null,[(D(!0),V($e,null,Xe(this.tracerouteResult,(l,c)=>(D(),V("tr",null,[g("td",null,[g("small",null,Ee(l.hop),1)]),g("td",null,[g("small",null,Ee(l.ip),1)]),g("td",null,[g("small",null,Ee(l.avg_rtt),1)]),g("td",null,[g("small",null,Ee(l.min_rtt),1)]),g("td",null,[g("small",null,Ee(l.max_rtt),1)]),g("td",null,[l.geo.city&&l.geo.country?(D(),V("span",Nae,[g("small",null,Ee(l.geo.city)+", "+Ee(l.geo.country),1)])):ce("",!0)])]))),256))])])])])):(D(),V("div",Pae,[Rae,(D(),V($e,null,Xe(5,l=>g("div",{class:Ie(["pingPlaceholder bg-body-secondary rounded-3 mb-3",{"animate__animated animate__flash animate__slower animate__infinite":this.tracing}]),style:Mn({"animation-delay":`${l*.05}s`})},null,6)),64))]))]),_:1})])])])}const Bae=Ye(mae,[["render",Fae],["__scopeId","data-v-d80ce3c9"]]),Vae={name:"totp",components:{LocaleText:Qe},async setup(){const t=st();let e="";return await Vt("/api/Welcome_GetTotpLink",{},n=>{n.status&&(e=n.data)}),{l:e,store:t}},mounted(){this.l&&va.toCanvas(document.getElementById("qrcode"),this.l,function(t){})},data(){return{totp:"",totpInvalidMessage:"",verified:!1}},methods:{validateTotp(){}},watch:{totp(t){const e=document.querySelector("#totp");e.classList.remove("is-invalid","is-valid"),t.length===6&&(console.log(t),/[0-9]{6}/.test(t)?kt("/api/Welcome_VerifyTotpLink",{totp:t},n=>{n.status?(this.verified=!0,e.classList.add("is-valid"),this.$emit("verified")):(e.classList.add("is-invalid"),this.totpInvalidMessage="TOTP does not match.")}):(e.classList.add("is-invalid"),this.totpInvalidMessage="TOTP can only contain numbers"))}}},zae=["data-bs-theme"],Wae={class:"m-auto text-body",style:{width:"500px"}},Hae={class:"d-flex flex-column"},Yae={class:"dashboardLogo display-4"},jae={class:"mb-2"},Kae={class:"text-muted"},Uae=g("canvas",{id:"qrcode",class:"rounded-3 mb-2"},null,-1),Gae={class:"p-3 bg-body-secondary rounded-3 border mb-3"},Xae={class:"text-muted mb-0"},qae=["href"],Zae={style:{"line-break":"anywhere"}},Jae={for:"totp",class:"mb-2"},Qae={class:"text-muted"},ele={class:"form-group mb-2"},tle=["disabled"],nle={class:"invalid-feedback"},ile={class:"valid-feedback"},sle=g("hr",null,null,-1),rle={class:"d-flex gap-3 mt-5 flex-column"},ole=g("i",{class:"bi bi-chevron-right ms-auto"},null,-1),ale=g("i",{class:"bi bi-chevron-right ms-auto"},null,-1);function lle(t,e,n,i,s,r){const o=Se("LocaleText"),a=Se("RouterLink");return D(),V("div",{class:"container-fluid login-container-fluid d-flex main pt-5 overflow-scroll","data-bs-theme":this.store.Configuration.Server.dashboard_theme},[g("div",Wae,[g("div",Hae,[g("div",null,[g("h1",Yae,[B(o,{t:"Multi-Factor Authentication (MFA)"})]),g("p",jae,[g("small",Kae,[B(o,{t:"1. Please scan the following QR Code to generate TOTP with your choice of authenticator"})])]),Uae,g("div",Gae,[g("p",Xae,[g("small",null,[B(o,{t:"Or you can click the link below:"})])]),g("a",{href:this.l},[g("code",Zae,Ee(this.l),1)],8,qae)]),g("label",Jae,[g("small",Qae,[B(o,{t:"2. Enter the TOTP generated by your authenticator to verify"})])]),g("div",ele,[Ne(g("input",{class:"form-control text-center totp",id:"totp",maxlength:"6",type:"text",inputmode:"numeric",autocomplete:"one-time-code","onUpdate:modelValue":e[0]||(e[0]=l=>this.totp=l),disabled:this.verified},null,8,tle),[[Ke,this.totp]]),g("div",nle,[B(o,{t:this.totpInvalidMessage},null,8,["t"])]),g("div",ile,[B(o,{t:"TOTP verified!"})])])]),sle,g("div",rle,[this.verified?(D(),Ce(a,{key:1,to:"/",class:"btn btn-dark btn-lg d-flex btn-brand shadow align-items-center flex-grow-1 rounded-3"},{default:Re(()=>[B(o,{t:"Complete"}),ale]),_:1})):(D(),Ce(a,{key:0,to:"/",class:"btn bg-secondary-subtle text-secondary-emphasis rounded-3 flex-grow-1 btn-lg border-1 border-secondary-subtle shadow d-flex"},{default:Re(()=>[B(o,{t:"I don't need MFA"}),ole]),_:1}))])])])],8,zae)}const cle=Ye(Vae,[["render",lle]]),ule={name:"share",components:{LocaleText:Qe},async setup(){const t=iL(),e=we(!1),n=st(),i=we(""),s=we(void 0),r=we(new Blob);await Vt("/api/getDashboardTheme",{},a=>{i.value=a.data});const o=t.query.ShareID;return o===void 0||o.length===0?(s.value=void 0,e.value=!0):await Vt("/api/sharePeer/get",{ShareID:o},a=>{a.status?(s.value=a.data,r.value=new Blob([s.value.file],{type:"text/plain"})):s.value=void 0,e.value=!0}),{store:n,theme:i,peerConfiguration:s,blob:r}},mounted(){this.peerConfiguration&&va.toCanvas(document.querySelector("#qrcode"),this.peerConfiguration.file,t=>{t&&console.error(t)})},methods:{download(){const t=new Blob([this.peerConfiguration.file],{type:"text/plain"}),e=URL.createObjectURL(t),n=`${this.peerConfiguration.fileName}.conf`,i=document.createElement("a");i.href=e,i.download=n,i.click()}},computed:{getBlob(){return URL.createObjectURL(this.blob)}}},ng=t=>(bn("data-v-1b44aacd"),t=t(),wn(),t),dle=["data-bs-theme"],hle={class:"m-auto text-body",style:{width:"500px"}},fle={key:0,class:"text-center position-relative",style:{}},gle=ng(()=>g("div",{class:"animate__animated animate__fadeInUp"},[g("h1",{style:{"font-size":"20rem",filter:"blur(1rem)","animation-duration":"7s"},class:"animate__animated animate__flash animate__infinite"},[g("i",{class:"bi bi-file-binary"})])],-1)),ple={class:"position-absolute w-100 h-100 top-0 start-0 d-flex animate__animated animate__fadeInUp",style:{"animation-delay":"0.1s"}},mle={class:"m-auto"},_le={key:1,class:"d-flex align-items-center flex-column gap-3"},yle={class:"h1 dashboardLogo text-center animate__animated animate__fadeInUp"},vle=ng(()=>g("h6",null,"WGDashboard",-1)),ble={id:"qrcode",class:"rounded-3 shadow animate__animated animate__fadeInUp mb-3",ref:"qrcode"},wle={class:"text-muted animate__animated animate__fadeInUp mb-1",style:{"animation-delay":"0.2s"}},xle=ng(()=>g("samp",null,".conf",-1)),Ele=["download","href"],Sle=ng(()=>g("i",{class:"bi bi-download"},null,-1)),Cle=[Sle];function Tle(t,e,n,i,s,r){const o=Se("LocaleText");return D(),V("div",{class:"container-fluid login-container-fluid d-flex main pt-5 overflow-scroll","data-bs-theme":this.theme},[g("div",hle,[this.peerConfiguration?(D(),V("div",_le,[g("div",yle,[vle,B(o,{t:"Scan QR Code with the WireGuard App to add peer"})]),g("canvas",ble,null,512),g("p",wle,[B(o,{t:"or click the button below to download the "}),xle,B(o,{t:" file"})]),g("a",{download:this.peerConfiguration.fileName+".conf",href:r.getBlob,class:"btn btn-lg bg-primary-subtle text-primary-emphasis border-1 border-primary-subtle animate__animated animate__fadeInUp shadow-sm",style:{"animation-delay":"0.25s"}},Cle,8,Ele)])):(D(),V("div",fle,[gle,g("div",ple,[g("h3",mle,[B(o,{t:"Oh no... This link is either expired or invalid."})])])]))])],8,dle)}const kle=Ye(ule,[["render",Tle],["__scopeId","data-v-1b44aacd"]]),Ale=async()=>{let t=!1;return await Vt("/api/validateAuthentication",{},e=>{t=e.status}),t},Ju=tL({history:y$(),routes:[{name:"Index",path:"/",component:tO,meta:{requiresAuth:!0},children:[{name:"Configuration List",path:"",component:qN,meta:{title:"WireGuard Configurations"}},{name:"Settings",path:"/settings",component:lz,meta:{title:"Settings"}},{path:"/ping",name:"Ping",component:pae},{path:"/traceroute",name:"Traceroute",component:Bae},{name:"New Configuration",path:"/new_configuration",component:jW,meta:{title:"New Configuration"}},{name:"Configuration",path:"/configuration/:id",component:XW,meta:{title:"Configuration"},children:[{name:"Peers List",path:"peers",component:gte},{name:"Peers Create",path:"create",component:WT}]}]},{path:"/signin",component:fN,meta:{title:"Sign In"}},{path:"/welcome",component:Mz,meta:{requiresAuth:!0,title:"Welcome to WGDashboard"}},{path:"/2FASetup",component:cle,meta:{requiresAuth:!0,title:"Multi-Factor Authentication Setup"}},{path:"/share",component:kle,meta:{title:"Share"}}]});Ju.beforeEach(async(t,e,n)=>{const i=vi(),s=st();t.meta.title?t.params.id?document.title=t.params.id+" | WGDashboard":document.title=t.meta.title+" | WGDashboard":document.title="WGDashboard",s.ShowNavBar=!1,t.meta.requiresAuth?s.getActiveCrossServer()?(await s.getConfiguration(),!i.Configurations&&t.name!=="Configuration List"&&await i.getConfigurations(),n()):sL.getCookie("authToken")&&await Ale()?(await s.getConfiguration(),!i.Configurations&&t.name!=="Configuration List"&&await i.getConfigurations(),s.Redirect=void 0,n()):(s.Redirect=t,n("/signin"),s.newMessage("WGDashboard","Sign in session ended, please sign in again","warning")):n()});const rA=()=>{let t={"content-type":"application/json"};const n=st().getActiveCrossServer();return n&&(t["wg-dashboard-apikey"]=n.apiKey),t},oA=t=>{const n=st().getActiveCrossServer();return n?`${n.host}${t}`:`${window.location.protocol}//${(window.location.host+window.location.pathname+t).replace(/\/\//g,"/")}`},Vt=async(t,e=void 0,n=void 0)=>{const i=new URLSearchParams(e);await fetch(`${oA(t)}?${i.toString()}`,{headers:rA()}).then(s=>{const r=st();if(s.ok)return s.json();if(s.status!==200)throw s.status===401&&r.newMessage("WGDashboard","Sign in session ended, please sign in again","warning"),new Error(s.statusText)}).then(s=>n?n(s):void 0).catch(s=>{console.log(s),Ju.push({path:"/signin"})})},kt=async(t,e,n)=>{await fetch(`${oA(t)}`,{headers:rA(),method:"POST",body:JSON.stringify(e)}).then(i=>{const s=st();if(i.ok)return i.json();if(i.status!==200)throw i.status===401&&s.newMessage("WGDashboard","Sign in session ended, please sign in again","warning"),new Error(i.statusText)}).then(i=>n?n(i):void 0).catch(i=>{console.log(i),Ju.push({path:"/signin"})})},st=x_("DashboardConfigurationStore",{state:()=>({Redirect:void 0,Configuration:void 0,Messages:[],Peers:{Selecting:!1,RefreshInterval:void 0},CrossServerConfiguration:{Enable:!1,ServerList:{}},ActiveServerConfiguration:void 0,IsElectronApp:!1,ShowNavBar:!1,Locale:void 0}),actions:{initCrossServerConfiguration(){const t=localStorage.getItem("CrossServerConfiguration");localStorage.getItem("ActiveCrossServerConfiguration")!==null&&(this.ActiveServerConfiguration=localStorage.getItem("ActiveCrossServerConfiguration")),t===null?window.localStorage.setItem("CrossServerConfiguration",JSON.stringify(this.CrossServerConfiguration)):this.CrossServerConfiguration=JSON.parse(t)},syncCrossServerConfiguration(){window.localStorage.setItem("CrossServerConfiguration",JSON.stringify(this.CrossServerConfiguration))},addCrossServerConfiguration(){this.CrossServerConfiguration.ServerList[Os().toString()]={host:"",apiKey:"",active:!1}},deleteCrossServerConfiguration(t){delete this.CrossServerConfiguration.ServerList[t]},getActiveCrossServer(){const t=localStorage.getItem("ActiveCrossServerConfiguration");if(t!==null)return this.CrossServerConfiguration.ServerList[t]},setActiveCrossServer(t){this.ActiveServerConfiguration=t,localStorage.setItem("ActiveCrossServerConfiguration",t)},removeActiveCrossServer(){this.ActiveServerConfiguration=void 0,localStorage.removeItem("ActiveCrossServerConfiguration")},async getConfiguration(){await Vt("/api/getDashboardConfiguration",{},t=>{t.status&&(this.Configuration=t.data)})},async signOut(){await Vt("/api/signout",{},t=>{this.removeActiveCrossServer(),this.$router.go("/signin")})},newMessage(t,e,n){this.Messages.push({id:Os(),from:Tt(t),content:Tt(e),type:n,show:!0})},applyLocale(t){if(this.Locale===null)return t;const n=Object.keys(this.Locale).filter(i=>t.match(new RegExp("^"+i+"$","g"))!==null);return console.log(n),n.length===0||n.length>1?t:this.Locale[n[0]]}}}),s0=t=>(bn("data-v-822f113b"),t=t(),wn(),t),Mle={class:"navbar bg-dark sticky-top","data-bs-theme":"dark"},Ile={class:"container-fluid d-flex text-body align-items-center"},Ple=s0(()=>g("span",{class:"navbar-brand mb-0 h1"},"WGDashboard",-1)),Rle={key:0,class:"ms-auto text-muted"},Dle=s0(()=>g("i",{class:"bi bi-server me-2"},null,-1)),$le=s0(()=>g("i",{class:"bi bi-list"},null,-1)),Lle=[$le],Ole={__name:"App",setup(t){const e=st();e.initCrossServerConfiguration(),window.IS_WGDASHBOARD_DESKTOP&&(e.IsElectronApp=!0,e.CrossServerConfiguration.Enable=!0),fn(e.CrossServerConfiguration,()=>{e.syncCrossServerConfiguration()},{deep:!0});const n=be(()=>{if(e.ActiveServerConfiguration)return e.CrossServerConfiguration.ServerList[e.ActiveServerConfiguration]});return(i,s)=>(D(),V($e,null,[g("nav",Mle,[g("div",Ile,[Ple,n.value!==void 0?(D(),V("small",Rle,[Dle,He(Ee(n.value.host),1)])):ce("",!0),g("a",{role:"button",class:"navbarBtn text-body",onClick:s[0]||(s[0]=r=>Q(e).ShowNavBar=!Q(e).ShowNavBar),style:{"line-height":"0","font-size":"2rem"}},Lle)])]),(D(),Ce(f_,null,{default:Re(()=>[B(Q(mS),null,{default:Re(({Component:r})=>[B(Rt,{name:"app",mode:"out-in"},{default:Re(()=>[(D(),Ce(ga(r)))]),_:2},1024)]),_:1})]),_:1}))],64))}},Nle=Ye(Ole,[["__scopeId","data-v-822f113b"]]);let aA;await fetch("/api/locale").then(t=>t.json()).then(t=>aA=t.data);const r0=YD(Nle);r0.use(Ju);const lA=GD();lA.use(({store:t})=>{t.$router=sf(Ju)});r0.use(lA);const Fle=st();Fle.Locale=aA;r0.mount("#app"); diff --git a/src/static/app/src/components/map/map.vue b/src/static/app/src/components/map/map.vue deleted file mode 100644 index 025d325..0000000 --- a/src/static/app/src/components/map/map.vue +++ /dev/null @@ -1,116 +0,0 @@ - - - - - \ No newline at end of file diff --git a/src/static/app/src/components/map/osmap.vue b/src/static/app/src/components/map/osmap.vue new file mode 100644 index 0000000..d694264 --- /dev/null +++ b/src/static/app/src/components/map/osmap.vue @@ -0,0 +1,133 @@ + + + + + \ No newline at end of file diff --git a/src/static/app/src/views/ping.vue b/src/static/app/src/views/ping.vue index 1c48a7b..4da299e 100644 --- a/src/static/app/src/views/ping.vue +++ b/src/static/app/src/views/ping.vue @@ -2,11 +2,11 @@ import {fetchGet} from "@/utilities/fetch.js"; import {DashboardConfigurationStore} from "@/stores/DashboardConfigurationStore.js"; import LocaleText from "@/components/text/localeText.vue"; -import Map from "@/components/map/map.vue"; +import OSMap from "@/components/map/osmap.vue"; export default { name: "ping", - components: {Map, LocaleText}, + components: {OSMap, LocaleText}, data(){ return { loading: false, @@ -177,7 +177,7 @@ export default {
- +
diff --git a/src/static/app/src/views/traceroute.vue b/src/static/app/src/views/traceroute.vue index ca95de0..017d30a 100644 --- a/src/static/app/src/views/traceroute.vue +++ b/src/static/app/src/views/traceroute.vue @@ -1,11 +1,12 @@