diff --git a/src/static/app/dist/assets/configuration-vZnfxuPU.js b/src/static/app/dist/assets/configuration-vZnfxuPU.js new file mode 100644 index 0000000..59c8fc5 --- /dev/null +++ b/src/static/app/dist/assets/configuration-vZnfxuPU.js @@ -0,0 +1 @@ +import{_ as r,c as i,d as o,w as e,j as l,a as t,T as _,i as a,l as d,S as u}from"./index-DOaPWS1X.js";const m={name:"configuration"},p={class:"mt-md-5 mt-3 text-body"};function f(x,h,k,w,$,v){const n=l("RouterView");return t(),i("div",p,[o(n,null,{default:e(({Component:s,route:c})=>[o(_,{name:"fade2",mode:"out-in"},{default:e(()=>[(t(),a(u,null,{default:e(()=>[(t(),a(d(s),{key:c.path}))]),_:2},1024))]),_:2},1024)]),_:1})])}const B=r(m,[["render",f]]);export{B as default}; diff --git a/src/static/app/dist/assets/configurationBackupRestore-CerUpwbQ.js b/src/static/app/dist/assets/configurationBackupRestore-CerUpwbQ.js new file mode 100644 index 0000000..98f6ac8 --- /dev/null +++ b/src/static/app/dist/assets/configurationBackupRestore-CerUpwbQ.js @@ -0,0 +1 @@ +import{_ as Y,u as S,r as p,$ as R,D as L,x as F,a as r,c as d,b as e,d as a,w as C,e as _,T as B,t as $,f as w,B as P,n as N,q as D,o as T,g as M,F as V,h as H,i as W,k as j}from"./index-DOaPWS1X.js";import{d as z}from"./dayjs.min-D8jwq_wn.js";import{L as n}from"./localeText-CaAXeE0W.js";const A={class:"card my-0 rounded-3"},G={class:"card-body position-relative"},I={key:0,class:"position-absolute w-100 h-100 confirmationContainer start-0 top-0 rounded-3 d-flex p-2"},q={class:"m-auto"},E={class:"d-flex gap-2 align-items-center justify-content-center"},J=["disabled"],K=["disabled"],O={key:0,class:"position-absolute w-100 h-100 confirmationContainer start-0 top-0 rounded-3 d-flex p-2"},Q={class:"m-auto"},U={class:"d-flex gap-2 align-items-center justify-content-center"},X=["disabled"],Z=["disabled"],ee={class:"d-flex gap-3"},se={class:"d-flex flex-column"},te={class:"text-muted"},ae={class:"d-flex flex-column"},oe={class:"text-muted"},ne={class:"d-flex gap-2 align-items-center ms-auto"},le={class:"card rounded-3"},ie={key:0,class:"card-body"},re=["value"],de={class:"d-flex"},ue={__name:"backup",props:["b","delay"],emits:["refresh","refreshPeersList"],setup(c,{emit:y}){S(g=>({"6919ade8":h.value}));const u=c,i=p(!1),l=p(!1),k=R(),v=y,b=L(),o=p(!1),t=()=>{o.value=!0,D("/api/deleteWireguardConfigurationBackup",{configurationName:k.params.id,backupFileName:u.b.filename},g=>{o.value=!1,g.status?(v("refresh"),b.newMessage("Server","Backup deleted","success")):b.newMessage("Server","Backup failed to delete","danger")})},m=()=>{o.value=!0,D("/api/restoreWireguardConfigurationBackup",{configurationName:k.params.id,backupFileName:u.b.filename},g=>{o.value=!1,l.value=!1,g.status?(v("refresh"),b.newMessage("Server","Backup restored with "+u.b.filename,"success")):b.newMessage("Server","Backup failed to restore","danger")})},h=F(()=>u.delay+"s"),x=p(!1);return(g,s)=>(r(),d("div",A,[e("div",G,[a(B,{name:"zoomReversed"},{default:C(()=>[i.value?(r(),d("div",I,[e("div",q,[e("h5",null,[a(n,{t:"Are you sure to delete this backup?"})]),e("div",E,[e("button",{class:"btn btn-danger rounded-3",disabled:o.value,onClick:s[0]||(s[0]=f=>t())},[a(n,{t:"Yes"})],8,J),e("button",{onClick:s[1]||(s[1]=f=>i.value=!1),disabled:o.value,class:"btn bg-secondary-subtle text-secondary-emphasis border-secondary-subtle rounded-3"},[a(n,{t:"No"})],8,K)])])])):_("",!0)]),_:1}),a(B,{name:"zoomReversed"},{default:C(()=>[l.value?(r(),d("div",O,[e("div",Q,[e("h5",null,[a(n,{t:"Are you sure to restore this backup?"})]),e("div",U,[e("button",{disabled:o.value,onClick:s[2]||(s[2]=f=>m()),class:"btn btn-success rounded-3"},[a(n,{t:"Yes"})],8,X),e("button",{onClick:s[3]||(s[3]=f=>l.value=!1),disabled:o.value,class:"btn bg-secondary-subtle text-secondary-emphasis border-secondary-subtle rounded-3"},[a(n,{t:"No"})],8,Z)])])])):_("",!0)]),_:1}),e("div",ee,[e("div",se,[e("small",te,[a(n,{t:"Backup"})]),e("samp",null,$(c.b.filename),1)]),e("div",ae,[e("small",oe,[a(n,{t:"Backup Date"})]),w(" "+$(P(z)(c.b.backupDate,"YYYYMMDDHHmmss").format("YYYY-MM-DD HH:mm:ss")),1)]),e("div",ne,[e("button",{onClick:s[4]||(s[4]=f=>l.value=!0),class:"btn bg-warning-subtle text-warning-emphasis border-warning-subtle rounded-3 btn-sm"},s[7]||(s[7]=[e("i",{class:"bi bi-clock-history"},null,-1)])),e("button",{onClick:s[5]||(s[5]=f=>i.value=!0),class:"btn bg-danger-subtle text-danger-emphasis border-danger-subtle rounded-3 btn-sm"},s[8]||(s[8]=[e("i",{class:"bi bi-trash-fill"},null,-1)]))])]),s[12]||(s[12]=e("hr",null,null,-1)),e("div",le,[e("a",{role:"button",class:N(["card-header d-flex text-decoration-none align-items-center",{"border-bottom-0":!x.value}]),style:{cursor:"pointer"},onClick:s[6]||(s[6]=f=>x.value=!x.value)},[e("small",null,[s[9]||(s[9]=w(".conf ")),a(n,{t:"File"})]),s[10]||(s[10]=e("i",{class:"bi bi-chevron-down ms-auto"},null,-1))],2),x.value?(r(),d("div",ie,[e("textarea",{class:"form-control rounded-3",value:c.b.content,disabled:"",style:{height:"300px","font-family":"var(--bs-font-monospace),sans-serif !important"}},null,8,re)])):_("",!0)]),s[13]||(s[13]=e("hr",null,null,-1)),e("div",de,[e("span",null,[s[11]||(s[11]=e("i",{class:"bi bi-database me-1"},null,-1)),a(n,{t:"Database File"})]),e("i",{class:N(["bi ms-auto",[c.b.database?"text-success bi-check-circle-fill":"text-danger bi-x-circle-fill"]])},null,2)])])]))}},ce=Y(ue,[["__scopeId","data-v-a575be12"]]),be={class:"peerSettingContainer w-100 h-100 position-absolute top-0 start-0 overflow-y-scroll",ref:"editConfigurationContainer"},me={class:"d-flex h-100 w-100"},fe={class:"modal-dialog-centered dashboardModal w-100 h-100 overflow-x-scroll flex-column gap-3 mx-3"},pe={class:"my-5 d-flex gap-3 flex-column position-relative"},ve={class:"title"},ge={class:"d-flex mb-3"},ke={class:"mb-0"},xe={class:"position-relative d-flex flex-column gap-3"},_e={class:"text-center title",key:"spinner"},ye={class:"card my-0 rounded-3",key:"noBackups"},he={class:"card-body text-center text-muted"},Ce={__name:"configurationBackupRestore",emits:["close","refreshPeersList"],setup(c,{emit:y}){const u=R(),i=p([]),l=p(!0),k=y;T(()=>{v()});const v=()=>{l.value=!0,M("/api/getWireguardConfigurationBackup",{configurationName:u.params.id},o=>{i.value=o.data,l.value=!1})},b=()=>{M("/api/createWireguardConfigurationBackup",{configurationName:u.params.id},o=>{i.value=o.data,l.value=!1})};return(o,t)=>(r(),d("div",be,[e("div",me,[e("div",fe,[e("div",pe,[e("div",ve,[e("div",ge,[e("h4",ke,[a(n,{t:"Backup & Restore"})]),e("button",{type:"button",class:"btn-close ms-auto",onClick:t[0]||(t[0]=m=>o.$emit("close"))})]),e("button",{onClick:t[1]||(t[1]=m=>b()),class:"btn bg-primary-subtle text-primary-emphasis border-primary-subtle rounded-3 w-100"},[t[4]||(t[4]=e("i",{class:"bi bi-plus-circle-fill me-2"},null,-1)),a(n,{t:"Create Backup"})])]),e("div",xe,[a(j,{name:"list1"},{default:C(()=>[l.value&&i.value.length===0?(r(),d("div",_e,t[5]||(t[5]=[e("div",{class:"spinner-border"},null,-1)]))):!l.value&&i.value.length===0?(r(),d("div",ye,[e("div",he,[t[6]||(t[6]=e("i",{class:"bi bi-x-circle-fill me-2"},null,-1)),a(n,{t:"No backup yet, click the button above to create backup."})])])):_("",!0),(r(!0),d(V,null,H(i.value,m=>(r(),W(ce,{onRefresh:t[2]||(t[2]=h=>v()),onRefreshPeersList:t[3]||(t[3]=h=>k("refreshPeersList")),b:m,key:m.filename},null,8,["b"]))),128))]),_:1})])])])])],512))}},Ne=Y(Ce,[["__scopeId","data-v-1f718118"]]);export{Ne as default}; diff --git a/src/static/app/dist/assets/configurationList-BAuTfbU-.js b/src/static/app/dist/assets/configurationList-BAuTfbU-.js new file mode 100644 index 0000000..5f7ca28 --- /dev/null +++ b/src/static/app/dist/assets/configurationList-BAuTfbU-.js @@ -0,0 +1 @@ +import{_ as x,D as L,g as N,a,c as l,d as i,w as m,b as t,n as C,t as r,f,i as c,e as h,m as P,v as D,u as B,j as d,W as U,k as G,F as V,h as I}from"./index-DOaPWS1X.js";import{L as w}from"./localeText-CaAXeE0W.js";const _={name:"configurationCard",components:{LocaleText:w},props:{c:{Name:String,Status:Boolean,PublicKey:String,PrivateKey:String},delay:String},data(){return{configurationToggling:!1}},setup(){return{dashboardConfigurationStore:L()}},methods:{toggle(){this.configurationToggling=!0,N("/api/toggleWireguardConfiguration/",{configurationName:this.c.Name},s=>{s.status?this.dashboardConfigurationStore.newMessage("Server",`${this.c.Name} ${s.data?"is on":"is off"}`):this.dashboardConfigurationStore.newMessage("Server",s.message,"danger"),this.c.Status=s.data,this.configurationToggling=!1})}}},y=()=>{B(s=>({"1d5189b2":s.delay}))},S=_.setup;_.setup=S?(s,o)=>(y(),S(s,o)):y;const K={class:"card conf_card rounded-3 shadow text-decoration-none"},R={class:"mb-0"},F={class:"card-title mb-0"},W={class:"card-footer d-flex gap-2 flex-column"},O={class:"row"},M={class:"col-6 col-md-3"},j={class:"text-primary-emphasis col-6 col-md-3"},z={class:"text-success-emphasis col-6 col-md-3"},E={class:"text-md-end col-6 col-md-3"},Y={class:"d-flex align-items-center gap-2"},q={class:"text-muted"},A={style:{"word-break":"keep-all"}},H={class:"mb-0 d-block d-lg-inline-block"},J={style:{"line-break":"anywhere"}},Q={class:"form-check form-switch ms-auto"},X=["for"],Z={key:4,class:"spinner-border spinner-border-sm ms-2","aria-hidden":"true"},$=["disabled","id"];function tt(s,o,e,v,k,p){const u=d("RouterLink"),n=d("LocaleText");return a(),l("div",K,[i(u,{to:"/configuration/"+e.c.Name+"/peers",class:"card-body d-flex align-items-center gap-3 flex-wrap text-decoration-none"},{default:m(()=>[t("h6",R,[t("span",{class:C(["dot",{active:e.c.Status}])},null,2)]),t("h6",F,[t("samp",null,r(e.c.Name),1)]),o[2]||(o[2]=t("h6",{class:"mb-0 ms-auto"},[t("i",{class:"bi bi-chevron-right"})],-1))]),_:1},8,["to"]),t("div",W,[t("div",O,[t("small",M,[o[3]||(o[3]=t("i",{class:"bi bi-arrow-down-up me-2"},null,-1)),f(r(e.c.DataUsage.Total>0?e.c.DataUsage.Total.toFixed(4):0)+" GB ",1)]),t("small",j,[o[4]||(o[4]=t("i",{class:"bi bi-arrow-down me-2"},null,-1)),f(r(e.c.DataUsage.Receive>0?e.c.DataUsage.Receive.toFixed(4):0)+" GB ",1)]),t("small",z,[o[5]||(o[5]=t("i",{class:"bi bi-arrow-up me-2"},null,-1)),f(r(e.c.DataUsage.Sent>0?e.c.DataUsage.Sent.toFixed(4):0)+" GB ",1)]),t("small",E,[t("span",{class:C(["dot me-2",{active:e.c.ConnectedPeers>0}])},null,2),f(" "+r(e.c.ConnectedPeers)+" / "+r(e.c.TotalPeers)+" ",1),i(n,{t:"Peers"})])]),t("div",Y,[t("small",q,[t("strong",A,[i(n,{t:"Public Key"})])]),t("small",H,[t("samp",J,r(e.c.PublicKey),1)]),t("div",Q,[t("label",{class:"form-check-label",style:{cursor:"pointer"},for:"switch"+e.c.PrivateKey},[!e.c.Status&&this.configurationToggling?(a(),c(n,{key:0,t:"Turning Off..."})):e.c.Status&&this.configurationToggling?(a(),c(n,{key:1,t:"Turning On..."})):e.c.Status&&!this.configurationToggling?(a(),c(n,{key:2,t:"On"})):!e.c.Status&&!this.configurationToggling?(a(),c(n,{key:3,t:"Off"})):h("",!0),this.configurationToggling?(a(),l("span",Z)):h("",!0)],8,X),P(t("input",{class:"form-check-input",style:{cursor:"pointer"},disabled:this.configurationToggling,type:"checkbox",role:"switch",id:"switch"+e.c.PrivateKey,onChange:o[0]||(o[0]=g=>this.toggle()),"onUpdate:modelValue":o[1]||(o[1]=g=>e.c.Status=g)},null,40,$),[[D,e.c.Status]])])])])])}const et=x(_,[["render",tt],["__scopeId","data-v-a85a04a5"]]),ot={name:"configurationList",components:{LocaleText:w,ConfigurationCard:et},async setup(){return{wireguardConfigurationsStore:U()}},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)}},st={class:"mt-md-5 mt-3"},at={class:"container-md"},nt={class:"d-flex mb-4 configurationListTitle align-items-center gap-3"},it={class:"text-body d-flex"},rt={class:"text-muted",key:"noConfiguration"};function ct(s,o,e,v,k,p){const u=d("LocaleText"),n=d("RouterLink"),g=d("ConfigurationCard");return a(),l("div",st,[t("div",at,[t("div",nt,[t("h2",it,[t("span",null,[i(u,{t:"WireGuard Configurations"})])]),i(n,{to:"/new_configuration",class:"btn btn-dark btn-brand rounded-3 p-2 shadow ms-auto rounded-3"},{default:m(()=>o[0]||(o[0]=[t("h2",{class:"mb-0",style:{"line-height":"0"}},[t("i",{class:"bi bi-plus-circle"})],-1)])),_:1}),i(n,{to:"/restore_configuration",class:"btn btn-dark btn-brand p-2 shadow ms-2",style:{"border-radius":"100%"}},{default:m(()=>o[1]||(o[1]=[t("h2",{class:"mb-0",style:{"line-height":"0"}},[t("i",{class:"bi bi-clock-history"})],-1)])),_:1})]),i(G,{name:"fade",tag:"div",class:"d-flex flex-column gap-3 mb-4"},{default:m(()=>[this.configurationLoaded&&this.wireguardConfigurationsStore.Configurations.length===0?(a(),l("p",rt,[i(u,{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."})])):this.configurationLoaded?(a(!0),l(V,{key:1},I(this.wireguardConfigurationsStore.Configurations,(b,T)=>(a(),c(g,{delay:T*.05+"s",key:b.Name,c:b},null,8,["delay","c"]))),128)):h("",!0)]),_:1})])])}const ut=x(ot,[["render",ct],["__scopeId","data-v-16b5ab33"]]);export{ut as default}; diff --git a/src/static/app/dist/assets/dayjs.min-D8jwq_wn.js b/src/static/app/dist/assets/dayjs.min-D8jwq_wn.js new file mode 100644 index 0000000..2ab4556 --- /dev/null +++ b/src/static/app/dist/assets/dayjs.min-D8jwq_wn.js @@ -0,0 +1 @@ +import{Y as Q,Z as K}from"./index-DOaPWS1X.js";var E={exports:{}};(function(V,X){(function(W,k){V.exports=k()})(Q,function(){var W=1e3,k=6e4,N=36e5,A="millisecond",S="second",w="minute",O="hour",M="day",T="week",m="month",U="quarter",v="year",_="date",Z="Invalid Date",q=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,B=/\[([^\]]+)]|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,G={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(s){var n=["th","st","nd","rd"],t=s%100;return"["+s+(n[(t-20)%10]||n[t]||n[0])+"]"}},I=function(s,n,t){var r=String(s);return!r||r.length>=n?s:""+Array(n+1-r.length).join(t)+s},P={s:I,z:function(s){var n=-s.utcOffset(),t=Math.abs(n),r=Math.floor(t/60),e=t%60;return(n<=0?"+":"-")+I(r,2,"0")+":"+I(e,2,"0")},m:function s(n,t){if(n.date()1)return s(u[0])}else{var o=n.name;D[o]=n,e=o}return!r&&e&&(x=e),e||!r&&x},f=function(s,n){if(F(s))return s.clone();var t=typeof n=="object"?n:{};return t.date=s,t.args=arguments,new C(t)},a=P;a.l=j,a.i=F,a.w=function(s,n){return f(s,{locale:n.$L,utc:n.$u,x:n.$x,$offset:n.$offset})};var C=function(){function s(t){this.$L=j(t.locale,null,!0),this.parse(t),this.$x=this.$x||t.x||{},this[J]=!0}var n=s.prototype;return n.parse=function(t){this.$d=function(r){var e=r.date,i=r.utc;if(e===null)return new Date(NaN);if(a.u(e))return new Date;if(e instanceof Date)return new Date(e);if(typeof e=="string"&&!/Z$/i.test(e)){var u=e.match(q);if(u){var o=u[2]-1||0,c=(u[7]||"0").substring(0,3);return i?new Date(Date.UTC(u[1],o,u[3]||1,u[4]||0,u[5]||0,u[6]||0,c)):new Date(u[1],o,u[3]||1,u[4]||0,u[5]||0,u[6]||0,c)}}return new Date(e)}(t),this.init()},n.init=function(){var t=this.$d;this.$y=t.getFullYear(),this.$M=t.getMonth(),this.$D=t.getDate(),this.$W=t.getDay(),this.$H=t.getHours(),this.$m=t.getMinutes(),this.$s=t.getSeconds(),this.$ms=t.getMilliseconds()},n.$utils=function(){return a},n.isValid=function(){return this.$d.toString()!==Z},n.isSame=function(t,r){var e=f(t);return this.startOf(r)<=e&&e<=this.endOf(r)},n.isAfter=function(t,r){return f(t){clearInterval(p.Peers.RefreshInterval),r.value=!0,M("/api/deleteWireguardConfiguration",{Name:i},n=>{n.status?(h.push("/"),p.newMessage("Server","Configuration deleted","success")):r.value=!1})},u=c(!0),d=c([]),f=()=>{u.value=!0,T("/api/getWireguardConfigurationBackup",{configurationName:i},n=>{d.value=n.data,u.value=!1})};_(()=>{f()});const C=k;return(n,e)=>(l(),b("div",I,[t("div",R,[t("div",S,[t("div",V,[t("div",A,[t("h5",L,[o(s,{t:"Are you sure to delete this configuration?"})]),t("button",{type:"button",class:"btn-close ms-auto",onClick:e[0]||(e[0]=a=>n.$emit("close"))})]),t("div",P,[t("p",W,[o(s,{t:"Once you deleted this configuration:"})]),t("ul",null,[t("li",null,[o(s,{t:"All connected peers will get disconnected"})]),t("li",null,[o(s,{t:"Both configuration file (.conf) and database table related to this configuration will get deleted"})])]),t("div",{class:D(["alert",[u.value?"alert-secondary":d.value.length>0?"alert-success":"alert-danger"]])},[u.value?(l(),b("div",q,[e[5]||(e[5]=t("i",{class:"bi bi-search me-2"},null,-1)),o(s,{t:"Checking backups..."})])):d.value.length>0?(l(),b("div",z,[e[6]||(e[6]=t("i",{class:"bi bi-check-circle-fill me-2"},null,-1)),o(s,{t:"This configuration have "+d.value.length+" backups"},null,8,["t"])])):(l(),b("div",E,[e[9]||(e[9]=t("i",{class:"bi bi-x-circle-fill me-2"},null,-1)),o(s,{t:"This configuration have no backup"}),t("a",{role:"button",onClick:e[1]||(e[1]=a=>C("backup")),class:"ms-auto btn btn-sm btn-primary rounded-3"},[e[7]||(e[7]=t("i",{class:"bi bi-clock-history me-2"},null,-1)),o(s,{t:"Backup"})]),t("a",{role:"button",onClick:e[2]||(e[2]=a=>f()),class:"btn btn-sm btn-primary rounded-3"},e[8]||(e[8]=[t("i",{class:"bi bi-arrow-clockwise"},null,-1)]))]))],2),e[11]||(e[11]=t("hr",null,null,-1)),t("p",null,[o(s,{t:"If you're sure, please type in the configuration name below and click Delete"})]),$(t("input",{class:"form-control rounded-3 mb-3",placeholder:m(i),"onUpdate:modelValue":e[3]||(e[3]=a=>g.value=a),type:"text"},null,8,G),[[N,g.value]]),t("button",{class:"btn btn-danger w-100",onClick:e[4]||(e[4]=a=>y()),disabled:g.value!==m(i)||r.value},[e[10]||(e[10]=t("i",{class:"bi bi-trash-fill me-2 rounded-3"},null,-1)),r.value?(l(),v(s,{key:1,t:"Deleting..."})):(l(),v(s,{key:0,t:"Delete"}))],8,H)])])])])]))}};export{J as default}; diff --git a/src/static/app/dist/assets/editConfiguration-kC_NwN06.js b/src/static/app/dist/assets/editConfiguration-kC_NwN06.js new file mode 100644 index 0000000..d7a61ce --- /dev/null +++ b/src/static/app/dist/assets/editConfiguration-kC_NwN06.js @@ -0,0 +1 @@ +import{_ as M,C as k,W as K,o as O,E as $,D as U,r as b,H as L,a as y,c as x,b as e,d as a,m as u,s as c,n as N,q as D,a0 as J,t as S,e as W,i as A,F,v as B}from"./index-DOaPWS1X.js";import{L as n}from"./localeText-CaAXeE0W.js";const R={class:"card rounded-3 flex-grow-1 bg-danger-subtle border-danger-subtle border shadow"},T={class:"card-body"},q={class:"d-flex align-items-center gap-3 inputGroup"},E=["value"],G={class:"mb-0"},j={class:"d-flex mt-3"},z=["disabled"],H={__name:"updateConfigurationName",props:{configurationName:String},emits:["close"],setup(h,{emit:C}){const p=h,P=C,l=k({data:"",valid:!1}),i=K();O(()=>{$(()=>l.data,d=>{l.valid=/^[a-zA-Z0-9_=+.-]{1,15}$/.test(d)&&d.length>0&&!i.Configurations.find(r=>r.Name===d)})});const s=U(),m=b(!1),f=L(),g=async()=>{l.data&&(m.value=!0,clearInterval(s.Peers.RefreshInterval),await D("/api/renameWireguardConfiguration",{Name:p.configurationName,NewConfigurationName:l.data},async d=>{d.status?(await i.getConfigurations(),s.newMessage("Server","Configuration renamed","success"),f.push(`/configuration/${l.data}/peers`)):(s.newMessage("Server",d.message,"danger"),m.value=!1)}))};return(d,r)=>(y(),x("div",R,[e("div",T,[e("p",null,[a(n,{t:"To update this configuration's name, WGDashboard will execute the following operations:"})]),e("ol",null,[e("li",null,[a(n,{t:"Duplicate current configuration's database table and .conf file with the new name"})]),e("li",null,[a(n,{t:"Delete current configuration's database table and .conf file"})])]),e("div",q,[e("input",{class:"form-control form-control-sm rounded-3",value:h.configurationName,disabled:""},null,8,E),r[3]||(r[3]=e("h3",{class:"mb-0"},[e("i",{class:"bi bi-arrow-right"})],-1)),u(e("input",{class:N(["form-control form-control-sm rounded-3",[l.data?l.valid?"is-valid":"is-invalid":""]]),id:"newConfigurationName","onUpdate:modelValue":r[0]||(r[0]=v=>l.data=v)},null,2),[[c,l.data]])]),e("div",{class:N(["invalid-feedback",{"d-block":!l.valid&&l.data}])},[a(n,{t:"Configuration name is invalid. Possible reasons:"}),e("ul",G,[e("li",null,[a(n,{t:"Configuration name already exist."})]),e("li",null,[a(n,{t:"Configuration name can only contain 15 lower/uppercase alphabet, numbers, underscore, equal sign, plus sign, period and hyphen."})])])],2),e("div",j,[e("button",{onClick:r[1]||(r[1]=v=>P("close")),class:"btn btn-sm bg-secondary-subtle border-secondary-subtle text-secondary-emphasis rounded-3"},[a(n,{t:"Cancel"})]),e("button",{onClick:r[2]||(r[2]=v=>g()),disabled:!l.data||m.value,class:"btn btn-sm btn-danger rounded-3 ms-auto"},[a(n,{t:"Save"})],8,z)])])]))}},Z=M(H,[["__scopeId","data-v-4be4f48a"]]),Q={class:"container d-flex h-100 w-100"},X={class:"m-auto modal-dialog-centered dashboardModal",style:{width:"700px"}},Y={class:"card rounded-3 shadow flex-grow-1"},ee={class:"card-header bg-transparent d-flex align-items-center gap-2 border-0 p-4"},te={class:"mb-0"},se={class:"card-body px-4 pb-4"},oe={class:"d-flex gap-2 flex-column"},ae={key:0,class:"d-flex align-items-center gap-3"},ne={class:"text-muted"},le={class:"d-flex align-items-center gap-3"},ie={class:"text-muted",style:{"word-break":"keep-all"}},re={class:"ms-auto",style:{"word-break":"break-all"}},de={class:"d-flex"},ue={for:"configuration_private_key",class:"form-label"},ce={class:"text-muted d-block"},me={class:"form-check form-switch ms-auto"},fe=["disabled"],be={for:"configuration_ipaddress_cidr",class:"form-label"},pe={class:"text-muted"},ge=["disabled"],ve={for:"configuration_listen_port",class:"form-label"},_e={class:"text-muted"},ye=["disabled"],he={for:"configuration_preup",class:"form-label"},we={class:"text-muted"},xe=["disabled"],Ce={for:"configuration_predown",class:"form-label"},Pe={class:"text-muted"},ke=["disabled"],Ne={for:"configuration_postup",class:"form-label"},Se={class:"text-muted"},Ke=["disabled"],$e={for:"configuration_postdown",class:"form-label"},Ue={class:"text-muted"},De=["disabled"],Ie={class:"d-flex align-items-center gap-2 mt-4"},Ve=["disabled"],Me=["disabled"],Je={__name:"editConfiguration",props:{configurationInfo:Object},emits:["changed","close"],setup(h,{emit:C}){const p=h,P=K(),l=U(),i=b(!1),s=k(JSON.parse(JSON.stringify(p.configurationInfo))),m=b(!1),f=b(!1);b(!1);const g=k({PrivateKey:!0,IPAddress:!0,ListenPort:!0}),d=J("editConfigurationContainer"),r=()=>{P.checkWGKeyLength(s.PrivateKey)?(g.PrivateKey=!0,s.PublicKey=window.wireguard.generatePublicKey(s.PrivateKey)):g.PrivateKey=!1},v=()=>{f.value=!1,Object.assign(s,JSON.parse(JSON.stringify(p.configurationInfo)))},I=C,V=()=>{i.value=!0,D("/api/updateWireguardConfiguration",s,_=>{i.value=!1,_.status?(l.newMessage("Server","Configuration saved","success"),f.value=!1,I("dataChanged",_.data)):l.newMessage("Server",_.message,"danger")})},w=b(!1);return $(s,()=>{f.value=JSON.stringify(s)!==JSON.stringify(p.configurationInfo)},{deep:!0}),(_,t)=>(y(),x("div",{class:"peerSettingContainer w-100 h-100 position-absolute top-0 start-0 overflow-y-scroll",ref_key:"editConfigurationContainer",ref:d},[e("div",Q,[e("div",X,[e("div",Y,[e("div",ee,[e("h4",te,[a(n,{t:"Configuration Settings"})]),e("button",{type:"button",class:"btn-close ms-auto",onClick:t[0]||(t[0]=o=>_.$emit("close"))})]),e("div",se,[e("div",oe,[w.value?W("",!0):(y(),x("div",ae,[e("small",ne,[a(n,{t:"Name"})]),e("small",null,S(s.Name),1),e("button",{onClick:t[1]||(t[1]=o=>w.value=!0),class:"btn btn-sm bg-danger-subtle border-danger-subtle text-danger-emphasis rounded-3 ms-auto"}," Update Name ")])),w.value?(y(),A(Z,{key:1,onClose:t[2]||(t[2]=o=>w.value=!1),"configuration-name":s.Name},null,8,["configuration-name"])):(y(),x(F,{key:2},[t[17]||(t[17]=e("hr",null,null,-1)),e("div",le,[e("small",ie,[a(n,{t:"Public Key"})]),e("small",re,S(s.PublicKey),1)]),t[18]||(t[18]=e("hr",null,null,-1)),e("div",null,[e("div",de,[e("label",ue,[e("small",ce,[a(n,{t:"Private Key"})])]),e("div",me,[u(e("input",{class:"form-check-input",type:"checkbox",role:"switch",id:"editPrivateKeySwitch","onUpdate:modelValue":t[3]||(t[3]=o=>m.value=o)},null,512),[[B,m.value]]),t[14]||(t[14]=e("label",{class:"form-check-label",for:"editPrivateKeySwitch"},[e("small",null,"Edit")],-1))])]),u(e("input",{type:"text",class:N(["form-control form-control-sm rounded-3",{"is-invalid":!g.PrivateKey}]),disabled:i.value||!m.value,onKeyup:t[4]||(t[4]=o=>r()),"onUpdate:modelValue":t[5]||(t[5]=o=>s.PrivateKey=o),id:"configuration_private_key"},null,42,fe),[[c,s.PrivateKey]])]),e("div",null,[e("label",be,[e("small",pe,[a(n,{t:"IP Address/CIDR"})])]),u(e("input",{type:"text",class:"form-control form-control-sm rounded-3",disabled:i.value,"onUpdate:modelValue":t[6]||(t[6]=o=>s.Address=o),id:"configuration_ipaddress_cidr"},null,8,ge),[[c,s.Address]])]),e("div",null,[e("label",ve,[e("small",_e,[a(n,{t:"Listen Port"})])]),u(e("input",{type:"number",class:"form-control form-control-sm rounded-3",disabled:i.value,"onUpdate:modelValue":t[7]||(t[7]=o=>s.ListenPort=o),id:"configuration_listen_port"},null,8,ye),[[c,s.ListenPort]])]),e("div",null,[e("label",he,[e("small",we,[a(n,{t:"PreUp"})])]),u(e("input",{type:"text",class:"form-control form-control-sm rounded-3",disabled:i.value,"onUpdate:modelValue":t[8]||(t[8]=o=>s.PreUp=o),id:"configuration_preup"},null,8,xe),[[c,s.PreUp]])]),e("div",null,[e("label",Ce,[e("small",Pe,[a(n,{t:"PreDown"})])]),u(e("input",{type:"text",class:"form-control form-control-sm rounded-3",disabled:i.value,"onUpdate:modelValue":t[9]||(t[9]=o=>s.PreDown=o),id:"configuration_predown"},null,8,ke),[[c,s.PreDown]])]),e("div",null,[e("label",Ne,[e("small",Se,[a(n,{t:"PostUp"})])]),u(e("input",{type:"text",class:"form-control form-control-sm rounded-3",disabled:i.value,"onUpdate:modelValue":t[10]||(t[10]=o=>s.PostUp=o),id:"configuration_postup"},null,8,Ke),[[c,s.PostUp]])]),e("div",null,[e("label",$e,[e("small",Ue,[a(n,{t:"PostDown"})])]),u(e("input",{type:"text",class:"form-control form-control-sm rounded-3",disabled:i.value,"onUpdate:modelValue":t[11]||(t[11]=o=>s.PostDown=o),id:"configuration_postdown"},null,8,De),[[c,s.PostDown]])]),e("div",Ie,[e("button",{class:"btn bg-secondary-subtle border-secondary-subtle text-secondary-emphasis rounded-3 shadow ms-auto",onClick:t[12]||(t[12]=o=>v()),disabled:!f.value||i.value},t[15]||(t[15]=[e("i",{class:"bi bi-arrow-clockwise"},null,-1)]),8,Ve),e("button",{class:"btn bg-primary-subtle border-primary-subtle text-primary-emphasis rounded-3 shadow",disabled:!f.value||i.value,onClick:t[13]||(t[13]=o=>V())},t[16]||(t[16]=[e("i",{class:"bi bi-save-fill"},null,-1)]),8,Me)])],64))])])])])])],512))}};export{Je as default}; diff --git a/src/static/app/dist/assets/index-C0bjwRB-.js b/src/static/app/dist/assets/index-C0bjwRB-.js new file mode 100644 index 0000000..d3b0ab4 --- /dev/null +++ b/src/static/app/dist/assets/index-C0bjwRB-.js @@ -0,0 +1 @@ +import{r as C,o as D,a as o,c as l,b as e,d as s,e as g,f as m,t as v,_ as k,W as L,D as $,g as H,G as N,w as c,F as y,h as w,n as S,i as _,T as M,j as b,k as A,l as G,S as T}from"./index-DOaPWS1X.js";import{L as h}from"./localeText-CaAXeE0W.js";import{M as V}from"./message-ChztDIV3.js";import"./dayjs.min-D8jwq_wn.js";const U={class:"peerSettingContainer w-100 h-100 position-absolute top-0 start-0 overflow-y-scroll"},W={class:"container d-flex h-100 w-100"},B={class:"m-auto modal-dialog-centered dashboardModal"},O={class:"card rounded-3 shadow flex-grow-1"},R={class:"card-header bg-transparent d-flex align-items-center gap-2 border-0 p-4 pb-2"},z={class:"mb-0"},F={class:"card-body px-4 pb-4 d-flex flex-column gap-2"},j={class:"card text-decoration-none",target:"_blank",role:"button",href:"https://discord.com/invite/ZkJSPAaQ"},q={class:"card-body d-flex gap-4 align-items-center"},I={class:"d-flex align-items-center"},J={class:"badge rounded-pill text-bg-primary ms-2"},P={key:0,class:"spinner-border spinner-border-sm",style:{width:"0.7rem",height:"0.7rem"}},E={key:1},Q={class:"text-muted"},Z={class:"card text-decoration-none",href:"https://donaldzou.github.io/WGDashboard-Documentation/",target:"_blank"},K={class:"card-body d-flex gap-4 align-items-center"},X={class:"mb-0"},Y={class:"text-muted"},ee={__name:"helpModal",setup(n){const t=C(!0),f=C(void 0);return D(()=>{t.value=!0,fetch("https://discord.com/api/guilds/1276818723637956628/widget.json").then(d=>d.json()).then(d=>{f.value=d,t.value=!1}).catch(()=>{t.value=!1})}),(d,a)=>(o(),l("div",U,[e("div",W,[e("div",B,[e("div",O,[e("div",R,[e("h4",z,[s(h,{t:"Help"})]),e("button",{type:"button",class:"btn-close ms-auto",onClick:a[0]||(a[0]=p=>d.$emit("close"))})]),e("div",F,[e("a",j,[e("div",q,[a[3]||(a[3]=e("h1",{class:"mb-0"},[e("i",{class:"bi bi-discord"})],-1)),e("div",null,[e("div",I,[a[2]||(a[2]=e("h5",{class:"mb-0"}," Discord Server ",-1)),e("span",J,[t.value?(o(),l("span",P)):g("",!0),f.value!==void 0&&!t.value?(o(),l("span",E,[a[1]||(a[1]=e("i",{class:"bi bi-person-fill me-2"},null,-1)),m(v(f.value.presence_count)+" Online ",1)])):g("",!0)])]),e("small",Q,[s(h,{t:"Join our Discord server for quick help or chat about WGDashboard!"})])])])]),e("a",Z,[e("div",K,[a[4]||(a[4]=e("h1",{class:"mb-0"},[e("i",{class:"bi bi-hash"})],-1)),e("div",null,[e("h5",X,[s(h,{t:"Official Documentation"})]),e("small",Y,[s(h,{t:"Official documentation contains User Guides and more..."})])])])])])])])])]))}},te={name:"navbar",components:{HelpModal:ee,LocaleText:h},setup(){const n=L(),t=$();return{wireguardConfigurationsStore:n,dashboardConfigurationStore:t}},data(){return{updateAvailable:!1,updateMessage:"Checking for update...",updateUrl:"",openHelpModal:!1}},computed:{getActiveCrossServer(){if(this.dashboardConfigurationStore.ActiveServerConfiguration)return new URL(this.dashboardConfigurationStore.CrossServerConfiguration.ServerList[this.dashboardConfigurationStore.ActiveServerConfiguration].host)}},mounted(){H("/api/getDashboardUpdate",{},n=>{n.status?(n.data&&(this.updateAvailable=!0,this.updateUrl=n.data),this.updateMessage=n.message):(this.updateMessage=N("Failed to check available update"),console.log(`Failed to get update: ${n.message}`))})}},se=["data-bs-theme"],oe={id:"sidebarMenu",class:"bg-body-tertiary sidebar border h-100 rounded-3 shadow overflow-y-scroll"},ae={class:"sidebar-sticky"},ne={class:"text-white text-center m-0 py-3 mb-3 btn-brand"},ie={key:0,class:"ms-auto"},re={class:"nav flex-column px-2"},le={class:"nav-item"},de={class:"nav-item"},ce={class:"nav-item"},ue={class:"sidebar-heading px-3 mt-4 mb-1 text-muted text-center"},me={class:"nav flex-column px-2"},be={class:"nav-item"},fe={class:"sidebar-heading px-3 mt-4 mb-1 text-muted text-center"},pe={class:"nav flex-column px-2"},ve={class:"nav-item"},he={class:"nav-item"},_e={class:"nav flex-column px-2 mb-3"},ge={class:"nav-item"},xe={class:"nav-item",style:{"font-size":"0.8rem"}},Ce=["href"],Se={class:"nav-link text-muted rounded-3"},ke={key:1,class:"nav-link text-muted rounded-3"};function $e(n,t,f,d,a,p){const i=b("LocaleText"),u=b("RouterLink"),x=b("HelpModal");return o(),l("div",{class:S(["col-md-3 col-lg-2 d-md-block p-2 navbar-container",{active:this.dashboardConfigurationStore.ShowNavBar}]),"data-bs-theme":d.dashboardConfigurationStore.Configuration.Server.dashboard_theme},[e("nav",oe,[e("div",ae,[e("div",ne,[t[4]||(t[4]=e("h5",{class:"mb-0"}," WGDashboard ",-1)),p.getActiveCrossServer!==void 0?(o(),l("small",ie,[t[3]||(t[3]=e("i",{class:"bi bi-hdd-rack-fill me-2"},null,-1)),m(v(p.getActiveCrossServer.host),1)])):g("",!0)]),e("ul",re,[e("li",le,[s(u,{class:"nav-link rounded-3",to:"/","exact-active-class":"active"},{default:c(()=>[t[5]||(t[5]=e("i",{class:"bi bi-house me-2"},null,-1)),s(i,{t:"Home"})]),_:1})]),e("li",de,[s(u,{class:"nav-link rounded-3",to:"/settings","exact-active-class":"active"},{default:c(()=>[t[6]||(t[6]=e("i",{class:"bi bi-gear me-2"},null,-1)),s(i,{t:"Settings"})]),_:1})]),e("li",ce,[e("a",{class:"nav-link rounded-3",role:"button",onClick:t[0]||(t[0]=r=>a.openHelpModal=!0)},[t[7]||(t[7]=e("i",{class:"bi bi-question-circle me-2"},null,-1)),s(i,{t:"Help"})])])]),t[12]||(t[12]=e("hr",{class:"text-body"},null,-1)),e("h6",ue,[t[8]||(t[8]=e("i",{class:"bi bi-body-text me-2"},null,-1)),s(i,{t:"WireGuard Configurations"})]),e("ul",me,[(o(!0),l(y,null,w(this.wireguardConfigurationsStore.Configurations,r=>(o(),l("li",be,[s(u,{to:"/configuration/"+r.Name+"/peers",class:"nav-link nav-conf-link rounded-3","active-class":"active"},{default:c(()=>[e("span",{class:S(["dot me-2",{active:r.Status}])},null,2),m(" "+v(r.Name),1)]),_:2},1032,["to"])]))),256))]),t[13]||(t[13]=e("hr",{class:"text-body"},null,-1)),e("h6",fe,[t[9]||(t[9]=e("i",{class:"bi bi-tools me-2"},null,-1)),s(i,{t:"Tools"})]),e("ul",pe,[e("li",ve,[s(u,{to:"/ping",class:"nav-link rounded-3","active-class":"active"},{default:c(()=>[s(i,{t:"Ping"})]),_:1})]),e("li",he,[s(u,{to:"/traceroute",class:"nav-link rounded-3","active-class":"active"},{default:c(()=>[s(i,{t:"Traceroute"})]),_:1})])]),t[14]||(t[14]=e("hr",{class:"text-body"},null,-1)),e("ul",_e,[e("li",ge,[e("a",{class:"nav-link text-danger rounded-3",onClick:t[1]||(t[1]=r=>this.dashboardConfigurationStore.signOut()),role:"button",style:{"font-weight":"bold"}},[t[10]||(t[10]=e("i",{class:"bi bi-box-arrow-left me-2"},null,-1)),s(i,{t:"Sign Out"})])]),e("li",xe,[this.updateAvailable?(o(),l("a",{key:0,href:this.updateUrl,class:"text-decoration-none rounded-3",target:"_blank"},[e("small",Se,[s(i,{t:this.updateMessage},null,8,["t"]),t[11]||(t[11]=m(" (")),s(i,{t:"Current Version:"}),m(" "+v(d.dashboardConfigurationStore.Configuration.Server.version)+") ",1)])],8,Ce)):(o(),l("small",ke,[s(i,{t:this.updateMessage},null,8,["t"]),m(" ("+v(d.dashboardConfigurationStore.Configuration.Server.version)+") ",1)]))])])])]),s(M,{name:"zoom"},{default:c(()=>[this.openHelpModal?(o(),_(x,{key:0,onClose:t[2]||(t[2]=r=>{a.openHelpModal=!1})})):g("",!0)]),_:1})],10,se)}const ye=k(te,[["render",$e],["__scopeId","data-v-83a7789f"]]),we={name:"index",components:{Message:V,Navbar:ye},async setup(){return{dashboardConfigurationStore:$()}},computed:{getMessages(){return this.dashboardConfigurationStore.Messages.filter(n=>n.show)}}},Me=["data-bs-theme"],De={class:"row h-100"},Le={class:"col-md-9 col-lg-10 overflow-y-scroll mb-0 pt-2"},He={class:"messageCentre text-body position-fixed d-flex"};function Ne(n,t,f,d,a,p){const i=b("Navbar"),u=b("RouterView"),x=b("Message");return o(),l("div",{class:"container-fluid flex-grow-1 main","data-bs-theme":this.dashboardConfigurationStore.Configuration.Server.dashboard_theme},[e("div",De,[s(i),e("main",Le,[(o(),_(T,null,{default:c(()=>[s(u,null,{default:c(({Component:r})=>[s(M,{name:"fade2",mode:"out-in",appear:""},{default:c(()=>[(o(),_(G(r)))]),_:2},1024)]),_:1})]),_:1})),e("div",He,[s(A,{name:"message",tag:"div",class:"position-relative flex-sm-grow-0 flex-grow-1 d-flex align-items-end ms-sm-auto flex-column gap-2"},{default:c(()=>[(o(!0),l(y,null,w(p.getMessages.slice().reverse(),r=>(o(),_(x,{message:r,key:r.id},null,8,["message"]))),128))]),_:1})])])])],8,Me)}const Ue=k(we,[["render",Ne],["__scopeId","data-v-ce114a8b"]]);export{Ue as default}; diff --git a/src/static/app/dist/assets/index-DOaPWS1X.js b/src/static/app/dist/assets/index-DOaPWS1X.js new file mode 100644 index 0000000..f62ebfa --- /dev/null +++ b/src/static/app/dist/assets/index-DOaPWS1X.js @@ -0,0 +1,44 @@ +const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/index-C0bjwRB-.js","assets/localeText-CaAXeE0W.js","assets/message-ChztDIV3.js","assets/dayjs.min-D8jwq_wn.js","assets/message-CmGi0ZIz.css","assets/index-BKNwSldE.css","assets/configurationList-BAuTfbU-.js","assets/configurationList-CWcGXYWr.css","assets/settings-B22cgeoY.js","assets/vue-datepicker-D91GxXPq.js","assets/settings-H5PFVa1m.css","assets/ping-BB-b6WHn.js","assets/osmap-BRB1j1wE.js","assets/osmap-CoctJCk_.css","assets/ping-DojRH9NX.css","assets/traceroute-BGkng5o-.js","assets/traceroute-C5JbTTY4.css","assets/newConfiguration-R-olohWo.js","assets/index-L60y6kc9.js","assets/restoreConfiguration-DN55Pnc_.js","assets/restoreConfiguration-C77qni2g.css","assets/peerList-C2NQGcke.js","assets/peerList-D1fpqVhD.css","assets/peerCreate-B_n86hyd.js","assets/peerCreate-BKh8DeBv.css","assets/signin-M3EwqtyC.js","assets/signin-wzAxJYhM.css","assets/setup-DUH8iz4Z.js","assets/totp-BZU5dK65.js","assets/browser-CjSdxGTc.js","assets/share-BU0DtM5p.js","assets/share-B4McccvP.css"])))=>i.map(i=>d[i]); +(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const r of document.querySelectorAll('link[rel="modulepreload"]'))s(r);new MutationObserver(r=>{for(const o of r)if(o.type==="childList")for(const a of o.addedNodes)a.tagName==="LINK"&&a.rel==="modulepreload"&&s(a)}).observe(document,{childList:!0,subtree:!0});function n(r){const o={};return r.integrity&&(o.integrity=r.integrity),r.referrerPolicy&&(o.referrerPolicy=r.referrerPolicy),r.crossOrigin==="use-credentials"?o.credentials="include":r.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function s(r){if(r.ep)return;r.ep=!0;const o=n(r);fetch(r.href,o)}})();var vg=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Gy(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function Eg(e){if(e.__esModule)return e;var t=e.default;if(typeof t=="function"){var n=function s(){return this instanceof s?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};n.prototype=t.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(e).forEach(function(s){var r=Object.getOwnPropertyDescriptor(e,s);Object.defineProperty(n,s,r.get?r:{enumerable:!0,get:function(){return e[s]}})}),n}var yg={exports:{}},qe="top",nt="bottom",st="right",ze="left",Kr="auto",fs=[qe,nt,st,ze],On="start",es="end",fc="clippingParents",uo="viewport",Kn="popper",dc="reference",Bi=fs.reduce(function(e,t){return e.concat([t+"-"+On,t+"-"+es])},[]),fo=[].concat(fs,[Kr]).reduce(function(e,t){return e.concat([t,t+"-"+On,t+"-"+es])},[]),hc="beforeRead",pc="read",gc="afterRead",mc="beforeMain",_c="main",vc="afterMain",Ec="beforeWrite",yc="write",bc="afterWrite",Ac=[hc,pc,gc,mc,_c,vc,Ec,yc,bc];function Nt(e){return e?(e.nodeName||"").toLowerCase():null}function rt(e){if(e==null)return window;if(e.toString()!=="[object Window]"){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function xn(e){var t=rt(e).Element;return e instanceof t||e instanceof Element}function ct(e){var t=rt(e).HTMLElement;return e instanceof t||e instanceof HTMLElement}function ho(e){if(typeof ShadowRoot>"u")return!1;var t=rt(e).ShadowRoot;return e instanceof t||e instanceof ShadowRoot}function bg(e){var t=e.state;Object.keys(t.elements).forEach(function(n){var s=t.styles[n]||{},r=t.attributes[n]||{},o=t.elements[n];!ct(o)||!Nt(o)||(Object.assign(o.style,s),Object.keys(r).forEach(function(a){var l=r[a];l===!1?o.removeAttribute(a):o.setAttribute(a,l===!0?"":l)}))})}function Ag(e){var t=e.state,n={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,n.popper),t.styles=n,t.elements.arrow&&Object.assign(t.elements.arrow.style,n.arrow),function(){Object.keys(t.elements).forEach(function(s){var r=t.elements[s],o=t.attributes[s]||{},a=Object.keys(t.styles.hasOwnProperty(s)?t.styles[s]:n[s]),l=a.reduce(function(c,d){return c[d]="",c},{});!ct(r)||!Nt(r)||(Object.assign(r.style,l),Object.keys(o).forEach(function(c){r.removeAttribute(c)}))})}}const po={name:"applyStyles",enabled:!0,phase:"write",fn:bg,effect:Ag,requires:["computeStyles"]};function Ot(e){return e.split("-")[0]}var Tn=Math.max,Dr=Math.min,ts=Math.round;function ji(){var e=navigator.userAgentData;return e!=null&&e.brands&&Array.isArray(e.brands)?e.brands.map(function(t){return t.brand+"/"+t.version}).join(" "):navigator.userAgent}function Tc(){return!/^((?!chrome|android).)*safari/i.test(ji())}function ns(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!1);var s=e.getBoundingClientRect(),r=1,o=1;t&&ct(e)&&(r=e.offsetWidth>0&&ts(s.width)/e.offsetWidth||1,o=e.offsetHeight>0&&ts(s.height)/e.offsetHeight||1);var a=xn(e)?rt(e):window,l=a.visualViewport,c=!Tc()&&n,d=(s.left+(c&&l?l.offsetLeft:0))/r,f=(s.top+(c&&l?l.offsetTop:0))/o,h=s.width/r,p=s.height/o;return{width:h,height:p,top:f,right:d+h,bottom:f+p,left:d,x:d,y:f}}function go(e){var t=ns(e),n=e.offsetWidth,s=e.offsetHeight;return Math.abs(t.width-n)<=1&&(n=t.width),Math.abs(t.height-s)<=1&&(s=t.height),{x:e.offsetLeft,y:e.offsetTop,width:n,height:s}}function wc(e,t){var n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&ho(n)){var s=t;do{if(s&&e.isSameNode(s))return!0;s=s.parentNode||s.host}while(s)}return!1}function Bt(e){return rt(e).getComputedStyle(e)}function Tg(e){return["table","td","th"].indexOf(Nt(e))>=0}function on(e){return((xn(e)?e.ownerDocument:e.document)||window.document).documentElement}function Wr(e){return Nt(e)==="html"?e:e.assignedSlot||e.parentNode||(ho(e)?e.host:null)||on(e)}function Ba(e){return!ct(e)||Bt(e).position==="fixed"?null:e.offsetParent}function wg(e){var t=/firefox/i.test(ji()),n=/Trident/i.test(ji());if(n&&ct(e)){var s=Bt(e);if(s.position==="fixed")return null}var r=Wr(e);for(ho(r)&&(r=r.host);ct(r)&&["html","body"].indexOf(Nt(r))<0;){var o=Bt(r);if(o.transform!=="none"||o.perspective!=="none"||o.contain==="paint"||["transform","perspective"].indexOf(o.willChange)!==-1||t&&o.willChange==="filter"||t&&o.filter&&o.filter!=="none")return r;r=r.parentNode}return null}function Us(e){for(var t=rt(e),n=Ba(e);n&&Tg(n)&&Bt(n).position==="static";)n=Ba(n);return n&&(Nt(n)==="html"||Nt(n)==="body"&&Bt(n).position==="static")?t:n||wg(e)||t}function mo(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function Ss(e,t,n){return Tn(e,Dr(t,n))}function Cg(e,t,n){var s=Ss(e,t,n);return s>n?n:s}function Cc(){return{top:0,right:0,bottom:0,left:0}}function Sc(e){return Object.assign({},Cc(),e)}function Oc(e,t){return t.reduce(function(n,s){return n[s]=e,n},{})}var Sg=function(t,n){return t=typeof t=="function"?t(Object.assign({},n.rects,{placement:n.placement})):t,Sc(typeof t!="number"?t:Oc(t,fs))};function Og(e){var t,n=e.state,s=e.name,r=e.options,o=n.elements.arrow,a=n.modifiersData.popperOffsets,l=Ot(n.placement),c=mo(l),d=[ze,st].indexOf(l)>=0,f=d?"height":"width";if(!(!o||!a)){var h=Sg(r.padding,n),p=go(o),E=c==="y"?qe:ze,x=c==="y"?nt:st,C=n.rects.reference[f]+n.rects.reference[c]-a[c]-n.rects.popper[f],D=a[c]-n.rects.reference[c],P=Us(o),V=P?c==="y"?P.clientHeight||0:P.clientWidth||0:0,k=C/2-D/2,M=h[E],b=V-p[f]-h[x],y=V/2-p[f]/2+k,S=Ss(M,y,b),T=c;n.modifiersData[s]=(t={},t[T]=S,t.centerOffset=S-y,t)}}function xg(e){var t=e.state,n=e.options,s=n.element,r=s===void 0?"[data-popper-arrow]":s;r!=null&&(typeof r=="string"&&(r=t.elements.popper.querySelector(r),!r)||wc(t.elements.popper,r)&&(t.elements.arrow=r))}const xc={name:"arrow",enabled:!0,phase:"main",fn:Og,effect:xg,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function ss(e){return e.split("-")[1]}var Ng={top:"auto",right:"auto",bottom:"auto",left:"auto"};function $g(e,t){var n=e.x,s=e.y,r=t.devicePixelRatio||1;return{x:ts(n*r)/r||0,y:ts(s*r)/r||0}}function ja(e){var t,n=e.popper,s=e.popperRect,r=e.placement,o=e.variation,a=e.offsets,l=e.position,c=e.gpuAcceleration,d=e.adaptive,f=e.roundOffsets,h=e.isFixed,p=a.x,E=p===void 0?0:p,x=a.y,C=x===void 0?0:x,D=typeof f=="function"?f({x:E,y:C}):{x:E,y:C};E=D.x,C=D.y;var P=a.hasOwnProperty("x"),V=a.hasOwnProperty("y"),k=ze,M=qe,b=window;if(d){var y=Us(n),S="clientHeight",T="clientWidth";if(y===rt(n)&&(y=on(n),Bt(y).position!=="static"&&l==="absolute"&&(S="scrollHeight",T="scrollWidth")),y=y,r===qe||(r===ze||r===st)&&o===es){M=nt;var A=h&&y===b&&b.visualViewport?b.visualViewport.height:y[S];C-=A-s.height,C*=c?1:-1}if(r===ze||(r===qe||r===nt)&&o===es){k=st;var w=h&&y===b&&b.visualViewport?b.visualViewport.width:y[T];E-=w-s.width,E*=c?1:-1}}var j=Object.assign({position:l},d&&Ng),B=f===!0?$g({x:E,y:C},rt(n)):{x:E,y:C};if(E=B.x,C=B.y,c){var Q;return Object.assign({},j,(Q={},Q[M]=V?"0":"",Q[k]=P?"0":"",Q.transform=(b.devicePixelRatio||1)<=1?"translate("+E+"px, "+C+"px)":"translate3d("+E+"px, "+C+"px, 0)",Q))}return Object.assign({},j,(t={},t[M]=V?C+"px":"",t[k]=P?E+"px":"",t.transform="",t))}function Dg(e){var t=e.state,n=e.options,s=n.gpuAcceleration,r=s===void 0?!0:s,o=n.adaptive,a=o===void 0?!0:o,l=n.roundOffsets,c=l===void 0?!0:l,d={placement:Ot(t.placement),variation:ss(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:r,isFixed:t.options.strategy==="fixed"};t.modifiersData.popperOffsets!=null&&(t.styles.popper=Object.assign({},t.styles.popper,ja(Object.assign({},d,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:a,roundOffsets:c})))),t.modifiersData.arrow!=null&&(t.styles.arrow=Object.assign({},t.styles.arrow,ja(Object.assign({},d,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:c})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})}const _o={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:Dg,data:{}};var dr={passive:!0};function Lg(e){var t=e.state,n=e.instance,s=e.options,r=s.scroll,o=r===void 0?!0:r,a=s.resize,l=a===void 0?!0:a,c=rt(t.elements.popper),d=[].concat(t.scrollParents.reference,t.scrollParents.popper);return o&&d.forEach(function(f){f.addEventListener("scroll",n.update,dr)}),l&&c.addEventListener("resize",n.update,dr),function(){o&&d.forEach(function(f){f.removeEventListener("scroll",n.update,dr)}),l&&c.removeEventListener("resize",n.update,dr)}}const vo={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:Lg,data:{}};var Rg={left:"right",right:"left",bottom:"top",top:"bottom"};function wr(e){return e.replace(/left|right|bottom|top/g,function(t){return Rg[t]})}var Ig={start:"end",end:"start"};function Ka(e){return e.replace(/start|end/g,function(t){return Ig[t]})}function Eo(e){var t=rt(e),n=t.pageXOffset,s=t.pageYOffset;return{scrollLeft:n,scrollTop:s}}function yo(e){return ns(on(e)).left+Eo(e).scrollLeft}function Pg(e,t){var n=rt(e),s=on(e),r=n.visualViewport,o=s.clientWidth,a=s.clientHeight,l=0,c=0;if(r){o=r.width,a=r.height;var d=Tc();(d||!d&&t==="fixed")&&(l=r.offsetLeft,c=r.offsetTop)}return{width:o,height:a,x:l+yo(e),y:c}}function Mg(e){var t,n=on(e),s=Eo(e),r=(t=e.ownerDocument)==null?void 0:t.body,o=Tn(n.scrollWidth,n.clientWidth,r?r.scrollWidth:0,r?r.clientWidth:0),a=Tn(n.scrollHeight,n.clientHeight,r?r.scrollHeight:0,r?r.clientHeight:0),l=-s.scrollLeft+yo(e),c=-s.scrollTop;return Bt(r||n).direction==="rtl"&&(l+=Tn(n.clientWidth,r?r.clientWidth:0)-o),{width:o,height:a,x:l,y:c}}function bo(e){var t=Bt(e),n=t.overflow,s=t.overflowX,r=t.overflowY;return/auto|scroll|overlay|hidden/.test(n+r+s)}function Nc(e){return["html","body","#document"].indexOf(Nt(e))>=0?e.ownerDocument.body:ct(e)&&bo(e)?e:Nc(Wr(e))}function Os(e,t){var n;t===void 0&&(t=[]);var s=Nc(e),r=s===((n=e.ownerDocument)==null?void 0:n.body),o=rt(s),a=r?[o].concat(o.visualViewport||[],bo(s)?s:[]):s,l=t.concat(a);return r?l:l.concat(Os(Wr(a)))}function Ki(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function kg(e,t){var n=ns(e,!1,t==="fixed");return n.top=n.top+e.clientTop,n.left=n.left+e.clientLeft,n.bottom=n.top+e.clientHeight,n.right=n.left+e.clientWidth,n.width=e.clientWidth,n.height=e.clientHeight,n.x=n.left,n.y=n.top,n}function Wa(e,t,n){return t===uo?Ki(Pg(e,n)):xn(t)?kg(t,n):Ki(Mg(on(e)))}function Vg(e){var t=Os(Wr(e)),n=["absolute","fixed"].indexOf(Bt(e).position)>=0,s=n&&ct(e)?Us(e):e;return xn(s)?t.filter(function(r){return xn(r)&&wc(r,s)&&Nt(r)!=="body"}):[]}function Fg(e,t,n,s){var r=t==="clippingParents"?Vg(e):[].concat(t),o=[].concat(r,[n]),a=o[0],l=o.reduce(function(c,d){var f=Wa(e,d,s);return c.top=Tn(f.top,c.top),c.right=Dr(f.right,c.right),c.bottom=Dr(f.bottom,c.bottom),c.left=Tn(f.left,c.left),c},Wa(e,a,s));return l.width=l.right-l.left,l.height=l.bottom-l.top,l.x=l.left,l.y=l.top,l}function $c(e){var t=e.reference,n=e.element,s=e.placement,r=s?Ot(s):null,o=s?ss(s):null,a=t.x+t.width/2-n.width/2,l=t.y+t.height/2-n.height/2,c;switch(r){case qe:c={x:a,y:t.y-n.height};break;case nt:c={x:a,y:t.y+t.height};break;case st:c={x:t.x+t.width,y:l};break;case ze:c={x:t.x-n.width,y:l};break;default:c={x:t.x,y:t.y}}var d=r?mo(r):null;if(d!=null){var f=d==="y"?"height":"width";switch(o){case On:c[d]=c[d]-(t[f]/2-n[f]/2);break;case es:c[d]=c[d]+(t[f]/2-n[f]/2);break}}return c}function rs(e,t){t===void 0&&(t={});var n=t,s=n.placement,r=s===void 0?e.placement:s,o=n.strategy,a=o===void 0?e.strategy:o,l=n.boundary,c=l===void 0?fc:l,d=n.rootBoundary,f=d===void 0?uo:d,h=n.elementContext,p=h===void 0?Kn:h,E=n.altBoundary,x=E===void 0?!1:E,C=n.padding,D=C===void 0?0:C,P=Sc(typeof D!="number"?D:Oc(D,fs)),V=p===Kn?dc:Kn,k=e.rects.popper,M=e.elements[x?V:p],b=Fg(xn(M)?M:M.contextElement||on(e.elements.popper),c,f,a),y=ns(e.elements.reference),S=$c({reference:y,element:k,strategy:"absolute",placement:r}),T=Ki(Object.assign({},k,S)),A=p===Kn?T:y,w={top:b.top-A.top+P.top,bottom:A.bottom-b.bottom+P.bottom,left:b.left-A.left+P.left,right:A.right-b.right+P.right},j=e.modifiersData.offset;if(p===Kn&&j){var B=j[r];Object.keys(w).forEach(function(Q){var oe=[st,nt].indexOf(Q)>=0?1:-1,he=[qe,nt].indexOf(Q)>=0?"y":"x";w[Q]+=B[he]*oe})}return w}function Hg(e,t){t===void 0&&(t={});var n=t,s=n.placement,r=n.boundary,o=n.rootBoundary,a=n.padding,l=n.flipVariations,c=n.allowedAutoPlacements,d=c===void 0?fo:c,f=ss(s),h=f?l?Bi:Bi.filter(function(x){return ss(x)===f}):fs,p=h.filter(function(x){return d.indexOf(x)>=0});p.length===0&&(p=h);var E=p.reduce(function(x,C){return x[C]=rs(e,{placement:C,boundary:r,rootBoundary:o,padding:a})[Ot(C)],x},{});return Object.keys(E).sort(function(x,C){return E[x]-E[C]})}function Bg(e){if(Ot(e)===Kr)return[];var t=wr(e);return[Ka(e),t,Ka(t)]}function jg(e){var t=e.state,n=e.options,s=e.name;if(!t.modifiersData[s]._skip){for(var r=n.mainAxis,o=r===void 0?!0:r,a=n.altAxis,l=a===void 0?!0:a,c=n.fallbackPlacements,d=n.padding,f=n.boundary,h=n.rootBoundary,p=n.altBoundary,E=n.flipVariations,x=E===void 0?!0:E,C=n.allowedAutoPlacements,D=t.options.placement,P=Ot(D),V=P===D,k=c||(V||!x?[wr(D)]:Bg(D)),M=[D].concat(k).reduce(function(Be,Pe){return Be.concat(Ot(Pe)===Kr?Hg(t,{placement:Pe,boundary:f,rootBoundary:h,padding:d,flipVariations:x,allowedAutoPlacements:C}):Pe)},[]),b=t.rects.reference,y=t.rects.popper,S=new Map,T=!0,A=M[0],w=0;w=0,he=oe?"width":"height",te=rs(t,{placement:j,boundary:f,rootBoundary:h,altBoundary:p,padding:d}),Z=oe?Q?st:ze:Q?nt:qe;b[he]>y[he]&&(Z=wr(Z));var ce=wr(Z),Ce=[];if(o&&Ce.push(te[B]<=0),l&&Ce.push(te[Z]<=0,te[ce]<=0),Ce.every(function(Be){return Be})){A=j,T=!1;break}S.set(j,Ce)}if(T)for(var He=x?3:1,De=function(Pe){var we=M.find(function(R){var q=S.get(R);if(q)return q.slice(0,Pe).every(function(z){return z})});if(we)return A=we,"break"},Ae=He;Ae>0;Ae--){var et=De(Ae);if(et==="break")break}t.placement!==A&&(t.modifiersData[s]._skip=!0,t.placement=A,t.reset=!0)}}const Dc={name:"flip",enabled:!0,phase:"main",fn:jg,requiresIfExists:["offset"],data:{_skip:!1}};function Ua(e,t,n){return n===void 0&&(n={x:0,y:0}),{top:e.top-t.height-n.y,right:e.right-t.width+n.x,bottom:e.bottom-t.height+n.y,left:e.left-t.width-n.x}}function Ya(e){return[qe,st,nt,ze].some(function(t){return e[t]>=0})}function Kg(e){var t=e.state,n=e.name,s=t.rects.reference,r=t.rects.popper,o=t.modifiersData.preventOverflow,a=rs(t,{elementContext:"reference"}),l=rs(t,{altBoundary:!0}),c=Ua(a,s),d=Ua(l,r,o),f=Ya(c),h=Ya(d);t.modifiersData[n]={referenceClippingOffsets:c,popperEscapeOffsets:d,isReferenceHidden:f,hasPopperEscaped:h},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":f,"data-popper-escaped":h})}const Lc={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:Kg};function Wg(e,t,n){var s=Ot(e),r=[ze,qe].indexOf(s)>=0?-1:1,o=typeof n=="function"?n(Object.assign({},t,{placement:e})):n,a=o[0],l=o[1];return a=a||0,l=(l||0)*r,[ze,st].indexOf(s)>=0?{x:l,y:a}:{x:a,y:l}}function Ug(e){var t=e.state,n=e.options,s=e.name,r=n.offset,o=r===void 0?[0,0]:r,a=fo.reduce(function(f,h){return f[h]=Wg(h,t.rects,o),f},{}),l=a[t.placement],c=l.x,d=l.y;t.modifiersData.popperOffsets!=null&&(t.modifiersData.popperOffsets.x+=c,t.modifiersData.popperOffsets.y+=d),t.modifiersData[s]=a}const Rc={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:Ug};function Yg(e){var t=e.state,n=e.name;t.modifiersData[n]=$c({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})}const Ao={name:"popperOffsets",enabled:!0,phase:"read",fn:Yg,data:{}};function Gg(e){return e==="x"?"y":"x"}function qg(e){var t=e.state,n=e.options,s=e.name,r=n.mainAxis,o=r===void 0?!0:r,a=n.altAxis,l=a===void 0?!1:a,c=n.boundary,d=n.rootBoundary,f=n.altBoundary,h=n.padding,p=n.tether,E=p===void 0?!0:p,x=n.tetherOffset,C=x===void 0?0:x,D=rs(t,{boundary:c,rootBoundary:d,padding:h,altBoundary:f}),P=Ot(t.placement),V=ss(t.placement),k=!V,M=mo(P),b=Gg(M),y=t.modifiersData.popperOffsets,S=t.rects.reference,T=t.rects.popper,A=typeof C=="function"?C(Object.assign({},t.rects,{placement:t.placement})):C,w=typeof A=="number"?{mainAxis:A,altAxis:A}:Object.assign({mainAxis:0,altAxis:0},A),j=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,B={x:0,y:0};if(y){if(o){var Q,oe=M==="y"?qe:ze,he=M==="y"?nt:st,te=M==="y"?"height":"width",Z=y[M],ce=Z+D[oe],Ce=Z-D[he],He=E?-T[te]/2:0,De=V===On?S[te]:T[te],Ae=V===On?-T[te]:-S[te],et=t.elements.arrow,Be=E&&et?go(et):{width:0,height:0},Pe=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:Cc(),we=Pe[oe],R=Pe[he],q=Ss(0,S[te],Be[te]),z=k?S[te]/2-He-q-we-w.mainAxis:De-q-we-w.mainAxis,J=k?-S[te]/2+He+q+R+w.mainAxis:Ae+q+R+w.mainAxis,$=t.elements.arrow&&Us(t.elements.arrow),ge=$?M==="y"?$.clientTop||0:$.clientLeft||0:0,g=(Q=j?.[M])!=null?Q:0,_=Z+z-g-ge,O=Z+J-g,H=Ss(E?Dr(ce,_):ce,Z,E?Tn(Ce,O):Ce);y[M]=H,B[M]=H-Z}if(l){var L,F=M==="x"?qe:ze,G=M==="x"?nt:st,N=y[b],W=b==="y"?"height":"width",K=N+D[F],se=N-D[G],X=[qe,ze].indexOf(P)!==-1,ee=(L=j?.[b])!=null?L:0,re=X?K:N-S[W]-T[W]-ee+w.altAxis,ae=X?N+S[W]+T[W]-ee-w.altAxis:se,de=E&&X?Cg(re,N,ae):Ss(E?re:K,N,E?ae:se);y[b]=de,B[b]=de-N}t.modifiersData[s]=B}}const Ic={name:"preventOverflow",enabled:!0,phase:"main",fn:qg,requiresIfExists:["offset"]};function zg(e){return{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}}function Xg(e){return e===rt(e)||!ct(e)?Eo(e):zg(e)}function Qg(e){var t=e.getBoundingClientRect(),n=ts(t.width)/e.offsetWidth||1,s=ts(t.height)/e.offsetHeight||1;return n!==1||s!==1}function Jg(e,t,n){n===void 0&&(n=!1);var s=ct(t),r=ct(t)&&Qg(t),o=on(t),a=ns(e,r,n),l={scrollLeft:0,scrollTop:0},c={x:0,y:0};return(s||!s&&!n)&&((Nt(t)!=="body"||bo(o))&&(l=Xg(t)),ct(t)?(c=ns(t,!0),c.x+=t.clientLeft,c.y+=t.clientTop):o&&(c.x=yo(o))),{x:a.left+l.scrollLeft-c.x,y:a.top+l.scrollTop-c.y,width:a.width,height:a.height}}function Zg(e){var t=new Map,n=new Set,s=[];e.forEach(function(o){t.set(o.name,o)});function r(o){n.add(o.name);var a=[].concat(o.requires||[],o.requiresIfExists||[]);a.forEach(function(l){if(!n.has(l)){var c=t.get(l);c&&r(c)}}),s.push(o)}return e.forEach(function(o){n.has(o.name)||r(o)}),s}function em(e){var t=Zg(e);return Ac.reduce(function(n,s){return n.concat(t.filter(function(r){return r.phase===s}))},[])}function tm(e){var t;return function(){return t||(t=new Promise(function(n){Promise.resolve().then(function(){t=void 0,n(e())})})),t}}function nm(e){var t=e.reduce(function(n,s){var r=n[s.name];return n[s.name]=r?Object.assign({},r,s,{options:Object.assign({},r.options,s.options),data:Object.assign({},r.data,s.data)}):s,n},{});return Object.keys(t).map(function(n){return t[n]})}var Ga={placement:"bottom",modifiers:[],strategy:"absolute"};function qa(){for(var e=arguments.length,t=new Array(e),n=0;nm[u]})}}return i.default=m,Object.freeze(i)}const r=s(n),o=new Map,a={set(m,i,u){o.has(m)||o.set(m,new Map);const v=o.get(m);if(!v.has(i)&&v.size!==0){console.error(`Bootstrap doesn't allow more than one instance per element. Bound instance: ${Array.from(v.keys())[0]}.`);return}v.set(i,u)},get(m,i){return o.has(m)&&o.get(m).get(i)||null},remove(m,i){if(!o.has(m))return;const u=o.get(m);u.delete(i),u.size===0&&o.delete(m)}},l=1e6,c=1e3,d="transitionend",f=m=>(m&&window.CSS&&window.CSS.escape&&(m=m.replace(/#([^\s"#']+)/g,(i,u)=>`#${CSS.escape(u)}`)),m),h=m=>m==null?`${m}`:Object.prototype.toString.call(m).match(/\s([a-z]+)/i)[1].toLowerCase(),p=m=>{do m+=Math.floor(Math.random()*l);while(document.getElementById(m));return m},E=m=>{if(!m)return 0;let{transitionDuration:i,transitionDelay:u}=window.getComputedStyle(m);const v=Number.parseFloat(i),I=Number.parseFloat(u);return!v&&!I?0:(i=i.split(",")[0],u=u.split(",")[0],(Number.parseFloat(i)+Number.parseFloat(u))*c)},x=m=>{m.dispatchEvent(new Event(d))},C=m=>!m||typeof m!="object"?!1:(typeof m.jquery<"u"&&(m=m[0]),typeof m.nodeType<"u"),D=m=>C(m)?m.jquery?m[0]:m:typeof m=="string"&&m.length>0?document.querySelector(f(m)):null,P=m=>{if(!C(m)||m.getClientRects().length===0)return!1;const i=getComputedStyle(m).getPropertyValue("visibility")==="visible",u=m.closest("details:not([open])");if(!u)return i;if(u!==m){const v=m.closest("summary");if(v&&v.parentNode!==u||v===null)return!1}return i},V=m=>!m||m.nodeType!==Node.ELEMENT_NODE||m.classList.contains("disabled")?!0:typeof m.disabled<"u"?m.disabled:m.hasAttribute("disabled")&&m.getAttribute("disabled")!=="false",k=m=>{if(!document.documentElement.attachShadow)return null;if(typeof m.getRootNode=="function"){const i=m.getRootNode();return i instanceof ShadowRoot?i:null}return m instanceof ShadowRoot?m:m.parentNode?k(m.parentNode):null},M=()=>{},b=m=>{m.offsetHeight},y=()=>window.jQuery&&!document.body.hasAttribute("data-bs-no-jquery")?window.jQuery:null,S=[],T=m=>{document.readyState==="loading"?(S.length||document.addEventListener("DOMContentLoaded",()=>{for(const i of S)i()}),S.push(m)):m()},A=()=>document.documentElement.dir==="rtl",w=m=>{T(()=>{const i=y();if(i){const u=m.NAME,v=i.fn[u];i.fn[u]=m.jQueryInterface,i.fn[u].Constructor=m,i.fn[u].noConflict=()=>(i.fn[u]=v,m.jQueryInterface)}})},j=(m,i=[],u=m)=>typeof m=="function"?m(...i):u,B=(m,i,u=!0)=>{if(!u){j(m);return}const I=E(i)+5;let Y=!1;const U=({target:le})=>{le===i&&(Y=!0,i.removeEventListener(d,U),j(m))};i.addEventListener(d,U),setTimeout(()=>{Y||x(i)},I)},Q=(m,i,u,v)=>{const I=m.length;let Y=m.indexOf(i);return Y===-1?!u&&v?m[I-1]:m[0]:(Y+=u?1:-1,v&&(Y=(Y+I)%I),m[Math.max(0,Math.min(Y,I-1))])},oe=/[^.]*(?=\..*)\.|.*/,he=/\..*/,te=/::\d+$/,Z={};let ce=1;const Ce={mouseenter:"mouseover",mouseleave:"mouseout"},He=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 De(m,i){return i&&`${i}::${ce++}`||m.uidEvent||ce++}function Ae(m){const i=De(m);return m.uidEvent=i,Z[i]=Z[i]||{},Z[i]}function et(m,i){return function u(v){return ge(v,{delegateTarget:m}),u.oneOff&&$.off(m,v.type,i),i.apply(m,[v])}}function Be(m,i,u){return function v(I){const Y=m.querySelectorAll(i);for(let{target:U}=I;U&&U!==this;U=U.parentNode)for(const le of Y)if(le===U)return ge(I,{delegateTarget:U}),v.oneOff&&$.off(m,I.type,i,u),u.apply(U,[I])}}function Pe(m,i,u=null){return Object.values(m).find(v=>v.callable===i&&v.delegationSelector===u)}function we(m,i,u){const v=typeof i=="string",I=v?u:i||u;let Y=J(m);return He.has(Y)||(Y=m),[v,I,Y]}function R(m,i,u,v,I){if(typeof i!="string"||!m)return;let[Y,U,le]=we(i,u,v);i in Ce&&(U=(_g=>function(Hn){if(!Hn.relatedTarget||Hn.relatedTarget!==Hn.delegateTarget&&!Hn.delegateTarget.contains(Hn.relatedTarget))return _g.call(this,Hn)})(U));const Xe=Ae(m),ot=Xe[le]||(Xe[le]={}),$e=Pe(ot,U,Y?u:null);if($e){$e.oneOff=$e.oneOff&&I;return}const At=De(U,i.replace(oe,"")),gt=Y?Be(m,u,U):et(m,U);gt.delegationSelector=Y?u:null,gt.callable=U,gt.oneOff=I,gt.uidEvent=At,ot[At]=gt,m.addEventListener(le,gt,Y)}function q(m,i,u,v,I){const Y=Pe(i[u],v,I);Y&&(m.removeEventListener(u,Y,!!I),delete i[u][Y.uidEvent])}function z(m,i,u,v){const I=i[u]||{};for(const[Y,U]of Object.entries(I))Y.includes(v)&&q(m,i,u,U.callable,U.delegationSelector)}function J(m){return m=m.replace(he,""),Ce[m]||m}const $={on(m,i,u,v){R(m,i,u,v,!1)},one(m,i,u,v){R(m,i,u,v,!0)},off(m,i,u,v){if(typeof i!="string"||!m)return;const[I,Y,U]=we(i,u,v),le=U!==i,Xe=Ae(m),ot=Xe[U]||{},$e=i.startsWith(".");if(typeof Y<"u"){if(!Object.keys(ot).length)return;q(m,Xe,U,Y,I?u:null);return}if($e)for(const At of Object.keys(Xe))z(m,Xe,At,i.slice(1));for(const[At,gt]of Object.entries(ot)){const fr=At.replace(te,"");(!le||i.includes(fr))&&q(m,Xe,U,gt.callable,gt.delegationSelector)}},trigger(m,i,u){if(typeof i!="string"||!m)return null;const v=y(),I=J(i),Y=i!==I;let U=null,le=!0,Xe=!0,ot=!1;Y&&v&&(U=v.Event(i,u),v(m).trigger(U),le=!U.isPropagationStopped(),Xe=!U.isImmediatePropagationStopped(),ot=U.isDefaultPrevented());const $e=ge(new Event(i,{bubbles:le,cancelable:!0}),u);return ot&&$e.preventDefault(),Xe&&m.dispatchEvent($e),$e.defaultPrevented&&U&&U.preventDefault(),$e}};function ge(m,i={}){for(const[u,v]of Object.entries(i))try{m[u]=v}catch{Object.defineProperty(m,u,{configurable:!0,get(){return v}})}return m}function g(m){if(m==="true")return!0;if(m==="false")return!1;if(m===Number(m).toString())return Number(m);if(m===""||m==="null")return null;if(typeof m!="string")return m;try{return JSON.parse(decodeURIComponent(m))}catch{return m}}function _(m){return m.replace(/[A-Z]/g,i=>`-${i.toLowerCase()}`)}const O={setDataAttribute(m,i,u){m.setAttribute(`data-bs-${_(i)}`,u)},removeDataAttribute(m,i){m.removeAttribute(`data-bs-${_(i)}`)},getDataAttributes(m){if(!m)return{};const i={},u=Object.keys(m.dataset).filter(v=>v.startsWith("bs")&&!v.startsWith("bsConfig"));for(const v of u){let I=v.replace(/^bs/,"");I=I.charAt(0).toLowerCase()+I.slice(1,I.length),i[I]=g(m.dataset[v])}return i},getDataAttribute(m,i){return g(m.getAttribute(`data-bs-${_(i)}`))}};class H{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(i){return i=this._mergeConfigObj(i),i=this._configAfterMerge(i),this._typeCheckConfig(i),i}_configAfterMerge(i){return i}_mergeConfigObj(i,u){const v=C(u)?O.getDataAttribute(u,"config"):{};return{...this.constructor.Default,...typeof v=="object"?v:{},...C(u)?O.getDataAttributes(u):{},...typeof i=="object"?i:{}}}_typeCheckConfig(i,u=this.constructor.DefaultType){for(const[v,I]of Object.entries(u)){const Y=i[v],U=C(Y)?"element":h(Y);if(!new RegExp(I).test(U))throw new TypeError(`${this.constructor.NAME.toUpperCase()}: Option "${v}" provided type "${U}" but expected type "${I}".`)}}}const L="5.3.3";class F extends H{constructor(i,u){super(),i=D(i),i&&(this._element=i,this._config=this._getConfig(u),a.set(this._element,this.constructor.DATA_KEY,this))}dispose(){a.remove(this._element,this.constructor.DATA_KEY),$.off(this._element,this.constructor.EVENT_KEY);for(const i of Object.getOwnPropertyNames(this))this[i]=null}_queueCallback(i,u,v=!0){B(i,u,v)}_getConfig(i){return i=this._mergeConfigObj(i,this._element),i=this._configAfterMerge(i),this._typeCheckConfig(i),i}static getInstance(i){return a.get(D(i),this.DATA_KEY)}static getOrCreateInstance(i,u={}){return this.getInstance(i)||new this(i,typeof u=="object"?u:null)}static get VERSION(){return L}static get DATA_KEY(){return`bs.${this.NAME}`}static get EVENT_KEY(){return`.${this.DATA_KEY}`}static eventName(i){return`${i}${this.EVENT_KEY}`}}const G=m=>{let i=m.getAttribute("data-bs-target");if(!i||i==="#"){let u=m.getAttribute("href");if(!u||!u.includes("#")&&!u.startsWith("."))return null;u.includes("#")&&!u.startsWith("#")&&(u=`#${u.split("#")[1]}`),i=u&&u!=="#"?u.trim():null}return i?i.split(",").map(u=>f(u)).join(","):null},N={find(m,i=document.documentElement){return[].concat(...Element.prototype.querySelectorAll.call(i,m))},findOne(m,i=document.documentElement){return Element.prototype.querySelector.call(i,m)},children(m,i){return[].concat(...m.children).filter(u=>u.matches(i))},parents(m,i){const u=[];let v=m.parentNode.closest(i);for(;v;)u.push(v),v=v.parentNode.closest(i);return u},prev(m,i){let u=m.previousElementSibling;for(;u;){if(u.matches(i))return[u];u=u.previousElementSibling}return[]},next(m,i){let u=m.nextElementSibling;for(;u;){if(u.matches(i))return[u];u=u.nextElementSibling}return[]},focusableChildren(m){const i=["a","button","input","textarea","select","details","[tabindex]",'[contenteditable="true"]'].map(u=>`${u}:not([tabindex^="-"])`).join(",");return this.find(i,m).filter(u=>!V(u)&&P(u))},getSelectorFromElement(m){const i=G(m);return i&&N.findOne(i)?i:null},getElementFromSelector(m){const i=G(m);return i?N.findOne(i):null},getMultipleElementsFromSelector(m){const i=G(m);return i?N.find(i):[]}},W=(m,i="hide")=>{const u=`click.dismiss${m.EVENT_KEY}`,v=m.NAME;$.on(document,u,`[data-bs-dismiss="${v}"]`,function(I){if(["A","AREA"].includes(this.tagName)&&I.preventDefault(),V(this))return;const Y=N.getElementFromSelector(this)||this.closest(`.${v}`);m.getOrCreateInstance(Y)[i]()})},K="alert",X=".bs.alert",ee=`close${X}`,re=`closed${X}`,ae="fade",de="show";class ue extends F{static get NAME(){return K}close(){if($.trigger(this._element,ee).defaultPrevented)return;this._element.classList.remove(de);const u=this._element.classList.contains(ae);this._queueCallback(()=>this._destroyElement(),this._element,u)}_destroyElement(){this._element.remove(),$.trigger(this._element,re),this.dispose()}static jQueryInterface(i){return this.each(function(){const u=ue.getOrCreateInstance(this);if(typeof i=="string"){if(u[i]===void 0||i.startsWith("_")||i==="constructor")throw new TypeError(`No method named "${i}"`);u[i](this)}})}}W(ue,"close"),w(ue);const je="button",tt=".bs.button",Ke=".data-api",fn="active",gs='[data-bs-toggle="button"]',We=`click${tt}${Ke}`;class Me extends F{static get NAME(){return je}toggle(){this._element.setAttribute("aria-pressed",this._element.classList.toggle(fn))}static jQueryInterface(i){return this.each(function(){const u=Me.getOrCreateInstance(this);i==="toggle"&&u[i]()})}}$.on(document,We,gs,m=>{m.preventDefault();const i=m.target.closest(gs);Me.getOrCreateInstance(i).toggle()}),w(Me);const Zs="swipe",Ln=".bs.swipe",jf=`touchstart${Ln}`,Kf=`touchmove${Ln}`,Wf=`touchend${Ln}`,Uf=`pointerdown${Ln}`,Yf=`pointerup${Ln}`,Gf="touch",qf="pen",zf="pointer-event",Xf=40,Qf={endCallback:null,leftCallback:null,rightCallback:null},Jf={endCallback:"(function|null)",leftCallback:"(function|null)",rightCallback:"(function|null)"};class er extends H{constructor(i,u){super(),this._element=i,!(!i||!er.isSupported())&&(this._config=this._getConfig(u),this._deltaX=0,this._supportPointerEvents=!!window.PointerEvent,this._initEvents())}static get Default(){return Qf}static get DefaultType(){return Jf}static get NAME(){return Zs}dispose(){$.off(this._element,Ln)}_start(i){if(!this._supportPointerEvents){this._deltaX=i.touches[0].clientX;return}this._eventIsPointerPenTouch(i)&&(this._deltaX=i.clientX)}_end(i){this._eventIsPointerPenTouch(i)&&(this._deltaX=i.clientX-this._deltaX),this._handleSwipe(),j(this._config.endCallback)}_move(i){this._deltaX=i.touches&&i.touches.length>1?0:i.touches[0].clientX-this._deltaX}_handleSwipe(){const i=Math.abs(this._deltaX);if(i<=Xf)return;const u=i/this._deltaX;this._deltaX=0,u&&j(u>0?this._config.rightCallback:this._config.leftCallback)}_initEvents(){this._supportPointerEvents?($.on(this._element,Uf,i=>this._start(i)),$.on(this._element,Yf,i=>this._end(i)),this._element.classList.add(zf)):($.on(this._element,jf,i=>this._start(i)),$.on(this._element,Kf,i=>this._move(i)),$.on(this._element,Wf,i=>this._end(i)))}_eventIsPointerPenTouch(i){return this._supportPointerEvents&&(i.pointerType===qf||i.pointerType===Gf)}static isSupported(){return"ontouchstart"in document.documentElement||navigator.maxTouchPoints>0}}const Zf="carousel",Kt=".bs.carousel",ea=".data-api",ed="ArrowLeft",td="ArrowRight",nd=500,ms="next",Rn="prev",In="left",tr="right",sd=`slide${Kt}`,ui=`slid${Kt}`,rd=`keydown${Kt}`,id=`mouseenter${Kt}`,od=`mouseleave${Kt}`,ad=`dragstart${Kt}`,ld=`load${Kt}${ea}`,cd=`click${Kt}${ea}`,ta="carousel",nr="active",ud="slide",fd="carousel-item-end",dd="carousel-item-start",hd="carousel-item-next",pd="carousel-item-prev",na=".active",sa=".carousel-item",gd=na+sa,md=".carousel-item img",_d=".carousel-indicators",vd="[data-bs-slide], [data-bs-slide-to]",Ed='[data-bs-ride="carousel"]',yd={[ed]:tr,[td]:In},bd={interval:5e3,keyboard:!0,pause:"hover",ride:!1,touch:!0,wrap:!0},Ad={interval:"(number|boolean)",keyboard:"boolean",pause:"(string|boolean)",ride:"(boolean|string)",touch:"boolean",wrap:"boolean"};class Pn extends F{constructor(i,u){super(i,u),this._interval=null,this._activeElement=null,this._isSliding=!1,this.touchTimeout=null,this._swipeHelper=null,this._indicatorsElement=N.findOne(_d,this._element),this._addEventListeners(),this._config.ride===ta&&this.cycle()}static get Default(){return bd}static get DefaultType(){return Ad}static get NAME(){return Zf}next(){this._slide(ms)}nextWhenVisible(){!document.hidden&&P(this._element)&&this.next()}prev(){this._slide(Rn)}pause(){this._isSliding&&x(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){$.one(this._element,ui,()=>this.cycle());return}this.cycle()}}to(i){const u=this._getItems();if(i>u.length-1||i<0)return;if(this._isSliding){$.one(this._element,ui,()=>this.to(i));return}const v=this._getItemIndex(this._getActive());if(v===i)return;const I=i>v?ms:Rn;this._slide(I,u[i])}dispose(){this._swipeHelper&&this._swipeHelper.dispose(),super.dispose()}_configAfterMerge(i){return i.defaultInterval=i.interval,i}_addEventListeners(){this._config.keyboard&&$.on(this._element,rd,i=>this._keydown(i)),this._config.pause==="hover"&&($.on(this._element,id,()=>this.pause()),$.on(this._element,od,()=>this._maybeEnableCycle())),this._config.touch&&er.isSupported()&&this._addTouchEventListeners()}_addTouchEventListeners(){for(const v of N.find(md,this._element))$.on(v,ad,I=>I.preventDefault());const u={leftCallback:()=>this._slide(this._directionToOrder(In)),rightCallback:()=>this._slide(this._directionToOrder(tr)),endCallback:()=>{this._config.pause==="hover"&&(this.pause(),this.touchTimeout&&clearTimeout(this.touchTimeout),this.touchTimeout=setTimeout(()=>this._maybeEnableCycle(),nd+this._config.interval))}};this._swipeHelper=new er(this._element,u)}_keydown(i){if(/input|textarea/i.test(i.target.tagName))return;const u=yd[i.key];u&&(i.preventDefault(),this._slide(this._directionToOrder(u)))}_getItemIndex(i){return this._getItems().indexOf(i)}_setActiveIndicatorElement(i){if(!this._indicatorsElement)return;const u=N.findOne(na,this._indicatorsElement);u.classList.remove(nr),u.removeAttribute("aria-current");const v=N.findOne(`[data-bs-slide-to="${i}"]`,this._indicatorsElement);v&&(v.classList.add(nr),v.setAttribute("aria-current","true"))}_updateInterval(){const i=this._activeElement||this._getActive();if(!i)return;const u=Number.parseInt(i.getAttribute("data-bs-interval"),10);this._config.interval=u||this._config.defaultInterval}_slide(i,u=null){if(this._isSliding)return;const v=this._getActive(),I=i===ms,Y=u||Q(this._getItems(),v,I,this._config.wrap);if(Y===v)return;const U=this._getItemIndex(Y),le=fr=>$.trigger(this._element,fr,{relatedTarget:Y,direction:this._orderToDirection(i),from:this._getItemIndex(v),to:U});if(le(sd).defaultPrevented||!v||!Y)return;const ot=!!this._interval;this.pause(),this._isSliding=!0,this._setActiveIndicatorElement(U),this._activeElement=Y;const $e=I?dd:fd,At=I?hd:pd;Y.classList.add(At),b(Y),v.classList.add($e),Y.classList.add($e);const gt=()=>{Y.classList.remove($e,At),Y.classList.add(nr),v.classList.remove(nr,At,$e),this._isSliding=!1,le(ui)};this._queueCallback(gt,v,this._isAnimated()),ot&&this.cycle()}_isAnimated(){return this._element.classList.contains(ud)}_getActive(){return N.findOne(gd,this._element)}_getItems(){return N.find(sa,this._element)}_clearInterval(){this._interval&&(clearInterval(this._interval),this._interval=null)}_directionToOrder(i){return A()?i===In?Rn:ms:i===In?ms:Rn}_orderToDirection(i){return A()?i===Rn?In:tr:i===Rn?tr:In}static jQueryInterface(i){return this.each(function(){const u=Pn.getOrCreateInstance(this,i);if(typeof i=="number"){u.to(i);return}if(typeof i=="string"){if(u[i]===void 0||i.startsWith("_")||i==="constructor")throw new TypeError(`No method named "${i}"`);u[i]()}})}}$.on(document,cd,vd,function(m){const i=N.getElementFromSelector(this);if(!i||!i.classList.contains(ta))return;m.preventDefault();const u=Pn.getOrCreateInstance(i),v=this.getAttribute("data-bs-slide-to");if(v){u.to(v),u._maybeEnableCycle();return}if(O.getDataAttribute(this,"slide")==="next"){u.next(),u._maybeEnableCycle();return}u.prev(),u._maybeEnableCycle()}),$.on(window,ld,()=>{const m=N.find(Ed);for(const i of m)Pn.getOrCreateInstance(i)}),w(Pn);const Td="collapse",_s=".bs.collapse",wd=".data-api",Cd=`show${_s}`,Sd=`shown${_s}`,Od=`hide${_s}`,xd=`hidden${_s}`,Nd=`click${_s}${wd}`,fi="show",Mn="collapse",sr="collapsing",$d="collapsed",Dd=`:scope .${Mn} .${Mn}`,Ld="collapse-horizontal",Rd="width",Id="height",Pd=".collapse.show, .collapse.collapsing",di='[data-bs-toggle="collapse"]',Md={parent:null,toggle:!0},kd={parent:"(null|element)",toggle:"boolean"};class kn extends F{constructor(i,u){super(i,u),this._isTransitioning=!1,this._triggerArray=[];const v=N.find(di);for(const I of v){const Y=N.getSelectorFromElement(I),U=N.find(Y).filter(le=>le===this._element);Y!==null&&U.length&&this._triggerArray.push(I)}this._initializeChildren(),this._config.parent||this._addAriaAndCollapsedClass(this._triggerArray,this._isShown()),this._config.toggle&&this.toggle()}static get Default(){return Md}static get DefaultType(){return kd}static get NAME(){return Td}toggle(){this._isShown()?this.hide():this.show()}show(){if(this._isTransitioning||this._isShown())return;let i=[];if(this._config.parent&&(i=this._getFirstLevelChildren(Pd).filter(le=>le!==this._element).map(le=>kn.getOrCreateInstance(le,{toggle:!1}))),i.length&&i[0]._isTransitioning||$.trigger(this._element,Cd).defaultPrevented)return;for(const le of i)le.hide();const v=this._getDimension();this._element.classList.remove(Mn),this._element.classList.add(sr),this._element.style[v]=0,this._addAriaAndCollapsedClass(this._triggerArray,!0),this._isTransitioning=!0;const I=()=>{this._isTransitioning=!1,this._element.classList.remove(sr),this._element.classList.add(Mn,fi),this._element.style[v]="",$.trigger(this._element,Sd)},U=`scroll${v[0].toUpperCase()+v.slice(1)}`;this._queueCallback(I,this._element,!0),this._element.style[v]=`${this._element[U]}px`}hide(){if(this._isTransitioning||!this._isShown()||$.trigger(this._element,Od).defaultPrevented)return;const u=this._getDimension();this._element.style[u]=`${this._element.getBoundingClientRect()[u]}px`,b(this._element),this._element.classList.add(sr),this._element.classList.remove(Mn,fi);for(const I of this._triggerArray){const Y=N.getElementFromSelector(I);Y&&!this._isShown(Y)&&this._addAriaAndCollapsedClass([I],!1)}this._isTransitioning=!0;const v=()=>{this._isTransitioning=!1,this._element.classList.remove(sr),this._element.classList.add(Mn),$.trigger(this._element,xd)};this._element.style[u]="",this._queueCallback(v,this._element,!0)}_isShown(i=this._element){return i.classList.contains(fi)}_configAfterMerge(i){return i.toggle=!!i.toggle,i.parent=D(i.parent),i}_getDimension(){return this._element.classList.contains(Ld)?Rd:Id}_initializeChildren(){if(!this._config.parent)return;const i=this._getFirstLevelChildren(di);for(const u of i){const v=N.getElementFromSelector(u);v&&this._addAriaAndCollapsedClass([u],this._isShown(v))}}_getFirstLevelChildren(i){const u=N.find(Dd,this._config.parent);return N.find(i,this._config.parent).filter(v=>!u.includes(v))}_addAriaAndCollapsedClass(i,u){if(i.length)for(const v of i)v.classList.toggle($d,!u),v.setAttribute("aria-expanded",u)}static jQueryInterface(i){const u={};return typeof i=="string"&&/show|hide/.test(i)&&(u.toggle=!1),this.each(function(){const v=kn.getOrCreateInstance(this,u);if(typeof i=="string"){if(typeof v[i]>"u")throw new TypeError(`No method named "${i}"`);v[i]()}})}}$.on(document,Nd,di,function(m){(m.target.tagName==="A"||m.delegateTarget&&m.delegateTarget.tagName==="A")&&m.preventDefault();for(const i of N.getMultipleElementsFromSelector(this))kn.getOrCreateInstance(i,{toggle:!1}).toggle()}),w(kn);const ra="dropdown",dn=".bs.dropdown",hi=".data-api",Vd="Escape",ia="Tab",Fd="ArrowUp",oa="ArrowDown",Hd=2,Bd=`hide${dn}`,jd=`hidden${dn}`,Kd=`show${dn}`,Wd=`shown${dn}`,aa=`click${dn}${hi}`,la=`keydown${dn}${hi}`,Ud=`keyup${dn}${hi}`,Vn="show",Yd="dropup",Gd="dropend",qd="dropstart",zd="dropup-center",Xd="dropdown-center",hn='[data-bs-toggle="dropdown"]:not(.disabled):not(:disabled)',Qd=`${hn}.${Vn}`,rr=".dropdown-menu",Jd=".navbar",Zd=".navbar-nav",eh=".dropdown-menu .dropdown-item:not(.disabled):not(:disabled)",th=A()?"top-end":"top-start",nh=A()?"top-start":"top-end",sh=A()?"bottom-end":"bottom-start",rh=A()?"bottom-start":"bottom-end",ih=A()?"left-start":"right-start",oh=A()?"right-start":"left-start",ah="top",lh="bottom",ch={autoClose:!0,boundary:"clippingParents",display:"dynamic",offset:[0,2],popperConfig:null,reference:"toggle"},uh={autoClose:"(boolean|string)",boundary:"(string|element)",display:"string",offset:"(array|string|function)",popperConfig:"(null|object|function)",reference:"(string|element|object)"};class pt extends F{constructor(i,u){super(i,u),this._popper=null,this._parent=this._element.parentNode,this._menu=N.next(this._element,rr)[0]||N.prev(this._element,rr)[0]||N.findOne(rr,this._parent),this._inNavbar=this._detectNavbar()}static get Default(){return ch}static get DefaultType(){return uh}static get NAME(){return ra}toggle(){return this._isShown()?this.hide():this.show()}show(){if(V(this._element)||this._isShown())return;const i={relatedTarget:this._element};if(!$.trigger(this._element,Kd,i).defaultPrevented){if(this._createPopper(),"ontouchstart"in document.documentElement&&!this._parent.closest(Zd))for(const v of[].concat(...document.body.children))$.on(v,"mouseover",M);this._element.focus(),this._element.setAttribute("aria-expanded",!0),this._menu.classList.add(Vn),this._element.classList.add(Vn),$.trigger(this._element,Wd,i)}}hide(){if(V(this._element)||!this._isShown())return;const i={relatedTarget:this._element};this._completeHide(i)}dispose(){this._popper&&this._popper.destroy(),super.dispose()}update(){this._inNavbar=this._detectNavbar(),this._popper&&this._popper.update()}_completeHide(i){if(!$.trigger(this._element,Bd,i).defaultPrevented){if("ontouchstart"in document.documentElement)for(const v of[].concat(...document.body.children))$.off(v,"mouseover",M);this._popper&&this._popper.destroy(),this._menu.classList.remove(Vn),this._element.classList.remove(Vn),this._element.setAttribute("aria-expanded","false"),O.removeDataAttribute(this._menu,"popper"),$.trigger(this._element,jd,i)}}_getConfig(i){if(i=super._getConfig(i),typeof i.reference=="object"&&!C(i.reference)&&typeof i.reference.getBoundingClientRect!="function")throw new TypeError(`${ra.toUpperCase()}: Option "reference" provided type "object" without a required "getBoundingClientRect" method.`);return i}_createPopper(){if(typeof r>"u")throw new TypeError("Bootstrap's dropdowns require Popper (https://popper.js.org)");let i=this._element;this._config.reference==="parent"?i=this._parent:C(this._config.reference)?i=D(this._config.reference):typeof this._config.reference=="object"&&(i=this._config.reference);const u=this._getPopperConfig();this._popper=r.createPopper(i,this._menu,u)}_isShown(){return this._menu.classList.contains(Vn)}_getPlacement(){const i=this._parent;if(i.classList.contains(Gd))return ih;if(i.classList.contains(qd))return oh;if(i.classList.contains(zd))return ah;if(i.classList.contains(Xd))return lh;const u=getComputedStyle(this._menu).getPropertyValue("--bs-position").trim()==="end";return i.classList.contains(Yd)?u?nh:th:u?rh:sh}_detectNavbar(){return this._element.closest(Jd)!==null}_getOffset(){const{offset:i}=this._config;return typeof i=="string"?i.split(",").map(u=>Number.parseInt(u,10)):typeof i=="function"?u=>i(u,this._element):i}_getPopperConfig(){const i={placement:this._getPlacement(),modifiers:[{name:"preventOverflow",options:{boundary:this._config.boundary}},{name:"offset",options:{offset:this._getOffset()}}]};return(this._inNavbar||this._config.display==="static")&&(O.setDataAttribute(this._menu,"popper","static"),i.modifiers=[{name:"applyStyles",enabled:!1}]),{...i,...j(this._config.popperConfig,[i])}}_selectMenuItem({key:i,target:u}){const v=N.find(eh,this._menu).filter(I=>P(I));v.length&&Q(v,u,i===oa,!v.includes(u)).focus()}static jQueryInterface(i){return this.each(function(){const u=pt.getOrCreateInstance(this,i);if(typeof i=="string"){if(typeof u[i]>"u")throw new TypeError(`No method named "${i}"`);u[i]()}})}static clearMenus(i){if(i.button===Hd||i.type==="keyup"&&i.key!==ia)return;const u=N.find(Qd);for(const v of u){const I=pt.getInstance(v);if(!I||I._config.autoClose===!1)continue;const Y=i.composedPath(),U=Y.includes(I._menu);if(Y.includes(I._element)||I._config.autoClose==="inside"&&!U||I._config.autoClose==="outside"&&U||I._menu.contains(i.target)&&(i.type==="keyup"&&i.key===ia||/input|select|option|textarea|form/i.test(i.target.tagName)))continue;const le={relatedTarget:I._element};i.type==="click"&&(le.clickEvent=i),I._completeHide(le)}}static dataApiKeydownHandler(i){const u=/input|textarea/i.test(i.target.tagName),v=i.key===Vd,I=[Fd,oa].includes(i.key);if(!I&&!v||u&&!v)return;i.preventDefault();const Y=this.matches(hn)?this:N.prev(this,hn)[0]||N.next(this,hn)[0]||N.findOne(hn,i.delegateTarget.parentNode),U=pt.getOrCreateInstance(Y);if(I){i.stopPropagation(),U.show(),U._selectMenuItem(i);return}U._isShown()&&(i.stopPropagation(),U.hide(),Y.focus())}}$.on(document,la,hn,pt.dataApiKeydownHandler),$.on(document,la,rr,pt.dataApiKeydownHandler),$.on(document,aa,pt.clearMenus),$.on(document,Ud,pt.clearMenus),$.on(document,aa,hn,function(m){m.preventDefault(),pt.getOrCreateInstance(this).toggle()}),w(pt);const ca="backdrop",fh="fade",ua="show",fa=`mousedown.bs.${ca}`,dh={className:"modal-backdrop",clickCallback:null,isAnimated:!1,isVisible:!0,rootElement:"body"},hh={className:"string",clickCallback:"(function|null)",isAnimated:"boolean",isVisible:"boolean",rootElement:"(element|string)"};class da extends H{constructor(i){super(),this._config=this._getConfig(i),this._isAppended=!1,this._element=null}static get Default(){return dh}static get DefaultType(){return hh}static get NAME(){return ca}show(i){if(!this._config.isVisible){j(i);return}this._append();const u=this._getElement();this._config.isAnimated&&b(u),u.classList.add(ua),this._emulateAnimation(()=>{j(i)})}hide(i){if(!this._config.isVisible){j(i);return}this._getElement().classList.remove(ua),this._emulateAnimation(()=>{this.dispose(),j(i)})}dispose(){this._isAppended&&($.off(this._element,fa),this._element.remove(),this._isAppended=!1)}_getElement(){if(!this._element){const i=document.createElement("div");i.className=this._config.className,this._config.isAnimated&&i.classList.add(fh),this._element=i}return this._element}_configAfterMerge(i){return i.rootElement=D(i.rootElement),i}_append(){if(this._isAppended)return;const i=this._getElement();this._config.rootElement.append(i),$.on(i,fa,()=>{j(this._config.clickCallback)}),this._isAppended=!0}_emulateAnimation(i){B(i,this._getElement(),this._config.isAnimated)}}const ph="focustrap",ir=".bs.focustrap",gh=`focusin${ir}`,mh=`keydown.tab${ir}`,_h="Tab",vh="forward",ha="backward",Eh={autofocus:!0,trapElement:null},yh={autofocus:"boolean",trapElement:"element"};class pa extends H{constructor(i){super(),this._config=this._getConfig(i),this._isActive=!1,this._lastTabNavDirection=null}static get Default(){return Eh}static get DefaultType(){return yh}static get NAME(){return ph}activate(){this._isActive||(this._config.autofocus&&this._config.trapElement.focus(),$.off(document,ir),$.on(document,gh,i=>this._handleFocusin(i)),$.on(document,mh,i=>this._handleKeydown(i)),this._isActive=!0)}deactivate(){this._isActive&&(this._isActive=!1,$.off(document,ir))}_handleFocusin(i){const{trapElement:u}=this._config;if(i.target===document||i.target===u||u.contains(i.target))return;const v=N.focusableChildren(u);v.length===0?u.focus():this._lastTabNavDirection===ha?v[v.length-1].focus():v[0].focus()}_handleKeydown(i){i.key===_h&&(this._lastTabNavDirection=i.shiftKey?ha:vh)}}const ga=".fixed-top, .fixed-bottom, .is-fixed, .sticky-top",ma=".sticky-top",or="padding-right",_a="margin-right";class pi{constructor(){this._element=document.body}getWidth(){const i=document.documentElement.clientWidth;return Math.abs(window.innerWidth-i)}hide(){const i=this.getWidth();this._disableOverFlow(),this._setElementAttributes(this._element,or,u=>u+i),this._setElementAttributes(ga,or,u=>u+i),this._setElementAttributes(ma,_a,u=>u-i)}reset(){this._resetElementAttributes(this._element,"overflow"),this._resetElementAttributes(this._element,or),this._resetElementAttributes(ga,or),this._resetElementAttributes(ma,_a)}isOverflowing(){return this.getWidth()>0}_disableOverFlow(){this._saveInitialAttribute(this._element,"overflow"),this._element.style.overflow="hidden"}_setElementAttributes(i,u,v){const I=this.getWidth(),Y=U=>{if(U!==this._element&&window.innerWidth>U.clientWidth+I)return;this._saveInitialAttribute(U,u);const le=window.getComputedStyle(U).getPropertyValue(u);U.style.setProperty(u,`${v(Number.parseFloat(le))}px`)};this._applyManipulationCallback(i,Y)}_saveInitialAttribute(i,u){const v=i.style.getPropertyValue(u);v&&O.setDataAttribute(i,u,v)}_resetElementAttributes(i,u){const v=I=>{const Y=O.getDataAttribute(I,u);if(Y===null){I.style.removeProperty(u);return}O.removeDataAttribute(I,u),I.style.setProperty(u,Y)};this._applyManipulationCallback(i,v)}_applyManipulationCallback(i,u){if(C(i)){u(i);return}for(const v of N.find(i,this._element))u(v)}}const bh="modal",it=".bs.modal",Ah=".data-api",Th="Escape",wh=`hide${it}`,Ch=`hidePrevented${it}`,va=`hidden${it}`,Ea=`show${it}`,Sh=`shown${it}`,Oh=`resize${it}`,xh=`click.dismiss${it}`,Nh=`mousedown.dismiss${it}`,$h=`keydown.dismiss${it}`,Dh=`click${it}${Ah}`,ya="modal-open",Lh="fade",ba="show",gi="modal-static",Rh=".modal.show",Ih=".modal-dialog",Ph=".modal-body",Mh='[data-bs-toggle="modal"]',kh={backdrop:!0,focus:!0,keyboard:!0},Vh={backdrop:"(boolean|string)",focus:"boolean",keyboard:"boolean"};class pn extends F{constructor(i,u){super(i,u),this._dialog=N.findOne(Ih,this._element),this._backdrop=this._initializeBackDrop(),this._focustrap=this._initializeFocusTrap(),this._isShown=!1,this._isTransitioning=!1,this._scrollBar=new pi,this._addEventListeners()}static get Default(){return kh}static get DefaultType(){return Vh}static get NAME(){return bh}toggle(i){return this._isShown?this.hide():this.show(i)}show(i){this._isShown||this._isTransitioning||$.trigger(this._element,Ea,{relatedTarget:i}).defaultPrevented||(this._isShown=!0,this._isTransitioning=!0,this._scrollBar.hide(),document.body.classList.add(ya),this._adjustDialog(),this._backdrop.show(()=>this._showElement(i)))}hide(){!this._isShown||this._isTransitioning||$.trigger(this._element,wh).defaultPrevented||(this._isShown=!1,this._isTransitioning=!0,this._focustrap.deactivate(),this._element.classList.remove(ba),this._queueCallback(()=>this._hideModal(),this._element,this._isAnimated()))}dispose(){$.off(window,it),$.off(this._dialog,it),this._backdrop.dispose(),this._focustrap.deactivate(),super.dispose()}handleUpdate(){this._adjustDialog()}_initializeBackDrop(){return new da({isVisible:!!this._config.backdrop,isAnimated:this._isAnimated()})}_initializeFocusTrap(){return new pa({trapElement:this._element})}_showElement(i){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 u=N.findOne(Ph,this._dialog);u&&(u.scrollTop=0),b(this._element),this._element.classList.add(ba);const v=()=>{this._config.focus&&this._focustrap.activate(),this._isTransitioning=!1,$.trigger(this._element,Sh,{relatedTarget:i})};this._queueCallback(v,this._dialog,this._isAnimated())}_addEventListeners(){$.on(this._element,$h,i=>{if(i.key===Th){if(this._config.keyboard){this.hide();return}this._triggerBackdropTransition()}}),$.on(window,Oh,()=>{this._isShown&&!this._isTransitioning&&this._adjustDialog()}),$.on(this._element,Nh,i=>{$.one(this._element,xh,u=>{if(!(this._element!==i.target||this._element!==u.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(ya),this._resetAdjustments(),this._scrollBar.reset(),$.trigger(this._element,va)})}_isAnimated(){return this._element.classList.contains(Lh)}_triggerBackdropTransition(){if($.trigger(this._element,Ch).defaultPrevented)return;const u=this._element.scrollHeight>document.documentElement.clientHeight,v=this._element.style.overflowY;v==="hidden"||this._element.classList.contains(gi)||(u||(this._element.style.overflowY="hidden"),this._element.classList.add(gi),this._queueCallback(()=>{this._element.classList.remove(gi),this._queueCallback(()=>{this._element.style.overflowY=v},this._dialog)},this._dialog),this._element.focus())}_adjustDialog(){const i=this._element.scrollHeight>document.documentElement.clientHeight,u=this._scrollBar.getWidth(),v=u>0;if(v&&!i){const I=A()?"paddingLeft":"paddingRight";this._element.style[I]=`${u}px`}if(!v&&i){const I=A()?"paddingRight":"paddingLeft";this._element.style[I]=`${u}px`}}_resetAdjustments(){this._element.style.paddingLeft="",this._element.style.paddingRight=""}static jQueryInterface(i,u){return this.each(function(){const v=pn.getOrCreateInstance(this,i);if(typeof i=="string"){if(typeof v[i]>"u")throw new TypeError(`No method named "${i}"`);v[i](u)}})}}$.on(document,Dh,Mh,function(m){const i=N.getElementFromSelector(this);["A","AREA"].includes(this.tagName)&&m.preventDefault(),$.one(i,Ea,I=>{I.defaultPrevented||$.one(i,va,()=>{P(this)&&this.focus()})});const u=N.findOne(Rh);u&&pn.getInstance(u).hide(),pn.getOrCreateInstance(i).toggle(this)}),W(pn),w(pn);const Fh="offcanvas",Dt=".bs.offcanvas",Aa=".data-api",Hh=`load${Dt}${Aa}`,Bh="Escape",Ta="show",wa="showing",Ca="hiding",jh="offcanvas-backdrop",Sa=".offcanvas.show",Kh=`show${Dt}`,Wh=`shown${Dt}`,Uh=`hide${Dt}`,Oa=`hidePrevented${Dt}`,xa=`hidden${Dt}`,Yh=`resize${Dt}`,Gh=`click${Dt}${Aa}`,qh=`keydown.dismiss${Dt}`,zh='[data-bs-toggle="offcanvas"]',Xh={backdrop:!0,keyboard:!0,scroll:!1},Qh={backdrop:"(boolean|string)",keyboard:"boolean",scroll:"boolean"};class Lt extends F{constructor(i,u){super(i,u),this._isShown=!1,this._backdrop=this._initializeBackDrop(),this._focustrap=this._initializeFocusTrap(),this._addEventListeners()}static get Default(){return Xh}static get DefaultType(){return Qh}static get NAME(){return Fh}toggle(i){return this._isShown?this.hide():this.show(i)}show(i){if(this._isShown||$.trigger(this._element,Kh,{relatedTarget:i}).defaultPrevented)return;this._isShown=!0,this._backdrop.show(),this._config.scroll||new pi().hide(),this._element.setAttribute("aria-modal",!0),this._element.setAttribute("role","dialog"),this._element.classList.add(wa);const v=()=>{(!this._config.scroll||this._config.backdrop)&&this._focustrap.activate(),this._element.classList.add(Ta),this._element.classList.remove(wa),$.trigger(this._element,Wh,{relatedTarget:i})};this._queueCallback(v,this._element,!0)}hide(){if(!this._isShown||$.trigger(this._element,Uh).defaultPrevented)return;this._focustrap.deactivate(),this._element.blur(),this._isShown=!1,this._element.classList.add(Ca),this._backdrop.hide();const u=()=>{this._element.classList.remove(Ta,Ca),this._element.removeAttribute("aria-modal"),this._element.removeAttribute("role"),this._config.scroll||new pi().reset(),$.trigger(this._element,xa)};this._queueCallback(u,this._element,!0)}dispose(){this._backdrop.dispose(),this._focustrap.deactivate(),super.dispose()}_initializeBackDrop(){const i=()=>{if(this._config.backdrop==="static"){$.trigger(this._element,Oa);return}this.hide()},u=!!this._config.backdrop;return new da({className:jh,isVisible:u,isAnimated:!0,rootElement:this._element.parentNode,clickCallback:u?i:null})}_initializeFocusTrap(){return new pa({trapElement:this._element})}_addEventListeners(){$.on(this._element,qh,i=>{if(i.key===Bh){if(this._config.keyboard){this.hide();return}$.trigger(this._element,Oa)}})}static jQueryInterface(i){return this.each(function(){const u=Lt.getOrCreateInstance(this,i);if(typeof i=="string"){if(u[i]===void 0||i.startsWith("_")||i==="constructor")throw new TypeError(`No method named "${i}"`);u[i](this)}})}}$.on(document,Gh,zh,function(m){const i=N.getElementFromSelector(this);if(["A","AREA"].includes(this.tagName)&&m.preventDefault(),V(this))return;$.one(i,xa,()=>{P(this)&&this.focus()});const u=N.findOne(Sa);u&&u!==i&&Lt.getInstance(u).hide(),Lt.getOrCreateInstance(i).toggle(this)}),$.on(window,Hh,()=>{for(const m of N.find(Sa))Lt.getOrCreateInstance(m).show()}),$.on(window,Yh,()=>{for(const m of N.find("[aria-modal][class*=show][class*=offcanvas-]"))getComputedStyle(m).position!=="fixed"&&Lt.getOrCreateInstance(m).hide()}),W(Lt),w(Lt);const Na={"*":["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:[]},Jh=new Set(["background","cite","href","itemtype","longdesc","poster","src","xlink:href"]),Zh=/^(?!javascript:)(?:[a-z0-9+.-]+:|[^&:/?#]*(?:[/?#]|$))/i,ep=(m,i)=>{const u=m.nodeName.toLowerCase();return i.includes(u)?Jh.has(u)?!!Zh.test(m.nodeValue):!0:i.filter(v=>v instanceof RegExp).some(v=>v.test(u))};function tp(m,i,u){if(!m.length)return m;if(u&&typeof u=="function")return u(m);const I=new window.DOMParser().parseFromString(m,"text/html"),Y=[].concat(...I.body.querySelectorAll("*"));for(const U of Y){const le=U.nodeName.toLowerCase();if(!Object.keys(i).includes(le)){U.remove();continue}const Xe=[].concat(...U.attributes),ot=[].concat(i["*"]||[],i[le]||[]);for(const $e of Xe)ep($e,ot)||U.removeAttribute($e.nodeName)}return I.body.innerHTML}const np="TemplateFactory",sp={allowList:Na,content:{},extraClass:"",html:!1,sanitize:!0,sanitizeFn:null,template:"
"},rp={allowList:"object",content:"object",extraClass:"(string|function)",html:"boolean",sanitize:"boolean",sanitizeFn:"(null|function)",template:"string"},ip={entry:"(string|element|function|null)",selector:"(string|element)"};class op extends H{constructor(i){super(),this._config=this._getConfig(i)}static get Default(){return sp}static get DefaultType(){return rp}static get NAME(){return np}getContent(){return Object.values(this._config.content).map(i=>this._resolvePossibleFunction(i)).filter(Boolean)}hasContent(){return this.getContent().length>0}changeContent(i){return this._checkContent(i),this._config.content={...this._config.content,...i},this}toHtml(){const i=document.createElement("div");i.innerHTML=this._maybeSanitize(this._config.template);for(const[I,Y]of Object.entries(this._config.content))this._setContent(i,Y,I);const u=i.children[0],v=this._resolvePossibleFunction(this._config.extraClass);return v&&u.classList.add(...v.split(" ")),u}_typeCheckConfig(i){super._typeCheckConfig(i),this._checkContent(i.content)}_checkContent(i){for(const[u,v]of Object.entries(i))super._typeCheckConfig({selector:u,entry:v},ip)}_setContent(i,u,v){const I=N.findOne(v,i);if(I){if(u=this._resolvePossibleFunction(u),!u){I.remove();return}if(C(u)){this._putElementInTemplate(D(u),I);return}if(this._config.html){I.innerHTML=this._maybeSanitize(u);return}I.textContent=u}}_maybeSanitize(i){return this._config.sanitize?tp(i,this._config.allowList,this._config.sanitizeFn):i}_resolvePossibleFunction(i){return j(i,[this])}_putElementInTemplate(i,u){if(this._config.html){u.innerHTML="",u.append(i);return}u.textContent=i.textContent}}const ap="tooltip",lp=new Set(["sanitize","allowList","sanitizeFn"]),mi="fade",cp="modal",ar="show",up=".tooltip-inner",$a=`.${cp}`,Da="hide.bs.modal",vs="hover",_i="focus",fp="click",dp="manual",hp="hide",pp="hidden",gp="show",mp="shown",_p="inserted",vp="click",Ep="focusin",yp="focusout",bp="mouseenter",Ap="mouseleave",Tp={AUTO:"auto",TOP:"top",RIGHT:A()?"left":"right",BOTTOM:"bottom",LEFT:A()?"right":"left"},wp={allowList:Na,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"},Cp={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 gn extends F{constructor(i,u){if(typeof r>"u")throw new TypeError("Bootstrap's tooltips require Popper (https://popper.js.org)");super(i,u),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 wp}static get DefaultType(){return Cp}static get NAME(){return ap}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),$.off(this._element.closest($a),Da,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 i=$.trigger(this._element,this.constructor.eventName(gp)),v=(k(this._element)||this._element.ownerDocument.documentElement).contains(this._element);if(i.defaultPrevented||!v)return;this._disposePopper();const I=this._getTipElement();this._element.setAttribute("aria-describedby",I.getAttribute("id"));const{container:Y}=this._config;if(this._element.ownerDocument.documentElement.contains(this.tip)||(Y.append(I),$.trigger(this._element,this.constructor.eventName(_p))),this._popper=this._createPopper(I),I.classList.add(ar),"ontouchstart"in document.documentElement)for(const le of[].concat(...document.body.children))$.on(le,"mouseover",M);const U=()=>{$.trigger(this._element,this.constructor.eventName(mp)),this._isHovered===!1&&this._leave(),this._isHovered=!1};this._queueCallback(U,this.tip,this._isAnimated())}hide(){if(!this._isShown()||$.trigger(this._element,this.constructor.eventName(hp)).defaultPrevented)return;if(this._getTipElement().classList.remove(ar),"ontouchstart"in document.documentElement)for(const I of[].concat(...document.body.children))$.off(I,"mouseover",M);this._activeTrigger[fp]=!1,this._activeTrigger[_i]=!1,this._activeTrigger[vs]=!1,this._isHovered=null;const v=()=>{this._isWithActiveTrigger()||(this._isHovered||this._disposePopper(),this._element.removeAttribute("aria-describedby"),$.trigger(this._element,this.constructor.eventName(pp)))};this._queueCallback(v,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(i){const u=this._getTemplateFactory(i).toHtml();if(!u)return null;u.classList.remove(mi,ar),u.classList.add(`bs-${this.constructor.NAME}-auto`);const v=p(this.constructor.NAME).toString();return u.setAttribute("id",v),this._isAnimated()&&u.classList.add(mi),u}setContent(i){this._newContent=i,this._isShown()&&(this._disposePopper(),this.show())}_getTemplateFactory(i){return this._templateFactory?this._templateFactory.changeContent(i):this._templateFactory=new op({...this._config,content:i,extraClass:this._resolvePossibleFunction(this._config.customClass)}),this._templateFactory}_getContentForTemplate(){return{[up]:this._getTitle()}}_getTitle(){return this._resolvePossibleFunction(this._config.title)||this._element.getAttribute("data-bs-original-title")}_initializeOnDelegatedTarget(i){return this.constructor.getOrCreateInstance(i.delegateTarget,this._getDelegateConfig())}_isAnimated(){return this._config.animation||this.tip&&this.tip.classList.contains(mi)}_isShown(){return this.tip&&this.tip.classList.contains(ar)}_createPopper(i){const u=j(this._config.placement,[this,i,this._element]),v=Tp[u.toUpperCase()];return r.createPopper(this._element,i,this._getPopperConfig(v))}_getOffset(){const{offset:i}=this._config;return typeof i=="string"?i.split(",").map(u=>Number.parseInt(u,10)):typeof i=="function"?u=>i(u,this._element):i}_resolvePossibleFunction(i){return j(i,[this._element])}_getPopperConfig(i){const u={placement:i,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:v=>{this._getTipElement().setAttribute("data-popper-placement",v.state.placement)}}]};return{...u,...j(this._config.popperConfig,[u])}}_setListeners(){const i=this._config.trigger.split(" ");for(const u of i)if(u==="click")$.on(this._element,this.constructor.eventName(vp),this._config.selector,v=>{this._initializeOnDelegatedTarget(v).toggle()});else if(u!==dp){const v=u===vs?this.constructor.eventName(bp):this.constructor.eventName(Ep),I=u===vs?this.constructor.eventName(Ap):this.constructor.eventName(yp);$.on(this._element,v,this._config.selector,Y=>{const U=this._initializeOnDelegatedTarget(Y);U._activeTrigger[Y.type==="focusin"?_i:vs]=!0,U._enter()}),$.on(this._element,I,this._config.selector,Y=>{const U=this._initializeOnDelegatedTarget(Y);U._activeTrigger[Y.type==="focusout"?_i:vs]=U._element.contains(Y.relatedTarget),U._leave()})}this._hideModalHandler=()=>{this._element&&this.hide()},$.on(this._element.closest($a),Da,this._hideModalHandler)}_fixTitle(){const i=this._element.getAttribute("title");i&&(!this._element.getAttribute("aria-label")&&!this._element.textContent.trim()&&this._element.setAttribute("aria-label",i),this._element.setAttribute("data-bs-original-title",i),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(i,u){clearTimeout(this._timeout),this._timeout=setTimeout(i,u)}_isWithActiveTrigger(){return Object.values(this._activeTrigger).includes(!0)}_getConfig(i){const u=O.getDataAttributes(this._element);for(const v of Object.keys(u))lp.has(v)&&delete u[v];return i={...u,...typeof i=="object"&&i?i:{}},i=this._mergeConfigObj(i),i=this._configAfterMerge(i),this._typeCheckConfig(i),i}_configAfterMerge(i){return i.container=i.container===!1?document.body:D(i.container),typeof i.delay=="number"&&(i.delay={show:i.delay,hide:i.delay}),typeof i.title=="number"&&(i.title=i.title.toString()),typeof i.content=="number"&&(i.content=i.content.toString()),i}_getDelegateConfig(){const i={};for(const[u,v]of Object.entries(this._config))this.constructor.Default[u]!==v&&(i[u]=v);return i.selector=!1,i.trigger="manual",i}_disposePopper(){this._popper&&(this._popper.destroy(),this._popper=null),this.tip&&(this.tip.remove(),this.tip=null)}static jQueryInterface(i){return this.each(function(){const u=gn.getOrCreateInstance(this,i);if(typeof i=="string"){if(typeof u[i]>"u")throw new TypeError(`No method named "${i}"`);u[i]()}})}}w(gn);const Sp="popover",Op=".popover-header",xp=".popover-body",Np={...gn.Default,content:"",offset:[0,8],placement:"right",template:'',trigger:"click"},$p={...gn.DefaultType,content:"(null|string|element|function)"};class lr extends gn{static get Default(){return Np}static get DefaultType(){return $p}static get NAME(){return Sp}_isWithContent(){return this._getTitle()||this._getContent()}_getContentForTemplate(){return{[Op]:this._getTitle(),[xp]:this._getContent()}}_getContent(){return this._resolvePossibleFunction(this._config.content)}static jQueryInterface(i){return this.each(function(){const u=lr.getOrCreateInstance(this,i);if(typeof i=="string"){if(typeof u[i]>"u")throw new TypeError(`No method named "${i}"`);u[i]()}})}}w(lr);const Dp="scrollspy",vi=".bs.scrollspy",Lp=".data-api",Rp=`activate${vi}`,La=`click${vi}`,Ip=`load${vi}${Lp}`,Pp="dropdown-item",Fn="active",Mp='[data-bs-spy="scroll"]',Ei="[href]",kp=".nav, .list-group",Ra=".nav-link",Vp=`${Ra}, .nav-item > ${Ra}, .list-group-item`,Fp=".dropdown",Hp=".dropdown-toggle",Bp={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 Es extends F{constructor(i,u){super(i,u),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 Bp}static get DefaultType(){return jp}static get NAME(){return Dp}refresh(){this._initializeTargetsAndObservables(),this._maybeEnableSmoothScroll(),this._observer?this._observer.disconnect():this._observer=this._getNewObserver();for(const i of this._observableSections.values())this._observer.observe(i)}dispose(){this._observer.disconnect(),super.dispose()}_configAfterMerge(i){return i.target=D(i.target)||document.body,i.rootMargin=i.offset?`${i.offset}px 0px -30%`:i.rootMargin,typeof i.threshold=="string"&&(i.threshold=i.threshold.split(",").map(u=>Number.parseFloat(u))),i}_maybeEnableSmoothScroll(){this._config.smoothScroll&&($.off(this._config.target,La),$.on(this._config.target,La,Ei,i=>{const u=this._observableSections.get(i.target.hash);if(u){i.preventDefault();const v=this._rootElement||window,I=u.offsetTop-this._element.offsetTop;if(v.scrollTo){v.scrollTo({top:I,behavior:"smooth"});return}v.scrollTop=I}}))}_getNewObserver(){const i={root:this._rootElement,threshold:this._config.threshold,rootMargin:this._config.rootMargin};return new IntersectionObserver(u=>this._observerCallback(u),i)}_observerCallback(i){const u=U=>this._targetLinks.get(`#${U.target.id}`),v=U=>{this._previousScrollData.visibleEntryTop=U.target.offsetTop,this._process(u(U))},I=(this._rootElement||document.documentElement).scrollTop,Y=I>=this._previousScrollData.parentScrollTop;this._previousScrollData.parentScrollTop=I;for(const U of i){if(!U.isIntersecting){this._activeTarget=null,this._clearActiveClass(u(U));continue}const le=U.target.offsetTop>=this._previousScrollData.visibleEntryTop;if(Y&&le){if(v(U),!I)return;continue}!Y&&!le&&v(U)}}_initializeTargetsAndObservables(){this._targetLinks=new Map,this._observableSections=new Map;const i=N.find(Ei,this._config.target);for(const u of i){if(!u.hash||V(u))continue;const v=N.findOne(decodeURI(u.hash),this._element);P(v)&&(this._targetLinks.set(decodeURI(u.hash),u),this._observableSections.set(u.hash,v))}}_process(i){this._activeTarget!==i&&(this._clearActiveClass(this._config.target),this._activeTarget=i,i.classList.add(Fn),this._activateParents(i),$.trigger(this._element,Rp,{relatedTarget:i}))}_activateParents(i){if(i.classList.contains(Pp)){N.findOne(Hp,i.closest(Fp)).classList.add(Fn);return}for(const u of N.parents(i,kp))for(const v of N.prev(u,Vp))v.classList.add(Fn)}_clearActiveClass(i){i.classList.remove(Fn);const u=N.find(`${Ei}.${Fn}`,i);for(const v of u)v.classList.remove(Fn)}static jQueryInterface(i){return this.each(function(){const u=Es.getOrCreateInstance(this,i);if(typeof i=="string"){if(u[i]===void 0||i.startsWith("_")||i==="constructor")throw new TypeError(`No method named "${i}"`);u[i]()}})}}$.on(window,Ip,()=>{for(const m of N.find(Mp))Es.getOrCreateInstance(m)}),w(Es);const Kp="tab",mn=".bs.tab",Wp=`hide${mn}`,Up=`hidden${mn}`,Yp=`show${mn}`,Gp=`shown${mn}`,qp=`click${mn}`,zp=`keydown${mn}`,Xp=`load${mn}`,Qp="ArrowLeft",Ia="ArrowRight",Jp="ArrowUp",Pa="ArrowDown",yi="Home",Ma="End",_n="active",ka="fade",bi="show",Zp="dropdown",Va=".dropdown-toggle",eg=".dropdown-menu",Ai=`:not(${Va})`,tg='.list-group, .nav, [role="tablist"]',ng=".nav-item, .list-group-item",sg=`.nav-link${Ai}, .list-group-item${Ai}, [role="tab"]${Ai}`,Fa='[data-bs-toggle="tab"], [data-bs-toggle="pill"], [data-bs-toggle="list"]',Ti=`${sg}, ${Fa}`,rg=`.${_n}[data-bs-toggle="tab"], .${_n}[data-bs-toggle="pill"], .${_n}[data-bs-toggle="list"]`;class vn extends F{constructor(i){super(i),this._parent=this._element.closest(tg),this._parent&&(this._setInitialAttributes(this._parent,this._getChildren()),$.on(this._element,zp,u=>this._keydown(u)))}static get NAME(){return Kp}show(){const i=this._element;if(this._elemIsActive(i))return;const u=this._getActiveElem(),v=u?$.trigger(u,Wp,{relatedTarget:i}):null;$.trigger(i,Yp,{relatedTarget:u}).defaultPrevented||v&&v.defaultPrevented||(this._deactivate(u,i),this._activate(i,u))}_activate(i,u){if(!i)return;i.classList.add(_n),this._activate(N.getElementFromSelector(i));const v=()=>{if(i.getAttribute("role")!=="tab"){i.classList.add(bi);return}i.removeAttribute("tabindex"),i.setAttribute("aria-selected",!0),this._toggleDropDown(i,!0),$.trigger(i,Gp,{relatedTarget:u})};this._queueCallback(v,i,i.classList.contains(ka))}_deactivate(i,u){if(!i)return;i.classList.remove(_n),i.blur(),this._deactivate(N.getElementFromSelector(i));const v=()=>{if(i.getAttribute("role")!=="tab"){i.classList.remove(bi);return}i.setAttribute("aria-selected",!1),i.setAttribute("tabindex","-1"),this._toggleDropDown(i,!1),$.trigger(i,Up,{relatedTarget:u})};this._queueCallback(v,i,i.classList.contains(ka))}_keydown(i){if(![Qp,Ia,Jp,Pa,yi,Ma].includes(i.key))return;i.stopPropagation(),i.preventDefault();const u=this._getChildren().filter(I=>!V(I));let v;if([yi,Ma].includes(i.key))v=u[i.key===yi?0:u.length-1];else{const I=[Ia,Pa].includes(i.key);v=Q(u,i.target,I,!0)}v&&(v.focus({preventScroll:!0}),vn.getOrCreateInstance(v).show())}_getChildren(){return N.find(Ti,this._parent)}_getActiveElem(){return this._getChildren().find(i=>this._elemIsActive(i))||null}_setInitialAttributes(i,u){this._setAttributeIfNotExists(i,"role","tablist");for(const v of u)this._setInitialAttributesOnChild(v)}_setInitialAttributesOnChild(i){i=this._getInnerElement(i);const u=this._elemIsActive(i),v=this._getOuterElement(i);i.setAttribute("aria-selected",u),v!==i&&this._setAttributeIfNotExists(v,"role","presentation"),u||i.setAttribute("tabindex","-1"),this._setAttributeIfNotExists(i,"role","tab"),this._setInitialAttributesOnTargetPanel(i)}_setInitialAttributesOnTargetPanel(i){const u=N.getElementFromSelector(i);u&&(this._setAttributeIfNotExists(u,"role","tabpanel"),i.id&&this._setAttributeIfNotExists(u,"aria-labelledby",`${i.id}`))}_toggleDropDown(i,u){const v=this._getOuterElement(i);if(!v.classList.contains(Zp))return;const I=(Y,U)=>{const le=N.findOne(Y,v);le&&le.classList.toggle(U,u)};I(Va,_n),I(eg,bi),v.setAttribute("aria-expanded",u)}_setAttributeIfNotExists(i,u,v){i.hasAttribute(u)||i.setAttribute(u,v)}_elemIsActive(i){return i.classList.contains(_n)}_getInnerElement(i){return i.matches(Ti)?i:N.findOne(Ti,i)}_getOuterElement(i){return i.closest(ng)||i}static jQueryInterface(i){return this.each(function(){const u=vn.getOrCreateInstance(this);if(typeof i=="string"){if(u[i]===void 0||i.startsWith("_")||i==="constructor")throw new TypeError(`No method named "${i}"`);u[i]()}})}}$.on(document,qp,Fa,function(m){["A","AREA"].includes(this.tagName)&&m.preventDefault(),!V(this)&&vn.getOrCreateInstance(this).show()}),$.on(window,Xp,()=>{for(const m of N.find(rg))vn.getOrCreateInstance(m)}),w(vn);const ig="toast",Wt=".bs.toast",og=`mouseover${Wt}`,ag=`mouseout${Wt}`,lg=`focusin${Wt}`,cg=`focusout${Wt}`,ug=`hide${Wt}`,fg=`hidden${Wt}`,dg=`show${Wt}`,hg=`shown${Wt}`,pg="fade",Ha="hide",cr="show",ur="showing",gg={animation:"boolean",autohide:"boolean",delay:"number"},mg={animation:!0,autohide:!0,delay:5e3};class ys extends F{constructor(i,u){super(i,u),this._timeout=null,this._hasMouseInteraction=!1,this._hasKeyboardInteraction=!1,this._setListeners()}static get Default(){return mg}static get DefaultType(){return gg}static get NAME(){return ig}show(){if($.trigger(this._element,dg).defaultPrevented)return;this._clearTimeout(),this._config.animation&&this._element.classList.add(pg);const u=()=>{this._element.classList.remove(ur),$.trigger(this._element,hg),this._maybeScheduleHide()};this._element.classList.remove(Ha),b(this._element),this._element.classList.add(cr,ur),this._queueCallback(u,this._element,this._config.animation)}hide(){if(!this.isShown()||$.trigger(this._element,ug).defaultPrevented)return;const u=()=>{this._element.classList.add(Ha),this._element.classList.remove(ur,cr),$.trigger(this._element,fg)};this._element.classList.add(ur),this._queueCallback(u,this._element,this._config.animation)}dispose(){this._clearTimeout(),this.isShown()&&this._element.classList.remove(cr),super.dispose()}isShown(){return this._element.classList.contains(cr)}_maybeScheduleHide(){this._config.autohide&&(this._hasMouseInteraction||this._hasKeyboardInteraction||(this._timeout=setTimeout(()=>{this.hide()},this._config.delay)))}_onInteraction(i,u){switch(i.type){case"mouseover":case"mouseout":{this._hasMouseInteraction=u;break}case"focusin":case"focusout":{this._hasKeyboardInteraction=u;break}}if(u){this._clearTimeout();return}const v=i.relatedTarget;this._element===v||this._element.contains(v)||this._maybeScheduleHide()}_setListeners(){$.on(this._element,og,i=>this._onInteraction(i,!0)),$.on(this._element,ag,i=>this._onInteraction(i,!1)),$.on(this._element,lg,i=>this._onInteraction(i,!0)),$.on(this._element,cg,i=>this._onInteraction(i,!1))}_clearTimeout(){clearTimeout(this._timeout),this._timeout=null}static jQueryInterface(i){return this.each(function(){const u=ys.getOrCreateInstance(this,i);if(typeof i=="string"){if(typeof u[i]>"u")throw new TypeError(`No method named "${i}"`);u[i](this)}})}}return W(ys),w(ys),{Alert:ue,Button:Me,Carousel:Pn,Collapse:kn,Dropdown:pt,Modal:pn,Offcanvas:Lt,Popover:lr,ScrollSpy:Es,Tab:vn,Toast:ys,Tooltip:gn}})})(yg);/** +* @vue/shared v3.5.11 +* (c) 2018-present Yuxi (Evan) You and Vue contributors +* @license MIT +**//*! #__NO_SIDE_EFFECTS__ */function To(e){const t=Object.create(null);for(const n of e.split(","))t[n]=1;return n=>n in t}const _e={},qn=[],xt=()=>{},um=()=>!1,Yr=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&(e.charCodeAt(2)>122||e.charCodeAt(2)<97),wo=e=>e.startsWith("onUpdate:"),Oe=Object.assign,Co=(e,t)=>{const n=e.indexOf(t);n>-1&&e.splice(n,1)},fm=Object.prototype.hasOwnProperty,pe=(e,t)=>fm.call(e,t),ne=Array.isArray,zn=e=>Ys(e)==="[object Map]",ds=e=>Ys(e)==="[object Set]",za=e=>Ys(e)==="[object Date]",ie=e=>typeof e=="function",be=e=>typeof e=="string",$t=e=>typeof e=="symbol",ve=e=>e!==null&&typeof e=="object",Pc=e=>(ve(e)||ie(e))&&ie(e.then)&&ie(e.catch),Mc=Object.prototype.toString,Ys=e=>Mc.call(e),dm=e=>Ys(e).slice(8,-1),kc=e=>Ys(e)==="[object Object]",So=e=>be(e)&&e!=="NaN"&&e[0]!=="-"&&""+parseInt(e,10)===e,xs=To(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),Gr=e=>{const t=Object.create(null);return n=>t[n]||(t[n]=e(n))},hm=/-(\w)/g,ht=Gr(e=>e.replace(hm,(t,n)=>n?n.toUpperCase():"")),pm=/\B([A-Z])/g,an=Gr(e=>e.replace(pm,"-$1").toLowerCase()),qr=Gr(e=>e.charAt(0).toUpperCase()+e.slice(1)),wi=Gr(e=>e?`on${qr(e)}`:""),nn=(e,t)=>!Object.is(e,t),Cr=(e,...t)=>{for(let n=0;n{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,writable:s,value:n})},Lr=e=>{const t=parseFloat(e);return isNaN(t)?e:t},Fc=e=>{const t=be(e)?Number(e):NaN;return isNaN(t)?e:t};let Xa;const Hc=()=>Xa||(Xa=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});function zr(e){if(ne(e)){const t={};for(let n=0;n{if(n){const s=n.split(mm);s.length>1&&(t[s[0].trim()]=s[1].trim())}}),t}function Xr(e){let t="";if(be(e))t=e;else if(ne(e))for(let n=0;nNn(n,t))}const jc=e=>!!(e&&e.__v_isRef===!0),Am=e=>be(e)?e:e==null?"":ne(e)||ve(e)&&(e.toString===Mc||!ie(e.toString))?jc(e)?Am(e.value):JSON.stringify(e,Kc,2):String(e),Kc=(e,t)=>jc(t)?Kc(e,t.value):zn(t)?{[`Map(${t.size})`]:[...t.entries()].reduce((n,[s,r],o)=>(n[Ci(s,o)+" =>"]=r,n),{})}:ds(t)?{[`Set(${t.size})`]:[...t.values()].map(n=>Ci(n))}:$t(t)?Ci(t):ve(t)&&!ne(t)&&!kc(t)?String(t):t,Ci=(e,t="")=>{var n;return $t(e)?`Symbol(${(n=e.description)!=null?n:t})`:e};/** +* @vue/reactivity v3.5.11 +* (c) 2018-present Yuxi (Evan) You and Vue contributors +* @license MIT +**/let Ye;class Wc{constructor(t=!1){this.detached=t,this._active=!0,this.effects=[],this.cleanups=[],this._isPaused=!1,this.parent=Ye,!t&&Ye&&(this.index=(Ye.scopes||(Ye.scopes=[])).push(this)-1)}get active(){return this._active}pause(){if(this._active){this._isPaused=!0;let t,n;if(this.scopes)for(t=0,n=this.scopes.length;t0)return;if($s){let t=$s;for($s=void 0;t;){const n=t.next;t.next=void 0,t.flags&=-9,t=n}}let e;for(;Ns;){let t=Ns;for(Ns=void 0;t;){const n=t.next;if(t.next=void 0,t.flags&=-9,t.flags&1)try{t.trigger()}catch(s){e||(e=s)}t=n}}if(e)throw e}function Xc(e){for(let t=e.deps;t;t=t.nextDep)t.version=-1,t.prevActiveLink=t.dep.activeLink,t.dep.activeLink=t}function Qc(e){let t,n=e.depsTail,s=n;for(;s;){const r=s.prevDep;s.version===-1?(s===n&&(n=r),$o(s),wm(s)):t=s,s.dep.activeLink=s.prevActiveLink,s.prevActiveLink=void 0,s=r}e.deps=t,e.depsTail=n}function Wi(e){for(let t=e.deps;t;t=t.nextDep)if(t.dep.version!==t.version||t.dep.computed&&(Jc(t.dep.computed)||t.dep.version!==t.version))return!0;return!!e._dirty}function Jc(e){if(e.flags&4&&!(e.flags&16)||(e.flags&=-17,e.globalVersion===ks))return;e.globalVersion=ks;const t=e.dep;if(e.flags|=2,t.version>0&&!e.isSSR&&e.deps&&!Wi(e)){e.flags&=-3;return}const n=Ee,s=Et;Ee=e,Et=!0;try{Xc(e);const r=e.fn(e._value);(t.version===0||nn(r,e._value))&&(e._value=r,t.version++)}catch(r){throw t.version++,r}finally{Ee=n,Et=s,Qc(e),e.flags&=-3}}function $o(e,t=!1){const{dep:n,prevSub:s,nextSub:r}=e;if(s&&(s.nextSub=r,e.prevSub=void 0),r&&(r.prevSub=s,e.nextSub=void 0),n.subs===e&&(n.subs=s),!n.subs&&n.computed){n.computed.flags&=-5;for(let o=n.computed.deps;o;o=o.nextDep)$o(o,!0)}!t&&!--n.sc&&n.map&&n.map.delete(n.key)}function wm(e){const{prevDep:t,nextDep:n}=e;t&&(t.nextDep=n,e.prevDep=void 0),n&&(n.prevDep=t,e.nextDep=void 0)}let Et=!0;const Zc=[];function ln(){Zc.push(Et),Et=!1}function cn(){const e=Zc.pop();Et=e===void 0?!0:e}function Qa(e){const{cleanup:t}=e;if(e.cleanup=void 0,t){const n=Ee;Ee=void 0;try{t()}finally{Ee=n}}}let ks=0;class Cm{constructor(t,n){this.sub=t,this.dep=n,this.version=n.version,this.nextDep=this.prevDep=this.nextSub=this.prevSub=this.prevActiveLink=void 0}}class Do{constructor(t){this.computed=t,this.version=0,this.activeLink=void 0,this.subs=void 0,this.map=void 0,this.key=void 0,this.sc=0}track(t){if(!Ee||!Et||Ee===this.computed)return;let n=this.activeLink;if(n===void 0||n.sub!==Ee)n=this.activeLink=new Cm(Ee,this),Ee.deps?(n.prevDep=Ee.depsTail,Ee.depsTail.nextDep=n,Ee.depsTail=n):Ee.deps=Ee.depsTail=n,eu(n);else if(n.version===-1&&(n.version=this.version,n.nextDep)){const s=n.nextDep;s.prevDep=n.prevDep,n.prevDep&&(n.prevDep.nextDep=s),n.prevDep=Ee.depsTail,n.nextDep=void 0,Ee.depsTail.nextDep=n,Ee.depsTail=n,Ee.deps===n&&(Ee.deps=s)}return n}trigger(t){this.version++,ks++,this.notify(t)}notify(t){xo();try{for(let n=this.subs;n;n=n.prevSub)n.sub.notify()&&n.sub.dep.notify()}finally{No()}}}function eu(e){if(e.dep.sc++,e.sub.flags&4){const t=e.dep.computed;if(t&&!e.dep.subs){t.flags|=20;for(let s=t.deps;s;s=s.nextDep)eu(s)}const n=e.dep.subs;n!==e&&(e.prevSub=n,n&&(n.nextSub=e)),e.dep.subs=e}}const Rr=new WeakMap,wn=Symbol(""),Ui=Symbol(""),Vs=Symbol("");function Fe(e,t,n){if(Et&&Ee){let s=Rr.get(e);s||Rr.set(e,s=new Map);let r=s.get(n);r||(s.set(n,r=new Do),r.map=s,r.key=n),r.track()}}function Ht(e,t,n,s,r,o){const a=Rr.get(e);if(!a){ks++;return}const l=c=>{c&&c.trigger()};if(xo(),t==="clear")a.forEach(l);else{const c=ne(e),d=c&&So(n);if(c&&n==="length"){const f=Number(s);a.forEach((h,p)=>{(p==="length"||p===Vs||!$t(p)&&p>=f)&&l(h)})}else switch(n!==void 0&&l(a.get(n)),d&&l(a.get(Vs)),t){case"add":c?d&&l(a.get("length")):(l(a.get(wn)),zn(e)&&l(a.get(Ui)));break;case"delete":c||(l(a.get(wn)),zn(e)&&l(a.get(Ui)));break;case"set":zn(e)&&l(a.get(wn));break}}No()}function Sm(e,t){const n=Rr.get(e);return n&&n.get(t)}function Bn(e){const t=fe(e);return t===e?t:(Fe(t,"iterate",Vs),ut(e)?t:t.map(ke))}function Qr(e){return Fe(e=fe(e),"iterate",Vs),e}const Om={__proto__:null,[Symbol.iterator](){return Oi(this,Symbol.iterator,ke)},concat(...e){return Bn(this).concat(...e.map(t=>ne(t)?Bn(t):t))},entries(){return Oi(this,"entries",e=>(e[1]=ke(e[1]),e))},every(e,t){return Rt(this,"every",e,t,void 0,arguments)},filter(e,t){return Rt(this,"filter",e,t,n=>n.map(ke),arguments)},find(e,t){return Rt(this,"find",e,t,ke,arguments)},findIndex(e,t){return Rt(this,"findIndex",e,t,void 0,arguments)},findLast(e,t){return Rt(this,"findLast",e,t,ke,arguments)},findLastIndex(e,t){return Rt(this,"findLastIndex",e,t,void 0,arguments)},forEach(e,t){return Rt(this,"forEach",e,t,void 0,arguments)},includes(...e){return xi(this,"includes",e)},indexOf(...e){return xi(this,"indexOf",e)},join(e){return Bn(this).join(e)},lastIndexOf(...e){return xi(this,"lastIndexOf",e)},map(e,t){return Rt(this,"map",e,t,void 0,arguments)},pop(){return bs(this,"pop")},push(...e){return bs(this,"push",e)},reduce(e,...t){return Ja(this,"reduce",e,t)},reduceRight(e,...t){return Ja(this,"reduceRight",e,t)},shift(){return bs(this,"shift")},some(e,t){return Rt(this,"some",e,t,void 0,arguments)},splice(...e){return bs(this,"splice",e)},toReversed(){return Bn(this).toReversed()},toSorted(e){return Bn(this).toSorted(e)},toSpliced(...e){return Bn(this).toSpliced(...e)},unshift(...e){return bs(this,"unshift",e)},values(){return Oi(this,"values",ke)}};function Oi(e,t,n){const s=Qr(e),r=s[t]();return s!==e&&!ut(e)&&(r._next=r.next,r.next=()=>{const o=r._next();return o.value&&(o.value=n(o.value)),o}),r}const xm=Array.prototype;function Rt(e,t,n,s,r,o){const a=Qr(e),l=a!==e&&!ut(e),c=a[t];if(c!==xm[t]){const h=c.apply(e,o);return l?ke(h):h}let d=n;a!==e&&(l?d=function(h,p){return n.call(this,ke(h),p,e)}:n.length>2&&(d=function(h,p){return n.call(this,h,p,e)}));const f=c.call(a,d,s);return l&&r?r(f):f}function Ja(e,t,n,s){const r=Qr(e);let o=n;return r!==e&&(ut(e)?n.length>3&&(o=function(a,l,c){return n.call(this,a,l,c,e)}):o=function(a,l,c){return n.call(this,a,ke(l),c,e)}),r[t](o,...s)}function xi(e,t,n){const s=fe(e);Fe(s,"iterate",Vs);const r=s[t](...n);return(r===-1||r===!1)&&Po(n[0])?(n[0]=fe(n[0]),s[t](...n)):r}function bs(e,t,n=[]){ln(),xo();const s=fe(e)[t].apply(e,n);return No(),cn(),s}const Nm=To("__proto__,__v_isRef,__isVue"),tu=new Set(Object.getOwnPropertyNames(Symbol).filter(e=>e!=="arguments"&&e!=="caller").map(e=>Symbol[e]).filter($t));function $m(e){$t(e)||(e=String(e));const t=fe(this);return Fe(t,"has",e),t.hasOwnProperty(e)}class nu{constructor(t=!1,n=!1){this._isReadonly=t,this._isShallow=n}get(t,n,s){const r=this._isReadonly,o=this._isShallow;if(n==="__v_isReactive")return!r;if(n==="__v_isReadonly")return r;if(n==="__v_isShallow")return o;if(n==="__v_raw")return s===(r?o?Km:ou:o?iu:ru).get(t)||Object.getPrototypeOf(t)===Object.getPrototypeOf(s)?t:void 0;const a=ne(t);if(!r){let c;if(a&&(c=Om[n]))return c;if(n==="hasOwnProperty")return $m}const l=Reflect.get(t,n,Te(t)?t:s);return($t(n)?tu.has(n):Nm(n))||(r||Fe(t,"get",n),o)?l:Te(l)?a&&So(n)?l:l.value:ve(l)?r?lu(l):Gs(l):l}}class su extends nu{constructor(t=!1){super(!1,t)}set(t,n,s,r){let o=t[n];if(!this._isShallow){const c=$n(o);if(!ut(s)&&!$n(s)&&(o=fe(o),s=fe(s)),!ne(t)&&Te(o)&&!Te(s))return c?!1:(o.value=s,!0)}const a=ne(t)&&So(n)?Number(n)e,Jr=e=>Reflect.getPrototypeOf(e);function hr(e,t,n=!1,s=!1){e=e.__v_raw;const r=fe(e),o=fe(t);n||(nn(t,o)&&Fe(r,"get",t),Fe(r,"get",o));const{has:a}=Jr(r),l=s?Lo:n?Mo:ke;if(a.call(r,t))return l(e.get(t));if(a.call(r,o))return l(e.get(o));e!==r&&e.get(t)}function pr(e,t=!1){const n=this.__v_raw,s=fe(n),r=fe(e);return t||(nn(e,r)&&Fe(s,"has",e),Fe(s,"has",r)),e===r?n.has(e):n.has(e)||n.has(r)}function gr(e,t=!1){return e=e.__v_raw,!t&&Fe(fe(e),"iterate",wn),Reflect.get(e,"size",e)}function Za(e,t=!1){!t&&!ut(e)&&!$n(e)&&(e=fe(e));const n=fe(this);return Jr(n).has.call(n,e)||(n.add(e),Ht(n,"add",e,e)),this}function el(e,t,n=!1){!n&&!ut(t)&&!$n(t)&&(t=fe(t));const s=fe(this),{has:r,get:o}=Jr(s);let a=r.call(s,e);a||(e=fe(e),a=r.call(s,e));const l=o.call(s,e);return s.set(e,t),a?nn(t,l)&&Ht(s,"set",e,t):Ht(s,"add",e,t),this}function tl(e){const t=fe(this),{has:n,get:s}=Jr(t);let r=n.call(t,e);r||(e=fe(e),r=n.call(t,e)),s&&s.call(t,e);const o=t.delete(e);return r&&Ht(t,"delete",e,void 0),o}function nl(){const e=fe(this),t=e.size!==0,n=e.clear();return t&&Ht(e,"clear",void 0,void 0),n}function mr(e,t){return function(s,r){const o=this,a=o.__v_raw,l=fe(a),c=t?Lo:e?Mo:ke;return!e&&Fe(l,"iterate",wn),a.forEach((d,f)=>s.call(r,c(d),c(f),o))}}function _r(e,t,n){return function(...s){const r=this.__v_raw,o=fe(r),a=zn(o),l=e==="entries"||e===Symbol.iterator&&a,c=e==="keys"&&a,d=r[e](...s),f=n?Lo:t?Mo:ke;return!t&&Fe(o,"iterate",c?Ui:wn),{next(){const{value:h,done:p}=d.next();return p?{value:h,done:p}:{value:l?[f(h[0]),f(h[1])]:f(h),done:p}},[Symbol.iterator](){return this}}}}function Ut(e){return function(...t){return e==="delete"?!1:e==="clear"?void 0:this}}function Pm(){const e={get(o){return hr(this,o)},get size(){return gr(this)},has:pr,add:Za,set:el,delete:tl,clear:nl,forEach:mr(!1,!1)},t={get(o){return hr(this,o,!1,!0)},get size(){return gr(this)},has:pr,add(o){return Za.call(this,o,!0)},set(o,a){return el.call(this,o,a,!0)},delete:tl,clear:nl,forEach:mr(!1,!0)},n={get(o){return hr(this,o,!0)},get size(){return gr(this,!0)},has(o){return pr.call(this,o,!0)},add:Ut("add"),set:Ut("set"),delete:Ut("delete"),clear:Ut("clear"),forEach:mr(!0,!1)},s={get(o){return hr(this,o,!0,!0)},get size(){return gr(this,!0)},has(o){return pr.call(this,o,!0)},add:Ut("add"),set:Ut("set"),delete:Ut("delete"),clear:Ut("clear"),forEach:mr(!0,!0)};return["keys","values","entries",Symbol.iterator].forEach(o=>{e[o]=_r(o,!1,!1),n[o]=_r(o,!0,!1),t[o]=_r(o,!1,!0),s[o]=_r(o,!0,!0)}),[e,n,t,s]}const[Mm,km,Vm,Fm]=Pm();function Ro(e,t){const n=t?e?Fm:Vm:e?km:Mm;return(s,r,o)=>r==="__v_isReactive"?!e:r==="__v_isReadonly"?e:r==="__v_raw"?s:Reflect.get(pe(n,r)&&r in s?n:s,r,o)}const Hm={get:Ro(!1,!1)},Bm={get:Ro(!1,!0)},jm={get:Ro(!0,!1)};const ru=new WeakMap,iu=new WeakMap,ou=new WeakMap,Km=new WeakMap;function Wm(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function Um(e){return e.__v_skip||!Object.isExtensible(e)?0:Wm(dm(e))}function Gs(e){return $n(e)?e:Io(e,!1,Lm,Hm,ru)}function au(e){return Io(e,!1,Im,Bm,iu)}function lu(e){return Io(e,!0,Rm,jm,ou)}function Io(e,t,n,s,r){if(!ve(e)||e.__v_raw&&!(t&&e.__v_isReactive))return e;const o=r.get(e);if(o)return o;const a=Um(e);if(a===0)return e;const l=new Proxy(e,a===2?s:n);return r.set(e,l),l}function tn(e){return $n(e)?tn(e.__v_raw):!!(e&&e.__v_isReactive)}function $n(e){return!!(e&&e.__v_isReadonly)}function ut(e){return!!(e&&e.__v_isShallow)}function Po(e){return e?!!e.__v_raw:!1}function fe(e){const t=e&&e.__v_raw;return t?fe(t):e}function Zr(e){return!pe(e,"__v_skip")&&Object.isExtensible(e)&&Vc(e,"__v_skip",!0),e}const ke=e=>ve(e)?Gs(e):e,Mo=e=>ve(e)?lu(e):e;function Te(e){return e?e.__v_isRef===!0:!1}function Cn(e){return uu(e,!1)}function cu(e){return uu(e,!0)}function uu(e,t){return Te(e)?e:new Ym(e,t)}class Ym{constructor(t,n){this.dep=new Do,this.__v_isRef=!0,this.__v_isShallow=!1,this._rawValue=n?t:fe(t),this._value=n?t:ke(t),this.__v_isShallow=n}get value(){return this.dep.track(),this._value}set value(t){const n=this._rawValue,s=this.__v_isShallow||ut(t)||$n(t);t=s?t:fe(t),nn(t,n)&&(this._rawValue=t,this._value=s?t:ke(t),this.dep.trigger())}}function vt(e){return Te(e)?e.value:e}const Gm={get:(e,t,n)=>t==="__v_raw"?e:vt(Reflect.get(e,t,n)),set:(e,t,n,s)=>{const r=e[t];return Te(r)&&!Te(n)?(r.value=n,!0):Reflect.set(e,t,n,s)}};function fu(e){return tn(e)?e:new Proxy(e,Gm)}function qm(e){const t=ne(e)?new Array(e.length):{};for(const n in e)t[n]=du(e,n);return t}class zm{constructor(t,n,s){this._object=t,this._key=n,this._defaultValue=s,this.__v_isRef=!0,this._value=void 0}get value(){const t=this._object[this._key];return this._value=t===void 0?this._defaultValue:t}set value(t){this._object[this._key]=t}get dep(){return Sm(fe(this._object),this._key)}}class Xm{constructor(t){this._getter=t,this.__v_isRef=!0,this.__v_isReadonly=!0,this._value=void 0}get value(){return this._value=this._getter()}}function zy(e,t,n){return Te(e)?e:ie(e)?new Xm(e):ve(e)&&arguments.length>1?du(e,t,n):Cn(e)}function du(e,t,n){const s=e[t];return Te(s)?s:new zm(e,t,n)}class Qm{constructor(t,n,s){this.fn=t,this.setter=n,this._value=void 0,this.dep=new Do(this),this.__v_isRef=!0,this.deps=void 0,this.depsTail=void 0,this.flags=16,this.globalVersion=ks-1,this.next=void 0,this.effect=this,this.__v_isReadonly=!n,this.isSSR=s}notify(){if(this.flags|=16,!(this.flags&8)&&Ee!==this)return zc(this,!0),!0}get value(){const t=this.dep.track();return Jc(this),t&&(t.version=this.dep.version),this._value}set value(t){this.setter&&this.setter(t)}}function Jm(e,t,n=!1){let s,r;return ie(e)?s=e:(s=e.get,r=e.set),new Qm(s,r,n)}const vr={},Ir=new WeakMap;let An;function Zm(e,t=!1,n=An){if(n){let s=Ir.get(n);s||Ir.set(n,s=[]),s.push(e)}}function e_(e,t,n=_e){const{immediate:s,deep:r,once:o,scheduler:a,augmentJob:l,call:c}=n,d=M=>r?M:ut(M)||r===!1||r===0?Vt(M,1):Vt(M);let f,h,p,E,x=!1,C=!1;if(Te(e)?(h=()=>e.value,x=ut(e)):tn(e)?(h=()=>d(e),x=!0):ne(e)?(C=!0,x=e.some(M=>tn(M)||ut(M)),h=()=>e.map(M=>{if(Te(M))return M.value;if(tn(M))return d(M);if(ie(M))return c?c(M,2):M()})):ie(e)?t?h=c?()=>c(e,2):e:h=()=>{if(p){ln();try{p()}finally{cn()}}const M=An;An=f;try{return c?c(e,3,[E]):e(E)}finally{An=M}}:h=xt,t&&r){const M=h,b=r===!0?1/0:r;h=()=>Vt(M(),b)}const D=Yc(),P=()=>{f.stop(),D&&Co(D.effects,f)};if(o&&t){const M=t;t=(...b)=>{M(...b),P()}}let V=C?new Array(e.length).fill(vr):vr;const k=M=>{if(!(!(f.flags&1)||!f.dirty&&!M))if(t){const b=f.run();if(r||x||(C?b.some((y,S)=>nn(y,V[S])):nn(b,V))){p&&p();const y=An;An=f;try{const S=[b,V===vr?void 0:C&&V[0]===vr?[]:V,E];c?c(t,3,S):t(...S),V=b}finally{An=y}}}else f.run()};return l&&l(k),f=new Gc(h),f.scheduler=a?()=>a(k,!1):k,E=M=>Zm(M,!1,f),p=f.onStop=()=>{const M=Ir.get(f);if(M){if(c)c(M,4);else for(const b of M)b();Ir.delete(f)}},t?s?k(!0):V=f.run():a?a(k.bind(null,!0),!0):f.run(),P.pause=f.pause.bind(f),P.resume=f.resume.bind(f),P.stop=P,P}function Vt(e,t=1/0,n){if(t<=0||!ve(e)||e.__v_skip||(n=n||new Set,n.has(e)))return e;if(n.add(e),t--,Te(e))Vt(e.value,t,n);else if(ne(e))for(let s=0;s{Vt(s,t,n)});else if(kc(e)){for(const s in e)Vt(e[s],t,n);for(const s of Object.getOwnPropertySymbols(e))Object.prototype.propertyIsEnumerable.call(e,s)&&Vt(e[s],t,n)}return e}/** +* @vue/runtime-core v3.5.11 +* (c) 2018-present Yuxi (Evan) You and Vue contributors +* @license MIT +**/function qs(e,t,n,s){try{return s?e(...s):e()}catch(r){hs(r,t,n)}}function yt(e,t,n,s){if(ie(e)){const r=qs(e,t,n,s);return r&&Pc(r)&&r.catch(o=>{hs(o,t,n)}),r}if(ne(e)){const r=[];for(let o=0;o>>1,r=Ge[s],o=Fs(r);o=Fs(n)?Ge.push(e):Ge.splice(n_(t),0,e),e.flags|=1,pu()}}function pu(){Pr||(Pr=hu.then(mu))}function Yi(e){ne(e)?Xn.push(...e):Xt&&e.id===-1?Xt.splice(Wn+1,0,e):e.flags&1||(Xn.push(e),e.flags|=1),pu()}function sl(e,t,n=wt+1){for(;nFs(n)-Fs(s));if(Xn.length=0,Xt){Xt.push(...t);return}for(Xt=t,Wn=0;Wne.id==null?e.flags&2?-1:1/0:e.id;function mu(e){try{for(wt=0;wt{s._d&&_l(-1);const o=Mr(t);let a;try{a=e(...r)}finally{Mr(o),s._d&&_l(1)}return a};return s._n=!0,s._c=!0,s._d=!0,s}function Xy(e,t){if(Ne===null)return e;const n=ri(Ne),s=e.dirs||(e.dirs=[]);for(let r=0;re.__isTeleport,Ds=e=>e&&(e.disabled||e.disabled===""),s_=e=>e&&(e.defer||e.defer===""),rl=e=>typeof SVGElement<"u"&&e instanceof SVGElement,il=e=>typeof MathMLElement=="function"&&e instanceof MathMLElement,Gi=(e,t)=>{const n=e&&e.to;return be(n)?t?t(n):null:n},r_={name:"Teleport",__isTeleport:!0,process(e,t,n,s,r,o,a,l,c,d){const{mc:f,pc:h,pbc:p,o:{insert:E,querySelector:x,createText:C,createComment:D}}=d,P=Ds(t.props);let{shapeFlag:V,children:k,dynamicChildren:M}=t;if(e==null){const b=t.el=C(""),y=t.anchor=C("");E(b,n,s),E(y,n,s);const S=(A,w)=>{V&16&&(r&&r.isCE&&(r.ce._teleportTarget=A),f(k,A,w,r,o,a,l,c))},T=()=>{const A=t.target=Gi(t.props,x),w=yu(A,t,C,E);A&&(a!=="svg"&&rl(A)?a="svg":a!=="mathml"&&il(A)&&(a="mathml"),P||(S(A,w),Sr(t)))};P&&(S(n,y),Sr(t)),s_(t.props)?Je(T,o):T()}else{t.el=e.el,t.targetStart=e.targetStart;const b=t.anchor=e.anchor,y=t.target=e.target,S=t.targetAnchor=e.targetAnchor,T=Ds(e.props),A=T?n:y,w=T?b:S;if(a==="svg"||rl(y)?a="svg":(a==="mathml"||il(y))&&(a="mathml"),M?(p(e.dynamicChildren,M,A,r,o,a,l),Uo(e,t,!0)):c||h(e,t,A,w,r,o,a,l,!1),P)T?t.props&&e.props&&t.props.to!==e.props.to&&(t.props.to=e.props.to):Er(t,n,b,d,1);else if((t.props&&t.props.to)!==(e.props&&e.props.to)){const j=t.target=Gi(t.props,x);j&&Er(t,j,null,d,0)}else T&&Er(t,y,S,d,1);Sr(t)}},remove(e,t,n,{um:s,o:{remove:r}},o){const{shapeFlag:a,children:l,anchor:c,targetStart:d,targetAnchor:f,target:h,props:p}=e;if(h&&(r(d),r(f)),o&&r(c),a&16){const E=o||!Ds(p);for(let x=0;x{e.isMounted=!0}),Nu(()=>{e.isUnmounting=!0}),e}const at=[Function,Array],Au={mode:String,appear:Boolean,persisted:Boolean,onBeforeEnter:at,onEnter:at,onAfterEnter:at,onEnterCancelled:at,onBeforeLeave:at,onLeave:at,onAfterLeave:at,onLeaveCancelled:at,onBeforeAppear:at,onAppear:at,onAfterAppear:at,onAppearCancelled:at},Tu=e=>{const t=e.subTree;return t.component?Tu(t.component):t},o_={name:"BaseTransition",props:Au,setup(e,{slots:t}){const n=Xs(),s=bu();return()=>{const r=t.default&&Vo(t.default(),!0);if(!r||!r.length)return;const o=wu(r),a=fe(e),{mode:l}=a;if(s.isLeaving)return Ni(o);const c=ol(o);if(!c)return Ni(o);let d=Hs(c,a,s,n,p=>d=p);c.type!==Ie&&Dn(c,d);const f=n.subTree,h=f&&ol(f);if(h&&h.type!==Ie&&!St(c,h)&&Tu(n).type!==Ie){const p=Hs(h,a,s,n);if(Dn(h,p),l==="out-in"&&c.type!==Ie)return s.isLeaving=!0,p.afterLeave=()=>{s.isLeaving=!1,n.job.flags&8||n.update(),delete p.afterLeave},Ni(o);l==="in-out"&&c.type!==Ie&&(p.delayLeave=(E,x,C)=>{const D=Cu(s,h);D[String(h.key)]=h,E[Qt]=()=>{x(),E[Qt]=void 0,delete d.delayedLeave},d.delayedLeave=C})}return o}}};function wu(e){let t=e[0];if(e.length>1){for(const n of e)if(n.type!==Ie){t=n;break}}return t}const a_=o_;function Cu(e,t){const{leavingVNodes:n}=e;let s=n.get(t.type);return s||(s=Object.create(null),n.set(t.type,s)),s}function Hs(e,t,n,s,r){const{appear:o,mode:a,persisted:l=!1,onBeforeEnter:c,onEnter:d,onAfterEnter:f,onEnterCancelled:h,onBeforeLeave:p,onLeave:E,onAfterLeave:x,onLeaveCancelled:C,onBeforeAppear:D,onAppear:P,onAfterAppear:V,onAppearCancelled:k}=t,M=String(e.key),b=Cu(n,e),y=(A,w)=>{A&&yt(A,s,9,w)},S=(A,w)=>{const j=w[1];y(A,w),ne(A)?A.every(B=>B.length<=1)&&j():A.length<=1&&j()},T={mode:a,persisted:l,beforeEnter(A){let w=c;if(!n.isMounted)if(o)w=D||c;else return;A[Qt]&&A[Qt](!0);const j=b[M];j&&St(e,j)&&j.el[Qt]&&j.el[Qt](),y(w,[A])},enter(A){let w=d,j=f,B=h;if(!n.isMounted)if(o)w=P||d,j=V||f,B=k||h;else return;let Q=!1;const oe=A[yr]=he=>{Q||(Q=!0,he?y(B,[A]):y(j,[A]),T.delayedLeave&&T.delayedLeave(),A[yr]=void 0)};w?S(w,[A,oe]):oe()},leave(A,w){const j=String(e.key);if(A[yr]&&A[yr](!0),n.isUnmounting)return w();y(p,[A]);let B=!1;const Q=A[Qt]=oe=>{B||(B=!0,w(),oe?y(C,[A]):y(x,[A]),A[Qt]=void 0,b[j]===e&&delete b[j])};b[j]=e,E?S(E,[A,Q]):Q()},clone(A){const w=Hs(A,t,n,s,r);return r&&r(w),w}};return T}function Ni(e){if(zs(e))return e=sn(e),e.children=null,e}function ol(e){if(!zs(e))return Eu(e.type)&&e.children?wu(e.children):e;const{shapeFlag:t,children:n}=e;if(n){if(t&16)return n[0];if(t&32&&ie(n.default))return n.default()}}function Dn(e,t){e.shapeFlag&6&&e.component?(e.transition=t,Dn(e.component.subTree,t)):e.shapeFlag&128?(e.ssContent.transition=t.clone(e.ssContent),e.ssFallback.transition=t.clone(e.ssFallback)):e.transition=t}function Vo(e,t=!1,n){let s=[],r=0;for(let o=0;o1)for(let o=0;on.value,set:o=>n.value=o})}return n}function qi(e,t,n,s,r=!1){if(ne(e)){e.forEach((x,C)=>qi(x,t&&(ne(t)?t[C]:t),n,s,r));return}if(Qn(s)&&!r)return;const o=s.shapeFlag&4?ri(s.component):s.el,a=r?null:o,{i:l,r:c}=e,d=t&&t.r,f=l.refs===_e?l.refs={}:l.refs,h=l.setupState,p=fe(h),E=h===_e?()=>!1:x=>pe(p,x);if(d!=null&&d!==c&&(be(d)?(f[d]=null,E(d)&&(h[d]=null)):Te(d)&&(d.value=null)),ie(c))qs(c,l,12,[a,f]);else{const x=be(c),C=Te(c);if(x||C){const D=()=>{if(e.f){const P=x?E(c)?h[c]:f[c]:c.value;r?ne(P)&&Co(P,o):ne(P)?P.includes(o)||P.push(o):x?(f[c]=[o],E(c)&&(h[c]=f[c])):(c.value=[o],e.k&&(f[e.k]=c.value))}else x?(f[c]=a,E(c)&&(h[c]=a)):C&&(c.value=a,e.k&&(f[e.k]=a))};a?(D.id=-1,Je(D,n)):D()}}}const al=e=>e.nodeType===8;function l_(e,t){if(al(e)&&e.data==="["){let n=1,s=e.nextSibling;for(;s;){if(s.nodeType===1){if(t(s)===!1)break}else if(al(s))if(s.data==="]"){if(--n===0)break}else s.data==="["&&n++;s=s.nextSibling}}else t(e)}const Qn=e=>!!e.type.__asyncLoader;/*! #__NO_SIDE_EFFECTS__ */function Zy(e){ie(e)&&(e={loader:e});const{loader:t,loadingComponent:n,errorComponent:s,delay:r=200,hydrate:o,timeout:a,suspensible:l=!0,onError:c}=e;let d=null,f,h=0;const p=()=>(h++,d=null,E()),E=()=>{let x;return d||(x=d=t().catch(C=>{if(C=C instanceof Error?C:new Error(String(C)),c)return new Promise((D,P)=>{c(C,()=>D(p()),()=>P(C),h+1)});throw C}).then(C=>x!==d&&d?d:(C&&(C.__esModule||C[Symbol.toStringTag]==="Module")&&(C=C.default),f=C,C)))};return Fo({name:"AsyncComponentWrapper",__asyncLoader:E,__asyncHydrate(x,C,D){const P=o?()=>{const V=o(D,k=>l_(x,k));V&&(C.bum||(C.bum=[])).push(V)}:D;f?P():E().then(()=>!C.isUnmounted&&P())},get __asyncResolved(){return f},setup(){const x=xe;if(Ho(x),f)return()=>$i(f,x);const C=k=>{d=null,hs(k,x,13,!s)};if(l&&x.suspense||Js)return E().then(k=>()=>$i(k,x)).catch(k=>(C(k),()=>s?ye(s,{error:k}):null));const D=Cn(!1),P=Cn(),V=Cn(!!r);return r&&setTimeout(()=>{V.value=!1},r),a!=null&&setTimeout(()=>{if(!D.value&&!P.value){const k=new Error(`Async component timed out after ${a}ms.`);C(k),P.value=k}},a),E().then(()=>{D.value=!0,x.parent&&zs(x.parent.vnode)&&x.parent.update()}).catch(k=>{C(k),P.value=k}),()=>{if(D.value&&f)return $i(f,x);if(P.value&&s)return ye(s,{error:P.value});if(n&&!V.value)return ye(n)}}})}function $i(e,t){const{ref:n,props:s,children:r,ce:o}=t.vnode,a=ye(e,s,r);return a.ref=n,a.ce=o,delete t.vnode.ce,a}const zs=e=>e.type.__isKeepAlive;function c_(e,t){Su(e,"a",t)}function u_(e,t){Su(e,"da",t)}function Su(e,t,n=xe){const s=e.__wdc||(e.__wdc=()=>{let r=n;for(;r;){if(r.isDeactivated)return;r=r.parent}return e()});if(ti(t,s,n),n){let r=n.parent;for(;r&&r.parent;)zs(r.parent.vnode)&&f_(s,t,n,r),r=r.parent}}function f_(e,t,n,s){const r=ti(t,e,s,!0);jo(()=>{Co(s[t],r)},n)}function ti(e,t,n=xe,s=!1){if(n){const r=n[e]||(n[e]=[]),o=t.__weh||(t.__weh=(...a)=>{ln();const l=Qs(n),c=yt(t,n,e,a);return l(),cn(),c});return s?r.unshift(o):r.push(o),o}}const jt=e=>(t,n=xe)=>{(!Js||e==="sp")&&ti(e,(...s)=>t(...s),n)},Ou=jt("bm"),Bo=jt("m"),d_=jt("bu"),xu=jt("u"),Nu=jt("bum"),jo=jt("um"),h_=jt("sp"),p_=jt("rtg"),g_=jt("rtc");function m_(e,t=xe){ti("ec",e,t)}const $u="components";function __(e,t){return Lu($u,e,!0,t)||e}const Du=Symbol.for("v-ndc");function v_(e){return be(e)?Lu($u,e,!1)||e:e||Du}function Lu(e,t,n=!0,s=!1){const r=Ne||xe;if(r){const o=r.type;{const l=hv(o,!1);if(l&&(l===t||l===ht(t)||l===qr(ht(t))))return o}const a=ll(r[e]||o[e],t)||ll(r.appContext[e],t);return!a&&s?o:a}}function ll(e,t){return e&&(e[t]||e[ht(t)]||e[qr(ht(t))])}function eb(e,t,n,s){let r;const o=n,a=ne(e);if(a||be(e)){const l=a&&tn(e);let c=!1;l&&(c=!ut(e),e=Qr(e)),r=new Array(e.length);for(let d=0,f=e.length;dt(l,c,void 0,o));else{const l=Object.keys(e);r=new Array(l.length);for(let c=0,d=l.length;c{const o=s.fn(...r);return o&&(o.key=s.key),o}:s.fn)}return e}function nb(e,t,n={},s,r){if(Ne.ce||Ne.parent&&Qn(Ne.parent)&&Ne.parent.ce)return t!=="default"&&(n.name=t),Ct(),js(Ve,null,[ye("slot",n,s)],64);let o=e[t];o&&o._c&&(o._d=!1),Ct();const a=o&&Ru(o(n)),l=js(Ve,{key:(n.key||a&&a.key||`_${t}`)+(!a&&s?"_fb":"")},a||[],a&&e._===1?64:-2);return l.scopeId&&(l.slotScopeIds=[l.scopeId+"-s"]),o&&o._c&&(o._d=!0),l}function Ru(e){return e.some(t=>os(t)?!(t.type===Ie||t.type===Ve&&!Ru(t.children)):!0)?e:null}const zi=e=>e?ef(e)?ri(e):zi(e.parent):null,Ls=Oe(Object.create(null),{$:e=>e,$el:e=>e.vnode.el,$data:e=>e.data,$props:e=>e.props,$attrs:e=>e.attrs,$slots:e=>e.slots,$refs:e=>e.refs,$parent:e=>zi(e.parent),$root:e=>zi(e.root),$host:e=>e.ce,$emit:e=>e.emit,$options:e=>Ko(e),$forceUpdate:e=>e.f||(e.f=()=>{ko(e.update)}),$nextTick:e=>e.n||(e.n=ei.bind(e.proxy)),$watch:e=>B_.bind(e)}),Di=(e,t)=>e!==_e&&!e.__isScriptSetup&&pe(e,t),E_={get({_:e},t){if(t==="__v_skip")return!0;const{ctx:n,setupState:s,data:r,props:o,accessCache:a,type:l,appContext:c}=e;let d;if(t[0]!=="$"){const E=a[t];if(E!==void 0)switch(E){case 1:return s[t];case 2:return r[t];case 4:return n[t];case 3:return o[t]}else{if(Di(s,t))return a[t]=1,s[t];if(r!==_e&&pe(r,t))return a[t]=2,r[t];if((d=e.propsOptions[0])&&pe(d,t))return a[t]=3,o[t];if(n!==_e&&pe(n,t))return a[t]=4,n[t];Xi&&(a[t]=0)}}const f=Ls[t];let h,p;if(f)return t==="$attrs"&&Fe(e.attrs,"get",""),f(e);if((h=l.__cssModules)&&(h=h[t]))return h;if(n!==_e&&pe(n,t))return a[t]=4,n[t];if(p=c.config.globalProperties,pe(p,t))return p[t]},set({_:e},t,n){const{data:s,setupState:r,ctx:o}=e;return Di(r,t)?(r[t]=n,!0):s!==_e&&pe(s,t)?(s[t]=n,!0):pe(e.props,t)||t[0]==="$"&&t.slice(1)in e?!1:(o[t]=n,!0)},has({_:{data:e,setupState:t,accessCache:n,ctx:s,appContext:r,propsOptions:o}},a){let l;return!!n[a]||e!==_e&&pe(e,a)||Di(t,a)||(l=o[0])&&pe(l,a)||pe(s,a)||pe(Ls,a)||pe(r.config.globalProperties,a)},defineProperty(e,t,n){return n.get!=null?e._.accessCache[t]=0:pe(n,"value")&&this.set(e,t,n.value,null),Reflect.defineProperty(e,t,n)}};function sb(){return Iu().slots}function rb(){return Iu().attrs}function Iu(){const e=Xs();return e.setupContext||(e.setupContext=nf(e))}function cl(e){return ne(e)?e.reduce((t,n)=>(t[n]=null,t),{}):e}let Xi=!0;function y_(e){const t=Ko(e),n=e.proxy,s=e.ctx;Xi=!1,t.beforeCreate&&ul(t.beforeCreate,e,"bc");const{data:r,computed:o,methods:a,watch:l,provide:c,inject:d,created:f,beforeMount:h,mounted:p,beforeUpdate:E,updated:x,activated:C,deactivated:D,beforeDestroy:P,beforeUnmount:V,destroyed:k,unmounted:M,render:b,renderTracked:y,renderTriggered:S,errorCaptured:T,serverPrefetch:A,expose:w,inheritAttrs:j,components:B,directives:Q,filters:oe}=t;if(d&&b_(d,s,null),a)for(const Z in a){const ce=a[Z];ie(ce)&&(s[Z]=ce.bind(n))}if(r){const Z=r.call(n,n);ve(Z)&&(e.data=Gs(Z))}if(Xi=!0,o)for(const Z in o){const ce=o[Z],Ce=ie(ce)?ce.bind(n,n):ie(ce.get)?ce.get.bind(n,n):xt,He=!ie(ce)&&ie(ce.set)?ce.set.bind(n):xt,De=lt({get:Ce,set:He});Object.defineProperty(s,Z,{enumerable:!0,configurable:!0,get:()=>De.value,set:Ae=>De.value=Ae})}if(l)for(const Z in l)Pu(l[Z],s,n,Z);if(c){const Z=ie(c)?c.call(n):c;Reflect.ownKeys(Z).forEach(ce=>{Or(ce,Z[ce])})}f&&ul(f,e,"c");function te(Z,ce){ne(ce)?ce.forEach(Ce=>Z(Ce.bind(n))):ce&&Z(ce.bind(n))}if(te(Ou,h),te(Bo,p),te(d_,E),te(xu,x),te(c_,C),te(u_,D),te(m_,T),te(g_,y),te(p_,S),te(Nu,V),te(jo,M),te(h_,A),ne(w))if(w.length){const Z=e.exposed||(e.exposed={});w.forEach(ce=>{Object.defineProperty(Z,ce,{get:()=>n[ce],set:Ce=>n[ce]=Ce})})}else e.exposed||(e.exposed={});b&&e.render===xt&&(e.render=b),j!=null&&(e.inheritAttrs=j),B&&(e.components=B),Q&&(e.directives=Q),A&&Ho(e)}function b_(e,t,n=xt){ne(e)&&(e=Qi(e));for(const s in e){const r=e[s];let o;ve(r)?"default"in r?o=ft(r.from||s,r.default,!0):o=ft(r.from||s):o=ft(r),Te(o)?Object.defineProperty(t,s,{enumerable:!0,configurable:!0,get:()=>o.value,set:a=>o.value=a}):t[s]=o}}function ul(e,t,n){yt(ne(e)?e.map(s=>s.bind(t.proxy)):e.bind(t.proxy),t,n)}function Pu(e,t,n,s){let r=s.includes(".")?Gu(n,s):()=>n[s];if(be(e)){const o=t[e];ie(o)&&Jn(r,o)}else if(ie(e))Jn(r,e.bind(n));else if(ve(e))if(ne(e))e.forEach(o=>Pu(o,t,n,s));else{const o=ie(e.handler)?e.handler.bind(n):t[e.handler];ie(o)&&Jn(r,o,e)}}function Ko(e){const t=e.type,{mixins:n,extends:s}=t,{mixins:r,optionsCache:o,config:{optionMergeStrategies:a}}=e.appContext,l=o.get(t);let c;return l?c=l:!r.length&&!n&&!s?c=t:(c={},r.length&&r.forEach(d=>kr(c,d,a,!0)),kr(c,t,a)),ve(t)&&o.set(t,c),c}function kr(e,t,n,s=!1){const{mixins:r,extends:o}=t;o&&kr(e,o,n,!0),r&&r.forEach(a=>kr(e,a,n,!0));for(const a in t)if(!(s&&a==="expose")){const l=A_[a]||n&&n[a];e[a]=l?l(e[a],t[a]):t[a]}return e}const A_={data:fl,props:dl,emits:dl,methods:Cs,computed:Cs,beforeCreate:Ue,created:Ue,beforeMount:Ue,mounted:Ue,beforeUpdate:Ue,updated:Ue,beforeDestroy:Ue,beforeUnmount:Ue,destroyed:Ue,unmounted:Ue,activated:Ue,deactivated:Ue,errorCaptured:Ue,serverPrefetch:Ue,components:Cs,directives:Cs,watch:w_,provide:fl,inject:T_};function fl(e,t){return t?e?function(){return Oe(ie(e)?e.call(this,this):e,ie(t)?t.call(this,this):t)}:t:e}function T_(e,t){return Cs(Qi(e),Qi(t))}function Qi(e){if(ne(e)){const t={};for(let n=0;n1)return n&&ie(t)?t.call(s&&s.proxy):t}}function O_(){return!!(xe||Ne||Sn)}const ku={},Vu=()=>Object.create(ku),Fu=e=>Object.getPrototypeOf(e)===ku;function x_(e,t,n,s=!1){const r={},o=Vu();e.propsDefaults=Object.create(null),Hu(e,t,r,o);for(const a in e.propsOptions[0])a in r||(r[a]=void 0);n?e.props=s?r:au(r):e.type.props?e.props=r:e.props=o,e.attrs=o}function N_(e,t,n,s){const{props:r,attrs:o,vnode:{patchFlag:a}}=e,l=fe(r),[c]=e.propsOptions;let d=!1;if((s||a>0)&&!(a&16)){if(a&8){const f=e.vnode.dynamicProps;for(let h=0;h{c=!0;const[p,E]=Bu(h,t,!0);Oe(a,p),E&&l.push(...E)};!n&&t.mixins.length&&t.mixins.forEach(f),e.extends&&f(e.extends),e.mixins&&e.mixins.forEach(f)}if(!o&&!c)return ve(e)&&s.set(e,qn),qn;if(ne(o))for(let f=0;fe[0]==="_"||e==="$stable",Wo=e=>ne(e)?e.map(_t):[_t(e)],D_=(e,t,n)=>{if(t._n)return t;const s=Un((...r)=>Wo(t(...r)),n);return s._c=!1,s},Ku=(e,t,n)=>{const s=e._ctx;for(const r in e){if(ju(r))continue;const o=e[r];if(ie(o))t[r]=D_(r,o,s);else if(o!=null){const a=Wo(o);t[r]=()=>a}}},Wu=(e,t)=>{const n=Wo(t);e.slots.default=()=>n},Uu=(e,t,n)=>{for(const s in t)(n||s!=="_")&&(e[s]=t[s])},L_=(e,t,n)=>{const s=e.slots=Vu();if(e.vnode.shapeFlag&32){const r=t._;r?(Uu(s,t,n),n&&Vc(s,"_",r,!0)):Ku(t,s)}else t&&Wu(e,t)},R_=(e,t,n)=>{const{vnode:s,slots:r}=e;let o=!0,a=_e;if(s.shapeFlag&32){const l=t._;l?n&&l===1?o=!1:Uu(r,t,n):(o=!t.$stable,Ku(t,r)),a=t}else t&&(Wu(e,t),a={default:1});if(o)for(const l in r)!ju(l)&&a[l]==null&&delete r[l]},Je=ev;function I_(e){return P_(e)}function P_(e,t){const n=Hc();n.__VUE__=!0;const{insert:s,remove:r,patchProp:o,createElement:a,createText:l,createComment:c,setText:d,setElementText:f,parentNode:h,nextSibling:p,setScopeId:E=xt,insertStaticContent:x}=e,C=(g,_,O,H=null,L=null,F=null,G=void 0,N=null,W=!!_.dynamicChildren)=>{if(g===_)return;g&&!St(g,_)&&(H=R(g),Ae(g,L,F,!0),g=null),_.patchFlag===-2&&(W=!1,_.dynamicChildren=null);const{type:K,ref:se,shapeFlag:X}=_;switch(K){case si:D(g,_,O,H);break;case Ie:P(g,_,O,H);break;case xr:g==null&&V(_,O,H,G);break;case Ve:B(g,_,O,H,L,F,G,N,W);break;default:X&1?b(g,_,O,H,L,F,G,N,W):X&6?Q(g,_,O,H,L,F,G,N,W):(X&64||X&128)&&K.process(g,_,O,H,L,F,G,N,W,J)}se!=null&&L&&qi(se,g&&g.ref,F,_||g,!_)},D=(g,_,O,H)=>{if(g==null)s(_.el=l(_.children),O,H);else{const L=_.el=g.el;_.children!==g.children&&d(L,_.children)}},P=(g,_,O,H)=>{g==null?s(_.el=c(_.children||""),O,H):_.el=g.el},V=(g,_,O,H)=>{[g.el,g.anchor]=x(g.children,_,O,H,g.el,g.anchor)},k=({el:g,anchor:_},O,H)=>{let L;for(;g&&g!==_;)L=p(g),s(g,O,H),g=L;s(_,O,H)},M=({el:g,anchor:_})=>{let O;for(;g&&g!==_;)O=p(g),r(g),g=O;r(_)},b=(g,_,O,H,L,F,G,N,W)=>{_.type==="svg"?G="svg":_.type==="math"&&(G="mathml"),g==null?y(_,O,H,L,F,G,N,W):A(g,_,L,F,G,N,W)},y=(g,_,O,H,L,F,G,N)=>{let W,K;const{props:se,shapeFlag:X,transition:ee,dirs:re}=g;if(W=g.el=a(g.type,F,se&&se.is,se),X&8?f(W,g.children):X&16&&T(g.children,W,null,H,L,Li(g,F),G,N),re&&En(g,null,H,"created"),S(W,g,g.scopeId,G,H),se){for(const de in se)de!=="value"&&!xs(de)&&o(W,de,null,se[de],F,H);"value"in se&&o(W,"value",null,se.value,F),(K=se.onVnodeBeforeMount)&&Tt(K,H,g)}re&&En(g,null,H,"beforeMount");const ae=M_(L,ee);ae&&ee.beforeEnter(W),s(W,_,O),((K=se&&se.onVnodeMounted)||ae||re)&&Je(()=>{K&&Tt(K,H,g),ae&&ee.enter(W),re&&En(g,null,H,"mounted")},L)},S=(g,_,O,H,L)=>{if(O&&E(g,O),H)for(let F=0;F{for(let K=W;K{const N=_.el=g.el;let{patchFlag:W,dynamicChildren:K,dirs:se}=_;W|=g.patchFlag&16;const X=g.props||_e,ee=_.props||_e;let re;if(O&&yn(O,!1),(re=ee.onVnodeBeforeUpdate)&&Tt(re,O,_,g),se&&En(_,g,O,"beforeUpdate"),O&&yn(O,!0),(X.innerHTML&&ee.innerHTML==null||X.textContent&&ee.textContent==null)&&f(N,""),K?w(g.dynamicChildren,K,N,O,H,Li(_,L),F):G||ce(g,_,N,null,O,H,Li(_,L),F,!1),W>0){if(W&16)j(N,X,ee,O,L);else if(W&2&&X.class!==ee.class&&o(N,"class",null,ee.class,L),W&4&&o(N,"style",X.style,ee.style,L),W&8){const ae=_.dynamicProps;for(let de=0;de{re&&Tt(re,O,_,g),se&&En(_,g,O,"updated")},H)},w=(g,_,O,H,L,F,G)=>{for(let N=0;N<_.length;N++){const W=g[N],K=_[N],se=W.el&&(W.type===Ve||!St(W,K)||W.shapeFlag&70)?h(W.el):O;C(W,K,se,null,H,L,F,G,!0)}},j=(g,_,O,H,L)=>{if(_!==O){if(_!==_e)for(const F in _)!xs(F)&&!(F in O)&&o(g,F,_[F],null,L,H);for(const F in O){if(xs(F))continue;const G=O[F],N=_[F];G!==N&&F!=="value"&&o(g,F,N,G,L,H)}"value"in O&&o(g,"value",_.value,O.value,L)}},B=(g,_,O,H,L,F,G,N,W)=>{const K=_.el=g?g.el:l(""),se=_.anchor=g?g.anchor:l("");let{patchFlag:X,dynamicChildren:ee,slotScopeIds:re}=_;re&&(N=N?N.concat(re):re),g==null?(s(K,O,H),s(se,O,H),T(_.children||[],O,se,L,F,G,N,W)):X>0&&X&64&&ee&&g.dynamicChildren?(w(g.dynamicChildren,ee,O,L,F,G,N),(_.key!=null||L&&_===L.subTree)&&Uo(g,_,!0)):ce(g,_,O,se,L,F,G,N,W)},Q=(g,_,O,H,L,F,G,N,W)=>{_.slotScopeIds=N,g==null?_.shapeFlag&512?L.ctx.activate(_,O,H,G,W):oe(_,O,H,L,F,G,W):he(g,_,W)},oe=(g,_,O,H,L,F,G)=>{const N=g.component=cv(g,H,L);if(zs(g)&&(N.ctx.renderer=J),uv(N,!1,G),N.asyncDep){if(L&&L.registerDep(N,te,G),!g.el){const W=N.subTree=ye(Ie);P(null,W,_,O)}}else te(N,g,_,O,L,F,G)},he=(g,_,O)=>{const H=_.component=g.component;if(G_(g,_,O))if(H.asyncDep&&!H.asyncResolved){Z(H,_,O);return}else H.next=_,H.update();else _.el=g.el,H.vnode=_},te=(g,_,O,H,L,F,G)=>{const N=()=>{if(g.isMounted){let{next:X,bu:ee,u:re,parent:ae,vnode:de}=g;{const Ke=Yu(g);if(Ke){X&&(X.el=de.el,Z(g,X,G)),Ke.asyncDep.then(()=>{g.isUnmounted||N()});return}}let ue=X,je;yn(g,!1),X?(X.el=de.el,Z(g,X,G)):X=de,ee&&Cr(ee),(je=X.props&&X.props.onVnodeBeforeUpdate)&&Tt(je,ae,X,de),yn(g,!0);const Le=Ri(g),tt=g.subTree;g.subTree=Le,C(tt,Le,h(tt.el),R(tt),g,L,F),X.el=Le.el,ue===null&&Go(g,Le.el),re&&Je(re,L),(je=X.props&&X.props.onVnodeUpdated)&&Je(()=>Tt(je,ae,X,de),L)}else{let X;const{el:ee,props:re}=_,{bm:ae,m:de,parent:ue,root:je,type:Le}=g,tt=Qn(_);if(yn(g,!1),ae&&Cr(ae),!tt&&(X=re&&re.onVnodeBeforeMount)&&Tt(X,ue,_),yn(g,!0),ee&&ge){const Ke=()=>{g.subTree=Ri(g),ge(ee,g.subTree,g,L,null)};tt&&Le.__asyncHydrate?Le.__asyncHydrate(ee,g,Ke):Ke()}else{je.ce&&je.ce._injectChildStyle(Le);const Ke=g.subTree=Ri(g);C(null,Ke,O,H,g,L,F),_.el=Ke.el}if(de&&Je(de,L),!tt&&(X=re&&re.onVnodeMounted)){const Ke=_;Je(()=>Tt(X,ue,Ke),L)}(_.shapeFlag&256||ue&&Qn(ue.vnode)&&ue.vnode.shapeFlag&256)&&g.a&&Je(g.a,L),g.isMounted=!0,_=O=H=null}};g.scope.on();const W=g.effect=new Gc(N);g.scope.off();const K=g.update=W.run.bind(W),se=g.job=W.runIfDirty.bind(W);se.i=g,se.id=g.uid,W.scheduler=()=>ko(se),yn(g,!0),K()},Z=(g,_,O)=>{_.component=g;const H=g.vnode.props;g.vnode=_,g.next=null,N_(g,_.props,H,O),R_(g,_.children,O),ln(),sl(g),cn()},ce=(g,_,O,H,L,F,G,N,W=!1)=>{const K=g&&g.children,se=g?g.shapeFlag:0,X=_.children,{patchFlag:ee,shapeFlag:re}=_;if(ee>0){if(ee&128){He(K,X,O,H,L,F,G,N,W);return}else if(ee&256){Ce(K,X,O,H,L,F,G,N,W);return}}re&8?(se&16&&we(K,L,F),X!==K&&f(O,X)):se&16?re&16?He(K,X,O,H,L,F,G,N,W):we(K,L,F,!0):(se&8&&f(O,""),re&16&&T(X,O,H,L,F,G,N,W))},Ce=(g,_,O,H,L,F,G,N,W)=>{g=g||qn,_=_||qn;const K=g.length,se=_.length,X=Math.min(K,se);let ee;for(ee=0;eese?we(g,L,F,!0,!1,X):T(_,O,H,L,F,G,N,W,X)},He=(g,_,O,H,L,F,G,N,W)=>{let K=0;const se=_.length;let X=g.length-1,ee=se-1;for(;K<=X&&K<=ee;){const re=g[K],ae=_[K]=W?Jt(_[K]):_t(_[K]);if(St(re,ae))C(re,ae,O,null,L,F,G,N,W);else break;K++}for(;K<=X&&K<=ee;){const re=g[X],ae=_[ee]=W?Jt(_[ee]):_t(_[ee]);if(St(re,ae))C(re,ae,O,null,L,F,G,N,W);else break;X--,ee--}if(K>X){if(K<=ee){const re=ee+1,ae=reee)for(;K<=X;)Ae(g[K],L,F,!0),K++;else{const re=K,ae=K,de=new Map;for(K=ae;K<=ee;K++){const We=_[K]=W?Jt(_[K]):_t(_[K]);We.key!=null&&de.set(We.key,K)}let ue,je=0;const Le=ee-ae+1;let tt=!1,Ke=0;const fn=new Array(Le);for(K=0;K=Le){Ae(We,L,F,!0);continue}let Me;if(We.key!=null)Me=de.get(We.key);else for(ue=ae;ue<=ee;ue++)if(fn[ue-ae]===0&&St(We,_[ue])){Me=ue;break}Me===void 0?Ae(We,L,F,!0):(fn[Me-ae]=K+1,Me>=Ke?Ke=Me:tt=!0,C(We,_[Me],O,null,L,F,G,N,W),je++)}const gs=tt?k_(fn):qn;for(ue=gs.length-1,K=Le-1;K>=0;K--){const We=ae+K,Me=_[We],Zs=We+1{const{el:F,type:G,transition:N,children:W,shapeFlag:K}=g;if(K&6){De(g.component.subTree,_,O,H);return}if(K&128){g.suspense.move(_,O,H);return}if(K&64){G.move(g,_,O,J);return}if(G===Ve){s(F,_,O);for(let X=0;XN.enter(F),L);else{const{leave:X,delayLeave:ee,afterLeave:re}=N,ae=()=>s(F,_,O),de=()=>{X(F,()=>{ae(),re&&re()})};ee?ee(F,ae,de):de()}else s(F,_,O)},Ae=(g,_,O,H=!1,L=!1)=>{const{type:F,props:G,ref:N,children:W,dynamicChildren:K,shapeFlag:se,patchFlag:X,dirs:ee,cacheIndex:re}=g;if(X===-2&&(L=!1),N!=null&&qi(N,null,O,g,!0),re!=null&&(_.renderCache[re]=void 0),se&256){_.ctx.deactivate(g);return}const ae=se&1&&ee,de=!Qn(g);let ue;if(de&&(ue=G&&G.onVnodeBeforeUnmount)&&Tt(ue,_,g),se&6)Pe(g.component,O,H);else{if(se&128){g.suspense.unmount(O,H);return}ae&&En(g,null,_,"beforeUnmount"),se&64?g.type.remove(g,_,O,J,H):K&&!K.hasOnce&&(F!==Ve||X>0&&X&64)?we(K,_,O,!1,!0):(F===Ve&&X&384||!L&&se&16)&&we(W,_,O),H&&et(g)}(de&&(ue=G&&G.onVnodeUnmounted)||ae)&&Je(()=>{ue&&Tt(ue,_,g),ae&&En(g,null,_,"unmounted")},O)},et=g=>{const{type:_,el:O,anchor:H,transition:L}=g;if(_===Ve){Be(O,H);return}if(_===xr){M(g);return}const F=()=>{r(O),L&&!L.persisted&&L.afterLeave&&L.afterLeave()};if(g.shapeFlag&1&&L&&!L.persisted){const{leave:G,delayLeave:N}=L,W=()=>G(O,F);N?N(g.el,F,W):W()}else F()},Be=(g,_)=>{let O;for(;g!==_;)O=p(g),r(g),g=O;r(_)},Pe=(g,_,O)=>{const{bum:H,scope:L,job:F,subTree:G,um:N,m:W,a:K}=g;pl(W),pl(K),H&&Cr(H),L.stop(),F&&(F.flags|=8,Ae(G,g,_,O)),N&&Je(N,_),Je(()=>{g.isUnmounted=!0},_),_&&_.pendingBranch&&!_.isUnmounted&&g.asyncDep&&!g.asyncResolved&&g.suspenseId===_.pendingId&&(_.deps--,_.deps===0&&_.resolve())},we=(g,_,O,H=!1,L=!1,F=0)=>{for(let G=F;G{if(g.shapeFlag&6)return R(g.component.subTree);if(g.shapeFlag&128)return g.suspense.next();const _=p(g.anchor||g.el),O=_&&_[vu];return O?p(O):_};let q=!1;const z=(g,_,O)=>{g==null?_._vnode&&Ae(_._vnode,null,null,!0):C(_._vnode||null,g,_,null,null,null,O),_._vnode=g,q||(q=!0,sl(),gu(),q=!1)},J={p:C,um:Ae,m:De,r:et,mt:oe,mc:T,pc:ce,pbc:w,n:R,o:e};let $,ge;return{render:z,hydrate:$,createApp:S_(z,$)}}function Li({type:e,props:t},n){return n==="svg"&&e==="foreignObject"||n==="mathml"&&e==="annotation-xml"&&t&&t.encoding&&t.encoding.includes("html")?void 0:n}function yn({effect:e,job:t},n){n?(e.flags|=32,t.flags|=4):(e.flags&=-33,t.flags&=-5)}function M_(e,t){return(!e||e&&!e.pendingBranch)&&t&&!t.persisted}function Uo(e,t,n=!1){const s=e.children,r=t.children;if(ne(s)&&ne(r))for(let o=0;o>1,e[n[l]]0&&(t[s]=n[o-1]),n[o]=s)}}for(o=n.length,a=n[o-1];o-- >0;)n[o]=a,a=t[a];return n}function Yu(e){const t=e.subTree.component;if(t)return t.asyncDep&&!t.asyncResolved?t:Yu(t)}function pl(e){if(e)for(let t=0;tft(V_);function H_(e,t){return Yo(e,null,{flush:"post"})}function Jn(e,t,n){return Yo(e,t,n)}function Yo(e,t,n=_e){const{immediate:s,deep:r,flush:o,once:a}=n,l=Oe({},n);let c;if(Js)if(o==="sync"){const p=F_();c=p.__watcherHandles||(p.__watcherHandles=[])}else if(!t||s)l.once=!0;else{const p=()=>{};return p.stop=xt,p.resume=xt,p.pause=xt,p}const d=xe;l.call=(p,E,x)=>yt(p,d,E,x);let f=!1;o==="post"?l.scheduler=p=>{Je(p,d&&d.suspense)}:o!=="sync"&&(f=!0,l.scheduler=(p,E)=>{E?p():ko(p)}),l.augmentJob=p=>{t&&(p.flags|=4),f&&(p.flags|=2,d&&(p.id=d.uid,p.i=d))};const h=e_(e,t,l);return c&&c.push(h),h}function B_(e,t,n){const s=this.proxy,r=be(e)?e.includes(".")?Gu(s,e):()=>s[e]:e.bind(s,s);let o;ie(t)?o=t:(o=t.handler,n=t);const a=Qs(this),l=Yo(r,o.bind(s),n);return a(),l}function Gu(e,t){const n=t.split(".");return()=>{let s=e;for(let r=0;rt==="modelValue"||t==="model-value"?e.modelModifiers:e[`${t}Modifiers`]||e[`${ht(t)}Modifiers`]||e[`${an(t)}Modifiers`];function K_(e,t,...n){if(e.isUnmounted)return;const s=e.vnode.props||_e;let r=n;const o=t.startsWith("update:"),a=o&&j_(s,t.slice(7));a&&(a.trim&&(r=n.map(f=>be(f)?f.trim():f)),a.number&&(r=n.map(Lr)));let l,c=s[l=wi(t)]||s[l=wi(ht(t))];!c&&o&&(c=s[l=wi(an(t))]),c&&yt(c,e,6,r);const d=s[l+"Once"];if(d){if(!e.emitted)e.emitted={};else if(e.emitted[l])return;e.emitted[l]=!0,yt(d,e,6,r)}}function qu(e,t,n=!1){const s=t.emitsCache,r=s.get(e);if(r!==void 0)return r;const o=e.emits;let a={},l=!1;if(!ie(e)){const c=d=>{const f=qu(d,t,!0);f&&(l=!0,Oe(a,f))};!n&&t.mixins.length&&t.mixins.forEach(c),e.extends&&c(e.extends),e.mixins&&e.mixins.forEach(c)}return!o&&!l?(ve(e)&&s.set(e,null),null):(ne(o)?o.forEach(c=>a[c]=null):Oe(a,o),ve(e)&&s.set(e,a),a)}function ni(e,t){return!e||!Yr(t)?!1:(t=t.slice(2).replace(/Once$/,""),pe(e,t[0].toLowerCase()+t.slice(1))||pe(e,an(t))||pe(e,t))}function Ri(e){const{type:t,vnode:n,proxy:s,withProxy:r,propsOptions:[o],slots:a,attrs:l,emit:c,render:d,renderCache:f,props:h,data:p,setupState:E,ctx:x,inheritAttrs:C}=e,D=Mr(e);let P,V;try{if(n.shapeFlag&4){const M=r||s,b=M;P=_t(d.call(b,M,f,h,E,p,x)),V=l}else{const M=t;P=_t(M.length>1?M(h,{attrs:l,slots:a,emit:c}):M(h,null)),V=t.props?l:U_(l)}}catch(M){Rs.length=0,hs(M,e,1),P=ye(Ie)}let k=P;if(V&&C!==!1){const M=Object.keys(V),{shapeFlag:b}=k;M.length&&b&7&&(o&&M.some(wo)&&(V=Y_(V,o)),k=sn(k,V,!1,!0))}return n.dirs&&(k=sn(k,null,!1,!0),k.dirs=k.dirs?k.dirs.concat(n.dirs):n.dirs),n.transition&&Dn(k,n.transition),P=k,Mr(D),P}function W_(e,t=!0){let n;for(let s=0;s{let t;for(const n in e)(n==="class"||n==="style"||Yr(n))&&((t||(t={}))[n]=e[n]);return t},Y_=(e,t)=>{const n={};for(const s in e)(!wo(s)||!(s.slice(9)in t))&&(n[s]=e[s]);return n};function G_(e,t,n){const{props:s,children:r,component:o}=e,{props:a,children:l,patchFlag:c}=t,d=o.emitsOptions;if(t.dirs||t.transition)return!0;if(n&&c>=0){if(c&1024)return!0;if(c&16)return s?gl(s,a,d):!!a;if(c&8){const f=t.dynamicProps;for(let h=0;he.__isSuspense;let Zi=0;const q_={name:"Suspense",__isSuspense:!0,process(e,t,n,s,r,o,a,l,c,d){if(e==null)X_(t,n,s,r,o,a,l,c,d);else{if(o&&o.deps>0&&!e.suspense.isInFallback){t.suspense=e.suspense,t.suspense.vnode=t,t.el=e.el;return}Q_(e,t,n,s,r,a,l,c,d)}},hydrate:J_,normalize:Z_},z_=q_;function Bs(e,t){const n=e.props&&e.props[t];ie(n)&&n()}function X_(e,t,n,s,r,o,a,l,c){const{p:d,o:{createElement:f}}=c,h=f("div"),p=e.suspense=Xu(e,r,s,t,h,n,o,a,l,c);d(null,p.pendingBranch=e.ssContent,h,null,s,p,o,a),p.deps>0?(Bs(e,"onPending"),Bs(e,"onFallback"),d(null,e.ssFallback,t,n,s,null,o,a),Zn(p,e.ssFallback)):p.resolve(!1,!0)}function Q_(e,t,n,s,r,o,a,l,{p:c,um:d,o:{createElement:f}}){const h=t.suspense=e.suspense;h.vnode=t,t.el=e.el;const p=t.ssContent,E=t.ssFallback,{activeBranch:x,pendingBranch:C,isInFallback:D,isHydrating:P}=h;if(C)h.pendingBranch=p,St(p,C)?(c(C,p,h.hiddenContainer,null,r,h,o,a,l),h.deps<=0?h.resolve():D&&(P||(c(x,E,n,s,r,null,o,a,l),Zn(h,E)))):(h.pendingId=Zi++,P?(h.isHydrating=!1,h.activeBranch=C):d(C,r,h),h.deps=0,h.effects.length=0,h.hiddenContainer=f("div"),D?(c(null,p,h.hiddenContainer,null,r,h,o,a,l),h.deps<=0?h.resolve():(c(x,E,n,s,r,null,o,a,l),Zn(h,E))):x&&St(p,x)?(c(x,p,n,s,r,h,o,a,l),h.resolve(!0)):(c(null,p,h.hiddenContainer,null,r,h,o,a,l),h.deps<=0&&h.resolve()));else if(x&&St(p,x))c(x,p,n,s,r,h,o,a,l),Zn(h,p);else if(Bs(t,"onPending"),h.pendingBranch=p,p.shapeFlag&512?h.pendingId=p.component.suspenseId:h.pendingId=Zi++,c(null,p,h.hiddenContainer,null,r,h,o,a,l),h.deps<=0)h.resolve();else{const{timeout:V,pendingId:k}=h;V>0?setTimeout(()=>{h.pendingId===k&&h.fallback(E)},V):V===0&&h.fallback(E)}}function Xu(e,t,n,s,r,o,a,l,c,d,f=!1){const{p:h,m:p,um:E,n:x,o:{parentNode:C,remove:D}}=d;let P;const V=tv(e);V&&t&&t.pendingBranch&&(P=t.pendingId,t.deps++);const k=e.props?Fc(e.props.timeout):void 0,M=o,b={vnode:e,parent:t,parentComponent:n,namespace:a,container:s,hiddenContainer:r,deps:0,pendingId:Zi++,timeout:typeof k=="number"?k:-1,activeBranch:null,pendingBranch:null,isInFallback:!f,isHydrating:f,isUnmounted:!1,effects:[],resolve(y=!1,S=!1){const{vnode:T,activeBranch:A,pendingBranch:w,pendingId:j,effects:B,parentComponent:Q,container:oe}=b;let he=!1;b.isHydrating?b.isHydrating=!1:y||(he=A&&w.transition&&w.transition.mode==="out-in",he&&(A.transition.afterLeave=()=>{j===b.pendingId&&(p(w,oe,o===M?x(A):o,0),Yi(B))}),A&&(C(A.el)===oe&&(o=x(A)),E(A,Q,b,!0)),he||p(w,oe,o,0)),Zn(b,w),b.pendingBranch=null,b.isInFallback=!1;let te=b.parent,Z=!1;for(;te;){if(te.pendingBranch){te.effects.push(...B),Z=!0;break}te=te.parent}!Z&&!he&&Yi(B),b.effects=[],V&&t&&t.pendingBranch&&P===t.pendingId&&(t.deps--,t.deps===0&&!S&&t.resolve()),Bs(T,"onResolve")},fallback(y){if(!b.pendingBranch)return;const{vnode:S,activeBranch:T,parentComponent:A,container:w,namespace:j}=b;Bs(S,"onFallback");const B=x(T),Q=()=>{b.isInFallback&&(h(null,y,w,B,A,null,j,l,c),Zn(b,y))},oe=y.transition&&y.transition.mode==="out-in";oe&&(T.transition.afterLeave=Q),b.isInFallback=!0,E(T,A,null,!0),oe||Q()},move(y,S,T){b.activeBranch&&p(b.activeBranch,y,S,T),b.container=y},next(){return b.activeBranch&&x(b.activeBranch)},registerDep(y,S,T){const A=!!b.pendingBranch;A&&b.deps++;const w=y.vnode.el;y.asyncDep.catch(j=>{hs(j,y,0)}).then(j=>{if(y.isUnmounted||b.isUnmounted||b.pendingId!==y.suspenseId)return;y.asyncResolved=!0;const{vnode:B}=y;to(y,j,!1),w&&(B.el=w);const Q=!w&&y.subTree.el;S(y,B,C(w||y.subTree.el),w?null:x(y.subTree),b,a,T),Q&&D(Q),Go(y,B.el),A&&--b.deps===0&&b.resolve()})},unmount(y,S){b.isUnmounted=!0,b.activeBranch&&E(b.activeBranch,n,y,S),b.pendingBranch&&E(b.pendingBranch,n,y,S)}};return b}function J_(e,t,n,s,r,o,a,l,c){const d=t.suspense=Xu(t,s,n,e.parentNode,document.createElement("div"),null,r,o,a,l,!0),f=c(e,d.pendingBranch=t.ssContent,n,d,o,a);return d.deps===0&&d.resolve(!1,!0),f}function Z_(e){const{shapeFlag:t,children:n}=e,s=t&32;e.ssContent=ml(s?n.default:n),e.ssFallback=s?ml(n.fallback):ye(Ie)}function ml(e){let t;if(ie(e)){const n=is&&e._c;n&&(e._d=!1,Ct()),e=e(),n&&(e._d=!0,t=Ze,Qu())}return ne(e)&&(e=W_(e)),e=_t(e),t&&!e.dynamicChildren&&(e.dynamicChildren=t.filter(n=>n!==e)),e}function ev(e,t){t&&t.pendingBranch?ne(e)?t.effects.push(...e):t.effects.push(e):Yi(e)}function Zn(e,t){e.activeBranch=t;const{vnode:n,parentComponent:s}=e;let r=t.el;for(;!r&&t.component;)t=t.component.subTree,r=t.el;n.el=r,s&&s.subTree===n&&(s.vnode.el=r,Go(s,r))}function tv(e){const t=e.props&&e.props.suspensible;return t!=null&&t!==!1}const Ve=Symbol.for("v-fgt"),si=Symbol.for("v-txt"),Ie=Symbol.for("v-cmt"),xr=Symbol.for("v-stc"),Rs=[];let Ze=null;function Ct(e=!1){Rs.push(Ze=e?null:[])}function Qu(){Rs.pop(),Ze=Rs[Rs.length-1]||null}let is=1;function _l(e){is+=e,e<0&&Ze&&(Ze.hasOnce=!0)}function Ju(e){return e.dynamicChildren=is>0?Ze||qn:null,Qu(),is>0&&Ze&&Ze.push(e),e}function br(e,t,n,s,r,o){return Ju(Gn(e,t,n,s,r,o,!0))}function js(e,t,n,s,r){return Ju(ye(e,t,n,s,r,!0))}function os(e){return e?e.__v_isVNode===!0:!1}function St(e,t){return e.type===t.type&&e.key===t.key}const Zu=({key:e})=>e??null,Nr=({ref:e,ref_key:t,ref_for:n})=>(typeof e=="number"&&(e=""+e),e!=null?be(e)||Te(e)||ie(e)?{i:Ne,r:e,k:t,f:!!n}:e:null);function Gn(e,t=null,n=null,s=0,r=null,o=e===Ve?0:1,a=!1,l=!1){const c={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&Zu(t),ref:t&&Nr(t),scopeId:_u,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:o,patchFlag:s,dynamicProps:r,dynamicChildren:null,appContext:null,ctx:Ne};return l?(qo(c,n),o&128&&e.normalize(c)):n&&(c.shapeFlag|=be(n)?8:16),is>0&&!a&&Ze&&(c.patchFlag>0||o&6)&&c.patchFlag!==32&&Ze.push(c),c}const ye=nv;function nv(e,t=null,n=null,s=0,r=null,o=!1){if((!e||e===Du)&&(e=Ie),os(e)){const l=sn(e,t,!0);return n&&qo(l,n),is>0&&!o&&Ze&&(l.shapeFlag&6?Ze[Ze.indexOf(e)]=l:Ze.push(l)),l.patchFlag=-2,l}if(pv(e)&&(e=e.__vccOpts),t){t=sv(t);let{class:l,style:c}=t;l&&!be(l)&&(t.class=Xr(l)),ve(c)&&(Po(c)&&!ne(c)&&(c=Oe({},c)),t.style=zr(c))}const a=be(e)?1:zu(e)?128:Eu(e)?64:ve(e)?4:ie(e)?2:0;return Gn(e,t,n,s,r,a,o,!0)}function sv(e){return e?Po(e)||Fu(e)?Oe({},e):e:null}function sn(e,t,n=!1,s=!1){const{props:r,ref:o,patchFlag:a,children:l,transition:c}=e,d=t?ov(r||{},t):r,f={__v_isVNode:!0,__v_skip:!0,type:e.type,props:d,key:d&&Zu(d),ref:t&&t.ref?n&&o?ne(o)?o.concat(Nr(t)):[o,Nr(t)]:Nr(t):o,scopeId:e.scopeId,slotScopeIds:e.slotScopeIds,children:l,target:e.target,targetStart:e.targetStart,targetAnchor:e.targetAnchor,staticCount:e.staticCount,shapeFlag:e.shapeFlag,patchFlag:t&&e.type!==Ve?a===-1?16:a|16:a,dynamicProps:e.dynamicProps,dynamicChildren:e.dynamicChildren,appContext:e.appContext,dirs:e.dirs,transition:c,component:e.component,suspense:e.suspense,ssContent:e.ssContent&&sn(e.ssContent),ssFallback:e.ssFallback&&sn(e.ssFallback),el:e.el,anchor:e.anchor,ctx:e.ctx,ce:e.ce};return c&&s&&Dn(f,c.clone(f)),f}function rv(e=" ",t=0){return ye(si,null,e,t)}function iv(e="",t=!1){return t?(Ct(),js(Ie,null,e)):ye(Ie,null,e)}function _t(e){return e==null||typeof e=="boolean"?ye(Ie):ne(e)?ye(Ve,null,e.slice()):os(e)?Jt(e):ye(si,null,String(e))}function Jt(e){return e.el===null&&e.patchFlag!==-1||e.memo?e:sn(e)}function qo(e,t){let n=0;const{shapeFlag:s}=e;if(t==null)t=null;else if(ne(t))n=16;else if(typeof t=="object")if(s&65){const r=t.default;r&&(r._c&&(r._d=!1),qo(e,r()),r._c&&(r._d=!0));return}else{n=32;const r=t._;!r&&!Fu(t)?t._ctx=Ne:r===3&&Ne&&(Ne.slots._===1?t._=1:(t._=2,e.patchFlag|=1024))}else ie(t)?(t={default:t,_ctx:Ne},n=32):(t=String(t),s&64?(n=16,t=[rv(t)]):n=8);e.children=t,e.shapeFlag|=n}function ov(...e){const t={};for(let n=0;nxe||Ne;let Vr,eo;{const e=Hc(),t=(n,s)=>{let r;return(r=e[n])||(r=e[n]=[]),r.push(s),o=>{r.length>1?r.forEach(a=>a(o)):r[0](o)}};Vr=t("__VUE_INSTANCE_SETTERS__",n=>xe=n),eo=t("__VUE_SSR_SETTERS__",n=>Js=n)}const Qs=e=>{const t=xe;return Vr(e),e.scope.on(),()=>{e.scope.off(),Vr(t)}},vl=()=>{xe&&xe.scope.off(),Vr(null)};function ef(e){return e.vnode.shapeFlag&4}let Js=!1;function uv(e,t=!1,n=!1){t&&eo(t);const{props:s,children:r}=e.vnode,o=ef(e);x_(e,s,o,t),L_(e,r,n);const a=o?fv(e,t):void 0;return t&&eo(!1),a}function fv(e,t){const n=e.type;e.accessCache=Object.create(null),e.proxy=new Proxy(e.ctx,E_);const{setup:s}=n;if(s){const r=e.setupContext=s.length>1?nf(e):null,o=Qs(e);ln();const a=qs(s,e,0,[e.props,r]);if(cn(),o(),Pc(a)){if(Qn(e)||Ho(e),a.then(vl,vl),t)return a.then(l=>{to(e,l,t)}).catch(l=>{hs(l,e,0)});e.asyncDep=a}else to(e,a,t)}else tf(e,t)}function to(e,t,n){ie(t)?e.type.__ssrInlineRender?e.ssrRender=t:e.render=t:ve(t)&&(e.setupState=fu(t)),tf(e,n)}let El;function tf(e,t,n){const s=e.type;if(!e.render){if(!t&&El&&!s.render){const r=s.template||Ko(e).template;if(r){const{isCustomElement:o,compilerOptions:a}=e.appContext.config,{delimiters:l,compilerOptions:c}=s,d=Oe(Oe({isCustomElement:o,delimiters:l},a),c);s.render=El(r,d)}}e.render=s.render||xt}{const r=Qs(e);ln();try{y_(e)}finally{cn(),r()}}}const dv={get(e,t){return Fe(e,"get",""),e[t]}};function nf(e){const t=n=>{e.exposed=n||{}};return{attrs:new Proxy(e.attrs,dv),slots:e.slots,emit:e.emit,expose:t}}function ri(e){return e.exposed?e.exposeProxy||(e.exposeProxy=new Proxy(fu(Zr(e.exposed)),{get(t,n){if(n in t)return t[n];if(n in Ls)return Ls[n](e)},has(t,n){return n in t||n in Ls}})):e.proxy}function hv(e,t=!0){return ie(e)?e.displayName||e.name:e.name||t&&e.__name}function pv(e){return ie(e)&&"__vccOpts"in e}const lt=(e,t)=>Jm(e,t,Js);function zo(e,t,n){const s=arguments.length;return s===2?ve(t)&&!ne(t)?os(t)?ye(e,null,[t]):ye(e,t):ye(e,null,t):(s>3?n=Array.prototype.slice.call(arguments,2):s===3&&os(n)&&(n=[n]),ye(e,t,n))}const gv="3.5.11";/** +* @vue/runtime-dom v3.5.11 +* (c) 2018-present Yuxi (Evan) You and Vue contributors +* @license MIT +**/let no;const yl=typeof window<"u"&&window.trustedTypes;if(yl)try{no=yl.createPolicy("vue",{createHTML:e=>e})}catch{}const sf=no?e=>no.createHTML(e):e=>e,mv="http://www.w3.org/2000/svg",_v="http://www.w3.org/1998/Math/MathML",Mt=typeof document<"u"?document:null,bl=Mt&&Mt.createElement("template"),vv={insert:(e,t,n)=>{t.insertBefore(e,n||null)},remove:e=>{const t=e.parentNode;t&&t.removeChild(e)},createElement:(e,t,n,s)=>{const r=t==="svg"?Mt.createElementNS(mv,e):t==="mathml"?Mt.createElementNS(_v,e):n?Mt.createElement(e,{is:n}):Mt.createElement(e);return e==="select"&&s&&s.multiple!=null&&r.setAttribute("multiple",s.multiple),r},createText:e=>Mt.createTextNode(e),createComment:e=>Mt.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>Mt.querySelector(e),setScopeId(e,t){e.setAttribute(t,"")},insertStaticContent(e,t,n,s,r,o){const a=n?n.previousSibling:t.lastChild;if(r&&(r===o||r.nextSibling))for(;t.insertBefore(r.cloneNode(!0),n),!(r===o||!(r=r.nextSibling)););else{bl.innerHTML=sf(s==="svg"?`${e}`:s==="mathml"?`${e}`:e);const l=bl.content;if(s==="svg"||s==="mathml"){const c=l.firstChild;for(;c.firstChild;)l.appendChild(c.firstChild);l.removeChild(c)}t.insertBefore(l,n)}return[a?a.nextSibling:t.firstChild,n?n.previousSibling:t.lastChild]}},Yt="transition",As="animation",as=Symbol("_vtc"),rf={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},of=Oe({},Au,rf),Ev=e=>(e.displayName="Transition",e.props=of,e),Al=Ev((e,{slots:t})=>zo(a_,af(e),t)),bn=(e,t=[])=>{ne(e)?e.forEach(n=>n(...t)):e&&e(...t)},Tl=e=>e?ne(e)?e.some(t=>t.length>1):e.length>1:!1;function af(e){const t={};for(const B in e)B in rf||(t[B]=e[B]);if(e.css===!1)return t;const{name:n="v",type:s,duration:r,enterFromClass:o=`${n}-enter-from`,enterActiveClass:a=`${n}-enter-active`,enterToClass:l=`${n}-enter-to`,appearFromClass:c=o,appearActiveClass:d=a,appearToClass:f=l,leaveFromClass:h=`${n}-leave-from`,leaveActiveClass:p=`${n}-leave-active`,leaveToClass:E=`${n}-leave-to`}=e,x=yv(r),C=x&&x[0],D=x&&x[1],{onBeforeEnter:P,onEnter:V,onEnterCancelled:k,onLeave:M,onLeaveCancelled:b,onBeforeAppear:y=P,onAppear:S=V,onAppearCancelled:T=k}=t,A=(B,Q,oe)=>{qt(B,Q?f:l),qt(B,Q?d:a),oe&&oe()},w=(B,Q)=>{B._isLeaving=!1,qt(B,h),qt(B,E),qt(B,p),Q&&Q()},j=B=>(Q,oe)=>{const he=B?S:V,te=()=>A(Q,B,oe);bn(he,[Q,te]),wl(()=>{qt(Q,B?c:o),Pt(Q,B?f:l),Tl(he)||Cl(Q,s,C,te)})};return Oe(t,{onBeforeEnter(B){bn(P,[B]),Pt(B,o),Pt(B,a)},onBeforeAppear(B){bn(y,[B]),Pt(B,c),Pt(B,d)},onEnter:j(!1),onAppear:j(!0),onLeave(B,Q){B._isLeaving=!0;const oe=()=>w(B,Q);Pt(B,h),Pt(B,p),cf(),wl(()=>{B._isLeaving&&(qt(B,h),Pt(B,E),Tl(M)||Cl(B,s,D,oe))}),bn(M,[B,oe])},onEnterCancelled(B){A(B,!1),bn(k,[B])},onAppearCancelled(B){A(B,!0),bn(T,[B])},onLeaveCancelled(B){w(B),bn(b,[B])}})}function yv(e){if(e==null)return null;if(ve(e))return[Ii(e.enter),Ii(e.leave)];{const t=Ii(e);return[t,t]}}function Ii(e){return Fc(e)}function Pt(e,t){t.split(/\s+/).forEach(n=>n&&e.classList.add(n)),(e[as]||(e[as]=new Set)).add(t)}function qt(e,t){t.split(/\s+/).forEach(s=>s&&e.classList.remove(s));const n=e[as];n&&(n.delete(t),n.size||(e[as]=void 0))}function wl(e){requestAnimationFrame(()=>{requestAnimationFrame(e)})}let bv=0;function Cl(e,t,n,s){const r=e._endId=++bv,o=()=>{r===e._endId&&s()};if(n!=null)return setTimeout(o,n);const{type:a,timeout:l,propCount:c}=lf(e,t);if(!a)return s();const d=a+"end";let f=0;const h=()=>{e.removeEventListener(d,p),o()},p=E=>{E.target===e&&++f>=c&&h()};setTimeout(()=>{f(n[x]||"").split(", "),r=s(`${Yt}Delay`),o=s(`${Yt}Duration`),a=Sl(r,o),l=s(`${As}Delay`),c=s(`${As}Duration`),d=Sl(l,c);let f=null,h=0,p=0;t===Yt?a>0&&(f=Yt,h=a,p=o.length):t===As?d>0&&(f=As,h=d,p=c.length):(h=Math.max(a,d),f=h>0?a>d?Yt:As:null,p=f?f===Yt?o.length:c.length:0);const E=f===Yt&&/\b(transform|all)(,|$)/.test(s(`${Yt}Property`).toString());return{type:f,timeout:h,propCount:p,hasTransform:E}}function Sl(e,t){for(;e.lengthOl(n)+Ol(e[s])))}function Ol(e){return e==="auto"?0:Number(e.slice(0,-1).replace(",","."))*1e3}function cf(){return document.body.offsetHeight}function Av(e,t,n){const s=e[as];s&&(t=(t?[t,...s]:[...s]).join(" ")),t==null?e.removeAttribute("class"):n?e.setAttribute("class",t):e.className=t}const Fr=Symbol("_vod"),uf=Symbol("_vsh"),ib={beforeMount(e,{value:t},{transition:n}){e[Fr]=e.style.display==="none"?"":e.style.display,n&&t?n.beforeEnter(e):Ts(e,t)},mounted(e,{value:t},{transition:n}){n&&t&&n.enter(e)},updated(e,{value:t,oldValue:n},{transition:s}){!t!=!n&&(s?t?(s.beforeEnter(e),Ts(e,!0),s.enter(e)):s.leave(e,()=>{Ts(e,!1)}):Ts(e,t))},beforeUnmount(e,{value:t}){Ts(e,t)}};function Ts(e,t){e.style.display=t?e[Fr]:"none",e[uf]=!t}const ff=Symbol("");function ob(e){const t=Xs();if(!t)return;const n=t.ut=(r=e(t.proxy))=>{Array.from(document.querySelectorAll(`[data-v-owner="${t.uid}"]`)).forEach(o=>Hr(o,r))},s=()=>{const r=e(t.proxy);t.ce?Hr(t.ce,r):so(t.subTree,r),n(r)};Ou(()=>{H_(s)}),Bo(()=>{const r=new MutationObserver(s);r.observe(t.subTree.el.parentNode,{childList:!0}),jo(()=>r.disconnect())})}function so(e,t){if(e.shapeFlag&128){const n=e.suspense;e=n.activeBranch,n.pendingBranch&&!n.isHydrating&&n.effects.push(()=>{so(n.activeBranch,t)})}for(;e.component;)e=e.component.subTree;if(e.shapeFlag&1&&e.el)Hr(e.el,t);else if(e.type===Ve)e.children.forEach(n=>so(n,t));else if(e.type===xr){let{el:n,anchor:s}=e;for(;n&&(Hr(n,t),n!==s);)n=n.nextSibling}}function Hr(e,t){if(e.nodeType===1){const n=e.style;let s="";for(const r in t)n.setProperty(`--${r}`,t[r]),s+=`--${r}: ${t[r]};`;n[ff]=s}}const Tv=/(^|;)\s*display\s*:/;function wv(e,t,n){const s=e.style,r=be(n);let o=!1;if(n&&!r){if(t)if(be(t))for(const a of t.split(";")){const l=a.slice(0,a.indexOf(":")).trim();n[l]==null&&$r(s,l,"")}else for(const a in t)n[a]==null&&$r(s,a,"");for(const a in n)a==="display"&&(o=!0),$r(s,a,n[a])}else if(r){if(t!==n){const a=s[ff];a&&(n+=";"+a),s.cssText=n,o=Tv.test(n)}}else t&&e.removeAttribute("style");Fr in e&&(e[Fr]=o?s.display:"",e[uf]&&(s.display="none"))}const xl=/\s*!important$/;function $r(e,t,n){if(ne(n))n.forEach(s=>$r(e,t,s));else if(n==null&&(n=""),t.startsWith("--"))e.setProperty(t,n);else{const s=Cv(e,t);xl.test(n)?e.setProperty(an(s),n.replace(xl,""),"important"):e[s]=n}}const Nl=["Webkit","Moz","ms"],Pi={};function Cv(e,t){const n=Pi[t];if(n)return n;let s=ht(t);if(s!=="filter"&&s in e)return Pi[t]=s;s=qr(s);for(let r=0;rMi||(Nv.then(()=>Mi=0),Mi=Date.now());function Dv(e,t){const n=s=>{if(!s._vts)s._vts=Date.now();else if(s._vts<=n.attached)return;yt(Lv(s,n.value),t,5,[s])};return n.value=e,n.attached=$v(),n}function Lv(e,t){if(ne(t)){const n=e.stopImmediatePropagation;return e.stopImmediatePropagation=()=>{n.call(e),e._stopped=!0},t.map(s=>r=>!r._stopped&&s&&s(r))}else return t}const Pl=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)>96&&e.charCodeAt(2)<123,Rv=(e,t,n,s,r,o)=>{const a=r==="svg";t==="class"?Av(e,s,a):t==="style"?wv(e,n,s):Yr(t)?wo(t)||Ov(e,t,n,s,o):(t[0]==="."?(t=t.slice(1),!0):t[0]==="^"?(t=t.slice(1),!1):Iv(e,t,s,a))?(Ll(e,t,s),!e.tagName.includes("-")&&(t==="value"||t==="checked"||t==="selected")&&Dl(e,t,s,a,o,t!=="value")):e._isVueCE&&(/[A-Z]/.test(t)||!be(s))?Ll(e,ht(t),s):(t==="true-value"?e._trueValue=s:t==="false-value"&&(e._falseValue=s),Dl(e,t,s,a))};function Iv(e,t,n,s){if(s)return!!(t==="innerHTML"||t==="textContent"||t in e&&Pl(t)&&ie(n));if(t==="spellcheck"||t==="draggable"||t==="translate"||t==="form"||t==="list"&&e.tagName==="INPUT"||t==="type"&&e.tagName==="TEXTAREA")return!1;if(t==="width"||t==="height"){const r=e.tagName;if(r==="IMG"||r==="VIDEO"||r==="CANVAS"||r==="SOURCE")return!1}return Pl(t)&&be(n)?!1:t in e}const df=new WeakMap,hf=new WeakMap,Br=Symbol("_moveCb"),Ml=Symbol("_enterCb"),Pv=e=>(delete e.props.mode,e),Mv=Pv({name:"TransitionGroup",props:Oe({},of,{tag:String,moveClass:String}),setup(e,{slots:t}){const n=Xs(),s=bu();let r,o;return xu(()=>{if(!r.length)return;const a=e.moveClass||`${e.name||"v"}-move`;if(!Hv(r[0].el,n.vnode.el,a))return;r.forEach(kv),r.forEach(Vv);const l=r.filter(Fv);cf(),l.forEach(c=>{const d=c.el,f=d.style;Pt(d,a),f.transform=f.webkitTransform=f.transitionDuration="";const h=d[Br]=p=>{p&&p.target!==d||(!p||/transform$/.test(p.propertyName))&&(d.removeEventListener("transitionend",h),d[Br]=null,qt(d,a))};d.addEventListener("transitionend",h)})}),()=>{const a=fe(e),l=af(a);let c=a.tag||Ve;if(r=[],o)for(let d=0;d{l.split(/\s+/).forEach(c=>c&&s.classList.remove(c))}),n.split(/\s+/).forEach(l=>l&&s.classList.add(l)),s.style.display="none";const o=t.nodeType===1?t:t.parentNode;o.appendChild(s);const{hasTransform:a}=lf(s);return o.removeChild(s),a}const rn=e=>{const t=e.props["onUpdate:modelValue"]||!1;return ne(t)?n=>Cr(t,n):t};function Bv(e){e.target.composing=!0}function kl(e){const t=e.target;t.composing&&(t.composing=!1,t.dispatchEvent(new Event("input")))}const dt=Symbol("_assign"),Vl={created(e,{modifiers:{lazy:t,trim:n,number:s}},r){e[dt]=rn(r);const o=s||r.props&&r.props.type==="number";Ft(e,t?"change":"input",a=>{if(a.target.composing)return;let l=e.value;n&&(l=l.trim()),o&&(l=Lr(l)),e[dt](l)}),n&&Ft(e,"change",()=>{e.value=e.value.trim()}),t||(Ft(e,"compositionstart",Bv),Ft(e,"compositionend",kl),Ft(e,"change",kl))},mounted(e,{value:t}){e.value=t??""},beforeUpdate(e,{value:t,oldValue:n,modifiers:{lazy:s,trim:r,number:o}},a){if(e[dt]=rn(a),e.composing)return;const l=(o||e.type==="number")&&!/^0\d/.test(e.value)?Lr(e.value):e.value,c=t??"";l!==c&&(document.activeElement===e&&e.type!=="range"&&(s&&t===n||r&&e.value.trim()===c)||(e.value=c))}},jv={deep:!0,created(e,t,n){e[dt]=rn(n),Ft(e,"change",()=>{const s=e._modelValue,r=ls(e),o=e.checked,a=e[dt];if(ne(s)){const l=Oo(s,r),c=l!==-1;if(o&&!c)a(s.concat(r));else if(!o&&c){const d=[...s];d.splice(l,1),a(d)}}else if(ds(s)){const l=new Set(s);o?l.add(r):l.delete(r),a(l)}else a(pf(e,o))})},mounted:Fl,beforeUpdate(e,t,n){e[dt]=rn(n),Fl(e,t,n)}};function Fl(e,{value:t},n){e._modelValue=t;let s;ne(t)?s=Oo(t,n.props.value)>-1:ds(t)?s=t.has(n.props.value):s=Nn(t,pf(e,!0)),e.checked!==s&&(e.checked=s)}const Kv={created(e,{value:t},n){e.checked=Nn(t,n.props.value),e[dt]=rn(n),Ft(e,"change",()=>{e[dt](ls(e))})},beforeUpdate(e,{value:t,oldValue:n},s){e[dt]=rn(s),t!==n&&(e.checked=Nn(t,s.props.value))}},Wv={deep:!0,created(e,{value:t,modifiers:{number:n}},s){const r=ds(t);Ft(e,"change",()=>{const o=Array.prototype.filter.call(e.options,a=>a.selected).map(a=>n?Lr(ls(a)):ls(a));e[dt](e.multiple?r?new Set(o):o:o[0]),e._assigning=!0,ei(()=>{e._assigning=!1})}),e[dt]=rn(s)},mounted(e,{value:t}){Hl(e,t)},beforeUpdate(e,t,n){e[dt]=rn(n)},updated(e,{value:t}){e._assigning||Hl(e,t)}};function Hl(e,t){const n=e.multiple,s=ne(t);if(!(n&&!s&&!ds(t))){for(let r=0,o=e.options.length;rString(d)===String(l)):a.selected=Oo(t,l)>-1}else a.selected=t.has(l);else if(Nn(ls(a),t)){e.selectedIndex!==r&&(e.selectedIndex=r);return}}!n&&e.selectedIndex!==-1&&(e.selectedIndex=-1)}}function ls(e){return"_value"in e?e._value:e.value}function pf(e,t){const n=t?"_trueValue":"_falseValue";return n in e?e[n]:t}const lb={created(e,t,n){Ar(e,t,n,null,"created")},mounted(e,t,n){Ar(e,t,n,null,"mounted")},beforeUpdate(e,t,n,s){Ar(e,t,n,s,"beforeUpdate")},updated(e,t,n,s){Ar(e,t,n,s,"updated")}};function Uv(e,t){switch(e){case"SELECT":return Wv;case"TEXTAREA":return Vl;default:switch(t){case"checkbox":return jv;case"radio":return Kv;default:return Vl}}}function Ar(e,t,n,s,r){const a=Uv(e.tagName,n.props&&n.props.type)[r];a&&a(e,t,n,s)}const Yv=["ctrl","shift","alt","meta"],Gv={stop:e=>e.stopPropagation(),prevent:e=>e.preventDefault(),self:e=>e.target!==e.currentTarget,ctrl:e=>!e.ctrlKey,shift:e=>!e.shiftKey,alt:e=>!e.altKey,meta:e=>!e.metaKey,left:e=>"button"in e&&e.button!==0,middle:e=>"button"in e&&e.button!==1,right:e=>"button"in e&&e.button!==2,exact:(e,t)=>Yv.some(n=>e[`${n}Key`]&&!t.includes(n))},cb=(e,t)=>{const n=e._withMods||(e._withMods={}),s=t.join(".");return n[s]||(n[s]=(r,...o)=>{for(let a=0;a{const n=e._withKeys||(e._withKeys={}),s=t.join(".");return n[s]||(n[s]=r=>{if(!("key"in r))return;const o=an(r.key);if(t.some(a=>a===o||qv[a]===o))return e(r)})},zv=Oe({patchProp:Rv},vv);let Bl;function gf(){return Bl||(Bl=I_(zv))}const fb=(...e)=>{gf().render(...e)},Xv=(...e)=>{const t=gf().createApp(...e),{mount:n}=t;return t.mount=s=>{const r=Jv(s);if(!r)return;const o=t._component;!ie(o)&&!o.render&&!o.template&&(o.template=r.innerHTML),r.nodeType===1&&(r.textContent="");const a=n(r,!1,Qv(r));return r instanceof Element&&(r.removeAttribute("v-cloak"),r.setAttribute("data-v-app","")),a},t};function Qv(e){if(e instanceof SVGElement)return"svg";if(typeof MathMLElement=="function"&&e instanceof MathMLElement)return"mathml"}function Jv(e){return be(e)?document.querySelector(e):e}var Zv=!1;/*! + * pinia v2.2.4 + * (c) 2024 Eduardo San Martin Morote + * @license MIT + */let mf;const ii=e=>mf=e,_f=Symbol();function ro(e){return e&&typeof e=="object"&&Object.prototype.toString.call(e)==="[object Object]"&&typeof e.toJSON!="function"}var Is;(function(e){e.direct="direct",e.patchObject="patch object",e.patchFunction="patch function"})(Is||(Is={}));function eE(){const e=Uc(!0),t=e.run(()=>Cn({}));let n=[],s=[];const r=Zr({install(o){ii(r),r._a=o,o.provide(_f,r),o.config.globalProperties.$pinia=r,s.forEach(a=>n.push(a)),s=[]},use(o){return!this._a&&!Zv?s.push(o):n.push(o),this},_p:n,_a:null,_e:e,_s:new Map,state:t});return r}const vf=()=>{};function jl(e,t,n,s=vf){e.push(t);const r=()=>{const o=e.indexOf(t);o>-1&&(e.splice(o,1),s())};return!n&&Yc()&&Tm(r),r}function jn(e,...t){e.slice().forEach(n=>{n(...t)})}const tE=e=>e(),Kl=Symbol(),ki=Symbol();function io(e,t){e instanceof Map&&t instanceof Map?t.forEach((n,s)=>e.set(s,n)):e instanceof Set&&t instanceof Set&&t.forEach(e.add,e);for(const n in t){if(!t.hasOwnProperty(n))continue;const s=t[n],r=e[n];ro(r)&&ro(s)&&e.hasOwnProperty(n)&&!Te(s)&&!tn(s)?e[n]=io(r,s):e[n]=s}return e}const nE=Symbol();function sE(e){return!ro(e)||!e.hasOwnProperty(nE)}const{assign:zt}=Object;function rE(e){return!!(Te(e)&&e.effect)}function iE(e,t,n,s){const{state:r,actions:o,getters:a}=t,l=n.state.value[e];let c;function d(){l||(n.state.value[e]=r?r():{});const f=qm(n.state.value[e]);return zt(f,o,Object.keys(a||{}).reduce((h,p)=>(h[p]=Zr(lt(()=>{ii(n);const E=n._s.get(e);return a[p].call(E,E)})),h),{}))}return c=Ef(e,d,t,n,s,!0),c}function Ef(e,t,n={},s,r,o){let a;const l=zt({actions:{}},n),c={deep:!0};let d,f,h=[],p=[],E;const x=s.state.value[e];!o&&!x&&(s.state.value[e]={}),Cn({});let C;function D(T){let A;d=f=!1,typeof T=="function"?(T(s.state.value[e]),A={type:Is.patchFunction,storeId:e,events:E}):(io(s.state.value[e],T),A={type:Is.patchObject,payload:T,storeId:e,events:E});const w=C=Symbol();ei().then(()=>{C===w&&(d=!0)}),f=!0,jn(h,A,s.state.value[e])}const P=o?function(){const{state:A}=n,w=A?A():{};this.$patch(j=>{zt(j,w)})}:vf;function V(){a.stop(),h=[],p=[],s._s.delete(e)}const k=(T,A="")=>{if(Kl in T)return T[ki]=A,T;const w=function(){ii(s);const j=Array.from(arguments),B=[],Q=[];function oe(Z){B.push(Z)}function he(Z){Q.push(Z)}jn(p,{args:j,name:w[ki],store:b,after:oe,onError:he});let te;try{te=T.apply(this&&this.$id===e?this:b,j)}catch(Z){throw jn(Q,Z),Z}return te instanceof Promise?te.then(Z=>(jn(B,Z),Z)).catch(Z=>(jn(Q,Z),Promise.reject(Z))):(jn(B,te),te)};return w[Kl]=!0,w[ki]=A,w},M={_p:s,$id:e,$onAction:jl.bind(null,p),$patch:D,$reset:P,$subscribe(T,A={}){const w=jl(h,T,A.detached,()=>j()),j=a.run(()=>Jn(()=>s.state.value[e],B=>{(A.flush==="sync"?f:d)&&T({storeId:e,type:Is.direct,events:E},B)},zt({},c,A)));return w},$dispose:V},b=Gs(M);s._s.set(e,b);const S=(s._a&&s._a.runWithContext||tE)(()=>s._e.run(()=>(a=Uc()).run(()=>t({action:k}))));for(const T in S){const A=S[T];if(Te(A)&&!rE(A)||tn(A))o||(x&&sE(A)&&(Te(A)?A.value=x[T]:io(A,x[T])),s.state.value[e][T]=A);else if(typeof A=="function"){const w=k(A,T);S[T]=w,l.actions[T]=A}}return zt(b,S),zt(fe(b),S),Object.defineProperty(b,"$state",{get:()=>s.state.value[e],set:T=>{D(A=>{zt(A,T)})}}),s._p.forEach(T=>{zt(b,a.run(()=>T({store:b,app:s._a,pinia:s,options:l})))}),x&&o&&n.hydrate&&n.hydrate(b.$state,x),d=!0,f=!0,b}function yf(e,t,n){let s,r;const o=typeof t=="function";typeof e=="string"?(s=e,r=o?n:t):(r=e,s=e.id);function a(l,c){const d=O_();return l=l||(d?ft(_f,null):null),l&&ii(l),l=mf,l._s.has(s)||(o?Ef(s,t,r,l):iE(s,r,l)),l._s.get(s)}return a.$id=s,a}const oE="/static/app/dist/assets/logo-XE_HdY0J.png";/*! + * vue-router v4.4.5 + * (c) 2024 Eduardo San Martin Morote + * @license MIT + */const Yn=typeof document<"u";function bf(e){return typeof e=="object"||"displayName"in e||"props"in e||"__vccOpts"in e}function aE(e){return e.__esModule||e[Symbol.toStringTag]==="Module"||e.default&&bf(e.default)}const me=Object.assign;function Vi(e,t){const n={};for(const s in t){const r=t[s];n[s]=bt(r)?r.map(e):e(r)}return n}const Ps=()=>{},bt=Array.isArray,Af=/#/g,lE=/&/g,cE=/\//g,uE=/=/g,fE=/\?/g,Tf=/\+/g,dE=/%5B/g,hE=/%5D/g,wf=/%5E/g,pE=/%60/g,Cf=/%7B/g,gE=/%7C/g,Sf=/%7D/g,mE=/%20/g;function Xo(e){return encodeURI(""+e).replace(gE,"|").replace(dE,"[").replace(hE,"]")}function _E(e){return Xo(e).replace(Cf,"{").replace(Sf,"}").replace(wf,"^")}function oo(e){return Xo(e).replace(Tf,"%2B").replace(mE,"+").replace(Af,"%23").replace(lE,"%26").replace(pE,"`").replace(Cf,"{").replace(Sf,"}").replace(wf,"^")}function vE(e){return oo(e).replace(uE,"%3D")}function EE(e){return Xo(e).replace(Af,"%23").replace(fE,"%3F")}function yE(e){return e==null?"":EE(e).replace(cE,"%2F")}function Ks(e){try{return decodeURIComponent(""+e)}catch{}return""+e}const bE=/\/$/,AE=e=>e.replace(bE,"");function Fi(e,t,n="/"){let s,r={},o="",a="";const l=t.indexOf("#");let c=t.indexOf("?");return l=0&&(c=-1),c>-1&&(s=t.slice(0,c),o=t.slice(c+1,l>-1?l:t.length),r=e(o)),l>-1&&(s=s||t.slice(0,l),a=t.slice(l,t.length)),s=SE(s??t,n),{fullPath:s+(o&&"?")+o+a,path:s,query:r,hash:Ks(a)}}function TE(e,t){const n=t.query?e(t.query):"";return t.path+(n&&"?")+n+(t.hash||"")}function Wl(e,t){return!t||!e.toLowerCase().startsWith(t.toLowerCase())?e:e.slice(t.length)||"/"}function wE(e,t,n){const s=t.matched.length-1,r=n.matched.length-1;return s>-1&&s===r&&cs(t.matched[s],n.matched[r])&&Of(t.params,n.params)&&e(t.query)===e(n.query)&&t.hash===n.hash}function cs(e,t){return(e.aliasOf||e)===(t.aliasOf||t)}function Of(e,t){if(Object.keys(e).length!==Object.keys(t).length)return!1;for(const n in e)if(!CE(e[n],t[n]))return!1;return!0}function CE(e,t){return bt(e)?Ul(e,t):bt(t)?Ul(t,e):e===t}function Ul(e,t){return bt(t)?e.length===t.length&&e.every((n,s)=>n===t[s]):e.length===1&&e[0]===t}function SE(e,t){if(e.startsWith("/"))return e;if(!e)return t;const n=t.split("/"),s=e.split("/"),r=s[s.length-1];(r===".."||r===".")&&s.push("");let o=n.length-1,a,l;for(a=0;a1&&o--;else break;return n.slice(0,o).join("/")+"/"+s.slice(a).join("/")}const Gt={path:"/",name:void 0,params:{},query:{},hash:"",fullPath:"/",matched:[],meta:{},redirectedFrom:void 0};var Ws;(function(e){e.pop="pop",e.push="push"})(Ws||(Ws={}));var Ms;(function(e){e.back="back",e.forward="forward",e.unknown=""})(Ms||(Ms={}));function OE(e){if(!e)if(Yn){const t=document.querySelector("base");e=t&&t.getAttribute("href")||"/",e=e.replace(/^\w+:\/\/[^\/]+/,"")}else e="/";return e[0]!=="/"&&e[0]!=="#"&&(e="/"+e),AE(e)}const xE=/^[^#]+#/;function NE(e,t){return e.replace(xE,"#")+t}function $E(e,t){const n=document.documentElement.getBoundingClientRect(),s=e.getBoundingClientRect();return{behavior:t.behavior,left:s.left-n.left-(t.left||0),top:s.top-n.top-(t.top||0)}}const oi=()=>({left:window.scrollX,top:window.scrollY});function DE(e){let t;if("el"in e){const n=e.el,s=typeof n=="string"&&n.startsWith("#"),r=typeof n=="string"?s?document.getElementById(n.slice(1)):document.querySelector(n):n;if(!r)return;t=$E(r,e)}else t=e;"scrollBehavior"in document.documentElement.style?window.scrollTo(t):window.scrollTo(t.left!=null?t.left:window.scrollX,t.top!=null?t.top:window.scrollY)}function Yl(e,t){return(history.state?history.state.position-t:-1)+e}const ao=new Map;function LE(e,t){ao.set(e,t)}function RE(e){const t=ao.get(e);return ao.delete(e),t}let IE=()=>location.protocol+"//"+location.host;function xf(e,t){const{pathname:n,search:s,hash:r}=t,o=e.indexOf("#");if(o>-1){let l=r.includes(e.slice(o))?e.slice(o).length:1,c=r.slice(l);return c[0]!=="/"&&(c="/"+c),Wl(c,"")}return Wl(n,e)+s+r}function PE(e,t,n,s){let r=[],o=[],a=null;const l=({state:p})=>{const E=xf(e,location),x=n.value,C=t.value;let D=0;if(p){if(n.value=E,t.value=p,a&&a===x){a=null;return}D=C?p.position-C.position:0}else s(E);r.forEach(P=>{P(n.value,x,{delta:D,type:Ws.pop,direction:D?D>0?Ms.forward:Ms.back:Ms.unknown})})};function c(){a=n.value}function d(p){r.push(p);const E=()=>{const x=r.indexOf(p);x>-1&&r.splice(x,1)};return o.push(E),E}function f(){const{history:p}=window;p.state&&p.replaceState(me({},p.state,{scroll:oi()}),"")}function h(){for(const p of o)p();o=[],window.removeEventListener("popstate",l),window.removeEventListener("beforeunload",f)}return window.addEventListener("popstate",l),window.addEventListener("beforeunload",f,{passive:!0}),{pauseListeners:c,listen:d,destroy:h}}function Gl(e,t,n,s=!1,r=!1){return{back:e,current:t,forward:n,replaced:s,position:window.history.length,scroll:r?oi():null}}function ME(e){const{history:t,location:n}=window,s={value:xf(e,n)},r={value:t.state};r.value||o(s.value,{back:null,current:s.value,forward:null,position:t.length-1,replaced:!0,scroll:null},!0);function o(c,d,f){const h=e.indexOf("#"),p=h>-1?(n.host&&document.querySelector("base")?e:e.slice(h))+c:IE()+e+c;try{t[f?"replaceState":"pushState"](d,"",p),r.value=d}catch(E){console.error(E),n[f?"replace":"assign"](p)}}function a(c,d){const f=me({},t.state,Gl(r.value.back,c,r.value.forward,!0),d,{position:r.value.position});o(c,f,!0),s.value=c}function l(c,d){const f=me({},r.value,t.state,{forward:c,scroll:oi()});o(f.current,f,!0);const h=me({},Gl(s.value,c,null),{position:f.position+1},d);o(c,h,!1),s.value=c}return{location:s,state:r,push:l,replace:a}}function kE(e){e=OE(e);const t=ME(e),n=PE(e,t.state,t.location,t.replace);function s(o,a=!0){a||n.pauseListeners(),history.go(o)}const r=me({location:"",base:e,go:s,createHref:NE.bind(null,e)},t,n);return Object.defineProperty(r,"location",{enumerable:!0,get:()=>t.location.value}),Object.defineProperty(r,"state",{enumerable:!0,get:()=>t.state.value}),r}function VE(e){return e=location.host?e||location.pathname+location.search:"",e.includes("#")||(e+="#"),kE(e)}function FE(e){return typeof e=="string"||e&&typeof e=="object"}function Nf(e){return typeof e=="string"||typeof e=="symbol"}const $f=Symbol("");var ql;(function(e){e[e.aborted=4]="aborted",e[e.cancelled=8]="cancelled",e[e.duplicated=16]="duplicated"})(ql||(ql={}));function us(e,t){return me(new Error,{type:e,[$f]:!0},t)}function It(e,t){return e instanceof Error&&$f in e&&(t==null||!!(e.type&t))}const zl="[^/]+?",HE={sensitive:!1,strict:!1,start:!0,end:!0},BE=/[.+*?^${}()[\]/\\]/g;function jE(e,t){const n=me({},HE,t),s=[];let r=n.start?"^":"";const o=[];for(const d of e){const f=d.length?[]:[90];n.strict&&!d.length&&(r+="/");for(let h=0;ht.length?t.length===1&&t[0]===80?1:-1:0}function Df(e,t){let n=0;const s=e.score,r=t.score;for(;n0&&t[t.length-1]<0}const WE={type:0,value:""},UE=/[a-zA-Z0-9_]/;function YE(e){if(!e)return[[]];if(e==="/")return[[WE]];if(!e.startsWith("/"))throw new Error(`Invalid path "${e}"`);function t(E){throw new Error(`ERR (${n})/"${d}": ${E}`)}let n=0,s=n;const r=[];let o;function a(){o&&r.push(o),o=[]}let l=0,c,d="",f="";function h(){d&&(n===0?o.push({type:0,value:d}):n===1||n===2||n===3?(o.length>1&&(c==="*"||c==="+")&&t(`A repeatable param (${d}) must be alone in its segment. eg: '/:ids+.`),o.push({type:1,value:d,regexp:f,repeatable:c==="*"||c==="+",optional:c==="*"||c==="?"})):t("Invalid state to consume buffer"),d="")}function p(){d+=c}for(;l{a(k)}:Ps}function a(h){if(Nf(h)){const p=s.get(h);p&&(s.delete(h),n.splice(n.indexOf(p),1),p.children.forEach(a),p.alias.forEach(a))}else{const p=n.indexOf(h);p>-1&&(n.splice(p,1),h.record.name&&s.delete(h.record.name),h.children.forEach(a),h.alias.forEach(a))}}function l(){return n}function c(h){const p=QE(h,n);n.splice(p,0,h),h.record.name&&!Zl(h)&&s.set(h.record.name,h)}function d(h,p){let E,x={},C,D;if("name"in h&&h.name){if(E=s.get(h.name),!E)throw us(1,{location:h});D=E.record.name,x=me(Ql(p.params,E.keys.filter(k=>!k.optional).concat(E.parent?E.parent.keys.filter(k=>k.optional):[]).map(k=>k.name)),h.params&&Ql(h.params,E.keys.map(k=>k.name))),C=E.stringify(x)}else if(h.path!=null)C=h.path,E=n.find(k=>k.re.test(C)),E&&(x=E.parse(C),D=E.record.name);else{if(E=p.name?s.get(p.name):n.find(k=>k.re.test(p.path)),!E)throw us(1,{location:h,currentLocation:p});D=E.record.name,x=me({},p.params,h.params),C=E.stringify(x)}const P=[];let V=E;for(;V;)P.unshift(V.record),V=V.parent;return{name:D,path:C,params:x,matched:P,meta:XE(P)}}e.forEach(h=>o(h));function f(){n.length=0,s.clear()}return{addRoute:o,resolve:d,removeRoute:a,clearRoutes:f,getRoutes:l,getRecordMatcher:r}}function Ql(e,t){const n={};for(const s of t)s in e&&(n[s]=e[s]);return n}function Jl(e){const t={path:e.path,redirect:e.redirect,name:e.name,meta:e.meta||{},aliasOf:e.aliasOf,beforeEnter:e.beforeEnter,props:zE(e),children:e.children||[],instances:{},leaveGuards:new Set,updateGuards:new Set,enterCallbacks:{},components:"components"in e?e.components||null:e.component&&{default:e.component}};return Object.defineProperty(t,"mods",{value:{}}),t}function zE(e){const t={},n=e.props||!1;if("component"in e)t.default=n;else for(const s in e.components)t[s]=typeof n=="object"?n[s]:n;return t}function Zl(e){for(;e;){if(e.record.aliasOf)return!0;e=e.parent}return!1}function XE(e){return e.reduce((t,n)=>me(t,n.meta),{})}function ec(e,t){const n={};for(const s in e)n[s]=s in t?t[s]:e[s];return n}function QE(e,t){let n=0,s=t.length;for(;n!==s;){const o=n+s>>1;Df(e,t[o])<0?s=o:n=o+1}const r=JE(e);return r&&(s=t.lastIndexOf(r,s-1)),s}function JE(e){let t=e;for(;t=t.parent;)if(Lf(t)&&Df(e,t)===0)return t}function Lf({record:e}){return!!(e.name||e.components&&Object.keys(e.components).length||e.redirect)}function ZE(e){const t={};if(e===""||e==="?")return t;const s=(e[0]==="?"?e.slice(1):e).split("&");for(let r=0;ro&&oo(o)):[s&&oo(s)]).forEach(o=>{o!==void 0&&(t+=(t.length?"&":"")+n,o!=null&&(t+="="+o))})}return t}function ey(e){const t={};for(const n in e){const s=e[n];s!==void 0&&(t[n]=bt(s)?s.map(r=>r==null?null:""+r):s==null?s:""+s)}return t}const ty=Symbol(""),nc=Symbol(""),ai=Symbol(""),Qo=Symbol(""),lo=Symbol("");function ws(){let e=[];function t(s){return e.push(s),()=>{const r=e.indexOf(s);r>-1&&e.splice(r,1)}}function n(){e=[]}return{add:t,list:()=>e.slice(),reset:n}}function Zt(e,t,n,s,r,o=a=>a()){const a=s&&(s.enterCallbacks[r]=s.enterCallbacks[r]||[]);return()=>new Promise((l,c)=>{const d=p=>{p===!1?c(us(4,{from:n,to:t})):p instanceof Error?c(p):FE(p)?c(us(2,{from:t,to:p})):(a&&s.enterCallbacks[r]===a&&typeof p=="function"&&a.push(p),l())},f=o(()=>e.call(s&&s.instances[r],t,n,d));let h=Promise.resolve(f);e.length<3&&(h=h.then(d)),h.catch(p=>c(p))})}function Hi(e,t,n,s,r=o=>o()){const o=[];for(const a of e)for(const l in a.components){let c=a.components[l];if(!(t!=="beforeRouteEnter"&&!a.instances[l]))if(bf(c)){const f=(c.__vccOpts||c)[t];f&&o.push(Zt(f,n,s,a,l,r))}else{let d=c();o.push(()=>d.then(f=>{if(!f)throw new Error(`Couldn't resolve component "${l}" at "${a.path}"`);const h=aE(f)?f.default:f;a.mods[l]=f,a.components[l]=h;const E=(h.__vccOpts||h)[t];return E&&Zt(E,n,s,a,l,r)()}))}}return o}function sc(e){const t=ft(ai),n=ft(Qo),s=lt(()=>{const c=vt(e.to);return t.resolve(c)}),r=lt(()=>{const{matched:c}=s.value,{length:d}=c,f=c[d-1],h=n.matched;if(!f||!h.length)return-1;const p=h.findIndex(cs.bind(null,f));if(p>-1)return p;const E=rc(c[d-2]);return d>1&&rc(f)===E&&h[h.length-1].path!==E?h.findIndex(cs.bind(null,c[d-2])):p}),o=lt(()=>r.value>-1&&iy(n.params,s.value.params)),a=lt(()=>r.value>-1&&r.value===n.matched.length-1&&Of(n.params,s.value.params));function l(c={}){return ry(c)?t[vt(e.replace)?"replace":"push"](vt(e.to)).catch(Ps):Promise.resolve()}return{route:s,href:lt(()=>s.value.href),isActive:o,isExactActive:a,navigate:l}}const ny=Fo({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:sc,setup(e,{slots:t}){const n=Gs(sc(e)),{options:s}=ft(ai),r=lt(()=>({[ic(e.activeClass,s.linkActiveClass,"router-link-active")]:n.isActive,[ic(e.exactActiveClass,s.linkExactActiveClass,"router-link-exact-active")]:n.isExactActive}));return()=>{const o=t.default&&t.default(n);return e.custom?o:zo("a",{"aria-current":n.isExactActive?e.ariaCurrentValue:null,href:n.href,onClick:n.navigate,class:r.value},o)}}}),sy=ny;function ry(e){if(!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)&&!e.defaultPrevented&&!(e.button!==void 0&&e.button!==0)){if(e.currentTarget&&e.currentTarget.getAttribute){const t=e.currentTarget.getAttribute("target");if(/\b_blank\b/i.test(t))return}return e.preventDefault&&e.preventDefault(),!0}}function iy(e,t){for(const n in t){const s=t[n],r=e[n];if(typeof s=="string"){if(s!==r)return!1}else if(!bt(r)||r.length!==s.length||s.some((o,a)=>o!==r[a]))return!1}return!0}function rc(e){return e?e.aliasOf?e.aliasOf.path:e.path:""}const ic=(e,t,n)=>e??t??n,oy=Fo({name:"RouterView",inheritAttrs:!1,props:{name:{type:String,default:"default"},route:Object},compatConfig:{MODE:3},setup(e,{attrs:t,slots:n}){const s=ft(lo),r=lt(()=>e.route||s.value),o=ft(nc,0),a=lt(()=>{let d=vt(o);const{matched:f}=r.value;let h;for(;(h=f[d])&&!h.components;)d++;return d}),l=lt(()=>r.value.matched[a.value]);Or(nc,lt(()=>a.value+1)),Or(ty,l),Or(lo,r);const c=Cn();return Jn(()=>[c.value,l.value,e.name],([d,f,h],[p,E,x])=>{f&&(f.instances[h]=d,E&&E!==f&&d&&d===p&&(f.leaveGuards.size||(f.leaveGuards=E.leaveGuards),f.updateGuards.size||(f.updateGuards=E.updateGuards))),d&&f&&(!E||!cs(f,E)||!p)&&(f.enterCallbacks[h]||[]).forEach(C=>C(d))},{flush:"post"}),()=>{const d=r.value,f=e.name,h=l.value,p=h&&h.components[f];if(!p)return oc(n.default,{Component:p,route:d});const E=h.props[f],x=E?E===!0?d.params:typeof E=="function"?E(d):E:null,D=zo(p,me({},x,t,{onVnodeUnmounted:P=>{P.component.isUnmounted&&(h.instances[f]=null)},ref:c}));return oc(n.default,{Component:D,route:d})||D}}});function oc(e,t){if(!e)return null;const n=e(t);return n.length===1?n[0]:n}const Rf=oy;function ay(e){const t=qE(e.routes,e),n=e.parseQuery||ZE,s=e.stringifyQuery||tc,r=e.history,o=ws(),a=ws(),l=ws(),c=cu(Gt);let d=Gt;Yn&&e.scrollBehavior&&"scrollRestoration"in history&&(history.scrollRestoration="manual");const f=Vi.bind(null,R=>""+R),h=Vi.bind(null,yE),p=Vi.bind(null,Ks);function E(R,q){let z,J;return Nf(R)?(z=t.getRecordMatcher(R),J=q):J=R,t.addRoute(J,z)}function x(R){const q=t.getRecordMatcher(R);q&&t.removeRoute(q)}function C(){return t.getRoutes().map(R=>R.record)}function D(R){return!!t.getRecordMatcher(R)}function P(R,q){if(q=me({},q||c.value),typeof R=="string"){const _=Fi(n,R,q.path),O=t.resolve({path:_.path},q),H=r.createHref(_.fullPath);return me(_,O,{params:p(O.params),hash:Ks(_.hash),redirectedFrom:void 0,href:H})}let z;if(R.path!=null)z=me({},R,{path:Fi(n,R.path,q.path).path});else{const _=me({},R.params);for(const O in _)_[O]==null&&delete _[O];z=me({},R,{params:h(_)}),q.params=h(q.params)}const J=t.resolve(z,q),$=R.hash||"";J.params=f(p(J.params));const ge=TE(s,me({},R,{hash:_E($),path:J.path})),g=r.createHref(ge);return me({fullPath:ge,hash:$,query:s===tc?ey(R.query):R.query||{}},J,{redirectedFrom:void 0,href:g})}function V(R){return typeof R=="string"?Fi(n,R,c.value.path):me({},R)}function k(R,q){if(d!==R)return us(8,{from:q,to:R})}function M(R){return S(R)}function b(R){return M(me(V(R),{replace:!0}))}function y(R){const q=R.matched[R.matched.length-1];if(q&&q.redirect){const{redirect:z}=q;let J=typeof z=="function"?z(R):z;return typeof J=="string"&&(J=J.includes("?")||J.includes("#")?J=V(J):{path:J},J.params={}),me({query:R.query,hash:R.hash,params:J.path!=null?{}:R.params},J)}}function S(R,q){const z=d=P(R),J=c.value,$=R.state,ge=R.force,g=R.replace===!0,_=y(z);if(_)return S(me(V(_),{state:typeof _=="object"?me({},$,_.state):$,force:ge,replace:g}),q||z);const O=z;O.redirectedFrom=q;let H;return!ge&&wE(s,J,z)&&(H=us(16,{to:O,from:J}),De(J,J,!0,!1)),(H?Promise.resolve(H):w(O,J)).catch(L=>It(L)?It(L,2)?L:He(L):ce(L,O,J)).then(L=>{if(L){if(It(L,2))return S(me({replace:g},V(L.to),{state:typeof L.to=="object"?me({},$,L.to.state):$,force:ge}),q||O)}else L=B(O,J,!0,g,$);return j(O,J,L),L})}function T(R,q){const z=k(R,q);return z?Promise.reject(z):Promise.resolve()}function A(R){const q=Be.values().next().value;return q&&typeof q.runWithContext=="function"?q.runWithContext(R):R()}function w(R,q){let z;const[J,$,ge]=ly(R,q);z=Hi(J.reverse(),"beforeRouteLeave",R,q);for(const _ of J)_.leaveGuards.forEach(O=>{z.push(Zt(O,R,q))});const g=T.bind(null,R,q);return z.push(g),we(z).then(()=>{z=[];for(const _ of o.list())z.push(Zt(_,R,q));return z.push(g),we(z)}).then(()=>{z=Hi($,"beforeRouteUpdate",R,q);for(const _ of $)_.updateGuards.forEach(O=>{z.push(Zt(O,R,q))});return z.push(g),we(z)}).then(()=>{z=[];for(const _ of ge)if(_.beforeEnter)if(bt(_.beforeEnter))for(const O of _.beforeEnter)z.push(Zt(O,R,q));else z.push(Zt(_.beforeEnter,R,q));return z.push(g),we(z)}).then(()=>(R.matched.forEach(_=>_.enterCallbacks={}),z=Hi(ge,"beforeRouteEnter",R,q,A),z.push(g),we(z))).then(()=>{z=[];for(const _ of a.list())z.push(Zt(_,R,q));return z.push(g),we(z)}).catch(_=>It(_,8)?_:Promise.reject(_))}function j(R,q,z){l.list().forEach(J=>A(()=>J(R,q,z)))}function B(R,q,z,J,$){const ge=k(R,q);if(ge)return ge;const g=q===Gt,_=Yn?history.state:{};z&&(J||g?r.replace(R.fullPath,me({scroll:g&&_&&_.scroll},$)):r.push(R.fullPath,$)),c.value=R,De(R,q,z,g),He()}let Q;function oe(){Q||(Q=r.listen((R,q,z)=>{if(!Pe.listening)return;const J=P(R),$=y(J);if($){S(me($,{replace:!0}),J).catch(Ps);return}d=J;const ge=c.value;Yn&&LE(Yl(ge.fullPath,z.delta),oi()),w(J,ge).catch(g=>It(g,12)?g:It(g,2)?(S(g.to,J).then(_=>{It(_,20)&&!z.delta&&z.type===Ws.pop&&r.go(-1,!1)}).catch(Ps),Promise.reject()):(z.delta&&r.go(-z.delta,!1),ce(g,J,ge))).then(g=>{g=g||B(J,ge,!1),g&&(z.delta&&!It(g,8)?r.go(-z.delta,!1):z.type===Ws.pop&&It(g,20)&&r.go(-1,!1)),j(J,ge,g)}).catch(Ps)}))}let he=ws(),te=ws(),Z;function ce(R,q,z){He(R);const J=te.list();return J.length?J.forEach($=>$(R,q,z)):console.error(R),Promise.reject(R)}function Ce(){return Z&&c.value!==Gt?Promise.resolve():new Promise((R,q)=>{he.add([R,q])})}function He(R){return Z||(Z=!R,oe(),he.list().forEach(([q,z])=>R?z(R):q()),he.reset()),R}function De(R,q,z,J){const{scrollBehavior:$}=e;if(!Yn||!$)return Promise.resolve();const ge=!z&&RE(Yl(R.fullPath,0))||(J||!z)&&history.state&&history.state.scroll||null;return ei().then(()=>$(R,q,ge)).then(g=>g&&DE(g)).catch(g=>ce(g,R,q))}const Ae=R=>r.go(R);let et;const Be=new Set,Pe={currentRoute:c,listening:!0,addRoute:E,removeRoute:x,clearRoutes:t.clearRoutes,hasRoute:D,getRoutes:C,resolve:P,options:e,push:M,replace:b,go:Ae,back:()=>Ae(-1),forward:()=>Ae(1),beforeEach:o.add,beforeResolve:a.add,afterEach:l.add,onError:te.add,isReady:Ce,install(R){const q=this;R.component("RouterLink",sy),R.component("RouterView",Rf),R.config.globalProperties.$router=q,Object.defineProperty(R.config.globalProperties,"$route",{enumerable:!0,get:()=>vt(c)}),Yn&&!et&&c.value===Gt&&(et=!0,M(r.location).catch($=>{}));const z={};for(const $ in Gt)Object.defineProperty(z,$,{get:()=>c.value[$],enumerable:!0});R.provide(ai,q),R.provide(Qo,au(z)),R.provide(lo,c);const J=R.unmount;Be.add(R),R.unmount=function(){Be.delete(R),Be.size<1&&(d=Gt,Q&&Q(),Q=null,c.value=Gt,et=!1,Z=!1),J()}}};function we(R){return R.reduce((q,z)=>q.then(()=>A(z)),Promise.resolve())}return Pe}function ly(e,t){const n=[],s=[],r=[],o=Math.max(t.matched.length,e.matched.length);for(let a=0;acs(d,l))?s.push(l):n.push(l));const c=e.matched[a];c&&(t.matched.find(d=>cs(d,c))||r.push(c))}return[n,s,r]}function db(){return ft(ai)}function cy(e){return ft(Qo)}const uy="modulepreload",fy=function(e){return"/static/app/dist/"+e},ac={},Qe=function(t,n,s){let r=Promise.resolve();if(n&&n.length>0){document.getElementsByTagName("link");const a=document.querySelector("meta[property=csp-nonce]"),l=a?.nonce||a?.getAttribute("nonce");r=Promise.allSettled(n.map(c=>{if(c=fy(c),c in ac)return;ac[c]=!0;const d=c.endsWith(".css"),f=d?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${c}"]${f}`))return;const h=document.createElement("link");if(h.rel=d?"stylesheet":uy,d||(h.as="script"),h.crossOrigin="",h.href=c,l&&h.setAttribute("nonce",l),document.head.appendChild(h),d)return new Promise((p,E)=>{h.addEventListener("load",p),h.addEventListener("error",()=>E(new Error(`Unable to preload CSS for ${c}`)))})}))}function o(a){const l=new Event("vite:preloadError",{cancelable:!0});if(l.payload=a,window.dispatchEvent(l),!l.defaultPrevented)throw a}return r.then(a=>{for(const l of a||[])l.status==="rejected"&&o(l.reason);return t().catch(o)})},dy={getCookie(e){const n=`; ${document.cookie}`.split(`; ${e}=`);if(n.length===2)return n.pop().split(";").shift()}},lc="[a-fA-F\\d:]",en=e=>e&&e.includeBoundaries?`(?:(?<=\\s|^)(?=${lc})|(?<=${lc})(?=\\s|$))`:"",mt="(?: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}",Se="[a-fA-F\\d]{1,4}",li=` +(?: +(?:${Se}:){7}(?:${Se}|:)| // 1:2:3:4:5:6:7:: 1:2:3:4:5:6:7:8 +(?:${Se}:){6}(?:${mt}|:${Se}|:)| // 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 +(?:${Se}:){5}(?::${mt}|(?::${Se}){1,2}|:)| // 1:2:3:4:5:: 1:2:3:4:5::7:8 1:2:3:4:5::8 1:2:3:4:5::7:1.2.3.4 +(?:${Se}:){4}(?:(?::${Se}){0,1}:${mt}|(?::${Se}){1,3}|:)| // 1:2:3:4:: 1:2:3:4::6:7:8 1:2:3:4::8 1:2:3:4::6:7:1.2.3.4 +(?:${Se}:){3}(?:(?::${Se}){0,2}:${mt}|(?::${Se}){1,4}|:)| // 1:2:3:: 1:2:3::5:6:7:8 1:2:3::8 1:2:3::5:6:7:1.2.3.4 +(?:${Se}:){2}(?:(?::${Se}){0,3}:${mt}|(?::${Se}){1,5}|:)| // 1:2:: 1:2::4:5:6:7:8 1:2::8 1:2::4:5:6:7:1.2.3.4 +(?:${Se}:){1}(?:(?::${Se}){0,4}:${mt}|(?::${Se}){1,6}|:)| // 1:: 1::3:4:5:6:7:8 1::8 1::3:4:5:6:7:1.2.3.4 +(?::(?:(?::${Se}){0,5}:${mt}|(?::${Se}){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(),hy=new RegExp(`(?:^${mt}$)|(?:^${li}$)`),py=new RegExp(`^${mt}$`),gy=new RegExp(`^${li}$`),ci=e=>e&&e.exact?hy:new RegExp(`(?:${en(e)}${mt}${en(e)})|(?:${en(e)}${li}${en(e)})`,"g");ci.v4=e=>e&&e.exact?py:new RegExp(`${en(e)}${mt}${en(e)}`,"g");ci.v6=e=>e&&e.exact?gy:new RegExp(`${en(e)}${li}${en(e)}`,"g");const If={exact:!1},Pf=`${ci.v4().source}\\/(3[0-2]|[12]?[0-9])`,Mf=`${ci.v6().source}\\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])`,my=new RegExp(`^${Pf}$`),_y=new RegExp(`^${Mf}$`),vy=({exact:e}=If)=>e?my:new RegExp(Pf,"g"),Ey=({exact:e}=If)=>e?_y:new RegExp(Mf,"g"),kf=vy({exact:!0}),Vf=Ey({exact:!0}),Jo=e=>kf.test(e)?4:Vf.test(e)?6:0;Jo.v4=e=>kf.test(e);Jo.v6=e=>Vf.test(e);const kt=e=>{const t=un();if(t.Locale===null)return e;const s=Object.keys(t.Locale).filter(r=>e.match(new RegExp("^"+r+"$","gi"))!==null);return s.length===0||s.length>1||t.Locale[s[0]].length===0?e:e.replace(new RegExp(s[0],"gi"),t.Locale[s[0]])},yy=yf("WireguardConfigurationsStore",{state:()=>({Configurations:void 0,searchString:"",ConfigurationListInterval:void 0,PeerScheduleJobs:{dropdowns:{Field:[{display:kt("Total Received"),value:"total_receive",unit:"GB",type:"number"},{display:kt("Total Sent"),value:"total_sent",unit:"GB",type:"number"},{display:kt("Total Usage"),value:"total_data",unit:"GB",type:"number"},{display:kt("Date"),value:"date",type:"date"}],Operator:[{display:kt("larger than"),value:"lgt"}],Action:[{display:kt("Restrict Peer"),value:"restrict"},{display:kt("Delete Peer"),value:"delete"}]}}}),actions:{async getConfigurations(){await jr("/api/getWireguardConfigurations",{},e=>{e.status&&(this.Configurations=e.data)})},regexCheckIP(e){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(e)},checkCIDR(e){return Jo(e)!==0},checkWGKeyLength(e){return console.log(e),/^[A-Za-z0-9+/]{43}=?=?$/.test(e)}}}),by=async()=>{let e=!1;return await jr("/api/validateAuthentication",{},t=>{e=t.status}),e},ps=ay({history:VE(),scrollBehavior(){document.querySelector("main")!==null&&document.querySelector("main").scrollTo({top:0})},routes:[{name:"Index",path:"/",component:()=>Qe(()=>import("./index-C0bjwRB-.js"),__vite__mapDeps([0,1,2,3,4,5])),meta:{requiresAuth:!0},children:[{name:"Configuration List",path:"",component:()=>Qe(()=>import("./configurationList-BAuTfbU-.js"),__vite__mapDeps([6,1,7])),meta:{title:"WireGuard Configurations"}},{name:"Settings",path:"/settings",component:()=>Qe(()=>import("./settings-B22cgeoY.js"),__vite__mapDeps([8,1,3,9,10])),meta:{title:"Settings"}},{path:"/ping",name:"Ping",component:()=>Qe(()=>import("./ping-BB-b6WHn.js"),__vite__mapDeps([11,1,12,13,14]))},{path:"/traceroute",name:"Traceroute",component:()=>Qe(()=>import("./traceroute-BGkng5o-.js"),__vite__mapDeps([15,12,13,1,16]))},{name:"New Configuration",path:"/new_configuration",component:()=>Qe(()=>import("./newConfiguration-R-olohWo.js"),__vite__mapDeps([17,18,1])),meta:{title:"New Configuration"}},{name:"Restore Configuration",path:"/restore_configuration",component:()=>Qe(()=>import("./restoreConfiguration-DN55Pnc_.js"),__vite__mapDeps([19,1,3,18,20])),meta:{title:"Restore Configuration"}},{name:"Configuration",path:"/configuration/:id",component:()=>Qe(()=>import("./configuration-vZnfxuPU.js"),[]),meta:{title:"Configuration"},children:[{name:"Peers List",path:"peers",component:()=>Qe(()=>import("./peerList-C2NQGcke.js"),__vite__mapDeps([21,1,3,22]))},{name:"Peers Create",path:"create",component:()=>Qe(()=>import("./peerCreate-B_n86hyd.js"),__vite__mapDeps([23,1,24]))}]}]},{path:"/signin",component:()=>Qe(()=>import("./signin-M3EwqtyC.js"),__vite__mapDeps([25,2,1,3,4,26])),meta:{title:"Sign In",hideTopNav:!0}},{path:"/welcome",component:()=>Qe(()=>import("./setup-DUH8iz4Z.js"),__vite__mapDeps([27,1])),meta:{requiresAuth:!0,title:"Welcome to WGDashboard",hideTopNav:!0}},{path:"/2FASetup",component:()=>Qe(()=>import("./totp-BZU5dK65.js"),__vite__mapDeps([28,29,1])),meta:{requiresAuth:!0,title:"Multi-Factor Authentication Setup",hideTopNav:!0}},{path:"/share",component:()=>Qe(()=>import("./share-BU0DtM5p.js"),__vite__mapDeps([30,29,1,31])),meta:{title:"Share",hideTopNav:!0}}]});ps.beforeEach(async(e,t,n)=>{const s=yy(),r=un();e.meta.title?e.params.id?document.title=e.params.id+" | WGDashboard":document.title=e.meta.title+" | WGDashboard":document.title="WGDashboard",r.ShowNavBar=!1,document.querySelector(".loadingBar").classList.remove("loadingDone"),document.querySelector(".loadingBar").classList.add("loading"),e.meta.requiresAuth?r.getActiveCrossServer()?(await r.getConfiguration(),!s.Configurations&&e.name!=="Configuration List"&&await s.getConfigurations(),n()):dy.getCookie("authToken")&&await by()?(await r.getConfiguration(),!s.Configurations&&e.name!=="Configuration List"&&await s.getConfigurations(),r.Redirect=void 0,n()):(r.Redirect=e,n("/signin"),r.newMessage("WGDashboard","Sign in session ended, please sign in again","warning")):n()});ps.afterEach(()=>{document.querySelector(".loadingBar").classList.remove("loading"),document.querySelector(".loadingBar").classList.add("loadingDone")});const Ff=()=>{let e={"content-type":"application/json"};const n=un().getActiveCrossServer();return n&&(e["wg-dashboard-apikey"]=n.apiKey),e},Hf=e=>{const n=un().getActiveCrossServer();return n?`${n.host}${e}`:`${window.location.protocol}//${(window.location.host+window.location.pathname+e).replace(/\/\//g,"/")}`},jr=async(e,t=void 0,n=void 0)=>{const s=new URLSearchParams(t);await fetch(`${Hf(e)}?${s.toString()}`,{headers:Ff()}).then(r=>{const o=un();if(r.ok)return r.json();if(r.status!==200)throw r.status===401&&o.newMessage("WGDashboard","Sign in session ended, please sign in again","warning"),new Error(r.statusText)}).then(r=>n?n(r):void 0).catch(r=>{console.log(r),ps.push({path:"/signin"})})},hb=async(e,t,n)=>{await fetch(`${Hf(e)}`,{headers:Ff(),method:"POST",body:JSON.stringify(t)}).then(s=>{const r=un();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),ps.push({path:"/signin"})})};let Tr;const Ay=new Uint8Array(16);function Ty(){if(!Tr&&(Tr=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!Tr))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Tr(Ay)}const Re=[];for(let e=0;e<256;++e)Re.push((e+256).toString(16).slice(1));function wy(e,t=0){return Re[e[t+0]]+Re[e[t+1]]+Re[e[t+2]]+Re[e[t+3]]+"-"+Re[e[t+4]]+Re[e[t+5]]+"-"+Re[e[t+6]]+Re[e[t+7]]+"-"+Re[e[t+8]]+Re[e[t+9]]+"-"+Re[e[t+10]]+Re[e[t+11]]+Re[e[t+12]]+Re[e[t+13]]+Re[e[t+14]]+Re[e[t+15]]}const Cy=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),cc={randomUUID:Cy};function uc(e,t,n){if(cc.randomUUID&&!t&&!e)return cc.randomUUID();e=e||{};const s=e.random||(e.rng||Ty)();return s[6]=s[6]&15|64,s[8]=s[8]&63|128,wy(s)}const un=yf("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 e=localStorage.getItem("CrossServerConfiguration");localStorage.getItem("ActiveCrossServerConfiguration")!==null&&(this.ActiveServerConfiguration=localStorage.getItem("ActiveCrossServerConfiguration")),e===null?window.localStorage.setItem("CrossServerConfiguration",JSON.stringify(this.CrossServerConfiguration)):this.CrossServerConfiguration=JSON.parse(e)},syncCrossServerConfiguration(){window.localStorage.setItem("CrossServerConfiguration",JSON.stringify(this.CrossServerConfiguration))},addCrossServerConfiguration(){this.CrossServerConfiguration.ServerList[uc().toString()]={host:"",apiKey:"",active:!1}},deleteCrossServerConfiguration(e){delete this.CrossServerConfiguration.ServerList[e]},getActiveCrossServer(){const e=localStorage.getItem("ActiveCrossServerConfiguration");if(e!==null)return this.CrossServerConfiguration.ServerList[e]},setActiveCrossServer(e){this.ActiveServerConfiguration=e,localStorage.setItem("ActiveCrossServerConfiguration",e)},removeActiveCrossServer(){this.ActiveServerConfiguration=void 0,localStorage.removeItem("ActiveCrossServerConfiguration")},async getConfiguration(){await jr("/api/getDashboardConfiguration",{},e=>{e.status&&(this.Configuration=e.data)})},async signOut(){await jr("/api/signout",{},e=>{this.removeActiveCrossServer(),this.$router.go("/signin")})},newMessage(e,t,n){this.Messages.push({id:uc(),from:kt(e),content:kt(t),type:n,show:!0})},applyLocale(e){if(this.Locale===null)return e;const n=Object.keys(this.Locale).filter(s=>e.match(new RegExp("^"+s+"$","g"))!==null);return console.log(n),n.length===0||n.length>1?e:this.Locale[n[0]]}}});/*! SPDX-License-Identifier: GPL-2.0 + * + * Copyright (C) 2015-2020 Jason A. Donenfeld . All Rights Reserved. + */(function(){function e(b){var y=new Float64Array(16);if(b)for(var S=0;S>16&1),T[w-1]&=65535;T[15]=A[15]-32767-(T[14]>>16&1),S=T[15]>>16&1,T[14]&=65535,s(A,T,1-S)}for(var w=0;w<16;++w)b[2*w]=A[w]&255,b[2*w+1]=A[w]>>8}function n(b){for(var y=0;y<16;++y)b[(y+1)%16]+=(y<15?1:38)*Math.floor(b[y]/65536),b[y]&=65535}function s(b,y,S){for(var T,A=~(S-1),w=0;w<16;++w)T=A&(b[w]^y[w]),b[w]^=T,y[w]^=T}function r(b,y,S){for(var T=0;T<16;++T)b[T]=y[T]+S[T]|0}function o(b,y,S){for(var T=0;T<16;++T)b[T]=y[T]-S[T]|0}function a(b,y,S){for(var T=new Float64Array(31),A=0;A<16;++A)for(var w=0;w<16;++w)T[A+w]+=y[A]*S[w];for(var A=0;A<15;++A)T[A]+=38*T[A+16];for(var A=0;A<16;++A)b[A]=T[A];n(b),n(b)}function l(b,y){for(var S=e(),T=0;T<16;++T)S[T]=y[T];for(var T=253;T>=0;--T)a(S,S,S),T!==2&&T!==4&&a(S,S,y);for(var T=0;T<16;++T)b[T]=S[T]}function c(b){b[31]=b[31]&127|64,b[0]&=248}function d(b){for(var y,S=new Uint8Array(32),T=e([1]),A=e([9]),w=e(),j=e([1]),B=e(),Q=e(),oe=e([56129,1]),he=e([9]),te=0;te<32;++te)S[te]=b[te];c(S);for(var te=254;te>=0;--te)y=S[te>>>3]>>>(te&7)&1,s(T,A,y),s(w,j,y),r(B,T,w),o(T,T,w),r(w,A,j),o(A,A,j),a(j,B,B),a(Q,T,T),a(T,w,T),a(w,A,B),r(B,T,w),o(T,T,w),a(A,T,T),o(w,j,Q),a(T,w,oe),r(T,T,j),a(w,w,T),a(T,j,Q),a(j,A,he),a(A,B,B),s(T,A,y),s(w,j,y);return l(w,w),a(T,T,w),t(S,T),S}function f(){var b=new Uint8Array(32);return window.crypto.getRandomValues(b),b}function h(){var b=f();return c(b),b}function p(b,y){for(var S=Uint8Array.from([y[0]>>2&63,(y[0]<<4|y[1]>>4)&63,(y[1]<<2|y[2]>>6)&63,y[2]&63]),T=0;T<4;++T)b[T]=S[T]+65+(25-S[T]>>8&6)-(51-S[T]>>8&75)-(61-S[T]>>8&15)+(62-S[T]>>8&3)}function E(b){var y,S=new Uint8Array(44);for(y=0;y<32/3;++y)p(S.subarray(y*4),b.subarray(y*3));return p(S.subarray(y*4),Uint8Array.from([b[y*3+0],b[y*3+1],0])),S[43]=61,String.fromCharCode.apply(null,S)}function x(b){let y=window.atob(b),S=y.length,T=new Uint8Array(S);for(let w=0;w>>8&255,y>>>16&255,y>>>24&255)}function D(b,y){b.push(y&255,y>>>8&255)}function P(b,y){for(var S=0;S>>1:y>>>1;k.table[S]=y}}for(var A=-1,w=0;w>>8^k.table[(A^b[w])&255];return(A^-1)>>>0}function M(b){for(var y=[],S=[],T=0,A=0;A{const n=e.__vccOpts||e;for(const[s,r]of t)n[s]=r;return n},Oy={key:0,class:"navbar bg-dark sticky-top","data-bs-theme":"dark"},xy={class:"container-fluid d-flex text-body align-items-center"},Ny={key:0,class:"bi bi-list"},$y={key:1,class:"bi bi-x-lg"},Dy={__name:"App",setup(e){const t=un();t.initCrossServerConfiguration(),window.IS_WGDASHBOARD_DESKTOP&&(t.IsElectronApp=!0,t.CrossServerConfiguration.Enable=!0),Jn(t.CrossServerConfiguration,()=>{t.syncCrossServerConfiguration()},{deep:!0});const n=cy();return(s,r)=>{const o=__("RouterLink");return Ct(),br(Ve,null,[r[2]||(r[2]=Gn("div",{style:{"z-index":"9999",height:"5px"},class:"position-absolute loadingBar top-0 start-0"},null,-1)),vt(n).meta.hideTopNav?iv("",!0):(Ct(),br("nav",Oy,[Gn("div",xy,[ye(o,{to:"/",class:"navbar-brand mb-0 h1"},{default:Un(()=>r[1]||(r[1]=[Gn("img",{src:oE,alt:"WGDashboard Logo",style:{width:"32px"}},null,-1)])),_:1}),Gn("a",{role:"button",class:"navbarBtn text-body",onClick:r[0]||(r[0]=a=>vt(t).ShowNavBar=!vt(t).ShowNavBar),style:{"line-height":"0","font-size":"2rem"}},[ye(Al,{name:"fade2",mode:"out-in"},{default:Un(()=>[vt(t).ShowNavBar?(Ct(),br("i",$y)):(Ct(),br("i",Ny))]),_:1})])])])),(Ct(),js(z_,null,{default:Un(()=>[ye(vt(Rf),null,{default:Un(({Component:a})=>[ye(Al,{name:"app",mode:"out-in",type:"transition",appear:""},{default:Un(()=>[(Ct(),js(v_(a)))]),_:2},1024)]),_:1})]),_:1}))],64)}}},Ly=Sy(Dy,[["__scopeId","data-v-7966f302"]]);let co;await fetch("/api/locale").then(e=>e.json()).then(e=>co=e.data).catch(()=>{co=null});const Zo=Xv(Ly);Zo.use(ps);const Bf=eE();Bf.use(({store:e})=>{e.$router=Zr(ps)});Zo.use(Bf);const Ry=un();Ry.Locale=co;Zo.mount("#app");export{cy as $,ub as A,vt as B,Gs as C,un as D,Jn as E,Ve as F,kt as G,db as H,Yc as I,Tm as J,Fo as K,cu as L,zo as M,gv as N,jo as O,fe as P,ei as Q,Po as R,z_ as S,Al as T,Zy as U,Qe as V,yy as W,lb as X,vg as Y,Gy as Z,Sy as _,Ct as a,Jy as a0,sb as a1,zy as a2,tb as a3,nb as a4,qy as a5,sv as a6,ov as a7,Te as a8,Qy as a9,cb as aa,fb as ab,rb as ac,d_ as ad,ib as ae,Gn as b,br as c,ye as d,iv as e,rv as f,jr as g,eb as h,js as i,__ as j,ab as k,v_ as l,Xy as m,Xr as n,Bo as o,uc as p,hb as q,Cn as r,Vl as s,Am as t,ob as u,jv as v,Un as w,lt as x,Wv as y,zr as z}; diff --git a/src/static/app/dist/assets/localeText-CaAXeE0W.js b/src/static/app/dist/assets/localeText-CaAXeE0W.js new file mode 100644 index 0000000..48972bc --- /dev/null +++ b/src/static/app/dist/assets/localeText-CaAXeE0W.js @@ -0,0 +1 @@ +import{_ as t,G as e,t as o}from"./index-DOaPWS1X.js";const s={name:"localeText",props:{t:""},computed:{getLocaleText(){return e(this.t)}}};function a(c,r,n,p,_,i){return o(this.getLocaleText)}const x=t(s,[["render",a]]);export{x as L}; diff --git a/src/static/app/dist/assets/message-ChztDIV3.js b/src/static/app/dist/assets/message-ChztDIV3.js new file mode 100644 index 0000000..3d80d4d --- /dev/null +++ b/src/static/app/dist/assets/message-ChztDIV3.js @@ -0,0 +1 @@ +import{L as c}from"./localeText-CaAXeE0W.js";import{d as n}from"./dayjs.min-D8jwq_wn.js";import{_ as d,a as r,c as m,b as s,d as i,f as t,t as e,n as l,j as _}from"./index-DOaPWS1X.js";const p={name:"message",methods:{dayjs:n},components:{LocaleText:c},props:{message:Object},mounted(){setTimeout(()=>{this.message.show=!1},5e3)}},g=["id"],h={class:"card-body"},f={class:"d-flex"},x={class:"fw-bold d-block",style:{"text-transform":"uppercase"}},u={class:"ms-auto"};function b(y,v,w,T,j,a){const o=_("LocaleText");return r(),m("div",{class:l(["card shadow rounded-3 position-relative 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},[s("div",h,[s("div",f,[s("small",x,[i(o,{t:"FROM "}),t(" "+e(this.message.from),1)]),s("small",u,e(a.dayjs().format("hh:mm A")),1)]),t(" "+e(this.message.content),1)])],10,g)}const M=d(p,[["render",b],["__scopeId","data-v-f50b8f0c"]]);export{M}; diff --git a/src/static/app/dist/assets/newConfiguration-R-olohWo.js b/src/static/app/dist/assets/newConfiguration-R-olohWo.js new file mode 100644 index 0000000..69bcf07 --- /dev/null +++ b/src/static/app/dist/assets/newConfiguration-R-olohWo.js @@ -0,0 +1 @@ +import{p as b}from"./index-L60y6kc9.js";import{_ as y,W as _,q as w,c as d,b as s,d as o,w as C,m as l,s as u,t as c,f as g,j as m,a as r}from"./index-DOaPWS1X.js";import{L as P}from"./localeText-CaAXeE0W.js";const x={name:"newConfiguration",components:{LocaleText:P},setup(){return{store:_()}},data(){return{newConfiguration:{ConfigurationName:"",Address:"",ListenPort:"",PrivateKey:"",PublicKey:"",PresharedKey:"",PreUp:"",PreDown:"",PostUp:"",PostDown:""},numberOfAvailableIPs:"0",error:!1,errorMessage:"",success:!1,loading:!1}},created(){this.wireguardGenerateKeypair()},methods:{wireguardGenerateKeypair(){const t=window.wireguard.generateKeypair();this.newConfiguration.PrivateKey=t.privateKey,this.newConfiguration.PublicKey=t.publicKey,this.newConfiguration.PresharedKey=t.presharedKey},async saveNewConfiguration(){this.goodToSubmit&&(this.loading=!0,await w("/api/addWireguardConfiguration",this.newConfiguration,async t=>{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(a=>this.newConfiguration[a].length===0)===void 0&&e.find(a=>a.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(f=>f.length>0).length!==2)throw Error();let a=b(t),p=a.end-a.start;this.numberOfAvailableIPs=p.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(a=>a.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")}}}},L={class:"mt-md-5 mt-3 text-body"},K={class:"container mb-4"},k={class:"mb-4 d-flex align-items-center gap-4"},A={class:"mb-0"},U={class:"card rounded-3 shadow"},S={class:"card-header"},N={class:"card-body"},q=["disabled"],D={class:"invalid-feedback"},I={key:0},O={key:1},T={class:"mb-0"},$={class:"card rounded-3 shadow"},V={class:"card-header"},M={class:"card-body",style:{"font-family":"var(--bs-font-monospace)"}},R={class:"mb-2"},B={class:"text-muted fw-bold mb-1"},E={class:"input-group"},G=["disabled"],W={class:"text-muted fw-bold mb-1"},j={class:"card rounded-3 shadow"},z={class:"card-header"},Z={class:"card-body"},F=["disabled"],H={class:"invalid-feedback"},J={key:0},Q={key:1},X={class:"card rounded-3 shadow"},Y={class:"card-header d-flex align-items-center"},ss={class:"badge rounded-pill text-bg-success ms-auto"},es={class:"card-body"},ts=["disabled"],is={class:"invalid-feedback"},os={key:0},ns={key:1},as={class:"accordion",id:"newConfigurationOptionalAccordion"},ds={class:"accordion-item"},rs={class:"accordion-header"},ls={class:"accordion-button collapsed",type:"button","data-bs-toggle":"collapse","data-bs-target":"#newConfigurationOptionalAccordionCollapse"},us={id:"newConfigurationOptionalAccordionCollapse",class:"accordion-collapse collapse","data-bs-parent":"#newConfigurationOptionalAccordion"},cs={class:"accordion-body d-flex flex-column gap-3"},fs={class:"card rounded-3"},ps={class:"card-body"},gs={class:"card rounded-3"},ms={class:"card-body"},hs={class:"card rounded-3"},vs={class:"card-body"},bs={class:"card rounded-3"},ys={class:"card-body"},_s=["disabled"],ws={key:0,class:"d-flex w-100"},Cs={key:1,class:"d-flex w-100"},Ps={key:2,class:"d-flex w-100 align-items-center"};function xs(t,e,a,p,f,h){const v=m("RouterLink"),n=m("LocaleText");return r(),d("div",L,[s("div",K,[s("div",k,[o(v,{to:"/",class:"btn btn-dark btn-brand p-2 shadow",style:{"border-radius":"100%"}},{default:C(()=>e[11]||(e[11]=[s("h2",{class:"mb-0",style:{"line-height":"0"}},[s("i",{class:"bi bi-arrow-left-circle"})],-1)])),_:1}),s("h2",A,[o(n,{t:"New Configuration"})])]),s("form",{class:"text-body d-flex flex-column gap-3",onSubmit:e[10]||(e[10]=i=>{i.preventDefault(),this.saveNewConfiguration()})},[s("div",U,[s("div",S,[o(n,{t:"Configuration Name"})]),s("div",N,[l(s("input",{type:"text",class:"form-control",placeholder:"ex. wg1",id:"ConfigurationName","onUpdate:modelValue":e[0]||(e[0]=i=>this.newConfiguration.ConfigurationName=i),disabled:this.loading,required:""},null,8,q),[[u,this.newConfiguration.ConfigurationName]]),s("div",D,[this.error?(r(),d("div",I,c(this.errorMessage),1)):(r(),d("div",O,[o(n,{t:"Configuration name is invalid. Possible reasons:"}),s("ul",T,[s("li",null,[o(n,{t:"Configuration name already exist."})]),s("li",null,[o(n,{t:"Configuration name can only contain 15 lower/uppercase alphabet, numbers, underscore, equal sign, plus sign, period and hyphen."})])])]))])])]),s("div",$,[s("div",V,[o(n,{t:"Private Key"}),e[12]||(e[12]=g(" & ")),o(n,{t:"Public Key"})]),s("div",M,[s("div",R,[s("label",B,[s("small",null,[o(n,{t:"Private Key"})])]),s("div",E,[l(s("input",{type:"text",class:"form-control",id:"PrivateKey",required:"",disabled:this.loading,"onUpdate:modelValue":e[1]||(e[1]=i=>this.newConfiguration.PrivateKey=i)},null,8,G),[[u,this.newConfiguration.PrivateKey]]),s("button",{class:"btn btn-outline-primary",type:"button",title:"Regenerate Private Key",onClick:e[2]||(e[2]=i=>h.wireguardGenerateKeypair())},e[13]||(e[13]=[s("i",{class:"bi bi-arrow-repeat"},null,-1)]))])]),s("div",null,[s("label",W,[s("small",null,[o(n,{t:"Public Key"})])]),l(s("input",{type:"text",class:"form-control",id:"PublicKey","onUpdate:modelValue":e[3]||(e[3]=i=>this.newConfiguration.PublicKey=i),disabled:""},null,512),[[u,this.newConfiguration.PublicKey]])])])]),s("div",j,[s("div",z,[o(n,{t:"Listen Port"})]),s("div",Z,[l(s("input",{type:"number",class:"form-control",placeholder:"0-65353",id:"ListenPort",min:"1",max:"65353","onUpdate:modelValue":e[4]||(e[4]=i=>this.newConfiguration.ListenPort=i),disabled:this.loading,required:""},null,8,F),[[u,this.newConfiguration.ListenPort]]),s("div",H,[this.error?(r(),d("div",J,c(this.errorMessage),1)):(r(),d("div",Q,[o(n,{t:"Invalid port"})]))])])]),s("div",X,[s("div",Y,[o(n,{t:"IP Address/CIDR"}),s("span",ss,c(f.numberOfAvailableIPs)+" Available IPs",1)]),s("div",es,[l(s("input",{type:"text",class:"form-control",placeholder:"Ex: 10.0.0.1/24",id:"Address","onUpdate:modelValue":e[5]||(e[5]=i=>this.newConfiguration.Address=i),disabled:this.loading,required:""},null,8,ts),[[u,this.newConfiguration.Address]]),s("div",is,[this.error?(r(),d("div",os,c(this.errorMessage),1)):(r(),d("div",ns," IP Address/CIDR is invalid "))])])]),e[22]||(e[22]=s("hr",null,null,-1)),s("div",as,[s("div",ds,[s("h2",rs,[s("button",ls,[o(n,{t:"Optional Settings"})])]),s("div",us,[s("div",cs,[s("div",fs,[e[14]||(e[14]=s("div",{class:"card-header"},"PreUp",-1)),s("div",ps,[l(s("input",{type:"text",class:"form-control",id:"preUp","onUpdate:modelValue":e[6]||(e[6]=i=>this.newConfiguration.PreUp=i)},null,512),[[u,this.newConfiguration.PreUp]])])]),s("div",gs,[e[15]||(e[15]=s("div",{class:"card-header"},"PreDown",-1)),s("div",ms,[l(s("input",{type:"text",class:"form-control",id:"preDown","onUpdate:modelValue":e[7]||(e[7]=i=>this.newConfiguration.PreDown=i)},null,512),[[u,this.newConfiguration.PreDown]])])]),s("div",hs,[e[16]||(e[16]=s("div",{class:"card-header"},"PostUp",-1)),s("div",vs,[l(s("input",{type:"text",class:"form-control",id:"postUp","onUpdate:modelValue":e[8]||(e[8]=i=>this.newConfiguration.PostUp=i)},null,512),[[u,this.newConfiguration.PostUp]])])]),s("div",bs,[e[17]||(e[17]=s("div",{class:"card-header"},"PostDown",-1)),s("div",ys,[l(s("input",{type:"text",class:"form-control",id:"postDown","onUpdate:modelValue":e[9]||(e[9]=i=>this.newConfiguration.PostDown=i)},null,512),[[u,this.newConfiguration.PostDown]])])])])])])]),s("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(),d("span",ws,[o(n,{t:"Success"}),e[18]||(e[18]=g("! ")),e[19]||(e[19]=s("i",{class:"bi bi-check-circle-fill ms-2"},null,-1))])):this.loading?(r(),d("span",Ps,[o(n,{t:"Saving..."}),e[21]||(e[21]=s("span",{class:"ms-2 spinner-border spinner-border-sm",role:"status"},null,-1))])):(r(),d("span",Cs,[e[20]||(e[20]=s("i",{class:"bi bi-save-fill me-2"},null,-1)),o(n,{t:"Save"})]))],8,_s)],32)])])}const As=y(x,[["render",xs]]);export{As as default}; diff --git a/src/static/app/dist/assets/osmap-BRB1j1wE.js b/src/static/app/dist/assets/osmap-BRB1j1wE.js new file mode 100644 index 0000000..687a6d9 --- /dev/null +++ b/src/static/app/dist/assets/osmap-BRB1j1wE.js @@ -0,0 +1,10 @@ +import{_ as el,D as il,a as nl,c as sl,e as rl}from"./index-DOaPWS1X.js";class fe{constructor(t){this.propagationStopped,this.defaultPrevented,this.type=t,this.target=null}preventDefault(){this.defaultPrevented=!0}stopPropagation(){this.propagationStopped=!0}}const di={PROPERTYCHANGE:"propertychange"};class Wn{constructor(){this.disposed=!1}dispose(){this.disposed||(this.disposed=!0,this.disposeInternal())}disposeInternal(){}}function ol(n,t,e){let i,s;e=e||ae;let r=0,o=n.length,a=!1;for(;r>1),s=+e(n[i],t),s<0?r=i+1:(o=i,a=!s);return a?r:~r}function ae(n,t){return n>t?1:n0?s-1:s}return i-1}if(e>0){for(let s=1;s0||o===0)})}function Wi(){return!0}function Zn(){return!1}function fi(){}function No(n){let t,e,i;return function(){const s=Array.prototype.slice.call(arguments);return(!e||this!==i||!Ae(s,e))&&(i=this,e=s,t=n.apply(this,arguments)),t}}function hl(n){function t(){let e;try{e=n()}catch(i){return Promise.reject(i)}return e instanceof Promise?e:Promise.resolve(e)}return t()}function nn(n){for(const t in n)delete n[t]}function gi(n){let t;for(t in n)return!1;return!t}class Kn extends Wn{constructor(t){super(),this.eventTarget_=t,this.pendingRemovals_=null,this.dispatching_=null,this.listeners_=null}addEventListener(t,e){if(!t||!e)return;const i=this.listeners_||(this.listeners_={}),s=i[t]||(i[t]=[]);s.includes(e)||s.push(e)}dispatchEvent(t){const e=typeof t=="string",i=e?t:t.type,s=this.listeners_&&this.listeners_[i];if(!s)return;const r=e?new fe(t):t;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,h=s.length;c0:!1}removeEventListener(t,e){if(!this.listeners_)return;const i=this.listeners_[t];if(!i)return;const s=i.indexOf(e);s!==-1&&(this.pendingRemovals_&&t in this.pendingRemovals_?(i[s]=fi,++this.pendingRemovals_[t]):(i.splice(s,1),i.length===0&&delete this.listeners_[t]))}}const z={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 V(n,t,e,i,s){if(s){const o=e;e=function(){n.removeEventListener(t,e),o.apply(i??this,arguments)}}else i&&i!==n&&(e=e.bind(i));const r={target:n,type:t,listener:e};return n.addEventListener(t,e),r}function vn(n,t,e,i){return V(n,t,e,i,!0)}function tt(n){n&&n.target&&(n.target.removeEventListener(n.type,n.listener),nn(n))}class sn extends Kn{constructor(){super(),this.on=this.onInternal,this.once=this.onceInternal,this.un=this.unInternal,this.revision_=0}changed(){++this.revision_,this.dispatchEvent(z.CHANGE)}getRevision(){return this.revision_}onInternal(t,e){if(Array.isArray(t)){const i=t.length,s=new Array(i);for(let r=0;r0;)this.pop()}extend(t){for(let e=0,i=t.length;ethis.getLength())throw new Error("Index out of bounds: "+t);this.unique_&&this.assertUnique_(e),this.array_.splice(t,0,e),this.updateLength_(),this.dispatchEvent(new gn(wt.ADD,e,t))}pop(){return this.removeAt(this.getLength()-1)}push(t){this.unique_&&this.assertUnique_(t);const e=this.getLength();return this.insertAt(e,t),this.getLength()}remove(t){const e=this.array_;for(let i=0,s=e.length;i=this.getLength())return;const e=this.array_[t];return this.array_.splice(t,1),this.updateLength_(),this.dispatchEvent(new gn(wt.REMOVE,e,t)),e}setAt(t,e){const i=this.getLength();if(t>=i){this.insertAt(t,e);return}if(t<0)throw new Error("Index out of bounds: "+t);this.unique_&&this.assertUnique_(e,t);const s=this.array_[t];this.array_[t]=e,this.dispatchEvent(new gn(wt.REMOVE,s,t)),this.dispatchEvent(new gn(wt.ADD,e,t))}updateLength_(){this.set(Nr.LENGTH,this.array_.length)}assertUnique_(t,e){for(let i=0,s=this.array_.length;i1?(e=s,i=r):l>0&&(e+=o*l,i+=a*l)}return hi(n,t,e,i)}function hi(n,t,e,i){const s=e-n,r=i-t;return s*s+r*r}function fl(n){const t=n.length;for(let i=0;ir&&(r=l,s=a)}if(r===0)return null;const o=n[s];n[s]=n[i],n[i]=o;for(let a=i+1;a=0;i--){e[i]=n[i][t]/n[i][i];for(let s=i-1;s>=0;s--)n[s][t]-=n[s][i]*e[i]}return e}function In(n){return n*Math.PI/180}function ci(n,t){const e=n%t;return e*t<0?e+t:e}function St(n,t,e){return n+e*(t-n)}function Vs(n,t){const e=Math.pow(10,t);return Math.round(n*e)/e}function _n(n,t){return Math.floor(Vs(n,t))}function mn(n,t){return Math.ceil(Vs(n,t))}class Go extends $t{constructor(t){super(),this.on,this.once,this.un,this.background_=t.background;const e=Object.assign({},t);typeof t.properties=="object"&&(delete e.properties,Object.assign(e,t.properties)),e[J.OPACITY]=t.opacity!==void 0?t.opacity:1,j(typeof e[J.OPACITY]=="number","Layer opacity must be a number"),e[J.VISIBLE]=t.visible!==void 0?t.visible:!0,e[J.Z_INDEX]=t.zIndex,e[J.MAX_RESOLUTION]=t.maxResolution!==void 0?t.maxResolution:1/0,e[J.MIN_RESOLUTION]=t.minResolution!==void 0?t.minResolution:0,e[J.MIN_ZOOM]=t.minZoom!==void 0?t.minZoom:-1/0,e[J.MAX_ZOOM]=t.maxZoom!==void 0?t.maxZoom:1/0,this.className_=e.className!==void 0?e.className:"ol-layer",delete e.className,this.setProperties(e),this.state_=null}getBackground(){return this.background_}getClassName(){return this.className_}getLayerState(t){const e=this.state_||{layer:this,managed:t===void 0?!0:t},i=this.getZIndex();return e.opacity=st(Math.round(this.getOpacity()*100)/100,0,1),e.visible=this.getVisible(),e.extent=this.getExtent(),e.zIndex=i===void 0&&!e.managed?1/0:i,e.maxResolution=this.getMaxResolution(),e.minResolution=Math.max(this.getMinResolution(),0),e.minZoom=this.getMinZoom(),e.maxZoom=this.getMaxZoom(),this.state_=e,e}getLayersArray(t){return U()}getLayerStatesArray(t){return U()}getExtent(){return this.get(J.EXTENT)}getMaxResolution(){return this.get(J.MAX_RESOLUTION)}getMinResolution(){return this.get(J.MIN_RESOLUTION)}getMinZoom(){return this.get(J.MIN_ZOOM)}getMaxZoom(){return this.get(J.MAX_ZOOM)}getOpacity(){return this.get(J.OPACITY)}getSourceState(){return U()}getVisible(){return this.get(J.VISIBLE)}getZIndex(){return this.get(J.Z_INDEX)}setBackground(t){this.background_=t,this.changed()}setExtent(t){this.set(J.EXTENT,t)}setMaxResolution(t){this.set(J.MAX_RESOLUTION,t)}setMinResolution(t){this.set(J.MIN_RESOLUTION,t)}setMaxZoom(t){this.set(J.MAX_ZOOM,t)}setMinZoom(t){this.set(J.MIN_ZOOM,t)}setOpacity(t){j(typeof t=="number","Layer opacity must be a number"),this.set(J.OPACITY,t)}setVisible(t){this.set(J.VISIBLE,t)}setZIndex(t){this.set(J.Z_INDEX,t)}disposeInternal(){this.state_&&(this.state_.layer=null,this.state_=null),super.disposeInternal()}}const Ot={PRERENDER:"prerender",POSTRENDER:"postrender",PRECOMPOSE:"precompose",POSTCOMPOSE:"postcompose",RENDERCOMPLETE:"rendercomplete"},mt={ANIMATING:0,INTERACTING:1},Nt={CENTER:"center",RESOLUTION:"resolution",ROTATION:"rotation"},gl=42,Us=256,js={radians:6370997/(2*Math.PI),degrees:2*Math.PI*6370997/360,ft:.3048,m:1,"us-ft":1200/3937};class zo{constructor(t){this.code_=t.code,this.units_=t.units,this.extent_=t.extent!==void 0?t.extent:null,this.worldExtent_=t.worldExtent!==void 0?t.worldExtent:null,this.axisOrientation_=t.axisOrientation!==void 0?t.axisOrientation:"enu",this.global_=t.global!==void 0?t.global:!1,this.canWrapX_=!!(this.global_&&this.extent_),this.getPointResolutionFunc_=t.getPointResolution,this.defaultTileGrid_=null,this.metersPerUnit_=t.metersPerUnit}canWrapX(){return this.canWrapX_}getCode(){return this.code_}getExtent(){return this.extent_}getUnits(){return this.units_}getMetersPerUnit(){return this.metersPerUnit_||js[this.units_]}getWorldExtent(){return this.worldExtent_}getAxisOrientation(){return this.axisOrientation_}isGlobal(){return this.global_}setGlobal(t){this.global_=t,this.canWrapX_=!!(t&&this.extent_)}getDefaultTileGrid(){return this.defaultTileGrid_}setDefaultTileGrid(t){this.defaultTileGrid_=t}setExtent(t){this.extent_=t,this.canWrapX_=!!(this.global_&&t)}setWorldExtent(t){this.worldExtent_=t}setGetPointResolution(t){this.getPointResolutionFunc_=t}getPointResolutionFunc(){return this.getPointResolutionFunc_}}const rn=6378137,oi=Math.PI*rn,_l=[-oi,-oi,oi,oi],ml=[-180,-85,180,85],pn=rn*Math.log(Math.tan(Math.PI/2));class je extends zo{constructor(t){super({code:t,units:"m",extent:_l,global:!0,worldExtent:ml,getPointResolution:function(e,i){return e/Math.cosh(i[1]/rn)}})}}const Gr=[new je("EPSG:3857"),new je("EPSG:102100"),new je("EPSG:102113"),new je("EPSG:900913"),new je("http://www.opengis.net/def/crs/EPSG/0/3857"),new je("http://www.opengis.net/gml/srs/epsg.xml#3857")];function pl(n,t,e,i){const s=n.length;e=e>1?e:2,i=i??e,t===void 0&&(e>2?t=n.slice():t=new Array(s));for(let r=0;rpn?o=pn:o<-pn&&(o=-pn),t[r+1]=o}return t}function yl(n,t,e,i){const s=n.length;e=e>1?e:2,i=i??e,t===void 0&&(e>2?t=n.slice():t=new Array(s));for(let r=0;rs&&(l=l|ht.RIGHT),ar&&(l=l|ht.ABOVE),l===ht.UNKNOWN&&(l=ht.INTERSECTING),l}function Ft(){return[1/0,1/0,-1/0,-1/0]}function Se(n,t,e,i,s){return s?(s[0]=n,s[1]=t,s[2]=e,s[3]=i,s):[n,t,e,i]}function Bn(n){return Se(1/0,1/0,-1/0,-1/0,n)}function Yo(n,t){const e=n[0],i=n[1];return Se(e,i,e,i,t)}function $s(n,t,e,i,s){const r=Bn(s);return Zo(r,n,t,e,i)}function Yi(n,t){return n[0]==t[0]&&n[2]==t[2]&&n[1]==t[1]&&n[3]==t[3]}function Tl(n,t){return t[0]n[2]&&(n[2]=t[2]),t[1]n[3]&&(n[3]=t[3]),n}function zi(n,t){t[0]n[2]&&(n[2]=t[0]),t[1]n[3]&&(n[3]=t[1])}function Zo(n,t,e,i,s){for(;et[0]?i[0]=n[0]:i[0]=t[0],n[1]>t[1]?i[1]=n[1]:i[1]=t[1],n[2]=t[0]&&n[1]<=t[3]&&n[3]>=t[1]}function Hn(n){return n[2]=o&&_<=l),!i&&r&ht.RIGHT&&!(s&ht.RIGHT)&&(m=f-(d-l)*g,i=m>=a&&m<=c),!i&&r&ht.BELOW&&!(s&ht.BELOW)&&(_=d-(f-a)/g,i=_>=o&&_<=l),!i&&r&ht.LEFT&&!(s&ht.LEFT)&&(m=f-(d-o)*g,i=m>=a&&m<=c)}return i}function Bo(n,t){const e=t.getExtent(),i=Xe(n);if(t.canWrapX()&&(i[0]=e[2])){const s=q(e),o=Math.floor((i[0]-e[0])/s)*s;n[0]-=o,n[2]-=o}return n}function Js(n,t,e){if(t.canWrapX()){const i=t.getExtent();if(!isFinite(n[0])||!isFinite(n[2]))return[[i[0],n[1],i[2],n[3]]];Bo(n,t);const s=q(i);if(q(n)>s&&!e)return[[i[0],n[1],i[2],n[3]]];if(n[0]i[2])return[[n[0],n[1],i[2],n[3]],[i[0],n[1],n[2]-s,n[3]]]}return[n]}function Ml(n,t){return n[0]+=+t[0],n[1]+=+t[1],n}function Ln(n,t){let e=!0;for(let i=n.length-1;i>=0;--i)if(n[i]!=t[i]){e=!1;break}return e}function Qs(n,t){const e=Math.cos(t),i=Math.sin(t),s=n[0]*e-n[1]*i,r=n[1]*e+n[0]*i;return n[0]=s,n[1]=r,n}function bl(n,t){return n[0]*=t,n[1]*=t,n}function Vo(n,t){if(t.canWrapX()){const e=q(t.getExtent()),i=Dl(n,t,e);i&&(n[0]-=i*e)}return n}function Dl(n,t,e){const i=t.getExtent();let s=0;return t.canWrapX()&&(n[0]i[2])&&(e=e||q(i),s=Math.floor((n[0]-i[0])/e)),s}const Pl=63710088e-1;function Yr(n,t,e){e=e||Pl;const i=In(n[1]),s=In(t[1]),r=(s-i)/2,o=In(t[0]-n[0])/2,a=Math.sin(r)*Math.sin(r)+Math.sin(o)*Math.sin(o)*Math.cos(i)*Math.cos(s);return 2*e*Math.atan2(Math.sqrt(a),Math.sqrt(1-a))}function Uo(...n){console.warn(...n)}let Os=!0;function jo(n){Os=!1}function tr(n,t){if(t!==void 0){for(let e=0,i=n.length;e=-180&&n[0]<=180&&n[1]>=-90&&n[1]<=90&&(Os=!1,Uo("Call useGeographic() from ol/proj once to work with [longitude, latitude] coordinates.")),n}function $o(n,t){return n}function Te(n,t){return n}function Nl(){Kr(Gr),Kr(Xr),kl(Xr,Gr,pl,yl)}Nl();function Br(n,t,e){return function(i,s,r,o,a){if(!i)return;if(!s&&!t)return i;const l=t?0:r[0]*s,c=t?0:r[1]*s,h=a?a[0]:0,u=a?a[1]:0;let d=n[0]+l/2+h,f=n[2]-l/2+h,g=n[1]+c/2+u,_=n[3]-c/2+u;d>f&&(d=(f+d)/2,f=d),g>_&&(g=(_+g)/2,_=g);let m=st(i[0],d,f),p=st(i[1],g,_);if(o&&e&&s){const y=30*s;m+=-y*Math.log(1+Math.max(0,d-i[0])/y)+y*Math.log(1+Math.max(0,i[0]-f)/y),p+=-y*Math.log(1+Math.max(0,g-i[1])/y)+y*Math.log(1+Math.max(0,i[1]-_)/y)}return[m,p]}}function Gl(n){return n}function nr(n,t,e,i){const s=q(t)/e[0],r=pt(t)/e[1];return i?Math.min(n,Math.max(s,r)):Math.min(n,Math.min(s,r))}function sr(n,t,e){let i=Math.min(n,t);const s=50;return i*=Math.log(1+s*Math.max(0,n/t-1))/s+1,e&&(i=Math.max(i,e),i/=Math.log(1+s*Math.max(0,e/n-1))/s+1),st(i,e/2,t*2)}function zl(n,t,e,i){return t=t!==void 0?t:!0,function(s,r,o,a){if(s!==void 0){const l=n[0],c=n[n.length-1],h=e?nr(l,e,o,i):l;if(a)return t?sr(s,h,c):st(s,c,h);const u=Math.min(h,s),d=Math.floor(Bs(n,u,r));return n[d]>h&&dMath.round(e*jr[i])/jr[i]).join(", ")+")"}function ve(n,t,e,i,s,r,o){r=r||[],o=o||2;let a=0;for(let l=t;l{if(!i)return this.getSimplifiedGeometry(e);const s=this.clone();return s.applyTransform(i),s.getSimplifiedGeometry(e)})}simplifyTransformed(t,e){return this.simplifyTransformedInternal(this.getRevision(),t,e)}clone(){return U()}closestPointXY(t,e,i,s){return U()}containsXY(t,e){const i=this.getClosestPoint([t,e]);return i[0]===t&&i[1]===e}getClosestPoint(t,e){return e=e||[NaN,NaN],this.closestPointXY(t[0],t[1],e,1/0),e}intersectsCoordinate(t){return this.containsXY(t[0],t[1])}computeExtent(t){return U()}getExtent(t){if(this.extentRevision_!=this.getRevision()){const e=this.computeExtent(this.extent_);(isNaN(e[0])||isNaN(e[1]))&&Bn(e),this.extentRevision_=this.getRevision()}return Ll(this.extent_,t)}rotate(t,e){U()}scale(t,e,i){U()}simplify(t){return this.getSimplifiedGeometry(t*t)}getSimplifiedGeometry(t){return U()}getType(){return U()}applyTransform(t){U()}intersectsExtent(t){return U()}translate(t,e){U()}transform(t,e){const i=kt(t),s=i.getUnits()=="tile-pixels"?function(r,o,a){const l=i.getExtent(),c=i.getWorldExtent(),h=pt(c)/pt(l);return de(Hr,c[0],c[3],h,-h,0,0,0),ve(r,0,r.length,a,Hr,o),An(i,e)(r,o,a)}:An(i,e);return this.applyTransform(s),this}}class qn extends ql{constructor(){super(),this.layout="XY",this.stride=2,this.flatCoordinates}computeExtent(t){return $s(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,t)}getCoordinates(){return U()}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(t){if(this.simplifiedGeometryRevision!==this.getRevision()&&(this.simplifiedGeometryMaxMinSquaredTolerance=0,this.simplifiedGeometryRevision=this.getRevision()),t<0||this.simplifiedGeometryMaxMinSquaredTolerance!==0&&t<=this.simplifiedGeometryMaxMinSquaredTolerance)return this;const e=this.getSimplifiedGeometryInternal(t);return e.getFlatCoordinates().length1)u=e;else if(d>0){for(let f=0;fs&&(s=c),r=a,o=l}return s}function Ql(n,t,e,i,s){for(let r=0,o=e.length;r0;){const u=c.pop(),d=c.pop();let f=0;const g=n[d],_=n[d+1],m=n[u],p=n[u+1];for(let y=d+i;yf&&(h=y,f=w)}f>s&&(l[(h-t)/i]=1,d+i0&&_>f)&&(g<0&&m0&&m>g)){c=u,h=d;continue}r[o++]=c,r[o++]=h,a=c,l=h,c=u,h=d}return r[o++]=c,r[o++]=h,o}function ea(n,t,e,i,s,r,o,a){for(let l=0,c=e.length;lr&&(c-a)*(r-l)-(s-a)*(h-l)>0&&o++:h<=r&&(c-a)*(r-l)-(s-a)*(h-l)<0&&o--,a=c,l=h}return o!==0}function na(n,t,e,i,s,r){if(e.length===0||!Ne(n,t,e[0],i,s,r))return!1;for(let o=1,a=e.length;op&&(c=(h+u)/2,na(n,t,e,i,c,g)&&(m=c,p=y)),h=u}return isNaN(m)&&(m=s[r]),o?(o.push(m,g,p),o):[m,g,p]}function ah(n,t,e,i,s){let r=[];for(let o=0,a=e.length;o=s[0]&&r[2]<=s[2]||r[1]>=s[1]&&r[3]<=s[3]?!0:sa(n,t,e,i,function(o,a){return Al(s,o,a)}):!1}function ra(n,t,e,i,s){return!!(cr(n,t,e,i,s)||Ne(n,t,e,i,s[0],s[1])||Ne(n,t,e,i,s[0],s[3])||Ne(n,t,e,i,s[2],s[1])||Ne(n,t,e,i,s[2],s[3]))}function lh(n,t,e,i,s){if(!ra(n,t,e[0],i,s))return!1;if(e.length===1)return!0;for(let r=1,o=e.length;r0}function ch(n,t,e,i,s){s=s!==void 0?s:!1;for(let r=0,o=e.length;r1&&typeof arguments[e-1]=="function"&&(i=arguments[e-1],--e);let s=0;for(;s0}getInteracting(){return this.hints_[mt.INTERACTING]>0}cancelAnimations(){this.setHint(mt.ANIMATING,-this.hints_[mt.ANIMATING]);let t;for(let e=0,i=this.animations_.length;e=0;--i){const s=this.animations_[i];let r=!0;for(let o=0,a=s.length;o0?c/l.duration:1;h>=1?(l.complete=!0,h=1):r=!1;const u=l.easing(h);if(l.sourceCenter){const d=l.sourceCenter[0],f=l.sourceCenter[1],g=l.targetCenter[0],_=l.targetCenter[1];this.nextCenter_=l.targetCenter;const m=d+u*(g-d),p=f+u*(_-f);this.targetCenter_=[m,p]}if(l.sourceResolution&&l.targetResolution){const d=u===1?l.targetResolution:l.sourceResolution+u*(l.targetResolution-l.sourceResolution);if(l.anchor){const f=this.getViewportSize_(this.getRotation()),g=this.constraints_.resolution(d,0,f,!0);this.targetCenter_=this.calculateCenterZoom(g,l.anchor)}this.nextResolution_=l.targetResolution,this.targetResolution_=d,this.applyTargetState_(!0)}if(l.sourceRotation!==void 0&&l.targetRotation!==void 0){const d=u===1?ci(l.targetRotation+Math.PI,2*Math.PI)-Math.PI:l.sourceRotation+u*(l.targetRotation-l.sourceRotation);if(l.anchor){const f=this.constraints_.rotation(d,!0);this.targetCenter_=this.calculateCenterRotate(f,l.anchor)}this.nextRotation_=l.targetRotation,this.targetRotation_=d}if(this.applyTargetState_(!0),e=!0,!l.complete)break}if(r){this.animations_[i]=null,this.setHint(mt.ANIMATING,-1),this.nextCenter_=null,this.nextResolution_=NaN,this.nextRotation_=NaN;const o=s[0].callback;o&&yn(o,!0)}}this.animations_=this.animations_.filter(Boolean),e&&this.updateAnimationKey_===void 0&&(this.updateAnimationKey_=requestAnimationFrame(this.updateAnimations_.bind(this)))}calculateCenterRotate(t,e){let i;const s=this.getCenterInternal();return s!==void 0&&(i=[s[0]-e[0],s[1]-e[1]],Qs(i,t-this.getRotation()),Ml(i,e)),i}calculateCenterZoom(t,e){let i;const s=this.getCenterInternal(),r=this.getResolution();if(s!==void 0&&r!==void 0){const o=e[0]-t*(e[0]-s[0])/r,a=e[1]-t*(e[1]-s[1])/r;i=[o,a]}return i}getViewportSize_(t){const e=this.viewportSize_;if(t){const i=e[0],s=e[1];return[Math.abs(i*Math.cos(t))+Math.abs(s*Math.sin(t)),Math.abs(i*Math.sin(t))+Math.abs(s*Math.cos(t))]}return e}setViewportSize(t){this.viewportSize_=Array.isArray(t)?t.slice():[100,100],this.getAnimating()||this.resolveConstraints(0)}getCenter(){const t=this.getCenterInternal();return t&&Fs(t,this.getProjection())}getCenterInternal(){return this.get(Nt.CENTER)}getConstraints(){return this.constraints_}getConstrainResolution(){return this.get("constrainResolution")}getHints(t){return t!==void 0?(t[0]=this.hints_[0],t[1]=this.hints_[1],t):this.hints_.slice()}calculateExtent(t){const e=this.calculateExtentInternal(t);return $o(e,this.getProjection())}calculateExtentInternal(t){t=t||this.getViewportSizeMinusPadding_();const e=this.getCenterInternal();j(e,"The view center is not defined");const i=this.getResolution();j(i!==void 0,"The view resolution is not defined");const s=this.getRotation();return j(s!==void 0,"The view rotation is not defined"),Ps(e,i,s,t)}getMaxResolution(){return this.maxResolution_}getMinResolution(){return this.minResolution_}getMaxZoom(){return this.getZoomForResolution(this.minResolution_)}setMaxZoom(t){this.applyOptions_(this.getUpdatedOptions_({maxZoom:t}))}getMinZoom(){return this.getZoomForResolution(this.maxResolution_)}setMinZoom(t){this.applyOptions_(this.getUpdatedOptions_({minZoom:t}))}setConstrainResolution(t){this.applyOptions_(this.getUpdatedOptions_({constrainResolution:t}))}getProjection(){return this.projection_}getResolution(){return this.get(Nt.RESOLUTION)}getResolutions(){return this.resolutions_}getResolutionForExtent(t,e){return this.getResolutionForExtentInternal(Te(t,this.getProjection()),e)}getResolutionForExtentInternal(t,e){e=e||this.getViewportSizeMinusPadding_();const i=q(t)/e[0],s=pt(t)/e[1];return Math.max(i,s)}getResolutionForValueFunction(t){t=t||2;const e=this.getConstrainedResolution(this.maxResolution_),i=this.minResolution_,s=Math.log(e/i)/Math.log(t);return function(r){return e/Math.pow(t,r*s)}}getRotation(){return this.get(Nt.ROTATION)}getValueForResolutionFunction(t){const e=Math.log(t||2),i=this.getConstrainedResolution(this.maxResolution_),s=this.minResolution_,r=Math.log(i/s)/e;return function(o){return Math.log(i/o)/e/r}}getViewportSizeMinusPadding_(t){let e=this.getViewportSize_(t);const i=this.padding_;return i&&(e=[e[0]-i[1]-i[3],e[1]-i[0]-i[2]]),e}getState(){const t=this.getProjection(),e=this.getResolution(),i=this.getRotation();let s=this.getCenterInternal();const r=this.padding_;if(r){const o=this.getViewportSizeMinusPadding_();s=gs(s,this.getViewportSize_(),[o[0]/2+r[3],o[1]/2+r[0]],e,i)}return{center:s.slice(0),projection:t!==void 0?t:null,resolution:e,nextCenter:this.nextCenter_,nextResolution:this.nextResolution_,nextRotation:this.nextRotation_,rotation:i,zoom:this.getZoom()}}getViewStateAndExtent(){return{viewState:this.getState(),extent:this.calculateExtent()}}getZoom(){let t;const e=this.getResolution();return e!==void 0&&(t=this.getZoomForResolution(e)),t}getZoomForResolution(t){let e=this.minZoom_||0,i,s;if(this.resolutions_){const r=Bs(this.resolutions_,t,1);e=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 e+Math.log(i/t)/Math.log(s)}getResolutionForZoom(t){if(this.resolutions_?.length){if(this.resolutions_.length===1)return this.resolutions_[0];const e=st(Math.floor(t),0,this.resolutions_.length-2),i=this.resolutions_[e]/this.resolutions_[e+1];return this.resolutions_[e]/Math.pow(i,st(t-e,0,1))}return this.maxResolution_/Math.pow(this.zoomFactor_,t-this.minZoom_)}fit(t,e){let i;if(j(Array.isArray(t)||typeof t.getSimplifiedGeometry=="function","Invalid extent or geometry provided as `geometry`"),Array.isArray(t)){j(!Hn(t),"Cannot fit empty extent provided as `geometry`");const s=Te(t,this.getProjection());i=to(s)}else if(t.getType()==="Circle"){const s=Te(t.getExtent(),this.getProjection());i=to(s),i.rotate(this.getRotation(),Xe(s))}else i=t;this.fitInternal(i,e)}rotatedExtentForGeometry(t){const e=this.getRotation(),i=Math.cos(e),s=Math.sin(-e),r=t.getFlatCoordinates(),o=t.getStride();let a=1/0,l=1/0,c=-1/0,h=-1/0;for(let u=0,d=r.length;u{this.dispatchEvent("sourceready")},0))),this.changed()}getFeatures(t){return this.renderer_?this.renderer_.getFeatures(t):Promise.resolve([])}getData(t){return!this.renderer_||!this.rendered?null:this.renderer_.getData(t)}isVisible(t){let e;const i=this.getMapInternal();!t&&i&&(t=i.getView()),t instanceof Vt?e={viewState:t.getState(),extent:t.calculateExtent()}:e=t,!e.layerStatesArray&&i&&(e.layerStatesArray=i.getLayerGroup().getLayerStatesArray());let s;e.layerStatesArray?s=e.layerStatesArray.find(o=>o.layer===this):s=this.getLayerState();const r=this.getExtent();return dr(s,e.viewState)&&(!r||Tt(r,e.extent))}getAttributions(t){if(!this.isVisible(t))return[];const e=this.getSource()?.getAttributions();if(!e)return[];const i=t instanceof Vt?t.getViewStateAndExtent():t;let s=e(i);return Array.isArray(s)||(s=[s]),s}render(t,e){const i=this.getRenderer();return i.prepareFrame(t)?(this.rendered=!0,i.renderFrame(t,e)):null}unrender(){this.rendered=!1}getDeclutter(){}renderDeclutter(t,e){}renderDeferred(t){const e=this.getRenderer();e&&e.renderDeferred(t)}setMapInternal(t){t||this.unrender(),this.set(J.MAP,t)}getMapInternal(){return this.get(J.MAP)}setMap(t){this.mapPrecomposeKey_&&(tt(this.mapPrecomposeKey_),this.mapPrecomposeKey_=null),t||this.changed(),this.mapRenderKey_&&(tt(this.mapRenderKey_),this.mapRenderKey_=null),t&&(this.mapPrecomposeKey_=V(t,Ot.PRECOMPOSE,this.handlePrecompose_,this),this.mapRenderKey_=V(this,z.CHANGE,t.render,t),this.changed())}handlePrecompose_(t){const e=t.frameState.layerStatesArray,i=this.getLayerState(!1);j(!e.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."),e.push(i)}setSource(t){this.set(J.SOURCE,t)}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 dr(n,t){if(!n.visible)return!1;const e=t.resolution;if(e=n.maxResolution)return!1;const i=t.zoom;return i>n.minZoom&&i<=n.maxZoom}function oa(n,t,e=0,i=n.length-1,s=mh){for(;i>e;){if(i-e>600){const l=i-e+1,c=t-e+1,h=Math.log(l),u=.5*Math.exp(2*h/3),d=.5*Math.sqrt(h*u*(l-u)/l)*(c-l/2<0?-1:1),f=Math.max(e,Math.floor(t-c*u/l+d)),g=Math.min(i,Math.floor(t+(l-c)*u/l+d));oa(n,t,f,g,s)}const r=n[t];let o=e,a=i;for(Ai(n,e,t),s(n[i],r)>0&&Ai(n,e,i);o0;)a--}s(n[e],r)===0?Ai(n,e,a):(a++,Ai(n,a,i)),a<=t&&(e=a+1),t<=a&&(i=a-1)}}function Ai(n,t,e){const i=n[t];n[t]=n[e],n[e]=i}function mh(n,t){return nt?1:0}let aa=class{constructor(t=9){this._maxEntries=Math.max(4,t),this._minEntries=Math.max(2,Math.ceil(this._maxEntries*.4)),this.clear()}all(){return this._all(this.data,[])}search(t){let e=this.data;const i=[];if(!xn(t,e))return i;const s=this.toBBox,r=[];for(;e;){for(let o=0;o=0&&r[e].children.length>this._maxEntries;)this._split(r,e),e--;this._adjustParentBBoxes(s,r,e)}_split(t,e){const i=t[e],s=i.children.length,r=this._minEntries;this._chooseSplitAxis(i,r,s);const o=this._chooseSplitIndex(i,r,s),a=ii(i.children.splice(o,i.children.length-o));a.height=i.height,a.leaf=i.leaf,He(i,this.toBBox),He(a,this.toBBox),e?t[e-1].children.push(a):this._splitRoot(i,a)}_splitRoot(t,e){this.data=ii([t,e]),this.data.height=t.height+1,this.data.leaf=!1,He(this.data,this.toBBox)}_chooseSplitIndex(t,e,i){let s,r=1/0,o=1/0;for(let a=e;a<=i-e;a++){const l=Pi(t,0,a,this.toBBox),c=Pi(t,a,i,this.toBBox),h=wh(l,c),u=_s(l)+_s(c);h=e;c--){const h=t.children[c];Oi(a,t.leaf?r(h):h),l+=En(a)}return l}_adjustParentBBoxes(t,e,i){for(let s=i;s>=0;s--)Oi(e[s],t)}_condense(t){for(let e=t.length-1,i;e>=0;e--)t[e].children.length===0?e>0?(i=t[e-1].children,i.splice(i.indexOf(t[e]),1)):this.clear():He(t[e],this.toBBox)}};function ph(n,t,e){if(!e)return t.indexOf(n);for(let i=0;i=n.minX&&t.maxY>=n.minY}function ii(n){return{children:n,height:1,leaf:!0,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0}}function eo(n,t,e,i,s){const r=[t,e];for(;r.length;){if(e=r.pop(),t=r.pop(),e-t<=i)continue;const o=t+Math.ceil((e-t)/i/2)*i;oa(n,o,t,e,s),r.push(t,o,o,e)}}const Y={IDLE:0,LOADING:1,LOADED:2,ERROR:3,EMPTY:4};function io(n){return n[0]>0&&n[1]>0}function Ch(n,t,e){return e===void 0&&(e=[0,0]),e[0]=n[0]*t+.5|0,e[1]=n[1]*t+.5|0,e}function vt(n,t){return Array.isArray(n)?n:(t===void 0?t=[n,n]:(t[0]=n,t[1]=n),t)}class Qn{constructor(t){this.opacity_=t.opacity,this.rotateWithView_=t.rotateWithView,this.rotation_=t.rotation,this.scale_=t.scale,this.scaleArray_=vt(t.scale),this.displacement_=t.displacement,this.declutterMode_=t.declutterMode}clone(){const t=this.getScale();return new Qn({opacity:this.getOpacity(),scale:Array.isArray(t)?t.slice():t,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 U()}getImage(t){return U()}getHitDetectionImage(){return U()}getPixelRatio(t){return 1}getImageState(){return U()}getImageSize(){return U()}getOrigin(){return U()}getSize(){return U()}setDisplacement(t){this.displacement_=t}setOpacity(t){this.opacity_=t}setRotateWithView(t){this.rotateWithView_=t}setRotation(t){this.rotation_=t}setScale(t){this.scale_=t,this.scaleArray_=vt(t)}listenImageChange(t){U()}load(){U()}unlistenImageChange(t){U()}ready(){return Promise.resolve()}}const Ui={name:"rgb",min:[0,0,0],max:[255,255,255],channel:["red","green","blue"],alias:["RGB"]};var ft={name:"xyz",min:[0,0,0],channel:["X","Y","Z"],alias:["XYZ","ciexyz","cie1931"]};ft.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]}};ft.max=ft.whitepoint[2].D65;ft.rgb=function(n,t){t=t||ft.whitepoint[2].E;var e=n[0]/t[0],i=n[1]/t[1],s=n[2]/t[2],r,o,a;return r=e*3.240969941904521+i*-1.537383177570093+s*-.498610760293,o=e*-.96924363628087+i*1.87596750150772+s*.041555057407175,a=e*.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]};Ui.xyz=function(n,t){var e=n[0]/255,i=n[1]/255,s=n[2]/255;e=e>.04045?Math.pow((e+.055)/1.055,2.4):e/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=e*.41239079926595+i*.35758433938387+s*.18048078840183,o=e*.21263900587151+i*.71516867876775+s*.072192315360733,a=e*.019330818715591+i*.11919477979462+s*.95053215224966;return t=t||ft.whitepoint[2].E,[r*t[0],o*t[1],a*t[2]]};const fr={name:"luv",min:[0,-134,-140],max:[100,224,122],channel:["lightness","u","v"],alias:["LUV","cieluv","cie1976"],xyz:function(n,t,e){var i,s,r,o,a,l,c,h,u,d,f,g,_;if(r=n[0],o=n[1],a=n[2],r===0)return[0,0,0];var m=.0011070564598794539;return t=t||"D65",e=e||2,u=ft.whitepoint[e][t][0],d=ft.whitepoint[e][t][1],f=ft.whitepoint[e][t][2],g=4*u/(u+15*d+3*f),_=9*d/(u+15*d+3*f),i=o/(13*r)+g||0,s=a/(13*r)+_||0,c=r>8?d*Math.pow((r+16)/116,3):d*r*m,l=c*9*i/(4*s)||0,h=c*(12-3*i-20*s)/(4*s)||0,[l,c,h]}};ft.luv=function(n,t,e){var i,s,r,o,a,l,c,h,u,d,f,g,_,m=.008856451679035631,p=903.2962962962961;t=t||"D65",e=e||2,u=ft.whitepoint[e][t][0],d=ft.whitepoint[e][t][1],f=ft.whitepoint[e][t][2],g=4*u/(u+15*d+3*f),_=9*d/(u+15*d+3*f),l=n[0],c=n[1],h=n[2],i=4*l/(l+15*c+3*h)||0,s=9*c/(l+15*c+3*h)||0;var y=c/d;return r=y<=m?p*y:116*Math.pow(y,1/3)-16,o=13*r*(i-g),a=13*r*(s-_),[r,o,a]};var la={name:"lchuv",channel:["lightness","chroma","hue"],alias:["LCHuv","cielchuv"],min:[0,0,0],max:[100,100,360],luv:function(n){var t=n[0],e=n[1],i=n[2],s,r,o;return o=i/360*2*Math.PI,s=e*Math.cos(o),r=e*Math.sin(o),[t,s,r]},xyz:function(n){return fr.xyz(la.luv(n))}};fr.lchuv=function(n){var t=n[0],e=n[1],i=n[2],s=Math.sqrt(e*e+i*i),r=Math.atan2(i,e),o=r*360/2/Math.PI;return o<0&&(o+=360),[t,s,o]};ft.lchuv=function(n){return fr.lchuv(ft.luv(n))};const no={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 so={red:0,orange:60,yellow:120,green:180,blue:240,purple:300};function Rh(n){var t,e=[],i=1,s;if(typeof n=="number")return{space:"rgb",values:[n>>>16,(n&65280)>>>8,n&255],alpha:1};if(typeof n=="number")return{space:"rgb",values:[n>>>16,(n&65280)>>>8,n&255],alpha:1};if(n=String(n).toLowerCase(),no[n])e=no[n].slice(),s="rgb";else if(n==="transparent")i=0,s="rgb",e=[0,0,0];else if(n[0]==="#"){var r=n.slice(1),o=r.length,a=o<=4;i=1,a?(e=[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)):(e=[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)),e[0]||(e[0]=0),e[1]||(e[1]=0),e[2]||(e[2]=0),s="rgb"}else if(t=/^((?:rgba?|hs[lvb]a?|hwba?|cmyk?|xy[zy]|gray|lab|lchu?v?|[ly]uv|lms|oklch|oklab|color))\s*\(([^\)]*)\)/.exec(n)){var l=t[1];s=l.replace(/a$/,"");var c=s==="cmyk"?4:s==="gray"?1:3;e=t[2].trim().split(/\s*[,\/]\s*|\s+/),s==="color"&&(s=e.shift()),e=e.map(function(h,u){if(h[h.length-1]==="%")return h=parseFloat(h)/100,u===3?h:s==="rgb"?h*255:s[0]==="h"||s[0]==="l"&&!u?h*100:s==="lab"?h*125:s==="lch"?u<2?h*150:h*360:s[0]==="o"&&!u?h:s==="oklab"?h*.4:s==="oklch"?u<2?h*.4:h*360:h;if(s[u]==="h"||u===2&&s[s.length-1]==="h"){if(so[h]!==void 0)return so[h];if(h.endsWith("deg"))return parseFloat(h);if(h.endsWith("turn"))return parseFloat(h)*360;if(h.endsWith("grad"))return parseFloat(h)*360/400;if(h.endsWith("rad"))return parseFloat(h)*180/Math.PI}return h==="none"?0:parseFloat(h)}),i=e.length>c?e.pop():1}else/[0-9](?:\s|\/|,)/.test(n)&&(e=n.match(/([0-9]+)/g).map(function(h){return parseFloat(h)}),s=n.match(/([a-z])/ig)?.join("")?.toLowerCase()||"rgb");return{space:s,values:e,alpha:i}}const ps={name:"hsl",min:[0,0,0],max:[360,100,100],channel:["hue","saturation","lightness"],alias:["HSL"],rgb:function(n){var t=n[0]/360,e=n[1]/100,i=n[2]/100,s,r,o,a,l,c=0;if(e===0)return l=i*255,[l,l,l];for(r=i<.5?i*(1+e):i+e-i*e,s=2*i-r,a=[0,0,0];c<3;)o=t+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}};Ui.hsl=function(n){var t=n[0]/255,e=n[1]/255,i=n[2]/255,s=Math.min(t,e,i),r=Math.max(t,e,i),o=r-s,a,l,c;return r===s?a=0:t===r?a=(e-i)/o:e===r?a=2+(i-t)/o:i===r&&(a=4+(t-e)/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 Th(n){Array.isArray(n)&&n.raw&&(n=String.raw(...arguments)),n instanceof Number&&(n=+n);var t,e=Rh(n);if(!e.space)return[];const i=e.space[0]==="h"?ps.min:Ui.min,s=e.space[0]==="h"?ps.max:Ui.max;return t=Array(3),t[0]=Math.min(Math.max(e.values[0],i[0]),s[0]),t[1]=Math.min(Math.max(e.values[1],i[1]),s[1]),t[2]=Math.min(Math.max(e.values[2],i[2]),s[2]),e.space[0]==="h"&&(t=ps.rgb(t)),t.push(Math.min(Math.max(e.alpha,0),1)),t}const gr=[NaN,NaN,NaN,0];function Ih(n){return typeof n=="string"?n:mr(n)}const vh=1024,Mi={};let ys=0;function Sh(n){if(n.length===4)return n;const t=n.slice();return t[3]=1,t}function ro(n){const t=ft.lchuv(Ui.xyz(n));return t[3]=n[3],t}function Lh(n){const t=ft.rgb(la.xyz(n));return t[3]=n[3],t}function _r(n){if(n==="none")return gr;if(Mi.hasOwnProperty(n))return Mi[n];if(ys>=vh){let e=0;for(const i in Mi)e++&3||(delete Mi[i],--ys)}const t=Th(n);if(t.length!==4)throw new Error('failed to parse "'+n+'" as color');for(const e of t)if(isNaN(e))throw new Error('failed to parse "'+n+'" as color');return ha(t),Mi[n]=t,++ys,t}function ji(n){return Array.isArray(n)?n:_r(n)}function ha(n){return n[0]=st(n[0]+.5|0,0,255),n[1]=st(n[1]+.5|0,0,255),n[2]=st(n[2]+.5|0,0,255),n[3]=st(n[3],0,1),n}function mr(n){let t=n[0];t!=(t|0)&&(t=t+.5|0);let e=n[1];e!=(e|0)&&(e=e+.5|0);let i=n[2];i!=(i|0)&&(i=i+.5|0);const s=n[3]===void 0?1:Math.round(n[3]*1e3)/1e3;return"rgba("+t+","+e+","+i+","+s+")"}const Le=typeof navigator<"u"&&typeof navigator.userAgent<"u"?navigator.userAgent.toLowerCase():"",Ah=Le.includes("firefox"),Mh=Le.includes("safari")&&!Le.includes("chrom");Mh&&(Le.includes("version/15.4")||/cpu (os|iphone os) 15_4 like mac os x/.test(Le));const bh=Le.includes("webkit")&&!Le.includes("edge"),ca=Le.includes("macintosh"),ua=typeof devicePixelRatio<"u"?devicePixelRatio:1,da=typeof WorkerGlobalScope<"u"&&typeof OffscreenCanvas<"u"&&self instanceof WorkerGlobalScope,fa=typeof Image<"u"&&Image.prototype.decode,ga=function(){let n=!1;try{const t=Object.defineProperty({},"passive",{get:function(){n=!0}});window.addEventListener("_",null,t),window.removeEventListener("_",null,t)}catch{}return n}();function rt(n,t,e,i){let s;return e&&e.length?s=e.shift():da?s=new OffscreenCanvas(n||300,t||300):s=document.createElement("canvas"),n&&(s.width=n),t&&(s.height=t),s.getContext("2d",i)}let Es;function bn(){return Es||(Es=rt(1,1)),Es}function mi(n){const t=n.canvas;t.width=1,t.height=1,n.clearRect(0,0,1,1)}function oo(n,t){const e=t.parentNode;e&&e.replaceChild(n,t)}function Dh(n){for(;n.lastChild;)n.lastChild.remove()}function Ph(n,t){const e=n.childNodes;for(let i=0;;++i){const s=e[i],r=t[i];if(!s&&!r)break;if(s!==r){if(!s){n.appendChild(r);continue}if(!r){n.removeChild(s),--i;continue}n.insertBefore(r,s)}}}function Oh(n,t,e){const i=n;let s=!0,r=!1,o=!1;const a=[vn(i,z.LOAD,function(){o=!0,r||t()})];return i.src&&fa?(r=!0,i.decode().then(function(){s&&t()}).catch(function(l){s&&(o?t():e())})):a.push(vn(i,z.ERROR,e)),function(){s=!1,a.forEach(tt)}}function Fh(n,t){return new Promise((e,i)=>{function s(){o(),e(n)}function r(){o(),i(new Error("Image load error"))}function o(){n.removeEventListener("load",s),n.removeEventListener("error",r)}n.addEventListener("load",s),n.addEventListener("error",r)})}function kh(n,t){return t&&(n.src=t),n.src&&fa?new Promise((e,i)=>n.decode().then(()=>e(n)).catch(s=>n.complete&&n.width?e(n):i(s))):Fh(n)}class Nh{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 t=0;for(const e in this.cache_){const i=this.cache_[e];!(t++&3)&&!i.hasListener()&&(delete this.cache_[e],delete this.patternCache_[e],--this.cacheSize_)}}}get(t,e,i){const s=xs(t,e,i);return s in this.cache_?this.cache_[s]:null}getPattern(t,e,i){const s=xs(t,e,i);return s in this.patternCache_?this.patternCache_[s]:null}set(t,e,i,s,r){const o=xs(t,e,i),a=o in this.cache_;this.cache_[o]=s,r&&(s.getImageState()===Y.IDLE&&s.load(),s.getImageState()===Y.LOADING?s.ready().then(()=>{this.patternCache_[o]=bn().createPattern(s.getImage(1),"repeat")}):this.patternCache_[o]=bn().createPattern(s.getImage(1),"repeat")),a||++this.cacheSize_}setSize(t){this.maxCacheSize_=t,this.expire()}}function xs(n,t,e){const i=e?ji(e):"null";return t+":"+n+":"+i}const Ht=new Nh;let bi=null;class Gh extends Kn{constructor(t,e,i,s,r){super(),this.hitDetectionImage_=null,this.image_=t,this.crossOrigin_=i,this.canvas_={},this.color_=r,this.imageState_=s===void 0?Y.IDLE:s,this.size_=t&&t.width&&t.height?[t.width,t.height]:null,this.src_=e,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_===Y.LOADED){bi||(bi=rt(1,1,void 0,{willReadFrequently:!0})),bi.drawImage(this.image_,0,0);try{bi.getImageData(0,0,1,1),this.tainted_=!1}catch{bi=null,this.tainted_=!0}}return this.tainted_===!0}dispatchChangeEvent_(){this.dispatchEvent(z.CHANGE)}handleImageError_(){this.imageState_=Y.ERROR,this.dispatchChangeEvent_()}handleImageLoad_(){this.imageState_=Y.LOADED,this.size_=[this.image_.width,this.image_.height],this.dispatchChangeEvent_()}getImage(t){return this.image_||this.initializeImage_(),this.replaceColor_(t),this.canvas_[t]?this.canvas_[t]:this.image_}getPixelRatio(t){return this.replaceColor_(t),this.canvas_[t]?t:1}getImageState(){return this.imageState_}getHitDetectionImage(){if(this.image_||this.initializeImage_(),!this.hitDetectionImage_)if(this.isTainted_()){const t=this.size_[0],e=this.size_[1],i=rt(t,e);i.fillRect(0,0,t,e),this.hitDetectionImage_=i.canvas}else this.hitDetectionImage_=this.image_;return this.hitDetectionImage_}getSize(){return this.size_}getSrc(){return this.src_}load(){if(this.imageState_===Y.IDLE){this.image_||this.initializeImage_(),this.imageState_=Y.LOADING;try{this.src_!==void 0&&(this.image_.src=this.src_)}catch{this.handleImageError_()}this.image_ instanceof HTMLImageElement&&kh(this.image_,this.src_).then(t=>{this.image_=t,this.handleImageLoad_()}).catch(this.handleImageError_.bind(this))}}replaceColor_(t){if(!this.color_||this.canvas_[t]||this.imageState_!==Y.LOADED)return;const e=this.image_,i=rt(Math.ceil(e.width*t),Math.ceil(e.height*t)),s=i.canvas;i.scale(t,t),i.drawImage(e,0,0),i.globalCompositeOperation="multiply",i.fillStyle=Ih(this.color_),i.fillRect(0,0,s.width/t,s.height/t),i.globalCompositeOperation="destination-in",i.drawImage(e,0,0),this.canvas_[t]=s}ready(){return this.ready_||(this.ready_=new Promise(t=>{if(this.imageState_===Y.LOADED||this.imageState_===Y.ERROR)t();else{const e=()=>{(this.imageState_===Y.LOADED||this.imageState_===Y.ERROR)&&(this.removeEventListener(z.CHANGE,e),t())};this.addEventListener(z.CHANGE,e)}})),this.ready_}}function pr(n,t,e,i,s,r){let o=t===void 0?void 0:Ht.get(t,e,s);return o||(o=new Gh(n,n&&"src"in n?n.src||void 0:t,e,i,s),Ht.set(t,e,s,o,r)),r&&o&&!Ht.getPattern(t,e,s)&&Ht.set(t,e,s,o,r),o}function qt(n){return n?Array.isArray(n)?mr(n):typeof n=="object"&&"src"in n?zh(n):n:null}function zh(n){if(!n.offset||!n.size)return Ht.getPattern(n.src,"anonymous",n.color);const t=n.src+":"+n.offset,e=Ht.getPattern(t,void 0,n.color);if(e)return e;const i=Ht.get(n.src,"anonymous",null);if(i.getImageState()!==Y.LOADED)return null;const s=rt(n.size[0],n.size[1]);return s.drawImage(i.getImage(1),n.offset[0],n.offset[1],n.size[0],n.size[1],0,0,n.size[0],n.size[1]),pr(s.canvas,t,void 0,Y.LOADED,n.color,!0),Ht.getPattern(t,void 0,n.color)}const wn="ol-hidden",ts="ol-unselectable",yr="ol-control",ao="ol-collapsed",Xh=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"),lo=["style","variant","weight","size","lineHeight","family"],_a=function(n){const t=n.match(Xh);if(!t)return null;const e={lineHeight:"normal",size:"1.2em",style:"normal",weight:"normal",variant:"normal"};for(let i=0,s=lo.length;iMath.max(s,Pn(n,r)),0);return e[t]=i,i}function Zh(n,t){const e=[],i=[],s=[];let r=0,o=0,a=0,l=0;for(let c=0,h=t.length;c<=h;c+=2){const u=t[c];if(u===` +`||c===h){r=Math.max(r,o),s.push(o),o=0,a+=l,l=0;continue}const d=t[c+1]||n.font,f=Pn(d,u);e.push(f),o+=f;const g=Yh(d);i.push(g),l=Math.max(l,g)}return{width:r,height:a,widths:e,heights:i,lineWidths:s}}function Kh(n,t,e,i,s,r,o,a,l,c,h){n.save(),e!==1&&(n.globalAlpha===void 0?n.globalAlpha=u=>u.globalAlpha*=e:n.globalAlpha*=e),t&&n.transform.apply(n,t),i.contextInstructions?(n.translate(l,c),n.scale(h[0],h[1]),Bh(i,n)):h[0]<0||h[1]<0?(n.translate(l,c),n.scale(h[0],h[1]),n.drawImage(i,s,r,o,a,0,0,o,a)):n.drawImage(i,s,r,o,a,l,c,o*h[0],a*h[1]),n.restore()}function Bh(n,t){const e=n.contextInstructions;for(let i=0,s=e.length;ithis.imageState_=Y.LOADED),this.render()}clone(){const t=this.getScale(),e=new es({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(t)?t.slice():t,displacement:this.getDisplacement().slice(),declutterMode:this.getDeclutterMode()});return e.setOpacity(this.getOpacity()),e}getAnchor(){const t=this.size_,e=this.getDisplacement(),i=this.getScaleArray();return[t[0]/2-e[0]/i[0],t[1]/2+e[1]/i[1]]}getAngle(){return this.angle_}getFill(){return this.fill_}setFill(t){this.fill_=t,this.render()}getHitDetectionImage(){return this.hitDetectionCanvas_||(this.hitDetectionCanvas_=this.createHitDetectionCanvas_(this.renderOptions_)),this.hitDetectionCanvas_}getImage(t){let e=this.canvases_[t];if(!e){const i=this.renderOptions_,s=rt(i.size*t,i.size*t);this.draw_(i,s,t),e=s.canvas,this.canvases_[t]=e}return e}getPixelRatio(t){return t}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(t){this.stroke_=t,this.render()}listenImageChange(t){}load(){}unlistenImageChange(t){}calculateLineJoinSize_(t,e,i){if(e===0||this.points_===1/0||t!=="bevel"&&t!=="miter")return e;let s=this.radius,r=this.radius2_===void 0?s:this.radius2_;if(s{this.patternImage_=null}),e.getImageState()===Y.IDLE&&e.load(),e.getImageState()===Y.LOADING&&(this.patternImage_=e)}this.color_=t}loading(){return!!this.patternImage_}ready(){return this.patternImage_?this.patternImage_.ready():Promise.resolve()}}class Ei{constructor(t){t=t||{},this.color_=t.color!==void 0?t.color:null,this.lineCap_=t.lineCap,this.lineDash_=t.lineDash!==void 0?t.lineDash:null,this.lineDashOffset_=t.lineDashOffset,this.lineJoin_=t.lineJoin,this.miterLimit_=t.miterLimit,this.width_=t.width}clone(){const t=this.getColor();return new Ei({color:Array.isArray(t)?t.slice():t||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(t){this.color_=t}setLineCap(t){this.lineCap_=t}setLineDash(t){this.lineDash_=t}setLineDashOffset(t){this.lineDashOffset_=t}setLineJoin(t){this.lineJoin_=t}setMiterLimit(t){this.miterLimit_=t}setWidth(t){this.width_=t}}class ce{constructor(t){t=t||{},this.geometry_=null,this.geometryFunction_=co,t.geometry!==void 0&&this.setGeometry(t.geometry),this.fill_=t.fill!==void 0?t.fill:null,this.image_=t.image!==void 0?t.image:null,this.renderer_=t.renderer!==void 0?t.renderer:null,this.hitDetectionRenderer_=t.hitDetectionRenderer!==void 0?t.hitDetectionRenderer:null,this.stroke_=t.stroke!==void 0?t.stroke:null,this.text_=t.text!==void 0?t.text:null,this.zIndex_=t.zIndex}clone(){let t=this.getGeometry();return t&&typeof t=="object"&&(t=t.clone()),new ce({geometry:t??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(t){this.renderer_=t}setHitDetectionRenderer(t){this.hitDetectionRenderer_=t}getHitDetectionRenderer(){return this.hitDetectionRenderer_}getGeometry(){return this.geometry_}getGeometryFunction(){return this.geometryFunction_}getFill(){return this.fill_}setFill(t){this.fill_=t}getImage(){return this.image_}setImage(t){this.image_=t}getStroke(){return this.stroke_}setStroke(t){this.stroke_=t}getText(){return this.text_}setText(t){this.text_=t}getZIndex(){return this.zIndex_}setGeometry(t){typeof t=="function"?this.geometryFunction_=t:typeof t=="string"?this.geometryFunction_=function(e){return e.get(t)}:t?t!==void 0&&(this.geometryFunction_=function(){return t}):this.geometryFunction_=co,this.geometry_=t}setZIndex(t){this.zIndex_=t}}function Vh(n){let t;if(typeof n=="function")t=n;else{let e;Array.isArray(n)?e=n:(j(typeof n.getZIndex=="function","Expected an `Style` or an array of `Style`"),e=[n]),t=function(){return e}}return t}let ws=null;function ya(n,t){if(!ws){const e=new wi({color:"rgba(255,255,255,0.4)"}),i=new Ei({color:"#3399CC",width:1.25});ws=[new ce({image:new on({fill:e,stroke:i,radius:5}),fill:e,stroke:i})]}return ws}function co(n){return n.getGeometry()}function uo(n,t,e,i){return e!==void 0&&i!==void 0?[e/n,i/t]:e!==void 0?e/n:i!==void 0?i/t:1}class is extends Qn{constructor(t){t=t||{};const e=t.opacity!==void 0?t.opacity:1,i=t.rotation!==void 0?t.rotation:0,s=t.scale!==void 0?t.scale:1,r=t.rotateWithView!==void 0?t.rotateWithView:!1;super({opacity:e,rotation:i,scale:s,displacement:t.displacement!==void 0?t.displacement:[0,0],rotateWithView:r,declutterMode:t.declutterMode}),this.anchor_=t.anchor!==void 0?t.anchor:[.5,.5],this.normalizedAnchor_=null,this.anchorOrigin_=t.anchorOrigin!==void 0?t.anchorOrigin:"top-left",this.anchorXUnits_=t.anchorXUnits!==void 0?t.anchorXUnits:"fraction",this.anchorYUnits_=t.anchorYUnits!==void 0?t.anchorYUnits:"fraction",this.crossOrigin_=t.crossOrigin!==void 0?t.crossOrigin:null;const o=t.img!==void 0?t.img:null;let a=t.src;j(!(a!==void 0&&o),"`image` and `src` cannot be provided at the same time"),(a===void 0||a.length===0)&&o&&(a=o.src||$(o)),j(a!==void 0&&a.length>0,"A defined and non-empty `src` or `image` must be provided"),j(!((t.width!==void 0||t.height!==void 0)&&t.scale!==void 0),"`width` or `height` cannot be provided together with `scale`");let l;if(t.src!==void 0?l=Y.IDLE:o!==void 0&&("complete"in o?o.complete?l=o.src?Y.LOADED:Y.IDLE:l=Y.LOADING:l=Y.LOADED),this.color_=t.color!==void 0?ji(t.color):null,this.iconImage_=pr(o,a,this.crossOrigin_,l,this.color_),this.offset_=t.offset!==void 0?t.offset:[0,0],this.offsetOrigin_=t.offsetOrigin!==void 0?t.offsetOrigin:"top-left",this.origin_=null,this.size_=t.size!==void 0?t.size:null,this.initialOptions_,t.width!==void 0||t.height!==void 0){let c,h;if(t.size)[c,h]=t.size;else{const u=this.getImage(1);if(u.width&&u.height)c=u.width,h=u.height;else if(u instanceof HTMLImageElement){this.initialOptions_=t;const d=()=>{if(this.unlistenImageChange(d),!this.initialOptions_)return;const f=this.iconImage_.getSize();this.setScale(uo(f[0],f[1],t.width,t.height))};this.listenImageChange(d);return}}c!==void 0&&this.setScale(uo(c,h,t.width,t.height))}}clone(){let t,e,i;return this.initialOptions_?(e=this.initialOptions_.width,i=this.initialOptions_.height):(t=this.getScale(),t=Array.isArray(t)?t.slice():t),new is({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:t,width:e,height:i,size:this.size_!==null?this.size_.slice():void 0,src:this.getSrc(),displacement:this.getDisplacement().slice(),declutterMode:this.getDeclutterMode()})}getAnchor(){let t=this.normalizedAnchor_;if(!t){t=this.anchor_;const s=this.getSize();if(this.anchorXUnits_=="fraction"||this.anchorYUnits_=="fraction"){if(!s)return null;t=this.anchor_.slice(),this.anchorXUnits_=="fraction"&&(t[0]*=s[0]),this.anchorYUnits_=="fraction"&&(t[1]*=s[1])}if(this.anchorOrigin_!="top-left"){if(!s)return null;t===this.anchor_&&(t=this.anchor_.slice()),(this.anchorOrigin_=="top-right"||this.anchorOrigin_=="bottom-right")&&(t[0]=-t[0]+s[0]),(this.anchorOrigin_=="bottom-left"||this.anchorOrigin_=="bottom-right")&&(t[1]=-t[1]+s[1])}this.normalizedAnchor_=t}const e=this.getDisplacement(),i=this.getScaleArray();return[t[0]-e[0]/i[0],t[1]+e[1]/i[1]]}setAnchor(t){this.anchor_=t,this.normalizedAnchor_=null}getColor(){return this.color_}getImage(t){return this.iconImage_.getImage(t)}getPixelRatio(t){return this.iconImage_.getPixelRatio(t)}getImageSize(){return this.iconImage_.getSize()}getImageState(){return this.iconImage_.getImageState()}getHitDetectionImage(){return this.iconImage_.getHitDetectionImage()}getOrigin(){if(this.origin_)return this.origin_;let t=this.offset_;if(this.offsetOrigin_!="top-left"){const e=this.getSize(),i=this.iconImage_.getSize();if(!e||!i)return null;t=t.slice(),(this.offsetOrigin_=="top-right"||this.offsetOrigin_=="bottom-right")&&(t[0]=i[0]-e[0]-t[0]),(this.offsetOrigin_=="bottom-left"||this.offsetOrigin_=="bottom-right")&&(t[1]=i[1]-e[1]-t[1])}return this.origin_=t,this.origin_}getSrc(){return this.iconImage_.getSrc()}getSize(){return this.size_?this.size_:this.iconImage_.getSize()}getWidth(){const t=this.getScaleArray();if(this.size_)return this.size_[0]*t[0];if(this.iconImage_.getImageState()==Y.LOADED)return this.iconImage_.getSize()[0]*t[0]}getHeight(){const t=this.getScaleArray();if(this.size_)return this.size_[1]*t[1];if(this.iconImage_.getImageState()==Y.LOADED)return this.iconImage_.getSize()[1]*t[1]}setScale(t){delete this.initialOptions_,super.setScale(t)}listenImageChange(t){this.iconImage_.addEventListener(z.CHANGE,t)}load(){this.iconImage_.load()}unlistenImageChange(t){this.iconImage_.removeEventListener(z.CHANGE,t)}ready(){return this.iconImage_.ready()}}const Uh="#333";class Er{constructor(t){t=t||{},this.font_=t.font,this.rotation_=t.rotation,this.rotateWithView_=t.rotateWithView,this.scale_=t.scale,this.scaleArray_=vt(t.scale!==void 0?t.scale:1),this.text_=t.text,this.textAlign_=t.textAlign,this.justify_=t.justify,this.repeat_=t.repeat,this.textBaseline_=t.textBaseline,this.fill_=t.fill!==void 0?t.fill:new wi({color:Uh}),this.maxAngle_=t.maxAngle!==void 0?t.maxAngle:Math.PI/4,this.placement_=t.placement!==void 0?t.placement:"point",this.overflow_=!!t.overflow,this.stroke_=t.stroke!==void 0?t.stroke:null,this.offsetX_=t.offsetX!==void 0?t.offsetX:0,this.offsetY_=t.offsetY!==void 0?t.offsetY:0,this.backgroundFill_=t.backgroundFill?t.backgroundFill:null,this.backgroundStroke_=t.backgroundStroke?t.backgroundStroke:null,this.padding_=t.padding===void 0?null:t.padding,this.declutterMode_=t.declutterMode}clone(){const t=this.getScale();return new Er({font:this.getFont(),placement:this.getPlacement(),repeat:this.getRepeat(),maxAngle:this.getMaxAngle(),overflow:this.getOverflow(),rotation:this.getRotation(),rotateWithView:this.getRotateWithView(),scale:Array.isArray(t)?t.slice():t,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(t){this.overflow_=t}setFont(t){this.font_=t}setMaxAngle(t){this.maxAngle_=t}setOffsetX(t){this.offsetX_=t}setOffsetY(t){this.offsetY_=t}setPlacement(t){this.placement_=t}setRepeat(t){this.repeat_=t}setRotateWithView(t){this.rotateWithView_=t}setFill(t){this.fill_=t}setRotation(t){this.rotation_=t}setScale(t){this.scale_=t,this.scaleArray_=vt(t!==void 0?t:1)}setStroke(t){this.stroke_=t}setText(t){this.text_=t}setTextAlign(t){this.textAlign_=t}setJustify(t){this.justify_=t}setTextBaseline(t){this.textBaseline_=t}setBackgroundFill(t){this.backgroundFill_=t}setBackgroundStroke(t){this.backgroundStroke_=t}setPadding(t){this.padding_=t}}let Ze=0;const Et=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"},$h={[C.Get]:N(W(1,1/0),fo),[C.Var]:N(W(1,1),Jh),[C.Has]:N(W(1,1/0),fo),[C.Id]:N(Qh,qe),[C.Concat]:N(W(2,1/0),H(Rt)),[C.GeometryType]:N(tc,qe),[C.LineMetric]:N(qe),[C.Resolution]:N(qe),[C.Zoom]:N(qe),[C.Time]:N(qe),[C.Any]:N(W(2,1/0),H(Et)),[C.All]:N(W(2,1/0),H(Et)),[C.Not]:N(W(1,1),H(Et)),[C.Equal]:N(W(2,2),H(Cn)),[C.NotEqual]:N(W(2,2),H(Cn)),[C.GreaterThan]:N(W(2,2),H(B)),[C.GreaterThanOrEqualTo]:N(W(2,2),H(B)),[C.LessThan]:N(W(2,2),H(B)),[C.LessThanOrEqualTo]:N(W(2,2),H(B)),[C.Multiply]:N(W(2,1/0),go),[C.Coalesce]:N(W(2,1/0),go),[C.Divide]:N(W(2,2),H(B)),[C.Add]:N(W(2,1/0),H(B)),[C.Subtract]:N(W(2,2),H(B)),[C.Clamp]:N(W(3,3),H(B)),[C.Mod]:N(W(2,2),H(B)),[C.Pow]:N(W(2,2),H(B)),[C.Abs]:N(W(1,1),H(B)),[C.Floor]:N(W(1,1),H(B)),[C.Ceil]:N(W(1,1),H(B)),[C.Round]:N(W(1,1),H(B)),[C.Sin]:N(W(1,1),H(B)),[C.Cos]:N(W(1,1),H(B)),[C.Atan]:N(W(1,2),H(B)),[C.Sqrt]:N(W(1,1),H(B)),[C.Match]:N(W(4,1/0),_o,ic),[C.Between]:N(W(3,3),H(B)),[C.Interpolate]:N(W(6,1/0),_o,nc),[C.Case]:N(W(3,1/0),ec,sc),[C.In]:N(W(2,2),rc),[C.Number]:N(W(1,1/0),H(Cn)),[C.String]:N(W(1,1/0),H(Cn)),[C.Array]:N(W(1,1/0),H(B)),[C.Color]:N(W(1,4),H(B)),[C.Band]:N(W(1,3),H(B)),[C.Palette]:N(W(2,2),oc),[C.ToString]:N(W(1,1),H(Et|B|Rt|zt))};function fo(n,t,e){const i=n.length-1,s=new Array(i);for(let r=0;rt){const a=t===1/0?`${n} or more`:`${n} to ${t}`;throw new Error(`expected ${a} arguments for ${r}, got ${o}`)}}}function go(n,t,e){const i=n.length-1,s=new Array(i);for(let r=0;ri.featureId;case C.GeometryType:return i=>i.geometryType;case C.Concat:{const i=n.args.map(s=>Yt(s));return s=>"".concat(...i.map(r=>r(s).toString()))}case C.Resolution:return i=>i.resolution;case C.Any:case C.All:case C.Between:case C.In:case C.Not:return uc(n);case C.Equal:case C.NotEqual:case C.LessThan:case C.LessThanOrEqualTo:case C.GreaterThan:case C.GreaterThanOrEqualTo:return cc(n);case C.Multiply:case C.Divide:case C.Add:case C.Subtract:case C.Clamp:case C.Mod:case C.Pow:case C.Abs:case C.Floor:case C.Ceil:case C.Round:case C.Sin:case C.Cos:case C.Atan:case C.Sqrt:return dc(n);case C.Case:return fc(n);case C.Match:return gc(n);case C.Interpolate:return _c(n);case C.ToString:return mc(n);default:throw new Error(`Unsupported operator ${e}`)}}function lc(n,t){const e=n.operator,i=n.args.length,s=new Array(i);for(let r=0;r{for(let o=0;o{for(let o=0;o{const r=n.args;let o=s.properties[i];for(let a=1,l=r.length;as.variables[i];case C.Has:return s=>{const r=n.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 C.NotEqual:return r=>i(r)!==s(r);case C.LessThan:return r=>i(r)i(r)<=s(r);case C.GreaterThan:return r=>i(r)>s(r);case C.GreaterThanOrEqualTo:return r=>i(r)>=s(r);default:throw new Error(`Unsupported comparison operator ${e}`)}}function uc(n,t){const e=n.operator,i=n.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 C.In:return r=>{const o=s[0](r);for(let a=1;a!s[0](r);default:throw new Error(`Unsupported logical operator ${e}`)}}function dc(n,t){const e=n.operator,i=n.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 C.Add:return r=>{let o=0;for(let a=0;as[0](r)-s[1](r);case C.Clamp:return r=>{const o=s[0](r),a=s[1](r);if(ol?l:o};case C.Mod:return r=>s[0](r)%s[1](r);case C.Pow:return r=>Math.pow(s[0](r),s[1](r));case C.Abs:return r=>Math.abs(s[0](r));case C.Floor:return r=>Math.floor(s[0](r));case C.Ceil:return r=>Math.ceil(s[0](r));case C.Round:return r=>Math.round(s[0](r));case C.Sin:return r=>Math.sin(s[0](r));case C.Cos:return r=>Math.cos(s[0](r));case C.Atan:return i===2?r=>Math.atan2(s[0](r),s[1](r)):r=>Math.atan(s[0](r));case C.Sqrt:return r=>Math.sqrt(s[0](r));default:throw new Error(`Unsupported numeric operator ${e}`)}}function fc(n,t){const e=n.args.length,i=new Array(e);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?u:d?pc(r,o,a,l,h,u):Gi(r,o,a,l,h,u);a=h,l=u}return l}}function mc(n,t){const e=n.operator,i=n.args.length,s=new Array(i);for(let r=0;r{const o=s[0](r);return n.args[0].type===zt?mr(o):o.toString()};default:throw new Error(`Unsupported convert operator ${e}`)}}function Gi(n,t,e,i,s,r){const o=s-e;if(o===0)return i;const a=t-e,l=n===1?a/o:(Math.pow(n,a)-1)/(Math.pow(n,o)-1);return i+l*(r-i)}function pc(n,t,e,i,s,r){if(s-e===0)return i;const a=ro(i),l=ro(r);let c=l[2]-a[2];c>180?c-=360:c<-180&&(c+=360);const h=[Gi(n,t,e,a[0],s,l[0]),Gi(n,t,e,a[1],s,l[1]),a[2]+Gi(n,t,e,0,s,c),Gi(n,t,e,i[3],s,r[3])];return ha(Lh(h))}function yc(n){return!0}function Ec(n){const t=Ea(),e=xc(n,t),i=wa();return function(s,r){if(i.properties=s.getPropertiesInternal(),i.resolution=r,t.featureId){const o=s.getId();o!==void 0?i.featureId=o:i.featureId=null}return t.geometryType&&(i.geometryType=xa(s.getGeometry())),e(i)}}function mo(n){const t=Ea(),e=n.length,i=new Array(e);for(let o=0;onull;i=wr(n,t+"fill-color",e)}if(!i)return null;const s=new wi;return function(r){const o=i(r);return o===gr?null:(s.setColor(o),s)}}function tn(n,t,e){const i=It(n,t+"stroke-width",e),s=wr(n,t+"stroke-color",e);if(!i&&!s)return null;const r=oe(n,t+"stroke-line-cap",e),o=oe(n,t+"stroke-line-join",e),a=Ca(n,t+"stroke-line-dash",e),l=It(n,t+"stroke-line-dash-offset",e),c=It(n,t+"stroke-miter-limit",e),h=new Ei;return function(u){if(s){const d=s(u);if(d===gr)return null;h.setColor(d)}if(i&&h.setWidth(i(u)),r){const d=r(u);if(d!=="butt"&&d!=="round"&&d!=="square")throw new Error("Expected butt, round, or square line cap");h.setLineCap(d)}if(o){const d=o(u);if(d!=="bevel"&&d!=="round"&&d!=="miter")throw new Error("Expected bevel, round, or miter line join");h.setLineJoin(d)}return a&&h.setLineDash(a(u)),l&&h.setLineDashOffset(l(u)),c&&h.setMiterLimit(c(u)),h}}function wc(n,t){const e="text-",i=oe(n,e+"value",t);if(!i)return null;const s=Qi(n,e,t),r=Qi(n,e+"background-",t),o=tn(n,e,t),a=tn(n,e+"background-",t),l=oe(n,e+"font",t),c=It(n,e+"max-angle",t),h=It(n,e+"offset-x",t),u=It(n,e+"offset-y",t),d=en(n,e+"overflow",t),f=oe(n,e+"placement",t),g=It(n,e+"repeat",t),_=ns(n,e+"scale",t),m=en(n,e+"rotate-with-view",t),p=It(n,e+"rotation",t),y=oe(n,e+"align",t),x=oe(n,e+"justify",t),E=oe(n,e+"baseline",t),w=Ca(n,e+"padding",t),v=ss(n,e+"declutter-mode"),T=new Er({declutterMode:v});return function(R){if(T.setText(i(R)),s&&T.setFill(s(R)),r&&T.setBackgroundFill(r(R)),o&&T.setStroke(o(R)),a&&T.setBackgroundStroke(a(R)),l&&T.setFont(l(R)),c&&T.setMaxAngle(c(R)),h&&T.setOffsetX(h(R)),u&&T.setOffsetY(u(R)),d&&T.setOverflow(d(R)),f){const I=f(R);if(I!=="point"&&I!=="line")throw new Error("Expected point or line for text-placement");T.setPlacement(I)}if(g&&T.setRepeat(g(R)),_&&T.setScale(_(R)),m&&T.setRotateWithView(m(R)),p&&T.setRotation(p(R)),y){const I=y(R);if(I!=="left"&&I!=="center"&&I!=="right"&&I!=="end"&&I!=="start")throw new Error("Expected left, right, center, start, or end for text-align");T.setTextAlign(I)}if(x){const I=x(R);if(I!=="left"&&I!=="right"&&I!=="center")throw new Error("Expected left, right, or center for text-justify");T.setJustify(I)}if(E){const I=E(R);if(I!=="bottom"&&I!=="top"&&I!=="middle"&&I!=="alphabetic"&&I!=="hanging")throw new Error("Expected bottom, top, middle, alphabetic, or hanging for text-baseline");T.setTextBaseline(I)}return w&&T.setPadding(w(R)),T}}function Cc(n,t){return"icon-src"in n?Rc(n,t):"shape-points"in n?Tc(n,t):"circle-radius"in n?Ic(n,t):null}function Rc(n,t){const e="icon-",i=e+"src",s=Ra(n[i],i),r=On(n,e+"anchor",t),o=ns(n,e+"scale",t),a=It(n,e+"opacity",t),l=On(n,e+"displacement",t),c=It(n,e+"rotation",t),h=en(n,e+"rotate-with-view",t),u=yo(n,e+"anchor-origin"),d=Eo(n,e+"anchor-x-units"),f=Eo(n,e+"anchor-y-units"),g=Mc(n,e+"color"),_=Lc(n,e+"cross-origin"),m=Ac(n,e+"offset"),p=yo(n,e+"offset-origin"),y=Fn(n,e+"width"),x=Fn(n,e+"height"),E=Sc(n,e+"size"),w=ss(n,e+"declutter-mode"),v=new is({src:s,anchorOrigin:u,anchorXUnits:d,anchorYUnits:f,color:g,crossOrigin:_,offset:m,offsetOrigin:p,height:x,width:y,size:E,declutterMode:w});return function(T){return a&&v.setOpacity(a(T)),l&&v.setDisplacement(l(T)),c&&v.setRotation(c(T)),h&&v.setRotateWithView(h(T)),o&&v.setScale(o(T)),r&&v.setAnchor(r(T)),v}}function Tc(n,t){const e="shape-",i=e+"points",s=e+"radius",r=zs(n[i],i),o=zs(n[s],s),a=Qi(n,e,t),l=tn(n,e,t),c=ns(n,e+"scale",t),h=On(n,e+"displacement",t),u=It(n,e+"rotation",t),d=en(n,e+"rotate-with-view",t),f=Fn(n,e+"radius2"),g=Fn(n,e+"angle"),_=ss(n,e+"declutter-mode"),m=new es({points:r,radius:o,radius2:f,angle:g,declutterMode:_});return function(p){return a&&m.setFill(a(p)),l&&m.setStroke(l(p)),h&&m.setDisplacement(h(p)),u&&m.setRotation(u(p)),d&&m.setRotateWithView(d(p)),c&&m.setScale(c(p)),m}}function Ic(n,t){const e="circle-",i=Qi(n,e,t),s=tn(n,e,t),r=It(n,e+"radius",t),o=ns(n,e+"scale",t),a=On(n,e+"displacement",t),l=It(n,e+"rotation",t),c=en(n,e+"rotate-with-view",t),h=ss(n,e+"declutter-mode"),u=new on({radius:5,declutterMode:h});return function(d){return r&&u.setRadius(r(d)),i&&u.setFill(i(d)),s&&u.setStroke(s(d)),a&&u.setDisplacement(a(d)),l&&u.setRotation(l(d)),c&&u.setRotateWithView(c(d)),o&&u.setScale(o(d)),u}}function It(n,t,e){if(!(t in n))return;const i=ge(n[t],B,e);return function(s){return zs(i(s),t)}}function oe(n,t,e){if(!(t in n))return null;const i=ge(n[t],Rt,e);return function(s){return Ra(i(s),t)}}function vc(n,t,e){const i=oe(n,t+"pattern-src",e),s=po(n,t+"pattern-offset",e),r=po(n,t+"pattern-size",e),o=wr(n,t+"color",e);return function(a){return{src:i(a),offset:s&&s(a),size:r&&r(a),color:o&&o(a)}}}function en(n,t,e){if(!(t in n))return null;const i=ge(n[t],Et,e);return function(s){const r=i(s);if(typeof r!="boolean")throw new Error(`Expected a boolean for ${t}`);return r}}function wr(n,t,e){if(!(t in n))return null;const i=ge(n[t],zt,e);return function(s){return Ta(i(s),t)}}function Ca(n,t,e){if(!(t in n))return null;const i=ge(n[t],We,e);return function(s){return an(i(s),t)}}function On(n,t,e){if(!(t in n))return null;const i=ge(n[t],We,e);return function(s){const r=an(i(s),t);if(r.length!==2)throw new Error(`Expected two numbers for ${t}`);return r}}function po(n,t,e){if(!(t in n))return null;const i=ge(n[t],We,e);return function(s){return Ia(i(s),t)}}function ns(n,t,e){if(!(t in n))return null;const i=ge(n[t],We|B,e);return function(s){return bc(i(s),t)}}function Fn(n,t){const e=n[t];if(e!==void 0){if(typeof e!="number")throw new Error(`Expected a number for ${t}`);return e}}function Sc(n,t){const e=n[t];if(e!==void 0){if(typeof e=="number")return vt(e);if(!Array.isArray(e))throw new Error(`Expected a number or size array for ${t}`);if(e.length!==2||typeof e[0]!="number"||typeof e[1]!="number")throw new Error(`Expected a number or size array for ${t}`);return e}}function Lc(n,t){const e=n[t];if(e!==void 0){if(typeof e!="string")throw new Error(`Expected a string for ${t}`);return e}}function yo(n,t){const e=n[t];if(e!==void 0){if(e!=="bottom-left"&&e!=="bottom-right"&&e!=="top-left"&&e!=="top-right")throw new Error(`Expected bottom-left, bottom-right, top-left, or top-right for ${t}`);return e}}function Eo(n,t){const e=n[t];if(e!==void 0){if(e!=="pixels"&&e!=="fraction")throw new Error(`Expected pixels or fraction for ${t}`);return e}}function Ac(n,t){const e=n[t];if(e!==void 0)return an(e,t)}function ss(n,t){const e=n[t];if(e!==void 0){if(typeof e!="string")throw new Error(`Expected a string for ${t}`);if(e!=="declutter"&&e!=="obstacle"&&e!=="none")throw new Error(`Expected declutter, obstacle, or none for ${t}`);return e}}function Mc(n,t){const e=n[t];if(e!==void 0)return Ta(e,t)}function an(n,t){if(!Array.isArray(n))throw new Error(`Expected an array for ${t}`);const e=n.length;for(let i=0;i4)throw new Error(`Expected a color with 3 or 4 values for ${t}`);return e}function Ia(n,t){const e=an(n,t);if(e.length!==2)throw new Error(`Expected an array of two numbers for ${t}`);return e}function bc(n,t){return typeof n=="number"?n:Ia(n,t)}const xo={RENDER_ORDER:"renderOrder"};class va extends Jn{constructor(t){t=t||{};const e=Object.assign({},t);delete e.style,delete e.renderBuffer,delete e.updateWhileAnimating,delete e.updateWhileInteracting,super(e),this.declutter_=t.declutter?String(t.declutter):void 0,this.renderBuffer_=t.renderBuffer!==void 0?t.renderBuffer:100,this.style_=null,this.styleFunction_=void 0,this.setStyle(t.style),this.updateWhileAnimating_=t.updateWhileAnimating!==void 0?t.updateWhileAnimating:!1,this.updateWhileInteracting_=t.updateWhileInteracting!==void 0?t.updateWhileInteracting:!1}getDeclutter(){return this.declutter_}getFeatures(t){return super.getFeatures(t)}getRenderBuffer(){return this.renderBuffer_}getRenderOrder(){return this.get(xo.RENDER_ORDER)}getStyle(){return this.style_}getStyleFunction(){return this.styleFunction_}getUpdateWhileAnimating(){return this.updateWhileAnimating_}getUpdateWhileInteracting(){return this.updateWhileInteracting_}renderDeclutter(t,e){const i=this.getDeclutter();i in t.declutter||(t.declutter[i]=new aa(9)),this.getRenderer().renderDeclutter(t,e)}setRenderOrder(t){this.set(xo.RENDER_ORDER,t)}setStyle(t){this.style_=t===void 0?ya:t;const e=Dc(t);this.styleFunction_=t===null?void 0:Vh(e),this.changed()}}function Dc(n){if(n===void 0)return ya;if(!n)return null;if(typeof n=="function"||n instanceof ce)return n;if(!Array.isArray(n))return mo([n]);if(n.length===0)return[];const t=n.length,e=n[0];if(e instanceof ce){const s=new Array(t);for(let r=0;r=0;--w){const v=_[w],T=v.layer;if(T.hasRenderer()&&dr(v,h)&&a.call(l,T)){const R=T.getRenderer(),I=T.getSource();if(R&&I){const G=I.getWrapX()?f:t,D=u.bind(null,v.managed);y[0]=G[0]+g[E][0],y[1]=G[1]+g[E][1],c=R.forEachFeatureAtCoordinate(y,e,i,D,p)}if(c)return c}}if(p.length===0)return;const x=1/p.length;return p.forEach((E,w)=>E.distanceSq+=w*x),p.sort((E,w)=>E.distanceSq-w.distanceSq),p.some(E=>c=E.callback(E.feature,E.layer,E.geometry)),c}hasFeatureAtCoordinate(t,e,i,s,r,o){return this.forEachFeatureAtCoordinate(t,e,i,s,Wi,this,r,o)!==void 0}getMap(){return this.map_}renderFrame(t){U()}scheduleExpireIconCache(t){Ht.canExpireCache()&&t.postRenderFunctions.push(Oc)}}function Oc(n,t){Ht.expire()}class Sa extends fe{constructor(t,e,i,s){super(t),this.inversePixelTransform=e,this.frameState=i,this.context=s}}class Fc extends Pc{constructor(t){super(t),this.fontChangeListenerKey_=V(re,di.PROPERTYCHANGE,t.redrawText,t),this.element_=document.createElement("div");const e=this.element_.style;e.position="absolute",e.width="100%",e.height="100%",e.zIndex="0",this.element_.className=ts+" ol-layers";const i=t.getViewport();i.insertBefore(this.element_,i.firstChild||null),this.children_=[],this.renderedVisible_=!0}dispatchRenderEvent(t,e){const i=this.getMap();if(i.hasListener(t)){const s=new Sa(t,void 0,e);i.dispatchEvent(s)}}disposeInternal(){tt(this.fontChangeListenerKey_),this.element_.remove(),super.disposeInternal()}renderFrame(t){if(!t){this.renderedVisible_&&(this.element_.style.display="none",this.renderedVisible_=!1);return}this.calculateMatrices2D(t),this.dispatchRenderEvent(Ot.PRECOMPOSE,t);const e=t.layerStatesArray.sort((a,l)=>a.zIndex-l.zIndex);e.some(a=>a.layer instanceof va&&a.layer.getDeclutter())&&(t.declutter={});const s=t.viewState;this.children_.length=0;const r=[];let o=null;for(let a=0,l=e.length;a=0;--i){const s=e[i],r=s.layer;r.getDeclutter()&&r.renderDeclutter(t,s)}e.forEach(i=>i.layer.renderDeferred(t))}}}class Re extends fe{constructor(t,e){super(t),this.layer=e}}const Cs={LAYERS:"layers"};class Ci extends Go{constructor(t){t=t||{};const e=Object.assign({},t);delete e.layers;let i=t.layers;super(e),this.on,this.once,this.un,this.layersListenerKeys_=[],this.listenerKeys_={},this.addChangeListener(Cs.LAYERS,this.handleLayersChanged_),i?Array.isArray(i)?i=new jt(i.slice(),{unique:!0}):j(typeof i.getArray=="function","Expected `layers` to be an array or a `Collection`"):i=new jt(void 0,{unique:!0}),this.setLayers(i)}handleLayerChange_(){this.changed()}handleLayersChanged_(){this.layersListenerKeys_.forEach(tt),this.layersListenerKeys_.length=0;const t=this.getLayers();this.layersListenerKeys_.push(V(t,wt.ADD,this.handleLayersAdd_,this),V(t,wt.REMOVE,this.handleLayersRemove_,this));for(const i in this.listenerKeys_)this.listenerKeys_[i].forEach(tt);nn(this.listenerKeys_);const e=t.getArray();for(let i=0,s=e.length;i{this.clickTimeoutId_=void 0;const i=new we(nt.SINGLECLICK,this.map_,t);this.dispatchEvent(i)},250)}updateActivePointers_(t){const e=t,i=e.pointerId;if(e.type==nt.POINTERUP||e.type==nt.POINTERCANCEL){delete this.trackedTouches_[i];for(const s in this.trackedTouches_)if(this.trackedTouches_[s].target!==e.target){delete this.trackedTouches_[s];break}}else(e.type==nt.POINTERDOWN||e.type==nt.POINTERMOVE)&&(this.trackedTouches_[i]=e);this.activePointers_=Object.values(this.trackedTouches_)}handlePointerUp_(t){this.updateActivePointers_(t);const e=new we(nt.POINTERUP,this.map_,t,void 0,void 0,this.activePointers_);this.dispatchEvent(e),this.emulateClicks_&&!e.defaultPrevented&&!this.dragging_&&this.isMouseActionButton_(t)&&this.emulateClick_(this.down_),this.activePointers_.length===0&&(this.dragListenerKeys_.forEach(tt),this.dragListenerKeys_.length=0,this.dragging_=!1,this.down_=null)}isMouseActionButton_(t){return t.button===0}handlePointerDown_(t){this.emulateClicks_=this.activePointers_.length===0,this.updateActivePointers_(t);const e=new we(nt.POINTERDOWN,this.map_,t,void 0,void 0,this.activePointers_);if(this.dispatchEvent(e),this.down_=new PointerEvent(t.type,t),Object.defineProperty(this.down_,"target",{writable:!1,value:t.target}),this.dragListenerKeys_.length===0){const i=this.map_.getOwnerDocument();this.dragListenerKeys_.push(V(i,nt.POINTERMOVE,this.handlePointerMove_,this),V(i,nt.POINTERUP,this.handlePointerUp_,this),V(this.element_,nt.POINTERCANCEL,this.handlePointerUp_,this)),this.element_.getRootNode&&this.element_.getRootNode()!==i&&this.dragListenerKeys_.push(V(this.element_.getRootNode(),nt.POINTERUP,this.handlePointerUp_,this))}}handlePointerMove_(t){if(this.isMoving_(t)){this.updateActivePointers_(t),this.dragging_=!0;const e=new we(nt.POINTERDRAG,this.map_,t,this.dragging_,void 0,this.activePointers_);this.dispatchEvent(e)}}relayMoveEvent_(t){this.originalPointerMoveEvent_=t;const e=!!(this.down_&&this.isMoving_(t));this.dispatchEvent(new we(nt.POINTERMOVE,this.map_,t,e))}handleTouchMove_(t){const e=this.originalPointerMoveEvent_;(!e||e.defaultPrevented)&&(typeof t.cancelable!="boolean"||t.cancelable===!0)&&t.preventDefault()}isMoving_(t){return this.dragging_||Math.abs(t.clientX-this.down_.clientX)>this.moveTolerance_||Math.abs(t.clientY-this.down_.clientY)>this.moveTolerance_}disposeInternal(){this.relayedListenerKey_&&(tt(this.relayedListenerKey_),this.relayedListenerKey_=null),this.element_.removeEventListener(z.TOUCHMOVE,this.boundHandleTouchMove_),this.pointerdownListenerKey_&&(tt(this.pointerdownListenerKey_),this.pointerdownListenerKey_=null),this.dragListenerKeys_.forEach(tt),this.dragListenerKeys_.length=0,this.element_=null,super.disposeInternal()}}const Ce={POSTRENDER:"postrender",MOVESTART:"movestart",MOVEEND:"moveend",LOADSTART:"loadstart",LOADEND:"loadend"},_t={LAYERGROUP:"layergroup",SIZE:"size",TARGET:"target",VIEW:"view"},kn=1/0;class Nc{constructor(t,e){this.priorityFunction_=t,this.keyFunction_=e,this.elements_=[],this.priorities_=[],this.queuedElements_={}}clear(){this.elements_.length=0,this.priorities_.length=0,nn(this.queuedElements_)}dequeue(){const t=this.elements_,e=this.priorities_,i=t[0];t.length==1?(t.length=0,e.length=0):(t[0]=t.pop(),e[0]=e.pop(),this.siftUp_(0));const s=this.keyFunction_(i);return delete this.queuedElements_[s],i}enqueue(t){j(!(this.keyFunction_(t)in this.queuedElements_),"Tried to enqueue an `element` that was already added to the queue");const e=this.priorityFunction_(t);return e!=kn?(this.elements_.push(t),this.priorities_.push(e),this.queuedElements_[this.keyFunction_(t)]=!0,this.siftDown_(0,this.elements_.length-1),!0):!1}getCount(){return this.elements_.length}getLeftChildIndex_(t){return t*2+1}getRightChildIndex_(t){return t*2+2}getParentIndex_(t){return t-1>>1}heapify_(){let t;for(t=(this.elements_.length>>1)-1;t>=0;t--)this.siftUp_(t)}isEmpty(){return this.elements_.length===0}isKeyQueued(t){return t in this.queuedElements_}isQueued(t){return this.isKeyQueued(this.keyFunction_(t))}siftUp_(t){const e=this.elements_,i=this.priorities_,s=e.length,r=e[t],o=i[t],a=t;for(;t>1;){const l=this.getLeftChildIndex_(t),c=this.getRightChildIndex_(t),h=ct;){const a=this.getParentIndex_(e);if(s[a]>o)i[e]=i[a],s[e]=s[a],e=a;else break}i[e]=r,s[e]=o}reprioritize(){const t=this.priorityFunction_,e=this.elements_,i=this.priorities_;let s=0;const r=e.length;let o,a,l;for(a=0;a0;){const s=this.dequeue()[0],r=s.getKey();s.getState()===M.IDLE&&!(r in this.tilesLoadingKeys_)&&(this.tilesLoadingKeys_[r]=!0,++this.tilesLoading_,++i,s.load())}}}function zc(n,t,e,i,s){if(!n||!(e in n.wantedTiles)||!n.wantedTiles[e][t.getKey()])return kn;const r=n.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 Cr extends $t{constructor(t){super();const e=t.element;e&&!t.target&&!e.style.pointerEvents&&(e.style.pointerEvents="auto"),this.element=e||null,this.target_=null,this.map_=null,this.listenerKeys=[],t.render&&(this.render=t.render),t.target&&this.setTarget(t.target)}disposeInternal(){this.element?.remove(),super.disposeInternal()}getMap(){return this.map_}setMap(t){this.map_&&this.element?.remove();for(let e=0,i=this.listenerKeys.length;es.getAttributions(t)));if(this.attributions_!==void 0&&(Array.isArray(this.attributions_)?this.attributions_.forEach(s=>i.add(s)):i.add(this.attributions_)),!this.overrideCollapsible_){const s=!e.some(r=>r.getSource()?.getAttributionsCollapsible()===!1);this.setCollapsible(s)}return Array.from(i)}async updateElement_(t){if(!t){this.renderedVisible_&&(this.element.style.display="none",this.renderedVisible_=!1);return}const e=await Promise.all(this.collectSourceAttributions_(t).map(s=>hl(()=>s))),i=e.length>0;if(this.renderedVisible_!=i&&(this.element.style.display=i?"":"none",this.renderedVisible_=i),!Ae(e,this.renderedAttributions_)){Dh(this.ulElement_);for(let s=0,r=e.length;s0&&i%(2*Math.PI)!==0?e.animate({rotation:0,duration:this.duration_,easing:xi}):e.setRotation(0))}render(t){const e=t.frameState;if(!e)return;const i=e.viewState.rotation;if(i!=this.rotation_){const s="rotate("+i+"rad)";if(this.autoHide_){const r=this.element.classList.contains(wn);!r&&i===0?this.element.classList.add(wn):r&&i!==0&&this.element.classList.remove(wn)}this.label_.style.transform=s}this.rotation_=i}}class Yc extends Cr{constructor(t){t=t||{},super({element:document.createElement("div"),target:t.target});const e=t.className!==void 0?t.className:"ol-zoom",i=t.delta!==void 0?t.delta:1,s=t.zoomInClassName!==void 0?t.zoomInClassName:e+"-in",r=t.zoomOutClassName!==void 0?t.zoomOutClassName:e+"-out",o=t.zoomInLabel!==void 0?t.zoomInLabel:"+",a=t.zoomOutLabel!==void 0?t.zoomOutLabel:"–",l=t.zoomInTipLabel!==void 0?t.zoomInTipLabel:"Zoom in",c=t.zoomOutTipLabel!==void 0?t.zoomOutTipLabel:"Zoom out",h=document.createElement("button");h.className=s,h.setAttribute("type","button"),h.title=l,h.appendChild(typeof o=="string"?document.createTextNode(o):o),h.addEventListener(z.CLICK,this.handleClick_.bind(this,i),!1);const u=document.createElement("button");u.className=r,u.setAttribute("type","button"),u.title=c,u.appendChild(typeof a=="string"?document.createTextNode(a):a),u.addEventListener(z.CLICK,this.handleClick_.bind(this,-i),!1);const d=e+" "+ts+" "+yr,f=this.element;f.className=d,f.appendChild(h),f.appendChild(u),this.duration_=t.duration!==void 0?t.duration:250}handleClick_(t,e){e.preventDefault(),this.zoomByDelta_(t)}zoomByDelta_(t){const i=this.getMap().getView();if(!i)return;const s=i.getZoom();if(s!==void 0){const r=i.getConstrainedZoom(s+t);this.duration_>0?(i.getAnimating()&&i.cancelAnimations(),i.animate({zoom:r,duration:this.duration_,easing:xi})):i.setZoom(r)}}}function Zc(n){n=n||{};const t=new jt;return(n.zoom!==void 0?n.zoom:!0)&&t.push(new Yc(n.zoomOptions)),(n.rotate!==void 0?n.rotate:!0)&&t.push(new Wc(n.rotateOptions)),(n.attribution!==void 0?n.attribution:!0)&&t.push(new Xc(n.attributionOptions)),t}const wo={ACTIVE:"active"};class ln extends $t{constructor(t){super(),this.on,this.once,this.un,t&&t.handleEvent&&(this.handleEvent=t.handleEvent),this.map_=null,this.setActive(!0)}getActive(){return this.get(wo.ACTIVE)}getMap(){return this.map_}handleEvent(t){return!0}setActive(t){this.set(wo.ACTIVE,t)}setMap(t){this.map_=t}}function Kc(n,t,e){const i=n.getCenterInternal();if(i){const s=[i[0]+t[0],i[1]+t[1]];n.animateInternal({duration:e!==void 0?e:250,easing:Kl,center:n.getConstrainedCenter(s)})}}function Rr(n,t,e,i){const s=n.getZoom();if(s===void 0)return;const r=n.getConstrainedZoom(s+t),o=n.getResolutionForZoom(r);n.getAnimating()&&n.cancelAnimations(),n.animate({resolution:o,anchor:e,duration:i!==void 0?i:250,easing:xi})}class Bc extends ln{constructor(t){super(),t=t||{},this.delta_=t.delta?t.delta:1,this.duration_=t.duration!==void 0?t.duration:250}handleEvent(t){let e=!1;if(t.type==nt.DBLCLICK){const i=t.originalEvent,s=t.map,r=t.coordinate,o=i.shiftKey?-this.delta_:this.delta_,a=s.getView();Rr(a,o,r,this.duration_),i.preventDefault(),e=!0}return!e}}class hn extends ln{constructor(t){t=t||{},super(t),t.handleDownEvent&&(this.handleDownEvent=t.handleDownEvent),t.handleDragEvent&&(this.handleDragEvent=t.handleDragEvent),t.handleMoveEvent&&(this.handleMoveEvent=t.handleMoveEvent),t.handleUpEvent&&(this.handleUpEvent=t.handleUpEvent),t.stopDown&&(this.stopDown=t.stopDown),this.handlingDownUpSequence=!1,this.targetPointers=[]}getPointerCount(){return this.targetPointers.length}handleDownEvent(t){return!1}handleDragEvent(t){}handleEvent(t){if(!t.originalEvent)return!0;let e=!1;if(this.updateTrackedPointers_(t),this.handlingDownUpSequence){if(t.type==nt.POINTERDRAG)this.handleDragEvent(t),t.originalEvent.preventDefault();else if(t.type==nt.POINTERUP){const i=this.handleUpEvent(t);this.handlingDownUpSequence=i&&this.targetPointers.length>0}}else if(t.type==nt.POINTERDOWN){const i=this.handleDownEvent(t);this.handlingDownUpSequence=i,e=this.stopDown(i)}else t.type==nt.POINTERMOVE&&this.handleMoveEvent(t);return!e}handleMoveEvent(t){}handleUpEvent(t){return!1}stopDown(t){return t}updateTrackedPointers_(t){t.activePointers&&(this.targetPointers=t.activePointers)}}function Tr(n){const t=n.length;let e=0,i=0;for(let s=0;s0&&this.condition_(t)){const i=t.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 Qc extends hn{constructor(t){t=t||{},super({stopDown:Zn}),this.condition_=t.condition?t.condition:Vc,this.lastAngle_=void 0,this.duration_=t.duration!==void 0?t.duration:250}handleDragEvent(t){if(!Rs(t))return;const e=t.map,i=e.getView();if(i.getConstraints().rotation===rr)return;const s=e.getSize(),r=t.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(t){return Rs(t)?(t.map.getView().endInteraction(this.duration_),!1):!0}handleDownEvent(t){return Rs(t)&&Aa(t)&&this.condition_(t)?(t.map.getView().beginInteraction(),this.lastAngle_=void 0,!0):!1}}class tu extends Wn{constructor(t){super(),this.geometry_=null,this.element_=document.createElement("div"),this.element_.style.position="absolute",this.element_.style.pointerEvents="auto",this.element_.className="ol-box "+t,this.map_=null,this.startPixel_=null,this.endPixel_=null}disposeInternal(){this.setMap(null)}render_(){const t=this.startPixel_,e=this.endPixel_,i="px",s=this.element_.style;s.left=Math.min(t[0],e[0])+i,s.top=Math.min(t[1],e[1])+i,s.width=Math.abs(e[0]-t[0])+i,s.height=Math.abs(e[1]-t[1])+i}setMap(t){if(this.map_){this.map_.getOverlayContainer().removeChild(this.element_);const e=this.element_.style;e.left="inherit",e.top="inherit",e.width="inherit",e.height="inherit"}this.map_=t,this.map_&&this.map_.getOverlayContainer().appendChild(this.element_)}setPixels(t,e){this.startPixel_=t,this.endPixel_=e,this.createOrUpdateGeometry(),this.render_()}createOrUpdateGeometry(){if(!this.map_)return;const t=this.startPixel_,e=this.endPixel_,s=[t,[t[0],e[1]],e,[e[0],t[1]]].map(this.map_.getCoordinateFromPixelInternal,this.map_);s[4]=s[0].slice(),this.geometry_?this.geometry_.setCoordinates([s]):this.geometry_=new Vi([s])}getGeometry(){return this.geometry_}}const $e={BOXSTART:"boxstart",BOXDRAG:"boxdrag",BOXEND:"boxend",BOXCANCEL:"boxcancel"};class Di extends fe{constructor(t,e,i){super(t),this.coordinate=e,this.mapBrowserEvent=i}}class eu extends hn{constructor(t){super(),this.on,this.once,this.un,t=t??{},this.box_=new tu(t.className||"ol-dragbox"),this.minArea_=t.minArea??64,t.onBoxEnd&&(this.onBoxEnd=t.onBoxEnd),this.startPixel_=null,this.condition_=t.condition??Aa,this.boxEndCondition_=t.boxEndCondition??this.defaultBoxEndCondition}defaultBoxEndCondition(t,e,i){const s=i[0]-e[0],r=i[1]-e[1];return s*s+r*r>=this.minArea_}getGeometry(){return this.box_.getGeometry()}handleDragEvent(t){this.startPixel_&&(this.box_.setPixels(this.startPixel_,t.pixel),this.dispatchEvent(new Di($e.BOXDRAG,t.coordinate,t)))}handleUpEvent(t){if(!this.startPixel_)return!1;const e=this.boxEndCondition_(t,this.startPixel_,t.pixel);return e&&this.onBoxEnd(t),this.dispatchEvent(new Di(e?$e.BOXEND:$e.BOXCANCEL,t.coordinate,t)),this.box_.setMap(null),this.startPixel_=null,!1}handleDownEvent(t){return this.condition_(t)?(this.startPixel_=t.pixel,this.box_.setMap(t.map),this.box_.setPixels(this.startPixel_,this.startPixel_),this.dispatchEvent(new Di($e.BOXSTART,t.coordinate,t)),!0):!1}onBoxEnd(t){}setActive(t){t||(this.box_.setMap(null),this.startPixel_&&(this.dispatchEvent(new Di($e.BOXCANCEL,this.startPixel_,null)),this.startPixel_=null)),super.setActive(t)}setMap(t){this.getMap()&&(this.box_.setMap(null),this.startPixel_&&(this.dispatchEvent(new Di($e.BOXCANCEL,this.startPixel_,null)),this.startPixel_=null)),super.setMap(t)}}class iu extends eu{constructor(t){t=t||{};const e=t.condition?t.condition:qc;super({condition:e,className:t.className||"ol-dragzoom",minArea:t.minArea}),this.duration_=t.duration!==void 0?t.duration:200,this.out_=t.out!==void 0?t.out:!1}onBoxEnd(t){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:xi})}}const Oe={LEFT:"ArrowLeft",UP:"ArrowUp",RIGHT:"ArrowRight",DOWN:"ArrowDown"};class nu extends ln{constructor(t){super(),t=t||{},this.defaultCondition_=function(e){return Ma(e)&&ba(e)},this.condition_=t.condition!==void 0?t.condition:this.defaultCondition_,this.duration_=t.duration!==void 0?t.duration:100,this.pixelDelta_=t.pixelDelta!==void 0?t.pixelDelta:128}handleEvent(t){let e=!1;if(t.type==z.KEYDOWN){const i=t.originalEvent,s=i.key;if(this.condition_(t)&&(s==Oe.DOWN||s==Oe.LEFT||s==Oe.RIGHT||s==Oe.UP)){const o=t.map.getView(),a=o.getResolution()*this.pixelDelta_;let l=0,c=0;s==Oe.DOWN?c=-a:s==Oe.LEFT?l=-a:s==Oe.RIGHT?l=a:c=a;const h=[l,c];Qs(h,o.getRotation()),Kc(o,h,this.duration_),i.preventDefault(),e=!0}}return!e}}class su extends ln{constructor(t){super(),t=t||{},this.condition_=t.condition?t.condition:function(e){return!Hc(e)&&ba(e)},this.delta_=t.delta?t.delta:1,this.duration_=t.duration!==void 0?t.duration:100}handleEvent(t){let e=!1;if(t.type==z.KEYDOWN||t.type==z.KEYPRESS){const i=t.originalEvent,s=i.key;if(this.condition_(t)&&(s==="+"||s==="-")){const r=t.map,o=s==="+"?this.delta_:-this.delta_,a=r.getView();Rr(a,o,void 0,this.duration_),i.preventDefault(),e=!0}}return!e}}class ru{constructor(t,e,i){this.decay_=t,this.minVelocity_=e,this.delay_=i,this.points_=[],this.angle_=0,this.initialVelocity_=0}begin(){this.points_.length=0,this.angle_=0,this.initialVelocity_=0}update(t,e){this.points_.push(t,e,Date.now())}end(){if(this.points_.length<6)return!1;const t=Date.now()-this.delay_,e=this.points_.length-3;if(this.points_[e+2]0&&this.points_[i+2]>t;)i-=3;const s=this.points_[e+2]-this.points_[i+2];if(s<1e3/60)return!1;const r=this.points_[e]-this.points_[i],o=this.points_[e+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 ou extends ln{constructor(t){t=t||{},super(t),this.totalDelta_=0,this.lastDelta_=0,this.maxDelta_=t.maxDelta!==void 0?t.maxDelta:1,this.duration_=t.duration!==void 0?t.duration:250,this.timeout_=t.timeout!==void 0?t.timeout:80,this.useAnchor_=t.useAnchor!==void 0?t.useAnchor:!0,this.constrainResolution_=t.constrainResolution!==void 0?t.constrainResolution:!1;const e=t.condition?t.condition:jc;this.condition_=t.onFocusOnly?Ws(La,e):e,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 t=this.getMap();if(!t)return;t.getView().endInteraction(void 0,this.lastDelta_?this.lastDelta_>0?1:-1:0,this.lastAnchor_?t.getCoordinateFromPixel(this.lastAnchor_):null)}handleEvent(t){if(!this.condition_(t)||t.type!==z.WHEEL)return!0;const i=t.map,s=t.originalEvent;s.preventDefault(),this.useAnchor_&&(this.lastAnchor_=t.pixel);let r;if(t.type==z.WHEEL&&(r=s.deltaY,Ah&&s.deltaMode===WheelEvent.DOM_DELTA_PIXEL&&(r/=ua),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_(t){const e=t.getView();e.getAnimating()&&e.cancelAnimations();let i=-st(this.totalDelta_,-this.maxDelta_*this.deltaPerZoom_,this.maxDelta_*this.deltaPerZoom_)/this.deltaPerZoom_;(e.getConstrainResolution()||this.constrainResolution_)&&(i=i?i>0?1:-1:0),Rr(e,i,this.lastAnchor_?t.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(t){this.useAnchor_=t,t||(this.lastAnchor_=null)}}class au extends hn{constructor(t){t=t||{};const e=t;e.stopDown||(e.stopDown=Zn),super(e),this.anchor_=null,this.lastAngle_=void 0,this.rotating_=!1,this.rotationDelta_=0,this.threshold_=t.threshold!==void 0?t.threshold:.3,this.duration_=t.duration!==void 0?t.duration:250}handleDragEvent(t){let e=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),e=l}this.lastAngle_=r;const o=t.map,a=o.getView();a.getConstraints().rotation!==rr&&(this.anchor_=o.getCoordinateFromPixelInternal(o.getEventPixel(Tr(this.targetPointers))),this.rotating_&&(o.render(),a.adjustRotationInternal(e,this.anchor_)))}handleUpEvent(t){return this.targetPointers.length<2?(t.map.getView().endInteraction(this.duration_),!1):!0}handleDownEvent(t){if(this.targetPointers.length>=2){const e=t.map;return this.anchor_=null,this.lastAngle_=void 0,this.rotating_=!1,this.rotationDelta_=0,this.handlingDownUpSequence||e.getView().beginInteraction(),!0}return!1}}class lu extends hn{constructor(t){t=t||{};const e=t;e.stopDown||(e.stopDown=Zn),super(e),this.anchor_=null,this.duration_=t.duration!==void 0?t.duration:400,this.lastDistance_=void 0,this.lastScaleDelta_=1}handleDragEvent(t){let e=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&&(e=this.lastDistance_/a),this.lastDistance_=a;const l=t.map,c=l.getView();e!=1&&(this.lastScaleDelta_=e),this.anchor_=l.getCoordinateFromPixelInternal(l.getEventPixel(Tr(this.targetPointers))),l.render(),c.adjustResolutionInternal(e,this.anchor_)}handleUpEvent(t){if(this.targetPointers.length<2){const i=t.map.getView(),s=this.lastScaleDelta_>1?1:-1;return i.endInteraction(this.duration_,s),!1}return!0}handleDownEvent(t){if(this.targetPointers.length>=2){const e=t.map;return this.anchor_=null,this.lastDistance_=void 0,this.lastScaleDelta_=1,this.handlingDownUpSequence||e.getView().beginInteraction(),!0}return!1}}function hu(n){n=n||{};const t=new jt,e=new ru(-.005,.05,100);return(n.altShiftDragRotate!==void 0?n.altShiftDragRotate:!0)&&t.push(new Qc),(n.doubleClickZoom!==void 0?n.doubleClickZoom:!0)&&t.push(new Bc({delta:n.zoomDelta,duration:n.zoomDuration})),(n.dragPan!==void 0?n.dragPan:!0)&&t.push(new Jc({onFocusOnly:n.onFocusOnly,kinetic:e})),(n.pinchRotate!==void 0?n.pinchRotate:!0)&&t.push(new au),(n.pinchZoom!==void 0?n.pinchZoom:!0)&&t.push(new lu({duration:n.zoomDuration})),(n.keyboard!==void 0?n.keyboard:!0)&&(t.push(new nu),t.push(new su({delta:n.zoomDelta,duration:n.zoomDuration}))),(n.mouseWheelZoom!==void 0?n.mouseWheelZoom:!0)&&t.push(new ou({onFocusOnly:n.onFocusOnly,duration:n.zoomDuration})),(n.shiftDragZoom!==void 0?n.shiftDragZoom:!0)&&t.push(new iu({duration:n.zoomDuration})),t}function Da(n){if(n instanceof Jn){n.setMapInternal(null);return}n instanceof Ci&&n.getLayers().forEach(Da)}function Pa(n,t){if(n instanceof Jn){n.setMapInternal(t);return}if(n instanceof Ci){const e=n.getLayers().getArray();for(let i=0,s=e.length;ithis.updateSize()),this.controls=e.controls||Zc(),this.interactions=e.interactions||hu({onFocusOnly:!0}),this.overlays_=e.overlays,this.overlayIdIndex_={},this.renderer_=null,this.postRenderFunctions_=[],this.tileQueue_=new Gc(this.getTilePriority.bind(this),this.handleTileChange_.bind(this)),this.addChangeListener(_t.LAYERGROUP,this.handleLayerGroupChanged_),this.addChangeListener(_t.VIEW,this.handleViewChanged_),this.addChangeListener(_t.SIZE,this.handleSizeChanged_),this.addChangeListener(_t.TARGET,this.handleTargetChanged_),this.setProperties(e.values);const i=this;t.view&&!(t.view instanceof Vt)&&t.view.then(function(s){i.setView(new Vt(s))}),this.controls.addEventListener(wt.ADD,s=>{s.element.setMap(this)}),this.controls.addEventListener(wt.REMOVE,s=>{s.element.setMap(null)}),this.interactions.addEventListener(wt.ADD,s=>{s.element.setMap(this)}),this.interactions.addEventListener(wt.REMOVE,s=>{s.element.setMap(null)}),this.overlays_.addEventListener(wt.ADD,s=>{this.addOverlayInternal_(s.element)}),this.overlays_.addEventListener(wt.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(t){this.getControls().push(t)}addInteraction(t){this.getInteractions().push(t)}addLayer(t){this.getLayerGroup().getLayers().push(t)}handleLayerAdd_(t){Pa(t.layer,this)}addOverlay(t){this.getOverlays().push(t)}addOverlayInternal_(t){const e=t.getId();e!==void 0&&(this.overlayIdIndex_[e.toString()]=t),t.setMap(this)}disposeInternal(){this.controls.clear(),this.interactions.clear(),this.overlays_.clear(),this.resizeObserver_.disconnect(),this.setTarget(null),super.disposeInternal()}forEachFeatureAtPixel(t,e,i){if(!this.frameState_||!this.renderer_)return;const s=this.getCoordinateFromPixelInternal(t);i=i!==void 0?i:{};const r=i.hitTolerance!==void 0?i.hitTolerance:0,o=i.layerFilter!==void 0?i.layerFilter:Wi,a=i.checkWrapped!==!1;return this.renderer_.forEachFeatureAtCoordinate(s,this.frameState_,r,a,e,null,o,null)}getFeaturesAtPixel(t,e){const i=[];return this.forEachFeatureAtPixel(t,function(s){i.push(s)},e),i}getAllLayers(){const t=[];function e(i){i.forEach(function(s){s instanceof Ci?e(s.getLayers()):t.push(s)})}return e(this.getLayers()),t}hasFeatureAtPixel(t,e){if(!this.frameState_||!this.renderer_)return!1;const i=this.getCoordinateFromPixelInternal(t);e=e!==void 0?e:{};const s=e.layerFilter!==void 0?e.layerFilter:Wi,r=e.hitTolerance!==void 0?e.hitTolerance:0,o=e.checkWrapped!==!1;return this.renderer_.hasFeatureAtCoordinate(i,this.frameState_,r,o,s,null)}getEventCoordinate(t){return this.getCoordinateFromPixel(this.getEventPixel(t))}getEventCoordinateInternal(t){return this.getCoordinateFromPixelInternal(this.getEventPixel(t))}getEventPixel(t){const i=this.viewport_.getBoundingClientRect(),s=this.getSize(),r=i.width/s[0],o=i.height/s[1],a="changedTouches"in t?t.changedTouches[0]:t;return[(a.clientX-i.left)/r,(a.clientY-i.top)/o]}getTarget(){return this.get(_t.TARGET)}getTargetElement(){return this.targetElement_}getCoordinateFromPixel(t){return Fs(this.getCoordinateFromPixelInternal(t),this.getView().getProjection())}getCoordinateFromPixelInternal(t){const e=this.frameState_;return e?dt(e.pixelToCoordinateTransform,t.slice()):null}getControls(){return this.controls}getOverlays(){return this.overlays_}getOverlayById(t){const e=this.overlayIdIndex_[t.toString()];return e!==void 0?e:null}getInteractions(){return this.interactions}getLayerGroup(){return this.get(_t.LAYERGROUP)}setLayers(t){const e=this.getLayerGroup();if(t instanceof jt){e.setLayers(t);return}const i=e.getLayers();i.clear(),i.extend(t)}getLayers(){return this.getLayerGroup().getLayers()}getLoadingOrNotReady(){const t=this.getLayerGroup().getLayerStatesArray();for(let e=0,i=t.length;e=0;r--){const o=s[r];if(o.getMap()!==this||!o.getActive()||!this.getTargetElement())continue;if(!o.handleEvent(t)||t.propagationStopped)break}}}handlePostRender(){const t=this.frameState_,e=this.tileQueue_;if(!e.isEmpty()){let s=this.maxTilesLoading_,r=s;if(t){const o=t.viewHints;if(o[mt.ANIMATING]||o[mt.INTERACTING]){const a=Date.now()-t.time>8;s=a?0:8,r=a?0:2}}e.getTilesLoading(){this.postRenderTimeoutHandle_=void 0,this.handlePostRender()},0))}setLayerGroup(t){const e=this.getLayerGroup();e&&this.handleLayerRemove_(new Re("removelayer",e)),this.set(_t.LAYERGROUP,t)}setSize(t){this.set(_t.SIZE,t)}setTarget(t){this.set(_t.TARGET,t)}setView(t){if(!t||t instanceof Vt){this.set(_t.VIEW,t);return}this.set(_t.VIEW,new Vt);const e=this;t.then(function(i){e.setView(new Vt(i))})}updateSize(){const t=this.getTargetElement();let e;if(t){const s=getComputedStyle(t),r=t.offsetWidth-parseFloat(s.borderLeftWidth)-parseFloat(s.paddingLeft)-parseFloat(s.paddingRight)-parseFloat(s.borderRightWidth),o=t.offsetHeight-parseFloat(s.borderTopWidth)-parseFloat(s.paddingTop)-parseFloat(s.paddingBottom)-parseFloat(s.borderBottomWidth);!isNaN(r)&&!isNaN(o)&&(e=[Math.max(0,r),Math.max(0,o)],!io(e)&&(t.offsetWidth||t.offsetHeight||t.getClientRects().length)&&Uo("No map visible because the map container's width or height are 0."))}const i=this.getSize();e&&(!i||!Ae(e,i))&&(this.setSize(e),this.updateViewportSize_(e))}updateViewportSize_(t){const e=this.getView();e&&e.setViewportSize(t)}}function uu(n){let t=null;n.keyboardEventTarget!==void 0&&(t=typeof n.keyboardEventTarget=="string"?document.getElementById(n.keyboardEventTarget):n.keyboardEventTarget);const e={},i=n.layers&&typeof n.layers.getLayers=="function"?n.layers:new Ci({layers:n.layers});e[_t.LAYERGROUP]=i,e[_t.TARGET]=n.target,e[_t.VIEW]=n.view instanceof Vt?n.view:new Vt;let s;n.controls!==void 0&&(Array.isArray(n.controls)?s=new jt(n.controls.slice()):(j(typeof n.controls.getArray=="function","Expected `controls` to be an array or an `ol/Collection.js`"),s=n.controls));let r;n.interactions!==void 0&&(Array.isArray(n.interactions)?r=new jt(n.interactions.slice()):(j(typeof n.interactions.getArray=="function","Expected `interactions` to be an array or an `ol/Collection.js`"),r=n.interactions));let o;return n.overlays!==void 0?Array.isArray(n.overlays)?o=new jt(n.overlays.slice()):(j(typeof n.overlays.getArray=="function","Expected `overlays` to be an array or an `ol/Collection.js`"),o=n.overlays):o=new jt,{controls:s,interactions:r,keyboardEventTarget:t,overlays:o,values:e}}class Ir extends Kn{constructor(t,e,i){super(),i=i||{},this.tileCoord=t,this.state=e,this.key="",this.transition_=i.transition===void 0?250:i.transition,this.transitionStarts_={},this.interpolate=!!i.interpolate}changed(){this.dispatchEvent(z.CHANGE)}release(){this.state===M.ERROR&&this.setState(M.EMPTY)}getKey(){return this.key+"/"+this.tileCoord}getTileCoord(){return this.tileCoord}getState(){return this.state}setState(t){if(this.state!==M.ERROR&&this.state>t)throw new Error("Tile load sequence violation");this.state=t,this.changed()}load(){U()}getAlpha(t,e){if(!this.transition_)return 1;let i=this.transitionStarts_[t];if(!i)i=e,this.transitionStarts_[t]=i;else if(i===-1)return 1;const s=e-i+1e3/60;return s>=this.transition_?1:Jo(s/this.transition_)}inTransition(t){return this.transition_?this.transitionStarts_[t]!==-1:!1}endTransition(t){this.transition_&&(this.transitionStarts_[t]=-1)}disposeInternal(){this.release(),super.disposeInternal()}}class Oa extends Ir{constructor(t,e,i,s,r,o){super(t,e,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(t){this.image_=t,this.state=M.LOADED,this.unlistenImage_(),this.changed()}handleImageError_(){this.state=M.ERROR,this.unlistenImage_(),this.image_=du(),this.changed()}handleImageLoad_(){const t=this.image_;t.naturalWidth&&t.naturalHeight?this.state=M.LOADED:this.state=M.EMPTY,this.unlistenImage_(),this.changed()}load(){this.state==M.ERROR&&(this.state=M.IDLE,this.image_=new Image,this.crossOrigin_!==null&&(this.image_.crossOrigin=this.crossOrigin_)),this.state==M.IDLE&&(this.state=M.LOADING,this.changed(),this.tileLoadFunction_(this,this.src_),this.unlisten_=Oh(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 du(){const n=rt(1,1);return n.fillStyle="rgba(0,0,0,0)",n.fillRect(0,0,1,1),n.canvas}const Fa=.5,fu=10,Co=.25;class ka{constructor(t,e,i,s,r,o){this.sourceProj_=t,this.targetProj_=e;let a={};const l=An(this.targetProj_,this.sourceProj_);this.transformInv_=function(y){const x=y[0]+"/"+y[1];return a[x]||(a[x]=l(y)),a[x]},this.maxSourceExtent_=s,this.errorThresholdSquared_=r*r,this.triangles_=[],this.wrapsXInSource_=!1,this.canWrapXInSource_=this.sourceProj_.canWrapX()&&!!s&&!!this.sourceProj_.getExtent()&&q(s)>=q(this.sourceProj_.getExtent()),this.sourceWorldWidth_=this.sourceProj_.getExtent()?q(this.sourceProj_.getExtent()):null,this.targetWorldWidth_=this.targetProj_.getExtent()?q(this.targetProj_.getExtent()):null;const c=Ye(i),h=jn(i),u=Un(i),d=Vn(i),f=this.transformInv_(c),g=this.transformInv_(h),_=this.transformInv_(u),m=this.transformInv_(d),p=fu+(o?Math.max(0,Math.ceil(Math.log2(Zi(i)/(o*o*256*256)))):0);if(this.addQuad_(c,h,u,d,f,g,_,m,p),this.wrapsXInSource_){let y=1/0;this.triangles_.forEach(function(x,E,w){y=Math.min(y,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])-y>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]-y>this.sourceWorldWidth_/2&&(E[0][0]-=this.sourceWorldWidth_),E[1][0]-y>this.sourceWorldWidth_/2&&(E[1][0]-=this.sourceWorldWidth_),E[2][0]-y>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&&u<1;let g=!1;if(c>0){if(this.targetProj_.isGlobal()&&this.targetWorldWidth_){const m=Wr([t,e,i,s]);g=q(m)/this.targetWorldWidth_>Co||g}!f&&this.sourceProj_.isGlobal()&&u&&(g=u>Co||g)}if(!g&&this.maxSourceExtent_&&isFinite(h[0])&&isFinite(h[1])&&isFinite(h[2])&&isFinite(h[3])&&!Tt(h,this.maxSourceExtent_))return;let _=0;if(!g&&(!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)g=!0;else if(_=(!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),_!=1&&_!=2&&_!=4&&_!=8)return}if(c>0){if(!g){const m=[(t[0]+i[0])/2,(t[1]+i[1])/2],p=this.transformInv_(m);let y;f?y=(ci(r[0],d)+ci(a[0],d))/2-ci(p[0],d):y=(r[0]+a[0])/2-p[0];const x=(r[1]+a[1])/2-p[1];g=y*y+x*x>this.errorThresholdSquared_}if(g){if(Math.abs(t[0]-i[0])<=Math.abs(t[1]-i[1])){const m=[(e[0]+i[0])/2,(e[1]+i[1])/2],p=this.transformInv_(m),y=[(s[0]+t[0])/2,(s[1]+t[1])/2],x=this.transformInv_(y);this.addQuad_(t,e,m,y,r,o,p,x,c-1),this.addQuad_(y,m,i,s,x,p,a,l,c-1)}else{const m=[(t[0]+e[0])/2,(t[1]+e[1])/2],p=this.transformInv_(m),y=[(i[0]+s[0])/2,(i[1]+s[1])/2],x=this.transformInv_(y);this.addQuad_(t,m,y,s,r,p,x,l,c-1),this.addQuad_(m,e,i,y,p,o,a,x,c-1)}return}}if(f){if(!this.canWrapXInSource_)return;this.wrapsXInSource_=!0}_&11||this.addTriangle_(t,i,s,r,a,l),_&14||this.addTriangle_(t,i,e,r,a,o),_&&(_&13||this.addTriangle_(e,s,t,o,l,r),_&7||this.addTriangle_(e,s,i,o,l,a))}calculateSourceExtent(){const t=Ft();return this.triangles_.forEach(function(e,i,s){const r=e.source;zi(t,r[0]),zi(t,r[1]),zi(t,r[2])}),t}getTriangles(){return this.triangles_}}let Ts;const ue=[];function Ro(n,t,e,i,s){n.beginPath(),n.moveTo(0,0),n.lineTo(t,e),n.lineTo(i,s),n.closePath(),n.save(),n.clip(),n.fillRect(0,0,Math.max(t,i)+1,Math.max(e,s)),n.restore()}function Is(n,t){return Math.abs(n[t*4]-210)>2||Math.abs(n[t*4+3]-.75*255)>2}function gu(){if(Ts===void 0){const n=rt(6,6,ue);n.globalCompositeOperation="lighter",n.fillStyle="rgba(210, 0, 0, 0.75)",Ro(n,4,5,4,0),Ro(n,4,5,0,5);const t=n.getImageData(0,0,3,3).data;Ts=Is(t,0)||Is(t,4)||Is(t,8),mi(n),ue.push(n.canvas)}return Ts}function To(n,t,e,i){const s=qo(e,t,n);let r=Zr(t,i,e);const o=t.getMetersPerUnit();o!==void 0&&(r*=o);const a=n.getMetersPerUnit();a!==void 0&&(r/=a);const l=n.getExtent();if(!l||_i(l,s)){const c=Zr(n,r,s)/r;isFinite(c)&&c>0&&(r/=c)}return r}function Na(n,t,e,i){const s=Xe(e);let r=To(n,t,s,i);return(!isFinite(r)||r<=0)&&Ko(e,function(o){return r=To(n,t,o,i),isFinite(r)&&r>0}),r}function Ga(n,t,e,i,s,r,o,a,l,c,h,u,d,f){const g=rt(Math.round(e*n),Math.round(e*t),ue);if(u||(g.imageSmoothingEnabled=!1),l.length===0)return g.canvas;g.scale(e,e);function _(w){return Math.round(w*e)/e}g.globalCompositeOperation="lighter";const m=Ft();l.forEach(function(w,v,T){Tl(m,w.extent)});let p;const y=e/i,x=(u?1:1+Math.pow(2,-24))/y;if(!d||l.length!==1||c!==0){if(p=rt(Math.round(q(m)*y),Math.round(pt(m)*y),ue),u||(p.imageSmoothingEnabled=!1),s&&f){const w=(s[0]-m[0])*y,v=-(s[3]-m[3])*y,T=q(s)*y,R=pt(s)*y;p.rect(w,v,T,R),p.clip()}l.forEach(function(w,v,T){if(w.image.width>0&&w.image.height>0){if(w.clipExtent){p.save();const b=(w.clipExtent[0]-m[0])*y,O=-(w.clipExtent[3]-m[3])*y,A=q(w.clipExtent)*y,F=pt(w.clipExtent)*y;p.rect(u?b:Math.round(b),u?O:Math.round(O),u?A:Math.round(b+A)-Math.round(b),u?F:Math.round(O+F)-Math.round(O)),p.clip()}const R=(w.extent[0]-m[0])*y,I=-(w.extent[3]-m[3])*y,G=q(w.extent)*y,D=pt(w.extent)*y;p.drawImage(w.image,c,c,w.image.width-2*c,w.image.height-2*c,u?R:Math.round(R),u?I:Math.round(I),u?G:Math.round(R+G)-Math.round(R),u?D:Math.round(I+D)-Math.round(I)),w.clipExtent&&p.restore()}})}const E=Ye(o);return a.getTriangles().forEach(function(w,v,T){const R=w.source,I=w.target;let G=R[0][0],D=R[0][1],b=R[1][0],O=R[1][1],A=R[2][0],F=R[2][1];const L=_((I[0][0]-E[0])/r),Z=_(-(I[0][1]-E[1])/r),K=_((I[1][0]-E[0])/r),et=_(-(I[1][1]-E[1])/r),k=_((I[2][0]-E[0])/r),X=_(-(I[2][1]-E[1])/r),Q=G,ct=D;G=0,D=0,b-=Q,O-=ct,A-=Q,F-=ct;const S=[[b,O,0,0,K-L],[A,F,0,0,k-L],[0,0,b,O,et-Z],[0,0,A,F,X-Z]],xt=fl(S);if(!xt)return;if(g.save(),g.beginPath(),gu()||!u){g.moveTo(K,et);const at=4,Zt=L-K,Jt=Z-et;for(let Lt=0;Lt{const G=e.getTileRangeForExtentAndZ(I,this.sourceZ_);for(let D=G.minX;D<=G.maxX;D++)for(let b=G.minY;b<=G.maxY;b++){const O=c(this.sourceZ_,D,b,a);if(O){const A=T*v;this.sourceTiles_.push({tile:O,offset:A})}}++T}),this.sourceTiles_.length===0&&(this.state=M.EMPTY)}}getImage(){return this.canvas_}reproject_(){const t=[];if(this.sourceTiles_.forEach(e=>{const i=e.tile;if(i&&i.getState()==M.LOADED){const s=this.sourceTileGrid_.getTileCoordExtent(i.tileCoord);s[0]+=e.offset,s[2]+=e.offset;const r=this.clipExtent_?.slice();r&&(r[0]+=e.offset,r[2]+=e.offset),t.push({extent:s,clipExtent:r,image:i.getImage()})}}),this.sourceTiles_.length=0,t.length===0)this.state=M.ERROR;else{const e=this.wrappedTileCoord_[0],i=this.targetTileGrid_.getTileSize(e),s=typeof i=="number"?i:i[0],r=typeof i=="number"?i:i[1],o=this.targetTileGrid_.getResolution(e),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_,t,this.gutter_,this.renderEdges_,this.interpolate),this.state=M.LOADED}this.changed()}load(){if(this.state==M.IDLE){this.state=M.LOADING,this.changed();let t=0;this.sourcesListenerKeys_=[],this.sourceTiles_.forEach(({tile:e})=>{const i=e.getState();if(i==M.IDLE||i==M.LOADING){t++;const s=V(e,z.CHANGE,r=>{const o=e.getState();(o==M.LOADED||o==M.ERROR||o==M.EMPTY)&&(tt(s),t--,t===0&&(this.unlistenSources_(),this.reproject_()))});this.sourcesListenerKeys_.push(s)}}),t===0?setTimeout(this.reproject_.bind(this),0):this.sourceTiles_.forEach(function({tile:e},i,s){e.getState()==M.IDLE&&e.load()})}}unlistenSources_(){this.sourcesListenerKeys_.forEach(tt),this.sourcesListenerKeys_=null}release(){this.canvas_&&(mi(this.canvas_.getContext("2d")),ue.push(this.canvas_),this.canvas_=null),super.release()}}const vs={TILELOADSTART:"tileloadstart",TILELOADEND:"tileloadend",TILELOADERROR:"tileloaderror"};class za extends $t{constructor(t){super(),this.projection=kt(t.projection),this.attributions_=Io(t.attributions),this.attributionsCollapsible_=t.attributionsCollapsible??!0,this.loading=!1,this.state_=t.state!==void 0?t.state:"ready",this.wrapX_=t.wrapX!==void 0?t.wrapX:!1,this.interpolate_=!!t.interpolate,this.viewResolver=null,this.viewRejector=null;const e=this;this.viewPromise_=new Promise(function(i,s){e.viewResolver=i,e.viewRejector=s})}getAttributions(){return this.attributions_}getAttributionsCollapsible(){return this.attributionsCollapsible_}getProjection(){return this.projection}getResolutions(t){return null}getView(){return this.viewPromise_}getState(){return this.state_}getWrapX(){return this.wrapX_}getInterpolate(){return this.interpolate_}refresh(){this.changed()}setAttributions(t){this.attributions_=Io(t),this.changed()}setState(t){this.state_=t,this.changed()}}function Io(n){return n?typeof n=="function"?n:(Array.isArray(n)||(n=[n]),t=>n):null}class vr{constructor(t,e,i,s){this.minX=t,this.maxX=e,this.minY=i,this.maxY=s}contains(t){return this.containsXY(t[1],t[2])}containsTileRange(t){return this.minX<=t.minX&&t.maxX<=this.maxX&&this.minY<=t.minY&&t.maxY<=this.maxY}containsXY(t,e){return this.minX<=t&&t<=this.maxX&&this.minY<=e&&e<=this.maxY}equals(t){return this.minX==t.minX&&this.minY==t.minY&&this.maxX==t.maxX&&this.maxY==t.maxY}extend(t){t.minXthis.maxX&&(this.maxX=t.maxX),t.minYthis.maxY&&(this.maxY=t.maxY)}getHeight(){return this.maxY-this.minY+1}getSize(){return[this.getWidth(),this.getHeight()]}getWidth(){return this.maxX-this.minX+1}intersects(t){return this.minX<=t.maxX&&this.maxX>=t.minX&&this.minY<=t.maxY&&this.maxY>=t.minY}}function Je(n,t,e,i,s){return s!==void 0?(s.minX=n,s.maxX=t,s.minY=e,s.maxY=i,s):new vr(n,t,e,i)}function Nn(n,t,e,i){return i!==void 0?(i[0]=n,i[1]=t,i[2]=e,i):[n,t,e]}function _u(n,t,e){return n+"/"+t+"/"+e}function mu(n){return pu(n[0],n[1],n[2])}function pu(n,t,e){return(t<e||e>t.getMaxZoom())return!1;const r=t.getFullTileRange(e);return r?r.containsXY(i,s):!0}const Qe=[0,0,0],pe=5;class Xa{constructor(t){this.minZoom=t.minZoom!==void 0?t.minZoom:0,this.resolutions_=t.resolutions,j(ll(this.resolutions_,(s,r)=>r-s),"`resolutions` must be sorted in descending order");let e;if(!t.origins){for(let s=0,r=this.resolutions_.length-1;s{const o=new vr(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(t,e,i){const s=this.getTileRangeForExtentAndZ(t,e);for(let r=s.minX,o=s.maxX;r<=o;++r)for(let a=s.minY,l=s.maxY;a<=l;++a)i([e,r,a])}forEachTileCoordParentTileRange(t,e,i,s){let r,o,a,l=null,c=t[0]-1;for(this.zoomFactor_===2?(o=t[1],a=t[2]):l=this.getTileCoordExtent(t,s);c>=this.minZoom;){if(o!==void 0&&a!==void 0?(o=Math.floor(o/2),a=Math.floor(a/2),r=Je(o,o,a,a,i)):r=this.getTileRangeForExtentAndZ(l,c,i),e(c,r))return!0;--c}return!1}getExtent(){return this.extent_}getMaxZoom(){return this.maxZoom}getMinZoom(){return this.minZoom}getOrigin(t){return this.origin_?this.origin_:this.origins_[t]}getResolution(t){return this.resolutions_[t]}getResolutions(){return this.resolutions_}getTileCoordChildTileRange(t,e,i){if(t[0]this.maxZoom||e0?i:Math.max(r/e[0],s/e[1]);const o=t+1,a=new Array(o);for(let l=0;lthis.getTileInternal(f,g,_,m,o),this.reprojectionErrorThreshold_,this.renderReprojectionEdges_,this.tileOptions);return d.key=l,d}getTileInternal(t,e,i,s,r){const o=this.getKey();return this.createTile_(t,e,i,s,r,o)}setRenderReprojectionEdges(t){this.renderReprojectionEdges_!=t&&(this.renderReprojectionEdges_=t,this.changed())}setTileGridForProjection(t,e){const i=kt(t);if(i){const s=$(i);s in this.tileGridForProjection||(this.tileGridForProjection[s]=e)}}}function Fu(n,t){n.getImage().src=t}class ku extends Ou{constructor(t){t=t||{};const e=t.projection!==void 0?t.projection:"EPSG:3857",i=t.tileGrid!==void 0?t.tileGrid:wu({extent:Sr(e),maxResolution:t.maxResolution,maxZoom:t.maxZoom,minZoom:t.minZoom,tileSize:t.tileSize});super({attributions:t.attributions,cacheSize:t.cacheSize,crossOrigin:t.crossOrigin,interpolate:t.interpolate,projection:e,reprojectionErrorThreshold:t.reprojectionErrorThreshold,tileGrid:i,tileLoadFunction:t.tileLoadFunction,tilePixelRatio:t.tilePixelRatio,tileUrlFunction:t.tileUrlFunction,url:t.url,urls:t.urls,wrapX:t.wrapX!==void 0?t.wrapX:!0,transition:t.transition,attributionsCollapsible:t.attributionsCollapsible,zDirection:t.zDirection}),this.gutter_=t.gutter!==void 0?t.gutter:0}getGutter(){return this.gutter_}}const Nu='© OpenStreetMap contributors.';class Gu extends ku{constructor(t){t=t||{};let e;t.attributions!==void 0?e=t.attributions:e=[Nu];const i=t.crossOrigin!==void 0?t.crossOrigin:"anonymous",s=t.url!==void 0?t.url:"https://tile.openstreetmap.org/{z}/{x}/{y}.png";super({attributions:e,attributionsCollapsible:!1,cacheSize:t.cacheSize,crossOrigin:i,interpolate:t.interpolate,maxZoom:t.maxZoom!==void 0?t.maxZoom:19,reprojectionErrorThreshold:t.reprojectionErrorThreshold,tileLoadFunction:t.tileLoadFunction,transition:t.transition,url:s,wrapX:t.wrapX,zDirection:t.zDirection})}}const Rn={PRELOAD:"preload",USE_INTERIM_TILES_ON_ERROR:"useInterimTilesOnError"};class zu extends Jn{constructor(t){t=t||{};const e=Object.assign({},t),i=t.cacheSize;delete t.cacheSize,delete e.preload,delete e.useInterimTilesOnError,super(e),this.on,this.once,this.un,this.cacheSize_=i,this.setPreload(t.preload!==void 0?t.preload:0),this.setUseInterimTilesOnError(t.useInterimTilesOnError!==void 0?t.useInterimTilesOnError:!0)}getCacheSize(){return this.cacheSize_}getPreload(){return this.get(Rn.PRELOAD)}setPreload(t){this.set(Rn.PRELOAD,t)}getUseInterimTilesOnError(){return this.get(Rn.USE_INTERIM_TILES_ON_ERROR)}setUseInterimTilesOnError(t){this.set(Rn.USE_INTERIM_TILES_ON_ERROR,t)}getData(t){return super.getData(t)}}const Xu=5;class Wu extends sn{constructor(t){super(),this.ready=!0,this.boundHandleImageChange_=this.handleImageChange_.bind(this),this.layer_=t,this.staleKeys_=new Array,this.maxStaleKeys=Xu}getStaleKeys(){return this.staleKeys_}prependStaleKey(t){this.staleKeys_.unshift(t),this.staleKeys_.length>this.maxStaleKeys&&(this.staleKeys_.length=this.maxStaleKeys)}getFeatures(t){return U()}getData(t){return null}prepareFrame(t){return U()}renderFrame(t,e){return U()}forEachFeatureAtCoordinate(t,e,i,s,r){}getLayer(){return this.layer_}handleFontsChanged(){}handleImageChange_(t){const e=t.target;(e.getState()===Y.LOADED||e.getState()===Y.ERROR)&&this.renderIfReadyAndVisible()}loadImage(t){let e=t.getState();return e!=Y.LOADED&&e!=Y.ERROR&&t.addEventListener(z.CHANGE,this.boundHandleImageChange_),e==Y.IDLE&&(t.load(),e=t.getState()),e==Y.LOADED}renderIfReadyAndVisible(){const t=this.getLayer();t&&t.getVisible()&&t.getSourceState()==="ready"&&t.changed()}renderDeferred(t){}disposeInternal(){delete this.layer_,super.disposeInternal()}}class Za{constructor(){this.instructions_=[],this.zIndex=0,this.offset_=0,this.context_=new Proxy(bn(),{get:(t,e)=>{if(typeof bn()[e]=="function")return this.instructions_[this.zIndex+this.offset_]||(this.instructions_[this.zIndex+this.offset_]=[]),this.instructions_[this.zIndex+this.offset_].push(e),this.pushMethodArgs_},set:(t,e,i)=>(this.instructions_[this.zIndex+this.offset_]||(this.instructions_[this.zIndex+this.offset_]=[]),this.instructions_[this.zIndex+this.offset_].push(e,i),!0)})}pushMethodArgs_=(...t)=>(this.instructions_[this.zIndex+this.offset_].push(t),this);pushFunction(t){this.instructions_[this.zIndex+this.offset_].push(t)}getContext(){return this.context_}draw(t){this.instructions_.forEach(e=>{for(let i=0,s=e.length;i0&&this.getCount()>this.highWaterMark}expireCache(t){for(;this.canExpireCache();){const e=this.pop();e instanceof Wn&&e.dispose()}}clear(){this.count_=0,this.entries_={},this.oldest_=null,this.newest_=null}containsKey(t){return this.entries_.hasOwnProperty(t)}forEach(t){let e=this.oldest_;for(;e;)t(e.value_,e.key_,this),e=e.newer}get(t,e){const i=this.entries_[t];return j(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(t){const e=this.entries_[t];return j(e!==void 0,"Tried to get a value for a key that does not exist in the cache"),e===this.newest_?(this.newest_=e.older,this.newest_&&(this.newest_.newer=null)):e===this.oldest_?(this.oldest_=e.newer,this.oldest_&&(this.oldest_.older=null)):(e.newer.older=e.older,e.older.newer=e.newer),delete this.entries_[t],--this.count_,e.value_}getCount(){return this.count_}getKeys(){const t=new Array(this.count_);let e=0,i;for(i=this.newest_;i;i=i.older)t[e++]=i.key_;return t}getValues(){const t=new Array(this.count_);let e=0,i;for(i=this.newest_;i;i=i.older)t[e++]=i.value_;return t}peekLast(){return this.oldest_.value_}peekLastKey(){return this.oldest_.key_}peekFirstKey(){return this.newest_.key_}peek(t){return this.entries_[t]?.value_}pop(){const t=this.oldest_;return delete this.entries_[t.key_],t.newer&&(t.newer.older=null),this.oldest_=t.newer,this.oldest_||(this.newest_=null),--this.count_,t.value_}replace(t,e){this.get(t),this.entries_[t].value_=e}set(t,e){j(!(t in this.entries_),"Tried to set a value for a key that is used already");const i={key_:t,newer:null,older:this.newest_,value_:e};this.newest_?this.newest_.newer=i:this.oldest_=i,this.newest_=i,this.entries_[t]=i,++this.count_}setSize(t){this.highWaterMark=t}}class ju extends Zs{constructor(t){super({tileCoord:t.tileCoord,loader:()=>Promise.resolve(new Uint8ClampedArray(4)),interpolate:t.interpolate,transition:t.transition}),this.pixelRatio_=t.pixelRatio,this.gutter_=t.gutter,this.reprojData_=null,this.reprojError_=null,this.reprojSize_=void 0,this.sourceTileGrid_=t.sourceTileGrid,this.targetTileGrid_=t.targetTileGrid,this.wrappedTileCoord_=t.wrappedTileCoord||t.tileCoord,this.sourceTiles_=[],this.sourcesListenerKeys_=null,this.sourceZ_=0;const e=t.sourceProj,i=e.getExtent(),s=t.sourceTileGrid.getExtent();this.clipExtent_=e.canWrapX()?s?Xt(i,s):i:s;const r=this.targetTileGrid_.getTileCoordExtent(this.wrappedTileCoord_),o=this.targetTileGrid_.getExtent();let a=this.sourceTileGrid_.getExtent();const l=o?Xt(r,o):r;if(Zi(l)===0){this.state=M.EMPTY;return}i&&(a?a=Xt(a,i):a=i);const c=this.targetTileGrid_.getResolution(this.wrappedTileCoord_[0]),h=t.targetProj,u=Na(e,h,l,c);if(!isFinite(u)||u<=0){this.state=M.EMPTY;return}const d=t.errorThreshold!==void 0?t.errorThreshold:Fa;if(this.triangulation_=new ka(e,h,l,a,u*d,c),this.triangulation_.getTriangles().length===0){this.state=M.EMPTY;return}this.sourceZ_=this.sourceTileGrid_.getZForResolution(u);let f=this.triangulation_.calculateSourceExtent();if(a&&(e.canWrapX()?(f[1]=st(f[1],a[1],a[3]),f[3]=st(f[3],a[1],a[3])):f=Xt(f,a)),!Zi(f))this.state=M.EMPTY;else{let g=0,_=0;e.canWrapX()&&(g=q(i),_=Math.floor((f[0]-i[0])/g)),Js(f.slice(),e,!0).forEach(p=>{const y=this.sourceTileGrid_.getTileRangeForExtentAndZ(p,this.sourceZ_),x=t.getTileFunction;for(let E=y.minX;E<=y.maxX;E++)for(let w=y.minY;w<=y.maxY;w++){const v=x(this.sourceZ_,E,w,this.pixelRatio_);if(v){const T=_*g;this.sourceTiles_.push({tile:v,offset:T})}}++_}),this.sourceTiles_.length===0&&(this.state=M.EMPTY)}}getSize(){return this.reprojSize_}getData(){return this.reprojData_}getError(){return this.reprojError_}reproject_(){const t=[];let e=!1;if(this.sourceTiles_.forEach(g=>{const _=g.tile;if(!_||_.getState()!==M.LOADED)return;const m=_.getSize(),p=this.gutter_;let y;const x=Zu(_.getData());x?y=x:(e=!0,y=Bu(Gn(_.getData())));const E=[m[0]+2*p,m[1]+2*p],w=y instanceof Float32Array,v=E[0]*E[1],T=w?Float32Array:Uint8ClampedArray,R=new T(y.buffer),I=T.BYTES_PER_ELEMENT,G=I*R.length/v,D=R.byteLength/E[1],b=Math.floor(D/I/E[0]),O=v*b;let A=R;if(R.length!==O){A=new T(O);let Z=0,K=0;const et=E[0]*b;for(let k=0;k=0;--g){const _=[];for(let w=0,v=t.length;w{const i=e.getState();if(i!==M.IDLE&&i!==M.LOADING)return;t++;const s=V(e,z.CHANGE,()=>{const r=e.getState();(r==M.LOADED||r==M.ERROR||r==M.EMPTY)&&(tt(s),t--,t===0&&(this.unlistenSources_(),this.reproject_()))});this.sourcesListenerKeys_.push(s)}),t===0?setTimeout(this.reproject_.bind(this),0):this.sourceTiles_.forEach(function({tile:e}){e.getState()==M.IDLE&&e.load()})}unlistenSources_(){this.sourcesListenerKeys_.forEach(tt),this.sourcesListenerKeys_=null}}function Ss(n,t,e,i){return`${n},${_u(t,e,i)}`}function Ls(n,t,e){if(!(e in n))return n[e]=new Set([t]),!0;const i=n[e],s=i.has(t);return s||i.add(t),!s}function Hu(n,t,e){const i=n[e];return i?i.delete(t):!1}function So(n,t){const e=n.layerStatesArray[n.layerIndex];e.extent&&(t=Xt(t,Te(e.extent,n.viewState.projection)));const i=e.layer.getRenderSource();if(!i.getWrapX()){const s=i.getTileGridForProjection(n.viewState.projection).getExtent();s&&(t=Xt(t,s))}return t}class qu extends Ka{constructor(t,e){super(t),e=e||{},this.extentChanged=!0,this.renderComplete=!1,this.renderedExtent_=null,this.renderedPixelRatio,this.renderedProjection=null,this.renderedRevision,this.renderedTiles=[],this.renderedSourceKey_,this.renderedSourceRevision_,this.tempExtent=Ft(),this.tempTileRange_=new vr(0,0,0,0),this.tempTileCoord_=Nn(0,0,0);const i=e.cacheSize!==void 0?e.cacheSize:512;this.tileCache_=new Uu(i),this.renderedProjection_=void 0,this.maxStaleKeys=i*.5}getTileCache(){return this.tileCache_}getOrCreateTile(t,e,i,s){const r=this.tileCache_,a=this.getLayer().getSource(),l=Ss(a.getKey(),t,e,i);let c;if(r.containsKey(l))c=r.get(l);else{if(c=a.getTile(t,e,i,s.pixelRatio,s.viewState.projection),!c)return null;r.set(l,c)}return c}getTile(t,e,i,s){const r=this.getOrCreateTile(t,e,i,s);return r||null}getData(t){const e=this.frameState;if(!e)return null;const i=this.getLayer(),s=dt(e.pixelToCoordinateTransform,t.slice()),r=i.getExtent();if(r&&!_i(r,s))return null;const o=e.viewState,a=i.getRenderSource(),l=a.getTileGridForProjection(o.projection),c=a.getTilePixelRatio(e.pixelRatio);for(let h=l.getZForResolution(o.resolution);h>=l.getMinZoom();--h){const u=l.getTileCoordForCoordAndZ(s,h),d=this.getTile(h,u[1],u[2],e);if(!d||d.getState()!==M.LOADED)continue;const f=l.getOrigin(h),g=vt(l.getTileSize(h)),_=l.getResolution(h);let m;if(d instanceof Oa||d instanceof Ys)m=d.getImage();else if(d instanceof Zs){if(m=Gn(d.getData()),!m)continue}else continue;const p=Math.floor(c*((s[0]-f[0])/_-u[1]*g[0])),y=Math.floor(c*((f[1]-s[1])/_-u[2]*g[1])),x=Math.round(c*a.getGutterForProjection(o.projection));return this.getImageData(m,p+x,y+x)}return null}prepareFrame(t){this.renderedProjection_?t.viewState.projection!==this.renderedProjection_&&(this.tileCache_.clear(),this.renderedProjection_=t.viewState.projection):this.renderedProjection_=t.viewState.projection;const e=this.getLayer().getSource();if(!e)return!1;const i=e.getRevision();return this.renderedRevision_?this.renderedRevision_!==i&&(this.renderedRevision_=i,this.renderedSourceKey_===e.getKey()&&this.tileCache_.clear()):this.renderedRevision_=i,!0}enqueueTiles(t,e,i,s,r){const o=t.viewState,a=this.getLayer(),l=a.getRenderSource(),c=l.getTileGridForProjection(o.projection),h=$(l);h in t.wantedTiles||(t.wantedTiles[h]={});const u=t.wantedTiles[h],d=a.getMapInternal(),f=Math.max(i-r,c.getMinZoom(),c.getZForResolution(Math.min(a.getMaxResolution(),d?d.getView().getResolutionForZoom(Math.max(a.getMinZoom(),0)):c.getResolution(0)),l.zDirection));for(let g=i;g>=f;--g){const _=c.getTileRangeForExtentAndZ(e,g,this.tempTileRange_),m=c.getResolution(g);for(let p=_.minX;p<=_.maxX;++p)for(let y=_.minY;y<=_.maxY;++y){const x=this.getTile(g,p,y,t);if(!x||!Ls(s,x,g))continue;const w=x.getKey();if(u[w]=!0,x.getState()===M.IDLE&&!t.tileQueue.isKeyQueued(w)){const v=Nn(g,p,y,this.tempTileCoord_);t.tileQueue.enqueue([x,h,c.getTileCoordCenter(v),m])}}}}findStaleTile_(t,e){const i=this.tileCache_,s=t[0],r=t[1],o=t[2],a=this.getStaleKeys();for(let l=0;l0&&setTimeout(()=>{this.enqueueTiles(t,G,f-1,R,I-1)},0),!(f in R))return this.container;const D=$(this),b=t.time;for(const k of R[f]){const X=k.getState();if((k instanceof Ys||k instanceof ju)&&X===M.EMPTY)continue;const Q=k.tileCoord;if(X===M.LOADED&&k.getAlpha(D,b)===1){k.endTransition(D);continue}if(this.renderComplete=!1,this.findStaleTile_(Q,R)){Hu(R,k,f),t.animate=!0;continue}if(this.findAltTiles_(d,Q,f+1,R))continue;const xt=d.getMinZoom();for(let ut=f-1;ut>=xt&&!this.findAltTiles_(d,Q,ut,R);--ut);}const O=g/o*l/p,A=this.getRenderContext(t);de(this.tempTransform,y/2,x/2,O,O,0,-y/2,-x/2),i.extent&&this.clipUnrotated(A,t,E),h.getInterpolate()||(A.imageSmoothingEnabled=!1),this.preRender(A,t);const F=Object.keys(R).map(Number);F.sort(ae);let L;const Z=[],K=[];for(let k=F.length-1;k>=0;--k){const X=F[k],Q=h.getTilePixelSize(X,l,r),S=d.getResolution(X)/g,xt=Q[0]*S*O,ut=Q[1]*S*O,at=d.getTileCoordForCoordAndZ(Ye(T),X),Zt=d.getTileCoordExtent(at),Jt=dt(this.tempTransform,[p*(Zt[0]-T[0])/g,p*(T[3]-Zt[3])/g]),Lt=p*h.getGutterForProjection(r);for(const _e of R[X]){if(_e.getState()!==M.LOADED)continue;const Ri=_e.tileCoord,un=at[1]-Ri[1],rs=Math.round(Jt[0]-(un-1)*xt),Ti=at[2]-Ri[2],Me=Math.round(Jt[1]-(Ti-1)*ut),At=Math.round(Jt[0]-un*xt),Kt=Math.round(Jt[1]-Ti*ut),Ke=rs-At,Be=Me-Kt,Ii=F.length===1;let be=!1;L=[At,Kt,At+Ke,Kt,At+Ke,Kt+Be,At,Kt+Be];for(let Ve=0,Ue=Z.length;Ve{const Q=$(h),ct=X.wantedTiles[Q],S=ct?Object.keys(ct).length:0;this.updateCacheSize(S),this.tileCache_.expireCache()};return t.postRenderFunctions.push(et),this.container}updateCacheSize(t){this.tileCache_.highWaterMark=Math.max(this.tileCache_.highWaterMark,t*2)}drawTile(t,e,i,s,r,o,a,l){let c;if(t instanceof Zs){if(c=Gn(t.getData()),!c)throw new Error("Rendering array data is not yet supported")}else c=this.getTileImage(t);if(!c)return;const h=this.getRenderContext(e),u=$(this),d=e.layerStatesArray[e.layerIndex],f=d.opacity*(l?t.getAlpha(u,e.time):1),g=f!==h.globalAlpha;g&&(h.save(),h.globalAlpha=f),h.drawImage(c,a,a,c.width-2*a,c.height-2*a,i,s,r,o),g&&h.restore(),f!==d.opacity?e.animate=!0:l&&t.endTransition(u)}getImage(){const t=this.context;return t?t.canvas:null}getTileImage(t){return t.getImage()}updateUsedTiles(t,e,i){const s=$(e);s in t||(t[s]={}),t[s][i.getKey()]=!0}}class $u extends zu{constructor(t){super(t)}createRenderer(){return new qu(this,{cacheSize:this.getCacheSize()})}}class Xi extends $t{constructor(t){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_),t)if(typeof t.getSimplifiedGeometry=="function"){const e=t;this.setGeometry(e)}else{const e=t;this.setProperties(e)}}clone(){const t=new Xi(this.hasProperties()?this.getProperties():null);t.setGeometryName(this.getGeometryName());const e=this.getGeometry();e&&t.setGeometry(e.clone());const i=this.getStyle();return i&&t.setStyle(i),t}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_&&(tt(this.geometryChangeKey_),this.geometryChangeKey_=null);const t=this.getGeometry();t&&(this.geometryChangeKey_=V(t,z.CHANGE,this.handleGeometryChange_,this)),this.changed()}setGeometry(t){this.set(this.geometryName_,t)}setStyle(t){this.style_=t,this.styleFunction_=t?Ju(t):void 0,this.changed()}setId(t){this.id_=t,this.changed()}setGeometryName(t){this.removeChangeListener(this.geometryName_,this.handleGeometryChanged_),this.geometryName_=t,this.addChangeListener(this.geometryName_,this.handleGeometryChanged_),this.handleGeometryChanged_()}}function Ju(n){if(typeof n=="function")return n;let t;return Array.isArray(n)?t=n:(j(typeof n.getZIndex=="function","Expected an `ol/style/Style` or an array of `ol/style/Style.js`"),t=[n]),function(){return t}}function Ks(n,t,e,i,s,r,o){let a,l;const c=(e-t)/i;if(c===1)a=t;else if(c===2)a=t,l=s;else if(c!==0){let h=n[t],u=n[t+1],d=0;const f=[0];for(let m=t+i;m1?o:2,r=r||new Array(o);for(let h=0;h>1;sl&&(this.instructions.push([P.CUSTOM,l,h,t,i,ke,r]),this.hitDetectionInstructions.push([P.CUSTOM,l,h,t,s||i,ke,r]));break;case"Point":c=t.getFlatCoordinates(),this.coordinates.push(c[0],c[1]),h=this.coordinates.length,this.instructions.push([P.CUSTOM,l,h,t,i,void 0,r]),this.hitDetectionInstructions.push([P.CUSTOM,l,h,t,s||i,void 0,r]);break}this.endGeometry(e)}beginGeometry(t,e,i){this.beginGeometryInstruction1_=[P.BEGIN_GEOMETRY,e,0,t,i],this.instructions.push(this.beginGeometryInstruction1_),this.beginGeometryInstruction2_=[P.BEGIN_GEOMETRY,e,0,t,i],this.hitDetectionInstructions.push(this.beginGeometryInstruction2_)}finish(){return{instructions:this.instructions,hitDetectionInstructions:this.hitDetectionInstructions,coordinates:this.coordinates}}reverseHitDetectionInstructions(){const t=this.hitDetectionInstructions;t.reverse();let e;const i=t.length;let s,r,o=-1;for(e=0;ethis.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(t){const e=t.fillStyle,i=[P.SET_FILL_STYLE,e];return typeof e!="string"&&i.push(t.fillPatternScale),i}applyStroke(t){this.instructions.push(this.createStroke(t))}createStroke(t){return[P.SET_STROKE_STYLE,t.strokeStyle,t.lineWidth*this.pixelRatio,t.lineCap,t.lineJoin,t.miterLimit,this.applyPixelRatio(t.lineDash),t.lineDashOffset*this.pixelRatio]}updateFillStyle(t,e){const i=t.fillStyle;(typeof i!="string"||t.currentFillStyle!=i)&&(i!==void 0&&this.instructions.push(e.call(this,t)),t.currentFillStyle=i)}updateStrokeStyle(t,e){const i=t.strokeStyle,s=t.lineCap,r=t.lineDash,o=t.lineDashOffset,a=t.lineJoin,l=t.lineWidth,c=t.miterLimit;(t.currentStrokeStyle!=i||t.currentLineCap!=s||r!=t.currentLineDash&&!Ae(t.currentLineDash,r)||t.currentLineDashOffset!=o||t.currentLineJoin!=a||t.currentLineWidth!=l||t.currentMiterLimit!=c)&&(i!==void 0&&e.call(this,t),t.currentStrokeStyle=i,t.currentLineCap=s,t.currentLineDash=r,t.currentLineDashOffset=o,t.currentLineJoin=a,t.currentLineWidth=l,t.currentMiterLimit=c)}endGeometry(t){this.beginGeometryInstruction1_[2]=this.instructions.length,this.beginGeometryInstruction1_=null,this.beginGeometryInstruction2_[2]=this.hitDetectionInstructions.length,this.beginGeometryInstruction2_=null;const e=[P.END_GEOMETRY,t];this.instructions.push(e),this.hitDetectionInstructions.push(e)}getBufferedMaxExtent(){if(!this.bufferedMaxExtent_&&(this.bufferedMaxExtent_=Xo(this.maxExtent),this.maxLineWidth>0)){const t=this.resolution*(this.maxLineWidth+1)/2;Hs(this.bufferedMaxExtent_,t,this.bufferedMaxExtent_)}return this.bufferedMaxExtent_}}class td extends cn{constructor(t,e,i,s){super(t,e,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(t,e,i){if(!this.image_||this.maxExtent&&!_i(this.maxExtent,t.getFlatCoordinates()))return;this.beginGeometry(t,e,i);const s=t.getFlatCoordinates(),r=t.getStride(),o=this.coordinates.length,a=this.appendFlatPointCoordinates(s,r);this.instructions.push([P.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([P.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(e)}drawMultiPoint(t,e,i){if(!this.image_)return;this.beginGeometry(t,e,i);const s=t.getFlatCoordinates(),r=[];for(let l=0,c=s.length;l=n){const g=(n-a+f)/f,_=St(c,u,g),m=St(h,d,g);l.push(_,m),r.push(l),l=[_,m],a==n&&(o+=s),a=0}else if(a0&&r.push(l),r}function nd(n,t,e,i,s){let r=e,o=e,a=0,l=0,c=e,h,u,d,f,g,_,m,p,y,x;for(u=e;un&&(l>a&&(a=l,r=c,o=u),l=0,c=u-s)),d=f,m=y,p=x),g=E,_=w}return l+=f,l>a?[c,u]:[r,o]}const Xn={left:0,center:.5,right:1,top:0,middle:.5,hanging:.2,alphabetic:.8,ideographic:.8,bottom:1};class sd extends cn{constructor(t,e,i,s){super(t,e,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[Ct]={fillStyle:Ct},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 t=super.finish();return t.textStates=this.textStates,t.fillStates=this.fillStates,t.strokeStates=this.strokeStates,t}drawText(t,e,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=t.getType();let h=null,u=t.getStride();if(o.placement==="line"&&(c=="LineString"||c=="MultiLineString"||c=="Polygon"||c=="MultiPolygon")){if(!Tt(this.maxExtent,t.getExtent()))return;let d;if(h=t.getFlatCoordinates(),c=="LineString")d=[h.length];else if(c=="MultiLineString")d=t.getEnds();else if(c=="Polygon")d=t.getEnds().slice(0,1);else if(c=="MultiPolygon"){const m=t.getEndss();d=[];for(let p=0,y=m.length;p{const w=a[(y+E)*2]===h[E*u]&&a[(y+E)*2+1]===h[E*u+1];return w||--y,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(t,e,i);let g=o.padding;if(g!=Ge&&(o.scale[0]<0||o.scale[1]<0)){let y=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&&(y=-y,E=-E),g=[y,x,E,w]}const _=this.pixelRatio;this.instructions.push([P.DRAW_IMAGE,l,f,null,NaN,NaN,NaN,1,0,0,this.textRotateWithView_,this.textRotation_,[1,1],NaN,this.declutterMode_,this.declutterImageWithText_,g==Ge?Ge:g.map(function(y){return y*_}),!!o.backgroundFill,!!o.backgroundStroke,this.text_,this.textKey_,this.strokeKey_,this.fillKey_,this.textOffsetX_,this.textOffsetY_,d]);const m=1/_,p=this.state.fillStyle;o.backgroundFill&&(this.state.fillStyle=Ct,this.hitDetectionInstructions.push(this.createFill(this.state))),this.hitDetectionInstructions.push([P.DRAW_IMAGE,l,f,null,NaN,NaN,NaN,1,0,0,this.textRotateWithView_,this.textRotation_,[m,m],NaN,this.declutterMode_,this.declutterImageWithText_,g,!!o.backgroundFill,!!o.backgroundStroke,this.text_,this.textKey_,this.strokeKey_,this.fillKey_?Ct:this.fillKey_,this.textOffsetX_,this.textOffsetY_,d]),o.backgroundFill&&(this.state.fillStyle=p,this.hitDetectionInstructions.push(this.createFill(this.state))),this.endGeometry(e)}}saveTextStates_(){const t=this.textStrokeState_,e=this.textState_,i=this.textFillState_,s=this.strokeKey_;t&&(s in this.strokeStates||(this.strokeStates[s]={strokeStyle:t.strokeStyle,lineCap:t.lineCap,lineDashOffset:t.lineDashOffset,lineWidth:t.lineWidth,lineJoin:t.lineJoin,miterLimit:t.miterLimit,lineDash:t.lineDash}));const r=this.textKey_;r in this.textStates||(this.textStates[r]={font:e.font,textAlign:e.textAlign||$i,justify:e.justify,textBaseline:e.textBaseline||Dn,scale:e.scale});const o=this.fillKey_;i&&(o in this.fillStates||(this.fillStates[o]={fillStyle:i.fillStyle}))}drawChars_(t,e){const i=this.textStrokeState_,s=this.textState_,r=this.strokeKey_,o=this.textKey_,a=this.fillKey_;this.saveTextStates_();const l=this.pixelRatio,c=Xn[s.textBaseline],h=this.textOffsetY_*l,u=this.text_,d=i?i.lineWidth*Math.abs(s.scale[0])/2:0;this.instructions.push([P.DRAW_CHARS,t,e,c,s.overflow,a,s.maxAngle,l,h,r,d*l,u,o,1,this.declutterMode_]),this.hitDetectionInstructions.push([P.DRAW_CHARS,t,e,c,s.overflow,a&&Ct,s.maxAngle,l,h,r,d*l,u,o,1/l,this.declutterMode_])}setTextStyle(t,e){let i,s,r;if(!t)this.text_="";else{const o=t.getFill();o?(s=this.textFillState_,s||(s={},this.textFillState_=s),s.fillStyle=qt(o.getColor()||Ct)):(s=null,this.textFillState_=s);const a=t.getStroke();if(!a)r=null,this.textStrokeState_=r;else{r=this.textStrokeState_,r||(r={},this.textStrokeState_=r);const g=a.getLineDash(),_=a.getLineDashOffset(),m=a.getWidth(),p=a.getMiterLimit();r.lineCap=a.getLineCap()||pi,r.lineDash=g?g.slice():le,r.lineDashOffset=_===void 0?he:_,r.lineJoin=a.getLineJoin()||yi,r.lineWidth=m===void 0?Ji:m,r.miterLimit=p===void 0?Hi:p,r.strokeStyle=qt(a.getColor()||qi)}i=this.textState_;const l=t.getFont()||ma;Wh(l);const c=t.getScaleArray();i.overflow=t.getOverflow(),i.font=l,i.maxAngle=t.getMaxAngle(),i.placement=t.getPlacement(),i.textAlign=t.getTextAlign(),i.repeat=t.getRepeat(),i.justify=t.getJustify(),i.textBaseline=t.getTextBaseline()||Dn,i.backgroundFill=t.getBackgroundFill(),i.backgroundStroke=t.getBackgroundStroke(),i.padding=t.getPadding()||Ge,i.scale=c===void 0?[1,1]:c;const h=t.getOffsetX(),u=t.getOffsetY(),d=t.getRotateWithView(),f=t.getRotation();this.text_=t.getText()||"",this.textOffsetX_=h===void 0?0:h,this.textOffsetY_=u===void 0?0:u,this.textRotateWithView_=d===void 0?!1:d,this.textRotation_=f===void 0?0:f,this.strokeKey_=r?(typeof r.strokeStyle=="string"?r.strokeStyle:$(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:"|"+$(s.fillStyle):""}this.declutterMode_=t.getDeclutterMode(),this.declutterImageWithText_=e}}const rd={Circle:Ao,Default:cn,Image:td,LineString:ed,Polygon:Ao,Text:sd};class od{constructor(t,e,i,s){this.tolerance_=t,this.maxExtent_=e,this.pixelRatio_=s,this.resolution_=i,this.buildersByZIndex_={}}finish(){const t={};for(const e in this.buildersByZIndex_){t[e]=t[e]||{};const i=this.buildersByZIndex_[e];for(const s in i){const r=i[s].finish();t[e][s]=r}}return t}getBuilder(t,e){const i=t!==void 0?t.toString():"0";let s=this.buildersByZIndex_[i];s===void 0&&(s={},this.buildersByZIndex_[i]=s);let r=s[e];if(r===void 0){const o=rd[e];r=new o(this.tolerance_,this.maxExtent_,this.resolution_,this.pixelRatio_),s[e]=r}return r}}function ad(n,t,e,i,s,r,o,a,l,c,h,u){let d=n[t],f=n[t+1],g=0,_=0,m=0,p=0;function y(){g=d,_=f,t+=i,d=n[t],f=n[t+1],p+=m,m=Math.sqrt((d-g)*(d-g)+(f-_)*(f-_))}do y();while(tL[2]}else D=E>I;const b=Math.PI,O=[],A=v+i===t;t=v,m=0,p=T,d=n[t],f=n[t+1];let F;if(A){y(),F=Math.atan2(f-_,d-g),D&&(F+=F>0?-b:b);const L=(I+E)/2,Z=(G+w)/2;return O[0]=[L,Z,(R-r)/2,F,s],O}s=s.replace(/\n/g," ");for(let L=0,Z=s.length;L0?-b:b),F!==void 0){let S=K-F;if(S+=S>b?-2*b:S<-b?2*b:0,Math.abs(S)>o)return null}F=K;const et=L;let k=0;for(;L0&&n.push(` +`,""),n.push(t,""),n}class hd{constructor(t,e,i,s,r){this.overlaps=i,this.pixelRatio=e,this.resolution=t,this.alignAndScaleFill_,this.instructions=s.instructions,this.coordinates=s.coordinates,this.coordinateCache_={},this.renderedTransform_=Wt(),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 Za:null}getZIndexContext(){return this.zIndexContext_}createLabel(t,e,i,s){const r=t+e+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[e],c=this.pixelRatio,h=[l.scale[0]*c,l.scale[1]*c],u=l.justify?Xn[l.justify]:As(Array.isArray(t)?t[0]:t,l.textAlign||$i),d=s&&o.lineWidth?o.lineWidth:0,f=Array.isArray(t)?t:String(t).split(` +`).reduce(ld,[]),{width:g,height:_,widths:m,heights:p,lineWidths:y}=Zh(l,f),x=g+d,E=[],w=(x+2)*h[0],v=(_+d)*h[1],T={width:w<0?Math.floor(w):Math.ceil(w),height:v<0?Math.floor(v):Math.ceil(v),contextInstructions:E};(h[0]!=1||h[1]!=1)&&E.push("scale",h),s&&(E.push("strokeStyle",o.strokeStyle),E.push("lineWidth",d),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 R=.5-u;let I=u*x+R*d;const G=[],D=[];let b=0,O=0,A=0,F=0,L;for(let Z=0,K=f.length;Zt?t-c:r,E=o+h>e?e-h:o,w=g[3]+x*d[0]+g[1],v=g[0]+E*d[1]+g[2],T=p-g[3],R=y-g[0];(_||u!==0)&&(ye[0]=T,Ee[0]=T,ye[1]=R,ie[1]=R,ie[0]=T+w,ne[0]=ie[0],ne[1]=R+v,Ee[1]=ne[1]);let I;return u!==0?(I=de(Wt(),i,s,1,1,u,-i,-s),dt(I,ye),dt(I,ie),dt(I,ne),dt(I,Ee),Se(Math.min(ye[0],ie[0],ne[0],Ee[0]),Math.min(ye[1],ie[1],ne[1],Ee[1]),Math.max(ye[0],ie[0],ne[0],Ee[0]),Math.max(ye[1],ie[1],ne[1],Ee[1]),ei)):Se(Math.min(T,T+w),Math.min(R,R+v),Math.max(T,T+w),Math.max(R,R+v),ei),f&&(p=Math.round(p),y=Math.round(y)),{drawImageX:p,drawImageY:y,drawImageW:x,drawImageH:E,originX:c,originY:h,declutterBox:{minX:ei[0],minY:ei[1],maxX:ei[2],maxY:ei[3],value:m},canvasTransform:I,scale:d}}replayImageOrLabel_(t,e,i,s,r,o,a){const l=!!(o||a),c=s.declutterBox,h=a?a[2]*s.scale[0]/2:0;return c.minX-h<=e[0]&&c.maxX+h>=0&&c.minY-h<=e[1]&&c.maxY+h>=0&&(l&&this.replayTextBackground_(t,ye,ie,ne,Ee,o,a),Kh(t,s.canvasTransform,r,i,s.originX,s.originY,s.drawImageW,s.drawImageH,s.drawImageX,s.drawImageY,s.scale)),!0}fill_(t){const e=this.alignAndScaleFill_;if(e){const i=dt(this.renderedTransform_,[0,0]),s=512*this.pixelRatio;t.save(),t.translate(i[0]%s,i[1]%s),e!==1&&t.scale(e,e),t.rotate(this.viewRotation_)}t.fill(),e&&t.restore()}setStrokeStyle_(t,e){t.strokeStyle=e[1],t.lineWidth=e[2],t.lineCap=e[3],t.lineJoin=e[4],t.miterLimit=e[5],t.lineDashOffset=e[7],t.setLineDash(e[6])}drawLabelWithPointPlacement_(t,e,i,s){const r=this.textStates[e],o=this.createLabel(t,e,s,i),a=this.strokeStates[i],l=this.pixelRatio,c=As(Array.isArray(t)?t[0]:t,r.textAlign||$i),h=Xn[r.textBaseline||Dn],u=a&&a.lineWidth?a.lineWidth:0,d=o.width/l-2*r.scale[0],f=c*d+2*(.5-c)*u,g=h*o.height/l+2*(.5-h)*u;return{label:o,anchorX:f,anchorY:g}}execute_(t,e,i,s,r,o,a,l){const c=this.zIndexContext_;let h;this.pixelCoordinates_&&Ae(i,this.renderedTransform_)?h=this.pixelCoordinates_:(this.pixelCoordinates_||(this.pixelCoordinates_=[]),h=ve(this.coordinates,0,this.coordinates.length,2,i,this.pixelCoordinates_),Bl(this.renderedTransform_,i));let u=0;const d=s.length;let f=0,g,_,m,p,y,x,E,w,v,T,R,I,G,D=0,b=0,O=null,A=null;const F=this.coordinateCache_,L=this.viewRotation_,Z=Math.round(Math.atan2(-i[1],i[0])*1e12)/1e12,K={context:t,pixelRatio:this.pixelRatio,resolution:this.resolution,rotation:L},et=this.instructions!=s||this.overlaps?0:200;let k,X,Q,ct;for(;uet&&(this.fill_(t),D=0),b>et&&(t.stroke(),b=0),!D&&!b&&(t.beginPath(),y=NaN,x=NaN),++u;break;case P.CIRCLE:f=S[1];const ut=h[f],at=h[f+1],Zt=h[f+2],Jt=h[f+3],Lt=Zt-ut,_e=Jt-at,Ri=Math.sqrt(Lt*Lt+_e*_e);t.moveTo(ut+Ri,at),t.arc(ut,at,Ri,0,2*Math.PI,!0),++u;break;case P.CLOSE_PATH:t.closePath(),++u;break;case P.CUSTOM:f=S[1],g=S[2];const un=S[3],rs=S[4],Ti=S[5];K.geometry=un,K.feature=k,u in F||(F[u]=[]);const Me=F[u];Ti?Ti(h,f,g,2,Me):(Me[0]=h[f],Me[1]=h[f+1],Me.length=2),c&&(c.zIndex=S[6]),rs(Me,K),++u;break;case P.DRAW_IMAGE:f=S[1],g=S[2],v=S[3],_=S[4],m=S[5];let At=S[6];const Kt=S[7],Ke=S[8],Be=S[9],Ii=S[10];let be=S[11];const Ve=S[12];let Ue=S[13];p=S[14]||"declutter";const lt=S[15];if(!v&&S.length>=20){T=S[19],R=S[20],I=S[21],G=S[22];const Mt=this.drawLabelWithPointPlacement_(T,R,I,G);v=Mt.label,S[3]=v;const De=S[23];_=(Mt.anchorX-De)*this.pixelRatio,S[4]=_;const bt=S[24];m=(Mt.anchorY-bt)*this.pixelRatio,S[5]=m,At=v.height,S[6]=At,Ue=v.width,S[13]=Ue}let os;S.length>25&&(os=S[25]);let as,dn,fn;S.length>17?(as=S[16],dn=S[17],fn=S[18]):(as=Ge,dn=!1,fn=!1),Ii&&Z?be+=L:!Ii&&!Z&&(be-=L);let $a=0;for(;f!Ua.includes(n));class ud{constructor(t,e,i,s,r,o,a){this.maxExtent_=t,this.overlaps_=s,this.pixelRatio_=i,this.resolution_=e,this.renderBuffer_=o,this.executorsByZIndex_={},this.hitDetectionContext_=null,this.hitDetectionTransform_=Wt(),this.renderedContext_=null,this.deferredZIndexContexts_={},this.createExecutors_(r,a)}clip(t,e){const i=this.getClipCoords(e);t.beginPath(),t.moveTo(i[0],i[1]),t.lineTo(i[2],i[3]),t.lineTo(i[4],i[5]),t.lineTo(i[6],i[7]),t.clip()}createExecutors_(t,e){for(const i in t){let s=this.executorsByZIndex_[i];s===void 0&&(s={},this.executorsByZIndex_[i]=s);const r=t[i];for(const o in r){const a=r[o];s[o]=new hd(this.resolution_,this.pixelRatio_,this.overlaps_,a,e)}}}hasExecutors(t){for(const e in this.executorsByZIndex_){const i=this.executorsByZIndex_[e];for(let s=0,r=t.length;s0){if(!o||T==="none"||f!=="Image"&&f!=="Text"||o.includes(w)){const D=(d[I]-3)/4,b=s-D%a,O=s-(D/a|0),A=r(w,v,b*b+O*O);if(A)return A}h.clearRect(0,0,a,a);break}}const _=Object.keys(this.executorsByZIndex_).map(Number);_.sort(ae);let m,p,y,x,E;for(m=_.length-1;m>=0;--m){const w=_[m].toString();for(y=this.executorsByZIndex_[w],p=li.length-1;p>=0;--p)if(f=li[p],x=y[f],x!==void 0&&(E=x.executeHitDetection(h,l,i,g,u),E))return E}}getClipCoords(t){const e=this.maxExtent_;if(!e)return null;const i=e[0],s=e[1],r=e[2],o=e[3],a=[i,s,i,o,r,o,r,s];return ve(a,0,8,2,t,a),a}isEmpty(){return gi(this.executorsByZIndex_)}execute(t,e,i,s,r,o,a){const l=Object.keys(this.executorsByZIndex_).map(Number);l.sort(ae),o=o||li;const c=li.length;let h,u,d,f,g;for(a&&l.reverse(),h=0,u=l.length;hp.execute(w,e,i,s,r,a)),E&&x.restore(),y){y.offset();const w=l[h]*c+d;this.deferredZIndexContexts_[w]||(this.deferredZIndexContexts_[w]=[]),this.deferredZIndexContexts_[w].push(y)}}}}this.renderedContext_=t}getDeferredZIndexContexts(){return this.deferredZIndexContexts_}getRenderedContext(){return this.renderedContext_}renderDeferred(){const t=this.deferredZIndexContexts_,e=Object.keys(t).map(Number).sort(ae);for(let i=0,s=e.length;i{r.draw(this.renderedContext_),r.clear()}),t[e[i]].length=0}}const Ms={};function dd(n){if(Ms[n]!==void 0)return Ms[n];const t=n*2+1,e=n*n,i=new Array(e+1);for(let r=0;r<=n;++r)for(let o=0;o<=n;++o){const a=r*r+o*o;if(a>e)break;let l=i[a];l||(l=[],i[a]=l),l.push(((n+r)*t+(n+o))*4+3),r>0&&l.push(((n-r)*t+(n+o))*4+3),o>0&&(l.push(((n+r)*t+(n-o))*4+3),r>0&&l.push(((n-r)*t+(n-o))*4+3))}const s=[];for(let r=0,o=i.length;ru*this.pixelRatio_),lineDashOffset:(o||he)*this.pixelRatio_,lineJoin:a!==void 0?a:yi,lineWidth:(l!==void 0?l:Ji)*this.pixelRatio_,miterLimit:c!==void 0?c:Hi,strokeStyle:qt(i||qi)}}}setImageStyle(t){let e;if(!t||!(e=t.getSize())){this.image_=null;return}const i=t.getPixelRatio(this.pixelRatio_),s=t.getAnchor(),r=t.getOrigin();this.image_=t.getImage(this.pixelRatio_),this.imageAnchorX_=s[0]*i,this.imageAnchorY_=s[1]*i,this.imageHeight_=e[1]*i,this.imageOpacity_=t.getOpacity(),this.imageOriginX_=r[0],this.imageOriginY_=r[1],this.imageRotateWithView_=t.getRotateWithView(),this.imageRotation_=t.getRotation();const o=t.getScaleArray();this.imageScale_=[o[0]*this.pixelRatio_/i,o[1]*this.pixelRatio_/i],this.imageWidth_=e[0]*i}setTextStyle(t){if(!t)this.text_="";else{const e=t.getFill();if(!e)this.textFillState_=null;else{const f=e.getColor();this.textFillState_={fillStyle:qt(f||Ct)}}const i=t.getStroke();if(!i)this.textStrokeState_=null;else{const f=i.getColor(),g=i.getLineCap(),_=i.getLineDash(),m=i.getLineDashOffset(),p=i.getLineJoin(),y=i.getWidth(),x=i.getMiterLimit();this.textStrokeState_={lineCap:g!==void 0?g:pi,lineDash:_||le,lineDashOffset:m||he,lineJoin:p!==void 0?p:yi,lineWidth:y!==void 0?y:Ji,miterLimit:x!==void 0?x:Hi,strokeStyle:qt(f||qi)}}const s=t.getFont(),r=t.getOffsetX(),o=t.getOffsetY(),a=t.getRotateWithView(),l=t.getRotation(),c=t.getScaleArray(),h=t.getText(),u=t.getTextAlign(),d=t.getTextBaseline();this.textState_={font:s!==void 0?s:ma,textAlign:u!==void 0?u:$i,textBaseline:d!==void 0?d:Dn},this.text_=h!==void 0?Array.isArray(h)?h.reduce((f,g,_)=>f+=_%2?" ":g,""):h:"",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 Ut=.5;function gd(n,t,e,i,s,r,o,a,l){const c=s,h=n[0]*Ut,u=n[1]*Ut,d=rt(h,u);d.imageSmoothingEnabled=!1;const f=d.canvas,g=new fd(d,Ut,s,null,o,a,null),_=e.length,m=Math.floor((256*256*256-1)/_),p={};for(let x=1;x<=_;++x){const E=e[x-1],w=E.getStyleFunction()||i;if(!w)continue;let v=w(E,r);if(!v)continue;Array.isArray(v)||(v=[v]);const R=(x*m).toString(16).padStart(7,"#00000");for(let I=0,G=v.length;I0;return u&&Promise.all(l).then(()=>s(null)),Ed(n,t,e,i,r,o,a),u}function Ed(n,t,e,i,s,r,o){const a=e.getGeometryFunction()(t);if(!a)return;const l=a.simplifyTransformed(i,s);if(e.getRenderer())qa(n,l,e,t,o);else{const h=ja[l.getType()];h(n,l,e,t,o,r)}}function qa(n,t,e,i,s){if(t.getType()=="GeometryCollection"){const o=t.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(),h=[],u=i[0]*Ut,d=i[1]*Ut;h.push(this.getRenderTransform(s,r,o,Ut,u,d,0).slice());const f=c.getSource(),g=a.getExtent();if(f.getWrapX()&&a.canWrapX()&&!ai(g,l)){let _=l[0];const m=q(g);let p=0,y;for(;_g[2];)++p,y=m*p,h.push(this.getRenderTransform(s,r,o,Ut,u,d,y).slice()),_-=m}this.hitDetectionImageData_=gd(i,h,this.renderedFeatures_,c.getStyleFunction(),l,r,o,Do(r,this.renderedPixelRatio_))}e(_d(t,this.renderedFeatures_,this.hitDetectionImageData_))})}forEachFeatureAtCoordinate(t,e,i,s,r){if(!this.replayGroup_)return;const o=e.viewState.resolution,a=e.viewState.rotation,l=this.getLayer(),c={},h=function(g,_,m){const p=$(g),y=c[p];if(y){if(y!==!0&&mu=g.forEachFeatureAtCoordinate(t,o,a,i,h,f&&e.declutter[f]?e.declutter[f].all().map(_=>_.value):null)),u}handleFontsChanged(){const t=this.getLayer();t.getVisible()&&this.replayGroup_&&t.changed()}handleStyleImageChange_(t){this.renderIfReadyAndVisible()}prepareFrame(t){const e=this.getLayer(),i=e.getSource();if(!i)return!1;const s=t.viewHints[mt.ANIMATING],r=t.viewHints[mt.INTERACTING],o=e.getUpdateWhileAnimating(),a=e.getUpdateWhileInteracting();if(this.ready&&!o&&s||!a&&r)return this.animatingOrInteracting_=!0,!0;this.animatingOrInteracting_=!1;const l=t.extent,c=t.viewState,h=c.projection,u=c.resolution,d=t.pixelRatio,f=e.getRevision(),g=e.getRenderBuffer();let _=e.getRenderOrder();_===void 0&&(_=pd);const m=c.center.slice(),p=Hs(l,g*u),y=p.slice(),x=[p.slice()],E=h.getExtent();if(i.getWrapX()&&h.canWrapX()&&!ai(E,t.extent)){const A=q(E),F=Math.max(q(p)/2,A);p[0]=E[0]-F,p[2]=E[2]+F,Vo(m,h);const L=Bo(x[0],h);L[0]E[0]&&L[2]>E[2]&&x.push([L[0]-A,L[1],L[2]-A,L[3]])}if(this.ready&&this.renderedResolution_==u&&this.renderedRevision_==f&&this.renderedRenderOrder_==_&&this.renderedFrameDeclutter_===!!t.declutter&&ai(this.wrappedRenderedExtent_,p))return Ae(this.renderedExtent_,y)||(this.hitDetectionImageData_=null,this.renderedExtent_=y),this.renderedCenter_=m,this.replayGroupChanged=!1,!0;this.replayGroup_=null;const w=new od(Ha(u,d),p,u,d);let v;for(let A=0,F=x.length;A{let L;const Z=A.getStyleFunction()||e.getStyleFunction();if(Z&&(L=Z(A,u)),L){const K=this.renderFeature(A,T,L,w,v,this.getLayer().getDeclutter(),F);R=R&&!K}},G=$o(p),D=i.getFeaturesInExtent(G);_&&D.sort(_);for(let A=0,F=D.length;A{if(t===this.squaredTolerance_)return this.simplifiedGeometry_;this.simplifiedGeometry_=this.clone(),e&&this.simplifiedGeometry_.applyTransform(e);const i=this.simplifiedGeometry_.getFlatCoordinates();let s;switch(this.type_){case"LineString":i.length=$n(i,0,this.simplifiedGeometry_.flatCoordinates_.length,this.simplifiedGeometry_.stride_,t,i,0),s=[i.length];break;case"MultiLineString":s=[],i.length=nh(i,0,this.simplifiedGeometry_.ends_,this.simplifiedGeometry_.stride_,t,i,0,s);break;case"Polygon":s=[],i.length=ea(i,0,this.simplifiedGeometry_.ends_,this.simplifiedGeometry_.stride_,Math.sqrt(t),i,0,s);break}return s&&(this.simplifiedGeometry_=new Gt(this.type_,i,s,2,this.properties_,this.id_)),this.squaredTolerance_=t,this.simplifiedGeometry_}),this}}Gt.prototype.getFlatCoordinates=Gt.prototype.getOrientedFlatCoordinates;const Pt={ADDFEATURE:"addfeature",CHANGEFEATURE:"changefeature",CLEAR:"clear",REMOVEFEATURE:"removefeature",FEATURESLOADSTART:"featuresloadstart",FEATURESLOADEND:"featuresloadend",FEATURESLOADERROR:"featuresloaderror"};function Md(n,t){return[[-1/0,-1/0,1/0,1/0]]}let bd=!1;function Dd(n,t,e,i,s,r,o){const a=new XMLHttpRequest;a.open("GET",typeof n=="function"?n(e,i,s):n,!0),t.getType()=="arraybuffer"&&(a.responseType="arraybuffer"),a.withCredentials=bd,a.onload=function(l){if(!a.status||a.status>=200&&a.status<300){const c=t.getType();try{let h;c=="text"||c=="json"?h=a.responseText:c=="xml"?h=a.responseXML||a.responseText:c=="arraybuffer"&&(h=a.response),h?r(t.readFeatures(h,{extent:e,featureProjection:s}),t.readProjection(h)):o()}catch{o()}}else o()},a.onerror=o,a.send()}function ko(n,t){return function(e,i,s,r,o){const a=this;Dd(n,t,e,i,s,function(l,c){a.addFeatures(l),r!==void 0&&r(l)},o||fi)}}class xe extends fe{constructor(t,e,i){super(t),this.feature=e,this.features=i}}class Pd extends za{constructor(t){t=t||{},super({attributions:t.attributions,interpolate:!0,projection:void 0,state:"ready",wrapX:t.wrapX!==void 0?t.wrapX:!0}),this.on,this.once,this.un,this.loader_=fi,this.format_=t.format||null,this.overlaps_=t.overlaps===void 0?!0:t.overlaps,this.url_=t.url,t.loader!==void 0?this.loader_=t.loader:this.url_!==void 0&&(j(this.format_,"`format` must be set when `url` is set"),this.loader_=ko(this.url_,this.format_)),this.strategy_=t.strategy!==void 0?t.strategy:Md;const e=t.useSpatialIndex!==void 0?t.useSpatialIndex:!0;this.featuresRtree_=e?new Oo:null,this.loadedExtentsRtree_=new Oo,this.loadingExtentsCount_=0,this.nullGeometryFeatures_={},this.idIndex_={},this.uidIndex_={},this.featureChangeKeys_={},this.featuresCollection_=null;let i,s;Array.isArray(t.features)?s=t.features:t.features&&(i=t.features,s=i.getArray()),!e&&i===void 0&&(i=new jt(s)),s!==void 0&&this.addFeaturesInternal(s),i!==void 0&&this.bindFeaturesCollection_(i)}addFeature(t){this.addFeatureInternal(t),this.changed()}addFeatureInternal(t){const e=$(t);if(!this.addToIndex_(e,t)){this.featuresCollection_&&this.featuresCollection_.remove(t);return}this.setupChangeEvents_(e,t);const i=t.getGeometry();if(i){const s=i.getExtent();this.featuresRtree_&&this.featuresRtree_.insert(s,t)}else this.nullGeometryFeatures_[e]=t;this.dispatchEvent(new xe(Pt.ADDFEATURE,t))}setupChangeEvents_(t,e){e instanceof Gt||(this.featureChangeKeys_[t]=[V(e,z.CHANGE,this.handleFeatureChange_,this),V(e,di.PROPERTYCHANGE,this.handleFeatureChange_,this)])}addToIndex_(t,e){let i=!0;if(e.getId()!==void 0){const s=String(e.getId());if(!(s in this.idIndex_))this.idIndex_[s]=e;else if(e instanceof Gt){const r=this.idIndex_[s];r instanceof Gt?Array.isArray(r)?r.push(e):this.idIndex_[s]=[r,e]:i=!1}else i=!1}return i&&(j(!(t in this.uidIndex_),"The passed `feature` was already added to the source"),this.uidIndex_[t]=e),i}addFeatures(t){this.addFeaturesInternal(t),this.changed()}addFeaturesInternal(t){const e=[],i=[],s=[];for(let r=0,o=t.length;r{e||(e=!0,this.addFeature(i.element),e=!1)}),t.addEventListener(wt.REMOVE,i=>{e||(e=!0,this.removeFeature(i.element),e=!1)}),this.featuresCollection_=t}clear(t){if(t){for(const i in this.featureChangeKeys_)this.featureChangeKeys_[i].forEach(tt);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 e=new xe(Pt.CLEAR);this.dispatchEvent(e),this.changed()}forEachFeature(t){if(this.featuresRtree_)return this.featuresRtree_.forEach(t);this.featuresCollection_&&this.featuresCollection_.forEach(t)}forEachFeatureAtCoordinateDirect(t,e){const i=[t[0],t[1],t[0],t[1]];return this.forEachFeatureInExtent(i,function(s){const r=s.getGeometry();if(r instanceof Gt||r.intersectsCoordinate(t))return e(s)})}forEachFeatureInExtent(t,e){if(this.featuresRtree_)return this.featuresRtree_.forEachInExtent(t,e);this.featuresCollection_&&this.featuresCollection_.forEach(e)}forEachFeatureIntersectingExtent(t,e){return this.forEachFeatureInExtent(t,function(i){const s=i.getGeometry();if(s instanceof Gt||s.intersectsExtent(t)){const r=e(i);if(r)return r}})}getFeaturesCollection(){return this.featuresCollection_}getFeatures(){let t;return this.featuresCollection_?t=this.featuresCollection_.getArray().slice(0):this.featuresRtree_&&(t=this.featuresRtree_.getAll(),gi(this.nullGeometryFeatures_)||Yn(t,Object.values(this.nullGeometryFeatures_))),t}getFeaturesAtCoordinate(t){const e=[];return this.forEachFeatureAtCoordinateDirect(t,function(i){e.push(i)}),e}getFeaturesInExtent(t,e){if(this.featuresRtree_){if(!(e&&e.canWrapX()&&this.getWrapX()))return this.featuresRtree_.getInExtent(t);const s=Js(t,e);return[].concat(...s.map(r=>this.featuresRtree_.getInExtent(r)))}return this.featuresCollection_?this.featuresCollection_.getArray().slice(0):[]}getClosestFeatureToCoordinate(t,e){const i=t[0],s=t[1];let r=null;const o=[NaN,NaN];let a=1/0;const l=[-1/0,-1/0,1/0,1/0];return e=e||Wi,this.featuresRtree_.forEachInExtent(l,function(c){if(e(c)){const h=c.getGeometry(),u=a;if(a=h instanceof Gt?0:h.closestPointXY(i,s,o,a),a{--this.loadingExtentsCount_,this.dispatchEvent(new xe(Pt.FEATURESLOADEND,void 0,h))},()=>{--this.loadingExtentsCount_,this.dispatchEvent(new xe(Pt.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(t){const e=this.loadedExtentsRtree_;let i;e.forEachInExtent(t,function(s){if(Yi(s.extent,t))return i=s,!0}),i&&e.remove(i)}removeFeatures(t){let e=!1;for(let i=0,s=t.length;it.geo&&t.geo.lat&&t.geo.lon);return n?[n.geo.lon,n.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(n=>{const t=new cu({target:"map",layers:[new $u({source:new Gu})],view:new Vt({center:us(this.getLastLonLat()),zoom:this.type==="traceroute"?3:10})}),e=[],i=new Pd;if(this.type==="traceroute")console.log(this.getLastLonLat()),this.d.forEach(a=>{if(a.geo&&a.geo.lat&&a.geo.lon){const l=us([a.geo.lon,a.geo.lat]);e.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 h=new Xi({geometry:new Bi(l),last:a.geo.lon===c[0]&&a.geo.lat===c[1]});i.addFeature(h)}});else{const a=us([this.d.geo.lon,this.d.geo.lat]);e.push(a);const l=new Xi({geometry:new Bi(a)});i.addFeature(l)}const s=new zn(e),r=new Xi({geometry:s});i.addFeature(r);const o=new Ld({source:i,style:function(a){if(a.getGeometry().getType()==="Point")return new ce({image:new on({radius:10,fill:new wi({color:a.get("last")?"#dc3545":"#0d6efd"}),stroke:new Ei({color:"white",width:5})})});if(a.getGeometry().getType()==="LineString")return new ce({stroke:new Ei({color:"#0d6efd",width:2})})}});t.addLayer(o),this.store.Configuration.Server.dashboard_theme==="dark"&&t.on("postcompose",function(a){document.querySelector("#map").style.filter="grayscale(80%) invert(100%) "})}).catch(n=>{this.osmAvailable=!1})}},Fd={key:0,id:"map",class:"w-100 rounded-3"};function kd(n,t,e,i,s,r){return this.osmAvailable?(nl(),sl("div",Fd)):rl("",!0)}const zd=el(Od,[["render",kd]]);export{zd as O}; diff --git a/src/static/app/dist/assets/peerConfigurationFile-BRKM9nlG.js b/src/static/app/dist/assets/peerConfigurationFile-BRKM9nlG.js new file mode 100644 index 0000000..e1ced79 --- /dev/null +++ b/src/static/app/dist/assets/peerConfigurationFile-BRKM9nlG.js @@ -0,0 +1 @@ +import{_ as f,D as m,r as _,a as s,c as a,b as e,d as l,w as g,T as h}from"./index-DOaPWS1X.js";import{L as v}from"./localeText-CaAXeE0W.js";const y={class:"peerSettingContainer w-100 h-100 position-absolute top-0 start-0"},x={class:"container d-flex h-100 w-100"},w={class:"m-auto modal-dialog-centered dashboardModal justify-content-center"},C={class:"card rounded-3 shadow w-100"},k={class:"card-header bg-transparent d-flex align-items-center gap-2 border-0 p-4 pb-0"},F={class:"mb-0"},T={class:"card-body p-4"},D={class:"d-flex"},S=["disabled"],B={key:0,class:"d-block"},M={key:1,class:"d-block",id:"check"},G=["value"],L={__name:"peerConfigurationFile",props:{configurationFile:String},emits:["close"],setup(i,{emit:r}){const c=r,d=i,n=m(),o=_(!1),u=async()=>{navigator.clipboard&&navigator.clipboard.writeText?navigator.clipboard.writeText(d.configurationFile).then(()=>{o.value=!0,setTimeout(()=>{o.value=!1},3e3)}).catch(()=>{n.newMessage("WGDashboard","Failed to copy","danger")}):(document.querySelector("#peerConfigurationFile").select(),document.execCommand("copy")?(o.value=!0,setTimeout(()=>{o.value=!1},3e3)):n.newMessage("WGDashboard","Failed to copy","danger"))};return(p,t)=>(s(),a("div",y,[e("div",x,[e("div",w,[e("div",C,[e("div",k,[e("h4",F,[l(v,{t:"Peer Configuration File"})]),e("button",{type:"button",class:"btn-close ms-auto",onClick:t[0]||(t[0]=b=>c("close"))})]),e("div",T,[e("div",D,[e("button",{onClick:t[1]||(t[1]=b=>u()),disabled:o.value,class:"ms-auto btn bg-primary-subtle border-primary-subtle text-primary-emphasis rounded-3 position-relative"},[l(h,{name:"slide-up",mode:"out-in"},{default:g(()=>[o.value?(s(),a("span",M,t[3]||(t[3]=[e("i",{class:"bi bi-check-circle-fill"},null,-1)]))):(s(),a("span",B,t[2]||(t[2]=[e("i",{class:"bi bi-clipboard-fill"},null,-1)])))]),_:1})],8,S)]),e("textarea",{style:{height:"300px"},class:"form-control w-100 rounded-3 mt-2",id:"peerConfigurationFile",value:i.configurationFile},null,8,G)])])])])]))}},W=f(L,[["__scopeId","data-v-fcd3ae95"]]);export{W as default}; diff --git a/src/static/app/dist/assets/peerConfigurationFile-CNB9RKjb.css b/src/static/app/dist/assets/peerConfigurationFile-CNB9RKjb.css new file mode 100644 index 0000000..7b682a9 --- /dev/null +++ b/src/static/app/dist/assets/peerConfigurationFile-CNB9RKjb.css @@ -0,0 +1 @@ +.slide-up-enter-active[data-v-fcd3ae95],.slide-up-leave-active[data-v-fcd3ae95]{transition:all .2s cubic-bezier(.42,0,.22,1)}.slide-up-enter-from[data-v-fcd3ae95],.slide-up-leave-to[data-v-fcd3ae95]{opacity:0;transform:scale(.9)}@keyframes spin-fcd3ae95{0%{transform:rotate(0)}to{transform:rotate(360deg)}}#check[data-v-fcd3ae95]{animation:cubic-bezier(.42,0,.22,1.3) .7s spin-fcd3ae95} diff --git a/src/static/app/dist/assets/peerConfigurationFile-fak3wop9.css b/src/static/app/dist/assets/peerConfigurationFile-fak3wop9.css deleted file mode 100644 index fab6172..0000000 --- a/src/static/app/dist/assets/peerConfigurationFile-fak3wop9.css +++ /dev/null @@ -1 +0,0 @@ -.slide-up-enter-active[data-v-e8a2c914],.slide-up-leave-active[data-v-e8a2c914]{transition:all .2s cubic-bezier(.42,0,.22,1)}.slide-up-enter-from[data-v-e8a2c914],.slide-up-leave-to[data-v-e8a2c914]{opacity:0;transform:scale(.9)}@keyframes spin-e8a2c914{0%{transform:rotate(0)}to{transform:rotate(360deg)}}#check[data-v-e8a2c914]{animation:cubic-bezier(.42,0,.22,1.3) .7s spin-e8a2c914} diff --git a/src/static/app/dist/assets/peerCreate-B_n86hyd.js b/src/static/app/dist/assets/peerCreate-B_n86hyd.js new file mode 100644 index 0000000..d21a606 --- /dev/null +++ b/src/static/app/dist/assets/peerCreate-B_n86hyd.js @@ -0,0 +1 @@ +import{_ as b,a as n,c as r,b as e,d as o,m as p,s as u,n as h,j as d,D as g,W as y,v as I,G as L,w as C,F as S,h as P,f as K,t as x,k as E,e as f,g as F,q as G,i as k}from"./index-DOaPWS1X.js";import{L as _}from"./localeText-CaAXeE0W.js";const O={name:"nameInput",components:{LocaleText:_},props:{bulk:Boolean,data:Object,saving:Boolean}},R={for:"peer_name_textbox",class:"form-label"},j={class:"text-muted"},q=["disabled"];function W(s,t,c,m,i,v){const l=d("LocaleText");return n(),r("div",{class:h({inactiveField:this.bulk})},[e("label",R,[e("small",j,[o(l,{t:"Name"})])]),p(e("input",{type:"text",class:"form-control form-control-sm rounded-3",disabled:this.saving||this.bulk,"onUpdate:modelValue":t[0]||(t[0]=a=>this.data.name=a),id:"peer_name_textbox",placeholder:""},null,8,q),[[u,this.data.name]])],2)}const J=b(O,[["render",W]]),z={name:"privatePublicKeyInput",components:{LocaleText:_},props:{data:Object,saving:Boolean,bulk:Boolean},setup(){const s=g(),t=y();return{dashboardStore:s,wgStore:t}},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(s){return/^[A-Za-z0-9+/]{43}=?=?$/.test(s)},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()}}}},H={for:"peer_private_key_textbox",class:"form-label"},Q={class:"text-muted"},Y={class:"input-group"},Z=["disabled"],X=["disabled"],ee={class:"d-flex"},te={for:"public_key",class:"form-label"},se={class:"text-muted"},ae={class:"form-check form-switch ms-auto"},le=["disabled"],oe={class:"form-check-label",for:"enablePublicKeyEdit"},ie=["disabled"];function ne(s,t,c,m,i,v){const l=d("LocaleText");return n(),r("div",{class:h(["d-flex gap-2 flex-column",{inactiveField:this.bulk}])},[e("div",null,[e("label",H,[e("small",Q,[o(l,{t:"Private Key"}),e("code",null,[o(l,{t:"(Required for QR Code and Download)"})])])]),e("div",Y,[p(e("input",{type:"text",class:h(["form-control form-control-sm rounded-start-3",{"is-invalid":this.error}]),"onUpdate:modelValue":t[0]||(t[0]=a=>this.keypair.privateKey=a),disabled:!this.editKey||this.bulk,onBlur:t[1]||(t[1]=a=>this.checkMatching()),id:"peer_private_key_textbox"},null,42,Z),[[u,this.keypair.privateKey]]),e("button",{class:"btn btn-outline-info btn-sm rounded-end-3",onClick:t[2]||(t[2]=a=>this.genKeyPair()),disabled:this.bulk,type:"button",id:"button-addon2"},t[6]||(t[6]=[e("i",{class:"bi bi-arrow-repeat"},null,-1)]),8,X)])]),e("div",null,[e("div",ee,[e("label",te,[e("small",se,[o(l,{t:"Public Key"}),e("code",null,[o(l,{t:"(Required)"})])])]),e("div",ae,[p(e("input",{class:"form-check-input",type:"checkbox",role:"switch",disabled:this.bulk,id:"enablePublicKeyEdit","onUpdate:modelValue":t[3]||(t[3]=a=>this.editKey=a)},null,8,le),[[I,this.editKey]]),e("label",oe,[e("small",null,[o(l,{t:"Use your own Private and Public Key"})])])])]),p(e("input",{class:h(["form-control-sm form-control rounded-3",{"is-invalid":this.error}]),"onUpdate:modelValue":t[4]||(t[4]=a=>this.keypair.publicKey=a),onBlur:t[5]||(t[5]=a=>this.checkMatching()),disabled:!this.editKey||this.bulk,type:"text",id:"public_key"},null,42,ie),[[u,this.keypair.publicKey]])])],2)}const de=b(z,[["render",ne]]),re={name:"allowedIPsInput",components:{LocaleText:_},props:{data:Object,saving:Boolean,bulk:Boolean,availableIp:void 0},data(){return{allowedIp:[],availableIpSearchString:"",customAvailableIp:"",allowedIpFormatError:!1}},setup(){const s=y(),t=g();return{store:s,dashboardStore:t}},computed:{searchAvailableIps(){return this.availableIpSearchString?this.availableIp.filter(s=>s.includes(this.availableIpSearchString)&&!this.data.allowed_ips.includes(s)):this.availableIp.filter(s=>!this.data.allowed_ips.includes(s))},inputGetLocale(){return L("Enter IP Address/CIDR")}},methods:{addAllowedIp(s){return this.store.checkCIDR(s)?(this.data.allowed_ips.push(s),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(){}},ce={for:"peer_allowed_ip_textbox",class:"form-label"},pe={class:"text-muted"},ue=["onClick"],he={class:"d-flex gap-2 align-items-center"},be={class:"input-group"},_e=["placeholder","disabled"],me=["disabled"],ve={class:"text-muted"},fe={class:"dropdown flex-grow-1"},ke=["disabled"],ge={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"}},ye={class:"px-3 pb-2 pt-1 d-flex gap-3 align-items-center"},we=["onClick"],Ie={class:"me-auto"},xe={key:0},$e={class:"px-3 text-muted"};function Ae(s,t,c,m,i,v){const l=d("LocaleText");return n(),r("div",{class:h({inactiveField:this.bulk})},[e("label",ce,[e("small",pe,[o(l,{t:"Allowed IPs"}),e("code",null,[o(l,{t:"(Required)"})])])]),e("div",{class:h(["d-flex gap-2 flex-wrap",{"mb-2":this.data.allowed_ips.length>0}])},[o(E,{name:"list"},{default:C(()=>[(n(!0),r(S,null,P(this.data.allowed_ips,(a,w)=>(n(),r("span",{class:"badge rounded-pill text-bg-success",key:a},[K(x(a)+" ",1),e("a",{role:"button",onClick:$=>this.data.allowed_ips.splice(w,1)},t[3]||(t[3]=[e("i",{class:"bi bi-x-circle-fill ms-1"},null,-1)]),8,ue)]))),128))]),_:1})],2),e("div",he,[e("div",be,[p(e("input",{type:"text",class:h(["form-control form-control-sm rounded-start-3",{"is-invalid":this.allowedIpFormatError}]),placeholder:this.inputGetLocale,"onUpdate:modelValue":t[0]||(t[0]=a=>i.customAvailableIp=a),disabled:c.bulk},null,10,_e),[[u,i.customAvailableIp]]),e("button",{class:"btn btn-outline-success btn-sm rounded-end-3",disabled:c.bulk||!this.customAvailableIp,onClick:t[1]||(t[1]=a=>this.addAllowedIp(this.customAvailableIp)),type:"button",id:"button-addon2"},t[4]||(t[4]=[e("i",{class:"bi bi-plus-lg"},null,-1)]),8,me)]),e("small",ve,[o(l,{t:"or"})]),e("div",fe,[e("button",{class:"btn btn-outline-secondary btn-sm dropdown-toggle rounded-3 w-100",disabled:!c.availableIp||c.bulk,"data-bs-auto-close":"outside",type:"button","data-bs-toggle":"dropdown","aria-expanded":"false"},[t[5]||(t[5]=e("i",{class:"bi bi-filter-circle me-2"},null,-1)),o(l,{t:"Pick Available IP"})],8,ke),this.availableIp?(n(),r("ul",ge,[e("li",null,[e("div",ye,[t[6]||(t[6]=e("label",{for:"availableIpSearchString",class:"text-muted"},[e("i",{class:"bi bi-search"})],-1)),p(e("input",{id:"availableIpSearchString",class:"form-control form-control-sm rounded-3","onUpdate:modelValue":t[2]||(t[2]=a=>this.availableIpSearchString=a)},null,512),[[u,this.availableIpSearchString]])])]),(n(!0),r(S,null,P(this.searchAvailableIps,a=>(n(),r("li",null,[e("a",{class:"dropdown-item d-flex",role:"button",onClick:w=>this.addAllowedIp(a)},[e("span",Ie,[e("small",null,x(a),1)])],8,we)]))),256)),this.searchAvailableIps.length===0?(n(),r("li",xe,[e("small",$e,[o(l,{t:"No available IP containing"}),K(' "'+x(this.availableIpSearchString)+'"',1)])])):f("",!0)])):f("",!0)])])],2)}const Se=b(re,[["render",Ae],["__scopeId","data-v-6d5fc831"]]),Pe={name:"dnsInput",components:{LocaleText:_},props:{data:Object,saving:Boolean},data(){return{error:!1,dns:JSON.parse(JSON.stringify(this.data.DNS))}},setup(){const s=y(),t=g();return{store:s,dashboardStore:t}},methods:{checkDNS(){if(this.dns){let s=this.dns.split(",").map(t=>t.replaceAll(" ",""));for(let t in s)if(!this.store.regexCheckIP(s[t])){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()}}},Ke={for:"peer_DNS_textbox",class:"form-label"},Le={class:"text-muted"},Ce=["disabled"];function De(s,t,c,m,i,v){const l=d("LocaleText");return n(),r("div",null,[e("label",Ke,[e("small",Le,[o(l,{t:"DNS"})])]),p(e("input",{type:"text",class:h(["form-control form-control-sm rounded-3",{"is-invalid":this.error}]),disabled:this.saving,"onUpdate:modelValue":t[0]||(t[0]=a=>this.dns=a),id:"peer_DNS_textbox"},null,10,Ce),[[u,this.dns]])])}const Te=b(Pe,[["render",De]]),Be={name:"endpointAllowedIps",components:{LocaleText:_},props:{data:Object,saving:Boolean},setup(){const s=y(),t=g();return{store:s,dashboardStore:t}},data(){return{endpointAllowedIps:JSON.parse(JSON.stringify(this.data.endpoint_allowed_ip)),error:!1}},methods:{checkAllowedIP(){let s=this.endpointAllowedIps.split(",").map(t=>t.replaceAll(" ",""));for(let t in s)if(!this.store.checkCIDR(s[t])){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()}}},Ne={for:"peer_endpoint_allowed_ips",class:"form-label"},Ve={class:"text-muted"},Ue=["disabled"];function Me(s,t,c,m,i,v){const l=d("LocaleText");return n(),r("div",null,[e("label",Ne,[e("small",Ve,[o(l,{t:"Endpoint Allowed IPs"}),e("code",null,[o(l,{t:"(Required)"})])])]),p(e("input",{type:"text",class:h(["form-control form-control-sm rounded-3",{"is-invalid":i.error}]),disabled:this.saving,"onUpdate:modelValue":t[0]||(t[0]=a=>this.endpointAllowedIps=a),onBlur:t[1]||(t[1]=a=>this.checkAllowedIP()),id:"peer_endpoint_allowed_ips"},null,42,Ue),[[u,this.endpointAllowedIps]])])}const Ee=b(Be,[["render",Me]]),Fe={name:"presharedKeyInput",components:{LocaleText:_},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=""}}},Ge={class:"d-flex align-items-start"},Oe={for:"peer_preshared_key_textbox",class:"form-label"},Re={class:"text-muted"},je={class:"form-check form-switch ms-auto"},qe=["disabled"];function We(s,t,c,m,i,v){const l=d("LocaleText");return n(),r("div",null,[e("div",Ge,[e("label",Oe,[e("small",Re,[o(l,{t:"Pre-Shared Key"})])]),e("div",je,[p(e("input",{class:"form-check-input",type:"checkbox",role:"switch","onUpdate:modelValue":t[0]||(t[0]=a=>this.enable=a),id:"peer_preshared_key_switch"},null,512),[[I,this.enable]])])]),p(e("input",{type:"text",class:"form-control form-control-sm rounded-3",disabled:this.saving||!this.enable,"onUpdate:modelValue":t[1]||(t[1]=a=>this.data.preshared_key=a),id:"peer_preshared_key_textbox"},null,8,qe),[[u,this.data.preshared_key]])])}const Je=b(Fe,[["render",We]]),ze={name:"mtuInput",components:{LocaleText:_},props:{data:Object,saving:Boolean}},He={for:"peer_mtu",class:"form-label"},Qe={class:"text-muted"},Ye=["disabled"];function Ze(s,t,c,m,i,v){const l=d("LocaleText");return n(),r("div",null,[e("label",He,[e("small",Qe,[o(l,{t:"MTU"})])]),p(e("input",{type:"number",class:"form-control form-control-sm rounded-3",disabled:this.saving,"onUpdate:modelValue":t[0]||(t[0]=a=>this.data.mtu=a),min:"0",id:"peer_mtu"},null,8,Ye),[[u,this.data.mtu]])])}const Xe=b(ze,[["render",Ze]]),et={name:"persistentKeepAliveInput",components:{LocaleText:_},props:{data:Object,saving:Boolean}},tt={for:"peer_keep_alive",class:"form-label"},st={class:"text-muted"},at=["disabled"];function lt(s,t,c,m,i,v){const l=d("LocaleText");return n(),r("div",null,[e("label",tt,[e("small",st,[o(l,{t:"Persistent Keepalive"})])]),p(e("input",{type:"number",class:"form-control form-control-sm rounded-3",disabled:this.saving,"onUpdate:modelValue":t[0]||(t[0]=a=>this.data.keepalive=a),id:"peer_keep_alive"},null,8,at),[[u,this.data.keepalive]])])}const ot=b(et,[["render",lt]]),it={name:"bulkAdd",components:{LocaleText:_},props:{saving:Boolean,data:Object,availableIp:void 0},computed:{bulkAddGetLocale(){return L("How many peers you want to add?")}}},nt={class:"form-check form-switch"},dt=["disabled"],rt={class:"form-check-label me-2",for:"bulk_add"},ct={class:"text-muted d-block"},pt={key:0,class:"form-group"},ut=["max","placeholder"],ht={class:"text-muted"};function bt(s,t,c,m,i,v){const l=d("LocaleText");return n(),r("div",null,[e("div",nt,[p(e("input",{class:"form-check-input",type:"checkbox",role:"switch",disabled:!this.availableIp,id:"bulk_add","onUpdate:modelValue":t[0]||(t[0]=a=>this.data.bulkAdd=a)},null,8,dt),[[I,this.data.bulkAdd]]),e("label",rt,[e("small",null,[e("strong",null,[o(l,{t:"Bulk Add"})])])])]),e("p",{class:h({"mb-0":!this.data.bulkAdd})},[e("small",ct,[o(l,{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?(n(),r("div",pt,[p(e("input",{class:"form-control form-control-sm rounded-3 mb-1",type:"number",min:"1",max:this.availableIp.length,"onUpdate:modelValue":t[1]||(t[1]=a=>this.data.bulkAddAmount=a),placeholder:this.bulkAddGetLocale},null,8,ut),[[u,this.data.bulkAddAmount]]),e("small",ht,[o(l,{t:"You can add up to "+this.availableIp.length+" peers"},null,8,["t"])])])):f("",!0)])}const _t=b(it,[["render",bt]]),mt={name:"peerCreate",components:{LocaleText:_,BulkAdd:_t,PersistentKeepAliveInput:ot,MtuInput:Xe,PresharedKeyInput:Je,EndpointAllowedIps:Ee,DnsInput:Te,AllowedIPsInput:Se,PrivatePublicKeyInput:de,NameInput:J},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(){F("/api/getAvailableIPs/"+this.$route.params.id,{},s=>{s.status&&(this.availableIp=s.data)})},setup(){const s=y(),t=g();return{store:s,dashboardStore:t}},methods:{peerCreate(){this.saving=!0,G("/api/addPeers/"+this.$route.params.id,this.data,s=>{s.status?(this.$router.push(`/configuration/${this.$route.params.id}/peers`),this.dashboardStore.newMessage("Server","Peer created successfully","success")):this.dashboardStore.newMessage("Server",s.message,"danger"),this.saving=!1})}},computed:{allRequireFieldsFilled(){let s=!0;return this.data.bulkAdd?(this.data.bulkAddAmount.length===0||this.data.bulkAddAmount>this.availableIp.length)&&(s=!1):["allowed_ips","private_key","public_key","endpoint_allowed_ip","keepalive","mtu"].forEach(c=>{this.data[c].length===0&&(s=!1)}),s}},watch:{bulkAdd(s){s||(this.data.bulkAddAmount="")},"data.bulkAddAmount"(){this.data.bulkAddAmount>this.availableIp.length&&(this.data.bulkAddAmount=this.availableIp.length)}}},vt={class:"container"},ft={class:"mb-4"},kt={class:"mb-5 d-flex align-items-center gap-4"},gt={class:"mb-0"},yt={class:"d-flex flex-column gap-2"},wt={class:"row gy-3"},It={key:0,class:"col-sm"},xt={class:"col-sm"},$t={class:"col-sm"},At={key:1,class:"col-12"},St={class:"form-check form-switch"},Pt={class:"form-check-label",for:"bullAdd_PresharedKey_Switch"},Kt={class:"fw-bold"},Lt={class:"d-flex mt-2"},Ct=["disabled"],Dt={key:0,class:"bi bi-plus-circle-fill me-2"};function Tt(s,t,c,m,i,v){const l=d("RouterLink"),a=d("LocaleText"),w=d("BulkAdd"),$=d("NameInput"),D=d("PrivatePublicKeyInput"),T=d("AllowedIPsInput"),B=d("EndpointAllowedIps"),N=d("DnsInput"),V=d("PresharedKeyInput"),U=d("MtuInput"),M=d("PersistentKeepAliveInput");return n(),r("div",vt,[e("div",ft,[e("div",kt,[o(l,{to:"peers",class:"btn btn-dark btn-brand p-2 shadow",style:{"border-radius":"100%"}},{default:C(()=>t[2]||(t[2]=[e("h2",{class:"mb-0",style:{"line-height":"0"}},[e("i",{class:"bi bi-arrow-left-circle"})],-1)])),_:1}),e("h2",gt,[o(a,{t:"Add Peers"})])])]),e("div",yt,[o(w,{saving:i.saving,data:this.data,availableIp:this.availableIp},null,8,["saving","data","availableIp"]),t[3]||(t[3]=e("hr",{class:"mb-0 mt-2"},null,-1)),this.data.bulkAdd?f("",!0):(n(),k($,{key:0,saving:i.saving,data:this.data},null,8,["saving","data"])),this.data.bulkAdd?f("",!0):(n(),k(D,{key:1,saving:i.saving,data:i.data},null,8,["saving","data"])),this.data.bulkAdd?f("",!0):(n(),k(T,{key:2,availableIp:this.availableIp,saving:i.saving,data:i.data},null,8,["availableIp","saving","data"])),o(B,{saving:i.saving,data:i.data},null,8,["saving","data"]),o(N,{saving:i.saving,data:i.data},null,8,["saving","data"]),t[4]||(t[4]=e("hr",{class:"mb-0 mt-2"},null,-1)),e("div",wt,[this.data.bulkAdd?f("",!0):(n(),r("div",It,[o(V,{saving:i.saving,data:i.data,bulk:this.data.bulkAdd},null,8,["saving","data","bulk"])])),e("div",xt,[o(U,{saving:i.saving,data:i.data},null,8,["saving","data"])]),e("div",$t,[o(M,{saving:i.saving,data:i.data},null,8,["saving","data"])]),this.data.bulkAdd?(n(),r("div",At,[e("div",St,[p(e("input",{class:"form-check-input",type:"checkbox",role:"switch","onUpdate:modelValue":t[0]||(t[0]=A=>this.data.preshared_key_bulkAdd=A),id:"bullAdd_PresharedKey_Switch",checked:""},null,512),[[I,this.data.preshared_key_bulkAdd]]),e("label",Pt,[e("small",Kt,[o(a,{t:"Pre-Shared Key"}),this.data.preshared_key_bulkAdd?(n(),k(a,{key:0,t:"Enabled"})):(n(),k(a,{key:1,t:"Disabled"}))])])])])):f("",!0)]),e("div",Lt,[e("button",{class:"ms-auto btn btn-dark btn-brand rounded-3 px-3 py-2 shadow",disabled:!this.allRequireFieldsFilled||this.saving,onClick:t[1]||(t[1]=A=>this.peerCreate())},[this.saving?f("",!0):(n(),r("i",Dt)),this.saving?(n(),k(a,{key:1,t:"Adding..."})):(n(),k(a,{key:2,t:"Add"}))],8,Ct)])])])}const Vt=b(mt,[["render",Tt],["__scopeId","data-v-17eb547c"]]);export{Vt as default}; diff --git a/src/static/app/dist/assets/peerJobs-BbNYdlYw.js b/src/static/app/dist/assets/peerJobs-BbNYdlYw.js new file mode 100644 index 0000000..235b60e --- /dev/null +++ b/src/static/app/dist/assets/peerJobs-BbNYdlYw.js @@ -0,0 +1 @@ +import{S as p,a as b}from"./schedulePeerJob-Bfwzc6gk.js";import{_ as h,W as u,p as m,j as i,a as o,c as a,b as e,d as r,w as _,F as v,h as f,i as J,e as x,k as g}from"./index-DOaPWS1X.js";import{L as w}from"./localeText-CaAXeE0W.js";import"./vue-datepicker-D91GxXPq.js";import"./dayjs.min-D8jwq_wn.js";const P={name:"peerJobs",setup(){return{store:u()}},props:{selectedPeer:Object},components:{LocaleText:w,SchedulePeerJob:p,ScheduleDropdown:b},data(){return{}},methods:{deleteJob(d){this.selectedPeer.jobs=this.selectedPeer.jobs.filter(t=>t.JobID!==d.JobID)},addJob(){this.selectedPeer.jobs.unshift(JSON.parse(JSON.stringify({JobID:m().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})))}}},S={class:"peerSettingContainer w-100 h-100 position-absolute top-0 start-0 overflow-y-scroll"},y={class:"container d-flex h-100 w-100"},$={class:"m-auto modal-dialog-centered dashboardModal"},C={class:"card rounded-3 shadow",style:{width:"700px"}},D={class:"card-header bg-transparent d-flex align-items-center gap-2 border-0 p-4 pb-2"},j={class:"mb-0 fw-normal"},k={class:"card-body px-4 pb-4 pt-2 position-relative"},N={class:"d-flex align-items-center mb-3"},T={class:"card shadow-sm",key:"none",style:{height:"153px"}},I={class:"card-body text-muted text-center d-flex"},L={class:"m-auto"};function O(d,t,B,F,V,A){const n=i("LocaleText"),l=i("SchedulePeerJob");return o(),a("div",S,[e("div",y,[e("div",$,[e("div",C,[e("div",D,[e("h4",j,[r(n,{t:"Schedule Jobs"})]),e("button",{type:"button",class:"btn-close ms-auto",onClick:t[0]||(t[0]=s=>this.$emit("close"))})]),e("div",k,[e("div",N,[e("button",{class:"btn bg-primary-subtle border-1 border-primary-subtle text-primary-emphasis rounded-3 shadow",onClick:t[1]||(t[1]=s=>this.addJob())},[t[3]||(t[3]=e("i",{class:"bi bi-plus-lg me-2"},null,-1)),r(n,{t:"Job"})])]),r(g,{name:"schedulePeerJobTransition",tag:"div",class:"position-relative"},{default:_(()=>[(o(!0),a(v,null,f(this.selectedPeer.jobs,(s,E)=>(o(),J(l,{onRefresh:t[2]||(t[2]=c=>this.$emit("refresh")),onDelete:c=>this.deleteJob(s),dropdowns:this.store.PeerScheduleJobs.dropdowns,key:s.JobID,pjob:s},null,8,["onDelete","dropdowns","pjob"]))),128)),this.selectedPeer.jobs.length===0?(o(),a("div",T,[e("div",I,[e("h6",L,[r(n,{t:"This peer does not have any job yet."})])])])):x("",!0)]),_:1})])])])])])}const z=h(P,[["render",O],["__scopeId","data-v-5bbdd42b"]]);export{z as default}; diff --git a/src/static/app/dist/assets/peerJobsAllModal-CkJIs1TM.js b/src/static/app/dist/assets/peerJobsAllModal-CkJIs1TM.js new file mode 100644 index 0000000..34f523d --- /dev/null +++ b/src/static/app/dist/assets/peerJobsAllModal-CkJIs1TM.js @@ -0,0 +1 @@ +import{S as b}from"./schedulePeerJob-Bfwzc6gk.js";import{_ as g,W as v,p as f,j as l,a as o,c as t,b as e,d as i,F as p,h,t as _,e as y,i as x}from"./index-DOaPWS1X.js";import{L as J}from"./localeText-CaAXeE0W.js";import"./vue-datepicker-D91GxXPq.js";import"./dayjs.min-D8jwq_wn.js";const w={name:"peerJobsAllModal",setup(){return{store:v()}},components:{LocaleText:J,SchedulePeerJob:b},props:{configurationPeers:Array[Object]},methods:{getuuid(){return f()}},computed:{getAllJobs(){return this.configurationPeers.filter(r=>r.jobs.length>0)}}},A={class:"peerSettingContainer w-100 h-100 position-absolute top-0 start-0 overflow-y-scroll"},$={class:"container d-flex h-100 w-100"},k={class:"m-auto modal-dialog-centered dashboardModal"},S={class:"card rounded-3 shadow",style:{width:"700px"}},L={class:"card-header bg-transparent d-flex align-items-center gap-2 border-0 p-4 pb-2"},j={class:"mb-0 fw-normal"},P={class:"card-body px-4 pb-4 pt-2"},C={key:0,class:"accordion",id:"peerJobsLogsModalAccordion"},M={class:"accordion-header"},B=["data-bs-target"],N={key:0},D={class:"text-muted"},T=["id"],V={class:"accordion-body"},F={key:1,class:"card shadow-sm",style:{height:"153px"}},O={class:"card-body text-muted text-center d-flex"},W={class:"m-auto"};function E(r,s,I,R,q,z){const n=l("LocaleText"),u=l("SchedulePeerJob");return o(),t("div",A,[e("div",$,[e("div",k,[e("div",S,[e("div",L,[e("h4",j,[i(n,{t:"All Active Jobs"})]),e("button",{type:"button",class:"btn-close ms-auto",onClick:s[0]||(s[0]=a=>this.$emit("close"))})]),e("div",P,[this.getAllJobs.length>0?(o(),t("div",C,[(o(!0),t(p,null,h(this.getAllJobs,(a,d)=>(o(),t("div",{class:"accordion-item",key:a.id},[e("h2",M,[e("button",{class:"accordion-button collapsed",type:"button","data-bs-toggle":"collapse","data-bs-target":"#collapse_"+d},[e("small",null,[e("strong",null,[a.name?(o(),t("span",N,_(a.name)+" • ",1)):y("",!0),e("samp",D,_(a.id),1)])])],8,B)]),e("div",{id:"collapse_"+d,class:"accordion-collapse collapse","data-bs-parent":"#peerJobsLogsModalAccordion"},[e("div",V,[(o(!0),t(p,null,h(a.jobs,c=>(o(),x(u,{onDelete:s[1]||(s[1]=m=>this.$emit("refresh")),onRefresh:s[2]||(s[2]=m=>this.$emit("refresh")),dropdowns:this.store.PeerScheduleJobs.dropdowns,viewOnly:!0,key:c.JobID,pjob:c},null,8,["dropdowns","pjob"]))),128))])],8,T)]))),128))])):(o(),t("div",F,[e("div",O,[e("span",W,[i(n,{t:"No active job at the moment."})])])]))])])])])])}const X=g(w,[["render",E]]);export{X as default}; diff --git a/src/static/app/dist/assets/peerJobsLogsModal-ZNMKiJ-k.js b/src/static/app/dist/assets/peerJobsLogsModal-ZNMKiJ-k.js new file mode 100644 index 0000000..33455b7 --- /dev/null +++ b/src/static/app/dist/assets/peerJobsLogsModal-ZNMKiJ-k.js @@ -0,0 +1 @@ +import{d as m}from"./dayjs.min-D8jwq_wn.js";import{_ as p,g,j as _,a,c as n,b as s,d as i,f as b,t as c,m as h,v as u,e as d,F as f,h as w,n as L}from"./index-DOaPWS1X.js";import{L as k}from"./localeText-CaAXeE0W.js";const x={name:"peerJobsLogsModal",components:{LocaleText:k},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 g(`/api/getPeerScheduleJobLogs/${this.configurationInfo.Name}`,{},r=>{this.data=r.data,this.logFetchTime=m().format("YYYY-MM-DD HH:mm:ss"),this.dataLoading=!1})}},computed:{getLogs(){return this.data.filter(r=>this.showSuccessJob&&r.Status==="1"||this.showFailedJob&&r.Status==="0")},showLogs(){return this.getLogs.slice(0,this.showLogAmount)}}},y={class:"peerSettingContainer w-100 h-100 position-absolute top-0 start-0 overflow-y-scroll"},v={class:"container-fluid d-flex h-100 w-100"},D={class:"m-auto mt-0 modal-dialog-centered dashboardModal",style:{width:"100%"}},S={class:"card rounded-3 shadow w-100"},I={class:"card-header bg-transparent d-flex align-items-center gap-2 border-0 p-4 pb-0"},J={class:"mb-0"},C={class:"card-body px-4 pb-4 pt-2"},F={key:0},j={class:"mb-2 d-flex gap-3"},M={class:"d-flex gap-3 align-items-center"},V={class:"text-muted"},T={class:"form-check"},A={class:"form-check-label",for:"jobLogsShowSuccessCheck"},N={class:"badge text-success-emphasis bg-success-subtle"},U={class:"form-check"},Y={class:"form-check-label",for:"jobLogsShowFailedCheck"},B={class:"badge text-danger-emphasis bg-danger-subtle"},z={class:"d-flex gap-3 align-items-center ms-auto"},H={class:"text-muted"},$={class:"form-check"},E={class:"form-check-label",for:"jobLogsShowJobIDCheck"},G={class:"form-check"},O={class:"form-check-label",for:"jobLogsShowLogIDCheck"},P={class:"table"},R={scope:"col"},q={key:0,scope:"col"},K={key:1,scope:"col"},Q={scope:"col"},W={scope:"col"},X={style:{"font-size":"0.875rem"}},Z={scope:"row"},ss={key:0},ts={class:"text-muted"},os={key:1},es={class:"text-muted"},is={class:"d-flex gap-2"},as={key:1,class:"d-flex align-items-center flex-column"};function ns(r,t,ls,cs,l,ds){const e=_("LocaleText");return a(),n("div",y,[s("div",v,[s("div",D,[s("div",S,[s("div",I,[s("h4",J,[i(e,{t:"Jobs Logs"})]),s("button",{type:"button",class:"btn-close ms-auto",onClick:t[0]||(t[0]=o=>this.$emit("close"))})]),s("div",C,[this.dataLoading?(a(),n("div",as,t[11]||(t[11]=[s("div",{class:"spinner-border text-body",role:"status"},[s("span",{class:"visually-hidden"},"Loading...")],-1)]))):(a(),n("div",F,[s("p",null,[i(e,{t:"Updated at"}),b(" : "+c(this.logFetchTime),1)]),s("div",j,[s("button",{onClick:t[1]||(t[1]=o=>this.fetchLog()),class:"btn btn-sm rounded-3 shadow-sm text-info-emphasis bg-info-subtle border-1 border-info-subtle me-1"},[t[8]||(t[8]=s("i",{class:"bi bi-arrow-clockwise me-2"},null,-1)),i(e,{t:"Refresh"})]),s("div",M,[s("span",V,[i(e,{t:"Filter"})]),s("div",T,[h(s("input",{class:"form-check-input",type:"checkbox","onUpdate:modelValue":t[2]||(t[2]=o=>this.showSuccessJob=o),id:"jobLogsShowSuccessCheck"},null,512),[[u,this.showSuccessJob]]),s("label",A,[s("span",N,[i(e,{t:"Success"})])])]),s("div",U,[h(s("input",{class:"form-check-input",type:"checkbox","onUpdate:modelValue":t[3]||(t[3]=o=>this.showFailedJob=o),id:"jobLogsShowFailedCheck"},null,512),[[u,this.showFailedJob]]),s("label",Y,[s("span",B,[i(e,{t:"Failed"})])])])]),s("div",z,[s("span",H,[i(e,{t:"Display"})]),s("div",$,[h(s("input",{class:"form-check-input",type:"checkbox","onUpdate:modelValue":t[4]||(t[4]=o=>l.showJobID=o),id:"jobLogsShowJobIDCheck"},null,512),[[u,l.showJobID]]),s("label",E,[i(e,{t:"Job ID"})])]),s("div",G,[h(s("input",{class:"form-check-input",type:"checkbox","onUpdate:modelValue":t[5]||(t[5]=o=>l.showLogID=o),id:"jobLogsShowLogIDCheck"},null,512),[[u,l.showLogID]]),s("label",O,[i(e,{t:"Log ID"})])])])]),s("table",P,[s("thead",null,[s("tr",null,[s("th",R,[i(e,{t:"Date"})]),l.showLogID?(a(),n("th",q,[i(e,{t:"Log ID"})])):d("",!0),l.showJobID?(a(),n("th",K,[i(e,{t:"Job ID"})])):d("",!0),s("th",Q,[i(e,{t:"Status"})]),s("th",W,[i(e,{t:"Message"})])])]),s("tbody",null,[(a(!0),n(f,null,w(this.showLogs,o=>(a(),n("tr",X,[s("th",Z,c(o.LogDate),1),l.showLogID?(a(),n("td",ss,[s("samp",ts,c(o.LogID),1)])):d("",!0),l.showJobID?(a(),n("td",os,[s("samp",es,c(o.JobID),1)])):d("",!0),s("td",null,[s("span",{class:L(["badge",[o.Status==="1"?"text-success-emphasis bg-success-subtle":"text-danger-emphasis bg-danger-subtle"]])},c(o.Status==="1"?"Success":"Failed"),3)]),s("td",null,c(o.Message),1)]))),256))])]),s("div",is,[this.getLogs.length>this.showLogAmount?(a(),n("button",{key:0,onClick:t[6]||(t[6]=o=>this.showLogAmount+=20),class:"btn btn-sm rounded-3 shadow-sm text-primary-emphasis bg-primary-subtle border-1 border-primary-subtle"},t[9]||(t[9]=[s("i",{class:"bi bi-chevron-down me-2"},null,-1),b(" Show More ")]))):d("",!0),this.showLogAmount>20?(a(),n("button",{key:1,onClick:t[7]||(t[7]=o=>this.showLogAmount=20),class:"btn btn-sm rounded-3 shadow-sm text-primary-emphasis bg-primary-subtle border-1 border-primary-subtle"},t[10]||(t[10]=[s("i",{class:"bi bi-chevron-up me-2"},null,-1),b(" Collapse ")]))):d("",!0)])]))])])])])])}const bs=p(x,[["render",ns]]);export{bs as default}; diff --git a/src/static/app/dist/assets/peerList-C2NQGcke.js b/src/static/app/dist/assets/peerList-C2NQGcke.js new file mode 100644 index 0000000..2934beb --- /dev/null +++ b/src/static/app/dist/assets/peerList-C2NQGcke.js @@ -0,0 +1,19 @@ +const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/deleteConfiguration-BU0tzWgI.js","assets/index-DOaPWS1X.js","assets/index-D2eeEsuX.css","assets/localeText-CaAXeE0W.js","assets/configurationBackupRestore-CerUpwbQ.js","assets/dayjs.min-D8jwq_wn.js","assets/configurationBackupRestore-BeBqyCqt.css","assets/selectPeers-B6Dm7IFO.js","assets/selectPeers-Wjnh8YUZ.css","assets/editConfiguration-kC_NwN06.js","assets/editConfiguration-Oqrarw_V.css","assets/peerShareLinkModal-6b5Bdaqt.js","assets/vue-datepicker-D91GxXPq.js","assets/peerJobsLogsModal-ZNMKiJ-k.js","assets/peerJobsAllModal-CkJIs1TM.js","assets/schedulePeerJob-Bfwzc6gk.js","assets/schedulePeerJob--V7cpve7.css","assets/peerJobs-BbNYdlYw.js","assets/peerJobs-voXURBEt.css","assets/peerCreate-B_n86hyd.js","assets/peerCreate-BKh8DeBv.css","assets/peerQRCode-DEHFJvZX.js","assets/browser-CjSdxGTc.js","assets/peerConfigurationFile-BRKM9nlG.js","assets/peerConfigurationFile-CNB9RKjb.css","assets/peerSettings-Bgrsto1V.js","assets/peerSettings-Cm-ugvIi.css"])))=>i.map(i=>d[i]); +import{_ as rs,D as Hs,W as Dn,G as _t,q as me,g as ve,a as D,c as $,b as p,d as P,w as G,m as On,s as No,F as qt,h as ks,t as K,e as V,T as tt,j as W,I as Ho,J as Wo,B as Vo,E as An,f as Wt,n as Vt,i as H,r as Qe,K as Tn,L as Ln,M as Ms,N as jo,o as Uo,O as Yo,P as Ps,Q as Ko,R as In,U as ot,v as Xo,k as Go,V as rt}from"./index-DOaPWS1X.js";import{L as as}from"./localeText-CaAXeE0W.js";import{d as oi}from"./dayjs.min-D8jwq_wn.js";const Jo={name:"peerSearch",components:{LocaleText:as},setup(){const s=Hs(),t=Dn();return{store:s,wireguardConfigurationStore:t}},props:{configuration:Object},data(){return{sort:{status:_t("Status"),name:_t("Name"),allowed_ip:_t("Allowed IPs"),restricted:_t("Restricted")},interval:{5e3:_t("5 Seconds"),1e4:_t("10 Seconds"),3e4:_t("30 Seconds"),6e4:_t("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(s){me("/api/updateDashboardConfigurationItem",{section:"Server",key:"dashboard_sort",value:s},t=>{t.status&&this.store.getConfiguration()})},updateRefreshInterval(s){me("/api/updateDashboardConfigurationItem",{section:"Server",key:"dashboard_refresh_interval",value:s},t=>{t.status&&this.store.getConfiguration()})},downloadAllPeer(){ve(`/api/downloadAllPeers/${this.configuration.Name}`,{},s=>{console.log(s),window.wireguard.generateZipFiles(s,this.configuration.Name)})}},computed:{searchBarPlaceholder(){return _t("Search Peers...")}}},qo={class:"mb-3"},Qo={class:"d-flex gap-2 z-3 peerSearchContainer"},Zo={class:"mt-3 mt-md-0 flex-grow-1"},tr=["placeholder"],er={key:0,class:"peerSettingContainer w-100 h-100 position-absolute top-0 start-0 overflow-y-scroll displayModal"},sr={class:"container-md d-flex h-100 w-100"},ir={class:"m-auto modal-dialog-centered dashboardModal"},nr={class:"card rounded-3 shadow w-100"},or={class:"card-header bg-transparent d-flex align-items-center gap-2 border-0 p-4 pb-2"},rr={class:"mb-0 fw-normal"},ar={class:"card-body px-4 pb-4 d-flex gap-3 flex-column"},lr={class:"text-muted fw-bold mb-2"},cr={class:"list-group"},hr=["onClick"],dr={class:"me-auto"},ur={key:0,class:"bi bi-check text-primary"},fr={class:"text-muted fw-bold mb-2"},gr={class:"list-group"},pr=["onClick"],mr={class:"me-auto"},br={key:0,class:"bi bi-check text-primary"},_r={key:0,class:"peerSettingContainer w-100 h-100 position-absolute top-0 start-0 overflow-y-scroll displayModal"},xr={class:"container-md d-flex h-100 w-100"},yr={class:"m-auto modal-dialog-centered dashboardModal"},vr={class:"card rounded-3 shadow w-100"},Sr={class:"card-header bg-transparent d-flex align-items-center gap-2 border-0 p-4"},wr={class:"mb-0"},kr={class:"card-body px-4 pb-4 d-flex gap-3 flex-column pt-0"},Mr={class:"text-muted fw-bold mb-2"},Pr={class:"list-group"},Cr={class:"text-muted fw-bold mb-2"},Dr={class:"list-group"};function Or(s,t,e,i,n,o){const r=W("LocaleText"),a=W("RouterLink");return D(),$("div",qo,[p("div",Qo,[P(a,{to:"create",class:"text-decoration-none btn text-primary-emphasis bg-primary-subtle rounded-3 border-1 border-primary-subtle shadow-sm"},{default:G(()=>[t[13]||(t[13]=p("i",{class:"bi bi-plus-lg me-2"},null,-1)),P(r,{t:"Peer"})]),_:1}),p("button",{class:"btn text-primary-emphasis bg-primary-subtle rounded-3 border-1 border-primary-subtle shadow-sm",onClick:t[0]||(t[0]=l=>this.downloadAllPeer())},[t[14]||(t[14]=p("i",{class:"bi bi-download me-2"},null,-1)),P(r,{t:"Download All"})]),p("div",Zo,[On(p("input",{class:"form-control rounded-3 bg-secondary-subtle border-1 border-secondary-subtle shadow-sm w-100",placeholder:o.searchBarPlaceholder,id:"searchPeers",onKeyup:t[1]||(t[1]=l=>this.debounce()),"onUpdate:modelValue":t[2]||(t[2]=l=>this.searchString=l)},null,40,tr),[[No,this.searchString]])]),p("button",{onClick:t[3]||(t[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"},[t[15]||(t[15]=p("i",{class:"bi bi-filter-circle me-2"},null,-1)),P(r,{t:"Display"})]),p("button",{class:"btn text-secondary-emphasis bg-secondary-subtle rounded-3 border-1 border-secondary-subtle shadow-sm",onClick:t[4]||(t[4]=l=>this.$emit("editConfiguration")),type:"button","aria-expanded":"false"},t[16]||(t[16]=[p("i",{class:"bi bi-gear-fill"},null,-1)])),p("button",{class:"btn text-secondary-emphasis bg-secondary-subtle rounded-3 border-1 border-secondary-subtle shadow-sm",onClick:t[5]||(t[5]=l=>this.showMoreSettings=!0),type:"button","aria-expanded":"false"},t[17]||(t[17]=[p("i",{class:"bi bi-three-dots"},null,-1)])),P(tt,{name:"zoom"},{default:G(()=>[this.showDisplaySettings?(D(),$("div",er,[p("div",sr,[p("div",ir,[p("div",nr,[p("div",or,[p("h4",rr,[P(r,{t:"Display"})]),p("button",{type:"button",class:"btn-close ms-auto",onClick:t[6]||(t[6]=l=>this.showDisplaySettings=!1)})]),p("div",ar,[p("div",null,[p("p",lr,[p("small",null,[P(r,{t:"Sort by"})])]),p("div",cr,[(D(!0),$(qt,null,ks(this.sort,(l,c)=>(D(),$("a",{class:"list-group-item list-group-item-action d-flex",role:"button",onClick:h=>this.updateSort(c)},[p("span",dr,K(l),1),i.store.Configuration.Server.dashboard_sort===c?(D(),$("i",ur)):V("",!0)],8,hr))),256))])]),p("div",null,[p("p",fr,[p("small",null,[P(r,{t:"Refresh Interval"})])]),p("div",gr,[(D(!0),$(qt,null,ks(this.interval,(l,c)=>(D(),$("a",{class:"list-group-item list-group-item-action d-flex",role:"button",onClick:h=>this.updateRefreshInterval(c)},[p("span",mr,K(l),1),i.store.Configuration.Server.dashboard_refresh_interval===c?(D(),$("i",br)):V("",!0)],8,pr))),256))])])])])])])])):V("",!0)]),_:1}),P(tt,{name:"zoom"},{default:G(()=>[this.showMoreSettings?(D(),$("div",_r,[p("div",xr,[p("div",yr,[p("div",vr,[p("div",Sr,[p("h4",wr,[P(r,{t:"Other Settings"})]),p("button",{type:"button",class:"btn-close ms-auto",onClick:t[7]||(t[7]=l=>this.showMoreSettings=!1)})]),p("div",kr,[p("div",null,[p("p",Mr,[p("small",null,[P(r,{t:"Peers"})])]),p("div",Pr,[p("a",{class:"list-group-item list-group-item-action d-flex",role:"button",onClick:t[8]||(t[8]=l=>this.$emit("selectPeers"))},[P(r,{t:"Select Peers"})]),p("a",{class:"list-group-item list-group-item-action d-flex",role:"button",onClick:t[9]||(t[9]=l=>this.$emit("jobsAll"))},[P(r,{t:"Active Jobs"})]),p("a",{class:"list-group-item list-group-item-action d-flex",role:"button",onClick:t[10]||(t[10]=l=>this.$emit("jobLogs"))},[P(r,{t:"Logs"})])])]),p("div",null,[p("p",Cr,[p("small",null,[P(r,{t:"Configuration"})])]),p("div",Dr,[p("a",{class:"list-group-item list-group-item-action d-flex",role:"button",onClick:t[11]||(t[11]=l=>this.$emit("backupRestore"))},[P(r,{t:"Backup & Restore"})]),p("a",{class:"list-group-item list-group-item-action d-flex text-danger fw-bold",role:"button",onClick:t[12]||(t[12]=l=>this.$emit("deleteConfiguration"))},[P(r,{t:"Delete Configuration"})])])])])])])])])):V("",!0)]),_:1})])])}const Ar=rs(Jo,[["render",Or],["__scopeId","data-v-162e14b9"]]);function Tr(s){return Ho()?(Wo(s),!0):!1}function Rn(s){return typeof s=="function"?s():Vo(s)}const En=typeof window<"u"&&typeof document<"u";typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const Lr=Object.prototype.toString,Ir=s=>Lr.call(s)==="[object Object]",Ge=()=>{},Rr=Er();function Er(){var s,t;return En&&((s=window?.navigator)==null?void 0:s.userAgent)&&(/iP(?:ad|hone|od)/.test(window.navigator.userAgent)||((t=window?.navigator)==null?void 0:t.maxTouchPoints)>2&&/iPad|Macintosh/.test(window?.navigator.userAgent))}function ue(s){var t;const e=Rn(s);return(t=e?.$el)!=null?t:e}const Fn=En?window:void 0;function ds(...s){let t,e,i,n;if(typeof s[0]=="string"||Array.isArray(s[0])?([e,i,n]=s,t=Fn):[t,e,i,n]=s,!t)return Ge;Array.isArray(e)||(e=[e]),Array.isArray(i)||(i=[i]);const o=[],r=()=>{o.forEach(h=>h()),o.length=0},a=(h,d,u,f)=>(h.addEventListener(d,u,f),()=>h.removeEventListener(d,u,f)),l=An(()=>[ue(t),Rn(n)],([h,d])=>{if(r(),!h)return;const u=Ir(d)?{...d}:d;o.push(...e.flatMap(f=>i.map(g=>a(h,f,g,u))))},{immediate:!0,flush:"post"}),c=()=>{l(),r()};return Tr(c),c}let ri=!1;function Fr(s,t,e={}){const{window:i=Fn,ignore:n=[],capture:o=!0,detectIframe:r=!1}=e;if(!i)return Ge;Rr&&!ri&&(ri=!0,Array.from(i.document.body.children).forEach(u=>u.addEventListener("click",Ge)),i.document.documentElement.addEventListener("click",Ge));let a=!0;const l=u=>n.some(f=>{if(typeof f=="string")return Array.from(i.document.querySelectorAll(f)).some(g=>g===u.target||u.composedPath().includes(g));{const g=ue(f);return g&&(u.target===g||u.composedPath().includes(g))}}),h=[ds(i,"click",u=>{const f=ue(s);if(!(!f||f===u.target||u.composedPath().includes(f))){if(u.detail===0&&(a=!l(u)),!a){a=!0;return}t(u)}},{passive:!0,capture:o}),ds(i,"pointerdown",u=>{const f=ue(s);a=!l(u)&&!!(f&&!u.composedPath().includes(f))},{passive:!0}),r&&ds(i,"blur",u=>{setTimeout(()=>{var f;const g=ue(s);((f=i.document.activeElement)==null?void 0:f.tagName)==="IFRAME"&&!g?.contains(i.document.activeElement)&&t(u)},0)})].filter(Boolean);return()=>h.forEach(u=>u())}const zr={name:"peerSettingsDropdown",components:{LocaleText:as},setup(){return{dashboardStore:Hs()}},props:{Peer:Object},data(){return{deleteBtnDisabled:!1,restrictBtnDisabled:!1,allowAccessBtnDisabled:!1,confirmDelete:!1}},methods:{downloadPeer(){ve("/api/downloadPeer/"+this.$route.params.id,{id:this.Peer.id},s=>{if(s.status){const t=new Blob([s.data.file],{type:"text/plain"}),e=URL.createObjectURL(t),i=`${s.data.fileName}.conf`,n=document.createElement("a");n.href=e,n.download=i,n.click(),this.dashboardStore.newMessage("WGDashboard","Peer download started","success")}else this.dashboardStore.newMessage("Server",s.message,"danger")})},downloadQRCode(s){ve("/api/downloadPeer/"+this.$route.params.id,{id:this.Peer.id},t=>{t.status?this.$emit(s,t.data.file):this.dashboardStore.newMessage("Server",t.message,"danger")})},deletePeer(){this.deleteBtnDisabled=!0,me(`/api/deletePeers/${this.$route.params.id}`,{peers:[this.Peer.id]},s=>{this.dashboardStore.newMessage("Server",s.message,s.status?"success":"danger"),this.$emit("refresh"),this.deleteBtnDisabled=!1})},restrictPeer(){this.restrictBtnDisabled=!0,me(`/api/restrictPeers/${this.$route.params.id}`,{peers:[this.Peer.id]},s=>{this.dashboardStore.newMessage("Server",s.message,s.status?"success":"danger"),this.$emit("refresh"),this.restrictBtnDisabled=!1})},allowAccessPeer(){this.allowAccessBtnDisabled=!0,me(`/api/allowAccessPeers/${this.$route.params.id}`,{peers:[this.Peer.id]},s=>{this.dashboardStore.newMessage("Server",s.message,s.status?"success":"danger"),this.$emit("refresh"),this.allowAccessBtnDisabled=!1})}}},Br={class:"dropdown-menu mt-2 shadow-lg d-block rounded-3",style:{"max-width":"200px"}},$r={style:{"font-size":"0.8rem","padding-left":"var(--bs-dropdown-item-padding-x)","padding-right":"var(--bs-dropdown-item-padding-x)"}},Nr={class:"text-body d-flex"},Hr={class:"ms-auto"},Wr={key:1},Vr={class:"w-100 dropdown-item text-muted",style:{"white-space":"break-spaces","font-size":"0.7rem"}},jr={key:2,class:"d-flex",style:{"padding-left":"var(--bs-dropdown-item-padding-x)","padding-right":"var(--bs-dropdown-item-padding-x)"}},Ur={key:1,class:"confirmDelete"},Yr={style:{"white-space":"break-spaces"},class:"mb-2 d-block fw-bold"},Kr={class:"d-flex w-100 gap-2"},Xr=["disabled"],Gr=["disabled"],Jr={key:1};function qr(s,t,e,i,n,o){const r=W("LocaleText");return D(),$("ul",Br,[this.Peer.restricted?(D(),$("li",Jr,[p("a",{class:Vt(["dropdown-item d-flex text-warning",{disabled:this.allowAccessBtnDisabled}]),onClick:t[10]||(t[10]=a=>this.allowAccessPeer()),role:"button"},[t[25]||(t[25]=p("i",{class:"me-auto bi bi-unlock"},null,-1)),this.allowAccessBtnDisabled?(D(),H(r,{key:1,t:"Allowing Access..."})):(D(),H(r,{key:0,t:"Allow Access"}))],2)])):(D(),$(qt,{key:0},[this.confirmDelete?(D(),$("li",Ur,[p("p",Yr,[P(r,{t:"Are you sure to delete this peer?"})]),p("div",Kr,[p("button",{onClick:t[8]||(t[8]=a=>this.deletePeer()),disabled:this.deleteBtnDisabled,class:"flex-grow-1 ms-auto btn btn-sm bg-danger"},[P(r,{t:"Yes"})],8,Xr),p("button",{disabled:this.deleteBtnDisabled,onClick:t[9]||(t[9]=a=>this.confirmDelete=!1),class:"flex-grow-1 btn btn-sm bg-secondary-subtle text-secondary-emphasis border border-secondary-subtle"},[P(r,{t:"No"})],8,Gr)])])):(D(),$(qt,{key:0},[this.Peer.status==="running"?(D(),$(qt,{key:0},[p("li",$r,[p("span",Nr,[t[11]||(t[11]=p("i",{class:"bi bi-box-arrow-in-right"},null,-1)),p("span",Hr,K(this.Peer.endpoint),1)])]),t[12]||(t[12]=p("li",null,[p("hr",{class:"dropdown-divider"})],-1))],64)):V("",!0),this.Peer.private_key?(D(),$("li",jr,[p("a",{class:"dropdown-item text-center px-0 rounded-3",role:"button",onClick:t[0]||(t[0]=a=>this.downloadPeer())},t[13]||(t[13]=[p("i",{class:"me-auto bi bi-download"},null,-1)])),p("a",{class:"dropdown-item text-center px-0 rounded-3",role:"button",onClick:t[1]||(t[1]=a=>this.downloadQRCode("qrcode"))},t[14]||(t[14]=[p("i",{class:"me-auto bi bi-qr-code"},null,-1)])),p("a",{class:"dropdown-item text-center px-0 rounded-3",role:"button",onClick:t[2]||(t[2]=a=>this.downloadQRCode("configurationFile"))},t[15]||(t[15]=[p("i",{class:"me-auto bi bi-body-text"},null,-1)])),p("a",{class:"dropdown-item text-center px-0 rounded-3",role:"button",onClick:t[3]||(t[3]=a=>this.$emit("share"))},t[16]||(t[16]=[p("i",{class:"me-auto bi bi-share"},null,-1)]))])):(D(),$("li",Wr,[p("small",Vr,[P(r,{t:"Download & QR Code is not available due to no private key set for this peer"})])])),t[23]||(t[23]=p("li",null,[p("hr",{class:"dropdown-divider"})],-1)),p("li",null,[p("a",{class:"dropdown-item d-flex",role:"button",onClick:t[4]||(t[4]=a=>this.$emit("setting"))},[t[17]||(t[17]=p("i",{class:"me-auto bi bi-pen"},null,-1)),t[18]||(t[18]=Wt()),P(r,{t:"Peer Settings"})])]),p("li",null,[p("a",{class:"dropdown-item d-flex",role:"button",onClick:t[5]||(t[5]=a=>this.$emit("jobs"))},[t[19]||(t[19]=p("i",{class:"me-auto bi bi-app-indicator"},null,-1)),t[20]||(t[20]=Wt()),P(r,{t:"Schedule Jobs"})])]),t[24]||(t[24]=p("li",null,[p("hr",{class:"dropdown-divider"})],-1)),p("li",null,[p("a",{class:Vt(["dropdown-item d-flex text-warning",{disabled:this.restrictBtnDisabled}]),onClick:t[6]||(t[6]=a=>this.restrictPeer()),role:"button"},[t[21]||(t[21]=p("i",{class:"me-auto bi bi-lock"},null,-1)),this.restrictBtnDisabled?(D(),H(r,{key:1,t:"Restricting..."})):(D(),H(r,{key:0,t:"Restrict Access"}))],2)]),p("li",null,[p("a",{class:Vt(["dropdown-item d-flex fw-bold text-danger",{disabled:this.deleteBtnDisabled}]),onClick:t[7]||(t[7]=a=>this.confirmDelete=!0),role:"button"},[t[22]||(t[22]=p("i",{class:"me-auto bi bi-trash"},null,-1)),this.deleteBtnDisabled?(D(),H(r,{key:1,t:"Deleting..."})):(D(),H(r,{key:0,t:"Delete"}))],2)])],64))],64))])}const Qr=rs(zr,[["render",qr],["__scopeId","data-v-b72b1a20"]]),Zr={name:"peer",components:{LocaleText:as,PeerSettingsDropdown:Qr},props:{Peer:Object},data(){return{}},setup(){const s=Qe(null),t=Qe(!1);return Fr(s,e=>{t.value=!1}),{target:s,subMenuOpened:t}},computed:{getLatestHandshake(){return this.Peer.latest_handshake.includes(",")?this.Peer.latest_handshake.split(",")[0]:this.Peer.latest_handshake}}},ta={key:0,class:"card-header bg-transparent d-flex align-items-center gap-2 border-0"},ea={style:{"font-size":"0.8rem"},class:"ms-auto d-flex gap-2"},sa={class:"text-primary"},ia={class:"text-success"},na={key:0,class:"text-secondary"},oa={key:1,class:"border-0 card-header bg-transparent text-warning fw-bold",style:{"font-size":"0.8rem"}},ra={class:"card-body pt-1",style:{"font-size":"0.9rem"}},aa={class:"mb-1"},la={class:"text-muted"},ca={class:"d-block"},ha={class:"text-muted"},da={class:"d-block"},ua={class:"d-flex align-items-end"};function fa(s,t,e,i,n,o){const r=W("LocaleText"),a=W("PeerSettingsDropdown");return D(),$("div",{class:Vt(["card shadow-sm rounded-3 peerCard bg-transparent",{"border-warning":e.Peer.restricted}])},[p("div",null,[e.Peer.restricted?(D(),$("div",oa,[t[12]||(t[12]=p("i",{class:"bi-lock-fill me-2"},null,-1)),P(r,{t:"Access Restricted"})])):(D(),$("div",ta,[p("div",{class:Vt(["dot ms-0",{active:e.Peer.status==="running"}])},null,2),p("div",ea,[p("span",sa,[t[7]||(t[7]=p("i",{class:"bi bi-arrow-down"},null,-1)),p("strong",null,K((e.Peer.cumu_receive+e.Peer.total_receive).toFixed(4)),1),t[8]||(t[8]=Wt(" GB "))]),p("span",ia,[t[9]||(t[9]=p("i",{class:"bi bi-arrow-up"},null,-1)),p("strong",null,K((e.Peer.cumu_sent+e.Peer.total_sent).toFixed(4)),1),t[10]||(t[10]=Wt(" GB "))]),e.Peer.latest_handshake!=="No Handshake"?(D(),$("span",na,[t[11]||(t[11]=p("i",{class:"bi bi-arrows-angle-contract"},null,-1)),Wt(" "+K(o.getLatestHandshake)+" ago ",1)])):V("",!0)])]))]),p("div",ra,[p("h6",null,K(e.Peer.name?e.Peer.name:"Untitled Peer"),1),p("div",aa,[p("small",la,[P(r,{t:"Public Key"})]),p("small",ca,[p("samp",null,K(e.Peer.id),1)])]),p("div",null,[p("small",ha,[P(r,{t:"Allowed IPs"})]),p("small",da,[p("samp",null,K(e.Peer.allowed_ip),1)])]),p("div",ua,[p("div",{class:Vt(["ms-auto px-2 rounded-3 subMenuBtn",{active:this.subMenuOpened}])},[p("a",{role:"button",class:"text-body",onClick:t[0]||(t[0]=l=>this.subMenuOpened=!0)},t[13]||(t[13]=[p("h5",{class:"mb-0"},[p("i",{class:"bi bi-three-dots"})],-1)])),P(tt,{name:"slide-fade"},{default:G(()=>[this.subMenuOpened?(D(),H(a,{key:0,onQrcode:t[1]||(t[1]=l=>this.$emit("qrcode",l)),onConfigurationFile:t[2]||(t[2]=l=>this.$emit("configurationFile",l)),onSetting:t[3]||(t[3]=l=>this.$emit("setting")),onJobs:t[4]||(t[4]=l=>this.$emit("jobs")),onRefresh:t[5]||(t[5]=l=>this.$emit("refresh")),onShare:t[6]||(t[6]=l=>this.$emit("share")),Peer:e.Peer,ref:"target"},null,8,["Peer"])):V("",!0)]),_:1})],2)])])],2)}const ga=rs(Zr,[["render",fa],["__scopeId","data-v-0f6bdc2a"]]);/*! + * @kurkle/color v0.3.2 + * https://github.com/kurkle/color#readme + * (c) 2023 Jukka Kurkela + * Released under the MIT License + */function Oe(s){return s+.5|0}const Mt=(s,t,e)=>Math.max(Math.min(s,e),t);function fe(s){return Mt(Oe(s*2.55),0,255)}function Ct(s){return Mt(Oe(s*255),0,255)}function St(s){return Mt(Oe(s/2.55)/100,0,1)}function ai(s){return Mt(Oe(s*100),0,100)}const at={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},Cs=[..."0123456789ABCDEF"],pa=s=>Cs[s&15],ma=s=>Cs[(s&240)>>4]+Cs[s&15],Re=s=>(s&240)>>4===(s&15),ba=s=>Re(s.r)&&Re(s.g)&&Re(s.b)&&Re(s.a);function _a(s){var t=s.length,e;return s[0]==="#"&&(t===4||t===5?e={r:255&at[s[1]]*17,g:255&at[s[2]]*17,b:255&at[s[3]]*17,a:t===5?at[s[4]]*17:255}:(t===7||t===9)&&(e={r:at[s[1]]<<4|at[s[2]],g:at[s[3]]<<4|at[s[4]],b:at[s[5]]<<4|at[s[6]],a:t===9?at[s[7]]<<4|at[s[8]]:255})),e}const xa=(s,t)=>s<255?t(s):"";function ya(s){var t=ba(s)?pa:ma;return s?"#"+t(s.r)+t(s.g)+t(s.b)+xa(s.a,t):void 0}const va=/^(hsla?|hwb|hsv)\(\s*([-+.e\d]+)(?:deg)?[\s,]+([-+.e\d]+)%[\s,]+([-+.e\d]+)%(?:[\s,]+([-+.e\d]+)(%)?)?\s*\)$/;function zn(s,t,e){const i=t*Math.min(e,1-e),n=(o,r=(o+s/30)%12)=>e-i*Math.max(Math.min(r-3,9-r,1),-1);return[n(0),n(8),n(4)]}function Sa(s,t,e){const i=(n,o=(n+s/60)%6)=>e-e*t*Math.max(Math.min(o,4-o,1),0);return[i(5),i(3),i(1)]}function wa(s,t,e){const i=zn(s,1,.5);let n;for(t+e>1&&(n=1/(t+e),t*=n,e*=n),n=0;n<3;n++)i[n]*=1-t-e,i[n]+=t;return i}function ka(s,t,e,i,n){return s===n?(t-e)/i+(t.5?h/(2-o-r):h/(o+r),l=ka(e,i,n,h,o),l=l*60+.5),[l|0,c||0,a]}function Vs(s,t,e,i){return(Array.isArray(t)?s(t[0],t[1],t[2]):s(t,e,i)).map(Ct)}function js(s,t,e){return Vs(zn,s,t,e)}function Ma(s,t,e){return Vs(wa,s,t,e)}function Pa(s,t,e){return Vs(Sa,s,t,e)}function Bn(s){return(s%360+360)%360}function Ca(s){const t=va.exec(s);let e=255,i;if(!t)return;t[5]!==i&&(e=t[6]?fe(+t[5]):Ct(+t[5]));const n=Bn(+t[2]),o=+t[3]/100,r=+t[4]/100;return t[1]==="hwb"?i=Ma(n,o,r):t[1]==="hsv"?i=Pa(n,o,r):i=js(n,o,r),{r:i[0],g:i[1],b:i[2],a:e}}function Da(s,t){var e=Ws(s);e[0]=Bn(e[0]+t),e=js(e),s.r=e[0],s.g=e[1],s.b=e[2]}function Oa(s){if(!s)return;const t=Ws(s),e=t[0],i=ai(t[1]),n=ai(t[2]);return s.a<255?`hsla(${e}, ${i}%, ${n}%, ${St(s.a)})`:`hsl(${e}, ${i}%, ${n}%)`}const li={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"},ci={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 Aa(){const s={},t=Object.keys(ci),e=Object.keys(li);let i,n,o,r,a;for(i=0;i>16&255,o>>8&255,o&255]}return s}let Ee;function Ta(s){Ee||(Ee=Aa(),Ee.transparent=[0,0,0,0]);const t=Ee[s.toLowerCase()];return t&&{r:t[0],g:t[1],b:t[2],a:t.length===4?t[3]:255}}const La=/^rgba?\(\s*([-+.\d]+)(%)?[\s,]+([-+.e\d]+)(%)?[\s,]+([-+.e\d]+)(%)?(?:[\s,/]+([-+.e\d]+)(%)?)?\s*\)$/;function Ia(s){const t=La.exec(s);let e=255,i,n,o;if(t){if(t[7]!==i){const r=+t[7];e=t[8]?fe(r):Mt(r*255,0,255)}return i=+t[1],n=+t[3],o=+t[5],i=255&(t[2]?fe(i):Mt(i,0,255)),n=255&(t[4]?fe(n):Mt(n,0,255)),o=255&(t[6]?fe(o):Mt(o,0,255)),{r:i,g:n,b:o,a:e}}}function Ra(s){return s&&(s.a<255?`rgba(${s.r}, ${s.g}, ${s.b}, ${St(s.a)})`:`rgb(${s.r}, ${s.g}, ${s.b})`)}const us=s=>s<=.0031308?s*12.92:Math.pow(s,1/2.4)*1.055-.055,Gt=s=>s<=.04045?s/12.92:Math.pow((s+.055)/1.055,2.4);function Ea(s,t,e){const i=Gt(St(s.r)),n=Gt(St(s.g)),o=Gt(St(s.b));return{r:Ct(us(i+e*(Gt(St(t.r))-i))),g:Ct(us(n+e*(Gt(St(t.g))-n))),b:Ct(us(o+e*(Gt(St(t.b))-o))),a:s.a+e*(t.a-s.a)}}function Fe(s,t,e){if(s){let i=Ws(s);i[t]=Math.max(0,Math.min(i[t]+i[t]*e,t===0?360:1)),i=js(i),s.r=i[0],s.g=i[1],s.b=i[2]}}function $n(s,t){return s&&Object.assign(t||{},s)}function hi(s){var t={r:0,g:0,b:0,a:255};return Array.isArray(s)?s.length>=3&&(t={r:s[0],g:s[1],b:s[2],a:255},s.length>3&&(t.a=Ct(s[3]))):(t=$n(s,{r:0,g:0,b:0,a:1}),t.a=Ct(t.a)),t}function Fa(s){return s.charAt(0)==="r"?Ia(s):Ca(s)}class Se{constructor(t){if(t instanceof Se)return t;const e=typeof t;let i;e==="object"?i=hi(t):e==="string"&&(i=_a(t)||Ta(t)||Fa(t)),this._rgb=i,this._valid=!!i}get valid(){return this._valid}get rgb(){var t=$n(this._rgb);return t&&(t.a=St(t.a)),t}set rgb(t){this._rgb=hi(t)}rgbString(){return this._valid?Ra(this._rgb):void 0}hexString(){return this._valid?ya(this._rgb):void 0}hslString(){return this._valid?Oa(this._rgb):void 0}mix(t,e){if(t){const i=this.rgb,n=t.rgb;let o;const r=e===o?.5:e,a=2*r-1,l=i.a-n.a,c=((a*l===-1?a:(a+l)/(1+a*l))+1)/2;o=1-c,i.r=255&c*i.r+o*n.r+.5,i.g=255&c*i.g+o*n.g+.5,i.b=255&c*i.b+o*n.b+.5,i.a=r*i.a+(1-r)*n.a,this.rgb=i}return this}interpolate(t,e){return t&&(this._rgb=Ea(this._rgb,t._rgb,e)),this}clone(){return new Se(this.rgb)}alpha(t){return this._rgb.a=Ct(t),this}clearer(t){const e=this._rgb;return e.a*=1-t,this}greyscale(){const t=this._rgb,e=Oe(t.r*.3+t.g*.59+t.b*.11);return t.r=t.g=t.b=e,this}opaquer(t){const e=this._rgb;return e.a*=1+t,this}negate(){const t=this._rgb;return t.r=255-t.r,t.g=255-t.g,t.b=255-t.b,this}lighten(t){return Fe(this._rgb,2,t),this}darken(t){return Fe(this._rgb,2,-t),this}saturate(t){return Fe(this._rgb,1,t),this}desaturate(t){return Fe(this._rgb,1,-t),this}rotate(t){return Da(this._rgb,t),this}}/*! + * Chart.js v4.4.4 + * https://www.chartjs.org + * (c) 2024 Chart.js Contributors + * Released under the MIT License + */function xt(){}const za=(()=>{let s=0;return()=>s++})();function z(s){return s===null||typeof s>"u"}function Y(s){if(Array.isArray&&Array.isArray(s))return!0;const t=Object.prototype.toString.call(s);return t.slice(0,7)==="[object"&&t.slice(-6)==="Array]"}function R(s){return s!==null&&Object.prototype.toString.call(s)==="[object Object]"}function ct(s){return(typeof s=="number"||s instanceof Number)&&isFinite(+s)}function ut(s,t){return ct(s)?s:t}function L(s,t){return typeof s>"u"?t:s}const Ba=(s,t)=>typeof s=="string"&&s.endsWith("%")?parseFloat(s)/100*t:+s;function B(s,t,e){if(s&&typeof s.call=="function")return s.apply(e,t)}function E(s,t,e,i){let n,o,r;if(Y(s))for(o=s.length,n=0;ns,x:s=>s.x,y:s=>s.y};function Ha(s){const t=s.split("."),e=[];let i="";for(const n of t)i+=n,i.endsWith("\\")?i=i.slice(0,-1)+".":(e.push(i),i="");return e}function Wa(s){const t=Ha(s);return e=>{for(const i of t){if(i==="")break;e=e&&e[i]}return e}}function te(s,t){return(di[t]||(di[t]=Wa(t)))(s)}function Us(s){return s.charAt(0).toUpperCase()+s.slice(1)}const ke=s=>typeof s<"u",Dt=s=>typeof s=="function",ui=(s,t)=>{if(s.size!==t.size)return!1;for(const e of s)if(!t.has(e))return!1;return!0};function Va(s){return s.type==="mouseup"||s.type==="click"||s.type==="contextmenu"}const X=Math.PI,mt=2*X,ja=mt+X,es=Number.POSITIVE_INFINITY,Ua=X/180,dt=X/2,It=X/4,fi=X*2/3,Ds=Math.log10,bt=Math.sign;function _e(s,t,e){return Math.abs(s-t)n-o).pop(),t}function Me(s){return!isNaN(parseFloat(s))&&isFinite(s)}function Ka(s,t){const e=Math.round(s);return e-t<=s&&e+t>=s}function Xa(s,t,e){let i,n,o;for(i=0,n=s.length;il&&c=Math.min(t,e)-i&&s<=Math.max(t,e)+i}function Ys(s,t,e){e=e||(r=>s[r]1;)o=n+i>>1,e(o)?n=o:i=o;return{lo:n,hi:i}}const Ht=(s,t,e,i)=>Ys(s,e,i?n=>{const o=s[n][t];return os[n][t]Ys(s,e,i=>s[i][t]>=e);function tl(s,t,e){let i=0,n=s.length;for(;ii&&s[n-1]>e;)n--;return i>0||n{const i="_onData"+Us(e),n=s[e];Object.defineProperty(s,e,{configurable:!0,enumerable:!1,value(...o){const r=n.apply(this,o);return s._chartjs.listeners.forEach(a=>{typeof a[i]=="function"&&a[i](...o)}),r}})})}function mi(s,t){const e=s._chartjs;if(!e)return;const i=e.listeners,n=i.indexOf(t);n!==-1&&i.splice(n,1),!(i.length>0)&&(Wn.forEach(o=>{delete s[o]}),delete s._chartjs)}function Vn(s){const t=new Set(s);return t.size===s.length?s:Array.from(t)}const jn=function(){return typeof window>"u"?function(s){return s()}:window.requestAnimationFrame}();function Un(s,t){let e=[],i=!1;return function(...n){e=n,i||(i=!0,jn.call(window,()=>{i=!1,s.apply(t,e)}))}}function sl(s,t){let e;return function(...i){return t?(clearTimeout(e),e=setTimeout(s,t,i)):s.apply(this,i),t}}const Ks=s=>s==="start"?"left":s==="end"?"right":"center",J=(s,t,e)=>s==="start"?t:s==="end"?e:(t+e)/2,il=(s,t,e,i)=>s===(i?"left":"right")?e:s==="center"?(t+e)/2:t;function nl(s,t,e){const i=t.length;let n=0,o=i;if(s._sorted){const{iScale:r,_parsed:a}=s,l=r.axis,{min:c,max:h,minDefined:d,maxDefined:u}=r.getUserBounds();d&&(n=it(Math.min(Ht(a,l,c).lo,e?i:Ht(t,l,r.getPixelForValue(c)).lo),0,i-1)),u?o=it(Math.max(Ht(a,r.axis,h,!0).hi+1,e?0:Ht(t,l,r.getPixelForValue(h),!0).hi+1),n,i)-n:o=i-n}return{start:n,count:o}}function ol(s){const{xScale:t,yScale:e,_scaleRanges:i}=s,n={xmin:t.min,xmax:t.max,ymin:e.min,ymax:e.max};if(!i)return s._scaleRanges=n,!0;const o=i.xmin!==t.min||i.xmax!==t.max||i.ymin!==e.min||i.ymax!==e.max;return Object.assign(i,n),o}const ze=s=>s===0||s===1,bi=(s,t,e)=>-(Math.pow(2,10*(s-=1))*Math.sin((s-t)*mt/e)),_i=(s,t,e)=>Math.pow(2,-10*s)*Math.sin((s-t)*mt/e)+1,xe={linear:s=>s,easeInQuad:s=>s*s,easeOutQuad:s=>-s*(s-2),easeInOutQuad:s=>(s/=.5)<1?.5*s*s:-.5*(--s*(s-2)-1),easeInCubic:s=>s*s*s,easeOutCubic:s=>(s-=1)*s*s+1,easeInOutCubic:s=>(s/=.5)<1?.5*s*s*s:.5*((s-=2)*s*s+2),easeInQuart:s=>s*s*s*s,easeOutQuart:s=>-((s-=1)*s*s*s-1),easeInOutQuart:s=>(s/=.5)<1?.5*s*s*s*s:-.5*((s-=2)*s*s*s-2),easeInQuint:s=>s*s*s*s*s,easeOutQuint:s=>(s-=1)*s*s*s*s+1,easeInOutQuint:s=>(s/=.5)<1?.5*s*s*s*s*s:.5*((s-=2)*s*s*s*s+2),easeInSine:s=>-Math.cos(s*dt)+1,easeOutSine:s=>Math.sin(s*dt),easeInOutSine:s=>-.5*(Math.cos(X*s)-1),easeInExpo:s=>s===0?0:Math.pow(2,10*(s-1)),easeOutExpo:s=>s===1?1:-Math.pow(2,-10*s)+1,easeInOutExpo:s=>ze(s)?s:s<.5?.5*Math.pow(2,10*(s*2-1)):.5*(-Math.pow(2,-10*(s*2-1))+2),easeInCirc:s=>s>=1?s:-(Math.sqrt(1-s*s)-1),easeOutCirc:s=>Math.sqrt(1-(s-=1)*s),easeInOutCirc:s=>(s/=.5)<1?-.5*(Math.sqrt(1-s*s)-1):.5*(Math.sqrt(1-(s-=2)*s)+1),easeInElastic:s=>ze(s)?s:bi(s,.075,.3),easeOutElastic:s=>ze(s)?s:_i(s,.075,.3),easeInOutElastic(s){return ze(s)?s:s<.5?.5*bi(s*2,.1125,.45):.5+.5*_i(s*2-1,.1125,.45)},easeInBack(s){return s*s*((1.70158+1)*s-1.70158)},easeOutBack(s){return(s-=1)*s*((1.70158+1)*s+1.70158)+1},easeInOutBack(s){let t=1.70158;return(s/=.5)<1?.5*(s*s*(((t*=1.525)+1)*s-t)):.5*((s-=2)*s*(((t*=1.525)+1)*s+t)+2)},easeInBounce:s=>1-xe.easeOutBounce(1-s),easeOutBounce(s){return s<1/2.75?7.5625*s*s:s<2/2.75?7.5625*(s-=1.5/2.75)*s+.75:s<2.5/2.75?7.5625*(s-=2.25/2.75)*s+.9375:7.5625*(s-=2.625/2.75)*s+.984375},easeInOutBounce:s=>s<.5?xe.easeInBounce(s*2)*.5:xe.easeOutBounce(s*2-1)*.5+.5};function Xs(s){if(s&&typeof s=="object"){const t=s.toString();return t==="[object CanvasPattern]"||t==="[object CanvasGradient]"}return!1}function xi(s){return Xs(s)?s:new Se(s)}function fs(s){return Xs(s)?s:new Se(s).saturate(.5).darken(.1).hexString()}const rl=["x","y","borderWidth","radius","tension"],al=["color","borderColor","backgroundColor"];function ll(s){s.set("animation",{delay:void 0,duration:1e3,easing:"easeOutQuart",fn:void 0,from:void 0,loop:void 0,to:void 0,type:void 0}),s.describe("animation",{_fallback:!1,_indexable:!1,_scriptable:t=>t!=="onProgress"&&t!=="onComplete"&&t!=="fn"}),s.set("animations",{colors:{type:"color",properties:al},numbers:{type:"number",properties:rl}}),s.describe("animations",{_fallback:"animation"}),s.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:t=>t|0}}}})}function cl(s){s.set("layout",{autoPadding:!0,padding:{top:0,right:0,bottom:0,left:0}})}const yi=new Map;function hl(s,t){t=t||{};const e=s+JSON.stringify(t);let i=yi.get(e);return i||(i=new Intl.NumberFormat(s,t),yi.set(e,i)),i}function Yn(s,t,e){return hl(t,e).format(s)}const Kn={values(s){return Y(s)?s:""+s},numeric(s,t,e){if(s===0)return"0";const i=this.chart.options.locale;let n,o=s;if(e.length>1){const c=Math.max(Math.abs(e[0].value),Math.abs(e[e.length-1].value));(c<1e-4||c>1e15)&&(n="scientific"),o=dl(s,e)}const r=Ds(Math.abs(o)),a=isNaN(r)?1:Math.max(Math.min(-1*Math.floor(r),20),0),l={notation:n,minimumFractionDigits:a,maximumFractionDigits:a};return Object.assign(l,this.options.ticks.format),Yn(s,i,l)},logarithmic(s,t,e){if(s===0)return"0";const i=e[t].significand||s/Math.pow(10,Math.floor(Ds(s)));return[1,2,3,5,10,15].includes(i)||t>.8*e.length?Kn.numeric.call(this,s,t,e):""}};function dl(s,t){let e=t.length>3?t[2].value-t[1].value:t[1].value-t[0].value;return Math.abs(e)>=1&&s!==Math.floor(s)&&(e=s-Math.floor(s)),e}var Xn={formatters:Kn};function ul(s){s.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:(t,e)=>e.lineWidth,tickColor:(t,e)=>e.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:Xn.formatters.values,minor:{},major:{},align:"center",crossAlign:"near",showLabelBackdrop:!1,backdropColor:"rgba(255, 255, 255, 0.75)",backdropPadding:2}}),s.route("scale.ticks","color","","color"),s.route("scale.grid","color","","borderColor"),s.route("scale.border","color","","borderColor"),s.route("scale.title","color","","color"),s.describe("scale",{_fallback:!1,_scriptable:t=>!t.startsWith("before")&&!t.startsWith("after")&&t!=="callback"&&t!=="parser",_indexable:t=>t!=="borderDash"&&t!=="tickBorderDash"&&t!=="dash"}),s.describe("scales",{_fallback:"scale"}),s.describe("scale.ticks",{_scriptable:t=>t!=="backdropPadding"&&t!=="callback",_indexable:t=>t!=="backdropPadding"})}const Ut=Object.create(null),As=Object.create(null);function ye(s,t){if(!t)return s;const e=t.split(".");for(let i=0,n=e.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,n)=>fs(n.backgroundColor),this.hoverBorderColor=(i,n)=>fs(n.borderColor),this.hoverColor=(i,n)=>fs(n.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(t),this.apply(e)}set(t,e){return gs(this,t,e)}get(t){return ye(this,t)}describe(t,e){return gs(As,t,e)}override(t,e){return gs(Ut,t,e)}route(t,e,i,n){const o=ye(this,t),r=ye(this,i),a="_"+e;Object.defineProperties(o,{[a]:{value:o[e],writable:!0},[e]:{enumerable:!0,get(){const l=this[a],c=r[n];return R(l)?Object.assign({},c,l):L(l,c)},set(l){this[a]=l}}})}apply(t){t.forEach(e=>e(this))}}var j=new fl({_scriptable:s=>!s.startsWith("on"),_indexable:s=>s!=="events",hover:{_fallback:"interaction"},interaction:{_scriptable:!1,_indexable:!1}},[ll,cl,ul]);function gl(s){return!s||z(s.size)||z(s.family)?null:(s.style?s.style+" ":"")+(s.weight?s.weight+" ":"")+s.size+"px "+s.family}function vi(s,t,e,i,n){let o=t[n];return o||(o=t[n]=s.measureText(n).width,e.push(n)),o>i&&(i=o),i}function Rt(s,t,e){const i=s.currentDevicePixelRatio,n=e!==0?Math.max(e/2,.5):0;return Math.round((t-n)*i)/i+n}function Si(s,t){!t&&!s||(t=t||s.getContext("2d"),t.save(),t.resetTransform(),t.clearRect(0,0,s.width,s.height),t.restore())}function Ts(s,t,e,i){Gn(s,t,e,i,null)}function Gn(s,t,e,i,n){let o,r,a,l,c,h,d,u;const f=t.pointStyle,g=t.rotation,m=t.radius;let b=(g||0)*Ua;if(f&&typeof f=="object"&&(o=f.toString(),o==="[object HTMLImageElement]"||o==="[object HTMLCanvasElement]")){s.save(),s.translate(e,i),s.rotate(b),s.drawImage(f,-f.width/2,-f.height/2,f.width,f.height),s.restore();return}if(!(isNaN(m)||m<=0)){switch(s.beginPath(),f){default:n?s.ellipse(e,i,n/2,m,0,0,mt):s.arc(e,i,m,0,mt),s.closePath();break;case"triangle":h=n?n/2:m,s.moveTo(e+Math.sin(b)*h,i-Math.cos(b)*m),b+=fi,s.lineTo(e+Math.sin(b)*h,i-Math.cos(b)*m),b+=fi,s.lineTo(e+Math.sin(b)*h,i-Math.cos(b)*m),s.closePath();break;case"rectRounded":c=m*.516,l=m-c,r=Math.cos(b+It)*l,d=Math.cos(b+It)*(n?n/2-c:l),a=Math.sin(b+It)*l,u=Math.sin(b+It)*(n?n/2-c:l),s.arc(e-d,i-a,c,b-X,b-dt),s.arc(e+u,i-r,c,b-dt,b),s.arc(e+d,i+a,c,b,b+dt),s.arc(e-u,i+r,c,b+dt,b+X),s.closePath();break;case"rect":if(!g){l=Math.SQRT1_2*m,h=n?n/2:l,s.rect(e-h,i-l,2*h,2*l);break}b+=It;case"rectRot":d=Math.cos(b)*(n?n/2:m),r=Math.cos(b)*m,a=Math.sin(b)*m,u=Math.sin(b)*(n?n/2:m),s.moveTo(e-d,i-a),s.lineTo(e+u,i-r),s.lineTo(e+d,i+a),s.lineTo(e-u,i+r),s.closePath();break;case"crossRot":b+=It;case"cross":d=Math.cos(b)*(n?n/2:m),r=Math.cos(b)*m,a=Math.sin(b)*m,u=Math.sin(b)*(n?n/2:m),s.moveTo(e-d,i-a),s.lineTo(e+d,i+a),s.moveTo(e+u,i-r),s.lineTo(e-u,i+r);break;case"star":d=Math.cos(b)*(n?n/2:m),r=Math.cos(b)*m,a=Math.sin(b)*m,u=Math.sin(b)*(n?n/2:m),s.moveTo(e-d,i-a),s.lineTo(e+d,i+a),s.moveTo(e+u,i-r),s.lineTo(e-u,i+r),b+=It,d=Math.cos(b)*(n?n/2:m),r=Math.cos(b)*m,a=Math.sin(b)*m,u=Math.sin(b)*(n?n/2:m),s.moveTo(e-d,i-a),s.lineTo(e+d,i+a),s.moveTo(e+u,i-r),s.lineTo(e-u,i+r);break;case"line":r=n?n/2:Math.cos(b)*m,a=Math.sin(b)*m,s.moveTo(e-r,i-a),s.lineTo(e+r,i+a);break;case"dash":s.moveTo(e,i),s.lineTo(e+Math.cos(b)*(n?n/2:m),i+Math.sin(b)*m);break;case!1:s.closePath();break}s.fill(),t.borderWidth>0&&s.stroke()}}function Pe(s,t,e){return e=e||.5,!t||s&&s.x>t.left-e&&s.xt.top-e&&s.y0&&o.strokeColor!=="";let l,c;for(s.save(),s.font=n.string,bl(s,o),l=0;l+s||0;function Jn(s,t){const e={},i=R(t),n=i?Object.keys(t):t,o=R(s)?i?r=>L(s[r],s[t[r]]):r=>s[r]:()=>s;for(const r of n)e[r]=wl(o(r));return e}function qn(s){return Jn(s,{top:"y",right:"x",bottom:"y",left:"x"})}function Qt(s){return Jn(s,["topLeft","topRight","bottomLeft","bottomRight"])}function ht(s){const t=qn(s);return t.width=t.left+t.right,t.height=t.top+t.bottom,t}function q(s,t){s=s||{},t=t||j.font;let e=L(s.size,t.size);typeof e=="string"&&(e=parseInt(e,10));let i=L(s.style,t.style);i&&!(""+i).match(vl)&&(console.warn('Invalid font style specified: "'+i+'"'),i=void 0);const n={family:L(s.family,t.family),lineHeight:Sl(L(s.lineHeight,t.lineHeight),e),size:e,style:i,weight:L(s.weight,t.weight),string:""};return n.string=gl(n),n}function Be(s,t,e,i){let n,o,r;for(n=0,o=s.length;ne&&a===0?0:a+l;return{min:r(i,-Math.abs(o)),max:r(n,o)}}function Yt(s,t){return Object.assign(Object.create(s),t)}function qs(s,t=[""],e,i,n=()=>s[0]){const o=e||s;typeof i>"u"&&(i=eo("_fallback",s));const r={[Symbol.toStringTag]:"Object",_cacheable:!0,_scopes:s,_rootScopes:o,_fallback:i,_getTarget:n,override:a=>qs([a,...s],t,o,i)};return new Proxy(r,{deleteProperty(a,l){return delete a[l],delete a._keys,delete s[0][l],!0},get(a,l){return Zn(a,l,()=>Ll(l,t,s,a))},getOwnPropertyDescriptor(a,l){return Reflect.getOwnPropertyDescriptor(a._scopes[0],l)},getPrototypeOf(){return Reflect.getPrototypeOf(s[0])},has(a,l){return ki(a).includes(l)},ownKeys(a){return ki(a)},set(a,l,c){const h=a._storage||(a._storage=n());return a[l]=h[l]=c,delete a._keys,!0}})}function ee(s,t,e,i){const n={_cacheable:!1,_proxy:s,_context:t,_subProxy:e,_stack:new Set,_descriptors:Qn(s,i),setContext:o=>ee(s,o,e,i),override:o=>ee(s.override(o),t,e,i)};return new Proxy(n,{deleteProperty(o,r){return delete o[r],delete s[r],!0},get(o,r,a){return Zn(o,r,()=>Pl(o,r,a))},getOwnPropertyDescriptor(o,r){return o._descriptors.allKeys?Reflect.has(s,r)?{enumerable:!0,configurable:!0}:void 0:Reflect.getOwnPropertyDescriptor(s,r)},getPrototypeOf(){return Reflect.getPrototypeOf(s)},has(o,r){return Reflect.has(s,r)},ownKeys(){return Reflect.ownKeys(s)},set(o,r,a){return s[r]=a,delete o[r],!0}})}function Qn(s,t={scriptable:!0,indexable:!0}){const{_scriptable:e=t.scriptable,_indexable:i=t.indexable,_allKeys:n=t.allKeys}=s;return{allKeys:n,scriptable:e,indexable:i,isScriptable:Dt(e)?e:()=>e,isIndexable:Dt(i)?i:()=>i}}const Ml=(s,t)=>s?s+Us(t):t,Qs=(s,t)=>R(t)&&s!=="adapters"&&(Object.getPrototypeOf(t)===null||t.constructor===Object);function Zn(s,t,e){if(Object.prototype.hasOwnProperty.call(s,t)||t==="constructor")return s[t];const i=e();return s[t]=i,i}function Pl(s,t,e){const{_proxy:i,_context:n,_subProxy:o,_descriptors:r}=s;let a=i[t];return Dt(a)&&r.isScriptable(t)&&(a=Cl(t,a,s,e)),Y(a)&&a.length&&(a=Dl(t,a,s,r.isIndexable)),Qs(t,a)&&(a=ee(a,n,o&&o[t],r)),a}function Cl(s,t,e,i){const{_proxy:n,_context:o,_subProxy:r,_stack:a}=e;if(a.has(s))throw new Error("Recursion detected: "+Array.from(a).join("->")+"->"+s);a.add(s);let l=t(o,r||i);return a.delete(s),Qs(s,l)&&(l=Zs(n._scopes,n,s,l)),l}function Dl(s,t,e,i){const{_proxy:n,_context:o,_subProxy:r,_descriptors:a}=e;if(typeof o.index<"u"&&i(s))return t[o.index%t.length];if(R(t[0])){const l=t,c=n._scopes.filter(h=>h!==l);t=[];for(const h of l){const d=Zs(c,n,s,h);t.push(ee(d,o,r&&r[s],a))}}return t}function to(s,t,e){return Dt(s)?s(t,e):s}const Ol=(s,t)=>s===!0?t:typeof s=="string"?te(t,s):void 0;function Al(s,t,e,i,n){for(const o of t){const r=Ol(e,o);if(r){s.add(r);const a=to(r._fallback,e,n);if(typeof a<"u"&&a!==e&&a!==i)return a}else if(r===!1&&typeof i<"u"&&e!==i)return null}return!1}function Zs(s,t,e,i){const n=t._rootScopes,o=to(t._fallback,e,i),r=[...s,...n],a=new Set;a.add(i);let l=wi(a,r,e,o||e,i);return l===null||typeof o<"u"&&o!==e&&(l=wi(a,r,o,l,i),l===null)?!1:qs(Array.from(a),[""],n,o,()=>Tl(t,e,i))}function wi(s,t,e,i,n){for(;e;)e=Al(s,t,e,i,n);return e}function Tl(s,t,e){const i=s._getTarget();t in i||(i[t]={});const n=i[t];return Y(n)&&R(e)?e:n||{}}function Ll(s,t,e,i){let n;for(const o of t)if(n=eo(Ml(o,s),e),typeof n<"u")return Qs(s,n)?Zs(e,i,s,n):n}function eo(s,t){for(const e of t){if(!e)continue;const i=e[s];if(typeof i<"u")return i}}function ki(s){let t=s._keys;return t||(t=s._keys=Il(s._scopes)),t}function Il(s){const t=new Set;for(const e of s)for(const i of Object.keys(e).filter(n=>!n.startsWith("_")))t.add(i);return Array.from(t)}const Rl=Number.EPSILON||1e-14,se=(s,t)=>ts==="x"?"y":"x";function El(s,t,e,i){const n=s.skip?t:s,o=t,r=e.skip?t:e,a=Os(o,n),l=Os(r,o);let c=a/(a+l),h=l/(a+l);c=isNaN(c)?0:c,h=isNaN(h)?0:h;const d=i*c,u=i*h;return{previous:{x:o.x-d*(r.x-n.x),y:o.y-d*(r.y-n.y)},next:{x:o.x+u*(r.x-n.x),y:o.y+u*(r.y-n.y)}}}function Fl(s,t,e){const i=s.length;let n,o,r,a,l,c=se(s,0);for(let h=0;h!c.skip)),t.cubicInterpolationMode==="monotone")Bl(s,n);else{let c=i?s[s.length-1]:s[0];for(o=0,r=s.length;os.ownerDocument.defaultView.getComputedStyle(s,null);function Hl(s,t){return ls(s).getPropertyValue(t)}const Wl=["top","right","bottom","left"];function jt(s,t,e){const i={};e=e?"-"+e:"";for(let n=0;n<4;n++){const o=Wl[n];i[o]=parseFloat(s[t+"-"+o+e])||0}return i.width=i.left+i.right,i.height=i.top+i.bottom,i}const Vl=(s,t,e)=>(s>0||t>0)&&(!e||!e.shadowRoot);function jl(s,t){const e=s.touches,i=e&&e.length?e[0]:s,{offsetX:n,offsetY:o}=i;let r=!1,a,l;if(Vl(n,o,s.target))a=n,l=o;else{const c=t.getBoundingClientRect();a=i.clientX-c.left,l=i.clientY-c.top,r=!0}return{x:a,y:l,box:r}}function Ft(s,t){if("native"in s)return s;const{canvas:e,currentDevicePixelRatio:i}=t,n=ls(e),o=n.boxSizing==="border-box",r=jt(n,"padding"),a=jt(n,"border","width"),{x:l,y:c,box:h}=jl(s,e),d=r.left+(h&&a.left),u=r.top+(h&&a.top);let{width:f,height:g}=t;return o&&(f-=r.width+a.width,g-=r.height+a.height),{x:Math.round((l-d)/f*e.width/i),y:Math.round((c-u)/g*e.height/i)}}function Ul(s,t,e){let i,n;if(t===void 0||e===void 0){const o=s&&ei(s);if(!o)t=s.clientWidth,e=s.clientHeight;else{const r=o.getBoundingClientRect(),a=ls(o),l=jt(a,"border","width"),c=jt(a,"padding");t=r.width-c.width-l.width,e=r.height-c.height-l.height,i=is(a.maxWidth,o,"clientWidth"),n=is(a.maxHeight,o,"clientHeight")}}return{width:t,height:e,maxWidth:i||es,maxHeight:n||es}}const Ne=s=>Math.round(s*10)/10;function Yl(s,t,e,i){const n=ls(s),o=jt(n,"margin"),r=is(n.maxWidth,s,"clientWidth")||es,a=is(n.maxHeight,s,"clientHeight")||es,l=Ul(s,t,e);let{width:c,height:h}=l;if(n.boxSizing==="content-box"){const u=jt(n,"border","width"),f=jt(n,"padding");c-=f.width+u.width,h-=f.height+u.height}return c=Math.max(0,c-o.width),h=Math.max(0,i?c/i:h-o.height),c=Ne(Math.min(c,r,l.maxWidth)),h=Ne(Math.min(h,a,l.maxHeight)),c&&!h&&(h=Ne(c/2)),(t!==void 0||e!==void 0)&&i&&l.height&&h>l.height&&(h=l.height,c=Ne(Math.floor(h*i))),{width:c,height:h}}function Mi(s,t,e){const i=t||1,n=Math.floor(s.height*i),o=Math.floor(s.width*i);s.height=Math.floor(s.height),s.width=Math.floor(s.width);const r=s.canvas;return r.style&&(e||!r.style.height&&!r.style.width)&&(r.style.height=`${s.height}px`,r.style.width=`${s.width}px`),s.currentDevicePixelRatio!==i||r.height!==n||r.width!==o?(s.currentDevicePixelRatio=i,r.height=n,r.width=o,s.ctx.setTransform(i,0,0,i,0,0),!0):!1}const Kl=function(){let s=!1;try{const t={get passive(){return s=!0,!1}};ti()&&(window.addEventListener("test",null,t),window.removeEventListener("test",null,t))}catch{}return s}();function Pi(s,t){const e=Hl(s,t),i=e&&e.match(/^(\d+)(\.\d+)?px$/);return i?+i[1]:void 0}function zt(s,t,e,i){return{x:s.x+e*(t.x-s.x),y:s.y+e*(t.y-s.y)}}function Xl(s,t,e,i){return{x:s.x+e*(t.x-s.x),y:i==="middle"?e<.5?s.y:t.y:i==="after"?e<1?s.y:t.y:e>0?t.y:s.y}}function Gl(s,t,e,i){const n={x:s.cp2x,y:s.cp2y},o={x:t.cp1x,y:t.cp1y},r=zt(s,n,e),a=zt(n,o,e),l=zt(o,t,e),c=zt(r,a,e),h=zt(a,l,e);return zt(c,h,e)}const Jl=function(s,t){return{x(e){return s+s+t-e},setWidth(e){t=e},textAlign(e){return e==="center"?e:e==="right"?"left":"right"},xPlus(e,i){return e-i},leftForLtr(e,i){return e-i}}},ql=function(){return{x(s){return s},setWidth(s){},textAlign(s){return s},xPlus(s,t){return s+t},leftForLtr(s,t){return s}}};function Zt(s,t,e){return s?Jl(t,e):ql()}function io(s,t){let e,i;(t==="ltr"||t==="rtl")&&(e=s.canvas.style,i=[e.getPropertyValue("direction"),e.getPropertyPriority("direction")],e.setProperty("direction",t,"important"),s.prevTextDirection=i)}function no(s,t){t!==void 0&&(delete s.prevTextDirection,s.canvas.style.setProperty("direction",t[0],t[1]))}function oo(s){return s==="angle"?{between:Hn,compare:qa,normalize:kt}:{between:Nt,compare:(t,e)=>t-e,normalize:t=>t}}function Ci({start:s,end:t,count:e,loop:i,style:n}){return{start:s%e,end:t%e,loop:i&&(t-s+1)%e===0,style:n}}function Ql(s,t,e){const{property:i,start:n,end:o}=e,{between:r,normalize:a}=oo(i),l=t.length;let{start:c,end:h,loop:d}=s,u,f;if(d){for(c+=l,h+=l,u=0,f=l;ul(n,S,_)&&a(n,S)!==0,v=()=>a(o,_)===0||l(o,S,_),x=()=>m||M(),w=()=>!m||v();for(let k=h,C=h;k<=d;++k)y=t[k%r],!y.skip&&(_=c(y[i]),_!==S&&(m=l(_,n,o),b===null&&x()&&(b=a(_,n)===0?k:C),b!==null&&w()&&(g.push(Ci({start:b,end:k,loop:u,count:r,style:f})),b=null),C=k,S=_));return b!==null&&g.push(Ci({start:b,end:d,loop:u,count:r,style:f})),g}function tc(s,t){const e=[],i=s.segments;for(let n=0;nn&&s[o%t].skip;)o--;return o%=t,{start:n,end:o}}function sc(s,t,e,i){const n=s.length,o=[];let r=t,a=s[t],l;for(l=t+1;l<=e;++l){const c=s[l%n];c.skip||c.stop?a.skip||(i=!1,o.push({start:t%n,end:(l-1)%n,loop:i}),t=r=c.stop?l:null):(r=l,a.skip&&(t=l)),a=c}return r!==null&&o.push({start:t%n,end:r%n,loop:i}),o}function ic(s,t){const e=s.points,i=s.options.spanGaps,n=e.length;if(!n)return[];const o=!!s._loop,{start:r,end:a}=ec(e,n,o,i);if(i===!0)return Di(s,[{start:r,end:a,loop:o}],e,t);const l=aa({chart:t,initial:e.initial,numSteps:r,currentStep:Math.min(i-e.start,r)}))}_refresh(){this._request||(this._running=!0,this._request=jn.call(window,()=>{this._update(),this._request=null,this._running&&this._refresh()}))}_update(t=Date.now()){let e=0;this._charts.forEach((i,n)=>{if(!i.running||!i.items.length)return;const o=i.items;let r=o.length-1,a=!1,l;for(;r>=0;--r)l=o[r],l._active?(l._total>i.duration&&(i.duration=l._total),l.tick(t),a=!0):(o[r]=o[o.length-1],o.pop());a&&(n.draw(),this._notify(n,i,t,"progress")),o.length||(i.running=!1,this._notify(n,i,t,"complete"),i.initial=!1),e+=o.length}),this._lastDate=t,e===0&&(this._running=!1)}_getAnims(t){const e=this._charts;let i=e.get(t);return i||(i={running:!1,initial:!0,items:[],listeners:{complete:[],progress:[]}},e.set(t,i)),i}listen(t,e,i){this._getAnims(t).listeners[e].push(i)}add(t,e){!e||!e.length||this._getAnims(t).items.push(...e)}has(t){return this._getAnims(t).items.length>0}start(t){const e=this._charts.get(t);e&&(e.running=!0,e.start=Date.now(),e.duration=e.items.reduce((i,n)=>Math.max(i,n._duration),0),this._refresh())}running(t){if(!this._running)return!1;const e=this._charts.get(t);return!(!e||!e.running||!e.items.length)}stop(t){const e=this._charts.get(t);if(!e||!e.items.length)return;const i=e.items;let n=i.length-1;for(;n>=0;--n)i[n].cancel();e.items=[],this._notify(t,e,Date.now(),"complete")}remove(t){return this._charts.delete(t)}}var yt=new rc;const Ai="transparent",ac={boolean(s,t,e){return e>.5?t:s},color(s,t,e){const i=xi(s||Ai),n=i.valid&&xi(t||Ai);return n&&n.valid?n.mix(i,e).hexString():t},number(s,t,e){return s+(t-s)*e}};class lc{constructor(t,e,i,n){const o=e[i];n=Be([t.to,n,o,t.from]);const r=Be([t.from,o,n]);this._active=!0,this._fn=t.fn||ac[t.type||typeof r],this._easing=xe[t.easing]||xe.linear,this._start=Math.floor(Date.now()+(t.delay||0)),this._duration=this._total=Math.floor(t.duration),this._loop=!!t.loop,this._target=e,this._prop=i,this._from=r,this._to=n,this._promises=void 0}active(){return this._active}update(t,e,i){if(this._active){this._notify(!1);const n=this._target[this._prop],o=i-this._start,r=this._duration-o;this._start=i,this._duration=Math.floor(Math.max(r,t.duration)),this._total+=o,this._loop=!!t.loop,this._to=Be([t.to,e,n,t.from]),this._from=Be([t.from,n,e])}}cancel(){this._active&&(this.tick(Date.now()),this._active=!1,this._notify(!1))}tick(t){const e=t-this._start,i=this._duration,n=this._prop,o=this._from,r=this._loop,a=this._to;let l;if(this._active=o!==a&&(r||e1?2-l:l,l=this._easing(Math.min(1,Math.max(0,l))),this._target[n]=this._fn(o,a,l)}wait(){const t=this._promises||(this._promises=[]);return new Promise((e,i)=>{t.push({res:e,rej:i})})}_notify(t){const e=t?"res":"rej",i=this._promises||[];for(let n=0;n{const o=t[n];if(!R(o))return;const r={};for(const a of e)r[a]=o[a];(Y(o.properties)&&o.properties||[n]).forEach(a=>{(a===n||!i.has(a))&&i.set(a,r)})})}_animateOptions(t,e){const i=e.options,n=hc(t,i);if(!n)return[];const o=this._createAnimations(n,i);return i.$shared&&cc(t.options.$animations,i).then(()=>{t.options=i},()=>{}),o}_createAnimations(t,e){const i=this._properties,n=[],o=t.$animations||(t.$animations={}),r=Object.keys(e),a=Date.now();let l;for(l=r.length-1;l>=0;--l){const c=r[l];if(c.charAt(0)==="$")continue;if(c==="options"){n.push(...this._animateOptions(t,e));continue}const h=e[c];let d=o[c];const u=i.get(c);if(d)if(u&&d.active()){d.update(u,h,a);continue}else d.cancel();if(!u||!u.duration){t[c]=h;continue}o[c]=d=new lc(u,t,c,h),n.push(d)}return n}update(t,e){if(this._properties.size===0){Object.assign(t,e);return}const i=this._createAnimations(t,e);if(i.length)return yt.add(this._chart,i),!0}}function cc(s,t){const e=[],i=Object.keys(t);for(let n=0;n0||!e&&o<0)return n.index}return null}function Ei(s,t){const{chart:e,_cachedMeta:i}=s,n=e._stacks||(e._stacks={}),{iScale:o,vScale:r,index:a}=i,l=o.axis,c=r.axis,h=gc(o,r,i),d=t.length;let u;for(let f=0;fe[i].axis===t).shift()}function bc(s,t){return Yt(s,{active:!1,dataset:void 0,datasetIndex:t,index:t,mode:"default",type:"dataset"})}function _c(s,t,e){return Yt(s,{active:!1,dataIndex:t,parsed:void 0,raw:void 0,element:e,index:t,mode:"default",type:"data"})}function ae(s,t){const e=s.controller.index,i=s.vScale&&s.vScale.axis;if(i){t=t||s._parsed;for(const n of t){const o=n._stacks;if(!o||o[i]===void 0||o[i][e]===void 0)return;delete o[i][e],o[i]._visualValues!==void 0&&o[i]._visualValues[e]!==void 0&&delete o[i]._visualValues[e]}}}const ms=s=>s==="reset"||s==="none",Fi=(s,t)=>t?s:Object.assign({},s),xc=(s,t,e)=>s&&!t.hidden&&t._stacked&&{keys:ao(e,!0),values:null};class si{static defaults={};static datasetElementType=null;static dataElementType=null;constructor(t,e){this.chart=t,this._ctx=t.ctx,this.index=e,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 t=this._cachedMeta;this.configure(),this.linkScales(),t._stacked=Ii(t.vScale,t),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(t){this.index!==t&&ae(this._cachedMeta),this.index=t}linkScales(){const t=this.chart,e=this._cachedMeta,i=this.getDataset(),n=(d,u,f,g)=>d==="x"?u:d==="r"?g:f,o=e.xAxisID=L(i.xAxisID,ps(t,"x")),r=e.yAxisID=L(i.yAxisID,ps(t,"y")),a=e.rAxisID=L(i.rAxisID,ps(t,"r")),l=e.indexAxis,c=e.iAxisID=n(l,o,r,a),h=e.vAxisID=n(l,r,o,a);e.xScale=this.getScaleForId(o),e.yScale=this.getScaleForId(r),e.rScale=this.getScaleForId(a),e.iScale=this.getScaleForId(c),e.vScale=this.getScaleForId(h)}getDataset(){return this.chart.data.datasets[this.index]}getMeta(){return this.chart.getDatasetMeta(this.index)}getScaleForId(t){return this.chart.scales[t]}_getOtherScale(t){const e=this._cachedMeta;return t===e.iScale?e.vScale:e.iScale}reset(){this._update("reset")}_destroy(){const t=this._cachedMeta;this._data&&mi(this._data,this),t._stacked&&ae(t)}_dataCheck(){const t=this.getDataset(),e=t.data||(t.data=[]),i=this._data;if(R(e)){const n=this._cachedMeta;this._data=fc(e,n)}else if(i!==e){if(i){mi(i,this);const n=this._cachedMeta;ae(n),n._parsed=[]}e&&Object.isExtensible(e)&&el(e,this),this._syncList=[],this._data=e}}addElements(){const t=this._cachedMeta;this._dataCheck(),this.datasetElementType&&(t.dataset=new this.datasetElementType)}buildOrUpdateElements(t){const e=this._cachedMeta,i=this.getDataset();let n=!1;this._dataCheck();const o=e._stacked;e._stacked=Ii(e.vScale,e),e.stack!==i.stack&&(n=!0,ae(e),e.stack=i.stack),this._resyncElements(t),(n||o!==e._stacked)&&Ei(this,e._parsed)}configure(){const t=this.chart.config,e=t.datasetScopeKeys(this._type),i=t.getOptionScopes(this.getDataset(),e,!0);this.options=t.createResolver(i,this.getContext()),this._parsing=this.options.parsing,this._cachedDataOpts={}}parse(t,e){const{_cachedMeta:i,_data:n}=this,{iScale:o,_stacked:r}=i,a=o.axis;let l=t===0&&e===n.length?!0:i._sorted,c=t>0&&i._parsed[t-1],h,d,u;if(this._parsing===!1)i._parsed=n,i._sorted=!0,u=n;else{Y(n[t])?u=this.parseArrayData(i,n,t,e):R(n[t])?u=this.parseObjectData(i,n,t,e):u=this.parsePrimitiveData(i,n,t,e);const f=()=>d[a]===null||c&&d[a]m||d=0;--u)if(!g()){this.updateRangeFromParsed(c,t,f,l);break}}return c}getAllParsedValues(t){const e=this._cachedMeta._parsed,i=[];let n,o,r;for(n=0,o=e.length;n=0&&tthis.getContext(i,n,e),m=c.resolveNamedOptions(u,f,g,d);return m.$shared&&(m.$shared=l,o[r]=Object.freeze(Fi(m,l))),m}_resolveAnimations(t,e,i){const n=this.chart,o=this._cachedDataOpts,r=`animation-${e}`,a=o[r];if(a)return a;let l;if(n.options.animation!==!1){const h=this.chart.config,d=h.datasetAnimationScopeKeys(this._type,e),u=h.getOptionScopes(this.getDataset(),d);l=h.createResolver(u,this.getContext(t,i,e))}const c=new ro(n,l&&l.animations);return l&&l._cacheable&&(o[r]=Object.freeze(c)),c}getSharedOptions(t){if(t.$shared)return this._sharedOptions||(this._sharedOptions=Object.assign({},t))}includeOptions(t,e){return!e||ms(t)||this.chart._animationsDisabled}_getSharedOptions(t,e){const i=this.resolveDataElementOptions(t,e),n=this._sharedOptions,o=this.getSharedOptions(i),r=this.includeOptions(e,o)||o!==n;return this.updateSharedOptions(o,e,i),{sharedOptions:o,includeOptions:r}}updateElement(t,e,i,n){ms(n)?Object.assign(t,i):this._resolveAnimations(e,n).update(t,i)}updateSharedOptions(t,e,i){t&&!ms(e)&&this._resolveAnimations(void 0,e).update(t,i)}_setStyle(t,e,i,n){t.active=n;const o=this.getStyle(e,n);this._resolveAnimations(e,i,n).update(t,{options:!n&&this.getSharedOptions(o)||o})}removeHoverStyle(t,e,i){this._setStyle(t,i,"active",!1)}setHoverStyle(t,e,i){this._setStyle(t,i,"active",!0)}_removeDatasetHoverStyle(){const t=this._cachedMeta.dataset;t&&this._setStyle(t,void 0,"active",!1)}_setDatasetHoverStyle(){const t=this._cachedMeta.dataset;t&&this._setStyle(t,void 0,"active",!0)}_resyncElements(t){const e=this._data,i=this._cachedMeta.data;for(const[a,l,c]of this._syncList)this[a](l,c);this._syncList=[];const n=i.length,o=e.length,r=Math.min(o,n);r&&this.parse(0,r),o>n?this._insertElements(n,o-n,t):o{for(c.length+=e,a=c.length-1;a>=r;a--)c[a]=c[a-e]};for(l(o),a=t;an-o))}return s._cache.$bar}function vc(s){const t=s.iScale,e=yc(t,s.type);let i=t._length,n,o,r,a;const l=()=>{r===32767||r===-32768||(ke(a)&&(i=Math.min(i,Math.abs(r-a)||i)),a=r)};for(n=0,o=e.length;n0?n[s-1]:null,a=sMath.abs(a)&&(l=a,c=r),t[e.axis]=c,t._custom={barStart:l,barEnd:c,start:n,end:o,min:r,max:a}}function lo(s,t,e,i){return Y(s)?kc(s,t,e,i):t[e.axis]=e.parse(s,i),t}function zi(s,t,e,i){const n=s.iScale,o=s.vScale,r=n.getLabels(),a=n===o,l=[];let c,h,d,u;for(c=e,h=e+i;c=e?1:-1)}function Pc(s){let t,e,i,n,o;return s.horizontal?(t=s.base>s.x,e="left",i="right"):(t=s.baseh.controller.options.grouped),o=i.options.stacked,r=[],a=this._cachedMeta.controller.getParsed(e),l=a&&a[i.axis],c=h=>{const d=h._parsed.find(f=>f[i.axis]===l),u=d&&d[h.vScale.axis];if(z(u)||isNaN(u))return!0};for(const h of n)if(!(e!==void 0&&c(h))&&((o===!1||r.indexOf(h.stack)===-1||o===void 0&&h.stack===void 0)&&r.push(h.stack),h.index===t))break;return r.length||r.push(void 0),r}_getStackCount(t){return this._getStacks(void 0,t).length}_getStackIndex(t,e,i){const n=this._getStacks(t,i),o=e!==void 0?n.indexOf(e):-1;return o===-1?n.length-1:o}_getRuler(){const t=this.options,e=this._cachedMeta,i=e.iScale,n=[];let o,r;for(o=0,r=e.data.length;o0&&this.getParsed(e-1);for(let v=0;v=y){w.skip=!0;continue}const k=this.getParsed(v),C=z(k[f]),I=w[u]=r.getPixelForValue(k[u],v),A=w[f]=o||C?a.getBasePixel():a.getPixelForValue(l?this.applyStack(a,k,l):k[f],v);w.skip=isNaN(I)||isNaN(A)||C,w.stop=v>0&&Math.abs(k[u]-M[u])>b,m&&(w.parsed=k,w.raw=c.data[v]),d&&(w.options=h||this.resolveDataElementOptions(v,x.active?"active":n)),_||this.updateElement(x,v,w,n),M=k}}getMaxOverflow(){const t=this._cachedMeta,e=t.dataset,i=e.options&&e.options.borderWidth||0,n=t.data||[];if(!n.length)return i;const o=n[0].size(this.resolveDataElementOptions(0)),r=n[n.length-1].size(this.resolveDataElementOptions(n.length-1));return Math.max(i,o,r)/2}draw(){const t=this._cachedMeta;t.dataset.updateControlPoints(this.chart.chartArea,t.iScale.axis),super.draw()}}function Et(){throw new Error("This method is not implemented: Check that a complete date adapter is provided.")}class ii{static override(t){Object.assign(ii.prototype,t)}options;constructor(t){this.options=t||{}}init(){}formats(){return Et()}parse(){return Et()}format(){return Et()}add(){return Et()}diff(){return Et()}startOf(){return Et()}endOf(){return Et()}}var Ac={_date:ii};function Tc(s,t,e,i){const{controller:n,data:o,_sorted:r}=s,a=n._cachedMeta.iScale;if(a&&t===a.axis&&t!=="r"&&r&&o.length){const l=a._reversePixels?Za:Ht;if(i){if(n._sharedOptions){const c=o[0],h=typeof c.getRange=="function"&&c.getRange(t);if(h){const d=l(o,t,e-h),u=l(o,t,e+h);return{lo:d.lo,hi:u.hi}}}}else return l(o,t,e)}return{lo:0,hi:o.length-1}}function Ae(s,t,e,i,n){const o=s.getSortedVisibleDatasetMetas(),r=e[t];for(let a=0,l=o.length;a{l[r]&&l[r](t[e],n)&&(o.push({element:l,datasetIndex:c,index:h}),a=a||l.inRange(t.x,t.y,n))}),i&&!a?[]:o}var Ec={evaluateInteractionItems:Ae,modes:{index(s,t,e,i){const n=Ft(t,s),o=e.axis||"x",r=e.includeInvisible||!1,a=e.intersect?_s(s,n,o,i,r):xs(s,n,o,!1,i,r),l=[];return a.length?(s.getSortedVisibleDatasetMetas().forEach(c=>{const h=a[0].index,d=c.data[h];d&&!d.skip&&l.push({element:d,datasetIndex:c.index,index:h})}),l):[]},dataset(s,t,e,i){const n=Ft(t,s),o=e.axis||"xy",r=e.includeInvisible||!1;let a=e.intersect?_s(s,n,o,i,r):xs(s,n,o,!1,i,r);if(a.length>0){const l=a[0].datasetIndex,c=s.getDatasetMeta(l).data;a=[];for(let h=0;he.pos===t)}function Hi(s,t){return s.filter(e=>uo.indexOf(e.pos)===-1&&e.box.axis===t)}function ce(s,t){return s.sort((e,i)=>{const n=t?i:e,o=t?e:i;return n.weight===o.weight?n.index-o.index:n.weight-o.weight})}function Fc(s){const t=[];let e,i,n,o,r,a;for(e=0,i=(s||[]).length;ec.box.fullSize),!0),i=ce(le(t,"left"),!0),n=ce(le(t,"right")),o=ce(le(t,"top"),!0),r=ce(le(t,"bottom")),a=Hi(t,"x"),l=Hi(t,"y");return{fullSize:e,leftAndTop:i.concat(o),rightAndBottom:n.concat(l).concat(r).concat(a),chartArea:le(t,"chartArea"),vertical:i.concat(n).concat(l),horizontal:o.concat(r).concat(a)}}function Wi(s,t,e,i){return Math.max(s[e],t[e])+Math.max(s[i],t[i])}function fo(s,t){s.top=Math.max(s.top,t.top),s.left=Math.max(s.left,t.left),s.bottom=Math.max(s.bottom,t.bottom),s.right=Math.max(s.right,t.right)}function Nc(s,t,e,i){const{pos:n,box:o}=e,r=s.maxPadding;if(!R(n)){e.size&&(s[n]-=e.size);const d=i[e.stack]||{size:0,count:1};d.size=Math.max(d.size,e.horizontal?o.height:o.width),e.size=d.size/d.count,s[n]+=e.size}o.getPadding&&fo(r,o.getPadding());const a=Math.max(0,t.outerWidth-Wi(r,s,"left","right")),l=Math.max(0,t.outerHeight-Wi(r,s,"top","bottom")),c=a!==s.w,h=l!==s.h;return s.w=a,s.h=l,e.horizontal?{same:c,other:h}:{same:h,other:c}}function Hc(s){const t=s.maxPadding;function e(i){const n=Math.max(t[i]-s[i],0);return s[i]+=n,n}s.y+=e("top"),s.x+=e("left"),e("right"),e("bottom")}function Wc(s,t){const e=t.maxPadding;function i(n){const o={left:0,top:0,right:0,bottom:0};return n.forEach(r=>{o[r]=Math.max(t[r],e[r])}),o}return i(s?["left","right"]:["top","bottom"])}function ge(s,t,e,i){const n=[];let o,r,a,l,c,h;for(o=0,r=s.length,c=0;o{typeof m.beforeLayout=="function"&&m.beforeLayout()});const h=l.reduce((m,b)=>b.box.options&&b.box.options.display===!1?m:m+1,0)||1,d=Object.freeze({outerWidth:t,outerHeight:e,padding:n,availableWidth:o,availableHeight:r,vBoxMaxWidth:o/2/h,hBoxMaxHeight:r/2}),u=Object.assign({},n);fo(u,ht(i));const f=Object.assign({maxPadding:u,w:o,h:r,x:n.left,y:n.top},n),g=Bc(l.concat(c),d);ge(a.fullSize,f,d,g),ge(l,f,d,g),ge(c,f,d,g)&&ge(l,f,d,g),Hc(f),Vi(a.leftAndTop,f,d,g),f.x+=f.w,f.y+=f.h,Vi(a.rightAndBottom,f,d,g),s.chartArea={left:f.left,top:f.top,right:f.left+f.w,bottom:f.top+f.h,height:f.h,width:f.w},E(a.chartArea,m=>{const b=m.box;Object.assign(b,s.chartArea),b.update(f.w,f.h,{left:0,top:0,right:0,bottom:0})})}};class go{acquireContext(t,e){}releaseContext(t){return!1}addEventListener(t,e,i){}removeEventListener(t,e,i){}getDevicePixelRatio(){return 1}getMaximumSize(t,e,i,n){return e=Math.max(0,e||t.width),i=i||t.height,{width:e,height:Math.max(0,n?Math.floor(e/n):i)}}isAttached(t){return!0}updateConfig(t){}}class Vc extends go{acquireContext(t){return t&&t.getContext&&t.getContext("2d")||null}updateConfig(t){t.options.animation=!1}}const Je="$chartjs",jc={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"},ji=s=>s===null||s==="";function Uc(s,t){const e=s.style,i=s.getAttribute("height"),n=s.getAttribute("width");if(s[Je]={initial:{height:i,width:n,style:{display:e.display,height:e.height,width:e.width}}},e.display=e.display||"block",e.boxSizing=e.boxSizing||"border-box",ji(n)){const o=Pi(s,"width");o!==void 0&&(s.width=o)}if(ji(i))if(s.style.height==="")s.height=s.width/(t||2);else{const o=Pi(s,"height");o!==void 0&&(s.height=o)}return s}const po=Kl?{passive:!0}:!1;function Yc(s,t,e){s&&s.addEventListener(t,e,po)}function Kc(s,t,e){s&&s.canvas&&s.canvas.removeEventListener(t,e,po)}function Xc(s,t){const e=jc[s.type]||s.type,{x:i,y:n}=Ft(s,t);return{type:e,chart:t,native:s,x:i!==void 0?i:null,y:n!==void 0?n:null}}function ns(s,t){for(const e of s)if(e===t||e.contains(t))return!0}function Gc(s,t,e){const i=s.canvas,n=new MutationObserver(o=>{let r=!1;for(const a of o)r=r||ns(a.addedNodes,i),r=r&&!ns(a.removedNodes,i);r&&e()});return n.observe(document,{childList:!0,subtree:!0}),n}function Jc(s,t,e){const i=s.canvas,n=new MutationObserver(o=>{let r=!1;for(const a of o)r=r||ns(a.removedNodes,i),r=r&&!ns(a.addedNodes,i);r&&e()});return n.observe(document,{childList:!0,subtree:!0}),n}const De=new Map;let Ui=0;function mo(){const s=window.devicePixelRatio;s!==Ui&&(Ui=s,De.forEach((t,e)=>{e.currentDevicePixelRatio!==s&&t()}))}function qc(s,t){De.size||window.addEventListener("resize",mo),De.set(s,t)}function Qc(s){De.delete(s),De.size||window.removeEventListener("resize",mo)}function Zc(s,t,e){const i=s.canvas,n=i&&ei(i);if(!n)return;const o=Un((a,l)=>{const c=n.clientWidth;e(a,l),c{const l=a[0],c=l.contentRect.width,h=l.contentRect.height;c===0&&h===0||o(c,h)});return r.observe(n),qc(s,o),r}function ys(s,t,e){e&&e.disconnect(),t==="resize"&&Qc(s)}function th(s,t,e){const i=s.canvas,n=Un(o=>{s.ctx!==null&&e(Xc(o,s))},s);return Yc(i,t,n),n}class eh extends go{acquireContext(t,e){const i=t&&t.getContext&&t.getContext("2d");return i&&i.canvas===t?(Uc(t,e),i):null}releaseContext(t){const e=t.canvas;if(!e[Je])return!1;const i=e[Je].initial;["height","width"].forEach(o=>{const r=i[o];z(r)?e.removeAttribute(o):e.setAttribute(o,r)});const n=i.style||{};return Object.keys(n).forEach(o=>{e.style[o]=n[o]}),e.width=e.width,delete e[Je],!0}addEventListener(t,e,i){this.removeEventListener(t,e);const n=t.$proxies||(t.$proxies={}),r={attach:Gc,detach:Jc,resize:Zc}[e]||th;n[e]=r(t,e,i)}removeEventListener(t,e){const i=t.$proxies||(t.$proxies={}),n=i[e];if(!n)return;({attach:ys,detach:ys,resize:ys}[e]||Kc)(t,e,n),i[e]=void 0}getDevicePixelRatio(){return window.devicePixelRatio}getMaximumSize(t,e,i,n){return Yl(t,e,i,n)}isAttached(t){const e=t&&ei(t);return!!(e&&e.isConnected)}}function sh(s){return!ti()||typeof OffscreenCanvas<"u"&&s instanceof OffscreenCanvas?Vc:eh}class Ot{static defaults={};static defaultRoutes=void 0;x;y;active=!1;options;$animations;tooltipPosition(t){const{x:e,y:i}=this.getProps(["x","y"],t);return{x:e,y:i}}hasValue(){return Me(this.x)&&Me(this.y)}getProps(t,e){const i=this.$animations;if(!e||!i)return this;const n={};return t.forEach(o=>{n[o]=i[o]&&i[o].active()?i[o]._to:this[o]}),n}}function ih(s,t){const e=s.options.ticks,i=nh(s),n=Math.min(e.maxTicksLimit||i,i),o=e.major.enabled?rh(t):[],r=o.length,a=o[0],l=o[r-1],c=[];if(r>n)return ah(t,c,o,r/n),c;const h=oh(o,t,n);if(r>0){let d,u;const f=r>1?Math.round((l-a)/(r-1)):null;for(We(t,c,h,z(f)?0:a-f,a),d=0,u=r-1;dn)return l}return Math.max(n,1)}function rh(s){const t=[];let e,i;for(e=0,i=s.length;es==="left"?"right":s==="right"?"left":s,Yi=(s,t,e)=>t==="top"||t==="left"?s[t]+e:s[t]-e,Ki=(s,t)=>Math.min(t||s,s);function Xi(s,t){const e=[],i=s.length/t,n=s.length;let o=0;for(;or+a)))return l}function dh(s,t){E(s,e=>{const i=e.gc,n=i.length/2;let o;if(n>t){for(o=0;oi?i:e,i=n&&e>i?e:i,{min:ut(e,ut(i,e)),max:ut(i,ut(e,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 t=this.chart.data;return this.options.labels||(this.isHorizontal()?t.xLabels:t.yLabels)||t.labels||[]}getLabelItems(t=this.chart.chartArea){return this._labelItems||(this._labelItems=this._computeLabelItems(t))}beforeLayout(){this._cache={},this._dataLimitsCached=!1}beforeUpdate(){B(this.options.beforeUpdate,[this])}update(t,e,i){const{beginAtZero:n,grace:o,ticks:r}=this.options,a=r.sampleSize;this.beforeUpdate(),this.maxWidth=t,this.maxHeight=e,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=kl(this,o,n),this._dataLimitsCached=!0),this.beforeBuildTicks(),this.ticks=this.buildTicks()||[],this.afterBuildTicks();const l=a=o||i<=1||!this.isHorizontal()){this.labelRotation=n;return}const h=this._getLabelSizes(),d=h.widest.width,u=h.highest.height,f=it(this.chart.width-d,0,this.maxWidth);a=t.offset?this.maxWidth/i:f/(i-1),d+6>a&&(a=f/(i-(t.offset?.5:1)),l=this.maxHeight-he(t.grid)-e.padding-Gi(t.title,this.chart.options.font),c=Math.sqrt(d*d+u*u),r=Ga(Math.min(Math.asin(it((h.highest.height+6)/a,-1,1)),Math.asin(it(l/c,-1,1))-Math.asin(it(u/c,-1,1)))),r=Math.max(n,Math.min(o,r))),this.labelRotation=r}afterCalculateLabelRotation(){B(this.options.afterCalculateLabelRotation,[this])}afterAutoSkip(){}beforeFit(){B(this.options.beforeFit,[this])}fit(){const t={width:0,height:0},{chart:e,options:{ticks:i,title:n,grid:o}}=this,r=this._isVisible(),a=this.isHorizontal();if(r){const l=Gi(n,e.options.font);if(a?(t.width=this.maxWidth,t.height=he(o)+l):(t.height=this.maxHeight,t.width=he(o)+l),i.display&&this.ticks.length){const{first:c,last:h,widest:d,highest:u}=this._getLabelSizes(),f=i.padding*2,g=$t(this.labelRotation),m=Math.cos(g),b=Math.sin(g);if(a){const _=i.mirror?0:b*d.width+m*u.height;t.height=Math.min(this.maxHeight,t.height+_+f)}else{const _=i.mirror?0:m*d.width+b*u.height;t.width=Math.min(this.maxWidth,t.width+_+f)}this._calculatePadding(c,h,b,m)}}this._handleMargins(),a?(this.width=this._length=e.width-this._margins.left-this._margins.right,this.height=t.height):(this.width=t.width,this.height=this._length=e.height-this._margins.top-this._margins.bottom)}_calculatePadding(t,e,i,n){const{ticks:{align:o,padding:r},position:a}=this.options,l=this.labelRotation!==0,c=a!=="top"&&this.axis==="x";if(this.isHorizontal()){const h=this.getPixelForTick(0)-this.left,d=this.right-this.getPixelForTick(this.ticks.length-1);let u=0,f=0;l?c?(u=n*t.width,f=i*e.height):(u=i*t.height,f=n*e.width):o==="start"?f=e.width:o==="end"?u=t.width:o!=="inner"&&(u=t.width/2,f=e.width/2),this.paddingLeft=Math.max((u-h+r)*this.width/(this.width-h),0),this.paddingRight=Math.max((f-d+r)*this.width/(this.width-d),0)}else{let h=e.height/2,d=t.height/2;o==="start"?(h=0,d=t.height):o==="end"&&(h=e.height,d=0),this.paddingTop=h+r,this.paddingBottom=d+r}}_handleMargins(){this._margins&&(this._margins.left=Math.max(this.paddingLeft,this._margins.left),this._margins.top=Math.max(this.paddingTop,this._margins.top),this._margins.right=Math.max(this.paddingRight,this._margins.right),this._margins.bottom=Math.max(this.paddingBottom,this._margins.bottom))}afterFit(){B(this.options.afterFit,[this])}isHorizontal(){const{axis:t,position:e}=this.options;return e==="top"||e==="bottom"||t==="x"}isFullSize(){return this.options.fullSize}_convertTicksToLabels(t){this.beforeTickToLabelConversion(),this.generateTickLabels(t);let e,i;for(e=0,i=t.length;e({width:r[C]||0,height:a[C]||0});return{first:k(0),last:k(e-1),widest:k(x),highest:k(w),widths:r,heights:a}}getLabelForValue(t){return t}getPixelForValue(t,e){return NaN}getValueForPixel(t){}getPixelForTick(t){const e=this.ticks;return t<0||t>e.length-1?null:this.getPixelForValue(e[t].value)}getPixelForDecimal(t){this._reversePixels&&(t=1-t);const e=this._startPixel+t*this._length;return Qa(this._alignToPixels?Rt(this.chart,e,0):e)}getDecimalForPixel(t){const e=(t-this._startPixel)/this._length;return this._reversePixels?1-e:e}getBasePixel(){return this.getPixelForValue(this.getBaseValue())}getBaseValue(){const{min:t,max:e}=this;return t<0&&e<0?e:t>0&&e>0?t:0}getContext(t){const e=this.ticks||[];if(t>=0&&ta*n?a/i:l/n:l*n0}_computeGridLineItems(t){const e=this.axis,i=this.chart,n=this.options,{grid:o,position:r,border:a}=n,l=o.offset,c=this.isHorizontal(),d=this.ticks.length+(l?1:0),u=he(o),f=[],g=a.setContext(this.getContext()),m=g.display?g.width:0,b=m/2,_=function(U){return Rt(i,U,m)};let y,S,M,v,x,w,k,C,I,A,T,Q;if(r==="top")y=_(this.bottom),w=this.bottom-u,C=y-b,A=_(t.top)+b,Q=t.bottom;else if(r==="bottom")y=_(this.top),A=t.top,Q=_(t.bottom)-b,w=y+b,C=this.top+u;else if(r==="left")y=_(this.right),x=this.right-u,k=y-b,I=_(t.left)+b,T=t.right;else if(r==="right")y=_(this.left),I=t.left,T=_(t.right)-b,x=y+b,k=this.left+u;else if(e==="x"){if(r==="center")y=_((t.top+t.bottom)/2+.5);else if(R(r)){const U=Object.keys(r)[0],nt=r[U];y=_(this.chart.scales[U].getPixelForValue(nt))}A=t.top,Q=t.bottom,w=y+b,C=w+u}else if(e==="y"){if(r==="center")y=_((t.left+t.right)/2);else if(R(r)){const U=Object.keys(r)[0],nt=r[U];y=_(this.chart.scales[U].getPixelForValue(nt))}x=y-b,k=x-u,I=t.left,T=t.right}const N=L(n.ticks.maxTicksLimit,d),F=Math.max(1,Math.ceil(d/N));for(S=0;S0&&(Lt-=Tt/2);break}Ie={left:Lt,top:re,width:Tt+Xt.width,height:oe+Xt.height,color:F.backdropColor}}b.push({label:M,font:C,textOffset:T,options:{rotation:m,color:nt,strokeColor:Te,strokeWidth:Le,textAlign:Kt,textBaseline:Q,translation:[v,x],backdrop:Ie}})}return b}_getXAxisLabelAlignment(){const{position:t,ticks:e}=this.options;if(-$t(this.labelRotation))return t==="top"?"left":"right";let n="center";return e.align==="start"?n="left":e.align==="end"?n="right":e.align==="inner"&&(n="inner"),n}_getYAxisLabelAlignment(t){const{position:e,ticks:{crossAlign:i,mirror:n,padding:o}}=this.options,r=this._getLabelSizes(),a=t+o,l=r.widest.width;let c,h;return e==="left"?n?(h=this.right+o,i==="near"?c="left":i==="center"?(c="center",h+=l/2):(c="right",h+=l)):(h=this.right-a,i==="near"?c="right":i==="center"?(c="center",h-=l/2):(c="left",h=this.left)):e==="right"?n?(h=this.left+o,i==="near"?c="right":i==="center"?(c="center",h-=l/2):(c="left",h-=l)):(h=this.left+a,i==="near"?c="left":i==="center"?(c="center",h+=l/2):(c="right",h=this.right)):c="right",{textAlign:c,x:h}}_computeLabelArea(){if(this.options.ticks.mirror)return;const t=this.chart,e=this.options.position;if(e==="left"||e==="right")return{top:0,left:this.left,bottom:t.height,right:this.right};if(e==="top"||e==="bottom")return{top:this.top,left:0,bottom:this.bottom,right:t.width}}drawBackground(){const{ctx:t,options:{backgroundColor:e},left:i,top:n,width:o,height:r}=this;e&&(t.save(),t.fillStyle=e,t.fillRect(i,n,o,r),t.restore())}getLineWidthForValue(t){const e=this.options.grid;if(!this._isVisible()||!e.display)return 0;const n=this.ticks.findIndex(o=>o.value===t);return n>=0?e.setContext(this.getContext(n)).lineWidth:0}drawGrid(t){const e=this.options.grid,i=this.ctx,n=this._gridLineItems||(this._gridLineItems=this._computeGridLineItems(t));let o,r;const a=(l,c,h)=>{!h.width||!h.color||(i.save(),i.lineWidth=h.width,i.strokeStyle=h.color,i.setLineDash(h.borderDash||[]),i.lineDashOffset=h.borderDashOffset,i.beginPath(),i.moveTo(l.x,l.y),i.lineTo(c.x,c.y),i.stroke(),i.restore())};if(e.display)for(o=0,r=n.length;o{this.draw(o)}}]:[{z:i,draw:o=>{this.drawBackground(),this.drawGrid(o),this.drawTitle()}},{z:n,draw:()=>{this.drawBorder()}},{z:e,draw:o=>{this.drawLabels(o)}}]}getMatchingVisibleMetas(t){const e=this.chart.getSortedVisibleDatasetMetas(),i=this.axis+"AxisID",n=[];let o,r;for(o=0,r=e.length;o{const i=e.split("."),n=i.pop(),o=[s].concat(i).join("."),r=t[e].split("."),a=r.pop(),l=r.join(".");j.route(o,n,l,a)})}function _h(s){return"id"in s&&"defaults"in s}class xh{constructor(){this.controllers=new Ve(si,"datasets",!0),this.elements=new Ve(Ot,"elements"),this.plugins=new Ve(Object,"plugins"),this.scales=new Ve(ie,"scales"),this._typedRegistries=[this.controllers,this.scales,this.elements]}add(...t){this._each("register",t)}remove(...t){this._each("unregister",t)}addControllers(...t){this._each("register",t,this.controllers)}addElements(...t){this._each("register",t,this.elements)}addPlugins(...t){this._each("register",t,this.plugins)}addScales(...t){this._each("register",t,this.scales)}getController(t){return this._get(t,this.controllers,"controller")}getElement(t){return this._get(t,this.elements,"element")}getPlugin(t){return this._get(t,this.plugins,"plugin")}getScale(t){return this._get(t,this.scales,"scale")}removeControllers(...t){this._each("unregister",t,this.controllers)}removeElements(...t){this._each("unregister",t,this.elements)}removePlugins(...t){this._each("unregister",t,this.plugins)}removeScales(...t){this._each("unregister",t,this.scales)}_each(t,e,i){[...e].forEach(n=>{const o=i||this._getRegistryForType(n);i||o.isForType(n)||o===this.plugins&&n.id?this._exec(t,o,n):E(n,r=>{const a=i||this._getRegistryForType(r);this._exec(t,a,r)})})}_exec(t,e,i){const n=Us(t);B(i["before"+n],[],i),e[t](i),B(i["after"+n],[],i)}_getRegistryForType(t){for(let e=0;eo.filter(a=>!r.some(l=>a.plugin.id===l.plugin.id));this._notify(n(e,i),t,"stop"),this._notify(n(i,e),t,"start")}}function vh(s){const t={},e=[],i=Object.keys(gt.plugins.items);for(let o=0;o1&&Ji(s[0].toLowerCase());if(i)return i}throw new Error(`Cannot determine type of '${s}' axis. Please provide 'axis' or 'position' option.`)}function qi(s,t,e){if(e[t+"AxisID"]===s)return{axis:t}}function Dh(s,t){if(t.data&&t.data.datasets){const e=t.data.datasets.filter(i=>i.xAxisID===s||i.yAxisID===s);if(e.length)return qi(s,"x",e[0])||qi(s,"y",e[0])}return{}}function Oh(s,t){const e=Ut[s.type]||{scales:{}},i=t.scales||{},n=Ls(s.type,t),o=Object.create(null);return Object.keys(i).forEach(r=>{const a=i[r];if(!R(a))return console.error(`Invalid scale configuration for scale: ${r}`);if(a._proxy)return console.warn(`Ignoring resolver passed as options for scale: ${r}`);const l=Is(r,a,Dh(r,s),j.scales[a.type]),c=Ph(l,n),h=e.scales||{};o[r]=be(Object.create(null),[{axis:l},a,h[l],h[c]])}),s.data.datasets.forEach(r=>{const a=r.type||s.type,l=r.indexAxis||Ls(a,t),h=(Ut[a]||{}).scales||{};Object.keys(h).forEach(d=>{const u=Mh(d,l),f=r[u+"AxisID"]||u;o[f]=o[f]||Object.create(null),be(o[f],[{axis:u},i[f],h[d]])})}),Object.keys(o).forEach(r=>{const a=o[r];be(a,[j.scales[a.type],j.scale])}),o}function bo(s){const t=s.options||(s.options={});t.plugins=L(t.plugins,{}),t.scales=Oh(s,t)}function _o(s){return s=s||{},s.datasets=s.datasets||[],s.labels=s.labels||[],s}function Ah(s){return s=s||{},s.data=_o(s.data),bo(s),s}const Qi=new Map,xo=new Set;function je(s,t){let e=Qi.get(s);return e||(e=t(),Qi.set(s,e),xo.add(e)),e}const de=(s,t,e)=>{const i=te(t,e);i!==void 0&&s.add(i)};let Th=class{constructor(t){this._config=Ah(t),this._scopeCache=new Map,this._resolverCache=new Map}get platform(){return this._config.platform}get type(){return this._config.type}set type(t){this._config.type=t}get data(){return this._config.data}set data(t){this._config.data=_o(t)}get options(){return this._config.options}set options(t){this._config.options=t}get plugins(){return this._config.plugins}update(){const t=this._config;this.clearCache(),bo(t)}clearCache(){this._scopeCache.clear(),this._resolverCache.clear()}datasetScopeKeys(t){return je(t,()=>[[`datasets.${t}`,""]])}datasetAnimationScopeKeys(t,e){return je(`${t}.transition.${e}`,()=>[[`datasets.${t}.transitions.${e}`,`transitions.${e}`],[`datasets.${t}`,""]])}datasetElementScopeKeys(t,e){return je(`${t}-${e}`,()=>[[`datasets.${t}.elements.${e}`,`datasets.${t}`,`elements.${e}`,""]])}pluginScopeKeys(t){const e=t.id,i=this.type;return je(`${i}-plugin-${e}`,()=>[[`plugins.${e}`,...t.additionalOptionScopes||[]]])}_cachedScopes(t,e){const i=this._scopeCache;let n=i.get(t);return(!n||e)&&(n=new Map,i.set(t,n)),n}getOptionScopes(t,e,i){const{options:n,type:o}=this,r=this._cachedScopes(t,i),a=r.get(e);if(a)return a;const l=new Set;e.forEach(h=>{t&&(l.add(t),h.forEach(d=>de(l,t,d))),h.forEach(d=>de(l,n,d)),h.forEach(d=>de(l,Ut[o]||{},d)),h.forEach(d=>de(l,j,d)),h.forEach(d=>de(l,As,d))});const c=Array.from(l);return c.length===0&&c.push(Object.create(null)),xo.has(e)&&r.set(e,c),c}chartOptionScopes(){const{options:t,type:e}=this;return[t,Ut[e]||{},j.datasets[e]||{},{type:e},j,As]}resolveNamedOptions(t,e,i,n=[""]){const o={$shared:!0},{resolver:r,subPrefixes:a}=Zi(this._resolverCache,t,n);let l=r;if(Ih(r,e)){o.$shared=!1,i=Dt(i)?i():i;const c=this.createResolver(t,i,a);l=ee(r,i,c)}for(const c of e)o[c]=l[c];return o}createResolver(t,e,i=[""],n){const{resolver:o}=Zi(this._resolverCache,t,i);return R(e)?ee(o,e,void 0,n):o}};function Zi(s,t,e){let i=s.get(t);i||(i=new Map,s.set(t,i));const n=e.join();let o=i.get(n);return o||(o={resolver:qs(t,e),subPrefixes:e.filter(a=>!a.toLowerCase().includes("hover"))},i.set(n,o)),o}const Lh=s=>R(s)&&Object.getOwnPropertyNames(s).some(t=>Dt(s[t]));function Ih(s,t){const{isScriptable:e,isIndexable:i}=Qn(s);for(const n of t){const o=e(n),r=i(n),a=(r||o)&&s[n];if(o&&(Dt(a)||Lh(a))||r&&Y(a))return!0}return!1}var Rh="4.4.4";const Eh=["top","bottom","left","right","chartArea"];function tn(s,t){return s==="top"||s==="bottom"||Eh.indexOf(s)===-1&&t==="x"}function en(s,t){return function(e,i){return e[s]===i[s]?e[t]-i[t]:e[s]-i[s]}}function sn(s){const t=s.chart,e=t.options.animation;t.notifyPlugins("afterRender"),B(e&&e.onComplete,[s],t)}function Fh(s){const t=s.chart,e=t.options.animation;B(e&&e.onProgress,[s],t)}function yo(s){return ti()&&typeof s=="string"?s=document.getElementById(s):s&&s.length&&(s=s[0]),s&&s.canvas&&(s=s.canvas),s}const qe={},nn=s=>{const t=yo(s);return Object.values(qe).filter(e=>e.canvas===t).pop()};function zh(s,t,e){const i=Object.keys(s);for(const n of i){const o=+n;if(o>=t){const r=s[n];delete s[n],(e>0||o>t)&&(s[o+e]=r)}}}function Bh(s,t,e,i){return!e||s.type==="mouseout"?null:i?t:s}function Ue(s,t,e){return s.options.clip?s[e]:t[e]}function $h(s,t){const{xScale:e,yScale:i}=s;return e&&i?{left:Ue(e,t,"left"),right:Ue(e,t,"right"),top:Ue(i,t,"top"),bottom:Ue(i,t,"bottom")}:t}let cs=class{static defaults=j;static instances=qe;static overrides=Ut;static registry=gt;static version=Rh;static getChart=nn;static register(...t){gt.add(...t),on()}static unregister(...t){gt.remove(...t),on()}constructor(t,e){const i=this.config=new Th(e),n=yo(t),o=nn(n);if(o)throw new Error("Canvas is already in use. Chart with ID '"+o.id+"' must be destroyed before the canvas with ID '"+o.canvas.id+"' can be reused.");const r=i.createResolver(i.chartOptionScopes(),this.getContext());this.platform=new(i.platform||sh(n)),this.platform.updateConfig(i);const a=this.platform.acquireContext(n,r.aspectRatio),l=a&&a.canvas,c=l&&l.height,h=l&&l.width;if(this.id=za(),this.ctx=a,this.canvas=l,this.width=h,this.height=c,this._options=r,this._aspectRatio=this.aspectRatio,this._layers=[],this._metasets=[],this._stacks=void 0,this.boxes=[],this.currentDevicePixelRatio=void 0,this.chartArea=void 0,this._active=[],this._lastEvent=void 0,this._listeners={},this._responsiveListeners=void 0,this._sortedMetasets=[],this.scales={},this._plugins=new yh,this.$proxies={},this._hiddenIndices={},this.attached=!1,this._animationsDisabled=void 0,this.$context=void 0,this._doResize=sl(d=>this.update(d),r.resizeDelay||0),this._dataChanges=[],qe[this.id]=this,!a||!l){console.error("Failed to create chart: can't acquire context from the given item");return}yt.listen(this,"complete",sn),yt.listen(this,"progress",Fh),this._initialize(),this.attached&&this.update()}get aspectRatio(){const{options:{aspectRatio:t,maintainAspectRatio:e},width:i,height:n,_aspectRatio:o}=this;return z(t)?e&&o?o:n?i/n:null:t}get data(){return this.config.data}set data(t){this.config.data=t}get options(){return this._options}set options(t){this.config.options=t}get registry(){return gt}_initialize(){return this.notifyPlugins("beforeInit"),this.options.responsive?this.resize():Mi(this,this.options.devicePixelRatio),this.bindEvents(),this.notifyPlugins("afterInit"),this}clear(){return Si(this.canvas,this.ctx),this}stop(){return yt.stop(this),this}resize(t,e){yt.running(this)?this._resizeBeforeDraw={width:t,height:e}:this._resize(t,e)}_resize(t,e){const i=this.options,n=this.canvas,o=i.maintainAspectRatio&&this.aspectRatio,r=this.platform.getMaximumSize(n,t,e,o),a=i.devicePixelRatio||this.platform.getDevicePixelRatio(),l=this.width?"resize":"attach";this.width=r.width,this.height=r.height,this._aspectRatio=this.aspectRatio,Mi(this,a,!0)&&(this.notifyPlugins("resize",{size:r}),B(i.onResize,[this,r],this),this.attached&&this._doResize(l)&&this.render())}ensureScalesHaveIDs(){const e=this.options.scales||{};E(e,(i,n)=>{i.id=n})}buildOrUpdateScales(){const t=this.options,e=t.scales,i=this.scales,n=Object.keys(i).reduce((r,a)=>(r[a]=!1,r),{});let o=[];e&&(o=o.concat(Object.keys(e).map(r=>{const a=e[r],l=Is(r,a),c=l==="r",h=l==="x";return{options:a,dposition:c?"chartArea":h?"bottom":"left",dtype:c?"radialLinear":h?"category":"linear"}}))),E(o,r=>{const a=r.options,l=a.id,c=Is(l,a),h=L(a.type,r.dtype);(a.position===void 0||tn(a.position,c)!==tn(r.dposition))&&(a.position=r.dposition),n[l]=!0;let d=null;if(l in i&&i[l].type===h)d=i[l];else{const u=gt.getScale(h);d=new u({id:l,type:h,ctx:this.ctx,chart:this}),i[d.id]=d}d.init(a,t)}),E(n,(r,a)=>{r||delete i[a]}),E(i,r=>{lt.configure(this,r,r.options),lt.addBox(this,r)})}_updateMetasets(){const t=this._metasets,e=this.data.datasets.length,i=t.length;if(t.sort((n,o)=>n.index-o.index),i>e){for(let n=e;ne.length&&delete this._stacks,t.forEach((i,n)=>{e.filter(o=>o===i._dataset).length===0&&this._destroyDatasetMeta(n)})}buildOrUpdateControllers(){const t=[],e=this.data.datasets;let i,n;for(this._removeUnreferencedMetasets(),i=0,n=e.length;i{this.getDatasetMeta(e).controller.reset()},this)}reset(){this._resetElements(),this.notifyPlugins("reset")}update(t){const e=this.config;e.update();const i=this._options=e.createResolver(e.chartOptionScopes(),this.getContext()),n=this._animationsDisabled=!i.animation;if(this._updateScales(),this._checkEventBindings(),this._updateHiddenIndices(),this._plugins.invalidate(),this.notifyPlugins("beforeUpdate",{mode:t,cancelable:!0})===!1)return;const o=this.buildOrUpdateControllers();this.notifyPlugins("beforeElementsUpdate");let r=0;for(let c=0,h=this.data.datasets.length;c{c.reset()}),this._updateDatasets(t),this.notifyPlugins("afterUpdate",{mode:t}),this._layers.sort(en("z","_idx"));const{_active:a,_lastEvent:l}=this;l?this._eventHandler(l,!0):a.length&&this._updateHoverStyles(a,a,!0),this.render()}_updateScales(){E(this.scales,t=>{lt.removeBox(this,t)}),this.ensureScalesHaveIDs(),this.buildOrUpdateScales()}_checkEventBindings(){const t=this.options,e=new Set(Object.keys(this._listeners)),i=new Set(t.events);(!ui(e,i)||!!this._responsiveListeners!==t.responsive)&&(this.unbindEvents(),this.bindEvents())}_updateHiddenIndices(){const{_hiddenIndices:t}=this,e=this._getUniformDataChanges()||[];for(const{method:i,start:n,count:o}of e){const r=i==="_removeElements"?-o:o;zh(t,n,r)}}_getUniformDataChanges(){const t=this._dataChanges;if(!t||!t.length)return;this._dataChanges=[];const e=this.data.datasets.length,i=o=>new Set(t.filter(r=>r[0]===o).map((r,a)=>a+","+r.splice(1).join(","))),n=i(0);for(let o=1;oo.split(",")).map(o=>({method:o[1],start:+o[2],count:+o[3]}))}_updateLayout(t){if(this.notifyPlugins("beforeLayout",{cancelable:!0})===!1)return;lt.update(this,this.width,this.height,t);const e=this.chartArea,i=e.width<=0||e.height<=0;this._layers=[],E(this.boxes,n=>{i&&n.position==="chartArea"||(n.configure&&n.configure(),this._layers.push(...n._layers()))},this),this._layers.forEach((n,o)=>{n._idx=o}),this.notifyPlugins("afterLayout")}_updateDatasets(t){if(this.notifyPlugins("beforeDatasetsUpdate",{mode:t,cancelable:!0})!==!1){for(let e=0,i=this.data.datasets.length;e=0;--e)this._drawDataset(t[e]);this.notifyPlugins("afterDatasetsDraw")}_drawDataset(t){const e=this.ctx,i=t._clip,n=!i.disabled,o=$h(t,this.chartArea),r={meta:t,index:t.index,cancelable:!0};this.notifyPlugins("beforeDatasetDraw",r)!==!1&&(n&&Gs(e,{left:i.left===!1?0:o.left-i.left,right:i.right===!1?this.width:o.right+i.right,top:i.top===!1?0:o.top-i.top,bottom:i.bottom===!1?this.height:o.bottom+i.bottom}),t.controller.draw(),n&&Js(e),r.cancelable=!1,this.notifyPlugins("afterDatasetDraw",r))}isPointInArea(t){return Pe(t,this.chartArea,this._minPadding)}getElementsAtEventForMode(t,e,i,n){const o=Ec.modes[e];return typeof o=="function"?o(this,t,i,n):[]}getDatasetMeta(t){const e=this.data.datasets[t],i=this._metasets;let n=i.filter(o=>o&&o._dataset===e).pop();return n||(n={type:null,data:[],dataset:null,controller:null,hidden:null,xAxisID:null,yAxisID:null,order:e&&e.order||0,index:t,_dataset:e,_parsed:[],_sorted:!1},i.push(n)),n}getContext(){return this.$context||(this.$context=Yt(null,{chart:this,type:"chart"}))}getVisibleDatasetCount(){return this.getSortedVisibleDatasetMetas().length}isDatasetVisible(t){const e=this.data.datasets[t];if(!e)return!1;const i=this.getDatasetMeta(t);return typeof i.hidden=="boolean"?!i.hidden:!e.hidden}setDatasetVisibility(t,e){const i=this.getDatasetMeta(t);i.hidden=!e}toggleDataVisibility(t){this._hiddenIndices[t]=!this._hiddenIndices[t]}getDataVisibility(t){return!this._hiddenIndices[t]}_updateVisibility(t,e,i){const n=i?"show":"hide",o=this.getDatasetMeta(t),r=o.controller._resolveAnimations(void 0,n);ke(e)?(o.data[e].hidden=!i,this.update()):(this.setDatasetVisibility(t,i),r.update(o,{visible:i}),this.update(a=>a.datasetIndex===t?n:void 0))}hide(t,e){this._updateVisibility(t,e,!1)}show(t,e){this._updateVisibility(t,e,!0)}_destroyDatasetMeta(t){const e=this._metasets[t];e&&e.controller&&e.controller._destroy(),delete this._metasets[t]}_stop(){let t,e;for(this.stop(),yt.remove(this),t=0,e=this.data.datasets.length;t{e.addEventListener(this,o,r),t[o]=r},n=(o,r,a)=>{o.offsetX=r,o.offsetY=a,this._eventHandler(o)};E(this.options.events,o=>i(o,n))}bindResponsiveEvents(){this._responsiveListeners||(this._responsiveListeners={});const t=this._responsiveListeners,e=this.platform,i=(l,c)=>{e.addEventListener(this,l,c),t[l]=c},n=(l,c)=>{t[l]&&(e.removeEventListener(this,l,c),delete t[l])},o=(l,c)=>{this.canvas&&this.resize(l,c)};let r;const a=()=>{n("attach",a),this.attached=!0,this.resize(),i("resize",o),i("detach",r)};r=()=>{this.attached=!1,n("resize",o),this._stop(),this._resize(0,0),i("attach",a)},e.isAttached(this.canvas)?a():r()}unbindEvents(){E(this._listeners,(t,e)=>{this.platform.removeEventListener(this,e,t)}),this._listeners={},E(this._responsiveListeners,(t,e)=>{this.platform.removeEventListener(this,e,t)}),this._responsiveListeners=void 0}updateHoverStyle(t,e,i){const n=i?"set":"remove";let o,r,a,l;for(e==="dataset"&&(o=this.getDatasetMeta(t[0].datasetIndex),o.controller["_"+n+"DatasetHoverStyle"]()),a=0,l=t.length;a{const a=this.getDatasetMeta(o);if(!a)throw new Error("No dataset found at index "+o);return{datasetIndex:o,element:a.data[r],index:r}});!Ze(i,e)&&(this._active=i,this._lastEvent=null,this._updateHoverStyles(i,e))}notifyPlugins(t,e,i){return this._plugins.notify(this,t,e,i)}isPluginEnabled(t){return this._plugins._cache.filter(e=>e.plugin.id===t).length===1}_updateHoverStyles(t,e,i){const n=this.options.hover,o=(l,c)=>l.filter(h=>!c.some(d=>h.datasetIndex===d.datasetIndex&&h.index===d.index)),r=o(e,t),a=i?t:o(t,e);r.length&&this.updateHoverStyle(r,n.mode,!1),a.length&&n.mode&&this.updateHoverStyle(a,n.mode,!0)}_eventHandler(t,e){const i={event:t,replay:e,cancelable:!0,inChartArea:this.isPointInArea(t)},n=r=>(r.options.events||this.options.events).includes(t.native.type);if(this.notifyPlugins("beforeEvent",i,n)===!1)return;const o=this._handleEvent(t,e,i.inChartArea);return i.cancelable=!1,this.notifyPlugins("afterEvent",i,n),(o||i.changed)&&this.render(),this}_handleEvent(t,e,i){const{_active:n=[],options:o}=this,r=e,a=this._getActiveElements(t,n,i,r),l=Va(t),c=Bh(t,this._lastEvent,i,l);i&&(this._lastEvent=null,B(o.onHover,[t,a,this],this),l&&B(o.onClick,[t,a,this],this));const h=!Ze(a,n);return(h||e)&&(this._active=a,this._updateHoverStyles(a,n,e)),this._lastEvent=c,h}_getActiveElements(t,e,i,n){if(t.type==="mouseout")return[];if(!i)return e;const o=this.options.hover;return this.getElementsAtEventForMode(t,o.mode,o,n)}};function on(){return E(cs.instances,s=>s._plugins.invalidate())}function vo(s,t,e=t){s.lineCap=L(e.borderCapStyle,t.borderCapStyle),s.setLineDash(L(e.borderDash,t.borderDash)),s.lineDashOffset=L(e.borderDashOffset,t.borderDashOffset),s.lineJoin=L(e.borderJoinStyle,t.borderJoinStyle),s.lineWidth=L(e.borderWidth,t.borderWidth),s.strokeStyle=L(e.borderColor,t.borderColor)}function Nh(s,t,e){s.lineTo(e.x,e.y)}function Hh(s){return s.stepped?pl:s.tension||s.cubicInterpolationMode==="monotone"?ml:Nh}function So(s,t,e={}){const i=s.length,{start:n=0,end:o=i-1}=e,{start:r,end:a}=t,l=Math.max(n,r),c=Math.min(o,a),h=na&&o>a;return{count:i,start:l,loop:t.loop,ilen:c(r+(c?a-M:M))%o,S=()=>{m!==b&&(s.lineTo(h,b),s.lineTo(h,m),s.lineTo(h,_))};for(l&&(f=n[y(0)],s.moveTo(f.x,f.y)),u=0;u<=a;++u){if(f=n[y(u)],f.skip)continue;const M=f.x,v=f.y,x=M|0;x===g?(vb&&(b=v),h=(d*h+M)/++d):(S(),s.lineTo(M,v),g=x,d=0,m=b=v),_=v}S()}function Rs(s){const t=s.options,e=t.borderDash&&t.borderDash.length;return!s._decimated&&!s._loop&&!t.tension&&t.cubicInterpolationMode!=="monotone"&&!t.stepped&&!e?Vh:Wh}function jh(s){return s.stepped?Xl:s.tension||s.cubicInterpolationMode==="monotone"?Gl:zt}function Uh(s,t,e,i){let n=t._path;n||(n=t._path=new Path2D,t.path(n,e,i)&&n.closePath()),vo(s,t.options),s.stroke(n)}function Yh(s,t,e,i){const{segments:n,options:o}=t,r=Rs(t);for(const a of n)vo(s,o,a.style),s.beginPath(),r(s,t,a,{start:e,end:e+i-1})&&s.closePath(),s.stroke()}const Kh=typeof Path2D=="function";function Xh(s,t,e,i){Kh&&!t.options.segment?Uh(s,t,e,i):Yh(s,t,e,i)}class Gh extends Ot{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:t=>t!=="borderDash"&&t!=="fill"};constructor(t){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,t&&Object.assign(this,t)}updateControlPoints(t,e){const i=this.options;if((i.tension||i.cubicInterpolationMode==="monotone")&&!i.stepped&&!this._pointsUpdated){const n=i.spanGaps?this._loop:this._fullLoop;Nl(this._points,i,t,n,e),this._pointsUpdated=!0}}set points(t){this._points=t,delete this._segments,delete this._path,this._pointsUpdated=!1}get points(){return this._points}get segments(){return this._segments||(this._segments=ic(this,this.options.segment))}first(){const t=this.segments,e=this.points;return t.length&&e[t[0].start]}last(){const t=this.segments,e=this.points,i=t.length;return i&&e[t[i-1].end]}interpolate(t,e){const i=this.options,n=t[e],o=this.points,r=tc(this,{property:e,start:n,end:n});if(!r.length)return;const a=[],l=jh(i);let c,h;for(c=0,h=r.length;c{let{boxHeight:e=t,boxWidth:i=t}=s;return s.usePointStyle&&(e=Math.min(e,t),i=s.pointStyleWidth||Math.min(i,t)),{boxWidth:i,boxHeight:e,itemHeight:Math.max(t,e)}},id=(s,t)=>s!==null&&t!==null&&s.datasetIndex===t.datasetIndex&&s.index===t.index;class ln extends Ot{constructor(t){super(),this._added=!1,this.legendHitBoxes=[],this._hoveredItem=null,this.doughnutMode=!1,this.chart=t.chart,this.options=t.options,this.ctx=t.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(t,e,i){this.maxWidth=t,this.maxHeight=e,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 t=this.options.labels||{};let e=B(t.generateLabels,[this.chart],this)||[];t.filter&&(e=e.filter(i=>t.filter(i,this.chart.data))),t.sort&&(e=e.sort((i,n)=>t.sort(i,n,this.chart.data))),this.options.reverse&&e.reverse(),this.legendItems=e}fit(){const{options:t,ctx:e}=this;if(!t.display){this.width=this.height=0;return}const i=t.labels,n=q(i.font),o=n.size,r=this._computeTitleHeight(),{boxWidth:a,itemHeight:l}=an(i,o);let c,h;e.font=n.string,this.isHorizontal()?(c=this.maxWidth,h=this._fitRows(r,o,a,l)+10):(h=this.maxHeight,c=this._fitCols(r,n,a,l)+10),this.width=Math.min(c,t.maxWidth||this.maxWidth),this.height=Math.min(h,t.maxHeight||this.maxHeight)}_fitRows(t,e,i,n){const{ctx:o,maxWidth:r,options:{labels:{padding:a}}}=this,l=this.legendHitBoxes=[],c=this.lineWidths=[0],h=n+a;let d=t;o.textAlign="left",o.textBaseline="middle";let u=-1,f=-h;return this.legendItems.forEach((g,m)=>{const b=i+e/2+o.measureText(g.text).width;(m===0||c[c.length-1]+b+2*a>r)&&(d+=h,c[c.length-(m>0?0:1)]=0,f+=h,u++),l[m]={left:0,top:f,row:u,width:b,height:n},c[c.length-1]+=b+a}),d}_fitCols(t,e,i,n){const{ctx:o,maxHeight:r,options:{labels:{padding:a}}}=this,l=this.legendHitBoxes=[],c=this.columnSizes=[],h=r-t;let d=a,u=0,f=0,g=0,m=0;return this.legendItems.forEach((b,_)=>{const{itemWidth:y,itemHeight:S}=nd(i,e,o,b,n);_>0&&f+S+2*a>h&&(d+=u+a,c.push({width:u,height:f}),g+=u+a,m++,u=f=0),l[_]={left:g,top:f,col:m,width:y,height:S},u=Math.max(u,y),f+=S+a}),d+=u,c.push({width:u,height:f}),d}adjustHitBoxes(){if(!this.options.display)return;const t=this._computeTitleHeight(),{legendHitBoxes:e,options:{align:i,labels:{padding:n},rtl:o}}=this,r=Zt(o,this.left,this.width);if(this.isHorizontal()){let a=0,l=J(i,this.left+n,this.right-this.lineWidths[a]);for(const c of e)a!==c.row&&(a=c.row,l=J(i,this.left+n,this.right-this.lineWidths[a])),c.top+=this.top+t+n,c.left=r.leftForLtr(r.x(l),c.width),l+=c.width+n}else{let a=0,l=J(i,this.top+t+n,this.bottom-this.columnSizes[a].height);for(const c of e)c.col!==a&&(a=c.col,l=J(i,this.top+t+n,this.bottom-this.columnSizes[a].height)),c.top=l,c.left+=this.left+n,c.left=r.leftForLtr(r.x(c.left),c.width),l+=c.height+n}}isHorizontal(){return this.options.position==="top"||this.options.position==="bottom"}draw(){if(this.options.display){const t=this.ctx;Gs(t,this),this._draw(),Js(t)}}_draw(){const{options:t,columnSizes:e,lineWidths:i,ctx:n}=this,{align:o,labels:r}=t,a=j.color,l=Zt(t.rtl,this.left,this.width),c=q(r.font),{padding:h}=r,d=c.size,u=d/2;let f;this.drawTitle(),n.textAlign=l.textAlign("left"),n.textBaseline="middle",n.lineWidth=.5,n.font=c.string;const{boxWidth:g,boxHeight:m,itemHeight:b}=an(r,d),_=function(x,w,k){if(isNaN(g)||g<=0||isNaN(m)||m<0)return;n.save();const C=L(k.lineWidth,1);if(n.fillStyle=L(k.fillStyle,a),n.lineCap=L(k.lineCap,"butt"),n.lineDashOffset=L(k.lineDashOffset,0),n.lineJoin=L(k.lineJoin,"miter"),n.lineWidth=C,n.strokeStyle=L(k.strokeStyle,a),n.setLineDash(L(k.lineDash,[])),r.usePointStyle){const I={radius:m*Math.SQRT2/2,pointStyle:k.pointStyle,rotation:k.rotation,borderWidth:C},A=l.xPlus(x,g/2),T=w+u;Gn(n,I,A,T,r.pointStyleWidth&&g)}else{const I=w+Math.max((d-m)/2,0),A=l.leftForLtr(x,g),T=Qt(k.borderRadius);n.beginPath(),Object.values(T).some(Q=>Q!==0)?ss(n,{x:A,y:I,w:g,h:m,radius:T}):n.rect(A,I,g,m),n.fill(),C!==0&&n.stroke()}n.restore()},y=function(x,w,k){Ce(n,k.text,x,w+b/2,c,{strikethrough:k.hidden,textAlign:l.textAlign(k.textAlign)})},S=this.isHorizontal(),M=this._computeTitleHeight();S?f={x:J(o,this.left+h,this.right-i[0]),y:this.top+h+M,line:0}:f={x:this.left+h,y:J(o,this.top+M+h,this.bottom-e[0].height),line:0},io(this.ctx,t.textDirection);const v=b+h;this.legendItems.forEach((x,w)=>{n.strokeStyle=x.fontColor,n.fillStyle=x.fontColor;const k=n.measureText(x.text).width,C=l.textAlign(x.textAlign||(x.textAlign=r.textAlign)),I=g+u+k;let A=f.x,T=f.y;l.setWidth(this.width),S?w>0&&A+I+h>this.right&&(T=f.y+=v,f.line++,A=f.x=J(o,this.left+h,this.right-i[f.line])):w>0&&T+v>this.bottom&&(A=f.x=A+e[f.line].width+h,f.line++,T=f.y=J(o,this.top+M+h,this.bottom-e[f.line].height));const Q=l.x(A);if(_(Q,T,x),A=il(C,A+g+u,S?A+I:this.right,t.rtl),y(l.x(A),T,x),S)f.x+=I+h;else if(typeof x.text!="string"){const N=c.lineHeight;f.y+=ko(x,N)+h}else f.y+=v}),no(this.ctx,t.textDirection)}drawTitle(){const t=this.options,e=t.title,i=q(e.font),n=ht(e.padding);if(!e.display)return;const o=Zt(t.rtl,this.left,this.width),r=this.ctx,a=e.position,l=i.size/2,c=n.top+l;let h,d=this.left,u=this.width;if(this.isHorizontal())u=Math.max(...this.lineWidths),h=this.top+c,d=J(t.align,d,this.right-u);else{const g=this.columnSizes.reduce((m,b)=>Math.max(m,b.height),0);h=c+J(t.align,this.top,this.bottom-g-t.labels.padding-this._computeTitleHeight())}const f=J(a,d,d+u);r.textAlign=o.textAlign(Ks(a)),r.textBaseline="middle",r.strokeStyle=e.color,r.fillStyle=e.color,r.font=i.string,Ce(r,e.text,f,h,i)}_computeTitleHeight(){const t=this.options.title,e=q(t.font),i=ht(t.padding);return t.display?e.lineHeight+i.height:0}_getLegendItemAt(t,e){let i,n,o;if(Nt(t,this.left,this.right)&&Nt(e,this.top,this.bottom)){for(o=this.legendHitBoxes,i=0;io.length>r.length?o:r)),t+e.size/2+i.measureText(n).width}function rd(s,t,e){let i=s;return typeof t.text!="string"&&(i=ko(t,e)),i}function ko(s,t){const e=s.text?s.text.length:0;return t*e}function ad(s,t){return!!((s==="mousemove"||s==="mouseout")&&(t.onHover||t.onLeave)||t.onClick&&(s==="click"||s==="mouseup"))}var ld={id:"legend",_element:ln,start(s,t,e){const i=s.legend=new ln({ctx:s.ctx,options:e,chart:s});lt.configure(s,i,e),lt.addBox(s,i)},stop(s){lt.removeBox(s,s.legend),delete s.legend},beforeUpdate(s,t,e){const i=s.legend;lt.configure(s,i,e),i.options=e},afterUpdate(s){const t=s.legend;t.buildLabels(),t.adjustHitBoxes()},afterEvent(s,t){t.replay||s.legend.handleEvent(t.event)},defaults:{display:!0,position:"top",align:"center",fullSize:!0,reverse:!1,weight:1e3,onClick(s,t,e){const i=t.datasetIndex,n=e.chart;n.isDatasetVisible(i)?(n.hide(i),t.hidden=!0):(n.show(i),t.hidden=!1)},onHover:null,onLeave:null,labels:{color:s=>s.chart.options.color,boxWidth:40,padding:10,generateLabels(s){const t=s.data.datasets,{labels:{usePointStyle:e,pointStyle:i,textAlign:n,color:o,useBorderRadius:r,borderRadius:a}}=s.legend.options;return s._getSortedDatasetMetas().map(l=>{const c=l.controller.getStyle(e?0:void 0),h=ht(c.borderWidth);return{text:t[l.index].label,fillStyle:c.backgroundColor,fontColor:o,hidden:!l.visible,lineCap:c.borderCapStyle,lineDash:c.borderDash,lineDashOffset:c.borderDashOffset,lineJoin:c.borderJoinStyle,lineWidth:(h.width+h.height)/4,strokeStyle:c.borderColor,pointStyle:i||c.pointStyle,rotation:c.rotation,textAlign:n||c.textAlign,borderRadius:r&&(a||c.borderRadius),datasetIndex:l.index}},this)}},title:{color:s=>s.chart.options.color,display:!1,position:"center",text:""}},descriptors:{_scriptable:s=>!s.startsWith("on"),labels:{_scriptable:s=>!["generateLabels","filter","sort"].includes(s)}}};class Mo extends Ot{constructor(t){super(),this.chart=t.chart,this.options=t.options,this.ctx=t.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(t,e){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=t,this.height=this.bottom=e;const n=Y(i.text)?i.text.length:1;this._padding=ht(i.padding);const o=n*q(i.font).lineHeight+this._padding.height;this.isHorizontal()?this.height=o:this.width=o}isHorizontal(){const t=this.options.position;return t==="top"||t==="bottom"}_drawArgs(t){const{top:e,left:i,bottom:n,right:o,options:r}=this,a=r.align;let l=0,c,h,d;return this.isHorizontal()?(h=J(a,i,o),d=e+t,c=o-i):(r.position==="left"?(h=i+t,d=J(a,n,e),l=X*-.5):(h=o-t,d=J(a,e,n),l=X*.5),c=n-e),{titleX:h,titleY:d,maxWidth:c,rotation:l}}draw(){const t=this.ctx,e=this.options;if(!e.display)return;const i=q(e.font),o=i.lineHeight/2+this._padding.top,{titleX:r,titleY:a,maxWidth:l,rotation:c}=this._drawArgs(o);Ce(t,e.text,0,0,i,{color:e.color,maxWidth:l,rotation:c,textAlign:Ks(e.align),textBaseline:"middle",translation:[r,a]})}}function cd(s,t){const e=new Mo({ctx:s.ctx,options:t,chart:s});lt.configure(s,e,t),lt.addBox(s,e),s.titleBlock=e}var hd={id:"title",_element:Mo,start(s,t,e){cd(s,e)},stop(s){const t=s.titleBlock;lt.removeBox(s,t),delete s.titleBlock},beforeUpdate(s,t,e){const i=s.titleBlock;lt.configure(s,i,e),i.options=e},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 pe={average(s){if(!s.length)return!1;let t,e,i=new Set,n=0,o=0;for(t=0,e=s.length;ta+l)/i.size,y:n/o}},nearest(s,t){if(!s.length)return!1;let e=t.x,i=t.y,n=Number.POSITIVE_INFINITY,o,r,a;for(o=0,r=s.length;o-1?s.split(` +`):s}function dd(s,t){const{element:e,datasetIndex:i,index:n}=t,o=s.getDatasetMeta(i).controller,{label:r,value:a}=o.getLabelAndValue(n);return{chart:s,label:r,parsed:o.getParsed(n),raw:s.data.datasets[i].data[n],formattedValue:a,dataset:o.getDataset(),dataIndex:n,datasetIndex:i,element:e}}function cn(s,t){const e=s.chart.ctx,{body:i,footer:n,title:o}=s,{boxWidth:r,boxHeight:a}=t,l=q(t.bodyFont),c=q(t.titleFont),h=q(t.footerFont),d=o.length,u=n.length,f=i.length,g=ht(t.padding);let m=g.height,b=0,_=i.reduce((M,v)=>M+v.before.length+v.lines.length+v.after.length,0);if(_+=s.beforeBody.length+s.afterBody.length,d&&(m+=d*c.lineHeight+(d-1)*t.titleSpacing+t.titleMarginBottom),_){const M=t.displayColors?Math.max(a,l.lineHeight):l.lineHeight;m+=f*M+(_-f)*l.lineHeight+(_-1)*t.bodySpacing}u&&(m+=t.footerMarginTop+u*h.lineHeight+(u-1)*t.footerSpacing);let y=0;const S=function(M){b=Math.max(b,e.measureText(M).width+y)};return e.save(),e.font=c.string,E(s.title,S),e.font=l.string,E(s.beforeBody.concat(s.afterBody),S),y=t.displayColors?r+2+t.boxPadding:0,E(i,M=>{E(M.before,S),E(M.lines,S),E(M.after,S)}),y=0,e.font=h.string,E(s.footer,S),e.restore(),b+=g.width,{width:b,height:m}}function ud(s,t){const{y:e,height:i}=t;return es.height-i/2?"bottom":"center"}function fd(s,t,e,i){const{x:n,width:o}=i,r=e.caretSize+e.caretPadding;if(s==="left"&&n+o+r>t.width||s==="right"&&n-o-r<0)return!0}function gd(s,t,e,i){const{x:n,width:o}=e,{width:r,chartArea:{left:a,right:l}}=s;let c="center";return i==="center"?c=n<=(a+l)/2?"left":"right":n<=o/2?c="left":n>=r-o/2&&(c="right"),fd(c,s,t,e)&&(c="center"),c}function hn(s,t,e){const i=e.yAlign||t.yAlign||ud(s,e);return{xAlign:e.xAlign||t.xAlign||gd(s,t,e,i),yAlign:i}}function pd(s,t){let{x:e,width:i}=s;return t==="right"?e-=i:t==="center"&&(e-=i/2),e}function md(s,t,e){let{y:i,height:n}=s;return t==="top"?i+=e:t==="bottom"?i-=n+e:i-=n/2,i}function dn(s,t,e,i){const{caretSize:n,caretPadding:o,cornerRadius:r}=s,{xAlign:a,yAlign:l}=e,c=n+o,{topLeft:h,topRight:d,bottomLeft:u,bottomRight:f}=Qt(r);let g=pd(t,a);const m=md(t,l,c);return l==="center"?a==="left"?g+=c:a==="right"&&(g-=c):a==="left"?g-=Math.max(h,u)+n:a==="right"&&(g+=Math.max(d,f)+n),{x:it(g,0,i.width-t.width),y:it(m,0,i.height-t.height)}}function Ye(s,t,e){const i=ht(e.padding);return t==="center"?s.x+s.width/2:t==="right"?s.x+s.width-i.right:s.x+i.left}function un(s){return ft([],vt(s))}function bd(s,t,e){return Yt(s,{tooltip:t,tooltipItems:e,type:"tooltip"})}function fn(s,t){const e=t&&t.dataset&&t.dataset.tooltip&&t.dataset.tooltip.callbacks;return e?s.override(e):s}const Po={beforeTitle:xt,title(s){if(s.length>0){const t=s[0],e=t.chart.data.labels,i=e?e.length:0;if(this&&this.options&&this.options.mode==="dataset")return t.dataset.label||"";if(t.label)return t.label;if(i>0&&t.dataIndex"u"?Po[t].call(e,i):n}class gn extends Ot{static positioners=pe;constructor(t){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=t.chart,this.options=t.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(t){this.options=t,this._cachedAnimations=void 0,this.$context=void 0}_resolveAnimations(){const t=this._cachedAnimations;if(t)return t;const e=this.chart,i=this.options.setContext(this.getContext()),n=i.enabled&&e.options.animation&&i.animations,o=new ro(this.chart,n);return n._cacheable&&(this._cachedAnimations=Object.freeze(o)),o}getContext(){return this.$context||(this.$context=bd(this.chart.getContext(),this,this._tooltipItems))}getTitle(t,e){const{callbacks:i}=e,n=Z(i,"beforeTitle",this,t),o=Z(i,"title",this,t),r=Z(i,"afterTitle",this,t);let a=[];return a=ft(a,vt(n)),a=ft(a,vt(o)),a=ft(a,vt(r)),a}getBeforeBody(t,e){return un(Z(e.callbacks,"beforeBody",this,t))}getBody(t,e){const{callbacks:i}=e,n=[];return E(t,o=>{const r={before:[],lines:[],after:[]},a=fn(i,o);ft(r.before,vt(Z(a,"beforeLabel",this,o))),ft(r.lines,Z(a,"label",this,o)),ft(r.after,vt(Z(a,"afterLabel",this,o))),n.push(r)}),n}getAfterBody(t,e){return un(Z(e.callbacks,"afterBody",this,t))}getFooter(t,e){const{callbacks:i}=e,n=Z(i,"beforeFooter",this,t),o=Z(i,"footer",this,t),r=Z(i,"afterFooter",this,t);let a=[];return a=ft(a,vt(n)),a=ft(a,vt(o)),a=ft(a,vt(r)),a}_createItems(t){const e=this._active,i=this.chart.data,n=[],o=[],r=[];let a=[],l,c;for(l=0,c=e.length;lt.filter(h,d,u,i))),t.itemSort&&(a=a.sort((h,d)=>t.itemSort(h,d,i))),E(a,h=>{const d=fn(t.callbacks,h);n.push(Z(d,"labelColor",this,h)),o.push(Z(d,"labelPointStyle",this,h)),r.push(Z(d,"labelTextColor",this,h))}),this.labelColors=n,this.labelPointStyles=o,this.labelTextColors=r,this.dataPoints=a,a}update(t,e){const i=this.options.setContext(this.getContext()),n=this._active;let o,r=[];if(!n.length)this.opacity!==0&&(o={opacity:0});else{const a=pe[i.position].call(this,n,this._eventPosition);r=this._createItems(i),this.title=this.getTitle(r,i),this.beforeBody=this.getBeforeBody(r,i),this.body=this.getBody(r,i),this.afterBody=this.getAfterBody(r,i),this.footer=this.getFooter(r,i);const l=this._size=cn(this,i),c=Object.assign({},a,l),h=hn(this.chart,i,c),d=dn(i,c,h,this.chart);this.xAlign=h.xAlign,this.yAlign=h.yAlign,o={opacity:1,x:d.x,y:d.y,width:l.width,height:l.height,caretX:a.x,caretY:a.y}}this._tooltipItems=r,this.$context=void 0,o&&this._resolveAnimations().update(this,o),t&&i.external&&i.external.call(this,{chart:this.chart,tooltip:this,replay:e})}drawCaret(t,e,i,n){const o=this.getCaretPosition(t,i,n);e.lineTo(o.x1,o.y1),e.lineTo(o.x2,o.y2),e.lineTo(o.x3,o.y3)}getCaretPosition(t,e,i){const{xAlign:n,yAlign:o}=this,{caretSize:r,cornerRadius:a}=i,{topLeft:l,topRight:c,bottomLeft:h,bottomRight:d}=Qt(a),{x:u,y:f}=t,{width:g,height:m}=e;let b,_,y,S,M,v;return o==="center"?(M=f+m/2,n==="left"?(b=u,_=b-r,S=M+r,v=M-r):(b=u+g,_=b+r,S=M-r,v=M+r),y=b):(n==="left"?_=u+Math.max(l,h)+r:n==="right"?_=u+g-Math.max(c,d)-r:_=this.caretX,o==="top"?(S=f,M=S-r,b=_-r,y=_+r):(S=f+m,M=S+r,b=_+r,y=_-r),v=S),{x1:b,x2:_,x3:y,y1:S,y2:M,y3:v}}drawTitle(t,e,i){const n=this.title,o=n.length;let r,a,l;if(o){const c=Zt(i.rtl,this.x,this.width);for(t.x=Ye(this,i.titleAlign,i),e.textAlign=c.textAlign(i.titleAlign),e.textBaseline="middle",r=q(i.titleFont),a=i.titleSpacing,e.fillStyle=i.titleColor,e.font=r.string,l=0;ly!==0)?(t.beginPath(),t.fillStyle=o.multiKeyBackground,ss(t,{x:m,y:g,w:c,h:l,radius:_}),t.fill(),t.stroke(),t.fillStyle=r.backgroundColor,t.beginPath(),ss(t,{x:b,y:g+1,w:c-2,h:l-2,radius:_}),t.fill()):(t.fillStyle=o.multiKeyBackground,t.fillRect(m,g,c,l),t.strokeRect(m,g,c,l),t.fillStyle=r.backgroundColor,t.fillRect(b,g+1,c-2,l-2))}t.fillStyle=this.labelTextColors[i]}drawBody(t,e,i){const{body:n}=this,{bodySpacing:o,bodyAlign:r,displayColors:a,boxHeight:l,boxWidth:c,boxPadding:h}=i,d=q(i.bodyFont);let u=d.lineHeight,f=0;const g=Zt(i.rtl,this.x,this.width),m=function(k){e.fillText(k,g.x(t.x+f),t.y+u/2),t.y+=u+o},b=g.textAlign(r);let _,y,S,M,v,x,w;for(e.textAlign=r,e.textBaseline="middle",e.font=d.string,t.x=Ye(this,b,i),e.fillStyle=i.bodyColor,E(this.beforeBody,m),f=a&&b!=="right"?r==="center"?c/2+h:c+2+h:0,M=0,x=n.length;M0&&e.stroke()}_updateAnimationTarget(t){const e=this.chart,i=this.$animations,n=i&&i.x,o=i&&i.y;if(n||o){const r=pe[t.position].call(this,this._active,this._eventPosition);if(!r)return;const a=this._size=cn(this,t),l=Object.assign({},r,this._size),c=hn(e,t,l),h=dn(t,l,c,e);(n._to!==h.x||o._to!==h.y)&&(this.xAlign=c.xAlign,this.yAlign=c.yAlign,this.width=a.width,this.height=a.height,this.caretX=r.x,this.caretY=r.y,this._resolveAnimations().update(this,h))}}_willRender(){return!!this.opacity}draw(t){const e=this.options.setContext(this.getContext());let i=this.opacity;if(!i)return;this._updateAnimationTarget(e);const n={width:this.width,height:this.height},o={x:this.x,y:this.y};i=Math.abs(i)<.001?0:i;const r=ht(e.padding),a=this.title.length||this.beforeBody.length||this.body.length||this.afterBody.length||this.footer.length;e.enabled&&a&&(t.save(),t.globalAlpha=i,this.drawBackground(o,t,n,e),io(t,e.textDirection),o.y+=r.top,this.drawTitle(o,t,e),this.drawBody(o,t,e),this.drawFooter(o,t,e),no(t,e.textDirection),t.restore())}getActiveElements(){return this._active||[]}setActiveElements(t,e){const i=this._active,n=t.map(({datasetIndex:a,index:l})=>{const c=this.chart.getDatasetMeta(a);if(!c)throw new Error("Cannot find a dataset at index "+a);return{datasetIndex:a,element:c.data[l],index:l}}),o=!Ze(i,n),r=this._positionChanged(n,e);(o||r)&&(this._active=n,this._eventPosition=e,this._ignoreReplayEvents=!0,this.update(!0))}handleEvent(t,e,i=!0){if(e&&this._ignoreReplayEvents)return!1;this._ignoreReplayEvents=!1;const n=this.options,o=this._active||[],r=this._getActiveElements(t,o,e,i),a=this._positionChanged(r,t),l=e||!Ze(r,o)||a;return l&&(this._active=r,(n.enabled||n.external)&&(this._eventPosition={x:t.x,y:t.y},this.update(!0,e))),l}_getActiveElements(t,e,i,n){const o=this.options;if(t.type==="mouseout")return[];if(!n)return e.filter(a=>this.chart.data.datasets[a.datasetIndex]&&this.chart.getDatasetMeta(a.datasetIndex).controller.getParsed(a.index)!==void 0);const r=this.chart.getElementsAtEventForMode(t,o.mode,o,i);return o.reverse&&r.reverse(),r}_positionChanged(t,e){const{caretX:i,caretY:n,options:o}=this,r=pe[o.position].call(this,t,e);return r!==!1&&(i!==r.x||n!==r.y)}}var _d={id:"tooltip",_element:gn,positioners:pe,afterInit(s,t,e){e&&(s.tooltip=new gn({chart:s,options:e}))},beforeUpdate(s,t,e){s.tooltip&&s.tooltip.initialize(e)},reset(s,t,e){s.tooltip&&s.tooltip.initialize(e)},afterDraw(s){const t=s.tooltip;if(t&&t._willRender()){const e={tooltip:t};if(s.notifyPlugins("beforeTooltipDraw",{...e,cancelable:!0})===!1)return;t.draw(s.ctx),s.notifyPlugins("afterTooltipDraw",e)}},afterEvent(s,t){if(s.tooltip){const e=t.replay;s.tooltip.handleEvent(t.event,e,t.inChartArea)&&(t.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:(s,t)=>t.bodyFont.size,boxWidth:(s,t)=>t.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:Po},defaultRoutes:{bodyFont:"font",footerFont:"font",titleFont:"font"},descriptors:{_scriptable:s=>s!=="filter"&&s!=="itemSort"&&s!=="external",_indexable:!1,callbacks:{_scriptable:!1,_indexable:!1},animation:{_fallback:!1},animations:{_fallback:"animation"}},additionalOptionScopes:["interaction"]};const xd=(s,t,e,i)=>(typeof t=="string"?(e=s.push(t)-1,i.unshift({index:e,label:t})):isNaN(t)&&(e=null),e);function yd(s,t,e,i){const n=s.indexOf(t);if(n===-1)return xd(s,t,e,i);const o=s.lastIndexOf(t);return n!==o?e:n}const vd=(s,t)=>s===null?null:it(Math.round(s),0,t);function pn(s){const t=this.getLabels();return s>=0&&se.length-1?null:this.getPixelForValue(e[t].value)}getValueForPixel(t){return Math.round(this._startValue+this.getDecimalForPixel(t)*this._valueRange)}getBasePixel(){return this.bottom}}function wd(s,t){const e=[],{bounds:n,step:o,min:r,max:a,precision:l,count:c,maxTicks:h,maxDigits:d,includeBounds:u}=s,f=o||1,g=h-1,{min:m,max:b}=t,_=!z(r),y=!z(a),S=!z(c),M=(b-m)/(d+1);let v=gi((b-m)/g/f)*f,x,w,k,C;if(v<1e-14&&!_&&!y)return[{value:m},{value:b}];C=Math.ceil(b/v)-Math.floor(m/v),C>g&&(v=gi(C*v/g/f)*f),z(l)||(x=Math.pow(10,l),v=Math.ceil(v*x)/x),n==="ticks"?(w=Math.floor(m/v)*v,k=Math.ceil(b/v)*v):(w=m,k=b),_&&y&&o&&Ka((a-r)/o,v/1e3)?(C=Math.round(Math.min((a-r)/v,h)),v=(a-r)/C,w=r,k=a):S?(w=_?r:w,k=y?a:k,C=c-1,v=(k-w)/C):(C=(k-w)/v,_e(C,Math.round(C),v/1e3)?C=Math.round(C):C=Math.ceil(C));const I=Math.max(pi(v),pi(w));x=Math.pow(10,z(l)?I:l),w=Math.round(w*x)/x,k=Math.round(k*x)/x;let A=0;for(_&&(u&&w!==r?(e.push({value:r}),wa)break;e.push({value:T})}return y&&u&&k!==a?e.length&&_e(e[e.length-1].value,a,mn(a,M,s))?e[e.length-1].value=a:e.push({value:a}):(!y||k===a)&&e.push({value:k}),e}function mn(s,t,{horizontal:e,minRotation:i}){const n=$t(i),o=(e?Math.sin(n):Math.cos(n))||.001,r=.75*t*(""+s).length;return Math.min(t/o,r)}class kd extends ie{constructor(t){super(t),this.start=void 0,this.end=void 0,this._startValue=void 0,this._endValue=void 0,this._valueRange=0}parse(t,e){return z(t)||(typeof t=="number"||t instanceof Number)&&!isFinite(+t)?null:+t}handleTickRangeOptions(){const{beginAtZero:t}=this.options,{minDefined:e,maxDefined:i}=this.getUserBounds();let{min:n,max:o}=this;const r=l=>n=e?n:l,a=l=>o=i?o:l;if(t){const l=bt(n),c=bt(o);l<0&&c<0?a(0):l>0&&c>0&&r(0)}if(n===o){let l=o===0?1:Math.abs(o*.05);a(o+l),t||r(n-l)}this.min=n,this.max=o}getTickLimit(){const t=this.options.ticks;let{maxTicksLimit:e,stepSize:i}=t,n;return i?(n=Math.ceil(this.max/i)-Math.floor(this.min/i)+1,n>1e3&&(console.warn(`scales.${this.id}.ticks.stepSize: ${i} would result generating up to ${n} ticks. Limiting to 1000.`),n=1e3)):(n=this.computeTickLimit(),e=e||11),e&&(n=Math.min(e,n)),n}computeTickLimit(){return Number.POSITIVE_INFINITY}buildTicks(){const t=this.options,e=t.ticks;let i=this.getTickLimit();i=Math.max(2,i);const n={maxTicks:i,bounds:t.bounds,min:t.min,max:t.max,precision:e.precision,step:e.stepSize,count:e.count,maxDigits:this._maxDigits(),horizontal:this.isHorizontal(),minRotation:e.minRotation||0,includeBounds:e.includeBounds!==!1},o=this._range||this,r=wd(n,o);return t.bounds==="ticks"&&Xa(r,this,"value"),t.reverse?(r.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),r}configure(){const t=this.ticks;let e=this.min,i=this.max;if(super.configure(),this.options.offset&&t.length){const n=(i-e)/Math.max(t.length-1,1)/2;e-=n,i+=n}this._startValue=e,this._endValue=i,this._valueRange=i-e}getLabelForValue(t){return Yn(t,this.chart.options.locale,this.options.ticks.format)}}class Md extends kd{static id="linear";static defaults={ticks:{callback:Xn.formatters.numeric}};determineDataLimits(){const{min:t,max:e}=this.getMinMax(!0);this.min=ct(t)?t:0,this.max=ct(e)?e:1,this.handleTickRangeOptions()}computeTickLimit(){const t=this.isHorizontal(),e=t?this.width:this.height,i=$t(this.options.ticks.minRotation),n=(t?Math.sin(i):Math.cos(i))||.001,o=this._resolveTickFontOptions(0);return Math.ceil(e/Math.min(40,o.lineHeight/n))}getPixelForValue(t){return t===null?NaN:this.getPixelForDecimal((t-this._startValue)/this._valueRange)}getValueForPixel(t){return this._startValue+this.getDecimalForPixel(t)*this._valueRange}}const hs={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}},et=Object.keys(hs);function bn(s,t){return s-t}function _n(s,t){if(z(t))return null;const e=s._adapter,{parser:i,round:n,isoWeekday:o}=s._parseOpts;let r=t;return typeof i=="function"&&(r=i(r)),ct(r)||(r=typeof i=="string"?e.parse(r,i):e.parse(r)),r===null?null:(n&&(r=n==="week"&&(Me(o)||o===!0)?e.startOf(r,"isoWeek",o):e.startOf(r,n)),+r)}function xn(s,t,e,i){const n=et.length;for(let o=et.indexOf(s);o=et.indexOf(e);o--){const r=et[o];if(hs[r].common&&s._adapter.diff(n,i,r)>=t-1)return r}return et[e?et.indexOf(e):0]}function Cd(s){for(let t=et.indexOf(s)+1,e=et.length;t=t?e[i]:e[n];s[o]=!0}}function Dd(s,t,e,i){const n=s._adapter,o=+n.startOf(t[0].value,i),r=t[t.length-1].value;let a,l;for(a=o;a<=r;a=+n.add(a,1,i))l=e[a],l>=0&&(t[l].major=!0);return t}function vn(s,t,e){const i=[],n={},o=t.length;let r,a;for(r=0;r+t.value))}initOffsets(t=[]){let e=0,i=0,n,o;this.options.offset&&t.length&&(n=this.getDecimalForValue(t[0]),t.length===1?e=1-n:e=(this.getDecimalForValue(t[1])-n)/2,o=this.getDecimalForValue(t[t.length-1]),t.length===1?i=o:i=(o-this.getDecimalForValue(t[t.length-2]))/2);const r=t.length<3?.5:.25;e=it(e,0,r),i=it(i,0,r),this._offsets={start:e,end:i,factor:1/(e+1+i)}}_generate(){const t=this._adapter,e=this.min,i=this.max,n=this.options,o=n.time,r=o.unit||xn(o.minUnit,e,i,this._getLabelCapacity(e)),a=L(n.ticks.stepSize,1),l=r==="week"?o.isoWeekday:!1,c=Me(l)||l===!0,h={};let d=e,u,f;if(c&&(d=+t.startOf(d,"isoWeek",l)),d=+t.startOf(d,c?"day":r),t.diff(i,e,r)>1e5*a)throw new Error(e+" and "+i+" are too far apart with stepSize of "+a+" "+r);const g=n.ticks.source==="data"&&this.getDataTimestamps();for(u=d,f=0;u+m)}getLabelForValue(t){const e=this._adapter,i=this.options.time;return i.tooltipFormat?e.format(t,i.tooltipFormat):e.format(t,i.displayFormats.datetime)}format(t,e){const n=this.options.time.displayFormats,o=this._unit,r=e||n[o];return this._adapter.format(t,r)}_tickFormatFunction(t,e,i,n){const o=this.options,r=o.ticks.callback;if(r)return B(r,[t,e,i],this);const a=o.time.displayFormats,l=this._unit,c=this._majorUnit,h=l&&a[l],d=c&&a[c],u=i[e],f=c&&d&&u&&u.major;return this._adapter.format(t,n||(f?d:h))}generateTickLabels(t){let e,i,n;for(e=0,i=t.length;e0?a:1}getDataTimestamps(){let t=this._cache.data||[],e,i;if(t.length)return t;const n=this.getMatchingVisibleMetas();if(this._normalized&&n.length)return this._cache.data=n[0].controller.getAllParsedValues(this);for(e=0,i=n.length;e=s[i].pos&&t<=s[n].pos&&({lo:i,hi:n}=Ht(s,"pos",t)),{pos:o,time:a}=s[i],{pos:r,time:l}=s[n]):(t>=s[i].time&&t<=s[n].time&&({lo:i,hi:n}=Ht(s,"time",t)),{time:o,pos:a}=s[i],{time:r,pos:l}=s[n]);const c=r-o;return c?a+(l-a)*(t-o)/c:a}class Hf extends Sn{static id="timeseries";static defaults=Sn.defaults;constructor(t){super(t),this._table=[],this._minPos=void 0,this._tableRange=void 0}initOffsets(){const t=this._getTimestampsForTable(),e=this._table=this.buildLookupTable(t);this._minPos=Ke(e,this.min),this._tableRange=Ke(e,this.max)-this._minPos,super.initOffsets(t)}buildLookupTable(t){const{min:e,max:i}=this,n=[],o=[];let r,a,l,c,h;for(r=0,a=t.length;r=e&&c<=i&&n.push(c);if(n.length<2)return[{time:e,pos:0},{time:i,pos:1}];for(r=0,a=n.length;rn-o)}_getTimestampsForTable(){let t=this._cache.all||[];if(t.length)return t;const e=this.getDataTimestamps(),i=this.getLabelTimestamps();return e.length&&i.length?t=this.normalize(e.concat(i)):t=e.length?e:i,t=this._cache.all=t,t}getDecimalForValue(t){return(Ke(this._table,t)-this._minPos)/this._tableRange}getValueForPixel(t){const e=this._offsets,i=this.getDecimalForPixel(t)/e.factor-e.end;return Ke(this._table,i*this._tableRange+this._minPos,!0)}}const Co={data:{type:Object,required:!0},options:{type:Object,default:()=>({})},plugins:{type:Array,default:()=>[]},datasetIdKey:{type:String,default:"label"},updateMode:{type:String,default:void 0}},Od={ariaLabel:{type:String},ariaDescribedby:{type:String}},Ad={type:{type:String,required:!0},destroyDelay:{type:Number,default:0},...Co,...Od},Td=jo[0]==="2"?(s,t)=>Object.assign(s,{attrs:t}):(s,t)=>Object.assign(s,t);function Jt(s){return In(s)?Ps(s):s}function Ld(s){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:s;return In(t)?new Proxy(s,{}):s}function Id(s,t){const e=s.options;e&&t&&Object.assign(e,t)}function Do(s,t){s.labels=t}function Oo(s,t,e){const i=[];s.datasets=t.map(n=>{const o=s.datasets.find(r=>r[e]===n[e]);return!o||!n.data||i.includes(o)?{...n}:(i.push(o),Object.assign(o,n),o)})}function Rd(s,t){const e={labels:[],datasets:[]};return Do(e,s.labels),Oo(e,s.datasets,t),e}const Ed=Tn({props:Ad,setup(s,t){let{expose:e,slots:i}=t;const n=Qe(null),o=Ln(null);e({chart:o});const r=()=>{if(!n.value)return;const{type:c,data:h,options:d,plugins:u,datasetIdKey:f}=s,g=Rd(h,f),m=Ld(g,h);o.value=new cs(n.value,{type:c,data:m,options:{...d},plugins:u})},a=()=>{const c=Ps(o.value);c&&(s.destroyDelay>0?setTimeout(()=>{c.destroy(),o.value=null},s.destroyDelay):(c.destroy(),o.value=null))},l=c=>{c.update(s.updateMode)};return Uo(r),Yo(a),An([()=>s.options,()=>s.data],(c,h)=>{let[d,u]=c,[f,g]=h;const m=Ps(o.value);if(!m)return;let b=!1;if(d){const _=Jt(d),y=Jt(f);_&&_!==y&&(Id(m,_),b=!0)}if(u){const _=Jt(u.labels),y=Jt(g.labels),S=Jt(u.datasets),M=Jt(g.datasets);_!==y&&(Do(m.config.data,_),b=!0),S&&S!==M&&(Oo(m.config.data,S,s.datasetIdKey),b=!0)}b&&Ko(()=>{l(m)})},{deep:!0}),()=>Ms("canvas",{role:"img",ariaLabel:s.ariaLabel,ariaDescribedby:s.ariaDescribedby,ref:n},[Ms("p",{},[i.default?i.default():""])])}});function Ao(s,t){return cs.register(t),Tn({props:Co,setup(e,i){let{expose:n}=i;const o=Ln(null),r=a=>{o.value=a?.chart};return n({chart:o}),()=>Ms(Ed,Td({ref:r},{type:s,...e}))}})}const Fd=Ao("bar",co),zd=Ao("line",ho);function wt(s){return Array.isArray?Array.isArray(s):Io(s)==="[object Array]"}const Bd=1/0;function $d(s){if(typeof s=="string")return s;let t=s+"";return t=="0"&&1/s==-Bd?"-0":t}function Nd(s){return s==null?"":$d(s)}function pt(s){return typeof s=="string"}function To(s){return typeof s=="number"}function Hd(s){return s===!0||s===!1||Wd(s)&&Io(s)=="[object Boolean]"}function Lo(s){return typeof s=="object"}function Wd(s){return Lo(s)&&s!==null}function st(s){return s!=null}function ws(s){return!s.trim().length}function Io(s){return s==null?s===void 0?"[object Undefined]":"[object Null]":Object.prototype.toString.call(s)}const Vd="Incorrect 'index' type",jd=s=>`Invalid value for key ${s}`,Ud=s=>`Pattern length exceeds max of ${s}.`,Yd=s=>`Missing ${s} property in key`,Kd=s=>`Property 'weight' in key '${s}' must be a positive integer`,wn=Object.prototype.hasOwnProperty;class Xd{constructor(t){this._keys=[],this._keyMap={};let e=0;t.forEach(i=>{let n=Ro(i);this._keys.push(n),this._keyMap[n.id]=n,e+=n.weight}),this._keys.forEach(i=>{i.weight/=e})}get(t){return this._keyMap[t]}keys(){return this._keys}toJSON(){return JSON.stringify(this._keys)}}function Ro(s){let t=null,e=null,i=null,n=1,o=null;if(pt(s)||wt(s))i=s,t=kn(s),e=Es(s);else{if(!wn.call(s,"name"))throw new Error(Yd("name"));const r=s.name;if(i=r,wn.call(s,"weight")&&(n=s.weight,n<=0))throw new Error(Kd(r));t=kn(r),e=Es(r),o=s.getFn}return{path:t,id:e,weight:n,src:i,getFn:o}}function kn(s){return wt(s)?s:s.split(".")}function Es(s){return wt(s)?s.join("."):s}function Gd(s,t){let e=[],i=!1;const n=(o,r,a)=>{if(st(o))if(!r[a])e.push(o);else{let l=r[a];const c=o[l];if(!st(c))return;if(a===r.length-1&&(pt(c)||To(c)||Hd(c)))e.push(Nd(c));else if(wt(c)){i=!0;for(let h=0,d=c.length;hs.score===t.score?s.idx{this._keysMap[e.id]=i})}create(){this.isCreated||!this.docs.length||(this.isCreated=!0,pt(this.docs[0])?this.docs.forEach((t,e)=>{this._addString(t,e)}):this.docs.forEach((t,e)=>{this._addObject(t,e)}),this.norm.clear())}add(t){const e=this.size();pt(t)?this._addString(t,e):this._addObject(t,e)}removeAt(t){this.records.splice(t,1);for(let e=t,i=this.size();e{let r=n.getFn?n.getFn(t):this.getFn(t,n.path);if(st(r)){if(wt(r)){let a=[];const l=[{nestedArrIndex:-1,value:r}];for(;l.length;){const{nestedArrIndex:c,value:h}=l.pop();if(st(h))if(pt(h)&&!ws(h)){let d={v:h,i:c,n:this.norm.get(h)};a.push(d)}else wt(h)&&h.forEach((d,u)=>{l.push({nestedArrIndex:u,value:d})})}i.$[o]=a}else if(pt(r)&&!ws(r)){let a={v:r,n:this.norm.get(r)};i.$[o]=a}}}),this.records.push(i)}toJSON(){return{keys:this.keys,records:this.records}}}function Eo(s,t,{getFn:e=O.getFn,fieldNormWeight:i=O.fieldNormWeight}={}){const n=new ni({getFn:e,fieldNormWeight:i});return n.setKeys(s.map(Ro)),n.setSources(t),n.create(),n}function su(s,{getFn:t=O.getFn,fieldNormWeight:e=O.fieldNormWeight}={}){const{keys:i,records:n}=s,o=new ni({getFn:t,fieldNormWeight:e});return o.setKeys(i),o.setIndexRecords(n),o}function Xe(s,{errors:t=0,currentLocation:e=0,expectedLocation:i=0,distance:n=O.distance,ignoreLocation:o=O.ignoreLocation}={}){const r=t/s.length;if(o)return r;const a=Math.abs(i-e);return n?r+a/n:a?1:r}function iu(s=[],t=O.minMatchCharLength){let e=[],i=-1,n=-1,o=0;for(let r=s.length;o=t&&e.push([i,n]),i=-1)}return s[o-1]&&o-i>=t&&e.push([i,o-1]),e}const Bt=32;function nu(s,t,e,{location:i=O.location,distance:n=O.distance,threshold:o=O.threshold,findAllMatches:r=O.findAllMatches,minMatchCharLength:a=O.minMatchCharLength,includeMatches:l=O.includeMatches,ignoreLocation:c=O.ignoreLocation}={}){if(t.length>Bt)throw new Error(Ud(Bt));const h=t.length,d=s.length,u=Math.max(0,Math.min(i,d));let f=o,g=u;const m=a>1||l,b=m?Array(d):[];let _;for(;(_=s.indexOf(t,g))>-1;){let w=Xe(t,{currentLocation:_,expectedLocation:u,distance:n,ignoreLocation:c});if(f=Math.min(w,f),g=_+h,m){let k=0;for(;k=I;N-=1){let F=N-1,U=e[s.charAt(F)];if(m&&(b[F]=+!!U),T[N]=(T[N+1]<<1|1)&U,w&&(T[N]|=(y[N+1]|y[N])<<1|1|y[N+1]),T[N]&v&&(S=Xe(t,{errors:w,currentLocation:F,expectedLocation:u,distance:n,ignoreLocation:c}),S<=f)){if(f=S,g=F,g<=u)break;I=Math.max(1,2*u-g)}}if(Xe(t,{errors:w+1,currentLocation:u,expectedLocation:u,distance:n,ignoreLocation:c})>f)break;y=T}const x={isMatch:g>=0,score:Math.max(.001,S)};if(m){const w=iu(b,a);w.length?l&&(x.indices=w):x.isMatch=!1}return x}function ou(s){let t={};for(let e=0,i=s.length;e{this.chunks.push({pattern:u,alphabet:ou(u),startIndex:f})},d=this.pattern.length;if(d>Bt){let u=0;const f=d%Bt,g=d-f;for(;u{const{isMatch:_,score:y,indices:S}=nu(t,g,m,{location:n+b,distance:o,threshold:r,findAllMatches:a,minMatchCharLength:l,includeMatches:i,ignoreLocation:c});_&&(u=!0),d+=y,_&&S&&(h=[...h,...S])});let f={isMatch:u,score:u?d/this.chunks.length:1};return u&&i&&(f.indices=h),f}}class At{constructor(t){this.pattern=t}static isMultiMatch(t){return Mn(t,this.multiRegex)}static isSingleMatch(t){return Mn(t,this.singleRegex)}search(){}}function Mn(s,t){const e=s.match(t);return e?e[1]:null}class ru extends At{constructor(t){super(t)}static get type(){return"exact"}static get multiRegex(){return/^="(.*)"$/}static get singleRegex(){return/^=(.*)$/}search(t){const e=t===this.pattern;return{isMatch:e,score:e?0:1,indices:[0,this.pattern.length-1]}}}class au extends At{constructor(t){super(t)}static get type(){return"inverse-exact"}static get multiRegex(){return/^!"(.*)"$/}static get singleRegex(){return/^!(.*)$/}search(t){const i=t.indexOf(this.pattern)===-1;return{isMatch:i,score:i?0:1,indices:[0,t.length-1]}}}class lu extends At{constructor(t){super(t)}static get type(){return"prefix-exact"}static get multiRegex(){return/^\^"(.*)"$/}static get singleRegex(){return/^\^(.*)$/}search(t){const e=t.startsWith(this.pattern);return{isMatch:e,score:e?0:1,indices:[0,this.pattern.length-1]}}}class cu extends At{constructor(t){super(t)}static get type(){return"inverse-prefix-exact"}static get multiRegex(){return/^!\^"(.*)"$/}static get singleRegex(){return/^!\^(.*)$/}search(t){const e=!t.startsWith(this.pattern);return{isMatch:e,score:e?0:1,indices:[0,t.length-1]}}}class hu extends At{constructor(t){super(t)}static get type(){return"suffix-exact"}static get multiRegex(){return/^"(.*)"\$$/}static get singleRegex(){return/^(.*)\$$/}search(t){const e=t.endsWith(this.pattern);return{isMatch:e,score:e?0:1,indices:[t.length-this.pattern.length,t.length-1]}}}class du extends At{constructor(t){super(t)}static get type(){return"inverse-suffix-exact"}static get multiRegex(){return/^!"(.*)"\$$/}static get singleRegex(){return/^!(.*)\$$/}search(t){const e=!t.endsWith(this.pattern);return{isMatch:e,score:e?0:1,indices:[0,t.length-1]}}}class zo extends At{constructor(t,{location:e=O.location,threshold:i=O.threshold,distance:n=O.distance,includeMatches:o=O.includeMatches,findAllMatches:r=O.findAllMatches,minMatchCharLength:a=O.minMatchCharLength,isCaseSensitive:l=O.isCaseSensitive,ignoreLocation:c=O.ignoreLocation}={}){super(t),this._bitapSearch=new Fo(t,{location:e,threshold:i,distance:n,includeMatches:o,findAllMatches:r,minMatchCharLength:a,isCaseSensitive:l,ignoreLocation:c})}static get type(){return"fuzzy"}static get multiRegex(){return/^"(.*)"$/}static get singleRegex(){return/^(.*)$/}search(t){return this._bitapSearch.searchIn(t)}}class Bo extends At{constructor(t){super(t)}static get type(){return"include"}static get multiRegex(){return/^'"(.*)"$/}static get singleRegex(){return/^'(.*)$/}search(t){let e=0,i;const n=[],o=this.pattern.length;for(;(i=t.indexOf(this.pattern,e))>-1;)e=i+o,n.push([i,e-1]);const r=!!n.length;return{isMatch:r,score:r?0:1,indices:n}}}const Fs=[ru,Bo,lu,cu,du,hu,au,zo],Pn=Fs.length,uu=/ +(?=(?:[^\"]*\"[^\"]*\")*[^\"]*$)/,fu="|";function gu(s,t={}){return s.split(fu).map(e=>{let i=e.trim().split(uu).filter(o=>o&&!!o.trim()),n=[];for(let o=0,r=i.length;o!!(s[os.AND]||s[os.OR]),_u=s=>!!s[$s.PATH],xu=s=>!wt(s)&&Lo(s)&&!Ns(s),Cn=s=>({[os.AND]:Object.keys(s).map(t=>({[t]:s[t]}))});function $o(s,t,{auto:e=!0}={}){const i=n=>{let o=Object.keys(n);const r=_u(n);if(!r&&o.length>1&&!Ns(n))return i(Cn(n));if(xu(n)){const l=r?n[$s.PATH]:o[0],c=r?n[$s.PATTERN]:n[l];if(!pt(c))throw new Error(jd(l));const h={keyId:Es(l),pattern:c};return e&&(h.searcher=Bs(c,t)),h}let a={children:[],operator:o[0]};return o.forEach(l=>{const c=n[l];wt(c)&&c.forEach(h=>{a.children.push(i(h))})}),a};return Ns(s)||(s=Cn(s)),i(s)}function yu(s,{ignoreFieldNorm:t=O.ignoreFieldNorm}){s.forEach(e=>{let i=1;e.matches.forEach(({key:n,norm:o,score:r})=>{const a=n?n.weight:null;i*=Math.pow(r===0&&a?Number.EPSILON:r,(a||1)*(t?1:o))}),e.score=i})}function vu(s,t){const e=s.matches;t.matches=[],st(e)&&e.forEach(i=>{if(!st(i.indices)||!i.indices.length)return;const{indices:n,value:o}=i;let r={indices:n,value:o};i.key&&(r.key=i.key.src),i.idx>-1&&(r.refIndex=i.idx),t.matches.push(r)})}function Su(s,t){t.score=s.score}function wu(s,t,{includeMatches:e=O.includeMatches,includeScore:i=O.includeScore}={}){const n=[];return e&&n.push(vu),i&&n.push(Su),s.map(o=>{const{idx:r}=o,a={item:t[r],refIndex:r};return n.length&&n.forEach(l=>{l(o,a)}),a})}class ne{constructor(t,e={},i){this.options={...O,...e},this.options.useExtendedSearch,this._keyStore=new Xd(this.options.keys),this.setCollection(t,i)}setCollection(t,e){if(this._docs=t,e&&!(e instanceof ni))throw new Error(Vd);this._myIndex=e||Eo(this.options.keys,this._docs,{getFn:this.options.getFn,fieldNormWeight:this.options.fieldNormWeight})}add(t){st(t)&&(this._docs.push(t),this._myIndex.add(t))}remove(t=()=>!1){const e=[];for(let i=0,n=this._docs.length;i-1&&(l=l.slice(0,e)),wu(l,this._docs,{includeMatches:i,includeScore:n})}_searchStringList(t){const e=Bs(t,this.options),{records:i}=this._myIndex,n=[];return i.forEach(({v:o,i:r,n:a})=>{if(!st(o))return;const{isMatch:l,score:c,indices:h}=e.searchIn(o);l&&n.push({item:o,idx:r,matches:[{score:c,value:o,norm:a,indices:h}]})}),n}_searchLogical(t){const e=$o(t,this.options),i=(a,l,c)=>{if(!a.children){const{keyId:d,searcher:u}=a,f=this._findMatches({key:this._keyStore.get(d),value:this._myIndex.getValueForItemAtKeyId(l,d),searcher:u});return f&&f.length?[{idx:c,item:l,matches:f}]:[]}const h=[];for(let d=0,u=a.children.length;d{if(st(a)){let c=i(e,a,l);c.length&&(o[l]||(o[l]={idx:l,item:a,matches:[]},r.push(o[l])),c.forEach(({matches:h})=>{o[l].matches.push(...h)}))}}),r}_searchObjectList(t){const e=Bs(t,this.options),{keys:i,records:n}=this._myIndex,o=[];return n.forEach(({$:r,i:a})=>{if(!st(r))return;let l=[];i.forEach((c,h)=>{l.push(...this._findMatches({key:c,value:r[h],searcher:e}))}),l.length&&o.push({idx:a,item:r,matches:l})}),o}_findMatches({key:t,value:e,searcher:i}){if(!st(e))return[];let n=[];if(wt(e))e.forEach(({v:o,i:r,n:a})=>{if(!st(o))return;const{isMatch:l,score:c,indices:h}=i.searchIn(o);l&&n.push({score:c,key:t,value:o,idx:r,norm:a,indices:h})});else{const{v:o,n:r}=e,{isMatch:a,score:l,indices:c}=i.searchIn(o);a&&n.push({score:l,key:t,value:o,norm:r,indices:c})}return n}}ne.version="7.0.0";ne.createIndex=Eo;ne.parseIndex=su;ne.config=O;ne.parseQuery=$o;bu(mu);cs.register(Gh,sd,co,ho,Md,ld,hd,_d,Sd,Jh);const ku={name:"peerList",components:{DeleteConfiguration:ot(()=>rt(()=>import("./deleteConfiguration-BU0tzWgI.js"),__vite__mapDeps([0,1,2,3]))),ConfigurationBackupRestore:ot(()=>rt(()=>import("./configurationBackupRestore-CerUpwbQ.js"),__vite__mapDeps([4,1,2,5,3,6]))),SelectPeers:ot(()=>rt(()=>import("./selectPeers-B6Dm7IFO.js"),__vite__mapDeps([7,1,2,3,8]))),EditConfiguration:ot(()=>rt(()=>import("./editConfiguration-kC_NwN06.js"),__vite__mapDeps([9,1,2,3,10]))),LocaleText:as,PeerShareLinkModal:ot(()=>rt(()=>import("./peerShareLinkModal-6b5Bdaqt.js"),__vite__mapDeps([11,1,2,5,12,3]))),PeerJobsLogsModal:ot(()=>rt(()=>import("./peerJobsLogsModal-ZNMKiJ-k.js"),__vite__mapDeps([13,5,1,2,3]))),PeerJobsAllModal:ot(()=>rt(()=>import("./peerJobsAllModal-CkJIs1TM.js"),__vite__mapDeps([14,15,1,2,12,5,3,16]))),PeerJobs:ot(()=>rt(()=>import("./peerJobs-BbNYdlYw.js"),__vite__mapDeps([17,15,1,2,12,5,3,16,18]))),PeerCreate:ot(()=>rt(()=>import("./peerCreate-B_n86hyd.js"),__vite__mapDeps([19,1,2,3,20]))),PeerQRCode:ot(()=>rt(()=>import("./peerQRCode-DEHFJvZX.js"),__vite__mapDeps([21,22,3,1,2]))),PeerConfigurationFile:ot(()=>rt(()=>import("./peerConfigurationFile-BRKM9nlG.js"),__vite__mapDeps([23,1,2,3,24]))),PeerSettings:ot(()=>rt(()=>import("./peerSettings-Bgrsto1V.js"),__vite__mapDeps([25,1,2,3,26]))),PeerSearch:Ar,Peer:ga,Line:zd,Bar:Fd},setup(){const s=Hs(),t=Dn(),e=Qe(void 0);return{dashboardConfigurationStore:s,wireguardConfigurationStore:t,interval:e}},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},peerConfigurationFile:{modalOpen:!1,peerConfigData:void 0},peerCreate:{modalOpen:!1},peerScheduleJobsAll:{modalOpen:!1},peerScheduleJobsLogs:{modalOpen:!1},peerShare:{modalOpen:!1,selectedPeer:void 0},editConfiguration:{modalOpen:!1},selectPeers:{modalOpen:!1},backupRestore:{modalOpen:!1},deleteConfiguration:{modalOpen:!1}}},mounted(){},watch:{$route:{immediate:!0,handler(){clearInterval(this.dashboardConfigurationStore.Peers.RefreshInterval),this.loading=!0;let s=this.$route.params.id;this.configurationInfo=[],this.configurationPeers=[],s&&(this.getPeers(s),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,ve("/api/toggleWireguardConfiguration/",{configurationName:this.configurationInfo.Name},s=>{s.status?this.dashboardConfigurationStore.newMessage("Server",`${this.configurationInfo.Name} ${s.data?"is on":"is off"}`,"success"):this.dashboardConfigurationStore.newMessage("Server",s.message,"danger"),this.configurationInfo.Status=s.data,this.configurationToggling=!1})},getPeers(s=this.$route.params.id){ve("/api/getWireguardConfigurationInfo",{configurationName:s},t=>{if(this.configurationInfo=t.data.configurationInfo,this.configurationPeers=t.data.configurationPeers,this.configurationPeers.forEach(e=>{e.restricted=!1}),t.data.configurationRestrictedPeers.forEach(e=>{e.restricted=!0,this.configurationPeers.push(e)}),this.loading=!1,this.configurationPeers.length>0){const e=this.configurationPeers.map(n=>n.total_sent+n.cumu_sent).reduce((n,o)=>n+o).toFixed(4),i=this.configurationPeers.map(n=>n.total_receive+n.cumu_receive).reduce((n,o)=>n+o).toFixed(4);this.historyDataSentDifference[this.historyDataSentDifference.length-1]!==e&&(this.historyDataSentDifference.length>0&&(this.historySentData={labels:[...this.historySentData.labels,oi().format("HH:mm:ss A")],datasets:[{label:"Data Sent",data:[...this.historySentData.datasets[0].data,((e-this.historyDataSentDifference[this.historyDataSentDifference.length-1])*1e3).toFixed(4)],fill:!1,borderColor:"#198754",tension:0}]}),this.historyDataSentDifference.push(e)),this.historyDataReceivedDifference[this.historyDataReceivedDifference.length-1]!==i&&(this.historyDataReceivedDifference.length>0&&(this.historyReceiveData={labels:[...this.historyReceiveData.labels,oi().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(t=>t.status==="running").length,totalUsage:this.configurationPeers.length>0?this.configurationPeers.filter(t=>!t.restricted).map(t=>t.total_data+t.cumu_data).reduce((t,e)=>t+e,0).toFixed(4):0,totalReceive:this.configurationPeers.length>0?this.configurationPeers.filter(t=>!t.restricted).map(t=>t.total_receive+t.cumu_receive).reduce((t,e)=>t+e,0).toFixed(4):0,totalSent:this.configurationPeers.length>0?this.configurationPeers.filter(t=>!t.restricted).map(t=>t.total_sent+t.cumu_sent).reduce((t,e)=>t+e,0).toFixed(4):0}},receiveData(){return this.historyReceiveData},sentData(){return this.historySentData},individualDataUsage(){return{labels:this.configurationPeers.map(s=>s.name?s.name:`Untitled Peer - ${s.id}`),datasets:[{label:"Total Data Usage",data:this.configurationPeers.map(s=>s.cumu_data+s.total_data),backgroundColor:this.configurationPeers.map(s=>"#0dcaf0"),tooltip:{callbacks:{label:s=>`${s.formattedValue} GB`}}}]}},individualDataUsageChartOption(){return{responsive:!0,plugins:{legend:{display:!1}},scales:{x:{ticks:{display:!1},grid:{display:!1}},y:{ticks:{callback:(s,t)=>`${s} GB`},grid:{display:!1}}}}},chartOptions(){return{responsive:!0,plugins:{legend:{display:!1},tooltip:{callbacks:{label:s=>`${s.formattedValue} MB/s`}}},scales:{x:{ticks:{display:!1},grid:{display:!1}},y:{ticks:{callback:(s,t)=>`${s} MB/s`},grid:{display:!1}}}}},searchPeers(){new ne(this.configurationPeers,{keys:["name","id","allowed_ip"]});const s=this.wireguardConfigurationStore.searchString?this.configurationPeers.filter(t=>t.name.includes(this.wireguardConfigurationStore.searchString)||t.id.includes(this.wireguardConfigurationStore.searchString)||t.allowed_ip.includes(this.wireguardConfigurationStore.searchString)):this.configurationPeers;return this.dashboardConfigurationStore.Configuration.Server.dashboard_sort==="restricted"?s.slice().sort((t,e)=>t[this.dashboardConfigurationStore.Configuration.Server.dashboard_sort]e[this.dashboardConfigurationStore.Configuration.Server.dashboard_sort]?-1:0):s.slice().sort((t,e)=>t[this.dashboardConfigurationStore.Configuration.Server.dashboard_sort]e[this.dashboardConfigurationStore.Configuration.Server.dashboard_sort]?1:0)}}},Mu={key:0,class:"container-md"},Pu={class:"d-flex align-items-center"},Cu={CLASS:"text-muted"},Du={class:"d-flex align-items-center gap-3"},Ou={class:"mb-0 display-4"},Au={class:"card rounded-3 bg-transparent shadow-sm ms-auto"},Tu={class:"card-body py-2 d-flex align-items-center"},Lu={class:"mb-0 text-muted"},Iu={class:"form-check form-switch ms-auto"},Ru=["for"],Eu={key:4,class:"spinner-border spinner-border-sm ms-2","aria-hidden":"true"},Fu=["disabled","id"],zu={class:"row mt-3 gy-2 gx-2 mb-2"},Bu={class:"col-12 col-lg-3"},$u={class:"card rounded-3 bg-transparent shadow-sm"},Nu={class:"card-body py-2"},Hu={class:"mb-0 text-muted"},Wu={class:"col-12 col-lg-3"},Vu={class:"card rounded-3 bg-transparent shadow-sm"},ju={class:"card-body py-2"},Uu={class:"mb-0 text-muted"},Yu={style:{"word-break":"break-all"},class:"col-12 col-lg-6"},Ku={class:"card rounded-3 bg-transparent shadow-sm"},Xu={class:"card-body py-2"},Gu={class:"mb-0 text-muted"},Ju={class:"row gx-2 gy-2 mb-2"},qu={class:"col-12 col-lg-3"},Qu={class:"card rounded-3 bg-transparent shadow-sm"},Zu={class:"card-body d-flex"},tf={class:"mb-0 text-muted"},ef={class:"h4"},sf={class:"col-12 col-lg-3"},nf={class:"card rounded-3 bg-transparent shadow-sm"},of={class:"card-body d-flex"},rf={class:"mb-0 text-muted"},af={class:"h4"},lf={class:"col-12 col-lg-3"},cf={class:"card rounded-3 bg-transparent shadow-sm"},hf={class:"card-body d-flex"},df={class:"mb-0 text-muted"},uf={class:"h4 text-primary"},ff={class:"col-12 col-lg-3"},gf={class:"card rounded-3 bg-transparent shadow-sm"},pf={class:"card-body d-flex"},mf={class:"mb-0 text-muted"},bf={class:"h4 text-success"},_f={class:"row gx-2 gy-2 mb-3"},xf={class:"col-12 col-lg-6"},yf={class:"card rounded-3 bg-transparent shadow-sm",style:{height:"270px"}},vf={class:"card-header bg-transparent border-0"},Sf={class:"text-muted"},wf={class:"card-body pt-1"},kf={class:"col-sm col-lg-3"},Mf={class:"card rounded-3 bg-transparent shadow-sm",style:{height:"270px"}},Pf={class:"card-header bg-transparent border-0"},Cf={class:"text-muted"},Df={class:"card-body pt-1"},Of={class:"col-sm col-lg-3"},Af={class:"card rounded-3 bg-transparent shadow-sm",style:{height:"270px"}},Tf={class:"card-header bg-transparent border-0"},Lf={class:"text-muted"},If={class:"card-body pt-1"},Rf={class:"mb-3"};function Ef(s,t,e,i,n,o){const r=W("LocaleText"),a=W("Bar"),l=W("Line"),c=W("PeerSearch"),h=W("Peer"),d=W("PeerSettings"),u=W("PeerQRCode"),f=W("PeerJobs"),g=W("PeerJobsAllModal"),m=W("PeerJobsLogsModal"),b=W("PeerShareLinkModal"),_=W("EditConfiguration"),y=W("SelectPeers"),S=W("DeleteConfiguration"),M=W("ConfigurationBackupRestore"),v=W("PeerConfigurationFile");return this.loading?V("",!0):(D(),$("div",Mu,[p("div",Pu,[p("div",null,[p("small",Cu,[P(r,{t:"CONFIGURATION"})]),p("div",Du,[p("h1",Ou,[p("samp",null,K(this.configurationInfo.Name),1)])])]),p("div",Au,[p("div",Tu,[p("div",null,[p("p",Lu,[p("small",null,[P(r,{t:"Status"})])]),p("div",Iu,[p("label",{class:"form-check-label",style:{cursor:"pointer"},for:"switch"+this.configurationInfo.id},[!this.configurationInfo.Status&&this.configurationToggling?(D(),H(r,{key:0,t:"Turning Off..."})):this.configurationInfo.Status&&this.configurationToggling?(D(),H(r,{key:1,t:"Turning On..."})):this.configurationInfo.Status&&!this.configurationToggling?(D(),H(r,{key:2,t:"On"})):!this.configurationInfo.Status&&!this.configurationToggling?(D(),H(r,{key:3,t:"Off"})):V("",!0),this.configurationToggling?(D(),$("span",Eu)):V("",!0)],8,Ru),On(p("input",{class:"form-check-input",style:{cursor:"pointer"},disabled:this.configurationToggling,type:"checkbox",role:"switch",id:"switch"+this.configurationInfo.id,onChange:t[0]||(t[0]=x=>this.toggle()),"onUpdate:modelValue":t[1]||(t[1]=x=>this.configurationInfo.Status=x)},null,40,Fu),[[Xo,this.configurationInfo.Status]])])]),p("div",{class:Vt(["dot ms-5",{active:this.configurationInfo.Status}])},null,2)])])]),t[33]||(t[33]=p("hr",null,null,-1)),p("div",zu,[p("div",Bu,[p("div",$u,[p("div",Nu,[p("p",Hu,[p("small",null,[P(r,{t:"Address"})])]),Wt(" "+K(this.configurationInfo.Address),1)])])]),p("div",Wu,[p("div",Vu,[p("div",ju,[p("p",Uu,[p("small",null,[P(r,{t:"Listen Port"})])]),Wt(" "+K(this.configurationInfo.ListenPort),1)])])]),p("div",Yu,[p("div",Ku,[p("div",Xu,[p("p",Gu,[p("small",null,[P(r,{t:"Public Key"})])]),p("samp",null,K(this.configurationInfo.PublicKey),1)])])])]),p("div",Ju,[p("div",qu,[p("div",Qu,[p("div",Zu,[p("div",null,[p("p",tf,[p("small",null,[P(r,{t:"Connected Peers"})])]),p("strong",ef,K(o.configurationSummary.connectedPeers)+" / "+K(n.configurationPeers.length),1)]),t[29]||(t[29]=p("i",{class:"bi bi-ethernet ms-auto h2 text-muted"},null,-1))])])]),p("div",sf,[p("div",nf,[p("div",of,[p("div",null,[p("p",rf,[p("small",null,[P(r,{t:"Total Usage"})])]),p("strong",af,K(o.configurationSummary.totalUsage)+" GB",1)]),t[30]||(t[30]=p("i",{class:"bi bi-arrow-down-up ms-auto h2 text-muted"},null,-1))])])]),p("div",lf,[p("div",cf,[p("div",hf,[p("div",null,[p("p",df,[p("small",null,[P(r,{t:"Total Received"})])]),p("strong",uf,K(o.configurationSummary.totalReceive)+" GB",1)]),t[31]||(t[31]=p("i",{class:"bi bi-arrow-down ms-auto h2 text-muted"},null,-1))])])]),p("div",ff,[p("div",gf,[p("div",pf,[p("div",null,[p("p",mf,[p("small",null,[P(r,{t:"Total Sent"})])]),p("strong",bf,K(o.configurationSummary.totalSent)+" GB",1)]),t[32]||(t[32]=p("i",{class:"bi bi-arrow-up ms-auto h2 text-muted"},null,-1))])])])]),p("div",_f,[p("div",xf,[p("div",yf,[p("div",vf,[p("small",Sf,[P(r,{t:"Peers Data Usage"})])]),p("div",wf,[P(a,{data:o.individualDataUsage,options:o.individualDataUsageChartOption,style:{width:"100%",height:"200px","max-height":"200px"}},null,8,["data","options"])])])]),p("div",kf,[p("div",Mf,[p("div",Pf,[p("small",Cf,[P(r,{t:"Real Time Received Data Usage"})])]),p("div",Df,[P(l,{options:o.chartOptions,data:o.receiveData,style:{width:"100%",height:"200px","max-height":"200px"}},null,8,["options","data"])])])]),p("div",Of,[p("div",Af,[p("div",Tf,[p("small",Lf,[P(r,{t:"Real Time Sent Data Usage"})])]),p("div",If,[P(l,{options:o.chartOptions,data:o.sentData,style:{width:"100%",height:"200px","max-height":"200px"}},null,8,["options","data"])])])])]),p("div",Rf,[P(c,{onJobsAll:t[2]||(t[2]=x=>this.peerScheduleJobsAll.modalOpen=!0),onJobLogs:t[3]||(t[3]=x=>this.peerScheduleJobsLogs.modalOpen=!0),onEditConfiguration:t[4]||(t[4]=x=>this.editConfiguration.modalOpen=!0),onSelectPeers:t[5]||(t[5]=x=>this.selectPeers.modalOpen=!0),onBackupRestore:t[6]||(t[6]=x=>this.backupRestore.modalOpen=!0),onDeleteConfiguration:t[7]||(t[7]=x=>this.deleteConfiguration.modalOpen=!0),configuration:this.configurationInfo},null,8,["configuration"]),P(Go,{name:"list",tag:"div",class:"row gx-2 gy-2 z-0"},{default:G(()=>[(D(!0),$(qt,null,ks(this.searchPeers,x=>(D(),$("div",{class:"col-12 col-lg-6 col-xl-4",key:x.id},[P(h,{Peer:x,onShare:w=>{this.peerShare.selectedPeer=x.id,this.peerShare.modalOpen=!0},onRefresh:t[8]||(t[8]=w=>this.getPeers()),onJobs:w=>{n.peerScheduleJobs.modalOpen=!0,n.peerScheduleJobs.selectedPeer=this.configurationPeers.find(k=>k.id===x.id)},onSetting:w=>{n.peerSetting.modalOpen=!0,n.peerSetting.selectedPeer=this.configurationPeers.find(k=>k.id===x.id)},onQrcode:t[9]||(t[9]=w=>{this.peerQRCode.peerConfigData=w,this.peerQRCode.modalOpen=!0}),onConfigurationFile:t[10]||(t[10]=w=>{this.peerConfigurationFile.peerConfigData=w,this.peerConfigurationFile.modalOpen=!0})},null,8,["Peer","onShare","onJobs","onSetting"])]))),128))]),_:1})]),P(tt,{name:"zoom"},{default:G(()=>[this.peerSetting.modalOpen?(D(),H(d,{key:"settings",selectedPeer:this.peerSetting.selectedPeer,onRefresh:t[11]||(t[11]=x=>this.getPeers()),onClose:t[12]||(t[12]=x=>this.peerSetting.modalOpen=!1)},null,8,["selectedPeer"])):V("",!0)]),_:1}),P(tt,{name:"zoom"},{default:G(()=>[n.peerQRCode.modalOpen?(D(),H(u,{peerConfigData:this.peerQRCode.peerConfigData,key:"qrcode",onClose:t[13]||(t[13]=x=>this.peerQRCode.modalOpen=!1)},null,8,["peerConfigData"])):V("",!0)]),_:1}),P(tt,{name:"zoom"},{default:G(()=>[this.peerScheduleJobs.modalOpen?(D(),H(f,{key:0,onRefresh:t[14]||(t[14]=x=>this.getPeers()),selectedPeer:this.peerScheduleJobs.selectedPeer,onClose:t[15]||(t[15]=x=>this.peerScheduleJobs.modalOpen=!1)},null,8,["selectedPeer"])):V("",!0)]),_:1}),P(tt,{name:"zoom"},{default:G(()=>[this.peerScheduleJobsAll.modalOpen?(D(),H(g,{key:0,onRefresh:t[16]||(t[16]=x=>this.getPeers()),onClose:t[17]||(t[17]=x=>this.peerScheduleJobsAll.modalOpen=!1),configurationPeers:this.configurationPeers},null,8,["configurationPeers"])):V("",!0)]),_:1}),P(tt,{name:"zoom"},{default:G(()=>[this.peerScheduleJobsLogs.modalOpen?(D(),H(m,{key:0,onClose:t[18]||(t[18]=x=>this.peerScheduleJobsLogs.modalOpen=!1),configurationInfo:this.configurationInfo},null,8,["configurationInfo"])):V("",!0)]),_:1}),P(tt,{name:"zoom"},{default:G(()=>[this.peerShare.modalOpen?(D(),H(b,{key:0,onClose:t[19]||(t[19]=x=>{this.peerShare.modalOpen=!1,this.peerShare.selectedPeer=void 0}),peer:this.configurationPeers.find(x=>x.id===this.peerShare.selectedPeer)},null,8,["peer"])):V("",!0)]),_:1}),P(tt,{name:"zoom"},{default:G(()=>[this.editConfiguration.modalOpen?(D(),H(_,{key:0,onClose:t[20]||(t[20]=x=>this.editConfiguration.modalOpen=!1),onDataChanged:t[21]||(t[21]=x=>this.configurationInfo=x),configurationInfo:this.configurationInfo},null,8,["configurationInfo"])):V("",!0)]),_:1}),P(tt,{name:"zoom"},{default:G(()=>[this.selectPeers.modalOpen?(D(),H(y,{key:0,onRefresh:t[22]||(t[22]=x=>this.getPeers()),configurationPeers:this.configurationPeers,onClose:t[23]||(t[23]=x=>this.selectPeers.modalOpen=!1)},null,8,["configurationPeers"])):V("",!0)]),_:1}),P(tt,{name:"zoom"},{default:G(()=>[n.deleteConfiguration.modalOpen?(D(),H(S,{key:0,onBackup:t[24]||(t[24]=x=>n.backupRestore.modalOpen=!0),onClose:t[25]||(t[25]=x=>n.deleteConfiguration.modalOpen=!1)})):V("",!0)]),_:1}),P(tt,{name:"zoom"},{default:G(()=>[n.backupRestore.modalOpen?(D(),H(M,{key:0,onClose:t[26]||(t[26]=x=>n.backupRestore.modalOpen=!1),onRefreshPeersList:t[27]||(t[27]=x=>this.getPeers())})):V("",!0)]),_:1}),P(tt,{name:"zoom"},{default:G(()=>[n.peerConfigurationFile.modalOpen?(D(),H(v,{key:0,onClose:t[28]||(t[28]=x=>n.peerConfigurationFile.modalOpen=!1),configurationFile:n.peerConfigurationFile.peerConfigData},null,8,["configurationFile"])):V("",!0)]),_:1})]))}const Wf=rs(ku,[["render",Ef],["__scopeId","data-v-16505bc9"]]);export{Wf as default}; diff --git a/src/static/app/dist/assets/peerQRCode-DEHFJvZX.js b/src/static/app/dist/assets/peerQRCode-DEHFJvZX.js new file mode 100644 index 0000000..0e2f5bb --- /dev/null +++ b/src/static/app/dist/assets/peerQRCode-DEHFJvZX.js @@ -0,0 +1 @@ +import{b as a}from"./browser-CjSdxGTc.js";import{L as n}from"./localeText-CaAXeE0W.js";import{_ as c,j as r,a as d,c as i,b as e,d as l}from"./index-DOaPWS1X.js";const p={name:"peerQRCode",components:{LocaleText:n},props:{peerConfigData:String},mounted(){a.toCanvas(document.querySelector("#qrcode"),this.peerConfigData,o=>{o&&console.error(o)})}},_={class:"peerSettingContainer w-100 h-100 position-absolute top-0 start-0"},m={class:"container d-flex h-100 w-100"},h={class:"m-auto modal-dialog-centered dashboardModal justify-content-center"},u={class:"card rounded-3 shadow"},f={class:"card-header bg-transparent d-flex align-items-center gap-2 border-0 p-4 pb-0"},b={class:"mb-0"},v={class:"card-body"},C={id:"qrcode",class:"rounded-3 shadow",ref:"qrcode"};function g(o,t,x,$,w,q){const s=r("LocaleText");return d(),i("div",_,[e("div",m,[e("div",h,[e("div",u,[e("div",f,[e("h4",b,[l(s,{t:"QR Code"})]),e("button",{type:"button",class:"btn-close ms-auto",onClick:t[0]||(t[0]=y=>this.$emit("close"))})]),e("div",v,[e("canvas",C,null,512)])])])])])}const Q=c(p,[["render",g]]);export{Q as default}; diff --git a/src/static/app/dist/assets/peerSettings-Bgrsto1V.js b/src/static/app/dist/assets/peerSettings-Bgrsto1V.js new file mode 100644 index 0000000..c614538 --- /dev/null +++ b/src/static/app/dist/assets/peerSettings-Bgrsto1V.js @@ -0,0 +1 @@ +import{_ as u,D as c,q as n,j as m,a as r,c as p,b as e,d as a,t as b,m as i,s as d,n as h,X as _,e as f}from"./index-DOaPWS1X.js";import{L as g}from"./localeText-CaAXeE0W.js";const v={name:"peerSettings",components:{LocaleText:g},props:{selectedPeer:Object},data(){return{data:void 0,dataChanged:!1,showKey:!1,saving:!1}},setup(){return{dashboardConfigurationStore:c()}},methods:{reset(){this.selectedPeer&&(this.data=JSON.parse(JSON.stringify(this.selectedPeer)),this.dataChanged=!1)},savePeer(){this.saving=!0,n(`/api/updatePeerSettings/${this.$route.params.id}`,this.data,l=>{this.saving=!1,l.status?this.dashboardConfigurationStore.newMessage("Server","Peer saved","success"):this.dashboardConfigurationStore.newMessage("Server",l.message,"danger"),this.$emit("refresh")})},resetPeerData(l){this.saving=!0,n(`/api/resetPeerData/${this.$route.params.id}`,{id:this.data.id,type:l},t=>{this.saving=!1,t.status?this.dashboardConfigurationStore.newMessage("Server","Peer data usage reset successfully","success"):this.dashboardConfigurationStore.newMessage("Server",t.message,"danger"),this.$emit("refresh")})}},beforeMount(){this.reset()},mounted(){this.$el.querySelectorAll("input").forEach(l=>{l.addEventListener("keyup",()=>{this.dataChanged=!0})})}},x={class:"peerSettingContainer w-100 h-100 position-absolute top-0 start-0 overflow-y-scroll"},y={class:"container d-flex h-100 w-100"},w={class:"m-auto modal-dialog-centered dashboardModal"},S={class:"card rounded-3 shadow flex-grow-1"},k={class:"card-header bg-transparent d-flex align-items-center gap-2 border-0 p-4 pb-2"},C={class:"mb-0"},P={key:0,class:"card-body px-4 pb-4"},$={class:"d-flex flex-column gap-2 mb-4"},D={class:"d-flex align-items-center"},N={class:"text-muted"},V={class:"ms-auto"},K={for:"peer_name_textbox",class:"form-label"},U={class:"text-muted"},M=["disabled"],A={class:"d-flex position-relative"},O={for:"peer_private_key_textbox",class:"form-label"},R={class:"text-muted"},T=["type","disabled"],q={for:"peer_allowed_ip_textbox",class:"form-label"},L={class:"text-muted"},E=["disabled"],B={for:"peer_endpoint_allowed_ips",class:"form-label"},I={class:"text-muted"},j=["disabled"],J={for:"peer_DNS_textbox",class:"form-label"},z={class:"text-muted"},Q=["disabled"],X={class:"accordion mt-3",id:"peerSettingsAccordion"},F={class:"accordion-item"},G={class:"accordion-header"},H={class:"accordion-button rounded-3 collapsed",type:"button","data-bs-toggle":"collapse","data-bs-target":"#peerSettingsAccordionOptional"},W={id:"peerSettingsAccordionOptional",class:"accordion-collapse collapse","data-bs-parent":"#peerSettingsAccordion"},Y={class:"accordion-body d-flex flex-column gap-2 mb-2"},Z={for:"peer_preshared_key_textbox",class:"form-label"},ee={class:"text-muted"},te=["disabled"],se={for:"peer_mtu",class:"form-label"},oe={class:"text-muted"},ae=["disabled"],le={for:"peer_keep_alive",class:"form-label"},ie={class:"text-muted"},de=["disabled"],ne={class:"d-flex gap-2 align-items-center"},re={class:"d-flex gap-2 ms-auto"},pe={class:"d-flex align-items-center gap-2"},ue=["disabled"],ce=["disabled"];function me(l,t,be,he,_e,fe){const o=m("LocaleText");return r(),p("div",x,[e("div",y,[e("div",w,[e("div",S,[e("div",k,[e("h4",C,[a(o,{t:"Peer Settings"})]),e("button",{type:"button",class:"btn-close ms-auto",onClick:t[0]||(t[0]=s=>this.$emit("close"))})]),this.data?(r(),p("div",P,[e("div",$,[e("div",D,[e("small",N,[a(o,{t:"Public Key"})]),e("small",V,[e("samp",null,b(this.data.id),1)])]),e("div",null,[e("label",K,[e("small",U,[a(o,{t:"Name"})])]),i(e("input",{type:"text",class:"form-control form-control-sm rounded-3",disabled:this.saving,"onUpdate:modelValue":t[1]||(t[1]=s=>this.data.name=s),id:"peer_name_textbox",placeholder:""},null,8,M),[[d,this.data.name]])]),e("div",null,[e("div",A,[e("label",O,[e("small",R,[a(o,{t:"Private Key"}),e("code",null,[a(o,{t:"(Required for QR Code and Download)"})])])]),e("a",{role:"button",class:"ms-auto text-decoration-none toggleShowKey",onClick:t[2]||(t[2]=s=>this.showKey=!this.showKey)},[e("i",{class:h(["bi",[this.showKey?"bi-eye-slash-fill":"bi-eye-fill"]])},null,2)])]),i(e("input",{type:[this.showKey?"text":"password"],class:"form-control form-control-sm rounded-3",disabled:this.saving,"onUpdate:modelValue":t[3]||(t[3]=s=>this.data.private_key=s),id:"peer_private_key_textbox",style:{"padding-right":"40px"}},null,8,T),[[_,this.data.private_key]])]),e("div",null,[e("label",q,[e("small",L,[a(o,{t:"Allowed IPs"}),e("code",null,[a(o,{t:"(Required)"})])])]),i(e("input",{type:"text",class:"form-control form-control-sm rounded-3",disabled:this.saving,"onUpdate:modelValue":t[4]||(t[4]=s=>this.data.allowed_ip=s),id:"peer_allowed_ip_textbox"},null,8,E),[[d,this.data.allowed_ip]])]),e("div",null,[e("label",B,[e("small",I,[a(o,{t:"Endpoint Allowed IPs"}),e("code",null,[a(o,{t:"(Required)"})])])]),i(e("input",{type:"text",class:"form-control form-control-sm rounded-3",disabled:this.saving,"onUpdate:modelValue":t[5]||(t[5]=s=>this.data.endpoint_allowed_ip=s),id:"peer_endpoint_allowed_ips"},null,8,j),[[d,this.data.endpoint_allowed_ip]])]),e("div",null,[e("label",J,[e("small",z,[a(o,{t:"DNS"})])]),i(e("input",{type:"text",class:"form-control form-control-sm rounded-3",disabled:this.saving,"onUpdate:modelValue":t[6]||(t[6]=s=>this.data.DNS=s),id:"peer_DNS_textbox"},null,8,Q),[[d,this.data.DNS]])]),e("div",X,[e("div",F,[e("h2",G,[e("button",H,[a(o,{t:"Optional Settings"})])]),e("div",W,[e("div",Y,[e("div",null,[e("label",Z,[e("small",ee,[a(o,{t:"Pre-Shared Key"})])]),i(e("input",{type:"text",class:"form-control form-control-sm rounded-3",disabled:this.saving,"onUpdate:modelValue":t[7]||(t[7]=s=>this.data.preshared_key=s),id:"peer_preshared_key_textbox"},null,8,te),[[d,this.data.preshared_key]])]),e("div",null,[e("label",se,[e("small",oe,[a(o,{t:"MTU"})])]),i(e("input",{type:"number",class:"form-control form-control-sm rounded-3",disabled:this.saving,"onUpdate:modelValue":t[8]||(t[8]=s=>this.data.mtu=s),id:"peer_mtu"},null,8,ae),[[d,this.data.mtu]])]),e("div",null,[e("label",le,[e("small",ie,[a(o,{t:"Persistent Keepalive"})])]),i(e("input",{type:"number",class:"form-control form-control-sm rounded-3",disabled:this.saving,"onUpdate:modelValue":t[9]||(t[9]=s=>this.data.keepalive=s),id:"peer_keep_alive"},null,8,de),[[d,this.data.keepalive]])])])])])]),t[18]||(t[18]=e("hr",null,null,-1)),e("div",ne,[e("strong",null,[a(o,{t:"Reset Data Usage"})]),e("div",re,[e("button",{class:"btn bg-primary-subtle text-primary-emphasis rounded-3 flex-grow-1 shadow-sm",onClick:t[10]||(t[10]=s=>this.resetPeerData("total"))},[t[15]||(t[15]=e("i",{class:"bi bi-arrow-down-up me-2"},null,-1)),a(o,{t:"Total"})]),e("button",{class:"btn bg-primary-subtle text-primary-emphasis rounded-3 flex-grow-1 shadow-sm",onClick:t[11]||(t[11]=s=>this.resetPeerData("receive"))},[t[16]||(t[16]=e("i",{class:"bi bi-arrow-down me-2"},null,-1)),a(o,{t:"Received"})]),e("button",{class:"btn bg-primary-subtle text-primary-emphasis rounded-3 flex-grow-1 shadow-sm",onClick:t[12]||(t[12]=s=>this.resetPeerData("sent"))},[t[17]||(t[17]=e("i",{class:"bi bi-arrow-up me-2"},null,-1)),a(o,{t:"Sent"})])])])]),e("div",pe,[e("button",{class:"btn bg-secondary-subtle border-secondary-subtle text-secondary-emphasis rounded-3 shadow ms-auto px-3 py-2",onClick:t[13]||(t[13]=s=>this.reset()),disabled:!this.dataChanged||this.saving},t[19]||(t[19]=[e("i",{class:"bi bi-arrow-clockwise"},null,-1)]),8,ue),e("button",{class:"btn bg-primary-subtle border-primary-subtle text-primary-emphasis rounded-3 px-3 py-2 shadow",disabled:!this.dataChanged||this.saving,onClick:t[14]||(t[14]=s=>this.savePeer())},t[20]||(t[20]=[e("i",{class:"bi bi-save-fill"},null,-1)]),8,ce)])])):f("",!0)])])])])}const xe=u(v,[["render",me],["__scopeId","data-v-a63ae8cb"]]);export{xe as default}; diff --git a/src/static/app/dist/assets/peerShareLinkModal-6b5Bdaqt.js b/src/static/app/dist/assets/peerShareLinkModal-6b5Bdaqt.js new file mode 100644 index 0000000..7897095 --- /dev/null +++ b/src/static/app/dist/assets/peerShareLinkModal-6b5Bdaqt.js @@ -0,0 +1 @@ +import{_ as g,D as f,q as h,j as p,a as s,c as r,b as t,d as o,n as m,i as n,t as _,e as b}from"./index-DOaPWS1X.js";import{d}from"./dayjs.min-D8jwq_wn.js";import{V as y}from"./vue-datepicker-D91GxXPq.js";import{L as S}from"./localeText-CaAXeE0W.js";const k={name:"peerShareLinkModal",props:{peer:Object},components:{LocaleText:S,VueDatePicker:y},data(){return{dataCopy:void 0,loading:!1}},setup(){return{store:f()}},mounted(){this.dataCopy=JSON.parse(JSON.stringify(this.peer.ShareLink)).at(0)},watch:{"peer.ShareLink":{deep:!0,handler(e,a){a.length!==e.length&&(this.dataCopy=JSON.parse(JSON.stringify(this.peer.ShareLink)).at(0))}}},methods:{startSharing(){this.loading=!0,h("/api/sharePeer/create",{Configuration:this.peer.configuration.Name,Peer:this.peer.id,ExpireDate:d().add(7,"d").format("YYYY-MM-DD HH:mm:ss")},e=>{e.status?(this.peer.ShareLink=e.data,this.dataCopy=e.data.at(0)):this.store.newMessage("Server","Share link failed to create. Reason: "+e.message,"danger"),this.loading=!1})},updateLinkExpireDate(){h("/api/sharePeer/update",this.dataCopy,e=>{e.status?(this.dataCopy=e.data.at(0),this.peer.ShareLink=e.data,this.store.newMessage("Server","Link expire date updated","success")):this.store.newMessage("Server","Link expire date failed to update. Reason: "+e.message,"danger"),this.loading=!1})},stopSharing(){this.loading=!0,this.dataCopy.ExpireDate=d().format("YYYY-MM-DD HH:mm:ss"),this.updateLinkExpireDate()},parseTime(e){e?this.dataCopy.ExpireDate=d(e).format("YYYY-MM-DD HH:mm:ss"):this.dataCopy.ExpireDate=void 0,this.updateLinkExpireDate()}},computed:{getUrl(){const e=this.store.getActiveCrossServer();return e?`${e.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}}},x={class:"peerSettingContainer w-100 h-100 position-absolute top-0 start-0 overflow-y-scroll"},v={class:"container d-flex h-100 w-100"},C={class:"m-auto modal-dialog-centered dashboardModal",style:{width:"500px"}},D={class:"card rounded-3 shadow flex-grow-1"},w={class:"card-header bg-transparent d-flex align-items-center gap-2 border-0 p-4"},L={class:"mb-0"},M={key:0,class:"card-body px-4 pb-4"},Y={key:0},$={class:"mb-3 text-muted"},E=["disabled"],H={key:1},V={class:"d-flex gap-2 mb-4"},N=["href"],P={class:"d-flex flex-column gap-2 mb-3"},O=["disabled"];function T(e,a,U,B,I,c){const i=p("LocaleText"),u=p("VueDatePicker");return s(),r("div",x,[t("div",v,[t("div",C,[t("div",D,[t("div",w,[t("h4",L,[o(i,{t:"Share Peer"})]),t("button",{type:"button",class:"btn-close ms-auto",onClick:a[0]||(a[0]=l=>this.$emit("close"))})]),this.peer.ShareLink?(s(),r("div",M,[this.dataCopy?(s(),r("div",H,[t("div",V,[a[4]||(a[4]=t("i",{class:"bi bi-link-45deg"},null,-1)),t("a",{href:this.getUrl,class:"text-decoration-none",target:"_blank"},_(c.getUrl),9,N)]),t("div",P,[t("small",null,[a[5]||(a[5]=t("i",{class:"bi bi-calendar me-2"},null,-1)),o(i,{t:"Expire At"})]),o(u,{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"])]),t("button",{onClick:a[2]||(a[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"},[t("span",{class:m({"animate__animated animate__flash animate__infinite animate__slower":this.loading})},a[6]||(a[6]=[t("i",{class:"bi bi-send-slash-fill me-2"},null,-1)]),2),this.loading?(s(),n(i,{key:0,t:"Stop Sharing..."})):(s(),n(i,{key:1,t:"Stop Sharing"}))],8,O)])):(s(),r("div",Y,[t("h6",$,[o(i,{t:"Currently the peer is not sharing"})]),t("button",{onClick:a[1]||(a[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"},[t("span",{class:m({"animate__animated animate__flash animate__infinite animate__slower":this.loading})},a[3]||(a[3]=[t("i",{class:"bi bi-send-fill me-2"},null,-1)]),2),this.loading?(s(),n(i,{key:0,t:"Sharing..."})):(s(),n(i,{key:1,t:"Start Sharing"}))],8,E)]))])):b("",!0)])])])])}const R=g(k,[["render",T]]);export{R as default}; diff --git a/src/static/app/dist/assets/ping-BB-b6WHn.js b/src/static/app/dist/assets/ping-BB-b6WHn.js new file mode 100644 index 0000000..e14684a --- /dev/null +++ b/src/static/app/dist/assets/ping-BB-b6WHn.js @@ -0,0 +1 @@ +import{_ as R,D as k,g as b,c as l,b as e,d,m as u,y as _,F as c,h as p,e as m,s as I,t as i,w as f,T as v,a as n,f as g,n as h,z as P,i as w,j as x}from"./index-DOaPWS1X.js";import{L as C}from"./localeText-CaAXeE0W.js";import{O as A}from"./osmap-BRB1j1wE.js";const S={name:"ping",components:{OSMap:A,LocaleText:C},data(){return{loading:!1,cips:{},selectedConfiguration:void 0,selectedPeer:void 0,selectedIp:void 0,count:4,pingResult:void 0,pinging:!1}},setup(){return{store:k()}},mounted(){b("/api/ping/getAllPeersIpAddress",{},a=>{a.status&&(this.loading=!0,this.cips=a.data,console.log(this.cips))})},methods:{execute(){this.selectedIp&&(this.pinging=!0,this.pingResult=void 0,b("/api/ping/execute",{ipAddress:this.selectedIp,count:this.count},a=>{a.status?this.pingResult=a.data:this.store.newMessage("Server",a.message,"danger"),this.pinging=!1}))}},watch:{selectedConfiguration(){this.selectedPeer=void 0,this.selectedIp=void 0},selectedPeer(){this.selectedIp=void 0}}},T={class:"mt-md-5 mt-3 text-body"},M={class:"container"},V={class:"row"},$={class:"col-sm-4 d-flex gap-2 flex-column"},L={class:"mb-1 text-muted",for:"configuration"},N=["disabled"],O=["value"],B={class:"mb-1 text-muted",for:"peer"},D=["disabled"],U=["value"],z={class:"mb-1 text-muted",for:"ip"},E=["disabled"],F={class:"d-flex align-items-center gap-2"},G={class:"text-muted"},j={class:"mb-1 text-muted",for:"ipAddress"},H=["disabled"],Y={class:"mb-1 text-muted",for:"count"},q={class:"d-flex gap-3 align-items-center"},J=["disabled"],K=["disabled"],Q={key:0,class:"d-block"},W={key:1,class:"d-block"},X={class:"col-sm-8 position-relative"},Z={key:"pingPlaceholder"},ee={key:"pingResult",class:"d-flex flex-column gap-2 w-100"},se={class:"card rounded-3 bg-transparent shadow-sm animate__animated animate__fadeIn",style:{"animation-delay":"0.15s"}},te={class:"card-body row"},ie={class:"col-sm"},ne={class:"mb-0 text-muted"},le={key:0,class:"col-sm"},de={class:"mb-0 text-muted"},oe={class:"card rounded-3 bg-transparent shadow-sm animate__animated animate__fadeIn",style:{"animation-delay":"0.3s"}},ae={class:"card-body"},re={class:"card rounded-3 bg-transparent shadow-sm animate__animated animate__fadeIn",style:{"animation-delay":"0.45s"}},ue={class:"card-body"},ce={class:"mb-0 text-muted"},pe={class:"card rounded-3 bg-transparent shadow-sm animate__animated animate__fadeIn",style:{"animation-delay":"0.6s"}},me={class:"card-body"},ge={class:"mb-0 text-muted"};function _e(a,s,he,be,fe,ve){const o=x("LocaleText"),y=x("OSMap");return n(),l("div",T,[e("div",M,[s[19]||(s[19]=e("h3",{class:"mb-3 text-body"},"Ping",-1)),e("div",V,[e("div",$,[e("div",null,[e("label",L,[e("small",null,[d(o,{t:"Configuration"})])]),u(e("select",{class:"form-select","onUpdate:modelValue":s[0]||(s[0]=t=>this.selectedConfiguration=t),disabled:this.pinging},[s[7]||(s[7]=e("option",{disabled:"",selected:"",value:void 0},null,-1)),(n(!0),l(c,null,p(this.cips,(t,r)=>(n(),l("option",{value:r},i(r),9,O))),256))],8,N),[[_,this.selectedConfiguration]])]),e("div",null,[e("label",B,[e("small",null,[d(o,{t:"Peer"})])]),u(e("select",{id:"peer",class:"form-select","onUpdate:modelValue":s[1]||(s[1]=t=>this.selectedPeer=t),disabled:this.selectedConfiguration===void 0||this.pinging},[s[8]||(s[8]=e("option",{disabled:"",selected:"",value:void 0},null,-1)),this.selectedConfiguration!==void 0?(n(!0),l(c,{key:0},p(this.cips[this.selectedConfiguration],(t,r)=>(n(),l("option",{value:r},i(r),9,U))),256)):m("",!0)],8,D),[[_,this.selectedPeer]])]),e("div",null,[e("label",z,[e("small",null,[d(o,{t:"IP Address"})])]),u(e("select",{id:"ip",class:"form-select","onUpdate:modelValue":s[2]||(s[2]=t=>this.selectedIp=t),disabled:this.selectedPeer===void 0||this.pinging},[s[9]||(s[9]=e("option",{disabled:"",selected:"",value:void 0},null,-1)),this.selectedPeer!==void 0?(n(!0),l(c,{key:0},p(this.cips[this.selectedConfiguration][this.selectedPeer].allowed_ips,t=>(n(),l("option",null,i(t),1))),256)):m("",!0)],8,E),[[_,this.selectedIp]])]),e("div",F,[s[10]||(s[10]=e("div",{class:"flex-grow-1 border-top"},null,-1)),e("small",G,[d(o,{t:"OR"})]),s[11]||(s[11]=e("div",{class:"flex-grow-1 border-top"},null,-1))]),e("div",null,[e("label",j,[e("small",null,[d(o,{t:"Enter IP Address / Hostname"})])]),u(e("input",{class:"form-control",type:"text",id:"ipAddress",disabled:this.pinging,"onUpdate:modelValue":s[3]||(s[3]=t=>this.selectedIp=t)},null,8,H),[[I,this.selectedIp]])]),s[16]||(s[16]=e("div",{class:"w-100 border-top my-2"},null,-1)),e("div",null,[e("label",Y,[e("small",null,[d(o,{t:"Count"})])]),e("div",q,[e("button",{onClick:s[4]||(s[4]=t=>this.count--),disabled:this.count===1,class:"btn btn-sm bg-secondary-subtle text-secondary-emphasis"},s[12]||(s[12]=[e("i",{class:"bi bi-dash-lg"},null,-1)]),8,J),e("strong",null,i(this.count),1),e("button",{role:"button",onClick:s[5]||(s[5]=t=>this.count++),class:"btn btn-sm bg-secondary-subtle text-secondary-emphasis"},s[13]||(s[13]=[e("i",{class:"bi bi-plus-lg"},null,-1)]))])]),e("button",{class:"btn btn-primary rounded-3 mt-3 position-relative",disabled:!this.selectedIp||this.pinging,onClick:s[6]||(s[6]=t=>this.execute())},[d(v,{name:"slide"},{default:f(()=>[this.pinging?(n(),l("span",W,s[15]||(s[15]=[e("span",{class:"spinner-border spinner-border-sm","aria-hidden":"true"},null,-1),e("span",{class:"visually-hidden",role:"status"},"Loading...",-1)]))):(n(),l("span",Q,s[14]||(s[14]=[e("i",{class:"bi bi-person-walking me-2"},null,-1),g("Ping! ")])))]),_:1})],8,K)]),e("div",X,[d(v,{name:"ping"},{default:f(()=>[this.pingResult?(n(),l("div",ee,[this.pingResult.geo&&this.pingResult.geo.status==="success"?(n(),w(y,{key:0,d:this.pingResult},null,8,["d"])):m("",!0),e("div",se,[e("div",te,[e("div",ie,[e("p",ne,[e("small",null,[d(o,{t:"IP Address"})])]),g(" "+i(this.pingResult.address),1)]),this.pingResult.geo&&this.pingResult.geo.status==="success"?(n(),l("div",le,[e("p",de,[e("small",null,[d(o,{t:"Geolocation"})])]),g(" "+i(this.pingResult.geo.city)+", "+i(this.pingResult.geo.country),1)])):m("",!0)])]),e("div",oe,[e("div",ae,[s[18]||(s[18]=e("p",{class:"mb-0 text-muted"},[e("small",null,"Is Alive")],-1)),e("span",{class:h([this.pingResult.is_alive?"text-success":"text-danger"])},[e("i",{class:h(["bi me-1",[this.pingResult.is_alive?"bi-check-circle-fill":"bi-x-circle-fill"]])},null,2),g(" "+i(this.pingResult.is_alive?"Yes":"No"),1)],2)])]),e("div",re,[e("div",ue,[e("p",ce,[e("small",null,[d(o,{t:"Average / Min / Max Round Trip Time"})])]),e("samp",null,i(this.pingResult.avg_rtt)+"ms / "+i(this.pingResult.min_rtt)+"ms / "+i(this.pingResult.max_rtt)+"ms ",1)])]),e("div",pe,[e("div",me,[e("p",ge,[e("small",null,[d(o,{t:"Sent / Received / Lost Package"})])]),e("samp",null,i(this.pingResult.package_sent)+" / "+i(this.pingResult.package_received)+" / "+i(this.pingResult.package_loss),1)])])])):(n(),l("div",Z,[s[17]||(s[17]=e("div",{class:"pingPlaceholder bg-body-secondary rounded-3 mb-3",style:{height:"300px"}},null,-1)),(n(),l(c,null,p(4,t=>e("div",{class:h(["pingPlaceholder bg-body-secondary rounded-3 mb-3",{"animate__animated animate__flash animate__slower animate__infinite":this.pinging}]),style:P({"animation-delay":`${t*.15}s`})},null,6)),64))]))]),_:1})])])])])}const ke=R(S,[["render",_e],["__scopeId","data-v-a08ce97e"]]);export{ke as default}; diff --git a/src/static/app/dist/assets/restoreConfiguration-DN55Pnc_.js b/src/static/app/dist/assets/restoreConfiguration-DN55Pnc_.js new file mode 100644 index 0000000..2899fd9 --- /dev/null +++ b/src/static/app/dist/assets/restoreConfiguration-DN55Pnc_.js @@ -0,0 +1,4 @@ +import{_ as V,r as C,o as N,a as l,c as r,b as e,t as _,d as n,n as v,F as O,h as T,B as M,i as m,e as P,C as Y,W,x,E as F,D as G,H as z,m as b,s as g,f as $,q as H,g as Z,w as B,T as K,j as J}from"./index-DOaPWS1X.js";import{L as o}from"./localeText-CaAXeE0W.js";import{d as Q}from"./dayjs.min-D8jwq_wn.js";import{p as R}from"./index-L60y6kc9.js";const X={class:"card rounded-3 shadow-sm"},ee={class:"d-flex gap-3 align-items-center"},te={class:"mb-0"},se={class:"text-muted"},oe={key:0,class:"card-footer p-3 d-flex flex-column gap-2"},ne=["onClick","id"],le={class:"card-body d-flex p-3 gap-3 align-items-center"},ae={__name:"backupGroup",props:{configurationName:String,backups:Array,open:!1,selectedConfigurationBackup:Object},emits:["select"],setup(f,{emit:u}){const t=f,k=u,p=C(t.open);return N(()=>{t.selectedConfigurationBackup&&document.querySelector(`#${t.selectedConfigurationBackup.filename.replace(".conf","")}`).scrollIntoView({behavior:"smooth"})}),(y,a)=>(l(),r("div",X,[e("a",{role:"button",class:"card-body d-flex align-items-center text-decoration-none",onClick:a[0]||(a[0]=c=>p.value=!p.value)},[e("div",ee,[e("h6",te,[e("samp",null,_(f.configurationName),1)]),e("small",se,[n(o,{t:f.backups.length+(f.backups.length>1?" Backups":" Backup")},null,8,["t"])])]),e("h5",{class:v(["ms-auto mb-0 dropdownIcon text-muted",{active:p.value}])},a[1]||(a[1]=[e("i",{class:"bi bi-chevron-down"},null,-1)]),2)]),p.value?(l(),r("div",oe,[(l(!0),r(O,null,T(f.backups,c=>(l(),r("div",{class:"card rounded-3 shadow-sm animate__animated",key:c.filename,onClick:()=>{k("select",c)},id:c.filename.replace(".conf",""),role:"button"},[e("div",le,[e("small",null,[a[2]||(a[2]=e("i",{class:"bi bi-file-earmark me-2"},null,-1)),e("samp",null,_(c.filename),1)]),e("small",null,[a[3]||(a[3]=e("i",{class:"bi bi-clock-history me-2"},null,-1)),e("samp",null,_(M(Q)(c.backupDate).format("YYYY-MM-DD HH:mm:ss")),1)]),e("small",null,[a[4]||(a[4]=e("i",{class:"bi bi-database me-2"},null,-1)),c.database?(l(),m(o,{key:0,t:"Yes"})):(l(),m(o,{key:1,t:"No"}))]),a[5]||(a[5]=e("small",{class:"text-muted ms-auto"},[e("i",{class:"bi bi-chevron-right"})],-1))])],8,ne))),128))])):P("",!0)]))}},ie=V(ae,[["__scopeId","data-v-626f1988"]]),de={class:"d-flex flex-column gap-5",id:"confirmBackup"},re={class:"d-flex flex-column gap-3"},ue={class:"d-flex flex-column flex-sm-row align-items-start align-items-sm-center gap-3"},ce={class:"mb-0"},me={class:"text-muted mb-1",for:"ConfigurationName"},fe={class:"invalid-feedback"},pe={key:0},ve={key:1},be={class:"mb-0"},ge={class:"row g-3"},_e={class:"col-sm"},ke={class:"text-muted mb-1",for:"PrivateKey"},ye={class:"input-group"},he={class:"col-sm"},xe={class:"text-muted mb-1",for:"PublicKey"},Ce={class:"text-muted mb-1",for:"ListenPort"},Pe={class:"invalid-feedback"},we={key:0},$e={key:1},Be={class:"mb-0"},Ne={class:"text-muted mb-1 d-flex",for:"ListenPort"},De={class:"invalid-feedback"},Le={key:0},Ue={key:1},Ae={class:"accordion",id:"newConfigurationOptionalAccordion"},Ie={class:"accordion-item"},Se={class:"accordion-header"},Ke={class:"accordion-button collapsed rounded-3",type:"button","data-bs-toggle":"collapse","data-bs-target":"#newConfigurationOptionalAccordionCollapse"},Re={id:"newConfigurationOptionalAccordionCollapse",class:"accordion-collapse collapse","data-bs-parent":"#newConfigurationOptionalAccordion"},Ve={class:"accordion-body d-flex flex-column gap-3"},Oe={class:"text-muted mb-1",for:"PreUp"},Te={class:"text-muted mb-1",for:"PreDown"},qe={class:"text-muted mb-1",for:"PostUp"},Ee={class:"text-muted mb-1",for:"PostDown"},je={class:"d-flex flex-column gap-3"},Me={class:"d-flex flex-column flex-sm-row align-items-start align-items-sm-center gap-3"},Ye={class:"mb-0"},We={key:0},Fe={class:"row g-3"},Ge={class:"col-sm"},ze={class:"card text-bg-success rounded-3"},He={class:"card-body"},Ze={class:"col-sm"},Je={class:"card text-bg-warning rounded-3"},Qe={class:"card-body"},Xe={class:"d-flex"},et=["disabled"],tt={__name:"confirmBackup",props:{selectedConfigurationBackup:Object},setup(f){const u=f,t=Y({ConfigurationName:u.selectedConfigurationBackup.filename.split("_")[0],Backup:u.selectedConfigurationBackup.filename}),k=u.selectedConfigurationBackup.content.split(` +`);for(let i of k){if(i==="[Peer]")break;if(i.length>0){let s=i.replace(" = ","=").split("=");s[0]==="ListenPort"?t[s[0]]=parseInt(s[1]):t[s[0]]=s[1]}}const p=C(!1),y=C(!1),a=C(""),c=W(),h=x(()=>/^[a-zA-Z0-9_=+.-]{1,15}$/.test(t.ConfigurationName)&&t.ConfigurationName.length>0&&!c.Configurations.find(i=>i.Name===t.ConfigurationName)),w=x(()=>{try{window.wireguard.generatePublicKey(t.PrivateKey)}catch{return!1}return!0}),D=x(()=>t.ListenPort>0&&t.ListenPort<=65353&&Number.isInteger(t.ListenPort)&&!c.Configurations.find(i=>parseInt(i.ListenPort)===t.ListenPort)),L=x(()=>{try{return R(t.Address),!0}catch{return!1}}),U=x(()=>L.value&&D.value&&w.value&&h.value);N(()=>{document.querySelector("main").scrollTo({top:0,behavior:"smooth"}),F(()=>w,i=>{i&&(t.PublicKey=window.wireguard.generatePublicKey(t.PrivateKey))},{immediate:!0})});const A=x(()=>{let i;try{i=R(t.Address)}catch{return 0}return i.end-i.start}),I=x(()=>u.selectedConfigurationBackup.database?u.selectedConfigurationBackup.databaseContent.split(` +`).filter(s=>s.search(`INSERT INTO "${t.ConfigurationName}"`)>=0).length:0),S=x(()=>u.selectedConfigurationBackup.database?u.selectedConfigurationBackup.databaseContent.split(` +`).filter(s=>s.search(`INSERT INTO "${t.ConfigurationName}_restrict_access"`)>=0).length:0),q=G(),E=z(),j=async()=>{U.value&&(y.value=!0,await H("/api/addWireguardConfiguration",t,async i=>{i.status?(q.newMessage("Server","Configuration restored","success"),await c.getConfigurations(),await E.push(`/configuration/${t.ConfigurationName}/peers`)):y.value=!1}))};return(i,s)=>(l(),r("div",de,[e("form",re,[e("div",ue,[e("h4",ce,[n(o,{t:"Configuration"})])]),e("div",null,[e("label",me,[e("small",null,[n(o,{t:"Configuration Name"})])]),b(e("input",{type:"text",class:v(["form-control rounded-3",[h.value?"is-valid":"is-invalid"]]),placeholder:"ex. wg1",id:"ConfigurationName","onUpdate:modelValue":s[0]||(s[0]=d=>t.ConfigurationName=d),disabled:"",required:""},null,2),[[g,t.ConfigurationName]]),e("div",fe,[p.value?(l(),r("div",pe,_(a.value),1)):(l(),r("div",ve,[n(o,{t:"Configuration name is invalid. Possible reasons:"}),e("ul",be,[e("li",null,[n(o,{t:"Configuration name already exist."})]),e("li",null,[n(o,{t:"Configuration name can only contain 15 lower/uppercase alphabet, numbers, underscore, equal sign, plus sign, period and hyphen."})])])]))])]),e("div",ge,[e("div",_e,[e("div",null,[e("label",ke,[e("small",null,[n(o,{t:"Private Key"})])]),e("div",ye,[b(e("input",{type:"text",class:v(["form-control rounded-start-3",[w.value?"is-valid":"is-invalid"]]),id:"PrivateKey",required:"","onUpdate:modelValue":s[1]||(s[1]=d=>t.PrivateKey=d),disabled:""},null,2),[[g,t.PrivateKey]])])])]),e("div",he,[e("div",null,[e("label",xe,[e("small",null,[n(o,{t:"Public Key"})])]),b(e("input",{type:"text",class:"form-control rounded-3",id:"PublicKey","onUpdate:modelValue":s[2]||(s[2]=d=>t.PublicKey=d),disabled:""},null,512),[[g,t.PublicKey]])])])]),e("div",null,[e("label",Ce,[e("small",null,[n(o,{t:"Listen Port"})])]),b(e("input",{type:"number",class:v(["form-control rounded-3",[D.value?"is-valid":"is-invalid"]]),placeholder:"0-65353",id:"ListenPort",min:"1",max:"65353","onUpdate:modelValue":s[3]||(s[3]=d=>t.ListenPort=d),disabled:"",required:""},null,2),[[g,t.ListenPort]]),e("div",Pe,[p.value?(l(),r("div",we,_(a.value),1)):(l(),r("div",$e,[n(o,{t:"Listen Port is invalid. Possible reasons:"}),e("ul",Be,[e("li",null,[n(o,{t:"Invalid port."})]),e("li",null,[n(o,{t:"Port is assigned to existing WireGuard Configuration."})])])]))])]),e("div",null,[e("label",Ne,[e("small",null,[n(o,{t:"IP Address/CIDR"})]),e("small",{class:v(["ms-auto",[A.value>0?"text-success":"text-danger"]])},[n(o,{t:A.value+" Available IP Address"},null,8,["t"])],2)]),b(e("input",{type:"text",class:v(["form-control",[L.value?"is-valid":"is-invalid"]]),placeholder:"Ex: 10.0.0.1/24",id:"Address","onUpdate:modelValue":s[4]||(s[4]=d=>t.Address=d),disabled:"",required:""},null,2),[[g,t.Address]]),e("div",De,[p.value?(l(),r("div",Le,_(a.value),1)):(l(),r("div",Ue,[n(o,{t:"IP Address/CIDR is invalid"})]))])]),e("div",Ae,[e("div",Ie,[e("h2",Se,[e("button",Ke,[n(o,{t:"Optional Settings"})])]),e("div",Re,[e("div",Ve,[e("div",null,[e("label",Oe,[e("small",null,[n(o,{t:"PreUp"})])]),b(e("input",{type:"text",class:"form-control rounded-3",id:"PreUp",disabled:"","onUpdate:modelValue":s[5]||(s[5]=d=>t.PreUp=d)},null,512),[[g,t.PreUp]])]),e("div",null,[e("label",Te,[e("small",null,[n(o,{t:"PreDown"})])]),b(e("input",{type:"text",class:"form-control rounded-3",id:"PreDown",disabled:"","onUpdate:modelValue":s[6]||(s[6]=d=>t.PreDown=d)},null,512),[[g,t.PreDown]])]),e("div",null,[e("label",qe,[e("small",null,[n(o,{t:"PostUp"})])]),b(e("input",{type:"text",class:"form-control rounded-3",id:"PostUp",disabled:"","onUpdate:modelValue":s[7]||(s[7]=d=>t.PostUp=d)},null,512),[[g,t.PostUp]])]),e("div",null,[e("label",Ee,[e("small",null,[n(o,{t:"PostDown"})])]),b(e("input",{type:"text",class:"form-control rounded-3",id:"PostDown",disabled:"","onUpdate:modelValue":s[8]||(s[8]=d=>t.PostDown=d)},null,512),[[g,t.PostDown]])])])])])])]),e("div",je,[e("div",Me,[e("h4",Ye,[n(o,{t:"Database File"})]),e("h4",{class:v(["mb-0 ms-auto",[f.selectedConfigurationBackup.database?"text-success":"text-danger"]])},[e("i",{class:v(["bi",[f.selectedConfigurationBackup.database?"bi-check-circle-fill":"bi-x-circle-fill"]])},null,2)],2)]),f.selectedConfigurationBackup.database?(l(),r("div",We,[e("div",Fe,[e("div",Ge,[e("div",ze,[e("div",He,[s[10]||(s[10]=e("i",{class:"bi bi-person-fill me-2"},null,-1)),n(o,{t:"Contain"}),s[11]||(s[11]=$()),e("strong",null,_(I.value),1),s[12]||(s[12]=$()),I.value>1?(l(),m(o,{key:0,t:"Peer"})):(l(),m(o,{key:1,t:"Peer"}))])])]),e("div",Ze,[e("div",Je,[e("div",Qe,[s[13]||(s[13]=e("i",{class:"bi bi-person-fill-lock me-2"},null,-1)),n(o,{t:"Contain"}),s[14]||(s[14]=$()),e("strong",null,_(S.value),1),s[15]||(s[15]=$()),S.value>1?(l(),m(o,{key:0,t:"Restricted Peers"})):(l(),m(o,{key:1,t:"Restricted Peers"}))])])])])])):P("",!0)]),e("div",Xe,[e("button",{class:"btn btn-dark btn-brand rounded-3 px-3 py-2 shadow ms-auto",disabled:!U.value||y.value,onClick:s[9]||(s[9]=d=>j())},[s[16]||(s[16]=e("i",{class:"bi bi-clock-history me-2"},null,-1)),n(o,{t:y.value?"Restoring...":"Restore"},null,8,["t"])],8,et)])]))}},st={class:"mt-md-5 mt-3 text-body"},ot={class:"container mb-4"},nt={class:"mb-5 d-flex align-items-center gap-4"},lt={class:"mb-0"},at={key:0},it={class:"d-flex text-decoration-none text-body flex-grow-1 align-items-center gap-3"},dt={class:"mb-0"},rt={class:"text-muted"},ut={key:0,class:"ms-sm-auto"},ct={class:"text-muted"},mt={key:0,id:"step1Detail"},ft={class:"mb-4"},pt={class:"d-flex gap-3 flex-column"},vt={key:0},bt={class:"card rounded-3"},gt={class:"card-body"},_t={class:"mb-0"},kt={class:"my-5",key:"step2",id:"step2"},yt={class:"text-muted"},ht={__name:"restoreConfiguration",setup(f){const u=C(void 0);N(()=>{Z("/api/getAllWireguardConfigurationBackup",{},y=>{u.value=y.data})});const t=C(!1),k=C(void 0),p=C("");return(y,a)=>{const c=J("RouterLink");return l(),r("div",st,[e("div",ot,[e("div",nt,[n(c,{to:"/",class:"btn btn-dark btn-brand p-2 shadow",style:{"border-radius":"100%"}},{default:B(()=>a[1]||(a[1]=[e("h2",{class:"mb-0",style:{"line-height":"0"}},[e("i",{class:"bi bi-arrow-left-circle"})],-1)])),_:1}),e("h2",lt,[n(o,{t:"Restore Configuration"})])]),n(K,{name:"fade",appear:""},{default:B(()=>[u.value?(l(),r("div",at,[e("div",{class:v(["d-flex mb-5 align-items-center steps",{active:!t.value}]),role:"button",onClick:a[0]||(a[0]=h=>t.value=!1),key:"step1"},[e("div",it,[a[2]||(a[2]=e("h1",{class:"mb-0",style:{"line-height":"0"}},[e("i",{class:"bi bi-1-circle-fill"})],-1)),e("div",null,[e("h4",dt,[n(o,{t:"Step 1"})]),e("small",rt,[t.value?(l(),m(o,{key:1,t:"Click to change a backup"})):(l(),m(o,{key:0,t:"Select a backup you want to restore"}))])])]),n(K,{name:"zoomReversed"},{default:B(()=>[t.value?(l(),r("div",ut,[e("small",ct,[n(o,{t:"Selected Backup"})]),e("h6",null,[e("samp",null,_(k.value.filename),1)])])):P("",!0)]),_:1})],2),t.value?P("",!0):(l(),r("div",mt,[e("div",ft,[e("div",pt,[(l(!0),r(O,null,T(Object.keys(u.value.NonExistingConfigurations),h=>(l(),m(ie,{onSelect:w=>{k.value=w,p.value=h,t.value=!0},selectedConfigurationBackup:k.value,open:p.value===h,"configuration-name":h,backups:u.value.NonExistingConfigurations[h]},null,8,["onSelect","selectedConfigurationBackup","open","configuration-name","backups"]))),256)),Object.keys(u.value.NonExistingConfigurations).length===0?(l(),r("div",vt,[e("div",bt,[e("div",gt,[e("p",_t,[n(o,{t:"You don't have any configuration to restore"})])])])])):P("",!0)])])])),e("div",kt,[e("div",{class:v(["steps d-flex text-decoration-none text-body flex-grow-1 align-items-center gap-3",{active:t.value}])},[a[4]||(a[4]=e("h1",{class:"mb-0",style:{"line-height":"0"}},[e("i",{class:"bi bi-2-circle-fill"})],-1)),e("div",null,[a[3]||(a[3]=e("h4",{class:"mb-0"},"Step 2",-1)),e("small",yt,[t.value?(l(),m(o,{key:1,t:"Confirm & edit restore information"})):(l(),m(o,{key:0,t:"Backup not selected"}))])])],2)]),t.value?(l(),m(tt,{selectedConfigurationBackup:k.value,key:"confirm"},null,8,["selectedConfigurationBackup"])):P("",!0)])):P("",!0)]),_:1})])])}}},$t=V(ht,[["__scopeId","data-v-f0245d51"]]);export{$t as default}; diff --git a/src/static/app/dist/assets/schedulePeerJob-Bfwzc6gk.js b/src/static/app/dist/assets/schedulePeerJob-Bfwzc6gk.js new file mode 100644 index 0000000..4e66f93 --- /dev/null +++ b/src/static/app/dist/assets/schedulePeerJob-Bfwzc6gk.js @@ -0,0 +1 @@ +import{_,a as d,c as r,b as s,t as m,n as y,F as j,h as S,e as f,r as h,D as k,q as v,j as b,d as n,i as x,m as D,s as $,f as p}from"./index-DOaPWS1X.js";import{V as J}from"./vue-datepicker-D91GxXPq.js";import{d as V}from"./dayjs.min-D8jwq_wn.js";import{L as C}from"./localeText-CaAXeE0W.js";const O={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)}}},M={class:"dropdown scheduleDropdown"},N={class:"dropdown-menu rounded-3 shadow",style:{"font-size":"0.875rem",width:"200px"}},P=["onClick"],F={key:0,class:"bi bi-check ms-auto"};function L(t,e,l,o,c,w){return d(),r("div",M,[s("button",{class:y(["btn btn-sm btn-outline-primary rounded-3",{"disabled border-transparent":!l.edit}]),type:"button","data-bs-toggle":"dropdown","aria-expanded":"false"},[s("samp",null,m(this.currentSelection.display),1)],2),s("ul",N,[l.edit?(d(!0),r(j,{key:0},S(this.options,a=>(d(),r("li",null,[s("a",{class:"dropdown-item d-flex align-items-center",role:"button",onClick:u=>t.$emit("update",a.value)},[s("samp",null,m(a.display),1),a.value===this.currentSelection.value?(d(),r("i",F)):f("",!0)],8,P)]))),256)):f("",!0)])])}const T=_(O,[["render",L],["__scopeId","data-v-6a5aba2a"]]),A={name:"schedulePeerJob",components:{LocaleText:C,VueDatePicker:J,ScheduleDropdown:T},props:{dropdowns:Array[Object],pjob:Object,viewOnly:!1},setup(t){const e=h({}),l=h(!1),o=h(!1);e.value=JSON.parse(JSON.stringify(t.pjob)),e.value.CreationDate||(l.value=!0,o.value=!0);const c=k();return{job:e,edit:l,newJob:o,store:c}},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?v("/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"),l=this.$el.querySelectorAll("input");e.forEach(o=>o.classList.add("animate__animated",t)),l.forEach(o=>o.classList.add("animate__animated",t)),setTimeout(()=>{e.forEach(o=>o.classList.remove("animate__animated",t)),l.forEach(o=>o.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&&v("/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=V(t).format("YYYY-MM-DD HH:mm:ss"))}}},E={class:"card-header bg-transparent text-muted border-0"},U={key:0,class:"d-flex"},H={class:"me-auto"},B={key:1},I={class:"badge text-bg-warning"},Y={class:"card-body pt-1",style:{"font-family":"var(--bs-font-monospace)"}},q={class:"d-flex gap-2 align-items-center mb-2"},z=["disabled"],G={class:"px-5 d-flex gap-2 align-items-center"},K={class:"d-flex gap-3"},Q={key:0,class:"ms-auto d-flex gap-3"},R={key:1,class:"ms-auto d-flex gap-3"};function W(t,e,l,o,c,w){const a=b("LocaleText"),u=b("ScheduleDropdown"),g=b("VueDatePicker");return d(),r("div",{class:y(["card shadow-sm rounded-3 mb-2",{"border-warning-subtle":this.newJob}])},[s("div",E,[this.newJob?(d(),r("small",B,[s("span",I,[n(a,{t:"Unsaved Job"})])])):(d(),r("small",U,[s("strong",H,[n(a,{t:"Job ID"})]),s("samp",null,m(this.job.JobID),1)]))]),s("div",Y,[s("div",q,[s("samp",null,[n(a,{t:"if"})]),n(u,{edit:o.edit,options:this.dropdowns.Field,data:this.job.Field,onUpdate:e[0]||(e[0]=i=>{this.job.Field=i})},null,8,["edit","options","data"]),s("samp",null,[n(a,{t:"is"})]),n(u,{edit:o.edit,options:this.dropdowns.Operator,data:this.job.Operator,onUpdate:e[1]||(e[1]=i=>this.job.Operator=i)},null,8,["edit","options","data"]),this.job.Field==="date"?(d(),x(g,{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:!o.edit,dark:this.store.Configuration.Server.dashboard_theme==="dark"},null,8,["min-date","model-value","onUpdate:modelValue","disabled","dark"])):D((d(),r("input",{key:1,class:"form-control form-control-sm form-control-dark rounded-3 flex-grow-1",disabled:!o.edit,"onUpdate:modelValue":e[2]||(e[2]=i=>this.job.Value=i),style:{width:"auto"}},null,8,z)),[[$,this.job.Value]]),s("samp",null,m(this.dropdowns.Field.find(i=>i.value===this.job.Field)?.unit)+" { ",1)]),s("div",G,[s("samp",null,[n(a,{t:"then"})]),n(u,{edit:o.edit,options:this.dropdowns.Action,data:this.job.Action,onUpdate:e[3]||(e[3]=i=>this.job.Action=i)},null,8,["edit","options","data"])]),s("div",K,[e[12]||(e[12]=s("samp",null,"}",-1)),this.edit?(d(),r("div",R,[s("a",{role:"button",class:"text-secondary text-decoration-none",onClick:e[6]||(e[6]=i=>this.reset())},[e[10]||(e[10]=p("[C] ")),n(a,{t:"Cancel"})]),s("a",{role:"button",class:"text-primary ms-auto text-decoration-none",onClick:e[7]||(e[7]=i=>this.save())},[e[11]||(e[11]=p("[S] ")),n(a,{t:"Save"})])])):(d(),r("div",Q,[s("a",{role:"button",class:"ms-auto text-decoration-none",onClick:e[4]||(e[4]=i=>this.edit=!0)},[e[8]||(e[8]=p("[E] ")),n(a,{t:"Edit"})]),s("a",{role:"button",onClick:e[5]||(e[5]=i=>this.delete()),class:"text-danger text-decoration-none"},[e[9]||(e[9]=p("[D] ")),n(a,{t:"Delete"})])]))])])],2)}const se=_(A,[["render",W],["__scopeId","data-v-8f3f1b93"]]);export{se as S,T as a}; diff --git a/src/static/app/dist/assets/selectPeers-B6Dm7IFO.js b/src/static/app/dist/assets/selectPeers-B6Dm7IFO.js new file mode 100644 index 0000000..a7eef2b --- /dev/null +++ b/src/static/app/dist/assets/selectPeers-B6Dm7IFO.js @@ -0,0 +1 @@ +import{_ as R,r as g,x as j,E as A,$ as F,D as M,C as O,a0 as C,a as o,c as n,b as t,d as r,e as b,m as q,s as z,F as p,h as G,n as w,t as $,f as h,q as Y,g as H}from"./index-DOaPWS1X.js";import{L as d}from"./localeText-CaAXeE0W.js";const J={class:"peerSettingContainer w-100 h-100 position-absolute top-0 start-0 overflow-y-scroll",ref:"selectPeersContainer"},K={class:"container d-flex h-100 w-100"},Q={class:"m-auto modal-dialog-centered dashboardModal",style:{width:"700px"}},W={class:"card rounded-3 shadow flex-grow-1"},X={class:"card-header bg-transparent d-flex align-items-center gap-2 p-4 flex-column pb-3"},Z={class:"mb-2 w-100 d-flex"},ee={class:"mb-0"},te={class:"d-flex w-100 align-items-center gap-2"},se={class:"d-flex gap-3"},le={class:"card-body px-4 flex-grow-1 d-flex gap-2 flex-column position-relative",ref:"card-body",style:{"overflow-y":"scroll"}},ae=["onClick","disabled","data-id"],oe={key:0},ne={class:"d-flex flex-column"},ie={class:"fw-bold"},re={class:"text-muted"},de={key:1,class:"ms-auto"},ue={key:0,class:"spinner-border spinner-border-sm",role:"status"},ce={class:"card-footer px-4 py-3 gap-2 d-flex align-items-center"},fe=["disabled"],be={key:0,class:"flex-grow-1 text-center"},ve=["disabled"],me={key:0,class:"flex-grow-1 text-center"},ge=["disabled"],pe={key:0,class:"flex-grow-1 text-center"},he=["disabled"],xe={__name:"selectPeers",props:{configurationPeers:Array},emits:["refresh","close"],setup(x,{emit:S}){const y=x,f=g(!1),u=g(!1),s=g([]),m=g(""),D=a=>{s.value.find(e=>e===a)?s.value=s.value.filter(e=>e!==a):s.value.push(a)},B=j(()=>f.value||u.value?y.configurationPeers.filter(a=>s.value.find(e=>e===a.id)):m.value.length>0?y.configurationPeers.filter(a=>a.id.includes(m.value)||a.name.includes(m.value)):y.configurationPeers);A(s,()=>{s.value.length===0&&(f.value=!1,u.value=!1)});const P=F(),N=M(),_=S,v=g(!1),T=()=>{v.value=!0,Y(`/api/deletePeers/${P.params.id}`,{peers:s.value},a=>{N.newMessage("Server",a.message,a.status?"success":"danger"),a.status&&(s.value=[],f.value=!1),_("refresh"),v.value=!1})},c=O({success:[],failed:[]}),L=C("card-body"),U=C("sp"),V=async()=>{u.value=!0;for(const a of s.value)L.value.scrollTo({top:U.value.find(e=>e.dataset.id===a).offsetTop-20,behavior:"smooth"}),await H("/api/downloadPeer/"+P.params.id,{id:a},e=>{if(e.status){const l=new Blob([e.data.file],{type:"text/plain"}),i=URL.createObjectURL(l),I=`${e.data.fileName}.conf`,k=document.createElement("a");k.href=i,k.download=I,k.click(),c.success.push(a)}else c.failed.push(a)})},E=()=>{c.success=[],c.failed=[],u.value=!1};return(a,e)=>(o(),n("div",J,[t("div",K,[t("div",Q,[t("div",W,[t("div",X,[t("div",Z,[t("h4",ee,[r(d,{t:"Select Peers"})]),t("button",{type:"button",class:"btn-close ms-auto",onClick:e[0]||(e[0]=l=>_("close"))})]),t("div",te,[t("div",se,[!u.value&&s.value.length!==x.configurationPeers.map(l=>l.id).length?(o(),n("a",{key:0,role:"button",onClick:e[1]||(e[1]=l=>s.value=x.configurationPeers.map(i=>i.id)),class:"text-decoration-none text-body"},[t("small",null,[e[9]||(e[9]=t("i",{class:"bi bi-check-all me-2"},null,-1)),r(d,{t:"Select All"})])])):b("",!0),s.value.length>0&&!u.value?(o(),n("a",{key:1,role:"button",class:"text-decoration-none text-body",onClick:e[2]||(e[2]=l=>s.value=[])},[t("small",null,[e[10]||(e[10]=t("i",{class:"bi bi-x-circle-fill me-2"},null,-1)),r(d,{t:"Clear Selection"})])])):b("",!0)]),e[11]||(e[11]=t("label",{class:"ms-auto",for:"selectPeersSearchInput"},[t("i",{class:"bi bi-search"})],-1)),q(t("input",{class:"form-control form-control-sm rounded-3","onUpdate:modelValue":e[3]||(e[3]=l=>m.value=l),id:"selectPeersSearchInput",style:{width:"200px !important"},type:"text"},null,512),[[z,m.value]])])]),t("div",le,[(o(!0),n(p,null,G(B.value,l=>(o(),n("button",{type:"button",class:w(["btn w-100 peerBtn text-start rounded-3 d-flex align-items-center gap-3",{active:s.value.find(i=>i===l.id)}]),onClick:i=>D(l.id),key:l.id,disabled:f.value||u.value,ref_for:!0,ref:"sp","data-id":l.id},[u.value?b("",!0):(o(),n("span",oe,[t("i",{class:w(["bi",[s.value.find(i=>i===l.id)?"bi-check-circle-fill":"bi-circle"]])},null,2)])),t("span",ne,[t("small",ie,$(l.name?l.name:"Untitled Peer"),1),t("small",re,[t("samp",null,$(l.id),1)])]),u.value?(o(),n("span",de,[!c.success.find(i=>i===l.id)&&!c.failed.find(i=>i===l.id)?(o(),n("span",ue)):(o(),n("i",{key:1,class:w(["bi",[c.failed.find(i=>i===l.id)?"bi-x-circle-fill":"bi-check-circle-fill"]])},null,2))])):b("",!0)],10,ae))),128))],512),t("div",ce,[!f.value&&!u.value?(o(),n(p,{key:0},[t("button",{class:"btn bg-primary-subtle text-primary-emphasis border-primary-subtle rounded-3",disabled:s.value.length===0||v.value,onClick:e[4]||(e[4]=l=>V())},e[12]||(e[12]=[t("i",{class:"bi bi-download"},null,-1)]),8,fe),s.value.length>0?(o(),n("span",be,[e[13]||(e[13]=t("i",{class:"bi bi-check-circle-fill me-2"},null,-1)),r(d,{t:s.value.length+" Peer"+(s.value.length>1?"s":"")},null,8,["t"])])):b("",!0),t("button",{class:"btn bg-danger-subtle text-danger-emphasis border-danger-subtle ms-auto rounded-3",onClick:e[5]||(e[5]=l=>f.value=!0),disabled:s.value.length===0||v.value},e[14]||(e[14]=[t("i",{class:"bi bi-trash"},null,-1)]),8,ve)],64)):u.value?(o(),n(p,{key:1},[c.failed.length+c.success.length1?"s":"")},null,8,["t"]),e[16]||(e[16]=h("... "))])):(o(),n(p,{key:1},[t("strong",null,[r(d,{t:"Download Finished"})]),t("button",{onClick:e[6]||(e[6]=l=>E()),class:"btn bg-secondary-subtle text-secondary-emphasis border border-secondary-subtle rounded-3 ms-auto"},[r(d,{t:"Done"})])],64))],64)):f.value?(o(),n(p,{key:2},[t("button",{class:"btn btn-danger rounded-3",disabled:s.value.length===0||v.value,onClick:e[7]||(e[7]=l=>T())},[r(d,{t:"Yes"})],8,ge),s.value.length>0?(o(),n("strong",pe,[r(d,{t:"Are you sure to delete"}),e[17]||(e[17]=h()),r(d,{t:s.value.length+" Peer"+(s.value.length>1?"s":"")},null,8,["t"]),e[18]||(e[18]=h("? "))])):b("",!0),t("button",{class:"btn bg-secondary-subtle text-secondary-emphasis border border-secondary-subtle ms-auto rounded-3",disabled:s.value.length===0||v.value,onClick:e[8]||(e[8]=l=>f.value=!1)},[r(d,{t:"No"})],8,he)],64)):b("",!0)])])])])],512))}},we=R(xe,[["__scopeId","data-v-177407c1"]]);export{we as default}; diff --git a/src/static/app/dist/assets/settings-B22cgeoY.js b/src/static/app/dist/assets/settings-B22cgeoY.js new file mode 100644 index 0000000..a0ad182 --- /dev/null +++ b/src/static/app/dist/assets/settings-B22cgeoY.js @@ -0,0 +1 @@ +import{_,D as f,p as I,q as b,a as o,c as d,b as t,d as n,m as w,s as x,n as g,t as y,e as m,j as l,W as F,f as D,v as V,i as v,F as P,g as L,w as T,h as S,k as H,T as M,r as j,x as B}from"./index-DOaPWS1X.js";import{L as $}from"./localeText-CaAXeE0W.js";import{d as C}from"./dayjs.min-D8jwq_wn.js";import{V as R}from"./vue-datepicker-D91GxXPq.js";const z={components:{LocaleText:$},props:{targetData:String,title:String,warning:!1,warningText:""},setup(){const s=f(),e=`input_${I()}`;return{store:s,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 b("/api/updateDashboardConfigurationItem",{section:"Peers",key:this.targetData,value:this.value},s=>{s.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=s.message),this.changed=!1,this.updating=!1})}}},O={class:"form-group mb-2"},q=["for"],Q=["id","disabled"],J={class:"invalid-feedback"},X={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 Z(s,e,u,c,r,h){const a=l("LocaleText");return o(),d("div",O,[t("label",{for:this.uuid,class:"text-muted mb-1"},[t("strong",null,[t("small",null,[n(a,{t:this.title},null,8,["t"])])])],8,q),w(t("input",{type:"text",class:g(["form-control",{"is-invalid":r.showInvalidFeedback,"is-valid":r.isValid}]),id:this.uuid,"onUpdate:modelValue":e[0]||(e[0]=i=>this.value=i),onKeydown:e[1]||(e[1]=i=>this.changed=!0),onBlur:e[2]||(e[2]=i=>h.useValidation()),disabled:this.updating},null,42,Q),[[x,this.value]]),t("div",J,y(this.invalidFeedback),1),u.warning?(o(),d("div",X,[t("small",null,[e[3]||(e[3]=t("i",{class:"bi bi-exclamation-triangle-fill me-2"},null,-1)),n(a,{t:u.warningText},null,8,["t"])])])):m("",!0)])}const tt=_(z,[["render",Z]]),et=s=>{},st={name:"accountSettingsInputUsername",components:{LocaleText:$},props:{targetData:String,title:String},setup(){const s=f(),e=`input_${I()}`;return{store:s,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(s){this.changed&&(this.updating=!0,await b("/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}))}}},at={class:"form-group mb-2"},it=["for"],ot=["id","disabled"],nt={class:"invalid-feedback"};function dt(s,e,u,c,r,h){const a=l("LocaleText");return o(),d("div",at,[t("label",{for:this.uuid,class:"text-muted mb-1"},[t("strong",null,[t("small",null,[n(a,{t:this.title},null,8,["t"])])])],8,it),w(t("input",{type:"text",class:g(["form-control",{"is-invalid":r.showInvalidFeedback,"is-valid":r.isValid}]),id:this.uuid,"onUpdate:modelValue":e[0]||(e[0]=i=>this.value=i),onKeydown:e[1]||(e[1]=i=>this.changed=!0),onBlur:e[2]||(e[2]=i=>h.useValidation()),disabled:this.updating},null,42,ot),[[x,this.value]]),t("div",nt,y(this.invalidFeedback),1)])}const rt=_(st,[["render",dt]]),lt={name:"accountSettingsInputPassword",components:{LocaleText:$},props:{targetData:String,warning:!1,warningText:""},setup(){const s=f(),e=`input_${I()}`;return{store:s,uuid:e}},data(){return{value:{currentPassword:"",newPassword:"",repeatNewPassword:""},invalidFeedback:"",showInvalidFeedback:!1,isValid:!1,timeout:void 0}},methods:{async useValidation(){Object.values(this.value).find(s=>s.length===0)===void 0?this.value.newPassword===this.value.repeatNewPassword?await b("/api/updateDashboardConfigurationItem",{section:"Account",key:this.targetData,value:this.value},s=>{s.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=s.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(s=>s.length===0)===void 0&&this.value.newPassword===this.value.repeatNewPassword}}},ut={class:"d-flex flex-column gap-2"},ct={class:"row g-2"},ht={class:"col-sm"},pt={class:"form-group"},mt=["for"],gt=["id"],bt={key:0,class:"invalid-feedback d-block"},_t={class:"col-sm"},ft={class:"form-group"},vt=["for"],wt=["id"],yt={class:"col-sm"},$t={class:"form-group"},kt=["for"],xt=["id"],Dt=["disabled"];function It(s,e,u,c,r,h){const a=l("LocaleText");return o(),d("form",ut,[t("div",ct,[t("div",ht,[t("div",pt,[t("label",{for:"currentPassword_"+this.uuid,class:"text-muted mb-1"},[t("strong",null,[t("small",null,[n(a,{t:"Current Password"})])])],8,mt),w(t("input",{type:"password",class:g(["form-control",{"is-invalid":r.showInvalidFeedback,"is-valid":r.isValid}]),autocomplete:"current-password","onUpdate:modelValue":e[0]||(e[0]=i=>this.value.currentPassword=i),id:"currentPassword_"+this.uuid},null,10,gt),[[x,this.value.currentPassword]]),r.showInvalidFeedback?(o(),d("div",bt,y(this.invalidFeedback),1)):m("",!0)])]),t("div",_t,[t("div",ft,[t("label",{for:"newPassword_"+this.uuid,class:"text-muted mb-1"},[t("strong",null,[t("small",null,[n(a,{t:"New Password"})])])],8,vt),w(t("input",{type:"password",class:g(["form-control",{"is-invalid":r.showInvalidFeedback,"is-valid":r.isValid}]),autocomplete:"new-password","onUpdate:modelValue":e[1]||(e[1]=i=>this.value.newPassword=i),id:"newPassword_"+this.uuid},null,10,wt),[[x,this.value.newPassword]])])]),t("div",yt,[t("div",$t,[t("label",{for:"repeatNewPassword_"+this.uuid,class:"text-muted mb-1"},[t("strong",null,[t("small",null,[n(a,{t:"Repeat New Password"})])])],8,kt),w(t("input",{type:"password",class:g(["form-control",{"is-invalid":r.showInvalidFeedback,"is-valid":r.isValid}]),autocomplete:"new-password","onUpdate:modelValue":e[2]||(e[2]=i=>this.value.repeatNewPassword=i),id:"repeatNewPassword_"+this.uuid},null,10,xt),[[x,this.value.repeatNewPassword]])])])]),t("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]=i=>this.useValidation())},[e[4]||(e[4]=t("i",{class:"bi bi-save2-fill me-2"},null,-1)),n(a,{t:"Update Password"})],8,Dt)])}const Pt=_(lt,[["render",It]]),At={name:"dashboardSettingsInputWireguardConfigurationPath",components:{LocaleText:$},props:{targetData:String,title:String,warning:!1,warningText:""},setup(){const s=f(),e=F(),u=`input_${I()}`;return{store:s,uuid:u,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 b("/api/updateDashboardConfigurationItem",{section:"Server",key:this.targetData,value:this.value},s=>{s.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=s.message),this.changed=!1,this.updating=!1}))}}},Ct={class:"card"},St={class:"card-header"},Kt={class:"my-2"},Tt={class:"card-body"},Vt={class:"form-group"},Ft=["for"],Lt={class:"d-flex gap-2 align-items-start"},Mt={class:"flex-grow-1"},Wt=["id","disabled"],Nt={class:"invalid-feedback fw-bold"},Ut=["disabled"],Et={key:0,class:"bi bi-save2-fill"},Yt={key:1,class:"spinner-border spinner-border-sm"},Gt={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 Ht(s,e,u,c,r,h){const a=l("LocaleText");return o(),d("div",Ct,[t("div",St,[t("h6",Kt,[n(a,{t:"Path"})])]),t("div",Tt,[t("div",Vt,[t("label",{for:this.uuid,class:"text-muted mb-1"},[t("strong",null,[t("small",null,[n(a,{t:this.title},null,8,["t"])])])],8,Ft),t("div",Lt,[t("div",Mt,[w(t("input",{type:"text",class:g(["form-control rounded-3",{"is-invalid":this.showInvalidFeedback,"is-valid":this.isValid}]),id:this.uuid,"onUpdate:modelValue":e[0]||(e[0]=i=>this.value=i),onKeydown:e[1]||(e[1]=i=>this.changed=!0),disabled:this.updating},null,42,Wt),[[x,this.value]]),t("div",Nt,y(this.invalidFeedback),1)]),t("button",{onClick:e[2]||(e[2]=i=>this.useValidation()),disabled:!this.changed,class:"ms-auto btn rounded-3 border-success-subtle bg-success-subtle text-success-emphasis"},[this.updating?(o(),d("span",Yt)):(o(),d("i",Et))],8,Ut)]),u.warning?(o(),d("div",Gt,[t("small",null,[e[3]||(e[3]=t("i",{class:"bi bi-exclamation-triangle-fill me-2"},null,-1)),n(a,{t:u.warningText},null,8,["t"])])])):m("",!0)])])])}const jt=_(At,[["render",Ht]]),Bt={name:"dashboardTheme",components:{LocaleText:$},setup(){return{dashboardConfigurationStore:f()}},methods:{async switchTheme(s){await b("/api/updateDashboardConfigurationItem",{section:"Server",key:"dashboard_theme",value:s},e=>{e.status&&(this.dashboardConfigurationStore.Configuration.Server.dashboard_theme=s)})}}},Rt={class:"text-muted mb-1 d-block"},zt={class:"d-flex gap-1"};function Ot(s,e,u,c,r,h){const a=l("LocaleText");return o(),d("div",null,[t("small",Rt,[t("strong",null,[n(a,{t:"Theme"})])]),t("div",zt,[t("button",{class:g(["btn bg-primary-subtle text-primary-emphasis flex-grow-1",{active:this.dashboardConfigurationStore.Configuration.Server.dashboard_theme==="light"}]),onClick:e[0]||(e[0]=i=>this.switchTheme("light"))},[e[2]||(e[2]=t("i",{class:"bi bi-sun-fill me-2"},null,-1)),n(a,{t:"Light"})],2),t("button",{class:g(["btn bg-primary-subtle text-primary-emphasis flex-grow-1",{active:this.dashboardConfigurationStore.Configuration.Server.dashboard_theme==="dark"}]),onClick:e[1]||(e[1]=i=>this.switchTheme("dark"))},[e[3]||(e[3]=t("i",{class:"bi bi-moon-fill me-2"},null,-1)),n(a,{t:"Dark"})],2)])])}const qt=_(Bt,[["render",Ot]]),Qt={name:"dashboardSettingsInputIPAddressAndPort",props:{},setup(){const s=f(),e=`input_${I()}`;return{store:s,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 b("/api/updateDashboardConfigurationItem",{section:"Server",key:this.targetData,value:this.value},s=>{s.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=s.message)})}}},Jt={class:"invalid-feedback d-block mt-0"},Xt={class:"row"},Zt={class:"form-group mb-2 col-sm"},te=["for"],ee=["id"],se={class:"form-group col-sm"},ae=["for"],ie=["id"];function oe(s,e,u,c,r,h){return o(),d("div",null,[t("div",Jt,y(this.invalidFeedback),1),t("div",Xt,[t("div",Zt,[t("label",{for:"app_ip_"+this.uuid,class:"text-muted mb-1"},e[2]||(e[2]=[t("strong",null,[t("small",null,"Dashboard IP Address")],-1)]),8,te),w(t("input",{type:"text",class:"form-control mb-2",id:"app_ip_"+this.uuid,"onUpdate:modelValue":e[0]||(e[0]=a=>this.app_ip=a)},null,8,ee),[[x,this.app_ip]]),e[3]||(e[3]=t("div",{class:"px-2 py-1 text-warning-emphasis bg-warning-subtle border border-warning-subtle rounded-2 d-inline-block"},[t("small",null,[t("i",{class:"bi bi-exclamation-triangle-fill me-2"}),t("code",null,"0.0.0.0"),D(" means it can be access by anyone with your server IP Address.")])],-1))]),t("div",se,[t("label",{for:"app_port_"+this.uuid,class:"text-muted mb-1"},e[4]||(e[4]=[t("strong",null,[t("small",null,"Dashboard Port")],-1)]),8,ae),w(t("input",{type:"text",class:"form-control mb-2",id:"app_port_"+this.uuid,"onUpdate:modelValue":e[1]||(e[1]=a=>this.app_port=a)},null,8,ie),[[x,this.app_port]])])]),e[5]||(e[5]=t("button",{class:"btn btn-success btn-sm fw-bold rounded-3"},[t("i",{class:"bi bi-floppy-fill me-2"}),D("Update Dashboard Settings & Restart ")],-1))])}const ne=_(Qt,[["render",oe]]),de={name:"newDashboardAPIKey",components:{LocaleText:$,VueDatePicker:R},data(){return{newKeyData:{ExpiredAt:C().add(7,"d").format("YYYY-MM-DD HH:mm:ss"),neverExpire:!1},submitting:!1}},setup(){return{store:f()}},mounted(){console.log(this.newKeyData.ExpiredAt)},methods:{submitNewAPIKey(){this.submitting=!0,b("/api/newDashboardAPIKey",this.newKeyData,s=>{s.status?(this.$emit("created",s.data),this.store.newMessage("Server","API Key created","success"),this.$emit("close")):this.store.newMessage("Server",s.message,"danger"),this.submitting=!1})},fixDate(s){return console.log(C(s).format("YYYY-MM-DDTHH:mm:ss")),C(s).format("YYYY-MM-DDTHH:mm:ss")},parseTime(s){s?this.newKeyData.ExpiredAt=C(s).format("YYYY-MM-DD HH:mm:ss"):this.newKeyData.ExpiredAt=void 0}}},re={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)"}},le={class:"card m-auto rounded-3 mt-5"},ue={class:"card-header bg-transparent d-flex align-items-center gap-2 border-0 p-4 pb-0"},ce={class:"mb-0"},he={class:"card-body d-flex gap-2 p-4 flex-column"},pe={class:"text-muted"},me={class:"d-flex align-items-center gap-2"},ge={class:"form-check"},be=["disabled"],_e={class:"form-check-label",for:"neverExpire"},fe={key:0,class:"bi bi-check-lg me-2"};function ve(s,e,u,c,r,h){const a=l("LocaleText"),i=l("VueDatePicker");return o(),d("div",re,[t("div",le,[t("div",ue,[t("h6",ce,[n(a,{t:"Create API Key"})]),t("button",{type:"button",class:"btn-close ms-auto",onClick:e[0]||(e[0]=k=>this.$emit("close"))})]),t("div",he,[t("small",pe,[n(a,{t:"When should this API Key expire?"})]),t("div",me,[n(i,{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"])]),t("div",ge,[w(t("input",{class:"form-check-input",type:"checkbox","onUpdate:modelValue":e[1]||(e[1]=k=>this.newKeyData.neverExpire=k),id:"neverExpire",disabled:this.submitting},null,8,be),[[V,this.newKeyData.neverExpire]]),t("label",_e,[n(a,{t:"Never Expire"}),e[3]||(e[3]=D(" (")),e[4]||(e[4]=t("i",{class:"bi bi-emoji-grimace-fill me-2"},null,-1)),n(a,{t:"Don't think that's a good idea"}),e[5]||(e[5]=D(") "))])]),t("button",{class:g(["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]=k=>this.submitNewAPIKey())},[this.submitting?m("",!0):(o(),d("i",fe)),this.submitting?(o(),v(a,{key:1,t:"Creating..."})):(o(),v(a,{key:2,t:"Create"}))],2)])])])}const we=_(de,[["render",ve]]),ye={name:"dashboardAPIKey",components:{LocaleText:$},props:{apiKey:Object},setup(){return{store:f()}},data(){return{confirmDelete:!1}},methods:{deleteAPIKey(){b("/api/deleteDashboardAPIKey",{Key:this.apiKey.Key},s=>{s.status?(this.$emit("deleted",s.data),this.store.newMessage("Server","API Key deleted","success")):this.store.newMessage("Server",s.message,"danger")})}}},$e={class:"card rounded-3 shadow-sm"},ke={key:0,class:"card-body d-flex gap-3 align-items-center apiKey-card-body"},xe={class:"d-flex align-items-center gap-2"},De={class:"text-muted"},Ie={style:{"word-break":"break-all"}},Pe={class:"d-flex align-items-center gap-2 ms-auto"},Ae={class:"text-muted"},Ce={key:0,class:"card-body d-flex gap-3 align-items-center justify-content-end"};function Se(s,e,u,c,r,h){const a=l("LocaleText");return o(),d("div",$e,[this.confirmDelete?(o(),d(P,{key:1},[this.store.getActiveCrossServer()?m("",!0):(o(),d("div",Ce,[n(a,{t:"Are you sure to delete this API key?"}),t("a",{role:"button",class:"btn btn-sm bg-success-subtle text-success-emphasis rounded-3",onClick:e[1]||(e[1]=i=>this.deleteAPIKey())},e[4]||(e[4]=[t("i",{class:"bi bi-check-lg"},null,-1)])),t("a",{role:"button",class:"btn btn-sm bg-secondary-subtle text-secondary-emphasis rounded-3",onClick:e[2]||(e[2]=i=>this.confirmDelete=!1)},e[5]||(e[5]=[t("i",{class:"bi bi-x-lg"},null,-1)]))]))],64)):(o(),d("div",ke,[t("div",xe,[t("small",De,[n(a,{t:"Key"})]),t("span",Ie,y(this.apiKey.Key),1)]),t("div",Pe,[t("small",Ae,[n(a,{t:"Expire At"})]),this.apiKey.ExpiredAt?m("",!0):(o(),v(a,{key:0,t:"Never Expire"})),t("span",null,y(this.apiKey.ExpiredAt),1)]),this.store.getActiveCrossServer()?m("",!0):(o(),d("a",{key:0,role:"button",class:"btn btn-sm bg-danger-subtle text-danger-emphasis rounded-3",onClick:e[0]||(e[0]=i=>this.confirmDelete=!0)},e[3]||(e[3]=[t("i",{class:"bi bi-trash-fill"},null,-1)])))]))])}const Ke=_(ye,[["render",Se],["__scopeId","data-v-a76253c8"]]),Te={name:"dashboardAPIKeys",components:{LocaleText:$,DashboardAPIKey:Ke,NewDashboardAPIKey:we},setup(){return{store:f()}},data(){return{value:this.store.Configuration.Server.dashboard_api_key,apiKeys:[],newDashboardAPIKey:!1}},methods:{async toggleDashboardAPIKeys(){await b("/api/updateDashboardConfigurationItem",{section:"Server",key:"dashboard_api_key",value:this.value},s=>{s.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(s){s?L("/api/getDashboardAPIKeys",{},e=>{e.status?this.apiKeys=e.data:(this.apiKeys=[],this.store.newMessage("Server",e.message,"danger"))}):this.apiKeys=[]}}}},Ve={class:"card rounded-3"},Fe={class:"my-2"},Le={key:0,class:"form-check form-switch ms-auto"},Me={class:"form-check-label",for:"allowAPIKeysSwitch"},We={key:0,class:"card-body position-relative d-flex flex-column gap-2"},Ne={key:1,class:"card",style:{height:"300px"}},Ue={class:"card-body d-flex text-muted"},Ee={class:"m-auto"},Ye={key:2,class:"d-flex flex-column gap-2 position-relative",style:{"min-height":"300px"}};function Ge(s,e,u,c,r,h){const a=l("LocaleText"),i=l("DashboardAPIKey"),k=l("NewDashboardAPIKey");return o(),d("div",Ve,[t("div",{class:g(["card-header d-flex align-items-center",{"border-bottom-0 rounded-3":!this.value}])},[t("h6",Fe,[n(a,{t:"API Keys"})]),this.store.getActiveCrossServer()?m("",!0):(o(),d("div",Le,[w(t("input",{class:"form-check-input",type:"checkbox","onUpdate:modelValue":e[0]||(e[0]=p=>this.value=p),onChange:e[1]||(e[1]=p=>this.toggleDashboardAPIKeys()),role:"switch",id:"allowAPIKeysSwitch"},null,544),[[V,this.value]]),t("label",Me,[this.value?(o(),v(a,{key:0,t:"Enabled"})):(o(),v(a,{key:1,t:"Disabled"}))])]))],2),this.value?(o(),d("div",We,[this.store.getActiveCrossServer()?m("",!0):(o(),d("button",{key:0,class:"btn bg-primary-subtle text-primary-emphasis border-1 border-primary-subtle rounded-3 shadow-sm",onClick:e[2]||(e[2]=p=>this.newDashboardAPIKey=!0)},[e[6]||(e[6]=t("i",{class:"bi bi-plus-circle-fill me-2"},null,-1)),n(a,{t:"API Key"})])),this.apiKeys.length===0?(o(),d("div",Ne,[t("div",Ue,[t("span",Ee,[n(a,{t:"No WGDashboard API Key"})])])])):(o(),d("div",Ye,[n(H,{name:"apiKey"},{default:T(()=>[(o(!0),d(P,null,S(this.apiKeys,p=>(o(),v(i,{apiKey:p,key:p.Key,onDeleted:e[3]||(e[3]=A=>this.apiKeys=A)},null,8,["apiKey"]))),128))]),_:1})])),n(M,{name:"zoomReversed"},{default:T(()=>[this.newDashboardAPIKey?(o(),v(k,{key:0,onCreated:e[4]||(e[4]=p=>this.apiKeys=p),onClose:e[5]||(e[5]=p=>this.newDashboardAPIKey=!1)})):m("",!0)]),_:1})])):m("",!0)])}const He=_(Te,[["render",Ge],["__scopeId","data-v-100ee9f9"]]),je={name:"accountSettingsMFA",components:{LocaleText:$},setup(){const s=f(),e=`input_${I()}`;return{store:s,uuid:e}},data(){return{status:!1}},mounted(){this.status=this.store.Configuration.Account.enable_totp},methods:{async resetMFA(){await b("/api/updateDashboardConfigurationItem",{section:"Account",key:"totp_verified",value:"false"},async s=>{await b("/api/updateDashboardConfigurationItem",{section:"Account",key:"enable_totp",value:"false"},e=>{e.status&&this.$router.push("/2FASetup")})})}}},Be={class:"d-flex align-items-center"},Re={class:"form-check form-switch"},ze={for:"allowMFAKeysSwitch"};function Oe(s,e,u,c,r,h){const a=l("LocaleText");return o(),d("div",null,[t("div",Be,[t("div",Re,[w(t("input",{class:"form-check-input",type:"checkbox","onUpdate:modelValue":e[0]||(e[0]=i=>this.status=i),role:"switch",id:"allowMFAKeysSwitch"},null,512),[[V,this.status]]),t("label",ze,[this.status?(o(),v(a,{key:0,t:"Enabled"})):(o(),v(a,{key:1,t:"Disabled"}))])]),this.status?(o(),d("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]=i=>this.resetMFA())},[e[2]||(e[2]=t("i",{class:"bi bi-shield-lock-fill me-2"},null,-1)),this.store.Configuration.Account.totp_verified?(o(),v(a,{key:0,t:"Reset"})):(o(),v(a,{key:1,t:"Setup"})),e[3]||(e[3]=D(" MFA "))])):m("",!0)])])}const qe=_(je,[["render",Oe]]),Qe={name:"dashboardLanguage",components:{LocaleText:$},setup(){return{store:f()}},data(){return{languages:void 0}},mounted(){L("/api/locale/available",{},s=>{this.languages=s.data})},methods:{changeLanguage(s){b("/api/locale/update",{lang_id:s},e=>{e.status?(this.store.Configuration.Server.dashboard_language=s,this.store.Locale=e.data):this.store.newMessage("Server","WGDashboard language update failed","danger")})}},computed:{currentLanguage(){let s=this.store.Configuration.Server.dashboard_language;return this.languages.find(e=>e.lang_id===s)}}},Je={class:"text-muted d-block mb-1"},Xe={class:"d-flex gap-2"},Ze={class:"dropdown w-100"},ts=["disabled"],es={key:1},ss={class:"dropdown-menu rounded-3 shadow"},as=["onClick"],is={class:"me-auto mb-0"},os={class:"d-block",style:{"font-size":"0.8rem"}},ns={key:0,class:"bi bi-check text-primary fs-5"};function ds(s,e,u,c,r,h){const a=l("LocaleText");return o(),d("div",null,[t("small",Je,[t("strong",null,[n(a,{t:"Language"})])]),t("div",Xe,[t("div",Ze,[t("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?(o(),d("span",es,y(h.currentLanguage?.lang_name_localized),1)):(o(),v(a,{key:0,t:"Loading..."}))],8,ts),t("ul",ss,[(o(!0),d(P,null,S(this.languages,i=>(o(),d("li",null,[t("a",{class:"dropdown-item d-flex align-items-center",role:"button",onClick:k=>this.changeLanguage(i.lang_id)},[t("p",is,[D(y(i.lang_name_localized)+" ",1),t("small",os,y(i.lang_name),1)]),h.currentLanguage?.lang_id===i.lang_id?(o(),d("i",ns)):m("",!0)],8,as)]))),256))])])])])}const rs=_(Qe,[["render",ds],["__scopeId","data-v-0f26916d"]]),ls={name:"dashboardIPPortInput",components:{LocaleText:$},setup(){return{store:f()}},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(s,e,u){this.changed&&(this.updating=!0,await b("/api/updateDashboardConfigurationItem",{section:"Server",key:e,value:u},c=>{c.status?(s.target.classList.add("is-valid"),this.showInvalidFeedback=!1,this.store.Configuration.Server[e]=u,clearTimeout(this.timeout),this.timeout=setTimeout(()=>{s.target.classList.remove("is-valid")},5e3)):(this.isValid=!1,this.showInvalidFeedback=!0,this.invalidFeedback=c.message),this.changed=!1,this.updating=!1}))}}},us={class:"row g-2"},cs={class:"col-sm"},hs={class:"form-group"},ps={for:"input_dashboard_ip",class:"text-muted mb-1"},ms=["disabled"],gs={class:"invalid-feedback"},bs={class:"col-sm"},_s={class:"form-group"},fs={for:"input_dashboard_ip",class:"text-muted mb-1"},vs=["disabled"],ws={class:"invalid-feedback"},ys={class:"px-2 py-1 text-warning-emphasis bg-warning-subtle border border-warning-subtle rounded-2 d-inline-block mb-2 mt-2"};function $s(s,e,u,c,r,h){const a=l("LocaleText");return o(),d("div",null,[t("div",us,[t("div",cs,[t("div",hs,[t("label",ps,[t("strong",null,[t("small",null,[n(a,{t:"IP Address / Hostname"})])])]),w(t("input",{type:"text",class:g(["form-control",{"is-invalid":r.showInvalidFeedback,"is-valid":r.isValid}]),id:"input_dashboard_ip","onUpdate:modelValue":e[0]||(e[0]=i=>this.ipAddress=i),onKeydown:e[1]||(e[1]=i=>this.changed=!0),onBlur:e[2]||(e[2]=i=>h.useValidation(i,"app_ip",this.ipAddress)),disabled:this.updating},null,42,ms),[[x,this.ipAddress]]),t("div",gs,y(this.invalidFeedback),1)])]),t("div",bs,[t("div",_s,[t("label",fs,[t("strong",null,[t("small",null,[n(a,{t:"Listen Port"})])])]),w(t("input",{type:"number",class:g(["form-control",{"is-invalid":r.showInvalidFeedback,"is-valid":r.isValid}]),id:"input_dashboard_ip","onUpdate:modelValue":e[3]||(e[3]=i=>this.port=i),onKeydown:e[4]||(e[4]=i=>this.changed=!0),onBlur:e[5]||(e[5]=i=>h.useValidation(i,"app_port",this.port)),disabled:this.updating},null,42,vs),[[x,this.port]]),t("div",ws,y(this.invalidFeedback),1)])])]),t("div",ys,[t("small",null,[e[6]||(e[6]=t("i",{class:"bi bi-exclamation-triangle-fill me-2"},null,-1)),n(a,{t:"Manual restart of WGDashboard is needed to apply changes on IP Address and Listen Port"})])])])}const ks=_(ls,[["render",$s]]),xs={class:"card rounded-3"},Ds={class:"card-header"},Is={class:"my-2"},Ps={class:"card-body d-flex gap-2"},As={class:"list-group w-100"},Cs=["onClick"],Ss={__name:"dashboardSettingsWireguardConfigurationAutostart",setup(s){const e=f(),u=F(),c=j(e.Configuration.WireGuardConfiguration.autostart),r=B(()=>u.Configurations.map(i=>i.Name)),h=async()=>{await b("/api/updateDashboardConfigurationItem",{section:"WireGuardConfiguration",key:"autostart",value:c.value},async i=>{i.status?(e.newMessage("Server","Start up configurations saved","success"),c.value=i.data):e.newMessage("Server","Start up configurations failed to save","danger")})},a=i=>{c.value.includes(i)?c.value=c.value.filter(k=>k!==i):c.value.push(i),h()};return(i,k)=>(o(),d("div",xs,[t("div",Ds,[t("h6",Is,[n($,{t:"Toggle When Start Up"})])]),t("div",Ps,[t("div",As,[(o(!0),d(P,null,S(r.value,p=>(o(),d("button",{type:"button",key:p,onClick:A=>a(p),class:"list-group-item list-group-item-action py-2 w-100 d-flex align-items-center"},[t("samp",null,y(p),1),t("i",{class:g(["ms-auto",[c.value.includes(p)?"bi-check-circle-fill":"bi-circle"]])},null,2)],8,Cs))),128))])])]))}},Ks=_(Ss,[["__scopeId","data-v-4aa2aed9"]]),Ts={name:"settings",methods:{ipV46RegexCheck:et},components:{DashboardSettingsWireguardConfigurationAutostart:Ks,DashboardIPPortInput:ks,DashboardLanguage:rs,LocaleText:$,AccountSettingsMFA:qe,DashboardAPIKeys:He,DashboardSettingsInputIPAddressAndPort:ne,DashboardTheme:qt,DashboardSettingsInputWireguardConfigurationPath:jt,AccountSettingsInputPassword:Pt,AccountSettingsInputUsername:rt,PeersDefaultSettingsInput:tt},setup(){return{dashboardConfigurationStore:f()}},data(){return{activeTab:"WGDashboard",tabs:[{id:"WGDashboard",title:"WGDashboard Settings"},{id:"Peers",title:"Peers Settings"},{id:"WireGuardConfiguration",title:"WireGuard Configuration Settings"}]}}},Vs={class:"mt-md-5 mt-3 text-body mb-3"},Fs={class:"container-md d-flex flex-column gap-4"},Ls={class:"nav nav-pills nav-justified align-items-center gap-2"},Ms={class:"nav-item"},Ws=["onClick"],Ns={class:"my-2"},Us={key:0,class:"d-flex gap-3 flex-column"},Es={key:1,class:"d-flex gap-3 flex-column"},Ys={class:"card rounded-3"},Gs={class:"card-header"},Hs={class:"my-2"},js={class:"card-body"},Bs={key:2,class:"d-flex gap-3 flex-column"},Rs={class:"card rounded-3"},zs={class:"card-header"},Os={class:"my-2"},qs={class:"card-body"},Qs={class:"row g-2"},Js={class:"col-sm"},Xs={class:"col-sm"},Zs={class:"card"},ta={class:"card-header"},ea={class:"my-2"},sa={class:"card-body"},aa={class:"card"},ia={class:"card-header"},oa={class:"my-2"},na={class:"card-body d-flex flex-column gap-3"},da={class:"card"},ra={class:"card-header"},la={class:"my-2"},ua={class:"card-body"};function ca(s,e,u,c,r,h){const a=l("LocaleText"),i=l("DashboardSettingsInputWireguardConfigurationPath"),k=l("DashboardSettingsWireguardConfigurationAutostart"),p=l("PeersDefaultSettingsInput"),A=l("DashboardTheme"),W=l("DashboardLanguage"),N=l("DashboardIPPortInput"),U=l("AccountSettingsInputUsername"),E=l("AccountSettingsInputPassword"),Y=l("AccountSettingsMFA"),G=l("DashboardAPIKeys");return o(),d("div",Vs,[t("div",Fs,[t("div",null,[t("ul",Ls,[(o(!0),d(P,null,S(this.tabs,K=>(o(),d("li",Ms,[t("a",{class:g(["nav-link rounded-3",{active:this.activeTab===K.id}]),onClick:ha=>this.activeTab=K.id,role:"button"},[t("h6",Ns,[n(a,{t:K.title},null,8,["t"])])],10,Ws)]))),256))]),e[1]||(e[1]=t("hr",null,null,-1)),t("div",null,[n(M,{name:"fade2",mode:"out-in"},{default:T(()=>[r.activeTab==="WireGuardConfiguration"?(o(),d("div",Us,[n(i,{targetData:"wg_conf_path",title:"Configurations Directory",warning:!0,"warning-text":"Remember to remove / at the end of your path. e.g /etc/wireguard"}),n(k)])):r.activeTab==="Peers"?(o(),d("div",Es,[t("div",Ys,[t("div",Gs,[t("h6",Hs,[n(a,{t:"Peer Default Settings"})])]),t("div",js,[t("div",null,[n(p,{targetData:"peer_global_dns",title:"DNS"}),n(p,{targetData:"peer_endpoint_allowed_ip",title:"Endpoint Allowed IPs"}),n(p,{targetData:"peer_mtu",title:"MTU"}),n(p,{targetData:"peer_keep_alive",title:"Persistent Keepalive"}),n(p,{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."})])])])])):r.activeTab==="WGDashboard"?(o(),d("div",Bs,[t("div",Rs,[t("div",zs,[t("h6",Os,[n(a,{t:"Appearance"})])]),t("div",qs,[t("div",Qs,[t("div",Js,[n(A)]),t("div",Xs,[n(W)])])])]),t("div",Zs,[t("div",ta,[t("h6",ea,[n(a,{t:"Dashboard IP Address & Listen Port"})])]),t("div",sa,[n(N)])]),t("div",aa,[t("div",ia,[t("h6",oa,[n(a,{t:"Account Settings"})])]),t("div",na,[t("div",null,[n(U,{targetData:"username",title:"Username"})]),e[0]||(e[0]=t("hr",null,null,-1)),t("div",null,[n(E,{targetData:"password"})])])]),t("div",da,[t("div",ra,[t("h6",la,[n(a,{t:"Multi-Factor Authentication (MFA)"})])]),t("div",ua,[this.dashboardConfigurationStore.getActiveCrossServer()?m("",!0):(o(),v(Y,{key:0}))])]),n(G)])):m("",!0)]),_:1})])])])])}const _a=_(Ts,[["render",ca]]);export{_a as default}; diff --git a/src/static/app/dist/assets/setup-DUH8iz4Z.js b/src/static/app/dist/assets/setup-DUH8iz4Z.js new file mode 100644 index 0000000..01ab501 --- /dev/null +++ b/src/static/app/dist/assets/setup-DUH8iz4Z.js @@ -0,0 +1 @@ +import{_ as u,D as m,q as p,c as r,b as e,d as o,f as c,t as h,e as f,m as l,s as d,a as i,j as w}from"./index-DOaPWS1X.js";import{L as g}from"./localeText-CaAXeE0W.js";const b={name:"setup",components:{LocaleText:g},setup(){return{store:m()}},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,p("/api/Welcome_Finish",this.setup,n=>{n.status?(this.done=!0,this.$router.push("/2FASetup")):(document.querySelectorAll("#createAccount input").forEach(s=>s.classList.add("is-invalid")),this.errorMessage=n.message,document.querySelector(".login-container-fluid").scrollTo({top:0,left:0,behavior:"smooth"})),this.loading=!1})}}},_=["data-bs-theme"],x={class:"m-auto text-body",style:{width:"500px"}},v={class:"dashboardLogo display-4"},y={class:"mb-5"},P={key:0,class:"alert alert-danger"},N={class:"d-flex flex-column gap-3"},k={id:"createAccount",class:"d-flex flex-column gap-2"},S={class:"form-group text-body"},T={for:"username",class:"mb-1 text-muted"},C={class:"form-group text-body"},L={for:"password",class:"mb-1 text-muted"},V={class:"form-group text-body"},q={for:"confirmPassword",class:"mb-1 text-muted"},$=["disabled"],A={key:0,class:"d-flex align-items-center w-100"},M={key:1,class:"d-flex align-items-center w-100"};function B(n,s,D,E,U,F){const t=w("LocaleText");return i(),r("div",{class:"container-fluid login-container-fluid d-flex main pt-5 overflow-scroll","data-bs-theme":this.store.Configuration.Server.dashboard_theme},[e("div",x,[e("span",v,[o(t,{t:"Nice to meet you!"})]),e("p",y,[o(t,{t:"Please fill in the following fields to finish setup"}),s[4]||(s[4]=c(" 😊"))]),e("div",null,[e("h3",null,[o(t,{t:"Create an account"})]),this.errorMessage?(i(),r("div",P,h(this.errorMessage),1)):f("",!0),e("div",N,[e("form",k,[e("div",S,[e("label",T,[e("small",null,[o(t,{t:"Enter an username you like"})])]),l(e("input",{type:"text",autocomplete:"username","onUpdate:modelValue":s[0]||(s[0]=a=>this.setup.username=a),class:"form-control",id:"username",name:"username",required:""},null,512),[[d,this.setup.username]])]),e("div",C,[e("label",L,[e("small",null,[o(t,{t:"Enter a password"}),e("code",null,[o(t,{t:"(At least 8 characters and make sure is strong enough!)"})])])]),l(e("input",{type:"password",autocomplete:"new-password","onUpdate:modelValue":s[1]||(s[1]=a=>this.setup.newPassword=a),class:"form-control",id:"password",name:"password",required:""},null,512),[[d,this.setup.newPassword]])]),e("div",V,[e("label",q,[e("small",null,[o(t,{t:"Confirm password"})])]),l(e("input",{type:"password",autocomplete:"confirm-new-password","onUpdate:modelValue":s[2]||(s[2]=a=>this.setup.repeatNewPassword=a),class:"form-control",id:"confirmPassword",name:"confirmPassword",required:""},null,512),[[d,this.setup.repeatNewPassword]])])]),e("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:s[3]||(s[3]=a=>this.submit())},[!this.loading&&!this.done?(i(),r("span",A,[o(t,{t:"Next"}),s[5]||(s[5]=e("i",{class:"bi bi-chevron-right ms-auto"},null,-1))])):(i(),r("span",M,[o(t,{t:"Saving..."}),s[6]||(s[6]=e("span",{class:"spinner-border ms-auto spinner-border-sm",role:"status"},[e("span",{class:"visually-hidden"},"Loading...")],-1))]))],8,$)])])])],8,_)}const W=u(b,[["render",B]]);export{W as default}; diff --git a/src/static/app/dist/assets/share-BU0DtM5p.js b/src/static/app/dist/assets/share-BU0DtM5p.js new file mode 100644 index 0000000..644a527 --- /dev/null +++ b/src/static/app/dist/assets/share-BU0DtM5p.js @@ -0,0 +1 @@ +import{_,r,D as p,g as u,c as m,b as t,d as c,$ as h,a as f,j as b}from"./index-DOaPWS1X.js";import{b as v}from"./browser-CjSdxGTc.js";import{L as y}from"./localeText-CaAXeE0W.js";const g={name:"share",components:{LocaleText:y},async setup(){const o=h(),e=r(!1),i=p(),n=r(""),s=r(void 0),l=r(new Blob);await u("/api/getDashboardTheme",{},d=>{n.value=d.data});const a=o.query.ShareID;return a===void 0||a.length===0?(s.value=void 0,e.value=!0):await u("/api/sharePeer/get",{ShareID:a},d=>{d.status?(s.value=d.data,l.value=new Blob([s.value.file],{type:"text/plain"})):s.value=void 0,e.value=!0}),{store:i,theme:n,peerConfiguration:s,blob:l}},mounted(){this.peerConfiguration&&v.toCanvas(document.querySelector("#qrcode"),this.peerConfiguration.file,o=>{o&&console.error(o)})},methods:{download(){const o=new Blob([this.peerConfiguration.file],{type:"text/plain"}),e=URL.createObjectURL(o),i=`${this.peerConfiguration.fileName}.conf`,n=document.createElement("a");n.href=e,n.download=i,n.click()}},computed:{getBlob(){return URL.createObjectURL(this.blob)}}},w=["data-bs-theme"],x={class:"m-auto text-body",style:{width:"500px"}},C={key:0,class:"text-center position-relative",style:{}},U={class:"position-absolute w-100 h-100 top-0 start-0 d-flex animate__animated animate__fadeInUp",style:{"animation-delay":"0.1s"}},I={class:"m-auto"},L={key:1,class:"d-flex align-items-center flex-column gap-3"},B={class:"h1 dashboardLogo text-center animate__animated animate__fadeInUp"},k={id:"qrcode",class:"rounded-3 shadow animate__animated animate__fadeInUp mb-3",ref:"qrcode"},D={class:"text-muted animate__animated animate__fadeInUp mb-1",style:{"animation-delay":"0.2s"}},R=["download","href"];function j(o,e,i,n,s,l){const a=b("LocaleText");return f(),m("div",{class:"container-fluid login-container-fluid d-flex main pt-5 overflow-scroll","data-bs-theme":this.theme},[t("div",x,[this.peerConfiguration?(f(),m("div",L,[t("div",B,[e[1]||(e[1]=t("h6",null,"WGDashboard",-1)),c(a,{t:"Scan QR Code with the WireGuard App to add peer"})]),t("canvas",k,null,512),t("p",D,[c(a,{t:"or click the button below to download the "}),e[2]||(e[2]=t("samp",null,".conf",-1)),c(a,{t:" file"})]),t("a",{download:this.peerConfiguration.fileName+".conf",href:l.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]=[t("i",{class:"bi bi-download"},null,-1)]),8,R)])):(f(),m("div",C,[e[0]||(e[0]=t("div",{class:"animate__animated animate__fadeInUp"},[t("h1",{style:{"font-size":"20rem",filter:"blur(1rem)","animation-duration":"7s"},class:"animate__animated animate__flash animate__infinite"},[t("i",{class:"bi bi-file-binary"})])],-1)),t("div",U,[t("h3",I,[c(a,{t:"Oh no... This link is either expired or invalid."})])])]))])],8,w)}const $=_(g,[["render",j],["__scopeId","data-v-1b44aacd"]]);export{$ as default}; diff --git a/src/static/app/dist/assets/signin-M3EwqtyC.js b/src/static/app/dist/assets/signin-M3EwqtyC.js new file mode 100644 index 0000000..38b6f04 --- /dev/null +++ b/src/static/app/dist/assets/signin-M3EwqtyC.js @@ -0,0 +1 @@ +import{_ as g,G as u,a as i,c as r,b as t,m as f,s as k,n as w,t as T,D as C,d as n,F as L,h as E,i as S,e as y,j as c,X as M,g as _,q as D,v as A,f as R,w as P,k as V}from"./index-DOaPWS1X.js";import{M as B}from"./message-ChztDIV3.js";import{d as $}from"./dayjs.min-D8jwq_wn.js";import{L as I}from"./localeText-CaAXeE0W.js";const O={name:"RemoteServer",props:{server:Object},data(){return{active:!1,startTime:void 0,endTime:void 0,errorMsg:"",refreshing:!1}},methods:{async handshake(){this.active=!1,this.server.host&&this.server.apiKey&&(this.refreshing=!0,this.startTime=void 0,this.endTime=void 0,this.startTime=$(),await fetch(`${this.server.host}/api/handshake`,{headers:{"content-type":"application/json","wg-dashboard-apikey":this.server.apiKey},method:"GET",signal:AbortSignal.timeout(5e3)}).then(s=>{if(s.status===200)return s.json();throw new Error(s.statusText)}).then(()=>{this.endTime=$(),this.active=!0}).catch(s=>{this.active=!1,this.errorMsg=s}),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(s=>s.json()).then(s=>{this.$emit("setActiveServer"),this.$router.push("/")})}},mounted(){this.handshake()},computed:{getHandshakeTime(){return this.startTime&&this.endTime?`${$().subtract(this.startTime).millisecond()}ms`:this.refreshing?u("Pinging..."):this.errorMsg?this.errorMsg:"N/A"}}},j={class:"card rounded-3"},q={class:"card-body"},G={class:"d-flex gap-3 w-100 remoteServerContainer"},N={class:"d-flex gap-3 align-items-center flex-grow-1"},U={class:"d-flex gap-3 align-items-center flex-grow-1"},z={class:"d-flex gap-2 button-group"},K={class:"card-footer gap-2 d-flex align-items-center"},W={key:0,class:"spin ms-auto text-primary-emphasis"};function F(s,e,l,d,a,h){return i(),r("div",j,[t("div",q,[t("div",G,[t("div",N,[e[7]||(e[7]=t("i",{class:"bi bi-server"},null,-1)),f(t("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),[[k,this.server.host]])]),t("div",U,[e[8]||(e[8]=t("i",{class:"bi bi-key-fill"},null,-1)),f(t("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),[[k,this.server.apiKey]])]),t("div",z,[t("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]=[t("i",{class:"bi bi-trash"},null,-1)])),t("button",{onClick:e[5]||(e[5]=o=>this.connect()),class:w([{disabled:!this.active},"ms-auto btn btn-sm bg-success-subtle text-success-emphasis border-1 border-success-subtle"])},e[10]||(e[10]=[t("i",{class:"bi bi-arrow-right-circle"},null,-1)]),2)])])]),t("div",K,[t("span",{class:w(["dot ms-0 me-2",[this.active?"active":"inactive"]])},null,2),t("small",null,T(this.getHandshakeTime),1),this.refreshing?(i(),r("div",W,e[11]||(e[11]=[t("i",{class:"bi bi-arrow-clockwise"},null,-1)]))):(i(),r("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]=[t("i",{class:"bi bi-arrow-clockwise me"},null,-1)])))])])}const H=g(O,[["render",F],["__scopeId","data-v-ed7817c7"]]),J={name:"RemoteServerList",setup(){return{store:C()}},components:{LocaleText:I,RemoteServer:H}},X={class:"w-100 mt-3"},Z={class:"d-flex align-items-center mb-3"},Q={class:"mb-0"},Y={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"}},ee={key:0,class:"text-muted m-auto"};function te(s,e,l,d,a,h){const o=c("LocaleText"),b=c("RemoteServer");return i(),r("div",X,[t("div",Z,[t("h5",Q,[n(o,{t:"Server List"})]),t("button",{onClick:e[0]||(e[0]=v=>this.store.addCrossServerConfiguration()),class:"btn bg-primary-subtle text-primary-emphasis border-1 border-primary-subtle shadow-sm ms-auto"},[e[1]||(e[1]=t("i",{class:"bi bi-plus-circle-fill me-2"},null,-1)),n(o,{t:"Server"})])]),t("div",Y,[(i(!0),r(L,null,E(this.store.CrossServerConfiguration.ServerList,(v,p)=>(i(),S(b,{onSetActiveServer:x=>this.store.setActiveCrossServer(p),onDelete:x=>this.store.deleteCrossServerConfiguration(p),key:p,server:v},null,8,["onSetActiveServer","onDelete","server"]))),128)),Object.keys(this.store.CrossServerConfiguration.ServerList).length===0?(i(),r("h6",ee,[n(o,{t:"Click"}),e[2]||(e[2]=t("i",{class:"bi bi-plus-circle-fill mx-1"},null,-1)),n(o,{t:"to add your server"})])):y("",!0)])])}const se=g(J,[["render",te]]),oe={name:"signInInput",methods:{GetLocale:u},props:{id:"",data:"",type:"",placeholder:""},computed:{getLocaleText(){return u(this.placeholder)}}},ie=["type","id","name","placeholder"];function re(s,e,l,d,a,h){return f((i(),r("input",{type:l.type,"onUpdate:modelValue":e[0]||(e[0]=o=>this.data[this.id]=o),class:"form-control rounded-3",id:this.id,name:this.id,autocomplete:"on",placeholder:this.getLocaleText,required:""},null,8,ie)),[[M,this.data[this.id]]])}const ne=g(oe,[["render",re]]),ae={name:"signInTOTP",methods:{GetLocale:u},props:{data:""},computed:{getLocaleText(){return u("OTP from your authenticator")}}},le=["placeholder"];function de(s,e,l,d,a,h){return f((i(),r("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,le)),[[k,this.data.totp]])}const ce=g(ae,[["render",de]]),ue={name:"signin",components:{SignInTOTP:ce,SignInInput:ne,LocaleText:I,RemoteServerList:se,Message:B},async setup(){const s=C();let e="dark",l=!1,d;return s.IsElectronApp||await Promise.all([_("/api/getDashboardTheme",{},a=>{e=a.data}),_("/api/isTotpEnabled",{},a=>{l=a.data}),_("/api/getDashboardVersion",{},a=>{d=a.data})]),s.removeActiveCrossServer(),{store:s,theme:e,totpEnabled:l,version:d}},data(){return{data:{username:"",password:"",totp:""},loginError:!1,loginErrorMessage:"",loading:!1}},computed:{getMessages(){return this.store.Messages.filter(s=>s.show)},applyLocale(s){return u(s)}},methods:{GetLocale:u,async auth(){this.data.username&&this.data.password&&(this.totpEnabled&&this.data.totp||!this.totpEnabled)?(this.loading=!0,await D("/api/authenticate",this.data,s=>{s.status?(this.loginError=!1,this.$refs.signInBtn.classList.add("signedIn"),s.message?this.$router.push("/welcome"):this.store.Redirect!==void 0?this.$router.push(this.store.Redirect):this.$router.push("/")):(this.loginError=!0,this.loginErrorMessage=s.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(s=>{s.value.length===0?(s.classList.remove("is-valid"),s.classList.add("is-invalid")):(s.classList.remove("is-invalid"),s.classList.add("is-valid"))})}}},me=["data-bs-theme"],he={class:"login-box m-auto"},pe={class:"m-auto",style:{width:"700px"}},fe={class:"mb-0 text-body"},ge={key:0,class:"alert alert-danger mt-2 mb-0",role:"alert"},be={class:"form-group text-body"},ve={class:"form-group text-body"},ye={key:0,class:"form-group text-body"},xe=["disabled"],_e={key:0,class:"d-flex w-100"},$e={key:1,class:"d-flex w-100 align-items-center"},ke={key:3,class:"d-flex mt-3"},Se={class:"form-check form-switch ms-auto"},we={class:"form-check-label",for:"flexSwitchCheckChecked"},Te={class:"text-muted pb-3 d-block w-100 text-center mt-3"},Ce={class:"messageCentre text-body position-absolute end-0 m-3"};function Le(s,e,l,d,a,h){const o=c("LocaleText"),b=c("SignInInput"),v=c("SignInTOTP"),p=c("RemoteServerList"),x=c("Message");return i(),r("div",{class:"container-fluid login-container-fluid d-flex main flex-column py-4 text-body h-100",style:{"overflow-y":"scroll"},"data-bs-theme":this.theme},[t("div",he,[t("div",pe,[t("h4",fe,[n(o,{t:"Welcome to"})]),e[7]||(e[7]=t("span",{class:"dashboardLogo display-3"},[t("strong",null,"WGDashboard")],-1)),a.loginError?(i(),r("div",ge,[n(o,{t:this.loginErrorMessage},null,8,["t"])])):y("",!0),this.store.CrossServerConfiguration.Enable?(i(),S(p,{key:2})):(i(),r("form",{key:1,onSubmit:e[0]||(e[0]=m=>{m.preventDefault(),this.auth()})},[t("div",be,[e[2]||(e[2]=t("label",{for:"username",class:"text-left",style:{"font-size":"1rem"}},[t("i",{class:"bi bi-person-circle"})],-1)),n(b,{id:"username",data:this.data,type:"text",placeholder:"Username"},null,8,["data"])]),t("div",ve,[e[3]||(e[3]=t("label",{for:"password",class:"text-left",style:{"font-size":"1rem"}},[t("i",{class:"bi bi-key-fill"})],-1)),n(b,{id:"password",data:this.data,type:"password",placeholder:"Password"},null,8,["data"])]),d.totpEnabled?(i(),r("div",ye,[e[4]||(e[4]=t("label",{for:"totp",class:"text-left",style:{"font-size":"1rem"}},[t("i",{class:"bi bi-lock-fill"})],-1)),n(v,{data:this.data},null,8,["data"])])):y("",!0),t("button",{class:"btn btn-lg btn-dark ms-auto mt-5 w-100 d-flex btn-brand signInBtn",disabled:this.loading,ref:"signInBtn"},[this.loading?(i(),r("span",$e,[n(o,{t:"Signing In..."}),e[6]||(e[6]=t("span",{class:"spinner-border ms-auto spinner-border-sm",role:"status"},null,-1))])):(i(),r("span",_e,[n(o,{t:"Sign In"}),e[5]||(e[5]=t("i",{class:"ms-auto bi bi-chevron-right"},null,-1))]))],8,xe)],32)),this.store.IsElectronApp?y("",!0):(i(),r("div",ke,[t("div",Se,[f(t("input",{"onUpdate:modelValue":e[1]||(e[1]=m=>this.store.CrossServerConfiguration.Enable=m),class:"form-check-input",type:"checkbox",role:"switch",id:"flexSwitchCheckChecked"},null,512),[[A,this.store.CrossServerConfiguration.Enable]]),t("label",we,[n(o,{t:"Access Remote Server"})])])]))])]),t("small",Te,[R(" WGDashboard "+T(this.version)+" | Developed with ❤️ by ",1),e[8]||(e[8]=t("a",{href:"https://github.com/donaldzou",target:"_blank"},[t("strong",null,"Donald Zou")],-1))]),t("div",Ce,[n(V,{name:"message",tag:"div",class:"position-relative"},{default:P(()=>[(i(!0),r(L,null,E(h.getMessages.slice().reverse(),m=>(i(),S(x,{message:m,key:m.id},null,8,["message"]))),128))]),_:1})])],8,me)}const Ae=g(ue,[["render",Le],["__scopeId","data-v-eca07c7a"]]);export{Ae as default}; diff --git a/src/static/app/dist/assets/totp-BZU5dK65.js b/src/static/app/dist/assets/totp-BZU5dK65.js new file mode 100644 index 0000000..a5f3c91 --- /dev/null +++ b/src/static/app/dist/assets/totp-BZU5dK65.js @@ -0,0 +1 @@ +import{_ as h,D as m,g as p,q as f,c as b,b as t,d as i,t as _,m as v,s as g,i as d,w as r,j as c,a as n}from"./index-DOaPWS1X.js";import{b as x}from"./browser-CjSdxGTc.js";import{L as y}from"./localeText-CaAXeE0W.js";const T={name:"totp",components:{LocaleText:y},async setup(){const s=m();let e="";return await p("/api/Welcome_GetTotpLink",{},a=>{a.status&&(e=a.data)}),{l:e,store:s}},mounted(){this.l&&x.toCanvas(document.getElementById("qrcode"),this.l,function(s){})},data(){return{totp:"",totpInvalidMessage:"",verified:!1}},methods:{validateTotp(){}},watch:{totp(s){const e=document.querySelector("#totp");e.classList.remove("is-invalid","is-valid"),s.length===6&&(console.log(s),/[0-9]{6}/.test(s)?f("/api/Welcome_VerifyTotpLink",{totp:s},a=>{a.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"))}}},k=["data-bs-theme"],w={class:"m-auto text-body",style:{width:"500px"}},L={class:"d-flex flex-column"},M={class:"dashboardLogo display-4"},C={class:"mb-2"},P={class:"text-muted"},I={class:"p-3 bg-body-secondary rounded-3 border mb-3"},O={class:"text-muted mb-0"},B=["href"],$={style:{"line-break":"anywhere"}},q={for:"totp",class:"mb-2"},D={class:"text-muted"},S={class:"form-group mb-2"},A=["disabled"],E={class:"invalid-feedback"},F={class:"valid-feedback"},R={class:"d-flex gap-3 mt-5 flex-column"};function G(s,e,a,N,W,j){const o=c("LocaleText"),l=c("RouterLink");return n(),b("div",{class:"container-fluid login-container-fluid d-flex main pt-5 overflow-scroll","data-bs-theme":this.store.Configuration.Server.dashboard_theme},[t("div",w,[t("div",L,[t("div",null,[t("h1",M,[i(o,{t:"Multi-Factor Authentication (MFA)"})]),t("p",C,[t("small",P,[i(o,{t:"1. Please scan the following QR Code to generate TOTP with your choice of authenticator"})])]),e[1]||(e[1]=t("canvas",{id:"qrcode",class:"rounded-3 mb-2"},null,-1)),t("div",I,[t("p",O,[t("small",null,[i(o,{t:"Or you can click the link below:"})])]),t("a",{href:this.l},[t("code",$,_(this.l),1)],8,B)]),t("label",q,[t("small",D,[i(o,{t:"2. Enter the TOTP generated by your authenticator to verify"})])]),t("div",S,[v(t("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]=u=>this.totp=u),disabled:this.verified},null,8,A),[[g,this.totp]]),t("div",E,[i(o,{t:this.totpInvalidMessage},null,8,["t"])]),t("div",F,[i(o,{t:"TOTP verified!"})])])]),e[4]||(e[4]=t("hr",null,null,-1)),t("div",R,[this.verified?(n(),d(l,{key:1,to:"/",class:"btn btn-dark btn-lg d-flex btn-brand shadow align-items-center flex-grow-1 rounded-3"},{default:r(()=>[i(o,{t:"Complete"}),e[3]||(e[3]=t("i",{class:"bi bi-chevron-right ms-auto"},null,-1))]),_:1})):(n(),d(l,{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:r(()=>[i(o,{t:"I don't need MFA"}),e[2]||(e[2]=t("i",{class:"bi bi-chevron-right ms-auto"},null,-1))]),_:1}))])])])],8,k)}const z=h(T,[["render",G]]);export{z as default}; diff --git a/src/static/app/dist/assets/traceroute-BGkng5o-.js b/src/static/app/dist/assets/traceroute-BGkng5o-.js new file mode 100644 index 0000000..503262d --- /dev/null +++ b/src/static/app/dist/assets/traceroute-BGkng5o-.js @@ -0,0 +1 @@ +import{_ as h,W as b,g,c as o,b as t,d as n,m as y,s as f,A as v,w as r,T as c,a,f as x,F as u,h as m,n as T,z as k,t as i,e as A,j as _}from"./index-DOaPWS1X.js";import{O as w}from"./osmap-BRB1j1wE.js";import{L as R}from"./localeText-CaAXeE0W.js";const M={name:"traceroute",components:{LocaleText:R,OSMap:w},data(){return{tracing:!1,ipAddress:void 0,tracerouteResult:void 0}},setup(){return{store:b()}},methods:{execute(){this.ipAddress&&(this.tracing=!0,this.tracerouteResult=void 0,g("/api/traceroute/execute",{ipAddress:this.ipAddress},d=>{d.status?this.tracerouteResult=d.data:this.store.newMessage("Server",d.message,"danger"),this.tracing=!1}))}}},S={class:"mt-md-5 mt-3 text-body"},$={class:"container-md"},C={class:"mb-3 text-body"},L={class:"d-flex gap-2 flex-column mb-5"},P={class:"mb-1 text-muted",for:"ipAddress"},V=["disabled"],N=["disabled"],O={key:0,class:"d-block"},z={key:1,class:"d-block"},B={class:"position-relative"},I={key:"pingPlaceholder"},D={key:1},E={key:"table",class:"w-100 mt-2"},F={class:"table table-sm rounded-3 w-100"},G={scope:"col"},H={scope:"col"},K={scope:"col"},W={scope:"col"},j={scope:"col"},U={scope:"col"},q={key:0};function J(d,s,Q,X,Y,Z){const l=_("LocaleText"),p=_("OSMap");return a(),o("div",S,[t("div",$,[t("h3",C,[n(l,{t:"Traceroute"})]),t("div",L,[t("div",null,[t("label",P,[t("small",null,[n(l,{t:"Enter IP Address / Hostname"})])]),y(t("input",{disabled:this.tracing,id:"ipAddress",class:"form-control","onUpdate:modelValue":s[0]||(s[0]=e=>this.ipAddress=e),onKeyup:s[1]||(s[1]=v(e=>this.execute(),["enter"])),type:"text"},null,40,V),[[f,this.ipAddress]])]),t("button",{class:"btn btn-primary rounded-3 mt-3 position-relative",disabled:this.tracing||!this.ipAddress,onClick:s[2]||(s[2]=e=>this.execute())},[n(c,{name:"slide"},{default:r(()=>[this.tracing?(a(),o("span",z,s[4]||(s[4]=[t("span",{class:"spinner-border spinner-border-sm","aria-hidden":"true"},null,-1),t("span",{class:"visually-hidden",role:"status"},"Loading...",-1)]))):(a(),o("span",O,s[3]||(s[3]=[t("i",{class:"bi bi-person-walking me-2"},null,-1),x("Trace! ")])))]),_:1})],8,N)]),t("div",B,[n(c,{name:"ping"},{default:r(()=>[this.tracerouteResult?(a(),o("div",D,[n(p,{d:this.tracerouteResult,type:"traceroute"},null,8,["d"]),t("div",E,[t("table",F,[t("thead",null,[t("tr",null,[t("th",G,[n(l,{t:"Hop"})]),t("th",H,[n(l,{t:"IP Address"})]),t("th",K,[n(l,{t:"Average RTT (ms)"})]),t("th",W,[n(l,{t:"Min RTT (ms)"})]),t("th",j,[n(l,{t:"Max RTT (ms)"})]),t("th",U,[n(l,{t:"Geolocation"})])])]),t("tbody",null,[(a(!0),o(u,null,m(this.tracerouteResult,(e,tt)=>(a(),o("tr",null,[t("td",null,[t("small",null,i(e.hop),1)]),t("td",null,[t("small",null,i(e.ip),1)]),t("td",null,[t("small",null,i(e.avg_rtt),1)]),t("td",null,[t("small",null,i(e.min_rtt),1)]),t("td",null,[t("small",null,i(e.max_rtt),1)]),t("td",null,[e.geo.city&&e.geo.country?(a(),o("span",q,[t("small",null,i(e.geo.city)+", "+i(e.geo.country),1)])):A("",!0)])]))),256))])])])])):(a(),o("div",I,[s[5]||(s[5]=t("div",{class:"pingPlaceholder bg-body-secondary rounded-3 mb-3",style:{height:"300px !important"}},null,-1)),(a(),o(u,null,m(5,e=>t("div",{class:T(["pingPlaceholder bg-body-secondary rounded-3 mb-3",{"animate__animated animate__flash animate__slower animate__infinite":this.tracing}]),style:k({"animation-delay":`${e*.05}s`})},null,6)),64))]))]),_:1})])])])}const ot=h(M,[["render",J],["__scopeId","data-v-549eb223"]]);export{ot as default}; diff --git a/src/static/app/dist/assets/vue-datepicker-D91GxXPq.js b/src/static/app/dist/assets/vue-datepicker-D91GxXPq.js new file mode 100644 index 0000000..ad9294f --- /dev/null +++ b/src/static/app/dist/assets/vue-datepicker-D91GxXPq.js @@ -0,0 +1 @@ +import{C as ha,r as Z,K as ze,a1 as qt,a2 as ca,o as Ke,Q as it,O as Ca,E as ct,x as G,a as P,c as W,d as ot,a3 as je,h as Ye,w as _e,a4 as ue,a5 as We,a6 as at,B as d,a7 as Qe,a8 as Pn,i as De,T as ta,e as j,l as Oa,a9 as Br,n as ke,b as ye,F as we,z as dt,aa as va,t as Ge,M as Nr,ab as An,ac as Lr,f as Dt,ad as Hr,m as Ma,ae as Da,A as Vr,I as Fr,J as qr}from"./index-DOaPWS1X.js";function ve(e){const t=Object.prototype.toString.call(e);return e instanceof Date||typeof e=="object"&&t==="[object Date]"?new e.constructor(+e):typeof e=="number"||t==="[object Number]"||typeof e=="string"||t==="[object String]"?new Date(e):new Date(NaN)}function Te(e,t){return e instanceof Date?new e.constructor(t):new Date(t)}function mt(e,t){const n=ve(e);return isNaN(t)?Te(e,NaN):(t&&n.setDate(n.getDate()+t),n)}function ft(e,t){const n=ve(e);if(isNaN(t))return Te(e,NaN);if(!t)return n;const a=n.getDate(),r=Te(e,n.getTime());r.setMonth(n.getMonth()+t+1,0);const l=r.getDate();return a>=l?r:(n.setFullYear(r.getFullYear(),r.getMonth(),a),n)}function Xn(e,t){const{years:n=0,months:a=0,weeks:r=0,days:l=0,hours:i=0,minutes:p=0,seconds:c=0}=t,C=ve(e),m=a||n?ft(C,a+n*12):C,v=l||r?mt(m,l+r*7):m,h=p+i*60,Y=(c+h*60)*1e3;return Te(e,v.getTime()+Y)}function Wr(e,t){const n=+ve(e);return Te(e,n+t)}const Gn=6048e5,Qr=864e5,zr=6e4,jn=36e5,Ur=1e3;function Xr(e,t){return Wr(e,t*jn)}let Gr={};function Wt(){return Gr}function ht(e,t){const n=Wt(),a=t?.weekStartsOn??t?.locale?.options?.weekStartsOn??n.weekStartsOn??n.locale?.options?.weekStartsOn??0,r=ve(e),l=r.getDay(),i=(l=r.getTime()?n+1:t.getTime()>=i.getTime()?n:n-1}function Cn(e){const t=ve(e);return t.setHours(0,0,0,0),t}function Ta(e){const t=ve(e),n=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return n.setUTCFullYear(t.getFullYear()),+e-+n}function Jn(e,t){const n=Cn(e),a=Cn(t),r=+n-Ta(n),l=+a-Ta(a);return Math.round((r-l)/Qr)}function jr(e){const t=Kn(e),n=Te(e,0);return n.setFullYear(t,0,4),n.setHours(0,0,0,0),Gt(n)}function Kr(e,t){const n=t*3;return ft(e,n)}function un(e,t){return ft(e,t*12)}function On(e,t){const n=ve(e),a=ve(t),r=n.getTime()-a.getTime();return r<0?-1:r>0?1:r}function Zn(e){return e instanceof Date||typeof e=="object"&&Object.prototype.toString.call(e)==="[object Date]"}function ua(e){if(!Zn(e)&&typeof e!="number")return!1;const t=ve(e);return!isNaN(Number(t))}function $n(e){const t=ve(e);return Math.trunc(t.getMonth()/3)+1}function Jr(e,t){const n=ve(e),a=ve(t);return n.getFullYear()-a.getFullYear()}function Zr(e,t){const n=ve(e),a=ve(t),r=On(n,a),l=Math.abs(Jr(n,a));n.setFullYear(1584),a.setFullYear(1584);const i=On(n,a)===-r,p=r*(l-+i);return p===0?0:p}function er(e,t){const n=ve(e.start),a=ve(e.end);let r=+n>+a;const l=r?+n:+a,i=r?a:n;i.setHours(0,0,0,0);let p=1;const c=[];for(;+i<=l;)c.push(ve(i)),i.setDate(i.getDate()+p),i.setHours(0,0,0,0);return r?c.reverse():c}function Ht(e){const t=ve(e),n=t.getMonth(),a=n-n%3;return t.setMonth(a,1),t.setHours(0,0,0,0),t}function el(e,t){const n=ve(e.start),a=ve(e.end);let r=+n>+a;const l=r?+Ht(n):+Ht(a);let i=Ht(r?a:n),p=1;const c=[];for(;+i<=l;)c.push(ve(i)),i=Kr(i,p);return r?c.reverse():c}function tl(e){const t=ve(e);return t.setDate(1),t.setHours(0,0,0,0),t}function tr(e){const t=ve(e),n=t.getFullYear();return t.setFullYear(n+1,0,0),t.setHours(23,59,59,999),t}function ma(e){const t=ve(e),n=Te(e,0);return n.setFullYear(t.getFullYear(),0,1),n.setHours(0,0,0,0),n}function ar(e,t){const n=Wt(),a=t?.weekStartsOn??t?.locale?.options?.weekStartsOn??n.weekStartsOn??n.locale?.options?.weekStartsOn??0,r=ve(e),l=r.getDay(),i=(l{let a;const r=al[e];return typeof r=="string"?a=r:t===1?a=r.one:a=r.other.replace("{{count}}",t.toString()),n?.addSuffix?n.comparison&&n.comparison>0?"in "+a:a+" ago":a};function Wa(e){return(t={})=>{const n=t.width?String(t.width):e.defaultWidth;return e.formats[n]||e.formats[e.defaultWidth]}}const rl={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},ll={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},ol={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},il={date:Wa({formats:rl,defaultWidth:"full"}),time:Wa({formats:ll,defaultWidth:"full"}),dateTime:Wa({formats:ol,defaultWidth:"full"})},sl={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},ul=(e,t,n,a)=>sl[e];function oa(e){return(t,n)=>{const a=n?.context?String(n.context):"standalone";let r;if(a==="formatting"&&e.formattingValues){const i=e.defaultFormattingWidth||e.defaultWidth,p=n?.width?String(n.width):i;r=e.formattingValues[p]||e.formattingValues[i]}else{const i=e.defaultWidth,p=n?.width?String(n.width):e.defaultWidth;r=e.values[p]||e.values[i]}const l=e.argumentCallback?e.argumentCallback(t):t;return r[l]}}const dl={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},cl={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},vl={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"]},ml={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"]},pl={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"}},fl={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"}},hl=(e,t)=>{const n=Number(e),a=n%100;if(a>20||a<10)switch(a%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},yl={ordinalNumber:hl,era:oa({values:dl,defaultWidth:"wide"}),quarter:oa({values:cl,defaultWidth:"wide",argumentCallback:e=>e-1}),month:oa({values:vl,defaultWidth:"wide"}),day:oa({values:ml,defaultWidth:"wide"}),dayPeriod:oa({values:pl,defaultWidth:"wide",formattingValues:fl,defaultFormattingWidth:"wide"})};function ia(e){return(t,n={})=>{const a=n.width,r=a&&e.matchPatterns[a]||e.matchPatterns[e.defaultMatchWidth],l=t.match(r);if(!l)return null;const i=l[0],p=a&&e.parsePatterns[a]||e.parsePatterns[e.defaultParseWidth],c=Array.isArray(p)?bl(p,v=>v.test(i)):gl(p,v=>v.test(i));let C;C=e.valueCallback?e.valueCallback(c):c,C=n.valueCallback?n.valueCallback(C):C;const m=t.slice(i.length);return{value:C,rest:m}}}function gl(e,t){for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t(e[n]))return n}function bl(e,t){for(let n=0;n{const a=t.match(e.matchPattern);if(!a)return null;const r=a[0],l=t.match(e.parsePattern);if(!l)return null;let i=e.valueCallback?e.valueCallback(l[0]):l[0];i=n.valueCallback?n.valueCallback(i):i;const p=t.slice(r.length);return{value:i,rest:p}}}const _l=/^(\d+)(th|st|nd|rd)?/i,kl=/\d+/i,xl={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},Ml={any:[/^b/i,/^(a|c)/i]},Dl={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},Tl={any:[/1/i,/2/i,/3/i,/4/i]},Pl={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},Al={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]},Cl={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},Ol={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]},$l={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},Yl={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}},Sl={ordinalNumber:wl({matchPattern:_l,parsePattern:kl,valueCallback:e=>parseInt(e,10)}),era:ia({matchPatterns:xl,defaultMatchWidth:"wide",parsePatterns:Ml,defaultParseWidth:"any"}),quarter:ia({matchPatterns:Dl,defaultMatchWidth:"wide",parsePatterns:Tl,defaultParseWidth:"any",valueCallback:e=>e+1}),month:ia({matchPatterns:Pl,defaultMatchWidth:"wide",parsePatterns:Al,defaultParseWidth:"any"}),day:ia({matchPatterns:Cl,defaultMatchWidth:"wide",parsePatterns:Ol,defaultParseWidth:"any"}),dayPeriod:ia({matchPatterns:$l,defaultMatchWidth:"any",parsePatterns:Yl,defaultParseWidth:"any"})},nr={code:"en-US",formatDistance:nl,formatLong:il,formatRelative:ul,localize:yl,match:Sl,options:{weekStartsOn:0,firstWeekContainsDate:1}};function Rl(e){const t=ve(e);return Jn(t,ma(t))+1}function dn(e){const t=ve(e),n=+Gt(t)-+jr(t);return Math.round(n/Gn)+1}function cn(e,t){const n=ve(e),a=n.getFullYear(),r=Wt(),l=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??r.firstWeekContainsDate??r.locale?.options?.firstWeekContainsDate??1,i=Te(e,0);i.setFullYear(a+1,0,l),i.setHours(0,0,0,0);const p=ht(i,t),c=Te(e,0);c.setFullYear(a,0,l),c.setHours(0,0,0,0);const C=ht(c,t);return n.getTime()>=p.getTime()?a+1:n.getTime()>=C.getTime()?a:a-1}function Il(e,t){const n=Wt(),a=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??n.firstWeekContainsDate??n.locale?.options?.firstWeekContainsDate??1,r=cn(e,t),l=Te(e,0);return l.setFullYear(r,0,a),l.setHours(0,0,0,0),ht(l,t)}function vn(e,t){const n=ve(e),a=+ht(n,t)-+Il(n,t);return Math.round(a/Gn)+1}function Ae(e,t){const n=e<0?"-":"",a=Math.abs(e).toString().padStart(t,"0");return n+a}const Ct={y(e,t){const n=e.getFullYear(),a=n>0?n:1-n;return Ae(t==="yy"?a%100:a,t.length)},M(e,t){const n=e.getMonth();return t==="M"?String(n+1):Ae(n+1,2)},d(e,t){return Ae(e.getDate(),t.length)},a(e,t){const n=e.getHours()/12>=1?"pm":"am";switch(t){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(e,t){return Ae(e.getHours()%12||12,t.length)},H(e,t){return Ae(e.getHours(),t.length)},m(e,t){return Ae(e.getMinutes(),t.length)},s(e,t){return Ae(e.getSeconds(),t.length)},S(e,t){const n=t.length,a=e.getMilliseconds(),r=Math.trunc(a*Math.pow(10,n-3));return Ae(r,t.length)}},Qt={am:"am",pm:"pm",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},Sn={G:function(e,t,n){const a=e.getFullYear()>0?1:0;switch(t){case"G":case"GG":case"GGG":return n.era(a,{width:"abbreviated"});case"GGGGG":return n.era(a,{width:"narrow"});case"GGGG":default:return n.era(a,{width:"wide"})}},y:function(e,t,n){if(t==="yo"){const a=e.getFullYear(),r=a>0?a:1-a;return n.ordinalNumber(r,{unit:"year"})}return Ct.y(e,t)},Y:function(e,t,n,a){const r=cn(e,a),l=r>0?r:1-r;if(t==="YY"){const i=l%100;return Ae(i,2)}return t==="Yo"?n.ordinalNumber(l,{unit:"year"}):Ae(l,t.length)},R:function(e,t){const n=Kn(e);return Ae(n,t.length)},u:function(e,t){const n=e.getFullYear();return Ae(n,t.length)},Q:function(e,t,n){const a=Math.ceil((e.getMonth()+1)/3);switch(t){case"Q":return String(a);case"QQ":return Ae(a,2);case"Qo":return n.ordinalNumber(a,{unit:"quarter"});case"QQQ":return n.quarter(a,{width:"abbreviated",context:"formatting"});case"QQQQQ":return n.quarter(a,{width:"narrow",context:"formatting"});case"QQQQ":default:return n.quarter(a,{width:"wide",context:"formatting"})}},q:function(e,t,n){const a=Math.ceil((e.getMonth()+1)/3);switch(t){case"q":return String(a);case"qq":return Ae(a,2);case"qo":return n.ordinalNumber(a,{unit:"quarter"});case"qqq":return n.quarter(a,{width:"abbreviated",context:"standalone"});case"qqqqq":return n.quarter(a,{width:"narrow",context:"standalone"});case"qqqq":default:return n.quarter(a,{width:"wide",context:"standalone"})}},M:function(e,t,n){const a=e.getMonth();switch(t){case"M":case"MM":return Ct.M(e,t);case"Mo":return n.ordinalNumber(a+1,{unit:"month"});case"MMM":return n.month(a,{width:"abbreviated",context:"formatting"});case"MMMMM":return n.month(a,{width:"narrow",context:"formatting"});case"MMMM":default:return n.month(a,{width:"wide",context:"formatting"})}},L:function(e,t,n){const a=e.getMonth();switch(t){case"L":return String(a+1);case"LL":return Ae(a+1,2);case"Lo":return n.ordinalNumber(a+1,{unit:"month"});case"LLL":return n.month(a,{width:"abbreviated",context:"standalone"});case"LLLLL":return n.month(a,{width:"narrow",context:"standalone"});case"LLLL":default:return n.month(a,{width:"wide",context:"standalone"})}},w:function(e,t,n,a){const r=vn(e,a);return t==="wo"?n.ordinalNumber(r,{unit:"week"}):Ae(r,t.length)},I:function(e,t,n){const a=dn(e);return t==="Io"?n.ordinalNumber(a,{unit:"week"}):Ae(a,t.length)},d:function(e,t,n){return t==="do"?n.ordinalNumber(e.getDate(),{unit:"date"}):Ct.d(e,t)},D:function(e,t,n){const a=Rl(e);return t==="Do"?n.ordinalNumber(a,{unit:"dayOfYear"}):Ae(a,t.length)},E:function(e,t,n){const a=e.getDay();switch(t){case"E":case"EE":case"EEE":return n.day(a,{width:"abbreviated",context:"formatting"});case"EEEEE":return n.day(a,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(a,{width:"short",context:"formatting"});case"EEEE":default:return n.day(a,{width:"wide",context:"formatting"})}},e:function(e,t,n,a){const r=e.getDay(),l=(r-a.weekStartsOn+8)%7||7;switch(t){case"e":return String(l);case"ee":return Ae(l,2);case"eo":return n.ordinalNumber(l,{unit:"day"});case"eee":return n.day(r,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(r,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(r,{width:"short",context:"formatting"});case"eeee":default:return n.day(r,{width:"wide",context:"formatting"})}},c:function(e,t,n,a){const r=e.getDay(),l=(r-a.weekStartsOn+8)%7||7;switch(t){case"c":return String(l);case"cc":return Ae(l,t.length);case"co":return n.ordinalNumber(l,{unit:"day"});case"ccc":return n.day(r,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(r,{width:"narrow",context:"standalone"});case"cccccc":return n.day(r,{width:"short",context:"standalone"});case"cccc":default:return n.day(r,{width:"wide",context:"standalone"})}},i:function(e,t,n){const a=e.getDay(),r=a===0?7:a;switch(t){case"i":return String(r);case"ii":return Ae(r,t.length);case"io":return n.ordinalNumber(r,{unit:"day"});case"iii":return n.day(a,{width:"abbreviated",context:"formatting"});case"iiiii":return n.day(a,{width:"narrow",context:"formatting"});case"iiiiii":return n.day(a,{width:"short",context:"formatting"});case"iiii":default:return n.day(a,{width:"wide",context:"formatting"})}},a:function(e,t,n){const r=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"});case"aaa":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return n.dayPeriod(r,{width:"narrow",context:"formatting"});case"aaaa":default:return n.dayPeriod(r,{width:"wide",context:"formatting"})}},b:function(e,t,n){const a=e.getHours();let r;switch(a===12?r=Qt.noon:a===0?r=Qt.midnight:r=a/12>=1?"pm":"am",t){case"b":case"bb":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"});case"bbb":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return n.dayPeriod(r,{width:"narrow",context:"formatting"});case"bbbb":default:return n.dayPeriod(r,{width:"wide",context:"formatting"})}},B:function(e,t,n){const a=e.getHours();let r;switch(a>=17?r=Qt.evening:a>=12?r=Qt.afternoon:a>=4?r=Qt.morning:r=Qt.night,t){case"B":case"BB":case"BBB":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"});case"BBBBB":return n.dayPeriod(r,{width:"narrow",context:"formatting"});case"BBBB":default:return n.dayPeriod(r,{width:"wide",context:"formatting"})}},h:function(e,t,n){if(t==="ho"){let a=e.getHours()%12;return a===0&&(a=12),n.ordinalNumber(a,{unit:"hour"})}return Ct.h(e,t)},H:function(e,t,n){return t==="Ho"?n.ordinalNumber(e.getHours(),{unit:"hour"}):Ct.H(e,t)},K:function(e,t,n){const a=e.getHours()%12;return t==="Ko"?n.ordinalNumber(a,{unit:"hour"}):Ae(a,t.length)},k:function(e,t,n){let a=e.getHours();return a===0&&(a=24),t==="ko"?n.ordinalNumber(a,{unit:"hour"}):Ae(a,t.length)},m:function(e,t,n){return t==="mo"?n.ordinalNumber(e.getMinutes(),{unit:"minute"}):Ct.m(e,t)},s:function(e,t,n){return t==="so"?n.ordinalNumber(e.getSeconds(),{unit:"second"}):Ct.s(e,t)},S:function(e,t){return Ct.S(e,t)},X:function(e,t,n){const a=e.getTimezoneOffset();if(a===0)return"Z";switch(t){case"X":return In(a);case"XXXX":case"XX":return Nt(a);case"XXXXX":case"XXX":default:return Nt(a,":")}},x:function(e,t,n){const a=e.getTimezoneOffset();switch(t){case"x":return In(a);case"xxxx":case"xx":return Nt(a);case"xxxxx":case"xxx":default:return Nt(a,":")}},O:function(e,t,n){const a=e.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+Rn(a,":");case"OOOO":default:return"GMT"+Nt(a,":")}},z:function(e,t,n){const a=e.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+Rn(a,":");case"zzzz":default:return"GMT"+Nt(a,":")}},t:function(e,t,n){const a=Math.trunc(e.getTime()/1e3);return Ae(a,t.length)},T:function(e,t,n){const a=e.getTime();return Ae(a,t.length)}};function Rn(e,t=""){const n=e>0?"-":"+",a=Math.abs(e),r=Math.trunc(a/60),l=a%60;return l===0?n+String(r):n+String(r)+t+Ae(l,2)}function In(e,t){return e%60===0?(e>0?"-":"+")+Ae(Math.abs(e)/60,2):Nt(e,t)}function Nt(e,t=""){const n=e>0?"-":"+",a=Math.abs(e),r=Ae(Math.trunc(a/60),2),l=Ae(a%60,2);return n+r+t+l}const En=(e,t)=>{switch(e){case"P":return t.date({width:"short"});case"PP":return t.date({width:"medium"});case"PPP":return t.date({width:"long"});case"PPPP":default:return t.date({width:"full"})}},rr=(e,t)=>{switch(e){case"p":return t.time({width:"short"});case"pp":return t.time({width:"medium"});case"ppp":return t.time({width:"long"});case"pppp":default:return t.time({width:"full"})}},El=(e,t)=>{const n=e.match(/(P+)(p+)?/)||[],a=n[1],r=n[2];if(!r)return En(e,t);let l;switch(a){case"P":l=t.dateTime({width:"short"});break;case"PP":l=t.dateTime({width:"medium"});break;case"PPP":l=t.dateTime({width:"long"});break;case"PPPP":default:l=t.dateTime({width:"full"});break}return l.replace("{{date}}",En(a,t)).replace("{{time}}",rr(r,t))},an={p:rr,P:El},Bl=/^D+$/,Nl=/^Y+$/,Ll=["D","DD","YY","YYYY"];function lr(e){return Bl.test(e)}function or(e){return Nl.test(e)}function nn(e,t,n){const a=Hl(e,t,n);if(console.warn(a),Ll.includes(e))throw new RangeError(a)}function Hl(e,t,n){const a=e[0]==="Y"?"years":"days of the month";return`Use \`${e.toLowerCase()}\` instead of \`${e}\` (in \`${t}\`) for formatting ${a} to the input \`${n}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}const Vl=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,Fl=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,ql=/^'([^]*?)'?$/,Wl=/''/g,Ql=/[a-zA-Z]/;function kt(e,t,n){const a=Wt(),r=n?.locale??a.locale??nr,l=n?.firstWeekContainsDate??n?.locale?.options?.firstWeekContainsDate??a.firstWeekContainsDate??a.locale?.options?.firstWeekContainsDate??1,i=n?.weekStartsOn??n?.locale?.options?.weekStartsOn??a.weekStartsOn??a.locale?.options?.weekStartsOn??0,p=ve(e);if(!ua(p))throw new RangeError("Invalid time value");let c=t.match(Fl).map(m=>{const v=m[0];if(v==="p"||v==="P"){const h=an[v];return h(m,r.formatLong)}return m}).join("").match(Vl).map(m=>{if(m==="''")return{isToken:!1,value:"'"};const v=m[0];if(v==="'")return{isToken:!1,value:zl(m)};if(Sn[v])return{isToken:!0,value:m};if(v.match(Ql))throw new RangeError("Format string contains an unescaped latin alphabet character `"+v+"`");return{isToken:!1,value:m}});r.localize.preprocessor&&(c=r.localize.preprocessor(p,c));const C={firstWeekContainsDate:l,weekStartsOn:i,locale:r};return c.map(m=>{if(!m.isToken)return m.value;const v=m.value;(!n?.useAdditionalWeekYearTokens&&or(v)||!n?.useAdditionalDayOfYearTokens&&lr(v))&&nn(v,t,String(e));const h=Sn[v[0]];return h(p,v,r.localize,C)}).join("")}function zl(e){const t=e.match(ql);return t?t[1].replace(Wl,"'"):e}function Ul(e){return ve(e).getDay()}function Xl(e){const t=ve(e),n=t.getFullYear(),a=t.getMonth(),r=Te(e,0);return r.setFullYear(n,a+1,0),r.setHours(0,0,0,0),r.getDate()}function Gl(){return Object.assign({},Wt())}function Tt(e){return ve(e).getHours()}function jl(e){let n=ve(e).getDay();return n===0&&(n=7),n}function Rt(e){return ve(e).getMinutes()}function xe(e){return ve(e).getMonth()}function jt(e){return ve(e).getSeconds()}function he(e){return ve(e).getFullYear()}function Kt(e,t){const n=ve(e),a=ve(t);return n.getTime()>a.getTime()}function pa(e,t){const n=ve(e),a=ve(t);return+n<+a}function Xt(e,t){const n=ve(e),a=ve(t);return+n==+a}function Kl(e,t){const n=t instanceof Date?Te(t,0):new t(0);return n.setFullYear(e.getFullYear(),e.getMonth(),e.getDate()),n.setHours(e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()),n}const Jl=10;class ir{subPriority=0;validate(t,n){return!0}}class Zl extends ir{constructor(t,n,a,r,l){super(),this.value=t,this.validateValue=n,this.setValue=a,this.priority=r,l&&(this.subPriority=l)}validate(t,n){return this.validateValue(t,this.value,n)}set(t,n,a){return this.setValue(t,n,this.value,a)}}class eo extends ir{priority=Jl;subPriority=-1;set(t,n){return n.timestampIsSet?t:Te(t,Kl(t,Date))}}class Pe{run(t,n,a,r){const l=this.parse(t,n,a,r);return l?{setter:new Zl(l.value,this.validate,this.set,this.priority,this.subPriority),rest:l.rest}:null}validate(t,n,a){return!0}}class to extends Pe{priority=140;parse(t,n,a){switch(n){case"G":case"GG":case"GGG":return a.era(t,{width:"abbreviated"})||a.era(t,{width:"narrow"});case"GGGGG":return a.era(t,{width:"narrow"});case"GGGG":default:return a.era(t,{width:"wide"})||a.era(t,{width:"abbreviated"})||a.era(t,{width:"narrow"})}}set(t,n,a){return n.era=a,t.setFullYear(a,0,1),t.setHours(0,0,0,0),t}incompatibleTokens=["R","u","t","T"]}const Le={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}/},bt={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 He(e,t){return e&&{value:t(e.value),rest:e.rest}}function Re(e,t){const n=t.match(e);return n?{value:parseInt(n[0],10),rest:t.slice(n[0].length)}:null}function wt(e,t){const n=t.match(e);if(!n)return null;if(n[0]==="Z")return{value:0,rest:t.slice(1)};const a=n[1]==="+"?1:-1,r=n[2]?parseInt(n[2],10):0,l=n[3]?parseInt(n[3],10):0,i=n[5]?parseInt(n[5],10):0;return{value:a*(r*jn+l*zr+i*Ur),rest:t.slice(n[0].length)}}function sr(e){return Re(Le.anyDigitsSigned,e)}function Ee(e,t){switch(e){case 1:return Re(Le.singleDigit,t);case 2:return Re(Le.twoDigits,t);case 3:return Re(Le.threeDigits,t);case 4:return Re(Le.fourDigits,t);default:return Re(new RegExp("^\\d{1,"+e+"}"),t)}}function Pa(e,t){switch(e){case 1:return Re(Le.singleDigitSigned,t);case 2:return Re(Le.twoDigitsSigned,t);case 3:return Re(Le.threeDigitsSigned,t);case 4:return Re(Le.fourDigitsSigned,t);default:return Re(new RegExp("^-?\\d{1,"+e+"}"),t)}}function mn(e){switch(e){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 ur(e,t){const n=t>0,a=n?t:1-t;let r;if(a<=50)r=e||100;else{const l=a+50,i=Math.trunc(l/100)*100,p=e>=l%100;r=e+i-(p?100:0)}return n?r:1-r}function dr(e){return e%400===0||e%4===0&&e%100!==0}class ao extends Pe{priority=130;incompatibleTokens=["Y","R","u","w","I","i","e","c","t","T"];parse(t,n,a){const r=l=>({year:l,isTwoDigitYear:n==="yy"});switch(n){case"y":return He(Ee(4,t),r);case"yo":return He(a.ordinalNumber(t,{unit:"year"}),r);default:return He(Ee(n.length,t),r)}}validate(t,n){return n.isTwoDigitYear||n.year>0}set(t,n,a){const r=t.getFullYear();if(a.isTwoDigitYear){const i=ur(a.year,r);return t.setFullYear(i,0,1),t.setHours(0,0,0,0),t}const l=!("era"in n)||n.era===1?a.year:1-a.year;return t.setFullYear(l,0,1),t.setHours(0,0,0,0),t}}class no extends Pe{priority=130;parse(t,n,a){const r=l=>({year:l,isTwoDigitYear:n==="YY"});switch(n){case"Y":return He(Ee(4,t),r);case"Yo":return He(a.ordinalNumber(t,{unit:"year"}),r);default:return He(Ee(n.length,t),r)}}validate(t,n){return n.isTwoDigitYear||n.year>0}set(t,n,a,r){const l=cn(t,r);if(a.isTwoDigitYear){const p=ur(a.year,l);return t.setFullYear(p,0,r.firstWeekContainsDate),t.setHours(0,0,0,0),ht(t,r)}const i=!("era"in n)||n.era===1?a.year:1-a.year;return t.setFullYear(i,0,r.firstWeekContainsDate),t.setHours(0,0,0,0),ht(t,r)}incompatibleTokens=["y","R","u","Q","q","M","L","I","d","D","i","t","T"]}class ro extends Pe{priority=130;parse(t,n){return Pa(n==="R"?4:n.length,t)}set(t,n,a){const r=Te(t,0);return r.setFullYear(a,0,4),r.setHours(0,0,0,0),Gt(r)}incompatibleTokens=["G","y","Y","u","Q","q","M","L","w","d","D","e","c","t","T"]}class lo extends Pe{priority=130;parse(t,n){return Pa(n==="u"?4:n.length,t)}set(t,n,a){return t.setFullYear(a,0,1),t.setHours(0,0,0,0),t}incompatibleTokens=["G","y","Y","R","w","I","i","e","c","t","T"]}class oo extends Pe{priority=120;parse(t,n,a){switch(n){case"Q":case"QQ":return Ee(n.length,t);case"Qo":return a.ordinalNumber(t,{unit:"quarter"});case"QQQ":return a.quarter(t,{width:"abbreviated",context:"formatting"})||a.quarter(t,{width:"narrow",context:"formatting"});case"QQQQQ":return a.quarter(t,{width:"narrow",context:"formatting"});case"QQQQ":default:return a.quarter(t,{width:"wide",context:"formatting"})||a.quarter(t,{width:"abbreviated",context:"formatting"})||a.quarter(t,{width:"narrow",context:"formatting"})}}validate(t,n){return n>=1&&n<=4}set(t,n,a){return t.setMonth((a-1)*3,1),t.setHours(0,0,0,0),t}incompatibleTokens=["Y","R","q","M","L","w","I","d","D","i","e","c","t","T"]}class io extends Pe{priority=120;parse(t,n,a){switch(n){case"q":case"qq":return Ee(n.length,t);case"qo":return a.ordinalNumber(t,{unit:"quarter"});case"qqq":return a.quarter(t,{width:"abbreviated",context:"standalone"})||a.quarter(t,{width:"narrow",context:"standalone"});case"qqqqq":return a.quarter(t,{width:"narrow",context:"standalone"});case"qqqq":default:return a.quarter(t,{width:"wide",context:"standalone"})||a.quarter(t,{width:"abbreviated",context:"standalone"})||a.quarter(t,{width:"narrow",context:"standalone"})}}validate(t,n){return n>=1&&n<=4}set(t,n,a){return t.setMonth((a-1)*3,1),t.setHours(0,0,0,0),t}incompatibleTokens=["Y","R","Q","M","L","w","I","d","D","i","e","c","t","T"]}class so extends Pe{incompatibleTokens=["Y","R","q","Q","L","w","I","D","i","e","c","t","T"];priority=110;parse(t,n,a){const r=l=>l-1;switch(n){case"M":return He(Re(Le.month,t),r);case"MM":return He(Ee(2,t),r);case"Mo":return He(a.ordinalNumber(t,{unit:"month"}),r);case"MMM":return a.month(t,{width:"abbreviated",context:"formatting"})||a.month(t,{width:"narrow",context:"formatting"});case"MMMMM":return a.month(t,{width:"narrow",context:"formatting"});case"MMMM":default:return a.month(t,{width:"wide",context:"formatting"})||a.month(t,{width:"abbreviated",context:"formatting"})||a.month(t,{width:"narrow",context:"formatting"})}}validate(t,n){return n>=0&&n<=11}set(t,n,a){return t.setMonth(a,1),t.setHours(0,0,0,0),t}}class uo extends Pe{priority=110;parse(t,n,a){const r=l=>l-1;switch(n){case"L":return He(Re(Le.month,t),r);case"LL":return He(Ee(2,t),r);case"Lo":return He(a.ordinalNumber(t,{unit:"month"}),r);case"LLL":return a.month(t,{width:"abbreviated",context:"standalone"})||a.month(t,{width:"narrow",context:"standalone"});case"LLLLL":return a.month(t,{width:"narrow",context:"standalone"});case"LLLL":default:return a.month(t,{width:"wide",context:"standalone"})||a.month(t,{width:"abbreviated",context:"standalone"})||a.month(t,{width:"narrow",context:"standalone"})}}validate(t,n){return n>=0&&n<=11}set(t,n,a){return t.setMonth(a,1),t.setHours(0,0,0,0),t}incompatibleTokens=["Y","R","q","Q","M","w","I","D","i","e","c","t","T"]}function co(e,t,n){const a=ve(e),r=vn(a,n)-t;return a.setDate(a.getDate()-r*7),a}class vo extends Pe{priority=100;parse(t,n,a){switch(n){case"w":return Re(Le.week,t);case"wo":return a.ordinalNumber(t,{unit:"week"});default:return Ee(n.length,t)}}validate(t,n){return n>=1&&n<=53}set(t,n,a,r){return ht(co(t,a,r),r)}incompatibleTokens=["y","R","u","q","Q","M","L","I","d","D","i","t","T"]}function mo(e,t){const n=ve(e),a=dn(n)-t;return n.setDate(n.getDate()-a*7),n}class po extends Pe{priority=100;parse(t,n,a){switch(n){case"I":return Re(Le.week,t);case"Io":return a.ordinalNumber(t,{unit:"week"});default:return Ee(n.length,t)}}validate(t,n){return n>=1&&n<=53}set(t,n,a){return Gt(mo(t,a))}incompatibleTokens=["y","Y","u","q","Q","M","L","w","d","D","e","c","t","T"]}const fo=[31,28,31,30,31,30,31,31,30,31,30,31],ho=[31,29,31,30,31,30,31,31,30,31,30,31];class yo extends Pe{priority=90;subPriority=1;parse(t,n,a){switch(n){case"d":return Re(Le.date,t);case"do":return a.ordinalNumber(t,{unit:"date"});default:return Ee(n.length,t)}}validate(t,n){const a=t.getFullYear(),r=dr(a),l=t.getMonth();return r?n>=1&&n<=ho[l]:n>=1&&n<=fo[l]}set(t,n,a){return t.setDate(a),t.setHours(0,0,0,0),t}incompatibleTokens=["Y","R","q","Q","w","I","D","i","e","c","t","T"]}class go extends Pe{priority=90;subpriority=1;parse(t,n,a){switch(n){case"D":case"DD":return Re(Le.dayOfYear,t);case"Do":return a.ordinalNumber(t,{unit:"date"});default:return Ee(n.length,t)}}validate(t,n){const a=t.getFullYear();return dr(a)?n>=1&&n<=366:n>=1&&n<=365}set(t,n,a){return t.setMonth(0,a),t.setHours(0,0,0,0),t}incompatibleTokens=["Y","R","q","Q","M","L","w","I","d","E","i","e","c","t","T"]}function pn(e,t,n){const a=Wt(),r=n?.weekStartsOn??n?.locale?.options?.weekStartsOn??a.weekStartsOn??a.locale?.options?.weekStartsOn??0,l=ve(e),i=l.getDay(),c=(t%7+7)%7,C=7-r,m=t<0||t>6?t-(i+C)%7:(c+C)%7-(i+C)%7;return mt(l,m)}class bo extends Pe{priority=90;parse(t,n,a){switch(n){case"E":case"EE":case"EEE":return a.day(t,{width:"abbreviated",context:"formatting"})||a.day(t,{width:"short",context:"formatting"})||a.day(t,{width:"narrow",context:"formatting"});case"EEEEE":return a.day(t,{width:"narrow",context:"formatting"});case"EEEEEE":return a.day(t,{width:"short",context:"formatting"})||a.day(t,{width:"narrow",context:"formatting"});case"EEEE":default:return a.day(t,{width:"wide",context:"formatting"})||a.day(t,{width:"abbreviated",context:"formatting"})||a.day(t,{width:"short",context:"formatting"})||a.day(t,{width:"narrow",context:"formatting"})}}validate(t,n){return n>=0&&n<=6}set(t,n,a,r){return t=pn(t,a,r),t.setHours(0,0,0,0),t}incompatibleTokens=["D","i","e","c","t","T"]}class wo extends Pe{priority=90;parse(t,n,a,r){const l=i=>{const p=Math.floor((i-1)/7)*7;return(i+r.weekStartsOn+6)%7+p};switch(n){case"e":case"ee":return He(Ee(n.length,t),l);case"eo":return He(a.ordinalNumber(t,{unit:"day"}),l);case"eee":return a.day(t,{width:"abbreviated",context:"formatting"})||a.day(t,{width:"short",context:"formatting"})||a.day(t,{width:"narrow",context:"formatting"});case"eeeee":return a.day(t,{width:"narrow",context:"formatting"});case"eeeeee":return a.day(t,{width:"short",context:"formatting"})||a.day(t,{width:"narrow",context:"formatting"});case"eeee":default:return a.day(t,{width:"wide",context:"formatting"})||a.day(t,{width:"abbreviated",context:"formatting"})||a.day(t,{width:"short",context:"formatting"})||a.day(t,{width:"narrow",context:"formatting"})}}validate(t,n){return n>=0&&n<=6}set(t,n,a,r){return t=pn(t,a,r),t.setHours(0,0,0,0),t}incompatibleTokens=["y","R","u","q","Q","M","L","I","d","D","E","i","c","t","T"]}class _o extends Pe{priority=90;parse(t,n,a,r){const l=i=>{const p=Math.floor((i-1)/7)*7;return(i+r.weekStartsOn+6)%7+p};switch(n){case"c":case"cc":return He(Ee(n.length,t),l);case"co":return He(a.ordinalNumber(t,{unit:"day"}),l);case"ccc":return a.day(t,{width:"abbreviated",context:"standalone"})||a.day(t,{width:"short",context:"standalone"})||a.day(t,{width:"narrow",context:"standalone"});case"ccccc":return a.day(t,{width:"narrow",context:"standalone"});case"cccccc":return a.day(t,{width:"short",context:"standalone"})||a.day(t,{width:"narrow",context:"standalone"});case"cccc":default:return a.day(t,{width:"wide",context:"standalone"})||a.day(t,{width:"abbreviated",context:"standalone"})||a.day(t,{width:"short",context:"standalone"})||a.day(t,{width:"narrow",context:"standalone"})}}validate(t,n){return n>=0&&n<=6}set(t,n,a,r){return t=pn(t,a,r),t.setHours(0,0,0,0),t}incompatibleTokens=["y","R","u","q","Q","M","L","I","d","D","E","i","e","t","T"]}function ko(e,t){const n=ve(e),a=jl(n),r=t-a;return mt(n,r)}class xo extends Pe{priority=90;parse(t,n,a){const r=l=>l===0?7:l;switch(n){case"i":case"ii":return Ee(n.length,t);case"io":return a.ordinalNumber(t,{unit:"day"});case"iii":return He(a.day(t,{width:"abbreviated",context:"formatting"})||a.day(t,{width:"short",context:"formatting"})||a.day(t,{width:"narrow",context:"formatting"}),r);case"iiiii":return He(a.day(t,{width:"narrow",context:"formatting"}),r);case"iiiiii":return He(a.day(t,{width:"short",context:"formatting"})||a.day(t,{width:"narrow",context:"formatting"}),r);case"iiii":default:return He(a.day(t,{width:"wide",context:"formatting"})||a.day(t,{width:"abbreviated",context:"formatting"})||a.day(t,{width:"short",context:"formatting"})||a.day(t,{width:"narrow",context:"formatting"}),r)}}validate(t,n){return n>=1&&n<=7}set(t,n,a){return t=ko(t,a),t.setHours(0,0,0,0),t}incompatibleTokens=["y","Y","u","q","Q","M","L","w","d","D","E","e","c","t","T"]}class Mo extends Pe{priority=80;parse(t,n,a){switch(n){case"a":case"aa":case"aaa":return a.dayPeriod(t,{width:"abbreviated",context:"formatting"})||a.dayPeriod(t,{width:"narrow",context:"formatting"});case"aaaaa":return a.dayPeriod(t,{width:"narrow",context:"formatting"});case"aaaa":default:return a.dayPeriod(t,{width:"wide",context:"formatting"})||a.dayPeriod(t,{width:"abbreviated",context:"formatting"})||a.dayPeriod(t,{width:"narrow",context:"formatting"})}}set(t,n,a){return t.setHours(mn(a),0,0,0),t}incompatibleTokens=["b","B","H","k","t","T"]}class Do extends Pe{priority=80;parse(t,n,a){switch(n){case"b":case"bb":case"bbb":return a.dayPeriod(t,{width:"abbreviated",context:"formatting"})||a.dayPeriod(t,{width:"narrow",context:"formatting"});case"bbbbb":return a.dayPeriod(t,{width:"narrow",context:"formatting"});case"bbbb":default:return a.dayPeriod(t,{width:"wide",context:"formatting"})||a.dayPeriod(t,{width:"abbreviated",context:"formatting"})||a.dayPeriod(t,{width:"narrow",context:"formatting"})}}set(t,n,a){return t.setHours(mn(a),0,0,0),t}incompatibleTokens=["a","B","H","k","t","T"]}class To extends Pe{priority=80;parse(t,n,a){switch(n){case"B":case"BB":case"BBB":return a.dayPeriod(t,{width:"abbreviated",context:"formatting"})||a.dayPeriod(t,{width:"narrow",context:"formatting"});case"BBBBB":return a.dayPeriod(t,{width:"narrow",context:"formatting"});case"BBBB":default:return a.dayPeriod(t,{width:"wide",context:"formatting"})||a.dayPeriod(t,{width:"abbreviated",context:"formatting"})||a.dayPeriod(t,{width:"narrow",context:"formatting"})}}set(t,n,a){return t.setHours(mn(a),0,0,0),t}incompatibleTokens=["a","b","t","T"]}class Po extends Pe{priority=70;parse(t,n,a){switch(n){case"h":return Re(Le.hour12h,t);case"ho":return a.ordinalNumber(t,{unit:"hour"});default:return Ee(n.length,t)}}validate(t,n){return n>=1&&n<=12}set(t,n,a){const r=t.getHours()>=12;return r&&a<12?t.setHours(a+12,0,0,0):!r&&a===12?t.setHours(0,0,0,0):t.setHours(a,0,0,0),t}incompatibleTokens=["H","K","k","t","T"]}class Ao extends Pe{priority=70;parse(t,n,a){switch(n){case"H":return Re(Le.hour23h,t);case"Ho":return a.ordinalNumber(t,{unit:"hour"});default:return Ee(n.length,t)}}validate(t,n){return n>=0&&n<=23}set(t,n,a){return t.setHours(a,0,0,0),t}incompatibleTokens=["a","b","h","K","k","t","T"]}class Co extends Pe{priority=70;parse(t,n,a){switch(n){case"K":return Re(Le.hour11h,t);case"Ko":return a.ordinalNumber(t,{unit:"hour"});default:return Ee(n.length,t)}}validate(t,n){return n>=0&&n<=11}set(t,n,a){return t.getHours()>=12&&a<12?t.setHours(a+12,0,0,0):t.setHours(a,0,0,0),t}incompatibleTokens=["h","H","k","t","T"]}class Oo extends Pe{priority=70;parse(t,n,a){switch(n){case"k":return Re(Le.hour24h,t);case"ko":return a.ordinalNumber(t,{unit:"hour"});default:return Ee(n.length,t)}}validate(t,n){return n>=1&&n<=24}set(t,n,a){const r=a<=24?a%24:a;return t.setHours(r,0,0,0),t}incompatibleTokens=["a","b","h","H","K","t","T"]}class $o extends Pe{priority=60;parse(t,n,a){switch(n){case"m":return Re(Le.minute,t);case"mo":return a.ordinalNumber(t,{unit:"minute"});default:return Ee(n.length,t)}}validate(t,n){return n>=0&&n<=59}set(t,n,a){return t.setMinutes(a,0,0),t}incompatibleTokens=["t","T"]}class Yo extends Pe{priority=50;parse(t,n,a){switch(n){case"s":return Re(Le.second,t);case"so":return a.ordinalNumber(t,{unit:"second"});default:return Ee(n.length,t)}}validate(t,n){return n>=0&&n<=59}set(t,n,a){return t.setSeconds(a,0),t}incompatibleTokens=["t","T"]}class So extends Pe{priority=30;parse(t,n){const a=r=>Math.trunc(r*Math.pow(10,-n.length+3));return He(Ee(n.length,t),a)}set(t,n,a){return t.setMilliseconds(a),t}incompatibleTokens=["t","T"]}class Ro extends Pe{priority=10;parse(t,n){switch(n){case"X":return wt(bt.basicOptionalMinutes,t);case"XX":return wt(bt.basic,t);case"XXXX":return wt(bt.basicOptionalSeconds,t);case"XXXXX":return wt(bt.extendedOptionalSeconds,t);case"XXX":default:return wt(bt.extended,t)}}set(t,n,a){return n.timestampIsSet?t:Te(t,t.getTime()-Ta(t)-a)}incompatibleTokens=["t","T","x"]}class Io extends Pe{priority=10;parse(t,n){switch(n){case"x":return wt(bt.basicOptionalMinutes,t);case"xx":return wt(bt.basic,t);case"xxxx":return wt(bt.basicOptionalSeconds,t);case"xxxxx":return wt(bt.extendedOptionalSeconds,t);case"xxx":default:return wt(bt.extended,t)}}set(t,n,a){return n.timestampIsSet?t:Te(t,t.getTime()-Ta(t)-a)}incompatibleTokens=["t","T","X"]}class Eo extends Pe{priority=40;parse(t){return sr(t)}set(t,n,a){return[Te(t,a*1e3),{timestampIsSet:!0}]}incompatibleTokens="*"}class Bo extends Pe{priority=20;parse(t){return sr(t)}set(t,n,a){return[Te(t,a),{timestampIsSet:!0}]}incompatibleTokens="*"}const No={G:new to,y:new ao,Y:new no,R:new ro,u:new lo,Q:new oo,q:new io,M:new so,L:new uo,w:new vo,I:new po,d:new yo,D:new go,E:new bo,e:new wo,c:new _o,i:new xo,a:new Mo,b:new Do,B:new To,h:new Po,H:new Ao,K:new Co,k:new Oo,m:new $o,s:new Yo,S:new So,X:new Ro,x:new Io,t:new Eo,T:new Bo},Lo=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,Ho=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,Vo=/^'([^]*?)'?$/,Fo=/''/g,qo=/\S/,Wo=/[a-zA-Z]/;function rn(e,t,n,a){const r=Gl(),l=a?.locale??r.locale??nr,i=a?.firstWeekContainsDate??a?.locale?.options?.firstWeekContainsDate??r.firstWeekContainsDate??r.locale?.options?.firstWeekContainsDate??1,p=a?.weekStartsOn??a?.locale?.options?.weekStartsOn??r.weekStartsOn??r.locale?.options?.weekStartsOn??0;if(t==="")return e===""?ve(n):Te(n,NaN);const c={firstWeekContainsDate:i,weekStartsOn:p,locale:l},C=[new eo],m=t.match(Ho).map(f=>{const S=f[0];if(S in an){const I=an[S];return I(f,l.formatLong)}return f}).join("").match(Lo),v=[];for(let f of m){!a?.useAdditionalWeekYearTokens&&or(f)&&nn(f,t,e),!a?.useAdditionalDayOfYearTokens&&lr(f)&&nn(f,t,e);const S=f[0],I=No[S];if(I){const{incompatibleTokens:U}=I;if(Array.isArray(U)){const q=v.find(ae=>U.includes(ae.token)||ae.token===S);if(q)throw new RangeError(`The format string mustn't contain \`${q.fullToken}\` and \`${f}\` at the same time`)}else if(I.incompatibleTokens==="*"&&v.length>0)throw new RangeError(`The format string mustn't contain \`${f}\` and any other token at the same time`);v.push({token:S,fullToken:f});const A=I.run(e,f,l.match,c);if(!A)return Te(n,NaN);C.push(A.setter),e=A.rest}else{if(S.match(Wo))throw new RangeError("Format string contains an unescaped latin alphabet character `"+S+"`");if(f==="''"?f="'":S==="'"&&(f=Qo(f)),e.indexOf(f)===0)e=e.slice(f.length);else return Te(n,NaN)}}if(e.length>0&&qo.test(e))return Te(n,NaN);const h=C.map(f=>f.priority).sort((f,S)=>S-f).filter((f,S,I)=>I.indexOf(f)===S).map(f=>C.filter(S=>S.priority===f).sort((S,I)=>I.subPriority-S.subPriority)).map(f=>f[0]);let k=ve(n);if(isNaN(k.getTime()))return Te(n,NaN);const Y={};for(const f of h){if(!f.validate(k,c))return Te(n,NaN);const S=f.set(k,Y,c);Array.isArray(S)?(k=S[0],Object.assign(Y,S[1])):k=S}return Te(n,k)}function Qo(e){return e.match(Vo)[1].replace(Fo,"'")}function Bn(e,t){const n=Ht(e),a=Ht(t);return+n==+a}function zo(e,t){return mt(e,-t)}function cr(e,t){const n=ve(e),a=n.getFullYear(),r=n.getDate(),l=Te(e,0);l.setFullYear(a,t,15),l.setHours(0,0,0,0);const i=Xl(l);return n.setMonth(t,Math.min(r,i)),n}function Ce(e,t){let n=ve(e);return isNaN(+n)?Te(e,NaN):(t.year!=null&&n.setFullYear(t.year),t.month!=null&&(n=cr(n,t.month)),t.date!=null&&n.setDate(t.date),t.hours!=null&&n.setHours(t.hours),t.minutes!=null&&n.setMinutes(t.minutes),t.seconds!=null&&n.setSeconds(t.seconds),t.milliseconds!=null&&n.setMilliseconds(t.milliseconds),n)}function Uo(e,t){const n=ve(e);return n.setHours(t),n}function vr(e,t){const n=ve(e);return n.setMilliseconds(t),n}function Xo(e,t){const n=ve(e);return n.setMinutes(t),n}function mr(e,t){const n=ve(e);return n.setSeconds(t),n}function _t(e,t){const n=ve(e);return isNaN(+n)?Te(e,NaN):(n.setFullYear(t),n)}function Jt(e,t){return ft(e,-t)}function Go(e,t){const{years:n=0,months:a=0,weeks:r=0,days:l=0,hours:i=0,minutes:p=0,seconds:c=0}=t,C=Jt(e,a+n*12),m=zo(C,l+r*7),v=p+i*60,k=(c+v*60)*1e3;return Te(e,m.getTime()-k)}function pr(e,t){return un(e,-t)}function aa(){const e=Lr();return P(),W("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor","aria-hidden":"true",class:"dp__icon",role:"img",...e},[ye("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"}),ye("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"}),ye("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"}),ye("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"})])}aa.compatConfig={MODE:3};function fr(){return P(),W("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor","aria-hidden":"true",class:"dp__icon",role:"img"},[ye("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"}),ye("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"})])}fr.compatConfig={MODE:3};function fn(){return P(),W("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor","aria-hidden":"true",class:"dp__icon",role:"img"},[ye("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"})])}fn.compatConfig={MODE:3};function hn(){return P(),W("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor","aria-hidden":"true",class:"dp__icon",role:"img"},[ye("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"})])}hn.compatConfig={MODE:3};function yn(){return P(),W("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor","aria-hidden":"true",class:"dp__icon",role:"img"},[ye("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"}),ye("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"})])}yn.compatConfig={MODE:3};function gn(){return P(),W("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor","aria-hidden":"true",class:"dp__icon",role:"img"},[ye("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"})])}gn.compatConfig={MODE:3};function bn(){return P(),W("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor","aria-hidden":"true",class:"dp__icon",role:"img"},[ye("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"})])}bn.compatConfig={MODE:3};const nt=(e,t)=>t?new Date(e.toLocaleString("en-US",{timeZone:t})):new Date(e),wn=(e,t,n)=>ln(e,t,n)||Q(),jo=(e,t,n)=>{const a=t.dateInTz?nt(new Date(e),t.dateInTz):Q(e);return n?tt(a,!0):a},ln=(e,t,n)=>{if(!e)return null;const a=n?tt(Q(e),!0):Q(e);return t?t.exactMatch?jo(e,t,n):nt(a,t.timezone):a},Ko=e=>{if(!e)return 0;const t=new Date,n=new Date(t.toLocaleString("en-US",{timeZone:"UTC"})),a=new Date(t.toLocaleString("en-US",{timeZone:e})),r=a.getTimezoneOffset()/60;return(+n-+a)/(1e3*60*60)-r};var vt=(e=>(e.month="month",e.year="year",e))(vt||{}),Lt=(e=>(e.top="top",e.bottom="bottom",e))(Lt||{}),Vt=(e=>(e.header="header",e.calendar="calendar",e.timePicker="timePicker",e))(Vt||{}),Xe=(e=>(e.month="month",e.year="year",e.calendar="calendar",e.time="time",e.minutes="minutes",e.hours="hours",e.seconds="seconds",e))(Xe||{});const Jo=["timestamp","date","iso"];var Ze=(e=>(e.up="up",e.down="down",e.left="left",e.right="right",e))(Ze||{}),$e=(e=>(e.arrowUp="ArrowUp",e.arrowDown="ArrowDown",e.arrowLeft="ArrowLeft",e.arrowRight="ArrowRight",e.enter="Enter",e.space=" ",e.esc="Escape",e.tab="Tab",e.home="Home",e.end="End",e.pageUp="PageUp",e.pageDown="PageDown",e))($e||{});function Nn(e){return t=>new Intl.DateTimeFormat(e,{weekday:"short",timeZone:"UTC"}).format(new Date(`2017-01-0${t}T00:00:00+00:00`)).slice(0,2)}function Zo(e){return t=>kt(nt(new Date(`2017-01-0${t}T00:00:00+00:00`),"UTC"),"EEEEEE",{locale:e})}const ei=(e,t,n)=>{const a=[1,2,3,4,5,6,7];let r;if(e!==null)try{r=a.map(Zo(e))}catch{r=a.map(Nn(t))}else r=a.map(Nn(t));const l=r.slice(0,n),i=r.slice(n+1,r.length);return[r[n]].concat(...i).concat(...l)},_n=(e,t,n)=>{const a=[];for(let r=+e[0];r<=+e[1];r++)a.push({value:+r,text:br(r,t)});return n?a.reverse():a},hr=(e,t,n)=>{const a=[1,2,3,4,5,6,7,8,9,10,11,12].map(l=>{const i=l<10?`0${l}`:l;return new Date(`2017-${i}-01T00:00:00+00:00`)});if(e!==null)try{const l=n==="long"?"LLLL":"LLL";return a.map((i,p)=>{const c=kt(nt(i,"UTC"),l,{locale:e});return{text:c.charAt(0).toUpperCase()+c.substring(1),value:p}})}catch{}const r=new Intl.DateTimeFormat(t,{month:n,timeZone:"UTC"});return a.map((l,i)=>{const p=r.format(l);return{text:p.charAt(0).toUpperCase()+p.substring(1),value:i}})},ti=e=>[12,1,2,3,4,5,6,7,8,9,10,11,12,1,2,3,4,5,6,7,8,9,10,11][e],Fe=e=>{const t=d(e);return t!=null&&t.$el?t?.$el:t},ai=e=>({type:"dot",...e??{}}),yr=e=>Array.isArray(e)?!!e[0]&&!!e[1]:!1,kn={prop:e=>`"${e}" prop must be enabled!`,dateArr:e=>`You need to use array as "model-value" binding in order to support "${e}"`},qe=e=>e,Ln=e=>e===0?e:!e||isNaN(+e)?null:+e,Hn=e=>e===null,gr=e=>{if(e)return[...e.querySelectorAll("input, button, select, textarea, a[href]")][0]},ni=e=>{const t=[],n=a=>a.filter(r=>r);for(let a=0;a{const a=n!=null,r=t!=null;if(!a&&!r)return!1;const l=+n,i=+t;return a&&r?+e>l||+el:r?+eni(e).map(n=>n.map(a=>{const{active:r,disabled:l,isBetween:i,highlighted:p}=t(a);return{...a,active:r,disabled:l,className:{dp__overlay_cell_active:r,dp__overlay_cell:!r,dp__overlay_cell_disabled:l,dp__overlay_cell_pad:!0,dp__overlay_cell_active_disabled:l&&r,dp__cell_in_between:i,"dp--highlighted":p}}})),Yt=(e,t,n=!1)=>{e&&t.allowStopPropagation&&(n&&e.stopImmediatePropagation(),e.stopPropagation())},ri=()=>["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 li(e,t){let n=[...document.querySelectorAll(ri())];n=n.filter(r=>!e.contains(r)||r.hasAttribute("data-datepicker-instance"));const a=n.indexOf(e);if(a>=0&&(t?a-1>=0:a+1<=n.length))return n[a+(t?-1:1)]}const on=(e,t)=>e?.querySelector(`[data-dp-element="${t}"]`),br=(e,t)=>new Intl.NumberFormat(t,{useGrouping:!1,style:"decimal"}).format(e),xn=e=>kt(e,"dd-MM-yyyy"),Qa=e=>Array.isArray(e),Aa=(e,t)=>t.get(xn(e)),oi=(e,t)=>e?t?t instanceof Map?!!Aa(e,t):t(Q(e)):!1:!0,et=(e,t,n=!1,a)=>{if(e.key===$e.enter||e.key===$e.space)return n&&e.preventDefault(),t();if(a)return a(e)},Vn=()=>["iPad Simulator","iPhone Simulator","iPod Simulator","iPad","iPhone","iPod"].some(e=>navigator.userAgent.includes(e))||navigator.userAgent.includes("Mac")&&"ontouchend"in document,Fn=(e,t,n,a,r,l)=>{const i=rn(e,t.slice(0,e.length),new Date,{locale:l});return ua(i)&&Zn(i)?a||r?i:Ce(i,{hours:+n.hours,minutes:+n?.minutes,seconds:+n?.seconds,milliseconds:0}):null},ii=(e,t,n,a,r,l)=>{const i=Array.isArray(n)?n[0]:n;if(typeof t=="string")return Fn(e,t,i,a,r,l);if(Array.isArray(t)){let p=null;for(const c of t)if(p=Fn(e,c,i,a,r,l),p)break;return p}return typeof t=="function"?t(e):null},Q=e=>e?new Date(e):new Date,si=(e,t,n)=>{if(t){const r=(e.getMonth()+1).toString().padStart(2,"0"),l=e.getDate().toString().padStart(2,"0"),i=e.getHours().toString().padStart(2,"0"),p=e.getMinutes().toString().padStart(2,"0"),c=n?e.getSeconds().toString().padStart(2,"0"):"00";return`${e.getFullYear()}-${r}-${l}T${i}:${p}:${c}.000Z`}const a=Date.UTC(e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate(),e.getUTCHours(),e.getUTCMinutes(),e.getUTCSeconds());return new Date(a).toISOString()},tt=(e,t)=>{const n=Q(JSON.parse(JSON.stringify(e))),a=Ce(n,{hours:0,minutes:0,seconds:0,milliseconds:0});return t?tl(a):a},St=(e,t,n,a)=>{let r=e?Q(e):Q();return(t||t===0)&&(r=Uo(r,+t)),(n||n===0)&&(r=Xo(r,+n)),(a||a===0)&&(r=mr(r,+a)),vr(r,0)},Ie=(e,t)=>!e||!t?!1:pa(tt(e),tt(t)),Me=(e,t)=>!e||!t?!1:Xt(tt(e),tt(t)),Ne=(e,t)=>!e||!t?!1:Kt(tt(e),tt(t)),$a=(e,t,n)=>e!=null&&e[0]&&e!=null&&e[1]?Ne(n,e[0])&&Ie(n,e[1]):e!=null&&e[0]&&t?Ne(n,e[0])&&Ie(n,t)||Ie(n,e[0])&&Ne(n,t):!1,pt=e=>{const t=Ce(new Date(e),{date:1});return tt(t)},za=(e,t,n)=>t&&(n||n===0)?Object.fromEntries(["hours","minutes","seconds"].map(a=>a===t?[a,n]:[a,isNaN(+e[a])?void 0:+e[a]])):{hours:isNaN(+e.hours)?void 0:+e.hours,minutes:isNaN(+e.minutes)?void 0:+e.minutes,seconds:isNaN(+e.seconds)?void 0:+e.seconds},Ft=e=>({hours:Tt(e),minutes:Rt(e),seconds:jt(e)}),wr=(e,t)=>{if(t){const n=he(Q(t));if(n>e)return 12;if(n===e)return xe(Q(t))}},_r=(e,t)=>{if(t){const n=he(Q(t));return n{if(e)return he(Q(e))},kr=(e,t)=>{const n=Ne(e,t)?t:e,a=Ne(t,e)?t:e;return er({start:n,end:a})},ui=e=>{const t=ft(e,1);return{month:xe(t),year:he(t)}},xt=(e,t)=>{const n=ht(e,{weekStartsOn:+t}),a=ar(e,{weekStartsOn:+t});return[n,a]},xr=(e,t)=>{const n={hours:Tt(Q()),minutes:Rt(Q()),seconds:t?jt(Q()):0};return Object.assign(n,e)},$t=(e,t,n)=>[Ce(Q(e),{date:1}),Ce(Q(),{month:t,year:n,date:1})],Mt=(e,t,n)=>{let a=e?Q(e):Q();return(t||t===0)&&(a=cr(a,t)),n&&(a=_t(a,n)),a},Mr=(e,t,n,a,r)=>{if(!a||r&&!t||!r&&!n)return!1;const l=r?ft(e,1):Jt(e,1),i=[xe(l),he(l)];return r?!ci(...i,t):!di(...i,n)},di=(e,t,n)=>Ie(...$t(n,e,t))||Me(...$t(n,e,t)),ci=(e,t,n)=>Ne(...$t(n,e,t))||Me(...$t(n,e,t)),Dr=(e,t,n,a,r,l,i)=>{if(typeof t=="function"&&!i)return t(e);const p=n?{locale:n}:void 0;return Array.isArray(e)?`${kt(e[0],l,p)}${r&&!e[1]?"":a}${e[1]?kt(e[1],l,p):""}`:kt(e,l,p)},zt=e=>{if(e)return null;throw new Error(kn.prop("partial-range"))},ka=(e,t)=>{if(t)return e();throw new Error(kn.prop("range"))},sn=e=>Array.isArray(e)?ua(e[0])&&(e[1]?ua(e[1]):!0):e?ua(e):!1,vi=(e,t)=>Ce(t??Q(),{hours:+e.hours||0,minutes:+e.minutes||0,seconds:+e.seconds||0}),Ua=(e,t,n,a)=>{if(!e)return!0;if(a){const r=n==="max"?pa(e,t):Kt(e,t),l={seconds:0,milliseconds:0};return r||Xt(Ce(e,l),Ce(t,l))}return n==="max"?e.getTime()<=t.getTime():e.getTime()>=t.getTime()},Xa=(e,t,n)=>e?vi(e,t):Q(n??t),qn=(e,t,n,a,r)=>{if(Array.isArray(a)){const i=Xa(e,a[0],t),p=Xa(e,a[1],t);return Ua(a[0],i,n,!!t)&&Ua(a[1],p,n,!!t)&&r}const l=Xa(e,a,t);return Ua(a,l,n,!!t)&&r},Ga=e=>Ce(Q(),Ft(e)),mi=(e,t)=>e instanceof Map?Array.from(e.values()).filter(n=>he(Q(n))===t).map(n=>xe(n)):[],Tr=(e,t,n)=>typeof e=="function"?e({month:t,year:n}):!!e.months.find(a=>a.month===t&&a.year===n),Mn=(e,t)=>typeof e=="function"?e(t):e.years.includes(t),Pr=e=>kt(e,"yyyy-MM-dd"),sa=ha({menuFocused:!1,shiftKeyInMenu:!1}),Ar=()=>{const e=n=>{sa.menuFocused=n},t=n=>{sa.shiftKeyInMenu!==n&&(sa.shiftKeyInMenu=n)};return{control:G(()=>({shiftKeyInMenu:sa.shiftKeyInMenu,menuFocused:sa.menuFocused})),setMenuFocused:e,setShiftKey:t}},Oe=ha({monthYear:[],calendar:[],time:[],actionRow:[],selectionGrid:[],timePicker:{0:[],1:[]},monthPicker:[]}),ja=Z(null),xa=Z(!1),Ka=Z(!1),Ja=Z(!1),Za=Z(!1),Ue=Z(0),Be=Z(0),It=()=>{const e=G(()=>xa.value?[...Oe.selectionGrid,Oe.actionRow].filter(v=>v.length):Ka.value?[...Oe.timePicker[0],...Oe.timePicker[1],Za.value?[]:[ja.value],Oe.actionRow].filter(v=>v.length):Ja.value?[...Oe.monthPicker,Oe.actionRow]:[Oe.monthYear,...Oe.calendar,Oe.time,Oe.actionRow].filter(v=>v.length)),t=v=>{Ue.value=v?Ue.value+1:Ue.value-1;let h=null;e.value[Be.value]&&(h=e.value[Be.value][Ue.value]),!h&&e.value[Be.value+(v?1:-1)]?(Be.value=Be.value+(v?1:-1),Ue.value=v?0:e.value[Be.value].length-1):h||(Ue.value=v?Ue.value-1:Ue.value+1)},n=v=>{Be.value===0&&!v||Be.value===e.value.length&&v||(Be.value=v?Be.value+1:Be.value-1,e.value[Be.value]?e.value[Be.value]&&!e.value[Be.value][Ue.value]&&Ue.value!==0&&(Ue.value=e.value[Be.value].length-1):Be.value=v?Be.value-1:Be.value+1)},a=v=>{let h=null;e.value[Be.value]&&(h=e.value[Be.value][Ue.value]),h?h.focus({preventScroll:!xa.value}):Ue.value=v?Ue.value-1:Ue.value+1},r=()=>{t(!0),a(!0)},l=()=>{t(!1),a(!1)},i=()=>{n(!1),a(!0)},p=()=>{n(!0),a(!0)},c=(v,h)=>{Oe[h]=v},C=(v,h)=>{Oe[h]=v},m=()=>{Ue.value=0,Be.value=0};return{buildMatrix:c,buildMultiLevelMatrix:C,setTimePickerBackRef:v=>{ja.value=v},setSelectionGrid:v=>{xa.value=v,m(),v||(Oe.selectionGrid=[])},setTimePicker:(v,h=!1)=>{Ka.value=v,Za.value=h,m(),v||(Oe.timePicker[0]=[],Oe.timePicker[1]=[])},setTimePickerElements:(v,h=0)=>{Oe.timePicker[h]=v},arrowRight:r,arrowLeft:l,arrowUp:i,arrowDown:p,clearArrowNav:()=>{Oe.monthYear=[],Oe.calendar=[],Oe.time=[],Oe.actionRow=[],Oe.selectionGrid=[],Oe.timePicker[0]=[],Oe.timePicker[1]=[],xa.value=!1,Ka.value=!1,Za.value=!1,Ja.value=!1,m(),ja.value=null},setMonthPicker:v=>{Ja.value=v,m()},refSets:Oe}},Wn=e=>({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",...e??{}}),pi=e=>({toggleOverlay:"Toggle overlay",menu:"Datepicker menu",input:"Datepicker input",openTimePicker:"Open time picker",closeTimePicker:"Close time Picker",incrementValue:t=>`Increment ${t}`,decrementValue:t=>`Decrement ${t}`,openTpOverlay:t=>`Open ${t} 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:t=>`Month picker${t?" overlay":""}`,yearPicker:t=>`Year picker${t?" overlay":""}`,timeOverlay:t=>`${t} overlay`,...e??{}}),Qn=e=>e?typeof e=="boolean"?e?2:0:+e>=2?+e:2:0,fi=e=>{const t=typeof e=="object"&&e,n={static:!0,solo:!1};if(!e)return{...n,count:Qn(!1)};const a=t?e:{},r=t?a.count??!0:e,l=Qn(r);return Object.assign(n,a,{count:l})},hi=(e,t,n)=>e||(typeof n=="string"?n:t),yi=e=>typeof e=="boolean"?e?Wn({}):!1:Wn(e),gi=e=>{const t={enterSubmit:!0,tabSubmit:!0,openMenu:"open",selectOnFocus:!1,rangeSeparator:" - "};return typeof e=="object"?{...t,...e??{},enabled:!0}:{...t,enabled:e}},bi=e=>({months:[],years:[],times:{hours:[],minutes:[],seconds:[]},...e??{}}),wi=e=>({showSelect:!0,showCancel:!0,showNow:!1,showPreview:!0,...e??{}}),_i=e=>{const t={input:!1};return typeof e=="object"?{...t,...e??{},enabled:!0}:{enabled:e,...t}},ki=e=>({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,...e??{}}),xi=e=>{const t={dates:Array.isArray(e)?e.map(n=>Q(n)):[],years:[],months:[],quarters:[],weeks:[],weekdays:[],options:{highlightDisabled:!1}};return typeof e=="function"?e:{...t,...e??{}}},Mi=e=>typeof e=="object"?{type:e?.type??"local",hideOnOffsetDates:e?.hideOnOffsetDates??!1}:{type:e,hideOnOffsetDates:!1},Di=e=>{const t={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 e=="object"?{enabled:!0,...t,...e}:{enabled:e,...t}},Ti=e=>e?typeof e=="string"?{timezone:e,exactMatch:!1,dateInTz:void 0,emitTimezone:void 0,convertModel:!0}:{timezone:e.timezone,exactMatch:e.exactMatch??!1,dateInTz:e.dateInTz??void 0,emitTimezone:e.emitTimezone??void 0,convertModel:e.convertModel??!0}:{timezone:void 0,exactMatch:!1,emitTimezone:void 0},en=(e,t,n)=>new Map(e.map(a=>{const r=wn(a,t,n);return[xn(r),r]})),Pi=(e,t)=>e.length?new Map(e.map(n=>{const a=wn(n.date,t);return[xn(a),n]})):null,Ai=e=>{var t;return{minDate:ln(e.minDate,e.timezone,e.isSpecific),maxDate:ln(e.maxDate,e.timezone,e.isSpecific),disabledDates:Qa(e.disabledDates)?en(e.disabledDates,e.timezone,e.isSpecific):e.disabledDates,allowedDates:Qa(e.allowedDates)?en(e.allowedDates,e.timezone,e.isSpecific):null,highlight:typeof e.highlight=="object"&&Qa((t=e.highlight)==null?void 0:t.dates)?en(e.highlight.dates,e.timezone):e.highlight,markers:Pi(e.markers,e.timezone)}},Ci=e=>typeof e=="boolean"?{enabled:e,dragSelect:!0,limit:null}:{enabled:!!e,limit:e.limit?+e.limit:null,dragSelect:e.dragSelect??!0},Oi=e=>({...Object.fromEntries(Object.keys(e).map(t=>{const n=t,a=e[n],r=typeof e[n]=="string"?{[a]:!0}:Object.fromEntries(a.map(l=>[l,!0]));return[t,r]}))}),Se=e=>{const t=()=>{const E=e.enableSeconds?":ss":"",B=e.enableMinutes?":mm":"";return e.is24?`HH${B}${E}`:`hh${B}${E} aa`},n=()=>{var E;return e.format?e.format:e.monthPicker?"MM/yyyy":e.timePicker?t():e.weekPicker?`${((E=S.value)==null?void 0:E.type)==="iso"?"RR":"ww"}-yyyy`:e.yearPicker?"yyyy":e.quarterPicker?"QQQ/yyyy":e.enableTimePicker?`MM/dd/yyyy, ${t()}`:"MM/dd/yyyy"},a=E=>xr(E,e.enableSeconds),r=()=>q.value.enabled?e.startTime&&Array.isArray(e.startTime)?[a(e.startTime[0]),a(e.startTime[1])]:null:e.startTime&&!Array.isArray(e.startTime)?a(e.startTime):null,l=G(()=>fi(e.multiCalendars)),i=G(()=>r()),p=G(()=>pi(e.ariaLabels)),c=G(()=>bi(e.filters)),C=G(()=>yi(e.transitions)),m=G(()=>wi(e.actionRow)),v=G(()=>hi(e.previewFormat,e.format,n())),h=G(()=>gi(e.textInput)),k=G(()=>_i(e.inline)),Y=G(()=>ki(e.config)),f=G(()=>xi(e.highlight)),S=G(()=>Mi(e.weekNumbers)),I=G(()=>Ti(e.timezone)),U=G(()=>Ci(e.multiDates)),A=G(()=>Ai({minDate:e.minDate,maxDate:e.maxDate,disabledDates:e.disabledDates,allowedDates:e.allowedDates,highlight:f.value,markers:e.markers,timezone:I.value,isSpecific:e.monthPicker||e.yearPicker||e.quarterPicker})),q=G(()=>Di(e.range)),ae=G(()=>Oi(e.ui));return{defaultedTransitions:C,defaultedMultiCalendars:l,defaultedStartTime:i,defaultedAriaLabels:p,defaultedFilters:c,defaultedActionRow:m,defaultedPreviewFormat:v,defaultedTextInput:h,defaultedInline:k,defaultedConfig:Y,defaultedHighlight:f,defaultedWeekNumbers:S,defaultedRange:q,propDates:A,defaultedTz:I,defaultedMultiDates:U,defaultedUI:ae,getDefaultPattern:n,getDefaultStartTime:r}},$i=(e,t,n)=>{const a=Z(),{defaultedTextInput:r,defaultedRange:l,defaultedTz:i,defaultedMultiDates:p,getDefaultPattern:c}=Se(t),C=Z(""),m=ca(t,"format"),v=ca(t,"formatLocale");ct(a,()=>{typeof t.onInternalModelChange=="function"&&e("internal-model-change",a.value,z(!0))},{deep:!0}),ct(l,(u,le)=>{u.enabled!==le.enabled&&(a.value=null)}),ct(m,()=>{re()});const h=u=>i.value.timezone&&i.value.convertModel?nt(u,i.value.timezone):u,k=u=>{if(i.value.timezone&&i.value.convertModel){const le=Ko(i.value.timezone);return Xr(u,le)}return u},Y=(u,le,fe=!1)=>Dr(u,t.format,t.formatLocale,r.value.rangeSeparator,t.modelAuto,le??c(),fe),f=u=>u?t.modelType?b(u):{hours:Tt(u),minutes:Rt(u),seconds:t.enableSeconds?jt(u):0}:null,S=u=>t.modelType?b(u):{month:xe(u),year:he(u)},I=u=>Array.isArray(u)?p.value.enabled?u.map(le=>U(le,_t(Q(),le))):ka(()=>[_t(Q(),u[0]),u[1]?_t(Q(),u[1]):zt(l.value.partialRange)],l.value.enabled):_t(Q(),+u),U=(u,le)=>(typeof u=="string"||typeof u=="number")&&t.modelType?R(u):le,A=u=>Array.isArray(u)?[U(u[0],St(null,+u[0].hours,+u[0].minutes,u[0].seconds)),U(u[1],St(null,+u[1].hours,+u[1].minutes,u[1].seconds))]:U(u,St(null,u.hours,u.minutes,u.seconds)),q=u=>{const le=Ce(Q(),{date:1});return Array.isArray(u)?p.value.enabled?u.map(fe=>U(fe,Mt(le,+fe.month,+fe.year))):ka(()=>[U(u[0],Mt(le,+u[0].month,+u[0].year)),U(u[1],u[1]?Mt(le,+u[1].month,+u[1].year):zt(l.value.partialRange))],l.value.enabled):U(u,Mt(le,+u.month,+u.year))},ae=u=>{if(Array.isArray(u))return u.map(le=>R(le));throw new Error(kn.dateArr("multi-dates"))},E=u=>{if(Array.isArray(u)&&l.value.enabled){const le=u[0],fe=u[1];return[Q(Array.isArray(le)?le[0]:null),Array.isArray(fe)&&fe.length?Q(fe[0]):null]}return Q(u[0])},B=u=>t.modelAuto?Array.isArray(u)?[R(u[0]),R(u[1])]:t.autoApply?[R(u)]:[R(u),null]:Array.isArray(u)?ka(()=>u[1]?[R(u[0]),u[1]?R(u[1]):zt(l.value.partialRange)]:[R(u[0])],l.value.enabled):R(u),ne=()=>{Array.isArray(a.value)&&l.value.enabled&&a.value.length===1&&a.value.push(zt(l.value.partialRange))},F=()=>{const u=a.value;return[b(u[0]),u[1]?b(u[1]):zt(l.value.partialRange)]},N=()=>a.value[1]?F():b(qe(a.value[0])),ie=()=>(a.value||[]).map(u=>b(u)),ce=(u=!1)=>(u||ne(),t.modelAuto?N():p.value.enabled?ie():Array.isArray(a.value)?ka(()=>F(),l.value.enabled):b(qe(a.value))),pe=u=>!u||Array.isArray(u)&&!u.length?null:t.timePicker?A(qe(u)):t.monthPicker?q(qe(u)):t.yearPicker?I(qe(u)):p.value.enabled?ae(qe(u)):t.weekPicker?E(qe(u)):B(qe(u)),g=u=>{const le=pe(u);sn(qe(le))?(a.value=qe(le),re()):(a.value=null,C.value="")},D=()=>{const u=le=>kt(le,r.value.format);return`${u(a.value[0])} ${r.value.rangeSeparator} ${a.value[1]?u(a.value[1]):""}`},y=()=>n.value&&a.value?Array.isArray(a.value)?D():kt(a.value,r.value.format):Y(a.value),H=()=>a.value?p.value.enabled?a.value.map(u=>Y(u)).join("; "):r.value.enabled&&typeof r.value.format=="string"?y():Y(a.value):"",re=()=>{!t.format||typeof t.format=="string"||r.value.enabled&&typeof r.value.format=="string"?C.value=H():C.value=t.format(a.value)},R=u=>{if(t.utc){const le=new Date(u);return t.utc==="preserve"?new Date(le.getTime()+le.getTimezoneOffset()*6e4):le}return t.modelType?Jo.includes(t.modelType)?h(new Date(u)):t.modelType==="format"&&(typeof t.format=="string"||!t.format)?h(rn(u,c(),new Date,{locale:v.value})):h(rn(u,t.modelType,new Date,{locale:v.value})):h(new Date(u))},b=u=>u?t.utc?si(u,t.utc==="preserve",t.enableSeconds):t.modelType?t.modelType==="timestamp"?+k(u):t.modelType==="iso"?k(u).toISOString():t.modelType==="format"&&(typeof t.format=="string"||!t.format)?Y(k(u)):Y(k(u),t.modelType,!0):k(u):"",oe=(u,le=!1,fe=!1)=>{if(fe)return u;if(e("update:model-value",u),i.value.emitTimezone&&le){const Ve=Array.isArray(u)?u.map(T=>nt(qe(T),i.value.emitTimezone)):nt(qe(u),i.value.emitTimezone);e("update:model-timezone-value",Ve)}},V=u=>Array.isArray(a.value)?p.value.enabled?a.value.map(le=>u(le)):[u(a.value[0]),a.value[1]?u(a.value[1]):zt(l.value.partialRange)]:u(qe(a.value)),M=()=>{if(Array.isArray(a.value)){const u=xt(a.value[0],t.weekStart),le=a.value[1]?xt(a.value[1],t.weekStart):[];return[u.map(fe=>Q(fe)),le.map(fe=>Q(fe))]}return xt(a.value,t.weekStart).map(u=>Q(u))},o=(u,le)=>oe(qe(V(u)),!1,le),w=u=>{const le=M();return u?le:e("update:model-value",M())},z=(u=!1)=>(u||re(),t.monthPicker?o(S,u):t.timePicker?o(f,u):t.yearPicker?o(he,u):t.weekPicker?w(u):oe(ce(u),!0,u));return{inputValue:C,internalModelValue:a,checkBeforeEmit:()=>a.value?l.value.enabled?l.value.partialRange?a.value.length>=1:a.value.length===2:!!a.value:!1,parseExternalModelValue:g,formatInputValue:re,emitModelValue:z}},Yi=(e,t)=>{const{defaultedFilters:n,propDates:a}=Se(e),{validateMonthYearInRange:r}=Et(e),l=(m,v)=>{let h=m;return n.value.months.includes(xe(h))?(h=v?ft(m,1):Jt(m,1),l(h,v)):h},i=(m,v)=>{let h=m;return n.value.years.includes(he(h))?(h=v?un(m,1):pr(m,1),i(h,v)):h},p=(m,v=!1)=>{const h=Ce(Q(),{month:e.month,year:e.year});let k=m?ft(h,1):Jt(h,1);e.disableYearSelect&&(k=_t(k,e.year));let Y=xe(k),f=he(k);n.value.months.includes(Y)&&(k=l(k,m),Y=xe(k),f=he(k)),n.value.years.includes(f)&&(k=i(k,m),f=he(k)),r(Y,f,m,e.preventMinMaxNavigation)&&c(Y,f,v)},c=(m,v,h)=>{t("update-month-year",{month:m,year:v,fromNav:h})},C=G(()=>m=>Mr(Ce(Q(),{month:e.month,year:e.year}),a.value.maxDate,a.value.minDate,e.preventMinMaxNavigation,m));return{handleMonthYearChange:p,isDisabled:C,updateMonthYear:c}},Ya={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:()=>({})}},yt={...Ya,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}},Si=["title"],Ri=["disabled"],Ii=ze({compatConfig:{MODE:3},__name:"ActionRow",props:{menuMount:{type:Boolean,default:!1},calendarWidth:{type:Number,default:0},...yt},emits:["close-picker","select-date","select-now","invalid-select"],setup(e,{emit:t}){const n=t,a=e,{defaultedActionRow:r,defaultedPreviewFormat:l,defaultedMultiCalendars:i,defaultedTextInput:p,defaultedInline:c,defaultedRange:C,defaultedMultiDates:m}=Se(a),{isTimeValid:v,isMonthValid:h}=Et(a),{buildMatrix:k}=It(),Y=Z(null),f=Z(null),S=Z(!1),I=Z({}),U=Z(null),A=Z(null);Ke(()=>{a.arrowNavigation&&k([Fe(Y),Fe(f)],"actionRow"),q(),window.addEventListener("resize",q)}),Ca(()=>{window.removeEventListener("resize",q)});const q=()=>{S.value=!1,setTimeout(()=>{var g,D;const y=(g=U.value)==null?void 0:g.getBoundingClientRect(),H=(D=A.value)==null?void 0:D.getBoundingClientRect();y&&H&&(I.value.maxWidth=`${H.width-y.width-20}px`),S.value=!0},0)},ae=G(()=>C.value.enabled&&!C.value.partialRange&&a.internalModelValue?a.internalModelValue.length===2:!0),E=G(()=>!v.value(a.internalModelValue)||!h.value(a.internalModelValue)||!ae.value),B=()=>{const g=l.value;return a.timePicker||a.monthPicker,g(qe(a.internalModelValue))},ne=()=>{const g=a.internalModelValue;return i.value.count>0?`${F(g[0])} - ${F(g[1])}`:[F(g[0]),F(g[1])]},F=g=>Dr(g,l.value,a.formatLocale,p.value.rangeSeparator,a.modelAuto,l.value),N=G(()=>!a.internalModelValue||!a.menuMount?"":typeof l.value=="string"?Array.isArray(a.internalModelValue)?a.internalModelValue.length===2&&a.internalModelValue[1]?ne():m.value.enabled?a.internalModelValue.map(g=>`${F(g)}`):a.modelAuto?`${F(a.internalModelValue[0])}`:`${F(a.internalModelValue[0])} -`:F(a.internalModelValue):B()),ie=()=>m.value.enabled?"; ":" - ",ce=G(()=>Array.isArray(N.value)?N.value.join(ie()):N.value),pe=()=>{v.value(a.internalModelValue)&&h.value(a.internalModelValue)&&ae.value?n("select-date"):n("invalid-select")};return(g,D)=>(P(),W("div",{ref_key:"actionRowRef",ref:A,class:"dp__action_row"},[g.$slots["action-row"]?ue(g.$slots,"action-row",We(Qe({key:0},{internalModelValue:g.internalModelValue,disabled:E.value,selectDate:()=>g.$emit("select-date"),closePicker:()=>g.$emit("close-picker")}))):(P(),W(we,{key:1},[d(r).showPreview?(P(),W("div",{key:0,class:"dp__selection_preview",title:ce.value,style:dt(I.value)},[g.$slots["action-preview"]&&S.value?ue(g.$slots,"action-preview",{key:0,value:g.internalModelValue}):j("",!0),!g.$slots["action-preview"]&&S.value?(P(),W(we,{key:1},[Dt(Ge(ce.value),1)],64)):j("",!0)],12,Si)):j("",!0),ye("div",{ref_key:"actionBtnContainer",ref:U,class:"dp__action_buttons","data-dp-element":"action-row"},[g.$slots["action-buttons"]?ue(g.$slots,"action-buttons",{key:0,value:g.internalModelValue}):j("",!0),g.$slots["action-buttons"]?j("",!0):(P(),W(we,{key:1},[!d(c).enabled&&d(r).showCancel?(P(),W("button",{key:0,ref_key:"cancelButtonRef",ref:Y,type:"button",class:"dp__action_button dp__action_cancel",onClick:D[0]||(D[0]=y=>g.$emit("close-picker")),onKeydown:D[1]||(D[1]=y=>d(et)(y,()=>g.$emit("close-picker")))},Ge(g.cancelText),545)):j("",!0),d(r).showNow?(P(),W("button",{key:1,type:"button",class:"dp__action_button dp__action_cancel",onClick:D[2]||(D[2]=y=>g.$emit("select-now")),onKeydown:D[3]||(D[3]=y=>d(et)(y,()=>g.$emit("select-now")))},Ge(g.nowButtonLabel),33)):j("",!0),d(r).showSelect?(P(),W("button",{key:2,ref_key:"selectButtonRef",ref:f,type:"button",class:"dp__action_button dp__action_select",disabled:E.value,"data-test":"select-button",onKeydown:D[4]||(D[4]=y=>d(et)(y,()=>pe())),onClick:pe},Ge(g.selectText),41,Ri)):j("",!0)],64))],512)],64))],512))}}),Ei=["role","aria-label","tabindex"],Bi={class:"dp__selection_grid_header"},Ni=["aria-selected","aria-disabled","data-test","onClick","onKeydown","onMouseover"],Li=["aria-label"],ya=ze({__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(e,{expose:t,emit:n}){const{setSelectionGrid:a,buildMultiLevelMatrix:r,setMonthPicker:l}=It(),i=n,p=e,{defaultedAriaLabels:c,defaultedTextInput:C,defaultedConfig:m}=Se(p),{hideNavigationButtons:v}=Ia(),h=Z(!1),k=Z(null),Y=Z(null),f=Z([]),S=Z(),I=Z(null),U=Z(0),A=Z(null);Hr(()=>{k.value=null}),Ke(()=>{it().then(()=>ie()),p.noOverlayFocus||ae(),q(!0)}),Ca(()=>q(!1));const q=V=>{var M;p.arrowNavigation&&((M=p.headerRefs)!=null&&M.length?l(V):a(V))},ae=()=>{var V;const M=Fe(Y);M&&(C.value.enabled||(k.value?(V=k.value)==null||V.focus({preventScroll:!0}):M.focus({preventScroll:!0})),h.value=M.clientHeight({dp__overlay:!0,"dp--overlay-absolute":!p.useRelative,"dp--overlay-relative":p.useRelative})),B=G(()=>p.useRelative?{height:`${p.height}px`,width:"var(--dp-menu-min-width)"}:void 0),ne=G(()=>({dp__overlay_col:!0})),F=G(()=>({dp__btn:!0,dp__button:!0,dp__overlay_action:!0,dp__over_action_scroll:h.value,dp__button_bottom:p.isLast})),N=G(()=>{var V,M;return{dp__overlay_container:!0,dp__container_flex:((V=p.items)==null?void 0:V.length)<=6,dp__container_block:((M=p.items)==null?void 0:M.length)>6}});ct(()=>p.items,()=>ie(!1),{deep:!0});const ie=(V=!0)=>{it().then(()=>{const M=Fe(k),o=Fe(Y),w=Fe(I),z=Fe(A),u=w?w.getBoundingClientRect().height:0;o&&(o.getBoundingClientRect().height?U.value=o.getBoundingClientRect().height-u:U.value=m.value.modeHeight-u),M&&z&&V&&(z.scrollTop=M.offsetTop-z.offsetTop-(U.value/2-M.getBoundingClientRect().height)-u)})},ce=V=>{V.disabled||i("selected",V.value)},pe=()=>{i("toggle"),i("reset-flow")},g=()=>{p.escClose&&pe()},D=(V,M,o,w)=>{V&&((M.active||M.value===p.focusValue)&&(k.value=V),p.arrowNavigation&&(Array.isArray(f.value[o])?f.value[o][w]=V:f.value[o]=[V],y()))},y=()=>{var V,M;const o=(V=p.headerRefs)!=null&&V.length?[p.headerRefs].concat(f.value):f.value.concat([p.skipButtonRef?[]:[I.value]]);r(qe(o),(M=p.headerRefs)!=null&&M.length?"monthPicker":"selectionGrid")},H=V=>{p.arrowNavigation||Yt(V,m.value,!0)},re=V=>{S.value=V,i("hover-value",V)},R=()=>{if(pe(),!p.isLast){const V=on(p.menuWrapRef??null,"action-row");if(V){const M=gr(V);M?.focus()}}},b=V=>{switch(V.key){case $e.esc:return g();case $e.arrowLeft:return H(V);case $e.arrowRight:return H(V);case $e.arrowUp:return H(V);case $e.arrowDown:return H(V);default:return}},oe=V=>{if(V.key===$e.enter)return pe();if(V.key===$e.tab)return R()};return t({focusGrid:ae}),(V,M)=>{var o;return P(),W("div",{ref_key:"gridWrapRef",ref:Y,class:ke(E.value),style:dt(B.value),role:V.useRelative?void 0:"dialog","aria-label":V.overlayLabel,tabindex:V.useRelative?void 0:"0",onKeydown:b,onClick:M[0]||(M[0]=va(()=>{},["prevent"]))},[ye("div",{ref_key:"containerRef",ref:A,class:ke(N.value),style:dt({"--dp-overlay-height":`${U.value}px`}),role:"grid"},[ye("div",Bi,[ue(V.$slots,"header")]),V.$slots.overlay?ue(V.$slots,"overlay",{key:0}):(P(!0),W(we,{key:1},Ye(V.items,(w,z)=>(P(),W("div",{key:z,class:ke(["dp__overlay_row",{dp__flex_row:V.items.length>=3}]),role:"row"},[(P(!0),W(we,null,Ye(w,(u,le)=>(P(),W("div",{key:u.value,ref_for:!0,ref:fe=>D(fe,u,z,le),role:"gridcell",class:ke(ne.value),"aria-selected":u.active||void 0,"aria-disabled":u.disabled||void 0,tabindex:"0","data-test":u.text,onClick:va(fe=>ce(u),["prevent"]),onKeydown:fe=>d(et)(fe,()=>ce(u),!0),onMouseover:fe=>re(u.value)},[ye("div",{class:ke(u.className)},[V.$slots.item?ue(V.$slots,"item",{key:0,item:u}):j("",!0),V.$slots.item?j("",!0):(P(),W(we,{key:1},[Dt(Ge(u.text),1)],64))],2)],42,Ni))),128))],2))),128))],6),V.$slots["button-icon"]?Ma((P(),W("button",{key:0,ref_key:"toggleButton",ref:I,type:"button","aria-label":(o=d(c))==null?void 0:o.toggleOverlay,class:ke(F.value),tabindex:"0",onClick:pe,onKeydown:oe},[ue(V.$slots,"button-icon")],42,Li)),[[Da,!d(v)(V.hideNavigation,V.type)]]):j("",!0)],46,Ei)}}}),Sa=ze({__name:"InstanceWrap",props:{multiCalendars:{},stretch:{type:Boolean},collapse:{type:Boolean}},setup(e){const t=e,n=G(()=>t.multiCalendars>0?[...Array(t.multiCalendars).keys()]:[0]),a=G(()=>({dp__instance_calendar:t.multiCalendars>0}));return(r,l)=>(P(),W("div",{class:ke({dp__menu_inner:!r.stretch,"dp--menu--inner-stretched":r.stretch,dp__flex_display:r.multiCalendars>0,"dp--flex-display-collapsed":r.collapse})},[(P(!0),W(we,null,Ye(n.value,(i,p)=>(P(),W("div",{key:i,class:ke(a.value)},[ue(r.$slots,"default",{instance:i,index:p})],2))),128))],2))}}),Hi=["data-dp-element","aria-label","aria-disabled"],da=ze({compatConfig:{MODE:3},__name:"ArrowBtn",props:{ariaLabel:{},elName:{},disabled:{type:Boolean}},emits:["activate","set-ref"],setup(e,{emit:t}){const n=t,a=Z(null);return Ke(()=>n("set-ref",a)),(r,l)=>(P(),W("button",{ref_key:"elRef",ref:a,type:"button","data-dp-element":r.elName,class:"dp__btn dp--arrow-btn-nav",tabindex:"0","aria-label":r.ariaLabel,"aria-disabled":r.disabled||void 0,onClick:l[0]||(l[0]=i=>r.$emit("activate")),onKeydown:l[1]||(l[1]=i=>d(et)(i,()=>r.$emit("activate"),!0))},[ye("span",{class:ke(["dp__inner_nav",{dp__inner_nav_disabled:r.disabled}])},[ue(r.$slots,"default")],2)],40,Hi))}}),Vi=["aria-label","data-test"],Cr=ze({__name:"YearModePicker",props:{...yt,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(e,{emit:t}){const n=t,a=e,{showRightIcon:r,showLeftIcon:l}=Ia(),{defaultedConfig:i,defaultedMultiCalendars:p,defaultedAriaLabels:c,defaultedTransitions:C,defaultedUI:m}=Se(a),{showTransition:v,transitionName:h}=ga(C),k=Z(!1),Y=(I=!1,U)=>{k.value=!k.value,n("toggle-year-picker",{flow:I,show:U})},f=I=>{k.value=!1,n("year-select",I)},S=(I=!1)=>{n("handle-year",I)};return(I,U)=>{var A,q,ae,E,B;return P(),W(we,null,[ye("div",{class:ke(["dp--year-mode-picker",{"dp--hidden-el":k.value}])},[d(l)(d(p),e.instance)?(P(),De(da,{key:0,ref:"mpPrevIconRef","aria-label":(A=d(c))==null?void 0:A.prevYear,disabled:e.isDisabled(!1),class:ke((q=d(m))==null?void 0:q.navBtnPrev),onActivate:U[0]||(U[0]=ne=>S(!1))},{default:_e(()=>[I.$slots["arrow-left"]?ue(I.$slots,"arrow-left",{key:0}):j("",!0),I.$slots["arrow-left"]?j("",!0):(P(),De(d(fn),{key:1}))]),_:3},8,["aria-label","disabled","class"])):j("",!0),ye("button",{ref:"mpYearButtonRef",class:"dp__btn dp--year-select",type:"button","aria-label":`${e.year}-${(ae=d(c))==null?void 0:ae.openYearsOverlay}`,"data-test":`year-mode-btn-${e.instance}`,onClick:U[1]||(U[1]=()=>Y(!1)),onKeydown:U[2]||(U[2]=Vr(()=>Y(!1),["enter"]))},[I.$slots.year?ue(I.$slots,"year",{key:0,year:e.year}):j("",!0),I.$slots.year?j("",!0):(P(),W(we,{key:1},[Dt(Ge(e.year),1)],64))],40,Vi),d(r)(d(p),e.instance)?(P(),De(da,{key:1,ref:"mpNextIconRef","aria-label":(E=d(c))==null?void 0:E.nextYear,disabled:e.isDisabled(!0),class:ke((B=d(m))==null?void 0:B.navBtnNext),onActivate:U[3]||(U[3]=ne=>S(!0))},{default:_e(()=>[I.$slots["arrow-right"]?ue(I.$slots,"arrow-right",{key:0}):j("",!0),I.$slots["arrow-right"]?j("",!0):(P(),De(d(hn),{key:1}))]),_:3},8,["aria-label","disabled","class"])):j("",!0)],2),ot(ta,{name:d(h)(e.showYearPicker),css:d(v)},{default:_e(()=>{var ne,F;return[e.showYearPicker?(P(),De(ya,{key:0,items:e.items,"text-input":I.textInput,"esc-close":I.escClose,config:I.config,"is-last":I.autoApply&&!d(i).keepActionRow,"hide-navigation":I.hideNavigation,"aria-labels":I.ariaLabels,"overlay-label":(F=(ne=d(c))==null?void 0:ne.yearPicker)==null?void 0:F.call(ne,!0),type:"year",onToggle:Y,onSelected:U[4]||(U[4]=N=>f(N))},je({"button-icon":_e(()=>[I.$slots["calendar-icon"]?ue(I.$slots,"calendar-icon",{key:0}):j("",!0),I.$slots["calendar-icon"]?j("",!0):(P(),De(d(aa),{key:1}))]),_:2},[I.$slots["year-overlay-value"]?{name:"item",fn:_e(({item:N})=>[ue(I.$slots,"year-overlay-value",{text:N.text,value:N.value})]),key:"0"}:void 0]),1032,["items","text-input","esc-close","config","is-last","hide-navigation","aria-labels","overlay-label"])):j("",!0)]}),_:3},8,["name","css"])],64)}}}),Dn=(e,t,n)=>{if(t.value&&Array.isArray(t.value))if(t.value.some(a=>Me(e,a))){const a=t.value.filter(r=>!Me(r,e));t.value=a.length?a:null}else(n&&+n>t.value.length||!n)&&t.value.push(e);else t.value=[e]},Tn=(e,t,n)=>{let a=e.value?e.value.slice():[];return a.length===2&&a[1]!==null&&(a=[]),a.length?Ie(t,a[0])?(a.unshift(t),n("range-start",a[0]),n("range-start",a[1])):(a[1]=t,n("range-end",t)):(a=[t],n("range-start",t)),a},Ra=(e,t,n,a)=>{e&&(e[0]&&e[1]&&n&&t("auto-apply"),e[0]&&!e[1]&&a&&n&&t("auto-apply"))},Or=e=>{Array.isArray(e.value)&&e.value.length<=2&&e.range?e.modelValue.value=e.value.map(t=>nt(Q(t),e.timezone)):Array.isArray(e.value)||(e.modelValue.value=nt(Q(e.value),e.timezone))},$r=(e,t,n,a)=>Array.isArray(t.value)&&(t.value.length===2||t.value.length===1&&a.value.partialRange)?a.value.fixedStart&&(Ne(e,t.value[0])||Me(e,t.value[0]))?[t.value[0],e]:a.value.fixedEnd&&(Ie(e,t.value[1])||Me(e,t.value[1]))?[e,t.value[1]]:(n("invalid-fixed-range",e),t.value):[],Yr=({multiCalendars:e,range:t,highlight:n,propDates:a,calendars:r,modelValue:l,props:i,filters:p,year:c,month:C,emit:m})=>{const v=G(()=>_n(i.yearRange,i.locale,i.reverseYears)),h=Z([!1]),k=G(()=>(N,ie)=>{const ce=Ce(pt(new Date),{month:C.value(N),year:c.value(N)}),pe=ie?tr(ce):ma(ce);return Mr(pe,a.value.maxDate,a.value.minDate,i.preventMinMaxNavigation,ie)}),Y=()=>Array.isArray(l.value)&&e.value.solo&&l.value[1],f=()=>{for(let N=0;N{if(!N)return f();const ie=Ce(Q(),r.value[N]);return r.value[0].year=he(pr(ie,e.value.count-1)),f()},I=(N,ie)=>{const ce=Zr(ie,N);return t.value.showLastInRange&&ce>1?ie:N},U=N=>i.focusStartDate||e.value.solo?N[0]:N[1]?I(N[0],N[1]):N[0],A=()=>{if(l.value){const N=Array.isArray(l.value)?U(l.value):l.value;r.value[0]={month:xe(N),year:he(N)}}},q=()=>{A(),e.value.count&&f()};ct(l,(N,ie)=>{i.isTextInputDate&&JSON.stringify(N??{})!==JSON.stringify(ie??{})&&q()}),Ke(()=>{q()});const ae=(N,ie)=>{r.value[ie].year=N,m("update-month-year",{instance:ie,year:N,month:r.value[ie].month}),e.value.count&&!e.value.solo&&S(ie)},E=G(()=>N=>Zt(v.value,ie=>{var ce;const pe=c.value(N)===ie.value,g=fa(ie.value,ea(a.value.minDate),ea(a.value.maxDate))||((ce=p.value.years)==null?void 0:ce.includes(c.value(N))),D=Mn(n.value,ie.value);return{active:pe,disabled:g,highlighted:D}})),B=(N,ie)=>{ae(N,ie),F(ie)},ne=(N,ie=!1)=>{if(!k.value(N,ie)){const ce=ie?c.value(N)+1:c.value(N)-1;ae(ce,N)}},F=(N,ie=!1,ce)=>{ie||m("reset-flow"),ce!==void 0?h.value[N]=ce:h.value[N]=!h.value[N],h.value[N]?m("overlay-toggle",{open:!0,overlay:Xe.year}):(m("overlay-closed"),m("overlay-toggle",{open:!1,overlay:Xe.year}))};return{isDisabled:k,groupedYears:E,showYearPicker:h,selectYear:ae,toggleYearPicker:F,handleYearSelect:B,handleYear:ne}},Fi=(e,t)=>{const{defaultedMultiCalendars:n,defaultedAriaLabels:a,defaultedTransitions:r,defaultedConfig:l,defaultedRange:i,defaultedHighlight:p,propDates:c,defaultedTz:C,defaultedFilters:m,defaultedMultiDates:v}=Se(e),h=()=>{e.isTextInputDate&&q(he(Q(e.startDate)),0)},{modelValue:k,year:Y,month:f,calendars:S}=ba(e,t,h),I=G(()=>hr(e.formatLocale,e.locale,e.monthNameFormat)),U=Z(null),{checkMinMaxRange:A}=Et(e),{selectYear:q,groupedYears:ae,showYearPicker:E,toggleYearPicker:B,handleYearSelect:ne,handleYear:F,isDisabled:N}=Yr({modelValue:k,multiCalendars:n,range:i,highlight:p,calendars:S,year:Y,propDates:c,month:f,filters:m,props:e,emit:t});Ke(()=>{e.startDate&&(k.value&&e.focusStartDate||!k.value)&&q(he(Q(e.startDate)),0)});const ie=o=>o?{month:xe(o),year:he(o)}:{month:null,year:null},ce=()=>k.value?Array.isArray(k.value)?k.value.map(o=>ie(o)):ie(k.value):ie(),pe=(o,w)=>{const z=S.value[o],u=ce();return Array.isArray(u)?u.some(le=>le.year===z?.year&&le.month===w):z?.year===u.year&&w===u.month},g=(o,w,z)=>{var u,le;const fe=ce();return Array.isArray(fe)?Y.value(w)===((u=fe[z])==null?void 0:u.year)&&o===((le=fe[z])==null?void 0:le.month):!1},D=(o,w)=>{if(i.value.enabled){const z=ce();if(Array.isArray(k.value)&&Array.isArray(z)){const u=g(o,w,0)||g(o,w,1),le=Mt(pt(Q()),o,Y.value(w));return $a(k.value,U.value,le)&&!u}return!1}return!1},y=G(()=>o=>Zt(I.value,w=>{var z;const u=pe(o,w.value),le=fa(w.value,wr(Y.value(o),c.value.minDate),_r(Y.value(o),c.value.maxDate))||mi(c.value.disabledDates,Y.value(o)).includes(w.value)||((z=m.value.months)==null?void 0:z.includes(w.value)),fe=D(w.value,o),Ve=Tr(p.value,w.value,Y.value(o));return{active:u,disabled:le,isBetween:fe,highlighted:Ve}})),H=(o,w)=>Mt(pt(Q()),o,Y.value(w)),re=(o,w)=>{const z=k.value?k.value:pt(new Date);k.value=Mt(z,o,Y.value(w)),t("auto-apply"),t("update-flow-step")},R=(o,w)=>{const z=H(o,w);i.value.fixedEnd||i.value.fixedStart?k.value=$r(z,k,t,i):k.value?A(z,k.value)&&(k.value=Tn(k,H(o,w),t)):k.value=[H(o,w)],it().then(()=>{Ra(k.value,t,e.autoApply,e.modelAuto)})},b=(o,w)=>{Dn(H(o,w),k,v.value.limit),t("auto-apply",!0)},oe=(o,w)=>(S.value[w].month=o,M(w,S.value[w].year,o),v.value.enabled?b(o,w):i.value.enabled?R(o,w):re(o,w)),V=(o,w)=>{q(o,w),M(w,o,null)},M=(o,w,z)=>{let u=z;if(!u&&u!==0){const le=ce();u=Array.isArray(le)?le[o].month:le.month}t("update-month-year",{instance:o,year:w,month:u})};return{groupedMonths:y,groupedYears:ae,year:Y,isDisabled:N,defaultedMultiCalendars:n,defaultedAriaLabels:a,defaultedTransitions:r,defaultedConfig:l,showYearPicker:E,modelValue:k,presetDate:(o,w)=>{Or({value:o,modelValue:k,range:i.value.enabled,timezone:w?void 0:C.value.timezone}),t("auto-apply")},setHoverDate:(o,w)=>{U.value=H(o,w)},selectMonth:oe,selectYear:V,toggleYearPicker:B,handleYearSelect:ne,handleYear:F,getModelMonthYear:ce}},qi=ze({compatConfig:{MODE:3},__name:"MonthPicker",props:{...yt},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(e,{expose:t,emit:n}){const a=n,r=qt(),l=lt(r,"yearMode"),i=e;Ke(()=>{i.shadow||a("mount",null)});const{groupedMonths:p,groupedYears:c,year:C,isDisabled:m,defaultedMultiCalendars:v,defaultedConfig:h,showYearPicker:k,modelValue:Y,presetDate:f,setHoverDate:S,selectMonth:I,selectYear:U,toggleYearPicker:A,handleYearSelect:q,handleYear:ae,getModelMonthYear:E}=Fi(i,a);return t({getSidebarProps:()=>({modelValue:Y,year:C,getModelMonthYear:E,selectMonth:I,selectYear:U,handleYear:ae}),presetDate:f,toggleYearPicker:B=>A(0,B)}),(B,ne)=>(P(),De(Sa,{"multi-calendars":d(v).count,collapse:B.collapse,stretch:""},{default:_e(({instance:F})=>[B.$slots["top-extra"]?ue(B.$slots,"top-extra",{key:0,value:B.internalModelValue}):j("",!0),B.$slots["month-year"]?ue(B.$slots,"month-year",We(Qe({key:1},{year:d(C),months:d(p)(F),years:d(c)(F),selectMonth:d(I),selectYear:d(U),instance:F}))):(P(),De(ya,{key:2,items:d(p)(F),"arrow-navigation":B.arrowNavigation,"is-last":B.autoApply&&!d(h).keepActionRow,"esc-close":B.escClose,height:d(h).modeHeight,config:B.config,"no-overlay-focus":!!(B.noOverlayFocus||B.textInput),"use-relative":"",type:"month",onSelected:N=>d(I)(N,F),onHoverValue:N=>d(S)(N,F)},je({header:_e(()=>[ot(Cr,Qe(B.$props,{items:d(c)(F),instance:F,"show-year-picker":d(k)[F],year:d(C)(F),"is-disabled":N=>d(m)(F,N),onHandleYear:N=>d(ae)(F,N),onYearSelect:N=>d(q)(N,F),onToggleYearPicker:N=>d(A)(F,N?.flow,N?.show)}),je({_:2},[Ye(d(l),(N,ie)=>({name:N,fn:_e(ce=>[ue(B.$slots,N,We(at(ce)))])}))]),1040,["items","instance","show-year-picker","year","is-disabled","onHandleYear","onYearSelect","onToggleYearPicker"])]),_:2},[B.$slots["month-overlay-value"]?{name:"item",fn:_e(({item:N})=>[ue(B.$slots,"month-overlay-value",{text:N.text,value:N.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"]))}}),Wi=(e,t)=>{const n=()=>{e.isTextInputDate&&(m.value=he(Q(e.startDate)))},{modelValue:a}=ba(e,t,n),r=Z(null),{defaultedHighlight:l,defaultedMultiDates:i,defaultedFilters:p,defaultedRange:c,propDates:C}=Se(e),m=Z();Ke(()=>{e.startDate&&(a.value&&e.focusStartDate||!a.value)&&(m.value=he(Q(e.startDate)))});const v=f=>Array.isArray(a.value)?a.value.some(S=>he(S)===f):a.value?he(a.value)===f:!1,h=f=>c.value.enabled&&Array.isArray(a.value)?$a(a.value,r.value,Y(f)):!1,k=G(()=>Zt(_n(e.yearRange,e.locale,e.reverseYears),f=>{const S=v(f.value),I=fa(f.value,ea(C.value.minDate),ea(C.value.maxDate))||p.value.years.includes(f.value),U=h(f.value)&&!S,A=Mn(l.value,f.value);return{active:S,disabled:I,isBetween:U,highlighted:A}})),Y=f=>_t(pt(ma(new Date)),f);return{groupedYears:k,modelValue:a,focusYear:m,setHoverValue:f=>{r.value=_t(pt(new Date),f)},selectYear:f=>{var S;if(t("update-month-year",{instance:0,year:f}),i.value.enabled)return a.value?Array.isArray(a.value)&&(((S=a.value)==null?void 0:S.map(I=>he(I))).includes(f)?a.value=a.value.filter(I=>he(I)!==f):a.value.push(_t(tt(Q()),f))):a.value=[_t(tt(ma(Q())),f)],t("auto-apply",!0);c.value.enabled?(a.value=Tn(a,Y(f),t),it().then(()=>{Ra(a.value,t,e.autoApply,e.modelAuto)})):(a.value=Y(f),t("auto-apply"))}}},Qi=ze({compatConfig:{MODE:3},__name:"YearPicker",props:{...yt},emits:["update:internal-model-value","reset-flow","range-start","range-end","auto-apply","update-month-year"],setup(e,{expose:t,emit:n}){const a=n,r=e,{groupedYears:l,modelValue:i,focusYear:p,selectYear:c,setHoverValue:C}=Wi(r,a),{defaultedConfig:m}=Se(r);return t({getSidebarProps:()=>({modelValue:i,selectYear:c})}),(v,h)=>(P(),W("div",null,[v.$slots["top-extra"]?ue(v.$slots,"top-extra",{key:0,value:v.internalModelValue}):j("",!0),v.$slots["month-year"]?ue(v.$slots,"month-year",We(Qe({key:1},{years:d(l),selectYear:d(c)}))):(P(),De(ya,{key:2,items:d(l),"is-last":v.autoApply&&!d(m).keepActionRow,height:d(m).modeHeight,config:v.config,"no-overlay-focus":!!(v.noOverlayFocus||v.textInput),"focus-value":d(p),type:"year","use-relative":"",onSelected:d(c),onHoverValue:d(C)},je({_:2},[v.$slots["year-overlay-value"]?{name:"item",fn:_e(({item:k})=>[ue(v.$slots,"year-overlay-value",{text:k.text,value:k.value})]),key:"0"}:void 0]),1032,["items","is-last","height","config","no-overlay-focus","focus-value","onSelected","onHoverValue"]))]))}}),zi={key:0,class:"dp__time_input"},Ui=["data-test","aria-label","onKeydown","onClick","onMousedown"],Xi=["aria-label","disabled","data-test","onKeydown","onClick"],Gi=["data-test","aria-label","onKeydown","onClick","onMousedown"],ji={key:0},Ki=["aria-label"],Ji=ze({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},...yt},emits:["set-hours","set-minutes","update:hours","update:minutes","update:seconds","reset-flow","mounted","overlay-closed","overlay-opened","am-pm-change"],setup(e,{expose:t,emit:n}){const a=n,r=e,{setTimePickerElements:l,setTimePickerBackRef:i}=It(),{defaultedAriaLabels:p,defaultedTransitions:c,defaultedFilters:C,defaultedConfig:m,defaultedRange:v}=Se(r),{transitionName:h,showTransition:k}=ga(c),Y=ha({hours:!1,minutes:!1,seconds:!1}),f=Z("AM"),S=Z(null),I=Z([]),U=Z(),A=Z(!1);Ke(()=>{a("mounted")});const q=s=>Ce(new Date,{hours:s.hours,minutes:s.minutes,seconds:r.enableSeconds?s.seconds:0,milliseconds:0}),ae=G(()=>s=>H(s,r[s])||B(s,r[s])),E=G(()=>({hours:r.hours,minutes:r.minutes,seconds:r.seconds})),B=(s,L)=>v.value.enabled&&!v.value.disableTimeRangeValidation?!r.validateTime(s,L):!1,ne=(s,L)=>{if(v.value.enabled&&!v.value.disableTimeRangeValidation){const J=L?+r[`${s}Increment`]:-+r[`${s}Increment`],$=r[s]+J;return!r.validateTime(s,$)}return!1},F=G(()=>s=>!V(+r[s]+ +r[`${s}Increment`],s)||ne(s,!0)),N=G(()=>s=>!V(+r[s]-+r[`${s}Increment`],s)||ne(s,!1)),ie=(s,L)=>Xn(Ce(Q(),s),L),ce=(s,L)=>Go(Ce(Q(),s),L),pe=G(()=>({dp__time_col:!0,dp__time_col_block:!r.timePickerInline,dp__time_col_reg_block:!r.enableSeconds&&r.is24&&!r.timePickerInline,dp__time_col_reg_inline:!r.enableSeconds&&r.is24&&r.timePickerInline,dp__time_col_reg_with_button:!r.enableSeconds&&!r.is24,dp__time_col_sec:r.enableSeconds&&r.is24,dp__time_col_sec_with_button:r.enableSeconds&&!r.is24})),g=G(()=>{const s=[{type:"hours"}];return r.enableMinutes&&s.push({type:"",separator:!0},{type:"minutes"}),r.enableSeconds&&s.push({type:"",separator:!0},{type:"seconds"}),s}),D=G(()=>g.value.filter(s=>!s.separator)),y=G(()=>s=>{if(s==="hours"){const L=le(+r.hours);return{text:L<10?`0${L}`:`${L}`,value:L}}return{text:r[s]<10?`0${r[s]}`:`${r[s]}`,value:r[s]}}),H=(s,L)=>{var J;if(!r.disabledTimesConfig)return!1;const $=r.disabledTimesConfig(r.order,s==="hours"?L:void 0);return $[s]?!!((J=$[s])!=null&&J.includes(L)):!0},re=(s,L)=>L!=="hours"||f.value==="AM"?s:s+12,R=s=>{const L=r.is24?24:12,J=s==="hours"?L:60,$=+r[`${s}GridIncrement`],ge=s==="hours"&&!r.is24?$:0,x=[];for(let X=ge;X({active:!1,disabled:C.value.times[s].includes(X.value)||!V(X.value,s)||H(s,X.value)||B(s,X.value)}))},b=s=>s>=0?s:59,oe=s=>s>=0?s:23,V=(s,L)=>{const J=r.minTime?q(za(r.minTime)):null,$=r.maxTime?q(za(r.maxTime)):null,ge=q(za(E.value,L,L==="minutes"||L==="seconds"?b(s):oe(s)));return J&&$?(pa(ge,$)||Xt(ge,$))&&(Kt(ge,J)||Xt(ge,J)):J?Kt(ge,J)||Xt(ge,J):$?pa(ge,$)||Xt(ge,$):!0},M=s=>r[`no${s[0].toUpperCase()+s.slice(1)}Overlay`],o=s=>{M(s)||(Y[s]=!Y[s],Y[s]?(A.value=!0,a("overlay-opened",s)):(A.value=!1,a("overlay-closed",s)))},w=s=>s==="hours"?Tt:s==="minutes"?Rt:jt,z=()=>{U.value&&clearTimeout(U.value)},u=(s,L=!0,J)=>{const $=L?ie:ce,ge=L?+r[`${s}Increment`]:-+r[`${s}Increment`];V(+r[s]+ge,s)&&a(`update:${s}`,w(s)($({[s]:+r[s]},{[s]:+r[`${s}Increment`]}))),!(J!=null&&J.keyboard)&&m.value.timeArrowHoldThreshold&&(U.value=setTimeout(()=>{u(s,L)},m.value.timeArrowHoldThreshold))},le=s=>r.is24?s:(s>=12?f.value="PM":f.value="AM",ti(s)),fe=()=>{f.value==="PM"?(f.value="AM",a("update:hours",r.hours-12)):(f.value="PM",a("update:hours",r.hours+12)),a("am-pm-change",f.value)},Ve=s=>{Y[s]=!0},T=(s,L,J)=>{if(s&&r.arrowNavigation){Array.isArray(I.value[L])?I.value[L][J]=s:I.value[L]=[s];const $=I.value.reduce((ge,x)=>x.map((X,de)=>[...ge[de]||[],x[de]]),[]);i(r.closeTimePickerBtn),S.value&&($[1]=$[1].concat(S.value)),l($,r.order)}},K=(s,L)=>(o(s),a(`update:${s}`,L));return t({openChildCmp:Ve}),(s,L)=>{var J;return s.disabled?j("",!0):(P(),W("div",zi,[(P(!0),W(we,null,Ye(g.value,($,ge)=>{var x,X,de;return P(),W("div",{key:ge,class:ke(pe.value)},[$.separator?(P(),W(we,{key:0},[A.value?j("",!0):(P(),W(we,{key:0},[Dt(":")],64))],64)):(P(),W(we,{key:1},[ye("button",{ref_for:!0,ref:be=>T(be,ge,0),type:"button",class:ke({dp__btn:!0,dp__inc_dec_button:!s.timePickerInline,dp__inc_dec_button_inline:s.timePickerInline,dp__tp_inline_btn_top:s.timePickerInline,dp__inc_dec_button_disabled:F.value($.type),"dp--hidden-el":A.value}),"data-test":`${$.type}-time-inc-btn-${r.order}`,"aria-label":(x=d(p))==null?void 0:x.incrementValue($.type),tabindex:"0",onKeydown:be=>d(et)(be,()=>u($.type,!0,{keyboard:!0}),!0),onClick:be=>d(m).timeArrowHoldThreshold?void 0:u($.type,!0),onMousedown:be=>d(m).timeArrowHoldThreshold?u($.type,!0):void 0,onMouseup:z},[r.timePickerInline?(P(),W(we,{key:1},[s.$slots["tp-inline-arrow-up"]?ue(s.$slots,"tp-inline-arrow-up",{key:0}):(P(),W(we,{key:1},[L[2]||(L[2]=ye("span",{class:"dp__tp_inline_btn_bar dp__tp_btn_in_l"},null,-1)),L[3]||(L[3]=ye("span",{class:"dp__tp_inline_btn_bar dp__tp_btn_in_r"},null,-1))],64))],64)):(P(),W(we,{key:0},[s.$slots["arrow-up"]?ue(s.$slots,"arrow-up",{key:0}):j("",!0),s.$slots["arrow-up"]?j("",!0):(P(),De(d(gn),{key:1}))],64))],42,Ui),ye("button",{ref_for:!0,ref:be=>T(be,ge,1),type:"button","aria-label":`${y.value($.type).text}-${(X=d(p))==null?void 0:X.openTpOverlay($.type)}`,class:ke({dp__time_display:!0,dp__time_display_block:!s.timePickerInline,dp__time_display_inline:s.timePickerInline,"dp--time-invalid":ae.value($.type),"dp--time-overlay-btn":!ae.value($.type),"dp--hidden-el":A.value}),disabled:M($.type),tabindex:"0","data-test":`${$.type}-toggle-overlay-btn-${r.order}`,onKeydown:be=>d(et)(be,()=>o($.type),!0),onClick:be=>o($.type)},[s.$slots[$.type]?ue(s.$slots,$.type,{key:0,text:y.value($.type).text,value:y.value($.type).value}):j("",!0),s.$slots[$.type]?j("",!0):(P(),W(we,{key:1},[Dt(Ge(y.value($.type).text),1)],64))],42,Xi),ye("button",{ref_for:!0,ref:be=>T(be,ge,2),type:"button",class:ke({dp__btn:!0,dp__inc_dec_button:!s.timePickerInline,dp__inc_dec_button_inline:s.timePickerInline,dp__tp_inline_btn_bottom:s.timePickerInline,dp__inc_dec_button_disabled:N.value($.type),"dp--hidden-el":A.value}),"data-test":`${$.type}-time-dec-btn-${r.order}`,"aria-label":(de=d(p))==null?void 0:de.decrementValue($.type),tabindex:"0",onKeydown:be=>d(et)(be,()=>u($.type,!1,{keyboard:!0}),!0),onClick:be=>d(m).timeArrowHoldThreshold?void 0:u($.type,!1),onMousedown:be=>d(m).timeArrowHoldThreshold?u($.type,!1):void 0,onMouseup:z},[r.timePickerInline?(P(),W(we,{key:1},[s.$slots["tp-inline-arrow-down"]?ue(s.$slots,"tp-inline-arrow-down",{key:0}):(P(),W(we,{key:1},[L[4]||(L[4]=ye("span",{class:"dp__tp_inline_btn_bar dp__tp_btn_in_l"},null,-1)),L[5]||(L[5]=ye("span",{class:"dp__tp_inline_btn_bar dp__tp_btn_in_r"},null,-1))],64))],64)):(P(),W(we,{key:0},[s.$slots["arrow-down"]?ue(s.$slots,"arrow-down",{key:0}):j("",!0),s.$slots["arrow-down"]?j("",!0):(P(),De(d(bn),{key:1}))],64))],42,Gi)],64))],2)}),128)),s.is24?j("",!0):(P(),W("div",ji,[s.$slots["am-pm-button"]?ue(s.$slots,"am-pm-button",{key:0,toggle:fe,value:f.value}):j("",!0),s.$slots["am-pm-button"]?j("",!0):(P(),W("button",{key:1,ref_key:"amPmButton",ref:S,type:"button",class:"dp__pm_am_button",role:"button","aria-label":(J=d(p))==null?void 0:J.amPmButton,tabindex:"0",onClick:fe,onKeydown:L[0]||(L[0]=$=>d(et)($,()=>fe(),!0))},Ge(f.value),41,Ki))])),(P(!0),W(we,null,Ye(D.value,($,ge)=>(P(),De(ta,{key:ge,name:d(h)(Y[$.type]),css:d(k)},{default:_e(()=>{var x,X;return[Y[$.type]?(P(),De(ya,{key:0,items:R($.type),"is-last":s.autoApply&&!d(m).keepActionRow,"esc-close":s.escClose,type:$.type,"text-input":s.textInput,config:s.config,"arrow-navigation":s.arrowNavigation,"aria-labels":s.ariaLabels,"overlay-label":(X=(x=d(p)).timeOverlay)==null?void 0:X.call(x,$.type),onSelected:de=>K($.type,de),onToggle:de=>o($.type),onResetFlow:L[1]||(L[1]=de=>s.$emit("reset-flow"))},je({"button-icon":_e(()=>[s.$slots["clock-icon"]?ue(s.$slots,"clock-icon",{key:0}):j("",!0),s.$slots["clock-icon"]?j("",!0):(P(),De(Oa(s.timePickerInline?d(aa):d(yn)),{key:1}))]),_:2},[s.$slots[`${$.type}-overlay-value`]?{name:"item",fn:_e(({item:de})=>[ue(s.$slots,`${$.type}-overlay-value`,{text:de.text,value:de.value})]),key:"0"}:void 0,s.$slots[`${$.type}-overlay-header`]?{name:"header",fn:_e(()=>[ue(s.$slots,`${$.type}-overlay-header`,{toggle:()=>o($.type)})]),key:"1"}:void 0]),1032,["items","is-last","esc-close","type","text-input","config","arrow-navigation","aria-labels","overlay-label","onSelected","onToggle"])):j("",!0)]}),_:2},1032,["name","css"]))),128))]))}}}),Zi={class:"dp--tp-wrap"},es=["aria-label","tabindex"],ts=["role","aria-label","tabindex"],as=["aria-label"],Sr=ze({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},...yt},emits:["update:hours","update:minutes","update:seconds","mount","reset-flow","overlay-opened","overlay-closed","am-pm-change"],setup(e,{expose:t,emit:n}){const a=n,r=e,{buildMatrix:l,setTimePicker:i}=It(),p=qt(),{defaultedTransitions:c,defaultedAriaLabels:C,defaultedTextInput:m,defaultedConfig:v,defaultedRange:h}=Se(r),{transitionName:k,showTransition:Y}=ga(c),{hideNavigationButtons:f}=Ia(),S=Z(null),I=Z(null),U=Z([]),A=Z(null),q=Z(!1);Ke(()=>{a("mount"),!r.timePicker&&r.arrowNavigation?l([Fe(S.value)],"time"):i(!0,r.timePicker)});const ae=G(()=>h.value.enabled&&r.modelAuto?yr(r.internalModelValue):!0),E=Z(!1),B=R=>({hours:Array.isArray(r.hours)?r.hours[R]:r.hours,minutes:Array.isArray(r.minutes)?r.minutes[R]:r.minutes,seconds:Array.isArray(r.seconds)?r.seconds[R]:r.seconds}),ne=G(()=>{const R=[];if(h.value.enabled)for(let b=0;b<2;b++)R.push(B(b));else R.push(B(0));return R}),F=(R,b=!1,oe="")=>{b||a("reset-flow"),E.value=R,a(R?"overlay-opened":"overlay-closed",Xe.time),r.arrowNavigation&&i(R),it(()=>{oe!==""&&U.value[0]&&U.value[0].openChildCmp(oe)})},N=G(()=>({dp__btn:!0,dp__button:!0,dp__button_bottom:r.autoApply&&!v.value.keepActionRow})),ie=lt(p,"timePicker"),ce=(R,b,oe)=>h.value.enabled?b===0?[R,ne.value[1][oe]]:[ne.value[0][oe],R]:R,pe=R=>{a("update:hours",R)},g=R=>{a("update:minutes",R)},D=R=>{a("update:seconds",R)},y=()=>{if(A.value&&!m.value.enabled&&!r.noOverlayFocus){const R=gr(A.value);R&&R.focus({preventScroll:!0})}},H=R=>{q.value=!1,a("overlay-closed",R)},re=R=>{q.value=!0,a("overlay-opened",R)};return t({toggleTimePicker:F}),(R,b)=>{var oe;return P(),W("div",Zi,[!R.timePicker&&!R.timePickerInline?Ma((P(),W("button",{key:0,ref_key:"openTimePickerBtn",ref:S,type:"button",class:ke({...N.value,"dp--hidden-el":E.value}),"aria-label":(oe=d(C))==null?void 0:oe.openTimePicker,tabindex:R.noOverlayFocus?void 0:0,"data-test":"open-time-picker-btn",onKeydown:b[0]||(b[0]=V=>d(et)(V,()=>F(!0))),onClick:b[1]||(b[1]=V=>F(!0))},[R.$slots["clock-icon"]?ue(R.$slots,"clock-icon",{key:0}):j("",!0),R.$slots["clock-icon"]?j("",!0):(P(),De(d(yn),{key:1}))],42,es)),[[Da,!d(f)(R.hideNavigation,"time")]]):j("",!0),ot(ta,{name:d(k)(E.value),css:d(Y)&&!R.timePickerInline},{default:_e(()=>{var V,M;return[E.value||R.timePicker||R.timePickerInline?(P(),W("div",{key:0,ref_key:"overlayRef",ref:A,role:R.timePickerInline?void 0:"dialog",class:ke({dp__overlay:!R.timePickerInline,"dp--overlay-absolute":!r.timePicker&&!R.timePickerInline,"dp--overlay-relative":r.timePicker}),style:dt(R.timePicker?{height:`${d(v).modeHeight}px`}:void 0),"aria-label":(V=d(C))==null?void 0:V.timePicker,tabindex:R.timePickerInline?void 0:0},[ye("div",{class:ke(R.timePickerInline?"dp__time_picker_inline_container":"dp__overlay_container dp__container_flex dp__time_picker_overlay_container"),style:{display:"flex"}},[R.$slots["time-picker-overlay"]?ue(R.$slots,"time-picker-overlay",{key:0,hours:e.hours,minutes:e.minutes,seconds:e.seconds,setHours:pe,setMinutes:g,setSeconds:D}):j("",!0),R.$slots["time-picker-overlay"]?j("",!0):(P(),W("div",{key:1,class:ke(R.timePickerInline?"dp__flex":"dp__overlay_row dp__flex_row")},[(P(!0),W(we,null,Ye(ne.value,(o,w)=>Ma((P(),De(Ji,Qe({key:w,ref_for:!0},{...R.$props,order:w,hours:o.hours,minutes:o.minutes,seconds:o.seconds,closeTimePickerBtn:I.value,disabledTimesConfig:e.disabledTimesConfig,disabled:w===0?d(h).fixedStart:d(h).fixedEnd},{ref_for:!0,ref_key:"timeInputRefs",ref:U,"validate-time":(z,u)=>e.validateTime(z,ce(u,w,z)),"onUpdate:hours":z=>pe(ce(z,w,"hours")),"onUpdate:minutes":z=>g(ce(z,w,"minutes")),"onUpdate:seconds":z=>D(ce(z,w,"seconds")),onMounted:y,onOverlayClosed:H,onOverlayOpened:re,onAmPmChange:b[2]||(b[2]=z=>R.$emit("am-pm-change",z))}),je({_:2},[Ye(d(ie),(z,u)=>({name:z,fn:_e(le=>[ue(R.$slots,z,Qe({ref_for:!0},le))])}))]),1040,["validate-time","onUpdate:hours","onUpdate:minutes","onUpdate:seconds"])),[[Da,w===0?!0:ae.value]])),128))],2)),!R.timePicker&&!R.timePickerInline?Ma((P(),W("button",{key:2,ref_key:"closeTimePickerBtn",ref:I,type:"button",class:ke({...N.value,"dp--hidden-el":q.value}),"aria-label":(M=d(C))==null?void 0:M.closeTimePicker,tabindex:"0",onKeydown:b[3]||(b[3]=o=>d(et)(o,()=>F(!1))),onClick:b[4]||(b[4]=o=>F(!1))},[R.$slots["calendar-icon"]?ue(R.$slots,"calendar-icon",{key:0}):j("",!0),R.$slots["calendar-icon"]?j("",!0):(P(),De(d(aa),{key:1}))],42,as)),[[Da,!d(f)(R.hideNavigation,"time")]]):j("",!0)],2)],14,ts)):j("",!0)]}),_:3},8,["name","css"])])}}}),Rr=(e,t,n,a)=>{const{defaultedRange:r}=Se(e),l=(A,q)=>Array.isArray(t[A])?t[A][q]:t[A],i=A=>e.enableSeconds?Array.isArray(t.seconds)?t.seconds[A]:t.seconds:0,p=(A,q)=>A?q!==void 0?St(A,l("hours",q),l("minutes",q),i(q)):St(A,t.hours,t.minutes,i()):mr(Q(),i(q)),c=(A,q)=>{t[A]=q},C=G(()=>e.modelAuto&&r.value.enabled?Array.isArray(n.value)?n.value.length>1:!1:r.value.enabled),m=(A,q)=>{const ae=Object.fromEntries(Object.keys(t).map(E=>E===A?[E,q]:[E,t[E]].slice()));if(C.value&&!r.value.disableTimeRangeValidation){const E=ne=>n.value?St(n.value[ne],ae.hours[ne],ae.minutes[ne],ae.seconds[ne]):null,B=ne=>vr(n.value[ne],0);return!(Me(E(0),E(1))&&(Kt(E(0),B(1))||pa(E(1),B(0))))}return!0},v=(A,q)=>{m(A,q)&&(c(A,q),a&&a())},h=A=>{v("hours",A)},k=A=>{v("minutes",A)},Y=A=>{v("seconds",A)},f=(A,q,ae,E)=>{q&&h(A),!q&&!ae&&k(A),ae&&Y(A),n.value&&E(n.value)},S=A=>{if(A){const q=Array.isArray(A),ae=q?[+A[0].hours,+A[1].hours]:+A.hours,E=q?[+A[0].minutes,+A[1].minutes]:+A.minutes,B=q?[+A[0].seconds,+A[1].seconds]:+A.seconds;c("hours",ae),c("minutes",E),e.enableSeconds&&c("seconds",B)}},I=(A,q)=>{const ae={hours:Array.isArray(t.hours)?t.hours[A]:t.hours,disabledArr:[]};return(q||q===0)&&(ae.hours=q),Array.isArray(e.disabledTimes)&&(ae.disabledArr=r.value.enabled&&Array.isArray(e.disabledTimes[A])?e.disabledTimes[A]:e.disabledTimes),ae},U=G(()=>(A,q)=>{var ae;if(Array.isArray(e.disabledTimes)){const{disabledArr:E,hours:B}=I(A,q),ne=E.filter(F=>+F.hours===B);return((ae=ne[0])==null?void 0:ae.minutes)==="*"?{hours:[B],minutes:void 0,seconds:void 0}:{hours:[],minutes:ne?.map(F=>+F.minutes)??[],seconds:ne?.map(F=>F.seconds?+F.seconds:void 0)??[]}}return{hours:[],minutes:[],seconds:[]}});return{setTime:c,updateHours:h,updateMinutes:k,updateSeconds:Y,getSetDateTime:p,updateTimeValues:f,getSecondsValue:i,assignStartTime:S,validateTime:m,disabledTimesConfig:U}},ns=(e,t)=>{const n=()=>{e.isTextInputDate&&q()},{modelValue:a,time:r}=ba(e,t,n),{defaultedStartTime:l,defaultedRange:i,defaultedTz:p}=Se(e),{updateTimeValues:c,getSetDateTime:C,setTime:m,assignStartTime:v,disabledTimesConfig:h,validateTime:k}=Rr(e,r,a,Y);function Y(){t("update-flow-step")}const f=E=>{const{hours:B,minutes:ne,seconds:F}=E;return{hours:+B,minutes:+ne,seconds:F?+F:0}},S=()=>{if(e.startTime){if(Array.isArray(e.startTime)){const B=f(e.startTime[0]),ne=f(e.startTime[1]);return[Ce(Q(),B),Ce(Q(),ne)]}const E=f(e.startTime);return Ce(Q(),E)}return i.value.enabled?[null,null]:null},I=()=>{if(i.value.enabled){const[E,B]=S();a.value=[nt(C(E,0),p.value.timezone),nt(C(B,1),p.value.timezone)]}else a.value=nt(C(S()),p.value.timezone)},U=E=>Array.isArray(E)?[Ft(Q(E[0])),Ft(Q(E[1]))]:[Ft(E??Q())],A=(E,B,ne)=>{m("hours",E),m("minutes",B),m("seconds",e.enableSeconds?ne:0)},q=()=>{const[E,B]=U(a.value);return i.value.enabled?A([E.hours,B.hours],[E.minutes,B.minutes],[E.seconds,B.seconds]):A(E.hours,E.minutes,E.seconds)};Ke(()=>{if(!e.shadow)return v(l.value),a.value?q():I()});const ae=()=>{Array.isArray(a.value)?a.value=a.value.map((E,B)=>E&&C(E,B)):a.value=C(a.value),t("time-update")};return{modelValue:a,time:r,disabledTimesConfig:h,updateTime:(E,B=!0,ne=!1)=>{c(E,B,ne,ae)},validateTime:k}},rs=ze({compatConfig:{MODE:3},__name:"TimePickerSolo",props:{...yt},emits:["update:internal-model-value","time-update","am-pm-change","mount","reset-flow","update-flow-step","overlay-toggle"],setup(e,{expose:t,emit:n}){const a=n,r=e,l=qt(),i=lt(l,"timePicker"),p=Z(null),{time:c,modelValue:C,disabledTimesConfig:m,updateTime:v,validateTime:h}=ns(r,a);return Ke(()=>{r.shadow||a("mount",null)}),t({getSidebarProps:()=>({modelValue:C,time:c,updateTime:v}),toggleTimePicker:(k,Y=!1,f="")=>{var S;(S=p.value)==null||S.toggleTimePicker(k,Y,f)}}),(k,Y)=>(P(),De(Sa,{"multi-calendars":0,stretch:""},{default:_e(()=>[ot(Sr,Qe({ref_key:"tpRef",ref:p},k.$props,{hours:d(c).hours,minutes:d(c).minutes,seconds:d(c).seconds,"internal-model-value":k.internalModelValue,"disabled-times-config":d(m),"validate-time":d(h),"onUpdate:hours":Y[0]||(Y[0]=f=>d(v)(f)),"onUpdate:minutes":Y[1]||(Y[1]=f=>d(v)(f,!1)),"onUpdate:seconds":Y[2]||(Y[2]=f=>d(v)(f,!1,!0)),onAmPmChange:Y[3]||(Y[3]=f=>k.$emit("am-pm-change",f)),onResetFlow:Y[4]||(Y[4]=f=>k.$emit("reset-flow")),onOverlayClosed:Y[5]||(Y[5]=f=>k.$emit("overlay-toggle",{open:!1,overlay:f})),onOverlayOpened:Y[6]||(Y[6]=f=>k.$emit("overlay-toggle",{open:!0,overlay:f}))}),je({_:2},[Ye(d(i),(f,S)=>({name:f,fn:_e(I=>[ue(k.$slots,f,We(at(I)))])}))]),1040,["hours","minutes","seconds","internal-model-value","disabled-times-config","validate-time"])]),_:3}))}}),ls={class:"dp--header-wrap"},os={key:0,class:"dp__month_year_wrap"},is={key:0},ss={class:"dp__month_year_wrap"},us=["data-dp-element","aria-label","data-test","onClick","onKeydown"],ds=ze({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:()=>[]},...yt},emits:["update-month-year","mount","reset-flow","overlay-closed","overlay-opened"],setup(e,{expose:t,emit:n}){const a=n,r=e,{defaultedTransitions:l,defaultedAriaLabels:i,defaultedMultiCalendars:p,defaultedFilters:c,defaultedConfig:C,defaultedHighlight:m,propDates:v,defaultedUI:h}=Se(r),{transitionName:k,showTransition:Y}=ga(l),{buildMatrix:f}=It(),{handleMonthYearChange:S,isDisabled:I,updateMonthYear:U}=Yi(r,a),{showLeftIcon:A,showRightIcon:q}=Ia(),ae=Z(!1),E=Z(!1),B=Z(!1),ne=Z([null,null,null,null]);Ke(()=>{a("mount")});const F=M=>({get:()=>r[M],set:o=>{const w=M===vt.month?vt.year:vt.month;a("update-month-year",{[M]:o,[w]:r[w]}),M===vt.month?H(!0):re(!0)}}),N=G(F(vt.month)),ie=G(F(vt.year)),ce=G(()=>M=>({month:r.month,year:r.year,items:M===vt.month?r.months:r.years,instance:r.instance,updateMonthYear:U,toggle:M===vt.month?H:re})),pe=G(()=>r.months.find(o=>o.value===r.month)||{text:"",value:0}),g=G(()=>Zt(r.months,M=>{const o=r.month===M.value,w=fa(M.value,wr(r.year,v.value.minDate),_r(r.year,v.value.maxDate))||c.value.months.includes(M.value),z=Tr(m.value,M.value,r.year);return{active:o,disabled:w,highlighted:z}})),D=G(()=>Zt(r.years,M=>{const o=r.year===M.value,w=fa(M.value,ea(v.value.minDate),ea(v.value.maxDate))||c.value.years.includes(M.value),z=Mn(m.value,M.value);return{active:o,disabled:w,highlighted:z}})),y=(M,o,w)=>{w!==void 0?M.value=w:M.value=!M.value,M.value?(B.value=!0,a("overlay-opened",o)):(B.value=!1,a("overlay-closed",o))},H=(M=!1,o)=>{R(M),y(ae,Xe.month,o)},re=(M=!1,o)=>{R(M),y(E,Xe.year,o)},R=M=>{M||a("reset-flow")},b=(M,o)=>{r.arrowNavigation&&(ne.value[o]=Fe(M),f(ne.value,"monthYear"))},oe=G(()=>{var M,o,w,z,u,le;return[{type:vt.month,index:1,toggle:H,modelValue:N.value,updateModelValue:fe=>N.value=fe,text:pe.value.text,showSelectionGrid:ae.value,items:g.value,ariaLabel:(M=i.value)==null?void 0:M.openMonthsOverlay,overlayLabel:((w=(o=i.value).monthPicker)==null?void 0:w.call(o,!0))??void 0},{type:vt.year,index:2,toggle:re,modelValue:ie.value,updateModelValue:fe=>ie.value=fe,text:br(r.year,r.locale),showSelectionGrid:E.value,items:D.value,ariaLabel:(z=i.value)==null?void 0:z.openYearsOverlay,overlayLabel:((le=(u=i.value).yearPicker)==null?void 0:le.call(u,!0))??void 0}]}),V=G(()=>r.disableYearSelect?[oe.value[0]]:r.yearFirst?[...oe.value].reverse():oe.value);return t({toggleMonthPicker:H,toggleYearPicker:re,handleMonthYearChange:S}),(M,o)=>{var w,z,u,le,fe,Ve;return P(),W("div",ls,[M.$slots["month-year"]?(P(),W("div",os,[ue(M.$slots,"month-year",We(at({month:e.month,year:e.year,months:e.months,years:e.years,updateMonthYear:d(U),handleMonthYearChange:d(S),instance:e.instance})))])):(P(),W(we,{key:1},[M.$slots["top-extra"]?(P(),W("div",is,[ue(M.$slots,"top-extra",{value:M.internalModelValue})])):j("",!0),ye("div",ss,[d(A)(d(p),e.instance)&&!M.vertical?(P(),De(da,{key:0,"aria-label":(w=d(i))==null?void 0:w.prevMonth,disabled:d(I)(!1),class:ke((z=d(h))==null?void 0:z.navBtnPrev),"el-name":"action-prev",onActivate:o[0]||(o[0]=T=>d(S)(!1,!0)),onSetRef:o[1]||(o[1]=T=>b(T,0))},{default:_e(()=>[M.$slots["arrow-left"]?ue(M.$slots,"arrow-left",{key:0}):j("",!0),M.$slots["arrow-left"]?j("",!0):(P(),De(d(fn),{key:1}))]),_:3},8,["aria-label","disabled","class"])):j("",!0),ye("div",{class:ke(["dp__month_year_wrap",{dp__year_disable_select:M.disableYearSelect}])},[(P(!0),W(we,null,Ye(V.value,(T,K)=>(P(),W(we,{key:T.type},[ye("button",{ref_for:!0,ref:s=>b(s,K+1),type:"button","data-dp-element":`overlay-${T.type}`,class:ke(["dp__btn dp__month_year_select",{"dp--hidden-el":B.value}]),"aria-label":`${T.text}-${T.ariaLabel}`,"data-test":`${T.type}-toggle-overlay-${e.instance}`,onClick:T.toggle,onKeydown:s=>d(et)(s,()=>T.toggle(),!0)},[M.$slots[T.type]?ue(M.$slots,T.type,{key:0,text:T.text,value:r[T.type]}):j("",!0),M.$slots[T.type]?j("",!0):(P(),W(we,{key:1},[Dt(Ge(T.text),1)],64))],42,us),ot(ta,{name:d(k)(T.showSelectionGrid),css:d(Y)},{default:_e(()=>[T.showSelectionGrid?(P(),De(ya,{key:0,items:T.items,"arrow-navigation":M.arrowNavigation,"hide-navigation":M.hideNavigation,"is-last":M.autoApply&&!d(C).keepActionRow,"skip-button-ref":!1,config:M.config,type:T.type,"header-refs":[],"esc-close":M.escClose,"menu-wrap-ref":M.menuWrapRef,"text-input":M.textInput,"aria-labels":M.ariaLabels,"overlay-label":T.overlayLabel,onSelected:T.updateModelValue,onToggle:T.toggle},je({"button-icon":_e(()=>[M.$slots["calendar-icon"]?ue(M.$slots,"calendar-icon",{key:0}):j("",!0),M.$slots["calendar-icon"]?j("",!0):(P(),De(d(aa),{key:1}))]),_:2},[M.$slots[`${T.type}-overlay-value`]?{name:"item",fn:_e(({item:s})=>[ue(M.$slots,`${T.type}-overlay-value`,{text:s.text,value:s.value})]),key:"0"}:void 0,M.$slots[`${T.type}-overlay`]?{name:"overlay",fn:_e(()=>[ue(M.$slots,`${T.type}-overlay`,Qe({ref_for:!0},ce.value(T.type)))]),key:"1"}:void 0,M.$slots[`${T.type}-overlay-header`]?{name:"header",fn:_e(()=>[ue(M.$slots,`${T.type}-overlay-header`,{toggle:T.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"])):j("",!0)]),_:2},1032,["name","css"])],64))),128))],2),d(A)(d(p),e.instance)&&M.vertical?(P(),De(da,{key:1,"aria-label":(u=d(i))==null?void 0:u.prevMonth,"el-name":"action-prev",disabled:d(I)(!1),class:ke((le=d(h))==null?void 0:le.navBtnPrev),onActivate:o[2]||(o[2]=T=>d(S)(!1,!0))},{default:_e(()=>[M.$slots["arrow-up"]?ue(M.$slots,"arrow-up",{key:0}):j("",!0),M.$slots["arrow-up"]?j("",!0):(P(),De(d(gn),{key:1}))]),_:3},8,["aria-label","disabled","class"])):j("",!0),d(q)(d(p),e.instance)?(P(),De(da,{key:2,ref:"rightIcon","el-name":"action-next",disabled:d(I)(!0),"aria-label":(fe=d(i))==null?void 0:fe.nextMonth,class:ke((Ve=d(h))==null?void 0:Ve.navBtnNext),onActivate:o[3]||(o[3]=T=>d(S)(!0,!0)),onSetRef:o[4]||(o[4]=T=>b(T,M.disableYearSelect?2:3))},{default:_e(()=>[M.$slots[M.vertical?"arrow-down":"arrow-right"]?ue(M.$slots,M.vertical?"arrow-down":"arrow-right",{key:0}):j("",!0),M.$slots[M.vertical?"arrow-down":"arrow-right"]?j("",!0):(P(),De(Oa(M.vertical?d(bn):d(hn)),{key:1}))]),_:3},8,["disabled","aria-label","class"])):j("",!0)])],64))])}}}),cs={class:"dp__calendar_header",role:"row"},vs={key:0,class:"dp__calendar_header_item",role:"gridcell"},ms=["aria-label"],ps={key:0,class:"dp__calendar_item dp__week_num",role:"gridcell"},fs={class:"dp__cell_inner"},hs=["id","aria-pressed","aria-disabled","aria-label","tabindex","data-test","onClick","onTouchend","onKeydown","onMouseenter","onMouseleave","onMousedown"],ys=ze({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},...yt},emits:["select-date","set-hover-date","handle-scroll","mount","handle-swipe","handle-space","tooltip-open","tooltip-close"],setup(e,{expose:t,emit:n}){const a=n,r=e,{buildMultiLevelMatrix:l}=It(),{defaultedTransitions:i,defaultedConfig:p,defaultedAriaLabels:c,defaultedMultiCalendars:C,defaultedWeekNumbers:m,defaultedMultiDates:v,defaultedUI:h}=Se(r),k=Z(null),Y=Z({bottom:"",left:"",transform:""}),f=Z([]),S=Z(null),I=Z(!0),U=Z(""),A=Z({startX:0,endX:0,startY:0,endY:0}),q=Z([]),ae=Z({left:"50%"}),E=Z(!1),B=G(()=>r.calendar?r.calendar(r.mappedDates):r.mappedDates),ne=G(()=>r.dayNames?Array.isArray(r.dayNames)?r.dayNames:r.dayNames(r.locale,+r.weekStart):ei(r.formatLocale,r.locale,+r.weekStart));Ke(()=>{a("mount",{cmp:"calendar",refs:f}),p.value.noSwipe||S.value&&(S.value.addEventListener("touchstart",b,{passive:!1}),S.value.addEventListener("touchend",oe,{passive:!1}),S.value.addEventListener("touchmove",V,{passive:!1})),r.monthChangeOnScroll&&S.value&&S.value.addEventListener("wheel",w,{passive:!1})});const F=T=>T?r.vertical?"vNext":"next":r.vertical?"vPrevious":"previous",N=(T,K)=>{if(r.transitions){const s=tt(Mt(Q(),r.month,r.year));U.value=Ne(tt(Mt(Q(),T,K)),s)?i.value[F(!0)]:i.value[F(!1)],I.value=!1,it(()=>{I.value=!0})}},ie=G(()=>({...h.value.calendar??{}})),ce=G(()=>T=>{const K=ai(T);return{dp__marker_dot:K.type==="dot",dp__marker_line:K.type==="line"}}),pe=G(()=>T=>Me(T,k.value)),g=G(()=>({dp__calendar:!0,dp__calendar_next:C.value.count>0&&r.instance!==0})),D=G(()=>T=>r.hideOffsetDates?T.current:!0),y=async(T,K)=>{const{width:s,height:L}=T.getBoundingClientRect();k.value=K.value;let J={left:`${s/2}px`},$=-50;if(await it(),q.value[0]){const{left:ge,width:x}=q.value[0].getBoundingClientRect();ge<0&&(J={left:"0"},$=0,ae.value.left=`${s/2}px`),window.innerWidth{var L,J,$;const ge=Fe(f.value[K][s]);ge&&((L=T.marker)!=null&&L.customPosition&&($=(J=T.marker)==null?void 0:J.tooltip)!=null&&$.length?Y.value=T.marker.customPosition(ge):await y(ge,T),a("tooltip-open",T.marker))},re=async(T,K,s)=>{var L,J;if(E.value&&v.value.enabled&&v.value.dragSelect)return a("select-date",T);a("set-hover-date",T),(J=(L=T.marker)==null?void 0:L.tooltip)!=null&&J.length&&await H(T,K,s)},R=T=>{k.value&&(k.value=null,Y.value=JSON.parse(JSON.stringify({bottom:"",left:"",transform:""})),a("tooltip-close",T.marker))},b=T=>{A.value.startX=T.changedTouches[0].screenX,A.value.startY=T.changedTouches[0].screenY},oe=T=>{A.value.endX=T.changedTouches[0].screenX,A.value.endY=T.changedTouches[0].screenY,M()},V=T=>{r.vertical&&!r.inline&&T.preventDefault()},M=()=>{const T=r.vertical?"Y":"X";Math.abs(A.value[`start${T}`]-A.value[`end${T}`])>10&&a("handle-swipe",A.value[`start${T}`]>A.value[`end${T}`]?"right":"left")},o=(T,K,s)=>{T&&(Array.isArray(f.value[K])?f.value[K][s]=T:f.value[K]=[T]),r.arrowNavigation&&l(f.value,"calendar")},w=T=>{r.monthChangeOnScroll&&(T.preventDefault(),a("handle-scroll",T))},z=T=>m.value.type==="local"?vn(T.value,{weekStartsOn:+r.weekStart}):m.value.type==="iso"?dn(T.value):typeof m.value.type=="function"?m.value.type(T.value):"",u=T=>{const K=T[0];return m.value.hideOnOffsetDates?T.some(s=>s.current)?z(K):"":z(K)},le=(T,K,s=!0)=>{s&&Vn()||!s&&!Vn()||v.value.enabled||(Yt(T,p.value),a("select-date",K))},fe=T=>{Yt(T,p.value)},Ve=T=>{v.value.enabled&&v.value.dragSelect?(E.value=!0,a("select-date",T)):v.value.enabled&&a("select-date",T)};return t({triggerTransition:N}),(T,K)=>(P(),W("div",{class:ke(g.value)},[ye("div",{ref_key:"calendarWrapRef",ref:S,class:ke(ie.value),role:"grid"},[ye("div",cs,[T.weekNumbers?(P(),W("div",vs,Ge(T.weekNumName),1)):j("",!0),(P(!0),W(we,null,Ye(ne.value,(s,L)=>{var J,$;return P(),W("div",{key:L,class:"dp__calendar_header_item",role:"gridcell","data-test":"calendar-header","aria-label":($=(J=d(c))==null?void 0:J.weekDay)==null?void 0:$.call(J,L)},[T.$slots["calendar-header"]?ue(T.$slots,"calendar-header",{key:0,day:s,index:L}):j("",!0),T.$slots["calendar-header"]?j("",!0):(P(),W(we,{key:1},[Dt(Ge(s),1)],64))],8,ms)}),128))]),K[2]||(K[2]=ye("div",{class:"dp__calendar_header_separator"},null,-1)),ot(ta,{name:U.value,css:!!T.transitions},{default:_e(()=>[I.value?(P(),W("div",{key:0,class:"dp__calendar",role:"rowgroup",onMouseleave:K[1]||(K[1]=s=>E.value=!1)},[(P(!0),W(we,null,Ye(B.value,(s,L)=>(P(),W("div",{key:L,class:"dp__calendar_row",role:"row"},[T.weekNumbers?(P(),W("div",ps,[ye("div",fs,Ge(u(s.days)),1)])):j("",!0),(P(!0),W(we,null,Ye(s.days,(J,$)=>{var ge,x,X;return P(),W("div",{id:d(Pr)(J.value),ref_for:!0,ref:de=>o(de,L,$),key:$+L,role:"gridcell",class:"dp__calendar_item","aria-pressed":(J.classData.dp__active_date||J.classData.dp__range_start||J.classData.dp__range_start)??void 0,"aria-disabled":J.classData.dp__cell_disabled||void 0,"aria-label":(x=(ge=d(c))==null?void 0:ge.day)==null?void 0:x.call(ge,J),tabindex:!J.current&&T.hideOffsetDates?void 0:0,"data-test":J.value,onClick:va(de=>le(de,J),["prevent"]),onTouchend:de=>le(de,J,!1),onKeydown:de=>d(et)(de,()=>T.$emit("select-date",J)),onMouseenter:de=>re(J,L,$),onMouseleave:de=>R(J),onMousedown:de=>Ve(J),onMouseup:K[0]||(K[0]=de=>E.value=!1)},[ye("div",{class:ke(["dp__cell_inner",J.classData])},[T.$slots.day&&D.value(J)?ue(T.$slots,"day",{key:0,day:+J.text,date:J.value}):j("",!0),T.$slots.day?j("",!0):(P(),W(we,{key:1},[Dt(Ge(J.text),1)],64)),J.marker&&D.value(J)?(P(),W(we,{key:2},[T.$slots.marker?ue(T.$slots,"marker",{key:0,marker:J.marker,day:+J.text,date:J.value}):(P(),W("div",{key:1,class:ke(ce.value(J.marker)),style:dt(J.marker.color?{backgroundColor:J.marker.color}:{})},null,6))],64)):j("",!0),pe.value(J.value)?(P(),W("div",{key:3,ref_for:!0,ref_key:"activeTooltip",ref:q,class:"dp__marker_tooltip",style:dt(Y.value)},[(X=J.marker)!=null&&X.tooltip?(P(),W("div",{key:0,class:"dp__tooltip_content",onClick:fe},[(P(!0),W(we,null,Ye(J.marker.tooltip,(de,be)=>(P(),W("div",{key:be,class:"dp__tooltip_text"},[T.$slots["marker-tooltip"]?ue(T.$slots,"marker-tooltip",{key:0,tooltip:de,day:J.value}):j("",!0),T.$slots["marker-tooltip"]?j("",!0):(P(),W(we,{key:1},[ye("div",{class:"dp__tooltip_mark",style:dt(de.color?{backgroundColor:de.color}:{})},null,4),ye("div",null,Ge(de.text),1)],64))]))),128)),ye("div",{class:"dp__arrow_bottom_tp",style:dt(ae.value)},null,4)])):j("",!0)],4)):j("",!0)],2)],40,hs)}),128))]))),128))],32)):j("",!0)]),_:3},8,["name","css"])],2)],2))}}),zn=e=>Array.isArray(e),gs=(e,t,n,a)=>{const r=Z([]),l=Z(new Date),i=Z(),p=()=>b(e.isTextInputDate),{modelValue:c,calendars:C,time:m,today:v}=ba(e,t,p),{defaultedMultiCalendars:h,defaultedStartTime:k,defaultedRange:Y,defaultedConfig:f,defaultedTz:S,propDates:I,defaultedMultiDates:U}=Se(e),{validateMonthYearInRange:A,isDisabled:q,isDateRangeAllowed:ae,checkMinMaxRange:E}=Et(e),{updateTimeValues:B,getSetDateTime:ne,setTime:F,assignStartTime:N,validateTime:ie,disabledTimesConfig:ce}=Rr(e,m,c,a),pe=G(()=>_=>C.value[_]?C.value[_].month:0),g=G(()=>_=>C.value[_]?C.value[_].year:0),D=_=>!f.value.keepViewOnOffsetClick||_?!0:!i.value,y=(_,te,O,ee=!1)=>{var se,Je;D(ee)&&(C.value[_]||(C.value[_]={month:0,year:0}),C.value[_].month=Hn(te)?(se=C.value[_])==null?void 0:se.month:te,C.value[_].year=Hn(O)?(Je=C.value[_])==null?void 0:Je.year:O)},H=()=>{e.autoApply&&t("select-date")};Ke(()=>{e.shadow||(c.value||(T(),k.value&&N(k.value)),b(!0),e.focusStartDate&&e.startDate&&T())});const re=G(()=>{var _;return(_=e.flow)!=null&&_.length&&!e.partialFlow?e.flowStep===e.flow.length:!0}),R=()=>{e.autoApply&&re.value&&t("auto-apply",e.partialFlow?e.flowStep!==e.flow.length:!1)},b=(_=!1)=>{if(c.value)return Array.isArray(c.value)?(r.value=c.value,u(_)):M(c.value,_);if(h.value.count&&_&&!e.startDate)return V(Q(),_)},oe=()=>Array.isArray(c.value)&&Y.value.enabled?xe(c.value[0])===xe(c.value[1]??c.value[0]):!1,V=(_=new Date,te=!1)=>{if((!h.value.count||!h.value.static||te)&&y(0,xe(_),he(_)),h.value.count&&(!h.value.solo||!c.value||oe()))for(let O=1;O{V(_),F("hours",Tt(_)),F("minutes",Rt(_)),F("seconds",jt(_)),h.value.count&&te&&Ve()},o=_=>{if(h.value.count){if(h.value.solo)return 0;const te=xe(_[0]),O=xe(_[1]);return Math.abs(O-te){_[1]&&Y.value.showLastInRange?V(_[o(_)],te):V(_[0],te);const O=(ee,se)=>[ee(_[0]),_[1]?ee(_[1]):m[se][1]];F("hours",O(Tt,"hours")),F("minutes",O(Rt,"minutes")),F("seconds",O(jt,"seconds"))},z=(_,te)=>{if((Y.value.enabled||e.weekPicker)&&!U.value.enabled)return w(_,te);if(U.value.enabled&&te){const O=_[_.length-1];return M(O,te)}},u=_=>{const te=c.value;z(te,_),h.value.count&&h.value.solo&&Ve()},le=(_,te)=>{const O=Ce(Q(),{month:pe.value(te),year:g.value(te)}),ee=_<0?ft(O,1):Jt(O,1);A(xe(ee),he(ee),_<0,e.preventMinMaxNavigation)&&(y(te,xe(ee),he(ee)),t("update-month-year",{instance:te,month:xe(ee),year:he(ee)}),h.value.count&&!h.value.solo&&fe(te),n())},fe=_=>{for(let te=_-1;te>=0;te--){const O=Jt(Ce(Q(),{month:pe.value(te+1),year:g.value(te+1)}),1);y(te,xe(O),he(O))}for(let te=_+1;te<=h.value.count-1;te++){const O=ft(Ce(Q(),{month:pe.value(te-1),year:g.value(te-1)}),1);y(te,xe(O),he(O))}},Ve=()=>{if(Array.isArray(c.value)&&c.value.length===2){const _=Q(Q(c.value[1]?c.value[1]:ft(c.value[0],1))),[te,O]=[xe(c.value[0]),he(c.value[0])],[ee,se]=[xe(c.value[1]),he(c.value[1])];(te!==ee||te===ee&&O!==se)&&h.value.solo&&y(1,xe(_),he(_))}else c.value&&!Array.isArray(c.value)&&(y(0,xe(c.value),he(c.value)),V(Q()))},T=()=>{e.startDate&&(y(0,xe(Q(e.startDate)),he(Q(e.startDate))),h.value.count&&fe(0))},K=(_,te)=>{if(e.monthChangeOnScroll){const O=new Date().getTime()-l.value.getTime(),ee=Math.abs(_.deltaY);let se=500;ee>1&&(se=100),ee>100&&(se=0),O>se&&(l.value=new Date,le(e.monthChangeOnScroll!=="inverse"?-_.deltaY:_.deltaY,te))}},s=(_,te,O=!1)=>{e.monthChangeOnArrows&&e.vertical===O&&L(_,te)},L=(_,te)=>{le(_==="right"?-1:1,te)},J=_=>{if(I.value.markers)return Aa(_.value,I.value.markers)},$=(_,te)=>{switch(e.sixWeeks===!0?"append":e.sixWeeks){case"prepend":return[!0,!1];case"center":return[_==0,!0];case"fair":return[_==0||te>_,!0];case"append":return[!1,!1];default:return[!1,!1]}},ge=(_,te,O,ee)=>{if(e.sixWeeks&&_.length<6){const se=6-_.length,Je=(te.getDay()+7-ee)%7,ut=6-(O.getDay()+7-ee)%7,[Bt,_a]=$(Je,ut);for(let la=1;la<=se;la++)if(_a?!!(la%2)==Bt:Bt){const At=_[0].days[0],qa=x(mt(At.value,-7),xe(te));_.unshift({days:qa})}else{const At=_[_.length-1],qa=At.days[At.days.length-1],Er=x(mt(qa.value,1),xe(te));_.push({days:Er})}}return _},x=(_,te)=>{const O=Q(_),ee=[];for(let se=0;se<7;se++){const Je=mt(O,se),ut=xe(Je)!==te;ee.push({text:e.hideOffsetDates&&ut?"":Je.getDate(),value:Je,current:!ut,classData:{}})}return ee},X=(_,te)=>{const O=[],ee=new Date(te,_),se=new Date(te,_+1,0),Je=e.weekStart,ut=ht(ee,{weekStartsOn:Je}),Bt=_a=>{const la=x(_a,_);if(O.push({days:la}),!O[O.length-1].days.some(At=>Me(tt(At.value),tt(se)))){const At=mt(_a,7);Bt(At)}};return Bt(ut),ge(O,ee,se,Je)},de=_=>{const te=St(Q(_.value),m.hours,m.minutes,rt());t("date-update",te),U.value.enabled?Dn(te,c,U.value.limit):c.value=te,a(),it().then(()=>{R()})},be=_=>Y.value.noDisabledRange?kr(r.value[0],_).some(te=>q(te)):!1,st=()=>{r.value=c.value?c.value.slice():[],r.value.length===2&&!(Y.value.fixedStart||Y.value.fixedEnd)&&(r.value=[])},me=(_,te)=>{const O=[Q(_.value),mt(Q(_.value),+Y.value.autoRange)];ae(O)?(te&&Pt(_.value),r.value=O):t("invalid-date",_.value)},Pt=_=>{const te=xe(Q(_)),O=he(Q(_));if(y(0,te,O),h.value.count>0)for(let ee=1;ee{if(be(_.value)||!E(_.value,c.value,Y.value.fixedStart?0:1))return t("invalid-date",_.value);r.value=$r(Q(_.value),c,t,Y)},na=(_,te)=>{if(st(),Y.value.autoRange)return me(_,te);if(Y.value.fixedStart||Y.value.fixedEnd)return gt(_);r.value[0]?E(Q(_.value),c.value)&&!be(_.value)?Ie(Q(_.value),Q(r.value[0]))?(r.value.unshift(Q(_.value)),t("range-end",r.value[0])):(r.value[1]=Q(_.value),t("range-end",r.value[1])):(e.autoApply&&t("auto-apply-invalid",_.value),t("invalid-date",_.value)):(r.value[0]=Q(_.value),t("range-start",r.value[0]))},rt=(_=!0)=>e.enableSeconds?Array.isArray(m.seconds)?_?m.seconds[0]:m.seconds[1]:m.seconds:0,ra=_=>{r.value[_]=St(r.value[_],m.hours[_],m.minutes[_],rt(_!==1))},Ea=()=>{var _,te;r.value[0]&&r.value[1]&&+((_=r.value)==null?void 0:_[0])>+((te=r.value)==null?void 0:te[1])&&(r.value.reverse(),t("range-start",r.value[0]),t("range-end",r.value[1]))},wa=()=>{r.value.length&&(r.value[0]&&!r.value[1]?ra(0):(ra(0),ra(1),a()),Ea(),c.value=r.value.slice(),Ra(r.value,t,e.autoApply,e.modelAuto))},Ba=(_,te=!1)=>{if(q(_.value)||!_.current&&e.hideOffsetDates)return t("invalid-date",_.value);if(i.value=JSON.parse(JSON.stringify(_)),!Y.value.enabled)return de(_);zn(m.hours)&&zn(m.minutes)&&!U.value.enabled&&(na(_,te),wa())},Na=(_,te)=>{var O;y(_,te.month,te.year,!0),h.value.count&&!h.value.solo&&fe(_),t("update-month-year",{instance:_,month:te.month,year:te.year}),n(h.value.solo?_:void 0);const ee=(O=e.flow)!=null&&O.length?e.flow[e.flowStep]:void 0;!te.fromNav&&(ee===Xe.month||ee===Xe.year)&&a()},La=(_,te)=>{Or({value:_,modelValue:c,range:Y.value.enabled,timezone:te?void 0:S.value.timezone}),H(),e.multiCalendars&&it().then(()=>b(!0))},Ha=()=>{const _=wn(Q(),S.value);Y.value.enabled?c.value&&Array.isArray(c.value)&&c.value[0]?c.value=Ie(_,c.value[0])?[_,c.value[0]]:[c.value[0],_]:c.value=[_]:c.value=_,H()},Va=()=>{if(Array.isArray(c.value))if(U.value.enabled){const _=Fa();c.value[c.value.length-1]=ne(_)}else c.value=c.value.map((_,te)=>_&&ne(_,te));else c.value=ne(c.value);t("time-update")},Fa=()=>Array.isArray(c.value)&&c.value.length?c.value[c.value.length-1]:null;return{calendars:C,modelValue:c,month:pe,year:g,time:m,disabledTimesConfig:ce,today:v,validateTime:ie,getCalendarDays:X,getMarker:J,handleScroll:K,handleSwipe:L,handleArrow:s,selectDate:Ba,updateMonthYear:Na,presetDate:La,selectCurrentDate:Ha,updateTime:(_,te=!0,O=!1)=>{B(_,te,O,Va)},assignMonthAndYear:V}},bs={key:0},ws=ze({__name:"DatePicker",props:{...yt},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(e,{expose:t,emit:n}){const a=n,r=e,{calendars:l,month:i,year:p,modelValue:c,time:C,disabledTimesConfig:m,today:v,validateTime:h,getCalendarDays:k,getMarker:Y,handleArrow:f,handleScroll:S,handleSwipe:I,selectDate:U,updateMonthYear:A,presetDate:q,selectCurrentDate:ae,updateTime:E,assignMonthAndYear:B}=gs(r,a,oe,V),ne=qt(),{setHoverDate:F,getDayClassData:N,clearHoverDate:ie}=Is(c,r),{defaultedMultiCalendars:ce}=Se(r),pe=Z([]),g=Z([]),D=Z(null),y=lt(ne,"calendar"),H=lt(ne,"monthYear"),re=lt(ne,"timePicker"),R=K=>{r.shadow||a("mount",K)};ct(l,()=>{r.shadow||setTimeout(()=>{a("recalculate-position")},0)},{deep:!0}),ct(ce,(K,s)=>{K.count-s.count>0&&B()},{deep:!0});const b=G(()=>K=>k(i.value(K),p.value(K)).map(s=>({...s,days:s.days.map(L=>(L.marker=Y(L),L.classData=N(L),L))})));function oe(K){var s;K||K===0?(s=g.value[K])==null||s.triggerTransition(i.value(K),p.value(K)):g.value.forEach((L,J)=>L.triggerTransition(i.value(J),p.value(J)))}function V(){a("update-flow-step")}const M=(K,s=!1)=>{U(K,s),r.spaceConfirm&&a("select-date")},o=(K,s,L=0)=>{var J;(J=pe.value[L])==null||J.toggleMonthPicker(K,s)},w=(K,s,L=0)=>{var J;(J=pe.value[L])==null||J.toggleYearPicker(K,s)},z=(K,s,L)=>{var J;(J=D.value)==null||J.toggleTimePicker(K,s,L)},u=(K,s)=>{var L;if(!r.range){const J=c.value?c.value:v,$=s?new Date(s):J,ge=K?ht($,{weekStartsOn:1}):ar($,{weekStartsOn:1});U({value:ge,current:xe($)===i.value(0),text:"",classData:{}}),(L=document.getElementById(Pr(ge)))==null||L.focus()}},le=K=>{var s;(s=pe.value[0])==null||s.handleMonthYearChange(K,!0)},fe=K=>{A(0,{month:i.value(0),year:p.value(0)+(K?1:-1),fromNav:!0})},Ve=(K,s)=>{K===Xe.time&&a(`time-picker-${s?"open":"close"}`),a("overlay-toggle",{open:s,overlay:K})},T=K=>{a("overlay-toggle",{open:!1,overlay:K}),a("focus-menu")};return t({clearHoverDate:ie,presetDate:q,selectCurrentDate:ae,toggleMonthPicker:o,toggleYearPicker:w,toggleTimePicker:z,handleArrow:f,updateMonthYear:A,getSidebarProps:()=>({modelValue:c,month:i,year:p,time:C,updateTime:E,updateMonthYear:A,selectDate:U,presetDate:q}),changeMonth:le,changeYear:fe,selectWeekDate:u}),(K,s)=>(P(),W(we,null,[ot(Sa,{"multi-calendars":d(ce).count,collapse:K.collapse},{default:_e(({instance:L,index:J})=>[K.disableMonthYearSelect?j("",!0):(P(),De(ds,Qe({key:0,ref:$=>{$&&(pe.value[J]=$)},months:d(hr)(K.formatLocale,K.locale,K.monthNameFormat),years:d(_n)(K.yearRange,K.locale,K.reverseYears),month:d(i)(L),year:d(p)(L),instance:L},K.$props,{onMount:s[0]||(s[0]=$=>R(d(Vt).header)),onResetFlow:s[1]||(s[1]=$=>K.$emit("reset-flow")),onUpdateMonthYear:$=>d(A)(L,$),onOverlayClosed:T,onOverlayOpened:s[2]||(s[2]=$=>K.$emit("overlay-toggle",{open:!0,overlay:$}))}),je({_:2},[Ye(d(H),($,ge)=>({name:$,fn:_e(x=>[ue(K.$slots,$,We(at(x)))])}))]),1040,["months","years","month","year","instance","onUpdateMonthYear"])),ot(ys,Qe({ref:$=>{$&&(g.value[J]=$)},"mapped-dates":b.value(L),month:d(i)(L),year:d(p)(L),instance:L},K.$props,{onSelectDate:$=>d(U)($,L!==1),onHandleSpace:$=>M($,L!==1),onSetHoverDate:s[3]||(s[3]=$=>d(F)($)),onHandleScroll:$=>d(S)($,L),onHandleSwipe:$=>d(I)($,L),onMount:s[4]||(s[4]=$=>R(d(Vt).calendar)),onResetFlow:s[5]||(s[5]=$=>K.$emit("reset-flow")),onTooltipOpen:s[6]||(s[6]=$=>K.$emit("tooltip-open",$)),onTooltipClose:s[7]||(s[7]=$=>K.$emit("tooltip-close",$))}),je({_:2},[Ye(d(y),($,ge)=>({name:$,fn:_e(x=>[ue(K.$slots,$,We(at({...x})))])}))]),1040,["mapped-dates","month","year","instance","onSelectDate","onHandleSpace","onHandleScroll","onHandleSwipe"])]),_:3},8,["multi-calendars","collapse"]),K.enableTimePicker?(P(),W("div",bs,[K.$slots["time-picker"]?ue(K.$slots,"time-picker",We(Qe({key:0},{time:d(C),updateTime:d(E)}))):(P(),De(Sr,Qe({key:1,ref_key:"timePickerRef",ref:D},K.$props,{hours:d(C).hours,minutes:d(C).minutes,seconds:d(C).seconds,"internal-model-value":K.internalModelValue,"disabled-times-config":d(m),"validate-time":d(h),onMount:s[8]||(s[8]=L=>R(d(Vt).timePicker)),"onUpdate:hours":s[9]||(s[9]=L=>d(E)(L)),"onUpdate:minutes":s[10]||(s[10]=L=>d(E)(L,!1)),"onUpdate:seconds":s[11]||(s[11]=L=>d(E)(L,!1,!0)),onResetFlow:s[12]||(s[12]=L=>K.$emit("reset-flow")),onOverlayClosed:s[13]||(s[13]=L=>Ve(L,!1)),onOverlayOpened:s[14]||(s[14]=L=>Ve(L,!0)),onAmPmChange:s[15]||(s[15]=L=>K.$emit("am-pm-change",L))}),je({_:2},[Ye(d(re),(L,J)=>({name:L,fn:_e($=>[ue(K.$slots,L,We(at($)))])}))]),1040,["hours","minutes","seconds","internal-model-value","disabled-times-config","validate-time"]))])):j("",!0)],64))}}),_s=(e,t)=>{const n=Z(),{defaultedMultiCalendars:a,defaultedConfig:r,defaultedHighlight:l,defaultedRange:i,propDates:p,defaultedFilters:c,defaultedMultiDates:C}=Se(e),{modelValue:m,year:v,month:h,calendars:k}=ba(e,t),{isDisabled:Y}=Et(e),{selectYear:f,groupedYears:S,showYearPicker:I,isDisabled:U,toggleYearPicker:A,handleYearSelect:q,handleYear:ae}=Yr({modelValue:m,multiCalendars:a,range:i,highlight:l,calendars:k,propDates:p,month:h,year:v,filters:c,props:e,emit:t}),E=(D,y)=>[D,y].map(H=>kt(H,"MMMM",{locale:e.formatLocale})).join("-"),B=G(()=>D=>m.value?Array.isArray(m.value)?m.value.some(y=>Bn(D,y)):Bn(m.value,D):!1),ne=D=>{if(i.value.enabled){if(Array.isArray(m.value)){const y=Me(D,m.value[0])||Me(D,m.value[1]);return $a(m.value,n.value,D)&&!y}return!1}return!1},F=(D,y)=>D.quarter===$n(y)&&D.year===he(y),N=D=>typeof l.value=="function"?l.value({quarter:$n(D),year:he(D)}):!!l.value.quarters.find(y=>F(y,D)),ie=G(()=>D=>{const y=Ce(new Date,{year:v.value(D)});return el({start:ma(y),end:tr(y)}).map(H=>{const re=Ht(H),R=Yn(H),b=Y(H),oe=ne(re),V=N(re);return{text:E(re,R),value:re,active:B.value(re),highlighted:V,disabled:b,isBetween:oe}})}),ce=D=>{Dn(D,m,C.value.limit),t("auto-apply",!0)},pe=D=>{m.value=Tn(m,D,t),Ra(m.value,t,e.autoApply,e.modelAuto)},g=D=>{m.value=D,t("auto-apply")};return{defaultedConfig:r,defaultedMultiCalendars:a,groupedYears:S,year:v,isDisabled:U,quarters:ie,showYearPicker:I,modelValue:m,setHoverDate:D=>{n.value=D},selectYear:f,selectQuarter:(D,y,H)=>{if(!H)return k.value[y].month=xe(Yn(D)),C.value.enabled?ce(D):i.value.enabled?pe(D):g(D)},toggleYearPicker:A,handleYearSelect:q,handleYear:ae}},ks={class:"dp--quarter-items"},xs=["data-test","disabled","onClick","onMouseover"],Ms=ze({compatConfig:{MODE:3},__name:"QuarterPicker",props:{...yt},emits:["update:internal-model-value","reset-flow","overlay-closed","auto-apply","range-start","range-end","overlay-toggle","update-month-year"],setup(e,{expose:t,emit:n}){const a=n,r=e,l=qt(),i=lt(l,"yearMode"),{defaultedMultiCalendars:p,defaultedConfig:c,groupedYears:C,year:m,isDisabled:v,quarters:h,modelValue:k,showYearPicker:Y,setHoverDate:f,selectQuarter:S,toggleYearPicker:I,handleYearSelect:U,handleYear:A}=_s(r,a);return t({getSidebarProps:()=>({modelValue:k,year:m,selectQuarter:S,handleYearSelect:U,handleYear:A})}),(q,ae)=>(P(),De(Sa,{"multi-calendars":d(p).count,collapse:q.collapse,stretch:""},{default:_e(({instance:E})=>[ye("div",{class:"dp-quarter-picker-wrap",style:dt({minHeight:`${d(c).modeHeight}px`})},[q.$slots["top-extra"]?ue(q.$slots,"top-extra",{key:0,value:q.internalModelValue}):j("",!0),ye("div",null,[ot(Cr,Qe(q.$props,{items:d(C)(E),instance:E,"show-year-picker":d(Y)[E],year:d(m)(E),"is-disabled":B=>d(v)(E,B),onHandleYear:B=>d(A)(E,B),onYearSelect:B=>d(U)(B,E),onToggleYearPicker:B=>d(I)(E,B?.flow,B?.show)}),je({_:2},[Ye(d(i),(B,ne)=>({name:B,fn:_e(F=>[ue(q.$slots,B,We(at(F)))])}))]),1040,["items","instance","show-year-picker","year","is-disabled","onHandleYear","onYearSelect","onToggleYearPicker"])]),ye("div",ks,[(P(!0),W(we,null,Ye(d(h)(E),(B,ne)=>(P(),W("div",{key:ne},[ye("button",{type:"button",class:ke(["dp--qr-btn",{"dp--qr-btn-active":B.active,"dp--qr-btn-between":B.isBetween,"dp--qr-btn-disabled":B.disabled,"dp--highlighted":B.highlighted}]),"data-test":B.value,disabled:B.disabled,onClick:F=>d(S)(B.value,E,B.disabled),onMouseover:F=>d(f)(B.value)},[q.$slots.quarter?ue(q.$slots,"quarter",{key:0,value:B.value,text:B.text}):(P(),W(we,{key:1},[Dt(Ge(B.text),1)],64))],42,xs)]))),128))])],4)]),_:3},8,["multi-calendars","collapse"]))}}),Ds=["id","tabindex","role","aria-label"],Ts={key:0,class:"dp--menu-load-container"},Ps={key:1,class:"dp--menu-header"},As={key:0,class:"dp__sidebar_left"},Cs=["data-test","onClick","onKeydown"],Os={key:2,class:"dp__sidebar_right"},$s={key:3,class:"dp__action_extra"},Un=ze({compatConfig:{MODE:3},__name:"DatepickerMenu",props:{...Ya,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(e,{expose:t,emit:n}){const a=n,r=e,l=Z(null),i=G(()=>{const{openOnTop:x,...X}=r;return{...X,flowStep:F.value,collapse:r.collapse,noOverlayFocus:r.noOverlayFocus,menuWrapRef:l.value}}),{setMenuFocused:p,setShiftKey:c,control:C}=Ar(),m=qt(),{defaultedTextInput:v,defaultedInline:h,defaultedConfig:k,defaultedUI:Y}=Se(r),f=Z(null),S=Z(0),I=Z(null),U=Z(!1),A=Z(null);Ke(()=>{if(!r.shadow){U.value=!0,q(),window.addEventListener("resize",q);const x=Fe(l);if(x&&!v.value.enabled&&!h.value.enabled&&(p(!0),y()),x){const X=de=>{k.value.allowPreventDefault&&de.preventDefault(),Yt(de,k.value,!0)};x.addEventListener("pointerdown",X),x.addEventListener("mousedown",X)}}}),Ca(()=>{window.removeEventListener("resize",q)});const q=()=>{const x=Fe(I);x&&(S.value=x.getBoundingClientRect().width)},{arrowRight:ae,arrowLeft:E,arrowDown:B,arrowUp:ne}=It(),{flowStep:F,updateFlowStep:N,childMount:ie,resetFlow:ce,handleFlow:pe}=Es(r,a,A),g=G(()=>r.monthPicker?qi:r.yearPicker?Qi:r.timePicker?rs:r.quarterPicker?Ms:ws),D=G(()=>{var x;if(k.value.arrowLeft)return k.value.arrowLeft;const X=(x=l.value)==null?void 0:x.getBoundingClientRect(),de=r.getInputRect();return de?.width=(X?.right??0)&&de?.width{const x=Fe(l);x&&x.focus({preventScroll:!0})},H=G(()=>{var x;return((x=A.value)==null?void 0:x.getSidebarProps())||{}}),re=()=>{r.openOnTop&&a("recalculate-position")},R=lt(m,"action"),b=G(()=>r.monthPicker||r.yearPicker?lt(m,"monthYear"):r.timePicker?lt(m,"timePicker"):lt(m,"shared")),oe=G(()=>r.openOnTop?"dp__arrow_bottom":"dp__arrow_top"),V=G(()=>({dp__menu_disabled:r.disabled,dp__menu_readonly:r.readonly,"dp-menu-loading":r.loading})),M=G(()=>({dp__menu:!0,dp__menu_index:!h.value.enabled,dp__relative:h.value.enabled,...Y.value.menu??{}})),o=x=>{Yt(x,k.value,!0)},w=()=>{r.escClose&&a("close-picker")},z=x=>{if(r.arrowNavigation){if(x===Ze.up)return ne();if(x===Ze.down)return B();if(x===Ze.left)return E();if(x===Ze.right)return ae()}else x===Ze.left||x===Ze.up?T("handleArrow",Ze.left,0,x===Ze.up):T("handleArrow",Ze.right,0,x===Ze.down)},u=x=>{c(x.shiftKey),!r.disableMonthYearSelect&&x.code===$e.tab&&x.target.classList.contains("dp__menu")&&C.value.shiftKeyInMenu&&(x.preventDefault(),Yt(x,k.value,!0),a("close-picker"))},le=()=>{y(),a("time-picker-close")},fe=x=>{var X,de,be;(X=A.value)==null||X.toggleTimePicker(!1,!1),(de=A.value)==null||de.toggleMonthPicker(!1,!1,x),(be=A.value)==null||be.toggleYearPicker(!1,!1,x)},Ve=(x,X=0)=>{var de,be,st;return x==="month"?(de=A.value)==null?void 0:de.toggleMonthPicker(!1,!0,X):x==="year"?(be=A.value)==null?void 0:be.toggleYearPicker(!1,!0,X):x==="time"?(st=A.value)==null?void 0:st.toggleTimePicker(!0,!1):fe(X)},T=(x,...X)=>{var de,be;(de=A.value)!=null&&de[x]&&((be=A.value)==null||be[x](...X))},K=()=>{T("selectCurrentDate")},s=(x,X)=>{T("presetDate",x,X)},L=()=>{T("clearHoverDate")},J=(x,X)=>{T("updateMonthYear",x,X)},$=(x,X)=>{x.preventDefault(),z(X)},ge=x=>{var X,de,be;if(u(x),x.key===$e.home||x.key===$e.end)return T("selectWeekDate",x.key===$e.home,x.target.getAttribute("id"));switch((x.key===$e.pageUp||x.key===$e.pageDown)&&(x.shiftKey?(T("changeYear",x.key===$e.pageUp),(X=on(l.value,"overlay-year"))==null||X.focus()):(T("changeMonth",x.key===$e.pageUp),(de=on(l.value,x.key===$e.pageUp?"action-prev":"action-next"))==null||de.focus()),x.target.getAttribute("id")&&((be=l.value)==null||be.focus({preventScroll:!0}))),x.key){case $e.esc:return w();case $e.arrowLeft:return $(x,Ze.left);case $e.arrowRight:return $(x,Ze.right);case $e.arrowUp:return $(x,Ze.up);case $e.arrowDown:return $(x,Ze.down);default:return}};return t({updateMonthYear:J,switchView:Ve,handleFlow:pe}),(x,X)=>{var de,be,st;return P(),W("div",{id:x.uid?`dp-menu-${x.uid}`:void 0,ref_key:"dpMenuRef",ref:l,tabindex:d(h).enabled?void 0:"0",role:d(h).enabled?void 0:"dialog","aria-label":(de=x.ariaLabels)==null?void 0:de.menu,class:ke(M.value),style:dt({"--dp-arrow-left":D.value}),onMouseleave:L,onClick:o,onKeydown:ge},[(x.disabled||x.readonly)&&d(h).enabled||x.loading?(P(),W("div",{key:0,class:ke(V.value)},[x.loading?(P(),W("div",Ts,X[19]||(X[19]=[ye("span",{class:"dp--menu-loader"},null,-1)]))):j("",!0)],2)):j("",!0),x.$slots["menu-header"]?(P(),W("div",Ps,[ue(x.$slots,"menu-header")])):j("",!0),!d(h).enabled&&!x.teleportCenter?(P(),W("div",{key:2,class:ke(oe.value)},null,2)):j("",!0),ye("div",{ref_key:"innerMenuRef",ref:I,class:ke({dp__menu_content_wrapper:((be=x.presetDates)==null?void 0:be.length)||!!x.$slots["left-sidebar"]||!!x.$slots["right-sidebar"],"dp--menu-content-wrapper-collapsed":e.collapse&&(((st=x.presetDates)==null?void 0:st.length)||!!x.$slots["left-sidebar"]||!!x.$slots["right-sidebar"])}),style:dt({"--dp-menu-width":`${S.value}px`})},[x.$slots["left-sidebar"]?(P(),W("div",As,[ue(x.$slots,"left-sidebar",We(at(H.value)))])):j("",!0),x.presetDates.length?(P(),W("div",{key:1,class:ke({"dp--preset-dates-collapsed":e.collapse,"dp--preset-dates":!0})},[(P(!0),W(we,null,Ye(x.presetDates,(me,Pt)=>(P(),W(we,{key:Pt},[me.slot?ue(x.$slots,me.slot,{key:0,presetDate:s,label:me.label,value:me.value}):(P(),W("button",{key:1,type:"button",style:dt(me.style||{}),class:ke(["dp__btn dp--preset-range",{"dp--preset-range-collapsed":e.collapse}]),"data-test":me.testId??void 0,onClick:va(gt=>s(me.value,me.noTz),["prevent"]),onKeydown:gt=>d(et)(gt,()=>s(me.value,me.noTz),!0)},Ge(me.label),47,Cs))],64))),128))],2)):j("",!0),ye("div",{ref_key:"calendarWrapperRef",ref:f,class:"dp__instance_calendar",role:"document"},[(P(),De(Oa(g.value),Qe({ref_key:"dynCmpRef",ref:A},i.value,{"flow-step":d(F),onMount:d(ie),onUpdateFlowStep:d(N),onResetFlow:d(ce),onFocusMenu:y,onSelectDate:X[0]||(X[0]=me=>x.$emit("select-date")),onDateUpdate:X[1]||(X[1]=me=>x.$emit("date-update",me)),onTooltipOpen:X[2]||(X[2]=me=>x.$emit("tooltip-open",me)),onTooltipClose:X[3]||(X[3]=me=>x.$emit("tooltip-close",me)),onAutoApply:X[4]||(X[4]=me=>x.$emit("auto-apply",me)),onRangeStart:X[5]||(X[5]=me=>x.$emit("range-start",me)),onRangeEnd:X[6]||(X[6]=me=>x.$emit("range-end",me)),onInvalidFixedRange:X[7]||(X[7]=me=>x.$emit("invalid-fixed-range",me)),onTimeUpdate:X[8]||(X[8]=me=>x.$emit("time-update")),onAmPmChange:X[9]||(X[9]=me=>x.$emit("am-pm-change",me)),onTimePickerOpen:X[10]||(X[10]=me=>x.$emit("time-picker-open",me)),onTimePickerClose:le,onRecalculatePosition:re,onUpdateMonthYear:X[11]||(X[11]=me=>x.$emit("update-month-year",me)),onAutoApplyInvalid:X[12]||(X[12]=me=>x.$emit("auto-apply-invalid",me)),onInvalidDate:X[13]||(X[13]=me=>x.$emit("invalid-date",me)),onOverlayToggle:X[14]||(X[14]=me=>x.$emit("overlay-toggle",me)),"onUpdate:internalModelValue":X[15]||(X[15]=me=>x.$emit("update:internal-model-value",me))}),je({_:2},[Ye(b.value,(me,Pt)=>({name:me,fn:_e(gt=>[ue(x.$slots,me,We(at({...gt})))])}))]),1040,["flow-step","onMount","onUpdateFlowStep","onResetFlow"]))],512),x.$slots["right-sidebar"]?(P(),W("div",Os,[ue(x.$slots,"right-sidebar",We(at(H.value)))])):j("",!0),x.$slots["action-extra"]?(P(),W("div",$s,[x.$slots["action-extra"]?ue(x.$slots,"action-extra",{key:0,selectCurrentDate:K}):j("",!0)])):j("",!0)],6),!x.autoApply||d(k).keepActionRow?(P(),De(Ii,Qe({key:3,"menu-mount":U.value},i.value,{"calendar-width":S.value,onClosePicker:X[16]||(X[16]=me=>x.$emit("close-picker")),onSelectDate:X[17]||(X[17]=me=>x.$emit("select-date")),onInvalidSelect:X[18]||(X[18]=me=>x.$emit("invalid-select")),onSelectNow:K}),je({_:2},[Ye(d(R),(me,Pt)=>({name:me,fn:_e(gt=>[ue(x.$slots,me,We(at({...gt})))])}))]),1040,["menu-mount","calendar-width"])):j("",!0)],46,Ds)}}});var Ut=(e=>(e.center="center",e.left="left",e.right="right",e))(Ut||{});const Ys=({menuRef:e,menuRefInner:t,inputRef:n,pickerWrapperRef:a,inline:r,emit:l,props:i,slots:p})=>{const{defaultedConfig:c}=Se(i),C=Z({}),m=Z(!1),v=Z({top:"0",left:"0"}),h=Z(!1),k=ca(i,"teleportCenter");ct(k,()=>{v.value=JSON.parse(JSON.stringify({})),ae()});const Y=y=>{if(i.teleport){const H=y.getBoundingClientRect();return{left:H.left+window.scrollX,top:H.top+window.scrollY}}return{top:0,left:0}},f=(y,H)=>{v.value.left=`${y+H-C.value.width}px`},S=y=>{v.value.left=`${y}px`},I=(y,H)=>{i.position===Ut.left&&S(y),i.position===Ut.right&&f(y,H),i.position===Ut.center&&(v.value.left=`${y+H/2-C.value.width/2}px`)},U=y=>{const{width:H,height:re}=y.getBoundingClientRect(),{top:R,left:b}=i.altPosition?i.altPosition(y):Y(y);return{top:+R,left:+b,width:H,height:re}},A=()=>{v.value.left="50%",v.value.top="50%",v.value.transform="translate(-50%, -50%)",v.value.position="fixed",delete v.value.opacity},q=()=>{const y=Fe(n),{top:H,left:re,transform:R}=i.altPosition(y);v.value={top:`${H}px`,left:`${re}px`,transform:R??""}},ae=(y=!0)=>{var H;if(!r.value.enabled){if(k.value)return A();if(i.altPosition!==null)return q();if(y){const re=i.teleport?(H=t.value)==null?void 0:H.$el:e.value;re&&(C.value=re.getBoundingClientRect()),l("recalculate-position")}return ce()}},E=({inputEl:y,left:H,width:re})=>{window.screen.width>768&&!m.value&&I(H,re),F(y)},B=y=>{const{top:H,left:re,height:R,width:b}=U(y);v.value.top=`${R+H+ +i.offset}px`,h.value=!1,m.value||(v.value.left=`${re+b/2-C.value.width/2}px`),E({inputEl:y,left:re,width:b})},ne=y=>{const{top:H,left:re,width:R}=U(y);v.value.top=`${H-+i.offset-C.value.height}px`,h.value=!0,E({inputEl:y,left:re,width:R})},F=y=>{if(i.autoPosition){const{left:H,width:re}=U(y),{left:R,right:b}=C.value;if(!m.value){if(Math.abs(R)!==Math.abs(b)){if(R<=0)return m.value=!0,S(H);if(b>=document.documentElement.clientWidth)return m.value=!0,f(H,re)}return I(H,re)}}},N=()=>{const y=Fe(n);if(y){const{height:H}=C.value,{top:re,height:R}=y.getBoundingClientRect(),b=window.innerHeight-re-R,oe=re;return H<=b?Lt.bottom:H>b&&H<=oe?Lt.top:b>=oe?Lt.bottom:Lt.top}return Lt.bottom},ie=y=>N()===Lt.bottom?B(y):ne(y),ce=()=>{const y=Fe(n);if(y)return i.autoPosition?ie(y):B(y)},pe=function(y){if(y){const H=y.scrollHeight>y.clientHeight,re=window.getComputedStyle(y).overflowY.indexOf("hidden")!==-1;return H&&!re}return!0},g=function(y){return!y||y===document.body||y.nodeType===Node.DOCUMENT_FRAGMENT_NODE?window:pe(y)?y:g(y.assignedSlot&&c.value.shadowDom?y.assignedSlot.parentNode:y.parentNode)},D=y=>{if(y)switch(i.position){case Ut.left:return{left:0,transform:"translateX(0)"};case Ut.right:return{left:`${y.width}px`,transform:"translateX(-100%)"};default:return{left:`${y.width/2}px`,transform:"translateX(-50%)"}}return{}};return{openOnTop:h,menuStyle:v,xCorrect:m,setMenuPosition:ae,getScrollableParent:g,shadowRender:(y,H)=>{var re,R,b;const oe=document.createElement("div"),V=(re=Fe(n))==null?void 0:re.getBoundingClientRect();oe.setAttribute("id","dp--temp-container");const M=(R=a.value)!=null&&R.clientWidth?a.value:document.body;M.append(oe);const o=D(V),w=c.value.shadowDom?Object.keys(p).filter(u=>["right-sidebar","left-sidebar","top-extra","action-extra"].includes(u)):Object.keys(p),z=Nr(y,{...H,shadow:!0,style:{opacity:0,position:"absolute",...o}},Object.fromEntries(w.map(u=>[u,p[u]])));An(z,oe),C.value=(b=z.el)==null?void 0:b.getBoundingClientRect(),An(null,oe),M.removeChild(oe)}}},Ot=[{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"]}],Ss=[{name:"trigger"},{name:"input-icon"},{name:"clear-icon"},{name:"dp-input"}],Rs={all:()=>Ot,monthYear:()=>Ot.filter(e=>e.use.includes("month-year")),input:()=>Ss,timePicker:()=>Ot.filter(e=>e.use.includes("time")),action:()=>Ot.filter(e=>e.use.includes("action")),calendar:()=>Ot.filter(e=>e.use.includes("calendar")),menu:()=>Ot.filter(e=>e.use.includes("menu")),shared:()=>Ot.filter(e=>e.use.includes("shared")),yearMode:()=>Ot.filter(e=>e.use.includes("year-mode"))},lt=(e,t,n)=>{const a=[];return Rs[t]().forEach(r=>{e[r.name]&&a.push(r.name)}),n!=null&&n.length&&n.forEach(r=>{r.slot&&a.push(r.slot)}),a},ga=e=>{const t=G(()=>a=>e.value?a?e.value.open:e.value.close:""),n=G(()=>a=>e.value?a?e.value.menuAppearTop:e.value.menuAppearBottom:"");return{transitionName:t,showTransition:!!e.value,menuTransition:n}},ba=(e,t,n)=>{const{defaultedRange:a,defaultedTz:r}=Se(e),l=Q(nt(Q(),r.value.timezone)),i=Z([{month:xe(l),year:he(l)}]),p=h=>{const k={hours:Tt(l),minutes:Rt(l),seconds:0};return a.value.enabled?[k[h],k[h]]:k[h]},c=ha({hours:p("hours"),minutes:p("minutes"),seconds:p("seconds")});ct(a,(h,k)=>{h.enabled!==k.enabled&&(c.hours=p("hours"),c.minutes=p("minutes"),c.seconds=p("seconds"))},{deep:!0});const C=G({get:()=>e.internalModelValue,set:h=>{!e.readonly&&!e.disabled&&t("update:internal-model-value",h)}}),m=G(()=>h=>i.value[h]?i.value[h].month:0),v=G(()=>h=>i.value[h]?i.value[h].year:0);return ct(C,(h,k)=>{n&&JSON.stringify(h??{})!==JSON.stringify(k??{})&&n()},{deep:!0}),{calendars:i,time:c,modelValue:C,month:m,year:v,today:l}},Is=(e,t)=>{const{defaultedMultiCalendars:n,defaultedMultiDates:a,defaultedUI:r,defaultedHighlight:l,defaultedTz:i,propDates:p,defaultedRange:c}=Se(t),{isDisabled:C}=Et(t),m=Z(null),v=Z(nt(new Date,i.value.timezone)),h=o=>{!o.current&&t.hideOffsetDates||(m.value=o.value)},k=()=>{m.value=null},Y=o=>Array.isArray(e.value)&&c.value.enabled&&e.value[0]&&m.value?o?Ne(m.value,e.value[0]):Ie(m.value,e.value[0]):!0,f=(o,w)=>{const z=()=>e.value?w?e.value[0]||null:e.value[1]:null,u=e.value&&Array.isArray(e.value)?z():null;return Me(Q(o.value),u)},S=o=>{const w=Array.isArray(e.value)?e.value[0]:null;return o?!Ie(m.value??null,w):!0},I=(o,w=!0)=>(c.value.enabled||t.weekPicker)&&Array.isArray(e.value)&&e.value.length===2?t.hideOffsetDates&&!o.current?!1:Me(Q(o.value),e.value[w?0:1]):c.value.enabled?f(o,w)&&S(w)||Me(o.value,Array.isArray(e.value)?e.value[0]:null)&&Y(w):!1,U=(o,w)=>{if(Array.isArray(e.value)&&e.value[0]&&e.value.length===1){const z=Me(o.value,m.value);return w?Ne(e.value[0],o.value)&&z:Ie(e.value[0],o.value)&&z}return!1},A=o=>!e.value||t.hideOffsetDates&&!o.current?!1:c.value.enabled?t.modelAuto&&Array.isArray(e.value)?Me(o.value,e.value[0]?e.value[0]:v.value):!1:a.value.enabled&&Array.isArray(e.value)?e.value.some(w=>Me(w,o.value)):Me(o.value,e.value?e.value:v.value),q=o=>{if(c.value.autoRange||t.weekPicker){if(m.value){if(t.hideOffsetDates&&!o.current)return!1;const w=mt(m.value,+c.value.autoRange),z=xt(Q(m.value),t.weekStart);return t.weekPicker?Me(z[1],Q(o.value)):Me(w,Q(o.value))}return!1}return!1},ae=o=>{if(c.value.autoRange||t.weekPicker){if(m.value){const w=mt(m.value,+c.value.autoRange);if(t.hideOffsetDates&&!o.current)return!1;const z=xt(Q(m.value),t.weekStart);return t.weekPicker?Ne(o.value,z[0])&&Ie(o.value,z[1]):Ne(o.value,m.value)&&Ie(o.value,w)}return!1}return!1},E=o=>{if(c.value.autoRange||t.weekPicker){if(m.value){if(t.hideOffsetDates&&!o.current)return!1;const w=xt(Q(m.value),t.weekStart);return t.weekPicker?Me(w[0],o.value):Me(m.value,o.value)}return!1}return!1},B=o=>$a(e.value,m.value,o.value),ne=()=>t.modelAuto&&Array.isArray(t.internalModelValue)?!!t.internalModelValue[0]:!1,F=()=>t.modelAuto?yr(t.internalModelValue):!0,N=o=>{if(t.weekPicker)return!1;const w=c.value.enabled?!I(o)&&!I(o,!1):!0;return!C(o.value)&&!A(o)&&!(!o.current&&t.hideOffsetDates)&&w},ie=o=>c.value.enabled?t.modelAuto?ne()&&A(o):!1:A(o),ce=o=>l.value?oi(o.value,p.value.highlight):!1,pe=o=>{const w=C(o.value);return w&&(typeof l.value=="function"?!l.value(o.value,w):!l.value.options.highlightDisabled)},g=o=>{var w;return typeof l.value=="function"?l.value(o.value):(w=l.value.weekdays)==null?void 0:w.includes(o.value.getDay())},D=o=>(c.value.enabled||t.weekPicker)&&(!(n.value.count>0)||o.current)&&F()&&!(!o.current&&t.hideOffsetDates)&&!A(o)?B(o):!1,y=o=>{const{isRangeStart:w,isRangeEnd:z}=b(o),u=c.value.enabled?w||z:!1;return{dp__cell_offset:!o.current,dp__pointer:!t.disabled&&!(!o.current&&t.hideOffsetDates)&&!C(o.value),dp__cell_disabled:C(o.value),dp__cell_highlight:!pe(o)&&(ce(o)||g(o))&&!ie(o)&&!u&&!E(o)&&!(D(o)&&t.weekPicker)&&!z,dp__cell_highlight_active:!pe(o)&&(ce(o)||g(o))&&ie(o),dp__today:!t.noToday&&Me(o.value,v.value)&&o.current,"dp--past":Ie(o.value,v.value),"dp--future":Ne(o.value,v.value)}},H=o=>({dp__active_date:ie(o),dp__date_hover:N(o)}),re=o=>{if(e.value&&!Array.isArray(e.value)){const w=xt(e.value,t.weekStart);return{...V(o),dp__range_start:Me(w[0],o.value),dp__range_end:Me(w[1],o.value),dp__range_between_week:Ne(o.value,w[0])&&Ie(o.value,w[1])}}return{...V(o)}},R=o=>{if(e.value&&Array.isArray(e.value)){const w=xt(e.value[0],t.weekStart),z=e.value[1]?xt(e.value[1],t.weekStart):[];return{...V(o),dp__range_start:Me(w[0],o.value)||Me(z[0],o.value),dp__range_end:Me(w[1],o.value)||Me(z[1],o.value),dp__range_between_week:Ne(o.value,w[0])&&Ie(o.value,w[1])||Ne(o.value,z[0])&&Ie(o.value,z[1]),dp__range_between:Ne(o.value,w[1])&&Ie(o.value,z[0])}}return{...V(o)}},b=o=>{const w=n.value.count>0?o.current&&I(o)&&F():I(o)&&F(),z=n.value.count>0?o.current&&I(o,!1)&&F():I(o,!1)&&F();return{isRangeStart:w,isRangeEnd:z}},oe=o=>{const{isRangeStart:w,isRangeEnd:z}=b(o);return{dp__range_start:w,dp__range_end:z,dp__range_between:D(o),dp__date_hover:Me(o.value,m.value)&&!w&&!z&&!t.weekPicker,dp__date_hover_start:U(o,!0),dp__date_hover_end:U(o,!1)}},V=o=>({...oe(o),dp__cell_auto_range:ae(o),dp__cell_auto_range_start:E(o),dp__cell_auto_range_end:q(o)}),M=o=>c.value.enabled?c.value.autoRange?V(o):t.modelAuto?{...H(o),...oe(o)}:t.weekPicker?R(o):oe(o):t.weekPicker?re(o):H(o);return{setHoverDate:h,clearHoverDate:k,getDayClassData:o=>t.hideOffsetDates&&!o.current?{}:{...y(o),...M(o),[t.dayClass?t.dayClass(o.value,t.internalModelValue):""]:!0,...r.value.calendarCell??{}}}},Et=e=>{const{defaultedFilters:t,defaultedRange:n,propDates:a,defaultedMultiDates:r}=Se(e),l=g=>a.value.disabledDates?typeof a.value.disabledDates=="function"?a.value.disabledDates(Q(g)):!!Aa(g,a.value.disabledDates):!1,i=g=>a.value.maxDate?e.yearPicker?he(g)>he(a.value.maxDate):Ne(g,a.value.maxDate):!1,p=g=>a.value.minDate?e.yearPicker?he(g){const D=i(g),y=p(g),H=l(g),re=t.value.months.map(M=>+M).includes(xe(g)),R=e.disabledWeekDays.length?e.disabledWeekDays.some(M=>+M===Ul(g)):!1,b=k(g),oe=he(g),V=oe<+e.yearRange[0]||oe>+e.yearRange[1];return!(D||y||H||re||V||R||b)},C=(g,D)=>Ie(...$t(a.value.minDate,g,D))||Me(...$t(a.value.minDate,g,D)),m=(g,D)=>Ne(...$t(a.value.maxDate,g,D))||Me(...$t(a.value.maxDate,g,D)),v=(g,D,y)=>{let H=!1;return a.value.maxDate&&y&&m(g,D)&&(H=!0),a.value.minDate&&!y&&C(g,D)&&(H=!0),H},h=(g,D,y,H)=>{let re=!1;return H&&(a.value.minDate||a.value.maxDate)?a.value.minDate&&a.value.maxDate?re=v(g,D,y):(a.value.minDate&&C(g,D)||a.value.maxDate&&m(g,D))&&(re=!0):re=!0,re},k=g=>Array.isArray(a.value.allowedDates)&&!a.value.allowedDates.length?!0:a.value.allowedDates?!Aa(g,a.value.allowedDates):!1,Y=g=>!c(g),f=g=>n.value.noDisabledRange?!er({start:g[0],end:g[1]}).some(D=>Y(D)):!0,S=g=>{if(g){const D=he(g);return D>=+e.yearRange[0]&&D<=e.yearRange[1]}return!0},I=(g,D)=>!!(Array.isArray(g)&&g[D]&&(n.value.maxRange||n.value.minRange)&&S(g[D])),U=(g,D,y=0)=>{if(I(D,y)&&S(g)){const H=Jn(g,D[y]),re=kr(D[y],g),R=re.length===1?0:re.filter(oe=>Y(oe)).length,b=Math.abs(H)-(n.value.minMaxRawRange?0:R);if(n.value.minRange&&n.value.maxRange)return b>=+n.value.minRange&&b<=+n.value.maxRange;if(n.value.minRange)return b>=+n.value.minRange;if(n.value.maxRange)return b<=+n.value.maxRange}return!0},A=()=>!e.enableTimePicker||e.monthPicker||e.yearPicker||e.ignoreTimeValidation,q=g=>Array.isArray(g)?[g[0]?Ga(g[0]):null,g[1]?Ga(g[1]):null]:Ga(g),ae=(g,D,y)=>g.find(H=>+H.hours===Tt(D)&&H.minutes==="*"?!0:+H.minutes===Rt(D)&&+H.hours===Tt(D))&&y,E=(g,D,y)=>{const[H,re]=g,[R,b]=D;return!ae(H,R,y)&&!ae(re,b,y)&&y},B=(g,D)=>{const y=Array.isArray(D)?D:[D];return Array.isArray(e.disabledTimes)?Array.isArray(e.disabledTimes[0])?E(e.disabledTimes,y,g):!y.some(H=>ae(e.disabledTimes,H,g)):g},ne=(g,D)=>{const y=Array.isArray(D)?[Ft(D[0]),D[1]?Ft(D[1]):void 0]:Ft(D),H=!e.disabledTimes(y);return g&&H},F=(g,D)=>e.disabledTimes?Array.isArray(e.disabledTimes)?B(D,g):ne(D,g):D,N=g=>{let D=!0;if(!g||A())return!0;const y=!a.value.minDate&&!a.value.maxDate?q(g):g;return(e.maxTime||a.value.maxDate)&&(D=qn(e.maxTime,a.value.maxDate,"max",qe(y),D)),(e.minTime||a.value.minDate)&&(D=qn(e.minTime,a.value.minDate,"min",qe(y),D)),F(g,D)},ie=g=>{if(!e.monthPicker)return!0;let D=!0;const y=Q(pt(g));if(a.value.minDate&&a.value.maxDate){const H=Q(pt(a.value.minDate)),re=Q(pt(a.value.maxDate));return Ne(y,H)&&Ie(y,re)||Me(y,H)||Me(y,re)}if(a.value.minDate){const H=Q(pt(a.value.minDate));D=Ne(y,H)||Me(y,H)}if(a.value.maxDate){const H=Q(pt(a.value.maxDate));D=Ie(y,H)||Me(y,H)}return D},ce=G(()=>g=>!e.enableTimePicker||e.ignoreTimeValidation?!0:N(g)),pe=G(()=>g=>e.monthPicker?Array.isArray(g)&&(n.value.enabled||r.value.enabled)?!g.filter(D=>!ie(D)).length:ie(g):!0);return{isDisabled:Y,validateDate:c,validateMonthYearInRange:h,isDateRangeAllowed:f,checkMinMaxRange:U,isValidTime:N,isTimeValid:ce,isMonthValid:pe}},Ia=()=>{const e=G(()=>(a,r)=>a?.includes(r)),t=G(()=>(a,r)=>a.count?a.solo?!0:r===0:!0),n=G(()=>(a,r)=>a.count?a.solo?!0:r===a.count-1:!0);return{hideNavigationButtons:e,showLeftIcon:t,showRightIcon:n}},Es=(e,t,n)=>{const a=Z(0),r=ha({[Vt.timePicker]:!e.enableTimePicker||e.timePicker||e.monthPicker,[Vt.calendar]:!1,[Vt.header]:!1}),l=G(()=>e.monthPicker||e.timePicker),i=v=>{var h;if((h=e.flow)!=null&&h.length){if(!v&&l.value)return m();r[v]=!0,Object.keys(r).filter(k=>!r[k]).length||m()}},p=()=>{var v,h;(v=e.flow)!=null&&v.length&&a.value!==-1&&(a.value+=1,t("flow-step",a.value),m()),((h=e.flow)==null?void 0:h.length)===a.value&&it().then(()=>c())},c=()=>{a.value=-1},C=(v,h,...k)=>{var Y,f;e.flow[a.value]===v&&n.value&&((f=(Y=n.value)[h])==null||f.call(Y,...k))},m=(v=0)=>{v&&(a.value+=v),C(Xe.month,"toggleMonthPicker",!0),C(Xe.year,"toggleYearPicker",!0),C(Xe.calendar,"toggleTimePicker",!1,!0),C(Xe.time,"toggleTimePicker",!0,!0);const h=e.flow[a.value];(h===Xe.hours||h===Xe.minutes||h===Xe.seconds)&&C(h,"toggleTimePicker",!0,!0,h)};return{childMount:i,updateFlowStep:p,resetFlow:c,handleFlow:m,flowStep:a}},Bs={key:1,class:"dp__input_wrap"},Ns=["id","name","inputmode","placeholder","disabled","readonly","required","value","autocomplete","aria-label","aria-disabled","aria-invalid"],Ls={key:2,class:"dp--clear-btn"},Hs=["aria-label"],Vs=ze({compatConfig:{MODE:3},__name:"DatepickerInput",props:{isMenuOpen:{type:Boolean,default:!1},inputValue:{type:String,default:""},...Ya},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(e,{expose:t,emit:n}){const a=n,r=e,{defaultedTextInput:l,defaultedAriaLabels:i,defaultedInline:p,defaultedConfig:c,defaultedRange:C,defaultedMultiDates:m,defaultedUI:v,getDefaultPattern:h,getDefaultStartTime:k}=Se(r),{checkMinMaxRange:Y}=Et(r),f=Z(),S=Z(null),I=Z(!1),U=Z(!1),A=G(()=>({dp__pointer:!r.disabled&&!r.readonly&&!l.value.enabled,dp__disabled:r.disabled,dp__input_readonly:!l.value.enabled,dp__input:!0,dp__input_icon_pad:!r.hideInputIcon,dp__input_valid:typeof r.state=="boolean"?r.state:!1,dp__input_invalid:typeof r.state=="boolean"?!r.state:!1,dp__input_focus:I.value||r.isMenuOpen,dp__input_reg:!l.value.enabled,...v.value.input??{}})),q=()=>{a("set-input-date",null),r.clearable&&r.autoApply&&(a("set-empty-date"),f.value=null)},ae=b=>{const oe=k();return ii(b,l.value.format??h(),oe??xr({},r.enableSeconds),r.inputValue,U.value,r.formatLocale)},E=b=>{const{rangeSeparator:oe}=l.value,[V,M]=b.split(`${oe}`);if(V){const o=ae(V.trim()),w=M?ae(M.trim()):null;if(Kt(o,w))return;const z=o&&w?[o,w]:[o];Y(w,z,0)&&(f.value=o?z:null)}},B=()=>{U.value=!0},ne=b=>{if(C.value.enabled)E(b);else if(m.value.enabled){const oe=b.split(";");f.value=oe.map(V=>ae(V.trim())).filter(V=>V)}else f.value=ae(b)},F=b=>{var oe;const V=typeof b=="string"?b:(oe=b.target)==null?void 0:oe.value;V!==""?(l.value.openMenu&&!r.isMenuOpen&&a("open"),ne(V),a("set-input-date",f.value)):q(),U.value=!1,a("update:input-value",V),a("text-input",b,f.value)},N=b=>{l.value.enabled?(ne(b.target.value),l.value.enterSubmit&&sn(f.value)&&r.inputValue!==""?(a("set-input-date",f.value,!0),f.value=null):l.value.enterSubmit&&r.inputValue===""&&(f.value=null,a("clear"))):pe(b)},ie=(b,oe)=>{l.value.enabled&&l.value.tabSubmit&&!oe&&ne(b.target.value),l.value.tabSubmit&&sn(f.value)&&r.inputValue!==""?(a("set-input-date",f.value,!0,!0),f.value=null):l.value.tabSubmit&&r.inputValue===""&&(f.value=null,a("clear",!0))},ce=()=>{I.value=!0,a("focus"),it().then(()=>{var b;l.value.enabled&&l.value.selectOnFocus&&((b=S.value)==null||b.select())})},pe=b=>{if(Yt(b,c.value,!0),l.value.enabled&&l.value.openMenu&&!p.value.input){if(l.value.openMenu==="open"&&!r.isMenuOpen)return a("open");if(l.value.openMenu==="toggle")return a("toggle")}else l.value.enabled||a("toggle")},g=()=>{a("real-blur"),I.value=!1,(!r.isMenuOpen||p.value.enabled&&p.value.input)&&a("blur"),r.autoApply&&l.value.enabled&&f.value&&!r.isMenuOpen&&(a("set-input-date",f.value),a("select-date"),f.value=null)},D=b=>{Yt(b,c.value,!0),a("clear")},y=b=>{if(b.key==="Tab"&&ie(b),b.key==="Enter"&&N(b),!l.value.enabled){if(b.code==="Tab")return;b.preventDefault()}},H=()=>{var b;(b=S.value)==null||b.focus({preventScroll:!0})},re=b=>{f.value=b},R=b=>{b.key===$e.tab&&ie(b,!0)};return t({focusInput:H,setParsedDate:re}),(b,oe)=>{var V,M,o;return P(),W("div",{onClick:pe},[b.$slots.trigger&&!b.$slots["dp-input"]&&!d(p).enabled?ue(b.$slots,"trigger",{key:0}):j("",!0),!b.$slots.trigger&&(!d(p).enabled||d(p).input)?(P(),W("div",Bs,[b.$slots["dp-input"]&&!b.$slots.trigger&&(!d(p).enabled||d(p).enabled&&d(p).input)?ue(b.$slots,"dp-input",{key:0,value:e.inputValue,isMenuOpen:e.isMenuOpen,onInput:F,onEnter:N,onTab:ie,onClear:D,onBlur:g,onKeypress:y,onPaste:B,onFocus:ce,openMenu:()=>b.$emit("open"),closeMenu:()=>b.$emit("close"),toggleMenu:()=>b.$emit("toggle")}):j("",!0),b.$slots["dp-input"]?j("",!0):(P(),W("input",{key:1,id:b.uid?`dp-input-${b.uid}`:void 0,ref_key:"inputRef",ref:S,"data-test":"dp-input",name:b.name,class:ke(A.value),inputmode:d(l).enabled?"text":"none",placeholder:b.placeholder,disabled:b.disabled,readonly:b.readonly,required:b.required,value:e.inputValue,autocomplete:b.autocomplete,"aria-label":(V=d(i))==null?void 0:V.input,"aria-disabled":b.disabled||void 0,"aria-invalid":b.state===!1?!0:void 0,onInput:F,onBlur:g,onFocus:ce,onKeypress:y,onKeydown:oe[0]||(oe[0]=w=>y(w)),onPaste:B},null,42,Ns)),ye("div",{onClick:oe[3]||(oe[3]=w=>a("toggle"))},[b.$slots["input-icon"]&&!b.hideInputIcon?(P(),W("span",{key:0,class:"dp__input_icon",onClick:oe[1]||(oe[1]=w=>a("toggle"))},[ue(b.$slots,"input-icon")])):j("",!0),!b.$slots["input-icon"]&&!b.hideInputIcon&&!b.$slots["dp-input"]?(P(),De(d(aa),{key:1,"aria-label":(M=d(i))==null?void 0:M.calendarIcon,class:"dp__input_icon dp__input_icons",onClick:oe[2]||(oe[2]=w=>a("toggle"))},null,8,["aria-label"])):j("",!0)]),b.$slots["clear-icon"]&&e.inputValue&&b.clearable&&!b.disabled&&!b.readonly?(P(),W("span",Ls,[ue(b.$slots,"clear-icon",{clear:D})])):j("",!0),b.clearable&&!b.$slots["clear-icon"]&&e.inputValue&&!b.disabled&&!b.readonly?(P(),W("button",{key:3,"aria-label":(o=d(i))==null?void 0:o.clearInput,class:"dp--clear-btn",type:"button",onKeydown:oe[4]||(oe[4]=w=>d(et)(w,()=>D(w),!0,R)),onClick:oe[5]||(oe[5]=va(w=>D(w),["prevent"]))},[ot(d(fr),{class:"dp__input_icons","data-test":"clear-icon"})],40,Hs)):j("",!0)])):j("",!0)])}}}),Fs=typeof window<"u"?window:void 0,tn=()=>{},qs=e=>Fr()?(qr(e),!0):!1,Ws=(e,t,n,a)=>{if(!e)return tn;let r=tn;const l=ct(()=>d(e),p=>{r(),p&&(p.addEventListener(t,n,a),r=()=>{p.removeEventListener(t,n,a),r=tn})},{immediate:!0,flush:"post"}),i=()=>{l(),r()};return qs(i),i},Qs=(e,t,n,a={})=>{const{window:r=Fs,event:l="pointerdown"}=a;return r?Ws(r,l,i=>{const p=Fe(e),c=Fe(t);!p||!c||p===i.target||i.composedPath().includes(p)||i.composedPath().includes(c)||n(i)},{passive:!0}):void 0},zs=ze({compatConfig:{MODE:3},__name:"VueDatePicker",props:{...Ya},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(e,{expose:t,emit:n}){const a=n,r=e,l=qt(),i=Z(!1),p=ca(r,"modelValue"),c=ca(r,"timezone"),C=Z(null),m=Z(null),v=Z(null),h=Z(!1),k=Z(null),Y=Z(!1),f=Z(!1),S=Z(!1),I=Z(!1),{setMenuFocused:U,setShiftKey:A}=Ar(),{clearArrowNav:q}=It(),{validateDate:ae,isValidTime:E}=Et(r),{defaultedTransitions:B,defaultedTextInput:ne,defaultedInline:F,defaultedConfig:N,defaultedRange:ie,defaultedMultiDates:ce}=Se(r),{menuTransition:pe,showTransition:g}=ga(B);Ke(()=>{w(r.modelValue),it().then(()=>{if(!F.value.enabled){const O=oe(k.value);O?.addEventListener("scroll",J),window?.addEventListener("resize",$)}}),F.value.enabled&&(i.value=!0),window?.addEventListener("keyup",ge),window?.addEventListener("keydown",x)}),Ca(()=>{if(!F.value.enabled){const O=oe(k.value);O?.removeEventListener("scroll",J),window?.removeEventListener("resize",$)}window?.removeEventListener("keyup",ge),window?.removeEventListener("keydown",x)});const D=lt(l,"all",r.presetDates),y=lt(l,"input");ct([p,c],()=>{w(p.value)},{deep:!0});const{openOnTop:H,menuStyle:re,xCorrect:R,setMenuPosition:b,getScrollableParent:oe,shadowRender:V}=Ys({menuRef:C,menuRefInner:m,inputRef:v,pickerWrapperRef:k,inline:F,emit:a,props:r,slots:l}),{inputValue:M,internalModelValue:o,parseExternalModelValue:w,emitModelValue:z,formatInputValue:u,checkBeforeEmit:le}=$i(a,r,h),fe=G(()=>({dp__main:!0,dp__theme_dark:r.dark,dp__theme_light:!r.dark,dp__flex_display:F.value.enabled,"dp--flex-display-collapsed":S.value,dp__flex_display_with_input:F.value.input})),Ve=G(()=>r.dark?"dp__theme_dark":"dp__theme_light"),T=G(()=>r.teleport?{to:typeof r.teleport=="boolean"?"body":r.teleport,disabled:!r.teleport||F.value.enabled}:{}),K=G(()=>({class:"dp__outer_menu_wrap"})),s=G(()=>F.value.enabled&&(r.timePicker||r.monthPicker||r.yearPicker||r.quarterPicker)),L=()=>{var O,ee;return(ee=(O=v.value)==null?void 0:O.$el)==null?void 0:ee.getBoundingClientRect()},J=()=>{i.value&&(N.value.closeOnScroll?rt():b())},$=()=>{var O;i.value&&b();const ee=(O=m.value)==null?void 0:O.$el.getBoundingClientRect().width;S.value=document.body.offsetWidth<=ee},ge=O=>{O.key==="Tab"&&!F.value.enabled&&!r.teleport&&N.value.tabOutClosesMenu&&(k.value.contains(document.activeElement)||rt()),f.value=O.shiftKey},x=O=>{f.value=O.shiftKey},X=()=>{!r.disabled&&!r.readonly&&(V(Un,r),b(!1),i.value=!0,i.value&&a("open"),i.value||na(),w(r.modelValue))},de=()=>{var O;M.value="",na(),(O=v.value)==null||O.setParsedDate(null),a("update:model-value",null),a("update:model-timezone-value",null),a("cleared"),N.value.closeOnClearValue&&rt()},be=()=>{const O=o.value;return!O||!Array.isArray(O)&&ae(O)?!0:Array.isArray(O)?ce.value.enabled||O.length===2&&ae(O[0])&&ae(O[1])?!0:ie.value.partialRange&&!r.timePicker?ae(O[0]):!1:!1},st=()=>{le()&&be()?(z(),rt()):a("invalid-select",o.value)},me=O=>{Pt(),z(),N.value.closeOnAutoApply&&!O&&rt()},Pt=()=>{v.value&&ne.value.enabled&&v.value.setParsedDate(o.value)},gt=(O=!1)=>{r.autoApply&&E(o.value)&&be()&&(ie.value.enabled&&Array.isArray(o.value)?(ie.value.partialRange||o.value.length===2)&&me(O):me(O))},na=()=>{ne.value.enabled||(o.value=null)},rt=()=>{F.value.enabled||(i.value&&(i.value=!1,R.value=!1,U(!1),A(!1),q(),a("closed"),M.value&&w(p.value)),na(),a("blur"))},ra=(O,ee,se=!1)=>{if(!O){o.value=null;return}const Je=Array.isArray(O)?!O.some(Bt=>!ae(Bt)):ae(O),ut=E(O);Je&&ut?(I.value=!0,o.value=O,ee&&(Y.value=se,st(),a("text-submit")),it().then(()=>{I.value=!1})):a("invalid-date",O)},Ea=()=>{r.autoApply&&E(o.value)&&z(),Pt()},wa=()=>i.value?rt():X(),Ba=O=>{o.value=O},Na=()=>{ne.value.enabled&&(h.value=!0,u()),a("focus")},La=()=>{if(ne.value.enabled&&(h.value=!1,w(r.modelValue),Y.value)){const O=li(k.value,f.value);O?.focus()}a("blur")},Ha=O=>{m.value&&m.value.updateMonthYear(0,{month:Ln(O.month),year:Ln(O.year)})},Va=O=>{w(O??r.modelValue)},Fa=(O,ee)=>{var se;(se=m.value)==null||se.switchView(O,ee)},_=O=>N.value.onClickOutside?N.value.onClickOutside(O):rt(),te=(O=0)=>{var ee;(ee=m.value)==null||ee.handleFlow(O)};return Qs(C,v,()=>_(be)),t({closeMenu:rt,selectDate:st,clearValue:de,openMenu:X,onScroll:J,formatInputValue:u,updateInternalModelValue:Ba,setMonthYear:Ha,parseModel:Va,switchView:Fa,toggleMenu:wa,handleFlow:te,dpWrapMenuRef:C}),(O,ee)=>(P(),W("div",{ref_key:"pickerWrapperRef",ref:k,class:ke(fe.value),"data-datepicker-instance":""},[ot(Vs,Qe({ref_key:"inputRef",ref:v,"input-value":d(M),"onUpdate:inputValue":ee[0]||(ee[0]=se=>Pn(M)?M.value=se:null),"is-menu-open":i.value},O.$props,{onClear:de,onOpen:X,onSetInputDate:ra,onSetEmptyDate:d(z),onSelectDate:st,onToggle:wa,onClose:rt,onFocus:Na,onBlur:La,onRealBlur:ee[1]||(ee[1]=se=>h.value=!1),onTextInput:ee[2]||(ee[2]=se=>O.$emit("text-input",se))}),je({_:2},[Ye(d(y),(se,Je)=>({name:se,fn:_e(ut=>[ue(O.$slots,se,We(at(ut)))])}))]),1040,["input-value","is-menu-open","onSetEmptyDate"]),(P(),De(Oa(O.teleport?Br:"div"),We(at(T.value)),{default:_e(()=>[ot(ta,{name:d(pe)(d(H)),css:d(g)&&!d(F).enabled},{default:_e(()=>[i.value?(P(),W("div",Qe({key:0,ref_key:"dpWrapMenuRef",ref:C},K.value,{class:{"dp--menu-wrapper":!d(F).enabled},style:d(F).enabled?void 0:d(re)}),[ot(Un,Qe({ref_key:"dpMenuRef",ref:m},O.$props,{"internal-model-value":d(o),"onUpdate:internalModelValue":ee[3]||(ee[3]=se=>Pn(o)?o.value=se:null),class:{[Ve.value]:!0,"dp--menu-wrapper":O.teleport},"open-on-top":d(H),"no-overlay-focus":s.value,collapse:S.value,"get-input-rect":L,"is-text-input-date":I.value,onClosePicker:rt,onSelectDate:st,onAutoApply:gt,onTimeUpdate:Ea,onFlowStep:ee[4]||(ee[4]=se=>O.$emit("flow-step",se)),onUpdateMonthYear:ee[5]||(ee[5]=se=>O.$emit("update-month-year",se)),onInvalidSelect:ee[6]||(ee[6]=se=>O.$emit("invalid-select",d(o))),onAutoApplyInvalid:ee[7]||(ee[7]=se=>O.$emit("invalid-select",se)),onInvalidFixedRange:ee[8]||(ee[8]=se=>O.$emit("invalid-fixed-range",se)),onRecalculatePosition:d(b),onTooltipOpen:ee[9]||(ee[9]=se=>O.$emit("tooltip-open",se)),onTooltipClose:ee[10]||(ee[10]=se=>O.$emit("tooltip-close",se)),onTimePickerOpen:ee[11]||(ee[11]=se=>O.$emit("time-picker-open",se)),onTimePickerClose:ee[12]||(ee[12]=se=>O.$emit("time-picker-close",se)),onAmPmChange:ee[13]||(ee[13]=se=>O.$emit("am-pm-change",se)),onRangeStart:ee[14]||(ee[14]=se=>O.$emit("range-start",se)),onRangeEnd:ee[15]||(ee[15]=se=>O.$emit("range-end",se)),onDateUpdate:ee[16]||(ee[16]=se=>O.$emit("date-update",se)),onInvalidDate:ee[17]||(ee[17]=se=>O.$emit("invalid-date",se)),onOverlayToggle:ee[18]||(ee[18]=se=>O.$emit("overlay-toggle",se))}),je({_:2},[Ye(d(D),(se,Je)=>({name:se,fn:_e(ut=>[ue(O.$slots,se,We(at({...ut})))])}))]),1040,["internal-model-value","class","open-on-top","no-overlay-focus","collapse","is-text-input-date","onRecalculatePosition"])],16)):j("",!0)]),_:3},8,["name","css"])]),_:3},16))],2))}}),Ir=(()=>{const e=zs;return e.install=t=>{t.component("Vue3DatePicker",e)},e})(),Us=Object.freeze(Object.defineProperty({__proto__:null,default:Ir},Symbol.toStringTag,{value:"Module"}));Object.entries(Us).forEach(([e,t])=>{e!=="default"&&(Ir[e]=t)});export{Ir as V}; diff --git a/src/static/app/src/components/configurationComponents/peerConfigurationFile.vue b/src/static/app/src/components/configurationComponents/peerConfigurationFile.vue index d6ff1a5..f637605 100644 --- a/src/static/app/src/components/configurationComponents/peerConfigurationFile.vue +++ b/src/static/app/src/components/configurationComponents/peerConfigurationFile.vue @@ -65,8 +65,7 @@ const copy = async () => {