diff --git a/src/dashboard.py b/src/dashboard.py index 0b640c0..a815452 100644 --- a/src/dashboard.py +++ b/src/dashboard.py @@ -697,7 +697,7 @@ class WireguardConfiguration: with open(f"{uid}", "w+") as f: f.write(p['preshared_key']) - subprocess.check_output(f"wg set {self.Name} peer {p['id']} allowed-ips {p['allowed_ip']}{f' preshared-key {uid}' if presharedKeyExist else ''}", + subprocess.check_output(f"wg set {self.Name} peer {p['id']} allowed-ips {p['allowed_ip'].replace(' ', '')}{f' preshared-key {uid}' if presharedKeyExist else ''}", shell=True, stderr=subprocess.STDOUT) if presharedKeyExist: os.remove(str(uid)) else: diff --git a/src/static/app/dist/assets/index.css b/src/static/app/dist/assets/index.css index 4d0c72a..928e5f8 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}#app{width:100%;height:100vh}@supports (height: 100dvh){#app{height:100dvh}}@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 .2s cubic-bezier(.82,.58,.17,.9)}.fade2-enter-from{transform:translateY(30px);filter:blur(3px);opacity:0}.fade2-leave-to{transform:translateY(-30px);filter:blur(3px);opacity:0}.login-container-fluid{height:calc(100% - 50px)}@media screen and (min-width: 576px){.login-container-fluid{height:100%}}.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}@property --bgdegree{syntax: ""; initial-value: 234deg; inherits: false;}.login-container-fluid{background:linear-gradient(var(--bgdegree),#009fff1a var(--distance2),#ff4b001a 100%);animation:login 8s ease-in-out infinite}.login-container-fluid[data-bs-theme=dark]{background:linear-gradient(var(--bgdegree),#003555 var(--distance2),#521800 100%);animation:login 8s ease-in-out infinite}@keyframes login{0%{--bgdegree: 234deg}to{--bgdegree: 594deg}}.loadingBar{background:linear-gradient(var(--degree),var(--brandColor1) var(--distance2),var(--brandColor2) 100%)}.loadingBar.loading{animation:loading cubic-bezier(.82,.58,.17,1) .2s forwards}.loadingBar.loadingDone{animation:loadingDone cubic-bezier(.82,.58,.17,1) .5s forwards}@keyframes loading{0%{opacity:0;width:0%}to{opacity:1;width:20%}}@keyframes loadingDone{0%{opacity:1;width:20%}to{opacity:0;width:100%}}@media screen and (max-width: 576px){.dashboardModal{width:100%!important}.dashboardModal>.card{margin:.5rem!important}}samp{word-wrap:anywhere}/*! +@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}#app{width:100%;height:100vh}@supports (height: 100dvh){#app{height:100dvh}}@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 .3s cubic-bezier(.82,.58,.17,1.3)}.fade2-enter-from{transform:translateY(-30px);opacity:0}.fade2-leave-to{transform:translateY(30px);filter:blur(3px);opacity:0}.login-container-fluid{height:calc(100% - 50px)}@media screen and (min-width: 576px){.login-container-fluid{height:100%}}.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}@property --bgdegree{syntax: ""; initial-value: 234deg; inherits: false;}.login-container-fluid{background:linear-gradient(var(--bgdegree),#009fff1a var(--distance2),#ff4b001a 100%);animation:login 8s ease-in-out infinite}.login-container-fluid[data-bs-theme=dark]{background:linear-gradient(var(--bgdegree),#003555 var(--distance2),#521800 100%);animation:login 8s ease-in-out infinite}@keyframes login{0%{--bgdegree: 234deg}to{--bgdegree: 594deg}}.loadingBar{background:linear-gradient(var(--degree),var(--brandColor1) var(--distance2),var(--brandColor2) 100%)}.loadingBar.loading{animation:loading cubic-bezier(.82,.58,.17,1) .2s forwards}.loadingBar.loadingDone{animation:loadingDone cubic-bezier(.82,.58,.17,1) .5s forwards}@keyframes loading{0%{opacity:0;width:0%}to{opacity:1;width:20%}}@keyframes loadingDone{0%{opacity:1;width:20%}to{opacity:0;width:100%}}@media screen and (max-width: 576px){.dashboardModal{width:100%!important}.dashboardModal>.card{margin:.5rem!important}}samp{word-wrap:anywhere}/*! * Bootstrap v5.3.3 (https://getbootstrap.com/) * Copyright 2011-2024 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-34ee3204]{right:1rem;min-width:200px}.dropdown-item.disabled[data-v-34ee3204],.dropdown-item[data-v-34ee3204]:disabled{opacity:.7}.slide-fade-leave-active[data-v-f14909a4],.slide-fade-enter-active[data-v-f14909a4]{transition:all .2s cubic-bezier(.82,.58,.17,.9)}.slide-fade-enter-from[data-v-f14909a4],.slide-fade-leave-to[data-v-f14909a4]{transform:translateY(20px);opacity:0;filter:blur(3px)}.subMenuBtn.active[data-v-f14909a4]{background-color:#ffffff20}.peerCard[data-v-f14909a4]{transition:box-shadow .1s cubic-bezier(.82,.58,.17,.9)}.peerCard[data-v-f14909a4]: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{&.active[data-v-a57c6624]{//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-6d6cffc9]{width:100%;height:40px}.ping-leave-active[data-v-6d6cffc9]{position:absolute}table th[data-v-6d6cffc9],table td[data-v-6d6cffc9]{padding:.5rem}.table[data-v-6d6cffc9]>:not(caption)>*>*{background-color:transparent!important}.ping-move[data-v-6d6cffc9],.ping-enter-active[data-v-6d6cffc9],.ping-leave-active[data-v-6d6cffc9]{transition:all .4s cubic-bezier(.82,.58,.17,.9)}.ping-leave-active[data-v-6d6cffc9]{position:absolute;width:100%}.ping-enter-from[data-v-6d6cffc9],.ping-leave-to[data-v-6d6cffc9]{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-95a5c797],.app-leave-active[data-v-95a5c797]{transition:all .3s cubic-bezier(.82,.58,.17,.9)}.app-enter-from[data-v-95a5c797]{transform:translateY(20px);opacity:0}.app-leave-to[data-v-95a5c797]{transform:translateY(-20px);opacity:0}@media screen and (min-width: 768px){.navbar[data-v-95a5c797]{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-3fa1c090]{right:1rem;min-width:200px}.dropdown-item.disabled[data-v-3fa1c090],.dropdown-item[data-v-3fa1c090]:disabled{opacity:.7}.confirmDelete[data-v-3fa1c090]{padding:var(--bs-dropdown-item-padding-y) var(--bs-dropdown-item-padding-x)}.slide-fade-leave-active[data-v-116e739e],.slide-fade-enter-active[data-v-116e739e]{transition:all .2s cubic-bezier(.82,.58,.17,1.3)}.slide-fade-enter-from[data-v-116e739e],.slide-fade-leave-to[data-v-116e739e]{transform:translateY(20px);opacity:0;filter:blur(3px)}.subMenuBtn.active[data-v-116e739e]{background-color:#ffffff20}.peerCard[data-v-116e739e]{transition:box-shadow .1s cubic-bezier(.82,.58,.17,.9)}.peerCard[data-v-116e739e]: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{&.active[data-v-a57c6624]{//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-6d6cffc9]{width:100%;height:40px}.ping-leave-active[data-v-6d6cffc9]{position:absolute}table th[data-v-6d6cffc9],table td[data-v-6d6cffc9]{padding:.5rem}.table[data-v-6d6cffc9]>:not(caption)>*>*{background-color:transparent!important}.ping-move[data-v-6d6cffc9],.ping-enter-active[data-v-6d6cffc9],.ping-leave-active[data-v-6d6cffc9]{transition:all .4s cubic-bezier(.82,.58,.17,.9)}.ping-leave-active[data-v-6d6cffc9]{position:absolute;width:100%}.ping-enter-from[data-v-6d6cffc9],.ping-leave-to[data-v-6d6cffc9]{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-95a5c797],.app-leave-active[data-v-95a5c797]{transition:all .3s cubic-bezier(.82,.58,.17,.9)}.app-enter-from[data-v-95a5c797]{transform:translateY(20px);opacity:0}.app-leave-to[data-v-95a5c797]{transform:translateY(-20px);opacity:0}@media screen and (min-width: 768px){.navbar[data-v-95a5c797]{display:none}} diff --git a/src/static/app/dist/assets/index.js b/src/static/app/dist/assets/index.js index 5def0bf..7bef6da 100644 --- a/src/static/app/dist/assets/index.js +++ b/src/static/app/dist/assets/index.js @@ -1,32 +1,32 @@ -(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const s of document.querySelectorAll('link[rel="modulepreload"]'))i(s);new MutationObserver(s=>{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 Xw=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function kI(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function MI(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 PI={exports:{}},si="top",Mi="bottom",Pi="right",ri="left",qh="auto",jl=[si,Mi,Pi,ri],ra="start",fl="end",qw="clippingParents",Nm="viewport",Ka="popper",Zw="reference",Mp=jl.reduce(function(t,e){return t.concat([e+"-"+ra,e+"-"+fl])},[]),Fm=[].concat(jl,[qh]).reduce(function(t,e){return t.concat([e,e+"-"+ra,e+"-"+fl])},[]),Jw="beforeRead",Qw="read",ex="afterRead",tx="beforeMain",nx="main",ix="afterMain",sx="beforeWrite",rx="write",ox="afterWrite",ax=[Jw,Qw,ex,tx,nx,ix,sx,rx,ox];function Ns(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 Wi(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 II(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];!Wi(r)||!Ns(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 DI(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},{});!Wi(s)||!Ns(s)||(Object.assign(s.style,a),Object.keys(r).forEach(function(l){s.removeAttribute(l)}))})}}const Vm={name:"applyStyles",enabled:!0,phase:"write",fn:II,effect:DI,requires:["computeStyles"]};function Rs(t){return t.split("-")[0]}var Jo=Math.max,dh=Math.min,gl=Math.round;function Pp(){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 lx(){return!/^((?!chrome|android).)*safari/i.test(Pp())}function pl(t,e,n){e===void 0&&(e=!1),n===void 0&&(n=!1);var i=t.getBoundingClientRect(),s=1,r=1;e&&Wi(t)&&(s=t.offsetWidth>0&&gl(i.width)/t.offsetWidth||1,r=t.offsetHeight>0&&gl(i.height)/t.offsetHeight||1);var o=oa(t)?Ii(t):window,a=o.visualViewport,l=!lx()&&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=pl(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 cx(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 _r(t){return Ii(t).getComputedStyle(t)}function RI(t){return["table","td","th"].indexOf(Ns(t))>=0}function fo(t){return((oa(t)?t.ownerDocument:t.document)||window.document).documentElement}function Zh(t){return Ns(t)==="html"?t:t.assignedSlot||t.parentNode||(Bm(t)?t.host:null)||fo(t)}function Rv(t){return!Wi(t)||_r(t).position==="fixed"?null:t.offsetParent}function LI(t){var e=/firefox/i.test(Pp()),n=/Trident/i.test(Pp());if(n&&Wi(t)){var i=_r(t);if(i.position==="fixed")return null}var s=Zh(t);for(Bm(s)&&(s=s.host);Wi(s)&&["html","body"].indexOf(Ns(s))<0;){var r=_r(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 Lu(t){for(var e=Ii(t),n=Rv(t);n&&RI(n)&&_r(n).position==="static";)n=Rv(n);return n&&(Ns(n)==="html"||Ns(n)==="body"&&_r(n).position==="static")?e:n||LI(t)||e}function Wm(t){return["top","bottom"].indexOf(t)>=0?"x":"y"}function Rc(t,e,n){return Jo(t,dh(e,n))}function OI(t,e,n){var i=Rc(t,e,n);return i>n?n:i}function ux(){return{top:0,right:0,bottom:0,left:0}}function dx(t){return Object.assign({},ux(),t)}function hx(t,e){return e.reduce(function(n,i){return n[i]=t,n},{})}var $I=function(e,n){return e=typeof e=="function"?e(Object.assign({},n.rects,{placement:n.placement})):e,dx(typeof e!="number"?e:hx(e,jl))};function NI(t){var e,n=t.state,i=t.name,s=t.options,r=n.elements.arrow,o=n.modifiersData.popperOffsets,a=Rs(n.placement),l=Wm(a),c=[ri,Pi].indexOf(a)>=0,u=c?"height":"width";if(!(!r||!o)){var d=$I(s.padding,n),h=zm(r),f=l==="y"?si:ri,p=l==="y"?Mi:Pi,m=n.rects.reference[u]+n.rects.reference[l]-o[l]-n.rects.popper[u],y=o[l]-n.rects.reference[l],v=Lu(r),b=v?l==="y"?v.clientHeight||0:v.clientWidth||0:0,x=m/2-y/2,E=d[f],w=b-h[u]-d[p],S=b/2-h[u]/2+x,T=Rc(E,S,w),A=l;n.modifiersData[i]=(e={},e[A]=T,e.centerOffset=T-S,e)}}function FI(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)||cx(e.elements.popper,s)&&(e.elements.arrow=s))}const fx={name:"arrow",enabled:!0,phase:"main",fn:NI,effect:FI,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function ml(t){return t.split("-")[1]}var BI={top:"auto",right:"auto",bottom:"auto",left:"auto"};function VI(t,e){var n=t.x,i=t.y,s=e.devicePixelRatio||1;return{x:gl(n*s)/s||0,y:gl(i*s)/s||0}}function Lv(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"),x=ri,E=si,w=window;if(c){var S=Lu(n),T="clientHeight",A="clientWidth";if(S===Ii(n)&&(S=fo(n),_r(S).position!=="static"&&a==="absolute"&&(T="scrollHeight",A="scrollWidth")),S=S,s===si||(s===ri||s===Pi)&&r===fl){E=Mi;var k=d&&S===w&&w.visualViewport?w.visualViewport.height:S[T];m-=k-i.height,m*=l?1:-1}if(s===ri||(s===si||s===Mi)&&r===fl){x=Pi;var P=d&&S===w&&w.visualViewport?w.visualViewport.width:S[A];f-=P-i.width,f*=l?1:-1}}var B=Object.assign({position:a},c&&BI),Y=u===!0?VI({x:f,y:m},Ii(n)):{x:f,y:m};if(f=Y.x,m=Y.y,l){var ne;return Object.assign({},B,(ne={},ne[E]=b?"0":"",ne[x]=v?"0":"",ne.transform=(w.devicePixelRatio||1)<=1?"translate("+f+"px, "+m+"px)":"translate3d("+f+"px, "+m+"px, 0)",ne))}return Object.assign({},B,(e={},e[E]=b?m+"px":"",e[x]=v?f+"px":"",e.transform="",e))}function zI(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:Rs(e.placement),variation:ml(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,Lv(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,Lv(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 Ym={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:zI,data:{}};var fd={passive:!0};function WI(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,fd)}),a&&l.addEventListener("resize",n.update,fd),function(){r&&c.forEach(function(u){u.removeEventListener("scroll",n.update,fd)}),a&&l.removeEventListener("resize",n.update,fd)}}const Hm={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:WI,data:{}};var YI={left:"right",right:"left",bottom:"top",top:"bottom"};function Qd(t){return t.replace(/left|right|bottom|top/g,function(e){return YI[e]})}var HI={start:"end",end:"start"};function Ov(t){return t.replace(/start|end/g,function(e){return HI[e]})}function jm(t){var e=Ii(t),n=e.pageXOffset,i=e.pageYOffset;return{scrollLeft:n,scrollTop:i}}function Km(t){return pl(fo(t)).left+jm(t).scrollLeft}function jI(t,e){var n=Ii(t),i=fo(t),s=n.visualViewport,r=i.clientWidth,o=i.clientHeight,a=0,l=0;if(s){r=s.width,o=s.height;var c=lx();(c||!c&&e==="fixed")&&(a=s.offsetLeft,l=s.offsetTop)}return{width:r,height:o,x:a+Km(t),y:l}}function KI(t){var e,n=fo(t),i=jm(t),s=(e=t.ownerDocument)==null?void 0:e.body,r=Jo(n.scrollWidth,n.clientWidth,s?s.scrollWidth:0,s?s.clientWidth:0),o=Jo(n.scrollHeight,n.clientHeight,s?s.scrollHeight:0,s?s.clientHeight:0),a=-i.scrollLeft+Km(t),l=-i.scrollTop;return _r(s||n).direction==="rtl"&&(a+=Jo(n.clientWidth,s?s.clientWidth:0)-r),{width:r,height:o,x:a,y:l}}function Um(t){var e=_r(t),n=e.overflow,i=e.overflowX,s=e.overflowY;return/auto|scroll|overlay|hidden/.test(n+s+i)}function gx(t){return["html","body","#document"].indexOf(Ns(t))>=0?t.ownerDocument.body:Wi(t)&&Um(t)?t:gx(Zh(t))}function Lc(t,e){var n;e===void 0&&(e=[]);var i=gx(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(Lc(Zh(o)))}function Ip(t){return Object.assign({},t,{left:t.x,top:t.y,right:t.x+t.width,bottom:t.y+t.height})}function UI(t,e){var n=pl(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 $v(t,e,n){return e===Nm?Ip(jI(t,n)):oa(e)?UI(e,n):Ip(KI(fo(t)))}function GI(t){var e=Lc(Zh(t)),n=["absolute","fixed"].indexOf(_r(t).position)>=0,i=n&&Wi(t)?Lu(t):t;return oa(i)?e.filter(function(s){return oa(s)&&cx(s,i)&&Ns(s)!=="body"}):[]}function XI(t,e,n,i){var s=e==="clippingParents"?GI(t):[].concat(e),r=[].concat(s,[n]),o=r[0],a=r.reduce(function(l,c){var u=$v(t,c,i);return l.top=Jo(u.top,l.top),l.right=dh(u.right,l.right),l.bottom=dh(u.bottom,l.bottom),l.left=Jo(u.left,l.left),l},$v(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 px(t){var e=t.reference,n=t.element,i=t.placement,s=i?Rs(i):null,r=i?ml(i):null,o=e.x+e.width/2-n.width/2,a=e.y+e.height/2-n.height/2,l;switch(s){case si:l={x:o,y:e.y-n.height};break;case Mi:l={x:o,y:e.y+e.height};break;case Pi:l={x:e.x+e.width,y:a};break;case ri: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 fl:l[c]=l[c]+(e[u]/2-n[u]/2);break}}return l}function _l(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?qw:a,c=n.rootBoundary,u=c===void 0?Nm:c,d=n.elementContext,h=d===void 0?Ka:d,f=n.altBoundary,p=f===void 0?!1:f,m=n.padding,y=m===void 0?0:m,v=dx(typeof y!="number"?y:hx(y,jl)),b=h===Ka?Zw:Ka,x=t.rects.popper,E=t.elements[p?b:h],w=XI(oa(E)?E:E.contextElement||fo(t.elements.popper),l,u,o),S=pl(t.elements.reference),T=px({reference:S,element:x,strategy:"absolute",placement:s}),A=Ip(Object.assign({},x,T)),k=h===Ka?A:S,P={top:w.top-k.top+v.top,bottom:k.bottom-w.bottom+v.bottom,left:w.left-k.left+v.left,right:k.right-w.right+v.right},B=t.modifiersData.offset;if(h===Ka&&B){var Y=B[s];Object.keys(P).forEach(function(ne){var $=[Pi,Mi].indexOf(ne)>=0?1:-1,F=[si,Mi].indexOf(ne)>=0?"y":"x";P[ne]+=Y[F]*$})}return P}function qI(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=ml(i),d=u?a?Mp:Mp.filter(function(p){return ml(p)===u}):jl,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]=_l(t,{placement:m,boundary:s,rootBoundary:r,padding:o})[Rs(m)],p},{});return Object.keys(f).sort(function(p,m){return f[p]-f[m]})}function ZI(t){if(Rs(t)===qh)return[];var e=Qd(t);return[Ov(t),e,Ov(e)]}function JI(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=Rs(y),b=v===y,x=l||(b||!p?[Qd(y)]:ZI(y)),E=[y].concat(x).reduce(function(I,ee){return I.concat(Rs(ee)===qh?qI(e,{placement:ee,boundary:u,rootBoundary:d,padding:c,flipVariations:p,allowedAutoPlacements:m}):ee)},[]),w=e.rects.reference,S=e.rects.popper,T=new Map,A=!0,k=E[0],P=0;P=0,F=$?"width":"height",D=_l(e,{placement:B,boundary:u,rootBoundary:d,altBoundary:h,padding:c}),z=$?ne?Pi:ri:ne?Mi:si;w[F]>S[F]&&(z=Qd(z));var X=Qd(z),Z=[];if(r&&Z.push(D[Y]<=0),a&&Z.push(D[z]<=0,D[X]<=0),Z.every(function(I){return I})){k=B,A=!1;break}T.set(B,Z)}if(A)for(var H=p?3:1,le=function(ee){var ue=E.find(function(L){var ae=T.get(L);if(ae)return ae.slice(0,ee).every(function(de){return de})});if(ue)return k=ue,"break"},ie=H;ie>0;ie--){var te=le(ie);if(te==="break")break}e.placement!==k&&(e.modifiersData[i]._skip=!0,e.placement=k,e.reset=!0)}}const mx={name:"flip",enabled:!0,phase:"main",fn:JI,requiresIfExists:["offset"],data:{_skip:!1}};function Nv(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 Fv(t){return[si,Pi,Mi,ri].some(function(e){return t[e]>=0})}function QI(t){var e=t.state,n=t.name,i=e.rects.reference,s=e.rects.popper,r=e.modifiersData.preventOverflow,o=_l(e,{elementContext:"reference"}),a=_l(e,{altBoundary:!0}),l=Nv(o,i),c=Nv(a,s,r),u=Fv(l),d=Fv(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 _x={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:QI};function e2(t,e,n){var i=Rs(t),s=[ri,si].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,[ri,Pi].indexOf(i)>=0?{x:a,y:o}:{x:o,y:a}}function t2(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]=e2(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 yx={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:t2};function n2(t){var e=t.state,n=t.name;e.modifiersData[n]=px({reference:e.rects.reference,element:e.rects.popper,strategy:"absolute",placement:e.placement})}const Gm={name:"popperOffsets",enabled:!0,phase:"read",fn:n2,data:{}};function i2(t){return t==="x"?"y":"x"}function s2(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=_l(e,{boundary:l,rootBoundary:c,padding:d,altBoundary:u}),v=Rs(e.placement),b=ml(e.placement),x=!b,E=Wm(v),w=i2(E),S=e.modifiersData.popperOffsets,T=e.rects.reference,A=e.rects.popper,k=typeof m=="function"?m(Object.assign({},e.rects,{placement:e.placement})):m,P=typeof k=="number"?{mainAxis:k,altAxis:k}:Object.assign({mainAxis:0,altAxis:0},k),B=e.modifiersData.offset?e.modifiersData.offset[e.placement]:null,Y={x:0,y:0};if(S){if(r){var ne,$=E==="y"?si:ri,F=E==="y"?Mi:Pi,D=E==="y"?"height":"width",z=S[E],X=z+y[$],Z=z-y[F],H=f?-A[D]/2:0,le=b===ra?T[D]:A[D],ie=b===ra?-A[D]:-T[D],te=e.elements.arrow,I=f&&te?zm(te):{width:0,height:0},ee=e.modifiersData["arrow#persistent"]?e.modifiersData["arrow#persistent"].padding:ux(),ue=ee[$],L=ee[F],ae=Rc(0,T[D],I[D]),de=x?T[D]/2-H-ae-ue-P.mainAxis:le-ae-ue-P.mainAxis,ve=x?-T[D]/2+H+ae+L+P.mainAxis:ie+ae+L+P.mainAxis,W=e.elements.arrow&&Lu(e.elements.arrow),fe=W?E==="y"?W.clientTop||0:W.clientLeft||0:0,C=(ne=B?.[E])!=null?ne:0,O=z+de-C-fe,K=z+ve-C,U=Rc(f?dh(X,O):X,z,f?Jo(Z,K):Z);S[E]=U,Y[E]=U-z}if(a){var re,j=E==="x"?si:ri,se=E==="x"?Mi:Pi,Q=S[w],ge=w==="y"?"height":"width",_e=Q+y[j],ye=Q-y[se],ke=[si,ri].indexOf(v)!==-1,Me=(re=B?.[w])!=null?re:0,Be=ke?_e:Q-T[ge]-A[ge]-Me+P.altAxis,ze=ke?Q+T[ge]+A[ge]-Me-P.altAxis:ye,nt=f&&ke?OI(Be,Q,ze):Rc(f?Be:_e,Q,f?ze:ye);S[w]=nt,Y[w]=nt-Q}e.modifiersData[i]=Y}}const vx={name:"preventOverflow",enabled:!0,phase:"main",fn:s2,requiresIfExists:["offset"]};function r2(t){return{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}}function o2(t){return t===Ii(t)||!Wi(t)?jm(t):r2(t)}function a2(t){var e=t.getBoundingClientRect(),n=gl(e.width)/t.offsetWidth||1,i=gl(e.height)/t.offsetHeight||1;return n!==1||i!==1}function l2(t,e,n){n===void 0&&(n=!1);var i=Wi(e),s=Wi(e)&&a2(e),r=fo(e),o=pl(t,s,n),a={scrollLeft:0,scrollTop:0},l={x:0,y:0};return(i||!i&&!n)&&((Ns(e)!=="body"||Um(r))&&(a=o2(e)),Wi(e)?(l=pl(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 c2(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 u2(t){var e=c2(t);return ax.reduce(function(n,i){return n.concat(e.filter(function(s){return s.phase===i}))},[])}function d2(t){var e;return function(){return e||(e=new Promise(function(n){Promise.resolve().then(function(){e=void 0,n(t())})})),e}}function h2(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 Bv={placement:"bottom",modifiers:[],strategy:"absolute"};function Vv(){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 Xw=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function k2(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function M2(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 P2={exports:{}},si="top",Mi="bottom",Pi="right",ri="left",qh="auto",jl=[si,Mi,Pi,ri],ra="start",fl="end",qw="clippingParents",Nm="viewport",Ka="popper",Zw="reference",Mp=jl.reduce(function(t,e){return t.concat([e+"-"+ra,e+"-"+fl])},[]),Fm=[].concat(jl,[qh]).reduce(function(t,e){return t.concat([e,e+"-"+ra,e+"-"+fl])},[]),Jw="beforeRead",Qw="read",ex="afterRead",tx="beforeMain",nx="main",ix="afterMain",sx="beforeWrite",rx="write",ox="afterWrite",ax=[Jw,Qw,ex,tx,nx,ix,sx,rx,ox];function Ns(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 Wi(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 I2(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];!Wi(r)||!Ns(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 D2(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},{});!Wi(s)||!Ns(s)||(Object.assign(s.style,a),Object.keys(r).forEach(function(l){s.removeAttribute(l)}))})}}const Vm={name:"applyStyles",enabled:!0,phase:"write",fn:I2,effect:D2,requires:["computeStyles"]};function Rs(t){return t.split("-")[0]}var Jo=Math.max,dh=Math.min,gl=Math.round;function Pp(){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 lx(){return!/^((?!chrome|android).)*safari/i.test(Pp())}function pl(t,e,n){e===void 0&&(e=!1),n===void 0&&(n=!1);var i=t.getBoundingClientRect(),s=1,r=1;e&&Wi(t)&&(s=t.offsetWidth>0&&gl(i.width)/t.offsetWidth||1,r=t.offsetHeight>0&&gl(i.height)/t.offsetHeight||1);var o=oa(t)?Ii(t):window,a=o.visualViewport,l=!lx()&&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=pl(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 cx(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 _r(t){return Ii(t).getComputedStyle(t)}function R2(t){return["table","td","th"].indexOf(Ns(t))>=0}function fo(t){return((oa(t)?t.ownerDocument:t.document)||window.document).documentElement}function Zh(t){return Ns(t)==="html"?t:t.assignedSlot||t.parentNode||(Bm(t)?t.host:null)||fo(t)}function Rv(t){return!Wi(t)||_r(t).position==="fixed"?null:t.offsetParent}function L2(t){var e=/firefox/i.test(Pp()),n=/Trident/i.test(Pp());if(n&&Wi(t)){var i=_r(t);if(i.position==="fixed")return null}var s=Zh(t);for(Bm(s)&&(s=s.host);Wi(s)&&["html","body"].indexOf(Ns(s))<0;){var r=_r(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 Lu(t){for(var e=Ii(t),n=Rv(t);n&&R2(n)&&_r(n).position==="static";)n=Rv(n);return n&&(Ns(n)==="html"||Ns(n)==="body"&&_r(n).position==="static")?e:n||L2(t)||e}function Wm(t){return["top","bottom"].indexOf(t)>=0?"x":"y"}function Rc(t,e,n){return Jo(t,dh(e,n))}function O2(t,e,n){var i=Rc(t,e,n);return i>n?n:i}function ux(){return{top:0,right:0,bottom:0,left:0}}function dx(t){return Object.assign({},ux(),t)}function hx(t,e){return e.reduce(function(n,i){return n[i]=t,n},{})}var $2=function(e,n){return e=typeof e=="function"?e(Object.assign({},n.rects,{placement:n.placement})):e,dx(typeof e!="number"?e:hx(e,jl))};function N2(t){var e,n=t.state,i=t.name,s=t.options,r=n.elements.arrow,o=n.modifiersData.popperOffsets,a=Rs(n.placement),l=Wm(a),c=[ri,Pi].indexOf(a)>=0,u=c?"height":"width";if(!(!r||!o)){var d=$2(s.padding,n),h=zm(r),g=l==="y"?si:ri,p=l==="y"?Mi:Pi,m=n.rects.reference[u]+n.rects.reference[l]-o[l]-n.rects.popper[u],y=o[l]-n.rects.reference[l],v=Lu(r),b=v?l==="y"?v.clientHeight||0:v.clientWidth||0:0,x=m/2-y/2,E=d[g],w=b-h[u]-d[p],S=b/2-h[u]/2+x,T=Rc(E,S,w),A=l;n.modifiersData[i]=(e={},e[A]=T,e.centerOffset=T-S,e)}}function F2(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)||cx(e.elements.popper,s)&&(e.elements.arrow=s))}const fx={name:"arrow",enabled:!0,phase:"main",fn:N2,effect:F2,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function ml(t){return t.split("-")[1]}var B2={top:"auto",right:"auto",bottom:"auto",left:"auto"};function V2(t,e){var n=t.x,i=t.y,s=e.devicePixelRatio||1;return{x:gl(n*s)/s||0,y:gl(i*s)/s||0}}function Lv(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,g=h===void 0?0:h,p=o.y,m=p===void 0?0:p,y=typeof u=="function"?u({x:g,y:m}):{x:g,y:m};g=y.x,m=y.y;var v=o.hasOwnProperty("x"),b=o.hasOwnProperty("y"),x=ri,E=si,w=window;if(c){var S=Lu(n),T="clientHeight",A="clientWidth";if(S===Ii(n)&&(S=fo(n),_r(S).position!=="static"&&a==="absolute"&&(T="scrollHeight",A="scrollWidth")),S=S,s===si||(s===ri||s===Pi)&&r===fl){E=Mi;var k=d&&S===w&&w.visualViewport?w.visualViewport.height:S[T];m-=k-i.height,m*=l?1:-1}if(s===ri||(s===si||s===Mi)&&r===fl){x=Pi;var P=d&&S===w&&w.visualViewport?w.visualViewport.width:S[A];g-=P-i.width,g*=l?1:-1}}var B=Object.assign({position:a},c&&B2),Y=u===!0?V2({x:g,y:m},Ii(n)):{x:g,y:m};if(g=Y.x,m=Y.y,l){var ne;return Object.assign({},B,(ne={},ne[E]=b?"0":"",ne[x]=v?"0":"",ne.transform=(w.devicePixelRatio||1)<=1?"translate("+g+"px, "+m+"px)":"translate3d("+g+"px, "+m+"px, 0)",ne))}return Object.assign({},B,(e={},e[E]=b?m+"px":"",e[x]=v?g+"px":"",e.transform="",e))}function z2(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:Rs(e.placement),variation:ml(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,Lv(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,Lv(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 Ym={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:z2,data:{}};var fd={passive:!0};function W2(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,fd)}),a&&l.addEventListener("resize",n.update,fd),function(){r&&c.forEach(function(u){u.removeEventListener("scroll",n.update,fd)}),a&&l.removeEventListener("resize",n.update,fd)}}const Hm={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:W2,data:{}};var Y2={left:"right",right:"left",bottom:"top",top:"bottom"};function Qd(t){return t.replace(/left|right|bottom|top/g,function(e){return Y2[e]})}var H2={start:"end",end:"start"};function Ov(t){return t.replace(/start|end/g,function(e){return H2[e]})}function jm(t){var e=Ii(t),n=e.pageXOffset,i=e.pageYOffset;return{scrollLeft:n,scrollTop:i}}function Km(t){return pl(fo(t)).left+jm(t).scrollLeft}function j2(t,e){var n=Ii(t),i=fo(t),s=n.visualViewport,r=i.clientWidth,o=i.clientHeight,a=0,l=0;if(s){r=s.width,o=s.height;var c=lx();(c||!c&&e==="fixed")&&(a=s.offsetLeft,l=s.offsetTop)}return{width:r,height:o,x:a+Km(t),y:l}}function K2(t){var e,n=fo(t),i=jm(t),s=(e=t.ownerDocument)==null?void 0:e.body,r=Jo(n.scrollWidth,n.clientWidth,s?s.scrollWidth:0,s?s.clientWidth:0),o=Jo(n.scrollHeight,n.clientHeight,s?s.scrollHeight:0,s?s.clientHeight:0),a=-i.scrollLeft+Km(t),l=-i.scrollTop;return _r(s||n).direction==="rtl"&&(a+=Jo(n.clientWidth,s?s.clientWidth:0)-r),{width:r,height:o,x:a,y:l}}function Um(t){var e=_r(t),n=e.overflow,i=e.overflowX,s=e.overflowY;return/auto|scroll|overlay|hidden/.test(n+s+i)}function gx(t){return["html","body","#document"].indexOf(Ns(t))>=0?t.ownerDocument.body:Wi(t)&&Um(t)?t:gx(Zh(t))}function Lc(t,e){var n;e===void 0&&(e=[]);var i=gx(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(Lc(Zh(o)))}function Ip(t){return Object.assign({},t,{left:t.x,top:t.y,right:t.x+t.width,bottom:t.y+t.height})}function U2(t,e){var n=pl(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 $v(t,e,n){return e===Nm?Ip(j2(t,n)):oa(e)?U2(e,n):Ip(K2(fo(t)))}function G2(t){var e=Lc(Zh(t)),n=["absolute","fixed"].indexOf(_r(t).position)>=0,i=n&&Wi(t)?Lu(t):t;return oa(i)?e.filter(function(s){return oa(s)&&cx(s,i)&&Ns(s)!=="body"}):[]}function X2(t,e,n,i){var s=e==="clippingParents"?G2(t):[].concat(e),r=[].concat(s,[n]),o=r[0],a=r.reduce(function(l,c){var u=$v(t,c,i);return l.top=Jo(u.top,l.top),l.right=dh(u.right,l.right),l.bottom=dh(u.bottom,l.bottom),l.left=Jo(u.left,l.left),l},$v(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 px(t){var e=t.reference,n=t.element,i=t.placement,s=i?Rs(i):null,r=i?ml(i):null,o=e.x+e.width/2-n.width/2,a=e.y+e.height/2-n.height/2,l;switch(s){case si:l={x:o,y:e.y-n.height};break;case Mi:l={x:o,y:e.y+e.height};break;case Pi:l={x:e.x+e.width,y:a};break;case ri: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 fl:l[c]=l[c]+(e[u]/2-n[u]/2);break}}return l}function _l(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?qw:a,c=n.rootBoundary,u=c===void 0?Nm:c,d=n.elementContext,h=d===void 0?Ka:d,g=n.altBoundary,p=g===void 0?!1:g,m=n.padding,y=m===void 0?0:m,v=dx(typeof y!="number"?y:hx(y,jl)),b=h===Ka?Zw:Ka,x=t.rects.popper,E=t.elements[p?b:h],w=X2(oa(E)?E:E.contextElement||fo(t.elements.popper),l,u,o),S=pl(t.elements.reference),T=px({reference:S,element:x,strategy:"absolute",placement:s}),A=Ip(Object.assign({},x,T)),k=h===Ka?A:S,P={top:w.top-k.top+v.top,bottom:k.bottom-w.bottom+v.bottom,left:w.left-k.left+v.left,right:k.right-w.right+v.right},B=t.modifiersData.offset;if(h===Ka&&B){var Y=B[s];Object.keys(P).forEach(function(ne){var $=[Pi,Mi].indexOf(ne)>=0?1:-1,F=[si,Mi].indexOf(ne)>=0?"y":"x";P[ne]+=Y[F]*$})}return P}function q2(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=ml(i),d=u?a?Mp:Mp.filter(function(p){return ml(p)===u}):jl,h=d.filter(function(p){return c.indexOf(p)>=0});h.length===0&&(h=d);var g=h.reduce(function(p,m){return p[m]=_l(t,{placement:m,boundary:s,rootBoundary:r,padding:o})[Rs(m)],p},{});return Object.keys(g).sort(function(p,m){return g[p]-g[m]})}function Z2(t){if(Rs(t)===qh)return[];var e=Qd(t);return[Ov(t),e,Ov(e)]}function J2(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,g=n.flipVariations,p=g===void 0?!0:g,m=n.allowedAutoPlacements,y=e.options.placement,v=Rs(y),b=v===y,x=l||(b||!p?[Qd(y)]:Z2(y)),E=[y].concat(x).reduce(function(I,ee){return I.concat(Rs(ee)===qh?q2(e,{placement:ee,boundary:u,rootBoundary:d,padding:c,flipVariations:p,allowedAutoPlacements:m}):ee)},[]),w=e.rects.reference,S=e.rects.popper,T=new Map,A=!0,k=E[0],P=0;P=0,F=$?"width":"height",D=_l(e,{placement:B,boundary:u,rootBoundary:d,altBoundary:h,padding:c}),z=$?ne?Pi:ri:ne?Mi:si;w[F]>S[F]&&(z=Qd(z));var X=Qd(z),Z=[];if(r&&Z.push(D[Y]<=0),a&&Z.push(D[z]<=0,D[X]<=0),Z.every(function(I){return I})){k=B,A=!1;break}T.set(B,Z)}if(A)for(var H=p?3:1,le=function(ee){var ue=E.find(function(L){var ae=T.get(L);if(ae)return ae.slice(0,ee).every(function(de){return de})});if(ue)return k=ue,"break"},ie=H;ie>0;ie--){var te=le(ie);if(te==="break")break}e.placement!==k&&(e.modifiersData[i]._skip=!0,e.placement=k,e.reset=!0)}}const mx={name:"flip",enabled:!0,phase:"main",fn:J2,requiresIfExists:["offset"],data:{_skip:!1}};function Nv(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 Fv(t){return[si,Pi,Mi,ri].some(function(e){return t[e]>=0})}function Q2(t){var e=t.state,n=t.name,i=e.rects.reference,s=e.rects.popper,r=e.modifiersData.preventOverflow,o=_l(e,{elementContext:"reference"}),a=_l(e,{altBoundary:!0}),l=Nv(o,i),c=Nv(a,s,r),u=Fv(l),d=Fv(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 _x={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:Q2};function eI(t,e,n){var i=Rs(t),s=[ri,si].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,[ri,Pi].indexOf(i)>=0?{x:a,y:o}:{x:o,y:a}}function tI(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]=eI(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 yx={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:tI};function nI(t){var e=t.state,n=t.name;e.modifiersData[n]=px({reference:e.rects.reference,element:e.rects.popper,strategy:"absolute",placement:e.placement})}const Gm={name:"popperOffsets",enabled:!0,phase:"read",fn:nI,data:{}};function iI(t){return t==="x"?"y":"x"}function sI(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,g=h===void 0?!0:h,p=n.tetherOffset,m=p===void 0?0:p,y=_l(e,{boundary:l,rootBoundary:c,padding:d,altBoundary:u}),v=Rs(e.placement),b=ml(e.placement),x=!b,E=Wm(v),w=iI(E),S=e.modifiersData.popperOffsets,T=e.rects.reference,A=e.rects.popper,k=typeof m=="function"?m(Object.assign({},e.rects,{placement:e.placement})):m,P=typeof k=="number"?{mainAxis:k,altAxis:k}:Object.assign({mainAxis:0,altAxis:0},k),B=e.modifiersData.offset?e.modifiersData.offset[e.placement]:null,Y={x:0,y:0};if(S){if(r){var ne,$=E==="y"?si:ri,F=E==="y"?Mi:Pi,D=E==="y"?"height":"width",z=S[E],X=z+y[$],Z=z-y[F],H=g?-A[D]/2:0,le=b===ra?T[D]:A[D],ie=b===ra?-A[D]:-T[D],te=e.elements.arrow,I=g&&te?zm(te):{width:0,height:0},ee=e.modifiersData["arrow#persistent"]?e.modifiersData["arrow#persistent"].padding:ux(),ue=ee[$],L=ee[F],ae=Rc(0,T[D],I[D]),de=x?T[D]/2-H-ae-ue-P.mainAxis:le-ae-ue-P.mainAxis,ve=x?-T[D]/2+H+ae+L+P.mainAxis:ie+ae+L+P.mainAxis,W=e.elements.arrow&&Lu(e.elements.arrow),fe=W?E==="y"?W.clientTop||0:W.clientLeft||0:0,C=(ne=B?.[E])!=null?ne:0,O=z+de-C-fe,K=z+ve-C,U=Rc(g?dh(X,O):X,z,g?Jo(Z,K):Z);S[E]=U,Y[E]=U-z}if(a){var re,j=E==="x"?si:ri,se=E==="x"?Mi:Pi,Q=S[w],ge=w==="y"?"height":"width",_e=Q+y[j],ye=Q-y[se],ke=[si,ri].indexOf(v)!==-1,Me=(re=B?.[w])!=null?re:0,Be=ke?_e:Q-T[ge]-A[ge]-Me+P.altAxis,ze=ke?Q+T[ge]+A[ge]-Me-P.altAxis:ye,nt=g&&ke?O2(Be,Q,ze):Rc(g?Be:_e,Q,g?ze:ye);S[w]=nt,Y[w]=nt-Q}e.modifiersData[i]=Y}}const vx={name:"preventOverflow",enabled:!0,phase:"main",fn:sI,requiresIfExists:["offset"]};function rI(t){return{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}}function oI(t){return t===Ii(t)||!Wi(t)?jm(t):rI(t)}function aI(t){var e=t.getBoundingClientRect(),n=gl(e.width)/t.offsetWidth||1,i=gl(e.height)/t.offsetHeight||1;return n!==1||i!==1}function lI(t,e,n){n===void 0&&(n=!1);var i=Wi(e),s=Wi(e)&&aI(e),r=fo(e),o=pl(t,s,n),a={scrollLeft:0,scrollTop:0},l={x:0,y:0};return(i||!i&&!n)&&((Ns(e)!=="body"||Um(r))&&(a=oI(e)),Wi(e)?(l=pl(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 cI(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 uI(t){var e=cI(t);return ax.reduce(function(n,i){return n.concat(e.filter(function(s){return s.phase===i}))},[])}function dI(t){var e;return function(){return e||(e=new Promise(function(n){Promise.resolve().then(function(){e=void 0,n(t())})})),e}}function hI(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 Bv={placement:"bottom",modifiers:[],strategy:"absolute"};function Vv(){for(var t=arguments.length,e=new Array(t),n=0;nG[M]})}}return _.default=G,Object.freeze(_)}const s=i(n),r=new Map,o={set(G,_,M){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(_,M)},get(G,_){return r.has(G)&&r.get(G).get(_)||null},remove(G,_){if(!r.has(G))return;const M=r.get(G);M.delete(_),M.size===0&&r.delete(G)}},a=1e6,l=1e3,c="transitionend",u=G=>(G&&window.CSS&&window.CSS.escape&&(G=G.replace(/#([^\s"#']+)/g,(_,M)=>`#${CSS.escape(M)}`)),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:M}=window.getComputedStyle(G);const q=Number.parseFloat(_),me=Number.parseFloat(M);return!q&&!me?0:(_=_.split(",")[0],M=M.split(",")[0],(Number.parseFloat(_)+Number.parseFloat(M))*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",M=G.closest("details:not([open])");if(!M)return _;if(M!==G){const q=G.closest("summary");if(q&&q.parentNode!==M||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",x=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?x(G.parentNode):null},E=()=>{},w=G=>{G.offsetHeight},S=()=>window.jQuery&&!document.body.hasAttribute("data-bs-no-jquery")?window.jQuery:null,T=[],A=G=>{document.readyState==="loading"?(T.length||document.addEventListener("DOMContentLoaded",()=>{for(const _ of T)_()}),T.push(G)):G()},k=()=>document.documentElement.dir==="rtl",P=G=>{A(()=>{const _=S();if(_){const M=G.NAME,q=_.fn[M];_.fn[M]=G.jQueryInterface,_.fn[M].Constructor=G,_.fn[M].noConflict=()=>(_.fn[M]=q,G.jQueryInterface)}})},B=(G,_=[],M=G)=>typeof G=="function"?G(..._):M,Y=(G,_,M=!0)=>{if(!M){B(G);return}const me=f(_)+5;let Re=!1;const Ie=({target:rt})=>{rt===_&&(Re=!0,_.removeEventListener(c,Ie),B(G))};_.addEventListener(c,Ie),setTimeout(()=>{Re||p(_)},me)},ne=(G,_,M,q)=>{const me=G.length;let Re=G.indexOf(_);return Re===-1?!M&&q?G[me-1]:G[0]:(Re+=M?1:-1,q&&(Re=(Re+me)%me),G[Math.max(0,Math.min(Re,me-1))])},$=/[^.]*(?=\..*)\.|.*/,F=/\..*/,D=/::\d+$/,z={};let X=1;const Z={mouseenter:"mouseover",mouseleave:"mouseout"},H=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 le(G,_){return _&&`${_}::${X++}`||G.uidEvent||X++}function ie(G){const _=le(G);return G.uidEvent=_,z[_]=z[_]||{},z[_]}function te(G,_){return function M(q){return fe(q,{delegateTarget:G}),M.oneOff&&W.off(G,q.type,_),_.apply(G,[q])}}function I(G,_,M){return function q(me){const Re=G.querySelectorAll(_);for(let{target:Ie}=me;Ie&&Ie!==this;Ie=Ie.parentNode)for(const rt of Re)if(rt===Ie)return fe(me,{delegateTarget:Ie}),q.oneOff&&W.off(G,me.type,_,M),M.apply(Ie,[me])}}function ee(G,_,M=null){return Object.values(G).find(q=>q.callable===_&&q.delegationSelector===M)}function ue(G,_,M){const q=typeof _=="string",me=q?M:_||M;let Re=ve(G);return H.has(Re)||(Re=G),[q,me,Re]}function L(G,_,M,q,me){if(typeof _!="string"||!G)return;let[Re,Ie,rt]=ue(_,M,q);_ in Z&&(Ie=(AI=>function(Pa){if(!Pa.relatedTarget||Pa.relatedTarget!==Pa.delegateTarget&&!Pa.delegateTarget.contains(Pa.relatedTarget))return AI.call(this,Pa)})(Ie));const ui=ie(G),$i=ui[rt]||(ui[rt]={}),Tn=ee($i,Ie,Re?M:null);if(Tn){Tn.oneOff=Tn.oneOff&&me;return}const ys=le(Ie,_.replace($,"")),Ji=Re?I(G,M,Ie):te(G,Ie);Ji.delegationSelector=Re?M:null,Ji.callable=Ie,Ji.oneOff=me,Ji.uidEvent=ys,$i[ys]=Ji,G.addEventListener(rt,Ji,Re)}function ae(G,_,M,q,me){const Re=ee(_[M],q,me);Re&&(G.removeEventListener(M,Re,!!me),delete _[M][Re.uidEvent])}function de(G,_,M,q){const me=_[M]||{};for(const[Re,Ie]of Object.entries(me))Re.includes(q)&&ae(G,_,M,Ie.callable,Ie.delegationSelector)}function ve(G){return G=G.replace(F,""),Z[G]||G}const W={on(G,_,M,q){L(G,_,M,q,!1)},one(G,_,M,q){L(G,_,M,q,!0)},off(G,_,M,q){if(typeof _!="string"||!G)return;const[me,Re,Ie]=ue(_,M,q),rt=Ie!==_,ui=ie(G),$i=ui[Ie]||{},Tn=_.startsWith(".");if(typeof Re<"u"){if(!Object.keys($i).length)return;ae(G,ui,Ie,Re,me?M:null);return}if(Tn)for(const ys of Object.keys(ui))de(G,ui,ys,_.slice(1));for(const[ys,Ji]of Object.entries($i)){const hd=ys.replace(D,"");(!rt||_.includes(hd))&&ae(G,ui,Ie,Ji.callable,Ji.delegationSelector)}},trigger(G,_,M){if(typeof _!="string"||!G)return null;const q=S(),me=ve(_),Re=_!==me;let Ie=null,rt=!0,ui=!0,$i=!1;Re&&q&&(Ie=q.Event(_,M),q(G).trigger(Ie),rt=!Ie.isPropagationStopped(),ui=!Ie.isImmediatePropagationStopped(),$i=Ie.isDefaultPrevented());const Tn=fe(new Event(_,{bubbles:rt,cancelable:!0}),M);return $i&&Tn.preventDefault(),ui&&G.dispatchEvent(Tn),Tn.defaultPrevented&&Ie&&Ie.preventDefault(),Tn}};function fe(G,_={}){for(const[M,q]of Object.entries(_))try{G[M]=q}catch{Object.defineProperty(G,M,{configurable:!0,get(){return q}})}return G}function C(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,_,M){G.setAttribute(`data-bs-${O(_)}`,M)},removeDataAttribute(G,_){G.removeAttribute(`data-bs-${O(_)}`)},getDataAttributes(G){if(!G)return{};const _={},M=Object.keys(G.dataset).filter(q=>q.startsWith("bs")&&!q.startsWith("bsConfig"));for(const q of M){let me=q.replace(/^bs/,"");me=me.charAt(0).toLowerCase()+me.slice(1,me.length),_[me]=C(G.dataset[q])}return _},getDataAttribute(G,_){return C(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(_,M){const q=m(M)?K.getDataAttribute(M,"config"):{};return{...this.constructor.Default,...typeof q=="object"?q:{},...m(M)?K.getDataAttributes(M):{},...typeof _=="object"?_:{}}}_typeCheckConfig(_,M=this.constructor.DefaultType){for(const[q,me]of Object.entries(M)){const Re=_[q],Ie=m(Re)?"element":d(Re);if(!new RegExp(me).test(Ie))throw new TypeError(`${this.constructor.NAME.toUpperCase()}: Option "${q}" provided type "${Ie}" but expected type "${me}".`)}}}const re="5.3.3";class j extends U{constructor(_,M){super(),_=y(_),_&&(this._element=_,this._config=this._getConfig(M),o.set(this._element,this.constructor.DATA_KEY,this))}dispose(){o.remove(this._element,this.constructor.DATA_KEY),W.off(this._element,this.constructor.EVENT_KEY);for(const _ of Object.getOwnPropertyNames(this))this[_]=null}_queueCallback(_,M,q=!0){Y(_,M,q)}_getConfig(_){return _=this._mergeConfigObj(_,this._element),_=this._configAfterMerge(_),this._typeCheckConfig(_),_}static getInstance(_){return o.get(y(_),this.DATA_KEY)}static getOrCreateInstance(_,M={}){return this.getInstance(_)||new this(_,typeof M=="object"?M: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 M=G.getAttribute("href");if(!M||!M.includes("#")&&!M.startsWith("."))return null;M.includes("#")&&!M.startsWith("#")&&(M=`#${M.split("#")[1]}`),_=M&&M!=="#"?M.trim():null}return _?_.split(",").map(M=>u(M)).join(","):null},Q={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(M=>M.matches(_))},parents(G,_){const M=[];let q=G.parentNode.closest(_);for(;q;)M.push(q),q=q.parentNode.closest(_);return M},prev(G,_){let M=G.previousElementSibling;for(;M;){if(M.matches(_))return[M];M=M.previousElementSibling}return[]},next(G,_){let M=G.nextElementSibling;for(;M;){if(M.matches(_))return[M];M=M.nextElementSibling}return[]},focusableChildren(G){const _=["a","button","input","textarea","select","details","[tabindex]",'[contenteditable="true"]'].map(M=>`${M}:not([tabindex^="-"])`).join(",");return this.find(_,G).filter(M=>!b(M)&&v(M))},getSelectorFromElement(G){const _=se(G);return _&&Q.findOne(_)?_:null},getElementFromSelector(G){const _=se(G);return _?Q.findOne(_):null},getMultipleElementsFromSelector(G){const _=se(G);return _?Q.find(_):[]}},ge=(G,_="hide")=>{const M=`click.dismiss${G.EVENT_KEY}`,q=G.NAME;W.on(document,M,`[data-bs-dismiss="${q}"]`,function(me){if(["A","AREA"].includes(this.tagName)&&me.preventDefault(),b(this))return;const Re=Q.getElementFromSelector(this)||this.closest(`.${q}`);G.getOrCreateInstance(Re)[_]()})},_e="alert",ke=".bs.alert",Me=`close${ke}`,Be=`closed${ke}`,ze="fade",nt="show";class Qe extends j{static get NAME(){return _e}close(){if(W.trigger(this._element,Me).defaultPrevented)return;this._element.classList.remove(nt);const M=this._element.classList.contains(ze);this._queueCallback(()=>this._destroyElement(),this._element,M)}_destroyElement(){this._element.remove(),W.trigger(this._element,Be),this.dispose()}static jQueryInterface(_){return this.each(function(){const M=Qe.getOrCreateInstance(this);if(typeof _=="string"){if(M[_]===void 0||_.startsWith("_")||_==="constructor")throw new TypeError(`No method named "${_}"`);M[_](this)}})}}ge(Qe,"close"),P(Qe);const qt="button",fn=".bs.button",Kt=".data-api",Ei="active",Xi='[data-bs-toggle="button"]',Zt=`click${fn}${Kt}`;class oe extends j{static get NAME(){return qt}toggle(){this._element.setAttribute("aria-pressed",this._element.classList.toggle(Ei))}static jQueryInterface(_){return this.each(function(){const M=oe.getOrCreateInstance(this);_==="toggle"&&M[_]()})}}W.on(document,Zt,Xi,G=>{G.preventDefault();const _=G.target.closest(Xi);oe.getOrCreateInstance(_).toggle()}),P(oe);const Te="swipe",he=".bs.swipe",Ae=`touchstart${he}`,Le=`touchmove${he}`,Ut=`touchend${he}`,gn=`pointerdown${he}`,Ri=`pointerup${he}`,Ws="touch",pn="pen",Cn="pointer-event",Sn=40,ai={endCallback:null,leftCallback:null,rightCallback:null},li={endCallback:"(function|null)",leftCallback:"(function|null)",rightCallback:"(function|null)"};class ci extends U{constructor(_,M){super(),this._element=_,!(!_||!ci.isSupported())&&(this._config=this._getConfig(M),this._deltaX=0,this._supportPointerEvents=!!window.PointerEvent,this._initEvents())}static get Default(){return ai}static get DefaultType(){return li}static get NAME(){return Te}dispose(){W.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(),B(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 M=_/this._deltaX;this._deltaX=0,M&&B(M>0?this._config.rightCallback:this._config.leftCallback)}_initEvents(){this._supportPointerEvents?(W.on(this._element,gn,_=>this._start(_)),W.on(this._element,Ri,_=>this._end(_)),this._element.classList.add(Cn)):(W.on(this._element,Ae,_=>this._start(_)),W.on(this._element,Le,_=>this._move(_)),W.on(this._element,Ut,_=>this._end(_)))}_eventIsPointerPenTouch(_){return this._supportPointerEvents&&(_.pointerType===pn||_.pointerType===Ws)}static isSupported(){return"ontouchstart"in document.documentElement||navigator.maxTouchPoints>0}}const qi="carousel",Vt=".bs.carousel",Li=".data-api",Qf="ArrowLeft",dk="ArrowRight",hk=500,ec="next",Ea="prev",Ca="left",nd="right",fk=`slide${Vt}`,eg=`slid${Vt}`,gk=`keydown${Vt}`,pk=`mouseenter${Vt}`,mk=`mouseleave${Vt}`,_k=`dragstart${Vt}`,yk=`load${Vt}${Li}`,vk=`click${Vt}${Li}`,Uy="carousel",id="active",bk="slide",wk="carousel-item-end",xk="carousel-item-start",Ek="carousel-item-next",Ck="carousel-item-prev",Gy=".active",Xy=".carousel-item",Sk=Gy+Xy,Tk=".carousel-item img",Ak=".carousel-indicators",kk="[data-bs-slide], [data-bs-slide-to]",Mk='[data-bs-ride="carousel"]',Pk={[Qf]:nd,[dk]:Ca},Ik={interval:5e3,keyboard:!0,pause:"hover",ride:!1,touch:!0,wrap:!0},Dk={interval:"(number|boolean)",keyboard:"boolean",pause:"(string|boolean)",ride:"(boolean|string)",touch:"boolean",wrap:"boolean"};class Sa extends j{constructor(_,M){super(_,M),this._interval=null,this._activeElement=null,this._isSliding=!1,this.touchTimeout=null,this._swipeHelper=null,this._indicatorsElement=Q.findOne(Ak,this._element),this._addEventListeners(),this._config.ride===Uy&&this.cycle()}static get Default(){return Ik}static get DefaultType(){return Dk}static get NAME(){return qi}next(){this._slide(ec)}nextWhenVisible(){!document.hidden&&v(this._element)&&this.next()}prev(){this._slide(Ea)}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){W.one(this._element,eg,()=>this.cycle());return}this.cycle()}}to(_){const M=this._getItems();if(_>M.length-1||_<0)return;if(this._isSliding){W.one(this._element,eg,()=>this.to(_));return}const q=this._getItemIndex(this._getActive());if(q===_)return;const me=_>q?ec:Ea;this._slide(me,M[_])}dispose(){this._swipeHelper&&this._swipeHelper.dispose(),super.dispose()}_configAfterMerge(_){return _.defaultInterval=_.interval,_}_addEventListeners(){this._config.keyboard&&W.on(this._element,gk,_=>this._keydown(_)),this._config.pause==="hover"&&(W.on(this._element,pk,()=>this.pause()),W.on(this._element,mk,()=>this._maybeEnableCycle())),this._config.touch&&ci.isSupported()&&this._addTouchEventListeners()}_addTouchEventListeners(){for(const q of Q.find(Tk,this._element))W.on(q,_k,me=>me.preventDefault());const M={leftCallback:()=>this._slide(this._directionToOrder(Ca)),rightCallback:()=>this._slide(this._directionToOrder(nd)),endCallback:()=>{this._config.pause==="hover"&&(this.pause(),this.touchTimeout&&clearTimeout(this.touchTimeout),this.touchTimeout=setTimeout(()=>this._maybeEnableCycle(),hk+this._config.interval))}};this._swipeHelper=new ci(this._element,M)}_keydown(_){if(/input|textarea/i.test(_.target.tagName))return;const M=Pk[_.key];M&&(_.preventDefault(),this._slide(this._directionToOrder(M)))}_getItemIndex(_){return this._getItems().indexOf(_)}_setActiveIndicatorElement(_){if(!this._indicatorsElement)return;const M=Q.findOne(Gy,this._indicatorsElement);M.classList.remove(id),M.removeAttribute("aria-current");const q=Q.findOne(`[data-bs-slide-to="${_}"]`,this._indicatorsElement);q&&(q.classList.add(id),q.setAttribute("aria-current","true"))}_updateInterval(){const _=this._activeElement||this._getActive();if(!_)return;const M=Number.parseInt(_.getAttribute("data-bs-interval"),10);this._config.interval=M||this._config.defaultInterval}_slide(_,M=null){if(this._isSliding)return;const q=this._getActive(),me=_===ec,Re=M||ne(this._getItems(),q,me,this._config.wrap);if(Re===q)return;const Ie=this._getItemIndex(Re),rt=hd=>W.trigger(this._element,hd,{relatedTarget:Re,direction:this._orderToDirection(_),from:this._getItemIndex(q),to:Ie});if(rt(fk).defaultPrevented||!q||!Re)return;const $i=!!this._interval;this.pause(),this._isSliding=!0,this._setActiveIndicatorElement(Ie),this._activeElement=Re;const Tn=me?xk:wk,ys=me?Ek:Ck;Re.classList.add(ys),w(Re),q.classList.add(Tn),Re.classList.add(Tn);const Ji=()=>{Re.classList.remove(Tn,ys),Re.classList.add(id),q.classList.remove(id,ys,Tn),this._isSliding=!1,rt(eg)};this._queueCallback(Ji,q,this._isAnimated()),$i&&this.cycle()}_isAnimated(){return this._element.classList.contains(bk)}_getActive(){return Q.findOne(Sk,this._element)}_getItems(){return Q.find(Xy,this._element)}_clearInterval(){this._interval&&(clearInterval(this._interval),this._interval=null)}_directionToOrder(_){return k()?_===Ca?Ea:ec:_===Ca?ec:Ea}_orderToDirection(_){return k()?_===Ea?Ca:nd:_===Ea?nd:Ca}static jQueryInterface(_){return this.each(function(){const M=Sa.getOrCreateInstance(this,_);if(typeof _=="number"){M.to(_);return}if(typeof _=="string"){if(M[_]===void 0||_.startsWith("_")||_==="constructor")throw new TypeError(`No method named "${_}"`);M[_]()}})}}W.on(document,vk,kk,function(G){const _=Q.getElementFromSelector(this);if(!_||!_.classList.contains(Uy))return;G.preventDefault();const M=Sa.getOrCreateInstance(_),q=this.getAttribute("data-bs-slide-to");if(q){M.to(q),M._maybeEnableCycle();return}if(K.getDataAttribute(this,"slide")==="next"){M.next(),M._maybeEnableCycle();return}M.prev(),M._maybeEnableCycle()}),W.on(window,yk,()=>{const G=Q.find(Mk);for(const _ of G)Sa.getOrCreateInstance(_)}),P(Sa);const Rk="collapse",tc=".bs.collapse",Lk=".data-api",Ok=`show${tc}`,$k=`shown${tc}`,Nk=`hide${tc}`,Fk=`hidden${tc}`,Bk=`click${tc}${Lk}`,tg="show",Ta="collapse",sd="collapsing",Vk="collapsed",zk=`:scope .${Ta} .${Ta}`,Wk="collapse-horizontal",Yk="width",Hk="height",jk=".collapse.show, .collapse.collapsing",ng='[data-bs-toggle="collapse"]',Kk={parent:null,toggle:!0},Uk={parent:"(null|element)",toggle:"boolean"};class Aa extends j{constructor(_,M){super(_,M),this._isTransitioning=!1,this._triggerArray=[];const q=Q.find(ng);for(const me of q){const Re=Q.getSelectorFromElement(me),Ie=Q.find(Re).filter(rt=>rt===this._element);Re!==null&&Ie.length&&this._triggerArray.push(me)}this._initializeChildren(),this._config.parent||this._addAriaAndCollapsedClass(this._triggerArray,this._isShown()),this._config.toggle&&this.toggle()}static get Default(){return Kk}static get DefaultType(){return Uk}static get NAME(){return Rk}toggle(){this._isShown()?this.hide():this.show()}show(){if(this._isTransitioning||this._isShown())return;let _=[];if(this._config.parent&&(_=this._getFirstLevelChildren(jk).filter(rt=>rt!==this._element).map(rt=>Aa.getOrCreateInstance(rt,{toggle:!1}))),_.length&&_[0]._isTransitioning||W.trigger(this._element,Ok).defaultPrevented)return;for(const rt of _)rt.hide();const q=this._getDimension();this._element.classList.remove(Ta),this._element.classList.add(sd),this._element.style[q]=0,this._addAriaAndCollapsedClass(this._triggerArray,!0),this._isTransitioning=!0;const me=()=>{this._isTransitioning=!1,this._element.classList.remove(sd),this._element.classList.add(Ta,tg),this._element.style[q]="",W.trigger(this._element,$k)},Ie=`scroll${q[0].toUpperCase()+q.slice(1)}`;this._queueCallback(me,this._element,!0),this._element.style[q]=`${this._element[Ie]}px`}hide(){if(this._isTransitioning||!this._isShown()||W.trigger(this._element,Nk).defaultPrevented)return;const M=this._getDimension();this._element.style[M]=`${this._element.getBoundingClientRect()[M]}px`,w(this._element),this._element.classList.add(sd),this._element.classList.remove(Ta,tg);for(const me of this._triggerArray){const Re=Q.getElementFromSelector(me);Re&&!this._isShown(Re)&&this._addAriaAndCollapsedClass([me],!1)}this._isTransitioning=!0;const q=()=>{this._isTransitioning=!1,this._element.classList.remove(sd),this._element.classList.add(Ta),W.trigger(this._element,Fk)};this._element.style[M]="",this._queueCallback(q,this._element,!0)}_isShown(_=this._element){return _.classList.contains(tg)}_configAfterMerge(_){return _.toggle=!!_.toggle,_.parent=y(_.parent),_}_getDimension(){return this._element.classList.contains(Wk)?Yk:Hk}_initializeChildren(){if(!this._config.parent)return;const _=this._getFirstLevelChildren(ng);for(const M of _){const q=Q.getElementFromSelector(M);q&&this._addAriaAndCollapsedClass([M],this._isShown(q))}}_getFirstLevelChildren(_){const M=Q.find(zk,this._config.parent);return Q.find(_,this._config.parent).filter(q=>!M.includes(q))}_addAriaAndCollapsedClass(_,M){if(_.length)for(const q of _)q.classList.toggle(Vk,!M),q.setAttribute("aria-expanded",M)}static jQueryInterface(_){const M={};return typeof _=="string"&&/show|hide/.test(_)&&(M.toggle=!1),this.each(function(){const q=Aa.getOrCreateInstance(this,M);if(typeof _=="string"){if(typeof q[_]>"u")throw new TypeError(`No method named "${_}"`);q[_]()}})}}W.on(document,Bk,ng,function(G){(G.target.tagName==="A"||G.delegateTarget&&G.delegateTarget.tagName==="A")&&G.preventDefault();for(const _ of Q.getMultipleElementsFromSelector(this))Aa.getOrCreateInstance(_,{toggle:!1}).toggle()}),P(Aa);const qy="dropdown",Co=".bs.dropdown",ig=".data-api",Gk="Escape",Zy="Tab",Xk="ArrowUp",Jy="ArrowDown",qk=2,Zk=`hide${Co}`,Jk=`hidden${Co}`,Qk=`show${Co}`,eM=`shown${Co}`,Qy=`click${Co}${ig}`,ev=`keydown${Co}${ig}`,tM=`keyup${Co}${ig}`,ka="show",nM="dropup",iM="dropend",sM="dropstart",rM="dropup-center",oM="dropdown-center",So='[data-bs-toggle="dropdown"]:not(.disabled):not(:disabled)',aM=`${So}.${ka}`,rd=".dropdown-menu",lM=".navbar",cM=".navbar-nav",uM=".dropdown-menu .dropdown-item:not(.disabled):not(:disabled)",dM=k()?"top-end":"top-start",hM=k()?"top-start":"top-end",fM=k()?"bottom-end":"bottom-start",gM=k()?"bottom-start":"bottom-end",pM=k()?"left-start":"right-start",mM=k()?"right-start":"left-start",_M="top",yM="bottom",vM={autoClose:!0,boundary:"clippingParents",display:"dynamic",offset:[0,2],popperConfig:null,reference:"toggle"},bM={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(_,M){super(_,M),this._popper=null,this._parent=this._element.parentNode,this._menu=Q.next(this._element,rd)[0]||Q.prev(this._element,rd)[0]||Q.findOne(rd,this._parent),this._inNavbar=this._detectNavbar()}static get Default(){return vM}static get DefaultType(){return bM}static get NAME(){return qy}toggle(){return this._isShown()?this.hide():this.show()}show(){if(b(this._element)||this._isShown())return;const _={relatedTarget:this._element};if(!W.trigger(this._element,Qk,_).defaultPrevented){if(this._createPopper(),"ontouchstart"in document.documentElement&&!this._parent.closest(cM))for(const q of[].concat(...document.body.children))W.on(q,"mouseover",E);this._element.focus(),this._element.setAttribute("aria-expanded",!0),this._menu.classList.add(ka),this._element.classList.add(ka),W.trigger(this._element,eM,_)}}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(!W.trigger(this._element,Zk,_).defaultPrevented){if("ontouchstart"in document.documentElement)for(const q of[].concat(...document.body.children))W.off(q,"mouseover",E);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"),W.trigger(this._element,Jk,_)}}_getConfig(_){if(_=super._getConfig(_),typeof _.reference=="object"&&!m(_.reference)&&typeof _.reference.getBoundingClientRect!="function")throw new TypeError(`${qy.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 M=this._getPopperConfig();this._popper=s.createPopper(_,this._menu,M)}_isShown(){return this._menu.classList.contains(ka)}_getPlacement(){const _=this._parent;if(_.classList.contains(iM))return pM;if(_.classList.contains(sM))return mM;if(_.classList.contains(rM))return _M;if(_.classList.contains(oM))return yM;const M=getComputedStyle(this._menu).getPropertyValue("--bs-position").trim()==="end";return _.classList.contains(nM)?M?hM:dM:M?gM:fM}_detectNavbar(){return this._element.closest(lM)!==null}_getOffset(){const{offset:_}=this._config;return typeof _=="string"?_.split(",").map(M=>Number.parseInt(M,10)):typeof _=="function"?M=>_(M,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}]),{..._,...B(this._config.popperConfig,[_])}}_selectMenuItem({key:_,target:M}){const q=Q.find(uM,this._menu).filter(me=>v(me));q.length&&ne(q,M,_===Jy,!q.includes(M)).focus()}static jQueryInterface(_){return this.each(function(){const M=Zi.getOrCreateInstance(this,_);if(typeof _=="string"){if(typeof M[_]>"u")throw new TypeError(`No method named "${_}"`);M[_]()}})}static clearMenus(_){if(_.button===qk||_.type==="keyup"&&_.key!==Zy)return;const M=Q.find(aM);for(const q of M){const me=Zi.getInstance(q);if(!me||me._config.autoClose===!1)continue;const Re=_.composedPath(),Ie=Re.includes(me._menu);if(Re.includes(me._element)||me._config.autoClose==="inside"&&!Ie||me._config.autoClose==="outside"&&Ie||me._menu.contains(_.target)&&(_.type==="keyup"&&_.key===Zy||/input|select|option|textarea|form/i.test(_.target.tagName)))continue;const rt={relatedTarget:me._element};_.type==="click"&&(rt.clickEvent=_),me._completeHide(rt)}}static dataApiKeydownHandler(_){const M=/input|textarea/i.test(_.target.tagName),q=_.key===Gk,me=[Xk,Jy].includes(_.key);if(!me&&!q||M&&!q)return;_.preventDefault();const Re=this.matches(So)?this:Q.prev(this,So)[0]||Q.next(this,So)[0]||Q.findOne(So,_.delegateTarget.parentNode),Ie=Zi.getOrCreateInstance(Re);if(me){_.stopPropagation(),Ie.show(),Ie._selectMenuItem(_);return}Ie._isShown()&&(_.stopPropagation(),Ie.hide(),Re.focus())}}W.on(document,ev,So,Zi.dataApiKeydownHandler),W.on(document,ev,rd,Zi.dataApiKeydownHandler),W.on(document,Qy,Zi.clearMenus),W.on(document,tM,Zi.clearMenus),W.on(document,Qy,So,function(G){G.preventDefault(),Zi.getOrCreateInstance(this).toggle()}),P(Zi);const tv="backdrop",wM="fade",nv="show",iv=`mousedown.bs.${tv}`,xM={className:"modal-backdrop",clickCallback:null,isAnimated:!1,isVisible:!0,rootElement:"body"},EM={className:"string",clickCallback:"(function|null)",isAnimated:"boolean",isVisible:"boolean",rootElement:"(element|string)"};class sv extends U{constructor(_){super(),this._config=this._getConfig(_),this._isAppended=!1,this._element=null}static get Default(){return xM}static get DefaultType(){return EM}static get NAME(){return tv}show(_){if(!this._config.isVisible){B(_);return}this._append();const M=this._getElement();this._config.isAnimated&&w(M),M.classList.add(nv),this._emulateAnimation(()=>{B(_)})}hide(_){if(!this._config.isVisible){B(_);return}this._getElement().classList.remove(nv),this._emulateAnimation(()=>{this.dispose(),B(_)})}dispose(){this._isAppended&&(W.off(this._element,iv),this._element.remove(),this._isAppended=!1)}_getElement(){if(!this._element){const _=document.createElement("div");_.className=this._config.className,this._config.isAnimated&&_.classList.add(wM),this._element=_}return this._element}_configAfterMerge(_){return _.rootElement=y(_.rootElement),_}_append(){if(this._isAppended)return;const _=this._getElement();this._config.rootElement.append(_),W.on(_,iv,()=>{B(this._config.clickCallback)}),this._isAppended=!0}_emulateAnimation(_){Y(_,this._getElement(),this._config.isAnimated)}}const CM="focustrap",od=".bs.focustrap",SM=`focusin${od}`,TM=`keydown.tab${od}`,AM="Tab",kM="forward",rv="backward",MM={autofocus:!0,trapElement:null},PM={autofocus:"boolean",trapElement:"element"};class ov extends U{constructor(_){super(),this._config=this._getConfig(_),this._isActive=!1,this._lastTabNavDirection=null}static get Default(){return MM}static get DefaultType(){return PM}static get NAME(){return CM}activate(){this._isActive||(this._config.autofocus&&this._config.trapElement.focus(),W.off(document,od),W.on(document,SM,_=>this._handleFocusin(_)),W.on(document,TM,_=>this._handleKeydown(_)),this._isActive=!0)}deactivate(){this._isActive&&(this._isActive=!1,W.off(document,od))}_handleFocusin(_){const{trapElement:M}=this._config;if(_.target===document||_.target===M||M.contains(_.target))return;const q=Q.focusableChildren(M);q.length===0?M.focus():this._lastTabNavDirection===rv?q[q.length-1].focus():q[0].focus()}_handleKeydown(_){_.key===AM&&(this._lastTabNavDirection=_.shiftKey?rv:kM)}}const av=".fixed-top, .fixed-bottom, .is-fixed, .sticky-top",lv=".sticky-top",ad="padding-right",cv="margin-right";class sg{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,ad,M=>M+_),this._setElementAttributes(av,ad,M=>M+_),this._setElementAttributes(lv,cv,M=>M-_)}reset(){this._resetElementAttributes(this._element,"overflow"),this._resetElementAttributes(this._element,ad),this._resetElementAttributes(av,ad),this._resetElementAttributes(lv,cv)}isOverflowing(){return this.getWidth()>0}_disableOverFlow(){this._saveInitialAttribute(this._element,"overflow"),this._element.style.overflow="hidden"}_setElementAttributes(_,M,q){const me=this.getWidth(),Re=Ie=>{if(Ie!==this._element&&window.innerWidth>Ie.clientWidth+me)return;this._saveInitialAttribute(Ie,M);const rt=window.getComputedStyle(Ie).getPropertyValue(M);Ie.style.setProperty(M,`${q(Number.parseFloat(rt))}px`)};this._applyManipulationCallback(_,Re)}_saveInitialAttribute(_,M){const q=_.style.getPropertyValue(M);q&&K.setDataAttribute(_,M,q)}_resetElementAttributes(_,M){const q=me=>{const Re=K.getDataAttribute(me,M);if(Re===null){me.style.removeProperty(M);return}K.removeDataAttribute(me,M),me.style.setProperty(M,Re)};this._applyManipulationCallback(_,q)}_applyManipulationCallback(_,M){if(m(_)){M(_);return}for(const q of Q.find(_,this._element))M(q)}}const IM="modal",Oi=".bs.modal",DM=".data-api",RM="Escape",LM=`hide${Oi}`,OM=`hidePrevented${Oi}`,uv=`hidden${Oi}`,dv=`show${Oi}`,$M=`shown${Oi}`,NM=`resize${Oi}`,FM=`click.dismiss${Oi}`,BM=`mousedown.dismiss${Oi}`,VM=`keydown.dismiss${Oi}`,zM=`click${Oi}${DM}`,hv="modal-open",WM="fade",fv="show",rg="modal-static",YM=".modal.show",HM=".modal-dialog",jM=".modal-body",KM='[data-bs-toggle="modal"]',UM={backdrop:!0,focus:!0,keyboard:!0},GM={backdrop:"(boolean|string)",focus:"boolean",keyboard:"boolean"};class To extends j{constructor(_,M){super(_,M),this._dialog=Q.findOne(HM,this._element),this._backdrop=this._initializeBackDrop(),this._focustrap=this._initializeFocusTrap(),this._isShown=!1,this._isTransitioning=!1,this._scrollBar=new sg,this._addEventListeners()}static get Default(){return UM}static get DefaultType(){return GM}static get NAME(){return IM}toggle(_){return this._isShown?this.hide():this.show(_)}show(_){this._isShown||this._isTransitioning||W.trigger(this._element,dv,{relatedTarget:_}).defaultPrevented||(this._isShown=!0,this._isTransitioning=!0,this._scrollBar.hide(),document.body.classList.add(hv),this._adjustDialog(),this._backdrop.show(()=>this._showElement(_)))}hide(){!this._isShown||this._isTransitioning||W.trigger(this._element,LM).defaultPrevented||(this._isShown=!1,this._isTransitioning=!0,this._focustrap.deactivate(),this._element.classList.remove(fv),this._queueCallback(()=>this._hideModal(),this._element,this._isAnimated()))}dispose(){W.off(window,Oi),W.off(this._dialog,Oi),this._backdrop.dispose(),this._focustrap.deactivate(),super.dispose()}handleUpdate(){this._adjustDialog()}_initializeBackDrop(){return new sv({isVisible:!!this._config.backdrop,isAnimated:this._isAnimated()})}_initializeFocusTrap(){return new ov({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 M=Q.findOne(jM,this._dialog);M&&(M.scrollTop=0),w(this._element),this._element.classList.add(fv);const q=()=>{this._config.focus&&this._focustrap.activate(),this._isTransitioning=!1,W.trigger(this._element,$M,{relatedTarget:_})};this._queueCallback(q,this._dialog,this._isAnimated())}_addEventListeners(){W.on(this._element,VM,_=>{if(_.key===RM){if(this._config.keyboard){this.hide();return}this._triggerBackdropTransition()}}),W.on(window,NM,()=>{this._isShown&&!this._isTransitioning&&this._adjustDialog()}),W.on(this._element,BM,_=>{W.one(this._element,FM,M=>{if(!(this._element!==_.target||this._element!==M.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(hv),this._resetAdjustments(),this._scrollBar.reset(),W.trigger(this._element,uv)})}_isAnimated(){return this._element.classList.contains(WM)}_triggerBackdropTransition(){if(W.trigger(this._element,OM).defaultPrevented)return;const M=this._element.scrollHeight>document.documentElement.clientHeight,q=this._element.style.overflowY;q==="hidden"||this._element.classList.contains(rg)||(M||(this._element.style.overflowY="hidden"),this._element.classList.add(rg),this._queueCallback(()=>{this._element.classList.remove(rg),this._queueCallback(()=>{this._element.style.overflowY=q},this._dialog)},this._dialog),this._element.focus())}_adjustDialog(){const _=this._element.scrollHeight>document.documentElement.clientHeight,M=this._scrollBar.getWidth(),q=M>0;if(q&&!_){const me=k()?"paddingLeft":"paddingRight";this._element.style[me]=`${M}px`}if(!q&&_){const me=k()?"paddingRight":"paddingLeft";this._element.style[me]=`${M}px`}}_resetAdjustments(){this._element.style.paddingLeft="",this._element.style.paddingRight=""}static jQueryInterface(_,M){return this.each(function(){const q=To.getOrCreateInstance(this,_);if(typeof _=="string"){if(typeof q[_]>"u")throw new TypeError(`No method named "${_}"`);q[_](M)}})}}W.on(document,zM,KM,function(G){const _=Q.getElementFromSelector(this);["A","AREA"].includes(this.tagName)&&G.preventDefault(),W.one(_,dv,me=>{me.defaultPrevented||W.one(_,uv,()=>{v(this)&&this.focus()})});const M=Q.findOne(YM);M&&To.getInstance(M).hide(),To.getOrCreateInstance(_).toggle(this)}),ge(To),P(To);const XM="offcanvas",Ys=".bs.offcanvas",gv=".data-api",qM=`load${Ys}${gv}`,ZM="Escape",pv="show",mv="showing",_v="hiding",JM="offcanvas-backdrop",yv=".offcanvas.show",QM=`show${Ys}`,eP=`shown${Ys}`,tP=`hide${Ys}`,vv=`hidePrevented${Ys}`,bv=`hidden${Ys}`,nP=`resize${Ys}`,iP=`click${Ys}${gv}`,sP=`keydown.dismiss${Ys}`,rP='[data-bs-toggle="offcanvas"]',oP={backdrop:!0,keyboard:!0,scroll:!1},aP={backdrop:"(boolean|string)",keyboard:"boolean",scroll:"boolean"};class Hs extends j{constructor(_,M){super(_,M),this._isShown=!1,this._backdrop=this._initializeBackDrop(),this._focustrap=this._initializeFocusTrap(),this._addEventListeners()}static get Default(){return oP}static get DefaultType(){return aP}static get NAME(){return XM}toggle(_){return this._isShown?this.hide():this.show(_)}show(_){if(this._isShown||W.trigger(this._element,QM,{relatedTarget:_}).defaultPrevented)return;this._isShown=!0,this._backdrop.show(),this._config.scroll||new sg().hide(),this._element.setAttribute("aria-modal",!0),this._element.setAttribute("role","dialog"),this._element.classList.add(mv);const q=()=>{(!this._config.scroll||this._config.backdrop)&&this._focustrap.activate(),this._element.classList.add(pv),this._element.classList.remove(mv),W.trigger(this._element,eP,{relatedTarget:_})};this._queueCallback(q,this._element,!0)}hide(){if(!this._isShown||W.trigger(this._element,tP).defaultPrevented)return;this._focustrap.deactivate(),this._element.blur(),this._isShown=!1,this._element.classList.add(_v),this._backdrop.hide();const M=()=>{this._element.classList.remove(pv,_v),this._element.removeAttribute("aria-modal"),this._element.removeAttribute("role"),this._config.scroll||new sg().reset(),W.trigger(this._element,bv)};this._queueCallback(M,this._element,!0)}dispose(){this._backdrop.dispose(),this._focustrap.deactivate(),super.dispose()}_initializeBackDrop(){const _=()=>{if(this._config.backdrop==="static"){W.trigger(this._element,vv);return}this.hide()},M=!!this._config.backdrop;return new sv({className:JM,isVisible:M,isAnimated:!0,rootElement:this._element.parentNode,clickCallback:M?_:null})}_initializeFocusTrap(){return new ov({trapElement:this._element})}_addEventListeners(){W.on(this._element,sP,_=>{if(_.key===ZM){if(this._config.keyboard){this.hide();return}W.trigger(this._element,vv)}})}static jQueryInterface(_){return this.each(function(){const M=Hs.getOrCreateInstance(this,_);if(typeof _=="string"){if(M[_]===void 0||_.startsWith("_")||_==="constructor")throw new TypeError(`No method named "${_}"`);M[_](this)}})}}W.on(document,iP,rP,function(G){const _=Q.getElementFromSelector(this);if(["A","AREA"].includes(this.tagName)&&G.preventDefault(),b(this))return;W.one(_,bv,()=>{v(this)&&this.focus()});const M=Q.findOne(yv);M&&M!==_&&Hs.getInstance(M).hide(),Hs.getOrCreateInstance(_).toggle(this)}),W.on(window,qM,()=>{for(const G of Q.find(yv))Hs.getOrCreateInstance(G).show()}),W.on(window,nP,()=>{for(const G of Q.find("[aria-modal][class*=show][class*=offcanvas-]"))getComputedStyle(G).position!=="fixed"&&Hs.getOrCreateInstance(G).hide()}),ge(Hs),P(Hs);const wv={"*":["class","dir","id","lang","role",/^aria-[\w-]*$/i],a:["target","href","title","rel"],area:[],b:[],br:[],col:[],code:[],dd:[],div:[],dl:[],dt:[],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:[]},lP=new Set(["background","cite","href","itemtype","longdesc","poster","src","xlink:href"]),cP=/^(?!javascript:)(?:[a-z0-9+.-]+:|[^&:/?#]*(?:[/?#]|$))/i,uP=(G,_)=>{const M=G.nodeName.toLowerCase();return _.includes(M)?lP.has(M)?!!cP.test(G.nodeValue):!0:_.filter(q=>q instanceof RegExp).some(q=>q.test(M))};function dP(G,_,M){if(!G.length)return G;if(M&&typeof M=="function")return M(G);const me=new window.DOMParser().parseFromString(G,"text/html"),Re=[].concat(...me.body.querySelectorAll("*"));for(const Ie of Re){const rt=Ie.nodeName.toLowerCase();if(!Object.keys(_).includes(rt)){Ie.remove();continue}const ui=[].concat(...Ie.attributes),$i=[].concat(_["*"]||[],_[rt]||[]);for(const Tn of ui)uP(Tn,$i)||Ie.removeAttribute(Tn.nodeName)}return me.body.innerHTML}const hP="TemplateFactory",fP={allowList:wv,content:{},extraClass:"",html:!1,sanitize:!0,sanitizeFn:null,template:"
"},gP={allowList:"object",content:"object",extraClass:"(string|function)",html:"boolean",sanitize:"boolean",sanitizeFn:"(null|function)",template:"string"},pP={entry:"(string|element|function|null)",selector:"(string|element)"};class mP extends U{constructor(_){super(),this._config=this._getConfig(_)}static get Default(){return fP}static get DefaultType(){return gP}static get NAME(){return hP}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[me,Re]of Object.entries(this._config.content))this._setContent(_,Re,me);const M=_.children[0],q=this._resolvePossibleFunction(this._config.extraClass);return q&&M.classList.add(...q.split(" ")),M}_typeCheckConfig(_){super._typeCheckConfig(_),this._checkContent(_.content)}_checkContent(_){for(const[M,q]of Object.entries(_))super._typeCheckConfig({selector:M,entry:q},pP)}_setContent(_,M,q){const me=Q.findOne(q,_);if(me){if(M=this._resolvePossibleFunction(M),!M){me.remove();return}if(m(M)){this._putElementInTemplate(y(M),me);return}if(this._config.html){me.innerHTML=this._maybeSanitize(M);return}me.textContent=M}}_maybeSanitize(_){return this._config.sanitize?dP(_,this._config.allowList,this._config.sanitizeFn):_}_resolvePossibleFunction(_){return B(_,[this])}_putElementInTemplate(_,M){if(this._config.html){M.innerHTML="",M.append(_);return}M.textContent=_.textContent}}const _P="tooltip",yP=new Set(["sanitize","allowList","sanitizeFn"]),og="fade",vP="modal",ld="show",bP=".tooltip-inner",xv=`.${vP}`,Ev="hide.bs.modal",nc="hover",ag="focus",wP="click",xP="manual",EP="hide",CP="hidden",SP="show",TP="shown",AP="inserted",kP="click",MP="focusin",PP="focusout",IP="mouseenter",DP="mouseleave",RP={AUTO:"auto",TOP:"top",RIGHT:k()?"left":"right",BOTTOM:"bottom",LEFT:k()?"right":"left"},LP={allowList:wv,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"},OP={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 Ao extends j{constructor(_,M){if(typeof s>"u")throw new TypeError("Bootstrap's tooltips require Popper (https://popper.js.org)");super(_,M),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 LP}static get DefaultType(){return OP}static get NAME(){return _P}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),W.off(this._element.closest(xv),Ev,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 _=W.trigger(this._element,this.constructor.eventName(SP)),q=(x(this._element)||this._element.ownerDocument.documentElement).contains(this._element);if(_.defaultPrevented||!q)return;this._disposePopper();const me=this._getTipElement();this._element.setAttribute("aria-describedby",me.getAttribute("id"));const{container:Re}=this._config;if(this._element.ownerDocument.documentElement.contains(this.tip)||(Re.append(me),W.trigger(this._element,this.constructor.eventName(AP))),this._popper=this._createPopper(me),me.classList.add(ld),"ontouchstart"in document.documentElement)for(const rt of[].concat(...document.body.children))W.on(rt,"mouseover",E);const Ie=()=>{W.trigger(this._element,this.constructor.eventName(TP)),this._isHovered===!1&&this._leave(),this._isHovered=!1};this._queueCallback(Ie,this.tip,this._isAnimated())}hide(){if(!this._isShown()||W.trigger(this._element,this.constructor.eventName(EP)).defaultPrevented)return;if(this._getTipElement().classList.remove(ld),"ontouchstart"in document.documentElement)for(const me of[].concat(...document.body.children))W.off(me,"mouseover",E);this._activeTrigger[wP]=!1,this._activeTrigger[ag]=!1,this._activeTrigger[nc]=!1,this._isHovered=null;const q=()=>{this._isWithActiveTrigger()||(this._isHovered||this._disposePopper(),this._element.removeAttribute("aria-describedby"),W.trigger(this._element,this.constructor.eventName(CP)))};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 M=this._getTemplateFactory(_).toHtml();if(!M)return null;M.classList.remove(og,ld),M.classList.add(`bs-${this.constructor.NAME}-auto`);const q=h(this.constructor.NAME).toString();return M.setAttribute("id",q),this._isAnimated()&&M.classList.add(og),M}setContent(_){this._newContent=_,this._isShown()&&(this._disposePopper(),this.show())}_getTemplateFactory(_){return this._templateFactory?this._templateFactory.changeContent(_):this._templateFactory=new mP({...this._config,content:_,extraClass:this._resolvePossibleFunction(this._config.customClass)}),this._templateFactory}_getContentForTemplate(){return{[bP]: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(og)}_isShown(){return this.tip&&this.tip.classList.contains(ld)}_createPopper(_){const M=B(this._config.placement,[this,_,this._element]),q=RP[M.toUpperCase()];return s.createPopper(this._element,_,this._getPopperConfig(q))}_getOffset(){const{offset:_}=this._config;return typeof _=="string"?_.split(",").map(M=>Number.parseInt(M,10)):typeof _=="function"?M=>_(M,this._element):_}_resolvePossibleFunction(_){return B(_,[this._element])}_getPopperConfig(_){const M={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{...M,...B(this._config.popperConfig,[M])}}_setListeners(){const _=this._config.trigger.split(" ");for(const M of _)if(M==="click")W.on(this._element,this.constructor.eventName(kP),this._config.selector,q=>{this._initializeOnDelegatedTarget(q).toggle()});else if(M!==xP){const q=M===nc?this.constructor.eventName(IP):this.constructor.eventName(MP),me=M===nc?this.constructor.eventName(DP):this.constructor.eventName(PP);W.on(this._element,q,this._config.selector,Re=>{const Ie=this._initializeOnDelegatedTarget(Re);Ie._activeTrigger[Re.type==="focusin"?ag:nc]=!0,Ie._enter()}),W.on(this._element,me,this._config.selector,Re=>{const Ie=this._initializeOnDelegatedTarget(Re);Ie._activeTrigger[Re.type==="focusout"?ag:nc]=Ie._element.contains(Re.relatedTarget),Ie._leave()})}this._hideModalHandler=()=>{this._element&&this.hide()},W.on(this._element.closest(xv),Ev,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(_,M){clearTimeout(this._timeout),this._timeout=setTimeout(_,M)}_isWithActiveTrigger(){return Object.values(this._activeTrigger).includes(!0)}_getConfig(_){const M=K.getDataAttributes(this._element);for(const q of Object.keys(M))yP.has(q)&&delete M[q];return _={...M,...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[M,q]of Object.entries(this._config))this.constructor.Default[M]!==q&&(_[M]=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 M=Ao.getOrCreateInstance(this,_);if(typeof _=="string"){if(typeof M[_]>"u")throw new TypeError(`No method named "${_}"`);M[_]()}})}}P(Ao);const $P="popover",NP=".popover-header",FP=".popover-body",BP={...Ao.Default,content:"",offset:[0,8],placement:"right",template:'',trigger:"click"},VP={...Ao.DefaultType,content:"(null|string|element|function)"};class cd extends Ao{static get Default(){return BP}static get DefaultType(){return VP}static get NAME(){return $P}_isWithContent(){return this._getTitle()||this._getContent()}_getContentForTemplate(){return{[NP]:this._getTitle(),[FP]:this._getContent()}}_getContent(){return this._resolvePossibleFunction(this._config.content)}static jQueryInterface(_){return this.each(function(){const M=cd.getOrCreateInstance(this,_);if(typeof _=="string"){if(typeof M[_]>"u")throw new TypeError(`No method named "${_}"`);M[_]()}})}}P(cd);const zP="scrollspy",lg=".bs.scrollspy",WP=".data-api",YP=`activate${lg}`,Cv=`click${lg}`,HP=`load${lg}${WP}`,jP="dropdown-item",Ma="active",KP='[data-bs-spy="scroll"]',cg="[href]",UP=".nav, .list-group",Sv=".nav-link",GP=`${Sv}, .nav-item > ${Sv}, .list-group-item`,XP=".dropdown",qP=".dropdown-toggle",ZP={offset:null,rootMargin:"0px 0px -25%",smoothScroll:!1,target:null,threshold:[.1,.5,1]},JP={offset:"(number|null)",rootMargin:"string",smoothScroll:"boolean",target:"element",threshold:"array"};class ic extends j{constructor(_,M){super(_,M),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 ZP}static get DefaultType(){return JP}static get NAME(){return zP}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(M=>Number.parseFloat(M))),_}_maybeEnableSmoothScroll(){this._config.smoothScroll&&(W.off(this._config.target,Cv),W.on(this._config.target,Cv,cg,_=>{const M=this._observableSections.get(_.target.hash);if(M){_.preventDefault();const q=this._rootElement||window,me=M.offsetTop-this._element.offsetTop;if(q.scrollTo){q.scrollTo({top:me,behavior:"smooth"});return}q.scrollTop=me}}))}_getNewObserver(){const _={root:this._rootElement,threshold:this._config.threshold,rootMargin:this._config.rootMargin};return new IntersectionObserver(M=>this._observerCallback(M),_)}_observerCallback(_){const M=Ie=>this._targetLinks.get(`#${Ie.target.id}`),q=Ie=>{this._previousScrollData.visibleEntryTop=Ie.target.offsetTop,this._process(M(Ie))},me=(this._rootElement||document.documentElement).scrollTop,Re=me>=this._previousScrollData.parentScrollTop;this._previousScrollData.parentScrollTop=me;for(const Ie of _){if(!Ie.isIntersecting){this._activeTarget=null,this._clearActiveClass(M(Ie));continue}const rt=Ie.target.offsetTop>=this._previousScrollData.visibleEntryTop;if(Re&&rt){if(q(Ie),!me)return;continue}!Re&&!rt&&q(Ie)}}_initializeTargetsAndObservables(){this._targetLinks=new Map,this._observableSections=new Map;const _=Q.find(cg,this._config.target);for(const M of _){if(!M.hash||b(M))continue;const q=Q.findOne(decodeURI(M.hash),this._element);v(q)&&(this._targetLinks.set(decodeURI(M.hash),M),this._observableSections.set(M.hash,q))}}_process(_){this._activeTarget!==_&&(this._clearActiveClass(this._config.target),this._activeTarget=_,_.classList.add(Ma),this._activateParents(_),W.trigger(this._element,YP,{relatedTarget:_}))}_activateParents(_){if(_.classList.contains(jP)){Q.findOne(qP,_.closest(XP)).classList.add(Ma);return}for(const M of Q.parents(_,UP))for(const q of Q.prev(M,GP))q.classList.add(Ma)}_clearActiveClass(_){_.classList.remove(Ma);const M=Q.find(`${cg}.${Ma}`,_);for(const q of M)q.classList.remove(Ma)}static jQueryInterface(_){return this.each(function(){const M=ic.getOrCreateInstance(this,_);if(typeof _=="string"){if(M[_]===void 0||_.startsWith("_")||_==="constructor")throw new TypeError(`No method named "${_}"`);M[_]()}})}}W.on(window,HP,()=>{for(const G of Q.find(KP))ic.getOrCreateInstance(G)}),P(ic);const QP="tab",ko=".bs.tab",eI=`hide${ko}`,tI=`hidden${ko}`,nI=`show${ko}`,iI=`shown${ko}`,sI=`click${ko}`,rI=`keydown${ko}`,oI=`load${ko}`,aI="ArrowLeft",Tv="ArrowRight",lI="ArrowUp",Av="ArrowDown",ug="Home",kv="End",Mo="active",Mv="fade",dg="show",cI="dropdown",Pv=".dropdown-toggle",uI=".dropdown-menu",hg=`:not(${Pv})`,dI='.list-group, .nav, [role="tablist"]',hI=".nav-item, .list-group-item",fI=`.nav-link${hg}, .list-group-item${hg}, [role="tab"]${hg}`,Iv='[data-bs-toggle="tab"], [data-bs-toggle="pill"], [data-bs-toggle="list"]',fg=`${fI}, ${Iv}`,gI=`.${Mo}[data-bs-toggle="tab"], .${Mo}[data-bs-toggle="pill"], .${Mo}[data-bs-toggle="list"]`;class Po extends j{constructor(_){super(_),this._parent=this._element.closest(dI),this._parent&&(this._setInitialAttributes(this._parent,this._getChildren()),W.on(this._element,rI,M=>this._keydown(M)))}static get NAME(){return QP}show(){const _=this._element;if(this._elemIsActive(_))return;const M=this._getActiveElem(),q=M?W.trigger(M,eI,{relatedTarget:_}):null;W.trigger(_,nI,{relatedTarget:M}).defaultPrevented||q&&q.defaultPrevented||(this._deactivate(M,_),this._activate(_,M))}_activate(_,M){if(!_)return;_.classList.add(Mo),this._activate(Q.getElementFromSelector(_));const q=()=>{if(_.getAttribute("role")!=="tab"){_.classList.add(dg);return}_.removeAttribute("tabindex"),_.setAttribute("aria-selected",!0),this._toggleDropDown(_,!0),W.trigger(_,iI,{relatedTarget:M})};this._queueCallback(q,_,_.classList.contains(Mv))}_deactivate(_,M){if(!_)return;_.classList.remove(Mo),_.blur(),this._deactivate(Q.getElementFromSelector(_));const q=()=>{if(_.getAttribute("role")!=="tab"){_.classList.remove(dg);return}_.setAttribute("aria-selected",!1),_.setAttribute("tabindex","-1"),this._toggleDropDown(_,!1),W.trigger(_,tI,{relatedTarget:M})};this._queueCallback(q,_,_.classList.contains(Mv))}_keydown(_){if(![aI,Tv,lI,Av,ug,kv].includes(_.key))return;_.stopPropagation(),_.preventDefault();const M=this._getChildren().filter(me=>!b(me));let q;if([ug,kv].includes(_.key))q=M[_.key===ug?0:M.length-1];else{const me=[Tv,Av].includes(_.key);q=ne(M,_.target,me,!0)}q&&(q.focus({preventScroll:!0}),Po.getOrCreateInstance(q).show())}_getChildren(){return Q.find(fg,this._parent)}_getActiveElem(){return this._getChildren().find(_=>this._elemIsActive(_))||null}_setInitialAttributes(_,M){this._setAttributeIfNotExists(_,"role","tablist");for(const q of M)this._setInitialAttributesOnChild(q)}_setInitialAttributesOnChild(_){_=this._getInnerElement(_);const M=this._elemIsActive(_),q=this._getOuterElement(_);_.setAttribute("aria-selected",M),q!==_&&this._setAttributeIfNotExists(q,"role","presentation"),M||_.setAttribute("tabindex","-1"),this._setAttributeIfNotExists(_,"role","tab"),this._setInitialAttributesOnTargetPanel(_)}_setInitialAttributesOnTargetPanel(_){const M=Q.getElementFromSelector(_);M&&(this._setAttributeIfNotExists(M,"role","tabpanel"),_.id&&this._setAttributeIfNotExists(M,"aria-labelledby",`${_.id}`))}_toggleDropDown(_,M){const q=this._getOuterElement(_);if(!q.classList.contains(cI))return;const me=(Re,Ie)=>{const rt=Q.findOne(Re,q);rt&&rt.classList.toggle(Ie,M)};me(Pv,Mo),me(uI,dg),q.setAttribute("aria-expanded",M)}_setAttributeIfNotExists(_,M,q){_.hasAttribute(M)||_.setAttribute(M,q)}_elemIsActive(_){return _.classList.contains(Mo)}_getInnerElement(_){return _.matches(fg)?_:Q.findOne(fg,_)}_getOuterElement(_){return _.closest(hI)||_}static jQueryInterface(_){return this.each(function(){const M=Po.getOrCreateInstance(this);if(typeof _=="string"){if(M[_]===void 0||_.startsWith("_")||_==="constructor")throw new TypeError(`No method named "${_}"`);M[_]()}})}}W.on(document,sI,Iv,function(G){["A","AREA"].includes(this.tagName)&&G.preventDefault(),!b(this)&&Po.getOrCreateInstance(this).show()}),W.on(window,oI,()=>{for(const G of Q.find(gI))Po.getOrCreateInstance(G)}),P(Po);const pI="toast",Sr=".bs.toast",mI=`mouseover${Sr}`,_I=`mouseout${Sr}`,yI=`focusin${Sr}`,vI=`focusout${Sr}`,bI=`hide${Sr}`,wI=`hidden${Sr}`,xI=`show${Sr}`,EI=`shown${Sr}`,CI="fade",Dv="hide",ud="show",dd="showing",SI={animation:"boolean",autohide:"boolean",delay:"number"},TI={animation:!0,autohide:!0,delay:5e3};class sc extends j{constructor(_,M){super(_,M),this._timeout=null,this._hasMouseInteraction=!1,this._hasKeyboardInteraction=!1,this._setListeners()}static get Default(){return TI}static get DefaultType(){return SI}static get NAME(){return pI}show(){if(W.trigger(this._element,xI).defaultPrevented)return;this._clearTimeout(),this._config.animation&&this._element.classList.add(CI);const M=()=>{this._element.classList.remove(dd),W.trigger(this._element,EI),this._maybeScheduleHide()};this._element.classList.remove(Dv),w(this._element),this._element.classList.add(ud,dd),this._queueCallback(M,this._element,this._config.animation)}hide(){if(!this.isShown()||W.trigger(this._element,bI).defaultPrevented)return;const M=()=>{this._element.classList.add(Dv),this._element.classList.remove(dd,ud),W.trigger(this._element,wI)};this._element.classList.add(dd),this._queueCallback(M,this._element,this._config.animation)}dispose(){this._clearTimeout(),this.isShown()&&this._element.classList.remove(ud),super.dispose()}isShown(){return this._element.classList.contains(ud)}_maybeScheduleHide(){this._config.autohide&&(this._hasMouseInteraction||this._hasKeyboardInteraction||(this._timeout=setTimeout(()=>{this.hide()},this._config.delay)))}_onInteraction(_,M){switch(_.type){case"mouseover":case"mouseout":{this._hasMouseInteraction=M;break}case"focusin":case"focusout":{this._hasKeyboardInteraction=M;break}}if(M){this._clearTimeout();return}const q=_.relatedTarget;this._element===q||this._element.contains(q)||this._maybeScheduleHide()}_setListeners(){W.on(this._element,mI,_=>this._onInteraction(_,!0)),W.on(this._element,_I,_=>this._onInteraction(_,!1)),W.on(this._element,yI,_=>this._onInteraction(_,!0)),W.on(this._element,vI,_=>this._onInteraction(_,!1))}_clearTimeout(){clearTimeout(this._timeout),this._timeout=null}static jQueryInterface(_){return this.each(function(){const M=sc.getOrCreateInstance(this,_);if(typeof _=="string"){if(typeof M[_]>"u")throw new TypeError(`No method named "${_}"`);M[_](this)}})}}return ge(sc),P(sc),{Alert:Qe,Button:oe,Carousel:Sa,Collapse:Aa,Dropdown:Zi,Modal:To,Offcanvas:Hs,Popover:cd,ScrollSpy:ic,Tab:Po,Toast:sc,Tooltip:Ao}})})(PI);/** + */(function(t,e){(function(n,i){t.exports=i(vI)})(Xw,function(n){function i(G){const _=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(G){for(const M in G)if(M!=="default"){const q=Object.getOwnPropertyDescriptor(G,M);Object.defineProperty(_,M,q.get?q:{enumerable:!0,get:()=>G[M]})}}return _.default=G,Object.freeze(_)}const s=i(n),r=new Map,o={set(G,_,M){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(_,M)},get(G,_){return r.has(G)&&r.get(G).get(_)||null},remove(G,_){if(!r.has(G))return;const M=r.get(G);M.delete(_),M.size===0&&r.delete(G)}},a=1e6,l=1e3,c="transitionend",u=G=>(G&&window.CSS&&window.CSS.escape&&(G=G.replace(/#([^\s"#']+)/g,(_,M)=>`#${CSS.escape(M)}`)),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},g=G=>{if(!G)return 0;let{transitionDuration:_,transitionDelay:M}=window.getComputedStyle(G);const q=Number.parseFloat(_),me=Number.parseFloat(M);return!q&&!me?0:(_=_.split(",")[0],M=M.split(",")[0],(Number.parseFloat(_)+Number.parseFloat(M))*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",M=G.closest("details:not([open])");if(!M)return _;if(M!==G){const q=G.closest("summary");if(q&&q.parentNode!==M||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",x=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?x(G.parentNode):null},E=()=>{},w=G=>{G.offsetHeight},S=()=>window.jQuery&&!document.body.hasAttribute("data-bs-no-jquery")?window.jQuery:null,T=[],A=G=>{document.readyState==="loading"?(T.length||document.addEventListener("DOMContentLoaded",()=>{for(const _ of T)_()}),T.push(G)):G()},k=()=>document.documentElement.dir==="rtl",P=G=>{A(()=>{const _=S();if(_){const M=G.NAME,q=_.fn[M];_.fn[M]=G.jQueryInterface,_.fn[M].Constructor=G,_.fn[M].noConflict=()=>(_.fn[M]=q,G.jQueryInterface)}})},B=(G,_=[],M=G)=>typeof G=="function"?G(..._):M,Y=(G,_,M=!0)=>{if(!M){B(G);return}const me=g(_)+5;let Re=!1;const Ie=({target:rt})=>{rt===_&&(Re=!0,_.removeEventListener(c,Ie),B(G))};_.addEventListener(c,Ie),setTimeout(()=>{Re||p(_)},me)},ne=(G,_,M,q)=>{const me=G.length;let Re=G.indexOf(_);return Re===-1?!M&&q?G[me-1]:G[0]:(Re+=M?1:-1,q&&(Re=(Re+me)%me),G[Math.max(0,Math.min(Re,me-1))])},$=/[^.]*(?=\..*)\.|.*/,F=/\..*/,D=/::\d+$/,z={};let X=1;const Z={mouseenter:"mouseover",mouseleave:"mouseout"},H=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 le(G,_){return _&&`${_}::${X++}`||G.uidEvent||X++}function ie(G){const _=le(G);return G.uidEvent=_,z[_]=z[_]||{},z[_]}function te(G,_){return function M(q){return fe(q,{delegateTarget:G}),M.oneOff&&W.off(G,q.type,_),_.apply(G,[q])}}function I(G,_,M){return function q(me){const Re=G.querySelectorAll(_);for(let{target:Ie}=me;Ie&&Ie!==this;Ie=Ie.parentNode)for(const rt of Re)if(rt===Ie)return fe(me,{delegateTarget:Ie}),q.oneOff&&W.off(G,me.type,_,M),M.apply(Ie,[me])}}function ee(G,_,M=null){return Object.values(G).find(q=>q.callable===_&&q.delegationSelector===M)}function ue(G,_,M){const q=typeof _=="string",me=q?M:_||M;let Re=ve(G);return H.has(Re)||(Re=G),[q,me,Re]}function L(G,_,M,q,me){if(typeof _!="string"||!G)return;let[Re,Ie,rt]=ue(_,M,q);_ in Z&&(Ie=(A2=>function(Pa){if(!Pa.relatedTarget||Pa.relatedTarget!==Pa.delegateTarget&&!Pa.delegateTarget.contains(Pa.relatedTarget))return A2.call(this,Pa)})(Ie));const ui=ie(G),$i=ui[rt]||(ui[rt]={}),Tn=ee($i,Ie,Re?M:null);if(Tn){Tn.oneOff=Tn.oneOff&&me;return}const ys=le(Ie,_.replace($,"")),Ji=Re?I(G,M,Ie):te(G,Ie);Ji.delegationSelector=Re?M:null,Ji.callable=Ie,Ji.oneOff=me,Ji.uidEvent=ys,$i[ys]=Ji,G.addEventListener(rt,Ji,Re)}function ae(G,_,M,q,me){const Re=ee(_[M],q,me);Re&&(G.removeEventListener(M,Re,!!me),delete _[M][Re.uidEvent])}function de(G,_,M,q){const me=_[M]||{};for(const[Re,Ie]of Object.entries(me))Re.includes(q)&&ae(G,_,M,Ie.callable,Ie.delegationSelector)}function ve(G){return G=G.replace(F,""),Z[G]||G}const W={on(G,_,M,q){L(G,_,M,q,!1)},one(G,_,M,q){L(G,_,M,q,!0)},off(G,_,M,q){if(typeof _!="string"||!G)return;const[me,Re,Ie]=ue(_,M,q),rt=Ie!==_,ui=ie(G),$i=ui[Ie]||{},Tn=_.startsWith(".");if(typeof Re<"u"){if(!Object.keys($i).length)return;ae(G,ui,Ie,Re,me?M:null);return}if(Tn)for(const ys of Object.keys(ui))de(G,ui,ys,_.slice(1));for(const[ys,Ji]of Object.entries($i)){const hd=ys.replace(D,"");(!rt||_.includes(hd))&&ae(G,ui,Ie,Ji.callable,Ji.delegationSelector)}},trigger(G,_,M){if(typeof _!="string"||!G)return null;const q=S(),me=ve(_),Re=_!==me;let Ie=null,rt=!0,ui=!0,$i=!1;Re&&q&&(Ie=q.Event(_,M),q(G).trigger(Ie),rt=!Ie.isPropagationStopped(),ui=!Ie.isImmediatePropagationStopped(),$i=Ie.isDefaultPrevented());const Tn=fe(new Event(_,{bubbles:rt,cancelable:!0}),M);return $i&&Tn.preventDefault(),ui&&G.dispatchEvent(Tn),Tn.defaultPrevented&&Ie&&Ie.preventDefault(),Tn}};function fe(G,_={}){for(const[M,q]of Object.entries(_))try{G[M]=q}catch{Object.defineProperty(G,M,{configurable:!0,get(){return q}})}return G}function C(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,_,M){G.setAttribute(`data-bs-${O(_)}`,M)},removeDataAttribute(G,_){G.removeAttribute(`data-bs-${O(_)}`)},getDataAttributes(G){if(!G)return{};const _={},M=Object.keys(G.dataset).filter(q=>q.startsWith("bs")&&!q.startsWith("bsConfig"));for(const q of M){let me=q.replace(/^bs/,"");me=me.charAt(0).toLowerCase()+me.slice(1,me.length),_[me]=C(G.dataset[q])}return _},getDataAttribute(G,_){return C(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(_,M){const q=m(M)?K.getDataAttribute(M,"config"):{};return{...this.constructor.Default,...typeof q=="object"?q:{},...m(M)?K.getDataAttributes(M):{},...typeof _=="object"?_:{}}}_typeCheckConfig(_,M=this.constructor.DefaultType){for(const[q,me]of Object.entries(M)){const Re=_[q],Ie=m(Re)?"element":d(Re);if(!new RegExp(me).test(Ie))throw new TypeError(`${this.constructor.NAME.toUpperCase()}: Option "${q}" provided type "${Ie}" but expected type "${me}".`)}}}const re="5.3.3";class j extends U{constructor(_,M){super(),_=y(_),_&&(this._element=_,this._config=this._getConfig(M),o.set(this._element,this.constructor.DATA_KEY,this))}dispose(){o.remove(this._element,this.constructor.DATA_KEY),W.off(this._element,this.constructor.EVENT_KEY);for(const _ of Object.getOwnPropertyNames(this))this[_]=null}_queueCallback(_,M,q=!0){Y(_,M,q)}_getConfig(_){return _=this._mergeConfigObj(_,this._element),_=this._configAfterMerge(_),this._typeCheckConfig(_),_}static getInstance(_){return o.get(y(_),this.DATA_KEY)}static getOrCreateInstance(_,M={}){return this.getInstance(_)||new this(_,typeof M=="object"?M: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 M=G.getAttribute("href");if(!M||!M.includes("#")&&!M.startsWith("."))return null;M.includes("#")&&!M.startsWith("#")&&(M=`#${M.split("#")[1]}`),_=M&&M!=="#"?M.trim():null}return _?_.split(",").map(M=>u(M)).join(","):null},Q={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(M=>M.matches(_))},parents(G,_){const M=[];let q=G.parentNode.closest(_);for(;q;)M.push(q),q=q.parentNode.closest(_);return M},prev(G,_){let M=G.previousElementSibling;for(;M;){if(M.matches(_))return[M];M=M.previousElementSibling}return[]},next(G,_){let M=G.nextElementSibling;for(;M;){if(M.matches(_))return[M];M=M.nextElementSibling}return[]},focusableChildren(G){const _=["a","button","input","textarea","select","details","[tabindex]",'[contenteditable="true"]'].map(M=>`${M}:not([tabindex^="-"])`).join(",");return this.find(_,G).filter(M=>!b(M)&&v(M))},getSelectorFromElement(G){const _=se(G);return _&&Q.findOne(_)?_:null},getElementFromSelector(G){const _=se(G);return _?Q.findOne(_):null},getMultipleElementsFromSelector(G){const _=se(G);return _?Q.find(_):[]}},ge=(G,_="hide")=>{const M=`click.dismiss${G.EVENT_KEY}`,q=G.NAME;W.on(document,M,`[data-bs-dismiss="${q}"]`,function(me){if(["A","AREA"].includes(this.tagName)&&me.preventDefault(),b(this))return;const Re=Q.getElementFromSelector(this)||this.closest(`.${q}`);G.getOrCreateInstance(Re)[_]()})},_e="alert",ke=".bs.alert",Me=`close${ke}`,Be=`closed${ke}`,ze="fade",nt="show";class Qe extends j{static get NAME(){return _e}close(){if(W.trigger(this._element,Me).defaultPrevented)return;this._element.classList.remove(nt);const M=this._element.classList.contains(ze);this._queueCallback(()=>this._destroyElement(),this._element,M)}_destroyElement(){this._element.remove(),W.trigger(this._element,Be),this.dispose()}static jQueryInterface(_){return this.each(function(){const M=Qe.getOrCreateInstance(this);if(typeof _=="string"){if(M[_]===void 0||_.startsWith("_")||_==="constructor")throw new TypeError(`No method named "${_}"`);M[_](this)}})}}ge(Qe,"close"),P(Qe);const qt="button",fn=".bs.button",Kt=".data-api",Ei="active",Xi='[data-bs-toggle="button"]',Zt=`click${fn}${Kt}`;class oe extends j{static get NAME(){return qt}toggle(){this._element.setAttribute("aria-pressed",this._element.classList.toggle(Ei))}static jQueryInterface(_){return this.each(function(){const M=oe.getOrCreateInstance(this);_==="toggle"&&M[_]()})}}W.on(document,Zt,Xi,G=>{G.preventDefault();const _=G.target.closest(Xi);oe.getOrCreateInstance(_).toggle()}),P(oe);const Te="swipe",he=".bs.swipe",Ae=`touchstart${he}`,Oe=`touchmove${he}`,Ut=`touchend${he}`,gn=`pointerdown${he}`,Ri=`pointerup${he}`,Ws="touch",pn="pen",Cn="pointer-event",Sn=40,ai={endCallback:null,leftCallback:null,rightCallback:null},li={endCallback:"(function|null)",leftCallback:"(function|null)",rightCallback:"(function|null)"};class ci extends U{constructor(_,M){super(),this._element=_,!(!_||!ci.isSupported())&&(this._config=this._getConfig(M),this._deltaX=0,this._supportPointerEvents=!!window.PointerEvent,this._initEvents())}static get Default(){return ai}static get DefaultType(){return li}static get NAME(){return Te}dispose(){W.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(),B(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 M=_/this._deltaX;this._deltaX=0,M&&B(M>0?this._config.rightCallback:this._config.leftCallback)}_initEvents(){this._supportPointerEvents?(W.on(this._element,gn,_=>this._start(_)),W.on(this._element,Ri,_=>this._end(_)),this._element.classList.add(Cn)):(W.on(this._element,Ae,_=>this._start(_)),W.on(this._element,Oe,_=>this._move(_)),W.on(this._element,Ut,_=>this._end(_)))}_eventIsPointerPenTouch(_){return this._supportPointerEvents&&(_.pointerType===pn||_.pointerType===Ws)}static isSupported(){return"ontouchstart"in document.documentElement||navigator.maxTouchPoints>0}}const qi="carousel",Vt=".bs.carousel",Li=".data-api",Qf="ArrowLeft",dk="ArrowRight",hk=500,ec="next",Ea="prev",Ca="left",nd="right",fk=`slide${Vt}`,eg=`slid${Vt}`,gk=`keydown${Vt}`,pk=`mouseenter${Vt}`,mk=`mouseleave${Vt}`,_k=`dragstart${Vt}`,yk=`load${Vt}${Li}`,vk=`click${Vt}${Li}`,Uy="carousel",id="active",bk="slide",wk="carousel-item-end",xk="carousel-item-start",Ek="carousel-item-next",Ck="carousel-item-prev",Gy=".active",Xy=".carousel-item",Sk=Gy+Xy,Tk=".carousel-item img",Ak=".carousel-indicators",kk="[data-bs-slide], [data-bs-slide-to]",Mk='[data-bs-ride="carousel"]',Pk={[Qf]:nd,[dk]:Ca},Ik={interval:5e3,keyboard:!0,pause:"hover",ride:!1,touch:!0,wrap:!0},Dk={interval:"(number|boolean)",keyboard:"boolean",pause:"(string|boolean)",ride:"(boolean|string)",touch:"boolean",wrap:"boolean"};class Sa extends j{constructor(_,M){super(_,M),this._interval=null,this._activeElement=null,this._isSliding=!1,this.touchTimeout=null,this._swipeHelper=null,this._indicatorsElement=Q.findOne(Ak,this._element),this._addEventListeners(),this._config.ride===Uy&&this.cycle()}static get Default(){return Ik}static get DefaultType(){return Dk}static get NAME(){return qi}next(){this._slide(ec)}nextWhenVisible(){!document.hidden&&v(this._element)&&this.next()}prev(){this._slide(Ea)}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){W.one(this._element,eg,()=>this.cycle());return}this.cycle()}}to(_){const M=this._getItems();if(_>M.length-1||_<0)return;if(this._isSliding){W.one(this._element,eg,()=>this.to(_));return}const q=this._getItemIndex(this._getActive());if(q===_)return;const me=_>q?ec:Ea;this._slide(me,M[_])}dispose(){this._swipeHelper&&this._swipeHelper.dispose(),super.dispose()}_configAfterMerge(_){return _.defaultInterval=_.interval,_}_addEventListeners(){this._config.keyboard&&W.on(this._element,gk,_=>this._keydown(_)),this._config.pause==="hover"&&(W.on(this._element,pk,()=>this.pause()),W.on(this._element,mk,()=>this._maybeEnableCycle())),this._config.touch&&ci.isSupported()&&this._addTouchEventListeners()}_addTouchEventListeners(){for(const q of Q.find(Tk,this._element))W.on(q,_k,me=>me.preventDefault());const M={leftCallback:()=>this._slide(this._directionToOrder(Ca)),rightCallback:()=>this._slide(this._directionToOrder(nd)),endCallback:()=>{this._config.pause==="hover"&&(this.pause(),this.touchTimeout&&clearTimeout(this.touchTimeout),this.touchTimeout=setTimeout(()=>this._maybeEnableCycle(),hk+this._config.interval))}};this._swipeHelper=new ci(this._element,M)}_keydown(_){if(/input|textarea/i.test(_.target.tagName))return;const M=Pk[_.key];M&&(_.preventDefault(),this._slide(this._directionToOrder(M)))}_getItemIndex(_){return this._getItems().indexOf(_)}_setActiveIndicatorElement(_){if(!this._indicatorsElement)return;const M=Q.findOne(Gy,this._indicatorsElement);M.classList.remove(id),M.removeAttribute("aria-current");const q=Q.findOne(`[data-bs-slide-to="${_}"]`,this._indicatorsElement);q&&(q.classList.add(id),q.setAttribute("aria-current","true"))}_updateInterval(){const _=this._activeElement||this._getActive();if(!_)return;const M=Number.parseInt(_.getAttribute("data-bs-interval"),10);this._config.interval=M||this._config.defaultInterval}_slide(_,M=null){if(this._isSliding)return;const q=this._getActive(),me=_===ec,Re=M||ne(this._getItems(),q,me,this._config.wrap);if(Re===q)return;const Ie=this._getItemIndex(Re),rt=hd=>W.trigger(this._element,hd,{relatedTarget:Re,direction:this._orderToDirection(_),from:this._getItemIndex(q),to:Ie});if(rt(fk).defaultPrevented||!q||!Re)return;const $i=!!this._interval;this.pause(),this._isSliding=!0,this._setActiveIndicatorElement(Ie),this._activeElement=Re;const Tn=me?xk:wk,ys=me?Ek:Ck;Re.classList.add(ys),w(Re),q.classList.add(Tn),Re.classList.add(Tn);const Ji=()=>{Re.classList.remove(Tn,ys),Re.classList.add(id),q.classList.remove(id,ys,Tn),this._isSliding=!1,rt(eg)};this._queueCallback(Ji,q,this._isAnimated()),$i&&this.cycle()}_isAnimated(){return this._element.classList.contains(bk)}_getActive(){return Q.findOne(Sk,this._element)}_getItems(){return Q.find(Xy,this._element)}_clearInterval(){this._interval&&(clearInterval(this._interval),this._interval=null)}_directionToOrder(_){return k()?_===Ca?Ea:ec:_===Ca?ec:Ea}_orderToDirection(_){return k()?_===Ea?Ca:nd:_===Ea?nd:Ca}static jQueryInterface(_){return this.each(function(){const M=Sa.getOrCreateInstance(this,_);if(typeof _=="number"){M.to(_);return}if(typeof _=="string"){if(M[_]===void 0||_.startsWith("_")||_==="constructor")throw new TypeError(`No method named "${_}"`);M[_]()}})}}W.on(document,vk,kk,function(G){const _=Q.getElementFromSelector(this);if(!_||!_.classList.contains(Uy))return;G.preventDefault();const M=Sa.getOrCreateInstance(_),q=this.getAttribute("data-bs-slide-to");if(q){M.to(q),M._maybeEnableCycle();return}if(K.getDataAttribute(this,"slide")==="next"){M.next(),M._maybeEnableCycle();return}M.prev(),M._maybeEnableCycle()}),W.on(window,yk,()=>{const G=Q.find(Mk);for(const _ of G)Sa.getOrCreateInstance(_)}),P(Sa);const Rk="collapse",tc=".bs.collapse",Lk=".data-api",Ok=`show${tc}`,$k=`shown${tc}`,Nk=`hide${tc}`,Fk=`hidden${tc}`,Bk=`click${tc}${Lk}`,tg="show",Ta="collapse",sd="collapsing",Vk="collapsed",zk=`:scope .${Ta} .${Ta}`,Wk="collapse-horizontal",Yk="width",Hk="height",jk=".collapse.show, .collapse.collapsing",ng='[data-bs-toggle="collapse"]',Kk={parent:null,toggle:!0},Uk={parent:"(null|element)",toggle:"boolean"};class Aa extends j{constructor(_,M){super(_,M),this._isTransitioning=!1,this._triggerArray=[];const q=Q.find(ng);for(const me of q){const Re=Q.getSelectorFromElement(me),Ie=Q.find(Re).filter(rt=>rt===this._element);Re!==null&&Ie.length&&this._triggerArray.push(me)}this._initializeChildren(),this._config.parent||this._addAriaAndCollapsedClass(this._triggerArray,this._isShown()),this._config.toggle&&this.toggle()}static get Default(){return Kk}static get DefaultType(){return Uk}static get NAME(){return Rk}toggle(){this._isShown()?this.hide():this.show()}show(){if(this._isTransitioning||this._isShown())return;let _=[];if(this._config.parent&&(_=this._getFirstLevelChildren(jk).filter(rt=>rt!==this._element).map(rt=>Aa.getOrCreateInstance(rt,{toggle:!1}))),_.length&&_[0]._isTransitioning||W.trigger(this._element,Ok).defaultPrevented)return;for(const rt of _)rt.hide();const q=this._getDimension();this._element.classList.remove(Ta),this._element.classList.add(sd),this._element.style[q]=0,this._addAriaAndCollapsedClass(this._triggerArray,!0),this._isTransitioning=!0;const me=()=>{this._isTransitioning=!1,this._element.classList.remove(sd),this._element.classList.add(Ta,tg),this._element.style[q]="",W.trigger(this._element,$k)},Ie=`scroll${q[0].toUpperCase()+q.slice(1)}`;this._queueCallback(me,this._element,!0),this._element.style[q]=`${this._element[Ie]}px`}hide(){if(this._isTransitioning||!this._isShown()||W.trigger(this._element,Nk).defaultPrevented)return;const M=this._getDimension();this._element.style[M]=`${this._element.getBoundingClientRect()[M]}px`,w(this._element),this._element.classList.add(sd),this._element.classList.remove(Ta,tg);for(const me of this._triggerArray){const Re=Q.getElementFromSelector(me);Re&&!this._isShown(Re)&&this._addAriaAndCollapsedClass([me],!1)}this._isTransitioning=!0;const q=()=>{this._isTransitioning=!1,this._element.classList.remove(sd),this._element.classList.add(Ta),W.trigger(this._element,Fk)};this._element.style[M]="",this._queueCallback(q,this._element,!0)}_isShown(_=this._element){return _.classList.contains(tg)}_configAfterMerge(_){return _.toggle=!!_.toggle,_.parent=y(_.parent),_}_getDimension(){return this._element.classList.contains(Wk)?Yk:Hk}_initializeChildren(){if(!this._config.parent)return;const _=this._getFirstLevelChildren(ng);for(const M of _){const q=Q.getElementFromSelector(M);q&&this._addAriaAndCollapsedClass([M],this._isShown(q))}}_getFirstLevelChildren(_){const M=Q.find(zk,this._config.parent);return Q.find(_,this._config.parent).filter(q=>!M.includes(q))}_addAriaAndCollapsedClass(_,M){if(_.length)for(const q of _)q.classList.toggle(Vk,!M),q.setAttribute("aria-expanded",M)}static jQueryInterface(_){const M={};return typeof _=="string"&&/show|hide/.test(_)&&(M.toggle=!1),this.each(function(){const q=Aa.getOrCreateInstance(this,M);if(typeof _=="string"){if(typeof q[_]>"u")throw new TypeError(`No method named "${_}"`);q[_]()}})}}W.on(document,Bk,ng,function(G){(G.target.tagName==="A"||G.delegateTarget&&G.delegateTarget.tagName==="A")&&G.preventDefault();for(const _ of Q.getMultipleElementsFromSelector(this))Aa.getOrCreateInstance(_,{toggle:!1}).toggle()}),P(Aa);const qy="dropdown",Co=".bs.dropdown",ig=".data-api",Gk="Escape",Zy="Tab",Xk="ArrowUp",Jy="ArrowDown",qk=2,Zk=`hide${Co}`,Jk=`hidden${Co}`,Qk=`show${Co}`,eM=`shown${Co}`,Qy=`click${Co}${ig}`,ev=`keydown${Co}${ig}`,tM=`keyup${Co}${ig}`,ka="show",nM="dropup",iM="dropend",sM="dropstart",rM="dropup-center",oM="dropdown-center",So='[data-bs-toggle="dropdown"]:not(.disabled):not(:disabled)',aM=`${So}.${ka}`,rd=".dropdown-menu",lM=".navbar",cM=".navbar-nav",uM=".dropdown-menu .dropdown-item:not(.disabled):not(:disabled)",dM=k()?"top-end":"top-start",hM=k()?"top-start":"top-end",fM=k()?"bottom-end":"bottom-start",gM=k()?"bottom-start":"bottom-end",pM=k()?"left-start":"right-start",mM=k()?"right-start":"left-start",_M="top",yM="bottom",vM={autoClose:!0,boundary:"clippingParents",display:"dynamic",offset:[0,2],popperConfig:null,reference:"toggle"},bM={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(_,M){super(_,M),this._popper=null,this._parent=this._element.parentNode,this._menu=Q.next(this._element,rd)[0]||Q.prev(this._element,rd)[0]||Q.findOne(rd,this._parent),this._inNavbar=this._detectNavbar()}static get Default(){return vM}static get DefaultType(){return bM}static get NAME(){return qy}toggle(){return this._isShown()?this.hide():this.show()}show(){if(b(this._element)||this._isShown())return;const _={relatedTarget:this._element};if(!W.trigger(this._element,Qk,_).defaultPrevented){if(this._createPopper(),"ontouchstart"in document.documentElement&&!this._parent.closest(cM))for(const q of[].concat(...document.body.children))W.on(q,"mouseover",E);this._element.focus(),this._element.setAttribute("aria-expanded",!0),this._menu.classList.add(ka),this._element.classList.add(ka),W.trigger(this._element,eM,_)}}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(!W.trigger(this._element,Zk,_).defaultPrevented){if("ontouchstart"in document.documentElement)for(const q of[].concat(...document.body.children))W.off(q,"mouseover",E);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"),W.trigger(this._element,Jk,_)}}_getConfig(_){if(_=super._getConfig(_),typeof _.reference=="object"&&!m(_.reference)&&typeof _.reference.getBoundingClientRect!="function")throw new TypeError(`${qy.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 M=this._getPopperConfig();this._popper=s.createPopper(_,this._menu,M)}_isShown(){return this._menu.classList.contains(ka)}_getPlacement(){const _=this._parent;if(_.classList.contains(iM))return pM;if(_.classList.contains(sM))return mM;if(_.classList.contains(rM))return _M;if(_.classList.contains(oM))return yM;const M=getComputedStyle(this._menu).getPropertyValue("--bs-position").trim()==="end";return _.classList.contains(nM)?M?hM:dM:M?gM:fM}_detectNavbar(){return this._element.closest(lM)!==null}_getOffset(){const{offset:_}=this._config;return typeof _=="string"?_.split(",").map(M=>Number.parseInt(M,10)):typeof _=="function"?M=>_(M,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}]),{..._,...B(this._config.popperConfig,[_])}}_selectMenuItem({key:_,target:M}){const q=Q.find(uM,this._menu).filter(me=>v(me));q.length&&ne(q,M,_===Jy,!q.includes(M)).focus()}static jQueryInterface(_){return this.each(function(){const M=Zi.getOrCreateInstance(this,_);if(typeof _=="string"){if(typeof M[_]>"u")throw new TypeError(`No method named "${_}"`);M[_]()}})}static clearMenus(_){if(_.button===qk||_.type==="keyup"&&_.key!==Zy)return;const M=Q.find(aM);for(const q of M){const me=Zi.getInstance(q);if(!me||me._config.autoClose===!1)continue;const Re=_.composedPath(),Ie=Re.includes(me._menu);if(Re.includes(me._element)||me._config.autoClose==="inside"&&!Ie||me._config.autoClose==="outside"&&Ie||me._menu.contains(_.target)&&(_.type==="keyup"&&_.key===Zy||/input|select|option|textarea|form/i.test(_.target.tagName)))continue;const rt={relatedTarget:me._element};_.type==="click"&&(rt.clickEvent=_),me._completeHide(rt)}}static dataApiKeydownHandler(_){const M=/input|textarea/i.test(_.target.tagName),q=_.key===Gk,me=[Xk,Jy].includes(_.key);if(!me&&!q||M&&!q)return;_.preventDefault();const Re=this.matches(So)?this:Q.prev(this,So)[0]||Q.next(this,So)[0]||Q.findOne(So,_.delegateTarget.parentNode),Ie=Zi.getOrCreateInstance(Re);if(me){_.stopPropagation(),Ie.show(),Ie._selectMenuItem(_);return}Ie._isShown()&&(_.stopPropagation(),Ie.hide(),Re.focus())}}W.on(document,ev,So,Zi.dataApiKeydownHandler),W.on(document,ev,rd,Zi.dataApiKeydownHandler),W.on(document,Qy,Zi.clearMenus),W.on(document,tM,Zi.clearMenus),W.on(document,Qy,So,function(G){G.preventDefault(),Zi.getOrCreateInstance(this).toggle()}),P(Zi);const tv="backdrop",wM="fade",nv="show",iv=`mousedown.bs.${tv}`,xM={className:"modal-backdrop",clickCallback:null,isAnimated:!1,isVisible:!0,rootElement:"body"},EM={className:"string",clickCallback:"(function|null)",isAnimated:"boolean",isVisible:"boolean",rootElement:"(element|string)"};class sv extends U{constructor(_){super(),this._config=this._getConfig(_),this._isAppended=!1,this._element=null}static get Default(){return xM}static get DefaultType(){return EM}static get NAME(){return tv}show(_){if(!this._config.isVisible){B(_);return}this._append();const M=this._getElement();this._config.isAnimated&&w(M),M.classList.add(nv),this._emulateAnimation(()=>{B(_)})}hide(_){if(!this._config.isVisible){B(_);return}this._getElement().classList.remove(nv),this._emulateAnimation(()=>{this.dispose(),B(_)})}dispose(){this._isAppended&&(W.off(this._element,iv),this._element.remove(),this._isAppended=!1)}_getElement(){if(!this._element){const _=document.createElement("div");_.className=this._config.className,this._config.isAnimated&&_.classList.add(wM),this._element=_}return this._element}_configAfterMerge(_){return _.rootElement=y(_.rootElement),_}_append(){if(this._isAppended)return;const _=this._getElement();this._config.rootElement.append(_),W.on(_,iv,()=>{B(this._config.clickCallback)}),this._isAppended=!0}_emulateAnimation(_){Y(_,this._getElement(),this._config.isAnimated)}}const CM="focustrap",od=".bs.focustrap",SM=`focusin${od}`,TM=`keydown.tab${od}`,AM="Tab",kM="forward",rv="backward",MM={autofocus:!0,trapElement:null},PM={autofocus:"boolean",trapElement:"element"};class ov extends U{constructor(_){super(),this._config=this._getConfig(_),this._isActive=!1,this._lastTabNavDirection=null}static get Default(){return MM}static get DefaultType(){return PM}static get NAME(){return CM}activate(){this._isActive||(this._config.autofocus&&this._config.trapElement.focus(),W.off(document,od),W.on(document,SM,_=>this._handleFocusin(_)),W.on(document,TM,_=>this._handleKeydown(_)),this._isActive=!0)}deactivate(){this._isActive&&(this._isActive=!1,W.off(document,od))}_handleFocusin(_){const{trapElement:M}=this._config;if(_.target===document||_.target===M||M.contains(_.target))return;const q=Q.focusableChildren(M);q.length===0?M.focus():this._lastTabNavDirection===rv?q[q.length-1].focus():q[0].focus()}_handleKeydown(_){_.key===AM&&(this._lastTabNavDirection=_.shiftKey?rv:kM)}}const av=".fixed-top, .fixed-bottom, .is-fixed, .sticky-top",lv=".sticky-top",ad="padding-right",cv="margin-right";class sg{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,ad,M=>M+_),this._setElementAttributes(av,ad,M=>M+_),this._setElementAttributes(lv,cv,M=>M-_)}reset(){this._resetElementAttributes(this._element,"overflow"),this._resetElementAttributes(this._element,ad),this._resetElementAttributes(av,ad),this._resetElementAttributes(lv,cv)}isOverflowing(){return this.getWidth()>0}_disableOverFlow(){this._saveInitialAttribute(this._element,"overflow"),this._element.style.overflow="hidden"}_setElementAttributes(_,M,q){const me=this.getWidth(),Re=Ie=>{if(Ie!==this._element&&window.innerWidth>Ie.clientWidth+me)return;this._saveInitialAttribute(Ie,M);const rt=window.getComputedStyle(Ie).getPropertyValue(M);Ie.style.setProperty(M,`${q(Number.parseFloat(rt))}px`)};this._applyManipulationCallback(_,Re)}_saveInitialAttribute(_,M){const q=_.style.getPropertyValue(M);q&&K.setDataAttribute(_,M,q)}_resetElementAttributes(_,M){const q=me=>{const Re=K.getDataAttribute(me,M);if(Re===null){me.style.removeProperty(M);return}K.removeDataAttribute(me,M),me.style.setProperty(M,Re)};this._applyManipulationCallback(_,q)}_applyManipulationCallback(_,M){if(m(_)){M(_);return}for(const q of Q.find(_,this._element))M(q)}}const IM="modal",Oi=".bs.modal",DM=".data-api",RM="Escape",LM=`hide${Oi}`,OM=`hidePrevented${Oi}`,uv=`hidden${Oi}`,dv=`show${Oi}`,$M=`shown${Oi}`,NM=`resize${Oi}`,FM=`click.dismiss${Oi}`,BM=`mousedown.dismiss${Oi}`,VM=`keydown.dismiss${Oi}`,zM=`click${Oi}${DM}`,hv="modal-open",WM="fade",fv="show",rg="modal-static",YM=".modal.show",HM=".modal-dialog",jM=".modal-body",KM='[data-bs-toggle="modal"]',UM={backdrop:!0,focus:!0,keyboard:!0},GM={backdrop:"(boolean|string)",focus:"boolean",keyboard:"boolean"};class To extends j{constructor(_,M){super(_,M),this._dialog=Q.findOne(HM,this._element),this._backdrop=this._initializeBackDrop(),this._focustrap=this._initializeFocusTrap(),this._isShown=!1,this._isTransitioning=!1,this._scrollBar=new sg,this._addEventListeners()}static get Default(){return UM}static get DefaultType(){return GM}static get NAME(){return IM}toggle(_){return this._isShown?this.hide():this.show(_)}show(_){this._isShown||this._isTransitioning||W.trigger(this._element,dv,{relatedTarget:_}).defaultPrevented||(this._isShown=!0,this._isTransitioning=!0,this._scrollBar.hide(),document.body.classList.add(hv),this._adjustDialog(),this._backdrop.show(()=>this._showElement(_)))}hide(){!this._isShown||this._isTransitioning||W.trigger(this._element,LM).defaultPrevented||(this._isShown=!1,this._isTransitioning=!0,this._focustrap.deactivate(),this._element.classList.remove(fv),this._queueCallback(()=>this._hideModal(),this._element,this._isAnimated()))}dispose(){W.off(window,Oi),W.off(this._dialog,Oi),this._backdrop.dispose(),this._focustrap.deactivate(),super.dispose()}handleUpdate(){this._adjustDialog()}_initializeBackDrop(){return new sv({isVisible:!!this._config.backdrop,isAnimated:this._isAnimated()})}_initializeFocusTrap(){return new ov({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 M=Q.findOne(jM,this._dialog);M&&(M.scrollTop=0),w(this._element),this._element.classList.add(fv);const q=()=>{this._config.focus&&this._focustrap.activate(),this._isTransitioning=!1,W.trigger(this._element,$M,{relatedTarget:_})};this._queueCallback(q,this._dialog,this._isAnimated())}_addEventListeners(){W.on(this._element,VM,_=>{if(_.key===RM){if(this._config.keyboard){this.hide();return}this._triggerBackdropTransition()}}),W.on(window,NM,()=>{this._isShown&&!this._isTransitioning&&this._adjustDialog()}),W.on(this._element,BM,_=>{W.one(this._element,FM,M=>{if(!(this._element!==_.target||this._element!==M.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(hv),this._resetAdjustments(),this._scrollBar.reset(),W.trigger(this._element,uv)})}_isAnimated(){return this._element.classList.contains(WM)}_triggerBackdropTransition(){if(W.trigger(this._element,OM).defaultPrevented)return;const M=this._element.scrollHeight>document.documentElement.clientHeight,q=this._element.style.overflowY;q==="hidden"||this._element.classList.contains(rg)||(M||(this._element.style.overflowY="hidden"),this._element.classList.add(rg),this._queueCallback(()=>{this._element.classList.remove(rg),this._queueCallback(()=>{this._element.style.overflowY=q},this._dialog)},this._dialog),this._element.focus())}_adjustDialog(){const _=this._element.scrollHeight>document.documentElement.clientHeight,M=this._scrollBar.getWidth(),q=M>0;if(q&&!_){const me=k()?"paddingLeft":"paddingRight";this._element.style[me]=`${M}px`}if(!q&&_){const me=k()?"paddingRight":"paddingLeft";this._element.style[me]=`${M}px`}}_resetAdjustments(){this._element.style.paddingLeft="",this._element.style.paddingRight=""}static jQueryInterface(_,M){return this.each(function(){const q=To.getOrCreateInstance(this,_);if(typeof _=="string"){if(typeof q[_]>"u")throw new TypeError(`No method named "${_}"`);q[_](M)}})}}W.on(document,zM,KM,function(G){const _=Q.getElementFromSelector(this);["A","AREA"].includes(this.tagName)&&G.preventDefault(),W.one(_,dv,me=>{me.defaultPrevented||W.one(_,uv,()=>{v(this)&&this.focus()})});const M=Q.findOne(YM);M&&To.getInstance(M).hide(),To.getOrCreateInstance(_).toggle(this)}),ge(To),P(To);const XM="offcanvas",Ys=".bs.offcanvas",gv=".data-api",qM=`load${Ys}${gv}`,ZM="Escape",pv="show",mv="showing",_v="hiding",JM="offcanvas-backdrop",yv=".offcanvas.show",QM=`show${Ys}`,eP=`shown${Ys}`,tP=`hide${Ys}`,vv=`hidePrevented${Ys}`,bv=`hidden${Ys}`,nP=`resize${Ys}`,iP=`click${Ys}${gv}`,sP=`keydown.dismiss${Ys}`,rP='[data-bs-toggle="offcanvas"]',oP={backdrop:!0,keyboard:!0,scroll:!1},aP={backdrop:"(boolean|string)",keyboard:"boolean",scroll:"boolean"};class Hs extends j{constructor(_,M){super(_,M),this._isShown=!1,this._backdrop=this._initializeBackDrop(),this._focustrap=this._initializeFocusTrap(),this._addEventListeners()}static get Default(){return oP}static get DefaultType(){return aP}static get NAME(){return XM}toggle(_){return this._isShown?this.hide():this.show(_)}show(_){if(this._isShown||W.trigger(this._element,QM,{relatedTarget:_}).defaultPrevented)return;this._isShown=!0,this._backdrop.show(),this._config.scroll||new sg().hide(),this._element.setAttribute("aria-modal",!0),this._element.setAttribute("role","dialog"),this._element.classList.add(mv);const q=()=>{(!this._config.scroll||this._config.backdrop)&&this._focustrap.activate(),this._element.classList.add(pv),this._element.classList.remove(mv),W.trigger(this._element,eP,{relatedTarget:_})};this._queueCallback(q,this._element,!0)}hide(){if(!this._isShown||W.trigger(this._element,tP).defaultPrevented)return;this._focustrap.deactivate(),this._element.blur(),this._isShown=!1,this._element.classList.add(_v),this._backdrop.hide();const M=()=>{this._element.classList.remove(pv,_v),this._element.removeAttribute("aria-modal"),this._element.removeAttribute("role"),this._config.scroll||new sg().reset(),W.trigger(this._element,bv)};this._queueCallback(M,this._element,!0)}dispose(){this._backdrop.dispose(),this._focustrap.deactivate(),super.dispose()}_initializeBackDrop(){const _=()=>{if(this._config.backdrop==="static"){W.trigger(this._element,vv);return}this.hide()},M=!!this._config.backdrop;return new sv({className:JM,isVisible:M,isAnimated:!0,rootElement:this._element.parentNode,clickCallback:M?_:null})}_initializeFocusTrap(){return new ov({trapElement:this._element})}_addEventListeners(){W.on(this._element,sP,_=>{if(_.key===ZM){if(this._config.keyboard){this.hide();return}W.trigger(this._element,vv)}})}static jQueryInterface(_){return this.each(function(){const M=Hs.getOrCreateInstance(this,_);if(typeof _=="string"){if(M[_]===void 0||_.startsWith("_")||_==="constructor")throw new TypeError(`No method named "${_}"`);M[_](this)}})}}W.on(document,iP,rP,function(G){const _=Q.getElementFromSelector(this);if(["A","AREA"].includes(this.tagName)&&G.preventDefault(),b(this))return;W.one(_,bv,()=>{v(this)&&this.focus()});const M=Q.findOne(yv);M&&M!==_&&Hs.getInstance(M).hide(),Hs.getOrCreateInstance(_).toggle(this)}),W.on(window,qM,()=>{for(const G of Q.find(yv))Hs.getOrCreateInstance(G).show()}),W.on(window,nP,()=>{for(const G of Q.find("[aria-modal][class*=show][class*=offcanvas-]"))getComputedStyle(G).position!=="fixed"&&Hs.getOrCreateInstance(G).hide()}),ge(Hs),P(Hs);const wv={"*":["class","dir","id","lang","role",/^aria-[\w-]*$/i],a:["target","href","title","rel"],area:[],b:[],br:[],col:[],code:[],dd:[],div:[],dl:[],dt:[],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:[]},lP=new Set(["background","cite","href","itemtype","longdesc","poster","src","xlink:href"]),cP=/^(?!javascript:)(?:[a-z0-9+.-]+:|[^&:/?#]*(?:[/?#]|$))/i,uP=(G,_)=>{const M=G.nodeName.toLowerCase();return _.includes(M)?lP.has(M)?!!cP.test(G.nodeValue):!0:_.filter(q=>q instanceof RegExp).some(q=>q.test(M))};function dP(G,_,M){if(!G.length)return G;if(M&&typeof M=="function")return M(G);const me=new window.DOMParser().parseFromString(G,"text/html"),Re=[].concat(...me.body.querySelectorAll("*"));for(const Ie of Re){const rt=Ie.nodeName.toLowerCase();if(!Object.keys(_).includes(rt)){Ie.remove();continue}const ui=[].concat(...Ie.attributes),$i=[].concat(_["*"]||[],_[rt]||[]);for(const Tn of ui)uP(Tn,$i)||Ie.removeAttribute(Tn.nodeName)}return me.body.innerHTML}const hP="TemplateFactory",fP={allowList:wv,content:{},extraClass:"",html:!1,sanitize:!0,sanitizeFn:null,template:"
"},gP={allowList:"object",content:"object",extraClass:"(string|function)",html:"boolean",sanitize:"boolean",sanitizeFn:"(null|function)",template:"string"},pP={entry:"(string|element|function|null)",selector:"(string|element)"};class mP extends U{constructor(_){super(),this._config=this._getConfig(_)}static get Default(){return fP}static get DefaultType(){return gP}static get NAME(){return hP}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[me,Re]of Object.entries(this._config.content))this._setContent(_,Re,me);const M=_.children[0],q=this._resolvePossibleFunction(this._config.extraClass);return q&&M.classList.add(...q.split(" ")),M}_typeCheckConfig(_){super._typeCheckConfig(_),this._checkContent(_.content)}_checkContent(_){for(const[M,q]of Object.entries(_))super._typeCheckConfig({selector:M,entry:q},pP)}_setContent(_,M,q){const me=Q.findOne(q,_);if(me){if(M=this._resolvePossibleFunction(M),!M){me.remove();return}if(m(M)){this._putElementInTemplate(y(M),me);return}if(this._config.html){me.innerHTML=this._maybeSanitize(M);return}me.textContent=M}}_maybeSanitize(_){return this._config.sanitize?dP(_,this._config.allowList,this._config.sanitizeFn):_}_resolvePossibleFunction(_){return B(_,[this])}_putElementInTemplate(_,M){if(this._config.html){M.innerHTML="",M.append(_);return}M.textContent=_.textContent}}const _P="tooltip",yP=new Set(["sanitize","allowList","sanitizeFn"]),og="fade",vP="modal",ld="show",bP=".tooltip-inner",xv=`.${vP}`,Ev="hide.bs.modal",nc="hover",ag="focus",wP="click",xP="manual",EP="hide",CP="hidden",SP="show",TP="shown",AP="inserted",kP="click",MP="focusin",PP="focusout",IP="mouseenter",DP="mouseleave",RP={AUTO:"auto",TOP:"top",RIGHT:k()?"left":"right",BOTTOM:"bottom",LEFT:k()?"right":"left"},LP={allowList:wv,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"},OP={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 Ao extends j{constructor(_,M){if(typeof s>"u")throw new TypeError("Bootstrap's tooltips require Popper (https://popper.js.org)");super(_,M),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 LP}static get DefaultType(){return OP}static get NAME(){return _P}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),W.off(this._element.closest(xv),Ev,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 _=W.trigger(this._element,this.constructor.eventName(SP)),q=(x(this._element)||this._element.ownerDocument.documentElement).contains(this._element);if(_.defaultPrevented||!q)return;this._disposePopper();const me=this._getTipElement();this._element.setAttribute("aria-describedby",me.getAttribute("id"));const{container:Re}=this._config;if(this._element.ownerDocument.documentElement.contains(this.tip)||(Re.append(me),W.trigger(this._element,this.constructor.eventName(AP))),this._popper=this._createPopper(me),me.classList.add(ld),"ontouchstart"in document.documentElement)for(const rt of[].concat(...document.body.children))W.on(rt,"mouseover",E);const Ie=()=>{W.trigger(this._element,this.constructor.eventName(TP)),this._isHovered===!1&&this._leave(),this._isHovered=!1};this._queueCallback(Ie,this.tip,this._isAnimated())}hide(){if(!this._isShown()||W.trigger(this._element,this.constructor.eventName(EP)).defaultPrevented)return;if(this._getTipElement().classList.remove(ld),"ontouchstart"in document.documentElement)for(const me of[].concat(...document.body.children))W.off(me,"mouseover",E);this._activeTrigger[wP]=!1,this._activeTrigger[ag]=!1,this._activeTrigger[nc]=!1,this._isHovered=null;const q=()=>{this._isWithActiveTrigger()||(this._isHovered||this._disposePopper(),this._element.removeAttribute("aria-describedby"),W.trigger(this._element,this.constructor.eventName(CP)))};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 M=this._getTemplateFactory(_).toHtml();if(!M)return null;M.classList.remove(og,ld),M.classList.add(`bs-${this.constructor.NAME}-auto`);const q=h(this.constructor.NAME).toString();return M.setAttribute("id",q),this._isAnimated()&&M.classList.add(og),M}setContent(_){this._newContent=_,this._isShown()&&(this._disposePopper(),this.show())}_getTemplateFactory(_){return this._templateFactory?this._templateFactory.changeContent(_):this._templateFactory=new mP({...this._config,content:_,extraClass:this._resolvePossibleFunction(this._config.customClass)}),this._templateFactory}_getContentForTemplate(){return{[bP]: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(og)}_isShown(){return this.tip&&this.tip.classList.contains(ld)}_createPopper(_){const M=B(this._config.placement,[this,_,this._element]),q=RP[M.toUpperCase()];return s.createPopper(this._element,_,this._getPopperConfig(q))}_getOffset(){const{offset:_}=this._config;return typeof _=="string"?_.split(",").map(M=>Number.parseInt(M,10)):typeof _=="function"?M=>_(M,this._element):_}_resolvePossibleFunction(_){return B(_,[this._element])}_getPopperConfig(_){const M={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{...M,...B(this._config.popperConfig,[M])}}_setListeners(){const _=this._config.trigger.split(" ");for(const M of _)if(M==="click")W.on(this._element,this.constructor.eventName(kP),this._config.selector,q=>{this._initializeOnDelegatedTarget(q).toggle()});else if(M!==xP){const q=M===nc?this.constructor.eventName(IP):this.constructor.eventName(MP),me=M===nc?this.constructor.eventName(DP):this.constructor.eventName(PP);W.on(this._element,q,this._config.selector,Re=>{const Ie=this._initializeOnDelegatedTarget(Re);Ie._activeTrigger[Re.type==="focusin"?ag:nc]=!0,Ie._enter()}),W.on(this._element,me,this._config.selector,Re=>{const Ie=this._initializeOnDelegatedTarget(Re);Ie._activeTrigger[Re.type==="focusout"?ag:nc]=Ie._element.contains(Re.relatedTarget),Ie._leave()})}this._hideModalHandler=()=>{this._element&&this.hide()},W.on(this._element.closest(xv),Ev,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(_,M){clearTimeout(this._timeout),this._timeout=setTimeout(_,M)}_isWithActiveTrigger(){return Object.values(this._activeTrigger).includes(!0)}_getConfig(_){const M=K.getDataAttributes(this._element);for(const q of Object.keys(M))yP.has(q)&&delete M[q];return _={...M,...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[M,q]of Object.entries(this._config))this.constructor.Default[M]!==q&&(_[M]=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 M=Ao.getOrCreateInstance(this,_);if(typeof _=="string"){if(typeof M[_]>"u")throw new TypeError(`No method named "${_}"`);M[_]()}})}}P(Ao);const $P="popover",NP=".popover-header",FP=".popover-body",BP={...Ao.Default,content:"",offset:[0,8],placement:"right",template:'',trigger:"click"},VP={...Ao.DefaultType,content:"(null|string|element|function)"};class cd extends Ao{static get Default(){return BP}static get DefaultType(){return VP}static get NAME(){return $P}_isWithContent(){return this._getTitle()||this._getContent()}_getContentForTemplate(){return{[NP]:this._getTitle(),[FP]:this._getContent()}}_getContent(){return this._resolvePossibleFunction(this._config.content)}static jQueryInterface(_){return this.each(function(){const M=cd.getOrCreateInstance(this,_);if(typeof _=="string"){if(typeof M[_]>"u")throw new TypeError(`No method named "${_}"`);M[_]()}})}}P(cd);const zP="scrollspy",lg=".bs.scrollspy",WP=".data-api",YP=`activate${lg}`,Cv=`click${lg}`,HP=`load${lg}${WP}`,jP="dropdown-item",Ma="active",KP='[data-bs-spy="scroll"]',cg="[href]",UP=".nav, .list-group",Sv=".nav-link",GP=`${Sv}, .nav-item > ${Sv}, .list-group-item`,XP=".dropdown",qP=".dropdown-toggle",ZP={offset:null,rootMargin:"0px 0px -25%",smoothScroll:!1,target:null,threshold:[.1,.5,1]},JP={offset:"(number|null)",rootMargin:"string",smoothScroll:"boolean",target:"element",threshold:"array"};class ic extends j{constructor(_,M){super(_,M),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 ZP}static get DefaultType(){return JP}static get NAME(){return zP}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(M=>Number.parseFloat(M))),_}_maybeEnableSmoothScroll(){this._config.smoothScroll&&(W.off(this._config.target,Cv),W.on(this._config.target,Cv,cg,_=>{const M=this._observableSections.get(_.target.hash);if(M){_.preventDefault();const q=this._rootElement||window,me=M.offsetTop-this._element.offsetTop;if(q.scrollTo){q.scrollTo({top:me,behavior:"smooth"});return}q.scrollTop=me}}))}_getNewObserver(){const _={root:this._rootElement,threshold:this._config.threshold,rootMargin:this._config.rootMargin};return new IntersectionObserver(M=>this._observerCallback(M),_)}_observerCallback(_){const M=Ie=>this._targetLinks.get(`#${Ie.target.id}`),q=Ie=>{this._previousScrollData.visibleEntryTop=Ie.target.offsetTop,this._process(M(Ie))},me=(this._rootElement||document.documentElement).scrollTop,Re=me>=this._previousScrollData.parentScrollTop;this._previousScrollData.parentScrollTop=me;for(const Ie of _){if(!Ie.isIntersecting){this._activeTarget=null,this._clearActiveClass(M(Ie));continue}const rt=Ie.target.offsetTop>=this._previousScrollData.visibleEntryTop;if(Re&&rt){if(q(Ie),!me)return;continue}!Re&&!rt&&q(Ie)}}_initializeTargetsAndObservables(){this._targetLinks=new Map,this._observableSections=new Map;const _=Q.find(cg,this._config.target);for(const M of _){if(!M.hash||b(M))continue;const q=Q.findOne(decodeURI(M.hash),this._element);v(q)&&(this._targetLinks.set(decodeURI(M.hash),M),this._observableSections.set(M.hash,q))}}_process(_){this._activeTarget!==_&&(this._clearActiveClass(this._config.target),this._activeTarget=_,_.classList.add(Ma),this._activateParents(_),W.trigger(this._element,YP,{relatedTarget:_}))}_activateParents(_){if(_.classList.contains(jP)){Q.findOne(qP,_.closest(XP)).classList.add(Ma);return}for(const M of Q.parents(_,UP))for(const q of Q.prev(M,GP))q.classList.add(Ma)}_clearActiveClass(_){_.classList.remove(Ma);const M=Q.find(`${cg}.${Ma}`,_);for(const q of M)q.classList.remove(Ma)}static jQueryInterface(_){return this.each(function(){const M=ic.getOrCreateInstance(this,_);if(typeof _=="string"){if(M[_]===void 0||_.startsWith("_")||_==="constructor")throw new TypeError(`No method named "${_}"`);M[_]()}})}}W.on(window,HP,()=>{for(const G of Q.find(KP))ic.getOrCreateInstance(G)}),P(ic);const QP="tab",ko=".bs.tab",e2=`hide${ko}`,t2=`hidden${ko}`,n2=`show${ko}`,i2=`shown${ko}`,s2=`click${ko}`,r2=`keydown${ko}`,o2=`load${ko}`,a2="ArrowLeft",Tv="ArrowRight",l2="ArrowUp",Av="ArrowDown",ug="Home",kv="End",Mo="active",Mv="fade",dg="show",c2="dropdown",Pv=".dropdown-toggle",u2=".dropdown-menu",hg=`:not(${Pv})`,d2='.list-group, .nav, [role="tablist"]',h2=".nav-item, .list-group-item",f2=`.nav-link${hg}, .list-group-item${hg}, [role="tab"]${hg}`,Iv='[data-bs-toggle="tab"], [data-bs-toggle="pill"], [data-bs-toggle="list"]',fg=`${f2}, ${Iv}`,g2=`.${Mo}[data-bs-toggle="tab"], .${Mo}[data-bs-toggle="pill"], .${Mo}[data-bs-toggle="list"]`;class Po extends j{constructor(_){super(_),this._parent=this._element.closest(d2),this._parent&&(this._setInitialAttributes(this._parent,this._getChildren()),W.on(this._element,r2,M=>this._keydown(M)))}static get NAME(){return QP}show(){const _=this._element;if(this._elemIsActive(_))return;const M=this._getActiveElem(),q=M?W.trigger(M,e2,{relatedTarget:_}):null;W.trigger(_,n2,{relatedTarget:M}).defaultPrevented||q&&q.defaultPrevented||(this._deactivate(M,_),this._activate(_,M))}_activate(_,M){if(!_)return;_.classList.add(Mo),this._activate(Q.getElementFromSelector(_));const q=()=>{if(_.getAttribute("role")!=="tab"){_.classList.add(dg);return}_.removeAttribute("tabindex"),_.setAttribute("aria-selected",!0),this._toggleDropDown(_,!0),W.trigger(_,i2,{relatedTarget:M})};this._queueCallback(q,_,_.classList.contains(Mv))}_deactivate(_,M){if(!_)return;_.classList.remove(Mo),_.blur(),this._deactivate(Q.getElementFromSelector(_));const q=()=>{if(_.getAttribute("role")!=="tab"){_.classList.remove(dg);return}_.setAttribute("aria-selected",!1),_.setAttribute("tabindex","-1"),this._toggleDropDown(_,!1),W.trigger(_,t2,{relatedTarget:M})};this._queueCallback(q,_,_.classList.contains(Mv))}_keydown(_){if(![a2,Tv,l2,Av,ug,kv].includes(_.key))return;_.stopPropagation(),_.preventDefault();const M=this._getChildren().filter(me=>!b(me));let q;if([ug,kv].includes(_.key))q=M[_.key===ug?0:M.length-1];else{const me=[Tv,Av].includes(_.key);q=ne(M,_.target,me,!0)}q&&(q.focus({preventScroll:!0}),Po.getOrCreateInstance(q).show())}_getChildren(){return Q.find(fg,this._parent)}_getActiveElem(){return this._getChildren().find(_=>this._elemIsActive(_))||null}_setInitialAttributes(_,M){this._setAttributeIfNotExists(_,"role","tablist");for(const q of M)this._setInitialAttributesOnChild(q)}_setInitialAttributesOnChild(_){_=this._getInnerElement(_);const M=this._elemIsActive(_),q=this._getOuterElement(_);_.setAttribute("aria-selected",M),q!==_&&this._setAttributeIfNotExists(q,"role","presentation"),M||_.setAttribute("tabindex","-1"),this._setAttributeIfNotExists(_,"role","tab"),this._setInitialAttributesOnTargetPanel(_)}_setInitialAttributesOnTargetPanel(_){const M=Q.getElementFromSelector(_);M&&(this._setAttributeIfNotExists(M,"role","tabpanel"),_.id&&this._setAttributeIfNotExists(M,"aria-labelledby",`${_.id}`))}_toggleDropDown(_,M){const q=this._getOuterElement(_);if(!q.classList.contains(c2))return;const me=(Re,Ie)=>{const rt=Q.findOne(Re,q);rt&&rt.classList.toggle(Ie,M)};me(Pv,Mo),me(u2,dg),q.setAttribute("aria-expanded",M)}_setAttributeIfNotExists(_,M,q){_.hasAttribute(M)||_.setAttribute(M,q)}_elemIsActive(_){return _.classList.contains(Mo)}_getInnerElement(_){return _.matches(fg)?_:Q.findOne(fg,_)}_getOuterElement(_){return _.closest(h2)||_}static jQueryInterface(_){return this.each(function(){const M=Po.getOrCreateInstance(this);if(typeof _=="string"){if(M[_]===void 0||_.startsWith("_")||_==="constructor")throw new TypeError(`No method named "${_}"`);M[_]()}})}}W.on(document,s2,Iv,function(G){["A","AREA"].includes(this.tagName)&&G.preventDefault(),!b(this)&&Po.getOrCreateInstance(this).show()}),W.on(window,o2,()=>{for(const G of Q.find(g2))Po.getOrCreateInstance(G)}),P(Po);const p2="toast",Sr=".bs.toast",m2=`mouseover${Sr}`,_2=`mouseout${Sr}`,y2=`focusin${Sr}`,v2=`focusout${Sr}`,b2=`hide${Sr}`,w2=`hidden${Sr}`,x2=`show${Sr}`,E2=`shown${Sr}`,C2="fade",Dv="hide",ud="show",dd="showing",S2={animation:"boolean",autohide:"boolean",delay:"number"},T2={animation:!0,autohide:!0,delay:5e3};class sc extends j{constructor(_,M){super(_,M),this._timeout=null,this._hasMouseInteraction=!1,this._hasKeyboardInteraction=!1,this._setListeners()}static get Default(){return T2}static get DefaultType(){return S2}static get NAME(){return p2}show(){if(W.trigger(this._element,x2).defaultPrevented)return;this._clearTimeout(),this._config.animation&&this._element.classList.add(C2);const M=()=>{this._element.classList.remove(dd),W.trigger(this._element,E2),this._maybeScheduleHide()};this._element.classList.remove(Dv),w(this._element),this._element.classList.add(ud,dd),this._queueCallback(M,this._element,this._config.animation)}hide(){if(!this.isShown()||W.trigger(this._element,b2).defaultPrevented)return;const M=()=>{this._element.classList.add(Dv),this._element.classList.remove(dd,ud),W.trigger(this._element,w2)};this._element.classList.add(dd),this._queueCallback(M,this._element,this._config.animation)}dispose(){this._clearTimeout(),this.isShown()&&this._element.classList.remove(ud),super.dispose()}isShown(){return this._element.classList.contains(ud)}_maybeScheduleHide(){this._config.autohide&&(this._hasMouseInteraction||this._hasKeyboardInteraction||(this._timeout=setTimeout(()=>{this.hide()},this._config.delay)))}_onInteraction(_,M){switch(_.type){case"mouseover":case"mouseout":{this._hasMouseInteraction=M;break}case"focusin":case"focusout":{this._hasKeyboardInteraction=M;break}}if(M){this._clearTimeout();return}const q=_.relatedTarget;this._element===q||this._element.contains(q)||this._maybeScheduleHide()}_setListeners(){W.on(this._element,m2,_=>this._onInteraction(_,!0)),W.on(this._element,_2,_=>this._onInteraction(_,!1)),W.on(this._element,y2,_=>this._onInteraction(_,!0)),W.on(this._element,v2,_=>this._onInteraction(_,!1))}_clearTimeout(){clearTimeout(this._timeout),this._timeout=null}static jQueryInterface(_){return this.each(function(){const M=sc.getOrCreateInstance(this,_);if(typeof _=="string"){if(typeof M[_]>"u")throw new TypeError(`No method named "${_}"`);M[_](this)}})}}return ge(sc),P(sc),{Alert:Qe,Button:oe,Carousel:Sa,Collapse:Aa,Dropdown:Zi,Modal:To,Offcanvas:Hs,Popover:cd,ScrollSpy:ic,Tab:Po,Toast:sc,Tooltip:Ao}})})(P2);/** * @vue/shared v3.5.11 * (c) 2018-present Yuxi (Evan) You and Vue contributors * @license MIT -**//*! #__NO_SIDE_EFFECTS__ */function Xm(t){const e=Object.create(null);for(const n of t.split(","))e[n]=1;return n=>n in e}const kt={},sl=[],Ls=()=>{},b2=()=>!1,Qh=t=>t.charCodeAt(0)===111&&t.charCodeAt(1)===110&&(t.charCodeAt(2)>122||t.charCodeAt(2)<97),qm=t=>t.startsWith("onUpdate:"),_n=Object.assign,Zm=(t,e)=>{const n=t.indexOf(e);n>-1&&t.splice(n,1)},w2=Object.prototype.hasOwnProperty,bt=(t,e)=>w2.call(t,e),Ye=Array.isArray,rl=t=>Ou(t)==="[object Map]",Kl=t=>Ou(t)==="[object Set]",zv=t=>Ou(t)==="[object Date]",qe=t=>typeof t=="function",Ht=t=>typeof t=="string",Fs=t=>typeof t=="symbol",Mt=t=>t!==null&&typeof t=="object",bx=t=>(Mt(t)||qe(t))&&qe(t.then)&&qe(t.catch),wx=Object.prototype.toString,Ou=t=>wx.call(t),x2=t=>Ou(t).slice(8,-1),xx=t=>Ou(t)==="[object Object]",Jm=t=>Ht(t)&&t!=="NaN"&&t[0]!=="-"&&""+parseInt(t,10)===t,Oc=Xm(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),ef=t=>{const e=Object.create(null);return n=>e[n]||(e[n]=t(n))},E2=/-(\w)/g,ji=ef(t=>t.replace(E2,(e,n)=>n?n.toUpperCase():"")),C2=/\B([A-Z])/g,go=ef(t=>t.replace(C2,"-$1").toLowerCase()),tf=ef(t=>t.charAt(0).toUpperCase()+t.slice(1)),gg=ef(t=>t?`on${tf(t)}`:""),so=(t,e)=>!Object.is(t,e),eh=(t,...e)=>{for(let n=0;n{Object.defineProperty(t,e,{configurable:!0,enumerable:!1,writable:i,value:n})},hh=t=>{const e=parseFloat(t);return isNaN(e)?t:e},Cx=t=>{const e=Ht(t)?Number(t):NaN;return isNaN(e)?t:e};let Wv;const Sx=()=>Wv||(Wv=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});function Pn(t){if(Ye(t)){const e={};for(let n=0;n{if(n){const i=n.split(T2);i.length>1&&(e[i[0].trim()]=i[1].trim())}}),e}function Pe(t){let e="";if(Ht(t))e=t;else if(Ye(t))for(let n=0;naa(n,e))}const Ax=t=>!!(t&&t.__v_isRef===!0),we=t=>Ht(t)?t:t==null?"":Ye(t)||Mt(t)&&(t.toString===wx||!qe(t.toString))?Ax(t)?we(t.value):JSON.stringify(t,kx,2):String(t),kx=(t,e)=>Ax(e)?kx(t,e.value):rl(e)?{[`Map(${e.size})`]:[...e.entries()].reduce((n,[i,s],r)=>(n[pg(i,r)+" =>"]=s,n),{})}:Kl(e)?{[`Set(${e.size})`]:[...e.values()].map(n=>pg(n))}:Fs(e)?pg(e):Mt(e)&&!Ye(e)&&!xx(e)?String(e):e,pg=(t,e="")=>{var n;return Fs(t)?`Symbol(${(n=t.description)!=null?n:e})`:t};/** +**//*! #__NO_SIDE_EFFECTS__ */function Xm(t){const e=Object.create(null);for(const n of t.split(","))e[n]=1;return n=>n in e}const kt={},sl=[],Ls=()=>{},bI=()=>!1,Qh=t=>t.charCodeAt(0)===111&&t.charCodeAt(1)===110&&(t.charCodeAt(2)>122||t.charCodeAt(2)<97),qm=t=>t.startsWith("onUpdate:"),_n=Object.assign,Zm=(t,e)=>{const n=t.indexOf(e);n>-1&&t.splice(n,1)},wI=Object.prototype.hasOwnProperty,bt=(t,e)=>wI.call(t,e),Ye=Array.isArray,rl=t=>Ou(t)==="[object Map]",Kl=t=>Ou(t)==="[object Set]",zv=t=>Ou(t)==="[object Date]",qe=t=>typeof t=="function",Ht=t=>typeof t=="string",Fs=t=>typeof t=="symbol",Mt=t=>t!==null&&typeof t=="object",bx=t=>(Mt(t)||qe(t))&&qe(t.then)&&qe(t.catch),wx=Object.prototype.toString,Ou=t=>wx.call(t),xI=t=>Ou(t).slice(8,-1),xx=t=>Ou(t)==="[object Object]",Jm=t=>Ht(t)&&t!=="NaN"&&t[0]!=="-"&&""+parseInt(t,10)===t,Oc=Xm(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),ef=t=>{const e=Object.create(null);return n=>e[n]||(e[n]=t(n))},EI=/-(\w)/g,ji=ef(t=>t.replace(EI,(e,n)=>n?n.toUpperCase():"")),CI=/\B([A-Z])/g,go=ef(t=>t.replace(CI,"-$1").toLowerCase()),tf=ef(t=>t.charAt(0).toUpperCase()+t.slice(1)),gg=ef(t=>t?`on${tf(t)}`:""),so=(t,e)=>!Object.is(t,e),eh=(t,...e)=>{for(let n=0;n{Object.defineProperty(t,e,{configurable:!0,enumerable:!1,writable:i,value:n})},hh=t=>{const e=parseFloat(t);return isNaN(e)?t:e},Cx=t=>{const e=Ht(t)?Number(t):NaN;return isNaN(e)?t:e};let Wv;const Sx=()=>Wv||(Wv=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});function Pn(t){if(Ye(t)){const e={};for(let n=0;n{if(n){const i=n.split(TI);i.length>1&&(e[i[0].trim()]=i[1].trim())}}),e}function Pe(t){let e="";if(Ht(t))e=t;else if(Ye(t))for(let n=0;naa(n,e))}const Ax=t=>!!(t&&t.__v_isRef===!0),we=t=>Ht(t)?t:t==null?"":Ye(t)||Mt(t)&&(t.toString===wx||!qe(t.toString))?Ax(t)?we(t.value):JSON.stringify(t,kx,2):String(t),kx=(t,e)=>Ax(e)?kx(t,e.value):rl(e)?{[`Map(${e.size})`]:[...e.entries()].reduce((n,[i,s],r)=>(n[pg(i,r)+" =>"]=s,n),{})}:Kl(e)?{[`Set(${e.size})`]:[...e.values()].map(n=>pg(n))}:Fs(e)?pg(e):Mt(e)&&!Ye(e)&&!xx(e)?String(e):e,pg=(t,e="")=>{var n;return Fs(t)?`Symbol(${(n=t.description)!=null?n:e})`:t};/** * @vue/reactivity v3.5.11 * (c) 2018-present Yuxi (Evan) You and Vue contributors * @license MIT -**/let Qn;class Mx{constructor(e=!1){this.detached=e,this._active=!0,this.effects=[],this.cleanups=[],this._isPaused=!1,this.parent=Qn,!e&&Qn&&(this.index=(Qn.scopes||(Qn.scopes=[])).push(this)-1)}get active(){return this._active}pause(){if(this._active){this._isPaused=!0;let e,n;if(this.scopes)for(e=0,n=this.scopes.length;e0)return;if(Nc){let e=Nc;for(Nc=void 0;e;){const n=e.next;e.next=void 0,e.flags&=-9,e=n}}let t;for(;$c;){let e=$c;for($c=void 0;e;){const n=e.next;if(e.next=void 0,e.flags&=-9,e.flags&1)try{e.trigger()}catch(i){t||(t=i)}e=n}}if(t)throw t}function Lx(t){for(let e=t.deps;e;e=e.nextDep)e.version=-1,e.prevActiveLink=e.dep.activeLink,e.dep.activeLink=e}function Ox(t){let e,n=t.depsTail,i=n;for(;i;){const s=i.prevDep;i.version===-1?(i===n&&(n=s),i_(i),D2(i)):e=i,i.dep.activeLink=i.prevActiveLink,i.prevActiveLink=void 0,i=s}t.deps=e,t.depsTail=n}function Dp(t){for(let e=t.deps;e;e=e.nextDep)if(e.dep.version!==e.version||e.dep.computed&&($x(e.dep.computed)||e.dep.version!==e.version))return!0;return!!t._dirty}function $x(t){if(t.flags&4&&!(t.flags&16)||(t.flags&=-17,t.globalVersion===Qc))return;t.globalVersion=Qc;const e=t.dep;if(t.flags|=2,e.version>0&&!t.isSSR&&t.deps&&!Dp(t)){t.flags&=-3;return}const n=It,i=cs;It=t,cs=!0;try{Lx(t);const s=t.fn(t._value);(e.version===0||so(s,t._value))&&(t._value=s,e.version++)}catch(s){throw e.version++,s}finally{It=n,cs=i,Ox(t),t.flags&=-3}}function i_(t,e=!1){const{dep:n,prevSub:i,nextSub:s}=t;if(i&&(i.nextSub=s,t.prevSub=void 0),s&&(s.prevSub=i,t.nextSub=void 0),n.subs===t&&(n.subs=i),!n.subs&&n.computed){n.computed.flags&=-5;for(let r=n.computed.deps;r;r=r.nextDep)i_(r,!0)}!e&&!--n.sc&&n.map&&n.map.delete(n.key)}function D2(t){const{prevDep:e,nextDep:n}=t;e&&(e.nextDep=n,t.prevDep=void 0),n&&(n.prevDep=e,t.nextDep=void 0)}let cs=!0;const Nx=[];function po(){Nx.push(cs),cs=!1}function mo(){const t=Nx.pop();cs=t===void 0?!0:t}function Yv(t){const{cleanup:e}=t;if(t.cleanup=void 0,e){const n=It;It=void 0;try{e()}finally{It=n}}}let Qc=0;class R2{constructor(e,n){this.sub=e,this.dep=n,this.version=n.version,this.nextDep=this.prevDep=this.nextSub=this.prevSub=this.prevActiveLink=void 0}}class s_{constructor(e){this.computed=e,this.version=0,this.activeLink=void 0,this.subs=void 0,this.map=void 0,this.key=void 0,this.sc=0}track(e){if(!It||!cs||It===this.computed)return;let n=this.activeLink;if(n===void 0||n.sub!==It)n=this.activeLink=new R2(It,this),It.deps?(n.prevDep=It.depsTail,It.depsTail.nextDep=n,It.depsTail=n):It.deps=It.depsTail=n,Fx(n);else if(n.version===-1&&(n.version=this.version,n.nextDep)){const i=n.nextDep;i.prevDep=n.prevDep,n.prevDep&&(n.prevDep.nextDep=i),n.prevDep=It.depsTail,n.nextDep=void 0,It.depsTail.nextDep=n,It.depsTail=n,It.deps===n&&(It.deps=i)}return n}trigger(e){this.version++,Qc++,this.notify(e)}notify(e){t_();try{for(let n=this.subs;n;n=n.prevSub)n.sub.notify()&&n.sub.dep.notify()}finally{n_()}}}function Fx(t){if(t.dep.sc++,t.sub.flags&4){const e=t.dep.computed;if(e&&!t.dep.subs){e.flags|=20;for(let i=e.deps;i;i=i.nextDep)Fx(i)}const n=t.dep.subs;n!==t&&(t.prevSub=n,n&&(n.nextSub=t)),t.dep.subs=t}}const fh=new WeakMap,Qo=Symbol(""),Rp=Symbol(""),eu=Symbol("");function Gn(t,e,n){if(cs&&It){let i=fh.get(t);i||fh.set(t,i=new Map);let s=i.get(n);s||(i.set(n,s=new s_),s.map=i,s.key=n),s.track()}}function dr(t,e,n,i,s,r){const o=fh.get(t);if(!o){Qc++;return}const a=l=>{l&&l.trigger()};if(t_(),e==="clear")o.forEach(a);else{const l=Ye(t),c=l&&Jm(n);if(l&&n==="length"){const u=Number(i);o.forEach((d,h)=>{(h==="length"||h===eu||!Fs(h)&&h>=u)&&a(d)})}else switch(n!==void 0&&a(o.get(n)),c&&a(o.get(eu)),e){case"add":l?c&&a(o.get("length")):(a(o.get(Qo)),rl(t)&&a(o.get(Rp)));break;case"delete":l||(a(o.get(Qo)),rl(t)&&a(o.get(Rp)));break;case"set":rl(t)&&a(o.get(Qo));break}}n_()}function L2(t,e){const n=fh.get(t);return n&&n.get(e)}function Ia(t){const e=lt(t);return e===t?e:(Gn(e,"iterate",eu),Yi(t)?e:e.map(Hn))}function sf(t){return Gn(t=lt(t),"iterate",eu),t}const O2={__proto__:null,[Symbol.iterator](){return _g(this,Symbol.iterator,Hn)},concat(...t){return Ia(this).concat(...t.map(e=>Ye(e)?Ia(e):e))},entries(){return _g(this,"entries",t=>(t[1]=Hn(t[1]),t))},every(t,e){return js(this,"every",t,e,void 0,arguments)},filter(t,e){return js(this,"filter",t,e,n=>n.map(Hn),arguments)},find(t,e){return js(this,"find",t,e,Hn,arguments)},findIndex(t,e){return js(this,"findIndex",t,e,void 0,arguments)},findLast(t,e){return js(this,"findLast",t,e,Hn,arguments)},findLastIndex(t,e){return js(this,"findLastIndex",t,e,void 0,arguments)},forEach(t,e){return js(this,"forEach",t,e,void 0,arguments)},includes(...t){return yg(this,"includes",t)},indexOf(...t){return yg(this,"indexOf",t)},join(t){return Ia(this).join(t)},lastIndexOf(...t){return yg(this,"lastIndexOf",t)},map(t,e){return js(this,"map",t,e,void 0,arguments)},pop(){return rc(this,"pop")},push(...t){return rc(this,"push",t)},reduce(t,...e){return Hv(this,"reduce",t,e)},reduceRight(t,...e){return Hv(this,"reduceRight",t,e)},shift(){return rc(this,"shift")},some(t,e){return js(this,"some",t,e,void 0,arguments)},splice(...t){return rc(this,"splice",t)},toReversed(){return Ia(this).toReversed()},toSorted(t){return Ia(this).toSorted(t)},toSpliced(...t){return Ia(this).toSpliced(...t)},unshift(...t){return rc(this,"unshift",t)},values(){return _g(this,"values",Hn)}};function _g(t,e,n){const i=sf(t),s=i[e]();return i!==t&&!Yi(t)&&(s._next=s.next,s.next=()=>{const r=s._next();return r.value&&(r.value=n(r.value)),r}),s}const $2=Array.prototype;function js(t,e,n,i,s,r){const o=sf(t),a=o!==t&&!Yi(t),l=o[e];if(l!==$2[e]){const d=l.apply(t,r);return a?Hn(d):d}let c=n;o!==t&&(a?c=function(d,h){return n.call(this,Hn(d),h,t)}:n.length>2&&(c=function(d,h){return n.call(this,d,h,t)}));const u=l.call(o,c,i);return a&&s?s(u):u}function Hv(t,e,n,i){const s=sf(t);let r=n;return s!==t&&(Yi(t)?n.length>3&&(r=function(o,a,l){return n.call(this,o,a,l,t)}):r=function(o,a,l){return n.call(this,o,Hn(a),l,t)}),s[e](r,...i)}function yg(t,e,n){const i=lt(t);Gn(i,"iterate",eu);const s=i[e](...n);return(s===-1||s===!1)&&$u(n[0])?(n[0]=lt(n[0]),i[e](...n)):s}function rc(t,e,n=[]){po(),t_();const i=lt(t)[e].apply(t,n);return n_(),mo(),i}const N2=Xm("__proto__,__v_isRef,__isVue"),Bx=new Set(Object.getOwnPropertyNames(Symbol).filter(t=>t!=="arguments"&&t!=="caller").map(t=>Symbol[t]).filter(Fs));function F2(t){Fs(t)||(t=String(t));const e=lt(this);return Gn(e,"has",t),e.hasOwnProperty(t)}class Vx{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?Z2:Hx:r?Yx:Wx).get(e)||Object.getPrototypeOf(e)===Object.getPrototypeOf(i)?e:void 0;const o=Ye(e);if(!s){let l;if(o&&(l=O2[n]))return l;if(n==="hasOwnProperty")return F2}const a=Reflect.get(e,n,Wt(e)?e:i);return(Fs(n)?Bx.has(n):N2(n))||(s||Gn(e,"get",n),r)?a:Wt(a)?o&&Jm(n)?a:a.value:Mt(a)?s?Kx(a):Ki(a):a}}class zx extends Vx{constructor(e=!1){super(!1,e)}set(e,n,i,s){let r=e[n];if(!this._isShallow){const l=la(r);if(!Yi(i)&&!la(i)&&(r=lt(r),i=lt(i)),!Ye(e)&&Wt(r)&&!Wt(i))return l?!1:(r.value=i,!0)}const o=Ye(e)&&Jm(n)?Number(n)t,rf=t=>Reflect.getPrototypeOf(t);function gd(t,e,n=!1,i=!1){t=t.__v_raw;const s=lt(t),r=lt(e);n||(so(e,r)&&Gn(s,"get",e),Gn(s,"get",r));const{has:o}=rf(s),a=i?r_:n?l_:Hn;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 pd(t,e=!1){const n=this.__v_raw,i=lt(n),s=lt(t);return e||(so(t,s)&&Gn(i,"has",t),Gn(i,"has",s)),t===s?n.has(t):n.has(t)||n.has(s)}function md(t,e=!1){return t=t.__v_raw,!e&&Gn(lt(t),"iterate",Qo),Reflect.get(t,"size",t)}function jv(t,e=!1){!e&&!Yi(t)&&!la(t)&&(t=lt(t));const n=lt(this);return rf(n).has.call(n,t)||(n.add(t),dr(n,"add",t,t)),this}function Kv(t,e,n=!1){!n&&!Yi(e)&&!la(e)&&(e=lt(e));const i=lt(this),{has:s,get:r}=rf(i);let o=s.call(i,t);o||(t=lt(t),o=s.call(i,t));const a=r.call(i,t);return i.set(t,e),o?so(e,a)&&dr(i,"set",t,e):dr(i,"add",t,e),this}function Uv(t){const e=lt(this),{has:n,get:i}=rf(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&&dr(e,"delete",t,void 0),r}function Gv(){const t=lt(this),e=t.size!==0,n=t.clear();return e&&dr(t,"clear",void 0,void 0),n}function _d(t,e){return function(i,s){const r=this,o=r.__v_raw,a=lt(o),l=e?r_:t?l_:Hn;return!t&&Gn(a,"iterate",Qo),o.forEach((c,u)=>i.call(s,l(c),l(u),r))}}function yd(t,e,n){return function(...i){const s=this.__v_raw,r=lt(s),o=rl(r),a=t==="entries"||t===Symbol.iterator&&o,l=t==="keys"&&o,c=s[t](...i),u=n?r_:e?l_:Hn;return!e&&Gn(r,"iterate",l?Rp: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 Tr(t){return function(...e){return t==="delete"?!1:t==="clear"?void 0:this}}function Y2(){const t={get(r){return gd(this,r)},get size(){return md(this)},has:pd,add:jv,set:Kv,delete:Uv,clear:Gv,forEach:_d(!1,!1)},e={get(r){return gd(this,r,!1,!0)},get size(){return md(this)},has:pd,add(r){return jv.call(this,r,!0)},set(r,o){return Kv.call(this,r,o,!0)},delete:Uv,clear:Gv,forEach:_d(!1,!0)},n={get(r){return gd(this,r,!0)},get size(){return md(this,!0)},has(r){return pd.call(this,r,!0)},add:Tr("add"),set:Tr("set"),delete:Tr("delete"),clear:Tr("clear"),forEach:_d(!0,!1)},i={get(r){return gd(this,r,!0,!0)},get size(){return md(this,!0)},has(r){return pd.call(this,r,!0)},add:Tr("add"),set:Tr("set"),delete:Tr("delete"),clear:Tr("clear"),forEach:_d(!0,!0)};return["keys","values","entries",Symbol.iterator].forEach(r=>{t[r]=yd(r,!1,!1),n[r]=yd(r,!0,!1),e[r]=yd(r,!1,!0),i[r]=yd(r,!0,!0)}),[t,n,e,i]}const[H2,j2,K2,U2]=Y2();function o_(t,e){const n=e?t?U2:K2:t?j2:H2;return(i,s,r)=>s==="__v_isReactive"?!t:s==="__v_isReadonly"?t:s==="__v_raw"?i:Reflect.get(bt(n,s)&&s in i?n:i,s,r)}const G2={get:o_(!1,!1)},X2={get:o_(!1,!0)},q2={get:o_(!0,!1)};const Wx=new WeakMap,Yx=new WeakMap,Hx=new WeakMap,Z2=new WeakMap;function J2(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:J2(x2(t))}function Ki(t){return la(t)?t:a_(t,!1,V2,G2,Wx)}function jx(t){return a_(t,!1,W2,X2,Yx)}function Kx(t){return a_(t,!0,z2,q2,Hx)}function a_(t,e,n,i,s){if(!Mt(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 Qr(t){return la(t)?Qr(t.__v_raw):!!(t&&t.__v_isReactive)}function la(t){return!!(t&&t.__v_isReadonly)}function Yi(t){return!!(t&&t.__v_isShallow)}function $u(t){return t?!!t.__v_raw:!1}function lt(t){const e=t&&t.__v_raw;return e?lt(e):t}function of(t){return!bt(t,"__v_skip")&&Object.isExtensible(t)&&Ex(t,"__v_skip",!0),t}const Hn=t=>Mt(t)?Ki(t):t,l_=t=>Mt(t)?Kx(t):t;function Wt(t){return t?t.__v_isRef===!0:!1}function xe(t){return Ux(t,!1)}function af(t){return Ux(t,!0)}function Ux(t,e){return Wt(t)?t:new eD(t,e)}class eD{constructor(e,n){this.dep=new s_,this.__v_isRef=!0,this.__v_isShallow=!1,this._rawValue=n?e:lt(e),this._value=n?e:Hn(e),this.__v_isShallow=n}get value(){return this.dep.track(),this._value}set value(e){const n=this._rawValue,i=this.__v_isShallow||Yi(e)||la(e);e=i?e:lt(e),so(e,n)&&(this._rawValue=e,this._value=i?e:Hn(e),this.dep.trigger())}}function J(t){return Wt(t)?t.value:t}const tD={get:(t,e,n)=>e==="__v_raw"?t:J(Reflect.get(t,e,n)),set:(t,e,n,i)=>{const s=t[e];return Wt(s)&&!Wt(n)?(s.value=n,!0):Reflect.set(t,e,n,i)}};function Gx(t){return Qr(t)?t:new Proxy(t,tD)}function nD(t){const e=Ye(t)?new Array(t.length):{};for(const n in t)e[n]=Xx(t,n);return e}class iD{constructor(e,n,i){this._object=e,this._key=n,this._defaultValue=i,this.__v_isRef=!0,this._value=void 0}get value(){const e=this._object[this._key];return this._value=e===void 0?this._defaultValue:e}set value(e){this._object[this._key]=e}get dep(){return L2(lt(this._object),this._key)}}class sD{constructor(e){this._getter=e,this.__v_isRef=!0,this.__v_isReadonly=!0,this._value=void 0}get value(){return this._value=this._getter()}}function tu(t,e,n){return Wt(t)?t:qe(t)?new sD(t):Mt(t)&&arguments.length>1?Xx(t,e,n):xe(t)}function Xx(t,e,n){const i=t[e];return Wt(i)?i:new iD(t,e,n)}class rD{constructor(e,n,i){this.fn=e,this.setter=n,this._value=void 0,this.dep=new s_(this),this.__v_isRef=!0,this.deps=void 0,this.depsTail=void 0,this.flags=16,this.globalVersion=Qc-1,this.next=void 0,this.effect=this,this.__v_isReadonly=!n,this.isSSR=i}notify(){if(this.flags|=16,!(this.flags&8)&&It!==this)return Rx(this,!0),!0}get value(){const e=this.dep.track();return $x(this),e&&(e.version=this.dep.version),this._value}set value(e){this.setter&&this.setter(e)}}function oD(t,e,n=!1){let i,s;return qe(t)?i=t:(i=t.get,s=t.set),new rD(i,s,n)}const vd={},gh=new WeakMap;let Vo;function aD(t,e=!1,n=Vo){if(n){let i=gh.get(n);i||gh.set(n,i=[]),i.push(t)}}function lD(t,e,n=kt){const{immediate:i,deep:s,once:r,scheduler:o,augmentJob:a,call:l}=n,c=E=>s?E:Yi(E)||s===!1||s===0?rr(E,1):rr(E);let u,d,h,f,p=!1,m=!1;if(Wt(t)?(d=()=>t.value,p=Yi(t)):Qr(t)?(d=()=>c(t),p=!0):Ye(t)?(m=!0,p=t.some(E=>Qr(E)||Yi(E)),d=()=>t.map(E=>{if(Wt(E))return E.value;if(Qr(E))return c(E);if(qe(E))return l?l(E,2):E()})):qe(t)?e?d=l?()=>l(t,2):t:d=()=>{if(h){po();try{h()}finally{mo()}}const E=Vo;Vo=u;try{return l?l(t,3,[f]):t(f)}finally{Vo=E}}:d=Ls,e&&s){const E=d,w=s===!0?1/0:s;d=()=>rr(E(),w)}const y=nf(),v=()=>{u.stop(),y&&Zm(y.effects,u)};if(r&&e){const E=e;e=(...w)=>{E(...w),v()}}let b=m?new Array(t.length).fill(vd):vd;const x=E=>{if(!(!(u.flags&1)||!u.dirty&&!E))if(e){const w=u.run();if(s||p||(m?w.some((S,T)=>so(S,b[T])):so(w,b))){h&&h();const S=Vo;Vo=u;try{const T=[w,b===vd?void 0:m&&b[0]===vd?[]:b,f];l?l(e,3,T):e(...T),b=w}finally{Vo=S}}}else u.run()};return a&&a(x),u=new Ix(d),u.scheduler=o?()=>o(x,!1):x,f=E=>aD(E,!1,u),h=u.onStop=()=>{const E=gh.get(u);if(E){if(l)l(E,4);else for(const w of E)w();gh.delete(u)}},e?i?x(!0):b=u.run():o?o(x.bind(null,!0),!0):u.run(),v.pause=u.pause.bind(u),v.resume=u.resume.bind(u),v.stop=v,v}function rr(t,e=1/0,n){if(e<=0||!Mt(t)||t.__v_skip||(n=n||new Set,n.has(t)))return t;if(n.add(t),e--,Wt(t))rr(t.value,e,n);else if(Ye(t))for(let i=0;i{rr(i,e,n)});else if(xx(t)){for(const i in t)rr(t[i],e,n);for(const i of Object.getOwnPropertySymbols(t))Object.prototype.propertyIsEnumerable.call(t,i)&&rr(t[i],e,n)}return t}/** +**/let Qn;class Mx{constructor(e=!1){this.detached=e,this._active=!0,this.effects=[],this.cleanups=[],this._isPaused=!1,this.parent=Qn,!e&&Qn&&(this.index=(Qn.scopes||(Qn.scopes=[])).push(this)-1)}get active(){return this._active}pause(){if(this._active){this._isPaused=!0;let e,n;if(this.scopes)for(e=0,n=this.scopes.length;e0)return;if(Nc){let e=Nc;for(Nc=void 0;e;){const n=e.next;e.next=void 0,e.flags&=-9,e=n}}let t;for(;$c;){let e=$c;for($c=void 0;e;){const n=e.next;if(e.next=void 0,e.flags&=-9,e.flags&1)try{e.trigger()}catch(i){t||(t=i)}e=n}}if(t)throw t}function Lx(t){for(let e=t.deps;e;e=e.nextDep)e.version=-1,e.prevActiveLink=e.dep.activeLink,e.dep.activeLink=e}function Ox(t){let e,n=t.depsTail,i=n;for(;i;){const s=i.prevDep;i.version===-1?(i===n&&(n=s),i_(i),DI(i)):e=i,i.dep.activeLink=i.prevActiveLink,i.prevActiveLink=void 0,i=s}t.deps=e,t.depsTail=n}function Dp(t){for(let e=t.deps;e;e=e.nextDep)if(e.dep.version!==e.version||e.dep.computed&&($x(e.dep.computed)||e.dep.version!==e.version))return!0;return!!t._dirty}function $x(t){if(t.flags&4&&!(t.flags&16)||(t.flags&=-17,t.globalVersion===Qc))return;t.globalVersion=Qc;const e=t.dep;if(t.flags|=2,e.version>0&&!t.isSSR&&t.deps&&!Dp(t)){t.flags&=-3;return}const n=It,i=cs;It=t,cs=!0;try{Lx(t);const s=t.fn(t._value);(e.version===0||so(s,t._value))&&(t._value=s,e.version++)}catch(s){throw e.version++,s}finally{It=n,cs=i,Ox(t),t.flags&=-3}}function i_(t,e=!1){const{dep:n,prevSub:i,nextSub:s}=t;if(i&&(i.nextSub=s,t.prevSub=void 0),s&&(s.prevSub=i,t.nextSub=void 0),n.subs===t&&(n.subs=i),!n.subs&&n.computed){n.computed.flags&=-5;for(let r=n.computed.deps;r;r=r.nextDep)i_(r,!0)}!e&&!--n.sc&&n.map&&n.map.delete(n.key)}function DI(t){const{prevDep:e,nextDep:n}=t;e&&(e.nextDep=n,t.prevDep=void 0),n&&(n.prevDep=e,t.nextDep=void 0)}let cs=!0;const Nx=[];function po(){Nx.push(cs),cs=!1}function mo(){const t=Nx.pop();cs=t===void 0?!0:t}function Yv(t){const{cleanup:e}=t;if(t.cleanup=void 0,e){const n=It;It=void 0;try{e()}finally{It=n}}}let Qc=0;class RI{constructor(e,n){this.sub=e,this.dep=n,this.version=n.version,this.nextDep=this.prevDep=this.nextSub=this.prevSub=this.prevActiveLink=void 0}}class s_{constructor(e){this.computed=e,this.version=0,this.activeLink=void 0,this.subs=void 0,this.map=void 0,this.key=void 0,this.sc=0}track(e){if(!It||!cs||It===this.computed)return;let n=this.activeLink;if(n===void 0||n.sub!==It)n=this.activeLink=new RI(It,this),It.deps?(n.prevDep=It.depsTail,It.depsTail.nextDep=n,It.depsTail=n):It.deps=It.depsTail=n,Fx(n);else if(n.version===-1&&(n.version=this.version,n.nextDep)){const i=n.nextDep;i.prevDep=n.prevDep,n.prevDep&&(n.prevDep.nextDep=i),n.prevDep=It.depsTail,n.nextDep=void 0,It.depsTail.nextDep=n,It.depsTail=n,It.deps===n&&(It.deps=i)}return n}trigger(e){this.version++,Qc++,this.notify(e)}notify(e){t_();try{for(let n=this.subs;n;n=n.prevSub)n.sub.notify()&&n.sub.dep.notify()}finally{n_()}}}function Fx(t){if(t.dep.sc++,t.sub.flags&4){const e=t.dep.computed;if(e&&!t.dep.subs){e.flags|=20;for(let i=e.deps;i;i=i.nextDep)Fx(i)}const n=t.dep.subs;n!==t&&(t.prevSub=n,n&&(n.nextSub=t)),t.dep.subs=t}}const fh=new WeakMap,Qo=Symbol(""),Rp=Symbol(""),eu=Symbol("");function Gn(t,e,n){if(cs&&It){let i=fh.get(t);i||fh.set(t,i=new Map);let s=i.get(n);s||(i.set(n,s=new s_),s.map=i,s.key=n),s.track()}}function dr(t,e,n,i,s,r){const o=fh.get(t);if(!o){Qc++;return}const a=l=>{l&&l.trigger()};if(t_(),e==="clear")o.forEach(a);else{const l=Ye(t),c=l&&Jm(n);if(l&&n==="length"){const u=Number(i);o.forEach((d,h)=>{(h==="length"||h===eu||!Fs(h)&&h>=u)&&a(d)})}else switch(n!==void 0&&a(o.get(n)),c&&a(o.get(eu)),e){case"add":l?c&&a(o.get("length")):(a(o.get(Qo)),rl(t)&&a(o.get(Rp)));break;case"delete":l||(a(o.get(Qo)),rl(t)&&a(o.get(Rp)));break;case"set":rl(t)&&a(o.get(Qo));break}}n_()}function LI(t,e){const n=fh.get(t);return n&&n.get(e)}function Ia(t){const e=lt(t);return e===t?e:(Gn(e,"iterate",eu),Yi(t)?e:e.map(Hn))}function sf(t){return Gn(t=lt(t),"iterate",eu),t}const OI={__proto__:null,[Symbol.iterator](){return _g(this,Symbol.iterator,Hn)},concat(...t){return Ia(this).concat(...t.map(e=>Ye(e)?Ia(e):e))},entries(){return _g(this,"entries",t=>(t[1]=Hn(t[1]),t))},every(t,e){return js(this,"every",t,e,void 0,arguments)},filter(t,e){return js(this,"filter",t,e,n=>n.map(Hn),arguments)},find(t,e){return js(this,"find",t,e,Hn,arguments)},findIndex(t,e){return js(this,"findIndex",t,e,void 0,arguments)},findLast(t,e){return js(this,"findLast",t,e,Hn,arguments)},findLastIndex(t,e){return js(this,"findLastIndex",t,e,void 0,arguments)},forEach(t,e){return js(this,"forEach",t,e,void 0,arguments)},includes(...t){return yg(this,"includes",t)},indexOf(...t){return yg(this,"indexOf",t)},join(t){return Ia(this).join(t)},lastIndexOf(...t){return yg(this,"lastIndexOf",t)},map(t,e){return js(this,"map",t,e,void 0,arguments)},pop(){return rc(this,"pop")},push(...t){return rc(this,"push",t)},reduce(t,...e){return Hv(this,"reduce",t,e)},reduceRight(t,...e){return Hv(this,"reduceRight",t,e)},shift(){return rc(this,"shift")},some(t,e){return js(this,"some",t,e,void 0,arguments)},splice(...t){return rc(this,"splice",t)},toReversed(){return Ia(this).toReversed()},toSorted(t){return Ia(this).toSorted(t)},toSpliced(...t){return Ia(this).toSpliced(...t)},unshift(...t){return rc(this,"unshift",t)},values(){return _g(this,"values",Hn)}};function _g(t,e,n){const i=sf(t),s=i[e]();return i!==t&&!Yi(t)&&(s._next=s.next,s.next=()=>{const r=s._next();return r.value&&(r.value=n(r.value)),r}),s}const $I=Array.prototype;function js(t,e,n,i,s,r){const o=sf(t),a=o!==t&&!Yi(t),l=o[e];if(l!==$I[e]){const d=l.apply(t,r);return a?Hn(d):d}let c=n;o!==t&&(a?c=function(d,h){return n.call(this,Hn(d),h,t)}:n.length>2&&(c=function(d,h){return n.call(this,d,h,t)}));const u=l.call(o,c,i);return a&&s?s(u):u}function Hv(t,e,n,i){const s=sf(t);let r=n;return s!==t&&(Yi(t)?n.length>3&&(r=function(o,a,l){return n.call(this,o,a,l,t)}):r=function(o,a,l){return n.call(this,o,Hn(a),l,t)}),s[e](r,...i)}function yg(t,e,n){const i=lt(t);Gn(i,"iterate",eu);const s=i[e](...n);return(s===-1||s===!1)&&$u(n[0])?(n[0]=lt(n[0]),i[e](...n)):s}function rc(t,e,n=[]){po(),t_();const i=lt(t)[e].apply(t,n);return n_(),mo(),i}const NI=Xm("__proto__,__v_isRef,__isVue"),Bx=new Set(Object.getOwnPropertyNames(Symbol).filter(t=>t!=="arguments"&&t!=="caller").map(t=>Symbol[t]).filter(Fs));function FI(t){Fs(t)||(t=String(t));const e=lt(this);return Gn(e,"has",t),e.hasOwnProperty(t)}class Vx{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?ZI:Hx:r?Yx:Wx).get(e)||Object.getPrototypeOf(e)===Object.getPrototypeOf(i)?e:void 0;const o=Ye(e);if(!s){let l;if(o&&(l=OI[n]))return l;if(n==="hasOwnProperty")return FI}const a=Reflect.get(e,n,Wt(e)?e:i);return(Fs(n)?Bx.has(n):NI(n))||(s||Gn(e,"get",n),r)?a:Wt(a)?o&&Jm(n)?a:a.value:Mt(a)?s?Kx(a):Ki(a):a}}class zx extends Vx{constructor(e=!1){super(!1,e)}set(e,n,i,s){let r=e[n];if(!this._isShallow){const l=la(r);if(!Yi(i)&&!la(i)&&(r=lt(r),i=lt(i)),!Ye(e)&&Wt(r)&&!Wt(i))return l?!1:(r.value=i,!0)}const o=Ye(e)&&Jm(n)?Number(n)t,rf=t=>Reflect.getPrototypeOf(t);function gd(t,e,n=!1,i=!1){t=t.__v_raw;const s=lt(t),r=lt(e);n||(so(e,r)&&Gn(s,"get",e),Gn(s,"get",r));const{has:o}=rf(s),a=i?r_:n?l_:Hn;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 pd(t,e=!1){const n=this.__v_raw,i=lt(n),s=lt(t);return e||(so(t,s)&&Gn(i,"has",t),Gn(i,"has",s)),t===s?n.has(t):n.has(t)||n.has(s)}function md(t,e=!1){return t=t.__v_raw,!e&&Gn(lt(t),"iterate",Qo),Reflect.get(t,"size",t)}function jv(t,e=!1){!e&&!Yi(t)&&!la(t)&&(t=lt(t));const n=lt(this);return rf(n).has.call(n,t)||(n.add(t),dr(n,"add",t,t)),this}function Kv(t,e,n=!1){!n&&!Yi(e)&&!la(e)&&(e=lt(e));const i=lt(this),{has:s,get:r}=rf(i);let o=s.call(i,t);o||(t=lt(t),o=s.call(i,t));const a=r.call(i,t);return i.set(t,e),o?so(e,a)&&dr(i,"set",t,e):dr(i,"add",t,e),this}function Uv(t){const e=lt(this),{has:n,get:i}=rf(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&&dr(e,"delete",t,void 0),r}function Gv(){const t=lt(this),e=t.size!==0,n=t.clear();return e&&dr(t,"clear",void 0,void 0),n}function _d(t,e){return function(i,s){const r=this,o=r.__v_raw,a=lt(o),l=e?r_:t?l_:Hn;return!t&&Gn(a,"iterate",Qo),o.forEach((c,u)=>i.call(s,l(c),l(u),r))}}function yd(t,e,n){return function(...i){const s=this.__v_raw,r=lt(s),o=rl(r),a=t==="entries"||t===Symbol.iterator&&o,l=t==="keys"&&o,c=s[t](...i),u=n?r_:e?l_:Hn;return!e&&Gn(r,"iterate",l?Rp: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 Tr(t){return function(...e){return t==="delete"?!1:t==="clear"?void 0:this}}function YI(){const t={get(r){return gd(this,r)},get size(){return md(this)},has:pd,add:jv,set:Kv,delete:Uv,clear:Gv,forEach:_d(!1,!1)},e={get(r){return gd(this,r,!1,!0)},get size(){return md(this)},has:pd,add(r){return jv.call(this,r,!0)},set(r,o){return Kv.call(this,r,o,!0)},delete:Uv,clear:Gv,forEach:_d(!1,!0)},n={get(r){return gd(this,r,!0)},get size(){return md(this,!0)},has(r){return pd.call(this,r,!0)},add:Tr("add"),set:Tr("set"),delete:Tr("delete"),clear:Tr("clear"),forEach:_d(!0,!1)},i={get(r){return gd(this,r,!0,!0)},get size(){return md(this,!0)},has(r){return pd.call(this,r,!0)},add:Tr("add"),set:Tr("set"),delete:Tr("delete"),clear:Tr("clear"),forEach:_d(!0,!0)};return["keys","values","entries",Symbol.iterator].forEach(r=>{t[r]=yd(r,!1,!1),n[r]=yd(r,!0,!1),e[r]=yd(r,!1,!0),i[r]=yd(r,!0,!0)}),[t,n,e,i]}const[HI,jI,KI,UI]=YI();function o_(t,e){const n=e?t?UI:KI:t?jI:HI;return(i,s,r)=>s==="__v_isReactive"?!t:s==="__v_isReadonly"?t:s==="__v_raw"?i:Reflect.get(bt(n,s)&&s in i?n:i,s,r)}const GI={get:o_(!1,!1)},XI={get:o_(!1,!0)},qI={get:o_(!0,!1)};const Wx=new WeakMap,Yx=new WeakMap,Hx=new WeakMap,ZI=new WeakMap;function JI(t){switch(t){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function QI(t){return t.__v_skip||!Object.isExtensible(t)?0:JI(xI(t))}function Ki(t){return la(t)?t:a_(t,!1,VI,GI,Wx)}function jx(t){return a_(t,!1,WI,XI,Yx)}function Kx(t){return a_(t,!0,zI,qI,Hx)}function a_(t,e,n,i,s){if(!Mt(t)||t.__v_raw&&!(e&&t.__v_isReactive))return t;const r=s.get(t);if(r)return r;const o=QI(t);if(o===0)return t;const a=new Proxy(t,o===2?i:n);return s.set(t,a),a}function Qr(t){return la(t)?Qr(t.__v_raw):!!(t&&t.__v_isReactive)}function la(t){return!!(t&&t.__v_isReadonly)}function Yi(t){return!!(t&&t.__v_isShallow)}function $u(t){return t?!!t.__v_raw:!1}function lt(t){const e=t&&t.__v_raw;return e?lt(e):t}function of(t){return!bt(t,"__v_skip")&&Object.isExtensible(t)&&Ex(t,"__v_skip",!0),t}const Hn=t=>Mt(t)?Ki(t):t,l_=t=>Mt(t)?Kx(t):t;function Wt(t){return t?t.__v_isRef===!0:!1}function xe(t){return Ux(t,!1)}function af(t){return Ux(t,!0)}function Ux(t,e){return Wt(t)?t:new eD(t,e)}class eD{constructor(e,n){this.dep=new s_,this.__v_isRef=!0,this.__v_isShallow=!1,this._rawValue=n?e:lt(e),this._value=n?e:Hn(e),this.__v_isShallow=n}get value(){return this.dep.track(),this._value}set value(e){const n=this._rawValue,i=this.__v_isShallow||Yi(e)||la(e);e=i?e:lt(e),so(e,n)&&(this._rawValue=e,this._value=i?e:Hn(e),this.dep.trigger())}}function J(t){return Wt(t)?t.value:t}const tD={get:(t,e,n)=>e==="__v_raw"?t:J(Reflect.get(t,e,n)),set:(t,e,n,i)=>{const s=t[e];return Wt(s)&&!Wt(n)?(s.value=n,!0):Reflect.set(t,e,n,i)}};function Gx(t){return Qr(t)?t:new Proxy(t,tD)}function nD(t){const e=Ye(t)?new Array(t.length):{};for(const n in t)e[n]=Xx(t,n);return e}class iD{constructor(e,n,i){this._object=e,this._key=n,this._defaultValue=i,this.__v_isRef=!0,this._value=void 0}get value(){const e=this._object[this._key];return this._value=e===void 0?this._defaultValue:e}set value(e){this._object[this._key]=e}get dep(){return LI(lt(this._object),this._key)}}class sD{constructor(e){this._getter=e,this.__v_isRef=!0,this.__v_isReadonly=!0,this._value=void 0}get value(){return this._value=this._getter()}}function tu(t,e,n){return Wt(t)?t:qe(t)?new sD(t):Mt(t)&&arguments.length>1?Xx(t,e,n):xe(t)}function Xx(t,e,n){const i=t[e];return Wt(i)?i:new iD(t,e,n)}class rD{constructor(e,n,i){this.fn=e,this.setter=n,this._value=void 0,this.dep=new s_(this),this.__v_isRef=!0,this.deps=void 0,this.depsTail=void 0,this.flags=16,this.globalVersion=Qc-1,this.next=void 0,this.effect=this,this.__v_isReadonly=!n,this.isSSR=i}notify(){if(this.flags|=16,!(this.flags&8)&&It!==this)return Rx(this,!0),!0}get value(){const e=this.dep.track();return $x(this),e&&(e.version=this.dep.version),this._value}set value(e){this.setter&&this.setter(e)}}function oD(t,e,n=!1){let i,s;return qe(t)?i=t:(i=t.get,s=t.set),new rD(i,s,n)}const vd={},gh=new WeakMap;let Vo;function aD(t,e=!1,n=Vo){if(n){let i=gh.get(n);i||gh.set(n,i=[]),i.push(t)}}function lD(t,e,n=kt){const{immediate:i,deep:s,once:r,scheduler:o,augmentJob:a,call:l}=n,c=E=>s?E:Yi(E)||s===!1||s===0?rr(E,1):rr(E);let u,d,h,g,p=!1,m=!1;if(Wt(t)?(d=()=>t.value,p=Yi(t)):Qr(t)?(d=()=>c(t),p=!0):Ye(t)?(m=!0,p=t.some(E=>Qr(E)||Yi(E)),d=()=>t.map(E=>{if(Wt(E))return E.value;if(Qr(E))return c(E);if(qe(E))return l?l(E,2):E()})):qe(t)?e?d=l?()=>l(t,2):t:d=()=>{if(h){po();try{h()}finally{mo()}}const E=Vo;Vo=u;try{return l?l(t,3,[g]):t(g)}finally{Vo=E}}:d=Ls,e&&s){const E=d,w=s===!0?1/0:s;d=()=>rr(E(),w)}const y=nf(),v=()=>{u.stop(),y&&Zm(y.effects,u)};if(r&&e){const E=e;e=(...w)=>{E(...w),v()}}let b=m?new Array(t.length).fill(vd):vd;const x=E=>{if(!(!(u.flags&1)||!u.dirty&&!E))if(e){const w=u.run();if(s||p||(m?w.some((S,T)=>so(S,b[T])):so(w,b))){h&&h();const S=Vo;Vo=u;try{const T=[w,b===vd?void 0:m&&b[0]===vd?[]:b,g];l?l(e,3,T):e(...T),b=w}finally{Vo=S}}}else u.run()};return a&&a(x),u=new Ix(d),u.scheduler=o?()=>o(x,!1):x,g=E=>aD(E,!1,u),h=u.onStop=()=>{const E=gh.get(u);if(E){if(l)l(E,4);else for(const w of E)w();gh.delete(u)}},e?i?x(!0):b=u.run():o?o(x.bind(null,!0),!0):u.run(),v.pause=u.pause.bind(u),v.resume=u.resume.bind(u),v.stop=v,v}function rr(t,e=1/0,n){if(e<=0||!Mt(t)||t.__v_skip||(n=n||new Set,n.has(t)))return t;if(n.add(t),e--,Wt(t))rr(t.value,e,n);else if(Ye(t))for(let i=0;i{rr(i,e,n)});else if(xx(t)){for(const i in t)rr(t[i],e,n);for(const i of Object.getOwnPropertySymbols(t))Object.prototype.propertyIsEnumerable.call(t,i)&&rr(t[i],e,n)}return t}/** * @vue/runtime-core v3.5.11 * (c) 2018-present Yuxi (Evan) You and Vue contributors * @license MIT -**/function Nu(t,e,n,i){try{return i?t(...i):t()}catch(s){Fu(s,e,n)}}function fs(t,e,n,i){if(qe(t)){const s=Nu(t,e,n,i);return s&&bx(s)&&s.catch(r=>{Fu(r,e,n)}),s}if(Ye(t)){const s=[];for(let r=0;r>>1,s=ei[i],r=nu(s);r=nu(n)?ei.push(t):ei.splice(uD(e),0,t),t.flags|=1,Zx()}}function Zx(){ph||(ph=qx.then(Qx))}function Lp(t){Ye(t)?ol.push(...t):Vr&&t.id===-1?Vr.splice(Ua+1,0,t):t.flags&1||(ol.push(t),t.flags|=1),Zx()}function Xv(t,e,n=ws+1){for(;nnu(n)-nu(i));if(ol.length=0,Vr){Vr.push(...e);return}for(Vr=e,Ua=0;Uat.id==null?t.flags&2?-1:1/0:t.id;function Qx(t){try{for(ws=0;ws{i._d&&l0(-1);const r=mh(e);let o;try{o=t(...s)}finally{mh(r),i._d&&l0(1)}return o};return i._n=!0,i._c=!0,i._d=!0,i}function $e(t,e){if(bn===null)return t;const n=gf(bn),i=t.dirs||(t.dirs=[]);for(let s=0;st.__isTeleport,Fc=t=>t&&(t.disabled||t.disabled===""),dD=t=>t&&(t.defer||t.defer===""),qv=t=>typeof SVGElement<"u"&&t instanceof SVGElement,Zv=t=>typeof MathMLElement=="function"&&t instanceof MathMLElement,Op=(t,e)=>{const n=t&&t.to;return Ht(n)?e?e(n):null:n},hD={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=Fc(e.props);let{shapeFlag:b,children:x,dynamicChildren:E}=e;if(t==null){const w=e.el=m(""),S=e.anchor=m("");f(w,n,i),f(S,n,i);const T=(k,P)=>{b&16&&(s&&s.isCE&&(s.ce._teleportTarget=k),u(x,k,P,s,r,o,a,l))},A=()=>{const k=e.target=Op(e.props,p),P=iE(k,e,m,f);k&&(o!=="svg"&&qv(k)?o="svg":o!=="mathml"&&Zv(k)&&(o="mathml"),v||(T(k,P),th(e)))};v&&(T(n,S),th(e)),dD(e.props)?hi(A,r):A()}else{e.el=t.el,e.targetStart=t.targetStart;const w=e.anchor=t.anchor,S=e.target=t.target,T=e.targetAnchor=t.targetAnchor,A=Fc(t.props),k=A?n:S,P=A?w:T;if(o==="svg"||qv(S)?o="svg":(o==="mathml"||Zv(S))&&(o="mathml"),E?(h(t.dynamicChildren,E,k,s,r,o,a),f_(t,e,!0)):l||d(t,e,k,P,s,r,o,a,!1),v)A?e.props&&t.props&&e.props.to!==t.props.to&&(e.props.to=t.props.to):bd(e,n,w,c,1);else if((e.props&&e.props.to)!==(t.props&&t.props.to)){const B=e.target=Op(e.props,p);B&&bd(e,B,null,c,0)}else A&&bd(e,S,T,c,1);th(e)}},remove(t,e,n,{um:i,o:{remove:s}},r){const{shapeFlag:o,children:a,anchor:l,targetStart:c,targetAnchor:u,target:d,props:h}=t;if(d&&(s(c),s(u)),r&&s(l),o&16){const f=r||!Fc(h);for(let p=0;p{t.isMounted=!0}),fE(()=>{t.isUnmounting=!0}),t}const Ni=[Function,Array],rE={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},oE=t=>{const e=t.subTree;return e.component?oE(e.component):e},pD={name:"BaseTransition",props:rE,setup(t,{slots:e}){const n=hf(),i=sE();return()=>{const s=e.default&&u_(e.default(),!0);if(!s||!s.length)return;const r=aE(s),o=lt(t),{mode:a}=o;if(i.isLeaving)return vg(r);const l=Jv(r);if(!l)return vg(r);let c=iu(l,o,i,n,h=>c=h);l.type!==$n&&ca(l,c);const u=n.subTree,d=u&&Jv(u);if(d&&d.type!==$n&&!Es(l,d)&&oE(n).type!==$n){const h=iu(d,o,i,n);if(ca(d,h),a==="out-in"&&l.type!==$n)return i.isLeaving=!0,h.afterLeave=()=>{i.isLeaving=!1,n.job.flags&8||n.update(),delete h.afterLeave},vg(r);a==="in-out"&&l.type!==$n&&(h.delayLeave=(f,p,m)=>{const y=lE(i,d);y[String(d.key)]=d,f[zr]=()=>{p(),f[zr]=void 0,delete c.delayedLeave},c.delayedLeave=m})}return r}}};function aE(t){let e=t[0];if(t.length>1){for(const n of t)if(n.type!==$n){e=n;break}}return e}const mD=pD;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 iu(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:x}=e,E=String(t.key),w=lE(n,t),S=(k,P)=>{k&&fs(k,i,9,P)},T=(k,P)=>{const B=P[1];S(k,P),Ye(k)?k.every(Y=>Y.length<=1)&&B():k.length<=1&&B()},A={mode:o,persisted:a,beforeEnter(k){let P=l;if(!n.isMounted)if(r)P=y||l;else return;k[zr]&&k[zr](!0);const B=w[E];B&&Es(t,B)&&B.el[zr]&&B.el[zr](),S(P,[k])},enter(k){let P=c,B=u,Y=d;if(!n.isMounted)if(r)P=v||c,B=b||u,Y=x||d;else return;let ne=!1;const $=k[wd]=F=>{ne||(ne=!0,F?S(Y,[k]):S(B,[k]),A.delayedLeave&&A.delayedLeave(),k[wd]=void 0)};P?T(P,[k,$]):$()},leave(k,P){const B=String(t.key);if(k[wd]&&k[wd](!0),n.isUnmounting)return P();S(h,[k]);let Y=!1;const ne=k[zr]=$=>{Y||(Y=!0,P(),$?S(m,[k]):S(p,[k]),k[zr]=void 0,w[B]===t&&delete w[B])};w[B]=t,f?T(f,[k,ne]):ne()},clone(k){const P=iu(k,e,n,i,s);return s&&s(P),P}};return A}function vg(t){if(lf(t))return t=ro(t),t.children=null,t}function Jv(t){if(!lf(t))return nE(t.type)&&t.children?aE(t.children):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 ca(t,e){t.shapeFlag&6&&t.component?(t.transition=e,ca(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 u_(t,e=!1,n){let i=[],s=0;for(let r=0;r1)for(let r=0;rn.value,set:r=>n.value=r})}return n}function $p(t,e,n,i,s=!1){if(Ye(t)){t.forEach((p,m)=>$p(p,e&&(Ye(e)?e[m]:e),n,i,s));return}if(al(i)&&!s)return;const r=i.shapeFlag&4?gf(i.component):i.el,o=s?null:r,{i:a,r:l}=t,c=e&&e.r,u=a.refs===kt?a.refs={}:a.refs,d=a.setupState,h=lt(d),f=d===kt?()=>!1:p=>bt(h,p);if(c!=null&&c!==l&&(Ht(c)?(u[c]=null,f(c)&&(d[c]=null)):Wt(c)&&(c.value=null)),qe(l))Nu(l,a,12,[o,u]);else{const p=Ht(l),m=Wt(l);if(p||m){const y=()=>{if(t.f){const v=p?f(l)?d[l]:u[l]:l.value;s?Ye(v)&&Zm(v,r):Ye(v)?v.includes(r)||v.push(r):p?(u[l]=[r],f(l)&&(d[l]=u[l])):(l.value=[r],t.k&&(u[t.k]=l.value))}else p?(u[l]=o,f(l)&&(d[l]=o)):m&&(l.value=o,t.k&&(u[t.k]=o))};o?(y.id=-1,hi(y,n)):y()}}}const al=t=>!!t.type.__asyncLoader,lf=t=>t.type.__isKeepAlive;function yD(t,e){uE(t,"a",e)}function vD(t,e){uE(t,"da",e)}function uE(t,e,n=Mn){const i=t.__wdc||(t.__wdc=()=>{let s=n;for(;s;){if(s.isDeactivated)return;s=s.parent}return t()});if(cf(e,i,n),n){let s=n.parent;for(;s&&s.parent;)lf(s.parent.vnode)&&bD(i,e,n,s),s=s.parent}}function bD(t,e,n,i){const s=cf(e,t,i,!0);pa(()=>{Zm(i[e],s)},n)}function cf(t,e,n=Mn,i=!1){if(n){const s=n[t]||(n[t]=[]),r=e.__weh||(e.__weh=(...o)=>{po();const a=Bu(n),l=fs(e,n,t,o);return a(),mo(),l});return i?s.unshift(r):s.push(r),r}}const wr=t=>(e,n=Mn)=>{(!ff||t==="sp")&&cf(t,(...i)=>e(...i),n)},wD=wr("bm"),En=wr("m"),dE=wr("bu"),hE=wr("u"),fE=wr("bum"),pa=wr("um"),xD=wr("sp"),ED=wr("rtg"),CD=wr("rtc");function SD(t,e=Mn){cf("ec",t,e)}const gE="components";function Ee(t,e){return mE(gE,t,!0,e)||t}const pE=Symbol.for("v-ndc");function ma(t){return Ht(t)?mE(gE,t,!1)||t:t||pE}function mE(t,e,n=!0,i=!1){const s=bn||Mn;if(s){const r=s.type;{const a=pR(r,!1);if(a&&(a===e||a===ji(e)||a===tf(ji(e))))return r}const o=Qv(s[t]||r[t],e)||Qv(s.appContext[t],e);return!o&&i?r:o}}function Qv(t,e){return t&&(t[e]||t[ji(e)]||t[tf(ji(e))])}function Ze(t,e,n,i){let s;const r=n,o=Ye(t);if(o||Ht(t)){const a=o&&Qr(t);let l=!1;a&&(l=!Yi(t),t=sf(t)),s=new Array(t.length);for(let c=0,u=t.length;ce(a,l,void 0,r));else{const a=Object.keys(t);s=new Array(a.length);for(let l=0,c=a.length;l{const r=i.fn(...s);return r&&(r.key=i.key),r}:i.fn)}return t}function Ne(t,e,n={},i,s){if(bn.ce||bn.parent&&al(bn.parent)&&bn.parent.ce)return e!=="default"&&(n.name=e),R(),Se(Oe,null,[N("slot",n,i)],64);let r=t[e];r&&r._c&&(r._d=!1),R();const o=r&&_E(r(n)),a=Se(Oe,{key:(n.key||o&&o.key||`_${e}`)+(!o&&i?"_fb":"")},o||[],o&&t._===1?64:-2);return a.scopeId&&(a.slotScopeIds=[a.scopeId+"-s"]),r&&r._c&&(r._d=!0),a}function _E(t){return t.some(e=>vl(e)?!(e.type===$n||e.type===Oe&&!_E(e.children)):!0)?t:null}const Np=t=>t?BE(t)?gf(t):Np(t.parent):null,Bc=_n(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=>Np(t.parent),$root:t=>Np(t.root),$host:t=>t.ce,$emit:t=>t.emit,$options:t=>d_(t),$forceUpdate:t=>t.f||(t.f=()=>{c_(t.update)}),$nextTick:t=>t.n||(t.n=Rn.bind(t.proxy)),$watch:t=>GD.bind(t)}),bg=(t,e)=>t!==kt&&!t.__isScriptSetup&&bt(t,e),TD={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(bg(i,e))return o[e]=1,i[e];if(s!==kt&&bt(s,e))return o[e]=2,s[e];if((c=t.propsOptions[0])&&bt(c,e))return o[e]=3,r[e];if(n!==kt&&bt(n,e))return o[e]=4,n[e];Fp&&(o[e]=0)}}const u=Bc[e];let d,h;if(u)return e==="$attrs"&&Gn(t.attrs,"get",""),u(t);if((d=a.__cssModules)&&(d=d[e]))return d;if(n!==kt&&bt(n,e))return o[e]=4,n[e];if(h=l.config.globalProperties,bt(h,e))return h[e]},set({_:t},e,n){const{data:i,setupState:s,ctx:r}=t;return bg(s,e)?(s[e]=n,!0):i!==kt&&bt(i,e)?(i[e]=n,!0):bt(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!==kt&&bt(t,o)||bg(e,o)||(a=r[0])&&bt(a,o)||bt(i,o)||bt(Bc,o)||bt(s.config.globalProperties,o)},defineProperty(t,e,n){return n.get!=null?t._.accessCache[e]=0:bt(n,"value")&&this.set(t,e,n.value,null),Reflect.defineProperty(t,e,n)}};function _a(){return yE().slots}function AD(){return yE().attrs}function yE(){const t=hf();return t.setupContext||(t.setupContext=zE(t))}function e0(t){return Ye(t)?t.reduce((e,n)=>(e[n]=null,e),{}):t}let Fp=!0;function kD(t){const e=d_(t),n=t.proxy,i=t.ctx;Fp=!1,e.beforeCreate&&t0(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:x,unmounted:E,render:w,renderTracked:S,renderTriggered:T,errorCaptured:A,serverPrefetch:k,expose:P,inheritAttrs:B,components:Y,directives:ne,filters:$}=e;if(c&&MD(c,i,null),o)for(const z in o){const X=o[z];qe(X)&&(i[z]=X.bind(n))}if(s){const z=s.call(n,n);Mt(z)&&(t.data=Ki(z))}if(Fp=!0,r)for(const z in r){const X=r[z],Z=qe(X)?X.bind(n,n):qe(X.get)?X.get.bind(n,n):Ls,H=!qe(X)&&qe(X.set)?X.set.bind(n):Ls,le=be({get:Z,set:H});Object.defineProperty(i,z,{enumerable:!0,configurable:!0,get:()=>le.value,set:ie=>le.value=ie})}if(a)for(const z in a)vE(a[z],i,n,z);if(l){const z=qe(l)?l.call(n):l;Reflect.ownKeys(z).forEach(X=>{nh(X,z[X])})}u&&t0(u,t,"c");function D(z,X){Ye(X)?X.forEach(Z=>z(Z.bind(n))):X&&z(X.bind(n))}if(D(wD,d),D(En,h),D(dE,f),D(hE,p),D(yD,m),D(vD,y),D(SD,A),D(CD,S),D(ED,T),D(fE,b),D(pa,E),D(xD,k),Ye(P))if(P.length){const z=t.exposed||(t.exposed={});P.forEach(X=>{Object.defineProperty(z,X,{get:()=>n[X],set:Z=>n[X]=Z})})}else t.exposed||(t.exposed={});w&&t.render===Ls&&(t.render=w),B!=null&&(t.inheritAttrs=B),Y&&(t.components=Y),ne&&(t.directives=ne),k&&cE(t)}function MD(t,e,n=Ls){Ye(t)&&(t=Bp(t));for(const i in t){const s=t[i];let r;Mt(s)?"default"in s?r=us(s.from||i,s.default,!0):r=us(s.from||i):r=us(s),Wt(r)?Object.defineProperty(e,i,{enumerable:!0,configurable:!0,get:()=>r.value,set:o=>r.value=o}):e[i]=r}}function t0(t,e,n){fs(Ye(t)?t.map(i=>i.bind(e.proxy)):t.bind(e.proxy),e,n)}function vE(t,e,n,i){let s=i.includes(".")?DE(n,i):()=>n[i];if(Ht(t)){const r=e[t];qe(r)&&un(s,r)}else if(qe(t))un(s,t.bind(n));else if(Mt(t))if(Ye(t))t.forEach(r=>vE(r,e,n,i));else{const r=qe(t.handler)?t.handler.bind(n):e[t.handler];qe(r)&&un(s,r,t)}}function d_(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=>_h(l,c,o,!0)),_h(l,e,o)),Mt(e)&&r.set(e,l),l}function _h(t,e,n,i=!1){const{mixins:s,extends:r}=e;r&&_h(t,r,n,!0),s&&s.forEach(o=>_h(t,o,n,!0));for(const o in e)if(!(i&&o==="expose")){const a=PD[o]||n&&n[o];t[o]=a?a(t[o],e[o]):e[o]}return t}const PD={data:n0,props:i0,emits:i0,methods:wc,computed:wc,beforeCreate:Zn,created:Zn,beforeMount:Zn,mounted:Zn,beforeUpdate:Zn,updated:Zn,beforeDestroy:Zn,beforeUnmount:Zn,destroyed:Zn,unmounted:Zn,activated:Zn,deactivated:Zn,errorCaptured:Zn,serverPrefetch:Zn,components:wc,directives:wc,watch:DD,provide:n0,inject:ID};function n0(t,e){return e?t?function(){return _n(qe(t)?t.call(this,this):t,qe(e)?e.call(this,this):e)}:e:t}function ID(t,e){return wc(Bp(t),Bp(e))}function Bp(t){if(Ye(t)){const e={};for(let n=0;n1)return n&&qe(e)?e.call(i&&i.proxy):e}}function OD(){return!!(Mn||bn||ea)}const wE={},xE=()=>Object.create(wE),EE=t=>Object.getPrototypeOf(t)===wE;function $D(t,e,n,i=!1){const s={},r=xE();t.propsDefaults=Object.create(null),CE(t,e,s,r);for(const o in t.propsOptions[0])o in s||(s[o]=void 0);n?t.props=i?s:jx(s):t.type.props?t.props=s:t.props=r,t.attrs=r}function ND(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);_n(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 Mt(t)&&i.set(t,sl),sl;if(Ye(r))for(let u=0;ut[0]==="_"||t==="$stable",h_=t=>Ye(t)?t.map(ns):[ns(t)],BD=(t,e,n)=>{if(e._n)return e;const i=De((...s)=>h_(e(...s)),n);return i._c=!1,i},AE=(t,e,n)=>{const i=t._ctx;for(const s in t){if(TE(s))continue;const r=t[s];if(qe(r))e[s]=BD(s,r,i);else if(r!=null){const o=h_(r);e[s]=()=>o}}},kE=(t,e)=>{const n=h_(e);t.slots.default=()=>n},ME=(t,e,n)=>{for(const i in e)(n||i!=="_")&&(t[i]=e[i])},VD=(t,e,n)=>{const i=t.slots=xE();if(t.vnode.shapeFlag&32){const s=e._;s?(ME(i,e,n),n&&Ex(i,"_",s,!0)):AE(e,i)}else e&&kE(t,e)},zD=(t,e,n)=>{const{vnode:i,slots:s}=t;let r=!0,o=kt;if(i.shapeFlag&32){const a=e._;a?n&&a===1?r=!1:ME(s,e,n):(r=!e.$stable,AE(e,s)),o=e}else e&&(kE(t,e),o={default:1});if(r)for(const a in s)!TE(a)&&o[a]==null&&delete s[a]},hi=oR;function WD(t){return YD(t)}function YD(t,e){const n=Sx();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=Ls,insertStaticContent:p}=t,m=(C,O,K,U=null,re=null,j=null,se=void 0,Q=null,ge=!!O.dynamicChildren)=>{if(C===O)return;C&&!Es(C,O)&&(U=L(C),ie(C,re,j,!0),C=null),O.patchFlag===-2&&(ge=!1,O.dynamicChildren=null);const{type:_e,ref:ye,shapeFlag:ke}=O;switch(_e){case df:y(C,O,K,U);break;case $n:v(C,O,K,U);break;case Eg:C==null&&b(O,K,U,se);break;case Oe:Y(C,O,K,U,re,j,se,Q,ge);break;default:ke&1?w(C,O,K,U,re,j,se,Q,ge):ke&6?ne(C,O,K,U,re,j,se,Q,ge):(ke&64||ke&128)&&_e.process(C,O,K,U,re,j,se,Q,ge,ve)}ye!=null&&re&&$p(ye,C&&C.ref,j,O||C,!O)},y=(C,O,K,U)=>{if(C==null)i(O.el=a(O.children),K,U);else{const re=O.el=C.el;O.children!==C.children&&c(re,O.children)}},v=(C,O,K,U)=>{C==null?i(O.el=l(O.children||""),K,U):O.el=C.el},b=(C,O,K,U)=>{[C.el,C.anchor]=p(C.children,O,K,U,C.el,C.anchor)},x=({el:C,anchor:O},K,U)=>{let re;for(;C&&C!==O;)re=h(C),i(C,K,U),C=re;i(O,K,U)},E=({el:C,anchor:O})=>{let K;for(;C&&C!==O;)K=h(C),s(C),C=K;s(O)},w=(C,O,K,U,re,j,se,Q,ge)=>{O.type==="svg"?se="svg":O.type==="math"&&(se="mathml"),C==null?S(O,K,U,re,j,se,Q,ge):k(C,O,re,j,se,Q,ge)},S=(C,O,K,U,re,j,se,Q)=>{let ge,_e;const{props:ye,shapeFlag:ke,transition:Me,dirs:Be}=C;if(ge=C.el=o(C.type,j,ye&&ye.is,ye),ke&8?u(ge,C.children):ke&16&&A(C.children,ge,null,U,re,wg(C,j),se,Q),Be&&Io(C,null,U,"created"),T(ge,C,C.scopeId,se,U),ye){for(const nt in ye)nt!=="value"&&!Oc(nt)&&r(ge,nt,null,ye[nt],j,U);"value"in ye&&r(ge,"value",null,ye.value,j),(_e=ye.onVnodeBeforeMount)&&vs(_e,U,C)}Be&&Io(C,null,U,"beforeMount");const ze=HD(re,Me);ze&&Me.beforeEnter(ge),i(ge,O,K),((_e=ye&&ye.onVnodeMounted)||ze||Be)&&hi(()=>{_e&&vs(_e,U,C),ze&&Me.enter(ge),Be&&Io(C,null,U,"mounted")},re)},T=(C,O,K,U,re)=>{if(K&&f(C,K),U)for(let j=0;j{for(let _e=ge;_e{const Q=O.el=C.el;let{patchFlag:ge,dynamicChildren:_e,dirs:ye}=O;ge|=C.patchFlag&16;const ke=C.props||kt,Me=O.props||kt;let Be;if(K&&Do(K,!1),(Be=Me.onVnodeBeforeUpdate)&&vs(Be,K,O,C),ye&&Io(O,C,K,"beforeUpdate"),K&&Do(K,!0),(ke.innerHTML&&Me.innerHTML==null||ke.textContent&&Me.textContent==null)&&u(Q,""),_e?P(C.dynamicChildren,_e,Q,K,U,wg(O,re),j):se||X(C,O,Q,null,K,U,wg(O,re),j,!1),ge>0){if(ge&16)B(Q,ke,Me,K,re);else if(ge&2&&ke.class!==Me.class&&r(Q,"class",null,Me.class,re),ge&4&&r(Q,"style",ke.style,Me.style,re),ge&8){const ze=O.dynamicProps;for(let nt=0;nt{Be&&vs(Be,K,O,C),ye&&Io(O,C,K,"updated")},U)},P=(C,O,K,U,re,j,se)=>{for(let Q=0;Q{if(O!==K){if(O!==kt)for(const j in O)!Oc(j)&&!(j in K)&&r(C,j,O[j],null,re,U);for(const j in K){if(Oc(j))continue;const se=K[j],Q=O[j];se!==Q&&j!=="value"&&r(C,j,Q,se,re,U)}"value"in K&&r(C,"value",O.value,K.value,re)}},Y=(C,O,K,U,re,j,se,Q,ge)=>{const _e=O.el=C?C.el:a(""),ye=O.anchor=C?C.anchor:a("");let{patchFlag:ke,dynamicChildren:Me,slotScopeIds:Be}=O;Be&&(Q=Q?Q.concat(Be):Be),C==null?(i(_e,K,U),i(ye,K,U),A(O.children||[],K,ye,re,j,se,Q,ge)):ke>0&&ke&64&&Me&&C.dynamicChildren?(P(C.dynamicChildren,Me,K,re,j,se,Q),(O.key!=null||re&&O===re.subTree)&&f_(C,O,!0)):X(C,O,K,ye,re,j,se,Q,ge)},ne=(C,O,K,U,re,j,se,Q,ge)=>{O.slotScopeIds=Q,C==null?O.shapeFlag&512?re.ctx.activate(O,K,U,se,ge):$(O,K,U,re,j,se,ge):F(C,O,ge)},$=(C,O,K,U,re,j,se)=>{const Q=C.component=dR(C,U,re);if(lf(C)&&(Q.ctx.renderer=ve),hR(Q,!1,se),Q.asyncDep){if(re&&re.registerDep(Q,D,se),!C.el){const ge=Q.subTree=N($n);v(null,ge,O,K)}}else D(Q,C,O,K,re,j,se)},F=(C,O,K)=>{const U=O.component=C.component;if(eR(C,O,K))if(U.asyncDep&&!U.asyncResolved){z(U,O,K);return}else U.next=O,U.update();else O.el=C.el,U.vnode=O},D=(C,O,K,U,re,j,se)=>{const Q=()=>{if(C.isMounted){let{next:ke,bu:Me,u:Be,parent:ze,vnode:nt}=C;{const Kt=PE(C);if(Kt){ke&&(ke.el=nt.el,z(C,ke,se)),Kt.asyncDep.then(()=>{C.isUnmounted||Q()});return}}let Qe=ke,qt;Do(C,!1),ke?(ke.el=nt.el,z(C,ke,se)):ke=nt,Me&&eh(Me),(qt=ke.props&&ke.props.onVnodeBeforeUpdate)&&vs(qt,ze,ke,nt),Do(C,!0);const Bt=xg(C),fn=C.subTree;C.subTree=Bt,m(fn,Bt,d(fn.el),L(fn),C,re,j),ke.el=Bt.el,Qe===null&&g_(C,Bt.el),Be&&hi(Be,re),(qt=ke.props&&ke.props.onVnodeUpdated)&&hi(()=>vs(qt,ze,ke,nt),re)}else{let ke;const{el:Me,props:Be}=O,{bm:ze,m:nt,parent:Qe,root:qt,type:Bt}=C,fn=al(O);if(Do(C,!1),ze&&eh(ze),!fn&&(ke=Be&&Be.onVnodeBeforeMount)&&vs(ke,Qe,O),Do(C,!0),Me&&fe){const Kt=()=>{C.subTree=xg(C),fe(Me,C.subTree,C,re,null)};fn&&Bt.__asyncHydrate?Bt.__asyncHydrate(Me,C,Kt):Kt()}else{qt.ce&&qt.ce._injectChildStyle(Bt);const Kt=C.subTree=xg(C);m(null,Kt,K,U,C,re,j),O.el=Kt.el}if(nt&&hi(nt,re),!fn&&(ke=Be&&Be.onVnodeMounted)){const Kt=O;hi(()=>vs(ke,Qe,Kt),re)}(O.shapeFlag&256||Qe&&al(Qe.vnode)&&Qe.vnode.shapeFlag&256)&&C.a&&hi(C.a,re),C.isMounted=!0,O=K=U=null}};C.scope.on();const ge=C.effect=new Ix(Q);C.scope.off();const _e=C.update=ge.run.bind(ge),ye=C.job=ge.runIfDirty.bind(ge);ye.i=C,ye.id=C.uid,ge.scheduler=()=>c_(ye),Do(C,!0),_e()},z=(C,O,K)=>{O.component=C;const U=C.vnode.props;C.vnode=O,C.next=null,ND(C,O.props,U,K),zD(C,O.children,K),po(),Xv(C),mo()},X=(C,O,K,U,re,j,se,Q,ge=!1)=>{const _e=C&&C.children,ye=C?C.shapeFlag:0,ke=O.children,{patchFlag:Me,shapeFlag:Be}=O;if(Me>0){if(Me&128){H(_e,ke,K,U,re,j,se,Q,ge);return}else if(Me&256){Z(_e,ke,K,U,re,j,se,Q,ge);return}}Be&8?(ye&16&&ue(_e,re,j),ke!==_e&&u(K,ke)):ye&16?Be&16?H(_e,ke,K,U,re,j,se,Q,ge):ue(_e,re,j,!0):(ye&8&&u(K,""),Be&16&&A(ke,K,U,re,j,se,Q,ge))},Z=(C,O,K,U,re,j,se,Q,ge)=>{C=C||sl,O=O||sl;const _e=C.length,ye=O.length,ke=Math.min(_e,ye);let Me;for(Me=0;Meye?ue(C,re,j,!0,!1,ke):A(O,K,U,re,j,se,Q,ge,ke)},H=(C,O,K,U,re,j,se,Q,ge)=>{let _e=0;const ye=O.length;let ke=C.length-1,Me=ye-1;for(;_e<=ke&&_e<=Me;){const Be=C[_e],ze=O[_e]=ge?Wr(O[_e]):ns(O[_e]);if(Es(Be,ze))m(Be,ze,K,null,re,j,se,Q,ge);else break;_e++}for(;_e<=ke&&_e<=Me;){const Be=C[ke],ze=O[Me]=ge?Wr(O[Me]):ns(O[Me]);if(Es(Be,ze))m(Be,ze,K,null,re,j,se,Q,ge);else break;ke--,Me--}if(_e>ke){if(_e<=Me){const Be=Me+1,ze=BeMe)for(;_e<=ke;)ie(C[_e],re,j,!0),_e++;else{const Be=_e,ze=_e,nt=new Map;for(_e=ze;_e<=Me;_e++){const Zt=O[_e]=ge?Wr(O[_e]):ns(O[_e]);Zt.key!=null&&nt.set(Zt.key,_e)}let Qe,qt=0;const Bt=Me-ze+1;let fn=!1,Kt=0;const Ei=new Array(Bt);for(_e=0;_e=Bt){ie(Zt,re,j,!0);continue}let oe;if(Zt.key!=null)oe=nt.get(Zt.key);else for(Qe=ze;Qe<=Me;Qe++)if(Ei[Qe-ze]===0&&Es(Zt,O[Qe])){oe=Qe;break}oe===void 0?ie(Zt,re,j,!0):(Ei[oe-ze]=_e+1,oe>=Kt?Kt=oe:fn=!0,m(Zt,O[oe],K,null,re,j,se,Q,ge),qt++)}const Xi=fn?jD(Ei):sl;for(Qe=Xi.length-1,_e=Bt-1;_e>=0;_e--){const Zt=ze+_e,oe=O[Zt],Te=Zt+1{const{el:j,type:se,transition:Q,children:ge,shapeFlag:_e}=C;if(_e&6){le(C.component.subTree,O,K,U);return}if(_e&128){C.suspense.move(O,K,U);return}if(_e&64){se.move(C,O,K,ve);return}if(se===Oe){i(j,O,K);for(let ke=0;keQ.enter(j),re);else{const{leave:ke,delayLeave:Me,afterLeave:Be}=Q,ze=()=>i(j,O,K),nt=()=>{ke(j,()=>{ze(),Be&&Be()})};Me?Me(j,ze,nt):nt()}else i(j,O,K)},ie=(C,O,K,U=!1,re=!1)=>{const{type:j,props:se,ref:Q,children:ge,dynamicChildren:_e,shapeFlag:ye,patchFlag:ke,dirs:Me,cacheIndex:Be}=C;if(ke===-2&&(re=!1),Q!=null&&$p(Q,null,K,C,!0),Be!=null&&(O.renderCache[Be]=void 0),ye&256){O.ctx.deactivate(C);return}const ze=ye&1&&Me,nt=!al(C);let Qe;if(nt&&(Qe=se&&se.onVnodeBeforeUnmount)&&vs(Qe,O,C),ye&6)ee(C.component,K,U);else{if(ye&128){C.suspense.unmount(K,U);return}ze&&Io(C,null,O,"beforeUnmount"),ye&64?C.type.remove(C,O,K,ve,U):_e&&!_e.hasOnce&&(j!==Oe||ke>0&&ke&64)?ue(_e,O,K,!1,!0):(j===Oe&&ke&384||!re&&ye&16)&&ue(ge,O,K),U&&te(C)}(nt&&(Qe=se&&se.onVnodeUnmounted)||ze)&&hi(()=>{Qe&&vs(Qe,O,C),ze&&Io(C,null,O,"unmounted")},K)},te=C=>{const{type:O,el:K,anchor:U,transition:re}=C;if(O===Oe){I(K,U);return}if(O===Eg){E(C);return}const j=()=>{s(K),re&&!re.persisted&&re.afterLeave&&re.afterLeave()};if(C.shapeFlag&1&&re&&!re.persisted){const{leave:se,delayLeave:Q}=re,ge=()=>se(K,j);Q?Q(C.el,j,ge):ge()}else j()},I=(C,O)=>{let K;for(;C!==O;)K=h(C),s(C),C=K;s(O)},ee=(C,O,K)=>{const{bum:U,scope:re,job:j,subTree:se,um:Q,m:ge,a:_e}=C;r0(ge),r0(_e),U&&eh(U),re.stop(),j&&(j.flags|=8,ie(se,C,O,K)),Q&&hi(Q,O),hi(()=>{C.isUnmounted=!0},O),O&&O.pendingBranch&&!O.isUnmounted&&C.asyncDep&&!C.asyncResolved&&C.suspenseId===O.pendingId&&(O.deps--,O.deps===0&&O.resolve())},ue=(C,O,K,U=!1,re=!1,j=0)=>{for(let se=j;se{if(C.shapeFlag&6)return L(C.component.subTree);if(C.shapeFlag&128)return C.suspense.next();const O=h(C.anchor||C.el),K=O&&O[tE];return K?h(K):O};let ae=!1;const de=(C,O,K)=>{C==null?O._vnode&&ie(O._vnode,null,null,!0):m(O._vnode||null,C,O,null,null,null,K),O._vnode=C,ae||(ae=!0,Xv(),Jx(),ae=!1)},ve={p:m,um:ie,m:le,r:te,mt:$,mc:A,pc:X,pbc:P,n:L,o:t};let W,fe;return{render:de,hydrate:W,createApp:LD(de,W)}}function wg({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 Do({effect:t,job:e},n){n?(t.flags|=32,e.flags|=4):(t.flags&=-33,e.flags&=-5)}function HD(t,e){return(!t||t&&!t.pendingBranch)&&e&&!e.persisted}function f_(t,e,n=!1){const i=t.children,s=e.children;if(Ye(i)&&Ye(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 PE(t){const e=t.subTree.component;if(e)return e.asyncDep&&!e.asyncResolved?e:PE(e)}function r0(t){if(t)for(let e=0;eus(KD);function un(t,e,n){return IE(t,e,n)}function IE(t,e,n=kt){const{immediate:i,deep:s,flush:r,once:o}=n,a=_n({},n);let l;if(ff)if(r==="sync"){const h=UD();l=h.__watcherHandles||(h.__watcherHandles=[])}else if(!e||i)a.once=!0;else{const h=()=>{};return h.stop=Ls,h.resume=Ls,h.pause=Ls,h}const c=Mn;a.call=(h,f,p)=>fs(h,c,f,p);let u=!1;r==="post"?a.scheduler=h=>{hi(h,c&&c.suspense)}:r!=="sync"&&(u=!0,a.scheduler=(h,f)=>{f?h():c_(h)}),a.augmentJob=h=>{e&&(h.flags|=4),u&&(h.flags|=2,c&&(h.id=c.uid,h.i=c))};const d=lD(t,e,a);return l&&l.push(d),d}function GD(t,e,n){const i=this.proxy,s=Ht(t)?t.includes(".")?DE(i,t):()=>i[t]:t.bind(i,i);let r;qe(e)?r=e:(r=e.handler,n=e);const o=Bu(this),a=IE(s,r.bind(i),n);return o(),a}function DE(t,e){const n=e.split(".");return()=>{let i=t;for(let s=0;se==="modelValue"||e==="model-value"?t.modelModifiers:t[`${e}Modifiers`]||t[`${ji(e)}Modifiers`]||t[`${go(e)}Modifiers`];function qD(t,e,...n){if(t.isUnmounted)return;const i=t.vnode.props||kt;let s=n;const r=e.startsWith("update:"),o=r&&XD(i,e.slice(7));o&&(o.trim&&(s=n.map(u=>Ht(u)?u.trim():u)),o.number&&(s=n.map(hh)));let a,l=i[a=gg(e)]||i[a=gg(ji(e))];!l&&r&&(l=i[a=gg(go(e))]),l&&fs(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,fs(c,t,6,s)}}function RE(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=RE(c,e,!0);u&&(a=!0,_n(o,u))};!n&&e.mixins.length&&e.mixins.forEach(l),t.extends&&l(t.extends),t.mixins&&t.mixins.forEach(l)}return!r&&!a?(Mt(t)&&i.set(t,null),null):(Ye(r)?r.forEach(l=>o[l]=null):_n(o,r),Mt(t)&&i.set(t,o),o)}function uf(t,e){return!t||!Qh(e)?!1:(e=e.slice(2).replace(/Once$/,""),bt(t,e[0].toLowerCase()+e.slice(1))||bt(t,go(e))||bt(t,e))}function xg(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=mh(t);let v,b;try{if(n.shapeFlag&4){const E=s||i,w=E;v=ns(c.call(w,E,u,d,f,h,p)),b=a}else{const E=e;v=ns(E.length>1?E(d,{attrs:a,slots:o,emit:l}):E(d,null)),b=e.props?a:JD(a)}}catch(E){Vc.length=0,Fu(E,t,1),v=N($n)}let x=v;if(b&&m!==!1){const E=Object.keys(b),{shapeFlag:w}=x;E.length&&w&7&&(r&&E.some(qm)&&(b=QD(b,r)),x=ro(x,b,!1,!0))}return n.dirs&&(x=ro(x,null,!1,!0),x.dirs=x.dirs?x.dirs.concat(n.dirs):n.dirs),n.transition&&ca(x,n.transition),v=x,mh(y),v}function ZD(t,e=!0){let n;for(let i=0;i{let e;for(const n in t)(n==="class"||n==="style"||Qh(n))&&((e||(e={}))[n]=t[n]);return e},QD=(t,e)=>{const n={};for(const i in t)(!qm(i)||!(i.slice(9)in e))&&(n[i]=t[i]);return n};function eR(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?o0(i,o,c):!!o;if(l&8){const u=e.dynamicProps;for(let d=0;dt.__isSuspense;let zp=0;const tR={name:"Suspense",__isSuspense:!0,process(t,e,n,i,s,r,o,a,l,c){if(t==null)nR(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}iR(t,e,n,i,s,o,a,l,c)}},hydrate:sR,normalize:rR},p_=tR;function su(t,e){const n=t.props&&t.props[e];qe(n)&&n()}function nR(t,e,n,i,s,r,o,a,l){const{p:c,o:{createElement:u}}=l,d=u("div"),h=t.suspense=OE(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?(su(t,"onPending"),su(t,"onFallback"),c(null,t.ssFallback,e,n,i,null,r,o),ll(h,t.ssFallback)):h.resolve(!1,!0)}function iR(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,Es(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),ll(d,f)))):(d.pendingId=zp++,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),ll(d,f))):p&&Es(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&&Es(h,p))l(p,h,n,i,s,d,r,o,a),ll(d,h);else if(su(e,"onPending"),d.pendingBranch=h,h.shapeFlag&512?d.pendingId=h.component.suspenseId:d.pendingId=zp++,l(null,h,d.hiddenContainer,null,s,d,r,o,a),d.deps<=0)d.resolve();else{const{timeout:b,pendingId:x}=d;b>0?setTimeout(()=>{d.pendingId===x&&d.fallback(f)},b):b===0&&d.fallback(f)}}function OE(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=aR(t);b&&e&&e.pendingBranch&&(v=e.pendingId,e.deps++);const x=t.props?Cx(t.props.timeout):void 0,E=r,w={vnode:t,parent:e,parentComponent:n,namespace:o,container:i,hiddenContainer:s,deps:0,pendingId:zp++,timeout:typeof x=="number"?x:-1,activeBranch:null,pendingBranch:null,isInFallback:!u,isHydrating:u,isUnmounted:!1,effects:[],resolve(S=!1,T=!1){const{vnode:A,activeBranch:k,pendingBranch:P,pendingId:B,effects:Y,parentComponent:ne,container:$}=w;let F=!1;w.isHydrating?w.isHydrating=!1:S||(F=k&&P.transition&&P.transition.mode==="out-in",F&&(k.transition.afterLeave=()=>{B===w.pendingId&&(h(P,$,r===E?p(k):r,0),Lp(Y))}),k&&(m(k.el)===$&&(r=p(k)),f(k,ne,w,!0)),F||h(P,$,r,0)),ll(w,P),w.pendingBranch=null,w.isInFallback=!1;let D=w.parent,z=!1;for(;D;){if(D.pendingBranch){D.effects.push(...Y),z=!0;break}D=D.parent}!z&&!F&&Lp(Y),w.effects=[],b&&e&&e.pendingBranch&&v===e.pendingId&&(e.deps--,e.deps===0&&!T&&e.resolve()),su(A,"onResolve")},fallback(S){if(!w.pendingBranch)return;const{vnode:T,activeBranch:A,parentComponent:k,container:P,namespace:B}=w;su(T,"onFallback");const Y=p(A),ne=()=>{w.isInFallback&&(d(null,S,P,Y,k,null,B,a,l),ll(w,S))},$=S.transition&&S.transition.mode==="out-in";$&&(A.transition.afterLeave=ne),w.isInFallback=!0,f(A,k,null,!0),$||ne()},move(S,T,A){w.activeBranch&&h(w.activeBranch,S,T,A),w.container=S},next(){return w.activeBranch&&p(w.activeBranch)},registerDep(S,T,A){const k=!!w.pendingBranch;k&&w.deps++;const P=S.vnode.el;S.asyncDep.catch(B=>{Fu(B,S,0)}).then(B=>{if(S.isUnmounted||w.isUnmounted||w.pendingId!==S.suspenseId)return;S.asyncResolved=!0;const{vnode:Y}=S;Yp(S,B,!1),P&&(Y.el=P);const ne=!P&&S.subTree.el;T(S,Y,m(P||S.subTree.el),P?null:p(S.subTree),w,o,A),ne&&y(ne),g_(S,Y.el),k&&--w.deps===0&&w.resolve()})},unmount(S,T){w.isUnmounted=!0,w.activeBranch&&f(w.activeBranch,n,S,T),w.pendingBranch&&f(w.pendingBranch,n,S,T)}};return w}function sR(t,e,n,i,s,r,o,a,l){const c=e.suspense=OE(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 rR(t){const{shapeFlag:e,children:n}=t,i=e&32;t.ssContent=a0(i?n.default:n),t.ssFallback=i?a0(n.fallback):N($n)}function a0(t){let e;if(qe(t)){const n=yl&&t._c;n&&(t._d=!1,R()),t=t(),n&&(t._d=!0,e=vi,$E())}return Ye(t)&&(t=ZD(t)),t=ns(t),e&&!t.dynamicChildren&&(t.dynamicChildren=e.filter(n=>n!==t)),t}function oR(t,e){e&&e.pendingBranch?Ye(t)?e.effects.push(...t):e.effects.push(t):Lp(t)}function ll(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,g_(i,s))}function aR(t){const e=t.props&&t.props.suspensible;return e!=null&&e!==!1}const Oe=Symbol.for("v-fgt"),df=Symbol.for("v-txt"),$n=Symbol.for("v-cmt"),Eg=Symbol.for("v-stc"),Vc=[];let vi=null;function R(t=!1){Vc.push(vi=t?null:[])}function $E(){Vc.pop(),vi=Vc[Vc.length-1]||null}let yl=1;function l0(t){yl+=t,t<0&&vi&&(vi.hasOnce=!0)}function NE(t){return t.dynamicChildren=yl>0?vi||sl:null,$E(),yl>0&&vi&&vi.push(t),t}function V(t,e,n,i,s,r){return NE(g(t,e,n,i,s,r,!0))}function Se(t,e,n,i,s){return NE(N(t,e,n,i,s,!0))}function vl(t){return t?t.__v_isVNode===!0:!1}function Es(t,e){return t.type===e.type&&t.key===e.key}const FE=({key:t})=>t??null,ih=({ref:t,ref_key:e,ref_for:n})=>(typeof t=="number"&&(t=""+t),t!=null?Ht(t)||Wt(t)||qe(t)?{i:bn,r:t,k:e,f:!!n}:t:null);function g(t,e=null,n=null,i=0,s=null,r=t===Oe?0:1,o=!1,a=!1){const l={__v_isVNode:!0,__v_skip:!0,type:t,props:e,key:e&&FE(e),ref:e&&ih(e),scopeId:eE,slotScopeIds:null,children:n,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetStart:null,targetAnchor:null,staticCount:0,shapeFlag:r,patchFlag:i,dynamicProps:s,dynamicChildren:null,appContext:null,ctx:bn};return a?(m_(l,n),r&128&&t.normalize(l)):n&&(l.shapeFlag|=Ht(n)?8:16),yl>0&&!o&&vi&&(l.patchFlag>0||r&6)&&l.patchFlag!==32&&vi.push(l),l}const N=lR;function lR(t,e=null,n=null,i=0,s=null,r=!1){if((!t||t===pE)&&(t=$n),vl(t)){const a=ro(t,e,!0);return n&&m_(a,n),yl>0&&!r&&vi&&(a.shapeFlag&6?vi[vi.indexOf(t)]=a:vi.push(a)),a.patchFlag=-2,a}if(mR(t)&&(t=t.__vccOpts),e){e=ni(e);let{class:a,style:l}=e;a&&!Ht(a)&&(e.class=Pe(a)),Mt(l)&&($u(l)&&!Ye(l)&&(l=_n({},l)),e.style=Pn(l))}const o=Ht(t)?1:LE(t)?128:nE(t)?64:Mt(t)?4:qe(t)?2:0;return g(t,e,n,i,s,o,r,!0)}function ni(t){return t?$u(t)||EE(t)?_n({},t):t:null}function ro(t,e,n=!1,i=!1){const{props:s,ref:r,patchFlag:o,children:a,transition:l}=t,c=e?wn(s||{},e):s,u={__v_isVNode:!0,__v_skip:!0,type:t.type,props:c,key:c&&FE(c),ref:e&&e.ref?n&&r?Ye(r)?r.concat(ih(e)):[r,ih(e)]:ih(e):r,scopeId:t.scopeId,slotScopeIds:t.slotScopeIds,children:a,target:t.target,targetStart:t.targetStart,targetAnchor:t.targetAnchor,staticCount:t.staticCount,shapeFlag:t.shapeFlag,patchFlag:e&&t.type!==Oe?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&&ro(t.ssContent),ssFallback:t.ssFallback&&ro(t.ssFallback),el:t.el,anchor:t.anchor,ctx:t.ctx,ce:t.ce};return l&&i&&ca(u,l.clone(u)),u}function Ue(t=" ",e=0){return N(df,null,t,e)}function ce(t="",e=!1){return e?(R(),Se($n,null,t)):N($n,null,t)}function ns(t){return t==null||typeof t=="boolean"?N($n):Ye(t)?N(Oe,null,t.slice()):vl(t)?Wr(t):N(df,null,String(t))}function Wr(t){return t.el===null&&t.patchFlag!==-1||t.memo?t:ro(t)}function m_(t,e){let n=0;const{shapeFlag:i}=t;if(e==null)e=null;else if(Ye(e))n=16;else if(typeof e=="object")if(i&65){const s=e.default;s&&(s._c&&(s._d=!1),m_(t,s()),s._c&&(s._d=!0));return}else{n=32;const s=e._;!s&&!EE(e)?e._ctx=bn:s===3&&bn&&(bn.slots._===1?e._=1:(e._=2,t.patchFlag|=1024))}else qe(e)?(e={default:e,_ctx:bn},n=32):(e=String(e),i&64?(n=16,e=[Ue(e)]):n=8);t.children=e,t.shapeFlag|=n}function wn(...t){const e={};for(let n=0;nMn||bn;let yh,Wp;{const t=Sx(),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)}};yh=e("__VUE_INSTANCE_SETTERS__",n=>Mn=n),Wp=e("__VUE_SSR_SETTERS__",n=>ff=n)}const Bu=t=>{const e=Mn;return yh(t),t.scope.on(),()=>{t.scope.off(),yh(e)}},c0=()=>{Mn&&Mn.scope.off(),yh(null)};function BE(t){return t.vnode.shapeFlag&4}let ff=!1;function hR(t,e=!1,n=!1){e&&Wp(e);const{props:i,children:s}=t.vnode,r=BE(t);$D(t,i,r,e),VD(t,s,n);const o=r?fR(t,e):void 0;return e&&Wp(!1),o}function fR(t,e){const n=t.type;t.accessCache=Object.create(null),t.proxy=new Proxy(t.ctx,TD);const{setup:i}=n;if(i){const s=t.setupContext=i.length>1?zE(t):null,r=Bu(t);po();const o=Nu(i,t,0,[t.props,s]);if(mo(),r(),bx(o)){if(al(t)||cE(t),o.then(c0,c0),e)return o.then(a=>{Yp(t,a,e)}).catch(a=>{Fu(a,t,0)});t.asyncDep=o}else Yp(t,o,e)}else VE(t,e)}function Yp(t,e,n){qe(e)?t.type.__ssrInlineRender?t.ssrRender=e:t.render=e:Mt(e)&&(t.setupState=Gx(e)),VE(t,n)}let u0;function VE(t,e,n){const i=t.type;if(!t.render){if(!e&&u0&&!i.render){const s=i.template||d_(t).template;if(s){const{isCustomElement:r,compilerOptions:o}=t.appContext.config,{delimiters:a,compilerOptions:l}=i,c=_n(_n({isCustomElement:r,delimiters:a},o),l);i.render=u0(s,c)}}t.render=i.render||Ls}{const s=Bu(t);po();try{kD(t)}finally{mo(),s()}}}const gR={get(t,e){return Gn(t,"get",""),t[e]}};function zE(t){const e=n=>{t.exposed=n||{}};return{attrs:new Proxy(t.attrs,gR),slots:t.slots,emit:t.emit,expose:e}}function gf(t){return t.exposed?t.exposeProxy||(t.exposeProxy=new Proxy(Gx(of(t.exposed)),{get(e,n){if(n in e)return e[n];if(n in Bc)return Bc[n](t)},has(e,n){return n in e||n in Bc}})):t.proxy}function pR(t,e=!0){return qe(t)?t.displayName||t.name:t.name||e&&t.__name}function mR(t){return qe(t)&&"__vccOpts"in t}const be=(t,e)=>oD(t,e,ff);function ua(t,e,n){const i=arguments.length;return i===2?Mt(e)&&!Ye(e)?vl(e)?N(t,null,[e]):N(t,e):N(t,null,e):(i>3?n=Array.prototype.slice.call(arguments,2):i===3&&vl(n)&&(n=[n]),N(t,e,n))}const WE="3.5.11";/** +**/function Nu(t,e,n,i){try{return i?t(...i):t()}catch(s){Fu(s,e,n)}}function fs(t,e,n,i){if(qe(t)){const s=Nu(t,e,n,i);return s&&bx(s)&&s.catch(r=>{Fu(r,e,n)}),s}if(Ye(t)){const s=[];for(let r=0;r>>1,s=ei[i],r=nu(s);r=nu(n)?ei.push(t):ei.splice(uD(e),0,t),t.flags|=1,Zx()}}function Zx(){ph||(ph=qx.then(Qx))}function Lp(t){Ye(t)?ol.push(...t):Vr&&t.id===-1?Vr.splice(Ua+1,0,t):t.flags&1||(ol.push(t),t.flags|=1),Zx()}function Xv(t,e,n=ws+1){for(;nnu(n)-nu(i));if(ol.length=0,Vr){Vr.push(...e);return}for(Vr=e,Ua=0;Uat.id==null?t.flags&2?-1:1/0:t.id;function Qx(t){try{for(ws=0;ws{i._d&&l0(-1);const r=mh(e);let o;try{o=t(...s)}finally{mh(r),i._d&&l0(1)}return o};return i._n=!0,i._c=!0,i._d=!0,i}function $e(t,e){if(bn===null)return t;const n=gf(bn),i=t.dirs||(t.dirs=[]);for(let s=0;st.__isTeleport,Fc=t=>t&&(t.disabled||t.disabled===""),dD=t=>t&&(t.defer||t.defer===""),qv=t=>typeof SVGElement<"u"&&t instanceof SVGElement,Zv=t=>typeof MathMLElement=="function"&&t instanceof MathMLElement,Op=(t,e)=>{const n=t&&t.to;return Ht(n)?e?e(n):null:n},hD={name:"Teleport",__isTeleport:!0,process(t,e,n,i,s,r,o,a,l,c){const{mc:u,pc:d,pbc:h,o:{insert:g,querySelector:p,createText:m,createComment:y}}=c,v=Fc(e.props);let{shapeFlag:b,children:x,dynamicChildren:E}=e;if(t==null){const w=e.el=m(""),S=e.anchor=m("");g(w,n,i),g(S,n,i);const T=(k,P)=>{b&16&&(s&&s.isCE&&(s.ce._teleportTarget=k),u(x,k,P,s,r,o,a,l))},A=()=>{const k=e.target=Op(e.props,p),P=iE(k,e,m,g);k&&(o!=="svg"&&qv(k)?o="svg":o!=="mathml"&&Zv(k)&&(o="mathml"),v||(T(k,P),th(e)))};v&&(T(n,S),th(e)),dD(e.props)?hi(A,r):A()}else{e.el=t.el,e.targetStart=t.targetStart;const w=e.anchor=t.anchor,S=e.target=t.target,T=e.targetAnchor=t.targetAnchor,A=Fc(t.props),k=A?n:S,P=A?w:T;if(o==="svg"||qv(S)?o="svg":(o==="mathml"||Zv(S))&&(o="mathml"),E?(h(t.dynamicChildren,E,k,s,r,o,a),f_(t,e,!0)):l||d(t,e,k,P,s,r,o,a,!1),v)A?e.props&&t.props&&e.props.to!==t.props.to&&(e.props.to=t.props.to):bd(e,n,w,c,1);else if((e.props&&e.props.to)!==(t.props&&t.props.to)){const B=e.target=Op(e.props,p);B&&bd(e,B,null,c,0)}else A&&bd(e,S,T,c,1);th(e)}},remove(t,e,n,{um:i,o:{remove:s}},r){const{shapeFlag:o,children:a,anchor:l,targetStart:c,targetAnchor:u,target:d,props:h}=t;if(d&&(s(c),s(u)),r&&s(l),o&16){const g=r||!Fc(h);for(let p=0;p{t.isMounted=!0}),fE(()=>{t.isUnmounting=!0}),t}const Ni=[Function,Array],rE={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},oE=t=>{const e=t.subTree;return e.component?oE(e.component):e},pD={name:"BaseTransition",props:rE,setup(t,{slots:e}){const n=hf(),i=sE();return()=>{const s=e.default&&u_(e.default(),!0);if(!s||!s.length)return;const r=aE(s),o=lt(t),{mode:a}=o;if(i.isLeaving)return vg(r);const l=Jv(r);if(!l)return vg(r);let c=iu(l,o,i,n,h=>c=h);l.type!==$n&&ca(l,c);const u=n.subTree,d=u&&Jv(u);if(d&&d.type!==$n&&!Es(l,d)&&oE(n).type!==$n){const h=iu(d,o,i,n);if(ca(d,h),a==="out-in"&&l.type!==$n)return i.isLeaving=!0,h.afterLeave=()=>{i.isLeaving=!1,n.job.flags&8||n.update(),delete h.afterLeave},vg(r);a==="in-out"&&l.type!==$n&&(h.delayLeave=(g,p,m)=>{const y=lE(i,d);y[String(d.key)]=d,g[zr]=()=>{p(),g[zr]=void 0,delete c.delayedLeave},c.delayedLeave=m})}return r}}};function aE(t){let e=t[0];if(t.length>1){for(const n of t)if(n.type!==$n){e=n;break}}return e}const mD=pD;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 iu(t,e,n,i,s){const{appear:r,mode:o,persisted:a=!1,onBeforeEnter:l,onEnter:c,onAfterEnter:u,onEnterCancelled:d,onBeforeLeave:h,onLeave:g,onAfterLeave:p,onLeaveCancelled:m,onBeforeAppear:y,onAppear:v,onAfterAppear:b,onAppearCancelled:x}=e,E=String(t.key),w=lE(n,t),S=(k,P)=>{k&&fs(k,i,9,P)},T=(k,P)=>{const B=P[1];S(k,P),Ye(k)?k.every(Y=>Y.length<=1)&&B():k.length<=1&&B()},A={mode:o,persisted:a,beforeEnter(k){let P=l;if(!n.isMounted)if(r)P=y||l;else return;k[zr]&&k[zr](!0);const B=w[E];B&&Es(t,B)&&B.el[zr]&&B.el[zr](),S(P,[k])},enter(k){let P=c,B=u,Y=d;if(!n.isMounted)if(r)P=v||c,B=b||u,Y=x||d;else return;let ne=!1;const $=k[wd]=F=>{ne||(ne=!0,F?S(Y,[k]):S(B,[k]),A.delayedLeave&&A.delayedLeave(),k[wd]=void 0)};P?T(P,[k,$]):$()},leave(k,P){const B=String(t.key);if(k[wd]&&k[wd](!0),n.isUnmounting)return P();S(h,[k]);let Y=!1;const ne=k[zr]=$=>{Y||(Y=!0,P(),$?S(m,[k]):S(p,[k]),k[zr]=void 0,w[B]===t&&delete w[B])};w[B]=t,g?T(g,[k,ne]):ne()},clone(k){const P=iu(k,e,n,i,s);return s&&s(P),P}};return A}function vg(t){if(lf(t))return t=ro(t),t.children=null,t}function Jv(t){if(!lf(t))return nE(t.type)&&t.children?aE(t.children):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 ca(t,e){t.shapeFlag&6&&t.component?(t.transition=e,ca(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 u_(t,e=!1,n){let i=[],s=0;for(let r=0;r1)for(let r=0;rn.value,set:r=>n.value=r})}return n}function $p(t,e,n,i,s=!1){if(Ye(t)){t.forEach((p,m)=>$p(p,e&&(Ye(e)?e[m]:e),n,i,s));return}if(al(i)&&!s)return;const r=i.shapeFlag&4?gf(i.component):i.el,o=s?null:r,{i:a,r:l}=t,c=e&&e.r,u=a.refs===kt?a.refs={}:a.refs,d=a.setupState,h=lt(d),g=d===kt?()=>!1:p=>bt(h,p);if(c!=null&&c!==l&&(Ht(c)?(u[c]=null,g(c)&&(d[c]=null)):Wt(c)&&(c.value=null)),qe(l))Nu(l,a,12,[o,u]);else{const p=Ht(l),m=Wt(l);if(p||m){const y=()=>{if(t.f){const v=p?g(l)?d[l]:u[l]:l.value;s?Ye(v)&&Zm(v,r):Ye(v)?v.includes(r)||v.push(r):p?(u[l]=[r],g(l)&&(d[l]=u[l])):(l.value=[r],t.k&&(u[t.k]=l.value))}else p?(u[l]=o,g(l)&&(d[l]=o)):m&&(l.value=o,t.k&&(u[t.k]=o))};o?(y.id=-1,hi(y,n)):y()}}}const al=t=>!!t.type.__asyncLoader,lf=t=>t.type.__isKeepAlive;function yD(t,e){uE(t,"a",e)}function vD(t,e){uE(t,"da",e)}function uE(t,e,n=Mn){const i=t.__wdc||(t.__wdc=()=>{let s=n;for(;s;){if(s.isDeactivated)return;s=s.parent}return t()});if(cf(e,i,n),n){let s=n.parent;for(;s&&s.parent;)lf(s.parent.vnode)&&bD(i,e,n,s),s=s.parent}}function bD(t,e,n,i){const s=cf(e,t,i,!0);pa(()=>{Zm(i[e],s)},n)}function cf(t,e,n=Mn,i=!1){if(n){const s=n[t]||(n[t]=[]),r=e.__weh||(e.__weh=(...o)=>{po();const a=Bu(n),l=fs(e,n,t,o);return a(),mo(),l});return i?s.unshift(r):s.push(r),r}}const wr=t=>(e,n=Mn)=>{(!ff||t==="sp")&&cf(t,(...i)=>e(...i),n)},wD=wr("bm"),En=wr("m"),dE=wr("bu"),hE=wr("u"),fE=wr("bum"),pa=wr("um"),xD=wr("sp"),ED=wr("rtg"),CD=wr("rtc");function SD(t,e=Mn){cf("ec",t,e)}const gE="components";function Ee(t,e){return mE(gE,t,!0,e)||t}const pE=Symbol.for("v-ndc");function ma(t){return Ht(t)?mE(gE,t,!1)||t:t||pE}function mE(t,e,n=!0,i=!1){const s=bn||Mn;if(s){const r=s.type;{const a=pR(r,!1);if(a&&(a===e||a===ji(e)||a===tf(ji(e))))return r}const o=Qv(s[t]||r[t],e)||Qv(s.appContext[t],e);return!o&&i?r:o}}function Qv(t,e){return t&&(t[e]||t[ji(e)]||t[tf(ji(e))])}function Ze(t,e,n,i){let s;const r=n,o=Ye(t);if(o||Ht(t)){const a=o&&Qr(t);let l=!1;a&&(l=!Yi(t),t=sf(t)),s=new Array(t.length);for(let c=0,u=t.length;ce(a,l,void 0,r));else{const a=Object.keys(t);s=new Array(a.length);for(let l=0,c=a.length;l{const r=i.fn(...s);return r&&(r.key=i.key),r}:i.fn)}return t}function Ne(t,e,n={},i,s){if(bn.ce||bn.parent&&al(bn.parent)&&bn.parent.ce)return e!=="default"&&(n.name=e),R(),Se(Le,null,[N("slot",n,i)],64);let r=t[e];r&&r._c&&(r._d=!1),R();const o=r&&_E(r(n)),a=Se(Le,{key:(n.key||o&&o.key||`_${e}`)+(!o&&i?"_fb":"")},o||[],o&&t._===1?64:-2);return a.scopeId&&(a.slotScopeIds=[a.scopeId+"-s"]),r&&r._c&&(r._d=!0),a}function _E(t){return t.some(e=>vl(e)?!(e.type===$n||e.type===Le&&!_E(e.children)):!0)?t:null}const Np=t=>t?BE(t)?gf(t):Np(t.parent):null,Bc=_n(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=>Np(t.parent),$root:t=>Np(t.root),$host:t=>t.ce,$emit:t=>t.emit,$options:t=>d_(t),$forceUpdate:t=>t.f||(t.f=()=>{c_(t.update)}),$nextTick:t=>t.n||(t.n=Rn.bind(t.proxy)),$watch:t=>GD.bind(t)}),bg=(t,e)=>t!==kt&&!t.__isScriptSetup&&bt(t,e),TD={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 g=o[e];if(g!==void 0)switch(g){case 1:return i[e];case 2:return s[e];case 4:return n[e];case 3:return r[e]}else{if(bg(i,e))return o[e]=1,i[e];if(s!==kt&&bt(s,e))return o[e]=2,s[e];if((c=t.propsOptions[0])&&bt(c,e))return o[e]=3,r[e];if(n!==kt&&bt(n,e))return o[e]=4,n[e];Fp&&(o[e]=0)}}const u=Bc[e];let d,h;if(u)return e==="$attrs"&&Gn(t.attrs,"get",""),u(t);if((d=a.__cssModules)&&(d=d[e]))return d;if(n!==kt&&bt(n,e))return o[e]=4,n[e];if(h=l.config.globalProperties,bt(h,e))return h[e]},set({_:t},e,n){const{data:i,setupState:s,ctx:r}=t;return bg(s,e)?(s[e]=n,!0):i!==kt&&bt(i,e)?(i[e]=n,!0):bt(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!==kt&&bt(t,o)||bg(e,o)||(a=r[0])&&bt(a,o)||bt(i,o)||bt(Bc,o)||bt(s.config.globalProperties,o)},defineProperty(t,e,n){return n.get!=null?t._.accessCache[e]=0:bt(n,"value")&&this.set(t,e,n.value,null),Reflect.defineProperty(t,e,n)}};function _a(){return yE().slots}function AD(){return yE().attrs}function yE(){const t=hf();return t.setupContext||(t.setupContext=zE(t))}function e0(t){return Ye(t)?t.reduce((e,n)=>(e[n]=null,e),{}):t}let Fp=!0;function kD(t){const e=d_(t),n=t.proxy,i=t.ctx;Fp=!1,e.beforeCreate&&t0(e.beforeCreate,t,"bc");const{data:s,computed:r,methods:o,watch:a,provide:l,inject:c,created:u,beforeMount:d,mounted:h,beforeUpdate:g,updated:p,activated:m,deactivated:y,beforeDestroy:v,beforeUnmount:b,destroyed:x,unmounted:E,render:w,renderTracked:S,renderTriggered:T,errorCaptured:A,serverPrefetch:k,expose:P,inheritAttrs:B,components:Y,directives:ne,filters:$}=e;if(c&&MD(c,i,null),o)for(const z in o){const X=o[z];qe(X)&&(i[z]=X.bind(n))}if(s){const z=s.call(n,n);Mt(z)&&(t.data=Ki(z))}if(Fp=!0,r)for(const z in r){const X=r[z],Z=qe(X)?X.bind(n,n):qe(X.get)?X.get.bind(n,n):Ls,H=!qe(X)&&qe(X.set)?X.set.bind(n):Ls,le=be({get:Z,set:H});Object.defineProperty(i,z,{enumerable:!0,configurable:!0,get:()=>le.value,set:ie=>le.value=ie})}if(a)for(const z in a)vE(a[z],i,n,z);if(l){const z=qe(l)?l.call(n):l;Reflect.ownKeys(z).forEach(X=>{nh(X,z[X])})}u&&t0(u,t,"c");function D(z,X){Ye(X)?X.forEach(Z=>z(Z.bind(n))):X&&z(X.bind(n))}if(D(wD,d),D(En,h),D(dE,g),D(hE,p),D(yD,m),D(vD,y),D(SD,A),D(CD,S),D(ED,T),D(fE,b),D(pa,E),D(xD,k),Ye(P))if(P.length){const z=t.exposed||(t.exposed={});P.forEach(X=>{Object.defineProperty(z,X,{get:()=>n[X],set:Z=>n[X]=Z})})}else t.exposed||(t.exposed={});w&&t.render===Ls&&(t.render=w),B!=null&&(t.inheritAttrs=B),Y&&(t.components=Y),ne&&(t.directives=ne),k&&cE(t)}function MD(t,e,n=Ls){Ye(t)&&(t=Bp(t));for(const i in t){const s=t[i];let r;Mt(s)?"default"in s?r=us(s.from||i,s.default,!0):r=us(s.from||i):r=us(s),Wt(r)?Object.defineProperty(e,i,{enumerable:!0,configurable:!0,get:()=>r.value,set:o=>r.value=o}):e[i]=r}}function t0(t,e,n){fs(Ye(t)?t.map(i=>i.bind(e.proxy)):t.bind(e.proxy),e,n)}function vE(t,e,n,i){let s=i.includes(".")?DE(n,i):()=>n[i];if(Ht(t)){const r=e[t];qe(r)&&un(s,r)}else if(qe(t))un(s,t.bind(n));else if(Mt(t))if(Ye(t))t.forEach(r=>vE(r,e,n,i));else{const r=qe(t.handler)?t.handler.bind(n):e[t.handler];qe(r)&&un(s,r,t)}}function d_(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=>_h(l,c,o,!0)),_h(l,e,o)),Mt(e)&&r.set(e,l),l}function _h(t,e,n,i=!1){const{mixins:s,extends:r}=e;r&&_h(t,r,n,!0),s&&s.forEach(o=>_h(t,o,n,!0));for(const o in e)if(!(i&&o==="expose")){const a=PD[o]||n&&n[o];t[o]=a?a(t[o],e[o]):e[o]}return t}const PD={data:n0,props:i0,emits:i0,methods:wc,computed:wc,beforeCreate:Zn,created:Zn,beforeMount:Zn,mounted:Zn,beforeUpdate:Zn,updated:Zn,beforeDestroy:Zn,beforeUnmount:Zn,destroyed:Zn,unmounted:Zn,activated:Zn,deactivated:Zn,errorCaptured:Zn,serverPrefetch:Zn,components:wc,directives:wc,watch:DD,provide:n0,inject:ID};function n0(t,e){return e?t?function(){return _n(qe(t)?t.call(this,this):t,qe(e)?e.call(this,this):e)}:e:t}function ID(t,e){return wc(Bp(t),Bp(e))}function Bp(t){if(Ye(t)){const e={};for(let n=0;n1)return n&&qe(e)?e.call(i&&i.proxy):e}}function OD(){return!!(Mn||bn||ea)}const wE={},xE=()=>Object.create(wE),EE=t=>Object.getPrototypeOf(t)===wE;function $D(t,e,n,i=!1){const s={},r=xE();t.propsDefaults=Object.create(null),CE(t,e,s,r);for(const o in t.propsOptions[0])o in s||(s[o]=void 0);n?t.props=i?s:jx(s):t.type.props?t.props=s:t.props=r,t.attrs=r}function ND(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,g]=SE(d,e,!0);_n(o,h),g&&a.push(...g)};!n&&e.mixins.length&&e.mixins.forEach(u),t.extends&&u(t.extends),t.mixins&&t.mixins.forEach(u)}if(!r&&!l)return Mt(t)&&i.set(t,sl),sl;if(Ye(r))for(let u=0;ut[0]==="_"||t==="$stable",h_=t=>Ye(t)?t.map(ns):[ns(t)],BD=(t,e,n)=>{if(e._n)return e;const i=De((...s)=>h_(e(...s)),n);return i._c=!1,i},AE=(t,e,n)=>{const i=t._ctx;for(const s in t){if(TE(s))continue;const r=t[s];if(qe(r))e[s]=BD(s,r,i);else if(r!=null){const o=h_(r);e[s]=()=>o}}},kE=(t,e)=>{const n=h_(e);t.slots.default=()=>n},ME=(t,e,n)=>{for(const i in e)(n||i!=="_")&&(t[i]=e[i])},VD=(t,e,n)=>{const i=t.slots=xE();if(t.vnode.shapeFlag&32){const s=e._;s?(ME(i,e,n),n&&Ex(i,"_",s,!0)):AE(e,i)}else e&&kE(t,e)},zD=(t,e,n)=>{const{vnode:i,slots:s}=t;let r=!0,o=kt;if(i.shapeFlag&32){const a=e._;a?n&&a===1?r=!1:ME(s,e,n):(r=!e.$stable,AE(e,s)),o=e}else e&&(kE(t,e),o={default:1});if(r)for(const a in s)!TE(a)&&o[a]==null&&delete s[a]},hi=oR;function WD(t){return YD(t)}function YD(t,e){const n=Sx();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:g=Ls,insertStaticContent:p}=t,m=(C,O,K,U=null,re=null,j=null,se=void 0,Q=null,ge=!!O.dynamicChildren)=>{if(C===O)return;C&&!Es(C,O)&&(U=L(C),ie(C,re,j,!0),C=null),O.patchFlag===-2&&(ge=!1,O.dynamicChildren=null);const{type:_e,ref:ye,shapeFlag:ke}=O;switch(_e){case df:y(C,O,K,U);break;case $n:v(C,O,K,U);break;case Eg:C==null&&b(O,K,U,se);break;case Le:Y(C,O,K,U,re,j,se,Q,ge);break;default:ke&1?w(C,O,K,U,re,j,se,Q,ge):ke&6?ne(C,O,K,U,re,j,se,Q,ge):(ke&64||ke&128)&&_e.process(C,O,K,U,re,j,se,Q,ge,ve)}ye!=null&&re&&$p(ye,C&&C.ref,j,O||C,!O)},y=(C,O,K,U)=>{if(C==null)i(O.el=a(O.children),K,U);else{const re=O.el=C.el;O.children!==C.children&&c(re,O.children)}},v=(C,O,K,U)=>{C==null?i(O.el=l(O.children||""),K,U):O.el=C.el},b=(C,O,K,U)=>{[C.el,C.anchor]=p(C.children,O,K,U,C.el,C.anchor)},x=({el:C,anchor:O},K,U)=>{let re;for(;C&&C!==O;)re=h(C),i(C,K,U),C=re;i(O,K,U)},E=({el:C,anchor:O})=>{let K;for(;C&&C!==O;)K=h(C),s(C),C=K;s(O)},w=(C,O,K,U,re,j,se,Q,ge)=>{O.type==="svg"?se="svg":O.type==="math"&&(se="mathml"),C==null?S(O,K,U,re,j,se,Q,ge):k(C,O,re,j,se,Q,ge)},S=(C,O,K,U,re,j,se,Q)=>{let ge,_e;const{props:ye,shapeFlag:ke,transition:Me,dirs:Be}=C;if(ge=C.el=o(C.type,j,ye&&ye.is,ye),ke&8?u(ge,C.children):ke&16&&A(C.children,ge,null,U,re,wg(C,j),se,Q),Be&&Io(C,null,U,"created"),T(ge,C,C.scopeId,se,U),ye){for(const nt in ye)nt!=="value"&&!Oc(nt)&&r(ge,nt,null,ye[nt],j,U);"value"in ye&&r(ge,"value",null,ye.value,j),(_e=ye.onVnodeBeforeMount)&&vs(_e,U,C)}Be&&Io(C,null,U,"beforeMount");const ze=HD(re,Me);ze&&Me.beforeEnter(ge),i(ge,O,K),((_e=ye&&ye.onVnodeMounted)||ze||Be)&&hi(()=>{_e&&vs(_e,U,C),ze&&Me.enter(ge),Be&&Io(C,null,U,"mounted")},re)},T=(C,O,K,U,re)=>{if(K&&g(C,K),U)for(let j=0;j{for(let _e=ge;_e{const Q=O.el=C.el;let{patchFlag:ge,dynamicChildren:_e,dirs:ye}=O;ge|=C.patchFlag&16;const ke=C.props||kt,Me=O.props||kt;let Be;if(K&&Do(K,!1),(Be=Me.onVnodeBeforeUpdate)&&vs(Be,K,O,C),ye&&Io(O,C,K,"beforeUpdate"),K&&Do(K,!0),(ke.innerHTML&&Me.innerHTML==null||ke.textContent&&Me.textContent==null)&&u(Q,""),_e?P(C.dynamicChildren,_e,Q,K,U,wg(O,re),j):se||X(C,O,Q,null,K,U,wg(O,re),j,!1),ge>0){if(ge&16)B(Q,ke,Me,K,re);else if(ge&2&&ke.class!==Me.class&&r(Q,"class",null,Me.class,re),ge&4&&r(Q,"style",ke.style,Me.style,re),ge&8){const ze=O.dynamicProps;for(let nt=0;nt{Be&&vs(Be,K,O,C),ye&&Io(O,C,K,"updated")},U)},P=(C,O,K,U,re,j,se)=>{for(let Q=0;Q{if(O!==K){if(O!==kt)for(const j in O)!Oc(j)&&!(j in K)&&r(C,j,O[j],null,re,U);for(const j in K){if(Oc(j))continue;const se=K[j],Q=O[j];se!==Q&&j!=="value"&&r(C,j,Q,se,re,U)}"value"in K&&r(C,"value",O.value,K.value,re)}},Y=(C,O,K,U,re,j,se,Q,ge)=>{const _e=O.el=C?C.el:a(""),ye=O.anchor=C?C.anchor:a("");let{patchFlag:ke,dynamicChildren:Me,slotScopeIds:Be}=O;Be&&(Q=Q?Q.concat(Be):Be),C==null?(i(_e,K,U),i(ye,K,U),A(O.children||[],K,ye,re,j,se,Q,ge)):ke>0&&ke&64&&Me&&C.dynamicChildren?(P(C.dynamicChildren,Me,K,re,j,se,Q),(O.key!=null||re&&O===re.subTree)&&f_(C,O,!0)):X(C,O,K,ye,re,j,se,Q,ge)},ne=(C,O,K,U,re,j,se,Q,ge)=>{O.slotScopeIds=Q,C==null?O.shapeFlag&512?re.ctx.activate(O,K,U,se,ge):$(O,K,U,re,j,se,ge):F(C,O,ge)},$=(C,O,K,U,re,j,se)=>{const Q=C.component=dR(C,U,re);if(lf(C)&&(Q.ctx.renderer=ve),hR(Q,!1,se),Q.asyncDep){if(re&&re.registerDep(Q,D,se),!C.el){const ge=Q.subTree=N($n);v(null,ge,O,K)}}else D(Q,C,O,K,re,j,se)},F=(C,O,K)=>{const U=O.component=C.component;if(eR(C,O,K))if(U.asyncDep&&!U.asyncResolved){z(U,O,K);return}else U.next=O,U.update();else O.el=C.el,U.vnode=O},D=(C,O,K,U,re,j,se)=>{const Q=()=>{if(C.isMounted){let{next:ke,bu:Me,u:Be,parent:ze,vnode:nt}=C;{const Kt=PE(C);if(Kt){ke&&(ke.el=nt.el,z(C,ke,se)),Kt.asyncDep.then(()=>{C.isUnmounted||Q()});return}}let Qe=ke,qt;Do(C,!1),ke?(ke.el=nt.el,z(C,ke,se)):ke=nt,Me&&eh(Me),(qt=ke.props&&ke.props.onVnodeBeforeUpdate)&&vs(qt,ze,ke,nt),Do(C,!0);const Bt=xg(C),fn=C.subTree;C.subTree=Bt,m(fn,Bt,d(fn.el),L(fn),C,re,j),ke.el=Bt.el,Qe===null&&g_(C,Bt.el),Be&&hi(Be,re),(qt=ke.props&&ke.props.onVnodeUpdated)&&hi(()=>vs(qt,ze,ke,nt),re)}else{let ke;const{el:Me,props:Be}=O,{bm:ze,m:nt,parent:Qe,root:qt,type:Bt}=C,fn=al(O);if(Do(C,!1),ze&&eh(ze),!fn&&(ke=Be&&Be.onVnodeBeforeMount)&&vs(ke,Qe,O),Do(C,!0),Me&&fe){const Kt=()=>{C.subTree=xg(C),fe(Me,C.subTree,C,re,null)};fn&&Bt.__asyncHydrate?Bt.__asyncHydrate(Me,C,Kt):Kt()}else{qt.ce&&qt.ce._injectChildStyle(Bt);const Kt=C.subTree=xg(C);m(null,Kt,K,U,C,re,j),O.el=Kt.el}if(nt&&hi(nt,re),!fn&&(ke=Be&&Be.onVnodeMounted)){const Kt=O;hi(()=>vs(ke,Qe,Kt),re)}(O.shapeFlag&256||Qe&&al(Qe.vnode)&&Qe.vnode.shapeFlag&256)&&C.a&&hi(C.a,re),C.isMounted=!0,O=K=U=null}};C.scope.on();const ge=C.effect=new Ix(Q);C.scope.off();const _e=C.update=ge.run.bind(ge),ye=C.job=ge.runIfDirty.bind(ge);ye.i=C,ye.id=C.uid,ge.scheduler=()=>c_(ye),Do(C,!0),_e()},z=(C,O,K)=>{O.component=C;const U=C.vnode.props;C.vnode=O,C.next=null,ND(C,O.props,U,K),zD(C,O.children,K),po(),Xv(C),mo()},X=(C,O,K,U,re,j,se,Q,ge=!1)=>{const _e=C&&C.children,ye=C?C.shapeFlag:0,ke=O.children,{patchFlag:Me,shapeFlag:Be}=O;if(Me>0){if(Me&128){H(_e,ke,K,U,re,j,se,Q,ge);return}else if(Me&256){Z(_e,ke,K,U,re,j,se,Q,ge);return}}Be&8?(ye&16&&ue(_e,re,j),ke!==_e&&u(K,ke)):ye&16?Be&16?H(_e,ke,K,U,re,j,se,Q,ge):ue(_e,re,j,!0):(ye&8&&u(K,""),Be&16&&A(ke,K,U,re,j,se,Q,ge))},Z=(C,O,K,U,re,j,se,Q,ge)=>{C=C||sl,O=O||sl;const _e=C.length,ye=O.length,ke=Math.min(_e,ye);let Me;for(Me=0;Meye?ue(C,re,j,!0,!1,ke):A(O,K,U,re,j,se,Q,ge,ke)},H=(C,O,K,U,re,j,se,Q,ge)=>{let _e=0;const ye=O.length;let ke=C.length-1,Me=ye-1;for(;_e<=ke&&_e<=Me;){const Be=C[_e],ze=O[_e]=ge?Wr(O[_e]):ns(O[_e]);if(Es(Be,ze))m(Be,ze,K,null,re,j,se,Q,ge);else break;_e++}for(;_e<=ke&&_e<=Me;){const Be=C[ke],ze=O[Me]=ge?Wr(O[Me]):ns(O[Me]);if(Es(Be,ze))m(Be,ze,K,null,re,j,se,Q,ge);else break;ke--,Me--}if(_e>ke){if(_e<=Me){const Be=Me+1,ze=BeMe)for(;_e<=ke;)ie(C[_e],re,j,!0),_e++;else{const Be=_e,ze=_e,nt=new Map;for(_e=ze;_e<=Me;_e++){const Zt=O[_e]=ge?Wr(O[_e]):ns(O[_e]);Zt.key!=null&&nt.set(Zt.key,_e)}let Qe,qt=0;const Bt=Me-ze+1;let fn=!1,Kt=0;const Ei=new Array(Bt);for(_e=0;_e=Bt){ie(Zt,re,j,!0);continue}let oe;if(Zt.key!=null)oe=nt.get(Zt.key);else for(Qe=ze;Qe<=Me;Qe++)if(Ei[Qe-ze]===0&&Es(Zt,O[Qe])){oe=Qe;break}oe===void 0?ie(Zt,re,j,!0):(Ei[oe-ze]=_e+1,oe>=Kt?Kt=oe:fn=!0,m(Zt,O[oe],K,null,re,j,se,Q,ge),qt++)}const Xi=fn?jD(Ei):sl;for(Qe=Xi.length-1,_e=Bt-1;_e>=0;_e--){const Zt=ze+_e,oe=O[Zt],Te=Zt+1{const{el:j,type:se,transition:Q,children:ge,shapeFlag:_e}=C;if(_e&6){le(C.component.subTree,O,K,U);return}if(_e&128){C.suspense.move(O,K,U);return}if(_e&64){se.move(C,O,K,ve);return}if(se===Le){i(j,O,K);for(let ke=0;keQ.enter(j),re);else{const{leave:ke,delayLeave:Me,afterLeave:Be}=Q,ze=()=>i(j,O,K),nt=()=>{ke(j,()=>{ze(),Be&&Be()})};Me?Me(j,ze,nt):nt()}else i(j,O,K)},ie=(C,O,K,U=!1,re=!1)=>{const{type:j,props:se,ref:Q,children:ge,dynamicChildren:_e,shapeFlag:ye,patchFlag:ke,dirs:Me,cacheIndex:Be}=C;if(ke===-2&&(re=!1),Q!=null&&$p(Q,null,K,C,!0),Be!=null&&(O.renderCache[Be]=void 0),ye&256){O.ctx.deactivate(C);return}const ze=ye&1&&Me,nt=!al(C);let Qe;if(nt&&(Qe=se&&se.onVnodeBeforeUnmount)&&vs(Qe,O,C),ye&6)ee(C.component,K,U);else{if(ye&128){C.suspense.unmount(K,U);return}ze&&Io(C,null,O,"beforeUnmount"),ye&64?C.type.remove(C,O,K,ve,U):_e&&!_e.hasOnce&&(j!==Le||ke>0&&ke&64)?ue(_e,O,K,!1,!0):(j===Le&&ke&384||!re&&ye&16)&&ue(ge,O,K),U&&te(C)}(nt&&(Qe=se&&se.onVnodeUnmounted)||ze)&&hi(()=>{Qe&&vs(Qe,O,C),ze&&Io(C,null,O,"unmounted")},K)},te=C=>{const{type:O,el:K,anchor:U,transition:re}=C;if(O===Le){I(K,U);return}if(O===Eg){E(C);return}const j=()=>{s(K),re&&!re.persisted&&re.afterLeave&&re.afterLeave()};if(C.shapeFlag&1&&re&&!re.persisted){const{leave:se,delayLeave:Q}=re,ge=()=>se(K,j);Q?Q(C.el,j,ge):ge()}else j()},I=(C,O)=>{let K;for(;C!==O;)K=h(C),s(C),C=K;s(O)},ee=(C,O,K)=>{const{bum:U,scope:re,job:j,subTree:se,um:Q,m:ge,a:_e}=C;r0(ge),r0(_e),U&&eh(U),re.stop(),j&&(j.flags|=8,ie(se,C,O,K)),Q&&hi(Q,O),hi(()=>{C.isUnmounted=!0},O),O&&O.pendingBranch&&!O.isUnmounted&&C.asyncDep&&!C.asyncResolved&&C.suspenseId===O.pendingId&&(O.deps--,O.deps===0&&O.resolve())},ue=(C,O,K,U=!1,re=!1,j=0)=>{for(let se=j;se{if(C.shapeFlag&6)return L(C.component.subTree);if(C.shapeFlag&128)return C.suspense.next();const O=h(C.anchor||C.el),K=O&&O[tE];return K?h(K):O};let ae=!1;const de=(C,O,K)=>{C==null?O._vnode&&ie(O._vnode,null,null,!0):m(O._vnode||null,C,O,null,null,null,K),O._vnode=C,ae||(ae=!0,Xv(),Jx(),ae=!1)},ve={p:m,um:ie,m:le,r:te,mt:$,mc:A,pc:X,pbc:P,n:L,o:t};let W,fe;return{render:de,hydrate:W,createApp:LD(de,W)}}function wg({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 Do({effect:t,job:e},n){n?(t.flags|=32,e.flags|=4):(t.flags&=-33,e.flags&=-5)}function HD(t,e){return(!t||t&&!t.pendingBranch)&&e&&!e.persisted}function f_(t,e,n=!1){const i=t.children,s=e.children;if(Ye(i)&&Ye(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 PE(t){const e=t.subTree.component;if(e)return e.asyncDep&&!e.asyncResolved?e:PE(e)}function r0(t){if(t)for(let e=0;eus(KD);function un(t,e,n){return IE(t,e,n)}function IE(t,e,n=kt){const{immediate:i,deep:s,flush:r,once:o}=n,a=_n({},n);let l;if(ff)if(r==="sync"){const h=UD();l=h.__watcherHandles||(h.__watcherHandles=[])}else if(!e||i)a.once=!0;else{const h=()=>{};return h.stop=Ls,h.resume=Ls,h.pause=Ls,h}const c=Mn;a.call=(h,g,p)=>fs(h,c,g,p);let u=!1;r==="post"?a.scheduler=h=>{hi(h,c&&c.suspense)}:r!=="sync"&&(u=!0,a.scheduler=(h,g)=>{g?h():c_(h)}),a.augmentJob=h=>{e&&(h.flags|=4),u&&(h.flags|=2,c&&(h.id=c.uid,h.i=c))};const d=lD(t,e,a);return l&&l.push(d),d}function GD(t,e,n){const i=this.proxy,s=Ht(t)?t.includes(".")?DE(i,t):()=>i[t]:t.bind(i,i);let r;qe(e)?r=e:(r=e.handler,n=e);const o=Bu(this),a=IE(s,r.bind(i),n);return o(),a}function DE(t,e){const n=e.split(".");return()=>{let i=t;for(let s=0;se==="modelValue"||e==="model-value"?t.modelModifiers:t[`${e}Modifiers`]||t[`${ji(e)}Modifiers`]||t[`${go(e)}Modifiers`];function qD(t,e,...n){if(t.isUnmounted)return;const i=t.vnode.props||kt;let s=n;const r=e.startsWith("update:"),o=r&&XD(i,e.slice(7));o&&(o.trim&&(s=n.map(u=>Ht(u)?u.trim():u)),o.number&&(s=n.map(hh)));let a,l=i[a=gg(e)]||i[a=gg(ji(e))];!l&&r&&(l=i[a=gg(go(e))]),l&&fs(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,fs(c,t,6,s)}}function RE(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=RE(c,e,!0);u&&(a=!0,_n(o,u))};!n&&e.mixins.length&&e.mixins.forEach(l),t.extends&&l(t.extends),t.mixins&&t.mixins.forEach(l)}return!r&&!a?(Mt(t)&&i.set(t,null),null):(Ye(r)?r.forEach(l=>o[l]=null):_n(o,r),Mt(t)&&i.set(t,o),o)}function uf(t,e){return!t||!Qh(e)?!1:(e=e.slice(2).replace(/Once$/,""),bt(t,e[0].toLowerCase()+e.slice(1))||bt(t,go(e))||bt(t,e))}function xg(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:g,ctx:p,inheritAttrs:m}=t,y=mh(t);let v,b;try{if(n.shapeFlag&4){const E=s||i,w=E;v=ns(c.call(w,E,u,d,g,h,p)),b=a}else{const E=e;v=ns(E.length>1?E(d,{attrs:a,slots:o,emit:l}):E(d,null)),b=e.props?a:JD(a)}}catch(E){Vc.length=0,Fu(E,t,1),v=N($n)}let x=v;if(b&&m!==!1){const E=Object.keys(b),{shapeFlag:w}=x;E.length&&w&7&&(r&&E.some(qm)&&(b=QD(b,r)),x=ro(x,b,!1,!0))}return n.dirs&&(x=ro(x,null,!1,!0),x.dirs=x.dirs?x.dirs.concat(n.dirs):n.dirs),n.transition&&ca(x,n.transition),v=x,mh(y),v}function ZD(t,e=!0){let n;for(let i=0;i{let e;for(const n in t)(n==="class"||n==="style"||Qh(n))&&((e||(e={}))[n]=t[n]);return e},QD=(t,e)=>{const n={};for(const i in t)(!qm(i)||!(i.slice(9)in e))&&(n[i]=t[i]);return n};function eR(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?o0(i,o,c):!!o;if(l&8){const u=e.dynamicProps;for(let d=0;dt.__isSuspense;let zp=0;const tR={name:"Suspense",__isSuspense:!0,process(t,e,n,i,s,r,o,a,l,c){if(t==null)nR(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}iR(t,e,n,i,s,o,a,l,c)}},hydrate:sR,normalize:rR},p_=tR;function su(t,e){const n=t.props&&t.props[e];qe(n)&&n()}function nR(t,e,n,i,s,r,o,a,l){const{p:c,o:{createElement:u}}=l,d=u("div"),h=t.suspense=OE(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?(su(t,"onPending"),su(t,"onFallback"),c(null,t.ssFallback,e,n,i,null,r,o),ll(h,t.ssFallback)):h.resolve(!1,!0)}function iR(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,g=e.ssFallback,{activeBranch:p,pendingBranch:m,isInFallback:y,isHydrating:v}=d;if(m)d.pendingBranch=h,Es(h,m)?(l(m,h,d.hiddenContainer,null,s,d,r,o,a),d.deps<=0?d.resolve():y&&(v||(l(p,g,n,i,s,null,r,o,a),ll(d,g)))):(d.pendingId=zp++,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,g,n,i,s,null,r,o,a),ll(d,g))):p&&Es(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&&Es(h,p))l(p,h,n,i,s,d,r,o,a),ll(d,h);else if(su(e,"onPending"),d.pendingBranch=h,h.shapeFlag&512?d.pendingId=h.component.suspenseId:d.pendingId=zp++,l(null,h,d.hiddenContainer,null,s,d,r,o,a),d.deps<=0)d.resolve();else{const{timeout:b,pendingId:x}=d;b>0?setTimeout(()=>{d.pendingId===x&&d.fallback(g)},b):b===0&&d.fallback(g)}}function OE(t,e,n,i,s,r,o,a,l,c,u=!1){const{p:d,m:h,um:g,n:p,o:{parentNode:m,remove:y}}=c;let v;const b=aR(t);b&&e&&e.pendingBranch&&(v=e.pendingId,e.deps++);const x=t.props?Cx(t.props.timeout):void 0,E=r,w={vnode:t,parent:e,parentComponent:n,namespace:o,container:i,hiddenContainer:s,deps:0,pendingId:zp++,timeout:typeof x=="number"?x:-1,activeBranch:null,pendingBranch:null,isInFallback:!u,isHydrating:u,isUnmounted:!1,effects:[],resolve(S=!1,T=!1){const{vnode:A,activeBranch:k,pendingBranch:P,pendingId:B,effects:Y,parentComponent:ne,container:$}=w;let F=!1;w.isHydrating?w.isHydrating=!1:S||(F=k&&P.transition&&P.transition.mode==="out-in",F&&(k.transition.afterLeave=()=>{B===w.pendingId&&(h(P,$,r===E?p(k):r,0),Lp(Y))}),k&&(m(k.el)===$&&(r=p(k)),g(k,ne,w,!0)),F||h(P,$,r,0)),ll(w,P),w.pendingBranch=null,w.isInFallback=!1;let D=w.parent,z=!1;for(;D;){if(D.pendingBranch){D.effects.push(...Y),z=!0;break}D=D.parent}!z&&!F&&Lp(Y),w.effects=[],b&&e&&e.pendingBranch&&v===e.pendingId&&(e.deps--,e.deps===0&&!T&&e.resolve()),su(A,"onResolve")},fallback(S){if(!w.pendingBranch)return;const{vnode:T,activeBranch:A,parentComponent:k,container:P,namespace:B}=w;su(T,"onFallback");const Y=p(A),ne=()=>{w.isInFallback&&(d(null,S,P,Y,k,null,B,a,l),ll(w,S))},$=S.transition&&S.transition.mode==="out-in";$&&(A.transition.afterLeave=ne),w.isInFallback=!0,g(A,k,null,!0),$||ne()},move(S,T,A){w.activeBranch&&h(w.activeBranch,S,T,A),w.container=S},next(){return w.activeBranch&&p(w.activeBranch)},registerDep(S,T,A){const k=!!w.pendingBranch;k&&w.deps++;const P=S.vnode.el;S.asyncDep.catch(B=>{Fu(B,S,0)}).then(B=>{if(S.isUnmounted||w.isUnmounted||w.pendingId!==S.suspenseId)return;S.asyncResolved=!0;const{vnode:Y}=S;Yp(S,B,!1),P&&(Y.el=P);const ne=!P&&S.subTree.el;T(S,Y,m(P||S.subTree.el),P?null:p(S.subTree),w,o,A),ne&&y(ne),g_(S,Y.el),k&&--w.deps===0&&w.resolve()})},unmount(S,T){w.isUnmounted=!0,w.activeBranch&&g(w.activeBranch,n,S,T),w.pendingBranch&&g(w.pendingBranch,n,S,T)}};return w}function sR(t,e,n,i,s,r,o,a,l){const c=e.suspense=OE(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 rR(t){const{shapeFlag:e,children:n}=t,i=e&32;t.ssContent=a0(i?n.default:n),t.ssFallback=i?a0(n.fallback):N($n)}function a0(t){let e;if(qe(t)){const n=yl&&t._c;n&&(t._d=!1,R()),t=t(),n&&(t._d=!0,e=vi,$E())}return Ye(t)&&(t=ZD(t)),t=ns(t),e&&!t.dynamicChildren&&(t.dynamicChildren=e.filter(n=>n!==t)),t}function oR(t,e){e&&e.pendingBranch?Ye(t)?e.effects.push(...t):e.effects.push(t):Lp(t)}function ll(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,g_(i,s))}function aR(t){const e=t.props&&t.props.suspensible;return e!=null&&e!==!1}const Le=Symbol.for("v-fgt"),df=Symbol.for("v-txt"),$n=Symbol.for("v-cmt"),Eg=Symbol.for("v-stc"),Vc=[];let vi=null;function R(t=!1){Vc.push(vi=t?null:[])}function $E(){Vc.pop(),vi=Vc[Vc.length-1]||null}let yl=1;function l0(t){yl+=t,t<0&&vi&&(vi.hasOnce=!0)}function NE(t){return t.dynamicChildren=yl>0?vi||sl:null,$E(),yl>0&&vi&&vi.push(t),t}function V(t,e,n,i,s,r){return NE(f(t,e,n,i,s,r,!0))}function Se(t,e,n,i,s){return NE(N(t,e,n,i,s,!0))}function vl(t){return t?t.__v_isVNode===!0:!1}function Es(t,e){return t.type===e.type&&t.key===e.key}const FE=({key:t})=>t??null,ih=({ref:t,ref_key:e,ref_for:n})=>(typeof t=="number"&&(t=""+t),t!=null?Ht(t)||Wt(t)||qe(t)?{i:bn,r:t,k:e,f:!!n}:t:null);function f(t,e=null,n=null,i=0,s=null,r=t===Le?0:1,o=!1,a=!1){const l={__v_isVNode:!0,__v_skip:!0,type:t,props:e,key:e&&FE(e),ref:e&&ih(e),scopeId:eE,slotScopeIds:null,children:n,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetStart:null,targetAnchor:null,staticCount:0,shapeFlag:r,patchFlag:i,dynamicProps:s,dynamicChildren:null,appContext:null,ctx:bn};return a?(m_(l,n),r&128&&t.normalize(l)):n&&(l.shapeFlag|=Ht(n)?8:16),yl>0&&!o&&vi&&(l.patchFlag>0||r&6)&&l.patchFlag!==32&&vi.push(l),l}const N=lR;function lR(t,e=null,n=null,i=0,s=null,r=!1){if((!t||t===pE)&&(t=$n),vl(t)){const a=ro(t,e,!0);return n&&m_(a,n),yl>0&&!r&&vi&&(a.shapeFlag&6?vi[vi.indexOf(t)]=a:vi.push(a)),a.patchFlag=-2,a}if(mR(t)&&(t=t.__vccOpts),e){e=ni(e);let{class:a,style:l}=e;a&&!Ht(a)&&(e.class=Pe(a)),Mt(l)&&($u(l)&&!Ye(l)&&(l=_n({},l)),e.style=Pn(l))}const o=Ht(t)?1:LE(t)?128:nE(t)?64:Mt(t)?4:qe(t)?2:0;return f(t,e,n,i,s,o,r,!0)}function ni(t){return t?$u(t)||EE(t)?_n({},t):t:null}function ro(t,e,n=!1,i=!1){const{props:s,ref:r,patchFlag:o,children:a,transition:l}=t,c=e?wn(s||{},e):s,u={__v_isVNode:!0,__v_skip:!0,type:t.type,props:c,key:c&&FE(c),ref:e&&e.ref?n&&r?Ye(r)?r.concat(ih(e)):[r,ih(e)]:ih(e):r,scopeId:t.scopeId,slotScopeIds:t.slotScopeIds,children:a,target:t.target,targetStart:t.targetStart,targetAnchor:t.targetAnchor,staticCount:t.staticCount,shapeFlag:t.shapeFlag,patchFlag:e&&t.type!==Le?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&&ro(t.ssContent),ssFallback:t.ssFallback&&ro(t.ssFallback),el:t.el,anchor:t.anchor,ctx:t.ctx,ce:t.ce};return l&&i&&ca(u,l.clone(u)),u}function Ue(t=" ",e=0){return N(df,null,t,e)}function ce(t="",e=!1){return e?(R(),Se($n,null,t)):N($n,null,t)}function ns(t){return t==null||typeof t=="boolean"?N($n):Ye(t)?N(Le,null,t.slice()):vl(t)?Wr(t):N(df,null,String(t))}function Wr(t){return t.el===null&&t.patchFlag!==-1||t.memo?t:ro(t)}function m_(t,e){let n=0;const{shapeFlag:i}=t;if(e==null)e=null;else if(Ye(e))n=16;else if(typeof e=="object")if(i&65){const s=e.default;s&&(s._c&&(s._d=!1),m_(t,s()),s._c&&(s._d=!0));return}else{n=32;const s=e._;!s&&!EE(e)?e._ctx=bn:s===3&&bn&&(bn.slots._===1?e._=1:(e._=2,t.patchFlag|=1024))}else qe(e)?(e={default:e,_ctx:bn},n=32):(e=String(e),i&64?(n=16,e=[Ue(e)]):n=8);t.children=e,t.shapeFlag|=n}function wn(...t){const e={};for(let n=0;nMn||bn;let yh,Wp;{const t=Sx(),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)}};yh=e("__VUE_INSTANCE_SETTERS__",n=>Mn=n),Wp=e("__VUE_SSR_SETTERS__",n=>ff=n)}const Bu=t=>{const e=Mn;return yh(t),t.scope.on(),()=>{t.scope.off(),yh(e)}},c0=()=>{Mn&&Mn.scope.off(),yh(null)};function BE(t){return t.vnode.shapeFlag&4}let ff=!1;function hR(t,e=!1,n=!1){e&&Wp(e);const{props:i,children:s}=t.vnode,r=BE(t);$D(t,i,r,e),VD(t,s,n);const o=r?fR(t,e):void 0;return e&&Wp(!1),o}function fR(t,e){const n=t.type;t.accessCache=Object.create(null),t.proxy=new Proxy(t.ctx,TD);const{setup:i}=n;if(i){const s=t.setupContext=i.length>1?zE(t):null,r=Bu(t);po();const o=Nu(i,t,0,[t.props,s]);if(mo(),r(),bx(o)){if(al(t)||cE(t),o.then(c0,c0),e)return o.then(a=>{Yp(t,a,e)}).catch(a=>{Fu(a,t,0)});t.asyncDep=o}else Yp(t,o,e)}else VE(t,e)}function Yp(t,e,n){qe(e)?t.type.__ssrInlineRender?t.ssrRender=e:t.render=e:Mt(e)&&(t.setupState=Gx(e)),VE(t,n)}let u0;function VE(t,e,n){const i=t.type;if(!t.render){if(!e&&u0&&!i.render){const s=i.template||d_(t).template;if(s){const{isCustomElement:r,compilerOptions:o}=t.appContext.config,{delimiters:a,compilerOptions:l}=i,c=_n(_n({isCustomElement:r,delimiters:a},o),l);i.render=u0(s,c)}}t.render=i.render||Ls}{const s=Bu(t);po();try{kD(t)}finally{mo(),s()}}}const gR={get(t,e){return Gn(t,"get",""),t[e]}};function zE(t){const e=n=>{t.exposed=n||{}};return{attrs:new Proxy(t.attrs,gR),slots:t.slots,emit:t.emit,expose:e}}function gf(t){return t.exposed?t.exposeProxy||(t.exposeProxy=new Proxy(Gx(of(t.exposed)),{get(e,n){if(n in e)return e[n];if(n in Bc)return Bc[n](t)},has(e,n){return n in e||n in Bc}})):t.proxy}function pR(t,e=!0){return qe(t)?t.displayName||t.name:t.name||e&&t.__name}function mR(t){return qe(t)&&"__vccOpts"in t}const be=(t,e)=>oD(t,e,ff);function ua(t,e,n){const i=arguments.length;return i===2?Mt(e)&&!Ye(e)?vl(e)?N(t,null,[e]):N(t,e):N(t,null,e):(i>3?n=Array.prototype.slice.call(arguments,2):i===3&&vl(n)&&(n=[n]),N(t,e,n))}const WE="3.5.11";/** * @vue/runtime-dom v3.5.11 * (c) 2018-present Yuxi (Evan) You and Vue contributors * @license MIT -**/let Hp;const d0=typeof window<"u"&&window.trustedTypes;if(d0)try{Hp=d0.createPolicy("vue",{createHTML:t=>t})}catch{}const YE=Hp?t=>Hp.createHTML(t):t=>t,_R="http://www.w3.org/2000/svg",yR="http://www.w3.org/1998/Math/MathML",tr=typeof document<"u"?document:null,h0=tr&&tr.createElement("template"),vR={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"?tr.createElementNS(_R,t):e==="mathml"?tr.createElementNS(yR,t):n?tr.createElement(t,{is:n}):tr.createElement(t);return t==="select"&&i&&i.multiple!=null&&s.setAttribute("multiple",i.multiple),s},createText:t=>tr.createTextNode(t),createComment:t=>tr.createComment(t),setText:(t,e)=>{t.nodeValue=e},setElementText:(t,e)=>{t.textContent=e},parentNode:t=>t.parentNode,nextSibling:t=>t.nextSibling,querySelector:t=>tr.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{h0.innerHTML=YE(i==="svg"?`${t}`:i==="mathml"?`${t}`:t);const a=h0.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]}},Ar="transition",oc="animation",bl=Symbol("_vtc"),HE={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},jE=_n({},rE,HE),bR=t=>(t.displayName="Transition",t.props=jE,t),$t=bR((t,{slots:e})=>ua(mD,KE(t),e)),Ro=(t,e=[])=>{Ye(t)?t.forEach(n=>n(...e)):t&&t(...e)},f0=t=>t?Ye(t)?t.some(e=>e.length>1):t.length>1:!1;function KE(t){const e={};for(const Y in t)Y in HE||(e[Y]=t[Y]);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=wR(s),m=p&&p[0],y=p&&p[1],{onBeforeEnter:v,onEnter:b,onEnterCancelled:x,onLeave:E,onLeaveCancelled:w,onBeforeAppear:S=v,onAppear:T=b,onAppearCancelled:A=x}=e,k=(Y,ne,$)=>{$r(Y,ne?u:a),$r(Y,ne?c:o),$&&$()},P=(Y,ne)=>{Y._isLeaving=!1,$r(Y,d),$r(Y,f),$r(Y,h),ne&&ne()},B=Y=>(ne,$)=>{const F=Y?T:b,D=()=>k(ne,Y,$);Ro(F,[ne,D]),g0(()=>{$r(ne,Y?l:r),qs(ne,Y?u:a),f0(F)||p0(ne,i,m,D)})};return _n(e,{onBeforeEnter(Y){Ro(v,[Y]),qs(Y,r),qs(Y,o)},onBeforeAppear(Y){Ro(S,[Y]),qs(Y,l),qs(Y,c)},onEnter:B(!1),onAppear:B(!0),onLeave(Y,ne){Y._isLeaving=!0;const $=()=>P(Y,ne);qs(Y,d),qs(Y,h),GE(),g0(()=>{Y._isLeaving&&($r(Y,d),qs(Y,f),f0(E)||p0(Y,i,y,$))}),Ro(E,[Y,$])},onEnterCancelled(Y){k(Y,!1),Ro(x,[Y])},onAppearCancelled(Y){k(Y,!0),Ro(A,[Y])},onLeaveCancelled(Y){P(Y),Ro(w,[Y])}})}function wR(t){if(t==null)return null;if(Mt(t))return[Cg(t.enter),Cg(t.leave)];{const e=Cg(t);return[e,e]}}function Cg(t){return Cx(t)}function qs(t,e){e.split(/\s+/).forEach(n=>n&&t.classList.add(n)),(t[bl]||(t[bl]=new Set)).add(e)}function $r(t,e){e.split(/\s+/).forEach(i=>i&&t.classList.remove(i));const n=t[bl];n&&(n.delete(e),n.size||(t[bl]=void 0))}function g0(t){requestAnimationFrame(()=>{requestAnimationFrame(t)})}let xR=0;function p0(t,e,n,i){const s=t._endId=++xR,r=()=>{s===t._endId&&i()};if(n!=null)return setTimeout(r,n);const{type:o,timeout:a,propCount:l}=UE(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(`${Ar}Delay`),r=i(`${Ar}Duration`),o=m0(s,r),a=i(`${oc}Delay`),l=i(`${oc}Duration`),c=m0(a,l);let u=null,d=0,h=0;e===Ar?o>0&&(u=Ar,d=o,h=r.length):e===oc?c>0&&(u=oc,d=c,h=l.length):(d=Math.max(o,c),u=d>0?o>c?Ar:oc:null,h=u?u===Ar?r.length:l.length:0);const f=u===Ar&&/\b(transform|all)(,|$)/.test(i(`${Ar}Property`).toString());return{type:u,timeout:d,propCount:h,hasTransform:f}}function m0(t,e){for(;t.length_0(n)+_0(t[i])))}function _0(t){return t==="auto"?0:Number(t.slice(0,-1).replace(",","."))*1e3}function GE(){return document.body.offsetHeight}function ER(t,e,n){const i=t[bl];i&&(e=(e?[e,...i]:[...i]).join(" ")),e==null?t.removeAttribute("class"):n?t.setAttribute("class",e):t.className=e}const vh=Symbol("_vod"),XE=Symbol("_vsh"),sh={beforeMount(t,{value:e},{transition:n}){t[vh]=t.style.display==="none"?"":t.style.display,n&&e?n.beforeEnter(t):ac(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),ac(t,!0),i.enter(t)):i.leave(t,()=>{ac(t,!1)}):ac(t,e))},beforeUnmount(t,{value:e}){ac(t,e)}};function ac(t,e){t.style.display=e?t[vh]:"none",t[XE]=!e}const CR=Symbol(""),SR=/(^|;)\s*display\s*:/;function TR(t,e,n){const i=t.style,s=Ht(n);let r=!1;if(n&&!s){if(e)if(Ht(e))for(const o of e.split(";")){const a=o.slice(0,o.indexOf(":")).trim();n[a]==null&&rh(i,a,"")}else for(const o in e)n[o]==null&&rh(i,o,"");for(const o in n)o==="display"&&(r=!0),rh(i,o,n[o])}else if(s){if(e!==n){const o=i[CR];o&&(n+=";"+o),i.cssText=n,r=SR.test(n)}}else e&&t.removeAttribute("style");vh in t&&(t[vh]=r?i.display:"",t[XE]&&(i.display="none"))}const y0=/\s*!important$/;function rh(t,e,n){if(Ye(n))n.forEach(i=>rh(t,e,i));else if(n==null&&(n=""),e.startsWith("--"))t.setProperty(e,n);else{const i=AR(t,e);y0.test(n)?t.setProperty(go(i),n.replace(y0,""),"important"):t[i]=n}}const v0=["Webkit","Moz","ms"],Sg={};function AR(t,e){const n=Sg[e];if(n)return n;let i=ji(e);if(i!=="filter"&&i in t)return Sg[e]=i;i=tf(i);for(let s=0;sTg||(IR.then(()=>Tg=0),Tg=Date.now());function RR(t,e){const n=i=>{if(!i._vts)i._vts=Date.now();else if(i._vts<=n.attached)return;fs(LR(i,n.value),e,5,[i])};return n.value=t,n.attached=DR(),n}function LR(t,e){if(Ye(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 S0=t=>t.charCodeAt(0)===111&&t.charCodeAt(1)===110&&t.charCodeAt(2)>96&&t.charCodeAt(2)<123,OR=(t,e,n,i,s,r)=>{const o=s==="svg";e==="class"?ER(t,i,o):e==="style"?TR(t,n,i):Qh(e)?qm(e)||MR(t,e,n,i,r):(e[0]==="."?(e=e.slice(1),!0):e[0]==="^"?(e=e.slice(1),!1):$R(t,e,i,o))?(x0(t,e,i),!t.tagName.includes("-")&&(e==="value"||e==="checked"||e==="selected")&&w0(t,e,i,o,r,e!=="value")):t._isVueCE&&(/[A-Z]/.test(e)||!Ht(i))?x0(t,ji(e),i):(e==="true-value"?t._trueValue=i:e==="false-value"&&(t._falseValue=i),w0(t,e,i,o))};function $R(t,e,n,i){if(i)return!!(e==="innerHTML"||e==="textContent"||e in t&&S0(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 S0(e)&&Ht(n)?!1:e in t}const qE=new WeakMap,ZE=new WeakMap,bh=Symbol("_moveCb"),T0=Symbol("_enterCb"),NR=t=>(delete t.props.mode,t),FR=NR({name:"TransitionGroup",props:_n({},jE,{tag:String,moveClass:String}),setup(t,{slots:e}){const n=hf(),i=sE();let s,r;return hE(()=>{if(!s.length)return;const o=t.moveClass||`${t.name||"v"}-move`;if(!WR(s[0].el,n.vnode.el,o))return;s.forEach(BR),s.forEach(VR);const a=s.filter(zR);GE(),a.forEach(l=>{const c=l.el,u=c.style;qs(c,o),u.transform=u.webkitTransform=u.transitionDuration="";const d=c[bh]=h=>{h&&h.target!==c||(!h||/transform$/.test(h.propertyName))&&(c.removeEventListener("transitionend",d),c[bh]=null,$r(c,o))};c.addEventListener("transitionend",d)})}),()=>{const o=lt(t),a=KE(o);let l=o.tag||Oe;if(s=[],r)for(let c=0;c{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}=UE(i);return r.removeChild(i),o}const oo=t=>{const e=t.props["onUpdate:modelValue"]||!1;return Ye(e)?n=>eh(e,n):e};function YR(t){t.target.composing=!0}function A0(t){const e=t.target;e.composing&&(e.composing=!1,e.dispatchEvent(new Event("input")))}const Hi=Symbol("_assign"),We={created(t,{modifiers:{lazy:e,trim:n,number:i}},s){t[Hi]=oo(s);const r=i||s.props&&s.props.type==="number";or(t,e?"change":"input",o=>{if(o.target.composing)return;let a=t.value;n&&(a=a.trim()),r&&(a=hh(a)),t[Hi](a)}),n&&or(t,"change",()=>{t.value=t.value.trim()}),e||(or(t,"compositionstart",YR),or(t,"compositionend",A0),or(t,"change",A0))},mounted(t,{value:e}){t.value=e??""},beforeUpdate(t,{value:e,oldValue:n,modifiers:{lazy:i,trim:s,number:r}},o){if(t[Hi]=oo(o),t.composing)return;const a=(r||t.type==="number")&&!/^0\d/.test(t.value)?hh(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))}},Kn={deep:!0,created(t,e,n){t[Hi]=oo(n),or(t,"change",()=>{const i=t._modelValue,s=wl(t),r=t.checked,o=t[Hi];if(Ye(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(Kl(i)){const a=new Set(i);r?a.add(s):a.delete(s),o(a)}else o(JE(t,r))})},mounted:k0,beforeUpdate(t,e,n){t[Hi]=oo(n),k0(t,e,n)}};function k0(t,{value:e},n){t._modelValue=e;let i;Ye(e)?i=Qm(e,n.props.value)>-1:Kl(e)?i=e.has(n.props.value):i=aa(e,JE(t,!0)),t.checked!==i&&(t.checked=i)}const HR={created(t,{value:e},n){t.checked=aa(e,n.props.value),t[Hi]=oo(n),or(t,"change",()=>{t[Hi](wl(t))})},beforeUpdate(t,{value:e,oldValue:n},i){t[Hi]=oo(i),e!==n&&(t.checked=aa(e,i.props.value))}},oh={deep:!0,created(t,{value:e,modifiers:{number:n}},i){const s=Kl(e);or(t,"change",()=>{const r=Array.prototype.filter.call(t.options,o=>o.selected).map(o=>n?hh(wl(o)):wl(o));t[Hi](t.multiple?s?new Set(r):r:r[0]),t._assigning=!0,Rn(()=>{t._assigning=!1})}),t[Hi]=oo(i)},mounted(t,{value:e}){M0(t,e)},beforeUpdate(t,e,n){t[Hi]=oo(n)},updated(t,{value:e}){t._assigning||M0(t,e)}};function M0(t,e){const n=t.multiple,i=Ye(e);if(!(n&&!i&&!Kl(e))){for(let s=0,r=t.options.length;sString(c)===String(a)):o.selected=Qm(e,a)>-1}else o.selected=e.has(a);else if(aa(wl(o),e)){t.selectedIndex!==s&&(t.selectedIndex=s);return}}!n&&t.selectedIndex!==-1&&(t.selectedIndex=-1)}}function wl(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){xd(t,e,n,null,"created")},mounted(t,e,n){xd(t,e,n,null,"mounted")},beforeUpdate(t,e,n,i){xd(t,e,n,i,"beforeUpdate")},updated(t,e,n,i){xd(t,e,n,i,"updated")}};function jR(t,e){switch(t){case"SELECT":return oh;case"TEXTAREA":return We;default:switch(e){case"checkbox":return Kn;case"radio":return HR;default:return We}}}function xd(t,e,n,i,s){const o=jR(t.tagName,n.props&&n.props.type)[s];o&&o(t,e,n,i)}const KR=["ctrl","shift","alt","meta"],UR={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)=>KR.some(n=>t[`${n}Key`]&&!e.includes(n))},ru=(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=go(s.key);if(e.some(o=>o===r||GR[o]===r))return t(s)})},XR=_n({patchProp:OR},vR);let P0;function tC(){return P0||(P0=WD(XR))}const I0=(...t)=>{tC().render(...t)},qR=(...t)=>{const e=tC().createApp(...t),{mount:n}=e;return e.mount=i=>{const s=JR(i);if(!s)return;const r=e._component;!qe(r)&&!r.render&&!r.template&&(r.template=s.innerHTML),s.nodeType===1&&(s.textContent="");const o=n(s,!1,ZR(s));return s instanceof Element&&(s.removeAttribute("v-cloak"),s.setAttribute("data-v-app","")),o},e};function ZR(t){if(t instanceof SVGElement)return"svg";if(typeof MathMLElement=="function"&&t instanceof MathMLElement)return"mathml"}function JR(t){return Ht(t)?document.querySelector(t):t}var QR=!1;/*! +**/let Hp;const d0=typeof window<"u"&&window.trustedTypes;if(d0)try{Hp=d0.createPolicy("vue",{createHTML:t=>t})}catch{}const YE=Hp?t=>Hp.createHTML(t):t=>t,_R="http://www.w3.org/2000/svg",yR="http://www.w3.org/1998/Math/MathML",tr=typeof document<"u"?document:null,h0=tr&&tr.createElement("template"),vR={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"?tr.createElementNS(_R,t):e==="mathml"?tr.createElementNS(yR,t):n?tr.createElement(t,{is:n}):tr.createElement(t);return t==="select"&&i&&i.multiple!=null&&s.setAttribute("multiple",i.multiple),s},createText:t=>tr.createTextNode(t),createComment:t=>tr.createComment(t),setText:(t,e)=>{t.nodeValue=e},setElementText:(t,e)=>{t.textContent=e},parentNode:t=>t.parentNode,nextSibling:t=>t.nextSibling,querySelector:t=>tr.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{h0.innerHTML=YE(i==="svg"?`${t}`:i==="mathml"?`${t}`:t);const a=h0.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]}},Ar="transition",oc="animation",bl=Symbol("_vtc"),HE={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},jE=_n({},rE,HE),bR=t=>(t.displayName="Transition",t.props=jE,t),$t=bR((t,{slots:e})=>ua(mD,KE(t),e)),Ro=(t,e=[])=>{Ye(t)?t.forEach(n=>n(...e)):t&&t(...e)},f0=t=>t?Ye(t)?t.some(e=>e.length>1):t.length>1:!1;function KE(t){const e={};for(const Y in t)Y in HE||(e[Y]=t[Y]);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:g=`${n}-leave-to`}=t,p=wR(s),m=p&&p[0],y=p&&p[1],{onBeforeEnter:v,onEnter:b,onEnterCancelled:x,onLeave:E,onLeaveCancelled:w,onBeforeAppear:S=v,onAppear:T=b,onAppearCancelled:A=x}=e,k=(Y,ne,$)=>{$r(Y,ne?u:a),$r(Y,ne?c:o),$&&$()},P=(Y,ne)=>{Y._isLeaving=!1,$r(Y,d),$r(Y,g),$r(Y,h),ne&&ne()},B=Y=>(ne,$)=>{const F=Y?T:b,D=()=>k(ne,Y,$);Ro(F,[ne,D]),g0(()=>{$r(ne,Y?l:r),qs(ne,Y?u:a),f0(F)||p0(ne,i,m,D)})};return _n(e,{onBeforeEnter(Y){Ro(v,[Y]),qs(Y,r),qs(Y,o)},onBeforeAppear(Y){Ro(S,[Y]),qs(Y,l),qs(Y,c)},onEnter:B(!1),onAppear:B(!0),onLeave(Y,ne){Y._isLeaving=!0;const $=()=>P(Y,ne);qs(Y,d),qs(Y,h),GE(),g0(()=>{Y._isLeaving&&($r(Y,d),qs(Y,g),f0(E)||p0(Y,i,y,$))}),Ro(E,[Y,$])},onEnterCancelled(Y){k(Y,!1),Ro(x,[Y])},onAppearCancelled(Y){k(Y,!0),Ro(A,[Y])},onLeaveCancelled(Y){P(Y),Ro(w,[Y])}})}function wR(t){if(t==null)return null;if(Mt(t))return[Cg(t.enter),Cg(t.leave)];{const e=Cg(t);return[e,e]}}function Cg(t){return Cx(t)}function qs(t,e){e.split(/\s+/).forEach(n=>n&&t.classList.add(n)),(t[bl]||(t[bl]=new Set)).add(e)}function $r(t,e){e.split(/\s+/).forEach(i=>i&&t.classList.remove(i));const n=t[bl];n&&(n.delete(e),n.size||(t[bl]=void 0))}function g0(t){requestAnimationFrame(()=>{requestAnimationFrame(t)})}let xR=0;function p0(t,e,n,i){const s=t._endId=++xR,r=()=>{s===t._endId&&i()};if(n!=null)return setTimeout(r,n);const{type:o,timeout:a,propCount:l}=UE(t,e);if(!o)return i();const c=o+"end";let u=0;const d=()=>{t.removeEventListener(c,h),r()},h=g=>{g.target===t&&++u>=l&&d()};setTimeout(()=>{u(n[p]||"").split(", "),s=i(`${Ar}Delay`),r=i(`${Ar}Duration`),o=m0(s,r),a=i(`${oc}Delay`),l=i(`${oc}Duration`),c=m0(a,l);let u=null,d=0,h=0;e===Ar?o>0&&(u=Ar,d=o,h=r.length):e===oc?c>0&&(u=oc,d=c,h=l.length):(d=Math.max(o,c),u=d>0?o>c?Ar:oc:null,h=u?u===Ar?r.length:l.length:0);const g=u===Ar&&/\b(transform|all)(,|$)/.test(i(`${Ar}Property`).toString());return{type:u,timeout:d,propCount:h,hasTransform:g}}function m0(t,e){for(;t.length_0(n)+_0(t[i])))}function _0(t){return t==="auto"?0:Number(t.slice(0,-1).replace(",","."))*1e3}function GE(){return document.body.offsetHeight}function ER(t,e,n){const i=t[bl];i&&(e=(e?[e,...i]:[...i]).join(" ")),e==null?t.removeAttribute("class"):n?t.setAttribute("class",e):t.className=e}const vh=Symbol("_vod"),XE=Symbol("_vsh"),sh={beforeMount(t,{value:e},{transition:n}){t[vh]=t.style.display==="none"?"":t.style.display,n&&e?n.beforeEnter(t):ac(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),ac(t,!0),i.enter(t)):i.leave(t,()=>{ac(t,!1)}):ac(t,e))},beforeUnmount(t,{value:e}){ac(t,e)}};function ac(t,e){t.style.display=e?t[vh]:"none",t[XE]=!e}const CR=Symbol(""),SR=/(^|;)\s*display\s*:/;function TR(t,e,n){const i=t.style,s=Ht(n);let r=!1;if(n&&!s){if(e)if(Ht(e))for(const o of e.split(";")){const a=o.slice(0,o.indexOf(":")).trim();n[a]==null&&rh(i,a,"")}else for(const o in e)n[o]==null&&rh(i,o,"");for(const o in n)o==="display"&&(r=!0),rh(i,o,n[o])}else if(s){if(e!==n){const o=i[CR];o&&(n+=";"+o),i.cssText=n,r=SR.test(n)}}else e&&t.removeAttribute("style");vh in t&&(t[vh]=r?i.display:"",t[XE]&&(i.display="none"))}const y0=/\s*!important$/;function rh(t,e,n){if(Ye(n))n.forEach(i=>rh(t,e,i));else if(n==null&&(n=""),e.startsWith("--"))t.setProperty(e,n);else{const i=AR(t,e);y0.test(n)?t.setProperty(go(i),n.replace(y0,""),"important"):t[i]=n}}const v0=["Webkit","Moz","ms"],Sg={};function AR(t,e){const n=Sg[e];if(n)return n;let i=ji(e);if(i!=="filter"&&i in t)return Sg[e]=i;i=tf(i);for(let s=0;sTg||(IR.then(()=>Tg=0),Tg=Date.now());function RR(t,e){const n=i=>{if(!i._vts)i._vts=Date.now();else if(i._vts<=n.attached)return;fs(LR(i,n.value),e,5,[i])};return n.value=t,n.attached=DR(),n}function LR(t,e){if(Ye(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 S0=t=>t.charCodeAt(0)===111&&t.charCodeAt(1)===110&&t.charCodeAt(2)>96&&t.charCodeAt(2)<123,OR=(t,e,n,i,s,r)=>{const o=s==="svg";e==="class"?ER(t,i,o):e==="style"?TR(t,n,i):Qh(e)?qm(e)||MR(t,e,n,i,r):(e[0]==="."?(e=e.slice(1),!0):e[0]==="^"?(e=e.slice(1),!1):$R(t,e,i,o))?(x0(t,e,i),!t.tagName.includes("-")&&(e==="value"||e==="checked"||e==="selected")&&w0(t,e,i,o,r,e!=="value")):t._isVueCE&&(/[A-Z]/.test(e)||!Ht(i))?x0(t,ji(e),i):(e==="true-value"?t._trueValue=i:e==="false-value"&&(t._falseValue=i),w0(t,e,i,o))};function $R(t,e,n,i){if(i)return!!(e==="innerHTML"||e==="textContent"||e in t&&S0(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 S0(e)&&Ht(n)?!1:e in t}const qE=new WeakMap,ZE=new WeakMap,bh=Symbol("_moveCb"),T0=Symbol("_enterCb"),NR=t=>(delete t.props.mode,t),FR=NR({name:"TransitionGroup",props:_n({},jE,{tag:String,moveClass:String}),setup(t,{slots:e}){const n=hf(),i=sE();let s,r;return hE(()=>{if(!s.length)return;const o=t.moveClass||`${t.name||"v"}-move`;if(!WR(s[0].el,n.vnode.el,o))return;s.forEach(BR),s.forEach(VR);const a=s.filter(zR);GE(),a.forEach(l=>{const c=l.el,u=c.style;qs(c,o),u.transform=u.webkitTransform=u.transitionDuration="";const d=c[bh]=h=>{h&&h.target!==c||(!h||/transform$/.test(h.propertyName))&&(c.removeEventListener("transitionend",d),c[bh]=null,$r(c,o))};c.addEventListener("transitionend",d)})}),()=>{const o=lt(t),a=KE(o);let l=o.tag||Le;if(s=[],r)for(let c=0;c{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}=UE(i);return r.removeChild(i),o}const oo=t=>{const e=t.props["onUpdate:modelValue"]||!1;return Ye(e)?n=>eh(e,n):e};function YR(t){t.target.composing=!0}function A0(t){const e=t.target;e.composing&&(e.composing=!1,e.dispatchEvent(new Event("input")))}const Hi=Symbol("_assign"),We={created(t,{modifiers:{lazy:e,trim:n,number:i}},s){t[Hi]=oo(s);const r=i||s.props&&s.props.type==="number";or(t,e?"change":"input",o=>{if(o.target.composing)return;let a=t.value;n&&(a=a.trim()),r&&(a=hh(a)),t[Hi](a)}),n&&or(t,"change",()=>{t.value=t.value.trim()}),e||(or(t,"compositionstart",YR),or(t,"compositionend",A0),or(t,"change",A0))},mounted(t,{value:e}){t.value=e??""},beforeUpdate(t,{value:e,oldValue:n,modifiers:{lazy:i,trim:s,number:r}},o){if(t[Hi]=oo(o),t.composing)return;const a=(r||t.type==="number")&&!/^0\d/.test(t.value)?hh(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))}},Kn={deep:!0,created(t,e,n){t[Hi]=oo(n),or(t,"change",()=>{const i=t._modelValue,s=wl(t),r=t.checked,o=t[Hi];if(Ye(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(Kl(i)){const a=new Set(i);r?a.add(s):a.delete(s),o(a)}else o(JE(t,r))})},mounted:k0,beforeUpdate(t,e,n){t[Hi]=oo(n),k0(t,e,n)}};function k0(t,{value:e},n){t._modelValue=e;let i;Ye(e)?i=Qm(e,n.props.value)>-1:Kl(e)?i=e.has(n.props.value):i=aa(e,JE(t,!0)),t.checked!==i&&(t.checked=i)}const HR={created(t,{value:e},n){t.checked=aa(e,n.props.value),t[Hi]=oo(n),or(t,"change",()=>{t[Hi](wl(t))})},beforeUpdate(t,{value:e,oldValue:n},i){t[Hi]=oo(i),e!==n&&(t.checked=aa(e,i.props.value))}},oh={deep:!0,created(t,{value:e,modifiers:{number:n}},i){const s=Kl(e);or(t,"change",()=>{const r=Array.prototype.filter.call(t.options,o=>o.selected).map(o=>n?hh(wl(o)):wl(o));t[Hi](t.multiple?s?new Set(r):r:r[0]),t._assigning=!0,Rn(()=>{t._assigning=!1})}),t[Hi]=oo(i)},mounted(t,{value:e}){M0(t,e)},beforeUpdate(t,e,n){t[Hi]=oo(n)},updated(t,{value:e}){t._assigning||M0(t,e)}};function M0(t,e){const n=t.multiple,i=Ye(e);if(!(n&&!i&&!Kl(e))){for(let s=0,r=t.options.length;sString(c)===String(a)):o.selected=Qm(e,a)>-1}else o.selected=e.has(a);else if(aa(wl(o),e)){t.selectedIndex!==s&&(t.selectedIndex=s);return}}!n&&t.selectedIndex!==-1&&(t.selectedIndex=-1)}}function wl(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){xd(t,e,n,null,"created")},mounted(t,e,n){xd(t,e,n,null,"mounted")},beforeUpdate(t,e,n,i){xd(t,e,n,i,"beforeUpdate")},updated(t,e,n,i){xd(t,e,n,i,"updated")}};function jR(t,e){switch(t){case"SELECT":return oh;case"TEXTAREA":return We;default:switch(e){case"checkbox":return Kn;case"radio":return HR;default:return We}}}function xd(t,e,n,i,s){const o=jR(t.tagName,n.props&&n.props.type)[s];o&&o(t,e,n,i)}const KR=["ctrl","shift","alt","meta"],UR={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)=>KR.some(n=>t[`${n}Key`]&&!e.includes(n))},ru=(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=go(s.key);if(e.some(o=>o===r||GR[o]===r))return t(s)})},XR=_n({patchProp:OR},vR);let P0;function tC(){return P0||(P0=WD(XR))}const I0=(...t)=>{tC().render(...t)},qR=(...t)=>{const e=tC().createApp(...t),{mount:n}=e;return e.mount=i=>{const s=JR(i);if(!s)return;const r=e._component;!qe(r)&&!r.render&&!r.template&&(r.template=s.innerHTML),s.nodeType===1&&(s.textContent="");const o=n(s,!1,ZR(s));return s instanceof Element&&(s.removeAttribute("v-cloak"),s.setAttribute("data-v-app","")),o},e};function ZR(t){if(t instanceof SVGElement)return"svg";if(typeof MathMLElement=="function"&&t instanceof MathMLElement)return"mathml"}function JR(t){return Ht(t)?document.querySelector(t):t}var QR=!1;/*! * pinia v2.2.4 * (c) 2024 Eduardo San Martin Morote * @license MIT - */let nC;const pf=t=>nC=t,iC=Symbol();function jp(t){return t&&typeof t=="object"&&Object.prototype.toString.call(t)==="[object Object]"&&typeof t.toJSON!="function"}var zc;(function(t){t.direct="direct",t.patchObject="patch object",t.patchFunction="patch function"})(zc||(zc={}));function eL(){const t=Px(!0),e=t.run(()=>xe({}));let n=[],i=[];const s=of({install(r){pf(s),s._a=r,r.provide(iC,s),r.config.globalProperties.$pinia=s,i.forEach(o=>n.push(o)),i=[]},use(r){return!this._a&&!QR?i.push(r):n.push(r),this},_p:n,_a:null,_e:t,_s:new Map,state:e});return s}const sC=()=>{};function D0(t,e,n,i=sC){t.push(e);const s=()=>{const r=t.indexOf(e);r>-1&&(t.splice(r,1),i())};return!n&&nf()&&e_(s),s}function Da(t,...e){t.slice().forEach(n=>{n(...e)})}const tL=t=>t(),R0=Symbol(),Ag=Symbol();function Kp(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];jp(s)&&jp(i)&&t.hasOwnProperty(n)&&!Wt(i)&&!Qr(i)?t[n]=Kp(s,i):t[n]=i}return t}const nL=Symbol();function iL(t){return!jp(t)||!t.hasOwnProperty(nL)}const{assign:Nr}=Object;function sL(t){return!!(Wt(t)&&t.effect)}function rL(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=nD(n.state.value[t]);return Nr(u,r,Object.keys(o||{}).reduce((d,h)=>(d[h]=of(be(()=>{pf(n);const f=n._s.get(t);return o[h].call(f,f)})),d),{}))}return l=rC(t,c,e,n,i,!0),l}function rC(t,e,n={},i,s,r){let o;const a=Nr({actions:{}},n),l={deep:!0};let c,u,d=[],h=[],f;const p=i.state.value[t];!r&&!p&&(i.state.value[t]={}),xe({});let m;function y(A){let k;c=u=!1,typeof A=="function"?(A(i.state.value[t]),k={type:zc.patchFunction,storeId:t,events:f}):(Kp(i.state.value[t],A),k={type:zc.patchObject,payload:A,storeId:t,events:f});const P=m=Symbol();Rn().then(()=>{m===P&&(c=!0)}),u=!0,Da(d,k,i.state.value[t])}const v=r?function(){const{state:k}=n,P=k?k():{};this.$patch(B=>{Nr(B,P)})}:sC;function b(){o.stop(),d=[],h=[],i._s.delete(t)}const x=(A,k="")=>{if(R0 in A)return A[Ag]=k,A;const P=function(){pf(i);const B=Array.from(arguments),Y=[],ne=[];function $(z){Y.push(z)}function F(z){ne.push(z)}Da(h,{args:B,name:P[Ag],store:w,after:$,onError:F});let D;try{D=A.apply(this&&this.$id===t?this:w,B)}catch(z){throw Da(ne,z),z}return D instanceof Promise?D.then(z=>(Da(Y,z),z)).catch(z=>(Da(ne,z),Promise.reject(z))):(Da(Y,D),D)};return P[R0]=!0,P[Ag]=k,P},E={_p:i,$id:t,$onAction:D0.bind(null,h),$patch:y,$reset:v,$subscribe(A,k={}){const P=D0(d,A,k.detached,()=>B()),B=o.run(()=>un(()=>i.state.value[t],Y=>{(k.flush==="sync"?u:c)&&A({storeId:t,type:zc.direct,events:f},Y)},Nr({},l,k)));return P},$dispose:b},w=Ki(E);i._s.set(t,w);const T=(i._a&&i._a.runWithContext||tL)(()=>i._e.run(()=>(o=Px()).run(()=>e({action:x}))));for(const A in T){const k=T[A];if(Wt(k)&&!sL(k)||Qr(k))r||(p&&iL(k)&&(Wt(k)?k.value=p[A]:Kp(k,p[A])),i.state.value[t][A]=k);else if(typeof k=="function"){const P=x(k,A);T[A]=P,a.actions[A]=k}}return Nr(w,T),Nr(lt(w),T),Object.defineProperty(w,"$state",{get:()=>i.state.value[t],set:A=>{y(k=>{Nr(k,A)})}}),i._p.forEach(A=>{Nr(w,o.run(()=>A({store:w,app:i._a,pinia:i,options:a})))}),p&&r&&n.hydrate&&n.hydrate(w.$state,p),c=!0,u=!0,w}function oC(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=OD();return a=a||(c?us(iC,null):null),a&&pf(a),a=nC,a._s.has(i)||(r?rC(i,e,s,a):rL(i,s,a)),a._s.get(i)}return o.$id=i,o}/*! + */let nC;const pf=t=>nC=t,iC=Symbol();function jp(t){return t&&typeof t=="object"&&Object.prototype.toString.call(t)==="[object Object]"&&typeof t.toJSON!="function"}var zc;(function(t){t.direct="direct",t.patchObject="patch object",t.patchFunction="patch function"})(zc||(zc={}));function eL(){const t=Px(!0),e=t.run(()=>xe({}));let n=[],i=[];const s=of({install(r){pf(s),s._a=r,r.provide(iC,s),r.config.globalProperties.$pinia=s,i.forEach(o=>n.push(o)),i=[]},use(r){return!this._a&&!QR?i.push(r):n.push(r),this},_p:n,_a:null,_e:t,_s:new Map,state:e});return s}const sC=()=>{};function D0(t,e,n,i=sC){t.push(e);const s=()=>{const r=t.indexOf(e);r>-1&&(t.splice(r,1),i())};return!n&&nf()&&e_(s),s}function Da(t,...e){t.slice().forEach(n=>{n(...e)})}const tL=t=>t(),R0=Symbol(),Ag=Symbol();function Kp(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];jp(s)&&jp(i)&&t.hasOwnProperty(n)&&!Wt(i)&&!Qr(i)?t[n]=Kp(s,i):t[n]=i}return t}const nL=Symbol();function iL(t){return!jp(t)||!t.hasOwnProperty(nL)}const{assign:Nr}=Object;function sL(t){return!!(Wt(t)&&t.effect)}function rL(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=nD(n.state.value[t]);return Nr(u,r,Object.keys(o||{}).reduce((d,h)=>(d[h]=of(be(()=>{pf(n);const g=n._s.get(t);return o[h].call(g,g)})),d),{}))}return l=rC(t,c,e,n,i,!0),l}function rC(t,e,n={},i,s,r){let o;const a=Nr({actions:{}},n),l={deep:!0};let c,u,d=[],h=[],g;const p=i.state.value[t];!r&&!p&&(i.state.value[t]={}),xe({});let m;function y(A){let k;c=u=!1,typeof A=="function"?(A(i.state.value[t]),k={type:zc.patchFunction,storeId:t,events:g}):(Kp(i.state.value[t],A),k={type:zc.patchObject,payload:A,storeId:t,events:g});const P=m=Symbol();Rn().then(()=>{m===P&&(c=!0)}),u=!0,Da(d,k,i.state.value[t])}const v=r?function(){const{state:k}=n,P=k?k():{};this.$patch(B=>{Nr(B,P)})}:sC;function b(){o.stop(),d=[],h=[],i._s.delete(t)}const x=(A,k="")=>{if(R0 in A)return A[Ag]=k,A;const P=function(){pf(i);const B=Array.from(arguments),Y=[],ne=[];function $(z){Y.push(z)}function F(z){ne.push(z)}Da(h,{args:B,name:P[Ag],store:w,after:$,onError:F});let D;try{D=A.apply(this&&this.$id===t?this:w,B)}catch(z){throw Da(ne,z),z}return D instanceof Promise?D.then(z=>(Da(Y,z),z)).catch(z=>(Da(ne,z),Promise.reject(z))):(Da(Y,D),D)};return P[R0]=!0,P[Ag]=k,P},E={_p:i,$id:t,$onAction:D0.bind(null,h),$patch:y,$reset:v,$subscribe(A,k={}){const P=D0(d,A,k.detached,()=>B()),B=o.run(()=>un(()=>i.state.value[t],Y=>{(k.flush==="sync"?u:c)&&A({storeId:t,type:zc.direct,events:g},Y)},Nr({},l,k)));return P},$dispose:b},w=Ki(E);i._s.set(t,w);const T=(i._a&&i._a.runWithContext||tL)(()=>i._e.run(()=>(o=Px()).run(()=>e({action:x}))));for(const A in T){const k=T[A];if(Wt(k)&&!sL(k)||Qr(k))r||(p&&iL(k)&&(Wt(k)?k.value=p[A]:Kp(k,p[A])),i.state.value[t][A]=k);else if(typeof k=="function"){const P=x(k,A);T[A]=P,a.actions[A]=k}}return Nr(w,T),Nr(lt(w),T),Object.defineProperty(w,"$state",{get:()=>i.state.value[t],set:A=>{y(k=>{Nr(k,A)})}}),i._p.forEach(A=>{Nr(w,o.run(()=>A({store:w,app:i._a,pinia:i,options:a})))}),p&&r&&n.hydrate&&n.hydrate(w.$state,p),c=!0,u=!0,w}function oC(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=OD();return a=a||(c?us(iC,null):null),a&&pf(a),a=nC,a._s.has(i)||(r?rC(i,e,s,a):rL(i,s,a)),a._s.get(i)}return o.$id=i,o}/*! * vue-router v4.4.5 * (c) 2024 Eduardo San Martin Morote * @license MIT - */const Ga=typeof document<"u";function aC(t){return typeof t=="object"||"displayName"in t||"props"in t||"__vccOpts"in t}function oL(t){return t.__esModule||t[Symbol.toStringTag]==="Module"||t.default&&aC(t.default)}const St=Object.assign;function kg(t,e){const n={};for(const i in e){const s=e[i];n[i]=gs(s)?s.map(t):t(s)}return n}const Wc=()=>{},gs=Array.isArray,lC=/#/g,aL=/&/g,lL=/\//g,cL=/=/g,uL=/\?/g,cC=/\+/g,dL=/%5B/g,hL=/%5D/g,uC=/%5E/g,fL=/%60/g,dC=/%7B/g,gL=/%7C/g,hC=/%7D/g,pL=/%20/g;function __(t){return encodeURI(""+t).replace(gL,"|").replace(dL,"[").replace(hL,"]")}function mL(t){return __(t).replace(dC,"{").replace(hC,"}").replace(uC,"^")}function Up(t){return __(t).replace(cC,"%2B").replace(pL,"+").replace(lC,"%23").replace(aL,"%26").replace(fL,"`").replace(dC,"{").replace(hC,"}").replace(uC,"^")}function _L(t){return Up(t).replace(cL,"%3D")}function yL(t){return __(t).replace(lC,"%23").replace(uL,"%3F")}function vL(t){return t==null?"":yL(t).replace(lL,"%2F")}function ou(t){try{return decodeURIComponent(""+t)}catch{}return""+t}const bL=/\/$/,wL=t=>t.replace(bL,"");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=SL(i??e,n),{fullPath:i+(r&&"?")+r+o,path:i,query:s,hash:ou(o)}}function xL(t,e){const n=e.query?t(e.query):"";return e.path+(n&&"?")+n+(e.hash||"")}function L0(t,e){return!e||!t.toLowerCase().startsWith(e.toLowerCase())?t:t.slice(e.length)||"/"}function EL(t,e,n){const i=e.matched.length-1,s=n.matched.length-1;return i>-1&&i===s&&xl(e.matched[i],n.matched[s])&&fC(e.params,n.params)&&t(e.query)===t(n.query)&&e.hash===n.hash}function xl(t,e){return(t.aliasOf||t)===(e.aliasOf||e)}function fC(t,e){if(Object.keys(t).length!==Object.keys(e).length)return!1;for(const n in t)if(!CL(t[n],e[n]))return!1;return!0}function CL(t,e){return gs(t)?O0(t,e):gs(e)?O0(e,t):t===e}function O0(t,e){return gs(e)?t.length===e.length&&t.every((n,i)=>n===e[i]):t.length===1&&t[0]===e}function SL(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).join("/")}const kr={path:"/",name:void 0,params:{},query:{},hash:"",fullPath:"/",matched:[],meta:{},redirectedFrom:void 0};var au;(function(t){t.pop="pop",t.push="push"})(au||(au={}));var Yc;(function(t){t.back="back",t.forward="forward",t.unknown=""})(Yc||(Yc={}));function TL(t){if(!t)if(Ga){const e=document.querySelector("base");t=e&&e.getAttribute("href")||"/",t=t.replace(/^\w+:\/\/[^\/]+/,"")}else t="/";return t[0]!=="/"&&t[0]!=="#"&&(t="/"+t),wL(t)}const AL=/^[^#]+#/;function kL(t,e){return t.replace(AL,"#")+e}function ML(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 mf=()=>({left:window.scrollX,top:window.scrollY});function PL(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=ML(s,t)}else e=t;"scrollBehavior"in document.documentElement.style?window.scrollTo(e):window.scrollTo(e.left!=null?e.left:window.scrollX,e.top!=null?e.top:window.scrollY)}function $0(t,e){return(history.state?history.state.position-e:-1)+t}const Gp=new Map;function IL(t,e){Gp.set(t,e)}function DL(t){const e=Gp.get(t);return Gp.delete(t),e}let RL=()=>location.protocol+"//"+location.host;function gC(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),L0(l,"")}return L0(n,t)+i+s}function LL(t,e,n,i){let s=[],r=[],o=null;const a=({state:h})=>{const f=gC(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:au.pop,direction:y?y>0?Yc.forward:Yc.back:Yc.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:mf()}),"")}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 N0(t,e,n,i=!1,s=!1){return{back:t,current:e,forward:n,replaced:i,position:window.history.length,scroll:s?mf():null}}function OL(t){const{history:e,location:n}=window,i={value:gC(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:RL()+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,N0(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:mf()});r(u.current,u,!0);const d=St({},N0(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 $L(t){t=TL(t);const e=OL(t),n=LL(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:kL.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 NL(t){return t=location.host?t||location.pathname+location.search:"",t.includes("#")||(t+="#"),$L(t)}function FL(t){return typeof t=="string"||t&&typeof t=="object"}function pC(t){return typeof t=="string"||typeof t=="symbol"}const mC=Symbol("");var F0;(function(t){t[t.aborted=4]="aborted",t[t.cancelled=8]="cancelled",t[t.duplicated=16]="duplicated"})(F0||(F0={}));function El(t,e){return St(new Error,{type:t,[mC]:!0},e)}function Ks(t,e){return t instanceof Error&&mC in t&&(e==null||!!(t.type&e))}const B0="[^/]+?",BL={sensitive:!1,strict:!1,start:!0,end:!0},VL=/[.+*?^${}()[\]/\\]/g;function zL(t,e){const n=St({},BL,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 _C(t,e){let n=0;const i=t.score,s=e.score;for(;n0&&e[e.length-1]<0}const YL={type:0,value:""},HL=/[a-zA-Z0-9_]/;function jL(t){if(!t)return[[]];if(t==="/")return[[YL]];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(x)}:Wc}function o(d){if(pC(d)){const h=i.get(d);h&&(i.delete(d),n.splice(n.indexOf(h),1),h.children.forEach(o),h.alias.forEach(o))}else{const h=n.indexOf(d);h>-1&&(n.splice(h,1),d.record.name&&i.delete(d.record.name),d.children.forEach(o),d.alias.forEach(o))}}function a(){return n}function l(d){const h=qL(d,n);n.splice(h,0,d),d.record.name&&!Y0(d)&&i.set(d.record.name,d)}function c(d,h){let f,p={},m,y;if("name"in d&&d.name){if(f=i.get(d.name),!f)throw El(1,{location:d});y=f.record.name,p=St(z0(h.params,f.keys.filter(x=>!x.optional).concat(f.parent?f.parent.keys.filter(x=>x.optional):[]).map(x=>x.name)),d.params&&z0(d.params,f.keys.map(x=>x.name))),m=f.stringify(p)}else if(d.path!=null)m=d.path,f=n.find(x=>x.re.test(m)),f&&(p=f.parse(m),y=f.record.name);else{if(f=h.name?i.get(h.name):n.find(x=>x.re.test(h.path)),!f)throw El(1,{location:d,currentLocation:h});y=f.record.name,p=St({},h.params,d.params),m=f.stringify(p)}const v=[];let b=f;for(;b;)v.unshift(b.record),b=b.parent;return{name:y,path:m,params:p,matched:v,meta:XL(v)}}t.forEach(d=>r(d));function u(){n.length=0,i.clear()}return{addRoute:r,resolve:c,removeRoute:o,clearRoutes:u,getRoutes:a,getRecordMatcher:s}}function z0(t,e){const n={};for(const i of e)i in t&&(n[i]=t[i]);return n}function W0(t){const e={path:t.path,redirect:t.redirect,name:t.name,meta:t.meta||{},aliasOf:t.aliasOf,beforeEnter:t.beforeEnter,props:GL(t),children:t.children||[],instances:{},leaveGuards:new Set,updateGuards:new Set,enterCallbacks:{},components:"components"in t?t.components||null:t.component&&{default:t.component}};return Object.defineProperty(e,"mods",{value:{}}),e}function GL(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 Y0(t){for(;t;){if(t.record.aliasOf)return!0;t=t.parent}return!1}function XL(t){return t.reduce((e,n)=>St(e,n.meta),{})}function H0(t,e){const n={};for(const i in t)n[i]=i in e?e[i]:t[i];return n}function qL(t,e){let n=0,i=e.length;for(;n!==i;){const r=n+i>>1;_C(t,e[r])<0?i=r:n=r+1}const s=ZL(t);return s&&(i=e.lastIndexOf(s,i-1)),i}function ZL(t){let e=t;for(;e=e.parent;)if(yC(e)&&_C(t,e)===0)return e}function yC({record:t}){return!!(t.name||t.components&&Object.keys(t.components).length||t.redirect)}function JL(t){const e={};if(t===""||t==="?")return e;const i=(t[0]==="?"?t.slice(1):t).split("&");for(let s=0;sr&&Up(r)):[i&&Up(i)]).forEach(r=>{r!==void 0&&(e+=(e.length?"&":"")+n,r!=null&&(e+="="+r))})}return e}function QL(t){const e={};for(const n in t){const i=t[n];i!==void 0&&(e[n]=gs(i)?i.map(s=>s==null?null:""+s):i==null?i:""+i)}return e}const eO=Symbol(""),K0=Symbol(""),y_=Symbol(""),v_=Symbol(""),Xp=Symbol("");function lc(){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 Yr(t,e,n,i,s,r=o=>o()){const o=i&&(i.enterCallbacks[s]=i.enterCallbacks[s]||[]);return()=>new Promise((a,l)=>{const c=h=>{h===!1?l(El(4,{from:n,to:e})):h instanceof Error?l(h):FL(h)?l(El(2,{from:e,to:h})):(o&&i.enterCallbacks[s]===o&&typeof h=="function"&&o.push(h),a())},u=r(()=>t.call(i&&i.instances[s],e,n,c));let d=Promise.resolve(u);t.length<3&&(d=d.then(c)),d.catch(h=>l(h))})}function Pg(t,e,n,i,s=r=>r()){const r=[];for(const o of t)for(const a in o.components){let l=o.components[a];if(!(e!=="beforeRouteEnter"&&!o.instances[a]))if(aC(l)){const u=(l.__vccOpts||l)[e];u&&r.push(Yr(u,n,i,o,a,s))}else{let c=l();r.push(()=>c.then(u=>{if(!u)throw new Error(`Couldn't resolve component "${a}" at "${o.path}"`);const d=oL(u)?u.default:u;o.mods[a]=u,o.components[a]=d;const f=(d.__vccOpts||d)[e];return f&&Yr(f,n,i,o,a,s)()}))}}return r}function U0(t){const e=us(y_),n=us(v_),i=be(()=>{const l=J(t.to);return e.resolve(l)}),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(xl.bind(null,u));if(h>-1)return h;const f=G0(l[c-2]);return c>1&&G0(u)===f&&d[d.length-1].path!==f?d.findIndex(xl.bind(null,l[c-2])):h}),r=be(()=>s.value>-1&&sO(n.params,i.value.params)),o=be(()=>s.value>-1&&s.value===n.matched.length-1&&fC(n.params,i.value.params));function a(l={}){return iO(l)?e[J(t.replace)?"replace":"push"](J(t.to)).catch(Wc):Promise.resolve()}return{route:i,href:be(()=>i.value.href),isActive:r,isExactActive:o,navigate:a}}const tO=hn({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:U0,setup(t,{slots:e}){const n=Ki(U0(t)),{options:i}=us(y_),s=be(()=>({[X0(t.activeClass,i.linkActiveClass,"router-link-active")]:n.isActive,[X0(t.exactActiveClass,i.linkExactActiveClass,"router-link-exact-active")]:n.isExactActive}));return()=>{const r=e.default&&e.default(n);return t.custom?r:ua("a",{"aria-current":n.isExactActive?t.ariaCurrentValue:null,href:n.href,onClick:n.navigate,class:s.value},r)}}}),nO=tO;function iO(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 sO(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(!gs(s)||s.length!==i.length||i.some((r,o)=>r!==s[o]))return!1}return!0}function G0(t){return t?t.aliasOf?t.aliasOf.path:t.path:""}const X0=(t,e,n)=>t??e??n,rO=hn({name:"RouterView",inheritAttrs:!1,props:{name:{type:String,default:"default"},route:Object},compatConfig:{MODE:3},setup(t,{attrs:e,slots:n}){const i=us(Xp),s=be(()=>t.route||i.value),r=us(K0,0),o=be(()=>{let c=J(r);const{matched:u}=s.value;let d;for(;(d=u[c])&&!d.components;)c++;return c}),a=be(()=>s.value.matched[o.value]);nh(K0,be(()=>o.value+1)),nh(eO,a),nh(Xp,s);const l=xe();return un(()=>[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||!xl(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 q0(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=ua(h,St({},p,e,{onVnodeUnmounted:v=>{v.component.isUnmounted&&(d.instances[u]=null)},ref:l}));return q0(n.default,{Component:y,route:c})||y}}});function q0(t,e){if(!t)return null;const n=t(e);return n.length===1?n[0]:n}const vC=rO;function oO(t){const e=UL(t.routes,t),n=t.parseQuery||JL,i=t.stringifyQuery||j0,s=t.history,r=lc(),o=lc(),a=lc(),l=af(kr);let c=kr;Ga&&t.scrollBehavior&&"scrollRestoration"in history&&(history.scrollRestoration="manual");const u=kg.bind(null,L=>""+L),d=kg.bind(null,vL),h=kg.bind(null,ou);function f(L,ae){let de,ve;return pC(L)?(de=e.getRecordMatcher(L),ve=ae):ve=L,e.addRoute(ve,de)}function p(L){const ae=e.getRecordMatcher(L);ae&&e.removeRoute(ae)}function m(){return e.getRoutes().map(L=>L.record)}function y(L){return!!e.getRecordMatcher(L)}function v(L,ae){if(ae=St({},ae||l.value),typeof L=="string"){const O=Mg(n,L,ae.path),K=e.resolve({path:O.path},ae),U=s.createHref(O.fullPath);return St(O,K,{params:h(K.params),hash:ou(O.hash),redirectedFrom:void 0,href:U})}let de;if(L.path!=null)de=St({},L,{path:Mg(n,L.path,ae.path).path});else{const O=St({},L.params);for(const K in O)O[K]==null&&delete O[K];de=St({},L,{params:d(O)}),ae.params=d(ae.params)}const ve=e.resolve(de,ae),W=L.hash||"";ve.params=u(h(ve.params));const fe=xL(i,St({},L,{hash:mL(W),path:ve.path})),C=s.createHref(fe);return St({fullPath:fe,hash:W,query:i===j0?QL(L.query):L.query||{}},ve,{redirectedFrom:void 0,href:C})}function b(L){return typeof L=="string"?Mg(n,L,l.value.path):St({},L)}function x(L,ae){if(c!==L)return El(8,{from:ae,to:L})}function E(L){return T(L)}function w(L){return E(St(b(L),{replace:!0}))}function S(L){const ae=L.matched[L.matched.length-1];if(ae&&ae.redirect){const{redirect:de}=ae;let ve=typeof de=="function"?de(L):de;return typeof ve=="string"&&(ve=ve.includes("?")||ve.includes("#")?ve=b(ve):{path:ve},ve.params={}),St({query:L.query,hash:L.hash,params:ve.path!=null?{}:L.params},ve)}}function T(L,ae){const de=c=v(L),ve=l.value,W=L.state,fe=L.force,C=L.replace===!0,O=S(de);if(O)return T(St(b(O),{state:typeof O=="object"?St({},W,O.state):W,force:fe,replace:C}),ae||de);const K=de;K.redirectedFrom=ae;let U;return!fe&&EL(i,ve,de)&&(U=El(16,{to:K,from:ve}),le(ve,ve,!0,!1)),(U?Promise.resolve(U):P(K,ve)).catch(re=>Ks(re)?Ks(re,2)?re:H(re):X(re,K,ve)).then(re=>{if(re){if(Ks(re,2))return T(St({replace:C},b(re.to),{state:typeof re.to=="object"?St({},W,re.to.state):W,force:fe}),ae||K)}else re=Y(K,ve,!0,C,W);return B(K,ve,re),re})}function A(L,ae){const de=x(L,ae);return de?Promise.reject(de):Promise.resolve()}function k(L){const ae=I.values().next().value;return ae&&typeof ae.runWithContext=="function"?ae.runWithContext(L):L()}function P(L,ae){let de;const[ve,W,fe]=aO(L,ae);de=Pg(ve.reverse(),"beforeRouteLeave",L,ae);for(const O of ve)O.leaveGuards.forEach(K=>{de.push(Yr(K,L,ae))});const C=A.bind(null,L,ae);return de.push(C),ue(de).then(()=>{de=[];for(const O of r.list())de.push(Yr(O,L,ae));return de.push(C),ue(de)}).then(()=>{de=Pg(W,"beforeRouteUpdate",L,ae);for(const O of W)O.updateGuards.forEach(K=>{de.push(Yr(K,L,ae))});return de.push(C),ue(de)}).then(()=>{de=[];for(const O of fe)if(O.beforeEnter)if(gs(O.beforeEnter))for(const K of O.beforeEnter)de.push(Yr(K,L,ae));else de.push(Yr(O.beforeEnter,L,ae));return de.push(C),ue(de)}).then(()=>(L.matched.forEach(O=>O.enterCallbacks={}),de=Pg(fe,"beforeRouteEnter",L,ae,k),de.push(C),ue(de))).then(()=>{de=[];for(const O of o.list())de.push(Yr(O,L,ae));return de.push(C),ue(de)}).catch(O=>Ks(O,8)?O:Promise.reject(O))}function B(L,ae,de){a.list().forEach(ve=>k(()=>ve(L,ae,de)))}function Y(L,ae,de,ve,W){const fe=x(L,ae);if(fe)return fe;const C=ae===kr,O=Ga?history.state:{};de&&(ve||C?s.replace(L.fullPath,St({scroll:C&&O&&O.scroll},W)):s.push(L.fullPath,W)),l.value=L,le(L,ae,de,C),H()}let ne;function $(){ne||(ne=s.listen((L,ae,de)=>{if(!ee.listening)return;const ve=v(L),W=S(ve);if(W){T(St(W,{replace:!0}),ve).catch(Wc);return}c=ve;const fe=l.value;Ga&&IL($0(fe.fullPath,de.delta),mf()),P(ve,fe).catch(C=>Ks(C,12)?C:Ks(C,2)?(T(C.to,ve).then(O=>{Ks(O,20)&&!de.delta&&de.type===au.pop&&s.go(-1,!1)}).catch(Wc),Promise.reject()):(de.delta&&s.go(-de.delta,!1),X(C,ve,fe))).then(C=>{C=C||Y(ve,fe,!1),C&&(de.delta&&!Ks(C,8)?s.go(-de.delta,!1):de.type===au.pop&&Ks(C,20)&&s.go(-1,!1)),B(ve,fe,C)}).catch(Wc)}))}let F=lc(),D=lc(),z;function X(L,ae,de){H(L);const ve=D.list();return ve.length?ve.forEach(W=>W(L,ae,de)):console.error(L),Promise.reject(L)}function Z(){return z&&l.value!==kr?Promise.resolve():new Promise((L,ae)=>{F.add([L,ae])})}function H(L){return z||(z=!L,$(),F.list().forEach(([ae,de])=>L?de(L):ae()),F.reset()),L}function le(L,ae,de,ve){const{scrollBehavior:W}=t;if(!Ga||!W)return Promise.resolve();const fe=!de&&DL($0(L.fullPath,0))||(ve||!de)&&history.state&&history.state.scroll||null;return Rn().then(()=>W(L,ae,fe)).then(C=>C&&PL(C)).catch(C=>X(C,L,ae))}const ie=L=>s.go(L);let te;const I=new Set,ee={currentRoute:l,listening:!0,addRoute:f,removeRoute:p,clearRoutes:e.clearRoutes,hasRoute:y,getRoutes:m,resolve:v,options:t,push:E,replace:w,go:ie,back:()=>ie(-1),forward:()=>ie(1),beforeEach:r.add,beforeResolve:o.add,afterEach:a.add,onError:D.add,isReady:Z,install(L){const ae=this;L.component("RouterLink",nO),L.component("RouterView",vC),L.config.globalProperties.$router=ae,Object.defineProperty(L.config.globalProperties,"$route",{enumerable:!0,get:()=>J(l)}),Ga&&!te&&l.value===kr&&(te=!0,E(s.location).catch(W=>{}));const de={};for(const W in kr)Object.defineProperty(de,W,{get:()=>l.value[W],enumerable:!0});L.provide(y_,ae),L.provide(v_,jx(de)),L.provide(Xp,l);const ve=L.unmount;I.add(L),L.unmount=function(){I.delete(L),I.size<1&&(c=kr,ne&&ne(),ne=null,l.value=kr,te=!1,z=!1),ve()}}};function ue(L){return L.reduce((ae,de)=>ae.then(()=>k(de)),Promise.resolve())}return ee}function aO(t,e){const n=[],i=[],s=[],r=Math.max(e.matched.length,t.matched.length);for(let o=0;oxl(c,a))?i.push(a):n.push(a));const l=t.matched[o];l&&(e.matched.find(c=>xl(c,l))||s.push(l))}return[n,i,s]}function lO(t){return us(v_)}const cO={getCookie(t){const n=`; ${document.cookie}`.split(`; ${t}=`);if(n.length===2)return n.pop().split(";").shift()}},Z0="[a-fA-F\\d:]",jr=t=>t&&t.includeBoundaries?`(?:(?<=\\s|^)(?=${Z0})|(?<=${Z0})(?=\\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}",mn="[a-fA-F\\d]{1,4}",_f=` + */const Ga=typeof document<"u";function aC(t){return typeof t=="object"||"displayName"in t||"props"in t||"__vccOpts"in t}function oL(t){return t.__esModule||t[Symbol.toStringTag]==="Module"||t.default&&aC(t.default)}const St=Object.assign;function kg(t,e){const n={};for(const i in e){const s=e[i];n[i]=gs(s)?s.map(t):t(s)}return n}const Wc=()=>{},gs=Array.isArray,lC=/#/g,aL=/&/g,lL=/\//g,cL=/=/g,uL=/\?/g,cC=/\+/g,dL=/%5B/g,hL=/%5D/g,uC=/%5E/g,fL=/%60/g,dC=/%7B/g,gL=/%7C/g,hC=/%7D/g,pL=/%20/g;function __(t){return encodeURI(""+t).replace(gL,"|").replace(dL,"[").replace(hL,"]")}function mL(t){return __(t).replace(dC,"{").replace(hC,"}").replace(uC,"^")}function Up(t){return __(t).replace(cC,"%2B").replace(pL,"+").replace(lC,"%23").replace(aL,"%26").replace(fL,"`").replace(dC,"{").replace(hC,"}").replace(uC,"^")}function _L(t){return Up(t).replace(cL,"%3D")}function yL(t){return __(t).replace(lC,"%23").replace(uL,"%3F")}function vL(t){return t==null?"":yL(t).replace(lL,"%2F")}function ou(t){try{return decodeURIComponent(""+t)}catch{}return""+t}const bL=/\/$/,wL=t=>t.replace(bL,"");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=SL(i??e,n),{fullPath:i+(r&&"?")+r+o,path:i,query:s,hash:ou(o)}}function xL(t,e){const n=e.query?t(e.query):"";return e.path+(n&&"?")+n+(e.hash||"")}function L0(t,e){return!e||!t.toLowerCase().startsWith(e.toLowerCase())?t:t.slice(e.length)||"/"}function EL(t,e,n){const i=e.matched.length-1,s=n.matched.length-1;return i>-1&&i===s&&xl(e.matched[i],n.matched[s])&&fC(e.params,n.params)&&t(e.query)===t(n.query)&&e.hash===n.hash}function xl(t,e){return(t.aliasOf||t)===(e.aliasOf||e)}function fC(t,e){if(Object.keys(t).length!==Object.keys(e).length)return!1;for(const n in t)if(!CL(t[n],e[n]))return!1;return!0}function CL(t,e){return gs(t)?O0(t,e):gs(e)?O0(e,t):t===e}function O0(t,e){return gs(e)?t.length===e.length&&t.every((n,i)=>n===e[i]):t.length===1&&t[0]===e}function SL(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).join("/")}const kr={path:"/",name:void 0,params:{},query:{},hash:"",fullPath:"/",matched:[],meta:{},redirectedFrom:void 0};var au;(function(t){t.pop="pop",t.push="push"})(au||(au={}));var Yc;(function(t){t.back="back",t.forward="forward",t.unknown=""})(Yc||(Yc={}));function TL(t){if(!t)if(Ga){const e=document.querySelector("base");t=e&&e.getAttribute("href")||"/",t=t.replace(/^\w+:\/\/[^\/]+/,"")}else t="/";return t[0]!=="/"&&t[0]!=="#"&&(t="/"+t),wL(t)}const AL=/^[^#]+#/;function kL(t,e){return t.replace(AL,"#")+e}function ML(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 mf=()=>({left:window.scrollX,top:window.scrollY});function PL(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=ML(s,t)}else e=t;"scrollBehavior"in document.documentElement.style?window.scrollTo(e):window.scrollTo(e.left!=null?e.left:window.scrollX,e.top!=null?e.top:window.scrollY)}function $0(t,e){return(history.state?history.state.position-e:-1)+t}const Gp=new Map;function IL(t,e){Gp.set(t,e)}function DL(t){const e=Gp.get(t);return Gp.delete(t),e}let RL=()=>location.protocol+"//"+location.host;function gC(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),L0(l,"")}return L0(n,t)+i+s}function LL(t,e,n,i){let s=[],r=[],o=null;const a=({state:h})=>{const g=gC(t,location),p=n.value,m=e.value;let y=0;if(h){if(n.value=g,e.value=h,o&&o===p){o=null;return}y=m?h.position-m.position:0}else i(g);s.forEach(v=>{v(n.value,p,{delta:y,type:au.pop,direction:y?y>0?Yc.forward:Yc.back:Yc.unknown})})};function l(){o=n.value}function c(h){s.push(h);const g=()=>{const p=s.indexOf(h);p>-1&&s.splice(p,1)};return r.push(g),g}function u(){const{history:h}=window;h.state&&h.replaceState(St({},h.state,{scroll:mf()}),"")}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 N0(t,e,n,i=!1,s=!1){return{back:t,current:e,forward:n,replaced:i,position:window.history.length,scroll:s?mf():null}}function OL(t){const{history:e,location:n}=window,i={value:gC(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:RL()+t+l;try{e[u?"replaceState":"pushState"](c,"",h),s.value=c}catch(g){console.error(g),n[u?"replace":"assign"](h)}}function o(l,c){const u=St({},e.state,N0(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:mf()});r(u.current,u,!0);const d=St({},N0(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 $L(t){t=TL(t);const e=OL(t),n=LL(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:kL.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 NL(t){return t=location.host?t||location.pathname+location.search:"",t.includes("#")||(t+="#"),$L(t)}function FL(t){return typeof t=="string"||t&&typeof t=="object"}function pC(t){return typeof t=="string"||typeof t=="symbol"}const mC=Symbol("");var F0;(function(t){t[t.aborted=4]="aborted",t[t.cancelled=8]="cancelled",t[t.duplicated=16]="duplicated"})(F0||(F0={}));function El(t,e){return St(new Error,{type:t,[mC]:!0},e)}function Ks(t,e){return t instanceof Error&&mC in t&&(e==null||!!(t.type&e))}const B0="[^/]+?",BL={sensitive:!1,strict:!1,start:!0,end:!0},VL=/[.+*?^${}()[\]/\\]/g;function zL(t,e){const n=St({},BL,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 _C(t,e){let n=0;const i=t.score,s=e.score;for(;n0&&e[e.length-1]<0}const YL={type:0,value:""},HL=/[a-zA-Z0-9_]/;function jL(t){if(!t)return[[]];if(t==="/")return[[YL]];if(!t.startsWith("/"))throw new Error(`Invalid path "${t}"`);function e(g){throw new Error(`ERR (${n})/"${c}": ${g}`)}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(x)}:Wc}function o(d){if(pC(d)){const h=i.get(d);h&&(i.delete(d),n.splice(n.indexOf(h),1),h.children.forEach(o),h.alias.forEach(o))}else{const h=n.indexOf(d);h>-1&&(n.splice(h,1),d.record.name&&i.delete(d.record.name),d.children.forEach(o),d.alias.forEach(o))}}function a(){return n}function l(d){const h=qL(d,n);n.splice(h,0,d),d.record.name&&!Y0(d)&&i.set(d.record.name,d)}function c(d,h){let g,p={},m,y;if("name"in d&&d.name){if(g=i.get(d.name),!g)throw El(1,{location:d});y=g.record.name,p=St(z0(h.params,g.keys.filter(x=>!x.optional).concat(g.parent?g.parent.keys.filter(x=>x.optional):[]).map(x=>x.name)),d.params&&z0(d.params,g.keys.map(x=>x.name))),m=g.stringify(p)}else if(d.path!=null)m=d.path,g=n.find(x=>x.re.test(m)),g&&(p=g.parse(m),y=g.record.name);else{if(g=h.name?i.get(h.name):n.find(x=>x.re.test(h.path)),!g)throw El(1,{location:d,currentLocation:h});y=g.record.name,p=St({},h.params,d.params),m=g.stringify(p)}const v=[];let b=g;for(;b;)v.unshift(b.record),b=b.parent;return{name:y,path:m,params:p,matched:v,meta:XL(v)}}t.forEach(d=>r(d));function u(){n.length=0,i.clear()}return{addRoute:r,resolve:c,removeRoute:o,clearRoutes:u,getRoutes:a,getRecordMatcher:s}}function z0(t,e){const n={};for(const i of e)i in t&&(n[i]=t[i]);return n}function W0(t){const e={path:t.path,redirect:t.redirect,name:t.name,meta:t.meta||{},aliasOf:t.aliasOf,beforeEnter:t.beforeEnter,props:GL(t),children:t.children||[],instances:{},leaveGuards:new Set,updateGuards:new Set,enterCallbacks:{},components:"components"in t?t.components||null:t.component&&{default:t.component}};return Object.defineProperty(e,"mods",{value:{}}),e}function GL(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 Y0(t){for(;t;){if(t.record.aliasOf)return!0;t=t.parent}return!1}function XL(t){return t.reduce((e,n)=>St(e,n.meta),{})}function H0(t,e){const n={};for(const i in t)n[i]=i in e?e[i]:t[i];return n}function qL(t,e){let n=0,i=e.length;for(;n!==i;){const r=n+i>>1;_C(t,e[r])<0?i=r:n=r+1}const s=ZL(t);return s&&(i=e.lastIndexOf(s,i-1)),i}function ZL(t){let e=t;for(;e=e.parent;)if(yC(e)&&_C(t,e)===0)return e}function yC({record:t}){return!!(t.name||t.components&&Object.keys(t.components).length||t.redirect)}function JL(t){const e={};if(t===""||t==="?")return e;const i=(t[0]==="?"?t.slice(1):t).split("&");for(let s=0;sr&&Up(r)):[i&&Up(i)]).forEach(r=>{r!==void 0&&(e+=(e.length?"&":"")+n,r!=null&&(e+="="+r))})}return e}function QL(t){const e={};for(const n in t){const i=t[n];i!==void 0&&(e[n]=gs(i)?i.map(s=>s==null?null:""+s):i==null?i:""+i)}return e}const eO=Symbol(""),K0=Symbol(""),y_=Symbol(""),v_=Symbol(""),Xp=Symbol("");function lc(){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 Yr(t,e,n,i,s,r=o=>o()){const o=i&&(i.enterCallbacks[s]=i.enterCallbacks[s]||[]);return()=>new Promise((a,l)=>{const c=h=>{h===!1?l(El(4,{from:n,to:e})):h instanceof Error?l(h):FL(h)?l(El(2,{from:e,to:h})):(o&&i.enterCallbacks[s]===o&&typeof h=="function"&&o.push(h),a())},u=r(()=>t.call(i&&i.instances[s],e,n,c));let d=Promise.resolve(u);t.length<3&&(d=d.then(c)),d.catch(h=>l(h))})}function Pg(t,e,n,i,s=r=>r()){const r=[];for(const o of t)for(const a in o.components){let l=o.components[a];if(!(e!=="beforeRouteEnter"&&!o.instances[a]))if(aC(l)){const u=(l.__vccOpts||l)[e];u&&r.push(Yr(u,n,i,o,a,s))}else{let c=l();r.push(()=>c.then(u=>{if(!u)throw new Error(`Couldn't resolve component "${a}" at "${o.path}"`);const d=oL(u)?u.default:u;o.mods[a]=u,o.components[a]=d;const g=(d.__vccOpts||d)[e];return g&&Yr(g,n,i,o,a,s)()}))}}return r}function U0(t){const e=us(y_),n=us(v_),i=be(()=>{const l=J(t.to);return e.resolve(l)}),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(xl.bind(null,u));if(h>-1)return h;const g=G0(l[c-2]);return c>1&&G0(u)===g&&d[d.length-1].path!==g?d.findIndex(xl.bind(null,l[c-2])):h}),r=be(()=>s.value>-1&&sO(n.params,i.value.params)),o=be(()=>s.value>-1&&s.value===n.matched.length-1&&fC(n.params,i.value.params));function a(l={}){return iO(l)?e[J(t.replace)?"replace":"push"](J(t.to)).catch(Wc):Promise.resolve()}return{route:i,href:be(()=>i.value.href),isActive:r,isExactActive:o,navigate:a}}const tO=hn({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:U0,setup(t,{slots:e}){const n=Ki(U0(t)),{options:i}=us(y_),s=be(()=>({[X0(t.activeClass,i.linkActiveClass,"router-link-active")]:n.isActive,[X0(t.exactActiveClass,i.linkExactActiveClass,"router-link-exact-active")]:n.isExactActive}));return()=>{const r=e.default&&e.default(n);return t.custom?r:ua("a",{"aria-current":n.isExactActive?t.ariaCurrentValue:null,href:n.href,onClick:n.navigate,class:s.value},r)}}}),nO=tO;function iO(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 sO(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(!gs(s)||s.length!==i.length||i.some((r,o)=>r!==s[o]))return!1}return!0}function G0(t){return t?t.aliasOf?t.aliasOf.path:t.path:""}const X0=(t,e,n)=>t??e??n,rO=hn({name:"RouterView",inheritAttrs:!1,props:{name:{type:String,default:"default"},route:Object},compatConfig:{MODE:3},setup(t,{attrs:e,slots:n}){const i=us(Xp),s=be(()=>t.route||i.value),r=us(K0,0),o=be(()=>{let c=J(r);const{matched:u}=s.value;let d;for(;(d=u[c])&&!d.components;)c++;return c}),a=be(()=>s.value.matched[o.value]);nh(K0,be(()=>o.value+1)),nh(eO,a),nh(Xp,s);const l=xe();return un(()=>[l.value,a.value,t.name],([c,u,d],[h,g,p])=>{u&&(u.instances[d]=c,g&&g!==u&&c&&c===h&&(u.leaveGuards.size||(u.leaveGuards=g.leaveGuards),u.updateGuards.size||(u.updateGuards=g.updateGuards))),c&&u&&(!g||!xl(u,g)||!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 q0(n.default,{Component:h,route:c});const g=d.props[u],p=g?g===!0?c.params:typeof g=="function"?g(c):g:null,y=ua(h,St({},p,e,{onVnodeUnmounted:v=>{v.component.isUnmounted&&(d.instances[u]=null)},ref:l}));return q0(n.default,{Component:y,route:c})||y}}});function q0(t,e){if(!t)return null;const n=t(e);return n.length===1?n[0]:n}const vC=rO;function oO(t){const e=UL(t.routes,t),n=t.parseQuery||JL,i=t.stringifyQuery||j0,s=t.history,r=lc(),o=lc(),a=lc(),l=af(kr);let c=kr;Ga&&t.scrollBehavior&&"scrollRestoration"in history&&(history.scrollRestoration="manual");const u=kg.bind(null,L=>""+L),d=kg.bind(null,vL),h=kg.bind(null,ou);function g(L,ae){let de,ve;return pC(L)?(de=e.getRecordMatcher(L),ve=ae):ve=L,e.addRoute(ve,de)}function p(L){const ae=e.getRecordMatcher(L);ae&&e.removeRoute(ae)}function m(){return e.getRoutes().map(L=>L.record)}function y(L){return!!e.getRecordMatcher(L)}function v(L,ae){if(ae=St({},ae||l.value),typeof L=="string"){const O=Mg(n,L,ae.path),K=e.resolve({path:O.path},ae),U=s.createHref(O.fullPath);return St(O,K,{params:h(K.params),hash:ou(O.hash),redirectedFrom:void 0,href:U})}let de;if(L.path!=null)de=St({},L,{path:Mg(n,L.path,ae.path).path});else{const O=St({},L.params);for(const K in O)O[K]==null&&delete O[K];de=St({},L,{params:d(O)}),ae.params=d(ae.params)}const ve=e.resolve(de,ae),W=L.hash||"";ve.params=u(h(ve.params));const fe=xL(i,St({},L,{hash:mL(W),path:ve.path})),C=s.createHref(fe);return St({fullPath:fe,hash:W,query:i===j0?QL(L.query):L.query||{}},ve,{redirectedFrom:void 0,href:C})}function b(L){return typeof L=="string"?Mg(n,L,l.value.path):St({},L)}function x(L,ae){if(c!==L)return El(8,{from:ae,to:L})}function E(L){return T(L)}function w(L){return E(St(b(L),{replace:!0}))}function S(L){const ae=L.matched[L.matched.length-1];if(ae&&ae.redirect){const{redirect:de}=ae;let ve=typeof de=="function"?de(L):de;return typeof ve=="string"&&(ve=ve.includes("?")||ve.includes("#")?ve=b(ve):{path:ve},ve.params={}),St({query:L.query,hash:L.hash,params:ve.path!=null?{}:L.params},ve)}}function T(L,ae){const de=c=v(L),ve=l.value,W=L.state,fe=L.force,C=L.replace===!0,O=S(de);if(O)return T(St(b(O),{state:typeof O=="object"?St({},W,O.state):W,force:fe,replace:C}),ae||de);const K=de;K.redirectedFrom=ae;let U;return!fe&&EL(i,ve,de)&&(U=El(16,{to:K,from:ve}),le(ve,ve,!0,!1)),(U?Promise.resolve(U):P(K,ve)).catch(re=>Ks(re)?Ks(re,2)?re:H(re):X(re,K,ve)).then(re=>{if(re){if(Ks(re,2))return T(St({replace:C},b(re.to),{state:typeof re.to=="object"?St({},W,re.to.state):W,force:fe}),ae||K)}else re=Y(K,ve,!0,C,W);return B(K,ve,re),re})}function A(L,ae){const de=x(L,ae);return de?Promise.reject(de):Promise.resolve()}function k(L){const ae=I.values().next().value;return ae&&typeof ae.runWithContext=="function"?ae.runWithContext(L):L()}function P(L,ae){let de;const[ve,W,fe]=aO(L,ae);de=Pg(ve.reverse(),"beforeRouteLeave",L,ae);for(const O of ve)O.leaveGuards.forEach(K=>{de.push(Yr(K,L,ae))});const C=A.bind(null,L,ae);return de.push(C),ue(de).then(()=>{de=[];for(const O of r.list())de.push(Yr(O,L,ae));return de.push(C),ue(de)}).then(()=>{de=Pg(W,"beforeRouteUpdate",L,ae);for(const O of W)O.updateGuards.forEach(K=>{de.push(Yr(K,L,ae))});return de.push(C),ue(de)}).then(()=>{de=[];for(const O of fe)if(O.beforeEnter)if(gs(O.beforeEnter))for(const K of O.beforeEnter)de.push(Yr(K,L,ae));else de.push(Yr(O.beforeEnter,L,ae));return de.push(C),ue(de)}).then(()=>(L.matched.forEach(O=>O.enterCallbacks={}),de=Pg(fe,"beforeRouteEnter",L,ae,k),de.push(C),ue(de))).then(()=>{de=[];for(const O of o.list())de.push(Yr(O,L,ae));return de.push(C),ue(de)}).catch(O=>Ks(O,8)?O:Promise.reject(O))}function B(L,ae,de){a.list().forEach(ve=>k(()=>ve(L,ae,de)))}function Y(L,ae,de,ve,W){const fe=x(L,ae);if(fe)return fe;const C=ae===kr,O=Ga?history.state:{};de&&(ve||C?s.replace(L.fullPath,St({scroll:C&&O&&O.scroll},W)):s.push(L.fullPath,W)),l.value=L,le(L,ae,de,C),H()}let ne;function $(){ne||(ne=s.listen((L,ae,de)=>{if(!ee.listening)return;const ve=v(L),W=S(ve);if(W){T(St(W,{replace:!0}),ve).catch(Wc);return}c=ve;const fe=l.value;Ga&&IL($0(fe.fullPath,de.delta),mf()),P(ve,fe).catch(C=>Ks(C,12)?C:Ks(C,2)?(T(C.to,ve).then(O=>{Ks(O,20)&&!de.delta&&de.type===au.pop&&s.go(-1,!1)}).catch(Wc),Promise.reject()):(de.delta&&s.go(-de.delta,!1),X(C,ve,fe))).then(C=>{C=C||Y(ve,fe,!1),C&&(de.delta&&!Ks(C,8)?s.go(-de.delta,!1):de.type===au.pop&&Ks(C,20)&&s.go(-1,!1)),B(ve,fe,C)}).catch(Wc)}))}let F=lc(),D=lc(),z;function X(L,ae,de){H(L);const ve=D.list();return ve.length?ve.forEach(W=>W(L,ae,de)):console.error(L),Promise.reject(L)}function Z(){return z&&l.value!==kr?Promise.resolve():new Promise((L,ae)=>{F.add([L,ae])})}function H(L){return z||(z=!L,$(),F.list().forEach(([ae,de])=>L?de(L):ae()),F.reset()),L}function le(L,ae,de,ve){const{scrollBehavior:W}=t;if(!Ga||!W)return Promise.resolve();const fe=!de&&DL($0(L.fullPath,0))||(ve||!de)&&history.state&&history.state.scroll||null;return Rn().then(()=>W(L,ae,fe)).then(C=>C&&PL(C)).catch(C=>X(C,L,ae))}const ie=L=>s.go(L);let te;const I=new Set,ee={currentRoute:l,listening:!0,addRoute:g,removeRoute:p,clearRoutes:e.clearRoutes,hasRoute:y,getRoutes:m,resolve:v,options:t,push:E,replace:w,go:ie,back:()=>ie(-1),forward:()=>ie(1),beforeEach:r.add,beforeResolve:o.add,afterEach:a.add,onError:D.add,isReady:Z,install(L){const ae=this;L.component("RouterLink",nO),L.component("RouterView",vC),L.config.globalProperties.$router=ae,Object.defineProperty(L.config.globalProperties,"$route",{enumerable:!0,get:()=>J(l)}),Ga&&!te&&l.value===kr&&(te=!0,E(s.location).catch(W=>{}));const de={};for(const W in kr)Object.defineProperty(de,W,{get:()=>l.value[W],enumerable:!0});L.provide(y_,ae),L.provide(v_,jx(de)),L.provide(Xp,l);const ve=L.unmount;I.add(L),L.unmount=function(){I.delete(L),I.size<1&&(c=kr,ne&&ne(),ne=null,l.value=kr,te=!1,z=!1),ve()}}};function ue(L){return L.reduce((ae,de)=>ae.then(()=>k(de)),Promise.resolve())}return ee}function aO(t,e){const n=[],i=[],s=[],r=Math.max(e.matched.length,t.matched.length);for(let o=0;oxl(c,a))?i.push(a):n.push(a));const l=t.matched[o];l&&(e.matched.find(c=>xl(c,l))||s.push(l))}return[n,i,s]}function lO(t){return us(v_)}const cO={getCookie(t){const n=`; ${document.cookie}`.split(`; ${t}=`);if(n.length===2)return n.pop().split(";").shift()}},Z0="[a-fA-F\\d:]",jr=t=>t&&t.includeBoundaries?`(?:(?<=\\s|^)(?=${Z0})|(?<=${Z0})(?=\\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}",mn="[a-fA-F\\d]{1,4}",_f=` (?: (?:${mn}:){7}(?:${mn}|:)| // 1:2:3:4:5:6:7:: 1:2:3:4:5:6:7:8 (?:${mn}:){6}(?:${ts}|:${mn}|:)| // 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 @@ -37,40 +37,40 @@ (?:${mn}:){1}(?:(?::${mn}){0,4}:${ts}|(?::${mn}){1,6}|:)| // 1:: 1::3:4:5:6:7:8 1::8 1::3:4:5:6:7:1.2.3.4 (?::(?:(?::${mn}){0,5}:${ts}|(?::${mn}){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(),uO=new RegExp(`(?:^${ts}$)|(?:^${_f}$)`),dO=new RegExp(`^${ts}$`),hO=new RegExp(`^${_f}$`),yf=t=>t&&t.exact?uO:new RegExp(`(?:${jr(t)}${ts}${jr(t)})|(?:${jr(t)}${_f}${jr(t)})`,"g");yf.v4=t=>t&&t.exact?dO:new RegExp(`${jr(t)}${ts}${jr(t)}`,"g");yf.v6=t=>t&&t.exact?hO:new RegExp(`${jr(t)}${_f}${jr(t)}`,"g");const bC={exact:!1},wC=`${yf.v4().source}\\/(3[0-2]|[12]?[0-9])`,xC=`${yf.v6().source}\\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])`,fO=new RegExp(`^${wC}$`),gO=new RegExp(`^${xC}$`),pO=({exact:t}=bC)=>t?fO:new RegExp(wC,"g"),mO=({exact:t}=bC)=>t?gO:new RegExp(xC,"g"),EC=pO({exact:!0}),CC=mO({exact:!0}),b_=t=>EC.test(t)?4:CC.test(t)?6:0;b_.v4=t=>EC.test(t);b_.v6=t=>CC.test(t);const At=t=>{const e=tt();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]])},qn=oC("WireguardConfigurationsStore",{state:()=>({Configurations:void 0,searchString:"",ConfigurationListInterval:void 0,PeerScheduleJobs:{dropdowns:{Field:[{display:At("Total Received"),value:"total_receive",unit:"GB",type:"number"},{display:At("Total Sent"),value:"total_sent",unit:"GB",type:"number"},{display:At("Total Usage"),value:"total_data",unit:"GB",type:"number"},{display:At("Date"),value:"date",type:"date"}],Operator:[{display:At("larger than"),value:"lgt"}],Action:[{display:At("Restrict Peer"),value:"restrict"},{display:At("Delete Peer"),value:"delete"}]}}}),actions:{async getConfigurations(){await Yt("/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 b_(t)!==0},checkWGKeyLength(t){return console.log(t),/^[A-Za-z0-9+/]{43}=?=?$/.test(t)}}}),je=(t,e)=>{const n=t.__vccOpts||t;for(const[i,s]of e)n[i]=s;return n},_O={name:"localeText",props:{t:""},computed:{getLocaleText(){return At(this.t)}}};function yO(t,e,n,i,s,r){return we(this.getLocaleText)}const He=je(_O,[["render",yO]]),vO={name:"navbar",components:{LocaleText:He},setup(){const t=qn(),e=tt();return{wireguardConfigurationsStore:t,dashboardConfigurationStore:e}},data(){return{updateAvailable:!1,updateMessage:"Checking for update...",updateUrl:""}},mounted(){Yt("/api/getDashboardUpdate",{},t=>{t.status?(t.data&&(this.updateAvailable=!0,this.updateUrl=t.data),this.updateMessage=t.message):(this.updateMessage=At("Failed to check available update"),console.log(`Failed to get update: ${t.message}`))})}},bO=["data-bs-theme"],wO={id:"sidebarMenu",class:"bg-body-tertiary sidebar border h-100 rounded-3 shadow overflow-y-scroll"},xO={class:"sidebar-sticky"},EO={class:"nav flex-column px-2"},CO={class:"nav-item"},SO={class:"nav-item"},TO={class:"sidebar-heading px-3 mt-4 mb-1 text-muted text-center"},AO={class:"nav flex-column px-2"},kO={class:"nav-item"},MO={class:"sidebar-heading px-3 mt-4 mb-1 text-muted text-center"},PO={class:"nav flex-column px-2"},IO={class:"nav-item"},DO={class:"nav-item"},RO={class:"nav flex-column px-2"},LO={class:"nav-item"},OO={class:"nav-item",style:{"font-size":"0.8rem"}},$O=["href"],NO={class:"nav-link text-muted rounded-3"},FO={key:1,class:"nav-link text-muted rounded-3"};function BO(t,e,n,i,s,r){const o=Ee("LocaleText"),a=Ee("RouterLink");return R(),V("div",{class:Pe(["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},[g("nav",wO,[g("div",xO,[e[7]||(e[7]=g("h5",{class:"text-white text-center m-0 py-3 mb-3 btn-brand fw-light"},"WGDashboard",-1)),g("ul",EO,[g("li",CO,[N(a,{class:"nav-link rounded-3",to:"/","exact-active-class":"active"},{default:De(()=>[e[1]||(e[1]=g("i",{class:"bi bi-house me-2"},null,-1)),N(o,{t:"Home"})]),_:1})]),g("li",SO,[N(a,{class:"nav-link rounded-3",to:"/settings","exact-active-class":"active"},{default:De(()=>[e[2]||(e[2]=g("i",{class:"bi bi-gear me-2"},null,-1)),N(o,{t:"Settings"})]),_:1})])]),e[8]||(e[8]=g("hr",{class:"text-body"},null,-1)),g("h6",TO,[e[3]||(e[3]=g("i",{class:"bi bi-body-text me-2"},null,-1)),N(o,{t:"WireGuard Configurations"})]),g("ul",AO,[g("li",kO,[(R(!0),V(Oe,null,Ze(this.wireguardConfigurationsStore.Configurations,l=>(R(),Se(a,{to:"/configuration/"+l.Name+"/peers",class:"nav-link nav-conf-link rounded-3","active-class":"active"},{default:De(()=>[g("span",{class:Pe(["dot me-2",{active:l.Status}])},null,2),Ue(" "+we(l.Name),1)]),_:2},1032,["to"]))),256))])]),e[9]||(e[9]=g("hr",{class:"text-body"},null,-1)),g("h6",MO,[e[4]||(e[4]=g("i",{class:"bi bi-tools me-2"},null,-1)),N(o,{t:"Tools"})]),g("ul",PO,[g("li",IO,[N(a,{to:"/ping",class:"nav-link rounded-3","active-class":"active"},{default:De(()=>[N(o,{t:"Ping"})]),_:1})]),g("li",DO,[N(a,{to:"/traceroute",class:"nav-link rounded-3","active-class":"active"},{default:De(()=>[N(o,{t:"Traceroute"})]),_:1})])]),e[10]||(e[10]=g("hr",{class:"text-body"},null,-1)),g("ul",RO,[g("li",LO,[g("a",{class:"nav-link text-danger rounded-3",onClick:e[0]||(e[0]=l=>this.dashboardConfigurationStore.signOut()),role:"button",style:{"font-weight":"bold"}},[e[5]||(e[5]=g("i",{class:"bi bi-box-arrow-left me-2"},null,-1)),N(o,{t:"Sign Out"})])]),g("li",OO,[this.updateAvailable?(R(),V("a",{key:0,href:this.updateUrl,class:"text-decoration-none rounded-3",target:"_blank"},[g("small",NO,[N(o,{t:this.updateMessage},null,8,["t"]),e[6]||(e[6]=Ue(" (")),N(o,{t:"Current Version:"}),Ue(" "+we(i.dashboardConfigurationStore.Configuration.Server.version)+") ",1)])],8,$O)):(R(),V("small",FO,[N(o,{t:this.updateMessage},null,8,["t"]),Ue(" ("+we(i.dashboardConfigurationStore.Configuration.Server.version)+") ",1)]))])])])])],10,bO)}const VO=je(vO,[["render",BO],["__scopeId","data-v-f9d83f99"]]),zO={name:"message",components:{LocaleText:He},props:{message:Object},mounted(){setTimeout(()=>{this.message.show=!1},5e3)}},WO=["id"],YO={class:"card-body"},HO={class:"fw-bold d-block",style:{"text-transform":"uppercase"}};function jO(t,e,n,i,s,r){const o=Ee("LocaleText");return R(),V("div",{class:Pe(["card shadow rounded-3 position-relative mb-2 message ms-auto",{"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},[g("div",YO,[g("small",HO,[N(o,{t:"FROM "}),Ue(" "+we(this.message.from),1)]),Ue(" "+we(this.message.content),1)])],10,WO)}const SC=je(zO,[["render",jO],["__scopeId","data-v-e30054c0"]]),KO={name:"index",components:{Message:SC,Navbar:VO},async setup(){return{dashboardConfigurationStore:tt()}},computed:{getMessages(){return this.dashboardConfigurationStore.Messages.filter(t=>t.show)}}},UO=["data-bs-theme"],GO={class:"row h-100"},XO={class:"col-md-9 ml-sm-auto col-lg-10 px-md-4 overflow-y-scroll mb-0"},qO={class:"messageCentre text-body position-fixed d-flex"};function ZO(t,e,n,i,s,r){const o=Ee("Navbar"),a=Ee("RouterView"),l=Ee("Message");return R(),V("div",{class:"container-fluid flex-grow-1 main","data-bs-theme":this.dashboardConfigurationStore.Configuration.Server.dashboard_theme},[g("div",GO,[N(o),g("main",XO,[(R(),Se(p_,null,{default:De(()=>[N(a,null,{default:De(({Component:c})=>[N($t,{name:"fade2",mode:"out-in"},{default:De(()=>[(R(),Se(ma(c)))]),_:2},1024)]),_:1})]),_:1})),g("div",qO,[N(Ul,{name:"message",tag:"div",class:"position-relative flex-grow-1 d-flex align-items-end"},{default:De(()=>[(R(!0),V(Oe,null,Ze(r.getMessages.slice().reverse(),c=>(R(),Se(l,{message:c,key:c.id},null,8,["message"]))),128))]),_:1})])])])],8,UO)}const JO=je(KO,[["render",ZO],["__scopeId","data-v-a66d22c4"]]);var TC={exports:{}};(function(t,e){(function(n,i){t.exports=i()})(Xw,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($){var F=["th","st","nd","rd"],D=$%100;return"["+$+(F[(D-20)%10]||F[D]||F[0])+"]"}},x=function($,F,D){var z=String($);return!z||z.length>=F?$:""+Array(F+1-z.length).join(D)+$},E={s:x,z:function($){var F=-$.utcOffset(),D=Math.abs(F),z=Math.floor(D/60),X=D%60;return(F<=0?"+":"-")+x(z,2,"0")+":"+x(X,2,"0")},m:function $(F,D){if(F.date()1)return $(H[0])}else{var le=F.name;S[le]=F,X=le}return!z&&X&&(w=X),X||!z&&w},P=function($,F){if(A($))return $.clone();var D=typeof F=="object"?F:{};return D.date=$,D.args=arguments,new Y(D)},B=E;B.l=k,B.i=A,B.w=function($,F){return P($,{locale:F.$L,utc:F.$u,x:F.$x,$offset:F.$offset})};var Y=function(){function $(D){this.$L=k(D.locale,null,!0),this.parse(D),this.$x=this.$x||D.x||{},this[T]=!0}var F=$.prototype;return F.parse=function(D){this.$d=function(z){var X=z.date,Z=z.utc;if(X===null)return new Date(NaN);if(B.u(X))return new Date;if(X instanceof Date)return new Date(X);if(typeof X=="string"&&!/Z$/i.test(X)){var H=X.match(y);if(H){var le=H[2]-1||0,ie=(H[7]||"0").substring(0,3);return Z?new Date(Date.UTC(H[1],le,H[3]||1,H[4]||0,H[5]||0,H[6]||0,ie)):new Date(H[1],le,H[3]||1,H[4]||0,H[5]||0,H[6]||0,ie)}}return new Date(X)}(D),this.init()},F.init=function(){var D=this.$d;this.$y=D.getFullYear(),this.$M=D.getMonth(),this.$D=D.getDate(),this.$W=D.getDay(),this.$H=D.getHours(),this.$m=D.getMinutes(),this.$s=D.getSeconds(),this.$ms=D.getMilliseconds()},F.$utils=function(){return B},F.isValid=function(){return this.$d.toString()!==m},F.isSame=function(D,z){var X=P(D);return this.startOf(z)<=X&&X<=this.endOf(z)},F.isAfter=function(D,z){return P(D){if(t.status===200)return t.json();throw new Error(t.statusText)}).then(()=>{this.endTime=bi(),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?`${bi().subtract(this.startTime).millisecond()}ms`:this.refreshing?At("Pinging..."):this.errorMsg?this.errorMsg:"N/A"}}},t$={class:"card rounded-3"},n$={class:"card-body"},i$={class:"d-flex gap-3 w-100 remoteServerContainer"},s$={class:"d-flex gap-3 align-items-center flex-grow-1"},r$={class:"d-flex gap-3 align-items-center flex-grow-1"},o$={class:"d-flex gap-2 button-group"},a$={class:"card-footer gap-2 d-flex align-items-center"},l$={key:0,class:"spin ms-auto text-primary-emphasis"};function c$(t,e,n,i,s,r){return R(),V("div",t$,[g("div",n$,[g("div",i$,[g("div",s$,[e[7]||(e[7]=g("i",{class:"bi bi-server"},null,-1)),$e(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),[[We,this.server.host]])]),g("div",r$,[e[8]||(e[8]=g("i",{class:"bi bi-key-fill"},null,-1)),$e(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),[[We,this.server.apiKey]])]),g("div",o$,[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"},e[9]||(e[9]=[g("i",{class:"bi bi-trash"},null,-1)])),g("button",{onClick:e[5]||(e[5]=o=>this.connect()),class:Pe([{disabled:!this.active},"ms-auto btn btn-sm bg-success-subtle text-success-emphasis border-1 border-success-subtle"])},e[10]||(e[10]=[g("i",{class:"bi bi-arrow-right-circle"},null,-1)]),2)])])]),g("div",a$,[g("span",{class:Pe(["dot ms-0 me-2",[this.active?"active":"inactive"]])},null,2),g("small",null,we(this.getHandshakeTime),1),this.refreshing?(R(),V("div",l$,e[11]||(e[11]=[g("i",{class:"bi bi-arrow-clockwise"},null,-1)]))):(R(),V("a",{key:1,role:"button",onClick:e[6]||(e[6]=o=>this.handshake()),class:"text-primary-emphasis text-decoration-none ms-auto disabled"},e[12]||(e[12]=[g("i",{class:"bi bi-arrow-clockwise me"},null,-1)])))])])}const u$=je(e$,[["render",c$],["__scopeId","data-v-ed7817c7"]]),d$={name:"RemoteServerList",setup(){return{store:tt()}},components:{LocaleText:He,RemoteServer:u$}},h$={class:"w-100 mt-3"},f$={class:"d-flex align-items-center mb-3"},g$={class:"mb-0"},p$={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"}},m$={key:0,class:"text-muted m-auto"};function _$(t,e,n,i,s,r){const o=Ee("LocaleText"),a=Ee("RemoteServer");return R(),V("div",h$,[g("div",f$,[g("h5",g$,[N(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"},[e[1]||(e[1]=g("i",{class:"bi bi-plus-circle-fill me-2"},null,-1)),N(o,{t:"Server"})])]),g("div",p$,[(R(!0),V(Oe,null,Ze(this.store.CrossServerConfiguration.ServerList,(l,c)=>(R(),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?(R(),V("h6",m$,[N(o,{t:"Click"}),e[2]||(e[2]=g("i",{class:"bi bi-plus-circle-fill mx-1"},null,-1)),N(o,{t:"to add your server"})])):ce("",!0)])])}const y$=je(d$,[["render",_$]]),v$={name:"signInInput",methods:{GetLocale:At},props:{id:"",data:"",type:"",placeholder:""},computed:{getLocaleText(){return At(this.placeholder)}}},b$=["type","id","name","placeholder"];function w$(t,e,n,i,s,r){return $e((R(),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,b$)),[[QE,this.data[this.id]]])}const x$=je(v$,[["render",w$]]),E$={name:"signInTOTP",methods:{GetLocale:At},props:{data:""},computed:{getLocaleText(){return At("OTP from your authenticator")}}},C$=["placeholder"];function S$(t,e,n,i,s,r){return $e((R(),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,C$)),[[We,this.data.totp]])}const T$=je(E$,[["render",S$]]),A$={name:"signin",components:{SignInTOTP:T$,SignInInput:x$,LocaleText:He,RemoteServerList:y$,Message:SC},async setup(){const t=tt();let e="dark",n=!1,i;return t.IsElectronApp||await Promise.all([Yt("/api/getDashboardTheme",{},s=>{e=s.data}),Yt("/api/isTotpEnabled",{},s=>{n=s.data}),Yt("/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 At(t)}},methods:{GetLocale:At,async auth(){this.data.username&&this.data.password&&(this.totpEnabled&&this.data.totp||!this.totpEnabled)?(this.loading=!0,await xt("/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"))})}}},k$=["data-bs-theme"],M$={class:"login-box m-auto"},P$={class:"m-auto",style:{width:"700px"}},I$={class:"mb-0 text-body"},D$={key:0,class:"alert alert-danger mt-2 mb-0",role:"alert"},R$={class:"form-group text-body"},L$={class:"form-group text-body"},O$={key:0,class:"form-group text-body"},$$={class:"btn btn-lg btn-dark ms-auto mt-4 w-100 d-flex btn-brand signInBtn",ref:"signInBtn"},N$={key:0,class:"d-flex w-100"},F$={key:1,class:"d-flex w-100 align-items-center"},B$={key:3,class:"d-flex mt-3"},V$={class:"form-check form-switch ms-auto"},z$={class:"form-check-label",for:"flexSwitchCheckChecked"},W$={class:"text-muted pb-3 d-block w-100 text-center mt-3"},Y$={class:"messageCentre text-body position-absolute end-0 m-3"};function H$(t,e,n,i,s,r){const o=Ee("LocaleText"),a=Ee("SignInInput"),l=Ee("SignInTOTP"),c=Ee("RemoteServerList"),u=Ee("Message");return R(),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",M$,[g("div",P$,[g("h4",I$,[N(o,{t:"Welcome to"})]),e[7]||(e[7]=g("span",{class:"dashboardLogo display-3"},[g("strong",null,"WGDashboard")],-1)),s.loginError?(R(),V("div",D$,[N(o,{t:this.loginErrorMessage},null,8,["t"])])):ce("",!0),this.store.CrossServerConfiguration.Enable?(R(),Se(c,{key:2})):(R(),V("form",{key:1,onSubmit:e[0]||(e[0]=d=>{d.preventDefault(),this.auth()})},[g("div",R$,[e[2]||(e[2]=g("label",{for:"username",class:"text-left",style:{"font-size":"1rem"}},[g("i",{class:"bi bi-person-circle"})],-1)),N(a,{id:"username",data:this.data,type:"text",placeholder:"Username"},null,8,["data"])]),g("div",L$,[e[3]||(e[3]=g("label",{for:"password",class:"text-left",style:{"font-size":"1rem"}},[g("i",{class:"bi bi-key-fill"})],-1)),N(a,{id:"password",data:this.data,type:"password",placeholder:"Password"},null,8,["data"])]),i.totpEnabled?(R(),V("div",O$,[e[4]||(e[4]=g("label",{for:"totp",class:"text-left",style:{"font-size":"1rem"}},[g("i",{class:"bi bi-lock-fill"})],-1)),N(l,{data:this.data},null,8,["data"])])):ce("",!0),g("button",$$,[this.loading?(R(),V("span",F$,[N(o,{t:"Signing In..."}),e[6]||(e[6]=g("span",{class:"spinner-border ms-auto spinner-border-sm",role:"status"},null,-1))])):(R(),V("span",N$,[N(o,{t:"Sign In"}),e[5]||(e[5]=g("i",{class:"ms-auto bi bi-chevron-right"},null,-1))]))],512)],32)),this.store.IsElectronApp?ce("",!0):(R(),V("div",B$,[g("div",V$,[$e(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),[[Kn,this.store.CrossServerConfiguration.Enable]]),g("label",z$,[N(o,{t:"Access Remote Server"})])])]))])]),g("small",W$,[Ue(" WGDashboard "+we(this.version)+" | Developed with ❤️ by ",1),e[8]||(e[8]=g("a",{href:"https://github.com/donaldzou",target:"_blank"},[g("strong",null,"Donald Zou")],-1))]),g("div",Y$,[N(Ul,{name:"message",tag:"div",class:"position-relative"},{default:De(()=>[(R(!0),V(Oe,null,Ze(r.getMessages.slice().reverse(),d=>(R(),Se(u,{message:d,key:d.id},null,8,["message"]))),128))]),_:1})])],8,k$)}const j$=je(A$,[["render",H$],["__scopeId","data-v-2fa13e60"]]),K$={name:"configurationCard",components:{LocaleText:He},props:{c:{Name:String,Status:Boolean,PublicKey:String,PrivateKey:String}},data(){return{configurationToggling:!1}},setup(){return{dashboardConfigurationStore:tt()}},methods:{toggle(){this.configurationToggling=!0,Yt("/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})}}},U$={class:"card conf_card rounded-3 shadow text-decoration-none"},G$={class:"mb-0"},X$={class:"card-title mb-0"},q$={class:"card-footer d-flex gap-2 flex-column"},Z$={class:"row"},J$={class:"col-6 col-md-3"},Q$={class:"text-primary-emphasis col-6 col-md-3"},eN={class:"text-success-emphasis col-6 col-md-3"},tN={class:"text-md-end col-6 col-md-3"},nN={class:"d-flex align-items-center gap-2"},iN={class:"text-muted"},sN={style:{"word-break":"keep-all"}},rN={class:"mb-0 d-block d-lg-inline-block"},oN={style:{"line-break":"anywhere"}},aN={class:"form-check form-switch ms-auto"},lN=["for"],cN={key:4,class:"spinner-border spinner-border-sm ms-2","aria-hidden":"true"},uN=["disabled","id"];function dN(t,e,n,i,s,r){const o=Ee("RouterLink"),a=Ee("LocaleText");return R(),V("div",U$,[N(o,{to:"/configuration/"+n.c.Name+"/peers",class:"card-body d-flex align-items-center gap-3 flex-wrap text-decoration-none"},{default:De(()=>[g("h6",G$,[g("span",{class:Pe(["dot",{active:n.c.Status}])},null,2)]),g("h6",X$,[g("samp",null,we(n.c.Name),1)]),e[2]||(e[2]=g("h6",{class:"mb-0 ms-auto"},[g("i",{class:"bi bi-chevron-right"})],-1))]),_:1},8,["to"]),g("div",q$,[g("div",Z$,[g("small",J$,[e[3]||(e[3]=g("i",{class:"bi bi-arrow-down-up me-2"},null,-1)),Ue(we(n.c.DataUsage.Total>0?n.c.DataUsage.Total.toFixed(4):0)+" GB ",1)]),g("small",Q$,[e[4]||(e[4]=g("i",{class:"bi bi-arrow-down me-2"},null,-1)),Ue(we(n.c.DataUsage.Receive>0?n.c.DataUsage.Receive.toFixed(4):0)+" GB ",1)]),g("small",eN,[e[5]||(e[5]=g("i",{class:"bi bi-arrow-up me-2"},null,-1)),Ue(we(n.c.DataUsage.Sent>0?n.c.DataUsage.Sent.toFixed(4):0)+" GB ",1)]),g("small",tN,[g("span",{class:Pe(["dot me-2",{active:n.c.ConnectedPeers>0}])},null,2),Ue(" "+we(n.c.ConnectedPeers)+" / "+we(n.c.TotalPeers)+" ",1),N(a,{t:"Peers"})])]),g("div",nN,[g("small",iN,[g("strong",sN,[N(a,{t:"Public Key"})])]),g("small",rN,[g("samp",oN,we(n.c.PublicKey),1)]),g("div",aN,[g("label",{class:"form-check-label",style:{cursor:"pointer"},for:"switch"+n.c.PrivateKey},[!n.c.Status&&this.configurationToggling?(R(),Se(a,{key:0,t:"Turning Off..."})):n.c.Status&&this.configurationToggling?(R(),Se(a,{key:1,t:"Turning On..."})):n.c.Status&&!this.configurationToggling?(R(),Se(a,{key:2,t:"On"})):!n.c.Status&&!this.configurationToggling?(R(),Se(a,{key:3,t:"Off"})):ce("",!0),this.configurationToggling?(R(),V("span",cN)):ce("",!0)],8,lN),$e(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,uN),[[Kn,n.c.Status]])])])])])}const hN=je(K$,[["render",dN]]),fN={name:"configurationList",components:{LocaleText:He,ConfigurationCard:hN},async setup(){return{wireguardConfigurationsStore:qn()}},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)}},gN={class:"mt-md-5 mt-3"},pN={class:"container-md"},mN={class:"d-flex mb-4 configurationListTitle"},_N={class:"text-body d-flex"},yN={key:0},vN={key:0,class:"text-muted"},bN={key:1,class:"d-flex gap-3 flex-column mb-3"};function wN(t,e,n,i,s,r){const o=Ee("LocaleText"),a=Ee("RouterLink"),l=Ee("ConfigurationCard");return R(),V("div",gN,[g("div",pN,[g("div",mN,[g("h3",_N,[e[0]||(e[0]=g("i",{class:"bi bi-body-text me-2"},null,-1)),g("span",null,[N(o,{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:De(()=>[e[1]||(e[1]=g("i",{class:"bi bi-plus-circle-fill me-2"},null,-1)),N(o,{t:"Configuration"})]),_:1})]),N($t,{name:"fade",mode:"out-in"},{default:De(()=>[this.configurationLoaded?(R(),V("div",yN,[this.wireguardConfigurationsStore.Configurations.length===0?(R(),V("p",vN,[N(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."})])):(R(),V("div",bN,[(R(!0),V(Oe,null,Ze(this.wireguardConfigurationsStore.Configurations,c=>(R(),Se(l,{key:c.Name,c},null,8,["c"]))),128))]))])):ce("",!0)]),_:1})])])}const xN=je(fN,[["render",wN],["__scopeId","data-v-106e7dee"]]);let Ed;const EN=new Uint8Array(16);function CN(){if(!Ed&&(Ed=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!Ed))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Ed(EN)}const Ln=[];for(let t=0;t<256;++t)Ln.push((t+256).toString(16).slice(1));function SN(t,e=0){return Ln[t[e+0]]+Ln[t[e+1]]+Ln[t[e+2]]+Ln[t[e+3]]+"-"+Ln[t[e+4]]+Ln[t[e+5]]+"-"+Ln[t[e+6]]+Ln[t[e+7]]+"-"+Ln[t[e+8]]+Ln[t[e+9]]+"-"+Ln[t[e+10]]+Ln[t[e+11]]+Ln[t[e+12]]+Ln[t[e+13]]+Ln[t[e+14]]+Ln[t[e+15]]}const TN=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),J0={randomUUID:TN};function Bs(t,e,n){if(J0.randomUUID&&!e&&!t)return J0.randomUUID();t=t||{};const i=t.random||(t.rng||CN)();return i[6]=i[6]&15|64,i[8]=i[8]&63|128,SN(i)}const AN={components:{LocaleText:He},props:{targetData:String,title:String,warning:!1,warningText:""},setup(){const t=tt(),e=`input_${Bs()}`;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 xt("/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})}}},kN={class:"form-group mb-2"},MN=["for"],PN=["id","disabled"],IN={class:"invalid-feedback"},DN={key:0,class:"px-2 py-1 text-warning-emphasis bg-warning-subtle border border-warning-subtle rounded-2 d-inline-block mt-1"};function RN(t,e,n,i,s,r){const o=Ee("LocaleText");return R(),V("div",kN,[g("label",{for:this.uuid,class:"text-muted mb-1"},[g("strong",null,[g("small",null,[N(o,{t:this.title},null,8,["t"])])])],8,MN),$e(g("input",{type:"text",class:Pe(["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,PN),[[We,this.value]]),g("div",IN,we(this.invalidFeedback),1),n.warning?(R(),V("div",DN,[g("small",null,[e[3]||(e[3]=g("i",{class:"bi bi-exclamation-triangle-fill me-2"},null,-1)),N(o,{t:n.warningText},null,8,["t"])])])):ce("",!0)])}const LN=je(AN,[["render",RN]]),ON=t=>{},$N={name:"accountSettingsInputUsername",components:{LocaleText:He},props:{targetData:String,title:String},setup(){const t=tt(),e=`input_${Bs()}`;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(t){this.changed&&(this.updating=!0,await xt("/api/updateDashboardConfigurationItem",{section:"Account",key:this.targetData,value:this.value},e=>{e.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=e.message),this.changed=!1,this.updating=!1}))}}},NN={class:"form-group mb-2"},FN=["for"],BN=["id","disabled"],VN={class:"invalid-feedback"};function zN(t,e,n,i,s,r){const o=Ee("LocaleText");return R(),V("div",NN,[g("label",{for:this.uuid,class:"text-muted mb-1"},[g("strong",null,[g("small",null,[N(o,{t:this.title},null,8,["t"])])])],8,FN),$e(g("input",{type:"text",class:Pe(["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,BN),[[We,this.value]]),g("div",VN,we(this.invalidFeedback),1)])}const WN=je($N,[["render",zN]]),YN={name:"accountSettingsInputPassword",components:{LocaleText:He},props:{targetData:String,warning:!1,warningText:""},setup(){const t=tt(),e=`input_${Bs()}`;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 xt("/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}}},HN={class:"d-flex flex-column"},jN={class:"row"},KN={class:"col-sm"},UN={class:"form-group mb-2"},GN=["for"],XN=["id"],qN={key:0,class:"invalid-feedback d-block"},ZN={class:"col-sm"},JN={class:"form-group mb-2"},QN=["for"],e3=["id"],t3={class:"col-sm"},n3={class:"form-group mb-2"},i3=["for"],s3=["id"],r3=["disabled"];function o3(t,e,n,i,s,r){const o=Ee("LocaleText");return R(),V("div",HN,[g("div",jN,[g("div",KN,[g("div",UN,[g("label",{for:"currentPassword_"+this.uuid,class:"text-muted mb-1"},[g("strong",null,[g("small",null,[N(o,{t:"Current Password"})])])],8,GN),$e(g("input",{type:"password",class:Pe(["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,XN),[[We,this.value.currentPassword]]),s.showInvalidFeedback?(R(),V("div",qN,we(this.invalidFeedback),1)):ce("",!0)])]),g("div",ZN,[g("div",JN,[g("label",{for:"newPassword_"+this.uuid,class:"text-muted mb-1"},[g("strong",null,[g("small",null,[N(o,{t:"New Password"})])])],8,QN),$e(g("input",{type:"password",class:Pe(["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,e3),[[We,this.value.newPassword]])])]),g("div",t3,[g("div",n3,[g("label",{for:"repeatNewPassword_"+this.uuid,class:"text-muted mb-1"},[g("strong",null,[g("small",null,[N(o,{t:"Repeat New Password"})])])],8,i3),$e(g("input",{type:"password",class:Pe(["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,s3),[[We,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())},[e[4]||(e[4]=g("i",{class:"bi bi-save2-fill me-2"},null,-1)),N(o,{t:"Update Password"})],8,r3)])}const a3=je(YN,[["render",o3]]),l3={name:"dashboardSettingsInputWireguardConfigurationPath",components:{LocaleText:He},props:{targetData:String,title:String,warning:!1,warningText:""},setup(){const t=tt(),e=qn(),n=`input_${Bs()}`;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 xt("/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}))}}},c3={class:"form-group"},u3=["for"],d3={class:"d-flex gap-2 align-items-start"},h3={class:"flex-grow-1"},f3=["id","disabled"],g3={class:"invalid-feedback fw-bold"},p3=["disabled"],m3={key:0,class:"bi bi-save2-fill"},_3={key:1,class:"spinner-border spinner-border-sm"},y3={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"};function v3(t,e,n,i,s,r){const o=Ee("LocaleText");return R(),V("div",c3,[g("label",{for:this.uuid,class:"text-muted mb-1"},[g("strong",null,[g("small",null,[N(o,{t:this.title},null,8,["t"])])])],8,u3),g("div",d3,[g("div",h3,[$e(g("input",{type:"text",class:Pe(["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,f3),[[We,this.value]]),g("div",g3,we(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?(R(),V("span",_3)):(R(),V("i",m3))],8,p3)]),n.warning?(R(),V("div",y3,[g("small",null,[e[3]||(e[3]=g("i",{class:"bi bi-exclamation-triangle-fill me-2"},null,-1)),N(o,{t:n.warningText},null,8,["t"])])])):ce("",!0)])}const b3=je(l3,[["render",v3]]),w3={name:"dashboardTheme",components:{LocaleText:He},setup(){return{dashboardConfigurationStore:tt()}},methods:{async switchTheme(t){await xt("/api/updateDashboardConfigurationItem",{section:"Server",key:"dashboard_theme",value:t},e=>{e.status&&(this.dashboardConfigurationStore.Configuration.Server.dashboard_theme=t)})}}},x3={class:"card mb-4 shadow rounded-3"},E3={class:"card-header"},C3={class:"card-body d-flex gap-2"};function S3(t,e,n,i,s,r){const o=Ee("LocaleText");return R(),V("div",x3,[g("p",E3,[N(o,{t:"Dashboard Theme"})]),g("div",C3,[g("button",{class:Pe(["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"))},[e[2]||(e[2]=g("i",{class:"bi bi-sun-fill me-2"},null,-1)),N(o,{t:"Light"})],2),g("button",{class:Pe(["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"))},[e[3]||(e[3]=g("i",{class:"bi bi-moon-fill me-2"},null,-1)),N(o,{t:"Dark"})],2)])])}const T3=je(w3,[["render",S3]]),A3={name:"dashboardSettingsInputIPAddressAndPort",props:{},setup(){const t=tt(),e=`input_${Bs()}`;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 xt("/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)})}}},k3={class:"invalid-feedback d-block mt-0"},M3={class:"row"},P3={class:"form-group mb-2 col-sm"},I3=["for"],D3=["id"],R3={class:"form-group col-sm"},L3=["for"],O3=["id"];function $3(t,e,n,i,s,r){return R(),V("div",null,[g("div",k3,we(this.invalidFeedback),1),g("div",M3,[g("div",P3,[g("label",{for:"app_ip_"+this.uuid,class:"text-muted mb-1"},e[2]||(e[2]=[g("strong",null,[g("small",null,"Dashboard IP Address")],-1)]),8,I3),$e(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,D3),[[We,this.app_ip]]),e[3]||(e[3]=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"),Ue(" means it can be access by anyone with your server IP Address.")])],-1))]),g("div",R3,[g("label",{for:"app_port_"+this.uuid,class:"text-muted mb-1"},e[4]||(e[4]=[g("strong",null,[g("small",null,"Dashboard Port")],-1)]),8,L3),$e(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,O3),[[We,this.app_port]])])]),e[5]||(e[5]=g("button",{class:"btn btn-success btn-sm fw-bold rounded-3"},[g("i",{class:"bi bi-floppy-fill me-2"}),Ue("Update Dashboard Settings & Restart ")],-1))])}const N3=je(A3,[["render",$3]]);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 _t(t,e){return t instanceof Date?new t.constructor(e):new Date(e)}function ss(t,e){const n=Ve(t);return isNaN(e)?_t(t,NaN):(e&&n.setDate(n.getDate()+e),n)}function ds(t,e){const n=Ve(t);if(isNaN(e))return _t(t,NaN);if(!e)return n;const i=n.getDate(),s=_t(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 AC(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?ds(c,i+n*12):c,d=r||s?ss(u,r+s*7):u,h=a+o*60,p=(l+h*60)*1e3;return _t(t,d.getTime()+p)}function F3(t,e){const n=+Ve(t);return _t(t,n+e)}const kC=6048e5,B3=864e5,V3=6e4,MC=36e5,z3=1e3;function W3(t,e){return F3(t,e*MC)}let Y3={};function ya(){return Y3}function ps(t,e){const n=ya(),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 Q0(t){const e=Ve(t);return e.setHours(0,0,0,0),e}function wh(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 IC(t,e){const n=Q0(t),i=Q0(e),s=+n-wh(n),r=+i-wh(i);return Math.round((s-r)/B3)}function H3(t){const e=PC(t),n=_t(t,0);return n.setFullYear(e,0,4),n.setHours(0,0,0,0),Cl(n)}function j3(t,e){const n=e*3;return ds(t,n)}function w_(t,e){return ds(t,e*12)}function eb(t,e){const n=Ve(t),i=Ve(e),s=n.getTime()-i.getTime();return s<0?-1:s>0?1:s}function DC(t){return t instanceof Date||typeof t=="object"&&Object.prototype.toString.call(t)==="[object Date]"}function Hc(t){if(!DC(t)&&typeof t!="number")return!1;const e=Ve(t);return!isNaN(Number(e))}function tb(t){const e=Ve(t);return Math.trunc(e.getMonth()/3)+1}function K3(t,e){const n=Ve(t),i=Ve(e);return n.getFullYear()-i.getFullYear()}function U3(t,e){const n=Ve(t),i=Ve(e),s=eb(n,i),r=Math.abs(K3(n,i));n.setFullYear(1584),i.setFullYear(1584);const o=eb(n,i)===-s,a=s*(r-+o);return a===0?0:a}function RC(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=1;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 Uo(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 G3(t,e){const n=Ve(t.start),i=Ve(t.end);let s=+n>+i;const r=s?+Uo(n):+Uo(i);let o=Uo(s?i:n),a=1;const l=[];for(;+o<=r;)l.push(Ve(o)),o=j3(o,a);return s?l.reverse():l}function X3(t){const e=Ve(t);return e.setDate(1),e.setHours(0,0,0,0),e}function LC(t){const e=Ve(t),n=e.getFullYear();return e.setFullYear(n+1,0,0),e.setHours(23,59,59,999),e}function lu(t){const e=Ve(t),n=_t(t,0);return n.setFullYear(e.getFullYear(),0,1),n.setHours(0,0,0,0),n}function OC(t,e){const n=ya(),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=q3[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 Ig(t){return(e={})=>{const n=e.width?String(e.width):t.defaultWidth;return t.formats[n]||t.formats[t.defaultWidth]}}const J3={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},Q3={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},eF={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},tF={date:Ig({formats:J3,defaultWidth:"full"}),time:Ig({formats:Q3,defaultWidth:"full"}),dateTime:Ig({formats:eF,defaultWidth:"full"})},nF={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},iF=(t,e,n,i)=>nF[t];function cc(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 sF={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},rF={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},oF={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"]},aF={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"]},lF={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"}},cF={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"}},uF=(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"},dF={ordinalNumber:uF,era:cc({values:sF,defaultWidth:"wide"}),quarter:cc({values:rF,defaultWidth:"wide",argumentCallback:t=>t-1}),month:cc({values:oF,defaultWidth:"wide"}),day:cc({values:aF,defaultWidth:"wide"}),dayPeriod:cc({values:lF,defaultWidth:"wide",formattingValues:cF,defaultFormattingWidth:"wide"})};function uc(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)?fF(a,d=>d.test(o)):hF(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 hF(t,e){for(const n in t)if(Object.prototype.hasOwnProperty.call(t,n)&&e(t[n]))return n}function fF(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 pF=/^(\d+)(th|st|nd|rd)?/i,mF=/\d+/i,_F={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},yF={any:[/^b/i,/^(a|c)/i]},vF={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},bF={any:[/1/i,/2/i,/3/i,/4/i]},wF={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},xF={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]},EF={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},CF={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]},SF={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},TF={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}},AF={ordinalNumber:gF({matchPattern:pF,parsePattern:mF,valueCallback:t=>parseInt(t,10)}),era:uc({matchPatterns:_F,defaultMatchWidth:"wide",parsePatterns:yF,defaultParseWidth:"any"}),quarter:uc({matchPatterns:vF,defaultMatchWidth:"wide",parsePatterns:bF,defaultParseWidth:"any",valueCallback:t=>t+1}),month:uc({matchPatterns:wF,defaultMatchWidth:"wide",parsePatterns:xF,defaultParseWidth:"any"}),day:uc({matchPatterns:EF,defaultMatchWidth:"wide",parsePatterns:CF,defaultParseWidth:"any"}),dayPeriod:uc({matchPatterns:SF,defaultMatchWidth:"any",parsePatterns:TF,defaultParseWidth:"any"})},$C={code:"en-US",formatDistance:Z3,formatLong:tF,formatRelative:iF,localize:dF,match:AF,options:{weekStartsOn:0,firstWeekContainsDate:1}};function kF(t){const e=Ve(t);return IC(e,lu(e))+1}function x_(t){const e=Ve(t),n=+Cl(e)-+H3(e);return Math.round(n/kC)+1}function E_(t,e){const n=Ve(t),i=n.getFullYear(),s=ya(),r=e?.firstWeekContainsDate??e?.locale?.options?.firstWeekContainsDate??s.firstWeekContainsDate??s.locale?.options?.firstWeekContainsDate??1,o=_t(t,0);o.setFullYear(i+1,0,r),o.setHours(0,0,0,0);const a=ps(o,e),l=_t(t,0);l.setFullYear(i,0,r),l.setHours(0,0,0,0);const c=ps(l,e);return n.getTime()>=a.getTime()?i+1:n.getTime()>=c.getTime()?i:i-1}function MF(t,e){const n=ya(),i=e?.firstWeekContainsDate??e?.locale?.options?.firstWeekContainsDate??n.firstWeekContainsDate??n.locale?.options?.firstWeekContainsDate??1,s=E_(t,e),r=_t(t,0);return r.setFullYear(s,0,i),r.setHours(0,0,0,0),ps(r,e)}function C_(t,e){const n=Ve(t),i=+ps(n,e)-+MF(n,e);return Math.round(i/kC)+1}function Ct(t,e){const n=t<0?"-":"",i=Math.abs(t).toString().padStart(e,"0");return n+i}const Mr={y(t,e){const n=t.getFullYear(),i=n>0?n:1-n;return Ct(e==="yy"?i%100:i,e.length)},M(t,e){const n=t.getMonth();return e==="M"?String(n+1):Ct(n+1,2)},d(t,e){return Ct(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 Ct(t.getHours()%12||12,e.length)},H(t,e){return Ct(t.getHours(),e.length)},m(t,e){return Ct(t.getMinutes(),e.length)},s(t,e){return Ct(t.getSeconds(),e.length)},S(t,e){const n=e.length,i=t.getMilliseconds(),s=Math.trunc(i*Math.pow(10,n-3));return Ct(s,e.length)}},Ra={am:"am",pm:"pm",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},ib={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 Mr.y(t,e)},Y:function(t,e,n,i){const s=E_(t,i),r=s>0?s:1-s;if(e==="YY"){const o=r%100;return Ct(o,2)}return e==="Yo"?n.ordinalNumber(r,{unit:"year"}):Ct(r,e.length)},R:function(t,e){const n=PC(t);return Ct(n,e.length)},u:function(t,e){const n=t.getFullYear();return Ct(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 Ct(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 Ct(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 Mr.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 Ct(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=C_(t,i);return e==="wo"?n.ordinalNumber(s,{unit:"week"}):Ct(s,e.length)},I:function(t,e,n){const i=x_(t);return e==="Io"?n.ordinalNumber(i,{unit:"week"}):Ct(i,e.length)},d:function(t,e,n){return e==="do"?n.ordinalNumber(t.getDate(),{unit:"date"}):Mr.d(t,e)},D:function(t,e,n){const i=kF(t);return e==="Do"?n.ordinalNumber(i,{unit:"dayOfYear"}):Ct(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 Ct(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 Ct(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 Ct(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=Ra.noon:i===0?s=Ra.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=Ra.evening:i>=12?s=Ra.afternoon:i>=4?s=Ra.morning:s=Ra.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 Mr.h(t,e)},H:function(t,e,n){return e==="Ho"?n.ordinalNumber(t.getHours(),{unit:"hour"}):Mr.H(t,e)},K:function(t,e,n){const i=t.getHours()%12;return e==="Ko"?n.ordinalNumber(i,{unit:"hour"}):Ct(i,e.length)},k:function(t,e,n){let i=t.getHours();return i===0&&(i=24),e==="ko"?n.ordinalNumber(i,{unit:"hour"}):Ct(i,e.length)},m:function(t,e,n){return e==="mo"?n.ordinalNumber(t.getMinutes(),{unit:"minute"}):Mr.m(t,e)},s:function(t,e,n){return e==="so"?n.ordinalNumber(t.getSeconds(),{unit:"second"}):Mr.s(t,e)},S:function(t,e){return Mr.S(t,e)},X:function(t,e,n){const i=t.getTimezoneOffset();if(i===0)return"Z";switch(e){case"X":return rb(i);case"XXXX":case"XX":return zo(i);case"XXXXX":case"XXX":default:return zo(i,":")}},x:function(t,e,n){const i=t.getTimezoneOffset();switch(e){case"x":return rb(i);case"xxxx":case"xx":return zo(i);case"xxxxx":case"xxx":default:return zo(i,":")}},O:function(t,e,n){const i=t.getTimezoneOffset();switch(e){case"O":case"OO":case"OOO":return"GMT"+sb(i,":");case"OOOO":default:return"GMT"+zo(i,":")}},z:function(t,e,n){const i=t.getTimezoneOffset();switch(e){case"z":case"zz":case"zzz":return"GMT"+sb(i,":");case"zzzz":default:return"GMT"+zo(i,":")}},t:function(t,e,n){const i=Math.trunc(t.getTime()/1e3);return Ct(i,e.length)},T:function(t,e,n){const i=t.getTime();return Ct(i,e.length)}};function sb(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+Ct(r,2)}function rb(t,e){return t%60===0?(t>0?"-":"+")+Ct(Math.abs(t)/60,2):zo(t,e)}function zo(t,e=""){const n=t>0?"-":"+",i=Math.abs(t),s=Ct(Math.trunc(i/60),2),r=Ct(i%60,2);return n+s+e+r}const ob=(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"})}},NC=(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"})}},PF=(t,e)=>{const n=t.match(/(P+)(p+)?/)||[],i=n[1],s=n[2];if(!s)return ob(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}}",ob(i,e)).replace("{{time}}",NC(s,e))},qp={p:NC,P:PF},IF=/^D+$/,DF=/^Y+$/,RF=["D","DD","YY","YYYY"];function FC(t){return IF.test(t)}function BC(t){return DF.test(t)}function Zp(t,e,n){const i=LF(t,e,n);if(console.warn(i),RF.includes(t))throw new RangeError(i)}function LF(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 OF=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,$F=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,NF=/^'([^]*?)'?$/,FF=/''/g,BF=/[a-zA-Z]/;function Os(t,e,n){const i=ya(),s=n?.locale??i.locale??$C,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(!Hc(a))throw new RangeError("Invalid time value");let l=e.match($F).map(u=>{const d=u[0];if(d==="p"||d==="P"){const h=qp[d];return h(u,s.formatLong)}return u}).join("").match(OF).map(u=>{if(u==="''")return{isToken:!1,value:"'"};const d=u[0];if(d==="'")return{isToken:!1,value:VF(u)};if(ib[d])return{isToken:!0,value:u};if(d.match(BF))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&&BC(d)||!n?.useAdditionalDayOfYearTokens&&FC(d))&&Zp(d,e,String(t));const h=ib[d[0]];return h(a,d,s.localize,c)}).join("")}function VF(t){const e=t.match(NF);return e?e[1].replace(FF,"'"):t}function zF(t){return Ve(t).getDay()}function WF(t){const e=Ve(t),n=e.getFullYear(),i=e.getMonth(),s=_t(t,0);return s.setFullYear(n,i+1,0),s.setHours(0,0,0,0),s.getDate()}function YF(){return Object.assign({},ya())}function yr(t){return Ve(t).getHours()}function HF(t){let n=Ve(t).getDay();return n===0&&(n=7),n}function ao(t){return Ve(t).getMinutes()}function at(t){return Ve(t).getMonth()}function Sl(t){return Ve(t).getSeconds()}function Xe(t){return Ve(t).getFullYear()}function Tl(t,e){const n=Ve(t),i=Ve(e);return n.getTime()>i.getTime()}function cu(t,e){const n=Ve(t),i=Ve(e);return+n<+i}function el(t,e){const n=Ve(t),i=Ve(e);return+n==+i}function jF(t,e){const n=e instanceof Date?_t(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 KF=10;class VC{subPriority=0;validate(e,n){return!0}}class UF extends VC{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 GF extends VC{priority=KF;subPriority=-1;set(e,n){return n.timestampIsSet?e:_t(e,jF(e,Date))}}class vt{run(e,n,i,s){const r=this.parse(e,n,i,s);return r?{setter:new UF(r.value,this.validate,this.set,this.priority,this.subPriority),rest:r.rest}:null}validate(e,n,i){return!0}}class XF extends vt{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 an={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}/},Cs={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 ln(t,e){return t&&{value:e(t.value),rest:t.rest}}function Xt(t,e){const n=e.match(t);return n?{value:parseInt(n[0],10),rest:e.slice(n[0].length)}:null}function Ss(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*MC+r*V3+o*z3),rest:e.slice(n[0].length)}}function zC(t){return Xt(an.anyDigitsSigned,t)}function sn(t,e){switch(t){case 1:return Xt(an.singleDigit,e);case 2:return Xt(an.twoDigits,e);case 3:return Xt(an.threeDigits,e);case 4:return Xt(an.fourDigits,e);default:return Xt(new RegExp("^\\d{1,"+t+"}"),e)}}function xh(t,e){switch(t){case 1:return Xt(an.singleDigitSigned,e);case 2:return Xt(an.twoDigitsSigned,e);case 3:return Xt(an.threeDigitsSigned,e);case 4:return Xt(an.fourDigitsSigned,e);default:return Xt(new RegExp("^-?\\d{1,"+t+"}"),e)}}function S_(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 WC(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 YC(t){return t%400===0||t%4===0&&t%100!==0}class qF extends vt{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 ln(sn(4,e),s);case"yo":return ln(i.ordinalNumber(e,{unit:"year"}),s);default:return ln(sn(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=WC(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 ZF extends vt{priority=130;parse(e,n,i){const s=r=>({year:r,isTwoDigitYear:n==="YY"});switch(n){case"Y":return ln(sn(4,e),s);case"Yo":return ln(i.ordinalNumber(e,{unit:"year"}),s);default:return ln(sn(n.length,e),s)}}validate(e,n){return n.isTwoDigitYear||n.year>0}set(e,n,i,s){const r=E_(e,s);if(i.isTwoDigitYear){const a=WC(i.year,r);return e.setFullYear(a,0,s.firstWeekContainsDate),e.setHours(0,0,0,0),ps(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),ps(e,s)}incompatibleTokens=["y","R","u","Q","q","M","L","I","d","D","i","t","T"]}class JF extends vt{priority=130;parse(e,n){return xh(n==="R"?4:n.length,e)}set(e,n,i){const s=_t(e,0);return s.setFullYear(i,0,4),s.setHours(0,0,0,0),Cl(s)}incompatibleTokens=["G","y","Y","u","Q","q","M","L","w","d","D","e","c","t","T"]}class QF extends vt{priority=130;parse(e,n){return xh(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 e5 extends vt{priority=120;parse(e,n,i){switch(n){case"Q":case"QQ":return sn(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 t5 extends vt{priority=120;parse(e,n,i){switch(n){case"q":case"qq":return sn(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 n5 extends vt{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 ln(Xt(an.month,e),s);case"MM":return ln(sn(2,e),s);case"Mo":return ln(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 i5 extends vt{priority=110;parse(e,n,i){const s=r=>r-1;switch(n){case"L":return ln(Xt(an.month,e),s);case"LL":return ln(sn(2,e),s);case"Lo":return ln(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 s5(t,e,n){const i=Ve(t),s=C_(i,n)-e;return i.setDate(i.getDate()-s*7),i}class r5 extends vt{priority=100;parse(e,n,i){switch(n){case"w":return Xt(an.week,e);case"wo":return i.ordinalNumber(e,{unit:"week"});default:return sn(n.length,e)}}validate(e,n){return n>=1&&n<=53}set(e,n,i,s){return ps(s5(e,i,s),s)}incompatibleTokens=["y","R","u","q","Q","M","L","I","d","D","i","t","T"]}function o5(t,e){const n=Ve(t),i=x_(n)-e;return n.setDate(n.getDate()-i*7),n}class a5 extends vt{priority=100;parse(e,n,i){switch(n){case"I":return Xt(an.week,e);case"Io":return i.ordinalNumber(e,{unit:"week"});default:return sn(n.length,e)}}validate(e,n){return n>=1&&n<=53}set(e,n,i){return Cl(o5(e,i))}incompatibleTokens=["y","Y","u","q","Q","M","L","w","d","D","e","c","t","T"]}const l5=[31,28,31,30,31,30,31,31,30,31,30,31],c5=[31,29,31,30,31,30,31,31,30,31,30,31];class u5 extends vt{priority=90;subPriority=1;parse(e,n,i){switch(n){case"d":return Xt(an.date,e);case"do":return i.ordinalNumber(e,{unit:"date"});default:return sn(n.length,e)}}validate(e,n){const i=e.getFullYear(),s=YC(i),r=e.getMonth();return s?n>=1&&n<=c5[r]:n>=1&&n<=l5[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 d5 extends vt{priority=90;subpriority=1;parse(e,n,i){switch(n){case"D":case"DD":return Xt(an.dayOfYear,e);case"Do":return i.ordinalNumber(e,{unit:"date"});default:return sn(n.length,e)}}validate(e,n){const i=e.getFullYear();return YC(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 T_(t,e,n){const i=ya(),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 h5 extends vt{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=T_(e,i,s),e.setHours(0,0,0,0),e}incompatibleTokens=["D","i","e","c","t","T"]}class f5 extends vt{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 ln(sn(n.length,e),r);case"eo":return ln(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=T_(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 g5 extends vt{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 ln(sn(n.length,e),r);case"co":return ln(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=T_(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 p5(t,e){const n=Ve(t),i=HF(n),s=e-i;return ss(n,s)}class m5 extends vt{priority=90;parse(e,n,i){const s=r=>r===0?7:r;switch(n){case"i":case"ii":return sn(n.length,e);case"io":return i.ordinalNumber(e,{unit:"day"});case"iii":return ln(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 ln(i.day(e,{width:"narrow",context:"formatting"}),s);case"iiiiii":return ln(i.day(e,{width:"short",context:"formatting"})||i.day(e,{width:"narrow",context:"formatting"}),s);case"iiii":default:return ln(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=p5(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 _5 extends vt{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(S_(i),0,0,0),e}incompatibleTokens=["b","B","H","k","t","T"]}class y5 extends vt{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(S_(i),0,0,0),e}incompatibleTokens=["a","B","H","k","t","T"]}class v5 extends vt{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(S_(i),0,0,0),e}incompatibleTokens=["a","b","t","T"]}class b5 extends vt{priority=70;parse(e,n,i){switch(n){case"h":return Xt(an.hour12h,e);case"ho":return i.ordinalNumber(e,{unit:"hour"});default:return sn(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 w5 extends vt{priority=70;parse(e,n,i){switch(n){case"H":return Xt(an.hour23h,e);case"Ho":return i.ordinalNumber(e,{unit:"hour"});default:return sn(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 x5 extends vt{priority=70;parse(e,n,i){switch(n){case"K":return Xt(an.hour11h,e);case"Ko":return i.ordinalNumber(e,{unit:"hour"});default:return sn(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 E5 extends vt{priority=70;parse(e,n,i){switch(n){case"k":return Xt(an.hour24h,e);case"ko":return i.ordinalNumber(e,{unit:"hour"});default:return sn(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 C5 extends vt{priority=60;parse(e,n,i){switch(n){case"m":return Xt(an.minute,e);case"mo":return i.ordinalNumber(e,{unit:"minute"});default:return sn(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 S5 extends vt{priority=50;parse(e,n,i){switch(n){case"s":return Xt(an.second,e);case"so":return i.ordinalNumber(e,{unit:"second"});default:return sn(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 T5 extends vt{priority=30;parse(e,n){const i=s=>Math.trunc(s*Math.pow(10,-n.length+3));return ln(sn(n.length,e),i)}set(e,n,i){return e.setMilliseconds(i),e}incompatibleTokens=["t","T"]}class A5 extends vt{priority=10;parse(e,n){switch(n){case"X":return Ss(Cs.basicOptionalMinutes,e);case"XX":return Ss(Cs.basic,e);case"XXXX":return Ss(Cs.basicOptionalSeconds,e);case"XXXXX":return Ss(Cs.extendedOptionalSeconds,e);case"XXX":default:return Ss(Cs.extended,e)}}set(e,n,i){return n.timestampIsSet?e:_t(e,e.getTime()-wh(e)-i)}incompatibleTokens=["t","T","x"]}class k5 extends vt{priority=10;parse(e,n){switch(n){case"x":return Ss(Cs.basicOptionalMinutes,e);case"xx":return Ss(Cs.basic,e);case"xxxx":return Ss(Cs.basicOptionalSeconds,e);case"xxxxx":return Ss(Cs.extendedOptionalSeconds,e);case"xxx":default:return Ss(Cs.extended,e)}}set(e,n,i){return n.timestampIsSet?e:_t(e,e.getTime()-wh(e)-i)}incompatibleTokens=["t","T","X"]}class M5 extends vt{priority=40;parse(e){return zC(e)}set(e,n,i){return[_t(e,i*1e3),{timestampIsSet:!0}]}incompatibleTokens="*"}class P5 extends vt{priority=20;parse(e){return zC(e)}set(e,n,i){return[_t(e,i),{timestampIsSet:!0}]}incompatibleTokens="*"}const I5={G:new XF,y:new qF,Y:new ZF,R:new JF,u:new QF,Q:new e5,q:new t5,M:new n5,L:new i5,w:new r5,I:new a5,d:new u5,D:new d5,E:new h5,e:new f5,c:new g5,i:new m5,a:new _5,b:new y5,B:new v5,h:new b5,H:new w5,K:new x5,k:new E5,m:new C5,s:new S5,S:new T5,X:new A5,x:new k5,t:new M5,T:new P5},D5=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,R5=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,L5=/^'([^]*?)'?$/,O5=/''/g,$5=/\S/,N5=/[a-zA-Z]/;function Jp(t,e,n,i){const s=YF(),r=i?.locale??s.locale??$C,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):_t(n,NaN);const l={firstWeekContainsDate:o,weekStartsOn:a,locale:r},c=[new GF],u=e.match(R5).map(m=>{const y=m[0];if(y in qp){const v=qp[y];return v(m,r.formatLong)}return m}).join("").match(D5),d=[];for(let m of u){!i?.useAdditionalWeekYearTokens&&BC(m)&&Zp(m,e,t),!i?.useAdditionalDayOfYearTokens&&FC(m)&&Zp(m,e,t);const y=m[0],v=I5[y];if(v){const{incompatibleTokens:b}=v;if(Array.isArray(b)){const E=d.find(w=>b.includes(w.token)||w.token===y);if(E)throw new RangeError(`The format string mustn't contain \`${E.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 x=v.run(t,m,r.match,l);if(!x)return _t(n,NaN);c.push(x.setter),t=x.rest}else{if(y.match(N5))throw new RangeError("Format string contains an unescaped latin alphabet character `"+y+"`");if(m==="''"?m="'":y==="'"&&(m=F5(m)),t.indexOf(m)===0)t=t.slice(m.length);else return _t(n,NaN)}}if(t.length>0&&$5.test(t))return _t(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 _t(n,NaN);const p={};for(const m of h){if(!m.validate(f,l))return _t(n,NaN);const y=m.set(f,p,l);Array.isArray(y)?(f=y[0],Object.assign(p,y[1])):f=y}return _t(n,f)}function F5(t){return t.match(L5)[1].replace(O5,"'")}function ab(t,e){const n=Uo(t),i=Uo(e);return+n==+i}function B5(t,e){return ss(t,-e)}function HC(t,e){const n=Ve(t),i=n.getFullYear(),s=n.getDate(),r=_t(t,0);r.setFullYear(i,e,15),r.setHours(0,0,0,0);const o=WF(r);return n.setMonth(e,Math.min(s,o)),n}function Pt(t,e){let n=Ve(t);return isNaN(+n)?_t(t,NaN):(e.year!=null&&n.setFullYear(e.year),e.month!=null&&(n=HC(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 V5(t,e){const n=Ve(t);return n.setHours(e),n}function jC(t,e){const n=Ve(t);return n.setMilliseconds(e),n}function z5(t,e){const n=Ve(t);return n.setMinutes(e),n}function KC(t,e){const n=Ve(t);return n.setSeconds(e),n}function ks(t,e){const n=Ve(t);return isNaN(+n)?_t(t,NaN):(n.setFullYear(e),n)}function Al(t,e){return ds(t,-e)}function W5(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=Al(t,i+n*12),u=B5(c,r+s*7),d=a+o*60,f=(l+d*60)*1e3;return _t(t,u.getTime()-f)}function UC(t,e){return w_(t,-e)}function Gl(){const t=AD();return R(),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"})])}Gl.compatConfig={MODE:3};function GC(){return R(),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"})])}GC.compatConfig={MODE:3};function A_(){return R(),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"})])}A_.compatConfig={MODE:3};function k_(){return R(),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"})])}k_.compatConfig={MODE:3};function M_(){return R(),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"})])}M_.compatConfig={MODE:3};function P_(){return R(),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"})])}P_.compatConfig={MODE:3};function I_(){return R(),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"})])}I_.compatConfig={MODE:3};const xi=(t,e)=>e?new Date(t.toLocaleString("en-US",{timeZone:e})):new Date(t),D_=(t,e,n)=>Qp(t,e,n)||Ce(),Y5=(t,e,n)=>{const i=e.dateInTz?xi(new Date(t),e.dateInTz):Ce(t);return n?oi(i,!0):i},Qp=(t,e,n)=>{if(!t)return null;const i=n?oi(Ce(t),!0):Ce(t);return e?e.exactMatch?Y5(t,e,n):xi(i,e.timezone):i},H5=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||{}),Wo=(t=>(t.top="top",t.bottom="bottom",t))(Wo||{}),ta=(t=>(t.header="header",t.calendar="calendar",t.timePicker="timePicker",t))(ta||{}),Yn=(t=>(t.month="month",t.year="year",t.calendar="calendar",t.time="time",t.minutes="minutes",t.hours="hours",t.seconds="seconds",t))(Yn||{});const j5=["timestamp","date","iso"];var Jn=(t=>(t.up="up",t.down="down",t.left="left",t.right="right",t))(Jn||{}),Ot=(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))(Ot||{});function lb(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 K5(t){return e=>Os(xi(new Date(`2017-01-0${e}T00:00:00+00:00`),"UTC"),"EEEEEE",{locale:t})}const U5=(t,e,n)=>{const i=[1,2,3,4,5,6,7];let s;if(t!==null)try{s=i.map(K5(t))}catch{s=i.map(lb(e))}else s=i.map(lb(e));const r=s.slice(0,n),o=s.slice(n+1,s.length);return[s[n]].concat(...o).concat(...r)},R_=(t,e,n)=>{const i=[];for(let s=+t[0];s<=+t[1];s++)i.push({value:+s,text:JC(s,e)});return n?i.reverse():i},XC=(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=Os(xi(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}})},G5=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],vn=t=>{const e=J(t);return e!=null&&e.$el?e?.$el:e},X5=t=>({type:"dot",...t??{}}),qC=t=>Array.isArray(t)?!!t[0]&&!!t[1]:!1,L_={prop:t=>`"${t}" prop must be enabled!`,dateArr:t=>`You need to use array as "model-value" binding in order to support "${t}"`},An=t=>t,cb=t=>t===0?t:!t||isNaN(+t)?null:+t,ub=t=>t===null,ZC=t=>{if(t)return[...t.querySelectorAll("input, button, select, textarea, a[href]")][0]},q5=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?+tq5(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}}})),eo=(t,e,n=!1)=>{t&&e.allowStopPropagation&&(n&&t.stopImmediatePropagation(),t.stopPropagation())},Z5=()=>["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 J5(t,e){let n=[...document.querySelectorAll(Z5())];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 em=(t,e)=>t?.querySelector(`[data-dp-element="${e}"]`),JC=(t,e)=>new Intl.NumberFormat(e,{useGrouping:!1,style:"decimal"}).format(t),O_=t=>Os(t,"dd-MM-yyyy"),Dg=t=>Array.isArray(t),Eh=(t,e)=>e.get(O_(t)),Q5=(t,e)=>t?e?e instanceof Map?!!Eh(t,e):e(Ce(t)):!1:!0,ii=(t,e,n=!1,i)=>{if(t.key===Ot.enter||t.key===Ot.space)return n&&t.preventDefault(),e();if(i)return i(t)},db=()=>["iPad Simulator","iPhone Simulator","iPod Simulator","iPad","iPhone","iPod"].some(t=>navigator.userAgent.includes(t))||navigator.userAgent.includes("Mac")&&"ontouchend"in document,hb=(t,e,n,i,s,r)=>{const o=Jp(t,e.slice(0,t.length),new Date,{locale:r});return Hc(o)&&DC(o)?i||s?o:Pt(o,{hours:+n.hours,minutes:+n?.minutes,seconds:+n?.seconds,milliseconds:0}):null},e4=(t,e,n,i,s,r)=>{const o=Array.isArray(n)?n[0]:n;if(typeof e=="string")return hb(t,e,o,i,s,r);if(Array.isArray(e)){let a=null;for(const l of e)if(a=hb(t,l,o,i,s,r),a)break;return a}return typeof e=="function"?e(t):null},Ce=t=>t?new Date(t):new Date,t4=(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()},oi=(t,e)=>{const n=Ce(JSON.parse(JSON.stringify(t))),i=Pt(n,{hours:0,minutes:0,seconds:0,milliseconds:0});return e?X3(i):i},to=(t,e,n,i)=>{let s=t?Ce(t):Ce();return(e||e===0)&&(s=V5(s,+e)),(n||n===0)&&(s=z5(s,+n)),(i||i===0)&&(s=KC(s,+i)),jC(s,0)},Qt=(t,e)=>!t||!e?!1:cu(oi(t),oi(e)),ct=(t,e)=>!t||!e?!1:el(oi(t),oi(e)),on=(t,e)=>!t||!e?!1:Tl(oi(t),oi(e)),vf=(t,e,n)=>t!=null&&t[0]&&t!=null&&t[1]?on(n,t[0])&&Qt(n,t[1]):t!=null&&t[0]&&e?on(n,t[0])&&Qt(n,e)||Qt(n,t[0])&&on(n,e):!1,rs=t=>{const e=Pt(new Date(t),{date:1});return oi(e)},Rg=(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:yr(t),minutes:ao(t),seconds:Sl(t)}),QC=(t,e)=>{if(e){const n=Xe(Ce(e));if(n>t)return 12;if(n===t)return at(Ce(e))}},eS=(t,e)=>{if(e){const n=Xe(Ce(e));return n{if(t)return Xe(Ce(t))},tS=(t,e)=>{const n=on(t,e)?e:t,i=on(e,t)?e:t;return RC({start:n,end:i})},n4=t=>{const e=ds(t,1);return{month:at(e),year:Xe(e)}},nr=(t,e)=>{const n=ps(t,{weekStartsOn:+e}),i=OC(t,{weekStartsOn:+e});return[n,i]},nS=(t,e)=>{const n={hours:yr(Ce()),minutes:ao(Ce()),seconds:e?Sl(Ce()):0};return Object.assign(n,t)},Kr=(t,e,n)=>[Pt(Ce(t),{date:1}),Pt(Ce(),{month:e,year:n,date:1})],ar=(t,e,n)=>{let i=t?Ce(t):Ce();return(e||e===0)&&(i=HC(i,e)),n&&(i=ks(i,n)),i},iS=(t,e,n,i,s)=>{if(!i||s&&!e||!s&&!n)return!1;const r=s?ds(t,1):Al(t,1),o=[at(r),Xe(r)];return s?!s4(...o,e):!i4(...o,n)},i4=(t,e,n)=>Qt(...Kr(n,t,e))||ct(...Kr(n,t,e)),s4=(t,e,n)=>on(...Kr(n,t,e))||ct(...Kr(n,t,e)),sS=(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)?`${Os(t[0],r,a)}${s&&!t[1]?"":i}${t[1]?Os(t[1],r,a):""}`:Os(t,r,a)},La=t=>{if(t)return null;throw new Error(L_.prop("partial-range"))},Cd=(t,e)=>{if(e)return t();throw new Error(L_.prop("range"))},tm=t=>Array.isArray(t)?Hc(t[0])&&(t[1]?Hc(t[1]):!0):t?Hc(t):!1,r4=(t,e)=>Pt(e??Ce(),{hours:+t.hours||0,minutes:+t.minutes||0,seconds:+t.seconds||0}),Lg=(t,e,n,i)=>{if(!t)return!0;if(i){const s=n==="max"?cu(t,e):Tl(t,e),r={seconds:0,milliseconds:0};return s||el(Pt(t,r),Pt(e,r))}return n==="max"?t.getTime()<=e.getTime():t.getTime()>=e.getTime()},Og=(t,e,n)=>t?r4(t,e):Ce(n??e),fb=(t,e,n,i,s)=>{if(Array.isArray(i)){const o=Og(t,i[0],e),a=Og(t,i[1],e);return Lg(i[0],o,n,!!e)&&Lg(i[1],a,n,!!e)&&s}const r=Og(t,i,e);return Lg(i,r,n,!!e)&&s},$g=t=>Pt(Ce(),na(t)),o4=(t,e)=>t instanceof Map?Array.from(t.values()).filter(n=>Xe(Ce(n))===e).map(n=>at(n)):[],rS=(t,e,n)=>typeof t=="function"?t({month:e,year:n}):!!t.months.find(i=>i.month===e&&i.year===n),$_=(t,e)=>typeof t=="function"?t(e):t.years.includes(e),oS=t=>Os(t,"yyyy-MM-dd"),dc=Ki({menuFocused:!1,shiftKeyInMenu:!1}),aS=()=>{const t=n=>{dc.menuFocused=n},e=n=>{dc.shiftKeyInMenu!==n&&(dc.shiftKeyInMenu=n)};return{control:be(()=>({shiftKeyInMenu:dc.shiftKeyInMenu,menuFocused:dc.menuFocused})),setMenuFocused:t,setShiftKey:e}},Lt=Ki({monthYear:[],calendar:[],time:[],actionRow:[],selectionGrid:[],timePicker:{0:[],1:[]},monthPicker:[]}),Ng=xe(null),Sd=xe(!1),Fg=xe(!1),Bg=xe(!1),Vg=xe(!1),Bn=xe(0),rn=xe(0),_o=()=>{const t=be(()=>Sd.value?[...Lt.selectionGrid,Lt.actionRow].filter(d=>d.length):Fg.value?[...Lt.timePicker[0],...Lt.timePicker[1],Vg.value?[]:[Ng.value],Lt.actionRow].filter(d=>d.length):Bg.value?[...Lt.monthPicker,Lt.actionRow]:[Lt.monthYear,...Lt.calendar,Lt.time,Lt.actionRow].filter(d=>d.length)),e=d=>{Bn.value=d?Bn.value+1:Bn.value-1;let h=null;t.value[rn.value]&&(h=t.value[rn.value][Bn.value]),!h&&t.value[rn.value+(d?1:-1)]?(rn.value=rn.value+(d?1:-1),Bn.value=d?0:t.value[rn.value].length-1):h||(Bn.value=d?Bn.value-1:Bn.value+1)},n=d=>{rn.value===0&&!d||rn.value===t.value.length&&d||(rn.value=d?rn.value+1:rn.value-1,t.value[rn.value]?t.value[rn.value]&&!t.value[rn.value][Bn.value]&&Bn.value!==0&&(Bn.value=t.value[rn.value].length-1):rn.value=d?rn.value-1:rn.value+1)},i=d=>{let h=null;t.value[rn.value]&&(h=t.value[rn.value][Bn.value]),h?h.focus({preventScroll:!Sd.value}):Bn.value=d?Bn.value-1:Bn.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)=>{Lt[h]=d},c=(d,h)=>{Lt[h]=d},u=()=>{Bn.value=0,rn.value=0};return{buildMatrix:l,buildMultiLevelMatrix:c,setTimePickerBackRef:d=>{Ng.value=d},setSelectionGrid:d=>{Sd.value=d,u(),d||(Lt.selectionGrid=[])},setTimePicker:(d,h=!1)=>{Fg.value=d,Vg.value=h,u(),d||(Lt.timePicker[0]=[],Lt.timePicker[1]=[])},setTimePickerElements:(d,h=0)=>{Lt.timePicker[h]=d},arrowRight:s,arrowLeft:r,arrowUp:o,arrowDown:a,clearArrowNav:()=>{Lt.monthYear=[],Lt.calendar=[],Lt.time=[],Lt.actionRow=[],Lt.selectionGrid=[],Lt.timePicker[0]=[],Lt.timePicker[1]=[],Sd.value=!1,Fg.value=!1,Vg.value=!1,Bg.value=!1,u(),Ng.value=null},setMonthPicker:d=>{Bg.value=d,u()},refSets:Lt}},gb=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??{}}),a4=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??{}}),pb=t=>t?typeof t=="boolean"?t?2:0:+t>=2?+t:2:0,l4=t=>{const e=typeof t=="object"&&t,n={static:!0,solo:!1};if(!t)return{...n,count:pb(!1)};const i=e?t:{},s=e?i.count??!0:t,r=pb(s);return Object.assign(n,i,{count:r})},c4=(t,e,n)=>t||(typeof n=="string"?n:e),u4=t=>typeof t=="boolean"?t?gb({}):!1:gb(t),d4=t=>{const e={enterSubmit:!0,tabSubmit:!0,openMenu:"open",selectOnFocus:!1,rangeSeparator:" - "};return typeof t=="object"?{...e,...t??{},enabled:!0}:{...e,enabled:t}},h4=t=>({months:[],years:[],times:{hours:[],minutes:[],seconds:[]},...t??{}}),f4=t=>({showSelect:!0,showCancel:!0,showNow:!1,showPreview:!0,...t??{}}),g4=t=>{const e={input:!1};return typeof t=="object"?{...e,...t??{},enabled:!0}:{enabled:t,...e}},p4=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??{}}),m4=t=>{const e={dates:Array.isArray(t)?t.map(n=>Ce(n)):[],years:[],months:[],quarters:[],weeks:[],weekdays:[],options:{highlightDisabled:!1}};return typeof t=="function"?t:{...e,...t??{}}},_4=t=>typeof t=="object"?{type:t?.type??"local",hideOnOffsetDates:t?.hideOnOffsetDates??!1}:{type:t,hideOnOffsetDates:!1},y4=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}},v4=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=D_(i,e,n);return[O_(s),s]})),b4=(t,e)=>t.length?new Map(t.map(n=>{const i=D_(n.date,e);return[O_(i),n]})):null,w4=t=>{var e;return{minDate:Qp(t.minDate,t.timezone,t.isSpecific),maxDate:Qp(t.maxDate,t.timezone,t.isSpecific),disabledDates:Dg(t.disabledDates)?zg(t.disabledDates,t.timezone,t.isSpecific):t.disabledDates,allowedDates:Dg(t.allowedDates)?zg(t.allowedDates,t.timezone,t.isSpecific):null,highlight:typeof t.highlight=="object"&&Dg((e=t.highlight)==null?void 0:e.dates)?zg(t.highlight.dates,t.timezone):t.highlight,markers:b4(t.markers,t.timezone)}},x4=t=>typeof t=="boolean"?{enabled:t,dragSelect:!0,limit:null}:{enabled:!!t,limit:t.limit?+t.limit:null,dragSelect:t.dragSelect??!0},E4=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]}))}),jt=t=>{const e=()=>{const S=t.enableSeconds?":ss":"",T=t.enableMinutes?":mm":"";return t.is24?`HH${T}${S}`:`hh${T}${S} aa`},n=()=>{var S;return t.format?t.format:t.monthPicker?"MM/yyyy":t.timePicker?e():t.weekPicker?`${((S=y.value)==null?void 0:S.type)==="iso"?"RR":"ww"}-yyyy`:t.yearPicker?"yyyy":t.quarterPicker?"QQQ/yyyy":t.enableTimePicker?`MM/dd/yyyy, ${e()}`:"MM/dd/yyyy"},i=S=>nS(S,t.enableSeconds),s=()=>E.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(()=>l4(t.multiCalendars)),o=be(()=>s()),a=be(()=>a4(t.ariaLabels)),l=be(()=>h4(t.filters)),c=be(()=>u4(t.transitions)),u=be(()=>f4(t.actionRow)),d=be(()=>c4(t.previewFormat,t.format,n())),h=be(()=>d4(t.textInput)),f=be(()=>g4(t.inline)),p=be(()=>p4(t.config)),m=be(()=>m4(t.highlight)),y=be(()=>_4(t.weekNumbers)),v=be(()=>v4(t.timezone)),b=be(()=>x4(t.multiDates)),x=be(()=>w4({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})),E=be(()=>y4(t.range)),w=be(()=>E4(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:E,propDates:x,defaultedTz:v,defaultedMultiDates:b,defaultedUI:w,getDefaultPattern:n,getDefaultStartTime:s}},C4=(t,e,n)=>{const i=xe(),{defaultedTextInput:s,defaultedRange:r,defaultedTz:o,defaultedMultiDates:a,getDefaultPattern:l}=jt(e),c=xe(""),u=tu(e,"format"),d=tu(e,"formatLocale");un(i,()=>{typeof e.onInternalModelChange=="function"&&t("internal-model-change",i.value,ue(!0))},{deep:!0}),un(r,(L,ae)=>{L.enabled!==ae.enabled&&(i.value=null)}),un(u,()=>{X()});const h=L=>o.value.timezone&&o.value.convertModel?xi(L,o.value.timezone):L,f=L=>{if(o.value.timezone&&o.value.convertModel){const ae=H5(o.value.timezone);return W3(L,ae)}return L},p=(L,ae,de=!1)=>sS(L,e.format,e.formatLocale,s.value.rangeSeparator,e.modelAuto,ae??l(),de),m=L=>L?e.modelType?H(L):{hours:yr(L),minutes:ao(L),seconds:e.enableSeconds?Sl(L):0}:null,y=L=>e.modelType?H(L):{month:at(L),year:Xe(L)},v=L=>Array.isArray(L)?a.value.enabled?L.map(ae=>b(ae,ks(Ce(),ae))):Cd(()=>[ks(Ce(),L[0]),L[1]?ks(Ce(),L[1]):La(r.value.partialRange)],r.value.enabled):ks(Ce(),+L),b=(L,ae)=>(typeof L=="string"||typeof L=="number")&&e.modelType?Z(L):ae,x=L=>Array.isArray(L)?[b(L[0],to(null,+L[0].hours,+L[0].minutes,L[0].seconds)),b(L[1],to(null,+L[1].hours,+L[1].minutes,L[1].seconds))]:b(L,to(null,L.hours,L.minutes,L.seconds)),E=L=>{const ae=Pt(Ce(),{date:1});return Array.isArray(L)?a.value.enabled?L.map(de=>b(de,ar(ae,+de.month,+de.year))):Cd(()=>[b(L[0],ar(ae,+L[0].month,+L[0].year)),b(L[1],L[1]?ar(ae,+L[1].month,+L[1].year):La(r.value.partialRange))],r.value.enabled):b(L,ar(ae,+L.month,+L.year))},w=L=>{if(Array.isArray(L))return L.map(ae=>Z(ae));throw new Error(L_.dateArr("multi-dates"))},S=L=>{if(Array.isArray(L)&&r.value.enabled){const ae=L[0],de=L[1];return[Ce(Array.isArray(ae)?ae[0]:null),Array.isArray(de)&&de.length?Ce(de[0]):null]}return Ce(L[0])},T=L=>e.modelAuto?Array.isArray(L)?[Z(L[0]),Z(L[1])]:e.autoApply?[Z(L)]:[Z(L),null]:Array.isArray(L)?Cd(()=>L[1]?[Z(L[0]),L[1]?Z(L[1]):La(r.value.partialRange)]:[Z(L[0])],r.value.enabled):Z(L),A=()=>{Array.isArray(i.value)&&r.value.enabled&&i.value.length===1&&i.value.push(La(r.value.partialRange))},k=()=>{const L=i.value;return[H(L[0]),L[1]?H(L[1]):La(r.value.partialRange)]},P=()=>i.value[1]?k():H(An(i.value[0])),B=()=>(i.value||[]).map(L=>H(L)),Y=(L=!1)=>(L||A(),e.modelAuto?P():a.value.enabled?B():Array.isArray(i.value)?Cd(()=>k(),r.value.enabled):H(An(i.value))),ne=L=>!L||Array.isArray(L)&&!L.length?null:e.timePicker?x(An(L)):e.monthPicker?E(An(L)):e.yearPicker?v(An(L)):a.value.enabled?w(An(L)):e.weekPicker?S(An(L)):T(An(L)),$=L=>{const ae=ne(L);tm(An(ae))?(i.value=An(ae),X()):(i.value=null,c.value="")},F=()=>{const L=ae=>Os(ae,s.value.format);return`${L(i.value[0])} ${s.value.rangeSeparator} ${i.value[1]?L(i.value[1]):""}`},D=()=>n.value&&i.value?Array.isArray(i.value)?F():Os(i.value,s.value.format):p(i.value),z=()=>i.value?a.value.enabled?i.value.map(L=>p(L)).join("; "):s.value.enabled&&typeof s.value.format=="string"?D():p(i.value):"",X=()=>{!e.format||typeof e.format=="string"||s.value.enabled&&typeof s.value.format=="string"?c.value=z():c.value=e.format(i.value)},Z=L=>{if(e.utc){const ae=new Date(L);return e.utc==="preserve"?new Date(ae.getTime()+ae.getTimezoneOffset()*6e4):ae}return e.modelType?j5.includes(e.modelType)?h(new Date(L)):e.modelType==="format"&&(typeof e.format=="string"||!e.format)?h(Jp(L,l(),new Date,{locale:d.value})):h(Jp(L,e.modelType,new Date,{locale:d.value})):h(new Date(L))},H=L=>L?e.utc?t4(L,e.utc==="preserve",e.enableSeconds):e.modelType?e.modelType==="timestamp"?+f(L):e.modelType==="iso"?f(L).toISOString():e.modelType==="format"&&(typeof e.format=="string"||!e.format)?p(f(L)):p(f(L),e.modelType,!0):f(L):"",le=(L,ae=!1,de=!1)=>{if(de)return L;if(t("update:model-value",L),o.value.emitTimezone&&ae){const ve=Array.isArray(L)?L.map(W=>xi(An(W),o.value.emitTimezone)):xi(An(L),o.value.emitTimezone);t("update:model-timezone-value",ve)}},ie=L=>Array.isArray(i.value)?a.value.enabled?i.value.map(ae=>L(ae)):[L(i.value[0]),i.value[1]?L(i.value[1]):La(r.value.partialRange)]:L(An(i.value)),te=()=>{if(Array.isArray(i.value)){const L=nr(i.value[0],e.weekStart),ae=i.value[1]?nr(i.value[1],e.weekStart):[];return[L.map(de=>Ce(de)),ae.map(de=>Ce(de))]}return nr(i.value,e.weekStart).map(L=>Ce(L))},I=(L,ae)=>le(An(ie(L)),!1,ae),ee=L=>{const ae=te();return L?ae:t("update:model-value",te())},ue=(L=!1)=>(L||X(),e.monthPicker?I(y,L):e.timePicker?I(m,L):e.yearPicker?I(Xe,L):e.weekPicker?ee(L):le(Y(L),!0,L));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:$,formatInputValue:X,emitModelValue:ue}},S4=(t,e)=>{const{defaultedFilters:n,propDates:i}=jt(t),{validateMonthYearInRange:s}=yo(t),r=(u,d)=>{let h=u;return n.value.months.includes(at(h))?(h=d?ds(u,1):Al(u,1),r(h,d)):h},o=(u,d)=>{let h=u;return n.value.years.includes(Xe(h))?(h=d?w_(u,1):UC(u,1),o(h,d)):h},a=(u,d=!1)=>{const h=Pt(Ce(),{month:t.month,year:t.year});let f=u?ds(h,1):Al(h,1);t.disableYearSelect&&(f=ks(f,t.year));let p=at(f),m=Xe(f);n.value.months.includes(p)&&(f=r(f,u),p=at(f),m=Xe(f)),n.value.years.includes(m)&&(f=o(f,u),m=Xe(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=>iS(Pt(Ce(),{month:t.month,year:t.year}),i.value.maxDate,i.value.minDate,t.preventMinMaxNavigation,u));return{handleMonthYearChange:a,isDisabled:c,updateMonthYear:l}},bf={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:()=>({})}},_s={...bf,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}},T4=["title"],A4=["disabled"],k4=hn({compatConfig:{MODE:3},__name:"ActionRow",props:{menuMount:{type:Boolean,default:!1},calendarWidth:{type:Number,default:0},..._s},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}=jt(i),{isTimeValid:d,isMonthValid:h}=yo(i),{buildMatrix:f}=_o(),p=xe(null),m=xe(null),y=xe(!1),v=xe({}),b=xe(null),x=xe(null);En(()=>{i.arrowNavigation&&f([vn(p),vn(m)],"actionRow"),E(),window.addEventListener("resize",E)}),pa(()=>{window.removeEventListener("resize",E)});const E=()=>{y.value=!1,setTimeout(()=>{var $,F;const D=($=b.value)==null?void 0:$.getBoundingClientRect(),z=(F=x.value)==null?void 0:F.getBoundingClientRect();D&&z&&(v.value.maxWidth=`${z.width-D.width-20}px`),y.value=!0},0)},w=be(()=>c.value.enabled&&!c.value.partialRange&&i.internalModelValue?i.internalModelValue.length===2:!0),S=be(()=>!d.value(i.internalModelValue)||!h.value(i.internalModelValue)||!w.value),T=()=>{const $=r.value;return i.timePicker||i.monthPicker,$(An(i.internalModelValue))},A=()=>{const $=i.internalModelValue;return o.value.count>0?`${k($[0])} - ${k($[1])}`:[k($[0]),k($[1])]},k=$=>sS($,r.value,i.formatLocale,a.value.rangeSeparator,i.modelAuto,r.value),P=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($=>`${k($)}`):i.modelAuto?`${k(i.internalModelValue[0])}`:`${k(i.internalModelValue[0])} -`:k(i.internalModelValue):T()),B=()=>u.value.enabled?"; ":" - ",Y=be(()=>Array.isArray(P.value)?P.value.join(B()):P.value),ne=()=>{d.value(i.internalModelValue)&&h.value(i.internalModelValue)&&w.value?n("select-date"):n("invalid-select")};return($,F)=>(R(),V("div",{ref_key:"actionRowRef",ref:x,class:"dp__action_row"},[$.$slots["action-row"]?Ne($.$slots,"action-row",In(wn({key:0},{internalModelValue:$.internalModelValue,disabled:S.value,selectDate:()=>$.$emit("select-date"),closePicker:()=>$.$emit("close-picker")}))):(R(),V(Oe,{key:1},[J(s).showPreview?(R(),V("div",{key:0,class:"dp__selection_preview",title:Y.value,style:Pn(v.value)},[$.$slots["action-preview"]&&y.value?Ne($.$slots,"action-preview",{key:0,value:$.internalModelValue}):ce("",!0),!$.$slots["action-preview"]&&y.value?(R(),V(Oe,{key:1},[Ue(we(Y.value),1)],64)):ce("",!0)],12,T4)):ce("",!0),g("div",{ref_key:"actionBtnContainer",ref:b,class:"dp__action_buttons","data-dp-element":"action-row"},[$.$slots["action-buttons"]?Ne($.$slots,"action-buttons",{key:0,value:$.internalModelValue}):ce("",!0),$.$slots["action-buttons"]?ce("",!0):(R(),V(Oe,{key:1},[!J(l).enabled&&J(s).showCancel?(R(),V("button",{key:0,ref_key:"cancelButtonRef",ref:p,type:"button",class:"dp__action_button dp__action_cancel",onClick:F[0]||(F[0]=D=>$.$emit("close-picker")),onKeydown:F[1]||(F[1]=D=>J(ii)(D,()=>$.$emit("close-picker")))},we($.cancelText),545)):ce("",!0),J(s).showNow?(R(),V("button",{key:1,type:"button",class:"dp__action_button dp__action_cancel",onClick:F[2]||(F[2]=D=>$.$emit("select-now")),onKeydown:F[3]||(F[3]=D=>J(ii)(D,()=>$.$emit("select-now")))},we($.nowButtonLabel),33)):ce("",!0),J(s).showSelect?(R(),V("button",{key:2,ref_key:"selectButtonRef",ref:m,type:"button",class:"dp__action_button dp__action_select",disabled:S.value,"data-test":"select-button",onKeydown:F[4]||(F[4]=D=>J(ii)(D,()=>ne())),onClick:ne},we($.selectText),41,A4)):ce("",!0)],64))],512)],64))],512))}}),M4=["role","aria-label","tabindex"],P4={class:"dp__selection_grid_header"},I4=["aria-selected","aria-disabled","data-test","onClick","onKeydown","onMouseover"],D4=["aria-label"],Vu=hn({__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}=_o(),o=n,a=t,{defaultedAriaLabels:l,defaultedTextInput:c,defaultedConfig:u}=jt(a),{hideNavigationButtons:d}=Ef(),h=xe(!1),f=xe(null),p=xe(null),m=xe([]),y=xe(),v=xe(null),b=xe(0),x=xe(null);dE(()=>{f.value=null}),En(()=>{Rn().then(()=>B()),a.noOverlayFocus||w(),E(!0)}),pa(()=>E(!1));const E=ie=>{var te;a.arrowNavigation&&((te=a.headerRefs)!=null&&te.length?r(ie):i(ie))},w=()=>{var ie;const te=vn(p);te&&(c.value.enabled||(f.value?(ie=f.value)==null||ie.focus({preventScroll:!0}):te.focus({preventScroll:!0})),h.value=te.clientHeight({dp__overlay:!0,"dp--overlay-absolute":!a.useRelative,"dp--overlay-relative":a.useRelative})),T=be(()=>a.useRelative?{height:`${a.height}px`,width:"var(--dp-menu-min-width)"}:void 0),A=be(()=>({dp__overlay_col:!0})),k=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 ie,te;return{dp__overlay_container:!0,dp__container_flex:((ie=a.items)==null?void 0:ie.length)<=6,dp__container_block:((te=a.items)==null?void 0:te.length)>6}});un(()=>a.items,()=>B(!1),{deep:!0});const B=(ie=!0)=>{Rn().then(()=>{const te=vn(f),I=vn(p),ee=vn(v),ue=vn(x),L=ee?ee.getBoundingClientRect().height:0;I&&(I.getBoundingClientRect().height?b.value=I.getBoundingClientRect().height-L:b.value=u.value.modeHeight-L),te&&ue&&ie&&(ue.scrollTop=te.offsetTop-ue.offsetTop-(b.value/2-te.getBoundingClientRect().height)-L)})},Y=ie=>{ie.disabled||o("selected",ie.value)},ne=()=>{o("toggle"),o("reset-flow")},$=()=>{a.escClose&&ne()},F=(ie,te,I,ee)=>{ie&&((te.active||te.value===a.focusValue)&&(f.value=ie),a.arrowNavigation&&(Array.isArray(m.value[I])?m.value[I][ee]=ie:m.value[I]=[ie],D()))},D=()=>{var ie,te;const I=(ie=a.headerRefs)!=null&&ie.length?[a.headerRefs].concat(m.value):m.value.concat([a.skipButtonRef?[]:[v.value]]);s(An(I),(te=a.headerRefs)!=null&&te.length?"monthPicker":"selectionGrid")},z=ie=>{a.arrowNavigation||eo(ie,u.value,!0)},X=ie=>{y.value=ie,o("hover-value",ie)},Z=()=>{if(ne(),!a.isLast){const ie=em(a.menuWrapRef??null,"action-row");if(ie){const te=ZC(ie);te?.focus()}}},H=ie=>{switch(ie.key){case Ot.esc:return $();case Ot.arrowLeft:return z(ie);case Ot.arrowRight:return z(ie);case Ot.arrowUp:return z(ie);case Ot.arrowDown:return z(ie);default:return}},le=ie=>{if(ie.key===Ot.enter)return ne();if(ie.key===Ot.tab)return Z()};return e({focusGrid:w}),(ie,te)=>{var I;return R(),V("div",{ref_key:"gridWrapRef",ref:p,class:Pe(S.value),style:Pn(T.value),role:ie.useRelative?void 0:"dialog","aria-label":ie.overlayLabel,tabindex:ie.useRelative?void 0:"0",onKeydown:H,onClick:te[0]||(te[0]=ru(()=>{},["prevent"]))},[g("div",{ref_key:"containerRef",ref:x,class:Pe(P.value),style:Pn({"--dp-overlay-height":`${b.value}px`}),role:"grid"},[g("div",P4,[Ne(ie.$slots,"header")]),ie.$slots.overlay?Ne(ie.$slots,"overlay",{key:0}):(R(!0),V(Oe,{key:1},Ze(ie.items,(ee,ue)=>(R(),V("div",{key:ue,class:Pe(["dp__overlay_row",{dp__flex_row:ie.items.length>=3}]),role:"row"},[(R(!0),V(Oe,null,Ze(ee,(L,ae)=>(R(),V("div",{key:L.value,ref_for:!0,ref:de=>F(de,L,ue,ae),role:"gridcell",class:Pe(A.value),"aria-selected":L.active||void 0,"aria-disabled":L.disabled||void 0,tabindex:"0","data-test":L.text,onClick:ru(de=>Y(L),["prevent"]),onKeydown:de=>J(ii)(de,()=>Y(L),!0),onMouseover:de=>X(L.value)},[g("div",{class:Pe(L.className)},[ie.$slots.item?Ne(ie.$slots,"item",{key:0,item:L}):ce("",!0),ie.$slots.item?ce("",!0):(R(),V(Oe,{key:1},[Ue(we(L.text),1)],64))],2)],42,I4))),128))],2))),128))],6),ie.$slots["button-icon"]?$e((R(),V("button",{key:0,ref_key:"toggleButton",ref:v,type:"button","aria-label":(I=J(l))==null?void 0:I.toggleOverlay,class:Pe(k.value),tabindex:"0",onClick:ne,onKeydown:le},[Ne(ie.$slots,"button-icon")],42,D4)),[[sh,!J(d)(ie.hideNavigation,ie.type)]]):ce("",!0)],46,M4)}}}),wf=hn({__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)=>(R(),V("div",{class:Pe({dp__menu_inner:!s.stretch,"dp--menu--inner-stretched":s.stretch,dp__flex_display:s.multiCalendars>0,"dp--flex-display-collapsed":s.collapse})},[(R(!0),V(Oe,null,Ze(n.value,(o,a)=>(R(),V("div",{key:o,class:Pe(i.value)},[Ne(s.$slots,"default",{instance:o,index:a})],2))),128))],2))}}),R4=["data-dp-element","aria-label","aria-disabled"],jc=hn({compatConfig:{MODE:3},__name:"ArrowBtn",props:{ariaLabel:{},elName:{},disabled:{type:Boolean}},emits:["activate","set-ref"],setup(t,{emit:e}){const n=e,i=xe(null);return En(()=>n("set-ref",i)),(s,r)=>(R(),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=>J(ii)(o,()=>s.$emit("activate"),!0))},[g("span",{class:Pe(["dp__inner_nav",{dp__inner_nav_disabled:s.disabled}])},[Ne(s.$slots,"default")],2)],40,R4))}}),L4=["aria-label","data-test"],lS=hn({__name:"YearModePicker",props:{..._s,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}=Ef(),{defaultedConfig:o,defaultedMultiCalendars:a,defaultedAriaLabels:l,defaultedTransitions:c,defaultedUI:u}=jt(i),{showTransition:d,transitionName:h}=zu(c),f=xe(!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 x,E,w,S,T;return R(),V(Oe,null,[g("div",{class:Pe(["dp--year-mode-picker",{"dp--hidden-el":f.value}])},[J(r)(J(a),t.instance)?(R(),Se(jc,{key:0,ref:"mpPrevIconRef","aria-label":(x=J(l))==null?void 0:x.prevYear,disabled:t.isDisabled(!1),class:Pe((E=J(u))==null?void 0:E.navBtnPrev),onActivate:b[0]||(b[0]=A=>y(!1))},{default:De(()=>[v.$slots["arrow-left"]?Ne(v.$slots,"arrow-left",{key:0}):ce("",!0),v.$slots["arrow-left"]?ce("",!0):(R(),Se(J(A_),{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=J(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]=eC(()=>p(!1),["enter"]))},[v.$slots.year?Ne(v.$slots,"year",{key:0,year:t.year}):ce("",!0),v.$slots.year?ce("",!0):(R(),V(Oe,{key:1},[Ue(we(t.year),1)],64))],40,L4),J(s)(J(a),t.instance)?(R(),Se(jc,{key:1,ref:"mpNextIconRef","aria-label":(S=J(l))==null?void 0:S.nextYear,disabled:t.isDisabled(!0),class:Pe((T=J(u))==null?void 0:T.navBtnNext),onActivate:b[3]||(b[3]=A=>y(!0))},{default:De(()=>[v.$slots["arrow-right"]?Ne(v.$slots,"arrow-right",{key:0}):ce("",!0),v.$slots["arrow-right"]?ce("",!0):(R(),Se(J(k_),{key:1}))]),_:3},8,["aria-label","disabled","class"])):ce("",!0)],2),N($t,{name:J(h)(t.showYearPicker),css:J(d)},{default:De(()=>{var A,k;return[t.showYearPicker?(R(),Se(Vu,{key:0,items:t.items,"text-input":v.textInput,"esc-close":v.escClose,config:v.config,"is-last":v.autoApply&&!J(o).keepActionRow,"hide-navigation":v.hideNavigation,"aria-labels":v.ariaLabels,"overlay-label":(k=(A=J(l))==null?void 0:A.yearPicker)==null?void 0:k.call(A,!0),type:"year",onToggle:p,onSelected:b[4]||(b[4]=P=>m(P))},Un({"button-icon":De(()=>[v.$slots["calendar-icon"]?Ne(v.$slots,"calendar-icon",{key:0}):ce("",!0),v.$slots["calendar-icon"]?ce("",!0):(R(),Se(J(Gl),{key:1}))]),_:2},[v.$slots["year-overlay-value"]?{name:"item",fn:De(({item:P})=>[Ne(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)}}}),N_=(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]},F_=(t,e,n)=>{let i=t.value?t.value.slice():[];return i.length===2&&i[1]!==null&&(i=[]),i.length?Qt(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},xf=(t,e,n,i)=>{t&&(t[0]&&t[1]&&n&&e("auto-apply"),t[0]&&!t[1]&&i&&n&&e("auto-apply"))},cS=t=>{Array.isArray(t.value)&&t.value.length<=2&&t.range?t.modelValue.value=t.value.map(e=>xi(Ce(e),t.timezone)):Array.isArray(t.value)||(t.modelValue.value=xi(Ce(t.value),t.timezone))},uS=(t,e,n,i)=>Array.isArray(e.value)&&(e.value.length===2||e.value.length===1&&i.value.partialRange)?i.value.fixedStart&&(on(t,e.value[0])||ct(t,e.value[0]))?[e.value[0],t]:i.value.fixedEnd&&(Qt(t,e.value[1])||ct(t,e.value[1]))?[t,e.value[1]]:(n("invalid-fixed-range",t),e.value):[],dS=({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(()=>R_(o.yearRange,o.locale,o.reverseYears)),h=xe([!1]),f=be(()=>(P,B)=>{const Y=Pt(rs(new Date),{month:c.value(P),year:l.value(P)}),ne=B?LC(Y):lu(Y);return iS(ne,i.value.maxDate,i.value.minDate,o.preventMinMaxNavigation,B)}),p=()=>Array.isArray(r.value)&&t.value.solo&&r.value[1],m=()=>{for(let P=0;P{if(!P)return m();const B=Pt(Ce(),s.value[P]);return s.value[0].year=Xe(UC(B,t.value.count-1)),m()},v=(P,B)=>{const Y=U3(B,P);return e.value.showLastInRange&&Y>1?B:P},b=P=>o.focusStartDate||t.value.solo?P[0]:P[1]?v(P[0],P[1]):P[0],x=()=>{if(r.value){const P=Array.isArray(r.value)?b(r.value):r.value;s.value[0]={month:at(P),year:Xe(P)}}},E=()=>{x(),t.value.count&&m()};un(r,(P,B)=>{o.isTextInputDate&&JSON.stringify(P??{})!==JSON.stringify(B??{})&&E()}),En(()=>{E()});const w=(P,B)=>{s.value[B].year=P,u("update-month-year",{instance:B,year:P,month:s.value[B].month}),t.value.count&&!t.value.solo&&y(B)},S=be(()=>P=>kl(d.value,B=>{var Y;const ne=l.value(P)===B.value,$=uu(B.value,Ml(i.value.minDate),Ml(i.value.maxDate))||((Y=a.value.years)==null?void 0:Y.includes(l.value(P))),F=$_(n.value,B.value);return{active:ne,disabled:$,highlighted:F}})),T=(P,B)=>{w(P,B),k(B)},A=(P,B=!1)=>{if(!f.value(P,B)){const Y=B?l.value(P)+1:l.value(P)-1;w(Y,P)}},k=(P,B=!1,Y)=>{B||u("reset-flow"),Y!==void 0?h.value[P]=Y:h.value[P]=!h.value[P],h.value[P]?u("overlay-toggle",{open:!0,overlay:Yn.year}):(u("overlay-closed"),u("overlay-toggle",{open:!1,overlay:Yn.year}))};return{isDisabled:f,groupedYears:S,showYearPicker:h,selectYear:w,toggleYearPicker:k,handleYearSelect:T,handleYear:A}},O4=(t,e)=>{const{defaultedMultiCalendars:n,defaultedAriaLabels:i,defaultedTransitions:s,defaultedConfig:r,defaultedRange:o,defaultedHighlight:a,propDates:l,defaultedTz:c,defaultedFilters:u,defaultedMultiDates:d}=jt(t),h=()=>{t.isTextInputDate&&E(Xe(Ce(t.startDate)),0)},{modelValue:f,year:p,month:m,calendars:y}=Wu(t,e,h),v=be(()=>XC(t.formatLocale,t.locale,t.monthNameFormat)),b=xe(null),{checkMinMaxRange:x}=yo(t),{selectYear:E,groupedYears:w,showYearPicker:S,toggleYearPicker:T,handleYearSelect:A,handleYear:k,isDisabled:P}=dS({modelValue:f,multiCalendars:n,range:o,highlight:a,calendars:y,year:p,propDates:l,month:m,filters:u,props:t,emit:e});En(()=>{t.startDate&&(f.value&&t.focusStartDate||!f.value)&&E(Xe(Ce(t.startDate)),0)});const B=I=>I?{month:at(I),year:Xe(I)}:{month:null,year:null},Y=()=>f.value?Array.isArray(f.value)?f.value.map(I=>B(I)):B(f.value):B(),ne=(I,ee)=>{const ue=y.value[I],L=Y();return Array.isArray(L)?L.some(ae=>ae.year===ue?.year&&ae.month===ee):ue?.year===L.year&&ee===L.month},$=(I,ee,ue)=>{var L,ae;const de=Y();return Array.isArray(de)?p.value(ee)===((L=de[ue])==null?void 0:L.year)&&I===((ae=de[ue])==null?void 0:ae.month):!1},F=(I,ee)=>{if(o.value.enabled){const ue=Y();if(Array.isArray(f.value)&&Array.isArray(ue)){const L=$(I,ee,0)||$(I,ee,1),ae=ar(rs(Ce()),I,p.value(ee));return vf(f.value,b.value,ae)&&!L}return!1}return!1},D=be(()=>I=>kl(v.value,ee=>{var ue;const L=ne(I,ee.value),ae=uu(ee.value,QC(p.value(I),l.value.minDate),eS(p.value(I),l.value.maxDate))||o4(l.value.disabledDates,p.value(I)).includes(ee.value)||((ue=u.value.months)==null?void 0:ue.includes(ee.value)),de=F(ee.value,I),ve=rS(a.value,ee.value,p.value(I));return{active:L,disabled:ae,isBetween:de,highlighted:ve}})),z=(I,ee)=>ar(rs(Ce()),I,p.value(ee)),X=(I,ee)=>{const ue=f.value?f.value:rs(new Date);f.value=ar(ue,I,p.value(ee)),e("auto-apply"),e("update-flow-step")},Z=(I,ee)=>{const ue=z(I,ee);o.value.fixedEnd||o.value.fixedStart?f.value=uS(ue,f,e,o):f.value?x(ue,f.value)&&(f.value=F_(f,z(I,ee),e)):f.value=[z(I,ee)],Rn().then(()=>{xf(f.value,e,t.autoApply,t.modelAuto)})},H=(I,ee)=>{N_(z(I,ee),f,d.value.limit),e("auto-apply",!0)},le=(I,ee)=>(y.value[ee].month=I,te(ee,y.value[ee].year,I),d.value.enabled?H(I,ee):o.value.enabled?Z(I,ee):X(I,ee)),ie=(I,ee)=>{E(I,ee),te(ee,I,null)},te=(I,ee,ue)=>{let L=ue;if(!L&&L!==0){const ae=Y();L=Array.isArray(ae)?ae[I].month:ae.month}e("update-month-year",{instance:I,year:ee,month:L})};return{groupedMonths:D,groupedYears:w,year:p,isDisabled:P,defaultedMultiCalendars:n,defaultedAriaLabels:i,defaultedTransitions:s,defaultedConfig:r,showYearPicker:S,modelValue:f,presetDate:(I,ee)=>{cS({value:I,modelValue:f,range:o.value.enabled,timezone:ee?void 0:c.value.timezone}),e("auto-apply")},setHoverDate:(I,ee)=>{b.value=z(I,ee)},selectMonth:le,selectYear:ie,toggleYearPicker:T,handleYearSelect:A,handleYear:k,getModelMonthYear:Y}},$4=hn({compatConfig:{MODE:3},__name:"MonthPicker",props:{..._s},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=_a(),r=ki(s,"yearMode"),o=t;En(()=>{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:x,handleYearSelect:E,handleYear:w,getModelMonthYear:S}=O4(o,i);return e({getSidebarProps:()=>({modelValue:p,year:c,getModelMonthYear:S,selectMonth:v,selectYear:b,handleYear:w}),presetDate:m,toggleYearPicker:T=>x(0,T)}),(T,A)=>(R(),Se(wf,{"multi-calendars":J(d).count,collapse:T.collapse,stretch:""},{default:De(({instance:k})=>[T.$slots["top-extra"]?Ne(T.$slots,"top-extra",{key:0,value:T.internalModelValue}):ce("",!0),T.$slots["month-year"]?Ne(T.$slots,"month-year",In(wn({key:1},{year:J(c),months:J(a)(k),years:J(l)(k),selectMonth:J(v),selectYear:J(b),instance:k}))):(R(),Se(Vu,{key:2,items:J(a)(k),"arrow-navigation":T.arrowNavigation,"is-last":T.autoApply&&!J(h).keepActionRow,"esc-close":T.escClose,height:J(h).modeHeight,config:T.config,"no-overlay-focus":!!(T.noOverlayFocus||T.textInput),"use-relative":"",type:"month",onSelected:P=>J(v)(P,k),onHoverValue:P=>J(y)(P,k)},Un({header:De(()=>[N(lS,wn(T.$props,{items:J(l)(k),instance:k,"show-year-picker":J(f)[k],year:J(c)(k),"is-disabled":P=>J(u)(k,P),onHandleYear:P=>J(w)(k,P),onYearSelect:P=>J(E)(P,k),onToggleYearPicker:P=>J(x)(k,P?.flow,P?.show)}),Un({_:2},[Ze(J(r),(P,B)=>({name:P,fn:De(Y=>[Ne(T.$slots,P,In(ni(Y)))])}))]),1040,["items","instance","show-year-picker","year","is-disabled","onHandleYear","onYearSelect","onToggleYearPicker"])]),_:2},[T.$slots["month-overlay-value"]?{name:"item",fn:De(({item:P})=>[Ne(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"]))}}),N4=(t,e)=>{const n=()=>{t.isTextInputDate&&(u.value=Xe(Ce(t.startDate)))},{modelValue:i}=Wu(t,e,n),s=xe(null),{defaultedHighlight:r,defaultedMultiDates:o,defaultedFilters:a,defaultedRange:l,propDates:c}=jt(t),u=xe();En(()=>{t.startDate&&(i.value&&t.focusStartDate||!i.value)&&(u.value=Xe(Ce(t.startDate)))});const d=m=>Array.isArray(i.value)?i.value.some(y=>Xe(y)===m):i.value?Xe(i.value)===m:!1,h=m=>l.value.enabled&&Array.isArray(i.value)?vf(i.value,s.value,p(m)):!1,f=be(()=>kl(R_(t.yearRange,t.locale,t.reverseYears),m=>{const y=d(m.value),v=uu(m.value,Ml(c.value.minDate),Ml(c.value.maxDate))||a.value.years.includes(m.value),b=h(m.value)&&!y,x=$_(r.value,m.value);return{active:y,disabled:v,isBetween:b,highlighted:x}})),p=m=>ks(rs(lu(new Date)),m);return{groupedYears:f,modelValue:i,focusYear:u,setHoverValue:m=>{s.value=ks(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=>Xe(v))).includes(m)?i.value=i.value.filter(v=>Xe(v)!==m):i.value.push(ks(oi(Ce()),m))):i.value=[ks(oi(lu(Ce())),m)],e("auto-apply",!0);l.value.enabled?(i.value=F_(i,p(m),e),Rn().then(()=>{xf(i.value,e,t.autoApply,t.modelAuto)})):(i.value=p(m),e("auto-apply"))}}},F4=hn({compatConfig:{MODE:3},__name:"YearPicker",props:{..._s},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}=N4(s,i),{defaultedConfig:u}=jt(s);return e({getSidebarProps:()=>({modelValue:o,selectYear:l})}),(d,h)=>(R(),V("div",null,[d.$slots["top-extra"]?Ne(d.$slots,"top-extra",{key:0,value:d.internalModelValue}):ce("",!0),d.$slots["month-year"]?Ne(d.$slots,"month-year",In(wn({key:1},{years:J(r),selectYear:J(l)}))):(R(),Se(Vu,{key:2,items:J(r),"is-last":d.autoApply&&!J(u).keepActionRow,height:J(u).modeHeight,config:d.config,"no-overlay-focus":!!(d.noOverlayFocus||d.textInput),"focus-value":J(a),type:"year","use-relative":"",onSelected:J(l),onHoverValue:J(c)},Un({_:2},[d.$slots["year-overlay-value"]?{name:"item",fn:De(({item:f})=>[Ne(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"]))]))}}),B4={key:0,class:"dp__time_input"},V4=["data-test","aria-label","onKeydown","onClick","onMousedown"],z4=["aria-label","disabled","data-test","onKeydown","onClick"],W4=["data-test","aria-label","onKeydown","onClick","onMousedown"],Y4={key:0},H4=["aria-label"],j4=hn({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},..._s},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}=_o(),{defaultedAriaLabels:a,defaultedTransitions:l,defaultedFilters:c,defaultedConfig:u,defaultedRange:d}=jt(s),{transitionName:h,showTransition:f}=zu(l),p=Ki({hours:!1,minutes:!1,seconds:!1}),m=xe("AM"),y=xe(null),v=xe([]),b=xe(),x=xe(!1);En(()=>{i("mounted")});const E=C=>Pt(new Date,{hours:C.hours,minutes:C.minutes,seconds:s.enableSeconds?C.seconds:0,milliseconds:0}),w=be(()=>C=>z(C,s[C])||T(C,s[C])),S=be(()=>({hours:s.hours,minutes:s.minutes,seconds:s.seconds})),T=(C,O)=>d.value.enabled&&!d.value.disableTimeRangeValidation?!s.validateTime(C,O):!1,A=(C,O)=>{if(d.value.enabled&&!d.value.disableTimeRangeValidation){const K=O?+s[`${C}Increment`]:-+s[`${C}Increment`],U=s[C]+K;return!s.validateTime(C,U)}return!1},k=be(()=>C=>!ie(+s[C]+ +s[`${C}Increment`],C)||A(C,!0)),P=be(()=>C=>!ie(+s[C]-+s[`${C}Increment`],C)||A(C,!1)),B=(C,O)=>AC(Pt(Ce(),C),O),Y=(C,O)=>W5(Pt(Ce(),C),O),ne=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})),$=be(()=>{const C=[{type:"hours"}];return s.enableMinutes&&C.push({type:"",separator:!0},{type:"minutes"}),s.enableSeconds&&C.push({type:"",separator:!0},{type:"seconds"}),C}),F=be(()=>$.value.filter(C=>!C.separator)),D=be(()=>C=>{if(C==="hours"){const O=ae(+s.hours);return{text:O<10?`0${O}`:`${O}`,value:O}}return{text:s[C]<10?`0${s[C]}`:`${s[C]}`,value:s[C]}}),z=(C,O)=>{var K;if(!s.disabledTimesConfig)return!1;const U=s.disabledTimesConfig(s.order,C==="hours"?O:void 0);return U[C]?!!((K=U[C])!=null&&K.includes(O)):!0},X=(C,O)=>O!=="hours"||m.value==="AM"?C:C+12,Z=C=>{const O=s.is24?24:12,K=C==="hours"?O:60,U=+s[`${C}GridIncrement`],re=C==="hours"&&!s.is24?U:0,j=[];for(let se=re;se({active:!1,disabled:c.value.times[C].includes(se.value)||!ie(se.value,C)||z(C,se.value)||T(C,se.value)}))},H=C=>C>=0?C:59,le=C=>C>=0?C:23,ie=(C,O)=>{const K=s.minTime?E(Rg(s.minTime)):null,U=s.maxTime?E(Rg(s.maxTime)):null,re=E(Rg(S.value,O,O==="minutes"||O==="seconds"?H(C):le(C)));return K&&U?(cu(re,U)||el(re,U))&&(Tl(re,K)||el(re,K)):K?Tl(re,K)||el(re,K):U?cu(re,U)||el(re,U):!0},te=C=>s[`no${C[0].toUpperCase()+C.slice(1)}Overlay`],I=C=>{te(C)||(p[C]=!p[C],p[C]?(x.value=!0,i("overlay-opened",C)):(x.value=!1,i("overlay-closed",C)))},ee=C=>C==="hours"?yr:C==="minutes"?ao:Sl,ue=()=>{b.value&&clearTimeout(b.value)},L=(C,O=!0,K)=>{const U=O?B:Y,re=O?+s[`${C}Increment`]:-+s[`${C}Increment`];ie(+s[C]+re,C)&&i(`update:${C}`,ee(C)(U({[C]:+s[C]},{[C]:+s[`${C}Increment`]}))),!(K!=null&&K.keyboard)&&u.value.timeArrowHoldThreshold&&(b.value=setTimeout(()=>{L(C,O)},u.value.timeArrowHoldThreshold))},ae=C=>s.is24?C:(C>=12?m.value="PM":m.value="AM",G5(C)),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=C=>{p[C]=!0},W=(C,O,K)=>{if(C&&s.arrowNavigation){Array.isArray(v.value[O])?v.value[O][K]=C:v.value[O]=[C];const U=v.value.reduce((re,j)=>j.map((se,Q)=>[...re[Q]||[],j[Q]]),[]);o(s.closeTimePickerBtn),y.value&&(U[1]=U[1].concat(y.value)),r(U,s.order)}},fe=(C,O)=>(I(C),i(`update:${C}`,O));return e({openChildCmp:ve}),(C,O)=>{var K;return C.disabled?ce("",!0):(R(),V("div",B4,[(R(!0),V(Oe,null,Ze($.value,(U,re)=>{var j,se,Q;return R(),V("div",{key:re,class:Pe(ne.value)},[U.separator?(R(),V(Oe,{key:0},[x.value?ce("",!0):(R(),V(Oe,{key:0},[Ue(":")],64))],64)):(R(),V(Oe,{key:1},[g("button",{ref_for:!0,ref:ge=>W(ge,re,0),type:"button",class:Pe({dp__btn:!0,dp__inc_dec_button:!C.timePickerInline,dp__inc_dec_button_inline:C.timePickerInline,dp__tp_inline_btn_top:C.timePickerInline,dp__inc_dec_button_disabled:k.value(U.type),"dp--hidden-el":x.value}),"data-test":`${U.type}-time-inc-btn-${s.order}`,"aria-label":(j=J(a))==null?void 0:j.incrementValue(U.type),tabindex:"0",onKeydown:ge=>J(ii)(ge,()=>L(U.type,!0,{keyboard:!0}),!0),onClick:ge=>J(u).timeArrowHoldThreshold?void 0:L(U.type,!0),onMousedown:ge=>J(u).timeArrowHoldThreshold?L(U.type,!0):void 0,onMouseup:ue},[s.timePickerInline?(R(),V(Oe,{key:1},[C.$slots["tp-inline-arrow-up"]?Ne(C.$slots,"tp-inline-arrow-up",{key:0}):(R(),V(Oe,{key:1},[O[2]||(O[2]=g("span",{class:"dp__tp_inline_btn_bar dp__tp_btn_in_l"},null,-1)),O[3]||(O[3]=g("span",{class:"dp__tp_inline_btn_bar dp__tp_btn_in_r"},null,-1))],64))],64)):(R(),V(Oe,{key:0},[C.$slots["arrow-up"]?Ne(C.$slots,"arrow-up",{key:0}):ce("",!0),C.$slots["arrow-up"]?ce("",!0):(R(),Se(J(P_),{key:1}))],64))],42,V4),g("button",{ref_for:!0,ref:ge=>W(ge,re,1),type:"button","aria-label":`${D.value(U.type).text}-${(se=J(a))==null?void 0:se.openTpOverlay(U.type)}`,class:Pe({dp__time_display:!0,dp__time_display_block:!C.timePickerInline,dp__time_display_inline:C.timePickerInline,"dp--time-invalid":w.value(U.type),"dp--time-overlay-btn":!w.value(U.type),"dp--hidden-el":x.value}),disabled:te(U.type),tabindex:"0","data-test":`${U.type}-toggle-overlay-btn-${s.order}`,onKeydown:ge=>J(ii)(ge,()=>I(U.type),!0),onClick:ge=>I(U.type)},[C.$slots[U.type]?Ne(C.$slots,U.type,{key:0,text:D.value(U.type).text,value:D.value(U.type).value}):ce("",!0),C.$slots[U.type]?ce("",!0):(R(),V(Oe,{key:1},[Ue(we(D.value(U.type).text),1)],64))],42,z4),g("button",{ref_for:!0,ref:ge=>W(ge,re,2),type:"button",class:Pe({dp__btn:!0,dp__inc_dec_button:!C.timePickerInline,dp__inc_dec_button_inline:C.timePickerInline,dp__tp_inline_btn_bottom:C.timePickerInline,dp__inc_dec_button_disabled:P.value(U.type),"dp--hidden-el":x.value}),"data-test":`${U.type}-time-dec-btn-${s.order}`,"aria-label":(Q=J(a))==null?void 0:Q.decrementValue(U.type),tabindex:"0",onKeydown:ge=>J(ii)(ge,()=>L(U.type,!1,{keyboard:!0}),!0),onClick:ge=>J(u).timeArrowHoldThreshold?void 0:L(U.type,!1),onMousedown:ge=>J(u).timeArrowHoldThreshold?L(U.type,!1):void 0,onMouseup:ue},[s.timePickerInline?(R(),V(Oe,{key:1},[C.$slots["tp-inline-arrow-down"]?Ne(C.$slots,"tp-inline-arrow-down",{key:0}):(R(),V(Oe,{key:1},[O[4]||(O[4]=g("span",{class:"dp__tp_inline_btn_bar dp__tp_btn_in_l"},null,-1)),O[5]||(O[5]=g("span",{class:"dp__tp_inline_btn_bar dp__tp_btn_in_r"},null,-1))],64))],64)):(R(),V(Oe,{key:0},[C.$slots["arrow-down"]?Ne(C.$slots,"arrow-down",{key:0}):ce("",!0),C.$slots["arrow-down"]?ce("",!0):(R(),Se(J(I_),{key:1}))],64))],42,W4)],64))],2)}),128)),C.is24?ce("",!0):(R(),V("div",Y4,[C.$slots["am-pm-button"]?Ne(C.$slots,"am-pm-button",{key:0,toggle:de,value:m.value}):ce("",!0),C.$slots["am-pm-button"]?ce("",!0):(R(),V("button",{key:1,ref_key:"amPmButton",ref:y,type:"button",class:"dp__pm_am_button",role:"button","aria-label":(K=J(a))==null?void 0:K.amPmButton,tabindex:"0",onClick:de,onKeydown:O[0]||(O[0]=U=>J(ii)(U,()=>de(),!0))},we(m.value),41,H4))])),(R(!0),V(Oe,null,Ze(F.value,(U,re)=>(R(),Se($t,{key:re,name:J(h)(p[U.type]),css:J(f)},{default:De(()=>{var j,se;return[p[U.type]?(R(),Se(Vu,{key:0,items:Z(U.type),"is-last":C.autoApply&&!J(u).keepActionRow,"esc-close":C.escClose,type:U.type,"text-input":C.textInput,config:C.config,"arrow-navigation":C.arrowNavigation,"aria-labels":C.ariaLabels,"overlay-label":(se=(j=J(a)).timeOverlay)==null?void 0:se.call(j,U.type),onSelected:Q=>fe(U.type,Q),onToggle:Q=>I(U.type),onResetFlow:O[1]||(O[1]=Q=>C.$emit("reset-flow"))},Un({"button-icon":De(()=>[C.$slots["clock-icon"]?Ne(C.$slots,"clock-icon",{key:0}):ce("",!0),C.$slots["clock-icon"]?ce("",!0):(R(),Se(ma(C.timePickerInline?J(Gl):J(M_)),{key:1}))]),_:2},[C.$slots[`${U.type}-overlay-value`]?{name:"item",fn:De(({item:Q})=>[Ne(C.$slots,`${U.type}-overlay-value`,{text:Q.text,value:Q.value})]),key:"0"}:void 0,C.$slots[`${U.type}-overlay-header`]?{name:"header",fn:De(()=>[Ne(C.$slots,`${U.type}-overlay-header`,{toggle:()=>I(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))]))}}}),K4={class:"dp--tp-wrap"},U4=["aria-label","tabindex"],G4=["role","aria-label","tabindex"],X4=["aria-label"],hS=hn({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},..._s},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}=_o(),a=_a(),{defaultedTransitions:l,defaultedAriaLabels:c,defaultedTextInput:u,defaultedConfig:d,defaultedRange:h}=jt(s),{transitionName:f,showTransition:p}=zu(l),{hideNavigationButtons:m}=Ef(),y=xe(null),v=xe(null),b=xe([]),x=xe(null),E=xe(!1);En(()=>{i("mount"),!s.timePicker&&s.arrowNavigation?r([vn(y.value)],"time"):o(!0,s.timePicker)});const w=be(()=>h.value.enabled&&s.modelAuto?qC(s.internalModelValue):!0),S=xe(!1),T=Z=>({hours:Array.isArray(s.hours)?s.hours[Z]:s.hours,minutes:Array.isArray(s.minutes)?s.minutes[Z]:s.minutes,seconds:Array.isArray(s.seconds)?s.seconds[Z]:s.seconds}),A=be(()=>{const Z=[];if(h.value.enabled)for(let H=0;H<2;H++)Z.push(T(H));else Z.push(T(0));return Z}),k=(Z,H=!1,le="")=>{H||i("reset-flow"),S.value=Z,i(Z?"overlay-opened":"overlay-closed",Yn.time),s.arrowNavigation&&o(Z),Rn(()=>{le!==""&&b.value[0]&&b.value[0].openChildCmp(le)})},P=be(()=>({dp__btn:!0,dp__button:!0,dp__button_bottom:s.autoApply&&!d.value.keepActionRow})),B=ki(a,"timePicker"),Y=(Z,H,le)=>h.value.enabled?H===0?[Z,A.value[1][le]]:[A.value[0][le],Z]:Z,ne=Z=>{i("update:hours",Z)},$=Z=>{i("update:minutes",Z)},F=Z=>{i("update:seconds",Z)},D=()=>{if(x.value&&!u.value.enabled&&!s.noOverlayFocus){const Z=ZC(x.value);Z&&Z.focus({preventScroll:!0})}},z=Z=>{E.value=!1,i("overlay-closed",Z)},X=Z=>{E.value=!0,i("overlay-opened",Z)};return e({toggleTimePicker:k}),(Z,H)=>{var le;return R(),V("div",K4,[!Z.timePicker&&!Z.timePickerInline?$e((R(),V("button",{key:0,ref_key:"openTimePickerBtn",ref:y,type:"button",class:Pe({...P.value,"dp--hidden-el":S.value}),"aria-label":(le=J(c))==null?void 0:le.openTimePicker,tabindex:Z.noOverlayFocus?void 0:0,"data-test":"open-time-picker-btn",onKeydown:H[0]||(H[0]=ie=>J(ii)(ie,()=>k(!0))),onClick:H[1]||(H[1]=ie=>k(!0))},[Z.$slots["clock-icon"]?Ne(Z.$slots,"clock-icon",{key:0}):ce("",!0),Z.$slots["clock-icon"]?ce("",!0):(R(),Se(J(M_),{key:1}))],42,U4)),[[sh,!J(m)(Z.hideNavigation,"time")]]):ce("",!0),N($t,{name:J(f)(S.value),css:J(p)&&!Z.timePickerInline},{default:De(()=>{var ie,te;return[S.value||Z.timePicker||Z.timePickerInline?(R(),V("div",{key:0,ref_key:"overlayRef",ref:x,role:Z.timePickerInline?void 0:"dialog",class:Pe({dp__overlay:!Z.timePickerInline,"dp--overlay-absolute":!s.timePicker&&!Z.timePickerInline,"dp--overlay-relative":s.timePicker}),style:Pn(Z.timePicker?{height:`${J(d).modeHeight}px`}:void 0),"aria-label":(ie=J(c))==null?void 0:ie.timePicker,tabindex:Z.timePickerInline?void 0:0},[g("div",{class:Pe(Z.timePickerInline?"dp__time_picker_inline_container":"dp__overlay_container dp__container_flex dp__time_picker_overlay_container"),style:{display:"flex"}},[Z.$slots["time-picker-overlay"]?Ne(Z.$slots,"time-picker-overlay",{key:0,hours:t.hours,minutes:t.minutes,seconds:t.seconds,setHours:ne,setMinutes:$,setSeconds:F}):ce("",!0),Z.$slots["time-picker-overlay"]?ce("",!0):(R(),V("div",{key:1,class:Pe(Z.timePickerInline?"dp__flex":"dp__overlay_row dp__flex_row")},[(R(!0),V(Oe,null,Ze(A.value,(I,ee)=>$e((R(),Se(j4,wn({key:ee,ref_for:!0},{...Z.$props,order:ee,hours:I.hours,minutes:I.minutes,seconds:I.seconds,closeTimePickerBtn:v.value,disabledTimesConfig:t.disabledTimesConfig,disabled:ee===0?J(h).fixedStart:J(h).fixedEnd},{ref_for:!0,ref_key:"timeInputRefs",ref:b,"validate-time":(ue,L)=>t.validateTime(ue,Y(L,ee,ue)),"onUpdate:hours":ue=>ne(Y(ue,ee,"hours")),"onUpdate:minutes":ue=>$(Y(ue,ee,"minutes")),"onUpdate:seconds":ue=>F(Y(ue,ee,"seconds")),onMounted:D,onOverlayClosed:z,onOverlayOpened:X,onAmPmChange:H[2]||(H[2]=ue=>Z.$emit("am-pm-change",ue))}),Un({_:2},[Ze(J(B),(ue,L)=>({name:ue,fn:De(ae=>[Ne(Z.$slots,ue,wn({ref_for:!0},ae))])}))]),1040,["validate-time","onUpdate:hours","onUpdate:minutes","onUpdate:seconds"])),[[sh,ee===0?!0:w.value]])),128))],2)),!Z.timePicker&&!Z.timePickerInline?$e((R(),V("button",{key:2,ref_key:"closeTimePickerBtn",ref:v,type:"button",class:Pe({...P.value,"dp--hidden-el":E.value}),"aria-label":(te=J(c))==null?void 0:te.closeTimePicker,tabindex:"0",onKeydown:H[3]||(H[3]=I=>J(ii)(I,()=>k(!1))),onClick:H[4]||(H[4]=I=>k(!1))},[Z.$slots["calendar-icon"]?Ne(Z.$slots,"calendar-icon",{key:0}):ce("",!0),Z.$slots["calendar-icon"]?ce("",!0):(R(),Se(J(Gl),{key:1}))],42,X4)),[[sh,!J(m)(Z.hideNavigation,"time")]]):ce("",!0)],2)],14,G4)):ce("",!0)]}),_:3},8,["name","css"])])}}}),fS=(t,e,n,i)=>{const{defaultedRange:s}=jt(t),r=(x,E)=>Array.isArray(e[x])?e[x][E]:e[x],o=x=>t.enableSeconds?Array.isArray(e.seconds)?e.seconds[x]:e.seconds:0,a=(x,E)=>x?E!==void 0?to(x,r("hours",E),r("minutes",E),o(E)):to(x,e.hours,e.minutes,o()):KC(Ce(),o(E)),l=(x,E)=>{e[x]=E},c=be(()=>t.modelAuto&&s.value.enabled?Array.isArray(n.value)?n.value.length>1:!1:s.value.enabled),u=(x,E)=>{const w=Object.fromEntries(Object.keys(e).map(S=>S===x?[S,E]:[S,e[S]].slice()));if(c.value&&!s.value.disableTimeRangeValidation){const S=A=>n.value?to(n.value[A],w.hours[A],w.minutes[A],w.seconds[A]):null,T=A=>jC(n.value[A],0);return!(ct(S(0),S(1))&&(Tl(S(0),T(1))||cu(S(1),T(0))))}return!0},d=(x,E)=>{u(x,E)&&(l(x,E),i&&i())},h=x=>{d("hours",x)},f=x=>{d("minutes",x)},p=x=>{d("seconds",x)},m=(x,E,w,S)=>{E&&h(x),!E&&!w&&f(x),w&&p(x),n.value&&S(n.value)},y=x=>{if(x){const E=Array.isArray(x),w=E?[+x[0].hours,+x[1].hours]:+x.hours,S=E?[+x[0].minutes,+x[1].minutes]:+x.minutes,T=E?[+x[0].seconds,+x[1].seconds]:+x.seconds;l("hours",w),l("minutes",S),t.enableSeconds&&l("seconds",T)}},v=(x,E)=>{const w={hours:Array.isArray(e.hours)?e.hours[x]:e.hours,disabledArr:[]};return(E||E===0)&&(w.hours=E),Array.isArray(t.disabledTimes)&&(w.disabledArr=s.value.enabled&&Array.isArray(t.disabledTimes[x])?t.disabledTimes[x]:t.disabledTimes),w},b=be(()=>(x,E)=>{var w;if(Array.isArray(t.disabledTimes)){const{disabledArr:S,hours:T}=v(x,E),A=S.filter(k=>+k.hours===T);return((w=A[0])==null?void 0:w.minutes)==="*"?{hours:[T],minutes:void 0,seconds:void 0}:{hours:[],minutes:A?.map(k=>+k.minutes)??[],seconds:A?.map(k=>k.seconds?+k.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}},q4=(t,e)=>{const n=()=>{t.isTextInputDate&&E()},{modelValue:i,time:s}=Wu(t,e,n),{defaultedStartTime:r,defaultedRange:o,defaultedTz:a}=jt(t),{updateTimeValues:l,getSetDateTime:c,setTime:u,assignStartTime:d,disabledTimesConfig:h,validateTime:f}=fS(t,s,i,p);function p(){e("update-flow-step")}const m=S=>{const{hours:T,minutes:A,seconds:k}=S;return{hours:+T,minutes:+A,seconds:k?+k:0}},y=()=>{if(t.startTime){if(Array.isArray(t.startTime)){const T=m(t.startTime[0]),A=m(t.startTime[1]);return[Pt(Ce(),T),Pt(Ce(),A)]}const S=m(t.startTime);return Pt(Ce(),S)}return o.value.enabled?[null,null]:null},v=()=>{if(o.value.enabled){const[S,T]=y();i.value=[xi(c(S,0),a.value.timezone),xi(c(T,1),a.value.timezone)]}else i.value=xi(c(y()),a.value.timezone)},b=S=>Array.isArray(S)?[na(Ce(S[0])),na(Ce(S[1]))]:[na(S??Ce())],x=(S,T,A)=>{u("hours",S),u("minutes",T),u("seconds",t.enableSeconds?A:0)},E=()=>{const[S,T]=b(i.value);return o.value.enabled?x([S.hours,T.hours],[S.minutes,T.minutes],[S.seconds,T.seconds]):x(S.hours,S.minutes,S.seconds)};En(()=>{if(!t.shadow)return d(r.value),i.value?E():v()});const w=()=>{Array.isArray(i.value)?i.value=i.value.map((S,T)=>S&&c(S,T)):i.value=c(i.value),e("time-update")};return{modelValue:i,time:s,disabledTimesConfig:h,updateTime:(S,T=!0,A=!1)=>{l(S,T,A,w)},validateTime:f}},Z4=hn({compatConfig:{MODE:3},__name:"TimePickerSolo",props:{..._s},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=_a(),o=ki(r,"timePicker"),a=xe(null),{time:l,modelValue:c,disabledTimesConfig:u,updateTime:d,validateTime:h}=q4(s,i);return En(()=>{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)=>(R(),Se(wf,{"multi-calendars":0,stretch:""},{default:De(()=>[N(hS,wn({ref_key:"tpRef",ref:a},f.$props,{hours:J(l).hours,minutes:J(l).minutes,seconds:J(l).seconds,"internal-model-value":f.internalModelValue,"disabled-times-config":J(u),"validate-time":J(h),"onUpdate:hours":p[0]||(p[0]=m=>J(d)(m)),"onUpdate:minutes":p[1]||(p[1]=m=>J(d)(m,!1)),"onUpdate:seconds":p[2]||(p[2]=m=>J(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}))}),Un({_:2},[Ze(J(o),(m,y)=>({name:m,fn:De(v=>[Ne(f.$slots,m,In(ni(v)))])}))]),1040,["hours","minutes","seconds","internal-model-value","disabled-times-config","validate-time"])]),_:3}))}}),J4={class:"dp--header-wrap"},Q4={key:0,class:"dp__month_year_wrap"},eB={key:0},tB={class:"dp__month_year_wrap"},nB=["data-dp-element","aria-label","data-test","onClick","onKeydown"],iB=hn({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:()=>[]},..._s},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}=jt(s),{transitionName:f,showTransition:p}=zu(r),{buildMatrix:m}=_o(),{handleMonthYearChange:y,isDisabled:v,updateMonthYear:b}=S4(s,i),{showLeftIcon:x,showRightIcon:E}=Ef(),w=xe(!1),S=xe(!1),T=xe(!1),A=xe([null,null,null,null]);En(()=>{i("mount")});const k=te=>({get:()=>s[te],set:I=>{const ee=te===es.month?es.year:es.month;i("update-month-year",{[te]:I,[ee]:s[ee]}),te===es.month?z(!0):X(!0)}}),P=be(k(es.month)),B=be(k(es.year)),Y=be(()=>te=>({month:s.month,year:s.year,items:te===es.month?s.months:s.years,instance:s.instance,updateMonthYear:b,toggle:te===es.month?z:X})),ne=be(()=>s.months.find(I=>I.value===s.month)||{text:"",value:0}),$=be(()=>kl(s.months,te=>{const I=s.month===te.value,ee=uu(te.value,QC(s.year,d.value.minDate),eS(s.year,d.value.maxDate))||l.value.months.includes(te.value),ue=rS(u.value,te.value,s.year);return{active:I,disabled:ee,highlighted:ue}})),F=be(()=>kl(s.years,te=>{const I=s.year===te.value,ee=uu(te.value,Ml(d.value.minDate),Ml(d.value.maxDate))||l.value.years.includes(te.value),ue=$_(u.value,te.value);return{active:I,disabled:ee,highlighted:ue}})),D=(te,I,ee)=>{ee!==void 0?te.value=ee:te.value=!te.value,te.value?(T.value=!0,i("overlay-opened",I)):(T.value=!1,i("overlay-closed",I))},z=(te=!1,I)=>{Z(te),D(w,Yn.month,I)},X=(te=!1,I)=>{Z(te),D(S,Yn.year,I)},Z=te=>{te||i("reset-flow")},H=(te,I)=>{s.arrowNavigation&&(A.value[I]=vn(te),m(A.value,"monthYear"))},le=be(()=>{var te,I,ee,ue,L,ae;return[{type:es.month,index:1,toggle:z,modelValue:P.value,updateModelValue:de=>P.value=de,text:ne.value.text,showSelectionGrid:w.value,items:$.value,ariaLabel:(te=o.value)==null?void 0:te.openMonthsOverlay,overlayLabel:((ee=(I=o.value).monthPicker)==null?void 0:ee.call(I,!0))??void 0},{type:es.year,index:2,toggle:X,modelValue:B.value,updateModelValue:de=>B.value=de,text:JC(s.year,s.locale),showSelectionGrid:S.value,items:F.value,ariaLabel:(ue=o.value)==null?void 0:ue.openYearsOverlay,overlayLabel:((ae=(L=o.value).yearPicker)==null?void 0:ae.call(L,!0))??void 0}]}),ie=be(()=>s.disableYearSelect?[le.value[0]]:s.yearFirst?[...le.value].reverse():le.value);return e({toggleMonthPicker:z,toggleYearPicker:X,handleMonthYearChange:y}),(te,I)=>{var ee,ue,L,ae,de,ve;return R(),V("div",J4,[te.$slots["month-year"]?(R(),V("div",Q4,[Ne(te.$slots,"month-year",In(ni({month:t.month,year:t.year,months:t.months,years:t.years,updateMonthYear:J(b),handleMonthYearChange:J(y),instance:t.instance})))])):(R(),V(Oe,{key:1},[te.$slots["top-extra"]?(R(),V("div",eB,[Ne(te.$slots,"top-extra",{value:te.internalModelValue})])):ce("",!0),g("div",tB,[J(x)(J(a),t.instance)&&!te.vertical?(R(),Se(jc,{key:0,"aria-label":(ee=J(o))==null?void 0:ee.prevMonth,disabled:J(v)(!1),class:Pe((ue=J(h))==null?void 0:ue.navBtnPrev),"el-name":"action-prev",onActivate:I[0]||(I[0]=W=>J(y)(!1,!0)),onSetRef:I[1]||(I[1]=W=>H(W,0))},{default:De(()=>[te.$slots["arrow-left"]?Ne(te.$slots,"arrow-left",{key:0}):ce("",!0),te.$slots["arrow-left"]?ce("",!0):(R(),Se(J(A_),{key:1}))]),_:3},8,["aria-label","disabled","class"])):ce("",!0),g("div",{class:Pe(["dp__month_year_wrap",{dp__year_disable_select:te.disableYearSelect}])},[(R(!0),V(Oe,null,Ze(ie.value,(W,fe)=>(R(),V(Oe,{key:W.type},[g("button",{ref_for:!0,ref:C=>H(C,fe+1),type:"button","data-dp-element":`overlay-${W.type}`,class:Pe(["dp__btn dp__month_year_select",{"dp--hidden-el":T.value}]),"aria-label":`${W.text}-${W.ariaLabel}`,"data-test":`${W.type}-toggle-overlay-${t.instance}`,onClick:W.toggle,onKeydown:C=>J(ii)(C,()=>W.toggle(),!0)},[te.$slots[W.type]?Ne(te.$slots,W.type,{key:0,text:W.text,value:s[W.type]}):ce("",!0),te.$slots[W.type]?ce("",!0):(R(),V(Oe,{key:1},[Ue(we(W.text),1)],64))],42,nB),N($t,{name:J(f)(W.showSelectionGrid),css:J(p)},{default:De(()=>[W.showSelectionGrid?(R(),Se(Vu,{key:0,items:W.items,"arrow-navigation":te.arrowNavigation,"hide-navigation":te.hideNavigation,"is-last":te.autoApply&&!J(c).keepActionRow,"skip-button-ref":!1,config:te.config,type:W.type,"header-refs":[],"esc-close":te.escClose,"menu-wrap-ref":te.menuWrapRef,"text-input":te.textInput,"aria-labels":te.ariaLabels,"overlay-label":W.overlayLabel,onSelected:W.updateModelValue,onToggle:W.toggle},Un({"button-icon":De(()=>[te.$slots["calendar-icon"]?Ne(te.$slots,"calendar-icon",{key:0}):ce("",!0),te.$slots["calendar-icon"]?ce("",!0):(R(),Se(J(Gl),{key:1}))]),_:2},[te.$slots[`${W.type}-overlay-value`]?{name:"item",fn:De(({item:C})=>[Ne(te.$slots,`${W.type}-overlay-value`,{text:C.text,value:C.value})]),key:"0"}:void 0,te.$slots[`${W.type}-overlay`]?{name:"overlay",fn:De(()=>[Ne(te.$slots,`${W.type}-overlay`,wn({ref_for:!0},Y.value(W.type)))]),key:"1"}:void 0,te.$slots[`${W.type}-overlay-header`]?{name:"header",fn:De(()=>[Ne(te.$slots,`${W.type}-overlay-header`,{toggle:W.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),J(x)(J(a),t.instance)&&te.vertical?(R(),Se(jc,{key:1,"aria-label":(L=J(o))==null?void 0:L.prevMonth,"el-name":"action-prev",disabled:J(v)(!1),class:Pe((ae=J(h))==null?void 0:ae.navBtnPrev),onActivate:I[2]||(I[2]=W=>J(y)(!1,!0))},{default:De(()=>[te.$slots["arrow-up"]?Ne(te.$slots,"arrow-up",{key:0}):ce("",!0),te.$slots["arrow-up"]?ce("",!0):(R(),Se(J(P_),{key:1}))]),_:3},8,["aria-label","disabled","class"])):ce("",!0),J(E)(J(a),t.instance)?(R(),Se(jc,{key:2,ref:"rightIcon","el-name":"action-next",disabled:J(v)(!0),"aria-label":(de=J(o))==null?void 0:de.nextMonth,class:Pe((ve=J(h))==null?void 0:ve.navBtnNext),onActivate:I[3]||(I[3]=W=>J(y)(!0,!0)),onSetRef:I[4]||(I[4]=W=>H(W,te.disableYearSelect?2:3))},{default:De(()=>[te.$slots[te.vertical?"arrow-down":"arrow-right"]?Ne(te.$slots,te.vertical?"arrow-down":"arrow-right",{key:0}):ce("",!0),te.$slots[te.vertical?"arrow-down":"arrow-right"]?ce("",!0):(R(),Se(ma(te.vertical?J(I_):J(k_)),{key:1}))]),_:3},8,["disabled","aria-label","class"])):ce("",!0)])],64))])}}}),sB={class:"dp__calendar_header",role:"row"},rB={key:0,class:"dp__calendar_header_item",role:"gridcell"},oB=["aria-label"],aB={key:0,class:"dp__calendar_item dp__week_num",role:"gridcell"},lB={class:"dp__cell_inner"},cB=["id","aria-pressed","aria-disabled","aria-label","tabindex","data-test","onClick","onTouchend","onKeydown","onMouseenter","onMouseleave","onMousedown"],uB=hn({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},..._s},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}=_o(),{defaultedTransitions:o,defaultedConfig:a,defaultedAriaLabels:l,defaultedMultiCalendars:c,defaultedWeekNumbers:u,defaultedMultiDates:d,defaultedUI:h}=jt(s),f=xe(null),p=xe({bottom:"",left:"",transform:""}),m=xe([]),y=xe(null),v=xe(!0),b=xe(""),x=xe({startX:0,endX:0,startY:0,endY:0}),E=xe([]),w=xe({left:"50%"}),S=xe(!1),T=be(()=>s.calendar?s.calendar(s.mappedDates):s.mappedDates),A=be(()=>s.dayNames?Array.isArray(s.dayNames)?s.dayNames:s.dayNames(s.locale,+s.weekStart):U5(s.formatLocale,s.locale,+s.weekStart));En(()=>{i("mount",{cmp:"calendar",refs:m}),a.value.noSwipe||y.value&&(y.value.addEventListener("touchstart",H,{passive:!1}),y.value.addEventListener("touchend",le,{passive:!1}),y.value.addEventListener("touchmove",ie,{passive:!1})),s.monthChangeOnScroll&&y.value&&y.value.addEventListener("wheel",ee,{passive:!1})});const k=W=>W?s.vertical?"vNext":"next":s.vertical?"vPrevious":"previous",P=(W,fe)=>{if(s.transitions){const C=oi(ar(Ce(),s.month,s.year));b.value=on(oi(ar(Ce(),W,fe)),C)?o.value[k(!0)]:o.value[k(!1)],v.value=!1,Rn(()=>{v.value=!0})}},B=be(()=>({...h.value.calendar??{}})),Y=be(()=>W=>{const fe=X5(W);return{dp__marker_dot:fe.type==="dot",dp__marker_line:fe.type==="line"}}),ne=be(()=>W=>ct(W,f.value)),$=be(()=>({dp__calendar:!0,dp__calendar_next:c.value.count>0&&s.instance!==0})),F=be(()=>W=>s.hideOffsetDates?W.current:!0),D=async(W,fe)=>{const{width:C,height:O}=W.getBoundingClientRect();f.value=fe.value;let K={left:`${C/2}px`},U=-50;if(await Rn(),E.value[0]){const{left:re,width:j}=E.value[0].getBoundingClientRect();re<0&&(K={left:"0"},U=0,w.value.left=`${C/2}px`),window.innerWidth{var O,K,U;const re=vn(m.value[fe][C]);re&&((O=W.marker)!=null&&O.customPosition&&(U=(K=W.marker)==null?void 0:K.tooltip)!=null&&U.length?p.value=W.marker.customPosition(re):await D(re,W),i("tooltip-open",W.marker))},X=async(W,fe,C)=>{var O,K;if(S.value&&d.value.enabled&&d.value.dragSelect)return i("select-date",W);i("set-hover-date",W),(K=(O=W.marker)==null?void 0:O.tooltip)!=null&&K.length&&await z(W,fe,C)},Z=W=>{f.value&&(f.value=null,p.value=JSON.parse(JSON.stringify({bottom:"",left:"",transform:""})),i("tooltip-close",W.marker))},H=W=>{x.value.startX=W.changedTouches[0].screenX,x.value.startY=W.changedTouches[0].screenY},le=W=>{x.value.endX=W.changedTouches[0].screenX,x.value.endY=W.changedTouches[0].screenY,te()},ie=W=>{s.vertical&&!s.inline&&W.preventDefault()},te=()=>{const W=s.vertical?"Y":"X";Math.abs(x.value[`start${W}`]-x.value[`end${W}`])>10&&i("handle-swipe",x.value[`start${W}`]>x.value[`end${W}`]?"right":"left")},I=(W,fe,C)=>{W&&(Array.isArray(m.value[fe])?m.value[fe][C]=W:m.value[fe]=[W]),s.arrowNavigation&&r(m.value,"calendar")},ee=W=>{s.monthChangeOnScroll&&(W.preventDefault(),i("handle-scroll",W))},ue=W=>u.value.type==="local"?C_(W.value,{weekStartsOn:+s.weekStart}):u.value.type==="iso"?x_(W.value):typeof u.value.type=="function"?u.value.type(W.value):"",L=W=>{const fe=W[0];return u.value.hideOnOffsetDates?W.some(C=>C.current)?ue(fe):"":ue(fe)},ae=(W,fe,C=!0)=>{C&&db()||!C&&!db()||d.value.enabled||(eo(W,a.value),i("select-date",fe))},de=W=>{eo(W,a.value)},ve=W=>{d.value.enabled&&d.value.dragSelect?(S.value=!0,i("select-date",W)):d.value.enabled&&i("select-date",W)};return e({triggerTransition:P}),(W,fe)=>(R(),V("div",{class:Pe($.value)},[g("div",{ref_key:"calendarWrapRef",ref:y,class:Pe(B.value),role:"grid"},[g("div",sB,[W.weekNumbers?(R(),V("div",rB,we(W.weekNumName),1)):ce("",!0),(R(!0),V(Oe,null,Ze(A.value,(C,O)=>{var K,U;return R(),V("div",{key:O,class:"dp__calendar_header_item",role:"gridcell","data-test":"calendar-header","aria-label":(U=(K=J(l))==null?void 0:K.weekDay)==null?void 0:U.call(K,O)},[W.$slots["calendar-header"]?Ne(W.$slots,"calendar-header",{key:0,day:C,index:O}):ce("",!0),W.$slots["calendar-header"]?ce("",!0):(R(),V(Oe,{key:1},[Ue(we(C),1)],64))],8,oB)}),128))]),fe[2]||(fe[2]=g("div",{class:"dp__calendar_header_separator"},null,-1)),N($t,{name:b.value,css:!!W.transitions},{default:De(()=>[v.value?(R(),V("div",{key:0,class:"dp__calendar",role:"rowgroup",onMouseleave:fe[1]||(fe[1]=C=>S.value=!1)},[(R(!0),V(Oe,null,Ze(T.value,(C,O)=>(R(),V("div",{key:O,class:"dp__calendar_row",role:"row"},[W.weekNumbers?(R(),V("div",aB,[g("div",lB,we(L(C.days)),1)])):ce("",!0),(R(!0),V(Oe,null,Ze(C.days,(K,U)=>{var re,j,se;return R(),V("div",{id:J(oS)(K.value),ref_for:!0,ref:Q=>I(Q,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=J(l))==null?void 0:re.day)==null?void 0:j.call(re,K),tabindex:!K.current&&W.hideOffsetDates?void 0:0,"data-test":K.value,onClick:ru(Q=>ae(Q,K),["prevent"]),onTouchend:Q=>ae(Q,K,!1),onKeydown:Q=>J(ii)(Q,()=>W.$emit("select-date",K)),onMouseenter:Q=>X(K,O,U),onMouseleave:Q=>Z(K),onMousedown:Q=>ve(K),onMouseup:fe[0]||(fe[0]=Q=>S.value=!1)},[g("div",{class:Pe(["dp__cell_inner",K.classData])},[W.$slots.day&&F.value(K)?Ne(W.$slots,"day",{key:0,day:+K.text,date:K.value}):ce("",!0),W.$slots.day?ce("",!0):(R(),V(Oe,{key:1},[Ue(we(K.text),1)],64)),K.marker&&F.value(K)?(R(),V(Oe,{key:2},[W.$slots.marker?Ne(W.$slots,"marker",{key:0,marker:K.marker,day:+K.text,date:K.value}):(R(),V("div",{key:1,class:Pe(Y.value(K.marker)),style:Pn(K.marker.color?{backgroundColor:K.marker.color}:{})},null,6))],64)):ce("",!0),ne.value(K.value)?(R(),V("div",{key:3,ref_for:!0,ref_key:"activeTooltip",ref:E,class:"dp__marker_tooltip",style:Pn(p.value)},[(se=K.marker)!=null&&se.tooltip?(R(),V("div",{key:0,class:"dp__tooltip_content",onClick:de},[(R(!0),V(Oe,null,Ze(K.marker.tooltip,(Q,ge)=>(R(),V("div",{key:ge,class:"dp__tooltip_text"},[W.$slots["marker-tooltip"]?Ne(W.$slots,"marker-tooltip",{key:0,tooltip:Q,day:K.value}):ce("",!0),W.$slots["marker-tooltip"]?ce("",!0):(R(),V(Oe,{key:1},[g("div",{class:"dp__tooltip_mark",style:Pn(Q.color?{backgroundColor:Q.color}:{})},null,4),g("div",null,we(Q.text),1)],64))]))),128)),g("div",{class:"dp__arrow_bottom_tp",style:Pn(w.value)},null,4)])):ce("",!0)],4)):ce("",!0)],2)],40,cB)}),128))]))),128))],32)):ce("",!0)]),_:3},8,["name","css"])],2)],2))}}),mb=t=>Array.isArray(t),dB=(t,e,n,i)=>{const s=xe([]),r=xe(new Date),o=xe(),a=()=>H(t.isTextInputDate),{modelValue:l,calendars:c,time:u,today:d}=Wu(t,e,a),{defaultedMultiCalendars:h,defaultedStartTime:f,defaultedRange:p,defaultedConfig:m,defaultedTz:y,propDates:v,defaultedMultiDates:b}=jt(t),{validateMonthYearInRange:x,isDisabled:E,isDateRangeAllowed:w,checkMinMaxRange:S}=yo(t),{updateTimeValues:T,getSetDateTime:A,setTime:k,assignStartTime:P,validateTime:B,disabledTimesConfig:Y}=fS(t,u,l,i),ne=be(()=>oe=>c.value[oe]?c.value[oe].month:0),$=be(()=>oe=>c.value[oe]?c.value[oe].year:0),F=oe=>!m.value.keepViewOnOffsetClick||oe?!0:!o.value,D=(oe,Te,he,Ae=!1)=>{var Le,Ut;F(Ae)&&(c.value[oe]||(c.value[oe]={month:0,year:0}),c.value[oe].month=ub(Te)?(Le=c.value[oe])==null?void 0:Le.month:Te,c.value[oe].year=ub(he)?(Ut=c.value[oe])==null?void 0:Ut.year:he)},z=()=>{t.autoApply&&e("select-date")};En(()=>{t.shadow||(l.value||(W(),f.value&&P(f.value)),H(!0),t.focusStartDate&&t.startDate&&W())});const X=be(()=>{var oe;return(oe=t.flow)!=null&&oe.length&&!t.partialFlow?t.flowStep===t.flow.length:!0}),Z=()=>{t.autoApply&&X.value&&e("auto-apply",t.partialFlow?t.flowStep!==t.flow.length:!1)},H=(oe=!1)=>{if(l.value)return Array.isArray(l.value)?(s.value=l.value,L(oe)):te(l.value,oe);if(h.value.count&&oe&&!t.startDate)return ie(Ce(),oe)},le=()=>Array.isArray(l.value)&&p.value.enabled?at(l.value[0])===at(l.value[1]??l.value[0]):!1,ie=(oe=new Date,Te=!1)=>{if((!h.value.count||!h.value.static||Te)&&D(0,at(oe),Xe(oe)),h.value.count&&(!h.value.solo||!l.value||le()))for(let he=1;he{ie(oe),k("hours",yr(oe)),k("minutes",ao(oe)),k("seconds",Sl(oe)),h.value.count&&Te&&ve()},I=oe=>{if(h.value.count){if(h.value.solo)return 0;const Te=at(oe[0]),he=at(oe[1]);return Math.abs(he-Te){oe[1]&&p.value.showLastInRange?ie(oe[I(oe)],Te):ie(oe[0],Te);const he=(Ae,Le)=>[Ae(oe[0]),oe[1]?Ae(oe[1]):u[Le][1]];k("hours",he(yr,"hours")),k("minutes",he(ao,"minutes")),k("seconds",he(Sl,"seconds"))},ue=(oe,Te)=>{if((p.value.enabled||t.weekPicker)&&!b.value.enabled)return ee(oe,Te);if(b.value.enabled&&Te){const he=oe[oe.length-1];return te(he,Te)}},L=oe=>{const Te=l.value;ue(Te,oe),h.value.count&&h.value.solo&&ve()},ae=(oe,Te)=>{const he=Pt(Ce(),{month:ne.value(Te),year:$.value(Te)}),Ae=oe<0?ds(he,1):Al(he,1);x(at(Ae),Xe(Ae),oe<0,t.preventMinMaxNavigation)&&(D(Te,at(Ae),Xe(Ae)),e("update-month-year",{instance:Te,month:at(Ae),year:Xe(Ae)}),h.value.count&&!h.value.solo&&de(Te),n())},de=oe=>{for(let Te=oe-1;Te>=0;Te--){const he=Al(Pt(Ce(),{month:ne.value(Te+1),year:$.value(Te+1)}),1);D(Te,at(he),Xe(he))}for(let Te=oe+1;Te<=h.value.count-1;Te++){const he=ds(Pt(Ce(),{month:ne.value(Te-1),year:$.value(Te-1)}),1);D(Te,at(he),Xe(he))}},ve=()=>{if(Array.isArray(l.value)&&l.value.length===2){const oe=Ce(Ce(l.value[1]?l.value[1]:ds(l.value[0],1))),[Te,he]=[at(l.value[0]),Xe(l.value[0])],[Ae,Le]=[at(l.value[1]),Xe(l.value[1])];(Te!==Ae||Te===Ae&&he!==Le)&&h.value.solo&&D(1,at(oe),Xe(oe))}else l.value&&!Array.isArray(l.value)&&(D(0,at(l.value),Xe(l.value)),ie(Ce()))},W=()=>{t.startDate&&(D(0,at(Ce(t.startDate)),Xe(Ce(t.startDate))),h.value.count&&de(0))},fe=(oe,Te)=>{if(t.monthChangeOnScroll){const he=new Date().getTime()-r.value.getTime(),Ae=Math.abs(oe.deltaY);let Le=500;Ae>1&&(Le=100),Ae>100&&(Le=0),he>Le&&(r.value=new Date,ae(t.monthChangeOnScroll!=="inverse"?-oe.deltaY:oe.deltaY,Te))}},C=(oe,Te,he=!1)=>{t.monthChangeOnArrows&&t.vertical===he&&O(oe,Te)},O=(oe,Te)=>{ae(oe==="right"?-1:1,Te)},K=oe=>{if(v.value.markers)return Eh(oe.value,v.value.markers)},U=(oe,Te)=>{switch(t.sixWeeks===!0?"append":t.sixWeeks){case"prepend":return[!0,!1];case"center":return[oe==0,!0];case"fair":return[oe==0||Te>oe,!0];case"append":return[!1,!1];default:return[!1,!1]}},re=(oe,Te,he,Ae)=>{if(t.sixWeeks&&oe.length<6){const Le=6-oe.length,Ut=(Te.getDay()+7-Ae)%7,gn=6-(he.getDay()+7-Ae)%7,[Ri,Ws]=U(Ut,gn);for(let pn=1;pn<=Le;pn++)if(Ws?!!(pn%2)==Ri:Ri){const Cn=oe[0].days[0],Sn=j(ss(Cn.value,-7),at(Te));oe.unshift({days:Sn})}else{const Cn=oe[oe.length-1],Sn=Cn.days[Cn.days.length-1],ai=j(ss(Sn.value,1),at(Te));oe.push({days:ai})}}return oe},j=(oe,Te)=>{const he=Ce(oe),Ae=[];for(let Le=0;Le<7;Le++){const Ut=ss(he,Le),gn=at(Ut)!==Te;Ae.push({text:t.hideOffsetDates&&gn?"":Ut.getDate(),value:Ut,current:!gn,classData:{}})}return Ae},se=(oe,Te)=>{const he=[],Ae=new Date(Te,oe),Le=new Date(Te,oe+1,0),Ut=t.weekStart,gn=ps(Ae,{weekStartsOn:Ut}),Ri=Ws=>{const pn=j(Ws,oe);if(he.push({days:pn}),!he[he.length-1].days.some(Cn=>ct(oi(Cn.value),oi(Le)))){const Cn=ss(Ws,7);Ri(Cn)}};return Ri(gn),re(he,Ae,Le,Ut)},Q=oe=>{const Te=to(Ce(oe.value),u.hours,u.minutes,ze());e("date-update",Te),b.value.enabled?N_(Te,l,b.value.limit):l.value=Te,i(),Rn().then(()=>{Z()})},ge=oe=>p.value.noDisabledRange?tS(s.value[0],oe).some(Te=>E(Te)):!1,_e=()=>{s.value=l.value?l.value.slice():[],s.value.length===2&&!(p.value.fixedStart||p.value.fixedEnd)&&(s.value=[])},ye=(oe,Te)=>{const he=[Ce(oe.value),ss(Ce(oe.value),+p.value.autoRange)];w(he)?(Te&&ke(oe.value),s.value=he):e("invalid-date",oe.value)},ke=oe=>{const Te=at(Ce(oe)),he=Xe(Ce(oe));if(D(0,Te,he),h.value.count>0)for(let Ae=1;Ae{if(ge(oe.value)||!S(oe.value,l.value,p.value.fixedStart?0:1))return e("invalid-date",oe.value);s.value=uS(Ce(oe.value),l,e,p)},Be=(oe,Te)=>{if(_e(),p.value.autoRange)return ye(oe,Te);if(p.value.fixedStart||p.value.fixedEnd)return Me(oe);s.value[0]?S(Ce(oe.value),l.value)&&!ge(oe.value)?Qt(Ce(oe.value),Ce(s.value[0]))?(s.value.unshift(Ce(oe.value)),e("range-end",s.value[0])):(s.value[1]=Ce(oe.value),e("range-end",s.value[1])):(t.autoApply&&e("auto-apply-invalid",oe.value),e("invalid-date",oe.value)):(s.value[0]=Ce(oe.value),e("range-start",s.value[0]))},ze=(oe=!0)=>t.enableSeconds?Array.isArray(u.seconds)?oe?u.seconds[0]:u.seconds[1]:u.seconds:0,nt=oe=>{s.value[oe]=to(s.value[oe],u.hours[oe],u.minutes[oe],ze(oe!==1))},Qe=()=>{var oe,Te;s.value[0]&&s.value[1]&&+((oe=s.value)==null?void 0:oe[0])>+((Te=s.value)==null?void 0:Te[1])&&(s.value.reverse(),e("range-start",s.value[0]),e("range-end",s.value[1]))},qt=()=>{s.value.length&&(s.value[0]&&!s.value[1]?nt(0):(nt(0),nt(1),i()),Qe(),l.value=s.value.slice(),xf(s.value,e,t.autoApply,t.modelAuto))},Bt=(oe,Te=!1)=>{if(E(oe.value)||!oe.current&&t.hideOffsetDates)return e("invalid-date",oe.value);if(o.value=JSON.parse(JSON.stringify(oe)),!p.value.enabled)return Q(oe);mb(u.hours)&&mb(u.minutes)&&!b.value.enabled&&(Be(oe,Te),qt())},fn=(oe,Te)=>{var he;D(oe,Te.month,Te.year,!0),h.value.count&&!h.value.solo&&de(oe),e("update-month-year",{instance:oe,month:Te.month,year:Te.year}),n(h.value.solo?oe:void 0);const Ae=(he=t.flow)!=null&&he.length?t.flow[t.flowStep]:void 0;!Te.fromNav&&(Ae===Yn.month||Ae===Yn.year)&&i()},Kt=(oe,Te)=>{cS({value:oe,modelValue:l,range:p.value.enabled,timezone:Te?void 0:y.value.timezone}),z(),t.multiCalendars&&Rn().then(()=>H(!0))},Ei=()=>{const oe=D_(Ce(),y.value);p.value.enabled?l.value&&Array.isArray(l.value)&&l.value[0]?l.value=Qt(oe,l.value[0])?[oe,l.value[0]]:[l.value[0],oe]:l.value=[oe]:l.value=oe,z()},Xi=()=>{if(Array.isArray(l.value))if(b.value.enabled){const oe=Zt();l.value[l.value.length-1]=A(oe)}else l.value=l.value.map((oe,Te)=>oe&&A(oe,Te));else l.value=A(l.value);e("time-update")},Zt=()=>Array.isArray(l.value)&&l.value.length?l.value[l.value.length-1]:null;return{calendars:c,modelValue:l,month:ne,year:$,time:u,disabledTimesConfig:Y,today:d,validateTime:B,getCalendarDays:se,getMarker:K,handleScroll:fe,handleSwipe:O,handleArrow:C,selectDate:Bt,updateMonthYear:fn,presetDate:Kt,selectCurrentDate:Ei,updateTime:(oe,Te=!0,he=!1)=>{T(oe,Te,he,Xi)},assignMonthAndYear:ie}},hB={key:0},fB=hn({__name:"DatePicker",props:{..._s},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:x,presetDate:E,selectCurrentDate:w,updateTime:S,assignMonthAndYear:T}=dB(s,i,le,ie),A=_a(),{setHoverDate:k,getDayClassData:P,clearHoverDate:B}=kB(l,s),{defaultedMultiCalendars:Y}=jt(s),ne=xe([]),$=xe([]),F=xe(null),D=ki(A,"calendar"),z=ki(A,"monthYear"),X=ki(A,"timePicker"),Z=fe=>{s.shadow||i("mount",fe)};un(r,()=>{s.shadow||setTimeout(()=>{i("recalculate-position")},0)},{deep:!0}),un(Y,(fe,C)=>{fe.count-C.count>0&&T()},{deep:!0});const H=be(()=>fe=>f(o.value(fe),a.value(fe)).map(C=>({...C,days:C.days.map(O=>(O.marker=p(O),O.classData=P(O),O))})));function le(fe){var C;fe||fe===0?(C=$.value[fe])==null||C.triggerTransition(o.value(fe),a.value(fe)):$.value.forEach((O,K)=>O.triggerTransition(o.value(K),a.value(K)))}function ie(){i("update-flow-step")}const te=(fe,C=!1)=>{b(fe,C),s.spaceConfirm&&i("select-date")},I=(fe,C,O=0)=>{var K;(K=ne.value[O])==null||K.toggleMonthPicker(fe,C)},ee=(fe,C,O=0)=>{var K;(K=ne.value[O])==null||K.toggleYearPicker(fe,C)},ue=(fe,C,O)=>{var K;(K=F.value)==null||K.toggleTimePicker(fe,C,O)},L=(fe,C)=>{var O;if(!s.range){const K=l.value?l.value:d,U=C?new Date(C):K,re=fe?ps(U,{weekStartsOn:1}):OC(U,{weekStartsOn:1});b({value:re,current:at(U)===o.value(0),text:"",classData:{}}),(O=document.getElementById(oS(re)))==null||O.focus()}},ae=fe=>{var C;(C=ne.value[0])==null||C.handleMonthYearChange(fe,!0)},de=fe=>{x(0,{month:o.value(0),year:a.value(0)+(fe?1:-1),fromNav:!0})},ve=(fe,C)=>{fe===Yn.time&&i(`time-picker-${C?"open":"close"}`),i("overlay-toggle",{open:C,overlay:fe})},W=fe=>{i("overlay-toggle",{open:!1,overlay:fe}),i("focus-menu")};return e({clearHoverDate:B,presetDate:E,selectCurrentDate:w,toggleMonthPicker:I,toggleYearPicker:ee,toggleTimePicker:ue,handleArrow:m,updateMonthYear:x,getSidebarProps:()=>({modelValue:l,month:o,year:a,time:c,updateTime:S,updateMonthYear:x,selectDate:b,presetDate:E}),changeMonth:ae,changeYear:de,selectWeekDate:L}),(fe,C)=>(R(),V(Oe,null,[N(wf,{"multi-calendars":J(Y).count,collapse:fe.collapse},{default:De(({instance:O,index:K})=>[fe.disableMonthYearSelect?ce("",!0):(R(),Se(iB,wn({key:0,ref:U=>{U&&(ne.value[K]=U)},months:J(XC)(fe.formatLocale,fe.locale,fe.monthNameFormat),years:J(R_)(fe.yearRange,fe.locale,fe.reverseYears),month:J(o)(O),year:J(a)(O),instance:O},fe.$props,{onMount:C[0]||(C[0]=U=>Z(J(ta).header)),onResetFlow:C[1]||(C[1]=U=>fe.$emit("reset-flow")),onUpdateMonthYear:U=>J(x)(O,U),onOverlayClosed:W,onOverlayOpened:C[2]||(C[2]=U=>fe.$emit("overlay-toggle",{open:!0,overlay:U}))}),Un({_:2},[Ze(J(z),(U,re)=>({name:U,fn:De(j=>[Ne(fe.$slots,U,In(ni(j)))])}))]),1040,["months","years","month","year","instance","onUpdateMonthYear"])),N(uB,wn({ref:U=>{U&&($.value[K]=U)},"mapped-dates":H.value(O),month:J(o)(O),year:J(a)(O),instance:O},fe.$props,{onSelectDate:U=>J(b)(U,O!==1),onHandleSpace:U=>te(U,O!==1),onSetHoverDate:C[3]||(C[3]=U=>J(k)(U)),onHandleScroll:U=>J(y)(U,O),onHandleSwipe:U=>J(v)(U,O),onMount:C[4]||(C[4]=U=>Z(J(ta).calendar)),onResetFlow:C[5]||(C[5]=U=>fe.$emit("reset-flow")),onTooltipOpen:C[6]||(C[6]=U=>fe.$emit("tooltip-open",U)),onTooltipClose:C[7]||(C[7]=U=>fe.$emit("tooltip-close",U))}),Un({_:2},[Ze(J(D),(U,re)=>({name:U,fn:De(j=>[Ne(fe.$slots,U,In(ni({...j})))])}))]),1040,["mapped-dates","month","year","instance","onSelectDate","onHandleSpace","onHandleScroll","onHandleSwipe"])]),_:3},8,["multi-calendars","collapse"]),fe.enableTimePicker?(R(),V("div",hB,[fe.$slots["time-picker"]?Ne(fe.$slots,"time-picker",In(wn({key:0},{time:J(c),updateTime:J(S)}))):(R(),Se(hS,wn({key:1,ref_key:"timePickerRef",ref:F},fe.$props,{hours:J(c).hours,minutes:J(c).minutes,seconds:J(c).seconds,"internal-model-value":fe.internalModelValue,"disabled-times-config":J(u),"validate-time":J(h),onMount:C[8]||(C[8]=O=>Z(J(ta).timePicker)),"onUpdate:hours":C[9]||(C[9]=O=>J(S)(O)),"onUpdate:minutes":C[10]||(C[10]=O=>J(S)(O,!1)),"onUpdate:seconds":C[11]||(C[11]=O=>J(S)(O,!1,!0)),onResetFlow:C[12]||(C[12]=O=>fe.$emit("reset-flow")),onOverlayClosed:C[13]||(C[13]=O=>ve(O,!1)),onOverlayOpened:C[14]||(C[14]=O=>ve(O,!0)),onAmPmChange:C[15]||(C[15]=O=>fe.$emit("am-pm-change",O))}),Un({_:2},[Ze(J(X),(O,K)=>({name:O,fn:De(U=>[Ne(fe.$slots,O,In(ni(U)))])}))]),1040,["hours","minutes","seconds","internal-model-value","disabled-times-config","validate-time"]))])):ce("",!0)],64))}}),gB=(t,e)=>{const n=xe(),{defaultedMultiCalendars:i,defaultedConfig:s,defaultedHighlight:r,defaultedRange:o,propDates:a,defaultedFilters:l,defaultedMultiDates:c}=jt(t),{modelValue:u,year:d,month:h,calendars:f}=Wu(t,e),{isDisabled:p}=yo(t),{selectYear:m,groupedYears:y,showYearPicker:v,isDisabled:b,toggleYearPicker:x,handleYearSelect:E,handleYear:w}=dS({modelValue:u,multiCalendars:i,range:o,highlight:r,calendars:f,propDates:a,month:h,year:d,filters:l,props:t,emit:e}),S=(F,D)=>[F,D].map(z=>Os(z,"MMMM",{locale:t.formatLocale})).join("-"),T=be(()=>F=>u.value?Array.isArray(u.value)?u.value.some(D=>ab(F,D)):ab(u.value,F):!1),A=F=>{if(o.value.enabled){if(Array.isArray(u.value)){const D=ct(F,u.value[0])||ct(F,u.value[1]);return vf(u.value,n.value,F)&&!D}return!1}return!1},k=(F,D)=>F.quarter===tb(D)&&F.year===Xe(D),P=F=>typeof r.value=="function"?r.value({quarter:tb(F),year:Xe(F)}):!!r.value.quarters.find(D=>k(D,F)),B=be(()=>F=>{const D=Pt(new Date,{year:d.value(F)});return G3({start:lu(D),end:LC(D)}).map(z=>{const X=Uo(z),Z=nb(z),H=p(z),le=A(X),ie=P(X);return{text:S(X,Z),value:X,active:T.value(X),highlighted:ie,disabled:H,isBetween:le}})}),Y=F=>{N_(F,u,c.value.limit),e("auto-apply",!0)},ne=F=>{u.value=F_(u,F,e),xf(u.value,e,t.autoApply,t.modelAuto)},$=F=>{u.value=F,e("auto-apply")};return{defaultedConfig:s,defaultedMultiCalendars:i,groupedYears:y,year:d,isDisabled:b,quarters:B,showYearPicker:v,modelValue:u,setHoverDate:F=>{n.value=F},selectYear:m,selectQuarter:(F,D,z)=>{if(!z)return f.value[D].month=at(nb(F)),c.value.enabled?Y(F):o.value.enabled?ne(F):$(F)},toggleYearPicker:x,handleYearSelect:E,handleYear:w}},pB={class:"dp--quarter-items"},mB=["data-test","disabled","onClick","onMouseover"],_B=hn({compatConfig:{MODE:3},__name:"QuarterPicker",props:{..._s},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=_a(),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:x}=gB(s,i);return e({getSidebarProps:()=>({modelValue:f,year:u,selectQuarter:y,handleYearSelect:b,handleYear:x})}),(E,w)=>(R(),Se(wf,{"multi-calendars":J(a).count,collapse:E.collapse,stretch:""},{default:De(({instance:S})=>[g("div",{class:"dp-quarter-picker-wrap",style:Pn({minHeight:`${J(l).modeHeight}px`})},[E.$slots["top-extra"]?Ne(E.$slots,"top-extra",{key:0,value:E.internalModelValue}):ce("",!0),g("div",null,[N(lS,wn(E.$props,{items:J(c)(S),instance:S,"show-year-picker":J(p)[S],year:J(u)(S),"is-disabled":T=>J(d)(S,T),onHandleYear:T=>J(x)(S,T),onYearSelect:T=>J(b)(T,S),onToggleYearPicker:T=>J(v)(S,T?.flow,T?.show)}),Un({_:2},[Ze(J(o),(T,A)=>({name:T,fn:De(k=>[Ne(E.$slots,T,In(ni(k)))])}))]),1040,["items","instance","show-year-picker","year","is-disabled","onHandleYear","onYearSelect","onToggleYearPicker"])]),g("div",pB,[(R(!0),V(Oe,null,Ze(J(h)(S),(T,A)=>(R(),V("div",{key:A},[g("button",{type:"button",class:Pe(["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:k=>J(y)(T.value,S,T.disabled),onMouseover:k=>J(m)(T.value)},[E.$slots.quarter?Ne(E.$slots,"quarter",{key:0,value:T.value,text:T.text}):(R(),V(Oe,{key:1},[Ue(we(T.text),1)],64))],42,mB)]))),128))])],4)]),_:3},8,["multi-calendars","collapse"]))}}),yB=["id","tabindex","role","aria-label"],vB={key:0,class:"dp--menu-load-container"},bB={key:1,class:"dp--menu-header"},wB={key:0,class:"dp__sidebar_left"},xB=["data-test","onClick","onKeydown"],EB={key:2,class:"dp__sidebar_right"},CB={key:3,class:"dp__action_extra"},_b=hn({compatConfig:{MODE:3},__name:"DatepickerMenu",props:{...bf,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=xe(null),o=be(()=>{const{openOnTop:j,...se}=s;return{...se,flowStep:k.value,collapse:s.collapse,noOverlayFocus:s.noOverlayFocus,menuWrapRef:r.value}}),{setMenuFocused:a,setShiftKey:l,control:c}=aS(),u=_a(),{defaultedTextInput:d,defaultedInline:h,defaultedConfig:f,defaultedUI:p}=jt(s),m=xe(null),y=xe(0),v=xe(null),b=xe(!1),x=xe(null);En(()=>{if(!s.shadow){b.value=!0,E(),window.addEventListener("resize",E);const j=vn(r);if(j&&!d.value.enabled&&!h.value.enabled&&(a(!0),D()),j){const se=Q=>{f.value.allowPreventDefault&&Q.preventDefault(),eo(Q,f.value,!0)};j.addEventListener("pointerdown",se),j.addEventListener("mousedown",se)}}}),pa(()=>{window.removeEventListener("resize",E)});const E=()=>{const j=vn(v);j&&(y.value=j.getBoundingClientRect().width)},{arrowRight:w,arrowLeft:S,arrowDown:T,arrowUp:A}=_o(),{flowStep:k,updateFlowStep:P,childMount:B,resetFlow:Y,handleFlow:ne}=MB(s,i,x),$=be(()=>s.monthPicker?$4:s.yearPicker?F4:s.timePicker?Z4:s.quarterPicker?_B:fB),F=be(()=>{var j;if(f.value.arrowLeft)return f.value.arrowLeft;const se=(j=r.value)==null?void 0:j.getBoundingClientRect(),Q=s.getInputRect();return Q?.width=(se?.right??0)&&Q?.width{const j=vn(r);j&&j.focus({preventScroll:!0})},z=be(()=>{var j;return((j=x.value)==null?void 0:j.getSidebarProps())||{}}),X=()=>{s.openOnTop&&i("recalculate-position")},Z=ki(u,"action"),H=be(()=>s.monthPicker||s.yearPicker?ki(u,"monthYear"):s.timePicker?ki(u,"timePicker"):ki(u,"shared")),le=be(()=>s.openOnTop?"dp__arrow_bottom":"dp__arrow_top"),ie=be(()=>({dp__menu_disabled:s.disabled,dp__menu_readonly:s.readonly,"dp-menu-loading":s.loading})),te=be(()=>({dp__menu:!0,dp__menu_index:!h.value.enabled,dp__relative:h.value.enabled,...p.value.menu??{}})),I=j=>{eo(j,f.value,!0)},ee=()=>{s.escClose&&i("close-picker")},ue=j=>{if(s.arrowNavigation){if(j===Jn.up)return A();if(j===Jn.down)return T();if(j===Jn.left)return S();if(j===Jn.right)return w()}else j===Jn.left||j===Jn.up?W("handleArrow",Jn.left,0,j===Jn.up):W("handleArrow",Jn.right,0,j===Jn.down)},L=j=>{l(j.shiftKey),!s.disableMonthYearSelect&&j.code===Ot.tab&&j.target.classList.contains("dp__menu")&&c.value.shiftKeyInMenu&&(j.preventDefault(),eo(j,f.value,!0),i("close-picker"))},ae=()=>{D(),i("time-picker-close")},de=j=>{var se,Q,ge;(se=x.value)==null||se.toggleTimePicker(!1,!1),(Q=x.value)==null||Q.toggleMonthPicker(!1,!1,j),(ge=x.value)==null||ge.toggleYearPicker(!1,!1,j)},ve=(j,se=0)=>{var Q,ge,_e;return j==="month"?(Q=x.value)==null?void 0:Q.toggleMonthPicker(!1,!0,se):j==="year"?(ge=x.value)==null?void 0:ge.toggleYearPicker(!1,!0,se):j==="time"?(_e=x.value)==null?void 0:_e.toggleTimePicker(!0,!1):de(se)},W=(j,...se)=>{var Q,ge;(Q=x.value)!=null&&Q[j]&&((ge=x.value)==null||ge[j](...se))},fe=()=>{W("selectCurrentDate")},C=(j,se)=>{W("presetDate",j,se)},O=()=>{W("clearHoverDate")},K=(j,se)=>{W("updateMonthYear",j,se)},U=(j,se)=>{j.preventDefault(),ue(se)},re=j=>{var se,Q,ge;if(L(j),j.key===Ot.home||j.key===Ot.end)return W("selectWeekDate",j.key===Ot.home,j.target.getAttribute("id"));switch((j.key===Ot.pageUp||j.key===Ot.pageDown)&&(j.shiftKey?(W("changeYear",j.key===Ot.pageUp),(se=em(r.value,"overlay-year"))==null||se.focus()):(W("changeMonth",j.key===Ot.pageUp),(Q=em(r.value,j.key===Ot.pageUp?"action-prev":"action-next"))==null||Q.focus()),j.target.getAttribute("id")&&((ge=r.value)==null||ge.focus({preventScroll:!0}))),j.key){case Ot.esc:return ee();case Ot.arrowLeft:return U(j,Jn.left);case Ot.arrowRight:return U(j,Jn.right);case Ot.arrowUp:return U(j,Jn.up);case Ot.arrowDown:return U(j,Jn.down);default:return}};return e({updateMonthYear:K,switchView:ve,handleFlow:ne}),(j,se)=>{var Q,ge,_e;return R(),V("div",{id:j.uid?`dp-menu-${j.uid}`:void 0,ref_key:"dpMenuRef",ref:r,tabindex:J(h).enabled?void 0:"0",role:J(h).enabled?void 0:"dialog","aria-label":(Q=j.ariaLabels)==null?void 0:Q.menu,class:Pe(te.value),style:Pn({"--dp-arrow-left":F.value}),onMouseleave:O,onClick:I,onKeydown:re},[(j.disabled||j.readonly)&&J(h).enabled||j.loading?(R(),V("div",{key:0,class:Pe(ie.value)},[j.loading?(R(),V("div",vB,se[19]||(se[19]=[g("span",{class:"dp--menu-loader"},null,-1)]))):ce("",!0)],2)):ce("",!0),j.$slots["menu-header"]?(R(),V("div",bB,[Ne(j.$slots,"menu-header")])):ce("",!0),!J(h).enabled&&!j.teleportCenter?(R(),V("div",{key:2,class:Pe(le.value)},null,2)):ce("",!0),g("div",{ref_key:"innerMenuRef",ref:v,class:Pe({dp__menu_content_wrapper:((ge=j.presetDates)==null?void 0:ge.length)||!!j.$slots["left-sidebar"]||!!j.$slots["right-sidebar"],"dp--menu-content-wrapper-collapsed":t.collapse&&(((_e=j.presetDates)==null?void 0:_e.length)||!!j.$slots["left-sidebar"]||!!j.$slots["right-sidebar"])}),style:Pn({"--dp-menu-width":`${y.value}px`})},[j.$slots["left-sidebar"]?(R(),V("div",wB,[Ne(j.$slots,"left-sidebar",In(ni(z.value)))])):ce("",!0),j.presetDates.length?(R(),V("div",{key:1,class:Pe({"dp--preset-dates-collapsed":t.collapse,"dp--preset-dates":!0})},[(R(!0),V(Oe,null,Ze(j.presetDates,(ye,ke)=>(R(),V(Oe,{key:ke},[ye.slot?Ne(j.$slots,ye.slot,{key:0,presetDate:C,label:ye.label,value:ye.value}):(R(),V("button",{key:1,type:"button",style:Pn(ye.style||{}),class:Pe(["dp__btn dp--preset-range",{"dp--preset-range-collapsed":t.collapse}]),"data-test":ye.testId??void 0,onClick:ru(Me=>C(ye.value,ye.noTz),["prevent"]),onKeydown:Me=>J(ii)(Me,()=>C(ye.value,ye.noTz),!0)},we(ye.label),47,xB))],64))),128))],2)):ce("",!0),g("div",{ref_key:"calendarWrapperRef",ref:m,class:"dp__instance_calendar",role:"document"},[(R(),Se(ma($.value),wn({ref_key:"dynCmpRef",ref:x},o.value,{"flow-step":J(k),onMount:J(B),onUpdateFlowStep:J(P),onResetFlow:J(Y),onFocusMenu:D,onSelectDate:se[0]||(se[0]=ye=>j.$emit("select-date")),onDateUpdate:se[1]||(se[1]=ye=>j.$emit("date-update",ye)),onTooltipOpen:se[2]||(se[2]=ye=>j.$emit("tooltip-open",ye)),onTooltipClose:se[3]||(se[3]=ye=>j.$emit("tooltip-close",ye)),onAutoApply:se[4]||(se[4]=ye=>j.$emit("auto-apply",ye)),onRangeStart:se[5]||(se[5]=ye=>j.$emit("range-start",ye)),onRangeEnd:se[6]||(se[6]=ye=>j.$emit("range-end",ye)),onInvalidFixedRange:se[7]||(se[7]=ye=>j.$emit("invalid-fixed-range",ye)),onTimeUpdate:se[8]||(se[8]=ye=>j.$emit("time-update")),onAmPmChange:se[9]||(se[9]=ye=>j.$emit("am-pm-change",ye)),onTimePickerOpen:se[10]||(se[10]=ye=>j.$emit("time-picker-open",ye)),onTimePickerClose:ae,onRecalculatePosition:X,onUpdateMonthYear:se[11]||(se[11]=ye=>j.$emit("update-month-year",ye)),onAutoApplyInvalid:se[12]||(se[12]=ye=>j.$emit("auto-apply-invalid",ye)),onInvalidDate:se[13]||(se[13]=ye=>j.$emit("invalid-date",ye)),onOverlayToggle:se[14]||(se[14]=ye=>j.$emit("overlay-toggle",ye)),"onUpdate:internalModelValue":se[15]||(se[15]=ye=>j.$emit("update:internal-model-value",ye))}),Un({_:2},[Ze(H.value,(ye,ke)=>({name:ye,fn:De(Me=>[Ne(j.$slots,ye,In(ni({...Me})))])}))]),1040,["flow-step","onMount","onUpdateFlowStep","onResetFlow"]))],512),j.$slots["right-sidebar"]?(R(),V("div",EB,[Ne(j.$slots,"right-sidebar",In(ni(z.value)))])):ce("",!0),j.$slots["action-extra"]?(R(),V("div",CB,[j.$slots["action-extra"]?Ne(j.$slots,"action-extra",{key:0,selectCurrentDate:fe}):ce("",!0)])):ce("",!0)],6),!j.autoApply||J(f).keepActionRow?(R(),Se(k4,wn({key:3,"menu-mount":b.value},o.value,{"calendar-width":y.value,onClosePicker:se[16]||(se[16]=ye=>j.$emit("close-picker")),onSelectDate:se[17]||(se[17]=ye=>j.$emit("select-date")),onInvalidSelect:se[18]||(se[18]=ye=>j.$emit("invalid-select")),onSelectNow:fe}),Un({_:2},[Ze(J(Z),(ye,ke)=>({name:ye,fn:De(Me=>[Ne(j.$slots,ye,In(ni({...Me})))])}))]),1040,["menu-mount","calendar-width"])):ce("",!0)],46,yB)}}});var Xa=(t=>(t.center="center",t.left="left",t.right="right",t))(Xa||{});const SB=({menuRef:t,menuRefInner:e,inputRef:n,pickerWrapperRef:i,inline:s,emit:r,props:o,slots:a})=>{const{defaultedConfig:l}=jt(o),c=xe({}),u=xe(!1),d=xe({top:"0",left:"0"}),h=xe(!1),f=tu(o,"teleportCenter");un(f,()=>{d.value=JSON.parse(JSON.stringify({})),w()});const p=D=>{if(o.teleport){const z=D.getBoundingClientRect();return{left:z.left+window.scrollX,top:z.top+window.scrollY}}return{top:0,left:0}},m=(D,z)=>{d.value.left=`${D+z-c.value.width}px`},y=D=>{d.value.left=`${D}px`},v=(D,z)=>{o.position===Xa.left&&y(D),o.position===Xa.right&&m(D,z),o.position===Xa.center&&(d.value.left=`${D+z/2-c.value.width/2}px`)},b=D=>{const{width:z,height:X}=D.getBoundingClientRect(),{top:Z,left:H}=o.altPosition?o.altPosition(D):p(D);return{top:+Z,left:+H,width:z,height:X}},x=()=>{d.value.left="50%",d.value.top="50%",d.value.transform="translate(-50%, -50%)",d.value.position="fixed",delete d.value.opacity},E=()=>{const D=vn(n),{top:z,left:X,transform:Z}=o.altPosition(D);d.value={top:`${z}px`,left:`${X}px`,transform:Z??""}},w=(D=!0)=>{var z;if(!s.value.enabled){if(f.value)return x();if(o.altPosition!==null)return E();if(D){const X=o.teleport?(z=e.value)==null?void 0:z.$el:t.value;X&&(c.value=X.getBoundingClientRect()),r("recalculate-position")}return Y()}},S=({inputEl:D,left:z,width:X})=>{window.screen.width>768&&!u.value&&v(z,X),k(D)},T=D=>{const{top:z,left:X,height:Z,width:H}=b(D);d.value.top=`${Z+z+ +o.offset}px`,h.value=!1,u.value||(d.value.left=`${X+H/2-c.value.width/2}px`),S({inputEl:D,left:X,width:H})},A=D=>{const{top:z,left:X,width:Z}=b(D);d.value.top=`${z-+o.offset-c.value.height}px`,h.value=!0,S({inputEl:D,left:X,width:Z})},k=D=>{if(o.autoPosition){const{left:z,width:X}=b(D),{left:Z,right:H}=c.value;if(!u.value){if(Math.abs(Z)!==Math.abs(H)){if(Z<=0)return u.value=!0,y(z);if(H>=document.documentElement.clientWidth)return u.value=!0,m(z,X)}return v(z,X)}}},P=()=>{const D=vn(n);if(D){const{height:z}=c.value,{top:X,height:Z}=D.getBoundingClientRect(),H=window.innerHeight-X-Z,le=X;return z<=H?Wo.bottom:z>H&&z<=le?Wo.top:H>=le?Wo.bottom:Wo.top}return Wo.bottom},B=D=>P()===Wo.bottom?T(D):A(D),Y=()=>{const D=vn(n);if(D)return o.autoPosition?B(D):T(D)},ne=function(D){if(D){const z=D.scrollHeight>D.clientHeight,X=window.getComputedStyle(D).overflowY.indexOf("hidden")!==-1;return z&&!X}return!0},$=function(D){return!D||D===document.body||D.nodeType===Node.DOCUMENT_FRAGMENT_NODE?window:ne(D)?D:$(D.assignedSlot&&l.value.shadowDom?D.assignedSlot.parentNode:D.parentNode)},F=D=>{if(D)switch(o.position){case Xa.left:return{left:0,transform:"translateX(0)"};case Xa.right:return{left:`${D.width}px`,transform:"translateX(-100%)"};default:return{left:`${D.width/2}px`,transform:"translateX(-50%)"}}return{}};return{openOnTop:h,menuStyle:d,xCorrect:u,setMenuPosition:w,getScrollableParent:$,shadowRender:(D,z)=>{var X,Z,H;const le=document.createElement("div"),ie=(X=vn(n))==null?void 0:X.getBoundingClientRect();le.setAttribute("id","dp--temp-container");const te=(Z=i.value)!=null&&Z.clientWidth?i.value:document.body;te.append(le);const I=F(ie),ee=l.value.shadowDom?Object.keys(a).filter(L=>["right-sidebar","left-sidebar","top-extra","action-extra"].includes(L)):Object.keys(a),ue=ua(D,{...z,shadow:!0,style:{opacity:0,position:"absolute",...I}},Object.fromEntries(ee.map(L=>[L,a[L]])));I0(ue,le),c.value=(H=ue.el)==null?void 0:H.getBoundingClientRect(),I0(null,le),te.removeChild(le)}}},Pr=[{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"]}],TB=[{name:"trigger"},{name:"input-icon"},{name:"clear-icon"},{name:"dp-input"}],AB={all:()=>Pr,monthYear:()=>Pr.filter(t=>t.use.includes("month-year")),input:()=>TB,timePicker:()=>Pr.filter(t=>t.use.includes("time")),action:()=>Pr.filter(t=>t.use.includes("action")),calendar:()=>Pr.filter(t=>t.use.includes("calendar")),menu:()=>Pr.filter(t=>t.use.includes("menu")),shared:()=>Pr.filter(t=>t.use.includes("shared")),yearMode:()=>Pr.filter(t=>t.use.includes("year-mode"))},ki=(t,e,n)=>{const i=[];return AB[e]().forEach(s=>{t[s.name]&&i.push(s.name)}),n!=null&&n.length&&n.forEach(s=>{s.slot&&i.push(s.slot)}),i},zu=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}},Wu=(t,e,n)=>{const{defaultedRange:i,defaultedTz:s}=jt(t),r=Ce(xi(Ce(),s.value.timezone)),o=xe([{month:at(r),year:Xe(r)}]),a=h=>{const f={hours:yr(r),minutes:ao(r),seconds:0};return i.value.enabled?[f[h],f[h]]:f[h]},l=Ki({hours:a("hours"),minutes:a("minutes"),seconds:a("seconds")});un(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 un(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}},kB=(t,e)=>{const{defaultedMultiCalendars:n,defaultedMultiDates:i,defaultedUI:s,defaultedHighlight:r,defaultedTz:o,propDates:a,defaultedRange:l}=jt(e),{isDisabled:c}=yo(e),u=xe(null),d=xe(xi(new Date,o.value.timezone)),h=I=>{!I.current&&e.hideOffsetDates||(u.value=I.value)},f=()=>{u.value=null},p=I=>Array.isArray(t.value)&&l.value.enabled&&t.value[0]&&u.value?I?on(u.value,t.value[0]):Qt(u.value,t.value[0]):!0,m=(I,ee)=>{const ue=()=>t.value?ee?t.value[0]||null:t.value[1]:null,L=t.value&&Array.isArray(t.value)?ue():null;return ct(Ce(I.value),L)},y=I=>{const ee=Array.isArray(t.value)?t.value[0]:null;return I?!Qt(u.value??null,ee):!0},v=(I,ee=!0)=>(l.value.enabled||e.weekPicker)&&Array.isArray(t.value)&&t.value.length===2?e.hideOffsetDates&&!I.current?!1:ct(Ce(I.value),t.value[ee?0:1]):l.value.enabled?m(I,ee)&&y(ee)||ct(I.value,Array.isArray(t.value)?t.value[0]:null)&&p(ee):!1,b=(I,ee)=>{if(Array.isArray(t.value)&&t.value[0]&&t.value.length===1){const ue=ct(I.value,u.value);return ee?on(t.value[0],I.value)&&ue:Qt(t.value[0],I.value)&&ue}return!1},x=I=>!t.value||e.hideOffsetDates&&!I.current?!1:l.value.enabled?e.modelAuto&&Array.isArray(t.value)?ct(I.value,t.value[0]?t.value[0]:d.value):!1:i.value.enabled&&Array.isArray(t.value)?t.value.some(ee=>ct(ee,I.value)):ct(I.value,t.value?t.value:d.value),E=I=>{if(l.value.autoRange||e.weekPicker){if(u.value){if(e.hideOffsetDates&&!I.current)return!1;const ee=ss(u.value,+l.value.autoRange),ue=nr(Ce(u.value),e.weekStart);return e.weekPicker?ct(ue[1],Ce(I.value)):ct(ee,Ce(I.value))}return!1}return!1},w=I=>{if(l.value.autoRange||e.weekPicker){if(u.value){const ee=ss(u.value,+l.value.autoRange);if(e.hideOffsetDates&&!I.current)return!1;const ue=nr(Ce(u.value),e.weekStart);return e.weekPicker?on(I.value,ue[0])&&Qt(I.value,ue[1]):on(I.value,u.value)&&Qt(I.value,ee)}return!1}return!1},S=I=>{if(l.value.autoRange||e.weekPicker){if(u.value){if(e.hideOffsetDates&&!I.current)return!1;const ee=nr(Ce(u.value),e.weekStart);return e.weekPicker?ct(ee[0],I.value):ct(u.value,I.value)}return!1}return!1},T=I=>vf(t.value,u.value,I.value),A=()=>e.modelAuto&&Array.isArray(e.internalModelValue)?!!e.internalModelValue[0]:!1,k=()=>e.modelAuto?qC(e.internalModelValue):!0,P=I=>{if(e.weekPicker)return!1;const ee=l.value.enabled?!v(I)&&!v(I,!1):!0;return!c(I.value)&&!x(I)&&!(!I.current&&e.hideOffsetDates)&&ee},B=I=>l.value.enabled?e.modelAuto?A()&&x(I):!1:x(I),Y=I=>r.value?Q5(I.value,a.value.highlight):!1,ne=I=>{const ee=c(I.value);return ee&&(typeof r.value=="function"?!r.value(I.value,ee):!r.value.options.highlightDisabled)},$=I=>{var ee;return typeof r.value=="function"?r.value(I.value):(ee=r.value.weekdays)==null?void 0:ee.includes(I.value.getDay())},F=I=>(l.value.enabled||e.weekPicker)&&(!(n.value.count>0)||I.current)&&k()&&!(!I.current&&e.hideOffsetDates)&&!x(I)?T(I):!1,D=I=>{const{isRangeStart:ee,isRangeEnd:ue}=H(I),L=l.value.enabled?ee||ue:!1;return{dp__cell_offset:!I.current,dp__pointer:!e.disabled&&!(!I.current&&e.hideOffsetDates)&&!c(I.value),dp__cell_disabled:c(I.value),dp__cell_highlight:!ne(I)&&(Y(I)||$(I))&&!B(I)&&!L&&!S(I)&&!(F(I)&&e.weekPicker)&&!ue,dp__cell_highlight_active:!ne(I)&&(Y(I)||$(I))&&B(I),dp__today:!e.noToday&&ct(I.value,d.value)&&I.current,"dp--past":Qt(I.value,d.value),"dp--future":on(I.value,d.value)}},z=I=>({dp__active_date:B(I),dp__date_hover:P(I)}),X=I=>{if(t.value&&!Array.isArray(t.value)){const ee=nr(t.value,e.weekStart);return{...ie(I),dp__range_start:ct(ee[0],I.value),dp__range_end:ct(ee[1],I.value),dp__range_between_week:on(I.value,ee[0])&&Qt(I.value,ee[1])}}return{...ie(I)}},Z=I=>{if(t.value&&Array.isArray(t.value)){const ee=nr(t.value[0],e.weekStart),ue=t.value[1]?nr(t.value[1],e.weekStart):[];return{...ie(I),dp__range_start:ct(ee[0],I.value)||ct(ue[0],I.value),dp__range_end:ct(ee[1],I.value)||ct(ue[1],I.value),dp__range_between_week:on(I.value,ee[0])&&Qt(I.value,ee[1])||on(I.value,ue[0])&&Qt(I.value,ue[1]),dp__range_between:on(I.value,ee[1])&&Qt(I.value,ue[0])}}return{...ie(I)}},H=I=>{const ee=n.value.count>0?I.current&&v(I)&&k():v(I)&&k(),ue=n.value.count>0?I.current&&v(I,!1)&&k():v(I,!1)&&k();return{isRangeStart:ee,isRangeEnd:ue}},le=I=>{const{isRangeStart:ee,isRangeEnd:ue}=H(I);return{dp__range_start:ee,dp__range_end:ue,dp__range_between:F(I),dp__date_hover:ct(I.value,u.value)&&!ee&&!ue&&!e.weekPicker,dp__date_hover_start:b(I,!0),dp__date_hover_end:b(I,!1)}},ie=I=>({...le(I),dp__cell_auto_range:w(I),dp__cell_auto_range_start:S(I),dp__cell_auto_range_end:E(I)}),te=I=>l.value.enabled?l.value.autoRange?ie(I):e.modelAuto?{...z(I),...le(I)}:e.weekPicker?Z(I):le(I):e.weekPicker?X(I):z(I);return{setHoverDate:h,clearHoverDate:f,getDayClassData:I=>e.hideOffsetDates&&!I.current?{}:{...D(I),...te(I),[e.dayClass?e.dayClass(I.value,e.internalModelValue):""]:!0,...s.value.calendarCell??{}}}},yo=t=>{const{defaultedFilters:e,defaultedRange:n,propDates:i,defaultedMultiDates:s}=jt(t),r=$=>i.value.disabledDates?typeof i.value.disabledDates=="function"?i.value.disabledDates(Ce($)):!!Eh($,i.value.disabledDates):!1,o=$=>i.value.maxDate?t.yearPicker?Xe($)>Xe(i.value.maxDate):on($,i.value.maxDate):!1,a=$=>i.value.minDate?t.yearPicker?Xe($){const F=o($),D=a($),z=r($),X=e.value.months.map(te=>+te).includes(at($)),Z=t.disabledWeekDays.length?t.disabledWeekDays.some(te=>+te===zF($)):!1,H=f($),le=Xe($),ie=le<+t.yearRange[0]||le>+t.yearRange[1];return!(F||D||z||X||ie||Z||H)},c=($,F)=>Qt(...Kr(i.value.minDate,$,F))||ct(...Kr(i.value.minDate,$,F)),u=($,F)=>on(...Kr(i.value.maxDate,$,F))||ct(...Kr(i.value.maxDate,$,F)),d=($,F,D)=>{let z=!1;return i.value.maxDate&&D&&u($,F)&&(z=!0),i.value.minDate&&!D&&c($,F)&&(z=!0),z},h=($,F,D,z)=>{let X=!1;return z&&(i.value.minDate||i.value.maxDate)?i.value.minDate&&i.value.maxDate?X=d($,F,D):(i.value.minDate&&c($,F)||i.value.maxDate&&u($,F))&&(X=!0):X=!0,X},f=$=>Array.isArray(i.value.allowedDates)&&!i.value.allowedDates.length?!0:i.value.allowedDates?!Eh($,i.value.allowedDates):!1,p=$=>!l($),m=$=>n.value.noDisabledRange?!RC({start:$[0],end:$[1]}).some(F=>p(F)):!0,y=$=>{if($){const F=Xe($);return F>=+t.yearRange[0]&&F<=t.yearRange[1]}return!0},v=($,F)=>!!(Array.isArray($)&&$[F]&&(n.value.maxRange||n.value.minRange)&&y($[F])),b=($,F,D=0)=>{if(v(F,D)&&y($)){const z=IC($,F[D]),X=tS(F[D],$),Z=X.length===1?0:X.filter(le=>p(le)).length,H=Math.abs(z)-(n.value.minMaxRawRange?0:Z);if(n.value.minRange&&n.value.maxRange)return H>=+n.value.minRange&&H<=+n.value.maxRange;if(n.value.minRange)return H>=+n.value.minRange;if(n.value.maxRange)return H<=+n.value.maxRange}return!0},x=()=>!t.enableTimePicker||t.monthPicker||t.yearPicker||t.ignoreTimeValidation,E=$=>Array.isArray($)?[$[0]?$g($[0]):null,$[1]?$g($[1]):null]:$g($),w=($,F,D)=>$.find(z=>+z.hours===yr(F)&&z.minutes==="*"?!0:+z.minutes===ao(F)&&+z.hours===yr(F))&&D,S=($,F,D)=>{const[z,X]=$,[Z,H]=F;return!w(z,Z,D)&&!w(X,H,D)&&D},T=($,F)=>{const D=Array.isArray(F)?F:[F];return Array.isArray(t.disabledTimes)?Array.isArray(t.disabledTimes[0])?S(t.disabledTimes,D,$):!D.some(z=>w(t.disabledTimes,z,$)):$},A=($,F)=>{const D=Array.isArray(F)?[na(F[0]),F[1]?na(F[1]):void 0]:na(F),z=!t.disabledTimes(D);return $&&z},k=($,F)=>t.disabledTimes?Array.isArray(t.disabledTimes)?T(F,$):A(F,$):F,P=$=>{let F=!0;if(!$||x())return!0;const D=!i.value.minDate&&!i.value.maxDate?E($):$;return(t.maxTime||i.value.maxDate)&&(F=fb(t.maxTime,i.value.maxDate,"max",An(D),F)),(t.minTime||i.value.minDate)&&(F=fb(t.minTime,i.value.minDate,"min",An(D),F)),k($,F)},B=$=>{if(!t.monthPicker)return!0;let F=!0;const D=Ce(rs($));if(i.value.minDate&&i.value.maxDate){const z=Ce(rs(i.value.minDate)),X=Ce(rs(i.value.maxDate));return on(D,z)&&Qt(D,X)||ct(D,z)||ct(D,X)}if(i.value.minDate){const z=Ce(rs(i.value.minDate));F=on(D,z)||ct(D,z)}if(i.value.maxDate){const z=Ce(rs(i.value.maxDate));F=Qt(D,z)||ct(D,z)}return F},Y=be(()=>$=>!t.enableTimePicker||t.ignoreTimeValidation?!0:P($)),ne=be(()=>$=>t.monthPicker?Array.isArray($)&&(n.value.enabled||s.value.enabled)?!$.filter(F=>!B(F)).length:B($):!0);return{isDisabled:p,validateDate:l,validateMonthYearInRange:h,isDateRangeAllowed:m,checkMinMaxRange:b,isValidTime:P,isTimeValid:Y,isMonthValid:ne}},Ef=()=>{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}},MB=(t,e,n)=>{const i=xe(0),s=Ki({[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(Yn.month,"toggleMonthPicker",!0),c(Yn.year,"toggleYearPicker",!0),c(Yn.calendar,"toggleTimePicker",!1,!0),c(Yn.time,"toggleTimePicker",!0,!0);const h=t.flow[i.value];(h===Yn.hours||h===Yn.minutes||h===Yn.seconds)&&c(h,"toggleTimePicker",!0,!0,h)};return{childMount:o,updateFlowStep:a,resetFlow:l,handleFlow:u,flowStep:i}},PB={key:1,class:"dp__input_wrap"},IB=["id","name","inputmode","placeholder","disabled","readonly","required","value","autocomplete","aria-label","aria-disabled","aria-invalid"],DB={key:2,class:"dp--clear-btn"},RB=["aria-label"],LB=hn({compatConfig:{MODE:3},__name:"DatepickerInput",props:{isMenuOpen:{type:Boolean,default:!1},inputValue:{type:String,default:""},...bf},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}=jt(s),{checkMinMaxRange:p}=yo(s),m=xe(),y=xe(null),v=xe(!1),b=xe(!1),x=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??{}})),E=()=>{i("set-input-date",null),s.clearable&&s.autoApply&&(i("set-empty-date"),m.value=null)},w=H=>{const le=f();return e4(H,r.value.format??h(),le??nS({},s.enableSeconds),s.inputValue,b.value,s.formatLocale)},S=H=>{const{rangeSeparator:le}=r.value,[ie,te]=H.split(`${le}`);if(ie){const I=w(ie.trim()),ee=te?w(te.trim()):null;if(Tl(I,ee))return;const ue=I&&ee?[I,ee]:[I];p(ee,ue,0)&&(m.value=I?ue:null)}},T=()=>{b.value=!0},A=H=>{if(c.value.enabled)S(H);else if(u.value.enabled){const le=H.split(";");m.value=le.map(ie=>w(ie.trim())).filter(ie=>ie)}else m.value=w(H)},k=H=>{var le;const ie=typeof H=="string"?H:(le=H.target)==null?void 0:le.value;ie!==""?(r.value.openMenu&&!s.isMenuOpen&&i("open"),A(ie),i("set-input-date",m.value)):E(),b.value=!1,i("update:input-value",ie),i("text-input",H,m.value)},P=H=>{r.value.enabled?(A(H.target.value),r.value.enterSubmit&&tm(m.value)&&s.inputValue!==""?(i("set-input-date",m.value,!0),m.value=null):r.value.enterSubmit&&s.inputValue===""&&(m.value=null,i("clear"))):ne(H)},B=(H,le)=>{r.value.enabled&&r.value.tabSubmit&&!le&&A(H.target.value),r.value.tabSubmit&&tm(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))},Y=()=>{v.value=!0,i("focus"),Rn().then(()=>{var H;r.value.enabled&&r.value.selectOnFocus&&((H=y.value)==null||H.select())})},ne=H=>{if(eo(H,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("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)},F=H=>{eo(H,l.value,!0),i("clear")},D=H=>{if(H.key==="Tab"&&B(H),H.key==="Enter"&&P(H),!r.value.enabled){if(H.code==="Tab")return;H.preventDefault()}},z=()=>{var H;(H=y.value)==null||H.focus({preventScroll:!0})},X=H=>{m.value=H},Z=H=>{H.key===Ot.tab&&B(H,!0)};return e({focusInput:z,setParsedDate:X}),(H,le)=>{var ie,te,I;return R(),V("div",{onClick:ne},[H.$slots.trigger&&!H.$slots["dp-input"]&&!J(a).enabled?Ne(H.$slots,"trigger",{key:0}):ce("",!0),!H.$slots.trigger&&(!J(a).enabled||J(a).input)?(R(),V("div",PB,[H.$slots["dp-input"]&&!H.$slots.trigger&&(!J(a).enabled||J(a).enabled&&J(a).input)?Ne(H.$slots,"dp-input",{key:0,value:t.inputValue,isMenuOpen:t.isMenuOpen,onInput:k,onEnter:P,onTab:B,onClear:F,onBlur:$,onKeypress:D,onPaste:T,onFocus:Y,openMenu:()=>H.$emit("open"),closeMenu:()=>H.$emit("close"),toggleMenu:()=>H.$emit("toggle")}):ce("",!0),H.$slots["dp-input"]?ce("",!0):(R(),V("input",{key:1,id:H.uid?`dp-input-${H.uid}`:void 0,ref_key:"inputRef",ref:y,"data-test":"dp-input",name:H.name,class:Pe(x.value),inputmode:J(r).enabled?"text":"none",placeholder:H.placeholder,disabled:H.disabled,readonly:H.readonly,required:H.required,value:t.inputValue,autocomplete:H.autocomplete,"aria-label":(ie=J(o))==null?void 0:ie.input,"aria-disabled":H.disabled||void 0,"aria-invalid":H.state===!1?!0:void 0,onInput:k,onBlur:$,onFocus:Y,onKeypress:D,onKeydown:le[0]||(le[0]=ee=>D(ee)),onPaste:T},null,42,IB)),g("div",{onClick:le[3]||(le[3]=ee=>i("toggle"))},[H.$slots["input-icon"]&&!H.hideInputIcon?(R(),V("span",{key:0,class:"dp__input_icon",onClick:le[1]||(le[1]=ee=>i("toggle"))},[Ne(H.$slots,"input-icon")])):ce("",!0),!H.$slots["input-icon"]&&!H.hideInputIcon&&!H.$slots["dp-input"]?(R(),Se(J(Gl),{key:1,"aria-label":(te=J(o))==null?void 0:te.calendarIcon,class:"dp__input_icon dp__input_icons",onClick:le[2]||(le[2]=ee=>i("toggle"))},null,8,["aria-label"])):ce("",!0)]),H.$slots["clear-icon"]&&t.inputValue&&H.clearable&&!H.disabled&&!H.readonly?(R(),V("span",DB,[Ne(H.$slots,"clear-icon",{clear:F})])):ce("",!0),H.clearable&&!H.$slots["clear-icon"]&&t.inputValue&&!H.disabled&&!H.readonly?(R(),V("button",{key:3,"aria-label":(I=J(o))==null?void 0:I.clearInput,class:"dp--clear-btn",type:"button",onKeydown:le[4]||(le[4]=ee=>J(ii)(ee,()=>F(ee),!0,Z)),onClick:le[5]||(le[5]=ru(ee=>F(ee),["prevent"]))},[N(J(GC),{class:"dp__input_icons","data-test":"clear-icon"})],40,RB)):ce("",!0)])):ce("",!0)])}}}),OB=typeof window<"u"?window:void 0,Wg=()=>{},$B=t=>nf()?(e_(t),!0):!1,NB=(t,e,n,i)=>{if(!t)return Wg;let s=Wg;const r=un(()=>J(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 $B(o),o},FB=(t,e,n,i={})=>{const{window:s=OB,event:r="pointerdown"}=i;return s?NB(s,r,o=>{const a=vn(t),l=vn(e);!a||!l||a===o.target||o.composedPath().includes(a)||o.composedPath().includes(l)||n(o)},{passive:!0}):void 0},BB=hn({compatConfig:{MODE:3},__name:"VueDatePicker",props:{...bf},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=_a(),o=xe(!1),a=tu(s,"modelValue"),l=tu(s,"timezone"),c=xe(null),u=xe(null),d=xe(null),h=xe(!1),f=xe(null),p=xe(!1),m=xe(!1),y=xe(!1),v=xe(!1),{setMenuFocused:b,setShiftKey:x}=aS(),{clearArrowNav:E}=_o(),{validateDate:w,isValidTime:S}=yo(s),{defaultedTransitions:T,defaultedTextInput:A,defaultedInline:k,defaultedConfig:P,defaultedRange:B,defaultedMultiDates:Y}=jt(s),{menuTransition:ne,showTransition:$}=zu(T);En(()=>{ee(s.modelValue),Rn().then(()=>{if(!k.value.enabled){const he=le(f.value);he?.addEventListener("scroll",K),window?.addEventListener("resize",U)}}),k.value.enabled&&(o.value=!0),window?.addEventListener("keyup",re),window?.addEventListener("keydown",j)}),pa(()=>{if(!k.value.enabled){const he=le(f.value);he?.removeEventListener("scroll",K),window?.removeEventListener("resize",U)}window?.removeEventListener("keyup",re),window?.removeEventListener("keydown",j)});const F=ki(r,"all",s.presetDates),D=ki(r,"input");un([a,l],()=>{ee(a.value)},{deep:!0});const{openOnTop:z,menuStyle:X,xCorrect:Z,setMenuPosition:H,getScrollableParent:le,shadowRender:ie}=SB({menuRef:c,menuRefInner:u,inputRef:d,pickerWrapperRef:f,inline:k,emit:i,props:s,slots:r}),{inputValue:te,internalModelValue:I,parseExternalModelValue:ee,emitModelValue:ue,formatInputValue:L,checkBeforeEmit:ae}=C4(i,s,h),de=be(()=>({dp__main:!0,dp__theme_dark:s.dark,dp__theme_light:!s.dark,dp__flex_display:k.value.enabled,"dp--flex-display-collapsed":y.value,dp__flex_display_with_input:k.value.input})),ve=be(()=>s.dark?"dp__theme_dark":"dp__theme_light"),W=be(()=>s.teleport?{to:typeof s.teleport=="boolean"?"body":s.teleport,disabled:!s.teleport||k.value.enabled}:{}),fe=be(()=>({class:"dp__outer_menu_wrap"})),C=be(()=>k.value.enabled&&(s.timePicker||s.monthPicker||s.yearPicker||s.quarterPicker)),O=()=>{var he,Ae;return(Ae=(he=d.value)==null?void 0:he.$el)==null?void 0:Ae.getBoundingClientRect()},K=()=>{o.value&&(P.value.closeOnScroll?ze():H())},U=()=>{var he;o.value&&H();const Ae=(he=u.value)==null?void 0:he.$el.getBoundingClientRect().width;y.value=document.body.offsetWidth<=Ae},re=he=>{he.key==="Tab"&&!k.value.enabled&&!s.teleport&&P.value.tabOutClosesMenu&&(f.value.contains(document.activeElement)||ze()),m.value=he.shiftKey},j=he=>{m.value=he.shiftKey},se=()=>{!s.disabled&&!s.readonly&&(ie(_b,s),H(!1),o.value=!0,o.value&&i("open"),o.value||Be(),ee(s.modelValue))},Q=()=>{var he;te.value="",Be(),(he=d.value)==null||he.setParsedDate(null),i("update:model-value",null),i("update:model-timezone-value",null),i("cleared"),P.value.closeOnClearValue&&ze()},ge=()=>{const he=I.value;return!he||!Array.isArray(he)&&w(he)?!0:Array.isArray(he)?Y.value.enabled||he.length===2&&w(he[0])&&w(he[1])?!0:B.value.partialRange&&!s.timePicker?w(he[0]):!1:!1},_e=()=>{ae()&&ge()?(ue(),ze()):i("invalid-select",I.value)},ye=he=>{ke(),ue(),P.value.closeOnAutoApply&&!he&&ze()},ke=()=>{d.value&&A.value.enabled&&d.value.setParsedDate(I.value)},Me=(he=!1)=>{s.autoApply&&S(I.value)&&ge()&&(B.value.enabled&&Array.isArray(I.value)?(B.value.partialRange||I.value.length===2)&&ye(he):ye(he))},Be=()=>{A.value.enabled||(I.value=null)},ze=()=>{k.value.enabled||(o.value&&(o.value=!1,Z.value=!1,b(!1),x(!1),E(),i("closed"),te.value&&ee(a.value)),Be(),i("blur"))},nt=(he,Ae,Le=!1)=>{if(!he){I.value=null;return}const Ut=Array.isArray(he)?!he.some(Ri=>!w(Ri)):w(he),gn=S(he);Ut&&gn?(v.value=!0,I.value=he,Ae&&(p.value=Le,_e(),i("text-submit")),Rn().then(()=>{v.value=!1})):i("invalid-date",he)},Qe=()=>{s.autoApply&&S(I.value)&&ue(),ke()},qt=()=>o.value?ze():se(),Bt=he=>{I.value=he},fn=()=>{A.value.enabled&&(h.value=!0,L()),i("focus")},Kt=()=>{if(A.value.enabled&&(h.value=!1,ee(s.modelValue),p.value)){const he=J5(f.value,m.value);he?.focus()}i("blur")},Ei=he=>{u.value&&u.value.updateMonthYear(0,{month:cb(he.month),year:cb(he.year)})},Xi=he=>{ee(he??s.modelValue)},Zt=(he,Ae)=>{var Le;(Le=u.value)==null||Le.switchView(he,Ae)},oe=he=>P.value.onClickOutside?P.value.onClickOutside(he):ze(),Te=(he=0)=>{var Ae;(Ae=u.value)==null||Ae.handleFlow(he)};return FB(c,d,()=>oe(ge)),e({closeMenu:ze,selectDate:_e,clearValue:Q,openMenu:se,onScroll:K,formatInputValue:L,updateInternalModelValue:Bt,setMonthYear:Ei,parseModel:Xi,switchView:Zt,toggleMenu:qt,handleFlow:Te,dpWrapMenuRef:c}),(he,Ae)=>(R(),V("div",{ref_key:"pickerWrapperRef",ref:f,class:Pe(de.value),"data-datepicker-instance":""},[N(LB,wn({ref_key:"inputRef",ref:d,"input-value":J(te),"onUpdate:inputValue":Ae[0]||(Ae[0]=Le=>Wt(te)?te.value=Le:null),"is-menu-open":o.value},he.$props,{onClear:Q,onOpen:se,onSetInputDate:nt,onSetEmptyDate:J(ue),onSelectDate:_e,onToggle:qt,onClose:ze,onFocus:fn,onBlur:Kt,onRealBlur:Ae[1]||(Ae[1]=Le=>h.value=!1),onTextInput:Ae[2]||(Ae[2]=Le=>he.$emit("text-input",Le))}),Un({_:2},[Ze(J(D),(Le,Ut)=>({name:Le,fn:De(gn=>[Ne(he.$slots,Le,In(ni(gn)))])}))]),1040,["input-value","is-menu-open","onSetEmptyDate"]),(R(),Se(ma(he.teleport?gD:"div"),In(ni(W.value)),{default:De(()=>[N($t,{name:J(ne)(J(z)),css:J($)&&!J(k).enabled},{default:De(()=>[o.value?(R(),V("div",wn({key:0,ref_key:"dpWrapMenuRef",ref:c},fe.value,{class:{"dp--menu-wrapper":!J(k).enabled},style:J(k).enabled?void 0:J(X)}),[N(_b,wn({ref_key:"dpMenuRef",ref:u},he.$props,{"internal-model-value":J(I),"onUpdate:internalModelValue":Ae[3]||(Ae[3]=Le=>Wt(I)?I.value=Le:null),class:{[ve.value]:!0,"dp--menu-wrapper":he.teleport},"open-on-top":J(z),"no-overlay-focus":C.value,collapse:y.value,"get-input-rect":O,"is-text-input-date":v.value,onClosePicker:ze,onSelectDate:_e,onAutoApply:Me,onTimeUpdate:Qe,onFlowStep:Ae[4]||(Ae[4]=Le=>he.$emit("flow-step",Le)),onUpdateMonthYear:Ae[5]||(Ae[5]=Le=>he.$emit("update-month-year",Le)),onInvalidSelect:Ae[6]||(Ae[6]=Le=>he.$emit("invalid-select",J(I))),onAutoApplyInvalid:Ae[7]||(Ae[7]=Le=>he.$emit("invalid-select",Le)),onInvalidFixedRange:Ae[8]||(Ae[8]=Le=>he.$emit("invalid-fixed-range",Le)),onRecalculatePosition:J(H),onTooltipOpen:Ae[9]||(Ae[9]=Le=>he.$emit("tooltip-open",Le)),onTooltipClose:Ae[10]||(Ae[10]=Le=>he.$emit("tooltip-close",Le)),onTimePickerOpen:Ae[11]||(Ae[11]=Le=>he.$emit("time-picker-open",Le)),onTimePickerClose:Ae[12]||(Ae[12]=Le=>he.$emit("time-picker-close",Le)),onAmPmChange:Ae[13]||(Ae[13]=Le=>he.$emit("am-pm-change",Le)),onRangeStart:Ae[14]||(Ae[14]=Le=>he.$emit("range-start",Le)),onRangeEnd:Ae[15]||(Ae[15]=Le=>he.$emit("range-end",Le)),onDateUpdate:Ae[16]||(Ae[16]=Le=>he.$emit("date-update",Le)),onInvalidDate:Ae[17]||(Ae[17]=Le=>he.$emit("invalid-date",Le)),onOverlayToggle:Ae[18]||(Ae[18]=Le=>he.$emit("overlay-toggle",Le))}),Un({_:2},[Ze(J(F),(Le,Ut)=>({name:Le,fn:De(gn=>[Ne(he.$slots,Le,In(ni({...gn})))])}))]),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))}}),Yu=(()=>{const t=BB;return t.install=e=>{e.component("Vue3DatePicker",t)},t})(),VB=Object.freeze(Object.defineProperty({__proto__:null,default:Yu},Symbol.toStringTag,{value:"Module"}));Object.entries(VB).forEach(([t,e])=>{t!=="default"&&(Yu[t]=e)});const zB={name:"newDashboardAPIKey",components:{LocaleText:He,VueDatePicker:Yu},data(){return{newKeyData:{ExpiredAt:bi().add(7,"d").format("YYYY-MM-DD HH:mm:ss"),neverExpire:!1},submitting:!1}},setup(){return{store:tt()}},mounted(){console.log(this.newKeyData.ExpiredAt)},methods:{submitNewAPIKey(){this.submitting=!0,xt("/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(bi(t).format("YYYY-MM-DDTHH:mm:ss")),bi(t).format("YYYY-MM-DDTHH:mm:ss")},parseTime(t){t?this.newKeyData.ExpiredAt=bi(t).format("YYYY-MM-DD HH:mm:ss"):this.newKeyData.ExpiredAt=void 0}}},WB={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)"}},YB={class:"card m-auto rounded-3 mt-5"},HB={class:"card-header bg-transparent d-flex align-items-center gap-2 border-0 p-4 pb-0"},jB={class:"mb-0"},KB={class:"card-body d-flex gap-2 p-4 flex-column"},UB={class:"text-muted"},GB={class:"d-flex align-items-center gap-2"},XB={class:"form-check"},qB=["disabled"],ZB={class:"form-check-label",for:"neverExpire"},JB={key:0,class:"bi bi-check-lg me-2"};function QB(t,e,n,i,s,r){const o=Ee("LocaleText"),a=Ee("VueDatePicker");return R(),V("div",WB,[g("div",YB,[g("div",HB,[g("h6",jB,[N(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",KB,[g("small",UB,[N(o,{t:"When should this API Key expire?"})]),g("div",GB,[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"])]),g("div",XB,[$e(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,qB),[[Kn,this.newKeyData.neverExpire]]),g("label",ZB,[N(o,{t:"Never Expire"}),e[3]||(e[3]=Ue(" (")),e[4]||(e[4]=g("i",{class:"bi bi-emoji-grimace-fill me-2"},null,-1)),N(o,{t:"Don't think that's a good idea"}),e[5]||(e[5]=Ue(") "))])]),g("button",{class:Pe(["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):(R(),V("i",JB)),this.submitting?(R(),Se(o,{key:1,t:"Creating..."})):(R(),Se(o,{key:2,t:"Create"}))],2)])])])}const eV=je(zB,[["render",QB]]),tV={name:"dashboardAPIKey",components:{LocaleText:He},props:{apiKey:Object},setup(){return{store:tt()}},data(){return{confirmDelete:!1}},methods:{deleteAPIKey(){xt("/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")})}}},nV={class:"card rounded-3 shadow-sm"},iV={key:0,class:"card-body d-flex gap-3 align-items-center apiKey-card-body"},sV={class:"d-flex align-items-center gap-2"},rV={class:"text-muted"},oV={style:{"word-break":"break-all"}},aV={class:"d-flex align-items-center gap-2 ms-auto"},lV={class:"text-muted"},cV={key:0,class:"card-body d-flex gap-3 align-items-center justify-content-end"};function uV(t,e,n,i,s,r){const o=Ee("LocaleText");return R(),V("div",nV,[this.confirmDelete?(R(),V(Oe,{key:1},[this.store.getActiveCrossServer()?ce("",!0):(R(),V("div",cV,[N(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())},e[4]||(e[4]=[g("i",{class:"bi bi-check-lg"},null,-1)])),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)},e[5]||(e[5]=[g("i",{class:"bi bi-x-lg"},null,-1)]))]))],64)):(R(),V("div",iV,[g("div",sV,[g("small",rV,[N(o,{t:"Key"})]),g("span",oV,we(this.apiKey.Key),1)]),g("div",aV,[g("small",lV,[N(o,{t:"Expire At"})]),this.apiKey.ExpiredAt?ce("",!0):(R(),Se(o,{key:0,t:"Never Expire"})),g("span",null,we(this.apiKey.ExpiredAt),1)]),this.store.getActiveCrossServer()?ce("",!0):(R(),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)},e[3]||(e[3]=[g("i",{class:"bi bi-trash-fill"},null,-1)])))]))])}const dV=je(tV,[["render",uV],["__scopeId","data-v-a76253c8"]]),hV={name:"dashboardAPIKeys",components:{LocaleText:He,DashboardAPIKey:dV,NewDashboardAPIKey:eV},setup(){return{store:tt()}},data(){return{value:this.store.Configuration.Server.dashboard_api_key,apiKeys:[],newDashboardAPIKey:!1}},methods:{async toggleDashboardAPIKeys(){await xt("/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?Yt("/api/getDashboardAPIKeys",{},e=>{console.log(e),e.status?this.apiKeys=e.data:(this.apiKeys=[],this.store.newMessage("Server",e.message,"danger"))}):this.apiKeys=[]}}}},fV={class:"card mb-4 shadow rounded-3"},gV={class:"card-header d-flex"},pV={key:0,class:"form-check form-switch ms-auto"},mV={class:"form-check-label",for:"allowAPIKeysSwitch"},_V={key:0,class:"card-body position-relative d-flex flex-column gap-2"},yV={key:1,class:"card",style:{height:"300px"}},vV={class:"card-body d-flex text-muted"},bV={class:"m-auto"},wV={key:2,class:"d-flex flex-column gap-2 position-relative",style:{"min-height":"300px"}};function xV(t,e,n,i,s,r){const o=Ee("LocaleText"),a=Ee("DashboardAPIKey"),l=Ee("NewDashboardAPIKey");return R(),V("div",fV,[g("div",gV,[N(o,{t:"API Keys"}),this.store.getActiveCrossServer()?ce("",!0):(R(),V("div",pV,[$e(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),[[Kn,this.value]]),g("label",mV,[this.value?(R(),Se(o,{key:0,t:"Enabled"})):(R(),Se(o,{key:1,t:"Disabled"}))])]))]),this.value?(R(),V("div",_V,[this.store.getActiveCrossServer()?ce("",!0):(R(),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)},[e[6]||(e[6]=g("i",{class:"bi bi-plus-circle-fill me-2"},null,-1)),N(o,{t:"API Key"})])),this.apiKeys.length===0?(R(),V("div",yV,[g("div",vV,[g("span",bV,[N(o,{t:"No WGDashboard API Key"})])])])):(R(),V("div",wV,[N(Ul,{name:"apiKey"},{default:De(()=>[(R(!0),V(Oe,null,Ze(this.apiKeys,c=>(R(),Se(a,{apiKey:c,key:c.Key,onDeleted:e[3]||(e[3]=u=>this.apiKeys=u)},null,8,["apiKey"]))),128))]),_:1})])),N($t,{name:"zoomReversed"},{default:De(()=>[this.newDashboardAPIKey?(R(),Se(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 EV=je(hV,[["render",xV],["__scopeId","data-v-167c06a6"]]),CV={name:"accountSettingsMFA",components:{LocaleText:He},setup(){const t=tt(),e=`input_${Bs()}`;return{store:t,uuid:e}},data(){return{status:!1}},mounted(){this.status=this.store.Configuration.Account.enable_totp},methods:{async resetMFA(){await xt("/api/updateDashboardConfigurationItem",{section:"Account",key:"totp_verified",value:"false"},async t=>{await xt("/api/updateDashboardConfigurationItem",{section:"Account",key:"enable_totp",value:"false"},e=>{e.status&&this.$router.push("/2FASetup")})})}}},SV={class:"d-flex align-items-center"},TV={class:"form-check form-switch ms-3"};function AV(t,e,n,i,s,r){const o=Ee("LocaleText");return R(),V("div",null,[g("div",SV,[g("strong",null,[N(o,{t:"Multi-Factor Authentication (MFA)"})]),g("div",TV,[$e(g("input",{class:"form-check-input",type:"checkbox","onUpdate:modelValue":e[0]||(e[0]=a=>this.status=a),role:"switch",id:"allowMFAKeysSwitch"},null,512),[[Kn,this.status]])]),this.status?(R(),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())},[e[2]||(e[2]=g("i",{class:"bi bi-shield-lock-fill me-2"},null,-1)),this.store.Configuration.Account.totp_verified?(R(),Se(o,{key:0,t:"Reset"})):(R(),Se(o,{key:1,t:"Setup"})),e[3]||(e[3]=Ue(" MFA "))])):ce("",!0)])])}const kV=je(CV,[["render",AV]]),MV={name:"dashboardLanguage",components:{LocaleText:He},setup(){return{store:tt()}},data(){return{languages:void 0}},mounted(){Yt("/api/locale/available",{},t=>{this.languages=t.data})},methods:{changeLanguage(t){xt("/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)}}},PV={class:"card mb-4 shadow rounded-3"},IV={class:"card-header"},DV={class:"card-body d-flex gap-2"},RV={class:"dropdown w-100"},LV=["disabled"],OV={key:1},$V={class:"dropdown-menu rounded-3 shadow"},NV=["onClick"],FV={class:"me-auto mb-0"},BV={class:"d-block",style:{"font-size":"0.8rem"}},VV={key:0,class:"bi bi-check text-primary fs-5"};function zV(t,e,n,i,s,r){const o=Ee("LocaleText");return R(),V("div",PV,[g("p",IV,[N(o,{t:"Dashboard Language"})]),g("div",DV,[g("div",RV,[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?(R(),V("span",OV,we(r.currentLanguage?.lang_name_localized),1)):(R(),Se(o,{key:0,t:"Loading..."}))],8,LV),g("ul",$V,[(R(!0),V(Oe,null,Ze(this.languages,a=>(R(),V("li",null,[g("a",{class:"dropdown-item d-flex align-items-center",role:"button",onClick:l=>this.changeLanguage(a.lang_id)},[g("p",FV,[Ue(we(a.lang_name_localized)+" ",1),g("small",BV,we(a.lang_name),1)]),r.currentLanguage?.lang_id===a.lang_id?(R(),V("i",VV)):ce("",!0)],8,NV)]))),256))])])])])}const WV=je(MV,[["render",zV],["__scopeId","data-v-a8b77ad0"]]),YV={name:"dashboardIPPortInput",components:{LocaleText:He},setup(){return{store:tt()}},data(){return{ipAddress:"",port:0,invalidFeedback:"",showInvalidFeedback:!1,isValid:!1,timeout:void 0,changed:!1,updating:!1}},mounted(){this.ipAddress=this.store.Configuration.Server.app_ip,this.port=this.store.Configuration.Server.app_port},methods:{async useValidation(t,e,n){this.changed&&(this.updating=!0,await xt("/api/updateDashboardConfigurationItem",{section:"Server",key:e,value:n},i=>{i.status?(t.target.classList.add("is-valid"),this.showInvalidFeedback=!1,this.store.Configuration.Server[e]=n,clearTimeout(this.timeout),this.timeout=setTimeout(()=>{t.target.classList.remove("is-valid")},5e3)):(this.isValid=!1,this.showInvalidFeedback=!0,this.invalidFeedback=i.message),this.changed=!1,this.updating=!1}))}}},HV={class:"card mb-4 shadow rounded-3"},jV={class:"card-header"},KV={class:"card-body"},UV={class:"row gx-3"},GV={class:"col-sm"},XV={class:"form-group mb-2"},qV={for:"input_dashboard_ip",class:"text-muted mb-1"},ZV=["disabled"],JV={class:"invalid-feedback"},QV={class:"col-sm"},e6={class:"form-group mb-2"},t6={for:"input_dashboard_ip",class:"text-muted mb-1"},n6=["disabled"],i6={class:"invalid-feedback"},s6={class:"px-2 py-1 text-warning-emphasis bg-warning-subtle border border-warning-subtle rounded-2 d-inline-block mt-1 mb-2"};function r6(t,e,n,i,s,r){const o=Ee("LocaleText");return R(),V("div",HV,[g("p",jV,[N(o,{t:"Dashboard IP Address & Listen Port"})]),g("div",KV,[g("div",UV,[g("div",GV,[g("div",XV,[g("label",qV,[g("strong",null,[g("small",null,[N(o,{t:"IP Address / Hostname"})])])]),$e(g("input",{type:"text",class:Pe(["form-control",{"is-invalid":s.showInvalidFeedback,"is-valid":s.isValid}]),id:"input_dashboard_ip","onUpdate:modelValue":e[0]||(e[0]=a=>this.ipAddress=a),onKeydown:e[1]||(e[1]=a=>this.changed=!0),onBlur:e[2]||(e[2]=a=>r.useValidation(a,"app_ip",this.ipAddress)),disabled:this.updating},null,42,ZV),[[We,this.ipAddress]]),g("div",JV,we(this.invalidFeedback),1)])]),g("div",QV,[g("div",e6,[g("label",t6,[g("strong",null,[g("small",null,[N(o,{t:"Listen Port"})])])]),$e(g("input",{type:"number",class:Pe(["form-control",{"is-invalid":s.showInvalidFeedback,"is-valid":s.isValid}]),id:"input_dashboard_ip","onUpdate:modelValue":e[3]||(e[3]=a=>this.port=a),onKeydown:e[4]||(e[4]=a=>this.changed=!0),onBlur:e[5]||(e[5]=a=>r.useValidation(a,"app_port",this.port)),disabled:this.updating},null,42,n6),[[We,this.port]]),g("div",i6,we(this.invalidFeedback),1)])])]),g("div",s6,[g("small",null,[e[6]||(e[6]=g("i",{class:"bi bi-exclamation-triangle-fill me-2"},null,-1)),N(o,{t:"Manual restart of WGDashboard is needed to apply changes on IP Address and Listen Port"})])])])])}const o6=je(YV,[["render",r6]]),a6={name:"settings",methods:{ipV46RegexCheck:ON},components:{DashboardIPPortInput:o6,DashboardLanguage:WV,LocaleText:He,AccountSettingsMFA:kV,DashboardAPIKeys:EV,DashboardSettingsInputIPAddressAndPort:N3,DashboardTheme:T3,DashboardSettingsInputWireguardConfigurationPath:b3,AccountSettingsInputPassword:a3,AccountSettingsInputUsername:WN,PeersDefaultSettingsInput:LN},setup(){return{dashboardConfigurationStore:tt()}}},l6={class:"mt-md-5 mt-3"},c6={class:"container-md"},u6={class:"mb-3 text-body"},d6={class:"card mb-4 shadow rounded-3"},h6={class:"card-header"},f6={class:"card-body"},g6={class:"card mb-4 shadow rounded-3"},p6={class:"card-header"},m6={class:"card-body"},_6={class:"row gx-4"},y6={class:"col-sm"},v6={class:"col-sm"},b6={class:"card mb-4 shadow rounded-3"},w6={class:"card-header"},x6={class:"card-body d-flex gap-4 flex-column"},E6={key:0,class:"m-0"};function C6(t,e,n,i,s,r){const o=Ee("LocaleText"),a=Ee("PeersDefaultSettingsInput"),l=Ee("DashboardSettingsInputWireguardConfigurationPath"),c=Ee("DashboardTheme"),u=Ee("DashboardLanguage"),d=Ee("DashboardIPPortInput"),h=Ee("AccountSettingsInputUsername"),f=Ee("AccountSettingsInputPassword"),p=Ee("AccountSettingsMFA"),m=Ee("DashboardAPIKeys");return R(),V("div",l6,[g("div",c6,[g("h3",u6,[N(o,{t:"Settings"})]),g("div",d6,[g("p",h6,[N(o,{t:"Peers Default Settings"})]),g("div",f6,[N(a,{targetData:"peer_global_dns",title:"DNS"}),N(a,{targetData:"peer_endpoint_allowed_ip",title:"Endpoint Allowed IPs"}),N(a,{targetData:"peer_mtu",title:"MTU"}),N(a,{targetData:"peer_keep_alive",title:"Persistent Keepalive"}),N(a,{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",g6,[g("p",p6,[N(o,{t:"WireGuard Configurations Settings"})]),g("div",m6,[N(l,{targetData:"wg_conf_path",title:"Configurations Directory",warning:!0,"warning-text":"Remember to remove / at the end of your path. e.g /etc/wireguard"})])]),e[1]||(e[1]=g("hr",{class:"mb-4"},null,-1)),g("div",_6,[g("div",y6,[N(c)]),g("div",v6,[N(u)])]),N(d),g("div",b6,[g("p",w6,[N(o,{t:"WGDashboard Account Settings"})]),g("div",x6,[N(h,{targetData:"username",title:"Username"}),e[0]||(e[0]=g("hr",{class:"m-0"},null,-1)),N(f,{targetData:"password"}),this.dashboardConfigurationStore.getActiveCrossServer()?ce("",!0):(R(),V("hr",E6)),this.dashboardConfigurationStore.getActiveCrossServer()?ce("",!0):(R(),Se(p,{key:1}))])]),N(m)])])}const S6=je(a6,[["render",C6]]),T6={name:"setup",components:{LocaleText:He},setup(){return{store:tt()}},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,xt("/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})}}},A6=["data-bs-theme"],k6={class:"m-auto text-body",style:{width:"500px"}},M6={class:"dashboardLogo display-4"},P6={class:"mb-5"},I6={key:0,class:"alert alert-danger"},D6={class:"d-flex flex-column gap-3"},R6={id:"createAccount",class:"d-flex flex-column gap-2"},L6={class:"form-group text-body"},O6={for:"username",class:"mb-1 text-muted"},$6={class:"form-group text-body"},N6={for:"password",class:"mb-1 text-muted"},F6={class:"form-group text-body"},B6={for:"confirmPassword",class:"mb-1 text-muted"},V6=["disabled"],z6={key:0,class:"d-flex align-items-center w-100"},W6={key:1,class:"d-flex align-items-center w-100"};function Y6(t,e,n,i,s,r){const o=Ee("LocaleText");return R(),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",k6,[g("span",M6,[N(o,{t:"Nice to meet you!"})]),g("p",P6,[N(o,{t:"Please fill in the following fields to finish setup"}),e[4]||(e[4]=Ue(" 😊"))]),g("div",null,[g("h3",null,[N(o,{t:"Create an account"})]),this.errorMessage?(R(),V("div",I6,we(this.errorMessage),1)):ce("",!0),g("div",D6,[g("form",R6,[g("div",L6,[g("label",O6,[g("small",null,[N(o,{t:"Enter an username you like"})])]),$e(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),[[We,this.setup.username]])]),g("div",$6,[g("label",N6,[g("small",null,[N(o,{t:"Enter a password"}),g("code",null,[N(o,{t:"(At least 8 characters and make sure is strong enough!)"})])])]),$e(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),[[We,this.setup.newPassword]])]),g("div",F6,[g("label",B6,[g("small",null,[N(o,{t:"Confirm password"})])]),$e(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),[[We,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?(R(),V("span",z6,[N(o,{t:"Next"}),e[5]||(e[5]=g("i",{class:"bi bi-chevron-right ms-auto"},null,-1))])):(R(),V("span",W6,[N(o,{t:"Saving..."}),e[6]||(e[6]=g("span",{class:"spinner-border ms-auto spinner-border-sm",role:"status"},[g("span",{class:"visually-hidden"},"Loading...")],-1))]))],8,V6)])])])],8,A6)}const H6=je(T6,[["render",Y6]]);function B_(t){return t.includes(":")?6:t.includes(".")?4:0}function j6(t){const e=B_(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 Yg={4:32,6:128},K6=t=>t.includes("/")?B_(t):0;function U6(t){const e=K6(t),n=Object.create(null);if(e)n.cidr=t,n.version=e;else{const d=B_(t);if(d)n.cidr=`${t}/${Yg[d]}`,n.version=d;else throw new Error(`Network is not a CIDR or IP: ${t}`)}const[i,s]=n.cidr.split("/");if(!/^[0-9]+$/.test(s))throw new Error(`Network is not a CIDR or IP: ${t}`);n.prefix=s,n.single=s===String(Yg[n.version]);const{number:r,version:o}=j6(i),a=Yg[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 +`.replace(/\s*\/\/.*$/gm,"").replace(/\n/g,"").trim(),uO=new RegExp(`(?:^${ts}$)|(?:^${_f}$)`),dO=new RegExp(`^${ts}$`),hO=new RegExp(`^${_f}$`),yf=t=>t&&t.exact?uO:new RegExp(`(?:${jr(t)}${ts}${jr(t)})|(?:${jr(t)}${_f}${jr(t)})`,"g");yf.v4=t=>t&&t.exact?dO:new RegExp(`${jr(t)}${ts}${jr(t)}`,"g");yf.v6=t=>t&&t.exact?hO:new RegExp(`${jr(t)}${_f}${jr(t)}`,"g");const bC={exact:!1},wC=`${yf.v4().source}\\/(3[0-2]|[12]?[0-9])`,xC=`${yf.v6().source}\\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])`,fO=new RegExp(`^${wC}$`),gO=new RegExp(`^${xC}$`),pO=({exact:t}=bC)=>t?fO:new RegExp(wC,"g"),mO=({exact:t}=bC)=>t?gO:new RegExp(xC,"g"),EC=pO({exact:!0}),CC=mO({exact:!0}),b_=t=>EC.test(t)?4:CC.test(t)?6:0;b_.v4=t=>EC.test(t);b_.v6=t=>CC.test(t);const At=t=>{const e=tt();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]])},qn=oC("WireguardConfigurationsStore",{state:()=>({Configurations:void 0,searchString:"",ConfigurationListInterval:void 0,PeerScheduleJobs:{dropdowns:{Field:[{display:At("Total Received"),value:"total_receive",unit:"GB",type:"number"},{display:At("Total Sent"),value:"total_sent",unit:"GB",type:"number"},{display:At("Total Usage"),value:"total_data",unit:"GB",type:"number"},{display:At("Date"),value:"date",type:"date"}],Operator:[{display:At("larger than"),value:"lgt"}],Action:[{display:At("Restrict Peer"),value:"restrict"},{display:At("Delete Peer"),value:"delete"}]}}}),actions:{async getConfigurations(){await Yt("/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 b_(t)!==0},checkWGKeyLength(t){return console.log(t),/^[A-Za-z0-9+/]{43}=?=?$/.test(t)}}}),je=(t,e)=>{const n=t.__vccOpts||t;for(const[i,s]of e)n[i]=s;return n},_O={name:"localeText",props:{t:""},computed:{getLocaleText(){return At(this.t)}}};function yO(t,e,n,i,s,r){return we(this.getLocaleText)}const He=je(_O,[["render",yO]]),vO={name:"navbar",components:{LocaleText:He},setup(){const t=qn(),e=tt();return{wireguardConfigurationsStore:t,dashboardConfigurationStore:e}},data(){return{updateAvailable:!1,updateMessage:"Checking for update...",updateUrl:""}},mounted(){Yt("/api/getDashboardUpdate",{},t=>{t.status?(t.data&&(this.updateAvailable=!0,this.updateUrl=t.data),this.updateMessage=t.message):(this.updateMessage=At("Failed to check available update"),console.log(`Failed to get update: ${t.message}`))})}},bO=["data-bs-theme"],wO={id:"sidebarMenu",class:"bg-body-tertiary sidebar border h-100 rounded-3 shadow overflow-y-scroll"},xO={class:"sidebar-sticky"},EO={class:"nav flex-column px-2"},CO={class:"nav-item"},SO={class:"nav-item"},TO={class:"sidebar-heading px-3 mt-4 mb-1 text-muted text-center"},AO={class:"nav flex-column px-2"},kO={class:"nav-item"},MO={class:"sidebar-heading px-3 mt-4 mb-1 text-muted text-center"},PO={class:"nav flex-column px-2"},IO={class:"nav-item"},DO={class:"nav-item"},RO={class:"nav flex-column px-2"},LO={class:"nav-item"},OO={class:"nav-item",style:{"font-size":"0.8rem"}},$O=["href"],NO={class:"nav-link text-muted rounded-3"},FO={key:1,class:"nav-link text-muted rounded-3"};function BO(t,e,n,i,s,r){const o=Ee("LocaleText"),a=Ee("RouterLink");return R(),V("div",{class:Pe(["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},[f("nav",wO,[f("div",xO,[e[7]||(e[7]=f("h5",{class:"text-white text-center m-0 py-3 mb-3 btn-brand fw-light"},"WGDashboard",-1)),f("ul",EO,[f("li",CO,[N(a,{class:"nav-link rounded-3",to:"/","exact-active-class":"active"},{default:De(()=>[e[1]||(e[1]=f("i",{class:"bi bi-house me-2"},null,-1)),N(o,{t:"Home"})]),_:1})]),f("li",SO,[N(a,{class:"nav-link rounded-3",to:"/settings","exact-active-class":"active"},{default:De(()=>[e[2]||(e[2]=f("i",{class:"bi bi-gear me-2"},null,-1)),N(o,{t:"Settings"})]),_:1})])]),e[8]||(e[8]=f("hr",{class:"text-body"},null,-1)),f("h6",TO,[e[3]||(e[3]=f("i",{class:"bi bi-body-text me-2"},null,-1)),N(o,{t:"WireGuard Configurations"})]),f("ul",AO,[f("li",kO,[(R(!0),V(Le,null,Ze(this.wireguardConfigurationsStore.Configurations,l=>(R(),Se(a,{to:"/configuration/"+l.Name+"/peers",class:"nav-link nav-conf-link rounded-3","active-class":"active"},{default:De(()=>[f("span",{class:Pe(["dot me-2",{active:l.Status}])},null,2),Ue(" "+we(l.Name),1)]),_:2},1032,["to"]))),256))])]),e[9]||(e[9]=f("hr",{class:"text-body"},null,-1)),f("h6",MO,[e[4]||(e[4]=f("i",{class:"bi bi-tools me-2"},null,-1)),N(o,{t:"Tools"})]),f("ul",PO,[f("li",IO,[N(a,{to:"/ping",class:"nav-link rounded-3","active-class":"active"},{default:De(()=>[N(o,{t:"Ping"})]),_:1})]),f("li",DO,[N(a,{to:"/traceroute",class:"nav-link rounded-3","active-class":"active"},{default:De(()=>[N(o,{t:"Traceroute"})]),_:1})])]),e[10]||(e[10]=f("hr",{class:"text-body"},null,-1)),f("ul",RO,[f("li",LO,[f("a",{class:"nav-link text-danger rounded-3",onClick:e[0]||(e[0]=l=>this.dashboardConfigurationStore.signOut()),role:"button",style:{"font-weight":"bold"}},[e[5]||(e[5]=f("i",{class:"bi bi-box-arrow-left me-2"},null,-1)),N(o,{t:"Sign Out"})])]),f("li",OO,[this.updateAvailable?(R(),V("a",{key:0,href:this.updateUrl,class:"text-decoration-none rounded-3",target:"_blank"},[f("small",NO,[N(o,{t:this.updateMessage},null,8,["t"]),e[6]||(e[6]=Ue(" (")),N(o,{t:"Current Version:"}),Ue(" "+we(i.dashboardConfigurationStore.Configuration.Server.version)+") ",1)])],8,$O)):(R(),V("small",FO,[N(o,{t:this.updateMessage},null,8,["t"]),Ue(" ("+we(i.dashboardConfigurationStore.Configuration.Server.version)+") ",1)]))])])])])],10,bO)}const VO=je(vO,[["render",BO],["__scopeId","data-v-f9d83f99"]]),zO={name:"message",components:{LocaleText:He},props:{message:Object},mounted(){setTimeout(()=>{this.message.show=!1},5e3)}},WO=["id"],YO={class:"card-body"},HO={class:"fw-bold d-block",style:{"text-transform":"uppercase"}};function jO(t,e,n,i,s,r){const o=Ee("LocaleText");return R(),V("div",{class:Pe(["card shadow rounded-3 position-relative mb-2 message ms-auto",{"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},[f("div",YO,[f("small",HO,[N(o,{t:"FROM "}),Ue(" "+we(this.message.from),1)]),Ue(" "+we(this.message.content),1)])],10,WO)}const SC=je(zO,[["render",jO],["__scopeId","data-v-e30054c0"]]),KO={name:"index",components:{Message:SC,Navbar:VO},async setup(){return{dashboardConfigurationStore:tt()}},computed:{getMessages(){return this.dashboardConfigurationStore.Messages.filter(t=>t.show)}}},UO=["data-bs-theme"],GO={class:"row h-100"},XO={class:"col-md-9 ml-sm-auto col-lg-10 px-md-4 overflow-y-scroll mb-0"},qO={class:"messageCentre text-body position-fixed d-flex"};function ZO(t,e,n,i,s,r){const o=Ee("Navbar"),a=Ee("RouterView"),l=Ee("Message");return R(),V("div",{class:"container-fluid flex-grow-1 main","data-bs-theme":this.dashboardConfigurationStore.Configuration.Server.dashboard_theme},[f("div",GO,[N(o),f("main",XO,[(R(),Se(p_,null,{default:De(()=>[N(a,null,{default:De(({Component:c})=>[N($t,{name:"fade2",mode:"out-in"},{default:De(()=>[(R(),Se(ma(c)))]),_:2},1024)]),_:1})]),_:1})),f("div",qO,[N(Ul,{name:"message",tag:"div",class:"position-relative flex-grow-1 d-flex align-items-end"},{default:De(()=>[(R(!0),V(Le,null,Ze(r.getMessages.slice().reverse(),c=>(R(),Se(l,{message:c,key:c.id},null,8,["message"]))),128))]),_:1})])])])],8,UO)}const JO=je(KO,[["render",ZO],["__scopeId","data-v-a66d22c4"]]);var TC={exports:{}};(function(t,e){(function(n,i){t.exports=i()})(Xw,function(){var n=1e3,i=6e4,s=36e5,r="millisecond",o="second",a="minute",l="hour",c="day",u="week",d="month",h="quarter",g="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($){var F=["th","st","nd","rd"],D=$%100;return"["+$+(F[(D-20)%10]||F[D]||F[0])+"]"}},x=function($,F,D){var z=String($);return!z||z.length>=F?$:""+Array(F+1-z.length).join(D)+$},E={s:x,z:function($){var F=-$.utcOffset(),D=Math.abs(F),z=Math.floor(D/60),X=D%60;return(F<=0?"+":"-")+x(z,2,"0")+":"+x(X,2,"0")},m:function $(F,D){if(F.date()1)return $(H[0])}else{var le=F.name;S[le]=F,X=le}return!z&&X&&(w=X),X||!z&&w},P=function($,F){if(A($))return $.clone();var D=typeof F=="object"?F:{};return D.date=$,D.args=arguments,new Y(D)},B=E;B.l=k,B.i=A,B.w=function($,F){return P($,{locale:F.$L,utc:F.$u,x:F.$x,$offset:F.$offset})};var Y=function(){function $(D){this.$L=k(D.locale,null,!0),this.parse(D),this.$x=this.$x||D.x||{},this[T]=!0}var F=$.prototype;return F.parse=function(D){this.$d=function(z){var X=z.date,Z=z.utc;if(X===null)return new Date(NaN);if(B.u(X))return new Date;if(X instanceof Date)return new Date(X);if(typeof X=="string"&&!/Z$/i.test(X)){var H=X.match(y);if(H){var le=H[2]-1||0,ie=(H[7]||"0").substring(0,3);return Z?new Date(Date.UTC(H[1],le,H[3]||1,H[4]||0,H[5]||0,H[6]||0,ie)):new Date(H[1],le,H[3]||1,H[4]||0,H[5]||0,H[6]||0,ie)}}return new Date(X)}(D),this.init()},F.init=function(){var D=this.$d;this.$y=D.getFullYear(),this.$M=D.getMonth(),this.$D=D.getDate(),this.$W=D.getDay(),this.$H=D.getHours(),this.$m=D.getMinutes(),this.$s=D.getSeconds(),this.$ms=D.getMilliseconds()},F.$utils=function(){return B},F.isValid=function(){return this.$d.toString()!==m},F.isSame=function(D,z){var X=P(D);return this.startOf(z)<=X&&X<=this.endOf(z)},F.isAfter=function(D,z){return P(D){if(t.status===200)return t.json();throw new Error(t.statusText)}).then(()=>{this.endTime=bi(),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?`${bi().subtract(this.startTime).millisecond()}ms`:this.refreshing?At("Pinging..."):this.errorMsg?this.errorMsg:"N/A"}}},t$={class:"card rounded-3"},n$={class:"card-body"},i$={class:"d-flex gap-3 w-100 remoteServerContainer"},s$={class:"d-flex gap-3 align-items-center flex-grow-1"},r$={class:"d-flex gap-3 align-items-center flex-grow-1"},o$={class:"d-flex gap-2 button-group"},a$={class:"card-footer gap-2 d-flex align-items-center"},l$={key:0,class:"spin ms-auto text-primary-emphasis"};function c$(t,e,n,i,s,r){return R(),V("div",t$,[f("div",n$,[f("div",i$,[f("div",s$,[e[7]||(e[7]=f("i",{class:"bi bi-server"},null,-1)),$e(f("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),[[We,this.server.host]])]),f("div",r$,[e[8]||(e[8]=f("i",{class:"bi bi-key-fill"},null,-1)),$e(f("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),[[We,this.server.apiKey]])]),f("div",o$,[f("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"},e[9]||(e[9]=[f("i",{class:"bi bi-trash"},null,-1)])),f("button",{onClick:e[5]||(e[5]=o=>this.connect()),class:Pe([{disabled:!this.active},"ms-auto btn btn-sm bg-success-subtle text-success-emphasis border-1 border-success-subtle"])},e[10]||(e[10]=[f("i",{class:"bi bi-arrow-right-circle"},null,-1)]),2)])])]),f("div",a$,[f("span",{class:Pe(["dot ms-0 me-2",[this.active?"active":"inactive"]])},null,2),f("small",null,we(this.getHandshakeTime),1),this.refreshing?(R(),V("div",l$,e[11]||(e[11]=[f("i",{class:"bi bi-arrow-clockwise"},null,-1)]))):(R(),V("a",{key:1,role:"button",onClick:e[6]||(e[6]=o=>this.handshake()),class:"text-primary-emphasis text-decoration-none ms-auto disabled"},e[12]||(e[12]=[f("i",{class:"bi bi-arrow-clockwise me"},null,-1)])))])])}const u$=je(e$,[["render",c$],["__scopeId","data-v-ed7817c7"]]),d$={name:"RemoteServerList",setup(){return{store:tt()}},components:{LocaleText:He,RemoteServer:u$}},h$={class:"w-100 mt-3"},f$={class:"d-flex align-items-center mb-3"},g$={class:"mb-0"},p$={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"}},m$={key:0,class:"text-muted m-auto"};function _$(t,e,n,i,s,r){const o=Ee("LocaleText"),a=Ee("RemoteServer");return R(),V("div",h$,[f("div",f$,[f("h5",g$,[N(o,{t:"Server List"})]),f("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"},[e[1]||(e[1]=f("i",{class:"bi bi-plus-circle-fill me-2"},null,-1)),N(o,{t:"Server"})])]),f("div",p$,[(R(!0),V(Le,null,Ze(this.store.CrossServerConfiguration.ServerList,(l,c)=>(R(),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?(R(),V("h6",m$,[N(o,{t:"Click"}),e[2]||(e[2]=f("i",{class:"bi bi-plus-circle-fill mx-1"},null,-1)),N(o,{t:"to add your server"})])):ce("",!0)])])}const y$=je(d$,[["render",_$]]),v$={name:"signInInput",methods:{GetLocale:At},props:{id:"",data:"",type:"",placeholder:""},computed:{getLocaleText(){return At(this.placeholder)}}},b$=["type","id","name","placeholder"];function w$(t,e,n,i,s,r){return $e((R(),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,b$)),[[QE,this.data[this.id]]])}const x$=je(v$,[["render",w$]]),E$={name:"signInTOTP",methods:{GetLocale:At},props:{data:""},computed:{getLocaleText(){return At("OTP from your authenticator")}}},C$=["placeholder"];function S$(t,e,n,i,s,r){return $e((R(),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,C$)),[[We,this.data.totp]])}const T$=je(E$,[["render",S$]]),A$={name:"signin",components:{SignInTOTP:T$,SignInInput:x$,LocaleText:He,RemoteServerList:y$,Message:SC},async setup(){const t=tt();let e="dark",n=!1,i;return t.IsElectronApp||await Promise.all([Yt("/api/getDashboardTheme",{},s=>{e=s.data}),Yt("/api/isTotpEnabled",{},s=>{n=s.data}),Yt("/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 At(t)}},methods:{GetLocale:At,async auth(){this.data.username&&this.data.password&&(this.totpEnabled&&this.data.totp||!this.totpEnabled)?(this.loading=!0,await xt("/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"))})}}},k$=["data-bs-theme"],M$={class:"login-box m-auto"},P$={class:"m-auto",style:{width:"700px"}},I$={class:"mb-0 text-body"},D$={key:0,class:"alert alert-danger mt-2 mb-0",role:"alert"},R$={class:"form-group text-body"},L$={class:"form-group text-body"},O$={key:0,class:"form-group text-body"},$$={class:"btn btn-lg btn-dark ms-auto mt-4 w-100 d-flex btn-brand signInBtn",ref:"signInBtn"},N$={key:0,class:"d-flex w-100"},F$={key:1,class:"d-flex w-100 align-items-center"},B$={key:3,class:"d-flex mt-3"},V$={class:"form-check form-switch ms-auto"},z$={class:"form-check-label",for:"flexSwitchCheckChecked"},W$={class:"text-muted pb-3 d-block w-100 text-center mt-3"},Y$={class:"messageCentre text-body position-absolute end-0 m-3"};function H$(t,e,n,i,s,r){const o=Ee("LocaleText"),a=Ee("SignInInput"),l=Ee("SignInTOTP"),c=Ee("RemoteServerList"),u=Ee("Message");return R(),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},[f("div",M$,[f("div",P$,[f("h4",I$,[N(o,{t:"Welcome to"})]),e[7]||(e[7]=f("span",{class:"dashboardLogo display-3"},[f("strong",null,"WGDashboard")],-1)),s.loginError?(R(),V("div",D$,[N(o,{t:this.loginErrorMessage},null,8,["t"])])):ce("",!0),this.store.CrossServerConfiguration.Enable?(R(),Se(c,{key:2})):(R(),V("form",{key:1,onSubmit:e[0]||(e[0]=d=>{d.preventDefault(),this.auth()})},[f("div",R$,[e[2]||(e[2]=f("label",{for:"username",class:"text-left",style:{"font-size":"1rem"}},[f("i",{class:"bi bi-person-circle"})],-1)),N(a,{id:"username",data:this.data,type:"text",placeholder:"Username"},null,8,["data"])]),f("div",L$,[e[3]||(e[3]=f("label",{for:"password",class:"text-left",style:{"font-size":"1rem"}},[f("i",{class:"bi bi-key-fill"})],-1)),N(a,{id:"password",data:this.data,type:"password",placeholder:"Password"},null,8,["data"])]),i.totpEnabled?(R(),V("div",O$,[e[4]||(e[4]=f("label",{for:"totp",class:"text-left",style:{"font-size":"1rem"}},[f("i",{class:"bi bi-lock-fill"})],-1)),N(l,{data:this.data},null,8,["data"])])):ce("",!0),f("button",$$,[this.loading?(R(),V("span",F$,[N(o,{t:"Signing In..."}),e[6]||(e[6]=f("span",{class:"spinner-border ms-auto spinner-border-sm",role:"status"},null,-1))])):(R(),V("span",N$,[N(o,{t:"Sign In"}),e[5]||(e[5]=f("i",{class:"ms-auto bi bi-chevron-right"},null,-1))]))],512)],32)),this.store.IsElectronApp?ce("",!0):(R(),V("div",B$,[f("div",V$,[$e(f("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),[[Kn,this.store.CrossServerConfiguration.Enable]]),f("label",z$,[N(o,{t:"Access Remote Server"})])])]))])]),f("small",W$,[Ue(" WGDashboard "+we(this.version)+" | Developed with ❤️ by ",1),e[8]||(e[8]=f("a",{href:"https://github.com/donaldzou",target:"_blank"},[f("strong",null,"Donald Zou")],-1))]),f("div",Y$,[N(Ul,{name:"message",tag:"div",class:"position-relative"},{default:De(()=>[(R(!0),V(Le,null,Ze(r.getMessages.slice().reverse(),d=>(R(),Se(u,{message:d,key:d.id},null,8,["message"]))),128))]),_:1})])],8,k$)}const j$=je(A$,[["render",H$],["__scopeId","data-v-2fa13e60"]]),K$={name:"configurationCard",components:{LocaleText:He},props:{c:{Name:String,Status:Boolean,PublicKey:String,PrivateKey:String}},data(){return{configurationToggling:!1}},setup(){return{dashboardConfigurationStore:tt()}},methods:{toggle(){this.configurationToggling=!0,Yt("/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})}}},U$={class:"card conf_card rounded-3 shadow text-decoration-none"},G$={class:"mb-0"},X$={class:"card-title mb-0"},q$={class:"card-footer d-flex gap-2 flex-column"},Z$={class:"row"},J$={class:"col-6 col-md-3"},Q$={class:"text-primary-emphasis col-6 col-md-3"},eN={class:"text-success-emphasis col-6 col-md-3"},tN={class:"text-md-end col-6 col-md-3"},nN={class:"d-flex align-items-center gap-2"},iN={class:"text-muted"},sN={style:{"word-break":"keep-all"}},rN={class:"mb-0 d-block d-lg-inline-block"},oN={style:{"line-break":"anywhere"}},aN={class:"form-check form-switch ms-auto"},lN=["for"],cN={key:4,class:"spinner-border spinner-border-sm ms-2","aria-hidden":"true"},uN=["disabled","id"];function dN(t,e,n,i,s,r){const o=Ee("RouterLink"),a=Ee("LocaleText");return R(),V("div",U$,[N(o,{to:"/configuration/"+n.c.Name+"/peers",class:"card-body d-flex align-items-center gap-3 flex-wrap text-decoration-none"},{default:De(()=>[f("h6",G$,[f("span",{class:Pe(["dot",{active:n.c.Status}])},null,2)]),f("h6",X$,[f("samp",null,we(n.c.Name),1)]),e[2]||(e[2]=f("h6",{class:"mb-0 ms-auto"},[f("i",{class:"bi bi-chevron-right"})],-1))]),_:1},8,["to"]),f("div",q$,[f("div",Z$,[f("small",J$,[e[3]||(e[3]=f("i",{class:"bi bi-arrow-down-up me-2"},null,-1)),Ue(we(n.c.DataUsage.Total>0?n.c.DataUsage.Total.toFixed(4):0)+" GB ",1)]),f("small",Q$,[e[4]||(e[4]=f("i",{class:"bi bi-arrow-down me-2"},null,-1)),Ue(we(n.c.DataUsage.Receive>0?n.c.DataUsage.Receive.toFixed(4):0)+" GB ",1)]),f("small",eN,[e[5]||(e[5]=f("i",{class:"bi bi-arrow-up me-2"},null,-1)),Ue(we(n.c.DataUsage.Sent>0?n.c.DataUsage.Sent.toFixed(4):0)+" GB ",1)]),f("small",tN,[f("span",{class:Pe(["dot me-2",{active:n.c.ConnectedPeers>0}])},null,2),Ue(" "+we(n.c.ConnectedPeers)+" / "+we(n.c.TotalPeers)+" ",1),N(a,{t:"Peers"})])]),f("div",nN,[f("small",iN,[f("strong",sN,[N(a,{t:"Public Key"})])]),f("small",rN,[f("samp",oN,we(n.c.PublicKey),1)]),f("div",aN,[f("label",{class:"form-check-label",style:{cursor:"pointer"},for:"switch"+n.c.PrivateKey},[!n.c.Status&&this.configurationToggling?(R(),Se(a,{key:0,t:"Turning Off..."})):n.c.Status&&this.configurationToggling?(R(),Se(a,{key:1,t:"Turning On..."})):n.c.Status&&!this.configurationToggling?(R(),Se(a,{key:2,t:"On"})):!n.c.Status&&!this.configurationToggling?(R(),Se(a,{key:3,t:"Off"})):ce("",!0),this.configurationToggling?(R(),V("span",cN)):ce("",!0)],8,lN),$e(f("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,uN),[[Kn,n.c.Status]])])])])])}const hN=je(K$,[["render",dN]]),fN={name:"configurationList",components:{LocaleText:He,ConfigurationCard:hN},async setup(){return{wireguardConfigurationsStore:qn()}},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)}},gN={class:"mt-md-5 mt-3"},pN={class:"container-md"},mN={class:"d-flex mb-4 configurationListTitle"},_N={class:"text-body d-flex"},yN={key:0},vN={key:0,class:"text-muted"},bN={key:1,class:"d-flex gap-3 flex-column mb-3"};function wN(t,e,n,i,s,r){const o=Ee("LocaleText"),a=Ee("RouterLink"),l=Ee("ConfigurationCard");return R(),V("div",gN,[f("div",pN,[f("div",mN,[f("h3",_N,[e[0]||(e[0]=f("i",{class:"bi bi-body-text me-2"},null,-1)),f("span",null,[N(o,{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:De(()=>[e[1]||(e[1]=f("i",{class:"bi bi-plus-circle-fill me-2"},null,-1)),N(o,{t:"Configuration"})]),_:1})]),N($t,{name:"fade",mode:"out-in"},{default:De(()=>[this.configurationLoaded?(R(),V("div",yN,[this.wireguardConfigurationsStore.Configurations.length===0?(R(),V("p",vN,[N(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."})])):(R(),V("div",bN,[(R(!0),V(Le,null,Ze(this.wireguardConfigurationsStore.Configurations,c=>(R(),Se(l,{key:c.Name,c},null,8,["c"]))),128))]))])):ce("",!0)]),_:1})])])}const xN=je(fN,[["render",wN],["__scopeId","data-v-106e7dee"]]);let Ed;const EN=new Uint8Array(16);function CN(){if(!Ed&&(Ed=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!Ed))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Ed(EN)}const Ln=[];for(let t=0;t<256;++t)Ln.push((t+256).toString(16).slice(1));function SN(t,e=0){return Ln[t[e+0]]+Ln[t[e+1]]+Ln[t[e+2]]+Ln[t[e+3]]+"-"+Ln[t[e+4]]+Ln[t[e+5]]+"-"+Ln[t[e+6]]+Ln[t[e+7]]+"-"+Ln[t[e+8]]+Ln[t[e+9]]+"-"+Ln[t[e+10]]+Ln[t[e+11]]+Ln[t[e+12]]+Ln[t[e+13]]+Ln[t[e+14]]+Ln[t[e+15]]}const TN=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),J0={randomUUID:TN};function Bs(t,e,n){if(J0.randomUUID&&!e&&!t)return J0.randomUUID();t=t||{};const i=t.random||(t.rng||CN)();return i[6]=i[6]&15|64,i[8]=i[8]&63|128,SN(i)}const AN={components:{LocaleText:He},props:{targetData:String,title:String,warning:!1,warningText:""},setup(){const t=tt(),e=`input_${Bs()}`;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 xt("/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})}}},kN={class:"form-group mb-2"},MN=["for"],PN=["id","disabled"],IN={class:"invalid-feedback"},DN={key:0,class:"px-2 py-1 text-warning-emphasis bg-warning-subtle border border-warning-subtle rounded-2 d-inline-block mt-1"};function RN(t,e,n,i,s,r){const o=Ee("LocaleText");return R(),V("div",kN,[f("label",{for:this.uuid,class:"text-muted mb-1"},[f("strong",null,[f("small",null,[N(o,{t:this.title},null,8,["t"])])])],8,MN),$e(f("input",{type:"text",class:Pe(["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,PN),[[We,this.value]]),f("div",IN,we(this.invalidFeedback),1),n.warning?(R(),V("div",DN,[f("small",null,[e[3]||(e[3]=f("i",{class:"bi bi-exclamation-triangle-fill me-2"},null,-1)),N(o,{t:n.warningText},null,8,["t"])])])):ce("",!0)])}const LN=je(AN,[["render",RN]]),ON=t=>{},$N={name:"accountSettingsInputUsername",components:{LocaleText:He},props:{targetData:String,title:String},setup(){const t=tt(),e=`input_${Bs()}`;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(t){this.changed&&(this.updating=!0,await xt("/api/updateDashboardConfigurationItem",{section:"Account",key:this.targetData,value:this.value},e=>{e.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=e.message),this.changed=!1,this.updating=!1}))}}},NN={class:"form-group mb-2"},FN=["for"],BN=["id","disabled"],VN={class:"invalid-feedback"};function zN(t,e,n,i,s,r){const o=Ee("LocaleText");return R(),V("div",NN,[f("label",{for:this.uuid,class:"text-muted mb-1"},[f("strong",null,[f("small",null,[N(o,{t:this.title},null,8,["t"])])])],8,FN),$e(f("input",{type:"text",class:Pe(["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,BN),[[We,this.value]]),f("div",VN,we(this.invalidFeedback),1)])}const WN=je($N,[["render",zN]]),YN={name:"accountSettingsInputPassword",components:{LocaleText:He},props:{targetData:String,warning:!1,warningText:""},setup(){const t=tt(),e=`input_${Bs()}`;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 xt("/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}}},HN={class:"d-flex flex-column"},jN={class:"row"},KN={class:"col-sm"},UN={class:"form-group mb-2"},GN=["for"],XN=["id"],qN={key:0,class:"invalid-feedback d-block"},ZN={class:"col-sm"},JN={class:"form-group mb-2"},QN=["for"],e3=["id"],t3={class:"col-sm"},n3={class:"form-group mb-2"},i3=["for"],s3=["id"],r3=["disabled"];function o3(t,e,n,i,s,r){const o=Ee("LocaleText");return R(),V("div",HN,[f("div",jN,[f("div",KN,[f("div",UN,[f("label",{for:"currentPassword_"+this.uuid,class:"text-muted mb-1"},[f("strong",null,[f("small",null,[N(o,{t:"Current Password"})])])],8,GN),$e(f("input",{type:"password",class:Pe(["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,XN),[[We,this.value.currentPassword]]),s.showInvalidFeedback?(R(),V("div",qN,we(this.invalidFeedback),1)):ce("",!0)])]),f("div",ZN,[f("div",JN,[f("label",{for:"newPassword_"+this.uuid,class:"text-muted mb-1"},[f("strong",null,[f("small",null,[N(o,{t:"New Password"})])])],8,QN),$e(f("input",{type:"password",class:Pe(["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,e3),[[We,this.value.newPassword]])])]),f("div",t3,[f("div",n3,[f("label",{for:"repeatNewPassword_"+this.uuid,class:"text-muted mb-1"},[f("strong",null,[f("small",null,[N(o,{t:"Repeat New Password"})])])],8,i3),$e(f("input",{type:"password",class:Pe(["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,s3),[[We,this.value.repeatNewPassword]])])])]),f("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())},[e[4]||(e[4]=f("i",{class:"bi bi-save2-fill me-2"},null,-1)),N(o,{t:"Update Password"})],8,r3)])}const a3=je(YN,[["render",o3]]),l3={name:"dashboardSettingsInputWireguardConfigurationPath",components:{LocaleText:He},props:{targetData:String,title:String,warning:!1,warningText:""},setup(){const t=tt(),e=qn(),n=`input_${Bs()}`;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 xt("/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}))}}},c3={class:"form-group"},u3=["for"],d3={class:"d-flex gap-2 align-items-start"},h3={class:"flex-grow-1"},f3=["id","disabled"],g3={class:"invalid-feedback fw-bold"},p3=["disabled"],m3={key:0,class:"bi bi-save2-fill"},_3={key:1,class:"spinner-border spinner-border-sm"},y3={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"};function v3(t,e,n,i,s,r){const o=Ee("LocaleText");return R(),V("div",c3,[f("label",{for:this.uuid,class:"text-muted mb-1"},[f("strong",null,[f("small",null,[N(o,{t:this.title},null,8,["t"])])])],8,u3),f("div",d3,[f("div",h3,[$e(f("input",{type:"text",class:Pe(["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,f3),[[We,this.value]]),f("div",g3,we(this.invalidFeedback),1)]),f("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?(R(),V("span",_3)):(R(),V("i",m3))],8,p3)]),n.warning?(R(),V("div",y3,[f("small",null,[e[3]||(e[3]=f("i",{class:"bi bi-exclamation-triangle-fill me-2"},null,-1)),N(o,{t:n.warningText},null,8,["t"])])])):ce("",!0)])}const b3=je(l3,[["render",v3]]),w3={name:"dashboardTheme",components:{LocaleText:He},setup(){return{dashboardConfigurationStore:tt()}},methods:{async switchTheme(t){await xt("/api/updateDashboardConfigurationItem",{section:"Server",key:"dashboard_theme",value:t},e=>{e.status&&(this.dashboardConfigurationStore.Configuration.Server.dashboard_theme=t)})}}},x3={class:"card mb-4 shadow rounded-3"},E3={class:"card-header"},C3={class:"card-body d-flex gap-2"};function S3(t,e,n,i,s,r){const o=Ee("LocaleText");return R(),V("div",x3,[f("p",E3,[N(o,{t:"Dashboard Theme"})]),f("div",C3,[f("button",{class:Pe(["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"))},[e[2]||(e[2]=f("i",{class:"bi bi-sun-fill me-2"},null,-1)),N(o,{t:"Light"})],2),f("button",{class:Pe(["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"))},[e[3]||(e[3]=f("i",{class:"bi bi-moon-fill me-2"},null,-1)),N(o,{t:"Dark"})],2)])])}const T3=je(w3,[["render",S3]]),A3={name:"dashboardSettingsInputIPAddressAndPort",props:{},setup(){const t=tt(),e=`input_${Bs()}`;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 xt("/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)})}}},k3={class:"invalid-feedback d-block mt-0"},M3={class:"row"},P3={class:"form-group mb-2 col-sm"},I3=["for"],D3=["id"],R3={class:"form-group col-sm"},L3=["for"],O3=["id"];function $3(t,e,n,i,s,r){return R(),V("div",null,[f("div",k3,we(this.invalidFeedback),1),f("div",M3,[f("div",P3,[f("label",{for:"app_ip_"+this.uuid,class:"text-muted mb-1"},e[2]||(e[2]=[f("strong",null,[f("small",null,"Dashboard IP Address")],-1)]),8,I3),$e(f("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,D3),[[We,this.app_ip]]),e[3]||(e[3]=f("div",{class:"px-2 py-1 text-warning-emphasis bg-warning-subtle border border-warning-subtle rounded-2 d-inline-block"},[f("small",null,[f("i",{class:"bi bi-exclamation-triangle-fill me-2"}),f("code",null,"0.0.0.0"),Ue(" means it can be access by anyone with your server IP Address.")])],-1))]),f("div",R3,[f("label",{for:"app_port_"+this.uuid,class:"text-muted mb-1"},e[4]||(e[4]=[f("strong",null,[f("small",null,"Dashboard Port")],-1)]),8,L3),$e(f("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,O3),[[We,this.app_port]])])]),e[5]||(e[5]=f("button",{class:"btn btn-success btn-sm fw-bold rounded-3"},[f("i",{class:"bi bi-floppy-fill me-2"}),Ue("Update Dashboard Settings & Restart ")],-1))])}const N3=je(A3,[["render",$3]]);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 _t(t,e){return t instanceof Date?new t.constructor(e):new Date(e)}function ss(t,e){const n=Ve(t);return isNaN(e)?_t(t,NaN):(e&&n.setDate(n.getDate()+e),n)}function ds(t,e){const n=Ve(t);if(isNaN(e))return _t(t,NaN);if(!e)return n;const i=n.getDate(),s=_t(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 AC(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?ds(c,i+n*12):c,d=r||s?ss(u,r+s*7):u,h=a+o*60,p=(l+h*60)*1e3;return _t(t,d.getTime()+p)}function F3(t,e){const n=+Ve(t);return _t(t,n+e)}const kC=6048e5,B3=864e5,V3=6e4,MC=36e5,z3=1e3;function W3(t,e){return F3(t,e*MC)}let Y3={};function ya(){return Y3}function ps(t,e){const n=ya(),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 Q0(t){const e=Ve(t);return e.setHours(0,0,0,0),e}function wh(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 IC(t,e){const n=Q0(t),i=Q0(e),s=+n-wh(n),r=+i-wh(i);return Math.round((s-r)/B3)}function H3(t){const e=PC(t),n=_t(t,0);return n.setFullYear(e,0,4),n.setHours(0,0,0,0),Cl(n)}function j3(t,e){const n=e*3;return ds(t,n)}function w_(t,e){return ds(t,e*12)}function eb(t,e){const n=Ve(t),i=Ve(e),s=n.getTime()-i.getTime();return s<0?-1:s>0?1:s}function DC(t){return t instanceof Date||typeof t=="object"&&Object.prototype.toString.call(t)==="[object Date]"}function Hc(t){if(!DC(t)&&typeof t!="number")return!1;const e=Ve(t);return!isNaN(Number(e))}function tb(t){const e=Ve(t);return Math.trunc(e.getMonth()/3)+1}function K3(t,e){const n=Ve(t),i=Ve(e);return n.getFullYear()-i.getFullYear()}function U3(t,e){const n=Ve(t),i=Ve(e),s=eb(n,i),r=Math.abs(K3(n,i));n.setFullYear(1584),i.setFullYear(1584);const o=eb(n,i)===-s,a=s*(r-+o);return a===0?0:a}function RC(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=1;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 Uo(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 G3(t,e){const n=Ve(t.start),i=Ve(t.end);let s=+n>+i;const r=s?+Uo(n):+Uo(i);let o=Uo(s?i:n),a=1;const l=[];for(;+o<=r;)l.push(Ve(o)),o=j3(o,a);return s?l.reverse():l}function X3(t){const e=Ve(t);return e.setDate(1),e.setHours(0,0,0,0),e}function LC(t){const e=Ve(t),n=e.getFullYear();return e.setFullYear(n+1,0,0),e.setHours(23,59,59,999),e}function lu(t){const e=Ve(t),n=_t(t,0);return n.setFullYear(e.getFullYear(),0,1),n.setHours(0,0,0,0),n}function OC(t,e){const n=ya(),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=q3[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 Ig(t){return(e={})=>{const n=e.width?String(e.width):t.defaultWidth;return t.formats[n]||t.formats[t.defaultWidth]}}const J3={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},Q3={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},eF={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},tF={date:Ig({formats:J3,defaultWidth:"full"}),time:Ig({formats:Q3,defaultWidth:"full"}),dateTime:Ig({formats:eF,defaultWidth:"full"})},nF={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},iF=(t,e,n,i)=>nF[t];function cc(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 sF={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},rF={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},oF={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"]},aF={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"]},lF={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"}},cF={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"}},uF=(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"},dF={ordinalNumber:uF,era:cc({values:sF,defaultWidth:"wide"}),quarter:cc({values:rF,defaultWidth:"wide",argumentCallback:t=>t-1}),month:cc({values:oF,defaultWidth:"wide"}),day:cc({values:aF,defaultWidth:"wide"}),dayPeriod:cc({values:lF,defaultWidth:"wide",formattingValues:cF,defaultFormattingWidth:"wide"})};function uc(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)?fF(a,d=>d.test(o)):hF(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 hF(t,e){for(const n in t)if(Object.prototype.hasOwnProperty.call(t,n)&&e(t[n]))return n}function fF(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 pF=/^(\d+)(th|st|nd|rd)?/i,mF=/\d+/i,_F={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},yF={any:[/^b/i,/^(a|c)/i]},vF={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},bF={any:[/1/i,/2/i,/3/i,/4/i]},wF={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},xF={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]},EF={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},CF={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]},SF={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},TF={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}},AF={ordinalNumber:gF({matchPattern:pF,parsePattern:mF,valueCallback:t=>parseInt(t,10)}),era:uc({matchPatterns:_F,defaultMatchWidth:"wide",parsePatterns:yF,defaultParseWidth:"any"}),quarter:uc({matchPatterns:vF,defaultMatchWidth:"wide",parsePatterns:bF,defaultParseWidth:"any",valueCallback:t=>t+1}),month:uc({matchPatterns:wF,defaultMatchWidth:"wide",parsePatterns:xF,defaultParseWidth:"any"}),day:uc({matchPatterns:EF,defaultMatchWidth:"wide",parsePatterns:CF,defaultParseWidth:"any"}),dayPeriod:uc({matchPatterns:SF,defaultMatchWidth:"any",parsePatterns:TF,defaultParseWidth:"any"})},$C={code:"en-US",formatDistance:Z3,formatLong:tF,formatRelative:iF,localize:dF,match:AF,options:{weekStartsOn:0,firstWeekContainsDate:1}};function kF(t){const e=Ve(t);return IC(e,lu(e))+1}function x_(t){const e=Ve(t),n=+Cl(e)-+H3(e);return Math.round(n/kC)+1}function E_(t,e){const n=Ve(t),i=n.getFullYear(),s=ya(),r=e?.firstWeekContainsDate??e?.locale?.options?.firstWeekContainsDate??s.firstWeekContainsDate??s.locale?.options?.firstWeekContainsDate??1,o=_t(t,0);o.setFullYear(i+1,0,r),o.setHours(0,0,0,0);const a=ps(o,e),l=_t(t,0);l.setFullYear(i,0,r),l.setHours(0,0,0,0);const c=ps(l,e);return n.getTime()>=a.getTime()?i+1:n.getTime()>=c.getTime()?i:i-1}function MF(t,e){const n=ya(),i=e?.firstWeekContainsDate??e?.locale?.options?.firstWeekContainsDate??n.firstWeekContainsDate??n.locale?.options?.firstWeekContainsDate??1,s=E_(t,e),r=_t(t,0);return r.setFullYear(s,0,i),r.setHours(0,0,0,0),ps(r,e)}function C_(t,e){const n=Ve(t),i=+ps(n,e)-+MF(n,e);return Math.round(i/kC)+1}function Ct(t,e){const n=t<0?"-":"",i=Math.abs(t).toString().padStart(e,"0");return n+i}const Mr={y(t,e){const n=t.getFullYear(),i=n>0?n:1-n;return Ct(e==="yy"?i%100:i,e.length)},M(t,e){const n=t.getMonth();return e==="M"?String(n+1):Ct(n+1,2)},d(t,e){return Ct(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 Ct(t.getHours()%12||12,e.length)},H(t,e){return Ct(t.getHours(),e.length)},m(t,e){return Ct(t.getMinutes(),e.length)},s(t,e){return Ct(t.getSeconds(),e.length)},S(t,e){const n=e.length,i=t.getMilliseconds(),s=Math.trunc(i*Math.pow(10,n-3));return Ct(s,e.length)}},Ra={am:"am",pm:"pm",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},ib={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 Mr.y(t,e)},Y:function(t,e,n,i){const s=E_(t,i),r=s>0?s:1-s;if(e==="YY"){const o=r%100;return Ct(o,2)}return e==="Yo"?n.ordinalNumber(r,{unit:"year"}):Ct(r,e.length)},R:function(t,e){const n=PC(t);return Ct(n,e.length)},u:function(t,e){const n=t.getFullYear();return Ct(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 Ct(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 Ct(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 Mr.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 Ct(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=C_(t,i);return e==="wo"?n.ordinalNumber(s,{unit:"week"}):Ct(s,e.length)},I:function(t,e,n){const i=x_(t);return e==="Io"?n.ordinalNumber(i,{unit:"week"}):Ct(i,e.length)},d:function(t,e,n){return e==="do"?n.ordinalNumber(t.getDate(),{unit:"date"}):Mr.d(t,e)},D:function(t,e,n){const i=kF(t);return e==="Do"?n.ordinalNumber(i,{unit:"dayOfYear"}):Ct(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 Ct(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 Ct(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 Ct(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=Ra.noon:i===0?s=Ra.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=Ra.evening:i>=12?s=Ra.afternoon:i>=4?s=Ra.morning:s=Ra.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 Mr.h(t,e)},H:function(t,e,n){return e==="Ho"?n.ordinalNumber(t.getHours(),{unit:"hour"}):Mr.H(t,e)},K:function(t,e,n){const i=t.getHours()%12;return e==="Ko"?n.ordinalNumber(i,{unit:"hour"}):Ct(i,e.length)},k:function(t,e,n){let i=t.getHours();return i===0&&(i=24),e==="ko"?n.ordinalNumber(i,{unit:"hour"}):Ct(i,e.length)},m:function(t,e,n){return e==="mo"?n.ordinalNumber(t.getMinutes(),{unit:"minute"}):Mr.m(t,e)},s:function(t,e,n){return e==="so"?n.ordinalNumber(t.getSeconds(),{unit:"second"}):Mr.s(t,e)},S:function(t,e){return Mr.S(t,e)},X:function(t,e,n){const i=t.getTimezoneOffset();if(i===0)return"Z";switch(e){case"X":return rb(i);case"XXXX":case"XX":return zo(i);case"XXXXX":case"XXX":default:return zo(i,":")}},x:function(t,e,n){const i=t.getTimezoneOffset();switch(e){case"x":return rb(i);case"xxxx":case"xx":return zo(i);case"xxxxx":case"xxx":default:return zo(i,":")}},O:function(t,e,n){const i=t.getTimezoneOffset();switch(e){case"O":case"OO":case"OOO":return"GMT"+sb(i,":");case"OOOO":default:return"GMT"+zo(i,":")}},z:function(t,e,n){const i=t.getTimezoneOffset();switch(e){case"z":case"zz":case"zzz":return"GMT"+sb(i,":");case"zzzz":default:return"GMT"+zo(i,":")}},t:function(t,e,n){const i=Math.trunc(t.getTime()/1e3);return Ct(i,e.length)},T:function(t,e,n){const i=t.getTime();return Ct(i,e.length)}};function sb(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+Ct(r,2)}function rb(t,e){return t%60===0?(t>0?"-":"+")+Ct(Math.abs(t)/60,2):zo(t,e)}function zo(t,e=""){const n=t>0?"-":"+",i=Math.abs(t),s=Ct(Math.trunc(i/60),2),r=Ct(i%60,2);return n+s+e+r}const ob=(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"})}},NC=(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"})}},PF=(t,e)=>{const n=t.match(/(P+)(p+)?/)||[],i=n[1],s=n[2];if(!s)return ob(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}}",ob(i,e)).replace("{{time}}",NC(s,e))},qp={p:NC,P:PF},IF=/^D+$/,DF=/^Y+$/,RF=["D","DD","YY","YYYY"];function FC(t){return IF.test(t)}function BC(t){return DF.test(t)}function Zp(t,e,n){const i=LF(t,e,n);if(console.warn(i),RF.includes(t))throw new RangeError(i)}function LF(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 OF=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,$F=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,NF=/^'([^]*?)'?$/,FF=/''/g,BF=/[a-zA-Z]/;function Os(t,e,n){const i=ya(),s=n?.locale??i.locale??$C,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(!Hc(a))throw new RangeError("Invalid time value");let l=e.match($F).map(u=>{const d=u[0];if(d==="p"||d==="P"){const h=qp[d];return h(u,s.formatLong)}return u}).join("").match(OF).map(u=>{if(u==="''")return{isToken:!1,value:"'"};const d=u[0];if(d==="'")return{isToken:!1,value:VF(u)};if(ib[d])return{isToken:!0,value:u};if(d.match(BF))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&&BC(d)||!n?.useAdditionalDayOfYearTokens&&FC(d))&&Zp(d,e,String(t));const h=ib[d[0]];return h(a,d,s.localize,c)}).join("")}function VF(t){const e=t.match(NF);return e?e[1].replace(FF,"'"):t}function zF(t){return Ve(t).getDay()}function WF(t){const e=Ve(t),n=e.getFullYear(),i=e.getMonth(),s=_t(t,0);return s.setFullYear(n,i+1,0),s.setHours(0,0,0,0),s.getDate()}function YF(){return Object.assign({},ya())}function yr(t){return Ve(t).getHours()}function HF(t){let n=Ve(t).getDay();return n===0&&(n=7),n}function ao(t){return Ve(t).getMinutes()}function at(t){return Ve(t).getMonth()}function Sl(t){return Ve(t).getSeconds()}function Xe(t){return Ve(t).getFullYear()}function Tl(t,e){const n=Ve(t),i=Ve(e);return n.getTime()>i.getTime()}function cu(t,e){const n=Ve(t),i=Ve(e);return+n<+i}function el(t,e){const n=Ve(t),i=Ve(e);return+n==+i}function jF(t,e){const n=e instanceof Date?_t(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 KF=10;class VC{subPriority=0;validate(e,n){return!0}}class UF extends VC{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 GF extends VC{priority=KF;subPriority=-1;set(e,n){return n.timestampIsSet?e:_t(e,jF(e,Date))}}class vt{run(e,n,i,s){const r=this.parse(e,n,i,s);return r?{setter:new UF(r.value,this.validate,this.set,this.priority,this.subPriority),rest:r.rest}:null}validate(e,n,i){return!0}}class XF extends vt{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 an={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}/},Cs={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 ln(t,e){return t&&{value:e(t.value),rest:t.rest}}function Xt(t,e){const n=e.match(t);return n?{value:parseInt(n[0],10),rest:e.slice(n[0].length)}:null}function Ss(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*MC+r*V3+o*z3),rest:e.slice(n[0].length)}}function zC(t){return Xt(an.anyDigitsSigned,t)}function sn(t,e){switch(t){case 1:return Xt(an.singleDigit,e);case 2:return Xt(an.twoDigits,e);case 3:return Xt(an.threeDigits,e);case 4:return Xt(an.fourDigits,e);default:return Xt(new RegExp("^\\d{1,"+t+"}"),e)}}function xh(t,e){switch(t){case 1:return Xt(an.singleDigitSigned,e);case 2:return Xt(an.twoDigitsSigned,e);case 3:return Xt(an.threeDigitsSigned,e);case 4:return Xt(an.fourDigitsSigned,e);default:return Xt(new RegExp("^-?\\d{1,"+t+"}"),e)}}function S_(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 WC(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 YC(t){return t%400===0||t%4===0&&t%100!==0}class qF extends vt{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 ln(sn(4,e),s);case"yo":return ln(i.ordinalNumber(e,{unit:"year"}),s);default:return ln(sn(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=WC(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 ZF extends vt{priority=130;parse(e,n,i){const s=r=>({year:r,isTwoDigitYear:n==="YY"});switch(n){case"Y":return ln(sn(4,e),s);case"Yo":return ln(i.ordinalNumber(e,{unit:"year"}),s);default:return ln(sn(n.length,e),s)}}validate(e,n){return n.isTwoDigitYear||n.year>0}set(e,n,i,s){const r=E_(e,s);if(i.isTwoDigitYear){const a=WC(i.year,r);return e.setFullYear(a,0,s.firstWeekContainsDate),e.setHours(0,0,0,0),ps(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),ps(e,s)}incompatibleTokens=["y","R","u","Q","q","M","L","I","d","D","i","t","T"]}class JF extends vt{priority=130;parse(e,n){return xh(n==="R"?4:n.length,e)}set(e,n,i){const s=_t(e,0);return s.setFullYear(i,0,4),s.setHours(0,0,0,0),Cl(s)}incompatibleTokens=["G","y","Y","u","Q","q","M","L","w","d","D","e","c","t","T"]}class QF extends vt{priority=130;parse(e,n){return xh(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 e5 extends vt{priority=120;parse(e,n,i){switch(n){case"Q":case"QQ":return sn(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 t5 extends vt{priority=120;parse(e,n,i){switch(n){case"q":case"qq":return sn(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 n5 extends vt{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 ln(Xt(an.month,e),s);case"MM":return ln(sn(2,e),s);case"Mo":return ln(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 i5 extends vt{priority=110;parse(e,n,i){const s=r=>r-1;switch(n){case"L":return ln(Xt(an.month,e),s);case"LL":return ln(sn(2,e),s);case"Lo":return ln(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 s5(t,e,n){const i=Ve(t),s=C_(i,n)-e;return i.setDate(i.getDate()-s*7),i}class r5 extends vt{priority=100;parse(e,n,i){switch(n){case"w":return Xt(an.week,e);case"wo":return i.ordinalNumber(e,{unit:"week"});default:return sn(n.length,e)}}validate(e,n){return n>=1&&n<=53}set(e,n,i,s){return ps(s5(e,i,s),s)}incompatibleTokens=["y","R","u","q","Q","M","L","I","d","D","i","t","T"]}function o5(t,e){const n=Ve(t),i=x_(n)-e;return n.setDate(n.getDate()-i*7),n}class a5 extends vt{priority=100;parse(e,n,i){switch(n){case"I":return Xt(an.week,e);case"Io":return i.ordinalNumber(e,{unit:"week"});default:return sn(n.length,e)}}validate(e,n){return n>=1&&n<=53}set(e,n,i){return Cl(o5(e,i))}incompatibleTokens=["y","Y","u","q","Q","M","L","w","d","D","e","c","t","T"]}const l5=[31,28,31,30,31,30,31,31,30,31,30,31],c5=[31,29,31,30,31,30,31,31,30,31,30,31];class u5 extends vt{priority=90;subPriority=1;parse(e,n,i){switch(n){case"d":return Xt(an.date,e);case"do":return i.ordinalNumber(e,{unit:"date"});default:return sn(n.length,e)}}validate(e,n){const i=e.getFullYear(),s=YC(i),r=e.getMonth();return s?n>=1&&n<=c5[r]:n>=1&&n<=l5[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 d5 extends vt{priority=90;subpriority=1;parse(e,n,i){switch(n){case"D":case"DD":return Xt(an.dayOfYear,e);case"Do":return i.ordinalNumber(e,{unit:"date"});default:return sn(n.length,e)}}validate(e,n){const i=e.getFullYear();return YC(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 T_(t,e,n){const i=ya(),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 h5 extends vt{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=T_(e,i,s),e.setHours(0,0,0,0),e}incompatibleTokens=["D","i","e","c","t","T"]}class f5 extends vt{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 ln(sn(n.length,e),r);case"eo":return ln(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=T_(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 g5 extends vt{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 ln(sn(n.length,e),r);case"co":return ln(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=T_(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 p5(t,e){const n=Ve(t),i=HF(n),s=e-i;return ss(n,s)}class m5 extends vt{priority=90;parse(e,n,i){const s=r=>r===0?7:r;switch(n){case"i":case"ii":return sn(n.length,e);case"io":return i.ordinalNumber(e,{unit:"day"});case"iii":return ln(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 ln(i.day(e,{width:"narrow",context:"formatting"}),s);case"iiiiii":return ln(i.day(e,{width:"short",context:"formatting"})||i.day(e,{width:"narrow",context:"formatting"}),s);case"iiii":default:return ln(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=p5(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 _5 extends vt{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(S_(i),0,0,0),e}incompatibleTokens=["b","B","H","k","t","T"]}class y5 extends vt{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(S_(i),0,0,0),e}incompatibleTokens=["a","B","H","k","t","T"]}class v5 extends vt{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(S_(i),0,0,0),e}incompatibleTokens=["a","b","t","T"]}class b5 extends vt{priority=70;parse(e,n,i){switch(n){case"h":return Xt(an.hour12h,e);case"ho":return i.ordinalNumber(e,{unit:"hour"});default:return sn(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 w5 extends vt{priority=70;parse(e,n,i){switch(n){case"H":return Xt(an.hour23h,e);case"Ho":return i.ordinalNumber(e,{unit:"hour"});default:return sn(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 x5 extends vt{priority=70;parse(e,n,i){switch(n){case"K":return Xt(an.hour11h,e);case"Ko":return i.ordinalNumber(e,{unit:"hour"});default:return sn(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 E5 extends vt{priority=70;parse(e,n,i){switch(n){case"k":return Xt(an.hour24h,e);case"ko":return i.ordinalNumber(e,{unit:"hour"});default:return sn(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 C5 extends vt{priority=60;parse(e,n,i){switch(n){case"m":return Xt(an.minute,e);case"mo":return i.ordinalNumber(e,{unit:"minute"});default:return sn(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 S5 extends vt{priority=50;parse(e,n,i){switch(n){case"s":return Xt(an.second,e);case"so":return i.ordinalNumber(e,{unit:"second"});default:return sn(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 T5 extends vt{priority=30;parse(e,n){const i=s=>Math.trunc(s*Math.pow(10,-n.length+3));return ln(sn(n.length,e),i)}set(e,n,i){return e.setMilliseconds(i),e}incompatibleTokens=["t","T"]}class A5 extends vt{priority=10;parse(e,n){switch(n){case"X":return Ss(Cs.basicOptionalMinutes,e);case"XX":return Ss(Cs.basic,e);case"XXXX":return Ss(Cs.basicOptionalSeconds,e);case"XXXXX":return Ss(Cs.extendedOptionalSeconds,e);case"XXX":default:return Ss(Cs.extended,e)}}set(e,n,i){return n.timestampIsSet?e:_t(e,e.getTime()-wh(e)-i)}incompatibleTokens=["t","T","x"]}class k5 extends vt{priority=10;parse(e,n){switch(n){case"x":return Ss(Cs.basicOptionalMinutes,e);case"xx":return Ss(Cs.basic,e);case"xxxx":return Ss(Cs.basicOptionalSeconds,e);case"xxxxx":return Ss(Cs.extendedOptionalSeconds,e);case"xxx":default:return Ss(Cs.extended,e)}}set(e,n,i){return n.timestampIsSet?e:_t(e,e.getTime()-wh(e)-i)}incompatibleTokens=["t","T","X"]}class M5 extends vt{priority=40;parse(e){return zC(e)}set(e,n,i){return[_t(e,i*1e3),{timestampIsSet:!0}]}incompatibleTokens="*"}class P5 extends vt{priority=20;parse(e){return zC(e)}set(e,n,i){return[_t(e,i),{timestampIsSet:!0}]}incompatibleTokens="*"}const I5={G:new XF,y:new qF,Y:new ZF,R:new JF,u:new QF,Q:new e5,q:new t5,M:new n5,L:new i5,w:new r5,I:new a5,d:new u5,D:new d5,E:new h5,e:new f5,c:new g5,i:new m5,a:new _5,b:new y5,B:new v5,h:new b5,H:new w5,K:new x5,k:new E5,m:new C5,s:new S5,S:new T5,X:new A5,x:new k5,t:new M5,T:new P5},D5=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,R5=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,L5=/^'([^]*?)'?$/,O5=/''/g,$5=/\S/,N5=/[a-zA-Z]/;function Jp(t,e,n,i){const s=YF(),r=i?.locale??s.locale??$C,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):_t(n,NaN);const l={firstWeekContainsDate:o,weekStartsOn:a,locale:r},c=[new GF],u=e.match(R5).map(m=>{const y=m[0];if(y in qp){const v=qp[y];return v(m,r.formatLong)}return m}).join("").match(D5),d=[];for(let m of u){!i?.useAdditionalWeekYearTokens&&BC(m)&&Zp(m,e,t),!i?.useAdditionalDayOfYearTokens&&FC(m)&&Zp(m,e,t);const y=m[0],v=I5[y];if(v){const{incompatibleTokens:b}=v;if(Array.isArray(b)){const E=d.find(w=>b.includes(w.token)||w.token===y);if(E)throw new RangeError(`The format string mustn't contain \`${E.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 x=v.run(t,m,r.match,l);if(!x)return _t(n,NaN);c.push(x.setter),t=x.rest}else{if(y.match(N5))throw new RangeError("Format string contains an unescaped latin alphabet character `"+y+"`");if(m==="''"?m="'":y==="'"&&(m=F5(m)),t.indexOf(m)===0)t=t.slice(m.length);else return _t(n,NaN)}}if(t.length>0&&$5.test(t))return _t(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 g=Ve(n);if(isNaN(g.getTime()))return _t(n,NaN);const p={};for(const m of h){if(!m.validate(g,l))return _t(n,NaN);const y=m.set(g,p,l);Array.isArray(y)?(g=y[0],Object.assign(p,y[1])):g=y}return _t(n,g)}function F5(t){return t.match(L5)[1].replace(O5,"'")}function ab(t,e){const n=Uo(t),i=Uo(e);return+n==+i}function B5(t,e){return ss(t,-e)}function HC(t,e){const n=Ve(t),i=n.getFullYear(),s=n.getDate(),r=_t(t,0);r.setFullYear(i,e,15),r.setHours(0,0,0,0);const o=WF(r);return n.setMonth(e,Math.min(s,o)),n}function Pt(t,e){let n=Ve(t);return isNaN(+n)?_t(t,NaN):(e.year!=null&&n.setFullYear(e.year),e.month!=null&&(n=HC(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 V5(t,e){const n=Ve(t);return n.setHours(e),n}function jC(t,e){const n=Ve(t);return n.setMilliseconds(e),n}function z5(t,e){const n=Ve(t);return n.setMinutes(e),n}function KC(t,e){const n=Ve(t);return n.setSeconds(e),n}function ks(t,e){const n=Ve(t);return isNaN(+n)?_t(t,NaN):(n.setFullYear(e),n)}function Al(t,e){return ds(t,-e)}function W5(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=Al(t,i+n*12),u=B5(c,r+s*7),d=a+o*60,g=(l+d*60)*1e3;return _t(t,u.getTime()-g)}function UC(t,e){return w_(t,-e)}function Gl(){const t=AD();return R(),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},[f("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"}),f("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"}),f("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"}),f("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"})])}Gl.compatConfig={MODE:3};function GC(){return R(),V("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor","aria-hidden":"true",class:"dp__icon",role:"img"},[f("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"}),f("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"})])}GC.compatConfig={MODE:3};function A_(){return R(),V("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor","aria-hidden":"true",class:"dp__icon",role:"img"},[f("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"})])}A_.compatConfig={MODE:3};function k_(){return R(),V("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor","aria-hidden":"true",class:"dp__icon",role:"img"},[f("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"})])}k_.compatConfig={MODE:3};function M_(){return R(),V("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor","aria-hidden":"true",class:"dp__icon",role:"img"},[f("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"}),f("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"})])}M_.compatConfig={MODE:3};function P_(){return R(),V("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor","aria-hidden":"true",class:"dp__icon",role:"img"},[f("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"})])}P_.compatConfig={MODE:3};function I_(){return R(),V("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor","aria-hidden":"true",class:"dp__icon",role:"img"},[f("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"})])}I_.compatConfig={MODE:3};const xi=(t,e)=>e?new Date(t.toLocaleString("en-US",{timeZone:e})):new Date(t),D_=(t,e,n)=>Qp(t,e,n)||Ce(),Y5=(t,e,n)=>{const i=e.dateInTz?xi(new Date(t),e.dateInTz):Ce(t);return n?oi(i,!0):i},Qp=(t,e,n)=>{if(!t)return null;const i=n?oi(Ce(t),!0):Ce(t);return e?e.exactMatch?Y5(t,e,n):xi(i,e.timezone):i},H5=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||{}),Wo=(t=>(t.top="top",t.bottom="bottom",t))(Wo||{}),ta=(t=>(t.header="header",t.calendar="calendar",t.timePicker="timePicker",t))(ta||{}),Yn=(t=>(t.month="month",t.year="year",t.calendar="calendar",t.time="time",t.minutes="minutes",t.hours="hours",t.seconds="seconds",t))(Yn||{});const j5=["timestamp","date","iso"];var Jn=(t=>(t.up="up",t.down="down",t.left="left",t.right="right",t))(Jn||{}),Ot=(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))(Ot||{});function lb(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 K5(t){return e=>Os(xi(new Date(`2017-01-0${e}T00:00:00+00:00`),"UTC"),"EEEEEE",{locale:t})}const U5=(t,e,n)=>{const i=[1,2,3,4,5,6,7];let s;if(t!==null)try{s=i.map(K5(t))}catch{s=i.map(lb(e))}else s=i.map(lb(e));const r=s.slice(0,n),o=s.slice(n+1,s.length);return[s[n]].concat(...o).concat(...r)},R_=(t,e,n)=>{const i=[];for(let s=+t[0];s<=+t[1];s++)i.push({value:+s,text:JC(s,e)});return n?i.reverse():i},XC=(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=Os(xi(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}})},G5=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],vn=t=>{const e=J(t);return e!=null&&e.$el?e?.$el:e},X5=t=>({type:"dot",...t??{}}),qC=t=>Array.isArray(t)?!!t[0]&&!!t[1]:!1,L_={prop:t=>`"${t}" prop must be enabled!`,dateArr:t=>`You need to use array as "model-value" binding in order to support "${t}"`},An=t=>t,cb=t=>t===0?t:!t||isNaN(+t)?null:+t,ub=t=>t===null,ZC=t=>{if(t)return[...t.querySelectorAll("input, button, select, textarea, a[href]")][0]},q5=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?+tq5(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}}})),eo=(t,e,n=!1)=>{t&&e.allowStopPropagation&&(n&&t.stopImmediatePropagation(),t.stopPropagation())},Z5=()=>["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 J5(t,e){let n=[...document.querySelectorAll(Z5())];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 em=(t,e)=>t?.querySelector(`[data-dp-element="${e}"]`),JC=(t,e)=>new Intl.NumberFormat(e,{useGrouping:!1,style:"decimal"}).format(t),O_=t=>Os(t,"dd-MM-yyyy"),Dg=t=>Array.isArray(t),Eh=(t,e)=>e.get(O_(t)),Q5=(t,e)=>t?e?e instanceof Map?!!Eh(t,e):e(Ce(t)):!1:!0,ii=(t,e,n=!1,i)=>{if(t.key===Ot.enter||t.key===Ot.space)return n&&t.preventDefault(),e();if(i)return i(t)},db=()=>["iPad Simulator","iPhone Simulator","iPod Simulator","iPad","iPhone","iPod"].some(t=>navigator.userAgent.includes(t))||navigator.userAgent.includes("Mac")&&"ontouchend"in document,hb=(t,e,n,i,s,r)=>{const o=Jp(t,e.slice(0,t.length),new Date,{locale:r});return Hc(o)&&DC(o)?i||s?o:Pt(o,{hours:+n.hours,minutes:+n?.minutes,seconds:+n?.seconds,milliseconds:0}):null},eB=(t,e,n,i,s,r)=>{const o=Array.isArray(n)?n[0]:n;if(typeof e=="string")return hb(t,e,o,i,s,r);if(Array.isArray(e)){let a=null;for(const l of e)if(a=hb(t,l,o,i,s,r),a)break;return a}return typeof e=="function"?e(t):null},Ce=t=>t?new Date(t):new Date,tB=(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()},oi=(t,e)=>{const n=Ce(JSON.parse(JSON.stringify(t))),i=Pt(n,{hours:0,minutes:0,seconds:0,milliseconds:0});return e?X3(i):i},to=(t,e,n,i)=>{let s=t?Ce(t):Ce();return(e||e===0)&&(s=V5(s,+e)),(n||n===0)&&(s=z5(s,+n)),(i||i===0)&&(s=KC(s,+i)),jC(s,0)},Qt=(t,e)=>!t||!e?!1:cu(oi(t),oi(e)),ct=(t,e)=>!t||!e?!1:el(oi(t),oi(e)),on=(t,e)=>!t||!e?!1:Tl(oi(t),oi(e)),vf=(t,e,n)=>t!=null&&t[0]&&t!=null&&t[1]?on(n,t[0])&&Qt(n,t[1]):t!=null&&t[0]&&e?on(n,t[0])&&Qt(n,e)||Qt(n,t[0])&&on(n,e):!1,rs=t=>{const e=Pt(new Date(t),{date:1});return oi(e)},Rg=(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:yr(t),minutes:ao(t),seconds:Sl(t)}),QC=(t,e)=>{if(e){const n=Xe(Ce(e));if(n>t)return 12;if(n===t)return at(Ce(e))}},eS=(t,e)=>{if(e){const n=Xe(Ce(e));return n{if(t)return Xe(Ce(t))},tS=(t,e)=>{const n=on(t,e)?e:t,i=on(e,t)?e:t;return RC({start:n,end:i})},nB=t=>{const e=ds(t,1);return{month:at(e),year:Xe(e)}},nr=(t,e)=>{const n=ps(t,{weekStartsOn:+e}),i=OC(t,{weekStartsOn:+e});return[n,i]},nS=(t,e)=>{const n={hours:yr(Ce()),minutes:ao(Ce()),seconds:e?Sl(Ce()):0};return Object.assign(n,t)},Kr=(t,e,n)=>[Pt(Ce(t),{date:1}),Pt(Ce(),{month:e,year:n,date:1})],ar=(t,e,n)=>{let i=t?Ce(t):Ce();return(e||e===0)&&(i=HC(i,e)),n&&(i=ks(i,n)),i},iS=(t,e,n,i,s)=>{if(!i||s&&!e||!s&&!n)return!1;const r=s?ds(t,1):Al(t,1),o=[at(r),Xe(r)];return s?!sB(...o,e):!iB(...o,n)},iB=(t,e,n)=>Qt(...Kr(n,t,e))||ct(...Kr(n,t,e)),sB=(t,e,n)=>on(...Kr(n,t,e))||ct(...Kr(n,t,e)),sS=(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)?`${Os(t[0],r,a)}${s&&!t[1]?"":i}${t[1]?Os(t[1],r,a):""}`:Os(t,r,a)},La=t=>{if(t)return null;throw new Error(L_.prop("partial-range"))},Cd=(t,e)=>{if(e)return t();throw new Error(L_.prop("range"))},tm=t=>Array.isArray(t)?Hc(t[0])&&(t[1]?Hc(t[1]):!0):t?Hc(t):!1,rB=(t,e)=>Pt(e??Ce(),{hours:+t.hours||0,minutes:+t.minutes||0,seconds:+t.seconds||0}),Lg=(t,e,n,i)=>{if(!t)return!0;if(i){const s=n==="max"?cu(t,e):Tl(t,e),r={seconds:0,milliseconds:0};return s||el(Pt(t,r),Pt(e,r))}return n==="max"?t.getTime()<=e.getTime():t.getTime()>=e.getTime()},Og=(t,e,n)=>t?rB(t,e):Ce(n??e),fb=(t,e,n,i,s)=>{if(Array.isArray(i)){const o=Og(t,i[0],e),a=Og(t,i[1],e);return Lg(i[0],o,n,!!e)&&Lg(i[1],a,n,!!e)&&s}const r=Og(t,i,e);return Lg(i,r,n,!!e)&&s},$g=t=>Pt(Ce(),na(t)),oB=(t,e)=>t instanceof Map?Array.from(t.values()).filter(n=>Xe(Ce(n))===e).map(n=>at(n)):[],rS=(t,e,n)=>typeof t=="function"?t({month:e,year:n}):!!t.months.find(i=>i.month===e&&i.year===n),$_=(t,e)=>typeof t=="function"?t(e):t.years.includes(e),oS=t=>Os(t,"yyyy-MM-dd"),dc=Ki({menuFocused:!1,shiftKeyInMenu:!1}),aS=()=>{const t=n=>{dc.menuFocused=n},e=n=>{dc.shiftKeyInMenu!==n&&(dc.shiftKeyInMenu=n)};return{control:be(()=>({shiftKeyInMenu:dc.shiftKeyInMenu,menuFocused:dc.menuFocused})),setMenuFocused:t,setShiftKey:e}},Lt=Ki({monthYear:[],calendar:[],time:[],actionRow:[],selectionGrid:[],timePicker:{0:[],1:[]},monthPicker:[]}),Ng=xe(null),Sd=xe(!1),Fg=xe(!1),Bg=xe(!1),Vg=xe(!1),Bn=xe(0),rn=xe(0),_o=()=>{const t=be(()=>Sd.value?[...Lt.selectionGrid,Lt.actionRow].filter(d=>d.length):Fg.value?[...Lt.timePicker[0],...Lt.timePicker[1],Vg.value?[]:[Ng.value],Lt.actionRow].filter(d=>d.length):Bg.value?[...Lt.monthPicker,Lt.actionRow]:[Lt.monthYear,...Lt.calendar,Lt.time,Lt.actionRow].filter(d=>d.length)),e=d=>{Bn.value=d?Bn.value+1:Bn.value-1;let h=null;t.value[rn.value]&&(h=t.value[rn.value][Bn.value]),!h&&t.value[rn.value+(d?1:-1)]?(rn.value=rn.value+(d?1:-1),Bn.value=d?0:t.value[rn.value].length-1):h||(Bn.value=d?Bn.value-1:Bn.value+1)},n=d=>{rn.value===0&&!d||rn.value===t.value.length&&d||(rn.value=d?rn.value+1:rn.value-1,t.value[rn.value]?t.value[rn.value]&&!t.value[rn.value][Bn.value]&&Bn.value!==0&&(Bn.value=t.value[rn.value].length-1):rn.value=d?rn.value-1:rn.value+1)},i=d=>{let h=null;t.value[rn.value]&&(h=t.value[rn.value][Bn.value]),h?h.focus({preventScroll:!Sd.value}):Bn.value=d?Bn.value-1:Bn.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)=>{Lt[h]=d},c=(d,h)=>{Lt[h]=d},u=()=>{Bn.value=0,rn.value=0};return{buildMatrix:l,buildMultiLevelMatrix:c,setTimePickerBackRef:d=>{Ng.value=d},setSelectionGrid:d=>{Sd.value=d,u(),d||(Lt.selectionGrid=[])},setTimePicker:(d,h=!1)=>{Fg.value=d,Vg.value=h,u(),d||(Lt.timePicker[0]=[],Lt.timePicker[1]=[])},setTimePickerElements:(d,h=0)=>{Lt.timePicker[h]=d},arrowRight:s,arrowLeft:r,arrowUp:o,arrowDown:a,clearArrowNav:()=>{Lt.monthYear=[],Lt.calendar=[],Lt.time=[],Lt.actionRow=[],Lt.selectionGrid=[],Lt.timePicker[0]=[],Lt.timePicker[1]=[],Sd.value=!1,Fg.value=!1,Vg.value=!1,Bg.value=!1,u(),Ng.value=null},setMonthPicker:d=>{Bg.value=d,u()},refSets:Lt}},gb=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??{}}),aB=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??{}}),pb=t=>t?typeof t=="boolean"?t?2:0:+t>=2?+t:2:0,lB=t=>{const e=typeof t=="object"&&t,n={static:!0,solo:!1};if(!t)return{...n,count:pb(!1)};const i=e?t:{},s=e?i.count??!0:t,r=pb(s);return Object.assign(n,i,{count:r})},cB=(t,e,n)=>t||(typeof n=="string"?n:e),uB=t=>typeof t=="boolean"?t?gb({}):!1:gb(t),dB=t=>{const e={enterSubmit:!0,tabSubmit:!0,openMenu:"open",selectOnFocus:!1,rangeSeparator:" - "};return typeof t=="object"?{...e,...t??{},enabled:!0}:{...e,enabled:t}},hB=t=>({months:[],years:[],times:{hours:[],minutes:[],seconds:[]},...t??{}}),fB=t=>({showSelect:!0,showCancel:!0,showNow:!1,showPreview:!0,...t??{}}),gB=t=>{const e={input:!1};return typeof t=="object"?{...e,...t??{},enabled:!0}:{enabled:t,...e}},pB=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??{}}),mB=t=>{const e={dates:Array.isArray(t)?t.map(n=>Ce(n)):[],years:[],months:[],quarters:[],weeks:[],weekdays:[],options:{highlightDisabled:!1}};return typeof t=="function"?t:{...e,...t??{}}},_B=t=>typeof t=="object"?{type:t?.type??"local",hideOnOffsetDates:t?.hideOnOffsetDates??!1}:{type:t,hideOnOffsetDates:!1},yB=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}},vB=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=D_(i,e,n);return[O_(s),s]})),bB=(t,e)=>t.length?new Map(t.map(n=>{const i=D_(n.date,e);return[O_(i),n]})):null,wB=t=>{var e;return{minDate:Qp(t.minDate,t.timezone,t.isSpecific),maxDate:Qp(t.maxDate,t.timezone,t.isSpecific),disabledDates:Dg(t.disabledDates)?zg(t.disabledDates,t.timezone,t.isSpecific):t.disabledDates,allowedDates:Dg(t.allowedDates)?zg(t.allowedDates,t.timezone,t.isSpecific):null,highlight:typeof t.highlight=="object"&&Dg((e=t.highlight)==null?void 0:e.dates)?zg(t.highlight.dates,t.timezone):t.highlight,markers:bB(t.markers,t.timezone)}},xB=t=>typeof t=="boolean"?{enabled:t,dragSelect:!0,limit:null}:{enabled:!!t,limit:t.limit?+t.limit:null,dragSelect:t.dragSelect??!0},EB=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]}))}),jt=t=>{const e=()=>{const S=t.enableSeconds?":ss":"",T=t.enableMinutes?":mm":"";return t.is24?`HH${T}${S}`:`hh${T}${S} aa`},n=()=>{var S;return t.format?t.format:t.monthPicker?"MM/yyyy":t.timePicker?e():t.weekPicker?`${((S=y.value)==null?void 0:S.type)==="iso"?"RR":"ww"}-yyyy`:t.yearPicker?"yyyy":t.quarterPicker?"QQQ/yyyy":t.enableTimePicker?`MM/dd/yyyy, ${e()}`:"MM/dd/yyyy"},i=S=>nS(S,t.enableSeconds),s=()=>E.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(()=>lB(t.multiCalendars)),o=be(()=>s()),a=be(()=>aB(t.ariaLabels)),l=be(()=>hB(t.filters)),c=be(()=>uB(t.transitions)),u=be(()=>fB(t.actionRow)),d=be(()=>cB(t.previewFormat,t.format,n())),h=be(()=>dB(t.textInput)),g=be(()=>gB(t.inline)),p=be(()=>pB(t.config)),m=be(()=>mB(t.highlight)),y=be(()=>_B(t.weekNumbers)),v=be(()=>vB(t.timezone)),b=be(()=>xB(t.multiDates)),x=be(()=>wB({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})),E=be(()=>yB(t.range)),w=be(()=>EB(t.ui));return{defaultedTransitions:c,defaultedMultiCalendars:r,defaultedStartTime:o,defaultedAriaLabels:a,defaultedFilters:l,defaultedActionRow:u,defaultedPreviewFormat:d,defaultedTextInput:h,defaultedInline:g,defaultedConfig:p,defaultedHighlight:m,defaultedWeekNumbers:y,defaultedRange:E,propDates:x,defaultedTz:v,defaultedMultiDates:b,defaultedUI:w,getDefaultPattern:n,getDefaultStartTime:s}},CB=(t,e,n)=>{const i=xe(),{defaultedTextInput:s,defaultedRange:r,defaultedTz:o,defaultedMultiDates:a,getDefaultPattern:l}=jt(e),c=xe(""),u=tu(e,"format"),d=tu(e,"formatLocale");un(i,()=>{typeof e.onInternalModelChange=="function"&&t("internal-model-change",i.value,ue(!0))},{deep:!0}),un(r,(L,ae)=>{L.enabled!==ae.enabled&&(i.value=null)}),un(u,()=>{X()});const h=L=>o.value.timezone&&o.value.convertModel?xi(L,o.value.timezone):L,g=L=>{if(o.value.timezone&&o.value.convertModel){const ae=H5(o.value.timezone);return W3(L,ae)}return L},p=(L,ae,de=!1)=>sS(L,e.format,e.formatLocale,s.value.rangeSeparator,e.modelAuto,ae??l(),de),m=L=>L?e.modelType?H(L):{hours:yr(L),minutes:ao(L),seconds:e.enableSeconds?Sl(L):0}:null,y=L=>e.modelType?H(L):{month:at(L),year:Xe(L)},v=L=>Array.isArray(L)?a.value.enabled?L.map(ae=>b(ae,ks(Ce(),ae))):Cd(()=>[ks(Ce(),L[0]),L[1]?ks(Ce(),L[1]):La(r.value.partialRange)],r.value.enabled):ks(Ce(),+L),b=(L,ae)=>(typeof L=="string"||typeof L=="number")&&e.modelType?Z(L):ae,x=L=>Array.isArray(L)?[b(L[0],to(null,+L[0].hours,+L[0].minutes,L[0].seconds)),b(L[1],to(null,+L[1].hours,+L[1].minutes,L[1].seconds))]:b(L,to(null,L.hours,L.minutes,L.seconds)),E=L=>{const ae=Pt(Ce(),{date:1});return Array.isArray(L)?a.value.enabled?L.map(de=>b(de,ar(ae,+de.month,+de.year))):Cd(()=>[b(L[0],ar(ae,+L[0].month,+L[0].year)),b(L[1],L[1]?ar(ae,+L[1].month,+L[1].year):La(r.value.partialRange))],r.value.enabled):b(L,ar(ae,+L.month,+L.year))},w=L=>{if(Array.isArray(L))return L.map(ae=>Z(ae));throw new Error(L_.dateArr("multi-dates"))},S=L=>{if(Array.isArray(L)&&r.value.enabled){const ae=L[0],de=L[1];return[Ce(Array.isArray(ae)?ae[0]:null),Array.isArray(de)&&de.length?Ce(de[0]):null]}return Ce(L[0])},T=L=>e.modelAuto?Array.isArray(L)?[Z(L[0]),Z(L[1])]:e.autoApply?[Z(L)]:[Z(L),null]:Array.isArray(L)?Cd(()=>L[1]?[Z(L[0]),L[1]?Z(L[1]):La(r.value.partialRange)]:[Z(L[0])],r.value.enabled):Z(L),A=()=>{Array.isArray(i.value)&&r.value.enabled&&i.value.length===1&&i.value.push(La(r.value.partialRange))},k=()=>{const L=i.value;return[H(L[0]),L[1]?H(L[1]):La(r.value.partialRange)]},P=()=>i.value[1]?k():H(An(i.value[0])),B=()=>(i.value||[]).map(L=>H(L)),Y=(L=!1)=>(L||A(),e.modelAuto?P():a.value.enabled?B():Array.isArray(i.value)?Cd(()=>k(),r.value.enabled):H(An(i.value))),ne=L=>!L||Array.isArray(L)&&!L.length?null:e.timePicker?x(An(L)):e.monthPicker?E(An(L)):e.yearPicker?v(An(L)):a.value.enabled?w(An(L)):e.weekPicker?S(An(L)):T(An(L)),$=L=>{const ae=ne(L);tm(An(ae))?(i.value=An(ae),X()):(i.value=null,c.value="")},F=()=>{const L=ae=>Os(ae,s.value.format);return`${L(i.value[0])} ${s.value.rangeSeparator} ${i.value[1]?L(i.value[1]):""}`},D=()=>n.value&&i.value?Array.isArray(i.value)?F():Os(i.value,s.value.format):p(i.value),z=()=>i.value?a.value.enabled?i.value.map(L=>p(L)).join("; "):s.value.enabled&&typeof s.value.format=="string"?D():p(i.value):"",X=()=>{!e.format||typeof e.format=="string"||s.value.enabled&&typeof s.value.format=="string"?c.value=z():c.value=e.format(i.value)},Z=L=>{if(e.utc){const ae=new Date(L);return e.utc==="preserve"?new Date(ae.getTime()+ae.getTimezoneOffset()*6e4):ae}return e.modelType?j5.includes(e.modelType)?h(new Date(L)):e.modelType==="format"&&(typeof e.format=="string"||!e.format)?h(Jp(L,l(),new Date,{locale:d.value})):h(Jp(L,e.modelType,new Date,{locale:d.value})):h(new Date(L))},H=L=>L?e.utc?tB(L,e.utc==="preserve",e.enableSeconds):e.modelType?e.modelType==="timestamp"?+g(L):e.modelType==="iso"?g(L).toISOString():e.modelType==="format"&&(typeof e.format=="string"||!e.format)?p(g(L)):p(g(L),e.modelType,!0):g(L):"",le=(L,ae=!1,de=!1)=>{if(de)return L;if(t("update:model-value",L),o.value.emitTimezone&&ae){const ve=Array.isArray(L)?L.map(W=>xi(An(W),o.value.emitTimezone)):xi(An(L),o.value.emitTimezone);t("update:model-timezone-value",ve)}},ie=L=>Array.isArray(i.value)?a.value.enabled?i.value.map(ae=>L(ae)):[L(i.value[0]),i.value[1]?L(i.value[1]):La(r.value.partialRange)]:L(An(i.value)),te=()=>{if(Array.isArray(i.value)){const L=nr(i.value[0],e.weekStart),ae=i.value[1]?nr(i.value[1],e.weekStart):[];return[L.map(de=>Ce(de)),ae.map(de=>Ce(de))]}return nr(i.value,e.weekStart).map(L=>Ce(L))},I=(L,ae)=>le(An(ie(L)),!1,ae),ee=L=>{const ae=te();return L?ae:t("update:model-value",te())},ue=(L=!1)=>(L||X(),e.monthPicker?I(y,L):e.timePicker?I(m,L):e.yearPicker?I(Xe,L):e.weekPicker?ee(L):le(Y(L),!0,L));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:$,formatInputValue:X,emitModelValue:ue}},SB=(t,e)=>{const{defaultedFilters:n,propDates:i}=jt(t),{validateMonthYearInRange:s}=yo(t),r=(u,d)=>{let h=u;return n.value.months.includes(at(h))?(h=d?ds(u,1):Al(u,1),r(h,d)):h},o=(u,d)=>{let h=u;return n.value.years.includes(Xe(h))?(h=d?w_(u,1):UC(u,1),o(h,d)):h},a=(u,d=!1)=>{const h=Pt(Ce(),{month:t.month,year:t.year});let g=u?ds(h,1):Al(h,1);t.disableYearSelect&&(g=ks(g,t.year));let p=at(g),m=Xe(g);n.value.months.includes(p)&&(g=r(g,u),p=at(g),m=Xe(g)),n.value.years.includes(m)&&(g=o(g,u),m=Xe(g)),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=>iS(Pt(Ce(),{month:t.month,year:t.year}),i.value.maxDate,i.value.minDate,t.preventMinMaxNavigation,u));return{handleMonthYearChange:a,isDisabled:c,updateMonthYear:l}},bf={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:()=>({})}},_s={...bf,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}},TB=["title"],AB=["disabled"],kB=hn({compatConfig:{MODE:3},__name:"ActionRow",props:{menuMount:{type:Boolean,default:!1},calendarWidth:{type:Number,default:0},..._s},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}=jt(i),{isTimeValid:d,isMonthValid:h}=yo(i),{buildMatrix:g}=_o(),p=xe(null),m=xe(null),y=xe(!1),v=xe({}),b=xe(null),x=xe(null);En(()=>{i.arrowNavigation&&g([vn(p),vn(m)],"actionRow"),E(),window.addEventListener("resize",E)}),pa(()=>{window.removeEventListener("resize",E)});const E=()=>{y.value=!1,setTimeout(()=>{var $,F;const D=($=b.value)==null?void 0:$.getBoundingClientRect(),z=(F=x.value)==null?void 0:F.getBoundingClientRect();D&&z&&(v.value.maxWidth=`${z.width-D.width-20}px`),y.value=!0},0)},w=be(()=>c.value.enabled&&!c.value.partialRange&&i.internalModelValue?i.internalModelValue.length===2:!0),S=be(()=>!d.value(i.internalModelValue)||!h.value(i.internalModelValue)||!w.value),T=()=>{const $=r.value;return i.timePicker||i.monthPicker,$(An(i.internalModelValue))},A=()=>{const $=i.internalModelValue;return o.value.count>0?`${k($[0])} - ${k($[1])}`:[k($[0]),k($[1])]},k=$=>sS($,r.value,i.formatLocale,a.value.rangeSeparator,i.modelAuto,r.value),P=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($=>`${k($)}`):i.modelAuto?`${k(i.internalModelValue[0])}`:`${k(i.internalModelValue[0])} -`:k(i.internalModelValue):T()),B=()=>u.value.enabled?"; ":" - ",Y=be(()=>Array.isArray(P.value)?P.value.join(B()):P.value),ne=()=>{d.value(i.internalModelValue)&&h.value(i.internalModelValue)&&w.value?n("select-date"):n("invalid-select")};return($,F)=>(R(),V("div",{ref_key:"actionRowRef",ref:x,class:"dp__action_row"},[$.$slots["action-row"]?Ne($.$slots,"action-row",In(wn({key:0},{internalModelValue:$.internalModelValue,disabled:S.value,selectDate:()=>$.$emit("select-date"),closePicker:()=>$.$emit("close-picker")}))):(R(),V(Le,{key:1},[J(s).showPreview?(R(),V("div",{key:0,class:"dp__selection_preview",title:Y.value,style:Pn(v.value)},[$.$slots["action-preview"]&&y.value?Ne($.$slots,"action-preview",{key:0,value:$.internalModelValue}):ce("",!0),!$.$slots["action-preview"]&&y.value?(R(),V(Le,{key:1},[Ue(we(Y.value),1)],64)):ce("",!0)],12,TB)):ce("",!0),f("div",{ref_key:"actionBtnContainer",ref:b,class:"dp__action_buttons","data-dp-element":"action-row"},[$.$slots["action-buttons"]?Ne($.$slots,"action-buttons",{key:0,value:$.internalModelValue}):ce("",!0),$.$slots["action-buttons"]?ce("",!0):(R(),V(Le,{key:1},[!J(l).enabled&&J(s).showCancel?(R(),V("button",{key:0,ref_key:"cancelButtonRef",ref:p,type:"button",class:"dp__action_button dp__action_cancel",onClick:F[0]||(F[0]=D=>$.$emit("close-picker")),onKeydown:F[1]||(F[1]=D=>J(ii)(D,()=>$.$emit("close-picker")))},we($.cancelText),545)):ce("",!0),J(s).showNow?(R(),V("button",{key:1,type:"button",class:"dp__action_button dp__action_cancel",onClick:F[2]||(F[2]=D=>$.$emit("select-now")),onKeydown:F[3]||(F[3]=D=>J(ii)(D,()=>$.$emit("select-now")))},we($.nowButtonLabel),33)):ce("",!0),J(s).showSelect?(R(),V("button",{key:2,ref_key:"selectButtonRef",ref:m,type:"button",class:"dp__action_button dp__action_select",disabled:S.value,"data-test":"select-button",onKeydown:F[4]||(F[4]=D=>J(ii)(D,()=>ne())),onClick:ne},we($.selectText),41,AB)):ce("",!0)],64))],512)],64))],512))}}),MB=["role","aria-label","tabindex"],PB={class:"dp__selection_grid_header"},IB=["aria-selected","aria-disabled","data-test","onClick","onKeydown","onMouseover"],DB=["aria-label"],Vu=hn({__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}=_o(),o=n,a=t,{defaultedAriaLabels:l,defaultedTextInput:c,defaultedConfig:u}=jt(a),{hideNavigationButtons:d}=Ef(),h=xe(!1),g=xe(null),p=xe(null),m=xe([]),y=xe(),v=xe(null),b=xe(0),x=xe(null);dE(()=>{g.value=null}),En(()=>{Rn().then(()=>B()),a.noOverlayFocus||w(),E(!0)}),pa(()=>E(!1));const E=ie=>{var te;a.arrowNavigation&&((te=a.headerRefs)!=null&&te.length?r(ie):i(ie))},w=()=>{var ie;const te=vn(p);te&&(c.value.enabled||(g.value?(ie=g.value)==null||ie.focus({preventScroll:!0}):te.focus({preventScroll:!0})),h.value=te.clientHeight({dp__overlay:!0,"dp--overlay-absolute":!a.useRelative,"dp--overlay-relative":a.useRelative})),T=be(()=>a.useRelative?{height:`${a.height}px`,width:"var(--dp-menu-min-width)"}:void 0),A=be(()=>({dp__overlay_col:!0})),k=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 ie,te;return{dp__overlay_container:!0,dp__container_flex:((ie=a.items)==null?void 0:ie.length)<=6,dp__container_block:((te=a.items)==null?void 0:te.length)>6}});un(()=>a.items,()=>B(!1),{deep:!0});const B=(ie=!0)=>{Rn().then(()=>{const te=vn(g),I=vn(p),ee=vn(v),ue=vn(x),L=ee?ee.getBoundingClientRect().height:0;I&&(I.getBoundingClientRect().height?b.value=I.getBoundingClientRect().height-L:b.value=u.value.modeHeight-L),te&&ue&&ie&&(ue.scrollTop=te.offsetTop-ue.offsetTop-(b.value/2-te.getBoundingClientRect().height)-L)})},Y=ie=>{ie.disabled||o("selected",ie.value)},ne=()=>{o("toggle"),o("reset-flow")},$=()=>{a.escClose&&ne()},F=(ie,te,I,ee)=>{ie&&((te.active||te.value===a.focusValue)&&(g.value=ie),a.arrowNavigation&&(Array.isArray(m.value[I])?m.value[I][ee]=ie:m.value[I]=[ie],D()))},D=()=>{var ie,te;const I=(ie=a.headerRefs)!=null&&ie.length?[a.headerRefs].concat(m.value):m.value.concat([a.skipButtonRef?[]:[v.value]]);s(An(I),(te=a.headerRefs)!=null&&te.length?"monthPicker":"selectionGrid")},z=ie=>{a.arrowNavigation||eo(ie,u.value,!0)},X=ie=>{y.value=ie,o("hover-value",ie)},Z=()=>{if(ne(),!a.isLast){const ie=em(a.menuWrapRef??null,"action-row");if(ie){const te=ZC(ie);te?.focus()}}},H=ie=>{switch(ie.key){case Ot.esc:return $();case Ot.arrowLeft:return z(ie);case Ot.arrowRight:return z(ie);case Ot.arrowUp:return z(ie);case Ot.arrowDown:return z(ie);default:return}},le=ie=>{if(ie.key===Ot.enter)return ne();if(ie.key===Ot.tab)return Z()};return e({focusGrid:w}),(ie,te)=>{var I;return R(),V("div",{ref_key:"gridWrapRef",ref:p,class:Pe(S.value),style:Pn(T.value),role:ie.useRelative?void 0:"dialog","aria-label":ie.overlayLabel,tabindex:ie.useRelative?void 0:"0",onKeydown:H,onClick:te[0]||(te[0]=ru(()=>{},["prevent"]))},[f("div",{ref_key:"containerRef",ref:x,class:Pe(P.value),style:Pn({"--dp-overlay-height":`${b.value}px`}),role:"grid"},[f("div",PB,[Ne(ie.$slots,"header")]),ie.$slots.overlay?Ne(ie.$slots,"overlay",{key:0}):(R(!0),V(Le,{key:1},Ze(ie.items,(ee,ue)=>(R(),V("div",{key:ue,class:Pe(["dp__overlay_row",{dp__flex_row:ie.items.length>=3}]),role:"row"},[(R(!0),V(Le,null,Ze(ee,(L,ae)=>(R(),V("div",{key:L.value,ref_for:!0,ref:de=>F(de,L,ue,ae),role:"gridcell",class:Pe(A.value),"aria-selected":L.active||void 0,"aria-disabled":L.disabled||void 0,tabindex:"0","data-test":L.text,onClick:ru(de=>Y(L),["prevent"]),onKeydown:de=>J(ii)(de,()=>Y(L),!0),onMouseover:de=>X(L.value)},[f("div",{class:Pe(L.className)},[ie.$slots.item?Ne(ie.$slots,"item",{key:0,item:L}):ce("",!0),ie.$slots.item?ce("",!0):(R(),V(Le,{key:1},[Ue(we(L.text),1)],64))],2)],42,IB))),128))],2))),128))],6),ie.$slots["button-icon"]?$e((R(),V("button",{key:0,ref_key:"toggleButton",ref:v,type:"button","aria-label":(I=J(l))==null?void 0:I.toggleOverlay,class:Pe(k.value),tabindex:"0",onClick:ne,onKeydown:le},[Ne(ie.$slots,"button-icon")],42,DB)),[[sh,!J(d)(ie.hideNavigation,ie.type)]]):ce("",!0)],46,MB)}}}),wf=hn({__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)=>(R(),V("div",{class:Pe({dp__menu_inner:!s.stretch,"dp--menu--inner-stretched":s.stretch,dp__flex_display:s.multiCalendars>0,"dp--flex-display-collapsed":s.collapse})},[(R(!0),V(Le,null,Ze(n.value,(o,a)=>(R(),V("div",{key:o,class:Pe(i.value)},[Ne(s.$slots,"default",{instance:o,index:a})],2))),128))],2))}}),RB=["data-dp-element","aria-label","aria-disabled"],jc=hn({compatConfig:{MODE:3},__name:"ArrowBtn",props:{ariaLabel:{},elName:{},disabled:{type:Boolean}},emits:["activate","set-ref"],setup(t,{emit:e}){const n=e,i=xe(null);return En(()=>n("set-ref",i)),(s,r)=>(R(),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=>J(ii)(o,()=>s.$emit("activate"),!0))},[f("span",{class:Pe(["dp__inner_nav",{dp__inner_nav_disabled:s.disabled}])},[Ne(s.$slots,"default")],2)],40,RB))}}),LB=["aria-label","data-test"],lS=hn({__name:"YearModePicker",props:{..._s,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}=Ef(),{defaultedConfig:o,defaultedMultiCalendars:a,defaultedAriaLabels:l,defaultedTransitions:c,defaultedUI:u}=jt(i),{showTransition:d,transitionName:h}=zu(c),g=xe(!1),p=(v=!1,b)=>{g.value=!g.value,n("toggle-year-picker",{flow:v,show:b})},m=v=>{g.value=!1,n("year-select",v)},y=(v=!1)=>{n("handle-year",v)};return(v,b)=>{var x,E,w,S,T;return R(),V(Le,null,[f("div",{class:Pe(["dp--year-mode-picker",{"dp--hidden-el":g.value}])},[J(r)(J(a),t.instance)?(R(),Se(jc,{key:0,ref:"mpPrevIconRef","aria-label":(x=J(l))==null?void 0:x.prevYear,disabled:t.isDisabled(!1),class:Pe((E=J(u))==null?void 0:E.navBtnPrev),onActivate:b[0]||(b[0]=A=>y(!1))},{default:De(()=>[v.$slots["arrow-left"]?Ne(v.$slots,"arrow-left",{key:0}):ce("",!0),v.$slots["arrow-left"]?ce("",!0):(R(),Se(J(A_),{key:1}))]),_:3},8,["aria-label","disabled","class"])):ce("",!0),f("button",{ref:"mpYearButtonRef",class:"dp__btn dp--year-select",type:"button","aria-label":`${t.year}-${(w=J(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]=eC(()=>p(!1),["enter"]))},[v.$slots.year?Ne(v.$slots,"year",{key:0,year:t.year}):ce("",!0),v.$slots.year?ce("",!0):(R(),V(Le,{key:1},[Ue(we(t.year),1)],64))],40,LB),J(s)(J(a),t.instance)?(R(),Se(jc,{key:1,ref:"mpNextIconRef","aria-label":(S=J(l))==null?void 0:S.nextYear,disabled:t.isDisabled(!0),class:Pe((T=J(u))==null?void 0:T.navBtnNext),onActivate:b[3]||(b[3]=A=>y(!0))},{default:De(()=>[v.$slots["arrow-right"]?Ne(v.$slots,"arrow-right",{key:0}):ce("",!0),v.$slots["arrow-right"]?ce("",!0):(R(),Se(J(k_),{key:1}))]),_:3},8,["aria-label","disabled","class"])):ce("",!0)],2),N($t,{name:J(h)(t.showYearPicker),css:J(d)},{default:De(()=>{var A,k;return[t.showYearPicker?(R(),Se(Vu,{key:0,items:t.items,"text-input":v.textInput,"esc-close":v.escClose,config:v.config,"is-last":v.autoApply&&!J(o).keepActionRow,"hide-navigation":v.hideNavigation,"aria-labels":v.ariaLabels,"overlay-label":(k=(A=J(l))==null?void 0:A.yearPicker)==null?void 0:k.call(A,!0),type:"year",onToggle:p,onSelected:b[4]||(b[4]=P=>m(P))},Un({"button-icon":De(()=>[v.$slots["calendar-icon"]?Ne(v.$slots,"calendar-icon",{key:0}):ce("",!0),v.$slots["calendar-icon"]?ce("",!0):(R(),Se(J(Gl),{key:1}))]),_:2},[v.$slots["year-overlay-value"]?{name:"item",fn:De(({item:P})=>[Ne(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)}}}),N_=(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]},F_=(t,e,n)=>{let i=t.value?t.value.slice():[];return i.length===2&&i[1]!==null&&(i=[]),i.length?Qt(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},xf=(t,e,n,i)=>{t&&(t[0]&&t[1]&&n&&e("auto-apply"),t[0]&&!t[1]&&i&&n&&e("auto-apply"))},cS=t=>{Array.isArray(t.value)&&t.value.length<=2&&t.range?t.modelValue.value=t.value.map(e=>xi(Ce(e),t.timezone)):Array.isArray(t.value)||(t.modelValue.value=xi(Ce(t.value),t.timezone))},uS=(t,e,n,i)=>Array.isArray(e.value)&&(e.value.length===2||e.value.length===1&&i.value.partialRange)?i.value.fixedStart&&(on(t,e.value[0])||ct(t,e.value[0]))?[e.value[0],t]:i.value.fixedEnd&&(Qt(t,e.value[1])||ct(t,e.value[1]))?[t,e.value[1]]:(n("invalid-fixed-range",t),e.value):[],dS=({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(()=>R_(o.yearRange,o.locale,o.reverseYears)),h=xe([!1]),g=be(()=>(P,B)=>{const Y=Pt(rs(new Date),{month:c.value(P),year:l.value(P)}),ne=B?LC(Y):lu(Y);return iS(ne,i.value.maxDate,i.value.minDate,o.preventMinMaxNavigation,B)}),p=()=>Array.isArray(r.value)&&t.value.solo&&r.value[1],m=()=>{for(let P=0;P{if(!P)return m();const B=Pt(Ce(),s.value[P]);return s.value[0].year=Xe(UC(B,t.value.count-1)),m()},v=(P,B)=>{const Y=U3(B,P);return e.value.showLastInRange&&Y>1?B:P},b=P=>o.focusStartDate||t.value.solo?P[0]:P[1]?v(P[0],P[1]):P[0],x=()=>{if(r.value){const P=Array.isArray(r.value)?b(r.value):r.value;s.value[0]={month:at(P),year:Xe(P)}}},E=()=>{x(),t.value.count&&m()};un(r,(P,B)=>{o.isTextInputDate&&JSON.stringify(P??{})!==JSON.stringify(B??{})&&E()}),En(()=>{E()});const w=(P,B)=>{s.value[B].year=P,u("update-month-year",{instance:B,year:P,month:s.value[B].month}),t.value.count&&!t.value.solo&&y(B)},S=be(()=>P=>kl(d.value,B=>{var Y;const ne=l.value(P)===B.value,$=uu(B.value,Ml(i.value.minDate),Ml(i.value.maxDate))||((Y=a.value.years)==null?void 0:Y.includes(l.value(P))),F=$_(n.value,B.value);return{active:ne,disabled:$,highlighted:F}})),T=(P,B)=>{w(P,B),k(B)},A=(P,B=!1)=>{if(!g.value(P,B)){const Y=B?l.value(P)+1:l.value(P)-1;w(Y,P)}},k=(P,B=!1,Y)=>{B||u("reset-flow"),Y!==void 0?h.value[P]=Y:h.value[P]=!h.value[P],h.value[P]?u("overlay-toggle",{open:!0,overlay:Yn.year}):(u("overlay-closed"),u("overlay-toggle",{open:!1,overlay:Yn.year}))};return{isDisabled:g,groupedYears:S,showYearPicker:h,selectYear:w,toggleYearPicker:k,handleYearSelect:T,handleYear:A}},OB=(t,e)=>{const{defaultedMultiCalendars:n,defaultedAriaLabels:i,defaultedTransitions:s,defaultedConfig:r,defaultedRange:o,defaultedHighlight:a,propDates:l,defaultedTz:c,defaultedFilters:u,defaultedMultiDates:d}=jt(t),h=()=>{t.isTextInputDate&&E(Xe(Ce(t.startDate)),0)},{modelValue:g,year:p,month:m,calendars:y}=Wu(t,e,h),v=be(()=>XC(t.formatLocale,t.locale,t.monthNameFormat)),b=xe(null),{checkMinMaxRange:x}=yo(t),{selectYear:E,groupedYears:w,showYearPicker:S,toggleYearPicker:T,handleYearSelect:A,handleYear:k,isDisabled:P}=dS({modelValue:g,multiCalendars:n,range:o,highlight:a,calendars:y,year:p,propDates:l,month:m,filters:u,props:t,emit:e});En(()=>{t.startDate&&(g.value&&t.focusStartDate||!g.value)&&E(Xe(Ce(t.startDate)),0)});const B=I=>I?{month:at(I),year:Xe(I)}:{month:null,year:null},Y=()=>g.value?Array.isArray(g.value)?g.value.map(I=>B(I)):B(g.value):B(),ne=(I,ee)=>{const ue=y.value[I],L=Y();return Array.isArray(L)?L.some(ae=>ae.year===ue?.year&&ae.month===ee):ue?.year===L.year&&ee===L.month},$=(I,ee,ue)=>{var L,ae;const de=Y();return Array.isArray(de)?p.value(ee)===((L=de[ue])==null?void 0:L.year)&&I===((ae=de[ue])==null?void 0:ae.month):!1},F=(I,ee)=>{if(o.value.enabled){const ue=Y();if(Array.isArray(g.value)&&Array.isArray(ue)){const L=$(I,ee,0)||$(I,ee,1),ae=ar(rs(Ce()),I,p.value(ee));return vf(g.value,b.value,ae)&&!L}return!1}return!1},D=be(()=>I=>kl(v.value,ee=>{var ue;const L=ne(I,ee.value),ae=uu(ee.value,QC(p.value(I),l.value.minDate),eS(p.value(I),l.value.maxDate))||oB(l.value.disabledDates,p.value(I)).includes(ee.value)||((ue=u.value.months)==null?void 0:ue.includes(ee.value)),de=F(ee.value,I),ve=rS(a.value,ee.value,p.value(I));return{active:L,disabled:ae,isBetween:de,highlighted:ve}})),z=(I,ee)=>ar(rs(Ce()),I,p.value(ee)),X=(I,ee)=>{const ue=g.value?g.value:rs(new Date);g.value=ar(ue,I,p.value(ee)),e("auto-apply"),e("update-flow-step")},Z=(I,ee)=>{const ue=z(I,ee);o.value.fixedEnd||o.value.fixedStart?g.value=uS(ue,g,e,o):g.value?x(ue,g.value)&&(g.value=F_(g,z(I,ee),e)):g.value=[z(I,ee)],Rn().then(()=>{xf(g.value,e,t.autoApply,t.modelAuto)})},H=(I,ee)=>{N_(z(I,ee),g,d.value.limit),e("auto-apply",!0)},le=(I,ee)=>(y.value[ee].month=I,te(ee,y.value[ee].year,I),d.value.enabled?H(I,ee):o.value.enabled?Z(I,ee):X(I,ee)),ie=(I,ee)=>{E(I,ee),te(ee,I,null)},te=(I,ee,ue)=>{let L=ue;if(!L&&L!==0){const ae=Y();L=Array.isArray(ae)?ae[I].month:ae.month}e("update-month-year",{instance:I,year:ee,month:L})};return{groupedMonths:D,groupedYears:w,year:p,isDisabled:P,defaultedMultiCalendars:n,defaultedAriaLabels:i,defaultedTransitions:s,defaultedConfig:r,showYearPicker:S,modelValue:g,presetDate:(I,ee)=>{cS({value:I,modelValue:g,range:o.value.enabled,timezone:ee?void 0:c.value.timezone}),e("auto-apply")},setHoverDate:(I,ee)=>{b.value=z(I,ee)},selectMonth:le,selectYear:ie,toggleYearPicker:T,handleYearSelect:A,handleYear:k,getModelMonthYear:Y}},$B=hn({compatConfig:{MODE:3},__name:"MonthPicker",props:{..._s},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=_a(),r=ki(s,"yearMode"),o=t;En(()=>{o.shadow||i("mount",null)});const{groupedMonths:a,groupedYears:l,year:c,isDisabled:u,defaultedMultiCalendars:d,defaultedConfig:h,showYearPicker:g,modelValue:p,presetDate:m,setHoverDate:y,selectMonth:v,selectYear:b,toggleYearPicker:x,handleYearSelect:E,handleYear:w,getModelMonthYear:S}=OB(o,i);return e({getSidebarProps:()=>({modelValue:p,year:c,getModelMonthYear:S,selectMonth:v,selectYear:b,handleYear:w}),presetDate:m,toggleYearPicker:T=>x(0,T)}),(T,A)=>(R(),Se(wf,{"multi-calendars":J(d).count,collapse:T.collapse,stretch:""},{default:De(({instance:k})=>[T.$slots["top-extra"]?Ne(T.$slots,"top-extra",{key:0,value:T.internalModelValue}):ce("",!0),T.$slots["month-year"]?Ne(T.$slots,"month-year",In(wn({key:1},{year:J(c),months:J(a)(k),years:J(l)(k),selectMonth:J(v),selectYear:J(b),instance:k}))):(R(),Se(Vu,{key:2,items:J(a)(k),"arrow-navigation":T.arrowNavigation,"is-last":T.autoApply&&!J(h).keepActionRow,"esc-close":T.escClose,height:J(h).modeHeight,config:T.config,"no-overlay-focus":!!(T.noOverlayFocus||T.textInput),"use-relative":"",type:"month",onSelected:P=>J(v)(P,k),onHoverValue:P=>J(y)(P,k)},Un({header:De(()=>[N(lS,wn(T.$props,{items:J(l)(k),instance:k,"show-year-picker":J(g)[k],year:J(c)(k),"is-disabled":P=>J(u)(k,P),onHandleYear:P=>J(w)(k,P),onYearSelect:P=>J(E)(P,k),onToggleYearPicker:P=>J(x)(k,P?.flow,P?.show)}),Un({_:2},[Ze(J(r),(P,B)=>({name:P,fn:De(Y=>[Ne(T.$slots,P,In(ni(Y)))])}))]),1040,["items","instance","show-year-picker","year","is-disabled","onHandleYear","onYearSelect","onToggleYearPicker"])]),_:2},[T.$slots["month-overlay-value"]?{name:"item",fn:De(({item:P})=>[Ne(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"]))}}),NB=(t,e)=>{const n=()=>{t.isTextInputDate&&(u.value=Xe(Ce(t.startDate)))},{modelValue:i}=Wu(t,e,n),s=xe(null),{defaultedHighlight:r,defaultedMultiDates:o,defaultedFilters:a,defaultedRange:l,propDates:c}=jt(t),u=xe();En(()=>{t.startDate&&(i.value&&t.focusStartDate||!i.value)&&(u.value=Xe(Ce(t.startDate)))});const d=m=>Array.isArray(i.value)?i.value.some(y=>Xe(y)===m):i.value?Xe(i.value)===m:!1,h=m=>l.value.enabled&&Array.isArray(i.value)?vf(i.value,s.value,p(m)):!1,g=be(()=>kl(R_(t.yearRange,t.locale,t.reverseYears),m=>{const y=d(m.value),v=uu(m.value,Ml(c.value.minDate),Ml(c.value.maxDate))||a.value.years.includes(m.value),b=h(m.value)&&!y,x=$_(r.value,m.value);return{active:y,disabled:v,isBetween:b,highlighted:x}})),p=m=>ks(rs(lu(new Date)),m);return{groupedYears:g,modelValue:i,focusYear:u,setHoverValue:m=>{s.value=ks(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=>Xe(v))).includes(m)?i.value=i.value.filter(v=>Xe(v)!==m):i.value.push(ks(oi(Ce()),m))):i.value=[ks(oi(lu(Ce())),m)],e("auto-apply",!0);l.value.enabled?(i.value=F_(i,p(m),e),Rn().then(()=>{xf(i.value,e,t.autoApply,t.modelAuto)})):(i.value=p(m),e("auto-apply"))}}},FB=hn({compatConfig:{MODE:3},__name:"YearPicker",props:{..._s},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}=NB(s,i),{defaultedConfig:u}=jt(s);return e({getSidebarProps:()=>({modelValue:o,selectYear:l})}),(d,h)=>(R(),V("div",null,[d.$slots["top-extra"]?Ne(d.$slots,"top-extra",{key:0,value:d.internalModelValue}):ce("",!0),d.$slots["month-year"]?Ne(d.$slots,"month-year",In(wn({key:1},{years:J(r),selectYear:J(l)}))):(R(),Se(Vu,{key:2,items:J(r),"is-last":d.autoApply&&!J(u).keepActionRow,height:J(u).modeHeight,config:d.config,"no-overlay-focus":!!(d.noOverlayFocus||d.textInput),"focus-value":J(a),type:"year","use-relative":"",onSelected:J(l),onHoverValue:J(c)},Un({_:2},[d.$slots["year-overlay-value"]?{name:"item",fn:De(({item:g})=>[Ne(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"]))]))}}),BB={key:0,class:"dp__time_input"},VB=["data-test","aria-label","onKeydown","onClick","onMousedown"],zB=["aria-label","disabled","data-test","onKeydown","onClick"],WB=["data-test","aria-label","onKeydown","onClick","onMousedown"],YB={key:0},HB=["aria-label"],jB=hn({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},..._s},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}=_o(),{defaultedAriaLabels:a,defaultedTransitions:l,defaultedFilters:c,defaultedConfig:u,defaultedRange:d}=jt(s),{transitionName:h,showTransition:g}=zu(l),p=Ki({hours:!1,minutes:!1,seconds:!1}),m=xe("AM"),y=xe(null),v=xe([]),b=xe(),x=xe(!1);En(()=>{i("mounted")});const E=C=>Pt(new Date,{hours:C.hours,minutes:C.minutes,seconds:s.enableSeconds?C.seconds:0,milliseconds:0}),w=be(()=>C=>z(C,s[C])||T(C,s[C])),S=be(()=>({hours:s.hours,minutes:s.minutes,seconds:s.seconds})),T=(C,O)=>d.value.enabled&&!d.value.disableTimeRangeValidation?!s.validateTime(C,O):!1,A=(C,O)=>{if(d.value.enabled&&!d.value.disableTimeRangeValidation){const K=O?+s[`${C}Increment`]:-+s[`${C}Increment`],U=s[C]+K;return!s.validateTime(C,U)}return!1},k=be(()=>C=>!ie(+s[C]+ +s[`${C}Increment`],C)||A(C,!0)),P=be(()=>C=>!ie(+s[C]-+s[`${C}Increment`],C)||A(C,!1)),B=(C,O)=>AC(Pt(Ce(),C),O),Y=(C,O)=>W5(Pt(Ce(),C),O),ne=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})),$=be(()=>{const C=[{type:"hours"}];return s.enableMinutes&&C.push({type:"",separator:!0},{type:"minutes"}),s.enableSeconds&&C.push({type:"",separator:!0},{type:"seconds"}),C}),F=be(()=>$.value.filter(C=>!C.separator)),D=be(()=>C=>{if(C==="hours"){const O=ae(+s.hours);return{text:O<10?`0${O}`:`${O}`,value:O}}return{text:s[C]<10?`0${s[C]}`:`${s[C]}`,value:s[C]}}),z=(C,O)=>{var K;if(!s.disabledTimesConfig)return!1;const U=s.disabledTimesConfig(s.order,C==="hours"?O:void 0);return U[C]?!!((K=U[C])!=null&&K.includes(O)):!0},X=(C,O)=>O!=="hours"||m.value==="AM"?C:C+12,Z=C=>{const O=s.is24?24:12,K=C==="hours"?O:60,U=+s[`${C}GridIncrement`],re=C==="hours"&&!s.is24?U:0,j=[];for(let se=re;se({active:!1,disabled:c.value.times[C].includes(se.value)||!ie(se.value,C)||z(C,se.value)||T(C,se.value)}))},H=C=>C>=0?C:59,le=C=>C>=0?C:23,ie=(C,O)=>{const K=s.minTime?E(Rg(s.minTime)):null,U=s.maxTime?E(Rg(s.maxTime)):null,re=E(Rg(S.value,O,O==="minutes"||O==="seconds"?H(C):le(C)));return K&&U?(cu(re,U)||el(re,U))&&(Tl(re,K)||el(re,K)):K?Tl(re,K)||el(re,K):U?cu(re,U)||el(re,U):!0},te=C=>s[`no${C[0].toUpperCase()+C.slice(1)}Overlay`],I=C=>{te(C)||(p[C]=!p[C],p[C]?(x.value=!0,i("overlay-opened",C)):(x.value=!1,i("overlay-closed",C)))},ee=C=>C==="hours"?yr:C==="minutes"?ao:Sl,ue=()=>{b.value&&clearTimeout(b.value)},L=(C,O=!0,K)=>{const U=O?B:Y,re=O?+s[`${C}Increment`]:-+s[`${C}Increment`];ie(+s[C]+re,C)&&i(`update:${C}`,ee(C)(U({[C]:+s[C]},{[C]:+s[`${C}Increment`]}))),!(K!=null&&K.keyboard)&&u.value.timeArrowHoldThreshold&&(b.value=setTimeout(()=>{L(C,O)},u.value.timeArrowHoldThreshold))},ae=C=>s.is24?C:(C>=12?m.value="PM":m.value="AM",G5(C)),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=C=>{p[C]=!0},W=(C,O,K)=>{if(C&&s.arrowNavigation){Array.isArray(v.value[O])?v.value[O][K]=C:v.value[O]=[C];const U=v.value.reduce((re,j)=>j.map((se,Q)=>[...re[Q]||[],j[Q]]),[]);o(s.closeTimePickerBtn),y.value&&(U[1]=U[1].concat(y.value)),r(U,s.order)}},fe=(C,O)=>(I(C),i(`update:${C}`,O));return e({openChildCmp:ve}),(C,O)=>{var K;return C.disabled?ce("",!0):(R(),V("div",BB,[(R(!0),V(Le,null,Ze($.value,(U,re)=>{var j,se,Q;return R(),V("div",{key:re,class:Pe(ne.value)},[U.separator?(R(),V(Le,{key:0},[x.value?ce("",!0):(R(),V(Le,{key:0},[Ue(":")],64))],64)):(R(),V(Le,{key:1},[f("button",{ref_for:!0,ref:ge=>W(ge,re,0),type:"button",class:Pe({dp__btn:!0,dp__inc_dec_button:!C.timePickerInline,dp__inc_dec_button_inline:C.timePickerInline,dp__tp_inline_btn_top:C.timePickerInline,dp__inc_dec_button_disabled:k.value(U.type),"dp--hidden-el":x.value}),"data-test":`${U.type}-time-inc-btn-${s.order}`,"aria-label":(j=J(a))==null?void 0:j.incrementValue(U.type),tabindex:"0",onKeydown:ge=>J(ii)(ge,()=>L(U.type,!0,{keyboard:!0}),!0),onClick:ge=>J(u).timeArrowHoldThreshold?void 0:L(U.type,!0),onMousedown:ge=>J(u).timeArrowHoldThreshold?L(U.type,!0):void 0,onMouseup:ue},[s.timePickerInline?(R(),V(Le,{key:1},[C.$slots["tp-inline-arrow-up"]?Ne(C.$slots,"tp-inline-arrow-up",{key:0}):(R(),V(Le,{key:1},[O[2]||(O[2]=f("span",{class:"dp__tp_inline_btn_bar dp__tp_btn_in_l"},null,-1)),O[3]||(O[3]=f("span",{class:"dp__tp_inline_btn_bar dp__tp_btn_in_r"},null,-1))],64))],64)):(R(),V(Le,{key:0},[C.$slots["arrow-up"]?Ne(C.$slots,"arrow-up",{key:0}):ce("",!0),C.$slots["arrow-up"]?ce("",!0):(R(),Se(J(P_),{key:1}))],64))],42,VB),f("button",{ref_for:!0,ref:ge=>W(ge,re,1),type:"button","aria-label":`${D.value(U.type).text}-${(se=J(a))==null?void 0:se.openTpOverlay(U.type)}`,class:Pe({dp__time_display:!0,dp__time_display_block:!C.timePickerInline,dp__time_display_inline:C.timePickerInline,"dp--time-invalid":w.value(U.type),"dp--time-overlay-btn":!w.value(U.type),"dp--hidden-el":x.value}),disabled:te(U.type),tabindex:"0","data-test":`${U.type}-toggle-overlay-btn-${s.order}`,onKeydown:ge=>J(ii)(ge,()=>I(U.type),!0),onClick:ge=>I(U.type)},[C.$slots[U.type]?Ne(C.$slots,U.type,{key:0,text:D.value(U.type).text,value:D.value(U.type).value}):ce("",!0),C.$slots[U.type]?ce("",!0):(R(),V(Le,{key:1},[Ue(we(D.value(U.type).text),1)],64))],42,zB),f("button",{ref_for:!0,ref:ge=>W(ge,re,2),type:"button",class:Pe({dp__btn:!0,dp__inc_dec_button:!C.timePickerInline,dp__inc_dec_button_inline:C.timePickerInline,dp__tp_inline_btn_bottom:C.timePickerInline,dp__inc_dec_button_disabled:P.value(U.type),"dp--hidden-el":x.value}),"data-test":`${U.type}-time-dec-btn-${s.order}`,"aria-label":(Q=J(a))==null?void 0:Q.decrementValue(U.type),tabindex:"0",onKeydown:ge=>J(ii)(ge,()=>L(U.type,!1,{keyboard:!0}),!0),onClick:ge=>J(u).timeArrowHoldThreshold?void 0:L(U.type,!1),onMousedown:ge=>J(u).timeArrowHoldThreshold?L(U.type,!1):void 0,onMouseup:ue},[s.timePickerInline?(R(),V(Le,{key:1},[C.$slots["tp-inline-arrow-down"]?Ne(C.$slots,"tp-inline-arrow-down",{key:0}):(R(),V(Le,{key:1},[O[4]||(O[4]=f("span",{class:"dp__tp_inline_btn_bar dp__tp_btn_in_l"},null,-1)),O[5]||(O[5]=f("span",{class:"dp__tp_inline_btn_bar dp__tp_btn_in_r"},null,-1))],64))],64)):(R(),V(Le,{key:0},[C.$slots["arrow-down"]?Ne(C.$slots,"arrow-down",{key:0}):ce("",!0),C.$slots["arrow-down"]?ce("",!0):(R(),Se(J(I_),{key:1}))],64))],42,WB)],64))],2)}),128)),C.is24?ce("",!0):(R(),V("div",YB,[C.$slots["am-pm-button"]?Ne(C.$slots,"am-pm-button",{key:0,toggle:de,value:m.value}):ce("",!0),C.$slots["am-pm-button"]?ce("",!0):(R(),V("button",{key:1,ref_key:"amPmButton",ref:y,type:"button",class:"dp__pm_am_button",role:"button","aria-label":(K=J(a))==null?void 0:K.amPmButton,tabindex:"0",onClick:de,onKeydown:O[0]||(O[0]=U=>J(ii)(U,()=>de(),!0))},we(m.value),41,HB))])),(R(!0),V(Le,null,Ze(F.value,(U,re)=>(R(),Se($t,{key:re,name:J(h)(p[U.type]),css:J(g)},{default:De(()=>{var j,se;return[p[U.type]?(R(),Se(Vu,{key:0,items:Z(U.type),"is-last":C.autoApply&&!J(u).keepActionRow,"esc-close":C.escClose,type:U.type,"text-input":C.textInput,config:C.config,"arrow-navigation":C.arrowNavigation,"aria-labels":C.ariaLabels,"overlay-label":(se=(j=J(a)).timeOverlay)==null?void 0:se.call(j,U.type),onSelected:Q=>fe(U.type,Q),onToggle:Q=>I(U.type),onResetFlow:O[1]||(O[1]=Q=>C.$emit("reset-flow"))},Un({"button-icon":De(()=>[C.$slots["clock-icon"]?Ne(C.$slots,"clock-icon",{key:0}):ce("",!0),C.$slots["clock-icon"]?ce("",!0):(R(),Se(ma(C.timePickerInline?J(Gl):J(M_)),{key:1}))]),_:2},[C.$slots[`${U.type}-overlay-value`]?{name:"item",fn:De(({item:Q})=>[Ne(C.$slots,`${U.type}-overlay-value`,{text:Q.text,value:Q.value})]),key:"0"}:void 0,C.$slots[`${U.type}-overlay-header`]?{name:"header",fn:De(()=>[Ne(C.$slots,`${U.type}-overlay-header`,{toggle:()=>I(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))]))}}}),KB={class:"dp--tp-wrap"},UB=["aria-label","tabindex"],GB=["role","aria-label","tabindex"],XB=["aria-label"],hS=hn({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},..._s},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}=_o(),a=_a(),{defaultedTransitions:l,defaultedAriaLabels:c,defaultedTextInput:u,defaultedConfig:d,defaultedRange:h}=jt(s),{transitionName:g,showTransition:p}=zu(l),{hideNavigationButtons:m}=Ef(),y=xe(null),v=xe(null),b=xe([]),x=xe(null),E=xe(!1);En(()=>{i("mount"),!s.timePicker&&s.arrowNavigation?r([vn(y.value)],"time"):o(!0,s.timePicker)});const w=be(()=>h.value.enabled&&s.modelAuto?qC(s.internalModelValue):!0),S=xe(!1),T=Z=>({hours:Array.isArray(s.hours)?s.hours[Z]:s.hours,minutes:Array.isArray(s.minutes)?s.minutes[Z]:s.minutes,seconds:Array.isArray(s.seconds)?s.seconds[Z]:s.seconds}),A=be(()=>{const Z=[];if(h.value.enabled)for(let H=0;H<2;H++)Z.push(T(H));else Z.push(T(0));return Z}),k=(Z,H=!1,le="")=>{H||i("reset-flow"),S.value=Z,i(Z?"overlay-opened":"overlay-closed",Yn.time),s.arrowNavigation&&o(Z),Rn(()=>{le!==""&&b.value[0]&&b.value[0].openChildCmp(le)})},P=be(()=>({dp__btn:!0,dp__button:!0,dp__button_bottom:s.autoApply&&!d.value.keepActionRow})),B=ki(a,"timePicker"),Y=(Z,H,le)=>h.value.enabled?H===0?[Z,A.value[1][le]]:[A.value[0][le],Z]:Z,ne=Z=>{i("update:hours",Z)},$=Z=>{i("update:minutes",Z)},F=Z=>{i("update:seconds",Z)},D=()=>{if(x.value&&!u.value.enabled&&!s.noOverlayFocus){const Z=ZC(x.value);Z&&Z.focus({preventScroll:!0})}},z=Z=>{E.value=!1,i("overlay-closed",Z)},X=Z=>{E.value=!0,i("overlay-opened",Z)};return e({toggleTimePicker:k}),(Z,H)=>{var le;return R(),V("div",KB,[!Z.timePicker&&!Z.timePickerInline?$e((R(),V("button",{key:0,ref_key:"openTimePickerBtn",ref:y,type:"button",class:Pe({...P.value,"dp--hidden-el":S.value}),"aria-label":(le=J(c))==null?void 0:le.openTimePicker,tabindex:Z.noOverlayFocus?void 0:0,"data-test":"open-time-picker-btn",onKeydown:H[0]||(H[0]=ie=>J(ii)(ie,()=>k(!0))),onClick:H[1]||(H[1]=ie=>k(!0))},[Z.$slots["clock-icon"]?Ne(Z.$slots,"clock-icon",{key:0}):ce("",!0),Z.$slots["clock-icon"]?ce("",!0):(R(),Se(J(M_),{key:1}))],42,UB)),[[sh,!J(m)(Z.hideNavigation,"time")]]):ce("",!0),N($t,{name:J(g)(S.value),css:J(p)&&!Z.timePickerInline},{default:De(()=>{var ie,te;return[S.value||Z.timePicker||Z.timePickerInline?(R(),V("div",{key:0,ref_key:"overlayRef",ref:x,role:Z.timePickerInline?void 0:"dialog",class:Pe({dp__overlay:!Z.timePickerInline,"dp--overlay-absolute":!s.timePicker&&!Z.timePickerInline,"dp--overlay-relative":s.timePicker}),style:Pn(Z.timePicker?{height:`${J(d).modeHeight}px`}:void 0),"aria-label":(ie=J(c))==null?void 0:ie.timePicker,tabindex:Z.timePickerInline?void 0:0},[f("div",{class:Pe(Z.timePickerInline?"dp__time_picker_inline_container":"dp__overlay_container dp__container_flex dp__time_picker_overlay_container"),style:{display:"flex"}},[Z.$slots["time-picker-overlay"]?Ne(Z.$slots,"time-picker-overlay",{key:0,hours:t.hours,minutes:t.minutes,seconds:t.seconds,setHours:ne,setMinutes:$,setSeconds:F}):ce("",!0),Z.$slots["time-picker-overlay"]?ce("",!0):(R(),V("div",{key:1,class:Pe(Z.timePickerInline?"dp__flex":"dp__overlay_row dp__flex_row")},[(R(!0),V(Le,null,Ze(A.value,(I,ee)=>$e((R(),Se(jB,wn({key:ee,ref_for:!0},{...Z.$props,order:ee,hours:I.hours,minutes:I.minutes,seconds:I.seconds,closeTimePickerBtn:v.value,disabledTimesConfig:t.disabledTimesConfig,disabled:ee===0?J(h).fixedStart:J(h).fixedEnd},{ref_for:!0,ref_key:"timeInputRefs",ref:b,"validate-time":(ue,L)=>t.validateTime(ue,Y(L,ee,ue)),"onUpdate:hours":ue=>ne(Y(ue,ee,"hours")),"onUpdate:minutes":ue=>$(Y(ue,ee,"minutes")),"onUpdate:seconds":ue=>F(Y(ue,ee,"seconds")),onMounted:D,onOverlayClosed:z,onOverlayOpened:X,onAmPmChange:H[2]||(H[2]=ue=>Z.$emit("am-pm-change",ue))}),Un({_:2},[Ze(J(B),(ue,L)=>({name:ue,fn:De(ae=>[Ne(Z.$slots,ue,wn({ref_for:!0},ae))])}))]),1040,["validate-time","onUpdate:hours","onUpdate:minutes","onUpdate:seconds"])),[[sh,ee===0?!0:w.value]])),128))],2)),!Z.timePicker&&!Z.timePickerInline?$e((R(),V("button",{key:2,ref_key:"closeTimePickerBtn",ref:v,type:"button",class:Pe({...P.value,"dp--hidden-el":E.value}),"aria-label":(te=J(c))==null?void 0:te.closeTimePicker,tabindex:"0",onKeydown:H[3]||(H[3]=I=>J(ii)(I,()=>k(!1))),onClick:H[4]||(H[4]=I=>k(!1))},[Z.$slots["calendar-icon"]?Ne(Z.$slots,"calendar-icon",{key:0}):ce("",!0),Z.$slots["calendar-icon"]?ce("",!0):(R(),Se(J(Gl),{key:1}))],42,XB)),[[sh,!J(m)(Z.hideNavigation,"time")]]):ce("",!0)],2)],14,GB)):ce("",!0)]}),_:3},8,["name","css"])])}}}),fS=(t,e,n,i)=>{const{defaultedRange:s}=jt(t),r=(x,E)=>Array.isArray(e[x])?e[x][E]:e[x],o=x=>t.enableSeconds?Array.isArray(e.seconds)?e.seconds[x]:e.seconds:0,a=(x,E)=>x?E!==void 0?to(x,r("hours",E),r("minutes",E),o(E)):to(x,e.hours,e.minutes,o()):KC(Ce(),o(E)),l=(x,E)=>{e[x]=E},c=be(()=>t.modelAuto&&s.value.enabled?Array.isArray(n.value)?n.value.length>1:!1:s.value.enabled),u=(x,E)=>{const w=Object.fromEntries(Object.keys(e).map(S=>S===x?[S,E]:[S,e[S]].slice()));if(c.value&&!s.value.disableTimeRangeValidation){const S=A=>n.value?to(n.value[A],w.hours[A],w.minutes[A],w.seconds[A]):null,T=A=>jC(n.value[A],0);return!(ct(S(0),S(1))&&(Tl(S(0),T(1))||cu(S(1),T(0))))}return!0},d=(x,E)=>{u(x,E)&&(l(x,E),i&&i())},h=x=>{d("hours",x)},g=x=>{d("minutes",x)},p=x=>{d("seconds",x)},m=(x,E,w,S)=>{E&&h(x),!E&&!w&&g(x),w&&p(x),n.value&&S(n.value)},y=x=>{if(x){const E=Array.isArray(x),w=E?[+x[0].hours,+x[1].hours]:+x.hours,S=E?[+x[0].minutes,+x[1].minutes]:+x.minutes,T=E?[+x[0].seconds,+x[1].seconds]:+x.seconds;l("hours",w),l("minutes",S),t.enableSeconds&&l("seconds",T)}},v=(x,E)=>{const w={hours:Array.isArray(e.hours)?e.hours[x]:e.hours,disabledArr:[]};return(E||E===0)&&(w.hours=E),Array.isArray(t.disabledTimes)&&(w.disabledArr=s.value.enabled&&Array.isArray(t.disabledTimes[x])?t.disabledTimes[x]:t.disabledTimes),w},b=be(()=>(x,E)=>{var w;if(Array.isArray(t.disabledTimes)){const{disabledArr:S,hours:T}=v(x,E),A=S.filter(k=>+k.hours===T);return((w=A[0])==null?void 0:w.minutes)==="*"?{hours:[T],minutes:void 0,seconds:void 0}:{hours:[],minutes:A?.map(k=>+k.minutes)??[],seconds:A?.map(k=>k.seconds?+k.seconds:void 0)??[]}}return{hours:[],minutes:[],seconds:[]}});return{setTime:l,updateHours:h,updateMinutes:g,updateSeconds:p,getSetDateTime:a,updateTimeValues:m,getSecondsValue:o,assignStartTime:y,validateTime:u,disabledTimesConfig:b}},qB=(t,e)=>{const n=()=>{t.isTextInputDate&&E()},{modelValue:i,time:s}=Wu(t,e,n),{defaultedStartTime:r,defaultedRange:o,defaultedTz:a}=jt(t),{updateTimeValues:l,getSetDateTime:c,setTime:u,assignStartTime:d,disabledTimesConfig:h,validateTime:g}=fS(t,s,i,p);function p(){e("update-flow-step")}const m=S=>{const{hours:T,minutes:A,seconds:k}=S;return{hours:+T,minutes:+A,seconds:k?+k:0}},y=()=>{if(t.startTime){if(Array.isArray(t.startTime)){const T=m(t.startTime[0]),A=m(t.startTime[1]);return[Pt(Ce(),T),Pt(Ce(),A)]}const S=m(t.startTime);return Pt(Ce(),S)}return o.value.enabled?[null,null]:null},v=()=>{if(o.value.enabled){const[S,T]=y();i.value=[xi(c(S,0),a.value.timezone),xi(c(T,1),a.value.timezone)]}else i.value=xi(c(y()),a.value.timezone)},b=S=>Array.isArray(S)?[na(Ce(S[0])),na(Ce(S[1]))]:[na(S??Ce())],x=(S,T,A)=>{u("hours",S),u("minutes",T),u("seconds",t.enableSeconds?A:0)},E=()=>{const[S,T]=b(i.value);return o.value.enabled?x([S.hours,T.hours],[S.minutes,T.minutes],[S.seconds,T.seconds]):x(S.hours,S.minutes,S.seconds)};En(()=>{if(!t.shadow)return d(r.value),i.value?E():v()});const w=()=>{Array.isArray(i.value)?i.value=i.value.map((S,T)=>S&&c(S,T)):i.value=c(i.value),e("time-update")};return{modelValue:i,time:s,disabledTimesConfig:h,updateTime:(S,T=!0,A=!1)=>{l(S,T,A,w)},validateTime:g}},ZB=hn({compatConfig:{MODE:3},__name:"TimePickerSolo",props:{..._s},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=_a(),o=ki(r,"timePicker"),a=xe(null),{time:l,modelValue:c,disabledTimesConfig:u,updateTime:d,validateTime:h}=qB(s,i);return En(()=>{s.shadow||i("mount",null)}),e({getSidebarProps:()=>({modelValue:c,time:l,updateTime:d}),toggleTimePicker:(g,p=!1,m="")=>{var y;(y=a.value)==null||y.toggleTimePicker(g,p,m)}}),(g,p)=>(R(),Se(wf,{"multi-calendars":0,stretch:""},{default:De(()=>[N(hS,wn({ref_key:"tpRef",ref:a},g.$props,{hours:J(l).hours,minutes:J(l).minutes,seconds:J(l).seconds,"internal-model-value":g.internalModelValue,"disabled-times-config":J(u),"validate-time":J(h),"onUpdate:hours":p[0]||(p[0]=m=>J(d)(m)),"onUpdate:minutes":p[1]||(p[1]=m=>J(d)(m,!1)),"onUpdate:seconds":p[2]||(p[2]=m=>J(d)(m,!1,!0)),onAmPmChange:p[3]||(p[3]=m=>g.$emit("am-pm-change",m)),onResetFlow:p[4]||(p[4]=m=>g.$emit("reset-flow")),onOverlayClosed:p[5]||(p[5]=m=>g.$emit("overlay-toggle",{open:!1,overlay:m})),onOverlayOpened:p[6]||(p[6]=m=>g.$emit("overlay-toggle",{open:!0,overlay:m}))}),Un({_:2},[Ze(J(o),(m,y)=>({name:m,fn:De(v=>[Ne(g.$slots,m,In(ni(v)))])}))]),1040,["hours","minutes","seconds","internal-model-value","disabled-times-config","validate-time"])]),_:3}))}}),JB={class:"dp--header-wrap"},QB={key:0,class:"dp__month_year_wrap"},e4={key:0},t4={class:"dp__month_year_wrap"},n4=["data-dp-element","aria-label","data-test","onClick","onKeydown"],i4=hn({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:()=>[]},..._s},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}=jt(s),{transitionName:g,showTransition:p}=zu(r),{buildMatrix:m}=_o(),{handleMonthYearChange:y,isDisabled:v,updateMonthYear:b}=SB(s,i),{showLeftIcon:x,showRightIcon:E}=Ef(),w=xe(!1),S=xe(!1),T=xe(!1),A=xe([null,null,null,null]);En(()=>{i("mount")});const k=te=>({get:()=>s[te],set:I=>{const ee=te===es.month?es.year:es.month;i("update-month-year",{[te]:I,[ee]:s[ee]}),te===es.month?z(!0):X(!0)}}),P=be(k(es.month)),B=be(k(es.year)),Y=be(()=>te=>({month:s.month,year:s.year,items:te===es.month?s.months:s.years,instance:s.instance,updateMonthYear:b,toggle:te===es.month?z:X})),ne=be(()=>s.months.find(I=>I.value===s.month)||{text:"",value:0}),$=be(()=>kl(s.months,te=>{const I=s.month===te.value,ee=uu(te.value,QC(s.year,d.value.minDate),eS(s.year,d.value.maxDate))||l.value.months.includes(te.value),ue=rS(u.value,te.value,s.year);return{active:I,disabled:ee,highlighted:ue}})),F=be(()=>kl(s.years,te=>{const I=s.year===te.value,ee=uu(te.value,Ml(d.value.minDate),Ml(d.value.maxDate))||l.value.years.includes(te.value),ue=$_(u.value,te.value);return{active:I,disabled:ee,highlighted:ue}})),D=(te,I,ee)=>{ee!==void 0?te.value=ee:te.value=!te.value,te.value?(T.value=!0,i("overlay-opened",I)):(T.value=!1,i("overlay-closed",I))},z=(te=!1,I)=>{Z(te),D(w,Yn.month,I)},X=(te=!1,I)=>{Z(te),D(S,Yn.year,I)},Z=te=>{te||i("reset-flow")},H=(te,I)=>{s.arrowNavigation&&(A.value[I]=vn(te),m(A.value,"monthYear"))},le=be(()=>{var te,I,ee,ue,L,ae;return[{type:es.month,index:1,toggle:z,modelValue:P.value,updateModelValue:de=>P.value=de,text:ne.value.text,showSelectionGrid:w.value,items:$.value,ariaLabel:(te=o.value)==null?void 0:te.openMonthsOverlay,overlayLabel:((ee=(I=o.value).monthPicker)==null?void 0:ee.call(I,!0))??void 0},{type:es.year,index:2,toggle:X,modelValue:B.value,updateModelValue:de=>B.value=de,text:JC(s.year,s.locale),showSelectionGrid:S.value,items:F.value,ariaLabel:(ue=o.value)==null?void 0:ue.openYearsOverlay,overlayLabel:((ae=(L=o.value).yearPicker)==null?void 0:ae.call(L,!0))??void 0}]}),ie=be(()=>s.disableYearSelect?[le.value[0]]:s.yearFirst?[...le.value].reverse():le.value);return e({toggleMonthPicker:z,toggleYearPicker:X,handleMonthYearChange:y}),(te,I)=>{var ee,ue,L,ae,de,ve;return R(),V("div",JB,[te.$slots["month-year"]?(R(),V("div",QB,[Ne(te.$slots,"month-year",In(ni({month:t.month,year:t.year,months:t.months,years:t.years,updateMonthYear:J(b),handleMonthYearChange:J(y),instance:t.instance})))])):(R(),V(Le,{key:1},[te.$slots["top-extra"]?(R(),V("div",e4,[Ne(te.$slots,"top-extra",{value:te.internalModelValue})])):ce("",!0),f("div",t4,[J(x)(J(a),t.instance)&&!te.vertical?(R(),Se(jc,{key:0,"aria-label":(ee=J(o))==null?void 0:ee.prevMonth,disabled:J(v)(!1),class:Pe((ue=J(h))==null?void 0:ue.navBtnPrev),"el-name":"action-prev",onActivate:I[0]||(I[0]=W=>J(y)(!1,!0)),onSetRef:I[1]||(I[1]=W=>H(W,0))},{default:De(()=>[te.$slots["arrow-left"]?Ne(te.$slots,"arrow-left",{key:0}):ce("",!0),te.$slots["arrow-left"]?ce("",!0):(R(),Se(J(A_),{key:1}))]),_:3},8,["aria-label","disabled","class"])):ce("",!0),f("div",{class:Pe(["dp__month_year_wrap",{dp__year_disable_select:te.disableYearSelect}])},[(R(!0),V(Le,null,Ze(ie.value,(W,fe)=>(R(),V(Le,{key:W.type},[f("button",{ref_for:!0,ref:C=>H(C,fe+1),type:"button","data-dp-element":`overlay-${W.type}`,class:Pe(["dp__btn dp__month_year_select",{"dp--hidden-el":T.value}]),"aria-label":`${W.text}-${W.ariaLabel}`,"data-test":`${W.type}-toggle-overlay-${t.instance}`,onClick:W.toggle,onKeydown:C=>J(ii)(C,()=>W.toggle(),!0)},[te.$slots[W.type]?Ne(te.$slots,W.type,{key:0,text:W.text,value:s[W.type]}):ce("",!0),te.$slots[W.type]?ce("",!0):(R(),V(Le,{key:1},[Ue(we(W.text),1)],64))],42,n4),N($t,{name:J(g)(W.showSelectionGrid),css:J(p)},{default:De(()=>[W.showSelectionGrid?(R(),Se(Vu,{key:0,items:W.items,"arrow-navigation":te.arrowNavigation,"hide-navigation":te.hideNavigation,"is-last":te.autoApply&&!J(c).keepActionRow,"skip-button-ref":!1,config:te.config,type:W.type,"header-refs":[],"esc-close":te.escClose,"menu-wrap-ref":te.menuWrapRef,"text-input":te.textInput,"aria-labels":te.ariaLabels,"overlay-label":W.overlayLabel,onSelected:W.updateModelValue,onToggle:W.toggle},Un({"button-icon":De(()=>[te.$slots["calendar-icon"]?Ne(te.$slots,"calendar-icon",{key:0}):ce("",!0),te.$slots["calendar-icon"]?ce("",!0):(R(),Se(J(Gl),{key:1}))]),_:2},[te.$slots[`${W.type}-overlay-value`]?{name:"item",fn:De(({item:C})=>[Ne(te.$slots,`${W.type}-overlay-value`,{text:C.text,value:C.value})]),key:"0"}:void 0,te.$slots[`${W.type}-overlay`]?{name:"overlay",fn:De(()=>[Ne(te.$slots,`${W.type}-overlay`,wn({ref_for:!0},Y.value(W.type)))]),key:"1"}:void 0,te.$slots[`${W.type}-overlay-header`]?{name:"header",fn:De(()=>[Ne(te.$slots,`${W.type}-overlay-header`,{toggle:W.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),J(x)(J(a),t.instance)&&te.vertical?(R(),Se(jc,{key:1,"aria-label":(L=J(o))==null?void 0:L.prevMonth,"el-name":"action-prev",disabled:J(v)(!1),class:Pe((ae=J(h))==null?void 0:ae.navBtnPrev),onActivate:I[2]||(I[2]=W=>J(y)(!1,!0))},{default:De(()=>[te.$slots["arrow-up"]?Ne(te.$slots,"arrow-up",{key:0}):ce("",!0),te.$slots["arrow-up"]?ce("",!0):(R(),Se(J(P_),{key:1}))]),_:3},8,["aria-label","disabled","class"])):ce("",!0),J(E)(J(a),t.instance)?(R(),Se(jc,{key:2,ref:"rightIcon","el-name":"action-next",disabled:J(v)(!0),"aria-label":(de=J(o))==null?void 0:de.nextMonth,class:Pe((ve=J(h))==null?void 0:ve.navBtnNext),onActivate:I[3]||(I[3]=W=>J(y)(!0,!0)),onSetRef:I[4]||(I[4]=W=>H(W,te.disableYearSelect?2:3))},{default:De(()=>[te.$slots[te.vertical?"arrow-down":"arrow-right"]?Ne(te.$slots,te.vertical?"arrow-down":"arrow-right",{key:0}):ce("",!0),te.$slots[te.vertical?"arrow-down":"arrow-right"]?ce("",!0):(R(),Se(ma(te.vertical?J(I_):J(k_)),{key:1}))]),_:3},8,["disabled","aria-label","class"])):ce("",!0)])],64))])}}}),s4={class:"dp__calendar_header",role:"row"},r4={key:0,class:"dp__calendar_header_item",role:"gridcell"},o4=["aria-label"],a4={key:0,class:"dp__calendar_item dp__week_num",role:"gridcell"},l4={class:"dp__cell_inner"},c4=["id","aria-pressed","aria-disabled","aria-label","tabindex","data-test","onClick","onTouchend","onKeydown","onMouseenter","onMouseleave","onMousedown"],u4=hn({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},..._s},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}=_o(),{defaultedTransitions:o,defaultedConfig:a,defaultedAriaLabels:l,defaultedMultiCalendars:c,defaultedWeekNumbers:u,defaultedMultiDates:d,defaultedUI:h}=jt(s),g=xe(null),p=xe({bottom:"",left:"",transform:""}),m=xe([]),y=xe(null),v=xe(!0),b=xe(""),x=xe({startX:0,endX:0,startY:0,endY:0}),E=xe([]),w=xe({left:"50%"}),S=xe(!1),T=be(()=>s.calendar?s.calendar(s.mappedDates):s.mappedDates),A=be(()=>s.dayNames?Array.isArray(s.dayNames)?s.dayNames:s.dayNames(s.locale,+s.weekStart):U5(s.formatLocale,s.locale,+s.weekStart));En(()=>{i("mount",{cmp:"calendar",refs:m}),a.value.noSwipe||y.value&&(y.value.addEventListener("touchstart",H,{passive:!1}),y.value.addEventListener("touchend",le,{passive:!1}),y.value.addEventListener("touchmove",ie,{passive:!1})),s.monthChangeOnScroll&&y.value&&y.value.addEventListener("wheel",ee,{passive:!1})});const k=W=>W?s.vertical?"vNext":"next":s.vertical?"vPrevious":"previous",P=(W,fe)=>{if(s.transitions){const C=oi(ar(Ce(),s.month,s.year));b.value=on(oi(ar(Ce(),W,fe)),C)?o.value[k(!0)]:o.value[k(!1)],v.value=!1,Rn(()=>{v.value=!0})}},B=be(()=>({...h.value.calendar??{}})),Y=be(()=>W=>{const fe=X5(W);return{dp__marker_dot:fe.type==="dot",dp__marker_line:fe.type==="line"}}),ne=be(()=>W=>ct(W,g.value)),$=be(()=>({dp__calendar:!0,dp__calendar_next:c.value.count>0&&s.instance!==0})),F=be(()=>W=>s.hideOffsetDates?W.current:!0),D=async(W,fe)=>{const{width:C,height:O}=W.getBoundingClientRect();g.value=fe.value;let K={left:`${C/2}px`},U=-50;if(await Rn(),E.value[0]){const{left:re,width:j}=E.value[0].getBoundingClientRect();re<0&&(K={left:"0"},U=0,w.value.left=`${C/2}px`),window.innerWidth{var O,K,U;const re=vn(m.value[fe][C]);re&&((O=W.marker)!=null&&O.customPosition&&(U=(K=W.marker)==null?void 0:K.tooltip)!=null&&U.length?p.value=W.marker.customPosition(re):await D(re,W),i("tooltip-open",W.marker))},X=async(W,fe,C)=>{var O,K;if(S.value&&d.value.enabled&&d.value.dragSelect)return i("select-date",W);i("set-hover-date",W),(K=(O=W.marker)==null?void 0:O.tooltip)!=null&&K.length&&await z(W,fe,C)},Z=W=>{g.value&&(g.value=null,p.value=JSON.parse(JSON.stringify({bottom:"",left:"",transform:""})),i("tooltip-close",W.marker))},H=W=>{x.value.startX=W.changedTouches[0].screenX,x.value.startY=W.changedTouches[0].screenY},le=W=>{x.value.endX=W.changedTouches[0].screenX,x.value.endY=W.changedTouches[0].screenY,te()},ie=W=>{s.vertical&&!s.inline&&W.preventDefault()},te=()=>{const W=s.vertical?"Y":"X";Math.abs(x.value[`start${W}`]-x.value[`end${W}`])>10&&i("handle-swipe",x.value[`start${W}`]>x.value[`end${W}`]?"right":"left")},I=(W,fe,C)=>{W&&(Array.isArray(m.value[fe])?m.value[fe][C]=W:m.value[fe]=[W]),s.arrowNavigation&&r(m.value,"calendar")},ee=W=>{s.monthChangeOnScroll&&(W.preventDefault(),i("handle-scroll",W))},ue=W=>u.value.type==="local"?C_(W.value,{weekStartsOn:+s.weekStart}):u.value.type==="iso"?x_(W.value):typeof u.value.type=="function"?u.value.type(W.value):"",L=W=>{const fe=W[0];return u.value.hideOnOffsetDates?W.some(C=>C.current)?ue(fe):"":ue(fe)},ae=(W,fe,C=!0)=>{C&&db()||!C&&!db()||d.value.enabled||(eo(W,a.value),i("select-date",fe))},de=W=>{eo(W,a.value)},ve=W=>{d.value.enabled&&d.value.dragSelect?(S.value=!0,i("select-date",W)):d.value.enabled&&i("select-date",W)};return e({triggerTransition:P}),(W,fe)=>(R(),V("div",{class:Pe($.value)},[f("div",{ref_key:"calendarWrapRef",ref:y,class:Pe(B.value),role:"grid"},[f("div",s4,[W.weekNumbers?(R(),V("div",r4,we(W.weekNumName),1)):ce("",!0),(R(!0),V(Le,null,Ze(A.value,(C,O)=>{var K,U;return R(),V("div",{key:O,class:"dp__calendar_header_item",role:"gridcell","data-test":"calendar-header","aria-label":(U=(K=J(l))==null?void 0:K.weekDay)==null?void 0:U.call(K,O)},[W.$slots["calendar-header"]?Ne(W.$slots,"calendar-header",{key:0,day:C,index:O}):ce("",!0),W.$slots["calendar-header"]?ce("",!0):(R(),V(Le,{key:1},[Ue(we(C),1)],64))],8,o4)}),128))]),fe[2]||(fe[2]=f("div",{class:"dp__calendar_header_separator"},null,-1)),N($t,{name:b.value,css:!!W.transitions},{default:De(()=>[v.value?(R(),V("div",{key:0,class:"dp__calendar",role:"rowgroup",onMouseleave:fe[1]||(fe[1]=C=>S.value=!1)},[(R(!0),V(Le,null,Ze(T.value,(C,O)=>(R(),V("div",{key:O,class:"dp__calendar_row",role:"row"},[W.weekNumbers?(R(),V("div",a4,[f("div",l4,we(L(C.days)),1)])):ce("",!0),(R(!0),V(Le,null,Ze(C.days,(K,U)=>{var re,j,se;return R(),V("div",{id:J(oS)(K.value),ref_for:!0,ref:Q=>I(Q,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=J(l))==null?void 0:re.day)==null?void 0:j.call(re,K),tabindex:!K.current&&W.hideOffsetDates?void 0:0,"data-test":K.value,onClick:ru(Q=>ae(Q,K),["prevent"]),onTouchend:Q=>ae(Q,K,!1),onKeydown:Q=>J(ii)(Q,()=>W.$emit("select-date",K)),onMouseenter:Q=>X(K,O,U),onMouseleave:Q=>Z(K),onMousedown:Q=>ve(K),onMouseup:fe[0]||(fe[0]=Q=>S.value=!1)},[f("div",{class:Pe(["dp__cell_inner",K.classData])},[W.$slots.day&&F.value(K)?Ne(W.$slots,"day",{key:0,day:+K.text,date:K.value}):ce("",!0),W.$slots.day?ce("",!0):(R(),V(Le,{key:1},[Ue(we(K.text),1)],64)),K.marker&&F.value(K)?(R(),V(Le,{key:2},[W.$slots.marker?Ne(W.$slots,"marker",{key:0,marker:K.marker,day:+K.text,date:K.value}):(R(),V("div",{key:1,class:Pe(Y.value(K.marker)),style:Pn(K.marker.color?{backgroundColor:K.marker.color}:{})},null,6))],64)):ce("",!0),ne.value(K.value)?(R(),V("div",{key:3,ref_for:!0,ref_key:"activeTooltip",ref:E,class:"dp__marker_tooltip",style:Pn(p.value)},[(se=K.marker)!=null&&se.tooltip?(R(),V("div",{key:0,class:"dp__tooltip_content",onClick:de},[(R(!0),V(Le,null,Ze(K.marker.tooltip,(Q,ge)=>(R(),V("div",{key:ge,class:"dp__tooltip_text"},[W.$slots["marker-tooltip"]?Ne(W.$slots,"marker-tooltip",{key:0,tooltip:Q,day:K.value}):ce("",!0),W.$slots["marker-tooltip"]?ce("",!0):(R(),V(Le,{key:1},[f("div",{class:"dp__tooltip_mark",style:Pn(Q.color?{backgroundColor:Q.color}:{})},null,4),f("div",null,we(Q.text),1)],64))]))),128)),f("div",{class:"dp__arrow_bottom_tp",style:Pn(w.value)},null,4)])):ce("",!0)],4)):ce("",!0)],2)],40,c4)}),128))]))),128))],32)):ce("",!0)]),_:3},8,["name","css"])],2)],2))}}),mb=t=>Array.isArray(t),d4=(t,e,n,i)=>{const s=xe([]),r=xe(new Date),o=xe(),a=()=>H(t.isTextInputDate),{modelValue:l,calendars:c,time:u,today:d}=Wu(t,e,a),{defaultedMultiCalendars:h,defaultedStartTime:g,defaultedRange:p,defaultedConfig:m,defaultedTz:y,propDates:v,defaultedMultiDates:b}=jt(t),{validateMonthYearInRange:x,isDisabled:E,isDateRangeAllowed:w,checkMinMaxRange:S}=yo(t),{updateTimeValues:T,getSetDateTime:A,setTime:k,assignStartTime:P,validateTime:B,disabledTimesConfig:Y}=fS(t,u,l,i),ne=be(()=>oe=>c.value[oe]?c.value[oe].month:0),$=be(()=>oe=>c.value[oe]?c.value[oe].year:0),F=oe=>!m.value.keepViewOnOffsetClick||oe?!0:!o.value,D=(oe,Te,he,Ae=!1)=>{var Oe,Ut;F(Ae)&&(c.value[oe]||(c.value[oe]={month:0,year:0}),c.value[oe].month=ub(Te)?(Oe=c.value[oe])==null?void 0:Oe.month:Te,c.value[oe].year=ub(he)?(Ut=c.value[oe])==null?void 0:Ut.year:he)},z=()=>{t.autoApply&&e("select-date")};En(()=>{t.shadow||(l.value||(W(),g.value&&P(g.value)),H(!0),t.focusStartDate&&t.startDate&&W())});const X=be(()=>{var oe;return(oe=t.flow)!=null&&oe.length&&!t.partialFlow?t.flowStep===t.flow.length:!0}),Z=()=>{t.autoApply&&X.value&&e("auto-apply",t.partialFlow?t.flowStep!==t.flow.length:!1)},H=(oe=!1)=>{if(l.value)return Array.isArray(l.value)?(s.value=l.value,L(oe)):te(l.value,oe);if(h.value.count&&oe&&!t.startDate)return ie(Ce(),oe)},le=()=>Array.isArray(l.value)&&p.value.enabled?at(l.value[0])===at(l.value[1]??l.value[0]):!1,ie=(oe=new Date,Te=!1)=>{if((!h.value.count||!h.value.static||Te)&&D(0,at(oe),Xe(oe)),h.value.count&&(!h.value.solo||!l.value||le()))for(let he=1;he{ie(oe),k("hours",yr(oe)),k("minutes",ao(oe)),k("seconds",Sl(oe)),h.value.count&&Te&&ve()},I=oe=>{if(h.value.count){if(h.value.solo)return 0;const Te=at(oe[0]),he=at(oe[1]);return Math.abs(he-Te){oe[1]&&p.value.showLastInRange?ie(oe[I(oe)],Te):ie(oe[0],Te);const he=(Ae,Oe)=>[Ae(oe[0]),oe[1]?Ae(oe[1]):u[Oe][1]];k("hours",he(yr,"hours")),k("minutes",he(ao,"minutes")),k("seconds",he(Sl,"seconds"))},ue=(oe,Te)=>{if((p.value.enabled||t.weekPicker)&&!b.value.enabled)return ee(oe,Te);if(b.value.enabled&&Te){const he=oe[oe.length-1];return te(he,Te)}},L=oe=>{const Te=l.value;ue(Te,oe),h.value.count&&h.value.solo&&ve()},ae=(oe,Te)=>{const he=Pt(Ce(),{month:ne.value(Te),year:$.value(Te)}),Ae=oe<0?ds(he,1):Al(he,1);x(at(Ae),Xe(Ae),oe<0,t.preventMinMaxNavigation)&&(D(Te,at(Ae),Xe(Ae)),e("update-month-year",{instance:Te,month:at(Ae),year:Xe(Ae)}),h.value.count&&!h.value.solo&&de(Te),n())},de=oe=>{for(let Te=oe-1;Te>=0;Te--){const he=Al(Pt(Ce(),{month:ne.value(Te+1),year:$.value(Te+1)}),1);D(Te,at(he),Xe(he))}for(let Te=oe+1;Te<=h.value.count-1;Te++){const he=ds(Pt(Ce(),{month:ne.value(Te-1),year:$.value(Te-1)}),1);D(Te,at(he),Xe(he))}},ve=()=>{if(Array.isArray(l.value)&&l.value.length===2){const oe=Ce(Ce(l.value[1]?l.value[1]:ds(l.value[0],1))),[Te,he]=[at(l.value[0]),Xe(l.value[0])],[Ae,Oe]=[at(l.value[1]),Xe(l.value[1])];(Te!==Ae||Te===Ae&&he!==Oe)&&h.value.solo&&D(1,at(oe),Xe(oe))}else l.value&&!Array.isArray(l.value)&&(D(0,at(l.value),Xe(l.value)),ie(Ce()))},W=()=>{t.startDate&&(D(0,at(Ce(t.startDate)),Xe(Ce(t.startDate))),h.value.count&&de(0))},fe=(oe,Te)=>{if(t.monthChangeOnScroll){const he=new Date().getTime()-r.value.getTime(),Ae=Math.abs(oe.deltaY);let Oe=500;Ae>1&&(Oe=100),Ae>100&&(Oe=0),he>Oe&&(r.value=new Date,ae(t.monthChangeOnScroll!=="inverse"?-oe.deltaY:oe.deltaY,Te))}},C=(oe,Te,he=!1)=>{t.monthChangeOnArrows&&t.vertical===he&&O(oe,Te)},O=(oe,Te)=>{ae(oe==="right"?-1:1,Te)},K=oe=>{if(v.value.markers)return Eh(oe.value,v.value.markers)},U=(oe,Te)=>{switch(t.sixWeeks===!0?"append":t.sixWeeks){case"prepend":return[!0,!1];case"center":return[oe==0,!0];case"fair":return[oe==0||Te>oe,!0];case"append":return[!1,!1];default:return[!1,!1]}},re=(oe,Te,he,Ae)=>{if(t.sixWeeks&&oe.length<6){const Oe=6-oe.length,Ut=(Te.getDay()+7-Ae)%7,gn=6-(he.getDay()+7-Ae)%7,[Ri,Ws]=U(Ut,gn);for(let pn=1;pn<=Oe;pn++)if(Ws?!!(pn%2)==Ri:Ri){const Cn=oe[0].days[0],Sn=j(ss(Cn.value,-7),at(Te));oe.unshift({days:Sn})}else{const Cn=oe[oe.length-1],Sn=Cn.days[Cn.days.length-1],ai=j(ss(Sn.value,1),at(Te));oe.push({days:ai})}}return oe},j=(oe,Te)=>{const he=Ce(oe),Ae=[];for(let Oe=0;Oe<7;Oe++){const Ut=ss(he,Oe),gn=at(Ut)!==Te;Ae.push({text:t.hideOffsetDates&&gn?"":Ut.getDate(),value:Ut,current:!gn,classData:{}})}return Ae},se=(oe,Te)=>{const he=[],Ae=new Date(Te,oe),Oe=new Date(Te,oe+1,0),Ut=t.weekStart,gn=ps(Ae,{weekStartsOn:Ut}),Ri=Ws=>{const pn=j(Ws,oe);if(he.push({days:pn}),!he[he.length-1].days.some(Cn=>ct(oi(Cn.value),oi(Oe)))){const Cn=ss(Ws,7);Ri(Cn)}};return Ri(gn),re(he,Ae,Oe,Ut)},Q=oe=>{const Te=to(Ce(oe.value),u.hours,u.minutes,ze());e("date-update",Te),b.value.enabled?N_(Te,l,b.value.limit):l.value=Te,i(),Rn().then(()=>{Z()})},ge=oe=>p.value.noDisabledRange?tS(s.value[0],oe).some(Te=>E(Te)):!1,_e=()=>{s.value=l.value?l.value.slice():[],s.value.length===2&&!(p.value.fixedStart||p.value.fixedEnd)&&(s.value=[])},ye=(oe,Te)=>{const he=[Ce(oe.value),ss(Ce(oe.value),+p.value.autoRange)];w(he)?(Te&&ke(oe.value),s.value=he):e("invalid-date",oe.value)},ke=oe=>{const Te=at(Ce(oe)),he=Xe(Ce(oe));if(D(0,Te,he),h.value.count>0)for(let Ae=1;Ae{if(ge(oe.value)||!S(oe.value,l.value,p.value.fixedStart?0:1))return e("invalid-date",oe.value);s.value=uS(Ce(oe.value),l,e,p)},Be=(oe,Te)=>{if(_e(),p.value.autoRange)return ye(oe,Te);if(p.value.fixedStart||p.value.fixedEnd)return Me(oe);s.value[0]?S(Ce(oe.value),l.value)&&!ge(oe.value)?Qt(Ce(oe.value),Ce(s.value[0]))?(s.value.unshift(Ce(oe.value)),e("range-end",s.value[0])):(s.value[1]=Ce(oe.value),e("range-end",s.value[1])):(t.autoApply&&e("auto-apply-invalid",oe.value),e("invalid-date",oe.value)):(s.value[0]=Ce(oe.value),e("range-start",s.value[0]))},ze=(oe=!0)=>t.enableSeconds?Array.isArray(u.seconds)?oe?u.seconds[0]:u.seconds[1]:u.seconds:0,nt=oe=>{s.value[oe]=to(s.value[oe],u.hours[oe],u.minutes[oe],ze(oe!==1))},Qe=()=>{var oe,Te;s.value[0]&&s.value[1]&&+((oe=s.value)==null?void 0:oe[0])>+((Te=s.value)==null?void 0:Te[1])&&(s.value.reverse(),e("range-start",s.value[0]),e("range-end",s.value[1]))},qt=()=>{s.value.length&&(s.value[0]&&!s.value[1]?nt(0):(nt(0),nt(1),i()),Qe(),l.value=s.value.slice(),xf(s.value,e,t.autoApply,t.modelAuto))},Bt=(oe,Te=!1)=>{if(E(oe.value)||!oe.current&&t.hideOffsetDates)return e("invalid-date",oe.value);if(o.value=JSON.parse(JSON.stringify(oe)),!p.value.enabled)return Q(oe);mb(u.hours)&&mb(u.minutes)&&!b.value.enabled&&(Be(oe,Te),qt())},fn=(oe,Te)=>{var he;D(oe,Te.month,Te.year,!0),h.value.count&&!h.value.solo&&de(oe),e("update-month-year",{instance:oe,month:Te.month,year:Te.year}),n(h.value.solo?oe:void 0);const Ae=(he=t.flow)!=null&&he.length?t.flow[t.flowStep]:void 0;!Te.fromNav&&(Ae===Yn.month||Ae===Yn.year)&&i()},Kt=(oe,Te)=>{cS({value:oe,modelValue:l,range:p.value.enabled,timezone:Te?void 0:y.value.timezone}),z(),t.multiCalendars&&Rn().then(()=>H(!0))},Ei=()=>{const oe=D_(Ce(),y.value);p.value.enabled?l.value&&Array.isArray(l.value)&&l.value[0]?l.value=Qt(oe,l.value[0])?[oe,l.value[0]]:[l.value[0],oe]:l.value=[oe]:l.value=oe,z()},Xi=()=>{if(Array.isArray(l.value))if(b.value.enabled){const oe=Zt();l.value[l.value.length-1]=A(oe)}else l.value=l.value.map((oe,Te)=>oe&&A(oe,Te));else l.value=A(l.value);e("time-update")},Zt=()=>Array.isArray(l.value)&&l.value.length?l.value[l.value.length-1]:null;return{calendars:c,modelValue:l,month:ne,year:$,time:u,disabledTimesConfig:Y,today:d,validateTime:B,getCalendarDays:se,getMarker:K,handleScroll:fe,handleSwipe:O,handleArrow:C,selectDate:Bt,updateMonthYear:fn,presetDate:Kt,selectCurrentDate:Ei,updateTime:(oe,Te=!0,he=!1)=>{T(oe,Te,he,Xi)},assignMonthAndYear:ie}},h4={key:0},f4=hn({__name:"DatePicker",props:{..._s},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:g,getMarker:p,handleArrow:m,handleScroll:y,handleSwipe:v,selectDate:b,updateMonthYear:x,presetDate:E,selectCurrentDate:w,updateTime:S,assignMonthAndYear:T}=d4(s,i,le,ie),A=_a(),{setHoverDate:k,getDayClassData:P,clearHoverDate:B}=k4(l,s),{defaultedMultiCalendars:Y}=jt(s),ne=xe([]),$=xe([]),F=xe(null),D=ki(A,"calendar"),z=ki(A,"monthYear"),X=ki(A,"timePicker"),Z=fe=>{s.shadow||i("mount",fe)};un(r,()=>{s.shadow||setTimeout(()=>{i("recalculate-position")},0)},{deep:!0}),un(Y,(fe,C)=>{fe.count-C.count>0&&T()},{deep:!0});const H=be(()=>fe=>g(o.value(fe),a.value(fe)).map(C=>({...C,days:C.days.map(O=>(O.marker=p(O),O.classData=P(O),O))})));function le(fe){var C;fe||fe===0?(C=$.value[fe])==null||C.triggerTransition(o.value(fe),a.value(fe)):$.value.forEach((O,K)=>O.triggerTransition(o.value(K),a.value(K)))}function ie(){i("update-flow-step")}const te=(fe,C=!1)=>{b(fe,C),s.spaceConfirm&&i("select-date")},I=(fe,C,O=0)=>{var K;(K=ne.value[O])==null||K.toggleMonthPicker(fe,C)},ee=(fe,C,O=0)=>{var K;(K=ne.value[O])==null||K.toggleYearPicker(fe,C)},ue=(fe,C,O)=>{var K;(K=F.value)==null||K.toggleTimePicker(fe,C,O)},L=(fe,C)=>{var O;if(!s.range){const K=l.value?l.value:d,U=C?new Date(C):K,re=fe?ps(U,{weekStartsOn:1}):OC(U,{weekStartsOn:1});b({value:re,current:at(U)===o.value(0),text:"",classData:{}}),(O=document.getElementById(oS(re)))==null||O.focus()}},ae=fe=>{var C;(C=ne.value[0])==null||C.handleMonthYearChange(fe,!0)},de=fe=>{x(0,{month:o.value(0),year:a.value(0)+(fe?1:-1),fromNav:!0})},ve=(fe,C)=>{fe===Yn.time&&i(`time-picker-${C?"open":"close"}`),i("overlay-toggle",{open:C,overlay:fe})},W=fe=>{i("overlay-toggle",{open:!1,overlay:fe}),i("focus-menu")};return e({clearHoverDate:B,presetDate:E,selectCurrentDate:w,toggleMonthPicker:I,toggleYearPicker:ee,toggleTimePicker:ue,handleArrow:m,updateMonthYear:x,getSidebarProps:()=>({modelValue:l,month:o,year:a,time:c,updateTime:S,updateMonthYear:x,selectDate:b,presetDate:E}),changeMonth:ae,changeYear:de,selectWeekDate:L}),(fe,C)=>(R(),V(Le,null,[N(wf,{"multi-calendars":J(Y).count,collapse:fe.collapse},{default:De(({instance:O,index:K})=>[fe.disableMonthYearSelect?ce("",!0):(R(),Se(i4,wn({key:0,ref:U=>{U&&(ne.value[K]=U)},months:J(XC)(fe.formatLocale,fe.locale,fe.monthNameFormat),years:J(R_)(fe.yearRange,fe.locale,fe.reverseYears),month:J(o)(O),year:J(a)(O),instance:O},fe.$props,{onMount:C[0]||(C[0]=U=>Z(J(ta).header)),onResetFlow:C[1]||(C[1]=U=>fe.$emit("reset-flow")),onUpdateMonthYear:U=>J(x)(O,U),onOverlayClosed:W,onOverlayOpened:C[2]||(C[2]=U=>fe.$emit("overlay-toggle",{open:!0,overlay:U}))}),Un({_:2},[Ze(J(z),(U,re)=>({name:U,fn:De(j=>[Ne(fe.$slots,U,In(ni(j)))])}))]),1040,["months","years","month","year","instance","onUpdateMonthYear"])),N(u4,wn({ref:U=>{U&&($.value[K]=U)},"mapped-dates":H.value(O),month:J(o)(O),year:J(a)(O),instance:O},fe.$props,{onSelectDate:U=>J(b)(U,O!==1),onHandleSpace:U=>te(U,O!==1),onSetHoverDate:C[3]||(C[3]=U=>J(k)(U)),onHandleScroll:U=>J(y)(U,O),onHandleSwipe:U=>J(v)(U,O),onMount:C[4]||(C[4]=U=>Z(J(ta).calendar)),onResetFlow:C[5]||(C[5]=U=>fe.$emit("reset-flow")),onTooltipOpen:C[6]||(C[6]=U=>fe.$emit("tooltip-open",U)),onTooltipClose:C[7]||(C[7]=U=>fe.$emit("tooltip-close",U))}),Un({_:2},[Ze(J(D),(U,re)=>({name:U,fn:De(j=>[Ne(fe.$slots,U,In(ni({...j})))])}))]),1040,["mapped-dates","month","year","instance","onSelectDate","onHandleSpace","onHandleScroll","onHandleSwipe"])]),_:3},8,["multi-calendars","collapse"]),fe.enableTimePicker?(R(),V("div",h4,[fe.$slots["time-picker"]?Ne(fe.$slots,"time-picker",In(wn({key:0},{time:J(c),updateTime:J(S)}))):(R(),Se(hS,wn({key:1,ref_key:"timePickerRef",ref:F},fe.$props,{hours:J(c).hours,minutes:J(c).minutes,seconds:J(c).seconds,"internal-model-value":fe.internalModelValue,"disabled-times-config":J(u),"validate-time":J(h),onMount:C[8]||(C[8]=O=>Z(J(ta).timePicker)),"onUpdate:hours":C[9]||(C[9]=O=>J(S)(O)),"onUpdate:minutes":C[10]||(C[10]=O=>J(S)(O,!1)),"onUpdate:seconds":C[11]||(C[11]=O=>J(S)(O,!1,!0)),onResetFlow:C[12]||(C[12]=O=>fe.$emit("reset-flow")),onOverlayClosed:C[13]||(C[13]=O=>ve(O,!1)),onOverlayOpened:C[14]||(C[14]=O=>ve(O,!0)),onAmPmChange:C[15]||(C[15]=O=>fe.$emit("am-pm-change",O))}),Un({_:2},[Ze(J(X),(O,K)=>({name:O,fn:De(U=>[Ne(fe.$slots,O,In(ni(U)))])}))]),1040,["hours","minutes","seconds","internal-model-value","disabled-times-config","validate-time"]))])):ce("",!0)],64))}}),g4=(t,e)=>{const n=xe(),{defaultedMultiCalendars:i,defaultedConfig:s,defaultedHighlight:r,defaultedRange:o,propDates:a,defaultedFilters:l,defaultedMultiDates:c}=jt(t),{modelValue:u,year:d,month:h,calendars:g}=Wu(t,e),{isDisabled:p}=yo(t),{selectYear:m,groupedYears:y,showYearPicker:v,isDisabled:b,toggleYearPicker:x,handleYearSelect:E,handleYear:w}=dS({modelValue:u,multiCalendars:i,range:o,highlight:r,calendars:g,propDates:a,month:h,year:d,filters:l,props:t,emit:e}),S=(F,D)=>[F,D].map(z=>Os(z,"MMMM",{locale:t.formatLocale})).join("-"),T=be(()=>F=>u.value?Array.isArray(u.value)?u.value.some(D=>ab(F,D)):ab(u.value,F):!1),A=F=>{if(o.value.enabled){if(Array.isArray(u.value)){const D=ct(F,u.value[0])||ct(F,u.value[1]);return vf(u.value,n.value,F)&&!D}return!1}return!1},k=(F,D)=>F.quarter===tb(D)&&F.year===Xe(D),P=F=>typeof r.value=="function"?r.value({quarter:tb(F),year:Xe(F)}):!!r.value.quarters.find(D=>k(D,F)),B=be(()=>F=>{const D=Pt(new Date,{year:d.value(F)});return G3({start:lu(D),end:LC(D)}).map(z=>{const X=Uo(z),Z=nb(z),H=p(z),le=A(X),ie=P(X);return{text:S(X,Z),value:X,active:T.value(X),highlighted:ie,disabled:H,isBetween:le}})}),Y=F=>{N_(F,u,c.value.limit),e("auto-apply",!0)},ne=F=>{u.value=F_(u,F,e),xf(u.value,e,t.autoApply,t.modelAuto)},$=F=>{u.value=F,e("auto-apply")};return{defaultedConfig:s,defaultedMultiCalendars:i,groupedYears:y,year:d,isDisabled:b,quarters:B,showYearPicker:v,modelValue:u,setHoverDate:F=>{n.value=F},selectYear:m,selectQuarter:(F,D,z)=>{if(!z)return g.value[D].month=at(nb(F)),c.value.enabled?Y(F):o.value.enabled?ne(F):$(F)},toggleYearPicker:x,handleYearSelect:E,handleYear:w}},p4={class:"dp--quarter-items"},m4=["data-test","disabled","onClick","onMouseover"],_4=hn({compatConfig:{MODE:3},__name:"QuarterPicker",props:{..._s},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=_a(),o=ki(r,"yearMode"),{defaultedMultiCalendars:a,defaultedConfig:l,groupedYears:c,year:u,isDisabled:d,quarters:h,modelValue:g,showYearPicker:p,setHoverDate:m,selectQuarter:y,toggleYearPicker:v,handleYearSelect:b,handleYear:x}=g4(s,i);return e({getSidebarProps:()=>({modelValue:g,year:u,selectQuarter:y,handleYearSelect:b,handleYear:x})}),(E,w)=>(R(),Se(wf,{"multi-calendars":J(a).count,collapse:E.collapse,stretch:""},{default:De(({instance:S})=>[f("div",{class:"dp-quarter-picker-wrap",style:Pn({minHeight:`${J(l).modeHeight}px`})},[E.$slots["top-extra"]?Ne(E.$slots,"top-extra",{key:0,value:E.internalModelValue}):ce("",!0),f("div",null,[N(lS,wn(E.$props,{items:J(c)(S),instance:S,"show-year-picker":J(p)[S],year:J(u)(S),"is-disabled":T=>J(d)(S,T),onHandleYear:T=>J(x)(S,T),onYearSelect:T=>J(b)(T,S),onToggleYearPicker:T=>J(v)(S,T?.flow,T?.show)}),Un({_:2},[Ze(J(o),(T,A)=>({name:T,fn:De(k=>[Ne(E.$slots,T,In(ni(k)))])}))]),1040,["items","instance","show-year-picker","year","is-disabled","onHandleYear","onYearSelect","onToggleYearPicker"])]),f("div",p4,[(R(!0),V(Le,null,Ze(J(h)(S),(T,A)=>(R(),V("div",{key:A},[f("button",{type:"button",class:Pe(["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:k=>J(y)(T.value,S,T.disabled),onMouseover:k=>J(m)(T.value)},[E.$slots.quarter?Ne(E.$slots,"quarter",{key:0,value:T.value,text:T.text}):(R(),V(Le,{key:1},[Ue(we(T.text),1)],64))],42,m4)]))),128))])],4)]),_:3},8,["multi-calendars","collapse"]))}}),y4=["id","tabindex","role","aria-label"],v4={key:0,class:"dp--menu-load-container"},b4={key:1,class:"dp--menu-header"},w4={key:0,class:"dp__sidebar_left"},x4=["data-test","onClick","onKeydown"],E4={key:2,class:"dp__sidebar_right"},C4={key:3,class:"dp__action_extra"},_b=hn({compatConfig:{MODE:3},__name:"DatepickerMenu",props:{...bf,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=xe(null),o=be(()=>{const{openOnTop:j,...se}=s;return{...se,flowStep:k.value,collapse:s.collapse,noOverlayFocus:s.noOverlayFocus,menuWrapRef:r.value}}),{setMenuFocused:a,setShiftKey:l,control:c}=aS(),u=_a(),{defaultedTextInput:d,defaultedInline:h,defaultedConfig:g,defaultedUI:p}=jt(s),m=xe(null),y=xe(0),v=xe(null),b=xe(!1),x=xe(null);En(()=>{if(!s.shadow){b.value=!0,E(),window.addEventListener("resize",E);const j=vn(r);if(j&&!d.value.enabled&&!h.value.enabled&&(a(!0),D()),j){const se=Q=>{g.value.allowPreventDefault&&Q.preventDefault(),eo(Q,g.value,!0)};j.addEventListener("pointerdown",se),j.addEventListener("mousedown",se)}}}),pa(()=>{window.removeEventListener("resize",E)});const E=()=>{const j=vn(v);j&&(y.value=j.getBoundingClientRect().width)},{arrowRight:w,arrowLeft:S,arrowDown:T,arrowUp:A}=_o(),{flowStep:k,updateFlowStep:P,childMount:B,resetFlow:Y,handleFlow:ne}=M4(s,i,x),$=be(()=>s.monthPicker?$B:s.yearPicker?FB:s.timePicker?ZB:s.quarterPicker?_4:f4),F=be(()=>{var j;if(g.value.arrowLeft)return g.value.arrowLeft;const se=(j=r.value)==null?void 0:j.getBoundingClientRect(),Q=s.getInputRect();return Q?.width=(se?.right??0)&&Q?.width{const j=vn(r);j&&j.focus({preventScroll:!0})},z=be(()=>{var j;return((j=x.value)==null?void 0:j.getSidebarProps())||{}}),X=()=>{s.openOnTop&&i("recalculate-position")},Z=ki(u,"action"),H=be(()=>s.monthPicker||s.yearPicker?ki(u,"monthYear"):s.timePicker?ki(u,"timePicker"):ki(u,"shared")),le=be(()=>s.openOnTop?"dp__arrow_bottom":"dp__arrow_top"),ie=be(()=>({dp__menu_disabled:s.disabled,dp__menu_readonly:s.readonly,"dp-menu-loading":s.loading})),te=be(()=>({dp__menu:!0,dp__menu_index:!h.value.enabled,dp__relative:h.value.enabled,...p.value.menu??{}})),I=j=>{eo(j,g.value,!0)},ee=()=>{s.escClose&&i("close-picker")},ue=j=>{if(s.arrowNavigation){if(j===Jn.up)return A();if(j===Jn.down)return T();if(j===Jn.left)return S();if(j===Jn.right)return w()}else j===Jn.left||j===Jn.up?W("handleArrow",Jn.left,0,j===Jn.up):W("handleArrow",Jn.right,0,j===Jn.down)},L=j=>{l(j.shiftKey),!s.disableMonthYearSelect&&j.code===Ot.tab&&j.target.classList.contains("dp__menu")&&c.value.shiftKeyInMenu&&(j.preventDefault(),eo(j,g.value,!0),i("close-picker"))},ae=()=>{D(),i("time-picker-close")},de=j=>{var se,Q,ge;(se=x.value)==null||se.toggleTimePicker(!1,!1),(Q=x.value)==null||Q.toggleMonthPicker(!1,!1,j),(ge=x.value)==null||ge.toggleYearPicker(!1,!1,j)},ve=(j,se=0)=>{var Q,ge,_e;return j==="month"?(Q=x.value)==null?void 0:Q.toggleMonthPicker(!1,!0,se):j==="year"?(ge=x.value)==null?void 0:ge.toggleYearPicker(!1,!0,se):j==="time"?(_e=x.value)==null?void 0:_e.toggleTimePicker(!0,!1):de(se)},W=(j,...se)=>{var Q,ge;(Q=x.value)!=null&&Q[j]&&((ge=x.value)==null||ge[j](...se))},fe=()=>{W("selectCurrentDate")},C=(j,se)=>{W("presetDate",j,se)},O=()=>{W("clearHoverDate")},K=(j,se)=>{W("updateMonthYear",j,se)},U=(j,se)=>{j.preventDefault(),ue(se)},re=j=>{var se,Q,ge;if(L(j),j.key===Ot.home||j.key===Ot.end)return W("selectWeekDate",j.key===Ot.home,j.target.getAttribute("id"));switch((j.key===Ot.pageUp||j.key===Ot.pageDown)&&(j.shiftKey?(W("changeYear",j.key===Ot.pageUp),(se=em(r.value,"overlay-year"))==null||se.focus()):(W("changeMonth",j.key===Ot.pageUp),(Q=em(r.value,j.key===Ot.pageUp?"action-prev":"action-next"))==null||Q.focus()),j.target.getAttribute("id")&&((ge=r.value)==null||ge.focus({preventScroll:!0}))),j.key){case Ot.esc:return ee();case Ot.arrowLeft:return U(j,Jn.left);case Ot.arrowRight:return U(j,Jn.right);case Ot.arrowUp:return U(j,Jn.up);case Ot.arrowDown:return U(j,Jn.down);default:return}};return e({updateMonthYear:K,switchView:ve,handleFlow:ne}),(j,se)=>{var Q,ge,_e;return R(),V("div",{id:j.uid?`dp-menu-${j.uid}`:void 0,ref_key:"dpMenuRef",ref:r,tabindex:J(h).enabled?void 0:"0",role:J(h).enabled?void 0:"dialog","aria-label":(Q=j.ariaLabels)==null?void 0:Q.menu,class:Pe(te.value),style:Pn({"--dp-arrow-left":F.value}),onMouseleave:O,onClick:I,onKeydown:re},[(j.disabled||j.readonly)&&J(h).enabled||j.loading?(R(),V("div",{key:0,class:Pe(ie.value)},[j.loading?(R(),V("div",v4,se[19]||(se[19]=[f("span",{class:"dp--menu-loader"},null,-1)]))):ce("",!0)],2)):ce("",!0),j.$slots["menu-header"]?(R(),V("div",b4,[Ne(j.$slots,"menu-header")])):ce("",!0),!J(h).enabled&&!j.teleportCenter?(R(),V("div",{key:2,class:Pe(le.value)},null,2)):ce("",!0),f("div",{ref_key:"innerMenuRef",ref:v,class:Pe({dp__menu_content_wrapper:((ge=j.presetDates)==null?void 0:ge.length)||!!j.$slots["left-sidebar"]||!!j.$slots["right-sidebar"],"dp--menu-content-wrapper-collapsed":t.collapse&&(((_e=j.presetDates)==null?void 0:_e.length)||!!j.$slots["left-sidebar"]||!!j.$slots["right-sidebar"])}),style:Pn({"--dp-menu-width":`${y.value}px`})},[j.$slots["left-sidebar"]?(R(),V("div",w4,[Ne(j.$slots,"left-sidebar",In(ni(z.value)))])):ce("",!0),j.presetDates.length?(R(),V("div",{key:1,class:Pe({"dp--preset-dates-collapsed":t.collapse,"dp--preset-dates":!0})},[(R(!0),V(Le,null,Ze(j.presetDates,(ye,ke)=>(R(),V(Le,{key:ke},[ye.slot?Ne(j.$slots,ye.slot,{key:0,presetDate:C,label:ye.label,value:ye.value}):(R(),V("button",{key:1,type:"button",style:Pn(ye.style||{}),class:Pe(["dp__btn dp--preset-range",{"dp--preset-range-collapsed":t.collapse}]),"data-test":ye.testId??void 0,onClick:ru(Me=>C(ye.value,ye.noTz),["prevent"]),onKeydown:Me=>J(ii)(Me,()=>C(ye.value,ye.noTz),!0)},we(ye.label),47,x4))],64))),128))],2)):ce("",!0),f("div",{ref_key:"calendarWrapperRef",ref:m,class:"dp__instance_calendar",role:"document"},[(R(),Se(ma($.value),wn({ref_key:"dynCmpRef",ref:x},o.value,{"flow-step":J(k),onMount:J(B),onUpdateFlowStep:J(P),onResetFlow:J(Y),onFocusMenu:D,onSelectDate:se[0]||(se[0]=ye=>j.$emit("select-date")),onDateUpdate:se[1]||(se[1]=ye=>j.$emit("date-update",ye)),onTooltipOpen:se[2]||(se[2]=ye=>j.$emit("tooltip-open",ye)),onTooltipClose:se[3]||(se[3]=ye=>j.$emit("tooltip-close",ye)),onAutoApply:se[4]||(se[4]=ye=>j.$emit("auto-apply",ye)),onRangeStart:se[5]||(se[5]=ye=>j.$emit("range-start",ye)),onRangeEnd:se[6]||(se[6]=ye=>j.$emit("range-end",ye)),onInvalidFixedRange:se[7]||(se[7]=ye=>j.$emit("invalid-fixed-range",ye)),onTimeUpdate:se[8]||(se[8]=ye=>j.$emit("time-update")),onAmPmChange:se[9]||(se[9]=ye=>j.$emit("am-pm-change",ye)),onTimePickerOpen:se[10]||(se[10]=ye=>j.$emit("time-picker-open",ye)),onTimePickerClose:ae,onRecalculatePosition:X,onUpdateMonthYear:se[11]||(se[11]=ye=>j.$emit("update-month-year",ye)),onAutoApplyInvalid:se[12]||(se[12]=ye=>j.$emit("auto-apply-invalid",ye)),onInvalidDate:se[13]||(se[13]=ye=>j.$emit("invalid-date",ye)),onOverlayToggle:se[14]||(se[14]=ye=>j.$emit("overlay-toggle",ye)),"onUpdate:internalModelValue":se[15]||(se[15]=ye=>j.$emit("update:internal-model-value",ye))}),Un({_:2},[Ze(H.value,(ye,ke)=>({name:ye,fn:De(Me=>[Ne(j.$slots,ye,In(ni({...Me})))])}))]),1040,["flow-step","onMount","onUpdateFlowStep","onResetFlow"]))],512),j.$slots["right-sidebar"]?(R(),V("div",E4,[Ne(j.$slots,"right-sidebar",In(ni(z.value)))])):ce("",!0),j.$slots["action-extra"]?(R(),V("div",C4,[j.$slots["action-extra"]?Ne(j.$slots,"action-extra",{key:0,selectCurrentDate:fe}):ce("",!0)])):ce("",!0)],6),!j.autoApply||J(g).keepActionRow?(R(),Se(kB,wn({key:3,"menu-mount":b.value},o.value,{"calendar-width":y.value,onClosePicker:se[16]||(se[16]=ye=>j.$emit("close-picker")),onSelectDate:se[17]||(se[17]=ye=>j.$emit("select-date")),onInvalidSelect:se[18]||(se[18]=ye=>j.$emit("invalid-select")),onSelectNow:fe}),Un({_:2},[Ze(J(Z),(ye,ke)=>({name:ye,fn:De(Me=>[Ne(j.$slots,ye,In(ni({...Me})))])}))]),1040,["menu-mount","calendar-width"])):ce("",!0)],46,y4)}}});var Xa=(t=>(t.center="center",t.left="left",t.right="right",t))(Xa||{});const S4=({menuRef:t,menuRefInner:e,inputRef:n,pickerWrapperRef:i,inline:s,emit:r,props:o,slots:a})=>{const{defaultedConfig:l}=jt(o),c=xe({}),u=xe(!1),d=xe({top:"0",left:"0"}),h=xe(!1),g=tu(o,"teleportCenter");un(g,()=>{d.value=JSON.parse(JSON.stringify({})),w()});const p=D=>{if(o.teleport){const z=D.getBoundingClientRect();return{left:z.left+window.scrollX,top:z.top+window.scrollY}}return{top:0,left:0}},m=(D,z)=>{d.value.left=`${D+z-c.value.width}px`},y=D=>{d.value.left=`${D}px`},v=(D,z)=>{o.position===Xa.left&&y(D),o.position===Xa.right&&m(D,z),o.position===Xa.center&&(d.value.left=`${D+z/2-c.value.width/2}px`)},b=D=>{const{width:z,height:X}=D.getBoundingClientRect(),{top:Z,left:H}=o.altPosition?o.altPosition(D):p(D);return{top:+Z,left:+H,width:z,height:X}},x=()=>{d.value.left="50%",d.value.top="50%",d.value.transform="translate(-50%, -50%)",d.value.position="fixed",delete d.value.opacity},E=()=>{const D=vn(n),{top:z,left:X,transform:Z}=o.altPosition(D);d.value={top:`${z}px`,left:`${X}px`,transform:Z??""}},w=(D=!0)=>{var z;if(!s.value.enabled){if(g.value)return x();if(o.altPosition!==null)return E();if(D){const X=o.teleport?(z=e.value)==null?void 0:z.$el:t.value;X&&(c.value=X.getBoundingClientRect()),r("recalculate-position")}return Y()}},S=({inputEl:D,left:z,width:X})=>{window.screen.width>768&&!u.value&&v(z,X),k(D)},T=D=>{const{top:z,left:X,height:Z,width:H}=b(D);d.value.top=`${Z+z+ +o.offset}px`,h.value=!1,u.value||(d.value.left=`${X+H/2-c.value.width/2}px`),S({inputEl:D,left:X,width:H})},A=D=>{const{top:z,left:X,width:Z}=b(D);d.value.top=`${z-+o.offset-c.value.height}px`,h.value=!0,S({inputEl:D,left:X,width:Z})},k=D=>{if(o.autoPosition){const{left:z,width:X}=b(D),{left:Z,right:H}=c.value;if(!u.value){if(Math.abs(Z)!==Math.abs(H)){if(Z<=0)return u.value=!0,y(z);if(H>=document.documentElement.clientWidth)return u.value=!0,m(z,X)}return v(z,X)}}},P=()=>{const D=vn(n);if(D){const{height:z}=c.value,{top:X,height:Z}=D.getBoundingClientRect(),H=window.innerHeight-X-Z,le=X;return z<=H?Wo.bottom:z>H&&z<=le?Wo.top:H>=le?Wo.bottom:Wo.top}return Wo.bottom},B=D=>P()===Wo.bottom?T(D):A(D),Y=()=>{const D=vn(n);if(D)return o.autoPosition?B(D):T(D)},ne=function(D){if(D){const z=D.scrollHeight>D.clientHeight,X=window.getComputedStyle(D).overflowY.indexOf("hidden")!==-1;return z&&!X}return!0},$=function(D){return!D||D===document.body||D.nodeType===Node.DOCUMENT_FRAGMENT_NODE?window:ne(D)?D:$(D.assignedSlot&&l.value.shadowDom?D.assignedSlot.parentNode:D.parentNode)},F=D=>{if(D)switch(o.position){case Xa.left:return{left:0,transform:"translateX(0)"};case Xa.right:return{left:`${D.width}px`,transform:"translateX(-100%)"};default:return{left:`${D.width/2}px`,transform:"translateX(-50%)"}}return{}};return{openOnTop:h,menuStyle:d,xCorrect:u,setMenuPosition:w,getScrollableParent:$,shadowRender:(D,z)=>{var X,Z,H;const le=document.createElement("div"),ie=(X=vn(n))==null?void 0:X.getBoundingClientRect();le.setAttribute("id","dp--temp-container");const te=(Z=i.value)!=null&&Z.clientWidth?i.value:document.body;te.append(le);const I=F(ie),ee=l.value.shadowDom?Object.keys(a).filter(L=>["right-sidebar","left-sidebar","top-extra","action-extra"].includes(L)):Object.keys(a),ue=ua(D,{...z,shadow:!0,style:{opacity:0,position:"absolute",...I}},Object.fromEntries(ee.map(L=>[L,a[L]])));I0(ue,le),c.value=(H=ue.el)==null?void 0:H.getBoundingClientRect(),I0(null,le),te.removeChild(le)}}},Pr=[{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"]}],T4=[{name:"trigger"},{name:"input-icon"},{name:"clear-icon"},{name:"dp-input"}],A4={all:()=>Pr,monthYear:()=>Pr.filter(t=>t.use.includes("month-year")),input:()=>T4,timePicker:()=>Pr.filter(t=>t.use.includes("time")),action:()=>Pr.filter(t=>t.use.includes("action")),calendar:()=>Pr.filter(t=>t.use.includes("calendar")),menu:()=>Pr.filter(t=>t.use.includes("menu")),shared:()=>Pr.filter(t=>t.use.includes("shared")),yearMode:()=>Pr.filter(t=>t.use.includes("year-mode"))},ki=(t,e,n)=>{const i=[];return A4[e]().forEach(s=>{t[s.name]&&i.push(s.name)}),n!=null&&n.length&&n.forEach(s=>{s.slot&&i.push(s.slot)}),i},zu=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}},Wu=(t,e,n)=>{const{defaultedRange:i,defaultedTz:s}=jt(t),r=Ce(xi(Ce(),s.value.timezone)),o=xe([{month:at(r),year:Xe(r)}]),a=h=>{const g={hours:yr(r),minutes:ao(r),seconds:0};return i.value.enabled?[g[h],g[h]]:g[h]},l=Ki({hours:a("hours"),minutes:a("minutes"),seconds:a("seconds")});un(i,(h,g)=>{h.enabled!==g.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 un(c,(h,g)=>{n&&JSON.stringify(h??{})!==JSON.stringify(g??{})&&n()},{deep:!0}),{calendars:o,time:l,modelValue:c,month:u,year:d,today:r}},k4=(t,e)=>{const{defaultedMultiCalendars:n,defaultedMultiDates:i,defaultedUI:s,defaultedHighlight:r,defaultedTz:o,propDates:a,defaultedRange:l}=jt(e),{isDisabled:c}=yo(e),u=xe(null),d=xe(xi(new Date,o.value.timezone)),h=I=>{!I.current&&e.hideOffsetDates||(u.value=I.value)},g=()=>{u.value=null},p=I=>Array.isArray(t.value)&&l.value.enabled&&t.value[0]&&u.value?I?on(u.value,t.value[0]):Qt(u.value,t.value[0]):!0,m=(I,ee)=>{const ue=()=>t.value?ee?t.value[0]||null:t.value[1]:null,L=t.value&&Array.isArray(t.value)?ue():null;return ct(Ce(I.value),L)},y=I=>{const ee=Array.isArray(t.value)?t.value[0]:null;return I?!Qt(u.value??null,ee):!0},v=(I,ee=!0)=>(l.value.enabled||e.weekPicker)&&Array.isArray(t.value)&&t.value.length===2?e.hideOffsetDates&&!I.current?!1:ct(Ce(I.value),t.value[ee?0:1]):l.value.enabled?m(I,ee)&&y(ee)||ct(I.value,Array.isArray(t.value)?t.value[0]:null)&&p(ee):!1,b=(I,ee)=>{if(Array.isArray(t.value)&&t.value[0]&&t.value.length===1){const ue=ct(I.value,u.value);return ee?on(t.value[0],I.value)&&ue:Qt(t.value[0],I.value)&&ue}return!1},x=I=>!t.value||e.hideOffsetDates&&!I.current?!1:l.value.enabled?e.modelAuto&&Array.isArray(t.value)?ct(I.value,t.value[0]?t.value[0]:d.value):!1:i.value.enabled&&Array.isArray(t.value)?t.value.some(ee=>ct(ee,I.value)):ct(I.value,t.value?t.value:d.value),E=I=>{if(l.value.autoRange||e.weekPicker){if(u.value){if(e.hideOffsetDates&&!I.current)return!1;const ee=ss(u.value,+l.value.autoRange),ue=nr(Ce(u.value),e.weekStart);return e.weekPicker?ct(ue[1],Ce(I.value)):ct(ee,Ce(I.value))}return!1}return!1},w=I=>{if(l.value.autoRange||e.weekPicker){if(u.value){const ee=ss(u.value,+l.value.autoRange);if(e.hideOffsetDates&&!I.current)return!1;const ue=nr(Ce(u.value),e.weekStart);return e.weekPicker?on(I.value,ue[0])&&Qt(I.value,ue[1]):on(I.value,u.value)&&Qt(I.value,ee)}return!1}return!1},S=I=>{if(l.value.autoRange||e.weekPicker){if(u.value){if(e.hideOffsetDates&&!I.current)return!1;const ee=nr(Ce(u.value),e.weekStart);return e.weekPicker?ct(ee[0],I.value):ct(u.value,I.value)}return!1}return!1},T=I=>vf(t.value,u.value,I.value),A=()=>e.modelAuto&&Array.isArray(e.internalModelValue)?!!e.internalModelValue[0]:!1,k=()=>e.modelAuto?qC(e.internalModelValue):!0,P=I=>{if(e.weekPicker)return!1;const ee=l.value.enabled?!v(I)&&!v(I,!1):!0;return!c(I.value)&&!x(I)&&!(!I.current&&e.hideOffsetDates)&&ee},B=I=>l.value.enabled?e.modelAuto?A()&&x(I):!1:x(I),Y=I=>r.value?Q5(I.value,a.value.highlight):!1,ne=I=>{const ee=c(I.value);return ee&&(typeof r.value=="function"?!r.value(I.value,ee):!r.value.options.highlightDisabled)},$=I=>{var ee;return typeof r.value=="function"?r.value(I.value):(ee=r.value.weekdays)==null?void 0:ee.includes(I.value.getDay())},F=I=>(l.value.enabled||e.weekPicker)&&(!(n.value.count>0)||I.current)&&k()&&!(!I.current&&e.hideOffsetDates)&&!x(I)?T(I):!1,D=I=>{const{isRangeStart:ee,isRangeEnd:ue}=H(I),L=l.value.enabled?ee||ue:!1;return{dp__cell_offset:!I.current,dp__pointer:!e.disabled&&!(!I.current&&e.hideOffsetDates)&&!c(I.value),dp__cell_disabled:c(I.value),dp__cell_highlight:!ne(I)&&(Y(I)||$(I))&&!B(I)&&!L&&!S(I)&&!(F(I)&&e.weekPicker)&&!ue,dp__cell_highlight_active:!ne(I)&&(Y(I)||$(I))&&B(I),dp__today:!e.noToday&&ct(I.value,d.value)&&I.current,"dp--past":Qt(I.value,d.value),"dp--future":on(I.value,d.value)}},z=I=>({dp__active_date:B(I),dp__date_hover:P(I)}),X=I=>{if(t.value&&!Array.isArray(t.value)){const ee=nr(t.value,e.weekStart);return{...ie(I),dp__range_start:ct(ee[0],I.value),dp__range_end:ct(ee[1],I.value),dp__range_between_week:on(I.value,ee[0])&&Qt(I.value,ee[1])}}return{...ie(I)}},Z=I=>{if(t.value&&Array.isArray(t.value)){const ee=nr(t.value[0],e.weekStart),ue=t.value[1]?nr(t.value[1],e.weekStart):[];return{...ie(I),dp__range_start:ct(ee[0],I.value)||ct(ue[0],I.value),dp__range_end:ct(ee[1],I.value)||ct(ue[1],I.value),dp__range_between_week:on(I.value,ee[0])&&Qt(I.value,ee[1])||on(I.value,ue[0])&&Qt(I.value,ue[1]),dp__range_between:on(I.value,ee[1])&&Qt(I.value,ue[0])}}return{...ie(I)}},H=I=>{const ee=n.value.count>0?I.current&&v(I)&&k():v(I)&&k(),ue=n.value.count>0?I.current&&v(I,!1)&&k():v(I,!1)&&k();return{isRangeStart:ee,isRangeEnd:ue}},le=I=>{const{isRangeStart:ee,isRangeEnd:ue}=H(I);return{dp__range_start:ee,dp__range_end:ue,dp__range_between:F(I),dp__date_hover:ct(I.value,u.value)&&!ee&&!ue&&!e.weekPicker,dp__date_hover_start:b(I,!0),dp__date_hover_end:b(I,!1)}},ie=I=>({...le(I),dp__cell_auto_range:w(I),dp__cell_auto_range_start:S(I),dp__cell_auto_range_end:E(I)}),te=I=>l.value.enabled?l.value.autoRange?ie(I):e.modelAuto?{...z(I),...le(I)}:e.weekPicker?Z(I):le(I):e.weekPicker?X(I):z(I);return{setHoverDate:h,clearHoverDate:g,getDayClassData:I=>e.hideOffsetDates&&!I.current?{}:{...D(I),...te(I),[e.dayClass?e.dayClass(I.value,e.internalModelValue):""]:!0,...s.value.calendarCell??{}}}},yo=t=>{const{defaultedFilters:e,defaultedRange:n,propDates:i,defaultedMultiDates:s}=jt(t),r=$=>i.value.disabledDates?typeof i.value.disabledDates=="function"?i.value.disabledDates(Ce($)):!!Eh($,i.value.disabledDates):!1,o=$=>i.value.maxDate?t.yearPicker?Xe($)>Xe(i.value.maxDate):on($,i.value.maxDate):!1,a=$=>i.value.minDate?t.yearPicker?Xe($){const F=o($),D=a($),z=r($),X=e.value.months.map(te=>+te).includes(at($)),Z=t.disabledWeekDays.length?t.disabledWeekDays.some(te=>+te===zF($)):!1,H=g($),le=Xe($),ie=le<+t.yearRange[0]||le>+t.yearRange[1];return!(F||D||z||X||ie||Z||H)},c=($,F)=>Qt(...Kr(i.value.minDate,$,F))||ct(...Kr(i.value.minDate,$,F)),u=($,F)=>on(...Kr(i.value.maxDate,$,F))||ct(...Kr(i.value.maxDate,$,F)),d=($,F,D)=>{let z=!1;return i.value.maxDate&&D&&u($,F)&&(z=!0),i.value.minDate&&!D&&c($,F)&&(z=!0),z},h=($,F,D,z)=>{let X=!1;return z&&(i.value.minDate||i.value.maxDate)?i.value.minDate&&i.value.maxDate?X=d($,F,D):(i.value.minDate&&c($,F)||i.value.maxDate&&u($,F))&&(X=!0):X=!0,X},g=$=>Array.isArray(i.value.allowedDates)&&!i.value.allowedDates.length?!0:i.value.allowedDates?!Eh($,i.value.allowedDates):!1,p=$=>!l($),m=$=>n.value.noDisabledRange?!RC({start:$[0],end:$[1]}).some(F=>p(F)):!0,y=$=>{if($){const F=Xe($);return F>=+t.yearRange[0]&&F<=t.yearRange[1]}return!0},v=($,F)=>!!(Array.isArray($)&&$[F]&&(n.value.maxRange||n.value.minRange)&&y($[F])),b=($,F,D=0)=>{if(v(F,D)&&y($)){const z=IC($,F[D]),X=tS(F[D],$),Z=X.length===1?0:X.filter(le=>p(le)).length,H=Math.abs(z)-(n.value.minMaxRawRange?0:Z);if(n.value.minRange&&n.value.maxRange)return H>=+n.value.minRange&&H<=+n.value.maxRange;if(n.value.minRange)return H>=+n.value.minRange;if(n.value.maxRange)return H<=+n.value.maxRange}return!0},x=()=>!t.enableTimePicker||t.monthPicker||t.yearPicker||t.ignoreTimeValidation,E=$=>Array.isArray($)?[$[0]?$g($[0]):null,$[1]?$g($[1]):null]:$g($),w=($,F,D)=>$.find(z=>+z.hours===yr(F)&&z.minutes==="*"?!0:+z.minutes===ao(F)&&+z.hours===yr(F))&&D,S=($,F,D)=>{const[z,X]=$,[Z,H]=F;return!w(z,Z,D)&&!w(X,H,D)&&D},T=($,F)=>{const D=Array.isArray(F)?F:[F];return Array.isArray(t.disabledTimes)?Array.isArray(t.disabledTimes[0])?S(t.disabledTimes,D,$):!D.some(z=>w(t.disabledTimes,z,$)):$},A=($,F)=>{const D=Array.isArray(F)?[na(F[0]),F[1]?na(F[1]):void 0]:na(F),z=!t.disabledTimes(D);return $&&z},k=($,F)=>t.disabledTimes?Array.isArray(t.disabledTimes)?T(F,$):A(F,$):F,P=$=>{let F=!0;if(!$||x())return!0;const D=!i.value.minDate&&!i.value.maxDate?E($):$;return(t.maxTime||i.value.maxDate)&&(F=fb(t.maxTime,i.value.maxDate,"max",An(D),F)),(t.minTime||i.value.minDate)&&(F=fb(t.minTime,i.value.minDate,"min",An(D),F)),k($,F)},B=$=>{if(!t.monthPicker)return!0;let F=!0;const D=Ce(rs($));if(i.value.minDate&&i.value.maxDate){const z=Ce(rs(i.value.minDate)),X=Ce(rs(i.value.maxDate));return on(D,z)&&Qt(D,X)||ct(D,z)||ct(D,X)}if(i.value.minDate){const z=Ce(rs(i.value.minDate));F=on(D,z)||ct(D,z)}if(i.value.maxDate){const z=Ce(rs(i.value.maxDate));F=Qt(D,z)||ct(D,z)}return F},Y=be(()=>$=>!t.enableTimePicker||t.ignoreTimeValidation?!0:P($)),ne=be(()=>$=>t.monthPicker?Array.isArray($)&&(n.value.enabled||s.value.enabled)?!$.filter(F=>!B(F)).length:B($):!0);return{isDisabled:p,validateDate:l,validateMonthYearInRange:h,isDateRangeAllowed:m,checkMinMaxRange:b,isValidTime:P,isTimeValid:Y,isMonthValid:ne}},Ef=()=>{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}},M4=(t,e,n)=>{const i=xe(0),s=Ki({[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(g=>!s[g]).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,...g)=>{var p,m;t.flow[i.value]===d&&n.value&&((m=(p=n.value)[h])==null||m.call(p,...g))},u=(d=0)=>{d&&(i.value+=d),c(Yn.month,"toggleMonthPicker",!0),c(Yn.year,"toggleYearPicker",!0),c(Yn.calendar,"toggleTimePicker",!1,!0),c(Yn.time,"toggleTimePicker",!0,!0);const h=t.flow[i.value];(h===Yn.hours||h===Yn.minutes||h===Yn.seconds)&&c(h,"toggleTimePicker",!0,!0,h)};return{childMount:o,updateFlowStep:a,resetFlow:l,handleFlow:u,flowStep:i}},P4={key:1,class:"dp__input_wrap"},I4=["id","name","inputmode","placeholder","disabled","readonly","required","value","autocomplete","aria-label","aria-disabled","aria-invalid"],D4={key:2,class:"dp--clear-btn"},R4=["aria-label"],L4=hn({compatConfig:{MODE:3},__name:"DatepickerInput",props:{isMenuOpen:{type:Boolean,default:!1},inputValue:{type:String,default:""},...bf},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:g}=jt(s),{checkMinMaxRange:p}=yo(s),m=xe(),y=xe(null),v=xe(!1),b=xe(!1),x=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??{}})),E=()=>{i("set-input-date",null),s.clearable&&s.autoApply&&(i("set-empty-date"),m.value=null)},w=H=>{const le=g();return eB(H,r.value.format??h(),le??nS({},s.enableSeconds),s.inputValue,b.value,s.formatLocale)},S=H=>{const{rangeSeparator:le}=r.value,[ie,te]=H.split(`${le}`);if(ie){const I=w(ie.trim()),ee=te?w(te.trim()):null;if(Tl(I,ee))return;const ue=I&&ee?[I,ee]:[I];p(ee,ue,0)&&(m.value=I?ue:null)}},T=()=>{b.value=!0},A=H=>{if(c.value.enabled)S(H);else if(u.value.enabled){const le=H.split(";");m.value=le.map(ie=>w(ie.trim())).filter(ie=>ie)}else m.value=w(H)},k=H=>{var le;const ie=typeof H=="string"?H:(le=H.target)==null?void 0:le.value;ie!==""?(r.value.openMenu&&!s.isMenuOpen&&i("open"),A(ie),i("set-input-date",m.value)):E(),b.value=!1,i("update:input-value",ie),i("text-input",H,m.value)},P=H=>{r.value.enabled?(A(H.target.value),r.value.enterSubmit&&tm(m.value)&&s.inputValue!==""?(i("set-input-date",m.value,!0),m.value=null):r.value.enterSubmit&&s.inputValue===""&&(m.value=null,i("clear"))):ne(H)},B=(H,le)=>{r.value.enabled&&r.value.tabSubmit&&!le&&A(H.target.value),r.value.tabSubmit&&tm(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))},Y=()=>{v.value=!0,i("focus"),Rn().then(()=>{var H;r.value.enabled&&r.value.selectOnFocus&&((H=y.value)==null||H.select())})},ne=H=>{if(eo(H,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("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)},F=H=>{eo(H,l.value,!0),i("clear")},D=H=>{if(H.key==="Tab"&&B(H),H.key==="Enter"&&P(H),!r.value.enabled){if(H.code==="Tab")return;H.preventDefault()}},z=()=>{var H;(H=y.value)==null||H.focus({preventScroll:!0})},X=H=>{m.value=H},Z=H=>{H.key===Ot.tab&&B(H,!0)};return e({focusInput:z,setParsedDate:X}),(H,le)=>{var ie,te,I;return R(),V("div",{onClick:ne},[H.$slots.trigger&&!H.$slots["dp-input"]&&!J(a).enabled?Ne(H.$slots,"trigger",{key:0}):ce("",!0),!H.$slots.trigger&&(!J(a).enabled||J(a).input)?(R(),V("div",P4,[H.$slots["dp-input"]&&!H.$slots.trigger&&(!J(a).enabled||J(a).enabled&&J(a).input)?Ne(H.$slots,"dp-input",{key:0,value:t.inputValue,isMenuOpen:t.isMenuOpen,onInput:k,onEnter:P,onTab:B,onClear:F,onBlur:$,onKeypress:D,onPaste:T,onFocus:Y,openMenu:()=>H.$emit("open"),closeMenu:()=>H.$emit("close"),toggleMenu:()=>H.$emit("toggle")}):ce("",!0),H.$slots["dp-input"]?ce("",!0):(R(),V("input",{key:1,id:H.uid?`dp-input-${H.uid}`:void 0,ref_key:"inputRef",ref:y,"data-test":"dp-input",name:H.name,class:Pe(x.value),inputmode:J(r).enabled?"text":"none",placeholder:H.placeholder,disabled:H.disabled,readonly:H.readonly,required:H.required,value:t.inputValue,autocomplete:H.autocomplete,"aria-label":(ie=J(o))==null?void 0:ie.input,"aria-disabled":H.disabled||void 0,"aria-invalid":H.state===!1?!0:void 0,onInput:k,onBlur:$,onFocus:Y,onKeypress:D,onKeydown:le[0]||(le[0]=ee=>D(ee)),onPaste:T},null,42,I4)),f("div",{onClick:le[3]||(le[3]=ee=>i("toggle"))},[H.$slots["input-icon"]&&!H.hideInputIcon?(R(),V("span",{key:0,class:"dp__input_icon",onClick:le[1]||(le[1]=ee=>i("toggle"))},[Ne(H.$slots,"input-icon")])):ce("",!0),!H.$slots["input-icon"]&&!H.hideInputIcon&&!H.$slots["dp-input"]?(R(),Se(J(Gl),{key:1,"aria-label":(te=J(o))==null?void 0:te.calendarIcon,class:"dp__input_icon dp__input_icons",onClick:le[2]||(le[2]=ee=>i("toggle"))},null,8,["aria-label"])):ce("",!0)]),H.$slots["clear-icon"]&&t.inputValue&&H.clearable&&!H.disabled&&!H.readonly?(R(),V("span",D4,[Ne(H.$slots,"clear-icon",{clear:F})])):ce("",!0),H.clearable&&!H.$slots["clear-icon"]&&t.inputValue&&!H.disabled&&!H.readonly?(R(),V("button",{key:3,"aria-label":(I=J(o))==null?void 0:I.clearInput,class:"dp--clear-btn",type:"button",onKeydown:le[4]||(le[4]=ee=>J(ii)(ee,()=>F(ee),!0,Z)),onClick:le[5]||(le[5]=ru(ee=>F(ee),["prevent"]))},[N(J(GC),{class:"dp__input_icons","data-test":"clear-icon"})],40,R4)):ce("",!0)])):ce("",!0)])}}}),O4=typeof window<"u"?window:void 0,Wg=()=>{},$4=t=>nf()?(e_(t),!0):!1,N4=(t,e,n,i)=>{if(!t)return Wg;let s=Wg;const r=un(()=>J(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 $4(o),o},F4=(t,e,n,i={})=>{const{window:s=O4,event:r="pointerdown"}=i;return s?N4(s,r,o=>{const a=vn(t),l=vn(e);!a||!l||a===o.target||o.composedPath().includes(a)||o.composedPath().includes(l)||n(o)},{passive:!0}):void 0},B4=hn({compatConfig:{MODE:3},__name:"VueDatePicker",props:{...bf},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=_a(),o=xe(!1),a=tu(s,"modelValue"),l=tu(s,"timezone"),c=xe(null),u=xe(null),d=xe(null),h=xe(!1),g=xe(null),p=xe(!1),m=xe(!1),y=xe(!1),v=xe(!1),{setMenuFocused:b,setShiftKey:x}=aS(),{clearArrowNav:E}=_o(),{validateDate:w,isValidTime:S}=yo(s),{defaultedTransitions:T,defaultedTextInput:A,defaultedInline:k,defaultedConfig:P,defaultedRange:B,defaultedMultiDates:Y}=jt(s),{menuTransition:ne,showTransition:$}=zu(T);En(()=>{ee(s.modelValue),Rn().then(()=>{if(!k.value.enabled){const he=le(g.value);he?.addEventListener("scroll",K),window?.addEventListener("resize",U)}}),k.value.enabled&&(o.value=!0),window?.addEventListener("keyup",re),window?.addEventListener("keydown",j)}),pa(()=>{if(!k.value.enabled){const he=le(g.value);he?.removeEventListener("scroll",K),window?.removeEventListener("resize",U)}window?.removeEventListener("keyup",re),window?.removeEventListener("keydown",j)});const F=ki(r,"all",s.presetDates),D=ki(r,"input");un([a,l],()=>{ee(a.value)},{deep:!0});const{openOnTop:z,menuStyle:X,xCorrect:Z,setMenuPosition:H,getScrollableParent:le,shadowRender:ie}=S4({menuRef:c,menuRefInner:u,inputRef:d,pickerWrapperRef:g,inline:k,emit:i,props:s,slots:r}),{inputValue:te,internalModelValue:I,parseExternalModelValue:ee,emitModelValue:ue,formatInputValue:L,checkBeforeEmit:ae}=CB(i,s,h),de=be(()=>({dp__main:!0,dp__theme_dark:s.dark,dp__theme_light:!s.dark,dp__flex_display:k.value.enabled,"dp--flex-display-collapsed":y.value,dp__flex_display_with_input:k.value.input})),ve=be(()=>s.dark?"dp__theme_dark":"dp__theme_light"),W=be(()=>s.teleport?{to:typeof s.teleport=="boolean"?"body":s.teleport,disabled:!s.teleport||k.value.enabled}:{}),fe=be(()=>({class:"dp__outer_menu_wrap"})),C=be(()=>k.value.enabled&&(s.timePicker||s.monthPicker||s.yearPicker||s.quarterPicker)),O=()=>{var he,Ae;return(Ae=(he=d.value)==null?void 0:he.$el)==null?void 0:Ae.getBoundingClientRect()},K=()=>{o.value&&(P.value.closeOnScroll?ze():H())},U=()=>{var he;o.value&&H();const Ae=(he=u.value)==null?void 0:he.$el.getBoundingClientRect().width;y.value=document.body.offsetWidth<=Ae},re=he=>{he.key==="Tab"&&!k.value.enabled&&!s.teleport&&P.value.tabOutClosesMenu&&(g.value.contains(document.activeElement)||ze()),m.value=he.shiftKey},j=he=>{m.value=he.shiftKey},se=()=>{!s.disabled&&!s.readonly&&(ie(_b,s),H(!1),o.value=!0,o.value&&i("open"),o.value||Be(),ee(s.modelValue))},Q=()=>{var he;te.value="",Be(),(he=d.value)==null||he.setParsedDate(null),i("update:model-value",null),i("update:model-timezone-value",null),i("cleared"),P.value.closeOnClearValue&&ze()},ge=()=>{const he=I.value;return!he||!Array.isArray(he)&&w(he)?!0:Array.isArray(he)?Y.value.enabled||he.length===2&&w(he[0])&&w(he[1])?!0:B.value.partialRange&&!s.timePicker?w(he[0]):!1:!1},_e=()=>{ae()&&ge()?(ue(),ze()):i("invalid-select",I.value)},ye=he=>{ke(),ue(),P.value.closeOnAutoApply&&!he&&ze()},ke=()=>{d.value&&A.value.enabled&&d.value.setParsedDate(I.value)},Me=(he=!1)=>{s.autoApply&&S(I.value)&&ge()&&(B.value.enabled&&Array.isArray(I.value)?(B.value.partialRange||I.value.length===2)&&ye(he):ye(he))},Be=()=>{A.value.enabled||(I.value=null)},ze=()=>{k.value.enabled||(o.value&&(o.value=!1,Z.value=!1,b(!1),x(!1),E(),i("closed"),te.value&&ee(a.value)),Be(),i("blur"))},nt=(he,Ae,Oe=!1)=>{if(!he){I.value=null;return}const Ut=Array.isArray(he)?!he.some(Ri=>!w(Ri)):w(he),gn=S(he);Ut&&gn?(v.value=!0,I.value=he,Ae&&(p.value=Oe,_e(),i("text-submit")),Rn().then(()=>{v.value=!1})):i("invalid-date",he)},Qe=()=>{s.autoApply&&S(I.value)&&ue(),ke()},qt=()=>o.value?ze():se(),Bt=he=>{I.value=he},fn=()=>{A.value.enabled&&(h.value=!0,L()),i("focus")},Kt=()=>{if(A.value.enabled&&(h.value=!1,ee(s.modelValue),p.value)){const he=J5(g.value,m.value);he?.focus()}i("blur")},Ei=he=>{u.value&&u.value.updateMonthYear(0,{month:cb(he.month),year:cb(he.year)})},Xi=he=>{ee(he??s.modelValue)},Zt=(he,Ae)=>{var Oe;(Oe=u.value)==null||Oe.switchView(he,Ae)},oe=he=>P.value.onClickOutside?P.value.onClickOutside(he):ze(),Te=(he=0)=>{var Ae;(Ae=u.value)==null||Ae.handleFlow(he)};return F4(c,d,()=>oe(ge)),e({closeMenu:ze,selectDate:_e,clearValue:Q,openMenu:se,onScroll:K,formatInputValue:L,updateInternalModelValue:Bt,setMonthYear:Ei,parseModel:Xi,switchView:Zt,toggleMenu:qt,handleFlow:Te,dpWrapMenuRef:c}),(he,Ae)=>(R(),V("div",{ref_key:"pickerWrapperRef",ref:g,class:Pe(de.value),"data-datepicker-instance":""},[N(L4,wn({ref_key:"inputRef",ref:d,"input-value":J(te),"onUpdate:inputValue":Ae[0]||(Ae[0]=Oe=>Wt(te)?te.value=Oe:null),"is-menu-open":o.value},he.$props,{onClear:Q,onOpen:se,onSetInputDate:nt,onSetEmptyDate:J(ue),onSelectDate:_e,onToggle:qt,onClose:ze,onFocus:fn,onBlur:Kt,onRealBlur:Ae[1]||(Ae[1]=Oe=>h.value=!1),onTextInput:Ae[2]||(Ae[2]=Oe=>he.$emit("text-input",Oe))}),Un({_:2},[Ze(J(D),(Oe,Ut)=>({name:Oe,fn:De(gn=>[Ne(he.$slots,Oe,In(ni(gn)))])}))]),1040,["input-value","is-menu-open","onSetEmptyDate"]),(R(),Se(ma(he.teleport?gD:"div"),In(ni(W.value)),{default:De(()=>[N($t,{name:J(ne)(J(z)),css:J($)&&!J(k).enabled},{default:De(()=>[o.value?(R(),V("div",wn({key:0,ref_key:"dpWrapMenuRef",ref:c},fe.value,{class:{"dp--menu-wrapper":!J(k).enabled},style:J(k).enabled?void 0:J(X)}),[N(_b,wn({ref_key:"dpMenuRef",ref:u},he.$props,{"internal-model-value":J(I),"onUpdate:internalModelValue":Ae[3]||(Ae[3]=Oe=>Wt(I)?I.value=Oe:null),class:{[ve.value]:!0,"dp--menu-wrapper":he.teleport},"open-on-top":J(z),"no-overlay-focus":C.value,collapse:y.value,"get-input-rect":O,"is-text-input-date":v.value,onClosePicker:ze,onSelectDate:_e,onAutoApply:Me,onTimeUpdate:Qe,onFlowStep:Ae[4]||(Ae[4]=Oe=>he.$emit("flow-step",Oe)),onUpdateMonthYear:Ae[5]||(Ae[5]=Oe=>he.$emit("update-month-year",Oe)),onInvalidSelect:Ae[6]||(Ae[6]=Oe=>he.$emit("invalid-select",J(I))),onAutoApplyInvalid:Ae[7]||(Ae[7]=Oe=>he.$emit("invalid-select",Oe)),onInvalidFixedRange:Ae[8]||(Ae[8]=Oe=>he.$emit("invalid-fixed-range",Oe)),onRecalculatePosition:J(H),onTooltipOpen:Ae[9]||(Ae[9]=Oe=>he.$emit("tooltip-open",Oe)),onTooltipClose:Ae[10]||(Ae[10]=Oe=>he.$emit("tooltip-close",Oe)),onTimePickerOpen:Ae[11]||(Ae[11]=Oe=>he.$emit("time-picker-open",Oe)),onTimePickerClose:Ae[12]||(Ae[12]=Oe=>he.$emit("time-picker-close",Oe)),onAmPmChange:Ae[13]||(Ae[13]=Oe=>he.$emit("am-pm-change",Oe)),onRangeStart:Ae[14]||(Ae[14]=Oe=>he.$emit("range-start",Oe)),onRangeEnd:Ae[15]||(Ae[15]=Oe=>he.$emit("range-end",Oe)),onDateUpdate:Ae[16]||(Ae[16]=Oe=>he.$emit("date-update",Oe)),onInvalidDate:Ae[17]||(Ae[17]=Oe=>he.$emit("invalid-date",Oe)),onOverlayToggle:Ae[18]||(Ae[18]=Oe=>he.$emit("overlay-toggle",Oe))}),Un({_:2},[Ze(J(F),(Oe,Ut)=>({name:Oe,fn:De(gn=>[Ne(he.$slots,Oe,In(ni({...gn})))])}))]),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))}}),Yu=(()=>{const t=B4;return t.install=e=>{e.component("Vue3DatePicker",t)},t})(),V4=Object.freeze(Object.defineProperty({__proto__:null,default:Yu},Symbol.toStringTag,{value:"Module"}));Object.entries(V4).forEach(([t,e])=>{t!=="default"&&(Yu[t]=e)});const z4={name:"newDashboardAPIKey",components:{LocaleText:He,VueDatePicker:Yu},data(){return{newKeyData:{ExpiredAt:bi().add(7,"d").format("YYYY-MM-DD HH:mm:ss"),neverExpire:!1},submitting:!1}},setup(){return{store:tt()}},mounted(){console.log(this.newKeyData.ExpiredAt)},methods:{submitNewAPIKey(){this.submitting=!0,xt("/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(bi(t).format("YYYY-MM-DDTHH:mm:ss")),bi(t).format("YYYY-MM-DDTHH:mm:ss")},parseTime(t){t?this.newKeyData.ExpiredAt=bi(t).format("YYYY-MM-DD HH:mm:ss"):this.newKeyData.ExpiredAt=void 0}}},W4={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)"}},Y4={class:"card m-auto rounded-3 mt-5"},H4={class:"card-header bg-transparent d-flex align-items-center gap-2 border-0 p-4 pb-0"},j4={class:"mb-0"},K4={class:"card-body d-flex gap-2 p-4 flex-column"},U4={class:"text-muted"},G4={class:"d-flex align-items-center gap-2"},X4={class:"form-check"},q4=["disabled"],Z4={class:"form-check-label",for:"neverExpire"},J4={key:0,class:"bi bi-check-lg me-2"};function Q4(t,e,n,i,s,r){const o=Ee("LocaleText"),a=Ee("VueDatePicker");return R(),V("div",W4,[f("div",Y4,[f("div",H4,[f("h6",j4,[N(o,{t:"Create API Key"})]),f("button",{type:"button",class:"btn-close ms-auto",onClick:e[0]||(e[0]=l=>this.$emit("close"))})]),f("div",K4,[f("small",U4,[N(o,{t:"When should this API Key expire?"})]),f("div",G4,[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"])]),f("div",X4,[$e(f("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,q4),[[Kn,this.newKeyData.neverExpire]]),f("label",Z4,[N(o,{t:"Never Expire"}),e[3]||(e[3]=Ue(" (")),e[4]||(e[4]=f("i",{class:"bi bi-emoji-grimace-fill me-2"},null,-1)),N(o,{t:"Don't think that's a good idea"}),e[5]||(e[5]=Ue(") "))])]),f("button",{class:Pe(["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):(R(),V("i",J4)),this.submitting?(R(),Se(o,{key:1,t:"Creating..."})):(R(),Se(o,{key:2,t:"Create"}))],2)])])])}const eV=je(z4,[["render",Q4]]),tV={name:"dashboardAPIKey",components:{LocaleText:He},props:{apiKey:Object},setup(){return{store:tt()}},data(){return{confirmDelete:!1}},methods:{deleteAPIKey(){xt("/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")})}}},nV={class:"card rounded-3 shadow-sm"},iV={key:0,class:"card-body d-flex gap-3 align-items-center apiKey-card-body"},sV={class:"d-flex align-items-center gap-2"},rV={class:"text-muted"},oV={style:{"word-break":"break-all"}},aV={class:"d-flex align-items-center gap-2 ms-auto"},lV={class:"text-muted"},cV={key:0,class:"card-body d-flex gap-3 align-items-center justify-content-end"};function uV(t,e,n,i,s,r){const o=Ee("LocaleText");return R(),V("div",nV,[this.confirmDelete?(R(),V(Le,{key:1},[this.store.getActiveCrossServer()?ce("",!0):(R(),V("div",cV,[N(o,{t:"Are you sure to delete this API key?"}),f("a",{role:"button",class:"btn btn-sm bg-success-subtle text-success-emphasis rounded-3",onClick:e[1]||(e[1]=a=>this.deleteAPIKey())},e[4]||(e[4]=[f("i",{class:"bi bi-check-lg"},null,-1)])),f("a",{role:"button",class:"btn btn-sm bg-secondary-subtle text-secondary-emphasis rounded-3",onClick:e[2]||(e[2]=a=>this.confirmDelete=!1)},e[5]||(e[5]=[f("i",{class:"bi bi-x-lg"},null,-1)]))]))],64)):(R(),V("div",iV,[f("div",sV,[f("small",rV,[N(o,{t:"Key"})]),f("span",oV,we(this.apiKey.Key),1)]),f("div",aV,[f("small",lV,[N(o,{t:"Expire At"})]),this.apiKey.ExpiredAt?ce("",!0):(R(),Se(o,{key:0,t:"Never Expire"})),f("span",null,we(this.apiKey.ExpiredAt),1)]),this.store.getActiveCrossServer()?ce("",!0):(R(),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)},e[3]||(e[3]=[f("i",{class:"bi bi-trash-fill"},null,-1)])))]))])}const dV=je(tV,[["render",uV],["__scopeId","data-v-a76253c8"]]),hV={name:"dashboardAPIKeys",components:{LocaleText:He,DashboardAPIKey:dV,NewDashboardAPIKey:eV},setup(){return{store:tt()}},data(){return{value:this.store.Configuration.Server.dashboard_api_key,apiKeys:[],newDashboardAPIKey:!1}},methods:{async toggleDashboardAPIKeys(){await xt("/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?Yt("/api/getDashboardAPIKeys",{},e=>{console.log(e),e.status?this.apiKeys=e.data:(this.apiKeys=[],this.store.newMessage("Server",e.message,"danger"))}):this.apiKeys=[]}}}},fV={class:"card mb-4 shadow rounded-3"},gV={class:"card-header d-flex"},pV={key:0,class:"form-check form-switch ms-auto"},mV={class:"form-check-label",for:"allowAPIKeysSwitch"},_V={key:0,class:"card-body position-relative d-flex flex-column gap-2"},yV={key:1,class:"card",style:{height:"300px"}},vV={class:"card-body d-flex text-muted"},bV={class:"m-auto"},wV={key:2,class:"d-flex flex-column gap-2 position-relative",style:{"min-height":"300px"}};function xV(t,e,n,i,s,r){const o=Ee("LocaleText"),a=Ee("DashboardAPIKey"),l=Ee("NewDashboardAPIKey");return R(),V("div",fV,[f("div",gV,[N(o,{t:"API Keys"}),this.store.getActiveCrossServer()?ce("",!0):(R(),V("div",pV,[$e(f("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),[[Kn,this.value]]),f("label",mV,[this.value?(R(),Se(o,{key:0,t:"Enabled"})):(R(),Se(o,{key:1,t:"Disabled"}))])]))]),this.value?(R(),V("div",_V,[this.store.getActiveCrossServer()?ce("",!0):(R(),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)},[e[6]||(e[6]=f("i",{class:"bi bi-plus-circle-fill me-2"},null,-1)),N(o,{t:"API Key"})])),this.apiKeys.length===0?(R(),V("div",yV,[f("div",vV,[f("span",bV,[N(o,{t:"No WGDashboard API Key"})])])])):(R(),V("div",wV,[N(Ul,{name:"apiKey"},{default:De(()=>[(R(!0),V(Le,null,Ze(this.apiKeys,c=>(R(),Se(a,{apiKey:c,key:c.Key,onDeleted:e[3]||(e[3]=u=>this.apiKeys=u)},null,8,["apiKey"]))),128))]),_:1})])),N($t,{name:"zoomReversed"},{default:De(()=>[this.newDashboardAPIKey?(R(),Se(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 EV=je(hV,[["render",xV],["__scopeId","data-v-167c06a6"]]),CV={name:"accountSettingsMFA",components:{LocaleText:He},setup(){const t=tt(),e=`input_${Bs()}`;return{store:t,uuid:e}},data(){return{status:!1}},mounted(){this.status=this.store.Configuration.Account.enable_totp},methods:{async resetMFA(){await xt("/api/updateDashboardConfigurationItem",{section:"Account",key:"totp_verified",value:"false"},async t=>{await xt("/api/updateDashboardConfigurationItem",{section:"Account",key:"enable_totp",value:"false"},e=>{e.status&&this.$router.push("/2FASetup")})})}}},SV={class:"d-flex align-items-center"},TV={class:"form-check form-switch ms-3"};function AV(t,e,n,i,s,r){const o=Ee("LocaleText");return R(),V("div",null,[f("div",SV,[f("strong",null,[N(o,{t:"Multi-Factor Authentication (MFA)"})]),f("div",TV,[$e(f("input",{class:"form-check-input",type:"checkbox","onUpdate:modelValue":e[0]||(e[0]=a=>this.status=a),role:"switch",id:"allowMFAKeysSwitch"},null,512),[[Kn,this.status]])]),this.status?(R(),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())},[e[2]||(e[2]=f("i",{class:"bi bi-shield-lock-fill me-2"},null,-1)),this.store.Configuration.Account.totp_verified?(R(),Se(o,{key:0,t:"Reset"})):(R(),Se(o,{key:1,t:"Setup"})),e[3]||(e[3]=Ue(" MFA "))])):ce("",!0)])])}const kV=je(CV,[["render",AV]]),MV={name:"dashboardLanguage",components:{LocaleText:He},setup(){return{store:tt()}},data(){return{languages:void 0}},mounted(){Yt("/api/locale/available",{},t=>{this.languages=t.data})},methods:{changeLanguage(t){xt("/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)}}},PV={class:"card mb-4 shadow rounded-3"},IV={class:"card-header"},DV={class:"card-body d-flex gap-2"},RV={class:"dropdown w-100"},LV=["disabled"],OV={key:1},$V={class:"dropdown-menu rounded-3 shadow"},NV=["onClick"],FV={class:"me-auto mb-0"},BV={class:"d-block",style:{"font-size":"0.8rem"}},VV={key:0,class:"bi bi-check text-primary fs-5"};function zV(t,e,n,i,s,r){const o=Ee("LocaleText");return R(),V("div",PV,[f("p",IV,[N(o,{t:"Dashboard Language"})]),f("div",DV,[f("div",RV,[f("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?(R(),V("span",OV,we(r.currentLanguage?.lang_name_localized),1)):(R(),Se(o,{key:0,t:"Loading..."}))],8,LV),f("ul",$V,[(R(!0),V(Le,null,Ze(this.languages,a=>(R(),V("li",null,[f("a",{class:"dropdown-item d-flex align-items-center",role:"button",onClick:l=>this.changeLanguage(a.lang_id)},[f("p",FV,[Ue(we(a.lang_name_localized)+" ",1),f("small",BV,we(a.lang_name),1)]),r.currentLanguage?.lang_id===a.lang_id?(R(),V("i",VV)):ce("",!0)],8,NV)]))),256))])])])])}const WV=je(MV,[["render",zV],["__scopeId","data-v-a8b77ad0"]]),YV={name:"dashboardIPPortInput",components:{LocaleText:He},setup(){return{store:tt()}},data(){return{ipAddress:"",port:0,invalidFeedback:"",showInvalidFeedback:!1,isValid:!1,timeout:void 0,changed:!1,updating:!1}},mounted(){this.ipAddress=this.store.Configuration.Server.app_ip,this.port=this.store.Configuration.Server.app_port},methods:{async useValidation(t,e,n){this.changed&&(this.updating=!0,await xt("/api/updateDashboardConfigurationItem",{section:"Server",key:e,value:n},i=>{i.status?(t.target.classList.add("is-valid"),this.showInvalidFeedback=!1,this.store.Configuration.Server[e]=n,clearTimeout(this.timeout),this.timeout=setTimeout(()=>{t.target.classList.remove("is-valid")},5e3)):(this.isValid=!1,this.showInvalidFeedback=!0,this.invalidFeedback=i.message),this.changed=!1,this.updating=!1}))}}},HV={class:"card mb-4 shadow rounded-3"},jV={class:"card-header"},KV={class:"card-body"},UV={class:"row gx-3"},GV={class:"col-sm"},XV={class:"form-group mb-2"},qV={for:"input_dashboard_ip",class:"text-muted mb-1"},ZV=["disabled"],JV={class:"invalid-feedback"},QV={class:"col-sm"},e6={class:"form-group mb-2"},t6={for:"input_dashboard_ip",class:"text-muted mb-1"},n6=["disabled"],i6={class:"invalid-feedback"},s6={class:"px-2 py-1 text-warning-emphasis bg-warning-subtle border border-warning-subtle rounded-2 d-inline-block mt-1 mb-2"};function r6(t,e,n,i,s,r){const o=Ee("LocaleText");return R(),V("div",HV,[f("p",jV,[N(o,{t:"Dashboard IP Address & Listen Port"})]),f("div",KV,[f("div",UV,[f("div",GV,[f("div",XV,[f("label",qV,[f("strong",null,[f("small",null,[N(o,{t:"IP Address / Hostname"})])])]),$e(f("input",{type:"text",class:Pe(["form-control",{"is-invalid":s.showInvalidFeedback,"is-valid":s.isValid}]),id:"input_dashboard_ip","onUpdate:modelValue":e[0]||(e[0]=a=>this.ipAddress=a),onKeydown:e[1]||(e[1]=a=>this.changed=!0),onBlur:e[2]||(e[2]=a=>r.useValidation(a,"app_ip",this.ipAddress)),disabled:this.updating},null,42,ZV),[[We,this.ipAddress]]),f("div",JV,we(this.invalidFeedback),1)])]),f("div",QV,[f("div",e6,[f("label",t6,[f("strong",null,[f("small",null,[N(o,{t:"Listen Port"})])])]),$e(f("input",{type:"number",class:Pe(["form-control",{"is-invalid":s.showInvalidFeedback,"is-valid":s.isValid}]),id:"input_dashboard_ip","onUpdate:modelValue":e[3]||(e[3]=a=>this.port=a),onKeydown:e[4]||(e[4]=a=>this.changed=!0),onBlur:e[5]||(e[5]=a=>r.useValidation(a,"app_port",this.port)),disabled:this.updating},null,42,n6),[[We,this.port]]),f("div",i6,we(this.invalidFeedback),1)])])]),f("div",s6,[f("small",null,[e[6]||(e[6]=f("i",{class:"bi bi-exclamation-triangle-fill me-2"},null,-1)),N(o,{t:"Manual restart of WGDashboard is needed to apply changes on IP Address and Listen Port"})])])])])}const o6=je(YV,[["render",r6]]),a6={name:"settings",methods:{ipV46RegexCheck:ON},components:{DashboardIPPortInput:o6,DashboardLanguage:WV,LocaleText:He,AccountSettingsMFA:kV,DashboardAPIKeys:EV,DashboardSettingsInputIPAddressAndPort:N3,DashboardTheme:T3,DashboardSettingsInputWireguardConfigurationPath:b3,AccountSettingsInputPassword:a3,AccountSettingsInputUsername:WN,PeersDefaultSettingsInput:LN},setup(){return{dashboardConfigurationStore:tt()}}},l6={class:"mt-md-5 mt-3"},c6={class:"container-md"},u6={class:"mb-3 text-body"},d6={class:"card mb-4 shadow rounded-3"},h6={class:"card-header"},f6={class:"card-body"},g6={class:"card mb-4 shadow rounded-3"},p6={class:"card-header"},m6={class:"card-body"},_6={class:"row gx-4"},y6={class:"col-sm"},v6={class:"col-sm"},b6={class:"card mb-4 shadow rounded-3"},w6={class:"card-header"},x6={class:"card-body d-flex gap-4 flex-column"},E6={key:0,class:"m-0"};function C6(t,e,n,i,s,r){const o=Ee("LocaleText"),a=Ee("PeersDefaultSettingsInput"),l=Ee("DashboardSettingsInputWireguardConfigurationPath"),c=Ee("DashboardTheme"),u=Ee("DashboardLanguage"),d=Ee("DashboardIPPortInput"),h=Ee("AccountSettingsInputUsername"),g=Ee("AccountSettingsInputPassword"),p=Ee("AccountSettingsMFA"),m=Ee("DashboardAPIKeys");return R(),V("div",l6,[f("div",c6,[f("h3",u6,[N(o,{t:"Settings"})]),f("div",d6,[f("p",h6,[N(o,{t:"Peers Default Settings"})]),f("div",f6,[N(a,{targetData:"peer_global_dns",title:"DNS"}),N(a,{targetData:"peer_endpoint_allowed_ip",title:"Endpoint Allowed IPs"}),N(a,{targetData:"peer_mtu",title:"MTU"}),N(a,{targetData:"peer_keep_alive",title:"Persistent Keepalive"}),N(a,{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."})])]),f("div",g6,[f("p",p6,[N(o,{t:"WireGuard Configurations Settings"})]),f("div",m6,[N(l,{targetData:"wg_conf_path",title:"Configurations Directory",warning:!0,"warning-text":"Remember to remove / at the end of your path. e.g /etc/wireguard"})])]),e[1]||(e[1]=f("hr",{class:"mb-4"},null,-1)),f("div",_6,[f("div",y6,[N(c)]),f("div",v6,[N(u)])]),N(d),f("div",b6,[f("p",w6,[N(o,{t:"WGDashboard Account Settings"})]),f("div",x6,[N(h,{targetData:"username",title:"Username"}),e[0]||(e[0]=f("hr",{class:"m-0"},null,-1)),N(g,{targetData:"password"}),this.dashboardConfigurationStore.getActiveCrossServer()?ce("",!0):(R(),V("hr",E6)),this.dashboardConfigurationStore.getActiveCrossServer()?ce("",!0):(R(),Se(p,{key:1}))])]),N(m)])])}const S6=je(a6,[["render",C6]]),T6={name:"setup",components:{LocaleText:He},setup(){return{store:tt()}},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,xt("/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})}}},A6=["data-bs-theme"],k6={class:"m-auto text-body",style:{width:"500px"}},M6={class:"dashboardLogo display-4"},P6={class:"mb-5"},I6={key:0,class:"alert alert-danger"},D6={class:"d-flex flex-column gap-3"},R6={id:"createAccount",class:"d-flex flex-column gap-2"},L6={class:"form-group text-body"},O6={for:"username",class:"mb-1 text-muted"},$6={class:"form-group text-body"},N6={for:"password",class:"mb-1 text-muted"},F6={class:"form-group text-body"},B6={for:"confirmPassword",class:"mb-1 text-muted"},V6=["disabled"],z6={key:0,class:"d-flex align-items-center w-100"},W6={key:1,class:"d-flex align-items-center w-100"};function Y6(t,e,n,i,s,r){const o=Ee("LocaleText");return R(),V("div",{class:"container-fluid login-container-fluid d-flex main pt-5 overflow-scroll","data-bs-theme":this.store.Configuration.Server.dashboard_theme},[f("div",k6,[f("span",M6,[N(o,{t:"Nice to meet you!"})]),f("p",P6,[N(o,{t:"Please fill in the following fields to finish setup"}),e[4]||(e[4]=Ue(" 😊"))]),f("div",null,[f("h3",null,[N(o,{t:"Create an account"})]),this.errorMessage?(R(),V("div",I6,we(this.errorMessage),1)):ce("",!0),f("div",D6,[f("form",R6,[f("div",L6,[f("label",O6,[f("small",null,[N(o,{t:"Enter an username you like"})])]),$e(f("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]])]),f("div",$6,[f("label",N6,[f("small",null,[N(o,{t:"Enter a password"}),f("code",null,[N(o,{t:"(At least 8 characters and make sure is strong enough!)"})])])]),$e(f("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]])]),f("div",F6,[f("label",B6,[f("small",null,[N(o,{t:"Confirm password"})])]),$e(f("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]])])]),f("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?(R(),V("span",z6,[N(o,{t:"Next"}),e[5]||(e[5]=f("i",{class:"bi bi-chevron-right ms-auto"},null,-1))])):(R(),V("span",W6,[N(o,{t:"Saving..."}),e[6]||(e[6]=f("span",{class:"spinner-border ms-auto spinner-border-sm",role:"status"},[f("span",{class:"visually-hidden"},"Loading...")],-1))]))],8,V6)])])])],8,A6)}const H6=je(T6,[["render",Y6]]);function B_(t){return t.includes(":")?6:t.includes(".")?4:0}function j6(t){const e=B_(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 Yg={4:32,6:128},K6=t=>t.includes("/")?B_(t):0;function U6(t){const e=K6(t),n=Object.create(null);if(e)n.cidr=t,n.version=e;else{const d=B_(t);if(d)n.cidr=`${t}/${Yg[d]}`,n.version=d;else throw new Error(`Network is not a CIDR or IP: ${t}`)}const[i,s]=n.cidr.split("/");if(!/^[0-9]+$/.test(s))throw new Error(`Network is not a CIDR or IP: ${t}`);n.prefix=s,n.single=s===String(Yg[n.version]);const{number:r,version:o}=j6(i),a=Yg[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(w){var S=new Float64Array(16);if(w)for(var T=0;T>16&1),A[P-1]&=65535;A[15]=k[15]-32767-(A[14]>>16&1),T=A[15]>>16&1,A[14]&=65535,i(k,A,1-T)}for(var P=0;P<16;++P)w[2*P]=k[P]&255,w[2*P+1]=k[P]>>8}function n(w){for(var S=0;S<16;++S)w[(S+1)%16]+=(S<15?1:38)*Math.floor(w[S]/65536),w[S]&=65535}function i(w,S,T){for(var A,k=~(T-1),P=0;P<16;++P)A=k&(w[P]^S[P]),w[P]^=A,S[P]^=A}function s(w,S,T){for(var A=0;A<16;++A)w[A]=S[A]+T[A]|0}function r(w,S,T){for(var A=0;A<16;++A)w[A]=S[A]-T[A]|0}function o(w,S,T){for(var A=new Float64Array(31),k=0;k<16;++k)for(var P=0;P<16;++P)A[k+P]+=S[k]*T[P];for(var k=0;k<15;++k)A[k]+=38*A[k+16];for(var k=0;k<16;++k)w[k]=A[k];n(w),n(w)}function a(w,S){for(var T=t(),A=0;A<16;++A)T[A]=S[A];for(var A=253;A>=0;--A)o(T,T,T),A!==2&&A!==4&&o(T,T,S);for(var A=0;A<16;++A)w[A]=T[A]}function l(w){w[31]=w[31]&127|64,w[0]&=248}function c(w){for(var S,T=new Uint8Array(32),A=t([1]),k=t([9]),P=t(),B=t([1]),Y=t(),ne=t(),$=t([56129,1]),F=t([9]),D=0;D<32;++D)T[D]=w[D];l(T);for(var D=254;D>=0;--D)S=T[D>>>3]>>>(D&7)&1,i(A,k,S),i(P,B,S),s(Y,A,P),r(A,A,P),s(P,k,B),r(k,k,B),o(B,Y,Y),o(ne,A,A),o(A,P,A),o(P,k,Y),s(Y,A,P),r(A,A,P),o(k,A,A),r(P,B,ne),o(A,P,$),s(A,A,B),o(P,P,A),o(A,B,ne),o(B,k,F),o(k,Y,Y),i(A,k,S),i(P,B,S);return a(P,P),o(A,A,P),e(T,A),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,S){for(var T=Uint8Array.from([S[0]>>2&63,(S[0]<<4|S[1]>>4)&63,(S[1]<<2|S[2]>>6)&63,S[2]&63]),A=0;A<4;++A)w[A]=T[A]+65+(25-T[A]>>8&6)-(51-T[A]>>8&75)-(61-T[A]>>8&15)+(62-T[A]>>8&3)}function f(w){var S,T=new Uint8Array(44);for(S=0;S<32/3;++S)h(T.subarray(S*4),w.subarray(S*3));return h(T.subarray(S*4),Uint8Array.from([w[S*3+0],w[S*3+1],0])),T[43]=61,String.fromCharCode.apply(null,T)}function p(w){let S=window.atob(w),T=S.length,A=new Uint8Array(T);for(let P=0;P>>8&255,S>>>16&255,S>>>24&255)}function y(w,S){w.push(S&255,S>>>8&255)}function v(w,S){for(var T=0;T>>1:S>>>1;x.table[T]=S}}for(var k=-1,P=0;P>>8^x.table[(k^w[P])&255];return(k^-1)>>>0}function E(w){for(var S=[],T=[],A=0,k=0;k{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=U6(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")}}}},X6={class:"mt-5"},q6={class:"container mb-4"},Z6={class:"mb-4 d-flex align-items-center gap-4"},J6={class:"mb-0 text-body"},Q6={class:"card rounded-3 shadow"},ez={class:"card-header"},tz={class:"card-body"},nz=["disabled"],iz={class:"invalid-feedback"},sz={key:0},rz={key:1},oz={class:"mb-0"},az={class:"card rounded-3 shadow"},lz={class:"card-header"},cz={class:"card-body",style:{"font-family":"var(--bs-font-monospace)"}},uz={class:"mb-2"},dz={class:"text-muted fw-bold mb-1"},hz={class:"input-group"},fz=["disabled"],gz={class:"text-muted fw-bold mb-1"},pz={class:"card rounded-3 shadow"},mz={class:"card-header"},_z={class:"card-body"},yz=["disabled"],vz={class:"invalid-feedback"},bz={key:0},wz={key:1},xz={class:"card rounded-3 shadow"},Ez={class:"card-header d-flex align-items-center"},Cz={class:"badge rounded-pill text-bg-success ms-auto"},Sz={class:"card-body"},Tz=["disabled"],Az={class:"invalid-feedback"},kz={key:0},Mz={key:1},Pz={class:"accordion",id:"newConfigurationOptionalAccordion"},Iz={class:"accordion-item"},Dz={class:"accordion-header"},Rz={class:"accordion-button collapsed",type:"button","data-bs-toggle":"collapse","data-bs-target":"#newConfigurationOptionalAccordionCollapse"},Lz={id:"newConfigurationOptionalAccordionCollapse",class:"accordion-collapse collapse","data-bs-parent":"#newConfigurationOptionalAccordion"},Oz={class:"accordion-body d-flex flex-column gap-3"},$z={class:"card rounded-3"},Nz={class:"card-body"},Fz={class:"card rounded-3"},Bz={class:"card-body"},Vz={class:"card rounded-3"},zz={class:"card-body"},Wz={class:"card rounded-3"},Yz={class:"card-body"},Hz=["disabled"],jz={key:0,class:"d-flex w-100"},Kz={key:1,class:"d-flex w-100"},Uz={key:2,class:"d-flex w-100 align-items-center"};function Gz(t,e,n,i,s,r){const o=Ee("LocaleText"),a=Ee("RouterLink");return R(),V("div",X6,[g("div",q6,[g("div",Z6,[N(a,{to:"/",class:"text-decoration-none"},{default:De(()=>[g("h3",J6,[e[11]||(e[11]=g("i",{class:"bi bi-chevron-left me-4"},null,-1)),N(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",Q6,[g("div",ez,[N(o,{t:"Configuration Name"})]),g("div",tz,[$e(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,nz),[[We,this.newConfiguration.ConfigurationName]]),g("div",iz,[this.error?(R(),V("div",sz,we(this.errorMessage),1)):(R(),V("div",rz,[N(o,{t:"Configuration name is invalid. Possible reasons:"}),g("ul",oz,[g("li",null,[N(o,{t:"Configuration name already exist."})]),g("li",null,[N(o,{t:"Configuration name can only contain 15 lower/uppercase alphabet, numbers, underscore, equal sign, plus sign, period and hyphen."})])])]))])])]),g("div",az,[g("div",lz,[N(o,{t:"Private Key"}),e[12]||(e[12]=Ue(" & ")),N(o,{t:"Public Key"})]),g("div",cz,[g("div",uz,[g("label",dz,[g("small",null,[N(o,{t:"Private Key"})])]),g("div",hz,[$e(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,fz),[[We,this.newConfiguration.PrivateKey]]),g("button",{class:"btn btn-outline-primary",type:"button",title:"Regenerate Private Key",onClick:e[2]||(e[2]=l=>r.wireguardGenerateKeypair())},e[13]||(e[13]=[g("i",{class:"bi bi-arrow-repeat"},null,-1)]))])]),g("div",null,[g("label",gz,[g("small",null,[N(o,{t:"Public Key"})])]),$e(g("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]])])])]),g("div",pz,[g("div",mz,[N(o,{t:"Listen Port"})]),g("div",_z,[$e(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,yz),[[We,this.newConfiguration.ListenPort]]),g("div",vz,[this.error?(R(),V("div",bz,we(this.errorMessage),1)):(R(),V("div",wz,[N(o,{t:"Invalid port"})]))])])]),g("div",xz,[g("div",Ez,[N(o,{t:"IP Address/CIDR"}),g("span",Cz,we(s.numberOfAvailableIPs)+" Available IPs",1)]),g("div",Sz,[$e(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,Tz),[[We,this.newConfiguration.Address]]),g("div",Az,[this.error?(R(),V("div",kz,we(this.errorMessage),1)):(R(),V("div",Mz," IP Address/CIDR is invalid "))])])]),e[22]||(e[22]=g("hr",null,null,-1)),g("div",Pz,[g("div",Iz,[g("h2",Dz,[g("button",Rz,[N(o,{t:"Optional Settings"})])]),g("div",Lz,[g("div",Oz,[g("div",$z,[e[14]||(e[14]=g("div",{class:"card-header"},"PreUp",-1)),g("div",Nz,[$e(g("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]])])]),g("div",Fz,[e[15]||(e[15]=g("div",{class:"card-header"},"PreDown",-1)),g("div",Bz,[$e(g("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]])])]),g("div",Vz,[e[16]||(e[16]=g("div",{class:"card-header"},"PostUp",-1)),g("div",zz,[$e(g("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]])])]),g("div",Wz,[e[17]||(e[17]=g("div",{class:"card-header"},"PostDown",-1)),g("div",Yz,[$e(g("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]])])])])])])]),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?(R(),V("span",jz,[N(o,{t:"Success"}),e[18]||(e[18]=Ue("! ")),e[19]||(e[19]=g("i",{class:"bi bi-check-circle-fill ms-2"},null,-1))])):this.loading?(R(),V("span",Uz,[N(o,{t:"Saving..."}),e[21]||(e[21]=g("span",{class:"ms-2 spinner-border spinner-border-sm",role:"status"},null,-1))])):(R(),V("span",Kz,[N(o,{t:"Save Configuration"}),e[20]||(e[20]=g("i",{class:"bi bi-save-fill ms-2"},null,-1))]))],8,Hz)],32)])])}const Xz=je(G6,[["render",Gz]]),qz={name:"configuration"},Zz={class:"mt-md-5 mt-3 text-body"};function Jz(t,e,n,i,s,r){const o=Ee("RouterView");return R(),V("div",Zz,[N(o,null,{default:De(({Component:a,route:l})=>[N($t,{name:"fade2",mode:"out-in"},{default:De(()=>[(R(),Se(p_,null,{default:De(()=>[(R(),Se(ma(a),{key:l.path}))]),_:2},1024))]),_:2},1024)]),_:1})])}const Qz=je(qz,[["render",Jz]]),eW={name:"peerSearch",components:{LocaleText:He},setup(){const t=tt(),e=qn();return{store:t,wireguardConfigurationStore:e}},props:{configuration:Object},data(){return{sort:{status:At("Status"),name:At("Name"),allowed_ip:At("Allowed IPs"),restricted:At("Restricted")},interval:{5e3:At("5 Seconds"),1e4:At("10 Seconds"),3e4:At("30 Seconds"),6e4:At("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){xt("/api/updateDashboardConfigurationItem",{section:"Server",key:"dashboard_sort",value:t},e=>{e.status&&this.store.getConfiguration()})},updateRefreshInterval(t){xt("/api/updateDashboardConfigurationItem",{section:"Server",key:"dashboard_refresh_interval",value:t},e=>{e.status&&this.store.getConfiguration()})},downloadAllPeer(){Yt(`/api/downloadAllPeers/${this.configuration.Name}`,{},t=>{console.log(t),window.wireguard.generateZipFiles(t,this.configuration.Name)})}},computed:{searchBarPlaceholder(){return At("Search Peers...")}}},tW={class:"mb-3"},nW={class:"d-flex gap-2 z-3 peerSearchContainer"},iW={class:"mt-3 mt-md-0 flex-grow-1"},sW=["placeholder"],rW={key:0,class:"peerSettingContainer w-100 h-100 position-absolute top-0 start-0 overflow-y-scroll displayModal"},oW={class:"container-md d-flex h-100 w-100"},aW={class:"m-auto modal-dialog-centered dashboardModal"},lW={class:"card rounded-3 shadow w-100"},cW={class:"card-header bg-transparent d-flex align-items-center gap-2 border-0 p-4 pb-2"},uW={class:"mb-0 fw-normal"},dW={class:"card-body px-4 pb-4 d-flex gap-3 flex-column"},hW={class:"text-muted fw-bold mb-2"},fW={class:"list-group"},gW=["onClick"],pW={class:"me-auto"},mW={key:0,class:"bi bi-check text-primary"},_W={class:"text-muted fw-bold mb-2"},yW={class:"list-group"},vW=["onClick"],bW={class:"me-auto"},wW={key:0,class:"bi bi-check text-primary"},xW={key:0,class:"peerSettingContainer w-100 h-100 position-absolute top-0 start-0 overflow-y-scroll displayModal"},EW={class:"container-md d-flex h-100 w-100"},CW={class:"m-auto modal-dialog-centered dashboardModal"},SW={class:"card rounded-3 shadow w-100"},TW={class:"card-header bg-transparent d-flex align-items-center gap-2 border-0 p-4 pb-0"},AW={class:"card-body px-4 pb-4 d-flex gap-3 flex-column pt-0"},kW={class:"text-muted fw-bold mb-2"},MW={class:"list-group"};function PW(t,e,n,i,s,r){const o=Ee("LocaleText"),a=Ee("RouterLink");return R(),V("div",tW,[g("div",nW,[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:De(()=>[e[10]||(e[10]=g("i",{class:"bi bi-plus-lg me-2"},null,-1)),N(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())},[e[11]||(e[11]=g("i",{class:"bi bi-download me-2"},null,-1)),N(o,{t:"Download All"})]),g("div",iW,[$e(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,sW),[[We,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"},[e[12]||(e[12]=g("i",{class:"bi bi-filter-circle me-2"},null,-1)),N(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.$emit("editConfiguration")),type:"button","aria-expanded":"false"},e[13]||(e[13]=[g("i",{class:"bi bi-gear-fill"},null,-1)])),g("button",{class:"btn text-secondary-emphasis bg-secondary-subtle rounded-3 border-1 border-secondary-subtle shadow-sm",onClick:e[5]||(e[5]=l=>this.showMoreSettings=!0),type:"button","aria-expanded":"false"},e[14]||(e[14]=[g("i",{class:"bi bi-three-dots"},null,-1)])),N($t,{name:"zoom"},{default:De(()=>[this.showDisplaySettings?(R(),V("div",rW,[g("div",oW,[g("div",aW,[g("div",lW,[g("div",cW,[g("h4",uW,[N(o,{t:"Display"})]),g("button",{type:"button",class:"btn-close ms-auto",onClick:e[6]||(e[6]=l=>this.showDisplaySettings=!1)})]),g("div",dW,[g("div",null,[g("p",hW,[g("small",null,[N(o,{t:"Sort by"})])]),g("div",fW,[(R(!0),V(Oe,null,Ze(this.sort,(l,c)=>(R(),V("a",{class:"list-group-item list-group-item-action d-flex",role:"button",onClick:u=>this.updateSort(c)},[g("span",pW,we(l),1),i.store.Configuration.Server.dashboard_sort===c?(R(),V("i",mW)):ce("",!0)],8,gW))),256))])]),g("div",null,[g("p",_W,[g("small",null,[N(o,{t:"Refresh Interval"})])]),g("div",yW,[(R(!0),V(Oe,null,Ze(this.interval,(l,c)=>(R(),V("a",{class:"list-group-item list-group-item-action d-flex",role:"button",onClick:u=>this.updateRefreshInterval(c)},[g("span",bW,we(l),1),i.store.Configuration.Server.dashboard_refresh_interval===c?(R(),V("i",wW)):ce("",!0)],8,vW))),256))])])])])])])])):ce("",!0)]),_:1}),N($t,{name:"zoom"},{default:De(()=>[this.showMoreSettings?(R(),V("div",xW,[g("div",EW,[g("div",CW,[g("div",SW,[g("div",TW,[g("button",{type:"button",class:"btn-close ms-auto",onClick:e[7]||(e[7]=l=>this.showMoreSettings=!1)})]),g("div",AW,[g("div",null,[g("p",kW,[g("small",null,[N(o,{t:"Peer Jobs"})])]),g("div",MW,[g("a",{class:"list-group-item list-group-item-action d-flex",role:"button",onClick:e[8]||(e[8]=l=>this.$emit("jobsAll"))},[N(o,{t:"Active Jobs"})]),g("a",{class:"list-group-item list-group-item-action d-flex",role:"button",onClick:e[9]||(e[9]=l=>this.$emit("jobLogs"))},[N(o,{t:"Logs"})])])])])])])])])):ce("",!0)]),_:1})])])}const IW=je(eW,[["render",PW],["__scopeId","data-v-eeead157"]]);function DW(t){return nf()?(e_(t),!0):!1}function gS(t){return typeof t=="function"?t():J(t)}const pS=typeof window<"u"&&typeof document<"u";typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const RW=Object.prototype.toString,LW=t=>RW.call(t)==="[object Object]",ah=()=>{},OW=$W();function $W(){var t,e;return pS&&((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 xc(t){var e;const n=gS(t);return(e=n?.$el)!=null?e:n}const mS=pS?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=mS):[e,n,i,s]=t,!e)return ah;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=un(()=>[xc(e),gS(s)],([u,d])=>{if(o(),!u)return;const h=LW(d)?{...d}:d;r.push(...n.flatMap(f=>i.map(p=>a(u,f,p,h))))},{immediate:!0,flush:"post"}),c=()=>{l(),o()};return DW(c),c}let yb=!1;function NW(t,e,n={}){const{window:i=mS,ignore:s=[],capture:r=!0,detectIframe:o=!1}=n;if(!i)return ah;OW&&!yb&&(yb=!0,Array.from(i.document.body.children).forEach(h=>h.addEventListener("click",ah)),i.document.documentElement.addEventListener("click",ah));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=xc(f);return p&&(h.target===p||h.composedPath().includes(p))}}),u=[Hg(i,"click",h=>{const f=xc(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=xc(t);a=!l(h)&&!!(f&&!h.composedPath().includes(f))},{passive:!0}),o&&Hg(i,"blur",h=>{setTimeout(()=>{var f;const p=xc(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 FW={name:"peerSettingsDropdown",components:{LocaleText:He},setup(){return{dashboardStore:tt()}},props:{Peer:Object},data(){return{deleteBtnDisabled:!1,restrictBtnDisabled:!1,allowAccessBtnDisabled:!1}},methods:{downloadPeer(){Yt("/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(){Yt("/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,xt(`/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,xt(`/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,xt(`/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})}}},BW={class:"dropdown-menu mt-2 shadow-lg d-block rounded-3",style:{"max-width":"200px"}},VW={style:{"font-size":"0.8rem","padding-left":"var(--bs-dropdown-item-padding-x)","padding-right":"var(--bs-dropdown-item-padding-x)"}},zW={class:"text-body d-flex"},WW={class:"ms-auto"},YW={key:1},HW={class:"w-100 dropdown-item text-muted",style:{"white-space":"break-spaces","font-size":"0.7rem"}},jW={key:2,class:"d-flex",style:{"padding-left":"var(--bs-dropdown-item-padding-x)","padding-right":"var(--bs-dropdown-item-padding-x)"}},KW={key:1};function UW(t,e,n,i,s,r){const o=Ee("LocaleText");return R(),V("ul",BW,[this.Peer.restricted?(R(),V("li",KW,[g("a",{class:Pe(["dropdown-item d-flex text-warning",{disabled:this.allowAccessBtnDisabled}]),onClick:e[7]||(e[7]=a=>this.allowAccessPeer()),role:"button"},[e[21]||(e[21]=g("i",{class:"me-auto bi bi-unlock"},null,-1)),this.allowAccessBtnDisabled?(R(),Se(o,{key:1,t:"Allowing Access..."})):(R(),Se(o,{key:0,t:"Allow Access"}))],2)])):(R(),V(Oe,{key:0},[this.Peer.status==="running"?(R(),V(Oe,{key:0},[g("li",VW,[g("span",zW,[e[8]||(e[8]=g("i",{class:"bi bi-box-arrow-in-right"},null,-1)),g("span",WW,we(this.Peer.endpoint),1)])]),e[9]||(e[9]=g("li",null,[g("hr",{class:"dropdown-divider"})],-1))],64)):ce("",!0),this.Peer.private_key?(R(),V("li",jW,[g("a",{class:"dropdown-item text-center px-0 rounded-3",role:"button",onClick:e[0]||(e[0]=a=>this.downloadPeer())},e[10]||(e[10]=[g("i",{class:"me-auto bi bi-download"},null,-1)])),g("a",{class:"dropdown-item text-center px-0 rounded-3",role:"button",onClick:e[1]||(e[1]=a=>this.downloadQRCode())},e[11]||(e[11]=[g("i",{class:"me-auto bi bi-qr-code"},null,-1)])),g("a",{class:"dropdown-item text-center px-0 rounded-3",role:"button",onClick:e[2]||(e[2]=a=>this.$emit("share"))},e[12]||(e[12]=[g("i",{class:"me-auto bi bi-share"},null,-1)]))])):(R(),V("li",YW,[g("small",HW,[N(o,{t:"Download & QR Code is not available due to no private key set for this peer"})])])),e[19]||(e[19]=g("li",null,[g("hr",{class:"dropdown-divider"})],-1)),g("li",null,[g("a",{class:"dropdown-item d-flex",role:"button",onClick:e[3]||(e[3]=a=>this.$emit("setting"))},[e[13]||(e[13]=g("i",{class:"me-auto bi bi-pen"},null,-1)),e[14]||(e[14]=Ue()),N(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"))},[e[15]||(e[15]=g("i",{class:"me-auto bi bi-app-indicator"},null,-1)),e[16]||(e[16]=Ue()),N(o,{t:"Schedule Jobs"})])]),e[20]||(e[20]=g("li",null,[g("hr",{class:"dropdown-divider"})],-1)),g("li",null,[g("a",{class:Pe(["dropdown-item d-flex text-warning",{disabled:this.restrictBtnDisabled}]),onClick:e[5]||(e[5]=a=>this.restrictPeer()),role:"button"},[e[17]||(e[17]=g("i",{class:"me-auto bi bi-lock"},null,-1)),this.restrictBtnDisabled?(R(),Se(o,{key:1,t:"Restricting..."})):(R(),Se(o,{key:0,t:"Restrict Access"}))],2)]),g("li",null,[g("a",{class:Pe(["dropdown-item d-flex fw-bold text-danger",{disabled:this.deleteBtnDisabled}]),onClick:e[6]||(e[6]=a=>this.deletePeer()),role:"button"},[e[18]||(e[18]=g("i",{class:"me-auto bi bi-trash"},null,-1)),this.deleteBtnDisabled?(R(),Se(o,{key:1,t:"Deleting..."})):(R(),Se(o,{key:0,t:"Delete"}))],2)])],64))])}const GW=je(FW,[["render",UW],["__scopeId","data-v-34ee3204"]]),XW={name:"peer",components:{LocaleText:He,PeerSettingsDropdown:GW},props:{Peer:Object},data(){return{}},setup(){const t=xe(null),e=xe(!1);return NW(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}}},qW={key:0,class:"card-header bg-transparent d-flex align-items-center gap-2 border-0"},ZW={style:{"font-size":"0.8rem"},class:"ms-auto d-flex gap-2"},JW={class:"text-primary"},QW={class:"text-success"},eY={key:0,class:"text-secondary"},tY={key:1,class:"border-0 card-header bg-transparent text-warning fw-bold",style:{"font-size":"0.8rem"}},nY={class:"card-body pt-1",style:{"font-size":"0.9rem"}},iY={class:"mb-1"},sY={class:"d-block"},rY={class:"text-muted"},oY={class:"d-block"},aY={class:"d-flex align-items-end"};function lY(t,e,n,i,s,r){const o=Ee("LocaleText"),a=Ee("PeerSettingsDropdown");return R(),V("div",{class:Pe(["card shadow-sm rounded-3 peerCard bg-transparent",{"border-warning":n.Peer.restricted}])},[g("div",null,[n.Peer.restricted?(R(),V("div",tY,[e[11]||(e[11]=g("i",{class:"bi-lock-fill me-2"},null,-1)),N(o,{t:"Access Restricted"})])):(R(),V("div",qW,[g("div",{class:Pe(["dot ms-0",{active:n.Peer.status==="running"}])},null,2),g("div",ZW,[g("span",JW,[e[6]||(e[6]=g("i",{class:"bi bi-arrow-down"},null,-1)),g("strong",null,we((n.Peer.cumu_receive+n.Peer.total_receive).toFixed(4)),1),e[7]||(e[7]=Ue(" GB "))]),g("span",QW,[e[8]||(e[8]=g("i",{class:"bi bi-arrow-up"},null,-1)),g("strong",null,we((n.Peer.cumu_sent+n.Peer.total_sent).toFixed(4)),1),e[9]||(e[9]=Ue(" GB "))]),n.Peer.latest_handshake!=="No Handshake"?(R(),V("span",eY,[e[10]||(e[10]=g("i",{class:"bi bi-arrows-angle-contract"},null,-1)),Ue(" "+we(r.getLatestHandshake)+" ago ",1)])):ce("",!0)])]))]),g("div",nY,[g("h6",null,we(n.Peer.name?n.Peer.name:"Untitled Peer"),1),g("div",iY,[e[12]||(e[12]=g("small",{class:"text-muted"}," Public Key ",-1)),g("small",sY,[g("samp",null,we(n.Peer.id),1)])]),g("div",null,[g("small",rY,[N(o,{t:"Allowed IPs"})]),g("small",oY,[g("samp",null,we(n.Peer.allowed_ip),1)])]),g("div",aY,[g("div",{class:Pe(["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)},e[13]||(e[13]=[g("h5",{class:"mb-0"},[g("i",{class:"bi bi-three-dots"})],-1)])),N($t,{name:"slide-fade"},{default:De(()=>[this.subMenuOpened?(R(),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"])):ce("",!0)]),_:1})],2)])])],2)}const cY=je(XW,[["render",lY],["__scopeId","data-v-f14909a4"]]);/*! + */(function(){function t(w){var S=new Float64Array(16);if(w)for(var T=0;T>16&1),A[P-1]&=65535;A[15]=k[15]-32767-(A[14]>>16&1),T=A[15]>>16&1,A[14]&=65535,i(k,A,1-T)}for(var P=0;P<16;++P)w[2*P]=k[P]&255,w[2*P+1]=k[P]>>8}function n(w){for(var S=0;S<16;++S)w[(S+1)%16]+=(S<15?1:38)*Math.floor(w[S]/65536),w[S]&=65535}function i(w,S,T){for(var A,k=~(T-1),P=0;P<16;++P)A=k&(w[P]^S[P]),w[P]^=A,S[P]^=A}function s(w,S,T){for(var A=0;A<16;++A)w[A]=S[A]+T[A]|0}function r(w,S,T){for(var A=0;A<16;++A)w[A]=S[A]-T[A]|0}function o(w,S,T){for(var A=new Float64Array(31),k=0;k<16;++k)for(var P=0;P<16;++P)A[k+P]+=S[k]*T[P];for(var k=0;k<15;++k)A[k]+=38*A[k+16];for(var k=0;k<16;++k)w[k]=A[k];n(w),n(w)}function a(w,S){for(var T=t(),A=0;A<16;++A)T[A]=S[A];for(var A=253;A>=0;--A)o(T,T,T),A!==2&&A!==4&&o(T,T,S);for(var A=0;A<16;++A)w[A]=T[A]}function l(w){w[31]=w[31]&127|64,w[0]&=248}function c(w){for(var S,T=new Uint8Array(32),A=t([1]),k=t([9]),P=t(),B=t([1]),Y=t(),ne=t(),$=t([56129,1]),F=t([9]),D=0;D<32;++D)T[D]=w[D];l(T);for(var D=254;D>=0;--D)S=T[D>>>3]>>>(D&7)&1,i(A,k,S),i(P,B,S),s(Y,A,P),r(A,A,P),s(P,k,B),r(k,k,B),o(B,Y,Y),o(ne,A,A),o(A,P,A),o(P,k,Y),s(Y,A,P),r(A,A,P),o(k,A,A),r(P,B,ne),o(A,P,$),s(A,A,B),o(P,P,A),o(A,B,ne),o(B,k,F),o(k,Y,Y),i(A,k,S),i(P,B,S);return a(P,P),o(A,A,P),e(T,A),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,S){for(var T=Uint8Array.from([S[0]>>2&63,(S[0]<<4|S[1]>>4)&63,(S[1]<<2|S[2]>>6)&63,S[2]&63]),A=0;A<4;++A)w[A]=T[A]+65+(25-T[A]>>8&6)-(51-T[A]>>8&75)-(61-T[A]>>8&15)+(62-T[A]>>8&3)}function g(w){var S,T=new Uint8Array(44);for(S=0;S<32/3;++S)h(T.subarray(S*4),w.subarray(S*3));return h(T.subarray(S*4),Uint8Array.from([w[S*3+0],w[S*3+1],0])),T[43]=61,String.fromCharCode.apply(null,T)}function p(w){let S=window.atob(w),T=S.length,A=new Uint8Array(T);for(let P=0;P>>8&255,S>>>16&255,S>>>24&255)}function y(w,S){w.push(S&255,S>>>8&255)}function v(w,S){for(var T=0;T>>1:S>>>1;x.table[T]=S}}for(var k=-1,P=0;P>>8^x.table[(k^w[P])&255];return(k^-1)>>>0}function E(w){for(var S=[],T=[],A=0,k=0;k{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=U6(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")}}}},X6={class:"mt-5"},q6={class:"container mb-4"},Z6={class:"mb-4 d-flex align-items-center gap-4"},J6={class:"mb-0 text-body"},Q6={class:"card rounded-3 shadow"},ez={class:"card-header"},tz={class:"card-body"},nz=["disabled"],iz={class:"invalid-feedback"},sz={key:0},rz={key:1},oz={class:"mb-0"},az={class:"card rounded-3 shadow"},lz={class:"card-header"},cz={class:"card-body",style:{"font-family":"var(--bs-font-monospace)"}},uz={class:"mb-2"},dz={class:"text-muted fw-bold mb-1"},hz={class:"input-group"},fz=["disabled"],gz={class:"text-muted fw-bold mb-1"},pz={class:"card rounded-3 shadow"},mz={class:"card-header"},_z={class:"card-body"},yz=["disabled"],vz={class:"invalid-feedback"},bz={key:0},wz={key:1},xz={class:"card rounded-3 shadow"},Ez={class:"card-header d-flex align-items-center"},Cz={class:"badge rounded-pill text-bg-success ms-auto"},Sz={class:"card-body"},Tz=["disabled"],Az={class:"invalid-feedback"},kz={key:0},Mz={key:1},Pz={class:"accordion",id:"newConfigurationOptionalAccordion"},Iz={class:"accordion-item"},Dz={class:"accordion-header"},Rz={class:"accordion-button collapsed",type:"button","data-bs-toggle":"collapse","data-bs-target":"#newConfigurationOptionalAccordionCollapse"},Lz={id:"newConfigurationOptionalAccordionCollapse",class:"accordion-collapse collapse","data-bs-parent":"#newConfigurationOptionalAccordion"},Oz={class:"accordion-body d-flex flex-column gap-3"},$z={class:"card rounded-3"},Nz={class:"card-body"},Fz={class:"card rounded-3"},Bz={class:"card-body"},Vz={class:"card rounded-3"},zz={class:"card-body"},Wz={class:"card rounded-3"},Yz={class:"card-body"},Hz=["disabled"],jz={key:0,class:"d-flex w-100"},Kz={key:1,class:"d-flex w-100"},Uz={key:2,class:"d-flex w-100 align-items-center"};function Gz(t,e,n,i,s,r){const o=Ee("LocaleText"),a=Ee("RouterLink");return R(),V("div",X6,[f("div",q6,[f("div",Z6,[N(a,{to:"/",class:"text-decoration-none"},{default:De(()=>[f("h3",J6,[e[11]||(e[11]=f("i",{class:"bi bi-chevron-left me-4"},null,-1)),N(o,{t:"New Configuration"})])]),_:1})]),f("form",{class:"text-body d-flex flex-column gap-3",onSubmit:e[10]||(e[10]=l=>{l.preventDefault(),this.saveNewConfiguration()})},[f("div",Q6,[f("div",ez,[N(o,{t:"Configuration Name"})]),f("div",tz,[$e(f("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,nz),[[We,this.newConfiguration.ConfigurationName]]),f("div",iz,[this.error?(R(),V("div",sz,we(this.errorMessage),1)):(R(),V("div",rz,[N(o,{t:"Configuration name is invalid. Possible reasons:"}),f("ul",oz,[f("li",null,[N(o,{t:"Configuration name already exist."})]),f("li",null,[N(o,{t:"Configuration name can only contain 15 lower/uppercase alphabet, numbers, underscore, equal sign, plus sign, period and hyphen."})])])]))])])]),f("div",az,[f("div",lz,[N(o,{t:"Private Key"}),e[12]||(e[12]=Ue(" & ")),N(o,{t:"Public Key"})]),f("div",cz,[f("div",uz,[f("label",dz,[f("small",null,[N(o,{t:"Private Key"})])]),f("div",hz,[$e(f("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,fz),[[We,this.newConfiguration.PrivateKey]]),f("button",{class:"btn btn-outline-primary",type:"button",title:"Regenerate Private Key",onClick:e[2]||(e[2]=l=>r.wireguardGenerateKeypair())},e[13]||(e[13]=[f("i",{class:"bi bi-arrow-repeat"},null,-1)]))])]),f("div",null,[f("label",gz,[f("small",null,[N(o,{t:"Public Key"})])]),$e(f("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]])])])]),f("div",pz,[f("div",mz,[N(o,{t:"Listen Port"})]),f("div",_z,[$e(f("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,yz),[[We,this.newConfiguration.ListenPort]]),f("div",vz,[this.error?(R(),V("div",bz,we(this.errorMessage),1)):(R(),V("div",wz,[N(o,{t:"Invalid port"})]))])])]),f("div",xz,[f("div",Ez,[N(o,{t:"IP Address/CIDR"}),f("span",Cz,we(s.numberOfAvailableIPs)+" Available IPs",1)]),f("div",Sz,[$e(f("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,Tz),[[We,this.newConfiguration.Address]]),f("div",Az,[this.error?(R(),V("div",kz,we(this.errorMessage),1)):(R(),V("div",Mz," IP Address/CIDR is invalid "))])])]),e[22]||(e[22]=f("hr",null,null,-1)),f("div",Pz,[f("div",Iz,[f("h2",Dz,[f("button",Rz,[N(o,{t:"Optional Settings"})])]),f("div",Lz,[f("div",Oz,[f("div",$z,[e[14]||(e[14]=f("div",{class:"card-header"},"PreUp",-1)),f("div",Nz,[$e(f("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]])])]),f("div",Fz,[e[15]||(e[15]=f("div",{class:"card-header"},"PreDown",-1)),f("div",Bz,[$e(f("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]])])]),f("div",Vz,[e[16]||(e[16]=f("div",{class:"card-header"},"PostUp",-1)),f("div",zz,[$e(f("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]])])]),f("div",Wz,[e[17]||(e[17]=f("div",{class:"card-header"},"PostDown",-1)),f("div",Yz,[$e(f("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]])])])])])])]),f("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?(R(),V("span",jz,[N(o,{t:"Success"}),e[18]||(e[18]=Ue("! ")),e[19]||(e[19]=f("i",{class:"bi bi-check-circle-fill ms-2"},null,-1))])):this.loading?(R(),V("span",Uz,[N(o,{t:"Saving..."}),e[21]||(e[21]=f("span",{class:"ms-2 spinner-border spinner-border-sm",role:"status"},null,-1))])):(R(),V("span",Kz,[N(o,{t:"Save Configuration"}),e[20]||(e[20]=f("i",{class:"bi bi-save-fill ms-2"},null,-1))]))],8,Hz)],32)])])}const Xz=je(G6,[["render",Gz]]),qz={name:"configuration"},Zz={class:"mt-md-5 mt-3 text-body"};function Jz(t,e,n,i,s,r){const o=Ee("RouterView");return R(),V("div",Zz,[N(o,null,{default:De(({Component:a,route:l})=>[N($t,{name:"fade2",mode:"out-in"},{default:De(()=>[(R(),Se(p_,null,{default:De(()=>[(R(),Se(ma(a),{key:l.path}))]),_:2},1024))]),_:2},1024)]),_:1})])}const Qz=je(qz,[["render",Jz]]),eW={name:"peerSearch",components:{LocaleText:He},setup(){const t=tt(),e=qn();return{store:t,wireguardConfigurationStore:e}},props:{configuration:Object},data(){return{sort:{status:At("Status"),name:At("Name"),allowed_ip:At("Allowed IPs"),restricted:At("Restricted")},interval:{5e3:At("5 Seconds"),1e4:At("10 Seconds"),3e4:At("30 Seconds"),6e4:At("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){xt("/api/updateDashboardConfigurationItem",{section:"Server",key:"dashboard_sort",value:t},e=>{e.status&&this.store.getConfiguration()})},updateRefreshInterval(t){xt("/api/updateDashboardConfigurationItem",{section:"Server",key:"dashboard_refresh_interval",value:t},e=>{e.status&&this.store.getConfiguration()})},downloadAllPeer(){Yt(`/api/downloadAllPeers/${this.configuration.Name}`,{},t=>{console.log(t),window.wireguard.generateZipFiles(t,this.configuration.Name)})}},computed:{searchBarPlaceholder(){return At("Search Peers...")}}},tW={class:"mb-3"},nW={class:"d-flex gap-2 z-3 peerSearchContainer"},iW={class:"mt-3 mt-md-0 flex-grow-1"},sW=["placeholder"],rW={key:0,class:"peerSettingContainer w-100 h-100 position-absolute top-0 start-0 overflow-y-scroll displayModal"},oW={class:"container-md d-flex h-100 w-100"},aW={class:"m-auto modal-dialog-centered dashboardModal"},lW={class:"card rounded-3 shadow w-100"},cW={class:"card-header bg-transparent d-flex align-items-center gap-2 border-0 p-4 pb-2"},uW={class:"mb-0 fw-normal"},dW={class:"card-body px-4 pb-4 d-flex gap-3 flex-column"},hW={class:"text-muted fw-bold mb-2"},fW={class:"list-group"},gW=["onClick"],pW={class:"me-auto"},mW={key:0,class:"bi bi-check text-primary"},_W={class:"text-muted fw-bold mb-2"},yW={class:"list-group"},vW=["onClick"],bW={class:"me-auto"},wW={key:0,class:"bi bi-check text-primary"},xW={key:0,class:"peerSettingContainer w-100 h-100 position-absolute top-0 start-0 overflow-y-scroll displayModal"},EW={class:"container-md d-flex h-100 w-100"},CW={class:"m-auto modal-dialog-centered dashboardModal"},SW={class:"card rounded-3 shadow w-100"},TW={class:"card-header bg-transparent d-flex align-items-center gap-2 border-0 p-4 pb-0"},AW={class:"card-body px-4 pb-4 d-flex gap-3 flex-column pt-0"},kW={class:"text-muted fw-bold mb-2"},MW={class:"list-group"};function PW(t,e,n,i,s,r){const o=Ee("LocaleText"),a=Ee("RouterLink");return R(),V("div",tW,[f("div",nW,[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:De(()=>[e[10]||(e[10]=f("i",{class:"bi bi-plus-lg me-2"},null,-1)),N(o,{t:"Peer"})]),_:1}),f("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())},[e[11]||(e[11]=f("i",{class:"bi bi-download me-2"},null,-1)),N(o,{t:"Download All"})]),f("div",iW,[$e(f("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,sW),[[We,this.searchString]])]),f("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"},[e[12]||(e[12]=f("i",{class:"bi bi-filter-circle me-2"},null,-1)),N(o,{t:"Display"})]),f("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.$emit("editConfiguration")),type:"button","aria-expanded":"false"},e[13]||(e[13]=[f("i",{class:"bi bi-gear-fill"},null,-1)])),f("button",{class:"btn text-secondary-emphasis bg-secondary-subtle rounded-3 border-1 border-secondary-subtle shadow-sm",onClick:e[5]||(e[5]=l=>this.showMoreSettings=!0),type:"button","aria-expanded":"false"},e[14]||(e[14]=[f("i",{class:"bi bi-three-dots"},null,-1)])),N($t,{name:"zoom"},{default:De(()=>[this.showDisplaySettings?(R(),V("div",rW,[f("div",oW,[f("div",aW,[f("div",lW,[f("div",cW,[f("h4",uW,[N(o,{t:"Display"})]),f("button",{type:"button",class:"btn-close ms-auto",onClick:e[6]||(e[6]=l=>this.showDisplaySettings=!1)})]),f("div",dW,[f("div",null,[f("p",hW,[f("small",null,[N(o,{t:"Sort by"})])]),f("div",fW,[(R(!0),V(Le,null,Ze(this.sort,(l,c)=>(R(),V("a",{class:"list-group-item list-group-item-action d-flex",role:"button",onClick:u=>this.updateSort(c)},[f("span",pW,we(l),1),i.store.Configuration.Server.dashboard_sort===c?(R(),V("i",mW)):ce("",!0)],8,gW))),256))])]),f("div",null,[f("p",_W,[f("small",null,[N(o,{t:"Refresh Interval"})])]),f("div",yW,[(R(!0),V(Le,null,Ze(this.interval,(l,c)=>(R(),V("a",{class:"list-group-item list-group-item-action d-flex",role:"button",onClick:u=>this.updateRefreshInterval(c)},[f("span",bW,we(l),1),i.store.Configuration.Server.dashboard_refresh_interval===c?(R(),V("i",wW)):ce("",!0)],8,vW))),256))])])])])])])])):ce("",!0)]),_:1}),N($t,{name:"zoom"},{default:De(()=>[this.showMoreSettings?(R(),V("div",xW,[f("div",EW,[f("div",CW,[f("div",SW,[f("div",TW,[f("button",{type:"button",class:"btn-close ms-auto",onClick:e[7]||(e[7]=l=>this.showMoreSettings=!1)})]),f("div",AW,[f("div",null,[f("p",kW,[f("small",null,[N(o,{t:"Peer Jobs"})])]),f("div",MW,[f("a",{class:"list-group-item list-group-item-action d-flex",role:"button",onClick:e[8]||(e[8]=l=>this.$emit("jobsAll"))},[N(o,{t:"Active Jobs"})]),f("a",{class:"list-group-item list-group-item-action d-flex",role:"button",onClick:e[9]||(e[9]=l=>this.$emit("jobLogs"))},[N(o,{t:"Logs"})])])])])])])])])):ce("",!0)]),_:1})])])}const IW=je(eW,[["render",PW],["__scopeId","data-v-eeead157"]]);function DW(t){return nf()?(e_(t),!0):!1}function gS(t){return typeof t=="function"?t():J(t)}const pS=typeof window<"u"&&typeof document<"u";typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const RW=Object.prototype.toString,LW=t=>RW.call(t)==="[object Object]",ah=()=>{},OW=$W();function $W(){var t,e;return pS&&((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 xc(t){var e;const n=gS(t);return(e=n?.$el)!=null?e:n}const mS=pS?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=mS):[e,n,i,s]=t,!e)return ah;Array.isArray(n)||(n=[n]),Array.isArray(i)||(i=[i]);const r=[],o=()=>{r.forEach(u=>u()),r.length=0},a=(u,d,h,g)=>(u.addEventListener(d,h,g),()=>u.removeEventListener(d,h,g)),l=un(()=>[xc(e),gS(s)],([u,d])=>{if(o(),!u)return;const h=LW(d)?{...d}:d;r.push(...n.flatMap(g=>i.map(p=>a(u,g,p,h))))},{immediate:!0,flush:"post"}),c=()=>{l(),o()};return DW(c),c}let yb=!1;function NW(t,e,n={}){const{window:i=mS,ignore:s=[],capture:r=!0,detectIframe:o=!1}=n;if(!i)return ah;OW&&!yb&&(yb=!0,Array.from(i.document.body.children).forEach(h=>h.addEventListener("click",ah)),i.document.documentElement.addEventListener("click",ah));let a=!0;const l=h=>s.some(g=>{if(typeof g=="string")return Array.from(i.document.querySelectorAll(g)).some(p=>p===h.target||h.composedPath().includes(p));{const p=xc(g);return p&&(h.target===p||h.composedPath().includes(p))}}),u=[Hg(i,"click",h=>{const g=xc(t);if(!(!g||g===h.target||h.composedPath().includes(g))){if(h.detail===0&&(a=!l(h)),!a){a=!0;return}e(h)}},{passive:!0,capture:r}),Hg(i,"pointerdown",h=>{const g=xc(t);a=!l(h)&&!!(g&&!h.composedPath().includes(g))},{passive:!0}),o&&Hg(i,"blur",h=>{setTimeout(()=>{var g;const p=xc(t);((g=i.document.activeElement)==null?void 0:g.tagName)==="IFRAME"&&!p?.contains(i.document.activeElement)&&e(h)},0)})].filter(Boolean);return()=>u.forEach(h=>h())}const FW={name:"peerSettingsDropdown",components:{LocaleText:He},setup(){return{dashboardStore:tt()}},props:{Peer:Object},data(){return{deleteBtnDisabled:!1,restrictBtnDisabled:!1,allowAccessBtnDisabled:!1,confirmDelete:!1}},methods:{downloadPeer(){Yt("/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(){Yt("/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,xt(`/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,xt(`/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,xt(`/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})}}},BW={class:"dropdown-menu mt-2 shadow-lg d-block rounded-3",style:{"max-width":"200px"}},VW={style:{"font-size":"0.8rem","padding-left":"var(--bs-dropdown-item-padding-x)","padding-right":"var(--bs-dropdown-item-padding-x)"}},zW={class:"text-body d-flex"},WW={class:"ms-auto"},YW={key:1},HW={class:"w-100 dropdown-item text-muted",style:{"white-space":"break-spaces","font-size":"0.7rem"}},jW={key:2,class:"d-flex",style:{"padding-left":"var(--bs-dropdown-item-padding-x)","padding-right":"var(--bs-dropdown-item-padding-x)"}},KW={key:1,class:"confirmDelete"},UW={class:"d-flex w-100 gap-2"},GW=["disabled"],XW=["disabled"],qW={key:1};function ZW(t,e,n,i,s,r){const o=Ee("LocaleText");return R(),V("ul",BW,[this.Peer.restricted?(R(),V("li",qW,[f("a",{class:Pe(["dropdown-item d-flex text-warning",{disabled:this.allowAccessBtnDisabled}]),onClick:e[9]||(e[9]=a=>this.allowAccessPeer()),role:"button"},[e[24]||(e[24]=f("i",{class:"me-auto bi bi-unlock"},null,-1)),this.allowAccessBtnDisabled?(R(),Se(o,{key:1,t:"Allowing Access..."})):(R(),Se(o,{key:0,t:"Allow Access"}))],2)])):(R(),V(Le,{key:0},[this.confirmDelete?(R(),V("li",KW,[e[23]||(e[23]=f("small",{style:{"white-space":"break-spaces"},class:"mb-2 d-block fw-bold"},"Are you sure to delete this peer?",-1)),f("div",UW,[f("button",{disabled:this.deleteBtnDisabled,onClick:e[7]||(e[7]=a=>this.confirmDelete=!1),class:"flex-grow-1 btn btn-sm bg-secondary-subtle text-secondary-emphasis border border-secondary-subtle"},[N(o,{t:"No"})],8,GW),f("button",{onClick:e[8]||(e[8]=a=>this.deletePeer()),disabled:this.deleteBtnDisabled,class:"flex-grow-1 ms-auto btn btn-sm bg-danger"},[N(o,{t:"Yes"})],8,XW)])])):(R(),V(Le,{key:0},[this.Peer.status==="running"?(R(),V(Le,{key:0},[f("li",VW,[f("span",zW,[e[10]||(e[10]=f("i",{class:"bi bi-box-arrow-in-right"},null,-1)),f("span",WW,we(this.Peer.endpoint),1)])]),e[11]||(e[11]=f("li",null,[f("hr",{class:"dropdown-divider"})],-1))],64)):ce("",!0),this.Peer.private_key?(R(),V("li",jW,[f("a",{class:"dropdown-item text-center px-0 rounded-3",role:"button",onClick:e[0]||(e[0]=a=>this.downloadPeer())},e[12]||(e[12]=[f("i",{class:"me-auto bi bi-download"},null,-1)])),f("a",{class:"dropdown-item text-center px-0 rounded-3",role:"button",onClick:e[1]||(e[1]=a=>this.downloadQRCode())},e[13]||(e[13]=[f("i",{class:"me-auto bi bi-qr-code"},null,-1)])),f("a",{class:"dropdown-item text-center px-0 rounded-3",role:"button",onClick:e[2]||(e[2]=a=>this.$emit("share"))},e[14]||(e[14]=[f("i",{class:"me-auto bi bi-share"},null,-1)]))])):(R(),V("li",YW,[f("small",HW,[N(o,{t:"Download & QR Code is not available due to no private key set for this peer"})])])),e[21]||(e[21]=f("li",null,[f("hr",{class:"dropdown-divider"})],-1)),f("li",null,[f("a",{class:"dropdown-item d-flex",role:"button",onClick:e[3]||(e[3]=a=>this.$emit("setting"))},[e[15]||(e[15]=f("i",{class:"me-auto bi bi-pen"},null,-1)),e[16]||(e[16]=Ue()),N(o,{t:"Peer Settings"})])]),f("li",null,[f("a",{class:"dropdown-item d-flex",role:"button",onClick:e[4]||(e[4]=a=>this.$emit("jobs"))},[e[17]||(e[17]=f("i",{class:"me-auto bi bi-app-indicator"},null,-1)),e[18]||(e[18]=Ue()),N(o,{t:"Schedule Jobs"})])]),e[22]||(e[22]=f("li",null,[f("hr",{class:"dropdown-divider"})],-1)),f("li",null,[f("a",{class:Pe(["dropdown-item d-flex text-warning",{disabled:this.restrictBtnDisabled}]),onClick:e[5]||(e[5]=a=>this.restrictPeer()),role:"button"},[e[19]||(e[19]=f("i",{class:"me-auto bi bi-lock"},null,-1)),this.restrictBtnDisabled?(R(),Se(o,{key:1,t:"Restricting..."})):(R(),Se(o,{key:0,t:"Restrict Access"}))],2)]),f("li",null,[f("a",{class:Pe(["dropdown-item d-flex fw-bold text-danger",{disabled:this.deleteBtnDisabled}]),onClick:e[6]||(e[6]=a=>this.confirmDelete=!0),role:"button"},[e[20]||(e[20]=f("i",{class:"me-auto bi bi-trash"},null,-1)),this.deleteBtnDisabled?(R(),Se(o,{key:1,t:"Deleting..."})):(R(),Se(o,{key:0,t:"Delete"}))],2)])],64))],64))])}const JW=je(FW,[["render",ZW],["__scopeId","data-v-3fa1c090"]]),QW={name:"peer",components:{LocaleText:He,PeerSettingsDropdown:JW},props:{Peer:Object},data(){return{}},setup(){const t=xe(null),e=xe(!1);return NW(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}}},eY={key:0,class:"card-header bg-transparent d-flex align-items-center gap-2 border-0"},tY={style:{"font-size":"0.8rem"},class:"ms-auto d-flex gap-2"},nY={class:"text-primary"},iY={class:"text-success"},sY={key:0,class:"text-secondary"},rY={key:1,class:"border-0 card-header bg-transparent text-warning fw-bold",style:{"font-size":"0.8rem"}},oY={class:"card-body pt-1",style:{"font-size":"0.9rem"}},aY={class:"mb-1"},lY={class:"d-block"},cY={class:"text-muted"},uY={class:"d-block"},dY={class:"d-flex align-items-end"};function hY(t,e,n,i,s,r){const o=Ee("LocaleText"),a=Ee("PeerSettingsDropdown");return R(),V("div",{class:Pe(["card shadow-sm rounded-3 peerCard bg-transparent",{"border-warning":n.Peer.restricted}])},[f("div",null,[n.Peer.restricted?(R(),V("div",rY,[e[11]||(e[11]=f("i",{class:"bi-lock-fill me-2"},null,-1)),N(o,{t:"Access Restricted"})])):(R(),V("div",eY,[f("div",{class:Pe(["dot ms-0",{active:n.Peer.status==="running"}])},null,2),f("div",tY,[f("span",nY,[e[6]||(e[6]=f("i",{class:"bi bi-arrow-down"},null,-1)),f("strong",null,we((n.Peer.cumu_receive+n.Peer.total_receive).toFixed(4)),1),e[7]||(e[7]=Ue(" GB "))]),f("span",iY,[e[8]||(e[8]=f("i",{class:"bi bi-arrow-up"},null,-1)),f("strong",null,we((n.Peer.cumu_sent+n.Peer.total_sent).toFixed(4)),1),e[9]||(e[9]=Ue(" GB "))]),n.Peer.latest_handshake!=="No Handshake"?(R(),V("span",sY,[e[10]||(e[10]=f("i",{class:"bi bi-arrows-angle-contract"},null,-1)),Ue(" "+we(r.getLatestHandshake)+" ago ",1)])):ce("",!0)])]))]),f("div",oY,[f("h6",null,we(n.Peer.name?n.Peer.name:"Untitled Peer"),1),f("div",aY,[e[12]||(e[12]=f("small",{class:"text-muted"}," Public Key ",-1)),f("small",lY,[f("samp",null,we(n.Peer.id),1)])]),f("div",null,[f("small",cY,[N(o,{t:"Allowed IPs"})]),f("small",uY,[f("samp",null,we(n.Peer.allowed_ip),1)])]),f("div",dY,[f("div",{class:Pe(["ms-auto px-2 rounded-3 subMenuBtn",{active:this.subMenuOpened}])},[f("a",{role:"button",class:"text-body",onClick:e[0]||(e[0]=l=>this.subMenuOpened=!0)},e[13]||(e[13]=[f("h5",{class:"mb-0"},[f("i",{class:"bi bi-three-dots"})],-1)])),N($t,{name:"slide-fade"},{default:De(()=>[this.subMenuOpened?(R(),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"])):ce("",!0)]),_:1})],2)])])],2)}const fY=je(QW,[["render",hY],["__scopeId","data-v-116e739e"]]);/*! * @kurkle/color v0.3.2 * https://github.com/kurkle/color#readme * (c) 2023 Jukka Kurkela * Released under the MIT License - */function Hu(t){return t+.5|0}const Ur=(t,e,n)=>Math.max(Math.min(t,n),e);function Ec(t){return Ur(Hu(t*2.55),0,255)}function no(t){return Ur(Hu(t*255),0,255)}function ir(t){return Ur(Hu(t/2.55)/100,0,1)}function vb(t){return Ur(Hu(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},nm=[..."0123456789ABCDEF"],uY=t=>nm[t&15],dY=t=>nm[(t&240)>>4]+nm[t&15],Td=t=>(t&240)>>4===(t&15),hY=t=>Td(t.r)&&Td(t.g)&&Td(t.b)&&Td(t.a);function fY(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 gY=(t,e)=>t<255?e(t):"";function pY(t){var e=hY(t)?uY:dY;return t?"#"+e(t.r)+e(t.g)+e(t.b)+gY(t.a,e):void 0}const mY=/^(hsla?|hwb|hsv)\(\s*([-+.e\d]+)(?:deg)?[\s,]+([-+.e\d]+)%[\s,]+([-+.e\d]+)%(?:[\s,]+([-+.e\d]+)(%)?)?\s*\)$/;function _S(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 _Y(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 yY(t,e,n){const i=_S(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 vY(t,e,n,i,s){return t===s?(e-n)/i+(e.5?u/(2-r-o):u/(r+o),l=vY(n,i,s,u,r),l=l*60+.5),[l|0,c||0,a]}function z_(t,e,n,i){return(Array.isArray(e)?t(e[0],e[1],e[2]):t(e,n,i)).map(no)}function W_(t,e,n){return z_(_S,t,e,n)}function bY(t,e,n){return z_(yY,t,e,n)}function wY(t,e,n){return z_(_Y,t,e,n)}function yS(t){return(t%360+360)%360}function xY(t){const e=mY.exec(t);let n=255,i;if(!e)return;e[5]!==i&&(n=e[6]?Ec(+e[5]):no(+e[5]));const s=yS(+e[2]),r=+e[3]/100,o=+e[4]/100;return e[1]==="hwb"?i=bY(s,r,o):e[1]==="hsv"?i=wY(s,r,o):i=W_(s,r,o),{r:i[0],g:i[1],b:i[2],a:n}}function EY(t,e){var n=V_(t);n[0]=yS(n[0]+e),n=W_(n),t.r=n[0],t.g=n[1],t.b=n[2]}function CY(t){if(!t)return;const e=V_(t),n=e[0],i=vb(e[1]),s=vb(e[2]);return t.a<255?`hsla(${n}, ${i}%, ${s}%, ${ir(t.a)})`:`hsl(${n}, ${i}%, ${s}%)`}const bb={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"},wb={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 SY(){const t={},e=Object.keys(wb),n=Object.keys(bb);let i,s,r,o,a;for(i=0;i>16&255,r>>8&255,r&255]}return t}let Ad;function TY(t){Ad||(Ad=SY(),Ad.transparent=[0,0,0,0]);const e=Ad[t.toLowerCase()];return e&&{r:e[0],g:e[1],b:e[2],a:e.length===4?e[3]:255}}const AY=/^rgba?\(\s*([-+.\d]+)(%)?[\s,]+([-+.e\d]+)(%)?[\s,]+([-+.e\d]+)(%)?(?:[\s,/]+([-+.e\d]+)(%)?)?\s*\)$/;function kY(t){const e=AY.exec(t);let n=255,i,s,r;if(e){if(e[7]!==i){const o=+e[7];n=e[8]?Ec(o):Ur(o*255,0,255)}return i=+e[1],s=+e[3],r=+e[5],i=255&(e[2]?Ec(i):Ur(i,0,255)),s=255&(e[4]?Ec(s):Ur(s,0,255)),r=255&(e[6]?Ec(r):Ur(r,0,255)),{r:i,g:s,b:r,a:n}}}function MY(t){return t&&(t.a<255?`rgba(${t.r}, ${t.g}, ${t.b}, ${ir(t.a)})`:`rgb(${t.r}, ${t.g}, ${t.b})`)}const jg=t=>t<=.0031308?t*12.92:Math.pow(t,1/2.4)*1.055-.055,Oa=t=>t<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4);function PY(t,e,n){const i=Oa(ir(t.r)),s=Oa(ir(t.g)),r=Oa(ir(t.b));return{r:no(jg(i+n*(Oa(ir(e.r))-i))),g:no(jg(s+n*(Oa(ir(e.g))-s))),b:no(jg(r+n*(Oa(ir(e.b))-r))),a:t.a+n*(e.a-t.a)}}function kd(t,e,n){if(t){let i=V_(t);i[e]=Math.max(0,Math.min(i[e]+i[e]*n,e===0?360:1)),i=W_(i),t.r=i[0],t.g=i[1],t.b=i[2]}}function vS(t,e){return t&&Object.assign(e||{},t)}function xb(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=no(t[3]))):(e=vS(t,{r:0,g:0,b:0,a:1}),e.a=no(e.a)),e}function IY(t){return t.charAt(0)==="r"?kY(t):xY(t)}class du{constructor(e){if(e instanceof du)return e;const n=typeof e;let i;n==="object"?i=xb(e):n==="string"&&(i=fY(e)||TY(e)||IY(e)),this._rgb=i,this._valid=!!i}get valid(){return this._valid}get rgb(){var e=vS(this._rgb);return e&&(e.a=ir(e.a)),e}set rgb(e){this._rgb=xb(e)}rgbString(){return this._valid?MY(this._rgb):void 0}hexString(){return this._valid?pY(this._rgb):void 0}hslString(){return this._valid?CY(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=PY(this._rgb,e._rgb,n)),this}clone(){return new du(this.rgb)}alpha(e){return this._rgb.a=no(e),this}clearer(e){const n=this._rgb;return n.a*=1-e,this}greyscale(){const e=this._rgb,n=Hu(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 kd(this._rgb,2,e),this}darken(e){return kd(this._rgb,2,-e),this}saturate(e){return kd(this._rgb,1,e),this}desaturate(e){return kd(this._rgb,1,-e),this}rotate(e){return EY(this._rgb,e),this}}/*! + */function Hu(t){return t+.5|0}const Ur=(t,e,n)=>Math.max(Math.min(t,n),e);function Ec(t){return Ur(Hu(t*2.55),0,255)}function no(t){return Ur(Hu(t*255),0,255)}function ir(t){return Ur(Hu(t/2.55)/100,0,1)}function vb(t){return Ur(Hu(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},nm=[..."0123456789ABCDEF"],gY=t=>nm[t&15],pY=t=>nm[(t&240)>>4]+nm[t&15],Td=t=>(t&240)>>4===(t&15),mY=t=>Td(t.r)&&Td(t.g)&&Td(t.b)&&Td(t.a);function _Y(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 yY=(t,e)=>t<255?e(t):"";function vY(t){var e=mY(t)?gY:pY;return t?"#"+e(t.r)+e(t.g)+e(t.b)+yY(t.a,e):void 0}const bY=/^(hsla?|hwb|hsv)\(\s*([-+.e\d]+)(?:deg)?[\s,]+([-+.e\d]+)%[\s,]+([-+.e\d]+)%(?:[\s,]+([-+.e\d]+)(%)?)?\s*\)$/;function _S(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 wY(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 xY(t,e,n){const i=_S(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 EY(t,e,n,i,s){return t===s?(e-n)/i+(e.5?u/(2-r-o):u/(r+o),l=EY(n,i,s,u,r),l=l*60+.5),[l|0,c||0,a]}function z_(t,e,n,i){return(Array.isArray(e)?t(e[0],e[1],e[2]):t(e,n,i)).map(no)}function W_(t,e,n){return z_(_S,t,e,n)}function CY(t,e,n){return z_(xY,t,e,n)}function SY(t,e,n){return z_(wY,t,e,n)}function yS(t){return(t%360+360)%360}function TY(t){const e=bY.exec(t);let n=255,i;if(!e)return;e[5]!==i&&(n=e[6]?Ec(+e[5]):no(+e[5]));const s=yS(+e[2]),r=+e[3]/100,o=+e[4]/100;return e[1]==="hwb"?i=CY(s,r,o):e[1]==="hsv"?i=SY(s,r,o):i=W_(s,r,o),{r:i[0],g:i[1],b:i[2],a:n}}function AY(t,e){var n=V_(t);n[0]=yS(n[0]+e),n=W_(n),t.r=n[0],t.g=n[1],t.b=n[2]}function kY(t){if(!t)return;const e=V_(t),n=e[0],i=vb(e[1]),s=vb(e[2]);return t.a<255?`hsla(${n}, ${i}%, ${s}%, ${ir(t.a)})`:`hsl(${n}, ${i}%, ${s}%)`}const bb={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"},wb={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 MY(){const t={},e=Object.keys(wb),n=Object.keys(bb);let i,s,r,o,a;for(i=0;i>16&255,r>>8&255,r&255]}return t}let Ad;function PY(t){Ad||(Ad=MY(),Ad.transparent=[0,0,0,0]);const e=Ad[t.toLowerCase()];return e&&{r:e[0],g:e[1],b:e[2],a:e.length===4?e[3]:255}}const IY=/^rgba?\(\s*([-+.\d]+)(%)?[\s,]+([-+.e\d]+)(%)?[\s,]+([-+.e\d]+)(%)?(?:[\s,/]+([-+.e\d]+)(%)?)?\s*\)$/;function DY(t){const e=IY.exec(t);let n=255,i,s,r;if(e){if(e[7]!==i){const o=+e[7];n=e[8]?Ec(o):Ur(o*255,0,255)}return i=+e[1],s=+e[3],r=+e[5],i=255&(e[2]?Ec(i):Ur(i,0,255)),s=255&(e[4]?Ec(s):Ur(s,0,255)),r=255&(e[6]?Ec(r):Ur(r,0,255)),{r:i,g:s,b:r,a:n}}}function RY(t){return t&&(t.a<255?`rgba(${t.r}, ${t.g}, ${t.b}, ${ir(t.a)})`:`rgb(${t.r}, ${t.g}, ${t.b})`)}const jg=t=>t<=.0031308?t*12.92:Math.pow(t,1/2.4)*1.055-.055,Oa=t=>t<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4);function LY(t,e,n){const i=Oa(ir(t.r)),s=Oa(ir(t.g)),r=Oa(ir(t.b));return{r:no(jg(i+n*(Oa(ir(e.r))-i))),g:no(jg(s+n*(Oa(ir(e.g))-s))),b:no(jg(r+n*(Oa(ir(e.b))-r))),a:t.a+n*(e.a-t.a)}}function kd(t,e,n){if(t){let i=V_(t);i[e]=Math.max(0,Math.min(i[e]+i[e]*n,e===0?360:1)),i=W_(i),t.r=i[0],t.g=i[1],t.b=i[2]}}function vS(t,e){return t&&Object.assign(e||{},t)}function xb(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=no(t[3]))):(e=vS(t,{r:0,g:0,b:0,a:1}),e.a=no(e.a)),e}function OY(t){return t.charAt(0)==="r"?DY(t):TY(t)}class du{constructor(e){if(e instanceof du)return e;const n=typeof e;let i;n==="object"?i=xb(e):n==="string"&&(i=_Y(e)||PY(e)||OY(e)),this._rgb=i,this._valid=!!i}get valid(){return this._valid}get rgb(){var e=vS(this._rgb);return e&&(e.a=ir(e.a)),e}set rgb(e){this._rgb=xb(e)}rgbString(){return this._valid?RY(this._rgb):void 0}hexString(){return this._valid?vY(this._rgb):void 0}hslString(){return this._valid?kY(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=LY(this._rgb,e._rgb,n)),this}clone(){return new du(this.rgb)}alpha(e){return this._rgb.a=no(e),this}clearer(e){const n=this._rgb;return n.a*=1-e,this}greyscale(){const e=this._rgb,n=Hu(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 kd(this._rgb,2,e),this}darken(e){return kd(this._rgb,2,-e),this}saturate(e){return kd(this._rgb,1,e),this}desaturate(e){return kd(this._rgb,1,-e),this}rotate(e){return AY(this._rgb,e),this}}/*! * Chart.js v4.4.4 * https://www.chartjs.org * (c) 2024 Chart.js Contributors * Released under the MIT License - */function Us(){}const DY=(()=>{let t=0;return()=>t++})();function ft(t){return t===null||typeof t>"u"}function zt(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 en(t){return(typeof t=="number"||t instanceof Number)&&isFinite(+t)}function Ci(t,e){return en(t)?t:e}function it(t,e){return typeof t>"u"?e:t}const RY=(t,e)=>typeof t=="string"&&t.endsWith("%")?parseFloat(t)/100:+t/e,bS=(t,e)=>typeof t=="string"&&t.endsWith("%")?parseFloat(t)/100*e:+t;function Dt(t,e,n){if(t&&typeof t.call=="function")return t.apply(n,e)}function Tt(t,e,n,i){let s,r,o;if(zt(t))for(r=t.length,s=0;st,x:t=>t.x,y:t=>t.y};function $Y(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=$Y(t);return n=>{for(const i of e){if(i==="")break;n=n&&n[i]}return n}}function lo(t,e){return(Eb[e]||(Eb[e]=NY(e)))(t)}function Y_(t){return t.charAt(0).toUpperCase()+t.slice(1)}const fu=t=>typeof t<"u",co=t=>typeof t=="function",Cb=(t,e)=>{if(t.size!==e.size)return!1;for(const n of t)if(!e.has(n))return!1;return!0};function FY(t){return t.type==="mouseup"||t.type==="click"||t.type==="contextmenu"}const Ft=Math.PI,Nt=2*Ft,BY=Nt+Ft,Th=Number.POSITIVE_INFINITY,VY=Ft/180,cn=Ft/2,Lo=Ft/4,Sb=Ft*2/3,Gr=Math.log10,$s=Math.sign;function Uc(t,e,n){return Math.abs(t-e)s-r).pop(),e}function Pl(t){return!isNaN(parseFloat(t))&&isFinite(t)}function WY(t,e){const n=Math.round(t);return n-e<=t&&n+e>=t}function xS(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 cr=(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 KY(t,e,n){let i=0,s=t.length;for(;ii&&t[s-1]>n;)s--;return i>0||s{const i="_onData"+Y_(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 kb(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)&&(CS.forEach(r=>{delete t[r]}),delete t._chartjs)}function SS(t){const e=new Set(t);return e.size===t.length?t:Array.from(e)}const TS=function(){return typeof window>"u"?function(t){return t()}:window.requestAnimationFrame}();function AS(t,e){let n=[],i=!1;return function(...s){n=s,i||(i=!0,TS.call(window,()=>{i=!1,t.apply(e,n)}))}}function GY(t,e){let n;return function(...i){return e?(clearTimeout(n),n=setTimeout(t,e,i)):t.apply(this,i),e}}const K_=t=>t==="start"?"left":t==="end"?"right":"center",zn=(t,e,n)=>t==="start"?e:t==="end"?n:(e+n)/2,XY=(t,e,n,i)=>t===(i?"left":"right")?n:t==="center"?(e+n)/2:e;function kS(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=Dn(Math.min(cr(a,l,c).lo,n?i:cr(e,l,o.getPixelForValue(c)).lo),0,i-1)),h?r=Dn(Math.max(cr(a,o.axis,u,!0).hi+1,n?0:cr(e,l,o.getPixelForValue(u),!0).hi+1),s,i)-s:r=i-s}return{start:s,count:r}}function MS(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 Md=t=>t===0||t===1,Mb=(t,e,n)=>-(Math.pow(2,10*(t-=1))*Math.sin((t-e)*Nt/n)),Pb=(t,e,n)=>Math.pow(2,-10*t)*Math.sin((t-e)*Nt/n)+1,Gc={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*cn)+1,easeOutSine:t=>Math.sin(t*cn),easeInOutSine:t=>-.5*(Math.cos(Ft*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=>Md(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=>Md(t)?t:Mb(t,.075,.3),easeOutElastic:t=>Md(t)?t:Pb(t,.075,.3),easeInOutElastic(t){return Md(t)?t:t<.5?.5*Mb(t*2,.1125,.45):.5+.5*Pb(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-Gc.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?Gc.easeInBounce(t*2)*.5:Gc.easeOutBounce(t*2-1)*.5+.5};function U_(t){if(t&&typeof t=="object"){const e=t.toString();return e==="[object CanvasPattern]"||e==="[object CanvasGradient]"}return!1}function Ib(t){return U_(t)?t:new du(t)}function Kg(t){return U_(t)?t:new du(t).saturate(.5).darken(.1).hexString()}const qY=["x","y","borderWidth","radius","tension"],ZY=["color","borderColor","backgroundColor"];function JY(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:ZY},numbers:{type:"number",properties:qY}}),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 QY(t){t.set("layout",{autoPadding:!0,padding:{top:0,right:0,bottom:0,left:0}})}const Db=new Map;function e8(t,e){e=e||{};const n=t+JSON.stringify(e);let i=Db.get(n);return i||(i=new Intl.NumberFormat(t,e),Db.set(n,i)),i}function ju(t,e,n){return e8(e,n).format(t)}const PS={values(t){return zt(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=t8(t,n)}const o=Gr(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),ju(t,i,l)},logarithmic(t,e,n){if(t===0)return"0";const i=n[e].significand||t/Math.pow(10,Math.floor(Gr(t)));return[1,2,3,5,10,15].includes(i)||e>.8*n.length?PS.numeric.call(this,t,e,n):""}};function t8(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 Cf={formatters:PS};function n8(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:Cf.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 da=Object.create(null),sm=Object.create(null);function Xc(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)=>Kg(s.backgroundColor),this.hoverBorderColor=(i,s)=>Kg(s.borderColor),this.hoverColor=(i,s)=>Kg(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 Ug(this,e,n)}get(e){return Xc(this,e)}describe(e,n){return Ug(sm,e,n)}override(e,n){return Ug(da,e,n)}route(e,n,i,s){const r=Xc(this,e),o=Xc(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):it(l,c)},set(l){this[a]=l}}})}apply(e){e.forEach(n=>n(this))}}var tn=new i8({_scriptable:t=>!t.startsWith("on"),_indexable:t=>t!=="events",hover:{_fallback:"interaction"},interaction:{_scriptable:!1,_indexable:!1}},[JY,QY,n8]);function s8(t){return!t||ft(t.size)||ft(t.family)?null:(t.style?t.style+" ":"")+(t.weight?t.weight+" ":"")+t.size+"px "+t.family}function Ah(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 r8(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 ur(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,l8(t,r),l=0;l+t||0;function G_(t,e){const n={},i=ut(e),s=i?Object.keys(e):e,r=ut(t)?i?o=>it(t[o],t[e[o]]):o=>t[o]:()=>t;for(const o of s)n[o]=g8(r(o));return n}function DS(t){return G_(t,{top:"y",right:"x",bottom:"y",left:"x"})}function ia(t){return G_(t,["topLeft","topRight","bottomLeft","bottomRight"])}function Xn(t){const e=DS(t);return e.width=e.left+e.right,e.height=e.top+e.bottom,e}function xn(t,e){t=t||{},e=e||tn.font;let n=it(t.size,e.size);typeof n=="string"&&(n=parseInt(n,10));let i=it(t.style,e.style);i&&!(""+i).match(h8)&&(console.warn('Invalid font style specified: "'+i+'"'),i=void 0);const s={family:it(t.family,e.family),lineHeight:f8(it(t.lineHeight,e.lineHeight),n),size:n,style:i,weight:it(t.weight,e.weight),string:""};return s.string=s8(s),s}function Cc(t,e,n,i){let s,r,o;for(s=0,r=t.length;sn&&a===0?0:a+l;return{min:o(i,-Math.abs(r)),max:o(s,r)}}function vo(t,e){return Object.assign(Object.create(t),e)}function X_(t,e=[""],n,i,s=()=>t[0]){const r=n||t;typeof i>"u"&&(i=$S("_fallback",t));const o={[Symbol.toStringTag]:"Object",_cacheable:!0,_scopes:t,_rootScopes:r,_fallback:i,_getTarget:s,override:a=>X_([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 LS(a,l,()=>E8(l,e,t,a))},getOwnPropertyDescriptor(a,l){return Reflect.getOwnPropertyDescriptor(a._scopes[0],l)},getPrototypeOf(){return Reflect.getPrototypeOf(t[0])},has(a,l){return Ob(a).includes(l)},ownKeys(a){return Ob(a)},set(a,l,c){const u=a._storage||(a._storage=s());return a[l]=u[l]=c,delete a._keys,!0}})}function Il(t,e,n,i){const s={_cacheable:!1,_proxy:t,_context:e,_subProxy:n,_stack:new Set,_descriptors:RS(t,i),setContext:r=>Il(t,r,n,i),override:r=>Il(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 LS(r,o,()=>_8(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 RS(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:co(n)?n:()=>n,isIndexable:co(i)?i:()=>i}}const m8=(t,e)=>t?t+Y_(e):e,q_=(t,e)=>ut(e)&&t!=="adapters"&&(Object.getPrototypeOf(e)===null||e.constructor===Object);function LS(t,e,n){if(Object.prototype.hasOwnProperty.call(t,e)||e==="constructor")return t[e];const i=n();return t[e]=i,i}function _8(t,e,n){const{_proxy:i,_context:s,_subProxy:r,_descriptors:o}=t;let a=i[e];return co(a)&&o.isScriptable(e)&&(a=y8(e,a,t,n)),zt(a)&&a.length&&(a=v8(e,a,t,o.isIndexable)),q_(e,a)&&(a=Il(a,s,r&&r[e],o)),a}function y8(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),q_(t,l)&&(l=Z_(s._scopes,s,t,l)),l}function v8(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=Z_(c,s,t,u);e.push(Il(d,r,o&&o[t],a))}}return e}function OS(t,e,n){return co(t)?t(e,n):t}const b8=(t,e)=>t===!0?e:typeof t=="string"?lo(e,t):void 0;function w8(t,e,n,i,s){for(const r of e){const o=b8(n,r);if(o){t.add(o);const a=OS(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 Z_(t,e,n,i){const s=e._rootScopes,r=OS(e._fallback,n,i),o=[...t,...s],a=new Set;a.add(i);let l=Lb(a,o,n,r||n,i);return l===null||typeof r<"u"&&r!==n&&(l=Lb(a,o,r,l,i),l===null)?!1:X_(Array.from(a),[""],s,r,()=>x8(e,n,i))}function Lb(t,e,n,i,s){for(;n;)n=w8(t,e,n,i,s);return n}function x8(t,e,n){const i=t._getTarget();e in i||(i[e]={});const s=i[e];return zt(s)&&ut(n)?n:s||{}}function E8(t,e,n,i){let s;for(const r of e)if(s=$S(m8(r,t),n),typeof s<"u")return q_(t,s)?Z_(n,i,t,s):s}function $S(t,e){for(const n of e){if(!n)continue;const i=n[t];if(typeof i<"u")return i}}function Ob(t){let e=t._keys;return e||(e=t._keys=C8(t._scopes)),e}function C8(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 NS(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 T8(t,e,n,i){const s=t.skip?e:t,r=e,o=n.skip?e:n,a=im(r,s),l=im(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 A8(t,e,n){const i=t.length;let s,r,o,a,l,c=Dl(t,0);for(let u=0;u!c.skip)),e.cubicInterpolationMode==="monotone")M8(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 D8(t,e){return Af(t).getPropertyValue(e)}const R8=["top","right","bottom","left"];function sa(t,e,n){const i={};n=n?"-"+n:"";for(let s=0;s<4;s++){const r=R8[s];i[r]=parseFloat(t[e+"-"+r+n])||0}return i.width=i.left+i.right,i.height=i.top+i.bottom,i}const L8=(t,e,n)=>(t>0||e>0)&&(!n||!n.shadowRoot);function O8(t,e){const n=t.touches,i=n&&n.length?n[0]:t,{offsetX:s,offsetY:r}=i;let o=!1,a,l;if(L8(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 Yo(t,e){if("native"in t)return t;const{canvas:n,currentDevicePixelRatio:i}=e,s=Af(n),r=s.boxSizing==="border-box",o=sa(s,"padding"),a=sa(s,"border","width"),{x:l,y:c,box:u}=O8(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 $8(t,e,n){let i,s;if(e===void 0||n===void 0){const r=t&&Q_(t);if(!r)e=t.clientWidth,n=t.clientHeight;else{const o=r.getBoundingClientRect(),a=Af(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=kh(a.maxWidth,r,"clientWidth"),s=kh(a.maxHeight,r,"clientHeight")}}return{width:e,height:n,maxWidth:i||Th,maxHeight:s||Th}}const Id=t=>Math.round(t*10)/10;function N8(t,e,n,i){const s=Af(t),r=sa(s,"margin"),o=kh(s.maxWidth,t,"clientWidth")||Th,a=kh(s.maxHeight,t,"clientHeight")||Th,l=$8(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=Id(Math.min(c,o,l.maxWidth)),u=Id(Math.min(u,a,l.maxHeight)),c&&!u&&(u=Id(c/2)),(e!==void 0||n!==void 0)&&i&&l.height&&u>l.height&&(u=l.height,c=Id(Math.floor(u*i))),{width:c,height:u}}function $b(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 F8=function(){let t=!1;try{const e={get passive(){return t=!0,!1}};J_()&&(window.addEventListener("test",null,e),window.removeEventListener("test",null,e))}catch{}return t}();function Nb(t,e){const n=D8(t,e),i=n&&n.match(/^(\d+)(\.\d+)?px$/);return i?+i[1]:void 0}function Ho(t,e,n,i){return{x:t.x+n*(e.x-t.x),y:t.y+n*(e.y-t.y)}}function B8(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 V8(t,e,n,i){const s={x:t.cp2x,y:t.cp2y},r={x:e.cp1x,y:e.cp1y},o=Ho(t,s,n),a=Ho(s,r,n),l=Ho(r,e,n),c=Ho(o,a,n),u=Ho(a,l,n);return Ho(c,u,n)}const z8=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}}},W8=function(){return{x(t){return t},setWidth(t){},textAlign(t){return t},xPlus(t,e){return t+e},leftForLtr(t,e){return t}}};function cl(t,e,n){return t?z8(e,n):W8()}function BS(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 VS(t,e){e!==void 0&&(delete t.prevTextDirection,t.canvas.style.setProperty("direction",e[0],e[1]))}function zS(t){return t==="angle"?{between:gu,compare:YY,normalize:Si}:{between:lr,compare:(e,n)=>e-n,normalize:e=>e}}function Fb({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 Y8(t,e,n){const{property:i,start:s,end:r}=n,{between:o,normalize:a}=zS(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,x,v)&&a(s,x)!==0,w=()=>a(r,v)===0||l(r,x,v),S=()=>m||E(),T=()=>!m||w();for(let A=u,k=u;A<=d;++A)b=e[A%o],!b.skip&&(v=c(b[i]),v!==x&&(m=l(v,s,r),y===null&&S()&&(y=a(v,s)===0?A:k),y!==null&&T()&&(p.push(Fb({start:y,end:A,loop:h,count:o,style:f})),y=null),k=A,x=v));return y!==null&&p.push(Fb({start:y,end:d,loop:h,count:o,style:f})),p}function YS(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 j8(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 K8(t,e){const n=t.points,i=t.options.spanGaps,s=n.length;if(!s)return[];const r=!!t._loop,{start:o,end:a}=H8(n,s,r,i);if(i===!0)return Bb(t,[{start:o,end:a,loop:r}],n,e);const l=a{let t=0;return()=>t++})();function ft(t){return t===null||typeof t>"u"}function zt(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 en(t){return(typeof t=="number"||t instanceof Number)&&isFinite(+t)}function Ci(t,e){return en(t)?t:e}function it(t,e){return typeof t>"u"?e:t}const NY=(t,e)=>typeof t=="string"&&t.endsWith("%")?parseFloat(t)/100:+t/e,bS=(t,e)=>typeof t=="string"&&t.endsWith("%")?parseFloat(t)/100*e:+t;function Dt(t,e,n){if(t&&typeof t.call=="function")return t.apply(n,e)}function Tt(t,e,n,i){let s,r,o;if(zt(t))for(r=t.length,s=0;st,x:t=>t.x,y:t=>t.y};function VY(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 zY(t){const e=VY(t);return n=>{for(const i of e){if(i==="")break;n=n&&n[i]}return n}}function lo(t,e){return(Eb[e]||(Eb[e]=zY(e)))(t)}function Y_(t){return t.charAt(0).toUpperCase()+t.slice(1)}const fu=t=>typeof t<"u",co=t=>typeof t=="function",Cb=(t,e)=>{if(t.size!==e.size)return!1;for(const n of t)if(!e.has(n))return!1;return!0};function WY(t){return t.type==="mouseup"||t.type==="click"||t.type==="contextmenu"}const Ft=Math.PI,Nt=2*Ft,YY=Nt+Ft,Th=Number.POSITIVE_INFINITY,HY=Ft/180,cn=Ft/2,Lo=Ft/4,Sb=Ft*2/3,Gr=Math.log10,$s=Math.sign;function Uc(t,e,n){return Math.abs(t-e)s-r).pop(),e}function Pl(t){return!isNaN(parseFloat(t))&&isFinite(t)}function KY(t,e){const n=Math.round(t);return n-e<=t&&n+e>=t}function xS(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 cr=(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 qY(t,e,n){let i=0,s=t.length;for(;ii&&t[s-1]>n;)s--;return i>0||s{const i="_onData"+Y_(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 kb(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)&&(CS.forEach(r=>{delete t[r]}),delete t._chartjs)}function SS(t){const e=new Set(t);return e.size===t.length?t:Array.from(e)}const TS=function(){return typeof window>"u"?function(t){return t()}:window.requestAnimationFrame}();function AS(t,e){let n=[],i=!1;return function(...s){n=s,i||(i=!0,TS.call(window,()=>{i=!1,t.apply(e,n)}))}}function JY(t,e){let n;return function(...i){return e?(clearTimeout(n),n=setTimeout(t,e,i)):t.apply(this,i),e}}const K_=t=>t==="start"?"left":t==="end"?"right":"center",zn=(t,e,n)=>t==="start"?e:t==="end"?n:(e+n)/2,QY=(t,e,n,i)=>t===(i?"left":"right")?n:t==="center"?(e+n)/2:e;function kS(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=Dn(Math.min(cr(a,l,c).lo,n?i:cr(e,l,o.getPixelForValue(c)).lo),0,i-1)),h?r=Dn(Math.max(cr(a,o.axis,u,!0).hi+1,n?0:cr(e,l,o.getPixelForValue(u),!0).hi+1),s,i)-s:r=i-s}return{start:s,count:r}}function MS(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 Md=t=>t===0||t===1,Mb=(t,e,n)=>-(Math.pow(2,10*(t-=1))*Math.sin((t-e)*Nt/n)),Pb=(t,e,n)=>Math.pow(2,-10*t)*Math.sin((t-e)*Nt/n)+1,Gc={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*cn)+1,easeOutSine:t=>Math.sin(t*cn),easeInOutSine:t=>-.5*(Math.cos(Ft*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=>Md(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=>Md(t)?t:Mb(t,.075,.3),easeOutElastic:t=>Md(t)?t:Pb(t,.075,.3),easeInOutElastic(t){return Md(t)?t:t<.5?.5*Mb(t*2,.1125,.45):.5+.5*Pb(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-Gc.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?Gc.easeInBounce(t*2)*.5:Gc.easeOutBounce(t*2-1)*.5+.5};function U_(t){if(t&&typeof t=="object"){const e=t.toString();return e==="[object CanvasPattern]"||e==="[object CanvasGradient]"}return!1}function Ib(t){return U_(t)?t:new du(t)}function Kg(t){return U_(t)?t:new du(t).saturate(.5).darken(.1).hexString()}const e8=["x","y","borderWidth","radius","tension"],t8=["color","borderColor","backgroundColor"];function n8(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:t8},numbers:{type:"number",properties:e8}}),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 i8(t){t.set("layout",{autoPadding:!0,padding:{top:0,right:0,bottom:0,left:0}})}const Db=new Map;function s8(t,e){e=e||{};const n=t+JSON.stringify(e);let i=Db.get(n);return i||(i=new Intl.NumberFormat(t,e),Db.set(n,i)),i}function ju(t,e,n){return s8(e,n).format(t)}const PS={values(t){return zt(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=r8(t,n)}const o=Gr(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),ju(t,i,l)},logarithmic(t,e,n){if(t===0)return"0";const i=n[e].significand||t/Math.pow(10,Math.floor(Gr(t)));return[1,2,3,5,10,15].includes(i)||e>.8*n.length?PS.numeric.call(this,t,e,n):""}};function r8(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 Cf={formatters:PS};function o8(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:Cf.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 da=Object.create(null),sm=Object.create(null);function Xc(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)=>Kg(s.backgroundColor),this.hoverBorderColor=(i,s)=>Kg(s.borderColor),this.hoverColor=(i,s)=>Kg(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 Ug(this,e,n)}get(e){return Xc(this,e)}describe(e,n){return Ug(sm,e,n)}override(e,n){return Ug(da,e,n)}route(e,n,i,s){const r=Xc(this,e),o=Xc(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):it(l,c)},set(l){this[a]=l}}})}apply(e){e.forEach(n=>n(this))}}var tn=new a8({_scriptable:t=>!t.startsWith("on"),_indexable:t=>t!=="events",hover:{_fallback:"interaction"},interaction:{_scriptable:!1,_indexable:!1}},[n8,i8,o8]);function l8(t){return!t||ft(t.size)||ft(t.family)?null:(t.style?t.style+" ":"")+(t.weight?t.weight+" ":"")+t.size+"px "+t.family}function Ah(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 c8(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 ur(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,h8(t,r),l=0;l+t||0;function G_(t,e){const n={},i=ut(e),s=i?Object.keys(e):e,r=ut(t)?i?o=>it(t[o],t[e[o]]):o=>t[o]:()=>t;for(const o of s)n[o]=y8(r(o));return n}function DS(t){return G_(t,{top:"y",right:"x",bottom:"y",left:"x"})}function ia(t){return G_(t,["topLeft","topRight","bottomLeft","bottomRight"])}function Xn(t){const e=DS(t);return e.width=e.left+e.right,e.height=e.top+e.bottom,e}function xn(t,e){t=t||{},e=e||tn.font;let n=it(t.size,e.size);typeof n=="string"&&(n=parseInt(n,10));let i=it(t.style,e.style);i&&!(""+i).match(m8)&&(console.warn('Invalid font style specified: "'+i+'"'),i=void 0);const s={family:it(t.family,e.family),lineHeight:_8(it(t.lineHeight,e.lineHeight),n),size:n,style:i,weight:it(t.weight,e.weight),string:""};return s.string=l8(s),s}function Cc(t,e,n,i){let s,r,o;for(s=0,r=t.length;sn&&a===0?0:a+l;return{min:o(i,-Math.abs(r)),max:o(s,r)}}function vo(t,e){return Object.assign(Object.create(t),e)}function X_(t,e=[""],n,i,s=()=>t[0]){const r=n||t;typeof i>"u"&&(i=$S("_fallback",t));const o={[Symbol.toStringTag]:"Object",_cacheable:!0,_scopes:t,_rootScopes:r,_fallback:i,_getTarget:s,override:a=>X_([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 LS(a,l,()=>A8(l,e,t,a))},getOwnPropertyDescriptor(a,l){return Reflect.getOwnPropertyDescriptor(a._scopes[0],l)},getPrototypeOf(){return Reflect.getPrototypeOf(t[0])},has(a,l){return Ob(a).includes(l)},ownKeys(a){return Ob(a)},set(a,l,c){const u=a._storage||(a._storage=s());return a[l]=u[l]=c,delete a._keys,!0}})}function Il(t,e,n,i){const s={_cacheable:!1,_proxy:t,_context:e,_subProxy:n,_stack:new Set,_descriptors:RS(t,i),setContext:r=>Il(t,r,n,i),override:r=>Il(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 LS(r,o,()=>w8(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 RS(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:co(n)?n:()=>n,isIndexable:co(i)?i:()=>i}}const b8=(t,e)=>t?t+Y_(e):e,q_=(t,e)=>ut(e)&&t!=="adapters"&&(Object.getPrototypeOf(e)===null||e.constructor===Object);function LS(t,e,n){if(Object.prototype.hasOwnProperty.call(t,e)||e==="constructor")return t[e];const i=n();return t[e]=i,i}function w8(t,e,n){const{_proxy:i,_context:s,_subProxy:r,_descriptors:o}=t;let a=i[e];return co(a)&&o.isScriptable(e)&&(a=x8(e,a,t,n)),zt(a)&&a.length&&(a=E8(e,a,t,o.isIndexable)),q_(e,a)&&(a=Il(a,s,r&&r[e],o)),a}function x8(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),q_(t,l)&&(l=Z_(s._scopes,s,t,l)),l}function E8(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=Z_(c,s,t,u);e.push(Il(d,r,o&&o[t],a))}}return e}function OS(t,e,n){return co(t)?t(e,n):t}const C8=(t,e)=>t===!0?e:typeof t=="string"?lo(e,t):void 0;function S8(t,e,n,i,s){for(const r of e){const o=C8(n,r);if(o){t.add(o);const a=OS(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 Z_(t,e,n,i){const s=e._rootScopes,r=OS(e._fallback,n,i),o=[...t,...s],a=new Set;a.add(i);let l=Lb(a,o,n,r||n,i);return l===null||typeof r<"u"&&r!==n&&(l=Lb(a,o,r,l,i),l===null)?!1:X_(Array.from(a),[""],s,r,()=>T8(e,n,i))}function Lb(t,e,n,i,s){for(;n;)n=S8(t,e,n,i,s);return n}function T8(t,e,n){const i=t._getTarget();e in i||(i[e]={});const s=i[e];return zt(s)&&ut(n)?n:s||{}}function A8(t,e,n,i){let s;for(const r of e)if(s=$S(b8(r,t),n),typeof s<"u")return q_(t,s)?Z_(n,i,t,s):s}function $S(t,e){for(const n of e){if(!n)continue;const i=n[t];if(typeof i<"u")return i}}function Ob(t){let e=t._keys;return e||(e=t._keys=k8(t._scopes)),e}function k8(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 NS(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 P8(t,e,n,i){const s=t.skip?e:t,r=e,o=n.skip?e:n,a=im(r,s),l=im(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 I8(t,e,n){const i=t.length;let s,r,o,a,l,c=Dl(t,0);for(let u=0;u!c.skip)),e.cubicInterpolationMode==="monotone")R8(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 $8(t,e){return Af(t).getPropertyValue(e)}const N8=["top","right","bottom","left"];function sa(t,e,n){const i={};n=n?"-"+n:"";for(let s=0;s<4;s++){const r=N8[s];i[r]=parseFloat(t[e+"-"+r+n])||0}return i.width=i.left+i.right,i.height=i.top+i.bottom,i}const F8=(t,e,n)=>(t>0||e>0)&&(!n||!n.shadowRoot);function B8(t,e){const n=t.touches,i=n&&n.length?n[0]:t,{offsetX:s,offsetY:r}=i;let o=!1,a,l;if(F8(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 Yo(t,e){if("native"in t)return t;const{canvas:n,currentDevicePixelRatio:i}=e,s=Af(n),r=s.boxSizing==="border-box",o=sa(s,"padding"),a=sa(s,"border","width"),{x:l,y:c,box:u}=B8(t,n),d=o.left+(u&&a.left),h=o.top+(u&&a.top);let{width:g,height:p}=e;return r&&(g-=o.width+a.width,p-=o.height+a.height),{x:Math.round((l-d)/g*n.width/i),y:Math.round((c-h)/p*n.height/i)}}function V8(t,e,n){let i,s;if(e===void 0||n===void 0){const r=t&&Q_(t);if(!r)e=t.clientWidth,n=t.clientHeight;else{const o=r.getBoundingClientRect(),a=Af(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=kh(a.maxWidth,r,"clientWidth"),s=kh(a.maxHeight,r,"clientHeight")}}return{width:e,height:n,maxWidth:i||Th,maxHeight:s||Th}}const Id=t=>Math.round(t*10)/10;function z8(t,e,n,i){const s=Af(t),r=sa(s,"margin"),o=kh(s.maxWidth,t,"clientWidth")||Th,a=kh(s.maxHeight,t,"clientHeight")||Th,l=V8(t,e,n);let{width:c,height:u}=l;if(s.boxSizing==="content-box"){const h=sa(s,"border","width"),g=sa(s,"padding");c-=g.width+h.width,u-=g.height+h.height}return c=Math.max(0,c-r.width),u=Math.max(0,i?c/i:u-r.height),c=Id(Math.min(c,o,l.maxWidth)),u=Id(Math.min(u,a,l.maxHeight)),c&&!u&&(u=Id(c/2)),(e!==void 0||n!==void 0)&&i&&l.height&&u>l.height&&(u=l.height,c=Id(Math.floor(u*i))),{width:c,height:u}}function $b(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 W8=function(){let t=!1;try{const e={get passive(){return t=!0,!1}};J_()&&(window.addEventListener("test",null,e),window.removeEventListener("test",null,e))}catch{}return t}();function Nb(t,e){const n=$8(t,e),i=n&&n.match(/^(\d+)(\.\d+)?px$/);return i?+i[1]:void 0}function Ho(t,e,n,i){return{x:t.x+n*(e.x-t.x),y:t.y+n*(e.y-t.y)}}function Y8(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 H8(t,e,n,i){const s={x:t.cp2x,y:t.cp2y},r={x:e.cp1x,y:e.cp1y},o=Ho(t,s,n),a=Ho(s,r,n),l=Ho(r,e,n),c=Ho(o,a,n),u=Ho(a,l,n);return Ho(c,u,n)}const j8=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}}},K8=function(){return{x(t){return t},setWidth(t){},textAlign(t){return t},xPlus(t,e){return t+e},leftForLtr(t,e){return t}}};function cl(t,e,n){return t?j8(e,n):K8()}function BS(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 VS(t,e){e!==void 0&&(delete t.prevTextDirection,t.canvas.style.setProperty("direction",e[0],e[1]))}function zS(t){return t==="angle"?{between:gu,compare:UY,normalize:Si}:{between:lr,compare:(e,n)=>e-n,normalize:e=>e}}function Fb({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 U8(t,e,n){const{property:i,start:s,end:r}=n,{between:o,normalize:a}=zS(i),l=e.length;let{start:c,end:u,loop:d}=t,h,g;if(d){for(c+=l,u+=l,h=0,g=l;hl(s,x,v)&&a(s,x)!==0,w=()=>a(r,v)===0||l(r,x,v),S=()=>m||E(),T=()=>!m||w();for(let A=u,k=u;A<=d;++A)b=e[A%o],!b.skip&&(v=c(b[i]),v!==x&&(m=l(v,s,r),y===null&&S()&&(y=a(v,s)===0?A:k),y!==null&&T()&&(p.push(Fb({start:y,end:A,loop:h,count:o,style:g})),y=null),k=A,x=v));return y!==null&&p.push(Fb({start:y,end:d,loop:h,count:o,style:g})),p}function YS(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 X8(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 q8(t,e){const n=t.points,i=t.options.spanGaps,s=n.length;if(!s)return[];const r=!!t._loop,{start:o,end:a}=G8(n,s,r,i);if(i===!0)return Bb(t,[{start:o,end:a,loop:r}],n,e);const l=aa({chart:e,initial:n.initial,numSteps:o,currentStep:Math.min(i-n.start,o)}))}_refresh(){this._request||(this._running=!0,this._request=TS.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 Zs=new X8;const zb="transparent",q8={boolean(t,e,n){return n>.5?e:t},color(t,e,n){const i=Ib(t||zb),s=i.valid&&Ib(e||zb);return s&&s.valid?s.mix(i,n).hexString():e},number(t,e,n){return t+(e-t)*n}};class Z8{constructor(e,n,i,s){const r=n[i];s=Cc([e.to,s,r,e.from]);const o=Cc([e.from,r,s]);this._active=!0,this._fn=e.fn||q8[e.type||typeof o],this._easing=Gc[e.easing]||Gc.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=Cc([e.to,n,s,e.from]),this._from=Cc([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];(zt(r.properties)&&r.properties||[s]).forEach(a=>{(a===s||!i.has(a))&&i.set(a,o)})})}_animateOptions(e,n){const i=n.options,s=Q8(e,i);if(!s)return[];const r=this._createAnimations(s,i);return i.$shared&&J8(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 Z8(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 Zs.add(this._chart,i),!0}}function J8(t,e){const n=[],i=Object.keys(e);for(let s=0;s0||!n&&r<0)return s.index}return null}function Kb(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=iH(r,o,i),d=e.length;let h;for(let f=0;fn[i].axis===e).shift()}function oH(t,e){return vo(t,{active:!1,dataset:void 0,datasetIndex:e,index:e,mode:"default",type:"dataset"})}function aH(t,e,n){return vo(t,{active:!1,dataIndex:e,parsed:void 0,raw:void 0,element:n,index:e,mode:"default",type:"data"})}function hc(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 Xg=t=>t==="reset"||t==="none",Ub=(t,e)=>e?t:Object.assign({},t),lH=(t,e,n)=>t&&!e.hidden&&e._stacked&&{keys:jS(n,!0),values:null};class bo{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=Hb(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&&hc(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=it(i.xAxisID,Gg(e,"x")),o=n.yAxisID=it(i.yAxisID,Gg(e,"y")),a=n.rAxisID=it(i.rAxisID,Gg(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&&kb(this._data,this),e._stacked&&hc(e)}_dataCheck(){const e=this.getDataset(),n=e.data||(e.data=[]),i=this._data;if(ut(n)){const s=this._cachedMeta;this._data=nH(n,s)}else if(i!==n){if(i){kb(i,this);const s=this._cachedMeta;hc(s),s._parsed=[]}n&&Object.isExtensible(n)&&UY(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=Hb(n.vScale,n),n.stack!==i.stack&&(s=!0,hc(n),n.stack=i.stack),this._resyncElements(e),(s||r!==n._stacked)&&Kb(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{zt(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(Ub(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 HS(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||Xg(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){Xg(s)?Object.assign(e,i):this._resolveAnimations(n,s).update(e,i)}updateSharedOptions(e,n,i){e&&!Xg(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 uH(t){const e=t.iScale,n=cH(e,t.type);let i=e._length,s,r,o,a;const l=()=>{o===32767||o===-32768||(fu(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 KS(t,e,n,i){return zt(t)?fH(t,e,n,i):e[n.axis]=n.parse(t,i),e}function Gb(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 pH(t){let e,n,i,s,r;return t.horizontal?(e=t.base>t.x,n="left",i="right"):(e=t.baseu.controller.options.grouped),r=i.options.stacked,o=[],a=this._cachedMeta.controller.getParsed(n),l=a&&a[i.axis],c=u=>{const d=u._parsed.find(f=>f[i.axis]===l),h=d&&d[u.vScale.axis];if(ft(h)||isNaN(h))return!0};for(const u of s)if(!(n!==void 0&&c(u))&&((r===!1||o.indexOf(u.stack)===-1||r===void 0&&u.stack===void 0)&&o.push(u.stack),u.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;hgu(x,a,l,!0)?1:Math.max(E,E*n,w,w*n),p=(x,E,w)=>gu(x,a,l,!0)?-1:Math.min(E,E*n,w,w*n),m=f(0,c,d),y=f(cn,u,h),v=p(Ft,c,d),b=p(Ft+cn,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 GS extends bo{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=>+lo(i[c],l)}let o,a;for(o=e,a=e+n;o0&&!isNaN(e)?Nt*(Math.abs(e)/n):0}getLabelAndValue(e){const n=this._cachedMeta,i=this.chart,s=i.data.labels||[],r=ju(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 A=this.getParsed(w),k=ft(A[f]),P=T[h]=o.getPixelForValue(A[h],w),B=T[f]=r||k?a.getBasePixel():a.getPixelForValue(l?this.applyStack(a,A,l):A[f],w);T.skip=isNaN(P)||isNaN(B)||k,T.stop=w>0&&Math.abs(A[h]-E[h])>y,m&&(T.parsed=A,T.raw=c.data[w]),d&&(T.options=u||this.resolveDataElementOptions(w,S.active?"active":s)),v||this.updateElement(S,w,T,s),E=A}}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 wH extends bo{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=ju(n._parsed[e].r,i.options.locale);return{label:s[e]||"",value:r}}parseObjectData(e,n,i,s){return NS.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*Ft;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 xH extends GS{static id="pie";static defaults={cutout:0,rotation:0,circumference:360,radius:"100%"}}class EH extends bo{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 NS.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 E=n;E0&&Math.abs(S[f]-x[f])>v,y&&(T.parsed=S,T.raw=c.data[E]),h&&(T.options=d||this.resolveDataElementOptions(E,w.active?"active":s)),b||this.updateElement(w,E,T,s),x=S}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 $o(){throw new Error("This method is not implemented: Check that a complete date adapter is provided.")}class ey{static override(e){Object.assign(ey.prototype,e)}options;constructor(e){this.options=e||{}}init(){}formats(){return $o()}parse(){return $o()}format(){return $o()}add(){return $o()}diff(){return $o()}startOf(){return $o()}endOf(){return $o()}}var SH={_date:ey};function TH(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?jY:cr;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 Ku(t,e,n,i,s){const r=t.getSortedVisibleDatasetMetas(),o=n[e];for(let a=0,l=r.length;a{l[o]&&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 PH={evaluateInteractionItems:Ku,modes:{index(t,e,n,i){const s=Yo(e,t),r=n.axis||"x",o=n.includeInvisible||!1,a=n.intersect?Zg(t,s,r,i,o):Jg(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=Yo(e,t),r=n.axis||"xy",o=n.includeInvisible||!1;let a=n.intersect?Zg(t,s,r,i,o):Jg(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 Jb(t,e){return t.filter(n=>qS.indexOf(n.pos)===-1&&n.box.axis===e)}function gc(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 IH(t){const e=[];let n,i,s,r,o,a;for(n=0,i=(t||[]).length;nc.box.fullSize),!0),i=gc(fc(e,"left"),!0),s=gc(fc(e,"right")),r=gc(fc(e,"top"),!0),o=gc(fc(e,"bottom")),a=Jb(e,"x"),l=Jb(e,"y");return{fullSize:n,leftAndTop:i.concat(r),rightAndBottom:s.concat(l).concat(o).concat(a),chartArea:fc(e,"chartArea"),vertical:i.concat(s).concat(l),horizontal:r.concat(o).concat(a)}}function Qb(t,e,n,i){return Math.max(t[n],e[n])+Math.max(t[i],e[i])}function ZS(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 OH(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&&ZS(o,r.getPadding());const a=Math.max(0,e.outerWidth-Qb(o,t,"left","right")),l=Math.max(0,e.outerHeight-Qb(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 $H(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 NH(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 Sc(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);ZS(h,Xn(i));const f=Object.assign({maxPadding:h,w:r,h:o,x:s.left,y:s.top},s),p=RH(l.concat(c),d);Sc(a.fullSize,f,d,p),Sc(l,f,d,p),Sc(c,f,d,p)&&Sc(l,f,d,p),$H(f),e1(a.leftAndTop,f,d,p),f.x+=f.w,f.y+=f.h,e1(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},Tt(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 JS{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 FH extends JS{acquireContext(e){return e&&e.getContext&&e.getContext("2d")||null}updateConfig(e){e.options.animation=!1}}const lh="$chartjs",BH={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"},t1=t=>t===null||t==="";function VH(t,e){const n=t.style,i=t.getAttribute("height"),s=t.getAttribute("width");if(t[lh]={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",t1(s)){const r=Nb(t,"width");r!==void 0&&(t.width=r)}if(t1(i))if(t.style.height==="")t.height=t.width/(e||2);else{const r=Nb(t,"height");r!==void 0&&(t.height=r)}return t}const QS=F8?{passive:!0}:!1;function zH(t,e,n){t&&t.addEventListener(e,n,QS)}function WH(t,e,n){t&&t.canvas&&t.canvas.removeEventListener(e,n,QS)}function YH(t,e){const n=BH[t.type]||t.type,{x:i,y:s}=Yo(t,e);return{type:n,chart:e,native:t,x:i!==void 0?i:null,y:s!==void 0?s:null}}function Mh(t,e){for(const n of t)if(n===e||n.contains(e))return!0}function HH(t,e,n){const i=t.canvas,s=new MutationObserver(r=>{let o=!1;for(const a of r)o=o||Mh(a.addedNodes,i),o=o&&!Mh(a.removedNodes,i);o&&n()});return s.observe(document,{childList:!0,subtree:!0}),s}function jH(t,e,n){const i=t.canvas,s=new MutationObserver(r=>{let o=!1;for(const a of r)o=o||Mh(a.removedNodes,i),o=o&&!Mh(a.addedNodes,i);o&&n()});return s.observe(document,{childList:!0,subtree:!0}),s}const mu=new Map;let n1=0;function eT(){const t=window.devicePixelRatio;t!==n1&&(n1=t,mu.forEach((e,n)=>{n.currentDevicePixelRatio!==t&&e()}))}function KH(t,e){mu.size||window.addEventListener("resize",eT),mu.set(t,e)}function UH(t){mu.delete(t),mu.size||window.removeEventListener("resize",eT)}function GH(t,e,n){const i=t.canvas,s=i&&Q_(i);if(!s)return;const r=AS((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),KH(t,r),o}function Qg(t,e,n){n&&n.disconnect(),e==="resize"&&UH(t)}function XH(t,e,n){const i=t.canvas,s=AS(r=>{t.ctx!==null&&n(YH(r,t))},t);return zH(i,e,s),s}class qH extends JS{acquireContext(e,n){const i=e&&e.getContext&&e.getContext("2d");return i&&i.canvas===e?(VH(e,n),i):null}releaseContext(e){const n=e.canvas;if(!n[lh])return!1;const i=n[lh].initial;["height","width"].forEach(r=>{const o=i[r];ft(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[lh],!0}addEventListener(e,n,i){this.removeEventListener(e,n);const s=e.$proxies||(e.$proxies={}),o={attach:HH,detach:jH,resize:GH}[n]||XH;s[n]=o(e,n,i)}removeEventListener(e,n){const i=e.$proxies||(e.$proxies={}),s=i[n];if(!s)return;({attach:Qg,detach:Qg,resize:Qg}[n]||WH)(e,n,s),i[n]=void 0}getDevicePixelRatio(){return window.devicePixelRatio}getMaximumSize(e,n,i,s){return N8(e,n,i,s)}isAttached(e){const n=e&&Q_(e);return!!(n&&n.isConnected)}}function ZH(t){return!J_()||typeof OffscreenCanvas<"u"&&t instanceof OffscreenCanvas?FH:qH}let xr=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 Pl(this.x)&&Pl(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 JH(t,e){const n=t.options.ticks,i=QH(t),s=Math.min(n.maxTicksLimit||i,i),r=n.major.enabled?tj(e):[],o=r.length,a=r[0],l=r[o-1],c=[];if(o>s)return nj(e,c,r,o/s),c;const u=ej(r,e,s);if(o>0){let d,h;const f=o>1?Math.round((l-a)/(o-1)):null;for(Rd(e,c,u,ft(f)?0:a-f,a),d=0,h=o-1;ds)return l}return Math.max(s,1)}function tj(t){const e=[];let n,i;for(n=0,i=t.length;nt==="left"?"right":t==="right"?"left":t,i1=(t,e,n)=>e==="top"||e==="left"?t[e]+n:t[e]-n,s1=(t,e)=>Math.min(e||t,t);function r1(t,e){const n=[],i=t.length/e,s=t.length;let r=0;for(;ro+a)))return l}function oj(t,e){Tt(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:Ci(n,Ci(i,n)),max:Ci(i,Ci(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(){Dt(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=p8(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=Dn(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-pc(e.grid)-n.padding-o1(e.title,this.chart.options.font),c=Math.sqrt(d*d+h*h),o=H_(Math.min(Math.asin(Dn((u.highest.height+6)/a,-1,1)),Math.asin(Dn(l/c,-1,1))-Math.asin(Dn(h/c,-1,1)))),o=Math.max(s,Math.min(r,o))),this.labelRotation=o}afterCalculateLabelRotation(){Dt(this.options.afterCalculateLabelRotation,[this])}afterAutoSkip(){}beforeFit(){Dt(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=o1(s,n.options.font);if(a?(e.width=this.maxWidth,e.height=pc(r)+l):(e.height=this.maxHeight,e.width=pc(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(){Dt(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[k]||0,height:a[k]||0});return{first:A(0),last:A(n-1),widest:A(S),highest:A(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 HY(this._alignToPixels?Oo(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=pc(r),f=[],p=a.setContext(this.getContext()),m=p.display?p.width:0,y=m/2,v=function(D){return Oo(i,D,m)};let b,x,E,w,S,T,A,k,P,B,Y,ne;if(o==="top")b=v(this.bottom),T=this.bottom-h,k=b-y,B=v(e.top)+y,ne=e.bottom;else if(o==="bottom")b=v(this.top),B=e.top,ne=v(e.bottom)-y,T=b+y,k=this.top+h;else if(o==="left")b=v(this.right),S=this.right-h,A=b-y,P=v(e.left)+y,Y=e.right;else if(o==="right")b=v(this.left),P=e.left,Y=v(e.right)-y,S=b+y,A=this.left+h;else if(n==="x"){if(o==="center")b=v((e.top+e.bottom)/2+.5);else if(ut(o)){const D=Object.keys(o)[0],z=o[D];b=v(this.chart.scales[D].getPixelForValue(z))}B=e.top,ne=e.bottom,T=b+y,k=T+h}else if(n==="y"){if(o==="center")b=v((e.left+e.right)/2);else if(ut(o)){const D=Object.keys(o)[0],z=o[D];b=v(this.chart.scales[D].getPixelForValue(z))}S=b-y,A=S-h,P=e.left,Y=e.right}const $=it(s.ticks.maxTicksLimit,d),F=Math.max(1,Math.ceil(d/$));for(x=0;x0&&(ue-=I/2);break}le={left:ue,top:ee,width:I+ie.width,height:te+ie.height,color:F.backdropColor}}y.push({label:E,font:k,textOffset:Y,options:{rotation:m,color:z,strokeColor:X,strokeWidth:Z,textAlign:H,textBaseline:ne,translation:[w,S],backdrop:le}})}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(".");tn.route(r,s,l,a)})}function fj(t){return"id"in t&&"defaults"in t}class gj{constructor(){this.controllers=new Ld(bo,"datasets",!0),this.elements=new Ld(xr,"elements"),this.plugins=new Ld(Object,"plugins"),this.scales=new Ld(va,"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):Tt(s,o=>{const a=i||this._getRegistryForType(o);this._exec(e,a,o)})})}_exec(e,n,i){const s=Y_(e);Dt(i["before"+s],[],i),n[e](i),Dt(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 mj(t){const e={},n=[],i=Object.keys(xs.plugins.items);for(let r=0;r1&&a1(t[0].toLowerCase());if(i)return i}throw new Error(`Cannot determine type of '${t}' axis. Please provide 'axis' or 'position' option.`)}function l1(t,e,n){if(n[e+"AxisID"]===t)return{axis:e}}function Ej(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 l1(t,"x",n[0])||l1(t,"y",n[0])}return{}}function Cj(t,e){const n=da[t.type]||{scales:{}},i=e.scales||{},s=om(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=am(o,a,Ej(o,t),tn.scales[a.type]),c=wj(l,s),u=n.scales||{};r[o]=Kc(Object.create(null),[{axis:l},a,u[l],u[c]])}),t.data.datasets.forEach(o=>{const a=o.type||t.type,l=o.indexAxis||om(a,e),u=(da[a]||{}).scales||{};Object.keys(u).forEach(d=>{const h=bj(d,l),f=o[h+"AxisID"]||h;r[f]=r[f]||Object.create(null),Kc(r[f],[{axis:h},i[f],u[d]])})}),Object.keys(r).forEach(o=>{const a=r[o];Kc(a,[tn.scales[a.type],tn.scale])}),r}function tT(t){const e=t.options||(t.options={});e.plugins=it(e.plugins,{}),e.scales=Cj(t,e)}function nT(t){return t=t||{},t.datasets=t.datasets||[],t.labels=t.labels||[],t}function Sj(t){return t=t||{},t.data=nT(t.data),tT(t),t}const c1=new Map,iT=new Set;function Od(t,e){let n=c1.get(t);return n||(n=e(),c1.set(t,n),iT.add(n)),n}const mc=(t,e,n)=>{const i=lo(e,n);i!==void 0&&t.add(i)};let Tj=class{constructor(e){this._config=Sj(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=nT(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(),tT(e)}clearCache(){this._scopeCache.clear(),this._resolverCache.clear()}datasetScopeKeys(e){return Od(e,()=>[[`datasets.${e}`,""]])}datasetAnimationScopeKeys(e,n){return Od(`${e}.transition.${n}`,()=>[[`datasets.${e}.transitions.${n}`,`transitions.${n}`],[`datasets.${e}`,""]])}datasetElementScopeKeys(e,n){return Od(`${e}-${n}`,()=>[[`datasets.${e}.elements.${n}`,`datasets.${e}`,`elements.${n}`,""]])}pluginScopeKeys(e){const n=e.id,i=this.type;return Od(`${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=>mc(l,e,d))),u.forEach(d=>mc(l,s,d)),u.forEach(d=>mc(l,da[r]||{},d)),u.forEach(d=>mc(l,tn,d)),u.forEach(d=>mc(l,sm,d))});const c=Array.from(l);return c.length===0&&c.push(Object.create(null)),iT.has(n)&&o.set(n,c),c}chartOptionScopes(){const{options:e,type:n}=this;return[e,da[n]||{},tn.datasets[n]||{},{type:n},tn,sm]}resolveNamedOptions(e,n,i,s=[""]){const r={$shared:!0},{resolver:o,subPrefixes:a}=u1(this._resolverCache,e,s);let l=o;if(kj(o,n)){r.$shared=!1,i=co(i)?i():i;const c=this.createResolver(e,i,a);l=Il(o,i,c)}for(const c of n)r[c]=l[c];return r}createResolver(e,n,i=[""],s){const{resolver:r}=u1(this._resolverCache,e,i);return ut(n)?Il(r,n,void 0,s):r}};function u1(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:X_(e,n),subPrefixes:n.filter(a=>!a.toLowerCase().includes("hover"))},i.set(s,r)),r}const Aj=t=>ut(t)&&Object.getOwnPropertyNames(t).some(e=>co(t[e]));function kj(t,e){const{isScriptable:n,isIndexable:i}=RS(t);for(const s of e){const r=n(s),o=i(s),a=(o||r)&&t[s];if(r&&(co(a)||Aj(a))||o&&zt(a))return!0}return!1}var Mj="4.4.4";const Pj=["top","bottom","left","right","chartArea"];function d1(t,e){return t==="top"||t==="bottom"||Pj.indexOf(t)===-1&&e==="x"}function h1(t,e){return function(n,i){return n[t]===i[t]?n[e]-i[e]:n[t]-i[t]}}function f1(t){const e=t.chart,n=e.options.animation;e.notifyPlugins("afterRender"),Dt(n&&n.onComplete,[t],e)}function Ij(t){const e=t.chart,n=e.options.animation;Dt(n&&n.onProgress,[t],e)}function sT(t){return J_()&&typeof t=="string"?t=document.getElementById(t):t&&t.length&&(t=t[0]),t&&t.canvas&&(t=t.canvas),t}const ch={},g1=t=>{const e=sT(t);return Object.values(ch).filter(n=>n.canvas===e).pop()};function Dj(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 Rj(t,e,n,i){return!n||t.type==="mouseout"?null:i?e:t}function $d(t,e,n){return t.options.clip?t[n]:e[n]}function Lj(t,e){const{xScale:n,yScale:i}=t;return n&&i?{left:$d(n,e,"left"),right:$d(n,e,"right"),top:$d(i,e,"top"),bottom:$d(i,e,"bottom")}:e}let kf=class{static defaults=tn;static instances=ch;static overrides=da;static registry=xs;static version=Mj;static getChart=g1;static register(...e){xs.add(...e),p1()}static unregister(...e){xs.remove(...e),p1()}constructor(e,n){const i=this.config=new Tj(n),s=sT(e),r=g1(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||ZH(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=DY(),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 pj,this.$proxies={},this._hiddenIndices={},this.attached=!1,this._animationsDisabled=void 0,this.$context=void 0,this._doResize=GY(d=>this.update(d),o.resizeDelay||0),this._dataChanges=[],ch[this.id]=this,!a||!l){console.error("Failed to create chart: can't acquire context from the given item");return}Zs.listen(this,"complete",f1),Zs.listen(this,"progress",Ij),this._initialize(),this.attached&&this.update()}get aspectRatio(){const{options:{aspectRatio:e,maintainAspectRatio:n},width:i,height:s,_aspectRatio:r}=this;return ft(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 xs}_initialize(){return this.notifyPlugins("beforeInit"),this.options.responsive?this.resize():$b(this,this.options.devicePixelRatio),this.bindEvents(),this.notifyPlugins("afterInit"),this}clear(){return Rb(this.canvas,this.ctx),this}stop(){return Zs.stop(this),this}resize(e,n){Zs.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,$b(this,a,!0)&&(this.notifyPlugins("resize",{size:o}),Dt(i.onResize,[this,o],this),this.attached&&this._doResize(l)&&this.render())}ensureScalesHaveIDs(){const n=this.options.scales||{};Tt(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=am(o,a),c=l==="r",u=l==="x";return{options:a,dposition:c?"chartArea":u?"bottom":"left",dtype:c?"radialLinear":u?"category":"linear"}}))),Tt(r,o=>{const a=o.options,l=a.id,c=am(l,a),u=it(a.type,o.dtype);(a.position===void 0||d1(a.position,c)!==d1(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=xs.getScale(u);d=new h({id:l,type:u,ctx:this.ctx,chart:this}),i[d.id]=d}d.init(a,e)}),Tt(s,(o,a)=>{o||delete i[a]}),Tt(i,o=>{Vi.configure(this,o,o.options),Vi.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(h1("z","_idx"));const{_active:a,_lastEvent:l}=this;l?this._eventHandler(l,!0):a.length&&this._updateHoverStyles(a,a,!0),this.render()}_updateScales(){Tt(this.scales,e=>{Vi.removeBox(this,e)}),this.ensureScalesHaveIDs(),this.buildOrUpdateScales()}_checkEventBindings(){const e=this.options,n=new Set(Object.keys(this._listeners)),i=new Set(e.events);(!Cb(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;Dj(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;Vi.update(this,this.width,this.height,e);const n=this.chartArea,i=n.width<=0||n.height<=0;this._layers=[],Tt(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=Lj(e,this.chartArea),o={meta:e,index:e.index,cancelable:!0};this.notifyPlugins("beforeDatasetDraw",o)!==!1&&(s&&Sf(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&&Tf(n),o.cancelable=!1,this.notifyPlugins("afterDatasetDraw",o))}isPointInArea(e){return ur(e,this.chartArea,this._minPadding)}getElementsAtEventForMode(e,n,i,s){const r=PH.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=vo(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);fu(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(),Zs.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)};Tt(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(){Tt(this._listeners,(e,n)=>{this.platform.removeEventListener(this,n,e)}),this._listeners={},Tt(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}});!Ch(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=FY(e),c=Rj(e,this._lastEvent,i,l);i&&(this._lastEvent=null,Dt(r.onHover,[e,a,this],this),l&&Dt(r.onClick,[e,a,this],this));const u=!Ch(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 p1(){return Tt(kf.instances,t=>t._plugins.invalidate())}function Oj(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+cn,i-cn),t.closePath(),t.clip()}function $j(t){return G_(t,["outerStart","outerEnd","innerStart","innerEnd"])}function Nj(t,e,n,i){const s=$j(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 Dn(l,0,Math.min(r,c))};return{outerStart:a(s.outerStart),outerEnd:a(s.outerEnd),innerStart:Dn(s.innerStart,0,o),innerEnd:Dn(s.innerEnd,0,o)}}function $a(t,e,n,i){return{x:n+t*Math.cos(e),y:i+t*Math.sin(e)}}function Ph(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 F=u>0?u-i:0,D=d>0?d-i:0,z=(F+D)/2,X=z!==0?p*z/(z+i):p;f=(p-X)/2}const m=Math.max(.001,p*d-n/Ft)/d,y=(p-m)/2,v=l+y+f,b=s-y-f,{outerStart:x,outerEnd:E,innerStart:w,innerEnd:S}=Nj(e,h,d,b-v),T=d-x,A=d-E,k=v+x/T,P=b-E/A,B=h+w,Y=h+S,ne=v+w/B,$=b-S/Y;if(t.beginPath(),r){const F=(k+P)/2;if(t.arc(o,a,d,k,F),t.arc(o,a,d,F,P),E>0){const Z=$a(A,P,o,a);t.arc(Z.x,Z.y,E,P,b+cn)}const D=$a(Y,b,o,a);if(t.lineTo(D.x,D.y),S>0){const Z=$a(Y,$,o,a);t.arc(Z.x,Z.y,S,b+cn,$+Math.PI)}const z=(b-S/h+(v+w/h))/2;if(t.arc(o,a,h,b-S/h,z,!0),t.arc(o,a,h,z,v+w/h,!0),w>0){const Z=$a(B,ne,o,a);t.arc(Z.x,Z.y,w,ne+Math.PI,v-cn)}const X=$a(T,v,o,a);if(t.lineTo(X.x,X.y),x>0){const Z=$a(T,k,o,a);t.arc(Z.x,Z.y,x,v-cn,k)}}else{t.moveTo(o,a);const F=Math.cos(k)*d+o,D=Math.sin(k)*d+a;t.lineTo(F,D);const z=Math.cos(P)*d+o,X=Math.sin(P)*d+a;t.lineTo(z,X)}t.closePath()}function Fj(t,e,n,i,s){const{fullCircles:r,startAngle:o,circumference:a}=e;let l=e.endAngle;if(r){Ph(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}=ES(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,f=it(d,l-a),p=gu(r,a,l)&&a!==l,m=f>=Nt||p,y=lr(o,c+h,u+h);return m&&y}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>Nt?Math.floor(i/Nt):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(Ft,i||0)),c=s*l;e.fillStyle=n.backgroundColor,e.strokeStyle=n.borderColor,Fj(e,this,c,r,o),Bj(e,this,c,r,o),e.restore()}}function rT(t,e,n=e){t.lineCap=it(n.borderCapStyle,e.borderCapStyle),t.setLineDash(it(n.borderDash,e.borderDash)),t.lineDashOffset=it(n.borderDashOffset,e.borderDashOffset),t.lineJoin=it(n.borderJoinStyle,e.borderJoinStyle),t.lineWidth=it(n.borderWidth,e.borderWidth),t.strokeStyle=it(n.borderColor,e.borderColor)}function zj(t,e,n){t.lineTo(n.x,n.y)}function Wj(t){return t.stepped?o8:t.tension||t.cubicInterpolationMode==="monotone"?a8:zj}function oT(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-E:E))%r,x=()=>{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 E=f.x,w=f.y,S=E|0;S===p?(wy&&(y=w),u=(d*u+E)/++d):(x(),t.lineTo(E,w),p=S,d=0,m=y=w),v=w}x()}function lm(t){const e=t.options,n=e.borderDash&&e.borderDash.length;return!t._decimated&&!t._loop&&!e.tension&&e.cubicInterpolationMode!=="monotone"&&!e.stepped&&!n?Hj:Yj}function jj(t){return t.stepped?B8:t.tension||t.cubicInterpolationMode==="monotone"?V8:Ho}function Kj(t,e,n,i){let s=e._path;s||(s=e._path=new Path2D,e.path(s,n,i)&&s.closePath()),rT(t,e.options),t.stroke(s)}function Uj(t,e,n,i){const{segments:s,options:r}=e,o=lm(e);for(const a of s)rT(t,r,a.style),t.beginPath(),o(t,e,a,{start:n,end:n+i-1})&&t.closePath(),t.stroke()}const Gj=typeof Path2D=="function";function Xj(t,e,n,i){Gj&&!e.options.segment?Kj(t,e,n,i):Uj(t,e,n,i)}class Mf extends xr{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;I8(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=K8(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=YS(this,{property:n,start:s,end:s});if(!o.length)return;const a=[],l=jj(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 sK(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,E=t[v].x-b;for(o=e;om&&(m=c,h=o),s=(r*s+a.x)/++r;else{const S=o-1;if(!ft(d)&&!ft(h)){const T=Math.min(d,h),A=Math.max(d,h);T!==f&&T!==S&&y.push({...t[T],x:s}),A!==f&&A!==S&&y.push({...t[A],x:s})}o>0&&S!==f&&y.push(t[S]),y.push(a),u=w,r=0,p=m=c,d=h=f=o}}return y}function lT(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 _1(t){t.data.datasets.forEach(e=>{lT(e)})}function rK(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=Dn(cr(e,r.axis,o).lo,0,n-1)),c?s=Dn(cr(e,r.axis,a).hi+1,i,n)-i:s=n-i,{start:i,count:s}}var oK={id:"decimation",defaults:{algorithm:"min-max",enabled:!1},beforeElementsUpdate:(t,e,n)=>{if(!n.enabled){_1(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(Cc([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}=rK(l,c);const f=n.threshold||4*i;if(h<=f){lT(s);return}ft(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=iK(c,d,h,i,n);break;case"min-max":p=sK(c,d,h,i);break;default:throw new Error(`Unsupported decimation algorithm '${n.algorithm}'`)}s._decimated=p})},destroy(t){_1(t)}};function aK(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=ty(l,c,s);const u=cm(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=YS(e,u);for(const h of d){const f=cm(n,r[h.start],r[h.end],h.loop),p=WS(a,s,f);for(const m of p)o.push({source:m,target:h,start:{[n]:y1(u,f,"start",Math.max)},end:{[n]:y1(u,f,"end",Math.min)}})}}return o}function cm(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 lK(t,e){const{x:n=null,y:i=null}=t||{},s=e.points,r=[];return e.segments.forEach(({start:o,end:a})=>{a=ty(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 ty(t,e,n){for(;e>t;e--){const i=n[e];if(!isNaN(i.x)&&!isNaN(i.y))break}return e}function y1(t,e,n,i){return t&&e?i(t[n],e[n]):t?t[n]:e?e[n]:0}function cT(t,e){let n=[],i=!1;return zt(t)?(i=!0,n=t):n=lK(t,e),n.length?new Mf({points:n,options:{tension:0},_loop:i,_fullLoop:i}):null}function v1(t){return t&&t.fill!==!1}function cK(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(!en(s))return s;if(o=t[s],!o)return!1;if(o.visible)return s;r.push(s),s=o.fill}return!1}function uK(t,e,n){const i=gK(t);if(ut(i))return isNaN(i.value)?!1:i;let s=parseFloat(i);return en(s)&&Math.floor(s)===s?dK(i[0],e,s,n):["origin","start","end","stack","shape"].indexOf(i)>=0&&i}function dK(t,e,n,i){return(t==="-"||t==="+")&&(n=e+n),n===e||n<0||n>=i?!1:n}function hK(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 fK(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 gK(t){const e=t.options,n=e.fill;let i=it(n&&n.target,n);return i===void 0&&(i=!!e.backgroundColor),i===!1||i===null?!1:i===!0?"origin":i}function pK(t){const{scale:e,index:n,line:i}=t,s=[],r=i.segments,o=i.points,a=mK(e,n);a.push(cT({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&&np(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;v1(r)&&np(t.ctx,r,t.chartArea)}},beforeDatasetDraw(t,e,n){const i=e.meta.$filler;!v1(i)||n.drawTime!=="beforeDatasetDraw"||np(t.ctx,i,t.chartArea)},defaults:{propagate:!0,drawTime:"beforeDatasetDraw"}};const E1=(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)}},AK=(t,e)=>t!==null&&e!==null&&t.datasetIndex===e.datasetIndex&&t.index===e.index;class C1 extends xr{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=Dt(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=xn(i.font),r=s.size,o=this._computeTitleHeight(),{boxWidth:a,itemHeight:l}=E1(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:x}=kK(i,n,r,y,s);v>0&&f+x+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:x},h=Math.max(h,b),f+=x+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=cl(r,this.left,this.width);if(this.isHorizontal()){let a=0,l=zn(i,this.left+s,this.right-this.lineWidths[a]);for(const c of n)a!==c.row&&(a=c.row,l=zn(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=zn(i,this.top+e+s,this.bottom-this.columnSizes[a].height);for(const c of n)c.col!==a&&(a=c.col,l=zn(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;Sf(e,this),this._draw(),Tf(e)}}_draw(){const{options:e,columnSizes:n,lineWidths:i,ctx:s}=this,{align:r,labels:o}=e,a=tn.color,l=cl(e.rtl,this.left,this.width),c=xn(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}=E1(o,d),v=function(S,T,A){if(isNaN(p)||p<=0||isNaN(m)||m<0)return;s.save();const k=it(A.lineWidth,1);if(s.fillStyle=it(A.fillStyle,a),s.lineCap=it(A.lineCap,"butt"),s.lineDashOffset=it(A.lineDashOffset,0),s.lineJoin=it(A.lineJoin,"miter"),s.lineWidth=k,s.strokeStyle=it(A.strokeStyle,a),s.setLineDash(it(A.lineDash,[])),o.usePointStyle){const P={radius:m*Math.SQRT2/2,pointStyle:A.pointStyle,rotation:A.rotation,borderWidth:k},B=l.xPlus(S,p/2),Y=T+h;IS(s,P,B,Y,o.pointStyleWidth&&p)}else{const P=T+Math.max((d-m)/2,0),B=l.leftForLtr(S,p),Y=ia(A.borderRadius);s.beginPath(),Object.values(Y).some(ne=>ne!==0)?pu(s,{x:B,y:P,w:p,h:m,radius:Y}):s.rect(B,P,p,m),s.fill(),k!==0&&s.stroke()}s.restore()},b=function(S,T,A){ha(s,A.text,S,T+y/2,c,{strikethrough:A.hidden,textAlign:l.textAlign(A.textAlign)})},x=this.isHorizontal(),E=this._computeTitleHeight();x?f={x:zn(r,this.left+u,this.right-i[0]),y:this.top+u+E,line:0}:f={x:this.left+u,y:zn(r,this.top+E+u,this.bottom-n[0].height),line:0},BS(this.ctx,e.textDirection);const w=y+u;this.legendItems.forEach((S,T)=>{s.strokeStyle=S.fontColor,s.fillStyle=S.fontColor;const A=s.measureText(S.text).width,k=l.textAlign(S.textAlign||(S.textAlign=o.textAlign)),P=p+h+A;let B=f.x,Y=f.y;l.setWidth(this.width),x?T>0&&B+P+u>this.right&&(Y=f.y+=w,f.line++,B=f.x=zn(r,this.left+u,this.right-i[f.line])):T>0&&Y+w>this.bottom&&(B=f.x=B+n[f.line].width+u,f.line++,Y=f.y=zn(r,this.top+E+u,this.bottom-n[f.line].height));const ne=l.x(B);if(v(ne,Y,S),B=XY(k,B+p+h,x?B+P:this.right,e.rtl),b(l.x(B),Y,S),x)f.x+=P+u;else if(typeof S.text!="string"){const $=c.lineHeight;f.y+=dT(S,$)+u}else f.y+=w}),VS(this.ctx,e.textDirection)}drawTitle(){const e=this.options,n=e.title,i=xn(n.font),s=Xn(n.padding);if(!n.display)return;const r=cl(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=zn(e.align,d,this.right-h);else{const p=this.columnSizes.reduce((m,y)=>Math.max(m,y.height),0);u=c+zn(e.align,this.top,this.bottom-p-e.labels.padding-this._computeTitleHeight())}const f=zn(a,d,d+h);o.textAlign=r.textAlign(K_(a)),o.textBaseline="middle",o.strokeStyle=n.color,o.fillStyle=n.color,o.font=i.string,ha(o,n.text,f,u,i)}_computeTitleHeight(){const e=this.options.title,n=xn(e.font),i=Xn(e.padding);return e.display?n.lineHeight+i.height:0}_getLegendItemAt(e,n){let i,s,r;if(lr(e,this.left,this.right)&&lr(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 PK(t,e,n){let i=t;return typeof e.text!="string"&&(i=dT(e,n)),i}function dT(t,e){const n=t.text?t.text.length:0;return e*n}function IK(t,e){return!!((t==="mousemove"||t==="mouseout")&&(e.onHover||e.onLeave)||e.onClick&&(t==="click"||t==="mouseup"))}var DK={id:"legend",_element:C1,start(t,e,n){const i=t.legend=new C1({ctx:t.ctx,options:n,chart:t});Vi.configure(t,i,n),Vi.addBox(t,i)},stop(t){Vi.removeBox(t,t.legend),delete t.legend},beforeUpdate(t,e,n){const i=t.legend;Vi.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=Xn(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 hT extends xr{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=zt(i.text)?i.text.length:1;this._padding=Xn(i.padding);const r=s*xn(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=zn(a,i,r),d=n+e,c=r-i):(o.position==="left"?(u=i+e,d=zn(a,s,n),l=Ft*-.5):(u=r-e,d=zn(a,n,s),l=Ft*.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=xn(n.font),r=i.lineHeight/2+this._padding.top,{titleX:o,titleY:a,maxWidth:l,rotation:c}=this._drawArgs(r);ha(e,n.text,0,0,i,{color:n.color,maxWidth:l,rotation:c,textAlign:K_(n.align),textBaseline:"middle",translation:[o,a]})}}function RK(t,e){const n=new hT({ctx:t.ctx,options:e,chart:t});Vi.configure(t,n,e),Vi.addBox(t,n),t.titleBlock=n}var LK={id:"title",_element:hT,start(t,e,n){RK(t,n)},stop(t){const e=t.titleBlock;Vi.removeBox(t,e),delete t.titleBlock},beforeUpdate(t,e,n){const i=t.titleBlock;Vi.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 Tc={average(t){if(!t.length)return!1;let e,n,i=new Set,s=0,r=0;for(e=0,n=t.length;ea+l)/i.size,y:s/r}},nearest(t,e){if(!t.length)return!1;let n=e.x,i=e.y,s=Number.POSITIVE_INFINITY,r,o,a;for(r=0,o=t.length;ra({chart:e,initial:n.initial,numSteps:o,currentStep:Math.min(i-n.start,o)}))}_refresh(){this._request||(this._running=!0,this._request=TS.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 Zs=new Q8;const zb="transparent",eH={boolean(t,e,n){return n>.5?e:t},color(t,e,n){const i=Ib(t||zb),s=i.valid&&Ib(e||zb);return s&&s.valid?s.mix(i,n).hexString():e},number(t,e,n){return t+(e-t)*n}};class tH{constructor(e,n,i,s){const r=n[i];s=Cc([e.to,s,r,e.from]);const o=Cc([e.from,r,s]);this._active=!0,this._fn=e.fn||eH[e.type||typeof o],this._easing=Gc[e.easing]||Gc.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=Cc([e.to,n,s,e.from]),this._from=Cc([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];(zt(r.properties)&&r.properties||[s]).forEach(a=>{(a===s||!i.has(a))&&i.set(a,o)})})}_animateOptions(e,n){const i=n.options,s=iH(e,i);if(!s)return[];const r=this._createAnimations(s,i);return i.$shared&&nH(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 tH(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 Zs.add(this._chart,i),!0}}function nH(t,e){const n=[],i=Object.keys(e);for(let s=0;s0||!n&&r<0)return s.index}return null}function Kb(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=aH(r,o,i),d=e.length;let h;for(let g=0;gn[i].axis===e).shift()}function uH(t,e){return vo(t,{active:!1,dataset:void 0,datasetIndex:e,index:e,mode:"default",type:"dataset"})}function dH(t,e,n){return vo(t,{active:!1,dataIndex:e,parsed:void 0,raw:void 0,element:n,index:e,mode:"default",type:"data"})}function hc(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 Xg=t=>t==="reset"||t==="none",Ub=(t,e)=>e?t:Object.assign({},t),hH=(t,e,n)=>t&&!e.hidden&&e._stacked&&{keys:jS(n,!0),values:null};class bo{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=Hb(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&&hc(this._cachedMeta),this.index=e}linkScales(){const e=this.chart,n=this._cachedMeta,i=this.getDataset(),s=(d,h,g,p)=>d==="x"?h:d==="r"?p:g,r=n.xAxisID=it(i.xAxisID,Gg(e,"x")),o=n.yAxisID=it(i.yAxisID,Gg(e,"y")),a=n.rAxisID=it(i.rAxisID,Gg(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&&kb(this._data,this),e._stacked&&hc(e)}_dataCheck(){const e=this.getDataset(),n=e.data||(e.data=[]),i=this._data;if(ut(n)){const s=this._cachedMeta;this._data=oH(n,s)}else if(i!==n){if(i){kb(i,this);const s=this._cachedMeta;hc(s),s._parsed=[]}n&&Object.isExtensible(n)&&ZY(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=Hb(n.vScale,n),n.stack!==i.stack&&(s=!0,hc(n),n.stack=i.stack),this._resyncElements(e),(s||r!==n._stacked)&&Kb(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{zt(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 g=()=>d[a]===null||c&&d[a]m||d=0;--h)if(!p()){this.updateRangeFromParsed(c,e,g,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,g,p,d);return m.$shared&&(m.$shared=l,r[o]=Object.freeze(Ub(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 HS(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||Xg(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){Xg(s)?Object.assign(e,i):this._resolveAnimations(n,s).update(e,i)}updateSharedOptions(e,n,i){e&&!Xg(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 gH(t){const e=t.iScale,n=fH(e,t.type);let i=e._length,s,r,o,a;const l=()=>{o===32767||o===-32768||(fu(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 KS(t,e,n,i){return zt(t)?_H(t,e,n,i):e[n.axis]=n.parse(t,i),e}function Gb(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 vH(t){let e,n,i,s,r;return t.horizontal?(e=t.base>t.x,n="left",i="right"):(e=t.baseu.controller.options.grouped),r=i.options.stacked,o=[],a=this._cachedMeta.controller.getParsed(n),l=a&&a[i.axis],c=u=>{const d=u._parsed.find(g=>g[i.axis]===l),h=d&&d[u.vScale.axis];if(ft(h)||isNaN(h))return!0};for(const u of s)if(!(n!==void 0&&c(u))&&((r===!1||o.indexOf(u.stack)===-1||r===void 0&&u.stack===void 0)&&o.push(u.stack),u.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;hgu(x,a,l,!0)?1:Math.max(E,E*n,w,w*n),p=(x,E,w)=>gu(x,a,l,!0)?-1:Math.min(E,E*n,w,w*n),m=g(0,c,d),y=g(cn,u,h),v=p(Ft,c,d),b=p(Ft+cn,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 GS extends bo{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=>+lo(i[c],l)}let o,a;for(o=e,a=e+n;o0&&!isNaN(e)?Nt*(Math.abs(e)/n):0}getLabelAndValue(e){const n=this._cachedMeta,i=this.chart,s=i.data.labels||[],r=ju(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 A=this.getParsed(w),k=ft(A[g]),P=T[h]=o.getPixelForValue(A[h],w),B=T[g]=r||k?a.getBasePixel():a.getPixelForValue(l?this.applyStack(a,A,l):A[g],w);T.skip=isNaN(P)||isNaN(B)||k,T.stop=w>0&&Math.abs(A[h]-E[h])>y,m&&(T.parsed=A,T.raw=c.data[w]),d&&(T.options=u||this.resolveDataElementOptions(w,S.active?"active":s)),v||this.updateElement(S,w,T,s),E=A}}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 SH extends bo{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=ju(n._parsed[e].r,i.options.locale);return{label:s[e]||"",value:r}}parseObjectData(e,n,i,s){return NS.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*Ft;let g=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 TH extends GS{static id="pie";static defaults={cutout:0,rotation:0,circumference:360,radius:"100%"}}class AH extends bo{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 NS.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 E=n;E0&&Math.abs(S[g]-x[g])>v,y&&(T.parsed=S,T.raw=c.data[E]),h&&(T.options=d||this.resolveDataElementOptions(E,w.active?"active":s)),b||this.updateElement(w,E,T,s),x=S}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 $o(){throw new Error("This method is not implemented: Check that a complete date adapter is provided.")}class ey{static override(e){Object.assign(ey.prototype,e)}options;constructor(e){this.options=e||{}}init(){}formats(){return $o()}parse(){return $o()}format(){return $o()}add(){return $o()}diff(){return $o()}startOf(){return $o()}endOf(){return $o()}}var MH={_date:ey};function PH(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?XY:cr;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 Ku(t,e,n,i,s){const r=t.getSortedVisibleDatasetMetas(),o=n[e];for(let a=0,l=r.length;a{l[o]&&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 LH={evaluateInteractionItems:Ku,modes:{index(t,e,n,i){const s=Yo(e,t),r=n.axis||"x",o=n.includeInvisible||!1,a=n.intersect?Zg(t,s,r,i,o):Jg(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=Yo(e,t),r=n.axis||"xy",o=n.includeInvisible||!1;let a=n.intersect?Zg(t,s,r,i,o):Jg(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 Jb(t,e){return t.filter(n=>qS.indexOf(n.pos)===-1&&n.box.axis===e)}function gc(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 OH(t){const e=[];let n,i,s,r,o,a;for(n=0,i=(t||[]).length;nc.box.fullSize),!0),i=gc(fc(e,"left"),!0),s=gc(fc(e,"right")),r=gc(fc(e,"top"),!0),o=gc(fc(e,"bottom")),a=Jb(e,"x"),l=Jb(e,"y");return{fullSize:n,leftAndTop:i.concat(r),rightAndBottom:s.concat(l).concat(o).concat(a),chartArea:fc(e,"chartArea"),vertical:i.concat(s).concat(l),horizontal:r.concat(o).concat(a)}}function Qb(t,e,n,i){return Math.max(t[n],e[n])+Math.max(t[i],e[i])}function ZS(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 BH(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&&ZS(o,r.getPadding());const a=Math.max(0,e.outerWidth-Qb(o,t,"left","right")),l=Math.max(0,e.outerHeight-Qb(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 VH(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 zH(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 Sc(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);ZS(h,Xn(i));const g=Object.assign({maxPadding:h,w:r,h:o,x:s.left,y:s.top},s),p=NH(l.concat(c),d);Sc(a.fullSize,g,d,p),Sc(l,g,d,p),Sc(c,g,d,p)&&Sc(l,g,d,p),VH(g),e1(a.leftAndTop,g,d,p),g.x+=g.w,g.y+=g.h,e1(a.rightAndBottom,g,d,p),t.chartArea={left:g.left,top:g.top,right:g.left+g.w,bottom:g.top+g.h,height:g.h,width:g.w},Tt(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 JS{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 WH extends JS{acquireContext(e){return e&&e.getContext&&e.getContext("2d")||null}updateConfig(e){e.options.animation=!1}}const lh="$chartjs",YH={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"},t1=t=>t===null||t==="";function HH(t,e){const n=t.style,i=t.getAttribute("height"),s=t.getAttribute("width");if(t[lh]={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",t1(s)){const r=Nb(t,"width");r!==void 0&&(t.width=r)}if(t1(i))if(t.style.height==="")t.height=t.width/(e||2);else{const r=Nb(t,"height");r!==void 0&&(t.height=r)}return t}const QS=W8?{passive:!0}:!1;function jH(t,e,n){t&&t.addEventListener(e,n,QS)}function KH(t,e,n){t&&t.canvas&&t.canvas.removeEventListener(e,n,QS)}function UH(t,e){const n=YH[t.type]||t.type,{x:i,y:s}=Yo(t,e);return{type:n,chart:e,native:t,x:i!==void 0?i:null,y:s!==void 0?s:null}}function Mh(t,e){for(const n of t)if(n===e||n.contains(e))return!0}function GH(t,e,n){const i=t.canvas,s=new MutationObserver(r=>{let o=!1;for(const a of r)o=o||Mh(a.addedNodes,i),o=o&&!Mh(a.removedNodes,i);o&&n()});return s.observe(document,{childList:!0,subtree:!0}),s}function XH(t,e,n){const i=t.canvas,s=new MutationObserver(r=>{let o=!1;for(const a of r)o=o||Mh(a.removedNodes,i),o=o&&!Mh(a.addedNodes,i);o&&n()});return s.observe(document,{childList:!0,subtree:!0}),s}const mu=new Map;let n1=0;function eT(){const t=window.devicePixelRatio;t!==n1&&(n1=t,mu.forEach((e,n)=>{n.currentDevicePixelRatio!==t&&e()}))}function qH(t,e){mu.size||window.addEventListener("resize",eT),mu.set(t,e)}function ZH(t){mu.delete(t),mu.size||window.removeEventListener("resize",eT)}function JH(t,e,n){const i=t.canvas,s=i&&Q_(i);if(!s)return;const r=AS((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),qH(t,r),o}function Qg(t,e,n){n&&n.disconnect(),e==="resize"&&ZH(t)}function QH(t,e,n){const i=t.canvas,s=AS(r=>{t.ctx!==null&&n(UH(r,t))},t);return jH(i,e,s),s}class ej extends JS{acquireContext(e,n){const i=e&&e.getContext&&e.getContext("2d");return i&&i.canvas===e?(HH(e,n),i):null}releaseContext(e){const n=e.canvas;if(!n[lh])return!1;const i=n[lh].initial;["height","width"].forEach(r=>{const o=i[r];ft(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[lh],!0}addEventListener(e,n,i){this.removeEventListener(e,n);const s=e.$proxies||(e.$proxies={}),o={attach:GH,detach:XH,resize:JH}[n]||QH;s[n]=o(e,n,i)}removeEventListener(e,n){const i=e.$proxies||(e.$proxies={}),s=i[n];if(!s)return;({attach:Qg,detach:Qg,resize:Qg}[n]||KH)(e,n,s),i[n]=void 0}getDevicePixelRatio(){return window.devicePixelRatio}getMaximumSize(e,n,i,s){return z8(e,n,i,s)}isAttached(e){const n=e&&Q_(e);return!!(n&&n.isConnected)}}function tj(t){return!J_()||typeof OffscreenCanvas<"u"&&t instanceof OffscreenCanvas?WH:ej}let xr=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 Pl(this.x)&&Pl(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 nj(t,e){const n=t.options.ticks,i=ij(t),s=Math.min(n.maxTicksLimit||i,i),r=n.major.enabled?rj(e):[],o=r.length,a=r[0],l=r[o-1],c=[];if(o>s)return oj(e,c,r,o/s),c;const u=sj(r,e,s);if(o>0){let d,h;const g=o>1?Math.round((l-a)/(o-1)):null;for(Rd(e,c,u,ft(g)?0:a-g,a),d=0,h=o-1;ds)return l}return Math.max(s,1)}function rj(t){const e=[];let n,i;for(n=0,i=t.length;nt==="left"?"right":t==="right"?"left":t,i1=(t,e,n)=>e==="top"||e==="left"?t[e]+n:t[e]-n,s1=(t,e)=>Math.min(e||t,t);function r1(t,e){const n=[],i=t.length/e,s=t.length;let r=0;for(;ro+a)))return l}function uj(t,e){Tt(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:Ci(n,Ci(i,n)),max:Ci(i,Ci(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(){Dt(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=v8(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,g=Dn(this.chart.width-d,0,this.maxWidth);a=e.offset?this.maxWidth/i:g/(i-1),d+6>a&&(a=g/(i-(e.offset?.5:1)),l=this.maxHeight-pc(e.grid)-n.padding-o1(e.title,this.chart.options.font),c=Math.sqrt(d*d+h*h),o=H_(Math.min(Math.asin(Dn((u.highest.height+6)/a,-1,1)),Math.asin(Dn(l/c,-1,1))-Math.asin(Dn(h/c,-1,1)))),o=Math.max(s,Math.min(r,o))),this.labelRotation=o}afterCalculateLabelRotation(){Dt(this.options.afterCalculateLabelRotation,[this])}afterAutoSkip(){}beforeFit(){Dt(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=o1(s,n.options.font);if(a?(e.width=this.maxWidth,e.height=pc(r)+l):(e.height=this.maxHeight,e.width=pc(r)+l),i.display&&this.ticks.length){const{first:c,last:u,widest:d,highest:h}=this._getLabelSizes(),g=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+g)}else{const v=i.mirror?0:m*d.width+y*h.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,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,g=0;l?c?(h=s*e.width,g=i*n.height):(h=i*e.height,g=s*n.width):r==="start"?g=n.width:r==="end"?h=e.width:r!=="inner"&&(h=e.width/2,g=n.width/2),this.paddingLeft=Math.max((h-u+o)*this.width/(this.width-u),0),this.paddingRight=Math.max((g-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(){Dt(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[k]||0,height:a[k]||0});return{first:A(0),last:A(n-1),widest:A(S),highest:A(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 GY(this._alignToPixels?Oo(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=pc(r),g=[],p=a.setContext(this.getContext()),m=p.display?p.width:0,y=m/2,v=function(D){return Oo(i,D,m)};let b,x,E,w,S,T,A,k,P,B,Y,ne;if(o==="top")b=v(this.bottom),T=this.bottom-h,k=b-y,B=v(e.top)+y,ne=e.bottom;else if(o==="bottom")b=v(this.top),B=e.top,ne=v(e.bottom)-y,T=b+y,k=this.top+h;else if(o==="left")b=v(this.right),S=this.right-h,A=b-y,P=v(e.left)+y,Y=e.right;else if(o==="right")b=v(this.left),P=e.left,Y=v(e.right)-y,S=b+y,A=this.left+h;else if(n==="x"){if(o==="center")b=v((e.top+e.bottom)/2+.5);else if(ut(o)){const D=Object.keys(o)[0],z=o[D];b=v(this.chart.scales[D].getPixelForValue(z))}B=e.top,ne=e.bottom,T=b+y,k=T+h}else if(n==="y"){if(o==="center")b=v((e.left+e.right)/2);else if(ut(o)){const D=Object.keys(o)[0],z=o[D];b=v(this.chart.scales[D].getPixelForValue(z))}S=b-y,A=S-h,P=e.left,Y=e.right}const $=it(s.ticks.maxTicksLimit,d),F=Math.max(1,Math.ceil(d/$));for(x=0;x0&&(ue-=I/2);break}le={left:ue,top:ee,width:I+ie.width,height:te+ie.height,color:F.backdropColor}}y.push({label:E,font:k,textOffset:Y,options:{rotation:m,color:z,strokeColor:X,strokeWidth:Z,textAlign:H,textBaseline:ne,translation:[w,S],backdrop:le}})}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(".");tn.route(r,s,l,a)})}function _j(t){return"id"in t&&"defaults"in t}class yj{constructor(){this.controllers=new Ld(bo,"datasets",!0),this.elements=new Ld(xr,"elements"),this.plugins=new Ld(Object,"plugins"),this.scales=new Ld(va,"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):Tt(s,o=>{const a=i||this._getRegistryForType(o);this._exec(e,a,o)})})}_exec(e,n,i){const s=Y_(e);Dt(i["before"+s],[],i),n[e](i),Dt(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 bj(t){const e={},n=[],i=Object.keys(xs.plugins.items);for(let r=0;r1&&a1(t[0].toLowerCase());if(i)return i}throw new Error(`Cannot determine type of '${t}' axis. Please provide 'axis' or 'position' option.`)}function l1(t,e,n){if(n[e+"AxisID"]===t)return{axis:e}}function Aj(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 l1(t,"x",n[0])||l1(t,"y",n[0])}return{}}function kj(t,e){const n=da[t.type]||{scales:{}},i=e.scales||{},s=om(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=am(o,a,Aj(o,t),tn.scales[a.type]),c=Sj(l,s),u=n.scales||{};r[o]=Kc(Object.create(null),[{axis:l},a,u[l],u[c]])}),t.data.datasets.forEach(o=>{const a=o.type||t.type,l=o.indexAxis||om(a,e),u=(da[a]||{}).scales||{};Object.keys(u).forEach(d=>{const h=Cj(d,l),g=o[h+"AxisID"]||h;r[g]=r[g]||Object.create(null),Kc(r[g],[{axis:h},i[g],u[d]])})}),Object.keys(r).forEach(o=>{const a=r[o];Kc(a,[tn.scales[a.type],tn.scale])}),r}function tT(t){const e=t.options||(t.options={});e.plugins=it(e.plugins,{}),e.scales=kj(t,e)}function nT(t){return t=t||{},t.datasets=t.datasets||[],t.labels=t.labels||[],t}function Mj(t){return t=t||{},t.data=nT(t.data),tT(t),t}const c1=new Map,iT=new Set;function Od(t,e){let n=c1.get(t);return n||(n=e(),c1.set(t,n),iT.add(n)),n}const mc=(t,e,n)=>{const i=lo(e,n);i!==void 0&&t.add(i)};let Pj=class{constructor(e){this._config=Mj(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=nT(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(),tT(e)}clearCache(){this._scopeCache.clear(),this._resolverCache.clear()}datasetScopeKeys(e){return Od(e,()=>[[`datasets.${e}`,""]])}datasetAnimationScopeKeys(e,n){return Od(`${e}.transition.${n}`,()=>[[`datasets.${e}.transitions.${n}`,`transitions.${n}`],[`datasets.${e}`,""]])}datasetElementScopeKeys(e,n){return Od(`${e}-${n}`,()=>[[`datasets.${e}.elements.${n}`,`datasets.${e}`,`elements.${n}`,""]])}pluginScopeKeys(e){const n=e.id,i=this.type;return Od(`${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=>mc(l,e,d))),u.forEach(d=>mc(l,s,d)),u.forEach(d=>mc(l,da[r]||{},d)),u.forEach(d=>mc(l,tn,d)),u.forEach(d=>mc(l,sm,d))});const c=Array.from(l);return c.length===0&&c.push(Object.create(null)),iT.has(n)&&o.set(n,c),c}chartOptionScopes(){const{options:e,type:n}=this;return[e,da[n]||{},tn.datasets[n]||{},{type:n},tn,sm]}resolveNamedOptions(e,n,i,s=[""]){const r={$shared:!0},{resolver:o,subPrefixes:a}=u1(this._resolverCache,e,s);let l=o;if(Dj(o,n)){r.$shared=!1,i=co(i)?i():i;const c=this.createResolver(e,i,a);l=Il(o,i,c)}for(const c of n)r[c]=l[c];return r}createResolver(e,n,i=[""],s){const{resolver:r}=u1(this._resolverCache,e,i);return ut(n)?Il(r,n,void 0,s):r}};function u1(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:X_(e,n),subPrefixes:n.filter(a=>!a.toLowerCase().includes("hover"))},i.set(s,r)),r}const Ij=t=>ut(t)&&Object.getOwnPropertyNames(t).some(e=>co(t[e]));function Dj(t,e){const{isScriptable:n,isIndexable:i}=RS(t);for(const s of e){const r=n(s),o=i(s),a=(o||r)&&t[s];if(r&&(co(a)||Ij(a))||o&&zt(a))return!0}return!1}var Rj="4.4.4";const Lj=["top","bottom","left","right","chartArea"];function d1(t,e){return t==="top"||t==="bottom"||Lj.indexOf(t)===-1&&e==="x"}function h1(t,e){return function(n,i){return n[t]===i[t]?n[e]-i[e]:n[t]-i[t]}}function f1(t){const e=t.chart,n=e.options.animation;e.notifyPlugins("afterRender"),Dt(n&&n.onComplete,[t],e)}function Oj(t){const e=t.chart,n=e.options.animation;Dt(n&&n.onProgress,[t],e)}function sT(t){return J_()&&typeof t=="string"?t=document.getElementById(t):t&&t.length&&(t=t[0]),t&&t.canvas&&(t=t.canvas),t}const ch={},g1=t=>{const e=sT(t);return Object.values(ch).filter(n=>n.canvas===e).pop()};function $j(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 Nj(t,e,n,i){return!n||t.type==="mouseout"?null:i?e:t}function $d(t,e,n){return t.options.clip?t[n]:e[n]}function Fj(t,e){const{xScale:n,yScale:i}=t;return n&&i?{left:$d(n,e,"left"),right:$d(n,e,"right"),top:$d(i,e,"top"),bottom:$d(i,e,"bottom")}:e}let kf=class{static defaults=tn;static instances=ch;static overrides=da;static registry=xs;static version=Rj;static getChart=g1;static register(...e){xs.add(...e),p1()}static unregister(...e){xs.remove(...e),p1()}constructor(e,n){const i=this.config=new Pj(n),s=sT(e),r=g1(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||tj(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=$Y(),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 vj,this.$proxies={},this._hiddenIndices={},this.attached=!1,this._animationsDisabled=void 0,this.$context=void 0,this._doResize=JY(d=>this.update(d),o.resizeDelay||0),this._dataChanges=[],ch[this.id]=this,!a||!l){console.error("Failed to create chart: can't acquire context from the given item");return}Zs.listen(this,"complete",f1),Zs.listen(this,"progress",Oj),this._initialize(),this.attached&&this.update()}get aspectRatio(){const{options:{aspectRatio:e,maintainAspectRatio:n},width:i,height:s,_aspectRatio:r}=this;return ft(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 xs}_initialize(){return this.notifyPlugins("beforeInit"),this.options.responsive?this.resize():$b(this,this.options.devicePixelRatio),this.bindEvents(),this.notifyPlugins("afterInit"),this}clear(){return Rb(this.canvas,this.ctx),this}stop(){return Zs.stop(this),this}resize(e,n){Zs.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,$b(this,a,!0)&&(this.notifyPlugins("resize",{size:o}),Dt(i.onResize,[this,o],this),this.attached&&this._doResize(l)&&this.render())}ensureScalesHaveIDs(){const n=this.options.scales||{};Tt(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=am(o,a),c=l==="r",u=l==="x";return{options:a,dposition:c?"chartArea":u?"bottom":"left",dtype:c?"radialLinear":u?"category":"linear"}}))),Tt(r,o=>{const a=o.options,l=a.id,c=am(l,a),u=it(a.type,o.dtype);(a.position===void 0||d1(a.position,c)!==d1(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=xs.getScale(u);d=new h({id:l,type:u,ctx:this.ctx,chart:this}),i[d.id]=d}d.init(a,e)}),Tt(s,(o,a)=>{o||delete i[a]}),Tt(i,o=>{Vi.configure(this,o,o.options),Vi.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(h1("z","_idx"));const{_active:a,_lastEvent:l}=this;l?this._eventHandler(l,!0):a.length&&this._updateHoverStyles(a,a,!0),this.render()}_updateScales(){Tt(this.scales,e=>{Vi.removeBox(this,e)}),this.ensureScalesHaveIDs(),this.buildOrUpdateScales()}_checkEventBindings(){const e=this.options,n=new Set(Object.keys(this._listeners)),i=new Set(e.events);(!Cb(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;$j(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;Vi.update(this,this.width,this.height,e);const n=this.chartArea,i=n.width<=0||n.height<=0;this._layers=[],Tt(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=Fj(e,this.chartArea),o={meta:e,index:e.index,cancelable:!0};this.notifyPlugins("beforeDatasetDraw",o)!==!1&&(s&&Sf(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&&Tf(n),o.cancelable=!1,this.notifyPlugins("afterDatasetDraw",o))}isPointInArea(e){return ur(e,this.chartArea,this._minPadding)}getElementsAtEventForMode(e,n,i,s){const r=LH.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=vo(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);fu(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(),Zs.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)};Tt(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(){Tt(this._listeners,(e,n)=>{this.platform.removeEventListener(this,n,e)}),this._listeners={},Tt(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}});!Ch(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=WY(e),c=Nj(e,this._lastEvent,i,l);i&&(this._lastEvent=null,Dt(r.onHover,[e,a,this],this),l&&Dt(r.onClick,[e,a,this],this));const u=!Ch(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 p1(){return Tt(kf.instances,t=>t._plugins.invalidate())}function Bj(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+cn,i-cn),t.closePath(),t.clip()}function Vj(t){return G_(t,["outerStart","outerEnd","innerStart","innerEnd"])}function zj(t,e,n,i){const s=Vj(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 Dn(l,0,Math.min(r,c))};return{outerStart:a(s.outerStart),outerEnd:a(s.outerEnd),innerStart:Dn(s.innerStart,0,o),innerEnd:Dn(s.innerEnd,0,o)}}function $a(t,e,n,i){return{x:n+t*Math.cos(e),y:i+t*Math.sin(e)}}function Ph(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 g=0;const p=s-l;if(i){const F=u>0?u-i:0,D=d>0?d-i:0,z=(F+D)/2,X=z!==0?p*z/(z+i):p;g=(p-X)/2}const m=Math.max(.001,p*d-n/Ft)/d,y=(p-m)/2,v=l+y+g,b=s-y-g,{outerStart:x,outerEnd:E,innerStart:w,innerEnd:S}=zj(e,h,d,b-v),T=d-x,A=d-E,k=v+x/T,P=b-E/A,B=h+w,Y=h+S,ne=v+w/B,$=b-S/Y;if(t.beginPath(),r){const F=(k+P)/2;if(t.arc(o,a,d,k,F),t.arc(o,a,d,F,P),E>0){const Z=$a(A,P,o,a);t.arc(Z.x,Z.y,E,P,b+cn)}const D=$a(Y,b,o,a);if(t.lineTo(D.x,D.y),S>0){const Z=$a(Y,$,o,a);t.arc(Z.x,Z.y,S,b+cn,$+Math.PI)}const z=(b-S/h+(v+w/h))/2;if(t.arc(o,a,h,b-S/h,z,!0),t.arc(o,a,h,z,v+w/h,!0),w>0){const Z=$a(B,ne,o,a);t.arc(Z.x,Z.y,w,ne+Math.PI,v-cn)}const X=$a(T,v,o,a);if(t.lineTo(X.x,X.y),x>0){const Z=$a(T,k,o,a);t.arc(Z.x,Z.y,x,v-cn,k)}}else{t.moveTo(o,a);const F=Math.cos(k)*d+o,D=Math.sin(k)*d+a;t.lineTo(F,D);const z=Math.cos(P)*d+o,X=Math.sin(P)*d+a;t.lineTo(z,X)}t.closePath()}function Wj(t,e,n,i,s){const{fullCircles:r,startAngle:o,circumference:a}=e;let l=e.endAngle;if(r){Ph(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}=ES(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,g=it(d,l-a),p=gu(r,a,l)&&a!==l,m=g>=Nt||p,y=lr(o,c+h,u+h);return m&&y}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>Nt?Math.floor(i/Nt):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(Ft,i||0)),c=s*l;e.fillStyle=n.backgroundColor,e.strokeStyle=n.borderColor,Wj(e,this,c,r,o),Yj(e,this,c,r,o),e.restore()}}function rT(t,e,n=e){t.lineCap=it(n.borderCapStyle,e.borderCapStyle),t.setLineDash(it(n.borderDash,e.borderDash)),t.lineDashOffset=it(n.borderDashOffset,e.borderDashOffset),t.lineJoin=it(n.borderJoinStyle,e.borderJoinStyle),t.lineWidth=it(n.borderWidth,e.borderWidth),t.strokeStyle=it(n.borderColor,e.borderColor)}function jj(t,e,n){t.lineTo(n.x,n.y)}function Kj(t){return t.stepped?u8:t.tension||t.cubicInterpolationMode==="monotone"?d8:jj}function oT(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-E:E))%r,x=()=>{m!==y&&(t.lineTo(u,y),t.lineTo(u,m),t.lineTo(u,v))};for(l&&(g=s[b(0)],t.moveTo(g.x,g.y)),h=0;h<=a;++h){if(g=s[b(h)],g.skip)continue;const E=g.x,w=g.y,S=E|0;S===p?(wy&&(y=w),u=(d*u+E)/++d):(x(),t.lineTo(E,w),p=S,d=0,m=y=w),v=w}x()}function lm(t){const e=t.options,n=e.borderDash&&e.borderDash.length;return!t._decimated&&!t._loop&&!e.tension&&e.cubicInterpolationMode!=="monotone"&&!e.stepped&&!n?Gj:Uj}function Xj(t){return t.stepped?Y8:t.tension||t.cubicInterpolationMode==="monotone"?H8:Ho}function qj(t,e,n,i){let s=e._path;s||(s=e._path=new Path2D,e.path(s,n,i)&&s.closePath()),rT(t,e.options),t.stroke(s)}function Zj(t,e,n,i){const{segments:s,options:r}=e,o=lm(e);for(const a of s)rT(t,r,a.style),t.beginPath(),o(t,e,a,{start:n,end:n+i-1})&&t.closePath(),t.stroke()}const Jj=typeof Path2D=="function";function Qj(t,e,n,i){Jj&&!e.options.segment?qj(t,e,n,i):Zj(t,e,n,i)}class Mf extends xr{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;O8(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=q8(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=YS(this,{property:n,start:s,end:s});if(!o.length)return;const a=[],l=Xj(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,g,p,m;for(o[l++]=t[u],d=0;dg&&(g=p,h=t[b],m=b);o[l++]=h,u=m}return o[l++]=t[c],o}function lK(t,e,n,i){let s=0,r=0,o,a,l,c,u,d,h,g,p,m;const y=[],v=e+n-1,b=t[e].x,E=t[v].x-b;for(o=e;om&&(m=c,h=o),s=(r*s+a.x)/++r;else{const S=o-1;if(!ft(d)&&!ft(h)){const T=Math.min(d,h),A=Math.max(d,h);T!==g&&T!==S&&y.push({...t[T],x:s}),A!==g&&A!==S&&y.push({...t[A],x:s})}o>0&&S!==g&&y.push(t[S]),y.push(a),u=w,r=0,p=m=c,d=h=g=o}}return y}function lT(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 _1(t){t.data.datasets.forEach(e=>{lT(e)})}function cK(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=Dn(cr(e,r.axis,o).lo,0,n-1)),c?s=Dn(cr(e,r.axis,a).hi+1,i,n)-i:s=n-i,{start:i,count:s}}var uK={id:"decimation",defaults:{algorithm:"min-max",enabled:!1},beforeElementsUpdate:(t,e,n)=>{if(!n.enabled){_1(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(Cc([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}=cK(l,c);const g=n.threshold||4*i;if(h<=g){lT(s);return}ft(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=aK(c,d,h,i,n);break;case"min-max":p=lK(c,d,h,i);break;default:throw new Error(`Unsupported decimation algorithm '${n.algorithm}'`)}s._decimated=p})},destroy(t){_1(t)}};function dK(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=ty(l,c,s);const u=cm(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=YS(e,u);for(const h of d){const g=cm(n,r[h.start],r[h.end],h.loop),p=WS(a,s,g);for(const m of p)o.push({source:m,target:h,start:{[n]:y1(u,g,"start",Math.max)},end:{[n]:y1(u,g,"end",Math.min)}})}}return o}function cm(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 hK(t,e){const{x:n=null,y:i=null}=t||{},s=e.points,r=[];return e.segments.forEach(({start:o,end:a})=>{a=ty(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 ty(t,e,n){for(;e>t;e--){const i=n[e];if(!isNaN(i.x)&&!isNaN(i.y))break}return e}function y1(t,e,n,i){return t&&e?i(t[n],e[n]):t?t[n]:e?e[n]:0}function cT(t,e){let n=[],i=!1;return zt(t)?(i=!0,n=t):n=hK(t,e),n.length?new Mf({points:n,options:{tension:0},_loop:i,_fullLoop:i}):null}function v1(t){return t&&t.fill!==!1}function fK(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(!en(s))return s;if(o=t[s],!o)return!1;if(o.visible)return s;r.push(s),s=o.fill}return!1}function gK(t,e,n){const i=yK(t);if(ut(i))return isNaN(i.value)?!1:i;let s=parseFloat(i);return en(s)&&Math.floor(s)===s?pK(i[0],e,s,n):["origin","start","end","stack","shape"].indexOf(i)>=0&&i}function pK(t,e,n,i){return(t==="-"||t==="+")&&(n=e+n),n===e||n<0||n>=i?!1:n}function mK(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 _K(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 yK(t){const e=t.options,n=e.fill;let i=it(n&&n.target,n);return i===void 0&&(i=!!e.backgroundColor),i===!1||i===null?!1:i===!0?"origin":i}function vK(t){const{scale:e,index:n,line:i}=t,s=[],r=i.segments,o=i.points,a=bK(e,n);a.push(cT({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&&np(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;v1(r)&&np(t.ctx,r,t.chartArea)}},beforeDatasetDraw(t,e,n){const i=e.meta.$filler;!v1(i)||n.drawTime!=="beforeDatasetDraw"||np(t.ctx,i,t.chartArea)},defaults:{propagate:!0,drawTime:"beforeDatasetDraw"}};const E1=(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)}},IK=(t,e)=>t!==null&&e!==null&&t.datasetIndex===e.datasetIndex&&t.index===e.index;class C1 extends xr{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=Dt(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=xn(i.font),r=s.size,o=this._computeTitleHeight(),{boxWidth:a,itemHeight:l}=E1(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,g=-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,g+=u,h++),l[m]={left:0,top:g,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,g=0,p=0,m=0;return this.legendItems.forEach((y,v)=>{const{itemWidth:b,itemHeight:x}=DK(i,n,r,y,s);v>0&&g+x+2*a>u&&(d+=h+a,c.push({width:h,height:g}),p+=h+a,m++,h=g=0),l[v]={left:p,top:g,col:m,width:b,height:x},h=Math.max(h,b),g+=x+a}),d+=h,c.push({width:h,height:g}),d}adjustHitBoxes(){if(!this.options.display)return;const e=this._computeTitleHeight(),{legendHitBoxes:n,options:{align:i,labels:{padding:s},rtl:r}}=this,o=cl(r,this.left,this.width);if(this.isHorizontal()){let a=0,l=zn(i,this.left+s,this.right-this.lineWidths[a]);for(const c of n)a!==c.row&&(a=c.row,l=zn(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=zn(i,this.top+e+s,this.bottom-this.columnSizes[a].height);for(const c of n)c.col!==a&&(a=c.col,l=zn(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;Sf(e,this),this._draw(),Tf(e)}}_draw(){const{options:e,columnSizes:n,lineWidths:i,ctx:s}=this,{align:r,labels:o}=e,a=tn.color,l=cl(e.rtl,this.left,this.width),c=xn(o.font),{padding:u}=o,d=c.size,h=d/2;let g;this.drawTitle(),s.textAlign=l.textAlign("left"),s.textBaseline="middle",s.lineWidth=.5,s.font=c.string;const{boxWidth:p,boxHeight:m,itemHeight:y}=E1(o,d),v=function(S,T,A){if(isNaN(p)||p<=0||isNaN(m)||m<0)return;s.save();const k=it(A.lineWidth,1);if(s.fillStyle=it(A.fillStyle,a),s.lineCap=it(A.lineCap,"butt"),s.lineDashOffset=it(A.lineDashOffset,0),s.lineJoin=it(A.lineJoin,"miter"),s.lineWidth=k,s.strokeStyle=it(A.strokeStyle,a),s.setLineDash(it(A.lineDash,[])),o.usePointStyle){const P={radius:m*Math.SQRT2/2,pointStyle:A.pointStyle,rotation:A.rotation,borderWidth:k},B=l.xPlus(S,p/2),Y=T+h;IS(s,P,B,Y,o.pointStyleWidth&&p)}else{const P=T+Math.max((d-m)/2,0),B=l.leftForLtr(S,p),Y=ia(A.borderRadius);s.beginPath(),Object.values(Y).some(ne=>ne!==0)?pu(s,{x:B,y:P,w:p,h:m,radius:Y}):s.rect(B,P,p,m),s.fill(),k!==0&&s.stroke()}s.restore()},b=function(S,T,A){ha(s,A.text,S,T+y/2,c,{strikethrough:A.hidden,textAlign:l.textAlign(A.textAlign)})},x=this.isHorizontal(),E=this._computeTitleHeight();x?g={x:zn(r,this.left+u,this.right-i[0]),y:this.top+u+E,line:0}:g={x:this.left+u,y:zn(r,this.top+E+u,this.bottom-n[0].height),line:0},BS(this.ctx,e.textDirection);const w=y+u;this.legendItems.forEach((S,T)=>{s.strokeStyle=S.fontColor,s.fillStyle=S.fontColor;const A=s.measureText(S.text).width,k=l.textAlign(S.textAlign||(S.textAlign=o.textAlign)),P=p+h+A;let B=g.x,Y=g.y;l.setWidth(this.width),x?T>0&&B+P+u>this.right&&(Y=g.y+=w,g.line++,B=g.x=zn(r,this.left+u,this.right-i[g.line])):T>0&&Y+w>this.bottom&&(B=g.x=B+n[g.line].width+u,g.line++,Y=g.y=zn(r,this.top+E+u,this.bottom-n[g.line].height));const ne=l.x(B);if(v(ne,Y,S),B=QY(k,B+p+h,x?B+P:this.right,e.rtl),b(l.x(B),Y,S),x)g.x+=P+u;else if(typeof S.text!="string"){const $=c.lineHeight;g.y+=dT(S,$)+u}else g.y+=w}),VS(this.ctx,e.textDirection)}drawTitle(){const e=this.options,n=e.title,i=xn(n.font),s=Xn(n.padding);if(!n.display)return;const r=cl(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=zn(e.align,d,this.right-h);else{const p=this.columnSizes.reduce((m,y)=>Math.max(m,y.height),0);u=c+zn(e.align,this.top,this.bottom-p-e.labels.padding-this._computeTitleHeight())}const g=zn(a,d,d+h);o.textAlign=r.textAlign(K_(a)),o.textBaseline="middle",o.strokeStyle=n.color,o.fillStyle=n.color,o.font=i.string,ha(o,n.text,g,u,i)}_computeTitleHeight(){const e=this.options.title,n=xn(e.font),i=Xn(e.padding);return e.display?n.lineHeight+i.height:0}_getLegendItemAt(e,n){let i,s,r;if(lr(e,this.left,this.right)&&lr(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 LK(t,e,n){let i=t;return typeof e.text!="string"&&(i=dT(e,n)),i}function dT(t,e){const n=t.text?t.text.length:0;return e*n}function OK(t,e){return!!((t==="mousemove"||t==="mouseout")&&(e.onHover||e.onLeave)||e.onClick&&(t==="click"||t==="mouseup"))}var $K={id:"legend",_element:C1,start(t,e,n){const i=t.legend=new C1({ctx:t.ctx,options:n,chart:t});Vi.configure(t,i,n),Vi.addBox(t,i)},stop(t){Vi.removeBox(t,t.legend),delete t.legend},beforeUpdate(t,e,n){const i=t.legend;Vi.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=Xn(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 hT extends xr{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=zt(i.text)?i.text.length:1;this._padding=Xn(i.padding);const r=s*xn(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=zn(a,i,r),d=n+e,c=r-i):(o.position==="left"?(u=i+e,d=zn(a,s,n),l=Ft*-.5):(u=r-e,d=zn(a,n,s),l=Ft*.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=xn(n.font),r=i.lineHeight/2+this._padding.top,{titleX:o,titleY:a,maxWidth:l,rotation:c}=this._drawArgs(r);ha(e,n.text,0,0,i,{color:n.color,maxWidth:l,rotation:c,textAlign:K_(n.align),textBaseline:"middle",translation:[o,a]})}}function NK(t,e){const n=new hT({ctx:t.ctx,options:e,chart:t});Vi.configure(t,n,e),Vi.addBox(t,n),t.titleBlock=n}var FK={id:"title",_element:hT,start(t,e,n){NK(t,n)},stop(t){const e=t.titleBlock;Vi.removeBox(t,e),delete t.titleBlock},beforeUpdate(t,e,n){const i=t.titleBlock;Vi.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 Tc={average(t){if(!t.length)return!1;let e,n,i=new Set,s=0,r=0;for(e=0,n=t.length;ea+l)/i.size,y:s/r}},nearest(t,e){if(!t.length)return!1;let n=e.x,i=e.y,s=Number.POSITIVE_INFINITY,r,o,a;for(r=0,o=t.length;r-1?t.split(` -`):t}function OK(t,e){const{element:n,datasetIndex:i,index:s}=e,r=t.getDatasetMeta(i).controller,{label:o,value:a}=r.getLabelAndValue(s);return{chart:t,label:o,parsed:r.getParsed(s),raw:t.data.datasets[i].data[s],formattedValue:a,dataset:r.getDataset(),dataIndex:s,datasetIndex:i,element:n}}function S1(t,e){const n=t.chart.ctx,{body:i,footer:s,title:r}=t,{boxWidth:o,boxHeight:a}=e,l=xn(e.bodyFont),c=xn(e.titleFont),u=xn(e.footerFont),d=r.length,h=s.length,f=i.length,p=Xn(e.padding);let m=p.height,y=0,v=i.reduce((E,w)=>E+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 E=e.displayColors?Math.max(a,l.lineHeight):l.lineHeight;m+=f*E+(v-f)*l.lineHeight+(v-1)*e.bodySpacing}h&&(m+=e.footerMarginTop+h*u.lineHeight+(h-1)*e.footerSpacing);let b=0;const x=function(E){y=Math.max(y,n.measureText(E).width+b)};return n.save(),n.font=c.string,Tt(t.title,x),n.font=l.string,Tt(t.beforeBody.concat(t.afterBody),x),b=e.displayColors?o+2+e.boxPadding:0,Tt(i,E=>{Tt(E.before,x),Tt(E.lines,x),Tt(E.after,x)}),b=0,n.font=u.string,Tt(t.footer,x),n.restore(),y+=p.width,{width:y,height:m}}function $K(t,e){const{y:n,height:i}=e;return nt.height-i/2?"bottom":"center"}function NK(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 FK(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"),NK(c,t,e,n)&&(c="center"),c}function T1(t,e,n){const i=n.yAlign||e.yAlign||$K(t,n);return{xAlign:n.xAlign||e.xAlign||FK(t,e,n,i),yAlign:i}}function BK(t,e){let{x:n,width:i}=t;return e==="right"?n-=i:e==="center"&&(n-=i/2),n}function VK(t,e,n){let{y:i,height:s}=t;return e==="top"?i+=n:e==="bottom"?i-=s+n:i-=s/2,i}function A1(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=BK(e,a);const m=VK(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:Dn(p,0,i.width-e.width),y:Dn(m,0,i.height-e.height)}}function Nd(t,e,n){const i=Xn(n.padding);return e==="center"?t.x+t.width/2:e==="right"?t.x+t.width-i.right:t.x+i.left}function k1(t){return bs([],Js(t))}function zK(t,e,n){return vo(t,{tooltip:e,tooltipItems:n,type:"tooltip"})}function M1(t,e){const n=e&&e.dataset&&e.dataset.tooltip&&e.dataset.tooltip.callbacks;return n?t.override(n):t}const fT={beforeTitle:Us,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"?fT[e].call(n,i):s}class P1 extends xr{static positioners=Tc;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 HS(this.chart,s);return s._cacheable&&(this._cachedAnimations=Object.freeze(r)),r}getContext(){return this.$context||(this.$context=zK(this.chart.getContext(),this,this._tooltipItems))}getTitle(e,n){const{callbacks:i}=n,s=di(i,"beforeTitle",this,e),r=di(i,"title",this,e),o=di(i,"afterTitle",this,e);let a=[];return a=bs(a,Js(s)),a=bs(a,Js(r)),a=bs(a,Js(o)),a}getBeforeBody(e,n){return k1(di(n.callbacks,"beforeBody",this,e))}getBody(e,n){const{callbacks:i}=n,s=[];return Tt(e,r=>{const o={before:[],lines:[],after:[]},a=M1(i,r);bs(o.before,Js(di(a,"beforeLabel",this,r))),bs(o.lines,di(a,"label",this,r)),bs(o.after,Js(di(a,"afterLabel",this,r))),s.push(o)}),s}getAfterBody(e,n){return k1(di(n.callbacks,"afterBody",this,e))}getFooter(e,n){const{callbacks:i}=n,s=di(i,"beforeFooter",this,e),r=di(i,"footer",this,e),o=di(i,"afterFooter",this,e);let a=[];return a=bs(a,Js(s)),a=bs(a,Js(r)),a=bs(a,Js(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))),Tt(a,u=>{const d=M1(e.callbacks,u);s.push(di(d,"labelColor",this,u)),r.push(di(d,"labelPointStyle",this,u)),o.push(di(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=Tc[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=S1(this,i),c=Object.assign({},a,l),u=T1(this.chart,i,c),d=A1(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,x,E,w;return r==="center"?(E=f+m/2,s==="left"?(y=h,v=y-o,x=E+o,w=E-o):(y=h+p,v=y+o,x=E-o,w=E+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"?(x=f,E=x-o,y=v-o,b=v+o):(x=f+m,E=x+o,y=v+o,b=v-o),w=x),{x1:y,x2:v,x3:b,y1:x,y2:E,y3:w}}drawTitle(e,n,i){const s=this.title,r=s.length;let o,a,l;if(r){const c=cl(i.rtl,this.x,this.width);for(e.x=Nd(this,i.titleAlign,i),n.textAlign=c.textAlign(i.titleAlign),n.textBaseline="middle",o=xn(i.titleFont),a=i.titleSpacing,n.fillStyle=i.titleColor,n.font=o.string,l=0;lb!==0)?(e.beginPath(),e.fillStyle=r.multiKeyBackground,pu(e,{x:m,y:p,w:c,h:l,radius:v}),e.fill(),e.stroke(),e.fillStyle=o.backgroundColor,e.beginPath(),pu(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=xn(i.bodyFont);let h=d.lineHeight,f=0;const p=cl(i.rtl,this.x,this.width),m=function(A){n.fillText(A,p.x(e.x+f),e.y+h/2),e.y+=h+r},y=p.textAlign(o);let v,b,x,E,w,S,T;for(n.textAlign=o,n.textBaseline="middle",n.font=d.string,e.x=Nd(this,y,i),n.fillStyle=i.bodyColor,Tt(this.beforeBody,m),f=a&&y!=="right"?o==="center"?c/2+u:c+2+u:0,E=0,S=s.length;E0&&n.stroke()}_updateAnimationTarget(e){const n=this.chart,i=this.$animations,s=i&&i.x,r=i&&i.y;if(s||r){const o=Tc[e.position].call(this,this._active,this._eventPosition);if(!o)return;const a=this._size=S1(this,e),l=Object.assign({},o,this._size),c=T1(n,e,l),u=A1(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=Xn(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),BS(e,n.textDirection),r.y+=o.top,this.drawTitle(r,e,n),this.drawBody(r,e,n),this.drawFooter(r,e,n),VS(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=!Ch(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||!Ch(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=Tc[r.position].call(this,e,n);return o!==!1&&(i!==o.x||s!==o.y)}}var WK={id:"tooltip",_element:P1,positioners:Tc,afterInit(t,e,n){n&&(t.tooltip=new P1({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:fT},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 YK=(t,e,n,i)=>(typeof e=="string"?(n=t.push(e)-1,i.unshift({index:n,label:e})):isNaN(e)&&(n=null),n);function HK(t,e,n,i){const s=t.indexOf(e);if(s===-1)return YK(t,e,n,i);const r=t.lastIndexOf(e);return s!==r?n:s}const jK=(t,e)=>t===null?null:Dn(Math.round(t),0,e);function I1(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 UK(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=!ft(o),b=!ft(a),x=!ft(c),E=(y-m)/(d+1);let w=Tb((y-m)/p/f)*f,S,T,A,k;if(w<1e-14&&!v&&!b)return[{value:m},{value:y}];k=Math.ceil(y/w)-Math.floor(m/w),k>p&&(w=Tb(k*w/p/f)*f),ft(l)||(S=Math.pow(10,l),w=Math.ceil(w*S)/S),s==="ticks"?(T=Math.floor(m/w)*w,A=Math.ceil(y/w)*w):(T=m,A=y),v&&b&&r&&WY((a-o)/r,w/1e3)?(k=Math.round(Math.min((a-o)/w,u)),w=(a-o)/k,T=o,A=a):x?(T=v?o:T,A=b?a:A,k=c-1,w=(A-T)/k):(k=(A-T)/w,Uc(k,Math.round(k),w/1e3)?k=Math.round(k):k=Math.ceil(k));const P=Math.max(Ab(w),Ab(T));S=Math.pow(10,ft(l)?P:l),T=Math.round(T*S)/S,A=Math.round(A*S)/S;let B=0;for(v&&(h&&T!==o?(n.push({value:o}),Ta)break;n.push({value:Y})}return b&&h&&A!==a?n.length&&Uc(n[n.length-1].value,a,D1(a,E,t))?n[n.length-1].value=a:n.push({value:a}):(!b||A===a)&&n.push({value:A}),n}function D1(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 Ih extends va{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 ft(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=$s(s),c=$s(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=UK(s,r);return e.bounds==="ticks"&&xS(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 ju(e,this.chart.options.locale,this.options.ticks.format)}}class GK extends Ih{static id="linear";static defaults={ticks:{callback:Cf.formatters.numeric}};determineDataLimits(){const{min:e,max:n}=this.getMinMax(!0);this.min=en(e)?e:0,this.max=en(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 _u=t=>Math.floor(Gr(t)),No=(t,e)=>Math.pow(10,_u(t)+e);function R1(t){return t/Math.pow(10,_u(t))===1}function L1(t,e,n){const i=Math.pow(10,n),s=Math.floor(t/i);return Math.ceil(e/i)-s}function XK(t,e){const n=e-t;let i=_u(n);for(;L1(t,e,i)>10;)i++;for(;L1(t,e,i)<10;)i--;return Math.min(i,_u(t))}function qK(t,{min:e,max:n}){e=Ci(t.min,e);const i=[],s=_u(e);let r=XK(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=Ci(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=Ci(t.max,h);return i.push({value:f,major:R1(f),significand:d}),i}class ZK extends va{static id="logarithmic";static defaults={ticks:{callback:Cf.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=Ih.prototype.parse.apply(this,[e,n]);if(i===0){this._zero=!0;return}return en(i)&&i>0?i:null}determineDataLimits(){const{min:e,max:n}=this.getMinMax(!0);this.min=en(e)?Math.max(0,e):null,this.max=en(n)?Math.max(0,n):null,this.options.beginAtZero&&(this._zero=!0),this._zero&&this.min!==this._suggestedMin&&!en(this._userMin)&&(this.min=e===No(this.min,0)?No(this.min,-1):No(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(No(i,-1)),o(No(s,1)))),i<=0&&r(No(s,-1)),s<=0&&o(No(i,1)),this.min=i,this.max=s}buildTicks(){const e=this.options,n={min:this._userMin,max:this._userMax},i=qK(n,this);return e.bounds==="ticks"&&xS(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":ju(e,this.chart.options.locale,this.options.ticks.format)}configure(){const e=this.min;super.configure(),this._startValue=Gr(e),this._valueRange=Gr(this.max)-Gr(e)}getPixelForValue(e){return(e===void 0||e===0)&&(e=this.min),e===null||isNaN(e)?NaN:this.getPixelForDecimal(e===this.min?0:(Gr(e)-this._startValue)/this._valueRange)}getValueForPixel(e){const n=this.getDecimalForPixel(e);return Math.pow(10,this._startValue+n*this._valueRange)}}function um(t){const e=t.ticks;if(e.display&&t.display){const n=Xn(e.backdropPadding);return it(e.font&&e.font.size,tn.font.size)+n.height}return 0}function JK(t,e,n){return n=zt(n)?n:[n],{w:r8(t,e.string,n),h:n.length*e.lineHeight}}function O1(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 QK(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?Ft/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 tU(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(H_(Si(l.angle+cn))),u=oU(l.y,a.h,c),d=sU(c),h=rU(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 nU(t,e){if(!e)return!0;const{left:n,top:i,right:s,bottom:r}=t;return!(ur({x:n,y:i},e)||ur({x:n,y:r},e)||ur({x:s,y:i},e)||ur({x:s,y:r},e))}function iU(t,e,n){const i=[],s=t._pointLabels.length,r=t.options,{centerPointLabels:o,display:a}=r.pointLabels,l={extra:um(r)/2,additionalAngle:o?Ft/s:0};let c;for(let u=0;u270||n<90)&&(t-=e),t}function aU(t,e,n){const{left:i,top:s,right:r,bottom:o}=n,{backdropColor:a}=e;if(!ft(a)){const l=ia(e.borderRadius),c=Xn(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(),pu(t,{x:u,y:d,w:h,h:f,radius:l}),t.fill()):t.fillRect(u,d,h,f)}}function lU(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));aU(n,o,r);const a=xn(o.font),{x:l,y:c,textAlign:u}=r;ha(n,t._pointLabels[s],l,c+a.lineHeight/2,a,{color:o.color,textAlign:u,textBaseline:"middle"})}}function gT(t,e,n,i){const{ctx:s}=t;if(n)s.arc(t.xCenter,t.yCenter,e,0,Nt);else{let r=t.getPointPosition(0,e);s.moveTo(r.x,r.y);for(let o=1;o{const s=Dt(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?QK(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=Nt/(this._pointLabels.length||1),i=this.options.startAngle||0;return Si(e*n+as(i))}getDistanceFromCenterForValue(e){if(ft(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(ft(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||d===0&&this.min<0){l=this.getDistanceFromCenterForValue(u.value);const h=this.getContext(d),f=s.setContext(h),p=r.setContext(h);cU(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.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&&this.min>=0&&!n.reverse)return;const c=i.setContext(this.getContext(l)),u=xn(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=Xn(c.backdropPadding);e.fillRect(-o/2-d.left,-r-u.size/2-d.top,o+d.width,u.size+d.height)}ha(e,a.label,0,-r,u,{color:c.color,strokeColor:c.textStrokeColor,strokeWidth:c.textStrokeWidth})}),e.restore()}drawTitle(){}}const Pf={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}},mi=Object.keys(Pf);function $1(t,e){return t-e}function N1(t,e){if(ft(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)),en(o)||(o=typeof i=="string"?n.parse(o,i):n.parse(o)),o===null?null:(s&&(o=s==="week"&&(Pl(r)||r===!0)?n.startOf(o,"isoWeek",r):n.startOf(o,s)),+o)}function F1(t,e,n,i){const s=mi.length;for(let r=mi.indexOf(t);r=mi.indexOf(n);r--){const o=mi[r];if(Pf[o].common&&t._adapter.diff(s,i,o)>=e-1)return o}return mi[n?mi.indexOf(n):0]}function fU(t){for(let e=mi.indexOf(t)+1,n=mi.length;e=e?n[i]:n[s];t[r]=!0}}function gU(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 V1(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=Dn(n,0,o),i=Dn(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||F1(r.minUnit,n,i,this._getLabelCapacity(n)),a=it(s.ticks.stepSize,1),l=o==="week"?r.isoWeekday:!1,c=Pl(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 Dt(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}=cr(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}=cr(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 pU extends dm{static id="timeseries";static defaults=dm.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=Fd(n,this.min),this._tableRange=Fd(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(Fd(this._table,e)-this._minPos)/this._tableRange}getValueForPixel(e){const n=this._offsets,i=this.getDecimalForPixel(e)/n.factor-n.end;return Fd(this._table,i*this._tableRange+this._minPos,!0)}}const pT={data:{type:Object,required:!0},options:{type:Object,default:()=>({})},plugins:{type:Array,default:()=>[]},datasetIdKey:{type:String,default:"label"},updateMode:{type:String,default:void 0}},mU={ariaLabel:{type:String},ariaDescribedby:{type:String}},_U={type:{type:String,required:!0},destroyDelay:{type:Number,default:0},...pT,...mU},yU=WE[0]==="2"?(t,e)=>Object.assign(t,{attrs:e}):(t,e)=>Object.assign(t,e);function Na(t){return $u(t)?lt(t):t}function vU(t){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:t;return $u(e)?new Proxy(t,{}):t}function bU(t,e){const n=t.options;n&&e&&Object.assign(n,e)}function mT(t,e){t.labels=e}function _T(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 wU(t,e){const n={labels:[],datasets:[]};return mT(n,t.labels),_T(n,t.datasets,e),n}const xU=hn({props:_U,setup(t,e){let{expose:n,slots:i}=e;const s=xe(null),r=af(null);n({chart:r});const o=()=>{if(!s.value)return;const{type:c,data:u,options:d,plugins:h,datasetIdKey:f}=t,p=wU(u,f),m=vU(p,u);r.value=new kf(s.value,{type:c,data:m,options:{...d},plugins:h})},a=()=>{const c=lt(r.value);c&&(t.destroyDelay>0?setTimeout(()=>{c.destroy(),r.value=null},t.destroyDelay):(c.destroy(),r.value=null))},l=c=>{c.update(t.updateMode)};return En(o),pa(a),un([()=>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=Na(d),b=Na(f);v&&v!==b&&(bU(m,v),y=!0)}if(h){const v=Na(h.labels),b=Na(p.labels),x=Na(h.datasets),E=Na(p.datasets);v!==b&&(mT(m.config.data,v),y=!0),x&&x!==E&&(_T(m.config.data,x,t.datasetIdKey),y=!0)}y&&Rn(()=>{l(m)})},{deep:!0}),()=>ua("canvas",{role:"img",ariaLabel:t.ariaLabel,ariaDescribedby:t.ariaDescribedby,ref:s},[ua("p",{},[i.default?i.default():""])])}});function yT(t,e){return kf.register(e),hn({props:pT,setup(n,i){let{expose:s}=i;const r=af(null),o=a=>{r.value=a?.chart};return s({chart:r}),()=>ua(xU,yU({ref:o},{type:t,...n}))}})}const EU=yT("bar",US),CU=yT("line",XS);function vr(t){return Array.isArray?Array.isArray(t):wT(t)==="[object Array]"}const SU=1/0;function TU(t){if(typeof t=="string")return t;let e=t+"";return e=="0"&&1/t==-SU?"-0":e}function AU(t){return t==null?"":TU(t)}function Ms(t){return typeof t=="string"}function vT(t){return typeof t=="number"}function kU(t){return t===!0||t===!1||MU(t)&&wT(t)=="[object Boolean]"}function bT(t){return typeof t=="object"}function MU(t){return bT(t)&&t!==null}function Ti(t){return t!=null}function ip(t){return!t.trim().length}function wT(t){return t==null?t===void 0?"[object Undefined]":"[object Null]":Object.prototype.toString.call(t)}const PU="Incorrect 'index' type",IU=t=>`Invalid value for key ${t}`,DU=t=>`Pattern length exceeds max of ${t}.`,RU=t=>`Missing ${t} property in key`,LU=t=>`Property 'weight' in key '${t}' must be a positive integer`,z1=Object.prototype.hasOwnProperty;class OU{constructor(e){this._keys=[],this._keyMap={};let n=0;e.forEach(i=>{let s=xT(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 xT(t){let e=null,n=null,i=null,s=1,r=null;if(Ms(t)||vr(t))i=t,e=W1(t),n=hm(t);else{if(!z1.call(t,"name"))throw new Error(RU("name"));const o=t.name;if(i=o,z1.call(t,"weight")&&(s=t.weight,s<=0))throw new Error(LU(o));e=W1(o),n=hm(o),r=t.getFn}return{path:e,id:n,weight:s,src:i,getFn:r}}function W1(t){return vr(t)?t:t.split(".")}function hm(t){return vr(t)?t.join("."):t}function $U(t,e){let n=[],i=!1;const s=(r,o,a)=>{if(Ti(r))if(!o[a])n.push(r);else{let l=o[a];const c=r[l];if(!Ti(c))return;if(a===o.length-1&&(Ms(c)||vT(c)||kU(c)))n.push(AU(c));else if(vr(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,Ms(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();Ms(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(Ti(o)){if(vr(o)){let a=[];const l=[{nestedArrIndex:-1,value:o}];for(;l.length;){const{nestedArrIndex:c,value:u}=l.pop();if(Ti(u))if(Ms(u)&&!ip(u)){let d={v:u,i:c,n:this.norm.get(u)};a.push(d)}else vr(u)&&u.forEach((d,h)=>{l.push({nestedArrIndex:h,value:d})})}i.$[r]=a}else if(Ms(o)&&!ip(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 ET(t,e,{getFn:n=Je.getFn,fieldNormWeight:i=Je.fieldNormWeight}={}){const s=new ny({getFn:n,fieldNormWeight:i});return s.setKeys(t.map(xT)),s.setSources(e),s.create(),s}function YU(t,{getFn:e=Je.getFn,fieldNormWeight:n=Je.fieldNormWeight}={}){const{keys:i,records:s}=t,r=new ny({getFn:e,fieldNormWeight:n});return r.setKeys(i),r.setIndexRecords(s),r}function Bd(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 HU(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 Ko=32;function jU(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>Ko)throw new Error(DU(Ko));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=Bd(e,{currentLocation:v,expectedLocation:h,distance:s,ignoreLocation:c});if(f=Math.min(T,f),p=v+u,m){let A=0;for(;A=P;$-=1){let F=$-1,D=n[t.charAt(F)];if(m&&(y[F]=+!!D),Y[$]=(Y[$+1]<<1|1)&D,T&&(Y[$]|=(b[$+1]|b[$])<<1|1|b[$+1]),Y[$]&w&&(x=Bd(e,{errors:T,currentLocation:F,expectedLocation:h,distance:s,ignoreLocation:c}),x<=f)){if(f=x,p=F,p<=h)break;P=Math.max(1,2*h-p)}}if(Bd(e,{errors:T+1,currentLocation:h,expectedLocation:h,distance:s,ignoreLocation:c})>f)break;b=Y}const S={isMatch:p>=0,score:Math.max(.001,x)};if(m){const T=HU(y,a);T.length?l&&(S.indices=T):S.isMatch=!1}return S}function KU(t){let e={};for(let n=0,i=t.length;n{this.chunks.push({pattern:h,alphabet:KU(h),startIndex:f})},d=this.pattern.length;if(d>Ko){let h=0;const f=d%Ko,p=d-f;for(;h{const{isMatch:v,score:b,indices:x}=jU(e,p,m,{location:s+y,distance:r,threshold:o,findAllMatches:a,minMatchCharLength:l,includeMatches:i,ignoreLocation:c});v&&(h=!0),d+=b,v&&x&&(u=[...u,...x])});let f={isMatch:h,score:h?d/this.chunks.length:1};return h&&i&&(f.indices=u),f}}class wo{constructor(e){this.pattern=e}static isMultiMatch(e){return Y1(e,this.multiRegex)}static isSingleMatch(e){return Y1(e,this.singleRegex)}search(){}}function Y1(t,e){const n=t.match(e);return n?n[1]:null}class UU extends wo{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 GU extends wo{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 XU extends wo{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 qU extends wo{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 ZU extends wo{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 JU extends wo{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 ST extends wo{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 CT(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 TT extends wo{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 fm=[UU,TT,XU,qU,JU,ZU,GU,ST],H1=fm.length,QU=/ +(?=(?:[^\"]*\"[^\"]*\")*[^\"]*$)/,eG="|";function tG(t,e={}){return t.split(eG).map(n=>{let i=n.trim().split(QU).filter(r=>r&&!!r.trim()),s=[];for(let r=0,o=i.length;r!!(t[Dh.AND]||t[Dh.OR]),rG=t=>!!t[mm.PATH],oG=t=>!vr(t)&&bT(t)&&!_m(t),j1=t=>({[Dh.AND]:Object.keys(t).map(e=>({[e]:t[e]}))});function AT(t,e,{auto:n=!0}={}){const i=s=>{let r=Object.keys(s);const o=rG(s);if(!o&&r.length>1&&!_m(s))return i(j1(s));if(oG(s)){const l=o?s[mm.PATH]:r[0],c=o?s[mm.PATTERN]:s[l];if(!Ms(c))throw new Error(IU(l));const u={keyId:hm(l),pattern:c};return n&&(u.searcher=pm(c,e)),u}let a={children:[],operator:r[0]};return r.forEach(l=>{const c=s[l];vr(c)&&c.forEach(u=>{a.children.push(i(u))})}),a};return _m(t)||(t=j1(t)),i(t)}function aG(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 lG(t,e){const n=t.matches;e.matches=[],Ti(n)&&n.forEach(i=>{if(!Ti(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 cG(t,e){e.score=t.score}function uG(t,e,{includeMatches:n=Je.includeMatches,includeScore:i=Je.includeScore}={}){const s=[];return n&&s.push(lG),i&&s.push(cG),t.map(r=>{const{idx:o}=r,a={item:e[o],refIndex:o};return s.length&&s.forEach(l=>{l(r,a)}),a})}class Xl{constructor(e,n={},i){this.options={...Je,...n},this.options.useExtendedSearch,this._keyStore=new OU(this.options.keys),this.setCollection(e,i)}setCollection(e,n){if(this._docs=e,n&&!(n instanceof ny))throw new Error(PU);this._myIndex=n||ET(this.options.keys,this._docs,{getFn:this.options.getFn,fieldNormWeight:this.options.fieldNormWeight})}add(e){Ti(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)),uG(l,this._docs,{includeMatches:i,includeScore:s})}_searchStringList(e){const n=pm(e,this.options),{records:i}=this._myIndex,s=[];return i.forEach(({v:r,i:o,n:a})=>{if(!Ti(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=AT(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(Ti(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=pm(e,this.options),{keys:i,records:s}=this._myIndex,r=[];return s.forEach(({$:o,i:a})=>{if(!Ti(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(!Ti(n))return[];let s=[];if(vr(n))n.forEach(({v:r,i:o,n:a})=>{if(!Ti(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}}Xl.version="7.0.0";Xl.createIndex=ET;Xl.parseIndex=YU;Xl.config=Je;Xl.parseQuery=AT;sG(iG);const dG={name:"peerSettings",components:{LocaleText:He},props:{selectedPeer:Object},data(){return{data:void 0,dataChanged:!1,showKey:!1,saving:!1}},setup(){return{dashboardConfigurationStore:tt()}},methods:{reset(){this.selectedPeer&&(this.data=JSON.parse(JSON.stringify(this.selectedPeer)),this.dataChanged=!1)},savePeer(){this.saving=!0,xt(`/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,xt(`/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})})}},hG={class:"peerSettingContainer w-100 h-100 position-absolute top-0 start-0 overflow-y-scroll"},fG={class:"container d-flex h-100 w-100"},gG={class:"m-auto modal-dialog-centered dashboardModal"},pG={class:"card rounded-3 shadow flex-grow-1"},mG={class:"card-header bg-transparent d-flex align-items-center gap-2 border-0 p-4 pb-2"},_G={class:"mb-0"},yG={key:0,class:"card-body px-4 pb-4"},vG={class:"d-flex flex-column gap-2 mb-4"},bG={class:"d-flex align-items-center"},wG={class:"text-muted"},xG={class:"ms-auto"},EG={for:"peer_name_textbox",class:"form-label"},CG={class:"text-muted"},SG=["disabled"],TG={class:"d-flex position-relative"},AG={for:"peer_private_key_textbox",class:"form-label"},kG={class:"text-muted"},MG=["type","disabled"],PG={for:"peer_allowed_ip_textbox",class:"form-label"},IG={class:"text-muted"},DG=["disabled"],RG={for:"peer_endpoint_allowed_ips",class:"form-label"},LG={class:"text-muted"},OG=["disabled"],$G={for:"peer_DNS_textbox",class:"form-label"},NG={class:"text-muted"},FG=["disabled"],BG={class:"accordion mt-3",id:"peerSettingsAccordion"},VG={class:"accordion-item"},zG={class:"accordion-header"},WG={class:"accordion-button rounded-3 collapsed",type:"button","data-bs-toggle":"collapse","data-bs-target":"#peerSettingsAccordionOptional"},YG={id:"peerSettingsAccordionOptional",class:"accordion-collapse collapse","data-bs-parent":"#peerSettingsAccordion"},HG={class:"accordion-body d-flex flex-column gap-2 mb-2"},jG={for:"peer_preshared_key_textbox",class:"form-label"},KG={class:"text-muted"},UG=["disabled"],GG={for:"peer_mtu",class:"form-label"},XG={class:"text-muted"},qG=["disabled"],ZG={for:"peer_keep_alive",class:"form-label"},JG={class:"text-muted"},QG=["disabled"],e7={class:"d-flex gap-2 align-items-center"},t7={class:"d-flex gap-2 ms-auto"},n7={class:"d-flex align-items-center gap-2"},i7=["disabled"],s7=["disabled"];function r7(t,e,n,i,s,r){const o=Ee("LocaleText");return R(),V("div",hG,[g("div",fG,[g("div",gG,[g("div",pG,[g("div",mG,[g("h4",_G,[N(o,{t:"Peer Settings"})]),g("button",{type:"button",class:"btn-close ms-auto",onClick:e[0]||(e[0]=a=>this.$emit("close"))})]),this.data?(R(),V("div",yG,[g("div",vG,[g("div",bG,[g("small",wG,[N(o,{t:"Public Key"})]),g("small",xG,[g("samp",null,we(this.data.id),1)])]),g("div",null,[g("label",EG,[g("small",CG,[N(o,{t:"Name"})])]),$e(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,SG),[[We,this.data.name]])]),g("div",null,[g("div",TG,[g("label",AG,[g("small",kG,[N(o,{t:"Private Key"}),g("code",null,[N(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:Pe(["bi",[this.showKey?"bi-eye-slash-fill":"bi-eye-fill"]])},null,2)])]),$e(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,MG),[[QE,this.data.private_key]])]),g("div",null,[g("label",PG,[g("small",IG,[N(o,{t:"Allowed IPs"}),g("code",null,[N(o,{t:"(Required)"})])])]),$e(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,DG),[[We,this.data.allowed_ip]])]),g("div",null,[g("label",RG,[g("small",LG,[N(o,{t:"Endpoint Allowed IPs"}),g("code",null,[N(o,{t:"(Required)"})])])]),$e(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,OG),[[We,this.data.endpoint_allowed_ip]])]),g("div",null,[g("label",$G,[g("small",NG,[N(o,{t:"DNS"})])]),$e(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,FG),[[We,this.data.DNS]])]),g("div",BG,[g("div",VG,[g("h2",zG,[g("button",WG,[N(o,{t:"Optional Settings"})])]),g("div",YG,[g("div",HG,[g("div",null,[g("label",jG,[g("small",KG,[N(o,{t:"Pre-Shared Key"})])]),$e(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,UG),[[We,this.data.preshared_key]])]),g("div",null,[g("label",GG,[g("small",XG,[N(o,{t:"MTU"})])]),$e(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,qG),[[We,this.data.mtu]])]),g("div",null,[g("label",ZG,[g("small",JG,[N(o,{t:"Persistent Keepalive"})])]),$e(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,QG),[[We,this.data.keepalive]])])])])])]),e[18]||(e[18]=g("hr",null,null,-1)),g("div",e7,[g("strong",null,[N(o,{t:"Reset Data Usage"})]),g("div",t7,[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"))},[e[15]||(e[15]=g("i",{class:"bi bi-arrow-down-up me-2"},null,-1)),N(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"))},[e[16]||(e[16]=g("i",{class:"bi bi-arrow-down me-2"},null,-1)),N(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"))},[e[17]||(e[17]=g("i",{class:"bi bi-arrow-up me-2"},null,-1)),N(o,{t:"Sent"})])])])]),g("div",n7,[g("button",{class:"btn btn-secondary rounded-3 shadow",onClick:e[13]||(e[13]=a=>this.reset()),disabled:!this.dataChanged||this.saving},[N(o,{t:"Revert"}),e[19]||(e[19]=g("i",{class:"bi bi-arrow-clockwise ms-2"},null,-1))],8,i7),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())},[N(o,{t:"Save Peer"}),e[20]||(e[20]=g("i",{class:"bi bi-save-fill ms-2"},null,-1))],8,s7)])])):ce("",!0)])])])])}const o7=je(dG,[["render",r7],["__scopeId","data-v-2c571abb"]]);var ba={},a7=function(){return typeof Promise=="function"&&Promise.prototype&&Promise.prototype.then},kT={},Di={};let iy;const l7=[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];Di.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};Di.getSymbolTotalCodewords=function(e){return l7[e]};Di.getBCHDigit=function(t){let e=0;for(;t!==0;)e++,t>>>=1;return e};Di.setToSJISFunction=function(e){if(typeof e!="function")throw new Error('"toSJISFunc" is not a valid function.');iy=e};Di.isKanjiModeEnabled=function(){return typeof iy<"u"};Di.toSJIS=function(e){return iy(e)};var If={};(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}}})(If);function MT(){this.buffer=[],this.length=0}MT.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 c7=MT;function Uu(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)}Uu.prototype.set=function(t,e,n,i){const s=t*this.size+e;this.data[s]=n,i&&(this.reservedBit[s]=!0)};Uu.prototype.get=function(t,e){return this.data[t*this.size+e]};Uu.prototype.xor=function(t,e,n){this.data[t*this.size+e]^=n};Uu.prototype.isReserved=function(t,e){return this.reservedBit[t*this.size+e]};var u7=Uu,PT={};(function(t){const e=Di.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 h7=sy,OT={},xo={},ry={};ry.isValid=function(e){return!isNaN(e)&&e>=1&&e<=40};var Vs={};const $T="[0-9]+",f7="[A-Z $%*+\\-./:]+";let yu="(?:[u3000-u303F]|[u3040-u309F]|[u30A0-u30FF]|[uFF00-uFFEF]|[u4E00-u9FAF]|[u2605-u2606]|[u2190-u2195]|u203B|[u2010u2015u2018u2019u2025u2026u201Cu201Du2225u2260]|[u0391-u0451]|[u00A7u00A8u00B1u00B4u00D7u00F7])+";yu=yu.replace(/u/g,"\\u");const g7="(?:(?![A-Z0-9 $%*+\\-./:]|"+yu+`)(?:.|[\r -]))+`;Vs.KANJI=new RegExp(yu,"g");Vs.BYTE_KANJI=new RegExp("[^A-Z0-9 $%*+\\-./:]+","g");Vs.BYTE=new RegExp(g7,"g");Vs.NUMERIC=new RegExp($T,"g");Vs.ALPHANUMERIC=new RegExp(f7,"g");const p7=new RegExp("^"+yu+"$"),m7=new RegExp("^"+$T+"$"),_7=new RegExp("^[A-Z0-9 $%*+\\-./:]+$");Vs.testKanji=function(e){return p7.test(e)};Vs.testNumeric=function(e){return m7.test(e)};Vs.testAlphanumeric=function(e){return _7.test(e)};(function(t){const e=ry,n=Vs;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}}})(xo);(function(t){const e=Di,n=Df,i=If,s=xo,r=ry,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 x=b-c(m,f);switch(m){case s.NUMERIC:return Math.floor(x/10*3);case s.ALPHANUMERIC:return Math.floor(x/11*2);case s.KANJI:return Math.floor(x/13);case s.BYTE:default:return Math.floor(x/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^=FT<0&&(i=this.data.substr(n),s=parseInt(i,10),e.put(s,r*3+1))};var b7=Rl;const w7=xo,sp=["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 Ll(t){this.mode=w7.ALPHANUMERIC,this.data=t}Ll.getBitsLength=function(e){return 11*Math.floor(e/2)+6*(e%2)};Ll.prototype.getLength=function(){return this.data.length};Ll.prototype.getBitsLength=function(){return Ll.getBitsLength(this.data.length)};Ll.prototype.write=function(e){let n;for(n=0;n+2<=this.data.length;n+=2){let i=sp.indexOf(this.data[n])*45;i+=sp.indexOf(this.data[n+1]),e.put(i,11)}this.data.length%2&&e.put(sp.indexOf(this.data[n]),6)};var x7=Ll;const E7=xo;function Ol(t){this.mode=E7.BYTE,typeof t=="string"?this.data=new TextEncoder().encode(t):this.data=new Uint8Array(t)}Ol.getBitsLength=function(e){return e*8};Ol.prototype.getLength=function(){return this.data.length};Ol.prototype.getBitsLength=function(){return Ol.getBitsLength(this.data.length)};Ol.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 A7=$l,VT={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})(VT);var k7=VT.exports;(function(t){const e=xo,n=b7,i=x7,s=C7,r=A7,o=Vs,a=Di,l=k7;function c(v){return unescape(encodeURIComponent(v)).length}function u(v,b,x){const E=[];let w;for(;(w=v.exec(x))!==null;)E.push({data:w[0],index:w.index,mode:b,length:w[0].length});return E}function d(v){const b=u(o.NUMERIC,e.NUMERIC,v),x=u(o.ALPHANUMERIC,e.ALPHANUMERIC,v);let E,w;return a.isKanjiModeEnabled()?(E=u(o.BYTE,e.BYTE,v),w=u(o.KANJI,e.KANJI,v)):(E=u(o.BYTE_KANJI,e.BYTE,v),w=[]),b.concat(x,E,w).sort(function(T,A){return T.index-A.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,x){const E=b.length-1>=0?b[b.length-1]:null;return E&&E.mode===x.mode?(b[b.length-1].data+=x.data,b):(b.push(x),b)},[])}function p(v){const b=[];for(let x=0;x=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 N7(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 ap(t,e,n){const i=t.size,s=L7.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 V7(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 z7(t,e,n){const i=new M7;n.forEach(function(l){i.put(l.mode.bit,4),i.put(l.getLength(),O7.getCharCountIndicator(l.mode,t)),l.write(i)});const s=Lf.getSymbolTotalCodewords(t),r=bm.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;lE+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 E=e.displayColors?Math.max(a,l.lineHeight):l.lineHeight;m+=g*E+(v-g)*l.lineHeight+(v-1)*e.bodySpacing}h&&(m+=e.footerMarginTop+h*u.lineHeight+(h-1)*e.footerSpacing);let b=0;const x=function(E){y=Math.max(y,n.measureText(E).width+b)};return n.save(),n.font=c.string,Tt(t.title,x),n.font=l.string,Tt(t.beforeBody.concat(t.afterBody),x),b=e.displayColors?o+2+e.boxPadding:0,Tt(i,E=>{Tt(E.before,x),Tt(E.lines,x),Tt(E.after,x)}),b=0,n.font=u.string,Tt(t.footer,x),n.restore(),y+=p.width,{width:y,height:m}}function VK(t,e){const{y:n,height:i}=e;return nt.height-i/2?"bottom":"center"}function zK(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 WK(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"),zK(c,t,e,n)&&(c="center"),c}function T1(t,e,n){const i=n.yAlign||e.yAlign||VK(t,n);return{xAlign:n.xAlign||e.xAlign||WK(t,e,n,i),yAlign:i}}function YK(t,e){let{x:n,width:i}=t;return e==="right"?n-=i:e==="center"&&(n-=i/2),n}function HK(t,e,n){let{y:i,height:s}=t;return e==="top"?i+=n:e==="bottom"?i-=s+n:i-=s/2,i}function A1(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:g}=ia(o);let p=YK(e,a);const m=HK(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,g)+s),{x:Dn(p,0,i.width-e.width),y:Dn(m,0,i.height-e.height)}}function Nd(t,e,n){const i=Xn(n.padding);return e==="center"?t.x+t.width/2:e==="right"?t.x+t.width-i.right:t.x+i.left}function k1(t){return bs([],Js(t))}function jK(t,e,n){return vo(t,{tooltip:e,tooltipItems:n,type:"tooltip"})}function M1(t,e){const n=e&&e.dataset&&e.dataset.tooltip&&e.dataset.tooltip.callbacks;return n?t.override(n):t}const fT={beforeTitle:Us,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"?fT[e].call(n,i):s}class P1 extends xr{static positioners=Tc;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 HS(this.chart,s);return s._cacheable&&(this._cachedAnimations=Object.freeze(r)),r}getContext(){return this.$context||(this.$context=jK(this.chart.getContext(),this,this._tooltipItems))}getTitle(e,n){const{callbacks:i}=n,s=di(i,"beforeTitle",this,e),r=di(i,"title",this,e),o=di(i,"afterTitle",this,e);let a=[];return a=bs(a,Js(s)),a=bs(a,Js(r)),a=bs(a,Js(o)),a}getBeforeBody(e,n){return k1(di(n.callbacks,"beforeBody",this,e))}getBody(e,n){const{callbacks:i}=n,s=[];return Tt(e,r=>{const o={before:[],lines:[],after:[]},a=M1(i,r);bs(o.before,Js(di(a,"beforeLabel",this,r))),bs(o.lines,di(a,"label",this,r)),bs(o.after,Js(di(a,"afterLabel",this,r))),s.push(o)}),s}getAfterBody(e,n){return k1(di(n.callbacks,"afterBody",this,e))}getFooter(e,n){const{callbacks:i}=n,s=di(i,"beforeFooter",this,e),r=di(i,"footer",this,e),o=di(i,"afterFooter",this,e);let a=[];return a=bs(a,Js(s)),a=bs(a,Js(r)),a=bs(a,Js(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))),Tt(a,u=>{const d=M1(e.callbacks,u);s.push(di(d,"labelColor",this,u)),r.push(di(d,"labelPointStyle",this,u)),o.push(di(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=Tc[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=S1(this,i),c=Object.assign({},a,l),u=T1(this.chart,i,c),d=A1(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:g}=e,{width:p,height:m}=n;let y,v,b,x,E,w;return r==="center"?(E=g+m/2,s==="left"?(y=h,v=y-o,x=E+o,w=E-o):(y=h+p,v=y+o,x=E-o,w=E+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"?(x=g,E=x-o,y=v-o,b=v+o):(x=g+m,E=x+o,y=v+o,b=v-o),w=x),{x1:y,x2:v,x3:b,y1:x,y2:E,y3:w}}drawTitle(e,n,i){const s=this.title,r=s.length;let o,a,l;if(r){const c=cl(i.rtl,this.x,this.width);for(e.x=Nd(this,i.titleAlign,i),n.textAlign=c.textAlign(i.titleAlign),n.textBaseline="middle",o=xn(i.titleFont),a=i.titleSpacing,n.fillStyle=i.titleColor,n.font=o.string,l=0;lb!==0)?(e.beginPath(),e.fillStyle=r.multiKeyBackground,pu(e,{x:m,y:p,w:c,h:l,radius:v}),e.fill(),e.stroke(),e.fillStyle=o.backgroundColor,e.beginPath(),pu(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=xn(i.bodyFont);let h=d.lineHeight,g=0;const p=cl(i.rtl,this.x,this.width),m=function(A){n.fillText(A,p.x(e.x+g),e.y+h/2),e.y+=h+r},y=p.textAlign(o);let v,b,x,E,w,S,T;for(n.textAlign=o,n.textBaseline="middle",n.font=d.string,e.x=Nd(this,y,i),n.fillStyle=i.bodyColor,Tt(this.beforeBody,m),g=a&&y!=="right"?o==="center"?c/2+u:c+2+u:0,E=0,S=s.length;E0&&n.stroke()}_updateAnimationTarget(e){const n=this.chart,i=this.$animations,s=i&&i.x,r=i&&i.y;if(s||r){const o=Tc[e.position].call(this,this._active,this._eventPosition);if(!o)return;const a=this._size=S1(this,e),l=Object.assign({},o,this._size),c=T1(n,e,l),u=A1(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=Xn(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),BS(e,n.textDirection),r.y+=o.top,this.drawTitle(r,e,n),this.drawBody(r,e,n),this.drawFooter(r,e,n),VS(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=!Ch(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||!Ch(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=Tc[r.position].call(this,e,n);return o!==!1&&(i!==o.x||s!==o.y)}}var KK={id:"tooltip",_element:P1,positioners:Tc,afterInit(t,e,n){n&&(t.tooltip=new P1({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:fT},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 UK=(t,e,n,i)=>(typeof e=="string"?(n=t.push(e)-1,i.unshift({index:n,label:e})):isNaN(e)&&(n=null),n);function GK(t,e,n,i){const s=t.indexOf(e);if(s===-1)return UK(t,e,n,i);const r=t.lastIndexOf(e);return s!==r?n:s}const XK=(t,e)=>t===null?null:Dn(Math.round(t),0,e);function I1(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 ZK(t,e){const n=[],{bounds:s,step:r,min:o,max:a,precision:l,count:c,maxTicks:u,maxDigits:d,includeBounds:h}=t,g=r||1,p=u-1,{min:m,max:y}=e,v=!ft(o),b=!ft(a),x=!ft(c),E=(y-m)/(d+1);let w=Tb((y-m)/p/g)*g,S,T,A,k;if(w<1e-14&&!v&&!b)return[{value:m},{value:y}];k=Math.ceil(y/w)-Math.floor(m/w),k>p&&(w=Tb(k*w/p/g)*g),ft(l)||(S=Math.pow(10,l),w=Math.ceil(w*S)/S),s==="ticks"?(T=Math.floor(m/w)*w,A=Math.ceil(y/w)*w):(T=m,A=y),v&&b&&r&&KY((a-o)/r,w/1e3)?(k=Math.round(Math.min((a-o)/w,u)),w=(a-o)/k,T=o,A=a):x?(T=v?o:T,A=b?a:A,k=c-1,w=(A-T)/k):(k=(A-T)/w,Uc(k,Math.round(k),w/1e3)?k=Math.round(k):k=Math.ceil(k));const P=Math.max(Ab(w),Ab(T));S=Math.pow(10,ft(l)?P:l),T=Math.round(T*S)/S,A=Math.round(A*S)/S;let B=0;for(v&&(h&&T!==o?(n.push({value:o}),Ta)break;n.push({value:Y})}return b&&h&&A!==a?n.length&&Uc(n[n.length-1].value,a,D1(a,E,t))?n[n.length-1].value=a:n.push({value:a}):(!b||A===a)&&n.push({value:A}),n}function D1(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 Ih extends va{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 ft(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=$s(s),c=$s(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=ZK(s,r);return e.bounds==="ticks"&&xS(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 ju(e,this.chart.options.locale,this.options.ticks.format)}}class JK extends Ih{static id="linear";static defaults={ticks:{callback:Cf.formatters.numeric}};determineDataLimits(){const{min:e,max:n}=this.getMinMax(!0);this.min=en(e)?e:0,this.max=en(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 _u=t=>Math.floor(Gr(t)),No=(t,e)=>Math.pow(10,_u(t)+e);function R1(t){return t/Math.pow(10,_u(t))===1}function L1(t,e,n){const i=Math.pow(10,n),s=Math.floor(t/i);return Math.ceil(e/i)-s}function QK(t,e){const n=e-t;let i=_u(n);for(;L1(t,e,i)>10;)i++;for(;L1(t,e,i)<10;)i--;return Math.min(i,_u(t))}function eU(t,{min:e,max:n}){e=Ci(t.min,e);const i=[],s=_u(e);let r=QK(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=Ci(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 g=Ci(t.max,h);return i.push({value:g,major:R1(g),significand:d}),i}class tU extends va{static id="logarithmic";static defaults={ticks:{callback:Cf.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=Ih.prototype.parse.apply(this,[e,n]);if(i===0){this._zero=!0;return}return en(i)&&i>0?i:null}determineDataLimits(){const{min:e,max:n}=this.getMinMax(!0);this.min=en(e)?Math.max(0,e):null,this.max=en(n)?Math.max(0,n):null,this.options.beginAtZero&&(this._zero=!0),this._zero&&this.min!==this._suggestedMin&&!en(this._userMin)&&(this.min=e===No(this.min,0)?No(this.min,-1):No(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(No(i,-1)),o(No(s,1)))),i<=0&&r(No(s,-1)),s<=0&&o(No(i,1)),this.min=i,this.max=s}buildTicks(){const e=this.options,n={min:this._userMin,max:this._userMax},i=eU(n,this);return e.bounds==="ticks"&&xS(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":ju(e,this.chart.options.locale,this.options.ticks.format)}configure(){const e=this.min;super.configure(),this._startValue=Gr(e),this._valueRange=Gr(this.max)-Gr(e)}getPixelForValue(e){return(e===void 0||e===0)&&(e=this.min),e===null||isNaN(e)?NaN:this.getPixelForDecimal(e===this.min?0:(Gr(e)-this._startValue)/this._valueRange)}getValueForPixel(e){const n=this.getDecimalForPixel(e);return Math.pow(10,this._startValue+n*this._valueRange)}}function um(t){const e=t.ticks;if(e.display&&t.display){const n=Xn(e.backdropPadding);return it(e.font&&e.font.size,tn.font.size)+n.height}return 0}function nU(t,e,n){return n=zt(n)?n:[n],{w:c8(t,e.string,n),h:n.length*e.lineHeight}}function O1(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 iU(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?Ft/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 rU(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(H_(Si(l.angle+cn))),u=uU(l.y,a.h,c),d=lU(c),h=cU(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 oU(t,e){if(!e)return!0;const{left:n,top:i,right:s,bottom:r}=t;return!(ur({x:n,y:i},e)||ur({x:n,y:r},e)||ur({x:s,y:i},e)||ur({x:s,y:r},e))}function aU(t,e,n){const i=[],s=t._pointLabels.length,r=t.options,{centerPointLabels:o,display:a}=r.pointLabels,l={extra:um(r)/2,additionalAngle:o?Ft/s:0};let c;for(let u=0;u270||n<90)&&(t-=e),t}function dU(t,e,n){const{left:i,top:s,right:r,bottom:o}=n,{backdropColor:a}=e;if(!ft(a)){const l=ia(e.borderRadius),c=Xn(e.backdropPadding);t.fillStyle=a;const u=i-c.left,d=s-c.top,h=r-i+c.width,g=o-s+c.height;Object.values(l).some(p=>p!==0)?(t.beginPath(),pu(t,{x:u,y:d,w:h,h:g,radius:l}),t.fill()):t.fillRect(u,d,h,g)}}function hU(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));dU(n,o,r);const a=xn(o.font),{x:l,y:c,textAlign:u}=r;ha(n,t._pointLabels[s],l,c+a.lineHeight/2,a,{color:o.color,textAlign:u,textBaseline:"middle"})}}function gT(t,e,n,i){const{ctx:s}=t;if(n)s.arc(t.xCenter,t.yCenter,e,0,Nt);else{let r=t.getPointPosition(0,e);s.moveTo(r.x,r.y);for(let o=1;o{const s=Dt(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?iU(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=Nt/(this._pointLabels.length||1),i=this.options.startAngle||0;return Si(e*n+as(i))}getDistanceFromCenterForValue(e){if(ft(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(ft(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||d===0&&this.min<0){l=this.getDistanceFromCenterForValue(u.value);const h=this.getContext(d),g=s.setContext(h),p=r.setContext(h);fU(this,g,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.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&&this.min>=0&&!n.reverse)return;const c=i.setContext(this.getContext(l)),u=xn(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=Xn(c.backdropPadding);e.fillRect(-o/2-d.left,-r-u.size/2-d.top,o+d.width,u.size+d.height)}ha(e,a.label,0,-r,u,{color:c.color,strokeColor:c.textStrokeColor,strokeWidth:c.textStrokeWidth})}),e.restore()}drawTitle(){}}const Pf={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}},mi=Object.keys(Pf);function $1(t,e){return t-e}function N1(t,e){if(ft(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)),en(o)||(o=typeof i=="string"?n.parse(o,i):n.parse(o)),o===null?null:(s&&(o=s==="week"&&(Pl(r)||r===!0)?n.startOf(o,"isoWeek",r):n.startOf(o,s)),+o)}function F1(t,e,n,i){const s=mi.length;for(let r=mi.indexOf(t);r=mi.indexOf(n);r--){const o=mi[r];if(Pf[o].common&&t._adapter.diff(s,i,o)>=e-1)return o}return mi[n?mi.indexOf(n):0]}function _U(t){for(let e=mi.indexOf(t)+1,n=mi.length;e=e?n[i]:n[s];t[r]=!0}}function yU(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 V1(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=Dn(n,0,o),i=Dn(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||F1(r.minUnit,n,i,this._getLabelCapacity(n)),a=it(s.ticks.stepSize,1),l=o==="week"?r.isoWeekday:!1,c=Pl(l)||l===!0,u={};let d=n,h,g;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,g=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 Dt(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],g=c&&d&&h&&h.major;return this._adapter.format(e,s||(g?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}=cr(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}=cr(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 vU extends dm{static id="timeseries";static defaults=dm.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=Fd(n,this.min),this._tableRange=Fd(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(Fd(this._table,e)-this._minPos)/this._tableRange}getValueForPixel(e){const n=this._offsets,i=this.getDecimalForPixel(e)/n.factor-n.end;return Fd(this._table,i*this._tableRange+this._minPos,!0)}}const pT={data:{type:Object,required:!0},options:{type:Object,default:()=>({})},plugins:{type:Array,default:()=>[]},datasetIdKey:{type:String,default:"label"},updateMode:{type:String,default:void 0}},bU={ariaLabel:{type:String},ariaDescribedby:{type:String}},wU={type:{type:String,required:!0},destroyDelay:{type:Number,default:0},...pT,...bU},xU=WE[0]==="2"?(t,e)=>Object.assign(t,{attrs:e}):(t,e)=>Object.assign(t,e);function Na(t){return $u(t)?lt(t):t}function EU(t){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:t;return $u(e)?new Proxy(t,{}):t}function CU(t,e){const n=t.options;n&&e&&Object.assign(n,e)}function mT(t,e){t.labels=e}function _T(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 SU(t,e){const n={labels:[],datasets:[]};return mT(n,t.labels),_T(n,t.datasets,e),n}const TU=hn({props:wU,setup(t,e){let{expose:n,slots:i}=e;const s=xe(null),r=af(null);n({chart:r});const o=()=>{if(!s.value)return;const{type:c,data:u,options:d,plugins:h,datasetIdKey:g}=t,p=SU(u,g),m=EU(p,u);r.value=new kf(s.value,{type:c,data:m,options:{...d},plugins:h})},a=()=>{const c=lt(r.value);c&&(t.destroyDelay>0?setTimeout(()=>{c.destroy(),r.value=null},t.destroyDelay):(c.destroy(),r.value=null))},l=c=>{c.update(t.updateMode)};return En(o),pa(a),un([()=>t.options,()=>t.data],(c,u)=>{let[d,h]=c,[g,p]=u;const m=lt(r.value);if(!m)return;let y=!1;if(d){const v=Na(d),b=Na(g);v&&v!==b&&(CU(m,v),y=!0)}if(h){const v=Na(h.labels),b=Na(p.labels),x=Na(h.datasets),E=Na(p.datasets);v!==b&&(mT(m.config.data,v),y=!0),x&&x!==E&&(_T(m.config.data,x,t.datasetIdKey),y=!0)}y&&Rn(()=>{l(m)})},{deep:!0}),()=>ua("canvas",{role:"img",ariaLabel:t.ariaLabel,ariaDescribedby:t.ariaDescribedby,ref:s},[ua("p",{},[i.default?i.default():""])])}});function yT(t,e){return kf.register(e),hn({props:pT,setup(n,i){let{expose:s}=i;const r=af(null),o=a=>{r.value=a?.chart};return s({chart:r}),()=>ua(TU,xU({ref:o},{type:t,...n}))}})}const AU=yT("bar",US),kU=yT("line",XS);function vr(t){return Array.isArray?Array.isArray(t):wT(t)==="[object Array]"}const MU=1/0;function PU(t){if(typeof t=="string")return t;let e=t+"";return e=="0"&&1/t==-MU?"-0":e}function IU(t){return t==null?"":PU(t)}function Ms(t){return typeof t=="string"}function vT(t){return typeof t=="number"}function DU(t){return t===!0||t===!1||RU(t)&&wT(t)=="[object Boolean]"}function bT(t){return typeof t=="object"}function RU(t){return bT(t)&&t!==null}function Ti(t){return t!=null}function ip(t){return!t.trim().length}function wT(t){return t==null?t===void 0?"[object Undefined]":"[object Null]":Object.prototype.toString.call(t)}const LU="Incorrect 'index' type",OU=t=>`Invalid value for key ${t}`,$U=t=>`Pattern length exceeds max of ${t}.`,NU=t=>`Missing ${t} property in key`,FU=t=>`Property 'weight' in key '${t}' must be a positive integer`,z1=Object.prototype.hasOwnProperty;class BU{constructor(e){this._keys=[],this._keyMap={};let n=0;e.forEach(i=>{let s=xT(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 xT(t){let e=null,n=null,i=null,s=1,r=null;if(Ms(t)||vr(t))i=t,e=W1(t),n=hm(t);else{if(!z1.call(t,"name"))throw new Error(NU("name"));const o=t.name;if(i=o,z1.call(t,"weight")&&(s=t.weight,s<=0))throw new Error(FU(o));e=W1(o),n=hm(o),r=t.getFn}return{path:e,id:n,weight:s,src:i,getFn:r}}function W1(t){return vr(t)?t:t.split(".")}function hm(t){return vr(t)?t.join("."):t}function VU(t,e){let n=[],i=!1;const s=(r,o,a)=>{if(Ti(r))if(!o[a])n.push(r);else{let l=o[a];const c=r[l];if(!Ti(c))return;if(a===o.length-1&&(Ms(c)||vT(c)||DU(c)))n.push(IU(c));else if(vr(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,Ms(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();Ms(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(Ti(o)){if(vr(o)){let a=[];const l=[{nestedArrIndex:-1,value:o}];for(;l.length;){const{nestedArrIndex:c,value:u}=l.pop();if(Ti(u))if(Ms(u)&&!ip(u)){let d={v:u,i:c,n:this.norm.get(u)};a.push(d)}else vr(u)&&u.forEach((d,h)=>{l.push({nestedArrIndex:h,value:d})})}i.$[r]=a}else if(Ms(o)&&!ip(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 ET(t,e,{getFn:n=Je.getFn,fieldNormWeight:i=Je.fieldNormWeight}={}){const s=new ny({getFn:n,fieldNormWeight:i});return s.setKeys(t.map(xT)),s.setSources(e),s.create(),s}function UU(t,{getFn:e=Je.getFn,fieldNormWeight:n=Je.fieldNormWeight}={}){const{keys:i,records:s}=t,r=new ny({getFn:e,fieldNormWeight:n});return r.setKeys(i),r.setIndexRecords(s),r}function Bd(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 GU(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 Ko=32;function XU(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>Ko)throw new Error($U(Ko));const u=e.length,d=t.length,h=Math.max(0,Math.min(i,d));let g=r,p=h;const m=a>1||l,y=m?Array(d):[];let v;for(;(v=t.indexOf(e,p))>-1;){let T=Bd(e,{currentLocation:v,expectedLocation:h,distance:s,ignoreLocation:c});if(g=Math.min(T,g),p=v+u,m){let A=0;for(;A=P;$-=1){let F=$-1,D=n[t.charAt(F)];if(m&&(y[F]=+!!D),Y[$]=(Y[$+1]<<1|1)&D,T&&(Y[$]|=(b[$+1]|b[$])<<1|1|b[$+1]),Y[$]&w&&(x=Bd(e,{errors:T,currentLocation:F,expectedLocation:h,distance:s,ignoreLocation:c}),x<=g)){if(g=x,p=F,p<=h)break;P=Math.max(1,2*h-p)}}if(Bd(e,{errors:T+1,currentLocation:h,expectedLocation:h,distance:s,ignoreLocation:c})>g)break;b=Y}const S={isMatch:p>=0,score:Math.max(.001,x)};if(m){const T=GU(y,a);T.length?l&&(S.indices=T):S.isMatch=!1}return S}function qU(t){let e={};for(let n=0,i=t.length;n{this.chunks.push({pattern:h,alphabet:qU(h),startIndex:g})},d=this.pattern.length;if(d>Ko){let h=0;const g=d%Ko,p=d-g;for(;h{const{isMatch:v,score:b,indices:x}=XU(e,p,m,{location:s+y,distance:r,threshold:o,findAllMatches:a,minMatchCharLength:l,includeMatches:i,ignoreLocation:c});v&&(h=!0),d+=b,v&&x&&(u=[...u,...x])});let g={isMatch:h,score:h?d/this.chunks.length:1};return h&&i&&(g.indices=u),g}}class wo{constructor(e){this.pattern=e}static isMultiMatch(e){return Y1(e,this.multiRegex)}static isSingleMatch(e){return Y1(e,this.singleRegex)}search(){}}function Y1(t,e){const n=t.match(e);return n?n[1]:null}class ZU extends wo{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 JU extends wo{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 QU extends wo{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 eG extends wo{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 tG extends wo{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 nG extends wo{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 ST extends wo{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 CT(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 TT extends wo{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 fm=[ZU,TT,QU,eG,nG,tG,JU,ST],H1=fm.length,iG=/ +(?=(?:[^\"]*\"[^\"]*\")*[^\"]*$)/,sG="|";function rG(t,e={}){return t.split(sG).map(n=>{let i=n.trim().split(iG).filter(r=>r&&!!r.trim()),s=[];for(let r=0,o=i.length;r!!(t[Dh.AND]||t[Dh.OR]),cG=t=>!!t[mm.PATH],uG=t=>!vr(t)&&bT(t)&&!_m(t),j1=t=>({[Dh.AND]:Object.keys(t).map(e=>({[e]:t[e]}))});function AT(t,e,{auto:n=!0}={}){const i=s=>{let r=Object.keys(s);const o=cG(s);if(!o&&r.length>1&&!_m(s))return i(j1(s));if(uG(s)){const l=o?s[mm.PATH]:r[0],c=o?s[mm.PATTERN]:s[l];if(!Ms(c))throw new Error(OU(l));const u={keyId:hm(l),pattern:c};return n&&(u.searcher=pm(c,e)),u}let a={children:[],operator:r[0]};return r.forEach(l=>{const c=s[l];vr(c)&&c.forEach(u=>{a.children.push(i(u))})}),a};return _m(t)||(t=j1(t)),i(t)}function dG(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 hG(t,e){const n=t.matches;e.matches=[],Ti(n)&&n.forEach(i=>{if(!Ti(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 fG(t,e){e.score=t.score}function gG(t,e,{includeMatches:n=Je.includeMatches,includeScore:i=Je.includeScore}={}){const s=[];return n&&s.push(hG),i&&s.push(fG),t.map(r=>{const{idx:o}=r,a={item:e[o],refIndex:o};return s.length&&s.forEach(l=>{l(r,a)}),a})}class Xl{constructor(e,n={},i){this.options={...Je,...n},this.options.useExtendedSearch,this._keyStore=new BU(this.options.keys),this.setCollection(e,i)}setCollection(e,n){if(this._docs=e,n&&!(n instanceof ny))throw new Error(LU);this._myIndex=n||ET(this.options.keys,this._docs,{getFn:this.options.getFn,fieldNormWeight:this.options.fieldNormWeight})}add(e){Ti(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)),gG(l,this._docs,{includeMatches:i,includeScore:s})}_searchStringList(e){const n=pm(e,this.options),{records:i}=this._myIndex,s=[];return i.forEach(({v:r,i:o,n:a})=>{if(!Ti(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=AT(e,this.options),i=(a,l,c)=>{if(!a.children){const{keyId:d,searcher:h}=a,g=this._findMatches({key:this._keyStore.get(d),value:this._myIndex.getValueForItemAtKeyId(l,d),searcher:h});return g&&g.length?[{idx:c,item:l,matches:g}]:[]}const u=[];for(let d=0,h=a.children.length;d{if(Ti(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=pm(e,this.options),{keys:i,records:s}=this._myIndex,r=[];return s.forEach(({$:o,i:a})=>{if(!Ti(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(!Ti(n))return[];let s=[];if(vr(n))n.forEach(({v:r,i:o,n:a})=>{if(!Ti(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}}Xl.version="7.0.0";Xl.createIndex=ET;Xl.parseIndex=UU;Xl.config=Je;Xl.parseQuery=AT;lG(aG);const pG={name:"peerSettings",components:{LocaleText:He},props:{selectedPeer:Object},data(){return{data:void 0,dataChanged:!1,showKey:!1,saving:!1}},setup(){return{dashboardConfigurationStore:tt()}},methods:{reset(){this.selectedPeer&&(this.data=JSON.parse(JSON.stringify(this.selectedPeer)),this.dataChanged=!1)},savePeer(){this.saving=!0,xt(`/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,xt(`/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})})}},mG={class:"peerSettingContainer w-100 h-100 position-absolute top-0 start-0 overflow-y-scroll"},_G={class:"container d-flex h-100 w-100"},yG={class:"m-auto modal-dialog-centered dashboardModal"},vG={class:"card rounded-3 shadow flex-grow-1"},bG={class:"card-header bg-transparent d-flex align-items-center gap-2 border-0 p-4 pb-2"},wG={class:"mb-0"},xG={key:0,class:"card-body px-4 pb-4"},EG={class:"d-flex flex-column gap-2 mb-4"},CG={class:"d-flex align-items-center"},SG={class:"text-muted"},TG={class:"ms-auto"},AG={for:"peer_name_textbox",class:"form-label"},kG={class:"text-muted"},MG=["disabled"],PG={class:"d-flex position-relative"},IG={for:"peer_private_key_textbox",class:"form-label"},DG={class:"text-muted"},RG=["type","disabled"],LG={for:"peer_allowed_ip_textbox",class:"form-label"},OG={class:"text-muted"},$G=["disabled"],NG={for:"peer_endpoint_allowed_ips",class:"form-label"},FG={class:"text-muted"},BG=["disabled"],VG={for:"peer_DNS_textbox",class:"form-label"},zG={class:"text-muted"},WG=["disabled"],YG={class:"accordion mt-3",id:"peerSettingsAccordion"},HG={class:"accordion-item"},jG={class:"accordion-header"},KG={class:"accordion-button rounded-3 collapsed",type:"button","data-bs-toggle":"collapse","data-bs-target":"#peerSettingsAccordionOptional"},UG={id:"peerSettingsAccordionOptional",class:"accordion-collapse collapse","data-bs-parent":"#peerSettingsAccordion"},GG={class:"accordion-body d-flex flex-column gap-2 mb-2"},XG={for:"peer_preshared_key_textbox",class:"form-label"},qG={class:"text-muted"},ZG=["disabled"],JG={for:"peer_mtu",class:"form-label"},QG={class:"text-muted"},e7=["disabled"],t7={for:"peer_keep_alive",class:"form-label"},n7={class:"text-muted"},i7=["disabled"],s7={class:"d-flex gap-2 align-items-center"},r7={class:"d-flex gap-2 ms-auto"},o7={class:"d-flex align-items-center gap-2"},a7=["disabled"],l7=["disabled"];function c7(t,e,n,i,s,r){const o=Ee("LocaleText");return R(),V("div",mG,[f("div",_G,[f("div",yG,[f("div",vG,[f("div",bG,[f("h4",wG,[N(o,{t:"Peer Settings"})]),f("button",{type:"button",class:"btn-close ms-auto",onClick:e[0]||(e[0]=a=>this.$emit("close"))})]),this.data?(R(),V("div",xG,[f("div",EG,[f("div",CG,[f("small",SG,[N(o,{t:"Public Key"})]),f("small",TG,[f("samp",null,we(this.data.id),1)])]),f("div",null,[f("label",AG,[f("small",kG,[N(o,{t:"Name"})])]),$e(f("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,MG),[[We,this.data.name]])]),f("div",null,[f("div",PG,[f("label",IG,[f("small",DG,[N(o,{t:"Private Key"}),f("code",null,[N(o,{t:"(Required for QR Code and Download)"})])])]),f("a",{role:"button",class:"ms-auto text-decoration-none toggleShowKey",onClick:e[2]||(e[2]=a=>this.showKey=!this.showKey)},[f("i",{class:Pe(["bi",[this.showKey?"bi-eye-slash-fill":"bi-eye-fill"]])},null,2)])]),$e(f("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,RG),[[QE,this.data.private_key]])]),f("div",null,[f("label",LG,[f("small",OG,[N(o,{t:"Allowed IPs"}),f("code",null,[N(o,{t:"(Required)"})])])]),$e(f("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,$G),[[We,this.data.allowed_ip]])]),f("div",null,[f("label",NG,[f("small",FG,[N(o,{t:"Endpoint Allowed IPs"}),f("code",null,[N(o,{t:"(Required)"})])])]),$e(f("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,BG),[[We,this.data.endpoint_allowed_ip]])]),f("div",null,[f("label",VG,[f("small",zG,[N(o,{t:"DNS"})])]),$e(f("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,WG),[[We,this.data.DNS]])]),f("div",YG,[f("div",HG,[f("h2",jG,[f("button",KG,[N(o,{t:"Optional Settings"})])]),f("div",UG,[f("div",GG,[f("div",null,[f("label",XG,[f("small",qG,[N(o,{t:"Pre-Shared Key"})])]),$e(f("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,ZG),[[We,this.data.preshared_key]])]),f("div",null,[f("label",JG,[f("small",QG,[N(o,{t:"MTU"})])]),$e(f("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,e7),[[We,this.data.mtu]])]),f("div",null,[f("label",t7,[f("small",n7,[N(o,{t:"Persistent Keepalive"})])]),$e(f("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,i7),[[We,this.data.keepalive]])])])])])]),e[18]||(e[18]=f("hr",null,null,-1)),f("div",s7,[f("strong",null,[N(o,{t:"Reset Data Usage"})]),f("div",r7,[f("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"))},[e[15]||(e[15]=f("i",{class:"bi bi-arrow-down-up me-2"},null,-1)),N(o,{t:"Total"})]),f("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"))},[e[16]||(e[16]=f("i",{class:"bi bi-arrow-down me-2"},null,-1)),N(o,{t:"Received"})]),f("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"))},[e[17]||(e[17]=f("i",{class:"bi bi-arrow-up me-2"},null,-1)),N(o,{t:"Sent"})])])])]),f("div",o7,[f("button",{class:"btn btn-secondary rounded-3 shadow",onClick:e[13]||(e[13]=a=>this.reset()),disabled:!this.dataChanged||this.saving},[N(o,{t:"Revert"}),e[19]||(e[19]=f("i",{class:"bi bi-arrow-clockwise ms-2"},null,-1))],8,a7),f("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(o,{t:"Save Peer"}),e[20]||(e[20]=f("i",{class:"bi bi-save-fill ms-2"},null,-1))],8,l7)])])):ce("",!0)])])])])}const u7=je(pG,[["render",c7],["__scopeId","data-v-2c571abb"]]);var ba={},d7=function(){return typeof Promise=="function"&&Promise.prototype&&Promise.prototype.then},kT={},Di={};let iy;const h7=[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];Di.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};Di.getSymbolTotalCodewords=function(e){return h7[e]};Di.getBCHDigit=function(t){let e=0;for(;t!==0;)e++,t>>>=1;return e};Di.setToSJISFunction=function(e){if(typeof e!="function")throw new Error('"toSJISFunc" is not a valid function.');iy=e};Di.isKanjiModeEnabled=function(){return typeof iy<"u"};Di.toSJIS=function(e){return iy(e)};var If={};(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}}})(If);function MT(){this.buffer=[],this.length=0}MT.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 f7=MT;function Uu(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)}Uu.prototype.set=function(t,e,n,i){const s=t*this.size+e;this.data[s]=n,i&&(this.reservedBit[s]=!0)};Uu.prototype.get=function(t,e){return this.data[t*this.size+e]};Uu.prototype.xor=function(t,e,n){this.data[t*this.size+e]^=n};Uu.prototype.isReserved=function(t,e){return this.reservedBit[t*this.size+e]};var g7=Uu,PT={};(function(t){const e=Di.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=g,a=1),g=s.get(h,d),g===u?l++:(l>=5&&(o+=e.N1+(l-5)),u=g,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 m7=sy,OT={},xo={},ry={};ry.isValid=function(e){return!isNaN(e)&&e>=1&&e<=40};var Vs={};const $T="[0-9]+",_7="[A-Z $%*+\\-./:]+";let yu="(?:[u3000-u303F]|[u3040-u309F]|[u30A0-u30FF]|[uFF00-uFFEF]|[u4E00-u9FAF]|[u2605-u2606]|[u2190-u2195]|u203B|[u2010u2015u2018u2019u2025u2026u201Cu201Du2225u2260]|[u0391-u0451]|[u00A7u00A8u00B1u00B4u00D7u00F7])+";yu=yu.replace(/u/g,"\\u");const y7="(?:(?![A-Z0-9 $%*+\\-./:]|"+yu+`)(?:.|[\r +]))+`;Vs.KANJI=new RegExp(yu,"g");Vs.BYTE_KANJI=new RegExp("[^A-Z0-9 $%*+\\-./:]+","g");Vs.BYTE=new RegExp(y7,"g");Vs.NUMERIC=new RegExp($T,"g");Vs.ALPHANUMERIC=new RegExp(_7,"g");const v7=new RegExp("^"+yu+"$"),b7=new RegExp("^"+$T+"$"),w7=new RegExp("^[A-Z0-9 $%*+\\-./:]+$");Vs.testKanji=function(e){return v7.test(e)};Vs.testNumeric=function(e){return b7.test(e)};Vs.testAlphanumeric=function(e){return w7.test(e)};(function(t){const e=ry,n=Vs;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}}})(xo);(function(t){const e=Di,n=Df,i=If,s=xo,r=ry,o=7973,a=e.getBCHDigit(o);function l(h,g,p){for(let m=1;m<=40;m++)if(g<=t.getCapacity(m,p,h))return m}function c(h,g){return s.getCharCountIndicator(h,g)+4}function u(h,g){let p=0;return h.forEach(function(m){const y=c(m.mode,g);p+=y+m.getBitsLength()}),p}function d(h,g){for(let p=1;p<=40;p++)if(u(h,p)<=t.getCapacity(p,g,s.MIXED))return p}t.from=function(g,p){return r.isValid(g)?parseInt(g,10):p},t.getCapacity=function(g,p,m){if(!r.isValid(g))throw new Error("Invalid QR Code version");typeof m>"u"&&(m=s.BYTE);const y=e.getSymbolTotalCodewords(g),v=n.getTotalCodewordsCount(g,p),b=(y-v)*8;if(m===s.MIXED)return b;const x=b-c(m,g);switch(m){case s.NUMERIC:return Math.floor(x/10*3);case s.ALPHANUMERIC:return Math.floor(x/11*2);case s.KANJI:return Math.floor(x/13);case s.BYTE:default:return Math.floor(x/8)}},t.getBestVersionForData=function(g,p){let m;const y=i.from(p,i.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(!r.isValid(g)||g<7)throw new Error("Invalid QR Code version");let p=g<<12;for(;e.getBCHDigit(p)-a>=0;)p^=o<=0;)s^=FT<0&&(i=this.data.substr(n),s=parseInt(i,10),e.put(s,r*3+1))};var C7=Rl;const S7=xo,sp=["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 Ll(t){this.mode=S7.ALPHANUMERIC,this.data=t}Ll.getBitsLength=function(e){return 11*Math.floor(e/2)+6*(e%2)};Ll.prototype.getLength=function(){return this.data.length};Ll.prototype.getBitsLength=function(){return Ll.getBitsLength(this.data.length)};Ll.prototype.write=function(e){let n;for(n=0;n+2<=this.data.length;n+=2){let i=sp.indexOf(this.data[n])*45;i+=sp.indexOf(this.data[n+1]),e.put(i,11)}this.data.length%2&&e.put(sp.indexOf(this.data[n]),6)};var T7=Ll;const A7=xo;function Ol(t){this.mode=A7.BYTE,typeof t=="string"?this.data=new TextEncoder().encode(t):this.data=new Uint8Array(t)}Ol.getBitsLength=function(e){return e*8};Ol.prototype.getLength=function(){return this.data.length};Ol.prototype.getBitsLength=function(){return Ol.getBitsLength(this.data.length)};Ol.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 I7=$l,VT={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,g,p,m,y;!a.empty();){l=a.pop(),c=l.value,d=l.cost,h=n[c]||{};for(u in h)h.hasOwnProperty(u)&&(g=h[u],p=d+g,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})(VT);var D7=VT.exports;(function(t){const e=xo,n=C7,i=T7,s=k7,r=I7,o=Vs,a=Di,l=D7;function c(v){return unescape(encodeURIComponent(v)).length}function u(v,b,x){const E=[];let w;for(;(w=v.exec(x))!==null;)E.push({data:w[0],index:w.index,mode:b,length:w[0].length});return E}function d(v){const b=u(o.NUMERIC,e.NUMERIC,v),x=u(o.ALPHANUMERIC,e.ALPHANUMERIC,v);let E,w;return a.isKanjiModeEnabled()?(E=u(o.BYTE,e.BYTE,v),w=u(o.KANJI,e.KANJI,v)):(E=u(o.BYTE_KANJI,e.BYTE,v),w=[]),b.concat(x,E,w).sort(function(T,A){return T.index-A.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 g(v){return v.reduce(function(b,x){const E=b.length-1>=0?b[b.length-1]:null;return E&&E.mode===x.mode?(b[b.length-1].data+=x.data,b):(b.push(x),b)},[])}function p(v){const b=[];for(let x=0;x=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 z7(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 ap(t,e,n){const i=t.size,s=F7.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 H7(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 j7(t,e,n){const i=new R7;n.forEach(function(l){i.put(l.mode.bit,4),i.put(l.getLength(),B7.getCharCountIndicator(l.mode,t)),l.write(i)});const s=Lf.getSymbolTotalCodewords(t),r=bm.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&&B7(l,e),V7(l,o),isNaN(i)&&(i=vm.getBestMask(l,ap.bind(null,l,n))),vm.applyMask(i,l),ap(l,n,i),{modules:l,version:e,errorCorrectionLevel:n,maskPattern:i,segments:s}}kT.create=function(e,n){if(typeof e>"u"||e==="")throw new Error("No input text");let i=rp.M,s,r;return typeof n<"u"&&(i=rp.from(n.errorCorrectionLevel,rp.M),s=Lh.from(n.version),r=vm.from(n.maskPattern),n.toSJISFunc&&Lf.setToSJISFunction(n.toSJISFunc)),Y7(e,s,i,r)};var zT={},oy={};(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)}})(zT);var WT={};const H7=oy;function G1(t,e){const n=t.a/255,i=e+'="'+t.hex+'"';return n<1?i+" "+e+'-opacity="'+n.toFixed(2).slice(1)+'"':i}function lp(t,e,n){let i=t+e;return typeof n<"u"&&(i+=" "+n),i}function j7(t,e,n){let i="",s=0,r=!1,o=0;for(let a=0;a0&&l>0&&t[a-1]||(i+=r?lp("M",l+n,.5+c+n):lp("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 K7=a7,wm=kT,YT=zT,U7=WT;function ay(t,e,n,i,s){const r=[].slice.call(arguments,1),o=r.length,a=typeof r[o-1]=="function";if(!a&&!K7())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=wm.create(n,i);l(t(u,e,i))}catch(u){c(u)}})}try{const l=wm.create(n,i);s(null,t(l,e,i))}catch(l){s(l)}}ba.create=wm.create;ba.toCanvas=ay.bind(null,YT.render);ba.toDataURL=ay.bind(null,YT.renderToDataURL);ba.toString=ay.bind(null,function(t,e,n){return U7.render(t,n)});const G7={name:"peerQRCode",components:{LocaleText:He},props:{peerConfigData:String},mounted(){ba.toCanvas(document.querySelector("#qrcode"),this.peerConfigData,t=>{t&&console.error(t)})}},X7={class:"peerSettingContainer w-100 h-100 position-absolute top-0 start-0"},q7={class:"container d-flex h-100 w-100"},Z7={class:"m-auto modal-dialog-centered dashboardModal justify-content-center"},J7={class:"card rounded-3 shadow"},Q7={class:"card-header bg-transparent d-flex align-items-center gap-2 border-0 p-4 pb-0"},eX={class:"mb-0"},tX={class:"card-body"},nX={id:"qrcode",class:"rounded-3 shadow",ref:"qrcode"};function iX(t,e,n,i,s,r){const o=Ee("LocaleText");return R(),V("div",X7,[g("div",q7,[g("div",Z7,[g("div",J7,[g("div",Q7,[g("h4",eX,[N(o,{t:"QR Code"})]),g("button",{type:"button",class:"btn-close ms-auto",onClick:e[0]||(e[0]=a=>this.$emit("close"))})]),g("div",tX,[g("canvas",nX,null,512)])])])])])}const sX=je(G7,[["render",iX]]),rX={name:"nameInput",components:{LocaleText:He},props:{bulk:Boolean,data:Object,saving:Boolean}},oX={for:"peer_name_textbox",class:"form-label"},aX={class:"text-muted"},lX=["disabled"];function cX(t,e,n,i,s,r){const o=Ee("LocaleText");return R(),V("div",{class:Pe({inactiveField:this.bulk})},[g("label",oX,[g("small",aX,[N(o,{t:"Name"})])]),$e(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,lX),[[We,this.data.name]])],2)}const uX=je(rX,[["render",cX]]),dX={name:"privatePublicKeyInput",components:{LocaleText:He},props:{data:Object,saving:Boolean,bulk:Boolean},setup(){const t=tt(),e=qn();return{dashboardStore:t,wgStore:e}},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.wgStore.checkWGKeyLength(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()}}}},hX={for:"peer_private_key_textbox",class:"form-label"},fX={class:"text-muted"},gX={class:"input-group"},pX=["disabled"],mX=["disabled"],_X={class:"d-flex"},yX={for:"public_key",class:"form-label"},vX={class:"text-muted"},bX={class:"form-check form-switch ms-auto"},wX=["disabled"],xX={class:"form-check-label",for:"enablePublicKeyEdit"},EX=["disabled"];function CX(t,e,n,i,s,r){const o=Ee("LocaleText");return R(),V("div",{class:Pe(["d-flex gap-2 flex-column",{inactiveField:this.bulk}])},[g("div",null,[g("label",hX,[g("small",fX,[N(o,{t:"Private Key"}),g("code",null,[N(o,{t:"(Required for QR Code and Download)"})])])]),g("div",gX,[$e(g("input",{type:"text",class:Pe(["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,pX),[[We,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"},e[6]||(e[6]=[g("i",{class:"bi bi-arrow-repeat"},null,-1)]),8,mX)])]),g("div",null,[g("div",_X,[g("label",yX,[g("small",vX,[N(o,{t:"Public Key"}),g("code",null,[N(o,{t:"(Required)"})])])]),g("div",bX,[$e(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,wX),[[Kn,this.editKey]]),g("label",xX,[g("small",null,[N(o,{t:"Use your own Private and Public Key"})])])])]),$e(g("input",{class:Pe(["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,EX),[[We,this.keypair.publicKey]])])],2)}const SX=je(dX,[["render",CX]]),TX={name:"allowedIPsInput",components:{LocaleText:He},props:{data:Object,saving:Boolean,bulk:Boolean,availableIp:void 0},data(){return{allowedIp:[],availableIpSearchString:"",customAvailableIp:"",allowedIpFormatError:!1}},setup(){const t=qn(),e=tt();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 At("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(){}},AX={for:"peer_allowed_ip_textbox",class:"form-label"},kX={class:"text-muted"},MX=["onClick"],PX={class:"d-flex gap-2 align-items-center"},IX={class:"input-group"},DX=["placeholder","disabled"],RX=["disabled"],LX={class:"text-muted"},OX={class:"dropdown flex-grow-1"},$X=["disabled"],NX={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"}},FX={class:"px-3 pb-2 pt-1 d-flex gap-3 align-items-center"},BX=["onClick"],VX={class:"me-auto"},zX={key:0},WX={class:"px-3 text-muted"};function YX(t,e,n,i,s,r){const o=Ee("LocaleText");return R(),V("div",{class:Pe({inactiveField:this.bulk})},[g("label",AX,[g("small",kX,[N(o,{t:"Allowed IPs"}),g("code",null,[N(o,{t:"(Required)"})])])]),g("div",{class:Pe(["d-flex gap-2 flex-wrap",{"mb-2":this.data.allowed_ips.length>0}])},[N(Ul,{name:"list"},{default:De(()=>[(R(!0),V(Oe,null,Ze(this.data.allowed_ips,(a,l)=>(R(),V("span",{class:"badge rounded-pill text-bg-success",key:a},[Ue(we(a)+" ",1),g("a",{role:"button",onClick:c=>this.data.allowed_ips.splice(l,1)},e[3]||(e[3]=[g("i",{class:"bi bi-x-circle-fill ms-1"},null,-1)]),8,MX)]))),128))]),_:1})],2),g("div",PX,[g("div",IX,[$e(g("input",{type:"text",class:Pe(["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,DX),[[We,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"},e[4]||(e[4]=[g("i",{class:"bi bi-plus-lg"},null,-1)]),8,RX)]),g("small",LX,[N(o,{t:"or"})]),g("div",OX,[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"},[e[5]||(e[5]=g("i",{class:"bi bi-filter-circle me-2"},null,-1)),N(o,{t:"Pick Available IP"})],8,$X),this.availableIp?(R(),V("ul",NX,[g("li",null,[g("div",FX,[e[6]||(e[6]=g("label",{for:"availableIpSearchString",class:"text-muted"},[g("i",{class:"bi bi-search"})],-1)),$e(g("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]])])]),(R(!0),V(Oe,null,Ze(this.searchAvailableIps,a=>(R(),V("li",null,[g("a",{class:"dropdown-item d-flex",role:"button",onClick:l=>this.addAllowedIp(a)},[g("span",VX,[g("small",null,we(a),1)])],8,BX)]))),256)),this.searchAvailableIps.length===0?(R(),V("li",zX,[g("small",WX,[N(o,{t:"No available IP containing"}),Ue(' "'+we(this.availableIpSearchString)+'"',1)])])):ce("",!0)])):ce("",!0)])])],2)}const HX=je(TX,[["render",YX],["__scopeId","data-v-6d5fc831"]]),jX={name:"dnsInput",components:{LocaleText:He},props:{data:Object,saving:Boolean},data(){return{error:!1,dns:JSON.parse(JSON.stringify(this.data.DNS))}},setup(){const t=qn(),e=tt();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()}}},KX={for:"peer_DNS_textbox",class:"form-label"},UX={class:"text-muted"},GX=["disabled"];function XX(t,e,n,i,s,r){const o=Ee("LocaleText");return R(),V("div",null,[g("label",KX,[g("small",UX,[N(o,{t:"DNS"})])]),$e(g("input",{type:"text",class:Pe(["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,GX),[[We,this.dns]])])}const qX=je(jX,[["render",XX]]),ZX={name:"endpointAllowedIps",components:{LocaleText:He},props:{data:Object,saving:Boolean},setup(){const t=qn(),e=tt();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()}}},JX={for:"peer_endpoint_allowed_ips",class:"form-label"},QX={class:"text-muted"},e9=["disabled"];function t9(t,e,n,i,s,r){const o=Ee("LocaleText");return R(),V("div",null,[g("label",JX,[g("small",QX,[N(o,{t:"Endpoint Allowed IPs"}),g("code",null,[N(o,{t:"(Required)"})])])]),$e(g("input",{type:"text",class:Pe(["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,e9),[[We,this.endpointAllowedIps]])])}const n9=je(ZX,[["render",t9]]),i9={name:"presharedKeyInput",components:{LocaleText:He},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=""}}},s9={class:"d-flex align-items-start"},r9={for:"peer_preshared_key_textbox",class:"form-label"},o9={class:"text-muted"},a9={class:"form-check form-switch ms-auto"},l9=["disabled"];function c9(t,e,n,i,s,r){const o=Ee("LocaleText");return R(),V("div",null,[g("div",s9,[g("label",r9,[g("small",o9,[N(o,{t:"Pre-Shared Key"})])]),g("div",a9,[$e(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),[[Kn,this.enable]])])]),$e(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,l9),[[We,this.data.preshared_key]])])}const u9=je(i9,[["render",c9]]),d9={name:"mtuInput",components:{LocaleText:He},props:{data:Object,saving:Boolean}},h9={for:"peer_mtu",class:"form-label"},f9={class:"text-muted"},g9=["disabled"];function p9(t,e,n,i,s,r){const o=Ee("LocaleText");return R(),V("div",null,[g("label",h9,[g("small",f9,[N(o,{t:"MTU"})])]),$e(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,g9),[[We,this.data.mtu]])])}const m9=je(d9,[["render",p9]]),_9={name:"persistentKeepAliveInput",components:{LocaleText:He},props:{data:Object,saving:Boolean}},y9={for:"peer_keep_alive",class:"form-label"},v9={class:"text-muted"},b9=["disabled"];function w9(t,e,n,i,s,r){const o=Ee("LocaleText");return R(),V("div",null,[g("label",y9,[g("small",v9,[N(o,{t:"Persistent Keepalive"})])]),$e(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,b9),[[We,this.data.keepalive]])])}const x9=je(_9,[["render",w9]]),E9={name:"bulkAdd",components:{LocaleText:He},props:{saving:Boolean,data:Object,availableIp:void 0},computed:{bulkAddGetLocale(){return At("How many peers you want to add?")}}},C9={class:"form-check form-switch"},S9=["disabled"],T9={class:"form-check-label me-2",for:"bulk_add"},A9={class:"text-muted d-block"},k9={key:0,class:"form-group"},M9=["max","placeholder"],P9={class:"text-muted"};function I9(t,e,n,i,s,r){const o=Ee("LocaleText");return R(),V("div",null,[g("div",C9,[$e(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,S9),[[Kn,this.data.bulkAdd]]),g("label",T9,[g("small",null,[g("strong",null,[N(o,{t:"Bulk Add"})])])])]),g("p",{class:Pe({"mb-0":!this.data.bulkAdd})},[g("small",A9,[N(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?(R(),V("div",k9,[$e(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,M9),[[We,this.data.bulkAddAmount]]),g("small",P9,[N(o,{t:"You can add up to "+this.availableIp.length+" peers"},null,8,["t"])])])):ce("",!0)])}const D9=je(E9,[["render",I9]]),R9={name:"peerCreate",components:{LocaleText:He,BulkAdd:D9,PersistentKeepAliveInput:x9,MtuInput:m9,PresharedKeyInput:u9,EndpointAllowedIps:n9,DnsInput:qX,AllowedIPsInput:HX,PrivatePublicKeyInput:SX,NameInput:uX},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(){Yt("/api/getAvailableIPs/"+this.$route.params.id,{},t=>{t.status&&(this.availableIp=t.data)})},setup(){const t=qn(),e=tt();return{store:t,dashboardStore:e}},methods:{peerCreate(){this.saving=!0,xt("/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)}}},L9={class:"container"},O9={class:"mb-4"},$9={class:"text-body mb-0"},N9={class:"d-flex flex-column gap-2"},F9={class:"row gy-3"},B9={key:0,class:"col-sm"},V9={class:"col-sm"},z9={class:"col-sm"},W9={key:1,class:"col-12"},Y9={class:"form-check form-switch"},H9={class:"form-check-label",for:"bullAdd_PresharedKey_Switch"},j9={class:"fw-bold"},K9={class:"d-flex mt-2"},U9=["disabled"],G9={key:0,class:"bi bi-plus-circle-fill me-2"};function X9(t,e,n,i,s,r){const o=Ee("LocaleText"),a=Ee("RouterLink"),l=Ee("BulkAdd"),c=Ee("NameInput"),u=Ee("PrivatePublicKeyInput"),d=Ee("AllowedIPsInput"),h=Ee("EndpointAllowedIps"),f=Ee("DnsInput"),p=Ee("PresharedKeyInput"),m=Ee("MtuInput"),y=Ee("PersistentKeepAliveInput");return R(),V("div",L9,[g("div",O9,[N(a,{to:"peers",is:"div",class:"d-flex align-items-center gap-4 text-decoration-none"},{default:De(()=>[e[2]||(e[2]=g("h3",{class:"mb-0 text-body"},[g("i",{class:"bi bi-chevron-left"})],-1)),g("h3",$9,[N(o,{t:"Add Peers"})])]),_:1})]),g("div",N9,[N(l,{saving:s.saving,data:this.data,availableIp:this.availableIp},null,8,["saving","data","availableIp"]),e[3]||(e[3]=g("hr",{class:"mb-0 mt-2"},null,-1)),this.data.bulkAdd?ce("",!0):(R(),Se(c,{key:0,saving:s.saving,data:this.data},null,8,["saving","data"])),this.data.bulkAdd?ce("",!0):(R(),Se(u,{key:1,saving:s.saving,data:s.data},null,8,["saving","data"])),this.data.bulkAdd?ce("",!0):(R(),Se(d,{key:2,availableIp:this.availableIp,saving:s.saving,data:s.data},null,8,["availableIp","saving","data"])),N(h,{saving:s.saving,data:s.data},null,8,["saving","data"]),N(f,{saving:s.saving,data:s.data},null,8,["saving","data"]),e[4]||(e[4]=g("hr",{class:"mb-0 mt-2"},null,-1)),g("div",F9,[this.data.bulkAdd?ce("",!0):(R(),V("div",B9,[N(p,{saving:s.saving,data:s.data,bulk:this.data.bulkAdd},null,8,["saving","data","bulk"])])),g("div",V9,[N(m,{saving:s.saving,data:s.data},null,8,["saving","data"])]),g("div",z9,[N(y,{saving:s.saving,data:s.data},null,8,["saving","data"])]),this.data.bulkAdd?(R(),V("div",W9,[g("div",Y9,[$e(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),[[Kn,this.data.preshared_key_bulkAdd]]),g("label",H9,[g("small",j9,[N(o,{t:"Pre-Shared Key"}),this.data.preshared_key_bulkAdd?(R(),Se(o,{key:0,t:"Enabled"})):(R(),Se(o,{key:1,t:"Disabled"}))])])])])):ce("",!0)]),g("div",K9,[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):(R(),V("i",G9)),this.saving?(R(),Se(o,{key:1,t:"Adding..."})):(R(),Se(o,{key:2,t:"Add"}))],8,U9)])])])}const HT=je(R9,[["render",X9],["__scopeId","data-v-3f34f584"]]),q9={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)}}},Z9={class:"dropdown scheduleDropdown"},J9={class:"dropdown-menu rounded-3 shadow",style:{"font-size":"0.875rem",width:"200px"}},Q9=["onClick"],eq={key:0,class:"bi bi-check ms-auto"};function tq(t,e,n,i,s,r){return R(),V("div",Z9,[g("button",{class:Pe(["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,we(this.currentSelection.display),1)],2),g("ul",J9,[n.edit?(R(!0),V(Oe,{key:0},Ze(this.options,o=>(R(),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,we(o.display),1),o.value===this.currentSelection.value?(R(),V("i",eq)):ce("",!0)],8,Q9)]))),256)):ce("",!0)])])}const jT=je(q9,[["render",tq],["__scopeId","data-v-6a5aba2a"]]),nq={name:"schedulePeerJob",components:{LocaleText:He,VueDatePicker:Yu,ScheduleDropdown:jT},props:{dropdowns:Array[Object],pjob:Object,viewOnly:!1},setup(t){const e=xe({}),n=xe(!1),i=xe(!1);e.value=JSON.parse(JSON.stringify(t.pjob)),e.value.CreationDate||(n.value=!0,i.value=!0);const s=tt();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?xt("/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&&xt("/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=bi(t).format("YYYY-MM-DD HH:mm:ss"))}}},iq={class:"card-header bg-transparent text-muted border-0"},sq={key:0,class:"d-flex"},rq={class:"me-auto"},oq={key:1},aq={class:"badge text-bg-warning"},lq={class:"card-body pt-1",style:{"font-family":"var(--bs-font-monospace)"}},cq={class:"d-flex gap-2 align-items-center mb-2"},uq=["disabled"],dq={class:"px-5 d-flex gap-2 align-items-center"},hq={class:"d-flex gap-3"},fq={key:0,class:"ms-auto d-flex gap-3"},gq={key:1,class:"ms-auto d-flex gap-3"};function pq(t,e,n,i,s,r){const o=Ee("LocaleText"),a=Ee("ScheduleDropdown"),l=Ee("VueDatePicker");return R(),V("div",{class:Pe(["card shadow-sm rounded-3 mb-2",{"border-warning-subtle":this.newJob}])},[g("div",iq,[this.newJob?(R(),V("small",oq,[g("span",aq,[N(o,{t:"Unsaved Job"})])])):(R(),V("small",sq,[g("strong",rq,[N(o,{t:"Job ID"})]),g("samp",null,we(this.job.JobID),1)]))]),g("div",lq,[g("div",cq,[g("samp",null,[N(o,{t:"if"})]),N(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,[N(o,{t:"is"})]),N(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"?(R(),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:!i.edit,dark:this.store.Configuration.Server.dashboard_theme==="dark"},null,8,["min-date","model-value","onUpdate:modelValue","disabled","dark"])):$e((R(),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,uq)),[[We,this.job.Value]]),g("samp",null,we(this.dropdowns.Field.find(c=>c.value===this.job.Field)?.unit)+" { ",1)]),g("div",dq,[g("samp",null,[N(o,{t:"then"})]),N(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",hq,[e[12]||(e[12]=g("samp",null,"}",-1)),this.edit?(R(),V("div",gq,[g("a",{role:"button",class:"text-secondary text-decoration-none",onClick:e[6]||(e[6]=c=>this.reset())},[e[10]||(e[10]=Ue("[C] ")),N(o,{t:"Cancel"})]),g("a",{role:"button",class:"text-primary ms-auto text-decoration-none",onClick:e[7]||(e[7]=c=>this.save())},[e[11]||(e[11]=Ue("[S] ")),N(o,{t:"Save"})])])):(R(),V("div",fq,[g("a",{role:"button",class:"ms-auto text-decoration-none",onClick:e[4]||(e[4]=c=>this.edit=!0)},[e[8]||(e[8]=Ue("[E] ")),N(o,{t:"Edit"})]),g("a",{role:"button",onClick:e[5]||(e[5]=c=>this.delete()),class:"text-danger text-decoration-none"},[e[9]||(e[9]=Ue("[D] ")),N(o,{t:"Delete"})])]))])])],2)}const KT=je(nq,[["render",pq],["__scopeId","data-v-8f3f1b93"]]),mq={name:"peerJobs",setup(){return{store:qn()}},props:{selectedPeer:Object},components:{LocaleText:He,SchedulePeerJob:KT,ScheduleDropdown:jT},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:Bs().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})))}}},_q={class:"peerSettingContainer w-100 h-100 position-absolute top-0 start-0 overflow-y-scroll"},yq={class:"container d-flex h-100 w-100"},vq={class:"m-auto modal-dialog-centered dashboardModal"},bq={class:"card rounded-3 shadow",style:{width:"700px"}},wq={class:"card-header bg-transparent d-flex align-items-center gap-2 border-0 p-4 pb-2"},xq={class:"mb-0 fw-normal"},Eq={class:"card-body px-4 pb-4 pt-2 position-relative"},Cq={class:"d-flex align-items-center mb-3"},Sq={class:"card shadow-sm",key:"none",style:{height:"153px"}},Tq={class:"card-body text-muted text-center d-flex"},Aq={class:"m-auto"};function kq(t,e,n,i,s,r){const o=Ee("LocaleText"),a=Ee("SchedulePeerJob");return R(),V("div",_q,[g("div",yq,[g("div",vq,[g("div",bq,[g("div",wq,[g("h4",xq,[N(o,{t:"Schedule Jobs"})]),g("button",{type:"button",class:"btn-close ms-auto",onClick:e[0]||(e[0]=l=>this.$emit("close"))})]),g("div",Eq,[g("div",Cq,[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())},[e[3]||(e[3]=g("i",{class:"bi bi-plus-lg me-2"},null,-1)),N(o,{t:"Job"})])]),N(Ul,{name:"schedulePeerJobTransition",tag:"div",class:"position-relative"},{default:De(()=>[(R(!0),V(Oe,null,Ze(this.selectedPeer.jobs,(l,c)=>(R(),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?(R(),V("div",Sq,[g("div",Tq,[g("h6",Aq,[N(o,{t:"This peer does not have any job yet."})])])])):ce("",!0)]),_:1})])])])])])}const Mq=je(mq,[["render",kq],["__scopeId","data-v-5bbdd42b"]]),Pq={name:"peerJobsAllModal",setup(){return{store:qn()}},components:{LocaleText:He,SchedulePeerJob:KT},props:{configurationPeers:Array[Object]},methods:{getuuid(){return Bs()}},computed:{getAllJobs(){return this.configurationPeers.filter(t=>t.jobs.length>0)}}},Iq={class:"peerSettingContainer w-100 h-100 position-absolute top-0 start-0 overflow-y-scroll"},Dq={class:"container d-flex h-100 w-100"},Rq={class:"m-auto modal-dialog-centered dashboardModal"},Lq={class:"card rounded-3 shadow",style:{width:"700px"}},Oq={class:"card-header bg-transparent d-flex align-items-center gap-2 border-0 p-4 pb-2"},$q={class:"mb-0 fw-normal"},Nq={class:"card-body px-4 pb-4 pt-2"},Fq={key:0,class:"accordion",id:"peerJobsLogsModalAccordion"},Bq={class:"accordion-header"},Vq=["data-bs-target"],zq={key:0},Wq={class:"text-muted"},Yq=["id"],Hq={class:"accordion-body"},jq={key:1,class:"card shadow-sm",style:{height:"153px"}},Kq={class:"card-body text-muted text-center d-flex"},Uq={class:"m-auto"};function Gq(t,e,n,i,s,r){const o=Ee("LocaleText"),a=Ee("SchedulePeerJob");return R(),V("div",Iq,[g("div",Dq,[g("div",Rq,[g("div",Lq,[g("div",Oq,[g("h4",$q,[N(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",Nq,[this.getAllJobs.length>0?(R(),V("div",Fq,[(R(!0),V(Oe,null,Ze(this.getAllJobs,(l,c)=>(R(),V("div",{class:"accordion-item",key:l.id},[g("h2",Bq,[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?(R(),V("span",zq,we(l.name)+" • ",1)):ce("",!0),g("samp",Wq,we(l.id),1)])])],8,Vq)]),g("div",{id:"collapse_"+c,class:"accordion-collapse collapse","data-bs-parent":"#peerJobsLogsModalAccordion"},[g("div",Hq,[(R(!0),V(Oe,null,Ze(l.jobs,u=>(R(),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,Yq)]))),128))])):(R(),V("div",jq,[g("div",Kq,[g("span",Uq,[N(o,{t:"No active job at the moment."})])])]))])])])])])}const Xq=je(Pq,[["render",Gq]]),qq={name:"peerJobsLogsModal",components:{LocaleText:He},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 Yt(`/api/getPeerScheduleJobLogs/${this.configurationInfo.Name}`,{},t=>{this.data=t.data,this.logFetchTime=bi().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)}}},Zq={class:"peerSettingContainer w-100 h-100 position-absolute top-0 start-0 overflow-y-scroll"},Jq={class:"container-fluid d-flex h-100 w-100"},Qq={class:"m-auto mt-0 modal-dialog-centered dashboardModal",style:{width:"100%"}},eZ={class:"card rounded-3 shadow w-100"},tZ={class:"card-header bg-transparent d-flex align-items-center gap-2 border-0 p-4 pb-0"},nZ={class:"mb-0"},iZ={class:"card-body px-4 pb-4 pt-2"},sZ={key:0},rZ={class:"mb-2 d-flex gap-3"},oZ={class:"d-flex gap-3 align-items-center"},aZ={class:"text-muted"},lZ={class:"form-check"},cZ={class:"form-check-label",for:"jobLogsShowSuccessCheck"},uZ={class:"badge text-success-emphasis bg-success-subtle"},dZ={class:"form-check"},hZ={class:"form-check-label",for:"jobLogsShowFailedCheck"},fZ={class:"badge text-danger-emphasis bg-danger-subtle"},gZ={class:"d-flex gap-3 align-items-center ms-auto"},pZ={class:"text-muted"},mZ={class:"form-check"},_Z={class:"form-check-label",for:"jobLogsShowJobIDCheck"},yZ={class:"form-check"},vZ={class:"form-check-label",for:"jobLogsShowLogIDCheck"},bZ={class:"table"},wZ={scope:"col"},xZ={key:0,scope:"col"},EZ={key:1,scope:"col"},CZ={scope:"col"},SZ={scope:"col"},TZ={style:{"font-size":"0.875rem"}},AZ={scope:"row"},kZ={key:0},MZ={class:"text-muted"},PZ={key:1},IZ={class:"text-muted"},DZ={class:"d-flex gap-2"},RZ={key:1,class:"d-flex align-items-center flex-column"};function LZ(t,e,n,i,s,r){const o=Ee("LocaleText");return R(),V("div",Zq,[g("div",Jq,[g("div",Qq,[g("div",eZ,[g("div",tZ,[g("h4",nZ,[N(o,{t:"Jobs Logs"})]),g("button",{type:"button",class:"btn-close ms-auto",onClick:e[0]||(e[0]=a=>this.$emit("close"))})]),g("div",iZ,[this.dataLoading?(R(),V("div",RZ,e[11]||(e[11]=[g("div",{class:"spinner-border text-body",role:"status"},[g("span",{class:"visually-hidden"},"Loading...")],-1)]))):(R(),V("div",sZ,[g("p",null,[N(o,{t:"Updated at"}),Ue(" : "+we(this.logFetchTime),1)]),g("div",rZ,[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"},[e[8]||(e[8]=g("i",{class:"bi bi-arrow-clockwise me-2"},null,-1)),N(o,{t:"Refresh"})]),g("div",oZ,[g("span",aZ,[N(o,{t:"Filter"})]),g("div",lZ,[$e(g("input",{class:"form-check-input",type:"checkbox","onUpdate:modelValue":e[2]||(e[2]=a=>this.showSuccessJob=a),id:"jobLogsShowSuccessCheck"},null,512),[[Kn,this.showSuccessJob]]),g("label",cZ,[g("span",uZ,[N(o,{t:"Success"})])])]),g("div",dZ,[$e(g("input",{class:"form-check-input",type:"checkbox","onUpdate:modelValue":e[3]||(e[3]=a=>this.showFailedJob=a),id:"jobLogsShowFailedCheck"},null,512),[[Kn,this.showFailedJob]]),g("label",hZ,[g("span",fZ,[N(o,{t:"Failed"})])])])]),g("div",gZ,[g("span",pZ,[N(o,{t:"Display"})]),g("div",mZ,[$e(g("input",{class:"form-check-input",type:"checkbox","onUpdate:modelValue":e[4]||(e[4]=a=>s.showJobID=a),id:"jobLogsShowJobIDCheck"},null,512),[[Kn,s.showJobID]]),g("label",_Z,[N(o,{t:"Job ID"})])]),g("div",yZ,[$e(g("input",{class:"form-check-input",type:"checkbox","onUpdate:modelValue":e[5]||(e[5]=a=>s.showLogID=a),id:"jobLogsShowLogIDCheck"},null,512),[[Kn,s.showLogID]]),g("label",vZ,[N(o,{t:"Log ID"})])])])]),g("table",bZ,[g("thead",null,[g("tr",null,[g("th",wZ,[N(o,{t:"Date"})]),s.showLogID?(R(),V("th",xZ,[N(o,{t:"Log ID"})])):ce("",!0),s.showJobID?(R(),V("th",EZ,[N(o,{t:"Job ID"})])):ce("",!0),g("th",CZ,[N(o,{t:"Status"})]),g("th",SZ,[N(o,{t:"Message"})])])]),g("tbody",null,[(R(!0),V(Oe,null,Ze(this.showLogs,a=>(R(),V("tr",TZ,[g("th",AZ,we(a.LogDate),1),s.showLogID?(R(),V("td",kZ,[g("samp",MZ,we(a.LogID),1)])):ce("",!0),s.showJobID?(R(),V("td",PZ,[g("samp",IZ,we(a.JobID),1)])):ce("",!0),g("td",null,[g("span",{class:Pe(["badge",[a.Status==="1"?"text-success-emphasis bg-success-subtle":"text-danger-emphasis bg-danger-subtle"]])},we(a.Status==="1"?"Success":"Failed"),3)]),g("td",null,we(a.Message),1)]))),256))])]),g("div",DZ,[this.getLogs.length>this.showLogAmount?(R(),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"},e[9]||(e[9]=[g("i",{class:"bi bi-chevron-down me-2"},null,-1),Ue(" Show More ")]))):ce("",!0),this.showLogAmount>20?(R(),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"},e[10]||(e[10]=[g("i",{class:"bi bi-chevron-up me-2"},null,-1),Ue(" Collapse ")]))):ce("",!0)])]))])])])])])}const OZ=je(qq,[["render",LZ]]),$Z={name:"peerShareLinkModal",props:{peer:Object},components:{LocaleText:He,VueDatePicker:Yu},data(){return{dataCopy:void 0,loading:!1}},setup(){return{store:tt()}},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,xt("/api/sharePeer/create",{Configuration:this.peer.configuration.Name,Peer:this.peer.id,ExpireDate:bi().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(){xt("/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=bi().format("YYYY-MM-DD HH:mm:ss"),this.updateLinkExpireDate()},parseTime(t){t?this.dataCopy.ExpireDate=bi(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}}},NZ={class:"peerSettingContainer w-100 h-100 position-absolute top-0 start-0 overflow-y-scroll"},FZ={class:"container d-flex h-100 w-100"},BZ={class:"m-auto modal-dialog-centered dashboardModal",style:{width:"500px"}},VZ={class:"card rounded-3 shadow flex-grow-1"},zZ={class:"card-header bg-transparent d-flex align-items-center gap-2 border-0 p-4"},WZ={class:"mb-0"},YZ={key:0,class:"card-body px-4 pb-4"},HZ={key:0},jZ={class:"mb-3 text-muted"},KZ=["disabled"],UZ={key:1},GZ={class:"d-flex gap-2 mb-4"},XZ=["href"],qZ={class:"d-flex flex-column gap-2 mb-3"},ZZ=["disabled"];function JZ(t,e,n,i,s,r){const o=Ee("LocaleText"),a=Ee("VueDatePicker");return R(),V("div",NZ,[g("div",FZ,[g("div",BZ,[g("div",VZ,[g("div",zZ,[g("h4",WZ,[N(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?(R(),V("div",YZ,[this.dataCopy?(R(),V("div",UZ,[g("div",GZ,[e[4]||(e[4]=g("i",{class:"bi bi-link-45deg"},null,-1)),g("a",{href:this.getUrl,class:"text-decoration-none",target:"_blank"},we(r.getUrl),9,XZ)]),g("div",qZ,[g("small",null,[e[5]||(e[5]=g("i",{class:"bi bi-calendar me-2"},null,-1)),N(o,{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"])]),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:Pe({"animate__animated animate__flash animate__infinite animate__slower":this.loading})},e[6]||(e[6]=[g("i",{class:"bi bi-send-slash-fill me-2"},null,-1)]),2),this.loading?(R(),Se(o,{key:0,t:"Stop Sharing..."})):(R(),Se(o,{key:1,t:"Stop Sharing"}))],8,ZZ)])):(R(),V("div",HZ,[g("h6",jZ,[N(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:Pe({"animate__animated animate__flash animate__infinite animate__slower":this.loading})},e[3]||(e[3]=[g("i",{class:"bi bi-send-fill me-2"},null,-1)]),2),this.loading?(R(),Se(o,{key:0,t:"Sharing..."})):(R(),Se(o,{key:1,t:"Start Sharing"}))],8,KZ)]))])):ce("",!0)])])])])}const QZ=je($Z,[["render",JZ]]),eJ={class:"container d-flex h-100 w-100"},tJ={class:"m-auto modal-dialog-centered dashboardModal",style:{width:"700px"}},nJ={class:"card rounded-3 shadow flex-grow-1"},iJ={class:"card-header bg-transparent d-flex align-items-center gap-2 border-0 p-4"},sJ={class:"mb-0"},rJ={class:"card-body px-4 pb-4"},oJ={class:"d-flex gap-2 flex-column"},aJ={class:"d-flex align-items-center"},lJ={class:"text-muted"},cJ={class:"ms-auto"},uJ={class:"d-flex align-items-center"},dJ={class:"text-muted"},hJ={class:"ms-auto"},fJ={for:"configuration_private_key",class:"form-label d-flex"},gJ={class:"text-muted d-block"},pJ={class:"form-check form-switch ms-auto"},mJ=["disabled"],_J={for:"configuration_ipaddress_cidr",class:"form-label"},yJ={class:"text-muted"},vJ=["disabled"],bJ={for:"configuration_listen_port",class:"form-label"},wJ={class:"text-muted"},xJ=["disabled"],EJ={for:"configuration_preup",class:"form-label"},CJ={class:"text-muted"},SJ=["disabled"],TJ={for:"configuration_predown",class:"form-label"},AJ={class:"text-muted"},kJ=["disabled"],MJ={for:"configuration_postup",class:"form-label"},PJ={class:"text-muted"},IJ=["disabled"],DJ={for:"configuration_postdown",class:"form-label"},RJ={class:"text-muted"},LJ=["disabled"],OJ={class:"d-flex align-items-center gap-2 mt-4"},$J=["disabled"],NJ=["disabled"],FJ={__name:"editConfiguration",props:{configurationInfo:Object},emits:["changed"],setup(t,{emit:e}){const n=t,i=qn(),s=tt(),r=xe(!1),o=Ki(JSON.parse(JSON.stringify(n.configurationInfo))),a=xe(!1),l=xe(!1);xe(!1);const c=Ki({PrivateKey:!0,IPAddress:!0,ListenPort:!0}),u=_D("editConfigurationContainer"),d=()=>{i.checkWGKeyLength(o.PrivateKey)?(c.PrivateKey=!0,o.PublicKey=window.wireguard.generatePublicKey(o.PrivateKey)):c.PrivateKey=!1},h=()=>{l.value=!1,Object.assign(o,JSON.parse(JSON.stringify(n.configurationInfo)))},f=e,p=()=>{r.value=!0,xt("/api/updateWireguardConfiguration",o,m=>{r.value=!1,m.status?(s.newMessage("Server","Configuration saved","success"),l.value=!1,f("dataChanged",m.data)):s.newMessage("Server",m.message,"danger")})};return un(o,()=>{l.value=JSON.stringify(o)!==JSON.stringify(n.configurationInfo)},{deep:!0}),(m,y)=>(R(),V("div",{class:"peerSettingContainer w-100 h-100 position-absolute top-0 start-0 overflow-y-scroll",ref_key:"editConfigurationContainer",ref:u},[g("div",eJ,[g("div",tJ,[g("div",nJ,[g("div",iJ,[g("h4",sJ,[N(He,{t:"Configuration Settings"})]),g("button",{type:"button",class:"btn-close ms-auto",onClick:y[0]||(y[0]=v=>m.$emit("close"))})]),g("div",rJ,[g("div",oJ,[g("div",aJ,[g("small",lJ,[N(He,{t:"Name"})]),g("small",cJ,[g("samp",null,we(o.Name),1)])]),g("div",uJ,[g("small",dJ,[N(He,{t:"Public Key"})]),g("small",hJ,[g("samp",null,we(o.PublicKey),1)])]),y[15]||(y[15]=g("hr",null,null,-1)),g("div",null,[g("label",fJ,[g("small",gJ,[N(He,{t:"Private Key"})]),g("div",pJ,[$e(g("input",{class:"form-check-input",type:"checkbox",role:"switch",id:"editPrivateKeySwitch","onUpdate:modelValue":y[1]||(y[1]=v=>a.value=v)},null,512),[[Kn,a.value]]),y[12]||(y[12]=g("label",{class:"form-check-label",for:"editPrivateKeySwitch"},[g("small",null,"Edit")],-1))])]),$e(g("input",{type:"text",class:Pe(["form-control form-control-sm rounded-3",{"is-invalid":!c.PrivateKey}]),disabled:r.value||!a.value,onKeyup:y[2]||(y[2]=v=>d()),"onUpdate:modelValue":y[3]||(y[3]=v=>o.PrivateKey=v),id:"configuration_private_key"},null,42,mJ),[[We,o.PrivateKey]])]),g("div",null,[g("label",_J,[g("small",yJ,[N(He,{t:"IP Address/CIDR"})])]),$e(g("input",{type:"text",class:"form-control form-control-sm rounded-3",disabled:r.value,"onUpdate:modelValue":y[4]||(y[4]=v=>o.Address=v),id:"configuration_ipaddress_cidr"},null,8,vJ),[[We,o.Address]])]),g("div",null,[g("label",bJ,[g("small",wJ,[N(He,{t:"Listen Port"})])]),$e(g("input",{type:"number",class:"form-control form-control-sm rounded-3",disabled:r.value,"onUpdate:modelValue":y[5]||(y[5]=v=>o.ListenPort=v),id:"configuration_listen_port"},null,8,xJ),[[We,o.ListenPort]])]),g("div",null,[g("label",EJ,[g("small",CJ,[N(He,{t:"PreUp"})])]),$e(g("input",{type:"text",class:"form-control form-control-sm rounded-3",disabled:r.value,"onUpdate:modelValue":y[6]||(y[6]=v=>o.PreUp=v),id:"configuration_preup"},null,8,SJ),[[We,o.PreUp]])]),g("div",null,[g("label",TJ,[g("small",AJ,[N(He,{t:"PreDown"})])]),$e(g("input",{type:"text",class:"form-control form-control-sm rounded-3",disabled:r.value,"onUpdate:modelValue":y[7]||(y[7]=v=>o.PreDown=v),id:"configuration_predown"},null,8,kJ),[[We,o.PreDown]])]),g("div",null,[g("label",MJ,[g("small",PJ,[N(He,{t:"PostUp"})])]),$e(g("input",{type:"text",class:"form-control form-control-sm rounded-3",disabled:r.value,"onUpdate:modelValue":y[8]||(y[8]=v=>o.PostUp=v),id:"configuration_postup"},null,8,IJ),[[We,o.PostUp]])]),g("div",null,[g("label",DJ,[g("small",RJ,[N(He,{t:"PostDown"})])]),$e(g("input",{type:"text",class:"form-control form-control-sm rounded-3",disabled:r.value,"onUpdate:modelValue":y[9]||(y[9]=v=>o.PostDown=v),id:"configuration_postdown"},null,8,LJ),[[We,o.PostDown]])]),g("div",OJ,[g("button",{class:"btn bg-secondary-subtle border-secondary-subtle text-secondary-emphasis rounded-3 shadow ms-auto px-3 py-2",onClick:y[10]||(y[10]=v=>h()),disabled:!l.value||r.value},y[13]||(y[13]=[g("i",{class:"bi bi-arrow-clockwise"},null,-1)]),8,$J),g("button",{class:"btn bg-primary-subtle border-primary-subtle text-primary-emphasis rounded-3 px-3 py-2 shadow",disabled:!l.value||r.value,onClick:y[11]||(y[11]=v=>p())},y[14]||(y[14]=[g("i",{class:"bi bi-save-fill"},null,-1)]),8,NJ)])])])])])])],512))}};kf.register(Vj,Mf,nK,qj,US,vH,GS,XS,xH,wH,EH,CH,KK,GK,ZK,dU,dm,pU,oK,TK,DK,LK,WK);const BJ={name:"peerList",components:{EditConfiguration:FJ,LocaleText:He,PeerShareLinkModal:QZ,PeerJobsLogsModal:OZ,PeerJobsAllModal:Xq,PeerJobs:Mq,PeerCreate:HT,PeerQRCode:sX,PeerSettings:o7,PeerSearch:IW,Peer:cY,Line:CU,Bar:EU},setup(){const t=tt(),e=qn(),n=xe(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},editConfiguration:{modalOpen:!1}}},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,Yt("/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){Yt("/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,bi().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,bi().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 Xl(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)}}},VJ={key:0,class:"container-md"},zJ={class:"d-flex align-items-center"},WJ={CLASS:"text-muted"},YJ={class:"d-flex align-items-center gap-3"},HJ={class:"mb-0"},jJ={class:"card rounded-3 bg-transparent shadow-sm ms-auto"},KJ={class:"card-body py-2 d-flex align-items-center"},UJ={class:"mb-0 text-muted"},GJ={class:"form-check form-switch ms-auto"},XJ=["for"],qJ={key:4,class:"spinner-border spinner-border-sm ms-2","aria-hidden":"true"},ZJ=["disabled","id"],JJ={class:"row mt-3 gy-2 gx-2 mb-2"},QJ={class:"col-6 col-lg-3"},eQ={class:"card rounded-3 bg-transparent shadow-sm"},tQ={class:"card-body py-2"},nQ={class:"mb-0 text-muted"},iQ={class:"col-6 col-lg-3"},sQ={class:"card rounded-3 bg-transparent shadow-sm"},rQ={class:"card-body py-2"},oQ={class:"mb-0 text-muted"},aQ={style:{"word-break":"break-all"},class:"col-12 col-lg-6"},lQ={class:"card rounded-3 bg-transparent shadow-sm"},cQ={class:"card-body py-2"},uQ={class:"mb-0 text-muted"},dQ={class:"row gx-2 gy-2 mb-2"},hQ={class:"col-6 col-lg-3"},fQ={class:"card rounded-3 bg-transparent shadow-sm"},gQ={class:"card-body d-flex"},pQ={class:"mb-0 text-muted"},mQ={class:"h4"},_Q={class:"col-6 col-lg-3"},yQ={class:"card rounded-3 bg-transparent shadow-sm"},vQ={class:"card-body d-flex"},bQ={class:"mb-0 text-muted"},wQ={class:"h4"},xQ={class:"col-6 col-lg-3"},EQ={class:"card rounded-3 bg-transparent shadow-sm"},CQ={class:"card-body d-flex"},SQ={class:"mb-0 text-muted"},TQ={class:"h4 text-primary"},AQ={class:"col-6 col-lg-3"},kQ={class:"card rounded-3 bg-transparent shadow-sm"},MQ={class:"card-body d-flex"},PQ={class:"mb-0 text-muted"},IQ={class:"h4 text-success"},DQ={class:"row gx-2 gy-2 mb-3"},RQ={class:"col-12 col-lg-6"},LQ={class:"card rounded-3 bg-transparent shadow-sm",style:{height:"270px"}},OQ={class:"card-header bg-transparent border-0"},$Q={class:"text-muted"},NQ={class:"card-body pt-1"},FQ={class:"col-sm col-lg-3"},BQ={class:"card rounded-3 bg-transparent shadow-sm",style:{height:"270px"}},VQ={class:"card-header bg-transparent border-0"},zQ={class:"text-muted"},WQ={class:"card-body pt-1"},YQ={class:"col-sm col-lg-3"},HQ={class:"card rounded-3 bg-transparent shadow-sm",style:{height:"270px"}},jQ={class:"card-header bg-transparent border-0"},KQ={class:"text-muted"},UQ={class:"card-body pt-1"},GQ={class:"mb-3"};function XQ(t,e,n,i,s,r){const o=Ee("LocaleText"),a=Ee("Bar"),l=Ee("Line"),c=Ee("PeerSearch"),u=Ee("Peer"),d=Ee("PeerSettings"),h=Ee("PeerQRCode"),f=Ee("PeerJobs"),p=Ee("PeerJobsAllModal"),m=Ee("PeerJobsLogsModal"),y=Ee("PeerShareLinkModal"),v=Ee("EditConfiguration");return this.loading?ce("",!0):(R(),V("div",VJ,[g("div",zJ,[g("div",null,[g("small",WJ,[N(o,{t:"CONFIGURATION"})]),g("div",YJ,[g("h1",HJ,[g("samp",null,we(this.configurationInfo.Name),1)])])]),g("div",jJ,[g("div",KJ,[g("div",null,[g("p",UJ,[g("small",null,[N(o,{t:"Status"})])]),g("div",GJ,[g("label",{class:"form-check-label",style:{cursor:"pointer"},for:"switch"+this.configurationInfo.id},[!this.configurationInfo.Status&&this.configurationToggling?(R(),Se(o,{key:0,t:"Turning Off..."})):this.configurationInfo.Status&&this.configurationToggling?(R(),Se(o,{key:1,t:"Turning On..."})):this.configurationInfo.Status&&!this.configurationToggling?(R(),Se(o,{key:2,t:"On"})):!this.configurationInfo.Status&&!this.configurationToggling?(R(),Se(o,{key:3,t:"Off"})):ce("",!0),this.configurationToggling?(R(),V("span",qJ)):ce("",!0)],8,XJ),$e(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]=b=>this.toggle()),"onUpdate:modelValue":e[1]||(e[1]=b=>this.configurationInfo.Status=b)},null,40,ZJ),[[Kn,this.configurationInfo.Status]])])]),g("div",{class:Pe(["dot ms-5",{active:this.configurationInfo.Status}])},null,2)])])]),g("div",JJ,[g("div",QJ,[g("div",eQ,[g("div",tQ,[g("p",nQ,[g("small",null,[N(o,{t:"Address"})])]),Ue(" "+we(this.configurationInfo.Address),1)])])]),g("div",iQ,[g("div",sQ,[g("div",rQ,[g("p",oQ,[g("small",null,[N(o,{t:"Listen Port"})])]),Ue(" "+we(this.configurationInfo.ListenPort),1)])])]),g("div",aQ,[g("div",lQ,[g("div",cQ,[g("p",uQ,[g("small",null,[N(o,{t:"Public Key"})])]),g("samp",null,we(this.configurationInfo.PublicKey),1)])])])]),g("div",dQ,[g("div",hQ,[g("div",fQ,[g("div",gQ,[g("div",null,[g("p",pQ,[g("small",null,[N(o,{t:"Connected Peers"})])]),g("strong",mQ,we(r.configurationSummary.connectedPeers)+" / "+we(s.configurationPeers.length),1)]),e[18]||(e[18]=g("i",{class:"bi bi-ethernet ms-auto h2 text-muted"},null,-1))])])]),g("div",_Q,[g("div",yQ,[g("div",vQ,[g("div",null,[g("p",bQ,[g("small",null,[N(o,{t:"Total Usage"})])]),g("strong",wQ,we(r.configurationSummary.totalUsage)+" GB",1)]),e[19]||(e[19]=g("i",{class:"bi bi-arrow-down-up ms-auto h2 text-muted"},null,-1))])])]),g("div",xQ,[g("div",EQ,[g("div",CQ,[g("div",null,[g("p",SQ,[g("small",null,[N(o,{t:"Total Received"})])]),g("strong",TQ,we(r.configurationSummary.totalReceive)+" GB",1)]),e[20]||(e[20]=g("i",{class:"bi bi-arrow-down ms-auto h2 text-muted"},null,-1))])])]),g("div",AQ,[g("div",kQ,[g("div",MQ,[g("div",null,[g("p",PQ,[g("small",null,[N(o,{t:"Total Sent"})])]),g("strong",IQ,we(r.configurationSummary.totalSent)+" GB",1)]),e[21]||(e[21]=g("i",{class:"bi bi-arrow-up ms-auto h2 text-muted"},null,-1))])])])]),g("div",DQ,[g("div",RQ,[g("div",LQ,[g("div",OQ,[g("small",$Q,[N(o,{t:"Peers Data Usage"})])]),g("div",NQ,[N(a,{data:r.individualDataUsage,options:r.individualDataUsageChartOption,style:{width:"100%",height:"200px","max-height":"200px"}},null,8,["data","options"])])])]),g("div",FQ,[g("div",BQ,[g("div",VQ,[g("small",zQ,[N(o,{t:"Real Time Received Data Usage"})])]),g("div",WQ,[N(l,{options:r.chartOptions,data:r.receiveData,style:{width:"100%",height:"200px","max-height":"200px"}},null,8,["options","data"])])])]),g("div",YQ,[g("div",HQ,[g("div",jQ,[g("small",KQ,[N(o,{t:"Real Time Sent Data Usage"})])]),g("div",UQ,[N(l,{options:r.chartOptions,data:r.sentData,style:{width:"100%",height:"200px","max-height":"200px"}},null,8,["options","data"])])])])]),g("div",GQ,[N(c,{onJobsAll:e[2]||(e[2]=b=>this.peerScheduleJobsAll.modalOpen=!0),onJobLogs:e[3]||(e[3]=b=>this.peerScheduleJobsLogs.modalOpen=!0),onEditConfiguration:e[4]||(e[4]=b=>this.editConfiguration.modalOpen=!0),configuration:this.configurationInfo},null,8,["configuration"]),N(Ul,{name:"list",tag:"div",class:"row gx-2 gy-2 z-0"},{default:De(()=>[(R(!0),V(Oe,null,Ze(this.searchPeers,b=>(R(),V("div",{class:"col-12 col-lg-6 col-xl-4",key:b.id},[N(u,{Peer:b,onShare:x=>{this.peerShare.selectedPeer=b.id,this.peerShare.modalOpen=!0},onRefresh:e[5]||(e[5]=x=>this.getPeers()),onJobs:x=>{s.peerScheduleJobs.modalOpen=!0,s.peerScheduleJobs.selectedPeer=this.configurationPeers.find(E=>E.id===b.id)},onSetting:x=>{s.peerSetting.modalOpen=!0,s.peerSetting.selectedPeer=this.configurationPeers.find(E=>E.id===b.id)},onQrcode:e[6]||(e[6]=x=>{this.peerQRCode.peerConfigData=x,this.peerQRCode.modalOpen=!0})},null,8,["Peer","onShare","onJobs","onSetting"])]))),128))]),_:1})]),N($t,{name:"zoom"},{default:De(()=>[this.peerSetting.modalOpen?(R(),Se(d,{key:"settings",selectedPeer:this.peerSetting.selectedPeer,onRefresh:e[7]||(e[7]=b=>this.getPeers()),onClose:e[8]||(e[8]=b=>this.peerSetting.modalOpen=!1)},null,8,["selectedPeer"])):ce("",!0)]),_:1}),N($t,{name:"zoom"},{default:De(()=>[s.peerQRCode.modalOpen?(R(),Se(h,{peerConfigData:this.peerQRCode.peerConfigData,key:"qrcode",onClose:e[9]||(e[9]=b=>this.peerQRCode.modalOpen=!1)},null,8,["peerConfigData"])):ce("",!0)]),_:1}),N($t,{name:"zoom"},{default:De(()=>[this.peerScheduleJobs.modalOpen?(R(),Se(f,{key:0,onRefresh:e[10]||(e[10]=b=>this.getPeers()),selectedPeer:this.peerScheduleJobs.selectedPeer,onClose:e[11]||(e[11]=b=>this.peerScheduleJobs.modalOpen=!1)},null,8,["selectedPeer"])):ce("",!0)]),_:1}),N($t,{name:"zoom"},{default:De(()=>[this.peerScheduleJobsAll.modalOpen?(R(),Se(p,{key:0,onRefresh:e[12]||(e[12]=b=>this.getPeers()),onClose:e[13]||(e[13]=b=>this.peerScheduleJobsAll.modalOpen=!1),configurationPeers:this.configurationPeers},null,8,["configurationPeers"])):ce("",!0)]),_:1}),N($t,{name:"zoom"},{default:De(()=>[this.peerScheduleJobsLogs.modalOpen?(R(),Se(m,{key:0,onClose:e[14]||(e[14]=b=>this.peerScheduleJobsLogs.modalOpen=!1),configurationInfo:this.configurationInfo},null,8,["configurationInfo"])):ce("",!0)]),_:1}),N($t,{name:"zoom"},{default:De(()=>[this.peerShare.modalOpen?(R(),Se(y,{key:0,onClose:e[15]||(e[15]=b=>{this.peerShare.modalOpen=!1,this.peerShare.selectedPeer=void 0}),peer:this.configurationPeers.find(b=>b.id===this.peerShare.selectedPeer)},null,8,["peer"])):ce("",!0)]),_:1}),N($t,{name:"zoom"},{default:De(()=>[this.editConfiguration.modalOpen?(R(),Se(v,{key:0,onClose:e[16]||(e[16]=b=>this.editConfiguration.modalOpen=!1),onDataChanged:e[17]||(e[17]=b=>this.configurationInfo=b),configurationInfo:this.configurationInfo},null,8,["configurationInfo"])):ce("",!0)]),_:1})]))}const qQ=je(BJ,[["render",XQ],["__scopeId","data-v-a57c6624"]]);class Er{constructor(e){this.propagationStopped,this.defaultPrevented,this.type=e,this.target=null}preventDefault(){this.defaultPrevented=!0}stopPropagation(){this.propagationStopped=!0}}const Nl={PROPERTYCHANGE:"propertychange"};class Of{constructor(){this.disposed=!1}dispose(){this.disposed||(this.disposed=!0,this.disposeInternal())}disposeInternal(){}}function ZQ(t,e,n){let i,s;n=n||hr;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 hr(t,e){return t>e?1:t0?s-1:s}return i-1}if(n>0){for(let s=1;s0||o===0)})}function vu(){return!0}function Nf(){return!1}function Fl(){}function UT(t){let e,n,i;return function(){const s=Array.prototype.slice.call(arguments);return(!n||this!==i||!Eo(s,n))&&(i=this,n=s,e=t.apply(this,arguments)),e}}function eee(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 Gu(t){for(const e in t)delete t[e]}function Bl(t){let e;for(e in t)return!1;return!e}class Ff extends Of{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 Er(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]=Fl,++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 ht(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 Oh(t,e,n,i){return ht(t,e,n,i,!0)}function Rt(t){t&&t.target&&(t.target.removeEventListener(t.type,t.listener),Gu(t))}class Xu 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 Wd(fi.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 Wd(fi.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 Wd(fi.REMOVE,s,e)),this.dispatchEvent(new Wd(fi.ADD,n,e))}updateLength_(){this.set(q1.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 ul(t,e,n,i)}function ul(t,e,n,i){const s=n-t,r=i-e;return s*s+r*r}function see(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 uh(t){return t*Math.PI/180}function dl(t,e){const n=t%e;return n*e<0?n+e:n}function Ai(t,e,n){return t+n*(e-t)}function cy(t,e){const n=Math.pow(10,e);return Math.round(t*n)/n}function Yd(t,e){return Math.floor(cy(t,e))}function Hd(t,e){return Math.ceil(cy(t,e))}class GT extends zs{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[Et.OPACITY]=e.opacity!==void 0?e.opacity:1,pt(typeof n[Et.OPACITY]=="number","Layer opacity must be a number"),n[Et.VISIBLE]=e.visible!==void 0?e.visible:!0,n[Et.Z_INDEX]=e.zIndex,n[Et.MAX_RESOLUTION]=e.maxResolution!==void 0?e.maxResolution:1/0,n[Et.MIN_RESOLUTION]=e.minResolution!==void 0?e.minResolution:0,n[Et.MIN_ZOOM]=e.minZoom!==void 0?e.minZoom:-1/0,n[Et.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=nn(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 gt()}getLayerStatesArray(e){return gt()}getExtent(){return this.get(Et.EXTENT)}getMaxResolution(){return this.get(Et.MAX_RESOLUTION)}getMinResolution(){return this.get(Et.MIN_RESOLUTION)}getMinZoom(){return this.get(Et.MIN_ZOOM)}getMaxZoom(){return this.get(Et.MAX_ZOOM)}getOpacity(){return this.get(Et.OPACITY)}getSourceState(){return gt()}getVisible(){return this.get(Et.VISIBLE)}getZIndex(){return this.get(Et.Z_INDEX)}setBackground(e){this.background_=e,this.changed()}setExtent(e){this.set(Et.EXTENT,e)}setMaxResolution(e){this.set(Et.MAX_RESOLUTION,e)}setMinResolution(e){this.set(Et.MIN_RESOLUTION,e)}setMaxZoom(e){this.set(Et.MAX_ZOOM,e)}setMinZoom(e){this.set(Et.MIN_ZOOM,e)}setOpacity(e){pt(typeof e=="number","Layer opacity must be a number"),this.set(Et.OPACITY,e)}setVisible(e){this.set(Et.VISIBLE,e)}setZIndex(e){this.set(Et.Z_INDEX,e)}disposeInternal(){this.state_&&(this.state_.layer=null,this.state_=null),super.disposeInternal()}}const zi={PRERENDER:"prerender",POSTRENDER:"postrender",PRECOMPOSE:"precompose",POSTCOMPOSE:"postcompose",RENDERCOMPLETE:"rendercomplete"},Wn={ANIMATING:0,INTERACTING:1},Qi={CENTER:"center",RESOLUTION:"resolution",ROTATION:"rotation"},ree=42,uy=256,dy={radians:6370997/(2*Math.PI),degrees:2*Math.PI*6370997/360,ft:.3048,m:1,"us-ft":1200/3937};class XT{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_||dy[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 qu=6378137,tl=Math.PI*qu,oee=[-tl,-tl,tl,tl],aee=[-180,-85,180,85],jd=qu*Math.log(Math.tan(Math.PI/2));class Fa extends XT{constructor(e){super({code:e,units:"m",extent:oee,global:!0,worldExtent:aee,getPointResolution:function(n,i){return n/Math.cosh(i[1]/qu)}})}}const Z1=[new Fa("EPSG:3857"),new Fa("EPSG:102100"),new Fa("EPSG:102113"),new Fa("EPSG:900913"),new Fa("http://www.opengis.net/def/crs/EPSG/0/3857"),new Fa("http://www.opengis.net/gml/srs/epsg.xml#3857")];function lee(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;rjd?o=jd:o<-jd&&(o=-jd),e[r+1]=o}return e}function cee(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 uo(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 uo(1/0,1/0,-1/0,-1/0,t)}function JT(t,e){const n=t[0],i=t[1];return uo(n,i,n,i,e)}function gy(t,e,n,i,s){const r=Bf(s);return QT(r,t,e,n,i)}function bu(t,e){return t[0]==e[0]&&t[2]==e[2]&&t[1]==e[1]&&t[3]==e[3]}function pee(t,e){return e[0]t[2]&&(t[2]=e[2]),e[1]t[3]&&(t[3]=e[3]),t}function Zc(t,e){e[0]t[2]&&(t[2]=e[0]),e[1]t[3]&&(t[3]=e[1])}function QT(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 Yf(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 tA(t,e){const n=e.getExtent(),i=fa(t);if(e.canWrapX()&&(i[0]=n[2])){const s=yt(n),o=Math.floor((i[0]-n[0])/s)*s;t[0]-=o,t[2]-=o}return t}function py(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]]];tA(t,e);const s=yt(i);if(yt(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 wee(t,e){return t[0]+=+e[0],t[1]+=+e[1],t}function Nh(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 my(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 xee(t,e){return t[0]*=e,t[1]*=e,t}function nA(t,e){if(e.canWrapX()){const n=yt(e.getExtent()),i=Eee(t,e,n);i&&(t[0]-=i*n)}return t}function Eee(t,e,n){const i=e.getExtent();let s=0;return e.canWrapX()&&(t[0]i[2])&&(n=n||yt(i),s=Math.floor((t[0]-i[0])/n)),s}const Cee=63710088e-1;function tw(t,e,n){n=n||Cee;const i=uh(t[1]),s=uh(e[1]),r=(s-i)/2,o=uh(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 iA(...t){console.warn(...t)}let Sm=!0;function sA(t){Sm=!1}function _y(t,e){if(e!==void 0){for(let n=0,i=t.length;n=-180&&t[0]<=180&&t[1]>=-90&&t[1]<=90&&(Sm=!1,iA("Call useGeographic() from ol/proj once to work with [longitude, latitude] coordinates.")),t}function aA(t,e){return t}function Zr(t,e){return t}function kee(){iw(Z1),iw(Q1),Aee(Q1,Z1,lee,cee)}kee();function sw(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=nn(i[0],h,f),v=nn(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 Mee(t){return t}function by(t,e,n,i){const s=yt(e)/n[0],r=jn(e)/n[1];return i?Math.min(t,Math.max(s,r)):Math.min(t,Math.min(s,r))}function wy(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),nn(i,n/2,e*2)}function Pee(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?by(l,n,o,i):l;if(a)return e?wy(s,u,c):nn(s,c,u);const d=Math.min(u,s),h=Math.floor(ly(t,d,r));return t[h]>u&&hMath.round(n*aw[i])/aw[i]).join(", ")+")"}function io(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 gt()}closestPointXY(e,n,i,s){return gt()}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 gt()}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 vee(this.extent_,e)}rotate(e,n){gt()}scale(e,n,i){gt()}simplify(e){return this.getSimplifiedGeometry(e*e)}getSimplifiedGeometry(e){return gt()}getType(){return gt()}applyTransform(e){gt()}intersectsExtent(e){return gt()}translate(e,n){gt()}transform(e,n){const i=Gi(e),s=i.getUnits()=="tile-pixels"?function(r,o,a){const l=i.getExtent(),c=i.getWorldExtent(),u=jn(c)/jn(l);return br(lw,c[0],c[3],u,-u,0,0,0),io(r,0,r.length,a,lw,o),Fh(i,n)(r,o,a)}:Fh(i,n);return this.applyTransform(s),this}}class Hf extends zee{constructor(){super(),this.layout="XY",this.stride=2,this.flatCoordinates}computeExtent(e){return gy(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,e)}getCoordinates(){return gt()}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 Hee(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 dA(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 fA(t,e,n,i,s,r){if(n.length===0||!Xo(t,e,n[0],i,s,r))return!1;for(let o=1,a=n.length;ov&&(c=(u+d)/2,fA(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 Jee(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:gA(t,e,n,i,function(o,a){return bee(s,o,a)}):!1}function pA(t,e,n,i,s){return!!(Ay(t,e,n,i,s)||Xo(t,e,n,i,s[0],s[1])||Xo(t,e,n,i,s[0],s[3])||Xo(t,e,n,i,s[2],s[1])||Xo(t,e,n,i,s[2],s[3]))}function Qee(t,e,n,i,s){if(!pA(t,e,n[0],i,s))return!1;if(n.length===1)return!0;for(let r=1,o=n.length;r0}function tte(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_[Wn.INTERACTING]>0}cancelAnimations(){this.setHint(Wn.ANIMATING,-this.hints_[Wn.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?dl(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(Wn.ANIMATING,-1),this.nextCenter_=null,this.nextResolution_=NaN,this.nextRotation_=NaN;const o=s[0].callback;o&&Kd(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]],my(i,e-this.getRotation()),wee(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&&Tm(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 aA(n,this.getProjection())}calculateExtentInternal(e){e=e||this.getViewportSizeMinusPadding_();const n=this.getCenterInternal();pt(n,"The view center is not defined");const i=this.getResolution();pt(i!==void 0,"The view resolution is not defined");const s=this.getRotation();return pt(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(Zr(e,this.getProjection()),n)}getResolutionForExtentInternal(e,n){n=n||this.getViewportSizeMinusPadding_();const i=yt(e)/n[0],s=jn(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=hp(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=ly(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=nn(Math.floor(e),0,this.resolutions_.length-2),i=this.resolutions_[n]/this.resolutions_[n+1];return this.resolutions_[n]/Math.pow(i,nn(e-n,0,1))}return this.maxResolution_/Math.pow(this.zoomFactor_,e-this.minZoom_)}fit(e,n){let i;if(pt(Array.isArray(e)||typeof e.getSimplifiedGeometry=="function","Invalid extent or geometry provided as `geometry`"),Array.isArray(e)){pt(!Yf(e),"Cannot fit empty extent provided as `geometry`");const s=Zr(e,this.getProjection());i=fw(s)}else if(e.getType()==="Circle"){const s=Zr(e.getExtent(),this.getProjection());i=fw(s),i.rotate(this.getRotation(),fa(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 Ts?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 My(s,n.viewState)&&(!r||_i(r,n.extent))}getAttributions(e){if(!this.isVisible(e))return[];const n=this.getSource()?.getAttributions();if(!n)return[];const i=e instanceof Ts?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(Et.MAP,e)}getMapInternal(){return this.get(Et.MAP)}setMap(e){this.mapPrecomposeKey_&&(Rt(this.mapPrecomposeKey_),this.mapPrecomposeKey_=null),e||this.changed(),this.mapRenderKey_&&(Rt(this.mapRenderKey_),this.mapRenderKey_=null),e&&(this.mapPrecomposeKey_=ht(e,zi.PRECOMPOSE,this.handlePrecompose_,this),this.mapRenderKey_=ht(this,et.CHANGE,e.render,e),this.changed())}handlePrecompose_(e){const n=e.frameState.layerStatesArray,i=this.getLayerState(!1);pt(!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(Et.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 My(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 mA(t,e,n=0,i=t.length-1,s=ate){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));mA(t,e,f,p,s)}const r=t[e];let o=n,a=i;for(_c(t,n,e),s(t[i],r)>0&&_c(t,n,i);o0;)a--}s(t[n],r)===0?_c(t,n,a):(a++,_c(t,a,i)),a<=e&&(n=a+1),e<=a&&(i=a-1)}}function _c(t,e,n){const i=t[e];t[e]=t[n],t[n]=i}function ate(t,e){return te?1:0}let _A=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(!Gd(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=qa(i.children.splice(o,i.children.length-o));a.height=i.height,a.leaf=i.leaf,Ba(i,this.toBBox),Ba(a,this.toBBox),n?e[n-1].children.push(a):this._splitRoot(i,a)}_splitRoot(e,n){this.data=qa([e,n]),this.data.height=e.height+1,this.data.leaf=!1,Ba(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=Ac(e,0,a,this.toBBox),c=Ac(e,a,i,this.toBBox),u=hte(l,c),d=fp(l)+fp(c);u=n;c--){const u=e.children[c];kc(a,e.leaf?r(u):u),l+=Ud(a)}return l}_adjustParentBBoxes(e,n,i){for(let s=i;s>=0;s--)kc(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():Ba(e[n],this.toBBox)}};function lte(t,e,n){if(!n)return e.indexOf(t);for(let i=0;i=t.minX&&e.maxY>=t.minY}function qa(t){return{children:t,height:1,leaf:!0,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0}}function gw(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;mA(t,o,e,n,s),r.push(e,o,o,n)}}const ot={IDLE:0,LOADING:1,LOADED:2,ERROR:3,EMPTY:4};function pw(t){return t[0]>0&&t[1]>0}function fte(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 wi(t,e){return Array.isArray(t)?t:(e===void 0?e=[t,t]:(e[0]=t,e[1]=t),e)}class Uf{constructor(e){this.opacity_=e.opacity,this.rotateWithView_=e.rotateWithView,this.rotation_=e.rotation,this.scale_=e.scale,this.scaleArray_=wi(e.scale),this.displacement_=e.displacement,this.declutterMode_=e.declutterMode}clone(){const e=this.getScale();return new Uf({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 gt()}getImage(e){return gt()}getHitDetectionImage(){return gt()}getPixelRatio(e){return 1}getImageState(){return gt()}getImageSize(){return gt()}getOrigin(){return gt()}getSize(){return gt()}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_=wi(e)}listenImageChange(e){gt()}load(){gt()}unlistenImageChange(e){gt()}ready(){return Promise.resolve()}}const Su={name:"rgb",min:[0,0,0],max:[255,255,255],channel:["red","green","blue"],alias:["RGB"]};var Nn={name:"xyz",min:[0,0,0],channel:["X","Y","Z"],alias:["XYZ","ciexyz","cie1931"]};Nn.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]}};Nn.max=Nn.whitepoint[2].D65;Nn.rgb=function(t,e){e=e||Nn.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]};Su.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||Nn.whitepoint[2].E,[r*e[0],o*e[1],a*e[2]]};const Py={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=Nn.whitepoint[n][e][0],h=Nn.whitepoint[n][e][1],f=Nn.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]}};Nn.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=Nn.whitepoint[n][e][0],h=Nn.whitepoint[n][e][1],f=Nn.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 yA={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 Py.xyz(yA.luv(t))}};Py.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]};Nn.lchuv=function(t){return Py.lchuv(Nn.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 _w={red:0,orange:60,yellow:120,green:180,blue:240,purple:300};function gte(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(_w[u]!==void 0)return _w[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 pp={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}};Su.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 pte(t){Array.isArray(t)&&t.raw&&(t=String.raw(...arguments)),t instanceof Number&&(t=+t);var e,n=gte(t);if(!n.space)return[];const i=n.space[0]==="h"?pp.min:Su.min,s=n.space[0]==="h"?pp.max:Su.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=pp.rgb(e)),e.push(Math.min(Math.max(n.alpha,0),1)),e}const Iy=[NaN,NaN,NaN,0];function mte(t){return typeof t=="string"?t:Ry(t)}const _te=1024,yc={};let mp=0;function yte(t){if(t.length===4)return t;const e=t.slice();return e[3]=1,e}function yw(t){const e=Nn.lchuv(Su.xyz(t));return e[3]=t[3],e}function vte(t){const e=Nn.rgb(yA.xyz(t));return e[3]=t[3],e}function Dy(t){if(t==="none")return Iy;if(yc.hasOwnProperty(t))return yc[t];if(mp>=_te){let n=0;for(const i in yc)n++&3||(delete yc[i],--mp)}const e=pte(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 vA(e),yc[t]=e,++mp,e}function Tu(t){return Array.isArray(t)?t:Dy(t)}function vA(t){return t[0]=nn(t[0]+.5|0,0,255),t[1]=nn(t[1]+.5|0,0,255),t[2]=nn(t[2]+.5|0,0,255),t[3]=nn(t[3],0,1),t}function Ry(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 ho=typeof navigator<"u"&&typeof navigator.userAgent<"u"?navigator.userAgent.toLowerCase():"",bte=ho.includes("firefox"),wte=ho.includes("safari")&&!ho.includes("chrom");wte&&(ho.includes("version/15.4")||/cpu (os|iphone os) 15_4 like mac os x/.test(ho));const xte=ho.includes("webkit")&&!ho.includes("edge"),bA=ho.includes("macintosh"),wA=typeof devicePixelRatio<"u"?devicePixelRatio:1,xA=typeof WorkerGlobalScope<"u"&&typeof OffscreenCanvas<"u"&&self instanceof WorkerGlobalScope,EA=typeof Image<"u"&&Image.prototype.decode,CA=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 dn(t,e,n,i){let s;return n&&n.length?s=n.shift():xA?s=new OffscreenCanvas(t||300,e||300):s=document.createElement("canvas"),t&&(s.width=t),e&&(s.height=e),s.getContext("2d",i)}let _p;function Vh(){return _p||(_p=dn(1,1)),_p}function zl(t){const e=t.canvas;e.width=1,e.height=1,t.clearRect(0,0,1,1)}function vw(t,e){const n=e.parentNode;n&&n.replaceChild(t,e)}function Ete(t){for(;t.lastChild;)t.lastChild.remove()}function Cte(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 Ste(t,e,n){const i=t;let s=!0,r=!1,o=!1;const a=[Oh(i,et.LOAD,function(){o=!0,r||e()})];return i.src&&EA?(r=!0,i.decode().then(function(){s&&e()}).catch(function(l){s&&(o?e():n())})):a.push(Oh(i,et.ERROR,n)),function(){s=!1,a.forEach(Rt)}}function Tte(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)})}function Ate(t,e){return e&&(t.src=e),t.src&&EA?new Promise((n,i)=>t.decode().then(()=>n(t)).catch(s=>t.complete&&t.width?n(t):i(s))):Tte(t)}class kte{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=yp(e,n,i);return s in this.cache_?this.cache_[s]:null}getPattern(e,n,i){const s=yp(e,n,i);return s in this.patternCache_?this.patternCache_[s]:null}set(e,n,i,s,r){const o=yp(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]=Vh().createPattern(s.getImage(1),"repeat")}):this.patternCache_[o]=Vh().createPattern(s.getImage(1),"repeat")),a||++this.cacheSize_}setSize(e){this.maxCacheSize_=e,this.expire()}}function yp(t,e,n){const i=n?Tu(n):"null";return e+":"+t+":"+i}const Is=new kte;let vc=null;class Mte 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){vc||(vc=dn(1,1,void 0,{willReadFrequently:!0})),vc.drawImage(this.image_,0,0);try{vc.getImageData(0,0,1,1),this.tainted_=!1}catch{vc=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=dn(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&&Ate(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=dn(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=mte(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 Ly(t,e,n,i,s,r){let o=e===void 0?void 0:Is.get(e,n,s);return o||(o=new Mte(t,t&&"src"in t?t.src||void 0:e,n,i,s),Is.set(e,n,s,o,r)),r&&o&&!Is.getPattern(e,n,s)&&Is.set(e,n,s,o,r),o}function Ds(t){return t?Array.isArray(t)?Ry(t):typeof t=="object"&&"src"in t?Pte(t):t:null}function Pte(t){if(!t.offset||!t.size)return Is.getPattern(t.src,"anonymous",t.color);const e=t.src+":"+t.offset,n=Is.getPattern(e,void 0,t.color);if(n)return n;const i=Is.get(t.src,"anonymous",null);if(i.getImageState()!==ot.LOADED)return null;const s=dn(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]),Ly(s.canvas,e,void 0,ot.LOADED,t.color,!0),Is.getPattern(e,void 0,t.color)}const Xd="ol-hidden",Gf="ol-unselectable",Oy="ol-control",bw="ol-collapsed",Ite=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"),ww=["style","variant","weight","size","lineHeight","family"],SA=function(t){const e=t.match(Ite);if(!e)return null;const n={lineHeight:"normal",size:"1.2em",style:"normal",weight:"normal",variant:"normal"};for(let i=0,s=ww.length;i=7&&Y7(l,e),H7(l,o),isNaN(i)&&(i=vm.getBestMask(l,ap.bind(null,l,n))),vm.applyMask(i,l),ap(l,n,i),{modules:l,version:e,errorCorrectionLevel:n,maskPattern:i,segments:s}}kT.create=function(e,n){if(typeof e>"u"||e==="")throw new Error("No input text");let i=rp.M,s,r;return typeof n<"u"&&(i=rp.from(n.errorCorrectionLevel,rp.M),s=Lh.from(n.version),r=vm.from(n.maskPattern),n.toSJISFunc&&Lf.setToSJISFunction(n.toSJISFunc)),U7(e,s,i,r)};var zT={},oy={};(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&&g>=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)}})(zT);var WT={};const G7=oy;function G1(t,e){const n=t.a/255,i=e+'="'+t.hex+'"';return n<1?i+" "+e+'-opacity="'+n.toFixed(2).slice(1)+'"':i}function lp(t,e,n){let i=t+e;return typeof n<"u"&&(i+=" "+n),i}function X7(t,e,n){let i="",s=0,r=!1,o=0;for(let a=0;a0&&l>0&&t[a-1]||(i+=r?lp("M",l+n,.5+c+n):lp("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 q7=d7,wm=kT,YT=zT,Z7=WT;function ay(t,e,n,i,s){const r=[].slice.call(arguments,1),o=r.length,a=typeof r[o-1]=="function";if(!a&&!q7())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=wm.create(n,i);l(t(u,e,i))}catch(u){c(u)}})}try{const l=wm.create(n,i);s(null,t(l,e,i))}catch(l){s(l)}}ba.create=wm.create;ba.toCanvas=ay.bind(null,YT.render);ba.toDataURL=ay.bind(null,YT.renderToDataURL);ba.toString=ay.bind(null,function(t,e,n){return Z7.render(t,n)});const J7={name:"peerQRCode",components:{LocaleText:He},props:{peerConfigData:String},mounted(){ba.toCanvas(document.querySelector("#qrcode"),this.peerConfigData,t=>{t&&console.error(t)})}},Q7={class:"peerSettingContainer w-100 h-100 position-absolute top-0 start-0"},eX={class:"container d-flex h-100 w-100"},tX={class:"m-auto modal-dialog-centered dashboardModal justify-content-center"},nX={class:"card rounded-3 shadow"},iX={class:"card-header bg-transparent d-flex align-items-center gap-2 border-0 p-4 pb-0"},sX={class:"mb-0"},rX={class:"card-body"},oX={id:"qrcode",class:"rounded-3 shadow",ref:"qrcode"};function aX(t,e,n,i,s,r){const o=Ee("LocaleText");return R(),V("div",Q7,[f("div",eX,[f("div",tX,[f("div",nX,[f("div",iX,[f("h4",sX,[N(o,{t:"QR Code"})]),f("button",{type:"button",class:"btn-close ms-auto",onClick:e[0]||(e[0]=a=>this.$emit("close"))})]),f("div",rX,[f("canvas",oX,null,512)])])])])])}const lX=je(J7,[["render",aX]]),cX={name:"nameInput",components:{LocaleText:He},props:{bulk:Boolean,data:Object,saving:Boolean}},uX={for:"peer_name_textbox",class:"form-label"},dX={class:"text-muted"},hX=["disabled"];function fX(t,e,n,i,s,r){const o=Ee("LocaleText");return R(),V("div",{class:Pe({inactiveField:this.bulk})},[f("label",uX,[f("small",dX,[N(o,{t:"Name"})])]),$e(f("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,hX),[[We,this.data.name]])],2)}const gX=je(cX,[["render",fX]]),pX={name:"privatePublicKeyInput",components:{LocaleText:He},props:{data:Object,saving:Boolean,bulk:Boolean},setup(){const t=tt(),e=qn();return{dashboardStore:t,wgStore:e}},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.wgStore.checkWGKeyLength(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()}}}},mX={for:"peer_private_key_textbox",class:"form-label"},_X={class:"text-muted"},yX={class:"input-group"},vX=["disabled"],bX=["disabled"],wX={class:"d-flex"},xX={for:"public_key",class:"form-label"},EX={class:"text-muted"},CX={class:"form-check form-switch ms-auto"},SX=["disabled"],TX={class:"form-check-label",for:"enablePublicKeyEdit"},AX=["disabled"];function kX(t,e,n,i,s,r){const o=Ee("LocaleText");return R(),V("div",{class:Pe(["d-flex gap-2 flex-column",{inactiveField:this.bulk}])},[f("div",null,[f("label",mX,[f("small",_X,[N(o,{t:"Private Key"}),f("code",null,[N(o,{t:"(Required for QR Code and Download)"})])])]),f("div",yX,[$e(f("input",{type:"text",class:Pe(["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,vX),[[We,this.keypair.privateKey]]),f("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"},e[6]||(e[6]=[f("i",{class:"bi bi-arrow-repeat"},null,-1)]),8,bX)])]),f("div",null,[f("div",wX,[f("label",xX,[f("small",EX,[N(o,{t:"Public Key"}),f("code",null,[N(o,{t:"(Required)"})])])]),f("div",CX,[$e(f("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,SX),[[Kn,this.editKey]]),f("label",TX,[f("small",null,[N(o,{t:"Use your own Private and Public Key"})])])])]),$e(f("input",{class:Pe(["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,AX),[[We,this.keypair.publicKey]])])],2)}const MX=je(pX,[["render",kX]]),PX={name:"allowedIPsInput",components:{LocaleText:He},props:{data:Object,saving:Boolean,bulk:Boolean,availableIp:void 0},data(){return{allowedIp:[],availableIpSearchString:"",customAvailableIp:"",allowedIpFormatError:!1}},setup(){const t=qn(),e=tt();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 At("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(){}},IX={for:"peer_allowed_ip_textbox",class:"form-label"},DX={class:"text-muted"},RX=["onClick"],LX={class:"d-flex gap-2 align-items-center"},OX={class:"input-group"},$X=["placeholder","disabled"],NX=["disabled"],FX={class:"text-muted"},BX={class:"dropdown flex-grow-1"},VX=["disabled"],zX={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"}},WX={class:"px-3 pb-2 pt-1 d-flex gap-3 align-items-center"},YX=["onClick"],HX={class:"me-auto"},jX={key:0},KX={class:"px-3 text-muted"};function UX(t,e,n,i,s,r){const o=Ee("LocaleText");return R(),V("div",{class:Pe({inactiveField:this.bulk})},[f("label",IX,[f("small",DX,[N(o,{t:"Allowed IPs"}),f("code",null,[N(o,{t:"(Required)"})])])]),f("div",{class:Pe(["d-flex gap-2 flex-wrap",{"mb-2":this.data.allowed_ips.length>0}])},[N(Ul,{name:"list"},{default:De(()=>[(R(!0),V(Le,null,Ze(this.data.allowed_ips,(a,l)=>(R(),V("span",{class:"badge rounded-pill text-bg-success",key:a},[Ue(we(a)+" ",1),f("a",{role:"button",onClick:c=>this.data.allowed_ips.splice(l,1)},e[3]||(e[3]=[f("i",{class:"bi bi-x-circle-fill ms-1"},null,-1)]),8,RX)]))),128))]),_:1})],2),f("div",LX,[f("div",OX,[$e(f("input",{type:"text",class:Pe(["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,$X),[[We,s.customAvailableIp]]),f("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"},e[4]||(e[4]=[f("i",{class:"bi bi-plus-lg"},null,-1)]),8,NX)]),f("small",FX,[N(o,{t:"or"})]),f("div",BX,[f("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"},[e[5]||(e[5]=f("i",{class:"bi bi-filter-circle me-2"},null,-1)),N(o,{t:"Pick Available IP"})],8,VX),this.availableIp?(R(),V("ul",zX,[f("li",null,[f("div",WX,[e[6]||(e[6]=f("label",{for:"availableIpSearchString",class:"text-muted"},[f("i",{class:"bi bi-search"})],-1)),$e(f("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]])])]),(R(!0),V(Le,null,Ze(this.searchAvailableIps,a=>(R(),V("li",null,[f("a",{class:"dropdown-item d-flex",role:"button",onClick:l=>this.addAllowedIp(a)},[f("span",HX,[f("small",null,we(a),1)])],8,YX)]))),256)),this.searchAvailableIps.length===0?(R(),V("li",jX,[f("small",KX,[N(o,{t:"No available IP containing"}),Ue(' "'+we(this.availableIpSearchString)+'"',1)])])):ce("",!0)])):ce("",!0)])])],2)}const GX=je(PX,[["render",UX],["__scopeId","data-v-6d5fc831"]]),XX={name:"dnsInput",components:{LocaleText:He},props:{data:Object,saving:Boolean},data(){return{error:!1,dns:JSON.parse(JSON.stringify(this.data.DNS))}},setup(){const t=qn(),e=tt();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()}}},qX={for:"peer_DNS_textbox",class:"form-label"},ZX={class:"text-muted"},JX=["disabled"];function QX(t,e,n,i,s,r){const o=Ee("LocaleText");return R(),V("div",null,[f("label",qX,[f("small",ZX,[N(o,{t:"DNS"})])]),$e(f("input",{type:"text",class:Pe(["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,JX),[[We,this.dns]])])}const e9=je(XX,[["render",QX]]),t9={name:"endpointAllowedIps",components:{LocaleText:He},props:{data:Object,saving:Boolean},setup(){const t=qn(),e=tt();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()}}},n9={for:"peer_endpoint_allowed_ips",class:"form-label"},i9={class:"text-muted"},s9=["disabled"];function r9(t,e,n,i,s,r){const o=Ee("LocaleText");return R(),V("div",null,[f("label",n9,[f("small",i9,[N(o,{t:"Endpoint Allowed IPs"}),f("code",null,[N(o,{t:"(Required)"})])])]),$e(f("input",{type:"text",class:Pe(["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,s9),[[We,this.endpointAllowedIps]])])}const o9=je(t9,[["render",r9]]),a9={name:"presharedKeyInput",components:{LocaleText:He},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=""}}},l9={class:"d-flex align-items-start"},c9={for:"peer_preshared_key_textbox",class:"form-label"},u9={class:"text-muted"},d9={class:"form-check form-switch ms-auto"},h9=["disabled"];function f9(t,e,n,i,s,r){const o=Ee("LocaleText");return R(),V("div",null,[f("div",l9,[f("label",c9,[f("small",u9,[N(o,{t:"Pre-Shared Key"})])]),f("div",d9,[$e(f("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),[[Kn,this.enable]])])]),$e(f("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,h9),[[We,this.data.preshared_key]])])}const g9=je(a9,[["render",f9]]),p9={name:"mtuInput",components:{LocaleText:He},props:{data:Object,saving:Boolean}},m9={for:"peer_mtu",class:"form-label"},_9={class:"text-muted"},y9=["disabled"];function v9(t,e,n,i,s,r){const o=Ee("LocaleText");return R(),V("div",null,[f("label",m9,[f("small",_9,[N(o,{t:"MTU"})])]),$e(f("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,y9),[[We,this.data.mtu]])])}const b9=je(p9,[["render",v9]]),w9={name:"persistentKeepAliveInput",components:{LocaleText:He},props:{data:Object,saving:Boolean}},x9={for:"peer_keep_alive",class:"form-label"},E9={class:"text-muted"},C9=["disabled"];function S9(t,e,n,i,s,r){const o=Ee("LocaleText");return R(),V("div",null,[f("label",x9,[f("small",E9,[N(o,{t:"Persistent Keepalive"})])]),$e(f("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,C9),[[We,this.data.keepalive]])])}const T9=je(w9,[["render",S9]]),A9={name:"bulkAdd",components:{LocaleText:He},props:{saving:Boolean,data:Object,availableIp:void 0},computed:{bulkAddGetLocale(){return At("How many peers you want to add?")}}},k9={class:"form-check form-switch"},M9=["disabled"],P9={class:"form-check-label me-2",for:"bulk_add"},I9={class:"text-muted d-block"},D9={key:0,class:"form-group"},R9=["max","placeholder"],L9={class:"text-muted"};function O9(t,e,n,i,s,r){const o=Ee("LocaleText");return R(),V("div",null,[f("div",k9,[$e(f("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,M9),[[Kn,this.data.bulkAdd]]),f("label",P9,[f("small",null,[f("strong",null,[N(o,{t:"Bulk Add"})])])])]),f("p",{class:Pe({"mb-0":!this.data.bulkAdd})},[f("small",I9,[N(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?(R(),V("div",D9,[$e(f("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,R9),[[We,this.data.bulkAddAmount]]),f("small",L9,[N(o,{t:"You can add up to "+this.availableIp.length+" peers"},null,8,["t"])])])):ce("",!0)])}const $9=je(A9,[["render",O9]]),N9={name:"peerCreate",components:{LocaleText:He,BulkAdd:$9,PersistentKeepAliveInput:T9,MtuInput:b9,PresharedKeyInput:g9,EndpointAllowedIps:o9,DnsInput:e9,AllowedIPsInput:GX,PrivatePublicKeyInput:MX,NameInput:gX},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(){Yt("/api/getAvailableIPs/"+this.$route.params.id,{},t=>{t.status&&(this.availableIp=t.data)})},setup(){const t=qn(),e=tt();return{store:t,dashboardStore:e}},methods:{peerCreate(){this.saving=!0,xt("/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)}}},F9={class:"container"},B9={class:"mb-4"},V9={class:"text-body mb-0"},z9={class:"d-flex flex-column gap-2"},W9={class:"row gy-3"},Y9={key:0,class:"col-sm"},H9={class:"col-sm"},j9={class:"col-sm"},K9={key:1,class:"col-12"},U9={class:"form-check form-switch"},G9={class:"form-check-label",for:"bullAdd_PresharedKey_Switch"},X9={class:"fw-bold"},q9={class:"d-flex mt-2"},Z9=["disabled"],J9={key:0,class:"bi bi-plus-circle-fill me-2"};function Q9(t,e,n,i,s,r){const o=Ee("LocaleText"),a=Ee("RouterLink"),l=Ee("BulkAdd"),c=Ee("NameInput"),u=Ee("PrivatePublicKeyInput"),d=Ee("AllowedIPsInput"),h=Ee("EndpointAllowedIps"),g=Ee("DnsInput"),p=Ee("PresharedKeyInput"),m=Ee("MtuInput"),y=Ee("PersistentKeepAliveInput");return R(),V("div",F9,[f("div",B9,[N(a,{to:"peers",is:"div",class:"d-flex align-items-center gap-4 text-decoration-none"},{default:De(()=>[e[2]||(e[2]=f("h3",{class:"mb-0 text-body"},[f("i",{class:"bi bi-chevron-left"})],-1)),f("h3",V9,[N(o,{t:"Add Peers"})])]),_:1})]),f("div",z9,[N(l,{saving:s.saving,data:this.data,availableIp:this.availableIp},null,8,["saving","data","availableIp"]),e[3]||(e[3]=f("hr",{class:"mb-0 mt-2"},null,-1)),this.data.bulkAdd?ce("",!0):(R(),Se(c,{key:0,saving:s.saving,data:this.data},null,8,["saving","data"])),this.data.bulkAdd?ce("",!0):(R(),Se(u,{key:1,saving:s.saving,data:s.data},null,8,["saving","data"])),this.data.bulkAdd?ce("",!0):(R(),Se(d,{key:2,availableIp:this.availableIp,saving:s.saving,data:s.data},null,8,["availableIp","saving","data"])),N(h,{saving:s.saving,data:s.data},null,8,["saving","data"]),N(g,{saving:s.saving,data:s.data},null,8,["saving","data"]),e[4]||(e[4]=f("hr",{class:"mb-0 mt-2"},null,-1)),f("div",W9,[this.data.bulkAdd?ce("",!0):(R(),V("div",Y9,[N(p,{saving:s.saving,data:s.data,bulk:this.data.bulkAdd},null,8,["saving","data","bulk"])])),f("div",H9,[N(m,{saving:s.saving,data:s.data},null,8,["saving","data"])]),f("div",j9,[N(y,{saving:s.saving,data:s.data},null,8,["saving","data"])]),this.data.bulkAdd?(R(),V("div",K9,[f("div",U9,[$e(f("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),[[Kn,this.data.preshared_key_bulkAdd]]),f("label",G9,[f("small",X9,[N(o,{t:"Pre-Shared Key"}),this.data.preshared_key_bulkAdd?(R(),Se(o,{key:0,t:"Enabled"})):(R(),Se(o,{key:1,t:"Disabled"}))])])])])):ce("",!0)]),f("div",q9,[f("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):(R(),V("i",J9)),this.saving?(R(),Se(o,{key:1,t:"Adding..."})):(R(),Se(o,{key:2,t:"Add"}))],8,Z9)])])])}const HT=je(N9,[["render",Q9],["__scopeId","data-v-3f34f584"]]),eq={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)}}},tq={class:"dropdown scheduleDropdown"},nq={class:"dropdown-menu rounded-3 shadow",style:{"font-size":"0.875rem",width:"200px"}},iq=["onClick"],sq={key:0,class:"bi bi-check ms-auto"};function rq(t,e,n,i,s,r){return R(),V("div",tq,[f("button",{class:Pe(["btn btn-sm btn-outline-primary rounded-3",{"disabled border-transparent":!n.edit}]),type:"button","data-bs-toggle":"dropdown","aria-expanded":"false"},[f("samp",null,we(this.currentSelection.display),1)],2),f("ul",nq,[n.edit?(R(!0),V(Le,{key:0},Ze(this.options,o=>(R(),V("li",null,[f("a",{class:"dropdown-item d-flex align-items-center",role:"button",onClick:a=>t.$emit("update",o.value)},[f("samp",null,we(o.display),1),o.value===this.currentSelection.value?(R(),V("i",sq)):ce("",!0)],8,iq)]))),256)):ce("",!0)])])}const jT=je(eq,[["render",rq],["__scopeId","data-v-6a5aba2a"]]),oq={name:"schedulePeerJob",components:{LocaleText:He,VueDatePicker:Yu,ScheduleDropdown:jT},props:{dropdowns:Array[Object],pjob:Object,viewOnly:!1},setup(t){const e=xe({}),n=xe(!1),i=xe(!1);e.value=JSON.parse(JSON.stringify(t.pjob)),e.value.CreationDate||(n.value=!0,i.value=!0);const s=tt();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?xt("/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&&xt("/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=bi(t).format("YYYY-MM-DD HH:mm:ss"))}}},aq={class:"card-header bg-transparent text-muted border-0"},lq={key:0,class:"d-flex"},cq={class:"me-auto"},uq={key:1},dq={class:"badge text-bg-warning"},hq={class:"card-body pt-1",style:{"font-family":"var(--bs-font-monospace)"}},fq={class:"d-flex gap-2 align-items-center mb-2"},gq=["disabled"],pq={class:"px-5 d-flex gap-2 align-items-center"},mq={class:"d-flex gap-3"},_q={key:0,class:"ms-auto d-flex gap-3"},yq={key:1,class:"ms-auto d-flex gap-3"};function vq(t,e,n,i,s,r){const o=Ee("LocaleText"),a=Ee("ScheduleDropdown"),l=Ee("VueDatePicker");return R(),V("div",{class:Pe(["card shadow-sm rounded-3 mb-2",{"border-warning-subtle":this.newJob}])},[f("div",aq,[this.newJob?(R(),V("small",uq,[f("span",dq,[N(o,{t:"Unsaved Job"})])])):(R(),V("small",lq,[f("strong",cq,[N(o,{t:"Job ID"})]),f("samp",null,we(this.job.JobID),1)]))]),f("div",hq,[f("div",fq,[f("samp",null,[N(o,{t:"if"})]),N(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"]),f("samp",null,[N(o,{t:"is"})]),N(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"?(R(),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:!i.edit,dark:this.store.Configuration.Server.dashboard_theme==="dark"},null,8,["min-date","model-value","onUpdate:modelValue","disabled","dark"])):$e((R(),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,gq)),[[We,this.job.Value]]),f("samp",null,we(this.dropdowns.Field.find(c=>c.value===this.job.Field)?.unit)+" { ",1)]),f("div",pq,[f("samp",null,[N(o,{t:"then"})]),N(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"])]),f("div",mq,[e[12]||(e[12]=f("samp",null,"}",-1)),this.edit?(R(),V("div",yq,[f("a",{role:"button",class:"text-secondary text-decoration-none",onClick:e[6]||(e[6]=c=>this.reset())},[e[10]||(e[10]=Ue("[C] ")),N(o,{t:"Cancel"})]),f("a",{role:"button",class:"text-primary ms-auto text-decoration-none",onClick:e[7]||(e[7]=c=>this.save())},[e[11]||(e[11]=Ue("[S] ")),N(o,{t:"Save"})])])):(R(),V("div",_q,[f("a",{role:"button",class:"ms-auto text-decoration-none",onClick:e[4]||(e[4]=c=>this.edit=!0)},[e[8]||(e[8]=Ue("[E] ")),N(o,{t:"Edit"})]),f("a",{role:"button",onClick:e[5]||(e[5]=c=>this.delete()),class:"text-danger text-decoration-none"},[e[9]||(e[9]=Ue("[D] ")),N(o,{t:"Delete"})])]))])])],2)}const KT=je(oq,[["render",vq],["__scopeId","data-v-8f3f1b93"]]),bq={name:"peerJobs",setup(){return{store:qn()}},props:{selectedPeer:Object},components:{LocaleText:He,SchedulePeerJob:KT,ScheduleDropdown:jT},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:Bs().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})))}}},wq={class:"peerSettingContainer w-100 h-100 position-absolute top-0 start-0 overflow-y-scroll"},xq={class:"container d-flex h-100 w-100"},Eq={class:"m-auto modal-dialog-centered dashboardModal"},Cq={class:"card rounded-3 shadow",style:{width:"700px"}},Sq={class:"card-header bg-transparent d-flex align-items-center gap-2 border-0 p-4 pb-2"},Tq={class:"mb-0 fw-normal"},Aq={class:"card-body px-4 pb-4 pt-2 position-relative"},kq={class:"d-flex align-items-center mb-3"},Mq={class:"card shadow-sm",key:"none",style:{height:"153px"}},Pq={class:"card-body text-muted text-center d-flex"},Iq={class:"m-auto"};function Dq(t,e,n,i,s,r){const o=Ee("LocaleText"),a=Ee("SchedulePeerJob");return R(),V("div",wq,[f("div",xq,[f("div",Eq,[f("div",Cq,[f("div",Sq,[f("h4",Tq,[N(o,{t:"Schedule Jobs"})]),f("button",{type:"button",class:"btn-close ms-auto",onClick:e[0]||(e[0]=l=>this.$emit("close"))})]),f("div",Aq,[f("div",kq,[f("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())},[e[3]||(e[3]=f("i",{class:"bi bi-plus-lg me-2"},null,-1)),N(o,{t:"Job"})])]),N(Ul,{name:"schedulePeerJobTransition",tag:"div",class:"position-relative"},{default:De(()=>[(R(!0),V(Le,null,Ze(this.selectedPeer.jobs,(l,c)=>(R(),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?(R(),V("div",Mq,[f("div",Pq,[f("h6",Iq,[N(o,{t:"This peer does not have any job yet."})])])])):ce("",!0)]),_:1})])])])])])}const Rq=je(bq,[["render",Dq],["__scopeId","data-v-5bbdd42b"]]),Lq={name:"peerJobsAllModal",setup(){return{store:qn()}},components:{LocaleText:He,SchedulePeerJob:KT},props:{configurationPeers:Array[Object]},methods:{getuuid(){return Bs()}},computed:{getAllJobs(){return this.configurationPeers.filter(t=>t.jobs.length>0)}}},Oq={class:"peerSettingContainer w-100 h-100 position-absolute top-0 start-0 overflow-y-scroll"},$q={class:"container d-flex h-100 w-100"},Nq={class:"m-auto modal-dialog-centered dashboardModal"},Fq={class:"card rounded-3 shadow",style:{width:"700px"}},Bq={class:"card-header bg-transparent d-flex align-items-center gap-2 border-0 p-4 pb-2"},Vq={class:"mb-0 fw-normal"},zq={class:"card-body px-4 pb-4 pt-2"},Wq={key:0,class:"accordion",id:"peerJobsLogsModalAccordion"},Yq={class:"accordion-header"},Hq=["data-bs-target"],jq={key:0},Kq={class:"text-muted"},Uq=["id"],Gq={class:"accordion-body"},Xq={key:1,class:"card shadow-sm",style:{height:"153px"}},qq={class:"card-body text-muted text-center d-flex"},Zq={class:"m-auto"};function Jq(t,e,n,i,s,r){const o=Ee("LocaleText"),a=Ee("SchedulePeerJob");return R(),V("div",Oq,[f("div",$q,[f("div",Nq,[f("div",Fq,[f("div",Bq,[f("h4",Vq,[N(o,{t:"All Active Jobs"})]),f("button",{type:"button",class:"btn-close ms-auto",onClick:e[0]||(e[0]=l=>this.$emit("close"))})]),f("div",zq,[this.getAllJobs.length>0?(R(),V("div",Wq,[(R(!0),V(Le,null,Ze(this.getAllJobs,(l,c)=>(R(),V("div",{class:"accordion-item",key:l.id},[f("h2",Yq,[f("button",{class:"accordion-button collapsed",type:"button","data-bs-toggle":"collapse","data-bs-target":"#collapse_"+c},[f("small",null,[f("strong",null,[l.name?(R(),V("span",jq,we(l.name)+" • ",1)):ce("",!0),f("samp",Kq,we(l.id),1)])])],8,Hq)]),f("div",{id:"collapse_"+c,class:"accordion-collapse collapse","data-bs-parent":"#peerJobsLogsModalAccordion"},[f("div",Gq,[(R(!0),V(Le,null,Ze(l.jobs,u=>(R(),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,Uq)]))),128))])):(R(),V("div",Xq,[f("div",qq,[f("span",Zq,[N(o,{t:"No active job at the moment."})])])]))])])])])])}const Qq=je(Lq,[["render",Jq]]),eZ={name:"peerJobsLogsModal",components:{LocaleText:He},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 Yt(`/api/getPeerScheduleJobLogs/${this.configurationInfo.Name}`,{},t=>{this.data=t.data,this.logFetchTime=bi().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)}}},tZ={class:"peerSettingContainer w-100 h-100 position-absolute top-0 start-0 overflow-y-scroll"},nZ={class:"container-fluid d-flex h-100 w-100"},iZ={class:"m-auto mt-0 modal-dialog-centered dashboardModal",style:{width:"100%"}},sZ={class:"card rounded-3 shadow w-100"},rZ={class:"card-header bg-transparent d-flex align-items-center gap-2 border-0 p-4 pb-0"},oZ={class:"mb-0"},aZ={class:"card-body px-4 pb-4 pt-2"},lZ={key:0},cZ={class:"mb-2 d-flex gap-3"},uZ={class:"d-flex gap-3 align-items-center"},dZ={class:"text-muted"},hZ={class:"form-check"},fZ={class:"form-check-label",for:"jobLogsShowSuccessCheck"},gZ={class:"badge text-success-emphasis bg-success-subtle"},pZ={class:"form-check"},mZ={class:"form-check-label",for:"jobLogsShowFailedCheck"},_Z={class:"badge text-danger-emphasis bg-danger-subtle"},yZ={class:"d-flex gap-3 align-items-center ms-auto"},vZ={class:"text-muted"},bZ={class:"form-check"},wZ={class:"form-check-label",for:"jobLogsShowJobIDCheck"},xZ={class:"form-check"},EZ={class:"form-check-label",for:"jobLogsShowLogIDCheck"},CZ={class:"table"},SZ={scope:"col"},TZ={key:0,scope:"col"},AZ={key:1,scope:"col"},kZ={scope:"col"},MZ={scope:"col"},PZ={style:{"font-size":"0.875rem"}},IZ={scope:"row"},DZ={key:0},RZ={class:"text-muted"},LZ={key:1},OZ={class:"text-muted"},$Z={class:"d-flex gap-2"},NZ={key:1,class:"d-flex align-items-center flex-column"};function FZ(t,e,n,i,s,r){const o=Ee("LocaleText");return R(),V("div",tZ,[f("div",nZ,[f("div",iZ,[f("div",sZ,[f("div",rZ,[f("h4",oZ,[N(o,{t:"Jobs Logs"})]),f("button",{type:"button",class:"btn-close ms-auto",onClick:e[0]||(e[0]=a=>this.$emit("close"))})]),f("div",aZ,[this.dataLoading?(R(),V("div",NZ,e[11]||(e[11]=[f("div",{class:"spinner-border text-body",role:"status"},[f("span",{class:"visually-hidden"},"Loading...")],-1)]))):(R(),V("div",lZ,[f("p",null,[N(o,{t:"Updated at"}),Ue(" : "+we(this.logFetchTime),1)]),f("div",cZ,[f("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"},[e[8]||(e[8]=f("i",{class:"bi bi-arrow-clockwise me-2"},null,-1)),N(o,{t:"Refresh"})]),f("div",uZ,[f("span",dZ,[N(o,{t:"Filter"})]),f("div",hZ,[$e(f("input",{class:"form-check-input",type:"checkbox","onUpdate:modelValue":e[2]||(e[2]=a=>this.showSuccessJob=a),id:"jobLogsShowSuccessCheck"},null,512),[[Kn,this.showSuccessJob]]),f("label",fZ,[f("span",gZ,[N(o,{t:"Success"})])])]),f("div",pZ,[$e(f("input",{class:"form-check-input",type:"checkbox","onUpdate:modelValue":e[3]||(e[3]=a=>this.showFailedJob=a),id:"jobLogsShowFailedCheck"},null,512),[[Kn,this.showFailedJob]]),f("label",mZ,[f("span",_Z,[N(o,{t:"Failed"})])])])]),f("div",yZ,[f("span",vZ,[N(o,{t:"Display"})]),f("div",bZ,[$e(f("input",{class:"form-check-input",type:"checkbox","onUpdate:modelValue":e[4]||(e[4]=a=>s.showJobID=a),id:"jobLogsShowJobIDCheck"},null,512),[[Kn,s.showJobID]]),f("label",wZ,[N(o,{t:"Job ID"})])]),f("div",xZ,[$e(f("input",{class:"form-check-input",type:"checkbox","onUpdate:modelValue":e[5]||(e[5]=a=>s.showLogID=a),id:"jobLogsShowLogIDCheck"},null,512),[[Kn,s.showLogID]]),f("label",EZ,[N(o,{t:"Log ID"})])])])]),f("table",CZ,[f("thead",null,[f("tr",null,[f("th",SZ,[N(o,{t:"Date"})]),s.showLogID?(R(),V("th",TZ,[N(o,{t:"Log ID"})])):ce("",!0),s.showJobID?(R(),V("th",AZ,[N(o,{t:"Job ID"})])):ce("",!0),f("th",kZ,[N(o,{t:"Status"})]),f("th",MZ,[N(o,{t:"Message"})])])]),f("tbody",null,[(R(!0),V(Le,null,Ze(this.showLogs,a=>(R(),V("tr",PZ,[f("th",IZ,we(a.LogDate),1),s.showLogID?(R(),V("td",DZ,[f("samp",RZ,we(a.LogID),1)])):ce("",!0),s.showJobID?(R(),V("td",LZ,[f("samp",OZ,we(a.JobID),1)])):ce("",!0),f("td",null,[f("span",{class:Pe(["badge",[a.Status==="1"?"text-success-emphasis bg-success-subtle":"text-danger-emphasis bg-danger-subtle"]])},we(a.Status==="1"?"Success":"Failed"),3)]),f("td",null,we(a.Message),1)]))),256))])]),f("div",$Z,[this.getLogs.length>this.showLogAmount?(R(),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"},e[9]||(e[9]=[f("i",{class:"bi bi-chevron-down me-2"},null,-1),Ue(" Show More ")]))):ce("",!0),this.showLogAmount>20?(R(),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"},e[10]||(e[10]=[f("i",{class:"bi bi-chevron-up me-2"},null,-1),Ue(" Collapse ")]))):ce("",!0)])]))])])])])])}const BZ=je(eZ,[["render",FZ]]),VZ={name:"peerShareLinkModal",props:{peer:Object},components:{LocaleText:He,VueDatePicker:Yu},data(){return{dataCopy:void 0,loading:!1}},setup(){return{store:tt()}},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,xt("/api/sharePeer/create",{Configuration:this.peer.configuration.Name,Peer:this.peer.id,ExpireDate:bi().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(){xt("/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=bi().format("YYYY-MM-DD HH:mm:ss"),this.updateLinkExpireDate()},parseTime(t){t?this.dataCopy.ExpireDate=bi(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}}},zZ={class:"peerSettingContainer w-100 h-100 position-absolute top-0 start-0 overflow-y-scroll"},WZ={class:"container d-flex h-100 w-100"},YZ={class:"m-auto modal-dialog-centered dashboardModal",style:{width:"500px"}},HZ={class:"card rounded-3 shadow flex-grow-1"},jZ={class:"card-header bg-transparent d-flex align-items-center gap-2 border-0 p-4"},KZ={class:"mb-0"},UZ={key:0,class:"card-body px-4 pb-4"},GZ={key:0},XZ={class:"mb-3 text-muted"},qZ=["disabled"],ZZ={key:1},JZ={class:"d-flex gap-2 mb-4"},QZ=["href"],eJ={class:"d-flex flex-column gap-2 mb-3"},tJ=["disabled"];function nJ(t,e,n,i,s,r){const o=Ee("LocaleText"),a=Ee("VueDatePicker");return R(),V("div",zZ,[f("div",WZ,[f("div",YZ,[f("div",HZ,[f("div",jZ,[f("h4",KZ,[N(o,{t:"Share Peer"})]),f("button",{type:"button",class:"btn-close ms-auto",onClick:e[0]||(e[0]=l=>this.$emit("close"))})]),this.peer.ShareLink?(R(),V("div",UZ,[this.dataCopy?(R(),V("div",ZZ,[f("div",JZ,[e[4]||(e[4]=f("i",{class:"bi bi-link-45deg"},null,-1)),f("a",{href:this.getUrl,class:"text-decoration-none",target:"_blank"},we(r.getUrl),9,QZ)]),f("div",eJ,[f("small",null,[e[5]||(e[5]=f("i",{class:"bi bi-calendar me-2"},null,-1)),N(o,{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"])]),f("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"},[f("span",{class:Pe({"animate__animated animate__flash animate__infinite animate__slower":this.loading})},e[6]||(e[6]=[f("i",{class:"bi bi-send-slash-fill me-2"},null,-1)]),2),this.loading?(R(),Se(o,{key:0,t:"Stop Sharing..."})):(R(),Se(o,{key:1,t:"Stop Sharing"}))],8,tJ)])):(R(),V("div",GZ,[f("h6",XZ,[N(o,{t:"Currently the peer is not sharing"})]),f("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"},[f("span",{class:Pe({"animate__animated animate__flash animate__infinite animate__slower":this.loading})},e[3]||(e[3]=[f("i",{class:"bi bi-send-fill me-2"},null,-1)]),2),this.loading?(R(),Se(o,{key:0,t:"Sharing..."})):(R(),Se(o,{key:1,t:"Start Sharing"}))],8,qZ)]))])):ce("",!0)])])])])}const iJ=je(VZ,[["render",nJ]]),sJ={class:"container d-flex h-100 w-100"},rJ={class:"m-auto modal-dialog-centered dashboardModal",style:{width:"700px"}},oJ={class:"card rounded-3 shadow flex-grow-1"},aJ={class:"card-header bg-transparent d-flex align-items-center gap-2 border-0 p-4"},lJ={class:"mb-0"},cJ={class:"card-body px-4 pb-4"},uJ={class:"d-flex gap-2 flex-column"},dJ={class:"d-flex align-items-center"},hJ={class:"text-muted"},fJ={class:"ms-auto"},gJ={class:"d-flex align-items-center"},pJ={class:"text-muted"},mJ={class:"ms-auto"},_J={for:"configuration_private_key",class:"form-label d-flex"},yJ={class:"text-muted d-block"},vJ={class:"form-check form-switch ms-auto"},bJ=["disabled"],wJ={for:"configuration_ipaddress_cidr",class:"form-label"},xJ={class:"text-muted"},EJ=["disabled"],CJ={for:"configuration_listen_port",class:"form-label"},SJ={class:"text-muted"},TJ=["disabled"],AJ={for:"configuration_preup",class:"form-label"},kJ={class:"text-muted"},MJ=["disabled"],PJ={for:"configuration_predown",class:"form-label"},IJ={class:"text-muted"},DJ=["disabled"],RJ={for:"configuration_postup",class:"form-label"},LJ={class:"text-muted"},OJ=["disabled"],$J={for:"configuration_postdown",class:"form-label"},NJ={class:"text-muted"},FJ=["disabled"],BJ={class:"d-flex align-items-center gap-2 mt-4"},VJ=["disabled"],zJ=["disabled"],WJ={__name:"editConfiguration",props:{configurationInfo:Object},emits:["changed"],setup(t,{emit:e}){const n=t,i=qn(),s=tt(),r=xe(!1),o=Ki(JSON.parse(JSON.stringify(n.configurationInfo))),a=xe(!1),l=xe(!1);xe(!1);const c=Ki({PrivateKey:!0,IPAddress:!0,ListenPort:!0}),u=_D("editConfigurationContainer"),d=()=>{i.checkWGKeyLength(o.PrivateKey)?(c.PrivateKey=!0,o.PublicKey=window.wireguard.generatePublicKey(o.PrivateKey)):c.PrivateKey=!1},h=()=>{l.value=!1,Object.assign(o,JSON.parse(JSON.stringify(n.configurationInfo)))},g=e,p=()=>{r.value=!0,xt("/api/updateWireguardConfiguration",o,m=>{r.value=!1,m.status?(s.newMessage("Server","Configuration saved","success"),l.value=!1,g("dataChanged",m.data)):s.newMessage("Server",m.message,"danger")})};return un(o,()=>{l.value=JSON.stringify(o)!==JSON.stringify(n.configurationInfo)},{deep:!0}),(m,y)=>(R(),V("div",{class:"peerSettingContainer w-100 h-100 position-absolute top-0 start-0 overflow-y-scroll",ref_key:"editConfigurationContainer",ref:u},[f("div",sJ,[f("div",rJ,[f("div",oJ,[f("div",aJ,[f("h4",lJ,[N(He,{t:"Configuration Settings"})]),f("button",{type:"button",class:"btn-close ms-auto",onClick:y[0]||(y[0]=v=>m.$emit("close"))})]),f("div",cJ,[f("div",uJ,[f("div",dJ,[f("small",hJ,[N(He,{t:"Name"})]),f("small",fJ,[f("samp",null,we(o.Name),1)])]),f("div",gJ,[f("small",pJ,[N(He,{t:"Public Key"})]),f("small",mJ,[f("samp",null,we(o.PublicKey),1)])]),y[15]||(y[15]=f("hr",null,null,-1)),f("div",null,[f("label",_J,[f("small",yJ,[N(He,{t:"Private Key"})]),f("div",vJ,[$e(f("input",{class:"form-check-input",type:"checkbox",role:"switch",id:"editPrivateKeySwitch","onUpdate:modelValue":y[1]||(y[1]=v=>a.value=v)},null,512),[[Kn,a.value]]),y[12]||(y[12]=f("label",{class:"form-check-label",for:"editPrivateKeySwitch"},[f("small",null,"Edit")],-1))])]),$e(f("input",{type:"text",class:Pe(["form-control form-control-sm rounded-3",{"is-invalid":!c.PrivateKey}]),disabled:r.value||!a.value,onKeyup:y[2]||(y[2]=v=>d()),"onUpdate:modelValue":y[3]||(y[3]=v=>o.PrivateKey=v),id:"configuration_private_key"},null,42,bJ),[[We,o.PrivateKey]])]),f("div",null,[f("label",wJ,[f("small",xJ,[N(He,{t:"IP Address/CIDR"})])]),$e(f("input",{type:"text",class:"form-control form-control-sm rounded-3",disabled:r.value,"onUpdate:modelValue":y[4]||(y[4]=v=>o.Address=v),id:"configuration_ipaddress_cidr"},null,8,EJ),[[We,o.Address]])]),f("div",null,[f("label",CJ,[f("small",SJ,[N(He,{t:"Listen Port"})])]),$e(f("input",{type:"number",class:"form-control form-control-sm rounded-3",disabled:r.value,"onUpdate:modelValue":y[5]||(y[5]=v=>o.ListenPort=v),id:"configuration_listen_port"},null,8,TJ),[[We,o.ListenPort]])]),f("div",null,[f("label",AJ,[f("small",kJ,[N(He,{t:"PreUp"})])]),$e(f("input",{type:"text",class:"form-control form-control-sm rounded-3",disabled:r.value,"onUpdate:modelValue":y[6]||(y[6]=v=>o.PreUp=v),id:"configuration_preup"},null,8,MJ),[[We,o.PreUp]])]),f("div",null,[f("label",PJ,[f("small",IJ,[N(He,{t:"PreDown"})])]),$e(f("input",{type:"text",class:"form-control form-control-sm rounded-3",disabled:r.value,"onUpdate:modelValue":y[7]||(y[7]=v=>o.PreDown=v),id:"configuration_predown"},null,8,DJ),[[We,o.PreDown]])]),f("div",null,[f("label",RJ,[f("small",LJ,[N(He,{t:"PostUp"})])]),$e(f("input",{type:"text",class:"form-control form-control-sm rounded-3",disabled:r.value,"onUpdate:modelValue":y[8]||(y[8]=v=>o.PostUp=v),id:"configuration_postup"},null,8,OJ),[[We,o.PostUp]])]),f("div",null,[f("label",$J,[f("small",NJ,[N(He,{t:"PostDown"})])]),$e(f("input",{type:"text",class:"form-control form-control-sm rounded-3",disabled:r.value,"onUpdate:modelValue":y[9]||(y[9]=v=>o.PostDown=v),id:"configuration_postdown"},null,8,FJ),[[We,o.PostDown]])]),f("div",BJ,[f("button",{class:"btn bg-secondary-subtle border-secondary-subtle text-secondary-emphasis rounded-3 shadow ms-auto px-3 py-2",onClick:y[10]||(y[10]=v=>h()),disabled:!l.value||r.value},y[13]||(y[13]=[f("i",{class:"bi bi-arrow-clockwise"},null,-1)]),8,VJ),f("button",{class:"btn bg-primary-subtle border-primary-subtle text-primary-emphasis rounded-3 px-3 py-2 shadow",disabled:!l.value||r.value,onClick:y[11]||(y[11]=v=>p())},y[14]||(y[14]=[f("i",{class:"bi bi-save-fill"},null,-1)]),8,zJ)])])])])])])],512))}};kf.register(Hj,Mf,oK,eK,US,EH,GS,XS,TH,SH,AH,kH,qK,JK,tU,pU,dm,vU,uK,PK,$K,FK,KK);const YJ={name:"peerList",components:{EditConfiguration:WJ,LocaleText:He,PeerShareLinkModal:iJ,PeerJobsLogsModal:BZ,PeerJobsAllModal:Qq,PeerJobs:Rq,PeerCreate:HT,PeerQRCode:lX,PeerSettings:u7,PeerSearch:IW,Peer:fY,Line:kU,Bar:AU},setup(){const t=tt(),e=qn(),n=xe(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},editConfiguration:{modalOpen:!1}}},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,Yt("/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){Yt("/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,bi().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,bi().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 Xl(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)}}},HJ={key:0,class:"container-md"},jJ={class:"d-flex align-items-center"},KJ={CLASS:"text-muted"},UJ={class:"d-flex align-items-center gap-3"},GJ={class:"mb-0"},XJ={class:"card rounded-3 bg-transparent shadow-sm ms-auto"},qJ={class:"card-body py-2 d-flex align-items-center"},ZJ={class:"mb-0 text-muted"},JJ={class:"form-check form-switch ms-auto"},QJ=["for"],eQ={key:4,class:"spinner-border spinner-border-sm ms-2","aria-hidden":"true"},tQ=["disabled","id"],nQ={class:"row mt-3 gy-2 gx-2 mb-2"},iQ={class:"col-6 col-lg-3"},sQ={class:"card rounded-3 bg-transparent shadow-sm"},rQ={class:"card-body py-2"},oQ={class:"mb-0 text-muted"},aQ={class:"col-6 col-lg-3"},lQ={class:"card rounded-3 bg-transparent shadow-sm"},cQ={class:"card-body py-2"},uQ={class:"mb-0 text-muted"},dQ={style:{"word-break":"break-all"},class:"col-12 col-lg-6"},hQ={class:"card rounded-3 bg-transparent shadow-sm"},fQ={class:"card-body py-2"},gQ={class:"mb-0 text-muted"},pQ={class:"row gx-2 gy-2 mb-2"},mQ={class:"col-6 col-lg-3"},_Q={class:"card rounded-3 bg-transparent shadow-sm"},yQ={class:"card-body d-flex"},vQ={class:"mb-0 text-muted"},bQ={class:"h4"},wQ={class:"col-6 col-lg-3"},xQ={class:"card rounded-3 bg-transparent shadow-sm"},EQ={class:"card-body d-flex"},CQ={class:"mb-0 text-muted"},SQ={class:"h4"},TQ={class:"col-6 col-lg-3"},AQ={class:"card rounded-3 bg-transparent shadow-sm"},kQ={class:"card-body d-flex"},MQ={class:"mb-0 text-muted"},PQ={class:"h4 text-primary"},IQ={class:"col-6 col-lg-3"},DQ={class:"card rounded-3 bg-transparent shadow-sm"},RQ={class:"card-body d-flex"},LQ={class:"mb-0 text-muted"},OQ={class:"h4 text-success"},$Q={class:"row gx-2 gy-2 mb-3"},NQ={class:"col-12 col-lg-6"},FQ={class:"card rounded-3 bg-transparent shadow-sm",style:{height:"270px"}},BQ={class:"card-header bg-transparent border-0"},VQ={class:"text-muted"},zQ={class:"card-body pt-1"},WQ={class:"col-sm col-lg-3"},YQ={class:"card rounded-3 bg-transparent shadow-sm",style:{height:"270px"}},HQ={class:"card-header bg-transparent border-0"},jQ={class:"text-muted"},KQ={class:"card-body pt-1"},UQ={class:"col-sm col-lg-3"},GQ={class:"card rounded-3 bg-transparent shadow-sm",style:{height:"270px"}},XQ={class:"card-header bg-transparent border-0"},qQ={class:"text-muted"},ZQ={class:"card-body pt-1"},JQ={class:"mb-3"};function QQ(t,e,n,i,s,r){const o=Ee("LocaleText"),a=Ee("Bar"),l=Ee("Line"),c=Ee("PeerSearch"),u=Ee("Peer"),d=Ee("PeerSettings"),h=Ee("PeerQRCode"),g=Ee("PeerJobs"),p=Ee("PeerJobsAllModal"),m=Ee("PeerJobsLogsModal"),y=Ee("PeerShareLinkModal"),v=Ee("EditConfiguration");return this.loading?ce("",!0):(R(),V("div",HJ,[f("div",jJ,[f("div",null,[f("small",KJ,[N(o,{t:"CONFIGURATION"})]),f("div",UJ,[f("h1",GJ,[f("samp",null,we(this.configurationInfo.Name),1)])])]),f("div",XJ,[f("div",qJ,[f("div",null,[f("p",ZJ,[f("small",null,[N(o,{t:"Status"})])]),f("div",JJ,[f("label",{class:"form-check-label",style:{cursor:"pointer"},for:"switch"+this.configurationInfo.id},[!this.configurationInfo.Status&&this.configurationToggling?(R(),Se(o,{key:0,t:"Turning Off..."})):this.configurationInfo.Status&&this.configurationToggling?(R(),Se(o,{key:1,t:"Turning On..."})):this.configurationInfo.Status&&!this.configurationToggling?(R(),Se(o,{key:2,t:"On"})):!this.configurationInfo.Status&&!this.configurationToggling?(R(),Se(o,{key:3,t:"Off"})):ce("",!0),this.configurationToggling?(R(),V("span",eQ)):ce("",!0)],8,QJ),$e(f("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]=b=>this.toggle()),"onUpdate:modelValue":e[1]||(e[1]=b=>this.configurationInfo.Status=b)},null,40,tQ),[[Kn,this.configurationInfo.Status]])])]),f("div",{class:Pe(["dot ms-5",{active:this.configurationInfo.Status}])},null,2)])])]),f("div",nQ,[f("div",iQ,[f("div",sQ,[f("div",rQ,[f("p",oQ,[f("small",null,[N(o,{t:"Address"})])]),Ue(" "+we(this.configurationInfo.Address),1)])])]),f("div",aQ,[f("div",lQ,[f("div",cQ,[f("p",uQ,[f("small",null,[N(o,{t:"Listen Port"})])]),Ue(" "+we(this.configurationInfo.ListenPort),1)])])]),f("div",dQ,[f("div",hQ,[f("div",fQ,[f("p",gQ,[f("small",null,[N(o,{t:"Public Key"})])]),f("samp",null,we(this.configurationInfo.PublicKey),1)])])])]),f("div",pQ,[f("div",mQ,[f("div",_Q,[f("div",yQ,[f("div",null,[f("p",vQ,[f("small",null,[N(o,{t:"Connected Peers"})])]),f("strong",bQ,we(r.configurationSummary.connectedPeers)+" / "+we(s.configurationPeers.length),1)]),e[18]||(e[18]=f("i",{class:"bi bi-ethernet ms-auto h2 text-muted"},null,-1))])])]),f("div",wQ,[f("div",xQ,[f("div",EQ,[f("div",null,[f("p",CQ,[f("small",null,[N(o,{t:"Total Usage"})])]),f("strong",SQ,we(r.configurationSummary.totalUsage)+" GB",1)]),e[19]||(e[19]=f("i",{class:"bi bi-arrow-down-up ms-auto h2 text-muted"},null,-1))])])]),f("div",TQ,[f("div",AQ,[f("div",kQ,[f("div",null,[f("p",MQ,[f("small",null,[N(o,{t:"Total Received"})])]),f("strong",PQ,we(r.configurationSummary.totalReceive)+" GB",1)]),e[20]||(e[20]=f("i",{class:"bi bi-arrow-down ms-auto h2 text-muted"},null,-1))])])]),f("div",IQ,[f("div",DQ,[f("div",RQ,[f("div",null,[f("p",LQ,[f("small",null,[N(o,{t:"Total Sent"})])]),f("strong",OQ,we(r.configurationSummary.totalSent)+" GB",1)]),e[21]||(e[21]=f("i",{class:"bi bi-arrow-up ms-auto h2 text-muted"},null,-1))])])])]),f("div",$Q,[f("div",NQ,[f("div",FQ,[f("div",BQ,[f("small",VQ,[N(o,{t:"Peers Data Usage"})])]),f("div",zQ,[N(a,{data:r.individualDataUsage,options:r.individualDataUsageChartOption,style:{width:"100%",height:"200px","max-height":"200px"}},null,8,["data","options"])])])]),f("div",WQ,[f("div",YQ,[f("div",HQ,[f("small",jQ,[N(o,{t:"Real Time Received Data Usage"})])]),f("div",KQ,[N(l,{options:r.chartOptions,data:r.receiveData,style:{width:"100%",height:"200px","max-height":"200px"}},null,8,["options","data"])])])]),f("div",UQ,[f("div",GQ,[f("div",XQ,[f("small",qQ,[N(o,{t:"Real Time Sent Data Usage"})])]),f("div",ZQ,[N(l,{options:r.chartOptions,data:r.sentData,style:{width:"100%",height:"200px","max-height":"200px"}},null,8,["options","data"])])])])]),f("div",JQ,[N(c,{onJobsAll:e[2]||(e[2]=b=>this.peerScheduleJobsAll.modalOpen=!0),onJobLogs:e[3]||(e[3]=b=>this.peerScheduleJobsLogs.modalOpen=!0),onEditConfiguration:e[4]||(e[4]=b=>this.editConfiguration.modalOpen=!0),configuration:this.configurationInfo},null,8,["configuration"]),N(Ul,{name:"list",tag:"div",class:"row gx-2 gy-2 z-0"},{default:De(()=>[(R(!0),V(Le,null,Ze(this.searchPeers,b=>(R(),V("div",{class:"col-12 col-lg-6 col-xl-4",key:b.id},[N(u,{Peer:b,onShare:x=>{this.peerShare.selectedPeer=b.id,this.peerShare.modalOpen=!0},onRefresh:e[5]||(e[5]=x=>this.getPeers()),onJobs:x=>{s.peerScheduleJobs.modalOpen=!0,s.peerScheduleJobs.selectedPeer=this.configurationPeers.find(E=>E.id===b.id)},onSetting:x=>{s.peerSetting.modalOpen=!0,s.peerSetting.selectedPeer=this.configurationPeers.find(E=>E.id===b.id)},onQrcode:e[6]||(e[6]=x=>{this.peerQRCode.peerConfigData=x,this.peerQRCode.modalOpen=!0})},null,8,["Peer","onShare","onJobs","onSetting"])]))),128))]),_:1})]),N($t,{name:"zoom"},{default:De(()=>[this.peerSetting.modalOpen?(R(),Se(d,{key:"settings",selectedPeer:this.peerSetting.selectedPeer,onRefresh:e[7]||(e[7]=b=>this.getPeers()),onClose:e[8]||(e[8]=b=>this.peerSetting.modalOpen=!1)},null,8,["selectedPeer"])):ce("",!0)]),_:1}),N($t,{name:"zoom"},{default:De(()=>[s.peerQRCode.modalOpen?(R(),Se(h,{peerConfigData:this.peerQRCode.peerConfigData,key:"qrcode",onClose:e[9]||(e[9]=b=>this.peerQRCode.modalOpen=!1)},null,8,["peerConfigData"])):ce("",!0)]),_:1}),N($t,{name:"zoom"},{default:De(()=>[this.peerScheduleJobs.modalOpen?(R(),Se(g,{key:0,onRefresh:e[10]||(e[10]=b=>this.getPeers()),selectedPeer:this.peerScheduleJobs.selectedPeer,onClose:e[11]||(e[11]=b=>this.peerScheduleJobs.modalOpen=!1)},null,8,["selectedPeer"])):ce("",!0)]),_:1}),N($t,{name:"zoom"},{default:De(()=>[this.peerScheduleJobsAll.modalOpen?(R(),Se(p,{key:0,onRefresh:e[12]||(e[12]=b=>this.getPeers()),onClose:e[13]||(e[13]=b=>this.peerScheduleJobsAll.modalOpen=!1),configurationPeers:this.configurationPeers},null,8,["configurationPeers"])):ce("",!0)]),_:1}),N($t,{name:"zoom"},{default:De(()=>[this.peerScheduleJobsLogs.modalOpen?(R(),Se(m,{key:0,onClose:e[14]||(e[14]=b=>this.peerScheduleJobsLogs.modalOpen=!1),configurationInfo:this.configurationInfo},null,8,["configurationInfo"])):ce("",!0)]),_:1}),N($t,{name:"zoom"},{default:De(()=>[this.peerShare.modalOpen?(R(),Se(y,{key:0,onClose:e[15]||(e[15]=b=>{this.peerShare.modalOpen=!1,this.peerShare.selectedPeer=void 0}),peer:this.configurationPeers.find(b=>b.id===this.peerShare.selectedPeer)},null,8,["peer"])):ce("",!0)]),_:1}),N($t,{name:"zoom"},{default:De(()=>[this.editConfiguration.modalOpen?(R(),Se(v,{key:0,onClose:e[16]||(e[16]=b=>this.editConfiguration.modalOpen=!1),onDataChanged:e[17]||(e[17]=b=>this.configurationInfo=b),configurationInfo:this.configurationInfo},null,8,["configurationInfo"])):ce("",!0)]),_:1})]))}const eee=je(YJ,[["render",QQ],["__scopeId","data-v-a57c6624"]]);class Er{constructor(e){this.propagationStopped,this.defaultPrevented,this.type=e,this.target=null}preventDefault(){this.defaultPrevented=!0}stopPropagation(){this.propagationStopped=!0}}const Nl={PROPERTYCHANGE:"propertychange"};class Of{constructor(){this.disposed=!1}dispose(){this.disposed||(this.disposed=!0,this.disposeInternal())}disposeInternal(){}}function tee(t,e,n){let i,s;n=n||hr;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 hr(t,e){return t>e?1:t0?s-1:s}return i-1}if(n>0){for(let s=1;s0||o===0)})}function vu(){return!0}function Nf(){return!1}function Fl(){}function UT(t){let e,n,i;return function(){const s=Array.prototype.slice.call(arguments);return(!n||this!==i||!Eo(s,n))&&(i=this,n=s,e=t.apply(this,arguments)),e}}function see(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 Gu(t){for(const e in t)delete t[e]}function Bl(t){let e;for(e in t)return!1;return!e}class Ff extends Of{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 Er(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]=Fl,++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 ht(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 Oh(t,e,n,i){return ht(t,e,n,i,!0)}function Rt(t){t&&t.target&&(t.target.removeEventListener(t.type,t.listener),Gu(t))}class Xu 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 Wd(fi.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 Wd(fi.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 Wd(fi.REMOVE,s,e)),this.dispatchEvent(new Wd(fi.ADD,n,e))}updateLength_(){this.set(q1.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 ul(t,e,n,i)}function ul(t,e,n,i){const s=n-t,r=i-e;return s*s+r*r}function lee(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 uh(t){return t*Math.PI/180}function dl(t,e){const n=t%e;return n*e<0?n+e:n}function Ai(t,e,n){return t+n*(e-t)}function cy(t,e){const n=Math.pow(10,e);return Math.round(t*n)/n}function Yd(t,e){return Math.floor(cy(t,e))}function Hd(t,e){return Math.ceil(cy(t,e))}class GT extends zs{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[Et.OPACITY]=e.opacity!==void 0?e.opacity:1,pt(typeof n[Et.OPACITY]=="number","Layer opacity must be a number"),n[Et.VISIBLE]=e.visible!==void 0?e.visible:!0,n[Et.Z_INDEX]=e.zIndex,n[Et.MAX_RESOLUTION]=e.maxResolution!==void 0?e.maxResolution:1/0,n[Et.MIN_RESOLUTION]=e.minResolution!==void 0?e.minResolution:0,n[Et.MIN_ZOOM]=e.minZoom!==void 0?e.minZoom:-1/0,n[Et.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=nn(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 gt()}getLayerStatesArray(e){return gt()}getExtent(){return this.get(Et.EXTENT)}getMaxResolution(){return this.get(Et.MAX_RESOLUTION)}getMinResolution(){return this.get(Et.MIN_RESOLUTION)}getMinZoom(){return this.get(Et.MIN_ZOOM)}getMaxZoom(){return this.get(Et.MAX_ZOOM)}getOpacity(){return this.get(Et.OPACITY)}getSourceState(){return gt()}getVisible(){return this.get(Et.VISIBLE)}getZIndex(){return this.get(Et.Z_INDEX)}setBackground(e){this.background_=e,this.changed()}setExtent(e){this.set(Et.EXTENT,e)}setMaxResolution(e){this.set(Et.MAX_RESOLUTION,e)}setMinResolution(e){this.set(Et.MIN_RESOLUTION,e)}setMaxZoom(e){this.set(Et.MAX_ZOOM,e)}setMinZoom(e){this.set(Et.MIN_ZOOM,e)}setOpacity(e){pt(typeof e=="number","Layer opacity must be a number"),this.set(Et.OPACITY,e)}setVisible(e){this.set(Et.VISIBLE,e)}setZIndex(e){this.set(Et.Z_INDEX,e)}disposeInternal(){this.state_&&(this.state_.layer=null,this.state_=null),super.disposeInternal()}}const zi={PRERENDER:"prerender",POSTRENDER:"postrender",PRECOMPOSE:"precompose",POSTCOMPOSE:"postcompose",RENDERCOMPLETE:"rendercomplete"},Wn={ANIMATING:0,INTERACTING:1},Qi={CENTER:"center",RESOLUTION:"resolution",ROTATION:"rotation"},cee=42,uy=256,dy={radians:6370997/(2*Math.PI),degrees:2*Math.PI*6370997/360,ft:.3048,m:1,"us-ft":1200/3937};class XT{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_||dy[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 qu=6378137,tl=Math.PI*qu,uee=[-tl,-tl,tl,tl],dee=[-180,-85,180,85],jd=qu*Math.log(Math.tan(Math.PI/2));class Fa extends XT{constructor(e){super({code:e,units:"m",extent:uee,global:!0,worldExtent:dee,getPointResolution:function(n,i){return n/Math.cosh(i[1]/qu)}})}}const Z1=[new Fa("EPSG:3857"),new Fa("EPSG:102100"),new Fa("EPSG:102113"),new Fa("EPSG:900913"),new Fa("http://www.opengis.net/def/crs/EPSG/0/3857"),new Fa("http://www.opengis.net/gml/srs/epsg.xml#3857")];function hee(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;rjd?o=jd:o<-jd&&(o=-jd),e[r+1]=o}return e}function fee(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 uo(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 uo(1/0,1/0,-1/0,-1/0,t)}function JT(t,e){const n=t[0],i=t[1];return uo(n,i,n,i,e)}function gy(t,e,n,i,s){const r=Bf(s);return QT(r,t,e,n,i)}function bu(t,e){return t[0]==e[0]&&t[2]==e[2]&&t[1]==e[1]&&t[3]==e[3]}function vee(t,e){return e[0]t[2]&&(t[2]=e[2]),e[1]t[3]&&(t[3]=e[3]),t}function Zc(t,e){e[0]t[2]&&(t[2]=e[0]),e[1]t[3]&&(t[3]=e[1])}function QT(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 Yf(t){return t[2]=o&&m<=l),!i&&r&kn.RIGHT&&!(s&kn.RIGHT)&&(y=g-(h-l)*p,i=y>=a&&y<=c),!i&&r&kn.BELOW&&!(s&kn.BELOW)&&(m=h-(g-a)/p,i=m>=o&&m<=l),!i&&r&kn.LEFT&&!(s&kn.LEFT)&&(y=g-(h-o)*p,i=y>=a&&y<=c)}return i}function tA(t,e){const n=e.getExtent(),i=fa(t);if(e.canWrapX()&&(i[0]=n[2])){const s=yt(n),o=Math.floor((i[0]-n[0])/s)*s;t[0]-=o,t[2]-=o}return t}function py(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]]];tA(t,e);const s=yt(i);if(yt(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 See(t,e){return t[0]+=+e[0],t[1]+=+e[1],t}function Nh(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 my(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 Tee(t,e){return t[0]*=e,t[1]*=e,t}function nA(t,e){if(e.canWrapX()){const n=yt(e.getExtent()),i=Aee(t,e,n);i&&(t[0]-=i*n)}return t}function Aee(t,e,n){const i=e.getExtent();let s=0;return e.canWrapX()&&(t[0]i[2])&&(n=n||yt(i),s=Math.floor((t[0]-i[0])/n)),s}const kee=63710088e-1;function tw(t,e,n){n=n||kee;const i=uh(t[1]),s=uh(e[1]),r=(s-i)/2,o=uh(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 iA(...t){console.warn(...t)}let Sm=!0;function sA(t){Sm=!1}function _y(t,e){if(e!==void 0){for(let n=0,i=t.length;n=-180&&t[0]<=180&&t[1]>=-90&&t[1]<=90&&(Sm=!1,iA("Call useGeographic() from ol/proj once to work with [longitude, latitude] coordinates.")),t}function aA(t,e){return t}function Zr(t,e){return t}function Dee(){iw(Z1),iw(Q1),Iee(Q1,Z1,hee,fee)}Dee();function sw(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,g=t[2]-l/2+u,p=t[1]+c/2+d,m=t[3]-c/2+d;h>g&&(h=(g+h)/2,g=h),p>m&&(p=(m+p)/2,m=p);let y=nn(i[0],h,g),v=nn(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]-g)/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 Ree(t){return t}function by(t,e,n,i){const s=yt(e)/n[0],r=jn(e)/n[1];return i?Math.min(t,Math.max(s,r)):Math.min(t,Math.min(s,r))}function wy(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),nn(i,n/2,e*2)}function Lee(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?by(l,n,o,i):l;if(a)return e?wy(s,u,c):nn(s,c,u);const d=Math.min(u,s),h=Math.floor(ly(t,d,r));return t[h]>u&&hMath.round(n*aw[i])/aw[i]).join(", ")+")"}function io(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 gt()}closestPointXY(e,n,i,s){return gt()}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 gt()}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 Eee(this.extent_,e)}rotate(e,n){gt()}scale(e,n,i){gt()}simplify(e){return this.getSimplifiedGeometry(e*e)}getSimplifiedGeometry(e){return gt()}getType(){return gt()}applyTransform(e){gt()}intersectsExtent(e){return gt()}translate(e,n){gt()}transform(e,n){const i=Gi(e),s=i.getUnits()=="tile-pixels"?function(r,o,a){const l=i.getExtent(),c=i.getWorldExtent(),u=jn(c)/jn(l);return br(lw,c[0],c[3],u,-u,0,0,0),io(r,0,r.length,a,lw,o),Fh(i,n)(r,o,a)}:Fh(i,n);return this.applyTransform(s),this}}class Hf extends jee{constructor(){super(),this.layout="XY",this.stride=2,this.flatCoordinates}computeExtent(e){return gy(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,e)}getCoordinates(){return gt()}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 g=0;gs&&(s=c),r=a,o=l}return s}function Gee(t,e,n,i,s){for(let r=0,o=n.length;r0;){const d=c.pop(),h=c.pop();let g=0;const p=t[h],m=t[h+1],y=t[d],v=t[d+1];for(let b=h+i;bg&&(u=b,g=w)}g>s&&(l[(u-e)/i]=1,h+i0&&m>g)&&(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 dA(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 fA(t,e,n,i,s,r){if(n.length===0||!Xo(t,e,n[0],i,s,r))return!1;for(let o=1,a=n.length;ov&&(c=(u+d)/2,fA(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 nte(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:gA(t,e,n,i,function(o,a){return Cee(s,o,a)}):!1}function pA(t,e,n,i,s){return!!(Ay(t,e,n,i,s)||Xo(t,e,n,i,s[0],s[1])||Xo(t,e,n,i,s[0],s[3])||Xo(t,e,n,i,s[2],s[1])||Xo(t,e,n,i,s[2],s[3]))}function ite(t,e,n,i,s){if(!pA(t,e,n[0],i,s))return!1;if(n.length===1)return!0;for(let r=1,o=n.length;r0}function rte(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_[Wn.INTERACTING]>0}cancelAnimations(){this.setHint(Wn.ANIMATING,-this.hints_[Wn.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],g=l.sourceCenter[1],p=l.targetCenter[0],m=l.targetCenter[1];this.nextCenter_=l.targetCenter;const y=h+d*(p-h),v=g+d*(m-g);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 g=this.getViewportSize_(this.getRotation()),p=this.constraints_.resolution(h,0,g,!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?dl(l.targetRotation+Math.PI,2*Math.PI)-Math.PI:l.sourceRotation+d*(l.targetRotation-l.sourceRotation);if(l.anchor){const g=this.constraints_.rotation(h,!0);this.targetCenter_=this.calculateCenterRotate(g,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(Wn.ANIMATING,-1),this.nextCenter_=null,this.nextResolution_=NaN,this.nextRotation_=NaN;const o=s[0].callback;o&&Kd(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]],my(i,e-this.getRotation()),See(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&&Tm(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 aA(n,this.getProjection())}calculateExtentInternal(e){e=e||this.getViewportSizeMinusPadding_();const n=this.getCenterInternal();pt(n,"The view center is not defined");const i=this.getResolution();pt(i!==void 0,"The view resolution is not defined");const s=this.getRotation();return pt(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(Zr(e,this.getProjection()),n)}getResolutionForExtentInternal(e,n){n=n||this.getViewportSizeMinusPadding_();const i=yt(e)/n[0],s=jn(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=hp(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=ly(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=nn(Math.floor(e),0,this.resolutions_.length-2),i=this.resolutions_[n]/this.resolutions_[n+1];return this.resolutions_[n]/Math.pow(i,nn(e-n,0,1))}return this.maxResolution_/Math.pow(this.zoomFactor_,e-this.minZoom_)}fit(e,n){let i;if(pt(Array.isArray(e)||typeof e.getSimplifiedGeometry=="function","Invalid extent or geometry provided as `geometry`"),Array.isArray(e)){pt(!Yf(e),"Cannot fit empty extent provided as `geometry`");const s=Zr(e,this.getProjection());i=fw(s)}else if(e.getType()==="Circle"){const s=Zr(e.getExtent(),this.getProjection());i=fw(s),i.rotate(this.getRotation(),fa(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 Ts?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 My(s,n.viewState)&&(!r||_i(r,n.extent))}getAttributions(e){if(!this.isVisible(e))return[];const n=this.getSource()?.getAttributions();if(!n)return[];const i=e instanceof Ts?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(Et.MAP,e)}getMapInternal(){return this.get(Et.MAP)}setMap(e){this.mapPrecomposeKey_&&(Rt(this.mapPrecomposeKey_),this.mapPrecomposeKey_=null),e||this.changed(),this.mapRenderKey_&&(Rt(this.mapRenderKey_),this.mapRenderKey_=null),e&&(this.mapPrecomposeKey_=ht(e,zi.PRECOMPOSE,this.handlePrecompose_,this),this.mapRenderKey_=ht(this,et.CHANGE,e.render,e),this.changed())}handlePrecompose_(e){const n=e.frameState.layerStatesArray,i=this.getLayerState(!1);pt(!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(Et.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 My(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 mA(t,e,n=0,i=t.length-1,s=dte){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),g=Math.max(n,Math.floor(e-c*d/l+h)),p=Math.min(i,Math.floor(e+(l-c)*d/l+h));mA(t,e,g,p,s)}const r=t[e];let o=n,a=i;for(_c(t,n,e),s(t[i],r)>0&&_c(t,n,i);o0;)a--}s(t[n],r)===0?_c(t,n,a):(a++,_c(t,a,i)),a<=e&&(n=a+1),e<=a&&(i=a-1)}}function _c(t,e,n){const i=t[e];t[e]=t[n],t[n]=i}function dte(t,e){return te?1:0}let _A=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(!Gd(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=qa(i.children.splice(o,i.children.length-o));a.height=i.height,a.leaf=i.leaf,Ba(i,this.toBBox),Ba(a,this.toBBox),n?e[n-1].children.push(a):this._splitRoot(i,a)}_splitRoot(e,n){this.data=qa([e,n]),this.data.height=e.height+1,this.data.leaf=!1,Ba(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=Ac(e,0,a,this.toBBox),c=Ac(e,a,i,this.toBBox),u=mte(l,c),d=fp(l)+fp(c);u=n;c--){const u=e.children[c];kc(a,e.leaf?r(u):u),l+=Ud(a)}return l}_adjustParentBBoxes(e,n,i){for(let s=i;s>=0;s--)kc(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():Ba(e[n],this.toBBox)}};function hte(t,e,n){if(!n)return e.indexOf(t);for(let i=0;i=t.minX&&e.maxY>=t.minY}function qa(t){return{children:t,height:1,leaf:!0,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0}}function gw(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;mA(t,o,e,n,s),r.push(e,o,o,n)}}const ot={IDLE:0,LOADING:1,LOADED:2,ERROR:3,EMPTY:4};function pw(t){return t[0]>0&&t[1]>0}function _te(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 wi(t,e){return Array.isArray(t)?t:(e===void 0?e=[t,t]:(e[0]=t,e[1]=t),e)}class Uf{constructor(e){this.opacity_=e.opacity,this.rotateWithView_=e.rotateWithView,this.rotation_=e.rotation,this.scale_=e.scale,this.scaleArray_=wi(e.scale),this.displacement_=e.displacement,this.declutterMode_=e.declutterMode}clone(){const e=this.getScale();return new Uf({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 gt()}getImage(e){return gt()}getHitDetectionImage(){return gt()}getPixelRatio(e){return 1}getImageState(){return gt()}getImageSize(){return gt()}getOrigin(){return gt()}getSize(){return gt()}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_=wi(e)}listenImageChange(e){gt()}load(){gt()}unlistenImageChange(e){gt()}ready(){return Promise.resolve()}}const Su={name:"rgb",min:[0,0,0],max:[255,255,255],channel:["red","green","blue"],alias:["RGB"]};var Nn={name:"xyz",min:[0,0,0],channel:["X","Y","Z"],alias:["XYZ","ciexyz","cie1931"]};Nn.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]}};Nn.max=Nn.whitepoint[2].D65;Nn.rgb=function(t,e){e=e||Nn.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]};Su.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||Nn.whitepoint[2].E,[r*e[0],o*e[1],a*e[2]]};const Py={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,g,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=Nn.whitepoint[n][e][0],h=Nn.whitepoint[n][e][1],g=Nn.whitepoint[n][e][2],p=4*d/(d+15*h+3*g),m=9*h/(d+15*h+3*g),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]}};Nn.luv=function(t,e,n){var i,s,r,o,a,l,c,u,d,h,g,p,m,y=.008856451679035631,v=903.2962962962961;e=e||"D65",n=n||2,d=Nn.whitepoint[n][e][0],h=Nn.whitepoint[n][e][1],g=Nn.whitepoint[n][e][2],p=4*d/(d+15*h+3*g),m=9*h/(d+15*h+3*g),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 yA={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 Py.xyz(yA.luv(t))}};Py.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]};Nn.lchuv=function(t){return Py.lchuv(Nn.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 _w={red:0,orange:60,yellow:120,green:180,blue:240,purple:300};function yte(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(_w[u]!==void 0)return _w[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 pp={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}};Su.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 vte(t){Array.isArray(t)&&t.raw&&(t=String.raw(...arguments)),t instanceof Number&&(t=+t);var e,n=yte(t);if(!n.space)return[];const i=n.space[0]==="h"?pp.min:Su.min,s=n.space[0]==="h"?pp.max:Su.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=pp.rgb(e)),e.push(Math.min(Math.max(n.alpha,0),1)),e}const Iy=[NaN,NaN,NaN,0];function bte(t){return typeof t=="string"?t:Ry(t)}const wte=1024,yc={};let mp=0;function xte(t){if(t.length===4)return t;const e=t.slice();return e[3]=1,e}function yw(t){const e=Nn.lchuv(Su.xyz(t));return e[3]=t[3],e}function Ete(t){const e=Nn.rgb(yA.xyz(t));return e[3]=t[3],e}function Dy(t){if(t==="none")return Iy;if(yc.hasOwnProperty(t))return yc[t];if(mp>=wte){let n=0;for(const i in yc)n++&3||(delete yc[i],--mp)}const e=vte(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 vA(e),yc[t]=e,++mp,e}function Tu(t){return Array.isArray(t)?t:Dy(t)}function vA(t){return t[0]=nn(t[0]+.5|0,0,255),t[1]=nn(t[1]+.5|0,0,255),t[2]=nn(t[2]+.5|0,0,255),t[3]=nn(t[3],0,1),t}function Ry(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 ho=typeof navigator<"u"&&typeof navigator.userAgent<"u"?navigator.userAgent.toLowerCase():"",Cte=ho.includes("firefox"),Ste=ho.includes("safari")&&!ho.includes("chrom");Ste&&(ho.includes("version/15.4")||/cpu (os|iphone os) 15_4 like mac os x/.test(ho));const Tte=ho.includes("webkit")&&!ho.includes("edge"),bA=ho.includes("macintosh"),wA=typeof devicePixelRatio<"u"?devicePixelRatio:1,xA=typeof WorkerGlobalScope<"u"&&typeof OffscreenCanvas<"u"&&self instanceof WorkerGlobalScope,EA=typeof Image<"u"&&Image.prototype.decode,CA=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 dn(t,e,n,i){let s;return n&&n.length?s=n.shift():xA?s=new OffscreenCanvas(t||300,e||300):s=document.createElement("canvas"),t&&(s.width=t),e&&(s.height=e),s.getContext("2d",i)}let _p;function Vh(){return _p||(_p=dn(1,1)),_p}function zl(t){const e=t.canvas;e.width=1,e.height=1,t.clearRect(0,0,1,1)}function vw(t,e){const n=e.parentNode;n&&n.replaceChild(t,e)}function Ate(t){for(;t.lastChild;)t.lastChild.remove()}function kte(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 Mte(t,e,n){const i=t;let s=!0,r=!1,o=!1;const a=[Oh(i,et.LOAD,function(){o=!0,r||e()})];return i.src&&EA?(r=!0,i.decode().then(function(){s&&e()}).catch(function(l){s&&(o?e():n())})):a.push(Oh(i,et.ERROR,n)),function(){s=!1,a.forEach(Rt)}}function Pte(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)})}function Ite(t,e){return e&&(t.src=e),t.src&&EA?new Promise((n,i)=>t.decode().then(()=>n(t)).catch(s=>t.complete&&t.width?n(t):i(s))):Pte(t)}class Dte{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=yp(e,n,i);return s in this.cache_?this.cache_[s]:null}getPattern(e,n,i){const s=yp(e,n,i);return s in this.patternCache_?this.patternCache_[s]:null}set(e,n,i,s,r){const o=yp(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]=Vh().createPattern(s.getImage(1),"repeat")}):this.patternCache_[o]=Vh().createPattern(s.getImage(1),"repeat")),a||++this.cacheSize_}setSize(e){this.maxCacheSize_=e,this.expire()}}function yp(t,e,n){const i=n?Tu(n):"null";return e+":"+t+":"+i}const Is=new Dte;let vc=null;class Rte 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){vc||(vc=dn(1,1,void 0,{willReadFrequently:!0})),vc.drawImage(this.image_,0,0);try{vc.getImageData(0,0,1,1),this.tainted_=!1}catch{vc=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=dn(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&&Ite(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=dn(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=bte(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 Ly(t,e,n,i,s,r){let o=e===void 0?void 0:Is.get(e,n,s);return o||(o=new Rte(t,t&&"src"in t?t.src||void 0:e,n,i,s),Is.set(e,n,s,o,r)),r&&o&&!Is.getPattern(e,n,s)&&Is.set(e,n,s,o,r),o}function Ds(t){return t?Array.isArray(t)?Ry(t):typeof t=="object"&&"src"in t?Lte(t):t:null}function Lte(t){if(!t.offset||!t.size)return Is.getPattern(t.src,"anonymous",t.color);const e=t.src+":"+t.offset,n=Is.getPattern(e,void 0,t.color);if(n)return n;const i=Is.get(t.src,"anonymous",null);if(i.getImageState()!==ot.LOADED)return null;const s=dn(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]),Ly(s.canvas,e,void 0,ot.LOADED,t.color,!0),Is.getPattern(e,void 0,t.color)}const Xd="ol-hidden",Gf="ol-unselectable",Oy="ol-control",bw="ol-collapsed",Ote=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"),ww=["style","variant","weight","size","lineHeight","family"],SA=function(t){const e=t.match(Ote);if(!e)return null;const n={lineHeight:"normal",size:"1.2em",style:"normal",weight:"normal",variant:"normal"};for(let i=0,s=ww.length;iMath.max(s,Wh(t,r)),0);return n[e]=i,i}function Lte(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=Wh(h,d);n.push(f),o+=f;const p=Rte(h);i.push(p),l=Math.max(l,p)}return{width:r,height:a,widths:n,heights:i,lineWidths:s}}function Ote(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]),$te(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 $te(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 Xf({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=dn(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()}}class Hl{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 Hl({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}}class pr{constructor(e){e=e||{},this.geometry_=null,this.geometryFunction_=Ew,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 pr({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_=Ew,this.geometry_=e}setZIndex(e){this.zIndex_=e}}function Nte(t){let e;if(typeof t=="function")e=t;else{let n;Array.isArray(t)?n=t:(pt(typeof t.getZIndex=="function","Expected an `Style` or an array of `Style`"),n=[t]),e=function(){return n}}return e}let vp=null;function kA(t,e){if(!vp){const n=new Zl({color:"rgba(255,255,255,0.4)"}),i=new Hl({color:"#3399CC",width:1.25});vp=[new pr({image:new Zu({fill:n,stroke:i,radius:5}),fill:n,stroke:i})]}return vp}function Ew(t){return t.getGeometry()}function Cw(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 Uf{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;pt(!(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)),pt(a!==void 0&&a.length>0,"A defined and non-empty `src` or `image` must be provided"),pt(!((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?Tu(e.color):null,this.iconImage_=Ly(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(Cw(f[0],f[1],e.width,e.height))};this.listenImageChange(h);return}}c!==void 0&&this.setScale(Cw(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 Fte="#333";class $y{constructor(e){e=e||{},this.font_=e.font,this.rotation_=e.rotation,this.rotateWithView_=e.rotateWithView,this.scale_=e.scale,this.scaleArray_=wi(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 Zl({color:Fte}),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 $y({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_=wi(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 xa=0;const ti=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"},Wte={[pe.Get]:Ge(st(1,1/0),Sw),[pe.Var]:Ge(st(1,1),Yte),[pe.Has]:Ge(st(1,1/0),Sw),[pe.Id]:Ge(Hte,Va),[pe.Concat]:Ge(st(2,1/0),mt(pi)),[pe.GeometryType]:Ge(jte,Va),[pe.LineMetric]:Ge(Va),[pe.Resolution]:Ge(Va),[pe.Zoom]:Ge(Va),[pe.Time]:Ge(Va),[pe.Any]:Ge(st(2,1/0),mt(ti)),[pe.All]:Ge(st(2,1/0),mt(ti)),[pe.Not]:Ge(st(1,1),mt(ti)),[pe.Equal]:Ge(st(2,2),mt(qd)),[pe.NotEqual]:Ge(st(2,2),mt(qd)),[pe.GreaterThan]:Ge(st(2,2),mt(dt)),[pe.GreaterThanOrEqualTo]:Ge(st(2,2),mt(dt)),[pe.LessThan]:Ge(st(2,2),mt(dt)),[pe.LessThanOrEqualTo]:Ge(st(2,2),mt(dt)),[pe.Multiply]:Ge(st(2,1/0),Tw),[pe.Coalesce]:Ge(st(2,1/0),Tw),[pe.Divide]:Ge(st(2,2),mt(dt)),[pe.Add]:Ge(st(2,1/0),mt(dt)),[pe.Subtract]:Ge(st(2,2),mt(dt)),[pe.Clamp]:Ge(st(3,3),mt(dt)),[pe.Mod]:Ge(st(2,2),mt(dt)),[pe.Pow]:Ge(st(2,2),mt(dt)),[pe.Abs]:Ge(st(1,1),mt(dt)),[pe.Floor]:Ge(st(1,1),mt(dt)),[pe.Ceil]:Ge(st(1,1),mt(dt)),[pe.Round]:Ge(st(1,1),mt(dt)),[pe.Sin]:Ge(st(1,1),mt(dt)),[pe.Cos]:Ge(st(1,1),mt(dt)),[pe.Atan]:Ge(st(1,2),mt(dt)),[pe.Sqrt]:Ge(st(1,1),mt(dt)),[pe.Match]:Ge(st(4,1/0),Aw,Ute),[pe.Between]:Ge(st(3,3),mt(dt)),[pe.Interpolate]:Ge(st(6,1/0),Aw,Gte),[pe.Case]:Ge(st(3,1/0),Kte,Xte),[pe.In]:Ge(st(2,2),qte),[pe.Number]:Ge(st(1,1/0),mt(qd)),[pe.String]:Ge(st(1,1/0),mt(qd)),[pe.Array]:Ge(st(1,1/0),mt(dt)),[pe.Color]:Ge(st(1,4),mt(dt)),[pe.Band]:Ge(st(1,3),mt(dt)),[pe.Palette]:Ge(st(2,2),Zte),[pe.ToString]:Ge(st(1,1),mt(ti|dt|pi|os))};function Sw(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 Tw(t,e,n){const i=t.length-1,s=new Array(i);for(let r=0;ri.featureId;case pe.GeometryType:return i=>i.geometryType;case pe.Concat:{const i=t.args.map(s=>ms(s));return s=>"".concat(...i.map(r=>r(s).toString()))}case pe.Resolution:return i=>i.resolution;case pe.Any:case pe.All:case pe.Between:case pe.In:case pe.Not:return nne(t);case pe.Equal:case pe.NotEqual:case pe.LessThan:case pe.LessThanOrEqualTo:case pe.GreaterThan:case pe.GreaterThanOrEqualTo:return tne(t);case pe.Multiply:case pe.Divide:case pe.Add:case pe.Subtract:case pe.Clamp:case pe.Mod:case pe.Pow:case pe.Abs:case pe.Floor:case pe.Ceil:case pe.Round:case pe.Sin:case pe.Cos:case pe.Atan:case pe.Sqrt:return ine(t);case pe.Case:return sne(t);case pe.Match:return rne(t);case pe.Interpolate:return one(t);case pe.ToString:return ane(t);default:throw new Error(`Unsupported operator ${n}`)}}function Qte(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 pe.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 pe.NotEqual:return r=>i(r)!==s(r);case pe.LessThan:return r=>i(r)i(r)<=s(r);case pe.GreaterThan:return r=>i(r)>s(r);case pe.GreaterThanOrEqualTo:return r=>i(r)>=s(r);default:throw new Error(`Unsupported comparison operator ${n}`)}}function nne(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 pe.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 ine(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 pe.Add:return r=>{let o=0;for(let a=0;as[0](r)-s[1](r);case pe.Clamp:return r=>{const o=s[0](r),a=s[1](r);if(ol?l:o};case pe.Mod:return r=>s[0](r)%s[1](r);case pe.Pow:return r=>Math.pow(s[0](r),s[1](r));case pe.Abs:return r=>Math.abs(s[0](r));case pe.Floor:return r=>Math.floor(s[0](r));case pe.Ceil:return r=>Math.ceil(s[0](r));case pe.Round:return r=>Math.round(s[0](r));case pe.Sin:return r=>Math.sin(s[0](r));case pe.Cos:return r=>Math.cos(s[0](r));case pe.Atan:return i===2?r=>Math.atan2(s[0](r),s[1](r)):r=>Math.atan(s[0](r));case pe.Sqrt:return r=>Math.sqrt(s[0](r));default:throw new Error(`Unsupported numeric operator ${n}`)}}function sne(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?lne(r,o,a,l,u,d):Dc(r,o,a,l,u,d);a=u,l=d}return l}}function ane(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?Ry(o):o.toString()};default:throw new Error(`Unsupported convert operator ${n}`)}}function Dc(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 lne(t,e,n,i,s,r){if(s-n===0)return i;const a=yw(i),l=yw(r);let c=l[2]-a[2];c>180?c-=360:c<-180&&(c+=360);const u=[Dc(t,e,n,a[0],s,l[0]),Dc(t,e,n,a[1],s,l[1]),a[2]+Dc(t,e,n,0,s,c),Dc(t,e,n,i[3],s,r[3])];return vA(vte(u))}function cne(t){return!0}function une(t){const e=MA(),n=dne(t,e),i=IA();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=PA(s.getGeometry())),n(i)}}function kw(t){const e=MA(),n=t.length,i=new Array(n);for(let o=0;onull;i=Fy(t,e+"fill-color",n)}if(!i)return null;const s=new Zl;return function(r){const o=i(r);return o===Iy?null:(s.setColor(o),s)}}function Du(t,e,n){const i=yi(t,e+"stroke-width",n),s=Fy(t,e+"stroke-color",n);if(!i&&!s)return null;const r=sr(t,e+"stroke-line-cap",n),o=sr(t,e+"stroke-line-join",n),a=DA(t,e+"stroke-line-dash",n),l=yi(t,e+"stroke-line-dash-offset",n),c=yi(t,e+"stroke-miter-limit",n),u=new Hl;return function(d){if(s){const h=s(d);if(h===Iy)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 hne(t,e){const n="text-",i=sr(t,n+"value",e);if(!i)return null;const s=Iu(t,n,e),r=Iu(t,n+"background-",e),o=Du(t,n,e),a=Du(t,n+"background-",e),l=sr(t,n+"font",e),c=yi(t,n+"max-angle",e),u=yi(t,n+"offset-x",e),d=yi(t,n+"offset-y",e),h=Ru(t,n+"overflow",e),f=sr(t,n+"placement",e),p=yi(t,n+"repeat",e),m=Zf(t,n+"scale",e),y=Ru(t,n+"rotate-with-view",e),v=yi(t,n+"rotation",e),b=sr(t,n+"align",e),x=sr(t,n+"justify",e),E=sr(t,n+"baseline",e),w=DA(t,n+"padding",e),S=Jf(t,n+"declutter-mode"),T=new $y({declutterMode:S});return function(A){if(T.setText(i(A)),s&&T.setFill(s(A)),r&&T.setBackgroundFill(r(A)),o&&T.setStroke(o(A)),a&&T.setBackgroundStroke(a(A)),l&&T.setFont(l(A)),c&&T.setMaxAngle(c(A)),u&&T.setOffsetX(u(A)),d&&T.setOffsetY(d(A)),h&&T.setOverflow(h(A)),f){const k=f(A);if(k!=="point"&&k!=="line")throw new Error("Expected point or line for text-placement");T.setPlacement(k)}if(p&&T.setRepeat(p(A)),m&&T.setScale(m(A)),y&&T.setRotateWithView(y(A)),v&&T.setRotation(v(A)),b){const k=b(A);if(k!=="left"&&k!=="center"&&k!=="right"&&k!=="end"&&k!=="start")throw new Error("Expected left, right, center, start, or end for text-align");T.setTextAlign(k)}if(x){const k=x(A);if(k!=="left"&&k!=="right"&&k!=="center")throw new Error("Expected left, right, or center for text-justify");T.setJustify(k)}if(E){const k=E(A);if(k!=="bottom"&&k!=="top"&&k!=="middle"&&k!=="alphabetic"&&k!=="hanging")throw new Error("Expected bottom, top, middle, alphabetic, or hanging for text-baseline");T.setTextBaseline(k)}return w&&T.setPadding(w(A)),T}}function fne(t,e){return"icon-src"in t?gne(t,e):"shape-points"in t?pne(t,e):"circle-radius"in t?mne(t,e):null}function gne(t,e){const n="icon-",i=n+"src",s=RA(t[i],i),r=Yh(t,n+"anchor",e),o=Zf(t,n+"scale",e),a=yi(t,n+"opacity",e),l=Yh(t,n+"displacement",e),c=yi(t,n+"rotation",e),u=Ru(t,n+"rotate-with-view",e),d=Pw(t,n+"anchor-origin"),h=Iw(t,n+"anchor-x-units"),f=Iw(t,n+"anchor-y-units"),p=wne(t,n+"color"),m=vne(t,n+"cross-origin"),y=bne(t,n+"offset"),v=Pw(t,n+"offset-origin"),b=Hh(t,n+"width"),x=Hh(t,n+"height"),E=yne(t,n+"size"),w=Jf(t,n+"declutter-mode"),S=new qf({src:s,anchorOrigin:d,anchorXUnits:h,anchorYUnits:f,color:p,crossOrigin:m,offset:y,offsetOrigin:v,height:x,width:b,size:E,declutterMode:w});return function(T){return a&&S.setOpacity(a(T)),l&&S.setDisplacement(l(T)),c&&S.setRotation(c(T)),u&&S.setRotateWithView(u(T)),o&&S.setScale(o(T)),r&&S.setAnchor(r(T)),S}}function pne(t,e){const n="shape-",i=n+"points",s=n+"radius",r=Pm(t[i],i),o=Pm(t[s],s),a=Iu(t,n,e),l=Du(t,n,e),c=Zf(t,n+"scale",e),u=Yh(t,n+"displacement",e),d=yi(t,n+"rotation",e),h=Ru(t,n+"rotate-with-view",e),f=Hh(t,n+"radius2"),p=Hh(t,n+"angle"),m=Jf(t,n+"declutter-mode"),y=new Xf({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 mne(t,e){const n="circle-",i=Iu(t,n,e),s=Du(t,n,e),r=yi(t,n+"radius",e),o=Zf(t,n+"scale",e),a=Yh(t,n+"displacement",e),l=yi(t,n+"rotation",e),c=Ru(t,n+"rotate-with-view",e),u=Jf(t,n+"declutter-mode"),d=new Zu({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 yi(t,e,n){if(!(e in t))return;const i=Cr(t[e],dt,n);return function(s){return Pm(i(s),e)}}function sr(t,e,n){if(!(e in t))return null;const i=Cr(t[e],pi,n);return function(s){return RA(i(s),e)}}function _ne(t,e,n){const i=sr(t,e+"pattern-src",n),s=Mw(t,e+"pattern-offset",n),r=Mw(t,e+"pattern-size",n),o=Fy(t,e+"color",n);return function(a){return{src:i(a),offset:s&&s(a),size:r&&r(a),color:o&&o(a)}}}function Ru(t,e,n){if(!(e in t))return null;const i=Cr(t[e],ti,n);return function(s){const r=i(s);if(typeof r!="boolean")throw new Error(`Expected a boolean for ${e}`);return r}}function Fy(t,e,n){if(!(e in t))return null;const i=Cr(t[e],os,n);return function(s){return LA(i(s),e)}}function DA(t,e,n){if(!(e in t))return null;const i=Cr(t[e],ga,n);return function(s){return Ju(i(s),e)}}function Yh(t,e,n){if(!(e in t))return null;const i=Cr(t[e],ga,n);return function(s){const r=Ju(i(s),e);if(r.length!==2)throw new Error(`Expected two numbers for ${e}`);return r}}function Mw(t,e,n){if(!(e in t))return null;const i=Cr(t[e],ga,n);return function(s){return OA(i(s),e)}}function Zf(t,e,n){if(!(e in t))return null;const i=Cr(t[e],ga|dt,n);return function(s){return xne(i(s),e)}}function Hh(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 yne(t,e){const n=t[e];if(n!==void 0){if(typeof n=="number")return wi(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 vne(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 Pw(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 Iw(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 bne(t,e){const n=t[e];if(n!==void 0)return Ju(n,e)}function Jf(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 wne(t,e){const n=t[e];if(n!==void 0)return LA(n,e)}function Ju(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 OA(t,e){const n=Ju(t,e);if(n.length!==2)throw new Error(`Expected an array of two numbers for ${e}`);return n}function xne(t,e){return typeof t=="number"?t:OA(t,e)}const Dw={RENDER_ORDER:"renderOrder"};class $A extends Kf{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(Dw.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 _A(9)),this.getRenderer().renderDeclutter(e,n)}setRenderOrder(e){this.set(Dw.RENDER_ORDER,e)}setStyle(e){this.style_=e===void 0?kA:e;const n=Ene(e);this.styleFunction_=e===null?void 0:Nte(n),this.changed()}}function Ene(t){if(t===void 0)return kA;if(!t)return null;if(typeof t=="function"||t instanceof pr)return t;if(!Array.isArray(t))return kw([t]);if(t.length===0)return[];const e=t.length,n=t[0];if(n instanceof pr){const s=new Array(e);for(let r=0;r=0;--w){const S=m[w],T=S.layer;if(T.hasRenderer()&&My(S,u)&&a.call(l,T)){const A=T.getRenderer(),k=T.getSource();if(A&&k){const P=k.getWrapX()?f:e,B=d.bind(null,S.managed);b[0]=P[0]+p[E][0],b[1]=P[1]+p[E][1],c=A.forEachFeatureAtCoordinate(b,n,i,B,v)}if(c)return c}}if(v.length===0)return;const x=1/v.length;return v.forEach((E,w)=>E.distanceSq+=w*x),v.sort((E,w)=>E.distanceSq-w.distanceSq),v.some(E=>c=E.callback(E.feature,E.layer,E.geometry)),c}hasFeatureAtCoordinate(e,n,i,s,r,o){return this.forEachFeatureAtCoordinate(e,n,i,s,vu,this,r,o)!==void 0}getMap(){return this.map_}renderFrame(e){gt()}scheduleExpireIconCache(e){Is.canExpireCache()&&e.postRenderFunctions.push(Sne)}}function Sne(t,e){Is.expire()}class NA extends Er{constructor(e,n,i,s){super(e),this.inversePixelTransform=n,this.frameState=i,this.context=s}}class Tne extends Cne{constructor(e){super(e),this.fontChangeListenerKey_=ht(er,Nl.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=Gf+" 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 NA(e,void 0,n);i.dispatchEvent(s)}}disposeInternal(){Rt(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(zi.PRECOMPOSE,e);const n=e.layerStatesArray.sort((a,l)=>a.zIndex-l.zIndex);n.some(a=>a.layer instanceof $A&&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 Hr extends Er{constructor(e,n){super(e),this.layer=n}}const bp={LAYERS:"layers"};class Jl extends GT{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(bp.LAYERS,this.handleLayersChanged_),i?Array.isArray(i)?i=new Ps(i.slice(),{unique:!0}):pt(typeof i.getArray=="function","Expected `layers` to be an array or a `Collection`"):i=new Ps(void 0,{unique:!0}),this.setLayers(i)}handleLayerChange_(){this.changed()}handleLayersChanged_(){this.layersListenerKeys_.forEach(Rt),this.layersListenerKeys_.length=0;const e=this.getLayers();this.layersListenerKeys_.push(ht(e,fi.ADD,this.handleLayersAdd_,this),ht(e,fi.REMOVE,this.handleLayersRemove_,this));for(const i in this.listenerKeys_)this.listenerKeys_[i].forEach(Rt);Gu(this.listenerKeys_);const n=e.getArray();for(let i=0,s=n.length;i{this.clickTimeoutId_=void 0;const i=new Fr(Jt.SINGLECLICK,this.map_,e);this.dispatchEvent(i)},250)}updateActivePointers_(e){const n=e,i=n.pointerId;if(n.type==Jt.POINTERUP||n.type==Jt.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==Jt.POINTERDOWN||n.type==Jt.POINTERMOVE)&&(this.trackedTouches_[i]=n);this.activePointers_=Object.values(this.trackedTouches_)}handlePointerUp_(e){this.updateActivePointers_(e);const n=new Fr(Jt.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(Rt),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 Fr(Jt.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(ht(i,Jt.POINTERMOVE,this.handlePointerMove_,this),ht(i,Jt.POINTERUP,this.handlePointerUp_,this),ht(this.element_,Jt.POINTERCANCEL,this.handlePointerUp_,this)),this.element_.getRootNode&&this.element_.getRootNode()!==i&&this.dragListenerKeys_.push(ht(this.element_.getRootNode(),Jt.POINTERUP,this.handlePointerUp_,this))}}handlePointerMove_(e){if(this.isMoving_(e)){this.updateActivePointers_(e),this.dragging_=!0;const n=new Fr(Jt.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 Fr(Jt.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_&&(Rt(this.relayedListenerKey_),this.relayedListenerKey_=null),this.element_.removeEventListener(et.TOUCHMOVE,this.boundHandleTouchMove_),this.pointerdownListenerKey_&&(Rt(this.pointerdownListenerKey_),this.pointerdownListenerKey_=null),this.dragListenerKeys_.forEach(Rt),this.dragListenerKeys_.length=0,this.element_=null,super.disposeInternal()}}const Br={POSTRENDER:"postrender",MOVESTART:"movestart",MOVEEND:"moveend",LOADSTART:"loadstart",LOADEND:"loadend"},Vn={LAYERGROUP:"layergroup",SIZE:"size",TARGET:"target",VIEW:"view"},jh=1/0;class kne{constructor(e,n){this.priorityFunction_=e,this.keyFunction_=n,this.elements_=[],this.priorities_=[],this.queuedElements_={}}clear(){this.elements_.length=0,this.priorities_.length=0,Gu(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){pt(!(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!=jh?(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 Pne(t,e,n,i,s){if(!t||!(n in t.wantedTiles)||!t.wantedTiles[n][e.getKey()])return jh;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 By extends zs{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=>eee(()=>s))),i=n.length>0;if(this.renderedVisible_!=i&&(this.element.style.display=i?"":"none",this.renderedVisible_=i),!Eo(n,this.renderedAttributions_)){Ete(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(Xd);!r&&i===0?this.element.classList.add(Xd):r&&i!==0&&this.element.classList.remove(Xd)}this.label_.style.transform=s}this.rotation_=i}}class Rne extends By{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+" "+Gf+" "+Oy,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)}}}function Lne(t){t=t||{};const e=new Ps;return(t.zoom!==void 0?t.zoom:!0)&&e.push(new Rne(t.zoomOptions)),(t.rotate!==void 0?t.rotate:!0)&&e.push(new Dne(t.rotateOptions)),(t.attribution!==void 0?t.attribution:!0)&&e.push(new Ine(t.attributionOptions)),e}const Rw={ACTIVE:"active"};class Qu extends zs{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(Rw.ACTIVE)}getMap(){return this.map_}handleEvent(e){return!0}setActive(e){this.set(Rw.ACTIVE,e)}setMap(e){this.map_=e}}function One(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:Oee,center:t.getConstrainedCenter(s)})}}function Vy(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 $ne extends Qu{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==Jt.DBLCLICK){const i=e.originalEvent,s=e.map,r=e.coordinate,o=i.shiftKey?-this.delta_:this.delta_,a=s.getView();Vy(a,o,r,this.duration_),i.preventDefault(),n=!0}return!n}}class ed extends Qu{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==Jt.POINTERDRAG)this.handleDragEvent(e),e.originalEvent.preventDefault();else if(e.type==Jt.POINTERUP){const i=this.handleUpEvent(e);this.handlingDownUpSequence=i&&this.targetPointers.length>0}}else if(e.type==Jt.POINTERDOWN){const i=this.handleDownEvent(e);this.handlingDownUpSequence=i,n=this.stopDown(i)}else e.type==Jt.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 zy(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}}class Hne extends ed{constructor(e){e=e||{},super({stopDown:Nf}),this.condition_=e.condition?e.condition:Nne,this.lastAngle_=void 0,this.duration_=e.duration!==void 0?e.duration:250}handleDragEvent(e){if(!wp(e))return;const n=e.map,i=n.getView();if(i.getConstraints().rotation===xy)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 wp(e)?(e.map.getView().endInteraction(this.duration_),!1):!0}handleDownEvent(e){return wp(e)&&BA(e)&&this.condition_(e)?(e.map.getView().beginInteraction(),this.lastAngle_=void 0,!0):!1}}class jne extends Of{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 Cu([s])}getGeometry(){return this.geometry_}}const za={BOXSTART:"boxstart",BOXDRAG:"boxdrag",BOXEND:"boxend",BOXCANCEL:"boxcancel"};class bc extends Er{constructor(e,n,i){super(e),this.coordinate=n,this.mapBrowserEvent=i}}class Kne extends ed{constructor(e){super(),this.on,this.once,this.un,e=e??{},this.box_=new jne(e.className||"ol-dragbox"),this.minArea_=e.minArea??64,e.onBoxEnd&&(this.onBoxEnd=e.onBoxEnd),this.startPixel_=null,this.condition_=e.condition??BA,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 bc(za.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 bc(n?za.BOXEND:za.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 bc(za.BOXSTART,e.coordinate,e)),!0):!1}onBoxEnd(e){}setActive(e){e||(this.box_.setMap(null),this.startPixel_&&(this.dispatchEvent(new bc(za.BOXCANCEL,this.startPixel_,null)),this.startPixel_=null)),super.setActive(e)}setMap(e){this.getMap()&&(this.box_.setMap(null),this.startPixel_&&(this.dispatchEvent(new bc(za.BOXCANCEL,this.startPixel_,null)),this.startPixel_=null)),super.setMap(e)}}class Une extends Kne{constructor(e){e=e||{};const n=e.condition?e.condition:zne;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 Bo={LEFT:"ArrowLeft",UP:"ArrowUp",RIGHT:"ArrowRight",DOWN:"ArrowDown"};class Gne extends Qu{constructor(e){super(),e=e||{},this.defaultCondition_=function(n){return VA(n)&&zA(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==Bo.DOWN||s==Bo.LEFT||s==Bo.RIGHT||s==Bo.UP)){const o=e.map.getView(),a=o.getResolution()*this.pixelDelta_;let l=0,c=0;s==Bo.DOWN?c=-a:s==Bo.LEFT?l=-a:s==Bo.RIGHT?l=a:c=a;const u=[l,c];my(u,o.getRotation()),One(o,u,this.duration_),i.preventDefault(),n=!0}}return!n}}class Xne extends Qu{constructor(e){super(),e=e||{},this.condition_=e.condition?e.condition:function(n){return!Vne(n)&&zA(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();Vy(a,o,void 0,this.duration_),i.preventDefault(),n=!0}}return!n}}class qne{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 Zne extends Qu{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:Bne;this.condition_=e.onFocusOnly?Dm(FA,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,bte&&s.deltaMode===WheelEvent.DOM_DELTA_PIXEL&&(r/=wA),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=-nn(this.totalDelta_,-this.maxDelta_*this.deltaPerZoom_,this.maxDelta_*this.deltaPerZoom_)/this.deltaPerZoom_;(n.getConstrainResolution()||this.constrainResolution_)&&(i=i?i>0?1:-1:0),Vy(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)}}class Jne extends ed{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!==xy&&(this.anchor_=o.getCoordinateFromPixelInternal(o.getEventPixel(zy(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 Qne extends ed{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(zy(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}}function eie(t){t=t||{};const e=new Ps,n=new qne(-.005,.05,100);return(t.altShiftDragRotate!==void 0?t.altShiftDragRotate:!0)&&e.push(new Hne),(t.doubleClickZoom!==void 0?t.doubleClickZoom:!0)&&e.push(new $ne({delta:t.zoomDelta,duration:t.zoomDuration})),(t.dragPan!==void 0?t.dragPan:!0)&&e.push(new Yne({onFocusOnly:t.onFocusOnly,kinetic:n})),(t.pinchRotate!==void 0?t.pinchRotate:!0)&&e.push(new Jne),(t.pinchZoom!==void 0?t.pinchZoom:!0)&&e.push(new Qne({duration:t.zoomDuration})),(t.keyboard!==void 0?t.keyboard:!0)&&(e.push(new Gne),e.push(new Xne({delta:t.zoomDelta,duration:t.zoomDuration}))),(t.mouseWheelZoom!==void 0?t.mouseWheelZoom:!0)&&e.push(new Zne({onFocusOnly:t.onFocusOnly,duration:t.zoomDuration})),(t.shiftDragZoom!==void 0?t.shiftDragZoom:!0)&&e.push(new Une({duration:t.zoomDuration})),e}function WA(t){if(t instanceof Kf){t.setMapInternal(null);return}t instanceof Jl&&t.getLayers().forEach(WA)}function YA(t,e){if(t instanceof Kf){t.setMapInternal(e);return}if(t instanceof Jl){const n=t.getLayers().getArray();for(let i=0,s=n.length;ithis.updateSize()),this.controls=n.controls||Lne(),this.interactions=n.interactions||eie({onFocusOnly:!0}),this.overlays_=n.overlays,this.overlayIdIndex_={},this.renderer_=null,this.postRenderFunctions_=[],this.tileQueue_=new Mne(this.getTilePriority.bind(this),this.handleTileChange_.bind(this)),this.addChangeListener(Vn.LAYERGROUP,this.handleLayerGroupChanged_),this.addChangeListener(Vn.VIEW,this.handleViewChanged_),this.addChangeListener(Vn.SIZE,this.handleSizeChanged_),this.addChangeListener(Vn.TARGET,this.handleTargetChanged_),this.setProperties(n.values);const i=this;e.view&&!(e.view instanceof Ts)&&e.view.then(function(s){i.setView(new Ts(s))}),this.controls.addEventListener(fi.ADD,s=>{s.element.setMap(this)}),this.controls.addEventListener(fi.REMOVE,s=>{s.element.setMap(null)}),this.interactions.addEventListener(fi.ADD,s=>{s.element.setMap(this)}),this.interactions.addEventListener(fi.REMOVE,s=>{s.element.setMap(null)}),this.overlays_.addEventListener(fi.ADD,s=>{this.addOverlayInternal_(s.element)}),this.overlays_.addEventListener(fi.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){YA(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:vu,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 Jl?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:vu,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(Vn.TARGET)}getTargetElement(){return this.targetElement_}getCoordinateFromPixel(e){return Tm(this.getCoordinateFromPixelInternal(e),this.getView().getProjection())}getCoordinateFromPixelInternal(e){const n=this.frameState_;return n?On(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(Vn.LAYERGROUP)}setLayers(e){const n=this.getLayerGroup();if(e instanceof Ps){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[Wn.ANIMATING]||o[Wn.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 Hr("removelayer",n)),this.set(Vn.LAYERGROUP,e)}setSize(e){this.set(Vn.SIZE,e)}setTarget(e){this.set(Vn.TARGET,e)}setView(e){if(!e||e instanceof Ts){this.set(Vn.VIEW,e);return}this.set(Vn.VIEW,new Ts);const n=this;e.then(function(i){n.setView(new Ts(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)],!pw(n)&&(e.offsetWidth||e.offsetHeight||e.getClientRects().length)&&iA("No map visible because the map container's width or height are 0."))}const i=this.getSize();n&&(!i||!Eo(n,i))&&(this.setSize(n),this.updateViewportSize_(n))}updateViewportSize_(e){const n=this.getView();n&&n.setViewportSize(e)}};function nie(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 Jl({layers:t.layers});n[Vn.LAYERGROUP]=i,n[Vn.TARGET]=t.target,n[Vn.VIEW]=t.view instanceof Ts?t.view:new Ts;let s;t.controls!==void 0&&(Array.isArray(t.controls)?s=new Ps(t.controls.slice()):(pt(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 Ps(t.interactions.slice()):(pt(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 Ps(t.overlays.slice()):(pt(typeof t.overlays.getArray=="function","Expected `overlays` to be an array or an `ol/Collection.js`"),o=t.overlays):o=new Ps,{controls:s,interactions:r,keyboardEventTarget:e,overlays:o,values:n}}class Wy 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(){gt()}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:lA(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 HA extends Wy{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_=iie(),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_=Ste(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 iie(){const t=dn(1,1);return t.fillStyle="rgba(0,0,0,0)",t.fillRect(0,0,1,1),t.canvas}const jA=.5,sie=10,Lw=.25;class KA{constructor(e,n,i,s,r,o){this.sourceProj_=e,this.targetProj_=n;let a={};const l=Fh(this.targetProj_,this.sourceProj_);this.transformInv_=function(b){const x=b[0]+"/"+b[1];return a[x]||(a[x]=l(b)),a[x]},this.maxSourceExtent_=s,this.errorThresholdSquared_=r*r,this.triangles_=[],this.wrapsXInSource_=!1,this.canWrapXInSource_=this.sourceProj_.canWrapX()&&!!s&&!!this.sourceProj_.getExtent()&&yt(s)>=yt(this.sourceProj_.getExtent()),this.sourceWorldWidth_=this.sourceProj_.getExtent()?yt(this.sourceProj_.getExtent()):null,this.targetWorldWidth_=this.targetProj_.getExtent()?yt(this.targetProj_.getExtent()):null;const c=wa(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=sie+(o?Math.max(0,Math.ceil(Math.log2(wu(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(x,E,w){b=Math.min(b,x.source[0][0],x.source[1][0],x.source[2][0])}),this.triangles_.forEach(x=>{if(Math.max(x.source[0][0],x.source[1][0],x.source[2][0])-b>this.sourceWorldWidth_/2){const E=[[x.source[0][0],x.source[0][1]],[x.source[1][0],x.source[1][1]],[x.source[2][0],x.source[2][1]]];E[0][0]-b>this.sourceWorldWidth_/2&&(E[0][0]-=this.sourceWorldWidth_),E[1][0]-b>this.sourceWorldWidth_/2&&(E[1][0]-=this.sourceWorldWidth_),E[2][0]-b>this.sourceWorldWidth_/2&&(E[2][0]-=this.sourceWorldWidth_);const w=Math.min(E[0][0],E[1][0],E[2][0]);Math.max(E[0][0],E[1][0],E[2][0])-w.5&&d<1;let p=!1;if(c>0){if(this.targetProj_.isGlobal()&&this.targetWorldWidth_){const y=ew([e,n,i,s]);p=yt(y)/this.targetWorldWidth_>Lw||p}!f&&this.sourceProj_.isGlobal()&&d&&(p=d>Lw||p)}if(!p&&this.maxSourceExtent_&&isFinite(u[0])&&isFinite(u[1])&&isFinite(u[2])&&isFinite(u[3])&&!_i(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=(dl(r[0],h)+dl(a[0],h))/2-dl(v[0],h):b=(r[0]+a[0])/2-v[0];const x=(r[1]+a[1])/2-v[1];p=b*b+x*x>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],x=this.transformInv_(b);this.addQuad_(e,n,y,b,r,o,v,x,c-1),this.addQuad_(b,y,i,s,x,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],x=this.transformInv_(b);this.addQuad_(e,y,b,s,r,v,x,l,c-1),this.addQuad_(y,n,i,b,v,o,a,x,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;Zc(e,r[0]),Zc(e,r[1]),Zc(e,r[2])}),e}getTriangles(){return this.triangles_}}let xp;const mr=[];function Ow(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 Ep(t,e){return Math.abs(t[e*4]-210)>2||Math.abs(t[e*4+3]-.75*255)>2}function rie(){if(xp===void 0){const t=dn(6,6,mr);t.globalCompositeOperation="lighter",t.fillStyle="rgba(210, 0, 0, 0.75)",Ow(t,4,5,4,0),Ow(t,4,5,0,5);const e=t.getImageData(0,0,3,3).data;xp=Ep(e,0)||Ep(e,4)||Ep(e,8),zl(t),mr.push(t.canvas)}return xp}function $w(t,e,n,i){const s=oA(n,e,t);let r=nw(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||Vl(l,s)){const c=nw(t,r,s)/r;isFinite(c)&&c>0&&(r/=c)}return r}function UA(t,e,n,i){const s=fa(n);let r=$w(t,e,s,i);return(!isFinite(r)||r<=0)&&eA(n,function(o){return r=$w(t,e,o,i),isFinite(r)&&r>0}),r}function GA(t,e,n,i,s,r,o,a,l,c,u,d,h,f){const p=dn(Math.round(n*t),Math.round(n*e),mr);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,S,T){pee(y,w.extent)});let v;const b=n/i,x=(d?1:1+Math.pow(2,-24))/b;if(!h||l.length!==1||c!==0){if(v=dn(Math.round(yt(y)*b),Math.round(jn(y)*b),mr),d||(v.imageSmoothingEnabled=!1),s&&f){const w=(s[0]-y[0])*b,S=-(s[3]-y[3])*b,T=yt(s)*b,A=jn(s)*b;v.rect(w,S,T,A),v.clip()}l.forEach(function(w,S,T){if(w.image.width>0&&w.image.height>0){if(w.clipExtent){v.save();const Y=(w.clipExtent[0]-y[0])*b,ne=-(w.clipExtent[3]-y[3])*b,$=yt(w.clipExtent)*b,F=jn(w.clipExtent)*b;v.rect(d?Y:Math.round(Y),d?ne:Math.round(ne),d?$:Math.round(Y+$)-Math.round(Y),d?F:Math.round(ne+F)-Math.round(ne)),v.clip()}const A=(w.extent[0]-y[0])*b,k=-(w.extent[3]-y[3])*b,P=yt(w.extent)*b,B=jn(w.extent)*b;v.drawImage(w.image,c,c,w.image.width-2*c,w.image.height-2*c,d?A:Math.round(A),d?k:Math.round(k),d?P:Math.round(A+P)-Math.round(A),d?B:Math.round(k+B)-Math.round(k)),w.clipExtent&&v.restore()}})}const E=wa(o);return a.getTriangles().forEach(function(w,S,T){const A=w.source,k=w.target;let P=A[0][0],B=A[0][1],Y=A[1][0],ne=A[1][1],$=A[2][0],F=A[2][1];const D=m((k[0][0]-E[0])/r),z=m(-(k[0][1]-E[1])/r),X=m((k[1][0]-E[0])/r),Z=m(-(k[1][1]-E[1])/r),H=m((k[2][0]-E[0])/r),le=m(-(k[2][1]-E[1])/r),ie=P,te=B;P=0,B=0,Y-=ie,ne-=te,$-=ie,F-=te;const I=[[Y,ne,0,0,X-D],[$,F,0,0,H-D],[0,0,Y,ne,Z-z],[0,0,$,F,le-z]],ee=see(I);if(!ee)return;if(p.save(),p.beginPath(),rie()||!d){p.moveTo(X,Z);const L=4,ae=D-X,de=z-Z;for(let ve=0;ve{const P=n.getTileRangeForExtentAndZ(k,this.sourceZ_);for(let B=P.minX;B<=P.maxX;B++)for(let Y=P.minY;Y<=P.maxY;Y++){const ne=c(this.sourceZ_,B,Y,a);if(ne){const $=T*S;this.sourceTiles_.push({tile:ne,offset:$})}}++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_=GA(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=ht(n,et.CHANGE,r=>{const o=n.getState();(o==Fe.LOADED||o==Fe.ERROR||o==Fe.EMPTY)&&(Rt(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(Rt),this.sourcesListenerKeys_=null}release(){this.canvas_&&(zl(this.canvas_.getContext("2d")),mr.push(this.canvas_),this.canvas_=null),super.release()}}const Cp={TILELOADSTART:"tileloadstart",TILELOADEND:"tileloadend",TILELOADERROR:"tileloaderror"};class XA extends zs{constructor(e){super(),this.projection=Gi(e.projection),this.attributions_=Nw(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_=Nw(e),this.changed()}setState(e){this.state_=e,this.changed()}}function Nw(t){return t?typeof t=="function"?t:(Array.isArray(t)||(t=[t]),e=>t):null}class Yy{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 Wa(t,e,n,i,s){return s!==void 0?(s.minX=t,s.maxX=e,s.minY=n,s.maxY=i,s):new Yy(t,e,n,i)}function Kh(t,e,n,i){return i!==void 0?(i[0]=t,i[1]=e,i[2]=n,i):[t,e,n]}function oie(t,e,n){return t+"/"+e+"/"+n}function aie(t){return lie(t[0],t[1],t[2])}function lie(t,e,n){return(e<n||n>e.getMaxZoom())return!1;const r=e.getFullTileRange(n);return r?r.containsXY(i,s):!0}const Ya=[0,0,0],Dr=5;class qA{constructor(e){this.minZoom=e.minZoom!==void 0?e.minZoom:0,this.resolutions_=e.resolutions,pt(QQ(this.resolutions_,(s,r)=>r-s),"`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 Yy(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=Wa(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 Tie(t,e){t.getImage().src=e}class Aie extends Sie{constructor(e){e=e||{};const n=e.projection!==void 0?e.projection:"EPSG:3857",i=e.tileGrid!==void 0?e.tileGrid:hie({extent:Hy(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 kie='© OpenStreetMap contributors.';class Mie extends Aie{constructor(e){e=e||{};let n;e.attributions!==void 0?n=e.attributions:n=[kie];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 Zd={PRELOAD:"preload",USE_INTERIM_TILES_ON_ERROR:"useInterimTilesOnError"};class Pie extends Kf{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(Zd.PRELOAD)}setPreload(e){this.set(Zd.PRELOAD,e)}getUseInterimTilesOnError(){return this.get(Zd.USE_INTERIM_TILES_ON_ERROR)}setUseInterimTilesOnError(e){this.set(Zd.USE_INTERIM_TILES_ON_ERROR,e)}getData(e){return super.getData(e)}}const Iie=5;class Die extends Xu{constructor(e){super(),this.ready=!0,this.boundHandleImageChange_=this.handleImageChange_.bind(this),this.layer_=e,this.staleKeys_=new Array,this.maxStaleKeys=Iie}getStaleKeys(){return this.staleKeys_}prependStaleKey(e){this.staleKeys_.unshift(e),this.staleKeys_.length>this.maxStaleKeys&&(this.staleKeys_.length=this.maxStaleKeys)}getFeatures(e){return gt()}getData(e){return null}prepareFrame(e){return gt()}renderFrame(e,n){return gt()}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 QA{constructor(){this.instructions_=[],this.zIndex=0,this.offset_=0,this.context_=new Proxy(Vh(),{get:(e,n)=>{if(typeof Vh()[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 Of&&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 pt(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 pt(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){pt(!(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 Bie 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(wu(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=UA(n,u,l,c);if(!isFinite(d)||d<=0){this.state=Fe.EMPTY;return}const h=e.errorThreshold!==void 0?e.errorThreshold:jA;if(this.triangulation_=new KA(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]=nn(f[1],a[1],a[3]),f[3]=nn(f[3],a[1],a[3])):f=ls(f,a)),!wu(f))this.state=Fe.EMPTY;else{let p=0,m=0;n.canWrapX()&&(p=yt(i),m=Math.floor((f[0]-i[0])/p)),py(f.slice(),n,!0).forEach(v=>{const b=this.sourceTileGrid_.getTileRangeForExtentAndZ(v,this.sourceZ_),x=e.getTileFunction;for(let E=b.minX;E<=b.maxX;E++)for(let w=b.minY;w<=b.maxY;w++){const S=x(this.sourceZ_,E,w,this.pixelRatio_);if(S){const T=m*p;this.sourceTiles_.push({tile:S,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 x=Lie(m.getData());x?b=x:(n=!0,b=$ie(Uh(m.getData())));const E=[y[0]+2*v,y[1]+2*v],w=b instanceof Float32Array,S=E[0]*E[1],T=w?Float32Array:Uint8ClampedArray,A=new T(b.buffer),k=T.BYTES_PER_ELEMENT,P=k*A.length/S,B=A.byteLength/E[1],Y=Math.floor(B/k/E[0]),ne=S*Y;let $=A;if(A.length!==ne){$=new T(ne);let z=0,X=0;const Z=E[0]*Y;for(let H=0;H=0;--p){const m=[];for(let w=0,S=e.length;w{const i=n.getState();if(i!==Fe.IDLE&&i!==Fe.LOADING)return;e++;const s=ht(n,et.CHANGE,()=>{const r=n.getState();(r==Fe.LOADED||r==Fe.ERROR||r==Fe.EMPTY)&&(Rt(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(Rt),this.sourcesListenerKeys_=null}}function Sp(t,e,n,i){return`${t},${oie(e,n,i)}`}function Tp(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 Vie(t,e,n){const i=t[n];return i?i.delete(e):!1}function Bw(t,e){const n=t.layerStatesArray[t.layerIndex];n.extent&&(e=ls(e,Zr(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 zie extends ek{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 Yy(0,0,0,0),this.tempTileCoord_=Kh(0,0,0);const i=n.cacheSize!==void 0?n.cacheSize:512;this.tileCache_=new Fie(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=On(n.pixelToCoordinateTransform,e.slice()),r=i.getExtent();if(r&&!Vl(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=wi(l.getTileSize(u)),m=l.getResolution(u);let y;if(h instanceof HA||h instanceof Rm)y=h.getImage();else if(h instanceof Lm){if(y=Uh(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])),x=Math.round(c*a.getGutterForProjection(o.projection));return this.getImageData(y,v+x,b+x)}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 x=this.getTile(p,v,b,e);if(!x||!Tp(s,x,p))continue;const w=x.getKey();if(d[w]=!0,x.getState()===Fe.IDLE&&!e.tileQueue.isKeyQueued(w)){const S=Kh(p,v,b,this.tempTileCoord_);e.tileQueue.enqueue([x,u,c.getTileCoordCenter(S),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,A,k-1)},0),!(f in A))return this.container;const B=wt(this),Y=e.time;for(const H of A[f]){const le=H.getState();if((H instanceof Rm||H instanceof Bie)&&le===Fe.EMPTY)continue;const ie=H.tileCoord;if(le===Fe.LOADED&&H.getAlpha(B,Y)===1){H.endTransition(B);continue}if(this.renderComplete=!1,this.findStaleTile_(ie,A)){Vie(A,H,f),e.animate=!0;continue}if(this.findAltTiles_(h,ie,f+1,A))continue;const ee=h.getMinZoom();for(let ue=f-1;ue>=ee&&!this.findAltTiles_(h,ie,ue,A);--ue);}const ne=p/o*l/v,$=this.getRenderContext(e);br(this.tempTransform,b/2,x/2,ne,ne,0,-b/2,-x/2),i.extent&&this.clipUnrotated($,e,E),u.getInterpolate()||($.imageSmoothingEnabled=!1),this.preRender($,e);const F=Object.keys(A).map(Number);F.sort(hr);let D;const z=[],X=[];for(let H=F.length-1;H>=0;--H){const le=F[H],ie=u.getTilePixelSize(le,l,r),I=h.getResolution(le)/p,ee=ie[0]*I*ne,ue=ie[1]*I*ne,L=h.getTileCoordForCoordAndZ(wa(T),le),ae=h.getTileCoordExtent(L),de=On(this.tempTransform,[v*(ae[0]-T[0])/p,v*(T[3]-ae[3])/p]),ve=v*u.getGutterForProjection(r);for(const W of A[le]){if(W.getState()!==Fe.LOADED)continue;const fe=W.tileCoord,C=L[1]-fe[1],O=Math.round(de[0]-(C-1)*ee),K=L[2]-fe[2],U=Math.round(de[1]-(K-1)*ue),re=Math.round(de[0]-C*ee),j=Math.round(de[1]-K*ue),se=O-re,Q=U-j,ge=F.length===1;let _e=!1;D=[re,j,re+se,j,re+se,j+Q,re,j+Q];for(let ye=0,ke=z.length;ye{const ie=wt(u),te=le.wantedTiles[ie],I=te?Object.keys(te).length:0;this.updateCacheSize(I),this.tileCache_.expireCache()};return e.postRenderFunctions.push(Z),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=Uh(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 Wie extends Pie{constructor(e){super(e)}createRenderer(){return new zie(this,{cacheSize:this.getCacheSize()})}}class Jc extends zs{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 Jc(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_&&(Rt(this.geometryChangeKey_),this.geometryChangeKey_=null);const e=this.getGeometry();e&&(this.geometryChangeKey_=ht(e,et.CHANGE,this.handleGeometryChange_,this)),this.changed()}setGeometry(e){this.set(this.geometryName_,e)}setStyle(e){this.style_=e,this.styleFunction_=e?Yie(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 Yie(t){if(typeof t=="function")return t;let e;return Array.isArray(t)?e=t:(pt(typeof t.getZIndex=="function","Expected an `ol/style/Style` or an array of `ol/style/Style.js`"),e=[t]),function(){return e}}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([Ke.CUSTOM,l,u,e,i,Go,r]),this.hitDetectionInstructions.push([Ke.CUSTOM,l,u,e,s||i,Go,r]));break;case"Point":c=e.getFlatCoordinates(),this.coordinates.push(c[0],c[1]),u=this.coordinates.length,this.instructions.push([Ke.CUSTOM,l,u,e,i,void 0,r]),this.hitDetectionInstructions.push([Ke.CUSTOM,l,u,e,s||i,void 0,r]);break}this.endGeometry(n)}beginGeometry(e,n,i){this.beginGeometryInstruction1_=[Ke.BEGIN_GEOMETRY,n,0,e,i],this.instructions.push(this.beginGeometryInstruction1_),this.beginGeometryInstruction2_=[Ke.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=[Ke.SET_FILL_STYLE,n];return typeof n!="string"&&i.push(e.fillPatternScale),i}applyStroke(e){this.instructions.push(this.createStroke(e))}createStroke(e){return[Ke.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&&!Eo(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=[Ke.END_GEOMETRY,e];this.instructions.push(n),this.hitDetectionInstructions.push(n)}getBufferedMaxExtent(){if(!this.bufferedMaxExtent_&&(this.bufferedMaxExtent_=qT(this.maxExtent),this.maxLineWidth>0)){const e=this.resolution*(this.maxLineWidth+1)/2;hy(this.bufferedMaxExtent_,e,this.bufferedMaxExtent_)}return this.bufferedMaxExtent_}}class jie extends td{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&&!Vl(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([Ke.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([Ke.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=Ai(c,d,p),y=Ai(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 Gie(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,x;for(d=n;dt&&(l>a&&(a=l,r=c,o=d),l=0,c=d-s)),h=f,y=b,v=x),p=E,m=w}return l+=f,l>a?[c,d]:[r,o]}const Xh={left:0,center:.5,right:1,top:0,middle:.5,hanging:.2,alphabetic:.8,ideographic:.8,bottom:1};class Xie extends td{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[gi]={fillStyle:gi},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(!_i(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+E)*2]===u[E*d]&&a[(b+E)*2+1]===u[E*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!=qo&&(o.scale[0]<0||o.scale[1]<0)){let b=o.padding[0],x=o.padding[1],E=o.padding[2],w=o.padding[3];o.scale[0]<0&&(x=-x,w=-w),o.scale[1]<0&&(b=-b,E=-E),p=[b,x,E,w]}const m=this.pixelRatio;this.instructions.push([Ke.DRAW_IMAGE,l,f,null,NaN,NaN,NaN,1,0,0,this.textRotateWithView_,this.textRotation_,[1,1],NaN,this.declutterMode_,this.declutterImageWithText_,p==qo?qo: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=gi,this.hitDetectionInstructions.push(this.createFill(this.state))),this.hitDetectionInstructions.push([Ke.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_?gi: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||Mu,justify:n.justify,textBaseline:n.textBaseline||zh,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=Xh[s.textBaseline],u=this.textOffsetY_*l,d=this.text_,h=i?i.lineWidth*Math.abs(s.scale[0])/2:0;this.instructions.push([Ke.DRAW_CHARS,e,n,c,s.overflow,a,s.maxAngle,l,u,r,h*l,d,o,1,this.declutterMode_]),this.hitDetectionInstructions.push([Ke.DRAW_CHARS,e,n,c,s.overflow,a&&gi,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=Ds(o.getColor()||gi)):(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()||Wl,r.lineDash=p?p.slice():fr,r.lineDashOffset=m===void 0?gr:m,r.lineJoin=a.getLineJoin()||Yl,r.lineWidth=y===void 0?Pu:y,r.miterLimit=v===void 0?Au:v,r.strokeStyle=Ds(a.getColor()||ku)}i=this.textState_;const l=e.getFont()||TA;Dte(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()||zh,i.backgroundFill=e.getBackgroundFill(),i.backgroundStroke=e.getBackgroundStroke(),i.padding=e.getPadding()||qo,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 qie={Circle:zw,Default:td,Image:jie,LineString:Kie,Polygon:zw,Text:Xie};class Zie{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=qie[n];r=new o(this.tolerance_,this.maxExtent_,this.resolution_,this.pixelRatio_),s[n]=r}return r}}function Jie(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(eD[2]}else B=E>k;const Y=Math.PI,ne=[],$=S+i===e;e=S,y=0,v=T,h=t[e],f=t[e+1];let F;if($){b(),F=Math.atan2(f-m,h-p),B&&(F+=F>0?-Y:Y);const D=(k+E)/2,z=(P+w)/2;return ne[0]=[D,z,(A-r)/2,F,s],ne}s=s.replace(/\n/g," ");for(let D=0,z=s.length;D0?-Y:Y),F!==void 0){let I=X-F;if(I+=I>Y?-2*Y:I<-Y?2*Y:0,Math.abs(I)>o)return null}F=X;const Z=D;let H=0;for(;D0&&t.push(` -`,""),t.push(e,""),t}class ese{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_=hs(),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 QA: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?Xh[l.justify]:Ap(Array.isArray(e)?e[0]:e,l.textAlign||Mu),h=s&&o.lineWidth?o.lineWidth:0,f=Array.isArray(e)?e:String(e).split(` -`).reduce(Qie,[]),{width:p,height:m,widths:y,heights:v,lineWidths:b}=Lte(l,f),x=p+h,E=[],w=(x+2)*u[0],S=(m+h)*u[1],T={width:w<0?Math.floor(w):Math.ceil(w),height:S<0?Math.floor(S):Math.ceil(S),contextInstructions:E};(u[0]!=1||u[1]!=1)&&E.push("scale",u),s&&(E.push("strokeStyle",o.strokeStyle),E.push("lineWidth",h),E.push("lineCap",o.lineCap),E.push("lineJoin",o.lineJoin),E.push("miterLimit",o.miterLimit),E.push("setLineDash",[o.lineDash]),E.push("lineDashOffset",o.lineDashOffset)),i&&E.push("fillStyle",a.fillStyle),E.push("textBaseline","middle"),E.push("textAlign","center");const A=.5-d;let k=d*x+A*h;const P=[],B=[];let Y=0,ne=0,$=0,F=0,D;for(let z=0,X=f.length;ze?e-c:r,E=o+u>n?n-u:o,w=p[3]+x*h[0]+p[1],S=p[0]+E*h[1]+p[2],T=v-p[3],A=b-p[0];(m||d!==0)&&(Rr[0]=T,Lr[0]=T,Rr[1]=A,Gs[1]=A,Gs[0]=T+w,Xs[0]=Gs[0],Xs[1]=A+S,Lr[1]=Xs[1]);let k;return d!==0?(k=br(hs(),i,s,1,1,d,-i,-s),On(k,Rr),On(k,Gs),On(k,Xs),On(k,Lr),uo(Math.min(Rr[0],Gs[0],Xs[0],Lr[0]),Math.min(Rr[1],Gs[1],Xs[1],Lr[1]),Math.max(Rr[0],Gs[0],Xs[0],Lr[0]),Math.max(Rr[1],Gs[1],Xs[1],Lr[1]),ja)):uo(Math.min(T,T+w),Math.min(A,A+S),Math.max(T,T+w),Math.max(A,A+S),ja),f&&(v=Math.round(v),b=Math.round(b)),{drawImageX:v,drawImageY:b,drawImageW:x,drawImageH:E,originX:c,originY:u,declutterBox:{minX:ja[0],minY:ja[1],maxX:ja[2],maxY:ja[3],value:y},canvasTransform:k,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,Rr,Gs,Xs,Lr,o,a),Ote(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=On(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=Ap(Array.isArray(e)?e[0]:e,r.textAlign||Mu),u=Xh[r.textBaseline||zh],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_&&Eo(i,this.renderedTransform_)?u=this.pixelCoordinates_:(this.pixelCoordinates_||(this.pixelCoordinates_=[]),u=io(this.coordinates,0,this.coordinates.length,2,i,this.pixelCoordinates_),$ee(this.renderedTransform_,i));let d=0;const h=s.length;let f=0,p,m,y,v,b,x,E,w,S,T,A,k,P,B=0,Y=0,ne=null,$=null;const F=this.coordinateCache_,D=this.viewRotation_,z=Math.round(Math.atan2(-i[1],i[0])*1e12)/1e12,X={context:e,pixelRatio:this.pixelRatio,resolution:this.resolution,rotation:D},Z=this.instructions!=s||this.overlaps?0:200;let H,le,ie,te;for(;dZ&&(this.fill_(e),B=0),Y>Z&&(e.stroke(),Y=0),!B&&!Y&&(e.beginPath(),b=NaN,x=NaN),++d;break;case Ke.CIRCLE:f=I[1];const ue=u[f],L=u[f+1],ae=u[f+2],de=u[f+3],ve=ae-ue,W=de-L,fe=Math.sqrt(ve*ve+W*W);e.moveTo(ue+fe,L),e.arc(ue,L,fe,0,2*Math.PI,!0),++d;break;case Ke.CLOSE_PATH:e.closePath(),++d;break;case Ke.CUSTOM:f=I[1],p=I[2];const C=I[3],O=I[4],K=I[5];X.geometry=C,X.feature=H,d in F||(F[d]=[]);const U=F[d];K?K(u,f,p,2,U):(U[0]=u[f],U[1]=u[f+1],U.length=2),c&&(c.zIndex=I[6]),O(U,X),++d;break;case Ke.DRAW_IMAGE:f=I[1],p=I[2],S=I[3],m=I[4],y=I[5];let re=I[6];const j=I[7],se=I[8],Q=I[9],ge=I[10];let _e=I[11];const ye=I[12];let ke=I[13];v=I[14]||"declutter";const Me=I[15];if(!S&&I.length>=20){T=I[19],A=I[20],k=I[21],P=I[22];const pn=this.drawLabelWithPointPlacement_(T,A,k,P);S=pn.label,I[3]=S;const Cn=I[23];m=(pn.anchorX-Cn)*this.pixelRatio,I[4]=m;const Sn=I[24];y=(pn.anchorY-Sn)*this.pixelRatio,I[5]=y,re=S.height,I[6]=re,ke=S.width,I[13]=ke}let Be;I.length>25&&(Be=I[25]);let ze,nt,Qe;I.length>17?(ze=I[16],nt=I[17],Qe=I[18]):(ze=qo,nt=!1,Qe=!1),ge&&z?_e+=D:!ge&&!z&&(_e-=D);let qt=0;for(;f!ik.includes(t));class nse{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_=hs(),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 ese(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 B=(h[k]-3)/4,Y=s-B%a,ne=s-(B/a|0),$=r(w,S,Y*Y+ne*ne);if($)return $}u.clearRect(0,0,a,a);break}}const m=Object.keys(this.executorsByZIndex_).map(Number);m.sort(hr);let y,v,b,x,E;for(y=m.length-1;y>=0;--y){const w=m[y].toString();for(b=this.executorsByZIndex_[w],v=il.length-1;v>=0;--v)if(f=il[v],x=b[f],x!==void 0&&(E=x.executeHitDetection(u,l,i,p,d),E))return E}}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 io(a,0,8,2,e,a),a}isEmpty(){return Bl(this.executorsByZIndex_)}execute(e,n,i,s,r,o,a){const l=Object.keys(this.executorsByZIndex_).map(Number);l.sort(hr),o=o||il;const c=il.length;let u,d,h,f,p;for(a&&l.reverse(),u=0,d=l.length;uv.execute(w,n,i,s,r,a)),E&&x.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(hr);for(let i=0,s=n.length;i{r.draw(this.renderedContext_),r.clear()}),e[n[i]].length=0}}const kp={};function ise(t){if(kp[t]!==void 0)return kp[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||gr)*this.pixelRatio_,lineJoin:a!==void 0?a:Yl,lineWidth:(l!==void 0?l:Pu)*this.pixelRatio_,miterLimit:c!==void 0?c:Au,strokeStyle:Ds(i||ku)}}}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:Ds(f||gi)}}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(),x=i.getMiterLimit();this.textStrokeState_={lineCap:p!==void 0?p:Wl,lineDash:m||fr,lineDashOffset:y||gr,lineJoin:v!==void 0?v:Yl,lineWidth:b!==void 0?b:Pu,miterLimit:x!==void 0?x:Au,strokeStyle:Ds(f||ku)}}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:TA,textAlign:d!==void 0?d:Mu,textBaseline:h!==void 0?h:zh},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 As=.5;function rse(t,e,n,i,s,r,o,a,l){const c=s,u=t[0]*As,d=t[1]*As,h=dn(u,d);h.imageSmoothingEnabled=!1;const f=h.canvas,p=new sse(h,As,s,null,o,a,null),m=n.length,y=Math.floor((256*256*256-1)/m),v={};for(let x=1;x<=m;++x){const E=n[x-1],w=E.getStyleFunction()||i;if(!w)continue;let S=w(E,r);if(!S)continue;Array.isArray(S)||(S=[S]);const A=(x*y).toString(16).padStart(7,"#00000");for(let k=0,P=S.length;k0;return d&&Promise.all(l).then(()=>s(null)),use(t,e,n,i,r,o,a),d}function use(t,e,n,i,s,r,o){const a=n.getGeometryFunction()(e);if(!a)return;const l=a.simplifyTransformed(i,s);if(n.getRenderer())ok(t,l,n,e,o);else{const u=sk[l.getType()];u(t,l,n,e,o,r)}}function ok(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]*As,h=i[1]*As;u.push(this.getRenderTransform(s,r,o,As,d,h,0).slice());const f=c.getSource(),p=a.getExtent();if(f.getWrapX()&&a.canWrapX()&&!nl(p,l)){let m=l[0];const y=yt(p);let v=0,b;for(;mp[2];)++v,b=y*v,u.push(this.getRenderTransform(s,r,o,As,d,h,b).slice()),m-=y}this.hitDetectionImageData_=rse(i,u,this.renderedFeatures_,c.getStyleFunction(),l,r,o,Hw(r,this.renderedPixelRatio_))}n(ose(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[Wn.ANIMATING],r=e.viewHints[Wn.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=lse);const y=c.center.slice(),v=hy(l,p*d),b=v.slice(),x=[v.slice()],E=u.getExtent();if(i.getWrapX()&&u.canWrapX()&&!nl(E,e.extent)){const $=yt(E),F=Math.max(yt(v)/2,$);v[0]=E[0]-F,v[2]=E[2]+F,nA(y,u);const D=tA(x[0],u);D[0]E[0]&&D[2]>E[2]&&x.push([D[0]-$,D[1],D[2]-$,D[3]])}if(this.ready&&this.renderedResolution_==d&&this.renderedRevision_==f&&this.renderedRenderOrder_==m&&this.renderedFrameDeclutter_===!!e.declutter&&nl(this.wrappedRenderedExtent_,v))return Eo(this.renderedExtent_,b)||(this.hitDetectionImageData_=null,this.renderedExtent_=b),this.renderedCenter_=y,this.replayGroupChanged=!1,!0;this.replayGroup_=null;const w=new Zie(rk(d,h),v,d,h);let S;for(let $=0,F=x.length;${let D;const z=$.getStyleFunction()||n.getStyleFunction();if(z&&(D=z($,d)),D){const X=this.renderFeature($,T,D,w,S,this.getLayer().getDeclutter(),F);A=A&&!X}},P=aA(v),B=i.getFeaturesInExtent(P);m&&B.sort(m);for(let $=0,F=B.length;${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=jf(i,0,this.simplifiedGeometry_.flatCoordinates_.length,this.simplifiedGeometry_.stride_,e,i,0),s=[i.length];break;case"MultiLineString":s=[],i.length=Gee(i,0,this.simplifiedGeometry_.ends_,this.simplifiedGeometry_.stride_,e,i,0,s);break;case"Polygon":s=[],i.length=dA(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 wse(t,e){return[[-1/0,-1/0,1/0,1/0]]}let xse=!1;function Ese(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=xse,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 Gw(t,e){return function(n,i,s,r,o){const a=this;Ese(t,e,n,i,s,function(l,c){a.addFeatures(l),r!==void 0&&r(l)},o||Fl)}}class Or extends Er{constructor(e,n,i){super(e),this.feature=n,this.features=i}}class Cse extends XA{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_=Fl,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&&(pt(this.format_,"`format` must be set when `url` is set"),this.loader_=Gw(this.url_,this.format_)),this.strategy_=e.strategy!==void 0?e.strategy:wse;const n=e.useSpatialIndex!==void 0?e.useSpatialIndex:!0;this.featuresRtree_=n?new Kw:null,this.loadedExtentsRtree_=new Kw,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 Ps(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 Or(Bi.ADDFEATURE,e))}setupChangeEvents_(e,n){n instanceof is||(this.featureChangeKeys_[e]=[ht(n,et.CHANGE,this.handleFeatureChange_,this),ht(n,Nl.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&&(pt(!(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(fi.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(Rt);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 Or(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(),Bl(this.nullGeometryFeatures_)||$f(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=py(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||vu,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 Or(Bi.FEATURESLOADEND,void 0,u))},()=>{--this.loadingExtentsCount_,this.dispatchEvent(new Or(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(bu(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]}},async mounted(){await fetch("https://tile.openstreetmap.org/",{signal:AbortSignal.timeout(1500)}).then(t=>{const e=new tie({target:"map",layers:[new Wie({source:new Mie})],view:new Ts({center:cp(this.getLastLonLat()),zoom:this.type==="traceroute"?3:10})}),n=[],i=new Cse;if(this.type==="traceroute")console.log(this.getLastLonLat()),this.d.forEach(a=>{if(a.geo&&a.geo.lat&&a.geo.lon){const l=cp([a.geo.lon,a.geo.lat]);n.push(l);const c=this.getLastLonLat();console.log(a.geo.lon,a.geo.lat),console.log(a.geo.lon===c[0]&&a.geo.lat===c[1]);const u=new Jc({geometry:new Eu(l),last:a.geo.lon===c[0]&&a.geo.lat===c[1]});i.addFeature(u)}});else{const a=cp([this.d.geo.lon,this.d.geo.lat]);n.push(a);const l=new Jc({geometry:new Eu(a)});i.addFeature(l)}const s=new Gh(n),r=new Jc({geometry:s});i.addFeature(r);const o=new vse({source:i,style:function(a){if(a.getGeometry().getType()==="Point")return new pr({image:new Zu({radius:10,fill:new Zl({color:a.get("last")?"#dc3545":"#0d6efd"}),stroke:new Hl({color:"white",width:5})})});if(a.getGeometry().getType()==="LineString")return new pr({stroke:new Hl({color:"#0d6efd",width:2})})}});e.addLayer(o),this.store.Configuration.Server.dashboard_theme==="dark"&&e.on("postcompose",function(a){document.querySelector("#map").style.filter="grayscale(80%) invert(100%) "})}).catch(t=>{this.osmAvailable=!1})}},Tse={key:0,id:"map",class:"w-100 rounded-3"};function Ase(t,e,n,i,s,r){return this.osmAvailable?(R(),V("div",Tse)):ce("",!0)}const ak=je(Sse,[["render",Ase]]),kse={name:"ping",components:{OSMap:ak,LocaleText:He},data(){return{loading:!1,cips:{},selectedConfiguration:void 0,selectedPeer:void 0,selectedIp:void 0,count:4,pingResult:void 0,pinging:!1}},setup(){return{store:tt()}},mounted(){Yt("/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,Yt("/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}}},Mse={class:"mt-md-5 mt-3 text-body"},Pse={class:"container"},Ise={class:"row"},Dse={class:"col-sm-4 d-flex gap-2 flex-column"},Rse={class:"mb-1 text-muted",for:"configuration"},Lse=["disabled"],Ose=["value"],$se={class:"mb-1 text-muted",for:"peer"},Nse=["disabled"],Fse=["value"],Bse={class:"mb-1 text-muted",for:"ip"},Vse=["disabled"],zse={class:"d-flex align-items-center gap-2"},Wse={class:"text-muted"},Yse={class:"mb-1 text-muted",for:"ipAddress"},Hse=["disabled"],jse={class:"mb-1 text-muted",for:"count"},Kse={class:"d-flex gap-3 align-items-center"},Use=["disabled"],Gse=["disabled"],Xse={key:0,class:"d-block"},qse={key:1,class:"d-block"},Zse={class:"col-sm-8 position-relative"},Jse={key:"pingPlaceholder"},Qse={key:"pingResult",class:"d-flex flex-column gap-2 w-100"},ere={class:"card rounded-3 bg-transparent shadow-sm animate__animated animate__fadeIn",style:{"animation-delay":"0.15s"}},tre={class:"card-body row"},nre={class:"col-sm"},ire={class:"mb-0 text-muted"},sre={key:0,class:"col-sm"},rre={class:"mb-0 text-muted"},ore={class:"card rounded-3 bg-transparent shadow-sm animate__animated animate__fadeIn",style:{"animation-delay":"0.3s"}},are={class:"card-body"},lre={class:"card rounded-3 bg-transparent shadow-sm animate__animated animate__fadeIn",style:{"animation-delay":"0.45s"}},cre={class:"card-body"},ure={class:"mb-0 text-muted"},dre={class:"card rounded-3 bg-transparent shadow-sm animate__animated animate__fadeIn",style:{"animation-delay":"0.6s"}},hre={class:"card-body"},fre={class:"mb-0 text-muted"};function gre(t,e,n,i,s,r){const o=Ee("LocaleText"),a=Ee("OSMap");return R(),V("div",Mse,[g("div",Pse,[e[19]||(e[19]=g("h3",{class:"mb-3 text-body"},"Ping",-1)),g("div",Ise,[g("div",Dse,[g("div",null,[g("label",Rse,[g("small",null,[N(o,{t:"Configuration"})])]),$e(g("select",{class:"form-select","onUpdate:modelValue":e[0]||(e[0]=l=>this.selectedConfiguration=l),disabled:this.pinging},[e[7]||(e[7]=g("option",{disabled:"",selected:"",value:void 0},null,-1)),(R(!0),V(Oe,null,Ze(this.cips,(l,c)=>(R(),V("option",{value:c},we(c),9,Ose))),256))],8,Lse),[[oh,this.selectedConfiguration]])]),g("div",null,[g("label",$se,[g("small",null,[N(o,{t:"Peer"})])]),$e(g("select",{id:"peer",class:"form-select","onUpdate:modelValue":e[1]||(e[1]=l=>this.selectedPeer=l),disabled:this.selectedConfiguration===void 0||this.pinging},[e[8]||(e[8]=g("option",{disabled:"",selected:"",value:void 0},null,-1)),this.selectedConfiguration!==void 0?(R(!0),V(Oe,{key:0},Ze(this.cips[this.selectedConfiguration],(l,c)=>(R(),V("option",{value:c},we(c),9,Fse))),256)):ce("",!0)],8,Nse),[[oh,this.selectedPeer]])]),g("div",null,[g("label",Bse,[g("small",null,[N(o,{t:"IP Address"})])]),$e(g("select",{id:"ip",class:"form-select","onUpdate:modelValue":e[2]||(e[2]=l=>this.selectedIp=l),disabled:this.selectedPeer===void 0||this.pinging},[e[9]||(e[9]=g("option",{disabled:"",selected:"",value:void 0},null,-1)),this.selectedPeer!==void 0?(R(!0),V(Oe,{key:0},Ze(this.cips[this.selectedConfiguration][this.selectedPeer].allowed_ips,l=>(R(),V("option",null,we(l),1))),256)):ce("",!0)],8,Vse),[[oh,this.selectedIp]])]),g("div",zse,[e[10]||(e[10]=g("div",{class:"flex-grow-1 border-top"},null,-1)),g("small",Wse,[N(o,{t:"OR"})]),e[11]||(e[11]=g("div",{class:"flex-grow-1 border-top"},null,-1))]),g("div",null,[g("label",Yse,[g("small",null,[N(o,{t:"Enter IP Address / Hostname"})])]),$e(g("input",{class:"form-control",type:"text",id:"ipAddress",disabled:this.pinging,"onUpdate:modelValue":e[3]||(e[3]=l=>this.selectedIp=l)},null,8,Hse),[[We,this.selectedIp]])]),e[16]||(e[16]=g("div",{class:"w-100 border-top my-2"},null,-1)),g("div",null,[g("label",jse,[g("small",null,[N(o,{t:"Count"})])]),g("div",Kse,[g("button",{onClick:e[4]||(e[4]=l=>this.count--),disabled:this.count===1,class:"btn btn-sm bg-secondary-subtle text-secondary-emphasis"},e[12]||(e[12]=[g("i",{class:"bi bi-dash-lg"},null,-1)]),8,Use),g("strong",null,we(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"},e[13]||(e[13]=[g("i",{class:"bi bi-plus-lg"},null,-1)]))])]),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())},[N($t,{name:"slide"},{default:De(()=>[this.pinging?(R(),V("span",qse,e[15]||(e[15]=[g("span",{class:"spinner-border spinner-border-sm","aria-hidden":"true"},null,-1),g("span",{class:"visually-hidden",role:"status"},"Loading...",-1)]))):(R(),V("span",Xse,e[14]||(e[14]=[g("i",{class:"bi bi-person-walking me-2"},null,-1),Ue("Ping! ")])))]),_:1})],8,Gse)]),g("div",Zse,[N($t,{name:"ping"},{default:De(()=>[this.pingResult?(R(),V("div",Qse,[this.pingResult.geo&&this.pingResult.geo.status==="success"?(R(),Se(a,{key:0,d:this.pingResult},null,8,["d"])):ce("",!0),g("div",ere,[g("div",tre,[g("div",nre,[g("p",ire,[g("small",null,[N(o,{t:"IP Address"})])]),Ue(" "+we(this.pingResult.address),1)]),this.pingResult.geo&&this.pingResult.geo.status==="success"?(R(),V("div",sre,[g("p",rre,[g("small",null,[N(o,{t:"Geolocation"})])]),Ue(" "+we(this.pingResult.geo.city)+", "+we(this.pingResult.geo.country),1)])):ce("",!0)])]),g("div",ore,[g("div",are,[e[18]||(e[18]=g("p",{class:"mb-0 text-muted"},[g("small",null,"Is Alive")],-1)),g("span",{class:Pe([this.pingResult.is_alive?"text-success":"text-danger"])},[g("i",{class:Pe(["bi me-1",[this.pingResult.is_alive?"bi-check-circle-fill":"bi-x-circle-fill"]])},null,2),Ue(" "+we(this.pingResult.is_alive?"Yes":"No"),1)],2)])]),g("div",lre,[g("div",cre,[g("p",ure,[g("small",null,[N(o,{t:"Average / Min / Max Round Trip Time"})])]),g("samp",null,we(this.pingResult.avg_rtt)+"ms / "+we(this.pingResult.min_rtt)+"ms / "+we(this.pingResult.max_rtt)+"ms ",1)])]),g("div",dre,[g("div",hre,[g("p",fre,[g("small",null,[N(o,{t:"Sent / Received / Lost Package"})])]),g("samp",null,we(this.pingResult.package_sent)+" / "+we(this.pingResult.package_received)+" / "+we(this.pingResult.package_loss),1)])])])):(R(),V("div",Jse,[e[17]||(e[17]=g("div",{class:"pingPlaceholder bg-body-secondary rounded-3 mb-3",style:{height:"300px"}},null,-1)),(R(),V(Oe,null,Ze(4,l=>g("div",{class:Pe(["pingPlaceholder bg-body-secondary rounded-3 mb-3",{"animate__animated animate__flash animate__slower animate__infinite":this.pinging}]),style:Pn({"animation-delay":`${l*.15}s`})},null,6)),64))]))]),_:1})])])])])}const pre=je(kse,[["render",gre],["__scopeId","data-v-f5cd36ce"]]),mre={name:"traceroute",components:{LocaleText:He,OSMap:ak},data(){return{tracing:!1,ipAddress:void 0,tracerouteResult:void 0}},setup(){return{store:qn()}},methods:{execute(){this.ipAddress&&(this.tracing=!0,this.tracerouteResult=void 0,Yt("/api/traceroute/execute",{ipAddress:this.ipAddress},t=>{t.status?this.tracerouteResult=t.data:this.store.newMessage("Server",t.message,"danger"),this.tracing=!1}))}}},_re={class:"mt-md-5 mt-3 text-body"},yre={class:"container-md"},vre={class:"mb-3 text-body"},bre={class:"d-flex gap-2 flex-column mb-5"},wre={class:"mb-1 text-muted",for:"ipAddress"},xre=["disabled"],Ere=["disabled"],Cre={key:0,class:"d-block"},Sre={key:1,class:"d-block"},Tre={class:"position-relative"},Are={key:"pingPlaceholder"},kre={key:1},Mre={key:"table",class:"w-100 mt-2"},Pre={class:"table table-sm rounded-3 w-100"},Ire={scope:"col"},Dre={scope:"col"},Rre={scope:"col"},Lre={scope:"col"},Ore={scope:"col"},$re={scope:"col"},Nre={key:0};function Fre(t,e,n,i,s,r){const o=Ee("LocaleText"),a=Ee("OSMap");return R(),V("div",_re,[g("div",yre,[g("h3",vre,[N(o,{t:"Traceroute"})]),g("div",bre,[g("div",null,[g("label",wre,[g("small",null,[N(o,{t:"Enter IP Address / Hostname"})])]),$e(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]=eC(l=>this.execute(),["enter"])),type:"text"},null,40,xre),[[We,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())},[N($t,{name:"slide"},{default:De(()=>[this.tracing?(R(),V("span",Sre,e[4]||(e[4]=[g("span",{class:"spinner-border spinner-border-sm","aria-hidden":"true"},null,-1),g("span",{class:"visually-hidden",role:"status"},"Loading...",-1)]))):(R(),V("span",Cre,e[3]||(e[3]=[g("i",{class:"bi bi-person-walking me-2"},null,-1),Ue("Trace! ")])))]),_:1})],8,Ere)]),g("div",Tre,[N($t,{name:"ping"},{default:De(()=>[this.tracerouteResult?(R(),V("div",kre,[N(a,{d:this.tracerouteResult,type:"traceroute"},null,8,["d"]),g("div",Mre,[g("table",Pre,[g("thead",null,[g("tr",null,[g("th",Ire,[N(o,{t:"Hop"})]),g("th",Dre,[N(o,{t:"IP Address"})]),g("th",Rre,[N(o,{t:"Average RTT (ms)"})]),g("th",Lre,[N(o,{t:"Min RTT (ms)"})]),g("th",Ore,[N(o,{t:"Max RTT (ms)"})]),g("th",$re,[N(o,{t:"Geolocation"})])])]),g("tbody",null,[(R(!0),V(Oe,null,Ze(this.tracerouteResult,(l,c)=>(R(),V("tr",null,[g("td",null,[g("small",null,we(l.hop),1)]),g("td",null,[g("small",null,we(l.ip),1)]),g("td",null,[g("small",null,we(l.avg_rtt),1)]),g("td",null,[g("small",null,we(l.min_rtt),1)]),g("td",null,[g("small",null,we(l.max_rtt),1)]),g("td",null,[l.geo.city&&l.geo.country?(R(),V("span",Nre,[g("small",null,we(l.geo.city)+", "+we(l.geo.country),1)])):ce("",!0)])]))),256))])])])])):(R(),V("div",Are,[e[5]||(e[5]=g("div",{class:"pingPlaceholder bg-body-secondary rounded-3 mb-3",style:{height:"300px !important"}},null,-1)),(R(),V(Oe,null,Ze(5,l=>g("div",{class:Pe(["pingPlaceholder bg-body-secondary rounded-3 mb-3",{"animate__animated animate__flash animate__slower animate__infinite":this.tracing}]),style:Pn({"animation-delay":`${l*.05}s`})},null,6)),64))]))]),_:1})])])])}const Bre=je(mre,[["render",Fre],["__scopeId","data-v-6d6cffc9"]]),Vre={name:"totp",components:{LocaleText:He},async setup(){const t=tt();let e="";return await Yt("/api/Welcome_GetTotpLink",{},n=>{n.status&&(e=n.data)}),{l:e,store:t}},mounted(){this.l&&ba.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)?xt("/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"))}}},zre=["data-bs-theme"],Wre={class:"m-auto text-body",style:{width:"500px"}},Yre={class:"d-flex flex-column"},Hre={class:"dashboardLogo display-4"},jre={class:"mb-2"},Kre={class:"text-muted"},Ure={class:"p-3 bg-body-secondary rounded-3 border mb-3"},Gre={class:"text-muted mb-0"},Xre=["href"],qre={style:{"line-break":"anywhere"}},Zre={for:"totp",class:"mb-2"},Jre={class:"text-muted"},Qre={class:"form-group mb-2"},eoe=["disabled"],toe={class:"invalid-feedback"},noe={class:"valid-feedback"},ioe={class:"d-flex gap-3 mt-5 flex-column"};function soe(t,e,n,i,s,r){const o=Ee("LocaleText"),a=Ee("RouterLink");return R(),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",Wre,[g("div",Yre,[g("div",null,[g("h1",Hre,[N(o,{t:"Multi-Factor Authentication (MFA)"})]),g("p",jre,[g("small",Kre,[N(o,{t:"1. Please scan the following QR Code to generate TOTP with your choice of authenticator"})])]),e[1]||(e[1]=g("canvas",{id:"qrcode",class:"rounded-3 mb-2"},null,-1)),g("div",Ure,[g("p",Gre,[g("small",null,[N(o,{t:"Or you can click the link below:"})])]),g("a",{href:this.l},[g("code",qre,we(this.l),1)],8,Xre)]),g("label",Zre,[g("small",Jre,[N(o,{t:"2. Enter the TOTP generated by your authenticator to verify"})])]),g("div",Qre,[$e(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,eoe),[[We,this.totp]]),g("div",toe,[N(o,{t:this.totpInvalidMessage},null,8,["t"])]),g("div",noe,[N(o,{t:"TOTP verified!"})])])]),e[4]||(e[4]=g("hr",null,null,-1)),g("div",ioe,[this.verified?(R(),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:De(()=>[N(o,{t:"Complete"}),e[3]||(e[3]=g("i",{class:"bi bi-chevron-right ms-auto"},null,-1))]),_:1})):(R(),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:De(()=>[N(o,{t:"I don't need MFA"}),e[2]||(e[2]=g("i",{class:"bi bi-chevron-right ms-auto"},null,-1))]),_:1}))])])])],8,zre)}const roe=je(Vre,[["render",soe]]),ooe={name:"share",components:{LocaleText:He},async setup(){const t=lO(),e=xe(!1),n=tt(),i=xe(""),s=xe(void 0),r=xe(new Blob);await Yt("/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 Yt("/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&&ba.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)}}},aoe=["data-bs-theme"],loe={class:"m-auto text-body",style:{width:"500px"}},coe={key:0,class:"text-center position-relative",style:{}},uoe={class:"position-absolute w-100 h-100 top-0 start-0 d-flex animate__animated animate__fadeInUp",style:{"animation-delay":"0.1s"}},doe={class:"m-auto"},hoe={key:1,class:"d-flex align-items-center flex-column gap-3"},foe={class:"h1 dashboardLogo text-center animate__animated animate__fadeInUp"},goe={id:"qrcode",class:"rounded-3 shadow animate__animated animate__fadeInUp mb-3",ref:"qrcode"},poe={class:"text-muted animate__animated animate__fadeInUp mb-1",style:{"animation-delay":"0.2s"}},moe=["download","href"];function _oe(t,e,n,i,s,r){const o=Ee("LocaleText");return R(),V("div",{class:"container-fluid login-container-fluid d-flex main pt-5 overflow-scroll","data-bs-theme":this.theme},[g("div",loe,[this.peerConfiguration?(R(),V("div",hoe,[g("div",foe,[e[1]||(e[1]=g("h6",null,"WGDashboard",-1)),N(o,{t:"Scan QR Code with the WireGuard App to add peer"})]),g("canvas",goe,null,512),g("p",poe,[N(o,{t:"or click the button below to download the "}),e[2]||(e[2]=g("samp",null,".conf",-1)),N(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"}},e[3]||(e[3]=[g("i",{class:"bi bi-download"},null,-1)]),8,moe)])):(R(),V("div",coe,[e[0]||(e[0]=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)),g("div",uoe,[g("h3",doe,[N(o,{t:"Oh no... This link is either expired or invalid."})])])]))])],8,aoe)}const yoe=je(ooe,[["render",_oe],["__scopeId","data-v-1b44aacd"]]),voe=async()=>{let t=!1;return await Yt("/api/validateAuthentication",{},e=>{t=e.status}),t},Ql=oO({history:NL(),scrollBehavior(){document.querySelector("main")!==null&&document.querySelector("main").scrollTo({top:0})},routes:[{name:"Index",path:"/",component:JO,meta:{requiresAuth:!0},children:[{name:"Configuration List",path:"",component:xN,meta:{title:"WireGuard Configurations"}},{name:"Settings",path:"/settings",component:S6,meta:{title:"Settings"}},{path:"/ping",name:"Ping",component:pre},{path:"/traceroute",name:"Traceroute",component:Bre},{name:"New Configuration",path:"/new_configuration",component:Xz,meta:{title:"New Configuration"}},{name:"Configuration",path:"/configuration/:id",component:Qz,meta:{title:"Configuration"},children:[{name:"Peers List",path:"peers",component:qQ},{name:"Peers Create",path:"create",component:HT}]}]},{path:"/signin",component:j$,meta:{title:"Sign In"}},{path:"/welcome",component:H6,meta:{requiresAuth:!0,title:"Welcome to WGDashboard"}},{path:"/2FASetup",component:roe,meta:{requiresAuth:!0,title:"Multi-Factor Authentication Setup"}},{path:"/share",component:yoe,meta:{title:"Share"}}]});Ql.beforeEach(async(t,e,n)=>{const i=qn(),s=tt();t.meta.title?t.params.id?document.title=t.params.id+" | WGDashboard":document.title=t.meta.title+" | WGDashboard":document.title="WGDashboard",s.ShowNavBar=!1,document.querySelector(".loadingBar").classList.remove("loadingDone"),document.querySelector(".loadingBar").classList.add("loading"),t.meta.requiresAuth?s.getActiveCrossServer()?(await s.getConfiguration(),!i.Configurations&&t.name!=="Configuration List"&&await i.getConfigurations(),n()):cO.getCookie("authToken")&&await voe()?(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()});Ql.afterEach(()=>{document.querySelector(".loadingBar").classList.remove("loading"),document.querySelector(".loadingBar").classList.add("loadingDone")});const lk=()=>{let t={"content-type":"application/json"};const n=tt().getActiveCrossServer();return n&&(t["wg-dashboard-apikey"]=n.apiKey),t},ck=t=>{const n=tt().getActiveCrossServer();return n?`${n.host}${t}`:`${window.location.protocol}//${(window.location.host+window.location.pathname+t).replace(/\/\//g,"/")}`},Yt=async(t,e=void 0,n=void 0)=>{const i=new URLSearchParams(e);await fetch(`${ck(t)}?${i.toString()}`,{headers:lk()}).then(s=>{const r=tt();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),Ql.push({path:"/signin"})})},xt=async(t,e,n)=>{await fetch(`${ck(t)}`,{headers:lk(),method:"POST",body:JSON.stringify(e)}).then(i=>{const s=tt();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),Ql.push({path:"/signin"})})},tt=oC("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[Bs().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 Yt("/api/getDashboardConfiguration",{},t=>{t.status&&(this.Configuration=t.data)})},async signOut(){await Yt("/api/signout",{},t=>{this.removeActiveCrossServer(),this.$router.go("/signin")})},newMessage(t,e,n){this.Messages.push({id:Bs(),from:At(t),content:At(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]]}}}),boe={class:"navbar bg-dark sticky-top","data-bs-theme":"dark"},woe={class:"container-fluid d-flex text-body align-items-center"},xoe={key:0,class:"ms-auto text-muted"},Eoe={__name:"App",setup(t){const e=tt();e.initCrossServerConfiguration(),window.IS_WGDASHBOARD_DESKTOP&&(e.IsElectronApp=!0,e.CrossServerConfiguration.Enable=!0),un(e.CrossServerConfiguration,()=>{e.syncCrossServerConfiguration()},{deep:!0});const n=be(()=>{if(e.ActiveServerConfiguration)return e.CrossServerConfiguration.ServerList[e.ActiveServerConfiguration]});return(i,s)=>(R(),V(Oe,null,[s[4]||(s[4]=g("div",{style:{"z-index":"9999",height:"5px"},class:"position-absolute loadingBar top-0 start-0"},null,-1)),g("nav",boe,[g("div",woe,[s[3]||(s[3]=g("span",{class:"navbar-brand mb-0 h1"},"WGDashboard",-1)),n.value!==void 0?(R(),V("small",xoe,[s[1]||(s[1]=g("i",{class:"bi bi-server me-2"},null,-1)),Ue(we(n.value.host),1)])):ce("",!0),g("a",{role:"button",class:"navbarBtn text-body",onClick:s[0]||(s[0]=r=>J(e).ShowNavBar=!J(e).ShowNavBar),style:{"line-height":"0","font-size":"2rem"}},s[2]||(s[2]=[g("i",{class:"bi bi-list"},null,-1)]))])]),(R(),Se(p_,null,{default:De(()=>[N(J(vC),null,{default:De(({Component:r})=>[N($t,{name:"app",mode:"out-in",type:"transition"},{default:De(()=>[(R(),Se(ma(r)))]),_:2},1024)]),_:1})]),_:1}))],64))}},Coe=je(Eoe,[["__scopeId","data-v-95a5c797"]]);let $m;await fetch("/api/locale").then(t=>t.json()).then(t=>$m=t.data).catch(()=>{$m=null});const Ky=qR(Coe);Ky.use(Ql);const uk=eL();uk.use(({store:t})=>{t.$router=of(Ql)});Ky.use(uk);const Soe=tt();Soe.Locale=$m;Ky.mount("#app"); +`+p;er.get(m)===void 0&&(er.set(m,100,!0),a(u.style,u.weight,p)||(er.set(m,0,!0),r===void 0&&(r=setInterval(l,32))))}}}(),Nte=function(){let t;return function(e){let n=km[e];if(n==null){if(xA){const i=SA(e),s=AA(e,"Žg");n=(isNaN(Number(i.lineHeight))?1.2:Number(i.lineHeight))*(s.actualBoundingBoxAscent+s.actualBoundingBoxDescent)}else t||(t=document.createElement("div"),t.innerHTML="M",t.style.minHeight="0",t.style.maxHeight="none",t.style.height="auto",t.style.padding="0",t.style.border="none",t.style.position="absolute",t.style.display="block",t.style.left="-99999px"),t.style.font=e,document.body.appendChild(t),n=t.offsetHeight,document.body.removeChild(t);km[e]=n}return n}}();function AA(t,e){return Za||(Za=dn(1,1)),t!=Am&&(Za.font=t,Am=Za.font),Za.measureText(e)}function Wh(t,e){return AA(t,e).width}function xw(t,e,n){if(e in n)return n[e];const i=e.split(` +`).reduce((s,r)=>Math.max(s,Wh(t,r)),0);return n[e]=i,i}function Fte(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,g=Wh(h,d);n.push(g),o+=g;const p=Nte(h);i.push(p),l=Math.max(l,p)}return{width:r,height:a,widths:n,heights:i,lineWidths:s}}function Bte(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]),Vte(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 Vte(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 Xf({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=dn(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()}}class Hl{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 Hl({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}}class pr{constructor(e){e=e||{},this.geometry_=null,this.geometryFunction_=Ew,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 pr({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_=Ew,this.geometry_=e}setZIndex(e){this.zIndex_=e}}function zte(t){let e;if(typeof t=="function")e=t;else{let n;Array.isArray(t)?n=t:(pt(typeof t.getZIndex=="function","Expected an `Style` or an array of `Style`"),n=[t]),e=function(){return n}}return e}let vp=null;function kA(t,e){if(!vp){const n=new Zl({color:"rgba(255,255,255,0.4)"}),i=new Hl({color:"#3399CC",width:1.25});vp=[new pr({image:new Zu({fill:n,stroke:i,radius:5}),fill:n,stroke:i})]}return vp}function Ew(t){return t.getGeometry()}function Cw(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 Uf{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;pt(!(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)),pt(a!==void 0&&a.length>0,"A defined and non-empty `src` or `image` must be provided"),pt(!((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?Tu(e.color):null,this.iconImage_=Ly(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 g=this.iconImage_.getSize();this.setScale(Cw(g[0],g[1],e.width,e.height))};this.listenImageChange(h);return}}c!==void 0&&this.setScale(Cw(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 Wte="#333";class $y{constructor(e){e=e||{},this.font_=e.font,this.rotation_=e.rotation,this.rotateWithView_=e.rotateWithView,this.scale_=e.scale,this.scaleArray_=wi(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 Zl({color:Wte}),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 $y({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_=wi(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 xa=0;const ti=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"},Kte={[pe.Get]:Ge(st(1,1/0),Sw),[pe.Var]:Ge(st(1,1),Ute),[pe.Has]:Ge(st(1,1/0),Sw),[pe.Id]:Ge(Gte,Va),[pe.Concat]:Ge(st(2,1/0),mt(pi)),[pe.GeometryType]:Ge(Xte,Va),[pe.LineMetric]:Ge(Va),[pe.Resolution]:Ge(Va),[pe.Zoom]:Ge(Va),[pe.Time]:Ge(Va),[pe.Any]:Ge(st(2,1/0),mt(ti)),[pe.All]:Ge(st(2,1/0),mt(ti)),[pe.Not]:Ge(st(1,1),mt(ti)),[pe.Equal]:Ge(st(2,2),mt(qd)),[pe.NotEqual]:Ge(st(2,2),mt(qd)),[pe.GreaterThan]:Ge(st(2,2),mt(dt)),[pe.GreaterThanOrEqualTo]:Ge(st(2,2),mt(dt)),[pe.LessThan]:Ge(st(2,2),mt(dt)),[pe.LessThanOrEqualTo]:Ge(st(2,2),mt(dt)),[pe.Multiply]:Ge(st(2,1/0),Tw),[pe.Coalesce]:Ge(st(2,1/0),Tw),[pe.Divide]:Ge(st(2,2),mt(dt)),[pe.Add]:Ge(st(2,1/0),mt(dt)),[pe.Subtract]:Ge(st(2,2),mt(dt)),[pe.Clamp]:Ge(st(3,3),mt(dt)),[pe.Mod]:Ge(st(2,2),mt(dt)),[pe.Pow]:Ge(st(2,2),mt(dt)),[pe.Abs]:Ge(st(1,1),mt(dt)),[pe.Floor]:Ge(st(1,1),mt(dt)),[pe.Ceil]:Ge(st(1,1),mt(dt)),[pe.Round]:Ge(st(1,1),mt(dt)),[pe.Sin]:Ge(st(1,1),mt(dt)),[pe.Cos]:Ge(st(1,1),mt(dt)),[pe.Atan]:Ge(st(1,2),mt(dt)),[pe.Sqrt]:Ge(st(1,1),mt(dt)),[pe.Match]:Ge(st(4,1/0),Aw,Zte),[pe.Between]:Ge(st(3,3),mt(dt)),[pe.Interpolate]:Ge(st(6,1/0),Aw,Jte),[pe.Case]:Ge(st(3,1/0),qte,Qte),[pe.In]:Ge(st(2,2),ene),[pe.Number]:Ge(st(1,1/0),mt(qd)),[pe.String]:Ge(st(1,1/0),mt(qd)),[pe.Array]:Ge(st(1,1/0),mt(dt)),[pe.Color]:Ge(st(1,4),mt(dt)),[pe.Band]:Ge(st(1,3),mt(dt)),[pe.Palette]:Ge(st(2,2),tne),[pe.ToString]:Ge(st(1,1),mt(ti|dt|pi|os))};function Sw(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 Tw(t,e,n){const i=t.length-1,s=new Array(i);for(let r=0;ri.featureId;case pe.GeometryType:return i=>i.geometryType;case pe.Concat:{const i=t.args.map(s=>ms(s));return s=>"".concat(...i.map(r=>r(s).toString()))}case pe.Resolution:return i=>i.resolution;case pe.Any:case pe.All:case pe.Between:case pe.In:case pe.Not:return one(t);case pe.Equal:case pe.NotEqual:case pe.LessThan:case pe.LessThanOrEqualTo:case pe.GreaterThan:case pe.GreaterThanOrEqualTo:return rne(t);case pe.Multiply:case pe.Divide:case pe.Add:case pe.Subtract:case pe.Clamp:case pe.Mod:case pe.Pow:case pe.Abs:case pe.Floor:case pe.Ceil:case pe.Round:case pe.Sin:case pe.Cos:case pe.Atan:case pe.Sqrt:return ane(t);case pe.Case:return lne(t);case pe.Match:return cne(t);case pe.Interpolate:return une(t);case pe.ToString:return dne(t);default:throw new Error(`Unsupported operator ${n}`)}}function ine(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 pe.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 pe.NotEqual:return r=>i(r)!==s(r);case pe.LessThan:return r=>i(r)i(r)<=s(r);case pe.GreaterThan:return r=>i(r)>s(r);case pe.GreaterThanOrEqualTo:return r=>i(r)>=s(r);default:throw new Error(`Unsupported comparison operator ${n}`)}}function one(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 pe.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 ane(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 pe.Add:return r=>{let o=0;for(let a=0;as[0](r)-s[1](r);case pe.Clamp:return r=>{const o=s[0](r),a=s[1](r);if(ol?l:o};case pe.Mod:return r=>s[0](r)%s[1](r);case pe.Pow:return r=>Math.pow(s[0](r),s[1](r));case pe.Abs:return r=>Math.abs(s[0](r));case pe.Floor:return r=>Math.floor(s[0](r));case pe.Ceil:return r=>Math.ceil(s[0](r));case pe.Round:return r=>Math.round(s[0](r));case pe.Sin:return r=>Math.sin(s[0](r));case pe.Cos:return r=>Math.cos(s[0](r));case pe.Atan:return i===2?r=>Math.atan2(s[0](r),s[1](r)):r=>Math.atan(s[0](r));case pe.Sqrt:return r=>Math.sqrt(s[0](r));default:throw new Error(`Unsupported numeric operator ${n}`)}}function lne(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?hne(r,o,a,l,u,d):Dc(r,o,a,l,u,d);a=u,l=d}return l}}function dne(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?Ry(o):o.toString()};default:throw new Error(`Unsupported convert operator ${n}`)}}function Dc(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 hne(t,e,n,i,s,r){if(s-n===0)return i;const a=yw(i),l=yw(r);let c=l[2]-a[2];c>180?c-=360:c<-180&&(c+=360);const u=[Dc(t,e,n,a[0],s,l[0]),Dc(t,e,n,a[1],s,l[1]),a[2]+Dc(t,e,n,0,s,c),Dc(t,e,n,i[3],s,r[3])];return vA(Ete(u))}function fne(t){return!0}function gne(t){const e=MA(),n=pne(t,e),i=IA();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=PA(s.getGeometry())),n(i)}}function kw(t){const e=MA(),n=t.length,i=new Array(n);for(let o=0;onull;i=Fy(t,e+"fill-color",n)}if(!i)return null;const s=new Zl;return function(r){const o=i(r);return o===Iy?null:(s.setColor(o),s)}}function Du(t,e,n){const i=yi(t,e+"stroke-width",n),s=Fy(t,e+"stroke-color",n);if(!i&&!s)return null;const r=sr(t,e+"stroke-line-cap",n),o=sr(t,e+"stroke-line-join",n),a=DA(t,e+"stroke-line-dash",n),l=yi(t,e+"stroke-line-dash-offset",n),c=yi(t,e+"stroke-miter-limit",n),u=new Hl;return function(d){if(s){const h=s(d);if(h===Iy)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 mne(t,e){const n="text-",i=sr(t,n+"value",e);if(!i)return null;const s=Iu(t,n,e),r=Iu(t,n+"background-",e),o=Du(t,n,e),a=Du(t,n+"background-",e),l=sr(t,n+"font",e),c=yi(t,n+"max-angle",e),u=yi(t,n+"offset-x",e),d=yi(t,n+"offset-y",e),h=Ru(t,n+"overflow",e),g=sr(t,n+"placement",e),p=yi(t,n+"repeat",e),m=Zf(t,n+"scale",e),y=Ru(t,n+"rotate-with-view",e),v=yi(t,n+"rotation",e),b=sr(t,n+"align",e),x=sr(t,n+"justify",e),E=sr(t,n+"baseline",e),w=DA(t,n+"padding",e),S=Jf(t,n+"declutter-mode"),T=new $y({declutterMode:S});return function(A){if(T.setText(i(A)),s&&T.setFill(s(A)),r&&T.setBackgroundFill(r(A)),o&&T.setStroke(o(A)),a&&T.setBackgroundStroke(a(A)),l&&T.setFont(l(A)),c&&T.setMaxAngle(c(A)),u&&T.setOffsetX(u(A)),d&&T.setOffsetY(d(A)),h&&T.setOverflow(h(A)),g){const k=g(A);if(k!=="point"&&k!=="line")throw new Error("Expected point or line for text-placement");T.setPlacement(k)}if(p&&T.setRepeat(p(A)),m&&T.setScale(m(A)),y&&T.setRotateWithView(y(A)),v&&T.setRotation(v(A)),b){const k=b(A);if(k!=="left"&&k!=="center"&&k!=="right"&&k!=="end"&&k!=="start")throw new Error("Expected left, right, center, start, or end for text-align");T.setTextAlign(k)}if(x){const k=x(A);if(k!=="left"&&k!=="right"&&k!=="center")throw new Error("Expected left, right, or center for text-justify");T.setJustify(k)}if(E){const k=E(A);if(k!=="bottom"&&k!=="top"&&k!=="middle"&&k!=="alphabetic"&&k!=="hanging")throw new Error("Expected bottom, top, middle, alphabetic, or hanging for text-baseline");T.setTextBaseline(k)}return w&&T.setPadding(w(A)),T}}function _ne(t,e){return"icon-src"in t?yne(t,e):"shape-points"in t?vne(t,e):"circle-radius"in t?bne(t,e):null}function yne(t,e){const n="icon-",i=n+"src",s=RA(t[i],i),r=Yh(t,n+"anchor",e),o=Zf(t,n+"scale",e),a=yi(t,n+"opacity",e),l=Yh(t,n+"displacement",e),c=yi(t,n+"rotation",e),u=Ru(t,n+"rotate-with-view",e),d=Pw(t,n+"anchor-origin"),h=Iw(t,n+"anchor-x-units"),g=Iw(t,n+"anchor-y-units"),p=Sne(t,n+"color"),m=Ene(t,n+"cross-origin"),y=Cne(t,n+"offset"),v=Pw(t,n+"offset-origin"),b=Hh(t,n+"width"),x=Hh(t,n+"height"),E=xne(t,n+"size"),w=Jf(t,n+"declutter-mode"),S=new qf({src:s,anchorOrigin:d,anchorXUnits:h,anchorYUnits:g,color:p,crossOrigin:m,offset:y,offsetOrigin:v,height:x,width:b,size:E,declutterMode:w});return function(T){return a&&S.setOpacity(a(T)),l&&S.setDisplacement(l(T)),c&&S.setRotation(c(T)),u&&S.setRotateWithView(u(T)),o&&S.setScale(o(T)),r&&S.setAnchor(r(T)),S}}function vne(t,e){const n="shape-",i=n+"points",s=n+"radius",r=Pm(t[i],i),o=Pm(t[s],s),a=Iu(t,n,e),l=Du(t,n,e),c=Zf(t,n+"scale",e),u=Yh(t,n+"displacement",e),d=yi(t,n+"rotation",e),h=Ru(t,n+"rotate-with-view",e),g=Hh(t,n+"radius2"),p=Hh(t,n+"angle"),m=Jf(t,n+"declutter-mode"),y=new Xf({points:r,radius:o,radius2:g,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 bne(t,e){const n="circle-",i=Iu(t,n,e),s=Du(t,n,e),r=yi(t,n+"radius",e),o=Zf(t,n+"scale",e),a=Yh(t,n+"displacement",e),l=yi(t,n+"rotation",e),c=Ru(t,n+"rotate-with-view",e),u=Jf(t,n+"declutter-mode"),d=new Zu({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 yi(t,e,n){if(!(e in t))return;const i=Cr(t[e],dt,n);return function(s){return Pm(i(s),e)}}function sr(t,e,n){if(!(e in t))return null;const i=Cr(t[e],pi,n);return function(s){return RA(i(s),e)}}function wne(t,e,n){const i=sr(t,e+"pattern-src",n),s=Mw(t,e+"pattern-offset",n),r=Mw(t,e+"pattern-size",n),o=Fy(t,e+"color",n);return function(a){return{src:i(a),offset:s&&s(a),size:r&&r(a),color:o&&o(a)}}}function Ru(t,e,n){if(!(e in t))return null;const i=Cr(t[e],ti,n);return function(s){const r=i(s);if(typeof r!="boolean")throw new Error(`Expected a boolean for ${e}`);return r}}function Fy(t,e,n){if(!(e in t))return null;const i=Cr(t[e],os,n);return function(s){return LA(i(s),e)}}function DA(t,e,n){if(!(e in t))return null;const i=Cr(t[e],ga,n);return function(s){return Ju(i(s),e)}}function Yh(t,e,n){if(!(e in t))return null;const i=Cr(t[e],ga,n);return function(s){const r=Ju(i(s),e);if(r.length!==2)throw new Error(`Expected two numbers for ${e}`);return r}}function Mw(t,e,n){if(!(e in t))return null;const i=Cr(t[e],ga,n);return function(s){return OA(i(s),e)}}function Zf(t,e,n){if(!(e in t))return null;const i=Cr(t[e],ga|dt,n);return function(s){return Tne(i(s),e)}}function Hh(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 xne(t,e){const n=t[e];if(n!==void 0){if(typeof n=="number")return wi(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 Ene(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 Pw(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 Iw(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 Cne(t,e){const n=t[e];if(n!==void 0)return Ju(n,e)}function Jf(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 Sne(t,e){const n=t[e];if(n!==void 0)return LA(n,e)}function Ju(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 OA(t,e){const n=Ju(t,e);if(n.length!==2)throw new Error(`Expected an array of two numbers for ${e}`);return n}function Tne(t,e){return typeof t=="number"?t:OA(t,e)}const Dw={RENDER_ORDER:"renderOrder"};class $A extends Kf{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(Dw.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 _A(9)),this.getRenderer().renderDeclutter(e,n)}setRenderOrder(e){this.set(Dw.RENDER_ORDER,e)}setStyle(e){this.style_=e===void 0?kA:e;const n=Ane(e);this.styleFunction_=e===null?void 0:zte(n),this.changed()}}function Ane(t){if(t===void 0)return kA;if(!t)return null;if(typeof t=="function"||t instanceof pr)return t;if(!Array.isArray(t))return kw([t]);if(t.length===0)return[];const e=t.length,n=t[0];if(n instanceof pr){const s=new Array(e);for(let r=0;r=0;--w){const S=m[w],T=S.layer;if(T.hasRenderer()&&My(S,u)&&a.call(l,T)){const A=T.getRenderer(),k=T.getSource();if(A&&k){const P=k.getWrapX()?g:e,B=d.bind(null,S.managed);b[0]=P[0]+p[E][0],b[1]=P[1]+p[E][1],c=A.forEachFeatureAtCoordinate(b,n,i,B,v)}if(c)return c}}if(v.length===0)return;const x=1/v.length;return v.forEach((E,w)=>E.distanceSq+=w*x),v.sort((E,w)=>E.distanceSq-w.distanceSq),v.some(E=>c=E.callback(E.feature,E.layer,E.geometry)),c}hasFeatureAtCoordinate(e,n,i,s,r,o){return this.forEachFeatureAtCoordinate(e,n,i,s,vu,this,r,o)!==void 0}getMap(){return this.map_}renderFrame(e){gt()}scheduleExpireIconCache(e){Is.canExpireCache()&&e.postRenderFunctions.push(Mne)}}function Mne(t,e){Is.expire()}class NA extends Er{constructor(e,n,i,s){super(e),this.inversePixelTransform=n,this.frameState=i,this.context=s}}class Pne extends kne{constructor(e){super(e),this.fontChangeListenerKey_=ht(er,Nl.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=Gf+" 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 NA(e,void 0,n);i.dispatchEvent(s)}}disposeInternal(){Rt(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(zi.PRECOMPOSE,e);const n=e.layerStatesArray.sort((a,l)=>a.zIndex-l.zIndex);n.some(a=>a.layer instanceof $A&&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 Hr extends Er{constructor(e,n){super(e),this.layer=n}}const bp={LAYERS:"layers"};class Jl extends GT{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(bp.LAYERS,this.handleLayersChanged_),i?Array.isArray(i)?i=new Ps(i.slice(),{unique:!0}):pt(typeof i.getArray=="function","Expected `layers` to be an array or a `Collection`"):i=new Ps(void 0,{unique:!0}),this.setLayers(i)}handleLayerChange_(){this.changed()}handleLayersChanged_(){this.layersListenerKeys_.forEach(Rt),this.layersListenerKeys_.length=0;const e=this.getLayers();this.layersListenerKeys_.push(ht(e,fi.ADD,this.handleLayersAdd_,this),ht(e,fi.REMOVE,this.handleLayersRemove_,this));for(const i in this.listenerKeys_)this.listenerKeys_[i].forEach(Rt);Gu(this.listenerKeys_);const n=e.getArray();for(let i=0,s=n.length;i{this.clickTimeoutId_=void 0;const i=new Fr(Jt.SINGLECLICK,this.map_,e);this.dispatchEvent(i)},250)}updateActivePointers_(e){const n=e,i=n.pointerId;if(n.type==Jt.POINTERUP||n.type==Jt.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==Jt.POINTERDOWN||n.type==Jt.POINTERMOVE)&&(this.trackedTouches_[i]=n);this.activePointers_=Object.values(this.trackedTouches_)}handlePointerUp_(e){this.updateActivePointers_(e);const n=new Fr(Jt.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(Rt),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 Fr(Jt.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(ht(i,Jt.POINTERMOVE,this.handlePointerMove_,this),ht(i,Jt.POINTERUP,this.handlePointerUp_,this),ht(this.element_,Jt.POINTERCANCEL,this.handlePointerUp_,this)),this.element_.getRootNode&&this.element_.getRootNode()!==i&&this.dragListenerKeys_.push(ht(this.element_.getRootNode(),Jt.POINTERUP,this.handlePointerUp_,this))}}handlePointerMove_(e){if(this.isMoving_(e)){this.updateActivePointers_(e),this.dragging_=!0;const n=new Fr(Jt.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 Fr(Jt.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_&&(Rt(this.relayedListenerKey_),this.relayedListenerKey_=null),this.element_.removeEventListener(et.TOUCHMOVE,this.boundHandleTouchMove_),this.pointerdownListenerKey_&&(Rt(this.pointerdownListenerKey_),this.pointerdownListenerKey_=null),this.dragListenerKeys_.forEach(Rt),this.dragListenerKeys_.length=0,this.element_=null,super.disposeInternal()}}const Br={POSTRENDER:"postrender",MOVESTART:"movestart",MOVEEND:"moveend",LOADSTART:"loadstart",LOADEND:"loadend"},Vn={LAYERGROUP:"layergroup",SIZE:"size",TARGET:"target",VIEW:"view"},jh=1/0;class Dne{constructor(e,n){this.priorityFunction_=e,this.keyFunction_=n,this.elements_=[],this.priorities_=[],this.queuedElements_={}}clear(){this.elements_.length=0,this.priorities_.length=0,Gu(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){pt(!(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!=jh?(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 Lne(t,e,n,i,s){if(!t||!(n in t.wantedTiles)||!t.wantedTiles[n][e.getKey()])return jh;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 By extends zs{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=>see(()=>s))),i=n.length>0;if(this.renderedVisible_!=i&&(this.element.style.display=i?"":"none",this.renderedVisible_=i),!Eo(n,this.renderedAttributions_)){Ate(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(Xd);!r&&i===0?this.element.classList.add(Xd):r&&i!==0&&this.element.classList.remove(Xd)}this.label_.style.transform=s}this.rotation_=i}}class Nne extends By{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+" "+Gf+" "+Oy,g=this.element;g.className=h,g.appendChild(u),g.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)}}}function Fne(t){t=t||{};const e=new Ps;return(t.zoom!==void 0?t.zoom:!0)&&e.push(new Nne(t.zoomOptions)),(t.rotate!==void 0?t.rotate:!0)&&e.push(new $ne(t.rotateOptions)),(t.attribution!==void 0?t.attribution:!0)&&e.push(new One(t.attributionOptions)),e}const Rw={ACTIVE:"active"};class Qu extends zs{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(Rw.ACTIVE)}getMap(){return this.map_}handleEvent(e){return!0}setActive(e){this.set(Rw.ACTIVE,e)}setMap(e){this.map_=e}}function Bne(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:Bee,center:t.getConstrainedCenter(s)})}}function Vy(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 Vne extends Qu{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==Jt.DBLCLICK){const i=e.originalEvent,s=e.map,r=e.coordinate,o=i.shiftKey?-this.delta_:this.delta_,a=s.getView();Vy(a,o,r,this.duration_),i.preventDefault(),n=!0}return!n}}class ed extends Qu{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==Jt.POINTERDRAG)this.handleDragEvent(e),e.originalEvent.preventDefault();else if(e.type==Jt.POINTERUP){const i=this.handleUpEvent(e);this.handlingDownUpSequence=i&&this.targetPointers.length>0}}else if(e.type==Jt.POINTERDOWN){const i=this.handleDownEvent(e);this.handlingDownUpSequence=i,n=this.stopDown(i)}else e.type==Jt.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 zy(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}}class Gne extends ed{constructor(e){e=e||{},super({stopDown:Nf}),this.condition_=e.condition?e.condition:zne,this.lastAngle_=void 0,this.duration_=e.duration!==void 0?e.duration:250}handleDragEvent(e){if(!wp(e))return;const n=e.map,i=n.getView();if(i.getConstraints().rotation===xy)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 wp(e)?(e.map.getView().endInteraction(this.duration_),!1):!0}handleDownEvent(e){return wp(e)&&BA(e)&&this.condition_(e)?(e.map.getView().beginInteraction(),this.lastAngle_=void 0,!0):!1}}class Xne extends Of{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 Cu([s])}getGeometry(){return this.geometry_}}const za={BOXSTART:"boxstart",BOXDRAG:"boxdrag",BOXEND:"boxend",BOXCANCEL:"boxcancel"};class bc extends Er{constructor(e,n,i){super(e),this.coordinate=n,this.mapBrowserEvent=i}}class qne extends ed{constructor(e){super(),this.on,this.once,this.un,e=e??{},this.box_=new Xne(e.className||"ol-dragbox"),this.minArea_=e.minArea??64,e.onBoxEnd&&(this.onBoxEnd=e.onBoxEnd),this.startPixel_=null,this.condition_=e.condition??BA,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 bc(za.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 bc(n?za.BOXEND:za.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 bc(za.BOXSTART,e.coordinate,e)),!0):!1}onBoxEnd(e){}setActive(e){e||(this.box_.setMap(null),this.startPixel_&&(this.dispatchEvent(new bc(za.BOXCANCEL,this.startPixel_,null)),this.startPixel_=null)),super.setActive(e)}setMap(e){this.getMap()&&(this.box_.setMap(null),this.startPixel_&&(this.dispatchEvent(new bc(za.BOXCANCEL,this.startPixel_,null)),this.startPixel_=null)),super.setMap(e)}}class Zne extends qne{constructor(e){e=e||{};const n=e.condition?e.condition:jne;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 Bo={LEFT:"ArrowLeft",UP:"ArrowUp",RIGHT:"ArrowRight",DOWN:"ArrowDown"};class Jne extends Qu{constructor(e){super(),e=e||{},this.defaultCondition_=function(n){return VA(n)&&zA(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==Bo.DOWN||s==Bo.LEFT||s==Bo.RIGHT||s==Bo.UP)){const o=e.map.getView(),a=o.getResolution()*this.pixelDelta_;let l=0,c=0;s==Bo.DOWN?c=-a:s==Bo.LEFT?l=-a:s==Bo.RIGHT?l=a:c=a;const u=[l,c];my(u,o.getRotation()),Bne(o,u,this.duration_),i.preventDefault(),n=!0}}return!n}}class Qne extends Qu{constructor(e){super(),e=e||{},this.condition_=e.condition?e.condition:function(n){return!Hne(n)&&zA(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();Vy(a,o,void 0,this.duration_),i.preventDefault(),n=!0}}return!n}}class eie{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 tie extends Qu{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:Yne;this.condition_=e.onFocusOnly?Dm(FA,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,Cte&&s.deltaMode===WheelEvent.DOM_DELTA_PIXEL&&(r/=wA),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=-nn(this.totalDelta_,-this.maxDelta_*this.deltaPerZoom_,this.maxDelta_*this.deltaPerZoom_)/this.deltaPerZoom_;(n.getConstrainResolution()||this.constrainResolution_)&&(i=i?i>0?1:-1:0),Vy(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)}}class nie extends ed{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!==xy&&(this.anchor_=o.getCoordinateFromPixelInternal(o.getEventPixel(zy(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 iie extends ed{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(zy(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}}function sie(t){t=t||{};const e=new Ps,n=new eie(-.005,.05,100);return(t.altShiftDragRotate!==void 0?t.altShiftDragRotate:!0)&&e.push(new Gne),(t.doubleClickZoom!==void 0?t.doubleClickZoom:!0)&&e.push(new Vne({delta:t.zoomDelta,duration:t.zoomDuration})),(t.dragPan!==void 0?t.dragPan:!0)&&e.push(new Une({onFocusOnly:t.onFocusOnly,kinetic:n})),(t.pinchRotate!==void 0?t.pinchRotate:!0)&&e.push(new nie),(t.pinchZoom!==void 0?t.pinchZoom:!0)&&e.push(new iie({duration:t.zoomDuration})),(t.keyboard!==void 0?t.keyboard:!0)&&(e.push(new Jne),e.push(new Qne({delta:t.zoomDelta,duration:t.zoomDuration}))),(t.mouseWheelZoom!==void 0?t.mouseWheelZoom:!0)&&e.push(new tie({onFocusOnly:t.onFocusOnly,duration:t.zoomDuration})),(t.shiftDragZoom!==void 0?t.shiftDragZoom:!0)&&e.push(new Zne({duration:t.zoomDuration})),e}function WA(t){if(t instanceof Kf){t.setMapInternal(null);return}t instanceof Jl&&t.getLayers().forEach(WA)}function YA(t,e){if(t instanceof Kf){t.setMapInternal(e);return}if(t instanceof Jl){const n=t.getLayers().getArray();for(let i=0,s=n.length;ithis.updateSize()),this.controls=n.controls||Fne(),this.interactions=n.interactions||sie({onFocusOnly:!0}),this.overlays_=n.overlays,this.overlayIdIndex_={},this.renderer_=null,this.postRenderFunctions_=[],this.tileQueue_=new Rne(this.getTilePriority.bind(this),this.handleTileChange_.bind(this)),this.addChangeListener(Vn.LAYERGROUP,this.handleLayerGroupChanged_),this.addChangeListener(Vn.VIEW,this.handleViewChanged_),this.addChangeListener(Vn.SIZE,this.handleSizeChanged_),this.addChangeListener(Vn.TARGET,this.handleTargetChanged_),this.setProperties(n.values);const i=this;e.view&&!(e.view instanceof Ts)&&e.view.then(function(s){i.setView(new Ts(s))}),this.controls.addEventListener(fi.ADD,s=>{s.element.setMap(this)}),this.controls.addEventListener(fi.REMOVE,s=>{s.element.setMap(null)}),this.interactions.addEventListener(fi.ADD,s=>{s.element.setMap(this)}),this.interactions.addEventListener(fi.REMOVE,s=>{s.element.setMap(null)}),this.overlays_.addEventListener(fi.ADD,s=>{this.addOverlayInternal_(s.element)}),this.overlays_.addEventListener(fi.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){YA(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:vu,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 Jl?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:vu,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(Vn.TARGET)}getTargetElement(){return this.targetElement_}getCoordinateFromPixel(e){return Tm(this.getCoordinateFromPixelInternal(e),this.getView().getProjection())}getCoordinateFromPixelInternal(e){const n=this.frameState_;return n?On(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(Vn.LAYERGROUP)}setLayers(e){const n=this.getLayerGroup();if(e instanceof Ps){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[Wn.ANIMATING]||o[Wn.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 Hr("removelayer",n)),this.set(Vn.LAYERGROUP,e)}setSize(e){this.set(Vn.SIZE,e)}setTarget(e){this.set(Vn.TARGET,e)}setView(e){if(!e||e instanceof Ts){this.set(Vn.VIEW,e);return}this.set(Vn.VIEW,new Ts);const n=this;e.then(function(i){n.setView(new Ts(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)],!pw(n)&&(e.offsetWidth||e.offsetHeight||e.getClientRects().length)&&iA("No map visible because the map container's width or height are 0."))}const i=this.getSize();n&&(!i||!Eo(n,i))&&(this.setSize(n),this.updateViewportSize_(n))}updateViewportSize_(e){const n=this.getView();n&&n.setViewportSize(e)}};function oie(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 Jl({layers:t.layers});n[Vn.LAYERGROUP]=i,n[Vn.TARGET]=t.target,n[Vn.VIEW]=t.view instanceof Ts?t.view:new Ts;let s;t.controls!==void 0&&(Array.isArray(t.controls)?s=new Ps(t.controls.slice()):(pt(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 Ps(t.interactions.slice()):(pt(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 Ps(t.overlays.slice()):(pt(typeof t.overlays.getArray=="function","Expected `overlays` to be an array or an `ol/Collection.js`"),o=t.overlays):o=new Ps,{controls:s,interactions:r,keyboardEventTarget:e,overlays:o,values:n}}class Wy 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(){gt()}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:lA(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 HA extends Wy{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_=aie(),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_=Mte(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 aie(){const t=dn(1,1);return t.fillStyle="rgba(0,0,0,0)",t.fillRect(0,0,1,1),t.canvas}const jA=.5,lie=10,Lw=.25;class KA{constructor(e,n,i,s,r,o){this.sourceProj_=e,this.targetProj_=n;let a={};const l=Fh(this.targetProj_,this.sourceProj_);this.transformInv_=function(b){const x=b[0]+"/"+b[1];return a[x]||(a[x]=l(b)),a[x]},this.maxSourceExtent_=s,this.errorThresholdSquared_=r*r,this.triangles_=[],this.wrapsXInSource_=!1,this.canWrapXInSource_=this.sourceProj_.canWrapX()&&!!s&&!!this.sourceProj_.getExtent()&&yt(s)>=yt(this.sourceProj_.getExtent()),this.sourceWorldWidth_=this.sourceProj_.getExtent()?yt(this.sourceProj_.getExtent()):null,this.targetWorldWidth_=this.targetProj_.getExtent()?yt(this.targetProj_.getExtent()):null;const c=wa(i),u=Wf(i),d=zf(i),h=Vf(i),g=this.transformInv_(c),p=this.transformInv_(u),m=this.transformInv_(d),y=this.transformInv_(h),v=lie+(o?Math.max(0,Math.ceil(Math.log2(wu(i)/(o*o*256*256)))):0);if(this.addQuad_(c,u,d,h,g,p,m,y,v),this.wrapsXInSource_){let b=1/0;this.triangles_.forEach(function(x,E,w){b=Math.min(b,x.source[0][0],x.source[1][0],x.source[2][0])}),this.triangles_.forEach(x=>{if(Math.max(x.source[0][0],x.source[1][0],x.source[2][0])-b>this.sourceWorldWidth_/2){const E=[[x.source[0][0],x.source[0][1]],[x.source[1][0],x.source[1][1]],[x.source[2][0],x.source[2][1]]];E[0][0]-b>this.sourceWorldWidth_/2&&(E[0][0]-=this.sourceWorldWidth_),E[1][0]-b>this.sourceWorldWidth_/2&&(E[1][0]-=this.sourceWorldWidth_),E[2][0]-b>this.sourceWorldWidth_/2&&(E[2][0]-=this.sourceWorldWidth_);const w=Math.min(E[0][0],E[1][0],E[2][0]);Math.max(E[0][0],E[1][0],E[2][0])-w.5&&d<1;let p=!1;if(c>0){if(this.targetProj_.isGlobal()&&this.targetWorldWidth_){const y=ew([e,n,i,s]);p=yt(y)/this.targetWorldWidth_>Lw||p}!g&&this.sourceProj_.isGlobal()&&d&&(p=d>Lw||p)}if(!p&&this.maxSourceExtent_&&isFinite(u[0])&&isFinite(u[1])&&isFinite(u[2])&&isFinite(u[3])&&!_i(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;g?b=(dl(r[0],h)+dl(a[0],h))/2-dl(v[0],h):b=(r[0]+a[0])/2-v[0];const x=(r[1]+a[1])/2-v[1];p=b*b+x*x>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],x=this.transformInv_(b);this.addQuad_(e,n,y,b,r,o,v,x,c-1),this.addQuad_(b,y,i,s,x,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],x=this.transformInv_(b);this.addQuad_(e,y,b,s,r,v,x,l,c-1),this.addQuad_(y,n,i,b,v,o,a,x,c-1)}return}}if(g){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;Zc(e,r[0]),Zc(e,r[1]),Zc(e,r[2])}),e}getTriangles(){return this.triangles_}}let xp;const mr=[];function Ow(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 Ep(t,e){return Math.abs(t[e*4]-210)>2||Math.abs(t[e*4+3]-.75*255)>2}function cie(){if(xp===void 0){const t=dn(6,6,mr);t.globalCompositeOperation="lighter",t.fillStyle="rgba(210, 0, 0, 0.75)",Ow(t,4,5,4,0),Ow(t,4,5,0,5);const e=t.getImageData(0,0,3,3).data;xp=Ep(e,0)||Ep(e,4)||Ep(e,8),zl(t),mr.push(t.canvas)}return xp}function $w(t,e,n,i){const s=oA(n,e,t);let r=nw(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||Vl(l,s)){const c=nw(t,r,s)/r;isFinite(c)&&c>0&&(r/=c)}return r}function UA(t,e,n,i){const s=fa(n);let r=$w(t,e,s,i);return(!isFinite(r)||r<=0)&&eA(n,function(o){return r=$w(t,e,o,i),isFinite(r)&&r>0}),r}function GA(t,e,n,i,s,r,o,a,l,c,u,d,h,g){const p=dn(Math.round(n*t),Math.round(n*e),mr);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,S,T){vee(y,w.extent)});let v;const b=n/i,x=(d?1:1+Math.pow(2,-24))/b;if(!h||l.length!==1||c!==0){if(v=dn(Math.round(yt(y)*b),Math.round(jn(y)*b),mr),d||(v.imageSmoothingEnabled=!1),s&&g){const w=(s[0]-y[0])*b,S=-(s[3]-y[3])*b,T=yt(s)*b,A=jn(s)*b;v.rect(w,S,T,A),v.clip()}l.forEach(function(w,S,T){if(w.image.width>0&&w.image.height>0){if(w.clipExtent){v.save();const Y=(w.clipExtent[0]-y[0])*b,ne=-(w.clipExtent[3]-y[3])*b,$=yt(w.clipExtent)*b,F=jn(w.clipExtent)*b;v.rect(d?Y:Math.round(Y),d?ne:Math.round(ne),d?$:Math.round(Y+$)-Math.round(Y),d?F:Math.round(ne+F)-Math.round(ne)),v.clip()}const A=(w.extent[0]-y[0])*b,k=-(w.extent[3]-y[3])*b,P=yt(w.extent)*b,B=jn(w.extent)*b;v.drawImage(w.image,c,c,w.image.width-2*c,w.image.height-2*c,d?A:Math.round(A),d?k:Math.round(k),d?P:Math.round(A+P)-Math.round(A),d?B:Math.round(k+B)-Math.round(k)),w.clipExtent&&v.restore()}})}const E=wa(o);return a.getTriangles().forEach(function(w,S,T){const A=w.source,k=w.target;let P=A[0][0],B=A[0][1],Y=A[1][0],ne=A[1][1],$=A[2][0],F=A[2][1];const D=m((k[0][0]-E[0])/r),z=m(-(k[0][1]-E[1])/r),X=m((k[1][0]-E[0])/r),Z=m(-(k[1][1]-E[1])/r),H=m((k[2][0]-E[0])/r),le=m(-(k[2][1]-E[1])/r),ie=P,te=B;P=0,B=0,Y-=ie,ne-=te,$-=ie,F-=te;const I=[[Y,ne,0,0,X-D],[$,F,0,0,H-D],[0,0,Y,ne,Z-z],[0,0,$,F,le-z]],ee=lee(I);if(!ee)return;if(p.save(),p.beginPath(),cie()||!d){p.moveTo(X,Z);const L=4,ae=D-X,de=z-Z;for(let ve=0;ve{const P=n.getTileRangeForExtentAndZ(k,this.sourceZ_);for(let B=P.minX;B<=P.maxX;B++)for(let Y=P.minY;Y<=P.maxY;Y++){const ne=c(this.sourceZ_,B,Y,a);if(ne){const $=T*S;this.sourceTiles_.push({tile:ne,offset:$})}}++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_=GA(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=ht(n,et.CHANGE,r=>{const o=n.getState();(o==Fe.LOADED||o==Fe.ERROR||o==Fe.EMPTY)&&(Rt(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(Rt),this.sourcesListenerKeys_=null}release(){this.canvas_&&(zl(this.canvas_.getContext("2d")),mr.push(this.canvas_),this.canvas_=null),super.release()}}const Cp={TILELOADSTART:"tileloadstart",TILELOADEND:"tileloadend",TILELOADERROR:"tileloaderror"};class XA extends zs{constructor(e){super(),this.projection=Gi(e.projection),this.attributions_=Nw(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_=Nw(e),this.changed()}setState(e){this.state_=e,this.changed()}}function Nw(t){return t?typeof t=="function"?t:(Array.isArray(t)||(t=[t]),e=>t):null}class Yy{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 Wa(t,e,n,i,s){return s!==void 0?(s.minX=t,s.maxX=e,s.minY=n,s.maxY=i,s):new Yy(t,e,n,i)}function Kh(t,e,n,i){return i!==void 0?(i[0]=t,i[1]=e,i[2]=n,i):[t,e,n]}function uie(t,e,n){return t+"/"+e+"/"+n}function die(t){return hie(t[0],t[1],t[2])}function hie(t,e,n){return(e<n||n>e.getMaxZoom())return!1;const r=e.getFullTileRange(n);return r?r.containsXY(i,s):!0}const Ya=[0,0,0],Dr=5;class qA{constructor(e){this.minZoom=e.minZoom!==void 0?e.minZoom:0,this.resolutions_=e.resolutions,pt(iee(this.resolutions_,(s,r)=>r-s),"`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 Yy(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=Wa(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(g,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 Pie(t,e){t.getImage().src=e}class Iie extends Mie{constructor(e){e=e||{};const n=e.projection!==void 0?e.projection:"EPSG:3857",i=e.tileGrid!==void 0?e.tileGrid:mie({extent:Hy(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 Die='© OpenStreetMap contributors.';class Rie extends Iie{constructor(e){e=e||{};let n;e.attributions!==void 0?n=e.attributions:n=[Die];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 Zd={PRELOAD:"preload",USE_INTERIM_TILES_ON_ERROR:"useInterimTilesOnError"};class Lie extends Kf{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(Zd.PRELOAD)}setPreload(e){this.set(Zd.PRELOAD,e)}getUseInterimTilesOnError(){return this.get(Zd.USE_INTERIM_TILES_ON_ERROR)}setUseInterimTilesOnError(e){this.set(Zd.USE_INTERIM_TILES_ON_ERROR,e)}getData(e){return super.getData(e)}}const Oie=5;class $ie extends Xu{constructor(e){super(),this.ready=!0,this.boundHandleImageChange_=this.handleImageChange_.bind(this),this.layer_=e,this.staleKeys_=new Array,this.maxStaleKeys=Oie}getStaleKeys(){return this.staleKeys_}prependStaleKey(e){this.staleKeys_.unshift(e),this.staleKeys_.length>this.maxStaleKeys&&(this.staleKeys_.length=this.maxStaleKeys)}getFeatures(e){return gt()}getData(e){return null}prepareFrame(e){return gt()}renderFrame(e,n){return gt()}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 QA{constructor(){this.instructions_=[],this.zIndex=0,this.offset_=0,this.context_=new Proxy(Vh(),{get:(e,n)=>{if(typeof Vh()[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 Of&&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 pt(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 pt(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){pt(!(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 Yie 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(wu(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=UA(n,u,l,c);if(!isFinite(d)||d<=0){this.state=Fe.EMPTY;return}const h=e.errorThreshold!==void 0?e.errorThreshold:jA;if(this.triangulation_=new KA(n,u,l,a,d*h,c),this.triangulation_.getTriangles().length===0){this.state=Fe.EMPTY;return}this.sourceZ_=this.sourceTileGrid_.getZForResolution(d);let g=this.triangulation_.calculateSourceExtent();if(a&&(n.canWrapX()?(g[1]=nn(g[1],a[1],a[3]),g[3]=nn(g[3],a[1],a[3])):g=ls(g,a)),!wu(g))this.state=Fe.EMPTY;else{let p=0,m=0;n.canWrapX()&&(p=yt(i),m=Math.floor((g[0]-i[0])/p)),py(g.slice(),n,!0).forEach(v=>{const b=this.sourceTileGrid_.getTileRangeForExtentAndZ(v,this.sourceZ_),x=e.getTileFunction;for(let E=b.minX;E<=b.maxX;E++)for(let w=b.minY;w<=b.maxY;w++){const S=x(this.sourceZ_,E,w,this.pixelRatio_);if(S){const T=m*p;this.sourceTiles_.push({tile:S,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 x=Fie(m.getData());x?b=x:(n=!0,b=Vie(Uh(m.getData())));const E=[y[0]+2*v,y[1]+2*v],w=b instanceof Float32Array,S=E[0]*E[1],T=w?Float32Array:Uint8ClampedArray,A=new T(b.buffer),k=T.BYTES_PER_ELEMENT,P=k*A.length/S,B=A.byteLength/E[1],Y=Math.floor(B/k/E[0]),ne=S*Y;let $=A;if(A.length!==ne){$=new T(ne);let z=0,X=0;const Z=E[0]*Y;for(let H=0;H=0;--p){const m=[];for(let w=0,S=e.length;w{const i=n.getState();if(i!==Fe.IDLE&&i!==Fe.LOADING)return;e++;const s=ht(n,et.CHANGE,()=>{const r=n.getState();(r==Fe.LOADED||r==Fe.ERROR||r==Fe.EMPTY)&&(Rt(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(Rt),this.sourcesListenerKeys_=null}}function Sp(t,e,n,i){return`${t},${uie(e,n,i)}`}function Tp(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 Hie(t,e,n){const i=t[n];return i?i.delete(e):!1}function Bw(t,e){const n=t.layerStatesArray[t.layerIndex];n.extent&&(e=ls(e,Zr(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 jie extends ek{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 Yy(0,0,0,0),this.tempTileCoord_=Kh(0,0,0);const i=n.cacheSize!==void 0?n.cacheSize:512;this.tileCache_=new Wie(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=On(n.pixelToCoordinateTransform,e.slice()),r=i.getExtent();if(r&&!Vl(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 g=l.getOrigin(u),p=wi(l.getTileSize(u)),m=l.getResolution(u);let y;if(h instanceof HA||h instanceof Rm)y=h.getImage();else if(h instanceof Lm){if(y=Uh(h.getData()),!y)continue}else continue;const v=Math.floor(c*((s[0]-g[0])/m-d[1]*p[0])),b=Math.floor(c*((g[1]-s[1])/m-d[2]*p[1])),x=Math.round(c*a.getGutterForProjection(o.projection));return this.getImageData(y,v+x,b+x)}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(),g=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>=g;--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 x=this.getTile(p,v,b,e);if(!x||!Tp(s,x,p))continue;const w=x.getKey();if(d[w]=!0,x.getState()===Fe.IDLE&&!e.tileQueue.isKeyQueued(w)){const S=Kh(p,v,b,this.tempTileCoord_);e.tileQueue.enqueue([x,u,c.getTileCoordCenter(S),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,g-1,A,k-1)},0),!(g in A))return this.container;const B=wt(this),Y=e.time;for(const H of A[g]){const le=H.getState();if((H instanceof Rm||H instanceof Yie)&&le===Fe.EMPTY)continue;const ie=H.tileCoord;if(le===Fe.LOADED&&H.getAlpha(B,Y)===1){H.endTransition(B);continue}if(this.renderComplete=!1,this.findStaleTile_(ie,A)){Hie(A,H,g),e.animate=!0;continue}if(this.findAltTiles_(h,ie,g+1,A))continue;const ee=h.getMinZoom();for(let ue=g-1;ue>=ee&&!this.findAltTiles_(h,ie,ue,A);--ue);}const ne=p/o*l/v,$=this.getRenderContext(e);br(this.tempTransform,b/2,x/2,ne,ne,0,-b/2,-x/2),i.extent&&this.clipUnrotated($,e,E),u.getInterpolate()||($.imageSmoothingEnabled=!1),this.preRender($,e);const F=Object.keys(A).map(Number);F.sort(hr);let D;const z=[],X=[];for(let H=F.length-1;H>=0;--H){const le=F[H],ie=u.getTilePixelSize(le,l,r),I=h.getResolution(le)/p,ee=ie[0]*I*ne,ue=ie[1]*I*ne,L=h.getTileCoordForCoordAndZ(wa(T),le),ae=h.getTileCoordExtent(L),de=On(this.tempTransform,[v*(ae[0]-T[0])/p,v*(T[3]-ae[3])/p]),ve=v*u.getGutterForProjection(r);for(const W of A[le]){if(W.getState()!==Fe.LOADED)continue;const fe=W.tileCoord,C=L[1]-fe[1],O=Math.round(de[0]-(C-1)*ee),K=L[2]-fe[2],U=Math.round(de[1]-(K-1)*ue),re=Math.round(de[0]-C*ee),j=Math.round(de[1]-K*ue),se=O-re,Q=U-j,ge=F.length===1;let _e=!1;D=[re,j,re+se,j,re+se,j+Q,re,j+Q];for(let ye=0,ke=z.length;ye{const ie=wt(u),te=le.wantedTiles[ie],I=te?Object.keys(te).length:0;this.updateCacheSize(I),this.tileCache_.expireCache()};return e.postRenderFunctions.push(Z),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=Uh(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],g=h.opacity*(l?e.getAlpha(d,n.time):1),p=g!==u.globalAlpha;p&&(u.save(),u.globalAlpha=g),u.drawImage(c,a,a,c.width-2*a,c.height-2*a,i,s,r,o),p&&u.restore(),g!==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 Kie extends Lie{constructor(e){super(e)}createRenderer(){return new jie(this,{cacheSize:this.getCacheSize()})}}class Jc extends zs{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 Jc(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_&&(Rt(this.geometryChangeKey_),this.geometryChangeKey_=null);const e=this.getGeometry();e&&(this.geometryChangeKey_=ht(e,et.CHANGE,this.handleGeometryChange_,this)),this.changed()}setGeometry(e){this.set(this.geometryName_,e)}setStyle(e){this.style_=e,this.styleFunction_=e?Uie(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 Uie(t){if(typeof t=="function")return t;let e;return Array.isArray(t)?e=t:(pt(typeof t.getZIndex=="function","Expected an `ol/style/Style` or an array of `ol/style/Style.js`"),e=[t]),function(){return e}}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 g=[0];for(let y=e+i;y1?o:2,r=r||new Array(o);for(let u=0;u>1;sl&&(this.instructions.push([Ke.CUSTOM,l,u,e,i,Go,r]),this.hitDetectionInstructions.push([Ke.CUSTOM,l,u,e,s||i,Go,r]));break;case"Point":c=e.getFlatCoordinates(),this.coordinates.push(c[0],c[1]),u=this.coordinates.length,this.instructions.push([Ke.CUSTOM,l,u,e,i,void 0,r]),this.hitDetectionInstructions.push([Ke.CUSTOM,l,u,e,s||i,void 0,r]);break}this.endGeometry(n)}beginGeometry(e,n,i){this.beginGeometryInstruction1_=[Ke.BEGIN_GEOMETRY,n,0,e,i],this.instructions.push(this.beginGeometryInstruction1_),this.beginGeometryInstruction2_=[Ke.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=[Ke.SET_FILL_STYLE,n];return typeof n!="string"&&i.push(e.fillPatternScale),i}applyStroke(e){this.instructions.push(this.createStroke(e))}createStroke(e){return[Ke.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&&!Eo(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=[Ke.END_GEOMETRY,e];this.instructions.push(n),this.hitDetectionInstructions.push(n)}getBufferedMaxExtent(){if(!this.bufferedMaxExtent_&&(this.bufferedMaxExtent_=qT(this.maxExtent),this.maxLineWidth>0)){const e=this.resolution*(this.maxLineWidth+1)/2;hy(this.bufferedMaxExtent_,e,this.bufferedMaxExtent_)}return this.bufferedMaxExtent_}}class Xie extends td{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&&!Vl(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([Ke.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([Ke.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+g)/g,m=Ai(c,d,p),y=Ai(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 Jie(t,e,n,i,s){let r=n,o=n,a=0,l=0,c=n,u,d,h,g,p,m,y,v,b,x;for(d=n;dt&&(l>a&&(a=l,r=c,o=d),l=0,c=d-s)),h=g,y=b,v=x),p=E,m=w}return l+=g,l>a?[c,d]:[r,o]}const Xh={left:0,center:.5,right:1,top:0,middle:.5,hanging:.2,alphabetic:.8,ideographic:.8,bottom:1};class Qie extends td{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[gi]={fillStyle:gi},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(!_i(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+E)*2]===u[E*d]&&a[(b+E)*2+1]===u[E*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!=qo&&(o.scale[0]<0||o.scale[1]<0)){let b=o.padding[0],x=o.padding[1],E=o.padding[2],w=o.padding[3];o.scale[0]<0&&(x=-x,w=-w),o.scale[1]<0&&(b=-b,E=-E),p=[b,x,E,w]}const m=this.pixelRatio;this.instructions.push([Ke.DRAW_IMAGE,l,g,null,NaN,NaN,NaN,1,0,0,this.textRotateWithView_,this.textRotation_,[1,1],NaN,this.declutterMode_,this.declutterImageWithText_,p==qo?qo: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=gi,this.hitDetectionInstructions.push(this.createFill(this.state))),this.hitDetectionInstructions.push([Ke.DRAW_IMAGE,l,g,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_?gi: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||Mu,justify:n.justify,textBaseline:n.textBaseline||zh,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=Xh[s.textBaseline],u=this.textOffsetY_*l,d=this.text_,h=i?i.lineWidth*Math.abs(s.scale[0])/2:0;this.instructions.push([Ke.DRAW_CHARS,e,n,c,s.overflow,a,s.maxAngle,l,u,r,h*l,d,o,1,this.declutterMode_]),this.hitDetectionInstructions.push([Ke.DRAW_CHARS,e,n,c,s.overflow,a&&gi,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=Ds(o.getColor()||gi)):(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()||Wl,r.lineDash=p?p.slice():fr,r.lineDashOffset=m===void 0?gr:m,r.lineJoin=a.getLineJoin()||Yl,r.lineWidth=y===void 0?Pu:y,r.miterLimit=v===void 0?Au:v,r.strokeStyle=Ds(a.getColor()||ku)}i=this.textState_;const l=e.getFont()||TA;$te(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()||zh,i.backgroundFill=e.getBackgroundFill(),i.backgroundStroke=e.getBackgroundStroke(),i.padding=e.getPadding()||qo,i.scale=c===void 0?[1,1]:c;const u=e.getOffsetX(),d=e.getOffsetY(),h=e.getRotateWithView(),g=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_=g===void 0?0:g,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 ese={Circle:zw,Default:td,Image:Xie,LineString:qie,Polygon:zw,Text:Qie};class tse{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=ese[n];r=new o(this.tolerance_,this.maxExtent_,this.resolution_,this.pixelRatio_),s[n]=r}return r}}function nse(t,e,n,i,s,r,o,a,l,c,u,d){let h=t[e],g=t[e+1],p=0,m=0,y=0,v=0;function b(){p=h,m=g,e+=i,h=t[e],g=t[e+1],v+=y,y=Math.sqrt((h-p)*(h-p)+(g-m)*(g-m))}do b();while(eD[2]}else B=E>k;const Y=Math.PI,ne=[],$=S+i===e;e=S,y=0,v=T,h=t[e],g=t[e+1];let F;if($){b(),F=Math.atan2(g-m,h-p),B&&(F+=F>0?-Y:Y);const D=(k+E)/2,z=(P+w)/2;return ne[0]=[D,z,(A-r)/2,F,s],ne}s=s.replace(/\n/g," ");for(let D=0,z=s.length;D0?-Y:Y),F!==void 0){let I=X-F;if(I+=I>Y?-2*Y:I<-Y?2*Y:0,Math.abs(I)>o)return null}F=X;const Z=D;let H=0;for(;D0&&t.push(` +`,""),t.push(e,""),t}class sse{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_=hs(),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 QA: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?Xh[l.justify]:Ap(Array.isArray(e)?e[0]:e,l.textAlign||Mu),h=s&&o.lineWidth?o.lineWidth:0,g=Array.isArray(e)?e:String(e).split(` +`).reduce(ise,[]),{width:p,height:m,widths:y,heights:v,lineWidths:b}=Fte(l,g),x=p+h,E=[],w=(x+2)*u[0],S=(m+h)*u[1],T={width:w<0?Math.floor(w):Math.ceil(w),height:S<0?Math.floor(S):Math.ceil(S),contextInstructions:E};(u[0]!=1||u[1]!=1)&&E.push("scale",u),s&&(E.push("strokeStyle",o.strokeStyle),E.push("lineWidth",h),E.push("lineCap",o.lineCap),E.push("lineJoin",o.lineJoin),E.push("miterLimit",o.miterLimit),E.push("setLineDash",[o.lineDash]),E.push("lineDashOffset",o.lineDashOffset)),i&&E.push("fillStyle",a.fillStyle),E.push("textBaseline","middle"),E.push("textAlign","center");const A=.5-d;let k=d*x+A*h;const P=[],B=[];let Y=0,ne=0,$=0,F=0,D;for(let z=0,X=g.length;ze?e-c:r,E=o+u>n?n-u:o,w=p[3]+x*h[0]+p[1],S=p[0]+E*h[1]+p[2],T=v-p[3],A=b-p[0];(m||d!==0)&&(Rr[0]=T,Lr[0]=T,Rr[1]=A,Gs[1]=A,Gs[0]=T+w,Xs[0]=Gs[0],Xs[1]=A+S,Lr[1]=Xs[1]);let k;return d!==0?(k=br(hs(),i,s,1,1,d,-i,-s),On(k,Rr),On(k,Gs),On(k,Xs),On(k,Lr),uo(Math.min(Rr[0],Gs[0],Xs[0],Lr[0]),Math.min(Rr[1],Gs[1],Xs[1],Lr[1]),Math.max(Rr[0],Gs[0],Xs[0],Lr[0]),Math.max(Rr[1],Gs[1],Xs[1],Lr[1]),ja)):uo(Math.min(T,T+w),Math.min(A,A+S),Math.max(T,T+w),Math.max(A,A+S),ja),g&&(v=Math.round(v),b=Math.round(b)),{drawImageX:v,drawImageY:b,drawImageW:x,drawImageH:E,originX:c,originY:u,declutterBox:{minX:ja[0],minY:ja[1],maxX:ja[2],maxY:ja[3],value:y},canvasTransform:k,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,Rr,Gs,Xs,Lr,o,a),Bte(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=On(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=Ap(Array.isArray(e)?e[0]:e,r.textAlign||Mu),u=Xh[r.textBaseline||zh],d=a&&a.lineWidth?a.lineWidth:0,h=o.width/l-2*r.scale[0],g=c*h+2*(.5-c)*d,p=u*o.height/l+2*(.5-u)*d;return{label:o,anchorX:g,anchorY:p}}execute_(e,n,i,s,r,o,a,l){const c=this.zIndexContext_;let u;this.pixelCoordinates_&&Eo(i,this.renderedTransform_)?u=this.pixelCoordinates_:(this.pixelCoordinates_||(this.pixelCoordinates_=[]),u=io(this.coordinates,0,this.coordinates.length,2,i,this.pixelCoordinates_),Vee(this.renderedTransform_,i));let d=0;const h=s.length;let g=0,p,m,y,v,b,x,E,w,S,T,A,k,P,B=0,Y=0,ne=null,$=null;const F=this.coordinateCache_,D=this.viewRotation_,z=Math.round(Math.atan2(-i[1],i[0])*1e12)/1e12,X={context:e,pixelRatio:this.pixelRatio,resolution:this.resolution,rotation:D},Z=this.instructions!=s||this.overlaps?0:200;let H,le,ie,te;for(;dZ&&(this.fill_(e),B=0),Y>Z&&(e.stroke(),Y=0),!B&&!Y&&(e.beginPath(),b=NaN,x=NaN),++d;break;case Ke.CIRCLE:g=I[1];const ue=u[g],L=u[g+1],ae=u[g+2],de=u[g+3],ve=ae-ue,W=de-L,fe=Math.sqrt(ve*ve+W*W);e.moveTo(ue+fe,L),e.arc(ue,L,fe,0,2*Math.PI,!0),++d;break;case Ke.CLOSE_PATH:e.closePath(),++d;break;case Ke.CUSTOM:g=I[1],p=I[2];const C=I[3],O=I[4],K=I[5];X.geometry=C,X.feature=H,d in F||(F[d]=[]);const U=F[d];K?K(u,g,p,2,U):(U[0]=u[g],U[1]=u[g+1],U.length=2),c&&(c.zIndex=I[6]),O(U,X),++d;break;case Ke.DRAW_IMAGE:g=I[1],p=I[2],S=I[3],m=I[4],y=I[5];let re=I[6];const j=I[7],se=I[8],Q=I[9],ge=I[10];let _e=I[11];const ye=I[12];let ke=I[13];v=I[14]||"declutter";const Me=I[15];if(!S&&I.length>=20){T=I[19],A=I[20],k=I[21],P=I[22];const pn=this.drawLabelWithPointPlacement_(T,A,k,P);S=pn.label,I[3]=S;const Cn=I[23];m=(pn.anchorX-Cn)*this.pixelRatio,I[4]=m;const Sn=I[24];y=(pn.anchorY-Sn)*this.pixelRatio,I[5]=y,re=S.height,I[6]=re,ke=S.width,I[13]=ke}let Be;I.length>25&&(Be=I[25]);let ze,nt,Qe;I.length>17?(ze=I[16],nt=I[17],Qe=I[18]):(ze=qo,nt=!1,Qe=!1),ge&&z?_e+=D:!ge&&!z&&(_e-=D);let qt=0;for(;g!ik.includes(t));class ose{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_=hs(),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 sse(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"||g!=="Image"&&g!=="Text"||o.includes(w)){const B=(h[k]-3)/4,Y=s-B%a,ne=s-(B/a|0),$=r(w,S,Y*Y+ne*ne);if($)return $}u.clearRect(0,0,a,a);break}}const m=Object.keys(this.executorsByZIndex_).map(Number);m.sort(hr);let y,v,b,x,E;for(y=m.length-1;y>=0;--y){const w=m[y].toString();for(b=this.executorsByZIndex_[w],v=il.length-1;v>=0;--v)if(g=il[v],x=b[g],x!==void 0&&(E=x.executeHitDetection(u,l,i,p,d),E))return E}}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 io(a,0,8,2,e,a),a}isEmpty(){return Bl(this.executorsByZIndex_)}execute(e,n,i,s,r,o,a){const l=Object.keys(this.executorsByZIndex_).map(Number);l.sort(hr),o=o||il;const c=il.length;let u,d,h,g,p;for(a&&l.reverse(),u=0,d=l.length;uv.execute(w,n,i,s,r,a)),E&&x.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(hr);for(let i=0,s=n.length;i{r.draw(this.renderedContext_),r.clear()}),e[n[i]].length=0}}const kp={};function ase(t){if(kp[t]!==void 0)return kp[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||gr)*this.pixelRatio_,lineJoin:a!==void 0?a:Yl,lineWidth:(l!==void 0?l:Pu)*this.pixelRatio_,miterLimit:c!==void 0?c:Au,strokeStyle:Ds(i||ku)}}}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 g=n.getColor();this.textFillState_={fillStyle:Ds(g||gi)}}const i=e.getStroke();if(!i)this.textStrokeState_=null;else{const g=i.getColor(),p=i.getLineCap(),m=i.getLineDash(),y=i.getLineDashOffset(),v=i.getLineJoin(),b=i.getWidth(),x=i.getMiterLimit();this.textStrokeState_={lineCap:p!==void 0?p:Wl,lineDash:m||fr,lineDashOffset:y||gr,lineJoin:v!==void 0?v:Yl,lineWidth:b!==void 0?b:Pu,miterLimit:x!==void 0?x:Au,strokeStyle:Ds(g||ku)}}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:TA,textAlign:d!==void 0?d:Mu,textBaseline:h!==void 0?h:zh},this.text_=u!==void 0?Array.isArray(u)?u.reduce((g,p,m)=>g+=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 As=.5;function cse(t,e,n,i,s,r,o,a,l){const c=s,u=t[0]*As,d=t[1]*As,h=dn(u,d);h.imageSmoothingEnabled=!1;const g=h.canvas,p=new lse(h,As,s,null,o,a,null),m=n.length,y=Math.floor((256*256*256-1)/m),v={};for(let x=1;x<=m;++x){const E=n[x-1],w=E.getStyleFunction()||i;if(!w)continue;let S=w(E,r);if(!S)continue;Array.isArray(S)||(S=[S]);const A=(x*y).toString(16).padStart(7,"#00000");for(let k=0,P=S.length;k0;return d&&Promise.all(l).then(()=>s(null)),gse(t,e,n,i,r,o,a),d}function gse(t,e,n,i,s,r,o){const a=n.getGeometryFunction()(e);if(!a)return;const l=a.simplifyTransformed(i,s);if(n.getRenderer())ok(t,l,n,e,o);else{const u=sk[l.getType()];u(t,l,n,e,o,r)}}function ok(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]*As,h=i[1]*As;u.push(this.getRenderTransform(s,r,o,As,d,h,0).slice());const g=c.getSource(),p=a.getExtent();if(g.getWrapX()&&a.canWrapX()&&!nl(p,l)){let m=l[0];const y=yt(p);let v=0,b;for(;mp[2];)++v,b=y*v,u.push(this.getRenderTransform(s,r,o,As,d,h,b).slice()),m-=y}this.hitDetectionImageData_=cse(i,u,this.renderedFeatures_,c.getStyleFunction(),l,r,o,Hw(r,this.renderedPixelRatio_))}n(use(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,g&&n.declutter[g]?n.declutter[g].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[Wn.ANIMATING],r=e.viewHints[Wn.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,g=n.getRevision(),p=n.getRenderBuffer();let m=n.getRenderOrder();m===void 0&&(m=hse);const y=c.center.slice(),v=hy(l,p*d),b=v.slice(),x=[v.slice()],E=u.getExtent();if(i.getWrapX()&&u.canWrapX()&&!nl(E,e.extent)){const $=yt(E),F=Math.max(yt(v)/2,$);v[0]=E[0]-F,v[2]=E[2]+F,nA(y,u);const D=tA(x[0],u);D[0]E[0]&&D[2]>E[2]&&x.push([D[0]-$,D[1],D[2]-$,D[3]])}if(this.ready&&this.renderedResolution_==d&&this.renderedRevision_==g&&this.renderedRenderOrder_==m&&this.renderedFrameDeclutter_===!!e.declutter&&nl(this.wrappedRenderedExtent_,v))return Eo(this.renderedExtent_,b)||(this.hitDetectionImageData_=null,this.renderedExtent_=b),this.renderedCenter_=y,this.replayGroupChanged=!1,!0;this.replayGroup_=null;const w=new tse(rk(d,h),v,d,h);let S;for(let $=0,F=x.length;${let D;const z=$.getStyleFunction()||n.getStyleFunction();if(z&&(D=z($,d)),D){const X=this.renderFeature($,T,D,w,S,this.getLayer().getDeclutter(),F);A=A&&!X}},P=aA(v),B=i.getFeaturesInExtent(P);m&&B.sort(m);for(let $=0,F=B.length;${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=jf(i,0,this.simplifiedGeometry_.flatCoordinates_.length,this.simplifiedGeometry_.stride_,e,i,0),s=[i.length];break;case"MultiLineString":s=[],i.length=Jee(i,0,this.simplifiedGeometry_.ends_,this.simplifiedGeometry_.stride_,e,i,0,s);break;case"Polygon":s=[],i.length=dA(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 Sse(t,e){return[[-1/0,-1/0,1/0,1/0]]}let Tse=!1;function Ase(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=Tse,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 Gw(t,e){return function(n,i,s,r,o){const a=this;Ase(t,e,n,i,s,function(l,c){a.addFeatures(l),r!==void 0&&r(l)},o||Fl)}}class Or extends Er{constructor(e,n,i){super(e),this.feature=n,this.features=i}}class kse extends XA{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_=Fl,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&&(pt(this.format_,"`format` must be set when `url` is set"),this.loader_=Gw(this.url_,this.format_)),this.strategy_=e.strategy!==void 0?e.strategy:Sse;const n=e.useSpatialIndex!==void 0?e.useSpatialIndex:!0;this.featuresRtree_=n?new Kw:null,this.loadedExtentsRtree_=new Kw,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 Ps(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 Or(Bi.ADDFEATURE,e))}setupChangeEvents_(e,n){n instanceof is||(this.featureChangeKeys_[e]=[ht(n,et.CHANGE,this.handleFeatureChange_,this),ht(n,Nl.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&&(pt(!(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(fi.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(Rt);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 Or(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(),Bl(this.nullGeometryFeatures_)||$f(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=py(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||vu,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 Or(Bi.FEATURESLOADEND,void 0,u))},()=>{--this.loadingExtentsCount_,this.dispatchEvent(new Or(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(bu(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]}},async mounted(){await fetch("https://tile.openstreetmap.org/",{signal:AbortSignal.timeout(1500)}).then(t=>{const e=new rie({target:"map",layers:[new Kie({source:new Rie})],view:new Ts({center:cp(this.getLastLonLat()),zoom:this.type==="traceroute"?3:10})}),n=[],i=new kse;if(this.type==="traceroute")console.log(this.getLastLonLat()),this.d.forEach(a=>{if(a.geo&&a.geo.lat&&a.geo.lon){const l=cp([a.geo.lon,a.geo.lat]);n.push(l);const c=this.getLastLonLat();console.log(a.geo.lon,a.geo.lat),console.log(a.geo.lon===c[0]&&a.geo.lat===c[1]);const u=new Jc({geometry:new Eu(l),last:a.geo.lon===c[0]&&a.geo.lat===c[1]});i.addFeature(u)}});else{const a=cp([this.d.geo.lon,this.d.geo.lat]);n.push(a);const l=new Jc({geometry:new Eu(a)});i.addFeature(l)}const s=new Gh(n),r=new Jc({geometry:s});i.addFeature(r);const o=new Ese({source:i,style:function(a){if(a.getGeometry().getType()==="Point")return new pr({image:new Zu({radius:10,fill:new Zl({color:a.get("last")?"#dc3545":"#0d6efd"}),stroke:new Hl({color:"white",width:5})})});if(a.getGeometry().getType()==="LineString")return new pr({stroke:new Hl({color:"#0d6efd",width:2})})}});e.addLayer(o),this.store.Configuration.Server.dashboard_theme==="dark"&&e.on("postcompose",function(a){document.querySelector("#map").style.filter="grayscale(80%) invert(100%) "})}).catch(t=>{this.osmAvailable=!1})}},Pse={key:0,id:"map",class:"w-100 rounded-3"};function Ise(t,e,n,i,s,r){return this.osmAvailable?(R(),V("div",Pse)):ce("",!0)}const ak=je(Mse,[["render",Ise]]),Dse={name:"ping",components:{OSMap:ak,LocaleText:He},data(){return{loading:!1,cips:{},selectedConfiguration:void 0,selectedPeer:void 0,selectedIp:void 0,count:4,pingResult:void 0,pinging:!1}},setup(){return{store:tt()}},mounted(){Yt("/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,Yt("/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}}},Rse={class:"mt-md-5 mt-3 text-body"},Lse={class:"container"},Ose={class:"row"},$se={class:"col-sm-4 d-flex gap-2 flex-column"},Nse={class:"mb-1 text-muted",for:"configuration"},Fse=["disabled"],Bse=["value"],Vse={class:"mb-1 text-muted",for:"peer"},zse=["disabled"],Wse=["value"],Yse={class:"mb-1 text-muted",for:"ip"},Hse=["disabled"],jse={class:"d-flex align-items-center gap-2"},Kse={class:"text-muted"},Use={class:"mb-1 text-muted",for:"ipAddress"},Gse=["disabled"],Xse={class:"mb-1 text-muted",for:"count"},qse={class:"d-flex gap-3 align-items-center"},Zse=["disabled"],Jse=["disabled"],Qse={key:0,class:"d-block"},ere={key:1,class:"d-block"},tre={class:"col-sm-8 position-relative"},nre={key:"pingPlaceholder"},ire={key:"pingResult",class:"d-flex flex-column gap-2 w-100"},sre={class:"card rounded-3 bg-transparent shadow-sm animate__animated animate__fadeIn",style:{"animation-delay":"0.15s"}},rre={class:"card-body row"},ore={class:"col-sm"},are={class:"mb-0 text-muted"},lre={key:0,class:"col-sm"},cre={class:"mb-0 text-muted"},ure={class:"card rounded-3 bg-transparent shadow-sm animate__animated animate__fadeIn",style:{"animation-delay":"0.3s"}},dre={class:"card-body"},hre={class:"card rounded-3 bg-transparent shadow-sm animate__animated animate__fadeIn",style:{"animation-delay":"0.45s"}},fre={class:"card-body"},gre={class:"mb-0 text-muted"},pre={class:"card rounded-3 bg-transparent shadow-sm animate__animated animate__fadeIn",style:{"animation-delay":"0.6s"}},mre={class:"card-body"},_re={class:"mb-0 text-muted"};function yre(t,e,n,i,s,r){const o=Ee("LocaleText"),a=Ee("OSMap");return R(),V("div",Rse,[f("div",Lse,[e[19]||(e[19]=f("h3",{class:"mb-3 text-body"},"Ping",-1)),f("div",Ose,[f("div",$se,[f("div",null,[f("label",Nse,[f("small",null,[N(o,{t:"Configuration"})])]),$e(f("select",{class:"form-select","onUpdate:modelValue":e[0]||(e[0]=l=>this.selectedConfiguration=l),disabled:this.pinging},[e[7]||(e[7]=f("option",{disabled:"",selected:"",value:void 0},null,-1)),(R(!0),V(Le,null,Ze(this.cips,(l,c)=>(R(),V("option",{value:c},we(c),9,Bse))),256))],8,Fse),[[oh,this.selectedConfiguration]])]),f("div",null,[f("label",Vse,[f("small",null,[N(o,{t:"Peer"})])]),$e(f("select",{id:"peer",class:"form-select","onUpdate:modelValue":e[1]||(e[1]=l=>this.selectedPeer=l),disabled:this.selectedConfiguration===void 0||this.pinging},[e[8]||(e[8]=f("option",{disabled:"",selected:"",value:void 0},null,-1)),this.selectedConfiguration!==void 0?(R(!0),V(Le,{key:0},Ze(this.cips[this.selectedConfiguration],(l,c)=>(R(),V("option",{value:c},we(c),9,Wse))),256)):ce("",!0)],8,zse),[[oh,this.selectedPeer]])]),f("div",null,[f("label",Yse,[f("small",null,[N(o,{t:"IP Address"})])]),$e(f("select",{id:"ip",class:"form-select","onUpdate:modelValue":e[2]||(e[2]=l=>this.selectedIp=l),disabled:this.selectedPeer===void 0||this.pinging},[e[9]||(e[9]=f("option",{disabled:"",selected:"",value:void 0},null,-1)),this.selectedPeer!==void 0?(R(!0),V(Le,{key:0},Ze(this.cips[this.selectedConfiguration][this.selectedPeer].allowed_ips,l=>(R(),V("option",null,we(l),1))),256)):ce("",!0)],8,Hse),[[oh,this.selectedIp]])]),f("div",jse,[e[10]||(e[10]=f("div",{class:"flex-grow-1 border-top"},null,-1)),f("small",Kse,[N(o,{t:"OR"})]),e[11]||(e[11]=f("div",{class:"flex-grow-1 border-top"},null,-1))]),f("div",null,[f("label",Use,[f("small",null,[N(o,{t:"Enter IP Address / Hostname"})])]),$e(f("input",{class:"form-control",type:"text",id:"ipAddress",disabled:this.pinging,"onUpdate:modelValue":e[3]||(e[3]=l=>this.selectedIp=l)},null,8,Gse),[[We,this.selectedIp]])]),e[16]||(e[16]=f("div",{class:"w-100 border-top my-2"},null,-1)),f("div",null,[f("label",Xse,[f("small",null,[N(o,{t:"Count"})])]),f("div",qse,[f("button",{onClick:e[4]||(e[4]=l=>this.count--),disabled:this.count===1,class:"btn btn-sm bg-secondary-subtle text-secondary-emphasis"},e[12]||(e[12]=[f("i",{class:"bi bi-dash-lg"},null,-1)]),8,Zse),f("strong",null,we(this.count),1),f("button",{role:"button",onClick:e[5]||(e[5]=l=>this.count++),class:"btn btn-sm bg-secondary-subtle text-secondary-emphasis"},e[13]||(e[13]=[f("i",{class:"bi bi-plus-lg"},null,-1)]))])]),f("button",{class:"btn btn-primary rounded-3 mt-3 position-relative",disabled:!this.selectedIp||this.pinging,onClick:e[6]||(e[6]=l=>this.execute())},[N($t,{name:"slide"},{default:De(()=>[this.pinging?(R(),V("span",ere,e[15]||(e[15]=[f("span",{class:"spinner-border spinner-border-sm","aria-hidden":"true"},null,-1),f("span",{class:"visually-hidden",role:"status"},"Loading...",-1)]))):(R(),V("span",Qse,e[14]||(e[14]=[f("i",{class:"bi bi-person-walking me-2"},null,-1),Ue("Ping! ")])))]),_:1})],8,Jse)]),f("div",tre,[N($t,{name:"ping"},{default:De(()=>[this.pingResult?(R(),V("div",ire,[this.pingResult.geo&&this.pingResult.geo.status==="success"?(R(),Se(a,{key:0,d:this.pingResult},null,8,["d"])):ce("",!0),f("div",sre,[f("div",rre,[f("div",ore,[f("p",are,[f("small",null,[N(o,{t:"IP Address"})])]),Ue(" "+we(this.pingResult.address),1)]),this.pingResult.geo&&this.pingResult.geo.status==="success"?(R(),V("div",lre,[f("p",cre,[f("small",null,[N(o,{t:"Geolocation"})])]),Ue(" "+we(this.pingResult.geo.city)+", "+we(this.pingResult.geo.country),1)])):ce("",!0)])]),f("div",ure,[f("div",dre,[e[18]||(e[18]=f("p",{class:"mb-0 text-muted"},[f("small",null,"Is Alive")],-1)),f("span",{class:Pe([this.pingResult.is_alive?"text-success":"text-danger"])},[f("i",{class:Pe(["bi me-1",[this.pingResult.is_alive?"bi-check-circle-fill":"bi-x-circle-fill"]])},null,2),Ue(" "+we(this.pingResult.is_alive?"Yes":"No"),1)],2)])]),f("div",hre,[f("div",fre,[f("p",gre,[f("small",null,[N(o,{t:"Average / Min / Max Round Trip Time"})])]),f("samp",null,we(this.pingResult.avg_rtt)+"ms / "+we(this.pingResult.min_rtt)+"ms / "+we(this.pingResult.max_rtt)+"ms ",1)])]),f("div",pre,[f("div",mre,[f("p",_re,[f("small",null,[N(o,{t:"Sent / Received / Lost Package"})])]),f("samp",null,we(this.pingResult.package_sent)+" / "+we(this.pingResult.package_received)+" / "+we(this.pingResult.package_loss),1)])])])):(R(),V("div",nre,[e[17]||(e[17]=f("div",{class:"pingPlaceholder bg-body-secondary rounded-3 mb-3",style:{height:"300px"}},null,-1)),(R(),V(Le,null,Ze(4,l=>f("div",{class:Pe(["pingPlaceholder bg-body-secondary rounded-3 mb-3",{"animate__animated animate__flash animate__slower animate__infinite":this.pinging}]),style:Pn({"animation-delay":`${l*.15}s`})},null,6)),64))]))]),_:1})])])])])}const vre=je(Dse,[["render",yre],["__scopeId","data-v-f5cd36ce"]]),bre={name:"traceroute",components:{LocaleText:He,OSMap:ak},data(){return{tracing:!1,ipAddress:void 0,tracerouteResult:void 0}},setup(){return{store:qn()}},methods:{execute(){this.ipAddress&&(this.tracing=!0,this.tracerouteResult=void 0,Yt("/api/traceroute/execute",{ipAddress:this.ipAddress},t=>{t.status?this.tracerouteResult=t.data:this.store.newMessage("Server",t.message,"danger"),this.tracing=!1}))}}},wre={class:"mt-md-5 mt-3 text-body"},xre={class:"container-md"},Ere={class:"mb-3 text-body"},Cre={class:"d-flex gap-2 flex-column mb-5"},Sre={class:"mb-1 text-muted",for:"ipAddress"},Tre=["disabled"],Are=["disabled"],kre={key:0,class:"d-block"},Mre={key:1,class:"d-block"},Pre={class:"position-relative"},Ire={key:"pingPlaceholder"},Dre={key:1},Rre={key:"table",class:"w-100 mt-2"},Lre={class:"table table-sm rounded-3 w-100"},Ore={scope:"col"},$re={scope:"col"},Nre={scope:"col"},Fre={scope:"col"},Bre={scope:"col"},Vre={scope:"col"},zre={key:0};function Wre(t,e,n,i,s,r){const o=Ee("LocaleText"),a=Ee("OSMap");return R(),V("div",wre,[f("div",xre,[f("h3",Ere,[N(o,{t:"Traceroute"})]),f("div",Cre,[f("div",null,[f("label",Sre,[f("small",null,[N(o,{t:"Enter IP Address / Hostname"})])]),$e(f("input",{disabled:this.tracing,id:"ipAddress",class:"form-control","onUpdate:modelValue":e[0]||(e[0]=l=>this.ipAddress=l),onKeyup:e[1]||(e[1]=eC(l=>this.execute(),["enter"])),type:"text"},null,40,Tre),[[We,this.ipAddress]])]),f("button",{class:"btn btn-primary rounded-3 mt-3 position-relative",disabled:this.tracing||!this.ipAddress,onClick:e[2]||(e[2]=l=>this.execute())},[N($t,{name:"slide"},{default:De(()=>[this.tracing?(R(),V("span",Mre,e[4]||(e[4]=[f("span",{class:"spinner-border spinner-border-sm","aria-hidden":"true"},null,-1),f("span",{class:"visually-hidden",role:"status"},"Loading...",-1)]))):(R(),V("span",kre,e[3]||(e[3]=[f("i",{class:"bi bi-person-walking me-2"},null,-1),Ue("Trace! ")])))]),_:1})],8,Are)]),f("div",Pre,[N($t,{name:"ping"},{default:De(()=>[this.tracerouteResult?(R(),V("div",Dre,[N(a,{d:this.tracerouteResult,type:"traceroute"},null,8,["d"]),f("div",Rre,[f("table",Lre,[f("thead",null,[f("tr",null,[f("th",Ore,[N(o,{t:"Hop"})]),f("th",$re,[N(o,{t:"IP Address"})]),f("th",Nre,[N(o,{t:"Average RTT (ms)"})]),f("th",Fre,[N(o,{t:"Min RTT (ms)"})]),f("th",Bre,[N(o,{t:"Max RTT (ms)"})]),f("th",Vre,[N(o,{t:"Geolocation"})])])]),f("tbody",null,[(R(!0),V(Le,null,Ze(this.tracerouteResult,(l,c)=>(R(),V("tr",null,[f("td",null,[f("small",null,we(l.hop),1)]),f("td",null,[f("small",null,we(l.ip),1)]),f("td",null,[f("small",null,we(l.avg_rtt),1)]),f("td",null,[f("small",null,we(l.min_rtt),1)]),f("td",null,[f("small",null,we(l.max_rtt),1)]),f("td",null,[l.geo.city&&l.geo.country?(R(),V("span",zre,[f("small",null,we(l.geo.city)+", "+we(l.geo.country),1)])):ce("",!0)])]))),256))])])])])):(R(),V("div",Ire,[e[5]||(e[5]=f("div",{class:"pingPlaceholder bg-body-secondary rounded-3 mb-3",style:{height:"300px !important"}},null,-1)),(R(),V(Le,null,Ze(5,l=>f("div",{class:Pe(["pingPlaceholder bg-body-secondary rounded-3 mb-3",{"animate__animated animate__flash animate__slower animate__infinite":this.tracing}]),style:Pn({"animation-delay":`${l*.05}s`})},null,6)),64))]))]),_:1})])])])}const Yre=je(bre,[["render",Wre],["__scopeId","data-v-6d6cffc9"]]),Hre={name:"totp",components:{LocaleText:He},async setup(){const t=tt();let e="";return await Yt("/api/Welcome_GetTotpLink",{},n=>{n.status&&(e=n.data)}),{l:e,store:t}},mounted(){this.l&&ba.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)?xt("/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"))}}},jre=["data-bs-theme"],Kre={class:"m-auto text-body",style:{width:"500px"}},Ure={class:"d-flex flex-column"},Gre={class:"dashboardLogo display-4"},Xre={class:"mb-2"},qre={class:"text-muted"},Zre={class:"p-3 bg-body-secondary rounded-3 border mb-3"},Jre={class:"text-muted mb-0"},Qre=["href"],eoe={style:{"line-break":"anywhere"}},toe={for:"totp",class:"mb-2"},noe={class:"text-muted"},ioe={class:"form-group mb-2"},soe=["disabled"],roe={class:"invalid-feedback"},ooe={class:"valid-feedback"},aoe={class:"d-flex gap-3 mt-5 flex-column"};function loe(t,e,n,i,s,r){const o=Ee("LocaleText"),a=Ee("RouterLink");return R(),V("div",{class:"container-fluid login-container-fluid d-flex main pt-5 overflow-scroll","data-bs-theme":this.store.Configuration.Server.dashboard_theme},[f("div",Kre,[f("div",Ure,[f("div",null,[f("h1",Gre,[N(o,{t:"Multi-Factor Authentication (MFA)"})]),f("p",Xre,[f("small",qre,[N(o,{t:"1. Please scan the following QR Code to generate TOTP with your choice of authenticator"})])]),e[1]||(e[1]=f("canvas",{id:"qrcode",class:"rounded-3 mb-2"},null,-1)),f("div",Zre,[f("p",Jre,[f("small",null,[N(o,{t:"Or you can click the link below:"})])]),f("a",{href:this.l},[f("code",eoe,we(this.l),1)],8,Qre)]),f("label",toe,[f("small",noe,[N(o,{t:"2. Enter the TOTP generated by your authenticator to verify"})])]),f("div",ioe,[$e(f("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,soe),[[We,this.totp]]),f("div",roe,[N(o,{t:this.totpInvalidMessage},null,8,["t"])]),f("div",ooe,[N(o,{t:"TOTP verified!"})])])]),e[4]||(e[4]=f("hr",null,null,-1)),f("div",aoe,[this.verified?(R(),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:De(()=>[N(o,{t:"Complete"}),e[3]||(e[3]=f("i",{class:"bi bi-chevron-right ms-auto"},null,-1))]),_:1})):(R(),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:De(()=>[N(o,{t:"I don't need MFA"}),e[2]||(e[2]=f("i",{class:"bi bi-chevron-right ms-auto"},null,-1))]),_:1}))])])])],8,jre)}const coe=je(Hre,[["render",loe]]),uoe={name:"share",components:{LocaleText:He},async setup(){const t=lO(),e=xe(!1),n=tt(),i=xe(""),s=xe(void 0),r=xe(new Blob);await Yt("/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 Yt("/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&&ba.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)}}},doe=["data-bs-theme"],hoe={class:"m-auto text-body",style:{width:"500px"}},foe={key:0,class:"text-center position-relative",style:{}},goe={class:"position-absolute w-100 h-100 top-0 start-0 d-flex animate__animated animate__fadeInUp",style:{"animation-delay":"0.1s"}},poe={class:"m-auto"},moe={key:1,class:"d-flex align-items-center flex-column gap-3"},_oe={class:"h1 dashboardLogo text-center animate__animated animate__fadeInUp"},yoe={id:"qrcode",class:"rounded-3 shadow animate__animated animate__fadeInUp mb-3",ref:"qrcode"},voe={class:"text-muted animate__animated animate__fadeInUp mb-1",style:{"animation-delay":"0.2s"}},boe=["download","href"];function woe(t,e,n,i,s,r){const o=Ee("LocaleText");return R(),V("div",{class:"container-fluid login-container-fluid d-flex main pt-5 overflow-scroll","data-bs-theme":this.theme},[f("div",hoe,[this.peerConfiguration?(R(),V("div",moe,[f("div",_oe,[e[1]||(e[1]=f("h6",null,"WGDashboard",-1)),N(o,{t:"Scan QR Code with the WireGuard App to add peer"})]),f("canvas",yoe,null,512),f("p",voe,[N(o,{t:"or click the button below to download the "}),e[2]||(e[2]=f("samp",null,".conf",-1)),N(o,{t:" file"})]),f("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"}},e[3]||(e[3]=[f("i",{class:"bi bi-download"},null,-1)]),8,boe)])):(R(),V("div",foe,[e[0]||(e[0]=f("div",{class:"animate__animated animate__fadeInUp"},[f("h1",{style:{"font-size":"20rem",filter:"blur(1rem)","animation-duration":"7s"},class:"animate__animated animate__flash animate__infinite"},[f("i",{class:"bi bi-file-binary"})])],-1)),f("div",goe,[f("h3",poe,[N(o,{t:"Oh no... This link is either expired or invalid."})])])]))])],8,doe)}const xoe=je(uoe,[["render",woe],["__scopeId","data-v-1b44aacd"]]),Eoe=async()=>{let t=!1;return await Yt("/api/validateAuthentication",{},e=>{t=e.status}),t},Ql=oO({history:NL(),scrollBehavior(){document.querySelector("main")!==null&&document.querySelector("main").scrollTo({top:0})},routes:[{name:"Index",path:"/",component:JO,meta:{requiresAuth:!0},children:[{name:"Configuration List",path:"",component:xN,meta:{title:"WireGuard Configurations"}},{name:"Settings",path:"/settings",component:S6,meta:{title:"Settings"}},{path:"/ping",name:"Ping",component:vre},{path:"/traceroute",name:"Traceroute",component:Yre},{name:"New Configuration",path:"/new_configuration",component:Xz,meta:{title:"New Configuration"}},{name:"Configuration",path:"/configuration/:id",component:Qz,meta:{title:"Configuration"},children:[{name:"Peers List",path:"peers",component:eee},{name:"Peers Create",path:"create",component:HT}]}]},{path:"/signin",component:j$,meta:{title:"Sign In"}},{path:"/welcome",component:H6,meta:{requiresAuth:!0,title:"Welcome to WGDashboard"}},{path:"/2FASetup",component:coe,meta:{requiresAuth:!0,title:"Multi-Factor Authentication Setup"}},{path:"/share",component:xoe,meta:{title:"Share"}}]});Ql.beforeEach(async(t,e,n)=>{const i=qn(),s=tt();t.meta.title?t.params.id?document.title=t.params.id+" | WGDashboard":document.title=t.meta.title+" | WGDashboard":document.title="WGDashboard",s.ShowNavBar=!1,document.querySelector(".loadingBar").classList.remove("loadingDone"),document.querySelector(".loadingBar").classList.add("loading"),t.meta.requiresAuth?s.getActiveCrossServer()?(await s.getConfiguration(),!i.Configurations&&t.name!=="Configuration List"&&await i.getConfigurations(),n()):cO.getCookie("authToken")&&await Eoe()?(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()});Ql.afterEach(()=>{document.querySelector(".loadingBar").classList.remove("loading"),document.querySelector(".loadingBar").classList.add("loadingDone")});const lk=()=>{let t={"content-type":"application/json"};const n=tt().getActiveCrossServer();return n&&(t["wg-dashboard-apikey"]=n.apiKey),t},ck=t=>{const n=tt().getActiveCrossServer();return n?`${n.host}${t}`:`${window.location.protocol}//${(window.location.host+window.location.pathname+t).replace(/\/\//g,"/")}`},Yt=async(t,e=void 0,n=void 0)=>{const i=new URLSearchParams(e);await fetch(`${ck(t)}?${i.toString()}`,{headers:lk()}).then(s=>{const r=tt();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),Ql.push({path:"/signin"})})},xt=async(t,e,n)=>{await fetch(`${ck(t)}`,{headers:lk(),method:"POST",body:JSON.stringify(e)}).then(i=>{const s=tt();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),Ql.push({path:"/signin"})})},tt=oC("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[Bs().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 Yt("/api/getDashboardConfiguration",{},t=>{t.status&&(this.Configuration=t.data)})},async signOut(){await Yt("/api/signout",{},t=>{this.removeActiveCrossServer(),this.$router.go("/signin")})},newMessage(t,e,n){this.Messages.push({id:Bs(),from:At(t),content:At(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]]}}}),Coe={class:"navbar bg-dark sticky-top","data-bs-theme":"dark"},Soe={class:"container-fluid d-flex text-body align-items-center"},Toe={key:0,class:"ms-auto text-muted"},Aoe={__name:"App",setup(t){const e=tt();e.initCrossServerConfiguration(),window.IS_WGDASHBOARD_DESKTOP&&(e.IsElectronApp=!0,e.CrossServerConfiguration.Enable=!0),un(e.CrossServerConfiguration,()=>{e.syncCrossServerConfiguration()},{deep:!0});const n=be(()=>{if(e.ActiveServerConfiguration)return e.CrossServerConfiguration.ServerList[e.ActiveServerConfiguration]});return(i,s)=>(R(),V(Le,null,[s[4]||(s[4]=f("div",{style:{"z-index":"9999",height:"5px"},class:"position-absolute loadingBar top-0 start-0"},null,-1)),f("nav",Coe,[f("div",Soe,[s[3]||(s[3]=f("span",{class:"navbar-brand mb-0 h1"},"WGDashboard",-1)),n.value!==void 0?(R(),V("small",Toe,[s[1]||(s[1]=f("i",{class:"bi bi-server me-2"},null,-1)),Ue(we(n.value.host),1)])):ce("",!0),f("a",{role:"button",class:"navbarBtn text-body",onClick:s[0]||(s[0]=r=>J(e).ShowNavBar=!J(e).ShowNavBar),style:{"line-height":"0","font-size":"2rem"}},s[2]||(s[2]=[f("i",{class:"bi bi-list"},null,-1)]))])]),(R(),Se(p_,null,{default:De(()=>[N(J(vC),null,{default:De(({Component:r})=>[N($t,{name:"app",mode:"out-in",type:"transition"},{default:De(()=>[(R(),Se(ma(r)))]),_:2},1024)]),_:1})]),_:1}))],64))}},koe=je(Aoe,[["__scopeId","data-v-95a5c797"]]);let $m;await fetch("/api/locale").then(t=>t.json()).then(t=>$m=t.data).catch(()=>{$m=null});const Ky=qR(koe);Ky.use(Ql);const uk=eL();uk.use(({store:t})=>{t.$router=of(Ql)});Ky.use(uk);const Moe=tt();Moe.Locale=$m;Ky.mount("#app"); diff --git a/src/static/app/package.json b/src/static/app/package.json index c1ae415..1995703 100644 --- a/src/static/app/package.json +++ b/src/static/app/package.json @@ -5,7 +5,7 @@ "type": "module", "scripts": { "dev": "vite", - "build": "vite build && git commit -a", + "build": "vite build && git commit -a && git push", "build electron": "vite build && vite build --mode electron && cd ../../../../WGDashboard-Desktop && electron-builder --mac --win", "preview": "vite preview" }, diff --git a/src/static/app/src/components/configurationComponents/peer.vue b/src/static/app/src/components/configurationComponents/peer.vue index 2ad1195..5811003 100644 --- a/src/static/app/src/components/configurationComponents/peer.vue +++ b/src/static/app/src/components/configurationComponents/peer.vue @@ -111,7 +111,7 @@ export default { \ No newline at end of file diff --git a/src/static/css/dashboard.css b/src/static/css/dashboard.css index 29dbcf9..f0f2145 100644 --- a/src/static/css/dashboard.css +++ b/src/static/css/dashboard.css @@ -1051,17 +1051,17 @@ pre.index-alert { .fade2-enter-active, .fade2-leave-active { - transition: all 0.2s cubic-bezier(0.82, 0.58, 0.17, 0.9); + transition: all 0.3s cubic-bezier(0.82, 0.58, 0.17, 1.3); } .fade2-enter-from{ - transform: translateY(30px); - filter: blur(3px); + transform: translateY(-30px); + /*filter: blur(3px);*/ opacity: 0; } .fade2-leave-to { - transform: translateY(-30px); + transform: translateY(30px); filter: blur(3px); opacity: 0; }