From 6315112b3bfb05bf51388f446ac597170acb05b9 Mon Sep 17 00:00:00 2001 From: Donald Zou Date: Fri, 25 Jul 2025 18:06:42 +0800 Subject: [PATCH] Finished send password reset link --- src/dashboard.py | 4 +- src/modules/DashboardClients.py | 5 +- ...ashboardClientAssignmentStore-DpqDqqOP.js} | 2 +- ...rowser-BHoir7AQ.js => browser-Bcujcoof.js} | 2 +- .../app/dist/assets/clientViewer-CR0kolcJ.js | 12 ++++ .../app/dist/assets/clientViewer-CglBXHMI.js | 1 - ...lients-CgB9Uymo.js => clients-BZwEb7jm.js} | 2 +- ...-CwjXQBmc.js => configuration-B1JLlW37.js} | 2 +- ...LVZk6.js => configurationList-DDBigiJ5.js} | 2 +- ....min-H8Pjp0HL.js => dayjs.min-Cdu5c05l.js} | 2 +- ...bDT16.js => editConfiguration-C458Rndf.js} | 2 +- src/static/app/dist/assets/index-1mVjWyYI.js | 1 - .../{index-hZ1DcfGk.js => index-C5CQcTdj.js} | 2 +- src/static/app/dist/assets/index-DdNg86Vj.js | 1 + .../{index-BaGiSoQe.js => index-Upsq31TS.js} | 22 +++---- ...ext-DkjxgEQB.js => localeText-n7rlaTGQ.js} | 2 +- ...essage-DmK834mY.js => message-fHdP79jF.js} | 2 +- ...k_9MbK.js => newConfiguration-Cp_Zzc7o.js} | 2 +- .../{osmap-DImWbvYV.js => osmap-DlPRtGR3.js} | 2 +- ...l-Dbk6LNS2.js => peerAddModal-Emzzfw1d.js} | 2 +- ...oUWwCk3.js => peerAssignModal-5HoPs6IP.js} | 2 +- ...C.js => peerConfigurationFile-D43SrB3i.js} | 2 +- ...rJobs-kZAK-mB1.js => peerJobs-DDiv72oD.js} | 2 +- ...EOmypX.js => peerJobsAllModal-B4Fcsytd.js} | 2 +- ...9QsM-.js => peerJobsLogsModal-YBNe6GAN.js} | 2 +- ...rList-9LlPuiy3.js => peerList-BF1XGsyP.js} | 4 +- ...ode-BiVHr8UY.js => peerQRCode-CgpUOip9.js} | 2 +- ...-3fBKUdTH.js => peerSearchBar-CCwSm3x3.js} | 2 +- ...s-DJBxRPdI.js => peerSettings-BVjjHyUZ.js} | 2 +- ...p_KD.js => peerShareLinkModal-rl2Nl0hw.js} | 2 +- .../{ping-Rj802N48.js => ping-DHdoEsrr.js} | 2 +- ...-fuWULZA8.js => protocolBadge-CWFrznYs.js} | 2 +- ...pb.js => restoreConfiguration-DOUQI3lV.js} | 2 +- ...p6xBo32.js => schedulePeerJob-CKnHZfdd.js} | 2 +- ...rs-CV6q0Qd4.js => selectPeers-C9VF1n58.js} | 2 +- ...tings-cK5pfcdh.js => settings-CkXtGiHe.js} | 2 +- .../{setup-BKjNeIHl.js => setup-BA8-6L-I.js} | 2 +- .../{share-CNIJmGhk.js => share-C108soct.js} | 2 +- ...{signin-L3oMqQIW.js => signin-DCnzrYSP.js} | 2 +- ..._index_0_scoped_9509d7a0_lang-BYo2xYes.js} | 2 +- ...s-DDN6iwt_.js => systemStatus-2BLdvfJq.js} | 2 +- .../{totp-DKJseL4c.js => totp-C8MmYKOe.js} | 2 +- ...ute-CJHxAi5E.js => traceroute-D1D2nqzU.js} | 2 +- .../dist/assets/vue-datepicker-CI9txOl2.js | 1 - .../dist/assets/vue-datepicker-COnDbf6W.js | 1 + src/static/app/dist/index.html | 2 +- .../clientComponents/clientResetPassword.vue | 63 +++++++++++++------ .../clientComponents/clientViewer.vue | 16 +++-- 48 files changed, 124 insertions(+), 79 deletions(-) rename src/static/app/dist/assets/{DashboardClientAssignmentStore-BUoDZ6I5.js => DashboardClientAssignmentStore-DpqDqqOP.js} (95%) rename src/static/app/dist/assets/{browser-BHoir7AQ.js => browser-Bcujcoof.js} (99%) create mode 100644 src/static/app/dist/assets/clientViewer-CR0kolcJ.js delete mode 100644 src/static/app/dist/assets/clientViewer-CglBXHMI.js rename src/static/app/dist/assets/{clients-CgB9Uymo.js => clients-BZwEb7jm.js} (92%) rename src/static/app/dist/assets/{configuration-CwjXQBmc.js => configuration-B1JLlW37.js} (86%) rename src/static/app/dist/assets/{configurationList-zXvLVZk6.js => configurationList-DDBigiJ5.js} (98%) rename src/static/app/dist/assets/{dayjs.min-H8Pjp0HL.js => dayjs.min-Cdu5c05l.js} (99%) rename src/static/app/dist/assets/{editConfiguration-DkzbDT16.js => editConfiguration-C458Rndf.js} (98%) delete mode 100644 src/static/app/dist/assets/index-1mVjWyYI.js rename src/static/app/dist/assets/{index-hZ1DcfGk.js => index-C5CQcTdj.js} (99%) create mode 100644 src/static/app/dist/assets/index-DdNg86Vj.js rename src/static/app/dist/assets/{index-BaGiSoQe.js => index-Upsq31TS.js} (78%) rename src/static/app/dist/assets/{localeText-DkjxgEQB.js => localeText-n7rlaTGQ.js} (76%) rename src/static/app/dist/assets/{message-DmK834mY.js => message-fHdP79jF.js} (84%) rename src/static/app/dist/assets/{newConfiguration-CNk_9MbK.js => newConfiguration-Cp_Zzc7o.js} (99%) rename src/static/app/dist/assets/{osmap-DImWbvYV.js => osmap-DlPRtGR3.js} (99%) rename src/static/app/dist/assets/{peerAddModal-Dbk6LNS2.js => peerAddModal-Emzzfw1d.js} (94%) rename src/static/app/dist/assets/{peerAssignModal-CoUWwCk3.js => peerAssignModal-5HoPs6IP.js} (97%) rename src/static/app/dist/assets/{peerConfigurationFile-HFbRJR3C.js => peerConfigurationFile-D43SrB3i.js} (73%) rename src/static/app/dist/assets/{peerJobs-kZAK-mB1.js => peerJobs-DDiv72oD.js} (90%) rename src/static/app/dist/assets/{peerJobsAllModal-BBEOmypX.js => peerJobsAllModal-B4Fcsytd.js} (90%) rename src/static/app/dist/assets/{peerJobsLogsModal-CUk9QsM-.js => peerJobsLogsModal-YBNe6GAN.js} (96%) rename src/static/app/dist/assets/{peerList-9LlPuiy3.js => peerList-BF1XGsyP.js} (93%) rename src/static/app/dist/assets/{peerQRCode-BiVHr8UY.js => peerQRCode-CgpUOip9.js} (90%) rename src/static/app/dist/assets/{peerSearchBar-3fBKUdTH.js => peerSearchBar-CCwSm3x3.js} (89%) rename src/static/app/dist/assets/{peerSettings-DJBxRPdI.js => peerSettings-BVjjHyUZ.js} (98%) rename src/static/app/dist/assets/{peerShareLinkModal-DDmGp_KD.js => peerShareLinkModal-rl2Nl0hw.js} (98%) rename src/static/app/dist/assets/{ping-Rj802N48.js => ping-DHdoEsrr.js} (97%) rename src/static/app/dist/assets/{protocolBadge-fuWULZA8.js => protocolBadge-CWFrznYs.js} (77%) rename src/static/app/dist/assets/{restoreConfiguration-CB8Vk8pb.js => restoreConfiguration-DOUQI3lV.js} (98%) rename src/static/app/dist/assets/{schedulePeerJob-Bp6xBo32.js => schedulePeerJob-CKnHZfdd.js} (96%) rename src/static/app/dist/assets/{selectPeers-CV6q0Qd4.js => selectPeers-C9VF1n58.js} (87%) rename src/static/app/dist/assets/{settings-cK5pfcdh.js => settings-CkXtGiHe.js} (99%) rename src/static/app/dist/assets/{setup-BKjNeIHl.js => setup-BA8-6L-I.js} (96%) rename src/static/app/dist/assets/{share-CNIJmGhk.js => share-C108soct.js} (86%) rename src/static/app/dist/assets/{signin-L3oMqQIW.js => signin-DCnzrYSP.js} (97%) rename src/static/app/dist/assets/{storageMount.vue_vue_type_style_index_0_scoped_9509d7a0_lang-B4kEtj1e.js => storageMount.vue_vue_type_style_index_0_scoped_9509d7a0_lang-BYo2xYes.js} (93%) rename src/static/app/dist/assets/{systemStatus-DDN6iwt_.js => systemStatus-2BLdvfJq.js} (96%) rename src/static/app/dist/assets/{totp-DKJseL4c.js => totp-C8MmYKOe.js} (94%) rename src/static/app/dist/assets/{traceroute-CJHxAi5E.js => traceroute-D1D2nqzU.js} (96%) delete mode 100644 src/static/app/dist/assets/vue-datepicker-CI9txOl2.js create mode 100644 src/static/app/dist/assets/vue-datepicker-COnDbf6W.js diff --git a/src/dashboard.py b/src/dashboard.py index 8bbd8cb..8addc8a 100644 --- a/src/dashboard.py +++ b/src/dashboard.py @@ -1156,8 +1156,8 @@ def API_Email_Ready(): @app.post(f'{APP_PREFIX}/api/email/send') def API_Email_Send(): data = request.get_json() - if "Receiver" not in data.keys(): - return ResponseObject(False, "Please at least specify receiver") + if "Receiver" not in data.keys() or "Subject" not in data.keys(): + return ResponseObject(False, "Please at least specify receiver and subject") body = data.get('Body', '') download = None if ("ConfigurationName" in data.keys() diff --git a/src/modules/DashboardClients.py b/src/modules/DashboardClients.py index 991d5d1..fd7ee15 100644 --- a/src/modules/DashboardClients.py +++ b/src/modules/DashboardClients.py @@ -346,7 +346,10 @@ class DashboardClients: self.dashboardClientsPasswordResetLinkTable.update().values({ "ExpiryDate": db.func.now() }).where( - self.dashboardClientsPasswordResetLinkTable.c.ClientID == ClientID + db.and_( + self.dashboardClientsPasswordResetLinkTable.c.ClientID == ClientID, + self.dashboardClientsPasswordResetLinkTable.c.ExpiryDate > db.func.now() + ) ) ) conn.execute( diff --git a/src/static/app/dist/assets/DashboardClientAssignmentStore-BUoDZ6I5.js b/src/static/app/dist/assets/DashboardClientAssignmentStore-DpqDqqOP.js similarity index 95% rename from src/static/app/dist/assets/DashboardClientAssignmentStore-BUoDZ6I5.js rename to src/static/app/dist/assets/DashboardClientAssignmentStore-DpqDqqOP.js index c0e1b54..c6ea775 100644 --- a/src/static/app/dist/assets/DashboardClientAssignmentStore-BUoDZ6I5.js +++ b/src/static/app/dist/assets/DashboardClientAssignmentStore-DpqDqqOP.js @@ -1 +1 @@ -import{a6 as A,r as n,D as S,g as l,z as v}from"./index-BaGiSoQe.js";const b=A("DashboardClientAssignmentStore",()=>{const f=n({}),d=n([]),o=n({}),c=n([]),g=n(!1),r=n(""),i=S(),w=async()=>{await l("/api/clients/allClients",{},s=>{o.value=s.data})},y=async()=>{await l("/api/clients/allClientsRaw",{},s=>{c.value=s.data,console.log(c.value)})},m=s=>Object.values(o.value).flat().find(e=>e.ClientID===s),u=async(s,e)=>{await l("/api/clients/assignedClients",{ConfigurationName:s,Peer:e},a=>{d.value=a.data})};return{assignments:d,getAssignedClients:u,getClients:w,getClientsRaw:y,clients:o,unassignClient:async(s,e,a)=>{g.value=!0,await v("/api/clients/unassignClient",{AssignmentID:a},async t=>{t.status?(i.newMessage("Server","Unassign successfully!","success"),s&&e&&await u(s,e)):(i.newMessage("Server","Unassign Failed. Reason: "+t.message,"success"),console.error("Unassign Failed. Reason: "+t.message)),g.value=!1})},assignClient:async(s,e,a,t=!0)=>{r.value=a,await v("/api/clients/assignClient",{ConfigurationName:s,Peer:e,ClientID:a},async C=>{C.status?(i.newMessage("Server","Assign successfully!","success"),t&&await u(s,e)):(i.newMessage("Server","Assign Failed. Reason: "+C.message,"success"),console.error("Assign Failed. Reason: "+C.message)),r.value=""})},getClientById:m,unassigning:g,assigning:r,clientsRaw:c,allConfigurationsPeers:f,getAllConfigurationsPeers:async()=>{await l("/api/clients/allConfigurationsPeers",{},s=>{f.value=s.data})}}});export{b as D}; +import{a5 as A,r as n,D as S,g as l,z as v}from"./index-Upsq31TS.js";const b=A("DashboardClientAssignmentStore",()=>{const f=n({}),d=n([]),o=n({}),c=n([]),g=n(!1),r=n(""),i=S(),w=async()=>{await l("/api/clients/allClients",{},s=>{o.value=s.data})},y=async()=>{await l("/api/clients/allClientsRaw",{},s=>{c.value=s.data,console.log(c.value)})},m=s=>Object.values(o.value).flat().find(e=>e.ClientID===s),u=async(s,e)=>{await l("/api/clients/assignedClients",{ConfigurationName:s,Peer:e},a=>{d.value=a.data})};return{assignments:d,getAssignedClients:u,getClients:w,getClientsRaw:y,clients:o,unassignClient:async(s,e,a)=>{g.value=!0,await v("/api/clients/unassignClient",{AssignmentID:a},async t=>{t.status?(i.newMessage("Server","Unassign successfully!","success"),s&&e&&await u(s,e)):(i.newMessage("Server","Unassign Failed. Reason: "+t.message,"success"),console.error("Unassign Failed. Reason: "+t.message)),g.value=!1})},assignClient:async(s,e,a,t=!0)=>{r.value=a,await v("/api/clients/assignClient",{ConfigurationName:s,Peer:e,ClientID:a},async C=>{C.status?(i.newMessage("Server","Assign successfully!","success"),t&&await u(s,e)):(i.newMessage("Server","Assign Failed. Reason: "+C.message,"success"),console.error("Assign Failed. Reason: "+C.message)),r.value=""})},getClientById:m,unassigning:g,assigning:r,clientsRaw:c,allConfigurationsPeers:f,getAllConfigurationsPeers:async()=>{await l("/api/clients/allConfigurationsPeers",{},s=>{f.value=s.data})}}});export{b as D}; diff --git a/src/static/app/dist/assets/browser-BHoir7AQ.js b/src/static/app/dist/assets/browser-Bcujcoof.js similarity index 99% rename from src/static/app/dist/assets/browser-BHoir7AQ.js rename to src/static/app/dist/assets/browser-Bcujcoof.js index 62e37eb..2629c8d 100644 --- a/src/static/app/dist/assets/browser-BHoir7AQ.js +++ b/src/static/app/dist/assets/browser-Bcujcoof.js @@ -1,4 +1,4 @@ -import{a2 as ne}from"./index-BaGiSoQe.js";var z={},Q,pt;function re(){return pt||(pt=1,Q=function(){return typeof Promise=="function"&&Promise.prototype&&Promise.prototype.then}),Q}var $={},U={},Rt;function _(){if(Rt)return U;Rt=1;let r;const o=[0,26,44,70,100,134,172,196,242,292,346,404,466,532,581,655,733,815,901,991,1085,1156,1258,1364,1474,1588,1706,1828,1921,2051,2185,2323,2465,2611,2761,2876,3034,3196,3362,3532,3706];return U.getSymbolSize=function(e){if(!e)throw new Error('"version" cannot be null or undefined');if(e<1||e>40)throw new Error('"version" should be in range from 1 to 40');return e*4+17},U.getSymbolTotalCodewords=function(e){return o[e]},U.getBCHDigit=function(i){let e=0;for(;i!==0;)e++,i>>>=1;return e},U.setToSJISFunction=function(e){if(typeof e!="function")throw new Error('"toSJISFunc" is not a valid function.');r=e},U.isKanjiModeEnabled=function(){return typeof r<"u"},U.toSJIS=function(e){return r(e)},U}var W={},At;function Ct(){return At||(At=1,function(r){r.L={bit:1},r.M={bit:0},r.Q={bit:3},r.H={bit:2};function o(i){if(typeof i!="string")throw new Error("Param is not a string");switch(i.toLowerCase()){case"l":case"low":return r.L;case"m":case"medium":return r.M;case"q":case"quartile":return r.Q;case"h":case"high":return r.H;default:throw new Error("Unknown EC Level: "+i)}}r.isValid=function(e){return e&&typeof e.bit<"u"&&e.bit>=0&&e.bit<4},r.from=function(e,t){if(r.isValid(e))return e;try{return o(e)}catch{return t}}}(W)),W}var Z,Tt;function oe(){if(Tt)return Z;Tt=1;function r(){this.buffer=[],this.length=0}return r.prototype={get:function(o){const i=Math.floor(o/8);return(this.buffer[i]>>>7-o%8&1)===1},put:function(o,i){for(let e=0;e>>i-e-1&1)===1)},getLengthInBits:function(){return this.length},putBit:function(o){const i=Math.floor(this.length/8);this.buffer.length<=i&&this.buffer.push(0),o&&(this.buffer[i]|=128>>>this.length%8),this.length++}},Z=r,Z}var X,It;function ie(){if(It)return X;It=1;function r(o){if(!o||o<1)throw new Error("BitMatrix size must be defined and greater than 0");this.size=o,this.data=new Uint8Array(o*o),this.reservedBit=new Uint8Array(o*o)}return r.prototype.set=function(o,i,e,t){const n=o*this.size+i;this.data[n]=e,t&&(this.reservedBit[n]=!0)},r.prototype.get=function(o,i){return this.data[o*this.size+i]},r.prototype.xor=function(o,i,e){this.data[o*this.size+i]^=e},r.prototype.isReserved=function(o,i){return this.reservedBit[o*this.size+i]},X=r,X}var x={},Nt;function ue(){return Nt||(Nt=1,function(r){const o=_().getSymbolSize;r.getRowColCoords=function(e){if(e===1)return[];const t=Math.floor(e/7)+2,n=o(e),u=n===145?26:Math.ceil((n-13)/(2*t-2))*2,a=[n-7];for(let s=1;s=0&&t<=7},r.from=function(t){return r.isValid(t)?parseInt(t,10):void 0},r.getPenaltyN1=function(t){const n=t.size;let u=0,a=0,s=0,c=null,d=null;for(let B=0;B=5&&(u+=o.N1+(a-5)),c=f,a=1),f=t.get(h,B),f===d?s++:(s>=5&&(u+=o.N1+(s-5)),d=f,s=1)}a>=5&&(u+=o.N1+(a-5)),s>=5&&(u+=o.N1+(s-5))}return u},r.getPenaltyN2=function(t){const n=t.size;let u=0;for(let a=0;a=10&&(a===1488||a===93)&&u++,s=s<<1&2047|t.get(d,c),d>=10&&(s===1488||s===93)&&u++}return u*o.N3},r.getPenaltyN4=function(t){let n=0;const u=t.data.length;for(let s=0;s=0;){const u=n[0];for(let s=0;s0){const a=new Uint8Array(this.degree);return a.set(n,u),a}return n},rt=o,rt}var ot={},it={},ut={},qt;function Wt(){return qt||(qt=1,ut.isValid=function(o){return!isNaN(o)&&o>=1&&o<=40}),ut}var L={},vt;function Zt(){if(vt)return L;vt=1;const r="[0-9]+",o="[A-Z $%*+\\-./:]+";let i="(?:[u3000-u303F]|[u3040-u309F]|[u30A0-u30FF]|[uFF00-uFFEF]|[u4E00-u9FAF]|[u2605-u2606]|[u2190-u2195]|u203B|[u2010u2015u2018u2019u2025u2026u201Cu201Du2225u2260]|[u0391-u0451]|[u00A7u00A8u00B1u00B4u00D7u00F7])+";i=i.replace(/u/g,"\\u");const e="(?:(?![A-Z0-9 $%*+\\-./:]|"+i+`)(?:.|[\r +import{a1 as ne}from"./index-Upsq31TS.js";var z={},Q,pt;function re(){return pt||(pt=1,Q=function(){return typeof Promise=="function"&&Promise.prototype&&Promise.prototype.then}),Q}var $={},U={},Rt;function _(){if(Rt)return U;Rt=1;let r;const o=[0,26,44,70,100,134,172,196,242,292,346,404,466,532,581,655,733,815,901,991,1085,1156,1258,1364,1474,1588,1706,1828,1921,2051,2185,2323,2465,2611,2761,2876,3034,3196,3362,3532,3706];return U.getSymbolSize=function(e){if(!e)throw new Error('"version" cannot be null or undefined');if(e<1||e>40)throw new Error('"version" should be in range from 1 to 40');return e*4+17},U.getSymbolTotalCodewords=function(e){return o[e]},U.getBCHDigit=function(i){let e=0;for(;i!==0;)e++,i>>>=1;return e},U.setToSJISFunction=function(e){if(typeof e!="function")throw new Error('"toSJISFunc" is not a valid function.');r=e},U.isKanjiModeEnabled=function(){return typeof r<"u"},U.toSJIS=function(e){return r(e)},U}var W={},At;function Ct(){return At||(At=1,function(r){r.L={bit:1},r.M={bit:0},r.Q={bit:3},r.H={bit:2};function o(i){if(typeof i!="string")throw new Error("Param is not a string");switch(i.toLowerCase()){case"l":case"low":return r.L;case"m":case"medium":return r.M;case"q":case"quartile":return r.Q;case"h":case"high":return r.H;default:throw new Error("Unknown EC Level: "+i)}}r.isValid=function(e){return e&&typeof e.bit<"u"&&e.bit>=0&&e.bit<4},r.from=function(e,t){if(r.isValid(e))return e;try{return o(e)}catch{return t}}}(W)),W}var Z,Tt;function oe(){if(Tt)return Z;Tt=1;function r(){this.buffer=[],this.length=0}return r.prototype={get:function(o){const i=Math.floor(o/8);return(this.buffer[i]>>>7-o%8&1)===1},put:function(o,i){for(let e=0;e>>i-e-1&1)===1)},getLengthInBits:function(){return this.length},putBit:function(o){const i=Math.floor(this.length/8);this.buffer.length<=i&&this.buffer.push(0),o&&(this.buffer[i]|=128>>>this.length%8),this.length++}},Z=r,Z}var X,It;function ie(){if(It)return X;It=1;function r(o){if(!o||o<1)throw new Error("BitMatrix size must be defined and greater than 0");this.size=o,this.data=new Uint8Array(o*o),this.reservedBit=new Uint8Array(o*o)}return r.prototype.set=function(o,i,e,t){const n=o*this.size+i;this.data[n]=e,t&&(this.reservedBit[n]=!0)},r.prototype.get=function(o,i){return this.data[o*this.size+i]},r.prototype.xor=function(o,i,e){this.data[o*this.size+i]^=e},r.prototype.isReserved=function(o,i){return this.reservedBit[o*this.size+i]},X=r,X}var x={},Nt;function ue(){return Nt||(Nt=1,function(r){const o=_().getSymbolSize;r.getRowColCoords=function(e){if(e===1)return[];const t=Math.floor(e/7)+2,n=o(e),u=n===145?26:Math.ceil((n-13)/(2*t-2))*2,a=[n-7];for(let s=1;s=0&&t<=7},r.from=function(t){return r.isValid(t)?parseInt(t,10):void 0},r.getPenaltyN1=function(t){const n=t.size;let u=0,a=0,s=0,c=null,d=null;for(let B=0;B=5&&(u+=o.N1+(a-5)),c=f,a=1),f=t.get(h,B),f===d?s++:(s>=5&&(u+=o.N1+(s-5)),d=f,s=1)}a>=5&&(u+=o.N1+(a-5)),s>=5&&(u+=o.N1+(s-5))}return u},r.getPenaltyN2=function(t){const n=t.size;let u=0;for(let a=0;a=10&&(a===1488||a===93)&&u++,s=s<<1&2047|t.get(d,c),d>=10&&(s===1488||s===93)&&u++}return u*o.N3},r.getPenaltyN4=function(t){let n=0;const u=t.data.length;for(let s=0;s=0;){const u=n[0];for(let s=0;s0){const a=new Uint8Array(this.degree);return a.set(n,u),a}return n},rt=o,rt}var ot={},it={},ut={},qt;function Wt(){return qt||(qt=1,ut.isValid=function(o){return!isNaN(o)&&o>=1&&o<=40}),ut}var L={},vt;function Zt(){if(vt)return L;vt=1;const r="[0-9]+",o="[A-Z $%*+\\-./:]+";let i="(?:[u3000-u303F]|[u3040-u309F]|[u30A0-u30FF]|[uFF00-uFFEF]|[u4E00-u9FAF]|[u2605-u2606]|[u2190-u2195]|u203B|[u2010u2015u2018u2019u2025u2026u201Cu201Du2225u2260]|[u0391-u0451]|[u00A7u00A8u00B1u00B4u00D7u00F7])+";i=i.replace(/u/g,"\\u");const e="(?:(?![A-Z0-9 $%*+\\-./:]|"+i+`)(?:.|[\r ]))+`;L.KANJI=new RegExp(i,"g"),L.BYTE_KANJI=new RegExp("[^A-Z0-9 $%*+\\-./:]+","g"),L.BYTE=new RegExp(e,"g"),L.NUMERIC=new RegExp(r,"g"),L.ALPHANUMERIC=new RegExp(o,"g");const t=new RegExp("^"+i+"$"),n=new RegExp("^"+r+"$"),u=new RegExp("^[A-Z0-9 $%*+\\-./:]+$");return L.testKanji=function(s){return t.test(s)},L.testNumeric=function(s){return n.test(s)},L.testAlphanumeric=function(s){return u.test(s)},L}var Ut;function F(){return Ut||(Ut=1,function(r){const o=Wt(),i=Zt();r.NUMERIC={id:"Numeric",bit:1,ccBits:[10,12,14]},r.ALPHANUMERIC={id:"Alphanumeric",bit:2,ccBits:[9,11,13]},r.BYTE={id:"Byte",bit:4,ccBits:[8,16,16]},r.KANJI={id:"Kanji",bit:8,ccBits:[8,10,12]},r.MIXED={bit:-1},r.getCharCountIndicator=function(n,u){if(!n.ccBits)throw new Error("Invalid mode: "+n);if(!o.isValid(u))throw new Error("Invalid version: "+u);return u>=1&&u<10?n.ccBits[0]:u<27?n.ccBits[1]:n.ccBits[2]},r.getBestModeForData=function(n){return i.testNumeric(n)?r.NUMERIC:i.testAlphanumeric(n)?r.ALPHANUMERIC:i.testKanji(n)?r.KANJI:r.BYTE},r.toString=function(n){if(n&&n.id)return n.id;throw new Error("Invalid mode")},r.isValid=function(n){return n&&n.bit&&n.ccBits};function e(t){if(typeof t!="string")throw new Error("Param is not a string");switch(t.toLowerCase()){case"numeric":return r.NUMERIC;case"alphanumeric":return r.ALPHANUMERIC;case"kanji":return r.KANJI;case"byte":return r.BYTE;default:throw new Error("Unknown mode: "+t)}}r.from=function(n,u){if(r.isValid(n))return n;try{return e(n)}catch{return u}}}(it)),it}var _t;function de(){return _t||(_t=1,function(r){const o=_(),i=$t(),e=Ct(),t=F(),n=Wt(),u=7973,a=o.getBCHDigit(u);function s(h,f,N){for(let M=1;M<=40;M++)if(f<=r.getCapacity(M,N,h))return M}function c(h,f){return t.getCharCountIndicator(h,f)+4}function d(h,f){let N=0;return h.forEach(function(M){const S=c(M.mode,f);N+=S+M.getBitsLength()}),N}function B(h,f){for(let N=1;N<=40;N++)if(d(h,N)<=r.getCapacity(N,f,t.MIXED))return N}r.from=function(f,N){return n.isValid(f)?parseInt(f,10):N},r.getCapacity=function(f,N,M){if(!n.isValid(f))throw new Error("Invalid QR Code version");typeof M>"u"&&(M=t.BYTE);const S=o.getSymbolTotalCodewords(f),A=i.getTotalCodewordsCount(f,N),P=(S-A)*8;if(M===t.MIXED)return P;const T=P-c(M,f);switch(M){case t.NUMERIC:return Math.floor(T/10*3);case t.ALPHANUMERIC:return Math.floor(T/11*2);case t.KANJI:return Math.floor(T/13);case t.BYTE:default:return Math.floor(T/8)}},r.getBestVersionForData=function(f,N){let M;const S=e.from(N,e.M);if(Array.isArray(f)){if(f.length>1)return B(f,S);if(f.length===0)return 1;M=f[0]}else M=f;return s(M.mode,M.getLength(),S)},r.getEncodedBits=function(f){if(!n.isValid(f)||f<7)throw new Error("Invalid QR Code version");let N=f<<12;for(;o.getBCHDigit(N)-a>=0;)N^=u<=0;)s^=o<0&&(n=this.data.substr(t),u=parseInt(n,10),e.put(u,a*3+1))},ct=o,ct}var ft,zt;function me(){if(zt)return ft;zt=1;const r=F(),o=["0","1","2","3","4","5","6","7","8","9","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"," ","$","%","*","+","-",".","/",":"];function i(e){this.mode=r.ALPHANUMERIC,this.data=e}return i.getBitsLength=function(t){return 11*Math.floor(t/2)+6*(t%2)},i.prototype.getLength=function(){return this.data.length},i.prototype.getBitsLength=function(){return i.getBitsLength(this.data.length)},i.prototype.write=function(t){let n;for(n=0;n+2<=this.data.length;n+=2){let u=o.indexOf(this.data[n])*45;u+=o.indexOf(this.data[n+1]),t.put(u,11)}this.data.length%2&&t.put(o.indexOf(this.data[n]),6)},ft=i,ft}var lt,Vt;function we(){if(Vt)return lt;Vt=1;const r=F();function o(i){this.mode=r.BYTE,typeof i=="string"?this.data=new TextEncoder().encode(i):this.data=new Uint8Array(i)}return o.getBitsLength=function(e){return e*8},o.prototype.getLength=function(){return this.data.length},o.prototype.getBitsLength=function(){return o.getBitsLength(this.data.length)},o.prototype.write=function(i){for(let e=0,t=this.data.length;e=33088&&n<=40956)n-=33088;else if(n>=57408&&n<=60351)n-=49472;else throw new Error("Invalid SJIS character: "+this.data[t]+` Make sure your charset is UTF-8`);n=(n>>>8&255)*192+(n&255),e.put(n,13)}},dt=i,dt}var gt={exports:{}},Ht;function Ee(){return Ht||(Ht=1,function(r){var o={single_source_shortest_paths:function(i,e,t){var n={},u={};u[e]=0;var a=o.PriorityQueue.make();a.push(e,0);for(var s,c,d,B,h,f,N,M,S;!a.empty();){s=a.pop(),c=s.value,B=s.cost,h=i[c]||{};for(d in h)h.hasOwnProperty(d)&&(f=h[d],N=B+f,M=u[d],S=typeof u[d]>"u",(S||M>N)&&(u[d]=N,a.push(d,N),n[d]=c))}if(typeof t<"u"&&typeof u[t]>"u"){var A=["Could not find a path from ",e," to ",t,"."].join("");throw new Error(A)}return n},extract_shortest_path_from_predecessor_list:function(i,e){for(var t=[],n=e;n;)t.push(n),i[n],n=i[n];return t.reverse(),t},find_path:function(i,e,t){var n=o.single_source_shortest_paths(i,e,t);return o.extract_shortest_path_from_predecessor_list(n,t)},PriorityQueue:{make:function(i){var e=o.PriorityQueue,t={},n;i=i||{};for(n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);return t.queue=[],t.sorter=i.sorter||e.default_sorter,t},default_sorter:function(i,e){return i.cost-e.cost},push:function(i,e){var t={value:i,cost:e};this.queue.push(t),this.queue.sort(this.sorter)},pop:function(){return this.queue.shift()},empty:function(){return this.queue.length===0}}};r.exports=o}(gt)),gt.exports}var Jt;function ye(){return Jt||(Jt=1,function(r){const o=F(),i=he(),e=me(),t=we(),n=Ce(),u=Zt(),a=_(),s=Ee();function c(A){return unescape(encodeURIComponent(A)).length}function d(A,P,T){const p=[];let b;for(;(b=A.exec(T))!==null;)p.push({data:b[0],index:b.index,mode:P,length:b[0].length});return p}function B(A){const P=d(u.NUMERIC,o.NUMERIC,A),T=d(u.ALPHANUMERIC,o.ALPHANUMERIC,A);let p,b;return a.isKanjiModeEnabled()?(p=d(u.BYTE,o.BYTE,A),b=d(u.KANJI,o.KANJI,A)):(p=d(u.BYTE_KANJI,o.BYTE,A),b=[]),P.concat(T,p,b).sort(function(E,C){return E.index-C.index}).map(function(E){return{data:E.data,mode:E.mode,length:E.length}})}function h(A,P){switch(P){case o.NUMERIC:return i.getBitsLength(A);case o.ALPHANUMERIC:return e.getBitsLength(A);case o.KANJI:return n.getBitsLength(A);case o.BYTE:return t.getBitsLength(A)}}function f(A){return A.reduce(function(P,T){const p=P.length-1>=0?P[P.length-1]:null;return p&&p.mode===T.mode?(P[P.length-1].data+=T.data,P):(P.push(T),P)},[])}function N(A){const P=[];for(let T=0;T=0&&w<=6&&(I===0||I===6)||I>=0&&I<=6&&(w===0||w===6)||w>=2&&w<=4&&I>=2&&I<=4?g.set(m+w,y+I,!0,!0):g.set(m+w,y+I,!1,!0))}}function N(g){const E=g.size;for(let C=8;C>w&1)===1,g.set(R,m,y,!0),g.set(m,R,y,!0)}function A(g,E,C){const l=g.size,R=d.getEncodedBits(E,C);let m,y;for(m=0;m<15;m++)y=(R>>m&1)===1,m<6?g.set(m,8,y,!0):m<8?g.set(m+1,8,y,!0):g.set(l-15+m,8,y,!0),m<8?g.set(8,l-m-1,y,!0):m<9?g.set(8,15-m-1+1,y,!0):g.set(8,15-m-1,y,!0);g.set(l-8,8,1,!0)}function P(g,E){const C=g.size;let l=-1,R=C-1,m=7,y=0;for(let w=C-1;w>0;w-=2)for(w===6&&w--;;){for(let I=0;I<2;I++)if(!g.isReserved(R,w-I)){let v=!1;y>>m&1)===1),g.set(R,w-I,v),m--,m===-1&&(y++,m=7)}if(R+=l,R<0||C<=R){R-=l,l=-l;break}}}function T(g,E,C){const l=new i;C.forEach(function(I){l.put(I.mode.bit,4),l.put(I.getLength(),B.getCharCountIndicator(I.mode,g)),I.write(l)});const R=r.getSymbolTotalCodewords(g),m=a.getTotalCodewordsCount(g,E),y=(R-m)*8;for(l.getLengthInBits()+4<=y&&l.put(0,4);l.getLengthInBits()%8!==0;)l.putBit(0);const w=(y-l.getLengthInBits())/8;for(let I=0;Ii.clientAssignedPeers&&Object.keys(i.clientAssignedPeers).includes(i.configuration)?i.peers.filter(f=>!i.clientAssignedPeers[i.configuration].map(t=>t.id).includes(f.id)&&(!i.availablePeerSearchString||i.availablePeerSearchString&&(f.id.includes(i.availablePeerSearchString)||f.name.includes(i.availablePeerSearchString)))):i.peers),p=h(!1),c=h(!1);return(f,t)=>(s(),a("div",q,[e("div",{onClick:t[0]||(t[0]=n=>c.value=!c.value),role:"button",class:"card-header rounded-0 sticky-top z-5 bg-body-secondary border-0 border-bottom text-white d-flex"},[e("small",null,[e("samp",null,y(r.configuration),1)]),e("a",z,[c.value?(s(),a("i",M)):(s(),a("i",W))])]),c.value?x("",!0):(s(),a("div",F,[e("div",H,[(s(!0),a(k,null,D(o.value,n=>(s(),a("div",{class:"list-group-item d-flex border-bottom list-group-item-action d-flex align-items-center gap-3",key:n.id},[p.value?(s(),a("div",Q,[e("small",X,[g(u,{t:"Are you sure to remove this peer?"})]),t[2]||(t[2]=e("br",null,null,-1)),e("small",Z,[e("samp",null,y(n.id),1)])])):(s(),a("div",J,[e("small",K,[e("samp",null,y(n.id),1)]),t[1]||(t[1]=e("br",null,null,-1)),e("small",Y,y(n.name?n.name:"Untitled Peer"),1)])),r.clientAssignedPeers?(s(),a("button",{key:2,onClick:l=>b("assign",n.id),class:$([{disabled:S(d).assigning},"btn bg-success-subtle text-success-emphasis ms-auto"])},t[3]||(t[3]=[e("i",{class:"bi bi-plus-circle-fill"},null,-1)]),10,ee)):(s(),a("button",{key:3,onClick:l=>b("unassign",n.assignment_id),class:$([{disabled:S(d).unassigning},"btn bg-danger-subtle text-danger-emphasis ms-auto"]),"aria-label":"Delete Assignment"},t[4]||(t[4]=[e("i",{class:"bi bi-trash-fill"},null,-1)]),10,se))]))),128))])]))]))}}),te={key:0,class:"d-flex rounded-0 border-0 flex-column d-flex flex-column border-bottom pb-1"},le={class:"d-flex flex-column p-3 gap-3"},ne={class:"d-flex align-items-center"},ae={class:"mb-0"},ie={class:"text-bg-primary badge ms-2"},oe={class:"text-bg-info badge ms-2"},re={class:"rounded-3 availablePeers border h-100 overflow-scroll flex-grow-1 d-flex flex-column"},de={key:0,class:"text-muted m-auto p-3"},ce={key:0,style:{height:"500px"},class:"d-flex flex-column p-3"},ue={class:"availablePeers border h-100 card rounded-3"},me={class:"card-header sticky-top p-3"},ge={class:"mb-0 d-flex align-items-center"},ve={class:"card-body p-0 overflow-scroll"},be={key:0,class:"text-muted m-auto"},fe={class:"card-footer d-flex gap-2 p-3 align-items-center justify-content-end"},he={key:1},pe=C({__name:"clientAssignedPeers",props:["client","clientAssignedPeers"],emits:["refresh"],setup(r,{emit:v}){const i=r,b=h(!1),d=R(),o=h(!1),p=v,c=async(n,l,m)=>{await d.assignClient(n,l,m,!1),p("refresh")},f=async n=>{await d.unassignClient(void 0,void 0,n),p("refresh")},t=h("");return(n,l)=>(s(),a("div",null,[b.value?(s(),a("div",he,l[8]||(l[8]=[e("div",{class:"p-3 placeholder-glow border-bottom"},[e("h6",{class:"placeholder w-100 rounded-3"}),e("div",{class:"placeholder w-100 rounded-3",style:{height:"400px"}})],-1)]))):(s(),a("div",te,[e("div",le,[e("div",ne,[e("h6",ae,[g(u,{t:"Assigned Peers"}),e("span",ie,[w(y(Object.keys(r.clientAssignedPeers).length)+" ",1),g(u,{t:Object.keys(r.clientAssignedPeers).length>1?"Configurations":"Configuration"},null,8,["t"])]),e("span",oe,[w(y(Object.values(r.clientAssignedPeers).flat().length)+" ",1),g(u,{t:Object.values(r.clientAssignedPeers).flat().length>1?"Peers":"Peer"},null,8,["t"])])]),e("button",{class:"btn btn-sm bg-primary-subtle text-primary-emphasis rounded-3 ms-auto",onClick:l[0]||(l[0]=m=>o.value=!o.value)},[o.value?(s(),a(k,{key:1},[l[5]||(l[5]=e("i",{class:"bi bi-check me-2"},null,-1)),l[6]||(l[6]=w("Done "))],64)):(s(),a(k,{key:0},[l[3]||(l[3]=e("i",{class:"bi bi-list-check me-2"},null,-1)),l[4]||(l[4]=w("Manage "))],64))])]),e("div",re,[(s(!0),a(k,null,D(r.clientAssignedPeers,(m,_)=>(s(),P(L,{configuration:_,peers:m,onUnassign:l[1]||(l[1]=async A=>await f(A))},null,8,["configuration","peers"]))),256)),Object.keys(r.clientAssignedPeers).length===0?(s(),a("h6",de,[g(u,{t:"No peer assigned to this client"})])):x("",!0)])]),o.value?(s(),a("div",ce,[e("div",ue,[e("div",me,[e("h6",ge,[g(u,{t:"Available Peers"})])]),e("div",ve,[(s(!0),a(k,null,D(S(d).allConfigurationsPeers,(m,_)=>(s(),P(L,{availablePeerSearchString:t.value,configuration:_,clientAssignedPeers:r.clientAssignedPeers,peers:m,onAssign:async A=>await c(_,A,i.client.ClientID)},null,8,["availablePeerSearchString","configuration","clientAssignedPeers","peers","onAssign"]))),256)),Object.keys(S(d).allConfigurationsPeers).length===0?(s(),a("h6",be,[g(u,{t:"No peer is available to assign"})])):x("",!0)]),e("div",fe,[l[7]||(l[7]=e("label",{for:"availablePeerSearchString"},[e("i",{class:"bi bi-search me-2"})],-1)),B(e("input",{id:"availablePeerSearchString","onUpdate:modelValue":l[2]||(l[2]=m=>t.value=m),class:"form-control form-control-sm rounded-3 w-auto",type:"text"},null,512),[[O,t.value]])])])])):x("",!0)]))]))}}),ye={class:"p-3 d-flex gap-3 flex-column border-bottom"},_e={class:"d-flex align-items-center"},xe={class:"mb-0"},ke=C({__name:"clientResetPassword",props:["client"],setup(r){const v=r,i=h(!1),b=h(!1),d=h(!1),o=h(!1),p=U();V();const c=t=>{const n=p.getActiveCrossServer();return n?new URL("/client/#/reset_password?token="+t,n.host).href:new URL("/client/#/reset_password?token="+t,window.location.href).href},f=async()=>{o.value=!0;let t=!1,n;await I("/api/clients/generatePasswordResetLink",{ClientID:v.client.ClientID},async l=>{if(l.status)if(n=l.data,b.value=!0,await N("/api/email/ready",{},m=>{t=m.status}),t){let m={Receiver:v.client.Email,Subject:"[WGDashboard | Client] Reset Password",Body:`Hi${v.client.Name?" "+v.client.Name:""}, + +We received a request to reset the password for your account. You can reset your password by visiting the link below: + +${c(n)} + +This link will expire in 30 minutes for your security. If you didn’t request a password reset, you can safely ignore this email—your current password will remain unchanged. + +If you need help, feel free to contact support. + +Best regards, +WGDashboard`};await I("/api/email/send",m,_=>{_.status?(d.value="Send email success.",i.value=!0):(d.value="Send email failed.",b.value=!1,i.value=!0)})}else d.value=`Please share this URL to your client to reset the password: ${c(n)}`,i.value=!0;else b.value=!1,d.value=l.message,i.value=!0}),o.value=!1};return(t,n)=>(s(),a("div",ye,[e("div",_e,[e("h6",xe,[g(u,{t:"Reset Password"})]),e("button",{class:$(["btn btn-sm bg-primary-subtle text-primary-emphasis rounded-3 ms-auto",{disabled:o.value}]),onClick:n[0]||(n[0]=l=>f())},[n[1]||(n[1]=e("i",{class:"bi bi-send me-2"},null,-1)),o.value?(s(),P(u,{key:1,t:"Sending..."})):(s(),P(u,{key:0,t:"Send Password Reset Link"}))],2)]),i.value?(s(),a("div",{key:0,class:$(["alert rounded-3 mb-0",[b.value?"alert-success":"alert-danger"]])},y(d.value),3)):x("",!0)]))}}),Pe={class:"p-4 border-bottom bg-body-tertiary"},we={class:"text-muted"},$e={class:"d-flex align-items-center"},Se={class:"text-muted"},Ce={class:"ms-auto"},Ae={style:{flex:"1 0 0","overflow-y":"scroll"}},De={key:1,class:"d-flex w-100 h-100 text-muted"},Re={class:"m-auto text-center"},Ne=C({__name:"clientViewer",async setup(r){let v,i;const b=R(),d=G(),o=j(()=>b.getClientById(d.params.id)),p=h({}),c=async()=>{await N("/api/clients/assignedPeers",{ClientID:o.value.ClientID},f=>{p.value=f.data})};return o.value&&(E(()=>o.value.ClientID,async()=>{await c()}),[v,i]=T(()=>c()),await v,i()),(f,t)=>o.value?(s(),a("div",{class:"text-body d-flex flex-column overflow-y-scroll h-100",key:o.value.ClientID},[e("div",Pe,[e("small",we,[g(u,{t:"Email"})]),e("h1",null,y(o.value.Email),1),e("div",$e,[e("small",Se,[g(u,{t:"Client ID"})]),e("small",Ce,[e("samp",null,y(o.value.ClientID),1)])])]),e("div",Ae,[g(pe,{onRefresh:t[0]||(t[0]=n=>c()),clientAssignedPeers:p.value,client:o.value},null,8,["clientAssignedPeers","client"]),o.value.ClientGroup==="Local"?(s(),P(ke,{key:0,client:o.value},null,8,["client"])):x("",!0)])])):(s(),a("div",De,[e("div",Re,[t[1]||(t[1]=e("h1",null,[e("i",{class:"bi bi-person-x"})],-1)),e("p",null,[g(u,{t:"Client does not exist"})])])]))}});export{Ne as default}; diff --git a/src/static/app/dist/assets/clientViewer-CglBXHMI.js b/src/static/app/dist/assets/clientViewer-CglBXHMI.js deleted file mode 100644 index 5c459f5..0000000 --- a/src/static/app/dist/assets/clientViewer-CglBXHMI.js +++ /dev/null @@ -1 +0,0 @@ -import{J as w,q as O,r as g,c as n,f as t,a as e,d as k,t as m,F as p,i as P,b as a,n as D,u as $,L as I,e as y,k as S,g as N,M as B}from"./index-BaGiSoQe.js";import{D as A}from"./DashboardClientAssignmentStore-BUoDZ6I5.js";import{L as r}from"./localeText-DkjxgEQB.js";const V={class:"card rounded-0 border-0"},E={role:"button",class:"ms-auto text-white"},L={key:0,class:"bi bi-chevron-compact-down"},z={key:1,class:"bi bi-chevron-compact-up"},F={key:0,class:"card-body p-0"},G={class:"list-group list-group-flush"},M={key:0},T={class:"text-body"},U={class:"text-muted"},q={key:1},J={class:"text-body"},R={class:"text-muted"},H=["onClick"],K=["onClick"],j=w({__name:"availablePeersGroup",props:["configuration","peers","clientAssignedPeers"],emits:["assign","unassign"],setup(b,{emit:v}){const i=b,o=v,d=A(),c=O(()=>i.clientAssignedPeers&&Object.keys(i.clientAssignedPeers).includes(i.configuration)?i.peers.filter(h=>!i.clientAssignedPeers[i.configuration].map(l=>l.id).includes(h.id)):i.peers),_=g(!1),f=g(!1);return(h,l)=>(t(),n("div",V,[e("div",{onClick:l[0]||(l[0]=s=>f.value=!f.value),role:"button",class:"card-header rounded-0 sticky-top z-5 bg-body-secondary border-0 shadow border-bottom btn-brand text-white d-flex"},[e("samp",null,m(b.configuration),1),e("a",E,[f.value?(t(),n("i",L)):(t(),n("i",z))])]),f.value?k("",!0):(t(),n("div",F,[e("div",G,[(t(!0),n(p,null,P(c.value,s=>(t(),n("div",{class:"list-group-item d-flex border-bottom list-group-item-action d-flex align-items-center gap-3",key:s.id},[_.value?(t(),n("div",q,[e("small",J,[a(r,{t:"Are you sure to remove this peer?"})]),l[2]||(l[2]=e("br",null,null,-1)),e("small",R,[e("samp",null,m(s.id),1)])])):(t(),n("div",M,[e("small",T,[e("samp",null,m(s.id),1)]),l[1]||(l[1]=e("br",null,null,-1)),e("small",U,m(s.name?s.name:"Untitled Peer"),1)])),b.clientAssignedPeers?(t(),n("button",{key:2,onClick:u=>o("assign",s.id),class:D([{disabled:$(d).assigning},"btn bg-success-subtle text-success-emphasis ms-auto"])},l[3]||(l[3]=[e("i",{class:"bi bi-plus-circle-fill"},null,-1)]),10,H)):(t(),n("button",{key:3,onClick:u=>o("unassign",s.assignment_id),class:D([{disabled:$(d).unassigning},"btn bg-danger-subtle text-danger-emphasis ms-auto"]),"aria-label":"Delete Assignment"},l[4]||(l[4]=[e("i",{class:"bi bi-trash-fill"},null,-1)]),10,K))]))),128))])]))]))}}),Q={class:"d-flex rounded-3 flex-column gap-3"},W={style:{height:"400px"},class:"d-flex flex-column"},X={class:"d-flex align-items-center mb-2"},Y={class:"mb-0"},Z={class:"text-bg-primary badge ms-2"},ee={class:"text-bg-info badge ms-2"},se={class:"rounded-3 availablePeers border h-100 overflow-scroll flex-grow-1 d-flex flex-column"},te={key:0,class:"text-muted m-auto"},ne={key:0,style:{height:"500px"},class:"d-flex flex-column"},le={class:"mt-3 availablePeers border h-100 card rounded-3"},ie={class:"card-header sticky-top p-3"},ae={class:"mb-0 d-flex align-items-center"},oe={class:"card-body p-0 overflow-scroll"},re={key:0,class:"text-muted m-auto"},ce=w({__name:"clientAssignedPeers",props:["client"],setup(b){const v=b,i=g({}),o=g(!1),d=A(),c=g(!1);g(void 0),g(void 0);const _=async()=>{await N("/api/clients/assignedPeers",{ClientID:v.client.ClientID},l=>{i.value=l.data,o.value=!1})};I(async()=>{o.value=!0,await _()});const f=async(l,s,u)=>{await d.assignClient(l,s,u,!1),await _()},h=async l=>{await d.unassignClient(void 0,void 0,l),await _()};return(l,s)=>(t(),n("div",Q,[e("div",W,[e("div",X,[e("h6",Y,[a(r,{t:"Assigned Peers"}),e("span",Z,[y(m(Object.keys(i.value).length)+" ",1),a(r,{t:Object.keys(i.value).length>1?"Configurations":"Configuration"},null,8,["t"])]),e("span",ee,[y(m(Object.values(i.value).flat().length)+" ",1),a(r,{t:Object.values(i.value).flat().length>1?"Peers":"Peer"},null,8,["t"])])]),e("button",{class:"btn btn-sm bg-primary-subtle text-primary-emphasis rounded-3 ms-auto",onClick:s[0]||(s[0]=u=>c.value=!c.value)},[c.value?(t(),n(p,{key:1},[s[4]||(s[4]=e("i",{class:"bi bi-check me-2"},null,-1)),s[5]||(s[5]=y("Done "))],64)):(t(),n(p,{key:0},[s[2]||(s[2]=e("i",{class:"bi bi-list-check me-2"},null,-1)),s[3]||(s[3]=y("Manage "))],64))])]),e("div",se,[(t(!0),n(p,null,P(i.value,(u,x)=>(t(),S(j,{configuration:x,peers:u,onUnassign:s[1]||(s[1]=async C=>await h(C))},null,8,["configuration","peers"]))),256)),Object.keys(i.value).length===0?(t(),n("h6",te,[a(r,{t:"No peer assigned to this client"})])):k("",!0)])]),c.value?(t(),n("div",ne,[e("div",le,[e("div",ie,[e("h6",ae,[a(r,{t:"Available Peers"})])]),e("div",oe,[(t(!0),n(p,null,P($(d).allConfigurationsPeers,(u,x)=>(t(),S(j,{configuration:x,clientAssignedPeers:i.value,peers:u,onAssign:async C=>await f(x,C,v.client.ClientID)},null,8,["configuration","clientAssignedPeers","peers","onAssign"]))),256)),Object.keys($(d).allConfigurationsPeers).length===0?(t(),n("h6",re,[a(r,{t:"No peer is available to assign"})])):k("",!0)]),s[6]||(s[6]=e("div",{class:"card-footer d-flex gap-2 p-3 align-items-center justify-content-end"},[e("label",{for:"availablePeerSearchString"},[e("i",{class:"bi bi-search me-2"})]),e("input",{id:"availablePeerSearchString",class:"form-control form-control-sm rounded-3 w-auto",type:"text"})],-1))])])):k("",!0)]))}}),de={key:0,class:"text-body d-flex flex-column gap-3"},ue={class:"p-4 border-bottom bg-body-tertiary"},me={class:"text-muted"},ge={class:"d-flex align-items-center"},be={class:"text-muted"},ve={class:"ms-auto"},fe={class:"px-4"},_e={key:1,class:"d-flex w-100 h-100 text-muted"},pe={class:"m-auto text-center"},ke=w({__name:"clientViewer",setup(b){const v=A(),i=B(),o=O(()=>v.getClientById(i.params.id));return(d,c)=>o.value?(t(),n("div",de,[e("div",ue,[e("small",me,[a(r,{t:"Email"})]),e("h1",null,m(o.value.Email),1),e("div",ge,[e("small",be,[a(r,{t:"Client ID"})]),e("small",ve,[e("samp",null,m(o.value.ClientID),1)])])]),e("div",fe,[a(ce,{client:o.value},null,8,["client"])])])):(t(),n("div",_e,[e("div",pe,[c[0]||(c[0]=e("h1",null,[e("i",{class:"bi bi-person-x"})],-1)),e("p",null,[a(r,{t:"Client does not exist"})])])]))}});export{ke as default}; diff --git a/src/static/app/dist/assets/clients-CgB9Uymo.js b/src/static/app/dist/assets/clients-BZwEb7jm.js similarity index 92% rename from src/static/app/dist/assets/clients-CgB9Uymo.js rename to src/static/app/dist/assets/clients-BZwEb7jm.js index b3138ae..383e37c 100644 --- a/src/static/app/dist/assets/clients-CgB9Uymo.js +++ b/src/static/app/dist/assets/clients-BZwEb7jm.js @@ -1 +1 @@ -import{J as p,q as w,c as l,a as e,t as d,b as u,F as h,i as g,k as f,h as b,w as x,f as r,K as N,r as S,m as L,y as $,u as _,G as k}from"./index-BaGiSoQe.js";import{D}from"./DashboardClientAssignmentStore-BUoDZ6I5.js";import{L as y}from"./localeText-DkjxgEQB.js";const V={class:"card rounded-0 border-0"},B={class:"card-header d-flex align-items-center rounded-0"},E={class:"my-2"},R={class:"badge text-bg-primary ms-auto"},A={class:"card-body p-0"},G={class:"list-group list-group-flush"},I={class:"text-body"},F={class:"text-muted"},T=p({__name:"clientGroup",props:["groupName","clients","searchString"],setup(i){const n=i,a=w(()=>{const o=n.searchString.toLowerCase();return n.searchString?n.clients.filter(t=>t.ClientID&&t.ClientID.toLowerCase().includes(o)||t.Email&&t.Email.toLowerCase().includes(o)||t.Name&&t.Name.toLowerCase().includes(o)):n.clients});return(o,t)=>{const m=b("RouterLink");return r(),l("div",V,[e("div",B,[e("h6",E,d(i.groupName),1),e("span",R,[u(y,{t:a.value.length+" Clients"},null,8,["t"])])]),e("div",A,[e("div",G,[(r(!0),l(h,null,g(a.value,s=>(r(),f(m,{to:{name:"Client Viewer",params:{id:s.ClientID}},class:"list-group-item d-flex flex-column border-bottom list-group-item-action"},{default:x(()=>[e("small",I,d(s.Email),1),e("small",F,d(s.Name?s.Name:"No Name"),1)]),_:2},1032,["to"]))),256))])])])}}}),q={class:"text-body w-100 h-100 pb-2"},J={class:"w-100 h-100 card rounded-3"},K={class:"row h-100 g-0"},M={class:"col-sm-4 border-end d-flex flex-column"},P={class:"d-flex text-body align-items-center sticky-top p-3 bg-body-tertiary rounded-top-3",style:{"border-top-right-radius":"0 !important"}},U=["placeholder"],j={class:"btn btn-body ms-auto bg-body-secondary rounded-3 btn-sm"},z={class:"d-flex flex-column overflow-y-scroll",style:{flex:"1 0 0"}},H={class:"col-sm-8"},X=p({__name:"clients",async setup(i){let n,a;const o=D();[n,a]=N(()=>o.getClients()),await n,a(),o.getAllConfigurationsPeers();const t=S("");return(m,s)=>{const v=b("RouterView");return r(),l("div",q,[e("div",J,[e("div",K,[e("div",M,[e("div",P,[s[2]||(s[2]=e("label",{for:"searchClient"},[e("i",{class:"bi bi-search me-2"})],-1)),L(e("input",{"onUpdate:modelValue":s[0]||(s[0]=c=>t.value=c),id:"searchClient",class:"form-control rounded-3 form-control-sm",placeholder:_(k)("Search Clients..."),type:"email",style:{width:"auto"}},null,8,U),[[$,t.value]]),e("button",j,[s[1]||(s[1]=e("i",{class:"bi bi-gear-fill me-2"},null,-1)),u(y,{t:"Settings"})])]),e("div",z,[(r(!0),l(h,null,g(_(o).clients,(c,C)=>(r(),f(T,{searchString:t.value,clients:c,groupName:C},null,8,["searchString","clients","groupName"]))),256))])]),e("div",H,[u(v)])])])])}}});export{X as default}; +import{J as p,q as w,c as l,a as e,t as d,b as u,F as h,i as g,k as f,h as b,w as x,f as r,K as N,r as S,m as L,y as $,u as _,G as k}from"./index-Upsq31TS.js";import{D}from"./DashboardClientAssignmentStore-DpqDqqOP.js";import{L as y}from"./localeText-n7rlaTGQ.js";const V={class:"card rounded-0 border-0"},B={class:"card-header d-flex align-items-center rounded-0"},E={class:"my-2"},R={class:"badge text-bg-primary ms-auto"},A={class:"card-body p-0"},G={class:"list-group list-group-flush"},I={class:"text-body"},F={class:"text-muted"},T=p({__name:"clientGroup",props:["groupName","clients","searchString"],setup(i){const n=i,a=w(()=>{const o=n.searchString.toLowerCase();return n.searchString?n.clients.filter(t=>t.ClientID&&t.ClientID.toLowerCase().includes(o)||t.Email&&t.Email.toLowerCase().includes(o)||t.Name&&t.Name.toLowerCase().includes(o)):n.clients});return(o,t)=>{const m=b("RouterLink");return r(),l("div",V,[e("div",B,[e("h6",E,d(i.groupName),1),e("span",R,[u(y,{t:a.value.length+" Clients"},null,8,["t"])])]),e("div",A,[e("div",G,[(r(!0),l(h,null,g(a.value,s=>(r(),f(m,{to:{name:"Client Viewer",params:{id:s.ClientID}},class:"list-group-item d-flex flex-column border-bottom list-group-item-action"},{default:x(()=>[e("small",I,d(s.Email),1),e("small",F,d(s.Name?s.Name:"No Name"),1)]),_:2},1032,["to"]))),256))])])])}}}),q={class:"text-body w-100 h-100 pb-2"},J={class:"w-100 h-100 card rounded-3"},K={class:"row h-100 g-0"},M={class:"col-sm-4 border-end d-flex flex-column"},P={class:"d-flex text-body align-items-center sticky-top p-3 bg-body-tertiary rounded-top-3",style:{"border-top-right-radius":"0 !important"}},U=["placeholder"],j={class:"btn btn-body ms-auto bg-body-secondary rounded-3 btn-sm"},z={class:"d-flex flex-column overflow-y-scroll",style:{flex:"1 0 0"}},H={class:"col-sm-8"},X=p({__name:"clients",async setup(i){let n,a;const o=D();[n,a]=N(()=>o.getClients()),await n,a(),o.getAllConfigurationsPeers();const t=S("");return(m,s)=>{const v=b("RouterView");return r(),l("div",q,[e("div",J,[e("div",K,[e("div",M,[e("div",P,[s[2]||(s[2]=e("label",{for:"searchClient"},[e("i",{class:"bi bi-search me-2"})],-1)),L(e("input",{"onUpdate:modelValue":s[0]||(s[0]=c=>t.value=c),id:"searchClient",class:"form-control rounded-3 form-control-sm",placeholder:_(k)("Search Clients..."),type:"email",style:{width:"auto"}},null,8,U),[[$,t.value]]),e("button",j,[s[1]||(s[1]=e("i",{class:"bi bi-gear-fill me-2"},null,-1)),u(y,{t:"Settings"})])]),e("div",z,[(r(!0),l(h,null,g(_(o).clients,(c,C)=>(r(),f(T,{searchString:t.value,clients:c,groupName:C},null,8,["searchString","clients","groupName"]))),256))])]),e("div",H,[u(v)])])])])}}});export{X as default}; diff --git a/src/static/app/dist/assets/configuration-CwjXQBmc.js b/src/static/app/dist/assets/configuration-B1JLlW37.js similarity index 86% rename from src/static/app/dist/assets/configuration-CwjXQBmc.js rename to src/static/app/dist/assets/configuration-B1JLlW37.js index 4d0c2ff..4e7a7a7 100644 --- a/src/static/app/dist/assets/configuration-CwjXQBmc.js +++ b/src/static/app/dist/assets/configuration-B1JLlW37.js @@ -1 +1 @@ -import{_ as r,c as i,b as o,w as e,h as l,f as t,j as _,k as n,S as u,l as d}from"./index-BaGiSoQe.js";const m={name:"configuration"},f={class:"mt-md-5 mt-3 text-body"};function p(h,k,x,w,$,v){const a=l("RouterView");return t(),i("div",f,[o(a,null,{default:e(({Component:s,route:c})=>[o(_,{name:"fade2",mode:"out-in"},{default:e(()=>[(t(),n(u,null,{default:e(()=>[(t(),n(d(s),{key:c.path}))]),_:2},1024))]),_:2},1024)]),_:1})])}const B=r(m,[["render",p]]);export{B as default}; +import{_ as r,c as i,b as o,w as e,h as l,f as t,j as _,k as n,S as u,l as d}from"./index-Upsq31TS.js";const m={name:"configuration"},f={class:"mt-md-5 mt-3 text-body"};function p(h,k,x,w,$,v){const a=l("RouterView");return t(),i("div",f,[o(a,null,{default:e(({Component:s,route:c})=>[o(_,{name:"fade2",mode:"out-in"},{default:e(()=>[(t(),n(u,null,{default:e(()=>[(t(),n(d(s),{key:c.path}))]),_:2},1024))]),_:2},1024)]),_:1})])}const B=r(m,[["render",p]]);export{B as default}; diff --git a/src/static/app/dist/assets/configurationList-zXvLVZk6.js b/src/static/app/dist/assets/configurationList-DDBigiJ5.js similarity index 98% rename from src/static/app/dist/assets/configurationList-zXvLVZk6.js rename to src/static/app/dist/assets/configurationList-DDBigiJ5.js index 317d674..ae7cb79 100644 --- a/src/static/app/dist/assets/configurationList-zXvLVZk6.js +++ b/src/static/app/dist/assets/configurationList-DDBigiJ5.js @@ -1 +1 @@ -import{_ as D,g as M,D as I,c as a,a as t,b as r,w as S,h as _,n as m,e as v,t as u,m as U,k as p,d as y,v as V,f as i,p as B,q as K,r as O,s as w,j as G,o as R,x as W,F as k,i as C,T as q,G as $,W as F,y as z}from"./index-BaGiSoQe.js";import{L as x}from"./localeText-DkjxgEQB.js";import{_ as j}from"./protocolBadge-fuWULZA8.js";import{C as J}from"./storageMount.vue_vue_type_style_index_0_scoped_9509d7a0_lang-B4kEtj1e.js";const N={name:"configurationCard",components:{ProtocolBadge:j,LocaleText:x},props:{c:{Name:String,Status:Boolean,PublicKey:String,PrivateKey:String},delay:String,display:String},data(){return{configurationToggling:!1}},setup(){return{dashboardConfigurationStore:I()}},methods:{toggle(){this.configurationToggling=!0,M("/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})}}},T=()=>{B(s=>({"7d032b58":s.delay}))},P=N.setup;N.setup=P?(s,e)=>(T(),P(s,e)):T;const E={class:"card conf_card rounded-3 shadow text-decoration-none"},H={class:"mb-0"},Y={class:"card-title mb-0 d-flex align-items-center gap-2"},A={class:"card-footer d-flex gap-2 flex-column"},Q={class:"row"},X={class:"d-flex gap-2 align-items-center"},Z={class:"text-muted"},tt={class:"mb-0 d-block d-lg-inline-block"},et={style:{"line-break":"anywhere"}},st={class:"form-check form-switch ms-auto"},ot=["for"],it={key:4,class:"spinner-border spinner-border-sm ms-2","aria-hidden":"true"},nt=["disabled","id"];function at(s,e,o,f,n,g){const c=_("ProtocolBadge"),l=_("RouterLink"),d=_("LocaleText");return i(),a("div",{class:m(["col-12",{"col-lg-6 col-xl-4":this.display==="Grid"}])},[t("div",E,[r(l,{to:"/configuration/"+o.c.Name+"/peers",class:"card-body d-flex align-items-center gap-3 flex-wrap text-decoration-none"},{default:S(()=>[t("h6",H,[t("span",{class:m(["dot",{active:o.c.Status}])},null,2)]),t("h6",Y,[t("samp",null,u(o.c.Name),1),t("small",null,[r(c,{protocol:o.c.Protocol,mini:!0},null,8,["protocol"])])]),e[2]||(e[2]=t("h6",{class:"mb-0 ms-auto"},[t("i",{class:"bi bi-chevron-right"})],-1))]),_:1,__:[2]},8,["to"]),t("div",A,[t("div",Q,[t("small",{class:m(["col-6",{"col-md-3":this.display==="List"}])},[e[3]||(e[3]=t("i",{class:"bi bi-arrow-down-up me-2"},null,-1)),v(u(o.c.DataUsage.Total>0?o.c.DataUsage.Total.toFixed(4):0)+" GB ",1)],2),t("small",{class:m(["text-primary-emphasis col-6",{"col-md-3":this.display==="List"}])},[e[4]||(e[4]=t("i",{class:"bi bi-arrow-down me-2"},null,-1)),v(u(o.c.DataUsage.Receive>0?o.c.DataUsage.Receive.toFixed(4):0)+" GB ",1)],2),t("small",{class:m(["text-success-emphasis col-6",{"col-md-3":this.display==="List"}])},[e[5]||(e[5]=t("i",{class:"bi bi-arrow-up me-2"},null,-1)),v(u(o.c.DataUsage.Sent>0?o.c.DataUsage.Sent.toFixed(4):0)+" GB ",1)],2),t("small",{class:m(["col-6",{"col-md-3 text-md-end ":this.display==="List"}])},[t("span",{class:m(["dot me-2",{active:o.c.ConnectedPeers>0}])},null,2),v(" "+u(o.c.ConnectedPeers)+" / "+u(o.c.TotalPeers)+" ",1),r(d,{t:"Peers"})],2)]),t("div",{class:m(["d-flex gap-2",[this.display==="Grid"?"flex-column":"gap-lg-3 flex-column flex-lg-row"]])},[t("div",X,[t("small",Z,[t("strong",null,[r(d,{t:"Public Key"})])]),t("small",tt,[t("samp",et,u(o.c.PublicKey),1)])]),t("div",st,[t("label",{class:"form-check-label",style:{cursor:"pointer"},for:"switch"+o.c.PrivateKey},[!o.c.Status&&this.configurationToggling?(i(),p(d,{key:0,t:"Turning Off..."})):o.c.Status&&this.configurationToggling?(i(),p(d,{key:1,t:"Turning On..."})):o.c.Status&&!this.configurationToggling?(i(),p(d,{key:2,t:"On"})):!o.c.Status&&!this.configurationToggling?(i(),p(d,{key:3,t:"Off"})):y("",!0),this.configurationToggling?(i(),a("span",it)):y("",!0)],8,ot),U(t("input",{class:"form-check-input",style:{cursor:"pointer"},disabled:this.configurationToggling,type:"checkbox",role:"switch",id:"switch"+o.c.PrivateKey,onChange:e[0]||(e[0]=L=>this.toggle()),"onUpdate:modelValue":e[1]||(e[1]=L=>o.c.Status=L)},null,40,nt),[[V,o.c.Status]])])],2)])])],2)}const rt=D(N,[["render",at],["__scopeId","data-v-dafd6275"]]),lt={class:"text-muted me-2"},ct={class:"fw-bold"},dt={__name:"storageMount",props:{mount:Object,align:Boolean,square:Boolean},setup(s){B(n=>({"2dc8ab7e":f.value}));const e=s,o=O(!1),f=K(()=>e.square?"40px":"25px");return(n,g)=>(i(),a("div",{class:"flex-grow-1 square rounded-3 border position-relative",onMouseenter:g[0]||(g[0]=c=>o.value=!0),onMouseleave:g[1]||(g[1]=c=>o.value=!1),style:w({"background-color":`rgb(25 135 84 / ${s.mount.percent}%)`})},[r(G,{name:"zoomReversed"},{default:S(()=>[o.value?(i(),a("div",{key:0,style:w([{"white-space":"nowrap"},{top:f.value}]),class:m(["floatingLabel z-3 border position-absolute d-block p-1 px-2 bg-body text-body rounded-3 border shadow d-flex",[s.align?"end-0":"start-0"]])},[t("small",lt,[t("samp",null,u(s.mount.mountPoint),1)]),t("small",ct,u(s.mount.percent)+"% ",1)],6)):y("",!0)]),_:1})],36))}},ut=D(dt,[["__scopeId","data-v-9509d7a0"]]),mt={class:"row text-body g-3 mb-5"},gt={class:"col-md-6 col-sm-12 col-xl-3"},ht={class:"d-flex align-items-center"},ft={class:"text-muted"},_t={class:"ms-auto"},pt={key:0},yt={key:1,class:"spinner-border spinner-border-sm"},bt={class:"progress",role:"progressbar",style:{height:"6px"}},St={class:"d-flex mt-2 gap-1"},vt={class:"col-md-6 col-sm-12 col-xl-3"},xt={class:"d-flex align-items-center"},wt={class:"text-muted"},kt={class:"ms-auto"},Ct={key:0},Lt={key:1,class:"spinner-border spinner-border-sm"},Dt={class:"progress",role:"progressbar",style:{height:"6px"}},$t={class:"d-flex mt-2 gap-1"},Nt={class:"col-md-6 col-sm-12 col-xl-3"},Tt={class:"d-flex align-items-center"},Pt={class:"text-muted"},Mt={class:"ms-auto"},It={key:0},Ut={key:1,class:"spinner-border spinner-border-sm"},Bt={class:"progress",role:"progressbar",style:{height:"6px"}},Kt={class:"col-md-6 col-sm-12 col-xl-3"},Gt={class:"d-flex align-items-center"},Vt={class:"text-muted"},Ot={class:"ms-auto"},Rt={key:0},Wt={key:1,class:"spinner-border spinner-border-sm"},qt={__name:"systemStatusWidget",setup(s){const e=I();let o=null;R(()=>{f(),o=setInterval(()=>{f()},5e3)}),W(()=>{clearInterval(o)});const f=()=>{M("/api/systemStatus",{},g=>{e.SystemStatus=g.data})},n=K(()=>e.SystemStatus);return(g,c)=>(i(),a("div",mt,[t("div",gt,[t("div",ht,[t("h6",ft,[c[0]||(c[0]=t("i",{class:"bi bi-cpu-fill me-2"},null,-1)),r(x,{t:"CPU"})]),t("h6",_t,[n.value?(i(),a("span",pt,u(n.value.CPU.cpu_percent)+"% ",1)):(i(),a("span",yt))])]),t("div",bt,[t("div",{class:"progress-bar",style:w({width:`${n.value?.CPU.cpu_percent}%`})},null,4)]),t("div",St,[(i(!0),a(k,null,C(n.value?.CPU.cpu_percent_per_cpu,(l,d)=>(i(),p(J,{key:d,align:d+1>Math.round(n.value?.CPU.cpu_percent_per_cpu.length/2),core_number:d,percentage:l},null,8,["align","core_number","percentage"]))),128))])]),t("div",vt,[t("div",xt,[t("h6",wt,[c[1]||(c[1]=t("i",{class:"bi bi-device-ssd-fill me-2"},null,-1)),r(x,{t:"Storage"})]),t("h6",kt,[n.value?(i(),a("span",Ct,u(n.value.Disks.find(l=>l.mountPoint==="/")?n.value?.Disks.find(l=>l.mountPoint==="/").percent:n.value?.Disks[0].percent)+"% ",1)):(i(),a("span",Lt))])]),t("div",Dt,[t("div",{class:"progress-bar bg-success",style:w({width:`${n.value?.Disks.find(l=>l.mountPoint==="/").percent}%`})},null,4)]),t("div",$t,[n.value?(i(!0),a(k,{key:0},C(n.value?.Disks,(l,d)=>(i(),p(ut,{key:l.mountPoint,align:d+1>Math.round(n.value?.Disks.length/2),mount:l},null,8,["align","mount"]))),128)):y("",!0)])]),t("div",Nt,[t("div",Tt,[t("h6",Pt,[c[2]||(c[2]=t("i",{class:"bi bi-memory me-2"},null,-1)),r(x,{t:"Memory"})]),t("h6",Mt,[n.value?(i(),a("span",It,u(n.value?.Memory.VirtualMemory.percent)+"% ",1)):(i(),a("span",Ut))])]),t("div",Bt,[t("div",{class:"progress-bar bg-info",style:w({width:`${n.value?.Memory.VirtualMemory.percent}%`})},null,4)])]),t("div",Kt,[t("div",Gt,[t("h6",Vt,[c[3]||(c[3]=t("i",{class:"bi bi-memory me-2"},null,-1)),r(x,{t:"Swap Memory"})]),t("h6",Ot,[n.value?(i(),a("span",Rt,u(n.value?.Memory.SwapMemory.percent)+"% ",1)):(i(),a("span",Wt))])]),c[4]||(c[4]=t("div",{class:"progress",role:"progressbar",style:{height:"6px"}},[t("div",{class:"progress-bar bg-warning",style:{width:"$ data?.Memory.SwapMemory.percent}%"}})],-1))])]))}},Ft=D(qt,[["__scopeId","data-v-c20f1a80"]]),zt={name:"configurationList",components:{SystemStatus:Ft,LocaleText:x,ConfigurationCard:rt},async setup(){return{wireguardConfigurationsStore:F()}},data(){return{configurationLoaded:!1,sort:{Name:$("Name"),Status:$("Status"),"DataUsage.Total":$("Total Usage")},currentSort:{key:"Name",order:"asc"},currentDisplay:"List",searchKey:""}},async mounted(){window.localStorage.getItem("ConfigurationListSort")?this.currentSort=JSON.parse(window.localStorage.getItem("ConfigurationListSort")):window.localStorage.setItem("ConfigurationListSort",JSON.stringify(this.currentSort)),window.localStorage.getItem("ConfigurationListDisplay")?this.currentDisplay=window.localStorage.getItem("ConfigurationListDisplay"):window.localStorage.setItem("ConfigurationListDisplay",this.currentDisplay),await this.wireguardConfigurationsStore.getConfigurations(),this.configurationLoaded=!0,this.wireguardConfigurationsStore.ConfigurationListInterval=setInterval(()=>{this.wireguardConfigurationsStore.getConfigurations()},1e4)},beforeUnmount(){clearInterval(this.wireguardConfigurationsStore.ConfigurationListInterval)},computed:{configurations(){return[...this.wireguardConfigurationsStore.Configurations].filter(s=>s.Name.toLowerCase().includes(this.searchKey)||s.PublicKey.includes(this.searchKey)||!this.searchKey).sort((s,e)=>this.currentSort.order==="desc"?this.dotNotation(s,this.currentSort.key)this.dotNotation(e,this.currentSort.key)?-1:0:this.dotNotation(s,this.currentSort.key)>this.dotNotation(e,this.currentSort.key)?1:this.dotNotation(s,this.currentSort.key)f&&f[n],s);return typeof o=="string"?o.toLowerCase():o},updateSort(s){this.currentSort.key===s?this.currentSort.order==="asc"?this.currentSort.order="desc":this.currentSort.order="asc":this.currentSort.key=s,window.localStorage.setItem("ConfigurationListSort",JSON.stringify(this.currentSort))},updateDisplay(s){this.currentDisplay!==s&&(this.currentDisplay=s,window.localStorage.setItem("ConfigurationListDisplay",this.currentDisplay))}}},jt={class:"mt-md-5 mt-3"},Jt={class:"container-fluid"},Et={class:"d-flex mb-4 configurationListTitle align-items-md-center gap-2 flex-column flex-md-row"},Ht={class:"text-body d-flex mb-0"},Yt={key:0,class:"text-body filter mb-3 d-flex gap-2 flex-column flex-md-row"},At={class:"d-flex align-items-center gap-3 align-items-center mb-3 mb-md-0"},Qt={class:"text-muted"},Xt={class:"d-flex ms-auto ms-lg-0"},Zt=["onClick"],te={class:"align-items-center gap-3 align-items-center mb-3 mb-md-0 d-none d-lg-flex"},ee={class:"text-muted"},se={class:"d-flex ms-auto ms-lg-0"},oe=["onClick"],ie={class:"d-flex align-items-center ms-md-auto"},ne={class:"row g-3 mb-2"},ae={class:"text-muted col-12",key:"noConfiguration"};function re(s,e,o,f,n,g){const c=_("SystemStatus"),l=_("LocaleText"),d=_("RouterLink"),L=_("ConfigurationCard");return i(),a("div",jt,[t("div",Jt,[r(c),t("div",Et,[t("h2",Ht,[r(l,{t:"WireGuard Configurations"})]),r(d,{to:"/new_configuration",class:"ms-md-auto py-2 text-decoration-none btn text-primary-emphasis bg-primary-subtle rounded-3 border-1 border-primary-subtle"},{default:S(()=>[e[1]||(e[1]=t("i",{class:"bi bi-plus-circle me-2"},null,-1)),r(l,{t:"Configuration"})]),_:1,__:[1]}),r(d,{to:"/restore_configuration",class:"py-2 text-decoration-none btn text-primary-emphasis bg-primary-subtle rounded-3 border-1 border-primary-subtle"},{default:S(()=>[e[2]||(e[2]=t("i",{class:"bi bi-clock-history me-2"},null,-1)),r(l,{t:"Restore"})]),_:1,__:[2]})]),r(G,{name:"fade"},{default:S(()=>[this.configurationLoaded?(i(),a("div",Yt,[t("div",At,[t("small",Qt,[r(l,{t:"Sort By"})]),t("div",Xt,[(i(!0),a(k,null,C(this.sort,(h,b)=>(i(),a("a",{role:"button",onClick:le=>g.updateSort(b),class:m([{"bg-primary-subtle text-primary-emphasis":this.currentSort.key===b},"px-2 py-1 rounded-3"])},[t("small",null,[this.currentSort.key===b?(i(),a("i",{key:0,class:m(["bi me-2",[this.currentSort.order==="asc"?"bi-sort-up":"bi-sort-down"]])},null,2)):y("",!0),v(u(h),1)])],10,Zt))),256))])]),t("div",te,[t("small",ee,[r(l,{t:"Display as"})]),t("div",se,[(i(),a(k,null,C([{name:"List",key:"list"},{name:"Grid",key:"grid"}],h=>t("a",{role:"button",onClick:b=>g.updateDisplay(h.name),class:m([{"bg-primary-subtle text-primary-emphasis":this.currentDisplay===h.name},"px-2 py-1 rounded-3"])},[t("small",null,[t("i",{class:m(["bi me-2","bi-"+h.key])},null,2),e[3]||(e[3]=v()),r(l,{t:h.name},null,8,["t"])])],10,oe)),64))])]),t("div",ie,[e[4]||(e[4]=t("label",{for:"configurationSearch",class:"text-muted"},[t("i",{class:"bi bi-search me-2"})],-1)),U(t("input",{class:"form-control form-control-sm rounded-3","onUpdate:modelValue":e[0]||(e[0]=h=>this.searchKey=h),id:"configurationSearch"},null,512),[[z,this.searchKey]])])])):y("",!0)]),_:1}),t("div",ne,[r(q,{name:"fade"},{default:S(()=>[this.configurationLoaded&&this.wireguardConfigurationsStore.Configurations.length===0?(i(),a("p",ae,[r(l,{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?(i(!0),a(k,{key:1},C(g.configurations,(h,b)=>(i(),p(L,{display:this.currentDisplay,delay:b*.03+"s",key:h.Name,c:h},null,8,["display","delay","c"]))),128)):y("",!0)]),_:1})])])])}const ge=D(zt,[["render",re],["__scopeId","data-v-ea61b607"]]);export{ge as default}; +import{_ as D,g as M,D as I,c as a,a as t,b as r,w as S,h as _,n as m,e as v,t as u,m as U,k as p,d as y,v as V,f as i,p as B,q as K,r as O,s as w,j as G,o as R,x as W,F as k,i as C,T as q,G as $,W as F,y as z}from"./index-Upsq31TS.js";import{L as x}from"./localeText-n7rlaTGQ.js";import{_ as j}from"./protocolBadge-CWFrznYs.js";import{C as J}from"./storageMount.vue_vue_type_style_index_0_scoped_9509d7a0_lang-BYo2xYes.js";const N={name:"configurationCard",components:{ProtocolBadge:j,LocaleText:x},props:{c:{Name:String,Status:Boolean,PublicKey:String,PrivateKey:String},delay:String,display:String},data(){return{configurationToggling:!1}},setup(){return{dashboardConfigurationStore:I()}},methods:{toggle(){this.configurationToggling=!0,M("/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})}}},T=()=>{B(s=>({"7d032b58":s.delay}))},P=N.setup;N.setup=P?(s,e)=>(T(),P(s,e)):T;const E={class:"card conf_card rounded-3 shadow text-decoration-none"},H={class:"mb-0"},Y={class:"card-title mb-0 d-flex align-items-center gap-2"},A={class:"card-footer d-flex gap-2 flex-column"},Q={class:"row"},X={class:"d-flex gap-2 align-items-center"},Z={class:"text-muted"},tt={class:"mb-0 d-block d-lg-inline-block"},et={style:{"line-break":"anywhere"}},st={class:"form-check form-switch ms-auto"},ot=["for"],it={key:4,class:"spinner-border spinner-border-sm ms-2","aria-hidden":"true"},nt=["disabled","id"];function at(s,e,o,f,n,g){const c=_("ProtocolBadge"),l=_("RouterLink"),d=_("LocaleText");return i(),a("div",{class:m(["col-12",{"col-lg-6 col-xl-4":this.display==="Grid"}])},[t("div",E,[r(l,{to:"/configuration/"+o.c.Name+"/peers",class:"card-body d-flex align-items-center gap-3 flex-wrap text-decoration-none"},{default:S(()=>[t("h6",H,[t("span",{class:m(["dot",{active:o.c.Status}])},null,2)]),t("h6",Y,[t("samp",null,u(o.c.Name),1),t("small",null,[r(c,{protocol:o.c.Protocol,mini:!0},null,8,["protocol"])])]),e[2]||(e[2]=t("h6",{class:"mb-0 ms-auto"},[t("i",{class:"bi bi-chevron-right"})],-1))]),_:1,__:[2]},8,["to"]),t("div",A,[t("div",Q,[t("small",{class:m(["col-6",{"col-md-3":this.display==="List"}])},[e[3]||(e[3]=t("i",{class:"bi bi-arrow-down-up me-2"},null,-1)),v(u(o.c.DataUsage.Total>0?o.c.DataUsage.Total.toFixed(4):0)+" GB ",1)],2),t("small",{class:m(["text-primary-emphasis col-6",{"col-md-3":this.display==="List"}])},[e[4]||(e[4]=t("i",{class:"bi bi-arrow-down me-2"},null,-1)),v(u(o.c.DataUsage.Receive>0?o.c.DataUsage.Receive.toFixed(4):0)+" GB ",1)],2),t("small",{class:m(["text-success-emphasis col-6",{"col-md-3":this.display==="List"}])},[e[5]||(e[5]=t("i",{class:"bi bi-arrow-up me-2"},null,-1)),v(u(o.c.DataUsage.Sent>0?o.c.DataUsage.Sent.toFixed(4):0)+" GB ",1)],2),t("small",{class:m(["col-6",{"col-md-3 text-md-end ":this.display==="List"}])},[t("span",{class:m(["dot me-2",{active:o.c.ConnectedPeers>0}])},null,2),v(" "+u(o.c.ConnectedPeers)+" / "+u(o.c.TotalPeers)+" ",1),r(d,{t:"Peers"})],2)]),t("div",{class:m(["d-flex gap-2",[this.display==="Grid"?"flex-column":"gap-lg-3 flex-column flex-lg-row"]])},[t("div",X,[t("small",Z,[t("strong",null,[r(d,{t:"Public Key"})])]),t("small",tt,[t("samp",et,u(o.c.PublicKey),1)])]),t("div",st,[t("label",{class:"form-check-label",style:{cursor:"pointer"},for:"switch"+o.c.PrivateKey},[!o.c.Status&&this.configurationToggling?(i(),p(d,{key:0,t:"Turning Off..."})):o.c.Status&&this.configurationToggling?(i(),p(d,{key:1,t:"Turning On..."})):o.c.Status&&!this.configurationToggling?(i(),p(d,{key:2,t:"On"})):!o.c.Status&&!this.configurationToggling?(i(),p(d,{key:3,t:"Off"})):y("",!0),this.configurationToggling?(i(),a("span",it)):y("",!0)],8,ot),U(t("input",{class:"form-check-input",style:{cursor:"pointer"},disabled:this.configurationToggling,type:"checkbox",role:"switch",id:"switch"+o.c.PrivateKey,onChange:e[0]||(e[0]=L=>this.toggle()),"onUpdate:modelValue":e[1]||(e[1]=L=>o.c.Status=L)},null,40,nt),[[V,o.c.Status]])])],2)])])],2)}const rt=D(N,[["render",at],["__scopeId","data-v-dafd6275"]]),lt={class:"text-muted me-2"},ct={class:"fw-bold"},dt={__name:"storageMount",props:{mount:Object,align:Boolean,square:Boolean},setup(s){B(n=>({"2dc8ab7e":f.value}));const e=s,o=O(!1),f=K(()=>e.square?"40px":"25px");return(n,g)=>(i(),a("div",{class:"flex-grow-1 square rounded-3 border position-relative",onMouseenter:g[0]||(g[0]=c=>o.value=!0),onMouseleave:g[1]||(g[1]=c=>o.value=!1),style:w({"background-color":`rgb(25 135 84 / ${s.mount.percent}%)`})},[r(G,{name:"zoomReversed"},{default:S(()=>[o.value?(i(),a("div",{key:0,style:w([{"white-space":"nowrap"},{top:f.value}]),class:m(["floatingLabel z-3 border position-absolute d-block p-1 px-2 bg-body text-body rounded-3 border shadow d-flex",[s.align?"end-0":"start-0"]])},[t("small",lt,[t("samp",null,u(s.mount.mountPoint),1)]),t("small",ct,u(s.mount.percent)+"% ",1)],6)):y("",!0)]),_:1})],36))}},ut=D(dt,[["__scopeId","data-v-9509d7a0"]]),mt={class:"row text-body g-3 mb-5"},gt={class:"col-md-6 col-sm-12 col-xl-3"},ht={class:"d-flex align-items-center"},ft={class:"text-muted"},_t={class:"ms-auto"},pt={key:0},yt={key:1,class:"spinner-border spinner-border-sm"},bt={class:"progress",role:"progressbar",style:{height:"6px"}},St={class:"d-flex mt-2 gap-1"},vt={class:"col-md-6 col-sm-12 col-xl-3"},xt={class:"d-flex align-items-center"},wt={class:"text-muted"},kt={class:"ms-auto"},Ct={key:0},Lt={key:1,class:"spinner-border spinner-border-sm"},Dt={class:"progress",role:"progressbar",style:{height:"6px"}},$t={class:"d-flex mt-2 gap-1"},Nt={class:"col-md-6 col-sm-12 col-xl-3"},Tt={class:"d-flex align-items-center"},Pt={class:"text-muted"},Mt={class:"ms-auto"},It={key:0},Ut={key:1,class:"spinner-border spinner-border-sm"},Bt={class:"progress",role:"progressbar",style:{height:"6px"}},Kt={class:"col-md-6 col-sm-12 col-xl-3"},Gt={class:"d-flex align-items-center"},Vt={class:"text-muted"},Ot={class:"ms-auto"},Rt={key:0},Wt={key:1,class:"spinner-border spinner-border-sm"},qt={__name:"systemStatusWidget",setup(s){const e=I();let o=null;R(()=>{f(),o=setInterval(()=>{f()},5e3)}),W(()=>{clearInterval(o)});const f=()=>{M("/api/systemStatus",{},g=>{e.SystemStatus=g.data})},n=K(()=>e.SystemStatus);return(g,c)=>(i(),a("div",mt,[t("div",gt,[t("div",ht,[t("h6",ft,[c[0]||(c[0]=t("i",{class:"bi bi-cpu-fill me-2"},null,-1)),r(x,{t:"CPU"})]),t("h6",_t,[n.value?(i(),a("span",pt,u(n.value.CPU.cpu_percent)+"% ",1)):(i(),a("span",yt))])]),t("div",bt,[t("div",{class:"progress-bar",style:w({width:`${n.value?.CPU.cpu_percent}%`})},null,4)]),t("div",St,[(i(!0),a(k,null,C(n.value?.CPU.cpu_percent_per_cpu,(l,d)=>(i(),p(J,{key:d,align:d+1>Math.round(n.value?.CPU.cpu_percent_per_cpu.length/2),core_number:d,percentage:l},null,8,["align","core_number","percentage"]))),128))])]),t("div",vt,[t("div",xt,[t("h6",wt,[c[1]||(c[1]=t("i",{class:"bi bi-device-ssd-fill me-2"},null,-1)),r(x,{t:"Storage"})]),t("h6",kt,[n.value?(i(),a("span",Ct,u(n.value.Disks.find(l=>l.mountPoint==="/")?n.value?.Disks.find(l=>l.mountPoint==="/").percent:n.value?.Disks[0].percent)+"% ",1)):(i(),a("span",Lt))])]),t("div",Dt,[t("div",{class:"progress-bar bg-success",style:w({width:`${n.value?.Disks.find(l=>l.mountPoint==="/").percent}%`})},null,4)]),t("div",$t,[n.value?(i(!0),a(k,{key:0},C(n.value?.Disks,(l,d)=>(i(),p(ut,{key:l.mountPoint,align:d+1>Math.round(n.value?.Disks.length/2),mount:l},null,8,["align","mount"]))),128)):y("",!0)])]),t("div",Nt,[t("div",Tt,[t("h6",Pt,[c[2]||(c[2]=t("i",{class:"bi bi-memory me-2"},null,-1)),r(x,{t:"Memory"})]),t("h6",Mt,[n.value?(i(),a("span",It,u(n.value?.Memory.VirtualMemory.percent)+"% ",1)):(i(),a("span",Ut))])]),t("div",Bt,[t("div",{class:"progress-bar bg-info",style:w({width:`${n.value?.Memory.VirtualMemory.percent}%`})},null,4)])]),t("div",Kt,[t("div",Gt,[t("h6",Vt,[c[3]||(c[3]=t("i",{class:"bi bi-memory me-2"},null,-1)),r(x,{t:"Swap Memory"})]),t("h6",Ot,[n.value?(i(),a("span",Rt,u(n.value?.Memory.SwapMemory.percent)+"% ",1)):(i(),a("span",Wt))])]),c[4]||(c[4]=t("div",{class:"progress",role:"progressbar",style:{height:"6px"}},[t("div",{class:"progress-bar bg-warning",style:{width:"$ data?.Memory.SwapMemory.percent}%"}})],-1))])]))}},Ft=D(qt,[["__scopeId","data-v-c20f1a80"]]),zt={name:"configurationList",components:{SystemStatus:Ft,LocaleText:x,ConfigurationCard:rt},async setup(){return{wireguardConfigurationsStore:F()}},data(){return{configurationLoaded:!1,sort:{Name:$("Name"),Status:$("Status"),"DataUsage.Total":$("Total Usage")},currentSort:{key:"Name",order:"asc"},currentDisplay:"List",searchKey:""}},async mounted(){window.localStorage.getItem("ConfigurationListSort")?this.currentSort=JSON.parse(window.localStorage.getItem("ConfigurationListSort")):window.localStorage.setItem("ConfigurationListSort",JSON.stringify(this.currentSort)),window.localStorage.getItem("ConfigurationListDisplay")?this.currentDisplay=window.localStorage.getItem("ConfigurationListDisplay"):window.localStorage.setItem("ConfigurationListDisplay",this.currentDisplay),await this.wireguardConfigurationsStore.getConfigurations(),this.configurationLoaded=!0,this.wireguardConfigurationsStore.ConfigurationListInterval=setInterval(()=>{this.wireguardConfigurationsStore.getConfigurations()},1e4)},beforeUnmount(){clearInterval(this.wireguardConfigurationsStore.ConfigurationListInterval)},computed:{configurations(){return[...this.wireguardConfigurationsStore.Configurations].filter(s=>s.Name.toLowerCase().includes(this.searchKey)||s.PublicKey.includes(this.searchKey)||!this.searchKey).sort((s,e)=>this.currentSort.order==="desc"?this.dotNotation(s,this.currentSort.key)this.dotNotation(e,this.currentSort.key)?-1:0:this.dotNotation(s,this.currentSort.key)>this.dotNotation(e,this.currentSort.key)?1:this.dotNotation(s,this.currentSort.key)f&&f[n],s);return typeof o=="string"?o.toLowerCase():o},updateSort(s){this.currentSort.key===s?this.currentSort.order==="asc"?this.currentSort.order="desc":this.currentSort.order="asc":this.currentSort.key=s,window.localStorage.setItem("ConfigurationListSort",JSON.stringify(this.currentSort))},updateDisplay(s){this.currentDisplay!==s&&(this.currentDisplay=s,window.localStorage.setItem("ConfigurationListDisplay",this.currentDisplay))}}},jt={class:"mt-md-5 mt-3"},Jt={class:"container-fluid"},Et={class:"d-flex mb-4 configurationListTitle align-items-md-center gap-2 flex-column flex-md-row"},Ht={class:"text-body d-flex mb-0"},Yt={key:0,class:"text-body filter mb-3 d-flex gap-2 flex-column flex-md-row"},At={class:"d-flex align-items-center gap-3 align-items-center mb-3 mb-md-0"},Qt={class:"text-muted"},Xt={class:"d-flex ms-auto ms-lg-0"},Zt=["onClick"],te={class:"align-items-center gap-3 align-items-center mb-3 mb-md-0 d-none d-lg-flex"},ee={class:"text-muted"},se={class:"d-flex ms-auto ms-lg-0"},oe=["onClick"],ie={class:"d-flex align-items-center ms-md-auto"},ne={class:"row g-3 mb-2"},ae={class:"text-muted col-12",key:"noConfiguration"};function re(s,e,o,f,n,g){const c=_("SystemStatus"),l=_("LocaleText"),d=_("RouterLink"),L=_("ConfigurationCard");return i(),a("div",jt,[t("div",Jt,[r(c),t("div",Et,[t("h2",Ht,[r(l,{t:"WireGuard Configurations"})]),r(d,{to:"/new_configuration",class:"ms-md-auto py-2 text-decoration-none btn text-primary-emphasis bg-primary-subtle rounded-3 border-1 border-primary-subtle"},{default:S(()=>[e[1]||(e[1]=t("i",{class:"bi bi-plus-circle me-2"},null,-1)),r(l,{t:"Configuration"})]),_:1,__:[1]}),r(d,{to:"/restore_configuration",class:"py-2 text-decoration-none btn text-primary-emphasis bg-primary-subtle rounded-3 border-1 border-primary-subtle"},{default:S(()=>[e[2]||(e[2]=t("i",{class:"bi bi-clock-history me-2"},null,-1)),r(l,{t:"Restore"})]),_:1,__:[2]})]),r(G,{name:"fade"},{default:S(()=>[this.configurationLoaded?(i(),a("div",Yt,[t("div",At,[t("small",Qt,[r(l,{t:"Sort By"})]),t("div",Xt,[(i(!0),a(k,null,C(this.sort,(h,b)=>(i(),a("a",{role:"button",onClick:le=>g.updateSort(b),class:m([{"bg-primary-subtle text-primary-emphasis":this.currentSort.key===b},"px-2 py-1 rounded-3"])},[t("small",null,[this.currentSort.key===b?(i(),a("i",{key:0,class:m(["bi me-2",[this.currentSort.order==="asc"?"bi-sort-up":"bi-sort-down"]])},null,2)):y("",!0),v(u(h),1)])],10,Zt))),256))])]),t("div",te,[t("small",ee,[r(l,{t:"Display as"})]),t("div",se,[(i(),a(k,null,C([{name:"List",key:"list"},{name:"Grid",key:"grid"}],h=>t("a",{role:"button",onClick:b=>g.updateDisplay(h.name),class:m([{"bg-primary-subtle text-primary-emphasis":this.currentDisplay===h.name},"px-2 py-1 rounded-3"])},[t("small",null,[t("i",{class:m(["bi me-2","bi-"+h.key])},null,2),e[3]||(e[3]=v()),r(l,{t:h.name},null,8,["t"])])],10,oe)),64))])]),t("div",ie,[e[4]||(e[4]=t("label",{for:"configurationSearch",class:"text-muted"},[t("i",{class:"bi bi-search me-2"})],-1)),U(t("input",{class:"form-control form-control-sm rounded-3","onUpdate:modelValue":e[0]||(e[0]=h=>this.searchKey=h),id:"configurationSearch"},null,512),[[z,this.searchKey]])])])):y("",!0)]),_:1}),t("div",ne,[r(q,{name:"fade"},{default:S(()=>[this.configurationLoaded&&this.wireguardConfigurationsStore.Configurations.length===0?(i(),a("p",ae,[r(l,{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?(i(!0),a(k,{key:1},C(g.configurations,(h,b)=>(i(),p(L,{display:this.currentDisplay,delay:b*.03+"s",key:h.Name,c:h},null,8,["display","delay","c"]))),128)):y("",!0)]),_:1})])])])}const ge=D(zt,[["render",re],["__scopeId","data-v-ea61b607"]]);export{ge as default}; diff --git a/src/static/app/dist/assets/dayjs.min-H8Pjp0HL.js b/src/static/app/dist/assets/dayjs.min-Cdu5c05l.js similarity index 99% rename from src/static/app/dist/assets/dayjs.min-H8Pjp0HL.js rename to src/static/app/dist/assets/dayjs.min-Cdu5c05l.js index 2ccf353..da1e754 100644 --- a/src/static/app/dist/assets/dayjs.min-H8Pjp0HL.js +++ b/src/static/app/dist/assets/dayjs.min-Cdu5c05l.js @@ -1 +1 @@ -import{a2 as G}from"./index-BaGiSoQe.js";var W={exports:{}},K=W.exports,E;function X(){return E||(E=1,function(V,et){(function(A,x){V.exports=x()})(K,function(){var A=1e3,x=6e4,U=36e5,I="millisecond",S="second",w="minute",_="hour",M="day",H="week",m="month",J="quarter",y="year",O="date",Z="Invalid Date",B=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,P=/\[([^\]]+)]|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,Q={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])+"]"}},F=function(s,n,t){var r=String(s);return!r||r.length>=n?s:""+Array(n+1-r.length).join(t)+s},R={s:F,z:function(s){var n=-s.utcOffset(),t=Math.abs(n),r=Math.floor(t/60),e=t%60;return(n<=0?"+":"-")+F(r,2,"0")+":"+F(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&&(k=e),e||!r&&k},f=function(s,n){if(N(s))return s.clone();var t=typeof n=="object"?n:{};return t.date=s,t.args=arguments,new C(t)},a=R;a.l=T,a.i=N,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=T(t.locale,null,!0),this.parse(t),this.$x=this.$x||t.x||{},this[q]=!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(B);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)=n?s:""+Array(n+1-r.length).join(t)+s},R={s:F,z:function(s){var n=-s.utcOffset(),t=Math.abs(n),r=Math.floor(t/60),e=t%60;return(n<=0?"+":"-")+F(r,2,"0")+":"+F(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&&(k=e),e||!r&&k},f=function(s,n){if(N(s))return s.clone();var t=typeof n=="object"?n:{};return t.date=s,t.args=arguments,new C(t)},a=R;a.l=T,a.i=N,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=T(t.locale,null,!0),this.parse(t),this.$x=this.$x||t.x||{},this[q]=!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(B);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){G(()=>s.data,y=>{s.valid=/^[a-zA-Z0-9_=+.-]{1,15}$/.test(y)&&y.length>0&&!f.Configurations.find(w=>w.Name===y)})});const u=O(),h=x(!1),g=q(),b=async()=>{s.data&&(h.value=!0,clearInterval(u.Peers.RefreshInterval),await W("/api/renameWireguardConfiguration",{ConfigurationName:t.configurationName,NewConfigurationName:s.data},async y=>{y.status?(await f.getConfigurations(),u.newMessage("Server","Configuration renamed","success"),g.push(`/configuration/${s.data}/peers`)):(u.newMessage("Server",y.message,"danger"),h.value=!1)}))};return(y,w)=>(c(),v("div",le,[e("div",de,[e("p",null,[o(i,{t:"To update this configuration's name, WGDashboard will execute the following operations:"})]),e("ol",null,[e("li",null,[o(i,{t:"Duplicate current configuration's database table and .conf file with the new name"})]),e("li",null,[o(i,{t:"Delete current configuration's database table and .conf file"})])]),e("div",re,[e("input",{class:"form-control form-control-sm rounded-3",value:l.configurationName,disabled:""},null,8,ue),w[3]||(w[3]=e("h3",{class:"mb-0"},[e("i",{class:"bi bi-arrow-right"})],-1)),B(e("input",{class:$(["form-control form-control-sm rounded-3",[s.data?s.valid?"is-valid":"is-invalid":""]]),id:"newConfigurationName","onUpdate:modelValue":w[0]||(w[0]=_=>s.data=_)},null,2),[[P,s.data]])]),e("div",{class:$(["invalid-feedback",{"d-block":!s.valid&&s.data}])},[o(i,{t:"Configuration name is invalid. Possible reasons:"}),e("ul",ce,[e("li",null,[o(i,{t:"Configuration name already exist"})]),e("li",null,[o(i,{t:"Configuration name can only contain 15 lower/uppercase alphabet, numbers, underscore, equal sign, plus sign, period and hyphen."})])])],2),e("div",ge,[e("button",{onClick:w[1]||(w[1]=_=>p("close")),class:"btn btn-sm bg-secondary-subtle border-secondary-subtle text-secondary-emphasis rounded-3"},[o(i,{t:"Cancel"})]),e("button",{onClick:w[2]||(w[2]=_=>b()),disabled:!s.data||h.value,class:"btn btn-sm btn-danger rounded-3 ms-auto"},[o(i,{t:"Save"})],8,fe)])])]))}},be=z(me,[["__scopeId","data-v-33ea9576"]]),ve={name:"Dropdown",props:{width:{type:String,default:"80px"},height:{type:String,default:"auto"},title:{type:String,default:""},disabled:{type:Boolean,default:!1},defaultDisplay:{type:Boolean,default:!1}}},pe={class:"title"};function he(l,d,t,p,s,f){return c(),v("div",{class:$(["dropdown",{disabled:t.disabled}]),onClick:d[0]||(d[0]=(...u)=>l.toggleDropdown&&l.toggleDropdown(...u)),onFocusout:d[1]||(d[1]=(...u)=>l.hideDropdown&&l.hideDropdown(...u)),tabindex:"0"},[e("div",pe,[e("div",null,D(t.title),1)])],34)}const ye=z(ve,[["render",he]]),xe={components:{Dropdown:ye},name:"CodeEditor",props:{lineNums:{type:Boolean,default:!1},modelValue:{type:String},value:{type:String},theme:{type:String,default:"github-dark"},tabSpaces:{type:Number,default:2},wrap:{type:Boolean,default:!1},readOnly:{type:Boolean,default:!1},autofocus:{type:Boolean,default:!1},header:{type:Boolean,default:!0},width:{type:String,default:"540px"},height:{type:String,default:"auto"},maxWidth:{type:String},minWidth:{type:String},maxHeight:{type:String},minHeight:{type:String},borderRadius:{type:String,default:"12px"},languages:{type:Array,default:function(){return[["javascript","JS"]]}},langListWidth:{type:String,default:"110px"},langListHeight:{type:String,default:"auto"},langListDisplay:{type:Boolean,default:!1},displayLanguage:{type:Boolean,default:!0},zIndex:{type:String,default:"0"},fontSize:{type:String,default:"17px"},padding:{type:String,default:"20px"}},directives:{highlight:{mounted(l,d){l.textContent=d.value},updated(l,d){l.scrolling?l.scrolling=!1:l.textContent=d.value}}},data(){return{scrollBarWidth:0,scrollBarHeight:0,top:0,left:0,languageClass:"hljs language-"+this.languages[0][0],languageTitle:this.languages[0][1]?this.languages[0][1]:this.languages[0][0],content:this.value,cursorPosition:0,insertTab:!1,lineNum:0,lineNumsWidth:0,scrolling:!1,textareaHeight:0,showLineNums:this.wrap?!1:this.lineNums}},computed:{tabWidth(){let l="";for(let d=0;d{G(()=>s.data,y=>{s.valid=/^[a-zA-Z0-9_=+.-]{1,15}$/.test(y)&&y.length>0&&!f.Configurations.find(w=>w.Name===y)})});const u=O(),h=x(!1),g=q(),b=async()=>{s.data&&(h.value=!0,clearInterval(u.Peers.RefreshInterval),await W("/api/renameWireguardConfiguration",{ConfigurationName:t.configurationName,NewConfigurationName:s.data},async y=>{y.status?(await f.getConfigurations(),u.newMessage("Server","Configuration renamed","success"),g.push(`/configuration/${s.data}/peers`)):(u.newMessage("Server",y.message,"danger"),h.value=!1)}))};return(y,w)=>(c(),v("div",le,[e("div",de,[e("p",null,[o(i,{t:"To update this configuration's name, WGDashboard will execute the following operations:"})]),e("ol",null,[e("li",null,[o(i,{t:"Duplicate current configuration's database table and .conf file with the new name"})]),e("li",null,[o(i,{t:"Delete current configuration's database table and .conf file"})])]),e("div",re,[e("input",{class:"form-control form-control-sm rounded-3",value:l.configurationName,disabled:""},null,8,ue),w[3]||(w[3]=e("h3",{class:"mb-0"},[e("i",{class:"bi bi-arrow-right"})],-1)),B(e("input",{class:$(["form-control form-control-sm rounded-3",[s.data?s.valid?"is-valid":"is-invalid":""]]),id:"newConfigurationName","onUpdate:modelValue":w[0]||(w[0]=_=>s.data=_)},null,2),[[P,s.data]])]),e("div",{class:$(["invalid-feedback",{"d-block":!s.valid&&s.data}])},[o(i,{t:"Configuration name is invalid. Possible reasons:"}),e("ul",ce,[e("li",null,[o(i,{t:"Configuration name already exist"})]),e("li",null,[o(i,{t:"Configuration name can only contain 15 lower/uppercase alphabet, numbers, underscore, equal sign, plus sign, period and hyphen."})])])],2),e("div",ge,[e("button",{onClick:w[1]||(w[1]=_=>p("close")),class:"btn btn-sm bg-secondary-subtle border-secondary-subtle text-secondary-emphasis rounded-3"},[o(i,{t:"Cancel"})]),e("button",{onClick:w[2]||(w[2]=_=>b()),disabled:!s.data||h.value,class:"btn btn-sm btn-danger rounded-3 ms-auto"},[o(i,{t:"Save"})],8,fe)])])]))}},be=z(me,[["__scopeId","data-v-33ea9576"]]),ve={name:"Dropdown",props:{width:{type:String,default:"80px"},height:{type:String,default:"auto"},title:{type:String,default:""},disabled:{type:Boolean,default:!1},defaultDisplay:{type:Boolean,default:!1}}},pe={class:"title"};function he(l,d,t,p,s,f){return c(),v("div",{class:$(["dropdown",{disabled:t.disabled}]),onClick:d[0]||(d[0]=(...u)=>l.toggleDropdown&&l.toggleDropdown(...u)),onFocusout:d[1]||(d[1]=(...u)=>l.hideDropdown&&l.hideDropdown(...u)),tabindex:"0"},[e("div",pe,[e("div",null,D(t.title),1)])],34)}const ye=z(ve,[["render",he]]),xe={components:{Dropdown:ye},name:"CodeEditor",props:{lineNums:{type:Boolean,default:!1},modelValue:{type:String},value:{type:String},theme:{type:String,default:"github-dark"},tabSpaces:{type:Number,default:2},wrap:{type:Boolean,default:!1},readOnly:{type:Boolean,default:!1},autofocus:{type:Boolean,default:!1},header:{type:Boolean,default:!0},width:{type:String,default:"540px"},height:{type:String,default:"auto"},maxWidth:{type:String},minWidth:{type:String},maxHeight:{type:String},minHeight:{type:String},borderRadius:{type:String,default:"12px"},languages:{type:Array,default:function(){return[["javascript","JS"]]}},langListWidth:{type:String,default:"110px"},langListHeight:{type:String,default:"auto"},langListDisplay:{type:Boolean,default:!1},displayLanguage:{type:Boolean,default:!0},zIndex:{type:String,default:"0"},fontSize:{type:String,default:"17px"},padding:{type:String,default:"20px"}},directives:{highlight:{mounted(l,d){l.textContent=d.value},updated(l,d){l.scrolling?l.scrolling=!1:l.textContent=d.value}}},data(){return{scrollBarWidth:0,scrollBarHeight:0,top:0,left:0,languageClass:"hljs language-"+this.languages[0][0],languageTitle:this.languages[0][1]?this.languages[0][1]:this.languages[0][0],content:this.value,cursorPosition:0,insertTab:!1,lineNum:0,lineNumsWidth:0,scrolling:!1,textareaHeight:0,showLineNums:this.wrap?!1:this.lineNums}},computed:{tabWidth(){let l="";for(let d=0;d{this.scrollBarWidth=t[0].target.offsetWidth-t[0].target.clientWidth,this.scrollBarHeight=t[0].target.offsetHeight-t[0].target.clientHeight,this.textareaHeight=t[0].target.offsetHeight}).observe(this.$refs.textarea);const d=new ResizeObserver(t=>{this.lineNumsWidth=t[0].target.offsetWidth});this.$refs.lineNums&&d.observe(this.$refs.lineNums)},copy(){document.execCommand("copy")?(this.$refs.textarea.select(),document.execCommand("copy"),window.getSelection().removeAllRanges()):navigator.clipboard.writeText(this.$refs.textarea.value)},getLineNum(){const l=this.$refs.textarea.value;let d=0,t=l.indexOf(` `);for(;t!==-1;)d++,t=l.indexOf(` diff --git a/src/static/app/dist/assets/index-1mVjWyYI.js b/src/static/app/dist/assets/index-1mVjWyYI.js deleted file mode 100644 index 3a1f2f4..0000000 --- a/src/static/app/dist/assets/index-1mVjWyYI.js +++ /dev/null @@ -1 +0,0 @@ -import{r as M,o as H,c,a as e,b as s,d as h,e as b,t as v,f as o,_ as S,D as y,w as d,T as w,n as k,u as L,g as T,W as G,h as f,F as A,i as D,j as $,G as N,k as x,S as W,l as z}from"./index-BaGiSoQe.js";import{L as m}from"./localeText-DkjxgEQB.js";import"./dayjs.min-H8Pjp0HL.js";import{M as V}from"./message-DmK834mY.js";const O={class:"peerSettingContainer w-100 h-100 position-absolute top-0 start-0 overflow-y-scroll"},U={class:"container d-flex h-100 w-100"},j={class:"m-auto modal-dialog-centered dashboardModal"},B={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"},F={class:"mb-0"},I={class:"card-body px-4 pb-4 d-flex flex-column gap-2"},q={class:"card text-decoration-none",target:"_blank",role:"button",href:"https://discord.gg/72TwzjeuWm"},E={class:"card-body d-flex gap-4 align-items-center"},J={class:"d-flex align-items-center"},P={class:"badge rounded-pill text-bg-primary ms-2"},Y={key:0,class:"spinner-border spinner-border-sm",style:{width:"0.7rem",height:"0.7rem"}},K={key:1},Q={class:"text-muted"},X={class:"card text-decoration-none",href:"https://donaldzou.github.io/WGDashboard-Documentation/",target:"_blank"},Z={class:"card-body d-flex gap-4 align-items-center"},ee={class:"mb-0"},te={class:"text-muted"},se={__name:"helpModal",setup(i){const t=M(!0),_=M(void 0);return H(()=>{t.value=!0,fetch("https://discord.com/api/guilds/1276818723637956628/widget.json").then(r=>r.json()).then(r=>{_.value=r,t.value=!1}).catch(()=>{t.value=!1})}),(r,a)=>(o(),c("div",O,[e("div",U,[e("div",j,[e("div",B,[e("div",R,[e("h4",F,[s(m,{t:"Help"})]),e("button",{type:"button",class:"btn-close ms-auto",onClick:a[0]||(a[0]=l=>r.$emit("close"))})]),e("div",I,[e("a",q,[e("div",E,[a[3]||(a[3]=e("h1",{class:"mb-0"},[e("i",{class:"bi bi-discord"})],-1)),e("div",null,[e("div",J,[a[2]||(a[2]=e("h5",{class:"mb-0"}," Discord Server ",-1)),e("span",P,[t.value?(o(),c("span",Y)):h("",!0),_.value!==void 0&&!t.value?(o(),c("span",K,[a[1]||(a[1]=e("i",{class:"bi bi-person-fill me-2"},null,-1)),b(v(_.value.presence_count)+" Online ",1)])):h("",!0)])]),e("small",Q,[s(m,{t:"Join our Discord server for quick help or chat about WGDashboard!"})])])])]),e("a",X,[e("div",Z,[a[4]||(a[4]=e("h1",{class:"mb-0"},[e("i",{class:"bi bi-hash"})],-1)),e("div",null,[e("h5",ee,[s(m,{t:"Official Documentation"})]),e("small",te,[s(m,{t:"Official documentation contains User Guides and more..."})])])])])])])])])]))}},oe={key:"header",class:"shadow"},ae={class:"p-3 d-flex gap-2 flex-column"},ne={class:"d-flex text-body"},ie={class:"d-flex flex-column align-items-start gap-1"},le={class:"mb-0"},de={class:"mb-0"},re={class:"list-group"},ce={href:"https://donaldzou.github.io/WGDashboard-Documentation/",target:"_blank",class:"list-group-item list-group-item-action d-flex align-items-center"},ue={target:"_blank",role:"button",href:"https://discord.gg/72TwzjeuWm",class:"list-group-item list-group-item-action d-flex align-items-center"},me={__name:"agentModal",emits:["close"],setup(i,{emit:t}){const _=t,r=y();return(a,l)=>(o(),c("div",{class:k(["agentContainer m-2 rounded-3 d-flex flex-column text-body",{enabled:L(r).HelpAgent.Enable}])},[s(w,{name:"agent-message"},{default:d(()=>[e("div",oe,[e("div",ae,[e("div",ne,[e("div",ie,[e("h5",le,[s(m,{t:"Help"})])]),e("a",{role:"button",class:"ms-auto text-body",onClick:l[0]||(l[0]=n=>_("close"))},l[1]||(l[1]=[e("h5",{class:"mb-0"},[e("i",{class:"bi bi-x-lg"})],-1)]))]),e("p",de,[s(m,{t:"You can visit our: "})]),e("div",re,[e("a",ce,[l[2]||(l[2]=e("i",{class:"bi bi-book-fill"},null,-1)),s(m,{class:"ms-auto",t:"Official Documentation"})]),e("a",ue,[l[3]||(l[3]=e("i",{class:"bi bi-discord"},null,-1)),s(m,{class:"ms-auto",t:"Discord Server"})])])])])]),_:1})],2))}},_e=S(me,[["__scopeId","data-v-a76f42bd"]]),ge={name:"navbar",components:{HelpModal:se,LocaleText:m,AgentModal:_e},setup(){const i=G(),t=y();return{wireguardConfigurationsStore:i,dashboardConfigurationStore:t}},data(){return{updateAvailable:!1,updateMessage:"Checking for update...",updateUrl:"",openHelpModal:!1,openAgentModal:!1}},computed:{getActiveCrossServer(){if(this.dashboardConfigurationStore.ActiveServerConfiguration)return new URL(this.dashboardConfigurationStore.CrossServerConfiguration.ServerList[this.dashboardConfigurationStore.ActiveServerConfiguration].host)}},mounted(){T("/api/getDashboardUpdate",{},i=>{i.status?(i.data&&(this.updateAvailable=!0,this.updateUrl=i.data),this.updateMessage=i.message):(this.updateMessage=N("Failed to check available update"),console.log(`Failed to get update: ${i.message}`))})}},fe=["data-bs-theme"],pe={id:"sidebarMenu",class:"bg-body-tertiary sidebar border h-100 rounded-3 shadow overflow-y-scroll"},be={class:"sidebar-sticky"},ve={class:"text-white text-center m-0 py-3 mb-2 btn-brand"},he={key:0,class:"ms-auto"},xe={class:"nav flex-column px-2 gap-1"},Ce={class:"nav-item"},ke={class:"nav-item"},$e={class:"nav-item"},Se={class:"nav-item"},ye={class:"sidebar-heading px-3 mt-3 mb-1 text-muted text-center"},Me={class:"nav flex-column px-2 gap-1"},we={class:"nav-item"},Ae={class:"sidebar-heading px-3 mt-3 mb-1 text-muted text-center"},De={class:"nav flex-column px-2 gap-1"},He={class:"nav-item"},Le={class:"nav-item"},Te={class:"nav-item"},Ge={class:"nav flex-column px-2 mb-3"},Ne={class:"nav-item"},We={class:"nav-item",style:{"font-size":"0.8rem"}},ze=["href"],Ve={class:"nav-link text-muted rounded-3"},Oe={key:1,class:"nav-link text-muted rounded-3"};function Ue(i,t,_,r,a,l){const n=f("LocaleText"),u=f("RouterLink"),C=f("HelpModal"),p=f("AgentModal");return o(),c("div",{class:k(["col-md-3 col-lg-2 d-md-block p-2 navbar-container",{active:this.dashboardConfigurationStore.ShowNavBar}]),"data-bs-theme":r.dashboardConfigurationStore.Configuration.Server.dashboard_theme},[e("nav",pe,[e("div",be,[e("div",ve,[t[5]||(t[5]=e("h5",{class:"mb-0"}," WGDashboard ",-1)),l.getActiveCrossServer!==void 0?(o(),c("small",he,[t[4]||(t[4]=e("i",{class:"bi bi-hdd-rack-fill me-2"},null,-1)),b(v(l.getActiveCrossServer.host),1)])):h("",!0)]),e("ul",xe,[e("li",Ce,[s(u,{class:"nav-link rounded-3",to:"/","exact-active-class":"active"},{default:d(()=>[t[6]||(t[6]=e("i",{class:"bi bi-house me-2"},null,-1)),s(n,{t:"Home"})]),_:1,__:[6]})]),e("li",ke,[s(u,{class:"nav-link rounded-3",to:"/settings","exact-active-class":"active"},{default:d(()=>[t[7]||(t[7]=e("i",{class:"bi bi-gear me-2"},null,-1)),s(n,{t:"Settings"})]),_:1,__:[7]})]),e("li",$e,[s(u,{class:"nav-link rounded-3",to:"/clients","exact-active-class":"active"},{default:d(()=>[t[8]||(t[8]=e("i",{class:"bi bi-people me-2"},null,-1)),s(n,{t:"Clients"})]),_:1,__:[8]})]),e("li",Se,[e("a",{class:"nav-link rounded-3",role:"button",onClick:t[0]||(t[0]=g=>a.openAgentModal=!0)},[t[9]||(t[9]=e("i",{class:"bi bi-question-circle me-2"},null,-1)),s(n,{t:"Help"})])])]),t[12]||(t[12]=e("hr",{class:"text-body my-2"},null,-1)),e("h6",ye,[s(n,{t:"WireGuard Configurations"})]),e("ul",Me,[(o(!0),c(A,null,D(this.wireguardConfigurationsStore.Configurations,g=>(o(),c("li",we,[s(u,{to:"/configuration/"+g.Name+"/peers",class:"nav-link nav-conf-link rounded-3","active-class":"active"},{default:d(()=>[e("span",{class:k(["dot me-2",{active:g.Status}])},null,2),b(" "+v(g.Name),1)]),_:2},1032,["to"])]))),256))]),t[13]||(t[13]=e("hr",{class:"text-body my-2"},null,-1)),e("h6",Ae,[s(n,{t:"Tools"})]),e("ul",De,[e("li",He,[s(u,{to:"/system_status",class:"nav-link rounded-3","active-class":"active"},{default:d(()=>[s(n,{t:"System Status"})]),_:1})]),e("li",Le,[s(u,{to:"/ping",class:"nav-link rounded-3","active-class":"active"},{default:d(()=>[s(n,{t:"Ping"})]),_:1})]),e("li",Te,[s(u,{to:"/traceroute",class:"nav-link rounded-3","active-class":"active"},{default:d(()=>[s(n,{t:"Traceroute"})]),_:1})])]),t[14]||(t[14]=e("hr",{class:"text-body my-2"},null,-1)),e("ul",Ge,[e("li",Ne,[e("a",{class:"nav-link text-danger rounded-3",onClick:t[1]||(t[1]=g=>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(n,{t:"Sign Out"})])]),e("li",We,[this.updateAvailable?(o(),c("a",{key:0,href:this.updateUrl,class:"text-decoration-none rounded-3",target:"_blank"},[e("small",Ve,[s(n,{t:this.updateMessage},null,8,["t"]),t[11]||(t[11]=b(" (")),s(n,{t:"Current Version:"}),b(" "+v(r.dashboardConfigurationStore.Configuration.Server.version)+") ",1)])],8,ze)):(o(),c("small",Oe,[s(n,{t:this.updateMessage},null,8,["t"]),b(" ("+v(r.dashboardConfigurationStore.Configuration.Server.version)+") ",1)]))])])])]),s($,{name:"zoom"},{default:d(()=>[this.openHelpModal?(o(),x(C,{key:0,onClose:t[2]||(t[2]=g=>{a.openHelpModal=!1})})):h("",!0)]),_:1}),s($,{name:"slideIn"},{default:d(()=>[this.openAgentModal?(o(),x(p,{key:0,onClose:t[3]||(t[3]=g=>a.openAgentModal=!1)})):h("",!0)]),_:1})],10,fe)}const je=S(ge,[["render",Ue],["__scopeId","data-v-6fbf5bfd"]]),Be={name:"index",components:{Message:V,Navbar:je},async setup(){return{dashboardConfigurationStore:y()}},computed:{getMessages(){return this.dashboardConfigurationStore.Messages.filter(i=>i.show)}}},Re=["data-bs-theme"],Fe={class:"row h-100"},Ie={class:"col-md-9 col-lg-10 overflow-y-scroll mb-0 pt-2"},qe={class:"messageCentre text-body position-absolute d-flex"};function Ee(i,t,_,r,a,l){const n=f("Navbar"),u=f("RouterView"),C=f("Message");return o(),c("div",{class:"container-fluid flex-grow-1 main","data-bs-theme":this.dashboardConfigurationStore.Configuration.Server.dashboard_theme},[e("div",Fe,[s(n),e("main",Ie,[(o(),x(W,null,{default:d(()=>[s(u,null,{default:d(({Component:p})=>[s($,{name:"fade2",mode:"out-in",appear:""},{default:d(()=>[(o(),x(z(p)))]),_:2},1024)]),_:1})]),_:1})),e("div",qe,[s(w,{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:d(()=>[(o(!0),c(A,null,D(l.getMessages.slice().reverse(),p=>(o(),x(C,{message:p,key:p.id},null,8,["message"]))),128))]),_:1})])])])],8,Re)}const Qe=S(Be,[["render",Ee],["__scopeId","data-v-0c6a5068"]]);export{Qe as default}; diff --git a/src/static/app/dist/assets/index-hZ1DcfGk.js b/src/static/app/dist/assets/index-C5CQcTdj.js similarity index 99% rename from src/static/app/dist/assets/index-hZ1DcfGk.js rename to src/static/app/dist/assets/index-C5CQcTdj.js index f15a995..353900c 100644 --- a/src/static/app/dist/assets/index-hZ1DcfGk.js +++ b/src/static/app/dist/assets/index-C5CQcTdj.js @@ -1,4 +1,4 @@ -import{J as Vs,U as Ws,V as qe,X as Vn,r as Wn,o as Nn,Y as jn,H as $n,Z as Ge,$ as Ns,a0 as Yn}from"./index-BaGiSoQe.js";/*! +import{J as Vs,R as Ws,U as qe,V as Vn,r as Wn,o as Nn,X as jn,H as $n,Y as Ge,Z as Ns,$ as Yn}from"./index-Upsq31TS.js";/*! * @kurkle/color v0.3.4 * https://github.com/kurkle/color#readme * (c) 2024 Jukka Kurkela diff --git a/src/static/app/dist/assets/index-DdNg86Vj.js b/src/static/app/dist/assets/index-DdNg86Vj.js new file mode 100644 index 0000000..4390c71 --- /dev/null +++ b/src/static/app/dist/assets/index-DdNg86Vj.js @@ -0,0 +1 @@ +import{r as M,o as H,c,a as e,b as s,d as h,e as b,t as v,f as o,_ as S,D as y,w as d,T as w,n as k,u as L,g as T,G,W as N,h as f,F as A,i as D,j as $,k as x,S as W,l as z}from"./index-Upsq31TS.js";import{L as m}from"./localeText-n7rlaTGQ.js";import"./dayjs.min-Cdu5c05l.js";import{M as V}from"./message-fHdP79jF.js";const O={class:"peerSettingContainer w-100 h-100 position-absolute top-0 start-0 overflow-y-scroll"},U={class:"container d-flex h-100 w-100"},j={class:"m-auto modal-dialog-centered dashboardModal"},B={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"},F={class:"mb-0"},I={class:"card-body px-4 pb-4 d-flex flex-column gap-2"},q={class:"card text-decoration-none",target:"_blank",role:"button",href:"https://discord.gg/72TwzjeuWm"},E={class:"card-body d-flex gap-4 align-items-center"},J={class:"d-flex align-items-center"},P={class:"badge rounded-pill text-bg-primary ms-2"},Y={key:0,class:"spinner-border spinner-border-sm",style:{width:"0.7rem",height:"0.7rem"}},K={key:1},Q={class:"text-muted"},X={class:"card text-decoration-none",href:"https://donaldzou.github.io/WGDashboard-Documentation/",target:"_blank"},Z={class:"card-body d-flex gap-4 align-items-center"},ee={class:"mb-0"},te={class:"text-muted"},se={__name:"helpModal",setup(i){const t=M(!0),_=M(void 0);return H(()=>{t.value=!0,fetch("https://discord.com/api/guilds/1276818723637956628/widget.json").then(r=>r.json()).then(r=>{_.value=r,t.value=!1}).catch(()=>{t.value=!1})}),(r,a)=>(o(),c("div",O,[e("div",U,[e("div",j,[e("div",B,[e("div",R,[e("h4",F,[s(m,{t:"Help"})]),e("button",{type:"button",class:"btn-close ms-auto",onClick:a[0]||(a[0]=l=>r.$emit("close"))})]),e("div",I,[e("a",q,[e("div",E,[a[3]||(a[3]=e("h1",{class:"mb-0"},[e("i",{class:"bi bi-discord"})],-1)),e("div",null,[e("div",J,[a[2]||(a[2]=e("h5",{class:"mb-0"}," Discord Server ",-1)),e("span",P,[t.value?(o(),c("span",Y)):h("",!0),_.value!==void 0&&!t.value?(o(),c("span",K,[a[1]||(a[1]=e("i",{class:"bi bi-person-fill me-2"},null,-1)),b(v(_.value.presence_count)+" Online ",1)])):h("",!0)])]),e("small",Q,[s(m,{t:"Join our Discord server for quick help or chat about WGDashboard!"})])])])]),e("a",X,[e("div",Z,[a[4]||(a[4]=e("h1",{class:"mb-0"},[e("i",{class:"bi bi-hash"})],-1)),e("div",null,[e("h5",ee,[s(m,{t:"Official Documentation"})]),e("small",te,[s(m,{t:"Official documentation contains User Guides and more..."})])])])])])])])])]))}},oe={key:"header",class:"shadow"},ae={class:"p-3 d-flex gap-2 flex-column"},ne={class:"d-flex text-body"},ie={class:"d-flex flex-column align-items-start gap-1"},le={class:"mb-0"},de={class:"mb-0"},re={class:"list-group"},ce={href:"https://donaldzou.github.io/WGDashboard-Documentation/",target:"_blank",class:"list-group-item list-group-item-action d-flex align-items-center"},ue={target:"_blank",role:"button",href:"https://discord.gg/72TwzjeuWm",class:"list-group-item list-group-item-action d-flex align-items-center"},me={__name:"agentModal",emits:["close"],setup(i,{emit:t}){const _=t,r=y();return(a,l)=>(o(),c("div",{class:k(["agentContainer m-2 rounded-3 d-flex flex-column text-body",{enabled:L(r).HelpAgent.Enable}])},[s(w,{name:"agent-message"},{default:d(()=>[e("div",oe,[e("div",ae,[e("div",ne,[e("div",ie,[e("h5",le,[s(m,{t:"Help"})])]),e("a",{role:"button",class:"ms-auto text-body",onClick:l[0]||(l[0]=n=>_("close"))},l[1]||(l[1]=[e("h5",{class:"mb-0"},[e("i",{class:"bi bi-x-lg"})],-1)]))]),e("p",de,[s(m,{t:"You can visit our: "})]),e("div",re,[e("a",ce,[l[2]||(l[2]=e("i",{class:"bi bi-book-fill"},null,-1)),s(m,{class:"ms-auto",t:"Official Documentation"})]),e("a",ue,[l[3]||(l[3]=e("i",{class:"bi bi-discord"},null,-1)),s(m,{class:"ms-auto",t:"Discord Server"})])])])])]),_:1})],2))}},_e=S(me,[["__scopeId","data-v-a76f42bd"]]),ge={name:"navbar",components:{HelpModal:se,LocaleText:m,AgentModal:_e},setup(){const i=N(),t=y();return{wireguardConfigurationsStore:i,dashboardConfigurationStore:t}},data(){return{updateAvailable:!1,updateMessage:"Checking for update...",updateUrl:"",openHelpModal:!1,openAgentModal:!1}},computed:{getActiveCrossServer(){if(this.dashboardConfigurationStore.ActiveServerConfiguration)return new URL(this.dashboardConfigurationStore.CrossServerConfiguration.ServerList[this.dashboardConfigurationStore.ActiveServerConfiguration].host)}},mounted(){T("/api/getDashboardUpdate",{},i=>{i.status?(i.data&&(this.updateAvailable=!0,this.updateUrl=i.data),this.updateMessage=i.message):(this.updateMessage=G("Failed to check available update"),console.log(`Failed to get update: ${i.message}`))})}},fe=["data-bs-theme"],pe={id:"sidebarMenu",class:"bg-body-tertiary sidebar border h-100 rounded-3 shadow overflow-y-scroll"},be={class:"sidebar-sticky"},ve={class:"text-white text-center m-0 py-3 mb-2 btn-brand"},he={key:0,class:"ms-auto"},xe={class:"nav flex-column px-2 gap-1"},Ce={class:"nav-item"},ke={class:"nav-item"},$e={class:"nav-item"},Se={class:"nav-item"},ye={class:"sidebar-heading px-3 mt-3 mb-1 text-muted text-center"},Me={class:"nav flex-column px-2 gap-1"},we={class:"nav-item"},Ae={class:"sidebar-heading px-3 mt-3 mb-1 text-muted text-center"},De={class:"nav flex-column px-2 gap-1"},He={class:"nav-item"},Le={class:"nav-item"},Te={class:"nav-item"},Ge={class:"nav flex-column px-2 mb-3"},Ne={class:"nav-item"},We={class:"nav-item",style:{"font-size":"0.8rem"}},ze=["href"],Ve={class:"nav-link text-muted rounded-3"},Oe={key:1,class:"nav-link text-muted rounded-3"};function Ue(i,t,_,r,a,l){const n=f("LocaleText"),u=f("RouterLink"),C=f("HelpModal"),p=f("AgentModal");return o(),c("div",{class:k(["col-md-3 col-lg-2 d-md-block p-2 navbar-container",{active:this.dashboardConfigurationStore.ShowNavBar}]),"data-bs-theme":r.dashboardConfigurationStore.Configuration.Server.dashboard_theme},[e("nav",pe,[e("div",be,[e("div",ve,[t[5]||(t[5]=e("h5",{class:"mb-0"}," WGDashboard ",-1)),l.getActiveCrossServer!==void 0?(o(),c("small",he,[t[4]||(t[4]=e("i",{class:"bi bi-hdd-rack-fill me-2"},null,-1)),b(v(l.getActiveCrossServer.host),1)])):h("",!0)]),e("ul",xe,[e("li",Ce,[s(u,{class:"nav-link rounded-3",to:"/","exact-active-class":"active"},{default:d(()=>[t[6]||(t[6]=e("i",{class:"bi bi-house me-2"},null,-1)),s(n,{t:"Home"})]),_:1,__:[6]})]),e("li",ke,[s(u,{class:"nav-link rounded-3",to:"/settings","exact-active-class":"active"},{default:d(()=>[t[7]||(t[7]=e("i",{class:"bi bi-gear me-2"},null,-1)),s(n,{t:"Settings"})]),_:1,__:[7]})]),e("li",$e,[s(u,{class:"nav-link rounded-3",to:"/clients","exact-active-class":"active"},{default:d(()=>[t[8]||(t[8]=e("i",{class:"bi bi-people me-2"},null,-1)),s(n,{t:"Clients"})]),_:1,__:[8]})]),e("li",Se,[e("a",{class:"nav-link rounded-3",role:"button",onClick:t[0]||(t[0]=g=>a.openAgentModal=!0)},[t[9]||(t[9]=e("i",{class:"bi bi-question-circle me-2"},null,-1)),s(n,{t:"Help"})])])]),t[12]||(t[12]=e("hr",{class:"text-body my-2"},null,-1)),e("h6",ye,[s(n,{t:"WireGuard Configurations"})]),e("ul",Me,[(o(!0),c(A,null,D(this.wireguardConfigurationsStore.Configurations,g=>(o(),c("li",we,[s(u,{to:"/configuration/"+g.Name+"/peers",class:"nav-link nav-conf-link rounded-3","active-class":"active"},{default:d(()=>[e("span",{class:k(["dot me-2",{active:g.Status}])},null,2),b(" "+v(g.Name),1)]),_:2},1032,["to"])]))),256))]),t[13]||(t[13]=e("hr",{class:"text-body my-2"},null,-1)),e("h6",Ae,[s(n,{t:"Tools"})]),e("ul",De,[e("li",He,[s(u,{to:"/system_status",class:"nav-link rounded-3","active-class":"active"},{default:d(()=>[s(n,{t:"System Status"})]),_:1})]),e("li",Le,[s(u,{to:"/ping",class:"nav-link rounded-3","active-class":"active"},{default:d(()=>[s(n,{t:"Ping"})]),_:1})]),e("li",Te,[s(u,{to:"/traceroute",class:"nav-link rounded-3","active-class":"active"},{default:d(()=>[s(n,{t:"Traceroute"})]),_:1})])]),t[14]||(t[14]=e("hr",{class:"text-body my-2"},null,-1)),e("ul",Ge,[e("li",Ne,[e("a",{class:"nav-link text-danger rounded-3",onClick:t[1]||(t[1]=g=>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(n,{t:"Sign Out"})])]),e("li",We,[this.updateAvailable?(o(),c("a",{key:0,href:this.updateUrl,class:"text-decoration-none rounded-3",target:"_blank"},[e("small",Ve,[s(n,{t:this.updateMessage},null,8,["t"]),t[11]||(t[11]=b(" (")),s(n,{t:"Current Version:"}),b(" "+v(r.dashboardConfigurationStore.Configuration.Server.version)+") ",1)])],8,ze)):(o(),c("small",Oe,[s(n,{t:this.updateMessage},null,8,["t"]),b(" ("+v(r.dashboardConfigurationStore.Configuration.Server.version)+") ",1)]))])])])]),s($,{name:"zoom"},{default:d(()=>[this.openHelpModal?(o(),x(C,{key:0,onClose:t[2]||(t[2]=g=>{a.openHelpModal=!1})})):h("",!0)]),_:1}),s($,{name:"slideIn"},{default:d(()=>[this.openAgentModal?(o(),x(p,{key:0,onClose:t[3]||(t[3]=g=>a.openAgentModal=!1)})):h("",!0)]),_:1})],10,fe)}const je=S(ge,[["render",Ue],["__scopeId","data-v-6fbf5bfd"]]),Be={name:"index",components:{Message:V,Navbar:je},async setup(){return{dashboardConfigurationStore:y()}},computed:{getMessages(){return this.dashboardConfigurationStore.Messages.filter(i=>i.show)}}},Re=["data-bs-theme"],Fe={class:"row h-100"},Ie={class:"col-md-9 col-lg-10 overflow-y-scroll mb-0 pt-2"},qe={class:"messageCentre text-body position-absolute d-flex"};function Ee(i,t,_,r,a,l){const n=f("Navbar"),u=f("RouterView"),C=f("Message");return o(),c("div",{class:"container-fluid flex-grow-1 main","data-bs-theme":this.dashboardConfigurationStore.Configuration.Server.dashboard_theme},[e("div",Fe,[s(n),e("main",Ie,[(o(),x(W,null,{default:d(()=>[s(u,null,{default:d(({Component:p})=>[s($,{name:"fade2",mode:"out-in",appear:""},{default:d(()=>[(o(),x(z(p)))]),_:2},1024)]),_:1})]),_:1})),e("div",qe,[s(w,{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:d(()=>[(o(!0),c(A,null,D(l.getMessages.slice().reverse(),p=>(o(),x(C,{message:p,key:p.id},null,8,["message"]))),128))]),_:1})])])])],8,Re)}const Qe=S(Be,[["render",Ee],["__scopeId","data-v-0c6a5068"]]);export{Qe as default}; diff --git a/src/static/app/dist/assets/index-BaGiSoQe.js b/src/static/app/dist/assets/index-Upsq31TS.js similarity index 78% rename from src/static/app/dist/assets/index-BaGiSoQe.js rename to src/static/app/dist/assets/index-Upsq31TS.js index fe3e437..8784bae 100644 --- a/src/static/app/dist/assets/index-BaGiSoQe.js +++ b/src/static/app/dist/assets/index-Upsq31TS.js @@ -1,33 +1,33 @@ -const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/index-1mVjWyYI.js","assets/localeText-DkjxgEQB.js","assets/dayjs.min-H8Pjp0HL.js","assets/message-DmK834mY.js","assets/message-Bh5W0B3y.css","assets/index-C5EbVbbu.css","assets/configurationList-zXvLVZk6.js","assets/protocolBadge-fuWULZA8.js","assets/storageMount.vue_vue_type_style_index_0_scoped_9509d7a0_lang-B4kEtj1e.js","assets/storageMount-Bw-_Mzzo.css","assets/configurationList-CaG5COsM.css","assets/settings-cK5pfcdh.js","assets/vue-datepicker-CI9txOl2.js","assets/settings-CfX7xCKW.css","assets/ping-Rj802N48.js","assets/osmap-DImWbvYV.js","assets/osmap-DZ_3lbim.css","assets/ping-DgbK5UF9.css","assets/traceroute-CJHxAi5E.js","assets/traceroute-cPX-1ydq.css","assets/newConfiguration-CNk_9MbK.js","assets/index-6o26Ihmr.js","assets/newConfiguration-oPMsqryI.css","assets/restoreConfiguration-CB8Vk8pb.js","assets/restoreConfiguration-Go8Q_2zy.css","assets/systemStatus-DDN6iwt_.js","assets/index-hZ1DcfGk.js","assets/systemStatus-CPnafN3D.css","assets/clients-CgB9Uymo.js","assets/DashboardClientAssignmentStore-BUoDZ6I5.js","assets/clientViewer-CglBXHMI.js","assets/peerList-9LlPuiy3.js","assets/peerList-DpYjiz6W.css","assets/signin-L3oMqQIW.js","assets/signin-CC0REHXm.css","assets/setup-BKjNeIHl.js","assets/totp-DKJseL4c.js","assets/browser-BHoir7AQ.js","assets/share-CNIJmGhk.js","assets/share-e5E8P3Ro.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)}})();function Py(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function dg(e){if(Object.prototype.hasOwnProperty.call(e,"__esModule"))return e;var t=e.default;if(typeof t=="function"){var n=function s(){var r=!1;try{r=this instanceof s}catch{}return r?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 Er={exports:{}},Ge="top",Je="bottom",Ze="right",qe="left",Br="auto",ds=[Ge,Je,Ze,qe],xn="start",es="end",uc="clippingParents",fo="viewport",Wn="popper",fc="reference",Hi=ds.reduce(function(e,t){return e.concat([t+"-"+xn,t+"-"+es])},[]),ho=[].concat(ds,[Br]).reduce(function(e,t){return e.concat([t,t+"-"+xn,t+"-"+es])},[]),dc="beforeRead",hc="read",pc="afterRead",gc="beforeMain",mc="main",_c="afterMain",vc="beforeWrite",Ec="write",yc="afterWrite",bc=[dc,hc,pc,gc,mc,_c,vc,Ec,yc];function $t(e){return e?(e.nodeName||"").toLowerCase():null}function et(e){if(e==null)return window;if(e.toString()!=="[object Window]"){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function Nn(e){var t=et(e).Element;return e instanceof t||e instanceof Element}function lt(e){var t=et(e).HTMLElement;return e instanceof t||e instanceof HTMLElement}function po(e){if(typeof ShadowRoot>"u")return!1;var t=et(e).ShadowRoot;return e instanceof t||e instanceof ShadowRoot}function hg(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];!lt(o)||!$t(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 pg(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},{});!lt(r)||!$t(r)||(Object.assign(r.style,l),Object.keys(o).forEach(function(c){r.removeAttribute(c)}))})}}const go={name:"applyStyles",enabled:!0,phase:"write",fn:hg,effect:pg,requires:["computeStyles"]};function Nt(e){return e.split("-")[0]}var Tn=Math.max,Or=Math.min,ts=Math.round;function Bi(){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 Ac(){return!/^((?!chrome|android).)*safari/i.test(Bi())}function ns(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!1);var s=e.getBoundingClientRect(),r=1,o=1;t&<(e)&&(r=e.offsetWidth>0&&ts(s.width)/e.offsetWidth||1,o=e.offsetHeight>0&&ts(s.height)/e.offsetHeight||1);var a=Nn(e)?et(e):window,l=a.visualViewport,c=!Ac()&&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 mo(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 Tc(e,t){var n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&po(n)){var s=t;do{if(s&&e.isSameNode(s))return!0;s=s.parentNode||s.host}while(s)}return!1}function Ht(e){return et(e).getComputedStyle(e)}function gg(e){return["table","td","th"].indexOf($t(e))>=0}function ln(e){return((Nn(e)?e.ownerDocument:e.document)||window.document).documentElement}function jr(e){return $t(e)==="html"?e:e.assignedSlot||e.parentNode||(po(e)?e.host:null)||ln(e)}function Ka(e){return!lt(e)||Ht(e).position==="fixed"?null:e.offsetParent}function mg(e){var t=/firefox/i.test(Bi()),n=/Trident/i.test(Bi());if(n&<(e)){var s=Ht(e);if(s.position==="fixed")return null}var r=jr(e);for(po(r)&&(r=r.host);lt(r)&&["html","body"].indexOf($t(r))<0;){var o=Ht(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 Gs(e){for(var t=et(e),n=Ka(e);n&&gg(n)&&Ht(n).position==="static";)n=Ka(n);return n&&($t(n)==="html"||$t(n)==="body"&&Ht(n).position==="static")?t:n||mg(e)||t}function _o(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function Os(e,t,n){return Tn(e,Or(t,n))}function _g(e,t,n){var s=Os(e,t,n);return s>n?n:s}function wc(){return{top:0,right:0,bottom:0,left:0}}function Cc(e){return Object.assign({},wc(),e)}function Sc(e,t){return t.reduce(function(n,s){return n[s]=e,n},{})}var vg=function(t,n){return t=typeof t=="function"?t(Object.assign({},n.rects,{placement:n.placement})):t,Cc(typeof t!="number"?t:Sc(t,ds))};function Eg(e){var t,n=e.state,s=e.name,r=e.options,o=n.elements.arrow,a=n.modifiersData.popperOffsets,l=Nt(n.placement),c=_o(l),d=[qe,Ze].indexOf(l)>=0,f=d?"height":"width";if(!(!o||!a)){var h=vg(r.padding,n),p=mo(o),_=c==="y"?Ge:qe,x=c==="y"?Je:Ze,A=n.rects.reference[f]+n.rects.reference[c]-a[c]-n.rects.popper[f],R=a[c]-n.rects.reference[c],P=Gs(o),H=P?c==="y"?P.clientHeight||0:P.clientWidth||0:0,F=A/2-R/2,k=h[_],b=H-p[f]-h[x],y=H/2-p[f]/2+F,O=Os(k,y,b),w=c;n.modifiersData[s]=(t={},t[w]=O,t.centerOffset=O-y,t)}}function yg(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)||Tc(t.elements.popper,r)&&(t.elements.arrow=r))}const Oc={name:"arrow",enabled:!0,phase:"main",fn:Eg,effect:yg,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function ss(e){return e.split("-")[1]}var bg={top:"auto",right:"auto",bottom:"auto",left:"auto"};function Ag(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 Wa(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,_=p===void 0?0:p,x=a.y,A=x===void 0?0:x,R=typeof f=="function"?f({x:_,y:A}):{x:_,y:A};_=R.x,A=R.y;var P=a.hasOwnProperty("x"),H=a.hasOwnProperty("y"),F=qe,k=Ge,b=window;if(d){var y=Gs(n),O="clientHeight",w="clientWidth";if(y===et(n)&&(y=ln(n),Ht(y).position!=="static"&&l==="absolute"&&(O="scrollHeight",w="scrollWidth")),y=y,r===Ge||(r===qe||r===Ze)&&o===es){k=Je;var T=h&&y===b&&b.visualViewport?b.visualViewport.height:y[O];A-=T-s.height,A*=c?1:-1}if(r===qe||(r===Ge||r===Je)&&o===es){F=Ze;var S=h&&y===b&&b.visualViewport?b.visualViewport.width:y[w];_-=S-s.width,_*=c?1:-1}}var K=Object.assign({position:l},d&&bg),B=f===!0?Ag({x:_,y:A},et(n)):{x:_,y:A};if(_=B.x,A=B.y,c){var Q;return Object.assign({},K,(Q={},Q[k]=H?"0":"",Q[F]=P?"0":"",Q.transform=(b.devicePixelRatio||1)<=1?"translate("+_+"px, "+A+"px)":"translate3d("+_+"px, "+A+"px, 0)",Q))}return Object.assign({},K,(t={},t[k]=H?A+"px":"",t[F]=P?_+"px":"",t.transform="",t))}function Tg(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:Nt(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,Wa(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,Wa(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 vo={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:Tg,data:{}};var fr={passive:!0};function wg(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=et(t.elements.popper),d=[].concat(t.scrollParents.reference,t.scrollParents.popper);return o&&d.forEach(function(f){f.addEventListener("scroll",n.update,fr)}),l&&c.addEventListener("resize",n.update,fr),function(){o&&d.forEach(function(f){f.removeEventListener("scroll",n.update,fr)}),l&&c.removeEventListener("resize",n.update,fr)}}const Eo={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:wg,data:{}};var Cg={left:"right",right:"left",bottom:"top",top:"bottom"};function yr(e){return e.replace(/left|right|bottom|top/g,function(t){return Cg[t]})}var Sg={start:"end",end:"start"};function Ua(e){return e.replace(/start|end/g,function(t){return Sg[t]})}function yo(e){var t=et(e),n=t.pageXOffset,s=t.pageYOffset;return{scrollLeft:n,scrollTop:s}}function bo(e){return ns(ln(e)).left+yo(e).scrollLeft}function Og(e,t){var n=et(e),s=ln(e),r=n.visualViewport,o=s.clientWidth,a=s.clientHeight,l=0,c=0;if(r){o=r.width,a=r.height;var d=Ac();(d||!d&&t==="fixed")&&(l=r.offsetLeft,c=r.offsetTop)}return{width:o,height:a,x:l+bo(e),y:c}}function xg(e){var t,n=ln(e),s=yo(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+bo(e),c=-s.scrollTop;return Ht(r||n).direction==="rtl"&&(l+=Tn(n.clientWidth,r?r.clientWidth:0)-o),{width:o,height:a,x:l,y:c}}function Ao(e){var t=Ht(e),n=t.overflow,s=t.overflowX,r=t.overflowY;return/auto|scroll|overlay|hidden/.test(n+r+s)}function xc(e){return["html","body","#document"].indexOf($t(e))>=0?e.ownerDocument.body:lt(e)&&Ao(e)?e:xc(jr(e))}function xs(e,t){var n;t===void 0&&(t=[]);var s=xc(e),r=s===((n=e.ownerDocument)==null?void 0:n.body),o=et(s),a=r?[o].concat(o.visualViewport||[],Ao(s)?s:[]):s,l=t.concat(a);return r?l:l.concat(xs(jr(a)))}function ji(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function Ng(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 Ya(e,t,n){return t===fo?ji(Og(e,n)):Nn(t)?Ng(t,n):ji(xg(ln(e)))}function $g(e){var t=xs(jr(e)),n=["absolute","fixed"].indexOf(Ht(e).position)>=0,s=n&<(e)?Gs(e):e;return Nn(s)?t.filter(function(r){return Nn(r)&&Tc(r,s)&&$t(r)!=="body"}):[]}function Rg(e,t,n,s){var r=t==="clippingParents"?$g(e):[].concat(t),o=[].concat(r,[n]),a=o[0],l=o.reduce(function(c,d){var f=Ya(e,d,s);return c.top=Tn(f.top,c.top),c.right=Or(f.right,c.right),c.bottom=Or(f.bottom,c.bottom),c.left=Tn(f.left,c.left),c},Ya(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 Nc(e){var t=e.reference,n=e.element,s=e.placement,r=s?Nt(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 Ge:c={x:a,y:t.y-n.height};break;case Je:c={x:a,y:t.y+t.height};break;case Ze:c={x:t.x+t.width,y:l};break;case qe:c={x:t.x-n.width,y:l};break;default:c={x:t.x,y:t.y}}var d=r?_o(r):null;if(d!=null){var f=d==="y"?"height":"width";switch(o){case xn: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?uc:l,d=n.rootBoundary,f=d===void 0?fo:d,h=n.elementContext,p=h===void 0?Wn:h,_=n.altBoundary,x=_===void 0?!1:_,A=n.padding,R=A===void 0?0:A,P=Cc(typeof R!="number"?R:Sc(R,ds)),H=p===Wn?fc:Wn,F=e.rects.popper,k=e.elements[x?H:p],b=Rg(Nn(k)?k:k.contextElement||ln(e.elements.popper),c,f,a),y=ns(e.elements.reference),O=Nc({reference:y,element:F,placement:r}),w=ji(Object.assign({},F,O)),T=p===Wn?w:y,S={top:b.top-T.top+P.top,bottom:T.bottom-b.bottom+P.bottom,left:b.left-T.left+P.left,right:T.right-b.right+P.right},K=e.modifiersData.offset;if(p===Wn&&K){var B=K[r];Object.keys(S).forEach(function(Q){var oe=[Ze,Je].indexOf(Q)>=0?1:-1,de=[Ge,Je].indexOf(Q)>=0?"y":"x";S[Q]+=B[de]*oe})}return S}function Dg(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?ho:c,f=ss(s),h=f?l?Hi:Hi.filter(function(x){return ss(x)===f}):ds,p=h.filter(function(x){return d.indexOf(x)>=0});p.length===0&&(p=h);var _=p.reduce(function(x,A){return x[A]=rs(e,{placement:A,boundary:r,rootBoundary:o,padding:a})[Nt(A)],x},{});return Object.keys(_).sort(function(x,A){return _[x]-_[A]})}function Lg(e){if(Nt(e)===Br)return[];var t=yr(e);return[Ua(e),t,Ua(t)]}function Ig(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,_=n.flipVariations,x=_===void 0?!0:_,A=n.allowedAutoPlacements,R=t.options.placement,P=Nt(R),H=P===R,F=c||(H||!x?[yr(R)]:Lg(R)),k=[R].concat(F).reduce(function(Ke,Pe){return Ke.concat(Nt(Pe)===Br?Dg(t,{placement:Pe,boundary:f,rootBoundary:h,padding:d,flipVariations:x,allowedAutoPlacements:A}):Pe)},[]),b=t.rects.reference,y=t.rects.popper,O=new Map,w=!0,T=k[0],S=0;S=0,de=oe?"width":"height",te=rs(t,{placement:K,boundary:f,rootBoundary:h,altBoundary:p,padding:d}),ee=oe?Q?Ze:qe:Q?Je:Ge;b[de]>y[de]&&(ee=yr(ee));var ce=yr(ee),we=[];if(o&&we.push(te[B]<=0),l&&we.push(te[ee]<=0,te[ce]<=0),we.every(function(Ke){return Ke})){T=K,w=!1;break}O.set(K,we)}if(w)for(var je=x?3:1,De=function(Pe){var Te=k.find(function(I){var q=O.get(I);if(q)return q.slice(0,Pe).every(function(z){return z})});if(Te)return T=Te,"break"},be=je;be>0;be--){var Qe=De(be);if(Qe==="break")break}t.placement!==T&&(t.modifiersData[s]._skip=!0,t.placement=T,t.reset=!0)}}const $c={name:"flip",enabled:!0,phase:"main",fn:Ig,requiresIfExists:["offset"],data:{_skip:!1}};function Ga(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 qa(e){return[Ge,Ze,Je,qe].some(function(t){return e[t]>=0})}function Pg(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=Ga(a,s),d=Ga(l,r,o),f=qa(c),h=qa(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 Rc={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:Pg};function Mg(e,t,n){var s=Nt(e),r=[qe,Ge].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,[qe,Ze].indexOf(s)>=0?{x:l,y:a}:{x:a,y:l}}function kg(e){var t=e.state,n=e.options,s=e.name,r=n.offset,o=r===void 0?[0,0]:r,a=ho.reduce(function(f,h){return f[h]=Mg(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 Dc={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:kg};function Vg(e){var t=e.state,n=e.name;t.modifiersData[n]=Nc({reference:t.rects.reference,element:t.rects.popper,placement:t.placement})}const To={name:"popperOffsets",enabled:!0,phase:"read",fn:Vg,data:{}};function Fg(e){return e==="x"?"y":"x"}function Hg(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,_=p===void 0?!0:p,x=n.tetherOffset,A=x===void 0?0:x,R=rs(t,{boundary:c,rootBoundary:d,padding:h,altBoundary:f}),P=Nt(t.placement),H=ss(t.placement),F=!H,k=_o(P),b=Fg(k),y=t.modifiersData.popperOffsets,O=t.rects.reference,w=t.rects.popper,T=typeof A=="function"?A(Object.assign({},t.rects,{placement:t.placement})):A,S=typeof T=="number"?{mainAxis:T,altAxis:T}:Object.assign({mainAxis:0,altAxis:0},T),K=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,B={x:0,y:0};if(y){if(o){var Q,oe=k==="y"?Ge:qe,de=k==="y"?Je:Ze,te=k==="y"?"height":"width",ee=y[k],ce=ee+R[oe],we=ee-R[de],je=_?-w[te]/2:0,De=H===xn?O[te]:w[te],be=H===xn?-w[te]:-O[te],Qe=t.elements.arrow,Ke=_&&Qe?mo(Qe):{width:0,height:0},Pe=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:wc(),Te=Pe[oe],I=Pe[de],q=Os(0,O[te],Ke[te]),z=F?O[te]/2-je-q-Te-S.mainAxis:De-q-Te-S.mainAxis,J=F?-O[te]/2+je+q+I+S.mainAxis:be+q+I+S.mainAxis,$=t.elements.arrow&&Gs(t.elements.arrow),g=$?k==="y"?$.clientTop||0:$.clientLeft||0:0,v=(Q=K?.[k])!=null?Q:0,C=ee+z-v-g,D=ee+J-v,V=Os(_?Or(ce,C):ce,ee,_?Tn(we,D):we);y[k]=V,B[k]=V-ee}if(l){var M,W=k==="x"?Ge:qe,Y=k==="x"?Je:Ze,N=y[b],j=b==="y"?"height":"width",ne=N+R[W],X=N-R[Y],Z=[Ge,qe].indexOf(P)!==-1,re=(M=K?.[b])!=null?M:0,ae=Z?ne:N-O[j]-w[j]-re+S.altAxis,he=Z?N+O[j]+w[j]-re-S.altAxis:X,ue=_&&Z?_g(ae,N,he):Os(_?ae:ne,N,_?he:X);y[b]=ue,B[b]=ue-N}t.modifiersData[s]=B}}const Lc={name:"preventOverflow",enabled:!0,phase:"main",fn:Hg,requiresIfExists:["offset"]};function Bg(e){return{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}}function jg(e){return e===et(e)||!lt(e)?yo(e):Bg(e)}function Kg(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 Wg(e,t,n){n===void 0&&(n=!1);var s=lt(t),r=lt(t)&&Kg(t),o=ln(t),a=ns(e,r,n),l={scrollLeft:0,scrollTop:0},c={x:0,y:0};return(s||!s&&!n)&&(($t(t)!=="body"||Ao(o))&&(l=jg(t)),lt(t)?(c=ns(t,!0),c.x+=t.clientLeft,c.y+=t.clientTop):o&&(c.x=bo(o))),{x:a.left+l.scrollLeft-c.x,y:a.top+l.scrollTop-c.y,width:a.width,height:a.height}}function Ug(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 Yg(e){var t=Ug(e);return bc.reduce(function(n,s){return n.concat(t.filter(function(r){return r.phase===s}))},[])}function Gg(e){var t;return function(){return t||(t=new Promise(function(n){Promise.resolve().then(function(){t=void 0,n(e())})})),t}}function qg(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 za={placement:"bottom",modifiers:[],strategy:"absolute"};function Xa(){for(var e=arguments.length,t=new Array(e),n=0;ni.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)}})();function Py(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function dg(e){if(Object.prototype.hasOwnProperty.call(e,"__esModule"))return e;var t=e.default;if(typeof t=="function"){var n=function s(){var r=!1;try{r=this instanceof s}catch{}return r?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 Er={exports:{}},Ge="top",Je="bottom",Ze="right",qe="left",Br="auto",ds=[Ge,Je,Ze,qe],xn="start",es="end",cc="clippingParents",fo="viewport",Wn="popper",uc="reference",Hi=ds.reduce(function(e,t){return e.concat([t+"-"+xn,t+"-"+es])},[]),ho=[].concat(ds,[Br]).reduce(function(e,t){return e.concat([t,t+"-"+xn,t+"-"+es])},[]),fc="beforeRead",dc="read",hc="afterRead",pc="beforeMain",gc="main",mc="afterMain",_c="beforeWrite",vc="write",Ec="afterWrite",yc=[fc,dc,hc,pc,gc,mc,_c,vc,Ec];function $t(e){return e?(e.nodeName||"").toLowerCase():null}function et(e){if(e==null)return window;if(e.toString()!=="[object Window]"){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function Nn(e){var t=et(e).Element;return e instanceof t||e instanceof Element}function lt(e){var t=et(e).HTMLElement;return e instanceof t||e instanceof HTMLElement}function po(e){if(typeof ShadowRoot>"u")return!1;var t=et(e).ShadowRoot;return e instanceof t||e instanceof ShadowRoot}function hg(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];!lt(o)||!$t(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 pg(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},{});!lt(r)||!$t(r)||(Object.assign(r.style,l),Object.keys(o).forEach(function(c){r.removeAttribute(c)}))})}}const go={name:"applyStyles",enabled:!0,phase:"write",fn:hg,effect:pg,requires:["computeStyles"]};function Nt(e){return e.split("-")[0]}var Tn=Math.max,Or=Math.min,ts=Math.round;function Bi(){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 bc(){return!/^((?!chrome|android).)*safari/i.test(Bi())}function ns(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!1);var s=e.getBoundingClientRect(),r=1,o=1;t&<(e)&&(r=e.offsetWidth>0&&ts(s.width)/e.offsetWidth||1,o=e.offsetHeight>0&&ts(s.height)/e.offsetHeight||1);var a=Nn(e)?et(e):window,l=a.visualViewport,c=!bc()&&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 mo(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 Ac(e,t){var n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&po(n)){var s=t;do{if(s&&e.isSameNode(s))return!0;s=s.parentNode||s.host}while(s)}return!1}function Ht(e){return et(e).getComputedStyle(e)}function gg(e){return["table","td","th"].indexOf($t(e))>=0}function ln(e){return((Nn(e)?e.ownerDocument:e.document)||window.document).documentElement}function jr(e){return $t(e)==="html"?e:e.assignedSlot||e.parentNode||(po(e)?e.host:null)||ln(e)}function ja(e){return!lt(e)||Ht(e).position==="fixed"?null:e.offsetParent}function mg(e){var t=/firefox/i.test(Bi()),n=/Trident/i.test(Bi());if(n&<(e)){var s=Ht(e);if(s.position==="fixed")return null}var r=jr(e);for(po(r)&&(r=r.host);lt(r)&&["html","body"].indexOf($t(r))<0;){var o=Ht(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 Gs(e){for(var t=et(e),n=ja(e);n&&gg(n)&&Ht(n).position==="static";)n=ja(n);return n&&($t(n)==="html"||$t(n)==="body"&&Ht(n).position==="static")?t:n||mg(e)||t}function _o(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function Os(e,t,n){return Tn(e,Or(t,n))}function _g(e,t,n){var s=Os(e,t,n);return s>n?n:s}function Tc(){return{top:0,right:0,bottom:0,left:0}}function wc(e){return Object.assign({},Tc(),e)}function Cc(e,t){return t.reduce(function(n,s){return n[s]=e,n},{})}var vg=function(t,n){return t=typeof t=="function"?t(Object.assign({},n.rects,{placement:n.placement})):t,wc(typeof t!="number"?t:Cc(t,ds))};function Eg(e){var t,n=e.state,s=e.name,r=e.options,o=n.elements.arrow,a=n.modifiersData.popperOffsets,l=Nt(n.placement),c=_o(l),d=[qe,Ze].indexOf(l)>=0,f=d?"height":"width";if(!(!o||!a)){var h=vg(r.padding,n),p=mo(o),_=c==="y"?Ge:qe,x=c==="y"?Je:Ze,A=n.rects.reference[f]+n.rects.reference[c]-a[c]-n.rects.popper[f],R=a[c]-n.rects.reference[c],P=Gs(o),H=P?c==="y"?P.clientHeight||0:P.clientWidth||0:0,F=A/2-R/2,k=h[_],b=H-p[f]-h[x],y=H/2-p[f]/2+F,O=Os(k,y,b),w=c;n.modifiersData[s]=(t={},t[w]=O,t.centerOffset=O-y,t)}}function yg(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)||Ac(t.elements.popper,r)&&(t.elements.arrow=r))}const Sc={name:"arrow",enabled:!0,phase:"main",fn:Eg,effect:yg,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function ss(e){return e.split("-")[1]}var bg={top:"auto",right:"auto",bottom:"auto",left:"auto"};function Ag(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 Ka(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,_=p===void 0?0:p,x=a.y,A=x===void 0?0:x,R=typeof f=="function"?f({x:_,y:A}):{x:_,y:A};_=R.x,A=R.y;var P=a.hasOwnProperty("x"),H=a.hasOwnProperty("y"),F=qe,k=Ge,b=window;if(d){var y=Gs(n),O="clientHeight",w="clientWidth";if(y===et(n)&&(y=ln(n),Ht(y).position!=="static"&&l==="absolute"&&(O="scrollHeight",w="scrollWidth")),y=y,r===Ge||(r===qe||r===Ze)&&o===es){k=Je;var T=h&&y===b&&b.visualViewport?b.visualViewport.height:y[O];A-=T-s.height,A*=c?1:-1}if(r===qe||(r===Ge||r===Je)&&o===es){F=Ze;var S=h&&y===b&&b.visualViewport?b.visualViewport.width:y[w];_-=S-s.width,_*=c?1:-1}}var K=Object.assign({position:l},d&&bg),B=f===!0?Ag({x:_,y:A},et(n)):{x:_,y:A};if(_=B.x,A=B.y,c){var Q;return Object.assign({},K,(Q={},Q[k]=H?"0":"",Q[F]=P?"0":"",Q.transform=(b.devicePixelRatio||1)<=1?"translate("+_+"px, "+A+"px)":"translate3d("+_+"px, "+A+"px, 0)",Q))}return Object.assign({},K,(t={},t[k]=H?A+"px":"",t[F]=P?_+"px":"",t.transform="",t))}function Tg(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:Nt(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,Ka(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,Ka(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 vo={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:Tg,data:{}};var fr={passive:!0};function wg(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=et(t.elements.popper),d=[].concat(t.scrollParents.reference,t.scrollParents.popper);return o&&d.forEach(function(f){f.addEventListener("scroll",n.update,fr)}),l&&c.addEventListener("resize",n.update,fr),function(){o&&d.forEach(function(f){f.removeEventListener("scroll",n.update,fr)}),l&&c.removeEventListener("resize",n.update,fr)}}const Eo={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:wg,data:{}};var Cg={left:"right",right:"left",bottom:"top",top:"bottom"};function yr(e){return e.replace(/left|right|bottom|top/g,function(t){return Cg[t]})}var Sg={start:"end",end:"start"};function Wa(e){return e.replace(/start|end/g,function(t){return Sg[t]})}function yo(e){var t=et(e),n=t.pageXOffset,s=t.pageYOffset;return{scrollLeft:n,scrollTop:s}}function bo(e){return ns(ln(e)).left+yo(e).scrollLeft}function Og(e,t){var n=et(e),s=ln(e),r=n.visualViewport,o=s.clientWidth,a=s.clientHeight,l=0,c=0;if(r){o=r.width,a=r.height;var d=bc();(d||!d&&t==="fixed")&&(l=r.offsetLeft,c=r.offsetTop)}return{width:o,height:a,x:l+bo(e),y:c}}function xg(e){var t,n=ln(e),s=yo(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+bo(e),c=-s.scrollTop;return Ht(r||n).direction==="rtl"&&(l+=Tn(n.clientWidth,r?r.clientWidth:0)-o),{width:o,height:a,x:l,y:c}}function Ao(e){var t=Ht(e),n=t.overflow,s=t.overflowX,r=t.overflowY;return/auto|scroll|overlay|hidden/.test(n+r+s)}function Oc(e){return["html","body","#document"].indexOf($t(e))>=0?e.ownerDocument.body:lt(e)&&Ao(e)?e:Oc(jr(e))}function xs(e,t){var n;t===void 0&&(t=[]);var s=Oc(e),r=s===((n=e.ownerDocument)==null?void 0:n.body),o=et(s),a=r?[o].concat(o.visualViewport||[],Ao(s)?s:[]):s,l=t.concat(a);return r?l:l.concat(xs(jr(a)))}function ji(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function Ng(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 Ua(e,t,n){return t===fo?ji(Og(e,n)):Nn(t)?Ng(t,n):ji(xg(ln(e)))}function $g(e){var t=xs(jr(e)),n=["absolute","fixed"].indexOf(Ht(e).position)>=0,s=n&<(e)?Gs(e):e;return Nn(s)?t.filter(function(r){return Nn(r)&&Ac(r,s)&&$t(r)!=="body"}):[]}function Rg(e,t,n,s){var r=t==="clippingParents"?$g(e):[].concat(t),o=[].concat(r,[n]),a=o[0],l=o.reduce(function(c,d){var f=Ua(e,d,s);return c.top=Tn(f.top,c.top),c.right=Or(f.right,c.right),c.bottom=Or(f.bottom,c.bottom),c.left=Tn(f.left,c.left),c},Ua(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 xc(e){var t=e.reference,n=e.element,s=e.placement,r=s?Nt(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 Ge:c={x:a,y:t.y-n.height};break;case Je:c={x:a,y:t.y+t.height};break;case Ze:c={x:t.x+t.width,y:l};break;case qe:c={x:t.x-n.width,y:l};break;default:c={x:t.x,y:t.y}}var d=r?_o(r):null;if(d!=null){var f=d==="y"?"height":"width";switch(o){case xn: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?cc:l,d=n.rootBoundary,f=d===void 0?fo:d,h=n.elementContext,p=h===void 0?Wn:h,_=n.altBoundary,x=_===void 0?!1:_,A=n.padding,R=A===void 0?0:A,P=wc(typeof R!="number"?R:Cc(R,ds)),H=p===Wn?uc:Wn,F=e.rects.popper,k=e.elements[x?H:p],b=Rg(Nn(k)?k:k.contextElement||ln(e.elements.popper),c,f,a),y=ns(e.elements.reference),O=xc({reference:y,element:F,placement:r}),w=ji(Object.assign({},F,O)),T=p===Wn?w:y,S={top:b.top-T.top+P.top,bottom:T.bottom-b.bottom+P.bottom,left:b.left-T.left+P.left,right:T.right-b.right+P.right},K=e.modifiersData.offset;if(p===Wn&&K){var B=K[r];Object.keys(S).forEach(function(Q){var oe=[Ze,Je].indexOf(Q)>=0?1:-1,de=[Ge,Je].indexOf(Q)>=0?"y":"x";S[Q]+=B[de]*oe})}return S}function Dg(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?ho:c,f=ss(s),h=f?l?Hi:Hi.filter(function(x){return ss(x)===f}):ds,p=h.filter(function(x){return d.indexOf(x)>=0});p.length===0&&(p=h);var _=p.reduce(function(x,A){return x[A]=rs(e,{placement:A,boundary:r,rootBoundary:o,padding:a})[Nt(A)],x},{});return Object.keys(_).sort(function(x,A){return _[x]-_[A]})}function Lg(e){if(Nt(e)===Br)return[];var t=yr(e);return[Wa(e),t,Wa(t)]}function Ig(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,_=n.flipVariations,x=_===void 0?!0:_,A=n.allowedAutoPlacements,R=t.options.placement,P=Nt(R),H=P===R,F=c||(H||!x?[yr(R)]:Lg(R)),k=[R].concat(F).reduce(function(Ke,Pe){return Ke.concat(Nt(Pe)===Br?Dg(t,{placement:Pe,boundary:f,rootBoundary:h,padding:d,flipVariations:x,allowedAutoPlacements:A}):Pe)},[]),b=t.rects.reference,y=t.rects.popper,O=new Map,w=!0,T=k[0],S=0;S=0,de=oe?"width":"height",te=rs(t,{placement:K,boundary:f,rootBoundary:h,altBoundary:p,padding:d}),ee=oe?Q?Ze:qe:Q?Je:Ge;b[de]>y[de]&&(ee=yr(ee));var ce=yr(ee),we=[];if(o&&we.push(te[B]<=0),l&&we.push(te[ee]<=0,te[ce]<=0),we.every(function(Ke){return Ke})){T=K,w=!1;break}O.set(K,we)}if(w)for(var je=x?3:1,De=function(Pe){var Te=k.find(function(I){var q=O.get(I);if(q)return q.slice(0,Pe).every(function(z){return z})});if(Te)return T=Te,"break"},be=je;be>0;be--){var Qe=De(be);if(Qe==="break")break}t.placement!==T&&(t.modifiersData[s]._skip=!0,t.placement=T,t.reset=!0)}}const Nc={name:"flip",enabled:!0,phase:"main",fn:Ig,requiresIfExists:["offset"],data:{_skip:!1}};function Ya(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 Ga(e){return[Ge,Ze,Je,qe].some(function(t){return e[t]>=0})}function Pg(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=Ya(a,s),d=Ya(l,r,o),f=Ga(c),h=Ga(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 $c={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:Pg};function Mg(e,t,n){var s=Nt(e),r=[qe,Ge].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,[qe,Ze].indexOf(s)>=0?{x:l,y:a}:{x:a,y:l}}function kg(e){var t=e.state,n=e.options,s=e.name,r=n.offset,o=r===void 0?[0,0]:r,a=ho.reduce(function(f,h){return f[h]=Mg(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:kg};function Vg(e){var t=e.state,n=e.name;t.modifiersData[n]=xc({reference:t.rects.reference,element:t.rects.popper,placement:t.placement})}const To={name:"popperOffsets",enabled:!0,phase:"read",fn:Vg,data:{}};function Fg(e){return e==="x"?"y":"x"}function Hg(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,_=p===void 0?!0:p,x=n.tetherOffset,A=x===void 0?0:x,R=rs(t,{boundary:c,rootBoundary:d,padding:h,altBoundary:f}),P=Nt(t.placement),H=ss(t.placement),F=!H,k=_o(P),b=Fg(k),y=t.modifiersData.popperOffsets,O=t.rects.reference,w=t.rects.popper,T=typeof A=="function"?A(Object.assign({},t.rects,{placement:t.placement})):A,S=typeof T=="number"?{mainAxis:T,altAxis:T}:Object.assign({mainAxis:0,altAxis:0},T),K=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,B={x:0,y:0};if(y){if(o){var Q,oe=k==="y"?Ge:qe,de=k==="y"?Je:Ze,te=k==="y"?"height":"width",ee=y[k],ce=ee+R[oe],we=ee-R[de],je=_?-w[te]/2:0,De=H===xn?O[te]:w[te],be=H===xn?-w[te]:-O[te],Qe=t.elements.arrow,Ke=_&&Qe?mo(Qe):{width:0,height:0},Pe=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:Tc(),Te=Pe[oe],I=Pe[de],q=Os(0,O[te],Ke[te]),z=F?O[te]/2-je-q-Te-S.mainAxis:De-q-Te-S.mainAxis,J=F?-O[te]/2+je+q+I+S.mainAxis:be+q+I+S.mainAxis,$=t.elements.arrow&&Gs(t.elements.arrow),g=$?k==="y"?$.clientTop||0:$.clientLeft||0:0,v=(Q=K?.[k])!=null?Q:0,C=ee+z-v-g,D=ee+J-v,V=Os(_?Or(ce,C):ce,ee,_?Tn(we,D):we);y[k]=V,B[k]=V-ee}if(l){var M,W=k==="x"?Ge:qe,Y=k==="x"?Je:Ze,N=y[b],j=b==="y"?"height":"width",ne=N+R[W],X=N-R[Y],Z=[Ge,qe].indexOf(P)!==-1,re=(M=K?.[b])!=null?M:0,ae=Z?ne:N-O[j]-w[j]-re+S.altAxis,he=Z?N+O[j]+w[j]-re-S.altAxis:X,ue=_&&Z?_g(ae,N,he):Os(_?ae:ne,N,_?he:X);y[b]=ue,B[b]=ue-N}t.modifiersData[s]=B}}const Dc={name:"preventOverflow",enabled:!0,phase:"main",fn:Hg,requiresIfExists:["offset"]};function Bg(e){return{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}}function jg(e){return e===et(e)||!lt(e)?yo(e):Bg(e)}function Kg(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 Wg(e,t,n){n===void 0&&(n=!1);var s=lt(t),r=lt(t)&&Kg(t),o=ln(t),a=ns(e,r,n),l={scrollLeft:0,scrollTop:0},c={x:0,y:0};return(s||!s&&!n)&&(($t(t)!=="body"||Ao(o))&&(l=jg(t)),lt(t)?(c=ns(t,!0),c.x+=t.clientLeft,c.y+=t.clientTop):o&&(c.x=bo(o))),{x:a.left+l.scrollLeft-c.x,y:a.top+l.scrollTop-c.y,width:a.width,height:a.height}}function Ug(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 Yg(e){var t=Ug(e);return yc.reduce(function(n,s){return n.concat(t.filter(function(r){return r.phase===s}))},[])}function Gg(e){var t;return function(){return t||(t=new Promise(function(n){Promise.resolve().then(function(){t=void 0,n(e())})})),t}}function qg(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 qa={placement:"bottom",modifiers:[],strategy:"absolute"};function za(){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 E=o.get(m);if(!E.has(i)&&E.size!==0){console.error(`Bootstrap doesn't allow more than one instance per element. Bound instance: ${Array.from(E.keys())[0]}.`);return}E.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},_=m=>{if(!m)return 0;let{transitionDuration:i,transitionDelay:u}=window.getComputedStyle(m);const E=Number.parseFloat(i),L=Number.parseFloat(u);return!E&&!L?0:(i=i.split(",")[0],u=u.split(",")[0],(Number.parseFloat(i)+Number.parseFloat(u))*c)},x=m=>{m.dispatchEvent(new Event(d))},A=m=>!m||typeof m!="object"?!1:(typeof m.jquery<"u"&&(m=m[0]),typeof m.nodeType<"u"),R=m=>A(m)?m.jquery?m[0]:m:typeof m=="string"&&m.length>0?document.querySelector(f(m)):null,P=m=>{if(!A(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 E=m.closest("summary");if(E&&E.parentNode!==u||E===null)return!1}return i},H=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",F=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?F(m.parentNode):null},k=()=>{},b=m=>{m.offsetHeight},y=()=>window.jQuery&&!document.body.hasAttribute("data-bs-no-jquery")?window.jQuery:null,O=[],w=m=>{document.readyState==="loading"?(O.length||document.addEventListener("DOMContentLoaded",()=>{for(const i of O)i()}),O.push(m)):m()},T=()=>document.documentElement.dir==="rtl",S=m=>{w(()=>{const i=y();if(i){const u=m.NAME,E=i.fn[u];i.fn[u]=m.jQueryInterface,i.fn[u].Constructor=m,i.fn[u].noConflict=()=>(i.fn[u]=E,m.jQueryInterface)}})},K=(m,i=[],u=m)=>typeof m=="function"?m.call(...i):u,B=(m,i,u=!0)=>{if(!u){K(m);return}const L=_(i)+5;let G=!1;const U=({target:le})=>{le===i&&(G=!0,i.removeEventListener(d,U),K(m))};i.addEventListener(d,U),setTimeout(()=>{G||x(i)},L)},Q=(m,i,u,E)=>{const L=m.length;let G=m.indexOf(i);return G===-1?!u&&E?m[L-1]:m[0]:(G+=u?1:-1,E&&(G=(G+L)%L),m[Math.max(0,Math.min(G,L-1))])},oe=/[^.]*(?=\..*)\.|.*/,de=/\..*/,te=/::\d+$/,ee={};let ce=1;const we={mouseenter:"mouseover",mouseleave:"mouseout"},je=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 be(m){const i=De(m);return m.uidEvent=i,ee[i]=ee[i]||{},ee[i]}function Qe(m,i){return function u(E){return g(E,{delegateTarget:m}),u.oneOff&&$.off(m,E.type,i),i.apply(m,[E])}}function Ke(m,i,u){return function E(L){const G=m.querySelectorAll(i);for(let{target:U}=L;U&&U!==this;U=U.parentNode)for(const le of G)if(le===U)return g(L,{delegateTarget:U}),E.oneOff&&$.off(m,L.type,i,u),u.apply(U,[L])}}function Pe(m,i,u=null){return Object.values(m).find(E=>E.callable===i&&E.delegationSelector===u)}function Te(m,i,u){const E=typeof i=="string",L=E?u:i||u;let G=J(m);return je.has(G)||(G=m),[E,L,G]}function I(m,i,u,E,L){if(typeof i!="string"||!m)return;let[G,U,le]=Te(i,u,E);i in we&&(U=(fg=>function(Bn){if(!Bn.relatedTarget||Bn.relatedTarget!==Bn.delegateTarget&&!Bn.delegateTarget.contains(Bn.relatedTarget))return fg.call(this,Bn)})(U));const ze=be(m),rt=ze[le]||(ze[le]={}),$e=Pe(rt,U,G?u:null);if($e){$e.oneOff=$e.oneOff&&L;return}const Tt=De(U,i.replace(oe,"")),gt=G?Ke(m,u,U):Qe(m,U);gt.delegationSelector=G?u:null,gt.callable=U,gt.oneOff=L,gt.uidEvent=Tt,rt[Tt]=gt,m.addEventListener(le,gt,G)}function q(m,i,u,E,L){const G=Pe(i[u],E,L);G&&(m.removeEventListener(u,G,!!L),delete i[u][G.uidEvent])}function z(m,i,u,E){const L=i[u]||{};for(const[G,U]of Object.entries(L))G.includes(E)&&q(m,i,u,U.callable,U.delegationSelector)}function J(m){return m=m.replace(de,""),we[m]||m}const $={on(m,i,u,E){I(m,i,u,E,!1)},one(m,i,u,E){I(m,i,u,E,!0)},off(m,i,u,E){if(typeof i!="string"||!m)return;const[L,G,U]=Te(i,u,E),le=U!==i,ze=be(m),rt=ze[U]||{},$e=i.startsWith(".");if(typeof G<"u"){if(!Object.keys(rt).length)return;q(m,ze,U,G,L?u:null);return}if($e)for(const Tt of Object.keys(ze))z(m,ze,Tt,i.slice(1));for(const[Tt,gt]of Object.entries(rt)){const ur=Tt.replace(te,"");(!le||i.includes(ur))&&q(m,ze,U,gt.callable,gt.delegationSelector)}},trigger(m,i,u){if(typeof i!="string"||!m)return null;const E=y(),L=J(i),G=i!==L;let U=null,le=!0,ze=!0,rt=!1;G&&E&&(U=E.Event(i,u),E(m).trigger(U),le=!U.isPropagationStopped(),ze=!U.isImmediatePropagationStopped(),rt=U.isDefaultPrevented());const $e=g(new Event(i,{bubbles:le,cancelable:!0}),u);return rt&&$e.preventDefault(),ze&&m.dispatchEvent($e),$e.defaultPrevented&&U&&U.preventDefault(),$e}};function g(m,i={}){for(const[u,E]of Object.entries(i))try{m[u]=E}catch{Object.defineProperty(m,u,{configurable:!0,get(){return E}})}return m}function v(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 C(m){return m.replace(/[A-Z]/g,i=>`-${i.toLowerCase()}`)}const D={setDataAttribute(m,i,u){m.setAttribute(`data-bs-${C(i)}`,u)},removeDataAttribute(m,i){m.removeAttribute(`data-bs-${C(i)}`)},getDataAttributes(m){if(!m)return{};const i={},u=Object.keys(m.dataset).filter(E=>E.startsWith("bs")&&!E.startsWith("bsConfig"));for(const E of u){let L=E.replace(/^bs/,"");L=L.charAt(0).toLowerCase()+L.slice(1),i[L]=v(m.dataset[E])}return i},getDataAttribute(m,i){return v(m.getAttribute(`data-bs-${C(i)}`))}};class V{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 E=A(u)?D.getDataAttribute(u,"config"):{};return{...this.constructor.Default,...typeof E=="object"?E:{},...A(u)?D.getDataAttributes(u):{},...typeof i=="object"?i:{}}}_typeCheckConfig(i,u=this.constructor.DefaultType){for(const[E,L]of Object.entries(u)){const G=i[E],U=A(G)?"element":h(G);if(!new RegExp(L).test(U))throw new TypeError(`${this.constructor.NAME.toUpperCase()}: Option "${E}" provided type "${U}" but expected type "${L}".`)}}}const M="5.3.7";class W extends V{constructor(i,u){super(),i=R(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,E=!0){B(i,u,E)}_getConfig(i){return i=this._mergeConfigObj(i,this._element),i=this._configAfterMerge(i),this._typeCheckConfig(i),i}static getInstance(i){return a.get(R(i),this.DATA_KEY)}static getOrCreateInstance(i,u={}){return this.getInstance(i)||new this(i,typeof u=="object"?u:null)}static get VERSION(){return M}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 Y=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 E=m.parentNode.closest(i);for(;E;)u.push(E),E=E.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=>!H(u)&&P(u))},getSelectorFromElement(m){const i=Y(m);return i&&N.findOne(i)?i:null},getElementFromSelector(m){const i=Y(m);return i?N.findOne(i):null},getMultipleElementsFromSelector(m){const i=Y(m);return i?N.find(i):[]}},j=(m,i="hide")=>{const u=`click.dismiss${m.EVENT_KEY}`,E=m.NAME;$.on(document,u,`[data-bs-dismiss="${E}"]`,function(L){if(["A","AREA"].includes(this.tagName)&&L.preventDefault(),H(this))return;const G=N.getElementFromSelector(this)||this.closest(`.${E}`);m.getOrCreateInstance(G)[i]()})},ne="alert",Z=".bs.alert",re=`close${Z}`,ae=`closed${Z}`,he="fade",ue="show";class Ce extends W{static get NAME(){return ne}close(){if($.trigger(this._element,re).defaultPrevented)return;this._element.classList.remove(ue);const u=this._element.classList.contains(he);this._queueCallback(()=>this._destroyElement(),this._element,u)}_destroyElement(){this._element.remove(),$.trigger(this._element,ae),this.dispose()}static jQueryInterface(i){return this.each(function(){const u=Ce.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)}})}}j(Ce,"close"),S(Ce);const Me="button",tt=".bs.button",fn=".data-api",Js="active",ke='[data-bs-toggle="button"]',nt=`click${tt}${fn}`;class Wt extends W{static get NAME(){return Me}toggle(){this._element.setAttribute("aria-pressed",this._element.classList.toggle(Js))}static jQueryInterface(i){return this.each(function(){const u=Wt.getOrCreateInstance(this);i==="toggle"&&u[i]()})}}$.on(document,nt,ke,m=>{m.preventDefault();const i=m.target.closest(ke);Wt.getOrCreateInstance(i).toggle()}),S(Wt);const Mf="swipe",Ln=".bs.swipe",kf=`touchstart${Ln}`,Vf=`touchmove${Ln}`,Ff=`touchend${Ln}`,Hf=`pointerdown${Ln}`,Bf=`pointerup${Ln}`,jf="touch",Kf="pen",Wf="pointer-event",Uf=40,Yf={endCallback:null,leftCallback:null,rightCallback:null},Gf={endCallback:"(function|null)",leftCallback:"(function|null)",rightCallback:"(function|null)"};class Zs extends V{constructor(i,u){super(),this._element=i,!(!i||!Zs.isSupported())&&(this._config=this._getConfig(u),this._deltaX=0,this._supportPointerEvents=!!window.PointerEvent,this._initEvents())}static get Default(){return Yf}static get DefaultType(){return Gf}static get NAME(){return Mf}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(),K(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<=Uf)return;const u=i/this._deltaX;this._deltaX=0,u&&K(u>0?this._config.rightCallback:this._config.leftCallback)}_initEvents(){this._supportPointerEvents?($.on(this._element,Hf,i=>this._start(i)),$.on(this._element,Bf,i=>this._end(i)),this._element.classList.add(Wf)):($.on(this._element,kf,i=>this._start(i)),$.on(this._element,Vf,i=>this._move(i)),$.on(this._element,Ff,i=>this._end(i)))}_eventIsPointerPenTouch(i){return this._supportPointerEvents&&(i.pointerType===Kf||i.pointerType===jf)}static isSupported(){return"ontouchstart"in document.documentElement||navigator.maxTouchPoints>0}}const qf="carousel",Ut=".bs.carousel",na=".data-api",zf="ArrowLeft",Xf="ArrowRight",Qf=500,_s="next",In="prev",Pn="left",er="right",Jf=`slide${Ut}`,li=`slid${Ut}`,Zf=`keydown${Ut}`,ed=`mouseenter${Ut}`,td=`mouseleave${Ut}`,nd=`dragstart${Ut}`,sd=`load${Ut}${na}`,rd=`click${Ut}${na}`,sa="carousel",tr="active",id="slide",od="carousel-item-end",ad="carousel-item-start",ld="carousel-item-next",cd="carousel-item-prev",ra=".active",ia=".carousel-item",ud=ra+ia,fd=".carousel-item img",dd=".carousel-indicators",hd="[data-bs-slide], [data-bs-slide-to]",pd='[data-bs-ride="carousel"]',gd={[zf]:er,[Xf]:Pn},md={interval:5e3,keyboard:!0,pause:"hover",ride:!1,touch:!0,wrap:!0},_d={interval:"(number|boolean)",keyboard:"boolean",pause:"(string|boolean)",ride:"(boolean|string)",touch:"boolean",wrap:"boolean"};class Mn extends W{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(dd,this._element),this._addEventListeners(),this._config.ride===sa&&this.cycle()}static get Default(){return md}static get DefaultType(){return _d}static get NAME(){return qf}next(){this._slide(_s)}nextWhenVisible(){!document.hidden&&P(this._element)&&this.next()}prev(){this._slide(In)}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,li,()=>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,li,()=>this.to(i));return}const E=this._getItemIndex(this._getActive());if(E===i)return;const L=i>E?_s:In;this._slide(L,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,Zf,i=>this._keydown(i)),this._config.pause==="hover"&&($.on(this._element,ed,()=>this.pause()),$.on(this._element,td,()=>this._maybeEnableCycle())),this._config.touch&&Zs.isSupported()&&this._addTouchEventListeners()}_addTouchEventListeners(){for(const E of N.find(fd,this._element))$.on(E,nd,L=>L.preventDefault());const u={leftCallback:()=>this._slide(this._directionToOrder(Pn)),rightCallback:()=>this._slide(this._directionToOrder(er)),endCallback:()=>{this._config.pause==="hover"&&(this.pause(),this.touchTimeout&&clearTimeout(this.touchTimeout),this.touchTimeout=setTimeout(()=>this._maybeEnableCycle(),Qf+this._config.interval))}};this._swipeHelper=new Zs(this._element,u)}_keydown(i){if(/input|textarea/i.test(i.target.tagName))return;const u=gd[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(ra,this._indicatorsElement);u.classList.remove(tr),u.removeAttribute("aria-current");const E=N.findOne(`[data-bs-slide-to="${i}"]`,this._indicatorsElement);E&&(E.classList.add(tr),E.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 E=this._getActive(),L=i===_s,G=u||Q(this._getItems(),E,L,this._config.wrap);if(G===E)return;const U=this._getItemIndex(G),le=ur=>$.trigger(this._element,ur,{relatedTarget:G,direction:this._orderToDirection(i),from:this._getItemIndex(E),to:U});if(le(Jf).defaultPrevented||!E||!G)return;const rt=!!this._interval;this.pause(),this._isSliding=!0,this._setActiveIndicatorElement(U),this._activeElement=G;const $e=L?ad:od,Tt=L?ld:cd;G.classList.add(Tt),b(G),E.classList.add($e),G.classList.add($e);const gt=()=>{G.classList.remove($e,Tt),G.classList.add(tr),E.classList.remove(tr,Tt,$e),this._isSliding=!1,le(li)};this._queueCallback(gt,E,this._isAnimated()),rt&&this.cycle()}_isAnimated(){return this._element.classList.contains(id)}_getActive(){return N.findOne(ud,this._element)}_getItems(){return N.find(ia,this._element)}_clearInterval(){this._interval&&(clearInterval(this._interval),this._interval=null)}_directionToOrder(i){return T()?i===Pn?In:_s:i===Pn?_s:In}_orderToDirection(i){return T()?i===In?Pn:er:i===In?er:Pn}static jQueryInterface(i){return this.each(function(){const u=Mn.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,rd,hd,function(m){const i=N.getElementFromSelector(this);if(!i||!i.classList.contains(sa))return;m.preventDefault();const u=Mn.getOrCreateInstance(i),E=this.getAttribute("data-bs-slide-to");if(E){u.to(E),u._maybeEnableCycle();return}if(D.getDataAttribute(this,"slide")==="next"){u.next(),u._maybeEnableCycle();return}u.prev(),u._maybeEnableCycle()}),$.on(window,sd,()=>{const m=N.find(pd);for(const i of m)Mn.getOrCreateInstance(i)}),S(Mn);const vd="collapse",vs=".bs.collapse",Ed=".data-api",yd=`show${vs}`,bd=`shown${vs}`,Ad=`hide${vs}`,Td=`hidden${vs}`,wd=`click${vs}${Ed}`,ci="show",kn="collapse",nr="collapsing",Cd="collapsed",Sd=`:scope .${kn} .${kn}`,Od="collapse-horizontal",xd="width",Nd="height",$d=".collapse.show, .collapse.collapsing",ui='[data-bs-toggle="collapse"]',Rd={parent:null,toggle:!0},Dd={parent:"(null|element)",toggle:"boolean"};class Vn extends W{constructor(i,u){super(i,u),this._isTransitioning=!1,this._triggerArray=[];const E=N.find(ui);for(const L of E){const G=N.getSelectorFromElement(L),U=N.find(G).filter(le=>le===this._element);G!==null&&U.length&&this._triggerArray.push(L)}this._initializeChildren(),this._config.parent||this._addAriaAndCollapsedClass(this._triggerArray,this._isShown()),this._config.toggle&&this.toggle()}static get Default(){return Rd}static get DefaultType(){return Dd}static get NAME(){return vd}toggle(){this._isShown()?this.hide():this.show()}show(){if(this._isTransitioning||this._isShown())return;let i=[];if(this._config.parent&&(i=this._getFirstLevelChildren($d).filter(le=>le!==this._element).map(le=>Vn.getOrCreateInstance(le,{toggle:!1}))),i.length&&i[0]._isTransitioning||$.trigger(this._element,yd).defaultPrevented)return;for(const le of i)le.hide();const E=this._getDimension();this._element.classList.remove(kn),this._element.classList.add(nr),this._element.style[E]=0,this._addAriaAndCollapsedClass(this._triggerArray,!0),this._isTransitioning=!0;const L=()=>{this._isTransitioning=!1,this._element.classList.remove(nr),this._element.classList.add(kn,ci),this._element.style[E]="",$.trigger(this._element,bd)},U=`scroll${E[0].toUpperCase()+E.slice(1)}`;this._queueCallback(L,this._element,!0),this._element.style[E]=`${this._element[U]}px`}hide(){if(this._isTransitioning||!this._isShown()||$.trigger(this._element,Ad).defaultPrevented)return;const u=this._getDimension();this._element.style[u]=`${this._element.getBoundingClientRect()[u]}px`,b(this._element),this._element.classList.add(nr),this._element.classList.remove(kn,ci);for(const L of this._triggerArray){const G=N.getElementFromSelector(L);G&&!this._isShown(G)&&this._addAriaAndCollapsedClass([L],!1)}this._isTransitioning=!0;const E=()=>{this._isTransitioning=!1,this._element.classList.remove(nr),this._element.classList.add(kn),$.trigger(this._element,Td)};this._element.style[u]="",this._queueCallback(E,this._element,!0)}_isShown(i=this._element){return i.classList.contains(ci)}_configAfterMerge(i){return i.toggle=!!i.toggle,i.parent=R(i.parent),i}_getDimension(){return this._element.classList.contains(Od)?xd:Nd}_initializeChildren(){if(!this._config.parent)return;const i=this._getFirstLevelChildren(ui);for(const u of i){const E=N.getElementFromSelector(u);E&&this._addAriaAndCollapsedClass([u],this._isShown(E))}}_getFirstLevelChildren(i){const u=N.find(Sd,this._config.parent);return N.find(i,this._config.parent).filter(E=>!u.includes(E))}_addAriaAndCollapsedClass(i,u){if(i.length)for(const E of i)E.classList.toggle(Cd,!u),E.setAttribute("aria-expanded",u)}static jQueryInterface(i){const u={};return typeof i=="string"&&/show|hide/.test(i)&&(u.toggle=!1),this.each(function(){const E=Vn.getOrCreateInstance(this,u);if(typeof i=="string"){if(typeof E[i]>"u")throw new TypeError(`No method named "${i}"`);E[i]()}})}}$.on(document,wd,ui,function(m){(m.target.tagName==="A"||m.delegateTarget&&m.delegateTarget.tagName==="A")&&m.preventDefault();for(const i of N.getMultipleElementsFromSelector(this))Vn.getOrCreateInstance(i,{toggle:!1}).toggle()}),S(Vn);const oa="dropdown",dn=".bs.dropdown",fi=".data-api",Ld="Escape",aa="Tab",Id="ArrowUp",la="ArrowDown",Pd=2,Md=`hide${dn}`,kd=`hidden${dn}`,Vd=`show${dn}`,Fd=`shown${dn}`,ca=`click${dn}${fi}`,ua=`keydown${dn}${fi}`,Hd=`keyup${dn}${fi}`,Fn="show",Bd="dropup",jd="dropend",Kd="dropstart",Wd="dropup-center",Ud="dropdown-center",hn='[data-bs-toggle="dropdown"]:not(.disabled):not(:disabled)',Yd=`${hn}.${Fn}`,sr=".dropdown-menu",Gd=".navbar",qd=".navbar-nav",zd=".dropdown-menu .dropdown-item:not(.disabled):not(:disabled)",Xd=T()?"top-end":"top-start",Qd=T()?"top-start":"top-end",Jd=T()?"bottom-end":"bottom-start",Zd=T()?"bottom-start":"bottom-end",eh=T()?"left-start":"right-start",th=T()?"right-start":"left-start",nh="top",sh="bottom",rh={autoClose:!0,boundary:"clippingParents",display:"dynamic",offset:[0,2],popperConfig:null,reference:"toggle"},ih={autoClose:"(boolean|string)",boundary:"(string|element)",display:"string",offset:"(array|string|function)",popperConfig:"(null|object|function)",reference:"(string|element|object)"};class pt extends W{constructor(i,u){super(i,u),this._popper=null,this._parent=this._element.parentNode,this._menu=N.next(this._element,sr)[0]||N.prev(this._element,sr)[0]||N.findOne(sr,this._parent),this._inNavbar=this._detectNavbar()}static get Default(){return rh}static get DefaultType(){return ih}static get NAME(){return oa}toggle(){return this._isShown()?this.hide():this.show()}show(){if(H(this._element)||this._isShown())return;const i={relatedTarget:this._element};if(!$.trigger(this._element,Vd,i).defaultPrevented){if(this._createPopper(),"ontouchstart"in document.documentElement&&!this._parent.closest(qd))for(const E of[].concat(...document.body.children))$.on(E,"mouseover",k);this._element.focus(),this._element.setAttribute("aria-expanded",!0),this._menu.classList.add(Fn),this._element.classList.add(Fn),$.trigger(this._element,Fd,i)}}hide(){if(H(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,Md,i).defaultPrevented){if("ontouchstart"in document.documentElement)for(const E of[].concat(...document.body.children))$.off(E,"mouseover",k);this._popper&&this._popper.destroy(),this._menu.classList.remove(Fn),this._element.classList.remove(Fn),this._element.setAttribute("aria-expanded","false"),D.removeDataAttribute(this._menu,"popper"),$.trigger(this._element,kd,i),this._element.focus()}}_getConfig(i){if(i=super._getConfig(i),typeof i.reference=="object"&&!A(i.reference)&&typeof i.reference.getBoundingClientRect!="function")throw new TypeError(`${oa.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/docs/v2/)");let i=this._element;this._config.reference==="parent"?i=this._parent:A(this._config.reference)?i=R(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(Fn)}_getPlacement(){const i=this._parent;if(i.classList.contains(jd))return eh;if(i.classList.contains(Kd))return th;if(i.classList.contains(Wd))return nh;if(i.classList.contains(Ud))return sh;const u=getComputedStyle(this._menu).getPropertyValue("--bs-position").trim()==="end";return i.classList.contains(Bd)?u?Qd:Xd:u?Zd:Jd}_detectNavbar(){return this._element.closest(Gd)!==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")&&(D.setDataAttribute(this._menu,"popper","static"),i.modifiers=[{name:"applyStyles",enabled:!1}]),{...i,...K(this._config.popperConfig,[void 0,i])}}_selectMenuItem({key:i,target:u}){const E=N.find(zd,this._menu).filter(L=>P(L));E.length&&Q(E,u,i===la,!E.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===Pd||i.type==="keyup"&&i.key!==aa)return;const u=N.find(Yd);for(const E of u){const L=pt.getInstance(E);if(!L||L._config.autoClose===!1)continue;const G=i.composedPath(),U=G.includes(L._menu);if(G.includes(L._element)||L._config.autoClose==="inside"&&!U||L._config.autoClose==="outside"&&U||L._menu.contains(i.target)&&(i.type==="keyup"&&i.key===aa||/input|select|option|textarea|form/i.test(i.target.tagName)))continue;const le={relatedTarget:L._element};i.type==="click"&&(le.clickEvent=i),L._completeHide(le)}}static dataApiKeydownHandler(i){const u=/input|textarea/i.test(i.target.tagName),E=i.key===Ld,L=[Id,la].includes(i.key);if(!L&&!E||u&&!E)return;i.preventDefault();const G=this.matches(hn)?this:N.prev(this,hn)[0]||N.next(this,hn)[0]||N.findOne(hn,i.delegateTarget.parentNode),U=pt.getOrCreateInstance(G);if(L){i.stopPropagation(),U.show(),U._selectMenuItem(i);return}U._isShown()&&(i.stopPropagation(),U.hide(),G.focus())}}$.on(document,ua,hn,pt.dataApiKeydownHandler),$.on(document,ua,sr,pt.dataApiKeydownHandler),$.on(document,ca,pt.clearMenus),$.on(document,Hd,pt.clearMenus),$.on(document,ca,hn,function(m){m.preventDefault(),pt.getOrCreateInstance(this).toggle()}),S(pt);const fa="backdrop",oh="fade",da="show",ha=`mousedown.bs.${fa}`,ah={className:"modal-backdrop",clickCallback:null,isAnimated:!1,isVisible:!0,rootElement:"body"},lh={className:"string",clickCallback:"(function|null)",isAnimated:"boolean",isVisible:"boolean",rootElement:"(element|string)"};class pa extends V{constructor(i){super(),this._config=this._getConfig(i),this._isAppended=!1,this._element=null}static get Default(){return ah}static get DefaultType(){return lh}static get NAME(){return fa}show(i){if(!this._config.isVisible){K(i);return}this._append();const u=this._getElement();this._config.isAnimated&&b(u),u.classList.add(da),this._emulateAnimation(()=>{K(i)})}hide(i){if(!this._config.isVisible){K(i);return}this._getElement().classList.remove(da),this._emulateAnimation(()=>{this.dispose(),K(i)})}dispose(){this._isAppended&&($.off(this._element,ha),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(oh),this._element=i}return this._element}_configAfterMerge(i){return i.rootElement=R(i.rootElement),i}_append(){if(this._isAppended)return;const i=this._getElement();this._config.rootElement.append(i),$.on(i,ha,()=>{K(this._config.clickCallback)}),this._isAppended=!0}_emulateAnimation(i){B(i,this._getElement(),this._config.isAnimated)}}const ch="focustrap",rr=".bs.focustrap",uh=`focusin${rr}`,fh=`keydown.tab${rr}`,dh="Tab",hh="forward",ga="backward",ph={autofocus:!0,trapElement:null},gh={autofocus:"boolean",trapElement:"element"};class ma extends V{constructor(i){super(),this._config=this._getConfig(i),this._isActive=!1,this._lastTabNavDirection=null}static get Default(){return ph}static get DefaultType(){return gh}static get NAME(){return ch}activate(){this._isActive||(this._config.autofocus&&this._config.trapElement.focus(),$.off(document,rr),$.on(document,uh,i=>this._handleFocusin(i)),$.on(document,fh,i=>this._handleKeydown(i)),this._isActive=!0)}deactivate(){this._isActive&&(this._isActive=!1,$.off(document,rr))}_handleFocusin(i){const{trapElement:u}=this._config;if(i.target===document||i.target===u||u.contains(i.target))return;const E=N.focusableChildren(u);E.length===0?u.focus():this._lastTabNavDirection===ga?E[E.length-1].focus():E[0].focus()}_handleKeydown(i){i.key===dh&&(this._lastTabNavDirection=i.shiftKey?ga:hh)}}const _a=".fixed-top, .fixed-bottom, .is-fixed, .sticky-top",va=".sticky-top",ir="padding-right",Ea="margin-right";class di{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,ir,u=>u+i),this._setElementAttributes(_a,ir,u=>u+i),this._setElementAttributes(va,Ea,u=>u-i)}reset(){this._resetElementAttributes(this._element,"overflow"),this._resetElementAttributes(this._element,ir),this._resetElementAttributes(_a,ir),this._resetElementAttributes(va,Ea)}isOverflowing(){return this.getWidth()>0}_disableOverFlow(){this._saveInitialAttribute(this._element,"overflow"),this._element.style.overflow="hidden"}_setElementAttributes(i,u,E){const L=this.getWidth(),G=U=>{if(U!==this._element&&window.innerWidth>U.clientWidth+L)return;this._saveInitialAttribute(U,u);const le=window.getComputedStyle(U).getPropertyValue(u);U.style.setProperty(u,`${E(Number.parseFloat(le))}px`)};this._applyManipulationCallback(i,G)}_saveInitialAttribute(i,u){const E=i.style.getPropertyValue(u);E&&D.setDataAttribute(i,u,E)}_resetElementAttributes(i,u){const E=L=>{const G=D.getDataAttribute(L,u);if(G===null){L.style.removeProperty(u);return}D.removeDataAttribute(L,u),L.style.setProperty(u,G)};this._applyManipulationCallback(i,E)}_applyManipulationCallback(i,u){if(A(i)){u(i);return}for(const E of N.find(i,this._element))u(E)}}const mh="modal",st=".bs.modal",_h=".data-api",vh="Escape",Eh=`hide${st}`,yh=`hidePrevented${st}`,ya=`hidden${st}`,ba=`show${st}`,bh=`shown${st}`,Ah=`resize${st}`,Th=`click.dismiss${st}`,wh=`mousedown.dismiss${st}`,Ch=`keydown.dismiss${st}`,Sh=`click${st}${_h}`,Aa="modal-open",Oh="fade",Ta="show",hi="modal-static",xh=".modal.show",Nh=".modal-dialog",$h=".modal-body",Rh='[data-bs-toggle="modal"]',Dh={backdrop:!0,focus:!0,keyboard:!0},Lh={backdrop:"(boolean|string)",focus:"boolean",keyboard:"boolean"};class pn extends W{constructor(i,u){super(i,u),this._dialog=N.findOne(Nh,this._element),this._backdrop=this._initializeBackDrop(),this._focustrap=this._initializeFocusTrap(),this._isShown=!1,this._isTransitioning=!1,this._scrollBar=new di,this._addEventListeners()}static get Default(){return Dh}static get DefaultType(){return Lh}static get NAME(){return mh}toggle(i){return this._isShown?this.hide():this.show(i)}show(i){this._isShown||this._isTransitioning||$.trigger(this._element,ba,{relatedTarget:i}).defaultPrevented||(this._isShown=!0,this._isTransitioning=!0,this._scrollBar.hide(),document.body.classList.add(Aa),this._adjustDialog(),this._backdrop.show(()=>this._showElement(i)))}hide(){!this._isShown||this._isTransitioning||$.trigger(this._element,Eh).defaultPrevented||(this._isShown=!1,this._isTransitioning=!0,this._focustrap.deactivate(),this._element.classList.remove(Ta),this._queueCallback(()=>this._hideModal(),this._element,this._isAnimated()))}dispose(){$.off(window,st),$.off(this._dialog,st),this._backdrop.dispose(),this._focustrap.deactivate(),super.dispose()}handleUpdate(){this._adjustDialog()}_initializeBackDrop(){return new pa({isVisible:!!this._config.backdrop,isAnimated:this._isAnimated()})}_initializeFocusTrap(){return new ma({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($h,this._dialog);u&&(u.scrollTop=0),b(this._element),this._element.classList.add(Ta);const E=()=>{this._config.focus&&this._focustrap.activate(),this._isTransitioning=!1,$.trigger(this._element,bh,{relatedTarget:i})};this._queueCallback(E,this._dialog,this._isAnimated())}_addEventListeners(){$.on(this._element,Ch,i=>{if(i.key===vh){if(this._config.keyboard){this.hide();return}this._triggerBackdropTransition()}}),$.on(window,Ah,()=>{this._isShown&&!this._isTransitioning&&this._adjustDialog()}),$.on(this._element,wh,i=>{$.one(this._element,Th,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(Aa),this._resetAdjustments(),this._scrollBar.reset(),$.trigger(this._element,ya)})}_isAnimated(){return this._element.classList.contains(Oh)}_triggerBackdropTransition(){if($.trigger(this._element,yh).defaultPrevented)return;const u=this._element.scrollHeight>document.documentElement.clientHeight,E=this._element.style.overflowY;E==="hidden"||this._element.classList.contains(hi)||(u||(this._element.style.overflowY="hidden"),this._element.classList.add(hi),this._queueCallback(()=>{this._element.classList.remove(hi),this._queueCallback(()=>{this._element.style.overflowY=E},this._dialog)},this._dialog),this._element.focus())}_adjustDialog(){const i=this._element.scrollHeight>document.documentElement.clientHeight,u=this._scrollBar.getWidth(),E=u>0;if(E&&!i){const L=T()?"paddingLeft":"paddingRight";this._element.style[L]=`${u}px`}if(!E&&i){const L=T()?"paddingRight":"paddingLeft";this._element.style[L]=`${u}px`}}_resetAdjustments(){this._element.style.paddingLeft="",this._element.style.paddingRight=""}static jQueryInterface(i,u){return this.each(function(){const E=pn.getOrCreateInstance(this,i);if(typeof i=="string"){if(typeof E[i]>"u")throw new TypeError(`No method named "${i}"`);E[i](u)}})}}$.on(document,Sh,Rh,function(m){const i=N.getElementFromSelector(this);["A","AREA"].includes(this.tagName)&&m.preventDefault(),$.one(i,ba,L=>{L.defaultPrevented||$.one(i,ya,()=>{P(this)&&this.focus()})});const u=N.findOne(xh);u&&pn.getInstance(u).hide(),pn.getOrCreateInstance(i).toggle(this)}),j(pn),S(pn);const Ih="offcanvas",Rt=".bs.offcanvas",wa=".data-api",Ph=`load${Rt}${wa}`,Mh="Escape",Ca="show",Sa="showing",Oa="hiding",kh="offcanvas-backdrop",xa=".offcanvas.show",Vh=`show${Rt}`,Fh=`shown${Rt}`,Hh=`hide${Rt}`,Na=`hidePrevented${Rt}`,$a=`hidden${Rt}`,Bh=`resize${Rt}`,jh=`click${Rt}${wa}`,Kh=`keydown.dismiss${Rt}`,Wh='[data-bs-toggle="offcanvas"]',Uh={backdrop:!0,keyboard:!0,scroll:!1},Yh={backdrop:"(boolean|string)",keyboard:"boolean",scroll:"boolean"};class Dt extends W{constructor(i,u){super(i,u),this._isShown=!1,this._backdrop=this._initializeBackDrop(),this._focustrap=this._initializeFocusTrap(),this._addEventListeners()}static get Default(){return Uh}static get DefaultType(){return Yh}static get NAME(){return Ih}toggle(i){return this._isShown?this.hide():this.show(i)}show(i){if(this._isShown||$.trigger(this._element,Vh,{relatedTarget:i}).defaultPrevented)return;this._isShown=!0,this._backdrop.show(),this._config.scroll||new di().hide(),this._element.setAttribute("aria-modal",!0),this._element.setAttribute("role","dialog"),this._element.classList.add(Sa);const E=()=>{(!this._config.scroll||this._config.backdrop)&&this._focustrap.activate(),this._element.classList.add(Ca),this._element.classList.remove(Sa),$.trigger(this._element,Fh,{relatedTarget:i})};this._queueCallback(E,this._element,!0)}hide(){if(!this._isShown||$.trigger(this._element,Hh).defaultPrevented)return;this._focustrap.deactivate(),this._element.blur(),this._isShown=!1,this._element.classList.add(Oa),this._backdrop.hide();const u=()=>{this._element.classList.remove(Ca,Oa),this._element.removeAttribute("aria-modal"),this._element.removeAttribute("role"),this._config.scroll||new di().reset(),$.trigger(this._element,$a)};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,Na);return}this.hide()},u=!!this._config.backdrop;return new pa({className:kh,isVisible:u,isAnimated:!0,rootElement:this._element.parentNode,clickCallback:u?i:null})}_initializeFocusTrap(){return new ma({trapElement:this._element})}_addEventListeners(){$.on(this._element,Kh,i=>{if(i.key===Mh){if(this._config.keyboard){this.hide();return}$.trigger(this._element,Na)}})}static jQueryInterface(i){return this.each(function(){const u=Dt.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,jh,Wh,function(m){const i=N.getElementFromSelector(this);if(["A","AREA"].includes(this.tagName)&&m.preventDefault(),H(this))return;$.one(i,$a,()=>{P(this)&&this.focus()});const u=N.findOne(xa);u&&u!==i&&Dt.getInstance(u).hide(),Dt.getOrCreateInstance(i).toggle(this)}),$.on(window,Ph,()=>{for(const m of N.find(xa))Dt.getOrCreateInstance(m).show()}),$.on(window,Bh,()=>{for(const m of N.find("[aria-modal][class*=show][class*=offcanvas-]"))getComputedStyle(m).position!=="fixed"&&Dt.getOrCreateInstance(m).hide()}),j(Dt),S(Dt);const Ra={"*":["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:[]},Gh=new Set(["background","cite","href","itemtype","longdesc","poster","src","xlink:href"]),qh=/^(?!javascript:)(?:[a-z0-9+.-]+:|[^&:/?#]*(?:[/?#]|$))/i,zh=(m,i)=>{const u=m.nodeName.toLowerCase();return i.includes(u)?Gh.has(u)?!!qh.test(m.nodeValue):!0:i.filter(E=>E instanceof RegExp).some(E=>E.test(u))};function Xh(m,i,u){if(!m.length)return m;if(u&&typeof u=="function")return u(m);const L=new window.DOMParser().parseFromString(m,"text/html"),G=[].concat(...L.body.querySelectorAll("*"));for(const U of G){const le=U.nodeName.toLowerCase();if(!Object.keys(i).includes(le)){U.remove();continue}const ze=[].concat(...U.attributes),rt=[].concat(i["*"]||[],i[le]||[]);for(const $e of ze)zh($e,rt)||U.removeAttribute($e.nodeName)}return L.body.innerHTML}const Qh="TemplateFactory",Jh={allowList:Ra,content:{},extraClass:"",html:!1,sanitize:!0,sanitizeFn:null,template:"
"},Zh={allowList:"object",content:"object",extraClass:"(string|function)",html:"boolean",sanitize:"boolean",sanitizeFn:"(null|function)",template:"string"},ep={entry:"(string|element|function|null)",selector:"(string|element)"};class tp extends V{constructor(i){super(),this._config=this._getConfig(i)}static get Default(){return Jh}static get DefaultType(){return Zh}static get NAME(){return Qh}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[L,G]of Object.entries(this._config.content))this._setContent(i,G,L);const u=i.children[0],E=this._resolvePossibleFunction(this._config.extraClass);return E&&u.classList.add(...E.split(" ")),u}_typeCheckConfig(i){super._typeCheckConfig(i),this._checkContent(i.content)}_checkContent(i){for(const[u,E]of Object.entries(i))super._typeCheckConfig({selector:u,entry:E},ep)}_setContent(i,u,E){const L=N.findOne(E,i);if(L){if(u=this._resolvePossibleFunction(u),!u){L.remove();return}if(A(u)){this._putElementInTemplate(R(u),L);return}if(this._config.html){L.innerHTML=this._maybeSanitize(u);return}L.textContent=u}}_maybeSanitize(i){return this._config.sanitize?Xh(i,this._config.allowList,this._config.sanitizeFn):i}_resolvePossibleFunction(i){return K(i,[void 0,this])}_putElementInTemplate(i,u){if(this._config.html){u.innerHTML="",u.append(i);return}u.textContent=i.textContent}}const np="tooltip",sp=new Set(["sanitize","allowList","sanitizeFn"]),pi="fade",rp="modal",or="show",ip=".tooltip-inner",Da=`.${rp}`,La="hide.bs.modal",Es="hover",gi="focus",mi="click",op="manual",ap="hide",lp="hidden",cp="show",up="shown",fp="inserted",dp="click",hp="focusin",pp="focusout",gp="mouseenter",mp="mouseleave",_p={AUTO:"auto",TOP:"top",RIGHT:T()?"left":"right",BOTTOM:"bottom",LEFT:T()?"right":"left"},vp={allowList:Ra,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"},Ep={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 W{constructor(i,u){if(typeof r>"u")throw new TypeError("Bootstrap's tooltips require Popper (https://popper.js.org/docs/v2/)");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 vp}static get DefaultType(){return Ep}static get NAME(){return np}enable(){this._isEnabled=!0}disable(){this._isEnabled=!1}toggleEnabled(){this._isEnabled=!this._isEnabled}toggle(){if(this._isEnabled){if(this._isShown()){this._leave();return}this._enter()}}dispose(){clearTimeout(this._timeout),$.off(this._element.closest(Da),La,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(cp)),E=(F(this._element)||this._element.ownerDocument.documentElement).contains(this._element);if(i.defaultPrevented||!E)return;this._disposePopper();const L=this._getTipElement();this._element.setAttribute("aria-describedby",L.getAttribute("id"));const{container:G}=this._config;if(this._element.ownerDocument.documentElement.contains(this.tip)||(G.append(L),$.trigger(this._element,this.constructor.eventName(fp))),this._popper=this._createPopper(L),L.classList.add(or),"ontouchstart"in document.documentElement)for(const le of[].concat(...document.body.children))$.on(le,"mouseover",k);const U=()=>{$.trigger(this._element,this.constructor.eventName(up)),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(ap)).defaultPrevented)return;if(this._getTipElement().classList.remove(or),"ontouchstart"in document.documentElement)for(const L of[].concat(...document.body.children))$.off(L,"mouseover",k);this._activeTrigger[mi]=!1,this._activeTrigger[gi]=!1,this._activeTrigger[Es]=!1,this._isHovered=null;const E=()=>{this._isWithActiveTrigger()||(this._isHovered||this._disposePopper(),this._element.removeAttribute("aria-describedby"),$.trigger(this._element,this.constructor.eventName(lp)))};this._queueCallback(E,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(pi,or),u.classList.add(`bs-${this.constructor.NAME}-auto`);const E=p(this.constructor.NAME).toString();return u.setAttribute("id",E),this._isAnimated()&&u.classList.add(pi),u}setContent(i){this._newContent=i,this._isShown()&&(this._disposePopper(),this.show())}_getTemplateFactory(i){return this._templateFactory?this._templateFactory.changeContent(i):this._templateFactory=new tp({...this._config,content:i,extraClass:this._resolvePossibleFunction(this._config.customClass)}),this._templateFactory}_getContentForTemplate(){return{[ip]: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(pi)}_isShown(){return this.tip&&this.tip.classList.contains(or)}_createPopper(i){const u=K(this._config.placement,[this,i,this._element]),E=_p[u.toUpperCase()];return r.createPopper(this._element,i,this._getPopperConfig(E))}_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 K(i,[this._element,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:E=>{this._getTipElement().setAttribute("data-popper-placement",E.state.placement)}}]};return{...u,...K(this._config.popperConfig,[void 0,u])}}_setListeners(){const i=this._config.trigger.split(" ");for(const u of i)if(u==="click")$.on(this._element,this.constructor.eventName(dp),this._config.selector,E=>{const L=this._initializeOnDelegatedTarget(E);L._activeTrigger[mi]=!(L._isShown()&&L._activeTrigger[mi]),L.toggle()});else if(u!==op){const E=u===Es?this.constructor.eventName(gp):this.constructor.eventName(hp),L=u===Es?this.constructor.eventName(mp):this.constructor.eventName(pp);$.on(this._element,E,this._config.selector,G=>{const U=this._initializeOnDelegatedTarget(G);U._activeTrigger[G.type==="focusin"?gi:Es]=!0,U._enter()}),$.on(this._element,L,this._config.selector,G=>{const U=this._initializeOnDelegatedTarget(G);U._activeTrigger[G.type==="focusout"?gi:Es]=U._element.contains(G.relatedTarget),U._leave()})}this._hideModalHandler=()=>{this._element&&this.hide()},$.on(this._element.closest(Da),La,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=D.getDataAttributes(this._element);for(const E of Object.keys(u))sp.has(E)&&delete u[E];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:R(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,E]of Object.entries(this._config))this.constructor.Default[u]!==E&&(i[u]=E);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]()}})}}S(gn);const yp="popover",bp=".popover-header",Ap=".popover-body",Tp={...gn.Default,content:"",offset:[0,8],placement:"right",template:'',trigger:"click"},wp={...gn.DefaultType,content:"(null|string|element|function)"};class ar extends gn{static get Default(){return Tp}static get DefaultType(){return wp}static get NAME(){return yp}_isWithContent(){return this._getTitle()||this._getContent()}_getContentForTemplate(){return{[bp]:this._getTitle(),[Ap]:this._getContent()}}_getContent(){return this._resolvePossibleFunction(this._config.content)}static jQueryInterface(i){return this.each(function(){const u=ar.getOrCreateInstance(this,i);if(typeof i=="string"){if(typeof u[i]>"u")throw new TypeError(`No method named "${i}"`);u[i]()}})}}S(ar);const Cp="scrollspy",_i=".bs.scrollspy",Sp=".data-api",Op=`activate${_i}`,Ia=`click${_i}`,xp=`load${_i}${Sp}`,Np="dropdown-item",Hn="active",$p='[data-bs-spy="scroll"]',vi="[href]",Rp=".nav, .list-group",Pa=".nav-link",Dp=`${Pa}, .nav-item > ${Pa}, .list-group-item`,Lp=".dropdown",Ip=".dropdown-toggle",Pp={offset:null,rootMargin:"0px 0px -25%",smoothScroll:!1,target:null,threshold:[.1,.5,1]},Mp={offset:"(number|null)",rootMargin:"string",smoothScroll:"boolean",target:"element",threshold:"array"};class ys extends W{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 Pp}static get DefaultType(){return Mp}static get NAME(){return Cp}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=R(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,Ia),$.on(this._config.target,Ia,vi,i=>{const u=this._observableSections.get(i.target.hash);if(u){i.preventDefault();const E=this._rootElement||window,L=u.offsetTop-this._element.offsetTop;if(E.scrollTo){E.scrollTo({top:L,behavior:"smooth"});return}E.scrollTop=L}}))}_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}`),E=U=>{this._previousScrollData.visibleEntryTop=U.target.offsetTop,this._process(u(U))},L=(this._rootElement||document.documentElement).scrollTop,G=L>=this._previousScrollData.parentScrollTop;this._previousScrollData.parentScrollTop=L;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(G&&le){if(E(U),!L)return;continue}!G&&!le&&E(U)}}_initializeTargetsAndObservables(){this._targetLinks=new Map,this._observableSections=new Map;const i=N.find(vi,this._config.target);for(const u of i){if(!u.hash||H(u))continue;const E=N.findOne(decodeURI(u.hash),this._element);P(E)&&(this._targetLinks.set(decodeURI(u.hash),u),this._observableSections.set(u.hash,E))}}_process(i){this._activeTarget!==i&&(this._clearActiveClass(this._config.target),this._activeTarget=i,i.classList.add(Hn),this._activateParents(i),$.trigger(this._element,Op,{relatedTarget:i}))}_activateParents(i){if(i.classList.contains(Np)){N.findOne(Ip,i.closest(Lp)).classList.add(Hn);return}for(const u of N.parents(i,Rp))for(const E of N.prev(u,Dp))E.classList.add(Hn)}_clearActiveClass(i){i.classList.remove(Hn);const u=N.find(`${vi}.${Hn}`,i);for(const E of u)E.classList.remove(Hn)}static jQueryInterface(i){return this.each(function(){const u=ys.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,xp,()=>{for(const m of N.find($p))ys.getOrCreateInstance(m)}),S(ys);const kp="tab",mn=".bs.tab",Vp=`hide${mn}`,Fp=`hidden${mn}`,Hp=`show${mn}`,Bp=`shown${mn}`,jp=`click${mn}`,Kp=`keydown${mn}`,Wp=`load${mn}`,Up="ArrowLeft",Ma="ArrowRight",Yp="ArrowUp",ka="ArrowDown",Ei="Home",Va="End",_n="active",Fa="fade",yi="show",Gp="dropdown",Ha=".dropdown-toggle",qp=".dropdown-menu",bi=`:not(${Ha})`,zp='.list-group, .nav, [role="tablist"]',Xp=".nav-item, .list-group-item",Qp=`.nav-link${bi}, .list-group-item${bi}, [role="tab"]${bi}`,Ba='[data-bs-toggle="tab"], [data-bs-toggle="pill"], [data-bs-toggle="list"]',Ai=`${Qp}, ${Ba}`,Jp=`.${_n}[data-bs-toggle="tab"], .${_n}[data-bs-toggle="pill"], .${_n}[data-bs-toggle="list"]`;class vn extends W{constructor(i){super(i),this._parent=this._element.closest(zp),this._parent&&(this._setInitialAttributes(this._parent,this._getChildren()),$.on(this._element,Kp,u=>this._keydown(u)))}static get NAME(){return kp}show(){const i=this._element;if(this._elemIsActive(i))return;const u=this._getActiveElem(),E=u?$.trigger(u,Vp,{relatedTarget:i}):null;$.trigger(i,Hp,{relatedTarget:u}).defaultPrevented||E&&E.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 E=()=>{if(i.getAttribute("role")!=="tab"){i.classList.add(yi);return}i.removeAttribute("tabindex"),i.setAttribute("aria-selected",!0),this._toggleDropDown(i,!0),$.trigger(i,Bp,{relatedTarget:u})};this._queueCallback(E,i,i.classList.contains(Fa))}_deactivate(i,u){if(!i)return;i.classList.remove(_n),i.blur(),this._deactivate(N.getElementFromSelector(i));const E=()=>{if(i.getAttribute("role")!=="tab"){i.classList.remove(yi);return}i.setAttribute("aria-selected",!1),i.setAttribute("tabindex","-1"),this._toggleDropDown(i,!1),$.trigger(i,Fp,{relatedTarget:u})};this._queueCallback(E,i,i.classList.contains(Fa))}_keydown(i){if(![Up,Ma,Yp,ka,Ei,Va].includes(i.key))return;i.stopPropagation(),i.preventDefault();const u=this._getChildren().filter(L=>!H(L));let E;if([Ei,Va].includes(i.key))E=u[i.key===Ei?0:u.length-1];else{const L=[Ma,ka].includes(i.key);E=Q(u,i.target,L,!0)}E&&(E.focus({preventScroll:!0}),vn.getOrCreateInstance(E).show())}_getChildren(){return N.find(Ai,this._parent)}_getActiveElem(){return this._getChildren().find(i=>this._elemIsActive(i))||null}_setInitialAttributes(i,u){this._setAttributeIfNotExists(i,"role","tablist");for(const E of u)this._setInitialAttributesOnChild(E)}_setInitialAttributesOnChild(i){i=this._getInnerElement(i);const u=this._elemIsActive(i),E=this._getOuterElement(i);i.setAttribute("aria-selected",u),E!==i&&this._setAttributeIfNotExists(E,"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 E=this._getOuterElement(i);if(!E.classList.contains(Gp))return;const L=(G,U)=>{const le=N.findOne(G,E);le&&le.classList.toggle(U,u)};L(Ha,_n),L(qp,yi),E.setAttribute("aria-expanded",u)}_setAttributeIfNotExists(i,u,E){i.hasAttribute(u)||i.setAttribute(u,E)}_elemIsActive(i){return i.classList.contains(_n)}_getInnerElement(i){return i.matches(Ai)?i:N.findOne(Ai,i)}_getOuterElement(i){return i.closest(Xp)||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,jp,Ba,function(m){["A","AREA"].includes(this.tagName)&&m.preventDefault(),!H(this)&&vn.getOrCreateInstance(this).show()}),$.on(window,Wp,()=>{for(const m of N.find(Jp))vn.getOrCreateInstance(m)}),S(vn);const Zp="toast",Yt=".bs.toast",eg=`mouseover${Yt}`,tg=`mouseout${Yt}`,ng=`focusin${Yt}`,sg=`focusout${Yt}`,rg=`hide${Yt}`,ig=`hidden${Yt}`,og=`show${Yt}`,ag=`shown${Yt}`,lg="fade",ja="hide",lr="show",cr="showing",cg={animation:"boolean",autohide:"boolean",delay:"number"},ug={animation:!0,autohide:!0,delay:5e3};class bs extends W{constructor(i,u){super(i,u),this._timeout=null,this._hasMouseInteraction=!1,this._hasKeyboardInteraction=!1,this._setListeners()}static get Default(){return ug}static get DefaultType(){return cg}static get NAME(){return Zp}show(){if($.trigger(this._element,og).defaultPrevented)return;this._clearTimeout(),this._config.animation&&this._element.classList.add(lg);const u=()=>{this._element.classList.remove(cr),$.trigger(this._element,ag),this._maybeScheduleHide()};this._element.classList.remove(ja),b(this._element),this._element.classList.add(lr,cr),this._queueCallback(u,this._element,this._config.animation)}hide(){if(!this.isShown()||$.trigger(this._element,rg).defaultPrevented)return;const u=()=>{this._element.classList.add(ja),this._element.classList.remove(cr,lr),$.trigger(this._element,ig)};this._element.classList.add(cr),this._queueCallback(u,this._element,this._config.animation)}dispose(){this._clearTimeout(),this.isShown()&&this._element.classList.remove(lr),super.dispose()}isShown(){return this._element.classList.contains(lr)}_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 E=i.relatedTarget;this._element===E||this._element.contains(E)||this._maybeScheduleHide()}_setListeners(){$.on(this._element,eg,i=>this._onInteraction(i,!0)),$.on(this._element,tg,i=>this._onInteraction(i,!1)),$.on(this._element,ng,i=>this._onInteraction(i,!0)),$.on(this._element,sg,i=>this._onInteraction(i,!1))}_clearTimeout(){clearTimeout(this._timeout),this._timeout=null}static jQueryInterface(i){return this.each(function(){const u=bs.getOrCreateInstance(this,i);if(typeof i=="string"){if(typeof u[i]>"u")throw new TypeError(`No method named "${i}"`);u[i](this)}})}}return j(bs),S(bs),{Alert:Ce,Button:Wt,Carousel:Mn,Collapse:Vn,Dropdown:pt,Modal:pn,Offcanvas:Dt,Popover:ar,ScrollSpy:ys,Tab:vn,Toast:bs,Tooltip:gn}})}(Er)),Er.exports}sm();/** + */var nm=Er.exports,Xa;function sm(){return Xa||(Xa=1,function(e,t){(function(n,s){e.exports=s(tm)})(nm,function(n){function s(m){const i=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(m){for(const u in m)if(u!=="default"){const E=Object.getOwnPropertyDescriptor(m,u);Object.defineProperty(i,u,E.get?E:{enumerable:!0,get:()=>m[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 E=o.get(m);if(!E.has(i)&&E.size!==0){console.error(`Bootstrap doesn't allow more than one instance per element. Bound instance: ${Array.from(E.keys())[0]}.`);return}E.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},_=m=>{if(!m)return 0;let{transitionDuration:i,transitionDelay:u}=window.getComputedStyle(m);const E=Number.parseFloat(i),L=Number.parseFloat(u);return!E&&!L?0:(i=i.split(",")[0],u=u.split(",")[0],(Number.parseFloat(i)+Number.parseFloat(u))*c)},x=m=>{m.dispatchEvent(new Event(d))},A=m=>!m||typeof m!="object"?!1:(typeof m.jquery<"u"&&(m=m[0]),typeof m.nodeType<"u"),R=m=>A(m)?m.jquery?m[0]:m:typeof m=="string"&&m.length>0?document.querySelector(f(m)):null,P=m=>{if(!A(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 E=m.closest("summary");if(E&&E.parentNode!==u||E===null)return!1}return i},H=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",F=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?F(m.parentNode):null},k=()=>{},b=m=>{m.offsetHeight},y=()=>window.jQuery&&!document.body.hasAttribute("data-bs-no-jquery")?window.jQuery:null,O=[],w=m=>{document.readyState==="loading"?(O.length||document.addEventListener("DOMContentLoaded",()=>{for(const i of O)i()}),O.push(m)):m()},T=()=>document.documentElement.dir==="rtl",S=m=>{w(()=>{const i=y();if(i){const u=m.NAME,E=i.fn[u];i.fn[u]=m.jQueryInterface,i.fn[u].Constructor=m,i.fn[u].noConflict=()=>(i.fn[u]=E,m.jQueryInterface)}})},K=(m,i=[],u=m)=>typeof m=="function"?m.call(...i):u,B=(m,i,u=!0)=>{if(!u){K(m);return}const L=_(i)+5;let G=!1;const U=({target:le})=>{le===i&&(G=!0,i.removeEventListener(d,U),K(m))};i.addEventListener(d,U),setTimeout(()=>{G||x(i)},L)},Q=(m,i,u,E)=>{const L=m.length;let G=m.indexOf(i);return G===-1?!u&&E?m[L-1]:m[0]:(G+=u?1:-1,E&&(G=(G+L)%L),m[Math.max(0,Math.min(G,L-1))])},oe=/[^.]*(?=\..*)\.|.*/,de=/\..*/,te=/::\d+$/,ee={};let ce=1;const we={mouseenter:"mouseover",mouseleave:"mouseout"},je=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 be(m){const i=De(m);return m.uidEvent=i,ee[i]=ee[i]||{},ee[i]}function Qe(m,i){return function u(E){return g(E,{delegateTarget:m}),u.oneOff&&$.off(m,E.type,i),i.apply(m,[E])}}function Ke(m,i,u){return function E(L){const G=m.querySelectorAll(i);for(let{target:U}=L;U&&U!==this;U=U.parentNode)for(const le of G)if(le===U)return g(L,{delegateTarget:U}),E.oneOff&&$.off(m,L.type,i,u),u.apply(U,[L])}}function Pe(m,i,u=null){return Object.values(m).find(E=>E.callable===i&&E.delegationSelector===u)}function Te(m,i,u){const E=typeof i=="string",L=E?u:i||u;let G=J(m);return je.has(G)||(G=m),[E,L,G]}function I(m,i,u,E,L){if(typeof i!="string"||!m)return;let[G,U,le]=Te(i,u,E);i in we&&(U=(fg=>function(Bn){if(!Bn.relatedTarget||Bn.relatedTarget!==Bn.delegateTarget&&!Bn.delegateTarget.contains(Bn.relatedTarget))return fg.call(this,Bn)})(U));const ze=be(m),rt=ze[le]||(ze[le]={}),$e=Pe(rt,U,G?u:null);if($e){$e.oneOff=$e.oneOff&&L;return}const Tt=De(U,i.replace(oe,"")),gt=G?Ke(m,u,U):Qe(m,U);gt.delegationSelector=G?u:null,gt.callable=U,gt.oneOff=L,gt.uidEvent=Tt,rt[Tt]=gt,m.addEventListener(le,gt,G)}function q(m,i,u,E,L){const G=Pe(i[u],E,L);G&&(m.removeEventListener(u,G,!!L),delete i[u][G.uidEvent])}function z(m,i,u,E){const L=i[u]||{};for(const[G,U]of Object.entries(L))G.includes(E)&&q(m,i,u,U.callable,U.delegationSelector)}function J(m){return m=m.replace(de,""),we[m]||m}const $={on(m,i,u,E){I(m,i,u,E,!1)},one(m,i,u,E){I(m,i,u,E,!0)},off(m,i,u,E){if(typeof i!="string"||!m)return;const[L,G,U]=Te(i,u,E),le=U!==i,ze=be(m),rt=ze[U]||{},$e=i.startsWith(".");if(typeof G<"u"){if(!Object.keys(rt).length)return;q(m,ze,U,G,L?u:null);return}if($e)for(const Tt of Object.keys(ze))z(m,ze,Tt,i.slice(1));for(const[Tt,gt]of Object.entries(rt)){const ur=Tt.replace(te,"");(!le||i.includes(ur))&&q(m,ze,U,gt.callable,gt.delegationSelector)}},trigger(m,i,u){if(typeof i!="string"||!m)return null;const E=y(),L=J(i),G=i!==L;let U=null,le=!0,ze=!0,rt=!1;G&&E&&(U=E.Event(i,u),E(m).trigger(U),le=!U.isPropagationStopped(),ze=!U.isImmediatePropagationStopped(),rt=U.isDefaultPrevented());const $e=g(new Event(i,{bubbles:le,cancelable:!0}),u);return rt&&$e.preventDefault(),ze&&m.dispatchEvent($e),$e.defaultPrevented&&U&&U.preventDefault(),$e}};function g(m,i={}){for(const[u,E]of Object.entries(i))try{m[u]=E}catch{Object.defineProperty(m,u,{configurable:!0,get(){return E}})}return m}function v(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 C(m){return m.replace(/[A-Z]/g,i=>`-${i.toLowerCase()}`)}const D={setDataAttribute(m,i,u){m.setAttribute(`data-bs-${C(i)}`,u)},removeDataAttribute(m,i){m.removeAttribute(`data-bs-${C(i)}`)},getDataAttributes(m){if(!m)return{};const i={},u=Object.keys(m.dataset).filter(E=>E.startsWith("bs")&&!E.startsWith("bsConfig"));for(const E of u){let L=E.replace(/^bs/,"");L=L.charAt(0).toLowerCase()+L.slice(1),i[L]=v(m.dataset[E])}return i},getDataAttribute(m,i){return v(m.getAttribute(`data-bs-${C(i)}`))}};class V{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 E=A(u)?D.getDataAttribute(u,"config"):{};return{...this.constructor.Default,...typeof E=="object"?E:{},...A(u)?D.getDataAttributes(u):{},...typeof i=="object"?i:{}}}_typeCheckConfig(i,u=this.constructor.DefaultType){for(const[E,L]of Object.entries(u)){const G=i[E],U=A(G)?"element":h(G);if(!new RegExp(L).test(U))throw new TypeError(`${this.constructor.NAME.toUpperCase()}: Option "${E}" provided type "${U}" but expected type "${L}".`)}}}const M="5.3.7";class W extends V{constructor(i,u){super(),i=R(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,E=!0){B(i,u,E)}_getConfig(i){return i=this._mergeConfigObj(i,this._element),i=this._configAfterMerge(i),this._typeCheckConfig(i),i}static getInstance(i){return a.get(R(i),this.DATA_KEY)}static getOrCreateInstance(i,u={}){return this.getInstance(i)||new this(i,typeof u=="object"?u:null)}static get VERSION(){return M}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 Y=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 E=m.parentNode.closest(i);for(;E;)u.push(E),E=E.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=>!H(u)&&P(u))},getSelectorFromElement(m){const i=Y(m);return i&&N.findOne(i)?i:null},getElementFromSelector(m){const i=Y(m);return i?N.findOne(i):null},getMultipleElementsFromSelector(m){const i=Y(m);return i?N.find(i):[]}},j=(m,i="hide")=>{const u=`click.dismiss${m.EVENT_KEY}`,E=m.NAME;$.on(document,u,`[data-bs-dismiss="${E}"]`,function(L){if(["A","AREA"].includes(this.tagName)&&L.preventDefault(),H(this))return;const G=N.getElementFromSelector(this)||this.closest(`.${E}`);m.getOrCreateInstance(G)[i]()})},ne="alert",Z=".bs.alert",re=`close${Z}`,ae=`closed${Z}`,he="fade",ue="show";class Ce extends W{static get NAME(){return ne}close(){if($.trigger(this._element,re).defaultPrevented)return;this._element.classList.remove(ue);const u=this._element.classList.contains(he);this._queueCallback(()=>this._destroyElement(),this._element,u)}_destroyElement(){this._element.remove(),$.trigger(this._element,ae),this.dispose()}static jQueryInterface(i){return this.each(function(){const u=Ce.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)}})}}j(Ce,"close"),S(Ce);const Me="button",tt=".bs.button",fn=".data-api",Js="active",ke='[data-bs-toggle="button"]',nt=`click${tt}${fn}`;class Wt extends W{static get NAME(){return Me}toggle(){this._element.setAttribute("aria-pressed",this._element.classList.toggle(Js))}static jQueryInterface(i){return this.each(function(){const u=Wt.getOrCreateInstance(this);i==="toggle"&&u[i]()})}}$.on(document,nt,ke,m=>{m.preventDefault();const i=m.target.closest(ke);Wt.getOrCreateInstance(i).toggle()}),S(Wt);const Mf="swipe",Ln=".bs.swipe",kf=`touchstart${Ln}`,Vf=`touchmove${Ln}`,Ff=`touchend${Ln}`,Hf=`pointerdown${Ln}`,Bf=`pointerup${Ln}`,jf="touch",Kf="pen",Wf="pointer-event",Uf=40,Yf={endCallback:null,leftCallback:null,rightCallback:null},Gf={endCallback:"(function|null)",leftCallback:"(function|null)",rightCallback:"(function|null)"};class Zs extends V{constructor(i,u){super(),this._element=i,!(!i||!Zs.isSupported())&&(this._config=this._getConfig(u),this._deltaX=0,this._supportPointerEvents=!!window.PointerEvent,this._initEvents())}static get Default(){return Yf}static get DefaultType(){return Gf}static get NAME(){return Mf}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(),K(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<=Uf)return;const u=i/this._deltaX;this._deltaX=0,u&&K(u>0?this._config.rightCallback:this._config.leftCallback)}_initEvents(){this._supportPointerEvents?($.on(this._element,Hf,i=>this._start(i)),$.on(this._element,Bf,i=>this._end(i)),this._element.classList.add(Wf)):($.on(this._element,kf,i=>this._start(i)),$.on(this._element,Vf,i=>this._move(i)),$.on(this._element,Ff,i=>this._end(i)))}_eventIsPointerPenTouch(i){return this._supportPointerEvents&&(i.pointerType===Kf||i.pointerType===jf)}static isSupported(){return"ontouchstart"in document.documentElement||navigator.maxTouchPoints>0}}const qf="carousel",Ut=".bs.carousel",ta=".data-api",zf="ArrowLeft",Xf="ArrowRight",Qf=500,_s="next",In="prev",Pn="left",er="right",Jf=`slide${Ut}`,li=`slid${Ut}`,Zf=`keydown${Ut}`,ed=`mouseenter${Ut}`,td=`mouseleave${Ut}`,nd=`dragstart${Ut}`,sd=`load${Ut}${ta}`,rd=`click${Ut}${ta}`,na="carousel",tr="active",id="slide",od="carousel-item-end",ad="carousel-item-start",ld="carousel-item-next",cd="carousel-item-prev",sa=".active",ra=".carousel-item",ud=sa+ra,fd=".carousel-item img",dd=".carousel-indicators",hd="[data-bs-slide], [data-bs-slide-to]",pd='[data-bs-ride="carousel"]',gd={[zf]:er,[Xf]:Pn},md={interval:5e3,keyboard:!0,pause:"hover",ride:!1,touch:!0,wrap:!0},_d={interval:"(number|boolean)",keyboard:"boolean",pause:"(string|boolean)",ride:"(boolean|string)",touch:"boolean",wrap:"boolean"};class Mn extends W{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(dd,this._element),this._addEventListeners(),this._config.ride===na&&this.cycle()}static get Default(){return md}static get DefaultType(){return _d}static get NAME(){return qf}next(){this._slide(_s)}nextWhenVisible(){!document.hidden&&P(this._element)&&this.next()}prev(){this._slide(In)}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,li,()=>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,li,()=>this.to(i));return}const E=this._getItemIndex(this._getActive());if(E===i)return;const L=i>E?_s:In;this._slide(L,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,Zf,i=>this._keydown(i)),this._config.pause==="hover"&&($.on(this._element,ed,()=>this.pause()),$.on(this._element,td,()=>this._maybeEnableCycle())),this._config.touch&&Zs.isSupported()&&this._addTouchEventListeners()}_addTouchEventListeners(){for(const E of N.find(fd,this._element))$.on(E,nd,L=>L.preventDefault());const u={leftCallback:()=>this._slide(this._directionToOrder(Pn)),rightCallback:()=>this._slide(this._directionToOrder(er)),endCallback:()=>{this._config.pause==="hover"&&(this.pause(),this.touchTimeout&&clearTimeout(this.touchTimeout),this.touchTimeout=setTimeout(()=>this._maybeEnableCycle(),Qf+this._config.interval))}};this._swipeHelper=new Zs(this._element,u)}_keydown(i){if(/input|textarea/i.test(i.target.tagName))return;const u=gd[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(sa,this._indicatorsElement);u.classList.remove(tr),u.removeAttribute("aria-current");const E=N.findOne(`[data-bs-slide-to="${i}"]`,this._indicatorsElement);E&&(E.classList.add(tr),E.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 E=this._getActive(),L=i===_s,G=u||Q(this._getItems(),E,L,this._config.wrap);if(G===E)return;const U=this._getItemIndex(G),le=ur=>$.trigger(this._element,ur,{relatedTarget:G,direction:this._orderToDirection(i),from:this._getItemIndex(E),to:U});if(le(Jf).defaultPrevented||!E||!G)return;const rt=!!this._interval;this.pause(),this._isSliding=!0,this._setActiveIndicatorElement(U),this._activeElement=G;const $e=L?ad:od,Tt=L?ld:cd;G.classList.add(Tt),b(G),E.classList.add($e),G.classList.add($e);const gt=()=>{G.classList.remove($e,Tt),G.classList.add(tr),E.classList.remove(tr,Tt,$e),this._isSliding=!1,le(li)};this._queueCallback(gt,E,this._isAnimated()),rt&&this.cycle()}_isAnimated(){return this._element.classList.contains(id)}_getActive(){return N.findOne(ud,this._element)}_getItems(){return N.find(ra,this._element)}_clearInterval(){this._interval&&(clearInterval(this._interval),this._interval=null)}_directionToOrder(i){return T()?i===Pn?In:_s:i===Pn?_s:In}_orderToDirection(i){return T()?i===In?Pn:er:i===In?er:Pn}static jQueryInterface(i){return this.each(function(){const u=Mn.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,rd,hd,function(m){const i=N.getElementFromSelector(this);if(!i||!i.classList.contains(na))return;m.preventDefault();const u=Mn.getOrCreateInstance(i),E=this.getAttribute("data-bs-slide-to");if(E){u.to(E),u._maybeEnableCycle();return}if(D.getDataAttribute(this,"slide")==="next"){u.next(),u._maybeEnableCycle();return}u.prev(),u._maybeEnableCycle()}),$.on(window,sd,()=>{const m=N.find(pd);for(const i of m)Mn.getOrCreateInstance(i)}),S(Mn);const vd="collapse",vs=".bs.collapse",Ed=".data-api",yd=`show${vs}`,bd=`shown${vs}`,Ad=`hide${vs}`,Td=`hidden${vs}`,wd=`click${vs}${Ed}`,ci="show",kn="collapse",nr="collapsing",Cd="collapsed",Sd=`:scope .${kn} .${kn}`,Od="collapse-horizontal",xd="width",Nd="height",$d=".collapse.show, .collapse.collapsing",ui='[data-bs-toggle="collapse"]',Rd={parent:null,toggle:!0},Dd={parent:"(null|element)",toggle:"boolean"};class Vn extends W{constructor(i,u){super(i,u),this._isTransitioning=!1,this._triggerArray=[];const E=N.find(ui);for(const L of E){const G=N.getSelectorFromElement(L),U=N.find(G).filter(le=>le===this._element);G!==null&&U.length&&this._triggerArray.push(L)}this._initializeChildren(),this._config.parent||this._addAriaAndCollapsedClass(this._triggerArray,this._isShown()),this._config.toggle&&this.toggle()}static get Default(){return Rd}static get DefaultType(){return Dd}static get NAME(){return vd}toggle(){this._isShown()?this.hide():this.show()}show(){if(this._isTransitioning||this._isShown())return;let i=[];if(this._config.parent&&(i=this._getFirstLevelChildren($d).filter(le=>le!==this._element).map(le=>Vn.getOrCreateInstance(le,{toggle:!1}))),i.length&&i[0]._isTransitioning||$.trigger(this._element,yd).defaultPrevented)return;for(const le of i)le.hide();const E=this._getDimension();this._element.classList.remove(kn),this._element.classList.add(nr),this._element.style[E]=0,this._addAriaAndCollapsedClass(this._triggerArray,!0),this._isTransitioning=!0;const L=()=>{this._isTransitioning=!1,this._element.classList.remove(nr),this._element.classList.add(kn,ci),this._element.style[E]="",$.trigger(this._element,bd)},U=`scroll${E[0].toUpperCase()+E.slice(1)}`;this._queueCallback(L,this._element,!0),this._element.style[E]=`${this._element[U]}px`}hide(){if(this._isTransitioning||!this._isShown()||$.trigger(this._element,Ad).defaultPrevented)return;const u=this._getDimension();this._element.style[u]=`${this._element.getBoundingClientRect()[u]}px`,b(this._element),this._element.classList.add(nr),this._element.classList.remove(kn,ci);for(const L of this._triggerArray){const G=N.getElementFromSelector(L);G&&!this._isShown(G)&&this._addAriaAndCollapsedClass([L],!1)}this._isTransitioning=!0;const E=()=>{this._isTransitioning=!1,this._element.classList.remove(nr),this._element.classList.add(kn),$.trigger(this._element,Td)};this._element.style[u]="",this._queueCallback(E,this._element,!0)}_isShown(i=this._element){return i.classList.contains(ci)}_configAfterMerge(i){return i.toggle=!!i.toggle,i.parent=R(i.parent),i}_getDimension(){return this._element.classList.contains(Od)?xd:Nd}_initializeChildren(){if(!this._config.parent)return;const i=this._getFirstLevelChildren(ui);for(const u of i){const E=N.getElementFromSelector(u);E&&this._addAriaAndCollapsedClass([u],this._isShown(E))}}_getFirstLevelChildren(i){const u=N.find(Sd,this._config.parent);return N.find(i,this._config.parent).filter(E=>!u.includes(E))}_addAriaAndCollapsedClass(i,u){if(i.length)for(const E of i)E.classList.toggle(Cd,!u),E.setAttribute("aria-expanded",u)}static jQueryInterface(i){const u={};return typeof i=="string"&&/show|hide/.test(i)&&(u.toggle=!1),this.each(function(){const E=Vn.getOrCreateInstance(this,u);if(typeof i=="string"){if(typeof E[i]>"u")throw new TypeError(`No method named "${i}"`);E[i]()}})}}$.on(document,wd,ui,function(m){(m.target.tagName==="A"||m.delegateTarget&&m.delegateTarget.tagName==="A")&&m.preventDefault();for(const i of N.getMultipleElementsFromSelector(this))Vn.getOrCreateInstance(i,{toggle:!1}).toggle()}),S(Vn);const ia="dropdown",dn=".bs.dropdown",fi=".data-api",Ld="Escape",oa="Tab",Id="ArrowUp",aa="ArrowDown",Pd=2,Md=`hide${dn}`,kd=`hidden${dn}`,Vd=`show${dn}`,Fd=`shown${dn}`,la=`click${dn}${fi}`,ca=`keydown${dn}${fi}`,Hd=`keyup${dn}${fi}`,Fn="show",Bd="dropup",jd="dropend",Kd="dropstart",Wd="dropup-center",Ud="dropdown-center",hn='[data-bs-toggle="dropdown"]:not(.disabled):not(:disabled)',Yd=`${hn}.${Fn}`,sr=".dropdown-menu",Gd=".navbar",qd=".navbar-nav",zd=".dropdown-menu .dropdown-item:not(.disabled):not(:disabled)",Xd=T()?"top-end":"top-start",Qd=T()?"top-start":"top-end",Jd=T()?"bottom-end":"bottom-start",Zd=T()?"bottom-start":"bottom-end",eh=T()?"left-start":"right-start",th=T()?"right-start":"left-start",nh="top",sh="bottom",rh={autoClose:!0,boundary:"clippingParents",display:"dynamic",offset:[0,2],popperConfig:null,reference:"toggle"},ih={autoClose:"(boolean|string)",boundary:"(string|element)",display:"string",offset:"(array|string|function)",popperConfig:"(null|object|function)",reference:"(string|element|object)"};class pt extends W{constructor(i,u){super(i,u),this._popper=null,this._parent=this._element.parentNode,this._menu=N.next(this._element,sr)[0]||N.prev(this._element,sr)[0]||N.findOne(sr,this._parent),this._inNavbar=this._detectNavbar()}static get Default(){return rh}static get DefaultType(){return ih}static get NAME(){return ia}toggle(){return this._isShown()?this.hide():this.show()}show(){if(H(this._element)||this._isShown())return;const i={relatedTarget:this._element};if(!$.trigger(this._element,Vd,i).defaultPrevented){if(this._createPopper(),"ontouchstart"in document.documentElement&&!this._parent.closest(qd))for(const E of[].concat(...document.body.children))$.on(E,"mouseover",k);this._element.focus(),this._element.setAttribute("aria-expanded",!0),this._menu.classList.add(Fn),this._element.classList.add(Fn),$.trigger(this._element,Fd,i)}}hide(){if(H(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,Md,i).defaultPrevented){if("ontouchstart"in document.documentElement)for(const E of[].concat(...document.body.children))$.off(E,"mouseover",k);this._popper&&this._popper.destroy(),this._menu.classList.remove(Fn),this._element.classList.remove(Fn),this._element.setAttribute("aria-expanded","false"),D.removeDataAttribute(this._menu,"popper"),$.trigger(this._element,kd,i),this._element.focus()}}_getConfig(i){if(i=super._getConfig(i),typeof i.reference=="object"&&!A(i.reference)&&typeof i.reference.getBoundingClientRect!="function")throw new TypeError(`${ia.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/docs/v2/)");let i=this._element;this._config.reference==="parent"?i=this._parent:A(this._config.reference)?i=R(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(Fn)}_getPlacement(){const i=this._parent;if(i.classList.contains(jd))return eh;if(i.classList.contains(Kd))return th;if(i.classList.contains(Wd))return nh;if(i.classList.contains(Ud))return sh;const u=getComputedStyle(this._menu).getPropertyValue("--bs-position").trim()==="end";return i.classList.contains(Bd)?u?Qd:Xd:u?Zd:Jd}_detectNavbar(){return this._element.closest(Gd)!==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")&&(D.setDataAttribute(this._menu,"popper","static"),i.modifiers=[{name:"applyStyles",enabled:!1}]),{...i,...K(this._config.popperConfig,[void 0,i])}}_selectMenuItem({key:i,target:u}){const E=N.find(zd,this._menu).filter(L=>P(L));E.length&&Q(E,u,i===aa,!E.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===Pd||i.type==="keyup"&&i.key!==oa)return;const u=N.find(Yd);for(const E of u){const L=pt.getInstance(E);if(!L||L._config.autoClose===!1)continue;const G=i.composedPath(),U=G.includes(L._menu);if(G.includes(L._element)||L._config.autoClose==="inside"&&!U||L._config.autoClose==="outside"&&U||L._menu.contains(i.target)&&(i.type==="keyup"&&i.key===oa||/input|select|option|textarea|form/i.test(i.target.tagName)))continue;const le={relatedTarget:L._element};i.type==="click"&&(le.clickEvent=i),L._completeHide(le)}}static dataApiKeydownHandler(i){const u=/input|textarea/i.test(i.target.tagName),E=i.key===Ld,L=[Id,aa].includes(i.key);if(!L&&!E||u&&!E)return;i.preventDefault();const G=this.matches(hn)?this:N.prev(this,hn)[0]||N.next(this,hn)[0]||N.findOne(hn,i.delegateTarget.parentNode),U=pt.getOrCreateInstance(G);if(L){i.stopPropagation(),U.show(),U._selectMenuItem(i);return}U._isShown()&&(i.stopPropagation(),U.hide(),G.focus())}}$.on(document,ca,hn,pt.dataApiKeydownHandler),$.on(document,ca,sr,pt.dataApiKeydownHandler),$.on(document,la,pt.clearMenus),$.on(document,Hd,pt.clearMenus),$.on(document,la,hn,function(m){m.preventDefault(),pt.getOrCreateInstance(this).toggle()}),S(pt);const ua="backdrop",oh="fade",fa="show",da=`mousedown.bs.${ua}`,ah={className:"modal-backdrop",clickCallback:null,isAnimated:!1,isVisible:!0,rootElement:"body"},lh={className:"string",clickCallback:"(function|null)",isAnimated:"boolean",isVisible:"boolean",rootElement:"(element|string)"};class ha extends V{constructor(i){super(),this._config=this._getConfig(i),this._isAppended=!1,this._element=null}static get Default(){return ah}static get DefaultType(){return lh}static get NAME(){return ua}show(i){if(!this._config.isVisible){K(i);return}this._append();const u=this._getElement();this._config.isAnimated&&b(u),u.classList.add(fa),this._emulateAnimation(()=>{K(i)})}hide(i){if(!this._config.isVisible){K(i);return}this._getElement().classList.remove(fa),this._emulateAnimation(()=>{this.dispose(),K(i)})}dispose(){this._isAppended&&($.off(this._element,da),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(oh),this._element=i}return this._element}_configAfterMerge(i){return i.rootElement=R(i.rootElement),i}_append(){if(this._isAppended)return;const i=this._getElement();this._config.rootElement.append(i),$.on(i,da,()=>{K(this._config.clickCallback)}),this._isAppended=!0}_emulateAnimation(i){B(i,this._getElement(),this._config.isAnimated)}}const ch="focustrap",rr=".bs.focustrap",uh=`focusin${rr}`,fh=`keydown.tab${rr}`,dh="Tab",hh="forward",pa="backward",ph={autofocus:!0,trapElement:null},gh={autofocus:"boolean",trapElement:"element"};class ga extends V{constructor(i){super(),this._config=this._getConfig(i),this._isActive=!1,this._lastTabNavDirection=null}static get Default(){return ph}static get DefaultType(){return gh}static get NAME(){return ch}activate(){this._isActive||(this._config.autofocus&&this._config.trapElement.focus(),$.off(document,rr),$.on(document,uh,i=>this._handleFocusin(i)),$.on(document,fh,i=>this._handleKeydown(i)),this._isActive=!0)}deactivate(){this._isActive&&(this._isActive=!1,$.off(document,rr))}_handleFocusin(i){const{trapElement:u}=this._config;if(i.target===document||i.target===u||u.contains(i.target))return;const E=N.focusableChildren(u);E.length===0?u.focus():this._lastTabNavDirection===pa?E[E.length-1].focus():E[0].focus()}_handleKeydown(i){i.key===dh&&(this._lastTabNavDirection=i.shiftKey?pa:hh)}}const ma=".fixed-top, .fixed-bottom, .is-fixed, .sticky-top",_a=".sticky-top",ir="padding-right",va="margin-right";class di{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,ir,u=>u+i),this._setElementAttributes(ma,ir,u=>u+i),this._setElementAttributes(_a,va,u=>u-i)}reset(){this._resetElementAttributes(this._element,"overflow"),this._resetElementAttributes(this._element,ir),this._resetElementAttributes(ma,ir),this._resetElementAttributes(_a,va)}isOverflowing(){return this.getWidth()>0}_disableOverFlow(){this._saveInitialAttribute(this._element,"overflow"),this._element.style.overflow="hidden"}_setElementAttributes(i,u,E){const L=this.getWidth(),G=U=>{if(U!==this._element&&window.innerWidth>U.clientWidth+L)return;this._saveInitialAttribute(U,u);const le=window.getComputedStyle(U).getPropertyValue(u);U.style.setProperty(u,`${E(Number.parseFloat(le))}px`)};this._applyManipulationCallback(i,G)}_saveInitialAttribute(i,u){const E=i.style.getPropertyValue(u);E&&D.setDataAttribute(i,u,E)}_resetElementAttributes(i,u){const E=L=>{const G=D.getDataAttribute(L,u);if(G===null){L.style.removeProperty(u);return}D.removeDataAttribute(L,u),L.style.setProperty(u,G)};this._applyManipulationCallback(i,E)}_applyManipulationCallback(i,u){if(A(i)){u(i);return}for(const E of N.find(i,this._element))u(E)}}const mh="modal",st=".bs.modal",_h=".data-api",vh="Escape",Eh=`hide${st}`,yh=`hidePrevented${st}`,Ea=`hidden${st}`,ya=`show${st}`,bh=`shown${st}`,Ah=`resize${st}`,Th=`click.dismiss${st}`,wh=`mousedown.dismiss${st}`,Ch=`keydown.dismiss${st}`,Sh=`click${st}${_h}`,ba="modal-open",Oh="fade",Aa="show",hi="modal-static",xh=".modal.show",Nh=".modal-dialog",$h=".modal-body",Rh='[data-bs-toggle="modal"]',Dh={backdrop:!0,focus:!0,keyboard:!0},Lh={backdrop:"(boolean|string)",focus:"boolean",keyboard:"boolean"};class pn extends W{constructor(i,u){super(i,u),this._dialog=N.findOne(Nh,this._element),this._backdrop=this._initializeBackDrop(),this._focustrap=this._initializeFocusTrap(),this._isShown=!1,this._isTransitioning=!1,this._scrollBar=new di,this._addEventListeners()}static get Default(){return Dh}static get DefaultType(){return Lh}static get NAME(){return mh}toggle(i){return this._isShown?this.hide():this.show(i)}show(i){this._isShown||this._isTransitioning||$.trigger(this._element,ya,{relatedTarget:i}).defaultPrevented||(this._isShown=!0,this._isTransitioning=!0,this._scrollBar.hide(),document.body.classList.add(ba),this._adjustDialog(),this._backdrop.show(()=>this._showElement(i)))}hide(){!this._isShown||this._isTransitioning||$.trigger(this._element,Eh).defaultPrevented||(this._isShown=!1,this._isTransitioning=!0,this._focustrap.deactivate(),this._element.classList.remove(Aa),this._queueCallback(()=>this._hideModal(),this._element,this._isAnimated()))}dispose(){$.off(window,st),$.off(this._dialog,st),this._backdrop.dispose(),this._focustrap.deactivate(),super.dispose()}handleUpdate(){this._adjustDialog()}_initializeBackDrop(){return new ha({isVisible:!!this._config.backdrop,isAnimated:this._isAnimated()})}_initializeFocusTrap(){return new ga({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($h,this._dialog);u&&(u.scrollTop=0),b(this._element),this._element.classList.add(Aa);const E=()=>{this._config.focus&&this._focustrap.activate(),this._isTransitioning=!1,$.trigger(this._element,bh,{relatedTarget:i})};this._queueCallback(E,this._dialog,this._isAnimated())}_addEventListeners(){$.on(this._element,Ch,i=>{if(i.key===vh){if(this._config.keyboard){this.hide();return}this._triggerBackdropTransition()}}),$.on(window,Ah,()=>{this._isShown&&!this._isTransitioning&&this._adjustDialog()}),$.on(this._element,wh,i=>{$.one(this._element,Th,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(ba),this._resetAdjustments(),this._scrollBar.reset(),$.trigger(this._element,Ea)})}_isAnimated(){return this._element.classList.contains(Oh)}_triggerBackdropTransition(){if($.trigger(this._element,yh).defaultPrevented)return;const u=this._element.scrollHeight>document.documentElement.clientHeight,E=this._element.style.overflowY;E==="hidden"||this._element.classList.contains(hi)||(u||(this._element.style.overflowY="hidden"),this._element.classList.add(hi),this._queueCallback(()=>{this._element.classList.remove(hi),this._queueCallback(()=>{this._element.style.overflowY=E},this._dialog)},this._dialog),this._element.focus())}_adjustDialog(){const i=this._element.scrollHeight>document.documentElement.clientHeight,u=this._scrollBar.getWidth(),E=u>0;if(E&&!i){const L=T()?"paddingLeft":"paddingRight";this._element.style[L]=`${u}px`}if(!E&&i){const L=T()?"paddingRight":"paddingLeft";this._element.style[L]=`${u}px`}}_resetAdjustments(){this._element.style.paddingLeft="",this._element.style.paddingRight=""}static jQueryInterface(i,u){return this.each(function(){const E=pn.getOrCreateInstance(this,i);if(typeof i=="string"){if(typeof E[i]>"u")throw new TypeError(`No method named "${i}"`);E[i](u)}})}}$.on(document,Sh,Rh,function(m){const i=N.getElementFromSelector(this);["A","AREA"].includes(this.tagName)&&m.preventDefault(),$.one(i,ya,L=>{L.defaultPrevented||$.one(i,Ea,()=>{P(this)&&this.focus()})});const u=N.findOne(xh);u&&pn.getInstance(u).hide(),pn.getOrCreateInstance(i).toggle(this)}),j(pn),S(pn);const Ih="offcanvas",Rt=".bs.offcanvas",Ta=".data-api",Ph=`load${Rt}${Ta}`,Mh="Escape",wa="show",Ca="showing",Sa="hiding",kh="offcanvas-backdrop",Oa=".offcanvas.show",Vh=`show${Rt}`,Fh=`shown${Rt}`,Hh=`hide${Rt}`,xa=`hidePrevented${Rt}`,Na=`hidden${Rt}`,Bh=`resize${Rt}`,jh=`click${Rt}${Ta}`,Kh=`keydown.dismiss${Rt}`,Wh='[data-bs-toggle="offcanvas"]',Uh={backdrop:!0,keyboard:!0,scroll:!1},Yh={backdrop:"(boolean|string)",keyboard:"boolean",scroll:"boolean"};class Dt extends W{constructor(i,u){super(i,u),this._isShown=!1,this._backdrop=this._initializeBackDrop(),this._focustrap=this._initializeFocusTrap(),this._addEventListeners()}static get Default(){return Uh}static get DefaultType(){return Yh}static get NAME(){return Ih}toggle(i){return this._isShown?this.hide():this.show(i)}show(i){if(this._isShown||$.trigger(this._element,Vh,{relatedTarget:i}).defaultPrevented)return;this._isShown=!0,this._backdrop.show(),this._config.scroll||new di().hide(),this._element.setAttribute("aria-modal",!0),this._element.setAttribute("role","dialog"),this._element.classList.add(Ca);const E=()=>{(!this._config.scroll||this._config.backdrop)&&this._focustrap.activate(),this._element.classList.add(wa),this._element.classList.remove(Ca),$.trigger(this._element,Fh,{relatedTarget:i})};this._queueCallback(E,this._element,!0)}hide(){if(!this._isShown||$.trigger(this._element,Hh).defaultPrevented)return;this._focustrap.deactivate(),this._element.blur(),this._isShown=!1,this._element.classList.add(Sa),this._backdrop.hide();const u=()=>{this._element.classList.remove(wa,Sa),this._element.removeAttribute("aria-modal"),this._element.removeAttribute("role"),this._config.scroll||new di().reset(),$.trigger(this._element,Na)};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,xa);return}this.hide()},u=!!this._config.backdrop;return new ha({className:kh,isVisible:u,isAnimated:!0,rootElement:this._element.parentNode,clickCallback:u?i:null})}_initializeFocusTrap(){return new ga({trapElement:this._element})}_addEventListeners(){$.on(this._element,Kh,i=>{if(i.key===Mh){if(this._config.keyboard){this.hide();return}$.trigger(this._element,xa)}})}static jQueryInterface(i){return this.each(function(){const u=Dt.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,jh,Wh,function(m){const i=N.getElementFromSelector(this);if(["A","AREA"].includes(this.tagName)&&m.preventDefault(),H(this))return;$.one(i,Na,()=>{P(this)&&this.focus()});const u=N.findOne(Oa);u&&u!==i&&Dt.getInstance(u).hide(),Dt.getOrCreateInstance(i).toggle(this)}),$.on(window,Ph,()=>{for(const m of N.find(Oa))Dt.getOrCreateInstance(m).show()}),$.on(window,Bh,()=>{for(const m of N.find("[aria-modal][class*=show][class*=offcanvas-]"))getComputedStyle(m).position!=="fixed"&&Dt.getOrCreateInstance(m).hide()}),j(Dt),S(Dt);const $a={"*":["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:[]},Gh=new Set(["background","cite","href","itemtype","longdesc","poster","src","xlink:href"]),qh=/^(?!javascript:)(?:[a-z0-9+.-]+:|[^&:/?#]*(?:[/?#]|$))/i,zh=(m,i)=>{const u=m.nodeName.toLowerCase();return i.includes(u)?Gh.has(u)?!!qh.test(m.nodeValue):!0:i.filter(E=>E instanceof RegExp).some(E=>E.test(u))};function Xh(m,i,u){if(!m.length)return m;if(u&&typeof u=="function")return u(m);const L=new window.DOMParser().parseFromString(m,"text/html"),G=[].concat(...L.body.querySelectorAll("*"));for(const U of G){const le=U.nodeName.toLowerCase();if(!Object.keys(i).includes(le)){U.remove();continue}const ze=[].concat(...U.attributes),rt=[].concat(i["*"]||[],i[le]||[]);for(const $e of ze)zh($e,rt)||U.removeAttribute($e.nodeName)}return L.body.innerHTML}const Qh="TemplateFactory",Jh={allowList:$a,content:{},extraClass:"",html:!1,sanitize:!0,sanitizeFn:null,template:"
"},Zh={allowList:"object",content:"object",extraClass:"(string|function)",html:"boolean",sanitize:"boolean",sanitizeFn:"(null|function)",template:"string"},ep={entry:"(string|element|function|null)",selector:"(string|element)"};class tp extends V{constructor(i){super(),this._config=this._getConfig(i)}static get Default(){return Jh}static get DefaultType(){return Zh}static get NAME(){return Qh}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[L,G]of Object.entries(this._config.content))this._setContent(i,G,L);const u=i.children[0],E=this._resolvePossibleFunction(this._config.extraClass);return E&&u.classList.add(...E.split(" ")),u}_typeCheckConfig(i){super._typeCheckConfig(i),this._checkContent(i.content)}_checkContent(i){for(const[u,E]of Object.entries(i))super._typeCheckConfig({selector:u,entry:E},ep)}_setContent(i,u,E){const L=N.findOne(E,i);if(L){if(u=this._resolvePossibleFunction(u),!u){L.remove();return}if(A(u)){this._putElementInTemplate(R(u),L);return}if(this._config.html){L.innerHTML=this._maybeSanitize(u);return}L.textContent=u}}_maybeSanitize(i){return this._config.sanitize?Xh(i,this._config.allowList,this._config.sanitizeFn):i}_resolvePossibleFunction(i){return K(i,[void 0,this])}_putElementInTemplate(i,u){if(this._config.html){u.innerHTML="",u.append(i);return}u.textContent=i.textContent}}const np="tooltip",sp=new Set(["sanitize","allowList","sanitizeFn"]),pi="fade",rp="modal",or="show",ip=".tooltip-inner",Ra=`.${rp}`,Da="hide.bs.modal",Es="hover",gi="focus",mi="click",op="manual",ap="hide",lp="hidden",cp="show",up="shown",fp="inserted",dp="click",hp="focusin",pp="focusout",gp="mouseenter",mp="mouseleave",_p={AUTO:"auto",TOP:"top",RIGHT:T()?"left":"right",BOTTOM:"bottom",LEFT:T()?"right":"left"},vp={allowList:$a,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"},Ep={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 W{constructor(i,u){if(typeof r>"u")throw new TypeError("Bootstrap's tooltips require Popper (https://popper.js.org/docs/v2/)");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 vp}static get DefaultType(){return Ep}static get NAME(){return np}enable(){this._isEnabled=!0}disable(){this._isEnabled=!1}toggleEnabled(){this._isEnabled=!this._isEnabled}toggle(){if(this._isEnabled){if(this._isShown()){this._leave();return}this._enter()}}dispose(){clearTimeout(this._timeout),$.off(this._element.closest(Ra),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(cp)),E=(F(this._element)||this._element.ownerDocument.documentElement).contains(this._element);if(i.defaultPrevented||!E)return;this._disposePopper();const L=this._getTipElement();this._element.setAttribute("aria-describedby",L.getAttribute("id"));const{container:G}=this._config;if(this._element.ownerDocument.documentElement.contains(this.tip)||(G.append(L),$.trigger(this._element,this.constructor.eventName(fp))),this._popper=this._createPopper(L),L.classList.add(or),"ontouchstart"in document.documentElement)for(const le of[].concat(...document.body.children))$.on(le,"mouseover",k);const U=()=>{$.trigger(this._element,this.constructor.eventName(up)),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(ap)).defaultPrevented)return;if(this._getTipElement().classList.remove(or),"ontouchstart"in document.documentElement)for(const L of[].concat(...document.body.children))$.off(L,"mouseover",k);this._activeTrigger[mi]=!1,this._activeTrigger[gi]=!1,this._activeTrigger[Es]=!1,this._isHovered=null;const E=()=>{this._isWithActiveTrigger()||(this._isHovered||this._disposePopper(),this._element.removeAttribute("aria-describedby"),$.trigger(this._element,this.constructor.eventName(lp)))};this._queueCallback(E,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(pi,or),u.classList.add(`bs-${this.constructor.NAME}-auto`);const E=p(this.constructor.NAME).toString();return u.setAttribute("id",E),this._isAnimated()&&u.classList.add(pi),u}setContent(i){this._newContent=i,this._isShown()&&(this._disposePopper(),this.show())}_getTemplateFactory(i){return this._templateFactory?this._templateFactory.changeContent(i):this._templateFactory=new tp({...this._config,content:i,extraClass:this._resolvePossibleFunction(this._config.customClass)}),this._templateFactory}_getContentForTemplate(){return{[ip]: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(pi)}_isShown(){return this.tip&&this.tip.classList.contains(or)}_createPopper(i){const u=K(this._config.placement,[this,i,this._element]),E=_p[u.toUpperCase()];return r.createPopper(this._element,i,this._getPopperConfig(E))}_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 K(i,[this._element,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:E=>{this._getTipElement().setAttribute("data-popper-placement",E.state.placement)}}]};return{...u,...K(this._config.popperConfig,[void 0,u])}}_setListeners(){const i=this._config.trigger.split(" ");for(const u of i)if(u==="click")$.on(this._element,this.constructor.eventName(dp),this._config.selector,E=>{const L=this._initializeOnDelegatedTarget(E);L._activeTrigger[mi]=!(L._isShown()&&L._activeTrigger[mi]),L.toggle()});else if(u!==op){const E=u===Es?this.constructor.eventName(gp):this.constructor.eventName(hp),L=u===Es?this.constructor.eventName(mp):this.constructor.eventName(pp);$.on(this._element,E,this._config.selector,G=>{const U=this._initializeOnDelegatedTarget(G);U._activeTrigger[G.type==="focusin"?gi:Es]=!0,U._enter()}),$.on(this._element,L,this._config.selector,G=>{const U=this._initializeOnDelegatedTarget(G);U._activeTrigger[G.type==="focusout"?gi:Es]=U._element.contains(G.relatedTarget),U._leave()})}this._hideModalHandler=()=>{this._element&&this.hide()},$.on(this._element.closest(Ra),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=D.getDataAttributes(this._element);for(const E of Object.keys(u))sp.has(E)&&delete u[E];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:R(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,E]of Object.entries(this._config))this.constructor.Default[u]!==E&&(i[u]=E);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]()}})}}S(gn);const yp="popover",bp=".popover-header",Ap=".popover-body",Tp={...gn.Default,content:"",offset:[0,8],placement:"right",template:'',trigger:"click"},wp={...gn.DefaultType,content:"(null|string|element|function)"};class ar extends gn{static get Default(){return Tp}static get DefaultType(){return wp}static get NAME(){return yp}_isWithContent(){return this._getTitle()||this._getContent()}_getContentForTemplate(){return{[bp]:this._getTitle(),[Ap]:this._getContent()}}_getContent(){return this._resolvePossibleFunction(this._config.content)}static jQueryInterface(i){return this.each(function(){const u=ar.getOrCreateInstance(this,i);if(typeof i=="string"){if(typeof u[i]>"u")throw new TypeError(`No method named "${i}"`);u[i]()}})}}S(ar);const Cp="scrollspy",_i=".bs.scrollspy",Sp=".data-api",Op=`activate${_i}`,La=`click${_i}`,xp=`load${_i}${Sp}`,Np="dropdown-item",Hn="active",$p='[data-bs-spy="scroll"]',vi="[href]",Rp=".nav, .list-group",Ia=".nav-link",Dp=`${Ia}, .nav-item > ${Ia}, .list-group-item`,Lp=".dropdown",Ip=".dropdown-toggle",Pp={offset:null,rootMargin:"0px 0px -25%",smoothScroll:!1,target:null,threshold:[.1,.5,1]},Mp={offset:"(number|null)",rootMargin:"string",smoothScroll:"boolean",target:"element",threshold:"array"};class ys extends W{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 Pp}static get DefaultType(){return Mp}static get NAME(){return Cp}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=R(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,vi,i=>{const u=this._observableSections.get(i.target.hash);if(u){i.preventDefault();const E=this._rootElement||window,L=u.offsetTop-this._element.offsetTop;if(E.scrollTo){E.scrollTo({top:L,behavior:"smooth"});return}E.scrollTop=L}}))}_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}`),E=U=>{this._previousScrollData.visibleEntryTop=U.target.offsetTop,this._process(u(U))},L=(this._rootElement||document.documentElement).scrollTop,G=L>=this._previousScrollData.parentScrollTop;this._previousScrollData.parentScrollTop=L;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(G&&le){if(E(U),!L)return;continue}!G&&!le&&E(U)}}_initializeTargetsAndObservables(){this._targetLinks=new Map,this._observableSections=new Map;const i=N.find(vi,this._config.target);for(const u of i){if(!u.hash||H(u))continue;const E=N.findOne(decodeURI(u.hash),this._element);P(E)&&(this._targetLinks.set(decodeURI(u.hash),u),this._observableSections.set(u.hash,E))}}_process(i){this._activeTarget!==i&&(this._clearActiveClass(this._config.target),this._activeTarget=i,i.classList.add(Hn),this._activateParents(i),$.trigger(this._element,Op,{relatedTarget:i}))}_activateParents(i){if(i.classList.contains(Np)){N.findOne(Ip,i.closest(Lp)).classList.add(Hn);return}for(const u of N.parents(i,Rp))for(const E of N.prev(u,Dp))E.classList.add(Hn)}_clearActiveClass(i){i.classList.remove(Hn);const u=N.find(`${vi}.${Hn}`,i);for(const E of u)E.classList.remove(Hn)}static jQueryInterface(i){return this.each(function(){const u=ys.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,xp,()=>{for(const m of N.find($p))ys.getOrCreateInstance(m)}),S(ys);const kp="tab",mn=".bs.tab",Vp=`hide${mn}`,Fp=`hidden${mn}`,Hp=`show${mn}`,Bp=`shown${mn}`,jp=`click${mn}`,Kp=`keydown${mn}`,Wp=`load${mn}`,Up="ArrowLeft",Pa="ArrowRight",Yp="ArrowUp",Ma="ArrowDown",Ei="Home",ka="End",_n="active",Va="fade",yi="show",Gp="dropdown",Fa=".dropdown-toggle",qp=".dropdown-menu",bi=`:not(${Fa})`,zp='.list-group, .nav, [role="tablist"]',Xp=".nav-item, .list-group-item",Qp=`.nav-link${bi}, .list-group-item${bi}, [role="tab"]${bi}`,Ha='[data-bs-toggle="tab"], [data-bs-toggle="pill"], [data-bs-toggle="list"]',Ai=`${Qp}, ${Ha}`,Jp=`.${_n}[data-bs-toggle="tab"], .${_n}[data-bs-toggle="pill"], .${_n}[data-bs-toggle="list"]`;class vn extends W{constructor(i){super(i),this._parent=this._element.closest(zp),this._parent&&(this._setInitialAttributes(this._parent,this._getChildren()),$.on(this._element,Kp,u=>this._keydown(u)))}static get NAME(){return kp}show(){const i=this._element;if(this._elemIsActive(i))return;const u=this._getActiveElem(),E=u?$.trigger(u,Vp,{relatedTarget:i}):null;$.trigger(i,Hp,{relatedTarget:u}).defaultPrevented||E&&E.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 E=()=>{if(i.getAttribute("role")!=="tab"){i.classList.add(yi);return}i.removeAttribute("tabindex"),i.setAttribute("aria-selected",!0),this._toggleDropDown(i,!0),$.trigger(i,Bp,{relatedTarget:u})};this._queueCallback(E,i,i.classList.contains(Va))}_deactivate(i,u){if(!i)return;i.classList.remove(_n),i.blur(),this._deactivate(N.getElementFromSelector(i));const E=()=>{if(i.getAttribute("role")!=="tab"){i.classList.remove(yi);return}i.setAttribute("aria-selected",!1),i.setAttribute("tabindex","-1"),this._toggleDropDown(i,!1),$.trigger(i,Fp,{relatedTarget:u})};this._queueCallback(E,i,i.classList.contains(Va))}_keydown(i){if(![Up,Pa,Yp,Ma,Ei,ka].includes(i.key))return;i.stopPropagation(),i.preventDefault();const u=this._getChildren().filter(L=>!H(L));let E;if([Ei,ka].includes(i.key))E=u[i.key===Ei?0:u.length-1];else{const L=[Pa,Ma].includes(i.key);E=Q(u,i.target,L,!0)}E&&(E.focus({preventScroll:!0}),vn.getOrCreateInstance(E).show())}_getChildren(){return N.find(Ai,this._parent)}_getActiveElem(){return this._getChildren().find(i=>this._elemIsActive(i))||null}_setInitialAttributes(i,u){this._setAttributeIfNotExists(i,"role","tablist");for(const E of u)this._setInitialAttributesOnChild(E)}_setInitialAttributesOnChild(i){i=this._getInnerElement(i);const u=this._elemIsActive(i),E=this._getOuterElement(i);i.setAttribute("aria-selected",u),E!==i&&this._setAttributeIfNotExists(E,"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 E=this._getOuterElement(i);if(!E.classList.contains(Gp))return;const L=(G,U)=>{const le=N.findOne(G,E);le&&le.classList.toggle(U,u)};L(Fa,_n),L(qp,yi),E.setAttribute("aria-expanded",u)}_setAttributeIfNotExists(i,u,E){i.hasAttribute(u)||i.setAttribute(u,E)}_elemIsActive(i){return i.classList.contains(_n)}_getInnerElement(i){return i.matches(Ai)?i:N.findOne(Ai,i)}_getOuterElement(i){return i.closest(Xp)||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,jp,Ha,function(m){["A","AREA"].includes(this.tagName)&&m.preventDefault(),!H(this)&&vn.getOrCreateInstance(this).show()}),$.on(window,Wp,()=>{for(const m of N.find(Jp))vn.getOrCreateInstance(m)}),S(vn);const Zp="toast",Yt=".bs.toast",eg=`mouseover${Yt}`,tg=`mouseout${Yt}`,ng=`focusin${Yt}`,sg=`focusout${Yt}`,rg=`hide${Yt}`,ig=`hidden${Yt}`,og=`show${Yt}`,ag=`shown${Yt}`,lg="fade",Ba="hide",lr="show",cr="showing",cg={animation:"boolean",autohide:"boolean",delay:"number"},ug={animation:!0,autohide:!0,delay:5e3};class bs extends W{constructor(i,u){super(i,u),this._timeout=null,this._hasMouseInteraction=!1,this._hasKeyboardInteraction=!1,this._setListeners()}static get Default(){return ug}static get DefaultType(){return cg}static get NAME(){return Zp}show(){if($.trigger(this._element,og).defaultPrevented)return;this._clearTimeout(),this._config.animation&&this._element.classList.add(lg);const u=()=>{this._element.classList.remove(cr),$.trigger(this._element,ag),this._maybeScheduleHide()};this._element.classList.remove(Ba),b(this._element),this._element.classList.add(lr,cr),this._queueCallback(u,this._element,this._config.animation)}hide(){if(!this.isShown()||$.trigger(this._element,rg).defaultPrevented)return;const u=()=>{this._element.classList.add(Ba),this._element.classList.remove(cr,lr),$.trigger(this._element,ig)};this._element.classList.add(cr),this._queueCallback(u,this._element,this._config.animation)}dispose(){this._clearTimeout(),this.isShown()&&this._element.classList.remove(lr),super.dispose()}isShown(){return this._element.classList.contains(lr)}_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 E=i.relatedTarget;this._element===E||this._element.contains(E)||this._maybeScheduleHide()}_setListeners(){$.on(this._element,eg,i=>this._onInteraction(i,!0)),$.on(this._element,tg,i=>this._onInteraction(i,!1)),$.on(this._element,ng,i=>this._onInteraction(i,!0)),$.on(this._element,sg,i=>this._onInteraction(i,!1))}_clearTimeout(){clearTimeout(this._timeout),this._timeout=null}static jQueryInterface(i){return this.each(function(){const u=bs.getOrCreateInstance(this,i);if(typeof i=="string"){if(typeof u[i]>"u")throw new TypeError(`No method named "${i}"`);u[i](this)}})}}return j(bs),S(bs),{Alert:Ce,Button:Wt,Carousel:Mn,Collapse:Vn,Dropdown:pt,Modal:pn,Offcanvas:Dt,Popover:ar,ScrollSpy:ys,Tab:vn,Toast:bs,Tooltip:gn}})}(Er)),Er.exports}sm();/** * @vue/shared v3.5.17 * (c) 2018-present Yuxi (Evan) You and Vue contributors * @license MIT -**//*! #__NO_SIDE_EFFECTS__ */function wo(e){const t=Object.create(null);for(const n of e.split(","))t[n]=1;return n=>n in t}const me={},zn=[],vt=()=>{},rm=()=>!1,Wr=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&(e.charCodeAt(2)>122||e.charCodeAt(2)<97),Co=e=>e.startsWith("onUpdate:"),Ne=Object.assign,So=(e,t)=>{const n=e.indexOf(t);n>-1&&e.splice(n,1)},im=Object.prototype.hasOwnProperty,ge=(e,t)=>im.call(e,t),se=Array.isArray,Xn=e=>qs(e)==="[object Map]",hs=e=>qs(e)==="[object Set]",Ja=e=>qs(e)==="[object Date]",ie=e=>typeof e=="function",ye=e=>typeof e=="string",yt=e=>typeof e=="symbol",_e=e=>e!==null&&typeof e=="object",Oo=e=>(_e(e)||ie(e))&&ie(e.then)&&ie(e.catch),Ic=Object.prototype.toString,qs=e=>Ic.call(e),om=e=>qs(e).slice(8,-1),Pc=e=>qs(e)==="[object Object]",xo=e=>ye(e)&&e!=="NaN"&&e[0]!=="-"&&""+parseInt(e,10)===e,Ns=wo(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),Ur=e=>{const t=Object.create(null);return n=>t[n]||(t[n]=e(n))},am=/-(\w)/g,dt=Ur(e=>e.replace(am,(t,n)=>n?n.toUpperCase():"")),lm=/\B([A-Z])/g,cn=Ur(e=>e.replace(lm,"-$1").toLowerCase()),Yr=Ur(e=>e.charAt(0).toUpperCase()+e.slice(1)),Ti=Ur(e=>e?`on${Yr(e)}`:""),nn=(e,t)=>!Object.is(e,t),br=(e,...t)=>{for(let n=0;n{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,writable:s,value:n})},xr=e=>{const t=parseFloat(e);return isNaN(t)?e:t},Mc=e=>{const t=ye(e)?Number(e):NaN;return isNaN(t)?e:t};let Za;const Gr=()=>Za||(Za=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});function qr(e){if(se(e)){const t={};for(let n=0;n{if(n){const s=n.split(um);s.length>1&&(t[s[0].trim()]=s[1].trim())}}),t}function zr(e){let t="";if(ye(e))t=e;else if(se(e))for(let n=0;n$n(n,t))}const Vc=e=>!!(e&&e.__v_isRef===!0),mm=e=>ye(e)?e:e==null?"":se(e)||_e(e)&&(e.toString===Ic||!ie(e.toString))?Vc(e)?mm(e.value):JSON.stringify(e,Fc,2):String(e),Fc=(e,t)=>Vc(t)?Fc(e,t.value):Xn(t)?{[`Map(${t.size})`]:[...t.entries()].reduce((n,[s,r],o)=>(n[wi(s,o)+" =>"]=r,n),{})}:hs(t)?{[`Set(${t.size})`]:[...t.values()].map(n=>wi(n))}:yt(t)?wi(t):_e(t)&&!se(t)&&!Pc(t)?String(t):t,wi=(e,t="")=>{var n;return yt(e)?`Symbol(${(n=e.description)!=null?n:t})`:e};/** +**//*! #__NO_SIDE_EFFECTS__ */function wo(e){const t=Object.create(null);for(const n of e.split(","))t[n]=1;return n=>n in t}const me={},zn=[],vt=()=>{},rm=()=>!1,Wr=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&(e.charCodeAt(2)>122||e.charCodeAt(2)<97),Co=e=>e.startsWith("onUpdate:"),Ne=Object.assign,So=(e,t)=>{const n=e.indexOf(t);n>-1&&e.splice(n,1)},im=Object.prototype.hasOwnProperty,ge=(e,t)=>im.call(e,t),se=Array.isArray,Xn=e=>qs(e)==="[object Map]",hs=e=>qs(e)==="[object Set]",Qa=e=>qs(e)==="[object Date]",ie=e=>typeof e=="function",ye=e=>typeof e=="string",yt=e=>typeof e=="symbol",_e=e=>e!==null&&typeof e=="object",Oo=e=>(_e(e)||ie(e))&&ie(e.then)&&ie(e.catch),Lc=Object.prototype.toString,qs=e=>Lc.call(e),om=e=>qs(e).slice(8,-1),Ic=e=>qs(e)==="[object Object]",xo=e=>ye(e)&&e!=="NaN"&&e[0]!=="-"&&""+parseInt(e,10)===e,Ns=wo(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),Ur=e=>{const t=Object.create(null);return n=>t[n]||(t[n]=e(n))},am=/-(\w)/g,dt=Ur(e=>e.replace(am,(t,n)=>n?n.toUpperCase():"")),lm=/\B([A-Z])/g,cn=Ur(e=>e.replace(lm,"-$1").toLowerCase()),Yr=Ur(e=>e.charAt(0).toUpperCase()+e.slice(1)),Ti=Ur(e=>e?`on${Yr(e)}`:""),nn=(e,t)=>!Object.is(e,t),br=(e,...t)=>{for(let n=0;n{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,writable:s,value:n})},xr=e=>{const t=parseFloat(e);return isNaN(t)?e:t},Pc=e=>{const t=ye(e)?Number(e):NaN;return isNaN(t)?e:t};let Ja;const Gr=()=>Ja||(Ja=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});function qr(e){if(se(e)){const t={};for(let n=0;n{if(n){const s=n.split(um);s.length>1&&(t[s[0].trim()]=s[1].trim())}}),t}function zr(e){let t="";if(ye(e))t=e;else if(se(e))for(let n=0;n$n(n,t))}const kc=e=>!!(e&&e.__v_isRef===!0),mm=e=>ye(e)?e:e==null?"":se(e)||_e(e)&&(e.toString===Lc||!ie(e.toString))?kc(e)?mm(e.value):JSON.stringify(e,Vc,2):String(e),Vc=(e,t)=>kc(t)?Vc(e,t.value):Xn(t)?{[`Map(${t.size})`]:[...t.entries()].reduce((n,[s,r],o)=>(n[wi(s,o)+" =>"]=r,n),{})}:hs(t)?{[`Set(${t.size})`]:[...t.values()].map(n=>wi(n))}:yt(t)?wi(t):_e(t)&&!se(t)&&!Ic(t)?String(t):t,wi=(e,t="")=>{var n;return yt(e)?`Symbol(${(n=e.description)!=null?n:t})`:e};/** * @vue/reactivity v3.5.17 * (c) 2018-present Yuxi (Evan) You and Vue contributors * @license MIT -**/let Fe;class Hc{constructor(t=!1){this.detached=t,this._active=!0,this._on=0,this.effects=[],this.cleanups=[],this._isPaused=!1,this.parent=Fe,!t&&Fe&&(this.index=(Fe.scopes||(Fe.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&&--this._on===0&&(Fe=this.prevScope,this.prevScope=void 0)}stop(t){if(this._active){this._active=!1;let n,s;for(n=0,s=this.effects.length;n0)return;if(Rs){let t=Rs;for(Rs=void 0;t;){const n=t.next;t.next=void 0,t.flags&=-9,t=n}}let e;for(;$s;){let t=$s;for($s=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 Yc(e){for(let t=e.deps;t;t=t.nextDep)t.version=-1,t.prevActiveLink=t.dep.activeLink,t.dep.activeLink=t}function Gc(e){let t,n=e.depsTail,s=n;for(;s;){const r=s.prevDep;s.version===-1?(s===n&&(n=r),Do(s),vm(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&&(qc(t.dep.computed)||t.dep.version!==t.version))return!0;return!!e._dirty}function qc(e){if(e.flags&4&&!(e.flags&16)||(e.flags&=-17,e.globalVersion===Fs)||(e.globalVersion=Fs,!e.isSSR&&e.flags&128&&(!e.deps&&!e._dirty||!Wi(e))))return;e.flags|=2;const t=e.dep,n=ve,s=Et;ve=e,Et=!0;try{Yc(e);const r=e.fn(e._value);(t.version===0||nn(r,e._value))&&(e.flags|=128,e._value=r,t.version++)}catch(r){throw t.version++,r}finally{ve=n,Et=s,Gc(e),e.flags&=-3}}function Do(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,!s&&n.computed)){n.computed.flags&=-5;for(let o=n.computed.deps;o;o=o.nextDep)Do(o,!0)}!t&&!--n.sc&&n.map&&n.map.delete(n.key)}function vm(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 Bt(){zc.push(Et),Et=!1}function jt(){const e=zc.pop();Et=e===void 0?!0:e}function el(e){const{cleanup:t}=e;if(e.cleanup=void 0,t){const n=ve;ve=void 0;try{t()}finally{ve=n}}}let Fs=0;class Em{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 Lo{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,this.__v_skip=!0}track(t){if(!ve||!Et||ve===this.computed)return;let n=this.activeLink;if(n===void 0||n.sub!==ve)n=this.activeLink=new Em(ve,this),ve.deps?(n.prevDep=ve.depsTail,ve.depsTail.nextDep=n,ve.depsTail=n):ve.deps=ve.depsTail=n,Xc(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=ve.depsTail,n.nextDep=void 0,ve.depsTail.nextDep=n,ve.depsTail=n,ve.deps===n&&(ve.deps=s)}return n}trigger(t){this.version++,Fs++,this.notify(t)}notify(t){$o();try{for(let n=this.subs;n;n=n.prevSub)n.sub.notify()&&n.sub.dep.notify()}finally{Ro()}}}function Xc(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)Xc(s)}const n=e.dep.subs;n!==e&&(e.prevSub=n,n&&(n.nextSub=e)),e.dep.subs=e}}const Nr=new WeakMap,wn=Symbol(""),Ui=Symbol(""),Hs=Symbol("");function He(e,t,n){if(Et&&ve){let s=Nr.get(e);s||Nr.set(e,s=new Map);let r=s.get(n);r||(s.set(n,r=new Lo),r.map=s,r.key=n),r.track()}}function kt(e,t,n,s,r,o){const a=Nr.get(e);if(!a){Fs++;return}const l=c=>{c&&c.trigger()};if($o(),t==="clear")a.forEach(l);else{const c=se(e),d=c&&xo(n);if(c&&n==="length"){const f=Number(s);a.forEach((h,p)=>{(p==="length"||p===Hs||!yt(p)&&p>=f)&&l(h)})}else switch((n!==void 0||a.has(void 0))&&l(a.get(n)),d&&l(a.get(Hs)),t){case"add":c?d&&l(a.get("length")):(l(a.get(wn)),Xn(e)&&l(a.get(Ui)));break;case"delete":c||(l(a.get(wn)),Xn(e)&&l(a.get(Ui)));break;case"set":Xn(e)&&l(a.get(wn));break}}Ro()}function ym(e,t){const n=Nr.get(e);return n&&n.get(t)}function jn(e){const t=fe(e);return t===e?t:(He(t,"iterate",Hs),ct(e)?t:t.map(Ie))}function Xr(e){return He(e=fe(e),"iterate",Hs),e}const bm={__proto__:null,[Symbol.iterator](){return Si(this,Symbol.iterator,Ie)},concat(...e){return jn(this).concat(...e.map(t=>se(t)?jn(t):t))},entries(){return Si(this,"entries",e=>(e[1]=Ie(e[1]),e))},every(e,t){return Lt(this,"every",e,t,void 0,arguments)},filter(e,t){return Lt(this,"filter",e,t,n=>n.map(Ie),arguments)},find(e,t){return Lt(this,"find",e,t,Ie,arguments)},findIndex(e,t){return Lt(this,"findIndex",e,t,void 0,arguments)},findLast(e,t){return Lt(this,"findLast",e,t,Ie,arguments)},findLastIndex(e,t){return Lt(this,"findLastIndex",e,t,void 0,arguments)},forEach(e,t){return Lt(this,"forEach",e,t,void 0,arguments)},includes(...e){return Oi(this,"includes",e)},indexOf(...e){return Oi(this,"indexOf",e)},join(e){return jn(this).join(e)},lastIndexOf(...e){return Oi(this,"lastIndexOf",e)},map(e,t){return Lt(this,"map",e,t,void 0,arguments)},pop(){return As(this,"pop")},push(...e){return As(this,"push",e)},reduce(e,...t){return tl(this,"reduce",e,t)},reduceRight(e,...t){return tl(this,"reduceRight",e,t)},shift(){return As(this,"shift")},some(e,t){return Lt(this,"some",e,t,void 0,arguments)},splice(...e){return As(this,"splice",e)},toReversed(){return jn(this).toReversed()},toSorted(e){return jn(this).toSorted(e)},toSpliced(...e){return jn(this).toSpliced(...e)},unshift(...e){return As(this,"unshift",e)},values(){return Si(this,"values",Ie)}};function Si(e,t,n){const s=Xr(e),r=s[t]();return s!==e&&!ct(e)&&(r._next=r.next,r.next=()=>{const o=r._next();return o.value&&(o.value=n(o.value)),o}),r}const Am=Array.prototype;function Lt(e,t,n,s,r,o){const a=Xr(e),l=a!==e&&!ct(e),c=a[t];if(c!==Am[t]){const h=c.apply(e,o);return l?Ie(h):h}let d=n;a!==e&&(l?d=function(h,p){return n.call(this,Ie(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 tl(e,t,n,s){const r=Xr(e);let o=n;return r!==e&&(ct(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,Ie(l),c,e)}),r[t](o,...s)}function Oi(e,t,n){const s=fe(e);He(s,"iterate",Hs);const r=s[t](...n);return(r===-1||r===!1)&&Mo(n[0])?(n[0]=fe(n[0]),s[t](...n)):r}function As(e,t,n=[]){Bt(),$o();const s=fe(e)[t].apply(e,n);return Ro(),jt(),s}const Tm=wo("__proto__,__v_isRef,__isVue"),Qc=new Set(Object.getOwnPropertyNames(Symbol).filter(e=>e!=="arguments"&&e!=="caller").map(e=>Symbol[e]).filter(yt));function wm(e){yt(e)||(e=String(e));const t=fe(this);return He(t,"has",e),t.hasOwnProperty(e)}class Jc{constructor(t=!1,n=!1){this._isReadonly=t,this._isShallow=n}get(t,n,s){if(n==="__v_skip")return t.__v_skip;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?Im:nu:o?tu:eu).get(t)||Object.getPrototypeOf(t)===Object.getPrototypeOf(s)?t:void 0;const a=se(t);if(!r){let c;if(a&&(c=bm[n]))return c;if(n==="hasOwnProperty")return wm}const l=Reflect.get(t,n,Ae(t)?t:s);return(yt(n)?Qc.has(n):Tm(n))||(r||He(t,"get",n),o)?l:Ae(l)?a&&xo(n)?l:l.value:_e(l)?r?ru(l):zs(l):l}}class Zc extends Jc{constructor(t=!1){super(!1,t)}set(t,n,s,r){let o=t[n];if(!this._isShallow){const c=rn(o);if(!ct(s)&&!rn(s)&&(o=fe(o),s=fe(s)),!se(t)&&Ae(o)&&!Ae(s))return c?!1:(o.value=s,!0)}const a=se(t)&&xo(n)?Number(n)e,dr=e=>Reflect.getPrototypeOf(e);function Nm(e,t,n){return function(...s){const r=this.__v_raw,o=fe(r),a=Xn(o),l=e==="entries"||e===Symbol.iterator&&a,c=e==="keys"&&a,d=r[e](...s),f=n?Yi:t?$r:Ie;return!t&&He(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 hr(e){return function(...t){return e==="delete"?!1:e==="clear"?void 0:this}}function $m(e,t){const n={get(r){const o=this.__v_raw,a=fe(o),l=fe(r);e||(nn(r,l)&&He(a,"get",r),He(a,"get",l));const{has:c}=dr(a),d=t?Yi:e?$r:Ie;if(c.call(a,r))return d(o.get(r));if(c.call(a,l))return d(o.get(l));o!==a&&o.get(r)},get size(){const r=this.__v_raw;return!e&&He(fe(r),"iterate",wn),Reflect.get(r,"size",r)},has(r){const o=this.__v_raw,a=fe(o),l=fe(r);return e||(nn(r,l)&&He(a,"has",r),He(a,"has",l)),r===l?o.has(r):o.has(r)||o.has(l)},forEach(r,o){const a=this,l=a.__v_raw,c=fe(l),d=t?Yi:e?$r:Ie;return!e&&He(c,"iterate",wn),l.forEach((f,h)=>r.call(o,d(f),d(h),a))}};return Ne(n,e?{add:hr("add"),set:hr("set"),delete:hr("delete"),clear:hr("clear")}:{add(r){!t&&!ct(r)&&!rn(r)&&(r=fe(r));const o=fe(this);return dr(o).has.call(o,r)||(o.add(r),kt(o,"add",r,r)),this},set(r,o){!t&&!ct(o)&&!rn(o)&&(o=fe(o));const a=fe(this),{has:l,get:c}=dr(a);let d=l.call(a,r);d||(r=fe(r),d=l.call(a,r));const f=c.call(a,r);return a.set(r,o),d?nn(o,f)&&kt(a,"set",r,o):kt(a,"add",r,o),this},delete(r){const o=fe(this),{has:a,get:l}=dr(o);let c=a.call(o,r);c||(r=fe(r),c=a.call(o,r)),l&&l.call(o,r);const d=o.delete(r);return c&&kt(o,"delete",r,void 0),d},clear(){const r=fe(this),o=r.size!==0,a=r.clear();return o&&kt(r,"clear",void 0,void 0),a}}),["keys","values","entries",Symbol.iterator].forEach(r=>{n[r]=Nm(r,e,t)}),n}function Io(e,t){const n=$m(e,t);return(s,r,o)=>r==="__v_isReactive"?!e:r==="__v_isReadonly"?e:r==="__v_raw"?s:Reflect.get(ge(n,r)&&r in s?n:s,r,o)}const Rm={get:Io(!1,!1)},Dm={get:Io(!1,!0)},Lm={get:Io(!0,!1)};const eu=new WeakMap,tu=new WeakMap,nu=new WeakMap,Im=new WeakMap;function Pm(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function Mm(e){return e.__v_skip||!Object.isExtensible(e)?0:Pm(om(e))}function zs(e){return rn(e)?e:Po(e,!1,Sm,Rm,eu)}function su(e){return Po(e,!1,xm,Dm,tu)}function ru(e){return Po(e,!0,Om,Lm,nu)}function Po(e,t,n,s,r){if(!_e(e)||e.__v_raw&&!(t&&e.__v_isReactive))return e;const o=Mm(e);if(o===0)return e;const a=r.get(e);if(a)return a;const l=new Proxy(e,o===2?s:n);return r.set(e,l),l}function sn(e){return rn(e)?sn(e.__v_raw):!!(e&&e.__v_isReactive)}function rn(e){return!!(e&&e.__v_isReadonly)}function ct(e){return!!(e&&e.__v_isShallow)}function Mo(e){return e?!!e.__v_raw:!1}function fe(e){const t=e&&e.__v_raw;return t?fe(t):e}function Qr(e){return!ge(e,"__v_skip")&&Object.isExtensible(e)&&Ki(e,"__v_skip",!0),e}const Ie=e=>_e(e)?zs(e):e,$r=e=>_e(e)?ru(e):e;function Ae(e){return e?e.__v_isRef===!0:!1}function Cn(e){return ou(e,!1)}function iu(e){return ou(e,!0)}function ou(e,t){return Ae(e)?e:new km(e,t)}class km{constructor(t,n){this.dep=new Lo,this.__v_isRef=!0,this.__v_isShallow=!1,this._rawValue=n?t:fe(t),this._value=n?t:Ie(t),this.__v_isShallow=n}get value(){return this.dep.track(),this._value}set value(t){const n=this._rawValue,s=this.__v_isShallow||ct(t)||rn(t);t=s?t:fe(t),nn(t,n)&&(this._rawValue=t,this._value=s?t:Ie(t),this.dep.trigger())}}function ot(e){return Ae(e)?e.value:e}function ky(e){return ie(e)?e():ot(e)}const Vm={get:(e,t,n)=>t==="__v_raw"?e:ot(Reflect.get(e,t,n)),set:(e,t,n,s)=>{const r=e[t];return Ae(r)&&!Ae(n)?(r.value=n,!0):Reflect.set(e,t,n,s)}};function au(e){return sn(e)?e:new Proxy(e,Vm)}function Fm(e){const t=se(e)?new Array(e.length):{};for(const n in e)t[n]=lu(e,n);return t}class Hm{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 ym(fe(this._object),this._key)}}class Bm{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 Vy(e,t,n){return Ae(e)?e:ie(e)?new Bm(e):_e(e)&&arguments.length>1?lu(e,t,n):Cn(e)}function lu(e,t,n){const s=e[t];return Ae(s)?s:new Hm(e,t,n)}class jm{constructor(t,n,s){this.fn=t,this.setter=n,this._value=void 0,this.dep=new Lo(this),this.__v_isRef=!0,this.deps=void 0,this.depsTail=void 0,this.flags=16,this.globalVersion=Fs-1,this.next=void 0,this.effect=this,this.__v_isReadonly=!n,this.isSSR=s}notify(){if(this.flags|=16,!(this.flags&8)&&ve!==this)return Uc(this,!0),!0}get value(){const t=this.dep.track();return qc(this),t&&(t.version=this.dep.version),this._value}set value(t){this.setter&&this.setter(t)}}function Km(e,t,n=!1){let s,r;return ie(e)?s=e:(s=e.get,r=e.set),new jm(s,r,n)}const pr={},Rr=new WeakMap;let An;function Wm(e,t=!1,n=An){if(n){let s=Rr.get(n);s||Rr.set(n,s=[]),s.push(e)}}function Um(e,t,n=me){const{immediate:s,deep:r,once:o,scheduler:a,augmentJob:l,call:c}=n,d=k=>r?k:ct(k)||r===!1||r===0?Vt(k,1):Vt(k);let f,h,p,_,x=!1,A=!1;if(Ae(e)?(h=()=>e.value,x=ct(e)):sn(e)?(h=()=>d(e),x=!0):se(e)?(A=!0,x=e.some(k=>sn(k)||ct(k)),h=()=>e.map(k=>{if(Ae(k))return k.value;if(sn(k))return d(k);if(ie(k))return c?c(k,2):k()})):ie(e)?t?h=c?()=>c(e,2):e:h=()=>{if(p){Bt();try{p()}finally{jt()}}const k=An;An=f;try{return c?c(e,3,[_]):e(_)}finally{An=k}}:h=vt,t&&r){const k=h,b=r===!0?1/0:r;h=()=>Vt(k(),b)}const R=jc(),P=()=>{f.stop(),R&&R.active&&So(R.effects,f)};if(o&&t){const k=t;t=(...b)=>{k(...b),P()}}let H=A?new Array(e.length).fill(pr):pr;const F=k=>{if(!(!(f.flags&1)||!f.dirty&&!k))if(t){const b=f.run();if(r||x||(A?b.some((y,O)=>nn(y,H[O])):nn(b,H))){p&&p();const y=An;An=f;try{const O=[b,H===pr?void 0:A&&H[0]===pr?[]:H,_];H=b,c?c(t,3,O):t(...O)}finally{An=y}}}else f.run()};return l&&l(F),f=new Kc(h),f.scheduler=a?()=>a(F,!1):F,_=k=>Wm(k,!1,f),p=f.onStop=()=>{const k=Rr.get(f);if(k){if(c)c(k,4);else for(const b of k)b();Rr.delete(f)}},t?s?F(!0):H=f.run():a?a(F.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||!_e(e)||e.__v_skip||(n=n||new Set,n.has(e)))return e;if(n.add(e),t--,Ae(e))Vt(e.value,t,n);else if(se(e))for(let s=0;s{Vt(s,t,n)});else if(Pc(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}/** +**/let Fe;class Fc{constructor(t=!1){this.detached=t,this._active=!0,this._on=0,this.effects=[],this.cleanups=[],this._isPaused=!1,this.parent=Fe,!t&&Fe&&(this.index=(Fe.scopes||(Fe.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&&--this._on===0&&(Fe=this.prevScope,this.prevScope=void 0)}stop(t){if(this._active){this._active=!1;let n,s;for(n=0,s=this.effects.length;n0)return;if(Rs){let t=Rs;for(Rs=void 0;t;){const n=t.next;t.next=void 0,t.flags&=-9,t=n}}let e;for(;$s;){let t=$s;for($s=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 Uc(e){for(let t=e.deps;t;t=t.nextDep)t.version=-1,t.prevActiveLink=t.dep.activeLink,t.dep.activeLink=t}function Yc(e){let t,n=e.depsTail,s=n;for(;s;){const r=s.prevDep;s.version===-1?(s===n&&(n=r),Do(s),vm(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&&(Gc(t.dep.computed)||t.dep.version!==t.version))return!0;return!!e._dirty}function Gc(e){if(e.flags&4&&!(e.flags&16)||(e.flags&=-17,e.globalVersion===Fs)||(e.globalVersion=Fs,!e.isSSR&&e.flags&128&&(!e.deps&&!e._dirty||!Wi(e))))return;e.flags|=2;const t=e.dep,n=ve,s=Et;ve=e,Et=!0;try{Uc(e);const r=e.fn(e._value);(t.version===0||nn(r,e._value))&&(e.flags|=128,e._value=r,t.version++)}catch(r){throw t.version++,r}finally{ve=n,Et=s,Yc(e),e.flags&=-3}}function Do(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,!s&&n.computed)){n.computed.flags&=-5;for(let o=n.computed.deps;o;o=o.nextDep)Do(o,!0)}!t&&!--n.sc&&n.map&&n.map.delete(n.key)}function vm(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 qc=[];function Bt(){qc.push(Et),Et=!1}function jt(){const e=qc.pop();Et=e===void 0?!0:e}function Za(e){const{cleanup:t}=e;if(e.cleanup=void 0,t){const n=ve;ve=void 0;try{t()}finally{ve=n}}}let Fs=0;class Em{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 Lo{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,this.__v_skip=!0}track(t){if(!ve||!Et||ve===this.computed)return;let n=this.activeLink;if(n===void 0||n.sub!==ve)n=this.activeLink=new Em(ve,this),ve.deps?(n.prevDep=ve.depsTail,ve.depsTail.nextDep=n,ve.depsTail=n):ve.deps=ve.depsTail=n,zc(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=ve.depsTail,n.nextDep=void 0,ve.depsTail.nextDep=n,ve.depsTail=n,ve.deps===n&&(ve.deps=s)}return n}trigger(t){this.version++,Fs++,this.notify(t)}notify(t){$o();try{for(let n=this.subs;n;n=n.prevSub)n.sub.notify()&&n.sub.dep.notify()}finally{Ro()}}}function zc(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)zc(s)}const n=e.dep.subs;n!==e&&(e.prevSub=n,n&&(n.nextSub=e)),e.dep.subs=e}}const Nr=new WeakMap,wn=Symbol(""),Ui=Symbol(""),Hs=Symbol("");function He(e,t,n){if(Et&&ve){let s=Nr.get(e);s||Nr.set(e,s=new Map);let r=s.get(n);r||(s.set(n,r=new Lo),r.map=s,r.key=n),r.track()}}function kt(e,t,n,s,r,o){const a=Nr.get(e);if(!a){Fs++;return}const l=c=>{c&&c.trigger()};if($o(),t==="clear")a.forEach(l);else{const c=se(e),d=c&&xo(n);if(c&&n==="length"){const f=Number(s);a.forEach((h,p)=>{(p==="length"||p===Hs||!yt(p)&&p>=f)&&l(h)})}else switch((n!==void 0||a.has(void 0))&&l(a.get(n)),d&&l(a.get(Hs)),t){case"add":c?d&&l(a.get("length")):(l(a.get(wn)),Xn(e)&&l(a.get(Ui)));break;case"delete":c||(l(a.get(wn)),Xn(e)&&l(a.get(Ui)));break;case"set":Xn(e)&&l(a.get(wn));break}}Ro()}function ym(e,t){const n=Nr.get(e);return n&&n.get(t)}function jn(e){const t=fe(e);return t===e?t:(He(t,"iterate",Hs),ct(e)?t:t.map(Ie))}function Xr(e){return He(e=fe(e),"iterate",Hs),e}const bm={__proto__:null,[Symbol.iterator](){return Si(this,Symbol.iterator,Ie)},concat(...e){return jn(this).concat(...e.map(t=>se(t)?jn(t):t))},entries(){return Si(this,"entries",e=>(e[1]=Ie(e[1]),e))},every(e,t){return Lt(this,"every",e,t,void 0,arguments)},filter(e,t){return Lt(this,"filter",e,t,n=>n.map(Ie),arguments)},find(e,t){return Lt(this,"find",e,t,Ie,arguments)},findIndex(e,t){return Lt(this,"findIndex",e,t,void 0,arguments)},findLast(e,t){return Lt(this,"findLast",e,t,Ie,arguments)},findLastIndex(e,t){return Lt(this,"findLastIndex",e,t,void 0,arguments)},forEach(e,t){return Lt(this,"forEach",e,t,void 0,arguments)},includes(...e){return Oi(this,"includes",e)},indexOf(...e){return Oi(this,"indexOf",e)},join(e){return jn(this).join(e)},lastIndexOf(...e){return Oi(this,"lastIndexOf",e)},map(e,t){return Lt(this,"map",e,t,void 0,arguments)},pop(){return As(this,"pop")},push(...e){return As(this,"push",e)},reduce(e,...t){return el(this,"reduce",e,t)},reduceRight(e,...t){return el(this,"reduceRight",e,t)},shift(){return As(this,"shift")},some(e,t){return Lt(this,"some",e,t,void 0,arguments)},splice(...e){return As(this,"splice",e)},toReversed(){return jn(this).toReversed()},toSorted(e){return jn(this).toSorted(e)},toSpliced(...e){return jn(this).toSpliced(...e)},unshift(...e){return As(this,"unshift",e)},values(){return Si(this,"values",Ie)}};function Si(e,t,n){const s=Xr(e),r=s[t]();return s!==e&&!ct(e)&&(r._next=r.next,r.next=()=>{const o=r._next();return o.value&&(o.value=n(o.value)),o}),r}const Am=Array.prototype;function Lt(e,t,n,s,r,o){const a=Xr(e),l=a!==e&&!ct(e),c=a[t];if(c!==Am[t]){const h=c.apply(e,o);return l?Ie(h):h}let d=n;a!==e&&(l?d=function(h,p){return n.call(this,Ie(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 el(e,t,n,s){const r=Xr(e);let o=n;return r!==e&&(ct(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,Ie(l),c,e)}),r[t](o,...s)}function Oi(e,t,n){const s=fe(e);He(s,"iterate",Hs);const r=s[t](...n);return(r===-1||r===!1)&&Mo(n[0])?(n[0]=fe(n[0]),s[t](...n)):r}function As(e,t,n=[]){Bt(),$o();const s=fe(e)[t].apply(e,n);return Ro(),jt(),s}const Tm=wo("__proto__,__v_isRef,__isVue"),Xc=new Set(Object.getOwnPropertyNames(Symbol).filter(e=>e!=="arguments"&&e!=="caller").map(e=>Symbol[e]).filter(yt));function wm(e){yt(e)||(e=String(e));const t=fe(this);return He(t,"has",e),t.hasOwnProperty(e)}class Qc{constructor(t=!1,n=!1){this._isReadonly=t,this._isShallow=n}get(t,n,s){if(n==="__v_skip")return t.__v_skip;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?Im:tu:o?eu:Zc).get(t)||Object.getPrototypeOf(t)===Object.getPrototypeOf(s)?t:void 0;const a=se(t);if(!r){let c;if(a&&(c=bm[n]))return c;if(n==="hasOwnProperty")return wm}const l=Reflect.get(t,n,Ae(t)?t:s);return(yt(n)?Xc.has(n):Tm(n))||(r||He(t,"get",n),o)?l:Ae(l)?a&&xo(n)?l:l.value:_e(l)?r?su(l):zs(l):l}}class Jc extends Qc{constructor(t=!1){super(!1,t)}set(t,n,s,r){let o=t[n];if(!this._isShallow){const c=rn(o);if(!ct(s)&&!rn(s)&&(o=fe(o),s=fe(s)),!se(t)&&Ae(o)&&!Ae(s))return c?!1:(o.value=s,!0)}const a=se(t)&&xo(n)?Number(n)e,dr=e=>Reflect.getPrototypeOf(e);function Nm(e,t,n){return function(...s){const r=this.__v_raw,o=fe(r),a=Xn(o),l=e==="entries"||e===Symbol.iterator&&a,c=e==="keys"&&a,d=r[e](...s),f=n?Yi:t?$r:Ie;return!t&&He(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 hr(e){return function(...t){return e==="delete"?!1:e==="clear"?void 0:this}}function $m(e,t){const n={get(r){const o=this.__v_raw,a=fe(o),l=fe(r);e||(nn(r,l)&&He(a,"get",r),He(a,"get",l));const{has:c}=dr(a),d=t?Yi:e?$r:Ie;if(c.call(a,r))return d(o.get(r));if(c.call(a,l))return d(o.get(l));o!==a&&o.get(r)},get size(){const r=this.__v_raw;return!e&&He(fe(r),"iterate",wn),Reflect.get(r,"size",r)},has(r){const o=this.__v_raw,a=fe(o),l=fe(r);return e||(nn(r,l)&&He(a,"has",r),He(a,"has",l)),r===l?o.has(r):o.has(r)||o.has(l)},forEach(r,o){const a=this,l=a.__v_raw,c=fe(l),d=t?Yi:e?$r:Ie;return!e&&He(c,"iterate",wn),l.forEach((f,h)=>r.call(o,d(f),d(h),a))}};return Ne(n,e?{add:hr("add"),set:hr("set"),delete:hr("delete"),clear:hr("clear")}:{add(r){!t&&!ct(r)&&!rn(r)&&(r=fe(r));const o=fe(this);return dr(o).has.call(o,r)||(o.add(r),kt(o,"add",r,r)),this},set(r,o){!t&&!ct(o)&&!rn(o)&&(o=fe(o));const a=fe(this),{has:l,get:c}=dr(a);let d=l.call(a,r);d||(r=fe(r),d=l.call(a,r));const f=c.call(a,r);return a.set(r,o),d?nn(o,f)&&kt(a,"set",r,o):kt(a,"add",r,o),this},delete(r){const o=fe(this),{has:a,get:l}=dr(o);let c=a.call(o,r);c||(r=fe(r),c=a.call(o,r)),l&&l.call(o,r);const d=o.delete(r);return c&&kt(o,"delete",r,void 0),d},clear(){const r=fe(this),o=r.size!==0,a=r.clear();return o&&kt(r,"clear",void 0,void 0),a}}),["keys","values","entries",Symbol.iterator].forEach(r=>{n[r]=Nm(r,e,t)}),n}function Io(e,t){const n=$m(e,t);return(s,r,o)=>r==="__v_isReactive"?!e:r==="__v_isReadonly"?e:r==="__v_raw"?s:Reflect.get(ge(n,r)&&r in s?n:s,r,o)}const Rm={get:Io(!1,!1)},Dm={get:Io(!1,!0)},Lm={get:Io(!0,!1)};const Zc=new WeakMap,eu=new WeakMap,tu=new WeakMap,Im=new WeakMap;function Pm(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function Mm(e){return e.__v_skip||!Object.isExtensible(e)?0:Pm(om(e))}function zs(e){return rn(e)?e:Po(e,!1,Sm,Rm,Zc)}function nu(e){return Po(e,!1,xm,Dm,eu)}function su(e){return Po(e,!0,Om,Lm,tu)}function Po(e,t,n,s,r){if(!_e(e)||e.__v_raw&&!(t&&e.__v_isReactive))return e;const o=Mm(e);if(o===0)return e;const a=r.get(e);if(a)return a;const l=new Proxy(e,o===2?s:n);return r.set(e,l),l}function sn(e){return rn(e)?sn(e.__v_raw):!!(e&&e.__v_isReactive)}function rn(e){return!!(e&&e.__v_isReadonly)}function ct(e){return!!(e&&e.__v_isShallow)}function Mo(e){return e?!!e.__v_raw:!1}function fe(e){const t=e&&e.__v_raw;return t?fe(t):e}function Qr(e){return!ge(e,"__v_skip")&&Object.isExtensible(e)&&Ki(e,"__v_skip",!0),e}const Ie=e=>_e(e)?zs(e):e,$r=e=>_e(e)?su(e):e;function Ae(e){return e?e.__v_isRef===!0:!1}function Cn(e){return iu(e,!1)}function ru(e){return iu(e,!0)}function iu(e,t){return Ae(e)?e:new km(e,t)}class km{constructor(t,n){this.dep=new Lo,this.__v_isRef=!0,this.__v_isShallow=!1,this._rawValue=n?t:fe(t),this._value=n?t:Ie(t),this.__v_isShallow=n}get value(){return this.dep.track(),this._value}set value(t){const n=this._rawValue,s=this.__v_isShallow||ct(t)||rn(t);t=s?t:fe(t),nn(t,n)&&(this._rawValue=t,this._value=s?t:Ie(t),this.dep.trigger())}}function ot(e){return Ae(e)?e.value:e}function ky(e){return ie(e)?e():ot(e)}const Vm={get:(e,t,n)=>t==="__v_raw"?e:ot(Reflect.get(e,t,n)),set:(e,t,n,s)=>{const r=e[t];return Ae(r)&&!Ae(n)?(r.value=n,!0):Reflect.set(e,t,n,s)}};function ou(e){return sn(e)?e:new Proxy(e,Vm)}function Fm(e){const t=se(e)?new Array(e.length):{};for(const n in e)t[n]=au(e,n);return t}class Hm{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 ym(fe(this._object),this._key)}}class Bm{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 Vy(e,t,n){return Ae(e)?e:ie(e)?new Bm(e):_e(e)&&arguments.length>1?au(e,t,n):Cn(e)}function au(e,t,n){const s=e[t];return Ae(s)?s:new Hm(e,t,n)}class jm{constructor(t,n,s){this.fn=t,this.setter=n,this._value=void 0,this.dep=new Lo(this),this.__v_isRef=!0,this.deps=void 0,this.depsTail=void 0,this.flags=16,this.globalVersion=Fs-1,this.next=void 0,this.effect=this,this.__v_isReadonly=!n,this.isSSR=s}notify(){if(this.flags|=16,!(this.flags&8)&&ve!==this)return Wc(this,!0),!0}get value(){const t=this.dep.track();return Gc(this),t&&(t.version=this.dep.version),this._value}set value(t){this.setter&&this.setter(t)}}function Km(e,t,n=!1){let s,r;return ie(e)?s=e:(s=e.get,r=e.set),new jm(s,r,n)}const pr={},Rr=new WeakMap;let An;function Wm(e,t=!1,n=An){if(n){let s=Rr.get(n);s||Rr.set(n,s=[]),s.push(e)}}function Um(e,t,n=me){const{immediate:s,deep:r,once:o,scheduler:a,augmentJob:l,call:c}=n,d=k=>r?k:ct(k)||r===!1||r===0?Vt(k,1):Vt(k);let f,h,p,_,x=!1,A=!1;if(Ae(e)?(h=()=>e.value,x=ct(e)):sn(e)?(h=()=>d(e),x=!0):se(e)?(A=!0,x=e.some(k=>sn(k)||ct(k)),h=()=>e.map(k=>{if(Ae(k))return k.value;if(sn(k))return d(k);if(ie(k))return c?c(k,2):k()})):ie(e)?t?h=c?()=>c(e,2):e:h=()=>{if(p){Bt();try{p()}finally{jt()}}const k=An;An=f;try{return c?c(e,3,[_]):e(_)}finally{An=k}}:h=vt,t&&r){const k=h,b=r===!0?1/0:r;h=()=>Vt(k(),b)}const R=Bc(),P=()=>{f.stop(),R&&R.active&&So(R.effects,f)};if(o&&t){const k=t;t=(...b)=>{k(...b),P()}}let H=A?new Array(e.length).fill(pr):pr;const F=k=>{if(!(!(f.flags&1)||!f.dirty&&!k))if(t){const b=f.run();if(r||x||(A?b.some((y,O)=>nn(y,H[O])):nn(b,H))){p&&p();const y=An;An=f;try{const O=[b,H===pr?void 0:A&&H[0]===pr?[]:H,_];H=b,c?c(t,3,O):t(...O)}finally{An=y}}}else f.run()};return l&&l(F),f=new jc(h),f.scheduler=a?()=>a(F,!1):F,_=k=>Wm(k,!1,f),p=f.onStop=()=>{const k=Rr.get(f);if(k){if(c)c(k,4);else for(const b of k)b();Rr.delete(f)}},t?s?F(!0):H=f.run():a?a(F.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||!_e(e)||e.__v_skip||(n=n||new Set,n.has(e)))return e;if(n.add(e),t--,Ae(e))Vt(e.value,t,n);else if(se(e))for(let s=0;s{Vt(s,t,n)});else if(Ic(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.17 * (c) 2018-present Yuxi (Evan) You and Vue contributors * @license MIT -**/function Xs(e,t,n,s){try{return s?e(...s):e()}catch(r){ps(r,t,n)}}function bt(e,t,n,s){if(ie(e)){const r=Xs(e,t,n,s);return r&&Oo(r)&&r.catch(o=>{ps(o,t,n)}),r}if(se(e)){const r=[];for(let o=0;o>>1,r=Ye[s],o=Bs(r);o=Bs(n)?Ye.push(e):Ye.splice(Gm(t),0,e),e.flags|=1,uu()}}function uu(){Dr||(Dr=cu.then(du))}function Lr(e){se(e)?Qn.push(...e):Qt&&e.id===-1?Qt.splice(Un+1,0,e):e.flags&1||(Qn.push(e),e.flags|=1),uu()}function nl(e,t,n=St+1){for(;nBs(n)-Bs(s));if(Qn.length=0,Qt){Qt.push(...t);return}for(Qt=t,Un=0;Une.id==null?e.flags&2?-1:1/0:e.id;function du(e){try{for(St=0;St{s._d&&vl(-1);const o=Ir(t);let a;try{a=e(...r)}finally{Ir(o),s._d&&vl(1)}return a};return s._n=!0,s._c=!0,s._d=!0,s}function Fy(e,t){if(xe===null)return e;const n=ni(xe),s=e.dirs||(e.dirs=[]);for(let r=0;re.__isTeleport,Ds=e=>e&&(e.disabled||e.disabled===""),sl=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 ye(n)?t?t(n):null:n},mu={name:"Teleport",__isTeleport:!0,process(e,t,n,s,r,o,a,l,c,d){const{mc:f,pc:h,pbc:p,o:{insert:_,querySelector:x,createText:A,createComment:R}}=d,P=Ds(t.props);let{shapeFlag:H,children:F,dynamicChildren:k}=t;if(e==null){const b=t.el=A(""),y=t.anchor=A("");_(b,n,s),_(y,n,s);const O=(T,S)=>{H&16&&(r&&r.isCE&&(r.ce._teleportTarget=T),f(F,T,S,r,o,a,l,c))},w=()=>{const T=t.target=Gi(t.props,x),S=_u(T,t,A,_);T&&(a!=="svg"&&rl(T)?a="svg":a!=="mathml"&&il(T)&&(a="mathml"),P||(O(T,S),Ar(t,!1)))};P&&(O(n,y),Ar(t,!0)),sl(t.props)?(t.el.__isMounted=!1,Ue(()=>{w(),delete t.el.__isMounted},o)):w()}else{if(sl(t.props)&&e.el.__isMounted===!1){Ue(()=>{mu.process(e,t,n,s,r,o,a,l,c,d)},o);return}t.el=e.el,t.targetStart=e.targetStart;const b=t.anchor=e.anchor,y=t.target=e.target,O=t.targetAnchor=e.targetAnchor,w=Ds(e.props),T=w?n:y,S=w?b:O;if(a==="svg"||rl(y)?a="svg":(a==="mathml"||il(y))&&(a="mathml"),k?(p(e.dynamicChildren,k,T,r,o,a,l),Go(e,t,!0)):c||h(e,t,T,S,r,o,a,l,!1),P)w?t.props&&e.props&&t.props.to!==e.props.to&&(t.props.to=e.props.to):gr(t,n,b,d,1);else if((t.props&&t.props.to)!==(e.props&&e.props.to)){const K=t.target=Gi(t.props,x);K&&gr(t,K,null,d,0)}else w&&gr(t,y,O,d,1);Ar(t,P)}},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 _=o||!Ds(p);for(let x=0;x{e.isMounted=!0}),Su(()=>{e.isUnmounting=!0}),e}const it=[Function,Array],Eu={mode:String,appear:Boolean,persisted:Boolean,onBeforeEnter:it,onEnter:it,onAfterEnter:it,onEnterCancelled:it,onBeforeLeave:it,onLeave:it,onAfterLeave:it,onLeaveCancelled:it,onBeforeAppear:it,onAppear:it,onAfterAppear:it,onAppearCancelled:it},yu=e=>{const t=e.subTree;return t.component?yu(t.component):t},zm={name:"BaseTransition",props:Eu,setup(e,{slots:t}){const n=gs(),s=vu();return()=>{const r=t.default&&Vo(t.default(),!0);if(!r||!r.length)return;const o=bu(r),a=fe(e),{mode:l}=a;if(s.isLeaving)return xi(o);const c=ol(o);if(!c)return xi(o);let d=js(c,a,s,n,h=>d=h);c.type!==Re&&Rn(c,d);let f=n.subTree&&ol(n.subTree);if(f&&f.type!==Re&&!xt(c,f)&&yu(n).type!==Re){let h=js(f,a,s,n);if(Rn(f,h),l==="out-in"&&c.type!==Re)return s.isLeaving=!0,h.afterLeave=()=>{s.isLeaving=!1,n.job.flags&8||n.update(),delete h.afterLeave,f=void 0},xi(o);l==="in-out"&&c.type!==Re?h.delayLeave=(p,_,x)=>{const A=Au(s,f);A[String(f.key)]=f,p[Jt]=()=>{_(),p[Jt]=void 0,delete d.delayedLeave,f=void 0},d.delayedLeave=()=>{x(),delete d.delayedLeave,f=void 0}}:f=void 0}else f&&(f=void 0);return o}}};function bu(e){let t=e[0];if(e.length>1){for(const n of e)if(n.type!==Re){t=n;break}}return t}const Xm=zm;function Au(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 js(e,t,n,s,r){const{appear:o,mode:a,persisted:l=!1,onBeforeEnter:c,onEnter:d,onAfterEnter:f,onEnterCancelled:h,onBeforeLeave:p,onLeave:_,onAfterLeave:x,onLeaveCancelled:A,onBeforeAppear:R,onAppear:P,onAfterAppear:H,onAppearCancelled:F}=t,k=String(e.key),b=Au(n,e),y=(T,S)=>{T&&bt(T,s,9,S)},O=(T,S)=>{const K=S[1];y(T,S),se(T)?T.every(B=>B.length<=1)&&K():T.length<=1&&K()},w={mode:a,persisted:l,beforeEnter(T){let S=c;if(!n.isMounted)if(o)S=R||c;else return;T[Jt]&&T[Jt](!0);const K=b[k];K&&xt(e,K)&&K.el[Jt]&&K.el[Jt](),y(S,[T])},enter(T){let S=d,K=f,B=h;if(!n.isMounted)if(o)S=P||d,K=H||f,B=F||h;else return;let Q=!1;const oe=T[mr]=de=>{Q||(Q=!0,de?y(B,[T]):y(K,[T]),w.delayedLeave&&w.delayedLeave(),T[mr]=void 0)};S?O(S,[T,oe]):oe()},leave(T,S){const K=String(e.key);if(T[mr]&&T[mr](!0),n.isUnmounting)return S();y(p,[T]);let B=!1;const Q=T[Jt]=oe=>{B||(B=!0,S(),oe?y(A,[T]):y(x,[T]),T[Jt]=void 0,b[K]===e&&delete b[K])};b[K]=e,_?O(_,[T,Q]):Q()},clone(T){const S=js(T,t,n,s,r);return r&&r(S),S}};return w}function xi(e){if(Qs(e))return e=on(e),e.children=null,e}function ol(e){if(!Qs(e))return gu(e.type)&&e.children?bu(e.children):e;if(e.component)return e.component.subTree;const{shapeFlag:t,children:n}=e;if(n){if(t&16)return n[0];if(t&32&&ie(n.default))return n.default()}}function Rn(e,t){e.shapeFlag&6&&e.component?(e.transition=t,Rn(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 Ls(e,t,n,s,r=!1){if(se(e)){e.forEach((x,A)=>Ls(x,t&&(se(t)?t[A]:t),n,s,r));return}if(Jn(s)&&!r){s.shapeFlag&512&&s.type.__asyncResolved&&s.component.subTree.component&&Ls(e,t,n,s.component.subTree);return}const o=s.shapeFlag&4?ni(s.component):s.el,a=r?null:o,{i:l,r:c}=e,d=t&&t.r,f=l.refs===me?l.refs={}:l.refs,h=l.setupState,p=fe(h),_=h===me?()=>!1:x=>ge(p,x);if(d!=null&&d!==c&&(ye(d)?(f[d]=null,_(d)&&(h[d]=null)):Ae(d)&&(d.value=null)),ie(c))Xs(c,l,12,[a,f]);else{const x=ye(c),A=Ae(c);if(x||A){const R=()=>{if(e.f){const P=x?_(c)?h[c]:f[c]:c.value;r?se(P)&&So(P,o):se(P)?P.includes(o)||P.push(o):x?(f[c]=[o],_(c)&&(h[c]=f[c])):(c.value=[o],e.k&&(f[e.k]=c.value))}else x?(f[c]=a,_(c)&&(h[c]=a)):A&&(c.value=a,e.k&&(f[e.k]=a))};a?(R.id=-1,Ue(R,n)):R()}}}const al=e=>e.nodeType===8;Gr().requestIdleCallback;Gr().cancelIdleCallback;function Qm(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 Jn=e=>!!e.type.__asyncLoader;/*! #__NO_SIDE_EFFECTS__ */function jy(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,_()),_=()=>{let x;return d||(x=d=t().catch(A=>{if(A=A instanceof Error?A:new Error(String(A)),c)return new Promise((R,P)=>{c(A,()=>R(p()),()=>P(A),h+1)});throw A}).then(A=>x!==d&&d?d:(A&&(A.__esModule||A[Symbol.toStringTag]==="Module")&&(A=A.default),f=A,A)))};return Fo({name:"AsyncComponentWrapper",__asyncLoader:_,__asyncHydrate(x,A,R){const P=o?()=>{const F=o(()=>{R()},k=>Qm(x,k));F&&(A.bum||(A.bum=[])).push(F),(A.u||(A.u=[])).push(()=>!0)}:R;f?P():_().then(()=>!A.isUnmounted&&P())},get __asyncResolved(){return f},setup(){const x=Oe;if(Ho(x),f)return()=>Ni(f,x);const A=F=>{d=null,ps(F,x,13,!s)};if(l&&x.suspense||as)return _().then(F=>()=>Ni(F,x)).catch(F=>(A(F),()=>s?Ee(s,{error:F}):null));const R=Cn(!1),P=Cn(),H=Cn(!!r);return r&&setTimeout(()=>{H.value=!1},r),a!=null&&setTimeout(()=>{if(!R.value&&!P.value){const F=new Error(`Async component timed out after ${a}ms.`);A(F),P.value=F}},a),_().then(()=>{R.value=!0,x.parent&&Qs(x.parent.vnode)&&x.parent.update()}).catch(F=>{A(F),P.value=F}),()=>{if(R.value&&f)return Ni(f,x);if(P.value&&s)return Ee(s,{error:P.value});if(n&&!H.value)return Ee(n)}}})}function Ni(e,t){const{ref:n,props:s,children:r,ce:o}=t.vnode,a=Ee(e,s,r);return a.ref=n,a.ce=o,delete t.vnode.ce,a}const Qs=e=>e.type.__isKeepAlive;function Jm(e,t){Tu(e,"a",t)}function Zm(e,t){Tu(e,"da",t)}function Tu(e,t,n=Oe){const s=e.__wdc||(e.__wdc=()=>{let r=n;for(;r;){if(r.isDeactivated)return;r=r.parent}return e()});if(Zr(t,s,n),n){let r=n.parent;for(;r&&r.parent;)Qs(r.parent.vnode)&&e_(s,t,n,r),r=r.parent}}function e_(e,t,n,s){const r=Zr(t,e,s,!0);jo(()=>{So(s[t],r)},n)}function Zr(e,t,n=Oe,s=!1){if(n){const r=n[e]||(n[e]=[]),o=t.__weh||(t.__weh=(...a)=>{Bt();const l=Dn(n),c=bt(t,n,e,a);return l(),jt(),c});return s?r.unshift(o):r.push(o),o}}const Kt=e=>(t,n=Oe)=>{(!as||e==="sp")&&Zr(e,(...s)=>t(...s),n)},t_=Kt("bm"),Bo=Kt("m"),wu=Kt("bu"),Cu=Kt("u"),Su=Kt("bum"),jo=Kt("um"),n_=Kt("sp"),s_=Kt("rtg"),r_=Kt("rtc");function i_(e,t=Oe){Zr("ec",e,t)}const Ko="components",o_="directives";function a_(e,t){return Wo(Ko,e,!0,t)||e}const Ou=Symbol.for("v-ndc");function l_(e){return ye(e)?Wo(Ko,e,!1)||e:e||Ou}function Ky(e){return Wo(o_,e)}function Wo(e,t,n=!0,s=!1){const r=xe||Oe;if(r){const o=r.type;if(e===Ko){const l=nv(o,!1);if(l&&(l===t||l===dt(t)||l===Yr(dt(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[dt(t)]||e[Yr(dt(t))])}function Wy(e,t,n,s){let r;const o=n,a=se(e);if(a||ye(e)){const l=a&&sn(e);let c=!1,d=!1;l&&(c=!ct(e),d=rn(e),e=Xr(e)),r=new Array(e.length);for(let f=0,h=e.length;ft(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 Yy(e,t,n={},s,r){if(xe.ce||xe.parent&&Jn(xe.parent)&&xe.parent.ce)return t!=="default"&&(n.name=t),Ot(),Ws(Be,null,[Ee("slot",n,s)],64);let o=e[t];o&&o._c&&(o._d=!1),Ot();const a=o&&xu(o(n)),l=n.key||a&&a.key,c=Ws(Be,{key:(l&&!yt(l)?l:`_${t}`)+(!a&&s?"_fb":"")},a||[],a&&e._===1?64:-2);return c.scopeId&&(c.slotScopeIds=[c.scopeId+"-s"]),o&&o._c&&(o._d=!0),c}function xu(e){return e.some(t=>os(t)?!(t.type===Re||t.type===Be&&!xu(t.children)):!0)?e:null}const qi=e=>e?zu(e)?ni(e):qi(e.parent):null,Is=Ne(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=>qi(e.parent),$root:e=>qi(e.root),$host:e=>e.ce,$emit:e=>e.emit,$options:e=>Ru(e),$forceUpdate:e=>e.f||(e.f=()=>{ko(e.update)}),$nextTick:e=>e.n||(e.n=Jr.bind(e.proxy)),$watch:e=>$_.bind(e)}),$i=(e,t)=>e!==me&&!e.__isScriptSetup&&ge(e,t),c_={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 _=a[t];if(_!==void 0)switch(_){case 1:return s[t];case 2:return r[t];case 4:return n[t];case 3:return o[t]}else{if($i(s,t))return a[t]=1,s[t];if(r!==me&&ge(r,t))return a[t]=2,r[t];if((d=e.propsOptions[0])&&ge(d,t))return a[t]=3,o[t];if(n!==me&&ge(n,t))return a[t]=4,n[t];zi&&(a[t]=0)}}const f=Is[t];let h,p;if(f)return t==="$attrs"&&He(e.attrs,"get",""),f(e);if((h=l.__cssModules)&&(h=h[t]))return h;if(n!==me&&ge(n,t))return a[t]=4,n[t];if(p=c.config.globalProperties,ge(p,t))return p[t]},set({_:e},t,n){const{data:s,setupState:r,ctx:o}=e;return $i(r,t)?(r[t]=n,!0):s!==me&&ge(s,t)?(s[t]=n,!0):ge(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!==me&&ge(e,a)||$i(t,a)||(l=o[0])&&ge(l,a)||ge(s,a)||ge(Is,a)||ge(r.config.globalProperties,a)},defineProperty(e,t,n){return n.get!=null?e._.accessCache[t]=0:ge(n,"value")&&this.set(e,t,n.value,null),Reflect.defineProperty(e,t,n)}};function Gy(){return Nu().slots}function qy(){return Nu().attrs}function Nu(){const e=gs();return e.setupContext||(e.setupContext=Qu(e))}function cl(e){return se(e)?e.reduce((t,n)=>(t[n]=null,t),{}):e}function zy(e){const t=gs();let n=e();return eo(),Oo(n)&&(n=n.catch(s=>{throw Dn(t),s})),[n,()=>Dn(t)]}let zi=!0;function u_(e){const t=Ru(e),n=e.proxy,s=e.ctx;zi=!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:_,updated:x,activated:A,deactivated:R,beforeDestroy:P,beforeUnmount:H,destroyed:F,unmounted:k,render:b,renderTracked:y,renderTriggered:O,errorCaptured:w,serverPrefetch:T,expose:S,inheritAttrs:K,components:B,directives:Q,filters:oe}=t;if(d&&f_(d,s,null),a)for(const ee in a){const ce=a[ee];ie(ce)&&(s[ee]=ce.bind(n))}if(r){const ee=r.call(n,n);_e(ee)&&(e.data=zs(ee))}if(zi=!0,o)for(const ee in o){const ce=o[ee],we=ie(ce)?ce.bind(n,n):ie(ce.get)?ce.get.bind(n,n):vt,je=!ie(ce)&&ie(ce.set)?ce.set.bind(n):vt,De=at({get:we,set:je});Object.defineProperty(s,ee,{enumerable:!0,configurable:!0,get:()=>De.value,set:be=>De.value=be})}if(l)for(const ee in l)$u(l[ee],s,n,ee);if(c){const ee=ie(c)?c.call(n):c;Reflect.ownKeys(ee).forEach(ce=>{Tr(ce,ee[ce])})}f&&ul(f,e,"c");function te(ee,ce){se(ce)?ce.forEach(we=>ee(we.bind(n))):ce&&ee(ce.bind(n))}if(te(t_,h),te(Bo,p),te(wu,_),te(Cu,x),te(Jm,A),te(Zm,R),te(i_,w),te(r_,y),te(s_,O),te(Su,H),te(jo,k),te(n_,T),se(S))if(S.length){const ee=e.exposed||(e.exposed={});S.forEach(ce=>{Object.defineProperty(ee,ce,{get:()=>n[ce],set:we=>n[ce]=we})})}else e.exposed||(e.exposed={});b&&e.render===vt&&(e.render=b),K!=null&&(e.inheritAttrs=K),B&&(e.components=B),Q&&(e.directives=Q),T&&Ho(e)}function f_(e,t,n=vt){se(e)&&(e=Xi(e));for(const s in e){const r=e[s];let o;_e(r)?"default"in r?o=ut(r.from||s,r.default,!0):o=ut(r.from||s):o=ut(r),Ae(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){bt(se(e)?e.map(s=>s.bind(t.proxy)):e.bind(t.proxy),t,n)}function $u(e,t,n,s){let r=s.includes(".")?ju(n,s):()=>n[s];if(ye(e)){const o=t[e];ie(o)&&On(r,o)}else if(ie(e))On(r,e.bind(n));else if(_e(e))if(se(e))e.forEach(o=>$u(o,t,n,s));else{const o=ie(e.handler)?e.handler.bind(n):t[e.handler];ie(o)&&On(r,o,e)}}function Ru(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=>Pr(c,d,a,!0)),Pr(c,t,a)),_e(t)&&o.set(t,c),c}function Pr(e,t,n,s=!1){const{mixins:r,extends:o}=t;o&&Pr(e,o,n,!0),r&&r.forEach(a=>Pr(e,a,n,!0));for(const a in t)if(!(s&&a==="expose")){const l=d_[a]||n&&n[a];e[a]=l?l(e[a],t[a]):t[a]}return e}const d_={data:fl,props:dl,emits:dl,methods:Ss,computed:Ss,beforeCreate:We,created:We,beforeMount:We,mounted:We,beforeUpdate:We,updated:We,beforeDestroy:We,beforeUnmount:We,destroyed:We,unmounted:We,activated:We,deactivated:We,errorCaptured:We,serverPrefetch:We,components:Ss,directives:Ss,watch:p_,provide:fl,inject:h_};function fl(e,t){return t?e?function(){return Ne(ie(e)?e.call(this,this):e,ie(t)?t.call(this,this):t)}:t:e}function h_(e,t){return Ss(Xi(e),Xi(t))}function Xi(e){if(se(e)){const t={};for(let n=0;n1)return n&&ie(t)?t.call(s&&s.proxy):t}}function __(){return!!(Oe||xe||Sn)}const Lu={},Iu=()=>Object.create(Lu),Pu=e=>Object.getPrototypeOf(e)===Lu;function v_(e,t,n,s=!1){const r={},o=Iu();e.propsDefaults=Object.create(null),Mu(e,t,r,o);for(const a in e.propsOptions[0])a in r||(r[a]=void 0);n?e.props=s?r:su(r):e.type.props?e.props=r:e.props=o,e.attrs=o}function E_(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,_]=ku(h,t,!0);Ne(a,p),_&&l.push(..._)};!n&&t.mixins.length&&t.mixins.forEach(f),e.extends&&f(e.extends),e.mixins&&e.mixins.forEach(f)}if(!o&&!c)return _e(e)&&s.set(e,zn),zn;if(se(o))for(let f=0;fe[0]==="_"||e==="$stable",Yo=e=>se(e)?e.map(_t):[_t(e)],b_=(e,t,n)=>{if(t._n)return t;const s=Yn((...r)=>Yo(t(...r)),n);return s._c=!1,s},Vu=(e,t,n)=>{const s=e._ctx;for(const r in e){if(Uo(r))continue;const o=e[r];if(ie(o))t[r]=b_(r,o,s);else if(o!=null){const a=Yo(o);t[r]=()=>a}}},Fu=(e,t)=>{const n=Yo(t);e.slots.default=()=>n},Hu=(e,t,n)=>{for(const s in t)(n||!Uo(s))&&(e[s]=t[s])},A_=(e,t,n)=>{const s=e.slots=Iu();if(e.vnode.shapeFlag&32){const r=t.__;r&&Ki(s,"__",r,!0);const o=t._;o?(Hu(s,t,n),n&&Ki(s,"_",o,!0)):Vu(t,s)}else t&&Fu(e,t)},T_=(e,t,n)=>{const{vnode:s,slots:r}=e;let o=!0,a=me;if(s.shapeFlag&32){const l=t._;l?n&&l===1?o=!1:Hu(r,t,n):(o=!t.$stable,Vu(t,r)),a=t}else t&&(Fu(e,t),a={default:1});if(o)for(const l in r)!Uo(l)&&a[l]==null&&delete r[l]},Ue=K_;function w_(e){return C_(e)}function C_(e,t){const n=Gr();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:_=vt,insertStaticContent:x}=e,A=(g,v,C,D=null,V=null,M=null,W=void 0,Y=null,N=!!v.dynamicChildren)=>{if(g===v)return;g&&!xt(g,v)&&(D=I(g),be(g,V,M,!0),g=null),v.patchFlag===-2&&(N=!1,v.dynamicChildren=null);const{type:j,ref:ne,shapeFlag:X}=v;switch(j){case ti:R(g,v,C,D);break;case Re:P(g,v,C,D);break;case wr:g==null&&H(v,C,D,W);break;case Be:B(g,v,C,D,V,M,W,Y,N);break;default:X&1?b(g,v,C,D,V,M,W,Y,N):X&6?Q(g,v,C,D,V,M,W,Y,N):(X&64||X&128)&&j.process(g,v,C,D,V,M,W,Y,N,J)}ne!=null&&V?Ls(ne,g&&g.ref,M,v||g,!v):ne==null&&g&&g.ref!=null&&Ls(g.ref,null,M,g,!0)},R=(g,v,C,D)=>{if(g==null)s(v.el=l(v.children),C,D);else{const V=v.el=g.el;v.children!==g.children&&d(V,v.children)}},P=(g,v,C,D)=>{g==null?s(v.el=c(v.children||""),C,D):v.el=g.el},H=(g,v,C,D)=>{[g.el,g.anchor]=x(g.children,v,C,D,g.el,g.anchor)},F=({el:g,anchor:v},C,D)=>{let V;for(;g&&g!==v;)V=p(g),s(g,C,D),g=V;s(v,C,D)},k=({el:g,anchor:v})=>{let C;for(;g&&g!==v;)C=p(g),r(g),g=C;r(v)},b=(g,v,C,D,V,M,W,Y,N)=>{v.type==="svg"?W="svg":v.type==="math"&&(W="mathml"),g==null?y(v,C,D,V,M,W,Y,N):T(g,v,V,M,W,Y,N)},y=(g,v,C,D,V,M,W,Y)=>{let N,j;const{props:ne,shapeFlag:X,transition:Z,dirs:re}=g;if(N=g.el=a(g.type,M,ne&&ne.is,ne),X&8?f(N,g.children):X&16&&w(g.children,N,null,D,V,Ri(g,M),W,Y),re&&En(g,null,D,"created"),O(N,g,g.scopeId,W,D),ne){for(const he in ne)he!=="value"&&!Ns(he)&&o(N,he,null,ne[he],M,D);"value"in ne&&o(N,"value",null,ne.value,M),(j=ne.onVnodeBeforeMount)&&wt(j,D,g)}re&&En(g,null,D,"beforeMount");const ae=S_(V,Z);ae&&Z.beforeEnter(N),s(N,v,C),((j=ne&&ne.onVnodeMounted)||ae||re)&&Ue(()=>{j&&wt(j,D,g),ae&&Z.enter(N),re&&En(g,null,D,"mounted")},V)},O=(g,v,C,D,V)=>{if(C&&_(g,C),D)for(let M=0;M{for(let j=N;j{const Y=v.el=g.el;let{patchFlag:N,dynamicChildren:j,dirs:ne}=v;N|=g.patchFlag&16;const X=g.props||me,Z=v.props||me;let re;if(C&&yn(C,!1),(re=Z.onVnodeBeforeUpdate)&&wt(re,C,v,g),ne&&En(v,g,C,"beforeUpdate"),C&&yn(C,!0),(X.innerHTML&&Z.innerHTML==null||X.textContent&&Z.textContent==null)&&f(Y,""),j?S(g.dynamicChildren,j,Y,C,D,Ri(v,V),M):W||ce(g,v,Y,null,C,D,Ri(v,V),M,!1),N>0){if(N&16)K(Y,X,Z,C,V);else if(N&2&&X.class!==Z.class&&o(Y,"class",null,Z.class,V),N&4&&o(Y,"style",X.style,Z.style,V),N&8){const ae=v.dynamicProps;for(let he=0;he{re&&wt(re,C,v,g),ne&&En(v,g,C,"updated")},D)},S=(g,v,C,D,V,M,W)=>{for(let Y=0;Y{if(v!==C){if(v!==me)for(const M in v)!Ns(M)&&!(M in C)&&o(g,M,v[M],null,V,D);for(const M in C){if(Ns(M))continue;const W=C[M],Y=v[M];W!==Y&&M!=="value"&&o(g,M,Y,W,V,D)}"value"in C&&o(g,"value",v.value,C.value,V)}},B=(g,v,C,D,V,M,W,Y,N)=>{const j=v.el=g?g.el:l(""),ne=v.anchor=g?g.anchor:l("");let{patchFlag:X,dynamicChildren:Z,slotScopeIds:re}=v;re&&(Y=Y?Y.concat(re):re),g==null?(s(j,C,D),s(ne,C,D),w(v.children||[],C,ne,V,M,W,Y,N)):X>0&&X&64&&Z&&g.dynamicChildren?(S(g.dynamicChildren,Z,C,V,M,W,Y),(v.key!=null||V&&v===V.subTree)&&Go(g,v,!0)):ce(g,v,C,ne,V,M,W,Y,N)},Q=(g,v,C,D,V,M,W,Y,N)=>{v.slotScopeIds=Y,g==null?v.shapeFlag&512?V.ctx.activate(v,C,D,W,N):oe(v,C,D,V,M,W,N):de(g,v,N)},oe=(g,v,C,D,V,M,W)=>{const Y=g.component=J_(g,D,V);if(Qs(g)&&(Y.ctx.renderer=J),Z_(Y,!1,W),Y.asyncDep){if(V&&V.registerDep(Y,te,W),!g.el){const N=Y.subTree=Ee(Re);P(null,N,v,C)}}else te(Y,g,v,C,V,M,W)},de=(g,v,C)=>{const D=v.component=g.component;if(M_(g,v,C))if(D.asyncDep&&!D.asyncResolved){ee(D,v,C);return}else D.next=v,D.update();else v.el=g.el,D.vnode=v},te=(g,v,C,D,V,M,W)=>{const Y=()=>{if(g.isMounted){let{next:X,bu:Z,u:re,parent:ae,vnode:he}=g;{const tt=Bu(g);if(tt){X&&(X.el=he.el,ee(g,X,W)),tt.asyncDep.then(()=>{g.isUnmounted||Y()});return}}let ue=X,Ce;yn(g,!1),X?(X.el=he.el,ee(g,X,W)):X=he,Z&&br(Z),(Ce=X.props&&X.props.onVnodeBeforeUpdate)&&wt(Ce,ae,X,he),yn(g,!0);const Me=gl(g),ht=g.subTree;g.subTree=Me,A(ht,Me,h(ht.el),I(ht),g,V,M),X.el=Me.el,ue===null&&zo(g,Me.el),re&&Ue(re,V),(Ce=X.props&&X.props.onVnodeUpdated)&&Ue(()=>wt(Ce,ae,X,he),V)}else{let X;const{el:Z,props:re}=v,{bm:ae,m:he,parent:ue,root:Ce,type:Me}=g,ht=Jn(v);yn(g,!1),ae&&br(ae),!ht&&(X=re&&re.onVnodeBeforeMount)&&wt(X,ue,v),yn(g,!0);{Ce.ce&&Ce.ce._def.shadowRoot!==!1&&Ce.ce._injectChildStyle(Me);const tt=g.subTree=gl(g);A(null,tt,C,D,g,V,M),v.el=tt.el}if(he&&Ue(he,V),!ht&&(X=re&&re.onVnodeMounted)){const tt=v;Ue(()=>wt(X,ue,tt),V)}(v.shapeFlag&256||ue&&Jn(ue.vnode)&&ue.vnode.shapeFlag&256)&&g.a&&Ue(g.a,V),g.isMounted=!0,v=C=D=null}};g.scope.on();const N=g.effect=new Kc(Y);g.scope.off();const j=g.update=N.run.bind(N),ne=g.job=N.runIfDirty.bind(N);ne.i=g,ne.id=g.uid,N.scheduler=()=>ko(ne),yn(g,!0),j()},ee=(g,v,C)=>{v.component=g;const D=g.vnode.props;g.vnode=v,g.next=null,E_(g,v.props,D,C),T_(g,v.children,C),Bt(),nl(g),jt()},ce=(g,v,C,D,V,M,W,Y,N=!1)=>{const j=g&&g.children,ne=g?g.shapeFlag:0,X=v.children,{patchFlag:Z,shapeFlag:re}=v;if(Z>0){if(Z&128){je(j,X,C,D,V,M,W,Y,N);return}else if(Z&256){we(j,X,C,D,V,M,W,Y,N);return}}re&8?(ne&16&&Te(j,V,M),X!==j&&f(C,X)):ne&16?re&16?je(j,X,C,D,V,M,W,Y,N):Te(j,V,M,!0):(ne&8&&f(C,""),re&16&&w(X,C,D,V,M,W,Y,N))},we=(g,v,C,D,V,M,W,Y,N)=>{g=g||zn,v=v||zn;const j=g.length,ne=v.length,X=Math.min(j,ne);let Z;for(Z=0;Zne?Te(g,V,M,!0,!1,X):w(v,C,D,V,M,W,Y,N,X)},je=(g,v,C,D,V,M,W,Y,N)=>{let j=0;const ne=v.length;let X=g.length-1,Z=ne-1;for(;j<=X&&j<=Z;){const re=g[j],ae=v[j]=N?Zt(v[j]):_t(v[j]);if(xt(re,ae))A(re,ae,C,null,V,M,W,Y,N);else break;j++}for(;j<=X&&j<=Z;){const re=g[X],ae=v[Z]=N?Zt(v[Z]):_t(v[Z]);if(xt(re,ae))A(re,ae,C,null,V,M,W,Y,N);else break;X--,Z--}if(j>X){if(j<=Z){const re=Z+1,ae=reZ)for(;j<=X;)be(g[j],V,M,!0),j++;else{const re=j,ae=j,he=new Map;for(j=ae;j<=Z;j++){const ke=v[j]=N?Zt(v[j]):_t(v[j]);ke.key!=null&&he.set(ke.key,j)}let ue,Ce=0;const Me=Z-ae+1;let ht=!1,tt=0;const fn=new Array(Me);for(j=0;j=Me){be(ke,V,M,!0);continue}let nt;if(ke.key!=null)nt=he.get(ke.key);else for(ue=ae;ue<=Z;ue++)if(fn[ue-ae]===0&&xt(ke,v[ue])){nt=ue;break}nt===void 0?be(ke,V,M,!0):(fn[nt-ae]=j+1,nt>=tt?tt=nt:ht=!0,A(ke,v[nt],C,null,V,M,W,Y,N),Ce++)}const Js=ht?O_(fn):zn;for(ue=Js.length-1,j=Me-1;j>=0;j--){const ke=ae+j,nt=v[ke],Wt=ke+1{const{el:M,type:W,transition:Y,children:N,shapeFlag:j}=g;if(j&6){De(g.component.subTree,v,C,D);return}if(j&128){g.suspense.move(v,C,D);return}if(j&64){W.move(g,v,C,J);return}if(W===Be){s(M,v,C);for(let X=0;XY.enter(M),V);else{const{leave:X,delayLeave:Z,afterLeave:re}=Y,ae=()=>{g.ctx.isUnmounted?r(M):s(M,v,C)},he=()=>{X(M,()=>{ae(),re&&re()})};Z?Z(M,ae,he):he()}else s(M,v,C)},be=(g,v,C,D=!1,V=!1)=>{const{type:M,props:W,ref:Y,children:N,dynamicChildren:j,shapeFlag:ne,patchFlag:X,dirs:Z,cacheIndex:re}=g;if(X===-2&&(V=!1),Y!=null&&(Bt(),Ls(Y,null,C,g,!0),jt()),re!=null&&(v.renderCache[re]=void 0),ne&256){v.ctx.deactivate(g);return}const ae=ne&1&&Z,he=!Jn(g);let ue;if(he&&(ue=W&&W.onVnodeBeforeUnmount)&&wt(ue,v,g),ne&6)Pe(g.component,C,D);else{if(ne&128){g.suspense.unmount(C,D);return}ae&&En(g,null,v,"beforeUnmount"),ne&64?g.type.remove(g,v,C,J,D):j&&!j.hasOnce&&(M!==Be||X>0&&X&64)?Te(j,v,C,!1,!0):(M===Be&&X&384||!V&&ne&16)&&Te(N,v,C),D&&Qe(g)}(he&&(ue=W&&W.onVnodeUnmounted)||ae)&&Ue(()=>{ue&&wt(ue,v,g),ae&&En(g,null,v,"unmounted")},C)},Qe=g=>{const{type:v,el:C,anchor:D,transition:V}=g;if(v===Be){Ke(C,D);return}if(v===wr){k(g);return}const M=()=>{r(C),V&&!V.persisted&&V.afterLeave&&V.afterLeave()};if(g.shapeFlag&1&&V&&!V.persisted){const{leave:W,delayLeave:Y}=V,N=()=>W(C,M);Y?Y(g.el,M,N):N()}else M()},Ke=(g,v)=>{let C;for(;g!==v;)C=p(g),r(g),g=C;r(v)},Pe=(g,v,C)=>{const{bum:D,scope:V,job:M,subTree:W,um:Y,m:N,a:j,parent:ne,slots:{__:X}}=g;pl(N),pl(j),D&&br(D),ne&&se(X)&&X.forEach(Z=>{ne.renderCache[Z]=void 0}),V.stop(),M&&(M.flags|=8,be(W,g,v,C)),Y&&Ue(Y,v),Ue(()=>{g.isUnmounted=!0},v),v&&v.pendingBranch&&!v.isUnmounted&&g.asyncDep&&!g.asyncResolved&&g.suspenseId===v.pendingId&&(v.deps--,v.deps===0&&v.resolve())},Te=(g,v,C,D=!1,V=!1,M=0)=>{for(let W=M;W{if(g.shapeFlag&6)return I(g.component.subTree);if(g.shapeFlag&128)return g.suspense.next();const v=p(g.anchor||g.el),C=v&&v[pu];return C?p(C):v};let q=!1;const z=(g,v,C)=>{g==null?v._vnode&&be(v._vnode,null,null,!0):A(v._vnode||null,g,v,null,null,null,C),v._vnode=g,q||(q=!0,nl(),fu(),q=!1)},J={p:A,um:be,m:De,r:Qe,mt:oe,mc:w,pc:ce,pbc:S,n:I,o:e};return{render:z,hydrate:void 0,createApp:m_(z)}}function Ri({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 S_(e,t){return(!e||e&&!e.pendingBranch)&&t&&!t.persisted}function Go(e,t,n=!1){const s=e.children,r=t.children;if(se(s)&&se(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 Bu(e){const t=e.subTree.component;if(t)return t.asyncDep&&!t.asyncResolved?t:Bu(t)}function pl(e){if(e)for(let t=0;tut(x_);function Xy(e,t){return qo(e,null,t)}function On(e,t,n){return qo(e,t,n)}function qo(e,t,n=me){const{immediate:s,deep:r,flush:o,once:a}=n,l=Ne({},n),c=t&&s||!t&&o!=="post";let d;if(as){if(o==="sync"){const _=N_();d=_.__watcherHandles||(_.__watcherHandles=[])}else if(!c){const _=()=>{};return _.stop=vt,_.resume=vt,_.pause=vt,_}}const f=Oe;l.call=(_,x,A)=>bt(_,f,x,A);let h=!1;o==="post"?l.scheduler=_=>{Ue(_,f&&f.suspense)}:o!=="sync"&&(h=!0,l.scheduler=(_,x)=>{x?_():ko(_)}),l.augmentJob=_=>{t&&(_.flags|=4),h&&(_.flags|=2,f&&(_.id=f.uid,_.i=f))};const p=Um(e,t,l);return as&&(d?d.push(p):c&&p()),p}function $_(e,t,n){const s=this.proxy,r=ye(e)?e.includes(".")?ju(s,e):()=>s[e]:e.bind(s,s);let o;ie(t)?o=t:(o=t.handler,n=t);const a=Dn(this),l=qo(r,o.bind(s),n);return a(),l}function ju(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[`${dt(t)}Modifiers`]||e[`${cn(t)}Modifiers`];function D_(e,t,...n){if(e.isUnmounted)return;const s=e.vnode.props||me;let r=n;const o=t.startsWith("update:"),a=o&&R_(s,t.slice(7));a&&(a.trim&&(r=n.map(f=>ye(f)?f.trim():f)),a.number&&(r=n.map(xr)));let l,c=s[l=Ti(t)]||s[l=Ti(dt(t))];!c&&o&&(c=s[l=Ti(cn(t))]),c&&bt(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,bt(d,e,6,r)}}function Ku(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=Ku(d,t,!0);f&&(l=!0,Ne(a,f))};!n&&t.mixins.length&&t.mixins.forEach(c),e.extends&&c(e.extends),e.mixins&&e.mixins.forEach(c)}return!o&&!l?(_e(e)&&s.set(e,null),null):(se(o)?o.forEach(c=>a[c]=null):Ne(a,o),_e(e)&&s.set(e,a),a)}function ei(e,t){return!e||!Wr(t)?!1:(t=t.slice(2).replace(/Once$/,""),ge(e,t[0].toLowerCase()+t.slice(1))||ge(e,cn(t))||ge(e,t))}function gl(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:_,ctx:x,inheritAttrs:A}=e,R=Ir(e);let P,H;try{if(n.shapeFlag&4){const k=r||s,b=k;P=_t(d.call(b,k,f,h,_,p,x)),H=l}else{const k=t;P=_t(k.length>1?k(h,{attrs:l,slots:a,emit:c}):k(h,null)),H=t.props?l:I_(l)}}catch(k){Ps.length=0,ps(k,e,1),P=Ee(Re)}let F=P;if(H&&A!==!1){const k=Object.keys(H),{shapeFlag:b}=F;k.length&&b&7&&(o&&k.some(Co)&&(H=P_(H,o)),F=on(F,H,!1,!0))}return n.dirs&&(F=on(F,null,!1,!0),F.dirs=F.dirs?F.dirs.concat(n.dirs):n.dirs),n.transition&&Rn(F,n.transition),P=F,Ir(R),P}function L_(e,t=!0){let n;for(let s=0;s{let t;for(const n in e)(n==="class"||n==="style"||Wr(n))&&((t||(t={}))[n]=e[n]);return t},P_=(e,t)=>{const n={};for(const s in e)(!Co(s)||!(s.slice(9)in t))&&(n[s]=e[s]);return n};function M_(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?ml(s,a,d):!!a;if(c&8){const f=t.dynamicProps;for(let h=0;he.__isSuspense;let Ji=0;const k_={name:"Suspense",__isSuspense:!0,process(e,t,n,s,r,o,a,l,c,d){if(e==null)F_(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}H_(e,t,n,s,r,a,l,c,d)}},hydrate:B_,normalize:j_},V_=k_;function Ks(e,t){const n=e.props&&e.props[t];ie(n)&&n()}function F_(e,t,n,s,r,o,a,l,c){const{p:d,o:{createElement:f}}=c,h=f("div"),p=e.suspense=Uu(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?(Ks(e,"onPending"),Ks(e,"onFallback"),d(null,e.ssFallback,t,n,s,null,o,a),Zn(p,e.ssFallback)):p.resolve(!1,!0)}function H_(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,_=t.ssFallback,{activeBranch:x,pendingBranch:A,isInFallback:R,isHydrating:P}=h;if(A)h.pendingBranch=p,xt(p,A)?(c(A,p,h.hiddenContainer,null,r,h,o,a,l),h.deps<=0?h.resolve():R&&(P||(c(x,_,n,s,r,null,o,a,l),Zn(h,_)))):(h.pendingId=Ji++,P?(h.isHydrating=!1,h.activeBranch=A):d(A,r,h),h.deps=0,h.effects.length=0,h.hiddenContainer=f("div"),R?(c(null,p,h.hiddenContainer,null,r,h,o,a,l),h.deps<=0?h.resolve():(c(x,_,n,s,r,null,o,a,l),Zn(h,_))):x&&xt(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&&xt(p,x))c(x,p,n,s,r,h,o,a,l),Zn(h,p);else if(Ks(t,"onPending"),h.pendingBranch=p,p.shapeFlag&512?h.pendingId=p.component.suspenseId:h.pendingId=Ji++,c(null,p,h.hiddenContainer,null,r,h,o,a,l),h.deps<=0)h.resolve();else{const{timeout:H,pendingId:F}=h;H>0?setTimeout(()=>{h.pendingId===F&&h.fallback(_)},H):H===0&&h.fallback(_)}}function Uu(e,t,n,s,r,o,a,l,c,d,f=!1){const{p:h,m:p,um:_,n:x,o:{parentNode:A,remove:R}}=d;let P;const H=W_(e);H&&t&&t.pendingBranch&&(P=t.pendingId,t.deps++);const F=e.props?Mc(e.props.timeout):void 0,k=o,b={vnode:e,parent:t,parentComponent:n,namespace:a,container:s,hiddenContainer:r,deps:0,pendingId:Ji++,timeout:typeof F=="number"?F:-1,activeBranch:null,pendingBranch:null,isInFallback:!f,isHydrating:f,isUnmounted:!1,effects:[],resolve(y=!1,O=!1){const{vnode:w,activeBranch:T,pendingBranch:S,pendingId:K,effects:B,parentComponent:Q,container:oe}=b;let de=!1;b.isHydrating?b.isHydrating=!1:y||(de=T&&S.transition&&S.transition.mode==="out-in",de&&(T.transition.afterLeave=()=>{K===b.pendingId&&(p(S,oe,o===k?x(T):o,0),Lr(B))}),T&&(A(T.el)===oe&&(o=x(T)),_(T,Q,b,!0)),de||p(S,oe,o,0)),Zn(b,S),b.pendingBranch=null,b.isInFallback=!1;let te=b.parent,ee=!1;for(;te;){if(te.pendingBranch){te.effects.push(...B),ee=!0;break}te=te.parent}!ee&&!de&&Lr(B),b.effects=[],H&&t&&t.pendingBranch&&P===t.pendingId&&(t.deps--,t.deps===0&&!O&&t.resolve()),Ks(w,"onResolve")},fallback(y){if(!b.pendingBranch)return;const{vnode:O,activeBranch:w,parentComponent:T,container:S,namespace:K}=b;Ks(O,"onFallback");const B=x(w),Q=()=>{b.isInFallback&&(h(null,y,S,B,T,null,K,l,c),Zn(b,y))},oe=y.transition&&y.transition.mode==="out-in";oe&&(w.transition.afterLeave=Q),b.isInFallback=!0,_(w,T,null,!0),oe||Q()},move(y,O,w){b.activeBranch&&p(b.activeBranch,y,O,w),b.container=y},next(){return b.activeBranch&&x(b.activeBranch)},registerDep(y,O,w){const T=!!b.pendingBranch;T&&b.deps++;const S=y.vnode.el;y.asyncDep.catch(K=>{ps(K,y,0)}).then(K=>{if(y.isUnmounted||b.isUnmounted||b.pendingId!==y.suspenseId)return;y.asyncResolved=!0;const{vnode:B}=y;to(y,K),S&&(B.el=S);const Q=!S&&y.subTree.el;O(y,B,A(S||y.subTree.el),S?null:x(y.subTree),b,a,w),Q&&R(Q),zo(y,B.el),T&&--b.deps===0&&b.resolve()})},unmount(y,O){b.isUnmounted=!0,b.activeBranch&&_(b.activeBranch,n,y,O),b.pendingBranch&&_(b.pendingBranch,n,y,O)}};return b}function B_(e,t,n,s,r,o,a,l,c){const d=t.suspense=Uu(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 j_(e){const{shapeFlag:t,children:n}=e,s=t&32;e.ssContent=_l(s?n.default:n),e.ssFallback=s?_l(n.fallback):Ee(Re)}function _l(e){let t;if(ie(e)){const n=is&&e._c;n&&(e._d=!1,Ot()),e=e(),n&&(e._d=!0,t=Xe,Yu())}return se(e)&&(e=L_(e)),e=_t(e),t&&!e.dynamicChildren&&(e.dynamicChildren=t.filter(n=>n!==e)),e}function K_(e,t){t&&t.pendingBranch?se(e)?t.effects.push(...e):t.effects.push(e):Lr(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,zo(s,r))}function W_(e){const t=e.props&&e.props.suspensible;return t!=null&&t!==!1}const Be=Symbol.for("v-fgt"),ti=Symbol.for("v-txt"),Re=Symbol.for("v-cmt"),wr=Symbol.for("v-stc"),Ps=[];let Xe=null;function Ot(e=!1){Ps.push(Xe=e?null:[])}function Yu(){Ps.pop(),Xe=Ps[Ps.length-1]||null}let is=1;function vl(e,t=!1){is+=e,e<0&&Xe&&t&&(Xe.hasOnce=!0)}function Gu(e){return e.dynamicChildren=is>0?Xe||zn:null,Yu(),is>0&&Xe&&Xe.push(e),e}function _r(e,t,n,s,r,o){return Gu(qn(e,t,n,s,r,o,!0))}function Ws(e,t,n,s,r){return Gu(Ee(e,t,n,s,r,!0))}function os(e){return e?e.__v_isVNode===!0:!1}function xt(e,t){return e.type===t.type&&e.key===t.key}const qu=({key:e})=>e??null,Cr=({ref:e,ref_key:t,ref_for:n})=>(typeof e=="number"&&(e=""+e),e!=null?ye(e)||Ae(e)||ie(e)?{i:xe,r:e,k:t,f:!!n}:e:null);function qn(e,t=null,n=null,s=0,r=null,o=e===Be?0:1,a=!1,l=!1){const c={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&qu(t),ref:t&&Cr(t),scopeId:hu,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:xe};return l?(Xo(c,n),o&128&&e.normalize(c)):n&&(c.shapeFlag|=ye(n)?8:16),is>0&&!a&&Xe&&(c.patchFlag>0||o&6)&&c.patchFlag!==32&&Xe.push(c),c}const Ee=U_;function U_(e,t=null,n=null,s=0,r=null,o=!1){if((!e||e===Ou)&&(e=Re),os(e)){const l=on(e,t,!0);return n&&Xo(l,n),is>0&&!o&&Xe&&(l.shapeFlag&6?Xe[Xe.indexOf(e)]=l:Xe.push(l)),l.patchFlag=-2,l}if(sv(e)&&(e=e.__vccOpts),t){t=Y_(t);let{class:l,style:c}=t;l&&!ye(l)&&(t.class=zr(l)),_e(c)&&(Mo(c)&&!se(c)&&(c=Ne({},c)),t.style=qr(c))}const a=ye(e)?1:Wu(e)?128:gu(e)?64:_e(e)?4:ie(e)?2:0;return qn(e,t,n,s,r,a,o,!0)}function Y_(e){return e?Mo(e)||Pu(e)?Ne({},e):e:null}function on(e,t,n=!1,s=!1){const{props:r,ref:o,patchFlag:a,children:l,transition:c}=e,d=t?z_(r||{},t):r,f={__v_isVNode:!0,__v_skip:!0,type:e.type,props:d,key:d&&qu(d),ref:t&&t.ref?n&&o?se(o)?o.concat(Cr(t)):[o,Cr(t)]:Cr(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!==Be?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&&on(e.ssContent),ssFallback:e.ssFallback&&on(e.ssFallback),el:e.el,anchor:e.anchor,ctx:e.ctx,ce:e.ce};return c&&s&&Rn(f,c.clone(f)),f}function G_(e=" ",t=0){return Ee(ti,null,e,t)}function q_(e="",t=!1){return t?(Ot(),Ws(Re,null,e)):Ee(Re,null,e)}function _t(e){return e==null||typeof e=="boolean"?Ee(Re):se(e)?Ee(Be,null,e.slice()):os(e)?Zt(e):Ee(ti,null,String(e))}function Zt(e){return e.el===null&&e.patchFlag!==-1||e.memo?e:on(e)}function Xo(e,t){let n=0;const{shapeFlag:s}=e;if(t==null)t=null;else if(se(t))n=16;else if(typeof t=="object")if(s&65){const r=t.default;r&&(r._c&&(r._d=!1),Xo(e,r()),r._c&&(r._d=!0));return}else{n=32;const r=t._;!r&&!Pu(t)?t._ctx=xe:r===3&&xe&&(xe.slots._===1?t._=1:(t._=2,e.patchFlag|=1024))}else ie(t)?(t={default:t,_ctx:xe},n=32):(t=String(t),s&64?(n=16,t=[G_(t)]):n=8);e.children=t,e.shapeFlag|=n}function z_(...e){const t={};for(let n=0;nOe||xe;let Mr,Zi;{const e=Gr(),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)}};Mr=t("__VUE_INSTANCE_SETTERS__",n=>Oe=n),Zi=t("__VUE_SSR_SETTERS__",n=>as=n)}const Dn=e=>{const t=Oe;return Mr(e),e.scope.on(),()=>{e.scope.off(),Mr(t)}},eo=()=>{Oe&&Oe.scope.off(),Mr(null)};function zu(e){return e.vnode.shapeFlag&4}let as=!1;function Z_(e,t=!1,n=!1){t&&Zi(t);const{props:s,children:r}=e.vnode,o=zu(e);v_(e,s,o,t),A_(e,r,n||t);const a=o?ev(e,t):void 0;return t&&Zi(!1),a}function ev(e,t){const n=e.type;e.accessCache=Object.create(null),e.proxy=new Proxy(e.ctx,c_);const{setup:s}=n;if(s){Bt();const r=e.setupContext=s.length>1?Qu(e):null,o=Dn(e),a=Xs(s,e,0,[e.props,r]),l=Oo(a);if(jt(),o(),(l||e.sp)&&!Jn(e)&&Ho(e),l){if(a.then(eo,eo),t)return a.then(c=>{to(e,c)}).catch(c=>{ps(c,e,0)});e.asyncDep=a}else to(e,a)}else Xu(e)}function to(e,t,n){ie(t)?e.type.__ssrInlineRender?e.ssrRender=t:e.render=t:_e(t)&&(e.setupState=au(t)),Xu(e)}function Xu(e,t,n){const s=e.type;e.render||(e.render=s.render||vt);{const r=Dn(e);Bt();try{u_(e)}finally{jt(),r()}}}const tv={get(e,t){return He(e,"get",""),e[t]}};function Qu(e){const t=n=>{e.exposed=n||{}};return{attrs:new Proxy(e.attrs,tv),slots:e.slots,emit:e.emit,expose:t}}function ni(e){return e.exposed?e.exposeProxy||(e.exposeProxy=new Proxy(au(Qr(e.exposed)),{get(t,n){if(n in t)return t[n];if(n in Is)return Is[n](e)},has(t,n){return n in t||n in Is}})):e.proxy}function nv(e,t=!0){return ie(e)?e.displayName||e.name:e.name||t&&e.__name}function sv(e){return ie(e)&&"__vccOpts"in e}const at=(e,t)=>Km(e,t,as);function Qo(e,t,n){const s=arguments.length;return s===2?_e(t)&&!se(t)?os(t)?Ee(e,null,[t]):Ee(e,t):Ee(e,null,t):(s>3?n=Array.prototype.slice.call(arguments,2):s===3&&os(n)&&(n=[n]),Ee(e,t,n))}const rv="3.5.17";/** +**/function Xs(e,t,n,s){try{return s?e(...s):e()}catch(r){ps(r,t,n)}}function bt(e,t,n,s){if(ie(e)){const r=Xs(e,t,n,s);return r&&Oo(r)&&r.catch(o=>{ps(o,t,n)}),r}if(se(e)){const r=[];for(let o=0;o>>1,r=Ye[s],o=Bs(r);o=Bs(n)?Ye.push(e):Ye.splice(Gm(t),0,e),e.flags|=1,cu()}}function cu(){Dr||(Dr=lu.then(fu))}function Lr(e){se(e)?Qn.push(...e):Qt&&e.id===-1?Qt.splice(Un+1,0,e):e.flags&1||(Qn.push(e),e.flags|=1),cu()}function tl(e,t,n=St+1){for(;nBs(n)-Bs(s));if(Qn.length=0,Qt){Qt.push(...t);return}for(Qt=t,Un=0;Une.id==null?e.flags&2?-1:1/0:e.id;function fu(e){try{for(St=0;St{s._d&&_l(-1);const o=Ir(t);let a;try{a=e(...r)}finally{Ir(o),s._d&&_l(1)}return a};return s._n=!0,s._c=!0,s._d=!0,s}function Fy(e,t){if(xe===null)return e;const n=ni(xe),s=e.dirs||(e.dirs=[]);for(let r=0;re.__isTeleport,Ds=e=>e&&(e.disabled||e.disabled===""),nl=e=>e&&(e.defer||e.defer===""),sl=e=>typeof SVGElement<"u"&&e instanceof SVGElement,rl=e=>typeof MathMLElement=="function"&&e instanceof MathMLElement,Gi=(e,t)=>{const n=e&&e.to;return ye(n)?t?t(n):null:n},gu={name:"Teleport",__isTeleport:!0,process(e,t,n,s,r,o,a,l,c,d){const{mc:f,pc:h,pbc:p,o:{insert:_,querySelector:x,createText:A,createComment:R}}=d,P=Ds(t.props);let{shapeFlag:H,children:F,dynamicChildren:k}=t;if(e==null){const b=t.el=A(""),y=t.anchor=A("");_(b,n,s),_(y,n,s);const O=(T,S)=>{H&16&&(r&&r.isCE&&(r.ce._teleportTarget=T),f(F,T,S,r,o,a,l,c))},w=()=>{const T=t.target=Gi(t.props,x),S=mu(T,t,A,_);T&&(a!=="svg"&&sl(T)?a="svg":a!=="mathml"&&rl(T)&&(a="mathml"),P||(O(T,S),Ar(t,!1)))};P&&(O(n,y),Ar(t,!0)),nl(t.props)?(t.el.__isMounted=!1,Ue(()=>{w(),delete t.el.__isMounted},o)):w()}else{if(nl(t.props)&&e.el.__isMounted===!1){Ue(()=>{gu.process(e,t,n,s,r,o,a,l,c,d)},o);return}t.el=e.el,t.targetStart=e.targetStart;const b=t.anchor=e.anchor,y=t.target=e.target,O=t.targetAnchor=e.targetAnchor,w=Ds(e.props),T=w?n:y,S=w?b:O;if(a==="svg"||sl(y)?a="svg":(a==="mathml"||rl(y))&&(a="mathml"),k?(p(e.dynamicChildren,k,T,r,o,a,l),Go(e,t,!0)):c||h(e,t,T,S,r,o,a,l,!1),P)w?t.props&&e.props&&t.props.to!==e.props.to&&(t.props.to=e.props.to):gr(t,n,b,d,1);else if((t.props&&t.props.to)!==(e.props&&e.props.to)){const K=t.target=Gi(t.props,x);K&&gr(t,K,null,d,0)}else w&&gr(t,y,O,d,1);Ar(t,P)}},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 _=o||!Ds(p);for(let x=0;x{e.isMounted=!0}),Cu(()=>{e.isUnmounting=!0}),e}const it=[Function,Array],vu={mode:String,appear:Boolean,persisted:Boolean,onBeforeEnter:it,onEnter:it,onAfterEnter:it,onEnterCancelled:it,onBeforeLeave:it,onLeave:it,onAfterLeave:it,onLeaveCancelled:it,onBeforeAppear:it,onAppear:it,onAfterAppear:it,onAppearCancelled:it},Eu=e=>{const t=e.subTree;return t.component?Eu(t.component):t},zm={name:"BaseTransition",props:vu,setup(e,{slots:t}){const n=gs(),s=_u();return()=>{const r=t.default&&Vo(t.default(),!0);if(!r||!r.length)return;const o=yu(r),a=fe(e),{mode:l}=a;if(s.isLeaving)return xi(o);const c=il(o);if(!c)return xi(o);let d=js(c,a,s,n,h=>d=h);c.type!==Re&&Rn(c,d);let f=n.subTree&&il(n.subTree);if(f&&f.type!==Re&&!xt(c,f)&&Eu(n).type!==Re){let h=js(f,a,s,n);if(Rn(f,h),l==="out-in"&&c.type!==Re)return s.isLeaving=!0,h.afterLeave=()=>{s.isLeaving=!1,n.job.flags&8||n.update(),delete h.afterLeave,f=void 0},xi(o);l==="in-out"&&c.type!==Re?h.delayLeave=(p,_,x)=>{const A=bu(s,f);A[String(f.key)]=f,p[Jt]=()=>{_(),p[Jt]=void 0,delete d.delayedLeave,f=void 0},d.delayedLeave=()=>{x(),delete d.delayedLeave,f=void 0}}:f=void 0}else f&&(f=void 0);return o}}};function yu(e){let t=e[0];if(e.length>1){for(const n of e)if(n.type!==Re){t=n;break}}return t}const Xm=zm;function bu(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 js(e,t,n,s,r){const{appear:o,mode:a,persisted:l=!1,onBeforeEnter:c,onEnter:d,onAfterEnter:f,onEnterCancelled:h,onBeforeLeave:p,onLeave:_,onAfterLeave:x,onLeaveCancelled:A,onBeforeAppear:R,onAppear:P,onAfterAppear:H,onAppearCancelled:F}=t,k=String(e.key),b=bu(n,e),y=(T,S)=>{T&&bt(T,s,9,S)},O=(T,S)=>{const K=S[1];y(T,S),se(T)?T.every(B=>B.length<=1)&&K():T.length<=1&&K()},w={mode:a,persisted:l,beforeEnter(T){let S=c;if(!n.isMounted)if(o)S=R||c;else return;T[Jt]&&T[Jt](!0);const K=b[k];K&&xt(e,K)&&K.el[Jt]&&K.el[Jt](),y(S,[T])},enter(T){let S=d,K=f,B=h;if(!n.isMounted)if(o)S=P||d,K=H||f,B=F||h;else return;let Q=!1;const oe=T[mr]=de=>{Q||(Q=!0,de?y(B,[T]):y(K,[T]),w.delayedLeave&&w.delayedLeave(),T[mr]=void 0)};S?O(S,[T,oe]):oe()},leave(T,S){const K=String(e.key);if(T[mr]&&T[mr](!0),n.isUnmounting)return S();y(p,[T]);let B=!1;const Q=T[Jt]=oe=>{B||(B=!0,S(),oe?y(A,[T]):y(x,[T]),T[Jt]=void 0,b[K]===e&&delete b[K])};b[K]=e,_?O(_,[T,Q]):Q()},clone(T){const S=js(T,t,n,s,r);return r&&r(S),S}};return w}function xi(e){if(Qs(e))return e=on(e),e.children=null,e}function il(e){if(!Qs(e))return pu(e.type)&&e.children?yu(e.children):e;if(e.component)return e.component.subTree;const{shapeFlag:t,children:n}=e;if(n){if(t&16)return n[0];if(t&32&&ie(n.default))return n.default()}}function Rn(e,t){e.shapeFlag&6&&e.component?(e.transition=t,Rn(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 Ls(e,t,n,s,r=!1){if(se(e)){e.forEach((x,A)=>Ls(x,t&&(se(t)?t[A]:t),n,s,r));return}if(Jn(s)&&!r){s.shapeFlag&512&&s.type.__asyncResolved&&s.component.subTree.component&&Ls(e,t,n,s.component.subTree);return}const o=s.shapeFlag&4?ni(s.component):s.el,a=r?null:o,{i:l,r:c}=e,d=t&&t.r,f=l.refs===me?l.refs={}:l.refs,h=l.setupState,p=fe(h),_=h===me?()=>!1:x=>ge(p,x);if(d!=null&&d!==c&&(ye(d)?(f[d]=null,_(d)&&(h[d]=null)):Ae(d)&&(d.value=null)),ie(c))Xs(c,l,12,[a,f]);else{const x=ye(c),A=Ae(c);if(x||A){const R=()=>{if(e.f){const P=x?_(c)?h[c]:f[c]:c.value;r?se(P)&&So(P,o):se(P)?P.includes(o)||P.push(o):x?(f[c]=[o],_(c)&&(h[c]=f[c])):(c.value=[o],e.k&&(f[e.k]=c.value))}else x?(f[c]=a,_(c)&&(h[c]=a)):A&&(c.value=a,e.k&&(f[e.k]=a))};a?(R.id=-1,Ue(R,n)):R()}}}const ol=e=>e.nodeType===8;Gr().requestIdleCallback;Gr().cancelIdleCallback;function Qm(e,t){if(ol(e)&&e.data==="["){let n=1,s=e.nextSibling;for(;s;){if(s.nodeType===1){if(t(s)===!1)break}else if(ol(s))if(s.data==="]"){if(--n===0)break}else s.data==="["&&n++;s=s.nextSibling}}else t(e)}const Jn=e=>!!e.type.__asyncLoader;/*! #__NO_SIDE_EFFECTS__ */function jy(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,_()),_=()=>{let x;return d||(x=d=t().catch(A=>{if(A=A instanceof Error?A:new Error(String(A)),c)return new Promise((R,P)=>{c(A,()=>R(p()),()=>P(A),h+1)});throw A}).then(A=>x!==d&&d?d:(A&&(A.__esModule||A[Symbol.toStringTag]==="Module")&&(A=A.default),f=A,A)))};return Fo({name:"AsyncComponentWrapper",__asyncLoader:_,__asyncHydrate(x,A,R){const P=o?()=>{const F=o(()=>{R()},k=>Qm(x,k));F&&(A.bum||(A.bum=[])).push(F),(A.u||(A.u=[])).push(()=>!0)}:R;f?P():_().then(()=>!A.isUnmounted&&P())},get __asyncResolved(){return f},setup(){const x=Oe;if(Ho(x),f)return()=>Ni(f,x);const A=F=>{d=null,ps(F,x,13,!s)};if(l&&x.suspense||as)return _().then(F=>()=>Ni(F,x)).catch(F=>(A(F),()=>s?Ee(s,{error:F}):null));const R=Cn(!1),P=Cn(),H=Cn(!!r);return r&&setTimeout(()=>{H.value=!1},r),a!=null&&setTimeout(()=>{if(!R.value&&!P.value){const F=new Error(`Async component timed out after ${a}ms.`);A(F),P.value=F}},a),_().then(()=>{R.value=!0,x.parent&&Qs(x.parent.vnode)&&x.parent.update()}).catch(F=>{A(F),P.value=F}),()=>{if(R.value&&f)return Ni(f,x);if(P.value&&s)return Ee(s,{error:P.value});if(n&&!H.value)return Ee(n)}}})}function Ni(e,t){const{ref:n,props:s,children:r,ce:o}=t.vnode,a=Ee(e,s,r);return a.ref=n,a.ce=o,delete t.vnode.ce,a}const Qs=e=>e.type.__isKeepAlive;function Jm(e,t){Au(e,"a",t)}function Zm(e,t){Au(e,"da",t)}function Au(e,t,n=Oe){const s=e.__wdc||(e.__wdc=()=>{let r=n;for(;r;){if(r.isDeactivated)return;r=r.parent}return e()});if(Zr(t,s,n),n){let r=n.parent;for(;r&&r.parent;)Qs(r.parent.vnode)&&e_(s,t,n,r),r=r.parent}}function e_(e,t,n,s){const r=Zr(t,e,s,!0);jo(()=>{So(s[t],r)},n)}function Zr(e,t,n=Oe,s=!1){if(n){const r=n[e]||(n[e]=[]),o=t.__weh||(t.__weh=(...a)=>{Bt();const l=Dn(n),c=bt(t,n,e,a);return l(),jt(),c});return s?r.unshift(o):r.push(o),o}}const Kt=e=>(t,n=Oe)=>{(!as||e==="sp")&&Zr(e,(...s)=>t(...s),n)},t_=Kt("bm"),Bo=Kt("m"),Tu=Kt("bu"),wu=Kt("u"),Cu=Kt("bum"),jo=Kt("um"),n_=Kt("sp"),s_=Kt("rtg"),r_=Kt("rtc");function i_(e,t=Oe){Zr("ec",e,t)}const Ko="components",o_="directives";function a_(e,t){return Wo(Ko,e,!0,t)||e}const Su=Symbol.for("v-ndc");function l_(e){return ye(e)?Wo(Ko,e,!1)||e:e||Su}function Ky(e){return Wo(o_,e)}function Wo(e,t,n=!0,s=!1){const r=xe||Oe;if(r){const o=r.type;if(e===Ko){const l=nv(o,!1);if(l&&(l===t||l===dt(t)||l===Yr(dt(t))))return o}const a=al(r[e]||o[e],t)||al(r.appContext[e],t);return!a&&s?o:a}}function al(e,t){return e&&(e[t]||e[dt(t)]||e[Yr(dt(t))])}function Wy(e,t,n,s){let r;const o=n,a=se(e);if(a||ye(e)){const l=a&&sn(e);let c=!1,d=!1;l&&(c=!ct(e),d=rn(e),e=Xr(e)),r=new Array(e.length);for(let f=0,h=e.length;ft(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 Yy(e,t,n={},s,r){if(xe.ce||xe.parent&&Jn(xe.parent)&&xe.parent.ce)return t!=="default"&&(n.name=t),Ot(),Ws(Be,null,[Ee("slot",n,s)],64);let o=e[t];o&&o._c&&(o._d=!1),Ot();const a=o&&Ou(o(n)),l=n.key||a&&a.key,c=Ws(Be,{key:(l&&!yt(l)?l:`_${t}`)+(!a&&s?"_fb":"")},a||[],a&&e._===1?64:-2);return c.scopeId&&(c.slotScopeIds=[c.scopeId+"-s"]),o&&o._c&&(o._d=!0),c}function Ou(e){return e.some(t=>os(t)?!(t.type===Re||t.type===Be&&!Ou(t.children)):!0)?e:null}const qi=e=>e?zu(e)?ni(e):qi(e.parent):null,Is=Ne(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=>qi(e.parent),$root:e=>qi(e.root),$host:e=>e.ce,$emit:e=>e.emit,$options:e=>$u(e),$forceUpdate:e=>e.f||(e.f=()=>{ko(e.update)}),$nextTick:e=>e.n||(e.n=Jr.bind(e.proxy)),$watch:e=>$_.bind(e)}),$i=(e,t)=>e!==me&&!e.__isScriptSetup&&ge(e,t),c_={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 _=a[t];if(_!==void 0)switch(_){case 1:return s[t];case 2:return r[t];case 4:return n[t];case 3:return o[t]}else{if($i(s,t))return a[t]=1,s[t];if(r!==me&&ge(r,t))return a[t]=2,r[t];if((d=e.propsOptions[0])&&ge(d,t))return a[t]=3,o[t];if(n!==me&&ge(n,t))return a[t]=4,n[t];zi&&(a[t]=0)}}const f=Is[t];let h,p;if(f)return t==="$attrs"&&He(e.attrs,"get",""),f(e);if((h=l.__cssModules)&&(h=h[t]))return h;if(n!==me&&ge(n,t))return a[t]=4,n[t];if(p=c.config.globalProperties,ge(p,t))return p[t]},set({_:e},t,n){const{data:s,setupState:r,ctx:o}=e;return $i(r,t)?(r[t]=n,!0):s!==me&&ge(s,t)?(s[t]=n,!0):ge(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!==me&&ge(e,a)||$i(t,a)||(l=o[0])&&ge(l,a)||ge(s,a)||ge(Is,a)||ge(r.config.globalProperties,a)},defineProperty(e,t,n){return n.get!=null?e._.accessCache[t]=0:ge(n,"value")&&this.set(e,t,n.value,null),Reflect.defineProperty(e,t,n)}};function Gy(){return xu().slots}function qy(){return xu().attrs}function xu(){const e=gs();return e.setupContext||(e.setupContext=Qu(e))}function ll(e){return se(e)?e.reduce((t,n)=>(t[n]=null,t),{}):e}function zy(e){const t=gs();let n=e();return eo(),Oo(n)&&(n=n.catch(s=>{throw Dn(t),s})),[n,()=>Dn(t)]}let zi=!0;function u_(e){const t=$u(e),n=e.proxy,s=e.ctx;zi=!1,t.beforeCreate&&cl(t.beforeCreate,e,"bc");const{data:r,computed:o,methods:a,watch:l,provide:c,inject:d,created:f,beforeMount:h,mounted:p,beforeUpdate:_,updated:x,activated:A,deactivated:R,beforeDestroy:P,beforeUnmount:H,destroyed:F,unmounted:k,render:b,renderTracked:y,renderTriggered:O,errorCaptured:w,serverPrefetch:T,expose:S,inheritAttrs:K,components:B,directives:Q,filters:oe}=t;if(d&&f_(d,s,null),a)for(const ee in a){const ce=a[ee];ie(ce)&&(s[ee]=ce.bind(n))}if(r){const ee=r.call(n,n);_e(ee)&&(e.data=zs(ee))}if(zi=!0,o)for(const ee in o){const ce=o[ee],we=ie(ce)?ce.bind(n,n):ie(ce.get)?ce.get.bind(n,n):vt,je=!ie(ce)&&ie(ce.set)?ce.set.bind(n):vt,De=at({get:we,set:je});Object.defineProperty(s,ee,{enumerable:!0,configurable:!0,get:()=>De.value,set:be=>De.value=be})}if(l)for(const ee in l)Nu(l[ee],s,n,ee);if(c){const ee=ie(c)?c.call(n):c;Reflect.ownKeys(ee).forEach(ce=>{Tr(ce,ee[ce])})}f&&cl(f,e,"c");function te(ee,ce){se(ce)?ce.forEach(we=>ee(we.bind(n))):ce&&ee(ce.bind(n))}if(te(t_,h),te(Bo,p),te(Tu,_),te(wu,x),te(Jm,A),te(Zm,R),te(i_,w),te(r_,y),te(s_,O),te(Cu,H),te(jo,k),te(n_,T),se(S))if(S.length){const ee=e.exposed||(e.exposed={});S.forEach(ce=>{Object.defineProperty(ee,ce,{get:()=>n[ce],set:we=>n[ce]=we})})}else e.exposed||(e.exposed={});b&&e.render===vt&&(e.render=b),K!=null&&(e.inheritAttrs=K),B&&(e.components=B),Q&&(e.directives=Q),T&&Ho(e)}function f_(e,t,n=vt){se(e)&&(e=Xi(e));for(const s in e){const r=e[s];let o;_e(r)?"default"in r?o=ut(r.from||s,r.default,!0):o=ut(r.from||s):o=ut(r),Ae(o)?Object.defineProperty(t,s,{enumerable:!0,configurable:!0,get:()=>o.value,set:a=>o.value=a}):t[s]=o}}function cl(e,t,n){bt(se(e)?e.map(s=>s.bind(t.proxy)):e.bind(t.proxy),t,n)}function Nu(e,t,n,s){let r=s.includes(".")?ju(n,s):()=>n[s];if(ye(e)){const o=t[e];ie(o)&&On(r,o)}else if(ie(e))On(r,e.bind(n));else if(_e(e))if(se(e))e.forEach(o=>Nu(o,t,n,s));else{const o=ie(e.handler)?e.handler.bind(n):t[e.handler];ie(o)&&On(r,o,e)}}function $u(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=>Pr(c,d,a,!0)),Pr(c,t,a)),_e(t)&&o.set(t,c),c}function Pr(e,t,n,s=!1){const{mixins:r,extends:o}=t;o&&Pr(e,o,n,!0),r&&r.forEach(a=>Pr(e,a,n,!0));for(const a in t)if(!(s&&a==="expose")){const l=d_[a]||n&&n[a];e[a]=l?l(e[a],t[a]):t[a]}return e}const d_={data:ul,props:fl,emits:fl,methods:Ss,computed:Ss,beforeCreate:We,created:We,beforeMount:We,mounted:We,beforeUpdate:We,updated:We,beforeDestroy:We,beforeUnmount:We,destroyed:We,unmounted:We,activated:We,deactivated:We,errorCaptured:We,serverPrefetch:We,components:Ss,directives:Ss,watch:p_,provide:ul,inject:h_};function ul(e,t){return t?e?function(){return Ne(ie(e)?e.call(this,this):e,ie(t)?t.call(this,this):t)}:t:e}function h_(e,t){return Ss(Xi(e),Xi(t))}function Xi(e){if(se(e)){const t={};for(let n=0;n1)return n&&ie(t)?t.call(s&&s.proxy):t}}function __(){return!!(Oe||xe||Sn)}const Du={},Lu=()=>Object.create(Du),Iu=e=>Object.getPrototypeOf(e)===Du;function v_(e,t,n,s=!1){const r={},o=Lu();e.propsDefaults=Object.create(null),Pu(e,t,r,o);for(const a in e.propsOptions[0])a in r||(r[a]=void 0);n?e.props=s?r:nu(r):e.type.props?e.props=r:e.props=o,e.attrs=o}function E_(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,_]=Mu(h,t,!0);Ne(a,p),_&&l.push(..._)};!n&&t.mixins.length&&t.mixins.forEach(f),e.extends&&f(e.extends),e.mixins&&e.mixins.forEach(f)}if(!o&&!c)return _e(e)&&s.set(e,zn),zn;if(se(o))for(let f=0;fe[0]==="_"||e==="$stable",Yo=e=>se(e)?e.map(_t):[_t(e)],b_=(e,t,n)=>{if(t._n)return t;const s=Yn((...r)=>Yo(t(...r)),n);return s._c=!1,s},ku=(e,t,n)=>{const s=e._ctx;for(const r in e){if(Uo(r))continue;const o=e[r];if(ie(o))t[r]=b_(r,o,s);else if(o!=null){const a=Yo(o);t[r]=()=>a}}},Vu=(e,t)=>{const n=Yo(t);e.slots.default=()=>n},Fu=(e,t,n)=>{for(const s in t)(n||!Uo(s))&&(e[s]=t[s])},A_=(e,t,n)=>{const s=e.slots=Lu();if(e.vnode.shapeFlag&32){const r=t.__;r&&Ki(s,"__",r,!0);const o=t._;o?(Fu(s,t,n),n&&Ki(s,"_",o,!0)):ku(t,s)}else t&&Vu(e,t)},T_=(e,t,n)=>{const{vnode:s,slots:r}=e;let o=!0,a=me;if(s.shapeFlag&32){const l=t._;l?n&&l===1?o=!1:Fu(r,t,n):(o=!t.$stable,ku(t,r)),a=t}else t&&(Vu(e,t),a={default:1});if(o)for(const l in r)!Uo(l)&&a[l]==null&&delete r[l]},Ue=K_;function w_(e){return C_(e)}function C_(e,t){const n=Gr();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:_=vt,insertStaticContent:x}=e,A=(g,v,C,D=null,V=null,M=null,W=void 0,Y=null,N=!!v.dynamicChildren)=>{if(g===v)return;g&&!xt(g,v)&&(D=I(g),be(g,V,M,!0),g=null),v.patchFlag===-2&&(N=!1,v.dynamicChildren=null);const{type:j,ref:ne,shapeFlag:X}=v;switch(j){case ti:R(g,v,C,D);break;case Re:P(g,v,C,D);break;case wr:g==null&&H(v,C,D,W);break;case Be:B(g,v,C,D,V,M,W,Y,N);break;default:X&1?b(g,v,C,D,V,M,W,Y,N):X&6?Q(g,v,C,D,V,M,W,Y,N):(X&64||X&128)&&j.process(g,v,C,D,V,M,W,Y,N,J)}ne!=null&&V?Ls(ne,g&&g.ref,M,v||g,!v):ne==null&&g&&g.ref!=null&&Ls(g.ref,null,M,g,!0)},R=(g,v,C,D)=>{if(g==null)s(v.el=l(v.children),C,D);else{const V=v.el=g.el;v.children!==g.children&&d(V,v.children)}},P=(g,v,C,D)=>{g==null?s(v.el=c(v.children||""),C,D):v.el=g.el},H=(g,v,C,D)=>{[g.el,g.anchor]=x(g.children,v,C,D,g.el,g.anchor)},F=({el:g,anchor:v},C,D)=>{let V;for(;g&&g!==v;)V=p(g),s(g,C,D),g=V;s(v,C,D)},k=({el:g,anchor:v})=>{let C;for(;g&&g!==v;)C=p(g),r(g),g=C;r(v)},b=(g,v,C,D,V,M,W,Y,N)=>{v.type==="svg"?W="svg":v.type==="math"&&(W="mathml"),g==null?y(v,C,D,V,M,W,Y,N):T(g,v,V,M,W,Y,N)},y=(g,v,C,D,V,M,W,Y)=>{let N,j;const{props:ne,shapeFlag:X,transition:Z,dirs:re}=g;if(N=g.el=a(g.type,M,ne&&ne.is,ne),X&8?f(N,g.children):X&16&&w(g.children,N,null,D,V,Ri(g,M),W,Y),re&&En(g,null,D,"created"),O(N,g,g.scopeId,W,D),ne){for(const he in ne)he!=="value"&&!Ns(he)&&o(N,he,null,ne[he],M,D);"value"in ne&&o(N,"value",null,ne.value,M),(j=ne.onVnodeBeforeMount)&&wt(j,D,g)}re&&En(g,null,D,"beforeMount");const ae=S_(V,Z);ae&&Z.beforeEnter(N),s(N,v,C),((j=ne&&ne.onVnodeMounted)||ae||re)&&Ue(()=>{j&&wt(j,D,g),ae&&Z.enter(N),re&&En(g,null,D,"mounted")},V)},O=(g,v,C,D,V)=>{if(C&&_(g,C),D)for(let M=0;M{for(let j=N;j{const Y=v.el=g.el;let{patchFlag:N,dynamicChildren:j,dirs:ne}=v;N|=g.patchFlag&16;const X=g.props||me,Z=v.props||me;let re;if(C&&yn(C,!1),(re=Z.onVnodeBeforeUpdate)&&wt(re,C,v,g),ne&&En(v,g,C,"beforeUpdate"),C&&yn(C,!0),(X.innerHTML&&Z.innerHTML==null||X.textContent&&Z.textContent==null)&&f(Y,""),j?S(g.dynamicChildren,j,Y,C,D,Ri(v,V),M):W||ce(g,v,Y,null,C,D,Ri(v,V),M,!1),N>0){if(N&16)K(Y,X,Z,C,V);else if(N&2&&X.class!==Z.class&&o(Y,"class",null,Z.class,V),N&4&&o(Y,"style",X.style,Z.style,V),N&8){const ae=v.dynamicProps;for(let he=0;he{re&&wt(re,C,v,g),ne&&En(v,g,C,"updated")},D)},S=(g,v,C,D,V,M,W)=>{for(let Y=0;Y{if(v!==C){if(v!==me)for(const M in v)!Ns(M)&&!(M in C)&&o(g,M,v[M],null,V,D);for(const M in C){if(Ns(M))continue;const W=C[M],Y=v[M];W!==Y&&M!=="value"&&o(g,M,Y,W,V,D)}"value"in C&&o(g,"value",v.value,C.value,V)}},B=(g,v,C,D,V,M,W,Y,N)=>{const j=v.el=g?g.el:l(""),ne=v.anchor=g?g.anchor:l("");let{patchFlag:X,dynamicChildren:Z,slotScopeIds:re}=v;re&&(Y=Y?Y.concat(re):re),g==null?(s(j,C,D),s(ne,C,D),w(v.children||[],C,ne,V,M,W,Y,N)):X>0&&X&64&&Z&&g.dynamicChildren?(S(g.dynamicChildren,Z,C,V,M,W,Y),(v.key!=null||V&&v===V.subTree)&&Go(g,v,!0)):ce(g,v,C,ne,V,M,W,Y,N)},Q=(g,v,C,D,V,M,W,Y,N)=>{v.slotScopeIds=Y,g==null?v.shapeFlag&512?V.ctx.activate(v,C,D,W,N):oe(v,C,D,V,M,W,N):de(g,v,N)},oe=(g,v,C,D,V,M,W)=>{const Y=g.component=J_(g,D,V);if(Qs(g)&&(Y.ctx.renderer=J),Z_(Y,!1,W),Y.asyncDep){if(V&&V.registerDep(Y,te,W),!g.el){const N=Y.subTree=Ee(Re);P(null,N,v,C)}}else te(Y,g,v,C,V,M,W)},de=(g,v,C)=>{const D=v.component=g.component;if(M_(g,v,C))if(D.asyncDep&&!D.asyncResolved){ee(D,v,C);return}else D.next=v,D.update();else v.el=g.el,D.vnode=v},te=(g,v,C,D,V,M,W)=>{const Y=()=>{if(g.isMounted){let{next:X,bu:Z,u:re,parent:ae,vnode:he}=g;{const tt=Hu(g);if(tt){X&&(X.el=he.el,ee(g,X,W)),tt.asyncDep.then(()=>{g.isUnmounted||Y()});return}}let ue=X,Ce;yn(g,!1),X?(X.el=he.el,ee(g,X,W)):X=he,Z&&br(Z),(Ce=X.props&&X.props.onVnodeBeforeUpdate)&&wt(Ce,ae,X,he),yn(g,!0);const Me=pl(g),ht=g.subTree;g.subTree=Me,A(ht,Me,h(ht.el),I(ht),g,V,M),X.el=Me.el,ue===null&&qo(g,Me.el),re&&Ue(re,V),(Ce=X.props&&X.props.onVnodeUpdated)&&Ue(()=>wt(Ce,ae,X,he),V)}else{let X;const{el:Z,props:re}=v,{bm:ae,m:he,parent:ue,root:Ce,type:Me}=g,ht=Jn(v);yn(g,!1),ae&&br(ae),!ht&&(X=re&&re.onVnodeBeforeMount)&&wt(X,ue,v),yn(g,!0);{Ce.ce&&Ce.ce._def.shadowRoot!==!1&&Ce.ce._injectChildStyle(Me);const tt=g.subTree=pl(g);A(null,tt,C,D,g,V,M),v.el=tt.el}if(he&&Ue(he,V),!ht&&(X=re&&re.onVnodeMounted)){const tt=v;Ue(()=>wt(X,ue,tt),V)}(v.shapeFlag&256||ue&&Jn(ue.vnode)&&ue.vnode.shapeFlag&256)&&g.a&&Ue(g.a,V),g.isMounted=!0,v=C=D=null}};g.scope.on();const N=g.effect=new jc(Y);g.scope.off();const j=g.update=N.run.bind(N),ne=g.job=N.runIfDirty.bind(N);ne.i=g,ne.id=g.uid,N.scheduler=()=>ko(ne),yn(g,!0),j()},ee=(g,v,C)=>{v.component=g;const D=g.vnode.props;g.vnode=v,g.next=null,E_(g,v.props,D,C),T_(g,v.children,C),Bt(),tl(g),jt()},ce=(g,v,C,D,V,M,W,Y,N=!1)=>{const j=g&&g.children,ne=g?g.shapeFlag:0,X=v.children,{patchFlag:Z,shapeFlag:re}=v;if(Z>0){if(Z&128){je(j,X,C,D,V,M,W,Y,N);return}else if(Z&256){we(j,X,C,D,V,M,W,Y,N);return}}re&8?(ne&16&&Te(j,V,M),X!==j&&f(C,X)):ne&16?re&16?je(j,X,C,D,V,M,W,Y,N):Te(j,V,M,!0):(ne&8&&f(C,""),re&16&&w(X,C,D,V,M,W,Y,N))},we=(g,v,C,D,V,M,W,Y,N)=>{g=g||zn,v=v||zn;const j=g.length,ne=v.length,X=Math.min(j,ne);let Z;for(Z=0;Zne?Te(g,V,M,!0,!1,X):w(v,C,D,V,M,W,Y,N,X)},je=(g,v,C,D,V,M,W,Y,N)=>{let j=0;const ne=v.length;let X=g.length-1,Z=ne-1;for(;j<=X&&j<=Z;){const re=g[j],ae=v[j]=N?Zt(v[j]):_t(v[j]);if(xt(re,ae))A(re,ae,C,null,V,M,W,Y,N);else break;j++}for(;j<=X&&j<=Z;){const re=g[X],ae=v[Z]=N?Zt(v[Z]):_t(v[Z]);if(xt(re,ae))A(re,ae,C,null,V,M,W,Y,N);else break;X--,Z--}if(j>X){if(j<=Z){const re=Z+1,ae=reZ)for(;j<=X;)be(g[j],V,M,!0),j++;else{const re=j,ae=j,he=new Map;for(j=ae;j<=Z;j++){const ke=v[j]=N?Zt(v[j]):_t(v[j]);ke.key!=null&&he.set(ke.key,j)}let ue,Ce=0;const Me=Z-ae+1;let ht=!1,tt=0;const fn=new Array(Me);for(j=0;j=Me){be(ke,V,M,!0);continue}let nt;if(ke.key!=null)nt=he.get(ke.key);else for(ue=ae;ue<=Z;ue++)if(fn[ue-ae]===0&&xt(ke,v[ue])){nt=ue;break}nt===void 0?be(ke,V,M,!0):(fn[nt-ae]=j+1,nt>=tt?tt=nt:ht=!0,A(ke,v[nt],C,null,V,M,W,Y,N),Ce++)}const Js=ht?O_(fn):zn;for(ue=Js.length-1,j=Me-1;j>=0;j--){const ke=ae+j,nt=v[ke],Wt=ke+1{const{el:M,type:W,transition:Y,children:N,shapeFlag:j}=g;if(j&6){De(g.component.subTree,v,C,D);return}if(j&128){g.suspense.move(v,C,D);return}if(j&64){W.move(g,v,C,J);return}if(W===Be){s(M,v,C);for(let X=0;XY.enter(M),V);else{const{leave:X,delayLeave:Z,afterLeave:re}=Y,ae=()=>{g.ctx.isUnmounted?r(M):s(M,v,C)},he=()=>{X(M,()=>{ae(),re&&re()})};Z?Z(M,ae,he):he()}else s(M,v,C)},be=(g,v,C,D=!1,V=!1)=>{const{type:M,props:W,ref:Y,children:N,dynamicChildren:j,shapeFlag:ne,patchFlag:X,dirs:Z,cacheIndex:re}=g;if(X===-2&&(V=!1),Y!=null&&(Bt(),Ls(Y,null,C,g,!0),jt()),re!=null&&(v.renderCache[re]=void 0),ne&256){v.ctx.deactivate(g);return}const ae=ne&1&&Z,he=!Jn(g);let ue;if(he&&(ue=W&&W.onVnodeBeforeUnmount)&&wt(ue,v,g),ne&6)Pe(g.component,C,D);else{if(ne&128){g.suspense.unmount(C,D);return}ae&&En(g,null,v,"beforeUnmount"),ne&64?g.type.remove(g,v,C,J,D):j&&!j.hasOnce&&(M!==Be||X>0&&X&64)?Te(j,v,C,!1,!0):(M===Be&&X&384||!V&&ne&16)&&Te(N,v,C),D&&Qe(g)}(he&&(ue=W&&W.onVnodeUnmounted)||ae)&&Ue(()=>{ue&&wt(ue,v,g),ae&&En(g,null,v,"unmounted")},C)},Qe=g=>{const{type:v,el:C,anchor:D,transition:V}=g;if(v===Be){Ke(C,D);return}if(v===wr){k(g);return}const M=()=>{r(C),V&&!V.persisted&&V.afterLeave&&V.afterLeave()};if(g.shapeFlag&1&&V&&!V.persisted){const{leave:W,delayLeave:Y}=V,N=()=>W(C,M);Y?Y(g.el,M,N):N()}else M()},Ke=(g,v)=>{let C;for(;g!==v;)C=p(g),r(g),g=C;r(v)},Pe=(g,v,C)=>{const{bum:D,scope:V,job:M,subTree:W,um:Y,m:N,a:j,parent:ne,slots:{__:X}}=g;hl(N),hl(j),D&&br(D),ne&&se(X)&&X.forEach(Z=>{ne.renderCache[Z]=void 0}),V.stop(),M&&(M.flags|=8,be(W,g,v,C)),Y&&Ue(Y,v),Ue(()=>{g.isUnmounted=!0},v),v&&v.pendingBranch&&!v.isUnmounted&&g.asyncDep&&!g.asyncResolved&&g.suspenseId===v.pendingId&&(v.deps--,v.deps===0&&v.resolve())},Te=(g,v,C,D=!1,V=!1,M=0)=>{for(let W=M;W{if(g.shapeFlag&6)return I(g.component.subTree);if(g.shapeFlag&128)return g.suspense.next();const v=p(g.anchor||g.el),C=v&&v[hu];return C?p(C):v};let q=!1;const z=(g,v,C)=>{g==null?v._vnode&&be(v._vnode,null,null,!0):A(v._vnode||null,g,v,null,null,null,C),v._vnode=g,q||(q=!0,tl(),uu(),q=!1)},J={p:A,um:be,m:De,r:Qe,mt:oe,mc:w,pc:ce,pbc:S,n:I,o:e};return{render:z,hydrate:void 0,createApp:m_(z)}}function Ri({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 S_(e,t){return(!e||e&&!e.pendingBranch)&&t&&!t.persisted}function Go(e,t,n=!1){const s=e.children,r=t.children;if(se(s)&&se(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 Hu(e){const t=e.subTree.component;if(t)return t.asyncDep&&!t.asyncResolved?t:Hu(t)}function hl(e){if(e)for(let t=0;tut(x_);function On(e,t,n){return Bu(e,t,n)}function Bu(e,t,n=me){const{immediate:s,deep:r,flush:o,once:a}=n,l=Ne({},n),c=t&&s||!t&&o!=="post";let d;if(as){if(o==="sync"){const _=N_();d=_.__watcherHandles||(_.__watcherHandles=[])}else if(!c){const _=()=>{};return _.stop=vt,_.resume=vt,_.pause=vt,_}}const f=Oe;l.call=(_,x,A)=>bt(_,f,x,A);let h=!1;o==="post"?l.scheduler=_=>{Ue(_,f&&f.suspense)}:o!=="sync"&&(h=!0,l.scheduler=(_,x)=>{x?_():ko(_)}),l.augmentJob=_=>{t&&(_.flags|=4),h&&(_.flags|=2,f&&(_.id=f.uid,_.i=f))};const p=Um(e,t,l);return as&&(d?d.push(p):c&&p()),p}function $_(e,t,n){const s=this.proxy,r=ye(e)?e.includes(".")?ju(s,e):()=>s[e]:e.bind(s,s);let o;ie(t)?o=t:(o=t.handler,n=t);const a=Dn(this),l=Bu(r,o.bind(s),n);return a(),l}function ju(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[`${dt(t)}Modifiers`]||e[`${cn(t)}Modifiers`];function D_(e,t,...n){if(e.isUnmounted)return;const s=e.vnode.props||me;let r=n;const o=t.startsWith("update:"),a=o&&R_(s,t.slice(7));a&&(a.trim&&(r=n.map(f=>ye(f)?f.trim():f)),a.number&&(r=n.map(xr)));let l,c=s[l=Ti(t)]||s[l=Ti(dt(t))];!c&&o&&(c=s[l=Ti(cn(t))]),c&&bt(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,bt(d,e,6,r)}}function Ku(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=Ku(d,t,!0);f&&(l=!0,Ne(a,f))};!n&&t.mixins.length&&t.mixins.forEach(c),e.extends&&c(e.extends),e.mixins&&e.mixins.forEach(c)}return!o&&!l?(_e(e)&&s.set(e,null),null):(se(o)?o.forEach(c=>a[c]=null):Ne(a,o),_e(e)&&s.set(e,a),a)}function ei(e,t){return!e||!Wr(t)?!1:(t=t.slice(2).replace(/Once$/,""),ge(e,t[0].toLowerCase()+t.slice(1))||ge(e,cn(t))||ge(e,t))}function pl(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:_,ctx:x,inheritAttrs:A}=e,R=Ir(e);let P,H;try{if(n.shapeFlag&4){const k=r||s,b=k;P=_t(d.call(b,k,f,h,_,p,x)),H=l}else{const k=t;P=_t(k.length>1?k(h,{attrs:l,slots:a,emit:c}):k(h,null)),H=t.props?l:I_(l)}}catch(k){Ps.length=0,ps(k,e,1),P=Ee(Re)}let F=P;if(H&&A!==!1){const k=Object.keys(H),{shapeFlag:b}=F;k.length&&b&7&&(o&&k.some(Co)&&(H=P_(H,o)),F=on(F,H,!1,!0))}return n.dirs&&(F=on(F,null,!1,!0),F.dirs=F.dirs?F.dirs.concat(n.dirs):n.dirs),n.transition&&Rn(F,n.transition),P=F,Ir(R),P}function L_(e,t=!0){let n;for(let s=0;s{let t;for(const n in e)(n==="class"||n==="style"||Wr(n))&&((t||(t={}))[n]=e[n]);return t},P_=(e,t)=>{const n={};for(const s in e)(!Co(s)||!(s.slice(9)in t))&&(n[s]=e[s]);return n};function M_(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 Ji=0;const k_={name:"Suspense",__isSuspense:!0,process(e,t,n,s,r,o,a,l,c,d){if(e==null)F_(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}H_(e,t,n,s,r,a,l,c,d)}},hydrate:B_,normalize:j_},V_=k_;function Ks(e,t){const n=e.props&&e.props[t];ie(n)&&n()}function F_(e,t,n,s,r,o,a,l,c){const{p:d,o:{createElement:f}}=c,h=f("div"),p=e.suspense=Uu(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?(Ks(e,"onPending"),Ks(e,"onFallback"),d(null,e.ssFallback,t,n,s,null,o,a),Zn(p,e.ssFallback)):p.resolve(!1,!0)}function H_(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,_=t.ssFallback,{activeBranch:x,pendingBranch:A,isInFallback:R,isHydrating:P}=h;if(A)h.pendingBranch=p,xt(p,A)?(c(A,p,h.hiddenContainer,null,r,h,o,a,l),h.deps<=0?h.resolve():R&&(P||(c(x,_,n,s,r,null,o,a,l),Zn(h,_)))):(h.pendingId=Ji++,P?(h.isHydrating=!1,h.activeBranch=A):d(A,r,h),h.deps=0,h.effects.length=0,h.hiddenContainer=f("div"),R?(c(null,p,h.hiddenContainer,null,r,h,o,a,l),h.deps<=0?h.resolve():(c(x,_,n,s,r,null,o,a,l),Zn(h,_))):x&&xt(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&&xt(p,x))c(x,p,n,s,r,h,o,a,l),Zn(h,p);else if(Ks(t,"onPending"),h.pendingBranch=p,p.shapeFlag&512?h.pendingId=p.component.suspenseId:h.pendingId=Ji++,c(null,p,h.hiddenContainer,null,r,h,o,a,l),h.deps<=0)h.resolve();else{const{timeout:H,pendingId:F}=h;H>0?setTimeout(()=>{h.pendingId===F&&h.fallback(_)},H):H===0&&h.fallback(_)}}function Uu(e,t,n,s,r,o,a,l,c,d,f=!1){const{p:h,m:p,um:_,n:x,o:{parentNode:A,remove:R}}=d;let P;const H=W_(e);H&&t&&t.pendingBranch&&(P=t.pendingId,t.deps++);const F=e.props?Pc(e.props.timeout):void 0,k=o,b={vnode:e,parent:t,parentComponent:n,namespace:a,container:s,hiddenContainer:r,deps:0,pendingId:Ji++,timeout:typeof F=="number"?F:-1,activeBranch:null,pendingBranch:null,isInFallback:!f,isHydrating:f,isUnmounted:!1,effects:[],resolve(y=!1,O=!1){const{vnode:w,activeBranch:T,pendingBranch:S,pendingId:K,effects:B,parentComponent:Q,container:oe}=b;let de=!1;b.isHydrating?b.isHydrating=!1:y||(de=T&&S.transition&&S.transition.mode==="out-in",de&&(T.transition.afterLeave=()=>{K===b.pendingId&&(p(S,oe,o===k?x(T):o,0),Lr(B))}),T&&(A(T.el)===oe&&(o=x(T)),_(T,Q,b,!0)),de||p(S,oe,o,0)),Zn(b,S),b.pendingBranch=null,b.isInFallback=!1;let te=b.parent,ee=!1;for(;te;){if(te.pendingBranch){te.effects.push(...B),ee=!0;break}te=te.parent}!ee&&!de&&Lr(B),b.effects=[],H&&t&&t.pendingBranch&&P===t.pendingId&&(t.deps--,t.deps===0&&!O&&t.resolve()),Ks(w,"onResolve")},fallback(y){if(!b.pendingBranch)return;const{vnode:O,activeBranch:w,parentComponent:T,container:S,namespace:K}=b;Ks(O,"onFallback");const B=x(w),Q=()=>{b.isInFallback&&(h(null,y,S,B,T,null,K,l,c),Zn(b,y))},oe=y.transition&&y.transition.mode==="out-in";oe&&(w.transition.afterLeave=Q),b.isInFallback=!0,_(w,T,null,!0),oe||Q()},move(y,O,w){b.activeBranch&&p(b.activeBranch,y,O,w),b.container=y},next(){return b.activeBranch&&x(b.activeBranch)},registerDep(y,O,w){const T=!!b.pendingBranch;T&&b.deps++;const S=y.vnode.el;y.asyncDep.catch(K=>{ps(K,y,0)}).then(K=>{if(y.isUnmounted||b.isUnmounted||b.pendingId!==y.suspenseId)return;y.asyncResolved=!0;const{vnode:B}=y;to(y,K),S&&(B.el=S);const Q=!S&&y.subTree.el;O(y,B,A(S||y.subTree.el),S?null:x(y.subTree),b,a,w),Q&&R(Q),qo(y,B.el),T&&--b.deps===0&&b.resolve()})},unmount(y,O){b.isUnmounted=!0,b.activeBranch&&_(b.activeBranch,n,y,O),b.pendingBranch&&_(b.pendingBranch,n,y,O)}};return b}function B_(e,t,n,s,r,o,a,l,c){const d=t.suspense=Uu(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 j_(e){const{shapeFlag:t,children:n}=e,s=t&32;e.ssContent=ml(s?n.default:n),e.ssFallback=s?ml(n.fallback):Ee(Re)}function ml(e){let t;if(ie(e)){const n=is&&e._c;n&&(e._d=!1,Ot()),e=e(),n&&(e._d=!0,t=Xe,Yu())}return se(e)&&(e=L_(e)),e=_t(e),t&&!e.dynamicChildren&&(e.dynamicChildren=t.filter(n=>n!==e)),e}function K_(e,t){t&&t.pendingBranch?se(e)?t.effects.push(...e):t.effects.push(e):Lr(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,qo(s,r))}function W_(e){const t=e.props&&e.props.suspensible;return t!=null&&t!==!1}const Be=Symbol.for("v-fgt"),ti=Symbol.for("v-txt"),Re=Symbol.for("v-cmt"),wr=Symbol.for("v-stc"),Ps=[];let Xe=null;function Ot(e=!1){Ps.push(Xe=e?null:[])}function Yu(){Ps.pop(),Xe=Ps[Ps.length-1]||null}let is=1;function _l(e,t=!1){is+=e,e<0&&Xe&&t&&(Xe.hasOnce=!0)}function Gu(e){return e.dynamicChildren=is>0?Xe||zn:null,Yu(),is>0&&Xe&&Xe.push(e),e}function _r(e,t,n,s,r,o){return Gu(qn(e,t,n,s,r,o,!0))}function Ws(e,t,n,s,r){return Gu(Ee(e,t,n,s,r,!0))}function os(e){return e?e.__v_isVNode===!0:!1}function xt(e,t){return e.type===t.type&&e.key===t.key}const qu=({key:e})=>e??null,Cr=({ref:e,ref_key:t,ref_for:n})=>(typeof e=="number"&&(e=""+e),e!=null?ye(e)||Ae(e)||ie(e)?{i:xe,r:e,k:t,f:!!n}:e:null);function qn(e,t=null,n=null,s=0,r=null,o=e===Be?0:1,a=!1,l=!1){const c={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&qu(t),ref:t&&Cr(t),scopeId:du,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:xe};return l?(zo(c,n),o&128&&e.normalize(c)):n&&(c.shapeFlag|=ye(n)?8:16),is>0&&!a&&Xe&&(c.patchFlag>0||o&6)&&c.patchFlag!==32&&Xe.push(c),c}const Ee=U_;function U_(e,t=null,n=null,s=0,r=null,o=!1){if((!e||e===Su)&&(e=Re),os(e)){const l=on(e,t,!0);return n&&zo(l,n),is>0&&!o&&Xe&&(l.shapeFlag&6?Xe[Xe.indexOf(e)]=l:Xe.push(l)),l.patchFlag=-2,l}if(sv(e)&&(e=e.__vccOpts),t){t=Y_(t);let{class:l,style:c}=t;l&&!ye(l)&&(t.class=zr(l)),_e(c)&&(Mo(c)&&!se(c)&&(c=Ne({},c)),t.style=qr(c))}const a=ye(e)?1:Wu(e)?128:pu(e)?64:_e(e)?4:ie(e)?2:0;return qn(e,t,n,s,r,a,o,!0)}function Y_(e){return e?Mo(e)||Iu(e)?Ne({},e):e:null}function on(e,t,n=!1,s=!1){const{props:r,ref:o,patchFlag:a,children:l,transition:c}=e,d=t?z_(r||{},t):r,f={__v_isVNode:!0,__v_skip:!0,type:e.type,props:d,key:d&&qu(d),ref:t&&t.ref?n&&o?se(o)?o.concat(Cr(t)):[o,Cr(t)]:Cr(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!==Be?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&&on(e.ssContent),ssFallback:e.ssFallback&&on(e.ssFallback),el:e.el,anchor:e.anchor,ctx:e.ctx,ce:e.ce};return c&&s&&Rn(f,c.clone(f)),f}function G_(e=" ",t=0){return Ee(ti,null,e,t)}function q_(e="",t=!1){return t?(Ot(),Ws(Re,null,e)):Ee(Re,null,e)}function _t(e){return e==null||typeof e=="boolean"?Ee(Re):se(e)?Ee(Be,null,e.slice()):os(e)?Zt(e):Ee(ti,null,String(e))}function Zt(e){return e.el===null&&e.patchFlag!==-1||e.memo?e:on(e)}function zo(e,t){let n=0;const{shapeFlag:s}=e;if(t==null)t=null;else if(se(t))n=16;else if(typeof t=="object")if(s&65){const r=t.default;r&&(r._c&&(r._d=!1),zo(e,r()),r._c&&(r._d=!0));return}else{n=32;const r=t._;!r&&!Iu(t)?t._ctx=xe:r===3&&xe&&(xe.slots._===1?t._=1:(t._=2,e.patchFlag|=1024))}else ie(t)?(t={default:t,_ctx:xe},n=32):(t=String(t),s&64?(n=16,t=[G_(t)]):n=8);e.children=t,e.shapeFlag|=n}function z_(...e){const t={};for(let n=0;nOe||xe;let Mr,Zi;{const e=Gr(),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)}};Mr=t("__VUE_INSTANCE_SETTERS__",n=>Oe=n),Zi=t("__VUE_SSR_SETTERS__",n=>as=n)}const Dn=e=>{const t=Oe;return Mr(e),e.scope.on(),()=>{e.scope.off(),Mr(t)}},eo=()=>{Oe&&Oe.scope.off(),Mr(null)};function zu(e){return e.vnode.shapeFlag&4}let as=!1;function Z_(e,t=!1,n=!1){t&&Zi(t);const{props:s,children:r}=e.vnode,o=zu(e);v_(e,s,o,t),A_(e,r,n||t);const a=o?ev(e,t):void 0;return t&&Zi(!1),a}function ev(e,t){const n=e.type;e.accessCache=Object.create(null),e.proxy=new Proxy(e.ctx,c_);const{setup:s}=n;if(s){Bt();const r=e.setupContext=s.length>1?Qu(e):null,o=Dn(e),a=Xs(s,e,0,[e.props,r]),l=Oo(a);if(jt(),o(),(l||e.sp)&&!Jn(e)&&Ho(e),l){if(a.then(eo,eo),t)return a.then(c=>{to(e,c)}).catch(c=>{ps(c,e,0)});e.asyncDep=a}else to(e,a)}else Xu(e)}function to(e,t,n){ie(t)?e.type.__ssrInlineRender?e.ssrRender=t:e.render=t:_e(t)&&(e.setupState=ou(t)),Xu(e)}function Xu(e,t,n){const s=e.type;e.render||(e.render=s.render||vt);{const r=Dn(e);Bt();try{u_(e)}finally{jt(),r()}}}const tv={get(e,t){return He(e,"get",""),e[t]}};function Qu(e){const t=n=>{e.exposed=n||{}};return{attrs:new Proxy(e.attrs,tv),slots:e.slots,emit:e.emit,expose:t}}function ni(e){return e.exposed?e.exposeProxy||(e.exposeProxy=new Proxy(ou(Qr(e.exposed)),{get(t,n){if(n in t)return t[n];if(n in Is)return Is[n](e)},has(t,n){return n in t||n in Is}})):e.proxy}function nv(e,t=!0){return ie(e)?e.displayName||e.name:e.name||t&&e.__name}function sv(e){return ie(e)&&"__vccOpts"in e}const at=(e,t)=>Km(e,t,as);function Xo(e,t,n){const s=arguments.length;return s===2?_e(t)&&!se(t)?os(t)?Ee(e,null,[t]):Ee(e,t):Ee(e,null,t):(s>3?n=Array.prototype.slice.call(arguments,2):s===3&&os(n)&&(n=[n]),Ee(e,t,n))}const rv="3.5.17";/** * @vue/runtime-dom v3.5.17 * (c) 2018-present Yuxi (Evan) You and Vue contributors * @license MIT -**/let no;const El=typeof window<"u"&&window.trustedTypes;if(El)try{no=El.createPolicy("vue",{createHTML:e=>e})}catch{}const Ju=no?e=>no.createHTML(e):e=>e,iv="http://www.w3.org/2000/svg",ov="http://www.w3.org/1998/Math/MathML",Pt=typeof document<"u"?document:null,yl=Pt&&Pt.createElement("template"),av={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"?Pt.createElementNS(iv,e):t==="mathml"?Pt.createElementNS(ov,e):n?Pt.createElement(e,{is:n}):Pt.createElement(e);return e==="select"&&s&&s.multiple!=null&&r.setAttribute("multiple",s.multiple),r},createText:e=>Pt.createTextNode(e),createComment:e=>Pt.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>Pt.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{yl.innerHTML=Ju(s==="svg"?`${e}`:s==="mathml"?`${e}`:e);const l=yl.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]}},Gt="transition",Ts="animation",ls=Symbol("_vtc"),Zu={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},ef=Ne({},Eu,Zu),lv=e=>(e.displayName="Transition",e.props=ef,e),bl=lv((e,{slots:t})=>Qo(Xm,tf(e),t)),bn=(e,t=[])=>{se(e)?e.forEach(n=>n(...t)):e&&e(...t)},Al=e=>e?se(e)?e.some(t=>t.length>1):e.length>1:!1;function tf(e){const t={};for(const B in e)B in Zu||(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:_=`${n}-leave-to`}=e,x=cv(r),A=x&&x[0],R=x&&x[1],{onBeforeEnter:P,onEnter:H,onEnterCancelled:F,onLeave:k,onLeaveCancelled:b,onBeforeAppear:y=P,onAppear:O=H,onAppearCancelled:w=F}=t,T=(B,Q,oe,de)=>{B._enterCancelled=de,zt(B,Q?f:l),zt(B,Q?d:a),oe&&oe()},S=(B,Q)=>{B._isLeaving=!1,zt(B,h),zt(B,_),zt(B,p),Q&&Q()},K=B=>(Q,oe)=>{const de=B?O:H,te=()=>T(Q,B,oe);bn(de,[Q,te]),Tl(()=>{zt(Q,B?c:o),Ct(Q,B?f:l),Al(de)||wl(Q,s,A,te)})};return Ne(t,{onBeforeEnter(B){bn(P,[B]),Ct(B,o),Ct(B,a)},onBeforeAppear(B){bn(y,[B]),Ct(B,c),Ct(B,d)},onEnter:K(!1),onAppear:K(!0),onLeave(B,Q){B._isLeaving=!0;const oe=()=>S(B,Q);Ct(B,h),B._enterCancelled?(Ct(B,p),so()):(so(),Ct(B,p)),Tl(()=>{B._isLeaving&&(zt(B,h),Ct(B,_),Al(k)||wl(B,s,R,oe))}),bn(k,[B,oe])},onEnterCancelled(B){T(B,!1,void 0,!0),bn(F,[B])},onAppearCancelled(B){T(B,!0,void 0,!0),bn(w,[B])},onLeaveCancelled(B){S(B),bn(b,[B])}})}function cv(e){if(e==null)return null;if(_e(e))return[Di(e.enter),Di(e.leave)];{const t=Di(e);return[t,t]}}function Di(e){return Mc(e)}function Ct(e,t){t.split(/\s+/).forEach(n=>n&&e.classList.add(n)),(e[ls]||(e[ls]=new Set)).add(t)}function zt(e,t){t.split(/\s+/).forEach(s=>s&&e.classList.remove(s));const n=e[ls];n&&(n.delete(t),n.size||(e[ls]=void 0))}function Tl(e){requestAnimationFrame(()=>{requestAnimationFrame(e)})}let uv=0;function wl(e,t,n,s){const r=e._endId=++uv,o=()=>{r===e._endId&&s()};if(n!=null)return setTimeout(o,n);const{type:a,timeout:l,propCount:c}=nf(e,t);if(!a)return s();const d=a+"end";let f=0;const h=()=>{e.removeEventListener(d,p),o()},p=_=>{_.target===e&&++f>=c&&h()};setTimeout(()=>{f(n[x]||"").split(", "),r=s(`${Gt}Delay`),o=s(`${Gt}Duration`),a=Cl(r,o),l=s(`${Ts}Delay`),c=s(`${Ts}Duration`),d=Cl(l,c);let f=null,h=0,p=0;t===Gt?a>0&&(f=Gt,h=a,p=o.length):t===Ts?d>0&&(f=Ts,h=d,p=c.length):(h=Math.max(a,d),f=h>0?a>d?Gt:Ts:null,p=f?f===Gt?o.length:c.length:0);const _=f===Gt&&/\b(transform|all)(,|$)/.test(s(`${Gt}Property`).toString());return{type:f,timeout:h,propCount:p,hasTransform:_}}function Cl(e,t){for(;e.lengthSl(n)+Sl(e[s])))}function Sl(e){return e==="auto"?0:Number(e.slice(0,-1).replace(",","."))*1e3}function so(){return document.body.offsetHeight}function fv(e,t,n){const s=e[ls];s&&(t=(t?[t,...s]:[...s]).join(" ")),t==null?e.removeAttribute("class"):n?e.setAttribute("class",t):e.className=t}const kr=Symbol("_vod"),sf=Symbol("_vsh"),Qy={beforeMount(e,{value:t},{transition:n}){e[kr]=e.style.display==="none"?"":e.style.display,n&&t?n.beforeEnter(e):ws(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),ws(e,!0),s.enter(e)):s.leave(e,()=>{ws(e,!1)}):ws(e,t))},beforeUnmount(e,{value:t}){ws(e,t)}};function ws(e,t){e.style.display=t?e[kr]:"none",e[sf]=!t}const rf=Symbol("");function Jy(e){const t=gs();if(!t)return;const n=t.ut=(r=e(t.proxy))=>{Array.from(document.querySelectorAll(`[data-v-owner="${t.uid}"]`)).forEach(o=>Vr(o,r))},s=()=>{const r=e(t.proxy);t.ce?Vr(t.ce,r):ro(t.subTree,r),n(r)};wu(()=>{Lr(s)}),Bo(()=>{On(s,vt,{flush:"post"});const r=new MutationObserver(s);r.observe(t.subTree.el.parentNode,{childList:!0}),jo(()=>r.disconnect())})}function ro(e,t){if(e.shapeFlag&128){const n=e.suspense;e=n.activeBranch,n.pendingBranch&&!n.isHydrating&&n.effects.push(()=>{ro(n.activeBranch,t)})}for(;e.component;)e=e.component.subTree;if(e.shapeFlag&1&&e.el)Vr(e.el,t);else if(e.type===Be)e.children.forEach(n=>ro(n,t));else if(e.type===wr){let{el:n,anchor:s}=e;for(;n&&(Vr(n,t),n!==s);)n=n.nextSibling}}function Vr(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[rf]=s}}const dv=/(^|;)\s*display\s*:/;function hv(e,t,n){const s=e.style,r=ye(n);let o=!1;if(n&&!r){if(t)if(ye(t))for(const a of t.split(";")){const l=a.slice(0,a.indexOf(":")).trim();n[l]==null&&Sr(s,l,"")}else for(const a in t)n[a]==null&&Sr(s,a,"");for(const a in n)a==="display"&&(o=!0),Sr(s,a,n[a])}else if(r){if(t!==n){const a=s[rf];a&&(n+=";"+a),s.cssText=n,o=dv.test(n)}}else t&&e.removeAttribute("style");kr in e&&(e[kr]=o?s.display:"",e[sf]&&(s.display="none"))}const Ol=/\s*!important$/;function Sr(e,t,n){if(se(n))n.forEach(s=>Sr(e,t,s));else if(n==null&&(n=""),t.startsWith("--"))e.setProperty(t,n);else{const s=pv(e,t);Ol.test(n)?e.setProperty(cn(s),n.replace(Ol,""),"important"):e[s]=n}}const xl=["Webkit","Moz","ms"],Li={};function pv(e,t){const n=Li[t];if(n)return n;let s=dt(t);if(s!=="filter"&&s in e)return Li[t]=s;s=Yr(s);for(let r=0;rIi||(vv.then(()=>Ii=0),Ii=Date.now());function yv(e,t){const n=s=>{if(!s._vts)s._vts=Date.now();else if(s._vts<=n.attached)return;bt(bv(s,n.value),t,5,[s])};return n.value=e,n.attached=Ev(),n}function bv(e,t){if(se(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 Il=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)>96&&e.charCodeAt(2)<123,Av=(e,t,n,s,r,o)=>{const a=r==="svg";t==="class"?fv(e,s,a):t==="style"?hv(e,n,s):Wr(t)?Co(t)||mv(e,t,n,s,o):(t[0]==="."?(t=t.slice(1),!0):t[0]==="^"?(t=t.slice(1),!1):Tv(e,t,s,a))?(Rl(e,t,s),!e.tagName.includes("-")&&(t==="value"||t==="checked"||t==="selected")&&$l(e,t,s,a,o,t!=="value")):e._isVueCE&&(/[A-Z]/.test(t)||!ye(s))?Rl(e,dt(t),s,o,t):(t==="true-value"?e._trueValue=s:t==="false-value"&&(e._falseValue=s),$l(e,t,s,a))};function Tv(e,t,n,s){if(s)return!!(t==="innerHTML"||t==="textContent"||t in e&&Il(t)&&ie(n));if(t==="spellcheck"||t==="draggable"||t==="translate"||t==="autocorrect"||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 Il(t)&&ye(n)?!1:t in e}const of=new WeakMap,af=new WeakMap,Fr=Symbol("_moveCb"),Pl=Symbol("_enterCb"),wv=e=>(delete e.props.mode,e),Cv=wv({name:"TransitionGroup",props:Ne({},ef,{tag:String,moveClass:String}),setup(e,{slots:t}){const n=gs(),s=vu();let r,o;return Cu(()=>{if(!r.length)return;const a=e.moveClass||`${e.name||"v"}-move`;if(!Nv(r[0].el,n.vnode.el,a)){r=[];return}r.forEach(Sv),r.forEach(Ov);const l=r.filter(xv);so(),l.forEach(c=>{const d=c.el,f=d.style;Ct(d,a),f.transform=f.webkitTransform=f.transitionDuration="";const h=d[Fr]=p=>{p&&p.target!==d||(!p||/transform$/.test(p.propertyName))&&(d.removeEventListener("transitionend",h),d[Fr]=null,zt(d,a))};d.addEventListener("transitionend",h)}),r=[]}),()=>{const a=fe(e),l=tf(a);let c=a.tag||Be;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}=nf(s);return o.removeChild(s),a}const an=e=>{const t=e.props["onUpdate:modelValue"]||!1;return se(t)?n=>br(t,n):t};function $v(e){e.target.composing=!0}function Ml(e){const t=e.target;t.composing&&(t.composing=!1,t.dispatchEvent(new Event("input")))}const ft=Symbol("_assign"),kl={created(e,{modifiers:{lazy:t,trim:n,number:s}},r){e[ft]=an(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=xr(l)),e[ft](l)}),n&&Ft(e,"change",()=>{e.value=e.value.trim()}),t||(Ft(e,"compositionstart",$v),Ft(e,"compositionend",Ml),Ft(e,"change",Ml))},mounted(e,{value:t}){e.value=t??""},beforeUpdate(e,{value:t,oldValue:n,modifiers:{lazy:s,trim:r,number:o}},a){if(e[ft]=an(a),e.composing)return;const l=(o||e.type==="number")&&!/^0\d/.test(e.value)?xr(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))}},Rv={deep:!0,created(e,t,n){e[ft]=an(n),Ft(e,"change",()=>{const s=e._modelValue,r=cs(e),o=e.checked,a=e[ft];if(se(s)){const l=No(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(hs(s)){const l=new Set(s);o?l.add(r):l.delete(r),a(l)}else a(lf(e,o))})},mounted:Vl,beforeUpdate(e,t,n){e[ft]=an(n),Vl(e,t,n)}};function Vl(e,{value:t,oldValue:n},s){e._modelValue=t;let r;if(se(t))r=No(t,s.props.value)>-1;else if(hs(t))r=t.has(s.props.value);else{if(t===n)return;r=$n(t,lf(e,!0))}e.checked!==r&&(e.checked=r)}const Dv={created(e,{value:t},n){e.checked=$n(t,n.props.value),e[ft]=an(n),Ft(e,"change",()=>{e[ft](cs(e))})},beforeUpdate(e,{value:t,oldValue:n},s){e[ft]=an(s),t!==n&&(e.checked=$n(t,s.props.value))}},Lv={deep:!0,created(e,{value:t,modifiers:{number:n}},s){const r=hs(t);Ft(e,"change",()=>{const o=Array.prototype.filter.call(e.options,a=>a.selected).map(a=>n?xr(cs(a)):cs(a));e[ft](e.multiple?r?new Set(o):o:o[0]),e._assigning=!0,Jr(()=>{e._assigning=!1})}),e[ft]=an(s)},mounted(e,{value:t}){Fl(e,t)},beforeUpdate(e,t,n){e[ft]=an(n)},updated(e,{value:t}){e._assigning||Fl(e,t)}};function Fl(e,t){const n=e.multiple,s=se(t);if(!(n&&!s&&!hs(t))){for(let r=0,o=e.options.length;rString(d)===String(l)):a.selected=No(t,l)>-1}else a.selected=t.has(l);else if($n(cs(a),t)){e.selectedIndex!==r&&(e.selectedIndex=r);return}}!n&&e.selectedIndex!==-1&&(e.selectedIndex=-1)}}function cs(e){return"_value"in e?e._value:e.value}function lf(e,t){const n=t?"_trueValue":"_falseValue";return n in e?e[n]:t}const eb={created(e,t,n){vr(e,t,n,null,"created")},mounted(e,t,n){vr(e,t,n,null,"mounted")},beforeUpdate(e,t,n,s){vr(e,t,n,s,"beforeUpdate")},updated(e,t,n,s){vr(e,t,n,s,"updated")}};function Iv(e,t){switch(e){case"SELECT":return Lv;case"TEXTAREA":return kl;default:switch(t){case"checkbox":return Rv;case"radio":return Dv;default:return kl}}}function vr(e,t,n,s,r){const a=Iv(e.tagName,n.props&&n.props.type)[r];a&&a(e,t,n,s)}const Pv=["ctrl","shift","alt","meta"],Mv={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)=>Pv.some(n=>e[`${n}Key`]&&!t.includes(n))},tb=(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=cn(r.key);if(t.some(a=>a===o||kv[a]===o))return e(r)})},Vv=Ne({patchProp:Av},av);let Hl;function cf(){return Hl||(Hl=w_(Vv))}const sb=(...e)=>{cf().render(...e)},Fv=(...e)=>{const t=cf().createApp(...e),{mount:n}=t;return t.mount=s=>{const r=Bv(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,Hv(r));return r instanceof Element&&(r.removeAttribute("v-cloak"),r.setAttribute("data-v-app","")),a},t};function Hv(e){if(e instanceof SVGElement)return"svg";if(typeof MathMLElement=="function"&&e instanceof MathMLElement)return"mathml"}function Bv(e){return ye(e)?document.querySelector(e):e}/*! +**/let no;const vl=typeof window<"u"&&window.trustedTypes;if(vl)try{no=vl.createPolicy("vue",{createHTML:e=>e})}catch{}const Ju=no?e=>no.createHTML(e):e=>e,iv="http://www.w3.org/2000/svg",ov="http://www.w3.org/1998/Math/MathML",Pt=typeof document<"u"?document:null,El=Pt&&Pt.createElement("template"),av={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"?Pt.createElementNS(iv,e):t==="mathml"?Pt.createElementNS(ov,e):n?Pt.createElement(e,{is:n}):Pt.createElement(e);return e==="select"&&s&&s.multiple!=null&&r.setAttribute("multiple",s.multiple),r},createText:e=>Pt.createTextNode(e),createComment:e=>Pt.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>Pt.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{El.innerHTML=Ju(s==="svg"?`${e}`:s==="mathml"?`${e}`:e);const l=El.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]}},Gt="transition",Ts="animation",ls=Symbol("_vtc"),Zu={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},ef=Ne({},vu,Zu),lv=e=>(e.displayName="Transition",e.props=ef,e),yl=lv((e,{slots:t})=>Xo(Xm,tf(e),t)),bn=(e,t=[])=>{se(e)?e.forEach(n=>n(...t)):e&&e(...t)},bl=e=>e?se(e)?e.some(t=>t.length>1):e.length>1:!1;function tf(e){const t={};for(const B in e)B in Zu||(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:_=`${n}-leave-to`}=e,x=cv(r),A=x&&x[0],R=x&&x[1],{onBeforeEnter:P,onEnter:H,onEnterCancelled:F,onLeave:k,onLeaveCancelled:b,onBeforeAppear:y=P,onAppear:O=H,onAppearCancelled:w=F}=t,T=(B,Q,oe,de)=>{B._enterCancelled=de,zt(B,Q?f:l),zt(B,Q?d:a),oe&&oe()},S=(B,Q)=>{B._isLeaving=!1,zt(B,h),zt(B,_),zt(B,p),Q&&Q()},K=B=>(Q,oe)=>{const de=B?O:H,te=()=>T(Q,B,oe);bn(de,[Q,te]),Al(()=>{zt(Q,B?c:o),Ct(Q,B?f:l),bl(de)||Tl(Q,s,A,te)})};return Ne(t,{onBeforeEnter(B){bn(P,[B]),Ct(B,o),Ct(B,a)},onBeforeAppear(B){bn(y,[B]),Ct(B,c),Ct(B,d)},onEnter:K(!1),onAppear:K(!0),onLeave(B,Q){B._isLeaving=!0;const oe=()=>S(B,Q);Ct(B,h),B._enterCancelled?(Ct(B,p),so()):(so(),Ct(B,p)),Al(()=>{B._isLeaving&&(zt(B,h),Ct(B,_),bl(k)||Tl(B,s,R,oe))}),bn(k,[B,oe])},onEnterCancelled(B){T(B,!1,void 0,!0),bn(F,[B])},onAppearCancelled(B){T(B,!0,void 0,!0),bn(w,[B])},onLeaveCancelled(B){S(B),bn(b,[B])}})}function cv(e){if(e==null)return null;if(_e(e))return[Di(e.enter),Di(e.leave)];{const t=Di(e);return[t,t]}}function Di(e){return Pc(e)}function Ct(e,t){t.split(/\s+/).forEach(n=>n&&e.classList.add(n)),(e[ls]||(e[ls]=new Set)).add(t)}function zt(e,t){t.split(/\s+/).forEach(s=>s&&e.classList.remove(s));const n=e[ls];n&&(n.delete(t),n.size||(e[ls]=void 0))}function Al(e){requestAnimationFrame(()=>{requestAnimationFrame(e)})}let uv=0;function Tl(e,t,n,s){const r=e._endId=++uv,o=()=>{r===e._endId&&s()};if(n!=null)return setTimeout(o,n);const{type:a,timeout:l,propCount:c}=nf(e,t);if(!a)return s();const d=a+"end";let f=0;const h=()=>{e.removeEventListener(d,p),o()},p=_=>{_.target===e&&++f>=c&&h()};setTimeout(()=>{f(n[x]||"").split(", "),r=s(`${Gt}Delay`),o=s(`${Gt}Duration`),a=wl(r,o),l=s(`${Ts}Delay`),c=s(`${Ts}Duration`),d=wl(l,c);let f=null,h=0,p=0;t===Gt?a>0&&(f=Gt,h=a,p=o.length):t===Ts?d>0&&(f=Ts,h=d,p=c.length):(h=Math.max(a,d),f=h>0?a>d?Gt:Ts:null,p=f?f===Gt?o.length:c.length:0);const _=f===Gt&&/\b(transform|all)(,|$)/.test(s(`${Gt}Property`).toString());return{type:f,timeout:h,propCount:p,hasTransform:_}}function wl(e,t){for(;e.lengthCl(n)+Cl(e[s])))}function Cl(e){return e==="auto"?0:Number(e.slice(0,-1).replace(",","."))*1e3}function so(){return document.body.offsetHeight}function fv(e,t,n){const s=e[ls];s&&(t=(t?[t,...s]:[...s]).join(" ")),t==null?e.removeAttribute("class"):n?e.setAttribute("class",t):e.className=t}const kr=Symbol("_vod"),sf=Symbol("_vsh"),Xy={beforeMount(e,{value:t},{transition:n}){e[kr]=e.style.display==="none"?"":e.style.display,n&&t?n.beforeEnter(e):ws(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),ws(e,!0),s.enter(e)):s.leave(e,()=>{ws(e,!1)}):ws(e,t))},beforeUnmount(e,{value:t}){ws(e,t)}};function ws(e,t){e.style.display=t?e[kr]:"none",e[sf]=!t}const rf=Symbol("");function Qy(e){const t=gs();if(!t)return;const n=t.ut=(r=e(t.proxy))=>{Array.from(document.querySelectorAll(`[data-v-owner="${t.uid}"]`)).forEach(o=>Vr(o,r))},s=()=>{const r=e(t.proxy);t.ce?Vr(t.ce,r):ro(t.subTree,r),n(r)};Tu(()=>{Lr(s)}),Bo(()=>{On(s,vt,{flush:"post"});const r=new MutationObserver(s);r.observe(t.subTree.el.parentNode,{childList:!0}),jo(()=>r.disconnect())})}function ro(e,t){if(e.shapeFlag&128){const n=e.suspense;e=n.activeBranch,n.pendingBranch&&!n.isHydrating&&n.effects.push(()=>{ro(n.activeBranch,t)})}for(;e.component;)e=e.component.subTree;if(e.shapeFlag&1&&e.el)Vr(e.el,t);else if(e.type===Be)e.children.forEach(n=>ro(n,t));else if(e.type===wr){let{el:n,anchor:s}=e;for(;n&&(Vr(n,t),n!==s);)n=n.nextSibling}}function Vr(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[rf]=s}}const dv=/(^|;)\s*display\s*:/;function hv(e,t,n){const s=e.style,r=ye(n);let o=!1;if(n&&!r){if(t)if(ye(t))for(const a of t.split(";")){const l=a.slice(0,a.indexOf(":")).trim();n[l]==null&&Sr(s,l,"")}else for(const a in t)n[a]==null&&Sr(s,a,"");for(const a in n)a==="display"&&(o=!0),Sr(s,a,n[a])}else if(r){if(t!==n){const a=s[rf];a&&(n+=";"+a),s.cssText=n,o=dv.test(n)}}else t&&e.removeAttribute("style");kr in e&&(e[kr]=o?s.display:"",e[sf]&&(s.display="none"))}const Sl=/\s*!important$/;function Sr(e,t,n){if(se(n))n.forEach(s=>Sr(e,t,s));else if(n==null&&(n=""),t.startsWith("--"))e.setProperty(t,n);else{const s=pv(e,t);Sl.test(n)?e.setProperty(cn(s),n.replace(Sl,""),"important"):e[s]=n}}const Ol=["Webkit","Moz","ms"],Li={};function pv(e,t){const n=Li[t];if(n)return n;let s=dt(t);if(s!=="filter"&&s in e)return Li[t]=s;s=Yr(s);for(let r=0;rIi||(vv.then(()=>Ii=0),Ii=Date.now());function yv(e,t){const n=s=>{if(!s._vts)s._vts=Date.now();else if(s._vts<=n.attached)return;bt(bv(s,n.value),t,5,[s])};return n.value=e,n.attached=Ev(),n}function bv(e,t){if(se(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 Ll=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)>96&&e.charCodeAt(2)<123,Av=(e,t,n,s,r,o)=>{const a=r==="svg";t==="class"?fv(e,s,a):t==="style"?hv(e,n,s):Wr(t)?Co(t)||mv(e,t,n,s,o):(t[0]==="."?(t=t.slice(1),!0):t[0]==="^"?(t=t.slice(1),!1):Tv(e,t,s,a))?($l(e,t,s),!e.tagName.includes("-")&&(t==="value"||t==="checked"||t==="selected")&&Nl(e,t,s,a,o,t!=="value")):e._isVueCE&&(/[A-Z]/.test(t)||!ye(s))?$l(e,dt(t),s,o,t):(t==="true-value"?e._trueValue=s:t==="false-value"&&(e._falseValue=s),Nl(e,t,s,a))};function Tv(e,t,n,s){if(s)return!!(t==="innerHTML"||t==="textContent"||t in e&&Ll(t)&&ie(n));if(t==="spellcheck"||t==="draggable"||t==="translate"||t==="autocorrect"||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 Ll(t)&&ye(n)?!1:t in e}const of=new WeakMap,af=new WeakMap,Fr=Symbol("_moveCb"),Il=Symbol("_enterCb"),wv=e=>(delete e.props.mode,e),Cv=wv({name:"TransitionGroup",props:Ne({},ef,{tag:String,moveClass:String}),setup(e,{slots:t}){const n=gs(),s=_u();let r,o;return wu(()=>{if(!r.length)return;const a=e.moveClass||`${e.name||"v"}-move`;if(!Nv(r[0].el,n.vnode.el,a)){r=[];return}r.forEach(Sv),r.forEach(Ov);const l=r.filter(xv);so(),l.forEach(c=>{const d=c.el,f=d.style;Ct(d,a),f.transform=f.webkitTransform=f.transitionDuration="";const h=d[Fr]=p=>{p&&p.target!==d||(!p||/transform$/.test(p.propertyName))&&(d.removeEventListener("transitionend",h),d[Fr]=null,zt(d,a))};d.addEventListener("transitionend",h)}),r=[]}),()=>{const a=fe(e),l=tf(a);let c=a.tag||Be;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}=nf(s);return o.removeChild(s),a}const an=e=>{const t=e.props["onUpdate:modelValue"]||!1;return se(t)?n=>br(t,n):t};function $v(e){e.target.composing=!0}function Pl(e){const t=e.target;t.composing&&(t.composing=!1,t.dispatchEvent(new Event("input")))}const ft=Symbol("_assign"),Ml={created(e,{modifiers:{lazy:t,trim:n,number:s}},r){e[ft]=an(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=xr(l)),e[ft](l)}),n&&Ft(e,"change",()=>{e.value=e.value.trim()}),t||(Ft(e,"compositionstart",$v),Ft(e,"compositionend",Pl),Ft(e,"change",Pl))},mounted(e,{value:t}){e.value=t??""},beforeUpdate(e,{value:t,oldValue:n,modifiers:{lazy:s,trim:r,number:o}},a){if(e[ft]=an(a),e.composing)return;const l=(o||e.type==="number")&&!/^0\d/.test(e.value)?xr(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))}},Rv={deep:!0,created(e,t,n){e[ft]=an(n),Ft(e,"change",()=>{const s=e._modelValue,r=cs(e),o=e.checked,a=e[ft];if(se(s)){const l=No(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(hs(s)){const l=new Set(s);o?l.add(r):l.delete(r),a(l)}else a(lf(e,o))})},mounted:kl,beforeUpdate(e,t,n){e[ft]=an(n),kl(e,t,n)}};function kl(e,{value:t,oldValue:n},s){e._modelValue=t;let r;if(se(t))r=No(t,s.props.value)>-1;else if(hs(t))r=t.has(s.props.value);else{if(t===n)return;r=$n(t,lf(e,!0))}e.checked!==r&&(e.checked=r)}const Dv={created(e,{value:t},n){e.checked=$n(t,n.props.value),e[ft]=an(n),Ft(e,"change",()=>{e[ft](cs(e))})},beforeUpdate(e,{value:t,oldValue:n},s){e[ft]=an(s),t!==n&&(e.checked=$n(t,s.props.value))}},Lv={deep:!0,created(e,{value:t,modifiers:{number:n}},s){const r=hs(t);Ft(e,"change",()=>{const o=Array.prototype.filter.call(e.options,a=>a.selected).map(a=>n?xr(cs(a)):cs(a));e[ft](e.multiple?r?new Set(o):o:o[0]),e._assigning=!0,Jr(()=>{e._assigning=!1})}),e[ft]=an(s)},mounted(e,{value:t}){Vl(e,t)},beforeUpdate(e,t,n){e[ft]=an(n)},updated(e,{value:t}){e._assigning||Vl(e,t)}};function Vl(e,t){const n=e.multiple,s=se(t);if(!(n&&!s&&!hs(t))){for(let r=0,o=e.options.length;rString(d)===String(l)):a.selected=No(t,l)>-1}else a.selected=t.has(l);else if($n(cs(a),t)){e.selectedIndex!==r&&(e.selectedIndex=r);return}}!n&&e.selectedIndex!==-1&&(e.selectedIndex=-1)}}function cs(e){return"_value"in e?e._value:e.value}function lf(e,t){const n=t?"_trueValue":"_falseValue";return n in e?e[n]:t}const Zy={created(e,t,n){vr(e,t,n,null,"created")},mounted(e,t,n){vr(e,t,n,null,"mounted")},beforeUpdate(e,t,n,s){vr(e,t,n,s,"beforeUpdate")},updated(e,t,n,s){vr(e,t,n,s,"updated")}};function Iv(e,t){switch(e){case"SELECT":return Lv;case"TEXTAREA":return Ml;default:switch(t){case"checkbox":return Rv;case"radio":return Dv;default:return Ml}}}function vr(e,t,n,s,r){const a=Iv(e.tagName,n.props&&n.props.type)[r];a&&a(e,t,n,s)}const Pv=["ctrl","shift","alt","meta"],Mv={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)=>Pv.some(n=>e[`${n}Key`]&&!t.includes(n))},eb=(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=cn(r.key);if(t.some(a=>a===o||kv[a]===o))return e(r)})},Vv=Ne({patchProp:Av},av);let Fl;function cf(){return Fl||(Fl=w_(Vv))}const nb=(...e)=>{cf().render(...e)},Fv=(...e)=>{const t=cf().createApp(...e),{mount:n}=t;return t.mount=s=>{const r=Bv(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,Hv(r));return r instanceof Element&&(r.removeAttribute("v-cloak"),r.setAttribute("data-v-app","")),a},t};function Hv(e){if(e instanceof SVGElement)return"svg";if(typeof MathMLElement=="function"&&e instanceof MathMLElement)return"mathml"}function Bv(e){return ye(e)?document.querySelector(e):e}/*! * pinia v3.0.3 * (c) 2025 Eduardo San Martin Morote * @license MIT - */let uf;const si=e=>uf=e,ff=Symbol();function io(e){return e&&typeof e=="object"&&Object.prototype.toString.call(e)==="[object Object]"&&typeof e.toJSON!="function"}var Ms;(function(e){e.direct="direct",e.patchObject="patch object",e.patchFunction="patch function"})(Ms||(Ms={}));function jv(){const e=Bc(!0),t=e.run(()=>Cn({}));let n=[],s=[];const r=Qr({install(o){si(r),r._a=o,o.provide(ff,r),o.config.globalProperties.$pinia=r,s.forEach(a=>n.push(a)),s=[]},use(o){return this._a?n.push(o):s.push(o),this},_p:n,_a:null,_e:e,_s:new Map,state:t});return r}const df=()=>{};function Bl(e,t,n,s=df){e.push(t);const r=()=>{const o=e.indexOf(t);o>-1&&(e.splice(o,1),s())};return!n&&jc()&&_m(r),r}function Kn(e,...t){e.slice().forEach(n=>{n(...t)})}const Kv=e=>e(),jl=Symbol(),Pi=Symbol();function oo(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];io(r)&&io(s)&&e.hasOwnProperty(n)&&!Ae(s)&&!sn(s)?e[n]=oo(r,s):e[n]=s}return e}const Wv=Symbol();function Uv(e){return!io(e)||!Object.prototype.hasOwnProperty.call(e,Wv)}const{assign:Xt}=Object;function Yv(e){return!!(Ae(e)&&e.effect)}function Gv(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=Fm(n.state.value[e]);return Xt(f,o,Object.keys(a||{}).reduce((h,p)=>(h[p]=Qr(at(()=>{si(n);const _=n._s.get(e);return a[p].call(_,_)})),h),{}))}return c=hf(e,d,t,n,s,!0),c}function hf(e,t,n={},s,r,o){let a;const l=Xt({actions:{}},n),c={deep:!0};let d,f,h=[],p=[],_;const x=s.state.value[e];!o&&!x&&(s.state.value[e]={}),Cn({});let A;function R(w){let T;d=f=!1,typeof w=="function"?(w(s.state.value[e]),T={type:Ms.patchFunction,storeId:e,events:_}):(oo(s.state.value[e],w),T={type:Ms.patchObject,payload:w,storeId:e,events:_});const S=A=Symbol();Jr().then(()=>{A===S&&(d=!0)}),f=!0,Kn(h,T,s.state.value[e])}const P=o?function(){const{state:T}=n,S=T?T():{};this.$patch(K=>{Xt(K,S)})}:df;function H(){a.stop(),h=[],p=[],s._s.delete(e)}const F=(w,T="")=>{if(jl in w)return w[Pi]=T,w;const S=function(){si(s);const K=Array.from(arguments),B=[],Q=[];function oe(ee){B.push(ee)}function de(ee){Q.push(ee)}Kn(p,{args:K,name:S[Pi],store:b,after:oe,onError:de});let te;try{te=w.apply(this&&this.$id===e?this:b,K)}catch(ee){throw Kn(Q,ee),ee}return te instanceof Promise?te.then(ee=>(Kn(B,ee),ee)).catch(ee=>(Kn(Q,ee),Promise.reject(ee))):(Kn(B,te),te)};return S[jl]=!0,S[Pi]=T,S},k={_p:s,$id:e,$onAction:Bl.bind(null,p),$patch:R,$reset:P,$subscribe(w,T={}){const S=Bl(h,w,T.detached,()=>K()),K=a.run(()=>On(()=>s.state.value[e],B=>{(T.flush==="sync"?f:d)&&w({storeId:e,type:Ms.direct,events:_},B)},Xt({},c,T)));return S},$dispose:H},b=zs(k);s._s.set(e,b);const O=(s._a&&s._a.runWithContext||Kv)(()=>s._e.run(()=>(a=Bc()).run(()=>t({action:F}))));for(const w in O){const T=O[w];if(Ae(T)&&!Yv(T)||sn(T))o||(x&&Uv(T)&&(Ae(T)?T.value=x[w]:oo(T,x[w])),s.state.value[e][w]=T);else if(typeof T=="function"){const S=F(T,w);O[w]=S,l.actions[w]=T}}return Xt(b,O),Xt(fe(b),O),Object.defineProperty(b,"$state",{get:()=>s.state.value[e],set:w=>{R(T=>{Xt(T,w)})}}),s._p.forEach(w=>{Xt(b,a.run(()=>w({store:b,app:s._a,pinia:s,options:l})))}),x&&o&&n.hydrate&&n.hydrate(b.$state,x),d=!0,f=!0,b}/*! #__NO_SIDE_EFFECTS__ */function pf(e,t,n){let s;const r=typeof t=="function";s=r?n:t;function o(a,l){const c=__();return a=a||(c?ut(ff,null):null),a&&si(a),a=uf,a._s.has(e)||(r?hf(e,t,s,a):Gv(e,s,a)),a._s.get(e)}return o.$id=e,o}const qv="/static/app/dist/img/Logo-2-Rounded-512x512.png";/*! + */let uf;const si=e=>uf=e,ff=Symbol();function io(e){return e&&typeof e=="object"&&Object.prototype.toString.call(e)==="[object Object]"&&typeof e.toJSON!="function"}var Ms;(function(e){e.direct="direct",e.patchObject="patch object",e.patchFunction="patch function"})(Ms||(Ms={}));function jv(){const e=Hc(!0),t=e.run(()=>Cn({}));let n=[],s=[];const r=Qr({install(o){si(r),r._a=o,o.provide(ff,r),o.config.globalProperties.$pinia=r,s.forEach(a=>n.push(a)),s=[]},use(o){return this._a?n.push(o):s.push(o),this},_p:n,_a:null,_e:e,_s:new Map,state:t});return r}const df=()=>{};function Hl(e,t,n,s=df){e.push(t);const r=()=>{const o=e.indexOf(t);o>-1&&(e.splice(o,1),s())};return!n&&Bc()&&_m(r),r}function Kn(e,...t){e.slice().forEach(n=>{n(...t)})}const Kv=e=>e(),Bl=Symbol(),Pi=Symbol();function oo(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];io(r)&&io(s)&&e.hasOwnProperty(n)&&!Ae(s)&&!sn(s)?e[n]=oo(r,s):e[n]=s}return e}const Wv=Symbol();function Uv(e){return!io(e)||!Object.prototype.hasOwnProperty.call(e,Wv)}const{assign:Xt}=Object;function Yv(e){return!!(Ae(e)&&e.effect)}function Gv(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=Fm(n.state.value[e]);return Xt(f,o,Object.keys(a||{}).reduce((h,p)=>(h[p]=Qr(at(()=>{si(n);const _=n._s.get(e);return a[p].call(_,_)})),h),{}))}return c=hf(e,d,t,n,s,!0),c}function hf(e,t,n={},s,r,o){let a;const l=Xt({actions:{}},n),c={deep:!0};let d,f,h=[],p=[],_;const x=s.state.value[e];!o&&!x&&(s.state.value[e]={}),Cn({});let A;function R(w){let T;d=f=!1,typeof w=="function"?(w(s.state.value[e]),T={type:Ms.patchFunction,storeId:e,events:_}):(oo(s.state.value[e],w),T={type:Ms.patchObject,payload:w,storeId:e,events:_});const S=A=Symbol();Jr().then(()=>{A===S&&(d=!0)}),f=!0,Kn(h,T,s.state.value[e])}const P=o?function(){const{state:T}=n,S=T?T():{};this.$patch(K=>{Xt(K,S)})}:df;function H(){a.stop(),h=[],p=[],s._s.delete(e)}const F=(w,T="")=>{if(Bl in w)return w[Pi]=T,w;const S=function(){si(s);const K=Array.from(arguments),B=[],Q=[];function oe(ee){B.push(ee)}function de(ee){Q.push(ee)}Kn(p,{args:K,name:S[Pi],store:b,after:oe,onError:de});let te;try{te=w.apply(this&&this.$id===e?this:b,K)}catch(ee){throw Kn(Q,ee),ee}return te instanceof Promise?te.then(ee=>(Kn(B,ee),ee)).catch(ee=>(Kn(Q,ee),Promise.reject(ee))):(Kn(B,te),te)};return S[Bl]=!0,S[Pi]=T,S},k={_p:s,$id:e,$onAction:Hl.bind(null,p),$patch:R,$reset:P,$subscribe(w,T={}){const S=Hl(h,w,T.detached,()=>K()),K=a.run(()=>On(()=>s.state.value[e],B=>{(T.flush==="sync"?f:d)&&w({storeId:e,type:Ms.direct,events:_},B)},Xt({},c,T)));return S},$dispose:H},b=zs(k);s._s.set(e,b);const O=(s._a&&s._a.runWithContext||Kv)(()=>s._e.run(()=>(a=Hc()).run(()=>t({action:F}))));for(const w in O){const T=O[w];if(Ae(T)&&!Yv(T)||sn(T))o||(x&&Uv(T)&&(Ae(T)?T.value=x[w]:oo(T,x[w])),s.state.value[e][w]=T);else if(typeof T=="function"){const S=F(T,w);O[w]=S,l.actions[w]=T}}return Xt(b,O),Xt(fe(b),O),Object.defineProperty(b,"$state",{get:()=>s.state.value[e],set:w=>{R(T=>{Xt(T,w)})}}),s._p.forEach(w=>{Xt(b,a.run(()=>w({store:b,app:s._a,pinia:s,options:l})))}),x&&o&&n.hydrate&&n.hydrate(b.$state,x),d=!0,f=!0,b}/*! #__NO_SIDE_EFFECTS__ */function pf(e,t,n){let s;const r=typeof t=="function";s=r?n:t;function o(a,l){const c=__();return a=a||(c?ut(ff,null):null),a&&si(a),a=uf,a._s.has(e)||(r?hf(e,t,s,a):Gv(e,s,a)),a._s.get(e)}return o.$id=e,o}const qv="/static/app/dist/img/Logo-2-Rounded-512x512.png";/*! * vue-router v4.5.1 * (c) 2025 Eduardo San Martin Morote * @license MIT - */const Gn=typeof document<"u";function gf(e){return typeof e=="object"||"displayName"in e||"props"in e||"__vccOpts"in e}function zv(e){return e.__esModule||e[Symbol.toStringTag]==="Module"||e.default&&gf(e.default)}const pe=Object.assign;function Mi(e,t){const n={};for(const s in t){const r=t[s];n[s]=At(r)?r.map(e):e(r)}return n}const ks=()=>{},At=Array.isArray,mf=/#/g,Xv=/&/g,Qv=/\//g,Jv=/=/g,Zv=/\?/g,_f=/\+/g,eE=/%5B/g,tE=/%5D/g,vf=/%5E/g,nE=/%60/g,Ef=/%7B/g,sE=/%7C/g,yf=/%7D/g,rE=/%20/g;function Jo(e){return encodeURI(""+e).replace(sE,"|").replace(eE,"[").replace(tE,"]")}function iE(e){return Jo(e).replace(Ef,"{").replace(yf,"}").replace(vf,"^")}function ao(e){return Jo(e).replace(_f,"%2B").replace(rE,"+").replace(mf,"%23").replace(Xv,"%26").replace(nE,"`").replace(Ef,"{").replace(yf,"}").replace(vf,"^")}function oE(e){return ao(e).replace(Jv,"%3D")}function aE(e){return Jo(e).replace(mf,"%23").replace(Zv,"%3F")}function lE(e){return e==null?"":aE(e).replace(Qv,"%2F")}function Us(e){try{return decodeURIComponent(""+e)}catch{}return""+e}const cE=/\/$/,uE=e=>e.replace(cE,"");function ki(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=pE(s??t,n),{fullPath:s+(o&&"?")+o+a,path:s,query:r,hash:Us(a)}}function fE(e,t){const n=t.query?e(t.query):"";return t.path+(n&&"?")+n+(t.hash||"")}function Kl(e,t){return!t||!e.toLowerCase().startsWith(t.toLowerCase())?e:e.slice(t.length)||"/"}function dE(e,t,n){const s=t.matched.length-1,r=n.matched.length-1;return s>-1&&s===r&&us(t.matched[s],n.matched[r])&&bf(t.params,n.params)&&e(t.query)===e(n.query)&&t.hash===n.hash}function us(e,t){return(e.aliasOf||e)===(t.aliasOf||t)}function bf(e,t){if(Object.keys(e).length!==Object.keys(t).length)return!1;for(const n in e)if(!hE(e[n],t[n]))return!1;return!0}function hE(e,t){return At(e)?Wl(e,t):At(t)?Wl(t,e):e===t}function Wl(e,t){return At(t)?e.length===t.length&&e.every((n,s)=>n===t[s]):e.length===1&&e[0]===t}function pE(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 qt={path:"/",name:void 0,params:{},query:{},hash:"",fullPath:"/",matched:[],meta:{},redirectedFrom:void 0};var Ys;(function(e){e.pop="pop",e.push="push"})(Ys||(Ys={}));var Vs;(function(e){e.back="back",e.forward="forward",e.unknown=""})(Vs||(Vs={}));function gE(e){if(!e)if(Gn){const t=document.querySelector("base");e=t&&t.getAttribute("href")||"/",e=e.replace(/^\w+:\/\/[^\/]+/,"")}else e="/";return e[0]!=="/"&&e[0]!=="#"&&(e="/"+e),uE(e)}const mE=/^[^#]+#/;function _E(e,t){return e.replace(mE,"#")+t}function vE(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 ri=()=>({left:window.scrollX,top:window.scrollY});function EE(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=vE(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 Ul(e,t){return(history.state?history.state.position-t:-1)+e}const lo=new Map;function yE(e,t){lo.set(e,t)}function bE(e){const t=lo.get(e);return lo.delete(e),t}let AE=()=>location.protocol+"//"+location.host;function Af(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),Kl(c,"")}return Kl(n,e)+s+r}function TE(e,t,n,s){let r=[],o=[],a=null;const l=({state:p})=>{const _=Af(e,location),x=n.value,A=t.value;let R=0;if(p){if(n.value=_,t.value=p,a&&a===x){a=null;return}R=A?p.position-A.position:0}else s(_);r.forEach(P=>{P(n.value,x,{delta:R,type:Ys.pop,direction:R?R>0?Vs.forward:Vs.back:Vs.unknown})})};function c(){a=n.value}function d(p){r.push(p);const _=()=>{const x=r.indexOf(p);x>-1&&r.splice(x,1)};return o.push(_),_}function f(){const{history:p}=window;p.state&&p.replaceState(pe({},p.state,{scroll:ri()}),"")}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 Yl(e,t,n,s=!1,r=!1){return{back:e,current:t,forward:n,replaced:s,position:window.history.length,scroll:r?ri():null}}function wE(e){const{history:t,location:n}=window,s={value:Af(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:AE()+e+c;try{t[f?"replaceState":"pushState"](d,"",p),r.value=d}catch(_){console.error(_),n[f?"replace":"assign"](p)}}function a(c,d){const f=pe({},t.state,Yl(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=pe({},r.value,t.state,{forward:c,scroll:ri()});o(f.current,f,!0);const h=pe({},Yl(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 CE(e){e=gE(e);const t=wE(e),n=TE(e,t.state,t.location,t.replace);function s(o,a=!0){a||n.pauseListeners(),history.go(o)}const r=pe({location:"",base:e,go:s,createHref:_E.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 SE(e){return e=location.host?e||location.pathname+location.search:"",e.includes("#")||(e+="#"),CE(e)}function OE(e){return typeof e=="string"||e&&typeof e=="object"}function Tf(e){return typeof e=="string"||typeof e=="symbol"}const wf=Symbol("");var Gl;(function(e){e[e.aborted=4]="aborted",e[e.cancelled=8]="cancelled",e[e.duplicated=16]="duplicated"})(Gl||(Gl={}));function fs(e,t){return pe(new Error,{type:e,[wf]:!0},t)}function It(e,t){return e instanceof Error&&wf in e&&(t==null||!!(e.type&t))}const ql="[^/]+?",xE={sensitive:!1,strict:!1,start:!0,end:!0},NE=/[.+*?^${}()[\]/\\]/g;function $E(e,t){const n=pe({},xE,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 Cf(e,t){let n=0;const s=e.score,r=t.score;for(;n0&&t[t.length-1]<0}const DE={type:0,value:""},LE=/[a-zA-Z0-9_]/;function IE(e){if(!e)return[[]];if(e==="/")return[[DE]];if(!e.startsWith("/"))throw new Error(`Invalid path "${e}"`);function t(_){throw new Error(`ERR (${n})/"${d}": ${_}`)}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(F)}:ks}function a(h){if(Tf(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=FE(h,n);n.splice(p,0,h),h.record.name&&!Jl(h)&&s.set(h.record.name,h)}function d(h,p){let _,x={},A,R;if("name"in h&&h.name){if(_=s.get(h.name),!_)throw fs(1,{location:h});R=_.record.name,x=pe(Xl(p.params,_.keys.filter(F=>!F.optional).concat(_.parent?_.parent.keys.filter(F=>F.optional):[]).map(F=>F.name)),h.params&&Xl(h.params,_.keys.map(F=>F.name))),A=_.stringify(x)}else if(h.path!=null)A=h.path,_=n.find(F=>F.re.test(A)),_&&(x=_.parse(A),R=_.record.name);else{if(_=p.name?s.get(p.name):n.find(F=>F.re.test(p.path)),!_)throw fs(1,{location:h,currentLocation:p});R=_.record.name,x=pe({},p.params,h.params),A=_.stringify(x)}const P=[];let H=_;for(;H;)P.unshift(H.record),H=H.parent;return{name:R,path:A,params:x,matched:P,meta:VE(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 Xl(e,t){const n={};for(const s of t)s in e&&(n[s]=e[s]);return n}function Ql(e){const t={path:e.path,redirect:e.redirect,name:e.name,meta:e.meta||{},aliasOf:e.aliasOf,beforeEnter:e.beforeEnter,props:kE(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 kE(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 Jl(e){for(;e;){if(e.record.aliasOf)return!0;e=e.parent}return!1}function VE(e){return e.reduce((t,n)=>pe(t,n.meta),{})}function Zl(e,t){const n={};for(const s in e)n[s]=s in t?t[s]:e[s];return n}function FE(e,t){let n=0,s=t.length;for(;n!==s;){const o=n+s>>1;Cf(e,t[o])<0?s=o:n=o+1}const r=HE(e);return r&&(s=t.lastIndexOf(r,s-1)),s}function HE(e){let t=e;for(;t=t.parent;)if(Sf(t)&&Cf(e,t)===0)return t}function Sf({record:e}){return!!(e.name||e.components&&Object.keys(e.components).length||e.redirect)}function BE(e){const t={};if(e===""||e==="?")return t;const s=(e[0]==="?"?e.slice(1):e).split("&");for(let r=0;ro&&ao(o)):[s&&ao(s)]).forEach(o=>{o!==void 0&&(t+=(t.length?"&":"")+n,o!=null&&(t+="="+o))})}return t}function jE(e){const t={};for(const n in e){const s=e[n];s!==void 0&&(t[n]=At(s)?s.map(r=>r==null?null:""+r):s==null?s:""+s)}return t}const KE=Symbol(""),tc=Symbol(""),ii=Symbol(""),Zo=Symbol(""),co=Symbol("");function Cs(){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 en(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(fs(4,{from:n,to:t})):p instanceof Error?c(p):OE(p)?c(fs(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 Vi(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(gf(c)){const f=(c.__vccOpts||c)[t];f&&o.push(en(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=zv(f)?f.default:f;a.mods[l]=f,a.components[l]=h;const _=(h.__vccOpts||h)[t];return _&&en(_,n,s,a,l,r)()}))}}return o}function nc(e){const t=ut(ii),n=ut(Zo),s=at(()=>{const c=ot(e.to);return t.resolve(c)}),r=at(()=>{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(us.bind(null,f));if(p>-1)return p;const _=sc(c[d-2]);return d>1&&sc(f)===_&&h[h.length-1].path!==_?h.findIndex(us.bind(null,c[d-2])):p}),o=at(()=>r.value>-1&&qE(n.params,s.value.params)),a=at(()=>r.value>-1&&r.value===n.matched.length-1&&bf(n.params,s.value.params));function l(c={}){if(GE(c)){const d=t[ot(e.replace)?"replace":"push"](ot(e.to)).catch(ks);return e.viewTransition&&typeof document<"u"&&"startViewTransition"in document&&document.startViewTransition(()=>d),d}return Promise.resolve()}return{route:s,href:at(()=>s.value.href),isActive:o,isExactActive:a,navigate:l}}function WE(e){return e.length===1?e[0]:e}const UE=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"},viewTransition:Boolean},useLink:nc,setup(e,{slots:t}){const n=zs(nc(e)),{options:s}=ut(ii),r=at(()=>({[rc(e.activeClass,s.linkActiveClass,"router-link-active")]:n.isActive,[rc(e.exactActiveClass,s.linkExactActiveClass,"router-link-exact-active")]:n.isExactActive}));return()=>{const o=t.default&&WE(t.default(n));return e.custom?o:Qo("a",{"aria-current":n.isExactActive?e.ariaCurrentValue:null,href:n.href,onClick:n.navigate,class:r.value},o)}}}),YE=UE;function GE(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 qE(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(!At(r)||r.length!==s.length||s.some((o,a)=>o!==r[a]))return!1}return!0}function sc(e){return e?e.aliasOf?e.aliasOf.path:e.path:""}const rc=(e,t,n)=>e??t??n,zE=Fo({name:"RouterView",inheritAttrs:!1,props:{name:{type:String,default:"default"},route:Object},compatConfig:{MODE:3},setup(e,{attrs:t,slots:n}){const s=ut(co),r=at(()=>e.route||s.value),o=ut(tc,0),a=at(()=>{let d=ot(o);const{matched:f}=r.value;let h;for(;(h=f[d])&&!h.components;)d++;return d}),l=at(()=>r.value.matched[a.value]);Tr(tc,at(()=>a.value+1)),Tr(KE,l),Tr(co,r);const c=Cn();return On(()=>[c.value,l.value,e.name],([d,f,h],[p,_,x])=>{f&&(f.instances[h]=d,_&&_!==f&&d&&d===p&&(f.leaveGuards.size||(f.leaveGuards=_.leaveGuards),f.updateGuards.size||(f.updateGuards=_.updateGuards))),d&&f&&(!_||!us(f,_)||!p)&&(f.enterCallbacks[h]||[]).forEach(A=>A(d))},{flush:"post"}),()=>{const d=r.value,f=e.name,h=l.value,p=h&&h.components[f];if(!p)return ic(n.default,{Component:p,route:d});const _=h.props[f],x=_?_===!0?d.params:typeof _=="function"?_(d):_:null,R=Qo(p,pe({},x,t,{onVnodeUnmounted:P=>{P.component.isUnmounted&&(h.instances[f]=null)},ref:c}));return ic(n.default,{Component:R,route:d})||R}}});function ic(e,t){if(!e)return null;const n=e(t);return n.length===1?n[0]:n}const Of=zE;function XE(e){const t=ME(e.routes,e),n=e.parseQuery||BE,s=e.stringifyQuery||ec,r=e.history,o=Cs(),a=Cs(),l=Cs(),c=iu(qt);let d=qt;Gn&&e.scrollBehavior&&"scrollRestoration"in history&&(history.scrollRestoration="manual");const f=Mi.bind(null,I=>""+I),h=Mi.bind(null,lE),p=Mi.bind(null,Us);function _(I,q){let z,J;return Tf(I)?(z=t.getRecordMatcher(I),J=q):J=I,t.addRoute(J,z)}function x(I){const q=t.getRecordMatcher(I);q&&t.removeRoute(q)}function A(){return t.getRoutes().map(I=>I.record)}function R(I){return!!t.getRecordMatcher(I)}function P(I,q){if(q=pe({},q||c.value),typeof I=="string"){const C=ki(n,I,q.path),D=t.resolve({path:C.path},q),V=r.createHref(C.fullPath);return pe(C,D,{params:p(D.params),hash:Us(C.hash),redirectedFrom:void 0,href:V})}let z;if(I.path!=null)z=pe({},I,{path:ki(n,I.path,q.path).path});else{const C=pe({},I.params);for(const D in C)C[D]==null&&delete C[D];z=pe({},I,{params:h(C)}),q.params=h(q.params)}const J=t.resolve(z,q),$=I.hash||"";J.params=f(p(J.params));const g=fE(s,pe({},I,{hash:iE($),path:J.path})),v=r.createHref(g);return pe({fullPath:g,hash:$,query:s===ec?jE(I.query):I.query||{}},J,{redirectedFrom:void 0,href:v})}function H(I){return typeof I=="string"?ki(n,I,c.value.path):pe({},I)}function F(I,q){if(d!==I)return fs(8,{from:q,to:I})}function k(I){return O(I)}function b(I){return k(pe(H(I),{replace:!0}))}function y(I){const q=I.matched[I.matched.length-1];if(q&&q.redirect){const{redirect:z}=q;let J=typeof z=="function"?z(I):z;return typeof J=="string"&&(J=J.includes("?")||J.includes("#")?J=H(J):{path:J},J.params={}),pe({query:I.query,hash:I.hash,params:J.path!=null?{}:I.params},J)}}function O(I,q){const z=d=P(I),J=c.value,$=I.state,g=I.force,v=I.replace===!0,C=y(z);if(C)return O(pe(H(C),{state:typeof C=="object"?pe({},$,C.state):$,force:g,replace:v}),q||z);const D=z;D.redirectedFrom=q;let V;return!g&&dE(s,J,z)&&(V=fs(16,{to:D,from:J}),De(J,J,!0,!1)),(V?Promise.resolve(V):S(D,J)).catch(M=>It(M)?It(M,2)?M:je(M):ce(M,D,J)).then(M=>{if(M){if(It(M,2))return O(pe({replace:v},H(M.to),{state:typeof M.to=="object"?pe({},$,M.to.state):$,force:g}),q||D)}else M=B(D,J,!0,v,$);return K(D,J,M),M})}function w(I,q){const z=F(I,q);return z?Promise.reject(z):Promise.resolve()}function T(I){const q=Ke.values().next().value;return q&&typeof q.runWithContext=="function"?q.runWithContext(I):I()}function S(I,q){let z;const[J,$,g]=QE(I,q);z=Vi(J.reverse(),"beforeRouteLeave",I,q);for(const C of J)C.leaveGuards.forEach(D=>{z.push(en(D,I,q))});const v=w.bind(null,I,q);return z.push(v),Te(z).then(()=>{z=[];for(const C of o.list())z.push(en(C,I,q));return z.push(v),Te(z)}).then(()=>{z=Vi($,"beforeRouteUpdate",I,q);for(const C of $)C.updateGuards.forEach(D=>{z.push(en(D,I,q))});return z.push(v),Te(z)}).then(()=>{z=[];for(const C of g)if(C.beforeEnter)if(At(C.beforeEnter))for(const D of C.beforeEnter)z.push(en(D,I,q));else z.push(en(C.beforeEnter,I,q));return z.push(v),Te(z)}).then(()=>(I.matched.forEach(C=>C.enterCallbacks={}),z=Vi(g,"beforeRouteEnter",I,q,T),z.push(v),Te(z))).then(()=>{z=[];for(const C of a.list())z.push(en(C,I,q));return z.push(v),Te(z)}).catch(C=>It(C,8)?C:Promise.reject(C))}function K(I,q,z){l.list().forEach(J=>T(()=>J(I,q,z)))}function B(I,q,z,J,$){const g=F(I,q);if(g)return g;const v=q===qt,C=Gn?history.state:{};z&&(J||v?r.replace(I.fullPath,pe({scroll:v&&C&&C.scroll},$)):r.push(I.fullPath,$)),c.value=I,De(I,q,z,v),je()}let Q;function oe(){Q||(Q=r.listen((I,q,z)=>{if(!Pe.listening)return;const J=P(I),$=y(J);if($){O(pe($,{replace:!0,force:!0}),J).catch(ks);return}d=J;const g=c.value;Gn&&yE(Ul(g.fullPath,z.delta),ri()),S(J,g).catch(v=>It(v,12)?v:It(v,2)?(O(pe(H(v.to),{force:!0}),J).then(C=>{It(C,20)&&!z.delta&&z.type===Ys.pop&&r.go(-1,!1)}).catch(ks),Promise.reject()):(z.delta&&r.go(-z.delta,!1),ce(v,J,g))).then(v=>{v=v||B(J,g,!1),v&&(z.delta&&!It(v,8)?r.go(-z.delta,!1):z.type===Ys.pop&&It(v,20)&&r.go(-1,!1)),K(J,g,v)}).catch(ks)}))}let de=Cs(),te=Cs(),ee;function ce(I,q,z){je(I);const J=te.list();return J.length?J.forEach($=>$(I,q,z)):console.error(I),Promise.reject(I)}function we(){return ee&&c.value!==qt?Promise.resolve():new Promise((I,q)=>{de.add([I,q])})}function je(I){return ee||(ee=!I,oe(),de.list().forEach(([q,z])=>I?z(I):q()),de.reset()),I}function De(I,q,z,J){const{scrollBehavior:$}=e;if(!Gn||!$)return Promise.resolve();const g=!z&&bE(Ul(I.fullPath,0))||(J||!z)&&history.state&&history.state.scroll||null;return Jr().then(()=>$(I,q,g)).then(v=>v&&EE(v)).catch(v=>ce(v,I,q))}const be=I=>r.go(I);let Qe;const Ke=new Set,Pe={currentRoute:c,listening:!0,addRoute:_,removeRoute:x,clearRoutes:t.clearRoutes,hasRoute:R,getRoutes:A,resolve:P,options:e,push:k,replace:b,go:be,back:()=>be(-1),forward:()=>be(1),beforeEach:o.add,beforeResolve:a.add,afterEach:l.add,onError:te.add,isReady:we,install(I){const q=this;I.component("RouterLink",YE),I.component("RouterView",Of),I.config.globalProperties.$router=q,Object.defineProperty(I.config.globalProperties,"$route",{enumerable:!0,get:()=>ot(c)}),Gn&&!Qe&&c.value===qt&&(Qe=!0,k(r.location).catch($=>{}));const z={};for(const $ in qt)Object.defineProperty(z,$,{get:()=>c.value[$],enumerable:!0});I.provide(ii,q),I.provide(Zo,su(z)),I.provide(co,c);const J=I.unmount;Ke.add(I),I.unmount=function(){Ke.delete(I),Ke.size<1&&(d=qt,Q&&Q(),Q=null,c.value=qt,Qe=!1,ee=!1),J()}}};function Te(I){return I.reduce((q,z)=>q.then(()=>T(z)),Promise.resolve())}return Pe}function QE(e,t){const n=[],s=[],r=[],o=Math.max(t.matched.length,e.matched.length);for(let a=0;aus(d,l))?s.push(l):n.push(l));const c=e.matched[a];c&&(t.matched.find(d=>us(d,c))||r.push(c))}return[n,s,r]}function rb(){return ut(ii)}function JE(e){return ut(Zo)}const ZE="modulepreload",ey=function(e){return"/static/app/dist/"+e},oc={},Ve=function(t,n,s){let r=Promise.resolve();if(n&&n.length>0){let c=function(d){return Promise.all(d.map(f=>Promise.resolve(f).then(h=>({status:"fulfilled",value:h}),h=>({status:"rejected",reason:h}))))};document.getElementsByTagName("link");const a=document.querySelector("meta[property=csp-nonce]"),l=a?.nonce||a?.getAttribute("nonce");r=c(n.map(d=>{if(d=ey(d),d in oc)return;oc[d]=!0;const f=d.endsWith(".css"),h=f?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${d}"]${h}`))return;const p=document.createElement("link");if(p.rel=f?"stylesheet":ZE,f||(p.as="script"),p.crossOrigin="",p.href=d,l&&p.setAttribute("nonce",l),document.head.appendChild(p),f)return new Promise((_,x)=>{p.addEventListener("load",_),p.addEventListener("error",()=>x(new Error(`Unable to preload CSS for ${d}`)))})}))}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)})},ac="[a-fA-F\\d:]",tn=e=>e&&e.includeBoundaries?`(?:(?<=\\s|^)(?=${ac})|(?<=${ac})(?=\\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}",oi=` + */const Gn=typeof document<"u";function gf(e){return typeof e=="object"||"displayName"in e||"props"in e||"__vccOpts"in e}function zv(e){return e.__esModule||e[Symbol.toStringTag]==="Module"||e.default&&gf(e.default)}const pe=Object.assign;function Mi(e,t){const n={};for(const s in t){const r=t[s];n[s]=At(r)?r.map(e):e(r)}return n}const ks=()=>{},At=Array.isArray,mf=/#/g,Xv=/&/g,Qv=/\//g,Jv=/=/g,Zv=/\?/g,_f=/\+/g,eE=/%5B/g,tE=/%5D/g,vf=/%5E/g,nE=/%60/g,Ef=/%7B/g,sE=/%7C/g,yf=/%7D/g,rE=/%20/g;function Qo(e){return encodeURI(""+e).replace(sE,"|").replace(eE,"[").replace(tE,"]")}function iE(e){return Qo(e).replace(Ef,"{").replace(yf,"}").replace(vf,"^")}function ao(e){return Qo(e).replace(_f,"%2B").replace(rE,"+").replace(mf,"%23").replace(Xv,"%26").replace(nE,"`").replace(Ef,"{").replace(yf,"}").replace(vf,"^")}function oE(e){return ao(e).replace(Jv,"%3D")}function aE(e){return Qo(e).replace(mf,"%23").replace(Zv,"%3F")}function lE(e){return e==null?"":aE(e).replace(Qv,"%2F")}function Us(e){try{return decodeURIComponent(""+e)}catch{}return""+e}const cE=/\/$/,uE=e=>e.replace(cE,"");function ki(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=pE(s??t,n),{fullPath:s+(o&&"?")+o+a,path:s,query:r,hash:Us(a)}}function fE(e,t){const n=t.query?e(t.query):"";return t.path+(n&&"?")+n+(t.hash||"")}function jl(e,t){return!t||!e.toLowerCase().startsWith(t.toLowerCase())?e:e.slice(t.length)||"/"}function dE(e,t,n){const s=t.matched.length-1,r=n.matched.length-1;return s>-1&&s===r&&us(t.matched[s],n.matched[r])&&bf(t.params,n.params)&&e(t.query)===e(n.query)&&t.hash===n.hash}function us(e,t){return(e.aliasOf||e)===(t.aliasOf||t)}function bf(e,t){if(Object.keys(e).length!==Object.keys(t).length)return!1;for(const n in e)if(!hE(e[n],t[n]))return!1;return!0}function hE(e,t){return At(e)?Kl(e,t):At(t)?Kl(t,e):e===t}function Kl(e,t){return At(t)?e.length===t.length&&e.every((n,s)=>n===t[s]):e.length===1&&e[0]===t}function pE(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 qt={path:"/",name:void 0,params:{},query:{},hash:"",fullPath:"/",matched:[],meta:{},redirectedFrom:void 0};var Ys;(function(e){e.pop="pop",e.push="push"})(Ys||(Ys={}));var Vs;(function(e){e.back="back",e.forward="forward",e.unknown=""})(Vs||(Vs={}));function gE(e){if(!e)if(Gn){const t=document.querySelector("base");e=t&&t.getAttribute("href")||"/",e=e.replace(/^\w+:\/\/[^\/]+/,"")}else e="/";return e[0]!=="/"&&e[0]!=="#"&&(e="/"+e),uE(e)}const mE=/^[^#]+#/;function _E(e,t){return e.replace(mE,"#")+t}function vE(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 ri=()=>({left:window.scrollX,top:window.scrollY});function EE(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=vE(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 Wl(e,t){return(history.state?history.state.position-t:-1)+e}const lo=new Map;function yE(e,t){lo.set(e,t)}function bE(e){const t=lo.get(e);return lo.delete(e),t}let AE=()=>location.protocol+"//"+location.host;function Af(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),jl(c,"")}return jl(n,e)+s+r}function TE(e,t,n,s){let r=[],o=[],a=null;const l=({state:p})=>{const _=Af(e,location),x=n.value,A=t.value;let R=0;if(p){if(n.value=_,t.value=p,a&&a===x){a=null;return}R=A?p.position-A.position:0}else s(_);r.forEach(P=>{P(n.value,x,{delta:R,type:Ys.pop,direction:R?R>0?Vs.forward:Vs.back:Vs.unknown})})};function c(){a=n.value}function d(p){r.push(p);const _=()=>{const x=r.indexOf(p);x>-1&&r.splice(x,1)};return o.push(_),_}function f(){const{history:p}=window;p.state&&p.replaceState(pe({},p.state,{scroll:ri()}),"")}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 Ul(e,t,n,s=!1,r=!1){return{back:e,current:t,forward:n,replaced:s,position:window.history.length,scroll:r?ri():null}}function wE(e){const{history:t,location:n}=window,s={value:Af(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:AE()+e+c;try{t[f?"replaceState":"pushState"](d,"",p),r.value=d}catch(_){console.error(_),n[f?"replace":"assign"](p)}}function a(c,d){const f=pe({},t.state,Ul(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=pe({},r.value,t.state,{forward:c,scroll:ri()});o(f.current,f,!0);const h=pe({},Ul(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 CE(e){e=gE(e);const t=wE(e),n=TE(e,t.state,t.location,t.replace);function s(o,a=!0){a||n.pauseListeners(),history.go(o)}const r=pe({location:"",base:e,go:s,createHref:_E.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 SE(e){return e=location.host?e||location.pathname+location.search:"",e.includes("#")||(e+="#"),CE(e)}function OE(e){return typeof e=="string"||e&&typeof e=="object"}function Tf(e){return typeof e=="string"||typeof e=="symbol"}const wf=Symbol("");var Yl;(function(e){e[e.aborted=4]="aborted",e[e.cancelled=8]="cancelled",e[e.duplicated=16]="duplicated"})(Yl||(Yl={}));function fs(e,t){return pe(new Error,{type:e,[wf]:!0},t)}function It(e,t){return e instanceof Error&&wf in e&&(t==null||!!(e.type&t))}const Gl="[^/]+?",xE={sensitive:!1,strict:!1,start:!0,end:!0},NE=/[.+*?^${}()[\]/\\]/g;function $E(e,t){const n=pe({},xE,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 Cf(e,t){let n=0;const s=e.score,r=t.score;for(;n0&&t[t.length-1]<0}const DE={type:0,value:""},LE=/[a-zA-Z0-9_]/;function IE(e){if(!e)return[[]];if(e==="/")return[[DE]];if(!e.startsWith("/"))throw new Error(`Invalid path "${e}"`);function t(_){throw new Error(`ERR (${n})/"${d}": ${_}`)}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(F)}:ks}function a(h){if(Tf(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=FE(h,n);n.splice(p,0,h),h.record.name&&!Ql(h)&&s.set(h.record.name,h)}function d(h,p){let _,x={},A,R;if("name"in h&&h.name){if(_=s.get(h.name),!_)throw fs(1,{location:h});R=_.record.name,x=pe(zl(p.params,_.keys.filter(F=>!F.optional).concat(_.parent?_.parent.keys.filter(F=>F.optional):[]).map(F=>F.name)),h.params&&zl(h.params,_.keys.map(F=>F.name))),A=_.stringify(x)}else if(h.path!=null)A=h.path,_=n.find(F=>F.re.test(A)),_&&(x=_.parse(A),R=_.record.name);else{if(_=p.name?s.get(p.name):n.find(F=>F.re.test(p.path)),!_)throw fs(1,{location:h,currentLocation:p});R=_.record.name,x=pe({},p.params,h.params),A=_.stringify(x)}const P=[];let H=_;for(;H;)P.unshift(H.record),H=H.parent;return{name:R,path:A,params:x,matched:P,meta:VE(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 zl(e,t){const n={};for(const s of t)s in e&&(n[s]=e[s]);return n}function Xl(e){const t={path:e.path,redirect:e.redirect,name:e.name,meta:e.meta||{},aliasOf:e.aliasOf,beforeEnter:e.beforeEnter,props:kE(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 kE(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 Ql(e){for(;e;){if(e.record.aliasOf)return!0;e=e.parent}return!1}function VE(e){return e.reduce((t,n)=>pe(t,n.meta),{})}function Jl(e,t){const n={};for(const s in e)n[s]=s in t?t[s]:e[s];return n}function FE(e,t){let n=0,s=t.length;for(;n!==s;){const o=n+s>>1;Cf(e,t[o])<0?s=o:n=o+1}const r=HE(e);return r&&(s=t.lastIndexOf(r,s-1)),s}function HE(e){let t=e;for(;t=t.parent;)if(Sf(t)&&Cf(e,t)===0)return t}function Sf({record:e}){return!!(e.name||e.components&&Object.keys(e.components).length||e.redirect)}function BE(e){const t={};if(e===""||e==="?")return t;const s=(e[0]==="?"?e.slice(1):e).split("&");for(let r=0;ro&&ao(o)):[s&&ao(s)]).forEach(o=>{o!==void 0&&(t+=(t.length?"&":"")+n,o!=null&&(t+="="+o))})}return t}function jE(e){const t={};for(const n in e){const s=e[n];s!==void 0&&(t[n]=At(s)?s.map(r=>r==null?null:""+r):s==null?s:""+s)}return t}const KE=Symbol(""),ec=Symbol(""),ii=Symbol(""),Jo=Symbol(""),co=Symbol("");function Cs(){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 en(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(fs(4,{from:n,to:t})):p instanceof Error?c(p):OE(p)?c(fs(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 Vi(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(gf(c)){const f=(c.__vccOpts||c)[t];f&&o.push(en(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=zv(f)?f.default:f;a.mods[l]=f,a.components[l]=h;const _=(h.__vccOpts||h)[t];return _&&en(_,n,s,a,l,r)()}))}}return o}function tc(e){const t=ut(ii),n=ut(Jo),s=at(()=>{const c=ot(e.to);return t.resolve(c)}),r=at(()=>{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(us.bind(null,f));if(p>-1)return p;const _=nc(c[d-2]);return d>1&&nc(f)===_&&h[h.length-1].path!==_?h.findIndex(us.bind(null,c[d-2])):p}),o=at(()=>r.value>-1&&qE(n.params,s.value.params)),a=at(()=>r.value>-1&&r.value===n.matched.length-1&&bf(n.params,s.value.params));function l(c={}){if(GE(c)){const d=t[ot(e.replace)?"replace":"push"](ot(e.to)).catch(ks);return e.viewTransition&&typeof document<"u"&&"startViewTransition"in document&&document.startViewTransition(()=>d),d}return Promise.resolve()}return{route:s,href:at(()=>s.value.href),isActive:o,isExactActive:a,navigate:l}}function WE(e){return e.length===1?e[0]:e}const UE=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"},viewTransition:Boolean},useLink:tc,setup(e,{slots:t}){const n=zs(tc(e)),{options:s}=ut(ii),r=at(()=>({[sc(e.activeClass,s.linkActiveClass,"router-link-active")]:n.isActive,[sc(e.exactActiveClass,s.linkExactActiveClass,"router-link-exact-active")]:n.isExactActive}));return()=>{const o=t.default&&WE(t.default(n));return e.custom?o:Xo("a",{"aria-current":n.isExactActive?e.ariaCurrentValue:null,href:n.href,onClick:n.navigate,class:r.value},o)}}}),YE=UE;function GE(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 qE(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(!At(r)||r.length!==s.length||s.some((o,a)=>o!==r[a]))return!1}return!0}function nc(e){return e?e.aliasOf?e.aliasOf.path:e.path:""}const sc=(e,t,n)=>e??t??n,zE=Fo({name:"RouterView",inheritAttrs:!1,props:{name:{type:String,default:"default"},route:Object},compatConfig:{MODE:3},setup(e,{attrs:t,slots:n}){const s=ut(co),r=at(()=>e.route||s.value),o=ut(ec,0),a=at(()=>{let d=ot(o);const{matched:f}=r.value;let h;for(;(h=f[d])&&!h.components;)d++;return d}),l=at(()=>r.value.matched[a.value]);Tr(ec,at(()=>a.value+1)),Tr(KE,l),Tr(co,r);const c=Cn();return On(()=>[c.value,l.value,e.name],([d,f,h],[p,_,x])=>{f&&(f.instances[h]=d,_&&_!==f&&d&&d===p&&(f.leaveGuards.size||(f.leaveGuards=_.leaveGuards),f.updateGuards.size||(f.updateGuards=_.updateGuards))),d&&f&&(!_||!us(f,_)||!p)&&(f.enterCallbacks[h]||[]).forEach(A=>A(d))},{flush:"post"}),()=>{const d=r.value,f=e.name,h=l.value,p=h&&h.components[f];if(!p)return rc(n.default,{Component:p,route:d});const _=h.props[f],x=_?_===!0?d.params:typeof _=="function"?_(d):_:null,R=Xo(p,pe({},x,t,{onVnodeUnmounted:P=>{P.component.isUnmounted&&(h.instances[f]=null)},ref:c}));return rc(n.default,{Component:R,route:d})||R}}});function rc(e,t){if(!e)return null;const n=e(t);return n.length===1?n[0]:n}const Of=zE;function XE(e){const t=ME(e.routes,e),n=e.parseQuery||BE,s=e.stringifyQuery||Zl,r=e.history,o=Cs(),a=Cs(),l=Cs(),c=ru(qt);let d=qt;Gn&&e.scrollBehavior&&"scrollRestoration"in history&&(history.scrollRestoration="manual");const f=Mi.bind(null,I=>""+I),h=Mi.bind(null,lE),p=Mi.bind(null,Us);function _(I,q){let z,J;return Tf(I)?(z=t.getRecordMatcher(I),J=q):J=I,t.addRoute(J,z)}function x(I){const q=t.getRecordMatcher(I);q&&t.removeRoute(q)}function A(){return t.getRoutes().map(I=>I.record)}function R(I){return!!t.getRecordMatcher(I)}function P(I,q){if(q=pe({},q||c.value),typeof I=="string"){const C=ki(n,I,q.path),D=t.resolve({path:C.path},q),V=r.createHref(C.fullPath);return pe(C,D,{params:p(D.params),hash:Us(C.hash),redirectedFrom:void 0,href:V})}let z;if(I.path!=null)z=pe({},I,{path:ki(n,I.path,q.path).path});else{const C=pe({},I.params);for(const D in C)C[D]==null&&delete C[D];z=pe({},I,{params:h(C)}),q.params=h(q.params)}const J=t.resolve(z,q),$=I.hash||"";J.params=f(p(J.params));const g=fE(s,pe({},I,{hash:iE($),path:J.path})),v=r.createHref(g);return pe({fullPath:g,hash:$,query:s===Zl?jE(I.query):I.query||{}},J,{redirectedFrom:void 0,href:v})}function H(I){return typeof I=="string"?ki(n,I,c.value.path):pe({},I)}function F(I,q){if(d!==I)return fs(8,{from:q,to:I})}function k(I){return O(I)}function b(I){return k(pe(H(I),{replace:!0}))}function y(I){const q=I.matched[I.matched.length-1];if(q&&q.redirect){const{redirect:z}=q;let J=typeof z=="function"?z(I):z;return typeof J=="string"&&(J=J.includes("?")||J.includes("#")?J=H(J):{path:J},J.params={}),pe({query:I.query,hash:I.hash,params:J.path!=null?{}:I.params},J)}}function O(I,q){const z=d=P(I),J=c.value,$=I.state,g=I.force,v=I.replace===!0,C=y(z);if(C)return O(pe(H(C),{state:typeof C=="object"?pe({},$,C.state):$,force:g,replace:v}),q||z);const D=z;D.redirectedFrom=q;let V;return!g&&dE(s,J,z)&&(V=fs(16,{to:D,from:J}),De(J,J,!0,!1)),(V?Promise.resolve(V):S(D,J)).catch(M=>It(M)?It(M,2)?M:je(M):ce(M,D,J)).then(M=>{if(M){if(It(M,2))return O(pe({replace:v},H(M.to),{state:typeof M.to=="object"?pe({},$,M.to.state):$,force:g}),q||D)}else M=B(D,J,!0,v,$);return K(D,J,M),M})}function w(I,q){const z=F(I,q);return z?Promise.reject(z):Promise.resolve()}function T(I){const q=Ke.values().next().value;return q&&typeof q.runWithContext=="function"?q.runWithContext(I):I()}function S(I,q){let z;const[J,$,g]=QE(I,q);z=Vi(J.reverse(),"beforeRouteLeave",I,q);for(const C of J)C.leaveGuards.forEach(D=>{z.push(en(D,I,q))});const v=w.bind(null,I,q);return z.push(v),Te(z).then(()=>{z=[];for(const C of o.list())z.push(en(C,I,q));return z.push(v),Te(z)}).then(()=>{z=Vi($,"beforeRouteUpdate",I,q);for(const C of $)C.updateGuards.forEach(D=>{z.push(en(D,I,q))});return z.push(v),Te(z)}).then(()=>{z=[];for(const C of g)if(C.beforeEnter)if(At(C.beforeEnter))for(const D of C.beforeEnter)z.push(en(D,I,q));else z.push(en(C.beforeEnter,I,q));return z.push(v),Te(z)}).then(()=>(I.matched.forEach(C=>C.enterCallbacks={}),z=Vi(g,"beforeRouteEnter",I,q,T),z.push(v),Te(z))).then(()=>{z=[];for(const C of a.list())z.push(en(C,I,q));return z.push(v),Te(z)}).catch(C=>It(C,8)?C:Promise.reject(C))}function K(I,q,z){l.list().forEach(J=>T(()=>J(I,q,z)))}function B(I,q,z,J,$){const g=F(I,q);if(g)return g;const v=q===qt,C=Gn?history.state:{};z&&(J||v?r.replace(I.fullPath,pe({scroll:v&&C&&C.scroll},$)):r.push(I.fullPath,$)),c.value=I,De(I,q,z,v),je()}let Q;function oe(){Q||(Q=r.listen((I,q,z)=>{if(!Pe.listening)return;const J=P(I),$=y(J);if($){O(pe($,{replace:!0,force:!0}),J).catch(ks);return}d=J;const g=c.value;Gn&&yE(Wl(g.fullPath,z.delta),ri()),S(J,g).catch(v=>It(v,12)?v:It(v,2)?(O(pe(H(v.to),{force:!0}),J).then(C=>{It(C,20)&&!z.delta&&z.type===Ys.pop&&r.go(-1,!1)}).catch(ks),Promise.reject()):(z.delta&&r.go(-z.delta,!1),ce(v,J,g))).then(v=>{v=v||B(J,g,!1),v&&(z.delta&&!It(v,8)?r.go(-z.delta,!1):z.type===Ys.pop&&It(v,20)&&r.go(-1,!1)),K(J,g,v)}).catch(ks)}))}let de=Cs(),te=Cs(),ee;function ce(I,q,z){je(I);const J=te.list();return J.length?J.forEach($=>$(I,q,z)):console.error(I),Promise.reject(I)}function we(){return ee&&c.value!==qt?Promise.resolve():new Promise((I,q)=>{de.add([I,q])})}function je(I){return ee||(ee=!I,oe(),de.list().forEach(([q,z])=>I?z(I):q()),de.reset()),I}function De(I,q,z,J){const{scrollBehavior:$}=e;if(!Gn||!$)return Promise.resolve();const g=!z&&bE(Wl(I.fullPath,0))||(J||!z)&&history.state&&history.state.scroll||null;return Jr().then(()=>$(I,q,g)).then(v=>v&&EE(v)).catch(v=>ce(v,I,q))}const be=I=>r.go(I);let Qe;const Ke=new Set,Pe={currentRoute:c,listening:!0,addRoute:_,removeRoute:x,clearRoutes:t.clearRoutes,hasRoute:R,getRoutes:A,resolve:P,options:e,push:k,replace:b,go:be,back:()=>be(-1),forward:()=>be(1),beforeEach:o.add,beforeResolve:a.add,afterEach:l.add,onError:te.add,isReady:we,install(I){const q=this;I.component("RouterLink",YE),I.component("RouterView",Of),I.config.globalProperties.$router=q,Object.defineProperty(I.config.globalProperties,"$route",{enumerable:!0,get:()=>ot(c)}),Gn&&!Qe&&c.value===qt&&(Qe=!0,k(r.location).catch($=>{}));const z={};for(const $ in qt)Object.defineProperty(z,$,{get:()=>c.value[$],enumerable:!0});I.provide(ii,q),I.provide(Jo,nu(z)),I.provide(co,c);const J=I.unmount;Ke.add(I),I.unmount=function(){Ke.delete(I),Ke.size<1&&(d=qt,Q&&Q(),Q=null,c.value=qt,Qe=!1,ee=!1),J()}}};function Te(I){return I.reduce((q,z)=>q.then(()=>T(z)),Promise.resolve())}return Pe}function QE(e,t){const n=[],s=[],r=[],o=Math.max(t.matched.length,e.matched.length);for(let a=0;aus(d,l))?s.push(l):n.push(l));const c=e.matched[a];c&&(t.matched.find(d=>us(d,c))||r.push(c))}return[n,s,r]}function sb(){return ut(ii)}function JE(e){return ut(Jo)}const ZE="modulepreload",ey=function(e){return"/static/app/dist/"+e},ic={},Ve=function(t,n,s){let r=Promise.resolve();if(n&&n.length>0){let c=function(d){return Promise.all(d.map(f=>Promise.resolve(f).then(h=>({status:"fulfilled",value:h}),h=>({status:"rejected",reason:h}))))};document.getElementsByTagName("link");const a=document.querySelector("meta[property=csp-nonce]"),l=a?.nonce||a?.getAttribute("nonce");r=c(n.map(d=>{if(d=ey(d),d in ic)return;ic[d]=!0;const f=d.endsWith(".css"),h=f?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${d}"]${h}`))return;const p=document.createElement("link");if(p.rel=f?"stylesheet":ZE,f||(p.as="script"),p.crossOrigin="",p.href=d,l&&p.setAttribute("nonce",l),document.head.appendChild(p),f)return new Promise((_,x)=>{p.addEventListener("load",_),p.addEventListener("error",()=>x(new Error(`Unable to preload CSS for ${d}`)))})}))}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)})},oc="[a-fA-F\\d:]",tn=e=>e&&e.includeBoundaries?`(?:(?<=\\s|^)(?=${oc})|(?<=${oc})(?=\\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}",oi=` (?: (?:${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 @@ -38,7 +38,7 @@ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/index-1mVjWyYI. (?:${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(),ty=new RegExp(`(?:^${mt}$)|(?:^${oi}$)`),ny=new RegExp(`^${mt}$`),sy=new RegExp(`^${oi}$`),ai=e=>e&&e.exact?ty:new RegExp(`(?:${tn(e)}${mt}${tn(e)})|(?:${tn(e)}${oi}${tn(e)})`,"g");ai.v4=e=>e&&e.exact?ny:new RegExp(`${tn(e)}${mt}${tn(e)}`,"g");ai.v6=e=>e&&e.exact?sy:new RegExp(`${tn(e)}${oi}${tn(e)}`,"g");const xf={exact:!1},Nf=`${ai.v4().source}\\/(3[0-2]|[12]?[0-9])`,$f=`${ai.v6().source}\\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])`,ry=new RegExp(`^${Nf}$`),iy=new RegExp(`^${$f}$`),oy=({exact:e}=xf)=>e?ry:new RegExp(Nf,"g"),ay=({exact:e}=xf)=>e?iy:new RegExp($f,"g"),Rf=oy({exact:!0}),Df=ay({exact:!0}),ea=e=>Rf.test(e)?4:Df.test(e)?6:0;ea.v4=e=>Rf.test(e);ea.v6=e=>Df.test(e);const Mt=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]])},ly=pf("WireguardConfigurationsStore",{state:()=>({Configurations:void 0,searchString:"",ConfigurationListInterval:void 0,PeerScheduleJobs:{dropdowns:{Field:[{display:Mt("Total Received"),value:"total_receive",unit:"GB",type:"number"},{display:Mt("Total Sent"),value:"total_sent",unit:"GB",type:"number"},{display:Mt("Total Usage"),value:"total_data",unit:"GB",type:"number"},{display:Mt("Date"),value:"date",type:"date"}],Operator:[{display:Mt("larger than"),value:"lgt"}],Action:[{display:Mt("Restrict Peer"),value:"restrict"},{display:Mt("Delete Peer"),value:"delete"}]}}}),actions:{async getConfigurations(){await Hr("/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 ea(e)!==0},checkWGKeyLength(e){return/^[A-Za-z0-9+/]{43}=?=?$/.test(e)}}}),cy=async()=>{let e=!1;return await Hr("/api/validateAuthentication",{},t=>{e=t.status}),e},ms=XE({history:SE(),scrollBehavior(){document.querySelector("main")!==null&&document.querySelector("main").scrollTo({top:0})},routes:[{name:"Index",path:"/",component:()=>Ve(()=>import("./index-1mVjWyYI.js"),__vite__mapDeps([0,1,2,3,4,5])),meta:{requiresAuth:!0},children:[{name:"Configuration List",path:"",component:()=>Ve(()=>import("./configurationList-zXvLVZk6.js"),__vite__mapDeps([6,1,7,8,9,10])),meta:{title:"WireGuard Configurations"}},{name:"Settings",path:"settings",component:()=>Ve(()=>import("./settings-cK5pfcdh.js"),__vite__mapDeps([11,1,2,12,13])),meta:{title:"Settings"}},{path:"ping",name:"Ping",component:()=>Ve(()=>import("./ping-Rj802N48.js"),__vite__mapDeps([14,1,15,16,17]))},{path:"traceroute",name:"Traceroute",component:()=>Ve(()=>import("./traceroute-CJHxAi5E.js"),__vite__mapDeps([18,15,16,1,19]))},{name:"New Configuration",path:"new_configuration",component:()=>Ve(()=>import("./newConfiguration-CNk_9MbK.js"),__vite__mapDeps([20,21,1,22])),meta:{title:"New Configuration"}},{name:"Restore Configuration",path:"restore_configuration",component:()=>Ve(()=>import("./restoreConfiguration-CB8Vk8pb.js"),__vite__mapDeps([23,1,2,7,21,24])),meta:{title:"Restore Configuration"}},{name:"System Status",path:"system_status",component:()=>Ve(()=>import("./systemStatus-DDN6iwt_.js"),__vite__mapDeps([25,1,8,9,26,2,27])),meta:{title:"System Status"}},{name:"Clients",path:"clients",component:()=>Ve(()=>import("./clients-CgB9Uymo.js"),__vite__mapDeps([28,29,1])),meta:{title:"Clients"},children:[{name:"Client Viewer",path:":id",component:()=>Ve(()=>import("./clientViewer-CglBXHMI.js"),__vite__mapDeps([30,29,1]))}]},{name:"Configuration",path:"configuration/:id",component:()=>Ve(()=>import("./configuration-CwjXQBmc.js"),[]),meta:{title:"Configuration"},children:[{name:"Peers List",path:"peers",component:()=>Ve(()=>import("./peerList-9LlPuiy3.js"),__vite__mapDeps([31,7,1,26,2,32]))}]}]},{path:"/signin",component:()=>Ve(()=>import("./signin-L3oMqQIW.js"),__vite__mapDeps([33,3,1,2,4,34])),meta:{title:"Sign In",hideTopNav:!0}},{path:"/welcome",component:()=>Ve(()=>import("./setup-BKjNeIHl.js"),__vite__mapDeps([35,1])),meta:{requiresAuth:!0,title:"Welcome to WGDashboard",hideTopNav:!0}},{path:"/2FASetup",component:()=>Ve(()=>import("./totp-DKJseL4c.js"),__vite__mapDeps([36,37,1])),meta:{requiresAuth:!0,title:"Multi-Factor Authentication Setup",hideTopNav:!0}},{path:"/share",component:()=>Ve(()=>import("./share-CNIJmGhk.js"),__vite__mapDeps([38,37,1,39])),meta:{title:"Share",hideTopNav:!0}}]});ms.beforeEach(async(e,t,n)=>{const s=ly(),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()):await cy()?(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()});ms.afterEach(()=>{document.querySelector(".loadingBar").classList.remove("loading"),document.querySelector(".loadingBar").classList.add("loadingDone")});const Lf=()=>{let e={"content-type":"application/json"};const n=un().getActiveCrossServer();return n&&(e["wg-dashboard-apikey"]=n.apiKey),e},If=e=>{const n=un().getActiveCrossServer();return n?`${n.host}${e}`:`${window.location.protocol}//${(window.location.host+window.location.pathname+e).replace(/\/\//g,"/")}`},Hr=async(e,t=void 0,n=void 0)=>{const s=new URLSearchParams(t);await fetch(`${If(e)}?${s.toString()}`,{headers:Lf()}).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("Error:",r),ms.push({path:"/signin"})})},ib=async(e,t,n)=>{await fetch(`${If(e)}`,{headers:Lf(),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("Error:",s),ms.push({path:"/signin"})})},Le=[];for(let e=0;e<256;++e)Le.push((e+256).toString(16).slice(1));function uy(e,t=0){return(Le[e[t+0]]+Le[e[t+1]]+Le[e[t+2]]+Le[e[t+3]]+"-"+Le[e[t+4]]+Le[e[t+5]]+"-"+Le[e[t+6]]+Le[e[t+7]]+"-"+Le[e[t+8]]+Le[e[t+9]]+"-"+Le[e[t+10]]+Le[e[t+11]]+Le[e[t+12]]+Le[e[t+13]]+Le[e[t+14]]+Le[e[t+15]]).toLowerCase()}let Fi;const fy=new Uint8Array(16);function dy(){if(!Fi){if(typeof crypto>"u"||!crypto.getRandomValues)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");Fi=crypto.getRandomValues.bind(crypto)}return Fi(fy)}const hy=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),lc={randomUUID:hy};function cc(e,t,n){if(lc.randomUUID&&!e)return lc.randomUUID();e=e||{};const s=e.random??e.rng?.()??dy();if(s.length<16)throw new Error("Random bytes length must be >= 16");return s[6]=s[6]&15|64,s[8]=s[8]&63|128,uy(s)}const un=pf("DashboardConfigurationStore",{state:()=>({Redirect:void 0,Configuration:void 0,Messages:[],Peers:{Selecting:!1,RefreshInterval:void 0},CrossServerConfiguration:{Enable:!1,ServerList:{}},SystemStatus:void 0,ActiveServerConfiguration:void 0,IsElectronApp:!1,ShowNavBar:!1,Locale:void 0,HelpAgent:{Enable:!1}}),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[cc().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 Hr("/api/getDashboardConfiguration",{},e=>{e.status&&(this.Configuration=e.data)})},async signOut(){await Hr("/api/signout",{},()=>{this.removeActiveCrossServer(),document.cookie="",this.$router.go("/signin")})},newMessage(e,t,n){this.Messages.push({id:cc(),from:Mt(e),content:Mt(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]]}},persist:{pick:["HelpAgent.Enable"]}});/*! SPDX-License-Identifier: GPL-2.0 +`.replace(/\s*\/\/.*$/gm,"").replace(/\n/g,"").trim(),ty=new RegExp(`(?:^${mt}$)|(?:^${oi}$)`),ny=new RegExp(`^${mt}$`),sy=new RegExp(`^${oi}$`),ai=e=>e&&e.exact?ty:new RegExp(`(?:${tn(e)}${mt}${tn(e)})|(?:${tn(e)}${oi}${tn(e)})`,"g");ai.v4=e=>e&&e.exact?ny:new RegExp(`${tn(e)}${mt}${tn(e)}`,"g");ai.v6=e=>e&&e.exact?sy:new RegExp(`${tn(e)}${oi}${tn(e)}`,"g");const xf={exact:!1},Nf=`${ai.v4().source}\\/(3[0-2]|[12]?[0-9])`,$f=`${ai.v6().source}\\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])`,ry=new RegExp(`^${Nf}$`),iy=new RegExp(`^${$f}$`),oy=({exact:e}=xf)=>e?ry:new RegExp(Nf,"g"),ay=({exact:e}=xf)=>e?iy:new RegExp($f,"g"),Rf=oy({exact:!0}),Df=ay({exact:!0}),Zo=e=>Rf.test(e)?4:Df.test(e)?6:0;Zo.v4=e=>Rf.test(e);Zo.v6=e=>Df.test(e);const Mt=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]])},ly=pf("WireguardConfigurationsStore",{state:()=>({Configurations:void 0,searchString:"",ConfigurationListInterval:void 0,PeerScheduleJobs:{dropdowns:{Field:[{display:Mt("Total Received"),value:"total_receive",unit:"GB",type:"number"},{display:Mt("Total Sent"),value:"total_sent",unit:"GB",type:"number"},{display:Mt("Total Usage"),value:"total_data",unit:"GB",type:"number"},{display:Mt("Date"),value:"date",type:"date"}],Operator:[{display:Mt("larger than"),value:"lgt"}],Action:[{display:Mt("Restrict Peer"),value:"restrict"},{display:Mt("Delete Peer"),value:"delete"}]}}}),actions:{async getConfigurations(){await Hr("/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 Zo(e)!==0},checkWGKeyLength(e){return/^[A-Za-z0-9+/]{43}=?=?$/.test(e)}}}),cy=async()=>{let e=!1;return await Hr("/api/validateAuthentication",{},t=>{e=t.status}),e},ms=XE({history:SE(),scrollBehavior(){document.querySelector("main")!==null&&document.querySelector("main").scrollTo({top:0})},routes:[{name:"Index",path:"/",component:()=>Ve(()=>import("./index-DdNg86Vj.js"),__vite__mapDeps([0,1,2,3,4,5])),meta:{requiresAuth:!0},children:[{name:"Configuration List",path:"",component:()=>Ve(()=>import("./configurationList-DDBigiJ5.js"),__vite__mapDeps([6,1,7,8,9,10])),meta:{title:"WireGuard Configurations"}},{name:"Settings",path:"settings",component:()=>Ve(()=>import("./settings-CkXtGiHe.js"),__vite__mapDeps([11,1,2,12,13])),meta:{title:"Settings"}},{path:"ping",name:"Ping",component:()=>Ve(()=>import("./ping-DHdoEsrr.js"),__vite__mapDeps([14,1,15,16,17]))},{path:"traceroute",name:"Traceroute",component:()=>Ve(()=>import("./traceroute-D1D2nqzU.js"),__vite__mapDeps([18,15,16,1,19]))},{name:"New Configuration",path:"new_configuration",component:()=>Ve(()=>import("./newConfiguration-Cp_Zzc7o.js"),__vite__mapDeps([20,21,1,22])),meta:{title:"New Configuration"}},{name:"Restore Configuration",path:"restore_configuration",component:()=>Ve(()=>import("./restoreConfiguration-DOUQI3lV.js"),__vite__mapDeps([23,1,2,7,21,24])),meta:{title:"Restore Configuration"}},{name:"System Status",path:"system_status",component:()=>Ve(()=>import("./systemStatus-2BLdvfJq.js"),__vite__mapDeps([25,1,8,9,26,2,27])),meta:{title:"System Status"}},{name:"Clients",path:"clients",component:()=>Ve(()=>import("./clients-BZwEb7jm.js"),__vite__mapDeps([28,29,1])),meta:{title:"Clients"},children:[{name:"Client Viewer",path:":id",component:()=>Ve(()=>import("./clientViewer-CR0kolcJ.js"),__vite__mapDeps([30,29,1]))}]},{name:"Configuration",path:"configuration/:id",component:()=>Ve(()=>import("./configuration-B1JLlW37.js"),[]),meta:{title:"Configuration"},children:[{name:"Peers List",path:"peers",component:()=>Ve(()=>import("./peerList-BF1XGsyP.js"),__vite__mapDeps([31,7,1,26,2,32]))}]}]},{path:"/signin",component:()=>Ve(()=>import("./signin-DCnzrYSP.js"),__vite__mapDeps([33,3,1,2,4,34])),meta:{title:"Sign In",hideTopNav:!0}},{path:"/welcome",component:()=>Ve(()=>import("./setup-BA8-6L-I.js"),__vite__mapDeps([35,1])),meta:{requiresAuth:!0,title:"Welcome to WGDashboard",hideTopNav:!0}},{path:"/2FASetup",component:()=>Ve(()=>import("./totp-C8MmYKOe.js"),__vite__mapDeps([36,37,1])),meta:{requiresAuth:!0,title:"Multi-Factor Authentication Setup",hideTopNav:!0}},{path:"/share",component:()=>Ve(()=>import("./share-C108soct.js"),__vite__mapDeps([38,37,1,39])),meta:{title:"Share",hideTopNav:!0}}]});ms.beforeEach(async(e,t,n)=>{const s=ly(),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()):await cy()?(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()});ms.afterEach(()=>{document.querySelector(".loadingBar").classList.remove("loading"),document.querySelector(".loadingBar").classList.add("loadingDone")});const Lf=()=>{let e={"content-type":"application/json"};const n=un().getActiveCrossServer();return n&&(e["wg-dashboard-apikey"]=n.apiKey),e},If=e=>{const n=un().getActiveCrossServer();return n?`${n.host}${e}`:`${window.location.protocol}//${(window.location.host+window.location.pathname+e).replace(/\/\//g,"/")}`},Hr=async(e,t=void 0,n=void 0)=>{const s=new URLSearchParams(t);await fetch(`${If(e)}?${s.toString()}`,{headers:Lf()}).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("Error:",r),ms.push({path:"/signin"})})},rb=async(e,t,n)=>{await fetch(`${If(e)}`,{headers:Lf(),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("Error:",s),ms.push({path:"/signin"})})},Le=[];for(let e=0;e<256;++e)Le.push((e+256).toString(16).slice(1));function uy(e,t=0){return(Le[e[t+0]]+Le[e[t+1]]+Le[e[t+2]]+Le[e[t+3]]+"-"+Le[e[t+4]]+Le[e[t+5]]+"-"+Le[e[t+6]]+Le[e[t+7]]+"-"+Le[e[t+8]]+Le[e[t+9]]+"-"+Le[e[t+10]]+Le[e[t+11]]+Le[e[t+12]]+Le[e[t+13]]+Le[e[t+14]]+Le[e[t+15]]).toLowerCase()}let Fi;const fy=new Uint8Array(16);function dy(){if(!Fi){if(typeof crypto>"u"||!crypto.getRandomValues)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");Fi=crypto.getRandomValues.bind(crypto)}return Fi(fy)}const hy=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),ac={randomUUID:hy};function lc(e,t,n){if(ac.randomUUID&&!e)return ac.randomUUID();e=e||{};const s=e.random??e.rng?.()??dy();if(s.length<16)throw new Error("Random bytes length must be >= 16");return s[6]=s[6]&15|64,s[8]=s[8]&63|128,uy(s)}const un=pf("DashboardConfigurationStore",{state:()=>({Redirect:void 0,Configuration:void 0,Messages:[],Peers:{Selecting:!1,RefreshInterval:void 0},CrossServerConfiguration:{Enable:!1,ServerList:{}},SystemStatus:void 0,ActiveServerConfiguration:void 0,IsElectronApp:!1,ShowNavBar:!1,Locale:void 0,HelpAgent:{Enable:!1}}),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[lc().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 Hr("/api/getDashboardConfiguration",{},e=>{e.status&&(this.Configuration=e.data)})},async signOut(){await Hr("/api/signout",{},()=>{this.removeActiveCrossServer(),document.cookie="",this.$router.go("/signin")})},newMessage(e,t,n){this.Messages.push({id:lc(),from:Mt(e),content:Mt(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]]}},persist:{pick:["HelpAgent.Enable"]}});/*! 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 O=0;O>16&1),w[S-1]&=65535;w[15]=T[15]-32767-(w[14]>>16&1),O=w[15]>>16&1,w[14]&=65535,s(T,w,1-O)}for(var S=0;S<16;++S)b[2*S]=T[S]&255,b[2*S+1]=T[S]>>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,O){for(var w,T=~(O-1),S=0;S<16;++S)w=T&(b[S]^y[S]),b[S]^=w,y[S]^=w}function r(b,y,O){for(var w=0;w<16;++w)b[w]=y[w]+O[w]|0}function o(b,y,O){for(var w=0;w<16;++w)b[w]=y[w]-O[w]|0}function a(b,y,O){for(var w=new Float64Array(31),T=0;T<16;++T)for(var S=0;S<16;++S)w[T+S]+=y[T]*O[S];for(var T=0;T<15;++T)w[T]+=38*w[T+16];for(var T=0;T<16;++T)b[T]=w[T];n(b),n(b)}function l(b,y){for(var O=e(),w=0;w<16;++w)O[w]=y[w];for(var w=253;w>=0;--w)a(O,O,O),w!==2&&w!==4&&a(O,O,y);for(var w=0;w<16;++w)b[w]=O[w]}function c(b){b[31]=b[31]&127|64,b[0]&=248}function d(b){for(var y,O=new Uint8Array(32),w=e([1]),T=e([9]),S=e(),K=e([1]),B=e(),Q=e(),oe=e([56129,1]),de=e([9]),te=0;te<32;++te)O[te]=b[te];c(O);for(var te=254;te>=0;--te)y=O[te>>>3]>>>(te&7)&1,s(w,T,y),s(S,K,y),r(B,w,S),o(w,w,S),r(S,T,K),o(T,T,K),a(K,B,B),a(Q,w,w),a(w,S,w),a(S,T,B),r(B,w,S),o(w,w,S),a(T,w,w),o(S,K,Q),a(w,S,oe),r(w,w,K),a(S,S,w),a(w,K,Q),a(K,T,de),a(T,B,B),s(w,T,y),s(S,K,y);return l(S,S),a(w,w,S),t(O,w),O}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 O=Uint8Array.from([y[0]>>2&63,(y[0]<<4|y[1]>>4)&63,(y[1]<<2|y[2]>>6)&63,y[2]&63]),w=0;w<4;++w)b[w]=O[w]+65+(25-O[w]>>8&6)-(51-O[w]>>8&75)-(61-O[w]>>8&15)+(62-O[w]>>8&3)}function _(b){var y,O=new Uint8Array(44);for(y=0;y<32/3;++y)p(O.subarray(y*4),b.subarray(y*3));return p(O.subarray(y*4),Uint8Array.from([b[y*3+0],b[y*3+1],0])),O[43]=61,String.fromCharCode.apply(null,O)}function x(b){let y=window.atob(b),O=y.length,w=new Uint8Array(O);for(let S=0;S>>8&255,y>>>16&255,y>>>24&255)}function R(b,y){b.push(y&255,y>>>8&255)}function P(b,y){for(var O=0;O>>1:y>>>1;F.table[O]=y}}for(var T=-1,S=0;S>>8^F.table[(T^b[S])&255];return(T^-1)>>>0}function k(b){for(var y=[],O=[],w=0,T=0;T{const n=e.__vccOpts||e;for(const[s,r]of t)n[s]=r;return n},gy={key:0,class:"navbar bg-dark sticky-top","data-bs-theme":"dark"},my={class:"container-fluid d-flex text-body align-items-center"},_y={key:0,class:"bi bi-list"},vy={key:1,class:"bi bi-x-lg"},Ey={__name:"App",setup(e){const t=un();t.initCrossServerConfiguration(),window.IS_WGDASHBOARD_DESKTOP&&(t.IsElectronApp=!0,t.CrossServerConfiguration.Enable=!0),On(t.CrossServerConfiguration,()=>{t.syncCrossServerConfiguration()},{deep:!0});const n=JE();return(s,r)=>{const o=a_("RouterLink");return Ot(),_r(Be,null,[r[2]||(r[2]=qn("div",{style:{"z-index":"9999",height:"5px"},class:"position-absolute loadingBar top-0 start-0"},null,-1)),ot(n).meta.hideTopNav?q_("",!0):(Ot(),_r("nav",gy,[qn("div",my,[Ee(o,{to:"/",class:"navbar-brand mb-0 h1"},{default:Yn(()=>r[1]||(r[1]=[qn("img",{src:qv,alt:"WGDashboard Logo",style:{width:"32px"}},null,-1)])),_:1,__:[1]}),qn("a",{role:"button",class:"navbarBtn text-body",onClick:r[0]||(r[0]=a=>ot(t).ShowNavBar=!ot(t).ShowNavBar),style:{"line-height":"0","font-size":"2rem"}},[Ee(bl,{name:"fade2",mode:"out-in"},{default:Yn(()=>[ot(t).ShowNavBar?(Ot(),_r("i",vy)):(Ot(),_r("i",_y))]),_:1})])])])),(Ot(),Ws(V_,null,{default:Yn(()=>[Ee(ot(Of),null,{default:Yn(({Component:a})=>[Ee(bl,{name:"app",mode:"out-in",type:"transition",appear:""},{default:Yn(()=>[(Ot(),Ws(l_(a)))]),_:2},1024)]),_:1})]),_:1}))],64)}}},yy=py(Ey,[["__scopeId","data-v-16b1f9a3"]]);let uo;await fetch("/api/locale").then(e=>e.json()).then(e=>uo=e.data).catch(()=>{uo=null});const ta=Fv(yy);ta.use(ms);const Pf=jv();Pf.use(({store:e})=>{e.$router=Qr(ms)});ta.use(Pf);const by=un();by.Locale=uo;ta.mount("#app");export{Mo as $,cc as A,Lv as B,nb as C,un as D,zs as E,Be as F,Mt as G,On as H,rb as I,Fo as J,zy as K,Xy as L,JE as M,jc as N,_m as O,ky as P,jy as Q,Ve as R,V_ as S,Zy as T,iu as U,Qo as V,ly as W,rv as X,jo as Y,fe as Z,py as _,qn as a,Jr as a0,eb as a1,Py as a2,By as a3,Ky as a4,tb as a5,pf as a6,Gy as a7,Vy as a8,Uy as a9,Yy as aa,My as ab,Y_ as ac,z_ as ad,Ae as ae,Hy as af,gs as ag,sb as ah,qy as ai,wu as aj,Qy as ak,Ee as b,_r as c,q_ as d,G_ as e,Ot as f,Hr as g,a_ as h,Wy as i,bl as j,Ws as k,l_ as l,Fy as m,zr as n,Bo as o,Jy as p,at as q,Cn as r,qr as s,mm as t,ot as u,Rv as v,Yn as w,Su as x,kl as y,ib as z}; + */(function(){function e(b){var y=new Float64Array(16);if(b)for(var O=0;O>16&1),w[S-1]&=65535;w[15]=T[15]-32767-(w[14]>>16&1),O=w[15]>>16&1,w[14]&=65535,s(T,w,1-O)}for(var S=0;S<16;++S)b[2*S]=T[S]&255,b[2*S+1]=T[S]>>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,O){for(var w,T=~(O-1),S=0;S<16;++S)w=T&(b[S]^y[S]),b[S]^=w,y[S]^=w}function r(b,y,O){for(var w=0;w<16;++w)b[w]=y[w]+O[w]|0}function o(b,y,O){for(var w=0;w<16;++w)b[w]=y[w]-O[w]|0}function a(b,y,O){for(var w=new Float64Array(31),T=0;T<16;++T)for(var S=0;S<16;++S)w[T+S]+=y[T]*O[S];for(var T=0;T<15;++T)w[T]+=38*w[T+16];for(var T=0;T<16;++T)b[T]=w[T];n(b),n(b)}function l(b,y){for(var O=e(),w=0;w<16;++w)O[w]=y[w];for(var w=253;w>=0;--w)a(O,O,O),w!==2&&w!==4&&a(O,O,y);for(var w=0;w<16;++w)b[w]=O[w]}function c(b){b[31]=b[31]&127|64,b[0]&=248}function d(b){for(var y,O=new Uint8Array(32),w=e([1]),T=e([9]),S=e(),K=e([1]),B=e(),Q=e(),oe=e([56129,1]),de=e([9]),te=0;te<32;++te)O[te]=b[te];c(O);for(var te=254;te>=0;--te)y=O[te>>>3]>>>(te&7)&1,s(w,T,y),s(S,K,y),r(B,w,S),o(w,w,S),r(S,T,K),o(T,T,K),a(K,B,B),a(Q,w,w),a(w,S,w),a(S,T,B),r(B,w,S),o(w,w,S),a(T,w,w),o(S,K,Q),a(w,S,oe),r(w,w,K),a(S,S,w),a(w,K,Q),a(K,T,de),a(T,B,B),s(w,T,y),s(S,K,y);return l(S,S),a(w,w,S),t(O,w),O}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 O=Uint8Array.from([y[0]>>2&63,(y[0]<<4|y[1]>>4)&63,(y[1]<<2|y[2]>>6)&63,y[2]&63]),w=0;w<4;++w)b[w]=O[w]+65+(25-O[w]>>8&6)-(51-O[w]>>8&75)-(61-O[w]>>8&15)+(62-O[w]>>8&3)}function _(b){var y,O=new Uint8Array(44);for(y=0;y<32/3;++y)p(O.subarray(y*4),b.subarray(y*3));return p(O.subarray(y*4),Uint8Array.from([b[y*3+0],b[y*3+1],0])),O[43]=61,String.fromCharCode.apply(null,O)}function x(b){let y=window.atob(b),O=y.length,w=new Uint8Array(O);for(let S=0;S>>8&255,y>>>16&255,y>>>24&255)}function R(b,y){b.push(y&255,y>>>8&255)}function P(b,y){for(var O=0;O>>1:y>>>1;F.table[O]=y}}for(var T=-1,S=0;S>>8^F.table[(T^b[S])&255];return(T^-1)>>>0}function k(b){for(var y=[],O=[],w=0,T=0;T{const n=e.__vccOpts||e;for(const[s,r]of t)n[s]=r;return n},gy={key:0,class:"navbar bg-dark sticky-top","data-bs-theme":"dark"},my={class:"container-fluid d-flex text-body align-items-center"},_y={key:0,class:"bi bi-list"},vy={key:1,class:"bi bi-x-lg"},Ey={__name:"App",setup(e){const t=un();t.initCrossServerConfiguration(),window.IS_WGDASHBOARD_DESKTOP&&(t.IsElectronApp=!0,t.CrossServerConfiguration.Enable=!0),On(t.CrossServerConfiguration,()=>{t.syncCrossServerConfiguration()},{deep:!0});const n=JE();return(s,r)=>{const o=a_("RouterLink");return Ot(),_r(Be,null,[r[2]||(r[2]=qn("div",{style:{"z-index":"9999",height:"5px"},class:"position-absolute loadingBar top-0 start-0"},null,-1)),ot(n).meta.hideTopNav?q_("",!0):(Ot(),_r("nav",gy,[qn("div",my,[Ee(o,{to:"/",class:"navbar-brand mb-0 h1"},{default:Yn(()=>r[1]||(r[1]=[qn("img",{src:qv,alt:"WGDashboard Logo",style:{width:"32px"}},null,-1)])),_:1,__:[1]}),qn("a",{role:"button",class:"navbarBtn text-body",onClick:r[0]||(r[0]=a=>ot(t).ShowNavBar=!ot(t).ShowNavBar),style:{"line-height":"0","font-size":"2rem"}},[Ee(yl,{name:"fade2",mode:"out-in"},{default:Yn(()=>[ot(t).ShowNavBar?(Ot(),_r("i",vy)):(Ot(),_r("i",_y))]),_:1})])])])),(Ot(),Ws(V_,null,{default:Yn(()=>[Ee(ot(Of),null,{default:Yn(({Component:a})=>[Ee(yl,{name:"app",mode:"out-in",type:"transition",appear:""},{default:Yn(()=>[(Ot(),Ws(l_(a)))]),_:2},1024)]),_:1})]),_:1}))],64)}}},yy=py(Ey,[["__scopeId","data-v-16b1f9a3"]]);let uo;await fetch("/api/locale").then(e=>e.json()).then(e=>uo=e.data).catch(()=>{uo=null});const ea=Fv(yy);ea.use(ms);const Pf=jv();Pf.use(({store:e})=>{e.$router=Qr(ms)});ea.use(Pf);const by=un();by.Locale=uo;ea.mount("#app");export{Jr as $,lc as A,Lv as B,tb as C,un as D,zs as E,Be as F,Mt as G,On as H,sb as I,Fo as J,zy as K,JE as L,Bc as M,_m as N,ky as O,jy as P,Ve as Q,ru as R,V_ as S,Jy as T,Xo as U,rv as V,ly as W,jo as X,fe as Y,Mo as Z,py as _,qn as a,Zy as a0,Py as a1,By as a2,Ky as a3,eb as a4,pf as a5,Gy as a6,Vy as a7,Uy as a8,Yy as a9,My as aa,Y_ as ab,z_ as ac,Ae as ad,Hy as ae,gs as af,nb as ag,qy as ah,Tu as ai,Xy as aj,Ee as b,_r as c,q_ as d,G_ as e,Ot as f,Hr as g,a_ as h,Wy as i,yl as j,Ws as k,l_ as l,Fy as m,zr as n,Bo as o,Qy as p,at as q,Cn as r,qr as s,mm as t,ot as u,Rv as v,Yn as w,Cu as x,Ml as y,rb as z}; diff --git a/src/static/app/dist/assets/localeText-DkjxgEQB.js b/src/static/app/dist/assets/localeText-n7rlaTGQ.js similarity index 76% rename from src/static/app/dist/assets/localeText-DkjxgEQB.js rename to src/static/app/dist/assets/localeText-n7rlaTGQ.js index 1fd0430..6233874 100644 --- a/src/static/app/dist/assets/localeText-DkjxgEQB.js +++ b/src/static/app/dist/assets/localeText-n7rlaTGQ.js @@ -1 +1 @@ -import{_ as e,G as t,c as o,t as a,f as c}from"./index-BaGiSoQe.js";const s={name:"localeText",props:{t:""},computed:{getLocaleText(){return t(this.t)}}};function n(r,p,l,_,i,x){return c(),o("span",null,a(this.getLocaleText),1)}const m=e(s,[["render",n]]);export{m as L}; +import{_ as e,G as t,c as o,t as a,f as c}from"./index-Upsq31TS.js";const s={name:"localeText",props:{t:""},computed:{getLocaleText(){return t(this.t)}}};function n(r,p,l,_,i,x){return c(),o("span",null,a(this.getLocaleText),1)}const m=e(s,[["render",n]]);export{m as L}; diff --git a/src/static/app/dist/assets/message-DmK834mY.js b/src/static/app/dist/assets/message-fHdP79jF.js similarity index 84% rename from src/static/app/dist/assets/message-DmK834mY.js rename to src/static/app/dist/assets/message-fHdP79jF.js index ac1ff00..33edf88 100644 --- a/src/static/app/dist/assets/message-DmK834mY.js +++ b/src/static/app/dist/assets/message-fHdP79jF.js @@ -1 +1 @@ -import{L as l}from"./localeText-DkjxgEQB.js";import{d as c}from"./dayjs.min-H8Pjp0HL.js";import{_ as h,c as o,a as e,b as a,w as u,j as p,n as g,t as i,h as f,f as n,e as _}from"./index-BaGiSoQe.js";const x={name:"message",methods:{dayjs:c,hide(){this.ct(),this.message.show=!1},show(){this.timeout=setTimeout(()=>{this.message.show=!1},5e3)},ct(){clearTimeout(this.timeout)}},components:{LocaleText:l},props:{message:Object},mounted(){this.show()},data(){return{dismiss:!1,timeout:null}}},v=["id"],b={key:0,class:"d-flex"},w={class:"fw-bold d-block",style:{"text-transform":"uppercase"}},y={class:"ms-auto"},k={key:1},T={class:"card-body d-flex align-items-center gap-3"};function M(j,s,C,L,t,m){const d=f("LocaleText");return n(),o("div",{onMouseenter:s[1]||(s[1]=r=>{t.dismiss=!0,this.ct()}),onMouseleave:s[2]||(s[2]=r=>{t.dismiss=!1,this.show()}),class:"card shadow rounded-3 position-relative message ms-auto",id:this.message.id},[e("div",{class:g([{"text-bg-danger":this.message.type==="danger","text-bg-success":this.message.type==="success","text-bg-warning":this.message.type==="warning"},"card-header pos"])},[a(p,{name:"zoom",mode:"out-in"},{default:u(()=>[t.dismiss?(n(),o("div",k,[e("small",{onClick:s[0]||(s[0]=r=>m.hide()),class:"d-block mx-auto w-100 text-center",style:{cursor:"pointer"}},[s[3]||(s[3]=e("i",{class:"bi bi-x-lg me-2"},null,-1)),a(d,{t:"Dismiss"})])])):(n(),o("div",b,[e("small",w,[a(d,{t:"FROM "}),_(" "+i(this.message.from),1)]),e("small",y,i(m.dayjs().format("hh:mm A")),1)]))]),_:1})],2),e("div",T,[e("div",null,i(this.message.content),1)])],40,v)}const z=h(x,[["render",M],["__scopeId","data-v-94c76b54"]]);export{z as M}; +import{L as l}from"./localeText-n7rlaTGQ.js";import{d as c}from"./dayjs.min-Cdu5c05l.js";import{_ as h,c as o,a as e,b as a,w as u,j as p,n as g,t as i,h as f,f as n,e as _}from"./index-Upsq31TS.js";const x={name:"message",methods:{dayjs:c,hide(){this.ct(),this.message.show=!1},show(){this.timeout=setTimeout(()=>{this.message.show=!1},5e3)},ct(){clearTimeout(this.timeout)}},components:{LocaleText:l},props:{message:Object},mounted(){this.show()},data(){return{dismiss:!1,timeout:null}}},v=["id"],b={key:0,class:"d-flex"},w={class:"fw-bold d-block",style:{"text-transform":"uppercase"}},y={class:"ms-auto"},k={key:1},T={class:"card-body d-flex align-items-center gap-3"};function M(j,s,C,L,t,m){const d=f("LocaleText");return n(),o("div",{onMouseenter:s[1]||(s[1]=r=>{t.dismiss=!0,this.ct()}),onMouseleave:s[2]||(s[2]=r=>{t.dismiss=!1,this.show()}),class:"card shadow rounded-3 position-relative message ms-auto",id:this.message.id},[e("div",{class:g([{"text-bg-danger":this.message.type==="danger","text-bg-success":this.message.type==="success","text-bg-warning":this.message.type==="warning"},"card-header pos"])},[a(p,{name:"zoom",mode:"out-in"},{default:u(()=>[t.dismiss?(n(),o("div",k,[e("small",{onClick:s[0]||(s[0]=r=>m.hide()),class:"d-block mx-auto w-100 text-center",style:{cursor:"pointer"}},[s[3]||(s[3]=e("i",{class:"bi bi-x-lg me-2"},null,-1)),a(d,{t:"Dismiss"})])])):(n(),o("div",b,[e("small",w,[a(d,{t:"FROM "}),_(" "+i(this.message.from),1)]),e("small",y,i(m.dayjs().format("hh:mm A")),1)]))]),_:1})],2),e("div",T,[e("div",null,i(this.message.content),1)])],40,v)}const z=h(x,[["render",M],["__scopeId","data-v-94c76b54"]]);export{z as M}; diff --git a/src/static/app/dist/assets/newConfiguration-CNk_9MbK.js b/src/static/app/dist/assets/newConfiguration-Cp_Zzc7o.js similarity index 99% rename from src/static/app/dist/assets/newConfiguration-CNk_9MbK.js rename to src/static/app/dist/assets/newConfiguration-Cp_Zzc7o.js index d9a80d2..f587bde 100644 --- a/src/static/app/dist/assets/newConfiguration-CNk_9MbK.js +++ b/src/static/app/dist/assets/newConfiguration-Cp_Zzc7o.js @@ -1,3 +1,3 @@ -import{p as P}from"./index-6o26Ihmr.js";import{_ as x,c as l,a as t,b as a,w as L,h as v,d as b,n as _,m as p,y as h,t as g,e as w,F as y,i as C,z as S,W as k,r as K,g as A,D as U,f as d}from"./index-BaGiSoQe.js";import{L as I}from"./localeText-DkjxgEQB.js";const N=s=>{const e=s.split(` +import{p as P}from"./index-6o26Ihmr.js";import{_ as x,c as l,a as t,b as a,w as L,h as v,d as b,n as _,m as p,y as h,t as g,e as w,F as y,i as C,z as S,W as k,r as K,g as A,D as U,f as d}from"./index-Upsq31TS.js";import{L as I}from"./localeText-n7rlaTGQ.js";const N=s=>{const e=s.split(` `),i={};for(let c of e){if(c==="[Peer]")break;if(c.length>0){let n=c.replace(" = ","=");n.indexOf("=")>-1&&(n=[n.slice(0,n.indexOf("=")),n.slice(n.indexOf("=")+1)],n[0]==="ListenPort"?i[n[0]]=parseInt(n[1]):i[n[0]]=n[1])}}return i},O=s=>{const e=s.split(` `),i=[];let c=-1;const n=e.indexOf("[Peer]");if(n===-1)return!1;for(let u=n;u-1&&(f=[f.slice(0,f.indexOf("=")),f.slice(f.indexOf("=")+1)],i[c][f[0]]=f[1])}return i},q={name:"newConfiguration",components:{LocaleText:I},async setup(){const s=k(),e=K([]);await A("/api/protocolsEnabled",{},c=>{e.value=c.data});const i=U();return{store:s,protocols:e,dashboardStore:i}},data(){return{newConfiguration:{ConfigurationName:"",Address:"",ListenPort:"",PrivateKey:"",PublicKey:"",PresharedKey:"",PreUp:"",PreDown:"",PostUp:"",PostDown:"",Table:"",Protocol:"wg",Jc:5,Jmin:49,Jmax:998,S1:17,S2:110,H1:0,H2:0,H3:0,H4:0},numberOfAvailableIPs:"0",error:!1,errorMessage:"",success:!1,loading:!1,parseInterfaceResult:void 0,parsePeersResult:void 0}},created(){this.wireguardGenerateKeypair();let s=[];for(;[...new Set(s)].length!==4;)s=[this.rand(1,2**31-1),this.rand(1,2**31-1),this.rand(1,2**31-1),this.rand(1,2**31-1)];this.newConfiguration.H1=s[0],this.newConfiguration.H2=s[1],this.newConfiguration.H3=s[2],this.newConfiguration.H4=s[3]},methods:{rand(s,e){return Math.floor(Math.random()*(e-s)+s)},wireguardGenerateKeypair(){const s=window.wireguard.generateKeypair();this.newConfiguration.PrivateKey=s.privateKey,this.newConfiguration.PublicKey=s.publicKey,this.newConfiguration.PresharedKey=s.presharedKey},async saveNewConfiguration(){this.goodToSubmit&&(this.loading=!0,await S("/api/addWireguardConfiguration",this.newConfiguration,async s=>{s.status?(this.success=!0,await this.store.getConfigurations(),this.$router.push(`/configuration/${this.newConfiguration.ConfigurationName}/peers`)):(this.error=!0,this.errorMessage=s.message,document.querySelector(`#${s.data}`).classList.remove("is-valid"),document.querySelector(`#${s.data}`).classList.add("is-invalid"),this.loading=!1)}))},openFileUpload(){document.querySelector("#fileUpload").click()},readFile(s){const e=s.target.files[0];if(!e)return!1;const i=new FileReader;i.onload=c=>{this.parseInterfaceResult=N(c.target.result),this.parsePeersResult=O(c.target.result);let n=0;if(this.parseInterfaceResult){this.newConfiguration.ConfigurationName=e.name.replace(".conf","");for(let u of Object.keys(this.parseInterfaceResult))Object.keys(this.newConfiguration).includes(u)&&(this.newConfiguration[u]=this.parseInterfaceResult[u],n+=1)}n>0?this.dashboardStore.newMessage("WGDashboard",`Parse successful! Updated ${n} field(s)`,"success"):this.dashboardStore.newMessage("WGDashboard","Parse failed","danger")},i.readAsText(e)}},computed:{goodToSubmit(){let s=["ConfigurationName","Address","ListenPort","PrivateKey"],e=[...document.querySelectorAll("input[required]")];return s.find(i=>this.newConfiguration[i].length===0)===void 0&&e.find(i=>i.classList.contains("is-invalid"))===void 0}},watch:{"newConfiguration.Address"(s){let e=document.querySelector("#Address");e.classList.remove("is-invalid","is-valid");try{if(s.trim().split("/").filter(n=>n.length>0).length!==2)throw Error();let i=P(s),c=i.end-i.start;this.numberOfAvailableIPs=c.toLocaleString(),e.classList.add("is-valid")}catch{this.numberOfAvailableIPs="0",e.classList.add("is-invalid")}},"newConfiguration.ListenPort"(s){let e=document.querySelector("#ListenPort");e.classList.remove("is-invalid","is-valid"),s<0||s>65353||!Number.isInteger(s)?e.classList.add("is-invalid"):e.classList.add("is-valid")},"newConfiguration.ConfigurationName"(s){let e=document.querySelector("#ConfigurationName");e.classList.remove("is-invalid","is-valid"),!/^[a-zA-Z0-9_=+.-]{1,15}$/.test(s)||s.length===0||this.store.Configurations.find(i=>i.Name===s)?e.classList.add("is-invalid"):e.classList.add("is-valid")},"newConfiguration.PrivateKey"(s){let e=document.querySelector("#PrivateKey");e.classList.remove("is-invalid","is-valid");try{wireguard.generatePublicKey(s),e.classList.add("is-valid")}catch{e.classList.add("is-invalid")}}},mounted(){document.querySelector("#fileUpload").addEventListener("change",this.readFile,!1)}},D={class:"mt-md-5 mt-3 text-body"},R={class:"container mb-4"},H={class:"mb-4 d-flex align-items-center gap-4 align-items-center"},T={class:"mb-0"},$={class:"d-flex gap-2 ms-auto"},M={class:"card rounded-3 shadow"},F={class:"card-header"},G={class:"card-body d-flex gap-2 protocolBtnGroup"},V={key:0,class:"bi bi-check-circle-fill me-2"},B={key:1,class:"bi bi-circle me-2"},W={key:0,class:"bi bi-check-circle-fill me-2"},J={key:1,class:"bi bi-circle me-2"},z={class:"card rounded-3 shadow"},E={class:"card-header"},j={class:"card-body"},Z=["disabled"],Q={class:"invalid-feedback"},X={key:0},Y={key:1},ee={class:"mb-0"},te={class:"card rounded-3 shadow"},se={class:"card-header"},ie={class:"card-body",style:{"font-family":"var(--bs-font-monospace)"}},oe={class:"mb-2"},ne={class:"text-muted fw-bold mb-1"},ae={class:"input-group"},re=["disabled"],le={class:"text-muted fw-bold mb-1"},de={class:"card rounded-3 shadow"},ce={class:"card-header"},ue={class:"card-body"},fe=["disabled"],pe={class:"invalid-feedback"},he={key:0},ge={key:1},me={class:"card rounded-3 shadow"},be={class:"card-header d-flex align-items-center"},ve={class:"badge rounded-pill text-bg-success ms-auto"},_e={class:"card-body"},we=["disabled"],ye={class:"invalid-feedback"},Ce={key:0},Pe={key:1},xe={class:"accordion",id:"newConfigurationOptionalAccordion"},Le={class:"accordion-item"},Se={class:"accordion-header"},ke={class:"accordion-button collapsed",type:"button","data-bs-toggle":"collapse","data-bs-target":"#newConfigurationOptionalAccordionCollapse"},Ke={id:"newConfigurationOptionalAccordionCollapse",class:"accordion-collapse collapse","data-bs-parent":"#newConfigurationOptionalAccordion"},Ae={class:"accordion-body d-flex flex-column gap-3"},Ue={class:"card rounded-3"},Ie={class:"card-header"},Ne={class:"card-body"},Oe=["id","onUpdate:modelValue"],qe={class:"card rounded-3"},De={class:"card-header"},Re={class:"card-body"},He=["id","onUpdate:modelValue"],Te=["disabled"],$e={key:0,class:"d-flex w-100"},Me={key:1,class:"d-flex w-100"},Fe={key:2,class:"d-flex w-100 align-items-center"};function Ge(s,e,i,c,n,u){const f=v("RouterLink"),r=v("LocaleText");return d(),l("div",D,[t("div",R,[t("div",H,[a(f,{to:"/",class:"btn btn-dark btn-brand p-2 shadow",style:{"border-radius":"100%"}},{default:L(()=>e[10]||(e[10]=[t("h2",{class:"mb-0",style:{"line-height":"0"}},[t("i",{class:"bi bi-arrow-left-circle"})],-1)])),_:1,__:[10]}),t("h2",T,[a(r,{t:"New Configuration"})]),t("div",$,[t("button",{class:"titleBtn py-2 text-decoration-none btn text-primary-emphasis bg-primary-subtle rounded-3 border-1 border-primary-subtle",onClick:e[0]||(e[0]=o=>u.openFileUpload()),type:"button","aria-expanded":"false"},[e[11]||(e[11]=t("i",{class:"bi bi-upload me-2"},null,-1)),a(r,{t:"Open File"})]),e[12]||(e[12]=t("input",{type:"file",id:"fileUpload",multiple:"",class:"d-none",accept:"text/plain"},null,-1))])]),t("form",{class:"text-body d-flex flex-column gap-3",onSubmit:e[9]||(e[9]=o=>{o.preventDefault(),this.saveNewConfiguration()})},[t("div",M,[t("div",F,[a(r,{t:"Protocol"})]),t("div",G,[this.protocols.includes("wg")?(d(),l("a",{key:0,onClick:e[1]||(e[1]=o=>this.newConfiguration.Protocol="wg"),class:_([{"opacity-50":this.newConfiguration.Protocol!=="wg"},"btn btn-primary wireguardBg border-0"]),style:{"flex-basis":"100%"}},[this.newConfiguration.Protocol==="wg"?(d(),l("i",V)):(d(),l("i",B)),e[13]||(e[13]=t("strong",null," WireGuard ",-1))],2)):b("",!0),this.protocols.includes("awg")?(d(),l("a",{key:1,onClick:e[2]||(e[2]=o=>this.newConfiguration.Protocol="awg"),class:_([{"opacity-50":this.newConfiguration.Protocol!=="awg"},"btn btn-primary amneziawgBg border-0"]),style:{"flex-basis":"100%"}},[this.newConfiguration.Protocol==="awg"?(d(),l("i",W)):(d(),l("i",J)),e[14]||(e[14]=t("strong",null," AmneziaWG ",-1))],2)):b("",!0)])]),t("div",z,[t("div",E,[a(r,{t:"Configuration Name"})]),t("div",j,[p(t("input",{type:"text",class:"form-control",placeholder:"ex. wg1",id:"ConfigurationName","onUpdate:modelValue":e[3]||(e[3]=o=>this.newConfiguration.ConfigurationName=o),disabled:this.loading,required:""},null,8,Z),[[h,this.newConfiguration.ConfigurationName]]),t("div",Q,[this.error?(d(),l("div",X,g(this.errorMessage),1)):(d(),l("div",Y,[a(r,{t:"Configuration name is invalid. Possible reasons:"}),t("ul",ee,[t("li",null,[a(r,{t:"Configuration name already exist."})]),t("li",null,[a(r,{t:"Configuration name can only contain 15 lower/uppercase alphabet, numbers, underscore, equal sign, plus sign, period and hyphen."})])])]))])])]),t("div",te,[t("div",se,[a(r,{t:"Private Key"}),e[15]||(e[15]=w(" & ")),a(r,{t:"Public Key"})]),t("div",ie,[t("div",oe,[t("label",ne,[t("small",null,[a(r,{t:"Private Key"})])]),t("div",ae,[p(t("input",{type:"text",class:"form-control",id:"PrivateKey",required:"",disabled:this.loading,"onUpdate:modelValue":e[4]||(e[4]=o=>this.newConfiguration.PrivateKey=o)},null,8,re),[[h,this.newConfiguration.PrivateKey]]),t("button",{class:"btn btn-outline-primary",type:"button",title:"Regenerate Private Key",onClick:e[5]||(e[5]=o=>u.wireguardGenerateKeypair())},e[16]||(e[16]=[t("i",{class:"bi bi-arrow-repeat"},null,-1)]))])]),t("div",null,[t("label",le,[t("small",null,[a(r,{t:"Public Key"})])]),p(t("input",{type:"text",class:"form-control",id:"PublicKey","onUpdate:modelValue":e[6]||(e[6]=o=>this.newConfiguration.PublicKey=o),disabled:""},null,512),[[h,this.newConfiguration.PublicKey]])])])]),t("div",de,[t("div",ce,[a(r,{t:"Listen Port"})]),t("div",ue,[p(t("input",{type:"number",class:"form-control",placeholder:"0-65353",id:"ListenPort",min:"1",max:"65353","onUpdate:modelValue":e[7]||(e[7]=o=>this.newConfiguration.ListenPort=o),disabled:this.loading,required:""},null,8,fe),[[h,this.newConfiguration.ListenPort]]),t("div",pe,[this.error?(d(),l("div",he,g(this.errorMessage),1)):(d(),l("div",ge,[a(r,{t:"Invalid port"})]))])])]),t("div",me,[t("div",be,[a(r,{t:"IP Address/CIDR"}),t("span",ve,[a(r,{t:n.numberOfAvailableIPs+" Available IP Address"},null,8,["t"])])]),t("div",_e,[p(t("input",{type:"text",class:"form-control",placeholder:"Ex: 10.0.0.1/24",id:"Address","onUpdate:modelValue":e[8]||(e[8]=o=>this.newConfiguration.Address=o),disabled:this.loading,required:""},null,8,we),[[h,this.newConfiguration.Address]]),t("div",ye,[this.error?(d(),l("div",Ce,g(this.errorMessage),1)):(d(),l("div",Pe," IP Address/CIDR is invalid "))])])]),e[21]||(e[21]=t("hr",null,null,-1)),t("div",xe,[t("div",Le,[t("h2",Se,[t("button",ke,[a(r,{t:"Optional Settings"})])]),t("div",Ke,[t("div",Ae,[(d(),l(y,null,C(["Table","PreUp","PreDown","PostUp","PostDown"],o=>t("div",Ue,[t("div",Ie,g(o),1),t("div",Ne,[p(t("input",{type:"text",class:"form-control font-monospace",id:o,"onUpdate:modelValue":m=>this.newConfiguration[o]=m},null,8,Oe),[[h,this.newConfiguration[o]]])])])),64)),this.newConfiguration.Protocol==="awg"?(d(),l(y,{key:0},C(["Jc","Jmin","Jmax","S1","S2","H1","H2","H3","H4"],o=>t("div",qe,[t("div",De,g(o),1),t("div",Re,[p(t("input",{type:"text",class:"form-control font-monospace",id:o,"onUpdate:modelValue":m=>this.newConfiguration[o]=m},null,8,He),[[h,this.newConfiguration[o]]])])])),64)):b("",!0)])])])]),t("button",{class:"btn btn-dark btn-brand rounded-3 px-3 py-2 shadow ms-auto",disabled:!this.goodToSubmit||this.loading||this.success},[this.success?(d(),l("span",$e,[a(r,{t:"Success"}),e[17]||(e[17]=w("! ")),e[18]||(e[18]=t("i",{class:"bi bi-check-circle-fill ms-2"},null,-1))])):this.loading?(d(),l("span",Fe,[a(r,{t:"Saving..."}),e[20]||(e[20]=t("span",{class:"ms-2 spinner-border spinner-border-sm",role:"status"},null,-1))])):(d(),l("span",Me,[e[19]||(e[19]=t("i",{class:"bi bi-save-fill me-2"},null,-1)),a(r,{t:"Save"})]))],8,Te)],32)])])}const Je=x(q,[["render",Ge],["__scopeId","data-v-b0234609"]]);export{Je as default}; diff --git a/src/static/app/dist/assets/osmap-DImWbvYV.js b/src/static/app/dist/assets/osmap-DlPRtGR3.js similarity index 99% rename from src/static/app/dist/assets/osmap-DImWbvYV.js rename to src/static/app/dist/assets/osmap-DlPRtGR3.js index 98bb86e..3bb480d 100644 --- a/src/static/app/dist/assets/osmap-DImWbvYV.js +++ b/src/static/app/dist/assets/osmap-DlPRtGR3.js @@ -1,4 +1,4 @@ -import{_ as xl,D as Cl,c as wl,d as Rl,f as Il}from"./index-BaGiSoQe.js";const Et={ADD:"add",REMOVE:"remove"},ui={PROPERTYCHANGE:"propertychange"},X={CHANGE:"change",ERROR:"error",CONTEXTMENU:"contextmenu",CLICK:"click",DBLCLICK:"dblclick",KEYDOWN:"keydown",KEYPRESS:"keypress",LOAD:"load",TOUCHMOVE:"touchmove",WHEEL:"wheel"};class zn{constructor(){this.disposed=!1}dispose(){this.disposed||(this.disposed=!0,this.disposeInternal())}disposeInternal(){}}function Tl(n,t,e){let i,s;e=e||re;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 re(n,t){return n>t?1:nt?-1:0}function nr(n,t,e){if(n[0]<=t)return 0;const i=n.length;if(t<=n[i-1])return i-1;if(typeof e=="function"){for(let s=1;s0?s-1:s}return i-1}if(e>0){for(let s=1;s0||o===0)})}function Yi(){return!0}function Wn(){return!1}function Ki(){}function ia(n){let t,e,i;return function(){const s=Array.prototype.slice.call(arguments);return(!e||this!==i||!Te(s,e))&&(i=this,e=s,t=n.apply(this,arguments)),t}}function Al(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 en(n){for(const t in n)delete n[t]}function di(n){let t;for(t in n)return!1;return!t}class ce{constructor(t){this.propagationStopped,this.defaultPrevented,this.type=t,this.target=null}preventDefault(){this.defaultPrevented=!0}stopPropagation(){this.propagationStopped=!0}}class Yn extends zn{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 ce(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]=Ki,++this.pendingRemovals_[t]):(i.splice(s,1),i.length===0&&delete this.listeners_[t]))}}function V(n,t,e,i,s){if(s){const o=e;e=function(a){return n.removeEventListener(t,e),o.call(i??this,a)}}else i&&i!==n&&(e=e.bind(i));const r={target:n,type:t,listener:e};return n.addEventListener(t,e),r}function Tn(n,t,e,i){return V(n,t,e,i,!0)}function tt(n){n&&n.target&&(n.target.removeEventListener(n.type,n.listener),en(n))}class nn extends Yn{constructor(){super(),this.on=this.onInternal,this.once=this.onceInternal,this.un=this.unInternal,this.revision_=0}changed(){++this.revision_,this.dispatchEvent(X.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 fn(Et.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 fn(Et.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 fn(Et.REMOVE,s,t)),this.dispatchEvent(new fn(Et.ADD,e,t))}updateLength_(){this.set($r.LENGTH,this.array_.length)}assertUnique_(t,e){for(let i=0,s=this.array_.length;i{this.clickTimeoutId_=void 0;const i=new pe(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 pe(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 pe(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 pe(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 pe(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(X.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 ye={POSTRENDER:"postrender",MOVESTART:"movestart",MOVEEND:"moveend",LOADSTART:"loadstart",LOADEND:"loadend"},ft={LAYERGROUP:"layergroup",SIZE:"size",TARGET:"target",VIEW:"view"},P={IDLE:0,LOADING:1,LOADED:2,ERROR:3,EMPTY:4};function q(n,t){if(!n)throw new Error(t)}const Sn=1/0;class kl{constructor(t,e){this.priorityFunction_=t,this.keyFunction_=e,this.elements_=[],this.priorities_=[],this.queuedElements_={}}clear(){this.elements_.length=0,this.priorities_.length=0,en(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){q(!(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!=Sn?(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;at.apply(null,i),i=>i[0].getKey()),this.boundHandleTileChange_=this.handleTileChange.bind(this),this.tileChangeCallback_=e,this.tilesLoading_=0,this.tilesLoadingKeys_={}}enqueue(t){const e=super.enqueue(t);return e&&t[0].addEventListener(X.CHANGE,this.boundHandleTileChange_),e}getTilesLoading(){return this.tilesLoading_}handleTileChange(t){const e=t.target,i=e.getState();if(i===P.LOADED||i===P.ERROR||i===P.EMPTY){i!==P.ERROR&&e.removeEventListener(X.CHANGE,this.boundHandleTileChange_);const s=e.getKey();s in this.tilesLoadingKeys_&&(delete this.tilesLoadingKeys_[s],--this.tilesLoading_),this.tileChangeCallback_()}}loadMoreTiles(t,e){let i=0;for(;this.tilesLoading_0;){const s=this.dequeue()[0],r=s.getKey();s.getState()===P.IDLE&&!(r in this.tilesLoadingKeys_)&&(this.tilesLoadingKeys_[r]=!0,++this.tilesLoading_,++i,s.load())}}}function Gl(n,t,e,i,s){if(!n||!(e in n.wantedTiles)||!n.wantedTiles[e][t.getKey()])return Sn;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}const gt={ANIMATING:0,INTERACTING:1},zt={CENTER:"center",RESOLUTION:"resolution",ROTATION:"rotation"};function et(n,t,e){return Math.min(Math.max(n,t),e)}function zl(n,t,e,i,s,r){const o=s-e,a=r-i;if(o!==0||a!==0){const l=((n-e)*o+(t-i)*a)/(o*o+a*a);l>1?(e=s,i=r):l>0&&(e+=o*l,i+=a*l)}return oi(n,t,e,i)}function oi(n,t,e,i){const s=e-n,r=i-t;return s*s+r*r}function Xl(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 Jr(n){return n*180/Math.PI}function we(n){return n*Math.PI/180}function ai(n,t){const e=n%t;return e*t<0?e+t:e}function Lt(n,t,e){return n+e*(t-n)}function Kn(n,t){const e=Math.pow(10,t);return Math.round(n*e)/e}function gn(n,t){return Math.floor(Kn(n,t))}function _n(n,t){return Math.ceil(Kn(n,t))}function Ws(n,t,e){if(n>=t&&nf&&(d=(f+d)/2,f=d),g>m&&(g=(m+g)/2,m=g);let _=et(i[0],d,f),p=et(i[1],g,m);if(o&&e&&s){const E=30*s;_+=-E*Math.log(1+Math.max(0,d-i[0])/E)+E*Math.log(1+Math.max(0,i[0]-f)/E),p+=-E*Math.log(1+Math.max(0,g-i[1])/E)+E*Math.log(1+Math.max(0,i[1]-m)/E)}return[_,p]}}function Wl(n){return n}const lt={UNKNOWN:0,INTERSECTING:1,ABOVE:2,RIGHT:4,BELOW:8,LEFT:16};function to(n){const t=Nt();for(let e=0,i=n.length;es&&(l=l|lt.RIGHT),ar&&(l=l|lt.ABOVE),l===lt.UNKNOWN&&(l=lt.INTERSECTING),l}function Nt(){return[1/0,1/0,-1/0,-1/0]}function Ie(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 Ie(1/0,1/0,-1/0,-1/0,n)}function la(n,t){const e=n[0],i=n[1];return Ie(e,i,e,i,t)}function ar(n,t,e,i,s){const r=Bn(s);return ha(r,n,t,e,i)}function Bi(n,t){return n[0]==t[0]&&n[2]==t[2]&&n[1]==t[1]&&n[3]==t[3]}function Yl(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 ha(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 jn(n){return n[2]=o&&m<=l),!i&&r<.RIGHT&&!(s<.RIGHT)&&(_=f-(d-l)*g,i=_>=a&&_<=c),!i&&r<.BELOW&&!(s<.BELOW)&&(m=d-(f-a)/g,i=m>=o&&m<=l),!i&&r<.LEFT&&!(s<.LEFT)&&(_=f-(d-o)*g,i=_>=a&&_<=c)}return i}function da(n,t){const e=t.getExtent(),i=Xe(n);if(t.canWrapX()&&(i[0]=e[2])){const s=J(e),o=Math.floor((i[0]-e[0])/s)*s;n[0]-=o,n[2]-=o}return n}function fa(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]]];da(n,t);const s=J(i);if(J(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 Vl(n,t){return n[0]+=+t[0],n[1]+=+t[1],n}function vn(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 lr(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 jl(n,t){return n[0]*=t,n[1]*=t,n}function ga(n,t){if(t.canWrapX()){const e=J(t.getExtent()),i=Hl(n,t,e);i&&(n[0]-=i*e)}return n}function Hl(n,t,e){const i=t.getExtent();let s=0;return t.canWrapX()&&(n[0]i[2])&&(e=e||J(i),s=Math.floor((n[0]-i[0])/e)),s}function _a(n){return Math.pow(n,3)}function Ei(n){return 1-_a(1-n)}function ql(n){return 3*n*n-2*n*n*n}function $l(n){return n}const Jl=63710088e-1;function eo(n,t,e){e=e||Jl;const i=we(n[1]),s=we(t[1]),r=(s-i)/2,o=we(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 ma(...n){console.warn(...n)}const hr={radians:6370997/(2*Math.PI),degrees:2*Math.PI*6370997/360,ft:.3048,m:1,"us-ft":1200/3937};class cr{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_||hr[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 sn=6378137,ri=Math.PI*sn,Ql=[-ri,-ri,ri,ri],th=[-180,-85,180,85],mn=sn*Math.log(Math.tan(Math.PI/2));class je extends cr{constructor(t){super({code:t,units:"m",extent:Ql,global:!0,worldExtent:th,getPointResolution:function(e,i){return e/Math.cosh(i[1]/sn)}})}}const io=[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 eh(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;rmn?o=mn:o<-mn&&(o=-mn),t[r+1]=o}return t}function ih(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;rao&&(t=ao);const i=we(t),s=Math.sin(i),r=Math.cos(i),o=s/r,a=o*o,l=a*a,c=we(n),h=xa(e.number),u=we(h),d=An/Math.sqrt(1-kt*s**2),f=Pe*r**2,g=r*Ws(c-u,-Math.PI,Math.PI),m=g*g,_=m*g,p=_*g,E=p*g,C=E*g,y=An*(Ea*i-ah*Math.sin(2*i)+lh*Math.sin(4*i)-hh*Math.sin(6*i)),x=Ln*d*(g+_/6*(1-a+f)+E/120*(5-18*a+l+72*f-58*Pe))+5e5;let R=Ln*(y+d*o*(m/2+p/24*(5-a+9*f+4*f**2)+C/720*(61-58*a+l+600*f-330*Pe)));return e.north||(R+=1e7),[x,R]}function xa(n){return(n-1)*6-180+3}const yh=[/^EPSG:(\d+)$/,/^urn:ogc:def:crs:EPSG::(\d+)$/,/^http:\/\/www\.opengis\.net\/def\/crs\/EPSG\/0\/(\d+)$/];function Ca(n){let t=0;for(const s of yh){const r=n.match(s);if(r){t=parseInt(r[1]);break}}if(!t)return null;let e=0,i=!1;return t>32700&&t<32761?e=t-32700:t>32600&&t<32661&&(i=!0,e=t-32600),e?{number:e,north:i}:null}function lo(n,t){return function(e,i,s,r){const o=e.length;s=s>1?s:2,r=r??s,i||(s>2?i=e.slice():i=new Array(o));for(let a=0;a=l?t[o+c]:a[c]}return e}}function gs(n,t){return wa(),mr(n,"EPSG:4326","EPSG:3857")}function _s(n,t){if(n===t)return!0;const e=n.getUnits()===t.getUnits();return(n.getCode()===t.getCode()||_r(n,t)===fr)&&e}function _r(n,t){const e=n.getCode(),i=t.getCode();let s=fs(e,i);if(s)return s;let r=null,o=null;for(const l of Ch)r||(r=l(n)),o||(o=l(t));if(!r&&!o)return null;const a="EPSG:4326";if(o)if(r)s=ms(r.inverse,o.forward);else{const l=fs(e,a);l&&(s=ms(l,o.forward))}else{const l=fs(a,i);l&&(s=ms(r.inverse,l))}return s&&(Vs(n),Vs(t),Zi(n,t,s)),s}function ms(n,t){return function(e,i,s,r){return i=n(e,i,s,r),t(i,i,s,r)}}function Mn(n,t){const e=Tt(n),i=Tt(t);return _r(e,i)}function mr(n,t,e){const i=Mn(t,e);if(!i){const s=Tt(t).getCode(),r=Tt(e).getCode();throw new Error(`No transform available between ${s} and ${r}`)}return i(n,void 0,n.length)}function js(n,t){return n}function ne(n,t){return Us&&!vn(n,[0,0])&&n[0]>=-180&&n[0]<=180&&n[1]>=-90&&n[1]<=90&&(Us=!1,ma("Call useGeographic() from ol/proj once to work with [longitude, latitude] coordinates.")),n}function Ra(n,t){return n}function xe(n,t){return n}function Sh(){co(io),co(so),Ih(so,io,eh,ih)}Sh();new Array(6);function Yt(){return[1,0,0,1,0,0]}function vh(n,t){return n[0]=t[0],n[1]=t[1],n[2]=t[2],n[3]=t[3],n[4]=t[4],n[5]=t[5],n}function ht(n,t){const e=t[0],i=t[1];return t[0]=n[0]*e+n[2]*i+n[4],t[1]=n[1]*e+n[3]*i+n[5],t}function he(n,t,e,i,s,r,o,a){const l=Math.sin(r),c=Math.cos(r);return n[0]=i*c,n[1]=s*l,n[2]=-i*l,n[3]=s*c,n[4]=o*i*c-a*i*l+t,n[5]=o*s*l+a*s*c+e,n}function Ia(n,t){const e=Lh(t);q(e!==0,"Transformation matrix cannot be inverted");const i=t[0],s=t[1],r=t[2],o=t[3],a=t[4],l=t[5];return n[0]=o/e,n[1]=-s/e,n[2]=-r/e,n[3]=i/e,n[4]=(r*l-o*a)/e,n[5]=-(i*l-s*a)/e,n}function Lh(n){return n[0]*n[3]-n[1]*n[2]}const Ah=[1e5,1e5,1e5,1e5,2,2];function Mh(n){return"matrix("+n.join(", ")+")"}function uo(n){return n.substring(7,n.length-1).split(",").map(parseFloat)}function bh(n,t){const e=uo(n),i=uo(t);for(let s=0;s<6;++s)if(Math.round((e[s]-i[s])*Ah[s])!==0)return!1;return!0}function Re(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){return this.closestPointXY(t,e,Oh,Number.MIN_VALUE)===0}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 Zl(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=Tt(t),s=i.getUnits()=="tile-pixels"?function(r,o,a){const l=i.getExtent(),c=i.getWorldExtent(),h=yt(c)/yt(l);he(fo,c[0],c[3],h,-h,0,0,0);const u=Re(r,0,r.length,a,fo,o),d=Mn(i,e);return d?d(u,u,a):u}:Mn(i,e);return this.applyTransform(s),this}}class $n extends Fh{constructor(){super(),this.layout="XY",this.stride=2,this.flatCoordinates}computeExtent(t){return ar(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 zh(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],m=n[d+1],_=n[u],p=n[u+1];for(let E=d+i;Ef&&(h=E,f=x)}f>s&&(l[(h-t)/i]=1,d+i0&&m>f)&&(g<0&&_0&&_>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 va(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 La(n,t,e,i,s,r){if(e.length===0||!Fe(n,t,e[0],i,s,r))return!1;for(let o=1,a=e.length;op&&(c=(h+u)/2,La(n,t,e,i,c,g)&&(_=c,p=E)),h=u}return isNaN(_)&&(_=s[r]),o?(o.push(_,g,p),o):[_,g,p]}function Uh(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:Aa(n,t,e,i,function(o,a){return Ul(s,o,a)}):!1}function Ma(n,t,e,i,s){return!!(Cr(n,t,e,i,s)||Fe(n,t,e,i,s[0],s[1])||Fe(n,t,e,i,s[0],s[3])||Fe(n,t,e,i,s[2],s[1])||Fe(n,t,e,i,s[2],s[3]))}function Vh(n,t,e,i,s){if(!Ma(n,t,e[0],i,s))return!1;if(e.length===1)return!0;for(let r=1,o=e.length;r0}function Hh(n,t,e,i,s){s=s!==void 0?s:!1;for(let r=0,o=e.length;rh&&d1&&typeof arguments[e-1]=="function"&&(i=arguments[e-1],--e);let s=0;for(;s0}getInteracting(){return this.hints_[gt.INTERACTING]>0}cancelAnimations(){this.setHint(gt.ANIMATING,-this.hints_[gt.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],m=l.targetCenter[1];this.nextCenter_=l.targetCenter;const _=d+u*(g-d),p=f+u*(m-f);this.targetCenter_=[_,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?ai(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(gt.ANIMATING,-1),this.nextCenter_=null,this.nextResolution_=NaN,this.nextRotation_=NaN;const o=s[0].callback;o&&pn(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]],lr(i,t-this.getRotation()),Vl(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&&js(t,this.getProjection())}getCenterInternal(){return this.get(zt.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 Ra(e,this.getProjection())}calculateExtentInternal(t){t=t||this.getViewportSizeMinusPadding_();const e=this.getCenterInternal();q(e,"The view center is not defined");const i=this.getResolution();q(i!==void 0,"The view resolution is not defined");const s=this.getRotation();return q(s!==void 0,"The view rotation is not defined"),Bs(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(zt.RESOLUTION)}getResolutions(){return this.resolutions_}getResolutionForExtent(t,e){return this.getResolutionForExtentInternal(xe(t,this.getProjection()),e)}getResolutionForExtentInternal(t,e){e=e||this.getViewportSizeMinusPadding_();const i=J(t)/e[0],s=yt(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(zt.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=ys(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=nr(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=et(Math.floor(t),0,this.resolutions_.length-2),i=this.resolutions_[e]/this.resolutions_[e+1];return this.resolutions_[e]/Math.pow(i,et(t-e,0,1))}return this.maxResolution_/Math.pow(this.zoomFactor_,t-this.minZoom_)}fit(t,e){let i;if(q(Array.isArray(t)||typeof t.getSimplifiedGeometry=="function","Invalid extent or geometry provided as `geometry`"),Array.isArray(t)){q(!jn(t),"Cannot fit empty extent provided as `geometry`");const s=xe(t,this.getProjection());i=yo(s)}else if(t.getType()==="Circle"){const s=xe(t.getExtent(),this.getProjection());i=yo(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;ui.trim().replace(/^['"]|['"]$/g,"")),e};function ot(n,t,e,i){let s;return e&&e.length?s=e.shift():sr?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 Dn(){return Es||(Es=ot(1,1)),Es}function ts(n){const t=n.canvas;t.width=1,t.height=1,n.clearRect(0,0,1,1)}function Ro(n,t){const e=t.parentNode;e&&e.replaceChild(n,t)}function ac(n){for(;n.lastChild;)n.lastChild.remove()}function lc(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)}}}class Lr 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=>Al(()=>s))),i=e.length>0;if(this.renderedVisible_!=i&&(this.element.style.display=i?"":"none",this.renderedVisible_=i),!Te(e,this.renderedAttributions_)){ac(this.ulElement_);for(let s=0,r=e.length;s0&&i%(2*Math.PI)!==0?e.animate({rotation:0,duration:this.duration_,easing:Ei}):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(yn);!r&&i===0?this.element.classList.add(yn):r&&i!==0&&this.element.classList.remove(yn)}this.label_.style.transform=s}this.rotation_=i}}class uc extends Lr{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(X.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(X.CLICK,this.handleClick_.bind(this,-i),!1);const d=e+" "+Qn+" "+vr,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:Ei})):i.setZoom(r)}}}function dc(n){n=n||{};const t=new Ht;return(n.zoom!==void 0?n.zoom:!0)&&t.push(new uc(n.zoomOptions)),(n.rotate!==void 0?n.rotate:!0)&&t.push(new cc(n.rotateOptions)),(n.attribution!==void 0?n.attribution:!0)&&t.push(new hc(n.attributionOptions)),t}class fc{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_}}const Io={ACTIVE:"active"};class rn 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(Io.ACTIVE)}getMap(){return this.map_}handleEvent(t){return!0}setActive(t){this.set(Io.ACTIVE,t)}setMap(t){this.map_=t}}function gc(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:$l,center:n.getConstrainedCenter(s)})}}function Ar(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:Ei})}class _c extends rn{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();Ar(a,o,r,this.duration_),i.preventDefault(),e=!0}return!e}}function $s(n){const t=arguments;return function(e){let i=!0;for(let s=0,r=t.length;s0}}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 Mr(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 Rc extends on{constructor(t){t=t||{},super({stopDown:Wn}),this.condition_=t.condition?t.condition:mc,this.lastAngle_=void 0,this.duration_=t.duration!==void 0?t.duration:250}handleDragEvent(t){if(!xs(t))return;const e=t.map,i=e.getView();if(i.getConstraints().rotation===Tr)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 xs(t)?(t.map.getView().endInteraction(this.duration_),!1):!0}handleDownEvent(t){return xs(t)&&Da(t)&&this.condition_(t)?(t.map.getView().beginInteraction(),this.lastAngle_=void 0,!0):!1}}class Ic extends zn{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 ji([s])}getGeometry(){return this.geometry_}}const He={BOXSTART:"boxstart",BOXDRAG:"boxdrag",BOXEND:"boxend",BOXCANCEL:"boxcancel"};class vi extends ce{constructor(t,e,i){super(t),this.coordinate=e,this.mapBrowserEvent=i}}class Tc extends on{constructor(t){super(),this.on,this.once,this.un,t=t??{},this.box_=new Ic(t.className||"ol-dragbox"),this.minArea_=t.minArea??64,t.onBoxEnd&&(this.onBoxEnd=t.onBoxEnd),this.startPixel_=null,this.condition_=t.condition??Da,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 vi(He.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 vi(e?He.BOXEND:He.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 vi(He.BOXSTART,t.coordinate,t)),!0):!1}onBoxEnd(t){}setActive(t){t||(this.box_.setMap(null),this.startPixel_&&(this.dispatchEvent(new vi(He.BOXCANCEL,this.startPixel_,null)),this.startPixel_=null)),super.setActive(t)}setMap(t){this.getMap()&&(this.box_.setMap(null),this.startPixel_&&(this.dispatchEvent(new vi(He.BOXCANCEL,this.startPixel_,null)),this.startPixel_=null)),super.setMap(t)}}class Sc extends Tc{constructor(t){t=t||{};const e=t.condition?t.condition:xc;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:Ei})}}const Me={LEFT:"ArrowLeft",UP:"ArrowUp",RIGHT:"ArrowRight",DOWN:"ArrowDown"};class vc extends rn{constructor(t){super(),t=t||{},this.defaultCondition_=function(e){return Pa(e)&&Oa(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==X.KEYDOWN){const i=t.originalEvent,s=i.key;if(this.condition_(t)&&(s==Me.DOWN||s==Me.LEFT||s==Me.RIGHT||s==Me.UP)){const o=t.map.getView(),a=o.getResolution()*this.pixelDelta_;let l=0,c=0;s==Me.DOWN?c=-a:s==Me.LEFT?l=-a:s==Me.RIGHT?l=a:c=a;const h=[l,c];lr(h,o.getRotation()),gc(o,h,this.duration_),i.preventDefault(),e=!0}}return!e}}class Lc extends rn{constructor(t){super(),t=t||{},this.condition_=t.condition?t.condition:function(e){return!Ec(e)&&Oa(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==X.KEYDOWN||t.type==X.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();Ar(a,o,void 0,this.duration_),i.preventDefault(),e=!0}}return!e}}const Ac=40,Mc=300;class bc extends rn{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:yc;this.condition_=t.onFocusOnly?$s(ba,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!==X.WHEEL)return!0;const i=t.map,s=t.originalEvent;s.preventDefault(),this.useAnchor_&&(this.lastAnchor_=t.pixel);let r=s.deltaY;switch(s.deltaMode){case WheelEvent.DOM_DELTA_LINE:r*=Ac;break;case WheelEvent.DOM_DELTA_PAGE:r*=Mc;break}if(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=-et(this.totalDelta_,-this.maxDelta_*this.deltaPerZoom_,this.maxDelta_*this.deltaPerZoom_)/this.deltaPerZoom_;(e.getConstrainResolution()||this.constrainResolution_)&&(i=i?i>0?1:-1:0),Ar(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 Dc extends on{constructor(t){t=t||{};const e=t;e.stopDown||(e.stopDown=Wn),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!==Tr&&(this.anchor_=o.getCoordinateFromPixelInternal(o.getEventPixel(Mr(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 Pc extends on{constructor(t){t=t||{};const e=t;e.stopDown||(e.stopDown=Wn),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(Mr(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 Oc(n){n=n||{};const t=new Ht,e=new fc(-.005,.05,100);return(n.altShiftDragRotate!==void 0?n.altShiftDragRotate:!0)&&t.push(new Rc),(n.doubleClickZoom!==void 0?n.doubleClickZoom:!0)&&t.push(new _c({delta:n.zoomDelta,duration:n.zoomDuration})),(n.dragPan!==void 0?n.dragPan:!0)&&t.push(new wc({onFocusOnly:n.onFocusOnly,kinetic:e})),(n.pinchRotate!==void 0?n.pinchRotate:!0)&&t.push(new Dc),(n.pinchZoom!==void 0?n.pinchZoom:!0)&&t.push(new Pc({duration:n.zoomDuration})),(n.keyboard!==void 0?n.keyboard:!0)&&(t.push(new vc),t.push(new Lc({delta:n.zoomDelta,duration:n.zoomDuration}))),(n.mouseWheelZoom!==void 0?n.mouseWheelZoom:!0)&&t.push(new bc({onFocusOnly:n.onFocusOnly,duration:n.zoomDuration})),(n.shiftDragZoom!==void 0?n.shiftDragZoom:!0)&&t.push(new Sc({duration:n.zoomDuration})),t}const $={OPACITY:"opacity",VISIBLE:"visible",EXTENT:"extent",Z_INDEX:"zIndex",MAX_RESOLUTION:"maxResolution",MIN_RESOLUTION:"minResolution",MAX_ZOOM:"maxZoom",MIN_ZOOM:"minZoom",SOURCE:"source",MAP:"map"};class Fa 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[$.OPACITY]=t.opacity!==void 0?t.opacity:1,q(typeof e[$.OPACITY]=="number","Layer opacity must be a number"),e[$.VISIBLE]=t.visible!==void 0?t.visible:!0,e[$.Z_INDEX]=t.zIndex,e[$.MAX_RESOLUTION]=t.maxResolution!==void 0?t.maxResolution:1/0,e[$.MIN_RESOLUTION]=t.minResolution!==void 0?t.minResolution:0,e[$.MIN_ZOOM]=t.minZoom!==void 0?t.minZoom:-1/0,e[$.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=et(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($.EXTENT)}getMaxResolution(){return this.get($.MAX_RESOLUTION)}getMinResolution(){return this.get($.MIN_RESOLUTION)}getMinZoom(){return this.get($.MIN_ZOOM)}getMaxZoom(){return this.get($.MAX_ZOOM)}getOpacity(){return this.get($.OPACITY)}getSourceState(){return U()}getVisible(){return this.get($.VISIBLE)}getZIndex(){return this.get($.Z_INDEX)}setBackground(t){this.background_=t,this.changed()}setExtent(t){this.set($.EXTENT,t)}setMaxResolution(t){this.set($.MAX_RESOLUTION,t)}setMinResolution(t){this.set($.MIN_RESOLUTION,t)}setMaxZoom(t){this.set($.MAX_ZOOM,t)}setMinZoom(t){this.set($.MIN_ZOOM,t)}setOpacity(t){q(typeof t=="number","Layer opacity must be a number"),this.set($.OPACITY,t)}setVisible(t){this.set($.VISIBLE,t)}setZIndex(t){this.set($.Z_INDEX,t)}disposeInternal(){this.state_&&(this.state_.layer=null,this.state_=null),super.disposeInternal()}}class Ee extends ce{constructor(t,e){super(t),this.layer=e}}const Cs={LAYERS:"layers"};class xi extends Fa{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 Ht(i.slice(),{unique:!0}):q(typeof i.getArray=="function","Expected `layers` to be an array or a `Collection`"):i=new Ht(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,Et.ADD,this.handleLayersAdd_,this),V(t,Et.REMOVE,this.handleLayersRemove_,this));for(const i in this.listenerKeys_)this.listenerKeys_[i].forEach(tt);en(this.listenerKeys_);const e=t.getArray();for(let i=0,s=e.length;i{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;if(e.layerStatesArray){if(s=e.layerStatesArray.find(o=>o.layer===this),!s)return!1}else s=this.getLayerState();const r=this.getExtent();return br(s,e.viewState)&&(!r||wt(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($.MAP,t)}getMapInternal(){return this.get($.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,X.CHANGE,t.render,t),this.changed())}handlePrecompose_(t){const e=t.frameState.layerStatesArray,i=this.getLayerState(!1);q(!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($.SOURCE,t)}getRenderer(){return this.renderer_||(this.renderer_=this.createRenderer()),this.renderer_}hasRenderer(){return!!this.renderer_}createRenderer(){return null}clearRenderer(){this.renderer_&&(this.renderer_.dispose(),delete this.renderer_)}disposeInternal(){this.clearRenderer(),this.setSource(null),super.disposeInternal()}}function br(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 ka(n,t,e=0,i=n.length-1,s=Fc){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));ka(n,t,f,g,s)}const r=n[t];let o=e,a=i;for(Li(n,e,t),s(n[i],r)>0&&Li(n,e,i);o0;)a--}s(n[e],r)===0?Li(n,e,a):(a++,Li(n,a,i)),a<=t&&(e=a+1),t<=a&&(i=a-1)}}function Li(n,t,e){const i=n[t];n[t]=n[e],n[e]=i}function Fc(n,t){return nt?1:0}let Na=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,qe(i,this.toBBox),qe(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,qe(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=Xc(l,c),u=ws(l)+ws(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():qe(t[e],this.toBBox)}};function kc(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 To(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;ka(n,o,t,e,s),r.push(t,o,o,e)}}const Dr=[NaN,NaN,NaN,0];let Is;function Wc(){return Is||(Is=ot(1,1,void 0,{willReadFrequently:!0,desynchronized:!0})),Is}const Yc=/^rgba?\(\s*(\d+%?)\s+(\d+%?)\s+(\d+%?)(?:\s*\/\s*(\d+%|\d*\.\d+|[01]))?\s*\)$/i,Kc=/^rgba?\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)(?:\s*,\s*(\d+%|\d*\.\d+|[01]))?\s*\)$/i,Bc=/^rgba?\(\s*(\d+%)\s*,\s*(\d+%)\s*,\s*(\d+%)(?:\s*,\s*(\d+%|\d*\.\d+|[01]))?\s*\)$/i,Zc=/^#([\da-f]{3,4}|[\da-f]{6}|[\da-f]{8})$/i;function Cn(n,t){return n.endsWith("%")?Number(n.substring(0,n.length-1))/t:Number(n)}function Xi(n){throw new Error('failed to parse "'+n+'" as color')}function Ga(n){if(n.toLowerCase().startsWith("rgb")){const r=n.match(Kc)||n.match(Yc)||n.match(Bc);if(r){const o=r[4],a=100/255;return[et(Cn(r[1],a)+.5|0,0,255),et(Cn(r[2],a)+.5|0,0,255),et(Cn(r[3],a)+.5|0,0,255),o!==void 0?et(Cn(o,100),0,1):1]}Xi(n)}if(n.startsWith("#")){if(Zc.test(n)){const r=n.substring(1),o=r.length<=4?1:2,a=[0,0,0,255];for(let l=0,c=r.length;l.0031308?Math.pow(n,1/2.4)*269.025-14.025:n*3294.6}function vs(n){return n>.2068965?Math.pow(n,3):(n-4/29)*(108/841)}function Ls(n){return n>10.314724?Math.pow((n+14.025)/269.025,2.4):n/3294.6}function As(n){return n>.0088564?Math.pow(n,1/3):n/(108/841)+4/29}function So(n){const t=Ls(n[0]),e=Ls(n[1]),i=Ls(n[2]),s=As(t*.222488403+e*.716873169+i*.06060791),r=500*(As(t*.452247074+e*.399439023+i*.148375274)-s),o=200*(s-As(t*.016863605+e*.117638439+i*.865350722)),a=Math.atan2(o,r)*(180/Math.PI);return[116*s-16,Math.sqrt(r*r+o*o),a<0?a+360:a,n[3]]}function Hc(n){const t=(n[0]+16)/116,e=n[1],i=n[2]*Math.PI/180,s=vs(t),r=vs(t+e/500*Math.cos(i)),o=vs(t-e/200*Math.sin(i)),a=Ss(r*3.021973625-s*1.617392459-o*.404875592),l=Ss(r*-.943766287+s*1.916279586+o*.027607165),c=Ss(r*.069407491-s*.22898585+o*1.159737864);return[et(a+.5|0,0,255),et(l+.5|0,0,255),et(c+.5|0,0,255),n[3]]}function Pr(n){if(n==="none")return Dr;if(Ai.hasOwnProperty(n))return Ai[n];if(Ts>=Vc){let e=0;for(const i in Ai)(e++&3)===0&&(delete Ai[i],--Ts)}const t=Ga(n);t.length!==4&&Xi(n);for(const e of t)isNaN(e)&&Xi(n);return Ai[n]=t,++Ts,t}function _i(n){return Array.isArray(n)?n:Pr(n)}function Or(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+")"}function vo(n){return n[0]>0&&n[1]>0}function qc(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 It(n,t){return Array.isArray(n)?n:(t===void 0?t=[n,n]:(t[0]=n,t[1]=n),t)}let Ke=0;const pt=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"},tu={[w.Get]:N(z(1,1/0),Lo),[w.Var]:N(z(1,1),eu),[w.Has]:N(z(1,1/0),Lo),[w.Id]:N(iu,$e),[w.Concat]:N(z(2,1/0),H(xt)),[w.GeometryType]:N(nu,$e),[w.LineMetric]:N($e),[w.Resolution]:N(Ms,$e),[w.Zoom]:N(Ms,$e),[w.Time]:N(Ms,$e),[w.Any]:N(z(2,1/0),H(pt)),[w.All]:N(z(2,1/0),H(pt)),[w.Not]:N(z(1,1),H(pt)),[w.Equal]:N(z(2,2),H(wn)),[w.NotEqual]:N(z(2,2),H(wn)),[w.GreaterThan]:N(z(2,2),H(Z)),[w.GreaterThanOrEqualTo]:N(z(2,2),H(Z)),[w.LessThan]:N(z(2,2),H(Z)),[w.LessThanOrEqualTo]:N(z(2,2),H(Z)),[w.Multiply]:N(z(2,1/0),Ao),[w.Coalesce]:N(z(2,1/0),Ao),[w.Divide]:N(z(2,2),H(Z)),[w.Add]:N(z(2,1/0),H(Z)),[w.Subtract]:N(z(2,2),H(Z)),[w.Clamp]:N(z(3,3),H(Z)),[w.Mod]:N(z(2,2),H(Z)),[w.Pow]:N(z(2,2),H(Z)),[w.Abs]:N(z(1,1),H(Z)),[w.Floor]:N(z(1,1),H(Z)),[w.Ceil]:N(z(1,1),H(Z)),[w.Round]:N(z(1,1),H(Z)),[w.Sin]:N(z(1,1),H(Z)),[w.Cos]:N(z(1,1),H(Z)),[w.Atan]:N(z(1,2),H(Z)),[w.Sqrt]:N(z(1,1),H(Z)),[w.Match]:N(z(4,1/0),Mo,ru),[w.Between]:N(z(3,3),H(Z)),[w.Interpolate]:N(z(6,1/0),Mo,ou),[w.Case]:N(z(3,1/0),su,au),[w.In]:N(z(2,2),lu),[w.Number]:N(z(1,1/0),H(wn)),[w.String]:N(z(1,1/0),H(wn)),[w.Array]:N(z(1,1/0),H(Z)),[w.Color]:N(z(1,4),H(Z)),[w.Band]:N(z(1,3),H(Z)),[w.Palette]:N(z(2,2),hu),[w.ToString]:N(z(1,1),H(pt|Z|xt|Wt))};function Lo(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 Ao(n,t,e){const i=n.length-1,s=new Array(i);for(let r=0;ri.featureId;case w.GeometryType:return i=>i.geometryType;case w.Concat:{const i=n.args.map(s=>Kt(s));return s=>"".concat(...i.map(r=>r(s).toString()))}case w.Resolution:return i=>i.resolution;case w.Any:case w.All:case w.Between:case w.In:case w.Not:return gu(n);case w.Equal:case w.NotEqual:case w.LessThan:case w.LessThanOrEqualTo:case w.GreaterThan:case w.GreaterThanOrEqualTo:return fu(n);case w.Multiply:case w.Divide:case w.Add:case w.Subtract:case w.Clamp:case w.Mod:case w.Pow:case w.Abs:case w.Floor:case w.Ceil:case w.Round:case w.Sin:case w.Cos:case w.Atan:case w.Sqrt:return _u(n);case w.Case:return mu(n);case w.Match:return pu(n);case w.Interpolate:return yu(n);case w.ToString:return Eu(n);default:throw new Error(`Unsupported operator ${e}`)}}function uu(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 w.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 w.NotEqual:return r=>i(r)!==s(r);case w.LessThan:return r=>i(r)i(r)<=s(r);case w.GreaterThan:return r=>i(r)>s(r);case w.GreaterThanOrEqualTo:return r=>i(r)>=s(r);default:throw new Error(`Unsupported comparison operator ${e}`)}}function gu(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 w.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 _u(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 w.Add:return r=>{let o=0;for(let a=0;as[0](r)-s[1](r);case w.Clamp:return r=>{const o=s[0](r),a=s[1](r);if(ol?l:o};case w.Mod:return r=>s[0](r)%s[1](r);case w.Pow:return r=>Math.pow(s[0](r),s[1](r));case w.Abs:return r=>Math.abs(s[0](r));case w.Floor:return r=>Math.floor(s[0](r));case w.Ceil:return r=>Math.ceil(s[0](r));case w.Round:return r=>Math.round(s[0](r));case w.Sin:return r=>Math.sin(s[0](r));case w.Cos:return r=>Math.cos(s[0](r));case w.Atan:return i===2?r=>Math.atan2(s[0](r),s[1](r)):r=>Math.atan(s[0](r));case w.Sqrt:return r=>Math.sqrt(s[0](r));default:throw new Error(`Unsupported numeric operator ${e}`)}}function mu(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?xu(r,o,a,l,h,u):Gi(r,o,a,l,h,u);a=h,l=u}return l}}function Eu(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===Wt?Or(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 xu(n,t,e,i,s,r){if(s-e===0)return i;const a=So(i),l=So(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 Hc(h)}const W={IDLE:0,LOADING:1,LOADED:2,ERROR:3};function Cu(n,t,e){const i=n;let s=!0,r=!1,o=!1;const a=[Tn(i,X.LOAD,function(){o=!0,r||t()})];return i.src&&sa?(r=!0,i.decode().then(function(){s&&t()}).catch(function(l){s&&(o?t():e())})):a.push(Tn(i,X.ERROR,e)),function(){s=!1,a.forEach(tt)}}function wu(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 Ru(n,t){return t&&(n.src=t),n.src&&sa?new Promise((e,i)=>n.decode().then(()=>e(n)).catch(s=>n.complete&&n.width?e(n):i(s))):wu(n)}class Iu{constructor(){this.cache_={},this.patternCache_={},this.cacheSize_=0,this.maxCacheSize_=1024}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)===0&&!i.hasListener()&&(delete this.cache_[e],delete this.patternCache_[e],--this.cacheSize_)}}}get(t,e,i){const s=bs(t,e,i);return s in this.cache_?this.cache_[s]:null}getPattern(t,e,i){const s=bs(t,e,i);return s in this.patternCache_?this.patternCache_[s]:null}set(t,e,i,s,r){const o=bs(t,e,i),a=o in this.cache_;this.cache_[o]=s,r&&(s.getImageState()===W.IDLE&&s.load(),s.getImageState()===W.LOADING?s.ready().then(()=>{this.patternCache_[o]=Dn().createPattern(s.getImage(1),"repeat")}):this.patternCache_[o]=Dn().createPattern(s.getImage(1),"repeat")),a||++this.cacheSize_}setSize(t){this.maxCacheSize_=t,this.expire()}}function bs(n,t,e){const i=e?_i(e):"null";return t+":"+n+":"+i}const Ft=new Iu;let Mi=null;class Ya extends Yn{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?W.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_===W.LOADED){Mi||(Mi=ot(1,1,void 0,{willReadFrequently:!0})),Mi.drawImage(this.image_,0,0);try{Mi.getImageData(0,0,1,1),this.tainted_=!1}catch{Mi=null,this.tainted_=!0}}return this.tainted_===!0}dispatchChangeEvent_(){this.dispatchEvent(X.CHANGE)}handleImageError_(){this.imageState_=W.ERROR,this.dispatchChangeEvent_()}handleImageLoad_(){this.imageState_=W.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=ot(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_===W.IDLE){this.image_||this.initializeImage_(),this.imageState_=W.LOADING;try{this.src_!==void 0&&(this.image_.src=this.src_)}catch{this.handleImageError_()}this.image_ instanceof HTMLImageElement&&Ru(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_!==W.LOADED)return;const e=this.image_,i=ot(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=Uc(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_===W.LOADED||this.imageState_===W.ERROR)t();else{const e=()=>{(this.imageState_===W.LOADED||this.imageState_===W.ERROR)&&(this.removeEventListener(X.CHANGE,e),t())};this.addEventListener(X.CHANGE,e)}})),this.ready_}}function kr(n,t,e,i,s,r){let o=t===void 0?void 0:Ft.get(t,e,s);return o||(o=new Ya(n,n&&"src"in n?n.src||void 0:t,e,i,s),Ft.set(t,e,s,o,r)),r&&o&&!Ft.getPattern(t,e,s)&&Ft.set(t,e,s,o,r),o}function qt(n){return n?Array.isArray(n)?Or(n):typeof n=="object"&&"src"in n?Tu(n):n:null}function Tu(n){if(!n.offset||!n.size)return Ft.getPattern(n.src,"anonymous",n.color);const t=n.src+":"+n.offset,e=Ft.getPattern(t,void 0,n.color);if(e)return e;const i=Ft.get(n.src,"anonymous",null);if(i.getImageState()!==W.LOADED)return null;const s=ot(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]),kr(s.canvas,t,void 0,W.LOADED,n.color,!0),Ft.getPattern(t,void 0,n.color)}const Ka="10px sans-serif",Ct="#000",mi="round",oe=[],ae=0,pi="round",Hi=10,qi="#000",$i="center",Pn="middle",ke=[0,0,0,0],Ji=1,ni=new $t;let bi=null,bo;const Js={},Su=new Set(["serif","sans-serif","monospace","cursive","fantasy","system-ui","ui-serif","ui-sans-serif","ui-monospace","ui-rounded","emoji","math","fangsong"]);function vu(n,t,e){return`${n} ${t} 16px "${e}"`}const Lu=function(){let t,e;async function i(r){await e.ready;const o=await e.load(r);if(o.length===0)return!1;const a=qs(r),l=a.families[0].toLowerCase(),c=a.weight;return o.some(h=>{const u=h.family.replace(/^['"]|['"]$/g,"").toLowerCase(),d=Hs[h.weight]||h.weight;return u===l&&h.style===a.style&&d==c})}async function s(){await e.ready;let r=!0;const o=ni.getProperties(),a=Object.keys(o).filter(l=>o[l]<100);for(let l=a.length-1;l>=0;--l){const c=a[l];let h=o[c];h<100&&(await i(c)?(en(Js),ni.set(c,100)):(h+=10,ni.set(c,h,!0),h<100&&(r=!1)))}t=void 0,r||(t=setTimeout(s,100))}return async function(r){e||(e=sr?self.fonts:document.fonts);const o=qs(r);if(!o)return;const a=o.families;let l=!1;for(const c of a){if(Su.has(c))continue;const h=vu(o.style,o.weight,c);ni.get(h)===void 0&&(ni.set(h,0,!0),l=!0)}l&&(clearTimeout(t),t=setTimeout(s,100))}}(),Au=function(){let n;return function(t){let e=Js[t];if(e==null){if(sr){const i=qs(t),s=Ba(t,"Žg");e=(isNaN(Number(i.lineHeight))?1.2:Number(i.lineHeight))*(s.actualBoundingBoxAscent+s.actualBoundingBoxDescent)}else n||(n=document.createElement("div"),n.innerHTML="M",n.style.minHeight="0",n.style.maxHeight="none",n.style.height="auto",n.style.padding="0",n.style.border="none",n.style.position="absolute",n.style.display="block",n.style.left="-99999px"),n.style.font=t,document.body.appendChild(n),e=n.offsetHeight,document.body.removeChild(n);Js[t]=e}return e}}();function Ba(n,t){return bi||(bi=ot(1,1)),n!=bo&&(bi.font=n,bo=bi.font),bi.measureText(t)}function Za(n,t){return Ba(n,t).width}function Do(n,t,e){if(t in e)return e[t];const i=t.split(` +import{_ as xl,D as Cl,c as wl,d as Rl,f as Il}from"./index-Upsq31TS.js";const Et={ADD:"add",REMOVE:"remove"},ui={PROPERTYCHANGE:"propertychange"},X={CHANGE:"change",ERROR:"error",CONTEXTMENU:"contextmenu",CLICK:"click",DBLCLICK:"dblclick",KEYDOWN:"keydown",KEYPRESS:"keypress",LOAD:"load",TOUCHMOVE:"touchmove",WHEEL:"wheel"};class zn{constructor(){this.disposed=!1}dispose(){this.disposed||(this.disposed=!0,this.disposeInternal())}disposeInternal(){}}function Tl(n,t,e){let i,s;e=e||re;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 re(n,t){return n>t?1:nt?-1:0}function nr(n,t,e){if(n[0]<=t)return 0;const i=n.length;if(t<=n[i-1])return i-1;if(typeof e=="function"){for(let s=1;s0?s-1:s}return i-1}if(e>0){for(let s=1;s0||o===0)})}function Yi(){return!0}function Wn(){return!1}function Ki(){}function ia(n){let t,e,i;return function(){const s=Array.prototype.slice.call(arguments);return(!e||this!==i||!Te(s,e))&&(i=this,e=s,t=n.apply(this,arguments)),t}}function Al(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 en(n){for(const t in n)delete n[t]}function di(n){let t;for(t in n)return!1;return!t}class ce{constructor(t){this.propagationStopped,this.defaultPrevented,this.type=t,this.target=null}preventDefault(){this.defaultPrevented=!0}stopPropagation(){this.propagationStopped=!0}}class Yn extends zn{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 ce(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]=Ki,++this.pendingRemovals_[t]):(i.splice(s,1),i.length===0&&delete this.listeners_[t]))}}function V(n,t,e,i,s){if(s){const o=e;e=function(a){return n.removeEventListener(t,e),o.call(i??this,a)}}else i&&i!==n&&(e=e.bind(i));const r={target:n,type:t,listener:e};return n.addEventListener(t,e),r}function Tn(n,t,e,i){return V(n,t,e,i,!0)}function tt(n){n&&n.target&&(n.target.removeEventListener(n.type,n.listener),en(n))}class nn extends Yn{constructor(){super(),this.on=this.onInternal,this.once=this.onceInternal,this.un=this.unInternal,this.revision_=0}changed(){++this.revision_,this.dispatchEvent(X.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 fn(Et.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 fn(Et.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 fn(Et.REMOVE,s,t)),this.dispatchEvent(new fn(Et.ADD,e,t))}updateLength_(){this.set($r.LENGTH,this.array_.length)}assertUnique_(t,e){for(let i=0,s=this.array_.length;i{this.clickTimeoutId_=void 0;const i=new pe(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 pe(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 pe(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 pe(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 pe(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(X.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 ye={POSTRENDER:"postrender",MOVESTART:"movestart",MOVEEND:"moveend",LOADSTART:"loadstart",LOADEND:"loadend"},ft={LAYERGROUP:"layergroup",SIZE:"size",TARGET:"target",VIEW:"view"},P={IDLE:0,LOADING:1,LOADED:2,ERROR:3,EMPTY:4};function q(n,t){if(!n)throw new Error(t)}const Sn=1/0;class kl{constructor(t,e){this.priorityFunction_=t,this.keyFunction_=e,this.elements_=[],this.priorities_=[],this.queuedElements_={}}clear(){this.elements_.length=0,this.priorities_.length=0,en(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){q(!(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!=Sn?(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;at.apply(null,i),i=>i[0].getKey()),this.boundHandleTileChange_=this.handleTileChange.bind(this),this.tileChangeCallback_=e,this.tilesLoading_=0,this.tilesLoadingKeys_={}}enqueue(t){const e=super.enqueue(t);return e&&t[0].addEventListener(X.CHANGE,this.boundHandleTileChange_),e}getTilesLoading(){return this.tilesLoading_}handleTileChange(t){const e=t.target,i=e.getState();if(i===P.LOADED||i===P.ERROR||i===P.EMPTY){i!==P.ERROR&&e.removeEventListener(X.CHANGE,this.boundHandleTileChange_);const s=e.getKey();s in this.tilesLoadingKeys_&&(delete this.tilesLoadingKeys_[s],--this.tilesLoading_),this.tileChangeCallback_()}}loadMoreTiles(t,e){let i=0;for(;this.tilesLoading_0;){const s=this.dequeue()[0],r=s.getKey();s.getState()===P.IDLE&&!(r in this.tilesLoadingKeys_)&&(this.tilesLoadingKeys_[r]=!0,++this.tilesLoading_,++i,s.load())}}}function Gl(n,t,e,i,s){if(!n||!(e in n.wantedTiles)||!n.wantedTiles[e][t.getKey()])return Sn;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}const gt={ANIMATING:0,INTERACTING:1},zt={CENTER:"center",RESOLUTION:"resolution",ROTATION:"rotation"};function et(n,t,e){return Math.min(Math.max(n,t),e)}function zl(n,t,e,i,s,r){const o=s-e,a=r-i;if(o!==0||a!==0){const l=((n-e)*o+(t-i)*a)/(o*o+a*a);l>1?(e=s,i=r):l>0&&(e+=o*l,i+=a*l)}return oi(n,t,e,i)}function oi(n,t,e,i){const s=e-n,r=i-t;return s*s+r*r}function Xl(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 Jr(n){return n*180/Math.PI}function we(n){return n*Math.PI/180}function ai(n,t){const e=n%t;return e*t<0?e+t:e}function Lt(n,t,e){return n+e*(t-n)}function Kn(n,t){const e=Math.pow(10,t);return Math.round(n*e)/e}function gn(n,t){return Math.floor(Kn(n,t))}function _n(n,t){return Math.ceil(Kn(n,t))}function Ws(n,t,e){if(n>=t&&nf&&(d=(f+d)/2,f=d),g>m&&(g=(m+g)/2,m=g);let _=et(i[0],d,f),p=et(i[1],g,m);if(o&&e&&s){const E=30*s;_+=-E*Math.log(1+Math.max(0,d-i[0])/E)+E*Math.log(1+Math.max(0,i[0]-f)/E),p+=-E*Math.log(1+Math.max(0,g-i[1])/E)+E*Math.log(1+Math.max(0,i[1]-m)/E)}return[_,p]}}function Wl(n){return n}const lt={UNKNOWN:0,INTERSECTING:1,ABOVE:2,RIGHT:4,BELOW:8,LEFT:16};function to(n){const t=Nt();for(let e=0,i=n.length;es&&(l=l|lt.RIGHT),ar&&(l=l|lt.ABOVE),l===lt.UNKNOWN&&(l=lt.INTERSECTING),l}function Nt(){return[1/0,1/0,-1/0,-1/0]}function Ie(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 Ie(1/0,1/0,-1/0,-1/0,n)}function la(n,t){const e=n[0],i=n[1];return Ie(e,i,e,i,t)}function ar(n,t,e,i,s){const r=Bn(s);return ha(r,n,t,e,i)}function Bi(n,t){return n[0]==t[0]&&n[2]==t[2]&&n[1]==t[1]&&n[3]==t[3]}function Yl(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 ha(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 jn(n){return n[2]=o&&m<=l),!i&&r<.RIGHT&&!(s<.RIGHT)&&(_=f-(d-l)*g,i=_>=a&&_<=c),!i&&r<.BELOW&&!(s<.BELOW)&&(m=d-(f-a)/g,i=m>=o&&m<=l),!i&&r<.LEFT&&!(s<.LEFT)&&(_=f-(d-o)*g,i=_>=a&&_<=c)}return i}function da(n,t){const e=t.getExtent(),i=Xe(n);if(t.canWrapX()&&(i[0]=e[2])){const s=J(e),o=Math.floor((i[0]-e[0])/s)*s;n[0]-=o,n[2]-=o}return n}function fa(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]]];da(n,t);const s=J(i);if(J(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 Vl(n,t){return n[0]+=+t[0],n[1]+=+t[1],n}function vn(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 lr(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 jl(n,t){return n[0]*=t,n[1]*=t,n}function ga(n,t){if(t.canWrapX()){const e=J(t.getExtent()),i=Hl(n,t,e);i&&(n[0]-=i*e)}return n}function Hl(n,t,e){const i=t.getExtent();let s=0;return t.canWrapX()&&(n[0]i[2])&&(e=e||J(i),s=Math.floor((n[0]-i[0])/e)),s}function _a(n){return Math.pow(n,3)}function Ei(n){return 1-_a(1-n)}function ql(n){return 3*n*n-2*n*n*n}function $l(n){return n}const Jl=63710088e-1;function eo(n,t,e){e=e||Jl;const i=we(n[1]),s=we(t[1]),r=(s-i)/2,o=we(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 ma(...n){console.warn(...n)}const hr={radians:6370997/(2*Math.PI),degrees:2*Math.PI*6370997/360,ft:.3048,m:1,"us-ft":1200/3937};class cr{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_||hr[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 sn=6378137,ri=Math.PI*sn,Ql=[-ri,-ri,ri,ri],th=[-180,-85,180,85],mn=sn*Math.log(Math.tan(Math.PI/2));class je extends cr{constructor(t){super({code:t,units:"m",extent:Ql,global:!0,worldExtent:th,getPointResolution:function(e,i){return e/Math.cosh(i[1]/sn)}})}}const io=[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 eh(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;rmn?o=mn:o<-mn&&(o=-mn),t[r+1]=o}return t}function ih(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;rao&&(t=ao);const i=we(t),s=Math.sin(i),r=Math.cos(i),o=s/r,a=o*o,l=a*a,c=we(n),h=xa(e.number),u=we(h),d=An/Math.sqrt(1-kt*s**2),f=Pe*r**2,g=r*Ws(c-u,-Math.PI,Math.PI),m=g*g,_=m*g,p=_*g,E=p*g,C=E*g,y=An*(Ea*i-ah*Math.sin(2*i)+lh*Math.sin(4*i)-hh*Math.sin(6*i)),x=Ln*d*(g+_/6*(1-a+f)+E/120*(5-18*a+l+72*f-58*Pe))+5e5;let R=Ln*(y+d*o*(m/2+p/24*(5-a+9*f+4*f**2)+C/720*(61-58*a+l+600*f-330*Pe)));return e.north||(R+=1e7),[x,R]}function xa(n){return(n-1)*6-180+3}const yh=[/^EPSG:(\d+)$/,/^urn:ogc:def:crs:EPSG::(\d+)$/,/^http:\/\/www\.opengis\.net\/def\/crs\/EPSG\/0\/(\d+)$/];function Ca(n){let t=0;for(const s of yh){const r=n.match(s);if(r){t=parseInt(r[1]);break}}if(!t)return null;let e=0,i=!1;return t>32700&&t<32761?e=t-32700:t>32600&&t<32661&&(i=!0,e=t-32600),e?{number:e,north:i}:null}function lo(n,t){return function(e,i,s,r){const o=e.length;s=s>1?s:2,r=r??s,i||(s>2?i=e.slice():i=new Array(o));for(let a=0;a=l?t[o+c]:a[c]}return e}}function gs(n,t){return wa(),mr(n,"EPSG:4326","EPSG:3857")}function _s(n,t){if(n===t)return!0;const e=n.getUnits()===t.getUnits();return(n.getCode()===t.getCode()||_r(n,t)===fr)&&e}function _r(n,t){const e=n.getCode(),i=t.getCode();let s=fs(e,i);if(s)return s;let r=null,o=null;for(const l of Ch)r||(r=l(n)),o||(o=l(t));if(!r&&!o)return null;const a="EPSG:4326";if(o)if(r)s=ms(r.inverse,o.forward);else{const l=fs(e,a);l&&(s=ms(l,o.forward))}else{const l=fs(a,i);l&&(s=ms(r.inverse,l))}return s&&(Vs(n),Vs(t),Zi(n,t,s)),s}function ms(n,t){return function(e,i,s,r){return i=n(e,i,s,r),t(i,i,s,r)}}function Mn(n,t){const e=Tt(n),i=Tt(t);return _r(e,i)}function mr(n,t,e){const i=Mn(t,e);if(!i){const s=Tt(t).getCode(),r=Tt(e).getCode();throw new Error(`No transform available between ${s} and ${r}`)}return i(n,void 0,n.length)}function js(n,t){return n}function ne(n,t){return Us&&!vn(n,[0,0])&&n[0]>=-180&&n[0]<=180&&n[1]>=-90&&n[1]<=90&&(Us=!1,ma("Call useGeographic() from ol/proj once to work with [longitude, latitude] coordinates.")),n}function Ra(n,t){return n}function xe(n,t){return n}function Sh(){co(io),co(so),Ih(so,io,eh,ih)}Sh();new Array(6);function Yt(){return[1,0,0,1,0,0]}function vh(n,t){return n[0]=t[0],n[1]=t[1],n[2]=t[2],n[3]=t[3],n[4]=t[4],n[5]=t[5],n}function ht(n,t){const e=t[0],i=t[1];return t[0]=n[0]*e+n[2]*i+n[4],t[1]=n[1]*e+n[3]*i+n[5],t}function he(n,t,e,i,s,r,o,a){const l=Math.sin(r),c=Math.cos(r);return n[0]=i*c,n[1]=s*l,n[2]=-i*l,n[3]=s*c,n[4]=o*i*c-a*i*l+t,n[5]=o*s*l+a*s*c+e,n}function Ia(n,t){const e=Lh(t);q(e!==0,"Transformation matrix cannot be inverted");const i=t[0],s=t[1],r=t[2],o=t[3],a=t[4],l=t[5];return n[0]=o/e,n[1]=-s/e,n[2]=-r/e,n[3]=i/e,n[4]=(r*l-o*a)/e,n[5]=-(i*l-s*a)/e,n}function Lh(n){return n[0]*n[3]-n[1]*n[2]}const Ah=[1e5,1e5,1e5,1e5,2,2];function Mh(n){return"matrix("+n.join(", ")+")"}function uo(n){return n.substring(7,n.length-1).split(",").map(parseFloat)}function bh(n,t){const e=uo(n),i=uo(t);for(let s=0;s<6;++s)if(Math.round((e[s]-i[s])*Ah[s])!==0)return!1;return!0}function Re(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){return this.closestPointXY(t,e,Oh,Number.MIN_VALUE)===0}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 Zl(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=Tt(t),s=i.getUnits()=="tile-pixels"?function(r,o,a){const l=i.getExtent(),c=i.getWorldExtent(),h=yt(c)/yt(l);he(fo,c[0],c[3],h,-h,0,0,0);const u=Re(r,0,r.length,a,fo,o),d=Mn(i,e);return d?d(u,u,a):u}:Mn(i,e);return this.applyTransform(s),this}}class $n extends Fh{constructor(){super(),this.layout="XY",this.stride=2,this.flatCoordinates}computeExtent(t){return ar(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 zh(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],m=n[d+1],_=n[u],p=n[u+1];for(let E=d+i;Ef&&(h=E,f=x)}f>s&&(l[(h-t)/i]=1,d+i0&&m>f)&&(g<0&&_0&&_>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 va(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 La(n,t,e,i,s,r){if(e.length===0||!Fe(n,t,e[0],i,s,r))return!1;for(let o=1,a=e.length;op&&(c=(h+u)/2,La(n,t,e,i,c,g)&&(_=c,p=E)),h=u}return isNaN(_)&&(_=s[r]),o?(o.push(_,g,p),o):[_,g,p]}function Uh(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:Aa(n,t,e,i,function(o,a){return Ul(s,o,a)}):!1}function Ma(n,t,e,i,s){return!!(Cr(n,t,e,i,s)||Fe(n,t,e,i,s[0],s[1])||Fe(n,t,e,i,s[0],s[3])||Fe(n,t,e,i,s[2],s[1])||Fe(n,t,e,i,s[2],s[3]))}function Vh(n,t,e,i,s){if(!Ma(n,t,e[0],i,s))return!1;if(e.length===1)return!0;for(let r=1,o=e.length;r0}function Hh(n,t,e,i,s){s=s!==void 0?s:!1;for(let r=0,o=e.length;rh&&d1&&typeof arguments[e-1]=="function"&&(i=arguments[e-1],--e);let s=0;for(;s0}getInteracting(){return this.hints_[gt.INTERACTING]>0}cancelAnimations(){this.setHint(gt.ANIMATING,-this.hints_[gt.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],m=l.targetCenter[1];this.nextCenter_=l.targetCenter;const _=d+u*(g-d),p=f+u*(m-f);this.targetCenter_=[_,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?ai(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(gt.ANIMATING,-1),this.nextCenter_=null,this.nextResolution_=NaN,this.nextRotation_=NaN;const o=s[0].callback;o&&pn(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]],lr(i,t-this.getRotation()),Vl(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&&js(t,this.getProjection())}getCenterInternal(){return this.get(zt.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 Ra(e,this.getProjection())}calculateExtentInternal(t){t=t||this.getViewportSizeMinusPadding_();const e=this.getCenterInternal();q(e,"The view center is not defined");const i=this.getResolution();q(i!==void 0,"The view resolution is not defined");const s=this.getRotation();return q(s!==void 0,"The view rotation is not defined"),Bs(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(zt.RESOLUTION)}getResolutions(){return this.resolutions_}getResolutionForExtent(t,e){return this.getResolutionForExtentInternal(xe(t,this.getProjection()),e)}getResolutionForExtentInternal(t,e){e=e||this.getViewportSizeMinusPadding_();const i=J(t)/e[0],s=yt(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(zt.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=ys(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=nr(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=et(Math.floor(t),0,this.resolutions_.length-2),i=this.resolutions_[e]/this.resolutions_[e+1];return this.resolutions_[e]/Math.pow(i,et(t-e,0,1))}return this.maxResolution_/Math.pow(this.zoomFactor_,t-this.minZoom_)}fit(t,e){let i;if(q(Array.isArray(t)||typeof t.getSimplifiedGeometry=="function","Invalid extent or geometry provided as `geometry`"),Array.isArray(t)){q(!jn(t),"Cannot fit empty extent provided as `geometry`");const s=xe(t,this.getProjection());i=yo(s)}else if(t.getType()==="Circle"){const s=xe(t.getExtent(),this.getProjection());i=yo(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;ui.trim().replace(/^['"]|['"]$/g,"")),e};function ot(n,t,e,i){let s;return e&&e.length?s=e.shift():sr?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 Dn(){return Es||(Es=ot(1,1)),Es}function ts(n){const t=n.canvas;t.width=1,t.height=1,n.clearRect(0,0,1,1)}function Ro(n,t){const e=t.parentNode;e&&e.replaceChild(n,t)}function ac(n){for(;n.lastChild;)n.lastChild.remove()}function lc(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)}}}class Lr 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=>Al(()=>s))),i=e.length>0;if(this.renderedVisible_!=i&&(this.element.style.display=i?"":"none",this.renderedVisible_=i),!Te(e,this.renderedAttributions_)){ac(this.ulElement_);for(let s=0,r=e.length;s0&&i%(2*Math.PI)!==0?e.animate({rotation:0,duration:this.duration_,easing:Ei}):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(yn);!r&&i===0?this.element.classList.add(yn):r&&i!==0&&this.element.classList.remove(yn)}this.label_.style.transform=s}this.rotation_=i}}class uc extends Lr{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(X.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(X.CLICK,this.handleClick_.bind(this,-i),!1);const d=e+" "+Qn+" "+vr,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:Ei})):i.setZoom(r)}}}function dc(n){n=n||{};const t=new Ht;return(n.zoom!==void 0?n.zoom:!0)&&t.push(new uc(n.zoomOptions)),(n.rotate!==void 0?n.rotate:!0)&&t.push(new cc(n.rotateOptions)),(n.attribution!==void 0?n.attribution:!0)&&t.push(new hc(n.attributionOptions)),t}class fc{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_}}const Io={ACTIVE:"active"};class rn 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(Io.ACTIVE)}getMap(){return this.map_}handleEvent(t){return!0}setActive(t){this.set(Io.ACTIVE,t)}setMap(t){this.map_=t}}function gc(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:$l,center:n.getConstrainedCenter(s)})}}function Ar(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:Ei})}class _c extends rn{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();Ar(a,o,r,this.duration_),i.preventDefault(),e=!0}return!e}}function $s(n){const t=arguments;return function(e){let i=!0;for(let s=0,r=t.length;s0}}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 Mr(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 Rc extends on{constructor(t){t=t||{},super({stopDown:Wn}),this.condition_=t.condition?t.condition:mc,this.lastAngle_=void 0,this.duration_=t.duration!==void 0?t.duration:250}handleDragEvent(t){if(!xs(t))return;const e=t.map,i=e.getView();if(i.getConstraints().rotation===Tr)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 xs(t)?(t.map.getView().endInteraction(this.duration_),!1):!0}handleDownEvent(t){return xs(t)&&Da(t)&&this.condition_(t)?(t.map.getView().beginInteraction(),this.lastAngle_=void 0,!0):!1}}class Ic extends zn{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 ji([s])}getGeometry(){return this.geometry_}}const He={BOXSTART:"boxstart",BOXDRAG:"boxdrag",BOXEND:"boxend",BOXCANCEL:"boxcancel"};class vi extends ce{constructor(t,e,i){super(t),this.coordinate=e,this.mapBrowserEvent=i}}class Tc extends on{constructor(t){super(),this.on,this.once,this.un,t=t??{},this.box_=new Ic(t.className||"ol-dragbox"),this.minArea_=t.minArea??64,t.onBoxEnd&&(this.onBoxEnd=t.onBoxEnd),this.startPixel_=null,this.condition_=t.condition??Da,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 vi(He.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 vi(e?He.BOXEND:He.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 vi(He.BOXSTART,t.coordinate,t)),!0):!1}onBoxEnd(t){}setActive(t){t||(this.box_.setMap(null),this.startPixel_&&(this.dispatchEvent(new vi(He.BOXCANCEL,this.startPixel_,null)),this.startPixel_=null)),super.setActive(t)}setMap(t){this.getMap()&&(this.box_.setMap(null),this.startPixel_&&(this.dispatchEvent(new vi(He.BOXCANCEL,this.startPixel_,null)),this.startPixel_=null)),super.setMap(t)}}class Sc extends Tc{constructor(t){t=t||{};const e=t.condition?t.condition:xc;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:Ei})}}const Me={LEFT:"ArrowLeft",UP:"ArrowUp",RIGHT:"ArrowRight",DOWN:"ArrowDown"};class vc extends rn{constructor(t){super(),t=t||{},this.defaultCondition_=function(e){return Pa(e)&&Oa(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==X.KEYDOWN){const i=t.originalEvent,s=i.key;if(this.condition_(t)&&(s==Me.DOWN||s==Me.LEFT||s==Me.RIGHT||s==Me.UP)){const o=t.map.getView(),a=o.getResolution()*this.pixelDelta_;let l=0,c=0;s==Me.DOWN?c=-a:s==Me.LEFT?l=-a:s==Me.RIGHT?l=a:c=a;const h=[l,c];lr(h,o.getRotation()),gc(o,h,this.duration_),i.preventDefault(),e=!0}}return!e}}class Lc extends rn{constructor(t){super(),t=t||{},this.condition_=t.condition?t.condition:function(e){return!Ec(e)&&Oa(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==X.KEYDOWN||t.type==X.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();Ar(a,o,void 0,this.duration_),i.preventDefault(),e=!0}}return!e}}const Ac=40,Mc=300;class bc extends rn{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:yc;this.condition_=t.onFocusOnly?$s(ba,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!==X.WHEEL)return!0;const i=t.map,s=t.originalEvent;s.preventDefault(),this.useAnchor_&&(this.lastAnchor_=t.pixel);let r=s.deltaY;switch(s.deltaMode){case WheelEvent.DOM_DELTA_LINE:r*=Ac;break;case WheelEvent.DOM_DELTA_PAGE:r*=Mc;break}if(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=-et(this.totalDelta_,-this.maxDelta_*this.deltaPerZoom_,this.maxDelta_*this.deltaPerZoom_)/this.deltaPerZoom_;(e.getConstrainResolution()||this.constrainResolution_)&&(i=i?i>0?1:-1:0),Ar(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 Dc extends on{constructor(t){t=t||{};const e=t;e.stopDown||(e.stopDown=Wn),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!==Tr&&(this.anchor_=o.getCoordinateFromPixelInternal(o.getEventPixel(Mr(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 Pc extends on{constructor(t){t=t||{};const e=t;e.stopDown||(e.stopDown=Wn),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(Mr(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 Oc(n){n=n||{};const t=new Ht,e=new fc(-.005,.05,100);return(n.altShiftDragRotate!==void 0?n.altShiftDragRotate:!0)&&t.push(new Rc),(n.doubleClickZoom!==void 0?n.doubleClickZoom:!0)&&t.push(new _c({delta:n.zoomDelta,duration:n.zoomDuration})),(n.dragPan!==void 0?n.dragPan:!0)&&t.push(new wc({onFocusOnly:n.onFocusOnly,kinetic:e})),(n.pinchRotate!==void 0?n.pinchRotate:!0)&&t.push(new Dc),(n.pinchZoom!==void 0?n.pinchZoom:!0)&&t.push(new Pc({duration:n.zoomDuration})),(n.keyboard!==void 0?n.keyboard:!0)&&(t.push(new vc),t.push(new Lc({delta:n.zoomDelta,duration:n.zoomDuration}))),(n.mouseWheelZoom!==void 0?n.mouseWheelZoom:!0)&&t.push(new bc({onFocusOnly:n.onFocusOnly,duration:n.zoomDuration})),(n.shiftDragZoom!==void 0?n.shiftDragZoom:!0)&&t.push(new Sc({duration:n.zoomDuration})),t}const $={OPACITY:"opacity",VISIBLE:"visible",EXTENT:"extent",Z_INDEX:"zIndex",MAX_RESOLUTION:"maxResolution",MIN_RESOLUTION:"minResolution",MAX_ZOOM:"maxZoom",MIN_ZOOM:"minZoom",SOURCE:"source",MAP:"map"};class Fa 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[$.OPACITY]=t.opacity!==void 0?t.opacity:1,q(typeof e[$.OPACITY]=="number","Layer opacity must be a number"),e[$.VISIBLE]=t.visible!==void 0?t.visible:!0,e[$.Z_INDEX]=t.zIndex,e[$.MAX_RESOLUTION]=t.maxResolution!==void 0?t.maxResolution:1/0,e[$.MIN_RESOLUTION]=t.minResolution!==void 0?t.minResolution:0,e[$.MIN_ZOOM]=t.minZoom!==void 0?t.minZoom:-1/0,e[$.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=et(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($.EXTENT)}getMaxResolution(){return this.get($.MAX_RESOLUTION)}getMinResolution(){return this.get($.MIN_RESOLUTION)}getMinZoom(){return this.get($.MIN_ZOOM)}getMaxZoom(){return this.get($.MAX_ZOOM)}getOpacity(){return this.get($.OPACITY)}getSourceState(){return U()}getVisible(){return this.get($.VISIBLE)}getZIndex(){return this.get($.Z_INDEX)}setBackground(t){this.background_=t,this.changed()}setExtent(t){this.set($.EXTENT,t)}setMaxResolution(t){this.set($.MAX_RESOLUTION,t)}setMinResolution(t){this.set($.MIN_RESOLUTION,t)}setMaxZoom(t){this.set($.MAX_ZOOM,t)}setMinZoom(t){this.set($.MIN_ZOOM,t)}setOpacity(t){q(typeof t=="number","Layer opacity must be a number"),this.set($.OPACITY,t)}setVisible(t){this.set($.VISIBLE,t)}setZIndex(t){this.set($.Z_INDEX,t)}disposeInternal(){this.state_&&(this.state_.layer=null,this.state_=null),super.disposeInternal()}}class Ee extends ce{constructor(t,e){super(t),this.layer=e}}const Cs={LAYERS:"layers"};class xi extends Fa{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 Ht(i.slice(),{unique:!0}):q(typeof i.getArray=="function","Expected `layers` to be an array or a `Collection`"):i=new Ht(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,Et.ADD,this.handleLayersAdd_,this),V(t,Et.REMOVE,this.handleLayersRemove_,this));for(const i in this.listenerKeys_)this.listenerKeys_[i].forEach(tt);en(this.listenerKeys_);const e=t.getArray();for(let i=0,s=e.length;i{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;if(e.layerStatesArray){if(s=e.layerStatesArray.find(o=>o.layer===this),!s)return!1}else s=this.getLayerState();const r=this.getExtent();return br(s,e.viewState)&&(!r||wt(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($.MAP,t)}getMapInternal(){return this.get($.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,X.CHANGE,t.render,t),this.changed())}handlePrecompose_(t){const e=t.frameState.layerStatesArray,i=this.getLayerState(!1);q(!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($.SOURCE,t)}getRenderer(){return this.renderer_||(this.renderer_=this.createRenderer()),this.renderer_}hasRenderer(){return!!this.renderer_}createRenderer(){return null}clearRenderer(){this.renderer_&&(this.renderer_.dispose(),delete this.renderer_)}disposeInternal(){this.clearRenderer(),this.setSource(null),super.disposeInternal()}}function br(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 ka(n,t,e=0,i=n.length-1,s=Fc){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));ka(n,t,f,g,s)}const r=n[t];let o=e,a=i;for(Li(n,e,t),s(n[i],r)>0&&Li(n,e,i);o0;)a--}s(n[e],r)===0?Li(n,e,a):(a++,Li(n,a,i)),a<=t&&(e=a+1),t<=a&&(i=a-1)}}function Li(n,t,e){const i=n[t];n[t]=n[e],n[e]=i}function Fc(n,t){return nt?1:0}let Na=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,qe(i,this.toBBox),qe(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,qe(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=Xc(l,c),u=ws(l)+ws(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():qe(t[e],this.toBBox)}};function kc(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 To(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;ka(n,o,t,e,s),r.push(t,o,o,e)}}const Dr=[NaN,NaN,NaN,0];let Is;function Wc(){return Is||(Is=ot(1,1,void 0,{willReadFrequently:!0,desynchronized:!0})),Is}const Yc=/^rgba?\(\s*(\d+%?)\s+(\d+%?)\s+(\d+%?)(?:\s*\/\s*(\d+%|\d*\.\d+|[01]))?\s*\)$/i,Kc=/^rgba?\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)(?:\s*,\s*(\d+%|\d*\.\d+|[01]))?\s*\)$/i,Bc=/^rgba?\(\s*(\d+%)\s*,\s*(\d+%)\s*,\s*(\d+%)(?:\s*,\s*(\d+%|\d*\.\d+|[01]))?\s*\)$/i,Zc=/^#([\da-f]{3,4}|[\da-f]{6}|[\da-f]{8})$/i;function Cn(n,t){return n.endsWith("%")?Number(n.substring(0,n.length-1))/t:Number(n)}function Xi(n){throw new Error('failed to parse "'+n+'" as color')}function Ga(n){if(n.toLowerCase().startsWith("rgb")){const r=n.match(Kc)||n.match(Yc)||n.match(Bc);if(r){const o=r[4],a=100/255;return[et(Cn(r[1],a)+.5|0,0,255),et(Cn(r[2],a)+.5|0,0,255),et(Cn(r[3],a)+.5|0,0,255),o!==void 0?et(Cn(o,100),0,1):1]}Xi(n)}if(n.startsWith("#")){if(Zc.test(n)){const r=n.substring(1),o=r.length<=4?1:2,a=[0,0,0,255];for(let l=0,c=r.length;l.0031308?Math.pow(n,1/2.4)*269.025-14.025:n*3294.6}function vs(n){return n>.2068965?Math.pow(n,3):(n-4/29)*(108/841)}function Ls(n){return n>10.314724?Math.pow((n+14.025)/269.025,2.4):n/3294.6}function As(n){return n>.0088564?Math.pow(n,1/3):n/(108/841)+4/29}function So(n){const t=Ls(n[0]),e=Ls(n[1]),i=Ls(n[2]),s=As(t*.222488403+e*.716873169+i*.06060791),r=500*(As(t*.452247074+e*.399439023+i*.148375274)-s),o=200*(s-As(t*.016863605+e*.117638439+i*.865350722)),a=Math.atan2(o,r)*(180/Math.PI);return[116*s-16,Math.sqrt(r*r+o*o),a<0?a+360:a,n[3]]}function Hc(n){const t=(n[0]+16)/116,e=n[1],i=n[2]*Math.PI/180,s=vs(t),r=vs(t+e/500*Math.cos(i)),o=vs(t-e/200*Math.sin(i)),a=Ss(r*3.021973625-s*1.617392459-o*.404875592),l=Ss(r*-.943766287+s*1.916279586+o*.027607165),c=Ss(r*.069407491-s*.22898585+o*1.159737864);return[et(a+.5|0,0,255),et(l+.5|0,0,255),et(c+.5|0,0,255),n[3]]}function Pr(n){if(n==="none")return Dr;if(Ai.hasOwnProperty(n))return Ai[n];if(Ts>=Vc){let e=0;for(const i in Ai)(e++&3)===0&&(delete Ai[i],--Ts)}const t=Ga(n);t.length!==4&&Xi(n);for(const e of t)isNaN(e)&&Xi(n);return Ai[n]=t,++Ts,t}function _i(n){return Array.isArray(n)?n:Pr(n)}function Or(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+")"}function vo(n){return n[0]>0&&n[1]>0}function qc(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 It(n,t){return Array.isArray(n)?n:(t===void 0?t=[n,n]:(t[0]=n,t[1]=n),t)}let Ke=0;const pt=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"},tu={[w.Get]:N(z(1,1/0),Lo),[w.Var]:N(z(1,1),eu),[w.Has]:N(z(1,1/0),Lo),[w.Id]:N(iu,$e),[w.Concat]:N(z(2,1/0),H(xt)),[w.GeometryType]:N(nu,$e),[w.LineMetric]:N($e),[w.Resolution]:N(Ms,$e),[w.Zoom]:N(Ms,$e),[w.Time]:N(Ms,$e),[w.Any]:N(z(2,1/0),H(pt)),[w.All]:N(z(2,1/0),H(pt)),[w.Not]:N(z(1,1),H(pt)),[w.Equal]:N(z(2,2),H(wn)),[w.NotEqual]:N(z(2,2),H(wn)),[w.GreaterThan]:N(z(2,2),H(Z)),[w.GreaterThanOrEqualTo]:N(z(2,2),H(Z)),[w.LessThan]:N(z(2,2),H(Z)),[w.LessThanOrEqualTo]:N(z(2,2),H(Z)),[w.Multiply]:N(z(2,1/0),Ao),[w.Coalesce]:N(z(2,1/0),Ao),[w.Divide]:N(z(2,2),H(Z)),[w.Add]:N(z(2,1/0),H(Z)),[w.Subtract]:N(z(2,2),H(Z)),[w.Clamp]:N(z(3,3),H(Z)),[w.Mod]:N(z(2,2),H(Z)),[w.Pow]:N(z(2,2),H(Z)),[w.Abs]:N(z(1,1),H(Z)),[w.Floor]:N(z(1,1),H(Z)),[w.Ceil]:N(z(1,1),H(Z)),[w.Round]:N(z(1,1),H(Z)),[w.Sin]:N(z(1,1),H(Z)),[w.Cos]:N(z(1,1),H(Z)),[w.Atan]:N(z(1,2),H(Z)),[w.Sqrt]:N(z(1,1),H(Z)),[w.Match]:N(z(4,1/0),Mo,ru),[w.Between]:N(z(3,3),H(Z)),[w.Interpolate]:N(z(6,1/0),Mo,ou),[w.Case]:N(z(3,1/0),su,au),[w.In]:N(z(2,2),lu),[w.Number]:N(z(1,1/0),H(wn)),[w.String]:N(z(1,1/0),H(wn)),[w.Array]:N(z(1,1/0),H(Z)),[w.Color]:N(z(1,4),H(Z)),[w.Band]:N(z(1,3),H(Z)),[w.Palette]:N(z(2,2),hu),[w.ToString]:N(z(1,1),H(pt|Z|xt|Wt))};function Lo(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 Ao(n,t,e){const i=n.length-1,s=new Array(i);for(let r=0;ri.featureId;case w.GeometryType:return i=>i.geometryType;case w.Concat:{const i=n.args.map(s=>Kt(s));return s=>"".concat(...i.map(r=>r(s).toString()))}case w.Resolution:return i=>i.resolution;case w.Any:case w.All:case w.Between:case w.In:case w.Not:return gu(n);case w.Equal:case w.NotEqual:case w.LessThan:case w.LessThanOrEqualTo:case w.GreaterThan:case w.GreaterThanOrEqualTo:return fu(n);case w.Multiply:case w.Divide:case w.Add:case w.Subtract:case w.Clamp:case w.Mod:case w.Pow:case w.Abs:case w.Floor:case w.Ceil:case w.Round:case w.Sin:case w.Cos:case w.Atan:case w.Sqrt:return _u(n);case w.Case:return mu(n);case w.Match:return pu(n);case w.Interpolate:return yu(n);case w.ToString:return Eu(n);default:throw new Error(`Unsupported operator ${e}`)}}function uu(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 w.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 w.NotEqual:return r=>i(r)!==s(r);case w.LessThan:return r=>i(r)i(r)<=s(r);case w.GreaterThan:return r=>i(r)>s(r);case w.GreaterThanOrEqualTo:return r=>i(r)>=s(r);default:throw new Error(`Unsupported comparison operator ${e}`)}}function gu(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 w.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 _u(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 w.Add:return r=>{let o=0;for(let a=0;as[0](r)-s[1](r);case w.Clamp:return r=>{const o=s[0](r),a=s[1](r);if(ol?l:o};case w.Mod:return r=>s[0](r)%s[1](r);case w.Pow:return r=>Math.pow(s[0](r),s[1](r));case w.Abs:return r=>Math.abs(s[0](r));case w.Floor:return r=>Math.floor(s[0](r));case w.Ceil:return r=>Math.ceil(s[0](r));case w.Round:return r=>Math.round(s[0](r));case w.Sin:return r=>Math.sin(s[0](r));case w.Cos:return r=>Math.cos(s[0](r));case w.Atan:return i===2?r=>Math.atan2(s[0](r),s[1](r)):r=>Math.atan(s[0](r));case w.Sqrt:return r=>Math.sqrt(s[0](r));default:throw new Error(`Unsupported numeric operator ${e}`)}}function mu(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?xu(r,o,a,l,h,u):Gi(r,o,a,l,h,u);a=h,l=u}return l}}function Eu(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===Wt?Or(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 xu(n,t,e,i,s,r){if(s-e===0)return i;const a=So(i),l=So(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 Hc(h)}const W={IDLE:0,LOADING:1,LOADED:2,ERROR:3};function Cu(n,t,e){const i=n;let s=!0,r=!1,o=!1;const a=[Tn(i,X.LOAD,function(){o=!0,r||t()})];return i.src&&sa?(r=!0,i.decode().then(function(){s&&t()}).catch(function(l){s&&(o?t():e())})):a.push(Tn(i,X.ERROR,e)),function(){s=!1,a.forEach(tt)}}function wu(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 Ru(n,t){return t&&(n.src=t),n.src&&sa?new Promise((e,i)=>n.decode().then(()=>e(n)).catch(s=>n.complete&&n.width?e(n):i(s))):wu(n)}class Iu{constructor(){this.cache_={},this.patternCache_={},this.cacheSize_=0,this.maxCacheSize_=1024}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)===0&&!i.hasListener()&&(delete this.cache_[e],delete this.patternCache_[e],--this.cacheSize_)}}}get(t,e,i){const s=bs(t,e,i);return s in this.cache_?this.cache_[s]:null}getPattern(t,e,i){const s=bs(t,e,i);return s in this.patternCache_?this.patternCache_[s]:null}set(t,e,i,s,r){const o=bs(t,e,i),a=o in this.cache_;this.cache_[o]=s,r&&(s.getImageState()===W.IDLE&&s.load(),s.getImageState()===W.LOADING?s.ready().then(()=>{this.patternCache_[o]=Dn().createPattern(s.getImage(1),"repeat")}):this.patternCache_[o]=Dn().createPattern(s.getImage(1),"repeat")),a||++this.cacheSize_}setSize(t){this.maxCacheSize_=t,this.expire()}}function bs(n,t,e){const i=e?_i(e):"null";return t+":"+n+":"+i}const Ft=new Iu;let Mi=null;class Ya extends Yn{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?W.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_===W.LOADED){Mi||(Mi=ot(1,1,void 0,{willReadFrequently:!0})),Mi.drawImage(this.image_,0,0);try{Mi.getImageData(0,0,1,1),this.tainted_=!1}catch{Mi=null,this.tainted_=!0}}return this.tainted_===!0}dispatchChangeEvent_(){this.dispatchEvent(X.CHANGE)}handleImageError_(){this.imageState_=W.ERROR,this.dispatchChangeEvent_()}handleImageLoad_(){this.imageState_=W.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=ot(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_===W.IDLE){this.image_||this.initializeImage_(),this.imageState_=W.LOADING;try{this.src_!==void 0&&(this.image_.src=this.src_)}catch{this.handleImageError_()}this.image_ instanceof HTMLImageElement&&Ru(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_!==W.LOADED)return;const e=this.image_,i=ot(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=Uc(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_===W.LOADED||this.imageState_===W.ERROR)t();else{const e=()=>{(this.imageState_===W.LOADED||this.imageState_===W.ERROR)&&(this.removeEventListener(X.CHANGE,e),t())};this.addEventListener(X.CHANGE,e)}})),this.ready_}}function kr(n,t,e,i,s,r){let o=t===void 0?void 0:Ft.get(t,e,s);return o||(o=new Ya(n,n&&"src"in n?n.src||void 0:t,e,i,s),Ft.set(t,e,s,o,r)),r&&o&&!Ft.getPattern(t,e,s)&&Ft.set(t,e,s,o,r),o}function qt(n){return n?Array.isArray(n)?Or(n):typeof n=="object"&&"src"in n?Tu(n):n:null}function Tu(n){if(!n.offset||!n.size)return Ft.getPattern(n.src,"anonymous",n.color);const t=n.src+":"+n.offset,e=Ft.getPattern(t,void 0,n.color);if(e)return e;const i=Ft.get(n.src,"anonymous",null);if(i.getImageState()!==W.LOADED)return null;const s=ot(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]),kr(s.canvas,t,void 0,W.LOADED,n.color,!0),Ft.getPattern(t,void 0,n.color)}const Ka="10px sans-serif",Ct="#000",mi="round",oe=[],ae=0,pi="round",Hi=10,qi="#000",$i="center",Pn="middle",ke=[0,0,0,0],Ji=1,ni=new $t;let bi=null,bo;const Js={},Su=new Set(["serif","sans-serif","monospace","cursive","fantasy","system-ui","ui-serif","ui-sans-serif","ui-monospace","ui-rounded","emoji","math","fangsong"]);function vu(n,t,e){return`${n} ${t} 16px "${e}"`}const Lu=function(){let t,e;async function i(r){await e.ready;const o=await e.load(r);if(o.length===0)return!1;const a=qs(r),l=a.families[0].toLowerCase(),c=a.weight;return o.some(h=>{const u=h.family.replace(/^['"]|['"]$/g,"").toLowerCase(),d=Hs[h.weight]||h.weight;return u===l&&h.style===a.style&&d==c})}async function s(){await e.ready;let r=!0;const o=ni.getProperties(),a=Object.keys(o).filter(l=>o[l]<100);for(let l=a.length-1;l>=0;--l){const c=a[l];let h=o[c];h<100&&(await i(c)?(en(Js),ni.set(c,100)):(h+=10,ni.set(c,h,!0),h<100&&(r=!1)))}t=void 0,r||(t=setTimeout(s,100))}return async function(r){e||(e=sr?self.fonts:document.fonts);const o=qs(r);if(!o)return;const a=o.families;let l=!1;for(const c of a){if(Su.has(c))continue;const h=vu(o.style,o.weight,c);ni.get(h)===void 0&&(ni.set(h,0,!0),l=!0)}l&&(clearTimeout(t),t=setTimeout(s,100))}}(),Au=function(){let n;return function(t){let e=Js[t];if(e==null){if(sr){const i=qs(t),s=Ba(t,"Žg");e=(isNaN(Number(i.lineHeight))?1.2:Number(i.lineHeight))*(s.actualBoundingBoxAscent+s.actualBoundingBoxDescent)}else n||(n=document.createElement("div"),n.innerHTML="M",n.style.minHeight="0",n.style.maxHeight="none",n.style.height="auto",n.style.padding="0",n.style.border="none",n.style.position="absolute",n.style.display="block",n.style.left="-99999px"),n.style.font=t,document.body.appendChild(n),e=n.offsetHeight,document.body.removeChild(n);Js[t]=e}return e}}();function Ba(n,t){return bi||(bi=ot(1,1)),n!=bo&&(bi.font=n,bo=bi.font),bi.measureText(t)}function Za(n,t){return Ba(n,t).width}function Do(n,t,e){if(t in e)return e[t];const i=t.split(` `).reduce((s,r)=>Math.max(s,Za(n,r)),0);return e[t]=i,i}function Mu(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=Za(d,u);e.push(f),o+=f;const g=Au(d);i.push(g),l=Math.max(l,g)}return{width:r,height:a,widths:e,heights:i,lineWidths:s}}function bu(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]),Du(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 Du(n,t){const e=n.contextInstructions;for(let i=0,s=e.length;ithis.imageState_=W.LOADED),this.render()}clone(){const t=this.getScale(),e=new ns({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){const e=this.fill_?.getKey(),i=`${t},${this.angle_},${this.radius},${this.radius2_},${this.points_},${e}`+Object.values(this.renderOptions_).join(",");let s=Ft.get(i,null,null)?.getImage(1);if(!s){const r=this.renderOptions_,o=Math.ceil(r.size*t),a=ot(o,o);this.draw_(r,a,t),s=a.canvas,Ft.set(i,null,null,new Ya(s,void 0,null,W.LOADED,null))}return s}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()===W.IDLE&&e.load(),e.getImageState()===W.LOADING&&(this.patternImage_=e)}this.color_=t}getKey(){const t=this.getColor();return t?t instanceof CanvasPattern||t instanceof CanvasGradient?j(t):typeof t=="object"&&"src"in t?t.src+":"+t.offset:_i(t).toString():""}loading(){return!!this.patternImage_}ready(){return this.patternImage_?this.patternImage_.ready():Promise.resolve()}}function Po(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 ss extends is{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;q(!(a!==void 0&&o),"`image` and `src` cannot be provided at the same time"),(a===void 0||a.length===0)&&o&&(a=o.src||j(o)),q(a!==void 0&&a.length>0,"A defined and non-empty `src` or `image` must be provided"),q(!((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=W.IDLE:o!==void 0&&("complete"in o?o.complete?l=o.src?W.LOADED:W.IDLE:l=W.LOADING:l=W.LOADED),this.color_=t.color!==void 0?_i(t.color):null,this.iconImage_=kr(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(Po(f[0],f[1],t.width,t.height))};this.listenImageChange(d);return}}c!==void 0&&this.setScale(Po(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 ss({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()==W.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()==W.LOADED)return this.iconImage_.getSize()[1]*t[1]}setScale(t){delete this.initialOptions_,super.setScale(t)}listenImageChange(t){this.iconImage_.addEventListener(X.CHANGE,t)}load(){this.iconImage_.load()}unlistenImageChange(t){this.iconImage_.removeEventListener(X.CHANGE,t)}ready(){return this.iconImage_.ready()}}class yi{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 yi({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 le{constructor(t){t=t||{},this.geometry_=null,this.geometryFunction_=Oo,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 le({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_=Oo,this.geometry_=t}setZIndex(t){this.zIndex_=t}}function Pu(n){let t;if(typeof n=="function")t=n;else{let e;Array.isArray(n)?e=n:(q(typeof n.getZIndex=="function","Expected an `Style` or an array of `Style`"),e=[n]),t=function(){return e}}return t}let Ds=null;function Ua(n,t){if(!Ds){const e=new Ci({color:"rgba(255,255,255,0.4)"}),i=new yi({color:"#3399CC",width:1.25});Ds=[new le({image:new an({fill:e,stroke:i,radius:5}),fill:e,stroke:i})]}return Ds}function Oo(n){return n.getGeometry()}const Ou="#333";class Nr{constructor(t){t=t||{},this.font_=t.font,this.rotation_=t.rotation,this.rotateWithView_=t.rotateWithView,this.keepUpright_=t.keepUpright,this.scale_=t.scale,this.scaleArray_=It(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 Ci({color:Ou}),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 Nr({font:this.getFont(),placement:this.getPlacement(),repeat:this.getRepeat(),maxAngle:this.getMaxAngle(),overflow:this.getOverflow(),rotation:this.getRotation(),rotateWithView:this.getRotateWithView(),keepUpright:this.getKeepUpright(),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_}getKeepUpright(){return this.keepUpright_}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}setKeepUpright(t){this.keepUpright_=t}setFill(t){this.fill_=t}setRotation(t){this.rotation_=t}setScale(t){this.scale_=t,this.scaleArray_=It(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}}function Fu(n){return!0}function ku(n){const t=za(),e=Nu(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 Fo(n){const t=za(),e=n.length,i=new Array(e);for(let o=0;onull;i=Gr(n,t+"fill-color",e)}if(!i)return null;const s=new Ci;return function(r){const o=i(r);return o===Dr?null:(s.setColor(o),s)}}function tn(n,t,e){const i=Rt(n,t+"stroke-width",e),s=Gr(n,t+"stroke-color",e);if(!i&&!s)return null;const r=se(n,t+"stroke-line-cap",e),o=se(n,t+"stroke-line-join",e),a=Va(n,t+"stroke-line-dash",e),l=Rt(n,t+"stroke-line-dash-offset",e),c=Rt(n,t+"stroke-miter-limit",e),h=new yi;return function(u){if(s){const d=s(u);if(d===Dr)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 Gu(n,t){const e="text-",i=se(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=se(n,e+"font",t),c=Rt(n,e+"max-angle",t),h=Rt(n,e+"offset-x",t),u=Rt(n,e+"offset-y",t),d=hi(n,e+"overflow",t),f=se(n,e+"placement",t),g=Rt(n,e+"repeat",t),m=rs(n,e+"scale",t),_=hi(n,e+"rotate-with-view",t),p=Rt(n,e+"rotation",t),E=se(n,e+"align",t),C=se(n,e+"justify",t),y=se(n,e+"baseline",t),x=hi(n,e+"keep-upright",t),R=Va(n,e+"padding",t),T=os(n,e+"declutter-mode"),I=new Nr({declutterMode:T});return function(v){if(I.setText(i(v)),s&&I.setFill(s(v)),r&&I.setBackgroundFill(r(v)),o&&I.setStroke(o(v)),a&&I.setBackgroundStroke(a(v)),l&&I.setFont(l(v)),c&&I.setMaxAngle(c(v)),h&&I.setOffsetX(h(v)),u&&I.setOffsetY(u(v)),d&&I.setOverflow(d(v)),f){const L=f(v);if(L!=="point"&&L!=="line")throw new Error("Expected point or line for text-placement");I.setPlacement(L)}if(g&&I.setRepeat(g(v)),m&&I.setScale(m(v)),_&&I.setRotateWithView(_(v)),p&&I.setRotation(p(v)),E){const L=E(v);if(L!=="left"&&L!=="center"&&L!=="right"&&L!=="end"&&L!=="start")throw new Error("Expected left, right, center, start, or end for text-align");I.setTextAlign(L)}if(C){const L=C(v);if(L!=="left"&&L!=="right"&&L!=="center")throw new Error("Expected left, right, or center for text-justify");I.setJustify(L)}if(y){const L=y(v);if(L!=="bottom"&&L!=="top"&&L!=="middle"&&L!=="alphabetic"&&L!=="hanging")throw new Error("Expected bottom, top, middle, alphabetic, or hanging for text-baseline");I.setTextBaseline(L)}return R&&I.setPadding(R(v)),x&&I.setKeepUpright(x(v)),I}}function zu(n,t){return"icon-src"in n?Xu(n,t):"shape-points"in n?Wu(n,t):"circle-radius"in n?Yu(n,t):null}function Xu(n,t){const e="icon-",i=e+"src",s=ja(n[i],i),r=On(n,e+"anchor",t),o=rs(n,e+"scale",t),a=Rt(n,e+"opacity",t),l=On(n,e+"displacement",t),c=Rt(n,e+"rotation",t),h=hi(n,e+"rotate-with-view",t),u=No(n,e+"anchor-origin"),d=Go(n,e+"anchor-x-units"),f=Go(n,e+"anchor-y-units"),g=Vu(n,e+"color"),m=Zu(n,e+"cross-origin"),_=Uu(n,e+"offset"),p=No(n,e+"offset-origin"),E=Fn(n,e+"width"),C=Fn(n,e+"height"),y=Bu(n,e+"size"),x=os(n,e+"declutter-mode"),R=new ss({src:s,anchorOrigin:u,anchorXUnits:d,anchorYUnits:f,color:g,crossOrigin:m,offset:_,offsetOrigin:p,height:C,width:E,size:y,declutterMode:x});return function(T){return a&&R.setOpacity(a(T)),l&&R.setDisplacement(l(T)),c&&R.setRotation(c(T)),h&&R.setRotateWithView(h(T)),o&&R.setScale(o(T)),r&&R.setAnchor(r(T)),R}}function Wu(n,t){const e="shape-",i=e+"points",s=e+"radius",r=tr(n[i],i),o=tr(n[s],s),a=Qi(n,e,t),l=tn(n,e,t),c=rs(n,e+"scale",t),h=On(n,e+"displacement",t),u=Rt(n,e+"rotation",t),d=hi(n,e+"rotate-with-view",t),f=Fn(n,e+"radius2"),g=Fn(n,e+"angle"),m=os(n,e+"declutter-mode"),_=new ns({points:r,radius:o,radius2:f,angle:g,declutterMode:m});return function(p){return a&&_.setFill(a(p)),l&&_.setStroke(l(p)),h&&_.setDisplacement(h(p)),u&&_.setRotation(u(p)),d&&_.setRotateWithView(d(p)),c&&_.setScale(c(p)),_}}function Yu(n,t){const e="circle-",i=Qi(n,e,t),s=tn(n,e,t),r=Rt(n,e+"radius",t),o=rs(n,e+"scale",t),a=On(n,e+"displacement",t),l=Rt(n,e+"rotation",t),c=hi(n,e+"rotate-with-view",t),h=os(n,e+"declutter-mode"),u=new an({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 Rt(n,t,e){if(!(t in n))return;const i=ue(n[t],Z,e);return function(s){return tr(i(s),t)}}function se(n,t,e){if(!(t in n))return null;const i=ue(n[t],xt,e);return function(s){return ja(i(s),t)}}function Ku(n,t,e){const i=se(n,t+"pattern-src",e),s=ko(n,t+"pattern-offset",e),r=ko(n,t+"pattern-size",e),o=Gr(n,t+"color",e);return function(a){return{src:i(a),offset:s&&s(a),size:r&&r(a),color:o&&o(a)}}}function hi(n,t,e){if(!(t in n))return null;const i=ue(n[t],pt,e);return function(s){const r=i(s);if(typeof r!="boolean")throw new Error(`Expected a boolean for ${t}`);return r}}function Gr(n,t,e){if(!(t in n))return null;const i=ue(n[t],Wt,e);return function(s){return Ha(i(s),t)}}function Va(n,t,e){if(!(t in n))return null;const i=ue(n[t],We,e);return function(s){return ln(i(s),t)}}function On(n,t,e){if(!(t in n))return null;const i=ue(n[t],We,e);return function(s){const r=ln(i(s),t);if(r.length!==2)throw new Error(`Expected two numbers for ${t}`);return r}}function ko(n,t,e){if(!(t in n))return null;const i=ue(n[t],We,e);return function(s){return qa(i(s),t)}}function rs(n,t,e){if(!(t in n))return null;const i=ue(n[t],We|Z,e);return function(s){return ju(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 Bu(n,t){const e=n[t];if(e!==void 0){if(typeof e=="number")return It(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 Zu(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 No(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 Go(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 Uu(n,t){const e=n[t];if(e!==void 0)return ln(e,t)}function os(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 Vu(n,t){const e=n[t];if(e!==void 0)return Ha(e,t)}function ln(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 qa(n,t){const e=ln(n,t);if(e.length!==2)throw new Error(`Expected an array of two numbers for ${t}`);return e}function ju(n,t){return typeof n=="number"?n:qa(n,t)}const zo={RENDER_ORDER:"renderOrder"};class $a extends es{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(zo.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 Na(9)),this.getRenderer().renderDeclutter(t,e)}setRenderOrder(t){this.set(zo.RENDER_ORDER,t)}setStyle(t){this.style_=t===void 0?Ua:t;const e=Hu(t);this.styleFunction_=t===null?void 0:Pu(e),this.changed()}setDeclutter(t){this.declutter_=t?String(t):void 0,this.changed()}}function Hu(n){if(n===void 0)return Ua;if(!n)return null;if(typeof n=="function"||n instanceof le)return n;if(!Array.isArray(n))return Fo([n]);if(n.length===0)return[];const t=n.length,e=n[0];if(e instanceof le){const s=new Array(t);for(let r=0;r=0;--x){const R=m[x],T=R.layer;if(T.hasRenderer()&&br(R,h)&&a.call(l,T)){const I=T.getRenderer(),v=T.getSource();if(I&&v){const L=v.getWrapX()?f:t,k=u.bind(null,R.managed);E[0]=L[0]+g[y][0],E[1]=L[1]+g[y][1],c=I.forEachFeatureAtCoordinate(E,e,i,k,p)}if(c)return c}}if(p.length===0)return;const C=1/p.length;return p.forEach((y,x)=>y.distanceSq+=x*C),p.sort((y,x)=>y.distanceSq-x.distanceSq),p.some(y=>c=y.callback(y.feature,y.layer,y.geometry)),c}hasFeatureAtCoordinate(t,e,i,s,r,o){return this.forEachFeatureAtCoordinate(t,e,i,s,Yi,this,r,o)!==void 0}getMap(){return this.map_}renderFrame(t){U()}scheduleExpireIconCache(t){Ft.canExpireCache()&&t.postRenderFunctions.push($u)}}function $u(n,t){Ft.expire()}class Ju extends qu{constructor(t){super(t),this.fontChangeListenerKey_=V(ni,ui.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=Qn+" 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 Ja(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 $a&&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))}}}function Qa(n){if(n instanceof es){n.setMapInternal(null);return}n instanceof xi&&n.getLayers().forEach(Qa)}function tl(n,t){if(n instanceof es){n.setMapInternal(t);return}if(n instanceof xi){const e=n.getLayers().getArray();for(let i=0,s=e.length;ithis.updateSize()),this.controls=e.controls||dc(),this.interactions=e.interactions||Oc({onFocusOnly:!0}),this.overlays_=e.overlays,this.overlayIdIndex_={},this.renderer_=null,this.postRenderFunctions_=[],this.tileQueue_=new Nl(this.getTilePriority.bind(this),this.handleTileChange_.bind(this)),this.addChangeListener(ft.LAYERGROUP,this.handleLayerGroupChanged_),this.addChangeListener(ft.VIEW,this.handleViewChanged_),this.addChangeListener(ft.SIZE,this.handleSizeChanged_),this.addChangeListener(ft.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(Et.ADD,s=>{s.element.setMap(this)}),this.controls.addEventListener(Et.REMOVE,s=>{s.element.setMap(null)}),this.interactions.addEventListener(Et.ADD,s=>{s.element.setMap(this)}),this.interactions.addEventListener(Et.REMOVE,s=>{s.element.setMap(null)}),this.overlays_.addEventListener(Et.ADD,s=>{this.addOverlayInternal_(s.element)}),this.overlays_.addEventListener(Et.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){tl(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:Yi,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 xi?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:Yi,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(ft.TARGET)}getTargetElement(){return this.targetElement_}getCoordinateFromPixel(t){return js(this.getCoordinateFromPixelInternal(t),this.getView().getProjection())}getCoordinateFromPixelInternal(t){const e=this.frameState_;return e?ht(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(ft.LAYERGROUP)}setLayers(t){const e=this.getLayerGroup();if(t instanceof Ht){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[gt.ANIMATING]||o[gt.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 Ee("removelayer",e)),this.set(ft.LAYERGROUP,t)}setSize(t){this.set(ft.SIZE,t)}setTarget(t){this.set(ft.TARGET,t)}setView(t){if(!t||t instanceof Vt){this.set(ft.VIEW,t);return}this.set(ft.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)],!vo(e)&&(t.offsetWidth||t.offsetHeight||t.getClientRects().length)&&ma("No map visible because the map container's width or height are 0."))}const i=this.getSize();e&&(!i||!Te(e,i))&&(this.setSize(e),this.updateViewportSize_(e))}updateViewportSize_(t){const e=this.getView();e&&e.setViewportSize(t)}}function td(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 xi({layers:n.layers});e[ft.LAYERGROUP]=i,e[ft.TARGET]=n.target,e[ft.VIEW]=n.view instanceof Vt?n.view:new Vt;let s;n.controls!==void 0&&(Array.isArray(n.controls)?s=new Ht(n.controls.slice()):(q(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 Ht(n.interactions.slice()):(q(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 Ht(n.overlays.slice()):(q(typeof n.overlays.getArray=="function","Expected `overlays` to be an array or an `ol/Collection.js`"),o=n.overlays):o=new Ht,{controls:s,interactions:r,keyboardEventTarget:t,overlays:o,values:e}}class zr{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 zr(n,t,e,i)}function kn(n,t,e,i){return i!==void 0?(i[0]=n,i[1]=t,i[2]=e,i):[n,t,e]}function ed(n,t,e){return n+"/"+t+"/"+e}function id(n){return nd(n[0],n[1],n[2])}function nd(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],fe=5;class el{constructor(t){this.minZoom=t.minZoom!==void 0?t.minZoom:0,this.resolutions_=t.resolutions,q(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 zr(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;lt)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:_a(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 sl extends Wr{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=P.LOADED,this.unlistenImage_(),this.changed()}handleImageError_(){this.state=P.ERROR,this.unlistenImage_(),this.image_=hd(),this.changed()}handleImageLoad_(){const t=this.image_;t.naturalWidth&&t.naturalHeight?this.state=P.LOADED:this.state=P.EMPTY,this.unlistenImage_(),this.changed()}load(){this.state==P.ERROR&&(this.state=P.IDLE,this.image_=new Image,this.crossOrigin_!==null&&(this.image_.crossOrigin=this.crossOrigin_)),this.state==P.IDLE&&(this.state=P.LOADING,this.changed(),this.tileLoadFunction_(this,this.src_),this.unlisten_=Cu(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 hd(){const n=ot(1,1);return n.fillStyle="rgba(0,0,0,0)",n.fillRect(0,0,1,1),n.canvas}let Ps;const ci=[];function Xo(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 Os(n,t){return Math.abs(n[t*4]-210)>2||Math.abs(n[t*4+3]-.75*255)>2}function cd(){if(Ps===void 0){const n=ot(6,6,ci);n.globalCompositeOperation="lighter",n.fillStyle="rgba(210, 0, 0, 0.75)",Xo(n,4,5,4,0),Xo(n,4,5,0,5);const t=n.getImageData(0,0,3,3).data;Ps=Os(t,0)||Os(t,4)||Os(t,8),ts(n),ci.push(n.canvas)}return Ps}function Wo(n,t,e,i){const s=mr(e,t,n);let r=ho(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||fi(l,s)){const c=ho(n,r,s)/r;isFinite(c)&&c>0&&(r/=c)}return r}function ud(n,t,e,i){const s=Xe(e);let r=Wo(n,t,s,i);return(!isFinite(r)||r<=0)&&ca(e,function(o){return r=Wo(n,t,o,i),isFinite(r)&&r>0}),r}function dd(n,t,e,i,s,r,o,a,l,c,h,u,d,f){const g=ot(Math.round(e*n),Math.round(e*t),ci);if(u||(g.imageSmoothingEnabled=!1),l.length===0)return g.canvas;g.scale(e,e);function m(x){return Math.round(x*e)/e}g.globalCompositeOperation="lighter";const _=Nt();l.forEach(function(x,R,T){Yl(_,x.extent)});let p;const E=e/i,C=(u?1:1+Math.pow(2,-24))/E;p=ot(Math.round(J(_)*E),Math.round(yt(_)*E),ci),u||(p.imageSmoothingEnabled=!1),l.forEach(function(x,R,T){if(x.image.width>0&&x.image.height>0){if(x.clipExtent){p.save();const b=(x.clipExtent[0]-_[0])*E,A=-(x.clipExtent[3]-_[3])*E,M=J(x.clipExtent)*E,Y=yt(x.clipExtent)*E;p.rect(u?b:Math.round(b),u?A:Math.round(A),u?M:Math.round(b+M)-Math.round(b),u?Y:Math.round(A+Y)-Math.round(A)),p.clip()}const I=(x.extent[0]-_[0])*E,v=-(x.extent[3]-_[3])*E,L=J(x.extent)*E,k=yt(x.extent)*E;p.drawImage(x.image,c,c,x.image.width-2*c,x.image.height-2*c,u?I:Math.round(I),u?v:Math.round(v),u?L:Math.round(I+L)-Math.round(I),u?k:Math.round(v+k)-Math.round(v)),x.clipExtent&&p.restore()}});const y=Ye(o);return a.getTriangles().forEach(function(x,R,T){const I=x.source,v=x.target;let L=I[0][0],k=I[0][1],b=I[1][0],A=I[1][1],M=I[2][0],Y=I[2][1];const F=m((v[0][0]-y[0])/r),G=m(-(v[0][1]-y[1])/r),O=m((v[1][0]-y[0])/r),K=m(-(v[1][1]-y[1])/r),B=m((v[2][0]-y[0])/r),Q=m(-(v[2][1]-y[1])/r),S=L,ut=k;L=0,k=0,b-=S,A-=ut,M-=S,Y-=ut;const _t=[[b,A,0,0,O-F],[M,Y,0,0,B-F],[0,0,b,A,K-G],[0,0,M,Y,Q-G]],st=Xl(_t);if(!st)return;if(g.save(),g.beginPath(),cd()||!u){g.moveTo(O,K);const dt=4,Bt=F-O,Gt=G-K;for(let vt=0;vtht(a,mr(C,this.targetProj_,this.sourceProj_))):Mn(this.targetProj_,this.sourceProj_);this.transformInv_=function(C){const y=C[0]+"/"+C[1];return l[y]||(l[y]=c(C)),l[y]},this.maxSourceExtent_=s,this.errorThresholdSquared_=r*r,this.triangles_=[],this.wrapsXInSource_=!1,this.canWrapXInSource_=this.sourceProj_.canWrapX()&&!!s&&!!this.sourceProj_.getExtent()&&J(s)>=J(this.sourceProj_.getExtent()),this.sourceWorldWidth_=this.sourceProj_.getExtent()?J(this.sourceProj_.getExtent()):null,this.targetWorldWidth_=this.targetProj_.getExtent()?J(this.targetProj_.getExtent()):null;const h=Ye(i),u=Vn(i),d=Un(i),f=Zn(i),g=this.transformInv_(h),m=this.transformInv_(u),_=this.transformInv_(d),p=this.transformInv_(f),E=fd+(o?Math.max(0,Math.ceil(Math.log2(Ks(i)/(o*o*256*256)))):0);if(this.addQuad_(h,u,d,f,g,m,_,p,E),this.wrapsXInSource_){let C=1/0;this.triangles_.forEach(function(y,x,R){C=Math.min(C,y.source[0][0],y.source[1][0],y.source[2][0])}),this.triangles_.forEach(y=>{if(Math.max(y.source[0][0],y.source[1][0],y.source[2][0])-C>this.sourceWorldWidth_/2){const x=[[y.source[0][0],y.source[0][1]],[y.source[1][0],y.source[1][1]],[y.source[2][0],y.source[2][1]]];x[0][0]-C>this.sourceWorldWidth_/2&&(x[0][0]-=this.sourceWorldWidth_),x[1][0]-C>this.sourceWorldWidth_/2&&(x[1][0]-=this.sourceWorldWidth_),x[2][0]-C>this.sourceWorldWidth_/2&&(x[2][0]-=this.sourceWorldWidth_);const R=Math.min(x[0][0],x[1][0],x[2][0]);Math.max(x[0][0],x[1][0],x[2][0])-R.5&&u<1;let g=!1;if(c>0){if(this.targetProj_.isGlobal()&&this.targetWorldWidth_){const _=to([t,e,i,s]);g=J(_)/this.targetWorldWidth_>Yo||g}!f&&this.sourceProj_.isGlobal()&&u&&(g=u>Yo||g)}if(!g&&this.maxSourceExtent_&&isFinite(h[0])&&isFinite(h[1])&&isFinite(h[2])&&isFinite(h[3])&&!wt(h,this.maxSourceExtent_))return;let m=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(m=(!isFinite(r[0])||!isFinite(r[1])?8:0)+(!isFinite(o[0])||!isFinite(o[1])?4:0)+(!isFinite(a[0])||!isFinite(a[1])?2:0)+(!isFinite(l[0])||!isFinite(l[1])?1:0),m!=1&&m!=2&&m!=4&&m!=8)return}if(c>0){if(!g){const _=[(t[0]+i[0])/2,(t[1]+i[1])/2],p=this.transformInv_(_);let E;f?E=(ai(r[0],d)+ai(a[0],d))/2-ai(p[0],d):E=(r[0]+a[0])/2-p[0];const C=(r[1]+a[1])/2-p[1];g=E*E+C*C>this.errorThresholdSquared_}if(g){if(Math.abs(t[0]-i[0])<=Math.abs(t[1]-i[1])){const _=[(e[0]+i[0])/2,(e[1]+i[1])/2],p=this.transformInv_(_),E=[(s[0]+t[0])/2,(s[1]+t[1])/2],C=this.transformInv_(E);this.addQuad_(t,e,_,E,r,o,p,C,c-1),this.addQuad_(E,_,i,s,C,p,a,l,c-1)}else{const _=[(t[0]+e[0])/2,(t[1]+e[1])/2],p=this.transformInv_(_),E=[(i[0]+s[0])/2,(i[1]+s[1])/2],C=this.transformInv_(E);this.addQuad_(t,_,E,s,r,p,C,l,c-1),this.addQuad_(_,e,i,E,p,o,a,C,c-1)}return}}if(f){if(!this.canWrapXInSource_)return;this.wrapsXInSource_=!0}(m&11)==0&&this.addTriangle_(t,i,s,r,a,l),(m&14)==0&&this.addTriangle_(t,i,e,r,a,o),m&&((m&13)==0&&this.addTriangle_(e,s,t,o,l,r),(m&7)==0&&this.addTriangle_(e,s,i,o,l,a))}calculateSourceExtent(){const t=Nt();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_}}const _d=.5;class rl extends Wr{constructor(t,e,i,s,r,o,a,l,c,h,u,d){super(r,P.IDLE,d),this.renderEdges_=u!==void 0?u:!1,this.pixelRatio_=a,this.gutter_=l,this.canvas_=null,this.sourceTileGrid_=e,this.targetTileGrid_=s,this.wrappedTileCoord_=o||r,this.sourceTiles_=[],this.sourcesListenerKeys_=null,this.sourceZ_=0,this.clipExtent_=t.canWrapX()?t.getExtent():void 0;const f=s.getTileCoordExtent(this.wrappedTileCoord_),g=this.targetTileGrid_.getExtent();let m=this.sourceTileGrid_.getExtent();const _=g?Ge(f,g):f;if(Ks(_)===0){this.state=P.EMPTY;return}const p=t.getExtent();p&&(m?m=Ge(m,p):m=p);const E=s.getResolution(this.wrappedTileCoord_[0]),C=ud(t,i,_,E);if(!isFinite(C)||C<=0){this.state=P.EMPTY;return}const y=h!==void 0?h:_d;if(this.triangulation_=new gd(t,i,_,m,C*y,E),this.triangulation_.getTriangles().length===0){this.state=P.EMPTY;return}this.sourceZ_=e.getZForResolution(C);let x=this.triangulation_.calculateSourceExtent();if(m&&(t.canWrapX()?(x[1]=et(x[1],m[1],m[3]),x[3]=et(x[3],m[1],m[3])):x=Ge(x,m)),!Ks(x))this.state=P.EMPTY;else{let R=0,T=0;t.canWrapX()&&(R=J(p),T=Math.floor((x[0]-p[0])/R)),fa(x.slice(),t,!0).forEach(v=>{const L=e.getTileRangeForExtentAndZ(v,this.sourceZ_);for(let k=L.minX;k<=L.maxX;k++)for(let b=L.minY;b<=L.maxY;b++){const A=c(this.sourceZ_,k,b,a);if(A){const M=T*R;this.sourceTiles_.push({tile:A,offset:M})}}++T}),this.sourceTiles_.length===0&&(this.state=P.EMPTY)}}getImage(){return this.canvas_}reproject_(){const t=[];if(this.sourceTiles_.forEach(e=>{const i=e.tile;if(i&&i.getState()==P.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=P.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_=dd(s,r,this.pixelRatio_,a,this.sourceTileGrid_.getExtent(),o,l,this.triangulation_,t,this.gutter_,this.renderEdges_,this.interpolate),this.state=P.LOADED}this.changed()}load(){if(this.state==P.IDLE){this.state=P.LOADING,this.changed();let t=0;this.sourcesListenerKeys_=[],this.sourceTiles_.forEach(({tile:e})=>{const i=e.getState();if(i==P.IDLE||i==P.LOADING){t++;const s=V(e,X.CHANGE,r=>{const o=e.getState();(o==P.LOADED||o==P.ERROR||o==P.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()==P.IDLE&&e.load()})}}unlistenSources_(){this.sourcesListenerKeys_.forEach(tt),this.sourcesListenerKeys_=null}release(){this.canvas_&&(ts(this.canvas_.getContext("2d")),ci.push(this.canvas_),this.canvas_=null),super.release()}}const md=/\{z\}/g,pd=/\{x\}/g,yd=/\{y\}/g,Ed=/\{-y\}/g;function xd(n,t,e,i,s){return n.replace(md,t.toString()).replace(pd,e.toString()).replace(yd,i.toString()).replace(Ed,function(){if(s===void 0)throw new Error("If the URL template has a {-y} placeholder, the grid extent must be known");return(s-i).toString()})}function Cd(n){const t=[];let e=/\{([a-z])-([a-z])\}/.exec(n);if(e){const i=e[1].charCodeAt(0),s=e[2].charCodeAt(0);let r;for(r=i;r<=s;++r)t.push(n.replace(e[0],String.fromCharCode(r)));return t}if(e=/\{(\d+)-(\d+)\}/.exec(n),e){const i=parseInt(e[2],10);for(let s=parseInt(e[1],10);s<=i;s++)t.push(n.replace(e[0],s.toString()));return t}return t.push(n),t}function wd(n,t){return function(e,i,s){if(!e)return;let r;const o=e[0];if(t){const a=t.getFullTileRange(o);a&&(r=a.getHeight()-1)}return xd(n,o,e[1],e[2],r)}}function Rd(n,t){const e=n.length,i=new Array(e);for(let s=0;sn):null}class Td extends ol{constructor(t){super({attributions:t.attributions,attributionsCollapsible:t.attributionsCollapsible,projection:t.projection,state:t.state,wrapX:t.wrapX,interpolate:t.interpolate}),this.on,this.once,this.un,this.tilePixelRatio_=t.tilePixelRatio!==void 0?t.tilePixelRatio:1,this.tileGrid=t.tileGrid!==void 0?t.tileGrid:null;const e=[256,256];this.tileGrid&&It(this.tileGrid.getTileSize(this.tileGrid.getMinZoom()),e),this.tmpSize=[0,0],this.key_=t.key||j(this),this.tileOptions={transition:t.transition,interpolate:t.interpolate},this.zDirection=t.zDirection?t.zDirection:0}getGutterForProjection(t){return 0}getKey(){return this.key_}setKey(t){this.key_!==t&&(this.key_=t,this.changed())}getResolutions(t){const e=t?this.getTileGridForProjection(t):this.tileGrid;return e?e.getResolutions():null}getTile(t,e,i,s,r){return U()}getTileGrid(){return this.tileGrid}getTileGridForProjection(t){return this.tileGrid?this.tileGrid:il(t)}getTilePixelRatio(t){return this.tilePixelRatio_}getTilePixelSize(t,e,i){const s=this.getTileGridForProjection(i),r=this.getTilePixelRatio(e),o=It(s.getTileSize(t),this.tmpSize);return r==1?o:qc(o,r,this.tmpSize)}getTileCoordForTileUrlFunction(t,e){const i=e!==void 0?e:this.getProjection(),s=e!==void 0?this.getTileGridForProjection(i):this.tileGrid||this.getTileGridForProjection(i);return this.getWrapX()&&i.isGlobal()&&(t=rd(s,t,i)),sd(t,s)?t:null}clear(){}refresh(){this.clear(),super.refresh()}}class Sd extends ce{constructor(t,e){super(t),this.tile=e}}const Fs={TILELOADSTART:"tileloadstart",TILELOADEND:"tileloadend",TILELOADERROR:"tileloaderror"};class Yr extends Td{constructor(t){super({attributions:t.attributions,cacheSize:t.cacheSize,projection:t.projection,state:t.state,tileGrid:t.tileGrid,tilePixelRatio:t.tilePixelRatio,wrapX:t.wrapX,transition:t.transition,interpolate:t.interpolate,key:t.key,attributionsCollapsible:t.attributionsCollapsible,zDirection:t.zDirection}),this.generateTileUrlFunction_=this.tileUrlFunction===Yr.prototype.tileUrlFunction,this.tileLoadFunction=t.tileLoadFunction,t.tileUrlFunction&&(this.tileUrlFunction=t.tileUrlFunction),this.urls=null,t.urls?this.setUrls(t.urls):t.url&&this.setUrl(t.url),this.tileLoadingKeys_={}}getTileLoadFunction(){return this.tileLoadFunction}getTileUrlFunction(){return Object.getPrototypeOf(this).tileUrlFunction===this.tileUrlFunction?this.tileUrlFunction.bind(this):this.tileUrlFunction}getUrls(){return this.urls}handleTileChange(t){const e=t.target,i=j(e),s=e.getState();let r;s==P.LOADING?(this.tileLoadingKeys_[i]=!0,r=Fs.TILELOADSTART):i in this.tileLoadingKeys_&&(delete this.tileLoadingKeys_[i],r=s==P.ERROR?Fs.TILELOADERROR:s==P.LOADED?Fs.TILELOADEND:void 0),r!=null&&this.dispatchEvent(new Sd(r,e))}setTileLoadFunction(t){this.tileLoadFunction=t,this.changed()}setTileUrlFunction(t,e){this.tileUrlFunction=t,typeof e<"u"?this.setKey(e):this.changed()}setUrl(t){const e=Cd(t);this.urls=e,this.setUrls(e)}setUrls(t){this.urls=t;const e=t.join(` `);this.generateTileUrlFunction_?this.setTileUrlFunction(Rd(t,this.tileGrid),e):this.setKey(e)}tileUrlFunction(t,e,i){}}class vd extends Yr{constructor(t){super({attributions:t.attributions,cacheSize:t.cacheSize,projection:t.projection,state:t.state,tileGrid:t.tileGrid,tileLoadFunction:t.tileLoadFunction?t.tileLoadFunction:Ld,tilePixelRatio:t.tilePixelRatio,tileUrlFunction:t.tileUrlFunction,url:t.url,urls:t.urls,wrapX:t.wrapX,transition:t.transition,interpolate:t.interpolate!==void 0?t.interpolate:!0,key:t.key,attributionsCollapsible:t.attributionsCollapsible,zDirection:t.zDirection}),this.crossOrigin=t.crossOrigin!==void 0?t.crossOrigin:null,this.tileClass=t.tileClass!==void 0?t.tileClass:sl,this.tileGridForProjection={},this.reprojectionErrorThreshold_=t.reprojectionErrorThreshold,this.renderReprojectionEdges_=!1}getGutterForProjection(t){return this.getProjection()&&t&&!_s(this.getProjection(),t)?0:this.getGutter()}getGutter(){return 0}getKey(){let t=super.getKey();return this.getInterpolate()||(t+=":disable-interpolation"),t}getTileGridForProjection(t){const e=this.getProjection();if(this.tileGrid&&(!e||_s(e,t)))return this.tileGrid;const i=j(t);return i in this.tileGridForProjection||(this.tileGridForProjection[i]=il(t)),this.tileGridForProjection[i]}createTile_(t,e,i,s,r,o){const a=[t,e,i],l=this.getTileCoordForTileUrlFunction(a,r),c=l?this.tileUrlFunction(l,s,r):void 0,h=new this.tileClass(a,c!==void 0?P.IDLE:P.EMPTY,c!==void 0?c:"",this.crossOrigin,this.tileLoadFunction,this.tileOptions);return h.key=o,h.addEventListener(X.CHANGE,this.handleTileChange.bind(this)),h}getTile(t,e,i,s,r){const o=this.getProjection();if(!o||!r||_s(o,r))return this.getTileInternal(t,e,i,s,o||r);const a=[t,e,i],l=this.getKey(),c=this.getTileGridForProjection(o),h=this.getTileGridForProjection(r),u=this.getTileCoordForTileUrlFunction(a,r),d=new rl(o,c,r,h,a,u,this.getTilePixelRatio(s),this.getGutter(),(f,g,m,_)=>this.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=Tt(t);if(i){const s=j(i);s in this.tileGridForProjection||(this.tileGridForProjection[s]=e)}}}function Ld(n,t){n.getImage().src=t}class Ad extends vd{constructor(t){t=t||{};const e=t.projection!==void 0?t.projection:"EPSG:3857",i=t.tileGrid!==void 0?t.tileGrid:ad({extent:Xr(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 Md='© OpenStreetMap contributors.';class bd extends Ad{constructor(t){t=t||{};let e;t.attributions!==void 0?e=t.attributions:e=[Md];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})}}function er(n){return n instanceof Image||n instanceof HTMLCanvasElement||n instanceof HTMLVideoElement||n instanceof ImageBitmap?n:null}const Dd=new Error("disposed"),Pd=[256,256];class Bo extends Wr{constructor(t){const e=P.IDLE;super(t.tileCoord,e,{transition:t.transition,interpolate:t.interpolate}),this.loader_=t.loader,this.data_=null,this.error_=null,this.size_=t.size||null,this.controller_=t.controller||null}getSize(){if(this.size_)return this.size_;const t=er(this.data_);return t?[t.width,t.height]:Pd}getData(){return this.data_}getError(){return this.error_}load(){if(this.state!==P.IDLE&&this.state!==P.ERROR)return;this.state=P.LOADING,this.changed();const t=this;this.loader_().then(function(e){t.data_=e,t.state=P.LOADED,t.changed()}).catch(function(e){t.error_=e,t.state=P.ERROR,t.changed()})}disposeInternal(){this.controller_&&(this.controller_.abort(Dd),this.controller_=null),super.disposeInternal()}}class Od{constructor(t){this.highWaterMark=t!==void 0?t:2048,this.count_=0,this.entries_={},this.oldest_=null,this.newest_=null}deleteOldest(){const t=this.pop();t instanceof zn&&t.dispose()}canExpireCache(){return this.highWaterMark>0&&this.getCount()>this.highWaterMark}expireCache(t){for(;this.canExpireCache();)this.deleteOldest()}clear(){for(;this.oldest_;)this.deleteOldest()}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 q(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 q(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){q(!(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 al{constructor(){this.instructions_=[],this.zIndex=0,this.offset_=0,this.context_=new Proxy(Dn(),{get:(t,e)=>{if(typeof Dn()[e]=="function")return this.push_(e),this.pushMethodArgs_},set:(t,e,i)=>(this.push_(e,i),!0)})}push_(...t){const e=this.instructions_,i=this.zIndex+this.offset_;e[i]||(e[i]=[]),e[i].push(...t)}pushMethodArgs_=(...t)=>(this.push_(t),this);pushFunction(t){this.push_(t)}getContext(){return this.context_}draw(t){this.instructions_.forEach(e=>{for(let i=0,s=e.length;ithis.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()===W.LOADED||e.getState()===W.ERROR)&&this.renderIfReadyAndVisible()}loadImage(t){let e=t.getState();return e!=W.LOADED&&e!=W.ERROR&&t.addEventListener(X.CHANGE,this.boundHandleImageChange_),e==W.IDLE&&(t.load(),e=t.getState()),e==W.LOADED}renderIfReadyAndVisible(){const t=this.getLayer();t&&t.getVisible()&&t.getSourceState()==="ready"&&t.changed()}renderDeferred(t){}disposeInternal(){delete this.layer_,super.disposeInternal()}}const Zo=[];let si=null;function Nd(){si=ot(1,1,void 0,{willReadFrequently:!0})}class ll extends kd{constructor(t){super(t),this.container=null,this.renderedResolution,this.tempTransform=Yt(),this.pixelTransform=Yt(),this.inversePixelTransform=Yt(),this.context=null,this.deferredContext_=null,this.containerReused=!1,this.frameState=null}getImageData(t,e,i){si||Nd(),si.clearRect(0,0,1,1);let s;try{si.drawImage(t,e,i,1,1,0,0,1,1),s=si.getImageData(0,0,1,1).data}catch{return si=null,null}return s}getBackground(t){let i=this.getLayer().getBackground();return typeof i=="function"&&(i=i(t.viewState.resolution)),i||void 0}useContainer(t,e,i){const s=this.getLayer().getClassName();let r,o;if(t&&t.className===s&&(!i||t&&t.style.backgroundColor&&Te(_i(t.style.backgroundColor),_i(i)))){const a=t.firstElementChild;a instanceof HTMLCanvasElement&&(o=a.getContext("2d"))}if(o&&bh(o.canvas.style.transform,e)?(this.container=t,this.context=o,this.containerReused=!0):this.containerReused?(this.container=null,this.context=null,this.containerReused=!1):this.container&&(this.container.style.backgroundColor=null),!this.container){r=document.createElement("div"),r.className=s;let a=r.style;a.position="absolute",a.width="100%",a.height="100%",o=ot();const l=o.canvas;r.appendChild(l),a=l.style,a.position="absolute",a.left="0",a.transformOrigin="top left",this.container=r,this.context=o}!this.containerReused&&i&&!this.container.style.backgroundColor&&(this.container.style.backgroundColor=i)}clipUnrotated(t,e,i){const s=Ye(i),r=Vn(i),o=Un(i),a=Zn(i);ht(e.coordinateToPixelTransform,s),ht(e.coordinateToPixelTransform,r),ht(e.coordinateToPixelTransform,o),ht(e.coordinateToPixelTransform,a);const l=this.inversePixelTransform;ht(l,s),ht(l,r),ht(l,o),ht(l,a),t.save(),t.beginPath(),t.moveTo(Math.round(s[0]),Math.round(s[1])),t.lineTo(Math.round(r[0]),Math.round(r[1])),t.lineTo(Math.round(o[0]),Math.round(o[1])),t.lineTo(Math.round(a[0]),Math.round(a[1])),t.clip()}prepareContainer(t,e){const i=t.extent,s=t.viewState.resolution,r=t.viewState.rotation,o=t.pixelRatio,a=Math.round(J(i)/s*o),l=Math.round(yt(i)/s*o);he(this.pixelTransform,t.size[0]/2,t.size[1]/2,1/o,1/o,r,-a/2,-l/2),Ia(this.inversePixelTransform,this.pixelTransform);const c=Mh(this.pixelTransform);if(this.useContainer(e,c,this.getBackground(t)),!this.containerReused){const h=this.context.canvas;h.width!=a||h.height!=l?(h.width=a,h.height=l):this.context.clearRect(0,0,a,l),c!==h.style.transform&&(h.style.transform=c)}}dispatchRenderEvent_(t,e,i){const s=this.getLayer();if(s.hasListener(t)){const r=new Ja(t,this.inversePixelTransform,i,e);s.dispatchEvent(r)}}preRender(t,e){this.frameState=e,!e.declutter&&this.dispatchRenderEvent_(Ot.PRERENDER,t,e)}postRender(t,e){e.declutter||this.dispatchRenderEvent_(Ot.POSTRENDER,t,e)}renderDeferredInternal(t){}getRenderContext(t){return t.declutter&&!this.deferredContext_&&(this.deferredContext_=new al),t.declutter?this.deferredContext_.getContext():this.context}renderDeferred(t){t.declutter&&(this.dispatchRenderEvent_(Ot.PRERENDER,this.context,t),t.declutter&&this.deferredContext_&&(this.deferredContext_.draw(this.context),this.deferredContext_.clear()),this.renderDeferredInternal(t),this.dispatchRenderEvent_(Ot.POSTRENDER,this.context,t))}getRenderTransform(t,e,i,s,r,o,a){const l=r/2,c=o/2,h=s/e,u=-h,d=-t[0]+a,f=-t[1];return he(this.tempTransform,l,c,h,u,-i,d,f)}disposeInternal(){delete this.frameState,super.disposeInternal()}}function ks(n,t,e,i,s){return`${j(n)},${t},${ed(e,i,s)}`}function Ns(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 Gd(n,t,e){const i=n[e];return i?i.delete(t):!1}function Uo(n,t){const e=n.layerStatesArray[n.layerIndex];e.extent&&(t=Ge(t,xe(e.extent,n.viewState.projection)));const i=e.layer.getRenderSource();if(!i.getWrapX()){const s=i.getTileGridForProjection(n.viewState.projection).getExtent();s&&(t=Ge(t,s))}return t}class zd extends ll{constructor(t,e){super(t),e=e||{},this.extentChanged=!0,this.renderComplete=!1,this.renderedExtent_=null,this.renderedPixelRatio,this.renderedProjection=null,this.renderedTiles=[],this.renderedSourceKey_,this.renderedSourceRevision_,this.tempExtent=Nt(),this.tempTileRange_=new zr(0,0,0,0),this.tempTileCoord_=kn(0,0,0);const i=e.cacheSize!==void 0?e.cacheSize:512;this.tileCache_=new Od(i),this.maxStaleKeys=i*.5}getTileCache(){return this.tileCache_}getOrCreateTile(t,e,i,s){const r=this.tileCache_,a=this.getLayer().getSource(),l=ks(a,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=ht(e.pixelToCoordinateTransform,t.slice()),r=i.getExtent();if(r&&!fi(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()!==P.LOADED)continue;const f=l.getOrigin(h),g=It(l.getTileSize(h)),m=l.getResolution(h);let _;if(d instanceof sl||d instanceof rl)_=d.getImage();else if(d instanceof Bo){if(_=er(d.getData()),!_)continue}else continue;const p=Math.floor(c*((s[0]-f[0])/m-u[1]*g[0])),E=Math.floor(c*((f[1]-s[1])/m-u[2]*g[1])),C=Math.round(c*a.getGutterForProjection(o.projection));return this.getImageData(_,p+C,E+C)}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.renderedSourceRevision_?this.renderedSourceRevision_!==i&&(this.renderedSourceRevision_=i,this.renderedSourceKey_===e.getKey()&&this.tileCache_.clear()):this.renderedSourceRevision_=i,!0}enqueueTiles(t,e,i,s,r){const o=t.viewState,a=this.getLayer(),l=a.getRenderSource(),c=l.getTileGridForProjection(o.projection),h=j(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)),g=o.rotation,m=g?ua(o.center,o.resolution,g,t.size):void 0;for(let _=i;_>=f;--_){const p=c.getTileRangeForExtentAndZ(e,_,this.tempTileRange_),E=c.getResolution(_);for(let C=p.minX;C<=p.maxX;++C)for(let y=p.minY;y<=p.maxY;++y){if(g&&!c.tileCoordIntersectsViewport([_,C,y],m))continue;const x=this.getTile(_,C,y,t);if(!x||!Ns(s,x,_))continue;const T=x.getKey();if(u[T]=!0,x.getState()===P.IDLE&&!t.tileQueue.isKeyQueued(T)){const I=kn(_,C,y,this.tempTileCoord_);t.tileQueue.enqueue([x,h,c.getTileCoordCenter(I),E])}}}}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,v,d-1,T,I-1)},0),!(d in T))return this.container;const L=j(this),k=t.time;for(const O of T[d]){const K=O.getState();if(K===P.EMPTY)continue;const B=O.tileCoord;if(K===P.LOADED&&O.getAlpha(L,k)===1){O.endTransition(L);continue}if(K!==P.ERROR&&(this.renderComplete=!1),this.findStaleTile_(B,T)){Gd(T,O,d),t.animate=!0;continue}if(this.findAltTiles_(u,B,d+1,T))continue;const ut=u.getMinZoom();for(let _t=d-1;_t>=ut&&!this.findAltTiles_(u,B,_t,T);--_t);}const b=f/o*l/_,A=this.getRenderContext(t);he(this.tempTransform,p/2,E/2,b,b,0,-p/2,-E/2),i.extent&&this.clipUnrotated(A,t,C),h.getInterpolate()||(A.imageSmoothingEnabled=!1),this.preRender(A,t);const M=Object.keys(T).map(Number);M.sort(re);let Y;const F=[],G=[];for(let O=M.length-1;O>=0;--O){const K=M[O],B=h.getTilePixelSize(K,l,r),S=u.getResolution(K)/f,ut=B[0]*S*b,_t=B[1]*S*b,st=u.getTileCoordForCoordAndZ(Ye(R),K),St=u.getTileCoordExtent(st),dt=ht(this.tempTransform,[_*(St[0]-R[0])/f,_*(R[3]-St[3])/f]),Bt=_*h.getGutterForProjection(r);for(const Gt of T[K]){if(Gt.getState()!==P.LOADED)continue;const vt=Gt.tileCoord,cn=st[1]-vt[1],as=Math.round(dt[0]-(cn-1)*ut),wi=st[2]-vt[2],Se=Math.round(dt[1]-(wi-1)*_t),At=Math.round(dt[0]-cn*ut),Zt=Math.round(dt[1]-wi*_t),Be=as-At,Ze=Se-Zt,Ri=M.length===1;let ve=!1;Y=[At,Zt,At+Be,Zt,At+Be,Zt+Ze,At,Zt+Ze];for(let Ue=0,Ve=F.length;Ue{const Q=j(h),S=B.wantedTiles[Q],ut=S?Object.keys(S).length:0;this.updateCacheSize(ut),this.tileCache_.expireCache()};t.postRenderFunctions.push(O)}return 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 Bo){if(c=er(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=j(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=j(e);s in t||(t[s]={}),t[s][i.getKey()]=!0}}const Rn={PRELOAD:"preload",USE_INTERIM_TILES_ON_ERROR:"useInterimTilesOnError"};class Xd extends es{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)}}class Wd extends Xd{constructor(t){super(t)}createRenderer(){return new zd(this,{cacheSize:this.getCacheSize()})}}class Wi 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 Wi(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,X.CHANGE,this.handleGeometryChange_,this)),this.changed()}setGeometry(t){this.set(this.geometryName_,t)}setStyle(t){this.style_=t,this.styleFunction_=t?Yd(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 Yd(n){if(typeof n=="function")return n;let t;return Array.isArray(n)?t=n:(q(typeof n.getZIndex=="function","Expected an `ol/style/Style` or an array of `ol/style/Style.js`"),t=[n]),function(){return t}}function ir(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 _=t+i;_1?o:2,r=r||new Array(o);for(let h=0;h>1;su*this.pixelRatio_),lineDashOffset:(o||ae)*this.pixelRatio_,lineJoin:a!==void 0?a:pi,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(),m=i.getLineDash(),_=i.getLineDashOffset(),p=i.getLineJoin(),E=i.getWidth(),C=i.getMiterLimit();this.textStrokeState_={lineCap:g!==void 0?g:mi,lineDash:m||oe,lineDashOffset:_||ae,lineJoin:p!==void 0?p:pi,lineWidth:E!==void 0?E:Ji,miterLimit:C!==void 0?C: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:Ka,textAlign:u!==void 0?u:$i,textBaseline:d!==void 0?d:Pn},this.text_=h!==void 0?Array.isArray(h)?h.reduce((f,g,m)=>f+=m%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 Zd=.5,ul={Point:Qd,LineString:qd,Polygon:ef,MultiPoint:tf,MultiLineString:$d,MultiPolygon:Jd,GeometryCollection:Hd,Circle:Vd};function Ud(n,t){return parseInt(j(n),10)-parseInt(j(t),10)}function Vo(n,t){const e=dl(n,t);return e*e}function dl(n,t){return Zd*n/t}function Vd(n,t,e,i,s){const r=e.getFill(),o=e.getStroke();if(r||o){const l=n.getBuilder(e.getZIndex(),"Circle");l.setFillStrokeStyle(r,o),l.drawCircle(t,i,s)}const a=e.getText();if(a&&a.getText()){const l=n.getBuilder(e.getZIndex(),"Text");l.setTextStyle(a),l.drawText(t,i)}}function jo(n,t,e,i,s,r,o,a){const l=[],c=e.getImage();if(c){let d=!0;const f=c.getImageState();f==W.LOADED||f==W.ERROR?d=!1:f==W.IDLE&&c.load(),d&&l.push(c.ready())}const h=e.getFill();h&&h.loading()&&l.push(h.ready());const u=l.length>0;return u&&Promise.all(l).then(()=>s(null)),jd(n,t,e,i,r,o,a),u}function jd(n,t,e,i,s,r,o){const a=e.getGeometryFunction()(t);if(!a)return;const l=a.simplifyTransformed(i,s);if(e.getRenderer())fl(n,l,e,t,o);else{const h=ul[l.getType()];h(n,l,e,t,o,r)}}function fl(n,t,e,i,s){if(t.getType()=="GeometryCollection"){const o=t.getGeometries();for(let a=0,l=o.length;a=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 Ho(n,t){return function(e,i,s,r,o){sf(n,t,e,i,s,(a,l)=>{this.addFeatures(a),r!==void 0&&r(a)},()=>{this.changed(),o!==void 0&&o()})}}function rf(n,t){return[[-1/0,-1/0,1/0,1/0]]}function of(n,t,e,i){const s=[];let r=Nt();for(let o=0,a=e.length;o{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=Jn(i,0,this.simplifiedGeometry_.flatCoordinates_.length,this.simplifiedGeometry_.stride_,t,i,0),s=[i.length];break;case"MultiLineString":s=[],i.length=Kh(i,0,this.simplifiedGeometry_.ends_,this.simplifiedGeometry_.stride_,t,i,0,s);break;case"Polygon":s=[],i.length=va(i,0,this.simplifiedGeometry_.ends_,this.simplifiedGeometry_.stride_,Math.sqrt(t),i,0,s);break}return s&&(this.simplifiedGeometry_=new Xt(this.type_,i,s,2,this.properties_,this.id_)),this.squaredTolerance_=t,this.simplifiedGeometry_}),this}}Xt.prototype.getFlatCoordinates=Xt.prototype.getOrientedFlatCoordinates;class $o{constructor(t){this.rbush_=new Na(t),this.items_={}}insert(t,e){const i={minX:t[0],minY:t[1],maxX:t[2],maxY:t[3],value:e};this.rbush_.insert(i),this.items_[j(e)]=i}load(t,e){const i=new Array(e.length);for(let s=0,r=e.length;s{e||(e=!0,this.addFeature(i.element),e=!1)}),t.addEventListener(Et.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_){this.featuresRtree_.forEach(i=>{this.removeFeatureInternal(i)});for(const i in this.nullGeometryFeatures_)this.removeFeatureInternal(this.nullGeometryFeatures_[i])}this.featuresCollection_&&this.featuresCollection_.clear(),this.featuresRtree_&&this.featuresRtree_.clear(),this.nullGeometryFeatures_={};const e=new ge(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 Xt||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 Xt||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(),di(this.nullGeometryFeatures_)||Xn(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=fa(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||Yi,this.featuresRtree_.forEachInExtent(l,function(c){if(e(c)){const h=c.getGeometry(),u=a;if(a=h instanceof Xt?0:h.closestPointXY(i,s,o,a),a{--this.loadingExtentsCount_,this.dispatchEvent(new ge(Pt.FEATURESLOADEND,void 0,h))},()=>{--this.loadingExtentsCount_,this.dispatchEvent(new ge(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_,i=e.forEachInExtent(t,function(s){if(Bi(s.extent,t))return s});i&&e.remove(i)}removeFeatures(t){let e=!1;for(let i=0,s=t.length;il&&(this.instructions.push([D.CUSTOM,l,h,t,i,Oe,r]),this.hitDetectionInstructions.push([D.CUSTOM,l,h,t,s||i,Oe,r]));break;case"Point":c=t.getFlatCoordinates(),this.coordinates.push(c[0],c[1]),h=this.coordinates.length,this.instructions.push([D.CUSTOM,l,h,t,i,void 0,r]),this.hitDetectionInstructions.push([D.CUSTOM,l,h,t,s||i,void 0,r]);break}this.endGeometry(e)}beginGeometry(t,e,i){this.beginGeometryInstruction1_=[D.BEGIN_GEOMETRY,e,0,t,i],this.instructions.push(this.beginGeometryInstruction1_),this.beginGeometryInstruction2_=[D.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=e.lineWidth,this.bufferedMaxExtent_=null)}else e.strokeStyle=void 0,e.lineCap=void 0,e.lineDash=null,e.lineDashOffset=void 0,e.lineJoin=void 0,e.lineWidth=void 0,e.miterLimit=void 0;return e}setFillStrokeStyle(t,e){const i=this.state;this.fillStyleToState(t,i),this.strokeStyleToState(e,i)}createFill(t){const e=t.fillStyle,i=[D.SET_FILL_STYLE,e];return typeof e!="string"&&i.push(t.fillPatternScale),i}applyStroke(t){this.instructions.push(this.createStroke(t))}createStroke(t){return[D.SET_STROKE_STYLE,t.strokeStyle,t.lineWidth*this.pixelRatio,t.lineCap,t.lineJoin,t.miterLimit,t.lineDash?this.applyPixelRatio(t.lineDash):null,t.lineDashOffset*this.pixelRatio]}updateFillStyle(t,e){const i=t.fillStyle;(typeof i!="string"||t.currentFillStyle!=i)&&(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&&!Te(t.currentLineDash,r)||t.currentLineDashOffset!=o||t.currentLineJoin!=a||t.currentLineWidth!=l||t.currentMiterLimit!=c)&&(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=[D.END_GEOMETRY,t];this.instructions.push(e),this.hitDetectionInstructions.push(e)}getBufferedMaxExtent(){if(!this.bufferedMaxExtent_&&(this.bufferedMaxExtent_=oa(this.maxExtent),this.maxLineWidth>0)){const t=this.resolution*(this.maxLineWidth+1)/2;rr(this.bufferedMaxExtent_,t,this.bufferedMaxExtent_)}return this.bufferedMaxExtent_}}class lf extends hn{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&&!fi(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([D.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([D.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,m=Lt(c,u,g),_=Lt(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 uf(n,t,e,i,s){let r=e,o=e,a=0,l=0,c=e,h,u,d,f,g,m,_,p,E,C;for(u=e;un&&(l>a&&(a=l,r=c,o=u),l=0,c=u-s)),d=f,_=E,p=C),g=y,m=x}return l+=f,l>a?[c,u]:[r,o]}const Gn={left:0,center:.5,right:1,top:0,middle:.5,hanging:.2,alphabetic:.8,ideographic:.8,bottom:1};class df extends hn{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.textKeepUpright_=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(!wt(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 _=t.getEndss();d=[];for(let p=0,E=_.length;p{const T=a[(y+R)*2]===h[R*u]&&a[(y+R)*2+1]===h[R*u+1];return T||--y,T})}this.saveTextStates_();const g=o.backgroundFill?this.createFill(this.fillStyleToState(o.backgroundFill)):null,m=o.backgroundStroke?this.createStroke(this.strokeStyleToState(o.backgroundStroke)):null;this.beginGeometry(t,e,i);let _=o.padding;if(_!=ke&&(o.scale[0]<0||o.scale[1]<0)){let y=o.padding[0],x=o.padding[1],R=o.padding[2],T=o.padding[3];o.scale[0]<0&&(x=-x,T=-T),o.scale[1]<0&&(y=-y,R=-R),_=[y,x,R,T]}const p=this.pixelRatio;this.instructions.push([D.DRAW_IMAGE,l,f,null,NaN,NaN,NaN,1,0,0,this.textRotateWithView_,this.textRotation_,[1,1],NaN,this.declutterMode_,this.declutterImageWithText_,_==ke?ke:_.map(function(y){return y*p}),g,m,this.text_,this.textKey_,this.strokeKey_,this.fillKey_,this.textOffsetX_,this.textOffsetY_,d]);const E=1/p,C=g?g.slice(0):null;C&&(C[1]=Ct),this.hitDetectionInstructions.push([D.DRAW_IMAGE,l,f,null,NaN,NaN,NaN,1,0,0,this.textRotateWithView_,this.textRotation_,[E,E],NaN,this.declutterMode_,this.declutterImageWithText_,_,C,m,this.text_,this.textKey_,this.strokeKey_,this.fillKey_?Ct:this.fillKey_,this.textOffsetX_,this.textOffsetY_,d]),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||Pn,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=Gn[s.textBaseline],h=this.textOffsetY_*l,u=this.text_,d=i?i.lineWidth*Math.abs(s.scale[0])/2:0;this.instructions.push([D.DRAW_CHARS,t,e,c,s.overflow,a,s.maxAngle,l,h,r,d*l,u,o,1,this.declutterMode_,this.textKeepUpright_]),this.hitDetectionInstructions.push([D.DRAW_CHARS,t,e,c,s.overflow,a&&Ct,s.maxAngle,l,h,r,d*l,u,o,1/l,this.declutterMode_,this.textKeepUpright_])}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 m=a.getLineDash(),_=a.getLineDashOffset(),p=a.getWidth(),E=a.getMiterLimit();r.lineCap=a.getLineCap()||mi,r.lineDash=m?m.slice():oe,r.lineDashOffset=_===void 0?ae:_,r.lineJoin=a.getLineJoin()||pi,r.lineWidth=p===void 0?Ji:p,r.miterLimit=E===void 0?Hi:E,r.strokeStyle=qt(a.getColor()||qi)}i=this.textState_;const l=t.getFont()||Ka;Lu(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()||Pn,i.backgroundFill=t.getBackgroundFill(),i.backgroundStroke=t.getBackgroundStroke(),i.padding=t.getPadding()||ke,i.scale=c===void 0?[1,1]:c;const h=t.getOffsetX(),u=t.getOffsetY(),d=t.getRotateWithView(),f=t.getKeepUpright(),g=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.textKeepUpright_=f===void 0?!0:f,this.textRotation_=g===void 0?0:g,this.strokeKey_=r?(typeof r.strokeStyle=="string"?r.strokeStyle:j(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:"|"+j(s.fillStyle):""}this.declutterMode_=t.getDeclutterMode(),this.declutterImageWithText_=e}}const ff={Circle:Qo,Default:hn,Image:lf,LineString:hf,Polygon:Qo,Text:df};class gf{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=ff[e];r=new o(this.tolerance_,this.maxExtent_,this.resolution_,this.pixelRatio_),s[e]=r}return r}}function _f(n,t,e,i,s,r,o,a,l,c,h,u,d=!0){let f=n[t],g=n[t+1],m=0,_=0,p=0,E=0;function C(){m=f,_=g,t+=i,f=n[t],g=n[t+1],E+=p,p=Math.sqrt((f-m)*(f-m)+(g-_)*(g-_))}do C();while(tG[2]}else b=x>L;const A=Math.PI,M=[],Y=T+i===t;t=T,p=0,E=I,f=n[t],g=n[t+1];let F;if(Y){C(),F=Math.atan2(g-_,f-m),b&&(F+=F>0?-A:A);const G=(L+x)/2,O=(k+R)/2;return M[0]=[G,O,(v-r)/2,F,s],M}s=s.replace(/\n/g," ");for(let G=0,O=s.length;G0?-A:A),F!==void 0){let st=K-F;if(st+=st>A?-2*A:st<-A?2*A:0,Math.abs(st)>o)return null}F=K;const B=G;let Q=0;for(;G0&&n.push(` diff --git a/src/static/app/dist/assets/peerAddModal-Dbk6LNS2.js b/src/static/app/dist/assets/peerAddModal-Emzzfw1d.js similarity index 94% rename from src/static/app/dist/assets/peerAddModal-Dbk6LNS2.js rename to src/static/app/dist/assets/peerAddModal-Emzzfw1d.js index 286bd93..c2e5db0 100644 --- a/src/static/app/dist/assets/peerAddModal-Dbk6LNS2.js +++ b/src/static/app/dist/assets/peerAddModal-Emzzfw1d.js @@ -1 +1 @@ -import{_ as k,h as y,c as d,f as i,a as e,m as h,b as o,e as w,y as f,n as _,W as $,D as I,v as A,w as U,F as C,i as L,t as S,T as j,C as E,d as g,G as T,r as O,g as V,M as F,K as G,q as D,H as R,k as K,z as q}from"./index-BaGiSoQe.js";import{L as p}from"./localeText-DkjxgEQB.js";const W={name:"endpointAllowedIps",components:{LocaleText:p},props:{data:Object,saving:Boolean},setup(){const l=$(),t=I();return{store:l,dashboardStore:t}},data(){return{endpointAllowedIps:JSON.parse(JSON.stringify(this.data.endpoint_allowed_ip)),error:!1}},methods:{checkAllowedIP(){let l=this.endpointAllowedIps.split(",").map(t=>t.replaceAll(" ",""));for(let t in l)if(!this.store.checkCIDR(l[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()}}},J={for:"peer_endpoint_allowed_ips",class:"form-label"},z={class:"text-muted"},H=["disabled"];function Q(l,t,n,r,c,v){const s=y("LocaleText");return i(),d("div",null,[e("label",J,[e("small",z,[o(s,{t:"Endpoint Allowed IPs"}),t[2]||(t[2]=w()),e("code",null,[o(s,{t:"(Required)"})])])]),h(e("input",{type:"text",class:_(["form-control form-control-sm rounded-3",{"is-invalid":c.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,H),[[f,this.endpointAllowedIps]])])}const Y=k(W,[["render",Q]]),Z={name:"allowedIPsInput",components:{LocaleText:p},props:{data:Object,saving:Boolean,bulk:Boolean,availableIp:void 0},data(){return{allowedIp:[],availableIpSearchString:"",customAvailableIp:"",allowedIpFormatError:!1}},setup(l){const t=$(),n=I(),r=O("");return Object.keys(l.availableIp).length>0&&(r.value=Object.keys(l.availableIp)[0]),{store:t,dashboardStore:n,selectedSubnet:r}},computed:{searchAvailableIps(){return this.availableIpSearchString?this.availableIp[this.selectedSubnet].filter(l=>l.includes(this.availableIpSearchString)&&!this.data.allowed_ips.includes(l)):this.availableIp[this.selectedSubnet].filter(l=>!this.data.allowed_ips.includes(l))},inputGetLocale(){return T("Enter IP Address/CIDR")}},methods:{addAllowedIp(l){let t=l.split(",");for(let n=0;n0&&this.data.allowed_ips.length===0)for(let l in this.availableIp)this.availableIp[l].length>0&&this.addAllowedIp(this.availableIp[l][0])}},X={class:"d-flex flex-column flex-md-row mb-2"},ee={for:"peer_allowed_ip_textbox",class:"form-label mb-0"},te={class:"text-muted"},se={class:"form-check form-switch ms-md-auto"},ae={class:"form-check-label",for:"disableIPValidation"},le={class:"d-flex"},oe=["onClick"],ie={class:"d-flex gap-2 align-items-center"},de={class:"input-group"},ne=["placeholder","disabled"],re=["disabled"],ce={class:"text-muted"},ue={class:"dropdown flex-grow-1"},pe=["disabled"],he={key:0,class:"dropdown-menu mt-2 shadow w-100 dropdown-menu-end rounded-3 pb-0",style:{width:"300px !important"}},be={class:"px-3 d-flex gap-3 align-items-center"},me={class:"px-3 overflow-x-scroll d-flex overflow-x-scroll overflow-y-hidden align-items-center gap-2"},_e=["onClick"],ve={class:"overflow-y-scroll",style:{height:"270px"}},fe=["onClick"],ke={class:"me-auto"},ye={key:0,class:"px-3 py-2"},ge={key:0,class:"text-muted"},we={key:1,class:"text-muted"};function xe(l,t,n,r,c,v){const s=y("LocaleText");return i(),d("div",{class:_({inactiveField:this.bulk})},[e("div",X,[e("label",ee,[e("small",te,[o(s,{t:"Allowed IPs"}),t[5]||(t[5]=w()),e("code",null,[o(s,{t:"(Required)"})])])]),e("div",se,[h(e("input",{class:"form-check-input",type:"checkbox","onUpdate:modelValue":t[0]||(t[0]=a=>this.data.allowed_ips_validation=a),role:"switch",id:"disableIPValidation"},null,512),[[A,this.data.allowed_ips_validation]]),e("label",ae,[e("small",null,[o(s,{t:"Allowed IPs Validation"})])])])]),e("div",le,[e("div",{class:_(["d-flex gap-2 flex-wrap",{"mb-2":this.data.allowed_ips.length>0}])},[o(j,{name:"list"},{default:U(()=>[(i(!0),d(C,null,L(this.data.allowed_ips,(a,u)=>(i(),d("span",{class:"badge rounded-pill text-bg-success",key:a},[w(S(a)+" ",1),e("a",{role:"button",onClick:P=>this.data.allowed_ips.splice(u,1)},t[6]||(t[6]=[e("i",{class:"bi bi-x-circle-fill ms-1"},null,-1)]),8,oe)]))),128))]),_:1})],2)]),e("div",ie,[e("div",de,[h(e("input",{type:"text",class:_(["form-control form-control-sm rounded-start-3",{"is-invalid":this.allowedIpFormatError}]),placeholder:this.inputGetLocale,onKeyup:t[1]||(t[1]=E(a=>this.customAvailableIp?this.addAllowedIp(this.customAvailableIp):void 0,["enter"])),"onUpdate:modelValue":t[2]||(t[2]=a=>c.customAvailableIp=a),id:"peer_allowed_ip_textbox",disabled:n.bulk},null,42,ne),[[f,c.customAvailableIp]]),e("button",{class:_(["btn btn-sm rounded-end-3",[this.customAvailableIp?"btn-success":"btn-outline-success"]]),disabled:n.bulk||!this.customAvailableIp,onClick:t[3]||(t[3]=a=>this.addAllowedIp(this.customAvailableIp)),type:"button",id:"button-addon2"},t[7]||(t[7]=[e("i",{class:"bi bi-plus-lg"},null,-1)]),10,re)]),e("small",ce,[o(s,{t:"or"})]),e("div",ue,[e("button",{class:"btn btn-outline-secondary btn-sm dropdown-toggle rounded-3 w-100",disabled:!n.availableIp||n.bulk,"data-bs-auto-close":"outside",type:"button","data-bs-toggle":"dropdown","aria-expanded":"false"},[t[8]||(t[8]=e("i",{class:"bi bi-filter-circle me-2"},null,-1)),o(s,{t:"Pick Available IP"})],8,pe),this.availableIp?(i(),d("ul",he,[e("li",null,[e("div",be,[t[9]||(t[9]=e("label",{for:"availableIpSearchString",class:"text-muted"},[e("i",{class:"bi bi-search"})],-1)),h(e("input",{id:"availableIpSearchString",class:"form-control form-control-sm rounded-3","onUpdate:modelValue":t[4]||(t[4]=a=>this.availableIpSearchString=a)},null,512),[[f,this.availableIpSearchString]])]),t[11]||(t[11]=e("hr",{class:"my-2"},null,-1)),e("div",me,[t[10]||(t[10]=e("small",{class:"text-muted"},"Subnet",-1)),(i(!0),d(C,null,L(Object.keys(this.availableIp),a=>(i(),d("button",{key:a,onClick:u=>this.selectedSubnet=a,class:_([{"bg-primary-subtle":this.selectedSubnet===a},"btn btn-sm text-primary-emphasis rounded-3"])},S(a),11,_e))),128))]),t[12]||(t[12]=e("hr",{class:"mt-2 mb-0"},null,-1))]),e("li",null,[e("div",ve,[(i(!0),d(C,null,L(this.searchAvailableIps,a=>(i(),d("div",{style:{},key:a},[e("a",{class:"dropdown-item d-flex",role:"button",onClick:u=>this.addAllowedIp(a)},[e("span",ke,[e("small",null,S(a),1)])],8,fe)]))),128)),this.searchAvailableIps.length===0?(i(),d("div",ye,[this.availableIpSearchString?(i(),d("small",ge,[o(s,{t:"No available IP containing"}),w('"'+S(this.availableIpSearchString)+'"',1)])):(i(),d("small",we,[o(s,{t:"No more IP address available in this subnet"})]))])):g("",!0)])])])):g("",!0)])])],2)}const $e=k(Z,[["render",xe],["__scopeId","data-v-ed72944d"]]),Ie={name:"dnsInput",components:{LocaleText:p},props:{data:Object,saving:Boolean},data(){return{error:!1,dns:JSON.parse(JSON.stringify(this.data.DNS))}},setup(){const l=$(),t=I();return{store:l,dashboardStore:t}},methods:{checkDNS(){if(this.dns){let l=this.dns.split(",").map(t=>t.replaceAll(" ",""));for(let t in l)if(!this.store.regexCheckIP(l[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()}}},Ae={for:"peer_DNS_textbox",class:"form-label"},Pe={class:"text-muted"},Se=["disabled"];function Ke(l,t,n,r,c,v){const s=y("LocaleText");return i(),d("div",null,[e("label",Ae,[e("small",Pe,[o(s,{t:"DNS"})])]),h(e("input",{type:"text",class:_(["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,Se),[[f,this.dns]])])}const Ce=k(Ie,[["render",Ke]]),Oe={name:"nameInput",components:{LocaleText:p},props:{bulk:Boolean,data:Object,saving:Boolean}},Le={for:"peer_name_textbox",class:"form-label"},Ne={class:"text-muted"},De=["disabled"];function Te(l,t,n,r,c,v){const s=y("LocaleText");return i(),d("div",{class:_({inactiveField:this.bulk})},[e("label",Le,[e("small",Ne,[o(s,{t:"Name"})])]),h(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,De),[[f,this.data.name]])],2)}const Ve=k(Oe,[["render",Te]]),Be={name:"privatePublicKeyInput",components:{LocaleText:p},props:{data:Object,saving:Boolean,bulk:Boolean},setup(){const l=I(),t=$();return{dashboardStore:l,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(l){return/^[A-Za-z0-9+/]{43}=?=?$/.test(l)},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()}}}},Me={for:"peer_private_key_textbox",class:"form-label"},Ue={class:"text-muted"},je={class:"input-group"},Ee=["disabled"],Fe=["disabled"],Ge={class:"d-flex flex-column flex-md-row mb-2"},Re={for:"public_key",class:"form-label mb-0"},qe={class:"text-muted"},We={class:"form-check form-switch ms-md-auto"},Je=["disabled"],ze={class:"form-check-label",for:"enablePublicKeyEdit"},He=["disabled"];function Qe(l,t,n,r,c,v){const s=y("LocaleText");return i(),d("div",{class:_(["d-flex gap-2 flex-column",{inactiveField:this.bulk}])},[e("div",null,[e("label",Me,[e("small",Ue,[o(s,{t:"Private Key"}),t[6]||(t[6]=w()),e("code",null,[o(s,{t:"(Required for QR Code and Download)"})])])]),e("div",je,[h(e("input",{type:"text",class:_(["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,Ee),[[f,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[7]||(t[7]=[e("i",{class:"bi bi-arrow-repeat"},null,-1)]),8,Fe)])]),e("div",null,[e("div",Ge,[e("label",Re,[e("small",qe,[o(s,{t:"Public Key"}),t[8]||(t[8]=w()),e("code",null,[o(s,{t:"(Required)"})])])]),e("div",We,[h(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,Je),[[A,this.editKey]]),e("label",ze,[e("small",null,[o(s,{t:"Use your own Private and Public Key"})])])])]),h(e("input",{class:_(["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,He),[[f,this.keypair.publicKey]])])],2)}const Ye=k(Be,[["render",Qe]]),Ze={name:"bulkAdd",components:{LocaleText:p},props:{saving:Boolean,data:Object,availableIp:void 0},data(){return{numberOfAvailableIPs:null}},computed:{bulkAddGetLocale(){return T("How many peers you want to add?")},getNumberOfAvailableIPs(){return this.numberOfAvailableIPs?Object.values(this.numberOfAvailableIPs).reduce((l,t)=>l+t):"..."}},watch:{"data.bulkAdd":{immediate:!0,handler(l){l&&V("/api/getNumberOfAvailableIPs/"+this.$route.params.id,{},t=>{t.status&&(this.numberOfAvailableIPs=t.data)})}}}},Xe={class:"form-check form-switch"},et=["disabled"],tt={class:"form-check-label me-2",for:"bulk_add"},st={class:"text-muted d-block"},at={key:0,class:"form-group"},lt=["max","placeholder"],ot={class:"text-muted"};function it(l,t,n,r,c,v){const s=y("LocaleText");return i(),d("div",null,[e("div",Xe,[h(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,et),[[A,this.data.bulkAdd]]),e("label",tt,[e("small",null,[e("strong",null,[o(s,{t:"Bulk Add"})])])])]),e("p",{class:_({"mb-0":!this.data.bulkAdd})},[e("small",st,[o(s,{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?(i(),d("div",at,[h(e("input",{class:"form-control form-control-sm rounded-3 mb-1",type:"number",min:"1",id:"bulk_add_count",max:this.availableIp.length,"onUpdate:modelValue":t[1]||(t[1]=a=>this.data.bulkAddAmount=a),placeholder:this.bulkAddGetLocale},null,8,lt),[[f,this.data.bulkAddAmount]]),e("small",ot,[o(s,{t:"You can add up to "+v.getNumberOfAvailableIPs+" peers"},null,8,["t"])])])):g("",!0)])}const dt=k(Ze,[["render",it]]),nt={name:"presharedKeyInput",components:{LocaleText:p},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=""}}},rt={class:"d-flex align-items-start"},ct={for:"peer_preshared_key_textbox",class:"form-label"},ut={class:"text-muted"},pt={class:"form-check form-switch ms-auto"},ht=["disabled"];function bt(l,t,n,r,c,v){const s=y("LocaleText");return i(),d("div",null,[e("div",rt,[e("label",ct,[e("small",ut,[o(s,{t:"Pre-Shared Key"})])]),e("div",pt,[h(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),[[A,this.enable]])])]),h(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,ht),[[f,this.data.preshared_key]])])}const mt=k(nt,[["render",bt]]),_t={name:"mtuInput",components:{LocaleText:p},props:{data:Object,saving:Boolean}},vt={for:"peer_mtu",class:"form-label"},ft={class:"text-muted"},kt=["disabled"];function yt(l,t,n,r,c,v){const s=y("LocaleText");return i(),d("div",null,[e("label",vt,[e("small",ft,[o(s,{t:"MTU"})])]),h(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,kt),[[f,this.data.mtu]])])}const gt=k(_t,[["render",yt]]),wt={name:"persistentKeepAliveInput",components:{LocaleText:p},props:{data:Object,saving:Boolean}},xt={for:"peer_keep_alive",class:"form-label"},$t={class:"text-muted"},It=["disabled"];function At(l,t,n,r,c,v){const s=y("LocaleText");return i(),d("div",null,[e("label",xt,[e("small",$t,[o(s,{t:"Persistent Keepalive"})])]),h(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,It),[[f,this.data.keepalive]])])}const Pt=k(wt,[["render",At]]),St={class:"peerSettingContainer w-100 h-100 position-absolute top-0 start-0 overflow-y-scroll",ref:"editConfigurationContainer"},Kt={class:"container d-flex h-100 w-100"},Ct={class:"m-auto modal-dialog-centered dashboardModal",style:{width:"1000px"}},Ot={class:"card rounded-3 shadow flex-grow-1"},Lt={class:"card-header bg-transparent d-flex align-items-center gap-2 border-0 p-4"},Nt={class:"mb-0"},Dt={class:"card-body px-4 pb-4"},Tt={class:"d-flex flex-column gap-2"},Vt={class:"accordion mb-3",id:"peerAddModalAccordion"},Bt={class:"accordion-item"},Mt={class:"accordion-header"},Ut={class:"accordion-button collapsed rounded-3",type:"button","data-bs-toggle":"collapse","data-bs-target":"#peerAddModalAccordionAdvancedOptions"},jt={id:"peerAddModalAccordionAdvancedOptions",class:"accordion-collapse collapse collapsed","data-bs-parent":"#peerAddModalAccordion"},Et={class:"accordion-body rounded-bottom-3"},Ft={class:"d-flex flex-column gap-2"},Gt={class:"row gy-3"},Rt={key:0,class:"col-sm"},qt={class:"col-sm"},Wt={class:"col-sm"},Jt={key:1,class:"col-12"},zt={class:"form-check form-switch"},Ht={class:"form-check-label",for:"bullAdd_PresharedKey_Switch"},Qt={class:"fw-bold"},Yt={class:"d-flex mt-2"},Zt=["disabled"],Xt={key:0,class:"bi bi-plus-circle-fill me-2"},ss={__name:"peerAddModal",emits:["close","addedPeers"],async setup(l,{emit:t}){let n,r;const c=I(),v=$(),s=O({bulkAdd:!1,bulkAddAmount:0,name:"",allowed_ips:[],private_key:"",public_key:"",DNS:c.Configuration.Peers.peer_global_dns,endpoint_allowed_ip:c.Configuration.Peers.peer_endpoint_allowed_ip,keepalive:parseInt(c.Configuration.Peers.peer_keep_alive),mtu:parseInt(c.Configuration.Peers.peer_mtu),preshared_key:"",preshared_key_bulkAdd:!1,advanced_security:"off",allowed_ips_validation:!0}),a=O([]),u=O(!1),P=F();[n,r]=G(()=>V("/api/getAvailableIPs/"+P.params.id,{},m=>{m.status&&(a.value=m.data)})),await n,r();const N=t;D(()=>v.Configurations.find(m=>m.Name===P.params.id).Protocol);const B=D(()=>{let m=!0;return s.value.bulkAdd?(s.value.bulkAddAmount.length===0||s.value.bulkAddAmount>a.value.length)&&(m=!1):["allowed_ips","private_key","public_key","endpoint_allowed_ip","keepalive","mtu"].forEach(x=>{s.value[x].length===0&&(m=!1)}),m}),M=()=>{u.value=!0,q("/api/addPeers/"+P.params.id,s.value,m=>{m.status?(c.newMessage("Server","Peer created successfully","success"),N("addedPeers")):c.newMessage("Server",m.message,"danger"),u.value=!1})};return R(()=>s.value.bulkAddAmount,()=>{s.value.bulkAddAmount>a.value.length&&(s.value.bulkAddAmount=a.value.length)}),(m,b)=>(i(),d("div",St,[e("div",Kt,[e("div",Ct,[e("div",Ot,[e("div",Lt,[e("h4",Nt,[o(p,{t:"Add Peers"})]),e("button",{type:"button",class:"btn-close ms-auto",onClick:b[0]||(b[0]=x=>N("close"))})]),e("div",Dt,[e("div",Tt,[o(dt,{saving:u.value,data:s.value,availableIp:a.value},null,8,["saving","data","availableIp"]),s.value.bulkAdd?g("",!0):(i(),d(C,{key:0},[b[3]||(b[3]=e("hr",{class:"mb-0 mt-2"},null,-1)),o(Ve,{saving:u.value,data:s.value},null,8,["saving","data"]),o(Ye,{saving:u.value,data:s.value},null,8,["saving","data"]),o($e,{availableIp:a.value,saving:u.value,data:s.value},null,8,["availableIp","saving","data"])],64))]),b[5]||(b[5]=e("hr",null,null,-1)),e("div",Vt,[e("div",Bt,[e("h2",Mt,[e("button",Ut,[o(p,{t:"Advanced Options"})])]),e("div",jt,[e("div",Et,[e("div",Ft,[o(Ce,{saving:u.value,data:s.value},null,8,["saving","data"]),o(Y,{saving:u.value,data:s.value},null,8,["saving","data"]),e("div",Gt,[s.value.bulkAdd?g("",!0):(i(),d("div",Rt,[o(mt,{saving:u.value,data:s.value,bulk:s.value.bulkAdd},null,8,["saving","data","bulk"])])),e("div",qt,[o(gt,{saving:u.value,data:s.value},null,8,["saving","data"])]),e("div",Wt,[o(Pt,{saving:u.value,data:s.value},null,8,["saving","data"])]),s.value.bulkAdd?(i(),d("div",Jt,[e("div",zt,[h(e("input",{class:"form-check-input",type:"checkbox",role:"switch","onUpdate:modelValue":b[1]||(b[1]=x=>s.value.preshared_key_bulkAdd=x),id:"bullAdd_PresharedKey_Switch",checked:""},null,512),[[A,s.value.preshared_key_bulkAdd]]),e("label",Ht,[e("small",Qt,[o(p,{t:"Pre-Shared Key"}),b[4]||(b[4]=w()),s.value.preshared_key_bulkAdd?(i(),K(p,{key:0,t:"Enabled"})):(i(),K(p,{key:1,t:"Disabled"}))])])])])):g("",!0)])])])])])]),e("div",Yt,[e("button",{class:"ms-auto btn btn-dark btn-brand rounded-3 px-3 py-2 shadow",disabled:!B.value||u.value,onClick:b[2]||(b[2]=x=>M())},[u.value?g("",!0):(i(),d("i",Xt)),u.value?(i(),K(p,{key:1,t:"Adding..."})):(i(),K(p,{key:2,t:"Add"}))],8,Zt)])])])])])],512))}};export{ss as default}; +import{_ as k,h as y,c as d,f as i,a as e,m as h,b as o,e as w,y as f,n as _,W as $,D as I,v as A,w as U,F as C,i as O,t as S,T as j,C as E,d as g,G as T,r as L,g as V,L as F,K as G,q as D,H as R,k as K,z as q}from"./index-Upsq31TS.js";import{L as p}from"./localeText-n7rlaTGQ.js";const W={name:"endpointAllowedIps",components:{LocaleText:p},props:{data:Object,saving:Boolean},setup(){const l=$(),t=I();return{store:l,dashboardStore:t}},data(){return{endpointAllowedIps:JSON.parse(JSON.stringify(this.data.endpoint_allowed_ip)),error:!1}},methods:{checkAllowedIP(){let l=this.endpointAllowedIps.split(",").map(t=>t.replaceAll(" ",""));for(let t in l)if(!this.store.checkCIDR(l[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()}}},J={for:"peer_endpoint_allowed_ips",class:"form-label"},z={class:"text-muted"},H=["disabled"];function Q(l,t,n,r,c,v){const s=y("LocaleText");return i(),d("div",null,[e("label",J,[e("small",z,[o(s,{t:"Endpoint Allowed IPs"}),t[2]||(t[2]=w()),e("code",null,[o(s,{t:"(Required)"})])])]),h(e("input",{type:"text",class:_(["form-control form-control-sm rounded-3",{"is-invalid":c.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,H),[[f,this.endpointAllowedIps]])])}const Y=k(W,[["render",Q]]),Z={name:"allowedIPsInput",components:{LocaleText:p},props:{data:Object,saving:Boolean,bulk:Boolean,availableIp:void 0},data(){return{allowedIp:[],availableIpSearchString:"",customAvailableIp:"",allowedIpFormatError:!1}},setup(l){const t=$(),n=I(),r=L("");return Object.keys(l.availableIp).length>0&&(r.value=Object.keys(l.availableIp)[0]),{store:t,dashboardStore:n,selectedSubnet:r}},computed:{searchAvailableIps(){return this.availableIpSearchString?this.availableIp[this.selectedSubnet].filter(l=>l.includes(this.availableIpSearchString)&&!this.data.allowed_ips.includes(l)):this.availableIp[this.selectedSubnet].filter(l=>!this.data.allowed_ips.includes(l))},inputGetLocale(){return T("Enter IP Address/CIDR")}},methods:{addAllowedIp(l){let t=l.split(",");for(let n=0;n0&&this.data.allowed_ips.length===0)for(let l in this.availableIp)this.availableIp[l].length>0&&this.addAllowedIp(this.availableIp[l][0])}},X={class:"d-flex flex-column flex-md-row mb-2"},ee={for:"peer_allowed_ip_textbox",class:"form-label mb-0"},te={class:"text-muted"},se={class:"form-check form-switch ms-md-auto"},ae={class:"form-check-label",for:"disableIPValidation"},le={class:"d-flex"},oe=["onClick"],ie={class:"d-flex gap-2 align-items-center"},de={class:"input-group"},ne=["placeholder","disabled"],re=["disabled"],ce={class:"text-muted"},ue={class:"dropdown flex-grow-1"},pe=["disabled"],he={key:0,class:"dropdown-menu mt-2 shadow w-100 dropdown-menu-end rounded-3 pb-0",style:{width:"300px !important"}},be={class:"px-3 d-flex gap-3 align-items-center"},me={class:"px-3 overflow-x-scroll d-flex overflow-x-scroll overflow-y-hidden align-items-center gap-2"},_e=["onClick"],ve={class:"overflow-y-scroll",style:{height:"270px"}},fe=["onClick"],ke={class:"me-auto"},ye={key:0,class:"px-3 py-2"},ge={key:0,class:"text-muted"},we={key:1,class:"text-muted"};function xe(l,t,n,r,c,v){const s=y("LocaleText");return i(),d("div",{class:_({inactiveField:this.bulk})},[e("div",X,[e("label",ee,[e("small",te,[o(s,{t:"Allowed IPs"}),t[5]||(t[5]=w()),e("code",null,[o(s,{t:"(Required)"})])])]),e("div",se,[h(e("input",{class:"form-check-input",type:"checkbox","onUpdate:modelValue":t[0]||(t[0]=a=>this.data.allowed_ips_validation=a),role:"switch",id:"disableIPValidation"},null,512),[[A,this.data.allowed_ips_validation]]),e("label",ae,[e("small",null,[o(s,{t:"Allowed IPs Validation"})])])])]),e("div",le,[e("div",{class:_(["d-flex gap-2 flex-wrap",{"mb-2":this.data.allowed_ips.length>0}])},[o(j,{name:"list"},{default:U(()=>[(i(!0),d(C,null,O(this.data.allowed_ips,(a,u)=>(i(),d("span",{class:"badge rounded-pill text-bg-success",key:a},[w(S(a)+" ",1),e("a",{role:"button",onClick:P=>this.data.allowed_ips.splice(u,1)},t[6]||(t[6]=[e("i",{class:"bi bi-x-circle-fill ms-1"},null,-1)]),8,oe)]))),128))]),_:1})],2)]),e("div",ie,[e("div",de,[h(e("input",{type:"text",class:_(["form-control form-control-sm rounded-start-3",{"is-invalid":this.allowedIpFormatError}]),placeholder:this.inputGetLocale,onKeyup:t[1]||(t[1]=E(a=>this.customAvailableIp?this.addAllowedIp(this.customAvailableIp):void 0,["enter"])),"onUpdate:modelValue":t[2]||(t[2]=a=>c.customAvailableIp=a),id:"peer_allowed_ip_textbox",disabled:n.bulk},null,42,ne),[[f,c.customAvailableIp]]),e("button",{class:_(["btn btn-sm rounded-end-3",[this.customAvailableIp?"btn-success":"btn-outline-success"]]),disabled:n.bulk||!this.customAvailableIp,onClick:t[3]||(t[3]=a=>this.addAllowedIp(this.customAvailableIp)),type:"button",id:"button-addon2"},t[7]||(t[7]=[e("i",{class:"bi bi-plus-lg"},null,-1)]),10,re)]),e("small",ce,[o(s,{t:"or"})]),e("div",ue,[e("button",{class:"btn btn-outline-secondary btn-sm dropdown-toggle rounded-3 w-100",disabled:!n.availableIp||n.bulk,"data-bs-auto-close":"outside",type:"button","data-bs-toggle":"dropdown","aria-expanded":"false"},[t[8]||(t[8]=e("i",{class:"bi bi-filter-circle me-2"},null,-1)),o(s,{t:"Pick Available IP"})],8,pe),this.availableIp?(i(),d("ul",he,[e("li",null,[e("div",be,[t[9]||(t[9]=e("label",{for:"availableIpSearchString",class:"text-muted"},[e("i",{class:"bi bi-search"})],-1)),h(e("input",{id:"availableIpSearchString",class:"form-control form-control-sm rounded-3","onUpdate:modelValue":t[4]||(t[4]=a=>this.availableIpSearchString=a)},null,512),[[f,this.availableIpSearchString]])]),t[11]||(t[11]=e("hr",{class:"my-2"},null,-1)),e("div",me,[t[10]||(t[10]=e("small",{class:"text-muted"},"Subnet",-1)),(i(!0),d(C,null,O(Object.keys(this.availableIp),a=>(i(),d("button",{key:a,onClick:u=>this.selectedSubnet=a,class:_([{"bg-primary-subtle":this.selectedSubnet===a},"btn btn-sm text-primary-emphasis rounded-3"])},S(a),11,_e))),128))]),t[12]||(t[12]=e("hr",{class:"mt-2 mb-0"},null,-1))]),e("li",null,[e("div",ve,[(i(!0),d(C,null,O(this.searchAvailableIps,a=>(i(),d("div",{style:{},key:a},[e("a",{class:"dropdown-item d-flex",role:"button",onClick:u=>this.addAllowedIp(a)},[e("span",ke,[e("small",null,S(a),1)])],8,fe)]))),128)),this.searchAvailableIps.length===0?(i(),d("div",ye,[this.availableIpSearchString?(i(),d("small",ge,[o(s,{t:"No available IP containing"}),w('"'+S(this.availableIpSearchString)+'"',1)])):(i(),d("small",we,[o(s,{t:"No more IP address available in this subnet"})]))])):g("",!0)])])])):g("",!0)])])],2)}const $e=k(Z,[["render",xe],["__scopeId","data-v-ed72944d"]]),Ie={name:"dnsInput",components:{LocaleText:p},props:{data:Object,saving:Boolean},data(){return{error:!1,dns:JSON.parse(JSON.stringify(this.data.DNS))}},setup(){const l=$(),t=I();return{store:l,dashboardStore:t}},methods:{checkDNS(){if(this.dns){let l=this.dns.split(",").map(t=>t.replaceAll(" ",""));for(let t in l)if(!this.store.regexCheckIP(l[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()}}},Ae={for:"peer_DNS_textbox",class:"form-label"},Pe={class:"text-muted"},Se=["disabled"];function Ke(l,t,n,r,c,v){const s=y("LocaleText");return i(),d("div",null,[e("label",Ae,[e("small",Pe,[o(s,{t:"DNS"})])]),h(e("input",{type:"text",class:_(["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,Se),[[f,this.dns]])])}const Ce=k(Ie,[["render",Ke]]),Le={name:"nameInput",components:{LocaleText:p},props:{bulk:Boolean,data:Object,saving:Boolean}},Oe={for:"peer_name_textbox",class:"form-label"},Ne={class:"text-muted"},De=["disabled"];function Te(l,t,n,r,c,v){const s=y("LocaleText");return i(),d("div",{class:_({inactiveField:this.bulk})},[e("label",Oe,[e("small",Ne,[o(s,{t:"Name"})])]),h(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,De),[[f,this.data.name]])],2)}const Ve=k(Le,[["render",Te]]),Be={name:"privatePublicKeyInput",components:{LocaleText:p},props:{data:Object,saving:Boolean,bulk:Boolean},setup(){const l=I(),t=$();return{dashboardStore:l,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(l){return/^[A-Za-z0-9+/]{43}=?=?$/.test(l)},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()}}}},Me={for:"peer_private_key_textbox",class:"form-label"},Ue={class:"text-muted"},je={class:"input-group"},Ee=["disabled"],Fe=["disabled"],Ge={class:"d-flex flex-column flex-md-row mb-2"},Re={for:"public_key",class:"form-label mb-0"},qe={class:"text-muted"},We={class:"form-check form-switch ms-md-auto"},Je=["disabled"],ze={class:"form-check-label",for:"enablePublicKeyEdit"},He=["disabled"];function Qe(l,t,n,r,c,v){const s=y("LocaleText");return i(),d("div",{class:_(["d-flex gap-2 flex-column",{inactiveField:this.bulk}])},[e("div",null,[e("label",Me,[e("small",Ue,[o(s,{t:"Private Key"}),t[6]||(t[6]=w()),e("code",null,[o(s,{t:"(Required for QR Code and Download)"})])])]),e("div",je,[h(e("input",{type:"text",class:_(["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,Ee),[[f,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[7]||(t[7]=[e("i",{class:"bi bi-arrow-repeat"},null,-1)]),8,Fe)])]),e("div",null,[e("div",Ge,[e("label",Re,[e("small",qe,[o(s,{t:"Public Key"}),t[8]||(t[8]=w()),e("code",null,[o(s,{t:"(Required)"})])])]),e("div",We,[h(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,Je),[[A,this.editKey]]),e("label",ze,[e("small",null,[o(s,{t:"Use your own Private and Public Key"})])])])]),h(e("input",{class:_(["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,He),[[f,this.keypair.publicKey]])])],2)}const Ye=k(Be,[["render",Qe]]),Ze={name:"bulkAdd",components:{LocaleText:p},props:{saving:Boolean,data:Object,availableIp:void 0},data(){return{numberOfAvailableIPs:null}},computed:{bulkAddGetLocale(){return T("How many peers you want to add?")},getNumberOfAvailableIPs(){return this.numberOfAvailableIPs?Object.values(this.numberOfAvailableIPs).reduce((l,t)=>l+t):"..."}},watch:{"data.bulkAdd":{immediate:!0,handler(l){l&&V("/api/getNumberOfAvailableIPs/"+this.$route.params.id,{},t=>{t.status&&(this.numberOfAvailableIPs=t.data)})}}}},Xe={class:"form-check form-switch"},et=["disabled"],tt={class:"form-check-label me-2",for:"bulk_add"},st={class:"text-muted d-block"},at={key:0,class:"form-group"},lt=["max","placeholder"],ot={class:"text-muted"};function it(l,t,n,r,c,v){const s=y("LocaleText");return i(),d("div",null,[e("div",Xe,[h(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,et),[[A,this.data.bulkAdd]]),e("label",tt,[e("small",null,[e("strong",null,[o(s,{t:"Bulk Add"})])])])]),e("p",{class:_({"mb-0":!this.data.bulkAdd})},[e("small",st,[o(s,{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?(i(),d("div",at,[h(e("input",{class:"form-control form-control-sm rounded-3 mb-1",type:"number",min:"1",id:"bulk_add_count",max:this.availableIp.length,"onUpdate:modelValue":t[1]||(t[1]=a=>this.data.bulkAddAmount=a),placeholder:this.bulkAddGetLocale},null,8,lt),[[f,this.data.bulkAddAmount]]),e("small",ot,[o(s,{t:"You can add up to "+v.getNumberOfAvailableIPs+" peers"},null,8,["t"])])])):g("",!0)])}const dt=k(Ze,[["render",it]]),nt={name:"presharedKeyInput",components:{LocaleText:p},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=""}}},rt={class:"d-flex align-items-start"},ct={for:"peer_preshared_key_textbox",class:"form-label"},ut={class:"text-muted"},pt={class:"form-check form-switch ms-auto"},ht=["disabled"];function bt(l,t,n,r,c,v){const s=y("LocaleText");return i(),d("div",null,[e("div",rt,[e("label",ct,[e("small",ut,[o(s,{t:"Pre-Shared Key"})])]),e("div",pt,[h(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),[[A,this.enable]])])]),h(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,ht),[[f,this.data.preshared_key]])])}const mt=k(nt,[["render",bt]]),_t={name:"mtuInput",components:{LocaleText:p},props:{data:Object,saving:Boolean}},vt={for:"peer_mtu",class:"form-label"},ft={class:"text-muted"},kt=["disabled"];function yt(l,t,n,r,c,v){const s=y("LocaleText");return i(),d("div",null,[e("label",vt,[e("small",ft,[o(s,{t:"MTU"})])]),h(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,kt),[[f,this.data.mtu]])])}const gt=k(_t,[["render",yt]]),wt={name:"persistentKeepAliveInput",components:{LocaleText:p},props:{data:Object,saving:Boolean}},xt={for:"peer_keep_alive",class:"form-label"},$t={class:"text-muted"},It=["disabled"];function At(l,t,n,r,c,v){const s=y("LocaleText");return i(),d("div",null,[e("label",xt,[e("small",$t,[o(s,{t:"Persistent Keepalive"})])]),h(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,It),[[f,this.data.keepalive]])])}const Pt=k(wt,[["render",At]]),St={class:"peerSettingContainer w-100 h-100 position-absolute top-0 start-0 overflow-y-scroll",ref:"editConfigurationContainer"},Kt={class:"container d-flex h-100 w-100"},Ct={class:"m-auto modal-dialog-centered dashboardModal",style:{width:"1000px"}},Lt={class:"card rounded-3 shadow flex-grow-1"},Ot={class:"card-header bg-transparent d-flex align-items-center gap-2 border-0 p-4"},Nt={class:"mb-0"},Dt={class:"card-body px-4 pb-4"},Tt={class:"d-flex flex-column gap-2"},Vt={class:"accordion mb-3",id:"peerAddModalAccordion"},Bt={class:"accordion-item"},Mt={class:"accordion-header"},Ut={class:"accordion-button collapsed rounded-3",type:"button","data-bs-toggle":"collapse","data-bs-target":"#peerAddModalAccordionAdvancedOptions"},jt={id:"peerAddModalAccordionAdvancedOptions",class:"accordion-collapse collapse collapsed","data-bs-parent":"#peerAddModalAccordion"},Et={class:"accordion-body rounded-bottom-3"},Ft={class:"d-flex flex-column gap-2"},Gt={class:"row gy-3"},Rt={key:0,class:"col-sm"},qt={class:"col-sm"},Wt={class:"col-sm"},Jt={key:1,class:"col-12"},zt={class:"form-check form-switch"},Ht={class:"form-check-label",for:"bullAdd_PresharedKey_Switch"},Qt={class:"fw-bold"},Yt={class:"d-flex mt-2"},Zt=["disabled"],Xt={key:0,class:"bi bi-plus-circle-fill me-2"},ss={__name:"peerAddModal",emits:["close","addedPeers"],async setup(l,{emit:t}){let n,r;const c=I(),v=$(),s=L({bulkAdd:!1,bulkAddAmount:0,name:"",allowed_ips:[],private_key:"",public_key:"",DNS:c.Configuration.Peers.peer_global_dns,endpoint_allowed_ip:c.Configuration.Peers.peer_endpoint_allowed_ip,keepalive:parseInt(c.Configuration.Peers.peer_keep_alive),mtu:parseInt(c.Configuration.Peers.peer_mtu),preshared_key:"",preshared_key_bulkAdd:!1,advanced_security:"off",allowed_ips_validation:!0}),a=L([]),u=L(!1),P=F();[n,r]=G(()=>V("/api/getAvailableIPs/"+P.params.id,{},m=>{m.status&&(a.value=m.data)})),await n,r();const N=t;D(()=>v.Configurations.find(m=>m.Name===P.params.id).Protocol);const B=D(()=>{let m=!0;return s.value.bulkAdd?(s.value.bulkAddAmount.length===0||s.value.bulkAddAmount>a.value.length)&&(m=!1):["allowed_ips","private_key","public_key","endpoint_allowed_ip","keepalive","mtu"].forEach(x=>{s.value[x].length===0&&(m=!1)}),m}),M=()=>{u.value=!0,q("/api/addPeers/"+P.params.id,s.value,m=>{m.status?(c.newMessage("Server","Peer created successfully","success"),N("addedPeers")):c.newMessage("Server",m.message,"danger"),u.value=!1})};return R(()=>s.value.bulkAddAmount,()=>{s.value.bulkAddAmount>a.value.length&&(s.value.bulkAddAmount=a.value.length)}),(m,b)=>(i(),d("div",St,[e("div",Kt,[e("div",Ct,[e("div",Lt,[e("div",Ot,[e("h4",Nt,[o(p,{t:"Add Peers"})]),e("button",{type:"button",class:"btn-close ms-auto",onClick:b[0]||(b[0]=x=>N("close"))})]),e("div",Dt,[e("div",Tt,[o(dt,{saving:u.value,data:s.value,availableIp:a.value},null,8,["saving","data","availableIp"]),s.value.bulkAdd?g("",!0):(i(),d(C,{key:0},[b[3]||(b[3]=e("hr",{class:"mb-0 mt-2"},null,-1)),o(Ve,{saving:u.value,data:s.value},null,8,["saving","data"]),o(Ye,{saving:u.value,data:s.value},null,8,["saving","data"]),o($e,{availableIp:a.value,saving:u.value,data:s.value},null,8,["availableIp","saving","data"])],64))]),b[5]||(b[5]=e("hr",null,null,-1)),e("div",Vt,[e("div",Bt,[e("h2",Mt,[e("button",Ut,[o(p,{t:"Advanced Options"})])]),e("div",jt,[e("div",Et,[e("div",Ft,[o(Ce,{saving:u.value,data:s.value},null,8,["saving","data"]),o(Y,{saving:u.value,data:s.value},null,8,["saving","data"]),e("div",Gt,[s.value.bulkAdd?g("",!0):(i(),d("div",Rt,[o(mt,{saving:u.value,data:s.value,bulk:s.value.bulkAdd},null,8,["saving","data","bulk"])])),e("div",qt,[o(gt,{saving:u.value,data:s.value},null,8,["saving","data"])]),e("div",Wt,[o(Pt,{saving:u.value,data:s.value},null,8,["saving","data"])]),s.value.bulkAdd?(i(),d("div",Jt,[e("div",zt,[h(e("input",{class:"form-check-input",type:"checkbox",role:"switch","onUpdate:modelValue":b[1]||(b[1]=x=>s.value.preshared_key_bulkAdd=x),id:"bullAdd_PresharedKey_Switch",checked:""},null,512),[[A,s.value.preshared_key_bulkAdd]]),e("label",Ht,[e("small",Qt,[o(p,{t:"Pre-Shared Key"}),b[4]||(b[4]=w()),s.value.preshared_key_bulkAdd?(i(),K(p,{key:0,t:"Enabled"})):(i(),K(p,{key:1,t:"Disabled"}))])])])])):g("",!0)])])])])])]),e("div",Yt,[e("button",{class:"ms-auto btn btn-dark btn-brand rounded-3 px-3 py-2 shadow",disabled:!B.value||u.value,onClick:b[2]||(b[2]=x=>M())},[u.value?g("",!0):(i(),d("i",Xt)),u.value?(i(),K(p,{key:1,t:"Adding..."})):(i(),K(p,{key:2,t:"Add"}))],8,Zt)])])])])])],512))}};export{ss as default}; diff --git a/src/static/app/dist/assets/peerAssignModal-CoUWwCk3.js b/src/static/app/dist/assets/peerAssignModal-5HoPs6IP.js similarity index 97% rename from src/static/app/dist/assets/peerAssignModal-CoUWwCk3.js rename to src/static/app/dist/assets/peerAssignModal-5HoPs6IP.js index 60d9d73..a682798 100644 --- a/src/static/app/dist/assets/peerAssignModal-CoUWwCk3.js +++ b/src/static/app/dist/assets/peerAssignModal-5HoPs6IP.js @@ -1 +1 @@ -import{L as _}from"./localeText-DkjxgEQB.js";import{q as N,c as l,f as n,a as e,t as v,F as y,i as $,u as g,n as f,b as u,r as k,E,m as G,y as I,e as P,k as S,d as w,_ as D,w as L,T,K as A}from"./index-BaGiSoQe.js";import{D as x}from"./DashboardClientAssignmentStore-BUoDZ6I5.js";const V={class:"d-flex flex-column gap-2"},B={class:"mb-0"},M={key:0,class:"d-flex flex-column gap-2"},U={class:"bg-body-secondary rounded-3 text-start p-2 d-flex"},j={class:"d-flex flex-column"},F={class:"mb-0"},O={class:"text-muted"},q=["onClick"],z={key:0,class:"spinner-border spinner-border-sm"},K={key:1,class:"bi bi-plus-circle-fill"},H={key:1},J={class:"text-muted"},Q={__name:"searchClientsGroup",props:["group","groupName","searchString"],emits:["count","assign"],setup(r,{emit:p}){const i=r,t=p,a=x(),m=N(()=>{let s=i.group.filter(d=>!a.assignments.map(o=>o.Client.ClientID).includes(d.ClientID));if(i.searchString){let d=s.filter(o=>o.Name&&o.Name.includes(i.searchString)||o.Email&&o.Email.includes(i.searchString));return t("count",d.length),d}return t("count",s.length),s});return(s,d)=>(n(),l("div",V,[e("h6",B,[e("small",null,v(r.groupName),1)]),m.value.length>0?(n(),l("div",M,[(n(!0),l(y,null,$(m.value,o=>(n(),l("div",U,[e("div",j,[e("small",F,v(o.Email),1),e("small",O,v(o.Name?o.Name:"No Name"),1)]),e("button",{onClick:c=>t("assign",o.ClientID),class:f([{disabled:g(a).assigning},"btn bg-success-subtle text-success-emphasis ms-auto"])},[g(a).assigning===o.ClientID?(n(),l("span",z)):(n(),l("i",K))],10,q)]))),256))])):(n(),l("div",H,[e("small",J,[u(_,{t:"No result"})])]))]))}},R={class:"p-3 bg-body-tertiary rounded-3 position-relative"},W={for:"SearchClient",class:"form-label"},X={class:"text-muted"},Y={class:"w-100 rounded-3 d-flex flex-column gap-2"},Z={class:"mt-1"},ee=["onClick"],se={class:"p-3 border rounded-3 d-flex flex-column gap-2 overflow-y-scroll",style:{height:"400px"}},te={__name:"searchClients",props:["clients","newAssignClients","assignments"],emits:["assign"],setup(r,{emit:p}){const i=x(),t=k(""),a=k(""),m=N(()=>t.value?{[t.value]:i.clients[t.value]}:i.clients),s=E({});Object.keys(i.clients).forEach(o=>s[o]=i.clients[o].length);const d=p;return(o,c)=>(n(),l("div",R,[e("h6",null,[u(_,{t:"Assign to Clients"})]),e("label",W,[e("small",X,[u(_,{t:"Enter Email or Name to Search"})])]),G(e("input",{class:"form-control rounded-3 mb-2",id:"SearchClient","onUpdate:modelValue":c[0]||(c[0]=b=>a.value=b),type:"email"},null,512),[[I,a.value]]),e("div",Y,[e("div",null,[c[3]||(c[3]=e("small",{class:"text-muted"},"Groups",-1)),e("div",Z,[e("button",{class:f([{active:!t.value},"btn bg-primary-subtle text-primary-emphasis btn-sm me-2 rounded-3"]),onClick:c[1]||(c[1]=b=>t.value="")},[u(_,{t:"All"})],2),(n(!0),l(y,null,$(g(i).clients,(b,h)=>(n(),l("button",{onClick:C=>t.value=h,class:f([{active:t.value===h},"btn bg-primary-subtle text-primary-emphasis btn-sm me-2 rounded-3"])},[P(v(h)+" ",1),e("span",{class:f(["ms-1 badge",[s[h]>0?"bg-primary":"bg-secondary"]])},v(s[h]),3)],10,ee))),256))])]),e("div",se,[(n(!0),l(y,null,$(m.value,(b,h)=>(n(),S(Q,{onAssign:c[2]||(c[2]=C=>d("assign",C)),onCount:C=>s[h]=C,searchString:a.value,group:b,groupName:h},null,8,["onCount","searchString","group","groupName"]))),256))])])]))}},ne={class:"bg-body-secondary rounded-3 text-start p-2 mb-2 assignment"},ie={key:0,class:"d-flex"},le={class:"d-flex flex-column"},ae={class:"text-muted"},oe={key:1,class:"d-flex gap-2"},re={class:"d-flex flex-column"},ce={class:"text-muted"},de={key:0,class:"spinner-border spinner-border-sm"},ue={key:1,class:"bi bi-check-lg"},me={__name:"assignment",props:["assignment"],emits:["unassign"],setup(r,{emit:p}){const i=p,t=k(!1),a=x();return(m,s)=>(n(),l("div",ne,[t.value?(n(),l("div",oe,[e("div",re,[e("small",null,[u(_,{t:"Are you sure to delete assignment for"})]),e("small",ce,[u(_,{t:r.assignment.Client.Email+" in group "+(r.assignment.Client.ClientGroup?r.assignment.Client.ClientGroup:"Local")+"?"},null,8,["t"])])]),e("button",{onClick:s[1]||(s[1]=d=>i("unassign")),"aria-label":"Delete Assignment",class:f([{disabled:g(a).unassigning},"btn bg-danger-subtle text-danger-emphasis ms-auto"])},[g(a).unassigning?(n(),l("span",de)):(n(),l("i",ue))],2),e("button",{class:f([{disabled:g(a).unassigning},"btn bg-secondary-subtle text-secondary-emphasis"]),onClick:s[2]||(s[2]=d=>t.value=!t.value),"aria-label":"Cancel Delete Assignment"},s[4]||(s[4]=[e("i",{class:"bi bi-x-lg"},null,-1)]),2)])):(n(),l("div",ie,[e("div",le,[e("small",null,v(r.assignment.Client.Email),1),e("small",ae,v(r.assignment.Client.Name?r.assignment.Client.Name+" | ":"")+v(r.assignment.Client.ClientGroup?r.assignment.Client.ClientGroup:"Local"),1)]),t.value?w("",!0):(n(),l("button",{key:0,onClick:s[0]||(s[0]=d=>t.value=!t.value),class:f([{disabled:g(a).unassigning},"btn bg-danger-subtle text-danger-emphasis ms-auto"]),"aria-label":"Delete Assignment"},s[3]||(s[3]=[e("i",{class:"bi bi-trash-fill"},null,-1)]),2))]))]))}},ge={class:"p-3 bg-body-tertiary rounded-3 d-flex flex-column gap-2"},_e={class:"mb-0"},pe={key:0,class:"text-center"},be={class:"text-muted"},he={__name:"assignedClients",props:["configurationName","peer"],emits:["unassign"],setup(r,{emit:p}){const i=x();return(t,a)=>(n(),l("div",ge,[e("h6",_e,[u(_,{t:"Assigned Clients"})]),u(T,{name:"list",tag:"div",class:"position-relative"},{default:L(()=>[(n(!0),l(y,null,$(g(i).assignments,m=>(n(),S(me,{assignment:m,key:m.AssignmentID,onUnassign:s=>g(i).unassignClient(r.configurationName,r.peer,m.AssignmentID)},null,8,["assignment","onUnassign"]))),128))]),_:1}),g(i).assignments.length===0?(n(),l("div",pe,[e("small",be,[u(_,{t:"No client assigned to this peer yet"})])])):w("",!0)]))}},ve=D(he,[["__scopeId","data-v-99c0844e"]]),fe={class:"peerSettingContainer w-100 h-100 position-absolute top-0 start-0 overflow-y-scroll"},xe={class:"container d-flex h-100 w-100"},Ce={class:"m-auto modal-dialog-centered dashboardModal",style:{width:"700px"}},ye={class:"card rounded-3 shadow flex-grow-1"},$e={class:"card-header bg-transparent d-flex align-items-center gap-2 border-0 p-4"},ke={class:"mb-0"},Ae={class:"card-body px-4 pb-4 d-flex gap-2 flex-column"},Ne={__name:"peerAssignModal",props:{selectedPeer:Object},emits:["close"],async setup(r,{emit:p}){let i,t;const a=r,m=p,s=x();s.clients.length>0?s.getClients():([i,t]=A(()=>s.getClients()),await i,t()),[i,t]=A(()=>s.getAssignedClients(a.selectedPeer.configuration.Name,a.selectedPeer.id)),await i,t();const d=async o=>{await s.assignClient(a.selectedPeer.configuration.Name,a.selectedPeer.id,o)};return(o,c)=>(n(),l("div",fe,[e("div",xe,[e("div",Ce,[e("div",ye,[e("div",$e,[e("h4",ke,[u(_,{t:"Assign Peer to Client"})]),e("button",{type:"button",class:"btn-close ms-auto",onClick:c[0]||(c[0]=b=>m("close"))})]),e("div",Ae,[u(ve,{"configuration-name":a.selectedPeer.configuration.Name,peer:a.selectedPeer.id},null,8,["configuration-name","peer"]),u(te,{onAssign:c[1]||(c[1]=b=>d(b))})])])])])]))}},Ee=D(Ne,[["__scopeId","data-v-b52659b4"]]);export{Ee as default}; +import{L as _}from"./localeText-n7rlaTGQ.js";import{q as N,c as l,f as n,a as e,t as v,F as y,i as $,u as g,n as f,b as u,r as k,E,m as G,y as I,e as P,k as S,d as w,_ as D,w as L,T,K as A}from"./index-Upsq31TS.js";import{D as x}from"./DashboardClientAssignmentStore-DpqDqqOP.js";const V={class:"d-flex flex-column gap-2"},B={class:"mb-0"},M={key:0,class:"d-flex flex-column gap-2"},U={class:"bg-body-secondary rounded-3 text-start p-2 d-flex"},j={class:"d-flex flex-column"},F={class:"mb-0"},O={class:"text-muted"},q=["onClick"],z={key:0,class:"spinner-border spinner-border-sm"},K={key:1,class:"bi bi-plus-circle-fill"},H={key:1},J={class:"text-muted"},Q={__name:"searchClientsGroup",props:["group","groupName","searchString"],emits:["count","assign"],setup(r,{emit:p}){const i=r,t=p,a=x(),m=N(()=>{let s=i.group.filter(d=>!a.assignments.map(o=>o.Client.ClientID).includes(d.ClientID));if(i.searchString){let d=s.filter(o=>o.Name&&o.Name.includes(i.searchString)||o.Email&&o.Email.includes(i.searchString));return t("count",d.length),d}return t("count",s.length),s});return(s,d)=>(n(),l("div",V,[e("h6",B,[e("small",null,v(r.groupName),1)]),m.value.length>0?(n(),l("div",M,[(n(!0),l(y,null,$(m.value,o=>(n(),l("div",U,[e("div",j,[e("small",F,v(o.Email),1),e("small",O,v(o.Name?o.Name:"No Name"),1)]),e("button",{onClick:c=>t("assign",o.ClientID),class:f([{disabled:g(a).assigning},"btn bg-success-subtle text-success-emphasis ms-auto"])},[g(a).assigning===o.ClientID?(n(),l("span",z)):(n(),l("i",K))],10,q)]))),256))])):(n(),l("div",H,[e("small",J,[u(_,{t:"No result"})])]))]))}},R={class:"p-3 bg-body-tertiary rounded-3 position-relative"},W={for:"SearchClient",class:"form-label"},X={class:"text-muted"},Y={class:"w-100 rounded-3 d-flex flex-column gap-2"},Z={class:"mt-1"},ee=["onClick"],se={class:"p-3 border rounded-3 d-flex flex-column gap-2 overflow-y-scroll",style:{height:"400px"}},te={__name:"searchClients",props:["clients","newAssignClients","assignments"],emits:["assign"],setup(r,{emit:p}){const i=x(),t=k(""),a=k(""),m=N(()=>t.value?{[t.value]:i.clients[t.value]}:i.clients),s=E({});Object.keys(i.clients).forEach(o=>s[o]=i.clients[o].length);const d=p;return(o,c)=>(n(),l("div",R,[e("h6",null,[u(_,{t:"Assign to Clients"})]),e("label",W,[e("small",X,[u(_,{t:"Enter Email or Name to Search"})])]),G(e("input",{class:"form-control rounded-3 mb-2",id:"SearchClient","onUpdate:modelValue":c[0]||(c[0]=b=>a.value=b),type:"email"},null,512),[[I,a.value]]),e("div",Y,[e("div",null,[c[3]||(c[3]=e("small",{class:"text-muted"},"Groups",-1)),e("div",Z,[e("button",{class:f([{active:!t.value},"btn bg-primary-subtle text-primary-emphasis btn-sm me-2 rounded-3"]),onClick:c[1]||(c[1]=b=>t.value="")},[u(_,{t:"All"})],2),(n(!0),l(y,null,$(g(i).clients,(b,h)=>(n(),l("button",{onClick:C=>t.value=h,class:f([{active:t.value===h},"btn bg-primary-subtle text-primary-emphasis btn-sm me-2 rounded-3"])},[P(v(h)+" ",1),e("span",{class:f(["ms-1 badge",[s[h]>0?"bg-primary":"bg-secondary"]])},v(s[h]),3)],10,ee))),256))])]),e("div",se,[(n(!0),l(y,null,$(m.value,(b,h)=>(n(),S(Q,{onAssign:c[2]||(c[2]=C=>d("assign",C)),onCount:C=>s[h]=C,searchString:a.value,group:b,groupName:h},null,8,["onCount","searchString","group","groupName"]))),256))])])]))}},ne={class:"bg-body-secondary rounded-3 text-start p-2 mb-2 assignment"},ie={key:0,class:"d-flex"},le={class:"d-flex flex-column"},ae={class:"text-muted"},oe={key:1,class:"d-flex gap-2"},re={class:"d-flex flex-column"},ce={class:"text-muted"},de={key:0,class:"spinner-border spinner-border-sm"},ue={key:1,class:"bi bi-check-lg"},me={__name:"assignment",props:["assignment"],emits:["unassign"],setup(r,{emit:p}){const i=p,t=k(!1),a=x();return(m,s)=>(n(),l("div",ne,[t.value?(n(),l("div",oe,[e("div",re,[e("small",null,[u(_,{t:"Are you sure to delete assignment for"})]),e("small",ce,[u(_,{t:r.assignment.Client.Email+" in group "+(r.assignment.Client.ClientGroup?r.assignment.Client.ClientGroup:"Local")+"?"},null,8,["t"])])]),e("button",{onClick:s[1]||(s[1]=d=>i("unassign")),"aria-label":"Delete Assignment",class:f([{disabled:g(a).unassigning},"btn bg-danger-subtle text-danger-emphasis ms-auto"])},[g(a).unassigning?(n(),l("span",de)):(n(),l("i",ue))],2),e("button",{class:f([{disabled:g(a).unassigning},"btn bg-secondary-subtle text-secondary-emphasis"]),onClick:s[2]||(s[2]=d=>t.value=!t.value),"aria-label":"Cancel Delete Assignment"},s[4]||(s[4]=[e("i",{class:"bi bi-x-lg"},null,-1)]),2)])):(n(),l("div",ie,[e("div",le,[e("small",null,v(r.assignment.Client.Email),1),e("small",ae,v(r.assignment.Client.Name?r.assignment.Client.Name+" | ":"")+v(r.assignment.Client.ClientGroup?r.assignment.Client.ClientGroup:"Local"),1)]),t.value?w("",!0):(n(),l("button",{key:0,onClick:s[0]||(s[0]=d=>t.value=!t.value),class:f([{disabled:g(a).unassigning},"btn bg-danger-subtle text-danger-emphasis ms-auto"]),"aria-label":"Delete Assignment"},s[3]||(s[3]=[e("i",{class:"bi bi-trash-fill"},null,-1)]),2))]))]))}},ge={class:"p-3 bg-body-tertiary rounded-3 d-flex flex-column gap-2"},_e={class:"mb-0"},pe={key:0,class:"text-center"},be={class:"text-muted"},he={__name:"assignedClients",props:["configurationName","peer"],emits:["unassign"],setup(r,{emit:p}){const i=x();return(t,a)=>(n(),l("div",ge,[e("h6",_e,[u(_,{t:"Assigned Clients"})]),u(T,{name:"list",tag:"div",class:"position-relative"},{default:L(()=>[(n(!0),l(y,null,$(g(i).assignments,m=>(n(),S(me,{assignment:m,key:m.AssignmentID,onUnassign:s=>g(i).unassignClient(r.configurationName,r.peer,m.AssignmentID)},null,8,["assignment","onUnassign"]))),128))]),_:1}),g(i).assignments.length===0?(n(),l("div",pe,[e("small",be,[u(_,{t:"No client assigned to this peer yet"})])])):w("",!0)]))}},ve=D(he,[["__scopeId","data-v-99c0844e"]]),fe={class:"peerSettingContainer w-100 h-100 position-absolute top-0 start-0 overflow-y-scroll"},xe={class:"container d-flex h-100 w-100"},Ce={class:"m-auto modal-dialog-centered dashboardModal",style:{width:"700px"}},ye={class:"card rounded-3 shadow flex-grow-1"},$e={class:"card-header bg-transparent d-flex align-items-center gap-2 border-0 p-4"},ke={class:"mb-0"},Ae={class:"card-body px-4 pb-4 d-flex gap-2 flex-column"},Ne={__name:"peerAssignModal",props:{selectedPeer:Object},emits:["close"],async setup(r,{emit:p}){let i,t;const a=r,m=p,s=x();s.clients.length>0?s.getClients():([i,t]=A(()=>s.getClients()),await i,t()),[i,t]=A(()=>s.getAssignedClients(a.selectedPeer.configuration.Name,a.selectedPeer.id)),await i,t();const d=async o=>{await s.assignClient(a.selectedPeer.configuration.Name,a.selectedPeer.id,o)};return(o,c)=>(n(),l("div",fe,[e("div",xe,[e("div",Ce,[e("div",ye,[e("div",$e,[e("h4",ke,[u(_,{t:"Assign Peer to Client"})]),e("button",{type:"button",class:"btn-close ms-auto",onClick:c[0]||(c[0]=b=>m("close"))})]),e("div",Ae,[u(ve,{"configuration-name":a.selectedPeer.configuration.Name,peer:a.selectedPeer.id},null,8,["configuration-name","peer"]),u(te,{onAssign:c[1]||(c[1]=b=>d(b))})])])])])]))}},Ee=D(Ne,[["__scopeId","data-v-b52659b4"]]);export{Ee as default}; diff --git a/src/static/app/dist/assets/peerConfigurationFile-HFbRJR3C.js b/src/static/app/dist/assets/peerConfigurationFile-D43SrB3i.js similarity index 73% rename from src/static/app/dist/assets/peerConfigurationFile-HFbRJR3C.js rename to src/static/app/dist/assets/peerConfigurationFile-D43SrB3i.js index 278f5d3..614e95f 100644 --- a/src/static/app/dist/assets/peerConfigurationFile-HFbRJR3C.js +++ b/src/static/app/dist/assets/peerConfigurationFile-D43SrB3i.js @@ -1 +1 @@ -import{_ as v,D as g,r as o,o as h,M as x,g as y,c as i,f as n,a as s,b as c,d as w,n as C,w as k,j as F}from"./index-BaGiSoQe.js";import{L as M}from"./localeText-DkjxgEQB.js";import"./browser-BHoir7AQ.js";const T={class:"peerSettingContainer w-100 h-100 position-absolute top-0 start-0"},S={class:"container d-flex h-100 w-100"},D={class:"m-auto modal-dialog-centered dashboardModal justify-content-center"},P={class:"card rounded-3 shadow w-100"},j={class:"card-header bg-transparent d-flex align-items-center gap-2 border-0 p-4 pb-0"},B={class:"mb-0"},G={class:"card-body p-4 d-flex flex-column gap-3"},L={style:{height:"300px"},class:"d-flex"},N=["value"],V={key:0,class:"spinner-border m-auto",role:"status"},I={class:"d-flex"},W=["disabled"],$={key:0,class:"d-block"},q={key:1,class:"d-block",id:"check"},z={__name:"peerConfigurationFile",props:{selectedPeer:Object},emits:["close"],setup(u,{emit:p}){const m=p,f=u,r=g(),t=o(!1),l=o(""),a=o(!0);o({error:!1,message:void 0}),h(()=>{const d=x();y("/api/downloadPeer/"+d.params.id,{id:f.selectedPeer.id},e=>{e.status?(l.value=e.data.file,a.value=!1):this.dashboardStore.newMessage("Server",e.message,"danger")})});const b=async()=>{navigator.clipboard&&navigator.clipboard.writeText?navigator.clipboard.writeText(l.value).then(()=>{t.value=!0,setTimeout(()=>{t.value=!1},3e3)}).catch(()=>{r.newMessage("WGDashboard","Failed to copy","danger")}):(document.querySelector("#peerConfigurationFile").select(),document.execCommand("copy")?(t.value=!0,setTimeout(()=>{t.value=!1},3e3)):r.newMessage("WGDashboard","Failed to copy","danger"))};return(d,e)=>(n(),i("div",T,[s("div",S,[s("div",D,[s("div",P,[s("div",j,[s("h4",B,[c(M,{t:"Peer Configuration File"})]),s("button",{type:"button",class:"btn-close ms-auto",onClick:e[0]||(e[0]=_=>m("close"))})]),s("div",G,[s("div",L,[s("textarea",{style:{height:"300px"},class:C(["form-control w-100 rounded-3 animate__fadeIn animate__faster animate__animated",{"d-none":a.value}]),id:"peerConfigurationFile",value:l.value},null,10,N),a.value?(n(),i("div",V,e[2]||(e[2]=[s("span",{class:"visually-hidden"},"Loading...",-1)]))):w("",!0)]),s("div",I,[s("button",{onClick:e[1]||(e[1]=_=>b()),disabled:t.value||a.value,class:"ms-auto btn bg-primary-subtle border-primary-subtle text-primary-emphasis rounded-3 position-relative"},[c(F,{name:"slide-up",mode:"out-in"},{default:k(()=>[t.value?(n(),i("span",q,e[4]||(e[4]=[s("i",{class:"bi bi-check-circle-fill"},null,-1)]))):(n(),i("span",$,e[3]||(e[3]=[s("i",{class:"bi bi-clipboard-fill"},null,-1)])))]),_:1})],8,W)])])])])])]))}},A=v(z,[["__scopeId","data-v-b0ea2d46"]]);export{A as default}; +import{_ as v,D as g,r as o,o as h,L as x,g as y,c as i,f as n,a as s,b as c,d as w,n as C,w as k,j as F}from"./index-Upsq31TS.js";import{L as T}from"./localeText-n7rlaTGQ.js";import"./browser-Bcujcoof.js";const M={class:"peerSettingContainer w-100 h-100 position-absolute top-0 start-0"},S={class:"container d-flex h-100 w-100"},D={class:"m-auto modal-dialog-centered dashboardModal justify-content-center"},L={class:"card rounded-3 shadow w-100"},P={class:"card-header bg-transparent d-flex align-items-center gap-2 border-0 p-4 pb-0"},j={class:"mb-0"},B={class:"card-body p-4 d-flex flex-column gap-3"},G={style:{height:"300px"},class:"d-flex"},N=["value"],V={key:0,class:"spinner-border m-auto",role:"status"},I={class:"d-flex"},W=["disabled"],$={key:0,class:"d-block"},q={key:1,class:"d-block",id:"check"},z={__name:"peerConfigurationFile",props:{selectedPeer:Object},emits:["close"],setup(u,{emit:p}){const m=p,f=u,r=g(),t=o(!1),l=o(""),a=o(!0);o({error:!1,message:void 0}),h(()=>{const d=x();y("/api/downloadPeer/"+d.params.id,{id:f.selectedPeer.id},e=>{e.status?(l.value=e.data.file,a.value=!1):this.dashboardStore.newMessage("Server",e.message,"danger")})});const b=async()=>{navigator.clipboard&&navigator.clipboard.writeText?navigator.clipboard.writeText(l.value).then(()=>{t.value=!0,setTimeout(()=>{t.value=!1},3e3)}).catch(()=>{r.newMessage("WGDashboard","Failed to copy","danger")}):(document.querySelector("#peerConfigurationFile").select(),document.execCommand("copy")?(t.value=!0,setTimeout(()=>{t.value=!1},3e3)):r.newMessage("WGDashboard","Failed to copy","danger"))};return(d,e)=>(n(),i("div",M,[s("div",S,[s("div",D,[s("div",L,[s("div",P,[s("h4",j,[c(T,{t:"Peer Configuration File"})]),s("button",{type:"button",class:"btn-close ms-auto",onClick:e[0]||(e[0]=_=>m("close"))})]),s("div",B,[s("div",G,[s("textarea",{style:{height:"300px"},class:C(["form-control w-100 rounded-3 animate__fadeIn animate__faster animate__animated",{"d-none":a.value}]),id:"peerConfigurationFile",value:l.value},null,10,N),a.value?(n(),i("div",V,e[2]||(e[2]=[s("span",{class:"visually-hidden"},"Loading...",-1)]))):w("",!0)]),s("div",I,[s("button",{onClick:e[1]||(e[1]=_=>b()),disabled:t.value||a.value,class:"ms-auto btn bg-primary-subtle border-primary-subtle text-primary-emphasis rounded-3 position-relative"},[c(F,{name:"slide-up",mode:"out-in"},{default:k(()=>[t.value?(n(),i("span",q,e[4]||(e[4]=[s("i",{class:"bi bi-check-circle-fill"},null,-1)]))):(n(),i("span",$,e[3]||(e[3]=[s("i",{class:"bi bi-clipboard-fill"},null,-1)])))]),_:1})],8,W)])])])])])]))}},A=v(z,[["__scopeId","data-v-b0ea2d46"]]);export{A as default}; diff --git a/src/static/app/dist/assets/peerJobs-kZAK-mB1.js b/src/static/app/dist/assets/peerJobs-DDiv72oD.js similarity index 90% rename from src/static/app/dist/assets/peerJobs-kZAK-mB1.js rename to src/static/app/dist/assets/peerJobs-DDiv72oD.js index 25136c1..e744627 100644 --- a/src/static/app/dist/assets/peerJobs-kZAK-mB1.js +++ b/src/static/app/dist/assets/peerJobs-DDiv72oD.js @@ -1 +1 @@ -import{a as p,S as b}from"./schedulePeerJob-Bp6xBo32.js";import{_ as h,h as i,c as a,f as o,a as e,b as r,w as u,d as m,F as _,i as f,k as v,T as J,A as x,W as g}from"./index-BaGiSoQe.js";import{L as w}from"./localeText-DkjxgEQB.js";import"./vue-datepicker-CI9txOl2.js";import"./dayjs.min-H8Pjp0HL.js";const P={name:"peerJobs",setup(){return{store:g()}},props:{selectedPeer:Object},components:{LocaleText:w,SchedulePeerJob:b,ScheduleDropdown:p},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:x().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"},k={class:"mb-0 fw-normal"},j={class:"card-body px-4 pb-4 pt-2 position-relative"},T={class:"d-flex align-items-center mb-3"},N={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",k,[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",j,[e("div",T,[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(J,{name:"schedulePeerJobTransition",tag:"div",class:"position-relative"},{default:u(()=>[(o(!0),a(_,null,f(this.selectedPeer.jobs,(s,E)=>(o(),v(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",N,[e("div",I,[e("h6",L,[r(n,{t:"This peer does not have any job yet."})])])])):m("",!0)]),_:1})])])])])])}const z=h(P,[["render",O],["__scopeId","data-v-5bbdd42b"]]);export{z as default}; +import{a as p,S as b}from"./schedulePeerJob-CKnHZfdd.js";import{_ as h,h as i,c as a,f as o,a as e,b as r,w as u,d as m,F as _,i as f,k as v,T as J,A as x,W as g}from"./index-Upsq31TS.js";import{L as w}from"./localeText-n7rlaTGQ.js";import"./vue-datepicker-COnDbf6W.js";import"./dayjs.min-Cdu5c05l.js";const P={name:"peerJobs",setup(){return{store:g()}},props:{selectedPeer:Object},components:{LocaleText:w,SchedulePeerJob:b,ScheduleDropdown:p},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:x().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"},k={class:"mb-0 fw-normal"},j={class:"card-body px-4 pb-4 pt-2 position-relative"},T={class:"d-flex align-items-center mb-3"},N={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",k,[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",j,[e("div",T,[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(J,{name:"schedulePeerJobTransition",tag:"div",class:"position-relative"},{default:u(()=>[(o(!0),a(_,null,f(this.selectedPeer.jobs,(s,E)=>(o(),v(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",N,[e("div",I,[e("h6",L,[r(n,{t:"This peer does not have any job yet."})])])])):m("",!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-BBEOmypX.js b/src/static/app/dist/assets/peerJobsAllModal-B4Fcsytd.js similarity index 90% rename from src/static/app/dist/assets/peerJobsAllModal-BBEOmypX.js rename to src/static/app/dist/assets/peerJobsAllModal-B4Fcsytd.js index 8a3ba1a..3c8fcc3 100644 --- a/src/static/app/dist/assets/peerJobsAllModal-BBEOmypX.js +++ b/src/static/app/dist/assets/peerJobsAllModal-B4Fcsytd.js @@ -1 +1 @@ -import{S as _}from"./schedulePeerJob-Bp6xBo32.js";import{_ as g,h as c,c as r,f as t,a as e,b as l,F as p,i as b,d as f,t as m,k as v,W as y}from"./index-BaGiSoQe.js";import{L as x}from"./localeText-DkjxgEQB.js";import"./vue-datepicker-CI9txOl2.js";import"./dayjs.min-H8Pjp0HL.js";const J={name:"peerJobsAllModal",setup(){return{store:y()}},components:{LocaleText:x,SchedulePeerJob:_},props:{configurationPeers:Array[Object]},computed:{getAllJobs(){return this.configurationPeers.filter(a=>a.jobs.length>0)}}},k={class:"peerSettingContainer w-100 h-100 position-absolute top-0 start-0 overflow-y-scroll"},w={class:"container d-flex h-100 w-100"},$={class:"m-auto modal-dialog-centered dashboardModal"},A={class:"card rounded-3 shadow",style:{width:"900px"}},L={class:"card-header bg-transparent d-flex align-items-center gap-2 border-0 p-4 pb-2"},S={class:"mb-0 fw-normal"},C={class:"card-body px-4 pb-4 pt-2"},P={key:0,class:"accordion",id:"peerJobsLogsModalAccordion"},j={class:"accordion-header"},M=["data-bs-target"],B={key:0},N={class:"text-muted"},D=["id"],T={class:"accordion-body"},V={key:1,class:"card shadow-sm",style:{height:"153px"}},F={class:"card-body text-muted text-center d-flex"},O={class:"m-auto"};function W(a,o,E,I,R,q){const n=c("LocaleText"),u=c("SchedulePeerJob");return t(),r("div",k,[e("div",w,[e("div",$,[e("div",A,[e("div",L,[e("h4",S,[l(n,{t:"All Active Jobs"})]),e("button",{type:"button",class:"btn-close ms-auto",onClick:o[0]||(o[0]=s=>this.$emit("close"))})]),e("div",C,[e("button",{class:"btn bg-primary-subtle border-1 border-primary-subtle text-primary-emphasis rounded-3 shadow mb-2",onClick:o[1]||(o[1]=s=>this.$emit("allLogs"))},[o[4]||(o[4]=e("i",{class:"bi bi-clock me-2"},null,-1)),l(n,{t:"Logs"})]),this.getAllJobs.length>0?(t(),r("div",P,[(t(!0),r(p,null,b(this.getAllJobs,(s,d)=>(t(),r("div",{class:"accordion-item",key:s.id},[e("h2",j,[e("button",{class:"accordion-button collapsed",type:"button","data-bs-toggle":"collapse","data-bs-target":"#collapse_"+d},[e("small",null,[e("strong",null,[s.name?(t(),r("span",B,m(s.name)+" • ",1)):f("",!0),e("samp",N,m(s.id),1)])])],8,M)]),e("div",{id:"collapse_"+d,class:"accordion-collapse collapse","data-bs-parent":"#peerJobsLogsModalAccordion"},[e("div",T,[(t(!0),r(p,null,b(s.jobs,i=>(t(),v(u,{onDelete:o[2]||(o[2]=h=>this.$emit("refresh")),onRefresh:o[3]||(o[3]=h=>this.$emit("refresh")),dropdowns:this.store.PeerScheduleJobs.dropdowns,viewOnly:!0,key:i.JobID,pjob:i},null,8,["dropdowns","pjob"]))),128))])],8,D)]))),128))])):(t(),r("div",V,[e("div",F,[e("span",O,[l(n,{t:"No active job at the moment."})])])]))])])])])])}const U=g(J,[["render",W]]);export{U as default}; +import{S as _}from"./schedulePeerJob-CKnHZfdd.js";import{_ as g,h as c,c as r,f as t,a as e,b as l,F as p,i as b,d as f,t as m,k as v,W as y}from"./index-Upsq31TS.js";import{L as x}from"./localeText-n7rlaTGQ.js";import"./vue-datepicker-COnDbf6W.js";import"./dayjs.min-Cdu5c05l.js";const J={name:"peerJobsAllModal",setup(){return{store:y()}},components:{LocaleText:x,SchedulePeerJob:_},props:{configurationPeers:Array[Object]},computed:{getAllJobs(){return this.configurationPeers.filter(a=>a.jobs.length>0)}}},k={class:"peerSettingContainer w-100 h-100 position-absolute top-0 start-0 overflow-y-scroll"},w={class:"container d-flex h-100 w-100"},$={class:"m-auto modal-dialog-centered dashboardModal"},A={class:"card rounded-3 shadow",style:{width:"900px"}},L={class:"card-header bg-transparent d-flex align-items-center gap-2 border-0 p-4 pb-2"},S={class:"mb-0 fw-normal"},C={class:"card-body px-4 pb-4 pt-2"},P={key:0,class:"accordion",id:"peerJobsLogsModalAccordion"},j={class:"accordion-header"},M=["data-bs-target"],B={key:0},N={class:"text-muted"},D=["id"],T={class:"accordion-body"},V={key:1,class:"card shadow-sm",style:{height:"153px"}},F={class:"card-body text-muted text-center d-flex"},O={class:"m-auto"};function W(a,o,E,I,R,q){const n=c("LocaleText"),u=c("SchedulePeerJob");return t(),r("div",k,[e("div",w,[e("div",$,[e("div",A,[e("div",L,[e("h4",S,[l(n,{t:"All Active Jobs"})]),e("button",{type:"button",class:"btn-close ms-auto",onClick:o[0]||(o[0]=s=>this.$emit("close"))})]),e("div",C,[e("button",{class:"btn bg-primary-subtle border-1 border-primary-subtle text-primary-emphasis rounded-3 shadow mb-2",onClick:o[1]||(o[1]=s=>this.$emit("allLogs"))},[o[4]||(o[4]=e("i",{class:"bi bi-clock me-2"},null,-1)),l(n,{t:"Logs"})]),this.getAllJobs.length>0?(t(),r("div",P,[(t(!0),r(p,null,b(this.getAllJobs,(s,d)=>(t(),r("div",{class:"accordion-item",key:s.id},[e("h2",j,[e("button",{class:"accordion-button collapsed",type:"button","data-bs-toggle":"collapse","data-bs-target":"#collapse_"+d},[e("small",null,[e("strong",null,[s.name?(t(),r("span",B,m(s.name)+" • ",1)):f("",!0),e("samp",N,m(s.id),1)])])],8,M)]),e("div",{id:"collapse_"+d,class:"accordion-collapse collapse","data-bs-parent":"#peerJobsLogsModalAccordion"},[e("div",T,[(t(!0),r(p,null,b(s.jobs,i=>(t(),v(u,{onDelete:o[2]||(o[2]=h=>this.$emit("refresh")),onRefresh:o[3]||(o[3]=h=>this.$emit("refresh")),dropdowns:this.store.PeerScheduleJobs.dropdowns,viewOnly:!0,key:i.JobID,pjob:i},null,8,["dropdowns","pjob"]))),128))])],8,D)]))),128))])):(t(),r("div",V,[e("div",F,[e("span",O,[l(n,{t:"No active job at the moment."})])])]))])])])])])}const U=g(J,[["render",W]]);export{U as default}; diff --git a/src/static/app/dist/assets/peerJobsLogsModal-CUk9QsM-.js b/src/static/app/dist/assets/peerJobsLogsModal-YBNe6GAN.js similarity index 96% rename from src/static/app/dist/assets/peerJobsLogsModal-CUk9QsM-.js rename to src/static/app/dist/assets/peerJobsLogsModal-YBNe6GAN.js index ab08e9c..c8a085b 100644 --- a/src/static/app/dist/assets/peerJobsLogsModal-CUk9QsM-.js +++ b/src/static/app/dist/assets/peerJobsLogsModal-YBNe6GAN.js @@ -1 +1 @@ -import{d as m}from"./dayjs.min-H8Pjp0HL.js";import{_ as p,h as g,c as a,f as n,a as s,b as i,e as b,t as c,m as h,v as u,d,F as _,i as f,n as w,g as L}from"./index-BaGiSoQe.js";import{L as k}from"./localeText-DkjxgEQB.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 L(`/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&&["1","true"].includes(r.Status)||this.showFailedJob&&["0","false"].includes(r.Status))},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=g("LocaleText");return n(),a("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?(n(),a("div",as,t[11]||(t[11]=[s("div",{class:"spinner-border text-body",role:"status"},[s("span",{class:"visually-hidden"},"Loading...")],-1)]))):(n(),a("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?(n(),a("th",q,[i(e,{t:"Log ID"})])):d("",!0),l.showJobID?(n(),a("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,[(n(!0),a(_,null,f(this.showLogs,o=>(n(),a("tr",X,[s("th",Z,c(o.LogDate),1),l.showLogID?(n(),a("td",ss,[s("samp",ts,c(o.LogID),1)])):d("",!0),l.showJobID?(n(),a("td",os,[s("samp",es,c(o.JobID),1)])):d("",!0),s("td",null,[s("span",{class:w(["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?(n(),a("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?(n(),a("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}; +import{d as m}from"./dayjs.min-Cdu5c05l.js";import{_ as p,h as g,c as a,f as n,a as s,b as i,e as b,t as c,m as h,v as u,d,F as _,i as f,n as w,g as L}from"./index-Upsq31TS.js";import{L as k}from"./localeText-n7rlaTGQ.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 L(`/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&&["1","true"].includes(r.Status)||this.showFailedJob&&["0","false"].includes(r.Status))},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=g("LocaleText");return n(),a("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?(n(),a("div",as,t[11]||(t[11]=[s("div",{class:"spinner-border text-body",role:"status"},[s("span",{class:"visually-hidden"},"Loading...")],-1)]))):(n(),a("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?(n(),a("th",q,[i(e,{t:"Log ID"})])):d("",!0),l.showJobID?(n(),a("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,[(n(!0),a(_,null,f(this.showLogs,o=>(n(),a("tr",X,[s("th",Z,c(o.LogDate),1),l.showLogID?(n(),a("td",ss,[s("samp",ts,c(o.LogID),1)])):d("",!0),l.showJobID?(n(),a("td",os,[s("samp",es,c(o.JobID),1)])):d("",!0),s("td",null,[s("span",{class:w(["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?(n(),a("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?(n(),a("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-9LlPuiy3.js b/src/static/app/dist/assets/peerList-BF1XGsyP.js similarity index 93% rename from src/static/app/dist/assets/peerList-9LlPuiy3.js rename to src/static/app/dist/assets/peerList-BF1XGsyP.js index 4913751..8037edc 100644 --- a/src/static/app/dist/assets/peerList-9LlPuiy3.js +++ b/src/static/app/dist/assets/peerList-BF1XGsyP.js @@ -1,2 +1,2 @@ -const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/peerAssignModal-CoUWwCk3.js","assets/localeText-DkjxgEQB.js","assets/index-BaGiSoQe.js","assets/index-wGh3t2RU.css","assets/DashboardClientAssignmentStore-BUoDZ6I5.js","assets/peerAssignModal--_bmFbmn.css","assets/peerShareLinkModal-DDmGp_KD.js","assets/dayjs.min-H8Pjp0HL.js","assets/vue-datepicker-CI9txOl2.js","assets/peerShareLinkModal-DgDHiTOw.css","assets/peerJobs-kZAK-mB1.js","assets/schedulePeerJob-Bp6xBo32.js","assets/schedulePeerJob-BGJSEouo.css","assets/peerJobs-D_dDl936.css","assets/peerQRCode-BiVHr8UY.js","assets/browser-BHoir7AQ.js","assets/peerQRCode-DuWWfBch.css","assets/peerConfigurationFile-HFbRJR3C.js","assets/peerConfigurationFile-Z9ms5mIx.css","assets/peerSettings-DJBxRPdI.js","assets/peerSettings-CSjO_Okh.css","assets/peerSearchBar-3fBKUdTH.js","assets/peerSearchBar-0uWV_0iv.css","assets/peerJobsAllModal-BBEOmypX.js","assets/peerJobsLogsModal-CUk9QsM-.js","assets/editConfiguration-DkzbDT16.js","assets/editConfiguration-ChlGwssr.css","assets/selectPeers-CV6q0Qd4.js","assets/selectPeers-ChWyERy7.css","assets/peerAddModal-Dbk6LNS2.js","assets/peerAddModal-B4gIHs91.css"])))=>i.map(i=>d[i]); -import{r as A,M as de,D as H,o as ue,H as ee,x as ne,q as B,c as v,f as l,a as e,b as d,u as M,d as $,t as w,g as Q,_ as K,h as q,F,i as X,n as L,z as G,G as T,W as ce,N as ge,O as ve,P as j,w as J,j as ae,e as N,k as x,Q as R,T as oe,R as I,K as be,m as he,v as _e,S as ye}from"./index-BaGiSoQe.js";import{_ as Se}from"./protocolBadge-fuWULZA8.js";import{L as O}from"./localeText-DkjxgEQB.js";import{C as Pe,L as $e,B as we,a as xe,b as Ce,c as ke,p as Oe,d as Me,e as De,f as Ae,P as Le,h as Re,g as re}from"./index-hZ1DcfGk.js";import{d as Ie}from"./dayjs.min-H8Pjp0HL.js";const Te={class:"row gx-2 gy-2 mb-3"},Ee={class:"col-12"},Be={class:"card rounded-3 bg-transparent",style:{height:"270px"}},Ne={class:"card-header bg-transparent border-0"},Je={class:"text-muted"},Fe={class:"card-body pt-1"},je={class:"col-sm col-lg-6"},Ve={class:"card rounded-3 bg-transparent",style:{height:"270px"}},Ue={class:"card-header bg-transparent border-0 d-flex align-items-center"},Ge={class:"text-muted"},Qe={key:0,class:"text-primary fw-bold ms-auto"},ze={class:"card-body pt-1"},We={class:"col-sm col-lg-6"},qe={class:"card rounded-3 bg-transparent",style:{height:"270px"}},He={class:"card-header bg-transparent border-0 d-flex align-items-center"},Ke={class:"text-muted"},Ye={key:0,class:"text-success fw-bold ms-auto"},Ze={class:"card-body pt-1"},Xe={__name:"peerDataUsageCharts",props:{configurationPeers:Array,configurationInfo:Object},setup(o){Pe.register($e,we,xe,Ce,ke,Oe,Me,De,Ae,Le);const t=o,r=A({timestamp:[],data:[]}),i=A({timestamp:[],data:[]}),C=de(),P=H(),c=A(void 0),m=async()=>{await Q("/api/getWireguardConfigurationRealtimeTraffic",{configurationName:C.params.id},_=>{let b=Ie().format("hh:mm:ss A");(_.data.sent!==0&&_.data.recv!==0||r.value.data.length>0&&i.value.data.length>0)&&(r.value.timestamp.push(b),r.value.data.push(_.data.sent),i.value.timestamp.push(b),i.value.data.push(_.data.recv))})},a=()=>{clearInterval(c.value),c.value=void 0,t.configurationInfo.Status&&(c.value=setInterval(()=>{m()},parseInt(P.Configuration.Server.dashboard_refresh_interval)))};ue(()=>{a()}),ee(()=>t.configurationInfo.Status,()=>{a()}),ee(()=>P.Configuration.Server.dashboard_refresh_interval,()=>{a()}),ne(()=>{clearInterval(c.value),c.value=void 0});const f=B(()=>{let _=t.configurationPeers.filter(b=>b.cumu_data+b.total_data>0);return{labels:_.map(b=>b.name?b.name:`Untitled Peer - ${b.id}`),datasets:[{label:"Total Data Usage",data:_.map(b=>b.cumu_data+b.total_data),backgroundColor:_.map(b=>"#ffc107"),tooltip:{callbacks:{label:b=>`${b.formattedValue} GB`}}}]}}),g=B(()=>({labels:[...r.value.timestamp],datasets:[{label:"Data Sent",data:[...r.value.data],fill:!1,borderColor:"#198754",backgroundColor:"#198754",tension:0}]})),D=B(()=>({labels:[...i.value.timestamp],datasets:[{label:"Data Received",data:[...i.value.data],fill:!1,borderColor:"#0d6efd",backgroundColor:"#0d6efd",tension:0}]})),h=B(()=>({responsive:!0,plugins:{legend:{display:!1}},scales:{x:{ticks:{display:!1},grid:{display:!1}},y:{ticks:{callback:(_,b)=>`${Math.round((_+Number.EPSILON)*1e3)/1e3} GB`},grid:{display:!1}}}})),y=B(()=>({responsive:!0,plugins:{legend:{display:!1},tooltip:{callbacks:{label:_=>`${_.formattedValue} MB/s`}}},scales:{x:{ticks:{display:!1},grid:{display:!0}},y:{ticks:{callback:(_,b)=>`${Math.round((_+Number.EPSILON)*1e3)/1e3} MB/s`},grid:{display:!0}}}}));return(_,b)=>(l(),v("div",Te,[e("div",Ee,[e("div",Be,[e("div",Ne,[e("small",Je,[d(O,{t:"Peers Data Usage"})])]),e("div",Fe,[d(M(Re),{data:f.value,options:h.value,style:{width:"100%",height:"200px","max-height":"200px"}},null,8,["data","options"])])])]),e("div",je,[e("div",Ve,[e("div",Ue,[e("small",Ge,[d(O,{t:"Real Time Received Data Usage"})]),i.value.data.length>0?(l(),v("small",Qe,w(i.value.data[i.value.data.length-1])+" MB/s ",1)):$("",!0)]),e("div",ze,[d(M(re),{options:y.value,data:D.value,style:{width:"100%",height:"200px","max-height":"200px"}},null,8,["options","data"])])])]),e("div",We,[e("div",qe,[e("div",He,[e("small",Ke,[d(O,{t:"Real Time Sent Data Usage"})]),r.value.data.length>0?(l(),v("small",Ye,w(r.value.data[r.value.data.length-1])+" MB/s ",1)):$("",!0)]),e("div",Ze,[d(M(re),{options:y.value,data:g.value,style:{width:"100%",height:"200px","max-height":"200px"}},null,8,["options","data"])])])])]))}},et={name:"peerSearch",components:{LocaleText:O},setup(){const o=H(),t=ce();return{store:o,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")},display:{grid:T("Grid"),list:T("List")},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(o){G("/api/updateDashboardConfigurationItem",{section:"Server",key:"dashboard_sort",value:o},t=>{t.status&&this.store.getConfiguration()})},updateRefreshInterval(o){G("/api/updateDashboardConfigurationItem",{section:"Server",key:"dashboard_refresh_interval",value:o},t=>{t.status&&this.store.getConfiguration()})},updateDisplay(o){G("/api/updateDashboardConfigurationItem",{section:"Server",key:"dashboard_peer_list_display",value:o},t=>{t.status&&this.store.getConfiguration()})},downloadAllPeer(){Q(`/api/downloadAllPeers/${this.configuration.Name}`,{},o=>{o.data.forEach(t=>{t.fileName=t.fileName+".conf"}),window.wireguard.generateZipFiles(o,this.configuration.Name)})}}},tt={class:"d-flex flex-column gap-2 my-4"},st={class:"d-flex gap-2 peerSearchContainer"},ot={class:"dropdown"},nt={"data-bs-toggle":"dropdown",class:"btn w-100 btn-sm text-primary-emphasis bg-primary-subtle rounded-3 border-1 border-primary-subtle position-relative"},at={class:"badge text-bg-primary ms-2"},lt={class:"dropdown-menu rounded-3"},rt=["onClick"],it={class:"ms-auto"},dt={key:0,class:"bi bi-check-circle-fill"},ut={class:"dropdown"},ct={"data-bs-toggle":"dropdown",class:"btn btn-sm w-100 text-primary-emphasis bg-primary-subtle rounded-3 border-1 border-primary-subtle position-relative"},mt={class:"badge text-bg-primary ms-2"},pt={class:"dropdown-menu rounded-3"},ft=["onClick"],gt={class:"ms-auto"},vt={key:0,class:"bi bi-check-circle-fill"},bt={class:"dropdown"},ht={"data-bs-toggle":"dropdown",class:"btn btn-sm w-100 text-primary-emphasis bg-primary-subtle rounded-3 border-1 border-primary-subtle position-relative"},_t={class:"badge text-bg-primary ms-2"},yt={class:"dropdown-menu rounded-3"},St=["onClick"],Pt={class:"ms-auto"},$t={key:0,class:"bi bi-check-circle-fill"};function wt(o,t,r,i,C,P){const c=q("LocaleText");return l(),v("div",tt,[e("div",st,[e("div",ot,[e("button",nt,[t[4]||(t[4]=e("i",{class:"bi bi-sort-up me-2"},null,-1)),d(c,{t:"Sort By"}),e("span",at,w(this.sort[i.store.Configuration.Server.dashboard_sort]),1)]),e("ul",lt,[(l(!0),v(F,null,X(this.sort,(m,a)=>(l(),v("li",null,[e("button",{class:"dropdown-item d-flex align-items-center",onClick:f=>this.updateSort(a)},[e("small",null,w(m),1),e("small",it,[i.store.Configuration.Server.dashboard_sort===a?(l(),v("i",dt)):$("",!0)])],8,rt)]))),256))])]),e("div",ut,[e("button",ct,[t[5]||(t[5]=e("i",{class:"bi bi-arrow-repeat me-2"},null,-1)),d(c,{t:"Refresh Interval"}),e("span",mt,w(this.interval[i.store.Configuration.Server.dashboard_refresh_interval]),1)]),e("ul",pt,[(l(!0),v(F,null,X(this.interval,(m,a)=>(l(),v("li",null,[e("button",{class:"dropdown-item d-flex align-items-center",onClick:f=>this.updateRefreshInterval(a)},[e("small",null,w(m),1),e("small",gt,[i.store.Configuration.Server.dashboard_refresh_interval===a?(l(),v("i",vt)):$("",!0)])],8,ft)]))),256))])]),e("div",bt,[e("button",ht,[e("i",{class:L(["bi me-2","bi-"+i.store.Configuration.Server.dashboard_peer_list_display])},null,2),d(c,{t:"Display"}),e("span",_t,w(this.display[i.store.Configuration.Server.dashboard_peer_list_display]),1)]),e("ul",yt,[(l(!0),v(F,null,X(this.display,(m,a)=>(l(),v("li",null,[e("button",{class:"dropdown-item d-flex align-items-center",onClick:f=>this.updateDisplay(a)},[e("small",null,w(m),1),e("small",Pt,[i.store.Configuration.Server.dashboard_peer_list_display===a?(l(),v("i",$t)):$("",!0)])],8,St)]))),256))])]),e("button",{class:"btn btn-sm text-primary-emphasis bg-primary-subtle rounded-3 border-1 border-primary-subtle ms-lg-auto",onClick:t[0]||(t[0]=m=>this.$emit("search"))},[t[6]||(t[6]=e("i",{class:"bi bi-search me-2"},null,-1)),d(c,{t:"Search"})]),e("button",{class:"btn btn-sm text-primary-emphasis bg-primary-subtle rounded-3 border-1 border-primary-subtle",onClick:t[1]||(t[1]=m=>this.downloadAllPeer())},[t[7]||(t[7]=e("i",{class:"bi bi-download me-2 me-lg-0 me-xl-2"},null,-1)),d(c,{t:"Download All",class:"d-sm-block d-lg-none d-xl-block"})]),e("button",{class:"btn btn-sm text-primary-emphasis bg-primary-subtle rounded-3 border-1 border-primary-subtle",onClick:t[2]||(t[2]=m=>this.$emit("selectPeers"))},[t[8]||(t[8]=e("i",{class:"bi bi-check2-all me-2 me-lg-0 me-xl-2"},null,-1)),d(c,{t:"Select Peers",class:"d-sm-block d-lg-none d-xl-block"})]),e("button",{class:"btn btn-sm text-primary-emphasis bg-primary-subtle rounded-3 border-1 border-primary-subtle",onClick:t[3]||(t[3]=m=>this.$emit("jobsAll")),type:"button","aria-expanded":"false"},[t[9]||(t[9]=e("i",{class:"bi bi-person-walking me-2 me-lg-0 me-xl-2"},null,-1)),d(c,{t:"Active Jobs",class:"d-sm-block d-lg-none d-xl-block"})])])])}const xt=K(et,[["render",wt],["__scopeId","data-v-c96b078a"]]);function Ct(o){return ge()?(ve(o),!0):!1}const me=typeof window<"u"&&typeof document<"u";typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const kt=Object.prototype.toString,Ot=o=>kt.call(o)==="[object Object]",U=()=>{},Mt=Dt();function Dt(){var o,t;return me&&((o=window?.navigator)==null?void 0:o.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 te(o){return Array.isArray(o)?o:[o]}function At(o,t,r){return ee(o,t,{...r,immediate:!0})}const pe=me?window:void 0;function W(o){var t;const r=j(o);return(t=r?.$el)!=null?t:r}function se(...o){const t=[],r=()=>{t.forEach(m=>m()),t.length=0},i=(m,a,f,g)=>(m.addEventListener(a,f,g),()=>m.removeEventListener(a,f,g)),C=B(()=>{const m=te(j(o[0])).filter(a=>a!=null);return m.every(a=>typeof a!="string")?m:void 0}),P=At(()=>{var m,a;return[(a=(m=C.value)==null?void 0:m.map(f=>W(f)))!=null?a:[pe].filter(f=>f!=null),te(j(C.value?o[1]:o[0])),te(M(C.value?o[2]:o[1])),j(C.value?o[3]:o[2])]},([m,a,f,g])=>{if(r(),!m?.length||!a?.length||!f?.length)return;const D=Ot(g)?{...g}:g;t.push(...m.flatMap(h=>a.flatMap(y=>f.map(_=>i(h,y,_,D)))))},{flush:"post"}),c=()=>{P(),r()};return Ct(r),c}let ie=!1;function Lt(o,t,r={}){const{window:i=pe,ignore:C=[],capture:P=!0,detectIframe:c=!1,controls:m=!1}=r;if(!i)return m?{stop:U,cancel:U,trigger:U}:U;if(Mt&&!ie){ie=!0;const n={passive:!0};Array.from(i.document.body.children).forEach(S=>S.addEventListener("click",U,n)),i.document.documentElement.addEventListener("click",U,n)}let a=!0;const f=n=>j(C).some(S=>{if(typeof S=="string")return Array.from(i.document.querySelectorAll(S)).some(k=>k===n.target||n.composedPath().includes(k));{const k=W(S);return k&&(n.target===k||n.composedPath().includes(k))}});function g(n){const S=j(n);return S&&S.$.subTree.shapeFlag===16}function D(n,S){const k=j(n),E=k.$.subTree&&k.$.subTree.children;return E==null||!Array.isArray(E)?!1:E.some(z=>z.el===S.target||S.composedPath().includes(z.el))}const h=n=>{const S=W(o);if(n.target!=null&&!(!(S instanceof Element)&&g(o)&&D(o,n))&&!(!S||S===n.target||n.composedPath().includes(S))){if("detail"in n&&n.detail===0&&(a=!f(n)),!a){a=!0;return}t(n)}};let y=!1;const _=[se(i,"click",n=>{y||(y=!0,setTimeout(()=>{y=!1},0),h(n))},{passive:!0,capture:P}),se(i,"pointerdown",n=>{const S=W(o);a=!f(n)&&!!(S&&!n.composedPath().includes(S))},{passive:!0}),c&&se(i,"blur",n=>{setTimeout(()=>{var S;const k=W(o);((S=i.document.activeElement)==null?void 0:S.tagName)==="IFRAME"&&!k?.contains(i.document.activeElement)&&t(n)},0)},{passive:!0})].filter(Boolean),b=()=>_.forEach(n=>n());return m?{stop:b,cancel:()=>{a=!1},trigger:n=>{a=!0,h(n),a=!1}}:b}const Rt={key:0,class:"position-absolute d-block p-1 px-2 bg-body text-body rounded-3 border shadow"},It={__name:"peerSettingsDropdownTool",props:{icon:String,title:String},emits:["click"],setup(o,{emit:t}){const r=t,i=A(!1);return(C,P)=>(l(),v("a",{class:"dropdown-item text-center px-0 rounded-3 position-relative",role:"button",onMouseenter:P[0]||(P[0]=c=>i.value=!0),onMouseleave:P[1]||(P[1]=c=>i.value=!1),onClick:P[2]||(P[2]=c=>r("click"))},[e("i",{class:L(["me-auto bi",o.icon])},null,2),d(ae,{name:"zoomReversed"},{default:J(()=>[i.value?(l(),v("span",Rt,[e("small",null,[d(O,{t:o.title},null,8,["t"])])])):$("",!0)]),_:1})],32))}},Tt=K(It,[["__scopeId","data-v-d4e41a56"]]),Et={name:"peerSettingsDropdown",components:{PeerSettingsDropdownTool:Tt,LocaleText:O},setup(){return{dashboardStore:H()}},props:{Peer:Object},data(){return{deleteBtnDisabled:!1,restrictBtnDisabled:!1,allowAccessBtnDisabled:!1,confirmDelete:!1}},methods:{downloadPeer(){Q("/api/downloadPeer/"+this.$route.params.id,{id:this.Peer.id},o=>{if(o.status){const t=new Blob([o.data.file],{type:"text/plain"}),r=URL.createObjectURL(t),i=`${o.data.fileName}.conf`,C=document.createElement("a");C.href=r,C.download=i,C.click(),this.dashboardStore.newMessage("WGDashboard","Peer download started","success")}else this.dashboardStore.newMessage("Server",o.message,"danger")})},downloadQRCode(o){Q("/api/downloadPeer/"+this.$route.params.id,{id:this.Peer.id},t=>{t.status?this.$emit(o,t.data.file):this.dashboardStore.newMessage("Server",t.message,"danger")})},deletePeer(){this.deleteBtnDisabled=!0,G(`/api/deletePeers/${this.$route.params.id}`,{peers:[this.Peer.id]},o=>{this.dashboardStore.newMessage("Server",o.message,o.status?"success":"danger"),this.$emit("refresh"),this.deleteBtnDisabled=!1})},restrictPeer(){this.restrictBtnDisabled=!0,G(`/api/restrictPeers/${this.$route.params.id}`,{peers:[this.Peer.id]},o=>{this.dashboardStore.newMessage("Server",o.message,o.status?"success":"danger"),this.$emit("refresh"),this.restrictBtnDisabled=!1})},allowAccessPeer(){this.allowAccessBtnDisabled=!0,G(`/api/allowAccessPeers/${this.$route.params.id}`,{peers:[this.Peer.id]},o=>{this.dashboardStore.newMessage("Server",o.message,o.status?"success":"danger"),this.$emit("refresh"),this.allowAccessBtnDisabled=!1})}}},Bt={class:"dropdown-menu mt-2 shadow-lg d-block rounded-3",style:{"max-width":"200px"}},Nt={style:{"font-size":"0.8rem","padding-left":"var(--bs-dropdown-item-padding-x)","padding-right":"var(--bs-dropdown-item-padding-x)"}},Jt={class:"text-body d-flex"},Ft={class:"ms-auto"},jt={key:1},Vt={class:"w-100 dropdown-item text-muted",style:{"white-space":"break-spaces","font-size":"0.7rem"}},Ut={key:2},Gt={class:"d-flex",style:{"padding-left":"var(--bs-dropdown-item-padding-x)","padding-right":"var(--bs-dropdown-item-padding-x)"}},Qt={key:1,class:"confirmDelete"},zt={style:{"white-space":"break-spaces"},class:"mb-2 d-block fw-bold"},Wt={class:"d-flex w-100 gap-2"},qt=["disabled"],Ht=["disabled"],Kt={key:1};function Yt(o,t,r,i,C,P){const c=q("LocaleText"),m=q("PeerSettingsDropdownTool");return l(),v("ul",Bt,[this.Peer.restricted?(l(),v("li",Kt,[e("a",{class:L(["dropdown-item d-flex text-warning",{disabled:this.allowAccessBtnDisabled}]),onClick:t[11]||(t[11]=a=>this.allowAccessPeer()),role:"button"},[t[25]||(t[25]=e("i",{class:"me-auto bi bi-unlock"},null,-1)),this.allowAccessBtnDisabled?(l(),x(c,{key:1,t:"Allowing Access..."})):(l(),x(c,{key:0,t:"Allow Access"}))],2)])):(l(),v(F,{key:0},[this.confirmDelete?(l(),v("li",Qt,[e("p",zt,[d(c,{t:"Are you sure to delete this peer?"})]),e("div",Wt,[e("button",{onClick:t[9]||(t[9]=a=>this.deletePeer()),disabled:this.deleteBtnDisabled,class:"flex-grow-1 ms-auto btn btn-sm bg-danger"},[d(c,{t:"Yes"})],8,qt),e("button",{disabled:this.deleteBtnDisabled,onClick:t[10]||(t[10]=a=>this.confirmDelete=!1),class:"flex-grow-1 btn btn-sm bg-secondary-subtle text-secondary-emphasis border border-secondary-subtle"},[d(c,{t:"No"})],8,Ht)])])):(l(),v(F,{key:0},[this.Peer.status==="running"?(l(),v(F,{key:0},[e("li",Nt,[e("span",Jt,[t[12]||(t[12]=e("i",{class:"bi bi-box-arrow-in-right"},null,-1)),e("span",Ft,w(this.Peer.endpoint),1)])]),t[13]||(t[13]=e("li",null,[e("hr",{class:"dropdown-divider"})],-1))],64)):$("",!0),this.Peer.private_key?(l(),v("li",Ut,[t[14]||(t[14]=e("div",{class:"text-center text-muted"},null,-1)),e("div",Gt,[d(m,{icon:"bi-download",title:"Download",onClick:t[0]||(t[0]=a=>this.downloadPeer())}),d(m,{icon:"bi-qr-code",title:"QR Code",onClick:t[1]||(t[1]=a=>this.$emit("qrcode"))}),d(m,{icon:"bi-body-text",title:"Configuration File",onClick:t[2]||(t[2]=a=>this.$emit("configurationFile"))}),d(m,{icon:"bi-share",title:"Share Peer",onClick:t[3]||(t[3]=a=>this.$emit("share"))})])])):(l(),v("li",jt,[e("small",Vt,[d(c,{t:"Download & QR Code is not available due to no private key set for this peer"})])])),t[23]||(t[23]=e("li",null,[e("hr",{class:"dropdown-divider"})],-1)),e("li",null,[e("a",{class:"dropdown-item d-flex",role:"button",onClick:t[4]||(t[4]=a=>this.$emit("setting"))},[t[15]||(t[15]=e("i",{class:"me-auto bi bi-pen"},null,-1)),t[16]||(t[16]=N()),d(c,{t:"Peer Settings"})])]),e("li",null,[e("a",{class:"dropdown-item d-flex",role:"button",onClick:t[5]||(t[5]=a=>this.$emit("jobs"))},[t[17]||(t[17]=e("i",{class:"me-auto bi bi-app-indicator"},null,-1)),t[18]||(t[18]=N()),d(c,{t:"Schedule Jobs"})])]),e("li",null,[e("a",{class:"dropdown-item d-flex",role:"button",onClick:t[6]||(t[6]=a=>this.$emit("assign"))},[t[19]||(t[19]=e("i",{class:"me-auto bi bi-diagram-2"},null,-1)),t[20]||(t[20]=N()),d(c,{t:"Assign Peer"})])]),t[24]||(t[24]=e("li",null,[e("hr",{class:"dropdown-divider"})],-1)),e("li",null,[e("a",{class:L(["dropdown-item d-flex text-warning",{disabled:this.restrictBtnDisabled}]),onClick:t[7]||(t[7]=a=>this.restrictPeer()),role:"button"},[t[21]||(t[21]=e("i",{class:"me-auto bi bi-lock"},null,-1)),this.restrictBtnDisabled?(l(),x(c,{key:1,t:"Restricting..."})):(l(),x(c,{key:0,t:"Restrict Access"}))],2)]),e("li",null,[e("a",{class:L(["dropdown-item d-flex fw-bold text-danger",{disabled:this.deleteBtnDisabled}]),onClick:t[8]||(t[8]=a=>this.confirmDelete=!0),role:"button"},[t[22]||(t[22]=e("i",{class:"me-auto bi bi-trash"},null,-1)),this.deleteBtnDisabled?(l(),x(c,{key:1,t:"Deleting..."})):(l(),x(c,{key:0,t:"Delete"}))],2)])],64))],64))])}const Zt=K(Et,[["render",Yt],["__scopeId","data-v-d636c35d"]]),Xt={name:"peer",methods:{GetLocale:T},components:{LocaleText:O,PeerSettingsDropdown:Zt},props:{Peer:Object},data(){return{}},setup(){const o=A(null),t=A(!1),r=H();return Lt(o,i=>{t.value=!1}),{target:o,subMenuOpened:t,dashboardStore:r}},computed:{getLatestHandshake(){return this.Peer.latest_handshake.includes(",")?this.Peer.latest_handshake.split(",")[0]:this.Peer.latest_handshake}}},es={key:0,class:"card-header bg-transparent d-flex align-items-center gap-2 border-0"},ts={key:0,style:{"font-size":"0.8rem",color:"#28a745"},class:"d-flex align-items-center"},ss={style:{"font-size":"0.8rem"},class:"ms-auto d-flex gap-2"},os={class:"text-primary"},ns={class:"text-success"},as={key:0,class:"text-secondary"},ls={key:1,class:"border-0 card-header bg-transparent text-warning fw-bold",style:{"font-size":"0.8rem"}},rs={class:"card-body pt-1",style:{"font-size":"0.9rem"}},is={class:"text-muted"},ds={class:"d-block"},us={class:"text-muted"},cs={class:"d-block"},ms={class:"d-flex align-items-end ms-auto"};function ps(o,t,r,i,C,P){const c=q("LocaleText"),m=q("PeerSettingsDropdown");return l(),v("div",{class:L(["card shadow-sm rounded-3 peerCard",{"border-warning":r.Peer.restricted}])},[e("div",null,[r.Peer.restricted?(l(),v("div",ls,[t[14]||(t[14]=e("i",{class:"bi-lock-fill me-2"},null,-1)),d(c,{t:"Access Restricted"})])):(l(),v("div",es,[e("div",{class:L(["dot ms-0",{active:r.Peer.status==="running"}])},null,2),i.dashboardStore.Configuration.Server.dashboard_peer_list_display==="list"&&r.Peer.status==="running"?(l(),v("div",ts,[t[8]||(t[8]=e("i",{class:"bi bi-box-arrow-in-right me-2"},null,-1)),e("span",null,w(r.Peer.endpoint),1)])):$("",!0),e("div",ss,[e("span",os,[t[9]||(t[9]=e("i",{class:"bi bi-arrow-down"},null,-1)),e("strong",null,w((r.Peer.cumu_receive+r.Peer.total_receive).toFixed(4)),1),t[10]||(t[10]=N(" GB "))]),e("span",ns,[t[11]||(t[11]=e("i",{class:"bi bi-arrow-up"},null,-1)),e("strong",null,w((r.Peer.cumu_sent+r.Peer.total_sent).toFixed(4)),1),t[12]||(t[12]=N(" GB "))]),r.Peer.latest_handshake!=="No Handshake"?(l(),v("span",as,[t[13]||(t[13]=e("i",{class:"bi bi-arrows-angle-contract"},null,-1)),N(" "+w(P.getLatestHandshake)+" ago ",1)])):$("",!0)])]))]),e("div",rs,[e("h6",null,w(r.Peer.name?r.Peer.name:P.GetLocale("Untitled Peer")),1),e("div",{class:L(["d-flex",[i.dashboardStore.Configuration.Server.dashboard_peer_list_display==="grid"?"gap-1 flex-column":"flex-row gap-3"]])},[e("div",{class:L({"d-flex gap-2 align-items-center":i.dashboardStore.Configuration.Server.dashboard_peer_list_display==="list"})},[e("small",is,[d(c,{t:"Public Key"})]),e("small",ds,[e("samp",null,w(r.Peer.id),1)])],2),e("div",{class:L({"d-flex gap-2 align-items-center":i.dashboardStore.Configuration.Server.dashboard_peer_list_display==="list"})},[e("small",us,[d(c,{t:"Allowed IPs"})]),e("small",cs,[e("samp",null,w(r.Peer.allowed_ip),1)])],2),e("div",ms,[e("div",{class:L(["ms-auto px-2 rounded-3 subMenuBtn",{active:this.subMenuOpened}])},[e("a",{role:"button",class:"text-body",onClick:t[0]||(t[0]=a=>this.subMenuOpened=!0)},t[15]||(t[15]=[e("h5",{class:"mb-0"},[e("i",{class:"bi bi-three-dots"})],-1)])),d(ae,{name:"slide-fade"},{default:J(()=>[this.subMenuOpened?(l(),x(m,{key:0,onQrcode:t[1]||(t[1]=a=>this.$emit("qrcode")),onConfigurationFile:t[2]||(t[2]=a=>this.$emit("configurationFile")),onSetting:t[3]||(t[3]=a=>this.$emit("setting")),onJobs:t[4]||(t[4]=a=>this.$emit("jobs")),onRefresh:t[5]||(t[5]=a=>this.$emit("refresh")),onShare:t[6]||(t[6]=a=>this.$emit("share")),onAssign:t[7]||(t[7]=a=>this.$emit("assign")),Peer:r.Peer,ref:"target"},null,8,["Peer"])):$("",!0)]),_:1})],2)])],2)])],2)}const fs=K(Xt,[["render",ps],["__scopeId","data-v-d500f94d"]]),gs={__name:"peerListModals",props:{configurationModals:Object,configurationModalSelectedPeer:Object},emits:["refresh"],setup(o,{emit:t}){const r=t,i=R(()=>I(()=>import("./peerAssignModal-CoUWwCk3.js"),__vite__mapDeps([0,1,2,3,4,5]))),C=R(()=>I(()=>import("./peerShareLinkModal-DDmGp_KD.js"),__vite__mapDeps([6,2,3,7,8,1,9]))),P=R(()=>I(()=>import("./peerJobs-kZAK-mB1.js"),__vite__mapDeps([10,11,2,3,8,7,1,12,13]))),c=R(()=>I(()=>import("./peerQRCode-BiVHr8UY.js"),__vite__mapDeps([14,15,2,3,1,16]))),m=R(()=>I(()=>import("./peerConfigurationFile-HFbRJR3C.js"),__vite__mapDeps([17,2,3,1,15,18]))),a=R(()=>I(()=>import("./peerSettings-DJBxRPdI.js"),__vite__mapDeps([19,2,3,1,20])));return(f,g)=>(l(),x(oe,{name:"zoom"},{default:J(()=>[o.configurationModals.peerSetting.modalOpen?(l(),x(M(a),{key:"PeerSettingsModal",selectedPeer:o.configurationModalSelectedPeer,onRefresh:g[0]||(g[0]=D=>r("refresh")),onClose:g[1]||(g[1]=D=>o.configurationModals.peerSetting.modalOpen=!1)},null,8,["selectedPeer"])):$("",!0),o.configurationModals.peerQRCode.modalOpen?(l(),x(M(c),{key:"PeerQRCodeModal",selectedPeer:o.configurationModalSelectedPeer,onClose:g[2]||(g[2]=D=>o.configurationModals.peerQRCode.modalOpen=!1)},null,8,["selectedPeer"])):$("",!0),o.configurationModals.peerScheduleJobs.modalOpen?(l(),x(M(P),{key:"PeerJobsModal",onRefresh:g[3]||(g[3]=D=>r("refresh")),selectedPeer:o.configurationModalSelectedPeer,onClose:g[4]||(g[4]=D=>o.configurationModals.peerScheduleJobs.modalOpen=!1)},null,8,["selectedPeer"])):$("",!0),o.configurationModals.peerShare.modalOpen?(l(),x(M(C),{key:"PeerShareLinkModal",onClose:g[5]||(g[5]=D=>{o.configurationModals.peerShare.modalOpen=!1}),selectedPeer:o.configurationModalSelectedPeer},null,8,["selectedPeer"])):$("",!0),o.configurationModals.peerConfigurationFile.modalOpen?(l(),x(M(m),{key:4,onClose:g[6]||(g[6]=D=>o.configurationModals.peerConfigurationFile.modalOpen=!1),selectedPeer:o.configurationModalSelectedPeer},null,8,["selectedPeer"])):$("",!0),o.configurationModals.assignPeer.modalOpen?(l(),x(M(i),{key:5,selectedPeer:o.configurationModalSelectedPeer,onClose:g[7]||(g[7]=D=>o.configurationModals.assignPeer.modalOpen=!1)},null,8,["selectedPeer"])):$("",!0)]),_:1}))}},vs={style:{"margin-bottom":"20px",height:"1px"},id:"loadMore"},bs={__name:"peerIntersectionObserver",props:["peerListLength","showPeersCount"],emits:["loadMore"],setup(o,{emit:t}){const r=A(void 0),i=t;return ue(()=>{r.value=new IntersectionObserver(C=>{C.forEach(P=>{P.isIntersecting&&i("loadMore")})},{rootMargin:"20px",threshold:1}),r.value.observe(document.querySelector("#loadMore"))}),ne(()=>{r.value.disconnect()}),(C,P)=>(l(),v("div",vs))}},hs={class:"container-fluid"},_s={class:"d-flex align-items-sm-center flex-column flex-sm-row gap-3"},ys={class:"text-muted d-flex align-items-center gap-2"},Ss={class:"mb-0"},Ps={class:"d-flex align-items-center gap-3"},$s={class:"mb-0 display-4"},ws={class:"ms-sm-auto d-flex gap-2 flex-column"},xs={class:"card rounded-3 bg-transparent"},Cs={class:"card-body py-2 d-flex align-items-center"},ks={class:"text-muted"},Os={class:"form-check form-switch mb-0 ms-auto pe-0 me-0"},Ms=["for"],Ds={key:2,class:"spinner-border spinner-border-sm ms-2","aria-hidden":"true"},As=["disabled","id"],Ls={class:"d-flex gap-2"},Rs={class:"row mt-3 gy-2 gx-2 mb-2"},Is={class:"col-12 col-lg-3"},Ts={class:"card rounded-3 bg-transparent h-100"},Es={class:"card-body py-2 d-flex flex-column justify-content-center"},Bs={class:"mb-0 text-muted"},Ns={class:"col-12 col-lg-3"},Js={class:"card rounded-3 bg-transparent h-100"},Fs={class:"card-body py-2 d-flex flex-column justify-content-center"},js={class:"mb-0 text-muted"},Vs={style:{"word-break":"break-all"},class:"col-12 col-lg-6"},Us={class:"card rounded-3 bg-transparent h-100"},Gs={class:"card-body py-2 d-flex flex-column justify-content-center"},Qs={class:"mb-0 text-muted"},zs={class:"row gx-2 gy-2 mb-2"},Ws={class:"col-12 col-lg-3"},qs={class:"card rounded-3 bg-transparent h-100"},Hs={class:"card-body d-flex"},Ks={class:"mb-0 text-muted"},Ys={class:"h4"},Zs={class:"col-12 col-lg-3"},Xs={class:"card rounded-3 bg-transparent h-100"},eo={class:"card-body d-flex"},to={class:"mb-0 text-muted"},so={class:"h4"},oo={class:"col-12 col-lg-3"},no={class:"card rounded-3 bg-transparent h-100"},ao={class:"card-body d-flex"},lo={class:"mb-0 text-muted"},ro={class:"h4 text-primary"},io={class:"col-12 col-lg-3"},uo={class:"card rounded-3 bg-transparent h-100"},co={class:"card-body d-flex"},mo={class:"mb-0 text-muted"},po={class:"h4 text-success"},fo={style:{"margin-bottom":"80px"}},go=20,vo={__name:"peerList",async setup(o){let t,r;const i=R(()=>I(()=>import("./peerSearchBar-3fBKUdTH.js"),__vite__mapDeps([21,2,3,1,22]))),C=R(()=>I(()=>import("./peerJobsAllModal-BBEOmypX.js"),__vite__mapDeps([23,11,2,3,8,7,1,12]))),P=R(()=>I(()=>import("./peerJobsLogsModal-CUk9QsM-.js"),__vite__mapDeps([24,7,2,3,1]))),c=R(()=>I(()=>import("./editConfiguration-DkzbDT16.js"),__vite__mapDeps([25,2,3,1,7,26]))),m=R(()=>I(()=>import("./selectPeers-CV6q0Qd4.js"),__vite__mapDeps([27,2,3,1,28]))),a=R(()=>I(()=>import("./peerAddModal-Dbk6LNS2.js"),__vite__mapDeps([29,2,3,1,30]))),f=H(),g=ce(),D=de(),h=A({}),y=A([]),_=A(!1),b=A({}),n=A({peerNew:{modalOpen:!1},peerSetting:{modalOpen:!1},peerScheduleJobs:{modalOpen:!1},peerQRCode:{modalOpen:!1},peerConfigurationFile:{modalOpen:!1},peerCreate:{modalOpen:!1},peerScheduleJobsAll:{modalOpen:!1},peerScheduleJobsLogs:{modalOpen:!1},peerShare:{modalOpen:!1},editConfiguration:{modalOpen:!1},selectPeers:{modalOpen:!1},backupRestore:{modalOpen:!1},deleteConfiguration:{modalOpen:!1},editRawConfigurationFile:{modalOpen:!1},assignPeer:{modalOpen:!1}}),S=A(!1),k=async()=>{await Q("/api/getWireguardConfigurationInfo",{configurationName:D.params.id},p=>{p.status&&(h.value=p.data.configurationInfo,y.value=p.data.configurationPeers,y.value.forEach(s=>{s.restricted=!1}),p.data.configurationRestrictedPeers.forEach(s=>{s.restricted=!0,y.value.push(s)}))})};[t,r]=be(()=>k()),await t,r();const E=A(void 0),z=()=>{clearInterval(E.value),E.value=setInterval(async()=>{await k()},parseInt(f.Configuration.Server.dashboard_refresh_interval))};z(),ne(()=>{clearInterval(E.value),E.value=void 0}),ee(()=>f.Configuration.Server.dashboard_refresh_interval,()=>{z()});const fe=async()=>{_.value=!0,await Q("/api/toggleWireguardConfiguration",{configurationName:h.value.Name},p=>{p.status?f.newMessage("Server",`${h.value.Name} ${p.data?"is on":"is off"}`,"success"):f.newMessage("Server",p.message,"danger"),g.Configurations.find(s=>s.Name===h.value.Name).Status=p.data,h.value.Status=p.data,_.value=!1})},Y=B(()=>({connectedPeers:y.value.filter(p=>p.status==="running").length,totalUsage:y.value.length>0?y.value.filter(p=>!p.restricted).map(p=>p.total_data+p.cumu_data).reduce((p,s)=>p+s,0).toFixed(4):0,totalReceive:y.value.length>0?y.value.filter(p=>!p.restricted).map(p=>p.total_receive+p.cumu_receive).reduce((p,s)=>p+s,0).toFixed(4):0,totalSent:y.value.length>0?y.value.filter(p=>!p.restricted).map(p=>p.total_sent+p.cumu_sent).reduce((p,s)=>p+s,0).toFixed(4):0})),Z=A(10),le=B(()=>{const p=g.searchString?y.value.filter(s=>s.name.includes(g.searchString)||s.id.includes(g.searchString)||s.allowed_ip.includes(g.searchString)):y.value;return f.Configuration.Server.dashboard_sort==="restricted"?p.sort((s,u)=>s[f.Configuration.Server.dashboard_sort]u[f.Configuration.Server.dashboard_sort]?-1:0).slice(0,Z.value):p.sort((s,u)=>s[f.Configuration.Server.dashboard_sort]u[f.Configuration.Server.dashboard_sort]?1:0).slice(0,Z.value)});return(p,s)=>(l(),v("div",hs,[e("div",_s,[e("div",null,[e("div",ys,[e("h5",Ss,[d(Se,{protocol:h.value.Protocol},null,8,["protocol"])])]),e("div",Ps,[e("h1",$s,[e("samp",null,w(h.value.Name),1)])])]),e("div",ws,[e("div",xs,[e("div",Cs,[e("small",ks,[d(O,{t:"Status"})]),e("div",{class:L(["dot ms-2",{active:h.value.Status}])},null,2),e("div",Os,[e("label",{class:"form-check-label",style:{cursor:"pointer"},for:"switch"+h.value.id},[h.value.Status&&!_.value?(l(),x(O,{key:0,t:"On"})):!h.value.Status&&!_.value?(l(),x(O,{key:1,t:"Off"})):$("",!0),_.value?(l(),v("span",Ds)):$("",!0)],8,Ms),he(e("input",{class:"form-check-input",style:{cursor:"pointer"},disabled:_.value,type:"checkbox",role:"switch",id:"switch"+h.value.id,onChange:s[0]||(s[0]=u=>fe()),"onUpdate:modelValue":s[1]||(s[1]=u=>h.value.Status=u)},null,40,As),[[_e,h.value.Status]])])])]),e("div",Ls,[e("a",{role:"button",onClick:s[2]||(s[2]=u=>n.value.peerNew.modalOpen=!0),class:"titleBtn py-2 text-decoration-none btn text-primary-emphasis bg-primary-subtle rounded-3 border-1 border-primary-subtle"},[s[29]||(s[29]=e("i",{class:"bi bi-plus-circle me-2"},null,-1)),d(O,{t:"Peer"})]),e("button",{class:"titleBtn py-2 text-decoration-none btn text-primary-emphasis bg-primary-subtle rounded-3 border-1 border-primary-subtle",onClick:s[3]||(s[3]=u=>n.value.editConfiguration.modalOpen=!0),type:"button","aria-expanded":"false"},[s[30]||(s[30]=e("i",{class:"bi bi-gear-fill me-2"},null,-1)),d(O,{t:"Configuration Settings"})])])])]),s[35]||(s[35]=e("hr",null,null,-1)),e("div",Rs,[e("div",Is,[e("div",Ts,[e("div",Es,[e("p",Bs,[e("small",null,[d(O,{t:"Address"})])]),N(" "+w(h.value.Address),1)])])]),e("div",Ns,[e("div",Js,[e("div",Fs,[e("p",js,[e("small",null,[d(O,{t:"Listen Port"})])]),N(" "+w(h.value.ListenPort),1)])])]),e("div",Vs,[e("div",Us,[e("div",Gs,[e("p",Qs,[e("small",null,[d(O,{t:"Public Key"})])]),e("samp",null,w(h.value.PublicKey),1)])])])]),e("div",zs,[e("div",Ws,[e("div",qs,[e("div",Hs,[e("div",null,[e("p",Ks,[e("small",null,[d(O,{t:"Connected Peers"})])]),e("strong",Ys,w(Y.value.connectedPeers)+" / "+w(y.value.length),1)]),s[31]||(s[31]=e("i",{class:"bi bi-ethernet ms-auto h2 text-muted"},null,-1))])])]),e("div",Zs,[e("div",Xs,[e("div",eo,[e("div",null,[e("p",to,[e("small",null,[d(O,{t:"Total Usage"})])]),e("strong",so,w(Y.value.totalUsage)+" GB",1)]),s[32]||(s[32]=e("i",{class:"bi bi-arrow-down-up ms-auto h2 text-muted"},null,-1))])])]),e("div",oo,[e("div",no,[e("div",ao,[e("div",null,[e("p",lo,[e("small",null,[d(O,{t:"Total Received"})])]),e("strong",ro,w(Y.value.totalReceive)+" GB",1)]),s[33]||(s[33]=e("i",{class:"bi bi-arrow-down ms-auto h2 text-muted"},null,-1))])])]),e("div",io,[e("div",uo,[e("div",co,[e("div",null,[e("p",mo,[e("small",null,[d(O,{t:"Total Sent"})])]),e("strong",po,w(Y.value.totalSent)+" GB",1)]),s[34]||(s[34]=e("i",{class:"bi bi-arrow-up ms-auto h2 text-muted"},null,-1))])])])]),d(Xe,{configurationPeers:y.value,configurationInfo:h.value},null,8,["configurationPeers","configurationInfo"]),s[36]||(s[36]=e("hr",null,null,-1)),e("div",fo,[y.value.length>0?(l(),x(xt,{key:0,onSearch:s[4]||(s[4]=u=>S.value=!0),onJobsAll:s[5]||(s[5]=u=>n.value.peerScheduleJobsAll.modalOpen=!0),onJobLogs:s[6]||(s[6]=u=>n.value.peerScheduleJobsLogs.modalOpen=!0),onEditConfiguration:s[7]||(s[7]=u=>n.value.editConfiguration.modalOpen=!0),onSelectPeers:s[8]||(s[8]=u=>n.value.selectPeers.modalOpen=!0),onBackupRestore:s[9]||(s[9]=u=>n.value.backupRestore.modalOpen=!0),onDeleteConfiguration:s[10]||(s[10]=u=>n.value.deleteConfiguration.modalOpen=!0),configuration:h.value},null,8,["configuration"])):$("",!0),d(oe,{name:"peerList",tag:"div",class:"row gx-2 gy-2 z-0 position-relative"},{default:J(()=>[(l(!0),v(F,null,X(le.value,u=>(l(),v("div",{class:L(["col-12",{"col-lg-6 col-xl-4":M(f).Configuration.Server.dashboard_peer_list_display==="grid"}]),key:u.id},[d(fs,{Peer:u,onShare:V=>{n.value.peerShare.modalOpen=!0,b.value=u},onRefresh:s[11]||(s[11]=V=>k()),onJobs:V=>{n.value.peerScheduleJobs.modalOpen=!0,b.value=u},onSetting:V=>{n.value.peerSetting.modalOpen=!0,b.value=u},onQrcode:V=>{b.value=u,n.value.peerQRCode.modalOpen=!0},onConfigurationFile:V=>{b.value=u,n.value.peerConfigurationFile.modalOpen=!0},onAssign:V=>{b.value=u,n.value.assignPeer.modalOpen=!0}},null,8,["Peer","onShare","onJobs","onSetting","onQrcode","onConfigurationFile","onAssign"])],2))),128))]),_:1})]),d(ae,{name:"slideUp"},{default:J(()=>[S.value?(l(),x(M(i),{key:0,onClose:s[12]||(s[12]=u=>S.value=!1)})):$("",!0)]),_:1}),d(gs,{configurationModals:n.value,configurationModalSelectedPeer:b.value,onRefresh:s[13]||(s[13]=u=>k())},null,8,["configurationModals","configurationModalSelectedPeer"]),d(oe,{name:"zoom"},{default:J(()=>[(l(),x(ye,{key:"PeerAddModal"},{default:J(()=>[n.value.peerNew.modalOpen?(l(),x(M(a),{key:0,onClose:s[14]||(s[14]=u=>n.value.peerNew.modalOpen=!1),onAddedPeers:s[15]||(s[15]=u=>{n.value.peerNew.modalOpen=!1,k()})})):$("",!0)]),_:1})),n.value.peerScheduleJobsAll.modalOpen?(l(),x(M(C),{key:"PeerJobsAllModal",onRefresh:s[16]||(s[16]=u=>k()),onAllLogs:s[17]||(s[17]=u=>n.value.peerScheduleJobsLogs.modalOpen=!0),onClose:s[18]||(s[18]=u=>n.value.peerScheduleJobsAll.modalOpen=!1),configurationPeers:y.value},null,8,["configurationPeers"])):$("",!0),n.value.peerScheduleJobsLogs.modalOpen?(l(),x(M(P),{key:"PeerJobsLogsModal",onClose:s[19]||(s[19]=u=>n.value.peerScheduleJobsLogs.modalOpen=!1),configurationInfo:h.value},null,8,["configurationInfo"])):$("",!0),n.value.editConfiguration.modalOpen?(l(),x(M(c),{key:"EditConfigurationModal",onEditRaw:s[20]||(s[20]=u=>n.value.editRawConfigurationFile.modalOpen=!0),onClose:s[21]||(s[21]=u=>n.value.editConfiguration.modalOpen=!1),onDataChanged:s[22]||(s[22]=u=>h.value=u),onRefresh:s[23]||(s[23]=u=>k()),onBackupRestore:s[24]||(s[24]=u=>n.value.backupRestore.modalOpen=!0),onDeleteConfiguration:s[25]||(s[25]=u=>n.value.deleteConfiguration.modalOpen=!0),configurationInfo:h.value},null,8,["configurationInfo"])):$("",!0),n.value.selectPeers.modalOpen?(l(),x(M(m),{key:3,onRefresh:s[26]||(s[26]=u=>k()),configurationPeers:y.value,onClose:s[27]||(s[27]=u=>n.value.selectPeers.modalOpen=!1)},null,8,["configurationPeers"])):$("",!0)]),_:1}),d(bs,{showPeersCount:Z.value,peerListLength:le.value.length,onLoadMore:s[28]||(s[28]=u=>Z.value+=go)},null,8,["showPeersCount","peerListLength"])]))}},Po=K(vo,[["__scopeId","data-v-f74f78f2"]]);export{Po as default}; +const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/peerAssignModal-5HoPs6IP.js","assets/localeText-n7rlaTGQ.js","assets/index-Upsq31TS.js","assets/index-wGh3t2RU.css","assets/DashboardClientAssignmentStore-DpqDqqOP.js","assets/peerAssignModal--_bmFbmn.css","assets/peerShareLinkModal-rl2Nl0hw.js","assets/dayjs.min-Cdu5c05l.js","assets/vue-datepicker-COnDbf6W.js","assets/peerShareLinkModal-DgDHiTOw.css","assets/peerJobs-DDiv72oD.js","assets/schedulePeerJob-CKnHZfdd.js","assets/schedulePeerJob-BGJSEouo.css","assets/peerJobs-D_dDl936.css","assets/peerQRCode-CgpUOip9.js","assets/browser-Bcujcoof.js","assets/peerQRCode-DuWWfBch.css","assets/peerConfigurationFile-D43SrB3i.js","assets/peerConfigurationFile-Z9ms5mIx.css","assets/peerSettings-BVjjHyUZ.js","assets/peerSettings-CSjO_Okh.css","assets/peerSearchBar-CCwSm3x3.js","assets/peerSearchBar-0uWV_0iv.css","assets/peerJobsAllModal-B4Fcsytd.js","assets/peerJobsLogsModal-YBNe6GAN.js","assets/editConfiguration-C458Rndf.js","assets/editConfiguration-ChlGwssr.css","assets/selectPeers-C9VF1n58.js","assets/selectPeers-ChWyERy7.css","assets/peerAddModal-Emzzfw1d.js","assets/peerAddModal-B4gIHs91.css"])))=>i.map(i=>d[i]); +import{r as A,L as de,D as H,o as ue,H as ee,x as ne,q as B,c as v,f as l,a as e,b as d,u as M,d as $,t as w,g as Q,_ as K,h as q,F,i as X,n as L,z as G,G as T,W as ce,M as ge,N as ve,O as j,w as J,j as ae,e as N,k as x,P as R,T as oe,Q as I,K as be,m as he,v as _e,S as ye}from"./index-Upsq31TS.js";import{_ as Se}from"./protocolBadge-CWFrznYs.js";import{L as O}from"./localeText-n7rlaTGQ.js";import{C as Pe,L as $e,B as we,a as xe,b as Ce,c as ke,p as Oe,d as Me,e as De,f as Ae,P as Le,h as Re,g as re}from"./index-C5CQcTdj.js";import{d as Ie}from"./dayjs.min-Cdu5c05l.js";const Te={class:"row gx-2 gy-2 mb-3"},Ee={class:"col-12"},Be={class:"card rounded-3 bg-transparent",style:{height:"270px"}},Ne={class:"card-header bg-transparent border-0"},Je={class:"text-muted"},Fe={class:"card-body pt-1"},je={class:"col-sm col-lg-6"},Ve={class:"card rounded-3 bg-transparent",style:{height:"270px"}},Ue={class:"card-header bg-transparent border-0 d-flex align-items-center"},Ge={class:"text-muted"},Qe={key:0,class:"text-primary fw-bold ms-auto"},ze={class:"card-body pt-1"},We={class:"col-sm col-lg-6"},qe={class:"card rounded-3 bg-transparent",style:{height:"270px"}},He={class:"card-header bg-transparent border-0 d-flex align-items-center"},Ke={class:"text-muted"},Ye={key:0,class:"text-success fw-bold ms-auto"},Ze={class:"card-body pt-1"},Xe={__name:"peerDataUsageCharts",props:{configurationPeers:Array,configurationInfo:Object},setup(o){Pe.register($e,we,xe,Ce,ke,Oe,Me,De,Ae,Le);const t=o,r=A({timestamp:[],data:[]}),i=A({timestamp:[],data:[]}),C=de(),P=H(),c=A(void 0),m=async()=>{await Q("/api/getWireguardConfigurationRealtimeTraffic",{configurationName:C.params.id},_=>{let b=Ie().format("hh:mm:ss A");(_.data.sent!==0&&_.data.recv!==0||r.value.data.length>0&&i.value.data.length>0)&&(r.value.timestamp.push(b),r.value.data.push(_.data.sent),i.value.timestamp.push(b),i.value.data.push(_.data.recv))})},a=()=>{clearInterval(c.value),c.value=void 0,t.configurationInfo.Status&&(c.value=setInterval(()=>{m()},parseInt(P.Configuration.Server.dashboard_refresh_interval)))};ue(()=>{a()}),ee(()=>t.configurationInfo.Status,()=>{a()}),ee(()=>P.Configuration.Server.dashboard_refresh_interval,()=>{a()}),ne(()=>{clearInterval(c.value),c.value=void 0});const f=B(()=>{let _=t.configurationPeers.filter(b=>b.cumu_data+b.total_data>0);return{labels:_.map(b=>b.name?b.name:`Untitled Peer - ${b.id}`),datasets:[{label:"Total Data Usage",data:_.map(b=>b.cumu_data+b.total_data),backgroundColor:_.map(b=>"#ffc107"),tooltip:{callbacks:{label:b=>`${b.formattedValue} GB`}}}]}}),g=B(()=>({labels:[...r.value.timestamp],datasets:[{label:"Data Sent",data:[...r.value.data],fill:!1,borderColor:"#198754",backgroundColor:"#198754",tension:0}]})),D=B(()=>({labels:[...i.value.timestamp],datasets:[{label:"Data Received",data:[...i.value.data],fill:!1,borderColor:"#0d6efd",backgroundColor:"#0d6efd",tension:0}]})),h=B(()=>({responsive:!0,plugins:{legend:{display:!1}},scales:{x:{ticks:{display:!1},grid:{display:!1}},y:{ticks:{callback:(_,b)=>`${Math.round((_+Number.EPSILON)*1e3)/1e3} GB`},grid:{display:!1}}}})),y=B(()=>({responsive:!0,plugins:{legend:{display:!1},tooltip:{callbacks:{label:_=>`${_.formattedValue} MB/s`}}},scales:{x:{ticks:{display:!1},grid:{display:!0}},y:{ticks:{callback:(_,b)=>`${Math.round((_+Number.EPSILON)*1e3)/1e3} MB/s`},grid:{display:!0}}}}));return(_,b)=>(l(),v("div",Te,[e("div",Ee,[e("div",Be,[e("div",Ne,[e("small",Je,[d(O,{t:"Peers Data Usage"})])]),e("div",Fe,[d(M(Re),{data:f.value,options:h.value,style:{width:"100%",height:"200px","max-height":"200px"}},null,8,["data","options"])])])]),e("div",je,[e("div",Ve,[e("div",Ue,[e("small",Ge,[d(O,{t:"Real Time Received Data Usage"})]),i.value.data.length>0?(l(),v("small",Qe,w(i.value.data[i.value.data.length-1])+" MB/s ",1)):$("",!0)]),e("div",ze,[d(M(re),{options:y.value,data:D.value,style:{width:"100%",height:"200px","max-height":"200px"}},null,8,["options","data"])])])]),e("div",We,[e("div",qe,[e("div",He,[e("small",Ke,[d(O,{t:"Real Time Sent Data Usage"})]),r.value.data.length>0?(l(),v("small",Ye,w(r.value.data[r.value.data.length-1])+" MB/s ",1)):$("",!0)]),e("div",Ze,[d(M(re),{options:y.value,data:g.value,style:{width:"100%",height:"200px","max-height":"200px"}},null,8,["options","data"])])])])]))}},et={name:"peerSearch",components:{LocaleText:O},setup(){const o=H(),t=ce();return{store:o,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")},display:{grid:T("Grid"),list:T("List")},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(o){G("/api/updateDashboardConfigurationItem",{section:"Server",key:"dashboard_sort",value:o},t=>{t.status&&this.store.getConfiguration()})},updateRefreshInterval(o){G("/api/updateDashboardConfigurationItem",{section:"Server",key:"dashboard_refresh_interval",value:o},t=>{t.status&&this.store.getConfiguration()})},updateDisplay(o){G("/api/updateDashboardConfigurationItem",{section:"Server",key:"dashboard_peer_list_display",value:o},t=>{t.status&&this.store.getConfiguration()})},downloadAllPeer(){Q(`/api/downloadAllPeers/${this.configuration.Name}`,{},o=>{o.data.forEach(t=>{t.fileName=t.fileName+".conf"}),window.wireguard.generateZipFiles(o,this.configuration.Name)})}}},tt={class:"d-flex flex-column gap-2 my-4"},st={class:"d-flex gap-2 peerSearchContainer"},ot={class:"dropdown"},nt={"data-bs-toggle":"dropdown",class:"btn w-100 btn-sm text-primary-emphasis bg-primary-subtle rounded-3 border-1 border-primary-subtle position-relative"},at={class:"badge text-bg-primary ms-2"},lt={class:"dropdown-menu rounded-3"},rt=["onClick"],it={class:"ms-auto"},dt={key:0,class:"bi bi-check-circle-fill"},ut={class:"dropdown"},ct={"data-bs-toggle":"dropdown",class:"btn btn-sm w-100 text-primary-emphasis bg-primary-subtle rounded-3 border-1 border-primary-subtle position-relative"},mt={class:"badge text-bg-primary ms-2"},pt={class:"dropdown-menu rounded-3"},ft=["onClick"],gt={class:"ms-auto"},vt={key:0,class:"bi bi-check-circle-fill"},bt={class:"dropdown"},ht={"data-bs-toggle":"dropdown",class:"btn btn-sm w-100 text-primary-emphasis bg-primary-subtle rounded-3 border-1 border-primary-subtle position-relative"},_t={class:"badge text-bg-primary ms-2"},yt={class:"dropdown-menu rounded-3"},St=["onClick"],Pt={class:"ms-auto"},$t={key:0,class:"bi bi-check-circle-fill"};function wt(o,t,r,i,C,P){const c=q("LocaleText");return l(),v("div",tt,[e("div",st,[e("div",ot,[e("button",nt,[t[4]||(t[4]=e("i",{class:"bi bi-sort-up me-2"},null,-1)),d(c,{t:"Sort By"}),e("span",at,w(this.sort[i.store.Configuration.Server.dashboard_sort]),1)]),e("ul",lt,[(l(!0),v(F,null,X(this.sort,(m,a)=>(l(),v("li",null,[e("button",{class:"dropdown-item d-flex align-items-center",onClick:f=>this.updateSort(a)},[e("small",null,w(m),1),e("small",it,[i.store.Configuration.Server.dashboard_sort===a?(l(),v("i",dt)):$("",!0)])],8,rt)]))),256))])]),e("div",ut,[e("button",ct,[t[5]||(t[5]=e("i",{class:"bi bi-arrow-repeat me-2"},null,-1)),d(c,{t:"Refresh Interval"}),e("span",mt,w(this.interval[i.store.Configuration.Server.dashboard_refresh_interval]),1)]),e("ul",pt,[(l(!0),v(F,null,X(this.interval,(m,a)=>(l(),v("li",null,[e("button",{class:"dropdown-item d-flex align-items-center",onClick:f=>this.updateRefreshInterval(a)},[e("small",null,w(m),1),e("small",gt,[i.store.Configuration.Server.dashboard_refresh_interval===a?(l(),v("i",vt)):$("",!0)])],8,ft)]))),256))])]),e("div",bt,[e("button",ht,[e("i",{class:L(["bi me-2","bi-"+i.store.Configuration.Server.dashboard_peer_list_display])},null,2),d(c,{t:"Display"}),e("span",_t,w(this.display[i.store.Configuration.Server.dashboard_peer_list_display]),1)]),e("ul",yt,[(l(!0),v(F,null,X(this.display,(m,a)=>(l(),v("li",null,[e("button",{class:"dropdown-item d-flex align-items-center",onClick:f=>this.updateDisplay(a)},[e("small",null,w(m),1),e("small",Pt,[i.store.Configuration.Server.dashboard_peer_list_display===a?(l(),v("i",$t)):$("",!0)])],8,St)]))),256))])]),e("button",{class:"btn btn-sm text-primary-emphasis bg-primary-subtle rounded-3 border-1 border-primary-subtle ms-lg-auto",onClick:t[0]||(t[0]=m=>this.$emit("search"))},[t[6]||(t[6]=e("i",{class:"bi bi-search me-2"},null,-1)),d(c,{t:"Search"})]),e("button",{class:"btn btn-sm text-primary-emphasis bg-primary-subtle rounded-3 border-1 border-primary-subtle",onClick:t[1]||(t[1]=m=>this.downloadAllPeer())},[t[7]||(t[7]=e("i",{class:"bi bi-download me-2 me-lg-0 me-xl-2"},null,-1)),d(c,{t:"Download All",class:"d-sm-block d-lg-none d-xl-block"})]),e("button",{class:"btn btn-sm text-primary-emphasis bg-primary-subtle rounded-3 border-1 border-primary-subtle",onClick:t[2]||(t[2]=m=>this.$emit("selectPeers"))},[t[8]||(t[8]=e("i",{class:"bi bi-check2-all me-2 me-lg-0 me-xl-2"},null,-1)),d(c,{t:"Select Peers",class:"d-sm-block d-lg-none d-xl-block"})]),e("button",{class:"btn btn-sm text-primary-emphasis bg-primary-subtle rounded-3 border-1 border-primary-subtle",onClick:t[3]||(t[3]=m=>this.$emit("jobsAll")),type:"button","aria-expanded":"false"},[t[9]||(t[9]=e("i",{class:"bi bi-person-walking me-2 me-lg-0 me-xl-2"},null,-1)),d(c,{t:"Active Jobs",class:"d-sm-block d-lg-none d-xl-block"})])])])}const xt=K(et,[["render",wt],["__scopeId","data-v-c96b078a"]]);function Ct(o){return ge()?(ve(o),!0):!1}const me=typeof window<"u"&&typeof document<"u";typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const kt=Object.prototype.toString,Ot=o=>kt.call(o)==="[object Object]",U=()=>{},Mt=Dt();function Dt(){var o,t;return me&&((o=window?.navigator)==null?void 0:o.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 te(o){return Array.isArray(o)?o:[o]}function At(o,t,r){return ee(o,t,{...r,immediate:!0})}const pe=me?window:void 0;function W(o){var t;const r=j(o);return(t=r?.$el)!=null?t:r}function se(...o){const t=[],r=()=>{t.forEach(m=>m()),t.length=0},i=(m,a,f,g)=>(m.addEventListener(a,f,g),()=>m.removeEventListener(a,f,g)),C=B(()=>{const m=te(j(o[0])).filter(a=>a!=null);return m.every(a=>typeof a!="string")?m:void 0}),P=At(()=>{var m,a;return[(a=(m=C.value)==null?void 0:m.map(f=>W(f)))!=null?a:[pe].filter(f=>f!=null),te(j(C.value?o[1]:o[0])),te(M(C.value?o[2]:o[1])),j(C.value?o[3]:o[2])]},([m,a,f,g])=>{if(r(),!m?.length||!a?.length||!f?.length)return;const D=Ot(g)?{...g}:g;t.push(...m.flatMap(h=>a.flatMap(y=>f.map(_=>i(h,y,_,D)))))},{flush:"post"}),c=()=>{P(),r()};return Ct(r),c}let ie=!1;function Lt(o,t,r={}){const{window:i=pe,ignore:C=[],capture:P=!0,detectIframe:c=!1,controls:m=!1}=r;if(!i)return m?{stop:U,cancel:U,trigger:U}:U;if(Mt&&!ie){ie=!0;const n={passive:!0};Array.from(i.document.body.children).forEach(S=>S.addEventListener("click",U,n)),i.document.documentElement.addEventListener("click",U,n)}let a=!0;const f=n=>j(C).some(S=>{if(typeof S=="string")return Array.from(i.document.querySelectorAll(S)).some(k=>k===n.target||n.composedPath().includes(k));{const k=W(S);return k&&(n.target===k||n.composedPath().includes(k))}});function g(n){const S=j(n);return S&&S.$.subTree.shapeFlag===16}function D(n,S){const k=j(n),E=k.$.subTree&&k.$.subTree.children;return E==null||!Array.isArray(E)?!1:E.some(z=>z.el===S.target||S.composedPath().includes(z.el))}const h=n=>{const S=W(o);if(n.target!=null&&!(!(S instanceof Element)&&g(o)&&D(o,n))&&!(!S||S===n.target||n.composedPath().includes(S))){if("detail"in n&&n.detail===0&&(a=!f(n)),!a){a=!0;return}t(n)}};let y=!1;const _=[se(i,"click",n=>{y||(y=!0,setTimeout(()=>{y=!1},0),h(n))},{passive:!0,capture:P}),se(i,"pointerdown",n=>{const S=W(o);a=!f(n)&&!!(S&&!n.composedPath().includes(S))},{passive:!0}),c&&se(i,"blur",n=>{setTimeout(()=>{var S;const k=W(o);((S=i.document.activeElement)==null?void 0:S.tagName)==="IFRAME"&&!k?.contains(i.document.activeElement)&&t(n)},0)},{passive:!0})].filter(Boolean),b=()=>_.forEach(n=>n());return m?{stop:b,cancel:()=>{a=!1},trigger:n=>{a=!0,h(n),a=!1}}:b}const Rt={key:0,class:"position-absolute d-block p-1 px-2 bg-body text-body rounded-3 border shadow"},It={__name:"peerSettingsDropdownTool",props:{icon:String,title:String},emits:["click"],setup(o,{emit:t}){const r=t,i=A(!1);return(C,P)=>(l(),v("a",{class:"dropdown-item text-center px-0 rounded-3 position-relative",role:"button",onMouseenter:P[0]||(P[0]=c=>i.value=!0),onMouseleave:P[1]||(P[1]=c=>i.value=!1),onClick:P[2]||(P[2]=c=>r("click"))},[e("i",{class:L(["me-auto bi",o.icon])},null,2),d(ae,{name:"zoomReversed"},{default:J(()=>[i.value?(l(),v("span",Rt,[e("small",null,[d(O,{t:o.title},null,8,["t"])])])):$("",!0)]),_:1})],32))}},Tt=K(It,[["__scopeId","data-v-d4e41a56"]]),Et={name:"peerSettingsDropdown",components:{PeerSettingsDropdownTool:Tt,LocaleText:O},setup(){return{dashboardStore:H()}},props:{Peer:Object},data(){return{deleteBtnDisabled:!1,restrictBtnDisabled:!1,allowAccessBtnDisabled:!1,confirmDelete:!1}},methods:{downloadPeer(){Q("/api/downloadPeer/"+this.$route.params.id,{id:this.Peer.id},o=>{if(o.status){const t=new Blob([o.data.file],{type:"text/plain"}),r=URL.createObjectURL(t),i=`${o.data.fileName}.conf`,C=document.createElement("a");C.href=r,C.download=i,C.click(),this.dashboardStore.newMessage("WGDashboard","Peer download started","success")}else this.dashboardStore.newMessage("Server",o.message,"danger")})},downloadQRCode(o){Q("/api/downloadPeer/"+this.$route.params.id,{id:this.Peer.id},t=>{t.status?this.$emit(o,t.data.file):this.dashboardStore.newMessage("Server",t.message,"danger")})},deletePeer(){this.deleteBtnDisabled=!0,G(`/api/deletePeers/${this.$route.params.id}`,{peers:[this.Peer.id]},o=>{this.dashboardStore.newMessage("Server",o.message,o.status?"success":"danger"),this.$emit("refresh"),this.deleteBtnDisabled=!1})},restrictPeer(){this.restrictBtnDisabled=!0,G(`/api/restrictPeers/${this.$route.params.id}`,{peers:[this.Peer.id]},o=>{this.dashboardStore.newMessage("Server",o.message,o.status?"success":"danger"),this.$emit("refresh"),this.restrictBtnDisabled=!1})},allowAccessPeer(){this.allowAccessBtnDisabled=!0,G(`/api/allowAccessPeers/${this.$route.params.id}`,{peers:[this.Peer.id]},o=>{this.dashboardStore.newMessage("Server",o.message,o.status?"success":"danger"),this.$emit("refresh"),this.allowAccessBtnDisabled=!1})}}},Bt={class:"dropdown-menu mt-2 shadow-lg d-block rounded-3",style:{"max-width":"200px"}},Nt={style:{"font-size":"0.8rem","padding-left":"var(--bs-dropdown-item-padding-x)","padding-right":"var(--bs-dropdown-item-padding-x)"}},Jt={class:"text-body d-flex"},Ft={class:"ms-auto"},jt={key:1},Vt={class:"w-100 dropdown-item text-muted",style:{"white-space":"break-spaces","font-size":"0.7rem"}},Ut={key:2},Gt={class:"d-flex",style:{"padding-left":"var(--bs-dropdown-item-padding-x)","padding-right":"var(--bs-dropdown-item-padding-x)"}},Qt={key:1,class:"confirmDelete"},zt={style:{"white-space":"break-spaces"},class:"mb-2 d-block fw-bold"},Wt={class:"d-flex w-100 gap-2"},qt=["disabled"],Ht=["disabled"],Kt={key:1};function Yt(o,t,r,i,C,P){const c=q("LocaleText"),m=q("PeerSettingsDropdownTool");return l(),v("ul",Bt,[this.Peer.restricted?(l(),v("li",Kt,[e("a",{class:L(["dropdown-item d-flex text-warning",{disabled:this.allowAccessBtnDisabled}]),onClick:t[11]||(t[11]=a=>this.allowAccessPeer()),role:"button"},[t[25]||(t[25]=e("i",{class:"me-auto bi bi-unlock"},null,-1)),this.allowAccessBtnDisabled?(l(),x(c,{key:1,t:"Allowing Access..."})):(l(),x(c,{key:0,t:"Allow Access"}))],2)])):(l(),v(F,{key:0},[this.confirmDelete?(l(),v("li",Qt,[e("p",zt,[d(c,{t:"Are you sure to delete this peer?"})]),e("div",Wt,[e("button",{onClick:t[9]||(t[9]=a=>this.deletePeer()),disabled:this.deleteBtnDisabled,class:"flex-grow-1 ms-auto btn btn-sm bg-danger"},[d(c,{t:"Yes"})],8,qt),e("button",{disabled:this.deleteBtnDisabled,onClick:t[10]||(t[10]=a=>this.confirmDelete=!1),class:"flex-grow-1 btn btn-sm bg-secondary-subtle text-secondary-emphasis border border-secondary-subtle"},[d(c,{t:"No"})],8,Ht)])])):(l(),v(F,{key:0},[this.Peer.status==="running"?(l(),v(F,{key:0},[e("li",Nt,[e("span",Jt,[t[12]||(t[12]=e("i",{class:"bi bi-box-arrow-in-right"},null,-1)),e("span",Ft,w(this.Peer.endpoint),1)])]),t[13]||(t[13]=e("li",null,[e("hr",{class:"dropdown-divider"})],-1))],64)):$("",!0),this.Peer.private_key?(l(),v("li",Ut,[t[14]||(t[14]=e("div",{class:"text-center text-muted"},null,-1)),e("div",Gt,[d(m,{icon:"bi-download",title:"Download",onClick:t[0]||(t[0]=a=>this.downloadPeer())}),d(m,{icon:"bi-qr-code",title:"QR Code",onClick:t[1]||(t[1]=a=>this.$emit("qrcode"))}),d(m,{icon:"bi-body-text",title:"Configuration File",onClick:t[2]||(t[2]=a=>this.$emit("configurationFile"))}),d(m,{icon:"bi-share",title:"Share Peer",onClick:t[3]||(t[3]=a=>this.$emit("share"))})])])):(l(),v("li",jt,[e("small",Vt,[d(c,{t:"Download & QR Code is not available due to no private key set for this peer"})])])),t[23]||(t[23]=e("li",null,[e("hr",{class:"dropdown-divider"})],-1)),e("li",null,[e("a",{class:"dropdown-item d-flex",role:"button",onClick:t[4]||(t[4]=a=>this.$emit("setting"))},[t[15]||(t[15]=e("i",{class:"me-auto bi bi-pen"},null,-1)),t[16]||(t[16]=N()),d(c,{t:"Peer Settings"})])]),e("li",null,[e("a",{class:"dropdown-item d-flex",role:"button",onClick:t[5]||(t[5]=a=>this.$emit("jobs"))},[t[17]||(t[17]=e("i",{class:"me-auto bi bi-app-indicator"},null,-1)),t[18]||(t[18]=N()),d(c,{t:"Schedule Jobs"})])]),e("li",null,[e("a",{class:"dropdown-item d-flex",role:"button",onClick:t[6]||(t[6]=a=>this.$emit("assign"))},[t[19]||(t[19]=e("i",{class:"me-auto bi bi-diagram-2"},null,-1)),t[20]||(t[20]=N()),d(c,{t:"Assign Peer"})])]),t[24]||(t[24]=e("li",null,[e("hr",{class:"dropdown-divider"})],-1)),e("li",null,[e("a",{class:L(["dropdown-item d-flex text-warning",{disabled:this.restrictBtnDisabled}]),onClick:t[7]||(t[7]=a=>this.restrictPeer()),role:"button"},[t[21]||(t[21]=e("i",{class:"me-auto bi bi-lock"},null,-1)),this.restrictBtnDisabled?(l(),x(c,{key:1,t:"Restricting..."})):(l(),x(c,{key:0,t:"Restrict Access"}))],2)]),e("li",null,[e("a",{class:L(["dropdown-item d-flex fw-bold text-danger",{disabled:this.deleteBtnDisabled}]),onClick:t[8]||(t[8]=a=>this.confirmDelete=!0),role:"button"},[t[22]||(t[22]=e("i",{class:"me-auto bi bi-trash"},null,-1)),this.deleteBtnDisabled?(l(),x(c,{key:1,t:"Deleting..."})):(l(),x(c,{key:0,t:"Delete"}))],2)])],64))],64))])}const Zt=K(Et,[["render",Yt],["__scopeId","data-v-d636c35d"]]),Xt={name:"peer",methods:{GetLocale:T},components:{LocaleText:O,PeerSettingsDropdown:Zt},props:{Peer:Object},data(){return{}},setup(){const o=A(null),t=A(!1),r=H();return Lt(o,i=>{t.value=!1}),{target:o,subMenuOpened:t,dashboardStore:r}},computed:{getLatestHandshake(){return this.Peer.latest_handshake.includes(",")?this.Peer.latest_handshake.split(",")[0]:this.Peer.latest_handshake}}},es={key:0,class:"card-header bg-transparent d-flex align-items-center gap-2 border-0"},ts={key:0,style:{"font-size":"0.8rem",color:"#28a745"},class:"d-flex align-items-center"},ss={style:{"font-size":"0.8rem"},class:"ms-auto d-flex gap-2"},os={class:"text-primary"},ns={class:"text-success"},as={key:0,class:"text-secondary"},ls={key:1,class:"border-0 card-header bg-transparent text-warning fw-bold",style:{"font-size":"0.8rem"}},rs={class:"card-body pt-1",style:{"font-size":"0.9rem"}},is={class:"text-muted"},ds={class:"d-block"},us={class:"text-muted"},cs={class:"d-block"},ms={class:"d-flex align-items-end ms-auto"};function ps(o,t,r,i,C,P){const c=q("LocaleText"),m=q("PeerSettingsDropdown");return l(),v("div",{class:L(["card shadow-sm rounded-3 peerCard",{"border-warning":r.Peer.restricted}])},[e("div",null,[r.Peer.restricted?(l(),v("div",ls,[t[14]||(t[14]=e("i",{class:"bi-lock-fill me-2"},null,-1)),d(c,{t:"Access Restricted"})])):(l(),v("div",es,[e("div",{class:L(["dot ms-0",{active:r.Peer.status==="running"}])},null,2),i.dashboardStore.Configuration.Server.dashboard_peer_list_display==="list"&&r.Peer.status==="running"?(l(),v("div",ts,[t[8]||(t[8]=e("i",{class:"bi bi-box-arrow-in-right me-2"},null,-1)),e("span",null,w(r.Peer.endpoint),1)])):$("",!0),e("div",ss,[e("span",os,[t[9]||(t[9]=e("i",{class:"bi bi-arrow-down"},null,-1)),e("strong",null,w((r.Peer.cumu_receive+r.Peer.total_receive).toFixed(4)),1),t[10]||(t[10]=N(" GB "))]),e("span",ns,[t[11]||(t[11]=e("i",{class:"bi bi-arrow-up"},null,-1)),e("strong",null,w((r.Peer.cumu_sent+r.Peer.total_sent).toFixed(4)),1),t[12]||(t[12]=N(" GB "))]),r.Peer.latest_handshake!=="No Handshake"?(l(),v("span",as,[t[13]||(t[13]=e("i",{class:"bi bi-arrows-angle-contract"},null,-1)),N(" "+w(P.getLatestHandshake)+" ago ",1)])):$("",!0)])]))]),e("div",rs,[e("h6",null,w(r.Peer.name?r.Peer.name:P.GetLocale("Untitled Peer")),1),e("div",{class:L(["d-flex",[i.dashboardStore.Configuration.Server.dashboard_peer_list_display==="grid"?"gap-1 flex-column":"flex-row gap-3"]])},[e("div",{class:L({"d-flex gap-2 align-items-center":i.dashboardStore.Configuration.Server.dashboard_peer_list_display==="list"})},[e("small",is,[d(c,{t:"Public Key"})]),e("small",ds,[e("samp",null,w(r.Peer.id),1)])],2),e("div",{class:L({"d-flex gap-2 align-items-center":i.dashboardStore.Configuration.Server.dashboard_peer_list_display==="list"})},[e("small",us,[d(c,{t:"Allowed IPs"})]),e("small",cs,[e("samp",null,w(r.Peer.allowed_ip),1)])],2),e("div",ms,[e("div",{class:L(["ms-auto px-2 rounded-3 subMenuBtn",{active:this.subMenuOpened}])},[e("a",{role:"button",class:"text-body",onClick:t[0]||(t[0]=a=>this.subMenuOpened=!0)},t[15]||(t[15]=[e("h5",{class:"mb-0"},[e("i",{class:"bi bi-three-dots"})],-1)])),d(ae,{name:"slide-fade"},{default:J(()=>[this.subMenuOpened?(l(),x(m,{key:0,onQrcode:t[1]||(t[1]=a=>this.$emit("qrcode")),onConfigurationFile:t[2]||(t[2]=a=>this.$emit("configurationFile")),onSetting:t[3]||(t[3]=a=>this.$emit("setting")),onJobs:t[4]||(t[4]=a=>this.$emit("jobs")),onRefresh:t[5]||(t[5]=a=>this.$emit("refresh")),onShare:t[6]||(t[6]=a=>this.$emit("share")),onAssign:t[7]||(t[7]=a=>this.$emit("assign")),Peer:r.Peer,ref:"target"},null,8,["Peer"])):$("",!0)]),_:1})],2)])],2)])],2)}const fs=K(Xt,[["render",ps],["__scopeId","data-v-d500f94d"]]),gs={__name:"peerListModals",props:{configurationModals:Object,configurationModalSelectedPeer:Object},emits:["refresh"],setup(o,{emit:t}){const r=t,i=R(()=>I(()=>import("./peerAssignModal-5HoPs6IP.js"),__vite__mapDeps([0,1,2,3,4,5]))),C=R(()=>I(()=>import("./peerShareLinkModal-rl2Nl0hw.js"),__vite__mapDeps([6,2,3,7,8,1,9]))),P=R(()=>I(()=>import("./peerJobs-DDiv72oD.js"),__vite__mapDeps([10,11,2,3,8,7,1,12,13]))),c=R(()=>I(()=>import("./peerQRCode-CgpUOip9.js"),__vite__mapDeps([14,15,2,3,1,16]))),m=R(()=>I(()=>import("./peerConfigurationFile-D43SrB3i.js"),__vite__mapDeps([17,2,3,1,15,18]))),a=R(()=>I(()=>import("./peerSettings-BVjjHyUZ.js"),__vite__mapDeps([19,2,3,1,20])));return(f,g)=>(l(),x(oe,{name:"zoom"},{default:J(()=>[o.configurationModals.peerSetting.modalOpen?(l(),x(M(a),{key:"PeerSettingsModal",selectedPeer:o.configurationModalSelectedPeer,onRefresh:g[0]||(g[0]=D=>r("refresh")),onClose:g[1]||(g[1]=D=>o.configurationModals.peerSetting.modalOpen=!1)},null,8,["selectedPeer"])):$("",!0),o.configurationModals.peerQRCode.modalOpen?(l(),x(M(c),{key:"PeerQRCodeModal",selectedPeer:o.configurationModalSelectedPeer,onClose:g[2]||(g[2]=D=>o.configurationModals.peerQRCode.modalOpen=!1)},null,8,["selectedPeer"])):$("",!0),o.configurationModals.peerScheduleJobs.modalOpen?(l(),x(M(P),{key:"PeerJobsModal",onRefresh:g[3]||(g[3]=D=>r("refresh")),selectedPeer:o.configurationModalSelectedPeer,onClose:g[4]||(g[4]=D=>o.configurationModals.peerScheduleJobs.modalOpen=!1)},null,8,["selectedPeer"])):$("",!0),o.configurationModals.peerShare.modalOpen?(l(),x(M(C),{key:"PeerShareLinkModal",onClose:g[5]||(g[5]=D=>{o.configurationModals.peerShare.modalOpen=!1}),selectedPeer:o.configurationModalSelectedPeer},null,8,["selectedPeer"])):$("",!0),o.configurationModals.peerConfigurationFile.modalOpen?(l(),x(M(m),{key:4,onClose:g[6]||(g[6]=D=>o.configurationModals.peerConfigurationFile.modalOpen=!1),selectedPeer:o.configurationModalSelectedPeer},null,8,["selectedPeer"])):$("",!0),o.configurationModals.assignPeer.modalOpen?(l(),x(M(i),{key:5,selectedPeer:o.configurationModalSelectedPeer,onClose:g[7]||(g[7]=D=>o.configurationModals.assignPeer.modalOpen=!1)},null,8,["selectedPeer"])):$("",!0)]),_:1}))}},vs={style:{"margin-bottom":"20px",height:"1px"},id:"loadMore"},bs={__name:"peerIntersectionObserver",props:["peerListLength","showPeersCount"],emits:["loadMore"],setup(o,{emit:t}){const r=A(void 0),i=t;return ue(()=>{r.value=new IntersectionObserver(C=>{C.forEach(P=>{P.isIntersecting&&i("loadMore")})},{rootMargin:"20px",threshold:1}),r.value.observe(document.querySelector("#loadMore"))}),ne(()=>{r.value.disconnect()}),(C,P)=>(l(),v("div",vs))}},hs={class:"container-fluid"},_s={class:"d-flex align-items-sm-center flex-column flex-sm-row gap-3"},ys={class:"text-muted d-flex align-items-center gap-2"},Ss={class:"mb-0"},Ps={class:"d-flex align-items-center gap-3"},$s={class:"mb-0 display-4"},ws={class:"ms-sm-auto d-flex gap-2 flex-column"},xs={class:"card rounded-3 bg-transparent"},Cs={class:"card-body py-2 d-flex align-items-center"},ks={class:"text-muted"},Os={class:"form-check form-switch mb-0 ms-auto pe-0 me-0"},Ms=["for"],Ds={key:2,class:"spinner-border spinner-border-sm ms-2","aria-hidden":"true"},As=["disabled","id"],Ls={class:"d-flex gap-2"},Rs={class:"row mt-3 gy-2 gx-2 mb-2"},Is={class:"col-12 col-lg-3"},Ts={class:"card rounded-3 bg-transparent h-100"},Es={class:"card-body py-2 d-flex flex-column justify-content-center"},Bs={class:"mb-0 text-muted"},Ns={class:"col-12 col-lg-3"},Js={class:"card rounded-3 bg-transparent h-100"},Fs={class:"card-body py-2 d-flex flex-column justify-content-center"},js={class:"mb-0 text-muted"},Vs={style:{"word-break":"break-all"},class:"col-12 col-lg-6"},Us={class:"card rounded-3 bg-transparent h-100"},Gs={class:"card-body py-2 d-flex flex-column justify-content-center"},Qs={class:"mb-0 text-muted"},zs={class:"row gx-2 gy-2 mb-2"},Ws={class:"col-12 col-lg-3"},qs={class:"card rounded-3 bg-transparent h-100"},Hs={class:"card-body d-flex"},Ks={class:"mb-0 text-muted"},Ys={class:"h4"},Zs={class:"col-12 col-lg-3"},Xs={class:"card rounded-3 bg-transparent h-100"},eo={class:"card-body d-flex"},to={class:"mb-0 text-muted"},so={class:"h4"},oo={class:"col-12 col-lg-3"},no={class:"card rounded-3 bg-transparent h-100"},ao={class:"card-body d-flex"},lo={class:"mb-0 text-muted"},ro={class:"h4 text-primary"},io={class:"col-12 col-lg-3"},uo={class:"card rounded-3 bg-transparent h-100"},co={class:"card-body d-flex"},mo={class:"mb-0 text-muted"},po={class:"h4 text-success"},fo={style:{"margin-bottom":"80px"}},go=20,vo={__name:"peerList",async setup(o){let t,r;const i=R(()=>I(()=>import("./peerSearchBar-CCwSm3x3.js"),__vite__mapDeps([21,2,3,1,22]))),C=R(()=>I(()=>import("./peerJobsAllModal-B4Fcsytd.js"),__vite__mapDeps([23,11,2,3,8,7,1,12]))),P=R(()=>I(()=>import("./peerJobsLogsModal-YBNe6GAN.js"),__vite__mapDeps([24,7,2,3,1]))),c=R(()=>I(()=>import("./editConfiguration-C458Rndf.js"),__vite__mapDeps([25,2,3,1,7,26]))),m=R(()=>I(()=>import("./selectPeers-C9VF1n58.js"),__vite__mapDeps([27,2,3,1,28]))),a=R(()=>I(()=>import("./peerAddModal-Emzzfw1d.js"),__vite__mapDeps([29,2,3,1,30]))),f=H(),g=ce(),D=de(),h=A({}),y=A([]),_=A(!1),b=A({}),n=A({peerNew:{modalOpen:!1},peerSetting:{modalOpen:!1},peerScheduleJobs:{modalOpen:!1},peerQRCode:{modalOpen:!1},peerConfigurationFile:{modalOpen:!1},peerCreate:{modalOpen:!1},peerScheduleJobsAll:{modalOpen:!1},peerScheduleJobsLogs:{modalOpen:!1},peerShare:{modalOpen:!1},editConfiguration:{modalOpen:!1},selectPeers:{modalOpen:!1},backupRestore:{modalOpen:!1},deleteConfiguration:{modalOpen:!1},editRawConfigurationFile:{modalOpen:!1},assignPeer:{modalOpen:!1}}),S=A(!1),k=async()=>{await Q("/api/getWireguardConfigurationInfo",{configurationName:D.params.id},p=>{p.status&&(h.value=p.data.configurationInfo,y.value=p.data.configurationPeers,y.value.forEach(s=>{s.restricted=!1}),p.data.configurationRestrictedPeers.forEach(s=>{s.restricted=!0,y.value.push(s)}))})};[t,r]=be(()=>k()),await t,r();const E=A(void 0),z=()=>{clearInterval(E.value),E.value=setInterval(async()=>{await k()},parseInt(f.Configuration.Server.dashboard_refresh_interval))};z(),ne(()=>{clearInterval(E.value),E.value=void 0}),ee(()=>f.Configuration.Server.dashboard_refresh_interval,()=>{z()});const fe=async()=>{_.value=!0,await Q("/api/toggleWireguardConfiguration",{configurationName:h.value.Name},p=>{p.status?f.newMessage("Server",`${h.value.Name} ${p.data?"is on":"is off"}`,"success"):f.newMessage("Server",p.message,"danger"),g.Configurations.find(s=>s.Name===h.value.Name).Status=p.data,h.value.Status=p.data,_.value=!1})},Y=B(()=>({connectedPeers:y.value.filter(p=>p.status==="running").length,totalUsage:y.value.length>0?y.value.filter(p=>!p.restricted).map(p=>p.total_data+p.cumu_data).reduce((p,s)=>p+s,0).toFixed(4):0,totalReceive:y.value.length>0?y.value.filter(p=>!p.restricted).map(p=>p.total_receive+p.cumu_receive).reduce((p,s)=>p+s,0).toFixed(4):0,totalSent:y.value.length>0?y.value.filter(p=>!p.restricted).map(p=>p.total_sent+p.cumu_sent).reduce((p,s)=>p+s,0).toFixed(4):0})),Z=A(10),le=B(()=>{const p=g.searchString?y.value.filter(s=>s.name.includes(g.searchString)||s.id.includes(g.searchString)||s.allowed_ip.includes(g.searchString)):y.value;return f.Configuration.Server.dashboard_sort==="restricted"?p.sort((s,u)=>s[f.Configuration.Server.dashboard_sort]u[f.Configuration.Server.dashboard_sort]?-1:0).slice(0,Z.value):p.sort((s,u)=>s[f.Configuration.Server.dashboard_sort]u[f.Configuration.Server.dashboard_sort]?1:0).slice(0,Z.value)});return(p,s)=>(l(),v("div",hs,[e("div",_s,[e("div",null,[e("div",ys,[e("h5",Ss,[d(Se,{protocol:h.value.Protocol},null,8,["protocol"])])]),e("div",Ps,[e("h1",$s,[e("samp",null,w(h.value.Name),1)])])]),e("div",ws,[e("div",xs,[e("div",Cs,[e("small",ks,[d(O,{t:"Status"})]),e("div",{class:L(["dot ms-2",{active:h.value.Status}])},null,2),e("div",Os,[e("label",{class:"form-check-label",style:{cursor:"pointer"},for:"switch"+h.value.id},[h.value.Status&&!_.value?(l(),x(O,{key:0,t:"On"})):!h.value.Status&&!_.value?(l(),x(O,{key:1,t:"Off"})):$("",!0),_.value?(l(),v("span",Ds)):$("",!0)],8,Ms),he(e("input",{class:"form-check-input",style:{cursor:"pointer"},disabled:_.value,type:"checkbox",role:"switch",id:"switch"+h.value.id,onChange:s[0]||(s[0]=u=>fe()),"onUpdate:modelValue":s[1]||(s[1]=u=>h.value.Status=u)},null,40,As),[[_e,h.value.Status]])])])]),e("div",Ls,[e("a",{role:"button",onClick:s[2]||(s[2]=u=>n.value.peerNew.modalOpen=!0),class:"titleBtn py-2 text-decoration-none btn text-primary-emphasis bg-primary-subtle rounded-3 border-1 border-primary-subtle"},[s[29]||(s[29]=e("i",{class:"bi bi-plus-circle me-2"},null,-1)),d(O,{t:"Peer"})]),e("button",{class:"titleBtn py-2 text-decoration-none btn text-primary-emphasis bg-primary-subtle rounded-3 border-1 border-primary-subtle",onClick:s[3]||(s[3]=u=>n.value.editConfiguration.modalOpen=!0),type:"button","aria-expanded":"false"},[s[30]||(s[30]=e("i",{class:"bi bi-gear-fill me-2"},null,-1)),d(O,{t:"Configuration Settings"})])])])]),s[35]||(s[35]=e("hr",null,null,-1)),e("div",Rs,[e("div",Is,[e("div",Ts,[e("div",Es,[e("p",Bs,[e("small",null,[d(O,{t:"Address"})])]),N(" "+w(h.value.Address),1)])])]),e("div",Ns,[e("div",Js,[e("div",Fs,[e("p",js,[e("small",null,[d(O,{t:"Listen Port"})])]),N(" "+w(h.value.ListenPort),1)])])]),e("div",Vs,[e("div",Us,[e("div",Gs,[e("p",Qs,[e("small",null,[d(O,{t:"Public Key"})])]),e("samp",null,w(h.value.PublicKey),1)])])])]),e("div",zs,[e("div",Ws,[e("div",qs,[e("div",Hs,[e("div",null,[e("p",Ks,[e("small",null,[d(O,{t:"Connected Peers"})])]),e("strong",Ys,w(Y.value.connectedPeers)+" / "+w(y.value.length),1)]),s[31]||(s[31]=e("i",{class:"bi bi-ethernet ms-auto h2 text-muted"},null,-1))])])]),e("div",Zs,[e("div",Xs,[e("div",eo,[e("div",null,[e("p",to,[e("small",null,[d(O,{t:"Total Usage"})])]),e("strong",so,w(Y.value.totalUsage)+" GB",1)]),s[32]||(s[32]=e("i",{class:"bi bi-arrow-down-up ms-auto h2 text-muted"},null,-1))])])]),e("div",oo,[e("div",no,[e("div",ao,[e("div",null,[e("p",lo,[e("small",null,[d(O,{t:"Total Received"})])]),e("strong",ro,w(Y.value.totalReceive)+" GB",1)]),s[33]||(s[33]=e("i",{class:"bi bi-arrow-down ms-auto h2 text-muted"},null,-1))])])]),e("div",io,[e("div",uo,[e("div",co,[e("div",null,[e("p",mo,[e("small",null,[d(O,{t:"Total Sent"})])]),e("strong",po,w(Y.value.totalSent)+" GB",1)]),s[34]||(s[34]=e("i",{class:"bi bi-arrow-up ms-auto h2 text-muted"},null,-1))])])])]),d(Xe,{configurationPeers:y.value,configurationInfo:h.value},null,8,["configurationPeers","configurationInfo"]),s[36]||(s[36]=e("hr",null,null,-1)),e("div",fo,[y.value.length>0?(l(),x(xt,{key:0,onSearch:s[4]||(s[4]=u=>S.value=!0),onJobsAll:s[5]||(s[5]=u=>n.value.peerScheduleJobsAll.modalOpen=!0),onJobLogs:s[6]||(s[6]=u=>n.value.peerScheduleJobsLogs.modalOpen=!0),onEditConfiguration:s[7]||(s[7]=u=>n.value.editConfiguration.modalOpen=!0),onSelectPeers:s[8]||(s[8]=u=>n.value.selectPeers.modalOpen=!0),onBackupRestore:s[9]||(s[9]=u=>n.value.backupRestore.modalOpen=!0),onDeleteConfiguration:s[10]||(s[10]=u=>n.value.deleteConfiguration.modalOpen=!0),configuration:h.value},null,8,["configuration"])):$("",!0),d(oe,{name:"peerList",tag:"div",class:"row gx-2 gy-2 z-0 position-relative"},{default:J(()=>[(l(!0),v(F,null,X(le.value,u=>(l(),v("div",{class:L(["col-12",{"col-lg-6 col-xl-4":M(f).Configuration.Server.dashboard_peer_list_display==="grid"}]),key:u.id},[d(fs,{Peer:u,onShare:V=>{n.value.peerShare.modalOpen=!0,b.value=u},onRefresh:s[11]||(s[11]=V=>k()),onJobs:V=>{n.value.peerScheduleJobs.modalOpen=!0,b.value=u},onSetting:V=>{n.value.peerSetting.modalOpen=!0,b.value=u},onQrcode:V=>{b.value=u,n.value.peerQRCode.modalOpen=!0},onConfigurationFile:V=>{b.value=u,n.value.peerConfigurationFile.modalOpen=!0},onAssign:V=>{b.value=u,n.value.assignPeer.modalOpen=!0}},null,8,["Peer","onShare","onJobs","onSetting","onQrcode","onConfigurationFile","onAssign"])],2))),128))]),_:1})]),d(ae,{name:"slideUp"},{default:J(()=>[S.value?(l(),x(M(i),{key:0,onClose:s[12]||(s[12]=u=>S.value=!1)})):$("",!0)]),_:1}),d(gs,{configurationModals:n.value,configurationModalSelectedPeer:b.value,onRefresh:s[13]||(s[13]=u=>k())},null,8,["configurationModals","configurationModalSelectedPeer"]),d(oe,{name:"zoom"},{default:J(()=>[(l(),x(ye,{key:"PeerAddModal"},{default:J(()=>[n.value.peerNew.modalOpen?(l(),x(M(a),{key:0,onClose:s[14]||(s[14]=u=>n.value.peerNew.modalOpen=!1),onAddedPeers:s[15]||(s[15]=u=>{n.value.peerNew.modalOpen=!1,k()})})):$("",!0)]),_:1})),n.value.peerScheduleJobsAll.modalOpen?(l(),x(M(C),{key:"PeerJobsAllModal",onRefresh:s[16]||(s[16]=u=>k()),onAllLogs:s[17]||(s[17]=u=>n.value.peerScheduleJobsLogs.modalOpen=!0),onClose:s[18]||(s[18]=u=>n.value.peerScheduleJobsAll.modalOpen=!1),configurationPeers:y.value},null,8,["configurationPeers"])):$("",!0),n.value.peerScheduleJobsLogs.modalOpen?(l(),x(M(P),{key:"PeerJobsLogsModal",onClose:s[19]||(s[19]=u=>n.value.peerScheduleJobsLogs.modalOpen=!1),configurationInfo:h.value},null,8,["configurationInfo"])):$("",!0),n.value.editConfiguration.modalOpen?(l(),x(M(c),{key:"EditConfigurationModal",onEditRaw:s[20]||(s[20]=u=>n.value.editRawConfigurationFile.modalOpen=!0),onClose:s[21]||(s[21]=u=>n.value.editConfiguration.modalOpen=!1),onDataChanged:s[22]||(s[22]=u=>h.value=u),onRefresh:s[23]||(s[23]=u=>k()),onBackupRestore:s[24]||(s[24]=u=>n.value.backupRestore.modalOpen=!0),onDeleteConfiguration:s[25]||(s[25]=u=>n.value.deleteConfiguration.modalOpen=!0),configurationInfo:h.value},null,8,["configurationInfo"])):$("",!0),n.value.selectPeers.modalOpen?(l(),x(M(m),{key:3,onRefresh:s[26]||(s[26]=u=>k()),configurationPeers:y.value,onClose:s[27]||(s[27]=u=>n.value.selectPeers.modalOpen=!1)},null,8,["configurationPeers"])):$("",!0)]),_:1}),d(bs,{showPeersCount:Z.value,peerListLength:le.value.length,onLoadMore:s[28]||(s[28]=u=>Z.value+=go)},null,8,["showPeersCount","peerListLength"])]))}},Po=K(vo,[["__scopeId","data-v-f74f78f2"]]);export{Po as default}; diff --git a/src/static/app/dist/assets/peerQRCode-BiVHr8UY.js b/src/static/app/dist/assets/peerQRCode-CgpUOip9.js similarity index 90% rename from src/static/app/dist/assets/peerQRCode-BiVHr8UY.js rename to src/static/app/dist/assets/peerQRCode-CgpUOip9.js index 9b81c72..b0557f4 100644 --- a/src/static/app/dist/assets/peerQRCode-BiVHr8UY.js +++ b/src/static/app/dist/assets/peerQRCode-CgpUOip9.js @@ -1 +1 @@ -import{Q as i}from"./browser-BHoir7AQ.js";import{L as c}from"./localeText-DkjxgEQB.js";import{_ as l,h as p,c as n,f as d,a as e,b as _,d as m,n as u,g as h,D as f}from"./index-BaGiSoQe.js";const g={name:"peerQRCode",components:{LocaleText:c},props:{selectedPeer:Object},setup(){return{dashboardStore:f()}},data(){return{loading:!0}},mounted(){h("/api/downloadPeer/"+this.$route.params.id,{id:this.selectedPeer.id},o=>{if(this.loading=!1,o.status){let t="";if(this.selectedPeer.configuration.Protocol==="awg"){let a={containers:[{awg:{isThirdPartyConfig:!0,last_config:o.data.file,port:this.selectedPeer.configuration.ListenPort,transport_proto:"udp"},container:"amnezia-awg"}],defaultContainer:"amnezia-awg",description:this.selectedPeer.name,hostName:this.dashboardStore.Configuration.Peers.remote_endpoint};t=JSON.stringify(a)}else t=o.data.file;i.toCanvas(document.querySelector("#qrcode"),t,a=>{a&&console.error(a)})}else this.dashboardStore.newMessage("Server",o.message,"danger")})}},b={class:"peerSettingContainer w-100 h-100 position-absolute top-0 start-0"},v={class:"container d-flex h-100 w-100"},C={class:"m-auto modal-dialog-centered dashboardModal justify-content-center"},w={class:"card rounded-3 shadow"},P={class:"card-header bg-transparent d-flex align-items-center gap-2 border-0 p-4 pb-0"},x={class:"mb-0"},S={class:"card-body p-4"},y={class:"d-flex"},L={key:0,class:"spinner-border m-auto",role:"status"};function Q(o,t,a,N,s,R){const r=p("LocaleText");return d(),n("div",b,[e("div",v,[e("div",C,[e("div",w,[e("div",P,[e("h4",x,[_(r,{t:"QR Code"})]),e("button",{type:"button",class:"btn-close ms-auto",onClick:t[0]||(t[0]=$=>this.$emit("close"))})]),e("div",S,[e("div",y,[e("canvas",{id:"qrcode",class:u(["rounded-3 shadow animate__animated animate__fadeIn animate__faster",{"d-none":s.loading}])},null,2),s.loading?(d(),n("div",L,t[1]||(t[1]=[e("span",{class:"visually-hidden"},"Loading...",-1)]))):m("",!0)])])])])])])}const q=l(g,[["render",Q],["__scopeId","data-v-5816a147"]]);export{q as default}; +import{Q as i}from"./browser-Bcujcoof.js";import{L as c}from"./localeText-n7rlaTGQ.js";import{_ as l,h as p,c as n,f as d,a as e,b as _,d as m,n as u,g as h,D as f}from"./index-Upsq31TS.js";const g={name:"peerQRCode",components:{LocaleText:c},props:{selectedPeer:Object},setup(){return{dashboardStore:f()}},data(){return{loading:!0}},mounted(){h("/api/downloadPeer/"+this.$route.params.id,{id:this.selectedPeer.id},o=>{if(this.loading=!1,o.status){let t="";if(this.selectedPeer.configuration.Protocol==="awg"){let a={containers:[{awg:{isThirdPartyConfig:!0,last_config:o.data.file,port:this.selectedPeer.configuration.ListenPort,transport_proto:"udp"},container:"amnezia-awg"}],defaultContainer:"amnezia-awg",description:this.selectedPeer.name,hostName:this.dashboardStore.Configuration.Peers.remote_endpoint};t=JSON.stringify(a)}else t=o.data.file;i.toCanvas(document.querySelector("#qrcode"),t,a=>{a&&console.error(a)})}else this.dashboardStore.newMessage("Server",o.message,"danger")})}},b={class:"peerSettingContainer w-100 h-100 position-absolute top-0 start-0"},v={class:"container d-flex h-100 w-100"},C={class:"m-auto modal-dialog-centered dashboardModal justify-content-center"},w={class:"card rounded-3 shadow"},P={class:"card-header bg-transparent d-flex align-items-center gap-2 border-0 p-4 pb-0"},x={class:"mb-0"},S={class:"card-body p-4"},y={class:"d-flex"},L={key:0,class:"spinner-border m-auto",role:"status"};function Q(o,t,a,N,s,R){const r=p("LocaleText");return d(),n("div",b,[e("div",v,[e("div",C,[e("div",w,[e("div",P,[e("h4",x,[_(r,{t:"QR Code"})]),e("button",{type:"button",class:"btn-close ms-auto",onClick:t[0]||(t[0]=$=>this.$emit("close"))})]),e("div",S,[e("div",y,[e("canvas",{id:"qrcode",class:u(["rounded-3 shadow animate__animated animate__fadeIn animate__faster",{"d-none":s.loading}])},null,2),s.loading?(d(),n("div",L,t[1]||(t[1]=[e("span",{class:"visually-hidden"},"Loading...",-1)]))):m("",!0)])])])])])])}const q=l(g,[["render",Q],["__scopeId","data-v-5816a147"]]);export{q as default}; diff --git a/src/static/app/dist/assets/peerSearchBar-3fBKUdTH.js b/src/static/app/dist/assets/peerSearchBar-CCwSm3x3.js similarity index 89% rename from src/static/app/dist/assets/peerSearchBar-3fBKUdTH.js rename to src/static/app/dist/assets/peerSearchBar-CCwSm3x3.js index 9a100e1..0c93ef7 100644 --- a/src/static/app/dist/assets/peerSearchBar-3fBKUdTH.js +++ b/src/static/app/dist/assets/peerSearchBar-CCwSm3x3.js @@ -1 +1 @@ -import{_ as u,q as m,G as p,r as f,W as b,a3 as h,o as g,k as v,f as y,w as _,a as e,m as x,y as w,b as S,j as B}from"./index-BaGiSoQe.js";import{L as T}from"./localeText-DkjxgEQB.js";const C={class:"fixed-bottom w-100 bottom-0 z-2",style:{"z-index":"1"}},P={class:"container-fluid"},k={class:"row g-0"},L={class:"col-md-9 col-lg-10 d-flex justify-content-center py-2"},V={class:"rounded-3 p-2 border shadow searchPeersContainer bg-body-tertiary"},j={class:"d-flex gap-1 align-items-center px-2"},z=["placeholder"],D={__name:"peerSearchBar",emits:["close"],setup(G,{emit:n}){const l=m(()=>p("Search Peers..."));let t;const o=f(""),r=b(),i=()=>{t?(clearTimeout(t),t=setTimeout(()=>{r.searchString=o.value},300)):t=setTimeout(()=>{r.searchString=o.value},300)},d=n,c=h("searchBar");return g(()=>{c.value.focus()}),(M,s)=>(y(),v(B,{name:"slideUp",appear:"",type:"animation",style:{"animation-delay":"1s"}},{default:_(()=>[e("div",C,[e("div",P,[e("div",k,[s[5]||(s[5]=e("div",{class:"col-md-3 col-lg-2"},null,-1)),e("div",L,[e("div",V,[e("div",j,[s[4]||(s[4]=e("h6",{class:"mb-0 me-2"},[e("label",{for:"searchPeers"},[e("i",{class:"bi bi-search"})])],-1)),x(e("input",{ref:"searchBar",class:"flex-grow-1 form-control rounded-3 bg-secondary-subtle border-1 border-secondary-subtle",placeholder:l.value,id:"searchPeers",onKeyup:s[0]||(s[0]=a=>i()),"onUpdate:modelValue":s[1]||(s[1]=a=>o.value=a)},null,40,z),[[w,o.value]]),e("button",{onClick:s[2]||(s[2]=a=>d("close")),style:{"white-space":"nowrap"},class:"btn bg-secondary-subtle text-secondary-emphasis border-secondary-subtle rounded-3 d-flex align-items-center"},[e("span",null,[s[3]||(s[3]=e("i",{class:"bi bi-x-circle-fill me-2"},null,-1)),S(T,{t:"Done"})])])])])])])])])]),_:1}))}},W=u(D,[["__scopeId","data-v-b741afe7"]]);export{W as default}; +import{_ as u,q as m,G as p,r as f,W as b,a2 as h,o as g,k as v,f as y,w as _,a as e,m as x,y as w,b as S,j as B}from"./index-Upsq31TS.js";import{L as T}from"./localeText-n7rlaTGQ.js";const C={class:"fixed-bottom w-100 bottom-0 z-2",style:{"z-index":"1"}},P={class:"container-fluid"},k={class:"row g-0"},L={class:"col-md-9 col-lg-10 d-flex justify-content-center py-2"},V={class:"rounded-3 p-2 border shadow searchPeersContainer bg-body-tertiary"},j={class:"d-flex gap-1 align-items-center px-2"},z=["placeholder"],D={__name:"peerSearchBar",emits:["close"],setup(G,{emit:n}){const l=m(()=>p("Search Peers..."));let t;const o=f(""),r=b(),i=()=>{t?(clearTimeout(t),t=setTimeout(()=>{r.searchString=o.value},300)):t=setTimeout(()=>{r.searchString=o.value},300)},d=n,c=h("searchBar");return g(()=>{c.value.focus()}),(M,s)=>(y(),v(B,{name:"slideUp",appear:"",type:"animation",style:{"animation-delay":"1s"}},{default:_(()=>[e("div",C,[e("div",P,[e("div",k,[s[5]||(s[5]=e("div",{class:"col-md-3 col-lg-2"},null,-1)),e("div",L,[e("div",V,[e("div",j,[s[4]||(s[4]=e("h6",{class:"mb-0 me-2"},[e("label",{for:"searchPeers"},[e("i",{class:"bi bi-search"})])],-1)),x(e("input",{ref:"searchBar",class:"flex-grow-1 form-control rounded-3 bg-secondary-subtle border-1 border-secondary-subtle",placeholder:l.value,id:"searchPeers",onKeyup:s[0]||(s[0]=a=>i()),"onUpdate:modelValue":s[1]||(s[1]=a=>o.value=a)},null,40,z),[[w,o.value]]),e("button",{onClick:s[2]||(s[2]=a=>d("close")),style:{"white-space":"nowrap"},class:"btn bg-secondary-subtle text-secondary-emphasis border-secondary-subtle rounded-3 d-flex align-items-center"},[e("span",null,[s[3]||(s[3]=e("i",{class:"bi bi-x-circle-fill me-2"},null,-1)),S(T,{t:"Done"})])])])])])])])])]),_:1}))}},W=u(D,[["__scopeId","data-v-b741afe7"]]);export{W as default}; diff --git a/src/static/app/dist/assets/peerSettings-DJBxRPdI.js b/src/static/app/dist/assets/peerSettings-BVjjHyUZ.js similarity index 98% rename from src/static/app/dist/assets/peerSettings-DJBxRPdI.js rename to src/static/app/dist/assets/peerSettings-BVjjHyUZ.js index c32fb76..24b6911 100644 --- a/src/static/app/dist/assets/peerSettings-DJBxRPdI.js +++ b/src/static/app/dist/assets/peerSettings-BVjjHyUZ.js @@ -1 +1 @@ -import{_ as u,h as c,c as n,f as r,a as e,d as m,b as a,t as h,m as i,y as d,n as b,a1 as _,z as p,D as f}from"./index-BaGiSoQe.js";import{L as g}from"./localeText-DkjxgEQB.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:f()}},methods:{reset(){this.selectedPeer&&(this.data=JSON.parse(JSON.stringify(this.selectedPeer)),this.dataChanged=!1)},savePeer(){this.saving=!0,p(`/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,p(`/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("change",()=>{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"},C={class:"card-header bg-transparent d-flex align-items-center gap-2 border-0 p-4 pb-2"},k={class:"mb-0"},P={key:0,class:"card-body px-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"},R={for:"peer_private_key_textbox",class:"form-label"},O={class:"text-muted"},T=["type","disabled"],L={for:"peer_allowed_ip_textbox",class:"form-label"},q={class:"text-muted"},E=["disabled"],B={for:"peer_endpoint_allowed_ips",class:"form-label"},I={class:"text-muted"},z=["disabled"],J={for:"peer_DNS_textbox",class:"form-label"},j={class:"text-muted"},Q=["disabled"],F={class:"accordion my-3",id:"peerSettingsAccordion"},G={class:"accordion-item"},H={class:"accordion-header"},W={class:"accordion-button rounded-3 collapsed",type:"button","data-bs-toggle":"collapse","data-bs-target":"#peerSettingsAccordionOptional"},X={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 align-items-center gap-2"},re=["disabled"],pe=["disabled"],ue={class:"d-flex gap-2 align-items-center"},ce={class:"d-flex gap-2 ms-auto"};function me(l,t,he,be,_e,fe){const o=c("LocaleText");return r(),n("div",x,[e("div",y,[e("div",w,[e("div",S,[e("div",C,[e("h4",k,[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(),n("div",P,[e("div",$,[e("div",D,[e("small",N,[a(o,{t:"Public Key"})]),e("small",V,[e("samp",null,h(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",R,[e("small",O,[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:b(["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",L,[e("small",q,[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,z),[[d,this.data.endpoint_allowed_ip]])]),e("div",null,[e("label",J,[e("small",j,[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",F,[e("div",G,[e("h2",H,[e("button",W,[a(o,{t:"Optional Settings"})])]),e("div",X,[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]])])])])])]),e("div",ne,[e("button",{class:"btn bg-secondary-subtle border-secondary-subtle text-secondary-emphasis rounded-3 shadow ms-auto px-3 py-2",onClick:t[10]||(t[10]=s=>this.reset()),disabled:!this.dataChanged||this.saving},[t[15]||(t[15]=e("i",{class:"bi bi-arrow-clockwise me-2"},null,-1)),a(o,{t:"Reset"})],8,re),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[11]||(t[11]=s=>this.savePeer())},[t[16]||(t[16]=e("i",{class:"bi bi-save-fill me-2"},null,-1)),a(o,{t:"Save"})],8,pe)]),t[20]||(t[20]=e("hr",null,null,-1)),e("div",ue,[e("strong",null,[a(o,{t:"Reset Data Usage"})]),e("div",ce,[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("total"))},[t[17]||(t[17]=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[13]||(t[13]=s=>this.resetPeerData("receive"))},[t[18]||(t[18]=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[14]||(t[14]=s=>this.resetPeerData("sent"))},[t[19]||(t[19]=e("i",{class:"bi bi-arrow-up me-2"},null,-1)),a(o,{t:"Sent"})])])])])])):m("",!0)])])])])}const xe=u(v,[["render",me],["__scopeId","data-v-12b3ae8e"]]);export{xe as default}; +import{_ as u,h as c,c as n,f as r,a as e,d as m,b as a,t as h,m as i,y as d,n as b,a0 as _,z as p,D as f}from"./index-Upsq31TS.js";import{L as g}from"./localeText-n7rlaTGQ.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:f()}},methods:{reset(){this.selectedPeer&&(this.data=JSON.parse(JSON.stringify(this.selectedPeer)),this.dataChanged=!1)},savePeer(){this.saving=!0,p(`/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,p(`/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("change",()=>{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"},C={class:"card-header bg-transparent d-flex align-items-center gap-2 border-0 p-4 pb-2"},k={class:"mb-0"},P={key:0,class:"card-body px-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"},R={for:"peer_private_key_textbox",class:"form-label"},O={class:"text-muted"},T=["type","disabled"],L={for:"peer_allowed_ip_textbox",class:"form-label"},q={class:"text-muted"},E=["disabled"],B={for:"peer_endpoint_allowed_ips",class:"form-label"},I={class:"text-muted"},z=["disabled"],J={for:"peer_DNS_textbox",class:"form-label"},j={class:"text-muted"},Q=["disabled"],F={class:"accordion my-3",id:"peerSettingsAccordion"},G={class:"accordion-item"},H={class:"accordion-header"},W={class:"accordion-button rounded-3 collapsed",type:"button","data-bs-toggle":"collapse","data-bs-target":"#peerSettingsAccordionOptional"},X={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 align-items-center gap-2"},re=["disabled"],pe=["disabled"],ue={class:"d-flex gap-2 align-items-center"},ce={class:"d-flex gap-2 ms-auto"};function me(l,t,he,be,_e,fe){const o=c("LocaleText");return r(),n("div",x,[e("div",y,[e("div",w,[e("div",S,[e("div",C,[e("h4",k,[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(),n("div",P,[e("div",$,[e("div",D,[e("small",N,[a(o,{t:"Public Key"})]),e("small",V,[e("samp",null,h(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",R,[e("small",O,[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:b(["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",L,[e("small",q,[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,z),[[d,this.data.endpoint_allowed_ip]])]),e("div",null,[e("label",J,[e("small",j,[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",F,[e("div",G,[e("h2",H,[e("button",W,[a(o,{t:"Optional Settings"})])]),e("div",X,[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]])])])])])]),e("div",ne,[e("button",{class:"btn bg-secondary-subtle border-secondary-subtle text-secondary-emphasis rounded-3 shadow ms-auto px-3 py-2",onClick:t[10]||(t[10]=s=>this.reset()),disabled:!this.dataChanged||this.saving},[t[15]||(t[15]=e("i",{class:"bi bi-arrow-clockwise me-2"},null,-1)),a(o,{t:"Reset"})],8,re),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[11]||(t[11]=s=>this.savePeer())},[t[16]||(t[16]=e("i",{class:"bi bi-save-fill me-2"},null,-1)),a(o,{t:"Save"})],8,pe)]),t[20]||(t[20]=e("hr",null,null,-1)),e("div",ue,[e("strong",null,[a(o,{t:"Reset Data Usage"})]),e("div",ce,[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("total"))},[t[17]||(t[17]=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[13]||(t[13]=s=>this.resetPeerData("receive"))},[t[18]||(t[18]=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[14]||(t[14]=s=>this.resetPeerData("sent"))},[t[19]||(t[19]=e("i",{class:"bi bi-arrow-up me-2"},null,-1)),a(o,{t:"Sent"})])])])])])):m("",!0)])])])])}const xe=u(v,[["render",me],["__scopeId","data-v-12b3ae8e"]]);export{xe as default}; diff --git a/src/static/app/dist/assets/peerShareLinkModal-DDmGp_KD.js b/src/static/app/dist/assets/peerShareLinkModal-rl2Nl0hw.js similarity index 98% rename from src/static/app/dist/assets/peerShareLinkModal-DDmGp_KD.js rename to src/static/app/dist/assets/peerShareLinkModal-rl2Nl0hw.js index 621fcab..4d179fa 100644 --- a/src/static/app/dist/assets/peerShareLinkModal-DDmGp_KD.js +++ b/src/static/app/dist/assets/peerShareLinkModal-rl2Nl0hw.js @@ -1 +1 @@ -import{_ as L,r as y,K as V,H as B,c,f as o,a as e,d as S,t as N,n as w,z as P,g as I,D as W,E as U,h as k,e as R,b as l,m as g,y as C,u as $,G as E,v as T,w as M,s as A,k as _,S as j}from"./index-BaGiSoQe.js";import{d as D}from"./dayjs.min-H8Pjp0HL.js";import{Q as O}from"./vue-datepicker-CI9txOl2.js";import{L as b}from"./localeText-DkjxgEQB.js";const J={class:"card rounded-0 border-start-0 border-bottom-0 bg-body-secondary",style:{height:"400px",overflow:"scroll"}},q={class:"card-body"},z={key:0,class:"alert alert-danger rounded-3"},G={class:"font-monospace"},Q=["innerText"],F={__name:"peerShareWithEmailBodyPreview",props:["body","selectedPeer"],async setup(s){let t,f;const h=s,m=y(""),p=y(!1),r=y(""),n=async()=>{h.body&&(p.value=!1,m.value="",await P("/api/email/previewBody",{Body:h.body,ConfigurationName:h.selectedPeer.configuration.Name,Peer:h.selectedPeer.id},i=>{i.status?m.value=i.data:r.value=i.message,p.value=!i.status}))};[t,f]=V(()=>n()),await t,f();let d;return B(()=>h.body,async()=>{d===void 0?d=setTimeout(async()=>{await n()},500):(clearTimeout(d),d=setTimeout(async()=>{await n()},500))}),(i,x)=>(o(),c("div",J,[e("div",q,[p.value&&s.body?(o(),c("div",z,[x[0]||(x[0]=e("i",{class:"bi bi-exclamation-triangle-fill me-2"},null,-1)),e("span",G,N(r.value),1)])):S("",!0),s.body?(o(),c("div",{key:1,class:w({"opacity-50":p.value}),innerText:m.value},null,10,Q)):S("",!0)])]))}},K=L(F,[["__scopeId","data-v-8cfb4d4d"]]),X={key:0},Z={class:"d-flex mb-3 align-items-center"},ee={class:"mb-0 ms-auto"},te={class:"position-relative"},se=["disabled","placeholder"],ae={class:"position-relative"},ie=["placeholder","disabled"],oe={class:"row g-0"},le=["disabled","placeholder"],re={key:0,class:"col-6"},ne={class:"card border-top-0 rounded-top-0 rounded-bottom-3 bg-body-tertiary",style:{border:"var(--bs-border-width) solid var(--bs-border-color)"}},de={class:"card-body d-flex flex-column gap-2"},ce={class:"form-check form-switch ms-auto"},ue={class:"form-check-label",for:"livePreview"},me={class:"form-check form-switch"},he={class:"form-check-label",for:"includeAttachment"},pe=["disabled"],be={key:0},fe={key:1},ye={key:1},ve={__name:"peerShareWithEmail",props:["dataCopy","selectedPeer"],emits:["fullscreen","hide"],async setup(s,{emit:t}){let f,h;const m=s,p=y(!1);[f,h]=V(()=>I("/api/email/ready",{},v=>{p.value=v.status})),await f,h();const r=W(),n=U({Receiver:"",Body:r.Configuration.Email.email_template,Subject:"",IncludeAttachment:!1,ConfigurationName:m.selectedPeer.configuration.Name,Peer:m.selectedPeer.id}),d=y(!1),i=y(!1),x=async()=>{i.value=!0,await P("/api/email/send",n,v=>{v.status?r.newMessage("Server","Email sent successfully!","success"):r.newMessage("Server",`Email sent failed! Reason: ${v.message}`,"danger"),i.value=!1})},H=t;return B(d,()=>{H("fullscreen",d.value)}),(v,a)=>{const Y=k("RouterLink");return p.value?(o(),c("div",X,[e("div",Z,[e("a",{role:"button",class:"d-flex text-decoration-none text-body text-muted",onClick:a[0]||(a[0]=u=>H("hide"))},a[7]||(a[7]=[e("i",{class:"bi bi-chevron-left me-2"},null,-1),R(" Back ")])),e("h6",ee,[l(b,{t:"Share with Email"})])]),e("form",{class:"d-flex gap-3 flex-column",onSubmit:a[6]||(a[6]=u=>{u.preventDefault(),x()})},[e("div",null,[e("div",te,[a[8]||(a[8]=e("i",{class:"bi bi-person-circle",style:{position:"absolute",top:"0.4rem",left:"0.75rem"}},null,-1)),g(e("input",{type:"email",class:"form-control rounded-top-3 rounded-bottom-0",style:{"padding-left":"calc( 0.75rem + 24px )"},"onUpdate:modelValue":a[1]||(a[1]=u=>n.Receiver=u),disabled:i.value,placeholder:$(E)("Who are you sending to?"),required:"",id:"email_receiver","aria-describedby":"emailHelp"},null,8,se),[[C,n.Receiver]])]),e("div",ae,[a[9]||(a[9]=e("i",{class:"bi bi-hash",style:{position:"absolute",top:"0.4rem",left:"0.75rem"}},null,-1)),g(e("input",{type:"text",class:"form-control rounded-0 border-top-0 border-bottom-0",style:{"padding-left":"calc( 0.75rem + 24px )"},placeholder:$(E)("What's the subject?"),disabled:i.value,"onUpdate:modelValue":a[2]||(a[2]=u=>n.Subject=u),id:"email_subject","aria-describedby":"emailHelp"},null,8,ie),[[C,n.Subject]])]),e("div",oe,[e("div",{class:w([d.value?"col-6":"col-12"])},[g(e("textarea",{class:"form-control rounded-top-0 rounded-bottom-0 font-monospace border-bottom-0","onUpdate:modelValue":a[3]||(a[3]=u=>n.Body=u),disabled:i.value,placeholder:$(E)("What's the body?"),style:{height:"400px","max-height":"400px"}},null,8,le),[[C,n.Body]])],2),d.value?(o(),c("div",re,[l(K,{body:n.Body,selectedPeer:s.selectedPeer},null,8,["body","selectedPeer"])])):S("",!0)]),e("div",ne,[e("div",de,[e("div",ce,[g(e("input",{class:"form-check-input",type:"checkbox","onUpdate:modelValue":a[4]||(a[4]=u=>d.value=u),role:"switch",id:"livePreview"},null,512),[[T,d.value]]),e("label",ue,[l(b,{t:"Live Preview"})])])])])]),e("div",me,[g(e("input",{class:"form-check-input",type:"checkbox","onUpdate:modelValue":a[5]||(a[5]=u=>n.IncludeAttachment=u),role:"switch",id:"includeAttachment"},null,512),[[T,n.IncludeAttachment]]),e("label",he,[l(b,{t:"Include configuration file as an attachment"})])]),e("button",{disabled:i.value,class:"btn bg-primary-subtle text-primary-emphasis border-primary-subtle rounded-3"},[i.value?(o(),c("span",fe,[a[11]||(a[11]=e("span",{class:"spinner-border spinner-border-sm me-2"},null,-1)),l(b,{t:"Sending..."})])):(o(),c("span",be,[a[10]||(a[10]=e("i",{class:"bi bi-send me-2"},null,-1)),l(b,{t:"Send"})]))],8,pe)],32)])):(o(),c("div",ye,[e("small",null,[l(b,{t:"SMTP is not configured, please navigate to "}),l(Y,{to:"/settings"},{default:M(()=>[l(b,{t:"Settings"})]),_:1}),l(b,{t:" to finish setup"})])]))}}},ge=L(ve,[["__scopeId","data-v-913bd64b"]]),_e={name:"peerShareLinkModal",props:{selectedPeer:Object},components:{PeerShareWithEmail:ge,LocaleText:b,VueDatePicker:O},data(){return{dataCopy:void 0,loading:!1,fullscreen:!1,shareWithEmail:!1}},setup(){return{store:W()}},mounted(){this.dataCopy=JSON.parse(JSON.stringify(this.selectedPeer.ShareLink)).at(0)},watch:{"selectedPeer.ShareLink":{deep:!0,handler(s,t){t.length!==s.length&&(this.dataCopy=JSON.parse(JSON.stringify(this.selectedPeer.ShareLink)).at(0))}}},methods:{startSharing(){this.loading=!0,P("/api/sharePeer/create",{Configuration:this.selectedPeer.configuration.Name,Peer:this.selectedPeer.id,ExpireDate:D().add(7,"d").format("YYYY-MM-DD HH:mm:ss")},s=>{s.status?(this.selectedPeer.ShareLink=s.data,this.dataCopy=s.data.at(0)):this.store.newMessage("Server","Share link failed to create. Reason: "+s.message,"danger"),this.loading=!1})},updateLinkExpireDate(){P("/api/sharePeer/update",this.dataCopy,s=>{s.status?(this.dataCopy=s.data.at(0),this.selectedPeer.ShareLink=s.data,this.store.newMessage("Server","Link expire date updated","success")):this.store.newMessage("Server","Link expire date failed to update. Reason: "+s.message,"danger"),this.loading=!1})},stopSharing(){this.loading=!0,this.dataCopy.ExpireDate=D().format("YYYY-MM-DD HH:mm:ss"),this.updateLinkExpireDate()},parseTime(s){s?this.dataCopy.ExpireDate=D(s).format("YYYY-MM-DD HH:mm:ss"):this.dataCopy.ExpireDate=void 0,this.updateLinkExpireDate()}},computed:{getUrl(){const s=this.store.getActiveCrossServer();return s?`${s.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}}},xe={class:"peerSettingContainer w-100 h-100 position-absolute top-0 start-0 overflow-y-scroll"},ke={class:"container d-flex h-100 w-100"},Se={class:"card rounded-3 shadow flex-grow-1"},we={class:"card-header bg-transparent d-flex align-items-center gap-2 border-0 p-4"},Pe={class:"mb-0"},Ce={key:0,class:"card-body px-4 pb-4"},$e={key:0},Ee={class:"mb-3 text-muted"},De=["disabled"],Me={key:1},Le={key:0},He={class:"d-flex gap-2 mb-4"},Te=["href"],Ve={class:"d-flex flex-column gap-2 mb-3"},Be={class:"d-flex gap-2 flex-column flex-sm-row"},Ne=["disabled"],We={class:"text-muted"};function Ye(s,t,f,h,m,p){const r=k("LocaleText"),n=k("VueDatePicker"),d=k("PeerShareWithEmail");return o(),c("div",xe,[e("div",ke,[e("div",{class:"m-auto modal-dialog-centered dashboardModal",style:A([this.fullscreen?"width: 100%":"width: 700px"])},[e("div",Se,[e("div",we,[e("h4",Pe,[l(r,{t:"Share Peer"})]),e("button",{type:"button",class:"btn-close ms-auto",onClick:t[0]||(t[0]=i=>this.$emit("close"))})]),this.selectedPeer.ShareLink?(o(),c("div",Ce,[this.dataCopy?(o(),c("div",Me,[m.shareWithEmail?(o(),_(j,{key:1},{fallback:M(()=>[e("h6",We,[t[11]||(t[11]=e("span",{class:"spinner-border me-2 spinner-border-sm",role:"status"},null,-1)),l(r,{t:"Checking SMTP Configuration..."})])]),default:M(()=>[l(d,{onHide:t[4]||(t[4]=i=>m.shareWithEmail=!1),onFullscreen:t[5]||(t[5]=i=>{this.fullscreen=i}),selectedPeer:f.selectedPeer,dataCopy:m.dataCopy},null,8,["selectedPeer","dataCopy"])]),_:1})):(o(),c("div",Le,[e("div",He,[t[7]||(t[7]=e("i",{class:"bi bi-link-45deg"},null,-1)),e("a",{href:this.getUrl,class:"text-decoration-none",target:"_blank"},N(p.getUrl),9,Te)]),e("div",Ve,[e("small",null,[t[8]||(t[8]=e("i",{class:"bi bi-calendar me-2"},null,-1)),l(r,{t:"Expire At"})]),l(n,{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"])]),e("div",Be,[e("button",{style:{flex:"1 1 0"},onClick:t[2]||(t[2]=i=>this.stopSharing()),disabled:this.loading,class:"w-100 btn bg-danger-subtle text-danger-emphasis border-1 border-danger-subtle rounded-3 shadow-sm"},[e("span",{class:w({"animate__animated animate__flash animate__infinite animate__slower":this.loading})},t[9]||(t[9]=[e("i",{class:"bi bi-send-slash-fill me-2"},null,-1)]),2),this.loading?(o(),_(r,{key:0,t:"Stop Sharing..."})):(o(),_(r,{key:1,t:"Stop Sharing"}))],8,Ne),e("button",{style:{flex:"1 1 0"},onClick:t[3]||(t[3]=i=>m.shareWithEmail=!0),class:"btn bg-primary-subtle text-primary-emphasis border-primary-subtle rounded-3"},[t[10]||(t[10]=e("i",{class:"bi bi-envelope me-2"},null,-1)),l(r,{t:"Share with Email"})])])]))])):(o(),c("div",$e,[e("h6",Ee,[l(r,{t:"Currently the peer is not sharing"})]),e("button",{onClick:t[1]||(t[1]=i=>this.startSharing()),disabled:this.loading,class:"w-100 btn bg-success-subtle text-success-emphasis border-1 border-success-subtle rounded-3 shadow-sm"},[e("span",{class:w({"animate__animated animate__flash animate__infinite animate__slower":this.loading})},t[6]||(t[6]=[e("i",{class:"bi bi-send-fill me-2"},null,-1)]),2),this.loading?(o(),_(r,{key:0,t:"Sharing..."})):(o(),_(r,{key:1,t:"Start Sharing"}))],8,De)]))])):S("",!0)])],4)])])}const je=L(_e,[["render",Ye]]);export{je as default}; +import{_ as L,r as y,K as V,H as B,c,f as o,a as e,d as S,t as N,n as w,z as P,g as I,D as W,E as U,h as k,e as R,b as l,m as g,y as C,u as $,G as E,v as T,w as M,s as A,k as _,S as j}from"./index-Upsq31TS.js";import{d as D}from"./dayjs.min-Cdu5c05l.js";import{Q as O}from"./vue-datepicker-COnDbf6W.js";import{L as b}from"./localeText-n7rlaTGQ.js";const J={class:"card rounded-0 border-start-0 border-bottom-0 bg-body-secondary",style:{height:"400px",overflow:"scroll"}},q={class:"card-body"},z={key:0,class:"alert alert-danger rounded-3"},G={class:"font-monospace"},Q=["innerText"],F={__name:"peerShareWithEmailBodyPreview",props:["body","selectedPeer"],async setup(s){let t,f;const h=s,m=y(""),p=y(!1),r=y(""),n=async()=>{h.body&&(p.value=!1,m.value="",await P("/api/email/previewBody",{Body:h.body,ConfigurationName:h.selectedPeer.configuration.Name,Peer:h.selectedPeer.id},i=>{i.status?m.value=i.data:r.value=i.message,p.value=!i.status}))};[t,f]=V(()=>n()),await t,f();let d;return B(()=>h.body,async()=>{d===void 0?d=setTimeout(async()=>{await n()},500):(clearTimeout(d),d=setTimeout(async()=>{await n()},500))}),(i,x)=>(o(),c("div",J,[e("div",q,[p.value&&s.body?(o(),c("div",z,[x[0]||(x[0]=e("i",{class:"bi bi-exclamation-triangle-fill me-2"},null,-1)),e("span",G,N(r.value),1)])):S("",!0),s.body?(o(),c("div",{key:1,class:w({"opacity-50":p.value}),innerText:m.value},null,10,Q)):S("",!0)])]))}},K=L(F,[["__scopeId","data-v-8cfb4d4d"]]),X={key:0},Z={class:"d-flex mb-3 align-items-center"},ee={class:"mb-0 ms-auto"},te={class:"position-relative"},se=["disabled","placeholder"],ae={class:"position-relative"},ie=["placeholder","disabled"],oe={class:"row g-0"},le=["disabled","placeholder"],re={key:0,class:"col-6"},ne={class:"card border-top-0 rounded-top-0 rounded-bottom-3 bg-body-tertiary",style:{border:"var(--bs-border-width) solid var(--bs-border-color)"}},de={class:"card-body d-flex flex-column gap-2"},ce={class:"form-check form-switch ms-auto"},ue={class:"form-check-label",for:"livePreview"},me={class:"form-check form-switch"},he={class:"form-check-label",for:"includeAttachment"},pe=["disabled"],be={key:0},fe={key:1},ye={key:1},ve={__name:"peerShareWithEmail",props:["dataCopy","selectedPeer"],emits:["fullscreen","hide"],async setup(s,{emit:t}){let f,h;const m=s,p=y(!1);[f,h]=V(()=>I("/api/email/ready",{},v=>{p.value=v.status})),await f,h();const r=W(),n=U({Receiver:"",Body:r.Configuration.Email.email_template,Subject:"",IncludeAttachment:!1,ConfigurationName:m.selectedPeer.configuration.Name,Peer:m.selectedPeer.id}),d=y(!1),i=y(!1),x=async()=>{i.value=!0,await P("/api/email/send",n,v=>{v.status?r.newMessage("Server","Email sent successfully!","success"):r.newMessage("Server",`Email sent failed! Reason: ${v.message}`,"danger"),i.value=!1})},H=t;return B(d,()=>{H("fullscreen",d.value)}),(v,a)=>{const Y=k("RouterLink");return p.value?(o(),c("div",X,[e("div",Z,[e("a",{role:"button",class:"d-flex text-decoration-none text-body text-muted",onClick:a[0]||(a[0]=u=>H("hide"))},a[7]||(a[7]=[e("i",{class:"bi bi-chevron-left me-2"},null,-1),R(" Back ")])),e("h6",ee,[l(b,{t:"Share with Email"})])]),e("form",{class:"d-flex gap-3 flex-column",onSubmit:a[6]||(a[6]=u=>{u.preventDefault(),x()})},[e("div",null,[e("div",te,[a[8]||(a[8]=e("i",{class:"bi bi-person-circle",style:{position:"absolute",top:"0.4rem",left:"0.75rem"}},null,-1)),g(e("input",{type:"email",class:"form-control rounded-top-3 rounded-bottom-0",style:{"padding-left":"calc( 0.75rem + 24px )"},"onUpdate:modelValue":a[1]||(a[1]=u=>n.Receiver=u),disabled:i.value,placeholder:$(E)("Who are you sending to?"),required:"",id:"email_receiver","aria-describedby":"emailHelp"},null,8,se),[[C,n.Receiver]])]),e("div",ae,[a[9]||(a[9]=e("i",{class:"bi bi-hash",style:{position:"absolute",top:"0.4rem",left:"0.75rem"}},null,-1)),g(e("input",{type:"text",class:"form-control rounded-0 border-top-0 border-bottom-0",style:{"padding-left":"calc( 0.75rem + 24px )"},placeholder:$(E)("What's the subject?"),disabled:i.value,"onUpdate:modelValue":a[2]||(a[2]=u=>n.Subject=u),id:"email_subject","aria-describedby":"emailHelp"},null,8,ie),[[C,n.Subject]])]),e("div",oe,[e("div",{class:w([d.value?"col-6":"col-12"])},[g(e("textarea",{class:"form-control rounded-top-0 rounded-bottom-0 font-monospace border-bottom-0","onUpdate:modelValue":a[3]||(a[3]=u=>n.Body=u),disabled:i.value,placeholder:$(E)("What's the body?"),style:{height:"400px","max-height":"400px"}},null,8,le),[[C,n.Body]])],2),d.value?(o(),c("div",re,[l(K,{body:n.Body,selectedPeer:s.selectedPeer},null,8,["body","selectedPeer"])])):S("",!0)]),e("div",ne,[e("div",de,[e("div",ce,[g(e("input",{class:"form-check-input",type:"checkbox","onUpdate:modelValue":a[4]||(a[4]=u=>d.value=u),role:"switch",id:"livePreview"},null,512),[[T,d.value]]),e("label",ue,[l(b,{t:"Live Preview"})])])])])]),e("div",me,[g(e("input",{class:"form-check-input",type:"checkbox","onUpdate:modelValue":a[5]||(a[5]=u=>n.IncludeAttachment=u),role:"switch",id:"includeAttachment"},null,512),[[T,n.IncludeAttachment]]),e("label",he,[l(b,{t:"Include configuration file as an attachment"})])]),e("button",{disabled:i.value,class:"btn bg-primary-subtle text-primary-emphasis border-primary-subtle rounded-3"},[i.value?(o(),c("span",fe,[a[11]||(a[11]=e("span",{class:"spinner-border spinner-border-sm me-2"},null,-1)),l(b,{t:"Sending..."})])):(o(),c("span",be,[a[10]||(a[10]=e("i",{class:"bi bi-send me-2"},null,-1)),l(b,{t:"Send"})]))],8,pe)],32)])):(o(),c("div",ye,[e("small",null,[l(b,{t:"SMTP is not configured, please navigate to "}),l(Y,{to:"/settings"},{default:M(()=>[l(b,{t:"Settings"})]),_:1}),l(b,{t:" to finish setup"})])]))}}},ge=L(ve,[["__scopeId","data-v-913bd64b"]]),_e={name:"peerShareLinkModal",props:{selectedPeer:Object},components:{PeerShareWithEmail:ge,LocaleText:b,VueDatePicker:O},data(){return{dataCopy:void 0,loading:!1,fullscreen:!1,shareWithEmail:!1}},setup(){return{store:W()}},mounted(){this.dataCopy=JSON.parse(JSON.stringify(this.selectedPeer.ShareLink)).at(0)},watch:{"selectedPeer.ShareLink":{deep:!0,handler(s,t){t.length!==s.length&&(this.dataCopy=JSON.parse(JSON.stringify(this.selectedPeer.ShareLink)).at(0))}}},methods:{startSharing(){this.loading=!0,P("/api/sharePeer/create",{Configuration:this.selectedPeer.configuration.Name,Peer:this.selectedPeer.id,ExpireDate:D().add(7,"d").format("YYYY-MM-DD HH:mm:ss")},s=>{s.status?(this.selectedPeer.ShareLink=s.data,this.dataCopy=s.data.at(0)):this.store.newMessage("Server","Share link failed to create. Reason: "+s.message,"danger"),this.loading=!1})},updateLinkExpireDate(){P("/api/sharePeer/update",this.dataCopy,s=>{s.status?(this.dataCopy=s.data.at(0),this.selectedPeer.ShareLink=s.data,this.store.newMessage("Server","Link expire date updated","success")):this.store.newMessage("Server","Link expire date failed to update. Reason: "+s.message,"danger"),this.loading=!1})},stopSharing(){this.loading=!0,this.dataCopy.ExpireDate=D().format("YYYY-MM-DD HH:mm:ss"),this.updateLinkExpireDate()},parseTime(s){s?this.dataCopy.ExpireDate=D(s).format("YYYY-MM-DD HH:mm:ss"):this.dataCopy.ExpireDate=void 0,this.updateLinkExpireDate()}},computed:{getUrl(){const s=this.store.getActiveCrossServer();return s?`${s.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}}},xe={class:"peerSettingContainer w-100 h-100 position-absolute top-0 start-0 overflow-y-scroll"},ke={class:"container d-flex h-100 w-100"},Se={class:"card rounded-3 shadow flex-grow-1"},we={class:"card-header bg-transparent d-flex align-items-center gap-2 border-0 p-4"},Pe={class:"mb-0"},Ce={key:0,class:"card-body px-4 pb-4"},$e={key:0},Ee={class:"mb-3 text-muted"},De=["disabled"],Me={key:1},Le={key:0},He={class:"d-flex gap-2 mb-4"},Te=["href"],Ve={class:"d-flex flex-column gap-2 mb-3"},Be={class:"d-flex gap-2 flex-column flex-sm-row"},Ne=["disabled"],We={class:"text-muted"};function Ye(s,t,f,h,m,p){const r=k("LocaleText"),n=k("VueDatePicker"),d=k("PeerShareWithEmail");return o(),c("div",xe,[e("div",ke,[e("div",{class:"m-auto modal-dialog-centered dashboardModal",style:A([this.fullscreen?"width: 100%":"width: 700px"])},[e("div",Se,[e("div",we,[e("h4",Pe,[l(r,{t:"Share Peer"})]),e("button",{type:"button",class:"btn-close ms-auto",onClick:t[0]||(t[0]=i=>this.$emit("close"))})]),this.selectedPeer.ShareLink?(o(),c("div",Ce,[this.dataCopy?(o(),c("div",Me,[m.shareWithEmail?(o(),_(j,{key:1},{fallback:M(()=>[e("h6",We,[t[11]||(t[11]=e("span",{class:"spinner-border me-2 spinner-border-sm",role:"status"},null,-1)),l(r,{t:"Checking SMTP Configuration..."})])]),default:M(()=>[l(d,{onHide:t[4]||(t[4]=i=>m.shareWithEmail=!1),onFullscreen:t[5]||(t[5]=i=>{this.fullscreen=i}),selectedPeer:f.selectedPeer,dataCopy:m.dataCopy},null,8,["selectedPeer","dataCopy"])]),_:1})):(o(),c("div",Le,[e("div",He,[t[7]||(t[7]=e("i",{class:"bi bi-link-45deg"},null,-1)),e("a",{href:this.getUrl,class:"text-decoration-none",target:"_blank"},N(p.getUrl),9,Te)]),e("div",Ve,[e("small",null,[t[8]||(t[8]=e("i",{class:"bi bi-calendar me-2"},null,-1)),l(r,{t:"Expire At"})]),l(n,{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"])]),e("div",Be,[e("button",{style:{flex:"1 1 0"},onClick:t[2]||(t[2]=i=>this.stopSharing()),disabled:this.loading,class:"w-100 btn bg-danger-subtle text-danger-emphasis border-1 border-danger-subtle rounded-3 shadow-sm"},[e("span",{class:w({"animate__animated animate__flash animate__infinite animate__slower":this.loading})},t[9]||(t[9]=[e("i",{class:"bi bi-send-slash-fill me-2"},null,-1)]),2),this.loading?(o(),_(r,{key:0,t:"Stop Sharing..."})):(o(),_(r,{key:1,t:"Stop Sharing"}))],8,Ne),e("button",{style:{flex:"1 1 0"},onClick:t[3]||(t[3]=i=>m.shareWithEmail=!0),class:"btn bg-primary-subtle text-primary-emphasis border-primary-subtle rounded-3"},[t[10]||(t[10]=e("i",{class:"bi bi-envelope me-2"},null,-1)),l(r,{t:"Share with Email"})])])]))])):(o(),c("div",$e,[e("h6",Ee,[l(r,{t:"Currently the peer is not sharing"})]),e("button",{onClick:t[1]||(t[1]=i=>this.startSharing()),disabled:this.loading,class:"w-100 btn bg-success-subtle text-success-emphasis border-1 border-success-subtle rounded-3 shadow-sm"},[e("span",{class:w({"animate__animated animate__flash animate__infinite animate__slower":this.loading})},t[6]||(t[6]=[e("i",{class:"bi bi-send-fill me-2"},null,-1)]),2),this.loading?(o(),_(r,{key:0,t:"Sharing..."})):(o(),_(r,{key:1,t:"Start Sharing"}))],8,De)]))])):S("",!0)])],4)])])}const je=L(_e,[["render",Ye]]);export{je as default}; diff --git a/src/static/app/dist/assets/ping-Rj802N48.js b/src/static/app/dist/assets/ping-DHdoEsrr.js similarity index 97% rename from src/static/app/dist/assets/ping-Rj802N48.js rename to src/static/app/dist/assets/ping-DHdoEsrr.js index 7571ddc..a3e2e17 100644 --- a/src/static/app/dist/assets/ping-Rj802N48.js +++ b/src/static/app/dist/assets/ping-DHdoEsrr.js @@ -1 +1 @@ -import{_ as R,c as l,a as e,m as u,b as d,h as b,B as _,F as c,i as p,d as m,y as k,t as i,w as f,j as v,g as x,D as I,f as n,e as g,s as P,n as h,k as w}from"./index-BaGiSoQe.js";import{L as C}from"./localeText-DkjxgEQB.js";import{O as A}from"./osmap-DImWbvYV.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:I()}},mounted(){x("/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,x("/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}}},M={class:"mt-md-5 mt-3 text-body"},T={class:"container"},V={class:"row"},$={class:"col-sm-4 d-flex gap-2 flex-column"},L={class:"mb-1 text-muted",for:"configuration"},B=["disabled"],N=["value"],O={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=b("LocaleText"),y=b("OSMap");return n(),l("div",M,[e("div",T,[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,N))),256))],8,B),[[_,this.selectedConfiguration]])]),e("div",null,[e("label",O,[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),[[k,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}; +import{_ as R,c as l,a as e,m as u,b as d,h as b,B as _,F as c,i as p,d as m,y as k,t as i,w as f,j as v,g as x,D as I,f as n,e as g,s as P,n as h,k as w}from"./index-Upsq31TS.js";import{L as C}from"./localeText-n7rlaTGQ.js";import{O as A}from"./osmap-DlPRtGR3.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:I()}},mounted(){x("/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,x("/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}}},M={class:"mt-md-5 mt-3 text-body"},T={class:"container"},V={class:"row"},$={class:"col-sm-4 d-flex gap-2 flex-column"},L={class:"mb-1 text-muted",for:"configuration"},B=["disabled"],N=["value"],O={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=b("LocaleText"),y=b("OSMap");return n(),l("div",M,[e("div",T,[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,N))),256))],8,B),[[_,this.selectedConfiguration]])]),e("div",null,[e("label",O,[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),[[k,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/protocolBadge-fuWULZA8.js b/src/static/app/dist/assets/protocolBadge-CWFrznYs.js similarity index 77% rename from src/static/app/dist/assets/protocolBadge-fuWULZA8.js rename to src/static/app/dist/assets/protocolBadge-CWFrznYs.js index e01abf6..4243900 100644 --- a/src/static/app/dist/assets/protocolBadge-fuWULZA8.js +++ b/src/static/app/dist/assets/protocolBadge-CWFrznYs.js @@ -1 +1 @@ -import{L as r}from"./localeText-DkjxgEQB.js";import{c as n,d as a,e as s,k as i,f as t}from"./index-BaGiSoQe.js";const d={key:0,class:"badge wireguardBg rounded-3 shadow"},c={key:1,class:"badge amneziawgBg rounded-3 shadow"},u={__name:"protocolBadge",props:{protocol:String,mini:!1},setup(e){return(m,o)=>e.protocol==="wg"?(t(),n("span",d,[o[0]||(o[0]=s(" WireGuard ")),e.mini?a("",!0):(t(),i(r,{key:0,t:"Configuration"}))])):e.protocol==="awg"?(t(),n("span",c,[o[1]||(o[1]=s(" AmneziaWG ")),e.mini?a("",!0):(t(),i(r,{key:0,t:"Configuration"}))])):a("",!0)}};export{u as _}; +import{L as r}from"./localeText-n7rlaTGQ.js";import{c as n,d as a,e as s,k as i,f as t}from"./index-Upsq31TS.js";const d={key:0,class:"badge wireguardBg rounded-3 shadow"},c={key:1,class:"badge amneziawgBg rounded-3 shadow"},u={__name:"protocolBadge",props:{protocol:String,mini:!1},setup(e){return(m,o)=>e.protocol==="wg"?(t(),n("span",d,[o[0]||(o[0]=s(" WireGuard ")),e.mini?a("",!0):(t(),i(r,{key:0,t:"Configuration"}))])):e.protocol==="awg"?(t(),n("span",c,[o[1]||(o[1]=s(" AmneziaWG ")),e.mini?a("",!0):(t(),i(r,{key:0,t:"Configuration"}))])):a("",!0)}};export{u as _}; diff --git a/src/static/app/dist/assets/restoreConfiguration-CB8Vk8pb.js b/src/static/app/dist/assets/restoreConfiguration-DOUQI3lV.js similarity index 98% rename from src/static/app/dist/assets/restoreConfiguration-CB8Vk8pb.js rename to src/static/app/dist/assets/restoreConfiguration-DOUQI3lV.js index 1628b01..972ec90 100644 --- a/src/static/app/dist/assets/restoreConfiguration-CB8Vk8pb.js +++ b/src/static/app/dist/assets/restoreConfiguration-DOUQI3lV.js @@ -1,4 +1,4 @@ -import{_ as E,r as k,o as A,c as r,f as n,a as e,d as w,t as y,F as N,i as D,k as f,b as l,n as v,u as W,E as z,W as F,q as C,H as G,D as T,I as H,m as g,y as _,e as $,z as Z,g as J,w as B,h as Q,j as V}from"./index-BaGiSoQe.js";import{L as o}from"./localeText-DkjxgEQB.js";import{d as X}from"./dayjs.min-H8Pjp0HL.js";import{_ as q}from"./protocolBadge-fuWULZA8.js";import{p as O}from"./index-6o26Ihmr.js";const ee={class:"card rounded-3 shadow-sm"},te={class:"mb-0 d-flex align-items-center gap-3"},se={class:"text-muted ms-auto d-block"},oe={key:0,class:"card-footer p-3 d-flex flex-column gap-2"},le=["onClick","id"],ne={class:"card-body d-flex p-3 gap-3 align-items-center"},ae={__name:"backupGroup",props:{configurationName:String,backups:Array,open:!1,selectedConfigurationBackup:Object,protocol:Array},emits:["select"],setup(m,{emit:u}){const t=m,h=u,p=k(t.open);return A(()=>{t.selectedConfigurationBackup&&document.querySelector(`#${t.selectedConfigurationBackup.filename.replace(".conf","")}`).scrollIntoView({behavior:"smooth"})}),(x,a)=>(n(),r("div",ee,[e("a",{role:"button",class:"card-body d-flex align-items-center text-decoration-none d-flex gap-3",onClick:a[0]||(a[0]=c=>p.value=!p.value)},[e("h6",te,[e("samp",null,y(m.configurationName),1),(n(!0),r(N,null,D(m.protocol,c=>(n(),f(q,{protocol:c},null,8,["protocol"]))),256))]),e("small",se,[l(o,{t:m.backups.length+(m.backups.length>1?" Backups":" Backup")},null,8,["t"])]),e("h5",{class:v(["mb-0 dropdownIcon text-muted",{active:p.value}])},a[1]||(a[1]=[e("i",{class:"bi bi-chevron-down"},null,-1)]),2)]),p.value?(n(),r("div",oe,[(n(!0),r(N,null,D(m.backups,c=>(n(),r("div",{class:"card rounded-3 shadow-sm animate__animated",key:c.filename,onClick:()=>{h("select",c)},id:c.filename.replace(".conf",""),role:"button"},[e("div",ne,[e("small",null,[a[2]||(a[2]=e("i",{class:"bi bi-file-earmark me-2"},null,-1)),e("samp",null,y(c.filename),1)]),e("small",null,[a[3]||(a[3]=e("i",{class:"bi bi-clock-history me-2"},null,-1)),e("samp",null,y(W(X)(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?(n(),f(o,{key:0,t:"Yes"})):(n(),f(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,le))),128))])):w("",!0)]))}},ie=E(ae,[["__scopeId","data-v-ccf48ac7"]]),re={class:"d-flex flex-column gap-5",id:"confirmBackup"},de={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"},fe={class:"mb-0"},pe={class:"text-muted mb-1",for:"ConfigurationName"},ve={class:"invalid-feedback"},be={key:0},ge={key:1},_e={class:"mb-0"},ke={class:"row g-3"},ye={class:"col-sm"},he={class:"text-muted mb-1",for:"PrivateKey"},xe={class:"input-group"},Ce={class:"col-sm"},Pe={class:"text-muted mb-1",for:"PublicKey"},we={class:"text-muted mb-1",for:"ListenPort"},$e={class:"invalid-feedback"},Be={key:0},Ne={key:1},De={class:"mb-0"},Ae={class:"text-muted mb-1 d-flex",for:"ListenPort"},Ie={class:"invalid-feedback"},Le={key:0},Se={key:1},Ue={class:"accordion",id:"newConfigurationOptionalAccordion"},Ke={class:"accordion-item"},Re={class:"accordion-header"},Ve={class:"accordion-button collapsed rounded-3",type:"button","data-bs-toggle":"collapse","data-bs-target":"#newConfigurationOptionalAccordionCollapse"},Oe={id:"newConfigurationOptionalAccordionCollapse",class:"accordion-collapse collapse","data-bs-parent":"#newConfigurationOptionalAccordion"},Ee={class:"accordion-body d-flex flex-column gap-3"},Te={class:"text-muted mb-1",for:"PreUp"},qe={class:"text-muted mb-1",for:"PreDown"},je={class:"text-muted mb-1",for:"PostUp"},Me={class:"text-muted mb-1",for:"PostDown"},Ye={class:"d-flex flex-column gap-3"},We={class:"d-flex flex-column flex-sm-row align-items-start align-items-sm-center gap-3"},ze={class:"mb-0"},Fe={key:0},Ge={class:"row g-3"},He={class:"col-sm"},Ze={class:"card text-bg-success rounded-3"},Je={class:"card-body"},Qe={class:"col-sm"},Xe={class:"card text-bg-warning rounded-3"},et={class:"card-body"},tt={class:"d-flex"},st=["disabled"],ot={__name:"confirmBackup",props:{selectedConfigurationBackup:Object},setup(m){const u=m,t=z({ConfigurationName:u.selectedConfigurationBackup.filename.split("_")[0],Backup:u.selectedConfigurationBackup.filename,Protocol:u.selectedConfigurationBackup.protocol}),h=u.selectedConfigurationBackup.content.split(` +import{_ as E,r as k,o as A,c as r,f as n,a as e,d as w,t as y,F as N,i as D,k as f,b as l,n as v,u as W,E as z,W as F,q as C,H as G,D as T,I as H,m as g,y as _,e as $,z as Z,g as J,w as B,h as Q,j as V}from"./index-Upsq31TS.js";import{L as o}from"./localeText-n7rlaTGQ.js";import{d as X}from"./dayjs.min-Cdu5c05l.js";import{_ as q}from"./protocolBadge-CWFrznYs.js";import{p as O}from"./index-6o26Ihmr.js";const ee={class:"card rounded-3 shadow-sm"},te={class:"mb-0 d-flex align-items-center gap-3"},se={class:"text-muted ms-auto d-block"},oe={key:0,class:"card-footer p-3 d-flex flex-column gap-2"},le=["onClick","id"],ne={class:"card-body d-flex p-3 gap-3 align-items-center"},ae={__name:"backupGroup",props:{configurationName:String,backups:Array,open:!1,selectedConfigurationBackup:Object,protocol:Array},emits:["select"],setup(m,{emit:u}){const t=m,h=u,p=k(t.open);return A(()=>{t.selectedConfigurationBackup&&document.querySelector(`#${t.selectedConfigurationBackup.filename.replace(".conf","")}`).scrollIntoView({behavior:"smooth"})}),(x,a)=>(n(),r("div",ee,[e("a",{role:"button",class:"card-body d-flex align-items-center text-decoration-none d-flex gap-3",onClick:a[0]||(a[0]=c=>p.value=!p.value)},[e("h6",te,[e("samp",null,y(m.configurationName),1),(n(!0),r(N,null,D(m.protocol,c=>(n(),f(q,{protocol:c},null,8,["protocol"]))),256))]),e("small",se,[l(o,{t:m.backups.length+(m.backups.length>1?" Backups":" Backup")},null,8,["t"])]),e("h5",{class:v(["mb-0 dropdownIcon text-muted",{active:p.value}])},a[1]||(a[1]=[e("i",{class:"bi bi-chevron-down"},null,-1)]),2)]),p.value?(n(),r("div",oe,[(n(!0),r(N,null,D(m.backups,c=>(n(),r("div",{class:"card rounded-3 shadow-sm animate__animated",key:c.filename,onClick:()=>{h("select",c)},id:c.filename.replace(".conf",""),role:"button"},[e("div",ne,[e("small",null,[a[2]||(a[2]=e("i",{class:"bi bi-file-earmark me-2"},null,-1)),e("samp",null,y(c.filename),1)]),e("small",null,[a[3]||(a[3]=e("i",{class:"bi bi-clock-history me-2"},null,-1)),e("samp",null,y(W(X)(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?(n(),f(o,{key:0,t:"Yes"})):(n(),f(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,le))),128))])):w("",!0)]))}},ie=E(ae,[["__scopeId","data-v-ccf48ac7"]]),re={class:"d-flex flex-column gap-5",id:"confirmBackup"},de={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"},fe={class:"mb-0"},pe={class:"text-muted mb-1",for:"ConfigurationName"},ve={class:"invalid-feedback"},be={key:0},ge={key:1},_e={class:"mb-0"},ke={class:"row g-3"},ye={class:"col-sm"},he={class:"text-muted mb-1",for:"PrivateKey"},xe={class:"input-group"},Ce={class:"col-sm"},Pe={class:"text-muted mb-1",for:"PublicKey"},we={class:"text-muted mb-1",for:"ListenPort"},$e={class:"invalid-feedback"},Be={key:0},Ne={key:1},De={class:"mb-0"},Ae={class:"text-muted mb-1 d-flex",for:"ListenPort"},Ie={class:"invalid-feedback"},Le={key:0},Se={key:1},Ue={class:"accordion",id:"newConfigurationOptionalAccordion"},Ke={class:"accordion-item"},Re={class:"accordion-header"},Ve={class:"accordion-button collapsed rounded-3",type:"button","data-bs-toggle":"collapse","data-bs-target":"#newConfigurationOptionalAccordionCollapse"},Oe={id:"newConfigurationOptionalAccordionCollapse",class:"accordion-collapse collapse","data-bs-parent":"#newConfigurationOptionalAccordion"},Ee={class:"accordion-body d-flex flex-column gap-3"},Te={class:"text-muted mb-1",for:"PreUp"},qe={class:"text-muted mb-1",for:"PreDown"},je={class:"text-muted mb-1",for:"PostUp"},Me={class:"text-muted mb-1",for:"PostDown"},Ye={class:"d-flex flex-column gap-3"},We={class:"d-flex flex-column flex-sm-row align-items-start align-items-sm-center gap-3"},ze={class:"mb-0"},Fe={key:0},Ge={class:"row g-3"},He={class:"col-sm"},Ze={class:"card text-bg-success rounded-3"},Je={class:"card-body"},Qe={class:"col-sm"},Xe={class:"card text-bg-warning rounded-3"},et={class:"card-body"},tt={class:"d-flex"},st=["disabled"],ot={__name:"confirmBackup",props:{selectedConfigurationBackup:Object},setup(m){const u=m,t=z({ConfigurationName:u.selectedConfigurationBackup.filename.split("_")[0],Backup:u.selectedConfigurationBackup.filename,Protocol:u.selectedConfigurationBackup.protocol}),h=u.selectedConfigurationBackup.content.split(` `);for(let i of h){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=k(!1),x=k(!1),a=k(""),c=F(),b=C(()=>/^[a-zA-Z0-9_=+.-]{1,15}$/.test(t.ConfigurationName)&&t.ConfigurationName.length>0&&!c.Configurations.find(i=>i.Name===t.ConfigurationName)),P=C(()=>{try{window.wireguard.generatePublicKey(t.PrivateKey)}catch{return!1}return!0}),I=C(()=>t.ListenPort>0&&t.ListenPort<=65353&&Number.isInteger(t.ListenPort)&&!c.Configurations.find(i=>parseInt(i.ListenPort)===t.ListenPort)),L=C(()=>{try{return O(t.Address),!0}catch{return!1}}),S=C(()=>L.value&&I.value&&P.value&&b.value);A(()=>{document.querySelector("main").scrollTo({top:0,behavior:"smooth"}),G(()=>P,i=>{i&&(t.PublicKey=window.wireguard.generatePublicKey(t.PrivateKey))},{immediate:!0})});const U=C(()=>{let i;try{i=O(t.Address)}catch{return 0}return i.end-i.start}),K=C(()=>u.selectedConfigurationBackup.database?u.selectedConfigurationBackup.databaseContent.split(` `).filter(s=>s.search(`INSERT INTO "${t.ConfigurationName}"`)>=0).length:0),R=C(()=>u.selectedConfigurationBackup.database?u.selectedConfigurationBackup.databaseContent.split(` `).filter(s=>s.search(`INSERT INTO "${t.ConfigurationName}_restrict_access"`)>=0).length:0),j=T(),M=H(),Y=async()=>{S.value&&(x.value=!0,await Z("/api/addWireguardConfiguration",t,async i=>{i.status?(j.newMessage("Server","Configuration restored","success"),await c.getConfigurations(),await M.push(`/configuration/${t.ConfigurationName}/peers`)):x.value=!1}))};return(i,s)=>(n(),r("div",re,[e("form",de,[e("div",ue,[e("h4",ce,[l(o,{t:"Configuration"})])]),e("div",null,[e("label",me,[e("small",null,[l(o,{t:"Protocol"})])]),e("h5",fe,[l(q,{protocol:m.selectedConfigurationBackup.protocol,mini:!0},null,8,["protocol"])])]),e("div",null,[e("label",pe,[e("small",null,[l(o,{t:"Configuration Name"})])]),g(e("input",{type:"text",class:v(["form-control rounded-3",[b.value?"is-valid":"is-invalid"]]),placeholder:"ex. wg1",id:"ConfigurationName","onUpdate:modelValue":s[0]||(s[0]=d=>t.ConfigurationName=d),disabled:"",required:""},null,2),[[_,t.ConfigurationName]]),e("div",ve,[p.value?(n(),r("div",be,y(a.value),1)):(n(),r("div",ge,[l(o,{t:"Configuration name is invalid. Possible reasons:"}),e("ul",_e,[e("li",null,[l(o,{t:"Configuration name already exist."})]),e("li",null,[l(o,{t:"Configuration name can only contain 15 lower/uppercase alphabet, numbers, underscore, equal sign, plus sign, period and hyphen."})])])]))])]),e("div",ke,[e("div",ye,[e("div",null,[e("label",he,[e("small",null,[l(o,{t:"Private Key"})])]),e("div",xe,[g(e("input",{type:"text",class:v(["form-control rounded-start-3",[P.value?"is-valid":"is-invalid"]]),id:"PrivateKey",required:"","onUpdate:modelValue":s[1]||(s[1]=d=>t.PrivateKey=d),disabled:""},null,2),[[_,t.PrivateKey]])])])]),e("div",Ce,[e("div",null,[e("label",Pe,[e("small",null,[l(o,{t:"Public Key"})])]),g(e("input",{type:"text",class:"form-control rounded-3",id:"PublicKey","onUpdate:modelValue":s[2]||(s[2]=d=>t.PublicKey=d),disabled:""},null,512),[[_,t.PublicKey]])])])]),e("div",null,[e("label",we,[e("small",null,[l(o,{t:"Listen Port"})])]),g(e("input",{type:"number",class:v(["form-control rounded-3",[I.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),[[_,t.ListenPort]]),e("div",$e,[p.value?(n(),r("div",Be,y(a.value),1)):(n(),r("div",Ne,[l(o,{t:"Listen Port is invalid. Possible reasons:"}),e("ul",De,[e("li",null,[l(o,{t:"Invalid port."})]),e("li",null,[l(o,{t:"Port is assigned to existing WireGuard Configuration."})])])]))])]),e("div",null,[e("label",Ae,[e("small",null,[l(o,{t:"IP Address/CIDR"})]),e("small",{class:v(["ms-auto",[U.value>0?"text-success":"text-danger"]])},[l(o,{t:U.value+" Available IP Address"},null,8,["t"])],2)]),g(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),[[_,t.Address]]),e("div",Ie,[p.value?(n(),r("div",Le,y(a.value),1)):(n(),r("div",Se,[l(o,{t:"IP Address/CIDR is invalid"})]))])]),e("div",Ue,[e("div",Ke,[e("h2",Re,[e("button",Ve,[l(o,{t:"Optional Settings"})])]),e("div",Oe,[e("div",Ee,[e("div",null,[e("label",Te,[e("small",null,[l(o,{t:"PreUp"})])]),g(e("input",{type:"text",class:"form-control rounded-3",id:"PreUp",disabled:"","onUpdate:modelValue":s[5]||(s[5]=d=>t.PreUp=d)},null,512),[[_,t.PreUp]])]),e("div",null,[e("label",qe,[e("small",null,[l(o,{t:"PreDown"})])]),g(e("input",{type:"text",class:"form-control rounded-3",id:"PreDown",disabled:"","onUpdate:modelValue":s[6]||(s[6]=d=>t.PreDown=d)},null,512),[[_,t.PreDown]])]),e("div",null,[e("label",je,[e("small",null,[l(o,{t:"PostUp"})])]),g(e("input",{type:"text",class:"form-control rounded-3",id:"PostUp",disabled:"","onUpdate:modelValue":s[7]||(s[7]=d=>t.PostUp=d)},null,512),[[_,t.PostUp]])]),e("div",null,[e("label",Me,[e("small",null,[l(o,{t:"PostDown"})])]),g(e("input",{type:"text",class:"form-control rounded-3",id:"PostDown",disabled:"","onUpdate:modelValue":s[8]||(s[8]=d=>t.PostDown=d)},null,512),[[_,t.PostDown]])])])])])])]),e("div",Ye,[e("div",We,[e("h4",ze,[l(o,{t:"Database File"})]),e("h4",{class:v(["mb-0 ms-auto",[m.selectedConfigurationBackup.database?"text-success":"text-danger"]])},[e("i",{class:v(["bi",[m.selectedConfigurationBackup.database?"bi-check-circle-fill":"bi-x-circle-fill"]])},null,2)],2)]),m.selectedConfigurationBackup.database?(n(),r("div",Fe,[e("div",Ge,[e("div",He,[e("div",Ze,[e("div",Je,[s[10]||(s[10]=e("i",{class:"bi bi-person-fill me-2"},null,-1)),l(o,{t:"Contain"}),s[11]||(s[11]=$()),e("strong",null,y(K.value),1),s[12]||(s[12]=$()),K.value>1?(n(),f(o,{key:0,t:"Peer"})):(n(),f(o,{key:1,t:"Peer"}))])])]),e("div",Qe,[e("div",Xe,[e("div",et,[s[13]||(s[13]=e("i",{class:"bi bi-person-fill-lock me-2"},null,-1)),l(o,{t:"Contain"}),s[14]||(s[14]=$()),e("strong",null,y(R.value),1),s[15]||(s[15]=$()),R.value>1?(n(),f(o,{key:0,t:"Restricted Peers"})):(n(),f(o,{key:1,t:"Restricted Peers"}))])])])])])):w("",!0)]),e("div",tt,[e("button",{class:"btn btn-dark btn-brand rounded-3 px-3 py-2 shadow ms-auto",disabled:!S.value||x.value,onClick:s[9]||(s[9]=d=>Y())},[s[16]||(s[16]=e("i",{class:"bi bi-clock-history me-2"},null,-1)),l(o,{t:x.value?"Restoring...":"Restore"},null,8,["t"])],8,st)])]))}},lt={class:"mt-md-5 mt-3 text-body"},nt={class:"container mb-4"},at={class:"mb-5 d-flex align-items-center gap-4"},it={class:"mb-0"},rt={key:0},dt={class:"d-flex text-decoration-none text-body flex-grow-1 align-items-center gap-3"},ut={class:"mb-0"},ct={class:"text-muted"},mt={key:0,class:"ms-sm-auto"},ft={class:"text-muted"},pt={key:0,id:"step1Detail"},vt={class:"mb-4"},bt={class:"d-flex gap-3 flex-column"},gt={key:0},_t={class:"card rounded-3"},kt={class:"card-body"},yt={class:"mb-0"},ht={class:"my-5",key:"step2",id:"step2"},xt={class:"text-muted"},Ct={__name:"restoreConfiguration",setup(m){const u=k(void 0);T(),k(!1),A(()=>{J("/api/getAllWireguardConfigurationBackup",{},x=>{u.value=x.data})});const t=k(!1),h=k(void 0),p=k("");return(x,a)=>{const c=Q("RouterLink");return n(),r("div",lt,[e("div",nt,[e("div",at,[l(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,__:[1]}),e("h2",it,[l(o,{t:"Restore Configuration"})])]),l(V,{name:"fade",appear:""},{default:B(()=>[u.value?(n(),r("div",rt,[e("div",{class:v(["d-flex mb-5 align-items-center steps",{active:!t.value}]),role:"button",onClick:a[0]||(a[0]=b=>t.value=!1),key:"step1"},[e("div",dt,[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",ut,[l(o,{t:"Step 1"})]),e("small",ct,[t.value?(n(),f(o,{key:1,t:"Click to change a backup"})):(n(),f(o,{key:0,t:"Select a backup you want to restore"}))])])]),l(V,{name:"zoomReversed"},{default:B(()=>[t.value?(n(),r("div",mt,[e("small",ft,[l(o,{t:"Selected Backup"})]),e("h6",null,[e("samp",null,y(h.value.filename),1)])])):w("",!0)]),_:1})],2),t.value?w("",!0):(n(),r("div",pt,[e("div",vt,[e("div",bt,[(n(!0),r(N,null,D(Object.keys(u.value.NonExistingConfigurations),b=>(n(),f(ie,{onSelect:P=>{h.value=P,p.value=b,t.value=!0},selectedConfigurationBackup:h.value,open:p.value===b,protocol:[...new Set(u.value.NonExistingConfigurations[b].map(P=>P.protocol))],"configuration-name":b,backups:u.value.NonExistingConfigurations[b]},null,8,["onSelect","selectedConfigurationBackup","open","protocol","configuration-name","backups"]))),256)),Object.keys(u.value.NonExistingConfigurations).length===0?(n(),r("div",gt,[e("div",_t,[e("div",kt,[e("p",yt,[l(o,{t:"You don't have any configuration to restore"})])])])])):w("",!0)])])])),e("div",ht,[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",xt,[t.value?(n(),f(o,{key:1,t:"Confirm & edit restore information"})):(n(),f(o,{key:0,t:"Backup not selected"}))])])],2)]),t.value?(n(),f(ot,{selectedConfigurationBackup:h.value,key:"confirm"},null,8,["selectedConfigurationBackup"])):w("",!0)])):w("",!0)]),_:1})])])}}},Dt=E(Ct,[["__scopeId","data-v-324df2b1"]]);export{Dt as default}; diff --git a/src/static/app/dist/assets/schedulePeerJob-Bp6xBo32.js b/src/static/app/dist/assets/schedulePeerJob-CKnHZfdd.js similarity index 96% rename from src/static/app/dist/assets/schedulePeerJob-Bp6xBo32.js rename to src/static/app/dist/assets/schedulePeerJob-CKnHZfdd.js index 0a517e4..b611075 100644 --- a/src/static/app/dist/assets/schedulePeerJob-Bp6xBo32.js +++ b/src/static/app/dist/assets/schedulePeerJob-CKnHZfdd.js @@ -1 +1 @@ -import{_,c as r,f as d,a as s,t as m,n as y,d as f,F as j,i as S,z as v,r as h,D as k,h as b,b as n,k as x,m as D,y as $,e as p}from"./index-BaGiSoQe.js";import{Q as J}from"./vue-datepicker-CI9txOl2.js";import{d as C}from"./dayjs.min-H8Pjp0HL.js";import{L as V}from"./localeText-DkjxgEQB.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:V,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=C(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)"}},z={class:"d-flex gap-2 align-items-center mb-2"},q=["disabled"],Q={class:"px-5 d-flex gap-2 align-items-center"},G={class:"d-flex gap-3"},K={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",z,[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,q)),[[$,this.job.Value]]),s("samp",null,m(this.dropdowns.Field.find(i=>i.value===this.job.Field)?.unit)+" { ",1)]),s("div",Q,[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",G,[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",K,[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-4aa63a3e"]]);export{se as S,T as a}; +import{_,c as r,f as d,a as s,t as m,n as y,d as f,F as j,i as S,z as v,r as h,D as k,h as b,b as n,k as x,m as D,y as $,e as p}from"./index-Upsq31TS.js";import{Q as J}from"./vue-datepicker-COnDbf6W.js";import{d as C}from"./dayjs.min-Cdu5c05l.js";import{L as V}from"./localeText-n7rlaTGQ.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:V,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=C(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)"}},z={class:"d-flex gap-2 align-items-center mb-2"},q=["disabled"],Q={class:"px-5 d-flex gap-2 align-items-center"},G={class:"d-flex gap-3"},K={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",z,[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,q)),[[$,this.job.Value]]),s("samp",null,m(this.dropdowns.Field.find(i=>i.value===this.job.Field)?.unit)+" { ",1)]),s("div",Q,[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",G,[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",K,[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-4aa63a3e"]]);export{se as S,T as a}; diff --git a/src/static/app/dist/assets/selectPeers-CV6q0Qd4.js b/src/static/app/dist/assets/selectPeers-C9VF1n58.js similarity index 87% rename from src/static/app/dist/assets/selectPeers-CV6q0Qd4.js rename to src/static/app/dist/assets/selectPeers-C9VF1n58.js index 3fe5fab..2381cf1 100644 --- a/src/static/app/dist/assets/selectPeers-CV6q0Qd4.js +++ b/src/static/app/dist/assets/selectPeers-C9VF1n58.js @@ -1 +1 @@ -import{_ as M,r as g,q as R,H as j,M as A,D as F,E as z,a3 as C,c as o,f as n,a as t,b as r,m as O,d as b,y as q,F as p,i as G,n as w,t as S,e as h,g as H,z as Y}from"./index-BaGiSoQe.js";import{L as d}from"./localeText-DkjxgEQB.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:$}){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=R(()=>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);j(s,()=>{s.value.length===0&&(f.value=!1,u.value=!1)});const P=A(),N=F(),_=$,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=z({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)=>(n(),o("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?(n(),o("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?(n(),o("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)),O(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),[[q,m.value]])])]),t("div",le,[(n(!0),o(p,null,G(B.value,l=>(n(),o("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):(n(),o("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,S(l.name?l.name:"Untitled Peer"),1),t("small",re,[t("samp",null,S(l.id),1)])]),u.value?(n(),o("span",de,[!c.success.find(i=>i===l.id)&&!c.failed.find(i=>i===l.id)?(n(),o("span",ue)):(n(),o("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?(n(),o(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?(n(),o("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?(n(),o(p,{key:1},[c.failed.length+c.success.length1?"s":"")},null,8,["t"]),e[16]||(e[16]=h("... "))])):(n(),o(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?(n(),o(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?(n(),o("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=M(xe,[["__scopeId","data-v-177407c1"]]);export{we as default}; +import{_ as R,r as g,q as j,H as A,L as F,D as M,E as z,a2 as C,c as o,f as n,a as t,b as r,m as O,d as b,y as q,F as p,i as G,n as w,t as S,e as h,g as H,z as Y}from"./index-Upsq31TS.js";import{L as d}from"./localeText-n7rlaTGQ.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:$}){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(),L=M(),_=$,v=g(!1),N=()=>{v.value=!0,Y(`/api/deletePeers/${P.params.id}`,{peers:s.value},a=>{L.newMessage("Server",a.message,a.status?"success":"danger"),a.status&&(s.value=[],f.value=!1),_("refresh"),v.value=!1})},c=z({success:[],failed:[]}),T=C("card-body"),U=C("sp"),V=async()=>{u.value=!0;for(const a of s.value)T.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)=>(n(),o("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?(n(),o("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?(n(),o("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)),O(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),[[q,m.value]])])]),t("div",le,[(n(!0),o(p,null,G(B.value,l=>(n(),o("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):(n(),o("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,S(l.name?l.name:"Untitled Peer"),1),t("small",re,[t("samp",null,S(l.id),1)])]),u.value?(n(),o("span",de,[!c.success.find(i=>i===l.id)&&!c.failed.find(i=>i===l.id)?(n(),o("span",ue)):(n(),o("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?(n(),o(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?(n(),o("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?(n(),o(p,{key:1},[c.failed.length+c.success.length1?"s":"")},null,8,["t"]),e[16]||(e[16]=h("... "))])):(n(),o(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?(n(),o(p,{key:2},[t("button",{class:"btn btn-danger rounded-3",disabled:s.value.length===0||v.value,onClick:e[7]||(e[7]=l=>N())},[r(d,{t:"Yes"})],8,ge),s.value.length>0?(n(),o("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-cK5pfcdh.js b/src/static/app/dist/assets/settings-CkXtGiHe.js similarity index 99% rename from src/static/app/dist/assets/settings-cK5pfcdh.js rename to src/static/app/dist/assets/settings-CkXtGiHe.js index 70c04a8..c08ee4b 100644 --- a/src/static/app/dist/assets/settings-cK5pfcdh.js +++ b/src/static/app/dist/assets/settings-CkXtGiHe.js @@ -1 +1 @@ -import{_ as k,z as v,D as y,A as I,c as l,a as t,m as b,d as _,b as i,h as m,y as f,n as $,t as D,f as n,W as M,e as S,v as L,k as x,F as C,g as E,w as F,T as j,j as U,i as K,r as T,q as z,o as O,u as w,B as q}from"./index-BaGiSoQe.js";import{L as p}from"./localeText-DkjxgEQB.js";import{d as A}from"./dayjs.min-H8Pjp0HL.js";import{Q}from"./vue-datepicker-CI9txOl2.js";const J={components:{LocaleText:p},props:{targetData:String,title:String,warning:!1,warningText:""},setup(){const s=y(),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 v("/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})}}},X={class:"form-group mb-2"},Z=["for"],tt=["id","disabled"],et={class:"invalid-feedback"},st={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 at(s,e,c,h,u,g){const o=m("LocaleText");return n(),l("div",X,[t("label",{for:this.uuid,class:"text-muted mb-1"},[t("strong",null,[t("small",null,[i(o,{t:this.title},null,8,["t"])])])],8,Z),b(t("input",{type:"text",class:$(["form-control",{"is-invalid":u.showInvalidFeedback,"is-valid":u.isValid}]),id:this.uuid,"onUpdate:modelValue":e[0]||(e[0]=a=>this.value=a),onKeydown:e[1]||(e[1]=a=>this.changed=!0),onBlur:e[2]||(e[2]=a=>g.useValidation()),disabled:this.updating},null,42,tt),[[f,this.value]]),t("div",et,D(this.invalidFeedback),1),c.warning?(n(),l("div",st,[t("small",null,[e[3]||(e[3]=t("i",{class:"bi bi-exclamation-triangle-fill me-2"},null,-1)),i(o,{t:c.warningText},null,8,["t"])])])):_("",!0)])}const it=k(J,[["render",at]]),ot=s=>{},nt={name:"accountSettingsInputUsername",components:{LocaleText:p},props:{targetData:String,title:String},setup(){const s=y(),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 v("/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}))}}},lt={class:"form-group mb-2"},dt=["for"],rt=["id","disabled"],ut={class:"invalid-feedback"};function ct(s,e,c,h,u,g){const o=m("LocaleText");return n(),l("div",lt,[t("label",{for:this.uuid,class:"text-muted mb-1"},[t("strong",null,[t("small",null,[i(o,{t:this.title},null,8,["t"])])])],8,dt),b(t("input",{type:"text",class:$(["form-control",{"is-invalid":u.showInvalidFeedback,"is-valid":u.isValid}]),id:this.uuid,"onUpdate:modelValue":e[0]||(e[0]=a=>this.value=a),onKeydown:e[1]||(e[1]=a=>this.changed=!0),onBlur:e[2]||(e[2]=a=>g.useValidation()),disabled:this.updating},null,42,rt),[[f,this.value]]),t("div",ut,D(this.invalidFeedback),1)])}const ht=k(nt,[["render",ct]]),mt={name:"accountSettingsInputPassword",components:{LocaleText:p},props:{targetData:String,warning:!1,warningText:""},setup(){const s=y(),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 v("/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}}},pt={class:"d-flex flex-column gap-2"},gt={class:"row g-2"},bt={class:"col-sm"},_t={class:"form-group"},ft=["for"],vt=["id"],yt={key:0,class:"invalid-feedback d-block"},wt={class:"col-sm"},$t={class:"form-group"},kt=["for"],xt=["id"],Dt={class:"col-sm"},St={class:"form-group"},It=["for"],Ct=["id"],Pt=["disabled"];function At(s,e,c,h,u,g){const o=m("LocaleText");return n(),l("form",pt,[t("div",gt,[t("div",bt,[t("div",_t,[t("label",{for:"currentPassword_"+this.uuid,class:"text-muted mb-1"},[t("strong",null,[t("small",null,[i(o,{t:"Current Password"})])])],8,ft),b(t("input",{type:"password",class:$(["form-control",{"is-invalid":u.showInvalidFeedback,"is-valid":u.isValid}]),autocomplete:"current-password","onUpdate:modelValue":e[0]||(e[0]=a=>this.value.currentPassword=a),id:"currentPassword_"+this.uuid},null,10,vt),[[f,this.value.currentPassword]]),u.showInvalidFeedback?(n(),l("div",yt,D(this.invalidFeedback),1)):_("",!0)])]),t("div",wt,[t("div",$t,[t("label",{for:"newPassword_"+this.uuid,class:"text-muted mb-1"},[t("strong",null,[t("small",null,[i(o,{t:"New Password"})])])],8,kt),b(t("input",{type:"password",class:$(["form-control",{"is-invalid":u.showInvalidFeedback,"is-valid":u.isValid}]),autocomplete:"new-password","onUpdate:modelValue":e[1]||(e[1]=a=>this.value.newPassword=a),id:"newPassword_"+this.uuid},null,10,xt),[[f,this.value.newPassword]])])]),t("div",Dt,[t("div",St,[t("label",{for:"repeatNewPassword_"+this.uuid,class:"text-muted mb-1"},[t("strong",null,[t("small",null,[i(o,{t:"Repeat New Password"})])])],8,It),b(t("input",{type:"password",class:$(["form-control",{"is-invalid":u.showInvalidFeedback,"is-valid":u.isValid}]),autocomplete:"new-password","onUpdate:modelValue":e[2]||(e[2]=a=>this.value.repeatNewPassword=a),id:"repeatNewPassword_"+this.uuid},null,10,Ct),[[f,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]=a=>this.useValidation())},[e[4]||(e[4]=t("i",{class:"bi bi-save2-fill me-2"},null,-1)),i(o,{t:"Update Password"})],8,Pt)])}const Tt=k(mt,[["render",At]]),Kt={name:"dashboardSettingsInputWireguardConfigurationPath",components:{LocaleText:p},props:{targetData:String,title:String,warning:!1,warningText:""},setup(){const s=y(),e=M(),c=`input_${I()}`;return{store:s,uuid:c,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 v("/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}))}}},Vt={class:"card"},Ft={class:"card-header"},Lt={class:"my-2"},Et={class:"card-body"},Mt={class:"form-group"},Ut=["for"],Nt={class:"d-flex gap-2 align-items-start"},Wt={class:"flex-grow-1"},Gt=["id","disabled"],Rt={class:"invalid-feedback fw-bold"},Yt=["disabled"],Ht={key:0,class:"bi bi-save2-fill"},Bt={key:1,class:"spinner-border spinner-border-sm"},jt={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 zt(s,e,c,h,u,g){const o=m("LocaleText");return n(),l("div",Vt,[t("div",Ft,[t("h6",Lt,[i(o,{t:"Path"})])]),t("div",Et,[t("div",Mt,[t("label",{for:this.uuid,class:"text-muted mb-1"},[t("strong",null,[t("small",null,[i(o,{t:this.title},null,8,["t"])])])],8,Ut),t("div",Nt,[t("div",Wt,[b(t("input",{type:"text",class:$(["form-control rounded-3",{"is-invalid":this.showInvalidFeedback,"is-valid":this.isValid}]),id:this.uuid,"onUpdate:modelValue":e[0]||(e[0]=a=>this.value=a),onKeydown:e[1]||(e[1]=a=>this.changed=!0),disabled:this.updating},null,42,Gt),[[f,this.value]]),t("div",Rt,D(this.invalidFeedback),1)]),t("button",{onClick:e[2]||(e[2]=a=>this.useValidation()),disabled:!this.changed,class:"ms-auto btn rounded-3 border-success-subtle bg-success-subtle text-success-emphasis"},[this.updating?(n(),l("span",Bt)):(n(),l("i",Ht))],8,Yt)]),c.warning?(n(),l("div",jt,[t("small",null,[e[3]||(e[3]=t("i",{class:"bi bi-exclamation-triangle-fill me-2"},null,-1)),i(o,{t:c.warningText},null,8,["t"])])])):_("",!0)])])])}const Ot=k(Kt,[["render",zt]]),qt={name:"dashboardTheme",components:{LocaleText:p},setup(){return{dashboardConfigurationStore:y()}},methods:{async switchTheme(s){await v("/api/updateDashboardConfigurationItem",{section:"Server",key:"dashboard_theme",value:s},e=>{e.status&&(this.dashboardConfigurationStore.Configuration.Server.dashboard_theme=s)})}}},Qt={class:"text-muted mb-1 d-block"},Jt={class:"d-flex gap-1"};function Xt(s,e,c,h,u,g){const o=m("LocaleText");return n(),l("div",null,[t("small",Qt,[t("strong",null,[i(o,{t:"Theme"})])]),t("div",Jt,[t("button",{class:$(["btn bg-primary-subtle text-primary-emphasis flex-grow-1",{active:this.dashboardConfigurationStore.Configuration.Server.dashboard_theme==="light"}]),onClick:e[0]||(e[0]=a=>this.switchTheme("light"))},[e[2]||(e[2]=t("i",{class:"bi bi-sun-fill me-2"},null,-1)),i(o,{t:"Light"})],2),t("button",{class:$(["btn bg-primary-subtle text-primary-emphasis flex-grow-1",{active:this.dashboardConfigurationStore.Configuration.Server.dashboard_theme==="dark"}]),onClick:e[1]||(e[1]=a=>this.switchTheme("dark"))},[e[3]||(e[3]=t("i",{class:"bi bi-moon-fill me-2"},null,-1)),i(o,{t:"Dark"})],2)])])}const Zt=k(qt,[["render",Xt]]),te={name:"dashboardSettingsInputIPAddressAndPort",props:{},setup(){const s=y(),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 v("/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)})}}},ee={class:"invalid-feedback d-block mt-0"},se={class:"row"},ae={class:"form-group mb-2 col-sm"},ie=["for"],oe=["id"],ne={class:"form-group col-sm"},le=["for"],de=["id"];function re(s,e,c,h,u,g){return n(),l("div",null,[t("div",ee,D(this.invalidFeedback),1),t("div",se,[t("div",ae,[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,ie),b(t("input",{type:"text",class:"form-control mb-2",id:"app_ip_"+this.uuid,"onUpdate:modelValue":e[0]||(e[0]=o=>this.app_ip=o)},null,8,oe),[[f,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"),S(" means it can be access by anyone with your server IP Address.")])],-1))]),t("div",ne,[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,le),b(t("input",{type:"text",class:"form-control mb-2",id:"app_port_"+this.uuid,"onUpdate:modelValue":e[1]||(e[1]=o=>this.app_port=o)},null,8,de),[[f,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"}),S("Update Dashboard Settings & Restart ")],-1))])}const ue=k(te,[["render",re]]),ce={name:"newDashboardAPIKey",components:{LocaleText:p,VueDatePicker:Q},data(){return{newKeyData:{ExpiredAt:A().add(7,"d").format("YYYY-MM-DD HH:mm:ss"),NeverExpire:!1},submitting:!1}},setup(){return{store:y()}},mounted(){console.log(this.newKeyData.ExpiredAt)},methods:{submitNewAPIKey(){this.submitting=!0,v("/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(A(s).format("YYYY-MM-DDTHH:mm:ss")),A(s).format("YYYY-MM-DDTHH:mm:ss")},parseTime(s){s?this.newKeyData.ExpiredAt=A(s).format("YYYY-MM-DD HH:mm:ss"):this.newKeyData.ExpiredAt=void 0}}},he={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)"}},me={class:"card m-auto rounded-3 mt-5"},pe={class:"card-header bg-transparent d-flex align-items-center gap-2 border-0 p-4 pb-0"},ge={class:"mb-0"},be={class:"card-body d-flex gap-2 p-4 flex-column"},_e={class:"text-muted"},fe={class:"d-flex align-items-center gap-2"},ve={class:"form-check"},ye=["disabled"],we={class:"form-check-label",for:"neverExpire"},$e={key:0,class:"bi bi-check-lg me-2"};function ke(s,e,c,h,u,g){const o=m("LocaleText"),a=m("VueDatePicker");return n(),l("div",he,[t("div",me,[t("div",pe,[t("h6",ge,[i(o,{t:"Create API Key"})]),t("button",{type:"button",class:"btn-close ms-auto",onClick:e[0]||(e[0]=r=>this.$emit("close"))})]),t("div",be,[t("small",_e,[i(o,{t:"When should this API Key expire?"})]),t("div",fe,[i(a,{is24:!0,"min-date":new Date,"model-value":this.newKeyData.ExpiredAt,"onUpdate:modelValue":this.parseTime,"time-picker-inline":"",format:"yyyy-MM-dd HH:mm:ss","preview-format":"yyyy-MM-dd HH:mm:ss",clearable:!1,disabled:this.newKeyData.NeverExpire||this.submitting,dark:this.store.Configuration.Server.dashboard_theme==="dark"},null,8,["min-date","model-value","onUpdate:modelValue","disabled","dark"])]),t("div",ve,[b(t("input",{class:"form-check-input",type:"checkbox","onUpdate:modelValue":e[1]||(e[1]=r=>this.newKeyData.NeverExpire=r),id:"neverExpire",disabled:this.submitting},null,8,ye),[[L,this.newKeyData.NeverExpire]]),t("label",we,[i(o,{t:"Never Expire"}),e[3]||(e[3]=S(" (")),e[4]||(e[4]=t("i",{class:"bi bi-emoji-grimace-fill me-2"},null,-1)),i(o,{t:"Don't think that's a good idea"}),e[5]||(e[5]=S(") "))])]),t("button",{class:$(["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]=r=>this.submitNewAPIKey())},[this.submitting?_("",!0):(n(),l("i",$e)),this.submitting?(n(),x(o,{key:1,t:"Creating..."})):(n(),x(o,{key:2,t:"Create"}))],2)])])])}const xe=k(ce,[["render",ke]]),De={name:"dashboardAPIKey",components:{LocaleText:p},props:{apiKey:Object},setup(){return{store:y()}},data(){return{confirmDelete:!1}},methods:{deleteAPIKey(){v("/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")})}}},Se={class:"card rounded-3 shadow-sm"},Ie={key:0,class:"card-body d-flex gap-3 align-items-center apiKey-card-body"},Ce={class:"d-flex align-items-center gap-2"},Pe={class:"text-muted"},Ae={style:{"word-break":"break-all"}},Te={class:"d-flex align-items-center gap-2 ms-auto"},Ke={class:"text-muted"},Ve={key:0,class:"card-body d-flex gap-3 align-items-center justify-content-end"};function Fe(s,e,c,h,u,g){const o=m("LocaleText");return n(),l("div",Se,[this.confirmDelete?(n(),l(C,{key:1},[this.store.getActiveCrossServer()?_("",!0):(n(),l("div",Ve,[i(o,{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]=a=>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]=a=>this.confirmDelete=!1)},e[5]||(e[5]=[t("i",{class:"bi bi-x-lg"},null,-1)]))]))],64)):(n(),l("div",Ie,[t("div",Ce,[t("small",Pe,[i(o,{t:"Key"})]),t("span",Ae,D(this.apiKey.Key),1)]),t("div",Te,[t("small",Ke,[i(o,{t:"Expire At"})]),this.apiKey.ExpiredAt?_("",!0):(n(),x(o,{key:0,t:"Never Expire"})),t("span",null,D(this.apiKey.ExpiredAt),1)]),this.store.getActiveCrossServer()?_("",!0):(n(),l("a",{key:0,role:"button",class:"btn btn-sm bg-danger-subtle text-danger-emphasis rounded-3",onClick:e[0]||(e[0]=a=>this.confirmDelete=!0)},e[3]||(e[3]=[t("i",{class:"bi bi-trash-fill"},null,-1)])))]))])}const Le=k(De,[["render",Fe],["__scopeId","data-v-a76253c8"]]),Ee={name:"dashboardAPIKeys",components:{LocaleText:p,DashboardAPIKey:Le,NewDashboardAPIKey:xe},setup(){return{store:y()}},data(){return{value:this.store.Configuration.Server.dashboard_api_key,apiKeys:[],newDashboardAPIKey:!1}},methods:{async toggleDashboardAPIKeys(){await v("/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?E("/api/getDashboardAPIKeys",{},e=>{e.status?this.apiKeys=e.data:(this.apiKeys=[],this.store.newMessage("Server",e.message,"danger"))}):this.apiKeys=[]}}}},Me={class:"card rounded-3"},Ue={class:"my-2"},Ne={key:0,class:"form-check form-switch ms-auto"},We={class:"form-check-label",for:"allowAPIKeysSwitch"},Ge={key:0,class:"card-body position-relative d-flex flex-column gap-2"},Re={key:1,class:"card",style:{height:"300px"}},Ye={class:"card-body d-flex text-muted"},He={class:"m-auto"},Be={key:2,class:"d-flex flex-column gap-2 position-relative",style:{"min-height":"300px"}};function je(s,e,c,h,u,g){const o=m("LocaleText"),a=m("DashboardAPIKey"),r=m("NewDashboardAPIKey");return n(),l("div",Me,[t("div",{class:$(["card-header d-flex align-items-center",{"border-bottom-0 rounded-3":!this.value}])},[t("h6",Ue,[i(o,{t:"API Keys"})]),this.store.getActiveCrossServer()?_("",!0):(n(),l("div",Ne,[b(t("input",{class:"form-check-input",type:"checkbox","onUpdate:modelValue":e[0]||(e[0]=d=>this.value=d),onChange:e[1]||(e[1]=d=>this.toggleDashboardAPIKeys()),role:"switch",id:"allowAPIKeysSwitch"},null,544),[[L,this.value]]),t("label",We,[this.value?(n(),x(o,{key:0,t:"Enabled"})):(n(),x(o,{key:1,t:"Disabled"}))])]))],2),this.value?(n(),l("div",Ge,[this.store.getActiveCrossServer()?_("",!0):(n(),l("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]=d=>this.newDashboardAPIKey=!0)},[e[6]||(e[6]=t("i",{class:"bi bi-plus-circle-fill me-2"},null,-1)),i(o,{t:"API Key"})])),this.apiKeys.length===0?(n(),l("div",Re,[t("div",Ye,[t("span",He,[i(o,{t:"No WGDashboard API Key"})])])])):(n(),l("div",Be,[i(j,{name:"apiKey"},{default:F(()=>[(n(!0),l(C,null,K(this.apiKeys,d=>(n(),x(a,{apiKey:d,key:d.Key,onDeleted:e[3]||(e[3]=P=>this.apiKeys=P)},null,8,["apiKey"]))),128))]),_:1})])),i(U,{name:"zoomReversed"},{default:F(()=>[this.newDashboardAPIKey?(n(),x(r,{key:0,onCreated:e[4]||(e[4]=d=>this.apiKeys=d),onClose:e[5]||(e[5]=d=>this.newDashboardAPIKey=!1)})):_("",!0)]),_:1})])):_("",!0)])}const ze=k(Ee,[["render",je],["__scopeId","data-v-100ee9f9"]]),Oe={name:"accountSettingsMFA",components:{LocaleText:p},setup(){const s=y(),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 v("/api/updateDashboardConfigurationItem",{section:"Account",key:"totp_verified",value:"false"},async s=>{await v("/api/updateDashboardConfigurationItem",{section:"Account",key:"enable_totp",value:"false"},e=>{e.status&&this.$router.push("/2FASetup")})})}}},qe={class:"d-flex align-items-center"},Qe={class:"form-check form-switch"},Je={for:"allowMFAKeysSwitch"};function Xe(s,e,c,h,u,g){const o=m("LocaleText");return n(),l("div",null,[t("div",qe,[t("div",Qe,[b(t("input",{class:"form-check-input",type:"checkbox","onUpdate:modelValue":e[0]||(e[0]=a=>this.status=a),role:"switch",id:"allowMFAKeysSwitch"},null,512),[[L,this.status]]),t("label",Je,[this.status?(n(),x(o,{key:0,t:"Enabled"})):(n(),x(o,{key:1,t:"Disabled"}))])]),this.status?(n(),l("button",{key:0,class:"btn bg-warning-subtle text-warning-emphasis border-1 border-warning-subtle ms-auto rounded-3 shadow-sm",onClick:e[1]||(e[1]=a=>this.resetMFA())},[e[2]||(e[2]=t("i",{class:"bi bi-shield-lock-fill me-2"},null,-1)),this.store.Configuration.Account.totp_verified?(n(),x(o,{key:0,t:"Reset"})):(n(),x(o,{key:1,t:"Setup"})),e[3]||(e[3]=S(" MFA "))])):_("",!0)])])}const Ze=k(Oe,[["render",Xe]]),ts={name:"dashboardLanguage",components:{LocaleText:p},setup(){return{store:y()}},data(){return{languages:void 0}},mounted(){E("/api/locale/available",{},s=>{this.languages=s.data})},methods:{changeLanguage(s){v("/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)}}},es={class:"text-muted d-block mb-1"},ss={class:"d-flex gap-2"},as={class:"dropdown w-100"},is=["disabled"],os={key:1},ns={class:"dropdown-menu rounded-3 shadow",style:{"max-height":"500px","overflow-y":"scroll"}},ls=["onClick"],ds={class:"me-auto mb-0"},rs={class:"d-block",style:{"font-size":"0.8rem"}},us={key:0,class:"bi bi-check text-primary fs-5"};function cs(s,e,c,h,u,g){const o=m("LocaleText");return n(),l("div",null,[t("small",es,[t("strong",null,[i(o,{t:"Language"})])]),t("div",ss,[t("div",as,[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?(n(),l("span",os,D(g.currentLanguage?.lang_name_localized),1)):(n(),x(o,{key:0,t:"Loading..."}))],8,is),t("ul",ns,[(n(!0),l(C,null,K(this.languages,a=>(n(),l("li",null,[t("a",{class:"dropdown-item d-flex align-items-center",role:"button",onClick:r=>this.changeLanguage(a.lang_id)},[t("p",ds,[S(D(a.lang_name_localized)+" ",1),t("small",rs,D(a.lang_name),1)]),g.currentLanguage?.lang_id===a.lang_id?(n(),l("i",us)):_("",!0)],8,ls)]))),256))])])])])}const hs=k(ts,[["render",cs],["__scopeId","data-v-4e34593e"]]),ms={name:"dashboardIPPortInput",components:{LocaleText:p},setup(){return{store:y()}},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,c){this.changed&&(this.updating=!0,await v("/api/updateDashboardConfigurationItem",{section:"Server",key:e,value:c},h=>{h.status?(s.target.classList.add("is-valid"),this.showInvalidFeedback=!1,this.store.Configuration.Server[e]=c,clearTimeout(this.timeout),this.timeout=setTimeout(()=>{s.target.classList.remove("is-valid")},5e3)):(this.isValid=!1,this.showInvalidFeedback=!0,this.invalidFeedback=h.message),this.changed=!1,this.updating=!1}))}}},ps={class:"row g-2"},gs={class:"col-sm"},bs={class:"form-group"},_s={for:"input_dashboard_ip",class:"text-muted mb-1"},fs=["disabled"],vs={class:"invalid-feedback"},ys={class:"col-sm"},ws={class:"form-group"},$s={for:"input_dashboard_ip",class:"text-muted mb-1"},ks=["disabled"],xs={class:"invalid-feedback"},Ds={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 Ss(s,e,c,h,u,g){const o=m("LocaleText");return n(),l("div",null,[t("div",ps,[t("div",gs,[t("div",bs,[t("label",_s,[t("strong",null,[t("small",null,[i(o,{t:"IP Address / Hostname"})])])]),b(t("input",{type:"text",class:$(["form-control",{"is-invalid":u.showInvalidFeedback,"is-valid":u.isValid}]),id:"input_dashboard_ip","onUpdate:modelValue":e[0]||(e[0]=a=>this.ipAddress=a),onKeydown:e[1]||(e[1]=a=>this.changed=!0),onBlur:e[2]||(e[2]=a=>g.useValidation(a,"app_ip",this.ipAddress)),disabled:this.updating},null,42,fs),[[f,this.ipAddress]]),t("div",vs,D(this.invalidFeedback),1)])]),t("div",ys,[t("div",ws,[t("label",$s,[t("strong",null,[t("small",null,[i(o,{t:"Listen Port"})])])]),b(t("input",{type:"number",class:$(["form-control",{"is-invalid":u.showInvalidFeedback,"is-valid":u.isValid}]),id:"input_dashboard_ip","onUpdate:modelValue":e[3]||(e[3]=a=>this.port=a),onKeydown:e[4]||(e[4]=a=>this.changed=!0),onBlur:e[5]||(e[5]=a=>g.useValidation(a,"app_port",this.port)),disabled:this.updating},null,42,ks),[[f,this.port]]),t("div",xs,D(this.invalidFeedback),1)])])]),t("div",Ds,[t("small",null,[e[6]||(e[6]=t("i",{class:"bi bi-exclamation-triangle-fill me-2"},null,-1)),i(o,{t:"Manual restart of WGDashboard is needed to apply changes on IP Address and Listen Port"})])])])}const Is=k(ms,[["render",Ss]]),Cs={class:"card rounded-3"},Ps={class:"card-header"},As={class:"my-2"},Ts={class:"card-body d-flex gap-2"},Ks={class:"list-group w-100"},Vs=["onClick"],Fs={__name:"dashboardSettingsWireguardConfigurationAutostart",setup(s){const e=y(),c=M(),h=T(e.Configuration.WireGuardConfiguration.autostart),u=z(()=>c.Configurations.map(a=>a.Name)),g=async()=>{await v("/api/updateDashboardConfigurationItem",{section:"WireGuardConfiguration",key:"autostart",value:h.value},async a=>{a.status?(e.newMessage("Server","Start up configurations saved","success"),h.value=a.data):e.newMessage("Server","Start up configurations failed to save","danger")})},o=a=>{h.value.includes(a)?h.value=h.value.filter(r=>r!==a):h.value.push(a),g()};return(a,r)=>(n(),l("div",Cs,[t("div",Ps,[t("h6",As,[i(p,{t:"Toggle When Start Up"})])]),t("div",Ts,[t("div",Ks,[(n(!0),l(C,null,K(u.value,d=>(n(),l("button",{type:"button",key:d,onClick:P=>o(d),class:"list-group-item list-group-item-action py-2 w-100 d-flex align-items-center"},[t("samp",null,D(d),1),t("i",{class:$(["ms-auto",[h.value.includes(d)?"bi-check-circle-fill":"bi-circle"]])},null,2)],8,Vs))),128))])])]))}},Ls=k(Fs,[["__scopeId","data-v-4aa2aed9"]]),Es={class:"card"},Ms={class:"card-header"},Us={class:"my-2 d-flex"},Ns={key:0,class:"text-success ms-auto"},Ws={class:"card-body d-flex flex-column gap-3"},Gs={class:"row gx-2 gy-2"},Rs={class:"col-12 col-lg-4"},Ys={class:"form-group"},Hs={for:"server",class:"text-muted mb-1"},Bs={class:"col-12 col-lg-4"},js={class:"form-group"},zs={for:"port",class:"text-muted mb-1"},Os={class:"col-12 col-lg-4"},qs={class:"form-group"},Qs={for:"encryption",class:"text-muted mb-1"},Js={value:"NOTLS"},Xs={class:"col-12 col-lg-4"},Zs={class:"form-group"},ta={for:"username",class:"text-muted mb-1"},ea={class:"col-12 col-lg-4"},sa={class:"form-group"},aa={for:"email_password",class:"text-muted mb-1"},ia={class:"col-12 col-lg-4"},oa={class:"form-group"},na={for:"send_from",class:"text-muted mb-1"},la={key:0},da={key:1},ra={class:"text-muted mb-1",for:"test_email"},ua={class:"fw-bold"},ca=["disabled"],ha=["disabled"],ma={key:0,class:"bi bi-send me-2"},pa={key:1,class:"spinner-border spinner-border-sm me-2"},ga={class:"text-muted mb-1",for:"email_template"},ba={class:"fw-bold"},_a={__name:"dashboardEmailSettings",setup(s){const e=y();O(()=>{g(),document.querySelectorAll("#emailAccount input, #emailAccount select, #email_template").forEach(a=>{a.addEventListener("change",async()=>{let r=a.attributes.getNamedItem("id").value;await v("/api/updateDashboardConfigurationItem",{section:"Email",key:r,value:a.value},d=>{d.status?(a.classList.remove("is-invalid"),a.classList.add("is-valid")):(a.classList.remove("is-valid"),a.classList.add("is-invalid")),g()})})})});const c=T(!1),h=T(""),u=T(!1),g=async()=>{await E("/api/email/ready",{},a=>{c.value=a.status})},o=async()=>{u.value=!0,await v("/api/email/send",{Receiver:h.value,Subject:"WGDashboard Testing Email",Body:"Test 1, 2, 3! Hello World :)"},a=>{a.status?e.newMessage("Server","Test email sent successfully!","success"):e.newMessage("Server",`Test email sent failed! Reason: ${a.message}`,"danger"),u.value=!1})};return(a,r)=>(n(),l("div",Es,[t("div",Ms,[t("h6",Us,[i(p,{t:"Email Account"}),c.value?(n(),l("span",Ns,[r[10]||(r[10]=t("i",{class:"bi bi-check-circle-fill me-2"},null,-1)),i(p,{t:"Ready"})])):_("",!0)])]),t("div",Ws,[t("form",{onSubmit:r[6]||(r[6]=d=>d.preventDefault(d)),id:"emailAccount"},[t("div",Gs,[t("div",Rs,[t("div",Ys,[t("label",Hs,[t("strong",null,[t("small",null,[i(p,{t:"Server"})])])]),b(t("input",{id:"server","onUpdate:modelValue":r[0]||(r[0]=d=>w(e).Configuration.Email.server=d),type:"text",class:"form-control"},null,512),[[f,w(e).Configuration.Email.server]])])]),t("div",Bs,[t("div",js,[t("label",zs,[t("strong",null,[t("small",null,[i(p,{t:"Port"})])])]),b(t("input",{id:"port","onUpdate:modelValue":r[1]||(r[1]=d=>w(e).Configuration.Email.port=d),type:"text",class:"form-control"},null,512),[[f,w(e).Configuration.Email.port]])])]),t("div",Os,[t("div",qs,[t("label",Qs,[t("strong",null,[t("small",null,[i(p,{t:"Encryption"})])])]),b(t("select",{class:"form-select","onUpdate:modelValue":r[2]||(r[2]=d=>w(e).Configuration.Email.encryption=d),id:"encryption"},[r[11]||(r[11]=t("option",{value:"STARTTLS"}," STARTTLS ",-1)),t("option",Js,[i(p,{t:"No Encryption"})])],512),[[q,w(e).Configuration.Email.encryption]])])]),t("div",Xs,[t("div",Zs,[t("label",ta,[t("strong",null,[t("small",null,[i(p,{t:"Username"})])])]),b(t("input",{id:"username","onUpdate:modelValue":r[3]||(r[3]=d=>w(e).Configuration.Email.username=d),type:"text",class:"form-control"},null,512),[[f,w(e).Configuration.Email.username]])])]),t("div",ea,[t("div",sa,[t("label",aa,[t("strong",null,[t("small",null,[i(p,{t:"Password"})])])]),b(t("input",{id:"email_password","onUpdate:modelValue":r[4]||(r[4]=d=>w(e).Configuration.Email.email_password=d),type:"password",class:"form-control"},null,512),[[f,w(e).Configuration.Email.email_password]])])]),t("div",ia,[t("div",oa,[t("label",na,[t("strong",null,[t("small",null,[i(p,{t:"Send From"})])])]),b(t("input",{id:"send_from","onUpdate:modelValue":r[5]||(r[5]=d=>w(e).Configuration.Email.send_from=d),type:"text",class:"form-control"},null,512),[[f,w(e).Configuration.Email.send_from]])])])])],32),c.value?(n(),l("hr",la)):_("",!0),c.value?(n(),l("div",da,[t("label",ra,[t("small",ua,[i(p,{t:"Send Test Email"})])]),t("form",{onSubmit:r[8]||(r[8]=d=>{d.preventDefault(),o()}),class:"input-group"},[b(t("input",{type:"email",class:"form-control rounded-start-3",id:"test_email",placeholder:"john@example.com","onUpdate:modelValue":r[7]||(r[7]=d=>h.value=d),disabled:u.value},null,8,ca),[[f,h.value]]),t("button",{class:"btn bg-primary-subtle text-primary-emphasis border-primary-subtle rounded-end-3",type:"submit",value:"Submit",disabled:h.value.length===0||u.value,id:"button-addon2"},[u.value?(n(),l("span",pa)):(n(),l("i",ma)),i(p,{t:u.value?"Sending...":"Send"},null,8,["t"])],8,ha)],32)])):_("",!0),r[12]||(r[12]=t("hr",null,null,-1)),t("div",null,[t("label",ga,[t("small",ba,[i(p,{t:"Email Body Template"})])]),b(t("textarea",{class:"form-control rounded-3 font-monospace","onUpdate:modelValue":r[9]||(r[9]=d=>w(e).Configuration.Email.email_template=d),id:"email_template",style:{"min-height":"400px"}},null,512),[[f,w(e).Configuration.Email.email_template]])])])]))}},fa={name:"settings",methods:{ipV46RegexCheck:ot},components:{DashboardEmailSettings:_a,DashboardSettingsWireguardConfigurationAutostart:Ls,DashboardIPPortInput:Is,DashboardLanguage:hs,LocaleText:p,AccountSettingsMFA:Ze,DashboardAPIKeys:ze,DashboardSettingsInputIPAddressAndPort:ue,DashboardTheme:Zt,DashboardSettingsInputWireguardConfigurationPath:Ot,AccountSettingsInputPassword:Tt,AccountSettingsInputUsername:ht,PeersDefaultSettingsInput:it},setup(){return{dashboardConfigurationStore:y()}},data(){return{activeTab:"WGDashboard",tabs:[{id:"WGDashboard",title:"WGDashboard Settings"},{id:"Peers",title:"Peers Settings"},{id:"WireGuardConfiguration",title:"WireGuard Configuration Settings"}]}}},va={class:"mt-md-5 mt-3 text-body mb-3"},ya={class:"container-md d-flex flex-column gap-4"},wa={class:"nav nav-pills nav-justified align-items-center gap-2"},$a={class:"nav-item"},ka=["onClick"],xa={class:"my-2"},Da={key:0,class:"d-flex gap-3 flex-column"},Sa={key:1,class:"d-flex gap-3 flex-column"},Ia={class:"card rounded-3"},Ca={class:"card-header"},Pa={class:"my-2"},Aa={class:"card-body"},Ta={key:2,class:"d-flex gap-3 flex-column"},Ka={class:"card rounded-3"},Va={class:"card-header"},Fa={class:"my-2"},La={class:"card-body"},Ea={class:"row g-2"},Ma={class:"col-sm"},Ua={class:"col-sm"},Na={class:"card"},Wa={class:"card-header"},Ga={class:"my-2"},Ra={class:"card-body"},Ya={class:"card"},Ha={class:"card-header"},Ba={class:"my-2"},ja={class:"card-body d-flex flex-column gap-3"},za={class:"card"},Oa={class:"card-header"},qa={class:"my-2"},Qa={class:"card-body"};function Ja(s,e,c,h,u,g){const o=m("LocaleText"),a=m("DashboardSettingsInputWireguardConfigurationPath"),r=m("DashboardSettingsWireguardConfigurationAutostart"),d=m("PeersDefaultSettingsInput"),P=m("DashboardTheme"),N=m("DashboardLanguage"),W=m("DashboardIPPortInput"),G=m("AccountSettingsInputUsername"),R=m("AccountSettingsInputPassword"),Y=m("AccountSettingsMFA"),H=m("DashboardAPIKeys"),B=m("DashboardEmailSettings");return n(),l("div",va,[t("div",ya,[t("div",null,[t("ul",wa,[(n(!0),l(C,null,K(this.tabs,V=>(n(),l("li",$a,[t("a",{class:$(["nav-link rounded-3",{active:this.activeTab===V.id}]),onClick:Xa=>this.activeTab=V.id,role:"button"},[t("h6",xa,[i(o,{t:V.title},null,8,["t"])])],10,ka)]))),256))]),e[1]||(e[1]=t("hr",null,null,-1)),t("div",null,[i(U,{name:"fade2",mode:"out-in"},{default:F(()=>[u.activeTab==="WireGuardConfiguration"?(n(),l("div",Da,[i(a,{targetData:"wg_conf_path",title:"Configurations Directory",warning:!0,"warning-text":"Remember to remove / at the end of your path. e.g /etc/wireguard"}),i(r)])):u.activeTab==="Peers"?(n(),l("div",Sa,[t("div",Ia,[t("div",Ca,[t("h6",Pa,[i(o,{t:"Peer Default Settings"})])]),t("div",Aa,[t("div",null,[i(d,{targetData:"peer_global_dns",title:"DNS"}),i(d,{targetData:"peer_endpoint_allowed_ip",title:"Endpoint Allowed IPs"}),i(d,{targetData:"peer_mtu",title:"MTU"}),i(d,{targetData:"peer_keep_alive",title:"Persistent Keepalive"}),i(d,{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."})])])])])):u.activeTab==="WGDashboard"?(n(),l("div",Ta,[t("div",Ka,[t("div",Va,[t("h6",Fa,[i(o,{t:"Appearance"})])]),t("div",La,[t("div",Ea,[t("div",Ma,[i(P)]),t("div",Ua,[i(N)])])])]),t("div",Na,[t("div",Wa,[t("h6",Ga,[i(o,{t:"Dashboard IP Address & Listen Port"})])]),t("div",Ra,[i(W)])]),t("div",Ya,[t("div",Ha,[t("h6",Ba,[i(o,{t:"Account Settings"})])]),t("div",ja,[t("div",null,[i(G,{targetData:"username",title:"Username"})]),e[0]||(e[0]=t("hr",null,null,-1)),t("div",null,[i(R,{targetData:"password"})])])]),t("div",za,[t("div",Oa,[t("h6",qa,[i(o,{t:"Multi-Factor Authentication (MFA)"})])]),t("div",Qa,[this.dashboardConfigurationStore.getActiveCrossServer()?_("",!0):(n(),x(Y,{key:0}))])]),i(H),i(B)])):_("",!0)]),_:1})])])])])}const ai=k(fa,[["render",Ja]]);export{ai as default}; +import{_ as k,z as v,D as y,A as I,c as l,a as t,m as b,d as _,b as i,h as m,y as f,n as $,t as D,f as n,W as M,e as S,v as L,k as x,F as C,g as E,w as F,T as j,j as U,i as K,r as T,q as z,o as O,u as w,B as q}from"./index-Upsq31TS.js";import{L as p}from"./localeText-n7rlaTGQ.js";import{d as A}from"./dayjs.min-Cdu5c05l.js";import{Q}from"./vue-datepicker-COnDbf6W.js";const J={components:{LocaleText:p},props:{targetData:String,title:String,warning:!1,warningText:""},setup(){const s=y(),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 v("/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})}}},X={class:"form-group mb-2"},Z=["for"],tt=["id","disabled"],et={class:"invalid-feedback"},st={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 at(s,e,c,h,u,g){const o=m("LocaleText");return n(),l("div",X,[t("label",{for:this.uuid,class:"text-muted mb-1"},[t("strong",null,[t("small",null,[i(o,{t:this.title},null,8,["t"])])])],8,Z),b(t("input",{type:"text",class:$(["form-control",{"is-invalid":u.showInvalidFeedback,"is-valid":u.isValid}]),id:this.uuid,"onUpdate:modelValue":e[0]||(e[0]=a=>this.value=a),onKeydown:e[1]||(e[1]=a=>this.changed=!0),onBlur:e[2]||(e[2]=a=>g.useValidation()),disabled:this.updating},null,42,tt),[[f,this.value]]),t("div",et,D(this.invalidFeedback),1),c.warning?(n(),l("div",st,[t("small",null,[e[3]||(e[3]=t("i",{class:"bi bi-exclamation-triangle-fill me-2"},null,-1)),i(o,{t:c.warningText},null,8,["t"])])])):_("",!0)])}const it=k(J,[["render",at]]),ot=s=>{},nt={name:"accountSettingsInputUsername",components:{LocaleText:p},props:{targetData:String,title:String},setup(){const s=y(),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 v("/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}))}}},lt={class:"form-group mb-2"},dt=["for"],rt=["id","disabled"],ut={class:"invalid-feedback"};function ct(s,e,c,h,u,g){const o=m("LocaleText");return n(),l("div",lt,[t("label",{for:this.uuid,class:"text-muted mb-1"},[t("strong",null,[t("small",null,[i(o,{t:this.title},null,8,["t"])])])],8,dt),b(t("input",{type:"text",class:$(["form-control",{"is-invalid":u.showInvalidFeedback,"is-valid":u.isValid}]),id:this.uuid,"onUpdate:modelValue":e[0]||(e[0]=a=>this.value=a),onKeydown:e[1]||(e[1]=a=>this.changed=!0),onBlur:e[2]||(e[2]=a=>g.useValidation()),disabled:this.updating},null,42,rt),[[f,this.value]]),t("div",ut,D(this.invalidFeedback),1)])}const ht=k(nt,[["render",ct]]),mt={name:"accountSettingsInputPassword",components:{LocaleText:p},props:{targetData:String,warning:!1,warningText:""},setup(){const s=y(),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 v("/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}}},pt={class:"d-flex flex-column gap-2"},gt={class:"row g-2"},bt={class:"col-sm"},_t={class:"form-group"},ft=["for"],vt=["id"],yt={key:0,class:"invalid-feedback d-block"},wt={class:"col-sm"},$t={class:"form-group"},kt=["for"],xt=["id"],Dt={class:"col-sm"},St={class:"form-group"},It=["for"],Ct=["id"],Pt=["disabled"];function At(s,e,c,h,u,g){const o=m("LocaleText");return n(),l("form",pt,[t("div",gt,[t("div",bt,[t("div",_t,[t("label",{for:"currentPassword_"+this.uuid,class:"text-muted mb-1"},[t("strong",null,[t("small",null,[i(o,{t:"Current Password"})])])],8,ft),b(t("input",{type:"password",class:$(["form-control",{"is-invalid":u.showInvalidFeedback,"is-valid":u.isValid}]),autocomplete:"current-password","onUpdate:modelValue":e[0]||(e[0]=a=>this.value.currentPassword=a),id:"currentPassword_"+this.uuid},null,10,vt),[[f,this.value.currentPassword]]),u.showInvalidFeedback?(n(),l("div",yt,D(this.invalidFeedback),1)):_("",!0)])]),t("div",wt,[t("div",$t,[t("label",{for:"newPassword_"+this.uuid,class:"text-muted mb-1"},[t("strong",null,[t("small",null,[i(o,{t:"New Password"})])])],8,kt),b(t("input",{type:"password",class:$(["form-control",{"is-invalid":u.showInvalidFeedback,"is-valid":u.isValid}]),autocomplete:"new-password","onUpdate:modelValue":e[1]||(e[1]=a=>this.value.newPassword=a),id:"newPassword_"+this.uuid},null,10,xt),[[f,this.value.newPassword]])])]),t("div",Dt,[t("div",St,[t("label",{for:"repeatNewPassword_"+this.uuid,class:"text-muted mb-1"},[t("strong",null,[t("small",null,[i(o,{t:"Repeat New Password"})])])],8,It),b(t("input",{type:"password",class:$(["form-control",{"is-invalid":u.showInvalidFeedback,"is-valid":u.isValid}]),autocomplete:"new-password","onUpdate:modelValue":e[2]||(e[2]=a=>this.value.repeatNewPassword=a),id:"repeatNewPassword_"+this.uuid},null,10,Ct),[[f,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]=a=>this.useValidation())},[e[4]||(e[4]=t("i",{class:"bi bi-save2-fill me-2"},null,-1)),i(o,{t:"Update Password"})],8,Pt)])}const Tt=k(mt,[["render",At]]),Kt={name:"dashboardSettingsInputWireguardConfigurationPath",components:{LocaleText:p},props:{targetData:String,title:String,warning:!1,warningText:""},setup(){const s=y(),e=M(),c=`input_${I()}`;return{store:s,uuid:c,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 v("/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}))}}},Vt={class:"card"},Ft={class:"card-header"},Lt={class:"my-2"},Et={class:"card-body"},Mt={class:"form-group"},Ut=["for"],Nt={class:"d-flex gap-2 align-items-start"},Wt={class:"flex-grow-1"},Gt=["id","disabled"],Rt={class:"invalid-feedback fw-bold"},Yt=["disabled"],Ht={key:0,class:"bi bi-save2-fill"},Bt={key:1,class:"spinner-border spinner-border-sm"},jt={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 zt(s,e,c,h,u,g){const o=m("LocaleText");return n(),l("div",Vt,[t("div",Ft,[t("h6",Lt,[i(o,{t:"Path"})])]),t("div",Et,[t("div",Mt,[t("label",{for:this.uuid,class:"text-muted mb-1"},[t("strong",null,[t("small",null,[i(o,{t:this.title},null,8,["t"])])])],8,Ut),t("div",Nt,[t("div",Wt,[b(t("input",{type:"text",class:$(["form-control rounded-3",{"is-invalid":this.showInvalidFeedback,"is-valid":this.isValid}]),id:this.uuid,"onUpdate:modelValue":e[0]||(e[0]=a=>this.value=a),onKeydown:e[1]||(e[1]=a=>this.changed=!0),disabled:this.updating},null,42,Gt),[[f,this.value]]),t("div",Rt,D(this.invalidFeedback),1)]),t("button",{onClick:e[2]||(e[2]=a=>this.useValidation()),disabled:!this.changed,class:"ms-auto btn rounded-3 border-success-subtle bg-success-subtle text-success-emphasis"},[this.updating?(n(),l("span",Bt)):(n(),l("i",Ht))],8,Yt)]),c.warning?(n(),l("div",jt,[t("small",null,[e[3]||(e[3]=t("i",{class:"bi bi-exclamation-triangle-fill me-2"},null,-1)),i(o,{t:c.warningText},null,8,["t"])])])):_("",!0)])])])}const Ot=k(Kt,[["render",zt]]),qt={name:"dashboardTheme",components:{LocaleText:p},setup(){return{dashboardConfigurationStore:y()}},methods:{async switchTheme(s){await v("/api/updateDashboardConfigurationItem",{section:"Server",key:"dashboard_theme",value:s},e=>{e.status&&(this.dashboardConfigurationStore.Configuration.Server.dashboard_theme=s)})}}},Qt={class:"text-muted mb-1 d-block"},Jt={class:"d-flex gap-1"};function Xt(s,e,c,h,u,g){const o=m("LocaleText");return n(),l("div",null,[t("small",Qt,[t("strong",null,[i(o,{t:"Theme"})])]),t("div",Jt,[t("button",{class:$(["btn bg-primary-subtle text-primary-emphasis flex-grow-1",{active:this.dashboardConfigurationStore.Configuration.Server.dashboard_theme==="light"}]),onClick:e[0]||(e[0]=a=>this.switchTheme("light"))},[e[2]||(e[2]=t("i",{class:"bi bi-sun-fill me-2"},null,-1)),i(o,{t:"Light"})],2),t("button",{class:$(["btn bg-primary-subtle text-primary-emphasis flex-grow-1",{active:this.dashboardConfigurationStore.Configuration.Server.dashboard_theme==="dark"}]),onClick:e[1]||(e[1]=a=>this.switchTheme("dark"))},[e[3]||(e[3]=t("i",{class:"bi bi-moon-fill me-2"},null,-1)),i(o,{t:"Dark"})],2)])])}const Zt=k(qt,[["render",Xt]]),te={name:"dashboardSettingsInputIPAddressAndPort",props:{},setup(){const s=y(),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 v("/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)})}}},ee={class:"invalid-feedback d-block mt-0"},se={class:"row"},ae={class:"form-group mb-2 col-sm"},ie=["for"],oe=["id"],ne={class:"form-group col-sm"},le=["for"],de=["id"];function re(s,e,c,h,u,g){return n(),l("div",null,[t("div",ee,D(this.invalidFeedback),1),t("div",se,[t("div",ae,[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,ie),b(t("input",{type:"text",class:"form-control mb-2",id:"app_ip_"+this.uuid,"onUpdate:modelValue":e[0]||(e[0]=o=>this.app_ip=o)},null,8,oe),[[f,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"),S(" means it can be access by anyone with your server IP Address.")])],-1))]),t("div",ne,[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,le),b(t("input",{type:"text",class:"form-control mb-2",id:"app_port_"+this.uuid,"onUpdate:modelValue":e[1]||(e[1]=o=>this.app_port=o)},null,8,de),[[f,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"}),S("Update Dashboard Settings & Restart ")],-1))])}const ue=k(te,[["render",re]]),ce={name:"newDashboardAPIKey",components:{LocaleText:p,VueDatePicker:Q},data(){return{newKeyData:{ExpiredAt:A().add(7,"d").format("YYYY-MM-DD HH:mm:ss"),NeverExpire:!1},submitting:!1}},setup(){return{store:y()}},mounted(){console.log(this.newKeyData.ExpiredAt)},methods:{submitNewAPIKey(){this.submitting=!0,v("/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(A(s).format("YYYY-MM-DDTHH:mm:ss")),A(s).format("YYYY-MM-DDTHH:mm:ss")},parseTime(s){s?this.newKeyData.ExpiredAt=A(s).format("YYYY-MM-DD HH:mm:ss"):this.newKeyData.ExpiredAt=void 0}}},he={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)"}},me={class:"card m-auto rounded-3 mt-5"},pe={class:"card-header bg-transparent d-flex align-items-center gap-2 border-0 p-4 pb-0"},ge={class:"mb-0"},be={class:"card-body d-flex gap-2 p-4 flex-column"},_e={class:"text-muted"},fe={class:"d-flex align-items-center gap-2"},ve={class:"form-check"},ye=["disabled"],we={class:"form-check-label",for:"neverExpire"},$e={key:0,class:"bi bi-check-lg me-2"};function ke(s,e,c,h,u,g){const o=m("LocaleText"),a=m("VueDatePicker");return n(),l("div",he,[t("div",me,[t("div",pe,[t("h6",ge,[i(o,{t:"Create API Key"})]),t("button",{type:"button",class:"btn-close ms-auto",onClick:e[0]||(e[0]=r=>this.$emit("close"))})]),t("div",be,[t("small",_e,[i(o,{t:"When should this API Key expire?"})]),t("div",fe,[i(a,{is24:!0,"min-date":new Date,"model-value":this.newKeyData.ExpiredAt,"onUpdate:modelValue":this.parseTime,"time-picker-inline":"",format:"yyyy-MM-dd HH:mm:ss","preview-format":"yyyy-MM-dd HH:mm:ss",clearable:!1,disabled:this.newKeyData.NeverExpire||this.submitting,dark:this.store.Configuration.Server.dashboard_theme==="dark"},null,8,["min-date","model-value","onUpdate:modelValue","disabled","dark"])]),t("div",ve,[b(t("input",{class:"form-check-input",type:"checkbox","onUpdate:modelValue":e[1]||(e[1]=r=>this.newKeyData.NeverExpire=r),id:"neverExpire",disabled:this.submitting},null,8,ye),[[L,this.newKeyData.NeverExpire]]),t("label",we,[i(o,{t:"Never Expire"}),e[3]||(e[3]=S(" (")),e[4]||(e[4]=t("i",{class:"bi bi-emoji-grimace-fill me-2"},null,-1)),i(o,{t:"Don't think that's a good idea"}),e[5]||(e[5]=S(") "))])]),t("button",{class:$(["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]=r=>this.submitNewAPIKey())},[this.submitting?_("",!0):(n(),l("i",$e)),this.submitting?(n(),x(o,{key:1,t:"Creating..."})):(n(),x(o,{key:2,t:"Create"}))],2)])])])}const xe=k(ce,[["render",ke]]),De={name:"dashboardAPIKey",components:{LocaleText:p},props:{apiKey:Object},setup(){return{store:y()}},data(){return{confirmDelete:!1}},methods:{deleteAPIKey(){v("/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")})}}},Se={class:"card rounded-3 shadow-sm"},Ie={key:0,class:"card-body d-flex gap-3 align-items-center apiKey-card-body"},Ce={class:"d-flex align-items-center gap-2"},Pe={class:"text-muted"},Ae={style:{"word-break":"break-all"}},Te={class:"d-flex align-items-center gap-2 ms-auto"},Ke={class:"text-muted"},Ve={key:0,class:"card-body d-flex gap-3 align-items-center justify-content-end"};function Fe(s,e,c,h,u,g){const o=m("LocaleText");return n(),l("div",Se,[this.confirmDelete?(n(),l(C,{key:1},[this.store.getActiveCrossServer()?_("",!0):(n(),l("div",Ve,[i(o,{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]=a=>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]=a=>this.confirmDelete=!1)},e[5]||(e[5]=[t("i",{class:"bi bi-x-lg"},null,-1)]))]))],64)):(n(),l("div",Ie,[t("div",Ce,[t("small",Pe,[i(o,{t:"Key"})]),t("span",Ae,D(this.apiKey.Key),1)]),t("div",Te,[t("small",Ke,[i(o,{t:"Expire At"})]),this.apiKey.ExpiredAt?_("",!0):(n(),x(o,{key:0,t:"Never Expire"})),t("span",null,D(this.apiKey.ExpiredAt),1)]),this.store.getActiveCrossServer()?_("",!0):(n(),l("a",{key:0,role:"button",class:"btn btn-sm bg-danger-subtle text-danger-emphasis rounded-3",onClick:e[0]||(e[0]=a=>this.confirmDelete=!0)},e[3]||(e[3]=[t("i",{class:"bi bi-trash-fill"},null,-1)])))]))])}const Le=k(De,[["render",Fe],["__scopeId","data-v-a76253c8"]]),Ee={name:"dashboardAPIKeys",components:{LocaleText:p,DashboardAPIKey:Le,NewDashboardAPIKey:xe},setup(){return{store:y()}},data(){return{value:this.store.Configuration.Server.dashboard_api_key,apiKeys:[],newDashboardAPIKey:!1}},methods:{async toggleDashboardAPIKeys(){await v("/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?E("/api/getDashboardAPIKeys",{},e=>{e.status?this.apiKeys=e.data:(this.apiKeys=[],this.store.newMessage("Server",e.message,"danger"))}):this.apiKeys=[]}}}},Me={class:"card rounded-3"},Ue={class:"my-2"},Ne={key:0,class:"form-check form-switch ms-auto"},We={class:"form-check-label",for:"allowAPIKeysSwitch"},Ge={key:0,class:"card-body position-relative d-flex flex-column gap-2"},Re={key:1,class:"card",style:{height:"300px"}},Ye={class:"card-body d-flex text-muted"},He={class:"m-auto"},Be={key:2,class:"d-flex flex-column gap-2 position-relative",style:{"min-height":"300px"}};function je(s,e,c,h,u,g){const o=m("LocaleText"),a=m("DashboardAPIKey"),r=m("NewDashboardAPIKey");return n(),l("div",Me,[t("div",{class:$(["card-header d-flex align-items-center",{"border-bottom-0 rounded-3":!this.value}])},[t("h6",Ue,[i(o,{t:"API Keys"})]),this.store.getActiveCrossServer()?_("",!0):(n(),l("div",Ne,[b(t("input",{class:"form-check-input",type:"checkbox","onUpdate:modelValue":e[0]||(e[0]=d=>this.value=d),onChange:e[1]||(e[1]=d=>this.toggleDashboardAPIKeys()),role:"switch",id:"allowAPIKeysSwitch"},null,544),[[L,this.value]]),t("label",We,[this.value?(n(),x(o,{key:0,t:"Enabled"})):(n(),x(o,{key:1,t:"Disabled"}))])]))],2),this.value?(n(),l("div",Ge,[this.store.getActiveCrossServer()?_("",!0):(n(),l("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]=d=>this.newDashboardAPIKey=!0)},[e[6]||(e[6]=t("i",{class:"bi bi-plus-circle-fill me-2"},null,-1)),i(o,{t:"API Key"})])),this.apiKeys.length===0?(n(),l("div",Re,[t("div",Ye,[t("span",He,[i(o,{t:"No WGDashboard API Key"})])])])):(n(),l("div",Be,[i(j,{name:"apiKey"},{default:F(()=>[(n(!0),l(C,null,K(this.apiKeys,d=>(n(),x(a,{apiKey:d,key:d.Key,onDeleted:e[3]||(e[3]=P=>this.apiKeys=P)},null,8,["apiKey"]))),128))]),_:1})])),i(U,{name:"zoomReversed"},{default:F(()=>[this.newDashboardAPIKey?(n(),x(r,{key:0,onCreated:e[4]||(e[4]=d=>this.apiKeys=d),onClose:e[5]||(e[5]=d=>this.newDashboardAPIKey=!1)})):_("",!0)]),_:1})])):_("",!0)])}const ze=k(Ee,[["render",je],["__scopeId","data-v-100ee9f9"]]),Oe={name:"accountSettingsMFA",components:{LocaleText:p},setup(){const s=y(),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 v("/api/updateDashboardConfigurationItem",{section:"Account",key:"totp_verified",value:"false"},async s=>{await v("/api/updateDashboardConfigurationItem",{section:"Account",key:"enable_totp",value:"false"},e=>{e.status&&this.$router.push("/2FASetup")})})}}},qe={class:"d-flex align-items-center"},Qe={class:"form-check form-switch"},Je={for:"allowMFAKeysSwitch"};function Xe(s,e,c,h,u,g){const o=m("LocaleText");return n(),l("div",null,[t("div",qe,[t("div",Qe,[b(t("input",{class:"form-check-input",type:"checkbox","onUpdate:modelValue":e[0]||(e[0]=a=>this.status=a),role:"switch",id:"allowMFAKeysSwitch"},null,512),[[L,this.status]]),t("label",Je,[this.status?(n(),x(o,{key:0,t:"Enabled"})):(n(),x(o,{key:1,t:"Disabled"}))])]),this.status?(n(),l("button",{key:0,class:"btn bg-warning-subtle text-warning-emphasis border-1 border-warning-subtle ms-auto rounded-3 shadow-sm",onClick:e[1]||(e[1]=a=>this.resetMFA())},[e[2]||(e[2]=t("i",{class:"bi bi-shield-lock-fill me-2"},null,-1)),this.store.Configuration.Account.totp_verified?(n(),x(o,{key:0,t:"Reset"})):(n(),x(o,{key:1,t:"Setup"})),e[3]||(e[3]=S(" MFA "))])):_("",!0)])])}const Ze=k(Oe,[["render",Xe]]),ts={name:"dashboardLanguage",components:{LocaleText:p},setup(){return{store:y()}},data(){return{languages:void 0}},mounted(){E("/api/locale/available",{},s=>{this.languages=s.data})},methods:{changeLanguage(s){v("/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)}}},es={class:"text-muted d-block mb-1"},ss={class:"d-flex gap-2"},as={class:"dropdown w-100"},is=["disabled"],os={key:1},ns={class:"dropdown-menu rounded-3 shadow",style:{"max-height":"500px","overflow-y":"scroll"}},ls=["onClick"],ds={class:"me-auto mb-0"},rs={class:"d-block",style:{"font-size":"0.8rem"}},us={key:0,class:"bi bi-check text-primary fs-5"};function cs(s,e,c,h,u,g){const o=m("LocaleText");return n(),l("div",null,[t("small",es,[t("strong",null,[i(o,{t:"Language"})])]),t("div",ss,[t("div",as,[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?(n(),l("span",os,D(g.currentLanguage?.lang_name_localized),1)):(n(),x(o,{key:0,t:"Loading..."}))],8,is),t("ul",ns,[(n(!0),l(C,null,K(this.languages,a=>(n(),l("li",null,[t("a",{class:"dropdown-item d-flex align-items-center",role:"button",onClick:r=>this.changeLanguage(a.lang_id)},[t("p",ds,[S(D(a.lang_name_localized)+" ",1),t("small",rs,D(a.lang_name),1)]),g.currentLanguage?.lang_id===a.lang_id?(n(),l("i",us)):_("",!0)],8,ls)]))),256))])])])])}const hs=k(ts,[["render",cs],["__scopeId","data-v-4e34593e"]]),ms={name:"dashboardIPPortInput",components:{LocaleText:p},setup(){return{store:y()}},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,c){this.changed&&(this.updating=!0,await v("/api/updateDashboardConfigurationItem",{section:"Server",key:e,value:c},h=>{h.status?(s.target.classList.add("is-valid"),this.showInvalidFeedback=!1,this.store.Configuration.Server[e]=c,clearTimeout(this.timeout),this.timeout=setTimeout(()=>{s.target.classList.remove("is-valid")},5e3)):(this.isValid=!1,this.showInvalidFeedback=!0,this.invalidFeedback=h.message),this.changed=!1,this.updating=!1}))}}},ps={class:"row g-2"},gs={class:"col-sm"},bs={class:"form-group"},_s={for:"input_dashboard_ip",class:"text-muted mb-1"},fs=["disabled"],vs={class:"invalid-feedback"},ys={class:"col-sm"},ws={class:"form-group"},$s={for:"input_dashboard_ip",class:"text-muted mb-1"},ks=["disabled"],xs={class:"invalid-feedback"},Ds={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 Ss(s,e,c,h,u,g){const o=m("LocaleText");return n(),l("div",null,[t("div",ps,[t("div",gs,[t("div",bs,[t("label",_s,[t("strong",null,[t("small",null,[i(o,{t:"IP Address / Hostname"})])])]),b(t("input",{type:"text",class:$(["form-control",{"is-invalid":u.showInvalidFeedback,"is-valid":u.isValid}]),id:"input_dashboard_ip","onUpdate:modelValue":e[0]||(e[0]=a=>this.ipAddress=a),onKeydown:e[1]||(e[1]=a=>this.changed=!0),onBlur:e[2]||(e[2]=a=>g.useValidation(a,"app_ip",this.ipAddress)),disabled:this.updating},null,42,fs),[[f,this.ipAddress]]),t("div",vs,D(this.invalidFeedback),1)])]),t("div",ys,[t("div",ws,[t("label",$s,[t("strong",null,[t("small",null,[i(o,{t:"Listen Port"})])])]),b(t("input",{type:"number",class:$(["form-control",{"is-invalid":u.showInvalidFeedback,"is-valid":u.isValid}]),id:"input_dashboard_ip","onUpdate:modelValue":e[3]||(e[3]=a=>this.port=a),onKeydown:e[4]||(e[4]=a=>this.changed=!0),onBlur:e[5]||(e[5]=a=>g.useValidation(a,"app_port",this.port)),disabled:this.updating},null,42,ks),[[f,this.port]]),t("div",xs,D(this.invalidFeedback),1)])])]),t("div",Ds,[t("small",null,[e[6]||(e[6]=t("i",{class:"bi bi-exclamation-triangle-fill me-2"},null,-1)),i(o,{t:"Manual restart of WGDashboard is needed to apply changes on IP Address and Listen Port"})])])])}const Is=k(ms,[["render",Ss]]),Cs={class:"card rounded-3"},Ps={class:"card-header"},As={class:"my-2"},Ts={class:"card-body d-flex gap-2"},Ks={class:"list-group w-100"},Vs=["onClick"],Fs={__name:"dashboardSettingsWireguardConfigurationAutostart",setup(s){const e=y(),c=M(),h=T(e.Configuration.WireGuardConfiguration.autostart),u=z(()=>c.Configurations.map(a=>a.Name)),g=async()=>{await v("/api/updateDashboardConfigurationItem",{section:"WireGuardConfiguration",key:"autostart",value:h.value},async a=>{a.status?(e.newMessage("Server","Start up configurations saved","success"),h.value=a.data):e.newMessage("Server","Start up configurations failed to save","danger")})},o=a=>{h.value.includes(a)?h.value=h.value.filter(r=>r!==a):h.value.push(a),g()};return(a,r)=>(n(),l("div",Cs,[t("div",Ps,[t("h6",As,[i(p,{t:"Toggle When Start Up"})])]),t("div",Ts,[t("div",Ks,[(n(!0),l(C,null,K(u.value,d=>(n(),l("button",{type:"button",key:d,onClick:P=>o(d),class:"list-group-item list-group-item-action py-2 w-100 d-flex align-items-center"},[t("samp",null,D(d),1),t("i",{class:$(["ms-auto",[h.value.includes(d)?"bi-check-circle-fill":"bi-circle"]])},null,2)],8,Vs))),128))])])]))}},Ls=k(Fs,[["__scopeId","data-v-4aa2aed9"]]),Es={class:"card"},Ms={class:"card-header"},Us={class:"my-2 d-flex"},Ns={key:0,class:"text-success ms-auto"},Ws={class:"card-body d-flex flex-column gap-3"},Gs={class:"row gx-2 gy-2"},Rs={class:"col-12 col-lg-4"},Ys={class:"form-group"},Hs={for:"server",class:"text-muted mb-1"},Bs={class:"col-12 col-lg-4"},js={class:"form-group"},zs={for:"port",class:"text-muted mb-1"},Os={class:"col-12 col-lg-4"},qs={class:"form-group"},Qs={for:"encryption",class:"text-muted mb-1"},Js={value:"NOTLS"},Xs={class:"col-12 col-lg-4"},Zs={class:"form-group"},ta={for:"username",class:"text-muted mb-1"},ea={class:"col-12 col-lg-4"},sa={class:"form-group"},aa={for:"email_password",class:"text-muted mb-1"},ia={class:"col-12 col-lg-4"},oa={class:"form-group"},na={for:"send_from",class:"text-muted mb-1"},la={key:0},da={key:1},ra={class:"text-muted mb-1",for:"test_email"},ua={class:"fw-bold"},ca=["disabled"],ha=["disabled"],ma={key:0,class:"bi bi-send me-2"},pa={key:1,class:"spinner-border spinner-border-sm me-2"},ga={class:"text-muted mb-1",for:"email_template"},ba={class:"fw-bold"},_a={__name:"dashboardEmailSettings",setup(s){const e=y();O(()=>{g(),document.querySelectorAll("#emailAccount input, #emailAccount select, #email_template").forEach(a=>{a.addEventListener("change",async()=>{let r=a.attributes.getNamedItem("id").value;await v("/api/updateDashboardConfigurationItem",{section:"Email",key:r,value:a.value},d=>{d.status?(a.classList.remove("is-invalid"),a.classList.add("is-valid")):(a.classList.remove("is-valid"),a.classList.add("is-invalid")),g()})})})});const c=T(!1),h=T(""),u=T(!1),g=async()=>{await E("/api/email/ready",{},a=>{c.value=a.status})},o=async()=>{u.value=!0,await v("/api/email/send",{Receiver:h.value,Subject:"WGDashboard Testing Email",Body:"Test 1, 2, 3! Hello World :)"},a=>{a.status?e.newMessage("Server","Test email sent successfully!","success"):e.newMessage("Server",`Test email sent failed! Reason: ${a.message}`,"danger"),u.value=!1})};return(a,r)=>(n(),l("div",Es,[t("div",Ms,[t("h6",Us,[i(p,{t:"Email Account"}),c.value?(n(),l("span",Ns,[r[10]||(r[10]=t("i",{class:"bi bi-check-circle-fill me-2"},null,-1)),i(p,{t:"Ready"})])):_("",!0)])]),t("div",Ws,[t("form",{onSubmit:r[6]||(r[6]=d=>d.preventDefault(d)),id:"emailAccount"},[t("div",Gs,[t("div",Rs,[t("div",Ys,[t("label",Hs,[t("strong",null,[t("small",null,[i(p,{t:"Server"})])])]),b(t("input",{id:"server","onUpdate:modelValue":r[0]||(r[0]=d=>w(e).Configuration.Email.server=d),type:"text",class:"form-control"},null,512),[[f,w(e).Configuration.Email.server]])])]),t("div",Bs,[t("div",js,[t("label",zs,[t("strong",null,[t("small",null,[i(p,{t:"Port"})])])]),b(t("input",{id:"port","onUpdate:modelValue":r[1]||(r[1]=d=>w(e).Configuration.Email.port=d),type:"text",class:"form-control"},null,512),[[f,w(e).Configuration.Email.port]])])]),t("div",Os,[t("div",qs,[t("label",Qs,[t("strong",null,[t("small",null,[i(p,{t:"Encryption"})])])]),b(t("select",{class:"form-select","onUpdate:modelValue":r[2]||(r[2]=d=>w(e).Configuration.Email.encryption=d),id:"encryption"},[r[11]||(r[11]=t("option",{value:"STARTTLS"}," STARTTLS ",-1)),t("option",Js,[i(p,{t:"No Encryption"})])],512),[[q,w(e).Configuration.Email.encryption]])])]),t("div",Xs,[t("div",Zs,[t("label",ta,[t("strong",null,[t("small",null,[i(p,{t:"Username"})])])]),b(t("input",{id:"username","onUpdate:modelValue":r[3]||(r[3]=d=>w(e).Configuration.Email.username=d),type:"text",class:"form-control"},null,512),[[f,w(e).Configuration.Email.username]])])]),t("div",ea,[t("div",sa,[t("label",aa,[t("strong",null,[t("small",null,[i(p,{t:"Password"})])])]),b(t("input",{id:"email_password","onUpdate:modelValue":r[4]||(r[4]=d=>w(e).Configuration.Email.email_password=d),type:"password",class:"form-control"},null,512),[[f,w(e).Configuration.Email.email_password]])])]),t("div",ia,[t("div",oa,[t("label",na,[t("strong",null,[t("small",null,[i(p,{t:"Send From"})])])]),b(t("input",{id:"send_from","onUpdate:modelValue":r[5]||(r[5]=d=>w(e).Configuration.Email.send_from=d),type:"text",class:"form-control"},null,512),[[f,w(e).Configuration.Email.send_from]])])])])],32),c.value?(n(),l("hr",la)):_("",!0),c.value?(n(),l("div",da,[t("label",ra,[t("small",ua,[i(p,{t:"Send Test Email"})])]),t("form",{onSubmit:r[8]||(r[8]=d=>{d.preventDefault(),o()}),class:"input-group"},[b(t("input",{type:"email",class:"form-control rounded-start-3",id:"test_email",placeholder:"john@example.com","onUpdate:modelValue":r[7]||(r[7]=d=>h.value=d),disabled:u.value},null,8,ca),[[f,h.value]]),t("button",{class:"btn bg-primary-subtle text-primary-emphasis border-primary-subtle rounded-end-3",type:"submit",value:"Submit",disabled:h.value.length===0||u.value,id:"button-addon2"},[u.value?(n(),l("span",pa)):(n(),l("i",ma)),i(p,{t:u.value?"Sending...":"Send"},null,8,["t"])],8,ha)],32)])):_("",!0),r[12]||(r[12]=t("hr",null,null,-1)),t("div",null,[t("label",ga,[t("small",ba,[i(p,{t:"Email Body Template"})])]),b(t("textarea",{class:"form-control rounded-3 font-monospace","onUpdate:modelValue":r[9]||(r[9]=d=>w(e).Configuration.Email.email_template=d),id:"email_template",style:{"min-height":"400px"}},null,512),[[f,w(e).Configuration.Email.email_template]])])])]))}},fa={name:"settings",methods:{ipV46RegexCheck:ot},components:{DashboardEmailSettings:_a,DashboardSettingsWireguardConfigurationAutostart:Ls,DashboardIPPortInput:Is,DashboardLanguage:hs,LocaleText:p,AccountSettingsMFA:Ze,DashboardAPIKeys:ze,DashboardSettingsInputIPAddressAndPort:ue,DashboardTheme:Zt,DashboardSettingsInputWireguardConfigurationPath:Ot,AccountSettingsInputPassword:Tt,AccountSettingsInputUsername:ht,PeersDefaultSettingsInput:it},setup(){return{dashboardConfigurationStore:y()}},data(){return{activeTab:"WGDashboard",tabs:[{id:"WGDashboard",title:"WGDashboard Settings"},{id:"Peers",title:"Peers Settings"},{id:"WireGuardConfiguration",title:"WireGuard Configuration Settings"}]}}},va={class:"mt-md-5 mt-3 text-body mb-3"},ya={class:"container-md d-flex flex-column gap-4"},wa={class:"nav nav-pills nav-justified align-items-center gap-2"},$a={class:"nav-item"},ka=["onClick"],xa={class:"my-2"},Da={key:0,class:"d-flex gap-3 flex-column"},Sa={key:1,class:"d-flex gap-3 flex-column"},Ia={class:"card rounded-3"},Ca={class:"card-header"},Pa={class:"my-2"},Aa={class:"card-body"},Ta={key:2,class:"d-flex gap-3 flex-column"},Ka={class:"card rounded-3"},Va={class:"card-header"},Fa={class:"my-2"},La={class:"card-body"},Ea={class:"row g-2"},Ma={class:"col-sm"},Ua={class:"col-sm"},Na={class:"card"},Wa={class:"card-header"},Ga={class:"my-2"},Ra={class:"card-body"},Ya={class:"card"},Ha={class:"card-header"},Ba={class:"my-2"},ja={class:"card-body d-flex flex-column gap-3"},za={class:"card"},Oa={class:"card-header"},qa={class:"my-2"},Qa={class:"card-body"};function Ja(s,e,c,h,u,g){const o=m("LocaleText"),a=m("DashboardSettingsInputWireguardConfigurationPath"),r=m("DashboardSettingsWireguardConfigurationAutostart"),d=m("PeersDefaultSettingsInput"),P=m("DashboardTheme"),N=m("DashboardLanguage"),W=m("DashboardIPPortInput"),G=m("AccountSettingsInputUsername"),R=m("AccountSettingsInputPassword"),Y=m("AccountSettingsMFA"),H=m("DashboardAPIKeys"),B=m("DashboardEmailSettings");return n(),l("div",va,[t("div",ya,[t("div",null,[t("ul",wa,[(n(!0),l(C,null,K(this.tabs,V=>(n(),l("li",$a,[t("a",{class:$(["nav-link rounded-3",{active:this.activeTab===V.id}]),onClick:Xa=>this.activeTab=V.id,role:"button"},[t("h6",xa,[i(o,{t:V.title},null,8,["t"])])],10,ka)]))),256))]),e[1]||(e[1]=t("hr",null,null,-1)),t("div",null,[i(U,{name:"fade2",mode:"out-in"},{default:F(()=>[u.activeTab==="WireGuardConfiguration"?(n(),l("div",Da,[i(a,{targetData:"wg_conf_path",title:"Configurations Directory",warning:!0,"warning-text":"Remember to remove / at the end of your path. e.g /etc/wireguard"}),i(r)])):u.activeTab==="Peers"?(n(),l("div",Sa,[t("div",Ia,[t("div",Ca,[t("h6",Pa,[i(o,{t:"Peer Default Settings"})])]),t("div",Aa,[t("div",null,[i(d,{targetData:"peer_global_dns",title:"DNS"}),i(d,{targetData:"peer_endpoint_allowed_ip",title:"Endpoint Allowed IPs"}),i(d,{targetData:"peer_mtu",title:"MTU"}),i(d,{targetData:"peer_keep_alive",title:"Persistent Keepalive"}),i(d,{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."})])])])])):u.activeTab==="WGDashboard"?(n(),l("div",Ta,[t("div",Ka,[t("div",Va,[t("h6",Fa,[i(o,{t:"Appearance"})])]),t("div",La,[t("div",Ea,[t("div",Ma,[i(P)]),t("div",Ua,[i(N)])])])]),t("div",Na,[t("div",Wa,[t("h6",Ga,[i(o,{t:"Dashboard IP Address & Listen Port"})])]),t("div",Ra,[i(W)])]),t("div",Ya,[t("div",Ha,[t("h6",Ba,[i(o,{t:"Account Settings"})])]),t("div",ja,[t("div",null,[i(G,{targetData:"username",title:"Username"})]),e[0]||(e[0]=t("hr",null,null,-1)),t("div",null,[i(R,{targetData:"password"})])])]),t("div",za,[t("div",Oa,[t("h6",qa,[i(o,{t:"Multi-Factor Authentication (MFA)"})])]),t("div",Qa,[this.dashboardConfigurationStore.getActiveCrossServer()?_("",!0):(n(),x(Y,{key:0}))])]),i(H),i(B)])):_("",!0)]),_:1})])])])])}const ai=k(fa,[["render",Ja]]);export{ai as default}; diff --git a/src/static/app/dist/assets/setup-BKjNeIHl.js b/src/static/app/dist/assets/setup-BA8-6L-I.js similarity index 96% rename from src/static/app/dist/assets/setup-BKjNeIHl.js rename to src/static/app/dist/assets/setup-BA8-6L-I.js index 553c9d2..c8bcdfe 100644 --- a/src/static/app/dist/assets/setup-BKjNeIHl.js +++ b/src/static/app/dist/assets/setup-BA8-6L-I.js @@ -1 +1 @@ -import{_ as u,c as r,a as e,b as o,h as m,e as p,d as c,t as h,m as l,y as d,z as f,D as w,f as i}from"./index-BaGiSoQe.js";import{L as g}from"./localeText-DkjxgEQB.js";const b={name:"setup",components:{LocaleText:g},setup(){return{store:w()}},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,f("/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"},$={for:"confirmPassword",class:"mb-1 text-muted"},q=["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=m("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]=p(" 😊"))]),e("div",null,[e("h3",null,[o(t,{t:"Create an account"})]),this.errorMessage?(i(),r("div",P,h(this.errorMessage),1)):c("",!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",$,[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,q)])])])],8,_)}const W=u(b,[["render",B]]);export{W as default}; +import{_ as u,c as r,a as e,b as o,h as m,e as p,d as c,t as h,m as l,y as d,z as f,D as w,f as i}from"./index-Upsq31TS.js";import{L as g}from"./localeText-n7rlaTGQ.js";const b={name:"setup",components:{LocaleText:g},setup(){return{store:w()}},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,f("/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"},$={for:"confirmPassword",class:"mb-1 text-muted"},q=["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=m("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]=p(" 😊"))]),e("div",null,[e("h3",null,[o(t,{t:"Create an account"})]),this.errorMessage?(i(),r("div",P,h(this.errorMessage),1)):c("",!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",$,[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,q)])])])],8,_)}const W=u(b,[["render",B]]);export{W as default}; diff --git a/src/static/app/dist/assets/share-CNIJmGhk.js b/src/static/app/dist/assets/share-C108soct.js similarity index 86% rename from src/static/app/dist/assets/share-CNIJmGhk.js rename to src/static/app/dist/assets/share-C108soct.js index d5d9b45..157135e 100644 --- a/src/static/app/dist/assets/share-CNIJmGhk.js +++ b/src/static/app/dist/assets/share-C108soct.js @@ -1 +1 @@ -import{_,c as m,a as t,b as r,h,r as c,D as p,g as u,M as b,f}from"./index-BaGiSoQe.js";import{Q as v}from"./browser-BHoir7AQ.js";import{L as y}from"./localeText-DkjxgEQB.js";const g={name:"share",components:{LocaleText:y},async setup(){const o=b(),e=c(!1),s=p(),n=c(""),i=c(void 0),l=c(new Blob);await u("/api/getDashboardTheme",{},d=>{n.value=d.data});const a=o.query.ShareID;return a===void 0||a.length===0?(i.value=void 0,e.value=!0):await u("/api/sharePeer/get",{ShareID:a},d=>{d.status?(i.value=d.data,l.value=new Blob([i.value.file],{type:"text/plain"})):i.value=void 0,e.value=!0}),{store:s,theme:n,peerConfiguration:i,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),s=`${this.peerConfiguration.fileName}.conf`,n=document.createElement("a");n.href=e,n.download=s,n.click()}},computed:{getBlob(){return URL.createObjectURL(this.blob)}}},x=["data-bs-theme"],w={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"},R={class:"text-muted animate__animated animate__fadeInUp mb-1",style:{"animation-delay":"0.2s"}},D=["download","href"];function q(o,e,s,n,i,l){const a=h("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",w,[this.peerConfiguration?(f(),m("div",L,[t("div",B,[e[1]||(e[1]=t("h6",null,"WGDashboard",-1)),r(a,{t:"Scan QR Code with the WireGuard App to add peer"})]),t("canvas",k,null,512),t("p",R,[r(a,{t:"or click the button below to download the "}),e[2]||(e[2]=t("samp",null,".conf",-1)),r(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,D)])):(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,[r(a,{t:"Oh no... This link is either expired or invalid."})])])]))])],8,x)}const N=_(g,[["render",q],["__scopeId","data-v-1b44aacd"]]);export{N as default}; +import{_,c as m,a as t,b as r,h,r as c,D as p,g as u,L as b,f}from"./index-Upsq31TS.js";import{Q as v}from"./browser-Bcujcoof.js";import{L as y}from"./localeText-n7rlaTGQ.js";const g={name:"share",components:{LocaleText:y},async setup(){const o=b(),e=c(!1),s=p(),n=c(""),i=c(void 0),l=c(new Blob);await u("/api/getDashboardTheme",{},d=>{n.value=d.data});const a=o.query.ShareID;return a===void 0||a.length===0?(i.value=void 0,e.value=!0):await u("/api/sharePeer/get",{ShareID:a},d=>{d.status?(i.value=d.data,l.value=new Blob([i.value.file],{type:"text/plain"})):i.value=void 0,e.value=!0}),{store:s,theme:n,peerConfiguration:i,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),s=`${this.peerConfiguration.fileName}.conf`,n=document.createElement("a");n.href=e,n.download=s,n.click()}},computed:{getBlob(){return URL.createObjectURL(this.blob)}}},x=["data-bs-theme"],w={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"}},L={class:"m-auto"},I={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"},R={class:"text-muted animate__animated animate__fadeInUp mb-1",style:{"animation-delay":"0.2s"}},D=["download","href"];function q(o,e,s,n,i,l){const a=h("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",w,[this.peerConfiguration?(f(),m("div",I,[t("div",B,[e[1]||(e[1]=t("h6",null,"WGDashboard",-1)),r(a,{t:"Scan QR Code with the WireGuard App to add peer"})]),t("canvas",k,null,512),t("p",R,[r(a,{t:"or click the button below to download the "}),e[2]||(e[2]=t("samp",null,".conf",-1)),r(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,D)])):(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",L,[r(a,{t:"Oh no... This link is either expired or invalid."})])])]))])],8,x)}const N=_(g,[["render",q],["__scopeId","data-v-1b44aacd"]]);export{N as default}; diff --git a/src/static/app/dist/assets/signin-L3oMqQIW.js b/src/static/app/dist/assets/signin-DCnzrYSP.js similarity index 97% rename from src/static/app/dist/assets/signin-L3oMqQIW.js rename to src/static/app/dist/assets/signin-DCnzrYSP.js index 0ed61b9..3e9fd11 100644 --- a/src/static/app/dist/assets/signin-L3oMqQIW.js +++ b/src/static/app/dist/assets/signin-DCnzrYSP.js @@ -1 +1 @@ -import{_ as g,G as m,c as n,a as t,m as u,y as h,n as w,t as k,f as i,D as S,b as l,h as f,d as _,F as T,i as C,k as $,a1 as E,v as M,e as V,w as D,T as A,z as R,g as y}from"./index-BaGiSoQe.js";import{M as P}from"./message-DmK834mY.js";import{d as x}from"./dayjs.min-H8Pjp0HL.js";import{L}from"./localeText-DkjxgEQB.js";const U={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=x(),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=x(),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?`${x().subtract(this.startTime).millisecond()}ms`:this.refreshing?m("Pinging..."):this.errorMsg?this.errorMsg:"N/A"}}},q={class:"card rounded-3"},B={class:"card-body"},O={class:"d-flex gap-3 w-100 remoteServerContainer"},j={class:"d-flex gap-3 align-items-center flex-grow-1"},G={class:"d-flex gap-3 align-items-center flex-grow-1"},N={class:"d-flex gap-2 button-group"},K={class:"card-footer gap-2 d-flex align-items-center"},z={key:0,class:"spin ms-auto text-primary-emphasis"};function W(s,e,d,c,a,p){return i(),n("div",q,[t("div",B,[t("div",O,[t("div",j,[e[7]||(e[7]=t("i",{class:"bi bi-server"},null,-1)),u(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),[[h,this.server.host]])]),t("div",G,[e[8]||(e[8]=t("i",{class:"bi bi-key-fill"},null,-1)),u(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),[[h,this.server.apiKey]])]),t("div",N,[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,k(this.getHandshakeTime),1),this.refreshing?(i(),n("div",z,e[11]||(e[11]=[t("i",{class:"bi bi-arrow-clockwise"},null,-1)]))):(i(),n("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 F=g(U,[["render",W],["__scopeId","data-v-ed7817c7"]]),H={name:"RemoteServerList",setup(){return{store:S()}},components:{LocaleText:L,RemoteServer:F}},J={class:"w-100 mt-3"},Z={class:"d-flex align-items-center mb-3"},Q={class:"mb-0"},X={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"}},Y={key:0,class:"text-muted m-auto"};function ee(s,e,d,c,a,p){const o=f("LocaleText"),v=f("RemoteServer");return i(),n("div",J,[t("div",Z,[t("h5",Q,[l(o,{t:"Server List"})]),t("button",{onClick:e[0]||(e[0]=b=>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)),l(o,{t:"Server"})])]),t("div",X,[(i(!0),n(T,null,C(this.store.CrossServerConfiguration.ServerList,(b,r)=>(i(),$(v,{onSetActiveServer:I=>this.store.setActiveCrossServer(r),onDelete:I=>this.store.deleteCrossServerConfiguration(r),key:r,server:b},null,8,["onSetActiveServer","onDelete","server"]))),128)),Object.keys(this.store.CrossServerConfiguration.ServerList).length===0?(i(),n("h6",Y,[l(o,{t:"Click"}),e[2]||(e[2]=t("i",{class:"bi bi-plus-circle-fill mx-1"},null,-1)),l(o,{t:"to add your server"})])):_("",!0)])])}const te=g(H,[["render",ee]]),se={name:"signInInput",methods:{GetLocale:m},props:{id:"",data:"",type:"",placeholder:""},computed:{getLocaleText(){return m(this.placeholder)}}},oe=["type","id","name","placeholder"];function ie(s,e,d,c,a,p){return u((i(),n("input",{type:d.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,oe)),[[E,this.data[this.id]]])}const re=g(se,[["render",ie]]),ne={name:"signInTOTP",methods:{GetLocale:m},props:{data:""},computed:{getLocaleText(){return m("OTP from your authenticator")}}},ae=["placeholder"];function le(s,e,d,c,a,p){return u((i(),n("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,ae)),[[h,this.data.totp]])}const de=g(ne,[["render",le]]),ue={name:"signin",components:{SignInTOTP:de,SignInInput:re,LocaleText:L,RemoteServerList:te,Message:P},async setup(){const s=S();let e="dark",d=!1,c;return s.IsElectronApp||await Promise.all([y("/api/getDashboardTheme",{},a=>{e=a.data}),y("/api/isTotpEnabled",{},a=>{d=a.data}),y("/api/getDashboardVersion",{},a=>{c=a.data})]),s.removeActiveCrossServer(),{store:s,theme:e,totpEnabled:d,version:c}},data(){return{data:{username:"",password:"",totp:""},loginError:!1,loginErrorMessage:"",loading:!1}},computed:{getMessages(){return this.store.Messages.filter(s=>s.show)},applyLocale(s){return m(s)},formValid(){return this.data.username&&this.data.password&&(this.totpEnabled&&this.data.totp||!this.totpEnabled)}},methods:{GetLocale:m,async auth(){this.formValid?(this.loading=!0,await R("/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.store.newMessage("Server",s.message,"danger"),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"))})}}},ce=["data-bs-theme"],me={class:"login-box m-auto"},he={class:"m-auto signInContainer",style:{width:"700px"}},pe={class:"mb-0 text-body"},fe={class:"form-floating mb-2"},ge=["disabled"],be={for:"floatingInput",class:"d-flex"},ve={class:"form-floating mb-2"},ye=["disabled"],xe={for:"floatingInput",class:"d-flex"},_e={key:0,class:"form-floating mb-2"},$e=["disabled"],we={for:"floatingInput",class:"d-flex"},ke=["disabled"],Se={key:0,class:"d-flex w-100"},Te={key:1,class:"d-flex w-100 align-items-center"},Ce={key:2,class:"d-flex mt-3"},Le={class:"form-check form-switch ms-auto"},Ie=["disabled"],Ee={class:"form-check-label",for:"flexSwitchCheckChecked"},Me={class:"text-muted pb-3 d-block w-100 text-center mt-3"},Ve={class:"messageCentre text-body position-absolute d-flex"};function De(s,e,d,c,a,p){const o=f("LocaleText"),v=f("RemoteServerList"),b=f("Message");return i(),n("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",me,[t("div",he,[t("h4",pe,[l(o,{t:"Welcome to"})]),e[10]||(e[10]=t("span",{class:"dashboardLogo display-3"},[t("strong",null,"WGDashboard")],-1)),this.store.CrossServerConfiguration.Enable?(i(),$(v,{key:1})):(i(),n("form",{key:0,onSubmit:e[3]||(e[3]=r=>{r.preventDefault(),this.auth()}),class:"mt-3"},[t("div",fe,[u(t("input",{type:"text",required:"",disabled:a.loading,"onUpdate:modelValue":e[0]||(e[0]=r=>this.data.username=r),name:"username",autocomplete:"username",autofocus:"",class:"form-control rounded-3",id:"username",placeholder:"Username"},null,8,ge),[[h,this.data.username]]),t("label",be,[e[5]||(e[5]=t("i",{class:"bi bi-person-circle me-2"},null,-1)),l(o,{t:"Username"})])]),t("div",ve,[u(t("input",{type:"password",required:"",disabled:a.loading,autocomplete:"current-password","onUpdate:modelValue":e[1]||(e[1]=r=>this.data.password=r),class:"form-control rounded-3",id:"password",placeholder:"Password"},null,8,ye),[[h,this.data.password]]),t("label",xe,[e[6]||(e[6]=t("i",{class:"bi bi-key-fill me-2"},null,-1)),l(o,{t:"Password"})])]),this.totpEnabled?(i(),n("div",_e,[u(t("input",{type:"text",id:"totp",required:"",disabled:a.loading,placeholder:"totp","onUpdate:modelValue":e[2]||(e[2]=r=>this.data.totp=r),class:"form-control rounded-3",maxlength:"6",inputmode:"numeric",autocomplete:"one-time-code"},null,8,$e),[[h,this.data.totp]]),t("label",we,[e[7]||(e[7]=t("i",{class:"bi bi-lock-fill me-2"},null,-1)),l(o,{t:"OTP from your authenticator"})])])):_("",!0),t("button",{class:"btn btn-lg btn-dark ms-auto mt-5 w-100 d-flex btn-brand signInBtn rounded-3",disabled:this.loading||!this.formValid,ref:"signInBtn"},[this.loading?(i(),n("span",Te,[l(o,{t:"Signing In..."}),e[9]||(e[9]=t("span",{class:"spinner-border ms-auto spinner-border-sm",role:"status"},null,-1))])):(i(),n("span",Se,[l(o,{t:"Sign In"}),e[8]||(e[8]=t("i",{class:"ms-auto bi bi-chevron-right"},null,-1))]))],8,ke)],32)),this.store.IsElectronApp?_("",!0):(i(),n("div",Ce,[t("div",Le,[u(t("input",{"onUpdate:modelValue":e[4]||(e[4]=r=>this.store.CrossServerConfiguration.Enable=r),disabled:a.loading,class:"form-check-input",type:"checkbox",role:"switch",id:"flexSwitchCheckChecked"},null,8,Ie),[[M,this.store.CrossServerConfiguration.Enable]]),t("label",Ee,[l(o,{t:"Access Remote Server"})])])]))])]),t("small",Me,[V(" WGDashboard "+k(this.version)+" | Developed with ❤️ by ",1),e[11]||(e[11]=t("a",{href:"https://github.com/donaldzou",target:"_blank"},[t("strong",null,"Donald Zou")],-1))]),t("div",Ve,[l(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:D(()=>[(i(!0),n(T,null,C(p.getMessages.slice().reverse(),r=>(i(),$(b,{message:r,key:r.id},null,8,["message"]))),128))]),_:1})])],8,ce)}const qe=g(ue,[["render",De],["__scopeId","data-v-80e20da4"]]);export{qe as default}; +import{_ as g,G as m,c as n,a as t,m as u,y as h,n as w,t as k,f as i,D as S,b as l,h as f,d as _,F as T,i as C,k as $,a0 as E,v as M,e as V,w as D,T as A,z as R,g as y}from"./index-Upsq31TS.js";import{M as P}from"./message-fHdP79jF.js";import{d as x}from"./dayjs.min-Cdu5c05l.js";import{L}from"./localeText-n7rlaTGQ.js";const U={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=x(),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=x(),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?`${x().subtract(this.startTime).millisecond()}ms`:this.refreshing?m("Pinging..."):this.errorMsg?this.errorMsg:"N/A"}}},q={class:"card rounded-3"},B={class:"card-body"},O={class:"d-flex gap-3 w-100 remoteServerContainer"},j={class:"d-flex gap-3 align-items-center flex-grow-1"},G={class:"d-flex gap-3 align-items-center flex-grow-1"},N={class:"d-flex gap-2 button-group"},K={class:"card-footer gap-2 d-flex align-items-center"},z={key:0,class:"spin ms-auto text-primary-emphasis"};function W(s,e,d,c,a,p){return i(),n("div",q,[t("div",B,[t("div",O,[t("div",j,[e[7]||(e[7]=t("i",{class:"bi bi-server"},null,-1)),u(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),[[h,this.server.host]])]),t("div",G,[e[8]||(e[8]=t("i",{class:"bi bi-key-fill"},null,-1)),u(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),[[h,this.server.apiKey]])]),t("div",N,[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,k(this.getHandshakeTime),1),this.refreshing?(i(),n("div",z,e[11]||(e[11]=[t("i",{class:"bi bi-arrow-clockwise"},null,-1)]))):(i(),n("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 F=g(U,[["render",W],["__scopeId","data-v-ed7817c7"]]),H={name:"RemoteServerList",setup(){return{store:S()}},components:{LocaleText:L,RemoteServer:F}},J={class:"w-100 mt-3"},Z={class:"d-flex align-items-center mb-3"},Q={class:"mb-0"},X={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"}},Y={key:0,class:"text-muted m-auto"};function ee(s,e,d,c,a,p){const o=f("LocaleText"),v=f("RemoteServer");return i(),n("div",J,[t("div",Z,[t("h5",Q,[l(o,{t:"Server List"})]),t("button",{onClick:e[0]||(e[0]=b=>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)),l(o,{t:"Server"})])]),t("div",X,[(i(!0),n(T,null,C(this.store.CrossServerConfiguration.ServerList,(b,r)=>(i(),$(v,{onSetActiveServer:I=>this.store.setActiveCrossServer(r),onDelete:I=>this.store.deleteCrossServerConfiguration(r),key:r,server:b},null,8,["onSetActiveServer","onDelete","server"]))),128)),Object.keys(this.store.CrossServerConfiguration.ServerList).length===0?(i(),n("h6",Y,[l(o,{t:"Click"}),e[2]||(e[2]=t("i",{class:"bi bi-plus-circle-fill mx-1"},null,-1)),l(o,{t:"to add your server"})])):_("",!0)])])}const te=g(H,[["render",ee]]),se={name:"signInInput",methods:{GetLocale:m},props:{id:"",data:"",type:"",placeholder:""},computed:{getLocaleText(){return m(this.placeholder)}}},oe=["type","id","name","placeholder"];function ie(s,e,d,c,a,p){return u((i(),n("input",{type:d.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,oe)),[[E,this.data[this.id]]])}const re=g(se,[["render",ie]]),ne={name:"signInTOTP",methods:{GetLocale:m},props:{data:""},computed:{getLocaleText(){return m("OTP from your authenticator")}}},ae=["placeholder"];function le(s,e,d,c,a,p){return u((i(),n("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,ae)),[[h,this.data.totp]])}const de=g(ne,[["render",le]]),ue={name:"signin",components:{SignInTOTP:de,SignInInput:re,LocaleText:L,RemoteServerList:te,Message:P},async setup(){const s=S();let e="dark",d=!1,c;return s.IsElectronApp||await Promise.all([y("/api/getDashboardTheme",{},a=>{e=a.data}),y("/api/isTotpEnabled",{},a=>{d=a.data}),y("/api/getDashboardVersion",{},a=>{c=a.data})]),s.removeActiveCrossServer(),{store:s,theme:e,totpEnabled:d,version:c}},data(){return{data:{username:"",password:"",totp:""},loginError:!1,loginErrorMessage:"",loading:!1}},computed:{getMessages(){return this.store.Messages.filter(s=>s.show)},applyLocale(s){return m(s)},formValid(){return this.data.username&&this.data.password&&(this.totpEnabled&&this.data.totp||!this.totpEnabled)}},methods:{GetLocale:m,async auth(){this.formValid?(this.loading=!0,await R("/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.store.newMessage("Server",s.message,"danger"),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"))})}}},ce=["data-bs-theme"],me={class:"login-box m-auto"},he={class:"m-auto signInContainer",style:{width:"700px"}},pe={class:"mb-0 text-body"},fe={class:"form-floating mb-2"},ge=["disabled"],be={for:"floatingInput",class:"d-flex"},ve={class:"form-floating mb-2"},ye=["disabled"],xe={for:"floatingInput",class:"d-flex"},_e={key:0,class:"form-floating mb-2"},$e=["disabled"],we={for:"floatingInput",class:"d-flex"},ke=["disabled"],Se={key:0,class:"d-flex w-100"},Te={key:1,class:"d-flex w-100 align-items-center"},Ce={key:2,class:"d-flex mt-3"},Le={class:"form-check form-switch ms-auto"},Ie=["disabled"],Ee={class:"form-check-label",for:"flexSwitchCheckChecked"},Me={class:"text-muted pb-3 d-block w-100 text-center mt-3"},Ve={class:"messageCentre text-body position-absolute d-flex"};function De(s,e,d,c,a,p){const o=f("LocaleText"),v=f("RemoteServerList"),b=f("Message");return i(),n("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",me,[t("div",he,[t("h4",pe,[l(o,{t:"Welcome to"})]),e[10]||(e[10]=t("span",{class:"dashboardLogo display-3"},[t("strong",null,"WGDashboard")],-1)),this.store.CrossServerConfiguration.Enable?(i(),$(v,{key:1})):(i(),n("form",{key:0,onSubmit:e[3]||(e[3]=r=>{r.preventDefault(),this.auth()}),class:"mt-3"},[t("div",fe,[u(t("input",{type:"text",required:"",disabled:a.loading,"onUpdate:modelValue":e[0]||(e[0]=r=>this.data.username=r),name:"username",autocomplete:"username",autofocus:"",class:"form-control rounded-3",id:"username",placeholder:"Username"},null,8,ge),[[h,this.data.username]]),t("label",be,[e[5]||(e[5]=t("i",{class:"bi bi-person-circle me-2"},null,-1)),l(o,{t:"Username"})])]),t("div",ve,[u(t("input",{type:"password",required:"",disabled:a.loading,autocomplete:"current-password","onUpdate:modelValue":e[1]||(e[1]=r=>this.data.password=r),class:"form-control rounded-3",id:"password",placeholder:"Password"},null,8,ye),[[h,this.data.password]]),t("label",xe,[e[6]||(e[6]=t("i",{class:"bi bi-key-fill me-2"},null,-1)),l(o,{t:"Password"})])]),this.totpEnabled?(i(),n("div",_e,[u(t("input",{type:"text",id:"totp",required:"",disabled:a.loading,placeholder:"totp","onUpdate:modelValue":e[2]||(e[2]=r=>this.data.totp=r),class:"form-control rounded-3",maxlength:"6",inputmode:"numeric",autocomplete:"one-time-code"},null,8,$e),[[h,this.data.totp]]),t("label",we,[e[7]||(e[7]=t("i",{class:"bi bi-lock-fill me-2"},null,-1)),l(o,{t:"OTP from your authenticator"})])])):_("",!0),t("button",{class:"btn btn-lg btn-dark ms-auto mt-5 w-100 d-flex btn-brand signInBtn rounded-3",disabled:this.loading||!this.formValid,ref:"signInBtn"},[this.loading?(i(),n("span",Te,[l(o,{t:"Signing In..."}),e[9]||(e[9]=t("span",{class:"spinner-border ms-auto spinner-border-sm",role:"status"},null,-1))])):(i(),n("span",Se,[l(o,{t:"Sign In"}),e[8]||(e[8]=t("i",{class:"ms-auto bi bi-chevron-right"},null,-1))]))],8,ke)],32)),this.store.IsElectronApp?_("",!0):(i(),n("div",Ce,[t("div",Le,[u(t("input",{"onUpdate:modelValue":e[4]||(e[4]=r=>this.store.CrossServerConfiguration.Enable=r),disabled:a.loading,class:"form-check-input",type:"checkbox",role:"switch",id:"flexSwitchCheckChecked"},null,8,Ie),[[M,this.store.CrossServerConfiguration.Enable]]),t("label",Ee,[l(o,{t:"Access Remote Server"})])])]))])]),t("small",Me,[V(" WGDashboard "+k(this.version)+" | Developed with ❤️ by ",1),e[11]||(e[11]=t("a",{href:"https://github.com/donaldzou",target:"_blank"},[t("strong",null,"Donald Zou")],-1))]),t("div",Ve,[l(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:D(()=>[(i(!0),n(T,null,C(p.getMessages.slice().reverse(),r=>(i(),$(b,{message:r,key:r.id},null,8,["message"]))),128))]),_:1})])],8,ce)}const qe=g(ue,[["render",De],["__scopeId","data-v-80e20da4"]]);export{qe as default}; diff --git a/src/static/app/dist/assets/storageMount.vue_vue_type_style_index_0_scoped_9509d7a0_lang-B4kEtj1e.js b/src/static/app/dist/assets/storageMount.vue_vue_type_style_index_0_scoped_9509d7a0_lang-BYo2xYes.js similarity index 93% rename from src/static/app/dist/assets/storageMount.vue_vue_type_style_index_0_scoped_9509d7a0_lang-B4kEtj1e.js rename to src/static/app/dist/assets/storageMount.vue_vue_type_style_index_0_scoped_9509d7a0_lang-BYo2xYes.js index 720b1ed..8ed9304 100644 --- a/src/static/app/dist/assets/storageMount.vue_vue_type_style_index_0_scoped_9509d7a0_lang-B4kEtj1e.js +++ b/src/static/app/dist/assets/storageMount.vue_vue_type_style_index_0_scoped_9509d7a0_lang-BYo2xYes.js @@ -1 +1 @@ -import{_ as b,p as m,q as p,r as v,c as t,f as r,b as f,w as g,d as x,n as C,s as n,a as l,t as d,j as w}from"./index-BaGiSoQe.js";const y={class:"text-muted me-2"},_={class:"fw-bold"},k={__name:"cpuCore",props:{core_number:Number,percentage:Number,align:Boolean,square:Boolean},setup(e){m(c=>({"2ec4d3bc":o.value}));const u=e,s=v(!1),o=p(()=>u.square?"40px":"25px");return(c,a)=>(r(),t("div",{class:"flex-grow-1 square rounded-3 border position-relative p-2",onMouseenter:a[0]||(a[0]=i=>s.value=!0),onMouseleave:a[1]||(a[1]=i=>s.value=!1),style:n({"background-color":`rgb(13 110 253 / ${e.percentage*10}%)`})},[f(w,{name:"zoomReversed"},{default:g(()=>[s.value?(r(),t("div",{key:0,style:n([{"white-space":"nowrap"},{top:o.value}]),class:C(["floatingLabel z-3 border position-absolute d-block p-1 px-2 bg-body text-body rounded-3 border shadow d-flex",[e.align?"end-0":"start-0"]])},[l("small",y," Core #"+d(e.core_number+1),1),l("small",_,d(e.percentage)+"% ",1)],6)):x("",!0)]),_:1})],36))}},B=b(k,[["__scopeId","data-v-2ad535bb"]]);export{B as C}; +import{_ as b,p as m,q as p,r as v,c as t,f as r,b as f,w as g,d as x,n as C,s as n,a as l,t as d,j as w}from"./index-Upsq31TS.js";const y={class:"text-muted me-2"},_={class:"fw-bold"},k={__name:"cpuCore",props:{core_number:Number,percentage:Number,align:Boolean,square:Boolean},setup(e){m(c=>({"2ec4d3bc":o.value}));const u=e,s=v(!1),o=p(()=>u.square?"40px":"25px");return(c,a)=>(r(),t("div",{class:"flex-grow-1 square rounded-3 border position-relative p-2",onMouseenter:a[0]||(a[0]=i=>s.value=!0),onMouseleave:a[1]||(a[1]=i=>s.value=!1),style:n({"background-color":`rgb(13 110 253 / ${e.percentage*10}%)`})},[f(w,{name:"zoomReversed"},{default:g(()=>[s.value?(r(),t("div",{key:0,style:n([{"white-space":"nowrap"},{top:o.value}]),class:C(["floatingLabel z-3 border position-absolute d-block p-1 px-2 bg-body text-body rounded-3 border shadow d-flex",[e.align?"end-0":"start-0"]])},[l("small",y," Core #"+d(e.core_number+1),1),l("small",_,d(e.percentage)+"% ",1)],6)):x("",!0)]),_:1})],36))}},B=b(k,[["__scopeId","data-v-2ad535bb"]]);export{B as C}; diff --git a/src/static/app/dist/assets/systemStatus-DDN6iwt_.js b/src/static/app/dist/assets/systemStatus-2BLdvfJq.js similarity index 96% rename from src/static/app/dist/assets/systemStatus-DDN6iwt_.js rename to src/static/app/dist/assets/systemStatus-2BLdvfJq.js index ad32144..b3f4a0a 100644 --- a/src/static/app/dist/assets/systemStatus-DDN6iwt_.js +++ b/src/static/app/dist/assets/systemStatus-2BLdvfJq.js @@ -1 +1 @@ -import{_ as E,c as o,f as l,a as e,t as d,D as j,q as _,o as H,x as W,r as p,g as q,G as b,b as r,s as h,F as v,i as g,u as N,w as O,T as $,d as y,e as x,k as C}from"./index-BaGiSoQe.js";import{L as c}from"./localeText-DkjxgEQB.js";import{C as F}from"./storageMount.vue_vue_type_style_index_0_scoped_9509d7a0_lang-B4kEtj1e.js";import{C as z,L as A,B as J,a as K,b as Q,c as X,p as Y,d as Z,e as ee,f as se,P as te,i as ae,g as M}from"./index-hZ1DcfGk.js";import{d as le}from"./dayjs.min-H8Pjp0HL.js";const oe={class:"mb-1 d-flex gap-5"},re={class:"title"},ne={class:"ms-auto"},ie={__name:"process",props:["process","cpu"],setup(m){return(w,s)=>(l(),o("div",oe,[e("small",re,[s[0]||(s[0]=e("i",{class:"bi bi-code-square me-2"},null,-1)),e("samp",null,d(m.process.command?m.process.command:m.process.name),1)]),e("small",ne,d(Math.round((m.process.percent+Number.EPSILON)*10)/10)+"% ",1)]))}},D=E(ie,[["__scopeId","data-v-ffe5ad8f"]]),ce={class:"text-body row g-2 mb-2"},de={class:"col-sm-6"},ue={class:"card rounded-3 h-100 shadow"},_e={class:"card-body p-4"},pe={class:"d-flex flex-column gap-3"},he={class:"d-flex flex-column gap-3",style:{height:"130px"}},me={class:"d-flex align-items-center"},be={class:"text-muted mb-0"},ve={class:"ms-auto mb-0"},ge={key:0},ye={key:1,class:"spinner-border"},fe={class:"progress",role:"progressbar",style:{height:"10px"}},xe={class:"d-flex gap-1"},we={class:"d-flex align-items-center"},ke={class:"mb-0"},Ne={class:"mb-0 ms-auto text-muted"},Ce={class:"position-relative"},Me={class:"col-sm-6"},Se={class:"card rounded-3 h-100 shadow"},Ie={class:"card-body p-4"},Pe={class:"d-flex flex-column gap-3"},Ue={class:"d-flex flex-column gap-3",style:{height:"130px"}},Le={class:"d-flex align-items-center"},Be={class:"text-muted"},Oe={class:"ms-auto"},$e={key:0},De={key:1,class:"spinner-border"},Ee={class:"progress",role:"progressbar",style:{height:"10px"}},Ve={class:"d-flex align-items-center"},Re={class:"mb-0"},Ge={class:"mb-0 ms-auto"},Te={class:"progress",role:"progressbar",style:{height:"10px"}},je={class:"d-flex align-items-center"},He={class:"mb-0"},We={class:"mb-0 ms-auto text-muted"},qe={class:"position-relative"},Fe={class:"col-sm-12"},ze={class:"card rounded-3 h-100 shadow"},Ae={class:"card-body p-4 d-flex gap-3 flex-column"},Je={class:"d-flex align-items-center gap-3"},Ke={class:"text-muted mb-0"},Qe={class:"ms-auto mb-0"},Xe={key:0},Ye={key:1,class:"spinner-border"},Ze={key:0,class:"mb-0 text-end"},es={class:"text-info"},ss={class:"text-warning"},ts={key:0,class:"row g-3"},as={class:"col-sm-6 fadeIn"},ls={class:"d-flex mb-2"},os={class:"mb-0"},rs={class:"mb-0 ms-auto d-flex gap-2"},ns={class:"text-info"},is={class:"text-warning"},cs={class:"progress",role:"progressbar",style:{height:"10px"}},ds={class:"col-sm-12"},us={class:"card rounded-3 h-100 shadow"},_s={class:"card-body p-4 d-flex gap-3 flex-column"},ps={class:"d-flex align-items-center"},hs={class:"text-muted mb-0"},ms={class:"ms-auto mb-0"},bs={key:0},vs={key:1,class:"spinner-border"},gs={class:"row g-3"},ys={class:"col-sm-6 fadeIn"},fs={class:"d-flex mb-2"},xs={class:"mb-0"},ws={class:"mb-0 ms-auto d-flex gap-2"},ks={class:"text-success"},Ns={class:"progress",role:"progressbar",style:{height:"20px"}},Cs={__name:"systemStatus",setup(m){const w=j(),s=_(()=>w.SystemStatus);let S=null;z.register(A,J,K,Q,X,Y,Z,ee,se,te,ae),H(()=>{L(),S=setInterval(()=>{L()},5e3)}),W(()=>{clearInterval(S)});const f=p([]),I=p([]),P=p([]),U=p([]),i=p({bytes_recv:[],bytes_sent:[]}),u=p({bytes_recv:[],bytes_sent:[]}),L=()=>{q("/api/systemStatus",{},n=>{if(f.value.push(le().format("HH:mm:ss A")),w.SystemStatus=n.data,I.value.push(n.data.CPU.cpu_percent),P.value.push(n.data.Memory.VirtualMemory.percent),U.value.push(n.data.Memory.SwapMemory.percent),i.value.bytes_recv.push(Object.values(n.data.NetworkInterfaces).map(t=>t.bytes_recv).reduce((t,a)=>t+a)),i.value.bytes_sent.push(Object.values(n.data.NetworkInterfaces).map(t=>t.bytes_sent).reduce((t,a)=>t+a)),i.value.bytes_recv.length===1&&i.value.bytes_sent.length===1)u.value.bytes_recv.push(0),u.value.bytes_sent.push(0);else{let t=i.value.bytes_recv[i.value.bytes_recv.length-1]-i.value.bytes_recv[i.value.bytes_recv.length-2],a=i.value.bytes_sent[i.value.bytes_sent.length-1]-i.value.bytes_sent[i.value.bytes_sent.length-2];u.value.bytes_recv.push(Math.round((t/1024e3+Number.EPSILON)*1e4)/1e4),u.value.bytes_sent.push(Math.round((a/1024e3+Number.EPSILON)*1e4)/1e4)}})},B=_(()=>({responsive:!0,plugins:{legend:{display:!0},tooltip:{callbacks:{label:n=>`${n.formattedValue}%`}}},scales:{x:{ticks:{display:!1},grid:{display:!1}},y:{ticks:{callback:(n,t)=>`${n}%`},grid:{display:!1}}}})),V=_(()=>({responsive:!0,plugins:{legend:{display:!0},tooltip:{callbacks:{label:n=>`${n.formattedValue} MB/s`}}},scales:{x:{ticks:{display:!1},grid:{display:!1}},y:{ticks:{callback:(n,t)=>`${n} MB/s`},grid:{display:!1}}}})),R=_(()=>({labels:[...f.value],datasets:[{label:b("CPU Usage"),data:[...I.value],fill:"start",backgroundColor:"#0d6efd90",borderColor:"#0d6efd",tension:0,pointRadius:2,borderWidth:1}]})),G=_(()=>({labels:[...f.value],datasets:[{label:b("Memory Usage"),data:[...P.value],fill:1,borderColor:"#0dcaf0",backgroundColor:"#0dcaf090",tension:0,pointRadius:2,borderWidth:1},{label:b("Swap Memory Usage"),data:[...U.value],fill:"start",backgroundColor:"#ffc10790",borderColor:"#ffc107",tension:0,pointRadius:2,borderWidth:1}]})),T=_(()=>({labels:[...f.value],datasets:[{label:b("Real Time Received Data Usage"),data:[...u.value.bytes_recv],fill:"origin",borderColor:"#0dcaf0",backgroundColor:"#0dcaf090",tension:0,pointRadius:2,borderWidth:1},{label:b("Real Time Sent Data Usage"),data:[...u.value.bytes_sent],fill:"origin",backgroundColor:"#ffc10790",borderColor:"#ffc107",tension:0,pointRadius:2,borderWidth:1}]}));return(n,t)=>(l(),o("div",ce,[e("div",de,[e("div",ue,[e("div",_e,[e("div",pe,[e("div",he,[e("div",me,[e("h3",be,[t[0]||(t[0]=e("i",{class:"bi bi-cpu-fill me-2"},null,-1)),r(c,{t:"CPU"})]),e("h3",ve,[s.value?(l(),o("span",ge,d(s.value.CPU.cpu_percent)+"% ",1)):(l(),o("span",ye))])]),e("div",fe,[e("div",{class:"progress-bar",style:h({width:`${s.value?.CPU.cpu_percent}%`})},null,4)]),e("div",xe,[(l(!0),o(v,null,g(s.value?.CPU.cpu_percent_per_cpu,(a,k)=>(l(),C(F,{square:!0,key:k,align:k+1>Math.round(s.value?.CPU.cpu_percent_per_cpu.length/2),core_number:k,percentage:a},null,8,["align","core_number","percentage"]))),128))])]),r(N(M),{options:B.value,data:R.value,style:{width:"100%",height:"200px","max-height":"200px"}},null,8,["options","data"]),e("div",we,[e("h5",ke,[r(c,{t:"Processes"})]),e("h6",Ne,[e("small",null,[r(c,{t:"CPU Usage"})])])]),t[1]||(t[1]=e("hr",{class:"my-1"},null,-1)),e("div",Ce,[r($,{name:"process"},{default:O(()=>[(l(!0),o(v,null,g(s.value?.Processes.cpu_top_10,a=>(l(),C(D,{key:a.pid,cpu:!0,process:a},null,8,["process"]))),128))]),_:1})])])])])]),e("div",Me,[e("div",Se,[e("div",Ie,[e("div",Pe,[e("div",Ue,[e("div",Le,[e("h3",Be,[t[2]||(t[2]=e("i",{class:"bi bi-memory me-2"},null,-1)),r(c,{t:"Memory"})]),e("h3",Oe,[s.value?(l(),o("span",$e,d(s.value?.Memory.VirtualMemory.percent)+"% ",1)):(l(),o("span",De))])]),e("div",Ee,[e("div",{class:"progress-bar bg-info",style:h({width:`${s.value?.Memory.VirtualMemory.percent}%`})},null,4)]),e("div",Ve,[e("h6",Re,[r(c,{t:"Swap Memory"})]),e("h6",Ge,d(s.value?.Memory.SwapMemory.percent)+"%",1)]),e("div",Te,[e("div",{class:"progress-bar bg-info-subtle",style:h({width:`${s.value?.Memory.SwapMemory.percent}%`})},null,4)])]),r(N(M),{options:B.value,data:G.value,style:{width:"100%",height:"200px","max-height":"200px"}},null,8,["options","data"]),e("div",je,[e("h5",He,[r(c,{t:"Processes"})]),e("h6",We,[e("small",null,[r(c,{t:"Memory Usage"})])])]),t[3]||(t[3]=e("hr",{class:"my-1"},null,-1)),e("div",qe,[r($,{name:"process"},{default:O(()=>[(l(!0),o(v,null,g(s.value?.Processes.memory_top_10,a=>(l(),C(D,{key:a.pid,process:a},null,8,["process"]))),128))]),_:1})])])])])]),e("div",Fe,[e("div",ze,[e("div",Ae,[e("div",Je,[e("h3",Ke,[t[4]||(t[4]=e("i",{class:"bi bi-ethernet me-2"},null,-1)),r(c,{t:"Network"})]),e("h3",Qe,[s.value?(l(),o("span",Xe,[r(c,{t:Object.keys(s.value.NetworkInterfaces).length+" Interface"+(Object.keys(s.value.NetworkInterfaces).length>1?"s":"")},null,8,["t"])])):(l(),o("span",Ye))])]),e("div",null,[s.value?(l(),o("h5",Ze,[e("span",es,[t[5]||(t[5]=e("i",{class:"bi bi-arrow-down"},null,-1)),x(" "+d(u.value.bytes_recv[u.value.bytes_recv.length-1])+" MB/s ",1)]),e("span",ss,[t[6]||(t[6]=e("i",{class:"bi bi-arrow-up"},null,-1)),x(" "+d(u.value.bytes_sent[u.value.bytes_sent.length-1])+" MB/s ",1)])])):y("",!0)]),r(N(M),{options:V.value,data:T.value,style:{width:"100%",height:"300px","max-height":"300px"}},null,8,["options","data"]),s.value?(l(),o("div",ts,[(l(!0),o(v,null,g(Object.keys(s.value.NetworkInterfaces).sort(),a=>(l(),o("div",as,[e("div",ls,[e("h6",os,[e("samp",null,d(a),1)]),e("h6",rs,[e("span",ns,[t[7]||(t[7]=e("i",{class:"bi bi-arrow-down"},null,-1)),x(" "+d(Math.round((s.value.NetworkInterfaces[a].bytes_recv/1024e6+Number.EPSILON)*1e4)/1e4)+" GB ",1)]),e("span",is,[t[8]||(t[8]=e("i",{class:"bi bi-arrow-up"},null,-1)),x(" "+d(Math.round((s.value.NetworkInterfaces[a].bytes_sent/1024e6+Number.EPSILON)*1e4)/1e4)+" GB ",1)])])]),e("div",cs,[s.value.NetworkInterfaces[a].bytes_recv>0?(l(),o("div",{key:0,class:"progress-bar bg-info",style:h({width:`${s.value.NetworkInterfaces[a].bytes_recv/(s.value.NetworkInterfaces[a].bytes_sent+s.value.NetworkInterfaces[a].bytes_recv)*100}%`})},null,4)):y("",!0),s.value.NetworkInterfaces[a].bytes_sent>0?(l(),o("div",{key:1,class:"progress-bar bg-warning",style:h({width:`${s.value.NetworkInterfaces[a].bytes_sent/(s.value.NetworkInterfaces[a].bytes_sent+s.value.NetworkInterfaces[a].bytes_recv)*100}%`})},null,4)):y("",!0)])]))),256))])):y("",!0)])])]),e("div",ds,[e("div",us,[e("div",_s,[e("div",ps,[e("h3",hs,[t[9]||(t[9]=e("i",{class:"bi bi-device-ssd-fill me-2"},null,-1)),r(c,{t:"Storage"})]),e("h3",ms,[s.value?(l(),o("span",bs,[r(c,{t:s.value.Disks.length+" Partition"+(s.value.Disks.length>1?"s":"")},null,8,["t"])])):(l(),o("span",vs))])]),e("div",gs,[s.value?(l(!0),o(v,{key:0},g(s.value.Disks,a=>(l(),o("div",ys,[e("div",fs,[e("h6",xs,[e("samp",null,d(a.mountPoint),1)]),e("h6",ws,[e("span",ks,[r(c,{t:Math.round((a.used/1024e6+Number.EPSILON)*100)/100+" / "+Math.round((a.total/1024e6+Number.EPSILON)*100)/100+" GB Used"},null,8,["t"])])])]),e("div",Ns,[e("div",{class:"progress-bar bg-success",style:h({width:`${a.percent}%`})},d(a.percent)+"% ",5)])]))),256)):y("",!0)])])])])]))}},Ls=E(Cs,[["__scopeId","data-v-977dc46d"]]);export{Ls as default}; +import{_ as E,c as o,f as l,a as e,t as d,D as j,q as _,o as H,x as W,r as p,g as q,G as b,b as r,s as h,F as v,i as g,u as N,w as O,T as $,d as y,e as x,k as C}from"./index-Upsq31TS.js";import{L as c}from"./localeText-n7rlaTGQ.js";import{C as F}from"./storageMount.vue_vue_type_style_index_0_scoped_9509d7a0_lang-BYo2xYes.js";import{C as z,L as A,B as J,a as K,b as Q,c as X,p as Y,d as Z,e as ee,f as se,P as te,i as ae,g as M}from"./index-C5CQcTdj.js";import{d as le}from"./dayjs.min-Cdu5c05l.js";const oe={class:"mb-1 d-flex gap-5"},re={class:"title"},ne={class:"ms-auto"},ie={__name:"process",props:["process","cpu"],setup(m){return(w,s)=>(l(),o("div",oe,[e("small",re,[s[0]||(s[0]=e("i",{class:"bi bi-code-square me-2"},null,-1)),e("samp",null,d(m.process.command?m.process.command:m.process.name),1)]),e("small",ne,d(Math.round((m.process.percent+Number.EPSILON)*10)/10)+"% ",1)]))}},D=E(ie,[["__scopeId","data-v-ffe5ad8f"]]),ce={class:"text-body row g-2 mb-2"},de={class:"col-sm-6"},ue={class:"card rounded-3 h-100 shadow"},_e={class:"card-body p-4"},pe={class:"d-flex flex-column gap-3"},he={class:"d-flex flex-column gap-3",style:{height:"130px"}},me={class:"d-flex align-items-center"},be={class:"text-muted mb-0"},ve={class:"ms-auto mb-0"},ge={key:0},ye={key:1,class:"spinner-border"},fe={class:"progress",role:"progressbar",style:{height:"10px"}},xe={class:"d-flex gap-1"},we={class:"d-flex align-items-center"},ke={class:"mb-0"},Ne={class:"mb-0 ms-auto text-muted"},Ce={class:"position-relative"},Me={class:"col-sm-6"},Se={class:"card rounded-3 h-100 shadow"},Ie={class:"card-body p-4"},Pe={class:"d-flex flex-column gap-3"},Ue={class:"d-flex flex-column gap-3",style:{height:"130px"}},Le={class:"d-flex align-items-center"},Be={class:"text-muted"},Oe={class:"ms-auto"},$e={key:0},De={key:1,class:"spinner-border"},Ee={class:"progress",role:"progressbar",style:{height:"10px"}},Ve={class:"d-flex align-items-center"},Re={class:"mb-0"},Ge={class:"mb-0 ms-auto"},Te={class:"progress",role:"progressbar",style:{height:"10px"}},je={class:"d-flex align-items-center"},He={class:"mb-0"},We={class:"mb-0 ms-auto text-muted"},qe={class:"position-relative"},Fe={class:"col-sm-12"},ze={class:"card rounded-3 h-100 shadow"},Ae={class:"card-body p-4 d-flex gap-3 flex-column"},Je={class:"d-flex align-items-center gap-3"},Ke={class:"text-muted mb-0"},Qe={class:"ms-auto mb-0"},Xe={key:0},Ye={key:1,class:"spinner-border"},Ze={key:0,class:"mb-0 text-end"},es={class:"text-info"},ss={class:"text-warning"},ts={key:0,class:"row g-3"},as={class:"col-sm-6 fadeIn"},ls={class:"d-flex mb-2"},os={class:"mb-0"},rs={class:"mb-0 ms-auto d-flex gap-2"},ns={class:"text-info"},is={class:"text-warning"},cs={class:"progress",role:"progressbar",style:{height:"10px"}},ds={class:"col-sm-12"},us={class:"card rounded-3 h-100 shadow"},_s={class:"card-body p-4 d-flex gap-3 flex-column"},ps={class:"d-flex align-items-center"},hs={class:"text-muted mb-0"},ms={class:"ms-auto mb-0"},bs={key:0},vs={key:1,class:"spinner-border"},gs={class:"row g-3"},ys={class:"col-sm-6 fadeIn"},fs={class:"d-flex mb-2"},xs={class:"mb-0"},ws={class:"mb-0 ms-auto d-flex gap-2"},ks={class:"text-success"},Ns={class:"progress",role:"progressbar",style:{height:"20px"}},Cs={__name:"systemStatus",setup(m){const w=j(),s=_(()=>w.SystemStatus);let S=null;z.register(A,J,K,Q,X,Y,Z,ee,se,te,ae),H(()=>{L(),S=setInterval(()=>{L()},5e3)}),W(()=>{clearInterval(S)});const f=p([]),I=p([]),P=p([]),U=p([]),i=p({bytes_recv:[],bytes_sent:[]}),u=p({bytes_recv:[],bytes_sent:[]}),L=()=>{q("/api/systemStatus",{},n=>{if(f.value.push(le().format("HH:mm:ss A")),w.SystemStatus=n.data,I.value.push(n.data.CPU.cpu_percent),P.value.push(n.data.Memory.VirtualMemory.percent),U.value.push(n.data.Memory.SwapMemory.percent),i.value.bytes_recv.push(Object.values(n.data.NetworkInterfaces).map(t=>t.bytes_recv).reduce((t,a)=>t+a)),i.value.bytes_sent.push(Object.values(n.data.NetworkInterfaces).map(t=>t.bytes_sent).reduce((t,a)=>t+a)),i.value.bytes_recv.length===1&&i.value.bytes_sent.length===1)u.value.bytes_recv.push(0),u.value.bytes_sent.push(0);else{let t=i.value.bytes_recv[i.value.bytes_recv.length-1]-i.value.bytes_recv[i.value.bytes_recv.length-2],a=i.value.bytes_sent[i.value.bytes_sent.length-1]-i.value.bytes_sent[i.value.bytes_sent.length-2];u.value.bytes_recv.push(Math.round((t/1024e3+Number.EPSILON)*1e4)/1e4),u.value.bytes_sent.push(Math.round((a/1024e3+Number.EPSILON)*1e4)/1e4)}})},B=_(()=>({responsive:!0,plugins:{legend:{display:!0},tooltip:{callbacks:{label:n=>`${n.formattedValue}%`}}},scales:{x:{ticks:{display:!1},grid:{display:!1}},y:{ticks:{callback:(n,t)=>`${n}%`},grid:{display:!1}}}})),V=_(()=>({responsive:!0,plugins:{legend:{display:!0},tooltip:{callbacks:{label:n=>`${n.formattedValue} MB/s`}}},scales:{x:{ticks:{display:!1},grid:{display:!1}},y:{ticks:{callback:(n,t)=>`${n} MB/s`},grid:{display:!1}}}})),R=_(()=>({labels:[...f.value],datasets:[{label:b("CPU Usage"),data:[...I.value],fill:"start",backgroundColor:"#0d6efd90",borderColor:"#0d6efd",tension:0,pointRadius:2,borderWidth:1}]})),G=_(()=>({labels:[...f.value],datasets:[{label:b("Memory Usage"),data:[...P.value],fill:1,borderColor:"#0dcaf0",backgroundColor:"#0dcaf090",tension:0,pointRadius:2,borderWidth:1},{label:b("Swap Memory Usage"),data:[...U.value],fill:"start",backgroundColor:"#ffc10790",borderColor:"#ffc107",tension:0,pointRadius:2,borderWidth:1}]})),T=_(()=>({labels:[...f.value],datasets:[{label:b("Real Time Received Data Usage"),data:[...u.value.bytes_recv],fill:"origin",borderColor:"#0dcaf0",backgroundColor:"#0dcaf090",tension:0,pointRadius:2,borderWidth:1},{label:b("Real Time Sent Data Usage"),data:[...u.value.bytes_sent],fill:"origin",backgroundColor:"#ffc10790",borderColor:"#ffc107",tension:0,pointRadius:2,borderWidth:1}]}));return(n,t)=>(l(),o("div",ce,[e("div",de,[e("div",ue,[e("div",_e,[e("div",pe,[e("div",he,[e("div",me,[e("h3",be,[t[0]||(t[0]=e("i",{class:"bi bi-cpu-fill me-2"},null,-1)),r(c,{t:"CPU"})]),e("h3",ve,[s.value?(l(),o("span",ge,d(s.value.CPU.cpu_percent)+"% ",1)):(l(),o("span",ye))])]),e("div",fe,[e("div",{class:"progress-bar",style:h({width:`${s.value?.CPU.cpu_percent}%`})},null,4)]),e("div",xe,[(l(!0),o(v,null,g(s.value?.CPU.cpu_percent_per_cpu,(a,k)=>(l(),C(F,{square:!0,key:k,align:k+1>Math.round(s.value?.CPU.cpu_percent_per_cpu.length/2),core_number:k,percentage:a},null,8,["align","core_number","percentage"]))),128))])]),r(N(M),{options:B.value,data:R.value,style:{width:"100%",height:"200px","max-height":"200px"}},null,8,["options","data"]),e("div",we,[e("h5",ke,[r(c,{t:"Processes"})]),e("h6",Ne,[e("small",null,[r(c,{t:"CPU Usage"})])])]),t[1]||(t[1]=e("hr",{class:"my-1"},null,-1)),e("div",Ce,[r($,{name:"process"},{default:O(()=>[(l(!0),o(v,null,g(s.value?.Processes.cpu_top_10,a=>(l(),C(D,{key:a.pid,cpu:!0,process:a},null,8,["process"]))),128))]),_:1})])])])])]),e("div",Me,[e("div",Se,[e("div",Ie,[e("div",Pe,[e("div",Ue,[e("div",Le,[e("h3",Be,[t[2]||(t[2]=e("i",{class:"bi bi-memory me-2"},null,-1)),r(c,{t:"Memory"})]),e("h3",Oe,[s.value?(l(),o("span",$e,d(s.value?.Memory.VirtualMemory.percent)+"% ",1)):(l(),o("span",De))])]),e("div",Ee,[e("div",{class:"progress-bar bg-info",style:h({width:`${s.value?.Memory.VirtualMemory.percent}%`})},null,4)]),e("div",Ve,[e("h6",Re,[r(c,{t:"Swap Memory"})]),e("h6",Ge,d(s.value?.Memory.SwapMemory.percent)+"%",1)]),e("div",Te,[e("div",{class:"progress-bar bg-info-subtle",style:h({width:`${s.value?.Memory.SwapMemory.percent}%`})},null,4)])]),r(N(M),{options:B.value,data:G.value,style:{width:"100%",height:"200px","max-height":"200px"}},null,8,["options","data"]),e("div",je,[e("h5",He,[r(c,{t:"Processes"})]),e("h6",We,[e("small",null,[r(c,{t:"Memory Usage"})])])]),t[3]||(t[3]=e("hr",{class:"my-1"},null,-1)),e("div",qe,[r($,{name:"process"},{default:O(()=>[(l(!0),o(v,null,g(s.value?.Processes.memory_top_10,a=>(l(),C(D,{key:a.pid,process:a},null,8,["process"]))),128))]),_:1})])])])])]),e("div",Fe,[e("div",ze,[e("div",Ae,[e("div",Je,[e("h3",Ke,[t[4]||(t[4]=e("i",{class:"bi bi-ethernet me-2"},null,-1)),r(c,{t:"Network"})]),e("h3",Qe,[s.value?(l(),o("span",Xe,[r(c,{t:Object.keys(s.value.NetworkInterfaces).length+" Interface"+(Object.keys(s.value.NetworkInterfaces).length>1?"s":"")},null,8,["t"])])):(l(),o("span",Ye))])]),e("div",null,[s.value?(l(),o("h5",Ze,[e("span",es,[t[5]||(t[5]=e("i",{class:"bi bi-arrow-down"},null,-1)),x(" "+d(u.value.bytes_recv[u.value.bytes_recv.length-1])+" MB/s ",1)]),e("span",ss,[t[6]||(t[6]=e("i",{class:"bi bi-arrow-up"},null,-1)),x(" "+d(u.value.bytes_sent[u.value.bytes_sent.length-1])+" MB/s ",1)])])):y("",!0)]),r(N(M),{options:V.value,data:T.value,style:{width:"100%",height:"300px","max-height":"300px"}},null,8,["options","data"]),s.value?(l(),o("div",ts,[(l(!0),o(v,null,g(Object.keys(s.value.NetworkInterfaces).sort(),a=>(l(),o("div",as,[e("div",ls,[e("h6",os,[e("samp",null,d(a),1)]),e("h6",rs,[e("span",ns,[t[7]||(t[7]=e("i",{class:"bi bi-arrow-down"},null,-1)),x(" "+d(Math.round((s.value.NetworkInterfaces[a].bytes_recv/1024e6+Number.EPSILON)*1e4)/1e4)+" GB ",1)]),e("span",is,[t[8]||(t[8]=e("i",{class:"bi bi-arrow-up"},null,-1)),x(" "+d(Math.round((s.value.NetworkInterfaces[a].bytes_sent/1024e6+Number.EPSILON)*1e4)/1e4)+" GB ",1)])])]),e("div",cs,[s.value.NetworkInterfaces[a].bytes_recv>0?(l(),o("div",{key:0,class:"progress-bar bg-info",style:h({width:`${s.value.NetworkInterfaces[a].bytes_recv/(s.value.NetworkInterfaces[a].bytes_sent+s.value.NetworkInterfaces[a].bytes_recv)*100}%`})},null,4)):y("",!0),s.value.NetworkInterfaces[a].bytes_sent>0?(l(),o("div",{key:1,class:"progress-bar bg-warning",style:h({width:`${s.value.NetworkInterfaces[a].bytes_sent/(s.value.NetworkInterfaces[a].bytes_sent+s.value.NetworkInterfaces[a].bytes_recv)*100}%`})},null,4)):y("",!0)])]))),256))])):y("",!0)])])]),e("div",ds,[e("div",us,[e("div",_s,[e("div",ps,[e("h3",hs,[t[9]||(t[9]=e("i",{class:"bi bi-device-ssd-fill me-2"},null,-1)),r(c,{t:"Storage"})]),e("h3",ms,[s.value?(l(),o("span",bs,[r(c,{t:s.value.Disks.length+" Partition"+(s.value.Disks.length>1?"s":"")},null,8,["t"])])):(l(),o("span",vs))])]),e("div",gs,[s.value?(l(!0),o(v,{key:0},g(s.value.Disks,a=>(l(),o("div",ys,[e("div",fs,[e("h6",xs,[e("samp",null,d(a.mountPoint),1)]),e("h6",ws,[e("span",ks,[r(c,{t:Math.round((a.used/1024e6+Number.EPSILON)*100)/100+" / "+Math.round((a.total/1024e6+Number.EPSILON)*100)/100+" GB Used"},null,8,["t"])])])]),e("div",Ns,[e("div",{class:"progress-bar bg-success",style:h({width:`${a.percent}%`})},d(a.percent)+"% ",5)])]))),256)):y("",!0)])])])])]))}},Ls=E(Cs,[["__scopeId","data-v-977dc46d"]]);export{Ls as default}; diff --git a/src/static/app/dist/assets/totp-DKJseL4c.js b/src/static/app/dist/assets/totp-C8MmYKOe.js similarity index 94% rename from src/static/app/dist/assets/totp-DKJseL4c.js rename to src/static/app/dist/assets/totp-C8MmYKOe.js index b04ce8f..50046eb 100644 --- a/src/static/app/dist/assets/totp-DKJseL4c.js +++ b/src/static/app/dist/assets/totp-C8MmYKOe.js @@ -1 +1 @@ -import{_ as h,c as m,a as t,b as i,h as d,t as p,m as f,y as _,k as r,w as c,z as b,D as v,g,f as n}from"./index-BaGiSoQe.js";import{Q as x}from"./browser-BHoir7AQ.js";import{L as y}from"./localeText-DkjxgEQB.js";const T={name:"totp",components:{LocaleText:y},async setup(){const s=v();let e="";return await g("/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)?b("/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"],L={class:"m-auto text-body",style:{width:"500px"}},w={class:"d-flex flex-column"},C={class:"dashboardLogo display-4"},M={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"}},D={for:"totp",class:"mb-2"},R={class:"text-muted"},S={class:"form-group mb-2"},q=["disabled"],A={class:"invalid-feedback"},E={class:"valid-feedback"},F={class:"d-flex gap-3 mt-5 flex-column"};function Q(s,e,a,G,N,W){const o=d("LocaleText"),l=d("RouterLink");return n(),m("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",L,[t("div",w,[t("div",null,[t("h1",C,[i(o,{t:"Multi-Factor Authentication (MFA)"})]),t("p",M,[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",$,p(this.l),1)],8,B)]),t("label",D,[t("small",R,[i(o,{t:"2. Enter the TOTP generated by your authenticator to verify"})])]),t("div",S,[f(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,q),[[_,this.totp]]),t("div",A,[i(o,{t:this.totpInvalidMessage},null,8,["t"])]),t("div",E,[i(o,{t:"TOTP verified!"})])])]),e[4]||(e[4]=t("hr",null,null,-1)),t("div",F,[this.verified?(n(),r(l,{key:1,to:"/",class:"btn btn-dark btn-lg d-flex btn-brand shadow align-items-center flex-grow-1 rounded-3"},{default:c(()=>[i(o,{t:"Complete"}),e[3]||(e[3]=t("i",{class:"bi bi-chevron-right ms-auto"},null,-1))]),_:1,__:[3]})):(n(),r(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:c(()=>[i(o,{t:"I don't need MFA"}),e[2]||(e[2]=t("i",{class:"bi bi-chevron-right ms-auto"},null,-1))]),_:1,__:[2]}))])])])],8,k)}const j=h(T,[["render",Q]]);export{j as default}; +import{_ as h,c as m,a as t,b as i,h as d,t as p,m as f,y as _,k as r,w as c,z as b,D as v,g,f as n}from"./index-Upsq31TS.js";import{Q as x}from"./browser-Bcujcoof.js";import{L as y}from"./localeText-n7rlaTGQ.js";const T={name:"totp",components:{LocaleText:y},async setup(){const s=v();let e="";return await g("/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)?b("/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"],L={class:"m-auto text-body",style:{width:"500px"}},w={class:"d-flex flex-column"},C={class:"dashboardLogo display-4"},M={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"}},D={for:"totp",class:"mb-2"},R={class:"text-muted"},S={class:"form-group mb-2"},q=["disabled"],A={class:"invalid-feedback"},E={class:"valid-feedback"},F={class:"d-flex gap-3 mt-5 flex-column"};function Q(s,e,a,G,N,W){const o=d("LocaleText"),l=d("RouterLink");return n(),m("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",L,[t("div",w,[t("div",null,[t("h1",C,[i(o,{t:"Multi-Factor Authentication (MFA)"})]),t("p",M,[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",$,p(this.l),1)],8,B)]),t("label",D,[t("small",R,[i(o,{t:"2. Enter the TOTP generated by your authenticator to verify"})])]),t("div",S,[f(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,q),[[_,this.totp]]),t("div",A,[i(o,{t:this.totpInvalidMessage},null,8,["t"])]),t("div",E,[i(o,{t:"TOTP verified!"})])])]),e[4]||(e[4]=t("hr",null,null,-1)),t("div",F,[this.verified?(n(),r(l,{key:1,to:"/",class:"btn btn-dark btn-lg d-flex btn-brand shadow align-items-center flex-grow-1 rounded-3"},{default:c(()=>[i(o,{t:"Complete"}),e[3]||(e[3]=t("i",{class:"bi bi-chevron-right ms-auto"},null,-1))]),_:1,__:[3]})):(n(),r(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:c(()=>[i(o,{t:"I don't need MFA"}),e[2]||(e[2]=t("i",{class:"bi bi-chevron-right ms-auto"},null,-1))]),_:1,__:[2]}))])])])],8,k)}const j=h(T,[["render",Q]]);export{j as default}; diff --git a/src/static/app/dist/assets/traceroute-CJHxAi5E.js b/src/static/app/dist/assets/traceroute-D1D2nqzU.js similarity index 96% rename from src/static/app/dist/assets/traceroute-CJHxAi5E.js rename to src/static/app/dist/assets/traceroute-D1D2nqzU.js index 31a6ac7..3fa61f0 100644 --- a/src/static/app/dist/assets/traceroute-CJHxAi5E.js +++ b/src/static/app/dist/assets/traceroute-D1D2nqzU.js @@ -1 +1 @@ -import{_ as h,c as o,a as t,b as n,h as r,m as g,y as b,C as y,w as c,j as u,g as f,W as x,f as l,e as v,F as m,i as _,s as k,n as T,t as i}from"./index-BaGiSoQe.js";import{O as A}from"./osmap-DImWbvYV.js";import{L as w}from"./localeText-DkjxgEQB.js";const R={name:"traceroute",components:{LocaleText:w,OSMap:A},data(){return{tracing:!1,ipAddress:void 0,tracerouteResult:void 0}},setup(){return{store:x()}},methods:{execute(){this.ipAddress&&(this.tracing=!0,this.tracerouteResult=void 0,f("/api/traceroute/execute",{ipAddress:this.ipAddress},d=>{d.status?this.tracerouteResult=d.data:this.store.newMessage("Server",d.message,"danger"),this.tracing=!1}))}}},M={class:"mt-md-5 mt-3 text-body"},S={class:"container-md"},$={class:"mb-3 text-body"},C={class:"d-flex gap-2 mb-3 flex-column"},L={class:"flex-grow-1"},P={class:"mb-1 text-muted",for:"ipAddress"},O=["disabled"],V=["disabled"],B={key:0,class:"d-block"},I={key:1,class:"d-block"},N={class:"position-relative"},z={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},J={key:1};function Q(d,s,X,Y,Z,tt){const a=r("LocaleText"),p=r("OSMap");return l(),o("div",M,[t("div",S,[t("h3",$,[n(a,{t:"Traceroute"})]),t("div",C,[t("div",L,[t("label",P,[t("small",null,[n(a,{t:"Enter IP Address / Hostname"})])]),g(t("input",{disabled:this.tracing,id:"ipAddress",class:"form-control rounded-3","onUpdate:modelValue":s[0]||(s[0]=e=>this.ipAddress=e),onKeyup:s[1]||(s[1]=y(e=>this.execute(),["enter"])),type:"text"},null,40,O),[[b,this.ipAddress]])]),t("button",{class:"btn btn-primary rounded-3 position-relative flex-grow-1",disabled:this.tracing||!this.ipAddress,onClick:s[2]||(s[2]=e=>this.execute())},[n(u,{name:"slide"},{default:c(()=>[this.tracing?(l(),o("span",I,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)]))):(l(),o("span",B,s[3]||(s[3]=[t("i",{class:"bi bi-person-walking me-2"},null,-1),v("Trace! ")])))]),_:1})],8,V)]),t("div",N,[n(u,{name:"ping"},{default:c(()=>[this.tracerouteResult?(l(),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(a,{t:"Hop"})]),t("th",H,[n(a,{t:"IP Address"})]),t("th",K,[n(a,{t:"Average RTT (ms)"})]),t("th",W,[n(a,{t:"Min RTT (ms)"})]),t("th",j,[n(a,{t:"Max RTT (ms)"})]),t("th",U,[n(a,{t:"Geolocation"})])])]),t("tbody",null,[(l(!0),o(m,null,_(this.tracerouteResult,(e,et)=>(l(),o("tr",null,[t("td",null,[t("small",null,i(e.hop),1)]),t("td",null,[t("small",null,[t("samp",null,i(e.ip),1)])]),t("td",null,[t("small",null,[t("samp",null,i(e.avg_rtt),1)])]),t("td",null,[t("small",null,[t("samp",null,i(e.min_rtt),1)])]),t("td",null,[t("small",null,[t("samp",null,i(e.max_rtt),1)])]),t("td",null,[e.geo.city&&e.geo.country?(l(),o("span",q,[t("small",null,i(e.geo.city)+", "+i(e.geo.country),1)])):(l(),o("span",J," - "))])]))),256))])])])])):(l(),o("div",z,[s[5]||(s[5]=t("div",{class:"pingPlaceholder bg-body-secondary rounded-3 mb-3",style:{height:"300px !important"}},null,-1)),(l(),o(m,null,_(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 lt=h(R,[["render",Q],["__scopeId","data-v-3e75b4d4"]]);export{lt as default}; +import{_ as h,c as o,a as t,b as n,h as r,m as g,y as b,C as y,w as c,j as u,g as f,W as x,f as l,e as v,F as m,i as _,s as k,n as T,t as i}from"./index-Upsq31TS.js";import{O as A}from"./osmap-DlPRtGR3.js";import{L as w}from"./localeText-n7rlaTGQ.js";const R={name:"traceroute",components:{LocaleText:w,OSMap:A},data(){return{tracing:!1,ipAddress:void 0,tracerouteResult:void 0}},setup(){return{store:x()}},methods:{execute(){this.ipAddress&&(this.tracing=!0,this.tracerouteResult=void 0,f("/api/traceroute/execute",{ipAddress:this.ipAddress},d=>{d.status?this.tracerouteResult=d.data:this.store.newMessage("Server",d.message,"danger"),this.tracing=!1}))}}},M={class:"mt-md-5 mt-3 text-body"},S={class:"container-md"},$={class:"mb-3 text-body"},C={class:"d-flex gap-2 mb-3 flex-column"},L={class:"flex-grow-1"},P={class:"mb-1 text-muted",for:"ipAddress"},O=["disabled"],V=["disabled"],B={key:0,class:"d-block"},I={key:1,class:"d-block"},N={class:"position-relative"},z={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},J={key:1};function Q(d,s,X,Y,Z,tt){const a=r("LocaleText"),p=r("OSMap");return l(),o("div",M,[t("div",S,[t("h3",$,[n(a,{t:"Traceroute"})]),t("div",C,[t("div",L,[t("label",P,[t("small",null,[n(a,{t:"Enter IP Address / Hostname"})])]),g(t("input",{disabled:this.tracing,id:"ipAddress",class:"form-control rounded-3","onUpdate:modelValue":s[0]||(s[0]=e=>this.ipAddress=e),onKeyup:s[1]||(s[1]=y(e=>this.execute(),["enter"])),type:"text"},null,40,O),[[b,this.ipAddress]])]),t("button",{class:"btn btn-primary rounded-3 position-relative flex-grow-1",disabled:this.tracing||!this.ipAddress,onClick:s[2]||(s[2]=e=>this.execute())},[n(u,{name:"slide"},{default:c(()=>[this.tracing?(l(),o("span",I,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)]))):(l(),o("span",B,s[3]||(s[3]=[t("i",{class:"bi bi-person-walking me-2"},null,-1),v("Trace! ")])))]),_:1})],8,V)]),t("div",N,[n(u,{name:"ping"},{default:c(()=>[this.tracerouteResult?(l(),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(a,{t:"Hop"})]),t("th",H,[n(a,{t:"IP Address"})]),t("th",K,[n(a,{t:"Average RTT (ms)"})]),t("th",W,[n(a,{t:"Min RTT (ms)"})]),t("th",j,[n(a,{t:"Max RTT (ms)"})]),t("th",U,[n(a,{t:"Geolocation"})])])]),t("tbody",null,[(l(!0),o(m,null,_(this.tracerouteResult,(e,et)=>(l(),o("tr",null,[t("td",null,[t("small",null,i(e.hop),1)]),t("td",null,[t("small",null,[t("samp",null,i(e.ip),1)])]),t("td",null,[t("small",null,[t("samp",null,i(e.avg_rtt),1)])]),t("td",null,[t("small",null,[t("samp",null,i(e.min_rtt),1)])]),t("td",null,[t("small",null,[t("samp",null,i(e.max_rtt),1)])]),t("td",null,[e.geo.city&&e.geo.country?(l(),o("span",q,[t("small",null,i(e.geo.city)+", "+i(e.geo.country),1)])):(l(),o("span",J," - "))])]))),256))])])])])):(l(),o("div",z,[s[5]||(s[5]=t("div",{class:"pingPlaceholder bg-body-secondary rounded-3 mb-3",style:{height:"300px !important"}},null,-1)),(l(),o(m,null,_(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 lt=h(R,[["render",Q],["__scopeId","data-v-3e75b4d4"]]);export{lt as default}; diff --git a/src/static/app/dist/assets/vue-datepicker-CI9txOl2.js b/src/static/app/dist/assets/vue-datepicker-CI9txOl2.js deleted file mode 100644 index bb3bfe3..0000000 --- a/src/static/app/dist/assets/vue-datepicker-CI9txOl2.js +++ /dev/null @@ -1 +0,0 @@ -import{J as tt,a7 as Kt,r as K,a8 as ha,o as at,a0 as mt,Y as ia,H as yt,q as j,c as z,b as vt,k as Oe,a9 as ot,i as Fe,w as De,aa as ie,ab as Ze,ac as it,u as i,ad as Je,ae as Yn,d as G,j as da,l as Na,af as Ur,n as xe,ag as Qr,E as ka,V as jr,ah as Cn,f as T,a as ge,a5 as ga,F as ke,s as pt,t as lt,P as Gr,ai as Kr,e as Rt,N as Xr,O as Zr,aj as Jr,m as Aa,ak as Ya,C as el}from"./index-BaGiSoQe.js";const Jn=6048e5,tl=864e5,al=6e4,er=36e5,nl=1e3,Rn=Symbol.for("constructDateFrom");function Se(e,t){return typeof e=="function"?e(t):e&&typeof e=="object"&&Rn in e?e[Rn](t):e instanceof Date?new e.constructor(t):new Date(t)}function pe(e,t){return Se(t||e,e)}function ft(e,t,n){const a=pe(e,n?.in);return isNaN(t)?Se(n?.in||e,NaN):(t&&a.setDate(a.getDate()+t),a)}function bt(e,t,n){const a=pe(e,n?.in);if(isNaN(t))return Se(e,NaN);if(!t)return a;const r=a.getDate(),o=Se(e,a.getTime());o.setMonth(a.getMonth()+t+1,0);const s=o.getDate();return r>=s?o:(a.setFullYear(o.getFullYear(),o.getMonth(),r),a)}function tr(e,t,n){const{years:a=0,months:r=0,weeks:o=0,days:s=0,hours:c=0,minutes:d=0,seconds:P=0}=t,v=pe(e,n?.in),m=r||a?bt(v,r+a*12):v,p=s||o?ft(m,s+o*7):m,x=d+c*60,R=(P+x*60)*1e3;return Se(e,+p+R)}function rl(e,t,n){return Se(e,+pe(e)+t)}function ll(e,t,n){return rl(e,t*er)}let ol={};function Xt(){return ol}function _t(e,t){const n=Xt(),a=t?.weekStartsOn??t?.locale?.options?.weekStartsOn??n.weekStartsOn??n.locale?.options?.weekStartsOn??0,r=pe(e,t?.in),o=r.getDay(),s=(o=o.getTime()?a+1:n.getTime()>=c.getTime()?a:a-1}function Ca(e){const t=pe(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 Da(e,...t){const n=Se.bind(null,t.find(a=>typeof a=="object"));return t.map(n)}function Sn(e,t){const n=pe(e,t?.in);return n.setHours(0,0,0,0),n}function nr(e,t,n){const[a,r]=Da(n?.in,e,t),o=Sn(a),s=Sn(r),c=+o-Ca(o),d=+s-Ca(s);return Math.round((c-d)/tl)}function sl(e,t){const n=ar(e,t),a=Se(e,0);return a.setFullYear(n,0,4),a.setHours(0,0,0,0),na(a)}function ul(e,t,n){return bt(e,t*3,n)}function mn(e,t,n){return bt(e,t*12,n)}function Nn(e,t){const n=+pe(e)-+pe(t);return n<0?-1:n>0?1:n}function rr(e){return e instanceof Date||typeof e=="object"&&Object.prototype.toString.call(e)==="[object Date]"}function pa(e){return!(!rr(e)&&typeof e!="number"||isNaN(+pe(e)))}function In(e,t){const n=pe(e,t?.in);return Math.trunc(n.getMonth()/3)+1}function il(e,t,n){const[a,r]=Da(n?.in,e,t);return a.getFullYear()-r.getFullYear()}function dl(e,t,n){const[a,r]=Da(n?.in,e,t),o=Nn(a,r),s=Math.abs(il(a,r));a.setFullYear(1584),r.setFullYear(1584);const c=Nn(a,r)===-o,d=o*(s-+c);return d===0?0:d}function lr(e,t){const[n,a]=Da(e,t.start,t.end);return{start:n,end:a}}function or(e,t){const{start:n,end:a}=lr(t?.in,e);let r=+n>+a;const o=r?+n:+a,s=r?a:n;s.setHours(0,0,0,0);let c=1;const d=[];for(;+s<=o;)d.push(Se(n,s)),s.setDate(s.getDate()+c),s.setHours(0,0,0,0);return r?d.reverse():d}function Ut(e,t){const n=pe(e,t?.in),a=n.getMonth(),r=a-a%3;return n.setMonth(r,1),n.setHours(0,0,0,0),n}function cl(e,t){const{start:n,end:a}=lr(t?.in,e);let r=+n>+a;const o=r?+Ut(n):+Ut(a);let s=Ut(r?a:n),c=1;const d=[];for(;+s<=o;)d.push(Se(n,s)),s=ul(s,c);return r?d.reverse():d}function vl(e,t){const n=pe(e,t?.in);return n.setDate(1),n.setHours(0,0,0,0),n}function sr(e,t){const n=pe(e,t?.in),a=n.getFullYear();return n.setFullYear(a+1,0,0),n.setHours(23,59,59,999),n}function wa(e,t){const n=pe(e,t?.in);return n.setFullYear(n.getFullYear(),0,1),n.setHours(0,0,0,0),n}function ur(e,t){const n=Xt(),a=t?.weekStartsOn??t?.locale?.options?.weekStartsOn??n.weekStartsOn??n.locale?.options?.weekStartsOn??0,r=pe(e,t?.in),o=r.getDay(),s=(o{let a;const r=ml[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 Qa(e){return(t={})=>{const n=t.width?String(t.width):e.defaultWidth;return e.formats[n]||e.formats[e.defaultWidth]}}const pl={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},yl={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},hl={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},gl={date:Qa({formats:pl,defaultWidth:"full"}),time:Qa({formats:yl,defaultWidth:"full"}),dateTime:Qa({formats:hl,defaultWidth:"full"})},wl={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},bl=(e,t,n,a)=>wl[e];function va(e){return(t,n)=>{const a=n?.context?String(n.context):"standalone";let r;if(a==="formatting"&&e.formattingValues){const s=e.defaultFormattingWidth||e.defaultWidth,c=n?.width?String(n.width):s;r=e.formattingValues[c]||e.formattingValues[s]}else{const s=e.defaultWidth,c=n?.width?String(n.width):e.defaultWidth;r=e.values[c]||e.values[s]}const o=e.argumentCallback?e.argumentCallback(t):t;return r[o]}}const _l={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},kl={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},Dl={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"]},xl={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"]},Ml={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"}},Pl={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"}},Tl=(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"},Ol={ordinalNumber:Tl,era:va({values:_l,defaultWidth:"wide"}),quarter:va({values:kl,defaultWidth:"wide",argumentCallback:e=>e-1}),month:va({values:Dl,defaultWidth:"wide"}),day:va({values:xl,defaultWidth:"wide"}),dayPeriod:va({values:Ml,defaultWidth:"wide",formattingValues:Pl,defaultFormattingWidth:"wide"})};function ma(e){return(t,n={})=>{const a=n.width,r=a&&e.matchPatterns[a]||e.matchPatterns[e.defaultMatchWidth],o=t.match(r);if(!o)return null;const s=o[0],c=a&&e.parsePatterns[a]||e.parsePatterns[e.defaultParseWidth],d=Array.isArray(c)?Al(c,m=>m.test(s)):$l(c,m=>m.test(s));let P;P=e.valueCallback?e.valueCallback(d):d,P=n.valueCallback?n.valueCallback(P):P;const v=t.slice(s.length);return{value:P,rest:v}}}function $l(e,t){for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t(e[n]))return n}function Al(e,t){for(let n=0;n{const a=t.match(e.matchPattern);if(!a)return null;const r=a[0],o=t.match(e.parsePattern);if(!o)return null;let s=e.valueCallback?e.valueCallback(o[0]):o[0];s=n.valueCallback?n.valueCallback(s):s;const c=t.slice(r.length);return{value:s,rest:c}}}const Cl=/^(\d+)(th|st|nd|rd)?/i,Rl=/\d+/i,Sl={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},Nl={any:[/^b/i,/^(a|c)/i]},Il={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},El={any:[/1/i,/2/i,/3/i,/4/i]},Fl={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},Bl={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]},Ll={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},Hl={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]},Vl={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},Wl={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}},zl={ordinalNumber:Yl({matchPattern:Cl,parsePattern:Rl,valueCallback:e=>parseInt(e,10)}),era:ma({matchPatterns:Sl,defaultMatchWidth:"wide",parsePatterns:Nl,defaultParseWidth:"any"}),quarter:ma({matchPatterns:Il,defaultMatchWidth:"wide",parsePatterns:El,defaultParseWidth:"any",valueCallback:e=>e+1}),month:ma({matchPatterns:Fl,defaultMatchWidth:"wide",parsePatterns:Bl,defaultParseWidth:"any"}),day:ma({matchPatterns:Ll,defaultMatchWidth:"wide",parsePatterns:Hl,defaultParseWidth:"any"}),dayPeriod:ma({matchPatterns:Vl,defaultMatchWidth:"any",parsePatterns:Wl,defaultParseWidth:"any"})},ir={code:"en-US",formatDistance:fl,formatLong:gl,formatRelative:bl,localize:Ol,match:zl,options:{weekStartsOn:0,firstWeekContainsDate:1}};function ql(e,t){const n=pe(e,t?.in);return nr(n,wa(n))+1}function fn(e,t){const n=pe(e,t?.in),a=+na(n)-+sl(n);return Math.round(a/Jn)+1}function pn(e,t){const n=pe(e,t?.in),a=n.getFullYear(),r=Xt(),o=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??r.firstWeekContainsDate??r.locale?.options?.firstWeekContainsDate??1,s=Se(t?.in||e,0);s.setFullYear(a+1,0,o),s.setHours(0,0,0,0);const c=_t(s,t),d=Se(t?.in||e,0);d.setFullYear(a,0,o),d.setHours(0,0,0,0);const P=_t(d,t);return+n>=+c?a+1:+n>=+P?a:a-1}function Ul(e,t){const n=Xt(),a=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??n.firstWeekContainsDate??n.locale?.options?.firstWeekContainsDate??1,r=pn(e,t),o=Se(t?.in||e,0);return o.setFullYear(r,0,a),o.setHours(0,0,0,0),_t(o,t)}function yn(e,t){const n=pe(e,t?.in),a=+_t(n,t)-+Ul(n,t);return Math.round(a/Jn)+1}function Re(e,t){const n=e<0?"-":"",a=Math.abs(e).toString().padStart(t,"0");return n+a}const It={y(e,t){const n=e.getFullYear(),a=n>0?n:1-n;return Re(t==="yy"?a%100:a,t.length)},M(e,t){const n=e.getMonth();return t==="M"?String(n+1):Re(n+1,2)},d(e,t){return Re(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 Re(e.getHours()%12||12,t.length)},H(e,t){return Re(e.getHours(),t.length)},m(e,t){return Re(e.getMinutes(),t.length)},s(e,t){return Re(e.getSeconds(),t.length)},S(e,t){const n=t.length,a=e.getMilliseconds(),r=Math.trunc(a*Math.pow(10,n-3));return Re(r,t.length)}},Zt={midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},Fn={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 It.y(e,t)},Y:function(e,t,n,a){const r=pn(e,a),o=r>0?r:1-r;if(t==="YY"){const s=o%100;return Re(s,2)}return t==="Yo"?n.ordinalNumber(o,{unit:"year"}):Re(o,t.length)},R:function(e,t){const n=ar(e);return Re(n,t.length)},u:function(e,t){const n=e.getFullYear();return Re(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 Re(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 Re(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 It.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 Re(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=yn(e,a);return t==="wo"?n.ordinalNumber(r,{unit:"week"}):Re(r,t.length)},I:function(e,t,n){const a=fn(e);return t==="Io"?n.ordinalNumber(a,{unit:"week"}):Re(a,t.length)},d:function(e,t,n){return t==="do"?n.ordinalNumber(e.getDate(),{unit:"date"}):It.d(e,t)},D:function(e,t,n){const a=ql(e);return t==="Do"?n.ordinalNumber(a,{unit:"dayOfYear"}):Re(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(),o=(r-a.weekStartsOn+8)%7||7;switch(t){case"e":return String(o);case"ee":return Re(o,2);case"eo":return n.ordinalNumber(o,{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(),o=(r-a.weekStartsOn+8)%7||7;switch(t){case"c":return String(o);case"cc":return Re(o,t.length);case"co":return n.ordinalNumber(o,{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 Re(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=Zt.noon:a===0?r=Zt.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=Zt.evening:a>=12?r=Zt.afternoon:a>=4?r=Zt.morning:r=Zt.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 It.h(e,t)},H:function(e,t,n){return t==="Ho"?n.ordinalNumber(e.getHours(),{unit:"hour"}):It.H(e,t)},K:function(e,t,n){const a=e.getHours()%12;return t==="Ko"?n.ordinalNumber(a,{unit:"hour"}):Re(a,t.length)},k:function(e,t,n){let a=e.getHours();return a===0&&(a=24),t==="ko"?n.ordinalNumber(a,{unit:"hour"}):Re(a,t.length)},m:function(e,t,n){return t==="mo"?n.ordinalNumber(e.getMinutes(),{unit:"minute"}):It.m(e,t)},s:function(e,t,n){return t==="so"?n.ordinalNumber(e.getSeconds(),{unit:"second"}):It.s(e,t)},S:function(e,t){return It.S(e,t)},X:function(e,t,n){const a=e.getTimezoneOffset();if(a===0)return"Z";switch(t){case"X":return Ln(a);case"XXXX":case"XX":return qt(a);case"XXXXX":case"XXX":default:return qt(a,":")}},x:function(e,t,n){const a=e.getTimezoneOffset();switch(t){case"x":return Ln(a);case"xxxx":case"xx":return qt(a);case"xxxxx":case"xxx":default:return qt(a,":")}},O:function(e,t,n){const a=e.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+Bn(a,":");case"OOOO":default:return"GMT"+qt(a,":")}},z:function(e,t,n){const a=e.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+Bn(a,":");case"zzzz":default:return"GMT"+qt(a,":")}},t:function(e,t,n){const a=Math.trunc(+e/1e3);return Re(a,t.length)},T:function(e,t,n){return Re(+e,t.length)}};function Bn(e,t=""){const n=e>0?"-":"+",a=Math.abs(e),r=Math.trunc(a/60),o=a%60;return o===0?n+String(r):n+String(r)+t+Re(o,2)}function Ln(e,t){return e%60===0?(e>0?"-":"+")+Re(Math.abs(e)/60,2):qt(e,t)}function qt(e,t=""){const n=e>0?"-":"+",a=Math.abs(e),r=Re(Math.trunc(a/60),2),o=Re(a%60,2);return n+r+t+o}const Hn=(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"})}},dr=(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"})}},Ql=(e,t)=>{const n=e.match(/(P+)(p+)?/)||[],a=n[1],r=n[2];if(!r)return Hn(e,t);let o;switch(a){case"P":o=t.dateTime({width:"short"});break;case"PP":o=t.dateTime({width:"medium"});break;case"PPP":o=t.dateTime({width:"long"});break;case"PPPP":default:o=t.dateTime({width:"full"});break}return o.replace("{{date}}",Hn(a,t)).replace("{{time}}",dr(r,t))},ln={p:dr,P:Ql},jl=/^D+$/,Gl=/^Y+$/,Kl=["D","DD","YY","YYYY"];function cr(e){return jl.test(e)}function vr(e){return Gl.test(e)}function on(e,t,n){const a=Xl(e,t,n);if(console.warn(a),Kl.includes(e))throw new RangeError(a)}function Xl(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 Zl=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,Jl=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,eo=/^'([^]*?)'?$/,to=/''/g,ao=/[a-zA-Z]/;function $t(e,t,n){const a=Xt(),r=n?.locale??a.locale??ir,o=n?.firstWeekContainsDate??n?.locale?.options?.firstWeekContainsDate??a.firstWeekContainsDate??a.locale?.options?.firstWeekContainsDate??1,s=n?.weekStartsOn??n?.locale?.options?.weekStartsOn??a.weekStartsOn??a.locale?.options?.weekStartsOn??0,c=pe(e,n?.in);if(!pa(c))throw new RangeError("Invalid time value");let d=t.match(Jl).map(v=>{const m=v[0];if(m==="p"||m==="P"){const p=ln[m];return p(v,r.formatLong)}return v}).join("").match(Zl).map(v=>{if(v==="''")return{isToken:!1,value:"'"};const m=v[0];if(m==="'")return{isToken:!1,value:no(v)};if(Fn[m])return{isToken:!0,value:v};if(m.match(ao))throw new RangeError("Format string contains an unescaped latin alphabet character `"+m+"`");return{isToken:!1,value:v}});r.localize.preprocessor&&(d=r.localize.preprocessor(c,d));const P={firstWeekContainsDate:o,weekStartsOn:s,locale:r};return d.map(v=>{if(!v.isToken)return v.value;const m=v.value;(!n?.useAdditionalWeekYearTokens&&vr(m)||!n?.useAdditionalDayOfYearTokens&&cr(m))&&on(m,t,String(e));const p=Fn[m[0]];return p(c,m,r.localize,P)}).join("")}function no(e){const t=e.match(eo);return t?t[1].replace(to,"'"):e}function ro(e,t){return pe(e,t?.in).getDay()}function lo(e,t){const n=pe(e,t?.in),a=n.getFullYear(),r=n.getMonth(),o=Se(n,0);return o.setFullYear(a,r+1,0),o.setHours(0,0,0,0),o.getDate()}function oo(){return Object.assign({},Xt())}function St(e,t){return pe(e,t?.in).getHours()}function so(e,t){const n=pe(e,t?.in).getDay();return n===0?7:n}function Ht(e,t){return pe(e,t?.in).getMinutes()}function Pe(e,t){return pe(e,t?.in).getMonth()}function ra(e){return pe(e).getSeconds()}function he(e,t){return pe(e,t?.in).getFullYear()}function Gt(e,t){return+pe(e)>+pe(t)}function la(e,t){return+pe(e)<+pe(t)}function ta(e,t){return+pe(e)==+pe(t)}function uo(e,t){const n=io(t)?new t(0):Se(t,0);return n.setFullYear(e.getFullYear(),e.getMonth(),e.getDate()),n.setHours(e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()),n}function io(e){return typeof e=="function"&&e.prototype?.constructor===e}const co=10;class mr{subPriority=0;validate(t,n){return!0}}class vo extends mr{constructor(t,n,a,r,o){super(),this.value=t,this.validateValue=n,this.setValue=a,this.priority=r,o&&(this.subPriority=o)}validate(t,n){return this.validateValue(t,this.value,n)}set(t,n,a){return this.setValue(t,n,this.value,a)}}class mo extends mr{priority=co;subPriority=-1;constructor(t,n){super(),this.context=t||(a=>Se(n,a))}set(t,n){return n.timestampIsSet?t:Se(t,uo(t,this.context))}}class Ae{run(t,n,a,r){const o=this.parse(t,n,a,r);return o?{setter:new vo(o.value,this.validate,this.set,this.priority,this.subPriority),rest:o.rest}:null}validate(t,n,a){return!0}}class fo extends Ae{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 Ue={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}/},Pt={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 Qe(e,t){return e&&{value:t(e.value),rest:e.rest}}function Le(e,t){const n=t.match(e);return n?{value:parseInt(n[0],10),rest:t.slice(n[0].length)}:null}function Tt(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,o=n[3]?parseInt(n[3],10):0,s=n[5]?parseInt(n[5],10):0;return{value:a*(r*er+o*al+s*nl),rest:t.slice(n[0].length)}}function fr(e){return Le(Ue.anyDigitsSigned,e)}function Ve(e,t){switch(e){case 1:return Le(Ue.singleDigit,t);case 2:return Le(Ue.twoDigits,t);case 3:return Le(Ue.threeDigits,t);case 4:return Le(Ue.fourDigits,t);default:return Le(new RegExp("^\\d{1,"+e+"}"),t)}}function Ra(e,t){switch(e){case 1:return Le(Ue.singleDigitSigned,t);case 2:return Le(Ue.twoDigitsSigned,t);case 3:return Le(Ue.threeDigitsSigned,t);case 4:return Le(Ue.fourDigitsSigned,t);default:return Le(new RegExp("^-?\\d{1,"+e+"}"),t)}}function hn(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 pr(e,t){const n=t>0,a=n?t:1-t;let r;if(a<=50)r=e||100;else{const o=a+50,s=Math.trunc(o/100)*100,c=e>=o%100;r=e+s-(c?100:0)}return n?r:1-r}function yr(e){return e%400===0||e%4===0&&e%100!==0}class po extends Ae{priority=130;incompatibleTokens=["Y","R","u","w","I","i","e","c","t","T"];parse(t,n,a){const r=o=>({year:o,isTwoDigitYear:n==="yy"});switch(n){case"y":return Qe(Ve(4,t),r);case"yo":return Qe(a.ordinalNumber(t,{unit:"year"}),r);default:return Qe(Ve(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 s=pr(a.year,r);return t.setFullYear(s,0,1),t.setHours(0,0,0,0),t}const o=!("era"in n)||n.era===1?a.year:1-a.year;return t.setFullYear(o,0,1),t.setHours(0,0,0,0),t}}class yo extends Ae{priority=130;parse(t,n,a){const r=o=>({year:o,isTwoDigitYear:n==="YY"});switch(n){case"Y":return Qe(Ve(4,t),r);case"Yo":return Qe(a.ordinalNumber(t,{unit:"year"}),r);default:return Qe(Ve(n.length,t),r)}}validate(t,n){return n.isTwoDigitYear||n.year>0}set(t,n,a,r){const o=pn(t,r);if(a.isTwoDigitYear){const c=pr(a.year,o);return t.setFullYear(c,0,r.firstWeekContainsDate),t.setHours(0,0,0,0),_t(t,r)}const s=!("era"in n)||n.era===1?a.year:1-a.year;return t.setFullYear(s,0,r.firstWeekContainsDate),t.setHours(0,0,0,0),_t(t,r)}incompatibleTokens=["y","R","u","Q","q","M","L","I","d","D","i","t","T"]}class ho extends Ae{priority=130;parse(t,n){return Ra(n==="R"?4:n.length,t)}set(t,n,a){const r=Se(t,0);return r.setFullYear(a,0,4),r.setHours(0,0,0,0),na(r)}incompatibleTokens=["G","y","Y","u","Q","q","M","L","w","d","D","e","c","t","T"]}class go extends Ae{priority=130;parse(t,n){return Ra(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 wo extends Ae{priority=120;parse(t,n,a){switch(n){case"Q":case"QQ":return Ve(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 bo extends Ae{priority=120;parse(t,n,a){switch(n){case"q":case"qq":return Ve(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 _o extends Ae{incompatibleTokens=["Y","R","q","Q","L","w","I","D","i","e","c","t","T"];priority=110;parse(t,n,a){const r=o=>o-1;switch(n){case"M":return Qe(Le(Ue.month,t),r);case"MM":return Qe(Ve(2,t),r);case"Mo":return Qe(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 ko extends Ae{priority=110;parse(t,n,a){const r=o=>o-1;switch(n){case"L":return Qe(Le(Ue.month,t),r);case"LL":return Qe(Ve(2,t),r);case"Lo":return Qe(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 Do(e,t,n){const a=pe(e,n?.in),r=yn(a,n)-t;return a.setDate(a.getDate()-r*7),pe(a,n?.in)}class xo extends Ae{priority=100;parse(t,n,a){switch(n){case"w":return Le(Ue.week,t);case"wo":return a.ordinalNumber(t,{unit:"week"});default:return Ve(n.length,t)}}validate(t,n){return n>=1&&n<=53}set(t,n,a,r){return _t(Do(t,a,r),r)}incompatibleTokens=["y","R","u","q","Q","M","L","I","d","D","i","t","T"]}function Mo(e,t,n){const a=pe(e,n?.in),r=fn(a,n)-t;return a.setDate(a.getDate()-r*7),a}class Po extends Ae{priority=100;parse(t,n,a){switch(n){case"I":return Le(Ue.week,t);case"Io":return a.ordinalNumber(t,{unit:"week"});default:return Ve(n.length,t)}}validate(t,n){return n>=1&&n<=53}set(t,n,a){return na(Mo(t,a))}incompatibleTokens=["y","Y","u","q","Q","M","L","w","d","D","e","c","t","T"]}const To=[31,28,31,30,31,30,31,31,30,31,30,31],Oo=[31,29,31,30,31,30,31,31,30,31,30,31];class $o extends Ae{priority=90;subPriority=1;parse(t,n,a){switch(n){case"d":return Le(Ue.date,t);case"do":return a.ordinalNumber(t,{unit:"date"});default:return Ve(n.length,t)}}validate(t,n){const a=t.getFullYear(),r=yr(a),o=t.getMonth();return r?n>=1&&n<=Oo[o]:n>=1&&n<=To[o]}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 Ao extends Ae{priority=90;subpriority=1;parse(t,n,a){switch(n){case"D":case"DD":return Le(Ue.dayOfYear,t);case"Do":return a.ordinalNumber(t,{unit:"date"});default:return Ve(n.length,t)}}validate(t,n){const a=t.getFullYear();return yr(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 gn(e,t,n){const a=Xt(),r=n?.weekStartsOn??n?.locale?.options?.weekStartsOn??a.weekStartsOn??a.locale?.options?.weekStartsOn??0,o=pe(e,n?.in),s=o.getDay(),d=(t%7+7)%7,P=7-r,v=t<0||t>6?t-(s+P)%7:(d+P)%7-(s+P)%7;return ft(o,v,n)}class Yo extends Ae{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=gn(t,a,r),t.setHours(0,0,0,0),t}incompatibleTokens=["D","i","e","c","t","T"]}class Co extends Ae{priority=90;parse(t,n,a,r){const o=s=>{const c=Math.floor((s-1)/7)*7;return(s+r.weekStartsOn+6)%7+c};switch(n){case"e":case"ee":return Qe(Ve(n.length,t),o);case"eo":return Qe(a.ordinalNumber(t,{unit:"day"}),o);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=gn(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 Ro extends Ae{priority=90;parse(t,n,a,r){const o=s=>{const c=Math.floor((s-1)/7)*7;return(s+r.weekStartsOn+6)%7+c};switch(n){case"c":case"cc":return Qe(Ve(n.length,t),o);case"co":return Qe(a.ordinalNumber(t,{unit:"day"}),o);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=gn(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 So(e,t,n){const a=pe(e,n?.in),r=so(a,n),o=t-r;return ft(a,o,n)}class No extends Ae{priority=90;parse(t,n,a){const r=o=>o===0?7:o;switch(n){case"i":case"ii":return Ve(n.length,t);case"io":return a.ordinalNumber(t,{unit:"day"});case"iii":return Qe(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 Qe(a.day(t,{width:"narrow",context:"formatting"}),r);case"iiiiii":return Qe(a.day(t,{width:"short",context:"formatting"})||a.day(t,{width:"narrow",context:"formatting"}),r);case"iiii":default:return Qe(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=So(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 Io extends Ae{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(hn(a),0,0,0),t}incompatibleTokens=["b","B","H","k","t","T"]}class Eo extends Ae{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(hn(a),0,0,0),t}incompatibleTokens=["a","B","H","k","t","T"]}class Fo extends Ae{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(hn(a),0,0,0),t}incompatibleTokens=["a","b","t","T"]}class Bo extends Ae{priority=70;parse(t,n,a){switch(n){case"h":return Le(Ue.hour12h,t);case"ho":return a.ordinalNumber(t,{unit:"hour"});default:return Ve(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 Lo extends Ae{priority=70;parse(t,n,a){switch(n){case"H":return Le(Ue.hour23h,t);case"Ho":return a.ordinalNumber(t,{unit:"hour"});default:return Ve(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 Ho extends Ae{priority=70;parse(t,n,a){switch(n){case"K":return Le(Ue.hour11h,t);case"Ko":return a.ordinalNumber(t,{unit:"hour"});default:return Ve(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 Vo extends Ae{priority=70;parse(t,n,a){switch(n){case"k":return Le(Ue.hour24h,t);case"ko":return a.ordinalNumber(t,{unit:"hour"});default:return Ve(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 Wo extends Ae{priority=60;parse(t,n,a){switch(n){case"m":return Le(Ue.minute,t);case"mo":return a.ordinalNumber(t,{unit:"minute"});default:return Ve(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 zo extends Ae{priority=50;parse(t,n,a){switch(n){case"s":return Le(Ue.second,t);case"so":return a.ordinalNumber(t,{unit:"second"});default:return Ve(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 qo extends Ae{priority=30;parse(t,n){const a=r=>Math.trunc(r*Math.pow(10,-n.length+3));return Qe(Ve(n.length,t),a)}set(t,n,a){return t.setMilliseconds(a),t}incompatibleTokens=["t","T"]}class Uo extends Ae{priority=10;parse(t,n){switch(n){case"X":return Tt(Pt.basicOptionalMinutes,t);case"XX":return Tt(Pt.basic,t);case"XXXX":return Tt(Pt.basicOptionalSeconds,t);case"XXXXX":return Tt(Pt.extendedOptionalSeconds,t);case"XXX":default:return Tt(Pt.extended,t)}}set(t,n,a){return n.timestampIsSet?t:Se(t,t.getTime()-Ca(t)-a)}incompatibleTokens=["t","T","x"]}class Qo extends Ae{priority=10;parse(t,n){switch(n){case"x":return Tt(Pt.basicOptionalMinutes,t);case"xx":return Tt(Pt.basic,t);case"xxxx":return Tt(Pt.basicOptionalSeconds,t);case"xxxxx":return Tt(Pt.extendedOptionalSeconds,t);case"xxx":default:return Tt(Pt.extended,t)}}set(t,n,a){return n.timestampIsSet?t:Se(t,t.getTime()-Ca(t)-a)}incompatibleTokens=["t","T","X"]}class jo extends Ae{priority=40;parse(t){return fr(t)}set(t,n,a){return[Se(t,a*1e3),{timestampIsSet:!0}]}incompatibleTokens="*"}class Go extends Ae{priority=20;parse(t){return fr(t)}set(t,n,a){return[Se(t,a),{timestampIsSet:!0}]}incompatibleTokens="*"}const Ko={G:new fo,y:new po,Y:new yo,R:new ho,u:new go,Q:new wo,q:new bo,M:new _o,L:new ko,w:new xo,I:new Po,d:new $o,D:new Ao,E:new Yo,e:new Co,c:new Ro,i:new No,a:new Io,b:new Eo,B:new Fo,h:new Bo,H:new Lo,K:new Ho,k:new Vo,m:new Wo,s:new zo,S:new qo,X:new Uo,x:new Qo,t:new jo,T:new Go},Xo=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,Zo=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,Jo=/^'([^]*?)'?$/,es=/''/g,ts=/\S/,as=/[a-zA-Z]/;function sn(e,t,n,a){const r=()=>Se(a?.in||n,NaN),o=oo(),s=a?.locale??o.locale??ir,c=a?.firstWeekContainsDate??a?.locale?.options?.firstWeekContainsDate??o.firstWeekContainsDate??o.locale?.options?.firstWeekContainsDate??1,d=a?.weekStartsOn??a?.locale?.options?.weekStartsOn??o.weekStartsOn??o.locale?.options?.weekStartsOn??0;if(!t)return e?r():pe(n,a?.in);const P={firstWeekContainsDate:c,weekStartsOn:d,locale:s},v=[new mo(a?.in,n)],m=t.match(Zo).map(M=>{const b=M[0];if(b in ln){const S=ln[b];return S(M,s.formatLong)}return M}).join("").match(Xo),p=[];for(let M of m){!a?.useAdditionalWeekYearTokens&&vr(M)&&on(M,t,e),!a?.useAdditionalDayOfYearTokens&&cr(M)&&on(M,t,e);const b=M[0],S=Ko[b];if(S){const{incompatibleTokens:C}=S;if(Array.isArray(C)){const U=p.find(Y=>C.includes(Y.token)||Y.token===b);if(U)throw new RangeError(`The format string mustn't contain \`${U.fullToken}\` and \`${M}\` at the same time`)}else if(S.incompatibleTokens==="*"&&p.length>0)throw new RangeError(`The format string mustn't contain \`${M}\` and any other token at the same time`);p.push({token:b,fullToken:M});const L=S.run(e,M,s.match,P);if(!L)return r();v.push(L.setter),e=L.rest}else{if(b.match(as))throw new RangeError("Format string contains an unescaped latin alphabet character `"+b+"`");if(M==="''"?M="'":b==="'"&&(M=ns(M)),e.indexOf(M)===0)e=e.slice(M.length);else return r()}}if(e.length>0&&ts.test(e))return r();const x=v.map(M=>M.priority).sort((M,b)=>b-M).filter((M,b,S)=>S.indexOf(M)===b).map(M=>v.filter(b=>b.priority===M).sort((b,S)=>S.subPriority-b.subPriority)).map(M=>M[0]);let A=pe(n,a?.in);if(isNaN(+A))return r();const R={};for(const M of x){if(!M.validate(A,P))return r();const b=M.set(A,R,P);Array.isArray(b)?(A=b[0],Object.assign(R,b[1])):A=b}return A}function ns(e){return e.match(Jo)[1].replace(es,"'")}function Vn(e,t,n){const[a,r]=Da(n?.in,e,t);return+Ut(a)==+Ut(r)}function hr(e,t,n){return ft(e,-t,n)}function gr(e,t,n){const a=pe(e,n?.in),r=a.getFullYear(),o=a.getDate(),s=Se(e,0);s.setFullYear(r,t,15),s.setHours(0,0,0,0);const c=lo(s);return a.setMonth(t,Math.min(o,c)),a}function Ne(e,t,n){let a=pe(e,n?.in);return isNaN(+a)?Se(e,NaN):(t.year!=null&&a.setFullYear(t.year),t.month!=null&&(a=gr(a,t.month)),t.date!=null&&a.setDate(t.date),t.hours!=null&&a.setHours(t.hours),t.minutes!=null&&a.setMinutes(t.minutes),t.seconds!=null&&a.setSeconds(t.seconds),t.milliseconds!=null&&a.setMilliseconds(t.milliseconds),a)}function rs(e,t,n){const a=pe(e,n?.in);return a.setHours(t),a}function wr(e,t,n){const a=pe(e,n?.in);return a.setMilliseconds(t),a}function ls(e,t,n){const a=pe(e,n?.in);return a.setMinutes(t),a}function br(e,t,n){const a=pe(e,n?.in);return a.setSeconds(t),a}function Ot(e,t,n){const a=pe(e,n?.in);return isNaN(+a)?Se(e,NaN):(a.setFullYear(t),a)}function oa(e,t,n){return bt(e,-t,n)}function os(e,t,n){const{years:a=0,months:r=0,weeks:o=0,days:s=0,hours:c=0,minutes:d=0,seconds:P=0}=t,v=oa(e,r+a*12,n),m=hr(v,s+o*7,n),p=d+c*60,A=(P+p*60)*1e3;return Se(e,+m-A)}function _r(e,t,n){return mn(e,-t,n)}function ca(){const e=Kr();return T(),z("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor","aria-hidden":"true",class:"dp__icon",role:"img",...e},[ge("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"}),ge("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"}),ge("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"}),ge("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"})])}ca.compatConfig={MODE:3};function kr(){return T(),z("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor","aria-hidden":"true",class:"dp__icon",role:"img"},[ge("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"}),ge("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"})])}kr.compatConfig={MODE:3};function wn(){return T(),z("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor","aria-hidden":"true",class:"dp__icon",role:"img"},[ge("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"})])}wn.compatConfig={MODE:3};function bn(){return T(),z("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor","aria-hidden":"true",class:"dp__icon",role:"img"},[ge("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"})])}bn.compatConfig={MODE:3};function _n(){return T(),z("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor","aria-hidden":"true",class:"dp__icon",role:"img"},[ge("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"}),ge("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"})])}_n.compatConfig={MODE:3};function kn(){return T(),z("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor","aria-hidden":"true",class:"dp__icon",role:"img"},[ge("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"})])}kn.compatConfig={MODE:3};function Dn(){return T(),z("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor","aria-hidden":"true",class:"dp__icon",role:"img"},[ge("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"})])}Dn.compatConfig={MODE:3};const dt=(e,t)=>t?new Date(e.toLocaleString("en-US",{timeZone:t})):new Date(e),xn=(e,t,n)=>un(e,t,n)||q(),ss=(e,t,n)=>{const a=t.dateInTz?dt(new Date(e),t.dateInTz):q(e);return n?et(a,!0):a},un=(e,t,n)=>{if(!e)return null;const a=n?et(q(e),!0):q(e);return t?t.exactMatch?ss(e,t,n):dt(a,t.timezone):a},us=e=>{const t=new Date(e.getFullYear(),0,1).getTimezoneOffset();return e.getTimezoneOffset(){if(!e)return 0;const n=new Date,a=new Date(n.toLocaleString("en-US",{timeZone:"UTC"})),r=new Date(n.toLocaleString("en-US",{timeZone:e})),o=(us(t??r)?r:t??r).getTimezoneOffset()/60;return(+a-+r)/(1e3*60*60)-o};var ht=(e=>(e.month="month",e.year="year",e))(ht||{}),gt=(e=>(e.top="top",e.bottom="bottom",e))(gt||{}),Qt=(e=>(e.header="header",e.calendar="calendar",e.timePicker="timePicker",e))(Qt||{}),rt=(e=>(e.month="month",e.year="year",e.calendar="calendar",e.time="time",e.minutes="minutes",e.hours="hours",e.seconds="seconds",e))(rt||{});const ds=["timestamp","date","iso"];var st=(e=>(e.up="up",e.down="down",e.left="left",e.right="right",e))(st||{}),Ee=(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))(Ee||{}),aa=(e=>(e.MONTH_AND_YEAR="MM-yyyy",e.YEAR="yyyy",e.DATE="dd-MM-yyyy",e))(aa||{});function Wn(e){return t=>{const n=new Intl.DateTimeFormat(e,{weekday:"short",timeZone:"UTC"}).format(new Date(`2017-01-0${t}T00:00:00+00:00`));return e==="ar"?n.slice(2,5):n.slice(0,2)}}function cs(e){return t=>$t(dt(new Date(`2017-01-0${t}T00:00:00+00:00`),"UTC"),"EEEEEE",{locale:e})}const vs=(e,t,n)=>{const a=[1,2,3,4,5,6,7];let r;if(e!==null)try{r=a.map(cs(e))}catch{r=a.map(Wn(t))}else r=a.map(Wn(t));const o=r.slice(0,n),s=r.slice(n+1,r.length);return[r[n]].concat(...s).concat(...o)},Mn=(e,t,n)=>{const a=[];for(let r=+e[0];r<=+e[1];r++)a.push({value:+r,text:Pr(r,t)});return n?a.reverse():a},Dr=(e,t,n)=>{const a=[1,2,3,4,5,6,7,8,9,10,11,12].map(o=>{const s=o<10?`0${o}`:o;return new Date(`2017-${s}-01T00:00:00+00:00`)});if(e!==null)try{const o=n==="long"?"LLLL":"LLL";return a.map((s,c)=>{const d=$t(dt(s,"UTC"),o,{locale:e});return{text:d.charAt(0).toUpperCase()+d.substring(1),value:c}})}catch{}const r=new Intl.DateTimeFormat(t,{month:n,timeZone:"UTC"});return a.map((o,s)=>{const c=r.format(o);return{text:c.charAt(0).toUpperCase()+c.substring(1),value:s}})},ms=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],je=e=>{const t=i(e);return t!=null&&t.$el?t?.$el:t},fs=e=>({type:"dot",...e??{}}),xr=e=>Array.isArray(e)?!!e[0]&&!!e[1]:!1,Pn={prop:e=>`"${e}" prop must be enabled!`,dateArr:e=>`You need to use array as "model-value" binding in order to support "${e}"`},Xe=e=>e,zn=e=>e===0?e:!e||isNaN(+e)?null:+e,qn=e=>e===null,Mr=e=>{if(e)return[...e.querySelectorAll("input, button, select, textarea, a[href]")][0]},ps=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 o=+n,s=+t;return a&&r?+e>o||+eo:r?+eps(e).map(n=>n.map(a=>{const{active:r,disabled:o,isBetween:s,highlighted:c}=t(a);return{...a,active:r,disabled:o,className:{dp__overlay_cell_active:r,dp__overlay_cell:!r,dp__overlay_cell_disabled:o,dp__overlay_cell_pad:!0,dp__overlay_cell_active_disabled:o&&r,dp__cell_in_between:s,"dp--highlighted":c}}})),Bt=(e,t,n=!1)=>{e&&t.allowStopPropagation&&(n&&e.stopImmediatePropagation(),e.stopPropagation())},ys=()=>["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 hs(e,t){let n=[...document.querySelectorAll(ys())];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 dn=(e,t)=>e?.querySelector(`[data-dp-element="${t}"]`),Pr=(e,t)=>new Intl.NumberFormat(t,{useGrouping:!1,style:"decimal"}).format(e),Tn=(e,t)=>$t(e,t??aa.DATE),ja=e=>Array.isArray(e),Sa=(e,t,n)=>t.get(Tn(e,n)),gs=(e,t)=>e?t?t instanceof Map?!!Sa(e,t):t(q(e)):!1:!0,ut=(e,t,n=!1,a)=>{if(e.key===Ee.enter||e.key===Ee.space)return n&&e.preventDefault(),t();if(a)return a(e)},ws=()=>"ontouchstart"in window||navigator.maxTouchPoints>0,Tr=(e,t)=>e?aa.MONTH_AND_YEAR:t?aa.YEAR:aa.DATE,Or=e=>e<10?`0${e}`:e,Un=(e,t,n,a,r,o)=>{const s=sn(e,t.slice(0,e.length),new Date,{locale:o});return pa(s)&&rr(s)?a||r?s:Ne(s,{hours:+n.hours,minutes:+n?.minutes,seconds:+n?.seconds,milliseconds:0}):null},bs=(e,t,n,a,r,o)=>{const s=Array.isArray(n)?n[0]:n;if(typeof t=="string")return Un(e,t,s,a,r,o);if(Array.isArray(t)){let c=null;for(const d of t)if(c=Un(e,d,s,a,r,o),c)break;return c}return typeof t=="function"?t(e):null},q=e=>e?new Date(e):new Date,_s=(e,t,n)=>{if(t){const r=(e.getMonth()+1).toString().padStart(2,"0"),o=e.getDate().toString().padStart(2,"0"),s=e.getHours().toString().padStart(2,"0"),c=e.getMinutes().toString().padStart(2,"0"),d=n?e.getSeconds().toString().padStart(2,"0"):"00";return`${e.getFullYear()}-${r}-${o}T${s}:${c}:${d}.000Z`}const a=Date.UTC(e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate(),e.getUTCHours(),e.getUTCMinutes(),e.getUTCSeconds());return new Date(a).toISOString()},et=(e,t)=>{const n=q(JSON.parse(JSON.stringify(e))),a=Ne(n,{hours:0,minutes:0,seconds:0,milliseconds:0});return t?vl(a):a},Lt=(e,t,n,a)=>{let r=e?q(e):q();return(t||t===0)&&(r=rs(r,+t)),(n||n===0)&&(r=ls(r,+n)),(a||a===0)&&(r=br(r,+a)),wr(r,0)},He=(e,t)=>!e||!t?!1:la(et(e),et(t)),Te=(e,t)=>!e||!t?!1:ta(et(e),et(t)),qe=(e,t)=>!e||!t?!1:Gt(et(e),et(t)),_a=(e,t,n)=>e!=null&&e[0]&&e!=null&&e[1]?qe(n,e[0])&&He(n,e[1]):e!=null&&e[0]&&t?qe(n,e[0])&&He(n,t)||He(n,e[0])&&qe(n,t):!1,wt=e=>{const t=Ne(new Date(e),{date:1});return et(t)},Ga=(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},jt=e=>({hours:St(e),minutes:Ht(e),seconds:ra(e)}),$r=(e,t)=>{if(t){const n=he(q(t));if(n>e)return 12;if(n===e)return Pe(q(t))}},Ar=(e,t)=>{if(t){const n=he(q(t));return n{if(e)return he(q(e))},Yr=(e,t)=>{const n=qe(e,t)?t:e,a=qe(t,e)?t:e;return or({start:n,end:a})},ks=e=>{const t=bt(e,1);return{month:Pe(t),year:he(t)}},Yt=(e,t)=>{const n=_t(e,{weekStartsOn:+t}),a=ur(e,{weekStartsOn:+t});return[n,a]},Cr=(e,t)=>{const n={hours:St(q()),minutes:Ht(q()),seconds:t?ra(q()):0};return Object.assign(n,e)},Ft=(e,t,n)=>[Ne(q(e),{date:1}),Ne(q(),{month:t,year:n,date:1})],Ct=(e,t,n)=>{let a=e?q(e):q();return(t||t===0)&&(a=gr(a,t)),n&&(a=Ot(a,n)),a},Rr=(e,t,n,a,r)=>{if(!a||r&&!t||!r&&!n)return!1;const o=r?bt(e,1):oa(e,1),s=[Pe(o),he(o)];return r?!xs(...s,t):!Ds(...s,n)},Ds=(e,t,n)=>He(...Ft(n,e,t))||Te(...Ft(n,e,t)),xs=(e,t,n)=>qe(...Ft(n,e,t))||Te(...Ft(n,e,t)),Sr=(e,t,n,a,r,o,s)=>{if(typeof t=="function"&&!s)return t(e);const c=n?{locale:n}:void 0;return Array.isArray(e)?`${$t(e[0],o,c)}${r&&!e[1]?"":a}${e[1]?$t(e[1],o,c):""}`:$t(e,o,c)},Jt=e=>{if(e)return null;throw new Error(Pn.prop("partial-range"))},Oa=(e,t)=>{if(t)return e();throw new Error(Pn.prop("range"))},cn=e=>Array.isArray(e)?pa(e[0])&&(e[1]?pa(e[1]):!0):e?pa(e):!1,Ms=(e,t)=>Ne(t??q(),{hours:+e.hours||0,minutes:+e.minutes||0,seconds:+e.seconds||0}),Ka=(e,t,n,a)=>{if(!e)return!0;if(a){const r=n==="max"?la(e,t):Gt(e,t),o={seconds:0,milliseconds:0};return r||ta(Ne(e,o),Ne(t,o))}return n==="max"?e.getTime()<=t.getTime():e.getTime()>=t.getTime()},Xa=(e,t,n)=>e?Ms(e,t):q(n??t),Qn=(e,t,n,a,r)=>{if(Array.isArray(a)){const s=Xa(e,a[0],t),c=Xa(e,a[1],t);return Ka(a[0],s,n,!!t)&&Ka(a[1],c,n,!!t)&&r}const o=Xa(e,a,t);return Ka(a,o,n,!!t)&&r},Za=e=>Ne(q(),jt(e)),Ps=(e,t,n)=>{if(e instanceof Map){const a=`${Or(n+1)}-${t}`;return e.size?e.has(a):!1}return typeof e=="function"?e(et(Ne(q(),{month:n,year:t}),!0)):!1},Ts=(e,t,n)=>{if(e instanceof Map){const a=`${Or(n+1)}-${t}`;return e.size?e.has(a):!0}return!0},Nr=(e,t,n)=>typeof e=="function"?e({month:t,year:n}):!!e.months.find(a=>a.month===t&&a.year===n),On=(e,t)=>typeof e=="function"?e(t):e.years.includes(t),vn=e=>`dp-${$t(e,"yyyy-MM-dd")}`,jn=(e,t)=>{const n=hr(et(t),e),a=ft(et(t),e);return{before:n,after:a}},fa=ka({menuFocused:!1,shiftKeyInMenu:!1}),Ir=()=>{const e=n=>{fa.menuFocused=n},t=n=>{fa.shiftKeyInMenu!==n&&(fa.shiftKeyInMenu=n)};return{control:j(()=>({shiftKeyInMenu:fa.shiftKeyInMenu,menuFocused:fa.menuFocused})),setMenuFocused:e,setShiftKey:t}},Ie=ka({monthYear:[],calendar:[],time:[],actionRow:[],selectionGrid:[],timePicker:{0:[],1:[]},monthPicker:[]}),Ja=K(null),$a=K(!1),en=K(!1),tn=K(!1),an=K(!1),nt=K(0),ze=K(0),Vt=()=>{const e=j(()=>$a.value?[...Ie.selectionGrid,Ie.actionRow].filter(m=>m.length):en.value?[...Ie.timePicker[0],...Ie.timePicker[1],an.value?[]:[Ja.value],Ie.actionRow].filter(m=>m.length):tn.value?[...Ie.monthPicker,Ie.actionRow]:[Ie.monthYear,...Ie.calendar,Ie.time,Ie.actionRow].filter(m=>m.length)),t=m=>{nt.value=m?nt.value+1:nt.value-1;let p=null;e.value[ze.value]&&(p=e.value[ze.value][nt.value]),!p&&e.value[ze.value+(m?1:-1)]?(ze.value=ze.value+(m?1:-1),nt.value=m?0:e.value[ze.value].length-1):p||(nt.value=m?nt.value-1:nt.value+1)},n=m=>{ze.value===0&&!m||ze.value===e.value.length&&m||(ze.value=m?ze.value+1:ze.value-1,e.value[ze.value]?e.value[ze.value]&&!e.value[ze.value][nt.value]&&nt.value!==0&&(nt.value=e.value[ze.value].length-1):ze.value=m?ze.value-1:ze.value+1)},a=m=>{let p=null;e.value[ze.value]&&(p=e.value[ze.value][nt.value]),p?p.focus({preventScroll:!$a.value}):nt.value=m?nt.value-1:nt.value+1},r=()=>{t(!0),a(!0)},o=()=>{t(!1),a(!1)},s=()=>{n(!1),a(!0)},c=()=>{n(!0),a(!0)},d=(m,p)=>{Ie[p]=m},P=(m,p)=>{Ie[p]=m},v=()=>{nt.value=0,ze.value=0};return{buildMatrix:d,buildMultiLevelMatrix:P,setTimePickerBackRef:m=>{Ja.value=m},setSelectionGrid:m=>{$a.value=m,v(),m||(Ie.selectionGrid=[])},setTimePicker:(m,p=!1)=>{en.value=m,an.value=p,v(),m||(Ie.timePicker[0]=[],Ie.timePicker[1]=[])},setTimePickerElements:(m,p=0)=>{Ie.timePicker[p]=m},arrowRight:r,arrowLeft:o,arrowUp:s,arrowDown:c,clearArrowNav:()=>{Ie.monthYear=[],Ie.calendar=[],Ie.time=[],Ie.actionRow=[],Ie.selectionGrid=[],Ie.timePicker[0]=[],Ie.timePicker[1]=[],$a.value=!1,en.value=!1,an.value=!1,tn.value=!1,v(),Ja.value=null},setMonthPicker:m=>{tn.value=m,v()},refSets:Ie}},Gn=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??{}}),Os=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??{}}),Kn=e=>e?typeof e=="boolean"?e?2:0:+e>=2?+e:2:0,$s=e=>{const t=typeof e=="object"&&e,n={static:!0,solo:!1};if(!e)return{...n,count:Kn(!1)};const a=t?e:{},r=t?a.count??!0:e,o=Kn(r);return Object.assign(n,a,{count:o})},As=(e,t,n)=>e||(typeof n=="string"?n:t),Ys=e=>typeof e=="boolean"?e?Gn({}):!1:Gn(e),Cs=e=>{const t={enterSubmit:!0,tabSubmit:!0,openMenu:"open",selectOnFocus:!1,rangeSeparator:" - ",escClose:!0};return typeof e=="object"?{...t,...e??{},enabled:!0}:{...t,enabled:e}},Rs=e=>({months:[],years:[],times:{hours:[],minutes:[],seconds:[]},...e??{}}),Ss=e=>({showSelect:!0,showCancel:!0,showNow:!1,showPreview:!0,...e??{}}),Ns=e=>{const t={input:!1};return typeof e=="object"?{...t,...e??{},enabled:!0}:{enabled:e,...t}},Is=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,mobileBreakpoint:600,setDateOnMenuClose:!1,...e??{}}),Es=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??{}}},Fs=e=>typeof e=="object"?{type:e?.type??"local",hideOnOffsetDates:e?.hideOnOffsetDates??!1}:{type:e,hideOnOffsetDates:!1},Bs=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}},Ls=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},nn=(e,t,n,a)=>new Map(e.map(r=>{const o=xn(r,t,a);return[Tn(o,n),o]})),Hs=(e,t)=>e.length?new Map(e.map(n=>{const a=xn(n.date,t);return[Tn(a,aa.DATE),n]})):null,Vs=e=>{var t;const n=Tr(e.isMonthPicker,e.isYearPicker);return{minDate:un(e.minDate,e.timezone,e.isSpecific),maxDate:un(e.maxDate,e.timezone,e.isSpecific),disabledDates:ja(e.disabledDates)?nn(e.disabledDates,e.timezone,n,e.isSpecific):e.disabledDates,allowedDates:ja(e.allowedDates)?nn(e.allowedDates,e.timezone,n,e.isSpecific):null,highlight:typeof e.highlight=="object"&&ja((t=e.highlight)==null?void 0:t.dates)?nn(e.highlight.dates,e.timezone,n):e.highlight,markers:Hs(e.markers,e.timezone)}},Ws=e=>typeof e=="boolean"?{enabled:e,dragSelect:!0,limit:null}:{enabled:!!e,limit:e.limit?+e.limit:null,dragSelect:e.dragSelect??!0},zs=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(o=>[o,!0]));return[t,r]}))}),Be=e=>{const t=()=>{const Y=e.enableSeconds?":ss":"",N=e.enableMinutes?":mm":"";return e.is24?`HH${N}${Y}`:`hh${N}${Y} aa`},n=()=>{var Y;return e.format?e.format:e.monthPicker?"MM/yyyy":e.timePicker?t():e.weekPicker?`${((Y=M.value)==null?void 0:Y.type)==="iso"?"II":"ww"}-RR`:e.yearPicker?"yyyy":e.quarterPicker?"QQQ/yyyy":e.enableTimePicker?`MM/dd/yyyy, ${t()}`:"MM/dd/yyyy"},a=Y=>Cr(Y,e.enableSeconds),r=()=>L.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,o=j(()=>$s(e.multiCalendars)),s=j(()=>r()),c=j(()=>Os(e.ariaLabels)),d=j(()=>Rs(e.filters)),P=j(()=>Ys(e.transitions)),v=j(()=>Ss(e.actionRow)),m=j(()=>As(e.previewFormat,e.format,n())),p=j(()=>Cs(e.textInput)),x=j(()=>Ns(e.inline)),A=j(()=>Is(e.config)),R=j(()=>Es(e.highlight)),M=j(()=>Fs(e.weekNumbers)),b=j(()=>Ls(e.timezone)),S=j(()=>Ws(e.multiDates)),C=j(()=>Vs({minDate:e.minDate,maxDate:e.maxDate,disabledDates:e.disabledDates,allowedDates:e.allowedDates,highlight:R.value,markers:e.markers,timezone:b.value,isSpecific:e.monthPicker||e.yearPicker||e.quarterPicker,isMonthPicker:e.monthPicker,isYearPicker:e.yearPicker})),L=j(()=>Bs(e.range)),U=j(()=>zs(e.ui));return{defaultedTransitions:P,defaultedMultiCalendars:o,defaultedStartTime:s,defaultedAriaLabels:c,defaultedFilters:d,defaultedActionRow:v,defaultedPreviewFormat:m,defaultedTextInput:p,defaultedInline:x,defaultedConfig:A,defaultedHighlight:R,defaultedWeekNumbers:M,defaultedRange:L,propDates:C,defaultedTz:b,defaultedMultiDates:S,defaultedUI:U,getDefaultPattern:n,getDefaultStartTime:r,handleEventPropagation:Y=>{A.value.allowStopPropagation&&Y.stopPropagation(),A.value.allowPreventDefault&&Y.preventDefault()}}},qs=(e,t,n)=>{const a=K(),{defaultedTextInput:r,defaultedRange:o,defaultedTz:s,defaultedMultiDates:c,getDefaultPattern:d}=Be(t),P=K(""),v=ha(t,"format"),m=ha(t,"formatLocale");yt(a,()=>{typeof t.onInternalModelChange=="function"&&e("internal-model-change",a.value,W(!0))},{deep:!0}),yt(o,(l,_)=>{l.enabled!==_.enabled&&(a.value=null)}),yt(v,()=>{J()});const p=l=>s.value.timezone&&s.value.convertModel?dt(l,s.value.timezone):l,x=l=>{if(s.value.timezone&&s.value.convertModel){const _=is(s.value.timezone,l);return ll(l,_)}return l},A=(l,_,oe=!1)=>Sr(l,t.format,t.formatLocale,r.value.rangeSeparator,t.modelAuto,_??d(),oe),R=l=>l?t.modelType?ee(l):{hours:St(l),minutes:Ht(l),seconds:t.enableSeconds?ra(l):0}:null,M=l=>t.modelType?ee(l):{month:Pe(l),year:he(l)},b=l=>Array.isArray(l)?c.value.enabled?l.map(_=>S(_,Ot(q(),_))):Oa(()=>[Ot(q(),l[0]),l[1]?Ot(q(),l[1]):Jt(o.value.partialRange)],o.value.enabled):Ot(q(),+l),S=(l,_)=>(typeof l=="string"||typeof l=="number")&&t.modelType?E(l):_,C=l=>Array.isArray(l)?[S(l[0],Lt(null,+l[0].hours,+l[0].minutes,l[0].seconds)),S(l[1],Lt(null,+l[1].hours,+l[1].minutes,l[1].seconds))]:S(l,Lt(null,l.hours,l.minutes,l.seconds)),L=l=>{const _=Ne(q(),{date:1});return Array.isArray(l)?c.value.enabled?l.map(oe=>S(oe,Ct(_,+oe.month,+oe.year))):Oa(()=>[S(l[0],Ct(_,+l[0].month,+l[0].year)),S(l[1],l[1]?Ct(_,+l[1].month,+l[1].year):Jt(o.value.partialRange))],o.value.enabled):S(l,Ct(_,+l.month,+l.year))},U=l=>{if(Array.isArray(l))return l.map(_=>E(_));throw new Error(Pn.dateArr("multi-dates"))},Y=l=>{if(Array.isArray(l)&&o.value.enabled){const _=l[0],oe=l[1];return[q(Array.isArray(_)?_[0]:null),Array.isArray(oe)&&oe.length?q(oe[0]):null]}return q(l[0])},N=l=>t.modelAuto?Array.isArray(l)?[E(l[0]),E(l[1])]:t.autoApply?[E(l)]:[E(l),null]:Array.isArray(l)?Oa(()=>l[1]?[E(l[0]),l[1]?E(l[1]):Jt(o.value.partialRange)]:[E(l[0])],o.value.enabled):E(l),re=()=>{Array.isArray(a.value)&&o.value.enabled&&a.value.length===1&&a.value.push(Jt(o.value.partialRange))},V=()=>{const l=a.value;return[ee(l[0]),l[1]?ee(l[1]):Jt(o.value.partialRange)]},I=()=>Array.isArray(a.value)?a.value[1]?V():ee(Xe(a.value[0])):[],se=()=>(a.value||[]).map(l=>ee(l)),ce=(l=!1)=>(l||re(),t.modelAuto?I():c.value.enabled?se():Array.isArray(a.value)?Oa(()=>V(),o.value.enabled):ee(Xe(a.value))),ye=l=>!l||Array.isArray(l)&&!l.length?null:t.timePicker?C(Xe(l)):t.monthPicker?L(Xe(l)):t.yearPicker?b(Xe(l)):c.value.enabled?U(Xe(l)):t.weekPicker?Y(Xe(l)):N(Xe(l)),y=l=>{const _=ye(l);cn(Xe(_))?(a.value=Xe(_),J()):(a.value=null,P.value="")},D=()=>{const l=_=>$t(_,r.value.format);return`${l(a.value[0])} ${r.value.rangeSeparator} ${a.value[1]?l(a.value[1]):""}`},h=()=>n.value&&a.value?Array.isArray(a.value)?D():$t(a.value,r.value.format):A(a.value),H=()=>a.value?c.value.enabled?a.value.map(l=>A(l)).join("; "):r.value.enabled&&typeof r.value.format=="string"?h():A(a.value):"",J=()=>{!t.format||typeof t.format=="string"||r.value.enabled&&typeof r.value.format=="string"?P.value=H():P.value=t.format(a.value)},E=l=>{if(t.utc){const _=new Date(l);return t.utc==="preserve"?new Date(_.getTime()+_.getTimezoneOffset()*6e4):_}return t.modelType?ds.includes(t.modelType)?p(new Date(l)):t.modelType==="format"&&(typeof t.format=="string"||!t.format)?p(sn(l,d(),new Date,{locale:m.value})):p(sn(l,t.modelType,new Date,{locale:m.value})):p(new Date(l))},ee=l=>l?t.utc?_s(l,t.utc==="preserve",t.enableSeconds):t.modelType?t.modelType==="timestamp"?+x(l):t.modelType==="iso"?x(l).toISOString():t.modelType==="format"&&(typeof t.format=="string"||!t.format)?A(x(l)):A(x(l),t.modelType,!0):x(l):"",O=(l,_=!1,oe=!1)=>{if(oe)return l;if(e("update:model-value",l),s.value.emitTimezone&&_){const Ye=Array.isArray(l)?l.map($=>dt(Xe($),s.value.emitTimezone)):dt(Xe(l),s.value.emitTimezone);e("update:model-timezone-value",Ye)}},de=l=>Array.isArray(a.value)?c.value.enabled?a.value.map(_=>l(_)):[l(a.value[0]),a.value[1]?l(a.value[1]):Jt(o.value.partialRange)]:l(Xe(a.value)),f=()=>{if(Array.isArray(a.value)){const l=Yt(a.value[0],t.weekStart),_=a.value[1]?Yt(a.value[1],t.weekStart):[];return[l.map(oe=>q(oe)),_.map(oe=>q(oe))]}return Yt(a.value,t.weekStart).map(l=>q(l))},k=(l,_)=>O(Xe(de(l)),!1,_),F=l=>{const _=f();return l?_:e("update:model-value",f())},W=(l=!1)=>(l||J(),t.monthPicker?k(M,l):t.timePicker?k(R,l):t.yearPicker?k(he,l):t.weekPicker?F(l):O(ce(l),!0,l));return{inputValue:P,internalModelValue:a,checkBeforeEmit:()=>a.value?o.value.enabled?o.value.partialRange?a.value.length>=1:a.value.length===2:!!a.value:!1,parseExternalModelValue:y,formatInputValue:J,emitModelValue:W}},Us=(e,t)=>{const{defaultedFilters:n,propDates:a}=Be(e),{validateMonthYearInRange:r}=Wt(e),o=(v,m)=>{let p=v;return n.value.months.includes(Pe(p))?(p=m?bt(v,1):oa(v,1),o(p,m)):p},s=(v,m)=>{let p=v;return n.value.years.includes(he(p))?(p=m?mn(v,1):_r(v,1),s(p,m)):p},c=(v,m=!1)=>{const p=Ne(q(),{month:e.month,year:e.year});let x=v?bt(p,1):oa(p,1);e.disableYearSelect&&(x=Ot(x,e.year));let A=Pe(x),R=he(x);n.value.months.includes(A)&&(x=o(x,v),A=Pe(x),R=he(x)),n.value.years.includes(R)&&(x=s(x,v),R=he(x)),r(A,R,v,e.preventMinMaxNavigation)&&d(A,R,m)},d=(v,m,p)=>{t("update-month-year",{month:v,year:m,fromNav:p})},P=j(()=>v=>Rr(Ne(q(),{month:e.month,year:e.year}),a.value.maxDate,a.value.minDate,e.preventMinMaxNavigation,v));return{handleMonthYearChange:c,isDisabled:P,updateMonthYear:d}},Ia={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,String],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},alwaysClearable:{type:Boolean,default:!1},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:()=>({})}},kt={...Ia,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},isMobile:{type:Boolean,default:void 0}},Qs=["title"],js=["disabled"],Gs=tt({compatConfig:{MODE:3},__name:"ActionRow",props:{menuMount:{type:Boolean,default:!1},calendarWidth:{type:Number,default:0},...kt},emits:["close-picker","select-date","select-now","invalid-select"],setup(e,{emit:t}){const n=t,a=e,{defaultedActionRow:r,defaultedPreviewFormat:o,defaultedMultiCalendars:s,defaultedTextInput:c,defaultedInline:d,defaultedRange:P,defaultedMultiDates:v}=Be(a),{isTimeValid:m,isMonthValid:p}=Wt(a),{buildMatrix:x}=Vt(),A=K(null),R=K(null),M=K(!1),b=K({}),S=K(null),C=K(null);at(()=>{a.arrowNavigation&&x([je(A),je(R)],"actionRow"),L(),window.addEventListener("resize",L)}),ia(()=>{window.removeEventListener("resize",L)});const L=()=>{M.value=!1,setTimeout(()=>{var y,D;const h=(y=S.value)==null?void 0:y.getBoundingClientRect(),H=(D=C.value)==null?void 0:D.getBoundingClientRect();h&&H&&(b.value.maxWidth=`${H.width-h.width-20}px`),M.value=!0},0)},U=j(()=>P.value.enabled&&!P.value.partialRange&&a.internalModelValue?a.internalModelValue.length===2:!0),Y=j(()=>!m.value(a.internalModelValue)||!p.value(a.internalModelValue)||!U.value),N=()=>{const y=o.value;return a.timePicker||a.monthPicker,y(Xe(a.internalModelValue))},re=()=>{const y=a.internalModelValue;return s.value.count>0?`${V(y[0])} - ${V(y[1])}`:[V(y[0]),V(y[1])]},V=y=>Sr(y,o.value,a.formatLocale,c.value.rangeSeparator,a.modelAuto,o.value),I=j(()=>!a.internalModelValue||!a.menuMount?"":typeof o.value=="string"?Array.isArray(a.internalModelValue)?a.internalModelValue.length===2&&a.internalModelValue[1]?re():v.value.enabled?a.internalModelValue.map(y=>`${V(y)}`):a.modelAuto?`${V(a.internalModelValue[0])}`:`${V(a.internalModelValue[0])} -`:V(a.internalModelValue):N()),se=()=>v.value.enabled?"; ":" - ",ce=j(()=>Array.isArray(I.value)?I.value.join(se()):I.value),ye=()=>{m.value(a.internalModelValue)&&p.value(a.internalModelValue)&&U.value?n("select-date"):n("invalid-select")};return(y,D)=>(T(),z("div",{ref_key:"actionRowRef",ref:C,class:"dp__action_row"},[y.$slots["action-row"]?ie(y.$slots,"action-row",Ze(Je({key:0},{internalModelValue:y.internalModelValue,disabled:Y.value,selectDate:()=>y.$emit("select-date"),closePicker:()=>y.$emit("close-picker")}))):(T(),z(ke,{key:1},[i(r).showPreview?(T(),z("div",{key:0,class:"dp__selection_preview",title:ce.value,style:pt(b.value)},[y.$slots["action-preview"]&&M.value?ie(y.$slots,"action-preview",{key:0,value:y.internalModelValue}):G("",!0),!y.$slots["action-preview"]&&M.value?(T(),z(ke,{key:1},[Rt(lt(ce.value),1)],64)):G("",!0)],12,Qs)):G("",!0),ge("div",{ref_key:"actionBtnContainer",ref:S,class:"dp__action_buttons","data-dp-element":"action-row"},[y.$slots["action-buttons"]?ie(y.$slots,"action-buttons",{key:0,value:y.internalModelValue}):G("",!0),y.$slots["action-buttons"]?G("",!0):(T(),z(ke,{key:1},[!i(d).enabled&&i(r).showCancel?(T(),z("button",{key:0,ref_key:"cancelButtonRef",ref:A,type:"button",class:"dp__action_button dp__action_cancel",onClick:D[0]||(D[0]=h=>y.$emit("close-picker")),onKeydown:D[1]||(D[1]=h=>i(ut)(h,()=>y.$emit("close-picker")))},lt(y.cancelText),545)):G("",!0),i(r).showNow?(T(),z("button",{key:1,type:"button",class:"dp__action_button dp__action_cancel",onClick:D[2]||(D[2]=h=>y.$emit("select-now")),onKeydown:D[3]||(D[3]=h=>i(ut)(h,()=>y.$emit("select-now")))},lt(y.nowButtonLabel),33)):G("",!0),i(r).showSelect?(T(),z("button",{key:2,ref_key:"selectButtonRef",ref:R,type:"button",class:"dp__action_button dp__action_select",disabled:Y.value,"data-test-id":"select-button",onKeydown:D[4]||(D[4]=h=>i(ut)(h,()=>ye())),onClick:ye},lt(y.selectText),41,js)):G("",!0)],64))],512)],64))],512))}}),Ks=["role","aria-label","tabindex"],Xs={class:"dp__selection_grid_header"},Zs=["aria-selected","aria-disabled","data-test-id","onClick","onKeydown","onMouseover"],Js=["aria-label"],xa=tt({__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:o}=Vt(),s=n,c=e,{defaultedAriaLabels:d,defaultedTextInput:P,defaultedConfig:v,handleEventPropagation:m}=Be(c),{hideNavigationButtons:p}=Ba(),x=K(!1),A=K(null),R=K(null),M=K([]),b=K(),S=K(null),C=K(0),L=K(null);Jr(()=>{A.value=null}),at(()=>{mt().then(()=>ce()),c.noOverlayFocus||Y(),U(!0)}),ia(()=>U(!1));const U=f=>{var k;c.arrowNavigation&&((k=c.headerRefs)!=null&&k.length?o(f):a(f))},Y=()=>{var f;const k=je(R);k&&(P.value.enabled||(A.value?(f=A.value)==null||f.focus({preventScroll:!0}):k.focus({preventScroll:!0})),x.value=k.clientHeight({dp__overlay:!0,"dp--overlay-absolute":!c.useRelative,"dp--overlay-relative":c.useRelative})),re=j(()=>c.useRelative?{height:`${c.height}px`,width:"var(--dp-menu-min-width)"}:void 0),V=j(()=>({dp__overlay_col:!0})),I=j(()=>({dp__btn:!0,dp__button:!0,dp__overlay_action:!0,dp__over_action_scroll:x.value,dp__button_bottom:c.isLast})),se=j(()=>{var f,k;return{dp__overlay_container:!0,dp__container_flex:((f=c.items)==null?void 0:f.length)<=6,dp__container_block:((k=c.items)==null?void 0:k.length)>6}});yt(()=>c.items,()=>ce(!1),{deep:!0});const ce=(f=!0)=>{mt().then(()=>{const k=je(A),F=je(R),W=je(S),l=je(L),_=W?W.getBoundingClientRect().height:0;F&&(F.getBoundingClientRect().height?C.value=F.getBoundingClientRect().height-_:C.value=v.value.modeHeight-_),k&&l&&f&&(l.scrollTop=k.offsetTop-l.offsetTop-(C.value/2-k.getBoundingClientRect().height)-_)})},ye=f=>{f.disabled||s("selected",f.value)},y=()=>{s("toggle"),s("reset-flow")},D=f=>{c.escClose&&(y(),m(f))},h=(f,k,F,W)=>{f&&((k.active||k.value===c.focusValue)&&(A.value=f),c.arrowNavigation&&(Array.isArray(M.value[F])?M.value[F][W]=f:M.value[F]=[f],H()))},H=()=>{var f,k;const F=(f=c.headerRefs)!=null&&f.length?[c.headerRefs].concat(M.value):M.value.concat([c.skipButtonRef?[]:[S.value]]);r(Xe(F),(k=c.headerRefs)!=null&&k.length?"monthPicker":"selectionGrid")},J=f=>{c.arrowNavigation||Bt(f,v.value,!0)},E=f=>{b.value=f,s("hover-value",f)},ee=()=>{if(y(),!c.isLast){const f=dn(c.menuWrapRef??null,"action-row");if(f){const k=Mr(f);k?.focus()}}},O=f=>{switch(f.key){case Ee.esc:return D(f);case Ee.arrowLeft:return J(f);case Ee.arrowRight:return J(f);case Ee.arrowUp:return J(f);case Ee.arrowDown:return J(f);default:return}},de=f=>{if(f.key===Ee.enter)return y();if(f.key===Ee.tab)return ee()};return t({focusGrid:Y}),(f,k)=>{var F;return T(),z("div",{ref_key:"gridWrapRef",ref:R,class:xe(N.value),style:pt(re.value),role:f.useRelative?void 0:"dialog","aria-label":f.overlayLabel,tabindex:f.useRelative?void 0:"0",onKeydown:O,onClick:k[0]||(k[0]=ga(()=>{},["prevent"]))},[ge("div",{ref_key:"containerRef",ref:L,class:xe(se.value),style:pt({"--dp-overlay-height":`${C.value}px`}),role:"grid"},[ge("div",Xs,[ie(f.$slots,"header")]),f.$slots.overlay?ie(f.$slots,"overlay",{key:0}):(T(!0),z(ke,{key:1},Fe(f.items,(W,l)=>(T(),z("div",{key:l,class:xe(["dp__overlay_row",{dp__flex_row:f.items.length>=3}]),role:"row"},[(T(!0),z(ke,null,Fe(W,(_,oe)=>(T(),z("div",{key:_.value,ref_for:!0,ref:Ye=>h(Ye,_,l,oe),role:"gridcell",class:xe(V.value),"aria-selected":_.active||void 0,"aria-disabled":_.disabled||void 0,tabindex:"0","data-test-id":_.text,onClick:ga(Ye=>ye(_),["prevent"]),onKeydown:Ye=>i(ut)(Ye,()=>ye(_),!0),onMouseover:Ye=>E(_.value)},[ge("div",{class:xe(_.className)},[f.$slots.item?ie(f.$slots,"item",{key:0,item:_}):G("",!0),f.$slots.item?G("",!0):(T(),z(ke,{key:1},[Rt(lt(_.text),1)],64))],2)],42,Zs))),128))],2))),128))],6),f.$slots["button-icon"]?Aa((T(),z("button",{key:0,ref_key:"toggleButton",ref:S,type:"button","aria-label":(F=i(d))==null?void 0:F.toggleOverlay,class:xe(I.value),tabindex:"0",onClick:y,onKeydown:de},[ie(f.$slots,"button-icon")],42,Js)),[[Ya,!i(p)(f.hideNavigation,f.type)]]):G("",!0)],46,Ks)}}}),eu=["data-dp-mobile"],Ea=tt({__name:"InstanceWrap",props:{multiCalendars:{},stretch:{type:Boolean},collapse:{type:Boolean},isMobile:{type:Boolean}},setup(e){const t=e,n=j(()=>t.multiCalendars>0?[...Array(t.multiCalendars).keys()]:[0]),a=j(()=>({dp__instance_calendar:t.multiCalendars>0}));return(r,o)=>(T(),z("div",{class:xe({dp__menu_inner:!r.stretch,"dp--menu--inner-stretched":r.stretch,dp__flex_display:r.multiCalendars>0,"dp--flex-display-collapsed":r.collapse}),"data-dp-mobile":r.isMobile},[(T(!0),z(ke,null,Fe(n.value,(s,c)=>(T(),z("div",{key:s,class:xe(a.value)},[ie(r.$slots,"default",{instance:s,index:c})],2))),128))],10,eu))}}),tu=["data-dp-element","aria-label","aria-disabled"],ya=tt({compatConfig:{MODE:3},__name:"ArrowBtn",props:{ariaLabel:{},elName:{},disabled:{type:Boolean}},emits:["activate","set-ref"],setup(e,{emit:t}){const n=t,a=K(null);return at(()=>n("set-ref",a)),(r,o)=>(T(),z("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:o[0]||(o[0]=s=>r.$emit("activate")),onKeydown:o[1]||(o[1]=s=>i(ut)(s,()=>r.$emit("activate"),!0))},[ge("span",{class:xe(["dp__inner_nav",{dp__inner_nav_disabled:r.disabled}])},[ie(r.$slots,"default")],2)],40,tu))}}),au=["aria-label","data-test-id"],Er=tt({__name:"YearModePicker",props:{...kt,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:o}=Ba(),{defaultedConfig:s,defaultedMultiCalendars:c,defaultedAriaLabels:d,defaultedTransitions:P,defaultedUI:v}=Be(a),{showTransition:m,transitionName:p}=Ma(P),x=K(!1),A=(b=!1,S)=>{x.value=!x.value,n("toggle-year-picker",{flow:b,show:S})},R=b=>{x.value=!1,n("year-select",b)},M=(b=!1)=>{n("handle-year",b)};return(b,S)=>{var C,L,U,Y,N;return T(),z(ke,null,[ge("div",{class:xe(["dp--year-mode-picker",{"dp--hidden-el":x.value}])},[i(o)(i(c),e.instance)?(T(),Oe(ya,{key:0,ref:"mpPrevIconRef","aria-label":(C=i(d))==null?void 0:C.prevYear,disabled:e.isDisabled(!1),class:xe((L=i(v))==null?void 0:L.navBtnPrev),onActivate:S[0]||(S[0]=re=>M(!1))},{default:De(()=>[b.$slots["arrow-left"]?ie(b.$slots,"arrow-left",{key:0}):G("",!0),b.$slots["arrow-left"]?G("",!0):(T(),Oe(i(wn),{key:1}))]),_:3},8,["aria-label","disabled","class"])):G("",!0),ge("button",{ref:"mpYearButtonRef",class:"dp__btn dp--year-select",type:"button","aria-label":`${e.year}-${(U=i(d))==null?void 0:U.openYearsOverlay}`,"data-test-id":`year-mode-btn-${e.instance}`,onClick:S[1]||(S[1]=()=>A(!1)),onKeydown:S[2]||(S[2]=el(()=>A(!1),["enter"]))},[b.$slots.year?ie(b.$slots,"year",{key:0,year:e.year}):G("",!0),b.$slots.year?G("",!0):(T(),z(ke,{key:1},[Rt(lt(e.year),1)],64))],40,au),i(r)(i(c),e.instance)?(T(),Oe(ya,{key:1,ref:"mpNextIconRef","aria-label":(Y=i(d))==null?void 0:Y.nextYear,disabled:e.isDisabled(!0),class:xe((N=i(v))==null?void 0:N.navBtnNext),onActivate:S[3]||(S[3]=re=>M(!0))},{default:De(()=>[b.$slots["arrow-right"]?ie(b.$slots,"arrow-right",{key:0}):G("",!0),b.$slots["arrow-right"]?G("",!0):(T(),Oe(i(bn),{key:1}))]),_:3},8,["aria-label","disabled","class"])):G("",!0)],2),vt(da,{name:i(p)(e.showYearPicker),css:i(m)},{default:De(()=>{var re,V;return[e.showYearPicker?(T(),Oe(xa,{key:0,items:e.items,"text-input":b.textInput,"esc-close":b.escClose,config:b.config,"is-last":b.autoApply&&!i(s).keepActionRow,"hide-navigation":b.hideNavigation,"aria-labels":b.ariaLabels,"overlay-label":(V=(re=i(d))==null?void 0:re.yearPicker)==null?void 0:V.call(re,!0),type:"year",onToggle:A,onSelected:S[4]||(S[4]=I=>R(I))},ot({"button-icon":De(()=>[b.$slots["calendar-icon"]?ie(b.$slots,"calendar-icon",{key:0}):G("",!0),b.$slots["calendar-icon"]?G("",!0):(T(),Oe(i(ca),{key:1}))]),_:2},[b.$slots["year-overlay-value"]?{name:"item",fn:De(({item:I})=>[ie(b.$slots,"year-overlay-value",{text:I.text,value:I.value})]),key:"0"}:void 0]),1032,["items","text-input","esc-close","config","is-last","hide-navigation","aria-labels","overlay-label"])):G("",!0)]}),_:3},8,["name","css"])],64)}}}),$n=(e,t,n)=>{if(t.value&&Array.isArray(t.value))if(t.value.some(a=>Te(e,a))){const a=t.value.filter(r=>!Te(r,e));t.value=a.length?a:null}else(n&&+n>t.value.length||!n)&&t.value.push(e);else t.value=[e]},An=(e,t,n)=>{let a=e.value?e.value.slice():[];return a.length===2&&a[1]!==null&&(a=[]),a.length?(He(t,a[0])?a.unshift(t):a[1]=t,n("range-end",t)):(a=[t],n("range-start",t)),a},Fa=(e,t,n,a)=>{e&&(e[0]&&e[1]&&n&&t("auto-apply"),e[0]&&!e[1]&&a&&n&&t("auto-apply"))},Fr=e=>{Array.isArray(e.value)&&e.value.length<=2&&e.range?e.modelValue.value=e.value.map(t=>dt(q(t),e.timezone)):Array.isArray(e.value)||(e.modelValue.value=dt(q(e.value),e.timezone))},Br=(e,t,n,a)=>Array.isArray(t.value)&&(t.value.length===2||t.value.length===1&&a.value.partialRange)?a.value.fixedStart&&(qe(e,t.value[0])||Te(e,t.value[0]))?[t.value[0],e]:a.value.fixedEnd&&(He(e,t.value[1])||Te(e,t.value[1]))?[e,t.value[1]]:(n("invalid-fixed-range",e),t.value):[],Lr=({multiCalendars:e,range:t,highlight:n,propDates:a,calendars:r,modelValue:o,props:s,filters:c,year:d,month:P,emit:v})=>{const m=j(()=>Mn(s.yearRange,s.locale,s.reverseYears)),p=K([!1]),x=j(()=>(I,se)=>{const ce=Ne(wt(new Date),{month:P.value(I),year:d.value(I)}),ye=se?sr(ce):wa(ce);return Rr(ye,a.value.maxDate,a.value.minDate,s.preventMinMaxNavigation,se)}),A=()=>Array.isArray(o.value)&&e.value.solo&&o.value[1],R=()=>{for(let I=0;I{if(!I)return R();const se=Ne(q(),r.value[I]);return r.value[0].year=he(_r(se,e.value.count-1)),R()},b=(I,se)=>{const ce=dl(se,I);return t.value.showLastInRange&&ce>1?se:I},S=I=>s.focusStartDate||e.value.solo?I[0]:I[1]?b(I[0],I[1]):I[0],C=()=>{if(o.value){const I=Array.isArray(o.value)?S(o.value):o.value;r.value[0]={month:Pe(I),year:he(I)}}},L=()=>{C(),e.value.count&&R()};yt(o,(I,se)=>{s.isTextInputDate&&JSON.stringify(I??{})!==JSON.stringify(se??{})&&L()}),at(()=>{L()});const U=(I,se)=>{r.value[se].year=I,v("update-month-year",{instance:se,year:I,month:r.value[se].month}),e.value.count&&!e.value.solo&&M(se)},Y=j(()=>I=>sa(m.value,se=>{var ce;const ye=d.value(I)===se.value,y=ba(se.value,ua(a.value.minDate),ua(a.value.maxDate))||((ce=c.value.years)==null?void 0:ce.includes(d.value(I))),D=On(n.value,se.value);return{active:ye,disabled:y,highlighted:D}})),N=(I,se)=>{U(I,se),V(se)},re=(I,se=!1)=>{if(!x.value(I,se)){const ce=se?d.value(I)+1:d.value(I)-1;U(ce,I)}},V=(I,se=!1,ce)=>{se||v("reset-flow"),ce!==void 0?p.value[I]=ce:p.value[I]=!p.value[I],p.value[I]?v("overlay-toggle",{open:!0,overlay:rt.year}):(v("overlay-closed"),v("overlay-toggle",{open:!1,overlay:rt.year}))};return{isDisabled:x,groupedYears:Y,showYearPicker:p,selectYear:U,toggleYearPicker:V,handleYearSelect:N,handleYear:re}},nu=(e,t)=>{const{defaultedMultiCalendars:n,defaultedAriaLabels:a,defaultedTransitions:r,defaultedConfig:o,defaultedRange:s,defaultedHighlight:c,propDates:d,defaultedTz:P,defaultedFilters:v,defaultedMultiDates:m}=Be(e),p=()=>{e.isTextInputDate&&L(he(q(e.startDate)),0)},{modelValue:x,year:A,month:R,calendars:M}=Pa(e,t,p),b=j(()=>Dr(e.formatLocale,e.locale,e.monthNameFormat)),S=K(null),{checkMinMaxRange:C}=Wt(e),{selectYear:L,groupedYears:U,showYearPicker:Y,toggleYearPicker:N,handleYearSelect:re,handleYear:V,isDisabled:I}=Lr({modelValue:x,multiCalendars:n,range:s,highlight:c,calendars:M,year:A,propDates:d,month:R,filters:v,props:e,emit:t});at(()=>{e.startDate&&(x.value&&e.focusStartDate||!x.value)&&L(he(q(e.startDate)),0)});const se=k=>k?{month:Pe(k),year:he(k)}:{month:null,year:null},ce=()=>x.value?Array.isArray(x.value)?x.value.map(k=>se(k)):se(x.value):se(),ye=(k,F)=>{const W=M.value[k],l=ce();return Array.isArray(l)?l.some(_=>_.year===W?.year&&_.month===F):W?.year===l.year&&F===l.month},y=(k,F,W)=>{var l,_;const oe=ce();return Array.isArray(oe)?A.value(F)===((l=oe[W])==null?void 0:l.year)&&k===((_=oe[W])==null?void 0:_.month):!1},D=(k,F)=>{if(s.value.enabled){const W=ce();if(Array.isArray(x.value)&&Array.isArray(W)){const l=y(k,F,0)||y(k,F,1),_=Ct(wt(q()),k,A.value(F));return _a(x.value,S.value,_)&&!l}return!1}return!1},h=j(()=>k=>sa(b.value,F=>{var W;const l=ye(k,F.value),_=ba(F.value,$r(A.value(k),d.value.minDate),Ar(A.value(k),d.value.maxDate))||Ps(d.value.disabledDates,A.value(k),F.value)||((W=v.value.months)==null?void 0:W.includes(F.value))||!Ts(d.value.allowedDates,A.value(k),F.value),oe=D(F.value,k),Ye=Nr(c.value,F.value,A.value(k));return{active:l,disabled:_,isBetween:oe,highlighted:Ye}})),H=(k,F)=>Ct(wt(q()),k,A.value(F)),J=(k,F)=>{const W=x.value?x.value:wt(new Date);x.value=Ct(W,k,A.value(F)),t("auto-apply"),t("update-flow-step")},E=(k,F)=>{const W=H(k,F);s.value.fixedEnd||s.value.fixedStart?x.value=Br(W,x,t,s):x.value?C(W,x.value)&&(x.value=An(x,H(k,F),t)):x.value=[H(k,F)],mt().then(()=>{Fa(x.value,t,e.autoApply,e.modelAuto)})},ee=(k,F)=>{$n(H(k,F),x,m.value.limit),t("auto-apply",!0)},O=(k,F)=>(M.value[F].month=k,f(F,M.value[F].year,k),m.value.enabled?ee(k,F):s.value.enabled?E(k,F):J(k,F)),de=(k,F)=>{L(k,F),f(F,k,null)},f=(k,F,W)=>{let l=W;if(!l&&l!==0){const _=ce();l=Array.isArray(_)?_[k].month:_.month}t("update-month-year",{instance:k,year:F,month:l})};return{groupedMonths:h,groupedYears:U,year:A,isDisabled:I,defaultedMultiCalendars:n,defaultedAriaLabels:a,defaultedTransitions:r,defaultedConfig:o,showYearPicker:Y,modelValue:x,presetDate:(k,F)=>{Fr({value:k,modelValue:x,range:s.value.enabled,timezone:F?void 0:P.value.timezone}),t("auto-apply")},setHoverDate:(k,F)=>{S.value=H(k,F)},selectMonth:O,selectYear:de,toggleYearPicker:N,handleYearSelect:re,handleYear:V,getModelMonthYear:ce}},ru=tt({compatConfig:{MODE:3},__name:"MonthPicker",props:{...kt},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=Kt(),o=ct(r,"yearMode"),s=e;at(()=>{s.shadow||a("mount",null)});const{groupedMonths:c,groupedYears:d,year:P,isDisabled:v,defaultedMultiCalendars:m,defaultedConfig:p,showYearPicker:x,modelValue:A,presetDate:R,setHoverDate:M,selectMonth:b,selectYear:S,toggleYearPicker:C,handleYearSelect:L,handleYear:U,getModelMonthYear:Y}=nu(s,a);return t({getSidebarProps:()=>({modelValue:A,year:P,getModelMonthYear:Y,selectMonth:b,selectYear:S,handleYear:U}),presetDate:R,toggleYearPicker:N=>C(0,N)}),(N,re)=>(T(),Oe(Ea,{"multi-calendars":i(m).count,collapse:N.collapse,stretch:"","is-mobile":N.isMobile},{default:De(({instance:V})=>[N.$slots["top-extra"]?ie(N.$slots,"top-extra",{key:0,value:N.internalModelValue}):G("",!0),N.$slots["month-year"]?ie(N.$slots,"month-year",Ze(Je({key:1},{year:i(P),months:i(c)(V),years:i(d)(V),selectMonth:i(b),selectYear:i(S),instance:V}))):(T(),Oe(xa,{key:2,items:i(c)(V),"arrow-navigation":N.arrowNavigation,"is-last":N.autoApply&&!i(p).keepActionRow,"esc-close":N.escClose,height:i(p).modeHeight,config:N.config,"no-overlay-focus":!!(N.noOverlayFocus||N.textInput),"use-relative":"",type:"month",onSelected:I=>i(b)(I,V),onHoverValue:I=>i(M)(I,V)},ot({header:De(()=>[vt(Er,Je(N.$props,{items:i(d)(V),instance:V,"show-year-picker":i(x)[V],year:i(P)(V),"is-disabled":I=>i(v)(V,I),onHandleYear:I=>i(U)(V,I),onYearSelect:I=>i(L)(I,V),onToggleYearPicker:I=>i(C)(V,I?.flow,I?.show)}),ot({_:2},[Fe(i(o),(I,se)=>({name:I,fn:De(ce=>[ie(N.$slots,I,Ze(it(ce)))])}))]),1040,["items","instance","show-year-picker","year","is-disabled","onHandleYear","onYearSelect","onToggleYearPicker"])]),_:2},[N.$slots["month-overlay-value"]?{name:"item",fn:De(({item:I})=>[ie(N.$slots,"month-overlay-value",{text:I.text,value:I.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","is-mobile"]))}}),lu=(e,t)=>{const n=()=>{e.isTextInputDate&&(v.value=he(q(e.startDate)))},{modelValue:a}=Pa(e,t,n),r=K(null),{defaultedHighlight:o,defaultedMultiDates:s,defaultedFilters:c,defaultedRange:d,propDates:P}=Be(e),v=K();at(()=>{e.startDate&&(a.value&&e.focusStartDate||!a.value)&&(v.value=he(q(e.startDate)))});const m=b=>Array.isArray(a.value)?a.value.some(S=>he(S)===b):a.value?he(a.value)===b:!1,p=b=>d.value.enabled&&Array.isArray(a.value)?_a(a.value,r.value,M(b)):!1,x=b=>P.value.allowedDates instanceof Map?P.value.allowedDates.size?P.value.allowedDates.has(`${b}`):!1:!0,A=b=>P.value.disabledDates instanceof Map?P.value.disabledDates.size?P.value.disabledDates.has(`${b}`):!1:!0,R=j(()=>sa(Mn(e.yearRange,e.locale,e.reverseYears),b=>{const S=m(b.value),C=ba(b.value,ua(P.value.minDate),ua(P.value.maxDate))||c.value.years.includes(b.value)||!x(b.value)||A(b.value),L=p(b.value)&&!S,U=On(o.value,b.value);return{active:S,disabled:C,isBetween:L,highlighted:U}})),M=b=>Ot(wt(wa(new Date)),b);return{groupedYears:R,modelValue:a,focusYear:v,setHoverValue:b=>{r.value=Ot(wt(new Date),b)},selectYear:b=>{var S;if(t("update-month-year",{instance:0,year:b}),s.value.enabled)return a.value?Array.isArray(a.value)&&(((S=a.value)==null?void 0:S.map(C=>he(C))).includes(b)?a.value=a.value.filter(C=>he(C)!==b):a.value.push(Ot(et(q()),b))):a.value=[Ot(et(wa(q())),b)],t("auto-apply",!0);d.value.enabled?(a.value=An(a,M(b),t),mt().then(()=>{Fa(a.value,t,e.autoApply,e.modelAuto)})):(a.value=M(b),t("auto-apply"))}}},ou=tt({compatConfig:{MODE:3},__name:"YearPicker",props:{...kt},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:o,modelValue:s,focusYear:c,selectYear:d,setHoverValue:P}=lu(r,a),{defaultedConfig:v}=Be(r);return t({getSidebarProps:()=>({modelValue:s,selectYear:d})}),(m,p)=>(T(),z("div",null,[m.$slots["top-extra"]?ie(m.$slots,"top-extra",{key:0,value:m.internalModelValue}):G("",!0),m.$slots["month-year"]?ie(m.$slots,"month-year",Ze(Je({key:1},{years:i(o),selectYear:i(d)}))):(T(),Oe(xa,{key:2,items:i(o),"is-last":m.autoApply&&!i(v).keepActionRow,height:i(v).modeHeight,config:m.config,"no-overlay-focus":!!(m.noOverlayFocus||m.textInput),"focus-value":i(c),type:"year","use-relative":"",onSelected:i(d),onHoverValue:i(P)},ot({_:2},[m.$slots["year-overlay-value"]?{name:"item",fn:De(({item:x})=>[ie(m.$slots,"year-overlay-value",{text:x.text,value:x.value})]),key:"0"}:void 0]),1032,["items","is-last","height","config","no-overlay-focus","focus-value","onSelected","onHoverValue"]))]))}}),su={key:0,class:"dp__time_input"},uu=["data-compact","data-collapsed"],iu=["data-test-id","aria-label","onKeydown","onClick","onMousedown"],du=["aria-label","disabled","data-test-id","onKeydown","onClick"],cu=["data-test-id","aria-label","onKeydown","onClick","onMousedown"],vu={key:0},mu=["aria-label","data-compact"],fu=tt({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},...kt},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:o,setTimePickerBackRef:s}=Vt(),{defaultedAriaLabels:c,defaultedTransitions:d,defaultedFilters:P,defaultedConfig:v,defaultedRange:m,defaultedMultiCalendars:p}=Be(r),{transitionName:x,showTransition:A}=Ma(d),R=ka({hours:!1,minutes:!1,seconds:!1}),M=K("AM"),b=K(null),S=K([]),C=K(),L=K(!1);at(()=>{a("mounted")});const U=u=>Ne(new Date,{hours:u.hours,minutes:u.minutes,seconds:r.enableSeconds?u.seconds:0,milliseconds:0}),Y=j(()=>u=>E(u,r[u])||re(u,r[u])),N=j(()=>({hours:r.hours,minutes:r.minutes,seconds:r.seconds})),re=(u,Z)=>m.value.enabled&&!m.value.disableTimeRangeValidation?!r.validateTime(u,Z):!1,V=(u,Z)=>{if(m.value.enabled&&!m.value.disableTimeRangeValidation){const ae=Z?+r[`${u}Increment`]:-+r[`${u}Increment`],ne=r[u]+ae;return!r.validateTime(u,ne)}return!1},I=j(()=>u=>!k(+r[u]+ +r[`${u}Increment`],u)||V(u,!0)),se=j(()=>u=>!k(+r[u]-+r[`${u}Increment`],u)||V(u,!1)),ce=(u,Z)=>tr(Ne(q(),u),Z),ye=(u,Z)=>os(Ne(q(),u),Z),y=j(()=>({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})),D=j(()=>r.timePickerInline&&m.value.enabled&&!p.value.count),h=j(()=>{const u=[{type:"hours"}];return r.enableMinutes&&u.push({type:"",separator:!0},{type:"minutes"}),r.enableSeconds&&u.push({type:"",separator:!0},{type:"seconds"}),u}),H=j(()=>h.value.filter(u=>!u.separator)),J=j(()=>u=>{if(u==="hours"){const Z=Ye(+r.hours);return{text:Z<10?`0${Z}`:`${Z}`,value:Z}}return{text:r[u]<10?`0${r[u]}`:`${r[u]}`,value:r[u]}}),E=(u,Z)=>{var ae;if(!r.disabledTimesConfig)return!1;const ne=r.disabledTimesConfig(r.order,u==="hours"?Z:void 0);return ne[u]?!!((ae=ne[u])!=null&&ae.includes(Z)):!0},ee=(u,Z)=>Z!=="hours"||M.value==="AM"?u:u+12,O=u=>{const Z=r.is24?24:12,ae=u==="hours"?Z:60,ne=+r[`${u}GridIncrement`],Me=u==="hours"&&!r.is24?ne:0,be=[];for(let Ce=Me;Ce({active:!1,disabled:P.value.times[u].includes(Ce.value)||!k(Ce.value,u)||E(u,Ce.value)||re(u,Ce.value)}))},de=u=>u>=0?u:59,f=u=>u>=0?u:23,k=(u,Z)=>{const ae=r.minTime?U(Ga(r.minTime)):null,ne=r.maxTime?U(Ga(r.maxTime)):null,Me=U(Ga(N.value,Z,Z==="minutes"||Z==="seconds"?de(u):f(u)));return ae&&ne?(la(Me,ne)||ta(Me,ne))&&(Gt(Me,ae)||ta(Me,ae)):ae?Gt(Me,ae)||ta(Me,ae):ne?la(Me,ne)||ta(Me,ne):!0},F=u=>r[`no${u[0].toUpperCase()+u.slice(1)}Overlay`],W=u=>{F(u)||(R[u]=!R[u],R[u]?(L.value=!0,a("overlay-opened",u)):(L.value=!1,a("overlay-closed",u)))},l=u=>u==="hours"?St:u==="minutes"?Ht:ra,_=()=>{C.value&&clearTimeout(C.value)},oe=(u,Z=!0,ae)=>{const ne=Z?ce:ye,Me=Z?+r[`${u}Increment`]:-+r[`${u}Increment`];k(+r[u]+Me,u)&&a(`update:${u}`,l(u)(ne({[u]:+r[u]},{[u]:+r[`${u}Increment`]}))),!(ae!=null&&ae.keyboard)&&v.value.timeArrowHoldThreshold&&(C.value=setTimeout(()=>{oe(u,Z)},v.value.timeArrowHoldThreshold))},Ye=u=>r.is24?u:(u>=12?M.value="PM":M.value="AM",ms(u)),$=()=>{M.value==="PM"?(M.value="AM",a("update:hours",r.hours-12)):(M.value="PM",a("update:hours",r.hours+12)),a("am-pm-change",M.value)},we=u=>{R[u]=!0},Q=(u,Z,ae)=>{if(u&&r.arrowNavigation){Array.isArray(S.value[Z])?S.value[Z][ae]=u:S.value[Z]=[u];const ne=S.value.reduce((Me,be)=>be.map((Ce,We)=>[...Me[We]||[],be[We]]),[]);s(r.closeTimePickerBtn),b.value&&(ne[1]=ne[1].concat(b.value)),o(ne,r.order)}},te=(u,Z)=>(W(u),a(`update:${u}`,Z));return t({openChildCmp:we}),(u,Z)=>{var ae;return u.disabled?G("",!0):(T(),z("div",su,[(T(!0),z(ke,null,Fe(h.value,(ne,Me)=>{var be,Ce,We;return T(),z("div",{key:Me,class:xe(y.value),"data-compact":D.value&&!u.enableSeconds,"data-collapsed":D.value&&u.enableSeconds},[ne.separator?(T(),z(ke,{key:0},[L.value?G("",!0):(T(),z(ke,{key:0},[Rt(":")],64))],64)):(T(),z(ke,{key:1},[ge("button",{ref_for:!0,ref:g=>Q(g,Me,0),type:"button",class:xe({dp__btn:!0,dp__inc_dec_button:!u.timePickerInline,dp__inc_dec_button_inline:u.timePickerInline,dp__tp_inline_btn_top:u.timePickerInline,dp__inc_dec_button_disabled:I.value(ne.type),"dp--hidden-el":L.value}),"data-test-id":`${ne.type}-time-inc-btn-${r.order}`,"aria-label":(be=i(c))==null?void 0:be.incrementValue(ne.type),tabindex:"0",onKeydown:g=>i(ut)(g,()=>oe(ne.type,!0,{keyboard:!0}),!0),onClick:g=>i(v).timeArrowHoldThreshold?void 0:oe(ne.type,!0),onMousedown:g=>i(v).timeArrowHoldThreshold?oe(ne.type,!0):void 0,onMouseup:_},[r.timePickerInline?(T(),z(ke,{key:1},[u.$slots["tp-inline-arrow-up"]?ie(u.$slots,"tp-inline-arrow-up",{key:0}):(T(),z(ke,{key:1},[Z[2]||(Z[2]=ge("span",{class:"dp__tp_inline_btn_bar dp__tp_btn_in_l"},null,-1)),Z[3]||(Z[3]=ge("span",{class:"dp__tp_inline_btn_bar dp__tp_btn_in_r"},null,-1))],64))],64)):(T(),z(ke,{key:0},[u.$slots["arrow-up"]?ie(u.$slots,"arrow-up",{key:0}):G("",!0),u.$slots["arrow-up"]?G("",!0):(T(),Oe(i(kn),{key:1}))],64))],42,iu),ge("button",{ref_for:!0,ref:g=>Q(g,Me,1),type:"button","aria-label":`${J.value(ne.type).text}-${(Ce=i(c))==null?void 0:Ce.openTpOverlay(ne.type)}`,class:xe({dp__time_display:!0,dp__time_display_block:!u.timePickerInline,dp__time_display_inline:u.timePickerInline,"dp--time-invalid":Y.value(ne.type),"dp--time-overlay-btn":!Y.value(ne.type),"dp--hidden-el":L.value}),disabled:F(ne.type),tabindex:"0","data-test-id":`${ne.type}-toggle-overlay-btn-${r.order}`,onKeydown:g=>i(ut)(g,()=>W(ne.type),!0),onClick:g=>W(ne.type)},[u.$slots[ne.type]?ie(u.$slots,ne.type,{key:0,text:J.value(ne.type).text,value:J.value(ne.type).value}):G("",!0),u.$slots[ne.type]?G("",!0):(T(),z(ke,{key:1},[Rt(lt(J.value(ne.type).text),1)],64))],42,du),ge("button",{ref_for:!0,ref:g=>Q(g,Me,2),type:"button",class:xe({dp__btn:!0,dp__inc_dec_button:!u.timePickerInline,dp__inc_dec_button_inline:u.timePickerInline,dp__tp_inline_btn_bottom:u.timePickerInline,dp__inc_dec_button_disabled:se.value(ne.type),"dp--hidden-el":L.value}),"data-test-id":`${ne.type}-time-dec-btn-${r.order}`,"aria-label":(We=i(c))==null?void 0:We.decrementValue(ne.type),tabindex:"0",onKeydown:g=>i(ut)(g,()=>oe(ne.type,!1,{keyboard:!0}),!0),onClick:g=>i(v).timeArrowHoldThreshold?void 0:oe(ne.type,!1),onMousedown:g=>i(v).timeArrowHoldThreshold?oe(ne.type,!1):void 0,onMouseup:_},[r.timePickerInline?(T(),z(ke,{key:1},[u.$slots["tp-inline-arrow-down"]?ie(u.$slots,"tp-inline-arrow-down",{key:0}):(T(),z(ke,{key:1},[Z[4]||(Z[4]=ge("span",{class:"dp__tp_inline_btn_bar dp__tp_btn_in_l"},null,-1)),Z[5]||(Z[5]=ge("span",{class:"dp__tp_inline_btn_bar dp__tp_btn_in_r"},null,-1))],64))],64)):(T(),z(ke,{key:0},[u.$slots["arrow-down"]?ie(u.$slots,"arrow-down",{key:0}):G("",!0),u.$slots["arrow-down"]?G("",!0):(T(),Oe(i(Dn),{key:1}))],64))],42,cu)],64))],10,uu)}),128)),u.is24?G("",!0):(T(),z("div",vu,[u.$slots["am-pm-button"]?ie(u.$slots,"am-pm-button",{key:0,toggle:$,value:M.value}):G("",!0),u.$slots["am-pm-button"]?G("",!0):(T(),z("button",{key:1,ref_key:"amPmButton",ref:b,type:"button",class:"dp__pm_am_button",role:"button","aria-label":(ae=i(c))==null?void 0:ae.amPmButton,tabindex:"0","data-compact":D.value,onClick:$,onKeydown:Z[0]||(Z[0]=ne=>i(ut)(ne,()=>$(),!0))},lt(M.value),41,mu))])),(T(!0),z(ke,null,Fe(H.value,(ne,Me)=>(T(),Oe(da,{key:Me,name:i(x)(R[ne.type]),css:i(A)},{default:De(()=>{var be,Ce;return[R[ne.type]?(T(),Oe(xa,{key:0,items:O(ne.type),"is-last":u.autoApply&&!i(v).keepActionRow,"esc-close":u.escClose,type:ne.type,"text-input":u.textInput,config:u.config,"arrow-navigation":u.arrowNavigation,"aria-labels":u.ariaLabels,"overlay-label":(Ce=(be=i(c)).timeOverlay)==null?void 0:Ce.call(be,ne.type),onSelected:We=>te(ne.type,We),onToggle:We=>W(ne.type),onResetFlow:Z[1]||(Z[1]=We=>u.$emit("reset-flow"))},ot({"button-icon":De(()=>[u.$slots["clock-icon"]?ie(u.$slots,"clock-icon",{key:0}):G("",!0),u.$slots["clock-icon"]?G("",!0):(T(),Oe(Na(u.timePickerInline?i(ca):i(_n)),{key:1}))]),_:2},[u.$slots[`${ne.type}-overlay-value`]?{name:"item",fn:De(({item:We})=>[ie(u.$slots,`${ne.type}-overlay-value`,{text:We.text,value:We.value})]),key:"0"}:void 0,u.$slots[`${ne.type}-overlay-header`]?{name:"header",fn:De(()=>[ie(u.$slots,`${ne.type}-overlay-header`,{toggle:()=>W(ne.type)})]),key:"1"}:void 0]),1032,["items","is-last","esc-close","type","text-input","config","arrow-navigation","aria-labels","overlay-label","onSelected","onToggle"])):G("",!0)]}),_:2},1032,["name","css"]))),128))]))}}}),pu=["data-dp-mobile"],yu=["aria-label","tabindex"],hu=["role","aria-label","tabindex"],gu=["aria-label"],Hr=tt({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},...kt},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:o,setTimePicker:s}=Vt(),c=Kt(),{defaultedTransitions:d,defaultedAriaLabels:P,defaultedTextInput:v,defaultedConfig:m,defaultedRange:p}=Be(r),{transitionName:x,showTransition:A}=Ma(d),{hideNavigationButtons:R}=Ba(),M=K(null),b=K(null),S=K([]),C=K(null),L=K(!1);at(()=>{a("mount"),!r.timePicker&&r.arrowNavigation?o([je(M.value)],"time"):s(!0,r.timePicker)});const U=j(()=>p.value.enabled&&r.modelAuto?xr(r.internalModelValue):!0),Y=K(!1),N=E=>({hours:Array.isArray(r.hours)?r.hours[E]:r.hours,minutes:Array.isArray(r.minutes)?r.minutes[E]:r.minutes,seconds:Array.isArray(r.seconds)?r.seconds[E]:r.seconds}),re=j(()=>{const E=[];if(p.value.enabled)for(let ee=0;ee<2;ee++)E.push(N(ee));else E.push(N(0));return E}),V=(E,ee=!1,O="")=>{ee||a("reset-flow"),Y.value=E,a(E?"overlay-opened":"overlay-closed",rt.time),r.arrowNavigation&&s(E),mt(()=>{O!==""&&S.value[0]&&S.value[0].openChildCmp(O)})},I=j(()=>({dp__btn:!0,dp__button:!0,dp__button_bottom:r.autoApply&&!m.value.keepActionRow})),se=ct(c,"timePicker"),ce=(E,ee,O)=>p.value.enabled?ee===0?[E,re.value[1][O]]:[re.value[0][O],E]:E,ye=E=>{a("update:hours",E)},y=E=>{a("update:minutes",E)},D=E=>{a("update:seconds",E)},h=()=>{if(C.value&&!v.value.enabled&&!r.noOverlayFocus){const E=Mr(C.value);E&&E.focus({preventScroll:!0})}},H=E=>{L.value=!1,a("overlay-closed",E)},J=E=>{L.value=!0,a("overlay-opened",E)};return t({toggleTimePicker:V}),(E,ee)=>{var O;return T(),z("div",{class:"dp--tp-wrap","data-dp-mobile":E.isMobile},[!E.timePicker&&!E.timePickerInline?Aa((T(),z("button",{key:0,ref_key:"openTimePickerBtn",ref:M,type:"button",class:xe({...I.value,"dp--hidden-el":Y.value}),"aria-label":(O=i(P))==null?void 0:O.openTimePicker,tabindex:E.noOverlayFocus?void 0:0,"data-test-id":"open-time-picker-btn",onKeydown:ee[0]||(ee[0]=de=>i(ut)(de,()=>V(!0))),onClick:ee[1]||(ee[1]=de=>V(!0))},[E.$slots["clock-icon"]?ie(E.$slots,"clock-icon",{key:0}):G("",!0),E.$slots["clock-icon"]?G("",!0):(T(),Oe(i(_n),{key:1}))],42,yu)),[[Ya,!i(R)(E.hideNavigation,"time")]]):G("",!0),vt(da,{name:i(x)(Y.value),css:i(A)&&!E.timePickerInline},{default:De(()=>{var de,f;return[Y.value||E.timePicker||E.timePickerInline?(T(),z("div",{key:0,ref_key:"overlayRef",ref:C,role:E.timePickerInline?void 0:"dialog",class:xe({dp__overlay:!E.timePickerInline,"dp--overlay-absolute":!r.timePicker&&!E.timePickerInline,"dp--overlay-relative":r.timePicker}),style:pt(E.timePicker?{height:`${i(m).modeHeight}px`}:void 0),"aria-label":(de=i(P))==null?void 0:de.timePicker,tabindex:E.timePickerInline?void 0:0},[ge("div",{class:xe(E.timePickerInline?"dp__time_picker_inline_container":"dp__overlay_container dp__container_flex dp__time_picker_overlay_container"),style:{display:"flex"}},[E.$slots["time-picker-overlay"]?ie(E.$slots,"time-picker-overlay",{key:0,hours:e.hours,minutes:e.minutes,seconds:e.seconds,setHours:ye,setMinutes:y,setSeconds:D}):G("",!0),E.$slots["time-picker-overlay"]?G("",!0):(T(),z("div",{key:1,class:xe(E.timePickerInline?"dp__flex":"dp__overlay_row dp__flex_row")},[(T(!0),z(ke,null,Fe(re.value,(k,F)=>Aa((T(),Oe(fu,Je({key:F,ref_for:!0},{...E.$props,order:F,hours:k.hours,minutes:k.minutes,seconds:k.seconds,closeTimePickerBtn:b.value,disabledTimesConfig:e.disabledTimesConfig,disabled:F===0?i(p).fixedStart:i(p).fixedEnd},{ref_for:!0,ref_key:"timeInputRefs",ref:S,"validate-time":(W,l)=>e.validateTime(W,ce(l,F,W)),"onUpdate:hours":W=>ye(ce(W,F,"hours")),"onUpdate:minutes":W=>y(ce(W,F,"minutes")),"onUpdate:seconds":W=>D(ce(W,F,"seconds")),onMounted:h,onOverlayClosed:H,onOverlayOpened:J,onAmPmChange:ee[2]||(ee[2]=W=>E.$emit("am-pm-change",W))}),ot({_:2},[Fe(i(se),(W,l)=>({name:W,fn:De(_=>[ie(E.$slots,W,Je({ref_for:!0},_))])}))]),1040,["validate-time","onUpdate:hours","onUpdate:minutes","onUpdate:seconds"])),[[Ya,F===0?!0:U.value]])),128))],2)),!E.timePicker&&!E.timePickerInline?Aa((T(),z("button",{key:2,ref_key:"closeTimePickerBtn",ref:b,type:"button",class:xe({...I.value,"dp--hidden-el":L.value}),"aria-label":(f=i(P))==null?void 0:f.closeTimePicker,tabindex:"0",onKeydown:ee[3]||(ee[3]=k=>i(ut)(k,()=>V(!1))),onClick:ee[4]||(ee[4]=k=>V(!1))},[E.$slots["calendar-icon"]?ie(E.$slots,"calendar-icon",{key:0}):G("",!0),E.$slots["calendar-icon"]?G("",!0):(T(),Oe(i(ca),{key:1}))],42,gu)),[[Ya,!i(R)(E.hideNavigation,"time")]]):G("",!0)],2)],14,hu)):G("",!0)]}),_:3},8,["name","css"])],8,pu)}}}),Vr=(e,t,n,a)=>{const{defaultedRange:r}=Be(e),o=(C,L)=>Array.isArray(t[C])?t[C][L]:t[C],s=C=>e.enableSeconds?Array.isArray(t.seconds)?t.seconds[C]:t.seconds:0,c=(C,L)=>C?L!==void 0?Lt(C,o("hours",L),o("minutes",L),s(L)):Lt(C,t.hours,t.minutes,s()):br(q(),s(L)),d=(C,L)=>{t[C]=L},P=j(()=>e.modelAuto&&r.value.enabled?Array.isArray(n.value)?n.value.length>1:!1:r.value.enabled),v=(C,L)=>{const U=Object.fromEntries(Object.keys(t).map(Y=>Y===C?[Y,L]:[Y,t[Y]].slice()));if(P.value&&!r.value.disableTimeRangeValidation){const Y=re=>n.value?Lt(n.value[re],U.hours[re],U.minutes[re],U.seconds[re]):null,N=re=>wr(n.value[re],0);return!(Te(Y(0),Y(1))&&(Gt(Y(0),N(1))||la(Y(1),N(0))))}return!0},m=(C,L)=>{v(C,L)&&(d(C,L),a&&a())},p=C=>{m("hours",C)},x=C=>{m("minutes",C)},A=C=>{m("seconds",C)},R=(C,L,U,Y)=>{L&&p(C),!L&&!U&&x(C),U&&A(C),n.value&&Y(n.value)},M=C=>{if(C){const L=Array.isArray(C),U=L?[+C[0].hours,+C[1].hours]:+C.hours,Y=L?[+C[0].minutes,+C[1].minutes]:+C.minutes,N=L?[+C[0].seconds,+C[1].seconds]:+C.seconds;d("hours",U),d("minutes",Y),e.enableSeconds&&d("seconds",N)}},b=(C,L)=>{const U={hours:Array.isArray(t.hours)?t.hours[C]:t.hours,disabledArr:[]};return(L||L===0)&&(U.hours=L),Array.isArray(e.disabledTimes)&&(U.disabledArr=r.value.enabled&&Array.isArray(e.disabledTimes[C])?e.disabledTimes[C]:e.disabledTimes),U},S=j(()=>(C,L)=>{var U;if(Array.isArray(e.disabledTimes)){const{disabledArr:Y,hours:N}=b(C,L),re=Y.filter(V=>+V.hours===N);return((U=re[0])==null?void 0:U.minutes)==="*"?{hours:[N],minutes:void 0,seconds:void 0}:{hours:[],minutes:re?.map(V=>+V.minutes)??[],seconds:re?.map(V=>V.seconds?+V.seconds:void 0)??[]}}return{hours:[],minutes:[],seconds:[]}});return{setTime:d,updateHours:p,updateMinutes:x,updateSeconds:A,getSetDateTime:c,updateTimeValues:R,getSecondsValue:s,assignStartTime:M,validateTime:v,disabledTimesConfig:S}},wu=(e,t)=>{const n=()=>{e.isTextInputDate&&L()},{modelValue:a,time:r}=Pa(e,t,n),{defaultedStartTime:o,defaultedRange:s,defaultedTz:c}=Be(e),{updateTimeValues:d,getSetDateTime:P,setTime:v,assignStartTime:m,disabledTimesConfig:p,validateTime:x}=Vr(e,r,a,A);function A(){t("update-flow-step")}const R=Y=>{const{hours:N,minutes:re,seconds:V}=Y;return{hours:+N,minutes:+re,seconds:V?+V:0}},M=()=>{if(e.startTime){if(Array.isArray(e.startTime)){const N=R(e.startTime[0]),re=R(e.startTime[1]);return[Ne(q(),N),Ne(q(),re)]}const Y=R(e.startTime);return Ne(q(),Y)}return s.value.enabled?[null,null]:null},b=()=>{if(s.value.enabled){const[Y,N]=M();a.value=[dt(P(Y,0),c.value.timezone),dt(P(N,1),c.value.timezone)]}else a.value=dt(P(M()),c.value.timezone)},S=Y=>Array.isArray(Y)?[jt(q(Y[0])),jt(q(Y[1]))]:[jt(Y??q())],C=(Y,N,re)=>{v("hours",Y),v("minutes",N),v("seconds",e.enableSeconds?re:0)},L=()=>{const[Y,N]=S(a.value);return s.value.enabled?C([Y.hours,N.hours],[Y.minutes,N.minutes],[Y.seconds,N.seconds]):C(Y.hours,Y.minutes,Y.seconds)};at(()=>{if(!e.shadow)return m(o.value),a.value?L():b()});const U=()=>{Array.isArray(a.value)?a.value=a.value.map((Y,N)=>Y&&P(Y,N)):a.value=P(a.value),t("time-update")};return{modelValue:a,time:r,disabledTimesConfig:p,updateTime:(Y,N=!0,re=!1)=>{d(Y,N,re,U)},validateTime:x}},bu=tt({compatConfig:{MODE:3},__name:"TimePickerSolo",props:{...kt},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,o=Kt(),s=ct(o,"timePicker"),c=K(null),{time:d,modelValue:P,disabledTimesConfig:v,updateTime:m,validateTime:p}=wu(r,a);return at(()=>{r.shadow||a("mount",null)}),t({getSidebarProps:()=>({modelValue:P,time:d,updateTime:m}),toggleTimePicker:(x,A=!1,R="")=>{var M;(M=c.value)==null||M.toggleTimePicker(x,A,R)}}),(x,A)=>(T(),Oe(Ea,{"multi-calendars":0,stretch:"","is-mobile":x.isMobile},{default:De(()=>[vt(Hr,Je({ref_key:"tpRef",ref:c},x.$props,{hours:i(d).hours,minutes:i(d).minutes,seconds:i(d).seconds,"internal-model-value":x.internalModelValue,"disabled-times-config":i(v),"validate-time":i(p),"onUpdate:hours":A[0]||(A[0]=R=>i(m)(R)),"onUpdate:minutes":A[1]||(A[1]=R=>i(m)(R,!1)),"onUpdate:seconds":A[2]||(A[2]=R=>i(m)(R,!1,!0)),onAmPmChange:A[3]||(A[3]=R=>x.$emit("am-pm-change",R)),onResetFlow:A[4]||(A[4]=R=>x.$emit("reset-flow")),onOverlayClosed:A[5]||(A[5]=R=>x.$emit("overlay-toggle",{open:!1,overlay:R})),onOverlayOpened:A[6]||(A[6]=R=>x.$emit("overlay-toggle",{open:!0,overlay:R}))}),ot({_:2},[Fe(i(s),(R,M)=>({name:R,fn:De(b=>[ie(x.$slots,R,Ze(it(b)))])}))]),1040,["hours","minutes","seconds","internal-model-value","disabled-times-config","validate-time"])]),_:3},8,["is-mobile"]))}}),_u={class:"dp--header-wrap"},ku={key:0,class:"dp__month_year_wrap"},Du={key:0},xu={class:"dp__month_year_wrap"},Mu=["data-dp-element","aria-label","data-test-id","onClick","onKeydown"],Pu=tt({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:()=>[]},...kt},emits:["update-month-year","mount","reset-flow","overlay-closed","overlay-opened"],setup(e,{expose:t,emit:n}){const a=n,r=e,{defaultedTransitions:o,defaultedAriaLabels:s,defaultedMultiCalendars:c,defaultedFilters:d,defaultedConfig:P,defaultedHighlight:v,propDates:m,defaultedUI:p}=Be(r),{transitionName:x,showTransition:A}=Ma(o),{buildMatrix:R}=Vt(),{handleMonthYearChange:M,isDisabled:b,updateMonthYear:S}=Us(r,a),{showLeftIcon:C,showRightIcon:L}=Ba(),U=K(!1),Y=K(!1),N=K(!1),re=K([null,null,null,null]);at(()=>{a("mount")});const V=f=>({get:()=>r[f],set:k=>{const F=f===ht.month?ht.year:ht.month;a("update-month-year",{[f]:k,[F]:r[F]}),f===ht.month?H(!0):J(!0)}}),I=j(V(ht.month)),se=j(V(ht.year)),ce=j(()=>f=>({month:r.month,year:r.year,items:f===ht.month?r.months:r.years,instance:r.instance,updateMonthYear:S,toggle:f===ht.month?H:J})),ye=j(()=>r.months.find(k=>k.value===r.month)||{text:"",value:0}),y=j(()=>sa(r.months,f=>{const k=r.month===f.value,F=ba(f.value,$r(r.year,m.value.minDate),Ar(r.year,m.value.maxDate))||d.value.months.includes(f.value),W=Nr(v.value,f.value,r.year);return{active:k,disabled:F,highlighted:W}})),D=j(()=>sa(r.years,f=>{const k=r.year===f.value,F=ba(f.value,ua(m.value.minDate),ua(m.value.maxDate))||d.value.years.includes(f.value),W=On(v.value,f.value);return{active:k,disabled:F,highlighted:W}})),h=(f,k,F)=>{F!==void 0?f.value=F:f.value=!f.value,f.value?(N.value=!0,a("overlay-opened",k)):(N.value=!1,a("overlay-closed",k))},H=(f=!1,k)=>{E(f),h(U,rt.month,k)},J=(f=!1,k)=>{E(f),h(Y,rt.year,k)},E=f=>{f||a("reset-flow")},ee=(f,k)=>{r.arrowNavigation&&(re.value[k]=je(f),R(re.value,"monthYear"))},O=j(()=>{var f,k,F,W,l,_;return[{type:ht.month,index:1,toggle:H,modelValue:I.value,updateModelValue:oe=>I.value=oe,text:ye.value.text,showSelectionGrid:U.value,items:y.value,ariaLabel:(f=s.value)==null?void 0:f.openMonthsOverlay,overlayLabel:((F=(k=s.value).monthPicker)==null?void 0:F.call(k,!0))??void 0},{type:ht.year,index:2,toggle:J,modelValue:se.value,updateModelValue:oe=>se.value=oe,text:Pr(r.year,r.locale),showSelectionGrid:Y.value,items:D.value,ariaLabel:(W=s.value)==null?void 0:W.openYearsOverlay,overlayLabel:((_=(l=s.value).yearPicker)==null?void 0:_.call(l,!0))??void 0}]}),de=j(()=>r.disableYearSelect?[O.value[0]]:r.yearFirst?[...O.value].reverse():O.value);return t({toggleMonthPicker:H,toggleYearPicker:J,handleMonthYearChange:M}),(f,k)=>{var F,W,l,_,oe,Ye;return T(),z("div",_u,[f.$slots["month-year"]?(T(),z("div",ku,[ie(f.$slots,"month-year",Ze(it({month:e.month,year:e.year,months:e.months,years:e.years,updateMonthYear:i(S),handleMonthYearChange:i(M),instance:e.instance,isDisabled:i(b)})))])):(T(),z(ke,{key:1},[f.$slots["top-extra"]?(T(),z("div",Du,[ie(f.$slots,"top-extra",{value:f.internalModelValue})])):G("",!0),ge("div",xu,[i(C)(i(c),e.instance)&&!f.vertical?(T(),Oe(ya,{key:0,"aria-label":(F=i(s))==null?void 0:F.prevMonth,disabled:i(b)(!1),class:xe((W=i(p))==null?void 0:W.navBtnPrev),"el-name":"action-prev",onActivate:k[0]||(k[0]=$=>i(M)(!1,!0)),onSetRef:k[1]||(k[1]=$=>ee($,0))},{default:De(()=>[f.$slots["arrow-left"]?ie(f.$slots,"arrow-left",{key:0}):G("",!0),f.$slots["arrow-left"]?G("",!0):(T(),Oe(i(wn),{key:1}))]),_:3},8,["aria-label","disabled","class"])):G("",!0),ge("div",{class:xe(["dp__month_year_wrap",{dp__year_disable_select:f.disableYearSelect}])},[(T(!0),z(ke,null,Fe(de.value,($,we)=>(T(),z(ke,{key:$.type},[ge("button",{ref_for:!0,ref:Q=>ee(Q,we+1),type:"button","data-dp-element":`overlay-${$.type}`,class:xe(["dp__btn dp__month_year_select",{"dp--hidden-el":N.value}]),"aria-label":`${$.text}-${$.ariaLabel}`,"data-test-id":`${$.type}-toggle-overlay-${e.instance}`,onClick:$.toggle,onKeydown:Q=>i(ut)(Q,()=>$.toggle(),!0)},[f.$slots[$.type]?ie(f.$slots,$.type,{key:0,text:$.text,value:r[$.type]}):G("",!0),f.$slots[$.type]?G("",!0):(T(),z(ke,{key:1},[Rt(lt($.text),1)],64))],42,Mu),vt(da,{name:i(x)($.showSelectionGrid),css:i(A)},{default:De(()=>[$.showSelectionGrid?(T(),Oe(xa,{key:0,items:$.items,"arrow-navigation":f.arrowNavigation,"hide-navigation":f.hideNavigation,"is-last":f.autoApply&&!i(P).keepActionRow,"skip-button-ref":!1,config:f.config,type:$.type,"header-refs":[],"esc-close":f.escClose,"menu-wrap-ref":f.menuWrapRef,"text-input":f.textInput,"aria-labels":f.ariaLabels,"overlay-label":$.overlayLabel,onSelected:$.updateModelValue,onToggle:$.toggle},ot({"button-icon":De(()=>[f.$slots["calendar-icon"]?ie(f.$slots,"calendar-icon",{key:0}):G("",!0),f.$slots["calendar-icon"]?G("",!0):(T(),Oe(i(ca),{key:1}))]),_:2},[f.$slots[`${$.type}-overlay-value`]?{name:"item",fn:De(({item:Q})=>[ie(f.$slots,`${$.type}-overlay-value`,{text:Q.text,value:Q.value})]),key:"0"}:void 0,f.$slots[`${$.type}-overlay`]?{name:"overlay",fn:De(()=>[ie(f.$slots,`${$.type}-overlay`,Je({ref_for:!0},ce.value($.type)))]),key:"1"}:void 0,f.$slots[`${$.type}-overlay-header`]?{name:"header",fn:De(()=>[ie(f.$slots,`${$.type}-overlay-header`,{toggle:$.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"])):G("",!0)]),_:2},1032,["name","css"])],64))),128))],2),i(C)(i(c),e.instance)&&f.vertical?(T(),Oe(ya,{key:1,"aria-label":(l=i(s))==null?void 0:l.prevMonth,"el-name":"action-prev",disabled:i(b)(!1),class:xe((_=i(p))==null?void 0:_.navBtnPrev),onActivate:k[2]||(k[2]=$=>i(M)(!1,!0))},{default:De(()=>[f.$slots["arrow-up"]?ie(f.$slots,"arrow-up",{key:0}):G("",!0),f.$slots["arrow-up"]?G("",!0):(T(),Oe(i(kn),{key:1}))]),_:3},8,["aria-label","disabled","class"])):G("",!0),i(L)(i(c),e.instance)?(T(),Oe(ya,{key:2,ref:"rightIcon","el-name":"action-next",disabled:i(b)(!0),"aria-label":(oe=i(s))==null?void 0:oe.nextMonth,class:xe((Ye=i(p))==null?void 0:Ye.navBtnNext),onActivate:k[3]||(k[3]=$=>i(M)(!0,!0)),onSetRef:k[4]||(k[4]=$=>ee($,f.disableYearSelect?2:3))},{default:De(()=>[f.$slots[f.vertical?"arrow-down":"arrow-right"]?ie(f.$slots,f.vertical?"arrow-down":"arrow-right",{key:0}):G("",!0),f.$slots[f.vertical?"arrow-down":"arrow-right"]?G("",!0):(T(),Oe(Na(f.vertical?i(Dn):i(bn)),{key:1}))]),_:3},8,["disabled","aria-label","class"])):G("",!0)])],64))])}}}),Tu={class:"dp__calendar_header",role:"row"},Ou={key:0,class:"dp__calendar_header_item",role:"gridcell"},$u=["aria-label"],Au={key:0,class:"dp__calendar_item dp__week_num",role:"gridcell"},Yu={class:"dp__cell_inner"},Cu=["id","aria-pressed","aria-disabled","aria-label","tabindex","data-test-id","onClick","onTouchend","onKeydown","onMouseenter","onMouseleave","onMousedown"],Ru=tt({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},...kt},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:o}=Vt(),{defaultedTransitions:s,defaultedConfig:c,defaultedAriaLabels:d,defaultedMultiCalendars:P,defaultedWeekNumbers:v,defaultedMultiDates:m,defaultedUI:p}=Be(r),x=K(null),A=K({bottom:"",left:"",transform:""}),R=K([]),M=K(null),b=K(!0),S=K(""),C=K({startX:0,endX:0,startY:0,endY:0}),L=K([]),U=K({left:"50%"}),Y=K(!1),N=j(()=>r.calendar?r.calendar(r.mappedDates):r.mappedDates),re=j(()=>r.dayNames?Array.isArray(r.dayNames)?r.dayNames:r.dayNames(r.locale,+r.weekStart):vs(r.formatLocale,r.locale,+r.weekStart));at(()=>{a("mount",{cmp:"calendar",refs:R}),c.value.noSwipe||M.value&&(M.value.addEventListener("touchstart",ee,{passive:!1}),M.value.addEventListener("touchend",O,{passive:!1}),M.value.addEventListener("touchmove",de,{passive:!1})),r.monthChangeOnScroll&&M.value&&M.value.addEventListener("wheel",F,{passive:!1})}),ia(()=>{c.value.noSwipe||M.value&&(M.value.removeEventListener("touchstart",ee),M.value.removeEventListener("touchend",O),M.value.removeEventListener("touchmove",de)),r.monthChangeOnScroll&&M.value&&M.value.removeEventListener("wheel",F)});const V=$=>$?r.vertical?"vNext":"next":r.vertical?"vPrevious":"previous",I=($,we)=>{if(r.transitions){const Q=et(Ct(q(),r.month,r.year));S.value=qe(et(Ct(q(),$,we)),Q)?s.value[V(!0)]:s.value[V(!1)],b.value=!1,mt(()=>{b.value=!0})}},se=j(()=>({...p.value.calendar??{}})),ce=j(()=>$=>{const we=fs($);return{dp__marker_dot:we.type==="dot",dp__marker_line:we.type==="line"}}),ye=j(()=>$=>Te($,x.value)),y=j(()=>({dp__calendar:!0,dp__calendar_next:P.value.count>0&&r.instance!==0})),D=j(()=>$=>r.hideOffsetDates?$.current:!0),h=async($,we)=>{const{width:Q,height:te}=$.getBoundingClientRect();x.value=we.value;let u={left:`${Q/2}px`},Z=-50;if(await mt(),L.value[0]){const{left:ae,width:ne}=L.value[0].getBoundingClientRect();ae<0&&(u={left:"0"},Z=0,U.value.left=`${Q/2}px`),window.innerWidth{var te,u,Z;const ae=je(R.value[we][Q]);ae&&((te=$.marker)!=null&&te.customPosition&&(Z=(u=$.marker)==null?void 0:u.tooltip)!=null&&Z.length?A.value=$.marker.customPosition(ae):await h(ae,$),a("tooltip-open",$.marker))},J=async($,we,Q)=>{var te,u;if(Y.value&&m.value.enabled&&m.value.dragSelect)return a("select-date",$);if(a("set-hover-date",$),(u=(te=$.marker)==null?void 0:te.tooltip)!=null&&u.length){if(r.hideOffsetDates&&!$.current)return;await H($,we,Q)}},E=$=>{x.value&&(x.value=null,A.value=JSON.parse(JSON.stringify({bottom:"",left:"",transform:""})),a("tooltip-close",$.marker))},ee=$=>{C.value.startX=$.changedTouches[0].screenX,C.value.startY=$.changedTouches[0].screenY},O=$=>{C.value.endX=$.changedTouches[0].screenX,C.value.endY=$.changedTouches[0].screenY,f()},de=$=>{r.vertical&&!r.inline&&$.preventDefault()},f=()=>{const $=r.vertical?"Y":"X";Math.abs(C.value[`start${$}`]-C.value[`end${$}`])>10&&a("handle-swipe",C.value[`start${$}`]>C.value[`end${$}`]?"right":"left")},k=($,we,Q)=>{$&&(Array.isArray(R.value[we])?R.value[we][Q]=$:R.value[we]=[$]),r.arrowNavigation&&o(R.value,"calendar")},F=$=>{r.monthChangeOnScroll&&($.preventDefault(),a("handle-scroll",$))},W=$=>v.value.type==="local"?yn($.value,{weekStartsOn:+r.weekStart}):v.value.type==="iso"?fn($.value):typeof v.value.type=="function"?v.value.type($.value):"",l=$=>{const we=$[0];return v.value.hideOnOffsetDates?$.some(Q=>Q.current)?W(we):"":W(we)},_=($,we,Q=!0)=>{!Q&&ws()||(!m.value.enabled||c.value.allowPreventDefault)&&(Bt($,c.value),a("select-date",we))},oe=$=>{Bt($,c.value)},Ye=$=>{m.value.enabled&&m.value.dragSelect?(Y.value=!0,a("select-date",$)):m.value.enabled&&a("select-date",$)};return t({triggerTransition:I}),($,we)=>(T(),z("div",{class:xe(y.value)},[ge("div",{ref_key:"calendarWrapRef",ref:M,class:xe(se.value),role:"grid"},[ge("div",Tu,[$.weekNumbers?(T(),z("div",Ou,lt($.weekNumName),1)):G("",!0),(T(!0),z(ke,null,Fe(re.value,(Q,te)=>{var u,Z;return T(),z("div",{key:te,class:"dp__calendar_header_item",role:"gridcell","data-test-id":"calendar-header","aria-label":(Z=(u=i(d))==null?void 0:u.weekDay)==null?void 0:Z.call(u,te)},[$.$slots["calendar-header"]?ie($.$slots,"calendar-header",{key:0,day:Q,index:te}):G("",!0),$.$slots["calendar-header"]?G("",!0):(T(),z(ke,{key:1},[Rt(lt(Q),1)],64))],8,$u)}),128))]),we[2]||(we[2]=ge("div",{class:"dp__calendar_header_separator"},null,-1)),vt(da,{name:S.value,css:!!$.transitions},{default:De(()=>[b.value?(T(),z("div",{key:0,class:"dp__calendar",role:"rowgroup",onMouseleave:we[1]||(we[1]=Q=>Y.value=!1)},[(T(!0),z(ke,null,Fe(N.value,(Q,te)=>(T(),z("div",{key:te,class:"dp__calendar_row",role:"row"},[$.weekNumbers?(T(),z("div",Au,[ge("div",Yu,lt(l(Q.days)),1)])):G("",!0),(T(!0),z(ke,null,Fe(Q.days,(u,Z)=>{var ae,ne,Me;return T(),z("div",{id:i(vn)(u.value),ref_for:!0,ref:be=>k(be,te,Z),key:Z+te,role:"gridcell",class:"dp__calendar_item","aria-pressed":(u.classData.dp__active_date||u.classData.dp__range_start||u.classData.dp__range_start)??void 0,"aria-disabled":u.classData.dp__cell_disabled||void 0,"aria-label":(ne=(ae=i(d))==null?void 0:ae.day)==null?void 0:ne.call(ae,u),tabindex:!u.current&&$.hideOffsetDates?void 0:0,"data-test-id":i(vn)(u.value),onClick:ga(be=>_(be,u),["prevent"]),onTouchend:be=>_(be,u,!1),onKeydown:be=>i(ut)(be,()=>$.$emit("select-date",u)),onMouseenter:be=>J(u,te,Z),onMouseleave:be=>E(u),onMousedown:be=>Ye(u),onMouseup:we[0]||(we[0]=be=>Y.value=!1)},[ge("div",{class:xe(["dp__cell_inner",u.classData])},[$.$slots.day&&D.value(u)?ie($.$slots,"day",{key:0,day:+u.text,date:u.value}):G("",!0),$.$slots.day?G("",!0):(T(),z(ke,{key:1},[Rt(lt(u.text),1)],64)),u.marker&&D.value(u)?(T(),z(ke,{key:2},[$.$slots.marker?ie($.$slots,"marker",{key:0,marker:u.marker,day:+u.text,date:u.value}):(T(),z("div",{key:1,class:xe(ce.value(u.marker)),style:pt(u.marker.color?{backgroundColor:u.marker.color}:{})},null,6))],64)):G("",!0),ye.value(u.value)?(T(),z("div",{key:3,ref_for:!0,ref_key:"activeTooltip",ref:L,class:"dp__marker_tooltip",style:pt(A.value)},[(Me=u.marker)!=null&&Me.tooltip?(T(),z("div",{key:0,class:"dp__tooltip_content",onClick:oe},[(T(!0),z(ke,null,Fe(u.marker.tooltip,(be,Ce)=>(T(),z("div",{key:Ce,class:"dp__tooltip_text"},[$.$slots["marker-tooltip"]?ie($.$slots,"marker-tooltip",{key:0,tooltip:be,day:u.value}):G("",!0),$.$slots["marker-tooltip"]?G("",!0):(T(),z(ke,{key:1},[ge("div",{class:"dp__tooltip_mark",style:pt(be.color?{backgroundColor:be.color}:{})},null,4),ge("div",null,lt(be.text),1)],64))]))),128)),ge("div",{class:"dp__arrow_bottom_tp",style:pt(U.value)},null,4)])):G("",!0)],4)):G("",!0)],2)],40,Cu)}),128))]))),128))],32)):G("",!0)]),_:3},8,["name","css"])],2)],2))}}),Xn=e=>Array.isArray(e),Su=(e,t,n,a)=>{const r=K([]),o=K(new Date),s=K(),c=()=>O(e.isTextInputDate),{modelValue:d,calendars:P,time:v,today:m}=Pa(e,t,c),{defaultedMultiCalendars:p,defaultedStartTime:x,defaultedRange:A,defaultedConfig:R,defaultedTz:M,propDates:b,defaultedMultiDates:S}=Be(e),{validateMonthYearInRange:C,isDisabled:L,isDateRangeAllowed:U,checkMinMaxRange:Y}=Wt(e),{updateTimeValues:N,getSetDateTime:re,setTime:V,assignStartTime:I,validateTime:se,disabledTimesConfig:ce}=Vr(e,v,d,a),ye=j(()=>w=>P.value[w]?P.value[w].month:0),y=j(()=>w=>P.value[w]?P.value[w].year:0),D=w=>!R.value.keepViewOnOffsetClick||w?!0:!s.value,h=(w,X,fe,_e=!1)=>{var B,ue;D(_e)&&(P.value[w]||(P.value[w]={month:0,year:0}),P.value[w].month=qn(X)?(B=P.value[w])==null?void 0:B.month:X,P.value[w].year=qn(fe)?(ue=P.value[w])==null?void 0:ue.year:fe)},H=()=>{e.autoApply&&t("select-date")},J=()=>{x.value&&I(x.value)};at(()=>{e.shadow||(d.value||(we(),J()),O(!0),e.focusStartDate&&e.startDate&&we())});const E=j(()=>{var w;return(w=e.flow)!=null&&w.length&&!e.partialFlow?e.flowStep===e.flow.length:!0}),ee=()=>{e.autoApply&&E.value&&t("auto-apply",e.partialFlow?e.flowStep!==e.flow.length:!1)},O=(w=!1)=>{if(d.value)return Array.isArray(d.value)?(r.value=d.value,_(w)):k(d.value,w);if(p.value.count&&w&&!e.startDate)return f(q(),w)},de=()=>Array.isArray(d.value)&&A.value.enabled?Pe(d.value[0])===Pe(d.value[1]??d.value[0]):!1,f=(w=new Date,X=!1)=>{if((!p.value.count||!p.value.static||X)&&h(0,Pe(w),he(w)),p.value.count&&(!d.value||de()||!p.value.solo)&&(!p.value.solo||X))for(let fe=1;fe{f(w),V("hours",St(w)),V("minutes",Ht(w)),V("seconds",ra(w)),p.value.count&&X&&$()},F=w=>{if(p.value.count){if(p.value.solo)return 0;const X=Pe(w[0]),fe=Pe(w[1]);return Math.abs(fe-X){w[1]&&A.value.showLastInRange?f(w[F(w)],X):f(w[0],X);const fe=(_e,B)=>[_e(w[0]),w[1]?_e(w[1]):v[B][1]];V("hours",fe(St,"hours")),V("minutes",fe(Ht,"minutes")),V("seconds",fe(ra,"seconds"))},l=(w,X)=>{if((A.value.enabled||e.weekPicker)&&!S.value.enabled)return W(w,X);if(S.value.enabled&&X){const fe=w[w.length-1];return k(fe,X)}},_=w=>{const X=d.value;l(X,w),p.value.count&&p.value.solo&&$()},oe=(w,X)=>{const fe=Ne(q(),{month:ye.value(X),year:y.value(X)}),_e=w<0?bt(fe,1):oa(fe,1);C(Pe(_e),he(_e),w<0,e.preventMinMaxNavigation)&&(h(X,Pe(_e),he(_e)),t("update-month-year",{instance:X,month:Pe(_e),year:he(_e)}),p.value.count&&!p.value.solo&&Ye(X),n())},Ye=w=>{for(let X=w-1;X>=0;X--){const fe=oa(Ne(q(),{month:ye.value(X+1),year:y.value(X+1)}),1);h(X,Pe(fe),he(fe))}for(let X=w+1;X<=p.value.count-1;X++){const fe=bt(Ne(q(),{month:ye.value(X-1),year:y.value(X-1)}),1);h(X,Pe(fe),he(fe))}},$=()=>{if(Array.isArray(d.value)&&d.value.length===2){const w=q(q(d.value[1]?d.value[1]:bt(d.value[0],1))),[X,fe]=[Pe(d.value[0]),he(d.value[0])],[_e,B]=[Pe(d.value[1]),he(d.value[1])];(X!==_e||X===_e&&fe!==B)&&p.value.solo&&h(1,Pe(w),he(w))}else d.value&&!Array.isArray(d.value)&&(h(0,Pe(d.value),he(d.value)),f(q()))},we=()=>{e.startDate&&(h(0,Pe(q(e.startDate)),he(q(e.startDate))),p.value.count&&Ye(0))},Q=(w,X)=>{if(e.monthChangeOnScroll){const fe=new Date().getTime()-o.value.getTime(),_e=Math.abs(w.deltaY);let B=500;_e>1&&(B=100),_e>100&&(B=0),fe>B&&(o.value=new Date,oe(e.monthChangeOnScroll!=="inverse"?-w.deltaY:w.deltaY,X))}},te=(w,X,fe=!1)=>{e.monthChangeOnArrows&&e.vertical===fe&&u(w,X)},u=(w,X)=>{oe(w==="right"?-1:1,X)},Z=w=>{if(b.value.markers)return Sa(w.value,b.value.markers)},ae=(w,X)=>{switch(e.sixWeeks===!0?"append":e.sixWeeks){case"prepend":return[!0,!1];case"center":return[w==0,!0];case"fair":return[w==0||X>w,!0];case"append":return[!1,!1];default:return[!1,!1]}},ne=(w,X,fe,_e)=>{if(e.sixWeeks&&w.length<6){const B=6-w.length,ue=(X.getDay()+7-_e)%7,me=6-(fe.getDay()+7-_e)%7,[At,Mt]=ae(ue,me);for(let zt=1;zt<=B;zt++)if(Mt?!!(zt%2)==At:At){const Nt=w[0].days[0],Ua=Me(ft(Nt.value,-7),Pe(X));w.unshift({days:Ua})}else{const Nt=w[w.length-1],Ua=Nt.days[Nt.days.length-1],qr=Me(ft(Ua.value,1),Pe(X));w.push({days:qr})}}return w},Me=(w,X)=>{const fe=q(w),_e=[];for(let B=0;B<7;B++){const ue=ft(fe,B),me=Pe(ue)!==X;_e.push({text:e.hideOffsetDates&&me?"":ue.getDate(),value:ue,current:!me,classData:{}})}return _e},be=(w,X)=>{const fe=[],_e=new Date(X,w),B=new Date(X,w+1,0),ue=e.weekStart,me=_t(_e,{weekStartsOn:ue}),At=Mt=>{const zt=Me(Mt,w);if(fe.push({days:zt}),!fe[fe.length-1].days.some(Nt=>Te(et(Nt.value),et(B)))){const Nt=ft(Mt,7);At(Nt)}};return At(me),ne(fe,_e,B,ue)},Ce=w=>{const X=Lt(q(w.value),v.hours,v.minutes,ve());t("date-update",X),S.value.enabled?$n(X,d,S.value.limit):d.value=X,a(),mt().then(()=>{ee()})},We=w=>A.value.noDisabledRange?Yr(r.value[0],w).some(X=>L(X)):!1,g=()=>{r.value=d.value?d.value.slice():[],r.value.length===2&&!(A.value.fixedStart||A.value.fixedEnd)&&(r.value=[])},le=(w,X)=>{const fe=[q(w.value),ft(q(w.value),+A.value.autoRange)];U(fe)?(X&&$e(w.value),r.value=fe):t("invalid-date",w.value)},$e=w=>{const X=Pe(q(w)),fe=he(q(w));if(h(0,X,fe),p.value.count>0)for(let _e=1;_e{if(We(w.value)||!Y(w.value,d.value,A.value.fixedStart?0:1))return t("invalid-date",w.value);r.value=Br(q(w.value),d,t,A)},Dt=(w,X)=>{if(g(),A.value.autoRange)return le(w,X);if(A.value.fixedStart||A.value.fixedEnd)return Ge(w);r.value[0]?Y(q(w.value),d.value)&&!We(w.value)?He(q(w.value),q(r.value[0]))?(r.value.unshift(q(w.value)),t("range-end",r.value[0])):(r.value[1]=q(w.value),t("range-end",r.value[1])):(e.autoApply&&t("auto-apply-invalid",w.value),t("invalid-date",w.value)):(r.value[0]=q(w.value),t("range-start",r.value[0]))},ve=(w=!0)=>e.enableSeconds?Array.isArray(v.seconds)?w?v.seconds[0]:v.seconds[1]:v.seconds:0,Ke=w=>{r.value[w]=Lt(r.value[w],v.hours[w],v.minutes[w],ve(w!==1))},xt=()=>{var w,X;r.value[0]&&r.value[1]&&+((w=r.value)==null?void 0:w[0])>+((X=r.value)==null?void 0:X[1])&&(r.value.reverse(),t("range-start",r.value[0]),t("range-end",r.value[1]))},La=()=>{r.value.length&&(r.value[0]&&!r.value[1]?Ke(0):(Ke(0),Ke(1),a()),xt(),d.value=r.value.slice(),Fa(r.value,t,e.autoApply,e.modelAuto))},Ta=(w,X=!1)=>{if(L(w.value)||!w.current&&e.hideOffsetDates)return t("invalid-date",w.value);if(s.value=JSON.parse(JSON.stringify(w)),!A.value.enabled)return Ce(w);Xn(v.hours)&&Xn(v.minutes)&&!S.value.enabled&&(Dt(w,X),La())},Ha=(w,X)=>{var fe;h(w,X.month,X.year,!0),p.value.count&&!p.value.solo&&Ye(w),t("update-month-year",{instance:w,month:X.month,year:X.year}),n(p.value.solo?w:void 0);const _e=(fe=e.flow)!=null&&fe.length?e.flow[e.flowStep]:void 0;!X.fromNav&&(_e===rt.month||_e===rt.year)&&a()},Va=(w,X)=>{Fr({value:w,modelValue:d,range:A.value.enabled,timezone:X?void 0:M.value.timezone}),H(),e.multiCalendars&&mt().then(()=>O(!0))},Wa=()=>{const w=xn(q(),M.value);!A.value.enabled&&!S.value.enabled?d.value=w:d.value&&Array.isArray(d.value)&&d.value[0]?S.value.enabled?d.value=[...d.value,w]:d.value=He(w,d.value[0])?[w,d.value[0]]:[d.value[0],w]:d.value=[w],H()},za=()=>{if(Array.isArray(d.value))if(S.value.enabled){const w=qa();d.value[d.value.length-1]=re(w)}else d.value=d.value.map((w,X)=>w&&re(w,X));else d.value=re(d.value);t("time-update")},qa=()=>Array.isArray(d.value)&&d.value.length?d.value[d.value.length-1]:null;return{calendars:P,modelValue:d,month:ye,year:y,time:v,disabledTimesConfig:ce,today:m,validateTime:se,getCalendarDays:be,getMarker:Z,handleScroll:Q,handleSwipe:u,handleArrow:te,selectDate:Ta,updateMonthYear:Ha,presetDate:Va,selectCurrentDate:Wa,updateTime:(w,X=!0,fe=!1)=>{N(w,X,fe,za)},assignMonthAndYear:f,setStartTime:J}},Nu={key:0},Iu=tt({__name:"DatePicker",props:{...kt},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:o,month:s,year:c,modelValue:d,time:P,disabledTimesConfig:v,today:m,validateTime:p,getCalendarDays:x,getMarker:A,handleArrow:R,handleScroll:M,handleSwipe:b,selectDate:S,updateMonthYear:C,presetDate:L,selectCurrentDate:U,updateTime:Y,assignMonthAndYear:N,setStartTime:re}=Su(r,a,de,f),V=Kt(),{setHoverDate:I,getDayClassData:se,clearHoverDate:ce}=Ju(d,r),{defaultedMultiCalendars:ye}=Be(r),y=K([]),D=K([]),h=K(null),H=ct(V,"calendar"),J=ct(V,"monthYear"),E=ct(V,"timePicker"),ee=Q=>{r.shadow||a("mount",Q)};yt(o,()=>{r.shadow||setTimeout(()=>{a("recalculate-position")},0)},{deep:!0}),yt(ye,(Q,te)=>{Q.count-te.count>0&&N()},{deep:!0});const O=j(()=>Q=>x(s.value(Q),c.value(Q)).map(te=>({...te,days:te.days.map(u=>(u.marker=A(u),u.classData=se(u),u))})));function de(Q){var te;Q||Q===0?(te=D.value[Q])==null||te.triggerTransition(s.value(Q),c.value(Q)):D.value.forEach((u,Z)=>u.triggerTransition(s.value(Z),c.value(Z)))}function f(){a("update-flow-step")}const k=(Q,te=!1)=>{S(Q,te),r.spaceConfirm&&a("select-date")},F=(Q,te,u=0)=>{var Z;(Z=y.value[u])==null||Z.toggleMonthPicker(Q,te)},W=(Q,te,u=0)=>{var Z;(Z=y.value[u])==null||Z.toggleYearPicker(Q,te)},l=(Q,te,u)=>{var Z;(Z=h.value)==null||Z.toggleTimePicker(Q,te,u)},_=(Q,te)=>{var u;if(!r.range){const Z=d.value?d.value:m,ae=te?new Date(te):Z,ne=Q?_t(ae,{weekStartsOn:1}):ur(ae,{weekStartsOn:1});S({value:ne,current:Pe(ae)===s.value(0),text:"",classData:{}}),(u=document.getElementById(vn(ne)))==null||u.focus()}},oe=Q=>{var te;(te=y.value[0])==null||te.handleMonthYearChange(Q,!0)},Ye=Q=>{C(0,{month:s.value(0),year:c.value(0)+(Q?1:-1),fromNav:!0})},$=(Q,te)=>{Q===rt.time&&a(`time-picker-${te?"open":"close"}`),a("overlay-toggle",{open:te,overlay:Q})},we=Q=>{a("overlay-toggle",{open:!1,overlay:Q}),a("focus-menu")};return t({clearHoverDate:ce,presetDate:L,selectCurrentDate:U,toggleMonthPicker:F,toggleYearPicker:W,toggleTimePicker:l,handleArrow:R,updateMonthYear:C,getSidebarProps:()=>({modelValue:d,month:s,year:c,time:P,updateTime:Y,updateMonthYear:C,selectDate:S,presetDate:L}),changeMonth:oe,changeYear:Ye,selectWeekDate:_,setStartTime:re}),(Q,te)=>(T(),z(ke,null,[vt(Ea,{"multi-calendars":i(ye).count,collapse:Q.collapse,"is-mobile":Q.isMobile},{default:De(({instance:u,index:Z})=>[Q.disableMonthYearSelect?G("",!0):(T(),Oe(Pu,Je({key:0,ref:ae=>{ae&&(y.value[Z]=ae)},months:i(Dr)(Q.formatLocale,Q.locale,Q.monthNameFormat),years:i(Mn)(Q.yearRange,Q.locale,Q.reverseYears),month:i(s)(u),year:i(c)(u),instance:u},Q.$props,{onMount:te[0]||(te[0]=ae=>ee(i(Qt).header)),onResetFlow:te[1]||(te[1]=ae=>Q.$emit("reset-flow")),onUpdateMonthYear:ae=>i(C)(u,ae),onOverlayClosed:we,onOverlayOpened:te[2]||(te[2]=ae=>Q.$emit("overlay-toggle",{open:!0,overlay:ae}))}),ot({_:2},[Fe(i(J),(ae,ne)=>({name:ae,fn:De(Me=>[ie(Q.$slots,ae,Ze(it(Me)))])}))]),1040,["months","years","month","year","instance","onUpdateMonthYear"])),vt(Ru,Je({ref:ae=>{ae&&(D.value[Z]=ae)},"mapped-dates":O.value(u),month:i(s)(u),year:i(c)(u),instance:u},Q.$props,{onSelectDate:ae=>i(S)(ae,u!==1),onHandleSpace:ae=>k(ae,u!==1),onSetHoverDate:te[3]||(te[3]=ae=>i(I)(ae)),onHandleScroll:ae=>i(M)(ae,u),onHandleSwipe:ae=>i(b)(ae,u),onMount:te[4]||(te[4]=ae=>ee(i(Qt).calendar)),onResetFlow:te[5]||(te[5]=ae=>Q.$emit("reset-flow")),onTooltipOpen:te[6]||(te[6]=ae=>Q.$emit("tooltip-open",ae)),onTooltipClose:te[7]||(te[7]=ae=>Q.$emit("tooltip-close",ae))}),ot({_:2},[Fe(i(H),(ae,ne)=>({name:ae,fn:De(Me=>[ie(Q.$slots,ae,Ze(it({...Me})))])}))]),1040,["mapped-dates","month","year","instance","onSelectDate","onHandleSpace","onHandleScroll","onHandleSwipe"])]),_:3},8,["multi-calendars","collapse","is-mobile"]),Q.enableTimePicker?(T(),z("div",Nu,[Q.$slots["time-picker"]?ie(Q.$slots,"time-picker",Ze(Je({key:0},{time:i(P),updateTime:i(Y)}))):(T(),Oe(Hr,Je({key:1,ref_key:"timePickerRef",ref:h},Q.$props,{hours:i(P).hours,minutes:i(P).minutes,seconds:i(P).seconds,"internal-model-value":Q.internalModelValue,"disabled-times-config":i(v),"validate-time":i(p),onMount:te[8]||(te[8]=u=>ee(i(Qt).timePicker)),"onUpdate:hours":te[9]||(te[9]=u=>i(Y)(u)),"onUpdate:minutes":te[10]||(te[10]=u=>i(Y)(u,!1)),"onUpdate:seconds":te[11]||(te[11]=u=>i(Y)(u,!1,!0)),onResetFlow:te[12]||(te[12]=u=>Q.$emit("reset-flow")),onOverlayClosed:te[13]||(te[13]=u=>$(u,!1)),onOverlayOpened:te[14]||(te[14]=u=>$(u,!0)),onAmPmChange:te[15]||(te[15]=u=>Q.$emit("am-pm-change",u))}),ot({_:2},[Fe(i(E),(u,Z)=>({name:u,fn:De(ae=>[ie(Q.$slots,u,Ze(it(ae)))])}))]),1040,["hours","minutes","seconds","internal-model-value","disabled-times-config","validate-time"]))])):G("",!0)],64))}}),Eu=(e,t)=>{const n=K(),{defaultedMultiCalendars:a,defaultedConfig:r,defaultedHighlight:o,defaultedRange:s,propDates:c,defaultedFilters:d,defaultedMultiDates:P}=Be(e),{modelValue:v,year:m,month:p,calendars:x}=Pa(e,t),{isDisabled:A}=Wt(e),{selectYear:R,groupedYears:M,showYearPicker:b,isDisabled:S,toggleYearPicker:C,handleYearSelect:L,handleYear:U}=Lr({modelValue:v,multiCalendars:a,range:s,highlight:o,calendars:x,propDates:c,month:p,year:m,filters:d,props:e,emit:t}),Y=(D,h)=>[D,h].map(H=>$t(H,"MMMM",{locale:e.formatLocale})).join("-"),N=j(()=>D=>v.value?Array.isArray(v.value)?v.value.some(h=>Vn(D,h)):Vn(v.value,D):!1),re=D=>{if(s.value.enabled){if(Array.isArray(v.value)){const h=Te(D,v.value[0])||Te(D,v.value[1]);return _a(v.value,n.value,D)&&!h}return!1}return!1},V=(D,h)=>D.quarter===In(h)&&D.year===he(h),I=D=>typeof o.value=="function"?o.value({quarter:In(D),year:he(D)}):!!o.value.quarters.find(h=>V(h,D)),se=j(()=>D=>{const h=Ne(new Date,{year:m.value(D)});return cl({start:wa(h),end:sr(h)}).map(H=>{const J=Ut(H),E=En(H),ee=A(H),O=re(J),de=I(J);return{text:Y(J,E),value:J,active:N.value(J),highlighted:de,disabled:ee,isBetween:O}})}),ce=D=>{$n(D,v,P.value.limit),t("auto-apply",!0)},ye=D=>{v.value=An(v,D,t),Fa(v.value,t,e.autoApply,e.modelAuto)},y=D=>{v.value=D,t("auto-apply")};return{defaultedConfig:r,defaultedMultiCalendars:a,groupedYears:M,year:m,isDisabled:S,quarters:se,showYearPicker:b,modelValue:v,setHoverDate:D=>{n.value=D},selectYear:R,selectQuarter:(D,h,H)=>{if(!H)return x.value[h].month=Pe(En(D)),P.value.enabled?ce(D):s.value.enabled?ye(D):y(D)},toggleYearPicker:C,handleYearSelect:L,handleYear:U}},Fu={class:"dp--quarter-items"},Bu=["data-test-id","disabled","onClick","onMouseover"],Lu=tt({compatConfig:{MODE:3},__name:"QuarterPicker",props:{...kt},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,o=Kt(),s=ct(o,"yearMode"),{defaultedMultiCalendars:c,defaultedConfig:d,groupedYears:P,year:v,isDisabled:m,quarters:p,modelValue:x,showYearPicker:A,setHoverDate:R,selectQuarter:M,toggleYearPicker:b,handleYearSelect:S,handleYear:C}=Eu(r,a);return t({getSidebarProps:()=>({modelValue:x,year:v,selectQuarter:M,handleYearSelect:S,handleYear:C})}),(L,U)=>(T(),Oe(Ea,{"multi-calendars":i(c).count,collapse:L.collapse,stretch:"","is-mobile":L.isMobile},{default:De(({instance:Y})=>[ge("div",{class:"dp-quarter-picker-wrap",style:pt({minHeight:`${i(d).modeHeight}px`})},[L.$slots["top-extra"]?ie(L.$slots,"top-extra",{key:0,value:L.internalModelValue}):G("",!0),ge("div",null,[vt(Er,Je(L.$props,{items:i(P)(Y),instance:Y,"show-year-picker":i(A)[Y],year:i(v)(Y),"is-disabled":N=>i(m)(Y,N),onHandleYear:N=>i(C)(Y,N),onYearSelect:N=>i(S)(N,Y),onToggleYearPicker:N=>i(b)(Y,N?.flow,N?.show)}),ot({_:2},[Fe(i(s),(N,re)=>({name:N,fn:De(V=>[ie(L.$slots,N,Ze(it(V)))])}))]),1040,["items","instance","show-year-picker","year","is-disabled","onHandleYear","onYearSelect","onToggleYearPicker"])]),ge("div",Fu,[(T(!0),z(ke,null,Fe(i(p)(Y),(N,re)=>(T(),z("div",{key:re},[ge("button",{type:"button",class:xe(["dp--qr-btn",{"dp--qr-btn-active":N.active,"dp--qr-btn-between":N.isBetween,"dp--qr-btn-disabled":N.disabled,"dp--highlighted":N.highlighted}]),"data-test-id":N.value,disabled:N.disabled,onClick:V=>i(M)(N.value,Y,N.disabled),onMouseover:V=>i(R)(N.value)},[L.$slots.quarter?ie(L.$slots,"quarter",{key:0,value:N.value,text:N.text}):(T(),z(ke,{key:1},[Rt(lt(N.text),1)],64))],42,Bu)]))),128))])],4)]),_:3},8,["multi-calendars","collapse","is-mobile"]))}}),Wr=(e,t)=>{const n=K(0);at(()=>{a(),window.addEventListener("resize",a,{passive:!0})}),ia(()=>{window.removeEventListener("resize",a)});const a=()=>{n.value=window.document.documentElement.clientWidth};return{isMobile:j(()=>n.value<=e.value.mobileBreakpoint&&!t?!0:void 0)}},Hu=["id","tabindex","role","aria-label"],Vu={key:0,class:"dp--menu-load-container"},Wu={key:1,class:"dp--menu-header"},zu=["data-dp-mobile"],qu={key:0,class:"dp__sidebar_left"},Uu=["data-dp-mobile"],Qu=["data-test-id","data-dp-mobile","onClick","onKeydown"],ju={key:2,class:"dp__sidebar_right"},Gu={key:3,class:"dp__action_extra"},Zn=tt({compatConfig:{MODE:3},__name:"DatepickerMenu",props:{...Ia,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","menu-blur"],setup(e,{expose:t,emit:n}){const a=n,r=e,o=K(null),s=j(()=>{const{openOnTop:g,...le}=r;return{...le,isMobile:M.value,flowStep:ye.value,menuWrapRef:o.value}}),{setMenuFocused:c,setShiftKey:d,control:P}=Ir(),v=Kt(),{defaultedTextInput:m,defaultedInline:p,defaultedConfig:x,defaultedUI:A,handleEventPropagation:R}=Be(r),{isMobile:M}=Wr(x,r.shadow),b=K(null),S=K(0),C=K(null),L=K(!1),U=K(null),Y=K(!1),N=g=>{Y.value=!0,x.value.allowPreventDefault&&g.preventDefault(),Bt(g,x.value,!0)};at(()=>{if(!r.shadow){L.value=!0,re(),window.addEventListener("resize",re);const g=je(o);g&&!m.value.enabled&&!p.value.enabled&&(c(!0),ee()),g&&(g.addEventListener("pointerdown",N),g.addEventListener("mousedown",N))}document.addEventListener("mousedown",We)}),ia(()=>{window.removeEventListener("resize",re),document.removeEventListener("mousedown",We);const g=je(o);g&&(g.removeEventListener("pointerdown",N),g.removeEventListener("mousedown",N))});const re=()=>{const g=je(C);g&&(S.value=g.getBoundingClientRect().width)},{arrowRight:V,arrowLeft:I,arrowDown:se,arrowUp:ce}=Vt(),{flowStep:ye,updateFlowStep:y,childMount:D,resetFlow:h,handleFlow:H}=ei(r,a,U),J=j(()=>r.monthPicker?ru:r.yearPicker?ou:r.timePicker?bu:r.quarterPicker?Lu:Iu),E=j(()=>{var g;if(x.value.arrowLeft)return x.value.arrowLeft;const le=(g=o.value)==null?void 0:g.getBoundingClientRect(),$e=r.getInputRect();return $e?.width=(le?.right??0)&&$e?.width{const g=je(o);g&&g.focus({preventScroll:!0})},O=j(()=>{var g;return((g=U.value)==null?void 0:g.getSidebarProps())||{}}),de=()=>{r.openOnTop&&a("recalculate-position")},f=ct(v,"action"),k=j(()=>r.monthPicker||r.yearPicker?ct(v,"monthYear"):r.timePicker?ct(v,"timePicker"):ct(v,"shared")),F=j(()=>r.openOnTop?"dp__arrow_bottom":"dp__arrow_top"),W=j(()=>({dp__menu_disabled:r.disabled,dp__menu_readonly:r.readonly,"dp-menu-loading":r.loading})),l=j(()=>({dp__menu:!0,dp__menu_index:!p.value.enabled,dp__relative:p.value.enabled,...A.value.menu??{}})),_=g=>{Bt(g,x.value,!0)},oe=g=>{r.escClose&&(a("close-picker"),R(g))},Ye=g=>{if(r.arrowNavigation){if(g===st.up)return ce();if(g===st.down)return se();if(g===st.left)return I();if(g===st.right)return V()}else g===st.left||g===st.up?u("handleArrow",st.left,0,g===st.up):u("handleArrow",st.right,0,g===st.down)},$=g=>{d(g.shiftKey),!r.disableMonthYearSelect&&g.code===Ee.tab&&g.target.classList.contains("dp__menu")&&P.value.shiftKeyInMenu&&(g.preventDefault(),Bt(g,x.value,!0),a("close-picker"))},we=()=>{ee(),a("time-picker-close")},Q=g=>{var le,$e,Ge;(le=U.value)==null||le.toggleTimePicker(!1,!1),($e=U.value)==null||$e.toggleMonthPicker(!1,!1,g),(Ge=U.value)==null||Ge.toggleYearPicker(!1,!1,g)},te=(g,le=0)=>{var $e,Ge,Dt;return g==="month"?($e=U.value)==null?void 0:$e.toggleMonthPicker(!1,!0,le):g==="year"?(Ge=U.value)==null?void 0:Ge.toggleYearPicker(!1,!0,le):g==="time"?(Dt=U.value)==null?void 0:Dt.toggleTimePicker(!0,!1):Q(le)},u=(g,...le)=>{var $e,Ge;($e=U.value)!=null&&$e[g]&&((Ge=U.value)==null||Ge[g](...le))},Z=()=>{u("selectCurrentDate")},ae=(g,le)=>{u("presetDate",Gr(g),le)},ne=()=>{u("clearHoverDate")},Me=(g,le)=>{u("updateMonthYear",g,le)},be=(g,le)=>{g.preventDefault(),Ye(le)},Ce=g=>{var le,$e,Ge;if($(g),g.key===Ee.home||g.key===Ee.end)return u("selectWeekDate",g.key===Ee.home,g.target.getAttribute("id"));switch((g.key===Ee.pageUp||g.key===Ee.pageDown)&&(g.shiftKey?(u("changeYear",g.key===Ee.pageUp),(le=dn(o.value,"overlay-year"))==null||le.focus()):(u("changeMonth",g.key===Ee.pageUp),($e=dn(o.value,g.key===Ee.pageUp?"action-prev":"action-next"))==null||$e.focus()),g.target.getAttribute("id")&&((Ge=o.value)==null||Ge.focus({preventScroll:!0}))),g.key){case Ee.esc:return oe(g);case Ee.arrowLeft:return be(g,st.left);case Ee.arrowRight:return be(g,st.right);case Ee.arrowUp:return be(g,st.up);case Ee.arrowDown:return be(g,st.down);default:return}},We=g=>{var le;p.value.enabled&&!p.value.input&&!((le=o.value)!=null&&le.contains(g.target))&&Y.value&&(Y.value=!1,a("menu-blur"))};return t({updateMonthYear:Me,switchView:te,handleFlow:H,onValueCleared:()=>{var g,le;(le=(g=U.value)==null?void 0:g.setStartTime)==null||le.call(g)}}),(g,le)=>{var $e,Ge,Dt;return T(),z("div",{id:g.uid?`dp-menu-${g.uid}`:void 0,ref_key:"dpMenuRef",ref:o,tabindex:i(p).enabled?void 0:"0",role:i(p).enabled?void 0:"dialog","aria-label":($e=g.ariaLabels)==null?void 0:$e.menu,class:xe(l.value),style:pt({"--dp-arrow-left":E.value}),onMouseleave:ne,onClick:_,onKeydown:Ce},[(g.disabled||g.readonly)&&i(p).enabled||g.loading?(T(),z("div",{key:0,class:xe(W.value)},[g.loading?(T(),z("div",Vu,le[19]||(le[19]=[ge("span",{class:"dp--menu-loader"},null,-1)]))):G("",!0)],2)):G("",!0),g.$slots["menu-header"]?(T(),z("div",Wu,[ie(g.$slots,"menu-header")])):G("",!0),!i(p).enabled&&!g.teleportCenter?(T(),z("div",{key:2,class:xe(F.value)},null,2)):G("",!0),ge("div",{ref_key:"innerMenuRef",ref:C,class:xe({dp__menu_content_wrapper:((Ge=g.presetDates)==null?void 0:Ge.length)||!!g.$slots["left-sidebar"]||!!g.$slots["right-sidebar"],"dp--menu-content-wrapper-collapsed":e.collapse&&(((Dt=g.presetDates)==null?void 0:Dt.length)||!!g.$slots["left-sidebar"]||!!g.$slots["right-sidebar"])}),"data-dp-mobile":i(M),style:pt({"--dp-menu-width":`${S.value}px`})},[g.$slots["left-sidebar"]?(T(),z("div",qu,[ie(g.$slots,"left-sidebar",Ze(it(O.value)))])):G("",!0),g.presetDates.length?(T(),z("div",{key:1,class:xe({"dp--preset-dates-collapsed":e.collapse,"dp--preset-dates":!0}),"data-dp-mobile":i(M)},[(T(!0),z(ke,null,Fe(g.presetDates,(ve,Ke)=>(T(),z(ke,{key:Ke},[ve.slot?ie(g.$slots,ve.slot,{key:0,presetDate:ae,label:ve.label,value:ve.value}):(T(),z("button",{key:1,type:"button",style:pt(ve.style||{}),class:xe(["dp__btn dp--preset-range",{"dp--preset-range-collapsed":e.collapse}]),"data-test-id":ve.testId??void 0,"data-dp-mobile":i(M),onClick:ga(xt=>ae(ve.value,ve.noTz),["prevent"]),onKeydown:xt=>i(ut)(xt,()=>ae(ve.value,ve.noTz),!0)},lt(ve.label),47,Qu))],64))),128))],10,Uu)):G("",!0),ge("div",{ref_key:"calendarWrapperRef",ref:b,class:"dp__instance_calendar",role:"document"},[(T(),Oe(Na(J.value),Je({ref_key:"dynCmpRef",ref:U},s.value,{"flow-step":i(ye),onMount:i(D),onUpdateFlowStep:i(y),onResetFlow:i(h),onFocusMenu:ee,onSelectDate:le[0]||(le[0]=ve=>g.$emit("select-date")),onDateUpdate:le[1]||(le[1]=ve=>g.$emit("date-update",ve)),onTooltipOpen:le[2]||(le[2]=ve=>g.$emit("tooltip-open",ve)),onTooltipClose:le[3]||(le[3]=ve=>g.$emit("tooltip-close",ve)),onAutoApply:le[4]||(le[4]=ve=>g.$emit("auto-apply",ve)),onRangeStart:le[5]||(le[5]=ve=>g.$emit("range-start",ve)),onRangeEnd:le[6]||(le[6]=ve=>g.$emit("range-end",ve)),onInvalidFixedRange:le[7]||(le[7]=ve=>g.$emit("invalid-fixed-range",ve)),onTimeUpdate:le[8]||(le[8]=ve=>g.$emit("time-update")),onAmPmChange:le[9]||(le[9]=ve=>g.$emit("am-pm-change",ve)),onTimePickerOpen:le[10]||(le[10]=ve=>g.$emit("time-picker-open",ve)),onTimePickerClose:we,onRecalculatePosition:de,onUpdateMonthYear:le[11]||(le[11]=ve=>g.$emit("update-month-year",ve)),onAutoApplyInvalid:le[12]||(le[12]=ve=>g.$emit("auto-apply-invalid",ve)),onInvalidDate:le[13]||(le[13]=ve=>g.$emit("invalid-date",ve)),onOverlayToggle:le[14]||(le[14]=ve=>g.$emit("overlay-toggle",ve)),"onUpdate:internalModelValue":le[15]||(le[15]=ve=>g.$emit("update:internal-model-value",ve))}),ot({_:2},[Fe(k.value,(ve,Ke)=>({name:ve,fn:De(xt=>[ie(g.$slots,ve,Ze(it({...xt})))])}))]),1040,["flow-step","onMount","onUpdateFlowStep","onResetFlow"]))],512),g.$slots["right-sidebar"]?(T(),z("div",ju,[ie(g.$slots,"right-sidebar",Ze(it(O.value)))])):G("",!0),g.$slots["action-extra"]?(T(),z("div",Gu,[g.$slots["action-extra"]?ie(g.$slots,"action-extra",{key:0,selectCurrentDate:Z}):G("",!0)])):G("",!0)],14,zu),!g.autoApply||i(x).keepActionRow?(T(),Oe(Gs,Je({key:3,"menu-mount":L.value},s.value,{"calendar-width":S.value,onClosePicker:le[16]||(le[16]=ve=>g.$emit("close-picker")),onSelectDate:le[17]||(le[17]=ve=>g.$emit("select-date")),onInvalidSelect:le[18]||(le[18]=ve=>g.$emit("invalid-select")),onSelectNow:Z}),ot({_:2},[Fe(i(f),(ve,Ke)=>({name:ve,fn:De(xt=>[ie(g.$slots,ve,Ze(it({...xt})))])}))]),1040,["menu-mount","calendar-width"])):G("",!0)],46,Hu)}}});var ea=(e=>(e.center="center",e.left="left",e.right="right",e))(ea||{});const Ku=({menuRef:e,menuRefInner:t,inputRef:n,pickerWrapperRef:a,inline:r,emit:o,props:s,slots:c})=>{const{defaultedConfig:d}=Be(s),P=K({}),v=K(!1),m=K({top:"0",left:"0"}),p=K(!1),x=ha(s,"teleportCenter");yt(x,()=>{m.value=JSON.parse(JSON.stringify({})),U()});const A=h=>{if(s.teleport){const H=h.getBoundingClientRect();return{left:H.left+window.scrollX,top:H.top+window.scrollY}}return{top:0,left:0}},R=(h,H)=>{m.value.left=`${h+H-P.value.width}px`},M=h=>{m.value.left=`${h}px`},b=(h,H)=>{s.position===ea.left&&M(h),s.position===ea.right&&R(h,H),s.position===ea.center&&(m.value.left=`${h+H/2-P.value.width/2}px`)},S=h=>{const{width:H,height:J}=h.getBoundingClientRect(),{top:E,left:ee}=A(h);return{top:+E,left:+ee,width:H,height:J}},C=()=>{m.value.left="50%",m.value.top="50%",m.value.transform="translate(-50%, -50%)",m.value.position="fixed",delete m.value.opacity},L=()=>{const h=je(n);m.value=s.altPosition(h)},U=(h=!0)=>{var H;if(!r.value.enabled){if(x.value)return C();if(s.altPosition!==null)return L();if(h){const J=s.teleport?(H=t.value)==null?void 0:H.$el:e.value;J&&(P.value=J.getBoundingClientRect()),o("recalculate-position")}return ce()}},Y=({inputEl:h,left:H,width:J})=>{window.screen.width>768&&!v.value&&b(H,J),V(h)},N=h=>{const{top:H,left:J,height:E,width:ee}=S(h);m.value.top=`${E+H+ +s.offset}px`,p.value=!1,v.value||(m.value.left=`${J+ee/2-P.value.width/2}px`),Y({inputEl:h,left:J,width:ee})},re=h=>{const{top:H,left:J,width:E}=S(h);m.value.top=`${H-+s.offset-P.value.height}px`,p.value=!0,Y({inputEl:h,left:J,width:E})},V=h=>{if(s.autoPosition){const{left:H,width:J}=S(h),{left:E,right:ee}=P.value;if(!v.value){if(Math.abs(E)!==Math.abs(ee)){if(E<=0)return v.value=!0,M(H);if(ee>=document.documentElement.clientWidth)return v.value=!0,R(H,J)}return b(H,J)}}},I=()=>{const h=je(n);if(h){if(s.autoPosition===gt.top)return gt.top;if(s.autoPosition===gt.bottom)return gt.bottom;const{height:H}=P.value,{top:J,height:E}=h.getBoundingClientRect(),ee=window.innerHeight-J-E,O=J;return H<=ee?gt.bottom:H>ee&&H<=O?gt.top:ee>=O?gt.bottom:gt.top}return gt.bottom},se=h=>I()===gt.bottom?N(h):re(h),ce=()=>{const h=je(n);if(h)return s.autoPosition?se(h):N(h)},ye=function(h){if(h){const H=h.scrollHeight>h.clientHeight,J=window.getComputedStyle(h).overflowY.indexOf("hidden")!==-1;return H&&!J}return!0},y=function(h){return!h||h===document.body||h.nodeType===Node.DOCUMENT_FRAGMENT_NODE?window:ye(h)?h:y(h.assignedSlot&&d.value.shadowDom?h.assignedSlot.parentNode:h.parentNode)},D=h=>{if(h)switch(s.position){case ea.left:return{left:0,transform:"translateX(0)"};case ea.right:return{left:`${h.width}px`,transform:"translateX(-100%)"};default:return{left:`${h.width/2}px`,transform:"translateX(-50%)"}}return{}};return{openOnTop:p,menuStyle:m,xCorrect:v,setMenuPosition:U,getScrollableParent:y,shadowRender:(h,H,J)=>{var E,ee,O;const de=document.createElement("div"),f=(E=je(n))==null?void 0:E.getBoundingClientRect();de.setAttribute("id","dp--temp-container");const k=(ee=a.value)!=null&&ee.clientWidth?a.value:document.body;k.append(de);const F=D(f),W=d.value.shadowDom?Object.keys(c).filter(_=>["right-sidebar","left-sidebar","top-extra","action-extra"].includes(_)):Object.keys(c),l=jr(H,{...J,shadow:!0,style:{opacity:0,position:"absolute",...F}},Object.fromEntries(W.map(_=>[_,c[_]])));h!=null&&(l.appContext=h.appContext),Cn(l,de),P.value=(O=l.el)==null?void 0:O.getBoundingClientRect(),Cn(null,de),k.removeChild(de)}}},Et=[{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"]}],Xu=[{name:"trigger"},{name:"input-icon"},{name:"clear-icon"},{name:"dp-input"}],Zu={all:()=>Et,monthYear:()=>Et.filter(e=>e.use.includes("month-year")),input:()=>Xu,timePicker:()=>Et.filter(e=>e.use.includes("time")),action:()=>Et.filter(e=>e.use.includes("action")),calendar:()=>Et.filter(e=>e.use.includes("calendar")),menu:()=>Et.filter(e=>e.use.includes("menu")),shared:()=>Et.filter(e=>e.use.includes("shared")),yearMode:()=>Et.filter(e=>e.use.includes("year-mode"))},ct=(e,t,n)=>{const a=[];return Zu[t]().forEach(r=>{e[r.name]&&a.push(r.name)}),n!=null&&n.length&&n.forEach(r=>{r.slot&&a.push(r.slot)}),a},Ma=e=>{const t=j(()=>a=>e.value?a?e.value.open:e.value.close:""),n=j(()=>a=>e.value?a?e.value.menuAppearTop:e.value.menuAppearBottom:"");return{transitionName:t,showTransition:!!e.value,menuTransition:n}},Pa=(e,t,n)=>{const{defaultedRange:a,defaultedTz:r}=Be(e),o=q(dt(q(),r.value.timezone)),s=K([{month:Pe(o),year:he(o)}]),c=p=>{const x={hours:St(o),minutes:Ht(o),seconds:0};return a.value.enabled?[x[p],x[p]]:x[p]},d=ka({hours:c("hours"),minutes:c("minutes"),seconds:c("seconds")});yt(a,(p,x)=>{p.enabled!==x.enabled&&(d.hours=c("hours"),d.minutes=c("minutes"),d.seconds=c("seconds"))},{deep:!0});const P=j({get:()=>e.internalModelValue,set:p=>{!e.readonly&&!e.disabled&&t("update:internal-model-value",p)}}),v=j(()=>p=>s.value[p]?s.value[p].month:0),m=j(()=>p=>s.value[p]?s.value[p].year:0);return yt(P,(p,x)=>{n&&JSON.stringify(p??{})!==JSON.stringify(x??{})&&n()},{deep:!0}),{calendars:s,time:d,modelValue:P,month:v,year:m,today:o}},Ju=(e,t)=>{const{defaultedMultiCalendars:n,defaultedMultiDates:a,defaultedUI:r,defaultedHighlight:o,defaultedTz:s,propDates:c,defaultedRange:d}=Be(t),{isDisabled:P}=Wt(t),v=K(null),m=K(dt(new Date,s.value.timezone)),p=l=>{!l.current&&t.hideOffsetDates||(v.value=l.value)},x=()=>{v.value=null},A=l=>Array.isArray(e.value)&&d.value.enabled&&e.value[0]&&v.value?l?qe(v.value,e.value[0]):He(v.value,e.value[0]):!0,R=(l,_)=>{const oe=()=>e.value?_?e.value[0]||null:e.value[1]:null,Ye=e.value&&Array.isArray(e.value)?oe():null;return Te(q(l.value),Ye)},M=l=>{const _=Array.isArray(e.value)?e.value[0]:null;return l?!He(v.value??null,_):!0},b=(l,_=!0)=>(d.value.enabled||t.weekPicker)&&Array.isArray(e.value)&&e.value.length===2?t.hideOffsetDates&&!l.current?!1:Te(q(l.value),e.value[_?0:1]):d.value.enabled?R(l,_)&&M(_)||Te(l.value,Array.isArray(e.value)?e.value[0]:null)&&A(_):!1,S=(l,_)=>{if(Array.isArray(e.value)&&e.value[0]&&e.value.length===1){const oe=Te(l.value,v.value);return _?qe(e.value[0],l.value)&&oe:He(e.value[0],l.value)&&oe}return!1},C=l=>!e.value||t.hideOffsetDates&&!l.current?!1:d.value.enabled?t.modelAuto&&Array.isArray(e.value)?Te(l.value,e.value[0]?e.value[0]:m.value):!1:a.value.enabled&&Array.isArray(e.value)?e.value.some(_=>Te(_,l.value)):Te(l.value,e.value?e.value:m.value),L=l=>{if(d.value.autoRange||t.weekPicker){if(v.value){if(t.hideOffsetDates&&!l.current)return!1;const _=ft(v.value,+d.value.autoRange),oe=Yt(q(v.value),t.weekStart);return t.weekPicker?Te(oe[1],q(l.value)):Te(_,q(l.value))}return!1}return!1},U=l=>{if(d.value.autoRange||t.weekPicker){if(v.value){const _=ft(v.value,+d.value.autoRange);if(t.hideOffsetDates&&!l.current)return!1;const oe=Yt(q(v.value),t.weekStart);return t.weekPicker?qe(l.value,oe[0])&&He(l.value,oe[1]):qe(l.value,v.value)&&He(l.value,_)}return!1}return!1},Y=l=>{if(d.value.autoRange||t.weekPicker){if(v.value){if(t.hideOffsetDates&&!l.current)return!1;const _=Yt(q(v.value),t.weekStart);return t.weekPicker?Te(_[0],l.value):Te(v.value,l.value)}return!1}return!1},N=l=>_a(e.value,v.value,l.value),re=()=>t.modelAuto&&Array.isArray(t.internalModelValue)?!!t.internalModelValue[0]:!1,V=()=>t.modelAuto?xr(t.internalModelValue):!0,I=l=>{if(t.weekPicker)return!1;const _=d.value.enabled?!b(l)&&!b(l,!1):!0;return!P(l.value)&&!C(l)&&!(!l.current&&t.hideOffsetDates)&&_},se=l=>d.value.enabled?t.modelAuto?re()&&C(l):!1:C(l),ce=l=>o.value?gs(l.value,c.value.highlight):!1,ye=l=>{const _=P(l.value);return _&&(typeof o.value=="function"?!o.value(l.value,_):!o.value.options.highlightDisabled)},y=l=>{var _;return typeof o.value=="function"?o.value(l.value):(_=o.value.weekdays)==null?void 0:_.includes(l.value.getDay())},D=l=>(d.value.enabled||t.weekPicker)&&(!(n.value.count>0)||l.current)&&V()&&!(!l.current&&t.hideOffsetDates)&&!C(l)?N(l):!1,h=l=>{if(Array.isArray(e.value)&&e.value.length===1){const{before:_,after:oe}=jn(+d.value.maxRange,e.value[0]);return la(l.value,_)||Gt(l.value,oe)}return!1},H=l=>{if(Array.isArray(e.value)&&e.value.length===1){const{before:_,after:oe}=jn(+d.value.minRange,e.value[0]);return _a([_,oe],e.value[0],l.value)}return!1},J=l=>d.value.enabled&&(d.value.maxRange||d.value.minRange)?d.value.maxRange&&d.value.minRange?h(l)||H(l):d.value.maxRange?h(l):H(l):!1,E=l=>{const{isRangeStart:_,isRangeEnd:oe}=f(l),Ye=d.value.enabled?_||oe:!1;return{dp__cell_offset:!l.current,dp__pointer:!t.disabled&&!(!l.current&&t.hideOffsetDates)&&!P(l.value)&&!J(l),dp__cell_disabled:P(l.value)||J(l),dp__cell_highlight:!ye(l)&&(ce(l)||y(l))&&!se(l)&&!Ye&&!Y(l)&&!(D(l)&&t.weekPicker)&&!oe,dp__cell_highlight_active:!ye(l)&&(ce(l)||y(l))&&se(l),dp__today:!t.noToday&&Te(l.value,m.value)&&l.current,"dp--past":He(l.value,m.value),"dp--future":qe(l.value,m.value)}},ee=l=>({dp__active_date:se(l),dp__date_hover:I(l)}),O=l=>{if(e.value&&!Array.isArray(e.value)){const _=Yt(e.value,t.weekStart);return{...F(l),dp__range_start:Te(_[0],l.value),dp__range_end:Te(_[1],l.value),dp__range_between_week:qe(l.value,_[0])&&He(l.value,_[1])}}return{...F(l)}},de=l=>{if(e.value&&Array.isArray(e.value)){const _=Yt(e.value[0],t.weekStart),oe=e.value[1]?Yt(e.value[1],t.weekStart):[];return{...F(l),dp__range_start:Te(_[0],l.value)||Te(oe[0],l.value),dp__range_end:Te(_[1],l.value)||Te(oe[1],l.value),dp__range_between_week:qe(l.value,_[0])&&He(l.value,_[1])||qe(l.value,oe[0])&&He(l.value,oe[1]),dp__range_between:qe(l.value,_[1])&&He(l.value,oe[0])}}return{...F(l)}},f=l=>{const _=n.value.count>0?l.current&&b(l)&&V():b(l)&&V(),oe=n.value.count>0?l.current&&b(l,!1)&&V():b(l,!1)&&V();return{isRangeStart:_,isRangeEnd:oe}},k=l=>{const{isRangeStart:_,isRangeEnd:oe}=f(l);return{dp__range_start:_,dp__range_end:oe,dp__range_between:D(l),dp__date_hover:Te(l.value,v.value)&&!_&&!oe&&!t.weekPicker,dp__date_hover_start:S(l,!0),dp__date_hover_end:S(l,!1)}},F=l=>({...k(l),dp__cell_auto_range:U(l),dp__cell_auto_range_start:Y(l),dp__cell_auto_range_end:L(l)}),W=l=>d.value.enabled?d.value.autoRange?F(l):t.modelAuto?{...ee(l),...k(l)}:t.weekPicker?de(l):k(l):t.weekPicker?O(l):ee(l);return{setHoverDate:p,clearHoverDate:x,getDayClassData:l=>t.hideOffsetDates&&!l.current?{}:{...E(l),...W(l),[t.dayClass?t.dayClass(l.value,t.internalModelValue):""]:!0,...r.value.calendarCell??{}}}},Wt=e=>{const{defaultedFilters:t,defaultedRange:n,propDates:a,defaultedMultiDates:r}=Be(e),o=y=>a.value.disabledDates?typeof a.value.disabledDates=="function"?a.value.disabledDates(q(y)):!!Sa(y,a.value.disabledDates):!1,s=y=>a.value.maxDate?e.yearPicker?he(y)>he(a.value.maxDate):qe(y,a.value.maxDate):!1,c=y=>a.value.minDate?e.yearPicker?he(y){const D=s(y),h=c(y),H=o(y),J=t.value.months.map(f=>+f).includes(Pe(y)),E=e.disabledWeekDays.length?e.disabledWeekDays.some(f=>+f===ro(y)):!1,ee=x(y),O=he(y),de=O<+e.yearRange[0]||O>+e.yearRange[1];return!(D||h||H||J||de||E||ee)},P=(y,D)=>He(...Ft(a.value.minDate,y,D))||Te(...Ft(a.value.minDate,y,D)),v=(y,D)=>qe(...Ft(a.value.maxDate,y,D))||Te(...Ft(a.value.maxDate,y,D)),m=(y,D,h)=>{let H=!1;return a.value.maxDate&&h&&v(y,D)&&(H=!0),a.value.minDate&&!h&&P(y,D)&&(H=!0),H},p=(y,D,h,H)=>{let J=!1;return H&&(a.value.minDate||a.value.maxDate)?a.value.minDate&&a.value.maxDate?J=m(y,D,h):(a.value.minDate&&P(y,D)||a.value.maxDate&&v(y,D))&&(J=!0):J=!0,J},x=y=>Array.isArray(a.value.allowedDates)&&!a.value.allowedDates.length?!0:a.value.allowedDates?!Sa(y,a.value.allowedDates,Tr(e.monthPicker,e.yearPicker)):!1,A=y=>!d(y),R=y=>n.value.noDisabledRange?!or({start:y[0],end:y[1]}).some(D=>A(D)):!0,M=y=>{if(y){const D=he(y);return D>=+e.yearRange[0]&&D<=e.yearRange[1]}return!0},b=(y,D)=>!!(Array.isArray(y)&&y[D]&&(n.value.maxRange||n.value.minRange)&&M(y[D])),S=(y,D,h=0)=>{if(b(D,h)&&M(y)){const H=nr(y,D[h]),J=Yr(D[h],y),E=J.length===1?0:J.filter(O=>A(O)).length,ee=Math.abs(H)-(n.value.minMaxRawRange?0:E);if(n.value.minRange&&n.value.maxRange)return ee>=+n.value.minRange&&ee<=+n.value.maxRange;if(n.value.minRange)return ee>=+n.value.minRange;if(n.value.maxRange)return ee<=+n.value.maxRange}return!0},C=()=>!e.enableTimePicker||e.monthPicker||e.yearPicker||e.ignoreTimeValidation,L=y=>Array.isArray(y)?[y[0]?Za(y[0]):null,y[1]?Za(y[1]):null]:Za(y),U=(y,D,h)=>y.find(H=>+H.hours===St(D)&&H.minutes==="*"?!0:+H.minutes===Ht(D)&&+H.hours===St(D))&&h,Y=(y,D,h)=>{const[H,J]=y,[E,ee]=D;return!U(H,E,h)&&!U(J,ee,h)&&h},N=(y,D)=>{const h=Array.isArray(D)?D:[D];return Array.isArray(e.disabledTimes)?Array.isArray(e.disabledTimes[0])?Y(e.disabledTimes,h,y):!h.some(H=>U(e.disabledTimes,H,y)):y},re=(y,D)=>{const h=Array.isArray(D)?[jt(D[0]),D[1]?jt(D[1]):void 0]:jt(D),H=!e.disabledTimes(h);return y&&H},V=(y,D)=>e.disabledTimes?Array.isArray(e.disabledTimes)?N(D,y):re(D,y):D,I=y=>{let D=!0;if(!y||C())return!0;const h=!a.value.minDate&&!a.value.maxDate?L(y):y;return(e.maxTime||a.value.maxDate)&&(D=Qn(e.maxTime,a.value.maxDate,"max",Xe(h),D)),(e.minTime||a.value.minDate)&&(D=Qn(e.minTime,a.value.minDate,"min",Xe(h),D)),V(y,D)},se=y=>{if(!e.monthPicker)return!0;let D=!0;const h=q(wt(y));if(a.value.minDate&&a.value.maxDate){const H=q(wt(a.value.minDate)),J=q(wt(a.value.maxDate));return qe(h,H)&&He(h,J)||Te(h,H)||Te(h,J)}if(a.value.minDate){const H=q(wt(a.value.minDate));D=qe(h,H)||Te(h,H)}if(a.value.maxDate){const H=q(wt(a.value.maxDate));D=He(h,H)||Te(h,H)}return D},ce=j(()=>y=>!e.enableTimePicker||e.ignoreTimeValidation?!0:I(y)),ye=j(()=>y=>e.monthPicker?Array.isArray(y)&&(n.value.enabled||r.value.enabled)?!y.filter(D=>!se(D)).length:se(y):!0);return{isDisabled:A,validateDate:d,validateMonthYearInRange:p,isDateRangeAllowed:R,checkMinMaxRange:S,isValidTime:I,isTimeValid:ce,isMonthValid:ye}},Ba=()=>{const e=j(()=>(a,r)=>a?.includes(r)),t=j(()=>(a,r)=>a.count?a.solo?!0:r===0:!0),n=j(()=>(a,r)=>a.count?a.solo?!0:r===a.count-1:!0);return{hideNavigationButtons:e,showLeftIcon:t,showRightIcon:n}},ei=(e,t,n)=>{const a=K(0),r=ka({[Qt.timePicker]:!e.enableTimePicker||e.timePicker||e.monthPicker,[Qt.calendar]:!1,[Qt.header]:!1}),o=j(()=>e.monthPicker||e.timePicker),s=m=>{var p;if((p=e.flow)!=null&&p.length){if(!m&&o.value)return v();r[m]=!0,Object.keys(r).filter(x=>!r[x]).length||v()}},c=()=>{var m,p;(m=e.flow)!=null&&m.length&&a.value!==-1&&(a.value+=1,t("flow-step",a.value),v()),((p=e.flow)==null?void 0:p.length)===a.value&&mt().then(()=>d())},d=()=>{a.value=-1},P=(m,p,...x)=>{var A,R;e.flow[a.value]===m&&n.value&&((R=(A=n.value)[p])==null||R.call(A,...x))},v=(m=0)=>{m&&(a.value+=m),P(rt.month,"toggleMonthPicker",!0),P(rt.year,"toggleYearPicker",!0),P(rt.calendar,"toggleTimePicker",!1,!0),P(rt.time,"toggleTimePicker",!0,!0);const p=e.flow[a.value];(p===rt.hours||p===rt.minutes||p===rt.seconds)&&P(p,"toggleTimePicker",!0,!0,p)};return{childMount:s,updateFlowStep:c,resetFlow:d,handleFlow:v,flowStep:a}},ti={key:1,class:"dp__input_wrap"},ai=["id","name","inputmode","placeholder","disabled","readonly","required","value","autocomplete","aria-label","aria-disabled","aria-invalid"],ni={key:2,class:"dp--clear-btn"},ri=["aria-label"],li=tt({compatConfig:{MODE:3},__name:"DatepickerInput",props:{isMenuOpen:{type:Boolean,default:!1},inputValue:{type:String,default:""},...Ia},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:o,defaultedAriaLabels:s,defaultedInline:c,defaultedConfig:d,defaultedRange:P,defaultedMultiDates:v,defaultedUI:m,getDefaultPattern:p,getDefaultStartTime:x}=Be(r),{checkMinMaxRange:A}=Wt(r),R=K(),M=K(null),b=K(!1),S=K(!1),C=j(()=>({dp__pointer:!r.disabled&&!r.readonly&&!o.value.enabled,dp__disabled:r.disabled,dp__input_readonly:!o.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:b.value||r.isMenuOpen,dp__input_reg:!o.value.enabled,...m.value.input??{}})),L=()=>{a("set-input-date",null),r.clearable&&r.autoApply&&(a("set-empty-date"),R.value=null)},U=O=>{const de=x();return bs(O,o.value.format??p(),de??Cr({},r.enableSeconds),r.inputValue,S.value,r.formatLocale)},Y=O=>{const{rangeSeparator:de}=o.value,[f,k]=O.split(`${de}`);if(f){const F=U(f.trim()),W=k?U(k.trim()):void 0;if(Gt(F,W))return;const l=F&&W?[F,W]:[F];A(W,l,0)&&(R.value=F?l:null)}},N=()=>{S.value=!0},re=O=>{if(P.value.enabled)Y(O);else if(v.value.enabled){const de=O.split(";");R.value=de.map(f=>U(f.trim())).filter(f=>f)}else R.value=U(O)},V=O=>{var de;const f=typeof O=="string"?O:(de=O.target)==null?void 0:de.value;f!==""?(o.value.openMenu&&!r.isMenuOpen&&a("open"),re(f),a("set-input-date",R.value)):L(),S.value=!1,a("update:input-value",f),a("text-input",O,R.value)},I=O=>{o.value.enabled?(re(O.target.value),o.value.enterSubmit&&cn(R.value)&&r.inputValue!==""?(a("set-input-date",R.value,!0),R.value=null):o.value.enterSubmit&&r.inputValue===""&&(R.value=null,a("clear"))):ye(O)},se=(O,de)=>{o.value.enabled&&o.value.tabSubmit&&!de&&re(O.target.value),o.value.tabSubmit&&cn(R.value)&&r.inputValue!==""?(a("set-input-date",R.value,!0,!0),R.value=null):o.value.tabSubmit&&r.inputValue===""&&(R.value=null,a("clear",!0))},ce=()=>{b.value=!0,a("focus"),mt().then(()=>{var O;o.value.enabled&&o.value.selectOnFocus&&((O=M.value)==null||O.select())})},ye=O=>{if(Bt(O,d.value,!0),o.value.enabled&&o.value.openMenu&&!c.value.input){if(o.value.openMenu==="open"&&!r.isMenuOpen)return a("open");if(o.value.openMenu==="toggle")return a("toggle")}else o.value.enabled||a("toggle")},y=()=>{a("real-blur"),b.value=!1,(!r.isMenuOpen||c.value.enabled&&c.value.input)&&a("blur"),r.autoApply&&o.value.enabled&&R.value&&!r.isMenuOpen&&(a("set-input-date",R.value),a("select-date"),R.value=null)},D=O=>{Bt(O,d.value,!0),a("clear")},h=()=>{a("close")},H=O=>{if(O.key==="Tab"&&se(O),O.key==="Enter"&&I(O),O.key==="Escape"&&o.value.escClose&&h(),!o.value.enabled){if(O.code==="Tab")return;O.preventDefault()}},J=()=>{var O;(O=M.value)==null||O.focus({preventScroll:!0})},E=O=>{R.value=O},ee=O=>{O.key===Ee.tab&&se(O,!0)};return t({focusInput:J,setParsedDate:E}),(O,de)=>{var f,k,F;return T(),z("div",{onClick:ye},[O.$slots.trigger&&!O.$slots["dp-input"]&&!i(c).enabled?ie(O.$slots,"trigger",{key:0}):G("",!0),!O.$slots.trigger&&(!i(c).enabled||i(c).input)?(T(),z("div",ti,[O.$slots["dp-input"]&&!O.$slots.trigger&&(!i(c).enabled||i(c).enabled&&i(c).input)?ie(O.$slots,"dp-input",{key:0,value:e.inputValue,isMenuOpen:e.isMenuOpen,onInput:V,onEnter:I,onTab:se,onClear:D,onBlur:y,onKeypress:H,onPaste:N,onFocus:ce,openMenu:()=>O.$emit("open"),closeMenu:()=>O.$emit("close"),toggleMenu:()=>O.$emit("toggle")}):G("",!0),O.$slots["dp-input"]?G("",!0):(T(),z("input",{key:1,id:O.uid?`dp-input-${O.uid}`:void 0,ref_key:"inputRef",ref:M,"data-test-id":"dp-input",name:O.name,class:xe(C.value),inputmode:i(o).enabled?"text":"none",placeholder:O.placeholder,disabled:O.disabled,readonly:O.readonly,required:O.required,value:e.inputValue,autocomplete:O.autocomplete,"aria-label":(f=i(s))==null?void 0:f.input,"aria-disabled":O.disabled||void 0,"aria-invalid":O.state===!1?!0:void 0,onInput:V,onBlur:y,onFocus:ce,onKeypress:H,onKeydown:de[0]||(de[0]=W=>H(W)),onPaste:N},null,42,ai)),ge("div",{onClick:de[3]||(de[3]=W=>a("toggle"))},[O.$slots["input-icon"]&&!O.hideInputIcon?(T(),z("span",{key:0,class:"dp__input_icon",onClick:de[1]||(de[1]=W=>a("toggle"))},[ie(O.$slots,"input-icon")])):G("",!0),!O.$slots["input-icon"]&&!O.hideInputIcon&&!O.$slots["dp-input"]?(T(),Oe(i(ca),{key:1,"aria-label":(k=i(s))==null?void 0:k.calendarIcon,class:"dp__input_icon dp__input_icons",onClick:de[2]||(de[2]=W=>a("toggle"))},null,8,["aria-label"])):G("",!0)]),O.$slots["clear-icon"]&&(O.alwaysClearable||e.inputValue&&O.clearable&&!O.disabled&&!O.readonly)?(T(),z("span",ni,[ie(O.$slots,"clear-icon",{clear:D})])):G("",!0),!O.$slots["clear-icon"]&&(O.alwaysClearable||O.clearable&&e.inputValue&&!O.disabled&&!O.readonly)?(T(),z("button",{key:3,"aria-label":(F=i(s))==null?void 0:F.clearInput,class:"dp--clear-btn",type:"button",onKeydown:de[4]||(de[4]=W=>i(ut)(W,()=>D(W),!0,ee)),onClick:de[5]||(de[5]=ga(W=>D(W),["prevent"]))},[vt(i(kr),{class:"dp__input_icons","data-test-id":"clear-icon"})],40,ri)):G("",!0)])):G("",!0)])}}}),oi=typeof window<"u"?window:void 0,rn=()=>{},si=e=>Xr()?(Zr(e),!0):!1,ui=(e,t,n,a)=>{if(!e)return rn;let r=rn;const o=yt(()=>i(e),c=>{r(),c&&(c.removeEventListener(t,n),c.addEventListener(t,n,a),r=()=>{c.removeEventListener(t,n,a),r=rn})},{immediate:!0,flush:"post"}),s=()=>{o(),r()};return si(s),s},ii=(e,t,n,a={})=>{const{window:r=oi,event:o="pointerdown"}=a;return r?ui(r,o,s=>{const c=je(e),d=je(t);!c||!d||c===s.target||s.composedPath().includes(c)||s.composedPath().includes(d)||n(s)},{passive:!0}):void 0},di=["data-dp-mobile"],ci=tt({compatConfig:{MODE:3},__name:"VueDatePicker",props:{...Ia},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,o=Kt(),s=K(!1),c=ha(r,"modelValue"),d=ha(r,"timezone"),P=K(null),v=K(null),m=K(null),p=K(!1),x=K(null),A=K(!1),R=K(!1),M=K(!1),b=K(!1),{setMenuFocused:S,setShiftKey:C}=Ir(),{clearArrowNav:L}=Vt(),{validateDate:U,isValidTime:Y}=Wt(r),{defaultedTransitions:N,defaultedTextInput:re,defaultedInline:V,defaultedConfig:I,defaultedRange:se,defaultedMultiDates:ce}=Be(r),{menuTransition:ye,showTransition:y}=Ma(N),{isMobile:D}=Wr(I),h=Qr();at(()=>{l(r.modelValue),mt().then(()=>{if(!V.value.enabled){const B=f(x.value);B?.addEventListener("scroll",ae),window?.addEventListener("resize",ne)}}),V.value.enabled&&(s.value=!0),window?.addEventListener("keyup",Me),window?.addEventListener("keydown",be)}),ia(()=>{if(!V.value.enabled){const B=f(x.value);B?.removeEventListener("scroll",ae),window?.removeEventListener("resize",ne)}window?.removeEventListener("keyup",Me),window?.removeEventListener("keydown",be)});const H=ct(o,"all",r.presetDates),J=ct(o,"input");yt([c,d],()=>{l(c.value)},{deep:!0});const{openOnTop:E,menuStyle:ee,xCorrect:O,setMenuPosition:de,getScrollableParent:f,shadowRender:k}=Ku({menuRef:P,menuRefInner:v,inputRef:m,pickerWrapperRef:x,inline:V,emit:a,props:r,slots:o}),{inputValue:F,internalModelValue:W,parseExternalModelValue:l,emitModelValue:_,formatInputValue:oe,checkBeforeEmit:Ye}=qs(a,r,p),$=j(()=>({dp__main:!0,dp__theme_dark:r.dark,dp__theme_light:!r.dark,dp__flex_display:V.value.enabled,"dp--flex-display-collapsed":M.value,dp__flex_display_with_input:V.value.input})),we=j(()=>r.dark?"dp__theme_dark":"dp__theme_light"),Q=j(()=>r.teleport?{to:typeof r.teleport=="boolean"?"body":r.teleport,disabled:!r.teleport||V.value.enabled}:{}),te=j(()=>({class:"dp__outer_menu_wrap"})),u=j(()=>V.value.enabled&&(r.timePicker||r.monthPicker||r.yearPicker||r.quarterPicker)),Z=()=>{var B,ue;return((ue=(B=m.value)==null?void 0:B.$el)==null?void 0:ue.getBoundingClientRect())??{width:0,left:0,right:0}},ae=()=>{s.value&&(I.value.closeOnScroll?Ke():de())},ne=()=>{var B;s.value&&de();const ue=((B=v.value)==null?void 0:B.$el.getBoundingClientRect().width)??0;M.value=document.body.offsetWidth<=ue},Me=B=>{B.key==="Tab"&&!V.value.enabled&&!r.teleport&&I.value.tabOutClosesMenu&&(x.value.contains(document.activeElement)||Ke()),R.value=B.shiftKey},be=B=>{R.value=B.shiftKey},Ce=()=>{!r.disabled&&!r.readonly&&(k(h,Zn,r),de(!1),s.value=!0,s.value&&a("open"),s.value||ve(),l(r.modelValue))},We=()=>{var B,ue;F.value="",ve(),(B=v.value)==null||B.onValueCleared(),(ue=m.value)==null||ue.setParsedDate(null),a("update:model-value",null),a("update:model-timezone-value",null),a("cleared"),I.value.closeOnClearValue&&Ke()},g=()=>{const B=W.value;return!B||!Array.isArray(B)&&U(B)?!0:Array.isArray(B)?ce.value.enabled||B.length===2&&U(B[0])&&U(B[1])?!0:se.value.partialRange&&!r.timePicker?U(B[0]):!1:!1},le=()=>{Ye()&&g()?(_(),Ke()):a("invalid-select",W.value)},$e=B=>{Ge(),_(),I.value.closeOnAutoApply&&!B&&Ke()},Ge=()=>{m.value&&re.value.enabled&&m.value.setParsedDate(W.value)},Dt=(B=!1)=>{r.autoApply&&Y(W.value)&&g()&&(se.value.enabled&&Array.isArray(W.value)?(se.value.partialRange||W.value.length===2)&&$e(B):$e(B))},ve=()=>{re.value.enabled||(W.value=null)},Ke=(B=!1)=>{var ue,me;B&&W.value&&I.value.setDateOnMenuClose&&le(),V.value.enabled||(s.value&&(s.value=!1,O.value=!1,S(!1),C(!1),L(),a("closed"),F.value&&l(c.value)),ve(),a("blur"),(me=(ue=v.value)==null?void 0:ue.$el)==null||me.remove())},xt=(B,ue,me=!1)=>{if(!B){W.value=null;return}const At=Array.isArray(B)?!B.some(zt=>!U(zt)):U(B),Mt=Y(B);At&&Mt?(b.value=!0,W.value=B,ue?(A.value=me,le(),a("text-submit")):r.autoApply&&Dt(),mt().then(()=>{b.value=!1})):a("invalid-date",B)},La=()=>{r.autoApply&&Y(W.value)&&_(),Ge()},Ta=()=>s.value?Ke():Ce(),Ha=B=>{W.value=B},Va=()=>{re.value.enabled&&(p.value=!0,oe()),a("focus")},Wa=()=>{if(re.value.enabled&&(p.value=!1,l(r.modelValue),A.value)){const B=hs(x.value,R.value);B?.focus()}a("blur")},za=B=>{v.value&&v.value.updateMonthYear(0,{month:zn(B.month),year:zn(B.year)})},qa=B=>{l(B??r.modelValue)},w=(B,ue)=>{var me;(me=v.value)==null||me.switchView(B,ue)},X=(B,ue)=>I.value.onClickOutside?I.value.onClickOutside(B,ue):Ke(!0),fe=(B=0)=>{var ue;(ue=v.value)==null||ue.handleFlow(B)},_e=()=>P;return ii(P,m,B=>X(g,B)),t({closeMenu:Ke,selectDate:le,clearValue:We,openMenu:Ce,onScroll:ae,formatInputValue:oe,updateInternalModelValue:Ha,setMonthYear:za,parseModel:qa,switchView:w,toggleMenu:Ta,handleFlow:fe,getDpWrapMenuRef:_e}),(B,ue)=>(T(),z("div",{ref_key:"pickerWrapperRef",ref:x,class:xe($.value),"data-datepicker-instance":"","data-dp-mobile":i(D)},[vt(li,Je({ref_key:"inputRef",ref:m,"input-value":i(F),"onUpdate:inputValue":ue[0]||(ue[0]=me=>Yn(F)?F.value=me:null),"is-menu-open":s.value},B.$props,{onClear:We,onOpen:Ce,onSetInputDate:xt,onSetEmptyDate:i(_),onSelectDate:le,onToggle:Ta,onClose:Ke,onFocus:Va,onBlur:Wa,onRealBlur:ue[1]||(ue[1]=me=>p.value=!1),onTextInput:ue[2]||(ue[2]=me=>B.$emit("text-input",me))}),ot({_:2},[Fe(i(J),(me,At)=>({name:me,fn:De(Mt=>[ie(B.$slots,me,Ze(it(Mt)))])}))]),1040,["input-value","is-menu-open","onSetEmptyDate"]),(T(),Oe(Na(B.teleport?Ur:"div"),Ze(it(Q.value)),{default:De(()=>[vt(da,{name:i(ye)(i(E)),css:i(y)&&!i(V).enabled},{default:De(()=>[s.value?(T(),z("div",Je({key:0,ref_key:"dpWrapMenuRef",ref:P},te.value,{class:{"dp--menu-wrapper":!i(V).enabled},style:i(V).enabled?void 0:i(ee)}),[vt(Zn,Je({ref_key:"dpMenuRef",ref:v},B.$props,{"internal-model-value":i(W),"onUpdate:internalModelValue":ue[3]||(ue[3]=me=>Yn(W)?W.value=me:null),class:{[we.value]:!0,"dp--menu-wrapper":B.teleport},"open-on-top":i(E),"no-overlay-focus":u.value,collapse:M.value,"get-input-rect":Z,"is-text-input-date":b.value,onClosePicker:Ke,onSelectDate:le,onAutoApply:Dt,onTimeUpdate:La,onFlowStep:ue[4]||(ue[4]=me=>B.$emit("flow-step",me)),onUpdateMonthYear:ue[5]||(ue[5]=me=>B.$emit("update-month-year",me)),onInvalidSelect:ue[6]||(ue[6]=me=>B.$emit("invalid-select",i(W))),onAutoApplyInvalid:ue[7]||(ue[7]=me=>B.$emit("invalid-select",me)),onInvalidFixedRange:ue[8]||(ue[8]=me=>B.$emit("invalid-fixed-range",me)),onRecalculatePosition:i(de),onTooltipOpen:ue[9]||(ue[9]=me=>B.$emit("tooltip-open",me)),onTooltipClose:ue[10]||(ue[10]=me=>B.$emit("tooltip-close",me)),onTimePickerOpen:ue[11]||(ue[11]=me=>B.$emit("time-picker-open",me)),onTimePickerClose:ue[12]||(ue[12]=me=>B.$emit("time-picker-close",me)),onAmPmChange:ue[13]||(ue[13]=me=>B.$emit("am-pm-change",me)),onRangeStart:ue[14]||(ue[14]=me=>B.$emit("range-start",me)),onRangeEnd:ue[15]||(ue[15]=me=>B.$emit("range-end",me)),onDateUpdate:ue[16]||(ue[16]=me=>B.$emit("date-update",me)),onInvalidDate:ue[17]||(ue[17]=me=>B.$emit("invalid-date",me)),onOverlayToggle:ue[18]||(ue[18]=me=>B.$emit("overlay-toggle",me)),onMenuBlur:ue[19]||(ue[19]=me=>B.$emit("blur"))}),ot({_:2},[Fe(i(H),(me,At)=>({name:me,fn:De(Mt=>[ie(B.$slots,me,Ze(it({...Mt})))])}))]),1040,["internal-model-value","class","open-on-top","no-overlay-focus","collapse","is-text-input-date","onRecalculatePosition"])],16)):G("",!0)]),_:3},8,["name","css"])]),_:3},16))],10,di))}}),zr=(()=>{const e=ci;return e.install=t=>{t.component("Vue3DatePicker",e)},e})(),vi=Object.freeze(Object.defineProperty({__proto__:null,default:zr},Symbol.toStringTag,{value:"Module"}));Object.entries(vi).forEach(([e,t])=>{e!=="default"&&(zr[e]=t)});export{zr as Q}; diff --git a/src/static/app/dist/assets/vue-datepicker-COnDbf6W.js b/src/static/app/dist/assets/vue-datepicker-COnDbf6W.js new file mode 100644 index 0000000..15fa53c --- /dev/null +++ b/src/static/app/dist/assets/vue-datepicker-COnDbf6W.js @@ -0,0 +1 @@ +import{J as tt,a6 as Kt,r as K,a7 as ha,o as at,$ as mt,X as ia,H as yt,q as j,c as z,b as vt,k as Oe,a8 as ot,i as Fe,w as De,a9 as ie,aa as Ze,ab as it,u as i,ac as Je,ad as Yn,d as G,j as da,l as Na,ae as Ur,n as xe,af as Qr,E as ka,U as jr,ag as Cn,f as T,a as ge,a4 as ga,F as ke,s as pt,t as lt,O as Gr,ah as Kr,e as Rt,M as Xr,N as Zr,ai as Jr,m as Aa,aj as Ya,C as el}from"./index-Upsq31TS.js";const Jn=6048e5,tl=864e5,al=6e4,er=36e5,nl=1e3,Rn=Symbol.for("constructDateFrom");function Se(e,t){return typeof e=="function"?e(t):e&&typeof e=="object"&&Rn in e?e[Rn](t):e instanceof Date?new e.constructor(t):new Date(t)}function pe(e,t){return Se(t||e,e)}function ft(e,t,n){const a=pe(e,n?.in);return isNaN(t)?Se(n?.in||e,NaN):(t&&a.setDate(a.getDate()+t),a)}function bt(e,t,n){const a=pe(e,n?.in);if(isNaN(t))return Se(e,NaN);if(!t)return a;const r=a.getDate(),o=Se(e,a.getTime());o.setMonth(a.getMonth()+t+1,0);const s=o.getDate();return r>=s?o:(a.setFullYear(o.getFullYear(),o.getMonth(),r),a)}function tr(e,t,n){const{years:a=0,months:r=0,weeks:o=0,days:s=0,hours:c=0,minutes:d=0,seconds:P=0}=t,v=pe(e,n?.in),m=r||a?bt(v,r+a*12):v,p=s||o?ft(m,s+o*7):m,x=d+c*60,R=(P+x*60)*1e3;return Se(e,+p+R)}function rl(e,t,n){return Se(e,+pe(e)+t)}function ll(e,t,n){return rl(e,t*er)}let ol={};function Xt(){return ol}function _t(e,t){const n=Xt(),a=t?.weekStartsOn??t?.locale?.options?.weekStartsOn??n.weekStartsOn??n.locale?.options?.weekStartsOn??0,r=pe(e,t?.in),o=r.getDay(),s=(o=o.getTime()?a+1:n.getTime()>=c.getTime()?a:a-1}function Ca(e){const t=pe(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 Da(e,...t){const n=Se.bind(null,t.find(a=>typeof a=="object"));return t.map(n)}function Sn(e,t){const n=pe(e,t?.in);return n.setHours(0,0,0,0),n}function nr(e,t,n){const[a,r]=Da(n?.in,e,t),o=Sn(a),s=Sn(r),c=+o-Ca(o),d=+s-Ca(s);return Math.round((c-d)/tl)}function sl(e,t){const n=ar(e,t),a=Se(e,0);return a.setFullYear(n,0,4),a.setHours(0,0,0,0),na(a)}function ul(e,t,n){return bt(e,t*3,n)}function mn(e,t,n){return bt(e,t*12,n)}function Nn(e,t){const n=+pe(e)-+pe(t);return n<0?-1:n>0?1:n}function rr(e){return e instanceof Date||typeof e=="object"&&Object.prototype.toString.call(e)==="[object Date]"}function pa(e){return!(!rr(e)&&typeof e!="number"||isNaN(+pe(e)))}function In(e,t){const n=pe(e,t?.in);return Math.trunc(n.getMonth()/3)+1}function il(e,t,n){const[a,r]=Da(n?.in,e,t);return a.getFullYear()-r.getFullYear()}function dl(e,t,n){const[a,r]=Da(n?.in,e,t),o=Nn(a,r),s=Math.abs(il(a,r));a.setFullYear(1584),r.setFullYear(1584);const c=Nn(a,r)===-o,d=o*(s-+c);return d===0?0:d}function lr(e,t){const[n,a]=Da(e,t.start,t.end);return{start:n,end:a}}function or(e,t){const{start:n,end:a}=lr(t?.in,e);let r=+n>+a;const o=r?+n:+a,s=r?a:n;s.setHours(0,0,0,0);let c=1;const d=[];for(;+s<=o;)d.push(Se(n,s)),s.setDate(s.getDate()+c),s.setHours(0,0,0,0);return r?d.reverse():d}function Ut(e,t){const n=pe(e,t?.in),a=n.getMonth(),r=a-a%3;return n.setMonth(r,1),n.setHours(0,0,0,0),n}function cl(e,t){const{start:n,end:a}=lr(t?.in,e);let r=+n>+a;const o=r?+Ut(n):+Ut(a);let s=Ut(r?a:n),c=1;const d=[];for(;+s<=o;)d.push(Se(n,s)),s=ul(s,c);return r?d.reverse():d}function vl(e,t){const n=pe(e,t?.in);return n.setDate(1),n.setHours(0,0,0,0),n}function sr(e,t){const n=pe(e,t?.in),a=n.getFullYear();return n.setFullYear(a+1,0,0),n.setHours(23,59,59,999),n}function wa(e,t){const n=pe(e,t?.in);return n.setFullYear(n.getFullYear(),0,1),n.setHours(0,0,0,0),n}function ur(e,t){const n=Xt(),a=t?.weekStartsOn??t?.locale?.options?.weekStartsOn??n.weekStartsOn??n.locale?.options?.weekStartsOn??0,r=pe(e,t?.in),o=r.getDay(),s=(o{let a;const r=ml[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 Qa(e){return(t={})=>{const n=t.width?String(t.width):e.defaultWidth;return e.formats[n]||e.formats[e.defaultWidth]}}const pl={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},yl={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},hl={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},gl={date:Qa({formats:pl,defaultWidth:"full"}),time:Qa({formats:yl,defaultWidth:"full"}),dateTime:Qa({formats:hl,defaultWidth:"full"})},wl={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},bl=(e,t,n,a)=>wl[e];function va(e){return(t,n)=>{const a=n?.context?String(n.context):"standalone";let r;if(a==="formatting"&&e.formattingValues){const s=e.defaultFormattingWidth||e.defaultWidth,c=n?.width?String(n.width):s;r=e.formattingValues[c]||e.formattingValues[s]}else{const s=e.defaultWidth,c=n?.width?String(n.width):e.defaultWidth;r=e.values[c]||e.values[s]}const o=e.argumentCallback?e.argumentCallback(t):t;return r[o]}}const _l={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},kl={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},Dl={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"]},xl={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"]},Ml={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"}},Pl={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"}},Tl=(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"},Ol={ordinalNumber:Tl,era:va({values:_l,defaultWidth:"wide"}),quarter:va({values:kl,defaultWidth:"wide",argumentCallback:e=>e-1}),month:va({values:Dl,defaultWidth:"wide"}),day:va({values:xl,defaultWidth:"wide"}),dayPeriod:va({values:Ml,defaultWidth:"wide",formattingValues:Pl,defaultFormattingWidth:"wide"})};function ma(e){return(t,n={})=>{const a=n.width,r=a&&e.matchPatterns[a]||e.matchPatterns[e.defaultMatchWidth],o=t.match(r);if(!o)return null;const s=o[0],c=a&&e.parsePatterns[a]||e.parsePatterns[e.defaultParseWidth],d=Array.isArray(c)?Al(c,m=>m.test(s)):$l(c,m=>m.test(s));let P;P=e.valueCallback?e.valueCallback(d):d,P=n.valueCallback?n.valueCallback(P):P;const v=t.slice(s.length);return{value:P,rest:v}}}function $l(e,t){for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t(e[n]))return n}function Al(e,t){for(let n=0;n{const a=t.match(e.matchPattern);if(!a)return null;const r=a[0],o=t.match(e.parsePattern);if(!o)return null;let s=e.valueCallback?e.valueCallback(o[0]):o[0];s=n.valueCallback?n.valueCallback(s):s;const c=t.slice(r.length);return{value:s,rest:c}}}const Cl=/^(\d+)(th|st|nd|rd)?/i,Rl=/\d+/i,Sl={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},Nl={any:[/^b/i,/^(a|c)/i]},Il={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},El={any:[/1/i,/2/i,/3/i,/4/i]},Fl={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},Bl={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]},Ll={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},Hl={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]},Vl={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},Wl={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}},zl={ordinalNumber:Yl({matchPattern:Cl,parsePattern:Rl,valueCallback:e=>parseInt(e,10)}),era:ma({matchPatterns:Sl,defaultMatchWidth:"wide",parsePatterns:Nl,defaultParseWidth:"any"}),quarter:ma({matchPatterns:Il,defaultMatchWidth:"wide",parsePatterns:El,defaultParseWidth:"any",valueCallback:e=>e+1}),month:ma({matchPatterns:Fl,defaultMatchWidth:"wide",parsePatterns:Bl,defaultParseWidth:"any"}),day:ma({matchPatterns:Ll,defaultMatchWidth:"wide",parsePatterns:Hl,defaultParseWidth:"any"}),dayPeriod:ma({matchPatterns:Vl,defaultMatchWidth:"any",parsePatterns:Wl,defaultParseWidth:"any"})},ir={code:"en-US",formatDistance:fl,formatLong:gl,formatRelative:bl,localize:Ol,match:zl,options:{weekStartsOn:0,firstWeekContainsDate:1}};function ql(e,t){const n=pe(e,t?.in);return nr(n,wa(n))+1}function fn(e,t){const n=pe(e,t?.in),a=+na(n)-+sl(n);return Math.round(a/Jn)+1}function pn(e,t){const n=pe(e,t?.in),a=n.getFullYear(),r=Xt(),o=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??r.firstWeekContainsDate??r.locale?.options?.firstWeekContainsDate??1,s=Se(t?.in||e,0);s.setFullYear(a+1,0,o),s.setHours(0,0,0,0);const c=_t(s,t),d=Se(t?.in||e,0);d.setFullYear(a,0,o),d.setHours(0,0,0,0);const P=_t(d,t);return+n>=+c?a+1:+n>=+P?a:a-1}function Ul(e,t){const n=Xt(),a=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??n.firstWeekContainsDate??n.locale?.options?.firstWeekContainsDate??1,r=pn(e,t),o=Se(t?.in||e,0);return o.setFullYear(r,0,a),o.setHours(0,0,0,0),_t(o,t)}function yn(e,t){const n=pe(e,t?.in),a=+_t(n,t)-+Ul(n,t);return Math.round(a/Jn)+1}function Re(e,t){const n=e<0?"-":"",a=Math.abs(e).toString().padStart(t,"0");return n+a}const It={y(e,t){const n=e.getFullYear(),a=n>0?n:1-n;return Re(t==="yy"?a%100:a,t.length)},M(e,t){const n=e.getMonth();return t==="M"?String(n+1):Re(n+1,2)},d(e,t){return Re(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 Re(e.getHours()%12||12,t.length)},H(e,t){return Re(e.getHours(),t.length)},m(e,t){return Re(e.getMinutes(),t.length)},s(e,t){return Re(e.getSeconds(),t.length)},S(e,t){const n=t.length,a=e.getMilliseconds(),r=Math.trunc(a*Math.pow(10,n-3));return Re(r,t.length)}},Zt={midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},Fn={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 It.y(e,t)},Y:function(e,t,n,a){const r=pn(e,a),o=r>0?r:1-r;if(t==="YY"){const s=o%100;return Re(s,2)}return t==="Yo"?n.ordinalNumber(o,{unit:"year"}):Re(o,t.length)},R:function(e,t){const n=ar(e);return Re(n,t.length)},u:function(e,t){const n=e.getFullYear();return Re(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 Re(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 Re(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 It.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 Re(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=yn(e,a);return t==="wo"?n.ordinalNumber(r,{unit:"week"}):Re(r,t.length)},I:function(e,t,n){const a=fn(e);return t==="Io"?n.ordinalNumber(a,{unit:"week"}):Re(a,t.length)},d:function(e,t,n){return t==="do"?n.ordinalNumber(e.getDate(),{unit:"date"}):It.d(e,t)},D:function(e,t,n){const a=ql(e);return t==="Do"?n.ordinalNumber(a,{unit:"dayOfYear"}):Re(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(),o=(r-a.weekStartsOn+8)%7||7;switch(t){case"e":return String(o);case"ee":return Re(o,2);case"eo":return n.ordinalNumber(o,{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(),o=(r-a.weekStartsOn+8)%7||7;switch(t){case"c":return String(o);case"cc":return Re(o,t.length);case"co":return n.ordinalNumber(o,{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 Re(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=Zt.noon:a===0?r=Zt.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=Zt.evening:a>=12?r=Zt.afternoon:a>=4?r=Zt.morning:r=Zt.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 It.h(e,t)},H:function(e,t,n){return t==="Ho"?n.ordinalNumber(e.getHours(),{unit:"hour"}):It.H(e,t)},K:function(e,t,n){const a=e.getHours()%12;return t==="Ko"?n.ordinalNumber(a,{unit:"hour"}):Re(a,t.length)},k:function(e,t,n){let a=e.getHours();return a===0&&(a=24),t==="ko"?n.ordinalNumber(a,{unit:"hour"}):Re(a,t.length)},m:function(e,t,n){return t==="mo"?n.ordinalNumber(e.getMinutes(),{unit:"minute"}):It.m(e,t)},s:function(e,t,n){return t==="so"?n.ordinalNumber(e.getSeconds(),{unit:"second"}):It.s(e,t)},S:function(e,t){return It.S(e,t)},X:function(e,t,n){const a=e.getTimezoneOffset();if(a===0)return"Z";switch(t){case"X":return Ln(a);case"XXXX":case"XX":return qt(a);case"XXXXX":case"XXX":default:return qt(a,":")}},x:function(e,t,n){const a=e.getTimezoneOffset();switch(t){case"x":return Ln(a);case"xxxx":case"xx":return qt(a);case"xxxxx":case"xxx":default:return qt(a,":")}},O:function(e,t,n){const a=e.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+Bn(a,":");case"OOOO":default:return"GMT"+qt(a,":")}},z:function(e,t,n){const a=e.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+Bn(a,":");case"zzzz":default:return"GMT"+qt(a,":")}},t:function(e,t,n){const a=Math.trunc(+e/1e3);return Re(a,t.length)},T:function(e,t,n){return Re(+e,t.length)}};function Bn(e,t=""){const n=e>0?"-":"+",a=Math.abs(e),r=Math.trunc(a/60),o=a%60;return o===0?n+String(r):n+String(r)+t+Re(o,2)}function Ln(e,t){return e%60===0?(e>0?"-":"+")+Re(Math.abs(e)/60,2):qt(e,t)}function qt(e,t=""){const n=e>0?"-":"+",a=Math.abs(e),r=Re(Math.trunc(a/60),2),o=Re(a%60,2);return n+r+t+o}const Hn=(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"})}},dr=(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"})}},Ql=(e,t)=>{const n=e.match(/(P+)(p+)?/)||[],a=n[1],r=n[2];if(!r)return Hn(e,t);let o;switch(a){case"P":o=t.dateTime({width:"short"});break;case"PP":o=t.dateTime({width:"medium"});break;case"PPP":o=t.dateTime({width:"long"});break;case"PPPP":default:o=t.dateTime({width:"full"});break}return o.replace("{{date}}",Hn(a,t)).replace("{{time}}",dr(r,t))},ln={p:dr,P:Ql},jl=/^D+$/,Gl=/^Y+$/,Kl=["D","DD","YY","YYYY"];function cr(e){return jl.test(e)}function vr(e){return Gl.test(e)}function on(e,t,n){const a=Xl(e,t,n);if(console.warn(a),Kl.includes(e))throw new RangeError(a)}function Xl(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 Zl=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,Jl=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,eo=/^'([^]*?)'?$/,to=/''/g,ao=/[a-zA-Z]/;function $t(e,t,n){const a=Xt(),r=n?.locale??a.locale??ir,o=n?.firstWeekContainsDate??n?.locale?.options?.firstWeekContainsDate??a.firstWeekContainsDate??a.locale?.options?.firstWeekContainsDate??1,s=n?.weekStartsOn??n?.locale?.options?.weekStartsOn??a.weekStartsOn??a.locale?.options?.weekStartsOn??0,c=pe(e,n?.in);if(!pa(c))throw new RangeError("Invalid time value");let d=t.match(Jl).map(v=>{const m=v[0];if(m==="p"||m==="P"){const p=ln[m];return p(v,r.formatLong)}return v}).join("").match(Zl).map(v=>{if(v==="''")return{isToken:!1,value:"'"};const m=v[0];if(m==="'")return{isToken:!1,value:no(v)};if(Fn[m])return{isToken:!0,value:v};if(m.match(ao))throw new RangeError("Format string contains an unescaped latin alphabet character `"+m+"`");return{isToken:!1,value:v}});r.localize.preprocessor&&(d=r.localize.preprocessor(c,d));const P={firstWeekContainsDate:o,weekStartsOn:s,locale:r};return d.map(v=>{if(!v.isToken)return v.value;const m=v.value;(!n?.useAdditionalWeekYearTokens&&vr(m)||!n?.useAdditionalDayOfYearTokens&&cr(m))&&on(m,t,String(e));const p=Fn[m[0]];return p(c,m,r.localize,P)}).join("")}function no(e){const t=e.match(eo);return t?t[1].replace(to,"'"):e}function ro(e,t){return pe(e,t?.in).getDay()}function lo(e,t){const n=pe(e,t?.in),a=n.getFullYear(),r=n.getMonth(),o=Se(n,0);return o.setFullYear(a,r+1,0),o.setHours(0,0,0,0),o.getDate()}function oo(){return Object.assign({},Xt())}function St(e,t){return pe(e,t?.in).getHours()}function so(e,t){const n=pe(e,t?.in).getDay();return n===0?7:n}function Ht(e,t){return pe(e,t?.in).getMinutes()}function Pe(e,t){return pe(e,t?.in).getMonth()}function ra(e){return pe(e).getSeconds()}function he(e,t){return pe(e,t?.in).getFullYear()}function Gt(e,t){return+pe(e)>+pe(t)}function la(e,t){return+pe(e)<+pe(t)}function ta(e,t){return+pe(e)==+pe(t)}function uo(e,t){const n=io(t)?new t(0):Se(t,0);return n.setFullYear(e.getFullYear(),e.getMonth(),e.getDate()),n.setHours(e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()),n}function io(e){return typeof e=="function"&&e.prototype?.constructor===e}const co=10;class mr{subPriority=0;validate(t,n){return!0}}class vo extends mr{constructor(t,n,a,r,o){super(),this.value=t,this.validateValue=n,this.setValue=a,this.priority=r,o&&(this.subPriority=o)}validate(t,n){return this.validateValue(t,this.value,n)}set(t,n,a){return this.setValue(t,n,this.value,a)}}class mo extends mr{priority=co;subPriority=-1;constructor(t,n){super(),this.context=t||(a=>Se(n,a))}set(t,n){return n.timestampIsSet?t:Se(t,uo(t,this.context))}}class Ae{run(t,n,a,r){const o=this.parse(t,n,a,r);return o?{setter:new vo(o.value,this.validate,this.set,this.priority,this.subPriority),rest:o.rest}:null}validate(t,n,a){return!0}}class fo extends Ae{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 Ue={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}/},Pt={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 Qe(e,t){return e&&{value:t(e.value),rest:e.rest}}function Le(e,t){const n=t.match(e);return n?{value:parseInt(n[0],10),rest:t.slice(n[0].length)}:null}function Tt(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,o=n[3]?parseInt(n[3],10):0,s=n[5]?parseInt(n[5],10):0;return{value:a*(r*er+o*al+s*nl),rest:t.slice(n[0].length)}}function fr(e){return Le(Ue.anyDigitsSigned,e)}function Ve(e,t){switch(e){case 1:return Le(Ue.singleDigit,t);case 2:return Le(Ue.twoDigits,t);case 3:return Le(Ue.threeDigits,t);case 4:return Le(Ue.fourDigits,t);default:return Le(new RegExp("^\\d{1,"+e+"}"),t)}}function Ra(e,t){switch(e){case 1:return Le(Ue.singleDigitSigned,t);case 2:return Le(Ue.twoDigitsSigned,t);case 3:return Le(Ue.threeDigitsSigned,t);case 4:return Le(Ue.fourDigitsSigned,t);default:return Le(new RegExp("^-?\\d{1,"+e+"}"),t)}}function hn(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 pr(e,t){const n=t>0,a=n?t:1-t;let r;if(a<=50)r=e||100;else{const o=a+50,s=Math.trunc(o/100)*100,c=e>=o%100;r=e+s-(c?100:0)}return n?r:1-r}function yr(e){return e%400===0||e%4===0&&e%100!==0}class po extends Ae{priority=130;incompatibleTokens=["Y","R","u","w","I","i","e","c","t","T"];parse(t,n,a){const r=o=>({year:o,isTwoDigitYear:n==="yy"});switch(n){case"y":return Qe(Ve(4,t),r);case"yo":return Qe(a.ordinalNumber(t,{unit:"year"}),r);default:return Qe(Ve(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 s=pr(a.year,r);return t.setFullYear(s,0,1),t.setHours(0,0,0,0),t}const o=!("era"in n)||n.era===1?a.year:1-a.year;return t.setFullYear(o,0,1),t.setHours(0,0,0,0),t}}class yo extends Ae{priority=130;parse(t,n,a){const r=o=>({year:o,isTwoDigitYear:n==="YY"});switch(n){case"Y":return Qe(Ve(4,t),r);case"Yo":return Qe(a.ordinalNumber(t,{unit:"year"}),r);default:return Qe(Ve(n.length,t),r)}}validate(t,n){return n.isTwoDigitYear||n.year>0}set(t,n,a,r){const o=pn(t,r);if(a.isTwoDigitYear){const c=pr(a.year,o);return t.setFullYear(c,0,r.firstWeekContainsDate),t.setHours(0,0,0,0),_t(t,r)}const s=!("era"in n)||n.era===1?a.year:1-a.year;return t.setFullYear(s,0,r.firstWeekContainsDate),t.setHours(0,0,0,0),_t(t,r)}incompatibleTokens=["y","R","u","Q","q","M","L","I","d","D","i","t","T"]}class ho extends Ae{priority=130;parse(t,n){return Ra(n==="R"?4:n.length,t)}set(t,n,a){const r=Se(t,0);return r.setFullYear(a,0,4),r.setHours(0,0,0,0),na(r)}incompatibleTokens=["G","y","Y","u","Q","q","M","L","w","d","D","e","c","t","T"]}class go extends Ae{priority=130;parse(t,n){return Ra(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 wo extends Ae{priority=120;parse(t,n,a){switch(n){case"Q":case"QQ":return Ve(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 bo extends Ae{priority=120;parse(t,n,a){switch(n){case"q":case"qq":return Ve(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 _o extends Ae{incompatibleTokens=["Y","R","q","Q","L","w","I","D","i","e","c","t","T"];priority=110;parse(t,n,a){const r=o=>o-1;switch(n){case"M":return Qe(Le(Ue.month,t),r);case"MM":return Qe(Ve(2,t),r);case"Mo":return Qe(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 ko extends Ae{priority=110;parse(t,n,a){const r=o=>o-1;switch(n){case"L":return Qe(Le(Ue.month,t),r);case"LL":return Qe(Ve(2,t),r);case"Lo":return Qe(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 Do(e,t,n){const a=pe(e,n?.in),r=yn(a,n)-t;return a.setDate(a.getDate()-r*7),pe(a,n?.in)}class xo extends Ae{priority=100;parse(t,n,a){switch(n){case"w":return Le(Ue.week,t);case"wo":return a.ordinalNumber(t,{unit:"week"});default:return Ve(n.length,t)}}validate(t,n){return n>=1&&n<=53}set(t,n,a,r){return _t(Do(t,a,r),r)}incompatibleTokens=["y","R","u","q","Q","M","L","I","d","D","i","t","T"]}function Mo(e,t,n){const a=pe(e,n?.in),r=fn(a,n)-t;return a.setDate(a.getDate()-r*7),a}class Po extends Ae{priority=100;parse(t,n,a){switch(n){case"I":return Le(Ue.week,t);case"Io":return a.ordinalNumber(t,{unit:"week"});default:return Ve(n.length,t)}}validate(t,n){return n>=1&&n<=53}set(t,n,a){return na(Mo(t,a))}incompatibleTokens=["y","Y","u","q","Q","M","L","w","d","D","e","c","t","T"]}const To=[31,28,31,30,31,30,31,31,30,31,30,31],Oo=[31,29,31,30,31,30,31,31,30,31,30,31];class $o extends Ae{priority=90;subPriority=1;parse(t,n,a){switch(n){case"d":return Le(Ue.date,t);case"do":return a.ordinalNumber(t,{unit:"date"});default:return Ve(n.length,t)}}validate(t,n){const a=t.getFullYear(),r=yr(a),o=t.getMonth();return r?n>=1&&n<=Oo[o]:n>=1&&n<=To[o]}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 Ao extends Ae{priority=90;subpriority=1;parse(t,n,a){switch(n){case"D":case"DD":return Le(Ue.dayOfYear,t);case"Do":return a.ordinalNumber(t,{unit:"date"});default:return Ve(n.length,t)}}validate(t,n){const a=t.getFullYear();return yr(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 gn(e,t,n){const a=Xt(),r=n?.weekStartsOn??n?.locale?.options?.weekStartsOn??a.weekStartsOn??a.locale?.options?.weekStartsOn??0,o=pe(e,n?.in),s=o.getDay(),d=(t%7+7)%7,P=7-r,v=t<0||t>6?t-(s+P)%7:(d+P)%7-(s+P)%7;return ft(o,v,n)}class Yo extends Ae{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=gn(t,a,r),t.setHours(0,0,0,0),t}incompatibleTokens=["D","i","e","c","t","T"]}class Co extends Ae{priority=90;parse(t,n,a,r){const o=s=>{const c=Math.floor((s-1)/7)*7;return(s+r.weekStartsOn+6)%7+c};switch(n){case"e":case"ee":return Qe(Ve(n.length,t),o);case"eo":return Qe(a.ordinalNumber(t,{unit:"day"}),o);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=gn(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 Ro extends Ae{priority=90;parse(t,n,a,r){const o=s=>{const c=Math.floor((s-1)/7)*7;return(s+r.weekStartsOn+6)%7+c};switch(n){case"c":case"cc":return Qe(Ve(n.length,t),o);case"co":return Qe(a.ordinalNumber(t,{unit:"day"}),o);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=gn(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 So(e,t,n){const a=pe(e,n?.in),r=so(a,n),o=t-r;return ft(a,o,n)}class No extends Ae{priority=90;parse(t,n,a){const r=o=>o===0?7:o;switch(n){case"i":case"ii":return Ve(n.length,t);case"io":return a.ordinalNumber(t,{unit:"day"});case"iii":return Qe(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 Qe(a.day(t,{width:"narrow",context:"formatting"}),r);case"iiiiii":return Qe(a.day(t,{width:"short",context:"formatting"})||a.day(t,{width:"narrow",context:"formatting"}),r);case"iiii":default:return Qe(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=So(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 Io extends Ae{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(hn(a),0,0,0),t}incompatibleTokens=["b","B","H","k","t","T"]}class Eo extends Ae{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(hn(a),0,0,0),t}incompatibleTokens=["a","B","H","k","t","T"]}class Fo extends Ae{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(hn(a),0,0,0),t}incompatibleTokens=["a","b","t","T"]}class Bo extends Ae{priority=70;parse(t,n,a){switch(n){case"h":return Le(Ue.hour12h,t);case"ho":return a.ordinalNumber(t,{unit:"hour"});default:return Ve(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 Lo extends Ae{priority=70;parse(t,n,a){switch(n){case"H":return Le(Ue.hour23h,t);case"Ho":return a.ordinalNumber(t,{unit:"hour"});default:return Ve(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 Ho extends Ae{priority=70;parse(t,n,a){switch(n){case"K":return Le(Ue.hour11h,t);case"Ko":return a.ordinalNumber(t,{unit:"hour"});default:return Ve(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 Vo extends Ae{priority=70;parse(t,n,a){switch(n){case"k":return Le(Ue.hour24h,t);case"ko":return a.ordinalNumber(t,{unit:"hour"});default:return Ve(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 Wo extends Ae{priority=60;parse(t,n,a){switch(n){case"m":return Le(Ue.minute,t);case"mo":return a.ordinalNumber(t,{unit:"minute"});default:return Ve(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 zo extends Ae{priority=50;parse(t,n,a){switch(n){case"s":return Le(Ue.second,t);case"so":return a.ordinalNumber(t,{unit:"second"});default:return Ve(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 qo extends Ae{priority=30;parse(t,n){const a=r=>Math.trunc(r*Math.pow(10,-n.length+3));return Qe(Ve(n.length,t),a)}set(t,n,a){return t.setMilliseconds(a),t}incompatibleTokens=["t","T"]}class Uo extends Ae{priority=10;parse(t,n){switch(n){case"X":return Tt(Pt.basicOptionalMinutes,t);case"XX":return Tt(Pt.basic,t);case"XXXX":return Tt(Pt.basicOptionalSeconds,t);case"XXXXX":return Tt(Pt.extendedOptionalSeconds,t);case"XXX":default:return Tt(Pt.extended,t)}}set(t,n,a){return n.timestampIsSet?t:Se(t,t.getTime()-Ca(t)-a)}incompatibleTokens=["t","T","x"]}class Qo extends Ae{priority=10;parse(t,n){switch(n){case"x":return Tt(Pt.basicOptionalMinutes,t);case"xx":return Tt(Pt.basic,t);case"xxxx":return Tt(Pt.basicOptionalSeconds,t);case"xxxxx":return Tt(Pt.extendedOptionalSeconds,t);case"xxx":default:return Tt(Pt.extended,t)}}set(t,n,a){return n.timestampIsSet?t:Se(t,t.getTime()-Ca(t)-a)}incompatibleTokens=["t","T","X"]}class jo extends Ae{priority=40;parse(t){return fr(t)}set(t,n,a){return[Se(t,a*1e3),{timestampIsSet:!0}]}incompatibleTokens="*"}class Go extends Ae{priority=20;parse(t){return fr(t)}set(t,n,a){return[Se(t,a),{timestampIsSet:!0}]}incompatibleTokens="*"}const Ko={G:new fo,y:new po,Y:new yo,R:new ho,u:new go,Q:new wo,q:new bo,M:new _o,L:new ko,w:new xo,I:new Po,d:new $o,D:new Ao,E:new Yo,e:new Co,c:new Ro,i:new No,a:new Io,b:new Eo,B:new Fo,h:new Bo,H:new Lo,K:new Ho,k:new Vo,m:new Wo,s:new zo,S:new qo,X:new Uo,x:new Qo,t:new jo,T:new Go},Xo=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,Zo=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,Jo=/^'([^]*?)'?$/,es=/''/g,ts=/\S/,as=/[a-zA-Z]/;function sn(e,t,n,a){const r=()=>Se(a?.in||n,NaN),o=oo(),s=a?.locale??o.locale??ir,c=a?.firstWeekContainsDate??a?.locale?.options?.firstWeekContainsDate??o.firstWeekContainsDate??o.locale?.options?.firstWeekContainsDate??1,d=a?.weekStartsOn??a?.locale?.options?.weekStartsOn??o.weekStartsOn??o.locale?.options?.weekStartsOn??0;if(!t)return e?r():pe(n,a?.in);const P={firstWeekContainsDate:c,weekStartsOn:d,locale:s},v=[new mo(a?.in,n)],m=t.match(Zo).map(M=>{const b=M[0];if(b in ln){const S=ln[b];return S(M,s.formatLong)}return M}).join("").match(Xo),p=[];for(let M of m){!a?.useAdditionalWeekYearTokens&&vr(M)&&on(M,t,e),!a?.useAdditionalDayOfYearTokens&&cr(M)&&on(M,t,e);const b=M[0],S=Ko[b];if(S){const{incompatibleTokens:C}=S;if(Array.isArray(C)){const U=p.find(Y=>C.includes(Y.token)||Y.token===b);if(U)throw new RangeError(`The format string mustn't contain \`${U.fullToken}\` and \`${M}\` at the same time`)}else if(S.incompatibleTokens==="*"&&p.length>0)throw new RangeError(`The format string mustn't contain \`${M}\` and any other token at the same time`);p.push({token:b,fullToken:M});const L=S.run(e,M,s.match,P);if(!L)return r();v.push(L.setter),e=L.rest}else{if(b.match(as))throw new RangeError("Format string contains an unescaped latin alphabet character `"+b+"`");if(M==="''"?M="'":b==="'"&&(M=ns(M)),e.indexOf(M)===0)e=e.slice(M.length);else return r()}}if(e.length>0&&ts.test(e))return r();const x=v.map(M=>M.priority).sort((M,b)=>b-M).filter((M,b,S)=>S.indexOf(M)===b).map(M=>v.filter(b=>b.priority===M).sort((b,S)=>S.subPriority-b.subPriority)).map(M=>M[0]);let A=pe(n,a?.in);if(isNaN(+A))return r();const R={};for(const M of x){if(!M.validate(A,P))return r();const b=M.set(A,R,P);Array.isArray(b)?(A=b[0],Object.assign(R,b[1])):A=b}return A}function ns(e){return e.match(Jo)[1].replace(es,"'")}function Vn(e,t,n){const[a,r]=Da(n?.in,e,t);return+Ut(a)==+Ut(r)}function hr(e,t,n){return ft(e,-t,n)}function gr(e,t,n){const a=pe(e,n?.in),r=a.getFullYear(),o=a.getDate(),s=Se(e,0);s.setFullYear(r,t,15),s.setHours(0,0,0,0);const c=lo(s);return a.setMonth(t,Math.min(o,c)),a}function Ne(e,t,n){let a=pe(e,n?.in);return isNaN(+a)?Se(e,NaN):(t.year!=null&&a.setFullYear(t.year),t.month!=null&&(a=gr(a,t.month)),t.date!=null&&a.setDate(t.date),t.hours!=null&&a.setHours(t.hours),t.minutes!=null&&a.setMinutes(t.minutes),t.seconds!=null&&a.setSeconds(t.seconds),t.milliseconds!=null&&a.setMilliseconds(t.milliseconds),a)}function rs(e,t,n){const a=pe(e,n?.in);return a.setHours(t),a}function wr(e,t,n){const a=pe(e,n?.in);return a.setMilliseconds(t),a}function ls(e,t,n){const a=pe(e,n?.in);return a.setMinutes(t),a}function br(e,t,n){const a=pe(e,n?.in);return a.setSeconds(t),a}function Ot(e,t,n){const a=pe(e,n?.in);return isNaN(+a)?Se(e,NaN):(a.setFullYear(t),a)}function oa(e,t,n){return bt(e,-t,n)}function os(e,t,n){const{years:a=0,months:r=0,weeks:o=0,days:s=0,hours:c=0,minutes:d=0,seconds:P=0}=t,v=oa(e,r+a*12,n),m=hr(v,s+o*7,n),p=d+c*60,A=(P+p*60)*1e3;return Se(e,+m-A)}function _r(e,t,n){return mn(e,-t,n)}function ca(){const e=Kr();return T(),z("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor","aria-hidden":"true",class:"dp__icon",role:"img",...e},[ge("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"}),ge("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"}),ge("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"}),ge("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"})])}ca.compatConfig={MODE:3};function kr(){return T(),z("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor","aria-hidden":"true",class:"dp__icon",role:"img"},[ge("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"}),ge("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"})])}kr.compatConfig={MODE:3};function wn(){return T(),z("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor","aria-hidden":"true",class:"dp__icon",role:"img"},[ge("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"})])}wn.compatConfig={MODE:3};function bn(){return T(),z("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor","aria-hidden":"true",class:"dp__icon",role:"img"},[ge("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"})])}bn.compatConfig={MODE:3};function _n(){return T(),z("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor","aria-hidden":"true",class:"dp__icon",role:"img"},[ge("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"}),ge("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"})])}_n.compatConfig={MODE:3};function kn(){return T(),z("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor","aria-hidden":"true",class:"dp__icon",role:"img"},[ge("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"})])}kn.compatConfig={MODE:3};function Dn(){return T(),z("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor","aria-hidden":"true",class:"dp__icon",role:"img"},[ge("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"})])}Dn.compatConfig={MODE:3};const dt=(e,t)=>t?new Date(e.toLocaleString("en-US",{timeZone:t})):new Date(e),xn=(e,t,n)=>un(e,t,n)||q(),ss=(e,t,n)=>{const a=t.dateInTz?dt(new Date(e),t.dateInTz):q(e);return n?et(a,!0):a},un=(e,t,n)=>{if(!e)return null;const a=n?et(q(e),!0):q(e);return t?t.exactMatch?ss(e,t,n):dt(a,t.timezone):a},us=e=>{const t=new Date(e.getFullYear(),0,1).getTimezoneOffset();return e.getTimezoneOffset(){if(!e)return 0;const n=new Date,a=new Date(n.toLocaleString("en-US",{timeZone:"UTC"})),r=new Date(n.toLocaleString("en-US",{timeZone:e})),o=(us(t??r)?r:t??r).getTimezoneOffset()/60;return(+a-+r)/(1e3*60*60)-o};var ht=(e=>(e.month="month",e.year="year",e))(ht||{}),gt=(e=>(e.top="top",e.bottom="bottom",e))(gt||{}),Qt=(e=>(e.header="header",e.calendar="calendar",e.timePicker="timePicker",e))(Qt||{}),rt=(e=>(e.month="month",e.year="year",e.calendar="calendar",e.time="time",e.minutes="minutes",e.hours="hours",e.seconds="seconds",e))(rt||{});const ds=["timestamp","date","iso"];var st=(e=>(e.up="up",e.down="down",e.left="left",e.right="right",e))(st||{}),Ee=(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))(Ee||{}),aa=(e=>(e.MONTH_AND_YEAR="MM-yyyy",e.YEAR="yyyy",e.DATE="dd-MM-yyyy",e))(aa||{});function Wn(e){return t=>{const n=new Intl.DateTimeFormat(e,{weekday:"short",timeZone:"UTC"}).format(new Date(`2017-01-0${t}T00:00:00+00:00`));return e==="ar"?n.slice(2,5):n.slice(0,2)}}function cs(e){return t=>$t(dt(new Date(`2017-01-0${t}T00:00:00+00:00`),"UTC"),"EEEEEE",{locale:e})}const vs=(e,t,n)=>{const a=[1,2,3,4,5,6,7];let r;if(e!==null)try{r=a.map(cs(e))}catch{r=a.map(Wn(t))}else r=a.map(Wn(t));const o=r.slice(0,n),s=r.slice(n+1,r.length);return[r[n]].concat(...s).concat(...o)},Mn=(e,t,n)=>{const a=[];for(let r=+e[0];r<=+e[1];r++)a.push({value:+r,text:Pr(r,t)});return n?a.reverse():a},Dr=(e,t,n)=>{const a=[1,2,3,4,5,6,7,8,9,10,11,12].map(o=>{const s=o<10?`0${o}`:o;return new Date(`2017-${s}-01T00:00:00+00:00`)});if(e!==null)try{const o=n==="long"?"LLLL":"LLL";return a.map((s,c)=>{const d=$t(dt(s,"UTC"),o,{locale:e});return{text:d.charAt(0).toUpperCase()+d.substring(1),value:c}})}catch{}const r=new Intl.DateTimeFormat(t,{month:n,timeZone:"UTC"});return a.map((o,s)=>{const c=r.format(o);return{text:c.charAt(0).toUpperCase()+c.substring(1),value:s}})},ms=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],je=e=>{const t=i(e);return t!=null&&t.$el?t?.$el:t},fs=e=>({type:"dot",...e??{}}),xr=e=>Array.isArray(e)?!!e[0]&&!!e[1]:!1,Pn={prop:e=>`"${e}" prop must be enabled!`,dateArr:e=>`You need to use array as "model-value" binding in order to support "${e}"`},Xe=e=>e,zn=e=>e===0?e:!e||isNaN(+e)?null:+e,qn=e=>e===null,Mr=e=>{if(e)return[...e.querySelectorAll("input, button, select, textarea, a[href]")][0]},ps=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 o=+n,s=+t;return a&&r?+e>o||+eo:r?+eps(e).map(n=>n.map(a=>{const{active:r,disabled:o,isBetween:s,highlighted:c}=t(a);return{...a,active:r,disabled:o,className:{dp__overlay_cell_active:r,dp__overlay_cell:!r,dp__overlay_cell_disabled:o,dp__overlay_cell_pad:!0,dp__overlay_cell_active_disabled:o&&r,dp__cell_in_between:s,"dp--highlighted":c}}})),Bt=(e,t,n=!1)=>{e&&t.allowStopPropagation&&(n&&e.stopImmediatePropagation(),e.stopPropagation())},ys=()=>["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 hs(e,t){let n=[...document.querySelectorAll(ys())];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 dn=(e,t)=>e?.querySelector(`[data-dp-element="${t}"]`),Pr=(e,t)=>new Intl.NumberFormat(t,{useGrouping:!1,style:"decimal"}).format(e),Tn=(e,t)=>$t(e,t??aa.DATE),ja=e=>Array.isArray(e),Sa=(e,t,n)=>t.get(Tn(e,n)),gs=(e,t)=>e?t?t instanceof Map?!!Sa(e,t):t(q(e)):!1:!0,ut=(e,t,n=!1,a)=>{if(e.key===Ee.enter||e.key===Ee.space)return n&&e.preventDefault(),t();if(a)return a(e)},ws=()=>"ontouchstart"in window||navigator.maxTouchPoints>0,Tr=(e,t)=>e?aa.MONTH_AND_YEAR:t?aa.YEAR:aa.DATE,Or=e=>e<10?`0${e}`:e,Un=(e,t,n,a,r,o)=>{const s=sn(e,t.slice(0,e.length),new Date,{locale:o});return pa(s)&&rr(s)?a||r?s:Ne(s,{hours:+n.hours,minutes:+n?.minutes,seconds:+n?.seconds,milliseconds:0}):null},bs=(e,t,n,a,r,o)=>{const s=Array.isArray(n)?n[0]:n;if(typeof t=="string")return Un(e,t,s,a,r,o);if(Array.isArray(t)){let c=null;for(const d of t)if(c=Un(e,d,s,a,r,o),c)break;return c}return typeof t=="function"?t(e):null},q=e=>e?new Date(e):new Date,_s=(e,t,n)=>{if(t){const r=(e.getMonth()+1).toString().padStart(2,"0"),o=e.getDate().toString().padStart(2,"0"),s=e.getHours().toString().padStart(2,"0"),c=e.getMinutes().toString().padStart(2,"0"),d=n?e.getSeconds().toString().padStart(2,"0"):"00";return`${e.getFullYear()}-${r}-${o}T${s}:${c}:${d}.000Z`}const a=Date.UTC(e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate(),e.getUTCHours(),e.getUTCMinutes(),e.getUTCSeconds());return new Date(a).toISOString()},et=(e,t)=>{const n=q(JSON.parse(JSON.stringify(e))),a=Ne(n,{hours:0,minutes:0,seconds:0,milliseconds:0});return t?vl(a):a},Lt=(e,t,n,a)=>{let r=e?q(e):q();return(t||t===0)&&(r=rs(r,+t)),(n||n===0)&&(r=ls(r,+n)),(a||a===0)&&(r=br(r,+a)),wr(r,0)},He=(e,t)=>!e||!t?!1:la(et(e),et(t)),Te=(e,t)=>!e||!t?!1:ta(et(e),et(t)),qe=(e,t)=>!e||!t?!1:Gt(et(e),et(t)),_a=(e,t,n)=>e!=null&&e[0]&&e!=null&&e[1]?qe(n,e[0])&&He(n,e[1]):e!=null&&e[0]&&t?qe(n,e[0])&&He(n,t)||He(n,e[0])&&qe(n,t):!1,wt=e=>{const t=Ne(new Date(e),{date:1});return et(t)},Ga=(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},jt=e=>({hours:St(e),minutes:Ht(e),seconds:ra(e)}),$r=(e,t)=>{if(t){const n=he(q(t));if(n>e)return 12;if(n===e)return Pe(q(t))}},Ar=(e,t)=>{if(t){const n=he(q(t));return n{if(e)return he(q(e))},Yr=(e,t)=>{const n=qe(e,t)?t:e,a=qe(t,e)?t:e;return or({start:n,end:a})},ks=e=>{const t=bt(e,1);return{month:Pe(t),year:he(t)}},Yt=(e,t)=>{const n=_t(e,{weekStartsOn:+t}),a=ur(e,{weekStartsOn:+t});return[n,a]},Cr=(e,t)=>{const n={hours:St(q()),minutes:Ht(q()),seconds:t?ra(q()):0};return Object.assign(n,e)},Ft=(e,t,n)=>[Ne(q(e),{date:1}),Ne(q(),{month:t,year:n,date:1})],Ct=(e,t,n)=>{let a=e?q(e):q();return(t||t===0)&&(a=gr(a,t)),n&&(a=Ot(a,n)),a},Rr=(e,t,n,a,r)=>{if(!a||r&&!t||!r&&!n)return!1;const o=r?bt(e,1):oa(e,1),s=[Pe(o),he(o)];return r?!xs(...s,t):!Ds(...s,n)},Ds=(e,t,n)=>He(...Ft(n,e,t))||Te(...Ft(n,e,t)),xs=(e,t,n)=>qe(...Ft(n,e,t))||Te(...Ft(n,e,t)),Sr=(e,t,n,a,r,o,s)=>{if(typeof t=="function"&&!s)return t(e);const c=n?{locale:n}:void 0;return Array.isArray(e)?`${$t(e[0],o,c)}${r&&!e[1]?"":a}${e[1]?$t(e[1],o,c):""}`:$t(e,o,c)},Jt=e=>{if(e)return null;throw new Error(Pn.prop("partial-range"))},Oa=(e,t)=>{if(t)return e();throw new Error(Pn.prop("range"))},cn=e=>Array.isArray(e)?pa(e[0])&&(e[1]?pa(e[1]):!0):e?pa(e):!1,Ms=(e,t)=>Ne(t??q(),{hours:+e.hours||0,minutes:+e.minutes||0,seconds:+e.seconds||0}),Ka=(e,t,n,a)=>{if(!e)return!0;if(a){const r=n==="max"?la(e,t):Gt(e,t),o={seconds:0,milliseconds:0};return r||ta(Ne(e,o),Ne(t,o))}return n==="max"?e.getTime()<=t.getTime():e.getTime()>=t.getTime()},Xa=(e,t,n)=>e?Ms(e,t):q(n??t),Qn=(e,t,n,a,r)=>{if(Array.isArray(a)){const s=Xa(e,a[0],t),c=Xa(e,a[1],t);return Ka(a[0],s,n,!!t)&&Ka(a[1],c,n,!!t)&&r}const o=Xa(e,a,t);return Ka(a,o,n,!!t)&&r},Za=e=>Ne(q(),jt(e)),Ps=(e,t,n)=>{if(e instanceof Map){const a=`${Or(n+1)}-${t}`;return e.size?e.has(a):!1}return typeof e=="function"?e(et(Ne(q(),{month:n,year:t}),!0)):!1},Ts=(e,t,n)=>{if(e instanceof Map){const a=`${Or(n+1)}-${t}`;return e.size?e.has(a):!0}return!0},Nr=(e,t,n)=>typeof e=="function"?e({month:t,year:n}):!!e.months.find(a=>a.month===t&&a.year===n),On=(e,t)=>typeof e=="function"?e(t):e.years.includes(t),vn=e=>`dp-${$t(e,"yyyy-MM-dd")}`,jn=(e,t)=>{const n=hr(et(t),e),a=ft(et(t),e);return{before:n,after:a}},fa=ka({menuFocused:!1,shiftKeyInMenu:!1}),Ir=()=>{const e=n=>{fa.menuFocused=n},t=n=>{fa.shiftKeyInMenu!==n&&(fa.shiftKeyInMenu=n)};return{control:j(()=>({shiftKeyInMenu:fa.shiftKeyInMenu,menuFocused:fa.menuFocused})),setMenuFocused:e,setShiftKey:t}},Ie=ka({monthYear:[],calendar:[],time:[],actionRow:[],selectionGrid:[],timePicker:{0:[],1:[]},monthPicker:[]}),Ja=K(null),$a=K(!1),en=K(!1),tn=K(!1),an=K(!1),nt=K(0),ze=K(0),Vt=()=>{const e=j(()=>$a.value?[...Ie.selectionGrid,Ie.actionRow].filter(m=>m.length):en.value?[...Ie.timePicker[0],...Ie.timePicker[1],an.value?[]:[Ja.value],Ie.actionRow].filter(m=>m.length):tn.value?[...Ie.monthPicker,Ie.actionRow]:[Ie.monthYear,...Ie.calendar,Ie.time,Ie.actionRow].filter(m=>m.length)),t=m=>{nt.value=m?nt.value+1:nt.value-1;let p=null;e.value[ze.value]&&(p=e.value[ze.value][nt.value]),!p&&e.value[ze.value+(m?1:-1)]?(ze.value=ze.value+(m?1:-1),nt.value=m?0:e.value[ze.value].length-1):p||(nt.value=m?nt.value-1:nt.value+1)},n=m=>{ze.value===0&&!m||ze.value===e.value.length&&m||(ze.value=m?ze.value+1:ze.value-1,e.value[ze.value]?e.value[ze.value]&&!e.value[ze.value][nt.value]&&nt.value!==0&&(nt.value=e.value[ze.value].length-1):ze.value=m?ze.value-1:ze.value+1)},a=m=>{let p=null;e.value[ze.value]&&(p=e.value[ze.value][nt.value]),p?p.focus({preventScroll:!$a.value}):nt.value=m?nt.value-1:nt.value+1},r=()=>{t(!0),a(!0)},o=()=>{t(!1),a(!1)},s=()=>{n(!1),a(!0)},c=()=>{n(!0),a(!0)},d=(m,p)=>{Ie[p]=m},P=(m,p)=>{Ie[p]=m},v=()=>{nt.value=0,ze.value=0};return{buildMatrix:d,buildMultiLevelMatrix:P,setTimePickerBackRef:m=>{Ja.value=m},setSelectionGrid:m=>{$a.value=m,v(),m||(Ie.selectionGrid=[])},setTimePicker:(m,p=!1)=>{en.value=m,an.value=p,v(),m||(Ie.timePicker[0]=[],Ie.timePicker[1]=[])},setTimePickerElements:(m,p=0)=>{Ie.timePicker[p]=m},arrowRight:r,arrowLeft:o,arrowUp:s,arrowDown:c,clearArrowNav:()=>{Ie.monthYear=[],Ie.calendar=[],Ie.time=[],Ie.actionRow=[],Ie.selectionGrid=[],Ie.timePicker[0]=[],Ie.timePicker[1]=[],$a.value=!1,en.value=!1,an.value=!1,tn.value=!1,v(),Ja.value=null},setMonthPicker:m=>{tn.value=m,v()},refSets:Ie}},Gn=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??{}}),Os=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??{}}),Kn=e=>e?typeof e=="boolean"?e?2:0:+e>=2?+e:2:0,$s=e=>{const t=typeof e=="object"&&e,n={static:!0,solo:!1};if(!e)return{...n,count:Kn(!1)};const a=t?e:{},r=t?a.count??!0:e,o=Kn(r);return Object.assign(n,a,{count:o})},As=(e,t,n)=>e||(typeof n=="string"?n:t),Ys=e=>typeof e=="boolean"?e?Gn({}):!1:Gn(e),Cs=e=>{const t={enterSubmit:!0,tabSubmit:!0,openMenu:"open",selectOnFocus:!1,rangeSeparator:" - ",escClose:!0};return typeof e=="object"?{...t,...e??{},enabled:!0}:{...t,enabled:e}},Rs=e=>({months:[],years:[],times:{hours:[],minutes:[],seconds:[]},...e??{}}),Ss=e=>({showSelect:!0,showCancel:!0,showNow:!1,showPreview:!0,...e??{}}),Ns=e=>{const t={input:!1};return typeof e=="object"?{...t,...e??{},enabled:!0}:{enabled:e,...t}},Is=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,mobileBreakpoint:600,setDateOnMenuClose:!1,...e??{}}),Es=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??{}}},Fs=e=>typeof e=="object"?{type:e?.type??"local",hideOnOffsetDates:e?.hideOnOffsetDates??!1}:{type:e,hideOnOffsetDates:!1},Bs=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}},Ls=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},nn=(e,t,n,a)=>new Map(e.map(r=>{const o=xn(r,t,a);return[Tn(o,n),o]})),Hs=(e,t)=>e.length?new Map(e.map(n=>{const a=xn(n.date,t);return[Tn(a,aa.DATE),n]})):null,Vs=e=>{var t;const n=Tr(e.isMonthPicker,e.isYearPicker);return{minDate:un(e.minDate,e.timezone,e.isSpecific),maxDate:un(e.maxDate,e.timezone,e.isSpecific),disabledDates:ja(e.disabledDates)?nn(e.disabledDates,e.timezone,n,e.isSpecific):e.disabledDates,allowedDates:ja(e.allowedDates)?nn(e.allowedDates,e.timezone,n,e.isSpecific):null,highlight:typeof e.highlight=="object"&&ja((t=e.highlight)==null?void 0:t.dates)?nn(e.highlight.dates,e.timezone,n):e.highlight,markers:Hs(e.markers,e.timezone)}},Ws=e=>typeof e=="boolean"?{enabled:e,dragSelect:!0,limit:null}:{enabled:!!e,limit:e.limit?+e.limit:null,dragSelect:e.dragSelect??!0},zs=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(o=>[o,!0]));return[t,r]}))}),Be=e=>{const t=()=>{const Y=e.enableSeconds?":ss":"",N=e.enableMinutes?":mm":"";return e.is24?`HH${N}${Y}`:`hh${N}${Y} aa`},n=()=>{var Y;return e.format?e.format:e.monthPicker?"MM/yyyy":e.timePicker?t():e.weekPicker?`${((Y=M.value)==null?void 0:Y.type)==="iso"?"II":"ww"}-RR`:e.yearPicker?"yyyy":e.quarterPicker?"QQQ/yyyy":e.enableTimePicker?`MM/dd/yyyy, ${t()}`:"MM/dd/yyyy"},a=Y=>Cr(Y,e.enableSeconds),r=()=>L.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,o=j(()=>$s(e.multiCalendars)),s=j(()=>r()),c=j(()=>Os(e.ariaLabels)),d=j(()=>Rs(e.filters)),P=j(()=>Ys(e.transitions)),v=j(()=>Ss(e.actionRow)),m=j(()=>As(e.previewFormat,e.format,n())),p=j(()=>Cs(e.textInput)),x=j(()=>Ns(e.inline)),A=j(()=>Is(e.config)),R=j(()=>Es(e.highlight)),M=j(()=>Fs(e.weekNumbers)),b=j(()=>Ls(e.timezone)),S=j(()=>Ws(e.multiDates)),C=j(()=>Vs({minDate:e.minDate,maxDate:e.maxDate,disabledDates:e.disabledDates,allowedDates:e.allowedDates,highlight:R.value,markers:e.markers,timezone:b.value,isSpecific:e.monthPicker||e.yearPicker||e.quarterPicker,isMonthPicker:e.monthPicker,isYearPicker:e.yearPicker})),L=j(()=>Bs(e.range)),U=j(()=>zs(e.ui));return{defaultedTransitions:P,defaultedMultiCalendars:o,defaultedStartTime:s,defaultedAriaLabels:c,defaultedFilters:d,defaultedActionRow:v,defaultedPreviewFormat:m,defaultedTextInput:p,defaultedInline:x,defaultedConfig:A,defaultedHighlight:R,defaultedWeekNumbers:M,defaultedRange:L,propDates:C,defaultedTz:b,defaultedMultiDates:S,defaultedUI:U,getDefaultPattern:n,getDefaultStartTime:r,handleEventPropagation:Y=>{A.value.allowStopPropagation&&Y.stopPropagation(),A.value.allowPreventDefault&&Y.preventDefault()}}},qs=(e,t,n)=>{const a=K(),{defaultedTextInput:r,defaultedRange:o,defaultedTz:s,defaultedMultiDates:c,getDefaultPattern:d}=Be(t),P=K(""),v=ha(t,"format"),m=ha(t,"formatLocale");yt(a,()=>{typeof t.onInternalModelChange=="function"&&e("internal-model-change",a.value,W(!0))},{deep:!0}),yt(o,(l,_)=>{l.enabled!==_.enabled&&(a.value=null)}),yt(v,()=>{J()});const p=l=>s.value.timezone&&s.value.convertModel?dt(l,s.value.timezone):l,x=l=>{if(s.value.timezone&&s.value.convertModel){const _=is(s.value.timezone,l);return ll(l,_)}return l},A=(l,_,oe=!1)=>Sr(l,t.format,t.formatLocale,r.value.rangeSeparator,t.modelAuto,_??d(),oe),R=l=>l?t.modelType?ee(l):{hours:St(l),minutes:Ht(l),seconds:t.enableSeconds?ra(l):0}:null,M=l=>t.modelType?ee(l):{month:Pe(l),year:he(l)},b=l=>Array.isArray(l)?c.value.enabled?l.map(_=>S(_,Ot(q(),_))):Oa(()=>[Ot(q(),l[0]),l[1]?Ot(q(),l[1]):Jt(o.value.partialRange)],o.value.enabled):Ot(q(),+l),S=(l,_)=>(typeof l=="string"||typeof l=="number")&&t.modelType?E(l):_,C=l=>Array.isArray(l)?[S(l[0],Lt(null,+l[0].hours,+l[0].minutes,l[0].seconds)),S(l[1],Lt(null,+l[1].hours,+l[1].minutes,l[1].seconds))]:S(l,Lt(null,l.hours,l.minutes,l.seconds)),L=l=>{const _=Ne(q(),{date:1});return Array.isArray(l)?c.value.enabled?l.map(oe=>S(oe,Ct(_,+oe.month,+oe.year))):Oa(()=>[S(l[0],Ct(_,+l[0].month,+l[0].year)),S(l[1],l[1]?Ct(_,+l[1].month,+l[1].year):Jt(o.value.partialRange))],o.value.enabled):S(l,Ct(_,+l.month,+l.year))},U=l=>{if(Array.isArray(l))return l.map(_=>E(_));throw new Error(Pn.dateArr("multi-dates"))},Y=l=>{if(Array.isArray(l)&&o.value.enabled){const _=l[0],oe=l[1];return[q(Array.isArray(_)?_[0]:null),Array.isArray(oe)&&oe.length?q(oe[0]):null]}return q(l[0])},N=l=>t.modelAuto?Array.isArray(l)?[E(l[0]),E(l[1])]:t.autoApply?[E(l)]:[E(l),null]:Array.isArray(l)?Oa(()=>l[1]?[E(l[0]),l[1]?E(l[1]):Jt(o.value.partialRange)]:[E(l[0])],o.value.enabled):E(l),re=()=>{Array.isArray(a.value)&&o.value.enabled&&a.value.length===1&&a.value.push(Jt(o.value.partialRange))},V=()=>{const l=a.value;return[ee(l[0]),l[1]?ee(l[1]):Jt(o.value.partialRange)]},I=()=>Array.isArray(a.value)?a.value[1]?V():ee(Xe(a.value[0])):[],se=()=>(a.value||[]).map(l=>ee(l)),ce=(l=!1)=>(l||re(),t.modelAuto?I():c.value.enabled?se():Array.isArray(a.value)?Oa(()=>V(),o.value.enabled):ee(Xe(a.value))),ye=l=>!l||Array.isArray(l)&&!l.length?null:t.timePicker?C(Xe(l)):t.monthPicker?L(Xe(l)):t.yearPicker?b(Xe(l)):c.value.enabled?U(Xe(l)):t.weekPicker?Y(Xe(l)):N(Xe(l)),y=l=>{const _=ye(l);cn(Xe(_))?(a.value=Xe(_),J()):(a.value=null,P.value="")},D=()=>{const l=_=>$t(_,r.value.format);return`${l(a.value[0])} ${r.value.rangeSeparator} ${a.value[1]?l(a.value[1]):""}`},h=()=>n.value&&a.value?Array.isArray(a.value)?D():$t(a.value,r.value.format):A(a.value),H=()=>a.value?c.value.enabled?a.value.map(l=>A(l)).join("; "):r.value.enabled&&typeof r.value.format=="string"?h():A(a.value):"",J=()=>{!t.format||typeof t.format=="string"||r.value.enabled&&typeof r.value.format=="string"?P.value=H():P.value=t.format(a.value)},E=l=>{if(t.utc){const _=new Date(l);return t.utc==="preserve"?new Date(_.getTime()+_.getTimezoneOffset()*6e4):_}return t.modelType?ds.includes(t.modelType)?p(new Date(l)):t.modelType==="format"&&(typeof t.format=="string"||!t.format)?p(sn(l,d(),new Date,{locale:m.value})):p(sn(l,t.modelType,new Date,{locale:m.value})):p(new Date(l))},ee=l=>l?t.utc?_s(l,t.utc==="preserve",t.enableSeconds):t.modelType?t.modelType==="timestamp"?+x(l):t.modelType==="iso"?x(l).toISOString():t.modelType==="format"&&(typeof t.format=="string"||!t.format)?A(x(l)):A(x(l),t.modelType,!0):x(l):"",O=(l,_=!1,oe=!1)=>{if(oe)return l;if(e("update:model-value",l),s.value.emitTimezone&&_){const Ye=Array.isArray(l)?l.map($=>dt(Xe($),s.value.emitTimezone)):dt(Xe(l),s.value.emitTimezone);e("update:model-timezone-value",Ye)}},de=l=>Array.isArray(a.value)?c.value.enabled?a.value.map(_=>l(_)):[l(a.value[0]),a.value[1]?l(a.value[1]):Jt(o.value.partialRange)]:l(Xe(a.value)),f=()=>{if(Array.isArray(a.value)){const l=Yt(a.value[0],t.weekStart),_=a.value[1]?Yt(a.value[1],t.weekStart):[];return[l.map(oe=>q(oe)),_.map(oe=>q(oe))]}return Yt(a.value,t.weekStart).map(l=>q(l))},k=(l,_)=>O(Xe(de(l)),!1,_),F=l=>{const _=f();return l?_:e("update:model-value",f())},W=(l=!1)=>(l||J(),t.monthPicker?k(M,l):t.timePicker?k(R,l):t.yearPicker?k(he,l):t.weekPicker?F(l):O(ce(l),!0,l));return{inputValue:P,internalModelValue:a,checkBeforeEmit:()=>a.value?o.value.enabled?o.value.partialRange?a.value.length>=1:a.value.length===2:!!a.value:!1,parseExternalModelValue:y,formatInputValue:J,emitModelValue:W}},Us=(e,t)=>{const{defaultedFilters:n,propDates:a}=Be(e),{validateMonthYearInRange:r}=Wt(e),o=(v,m)=>{let p=v;return n.value.months.includes(Pe(p))?(p=m?bt(v,1):oa(v,1),o(p,m)):p},s=(v,m)=>{let p=v;return n.value.years.includes(he(p))?(p=m?mn(v,1):_r(v,1),s(p,m)):p},c=(v,m=!1)=>{const p=Ne(q(),{month:e.month,year:e.year});let x=v?bt(p,1):oa(p,1);e.disableYearSelect&&(x=Ot(x,e.year));let A=Pe(x),R=he(x);n.value.months.includes(A)&&(x=o(x,v),A=Pe(x),R=he(x)),n.value.years.includes(R)&&(x=s(x,v),R=he(x)),r(A,R,v,e.preventMinMaxNavigation)&&d(A,R,m)},d=(v,m,p)=>{t("update-month-year",{month:v,year:m,fromNav:p})},P=j(()=>v=>Rr(Ne(q(),{month:e.month,year:e.year}),a.value.maxDate,a.value.minDate,e.preventMinMaxNavigation,v));return{handleMonthYearChange:c,isDisabled:P,updateMonthYear:d}},Ia={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,String],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},alwaysClearable:{type:Boolean,default:!1},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:()=>({})}},kt={...Ia,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},isMobile:{type:Boolean,default:void 0}},Qs=["title"],js=["disabled"],Gs=tt({compatConfig:{MODE:3},__name:"ActionRow",props:{menuMount:{type:Boolean,default:!1},calendarWidth:{type:Number,default:0},...kt},emits:["close-picker","select-date","select-now","invalid-select"],setup(e,{emit:t}){const n=t,a=e,{defaultedActionRow:r,defaultedPreviewFormat:o,defaultedMultiCalendars:s,defaultedTextInput:c,defaultedInline:d,defaultedRange:P,defaultedMultiDates:v}=Be(a),{isTimeValid:m,isMonthValid:p}=Wt(a),{buildMatrix:x}=Vt(),A=K(null),R=K(null),M=K(!1),b=K({}),S=K(null),C=K(null);at(()=>{a.arrowNavigation&&x([je(A),je(R)],"actionRow"),L(),window.addEventListener("resize",L)}),ia(()=>{window.removeEventListener("resize",L)});const L=()=>{M.value=!1,setTimeout(()=>{var y,D;const h=(y=S.value)==null?void 0:y.getBoundingClientRect(),H=(D=C.value)==null?void 0:D.getBoundingClientRect();h&&H&&(b.value.maxWidth=`${H.width-h.width-20}px`),M.value=!0},0)},U=j(()=>P.value.enabled&&!P.value.partialRange&&a.internalModelValue?a.internalModelValue.length===2:!0),Y=j(()=>!m.value(a.internalModelValue)||!p.value(a.internalModelValue)||!U.value),N=()=>{const y=o.value;return a.timePicker||a.monthPicker,y(Xe(a.internalModelValue))},re=()=>{const y=a.internalModelValue;return s.value.count>0?`${V(y[0])} - ${V(y[1])}`:[V(y[0]),V(y[1])]},V=y=>Sr(y,o.value,a.formatLocale,c.value.rangeSeparator,a.modelAuto,o.value),I=j(()=>!a.internalModelValue||!a.menuMount?"":typeof o.value=="string"?Array.isArray(a.internalModelValue)?a.internalModelValue.length===2&&a.internalModelValue[1]?re():v.value.enabled?a.internalModelValue.map(y=>`${V(y)}`):a.modelAuto?`${V(a.internalModelValue[0])}`:`${V(a.internalModelValue[0])} -`:V(a.internalModelValue):N()),se=()=>v.value.enabled?"; ":" - ",ce=j(()=>Array.isArray(I.value)?I.value.join(se()):I.value),ye=()=>{m.value(a.internalModelValue)&&p.value(a.internalModelValue)&&U.value?n("select-date"):n("invalid-select")};return(y,D)=>(T(),z("div",{ref_key:"actionRowRef",ref:C,class:"dp__action_row"},[y.$slots["action-row"]?ie(y.$slots,"action-row",Ze(Je({key:0},{internalModelValue:y.internalModelValue,disabled:Y.value,selectDate:()=>y.$emit("select-date"),closePicker:()=>y.$emit("close-picker")}))):(T(),z(ke,{key:1},[i(r).showPreview?(T(),z("div",{key:0,class:"dp__selection_preview",title:ce.value,style:pt(b.value)},[y.$slots["action-preview"]&&M.value?ie(y.$slots,"action-preview",{key:0,value:y.internalModelValue}):G("",!0),!y.$slots["action-preview"]&&M.value?(T(),z(ke,{key:1},[Rt(lt(ce.value),1)],64)):G("",!0)],12,Qs)):G("",!0),ge("div",{ref_key:"actionBtnContainer",ref:S,class:"dp__action_buttons","data-dp-element":"action-row"},[y.$slots["action-buttons"]?ie(y.$slots,"action-buttons",{key:0,value:y.internalModelValue}):G("",!0),y.$slots["action-buttons"]?G("",!0):(T(),z(ke,{key:1},[!i(d).enabled&&i(r).showCancel?(T(),z("button",{key:0,ref_key:"cancelButtonRef",ref:A,type:"button",class:"dp__action_button dp__action_cancel",onClick:D[0]||(D[0]=h=>y.$emit("close-picker")),onKeydown:D[1]||(D[1]=h=>i(ut)(h,()=>y.$emit("close-picker")))},lt(y.cancelText),545)):G("",!0),i(r).showNow?(T(),z("button",{key:1,type:"button",class:"dp__action_button dp__action_cancel",onClick:D[2]||(D[2]=h=>y.$emit("select-now")),onKeydown:D[3]||(D[3]=h=>i(ut)(h,()=>y.$emit("select-now")))},lt(y.nowButtonLabel),33)):G("",!0),i(r).showSelect?(T(),z("button",{key:2,ref_key:"selectButtonRef",ref:R,type:"button",class:"dp__action_button dp__action_select",disabled:Y.value,"data-test-id":"select-button",onKeydown:D[4]||(D[4]=h=>i(ut)(h,()=>ye())),onClick:ye},lt(y.selectText),41,js)):G("",!0)],64))],512)],64))],512))}}),Ks=["role","aria-label","tabindex"],Xs={class:"dp__selection_grid_header"},Zs=["aria-selected","aria-disabled","data-test-id","onClick","onKeydown","onMouseover"],Js=["aria-label"],xa=tt({__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:o}=Vt(),s=n,c=e,{defaultedAriaLabels:d,defaultedTextInput:P,defaultedConfig:v,handleEventPropagation:m}=Be(c),{hideNavigationButtons:p}=Ba(),x=K(!1),A=K(null),R=K(null),M=K([]),b=K(),S=K(null),C=K(0),L=K(null);Jr(()=>{A.value=null}),at(()=>{mt().then(()=>ce()),c.noOverlayFocus||Y(),U(!0)}),ia(()=>U(!1));const U=f=>{var k;c.arrowNavigation&&((k=c.headerRefs)!=null&&k.length?o(f):a(f))},Y=()=>{var f;const k=je(R);k&&(P.value.enabled||(A.value?(f=A.value)==null||f.focus({preventScroll:!0}):k.focus({preventScroll:!0})),x.value=k.clientHeight({dp__overlay:!0,"dp--overlay-absolute":!c.useRelative,"dp--overlay-relative":c.useRelative})),re=j(()=>c.useRelative?{height:`${c.height}px`,width:"var(--dp-menu-min-width)"}:void 0),V=j(()=>({dp__overlay_col:!0})),I=j(()=>({dp__btn:!0,dp__button:!0,dp__overlay_action:!0,dp__over_action_scroll:x.value,dp__button_bottom:c.isLast})),se=j(()=>{var f,k;return{dp__overlay_container:!0,dp__container_flex:((f=c.items)==null?void 0:f.length)<=6,dp__container_block:((k=c.items)==null?void 0:k.length)>6}});yt(()=>c.items,()=>ce(!1),{deep:!0});const ce=(f=!0)=>{mt().then(()=>{const k=je(A),F=je(R),W=je(S),l=je(L),_=W?W.getBoundingClientRect().height:0;F&&(F.getBoundingClientRect().height?C.value=F.getBoundingClientRect().height-_:C.value=v.value.modeHeight-_),k&&l&&f&&(l.scrollTop=k.offsetTop-l.offsetTop-(C.value/2-k.getBoundingClientRect().height)-_)})},ye=f=>{f.disabled||s("selected",f.value)},y=()=>{s("toggle"),s("reset-flow")},D=f=>{c.escClose&&(y(),m(f))},h=(f,k,F,W)=>{f&&((k.active||k.value===c.focusValue)&&(A.value=f),c.arrowNavigation&&(Array.isArray(M.value[F])?M.value[F][W]=f:M.value[F]=[f],H()))},H=()=>{var f,k;const F=(f=c.headerRefs)!=null&&f.length?[c.headerRefs].concat(M.value):M.value.concat([c.skipButtonRef?[]:[S.value]]);r(Xe(F),(k=c.headerRefs)!=null&&k.length?"monthPicker":"selectionGrid")},J=f=>{c.arrowNavigation||Bt(f,v.value,!0)},E=f=>{b.value=f,s("hover-value",f)},ee=()=>{if(y(),!c.isLast){const f=dn(c.menuWrapRef??null,"action-row");if(f){const k=Mr(f);k?.focus()}}},O=f=>{switch(f.key){case Ee.esc:return D(f);case Ee.arrowLeft:return J(f);case Ee.arrowRight:return J(f);case Ee.arrowUp:return J(f);case Ee.arrowDown:return J(f);default:return}},de=f=>{if(f.key===Ee.enter)return y();if(f.key===Ee.tab)return ee()};return t({focusGrid:Y}),(f,k)=>{var F;return T(),z("div",{ref_key:"gridWrapRef",ref:R,class:xe(N.value),style:pt(re.value),role:f.useRelative?void 0:"dialog","aria-label":f.overlayLabel,tabindex:f.useRelative?void 0:"0",onKeydown:O,onClick:k[0]||(k[0]=ga(()=>{},["prevent"]))},[ge("div",{ref_key:"containerRef",ref:L,class:xe(se.value),style:pt({"--dp-overlay-height":`${C.value}px`}),role:"grid"},[ge("div",Xs,[ie(f.$slots,"header")]),f.$slots.overlay?ie(f.$slots,"overlay",{key:0}):(T(!0),z(ke,{key:1},Fe(f.items,(W,l)=>(T(),z("div",{key:l,class:xe(["dp__overlay_row",{dp__flex_row:f.items.length>=3}]),role:"row"},[(T(!0),z(ke,null,Fe(W,(_,oe)=>(T(),z("div",{key:_.value,ref_for:!0,ref:Ye=>h(Ye,_,l,oe),role:"gridcell",class:xe(V.value),"aria-selected":_.active||void 0,"aria-disabled":_.disabled||void 0,tabindex:"0","data-test-id":_.text,onClick:ga(Ye=>ye(_),["prevent"]),onKeydown:Ye=>i(ut)(Ye,()=>ye(_),!0),onMouseover:Ye=>E(_.value)},[ge("div",{class:xe(_.className)},[f.$slots.item?ie(f.$slots,"item",{key:0,item:_}):G("",!0),f.$slots.item?G("",!0):(T(),z(ke,{key:1},[Rt(lt(_.text),1)],64))],2)],42,Zs))),128))],2))),128))],6),f.$slots["button-icon"]?Aa((T(),z("button",{key:0,ref_key:"toggleButton",ref:S,type:"button","aria-label":(F=i(d))==null?void 0:F.toggleOverlay,class:xe(I.value),tabindex:"0",onClick:y,onKeydown:de},[ie(f.$slots,"button-icon")],42,Js)),[[Ya,!i(p)(f.hideNavigation,f.type)]]):G("",!0)],46,Ks)}}}),eu=["data-dp-mobile"],Ea=tt({__name:"InstanceWrap",props:{multiCalendars:{},stretch:{type:Boolean},collapse:{type:Boolean},isMobile:{type:Boolean}},setup(e){const t=e,n=j(()=>t.multiCalendars>0?[...Array(t.multiCalendars).keys()]:[0]),a=j(()=>({dp__instance_calendar:t.multiCalendars>0}));return(r,o)=>(T(),z("div",{class:xe({dp__menu_inner:!r.stretch,"dp--menu--inner-stretched":r.stretch,dp__flex_display:r.multiCalendars>0,"dp--flex-display-collapsed":r.collapse}),"data-dp-mobile":r.isMobile},[(T(!0),z(ke,null,Fe(n.value,(s,c)=>(T(),z("div",{key:s,class:xe(a.value)},[ie(r.$slots,"default",{instance:s,index:c})],2))),128))],10,eu))}}),tu=["data-dp-element","aria-label","aria-disabled"],ya=tt({compatConfig:{MODE:3},__name:"ArrowBtn",props:{ariaLabel:{},elName:{},disabled:{type:Boolean}},emits:["activate","set-ref"],setup(e,{emit:t}){const n=t,a=K(null);return at(()=>n("set-ref",a)),(r,o)=>(T(),z("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:o[0]||(o[0]=s=>r.$emit("activate")),onKeydown:o[1]||(o[1]=s=>i(ut)(s,()=>r.$emit("activate"),!0))},[ge("span",{class:xe(["dp__inner_nav",{dp__inner_nav_disabled:r.disabled}])},[ie(r.$slots,"default")],2)],40,tu))}}),au=["aria-label","data-test-id"],Er=tt({__name:"YearModePicker",props:{...kt,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:o}=Ba(),{defaultedConfig:s,defaultedMultiCalendars:c,defaultedAriaLabels:d,defaultedTransitions:P,defaultedUI:v}=Be(a),{showTransition:m,transitionName:p}=Ma(P),x=K(!1),A=(b=!1,S)=>{x.value=!x.value,n("toggle-year-picker",{flow:b,show:S})},R=b=>{x.value=!1,n("year-select",b)},M=(b=!1)=>{n("handle-year",b)};return(b,S)=>{var C,L,U,Y,N;return T(),z(ke,null,[ge("div",{class:xe(["dp--year-mode-picker",{"dp--hidden-el":x.value}])},[i(o)(i(c),e.instance)?(T(),Oe(ya,{key:0,ref:"mpPrevIconRef","aria-label":(C=i(d))==null?void 0:C.prevYear,disabled:e.isDisabled(!1),class:xe((L=i(v))==null?void 0:L.navBtnPrev),onActivate:S[0]||(S[0]=re=>M(!1))},{default:De(()=>[b.$slots["arrow-left"]?ie(b.$slots,"arrow-left",{key:0}):G("",!0),b.$slots["arrow-left"]?G("",!0):(T(),Oe(i(wn),{key:1}))]),_:3},8,["aria-label","disabled","class"])):G("",!0),ge("button",{ref:"mpYearButtonRef",class:"dp__btn dp--year-select",type:"button","aria-label":`${e.year}-${(U=i(d))==null?void 0:U.openYearsOverlay}`,"data-test-id":`year-mode-btn-${e.instance}`,onClick:S[1]||(S[1]=()=>A(!1)),onKeydown:S[2]||(S[2]=el(()=>A(!1),["enter"]))},[b.$slots.year?ie(b.$slots,"year",{key:0,year:e.year}):G("",!0),b.$slots.year?G("",!0):(T(),z(ke,{key:1},[Rt(lt(e.year),1)],64))],40,au),i(r)(i(c),e.instance)?(T(),Oe(ya,{key:1,ref:"mpNextIconRef","aria-label":(Y=i(d))==null?void 0:Y.nextYear,disabled:e.isDisabled(!0),class:xe((N=i(v))==null?void 0:N.navBtnNext),onActivate:S[3]||(S[3]=re=>M(!0))},{default:De(()=>[b.$slots["arrow-right"]?ie(b.$slots,"arrow-right",{key:0}):G("",!0),b.$slots["arrow-right"]?G("",!0):(T(),Oe(i(bn),{key:1}))]),_:3},8,["aria-label","disabled","class"])):G("",!0)],2),vt(da,{name:i(p)(e.showYearPicker),css:i(m)},{default:De(()=>{var re,V;return[e.showYearPicker?(T(),Oe(xa,{key:0,items:e.items,"text-input":b.textInput,"esc-close":b.escClose,config:b.config,"is-last":b.autoApply&&!i(s).keepActionRow,"hide-navigation":b.hideNavigation,"aria-labels":b.ariaLabels,"overlay-label":(V=(re=i(d))==null?void 0:re.yearPicker)==null?void 0:V.call(re,!0),type:"year",onToggle:A,onSelected:S[4]||(S[4]=I=>R(I))},ot({"button-icon":De(()=>[b.$slots["calendar-icon"]?ie(b.$slots,"calendar-icon",{key:0}):G("",!0),b.$slots["calendar-icon"]?G("",!0):(T(),Oe(i(ca),{key:1}))]),_:2},[b.$slots["year-overlay-value"]?{name:"item",fn:De(({item:I})=>[ie(b.$slots,"year-overlay-value",{text:I.text,value:I.value})]),key:"0"}:void 0]),1032,["items","text-input","esc-close","config","is-last","hide-navigation","aria-labels","overlay-label"])):G("",!0)]}),_:3},8,["name","css"])],64)}}}),$n=(e,t,n)=>{if(t.value&&Array.isArray(t.value))if(t.value.some(a=>Te(e,a))){const a=t.value.filter(r=>!Te(r,e));t.value=a.length?a:null}else(n&&+n>t.value.length||!n)&&t.value.push(e);else t.value=[e]},An=(e,t,n)=>{let a=e.value?e.value.slice():[];return a.length===2&&a[1]!==null&&(a=[]),a.length?(He(t,a[0])?a.unshift(t):a[1]=t,n("range-end",t)):(a=[t],n("range-start",t)),a},Fa=(e,t,n,a)=>{e&&(e[0]&&e[1]&&n&&t("auto-apply"),e[0]&&!e[1]&&a&&n&&t("auto-apply"))},Fr=e=>{Array.isArray(e.value)&&e.value.length<=2&&e.range?e.modelValue.value=e.value.map(t=>dt(q(t),e.timezone)):Array.isArray(e.value)||(e.modelValue.value=dt(q(e.value),e.timezone))},Br=(e,t,n,a)=>Array.isArray(t.value)&&(t.value.length===2||t.value.length===1&&a.value.partialRange)?a.value.fixedStart&&(qe(e,t.value[0])||Te(e,t.value[0]))?[t.value[0],e]:a.value.fixedEnd&&(He(e,t.value[1])||Te(e,t.value[1]))?[e,t.value[1]]:(n("invalid-fixed-range",e),t.value):[],Lr=({multiCalendars:e,range:t,highlight:n,propDates:a,calendars:r,modelValue:o,props:s,filters:c,year:d,month:P,emit:v})=>{const m=j(()=>Mn(s.yearRange,s.locale,s.reverseYears)),p=K([!1]),x=j(()=>(I,se)=>{const ce=Ne(wt(new Date),{month:P.value(I),year:d.value(I)}),ye=se?sr(ce):wa(ce);return Rr(ye,a.value.maxDate,a.value.minDate,s.preventMinMaxNavigation,se)}),A=()=>Array.isArray(o.value)&&e.value.solo&&o.value[1],R=()=>{for(let I=0;I{if(!I)return R();const se=Ne(q(),r.value[I]);return r.value[0].year=he(_r(se,e.value.count-1)),R()},b=(I,se)=>{const ce=dl(se,I);return t.value.showLastInRange&&ce>1?se:I},S=I=>s.focusStartDate||e.value.solo?I[0]:I[1]?b(I[0],I[1]):I[0],C=()=>{if(o.value){const I=Array.isArray(o.value)?S(o.value):o.value;r.value[0]={month:Pe(I),year:he(I)}}},L=()=>{C(),e.value.count&&R()};yt(o,(I,se)=>{s.isTextInputDate&&JSON.stringify(I??{})!==JSON.stringify(se??{})&&L()}),at(()=>{L()});const U=(I,se)=>{r.value[se].year=I,v("update-month-year",{instance:se,year:I,month:r.value[se].month}),e.value.count&&!e.value.solo&&M(se)},Y=j(()=>I=>sa(m.value,se=>{var ce;const ye=d.value(I)===se.value,y=ba(se.value,ua(a.value.minDate),ua(a.value.maxDate))||((ce=c.value.years)==null?void 0:ce.includes(d.value(I))),D=On(n.value,se.value);return{active:ye,disabled:y,highlighted:D}})),N=(I,se)=>{U(I,se),V(se)},re=(I,se=!1)=>{if(!x.value(I,se)){const ce=se?d.value(I)+1:d.value(I)-1;U(ce,I)}},V=(I,se=!1,ce)=>{se||v("reset-flow"),ce!==void 0?p.value[I]=ce:p.value[I]=!p.value[I],p.value[I]?v("overlay-toggle",{open:!0,overlay:rt.year}):(v("overlay-closed"),v("overlay-toggle",{open:!1,overlay:rt.year}))};return{isDisabled:x,groupedYears:Y,showYearPicker:p,selectYear:U,toggleYearPicker:V,handleYearSelect:N,handleYear:re}},nu=(e,t)=>{const{defaultedMultiCalendars:n,defaultedAriaLabels:a,defaultedTransitions:r,defaultedConfig:o,defaultedRange:s,defaultedHighlight:c,propDates:d,defaultedTz:P,defaultedFilters:v,defaultedMultiDates:m}=Be(e),p=()=>{e.isTextInputDate&&L(he(q(e.startDate)),0)},{modelValue:x,year:A,month:R,calendars:M}=Pa(e,t,p),b=j(()=>Dr(e.formatLocale,e.locale,e.monthNameFormat)),S=K(null),{checkMinMaxRange:C}=Wt(e),{selectYear:L,groupedYears:U,showYearPicker:Y,toggleYearPicker:N,handleYearSelect:re,handleYear:V,isDisabled:I}=Lr({modelValue:x,multiCalendars:n,range:s,highlight:c,calendars:M,year:A,propDates:d,month:R,filters:v,props:e,emit:t});at(()=>{e.startDate&&(x.value&&e.focusStartDate||!x.value)&&L(he(q(e.startDate)),0)});const se=k=>k?{month:Pe(k),year:he(k)}:{month:null,year:null},ce=()=>x.value?Array.isArray(x.value)?x.value.map(k=>se(k)):se(x.value):se(),ye=(k,F)=>{const W=M.value[k],l=ce();return Array.isArray(l)?l.some(_=>_.year===W?.year&&_.month===F):W?.year===l.year&&F===l.month},y=(k,F,W)=>{var l,_;const oe=ce();return Array.isArray(oe)?A.value(F)===((l=oe[W])==null?void 0:l.year)&&k===((_=oe[W])==null?void 0:_.month):!1},D=(k,F)=>{if(s.value.enabled){const W=ce();if(Array.isArray(x.value)&&Array.isArray(W)){const l=y(k,F,0)||y(k,F,1),_=Ct(wt(q()),k,A.value(F));return _a(x.value,S.value,_)&&!l}return!1}return!1},h=j(()=>k=>sa(b.value,F=>{var W;const l=ye(k,F.value),_=ba(F.value,$r(A.value(k),d.value.minDate),Ar(A.value(k),d.value.maxDate))||Ps(d.value.disabledDates,A.value(k),F.value)||((W=v.value.months)==null?void 0:W.includes(F.value))||!Ts(d.value.allowedDates,A.value(k),F.value),oe=D(F.value,k),Ye=Nr(c.value,F.value,A.value(k));return{active:l,disabled:_,isBetween:oe,highlighted:Ye}})),H=(k,F)=>Ct(wt(q()),k,A.value(F)),J=(k,F)=>{const W=x.value?x.value:wt(new Date);x.value=Ct(W,k,A.value(F)),t("auto-apply"),t("update-flow-step")},E=(k,F)=>{const W=H(k,F);s.value.fixedEnd||s.value.fixedStart?x.value=Br(W,x,t,s):x.value?C(W,x.value)&&(x.value=An(x,H(k,F),t)):x.value=[H(k,F)],mt().then(()=>{Fa(x.value,t,e.autoApply,e.modelAuto)})},ee=(k,F)=>{$n(H(k,F),x,m.value.limit),t("auto-apply",!0)},O=(k,F)=>(M.value[F].month=k,f(F,M.value[F].year,k),m.value.enabled?ee(k,F):s.value.enabled?E(k,F):J(k,F)),de=(k,F)=>{L(k,F),f(F,k,null)},f=(k,F,W)=>{let l=W;if(!l&&l!==0){const _=ce();l=Array.isArray(_)?_[k].month:_.month}t("update-month-year",{instance:k,year:F,month:l})};return{groupedMonths:h,groupedYears:U,year:A,isDisabled:I,defaultedMultiCalendars:n,defaultedAriaLabels:a,defaultedTransitions:r,defaultedConfig:o,showYearPicker:Y,modelValue:x,presetDate:(k,F)=>{Fr({value:k,modelValue:x,range:s.value.enabled,timezone:F?void 0:P.value.timezone}),t("auto-apply")},setHoverDate:(k,F)=>{S.value=H(k,F)},selectMonth:O,selectYear:de,toggleYearPicker:N,handleYearSelect:re,handleYear:V,getModelMonthYear:ce}},ru=tt({compatConfig:{MODE:3},__name:"MonthPicker",props:{...kt},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=Kt(),o=ct(r,"yearMode"),s=e;at(()=>{s.shadow||a("mount",null)});const{groupedMonths:c,groupedYears:d,year:P,isDisabled:v,defaultedMultiCalendars:m,defaultedConfig:p,showYearPicker:x,modelValue:A,presetDate:R,setHoverDate:M,selectMonth:b,selectYear:S,toggleYearPicker:C,handleYearSelect:L,handleYear:U,getModelMonthYear:Y}=nu(s,a);return t({getSidebarProps:()=>({modelValue:A,year:P,getModelMonthYear:Y,selectMonth:b,selectYear:S,handleYear:U}),presetDate:R,toggleYearPicker:N=>C(0,N)}),(N,re)=>(T(),Oe(Ea,{"multi-calendars":i(m).count,collapse:N.collapse,stretch:"","is-mobile":N.isMobile},{default:De(({instance:V})=>[N.$slots["top-extra"]?ie(N.$slots,"top-extra",{key:0,value:N.internalModelValue}):G("",!0),N.$slots["month-year"]?ie(N.$slots,"month-year",Ze(Je({key:1},{year:i(P),months:i(c)(V),years:i(d)(V),selectMonth:i(b),selectYear:i(S),instance:V}))):(T(),Oe(xa,{key:2,items:i(c)(V),"arrow-navigation":N.arrowNavigation,"is-last":N.autoApply&&!i(p).keepActionRow,"esc-close":N.escClose,height:i(p).modeHeight,config:N.config,"no-overlay-focus":!!(N.noOverlayFocus||N.textInput),"use-relative":"",type:"month",onSelected:I=>i(b)(I,V),onHoverValue:I=>i(M)(I,V)},ot({header:De(()=>[vt(Er,Je(N.$props,{items:i(d)(V),instance:V,"show-year-picker":i(x)[V],year:i(P)(V),"is-disabled":I=>i(v)(V,I),onHandleYear:I=>i(U)(V,I),onYearSelect:I=>i(L)(I,V),onToggleYearPicker:I=>i(C)(V,I?.flow,I?.show)}),ot({_:2},[Fe(i(o),(I,se)=>({name:I,fn:De(ce=>[ie(N.$slots,I,Ze(it(ce)))])}))]),1040,["items","instance","show-year-picker","year","is-disabled","onHandleYear","onYearSelect","onToggleYearPicker"])]),_:2},[N.$slots["month-overlay-value"]?{name:"item",fn:De(({item:I})=>[ie(N.$slots,"month-overlay-value",{text:I.text,value:I.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","is-mobile"]))}}),lu=(e,t)=>{const n=()=>{e.isTextInputDate&&(v.value=he(q(e.startDate)))},{modelValue:a}=Pa(e,t,n),r=K(null),{defaultedHighlight:o,defaultedMultiDates:s,defaultedFilters:c,defaultedRange:d,propDates:P}=Be(e),v=K();at(()=>{e.startDate&&(a.value&&e.focusStartDate||!a.value)&&(v.value=he(q(e.startDate)))});const m=b=>Array.isArray(a.value)?a.value.some(S=>he(S)===b):a.value?he(a.value)===b:!1,p=b=>d.value.enabled&&Array.isArray(a.value)?_a(a.value,r.value,M(b)):!1,x=b=>P.value.allowedDates instanceof Map?P.value.allowedDates.size?P.value.allowedDates.has(`${b}`):!1:!0,A=b=>P.value.disabledDates instanceof Map?P.value.disabledDates.size?P.value.disabledDates.has(`${b}`):!1:!0,R=j(()=>sa(Mn(e.yearRange,e.locale,e.reverseYears),b=>{const S=m(b.value),C=ba(b.value,ua(P.value.minDate),ua(P.value.maxDate))||c.value.years.includes(b.value)||!x(b.value)||A(b.value),L=p(b.value)&&!S,U=On(o.value,b.value);return{active:S,disabled:C,isBetween:L,highlighted:U}})),M=b=>Ot(wt(wa(new Date)),b);return{groupedYears:R,modelValue:a,focusYear:v,setHoverValue:b=>{r.value=Ot(wt(new Date),b)},selectYear:b=>{var S;if(t("update-month-year",{instance:0,year:b}),s.value.enabled)return a.value?Array.isArray(a.value)&&(((S=a.value)==null?void 0:S.map(C=>he(C))).includes(b)?a.value=a.value.filter(C=>he(C)!==b):a.value.push(Ot(et(q()),b))):a.value=[Ot(et(wa(q())),b)],t("auto-apply",!0);d.value.enabled?(a.value=An(a,M(b),t),mt().then(()=>{Fa(a.value,t,e.autoApply,e.modelAuto)})):(a.value=M(b),t("auto-apply"))}}},ou=tt({compatConfig:{MODE:3},__name:"YearPicker",props:{...kt},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:o,modelValue:s,focusYear:c,selectYear:d,setHoverValue:P}=lu(r,a),{defaultedConfig:v}=Be(r);return t({getSidebarProps:()=>({modelValue:s,selectYear:d})}),(m,p)=>(T(),z("div",null,[m.$slots["top-extra"]?ie(m.$slots,"top-extra",{key:0,value:m.internalModelValue}):G("",!0),m.$slots["month-year"]?ie(m.$slots,"month-year",Ze(Je({key:1},{years:i(o),selectYear:i(d)}))):(T(),Oe(xa,{key:2,items:i(o),"is-last":m.autoApply&&!i(v).keepActionRow,height:i(v).modeHeight,config:m.config,"no-overlay-focus":!!(m.noOverlayFocus||m.textInput),"focus-value":i(c),type:"year","use-relative":"",onSelected:i(d),onHoverValue:i(P)},ot({_:2},[m.$slots["year-overlay-value"]?{name:"item",fn:De(({item:x})=>[ie(m.$slots,"year-overlay-value",{text:x.text,value:x.value})]),key:"0"}:void 0]),1032,["items","is-last","height","config","no-overlay-focus","focus-value","onSelected","onHoverValue"]))]))}}),su={key:0,class:"dp__time_input"},uu=["data-compact","data-collapsed"],iu=["data-test-id","aria-label","onKeydown","onClick","onMousedown"],du=["aria-label","disabled","data-test-id","onKeydown","onClick"],cu=["data-test-id","aria-label","onKeydown","onClick","onMousedown"],vu={key:0},mu=["aria-label","data-compact"],fu=tt({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},...kt},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:o,setTimePickerBackRef:s}=Vt(),{defaultedAriaLabels:c,defaultedTransitions:d,defaultedFilters:P,defaultedConfig:v,defaultedRange:m,defaultedMultiCalendars:p}=Be(r),{transitionName:x,showTransition:A}=Ma(d),R=ka({hours:!1,minutes:!1,seconds:!1}),M=K("AM"),b=K(null),S=K([]),C=K(),L=K(!1);at(()=>{a("mounted")});const U=u=>Ne(new Date,{hours:u.hours,minutes:u.minutes,seconds:r.enableSeconds?u.seconds:0,milliseconds:0}),Y=j(()=>u=>E(u,r[u])||re(u,r[u])),N=j(()=>({hours:r.hours,minutes:r.minutes,seconds:r.seconds})),re=(u,Z)=>m.value.enabled&&!m.value.disableTimeRangeValidation?!r.validateTime(u,Z):!1,V=(u,Z)=>{if(m.value.enabled&&!m.value.disableTimeRangeValidation){const ae=Z?+r[`${u}Increment`]:-+r[`${u}Increment`],ne=r[u]+ae;return!r.validateTime(u,ne)}return!1},I=j(()=>u=>!k(+r[u]+ +r[`${u}Increment`],u)||V(u,!0)),se=j(()=>u=>!k(+r[u]-+r[`${u}Increment`],u)||V(u,!1)),ce=(u,Z)=>tr(Ne(q(),u),Z),ye=(u,Z)=>os(Ne(q(),u),Z),y=j(()=>({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})),D=j(()=>r.timePickerInline&&m.value.enabled&&!p.value.count),h=j(()=>{const u=[{type:"hours"}];return r.enableMinutes&&u.push({type:"",separator:!0},{type:"minutes"}),r.enableSeconds&&u.push({type:"",separator:!0},{type:"seconds"}),u}),H=j(()=>h.value.filter(u=>!u.separator)),J=j(()=>u=>{if(u==="hours"){const Z=Ye(+r.hours);return{text:Z<10?`0${Z}`:`${Z}`,value:Z}}return{text:r[u]<10?`0${r[u]}`:`${r[u]}`,value:r[u]}}),E=(u,Z)=>{var ae;if(!r.disabledTimesConfig)return!1;const ne=r.disabledTimesConfig(r.order,u==="hours"?Z:void 0);return ne[u]?!!((ae=ne[u])!=null&&ae.includes(Z)):!0},ee=(u,Z)=>Z!=="hours"||M.value==="AM"?u:u+12,O=u=>{const Z=r.is24?24:12,ae=u==="hours"?Z:60,ne=+r[`${u}GridIncrement`],Me=u==="hours"&&!r.is24?ne:0,be=[];for(let Ce=Me;Ce({active:!1,disabled:P.value.times[u].includes(Ce.value)||!k(Ce.value,u)||E(u,Ce.value)||re(u,Ce.value)}))},de=u=>u>=0?u:59,f=u=>u>=0?u:23,k=(u,Z)=>{const ae=r.minTime?U(Ga(r.minTime)):null,ne=r.maxTime?U(Ga(r.maxTime)):null,Me=U(Ga(N.value,Z,Z==="minutes"||Z==="seconds"?de(u):f(u)));return ae&&ne?(la(Me,ne)||ta(Me,ne))&&(Gt(Me,ae)||ta(Me,ae)):ae?Gt(Me,ae)||ta(Me,ae):ne?la(Me,ne)||ta(Me,ne):!0},F=u=>r[`no${u[0].toUpperCase()+u.slice(1)}Overlay`],W=u=>{F(u)||(R[u]=!R[u],R[u]?(L.value=!0,a("overlay-opened",u)):(L.value=!1,a("overlay-closed",u)))},l=u=>u==="hours"?St:u==="minutes"?Ht:ra,_=()=>{C.value&&clearTimeout(C.value)},oe=(u,Z=!0,ae)=>{const ne=Z?ce:ye,Me=Z?+r[`${u}Increment`]:-+r[`${u}Increment`];k(+r[u]+Me,u)&&a(`update:${u}`,l(u)(ne({[u]:+r[u]},{[u]:+r[`${u}Increment`]}))),!(ae!=null&&ae.keyboard)&&v.value.timeArrowHoldThreshold&&(C.value=setTimeout(()=>{oe(u,Z)},v.value.timeArrowHoldThreshold))},Ye=u=>r.is24?u:(u>=12?M.value="PM":M.value="AM",ms(u)),$=()=>{M.value==="PM"?(M.value="AM",a("update:hours",r.hours-12)):(M.value="PM",a("update:hours",r.hours+12)),a("am-pm-change",M.value)},we=u=>{R[u]=!0},Q=(u,Z,ae)=>{if(u&&r.arrowNavigation){Array.isArray(S.value[Z])?S.value[Z][ae]=u:S.value[Z]=[u];const ne=S.value.reduce((Me,be)=>be.map((Ce,We)=>[...Me[We]||[],be[We]]),[]);s(r.closeTimePickerBtn),b.value&&(ne[1]=ne[1].concat(b.value)),o(ne,r.order)}},te=(u,Z)=>(W(u),a(`update:${u}`,Z));return t({openChildCmp:we}),(u,Z)=>{var ae;return u.disabled?G("",!0):(T(),z("div",su,[(T(!0),z(ke,null,Fe(h.value,(ne,Me)=>{var be,Ce,We;return T(),z("div",{key:Me,class:xe(y.value),"data-compact":D.value&&!u.enableSeconds,"data-collapsed":D.value&&u.enableSeconds},[ne.separator?(T(),z(ke,{key:0},[L.value?G("",!0):(T(),z(ke,{key:0},[Rt(":")],64))],64)):(T(),z(ke,{key:1},[ge("button",{ref_for:!0,ref:g=>Q(g,Me,0),type:"button",class:xe({dp__btn:!0,dp__inc_dec_button:!u.timePickerInline,dp__inc_dec_button_inline:u.timePickerInline,dp__tp_inline_btn_top:u.timePickerInline,dp__inc_dec_button_disabled:I.value(ne.type),"dp--hidden-el":L.value}),"data-test-id":`${ne.type}-time-inc-btn-${r.order}`,"aria-label":(be=i(c))==null?void 0:be.incrementValue(ne.type),tabindex:"0",onKeydown:g=>i(ut)(g,()=>oe(ne.type,!0,{keyboard:!0}),!0),onClick:g=>i(v).timeArrowHoldThreshold?void 0:oe(ne.type,!0),onMousedown:g=>i(v).timeArrowHoldThreshold?oe(ne.type,!0):void 0,onMouseup:_},[r.timePickerInline?(T(),z(ke,{key:1},[u.$slots["tp-inline-arrow-up"]?ie(u.$slots,"tp-inline-arrow-up",{key:0}):(T(),z(ke,{key:1},[Z[2]||(Z[2]=ge("span",{class:"dp__tp_inline_btn_bar dp__tp_btn_in_l"},null,-1)),Z[3]||(Z[3]=ge("span",{class:"dp__tp_inline_btn_bar dp__tp_btn_in_r"},null,-1))],64))],64)):(T(),z(ke,{key:0},[u.$slots["arrow-up"]?ie(u.$slots,"arrow-up",{key:0}):G("",!0),u.$slots["arrow-up"]?G("",!0):(T(),Oe(i(kn),{key:1}))],64))],42,iu),ge("button",{ref_for:!0,ref:g=>Q(g,Me,1),type:"button","aria-label":`${J.value(ne.type).text}-${(Ce=i(c))==null?void 0:Ce.openTpOverlay(ne.type)}`,class:xe({dp__time_display:!0,dp__time_display_block:!u.timePickerInline,dp__time_display_inline:u.timePickerInline,"dp--time-invalid":Y.value(ne.type),"dp--time-overlay-btn":!Y.value(ne.type),"dp--hidden-el":L.value}),disabled:F(ne.type),tabindex:"0","data-test-id":`${ne.type}-toggle-overlay-btn-${r.order}`,onKeydown:g=>i(ut)(g,()=>W(ne.type),!0),onClick:g=>W(ne.type)},[u.$slots[ne.type]?ie(u.$slots,ne.type,{key:0,text:J.value(ne.type).text,value:J.value(ne.type).value}):G("",!0),u.$slots[ne.type]?G("",!0):(T(),z(ke,{key:1},[Rt(lt(J.value(ne.type).text),1)],64))],42,du),ge("button",{ref_for:!0,ref:g=>Q(g,Me,2),type:"button",class:xe({dp__btn:!0,dp__inc_dec_button:!u.timePickerInline,dp__inc_dec_button_inline:u.timePickerInline,dp__tp_inline_btn_bottom:u.timePickerInline,dp__inc_dec_button_disabled:se.value(ne.type),"dp--hidden-el":L.value}),"data-test-id":`${ne.type}-time-dec-btn-${r.order}`,"aria-label":(We=i(c))==null?void 0:We.decrementValue(ne.type),tabindex:"0",onKeydown:g=>i(ut)(g,()=>oe(ne.type,!1,{keyboard:!0}),!0),onClick:g=>i(v).timeArrowHoldThreshold?void 0:oe(ne.type,!1),onMousedown:g=>i(v).timeArrowHoldThreshold?oe(ne.type,!1):void 0,onMouseup:_},[r.timePickerInline?(T(),z(ke,{key:1},[u.$slots["tp-inline-arrow-down"]?ie(u.$slots,"tp-inline-arrow-down",{key:0}):(T(),z(ke,{key:1},[Z[4]||(Z[4]=ge("span",{class:"dp__tp_inline_btn_bar dp__tp_btn_in_l"},null,-1)),Z[5]||(Z[5]=ge("span",{class:"dp__tp_inline_btn_bar dp__tp_btn_in_r"},null,-1))],64))],64)):(T(),z(ke,{key:0},[u.$slots["arrow-down"]?ie(u.$slots,"arrow-down",{key:0}):G("",!0),u.$slots["arrow-down"]?G("",!0):(T(),Oe(i(Dn),{key:1}))],64))],42,cu)],64))],10,uu)}),128)),u.is24?G("",!0):(T(),z("div",vu,[u.$slots["am-pm-button"]?ie(u.$slots,"am-pm-button",{key:0,toggle:$,value:M.value}):G("",!0),u.$slots["am-pm-button"]?G("",!0):(T(),z("button",{key:1,ref_key:"amPmButton",ref:b,type:"button",class:"dp__pm_am_button",role:"button","aria-label":(ae=i(c))==null?void 0:ae.amPmButton,tabindex:"0","data-compact":D.value,onClick:$,onKeydown:Z[0]||(Z[0]=ne=>i(ut)(ne,()=>$(),!0))},lt(M.value),41,mu))])),(T(!0),z(ke,null,Fe(H.value,(ne,Me)=>(T(),Oe(da,{key:Me,name:i(x)(R[ne.type]),css:i(A)},{default:De(()=>{var be,Ce;return[R[ne.type]?(T(),Oe(xa,{key:0,items:O(ne.type),"is-last":u.autoApply&&!i(v).keepActionRow,"esc-close":u.escClose,type:ne.type,"text-input":u.textInput,config:u.config,"arrow-navigation":u.arrowNavigation,"aria-labels":u.ariaLabels,"overlay-label":(Ce=(be=i(c)).timeOverlay)==null?void 0:Ce.call(be,ne.type),onSelected:We=>te(ne.type,We),onToggle:We=>W(ne.type),onResetFlow:Z[1]||(Z[1]=We=>u.$emit("reset-flow"))},ot({"button-icon":De(()=>[u.$slots["clock-icon"]?ie(u.$slots,"clock-icon",{key:0}):G("",!0),u.$slots["clock-icon"]?G("",!0):(T(),Oe(Na(u.timePickerInline?i(ca):i(_n)),{key:1}))]),_:2},[u.$slots[`${ne.type}-overlay-value`]?{name:"item",fn:De(({item:We})=>[ie(u.$slots,`${ne.type}-overlay-value`,{text:We.text,value:We.value})]),key:"0"}:void 0,u.$slots[`${ne.type}-overlay-header`]?{name:"header",fn:De(()=>[ie(u.$slots,`${ne.type}-overlay-header`,{toggle:()=>W(ne.type)})]),key:"1"}:void 0]),1032,["items","is-last","esc-close","type","text-input","config","arrow-navigation","aria-labels","overlay-label","onSelected","onToggle"])):G("",!0)]}),_:2},1032,["name","css"]))),128))]))}}}),pu=["data-dp-mobile"],yu=["aria-label","tabindex"],hu=["role","aria-label","tabindex"],gu=["aria-label"],Hr=tt({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},...kt},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:o,setTimePicker:s}=Vt(),c=Kt(),{defaultedTransitions:d,defaultedAriaLabels:P,defaultedTextInput:v,defaultedConfig:m,defaultedRange:p}=Be(r),{transitionName:x,showTransition:A}=Ma(d),{hideNavigationButtons:R}=Ba(),M=K(null),b=K(null),S=K([]),C=K(null),L=K(!1);at(()=>{a("mount"),!r.timePicker&&r.arrowNavigation?o([je(M.value)],"time"):s(!0,r.timePicker)});const U=j(()=>p.value.enabled&&r.modelAuto?xr(r.internalModelValue):!0),Y=K(!1),N=E=>({hours:Array.isArray(r.hours)?r.hours[E]:r.hours,minutes:Array.isArray(r.minutes)?r.minutes[E]:r.minutes,seconds:Array.isArray(r.seconds)?r.seconds[E]:r.seconds}),re=j(()=>{const E=[];if(p.value.enabled)for(let ee=0;ee<2;ee++)E.push(N(ee));else E.push(N(0));return E}),V=(E,ee=!1,O="")=>{ee||a("reset-flow"),Y.value=E,a(E?"overlay-opened":"overlay-closed",rt.time),r.arrowNavigation&&s(E),mt(()=>{O!==""&&S.value[0]&&S.value[0].openChildCmp(O)})},I=j(()=>({dp__btn:!0,dp__button:!0,dp__button_bottom:r.autoApply&&!m.value.keepActionRow})),se=ct(c,"timePicker"),ce=(E,ee,O)=>p.value.enabled?ee===0?[E,re.value[1][O]]:[re.value[0][O],E]:E,ye=E=>{a("update:hours",E)},y=E=>{a("update:minutes",E)},D=E=>{a("update:seconds",E)},h=()=>{if(C.value&&!v.value.enabled&&!r.noOverlayFocus){const E=Mr(C.value);E&&E.focus({preventScroll:!0})}},H=E=>{L.value=!1,a("overlay-closed",E)},J=E=>{L.value=!0,a("overlay-opened",E)};return t({toggleTimePicker:V}),(E,ee)=>{var O;return T(),z("div",{class:"dp--tp-wrap","data-dp-mobile":E.isMobile},[!E.timePicker&&!E.timePickerInline?Aa((T(),z("button",{key:0,ref_key:"openTimePickerBtn",ref:M,type:"button",class:xe({...I.value,"dp--hidden-el":Y.value}),"aria-label":(O=i(P))==null?void 0:O.openTimePicker,tabindex:E.noOverlayFocus?void 0:0,"data-test-id":"open-time-picker-btn",onKeydown:ee[0]||(ee[0]=de=>i(ut)(de,()=>V(!0))),onClick:ee[1]||(ee[1]=de=>V(!0))},[E.$slots["clock-icon"]?ie(E.$slots,"clock-icon",{key:0}):G("",!0),E.$slots["clock-icon"]?G("",!0):(T(),Oe(i(_n),{key:1}))],42,yu)),[[Ya,!i(R)(E.hideNavigation,"time")]]):G("",!0),vt(da,{name:i(x)(Y.value),css:i(A)&&!E.timePickerInline},{default:De(()=>{var de,f;return[Y.value||E.timePicker||E.timePickerInline?(T(),z("div",{key:0,ref_key:"overlayRef",ref:C,role:E.timePickerInline?void 0:"dialog",class:xe({dp__overlay:!E.timePickerInline,"dp--overlay-absolute":!r.timePicker&&!E.timePickerInline,"dp--overlay-relative":r.timePicker}),style:pt(E.timePicker?{height:`${i(m).modeHeight}px`}:void 0),"aria-label":(de=i(P))==null?void 0:de.timePicker,tabindex:E.timePickerInline?void 0:0},[ge("div",{class:xe(E.timePickerInline?"dp__time_picker_inline_container":"dp__overlay_container dp__container_flex dp__time_picker_overlay_container"),style:{display:"flex"}},[E.$slots["time-picker-overlay"]?ie(E.$slots,"time-picker-overlay",{key:0,hours:e.hours,minutes:e.minutes,seconds:e.seconds,setHours:ye,setMinutes:y,setSeconds:D}):G("",!0),E.$slots["time-picker-overlay"]?G("",!0):(T(),z("div",{key:1,class:xe(E.timePickerInline?"dp__flex":"dp__overlay_row dp__flex_row")},[(T(!0),z(ke,null,Fe(re.value,(k,F)=>Aa((T(),Oe(fu,Je({key:F,ref_for:!0},{...E.$props,order:F,hours:k.hours,minutes:k.minutes,seconds:k.seconds,closeTimePickerBtn:b.value,disabledTimesConfig:e.disabledTimesConfig,disabled:F===0?i(p).fixedStart:i(p).fixedEnd},{ref_for:!0,ref_key:"timeInputRefs",ref:S,"validate-time":(W,l)=>e.validateTime(W,ce(l,F,W)),"onUpdate:hours":W=>ye(ce(W,F,"hours")),"onUpdate:minutes":W=>y(ce(W,F,"minutes")),"onUpdate:seconds":W=>D(ce(W,F,"seconds")),onMounted:h,onOverlayClosed:H,onOverlayOpened:J,onAmPmChange:ee[2]||(ee[2]=W=>E.$emit("am-pm-change",W))}),ot({_:2},[Fe(i(se),(W,l)=>({name:W,fn:De(_=>[ie(E.$slots,W,Je({ref_for:!0},_))])}))]),1040,["validate-time","onUpdate:hours","onUpdate:minutes","onUpdate:seconds"])),[[Ya,F===0?!0:U.value]])),128))],2)),!E.timePicker&&!E.timePickerInline?Aa((T(),z("button",{key:2,ref_key:"closeTimePickerBtn",ref:b,type:"button",class:xe({...I.value,"dp--hidden-el":L.value}),"aria-label":(f=i(P))==null?void 0:f.closeTimePicker,tabindex:"0",onKeydown:ee[3]||(ee[3]=k=>i(ut)(k,()=>V(!1))),onClick:ee[4]||(ee[4]=k=>V(!1))},[E.$slots["calendar-icon"]?ie(E.$slots,"calendar-icon",{key:0}):G("",!0),E.$slots["calendar-icon"]?G("",!0):(T(),Oe(i(ca),{key:1}))],42,gu)),[[Ya,!i(R)(E.hideNavigation,"time")]]):G("",!0)],2)],14,hu)):G("",!0)]}),_:3},8,["name","css"])],8,pu)}}}),Vr=(e,t,n,a)=>{const{defaultedRange:r}=Be(e),o=(C,L)=>Array.isArray(t[C])?t[C][L]:t[C],s=C=>e.enableSeconds?Array.isArray(t.seconds)?t.seconds[C]:t.seconds:0,c=(C,L)=>C?L!==void 0?Lt(C,o("hours",L),o("minutes",L),s(L)):Lt(C,t.hours,t.minutes,s()):br(q(),s(L)),d=(C,L)=>{t[C]=L},P=j(()=>e.modelAuto&&r.value.enabled?Array.isArray(n.value)?n.value.length>1:!1:r.value.enabled),v=(C,L)=>{const U=Object.fromEntries(Object.keys(t).map(Y=>Y===C?[Y,L]:[Y,t[Y]].slice()));if(P.value&&!r.value.disableTimeRangeValidation){const Y=re=>n.value?Lt(n.value[re],U.hours[re],U.minutes[re],U.seconds[re]):null,N=re=>wr(n.value[re],0);return!(Te(Y(0),Y(1))&&(Gt(Y(0),N(1))||la(Y(1),N(0))))}return!0},m=(C,L)=>{v(C,L)&&(d(C,L),a&&a())},p=C=>{m("hours",C)},x=C=>{m("minutes",C)},A=C=>{m("seconds",C)},R=(C,L,U,Y)=>{L&&p(C),!L&&!U&&x(C),U&&A(C),n.value&&Y(n.value)},M=C=>{if(C){const L=Array.isArray(C),U=L?[+C[0].hours,+C[1].hours]:+C.hours,Y=L?[+C[0].minutes,+C[1].minutes]:+C.minutes,N=L?[+C[0].seconds,+C[1].seconds]:+C.seconds;d("hours",U),d("minutes",Y),e.enableSeconds&&d("seconds",N)}},b=(C,L)=>{const U={hours:Array.isArray(t.hours)?t.hours[C]:t.hours,disabledArr:[]};return(L||L===0)&&(U.hours=L),Array.isArray(e.disabledTimes)&&(U.disabledArr=r.value.enabled&&Array.isArray(e.disabledTimes[C])?e.disabledTimes[C]:e.disabledTimes),U},S=j(()=>(C,L)=>{var U;if(Array.isArray(e.disabledTimes)){const{disabledArr:Y,hours:N}=b(C,L),re=Y.filter(V=>+V.hours===N);return((U=re[0])==null?void 0:U.minutes)==="*"?{hours:[N],minutes:void 0,seconds:void 0}:{hours:[],minutes:re?.map(V=>+V.minutes)??[],seconds:re?.map(V=>V.seconds?+V.seconds:void 0)??[]}}return{hours:[],minutes:[],seconds:[]}});return{setTime:d,updateHours:p,updateMinutes:x,updateSeconds:A,getSetDateTime:c,updateTimeValues:R,getSecondsValue:s,assignStartTime:M,validateTime:v,disabledTimesConfig:S}},wu=(e,t)=>{const n=()=>{e.isTextInputDate&&L()},{modelValue:a,time:r}=Pa(e,t,n),{defaultedStartTime:o,defaultedRange:s,defaultedTz:c}=Be(e),{updateTimeValues:d,getSetDateTime:P,setTime:v,assignStartTime:m,disabledTimesConfig:p,validateTime:x}=Vr(e,r,a,A);function A(){t("update-flow-step")}const R=Y=>{const{hours:N,minutes:re,seconds:V}=Y;return{hours:+N,minutes:+re,seconds:V?+V:0}},M=()=>{if(e.startTime){if(Array.isArray(e.startTime)){const N=R(e.startTime[0]),re=R(e.startTime[1]);return[Ne(q(),N),Ne(q(),re)]}const Y=R(e.startTime);return Ne(q(),Y)}return s.value.enabled?[null,null]:null},b=()=>{if(s.value.enabled){const[Y,N]=M();a.value=[dt(P(Y,0),c.value.timezone),dt(P(N,1),c.value.timezone)]}else a.value=dt(P(M()),c.value.timezone)},S=Y=>Array.isArray(Y)?[jt(q(Y[0])),jt(q(Y[1]))]:[jt(Y??q())],C=(Y,N,re)=>{v("hours",Y),v("minutes",N),v("seconds",e.enableSeconds?re:0)},L=()=>{const[Y,N]=S(a.value);return s.value.enabled?C([Y.hours,N.hours],[Y.minutes,N.minutes],[Y.seconds,N.seconds]):C(Y.hours,Y.minutes,Y.seconds)};at(()=>{if(!e.shadow)return m(o.value),a.value?L():b()});const U=()=>{Array.isArray(a.value)?a.value=a.value.map((Y,N)=>Y&&P(Y,N)):a.value=P(a.value),t("time-update")};return{modelValue:a,time:r,disabledTimesConfig:p,updateTime:(Y,N=!0,re=!1)=>{d(Y,N,re,U)},validateTime:x}},bu=tt({compatConfig:{MODE:3},__name:"TimePickerSolo",props:{...kt},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,o=Kt(),s=ct(o,"timePicker"),c=K(null),{time:d,modelValue:P,disabledTimesConfig:v,updateTime:m,validateTime:p}=wu(r,a);return at(()=>{r.shadow||a("mount",null)}),t({getSidebarProps:()=>({modelValue:P,time:d,updateTime:m}),toggleTimePicker:(x,A=!1,R="")=>{var M;(M=c.value)==null||M.toggleTimePicker(x,A,R)}}),(x,A)=>(T(),Oe(Ea,{"multi-calendars":0,stretch:"","is-mobile":x.isMobile},{default:De(()=>[vt(Hr,Je({ref_key:"tpRef",ref:c},x.$props,{hours:i(d).hours,minutes:i(d).minutes,seconds:i(d).seconds,"internal-model-value":x.internalModelValue,"disabled-times-config":i(v),"validate-time":i(p),"onUpdate:hours":A[0]||(A[0]=R=>i(m)(R)),"onUpdate:minutes":A[1]||(A[1]=R=>i(m)(R,!1)),"onUpdate:seconds":A[2]||(A[2]=R=>i(m)(R,!1,!0)),onAmPmChange:A[3]||(A[3]=R=>x.$emit("am-pm-change",R)),onResetFlow:A[4]||(A[4]=R=>x.$emit("reset-flow")),onOverlayClosed:A[5]||(A[5]=R=>x.$emit("overlay-toggle",{open:!1,overlay:R})),onOverlayOpened:A[6]||(A[6]=R=>x.$emit("overlay-toggle",{open:!0,overlay:R}))}),ot({_:2},[Fe(i(s),(R,M)=>({name:R,fn:De(b=>[ie(x.$slots,R,Ze(it(b)))])}))]),1040,["hours","minutes","seconds","internal-model-value","disabled-times-config","validate-time"])]),_:3},8,["is-mobile"]))}}),_u={class:"dp--header-wrap"},ku={key:0,class:"dp__month_year_wrap"},Du={key:0},xu={class:"dp__month_year_wrap"},Mu=["data-dp-element","aria-label","data-test-id","onClick","onKeydown"],Pu=tt({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:()=>[]},...kt},emits:["update-month-year","mount","reset-flow","overlay-closed","overlay-opened"],setup(e,{expose:t,emit:n}){const a=n,r=e,{defaultedTransitions:o,defaultedAriaLabels:s,defaultedMultiCalendars:c,defaultedFilters:d,defaultedConfig:P,defaultedHighlight:v,propDates:m,defaultedUI:p}=Be(r),{transitionName:x,showTransition:A}=Ma(o),{buildMatrix:R}=Vt(),{handleMonthYearChange:M,isDisabled:b,updateMonthYear:S}=Us(r,a),{showLeftIcon:C,showRightIcon:L}=Ba(),U=K(!1),Y=K(!1),N=K(!1),re=K([null,null,null,null]);at(()=>{a("mount")});const V=f=>({get:()=>r[f],set:k=>{const F=f===ht.month?ht.year:ht.month;a("update-month-year",{[f]:k,[F]:r[F]}),f===ht.month?H(!0):J(!0)}}),I=j(V(ht.month)),se=j(V(ht.year)),ce=j(()=>f=>({month:r.month,year:r.year,items:f===ht.month?r.months:r.years,instance:r.instance,updateMonthYear:S,toggle:f===ht.month?H:J})),ye=j(()=>r.months.find(k=>k.value===r.month)||{text:"",value:0}),y=j(()=>sa(r.months,f=>{const k=r.month===f.value,F=ba(f.value,$r(r.year,m.value.minDate),Ar(r.year,m.value.maxDate))||d.value.months.includes(f.value),W=Nr(v.value,f.value,r.year);return{active:k,disabled:F,highlighted:W}})),D=j(()=>sa(r.years,f=>{const k=r.year===f.value,F=ba(f.value,ua(m.value.minDate),ua(m.value.maxDate))||d.value.years.includes(f.value),W=On(v.value,f.value);return{active:k,disabled:F,highlighted:W}})),h=(f,k,F)=>{F!==void 0?f.value=F:f.value=!f.value,f.value?(N.value=!0,a("overlay-opened",k)):(N.value=!1,a("overlay-closed",k))},H=(f=!1,k)=>{E(f),h(U,rt.month,k)},J=(f=!1,k)=>{E(f),h(Y,rt.year,k)},E=f=>{f||a("reset-flow")},ee=(f,k)=>{r.arrowNavigation&&(re.value[k]=je(f),R(re.value,"monthYear"))},O=j(()=>{var f,k,F,W,l,_;return[{type:ht.month,index:1,toggle:H,modelValue:I.value,updateModelValue:oe=>I.value=oe,text:ye.value.text,showSelectionGrid:U.value,items:y.value,ariaLabel:(f=s.value)==null?void 0:f.openMonthsOverlay,overlayLabel:((F=(k=s.value).monthPicker)==null?void 0:F.call(k,!0))??void 0},{type:ht.year,index:2,toggle:J,modelValue:se.value,updateModelValue:oe=>se.value=oe,text:Pr(r.year,r.locale),showSelectionGrid:Y.value,items:D.value,ariaLabel:(W=s.value)==null?void 0:W.openYearsOverlay,overlayLabel:((_=(l=s.value).yearPicker)==null?void 0:_.call(l,!0))??void 0}]}),de=j(()=>r.disableYearSelect?[O.value[0]]:r.yearFirst?[...O.value].reverse():O.value);return t({toggleMonthPicker:H,toggleYearPicker:J,handleMonthYearChange:M}),(f,k)=>{var F,W,l,_,oe,Ye;return T(),z("div",_u,[f.$slots["month-year"]?(T(),z("div",ku,[ie(f.$slots,"month-year",Ze(it({month:e.month,year:e.year,months:e.months,years:e.years,updateMonthYear:i(S),handleMonthYearChange:i(M),instance:e.instance,isDisabled:i(b)})))])):(T(),z(ke,{key:1},[f.$slots["top-extra"]?(T(),z("div",Du,[ie(f.$slots,"top-extra",{value:f.internalModelValue})])):G("",!0),ge("div",xu,[i(C)(i(c),e.instance)&&!f.vertical?(T(),Oe(ya,{key:0,"aria-label":(F=i(s))==null?void 0:F.prevMonth,disabled:i(b)(!1),class:xe((W=i(p))==null?void 0:W.navBtnPrev),"el-name":"action-prev",onActivate:k[0]||(k[0]=$=>i(M)(!1,!0)),onSetRef:k[1]||(k[1]=$=>ee($,0))},{default:De(()=>[f.$slots["arrow-left"]?ie(f.$slots,"arrow-left",{key:0}):G("",!0),f.$slots["arrow-left"]?G("",!0):(T(),Oe(i(wn),{key:1}))]),_:3},8,["aria-label","disabled","class"])):G("",!0),ge("div",{class:xe(["dp__month_year_wrap",{dp__year_disable_select:f.disableYearSelect}])},[(T(!0),z(ke,null,Fe(de.value,($,we)=>(T(),z(ke,{key:$.type},[ge("button",{ref_for:!0,ref:Q=>ee(Q,we+1),type:"button","data-dp-element":`overlay-${$.type}`,class:xe(["dp__btn dp__month_year_select",{"dp--hidden-el":N.value}]),"aria-label":`${$.text}-${$.ariaLabel}`,"data-test-id":`${$.type}-toggle-overlay-${e.instance}`,onClick:$.toggle,onKeydown:Q=>i(ut)(Q,()=>$.toggle(),!0)},[f.$slots[$.type]?ie(f.$slots,$.type,{key:0,text:$.text,value:r[$.type]}):G("",!0),f.$slots[$.type]?G("",!0):(T(),z(ke,{key:1},[Rt(lt($.text),1)],64))],42,Mu),vt(da,{name:i(x)($.showSelectionGrid),css:i(A)},{default:De(()=>[$.showSelectionGrid?(T(),Oe(xa,{key:0,items:$.items,"arrow-navigation":f.arrowNavigation,"hide-navigation":f.hideNavigation,"is-last":f.autoApply&&!i(P).keepActionRow,"skip-button-ref":!1,config:f.config,type:$.type,"header-refs":[],"esc-close":f.escClose,"menu-wrap-ref":f.menuWrapRef,"text-input":f.textInput,"aria-labels":f.ariaLabels,"overlay-label":$.overlayLabel,onSelected:$.updateModelValue,onToggle:$.toggle},ot({"button-icon":De(()=>[f.$slots["calendar-icon"]?ie(f.$slots,"calendar-icon",{key:0}):G("",!0),f.$slots["calendar-icon"]?G("",!0):(T(),Oe(i(ca),{key:1}))]),_:2},[f.$slots[`${$.type}-overlay-value`]?{name:"item",fn:De(({item:Q})=>[ie(f.$slots,`${$.type}-overlay-value`,{text:Q.text,value:Q.value})]),key:"0"}:void 0,f.$slots[`${$.type}-overlay`]?{name:"overlay",fn:De(()=>[ie(f.$slots,`${$.type}-overlay`,Je({ref_for:!0},ce.value($.type)))]),key:"1"}:void 0,f.$slots[`${$.type}-overlay-header`]?{name:"header",fn:De(()=>[ie(f.$slots,`${$.type}-overlay-header`,{toggle:$.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"])):G("",!0)]),_:2},1032,["name","css"])],64))),128))],2),i(C)(i(c),e.instance)&&f.vertical?(T(),Oe(ya,{key:1,"aria-label":(l=i(s))==null?void 0:l.prevMonth,"el-name":"action-prev",disabled:i(b)(!1),class:xe((_=i(p))==null?void 0:_.navBtnPrev),onActivate:k[2]||(k[2]=$=>i(M)(!1,!0))},{default:De(()=>[f.$slots["arrow-up"]?ie(f.$slots,"arrow-up",{key:0}):G("",!0),f.$slots["arrow-up"]?G("",!0):(T(),Oe(i(kn),{key:1}))]),_:3},8,["aria-label","disabled","class"])):G("",!0),i(L)(i(c),e.instance)?(T(),Oe(ya,{key:2,ref:"rightIcon","el-name":"action-next",disabled:i(b)(!0),"aria-label":(oe=i(s))==null?void 0:oe.nextMonth,class:xe((Ye=i(p))==null?void 0:Ye.navBtnNext),onActivate:k[3]||(k[3]=$=>i(M)(!0,!0)),onSetRef:k[4]||(k[4]=$=>ee($,f.disableYearSelect?2:3))},{default:De(()=>[f.$slots[f.vertical?"arrow-down":"arrow-right"]?ie(f.$slots,f.vertical?"arrow-down":"arrow-right",{key:0}):G("",!0),f.$slots[f.vertical?"arrow-down":"arrow-right"]?G("",!0):(T(),Oe(Na(f.vertical?i(Dn):i(bn)),{key:1}))]),_:3},8,["disabled","aria-label","class"])):G("",!0)])],64))])}}}),Tu={class:"dp__calendar_header",role:"row"},Ou={key:0,class:"dp__calendar_header_item",role:"gridcell"},$u=["aria-label"],Au={key:0,class:"dp__calendar_item dp__week_num",role:"gridcell"},Yu={class:"dp__cell_inner"},Cu=["id","aria-pressed","aria-disabled","aria-label","tabindex","data-test-id","onClick","onTouchend","onKeydown","onMouseenter","onMouseleave","onMousedown"],Ru=tt({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},...kt},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:o}=Vt(),{defaultedTransitions:s,defaultedConfig:c,defaultedAriaLabels:d,defaultedMultiCalendars:P,defaultedWeekNumbers:v,defaultedMultiDates:m,defaultedUI:p}=Be(r),x=K(null),A=K({bottom:"",left:"",transform:""}),R=K([]),M=K(null),b=K(!0),S=K(""),C=K({startX:0,endX:0,startY:0,endY:0}),L=K([]),U=K({left:"50%"}),Y=K(!1),N=j(()=>r.calendar?r.calendar(r.mappedDates):r.mappedDates),re=j(()=>r.dayNames?Array.isArray(r.dayNames)?r.dayNames:r.dayNames(r.locale,+r.weekStart):vs(r.formatLocale,r.locale,+r.weekStart));at(()=>{a("mount",{cmp:"calendar",refs:R}),c.value.noSwipe||M.value&&(M.value.addEventListener("touchstart",ee,{passive:!1}),M.value.addEventListener("touchend",O,{passive:!1}),M.value.addEventListener("touchmove",de,{passive:!1})),r.monthChangeOnScroll&&M.value&&M.value.addEventListener("wheel",F,{passive:!1})}),ia(()=>{c.value.noSwipe||M.value&&(M.value.removeEventListener("touchstart",ee),M.value.removeEventListener("touchend",O),M.value.removeEventListener("touchmove",de)),r.monthChangeOnScroll&&M.value&&M.value.removeEventListener("wheel",F)});const V=$=>$?r.vertical?"vNext":"next":r.vertical?"vPrevious":"previous",I=($,we)=>{if(r.transitions){const Q=et(Ct(q(),r.month,r.year));S.value=qe(et(Ct(q(),$,we)),Q)?s.value[V(!0)]:s.value[V(!1)],b.value=!1,mt(()=>{b.value=!0})}},se=j(()=>({...p.value.calendar??{}})),ce=j(()=>$=>{const we=fs($);return{dp__marker_dot:we.type==="dot",dp__marker_line:we.type==="line"}}),ye=j(()=>$=>Te($,x.value)),y=j(()=>({dp__calendar:!0,dp__calendar_next:P.value.count>0&&r.instance!==0})),D=j(()=>$=>r.hideOffsetDates?$.current:!0),h=async($,we)=>{const{width:Q,height:te}=$.getBoundingClientRect();x.value=we.value;let u={left:`${Q/2}px`},Z=-50;if(await mt(),L.value[0]){const{left:ae,width:ne}=L.value[0].getBoundingClientRect();ae<0&&(u={left:"0"},Z=0,U.value.left=`${Q/2}px`),window.innerWidth{var te,u,Z;const ae=je(R.value[we][Q]);ae&&((te=$.marker)!=null&&te.customPosition&&(Z=(u=$.marker)==null?void 0:u.tooltip)!=null&&Z.length?A.value=$.marker.customPosition(ae):await h(ae,$),a("tooltip-open",$.marker))},J=async($,we,Q)=>{var te,u;if(Y.value&&m.value.enabled&&m.value.dragSelect)return a("select-date",$);if(a("set-hover-date",$),(u=(te=$.marker)==null?void 0:te.tooltip)!=null&&u.length){if(r.hideOffsetDates&&!$.current)return;await H($,we,Q)}},E=$=>{x.value&&(x.value=null,A.value=JSON.parse(JSON.stringify({bottom:"",left:"",transform:""})),a("tooltip-close",$.marker))},ee=$=>{C.value.startX=$.changedTouches[0].screenX,C.value.startY=$.changedTouches[0].screenY},O=$=>{C.value.endX=$.changedTouches[0].screenX,C.value.endY=$.changedTouches[0].screenY,f()},de=$=>{r.vertical&&!r.inline&&$.preventDefault()},f=()=>{const $=r.vertical?"Y":"X";Math.abs(C.value[`start${$}`]-C.value[`end${$}`])>10&&a("handle-swipe",C.value[`start${$}`]>C.value[`end${$}`]?"right":"left")},k=($,we,Q)=>{$&&(Array.isArray(R.value[we])?R.value[we][Q]=$:R.value[we]=[$]),r.arrowNavigation&&o(R.value,"calendar")},F=$=>{r.monthChangeOnScroll&&($.preventDefault(),a("handle-scroll",$))},W=$=>v.value.type==="local"?yn($.value,{weekStartsOn:+r.weekStart}):v.value.type==="iso"?fn($.value):typeof v.value.type=="function"?v.value.type($.value):"",l=$=>{const we=$[0];return v.value.hideOnOffsetDates?$.some(Q=>Q.current)?W(we):"":W(we)},_=($,we,Q=!0)=>{!Q&&ws()||(!m.value.enabled||c.value.allowPreventDefault)&&(Bt($,c.value),a("select-date",we))},oe=$=>{Bt($,c.value)},Ye=$=>{m.value.enabled&&m.value.dragSelect?(Y.value=!0,a("select-date",$)):m.value.enabled&&a("select-date",$)};return t({triggerTransition:I}),($,we)=>(T(),z("div",{class:xe(y.value)},[ge("div",{ref_key:"calendarWrapRef",ref:M,class:xe(se.value),role:"grid"},[ge("div",Tu,[$.weekNumbers?(T(),z("div",Ou,lt($.weekNumName),1)):G("",!0),(T(!0),z(ke,null,Fe(re.value,(Q,te)=>{var u,Z;return T(),z("div",{key:te,class:"dp__calendar_header_item",role:"gridcell","data-test-id":"calendar-header","aria-label":(Z=(u=i(d))==null?void 0:u.weekDay)==null?void 0:Z.call(u,te)},[$.$slots["calendar-header"]?ie($.$slots,"calendar-header",{key:0,day:Q,index:te}):G("",!0),$.$slots["calendar-header"]?G("",!0):(T(),z(ke,{key:1},[Rt(lt(Q),1)],64))],8,$u)}),128))]),we[2]||(we[2]=ge("div",{class:"dp__calendar_header_separator"},null,-1)),vt(da,{name:S.value,css:!!$.transitions},{default:De(()=>[b.value?(T(),z("div",{key:0,class:"dp__calendar",role:"rowgroup",onMouseleave:we[1]||(we[1]=Q=>Y.value=!1)},[(T(!0),z(ke,null,Fe(N.value,(Q,te)=>(T(),z("div",{key:te,class:"dp__calendar_row",role:"row"},[$.weekNumbers?(T(),z("div",Au,[ge("div",Yu,lt(l(Q.days)),1)])):G("",!0),(T(!0),z(ke,null,Fe(Q.days,(u,Z)=>{var ae,ne,Me;return T(),z("div",{id:i(vn)(u.value),ref_for:!0,ref:be=>k(be,te,Z),key:Z+te,role:"gridcell",class:"dp__calendar_item","aria-pressed":(u.classData.dp__active_date||u.classData.dp__range_start||u.classData.dp__range_start)??void 0,"aria-disabled":u.classData.dp__cell_disabled||void 0,"aria-label":(ne=(ae=i(d))==null?void 0:ae.day)==null?void 0:ne.call(ae,u),tabindex:!u.current&&$.hideOffsetDates?void 0:0,"data-test-id":i(vn)(u.value),onClick:ga(be=>_(be,u),["prevent"]),onTouchend:be=>_(be,u,!1),onKeydown:be=>i(ut)(be,()=>$.$emit("select-date",u)),onMouseenter:be=>J(u,te,Z),onMouseleave:be=>E(u),onMousedown:be=>Ye(u),onMouseup:we[0]||(we[0]=be=>Y.value=!1)},[ge("div",{class:xe(["dp__cell_inner",u.classData])},[$.$slots.day&&D.value(u)?ie($.$slots,"day",{key:0,day:+u.text,date:u.value}):G("",!0),$.$slots.day?G("",!0):(T(),z(ke,{key:1},[Rt(lt(u.text),1)],64)),u.marker&&D.value(u)?(T(),z(ke,{key:2},[$.$slots.marker?ie($.$slots,"marker",{key:0,marker:u.marker,day:+u.text,date:u.value}):(T(),z("div",{key:1,class:xe(ce.value(u.marker)),style:pt(u.marker.color?{backgroundColor:u.marker.color}:{})},null,6))],64)):G("",!0),ye.value(u.value)?(T(),z("div",{key:3,ref_for:!0,ref_key:"activeTooltip",ref:L,class:"dp__marker_tooltip",style:pt(A.value)},[(Me=u.marker)!=null&&Me.tooltip?(T(),z("div",{key:0,class:"dp__tooltip_content",onClick:oe},[(T(!0),z(ke,null,Fe(u.marker.tooltip,(be,Ce)=>(T(),z("div",{key:Ce,class:"dp__tooltip_text"},[$.$slots["marker-tooltip"]?ie($.$slots,"marker-tooltip",{key:0,tooltip:be,day:u.value}):G("",!0),$.$slots["marker-tooltip"]?G("",!0):(T(),z(ke,{key:1},[ge("div",{class:"dp__tooltip_mark",style:pt(be.color?{backgroundColor:be.color}:{})},null,4),ge("div",null,lt(be.text),1)],64))]))),128)),ge("div",{class:"dp__arrow_bottom_tp",style:pt(U.value)},null,4)])):G("",!0)],4)):G("",!0)],2)],40,Cu)}),128))]))),128))],32)):G("",!0)]),_:3},8,["name","css"])],2)],2))}}),Xn=e=>Array.isArray(e),Su=(e,t,n,a)=>{const r=K([]),o=K(new Date),s=K(),c=()=>O(e.isTextInputDate),{modelValue:d,calendars:P,time:v,today:m}=Pa(e,t,c),{defaultedMultiCalendars:p,defaultedStartTime:x,defaultedRange:A,defaultedConfig:R,defaultedTz:M,propDates:b,defaultedMultiDates:S}=Be(e),{validateMonthYearInRange:C,isDisabled:L,isDateRangeAllowed:U,checkMinMaxRange:Y}=Wt(e),{updateTimeValues:N,getSetDateTime:re,setTime:V,assignStartTime:I,validateTime:se,disabledTimesConfig:ce}=Vr(e,v,d,a),ye=j(()=>w=>P.value[w]?P.value[w].month:0),y=j(()=>w=>P.value[w]?P.value[w].year:0),D=w=>!R.value.keepViewOnOffsetClick||w?!0:!s.value,h=(w,X,fe,_e=!1)=>{var B,ue;D(_e)&&(P.value[w]||(P.value[w]={month:0,year:0}),P.value[w].month=qn(X)?(B=P.value[w])==null?void 0:B.month:X,P.value[w].year=qn(fe)?(ue=P.value[w])==null?void 0:ue.year:fe)},H=()=>{e.autoApply&&t("select-date")},J=()=>{x.value&&I(x.value)};at(()=>{e.shadow||(d.value||(we(),J()),O(!0),e.focusStartDate&&e.startDate&&we())});const E=j(()=>{var w;return(w=e.flow)!=null&&w.length&&!e.partialFlow?e.flowStep===e.flow.length:!0}),ee=()=>{e.autoApply&&E.value&&t("auto-apply",e.partialFlow?e.flowStep!==e.flow.length:!1)},O=(w=!1)=>{if(d.value)return Array.isArray(d.value)?(r.value=d.value,_(w)):k(d.value,w);if(p.value.count&&w&&!e.startDate)return f(q(),w)},de=()=>Array.isArray(d.value)&&A.value.enabled?Pe(d.value[0])===Pe(d.value[1]??d.value[0]):!1,f=(w=new Date,X=!1)=>{if((!p.value.count||!p.value.static||X)&&h(0,Pe(w),he(w)),p.value.count&&(!d.value||de()||!p.value.solo)&&(!p.value.solo||X))for(let fe=1;fe{f(w),V("hours",St(w)),V("minutes",Ht(w)),V("seconds",ra(w)),p.value.count&&X&&$()},F=w=>{if(p.value.count){if(p.value.solo)return 0;const X=Pe(w[0]),fe=Pe(w[1]);return Math.abs(fe-X){w[1]&&A.value.showLastInRange?f(w[F(w)],X):f(w[0],X);const fe=(_e,B)=>[_e(w[0]),w[1]?_e(w[1]):v[B][1]];V("hours",fe(St,"hours")),V("minutes",fe(Ht,"minutes")),V("seconds",fe(ra,"seconds"))},l=(w,X)=>{if((A.value.enabled||e.weekPicker)&&!S.value.enabled)return W(w,X);if(S.value.enabled&&X){const fe=w[w.length-1];return k(fe,X)}},_=w=>{const X=d.value;l(X,w),p.value.count&&p.value.solo&&$()},oe=(w,X)=>{const fe=Ne(q(),{month:ye.value(X),year:y.value(X)}),_e=w<0?bt(fe,1):oa(fe,1);C(Pe(_e),he(_e),w<0,e.preventMinMaxNavigation)&&(h(X,Pe(_e),he(_e)),t("update-month-year",{instance:X,month:Pe(_e),year:he(_e)}),p.value.count&&!p.value.solo&&Ye(X),n())},Ye=w=>{for(let X=w-1;X>=0;X--){const fe=oa(Ne(q(),{month:ye.value(X+1),year:y.value(X+1)}),1);h(X,Pe(fe),he(fe))}for(let X=w+1;X<=p.value.count-1;X++){const fe=bt(Ne(q(),{month:ye.value(X-1),year:y.value(X-1)}),1);h(X,Pe(fe),he(fe))}},$=()=>{if(Array.isArray(d.value)&&d.value.length===2){const w=q(q(d.value[1]?d.value[1]:bt(d.value[0],1))),[X,fe]=[Pe(d.value[0]),he(d.value[0])],[_e,B]=[Pe(d.value[1]),he(d.value[1])];(X!==_e||X===_e&&fe!==B)&&p.value.solo&&h(1,Pe(w),he(w))}else d.value&&!Array.isArray(d.value)&&(h(0,Pe(d.value),he(d.value)),f(q()))},we=()=>{e.startDate&&(h(0,Pe(q(e.startDate)),he(q(e.startDate))),p.value.count&&Ye(0))},Q=(w,X)=>{if(e.monthChangeOnScroll){const fe=new Date().getTime()-o.value.getTime(),_e=Math.abs(w.deltaY);let B=500;_e>1&&(B=100),_e>100&&(B=0),fe>B&&(o.value=new Date,oe(e.monthChangeOnScroll!=="inverse"?-w.deltaY:w.deltaY,X))}},te=(w,X,fe=!1)=>{e.monthChangeOnArrows&&e.vertical===fe&&u(w,X)},u=(w,X)=>{oe(w==="right"?-1:1,X)},Z=w=>{if(b.value.markers)return Sa(w.value,b.value.markers)},ae=(w,X)=>{switch(e.sixWeeks===!0?"append":e.sixWeeks){case"prepend":return[!0,!1];case"center":return[w==0,!0];case"fair":return[w==0||X>w,!0];case"append":return[!1,!1];default:return[!1,!1]}},ne=(w,X,fe,_e)=>{if(e.sixWeeks&&w.length<6){const B=6-w.length,ue=(X.getDay()+7-_e)%7,me=6-(fe.getDay()+7-_e)%7,[At,Mt]=ae(ue,me);for(let zt=1;zt<=B;zt++)if(Mt?!!(zt%2)==At:At){const Nt=w[0].days[0],Ua=Me(ft(Nt.value,-7),Pe(X));w.unshift({days:Ua})}else{const Nt=w[w.length-1],Ua=Nt.days[Nt.days.length-1],qr=Me(ft(Ua.value,1),Pe(X));w.push({days:qr})}}return w},Me=(w,X)=>{const fe=q(w),_e=[];for(let B=0;B<7;B++){const ue=ft(fe,B),me=Pe(ue)!==X;_e.push({text:e.hideOffsetDates&&me?"":ue.getDate(),value:ue,current:!me,classData:{}})}return _e},be=(w,X)=>{const fe=[],_e=new Date(X,w),B=new Date(X,w+1,0),ue=e.weekStart,me=_t(_e,{weekStartsOn:ue}),At=Mt=>{const zt=Me(Mt,w);if(fe.push({days:zt}),!fe[fe.length-1].days.some(Nt=>Te(et(Nt.value),et(B)))){const Nt=ft(Mt,7);At(Nt)}};return At(me),ne(fe,_e,B,ue)},Ce=w=>{const X=Lt(q(w.value),v.hours,v.minutes,ve());t("date-update",X),S.value.enabled?$n(X,d,S.value.limit):d.value=X,a(),mt().then(()=>{ee()})},We=w=>A.value.noDisabledRange?Yr(r.value[0],w).some(X=>L(X)):!1,g=()=>{r.value=d.value?d.value.slice():[],r.value.length===2&&!(A.value.fixedStart||A.value.fixedEnd)&&(r.value=[])},le=(w,X)=>{const fe=[q(w.value),ft(q(w.value),+A.value.autoRange)];U(fe)?(X&&$e(w.value),r.value=fe):t("invalid-date",w.value)},$e=w=>{const X=Pe(q(w)),fe=he(q(w));if(h(0,X,fe),p.value.count>0)for(let _e=1;_e{if(We(w.value)||!Y(w.value,d.value,A.value.fixedStart?0:1))return t("invalid-date",w.value);r.value=Br(q(w.value),d,t,A)},Dt=(w,X)=>{if(g(),A.value.autoRange)return le(w,X);if(A.value.fixedStart||A.value.fixedEnd)return Ge(w);r.value[0]?Y(q(w.value),d.value)&&!We(w.value)?He(q(w.value),q(r.value[0]))?(r.value.unshift(q(w.value)),t("range-end",r.value[0])):(r.value[1]=q(w.value),t("range-end",r.value[1])):(e.autoApply&&t("auto-apply-invalid",w.value),t("invalid-date",w.value)):(r.value[0]=q(w.value),t("range-start",r.value[0]))},ve=(w=!0)=>e.enableSeconds?Array.isArray(v.seconds)?w?v.seconds[0]:v.seconds[1]:v.seconds:0,Ke=w=>{r.value[w]=Lt(r.value[w],v.hours[w],v.minutes[w],ve(w!==1))},xt=()=>{var w,X;r.value[0]&&r.value[1]&&+((w=r.value)==null?void 0:w[0])>+((X=r.value)==null?void 0:X[1])&&(r.value.reverse(),t("range-start",r.value[0]),t("range-end",r.value[1]))},La=()=>{r.value.length&&(r.value[0]&&!r.value[1]?Ke(0):(Ke(0),Ke(1),a()),xt(),d.value=r.value.slice(),Fa(r.value,t,e.autoApply,e.modelAuto))},Ta=(w,X=!1)=>{if(L(w.value)||!w.current&&e.hideOffsetDates)return t("invalid-date",w.value);if(s.value=JSON.parse(JSON.stringify(w)),!A.value.enabled)return Ce(w);Xn(v.hours)&&Xn(v.minutes)&&!S.value.enabled&&(Dt(w,X),La())},Ha=(w,X)=>{var fe;h(w,X.month,X.year,!0),p.value.count&&!p.value.solo&&Ye(w),t("update-month-year",{instance:w,month:X.month,year:X.year}),n(p.value.solo?w:void 0);const _e=(fe=e.flow)!=null&&fe.length?e.flow[e.flowStep]:void 0;!X.fromNav&&(_e===rt.month||_e===rt.year)&&a()},Va=(w,X)=>{Fr({value:w,modelValue:d,range:A.value.enabled,timezone:X?void 0:M.value.timezone}),H(),e.multiCalendars&&mt().then(()=>O(!0))},Wa=()=>{const w=xn(q(),M.value);!A.value.enabled&&!S.value.enabled?d.value=w:d.value&&Array.isArray(d.value)&&d.value[0]?S.value.enabled?d.value=[...d.value,w]:d.value=He(w,d.value[0])?[w,d.value[0]]:[d.value[0],w]:d.value=[w],H()},za=()=>{if(Array.isArray(d.value))if(S.value.enabled){const w=qa();d.value[d.value.length-1]=re(w)}else d.value=d.value.map((w,X)=>w&&re(w,X));else d.value=re(d.value);t("time-update")},qa=()=>Array.isArray(d.value)&&d.value.length?d.value[d.value.length-1]:null;return{calendars:P,modelValue:d,month:ye,year:y,time:v,disabledTimesConfig:ce,today:m,validateTime:se,getCalendarDays:be,getMarker:Z,handleScroll:Q,handleSwipe:u,handleArrow:te,selectDate:Ta,updateMonthYear:Ha,presetDate:Va,selectCurrentDate:Wa,updateTime:(w,X=!0,fe=!1)=>{N(w,X,fe,za)},assignMonthAndYear:f,setStartTime:J}},Nu={key:0},Iu=tt({__name:"DatePicker",props:{...kt},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:o,month:s,year:c,modelValue:d,time:P,disabledTimesConfig:v,today:m,validateTime:p,getCalendarDays:x,getMarker:A,handleArrow:R,handleScroll:M,handleSwipe:b,selectDate:S,updateMonthYear:C,presetDate:L,selectCurrentDate:U,updateTime:Y,assignMonthAndYear:N,setStartTime:re}=Su(r,a,de,f),V=Kt(),{setHoverDate:I,getDayClassData:se,clearHoverDate:ce}=Ju(d,r),{defaultedMultiCalendars:ye}=Be(r),y=K([]),D=K([]),h=K(null),H=ct(V,"calendar"),J=ct(V,"monthYear"),E=ct(V,"timePicker"),ee=Q=>{r.shadow||a("mount",Q)};yt(o,()=>{r.shadow||setTimeout(()=>{a("recalculate-position")},0)},{deep:!0}),yt(ye,(Q,te)=>{Q.count-te.count>0&&N()},{deep:!0});const O=j(()=>Q=>x(s.value(Q),c.value(Q)).map(te=>({...te,days:te.days.map(u=>(u.marker=A(u),u.classData=se(u),u))})));function de(Q){var te;Q||Q===0?(te=D.value[Q])==null||te.triggerTransition(s.value(Q),c.value(Q)):D.value.forEach((u,Z)=>u.triggerTransition(s.value(Z),c.value(Z)))}function f(){a("update-flow-step")}const k=(Q,te=!1)=>{S(Q,te),r.spaceConfirm&&a("select-date")},F=(Q,te,u=0)=>{var Z;(Z=y.value[u])==null||Z.toggleMonthPicker(Q,te)},W=(Q,te,u=0)=>{var Z;(Z=y.value[u])==null||Z.toggleYearPicker(Q,te)},l=(Q,te,u)=>{var Z;(Z=h.value)==null||Z.toggleTimePicker(Q,te,u)},_=(Q,te)=>{var u;if(!r.range){const Z=d.value?d.value:m,ae=te?new Date(te):Z,ne=Q?_t(ae,{weekStartsOn:1}):ur(ae,{weekStartsOn:1});S({value:ne,current:Pe(ae)===s.value(0),text:"",classData:{}}),(u=document.getElementById(vn(ne)))==null||u.focus()}},oe=Q=>{var te;(te=y.value[0])==null||te.handleMonthYearChange(Q,!0)},Ye=Q=>{C(0,{month:s.value(0),year:c.value(0)+(Q?1:-1),fromNav:!0})},$=(Q,te)=>{Q===rt.time&&a(`time-picker-${te?"open":"close"}`),a("overlay-toggle",{open:te,overlay:Q})},we=Q=>{a("overlay-toggle",{open:!1,overlay:Q}),a("focus-menu")};return t({clearHoverDate:ce,presetDate:L,selectCurrentDate:U,toggleMonthPicker:F,toggleYearPicker:W,toggleTimePicker:l,handleArrow:R,updateMonthYear:C,getSidebarProps:()=>({modelValue:d,month:s,year:c,time:P,updateTime:Y,updateMonthYear:C,selectDate:S,presetDate:L}),changeMonth:oe,changeYear:Ye,selectWeekDate:_,setStartTime:re}),(Q,te)=>(T(),z(ke,null,[vt(Ea,{"multi-calendars":i(ye).count,collapse:Q.collapse,"is-mobile":Q.isMobile},{default:De(({instance:u,index:Z})=>[Q.disableMonthYearSelect?G("",!0):(T(),Oe(Pu,Je({key:0,ref:ae=>{ae&&(y.value[Z]=ae)},months:i(Dr)(Q.formatLocale,Q.locale,Q.monthNameFormat),years:i(Mn)(Q.yearRange,Q.locale,Q.reverseYears),month:i(s)(u),year:i(c)(u),instance:u},Q.$props,{onMount:te[0]||(te[0]=ae=>ee(i(Qt).header)),onResetFlow:te[1]||(te[1]=ae=>Q.$emit("reset-flow")),onUpdateMonthYear:ae=>i(C)(u,ae),onOverlayClosed:we,onOverlayOpened:te[2]||(te[2]=ae=>Q.$emit("overlay-toggle",{open:!0,overlay:ae}))}),ot({_:2},[Fe(i(J),(ae,ne)=>({name:ae,fn:De(Me=>[ie(Q.$slots,ae,Ze(it(Me)))])}))]),1040,["months","years","month","year","instance","onUpdateMonthYear"])),vt(Ru,Je({ref:ae=>{ae&&(D.value[Z]=ae)},"mapped-dates":O.value(u),month:i(s)(u),year:i(c)(u),instance:u},Q.$props,{onSelectDate:ae=>i(S)(ae,u!==1),onHandleSpace:ae=>k(ae,u!==1),onSetHoverDate:te[3]||(te[3]=ae=>i(I)(ae)),onHandleScroll:ae=>i(M)(ae,u),onHandleSwipe:ae=>i(b)(ae,u),onMount:te[4]||(te[4]=ae=>ee(i(Qt).calendar)),onResetFlow:te[5]||(te[5]=ae=>Q.$emit("reset-flow")),onTooltipOpen:te[6]||(te[6]=ae=>Q.$emit("tooltip-open",ae)),onTooltipClose:te[7]||(te[7]=ae=>Q.$emit("tooltip-close",ae))}),ot({_:2},[Fe(i(H),(ae,ne)=>({name:ae,fn:De(Me=>[ie(Q.$slots,ae,Ze(it({...Me})))])}))]),1040,["mapped-dates","month","year","instance","onSelectDate","onHandleSpace","onHandleScroll","onHandleSwipe"])]),_:3},8,["multi-calendars","collapse","is-mobile"]),Q.enableTimePicker?(T(),z("div",Nu,[Q.$slots["time-picker"]?ie(Q.$slots,"time-picker",Ze(Je({key:0},{time:i(P),updateTime:i(Y)}))):(T(),Oe(Hr,Je({key:1,ref_key:"timePickerRef",ref:h},Q.$props,{hours:i(P).hours,minutes:i(P).minutes,seconds:i(P).seconds,"internal-model-value":Q.internalModelValue,"disabled-times-config":i(v),"validate-time":i(p),onMount:te[8]||(te[8]=u=>ee(i(Qt).timePicker)),"onUpdate:hours":te[9]||(te[9]=u=>i(Y)(u)),"onUpdate:minutes":te[10]||(te[10]=u=>i(Y)(u,!1)),"onUpdate:seconds":te[11]||(te[11]=u=>i(Y)(u,!1,!0)),onResetFlow:te[12]||(te[12]=u=>Q.$emit("reset-flow")),onOverlayClosed:te[13]||(te[13]=u=>$(u,!1)),onOverlayOpened:te[14]||(te[14]=u=>$(u,!0)),onAmPmChange:te[15]||(te[15]=u=>Q.$emit("am-pm-change",u))}),ot({_:2},[Fe(i(E),(u,Z)=>({name:u,fn:De(ae=>[ie(Q.$slots,u,Ze(it(ae)))])}))]),1040,["hours","minutes","seconds","internal-model-value","disabled-times-config","validate-time"]))])):G("",!0)],64))}}),Eu=(e,t)=>{const n=K(),{defaultedMultiCalendars:a,defaultedConfig:r,defaultedHighlight:o,defaultedRange:s,propDates:c,defaultedFilters:d,defaultedMultiDates:P}=Be(e),{modelValue:v,year:m,month:p,calendars:x}=Pa(e,t),{isDisabled:A}=Wt(e),{selectYear:R,groupedYears:M,showYearPicker:b,isDisabled:S,toggleYearPicker:C,handleYearSelect:L,handleYear:U}=Lr({modelValue:v,multiCalendars:a,range:s,highlight:o,calendars:x,propDates:c,month:p,year:m,filters:d,props:e,emit:t}),Y=(D,h)=>[D,h].map(H=>$t(H,"MMMM",{locale:e.formatLocale})).join("-"),N=j(()=>D=>v.value?Array.isArray(v.value)?v.value.some(h=>Vn(D,h)):Vn(v.value,D):!1),re=D=>{if(s.value.enabled){if(Array.isArray(v.value)){const h=Te(D,v.value[0])||Te(D,v.value[1]);return _a(v.value,n.value,D)&&!h}return!1}return!1},V=(D,h)=>D.quarter===In(h)&&D.year===he(h),I=D=>typeof o.value=="function"?o.value({quarter:In(D),year:he(D)}):!!o.value.quarters.find(h=>V(h,D)),se=j(()=>D=>{const h=Ne(new Date,{year:m.value(D)});return cl({start:wa(h),end:sr(h)}).map(H=>{const J=Ut(H),E=En(H),ee=A(H),O=re(J),de=I(J);return{text:Y(J,E),value:J,active:N.value(J),highlighted:de,disabled:ee,isBetween:O}})}),ce=D=>{$n(D,v,P.value.limit),t("auto-apply",!0)},ye=D=>{v.value=An(v,D,t),Fa(v.value,t,e.autoApply,e.modelAuto)},y=D=>{v.value=D,t("auto-apply")};return{defaultedConfig:r,defaultedMultiCalendars:a,groupedYears:M,year:m,isDisabled:S,quarters:se,showYearPicker:b,modelValue:v,setHoverDate:D=>{n.value=D},selectYear:R,selectQuarter:(D,h,H)=>{if(!H)return x.value[h].month=Pe(En(D)),P.value.enabled?ce(D):s.value.enabled?ye(D):y(D)},toggleYearPicker:C,handleYearSelect:L,handleYear:U}},Fu={class:"dp--quarter-items"},Bu=["data-test-id","disabled","onClick","onMouseover"],Lu=tt({compatConfig:{MODE:3},__name:"QuarterPicker",props:{...kt},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,o=Kt(),s=ct(o,"yearMode"),{defaultedMultiCalendars:c,defaultedConfig:d,groupedYears:P,year:v,isDisabled:m,quarters:p,modelValue:x,showYearPicker:A,setHoverDate:R,selectQuarter:M,toggleYearPicker:b,handleYearSelect:S,handleYear:C}=Eu(r,a);return t({getSidebarProps:()=>({modelValue:x,year:v,selectQuarter:M,handleYearSelect:S,handleYear:C})}),(L,U)=>(T(),Oe(Ea,{"multi-calendars":i(c).count,collapse:L.collapse,stretch:"","is-mobile":L.isMobile},{default:De(({instance:Y})=>[ge("div",{class:"dp-quarter-picker-wrap",style:pt({minHeight:`${i(d).modeHeight}px`})},[L.$slots["top-extra"]?ie(L.$slots,"top-extra",{key:0,value:L.internalModelValue}):G("",!0),ge("div",null,[vt(Er,Je(L.$props,{items:i(P)(Y),instance:Y,"show-year-picker":i(A)[Y],year:i(v)(Y),"is-disabled":N=>i(m)(Y,N),onHandleYear:N=>i(C)(Y,N),onYearSelect:N=>i(S)(N,Y),onToggleYearPicker:N=>i(b)(Y,N?.flow,N?.show)}),ot({_:2},[Fe(i(s),(N,re)=>({name:N,fn:De(V=>[ie(L.$slots,N,Ze(it(V)))])}))]),1040,["items","instance","show-year-picker","year","is-disabled","onHandleYear","onYearSelect","onToggleYearPicker"])]),ge("div",Fu,[(T(!0),z(ke,null,Fe(i(p)(Y),(N,re)=>(T(),z("div",{key:re},[ge("button",{type:"button",class:xe(["dp--qr-btn",{"dp--qr-btn-active":N.active,"dp--qr-btn-between":N.isBetween,"dp--qr-btn-disabled":N.disabled,"dp--highlighted":N.highlighted}]),"data-test-id":N.value,disabled:N.disabled,onClick:V=>i(M)(N.value,Y,N.disabled),onMouseover:V=>i(R)(N.value)},[L.$slots.quarter?ie(L.$slots,"quarter",{key:0,value:N.value,text:N.text}):(T(),z(ke,{key:1},[Rt(lt(N.text),1)],64))],42,Bu)]))),128))])],4)]),_:3},8,["multi-calendars","collapse","is-mobile"]))}}),Wr=(e,t)=>{const n=K(0);at(()=>{a(),window.addEventListener("resize",a,{passive:!0})}),ia(()=>{window.removeEventListener("resize",a)});const a=()=>{n.value=window.document.documentElement.clientWidth};return{isMobile:j(()=>n.value<=e.value.mobileBreakpoint&&!t?!0:void 0)}},Hu=["id","tabindex","role","aria-label"],Vu={key:0,class:"dp--menu-load-container"},Wu={key:1,class:"dp--menu-header"},zu=["data-dp-mobile"],qu={key:0,class:"dp__sidebar_left"},Uu=["data-dp-mobile"],Qu=["data-test-id","data-dp-mobile","onClick","onKeydown"],ju={key:2,class:"dp__sidebar_right"},Gu={key:3,class:"dp__action_extra"},Zn=tt({compatConfig:{MODE:3},__name:"DatepickerMenu",props:{...Ia,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","menu-blur"],setup(e,{expose:t,emit:n}){const a=n,r=e,o=K(null),s=j(()=>{const{openOnTop:g,...le}=r;return{...le,isMobile:M.value,flowStep:ye.value,menuWrapRef:o.value}}),{setMenuFocused:c,setShiftKey:d,control:P}=Ir(),v=Kt(),{defaultedTextInput:m,defaultedInline:p,defaultedConfig:x,defaultedUI:A,handleEventPropagation:R}=Be(r),{isMobile:M}=Wr(x,r.shadow),b=K(null),S=K(0),C=K(null),L=K(!1),U=K(null),Y=K(!1),N=g=>{Y.value=!0,x.value.allowPreventDefault&&g.preventDefault(),Bt(g,x.value,!0)};at(()=>{if(!r.shadow){L.value=!0,re(),window.addEventListener("resize",re);const g=je(o);g&&!m.value.enabled&&!p.value.enabled&&(c(!0),ee()),g&&(g.addEventListener("pointerdown",N),g.addEventListener("mousedown",N))}document.addEventListener("mousedown",We)}),ia(()=>{window.removeEventListener("resize",re),document.removeEventListener("mousedown",We);const g=je(o);g&&(g.removeEventListener("pointerdown",N),g.removeEventListener("mousedown",N))});const re=()=>{const g=je(C);g&&(S.value=g.getBoundingClientRect().width)},{arrowRight:V,arrowLeft:I,arrowDown:se,arrowUp:ce}=Vt(),{flowStep:ye,updateFlowStep:y,childMount:D,resetFlow:h,handleFlow:H}=ei(r,a,U),J=j(()=>r.monthPicker?ru:r.yearPicker?ou:r.timePicker?bu:r.quarterPicker?Lu:Iu),E=j(()=>{var g;if(x.value.arrowLeft)return x.value.arrowLeft;const le=(g=o.value)==null?void 0:g.getBoundingClientRect(),$e=r.getInputRect();return $e?.width=(le?.right??0)&&$e?.width{const g=je(o);g&&g.focus({preventScroll:!0})},O=j(()=>{var g;return((g=U.value)==null?void 0:g.getSidebarProps())||{}}),de=()=>{r.openOnTop&&a("recalculate-position")},f=ct(v,"action"),k=j(()=>r.monthPicker||r.yearPicker?ct(v,"monthYear"):r.timePicker?ct(v,"timePicker"):ct(v,"shared")),F=j(()=>r.openOnTop?"dp__arrow_bottom":"dp__arrow_top"),W=j(()=>({dp__menu_disabled:r.disabled,dp__menu_readonly:r.readonly,"dp-menu-loading":r.loading})),l=j(()=>({dp__menu:!0,dp__menu_index:!p.value.enabled,dp__relative:p.value.enabled,...A.value.menu??{}})),_=g=>{Bt(g,x.value,!0)},oe=g=>{r.escClose&&(a("close-picker"),R(g))},Ye=g=>{if(r.arrowNavigation){if(g===st.up)return ce();if(g===st.down)return se();if(g===st.left)return I();if(g===st.right)return V()}else g===st.left||g===st.up?u("handleArrow",st.left,0,g===st.up):u("handleArrow",st.right,0,g===st.down)},$=g=>{d(g.shiftKey),!r.disableMonthYearSelect&&g.code===Ee.tab&&g.target.classList.contains("dp__menu")&&P.value.shiftKeyInMenu&&(g.preventDefault(),Bt(g,x.value,!0),a("close-picker"))},we=()=>{ee(),a("time-picker-close")},Q=g=>{var le,$e,Ge;(le=U.value)==null||le.toggleTimePicker(!1,!1),($e=U.value)==null||$e.toggleMonthPicker(!1,!1,g),(Ge=U.value)==null||Ge.toggleYearPicker(!1,!1,g)},te=(g,le=0)=>{var $e,Ge,Dt;return g==="month"?($e=U.value)==null?void 0:$e.toggleMonthPicker(!1,!0,le):g==="year"?(Ge=U.value)==null?void 0:Ge.toggleYearPicker(!1,!0,le):g==="time"?(Dt=U.value)==null?void 0:Dt.toggleTimePicker(!0,!1):Q(le)},u=(g,...le)=>{var $e,Ge;($e=U.value)!=null&&$e[g]&&((Ge=U.value)==null||Ge[g](...le))},Z=()=>{u("selectCurrentDate")},ae=(g,le)=>{u("presetDate",Gr(g),le)},ne=()=>{u("clearHoverDate")},Me=(g,le)=>{u("updateMonthYear",g,le)},be=(g,le)=>{g.preventDefault(),Ye(le)},Ce=g=>{var le,$e,Ge;if($(g),g.key===Ee.home||g.key===Ee.end)return u("selectWeekDate",g.key===Ee.home,g.target.getAttribute("id"));switch((g.key===Ee.pageUp||g.key===Ee.pageDown)&&(g.shiftKey?(u("changeYear",g.key===Ee.pageUp),(le=dn(o.value,"overlay-year"))==null||le.focus()):(u("changeMonth",g.key===Ee.pageUp),($e=dn(o.value,g.key===Ee.pageUp?"action-prev":"action-next"))==null||$e.focus()),g.target.getAttribute("id")&&((Ge=o.value)==null||Ge.focus({preventScroll:!0}))),g.key){case Ee.esc:return oe(g);case Ee.arrowLeft:return be(g,st.left);case Ee.arrowRight:return be(g,st.right);case Ee.arrowUp:return be(g,st.up);case Ee.arrowDown:return be(g,st.down);default:return}},We=g=>{var le;p.value.enabled&&!p.value.input&&!((le=o.value)!=null&&le.contains(g.target))&&Y.value&&(Y.value=!1,a("menu-blur"))};return t({updateMonthYear:Me,switchView:te,handleFlow:H,onValueCleared:()=>{var g,le;(le=(g=U.value)==null?void 0:g.setStartTime)==null||le.call(g)}}),(g,le)=>{var $e,Ge,Dt;return T(),z("div",{id:g.uid?`dp-menu-${g.uid}`:void 0,ref_key:"dpMenuRef",ref:o,tabindex:i(p).enabled?void 0:"0",role:i(p).enabled?void 0:"dialog","aria-label":($e=g.ariaLabels)==null?void 0:$e.menu,class:xe(l.value),style:pt({"--dp-arrow-left":E.value}),onMouseleave:ne,onClick:_,onKeydown:Ce},[(g.disabled||g.readonly)&&i(p).enabled||g.loading?(T(),z("div",{key:0,class:xe(W.value)},[g.loading?(T(),z("div",Vu,le[19]||(le[19]=[ge("span",{class:"dp--menu-loader"},null,-1)]))):G("",!0)],2)):G("",!0),g.$slots["menu-header"]?(T(),z("div",Wu,[ie(g.$slots,"menu-header")])):G("",!0),!i(p).enabled&&!g.teleportCenter?(T(),z("div",{key:2,class:xe(F.value)},null,2)):G("",!0),ge("div",{ref_key:"innerMenuRef",ref:C,class:xe({dp__menu_content_wrapper:((Ge=g.presetDates)==null?void 0:Ge.length)||!!g.$slots["left-sidebar"]||!!g.$slots["right-sidebar"],"dp--menu-content-wrapper-collapsed":e.collapse&&(((Dt=g.presetDates)==null?void 0:Dt.length)||!!g.$slots["left-sidebar"]||!!g.$slots["right-sidebar"])}),"data-dp-mobile":i(M),style:pt({"--dp-menu-width":`${S.value}px`})},[g.$slots["left-sidebar"]?(T(),z("div",qu,[ie(g.$slots,"left-sidebar",Ze(it(O.value)))])):G("",!0),g.presetDates.length?(T(),z("div",{key:1,class:xe({"dp--preset-dates-collapsed":e.collapse,"dp--preset-dates":!0}),"data-dp-mobile":i(M)},[(T(!0),z(ke,null,Fe(g.presetDates,(ve,Ke)=>(T(),z(ke,{key:Ke},[ve.slot?ie(g.$slots,ve.slot,{key:0,presetDate:ae,label:ve.label,value:ve.value}):(T(),z("button",{key:1,type:"button",style:pt(ve.style||{}),class:xe(["dp__btn dp--preset-range",{"dp--preset-range-collapsed":e.collapse}]),"data-test-id":ve.testId??void 0,"data-dp-mobile":i(M),onClick:ga(xt=>ae(ve.value,ve.noTz),["prevent"]),onKeydown:xt=>i(ut)(xt,()=>ae(ve.value,ve.noTz),!0)},lt(ve.label),47,Qu))],64))),128))],10,Uu)):G("",!0),ge("div",{ref_key:"calendarWrapperRef",ref:b,class:"dp__instance_calendar",role:"document"},[(T(),Oe(Na(J.value),Je({ref_key:"dynCmpRef",ref:U},s.value,{"flow-step":i(ye),onMount:i(D),onUpdateFlowStep:i(y),onResetFlow:i(h),onFocusMenu:ee,onSelectDate:le[0]||(le[0]=ve=>g.$emit("select-date")),onDateUpdate:le[1]||(le[1]=ve=>g.$emit("date-update",ve)),onTooltipOpen:le[2]||(le[2]=ve=>g.$emit("tooltip-open",ve)),onTooltipClose:le[3]||(le[3]=ve=>g.$emit("tooltip-close",ve)),onAutoApply:le[4]||(le[4]=ve=>g.$emit("auto-apply",ve)),onRangeStart:le[5]||(le[5]=ve=>g.$emit("range-start",ve)),onRangeEnd:le[6]||(le[6]=ve=>g.$emit("range-end",ve)),onInvalidFixedRange:le[7]||(le[7]=ve=>g.$emit("invalid-fixed-range",ve)),onTimeUpdate:le[8]||(le[8]=ve=>g.$emit("time-update")),onAmPmChange:le[9]||(le[9]=ve=>g.$emit("am-pm-change",ve)),onTimePickerOpen:le[10]||(le[10]=ve=>g.$emit("time-picker-open",ve)),onTimePickerClose:we,onRecalculatePosition:de,onUpdateMonthYear:le[11]||(le[11]=ve=>g.$emit("update-month-year",ve)),onAutoApplyInvalid:le[12]||(le[12]=ve=>g.$emit("auto-apply-invalid",ve)),onInvalidDate:le[13]||(le[13]=ve=>g.$emit("invalid-date",ve)),onOverlayToggle:le[14]||(le[14]=ve=>g.$emit("overlay-toggle",ve)),"onUpdate:internalModelValue":le[15]||(le[15]=ve=>g.$emit("update:internal-model-value",ve))}),ot({_:2},[Fe(k.value,(ve,Ke)=>({name:ve,fn:De(xt=>[ie(g.$slots,ve,Ze(it({...xt})))])}))]),1040,["flow-step","onMount","onUpdateFlowStep","onResetFlow"]))],512),g.$slots["right-sidebar"]?(T(),z("div",ju,[ie(g.$slots,"right-sidebar",Ze(it(O.value)))])):G("",!0),g.$slots["action-extra"]?(T(),z("div",Gu,[g.$slots["action-extra"]?ie(g.$slots,"action-extra",{key:0,selectCurrentDate:Z}):G("",!0)])):G("",!0)],14,zu),!g.autoApply||i(x).keepActionRow?(T(),Oe(Gs,Je({key:3,"menu-mount":L.value},s.value,{"calendar-width":S.value,onClosePicker:le[16]||(le[16]=ve=>g.$emit("close-picker")),onSelectDate:le[17]||(le[17]=ve=>g.$emit("select-date")),onInvalidSelect:le[18]||(le[18]=ve=>g.$emit("invalid-select")),onSelectNow:Z}),ot({_:2},[Fe(i(f),(ve,Ke)=>({name:ve,fn:De(xt=>[ie(g.$slots,ve,Ze(it({...xt})))])}))]),1040,["menu-mount","calendar-width"])):G("",!0)],46,Hu)}}});var ea=(e=>(e.center="center",e.left="left",e.right="right",e))(ea||{});const Ku=({menuRef:e,menuRefInner:t,inputRef:n,pickerWrapperRef:a,inline:r,emit:o,props:s,slots:c})=>{const{defaultedConfig:d}=Be(s),P=K({}),v=K(!1),m=K({top:"0",left:"0"}),p=K(!1),x=ha(s,"teleportCenter");yt(x,()=>{m.value=JSON.parse(JSON.stringify({})),U()});const A=h=>{if(s.teleport){const H=h.getBoundingClientRect();return{left:H.left+window.scrollX,top:H.top+window.scrollY}}return{top:0,left:0}},R=(h,H)=>{m.value.left=`${h+H-P.value.width}px`},M=h=>{m.value.left=`${h}px`},b=(h,H)=>{s.position===ea.left&&M(h),s.position===ea.right&&R(h,H),s.position===ea.center&&(m.value.left=`${h+H/2-P.value.width/2}px`)},S=h=>{const{width:H,height:J}=h.getBoundingClientRect(),{top:E,left:ee}=A(h);return{top:+E,left:+ee,width:H,height:J}},C=()=>{m.value.left="50%",m.value.top="50%",m.value.transform="translate(-50%, -50%)",m.value.position="fixed",delete m.value.opacity},L=()=>{const h=je(n);m.value=s.altPosition(h)},U=(h=!0)=>{var H;if(!r.value.enabled){if(x.value)return C();if(s.altPosition!==null)return L();if(h){const J=s.teleport?(H=t.value)==null?void 0:H.$el:e.value;J&&(P.value=J.getBoundingClientRect()),o("recalculate-position")}return ce()}},Y=({inputEl:h,left:H,width:J})=>{window.screen.width>768&&!v.value&&b(H,J),V(h)},N=h=>{const{top:H,left:J,height:E,width:ee}=S(h);m.value.top=`${E+H+ +s.offset}px`,p.value=!1,v.value||(m.value.left=`${J+ee/2-P.value.width/2}px`),Y({inputEl:h,left:J,width:ee})},re=h=>{const{top:H,left:J,width:E}=S(h);m.value.top=`${H-+s.offset-P.value.height}px`,p.value=!0,Y({inputEl:h,left:J,width:E})},V=h=>{if(s.autoPosition){const{left:H,width:J}=S(h),{left:E,right:ee}=P.value;if(!v.value){if(Math.abs(E)!==Math.abs(ee)){if(E<=0)return v.value=!0,M(H);if(ee>=document.documentElement.clientWidth)return v.value=!0,R(H,J)}return b(H,J)}}},I=()=>{const h=je(n);if(h){if(s.autoPosition===gt.top)return gt.top;if(s.autoPosition===gt.bottom)return gt.bottom;const{height:H}=P.value,{top:J,height:E}=h.getBoundingClientRect(),ee=window.innerHeight-J-E,O=J;return H<=ee?gt.bottom:H>ee&&H<=O?gt.top:ee>=O?gt.bottom:gt.top}return gt.bottom},se=h=>I()===gt.bottom?N(h):re(h),ce=()=>{const h=je(n);if(h)return s.autoPosition?se(h):N(h)},ye=function(h){if(h){const H=h.scrollHeight>h.clientHeight,J=window.getComputedStyle(h).overflowY.indexOf("hidden")!==-1;return H&&!J}return!0},y=function(h){return!h||h===document.body||h.nodeType===Node.DOCUMENT_FRAGMENT_NODE?window:ye(h)?h:y(h.assignedSlot&&d.value.shadowDom?h.assignedSlot.parentNode:h.parentNode)},D=h=>{if(h)switch(s.position){case ea.left:return{left:0,transform:"translateX(0)"};case ea.right:return{left:`${h.width}px`,transform:"translateX(-100%)"};default:return{left:`${h.width/2}px`,transform:"translateX(-50%)"}}return{}};return{openOnTop:p,menuStyle:m,xCorrect:v,setMenuPosition:U,getScrollableParent:y,shadowRender:(h,H,J)=>{var E,ee,O;const de=document.createElement("div"),f=(E=je(n))==null?void 0:E.getBoundingClientRect();de.setAttribute("id","dp--temp-container");const k=(ee=a.value)!=null&&ee.clientWidth?a.value:document.body;k.append(de);const F=D(f),W=d.value.shadowDom?Object.keys(c).filter(_=>["right-sidebar","left-sidebar","top-extra","action-extra"].includes(_)):Object.keys(c),l=jr(H,{...J,shadow:!0,style:{opacity:0,position:"absolute",...F}},Object.fromEntries(W.map(_=>[_,c[_]])));h!=null&&(l.appContext=h.appContext),Cn(l,de),P.value=(O=l.el)==null?void 0:O.getBoundingClientRect(),Cn(null,de),k.removeChild(de)}}},Et=[{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"]}],Xu=[{name:"trigger"},{name:"input-icon"},{name:"clear-icon"},{name:"dp-input"}],Zu={all:()=>Et,monthYear:()=>Et.filter(e=>e.use.includes("month-year")),input:()=>Xu,timePicker:()=>Et.filter(e=>e.use.includes("time")),action:()=>Et.filter(e=>e.use.includes("action")),calendar:()=>Et.filter(e=>e.use.includes("calendar")),menu:()=>Et.filter(e=>e.use.includes("menu")),shared:()=>Et.filter(e=>e.use.includes("shared")),yearMode:()=>Et.filter(e=>e.use.includes("year-mode"))},ct=(e,t,n)=>{const a=[];return Zu[t]().forEach(r=>{e[r.name]&&a.push(r.name)}),n!=null&&n.length&&n.forEach(r=>{r.slot&&a.push(r.slot)}),a},Ma=e=>{const t=j(()=>a=>e.value?a?e.value.open:e.value.close:""),n=j(()=>a=>e.value?a?e.value.menuAppearTop:e.value.menuAppearBottom:"");return{transitionName:t,showTransition:!!e.value,menuTransition:n}},Pa=(e,t,n)=>{const{defaultedRange:a,defaultedTz:r}=Be(e),o=q(dt(q(),r.value.timezone)),s=K([{month:Pe(o),year:he(o)}]),c=p=>{const x={hours:St(o),minutes:Ht(o),seconds:0};return a.value.enabled?[x[p],x[p]]:x[p]},d=ka({hours:c("hours"),minutes:c("minutes"),seconds:c("seconds")});yt(a,(p,x)=>{p.enabled!==x.enabled&&(d.hours=c("hours"),d.minutes=c("minutes"),d.seconds=c("seconds"))},{deep:!0});const P=j({get:()=>e.internalModelValue,set:p=>{!e.readonly&&!e.disabled&&t("update:internal-model-value",p)}}),v=j(()=>p=>s.value[p]?s.value[p].month:0),m=j(()=>p=>s.value[p]?s.value[p].year:0);return yt(P,(p,x)=>{n&&JSON.stringify(p??{})!==JSON.stringify(x??{})&&n()},{deep:!0}),{calendars:s,time:d,modelValue:P,month:v,year:m,today:o}},Ju=(e,t)=>{const{defaultedMultiCalendars:n,defaultedMultiDates:a,defaultedUI:r,defaultedHighlight:o,defaultedTz:s,propDates:c,defaultedRange:d}=Be(t),{isDisabled:P}=Wt(t),v=K(null),m=K(dt(new Date,s.value.timezone)),p=l=>{!l.current&&t.hideOffsetDates||(v.value=l.value)},x=()=>{v.value=null},A=l=>Array.isArray(e.value)&&d.value.enabled&&e.value[0]&&v.value?l?qe(v.value,e.value[0]):He(v.value,e.value[0]):!0,R=(l,_)=>{const oe=()=>e.value?_?e.value[0]||null:e.value[1]:null,Ye=e.value&&Array.isArray(e.value)?oe():null;return Te(q(l.value),Ye)},M=l=>{const _=Array.isArray(e.value)?e.value[0]:null;return l?!He(v.value??null,_):!0},b=(l,_=!0)=>(d.value.enabled||t.weekPicker)&&Array.isArray(e.value)&&e.value.length===2?t.hideOffsetDates&&!l.current?!1:Te(q(l.value),e.value[_?0:1]):d.value.enabled?R(l,_)&&M(_)||Te(l.value,Array.isArray(e.value)?e.value[0]:null)&&A(_):!1,S=(l,_)=>{if(Array.isArray(e.value)&&e.value[0]&&e.value.length===1){const oe=Te(l.value,v.value);return _?qe(e.value[0],l.value)&&oe:He(e.value[0],l.value)&&oe}return!1},C=l=>!e.value||t.hideOffsetDates&&!l.current?!1:d.value.enabled?t.modelAuto&&Array.isArray(e.value)?Te(l.value,e.value[0]?e.value[0]:m.value):!1:a.value.enabled&&Array.isArray(e.value)?e.value.some(_=>Te(_,l.value)):Te(l.value,e.value?e.value:m.value),L=l=>{if(d.value.autoRange||t.weekPicker){if(v.value){if(t.hideOffsetDates&&!l.current)return!1;const _=ft(v.value,+d.value.autoRange),oe=Yt(q(v.value),t.weekStart);return t.weekPicker?Te(oe[1],q(l.value)):Te(_,q(l.value))}return!1}return!1},U=l=>{if(d.value.autoRange||t.weekPicker){if(v.value){const _=ft(v.value,+d.value.autoRange);if(t.hideOffsetDates&&!l.current)return!1;const oe=Yt(q(v.value),t.weekStart);return t.weekPicker?qe(l.value,oe[0])&&He(l.value,oe[1]):qe(l.value,v.value)&&He(l.value,_)}return!1}return!1},Y=l=>{if(d.value.autoRange||t.weekPicker){if(v.value){if(t.hideOffsetDates&&!l.current)return!1;const _=Yt(q(v.value),t.weekStart);return t.weekPicker?Te(_[0],l.value):Te(v.value,l.value)}return!1}return!1},N=l=>_a(e.value,v.value,l.value),re=()=>t.modelAuto&&Array.isArray(t.internalModelValue)?!!t.internalModelValue[0]:!1,V=()=>t.modelAuto?xr(t.internalModelValue):!0,I=l=>{if(t.weekPicker)return!1;const _=d.value.enabled?!b(l)&&!b(l,!1):!0;return!P(l.value)&&!C(l)&&!(!l.current&&t.hideOffsetDates)&&_},se=l=>d.value.enabled?t.modelAuto?re()&&C(l):!1:C(l),ce=l=>o.value?gs(l.value,c.value.highlight):!1,ye=l=>{const _=P(l.value);return _&&(typeof o.value=="function"?!o.value(l.value,_):!o.value.options.highlightDisabled)},y=l=>{var _;return typeof o.value=="function"?o.value(l.value):(_=o.value.weekdays)==null?void 0:_.includes(l.value.getDay())},D=l=>(d.value.enabled||t.weekPicker)&&(!(n.value.count>0)||l.current)&&V()&&!(!l.current&&t.hideOffsetDates)&&!C(l)?N(l):!1,h=l=>{if(Array.isArray(e.value)&&e.value.length===1){const{before:_,after:oe}=jn(+d.value.maxRange,e.value[0]);return la(l.value,_)||Gt(l.value,oe)}return!1},H=l=>{if(Array.isArray(e.value)&&e.value.length===1){const{before:_,after:oe}=jn(+d.value.minRange,e.value[0]);return _a([_,oe],e.value[0],l.value)}return!1},J=l=>d.value.enabled&&(d.value.maxRange||d.value.minRange)?d.value.maxRange&&d.value.minRange?h(l)||H(l):d.value.maxRange?h(l):H(l):!1,E=l=>{const{isRangeStart:_,isRangeEnd:oe}=f(l),Ye=d.value.enabled?_||oe:!1;return{dp__cell_offset:!l.current,dp__pointer:!t.disabled&&!(!l.current&&t.hideOffsetDates)&&!P(l.value)&&!J(l),dp__cell_disabled:P(l.value)||J(l),dp__cell_highlight:!ye(l)&&(ce(l)||y(l))&&!se(l)&&!Ye&&!Y(l)&&!(D(l)&&t.weekPicker)&&!oe,dp__cell_highlight_active:!ye(l)&&(ce(l)||y(l))&&se(l),dp__today:!t.noToday&&Te(l.value,m.value)&&l.current,"dp--past":He(l.value,m.value),"dp--future":qe(l.value,m.value)}},ee=l=>({dp__active_date:se(l),dp__date_hover:I(l)}),O=l=>{if(e.value&&!Array.isArray(e.value)){const _=Yt(e.value,t.weekStart);return{...F(l),dp__range_start:Te(_[0],l.value),dp__range_end:Te(_[1],l.value),dp__range_between_week:qe(l.value,_[0])&&He(l.value,_[1])}}return{...F(l)}},de=l=>{if(e.value&&Array.isArray(e.value)){const _=Yt(e.value[0],t.weekStart),oe=e.value[1]?Yt(e.value[1],t.weekStart):[];return{...F(l),dp__range_start:Te(_[0],l.value)||Te(oe[0],l.value),dp__range_end:Te(_[1],l.value)||Te(oe[1],l.value),dp__range_between_week:qe(l.value,_[0])&&He(l.value,_[1])||qe(l.value,oe[0])&&He(l.value,oe[1]),dp__range_between:qe(l.value,_[1])&&He(l.value,oe[0])}}return{...F(l)}},f=l=>{const _=n.value.count>0?l.current&&b(l)&&V():b(l)&&V(),oe=n.value.count>0?l.current&&b(l,!1)&&V():b(l,!1)&&V();return{isRangeStart:_,isRangeEnd:oe}},k=l=>{const{isRangeStart:_,isRangeEnd:oe}=f(l);return{dp__range_start:_,dp__range_end:oe,dp__range_between:D(l),dp__date_hover:Te(l.value,v.value)&&!_&&!oe&&!t.weekPicker,dp__date_hover_start:S(l,!0),dp__date_hover_end:S(l,!1)}},F=l=>({...k(l),dp__cell_auto_range:U(l),dp__cell_auto_range_start:Y(l),dp__cell_auto_range_end:L(l)}),W=l=>d.value.enabled?d.value.autoRange?F(l):t.modelAuto?{...ee(l),...k(l)}:t.weekPicker?de(l):k(l):t.weekPicker?O(l):ee(l);return{setHoverDate:p,clearHoverDate:x,getDayClassData:l=>t.hideOffsetDates&&!l.current?{}:{...E(l),...W(l),[t.dayClass?t.dayClass(l.value,t.internalModelValue):""]:!0,...r.value.calendarCell??{}}}},Wt=e=>{const{defaultedFilters:t,defaultedRange:n,propDates:a,defaultedMultiDates:r}=Be(e),o=y=>a.value.disabledDates?typeof a.value.disabledDates=="function"?a.value.disabledDates(q(y)):!!Sa(y,a.value.disabledDates):!1,s=y=>a.value.maxDate?e.yearPicker?he(y)>he(a.value.maxDate):qe(y,a.value.maxDate):!1,c=y=>a.value.minDate?e.yearPicker?he(y){const D=s(y),h=c(y),H=o(y),J=t.value.months.map(f=>+f).includes(Pe(y)),E=e.disabledWeekDays.length?e.disabledWeekDays.some(f=>+f===ro(y)):!1,ee=x(y),O=he(y),de=O<+e.yearRange[0]||O>+e.yearRange[1];return!(D||h||H||J||de||E||ee)},P=(y,D)=>He(...Ft(a.value.minDate,y,D))||Te(...Ft(a.value.minDate,y,D)),v=(y,D)=>qe(...Ft(a.value.maxDate,y,D))||Te(...Ft(a.value.maxDate,y,D)),m=(y,D,h)=>{let H=!1;return a.value.maxDate&&h&&v(y,D)&&(H=!0),a.value.minDate&&!h&&P(y,D)&&(H=!0),H},p=(y,D,h,H)=>{let J=!1;return H&&(a.value.minDate||a.value.maxDate)?a.value.minDate&&a.value.maxDate?J=m(y,D,h):(a.value.minDate&&P(y,D)||a.value.maxDate&&v(y,D))&&(J=!0):J=!0,J},x=y=>Array.isArray(a.value.allowedDates)&&!a.value.allowedDates.length?!0:a.value.allowedDates?!Sa(y,a.value.allowedDates,Tr(e.monthPicker,e.yearPicker)):!1,A=y=>!d(y),R=y=>n.value.noDisabledRange?!or({start:y[0],end:y[1]}).some(D=>A(D)):!0,M=y=>{if(y){const D=he(y);return D>=+e.yearRange[0]&&D<=e.yearRange[1]}return!0},b=(y,D)=>!!(Array.isArray(y)&&y[D]&&(n.value.maxRange||n.value.minRange)&&M(y[D])),S=(y,D,h=0)=>{if(b(D,h)&&M(y)){const H=nr(y,D[h]),J=Yr(D[h],y),E=J.length===1?0:J.filter(O=>A(O)).length,ee=Math.abs(H)-(n.value.minMaxRawRange?0:E);if(n.value.minRange&&n.value.maxRange)return ee>=+n.value.minRange&&ee<=+n.value.maxRange;if(n.value.minRange)return ee>=+n.value.minRange;if(n.value.maxRange)return ee<=+n.value.maxRange}return!0},C=()=>!e.enableTimePicker||e.monthPicker||e.yearPicker||e.ignoreTimeValidation,L=y=>Array.isArray(y)?[y[0]?Za(y[0]):null,y[1]?Za(y[1]):null]:Za(y),U=(y,D,h)=>y.find(H=>+H.hours===St(D)&&H.minutes==="*"?!0:+H.minutes===Ht(D)&&+H.hours===St(D))&&h,Y=(y,D,h)=>{const[H,J]=y,[E,ee]=D;return!U(H,E,h)&&!U(J,ee,h)&&h},N=(y,D)=>{const h=Array.isArray(D)?D:[D];return Array.isArray(e.disabledTimes)?Array.isArray(e.disabledTimes[0])?Y(e.disabledTimes,h,y):!h.some(H=>U(e.disabledTimes,H,y)):y},re=(y,D)=>{const h=Array.isArray(D)?[jt(D[0]),D[1]?jt(D[1]):void 0]:jt(D),H=!e.disabledTimes(h);return y&&H},V=(y,D)=>e.disabledTimes?Array.isArray(e.disabledTimes)?N(D,y):re(D,y):D,I=y=>{let D=!0;if(!y||C())return!0;const h=!a.value.minDate&&!a.value.maxDate?L(y):y;return(e.maxTime||a.value.maxDate)&&(D=Qn(e.maxTime,a.value.maxDate,"max",Xe(h),D)),(e.minTime||a.value.minDate)&&(D=Qn(e.minTime,a.value.minDate,"min",Xe(h),D)),V(y,D)},se=y=>{if(!e.monthPicker)return!0;let D=!0;const h=q(wt(y));if(a.value.minDate&&a.value.maxDate){const H=q(wt(a.value.minDate)),J=q(wt(a.value.maxDate));return qe(h,H)&&He(h,J)||Te(h,H)||Te(h,J)}if(a.value.minDate){const H=q(wt(a.value.minDate));D=qe(h,H)||Te(h,H)}if(a.value.maxDate){const H=q(wt(a.value.maxDate));D=He(h,H)||Te(h,H)}return D},ce=j(()=>y=>!e.enableTimePicker||e.ignoreTimeValidation?!0:I(y)),ye=j(()=>y=>e.monthPicker?Array.isArray(y)&&(n.value.enabled||r.value.enabled)?!y.filter(D=>!se(D)).length:se(y):!0);return{isDisabled:A,validateDate:d,validateMonthYearInRange:p,isDateRangeAllowed:R,checkMinMaxRange:S,isValidTime:I,isTimeValid:ce,isMonthValid:ye}},Ba=()=>{const e=j(()=>(a,r)=>a?.includes(r)),t=j(()=>(a,r)=>a.count?a.solo?!0:r===0:!0),n=j(()=>(a,r)=>a.count?a.solo?!0:r===a.count-1:!0);return{hideNavigationButtons:e,showLeftIcon:t,showRightIcon:n}},ei=(e,t,n)=>{const a=K(0),r=ka({[Qt.timePicker]:!e.enableTimePicker||e.timePicker||e.monthPicker,[Qt.calendar]:!1,[Qt.header]:!1}),o=j(()=>e.monthPicker||e.timePicker),s=m=>{var p;if((p=e.flow)!=null&&p.length){if(!m&&o.value)return v();r[m]=!0,Object.keys(r).filter(x=>!r[x]).length||v()}},c=()=>{var m,p;(m=e.flow)!=null&&m.length&&a.value!==-1&&(a.value+=1,t("flow-step",a.value),v()),((p=e.flow)==null?void 0:p.length)===a.value&&mt().then(()=>d())},d=()=>{a.value=-1},P=(m,p,...x)=>{var A,R;e.flow[a.value]===m&&n.value&&((R=(A=n.value)[p])==null||R.call(A,...x))},v=(m=0)=>{m&&(a.value+=m),P(rt.month,"toggleMonthPicker",!0),P(rt.year,"toggleYearPicker",!0),P(rt.calendar,"toggleTimePicker",!1,!0),P(rt.time,"toggleTimePicker",!0,!0);const p=e.flow[a.value];(p===rt.hours||p===rt.minutes||p===rt.seconds)&&P(p,"toggleTimePicker",!0,!0,p)};return{childMount:s,updateFlowStep:c,resetFlow:d,handleFlow:v,flowStep:a}},ti={key:1,class:"dp__input_wrap"},ai=["id","name","inputmode","placeholder","disabled","readonly","required","value","autocomplete","aria-label","aria-disabled","aria-invalid"],ni={key:2,class:"dp--clear-btn"},ri=["aria-label"],li=tt({compatConfig:{MODE:3},__name:"DatepickerInput",props:{isMenuOpen:{type:Boolean,default:!1},inputValue:{type:String,default:""},...Ia},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:o,defaultedAriaLabels:s,defaultedInline:c,defaultedConfig:d,defaultedRange:P,defaultedMultiDates:v,defaultedUI:m,getDefaultPattern:p,getDefaultStartTime:x}=Be(r),{checkMinMaxRange:A}=Wt(r),R=K(),M=K(null),b=K(!1),S=K(!1),C=j(()=>({dp__pointer:!r.disabled&&!r.readonly&&!o.value.enabled,dp__disabled:r.disabled,dp__input_readonly:!o.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:b.value||r.isMenuOpen,dp__input_reg:!o.value.enabled,...m.value.input??{}})),L=()=>{a("set-input-date",null),r.clearable&&r.autoApply&&(a("set-empty-date"),R.value=null)},U=O=>{const de=x();return bs(O,o.value.format??p(),de??Cr({},r.enableSeconds),r.inputValue,S.value,r.formatLocale)},Y=O=>{const{rangeSeparator:de}=o.value,[f,k]=O.split(`${de}`);if(f){const F=U(f.trim()),W=k?U(k.trim()):void 0;if(Gt(F,W))return;const l=F&&W?[F,W]:[F];A(W,l,0)&&(R.value=F?l:null)}},N=()=>{S.value=!0},re=O=>{if(P.value.enabled)Y(O);else if(v.value.enabled){const de=O.split(";");R.value=de.map(f=>U(f.trim())).filter(f=>f)}else R.value=U(O)},V=O=>{var de;const f=typeof O=="string"?O:(de=O.target)==null?void 0:de.value;f!==""?(o.value.openMenu&&!r.isMenuOpen&&a("open"),re(f),a("set-input-date",R.value)):L(),S.value=!1,a("update:input-value",f),a("text-input",O,R.value)},I=O=>{o.value.enabled?(re(O.target.value),o.value.enterSubmit&&cn(R.value)&&r.inputValue!==""?(a("set-input-date",R.value,!0),R.value=null):o.value.enterSubmit&&r.inputValue===""&&(R.value=null,a("clear"))):ye(O)},se=(O,de)=>{o.value.enabled&&o.value.tabSubmit&&!de&&re(O.target.value),o.value.tabSubmit&&cn(R.value)&&r.inputValue!==""?(a("set-input-date",R.value,!0,!0),R.value=null):o.value.tabSubmit&&r.inputValue===""&&(R.value=null,a("clear",!0))},ce=()=>{b.value=!0,a("focus"),mt().then(()=>{var O;o.value.enabled&&o.value.selectOnFocus&&((O=M.value)==null||O.select())})},ye=O=>{if(Bt(O,d.value,!0),o.value.enabled&&o.value.openMenu&&!c.value.input){if(o.value.openMenu==="open"&&!r.isMenuOpen)return a("open");if(o.value.openMenu==="toggle")return a("toggle")}else o.value.enabled||a("toggle")},y=()=>{a("real-blur"),b.value=!1,(!r.isMenuOpen||c.value.enabled&&c.value.input)&&a("blur"),r.autoApply&&o.value.enabled&&R.value&&!r.isMenuOpen&&(a("set-input-date",R.value),a("select-date"),R.value=null)},D=O=>{Bt(O,d.value,!0),a("clear")},h=()=>{a("close")},H=O=>{if(O.key==="Tab"&&se(O),O.key==="Enter"&&I(O),O.key==="Escape"&&o.value.escClose&&h(),!o.value.enabled){if(O.code==="Tab")return;O.preventDefault()}},J=()=>{var O;(O=M.value)==null||O.focus({preventScroll:!0})},E=O=>{R.value=O},ee=O=>{O.key===Ee.tab&&se(O,!0)};return t({focusInput:J,setParsedDate:E}),(O,de)=>{var f,k,F;return T(),z("div",{onClick:ye},[O.$slots.trigger&&!O.$slots["dp-input"]&&!i(c).enabled?ie(O.$slots,"trigger",{key:0}):G("",!0),!O.$slots.trigger&&(!i(c).enabled||i(c).input)?(T(),z("div",ti,[O.$slots["dp-input"]&&!O.$slots.trigger&&(!i(c).enabled||i(c).enabled&&i(c).input)?ie(O.$slots,"dp-input",{key:0,value:e.inputValue,isMenuOpen:e.isMenuOpen,onInput:V,onEnter:I,onTab:se,onClear:D,onBlur:y,onKeypress:H,onPaste:N,onFocus:ce,openMenu:()=>O.$emit("open"),closeMenu:()=>O.$emit("close"),toggleMenu:()=>O.$emit("toggle")}):G("",!0),O.$slots["dp-input"]?G("",!0):(T(),z("input",{key:1,id:O.uid?`dp-input-${O.uid}`:void 0,ref_key:"inputRef",ref:M,"data-test-id":"dp-input",name:O.name,class:xe(C.value),inputmode:i(o).enabled?"text":"none",placeholder:O.placeholder,disabled:O.disabled,readonly:O.readonly,required:O.required,value:e.inputValue,autocomplete:O.autocomplete,"aria-label":(f=i(s))==null?void 0:f.input,"aria-disabled":O.disabled||void 0,"aria-invalid":O.state===!1?!0:void 0,onInput:V,onBlur:y,onFocus:ce,onKeypress:H,onKeydown:de[0]||(de[0]=W=>H(W)),onPaste:N},null,42,ai)),ge("div",{onClick:de[3]||(de[3]=W=>a("toggle"))},[O.$slots["input-icon"]&&!O.hideInputIcon?(T(),z("span",{key:0,class:"dp__input_icon",onClick:de[1]||(de[1]=W=>a("toggle"))},[ie(O.$slots,"input-icon")])):G("",!0),!O.$slots["input-icon"]&&!O.hideInputIcon&&!O.$slots["dp-input"]?(T(),Oe(i(ca),{key:1,"aria-label":(k=i(s))==null?void 0:k.calendarIcon,class:"dp__input_icon dp__input_icons",onClick:de[2]||(de[2]=W=>a("toggle"))},null,8,["aria-label"])):G("",!0)]),O.$slots["clear-icon"]&&(O.alwaysClearable||e.inputValue&&O.clearable&&!O.disabled&&!O.readonly)?(T(),z("span",ni,[ie(O.$slots,"clear-icon",{clear:D})])):G("",!0),!O.$slots["clear-icon"]&&(O.alwaysClearable||O.clearable&&e.inputValue&&!O.disabled&&!O.readonly)?(T(),z("button",{key:3,"aria-label":(F=i(s))==null?void 0:F.clearInput,class:"dp--clear-btn",type:"button",onKeydown:de[4]||(de[4]=W=>i(ut)(W,()=>D(W),!0,ee)),onClick:de[5]||(de[5]=ga(W=>D(W),["prevent"]))},[vt(i(kr),{class:"dp__input_icons","data-test-id":"clear-icon"})],40,ri)):G("",!0)])):G("",!0)])}}}),oi=typeof window<"u"?window:void 0,rn=()=>{},si=e=>Xr()?(Zr(e),!0):!1,ui=(e,t,n,a)=>{if(!e)return rn;let r=rn;const o=yt(()=>i(e),c=>{r(),c&&(c.removeEventListener(t,n),c.addEventListener(t,n,a),r=()=>{c.removeEventListener(t,n,a),r=rn})},{immediate:!0,flush:"post"}),s=()=>{o(),r()};return si(s),s},ii=(e,t,n,a={})=>{const{window:r=oi,event:o="pointerdown"}=a;return r?ui(r,o,s=>{const c=je(e),d=je(t);!c||!d||c===s.target||s.composedPath().includes(c)||s.composedPath().includes(d)||n(s)},{passive:!0}):void 0},di=["data-dp-mobile"],ci=tt({compatConfig:{MODE:3},__name:"VueDatePicker",props:{...Ia},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,o=Kt(),s=K(!1),c=ha(r,"modelValue"),d=ha(r,"timezone"),P=K(null),v=K(null),m=K(null),p=K(!1),x=K(null),A=K(!1),R=K(!1),M=K(!1),b=K(!1),{setMenuFocused:S,setShiftKey:C}=Ir(),{clearArrowNav:L}=Vt(),{validateDate:U,isValidTime:Y}=Wt(r),{defaultedTransitions:N,defaultedTextInput:re,defaultedInline:V,defaultedConfig:I,defaultedRange:se,defaultedMultiDates:ce}=Be(r),{menuTransition:ye,showTransition:y}=Ma(N),{isMobile:D}=Wr(I),h=Qr();at(()=>{l(r.modelValue),mt().then(()=>{if(!V.value.enabled){const B=f(x.value);B?.addEventListener("scroll",ae),window?.addEventListener("resize",ne)}}),V.value.enabled&&(s.value=!0),window?.addEventListener("keyup",Me),window?.addEventListener("keydown",be)}),ia(()=>{if(!V.value.enabled){const B=f(x.value);B?.removeEventListener("scroll",ae),window?.removeEventListener("resize",ne)}window?.removeEventListener("keyup",Me),window?.removeEventListener("keydown",be)});const H=ct(o,"all",r.presetDates),J=ct(o,"input");yt([c,d],()=>{l(c.value)},{deep:!0});const{openOnTop:E,menuStyle:ee,xCorrect:O,setMenuPosition:de,getScrollableParent:f,shadowRender:k}=Ku({menuRef:P,menuRefInner:v,inputRef:m,pickerWrapperRef:x,inline:V,emit:a,props:r,slots:o}),{inputValue:F,internalModelValue:W,parseExternalModelValue:l,emitModelValue:_,formatInputValue:oe,checkBeforeEmit:Ye}=qs(a,r,p),$=j(()=>({dp__main:!0,dp__theme_dark:r.dark,dp__theme_light:!r.dark,dp__flex_display:V.value.enabled,"dp--flex-display-collapsed":M.value,dp__flex_display_with_input:V.value.input})),we=j(()=>r.dark?"dp__theme_dark":"dp__theme_light"),Q=j(()=>r.teleport?{to:typeof r.teleport=="boolean"?"body":r.teleport,disabled:!r.teleport||V.value.enabled}:{}),te=j(()=>({class:"dp__outer_menu_wrap"})),u=j(()=>V.value.enabled&&(r.timePicker||r.monthPicker||r.yearPicker||r.quarterPicker)),Z=()=>{var B,ue;return((ue=(B=m.value)==null?void 0:B.$el)==null?void 0:ue.getBoundingClientRect())??{width:0,left:0,right:0}},ae=()=>{s.value&&(I.value.closeOnScroll?Ke():de())},ne=()=>{var B;s.value&&de();const ue=((B=v.value)==null?void 0:B.$el.getBoundingClientRect().width)??0;M.value=document.body.offsetWidth<=ue},Me=B=>{B.key==="Tab"&&!V.value.enabled&&!r.teleport&&I.value.tabOutClosesMenu&&(x.value.contains(document.activeElement)||Ke()),R.value=B.shiftKey},be=B=>{R.value=B.shiftKey},Ce=()=>{!r.disabled&&!r.readonly&&(k(h,Zn,r),de(!1),s.value=!0,s.value&&a("open"),s.value||ve(),l(r.modelValue))},We=()=>{var B,ue;F.value="",ve(),(B=v.value)==null||B.onValueCleared(),(ue=m.value)==null||ue.setParsedDate(null),a("update:model-value",null),a("update:model-timezone-value",null),a("cleared"),I.value.closeOnClearValue&&Ke()},g=()=>{const B=W.value;return!B||!Array.isArray(B)&&U(B)?!0:Array.isArray(B)?ce.value.enabled||B.length===2&&U(B[0])&&U(B[1])?!0:se.value.partialRange&&!r.timePicker?U(B[0]):!1:!1},le=()=>{Ye()&&g()?(_(),Ke()):a("invalid-select",W.value)},$e=B=>{Ge(),_(),I.value.closeOnAutoApply&&!B&&Ke()},Ge=()=>{m.value&&re.value.enabled&&m.value.setParsedDate(W.value)},Dt=(B=!1)=>{r.autoApply&&Y(W.value)&&g()&&(se.value.enabled&&Array.isArray(W.value)?(se.value.partialRange||W.value.length===2)&&$e(B):$e(B))},ve=()=>{re.value.enabled||(W.value=null)},Ke=(B=!1)=>{var ue,me;B&&W.value&&I.value.setDateOnMenuClose&&le(),V.value.enabled||(s.value&&(s.value=!1,O.value=!1,S(!1),C(!1),L(),a("closed"),F.value&&l(c.value)),ve(),a("blur"),(me=(ue=v.value)==null?void 0:ue.$el)==null||me.remove())},xt=(B,ue,me=!1)=>{if(!B){W.value=null;return}const At=Array.isArray(B)?!B.some(zt=>!U(zt)):U(B),Mt=Y(B);At&&Mt?(b.value=!0,W.value=B,ue?(A.value=me,le(),a("text-submit")):r.autoApply&&Dt(),mt().then(()=>{b.value=!1})):a("invalid-date",B)},La=()=>{r.autoApply&&Y(W.value)&&_(),Ge()},Ta=()=>s.value?Ke():Ce(),Ha=B=>{W.value=B},Va=()=>{re.value.enabled&&(p.value=!0,oe()),a("focus")},Wa=()=>{if(re.value.enabled&&(p.value=!1,l(r.modelValue),A.value)){const B=hs(x.value,R.value);B?.focus()}a("blur")},za=B=>{v.value&&v.value.updateMonthYear(0,{month:zn(B.month),year:zn(B.year)})},qa=B=>{l(B??r.modelValue)},w=(B,ue)=>{var me;(me=v.value)==null||me.switchView(B,ue)},X=(B,ue)=>I.value.onClickOutside?I.value.onClickOutside(B,ue):Ke(!0),fe=(B=0)=>{var ue;(ue=v.value)==null||ue.handleFlow(B)},_e=()=>P;return ii(P,m,B=>X(g,B)),t({closeMenu:Ke,selectDate:le,clearValue:We,openMenu:Ce,onScroll:ae,formatInputValue:oe,updateInternalModelValue:Ha,setMonthYear:za,parseModel:qa,switchView:w,toggleMenu:Ta,handleFlow:fe,getDpWrapMenuRef:_e}),(B,ue)=>(T(),z("div",{ref_key:"pickerWrapperRef",ref:x,class:xe($.value),"data-datepicker-instance":"","data-dp-mobile":i(D)},[vt(li,Je({ref_key:"inputRef",ref:m,"input-value":i(F),"onUpdate:inputValue":ue[0]||(ue[0]=me=>Yn(F)?F.value=me:null),"is-menu-open":s.value},B.$props,{onClear:We,onOpen:Ce,onSetInputDate:xt,onSetEmptyDate:i(_),onSelectDate:le,onToggle:Ta,onClose:Ke,onFocus:Va,onBlur:Wa,onRealBlur:ue[1]||(ue[1]=me=>p.value=!1),onTextInput:ue[2]||(ue[2]=me=>B.$emit("text-input",me))}),ot({_:2},[Fe(i(J),(me,At)=>({name:me,fn:De(Mt=>[ie(B.$slots,me,Ze(it(Mt)))])}))]),1040,["input-value","is-menu-open","onSetEmptyDate"]),(T(),Oe(Na(B.teleport?Ur:"div"),Ze(it(Q.value)),{default:De(()=>[vt(da,{name:i(ye)(i(E)),css:i(y)&&!i(V).enabled},{default:De(()=>[s.value?(T(),z("div",Je({key:0,ref_key:"dpWrapMenuRef",ref:P},te.value,{class:{"dp--menu-wrapper":!i(V).enabled},style:i(V).enabled?void 0:i(ee)}),[vt(Zn,Je({ref_key:"dpMenuRef",ref:v},B.$props,{"internal-model-value":i(W),"onUpdate:internalModelValue":ue[3]||(ue[3]=me=>Yn(W)?W.value=me:null),class:{[we.value]:!0,"dp--menu-wrapper":B.teleport},"open-on-top":i(E),"no-overlay-focus":u.value,collapse:M.value,"get-input-rect":Z,"is-text-input-date":b.value,onClosePicker:Ke,onSelectDate:le,onAutoApply:Dt,onTimeUpdate:La,onFlowStep:ue[4]||(ue[4]=me=>B.$emit("flow-step",me)),onUpdateMonthYear:ue[5]||(ue[5]=me=>B.$emit("update-month-year",me)),onInvalidSelect:ue[6]||(ue[6]=me=>B.$emit("invalid-select",i(W))),onAutoApplyInvalid:ue[7]||(ue[7]=me=>B.$emit("invalid-select",me)),onInvalidFixedRange:ue[8]||(ue[8]=me=>B.$emit("invalid-fixed-range",me)),onRecalculatePosition:i(de),onTooltipOpen:ue[9]||(ue[9]=me=>B.$emit("tooltip-open",me)),onTooltipClose:ue[10]||(ue[10]=me=>B.$emit("tooltip-close",me)),onTimePickerOpen:ue[11]||(ue[11]=me=>B.$emit("time-picker-open",me)),onTimePickerClose:ue[12]||(ue[12]=me=>B.$emit("time-picker-close",me)),onAmPmChange:ue[13]||(ue[13]=me=>B.$emit("am-pm-change",me)),onRangeStart:ue[14]||(ue[14]=me=>B.$emit("range-start",me)),onRangeEnd:ue[15]||(ue[15]=me=>B.$emit("range-end",me)),onDateUpdate:ue[16]||(ue[16]=me=>B.$emit("date-update",me)),onInvalidDate:ue[17]||(ue[17]=me=>B.$emit("invalid-date",me)),onOverlayToggle:ue[18]||(ue[18]=me=>B.$emit("overlay-toggle",me)),onMenuBlur:ue[19]||(ue[19]=me=>B.$emit("blur"))}),ot({_:2},[Fe(i(H),(me,At)=>({name:me,fn:De(Mt=>[ie(B.$slots,me,Ze(it({...Mt})))])}))]),1040,["internal-model-value","class","open-on-top","no-overlay-focus","collapse","is-text-input-date","onRecalculatePosition"])],16)):G("",!0)]),_:3},8,["name","css"])]),_:3},16))],10,di))}}),zr=(()=>{const e=ci;return e.install=t=>{t.component("Vue3DatePicker",e)},e})(),vi=Object.freeze(Object.defineProperty({__proto__:null,default:zr},Symbol.toStringTag,{value:"Module"}));Object.entries(vi).forEach(([e,t])=>{e!=="default"&&(zr[e]=t)});export{zr as Q}; diff --git a/src/static/app/dist/index.html b/src/static/app/dist/index.html index 0462c13..a8d6d2b 100644 --- a/src/static/app/dist/index.html +++ b/src/static/app/dist/index.html @@ -10,7 +10,7 @@ WGDashboard - + diff --git a/src/static/app/src/components/clientComponents/clientResetPassword.vue b/src/static/app/src/components/clientComponents/clientResetPassword.vue index c353afb..a1c9066 100644 --- a/src/static/app/src/components/clientComponents/clientResetPassword.vue +++ b/src/static/app/src/components/clientComponents/clientResetPassword.vue @@ -2,43 +2,68 @@ import LocaleText from "@/components/text/localeText.vue"; import { fetchGet, fetchPost } from "@/utilities/fetch.js" import {ref} from "vue"; +import {DashboardConfigurationStore } from "@/stores/DashboardConfigurationStore.js" +import {useRouter} from "vue-router"; const props = defineProps(['client']) + const alert = ref(false) const alertStatus = ref(false) const alertMessage = ref(false) +const resetting = ref(false) +const store = DashboardConfigurationStore(); +const router = useRouter() + +const getUrl = (token) => { + const crossServer = store.getActiveCrossServer(); + if(crossServer){ + return new URL('/client/#/reset_password?token=' + token, crossServer.host).href + } + return new URL('/client/#/reset_password?token=' + token, window.location.href).href +} const sendResetLink = async () => { + resetting.value = true let smtpReady = false; let token = undefined; await fetchPost('/api/clients/generatePasswordResetLink', { ClientID: props.client.ClientID - },(res) => { + },async (res) => { if (res.status){ token = res.data alertStatus.value = true + await fetchGet('/api/email/ready', {}, (res) => { + smtpReady = res.status + }); + if (smtpReady){ + let body = { + "Receiver": props.client.Email, + "Subject": "[WGDashboard | Client] Reset Password", + "Body": + `Hi${props.client.Name ? ' ' + props.client.Name: ''},\n\nWe received a request to reset the password for your account. You can reset your password by visiting the link below:\n\n${getUrl(token)}\n\nThis link will expire in 30 minutes for your security. If you didn’t request a password reset, you can safely ignore this email—your current password will remain unchanged.\n\nIf you need help, feel free to contact support.\n\nBest regards,\nWGDashboard` + } + await fetchPost('/api/email/send', body, (res) => { + if (res.status){ + alertMessage.value = `Send email success.` + alert.value = true; + }else{ + alertMessage.value = `Send email failed.` + alertStatus.value = false; + alert.value = true; + } + }); + }else{ + alertMessage.value = `Please share this URL to your client to reset the password: ${getUrl(token)}` + alert.value = true; + + } }else{ alertStatus.value = false alertMessage.value = res.message alert.value = true } }) - if (token){ - await fetchGet('/api/email/ready', {}, (res) => { - smtpReady = res.status - }); - if (smtpReady){ - await fetchPost('/api/email/send', { - "Receiver": props.client.Email, - "Body": - `Hi${props.client.Name ? ' ' + props.client.Name: ''},\n` - }, (res) => { - - }); - }else{ - - } - } + resetting.value = false; } @@ -51,9 +76,11 @@ const sendResetLink = async () => {